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
wasatch/ROI.py
adiravishankara/Wasatch.PY
9
2417
## # This class encapsulates a Region Of Interest, which may be either horizontal # (pixels) or vertical (rows/lines). class ROI: def __init__(self, start, end): self.start = start self.end = end self.len = end - start + 1 def valid(self): return self.start >= 0 and self.start < self.end def crop(self, spectrum): return spectrum[self.start:self.end+1] def contains(self, value): return self.start <= value <= self.end
[ 1, 444, 13, 29937, 910, 770, 2094, 2547, 352, 1078, 263, 11069, 4587, 23829, 29892, 607, 1122, 367, 2845, 14698, 29871, 13, 29937, 313, 29886, 861, 1379, 29897, 470, 11408, 313, 5727, 29914, 9012, 467, 13, 1990, 16641, 29902, 29901, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 1369, 29892, 1095, 1125, 13, 4706, 1583, 29889, 2962, 353, 1369, 13, 4706, 1583, 29889, 355, 353, 1095, 13, 4706, 1583, 29889, 2435, 353, 1095, 448, 1369, 718, 29871, 29896, 13, 13, 1678, 822, 2854, 29898, 1311, 1125, 13, 4706, 736, 1583, 29889, 2962, 6736, 29871, 29900, 322, 1583, 29889, 2962, 529, 1583, 29889, 355, 13, 13, 1678, 822, 274, 1336, 29898, 1311, 29892, 18272, 1125, 13, 4706, 736, 18272, 29961, 1311, 29889, 2962, 29901, 1311, 29889, 355, 29974, 29896, 29962, 13, 13, 1678, 822, 3743, 29898, 1311, 29892, 995, 1125, 13, 4706, 736, 1583, 29889, 2962, 5277, 995, 5277, 1583, 29889, 355, 13, 2 ]
pcWacomToMouseTouchpad.py
Amanita-muscaria/rmWacomToMouse
50
51420
<reponame>Amanita-muscaria/rmWacomToMouse #!/usr/bin/env python3 ''' Meant to run on your PC. Receives data generated by rmServerWacomInput.py, moves the mouse and presses accordingly. Acts like a touchpad. ''' import socket import struct from pynput.mouse import Button, Controller mouse = Controller() # ---------- # Config: ONLY_DEBUG = False # Only show data. Don't move mouse CLICK_PRESSURE = 1000 RELEASE_PRESSURE = 100 MAX_DIST = 20 # Max is 50 SPEED = 1.0 INVERT_X = True # Can be used to change orientation INVERT_Y = True # ---------- WACOM_WIDTH = 15725 # Values just checked by drawing to the edges WACOM_HEIGHT = 20967 # ↑ # Source: https://github.com/canselcik/libremarkable/blob/master/src/input/wacom.rs EV_SYNC = 0 EV_KEY = 1 EV_ABS = 3 WACOM_EVCODE_PRESSURE = 24 WACOM_EVCODE_DISTANCE = 25 WACOM_EVCODE_XTILT = 26 WACOM_EVCODE_YTILT = 27 WACOM_EVCODE_XPOS = 0 WACOM_EVCODE_YPOS = 1 lastXPos = None lastYPos = None lastXTilt = -1 lastYTilt = -1 lastDistance = -1 lastPressure = -1 mouseButtonPressed = False client = socket.socket(socket.AF_INET, socket.SOCK_STREAM) client.connect(('10.11.99.1', 33333)) while True: evDevType, evDevCode, evDevValue = struct.unpack('HHi', client.recv(8)) if evDevType == EV_ABS: if evDevCode == WACOM_EVCODE_XPOS: if lastDistance < MAX_DIST and lastXPos is not None: xDist = (evDevValue - lastXPos) * (-SPEED if INVERT_X else SPEED) mouse.move(xDist, 0) lastXPos = evDevValue elif evDevCode == WACOM_EVCODE_YPOS: if lastDistance < MAX_DIST and lastYPos is not None: yDist = (evDevValue - lastYPos) * (-SPEED if INVERT_Y else SPEED) mouse.move(0, yDist) lastYPos = evDevValue elif evDevCode == WACOM_EVCODE_XTILT: lastXTilt = evDevValue elif evDevCode == WACOM_EVCODE_YTILT: lastYTilt = evDevValue elif evDevCode == WACOM_EVCODE_DISTANCE: lastDistance = evDevValue elif evDevCode == WACOM_EVCODE_PRESSURE: if not ONLY_DEBUG: if not mouseButtonPressed and evDevValue > CLICK_PRESSURE: mouse.press(Button.left) mouseButtonPressed = True elif mouseButtonPressed and evDevValue <= RELEASE_PRESSURE: mouse.release(Button.left) mouseButtonPressed = False lastPressure = evDevValue
[ 1, 529, 276, 1112, 420, 29958, 29909, 1171, 2028, 29899, 8366, 4287, 423, 29914, 1758, 29956, 29874, 510, 1762, 14346, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 12008, 13, 6816, 424, 304, 1065, 373, 596, 9609, 29889, 13, 10380, 3145, 848, 5759, 491, 20241, 6004, 29956, 29874, 510, 4290, 29889, 2272, 29892, 13, 13529, 267, 278, 9495, 322, 3965, 267, 16205, 29889, 13, 13, 2865, 29879, 763, 263, 6023, 8305, 29889, 13, 12008, 13, 13, 13, 5215, 9909, 13, 5215, 2281, 13, 3166, 282, 948, 649, 29889, 15769, 1053, 11025, 29892, 15830, 13, 13, 15769, 353, 15830, 580, 13, 13, 29937, 448, 1378, 29899, 13, 29937, 12782, 29901, 13, 13, 1164, 16786, 29918, 18525, 353, 7700, 29871, 396, 9333, 1510, 848, 29889, 3872, 29915, 29873, 4337, 9495, 13, 13, 6154, 2965, 29968, 29918, 15094, 1799, 11499, 353, 29871, 29896, 29900, 29900, 29900, 13, 14829, 29918, 15094, 1799, 11499, 353, 29871, 29896, 29900, 29900, 13, 13, 12648, 29918, 4571, 1254, 353, 29871, 29906, 29900, 29871, 396, 5918, 338, 29871, 29945, 29900, 13, 29903, 4162, 3352, 353, 29871, 29896, 29889, 29900, 13, 1177, 5348, 29911, 29918, 29990, 353, 5852, 29871, 396, 1815, 367, 1304, 304, 1735, 19843, 13, 1177, 5348, 29911, 29918, 29979, 353, 5852, 13, 29937, 448, 1378, 29899, 13, 13, 13, 29956, 2477, 6488, 29918, 22574, 353, 29871, 29896, 29945, 29955, 29906, 29945, 29871, 396, 2630, 1041, 925, 7120, 491, 11580, 304, 278, 12770, 13, 29956, 2477, 6488, 29918, 9606, 22530, 353, 29871, 29906, 29900, 29929, 29953, 29955, 396, 29871, 30213, 13, 13, 13, 29937, 7562, 29901, 2045, 597, 3292, 29889, 510, 29914, 29883, 550, 295, 455, 29895, 29914, 492, 1030, 3502, 519, 29914, 10054, 29914, 6207, 29914, 4351, 29914, 2080, 29914, 2766, 510, 29889, 2288, 13, 22240, 29918, 14816, 15868, 353, 29871, 29900, 13, 22240, 29918, 10818, 353, 29871, 29896, 13, 22240, 29918, 2882, 29903, 353, 29871, 29941, 13, 29956, 2477, 6488, 29918, 22240, 16524, 29918, 15094, 1799, 11499, 353, 29871, 29906, 29946, 13, 29956, 2477, 6488, 29918, 22240, 16524, 29918, 4571, 1254, 23219, 353, 29871, 29906, 29945, 13, 29956, 2477, 6488, 29918, 22240, 16524, 29918, 12188, 29902, 5850, 353, 29871, 29906, 29953, 13, 29956, 2477, 6488, 29918, 22240, 16524, 29918, 29979, 24301, 5850, 353, 29871, 29906, 29955, 13, 29956, 2477, 6488, 29918, 22240, 16524, 29918, 29990, 24815, 353, 29871, 29900, 13, 29956, 2477, 6488, 29918, 22240, 16524, 29918, 29979, 24815, 353, 29871, 29896, 13, 13, 4230, 29990, 9135, 353, 6213, 13, 4230, 29979, 9135, 353, 6213, 13, 4230, 12188, 2782, 353, 448, 29896, 13, 4230, 29979, 29911, 2782, 353, 448, 29896, 13, 4230, 27469, 353, 448, 29896, 13, 4230, 10923, 545, 353, 448, 29896, 13, 13, 15769, 3125, 24104, 353, 7700, 13, 13, 4645, 353, 9909, 29889, 11514, 29898, 11514, 29889, 5098, 29918, 1177, 2544, 29892, 9909, 29889, 6156, 7077, 29918, 1254, 1525, 5194, 29897, 13, 4645, 29889, 6915, 29898, 877, 29896, 29900, 29889, 29896, 29896, 29889, 29929, 29929, 29889, 29896, 742, 29871, 29941, 29941, 29941, 29941, 29941, 876, 13, 13, 8000, 5852, 29901, 13, 12, 5750, 16618, 1542, 29892, 3415, 16618, 3399, 29892, 3415, 16618, 1917, 353, 2281, 29889, 348, 4058, 877, 29950, 18567, 742, 3132, 29889, 3757, 29894, 29898, 29947, 876, 13, 12, 361, 3415, 16618, 1542, 1275, 382, 29963, 29918, 2882, 29903, 29901, 13, 12, 12, 361, 3415, 16618, 3399, 1275, 399, 2477, 6488, 29918, 22240, 16524, 29918, 29990, 24815, 29901, 13, 12, 12, 12, 361, 1833, 27469, 529, 18134, 29918, 4571, 1254, 322, 1833, 29990, 9135, 338, 451, 6213, 29901, 13, 12, 12, 12, 12, 29916, 13398, 353, 313, 5750, 16618, 1917, 448, 1833, 29990, 9135, 29897, 334, 8521, 29903, 4162, 3352, 565, 2672, 5348, 29911, 29918, 29990, 1683, 317, 4162, 3352, 29897, 13, 12, 12, 12, 12, 15769, 29889, 11631, 29898, 29916, 13398, 29892, 29871, 29900, 29897, 13, 12, 12, 12, 4230, 29990, 9135, 353, 3415, 16618, 1917, 13, 12, 12, 23681, 3415, 16618, 3399, 1275, 399, 2477, 6488, 29918, 22240, 16524, 29918, 29979, 24815, 29901, 13, 12, 12, 12, 361, 1833, 27469, 529, 18134, 29918, 4571, 1254, 322, 1833, 29979, 9135, 338, 451, 6213, 29901, 13, 12, 12, 12, 12, 29891, 13398, 353, 313, 5750, 16618, 1917, 448, 1833, 29979, 9135, 29897, 334, 8521, 29903, 4162, 3352, 565, 2672, 5348, 29911, 29918, 29979, 1683, 317, 4162, 3352, 29897, 13, 12, 12, 12, 12, 15769, 29889, 11631, 29898, 29900, 29892, 343, 13398, 29897, 13, 12, 12, 12, 4230, 29979, 9135, 353, 3415, 16618, 1917, 13, 12, 12, 23681, 3415, 16618, 3399, 1275, 399, 2477, 6488, 29918, 22240, 16524, 29918, 12188, 29902, 5850, 29901, 13, 12, 12, 12, 4230, 12188, 2782, 353, 3415, 16618, 1917, 13, 12, 12, 23681, 3415, 16618, 3399, 1275, 399, 2477, 6488, 29918, 22240, 16524, 29918, 29979, 24301, 5850, 29901, 13, 12, 12, 12, 4230, 29979, 29911, 2782, 353, 3415, 16618, 1917, 13, 12, 12, 23681, 3415, 16618, 3399, 1275, 399, 2477, 6488, 29918, 22240, 16524, 29918, 4571, 1254, 23219, 29901, 13, 12, 12, 12, 4230, 27469, 353, 3415, 16618, 1917, 13, 12, 12, 23681, 3415, 16618, 3399, 1275, 399, 2477, 6488, 29918, 22240, 16524, 29918, 15094, 1799, 11499, 29901, 13, 12, 12, 12, 361, 451, 6732, 16786, 29918, 18525, 29901, 13, 12, 12, 12, 12, 361, 451, 9495, 3125, 24104, 322, 3415, 16618, 1917, 1405, 17332, 2965, 29968, 29918, 15094, 1799, 11499, 29901, 13, 12, 12, 12, 12, 12, 15769, 29889, 2139, 29898, 3125, 29889, 1563, 29897, 13, 12, 12, 12, 12, 12, 15769, 3125, 24104, 353, 5852, 13, 12, 12, 12, 12, 23681, 9495, 3125, 24104, 322, 3415, 16618, 1917, 5277, 5195, 14063, 29918, 15094, 1799, 11499, 29901, 13, 12, 12, 12, 12, 12, 15769, 29889, 14096, 29898, 3125, 29889, 1563, 29897, 13, 12, 12, 12, 12, 12, 15769, 3125, 24104, 353, 7700, 13, 13, 12, 12, 12, 4230, 10923, 545, 353, 3415, 16618, 1917, 13, 2 ]
tensorflow_federated/python/learning/federated_evaluation.py
Tensorflow-Devs/federated
0
8938
<reponame>Tensorflow-Devs/federated<filename>tensorflow_federated/python/learning/federated_evaluation.py # Copyright 2019, The TensorFlow Federated 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. """A simple implementation of federated evaluation.""" import collections from typing import Callable, Optional import tensorflow as tf from tensorflow_federated.python.core.api import computation_base from tensorflow_federated.python.core.api import computations from tensorflow_federated.python.core.impl.federated_context import intrinsics from tensorflow_federated.python.core.impl.types import computation_types from tensorflow_federated.python.core.templates import measured_process from tensorflow_federated.python.learning import model as model_lib from tensorflow_federated.python.learning import model_utils from tensorflow_federated.python.learning.framework import dataset_reduce from tensorflow_federated.python.learning.framework import optimizer_utils # Convenience aliases. SequenceType = computation_types.SequenceType def build_federated_evaluation( model_fn: Callable[[], model_lib.Model], broadcast_process: Optional[measured_process.MeasuredProcess] = None, use_experimental_simulation_loop: bool = False, ) -> computation_base.Computation: """Builds the TFF computation for federated evaluation of the given model. Args: model_fn: A no-arg function that returns a `tff.learning.Model`. This method must *not* capture TensorFlow tensors or variables and use them. The model must be constructed entirely from scratch on each invocation, returning the same pre-constructed model each call will result in an error. broadcast_process: A `tff.templates.MeasuredProcess` that broadcasts the model weights on the server to the clients. It must support the signature `(input_values@SERVER -> output_values@CLIENTS)` and have empty state. If set to default None, the server model is broadcast to the clients using the default tff.federated_broadcast. use_experimental_simulation_loop: Controls the reduce loop function for input dataset. An experimental reduce loop is used for simulation. Returns: A federated computation (an instance of `tff.Computation`) that accepts model parameters and federated data, and returns the evaluation metrics as aggregated by `tff.learning.Model.federated_output_computation`. """ if broadcast_process is not None: if not isinstance(broadcast_process, measured_process.MeasuredProcess): raise ValueError('`broadcast_process` must be a `MeasuredProcess`, got ' f'{type(broadcast_process)}.') if optimizer_utils.is_stateful_process(broadcast_process): raise ValueError( 'Cannot create a federated evaluation with a stateful ' 'broadcast process, must be stateless, has state: ' f'{broadcast_process.initialize.type_signature.result!r}') # Construct the model first just to obtain the metadata and define all the # types needed to define the computations that follow. # TODO(b/124477628): Ideally replace the need for stamping throwaway models # with some other mechanism. with tf.Graph().as_default(): model = model_fn() model_weights_type = model_utils.weights_type_from_model(model) batch_type = computation_types.to_type(model.input_spec) @computations.tf_computation(model_weights_type, SequenceType(batch_type)) @tf.function def client_eval(incoming_model_weights, dataset): """Returns local outputs after evaluting `model_weights` on `dataset`.""" with tf.init_scope(): model = model_fn() model_weights = model_utils.ModelWeights.from_model(model) tf.nest.map_structure(lambda v, t: v.assign(t), model_weights, incoming_model_weights) def reduce_fn(num_examples, batch): model_output = model.forward_pass(batch, training=False) if model_output.num_examples is None: # Compute shape from the size of the predictions if model didn't use the # batch size. return num_examples + tf.shape( model_output.predictions, out_type=tf.int64)[0] else: return num_examples + tf.cast(model_output.num_examples, tf.int64) dataset_reduce_fn = dataset_reduce.build_dataset_reduce_fn( use_experimental_simulation_loop) num_examples = dataset_reduce_fn( reduce_fn=reduce_fn, dataset=dataset, initial_state_fn=lambda: tf.zeros([], dtype=tf.int64)) return collections.OrderedDict( local_outputs=model.report_local_outputs(), num_examples=num_examples) @computations.federated_computation( computation_types.at_server(model_weights_type), computation_types.at_clients(SequenceType(batch_type))) def server_eval(server_model_weights, federated_dataset): if broadcast_process is not None: # TODO(b/179091838): Zip the measurements from the broadcast_process with # the result of `model.federated_output_computation` below to avoid # dropping these metrics. broadcast_output = broadcast_process.next(broadcast_process.initialize(), server_model_weights) client_outputs = intrinsics.federated_map( client_eval, (broadcast_output.result, federated_dataset)) else: client_outputs = intrinsics.federated_map(client_eval, [ intrinsics.federated_broadcast(server_model_weights), federated_dataset ]) model_metrics = model.federated_output_computation( client_outputs.local_outputs) statistics = collections.OrderedDict( num_examples=intrinsics.federated_sum(client_outputs.num_examples)) return intrinsics.federated_zip( collections.OrderedDict(eval=model_metrics, stat=statistics)) return server_eval
[ 1, 529, 276, 1112, 420, 29958, 29911, 6073, 1731, 29899, 2772, 4270, 29914, 29888, 2447, 630, 29966, 9507, 29958, 29056, 29918, 29888, 2447, 630, 29914, 4691, 29914, 21891, 29914, 29888, 2447, 630, 29918, 24219, 362, 29889, 2272, 13, 29937, 14187, 1266, 29871, 29906, 29900, 29896, 29929, 29892, 450, 323, 6073, 17907, 7351, 630, 13189, 943, 29889, 13, 29937, 13, 29937, 10413, 21144, 1090, 278, 13380, 19245, 29892, 10079, 29871, 29906, 29889, 29900, 313, 1552, 376, 29931, 293, 1947, 1496, 13, 29937, 366, 1122, 451, 671, 445, 934, 5174, 297, 752, 13036, 411, 278, 19245, 29889, 13, 29937, 887, 1122, 4017, 263, 3509, 310, 278, 19245, 472, 13, 29937, 13, 29937, 418, 1732, 597, 1636, 29889, 4288, 29889, 990, 29914, 506, 11259, 29914, 27888, 1430, 1660, 29899, 29906, 29889, 29900, 13, 29937, 13, 29937, 25870, 3734, 491, 22903, 4307, 470, 15502, 304, 297, 5007, 29892, 7047, 13, 29937, 13235, 1090, 278, 19245, 338, 13235, 373, 385, 376, 3289, 8519, 29908, 350, 3289, 3235, 29892, 13, 29937, 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, 2823, 278, 19245, 363, 278, 2702, 4086, 14765, 1076, 11239, 322, 13, 29937, 27028, 1090, 278, 19245, 29889, 13, 15945, 29908, 29909, 2560, 5314, 310, 12067, 630, 17983, 1213, 15945, 13, 13, 5215, 16250, 13, 3166, 19229, 1053, 8251, 519, 29892, 28379, 13, 13, 5215, 26110, 408, 15886, 13, 13, 3166, 26110, 29918, 29888, 2447, 630, 29889, 4691, 29889, 3221, 29889, 2754, 1053, 16287, 29918, 3188, 13, 3166, 26110, 29918, 29888, 2447, 630, 29889, 4691, 29889, 3221, 29889, 2754, 1053, 2912, 800, 13, 3166, 26110, 29918, 29888, 2447, 630, 29889, 4691, 29889, 3221, 29889, 13699, 29889, 29888, 2447, 630, 29918, 4703, 1053, 11158, 1144, 1199, 13, 3166, 26110, 29918, 29888, 2447, 630, 29889, 4691, 29889, 3221, 29889, 13699, 29889, 8768, 1053, 16287, 29918, 8768, 13, 3166, 26110, 29918, 29888, 2447, 630, 29889, 4691, 29889, 3221, 29889, 20943, 1053, 17005, 29918, 5014, 13, 3166, 26110, 29918, 29888, 2447, 630, 29889, 4691, 29889, 21891, 1053, 1904, 408, 1904, 29918, 1982, 13, 3166, 26110, 29918, 29888, 2447, 630, 29889, 4691, 29889, 21891, 1053, 1904, 29918, 13239, 13, 3166, 26110, 29918, 29888, 2447, 630, 29889, 4691, 29889, 21891, 29889, 4468, 1053, 8783, 29918, 17469, 13, 3166, 26110, 29918, 29888, 2447, 630, 29889, 4691, 29889, 21891, 29889, 4468, 1053, 5994, 3950, 29918, 13239, 13, 13, 13, 29937, 1281, 854, 5597, 14430, 2129, 29889, 13, 20529, 1542, 353, 16287, 29918, 8768, 29889, 20529, 1542, 13, 13, 13, 1753, 2048, 29918, 29888, 2447, 630, 29918, 24219, 362, 29898, 13, 1678, 1904, 29918, 9144, 29901, 8251, 519, 8999, 1402, 1904, 29918, 1982, 29889, 3195, 1402, 13, 1678, 12672, 29918, 5014, 29901, 28379, 29961, 1004, 294, 2955, 29918, 5014, 29889, 6816, 294, 2955, 7032, 29962, 353, 6213, 29892, 13, 1678, 671, 29918, 735, 27910, 29918, 3601, 2785, 29918, 7888, 29901, 6120, 353, 7700, 29892, 13, 29897, 1599, 16287, 29918, 3188, 29889, 1523, 14584, 29901, 13, 29871, 9995, 8893, 29879, 278, 323, 4198, 16287, 363, 12067, 630, 17983, 310, 278, 2183, 1904, 29889, 13, 13, 29871, 826, 3174, 29901, 13, 1678, 1904, 29918, 9144, 29901, 319, 694, 29899, 1191, 740, 393, 3639, 263, 421, 29873, 600, 29889, 21891, 29889, 3195, 1412, 910, 1158, 13, 418, 1818, 334, 1333, 29930, 10446, 323, 6073, 17907, 25187, 943, 470, 3651, 322, 671, 963, 29889, 450, 1904, 13, 418, 1818, 367, 13319, 9186, 515, 22728, 373, 1269, 2437, 10610, 29892, 7863, 13, 418, 278, 1021, 758, 29899, 11433, 287, 1904, 1269, 1246, 674, 1121, 297, 385, 1059, 29889, 13, 1678, 12672, 29918, 5014, 29901, 319, 421, 29873, 600, 29889, 20943, 29889, 6816, 294, 2955, 7032, 29952, 393, 12672, 29879, 278, 13, 418, 1904, 18177, 373, 278, 1923, 304, 278, 13154, 29889, 739, 1818, 2304, 278, 12608, 13, 418, 12270, 2080, 29918, 5975, 29992, 18603, 1599, 1962, 29918, 5975, 29992, 27205, 3919, 29903, 3569, 322, 505, 4069, 2106, 29889, 960, 13, 418, 731, 304, 2322, 6213, 29892, 278, 1923, 1904, 338, 12672, 304, 278, 13154, 773, 13, 418, 278, 2322, 260, 600, 29889, 29888, 2447, 630, 29918, 6729, 328, 4384, 29889, 13, 1678, 671, 29918, 735, 27910, 29918, 3601, 2785, 29918, 7888, 29901, 11264, 29879, 278, 10032, 2425, 740, 363, 13, 418, 1881, 8783, 29889, 530, 17986, 10032, 2425, 338, 1304, 363, 17402, 29889, 13, 13, 29871, 16969, 29901, 13, 1678, 319, 12067, 630, 16287, 313, 273, 2777, 310, 421, 29873, 600, 29889, 1523, 14584, 6348, 393, 21486, 13, 1678, 1904, 4128, 322, 12067, 630, 848, 29892, 322, 3639, 278, 17983, 21556, 13, 1678, 408, 11404, 630, 491, 421, 29873, 600, 29889, 21891, 29889, 3195, 29889, 29888, 2447, 630, 29918, 4905, 29918, 12097, 362, 1412, 13, 29871, 9995, 13, 29871, 565, 12672, 29918, 5014, 338, 451, 6213, 29901, 13, 1678, 565, 451, 338, 8758, 29898, 6729, 328, 4384, 29918, 5014, 29892, 17005, 29918, 5014, 29889, 6816, 294, 2955, 7032, 1125, 13, 418, 12020, 7865, 2392, 877, 29952, 6729, 328, 4384, 29918, 5014, 29952, 1818, 367, 263, 421, 6816, 294, 2955, 7032, 1673, 2355, 525, 13, 462, 539, 285, 29915, 29912, 1853, 29898, 6729, 328, 4384, 29918, 5014, 29512, 1495, 13, 1678, 565, 5994, 3950, 29918, 13239, 29889, 275, 29918, 3859, 1319, 29918, 5014, 29898, 6729, 328, 4384, 29918, 5014, 1125, 13, 418, 12020, 7865, 2392, 29898, 13, 3986, 525, 29089, 1653, 263, 12067, 630, 17983, 411, 263, 2106, 1319, 525, 13, 3986, 525, 6729, 328, 4384, 1889, 29892, 1818, 367, 1002, 6393, 29892, 756, 2106, 29901, 525, 13, 3986, 285, 29915, 29912, 6729, 328, 4384, 29918, 5014, 29889, 24926, 29889, 1853, 29918, 4530, 1535, 29889, 2914, 29991, 29878, 29913, 1495, 13, 29871, 396, 1281, 4984, 278, 1904, 937, 925, 304, 4017, 278, 15562, 322, 4529, 599, 278, 13, 29871, 396, 4072, 4312, 304, 4529, 278, 2912, 800, 393, 1101, 29889, 13, 29871, 396, 14402, 29898, 29890, 29914, 29896, 29906, 29946, 29946, 29955, 29955, 29953, 29906, 29947, 1125, 13001, 635, 5191, 278, 817, 363, 25214, 292, 3183, 21694, 4733, 13, 29871, 396, 411, 777, 916, 13336, 29889, 13, 29871, 411, 15886, 29889, 9527, 2141, 294, 29918, 4381, 7295, 13, 1678, 1904, 353, 1904, 29918, 9144, 580, 13, 1678, 1904, 29918, 705, 5861, 29918, 1853, 353, 1904, 29918, 13239, 29889, 705, 5861, 29918, 1853, 29918, 3166, 29918, 4299, 29898, 4299, 29897, 13, 1678, 9853, 29918, 1853, 353, 16287, 29918, 8768, 29889, 517, 29918, 1853, 29898, 4299, 29889, 2080, 29918, 6550, 29897, 13, 13, 29871, 732, 12097, 800, 29889, 13264, 29918, 12097, 362, 29898, 4299, 29918, 705, 5861, 29918, 1853, 29892, 922, 3910, 1542, 29898, 16175, 29918, 1853, 876, 13, 29871, 732, 13264, 29889, 2220, 13, 29871, 822, 3132, 29918, 14513, 29898, 262, 11506, 29918, 4299, 29918, 705, 5861, 29892, 8783, 1125, 13, 1678, 9995, 11609, 29879, 1887, 14391, 1156, 19745, 17068, 421, 4299, 29918, 705, 5861, 29952, 373, 421, 24713, 29952, 1213, 15945, 13, 1678, 411, 15886, 29889, 2344, 29918, 6078, 7295, 13, 418, 1904, 353, 1904, 29918, 9144, 580, 13, 1678, 1904, 29918, 705, 5861, 353, 1904, 29918, 13239, 29889, 3195, 4806, 5861, 29889, 3166, 29918, 4299, 29898, 4299, 29897, 13, 1678, 15886, 29889, 17510, 29889, 1958, 29918, 23905, 29898, 2892, 325, 29892, 260, 29901, 325, 29889, 16645, 29898, 29873, 511, 1904, 29918, 705, 5861, 29892, 13, 462, 3986, 23235, 29918, 4299, 29918, 705, 5861, 29897, 13, 13, 1678, 822, 10032, 29918, 9144, 29898, 1949, 29918, 19057, 29892, 9853, 1125, 13, 418, 1904, 29918, 4905, 353, 1904, 29889, 11333, 29918, 3364, 29898, 16175, 29892, 6694, 29922, 8824, 29897, 13, 418, 565, 1904, 29918, 4905, 29889, 1949, 29918, 19057, 338, 6213, 29901, 13, 4706, 396, 11796, 29872, 8267, 515, 278, 2159, 310, 278, 27303, 565, 1904, 3282, 29915, 29873, 671, 278, 13, 4706, 396, 9853, 2159, 29889, 13, 4706, 736, 954, 29918, 19057, 718, 15886, 29889, 12181, 29898, 13, 9651, 1904, 29918, 4905, 29889, 27711, 1080, 29892, 714, 29918, 1853, 29922, 13264, 29889, 524, 29953, 29946, 9601, 29900, 29962, 13, 418, 1683, 29901, 13, 4706, 736, 954, 29918, 19057, 718, 15886, 29889, 4384, 29898, 4299, 29918, 4905, 29889, 1949, 29918, 19057, 29892, 15886, 29889, 524, 29953, 29946, 29897, 13, 13, 1678, 8783, 29918, 17469, 29918, 9144, 353, 8783, 29918, 17469, 29889, 4282, 29918, 24713, 29918, 17469, 29918, 9144, 29898, 13, 4706, 671, 29918, 735, 27910, 29918, 3601, 2785, 29918, 7888, 29897, 13, 1678, 954, 29918, 19057, 353, 8783, 29918, 17469, 29918, 9144, 29898, 13, 4706, 10032, 29918, 9144, 29922, 17469, 29918, 9144, 29892, 13, 4706, 8783, 29922, 24713, 29892, 13, 4706, 2847, 29918, 3859, 29918, 9144, 29922, 2892, 29901, 15886, 29889, 3298, 359, 4197, 1402, 26688, 29922, 13264, 29889, 524, 29953, 29946, 876, 13, 1678, 736, 16250, 29889, 7514, 287, 21533, 29898, 13, 4706, 1887, 29918, 4905, 29879, 29922, 4299, 29889, 12276, 29918, 2997, 29918, 4905, 29879, 3285, 954, 29918, 19057, 29922, 1949, 29918, 19057, 29897, 13, 13, 29871, 732, 12097, 800, 29889, 29888, 2447, 630, 29918, 12097, 362, 29898, 13, 418, 16287, 29918, 8768, 29889, 271, 29918, 2974, 29898, 4299, 29918, 705, 5861, 29918, 1853, 511, 13, 418, 16287, 29918, 8768, 29889, 271, 29918, 11303, 1237, 29898, 20529, 1542, 29898, 16175, 29918, 1853, 4961, 13, 29871, 822, 1923, 29918, 14513, 29898, 2974, 29918, 4299, 29918, 705, 5861, 29892, 12067, 630, 29918, 24713, 1125, 13, 1678, 565, 12672, 29918, 5014, 338, 451, 6213, 29901, 13, 418, 396, 14402, 29898, 29890, 29914, 29896, 29955, 29929, 29900, 29929, 29896, 29947, 29941, 29947, 1125, 796, 666, 278, 20398, 515, 278, 12672, 29918, 5014, 411, 13, 418, 396, 278, 1121, 310, 421, 4299, 29889, 29888, 2447, 630, 29918, 4905, 29918, 12097, 362, 29952, 2400, 304, 4772, 13, 418, 396, 4441, 3262, 1438, 21556, 29889, 13, 418, 12672, 29918, 4905, 353, 12672, 29918, 5014, 29889, 4622, 29898, 6729, 328, 4384, 29918, 5014, 29889, 24926, 3285, 13, 462, 462, 18884, 1923, 29918, 4299, 29918, 705, 5861, 29897, 13, 418, 3132, 29918, 4905, 29879, 353, 11158, 1144, 1199, 29889, 29888, 2447, 630, 29918, 1958, 29898, 13, 3986, 3132, 29918, 14513, 29892, 313, 6729, 328, 4384, 29918, 4905, 29889, 2914, 29892, 12067, 630, 29918, 24713, 876, 13, 1678, 1683, 29901, 13, 418, 3132, 29918, 4905, 29879, 353, 11158, 1144, 1199, 29889, 29888, 2447, 630, 29918, 1958, 29898, 4645, 29918, 14513, 29892, 518, 13, 3986, 11158, 1144, 1199, 29889, 29888, 2447, 630, 29918, 6729, 328, 4384, 29898, 2974, 29918, 4299, 29918, 705, 5861, 511, 13, 3986, 12067, 630, 29918, 24713, 13, 539, 2314, 13, 1678, 1904, 29918, 2527, 10817, 353, 1904, 29889, 29888, 2447, 630, 29918, 4905, 29918, 12097, 362, 29898, 13, 4706, 3132, 29918, 4905, 29879, 29889, 2997, 29918, 4905, 29879, 29897, 13, 1678, 13964, 353, 16250, 29889, 7514, 287, 21533, 29898, 13, 4706, 954, 29918, 19057, 29922, 262, 509, 1144, 1199, 29889, 29888, 2447, 630, 29918, 2083, 29898, 4645, 29918, 4905, 29879, 29889, 1949, 29918, 19057, 876, 13, 1678, 736, 11158, 1144, 1199, 29889, 29888, 2447, 630, 29918, 7554, 29898, 13, 4706, 16250, 29889, 7514, 287, 21533, 29898, 14513, 29922, 4299, 29918, 2527, 10817, 29892, 1002, 29922, 6112, 6765, 876, 13, 13, 29871, 736, 1923, 29918, 14513, 13, 2 ]
Session II/Encapsulation.py
intrepidkarthi/softwareengineer
4
112057
class Encapsulation: def __init__(self): self.__my_price = 10 def sell(self): print("my selling price is {}".format(self.__my_price)) def setprice(self, price): self.__my_price = price encap = Encapsulation() encap.sell() encap.__my_price = 20 encap.sell() encap.setprice(20) encap.sell()
[ 1, 770, 11346, 2547, 2785, 29901, 13, 1678, 822, 4770, 2344, 12035, 1311, 1125, 13, 4706, 1583, 17255, 1357, 29918, 9175, 353, 29871, 29896, 29900, 13, 13, 1678, 822, 19417, 29898, 1311, 1125, 13, 4706, 1596, 703, 1357, 269, 7807, 8666, 338, 6571, 1642, 4830, 29898, 1311, 17255, 1357, 29918, 9175, 876, 13, 13, 1678, 822, 731, 9175, 29898, 1311, 29892, 8666, 1125, 13, 4706, 1583, 17255, 1357, 29918, 9175, 353, 8666, 13, 13, 3977, 481, 353, 11346, 2547, 2785, 580, 13, 3977, 481, 29889, 29879, 514, 580, 13, 3977, 481, 17255, 1357, 29918, 9175, 353, 29871, 29906, 29900, 13, 3977, 481, 29889, 29879, 514, 580, 13, 3977, 481, 29889, 842, 9175, 29898, 29906, 29900, 29897, 13, 3977, 481, 29889, 29879, 514, 580, 2 ]
ecs_pipeline_deploy/cli.py
gmr/ecs-pipeline-deploy
2
150467
<gh_stars>1-10 # coding=utf-8 """ CLI Application Implementation ============================== """ import argparse import collections import logging import re import sys import time import boto3 import coloredlogs from . import __version__ LOGGER = logging.getLogger(__name__) LOGGING_FORMAT = '%(asctime)s %(name)s %(message)s' LOGGING_FIELD_STYLES = { 'hostname': {'color': 'magenta'}, 'programname': {'color': 'cyan'}, 'name': {'color': 'blue'}, 'levelname': {'color': 'white', 'bold': True}, 'asctime': {'color': 'white'}} Image = collections.namedtuple('Image', ['registry', 'name', 'tag']) IMAGE_PATTERN = re.compile( r'^(?P<repository>[\w.\-_]+(?:(?::\d+|)(?=/[a-z0-9._-]+/[a-z0-9._-]+))|)' r'(?:/|)(?P<name>[a-z0-9.\-_]+(?:/[a-z0-9.\-_]+|))' r'(?::(?P<tag>[\w.\-_]{1,127})|)$') class ECSPipeline: """Controller class for performing Pipeline based deployments in ECS.""" def __init__(self, args): """Create a new instance of the ECSPipeline class :param argparse.namespace args: The parsed CLI args """ self.args = args self.client = boto3.client('ecs') try: self.image = self.parse_image(args.image) except ValueError: exit_application( 'Malformed image specified: {}'.format(args.image), 1) self.redeploying = False try: self.service_arn = self._get_service_arn() except self.client.exceptions.ClusterNotFoundException: exit_application('Cluster not found: {}'.format(args.cluster), 1) self.desired_qty, self.current = self._describe_service() self.task_definition = self._get_task_definition() def deploy(self): """Deploy the task definition to the configured cluster.""" LOGGER.info('%s %s in %s to %s', 'Redeploying' if self.redeploying else 'Updating', self.args.service, self.args.cluster, self.task_definition.split('/')[-1]) result = self.client.update_service( cluster=self.args.cluster, service=self.service_arn, taskDefinition=self.task_definition, forceNewDeployment=self.args.redeploy) if result['service']['taskDefinition'] == self.task_definition: LOGGER.info('%s %s in %s to %s', 'Redeployed' if self.redeploying else 'Updated', self.args.service, self.args.cluster, self.task_definition.split('/')[-1]) if self.args.wait: self._wait_on_tasks() LOGGER.info('%s complete', 'Redeployment' if self.redeploying else 'Deployment') @staticmethod def image_to_str(image): """Build the image string value from the namedtuple. :param Image image: The image tuple to return the string from :rtype: str """ if image.registry: return '{}/{}:{}'.format(image.registry, image.name, image.tag) return '{}:{}'.format(image.name, image.tag) @staticmethod def parse_image(image): """Parse an image returning the info as a namedtuple :rtype: Image :raises: ValueError """ try: result = IMAGE_PATTERN.match(image) except TypeError: result = None if not result: raise ValueError('Failed to parse image') img = result.groupdict() return Image(img['repository'] or None, img['name'], img['tag'] or 'latest') def _describe_service(self): """Return the current task definition the service and configured quantity of tasks for the service. :rtype: (qty, dict) """ LOGGER.info('Getting the current task definition for %s in %s', self.args.service, self.args.cluster) response = self.client.describe_services( cluster=self.args.cluster, services=[self.service_arn]) return (response['services'][0]['desiredCount'], self._describe_task_definition( response['services'][0]['taskDefinition'])) def _describe_task_definition(self, arn): """Return the task definition from ECS. :rtype: dict """ response = self.client.describe_task_definition(taskDefinition=arn) return response['taskDefinition'] def _get_service_arn(self): """Return the ARN of the service to perform the deployment on. :rtype: str """ for arn in self._services(): parts = arn.split('/') if parts[-1] == self.args.service: return arn exit_application( 'Service {} not found in {}'.format( self.args.service, self.args.cluster), 1) def _get_task_definition(self): """Return the task definition ARN to use, creating a new task definition if required. """ if self.image in self._get_containers(self.current): if self.args.redeploy: self.redeploying = True return self.current['taskDefinitionArn'] elif self.args.force: self.redeploying = True return self._save_task_definition(self.current) exit_application( '{} is already deployed to {} as "{}"'.format( self.args.image, self.args.cluster, self.current['taskDefinitionArn'].split('/')[-1]), 2) return self._save_task_definition( self._modify_task_definition(self.current)) def _get_containers(self, task_defn): """Return the containers from a task definition. :param dict task_defn: The task definition data structure :rtype: list """ containers = [ self.parse_image(cd['image']) for cd in task_defn['containerDefinitions']] for container in sorted(containers): LOGGER.debug('Found %s in the task definition', container) return sorted(containers) def _get_task_definitions_from_family(self, family): """Return a list of task definitions for the family sorted in descending numerical order. :param str family: The task definition family :rtype: list """ LOGGER.info('Getting all of the task definitions for %s in %s', self.args.service, self.args.cluster) definitions = [] paginator = self.client.get_paginator('list_task_definitions') for page in paginator.paginate(familyPrefix=family, sort='DESC'): definitions += page['taskDefinitionArns'] for definition in sorted(definitions): LOGGER.debug('Task definition %s found', definition) return definitions def _list_running_tasks(self): """Return all tasks and their task definitions as a list of tuples. :rtype: [(str, str), ...] """ LOGGER.info('Getting running tasks for %s in %s', self.args.service, self.args.cluster) task_arns = [] paginator = self.client.get_paginator('list_tasks') for page in paginator.paginate(cluster=self.args.cluster, serviceName=self.args.service, desiredStatus='RUNNING'): task_arns += page['taskArns'] for task_arn in sorted(task_arns): LOGGER.debug('Task found: %s', task_arn) # Build the result set of tasks that are running tasks = [] while task_arns: response = self.client.describe_tasks( cluster=self.args.cluster, tasks=task_arns[:100]) for task in response['tasks']: LOGGER.debug('Task %s running %s', task['taskArn'], task['taskDefinitionArn']) tasks.append((task['taskArn'], task['taskDefinitionArn'])) task_arns.remove(task['taskArn']) return tasks def _modify_task_definition(self, defn): """Modify the task definition that was passed in, replacing the image appropriately with the image that is going to be tagged. :param dict defn: The definition to modify :rtype: dict """ LOGGER.info('Modifying the task definition "%s" to use %s', defn['taskDefinitionArn'], self.args.image) for idx, image in enumerate(self._get_containers(defn)): if self.image.registry == image.registry and \ self.image.name == image.name: defn['containerDefinitions'][idx]['image'] = \ self.image_to_str(self.image) log_config = defn['containerDefinitions'][idx].get( 'logConfiguration', {}) options = log_config.get('options', {}) if 'tag' in options: log_config['options']['tag'] = \ options['tag'].replace(image.tag, self.image.tag) environment = defn['containerDefinitions'][idx].get( 'environment', []) for offset, variable in enumerate(environment): if variable['name'] == 'VERSION': environment[offset] = { 'name': 'VERSION', 'value': self.image.tag } return defn raise ValueError( 'Did not find the image {!r} in the task definition'.format( self.args.image)) def _save_task_definition(self, definition): """Save the task definition, returning the new ARN. :param dict definition: The new definition to save :rtype: str """ for key in {'compatibilities', 'requiresAttributes', 'requiresCompatibilities', 'revision', 'status', 'taskDefinitionArn'}: if key in definition: del definition[key] LOGGER.debug('Saving the new task definition for %s', definition['family']) result = self.client.register_task_definition(**definition) return result['taskDefinition']['taskDefinitionArn'] def _services(self): """Return the list of services configured in the cluster. :rtype: list """ LOGGER.info('Getting services in the %s cluster', self.args.cluster) arns = [] paginator = self.client.get_paginator('list_services') for page in paginator.paginate(cluster=self.args.cluster): arns += page['serviceArns'] for arn in sorted(arns): LOGGER.debug('Returning %r', arn) return sorted(arns) def _wait_on_tasks(self): """Wait for all tasks to be in the running state for the task definition. """ LOGGER.info('Waiting for %i tasks to enter running state for "%s"', self.desired_qty, self.task_definition.split('/')[-1]) while True: tasks = self._list_running_tasks() counts = collections.Counter() for _task, task_def in tasks: counts[task_def] += 1 LOGGER.debug('Current running tasks by definition: %s', ', '.join( ['{}: {}'.format(k.split('/')[-1], counts[k]) for k in sorted( counts.keys(), key=lambda x: int(x.split(':')[-1]))])) if counts.get(self.task_definition, 0) == self.desired_qty: if not self.args.only_new or (len(tasks) == self.desired_qty): break time.sleep(self.args.delay) def _running_task_count(self, tasks): """Return the quantity of tasks that are running for the task definition. :param list tasks: The list of task tuples :rtype: int """ return len([t for t in tasks if t[1] == self.task_definition]) def parse_cli_args(): """Construct the CLI argument parser and return the parsed the arguments. :rtype: argparse.namespace """ parser = argparse.ArgumentParser( prog='ecs-pipeline-deploy', description='Opinionated ECS deployment made easy', formatter_class=argparse.ArgumentDefaultsHelpFormatter, conflict_handler='resolve') parser.add_argument('cluster', nargs='?', type=str, metavar='CLUSTER', help='The ECS cluster name to deploy in') parser.add_argument('service', nargs='?', type=str, metavar='SERVICE', help='The ECS Service name to deploy') parser.add_argument('image', nargs='?', type=str, metavar='IMAGE', help='The Docker image (with tag) to deploy for ' 'finding the task definition') parser.add_argument('-f', '--force', action='store_true', help='Create a new task definition for the image even ' 'if one already exists for the tagged version') parser.add_argument('-r', '--redeploy', action='store_true', help='Force a redeployment if the tagged images match') parser.add_argument('-w', '--wait', action='store_true', help='Wait for running tasks to be replaced') parser.add_argument('-o', '--only-new', action='store_true', help='If waiting, wait for only newly deployed tasks ' 'to be running') parser.add_argument('-d', '--delay', type=int, default=5, help='Seconds to delay before checking tasks while ' 'waiting on a deployment to finish') parser.add_argument('-v', '--verbose', action='store_true') parser.add_argument('-V', '--version', action='version', version='%(prog)s {}'.format(__version__)) return parser.parse_args() def configure_logging(args): """Setup logging""" level = logging.DEBUG if args.verbose else logging.INFO coloredlogs.install(level=level, fmt=LOGGING_FORMAT, field_styles=LOGGING_FIELD_STYLES) silence_noisy_loggers() def exit_application(message=None, code=0): """Exit the application displaying the message to info or error based upon the exit code :param str message: The exit message :param int code: The exit code (default: 0) """ log_method = LOGGER.error if code else LOGGER.info log_method(message.strip()) sys.exit(code) def main(): """Application Entrypoint""" args = parse_cli_args() configure_logging(args) LOGGER.info('ecs-pipeline-deploy v%s starting', __version__) ECSPipeline(args).deploy() def silence_noisy_loggers(): """Some things are noisier than others. Some libraries mothers are noisier than other libraries mothers. """ for logger in ['boto3', 'botocore', 'urllib3.connectionpool', 'botocore.vendored.requests.packages.urllib3']: logging.getLogger(logger).setLevel(logging.WARNING)
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 29937, 14137, 29922, 9420, 29899, 29947, 13, 15945, 29908, 13, 27205, 8427, 1954, 14607, 13, 9166, 4936, 2751, 1360, 13, 13, 15945, 29908, 13, 5215, 1852, 5510, 13, 5215, 16250, 13, 5215, 12183, 13, 5215, 337, 13, 5215, 10876, 13, 5215, 931, 13, 13, 5215, 289, 3747, 29941, 13, 5215, 28684, 20756, 13, 13, 3166, 869, 1053, 4770, 3259, 1649, 13, 13, 14480, 17070, 353, 12183, 29889, 657, 16363, 22168, 978, 1649, 29897, 13, 13, 14480, 29954, 4214, 29918, 19094, 1299, 353, 14210, 29898, 294, 312, 603, 29897, 29879, 1273, 29898, 978, 29897, 29879, 1273, 29898, 4906, 29897, 29879, 29915, 13, 14480, 29954, 4214, 29918, 3738, 27286, 29918, 1254, 29979, 17101, 353, 426, 13, 1678, 525, 28988, 2396, 11117, 2780, 2396, 525, 11082, 6381, 16675, 13, 1678, 525, 8860, 978, 2396, 11117, 2780, 2396, 525, 1270, 273, 16675, 13, 1678, 525, 978, 2396, 11117, 2780, 2396, 525, 9539, 16675, 13, 1678, 525, 5563, 978, 2396, 11117, 2780, 2396, 525, 10921, 742, 525, 8934, 2396, 5852, 1118, 13, 1678, 525, 294, 312, 603, 2396, 11117, 2780, 2396, 525, 10921, 29915, 930, 13, 13, 13, 2940, 353, 16250, 29889, 17514, 23583, 877, 2940, 742, 6024, 1727, 6020, 742, 525, 978, 742, 525, 4039, 11287, 13, 13, 2382, 29918, 29925, 1299, 4945, 29940, 353, 337, 29889, 12198, 29898, 13, 1678, 364, 29915, 29985, 10780, 29925, 29966, 19033, 29958, 7110, 29893, 7790, 29899, 29918, 10062, 10780, 5919, 29973, 1057, 29905, 29881, 29974, 29989, 5033, 29973, 14327, 29961, 29874, 29899, 29920, 29900, 29899, 29929, 3032, 29899, 10062, 29914, 29961, 29874, 29899, 29920, 29900, 29899, 29929, 3032, 29899, 10062, 876, 29989, 16029, 13, 1678, 364, 29915, 10780, 8419, 29989, 5033, 29973, 29925, 29966, 978, 24566, 29874, 29899, 29920, 29900, 29899, 29929, 7790, 29899, 29918, 10062, 10780, 8419, 29961, 29874, 29899, 29920, 29900, 29899, 29929, 7790, 29899, 29918, 10062, 29989, 876, 29915, 13, 1678, 364, 29915, 10780, 1057, 10780, 29925, 29966, 4039, 29958, 7110, 29893, 7790, 29899, 29918, 3199, 29896, 29892, 29896, 29906, 29955, 1800, 29989, 1262, 1495, 13, 13, 13, 1990, 17522, 5550, 23828, 29901, 13, 1678, 9995, 2956, 770, 363, 15859, 349, 23828, 2729, 7246, 1860, 297, 382, 9295, 1213, 15945, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 6389, 1125, 13, 4706, 9995, 4391, 263, 716, 2777, 310, 278, 17522, 5550, 23828, 770, 13, 13, 4706, 584, 3207, 1852, 5510, 29889, 22377, 6389, 29901, 450, 21213, 24492, 6389, 13, 13, 4706, 9995, 13, 4706, 1583, 29889, 5085, 353, 6389, 13, 4706, 1583, 29889, 4645, 353, 289, 3747, 29941, 29889, 4645, 877, 687, 29879, 1495, 13, 4706, 1018, 29901, 13, 9651, 1583, 29889, 3027, 353, 1583, 29889, 5510, 29918, 3027, 29898, 5085, 29889, 3027, 29897, 13, 4706, 5174, 7865, 2392, 29901, 13, 9651, 6876, 29918, 6214, 29898, 13, 18884, 525, 22995, 15628, 1967, 6790, 29901, 6571, 4286, 4830, 29898, 5085, 29889, 3027, 511, 29871, 29896, 29897, 13, 4706, 1583, 29889, 276, 16519, 292, 353, 7700, 13, 4706, 1018, 29901, 13, 9651, 1583, 29889, 5509, 29918, 2753, 353, 1583, 3032, 657, 29918, 5509, 29918, 2753, 580, 13, 4706, 5174, 1583, 29889, 4645, 29889, 11739, 29879, 29889, 6821, 5402, 17413, 2451, 29901, 13, 9651, 6876, 29918, 6214, 877, 6821, 5402, 451, 1476, 29901, 6571, 4286, 4830, 29898, 5085, 29889, 19594, 511, 29871, 29896, 29897, 13, 4706, 1583, 29889, 2783, 2859, 29918, 29939, 1017, 29892, 1583, 29889, 3784, 353, 1583, 3032, 2783, 29581, 29918, 5509, 580, 13, 4706, 1583, 29889, 7662, 29918, 16553, 353, 1583, 3032, 657, 29918, 7662, 29918, 16553, 580, 13, 13, 1678, 822, 7246, 29898, 1311, 1125, 13, 4706, 9995, 8498, 2376, 278, 3414, 5023, 304, 278, 13252, 9867, 1213, 15945, 13, 4706, 25401, 17070, 29889, 3888, 877, 29995, 29879, 1273, 29879, 297, 1273, 29879, 304, 1273, 29879, 742, 13, 462, 1678, 525, 9039, 1022, 2376, 292, 29915, 565, 1583, 29889, 276, 16519, 292, 1683, 525, 3373, 26747, 742, 13, 462, 1678, 1583, 29889, 5085, 29889, 5509, 29892, 1583, 29889, 5085, 29889, 19594, 29892, 13, 462, 1678, 1583, 29889, 7662, 29918, 16553, 29889, 5451, 11219, 1495, 14352, 29896, 2314, 13, 4706, 1121, 353, 1583, 29889, 4645, 29889, 5504, 29918, 5509, 29898, 13, 9651, 9867, 29922, 1311, 29889, 5085, 29889, 19594, 29892, 2669, 29922, 1311, 29889, 5509, 29918, 2753, 29892, 13, 9651, 3414, 14683, 29922, 1311, 29889, 7662, 29918, 16553, 29892, 13, 9651, 4889, 4373, 8498, 22812, 29922, 1311, 29889, 5085, 29889, 276, 16519, 29897, 13, 4706, 565, 1121, 1839, 5509, 16215, 7662, 14683, 2033, 1275, 1583, 29889, 7662, 29918, 16553, 29901, 13, 9651, 25401, 17070, 29889, 3888, 877, 29995, 29879, 1273, 29879, 297, 1273, 29879, 304, 1273, 29879, 742, 13, 462, 4706, 525, 9039, 1022, 2376, 287, 29915, 565, 1583, 29889, 276, 16519, 292, 1683, 525, 29248, 742, 13, 462, 4706, 1583, 29889, 5085, 29889, 5509, 29892, 1583, 29889, 5085, 29889, 19594, 29892, 13, 462, 4706, 1583, 29889, 7662, 29918, 16553, 29889, 5451, 11219, 1495, 14352, 29896, 2314, 13, 9651, 565, 1583, 29889, 5085, 29889, 10685, 29901, 13, 18884, 1583, 3032, 10685, 29918, 265, 29918, 20673, 580, 13, 9651, 25401, 17070, 29889, 3888, 877, 29995, 29879, 4866, 742, 13, 462, 4706, 525, 9039, 1022, 22812, 29915, 565, 1583, 29889, 276, 16519, 292, 1683, 525, 8498, 22812, 1495, 13, 13, 1678, 732, 7959, 5696, 13, 1678, 822, 1967, 29918, 517, 29918, 710, 29898, 3027, 1125, 13, 4706, 9995, 8893, 278, 1967, 1347, 995, 515, 278, 4257, 23583, 29889, 13, 13, 4706, 584, 3207, 7084, 1967, 29901, 450, 1967, 18761, 304, 736, 278, 1347, 515, 13, 4706, 584, 29878, 1853, 29901, 851, 13, 13, 4706, 9995, 13, 4706, 565, 1967, 29889, 1727, 6020, 29901, 13, 9651, 736, 22372, 6822, 29912, 6177, 8875, 4286, 4830, 29898, 3027, 29889, 1727, 6020, 29892, 1967, 29889, 978, 29892, 1967, 29889, 4039, 29897, 13, 4706, 736, 22372, 6177, 8875, 4286, 4830, 29898, 3027, 29889, 978, 29892, 1967, 29889, 4039, 29897, 13, 13, 1678, 732, 7959, 5696, 13, 1678, 822, 6088, 29918, 3027, 29898, 3027, 1125, 13, 4706, 9995, 12914, 385, 1967, 7863, 278, 5235, 408, 263, 4257, 23583, 13, 13, 4706, 584, 29878, 1853, 29901, 7084, 13, 4706, 584, 336, 4637, 29901, 7865, 2392, 13, 13, 4706, 9995, 13, 4706, 1018, 29901, 13, 9651, 1121, 353, 306, 1529, 1692, 29918, 29925, 1299, 4945, 29940, 29889, 4352, 29898, 3027, 29897, 13, 4706, 5174, 20948, 29901, 13, 9651, 1121, 353, 6213, 13, 4706, 565, 451, 1121, 29901, 13, 9651, 12020, 7865, 2392, 877, 17776, 304, 6088, 1967, 1495, 13, 4706, 10153, 353, 1121, 29889, 2972, 8977, 580, 13, 4706, 736, 7084, 29898, 2492, 1839, 19033, 2033, 470, 6213, 29892, 10153, 1839, 978, 7464, 13, 462, 268, 10153, 1839, 4039, 2033, 470, 525, 12333, 1495, 13, 13, 1678, 822, 903, 2783, 29581, 29918, 5509, 29898, 1311, 1125, 13, 4706, 9995, 11609, 278, 1857, 3414, 5023, 278, 2669, 322, 13252, 13, 4706, 14728, 310, 9595, 363, 278, 2669, 29889, 13, 13, 4706, 584, 29878, 1853, 29901, 313, 29939, 1017, 29892, 9657, 29897, 13, 13, 4706, 9995, 13, 4706, 25401, 17070, 29889, 3888, 877, 2577, 1259, 278, 1857, 3414, 5023, 363, 1273, 29879, 297, 1273, 29879, 742, 13, 462, 1678, 1583, 29889, 5085, 29889, 5509, 29892, 1583, 29889, 5085, 29889, 19594, 29897, 13, 4706, 2933, 353, 1583, 29889, 4645, 29889, 2783, 29581, 29918, 9916, 29898, 13, 9651, 9867, 29922, 1311, 29889, 5085, 29889, 19594, 29892, 5786, 11759, 1311, 29889, 5509, 29918, 2753, 2314, 13, 4706, 736, 313, 5327, 1839, 9916, 2033, 29961, 29900, 22322, 2783, 2859, 3981, 7464, 13, 18884, 1583, 3032, 2783, 29581, 29918, 7662, 29918, 16553, 29898, 13, 462, 1678, 2933, 1839, 9916, 2033, 29961, 29900, 22322, 7662, 14683, 25901, 13, 13, 1678, 822, 903, 2783, 29581, 29918, 7662, 29918, 16553, 29898, 1311, 29892, 564, 29876, 1125, 13, 4706, 9995, 11609, 278, 3414, 5023, 515, 382, 9295, 29889, 13, 13, 4706, 584, 29878, 1853, 29901, 9657, 13, 13, 4706, 9995, 13, 4706, 2933, 353, 1583, 29889, 4645, 29889, 2783, 29581, 29918, 7662, 29918, 16553, 29898, 7662, 14683, 29922, 2753, 29897, 13, 4706, 736, 2933, 1839, 7662, 14683, 2033, 13, 13, 1678, 822, 903, 657, 29918, 5509, 29918, 2753, 29898, 1311, 1125, 13, 4706, 9995, 11609, 278, 9033, 29940, 310, 278, 2669, 304, 2189, 278, 18209, 373, 29889, 13, 13, 4706, 584, 29878, 1853, 29901, 851, 13, 13, 4706, 9995, 13, 4706, 363, 564, 29876, 297, 1583, 3032, 9916, 7295, 13, 9651, 5633, 353, 564, 29876, 29889, 5451, 11219, 1495, 13, 9651, 565, 5633, 14352, 29896, 29962, 1275, 1583, 29889, 5085, 29889, 5509, 29901, 13, 18884, 736, 564, 29876, 13, 4706, 6876, 29918, 6214, 29898, 13, 9651, 525, 3170, 6571, 451, 1476, 297, 6571, 4286, 4830, 29898, 13, 18884, 1583, 29889, 5085, 29889, 5509, 29892, 1583, 29889, 5085, 29889, 19594, 511, 29871, 29896, 29897, 13, 13, 1678, 822, 903, 657, 29918, 7662, 29918, 16553, 29898, 1311, 1125, 13, 4706, 9995, 11609, 278, 3414, 5023, 9033, 29940, 304, 671, 29892, 4969, 263, 716, 3414, 13, 4706, 5023, 565, 3734, 29889, 13, 13, 4706, 9995, 13, 4706, 565, 1583, 29889, 3027, 297, 1583, 3032, 657, 29918, 1285, 475, 414, 29898, 1311, 29889, 3784, 1125, 13, 9651, 565, 1583, 29889, 5085, 29889, 276, 16519, 29901, 13, 18884, 1583, 29889, 276, 16519, 292, 353, 5852, 13, 18884, 736, 1583, 29889, 3784, 1839, 7662, 14683, 1433, 29876, 2033, 13, 9651, 25342, 1583, 29889, 5085, 29889, 10118, 29901, 13, 18884, 1583, 29889, 276, 16519, 292, 353, 5852, 13, 18884, 736, 1583, 3032, 7620, 29918, 7662, 29918, 16553, 29898, 1311, 29889, 3784, 29897, 13, 9651, 6876, 29918, 6214, 29898, 13, 18884, 525, 8875, 338, 2307, 21168, 304, 6571, 408, 29850, 5038, 4286, 4830, 29898, 13, 462, 1678, 1583, 29889, 5085, 29889, 3027, 29892, 1583, 29889, 5085, 29889, 19594, 29892, 13, 462, 1678, 1583, 29889, 3784, 1839, 7662, 14683, 1433, 29876, 13359, 5451, 11219, 1495, 14352, 29896, 11724, 29871, 29906, 29897, 13, 4706, 736, 1583, 3032, 7620, 29918, 7662, 29918, 16553, 29898, 13, 9651, 1583, 3032, 1545, 1598, 29918, 7662, 29918, 16553, 29898, 1311, 29889, 3784, 876, 13, 13, 1678, 822, 903, 657, 29918, 1285, 475, 414, 29898, 1311, 29892, 3414, 29918, 12262, 1125, 13, 4706, 9995, 11609, 278, 22637, 515, 263, 3414, 5023, 29889, 13, 13, 4706, 584, 3207, 9657, 3414, 29918, 12262, 29901, 450, 3414, 5023, 848, 3829, 13, 4706, 584, 29878, 1853, 29901, 1051, 13, 13, 4706, 9995, 13, 4706, 22637, 353, 518, 13, 9651, 1583, 29889, 5510, 29918, 3027, 29898, 2252, 1839, 3027, 11287, 13, 9651, 363, 14965, 297, 3414, 29918, 12262, 1839, 7611, 3206, 262, 2187, 2033, 29962, 13, 4706, 363, 5639, 297, 12705, 29898, 1285, 475, 414, 1125, 13, 9651, 25401, 17070, 29889, 8382, 877, 9692, 1273, 29879, 297, 278, 3414, 5023, 742, 5639, 29897, 13, 4706, 736, 12705, 29898, 1285, 475, 414, 29897, 13, 13, 1678, 822, 903, 657, 29918, 7662, 29918, 25476, 2187, 29918, 3166, 29918, 11922, 29898, 1311, 29892, 3942, 1125, 13, 4706, 9995, 11609, 263, 1051, 310, 3414, 15848, 363, 278, 3942, 12705, 297, 13, 4706, 5153, 2548, 16259, 1797, 29889, 13, 13, 4706, 584, 3207, 851, 3942, 29901, 450, 3414, 5023, 3942, 13, 4706, 584, 29878, 1853, 29901, 1051, 13, 13, 4706, 9995, 13, 4706, 25401, 17070, 29889, 3888, 877, 2577, 1259, 599, 310, 278, 3414, 15848, 363, 1273, 29879, 297, 1273, 29879, 742, 13, 462, 1678, 1583, 29889, 5085, 29889, 5509, 29892, 1583, 29889, 5085, 29889, 19594, 29897, 13, 4706, 15848, 353, 5159, 13, 4706, 10203, 262, 1061, 353, 1583, 29889, 4645, 29889, 657, 29918, 13573, 262, 1061, 877, 1761, 29918, 7662, 29918, 25476, 2187, 1495, 13, 4706, 363, 1813, 297, 10203, 262, 1061, 29889, 13573, 16976, 29898, 11922, 23095, 29922, 11922, 29892, 2656, 2433, 2287, 7187, 29374, 13, 9651, 15848, 4619, 1813, 1839, 7662, 14683, 1433, 1983, 2033, 13, 13, 4706, 363, 5023, 297, 12705, 29898, 25476, 2187, 1125, 13, 9651, 25401, 17070, 29889, 8382, 877, 5398, 5023, 1273, 29879, 1476, 742, 5023, 29897, 13, 13, 4706, 736, 15848, 13, 13, 1678, 822, 903, 1761, 29918, 21094, 29918, 20673, 29898, 1311, 1125, 13, 4706, 9995, 11609, 599, 9595, 322, 1009, 3414, 15848, 408, 263, 1051, 310, 5291, 2701, 29889, 13, 13, 4706, 584, 29878, 1853, 29901, 17288, 710, 29892, 851, 511, 2023, 29962, 13, 13, 4706, 9995, 13, 4706, 25401, 17070, 29889, 3888, 877, 2577, 1259, 2734, 9595, 363, 1273, 29879, 297, 1273, 29879, 742, 13, 462, 1678, 1583, 29889, 5085, 29889, 5509, 29892, 1583, 29889, 5085, 29889, 19594, 29897, 13, 4706, 3414, 29918, 279, 1983, 353, 5159, 13, 4706, 10203, 262, 1061, 353, 1583, 29889, 4645, 29889, 657, 29918, 13573, 262, 1061, 877, 1761, 29918, 20673, 1495, 13, 4706, 363, 1813, 297, 10203, 262, 1061, 29889, 13573, 16976, 29898, 19594, 29922, 1311, 29889, 5085, 29889, 19594, 29892, 13, 462, 462, 539, 2669, 1170, 29922, 1311, 29889, 5085, 29889, 5509, 29892, 13, 462, 462, 539, 7429, 5709, 2433, 29934, 3904, 29940, 4214, 29374, 13, 9651, 3414, 29918, 279, 1983, 4619, 1813, 1839, 7662, 1433, 1983, 2033, 13, 13, 4706, 363, 3414, 29918, 2753, 297, 12705, 29898, 7662, 29918, 279, 1983, 1125, 13, 9651, 25401, 17070, 29889, 8382, 877, 5398, 1476, 29901, 1273, 29879, 742, 3414, 29918, 2753, 29897, 13, 13, 4706, 396, 8878, 278, 1121, 731, 310, 9595, 393, 526, 2734, 13, 4706, 9595, 353, 5159, 13, 4706, 1550, 3414, 29918, 279, 1983, 29901, 13, 9651, 2933, 353, 1583, 29889, 4645, 29889, 2783, 29581, 29918, 20673, 29898, 13, 18884, 9867, 29922, 1311, 29889, 5085, 29889, 19594, 29892, 13, 18884, 9595, 29922, 7662, 29918, 279, 1983, 7503, 29896, 29900, 29900, 2314, 13, 9651, 363, 3414, 297, 2933, 1839, 20673, 2033, 29901, 13, 18884, 25401, 17070, 29889, 8382, 877, 5398, 1273, 29879, 2734, 1273, 29879, 742, 13, 462, 632, 3414, 1839, 7662, 1433, 29876, 7464, 3414, 1839, 7662, 14683, 1433, 29876, 11287, 13, 18884, 9595, 29889, 4397, 3552, 7662, 1839, 7662, 1433, 29876, 7464, 3414, 1839, 7662, 14683, 1433, 29876, 25901, 13, 18884, 3414, 29918, 279, 1983, 29889, 5992, 29898, 7662, 1839, 7662, 1433, 29876, 11287, 13, 4706, 736, 9595, 13, 13, 1678, 822, 903, 1545, 1598, 29918, 7662, 29918, 16553, 29898, 1311, 29892, 822, 29876, 1125, 13, 4706, 9995, 2111, 1598, 278, 3414, 5023, 393, 471, 4502, 297, 29892, 15270, 278, 1967, 13, 4706, 7128, 2486, 411, 278, 1967, 393, 338, 2675, 304, 367, 4055, 3192, 29889, 13, 13, 4706, 584, 3207, 9657, 822, 29876, 29901, 450, 5023, 304, 6623, 13, 4706, 584, 29878, 1853, 29901, 9657, 13, 13, 4706, 9995, 13, 4706, 25401, 17070, 29889, 3888, 877, 2111, 9215, 278, 3414, 5023, 11860, 29879, 29908, 304, 671, 1273, 29879, 742, 13, 462, 1678, 822, 29876, 1839, 7662, 14683, 1433, 29876, 7464, 1583, 29889, 5085, 29889, 3027, 29897, 13, 4706, 363, 22645, 29892, 1967, 297, 26985, 29898, 1311, 3032, 657, 29918, 1285, 475, 414, 29898, 12262, 22164, 13, 9651, 565, 1583, 29889, 3027, 29889, 1727, 6020, 1275, 1967, 29889, 1727, 6020, 322, 320, 13, 462, 1678, 1583, 29889, 3027, 29889, 978, 1275, 1967, 29889, 978, 29901, 13, 18884, 822, 29876, 1839, 7611, 3206, 262, 2187, 2033, 29961, 13140, 22322, 3027, 2033, 353, 320, 13, 462, 1678, 1583, 29889, 3027, 29918, 517, 29918, 710, 29898, 1311, 29889, 3027, 29897, 13, 18884, 1480, 29918, 2917, 353, 822, 29876, 1839, 7611, 3206, 262, 2187, 2033, 29961, 13140, 1822, 657, 29898, 13, 462, 1678, 525, 1188, 8614, 742, 426, 1800, 13, 18884, 3987, 353, 1480, 29918, 2917, 29889, 657, 877, 6768, 742, 426, 1800, 13, 18884, 565, 525, 4039, 29915, 297, 3987, 29901, 13, 462, 1678, 1480, 29918, 2917, 1839, 6768, 16215, 4039, 2033, 353, 320, 13, 462, 4706, 3987, 1839, 4039, 13359, 6506, 29898, 3027, 29889, 4039, 29892, 1583, 29889, 3027, 29889, 4039, 29897, 13, 13, 18884, 5177, 353, 822, 29876, 1839, 7611, 3206, 262, 2187, 2033, 29961, 13140, 1822, 657, 29898, 13, 462, 1678, 525, 20944, 742, 518, 2314, 13, 18884, 363, 9210, 29892, 2286, 297, 26985, 29898, 20944, 1125, 13, 462, 1678, 565, 2286, 1839, 978, 2033, 1275, 525, 16358, 2396, 13, 462, 4706, 5177, 29961, 10289, 29962, 353, 426, 13, 462, 9651, 525, 978, 2396, 525, 16358, 742, 13, 462, 9651, 525, 1767, 2396, 1583, 29889, 3027, 29889, 4039, 13, 462, 4706, 500, 13, 18884, 736, 822, 29876, 13, 4706, 12020, 7865, 2392, 29898, 13, 9651, 525, 9260, 451, 1284, 278, 1967, 426, 29991, 29878, 29913, 297, 278, 3414, 5023, 4286, 4830, 29898, 13, 18884, 1583, 29889, 5085, 29889, 3027, 876, 13, 13, 1678, 822, 903, 7620, 29918, 7662, 29918, 16553, 29898, 1311, 29892, 5023, 1125, 13, 4706, 9995, 11371, 278, 3414, 5023, 29892, 7863, 278, 716, 9033, 29940, 29889, 13, 13, 4706, 584, 3207, 9657, 5023, 29901, 450, 716, 5023, 304, 4078, 13, 4706, 584, 29878, 1853, 29901, 851, 13, 13, 4706, 9995, 13, 4706, 363, 1820, 297, 11117, 12667, 747, 9770, 742, 525, 276, 339, 2658, 15801, 742, 13, 462, 1678, 525, 276, 339, 2658, 14644, 747, 9770, 742, 525, 276, 4924, 742, 525, 4882, 742, 13, 462, 1678, 525, 7662, 14683, 1433, 29876, 29915, 6177, 13, 9651, 565, 1820, 297, 5023, 29901, 13, 18884, 628, 5023, 29961, 1989, 29962, 13, 4706, 25401, 17070, 29889, 8382, 877, 29903, 5555, 278, 716, 3414, 5023, 363, 1273, 29879, 742, 13, 462, 268, 5023, 1839, 11922, 11287, 13, 4706, 1121, 353, 1583, 29889, 4645, 29889, 9573, 29918, 7662, 29918, 16553, 29898, 1068, 16553, 29897, 13, 4706, 736, 1121, 1839, 7662, 14683, 16215, 7662, 14683, 1433, 29876, 2033, 13, 13, 1678, 822, 903, 9916, 29898, 1311, 1125, 13, 4706, 9995, 11609, 278, 1051, 310, 5786, 13252, 297, 278, 9867, 29889, 13, 13, 4706, 584, 29878, 1853, 29901, 1051, 13, 13, 4706, 9995, 13, 4706, 25401, 17070, 29889, 3888, 877, 2577, 1259, 5786, 297, 278, 1273, 29879, 9867, 742, 1583, 29889, 5085, 29889, 19594, 29897, 13, 4706, 564, 1983, 353, 5159, 13, 4706, 10203, 262, 1061, 353, 1583, 29889, 4645, 29889, 657, 29918, 13573, 262, 1061, 877, 1761, 29918, 9916, 1495, 13, 4706, 363, 1813, 297, 10203, 262, 1061, 29889, 13573, 16976, 29898, 19594, 29922, 1311, 29889, 5085, 29889, 19594, 1125, 13, 9651, 564, 1983, 4619, 1813, 1839, 5509, 1433, 1983, 2033, 13, 4706, 363, 564, 29876, 297, 12705, 29898, 279, 1983, 1125, 13, 9651, 25401, 17070, 29889, 8382, 877, 11609, 292, 1273, 29878, 742, 564, 29876, 29897, 13, 4706, 736, 12705, 29898, 279, 1983, 29897, 13, 13, 1678, 822, 903, 10685, 29918, 265, 29918, 20673, 29898, 1311, 1125, 13, 4706, 9995, 15716, 363, 599, 9595, 304, 367, 297, 278, 2734, 2106, 363, 278, 3414, 13, 4706, 5023, 29889, 13, 13, 4706, 9995, 13, 4706, 25401, 17070, 29889, 3888, 877, 15716, 292, 363, 1273, 29875, 9595, 304, 3896, 2734, 2106, 363, 11860, 29879, 29908, 742, 13, 462, 1678, 1583, 29889, 2783, 2859, 29918, 29939, 1017, 29892, 1583, 29889, 7662, 29918, 16553, 29889, 5451, 11219, 1495, 14352, 29896, 2314, 13, 4706, 1550, 5852, 29901, 13, 9651, 9595, 353, 1583, 3032, 1761, 29918, 21094, 29918, 20673, 580, 13, 9651, 18139, 353, 16250, 29889, 17779, 580, 13, 9651, 363, 903, 7662, 29892, 3414, 29918, 1753, 297, 9595, 29901, 13, 18884, 18139, 29961, 7662, 29918, 1753, 29962, 4619, 29871, 29896, 13, 9651, 25401, 17070, 29889, 8382, 877, 7583, 2734, 9595, 491, 5023, 29901, 1273, 29879, 742, 13, 462, 308, 13420, 15300, 7122, 29898, 13, 462, 632, 6024, 29912, 6177, 6571, 4286, 4830, 29898, 29895, 29889, 5451, 11219, 1495, 14352, 29896, 1402, 18139, 29961, 29895, 2314, 13, 462, 795, 363, 413, 297, 12705, 29898, 13, 462, 462, 18139, 29889, 8149, 3285, 13, 462, 462, 1820, 29922, 2892, 921, 29901, 938, 29898, 29916, 29889, 5451, 877, 29901, 1495, 14352, 29896, 12622, 12622, 13, 9651, 565, 18139, 29889, 657, 29898, 1311, 29889, 7662, 29918, 16553, 29892, 29871, 29900, 29897, 1275, 1583, 29889, 2783, 2859, 29918, 29939, 1017, 29901, 13, 18884, 565, 451, 1583, 29889, 5085, 29889, 6194, 29918, 1482, 470, 313, 2435, 29898, 20673, 29897, 1275, 1583, 29889, 2783, 2859, 29918, 29939, 1017, 1125, 13, 462, 1678, 2867, 13, 9651, 931, 29889, 17059, 29898, 1311, 29889, 5085, 29889, 18829, 29897, 13, 13, 1678, 822, 903, 21094, 29918, 7662, 29918, 2798, 29898, 1311, 29892, 9595, 1125, 13, 4706, 9995, 11609, 278, 14728, 310, 9595, 393, 526, 2734, 363, 278, 3414, 13, 4706, 5023, 29889, 13, 13, 4706, 584, 3207, 1051, 9595, 29901, 450, 1051, 310, 3414, 5291, 2701, 13, 4706, 584, 29878, 1853, 29901, 938, 13, 13, 4706, 9995, 13, 4706, 736, 7431, 4197, 29873, 363, 260, 297, 9595, 565, 260, 29961, 29896, 29962, 1275, 1583, 29889, 7662, 29918, 16553, 2314, 13, 13, 13, 1753, 6088, 29918, 11303, 29918, 5085, 7295, 13, 1678, 9995, 1168, 4984, 278, 24492, 2980, 13812, 322, 736, 278, 21213, 278, 6273, 29889, 13, 13, 1678, 584, 29878, 1853, 29901, 1852, 5510, 29889, 22377, 13, 13, 1678, 9995, 13, 1678, 13812, 353, 1852, 5510, 29889, 15730, 11726, 29898, 13, 4706, 410, 29887, 2433, 687, 29879, 29899, 13096, 5570, 29899, 16519, 742, 13, 4706, 6139, 2433, 11746, 262, 291, 630, 382, 9295, 18209, 1754, 4780, 742, 13, 4706, 883, 2620, 29918, 1990, 29922, 1191, 5510, 29889, 15730, 24863, 29648, 18522, 29892, 13, 4706, 14529, 29918, 13789, 2433, 17863, 1495, 13, 13, 1678, 13812, 29889, 1202, 29918, 23516, 877, 19594, 742, 302, 5085, 2433, 29973, 742, 1134, 29922, 710, 29892, 1539, 485, 279, 2433, 6154, 17321, 1001, 742, 13, 462, 4706, 1371, 2433, 1576, 382, 9295, 9867, 1024, 304, 7246, 297, 1495, 13, 1678, 13812, 29889, 1202, 29918, 23516, 877, 5509, 742, 302, 5085, 2433, 29973, 742, 1134, 29922, 710, 29892, 1539, 485, 279, 2433, 6304, 19059, 742, 13, 462, 4706, 1371, 2433, 1576, 382, 9295, 6692, 1024, 304, 7246, 1495, 13, 1678, 13812, 29889, 1202, 29918, 23516, 877, 3027, 742, 302, 5085, 2433, 29973, 742, 1134, 29922, 710, 29892, 1539, 485, 279, 2433, 2382, 742, 13, 462, 4706, 1371, 2433, 1576, 20868, 1967, 313, 2541, 4055, 29897, 304, 7246, 363, 525, 13, 462, 632, 525, 2886, 292, 278, 3414, 5023, 1495, 13, 13, 1678, 13812, 29889, 1202, 29918, 23516, 877, 29899, 29888, 742, 525, 489, 10118, 742, 3158, 2433, 8899, 29918, 3009, 742, 13, 462, 4706, 1371, 2433, 4391, 263, 716, 3414, 5023, 363, 278, 1967, 1584, 525, 13, 462, 632, 525, 361, 697, 2307, 4864, 363, 278, 4055, 3192, 1873, 1495, 13, 1678, 13812, 29889, 1202, 29918, 23516, 877, 29899, 29878, 742, 525, 489, 276, 16519, 742, 3158, 2433, 8899, 29918, 3009, 742, 13, 462, 4706, 1371, 2433, 2831, 346, 263, 337, 16519, 358, 565, 278, 4055, 3192, 4558, 1993, 1495, 13, 1678, 13812, 29889, 1202, 29918, 23516, 877, 29899, 29893, 742, 525, 489, 10685, 742, 3158, 2433, 8899, 29918, 3009, 742, 13, 462, 4706, 1371, 2433, 15716, 363, 2734, 9595, 304, 367, 8611, 1495, 13, 1678, 13812, 29889, 1202, 29918, 23516, 877, 29899, 29877, 742, 525, 489, 6194, 29899, 1482, 742, 3158, 2433, 8899, 29918, 3009, 742, 13, 462, 4706, 1371, 2433, 3644, 10534, 29892, 4480, 363, 871, 15141, 21168, 9595, 525, 13, 462, 632, 525, 517, 367, 2734, 1495, 13, 1678, 13812, 29889, 1202, 29918, 23516, 877, 29899, 29881, 742, 525, 489, 18829, 742, 1134, 29922, 524, 29892, 2322, 29922, 29945, 29892, 13, 462, 4706, 1371, 2433, 27535, 304, 9055, 1434, 8454, 9595, 1550, 525, 13, 462, 632, 525, 10685, 292, 373, 263, 18209, 304, 8341, 1495, 13, 1678, 13812, 29889, 1202, 29918, 23516, 877, 29899, 29894, 742, 525, 489, 369, 15828, 742, 3158, 2433, 8899, 29918, 3009, 1495, 13, 1678, 13812, 29889, 1202, 29918, 23516, 877, 29899, 29963, 742, 525, 489, 3259, 742, 3158, 2433, 3259, 742, 13, 462, 4706, 1873, 2433, 29995, 29898, 29097, 29897, 29879, 6571, 4286, 4830, 22168, 3259, 1649, 876, 13, 1678, 736, 13812, 29889, 5510, 29918, 5085, 580, 13, 13, 13, 1753, 10822, 29918, 21027, 29898, 5085, 1125, 13, 1678, 9995, 26947, 12183, 15945, 29908, 13, 1678, 3233, 353, 12183, 29889, 18525, 565, 6389, 29889, 369, 15828, 1683, 12183, 29889, 11690, 13, 1678, 28684, 20756, 29889, 6252, 29898, 5563, 29922, 5563, 29892, 19200, 29922, 14480, 29954, 4214, 29918, 19094, 1299, 29892, 13, 462, 4706, 1746, 29918, 9783, 29922, 14480, 29954, 4214, 29918, 3738, 27286, 29918, 1254, 29979, 17101, 29897, 13, 1678, 15142, 29918, 1217, 13344, 29918, 1188, 5743, 580, 13, 13, 13, 1753, 6876, 29918, 6214, 29898, 4906, 29922, 8516, 29892, 775, 29922, 29900, 1125, 13, 1678, 9995, 24365, 278, 2280, 16384, 278, 2643, 304, 5235, 470, 1059, 2729, 2501, 13, 1678, 278, 6876, 775, 13, 13, 1678, 584, 3207, 851, 2643, 29901, 450, 6876, 2643, 13, 1678, 584, 3207, 938, 775, 29901, 450, 6876, 775, 313, 4381, 29901, 29871, 29900, 29897, 13, 13, 1678, 9995, 13, 1678, 1480, 29918, 5696, 353, 25401, 17070, 29889, 2704, 565, 775, 1683, 25401, 17070, 29889, 3888, 13, 1678, 1480, 29918, 5696, 29898, 4906, 29889, 17010, 3101, 13, 1678, 10876, 29889, 13322, 29898, 401, 29897, 13, 13, 13, 1753, 1667, 7295, 13, 1678, 9995, 4873, 28236, 3149, 15945, 29908, 13, 1678, 6389, 353, 6088, 29918, 11303, 29918, 5085, 580, 13, 1678, 10822, 29918, 21027, 29898, 5085, 29897, 13, 1678, 25401, 17070, 29889, 3888, 877, 687, 29879, 29899, 13096, 5570, 29899, 16519, 325, 29995, 29879, 6257, 742, 4770, 3259, 1649, 29897, 13, 1678, 17522, 5550, 23828, 29898, 5085, 467, 16519, 580, 13, 13, 13, 1753, 15142, 29918, 1217, 13344, 29918, 1188, 5743, 7295, 13, 1678, 9995, 9526, 2712, 526, 694, 275, 631, 1135, 4045, 29889, 3834, 9562, 25550, 414, 526, 694, 275, 631, 13, 1678, 1135, 916, 9562, 25550, 414, 29889, 13, 13, 1678, 9995, 13, 1678, 363, 17927, 297, 6024, 29890, 3747, 29941, 742, 525, 7451, 542, 487, 742, 13, 462, 259, 525, 2271, 1982, 29941, 29889, 9965, 10109, 742, 13, 462, 259, 525, 7451, 542, 487, 29889, 29894, 355, 4395, 29889, 24830, 29889, 8318, 29889, 2271, 1982, 29941, 2033, 29901, 13, 4706, 12183, 29889, 657, 16363, 29898, 21707, 467, 842, 10108, 29898, 21027, 29889, 29956, 25614, 29897, 13, 2 ]
www/src/Lib/test/test_abc.py
stefanhoelzl/brython
652
131218
<filename>www/src/Lib/test/test_abc.py # Copyright 2007 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Unit tests for abc.py.""" import unittest from test import support import abc from inspect import isabstract class TestLegacyAPI(unittest.TestCase): def test_abstractproperty_basics(self): @abc.abstractproperty def foo(self): pass self.assertTrue(foo.__isabstractmethod__) def bar(self): pass self.assertFalse(hasattr(bar, "__isabstractmethod__")) class C(metaclass=abc.ABCMeta): @abc.abstractproperty def foo(self): return 3 self.assertRaises(TypeError, C) class D(C): @property def foo(self): return super().foo self.assertEqual(D().foo, 3) self.assertFalse(getattr(D.foo, "__isabstractmethod__", False)) def test_abstractclassmethod_basics(self): @abc.abstractclassmethod def foo(cls): pass self.assertTrue(foo.__isabstractmethod__) @classmethod def bar(cls): pass self.assertFalse(getattr(bar, "__isabstractmethod__", False)) class C(metaclass=abc.ABCMeta): @abc.abstractclassmethod def foo(cls): return cls.__name__ self.assertRaises(TypeError, C) class D(C): @classmethod def foo(cls): return super().foo() self.assertEqual(D.foo(), 'D') self.assertEqual(D().foo(), 'D') def test_abstractstaticmethod_basics(self): @abc.abstractstaticmethod def foo(): pass self.assertTrue(foo.__isabstractmethod__) @staticmethod def bar(): pass self.assertFalse(getattr(bar, "__isabstractmethod__", False)) class C(metaclass=abc.ABCMeta): @abc.abstractstaticmethod def foo(): return 3 self.assertRaises(TypeError, C) class D(C): @staticmethod def foo(): return 4 self.assertEqual(D.foo(), 4) self.assertEqual(D().foo(), 4) class TestABC(unittest.TestCase): def test_abstractmethod_basics(self): @abc.abstractmethod def foo(self): pass self.assertTrue(foo.__isabstractmethod__) def bar(self): pass self.assertFalse(hasattr(bar, "__isabstractmethod__")) def test_abstractproperty_basics(self): @property @abc.abstractmethod def foo(self): pass self.assertTrue(foo.__isabstractmethod__) def bar(self): pass self.assertFalse(getattr(bar, "__isabstractmethod__", False)) class C(metaclass=abc.ABCMeta): @property @abc.abstractmethod def foo(self): return 3 self.assertRaises(TypeError, C) class D(C): @C.foo.getter def foo(self): return super().foo self.assertEqual(D().foo, 3) def test_abstractclassmethod_basics(self): @classmethod @abc.abstractmethod def foo(cls): pass self.assertTrue(foo.__isabstractmethod__) @classmethod def bar(cls): pass self.assertFalse(getattr(bar, "__isabstractmethod__", False)) class C(metaclass=abc.ABCMeta): @classmethod @abc.abstractmethod def foo(cls): return cls.__name__ self.assertRaises(TypeError, C) class D(C): @classmethod def foo(cls): return super().foo() self.assertEqual(D.foo(), 'D') self.assertEqual(D().foo(), 'D') def test_abstractstaticmethod_basics(self): @staticmethod @abc.abstractmethod def foo(): pass self.assertTrue(foo.__isabstractmethod__) @staticmethod def bar(): pass self.assertFalse(getattr(bar, "__isabstractmethod__", False)) class C(metaclass=abc.ABCMeta): @staticmethod @abc.abstractmethod def foo(): return 3 self.assertRaises(TypeError, C) class D(C): @staticmethod def foo(): return 4 self.assertEqual(D.foo(), 4) self.assertEqual(D().foo(), 4) def test_abstractmethod_integration(self): for abstractthing in [abc.abstractmethod, abc.abstractproperty, abc.abstractclassmethod, abc.abstractstaticmethod]: class C(metaclass=abc.ABCMeta): @abstractthing def foo(self): pass # abstract def bar(self): pass # concrete self.assertEqual(C.__abstractmethods__, {"foo"}) self.assertRaises(TypeError, C) # because foo is abstract self.assertTrue(isabstract(C)) class D(C): def bar(self): pass # concrete override of concrete self.assertEqual(D.__abstractmethods__, {"foo"}) self.assertRaises(TypeError, D) # because foo is still abstract self.assertTrue(isabstract(D)) class E(D): def foo(self): pass self.assertEqual(E.__abstractmethods__, set()) E() # now foo is concrete, too self.assertFalse(isabstract(E)) class F(E): @abstractthing def bar(self): pass # abstract override of concrete self.assertEqual(F.__abstractmethods__, {"bar"}) self.assertRaises(TypeError, F) # because bar is abstract now self.assertTrue(isabstract(F)) def test_descriptors_with_abstractmethod(self): class C(metaclass=abc.ABCMeta): @property @abc.abstractmethod def foo(self): return 3 @foo.setter @abc.abstractmethod def foo(self, val): pass self.assertRaises(TypeError, C) class D(C): @C.foo.getter def foo(self): return super().foo self.assertRaises(TypeError, D) class E(D): @D.foo.setter def foo(self, val): pass self.assertEqual(E().foo, 3) # check that the property's __isabstractmethod__ descriptor does the # right thing when presented with a value that fails truth testing: class NotBool(object): def __nonzero__(self): raise ValueError() __len__ = __nonzero__ with self.assertRaises(ValueError): class F(C): def bar(self): pass bar.__isabstractmethod__ = NotBool() foo = property(bar) def test_customdescriptors_with_abstractmethod(self): class Descriptor: def __init__(self, fget, fset=None): self._fget = fget self._fset = fset def getter(self, callable): return Descriptor(callable, self._fget) def setter(self, callable): return Descriptor(self._fget, callable) @property def __isabstractmethod__(self): return (getattr(self._fget, '__isabstractmethod__', False) or getattr(self._fset, '__isabstractmethod__', False)) class C(metaclass=abc.ABCMeta): @Descriptor @abc.abstractmethod def foo(self): return 3 @foo.setter @abc.abstractmethod def foo(self, val): pass self.assertRaises(TypeError, C) class D(C): @C.foo.getter def foo(self): return super().foo self.assertRaises(TypeError, D) class E(D): @D.foo.setter def foo(self, val): pass self.assertFalse(E.foo.__isabstractmethod__) def test_metaclass_abc(self): # Metaclasses can be ABCs, too. class A(metaclass=abc.ABCMeta): @abc.abstractmethod def x(self): pass self.assertEqual(A.__abstractmethods__, {"x"}) class meta(type, A): def x(self): return 1 class C(metaclass=meta): pass def test_registration_basics(self): class A(metaclass=abc.ABCMeta): pass class B(object): pass b = B() self.assertFalse(issubclass(B, A)) self.assertFalse(issubclass(B, (A,))) self.assertNotIsInstance(b, A) self.assertNotIsInstance(b, (A,)) B1 = A.register(B) self.assertTrue(issubclass(B, A)) self.assertTrue(issubclass(B, (A,))) self.assertIsInstance(b, A) self.assertIsInstance(b, (A,)) self.assertIs(B1, B) class C(B): pass c = C() self.assertTrue(issubclass(C, A)) self.assertTrue(issubclass(C, (A,))) self.assertIsInstance(c, A) self.assertIsInstance(c, (A,)) def test_register_as_class_deco(self): class A(metaclass=abc.ABCMeta): pass @A.register class B(object): pass b = B() self.assertTrue(issubclass(B, A)) self.assertTrue(issubclass(B, (A,))) self.assertIsInstance(b, A) self.assertIsInstance(b, (A,)) @A.register class C(B): pass c = C() self.assertTrue(issubclass(C, A)) self.assertTrue(issubclass(C, (A,))) self.assertIsInstance(c, A) self.assertIsInstance(c, (A,)) self.assertIs(C, A.register(C)) def test_isinstance_invalidation(self): class A(metaclass=abc.ABCMeta): pass class B: pass b = B() self.assertFalse(isinstance(b, A)) self.assertFalse(isinstance(b, (A,))) A.register(B) self.assertTrue(isinstance(b, A)) self.assertTrue(isinstance(b, (A,))) def test_registration_builtins(self): class A(metaclass=abc.ABCMeta): pass A.register(int) self.assertIsInstance(42, A) self.assertIsInstance(42, (A,)) self.assertTrue(issubclass(int, A)) self.assertTrue(issubclass(int, (A,))) class B(A): pass B.register(str) class C(str): pass self.assertIsInstance("", A) self.assertIsInstance("", (A,)) self.assertTrue(issubclass(str, A)) self.assertTrue(issubclass(str, (A,))) self.assertTrue(issubclass(C, A)) self.assertTrue(issubclass(C, (A,))) def test_registration_edge_cases(self): class A(metaclass=abc.ABCMeta): pass A.register(A) # should pass silently class A1(A): pass self.assertRaises(RuntimeError, A1.register, A) # cycles not allowed class B(object): pass A1.register(B) # ok A1.register(B) # should pass silently class C(A): pass A.register(C) # should pass silently self.assertRaises(RuntimeError, C.register, A) # cycles not allowed C.register(B) # ok def test_register_non_class(self): class A(metaclass=abc.ABCMeta): pass self.assertRaisesRegex(TypeError, "Can only register classes", A.register, 4) def test_registration_transitiveness(self): class A(metaclass=abc.ABCMeta): pass self.assertTrue(issubclass(A, A)) self.assertTrue(issubclass(A, (A,))) class B(metaclass=abc.ABCMeta): pass self.assertFalse(issubclass(A, B)) self.assertFalse(issubclass(A, (B,))) self.assertFalse(issubclass(B, A)) self.assertFalse(issubclass(B, (A,))) class C(metaclass=abc.ABCMeta): pass A.register(B) class B1(B): pass self.assertTrue(issubclass(B1, A)) self.assertTrue(issubclass(B1, (A,))) class C1(C): pass B1.register(C1) self.assertFalse(issubclass(C, B)) self.assertFalse(issubclass(C, (B,))) self.assertFalse(issubclass(C, B1)) self.assertFalse(issubclass(C, (B1,))) self.assertTrue(issubclass(C1, A)) self.assertTrue(issubclass(C1, (A,))) self.assertTrue(issubclass(C1, B)) self.assertTrue(issubclass(C1, (B,))) self.assertTrue(issubclass(C1, B1)) self.assertTrue(issubclass(C1, (B1,))) C1.register(int) class MyInt(int): pass self.assertTrue(issubclass(MyInt, A)) self.assertTrue(issubclass(MyInt, (A,))) self.assertIsInstance(42, A) self.assertIsInstance(42, (A,)) def test_all_new_methods_are_called(self): class A(metaclass=abc.ABCMeta): pass class B(object): counter = 0 def __new__(cls): B.counter += 1 return super().__new__(cls) class C(A, B): pass self.assertEqual(B.counter, 0) C() self.assertEqual(B.counter, 1) if __name__ == "__main__": unittest.main()
[ 1, 529, 9507, 29958, 1636, 29914, 4351, 29914, 14868, 29914, 1688, 29914, 1688, 29918, 10736, 29889, 2272, 13, 29937, 14187, 1266, 29871, 29906, 29900, 29900, 29955, 5087, 29892, 9266, 29889, 2178, 26863, 2538, 9841, 29889, 13, 29937, 10413, 21144, 304, 11323, 29943, 1090, 263, 2866, 1091, 3406, 4059, 276, 882, 29889, 13, 13, 15945, 29908, 8325, 6987, 363, 25638, 29889, 2272, 1213, 15945, 13, 13, 5215, 443, 27958, 13, 3166, 1243, 1053, 2304, 13, 13, 5215, 25638, 13, 3166, 16096, 1053, 338, 16595, 13, 13, 13, 1990, 4321, 22988, 4135, 8787, 29898, 348, 27958, 29889, 3057, 8259, 1125, 13, 13, 1678, 822, 1243, 29918, 16595, 6799, 29918, 6500, 1199, 29898, 1311, 1125, 13, 4706, 732, 10736, 29889, 16595, 6799, 13, 4706, 822, 7953, 29898, 1311, 1125, 1209, 13, 4706, 1583, 29889, 9294, 5574, 29898, 5431, 17255, 275, 16595, 5696, 1649, 29897, 13, 4706, 822, 2594, 29898, 1311, 1125, 1209, 13, 4706, 1583, 29889, 9294, 8824, 29898, 5349, 5552, 29898, 1646, 29892, 376, 1649, 275, 16595, 5696, 1649, 5783, 13, 13, 4706, 770, 315, 29898, 2527, 562, 605, 29922, 10736, 29889, 19658, 19346, 1125, 13, 9651, 732, 10736, 29889, 16595, 6799, 13, 9651, 822, 7953, 29898, 1311, 1125, 736, 29871, 29941, 13, 4706, 1583, 29889, 9294, 29934, 1759, 267, 29898, 1542, 2392, 29892, 315, 29897, 13, 4706, 770, 360, 29898, 29907, 1125, 13, 9651, 732, 6799, 13, 9651, 822, 7953, 29898, 1311, 1125, 736, 2428, 2141, 5431, 13, 4706, 1583, 29889, 9294, 9843, 29898, 29928, 2141, 5431, 29892, 29871, 29941, 29897, 13, 4706, 1583, 29889, 9294, 8824, 29898, 657, 5552, 29898, 29928, 29889, 5431, 29892, 376, 1649, 275, 16595, 5696, 1649, 613, 7700, 876, 13, 13, 1678, 822, 1243, 29918, 16595, 1990, 5696, 29918, 6500, 1199, 29898, 1311, 1125, 13, 4706, 732, 10736, 29889, 16595, 1990, 5696, 13, 4706, 822, 7953, 29898, 25932, 1125, 1209, 13, 4706, 1583, 29889, 9294, 5574, 29898, 5431, 17255, 275, 16595, 5696, 1649, 29897, 13, 4706, 732, 1990, 5696, 13, 4706, 822, 2594, 29898, 25932, 1125, 1209, 13, 4706, 1583, 29889, 9294, 8824, 29898, 657, 5552, 29898, 1646, 29892, 376, 1649, 275, 16595, 5696, 1649, 613, 7700, 876, 13, 13, 4706, 770, 315, 29898, 2527, 562, 605, 29922, 10736, 29889, 19658, 19346, 1125, 13, 9651, 732, 10736, 29889, 16595, 1990, 5696, 13, 9651, 822, 7953, 29898, 25932, 1125, 736, 1067, 29879, 17255, 978, 1649, 13, 4706, 1583, 29889, 9294, 29934, 1759, 267, 29898, 1542, 2392, 29892, 315, 29897, 13, 4706, 770, 360, 29898, 29907, 1125, 13, 9651, 732, 1990, 5696, 13, 9651, 822, 7953, 29898, 25932, 1125, 736, 2428, 2141, 5431, 580, 13, 4706, 1583, 29889, 9294, 9843, 29898, 29928, 29889, 5431, 3285, 525, 29928, 1495, 13, 4706, 1583, 29889, 9294, 9843, 29898, 29928, 2141, 5431, 3285, 525, 29928, 1495, 13, 13, 1678, 822, 1243, 29918, 16595, 7959, 5696, 29918, 6500, 1199, 29898, 1311, 1125, 13, 4706, 732, 10736, 29889, 16595, 7959, 5696, 13, 4706, 822, 7953, 7295, 1209, 13, 4706, 1583, 29889, 9294, 5574, 29898, 5431, 17255, 275, 16595, 5696, 1649, 29897, 13, 4706, 732, 7959, 5696, 13, 4706, 822, 2594, 7295, 1209, 13, 4706, 1583, 29889, 9294, 8824, 29898, 657, 5552, 29898, 1646, 29892, 376, 1649, 275, 16595, 5696, 1649, 613, 7700, 876, 13, 13, 4706, 770, 315, 29898, 2527, 562, 605, 29922, 10736, 29889, 19658, 19346, 1125, 13, 9651, 732, 10736, 29889, 16595, 7959, 5696, 13, 9651, 822, 7953, 7295, 736, 29871, 29941, 13, 4706, 1583, 29889, 9294, 29934, 1759, 267, 29898, 1542, 2392, 29892, 315, 29897, 13, 4706, 770, 360, 29898, 29907, 1125, 13, 9651, 732, 7959, 5696, 13, 9651, 822, 7953, 7295, 736, 29871, 29946, 13, 4706, 1583, 29889, 9294, 9843, 29898, 29928, 29889, 5431, 3285, 29871, 29946, 29897, 13, 4706, 1583, 29889, 9294, 9843, 29898, 29928, 2141, 5431, 3285, 29871, 29946, 29897, 13, 13, 13, 1990, 4321, 19658, 29898, 348, 27958, 29889, 3057, 8259, 1125, 13, 13, 1678, 822, 1243, 29918, 16595, 5696, 29918, 6500, 1199, 29898, 1311, 1125, 13, 4706, 732, 10736, 29889, 16595, 5696, 13, 4706, 822, 7953, 29898, 1311, 1125, 1209, 13, 4706, 1583, 29889, 9294, 5574, 29898, 5431, 17255, 275, 16595, 5696, 1649, 29897, 13, 4706, 822, 2594, 29898, 1311, 1125, 1209, 13, 4706, 1583, 29889, 9294, 8824, 29898, 5349, 5552, 29898, 1646, 29892, 376, 1649, 275, 16595, 5696, 1649, 5783, 13, 13, 1678, 822, 1243, 29918, 16595, 6799, 29918, 6500, 1199, 29898, 1311, 1125, 13, 4706, 732, 6799, 13, 4706, 732, 10736, 29889, 16595, 5696, 13, 4706, 822, 7953, 29898, 1311, 1125, 1209, 13, 4706, 1583, 29889, 9294, 5574, 29898, 5431, 17255, 275, 16595, 5696, 1649, 29897, 13, 4706, 822, 2594, 29898, 1311, 1125, 1209, 13, 4706, 1583, 29889, 9294, 8824, 29898, 657, 5552, 29898, 1646, 29892, 376, 1649, 275, 16595, 5696, 1649, 613, 7700, 876, 13, 13, 4706, 770, 315, 29898, 2527, 562, 605, 29922, 10736, 29889, 19658, 19346, 1125, 13, 9651, 732, 6799, 13, 9651, 732, 10736, 29889, 16595, 5696, 13, 9651, 822, 7953, 29898, 1311, 1125, 736, 29871, 29941, 13, 4706, 1583, 29889, 9294, 29934, 1759, 267, 29898, 1542, 2392, 29892, 315, 29897, 13, 4706, 770, 360, 29898, 29907, 1125, 13, 9651, 732, 29907, 29889, 5431, 29889, 657, 357, 13, 9651, 822, 7953, 29898, 1311, 1125, 736, 2428, 2141, 5431, 13, 4706, 1583, 29889, 9294, 9843, 29898, 29928, 2141, 5431, 29892, 29871, 29941, 29897, 13, 13, 1678, 822, 1243, 29918, 16595, 1990, 5696, 29918, 6500, 1199, 29898, 1311, 1125, 13, 4706, 732, 1990, 5696, 13, 4706, 732, 10736, 29889, 16595, 5696, 13, 4706, 822, 7953, 29898, 25932, 1125, 1209, 13, 4706, 1583, 29889, 9294, 5574, 29898, 5431, 17255, 275, 16595, 5696, 1649, 29897, 13, 4706, 732, 1990, 5696, 13, 4706, 822, 2594, 29898, 25932, 1125, 1209, 13, 4706, 1583, 29889, 9294, 8824, 29898, 657, 5552, 29898, 1646, 29892, 376, 1649, 275, 16595, 5696, 1649, 613, 7700, 876, 13, 13, 4706, 770, 315, 29898, 2527, 562, 605, 29922, 10736, 29889, 19658, 19346, 1125, 13, 9651, 732, 1990, 5696, 13, 9651, 732, 10736, 29889, 16595, 5696, 13, 9651, 822, 7953, 29898, 25932, 1125, 736, 1067, 29879, 17255, 978, 1649, 13, 4706, 1583, 29889, 9294, 29934, 1759, 267, 29898, 1542, 2392, 29892, 315, 29897, 13, 4706, 770, 360, 29898, 29907, 1125, 13, 9651, 732, 1990, 5696, 13, 9651, 822, 7953, 29898, 25932, 1125, 736, 2428, 2141, 5431, 580, 13, 4706, 1583, 29889, 9294, 9843, 29898, 29928, 29889, 5431, 3285, 525, 29928, 1495, 13, 4706, 1583, 29889, 9294, 9843, 29898, 29928, 2141, 5431, 3285, 525, 29928, 1495, 13, 13, 1678, 822, 1243, 29918, 16595, 7959, 5696, 29918, 6500, 1199, 29898, 1311, 1125, 13, 4706, 732, 7959, 5696, 13, 4706, 732, 10736, 29889, 16595, 5696, 13, 4706, 822, 7953, 7295, 1209, 13, 4706, 1583, 29889, 9294, 5574, 29898, 5431, 17255, 275, 16595, 5696, 1649, 29897, 13, 4706, 732, 7959, 5696, 13, 4706, 822, 2594, 7295, 1209, 13, 4706, 1583, 29889, 9294, 8824, 29898, 657, 5552, 29898, 1646, 29892, 376, 1649, 275, 16595, 5696, 1649, 613, 7700, 876, 13, 13, 4706, 770, 315, 29898, 2527, 562, 605, 29922, 10736, 29889, 19658, 19346, 1125, 13, 9651, 732, 7959, 5696, 13, 9651, 732, 10736, 29889, 16595, 5696, 13, 9651, 822, 7953, 7295, 736, 29871, 29941, 13, 4706, 1583, 29889, 9294, 29934, 1759, 267, 29898, 1542, 2392, 29892, 315, 29897, 13, 4706, 770, 360, 29898, 29907, 1125, 13, 9651, 732, 7959, 5696, 13, 9651, 822, 7953, 7295, 736, 29871, 29946, 13, 4706, 1583, 29889, 9294, 9843, 29898, 29928, 29889, 5431, 3285, 29871, 29946, 29897, 13, 4706, 1583, 29889, 9294, 9843, 29898, 29928, 2141, 5431, 3285, 29871, 29946, 29897, 13, 13, 1678, 822, 1243, 29918, 16595, 5696, 29918, 27925, 29898, 1311, 1125, 13, 4706, 363, 9846, 1918, 297, 518, 10736, 29889, 16595, 5696, 29892, 25638, 29889, 16595, 6799, 29892, 13, 462, 795, 25638, 29889, 16595, 1990, 5696, 29892, 13, 462, 795, 25638, 29889, 16595, 7959, 5696, 5387, 13, 9651, 770, 315, 29898, 2527, 562, 605, 29922, 10736, 29889, 19658, 19346, 1125, 13, 18884, 732, 16595, 1918, 13, 18884, 822, 7953, 29898, 1311, 1125, 1209, 29871, 396, 9846, 13, 18884, 822, 2594, 29898, 1311, 1125, 1209, 29871, 396, 18387, 13, 9651, 1583, 29889, 9294, 9843, 29898, 29907, 17255, 16595, 23515, 1649, 29892, 8853, 5431, 29908, 1800, 13, 9651, 1583, 29889, 9294, 29934, 1759, 267, 29898, 1542, 2392, 29892, 315, 29897, 29871, 396, 1363, 7953, 338, 9846, 13, 9651, 1583, 29889, 9294, 5574, 29898, 275, 16595, 29898, 29907, 876, 13, 9651, 770, 360, 29898, 29907, 1125, 13, 18884, 822, 2594, 29898, 1311, 1125, 1209, 29871, 396, 18387, 5712, 310, 18387, 13, 9651, 1583, 29889, 9294, 9843, 29898, 29928, 17255, 16595, 23515, 1649, 29892, 8853, 5431, 29908, 1800, 13, 9651, 1583, 29889, 9294, 29934, 1759, 267, 29898, 1542, 2392, 29892, 360, 29897, 29871, 396, 1363, 7953, 338, 1603, 9846, 13, 9651, 1583, 29889, 9294, 5574, 29898, 275, 16595, 29898, 29928, 876, 13, 9651, 770, 382, 29898, 29928, 1125, 13, 18884, 822, 7953, 29898, 1311, 1125, 1209, 13, 9651, 1583, 29889, 9294, 9843, 29898, 29923, 17255, 16595, 23515, 1649, 29892, 731, 3101, 13, 9651, 382, 580, 29871, 396, 1286, 7953, 338, 18387, 29892, 2086, 13, 9651, 1583, 29889, 9294, 8824, 29898, 275, 16595, 29898, 29923, 876, 13, 9651, 770, 383, 29898, 29923, 1125, 13, 18884, 732, 16595, 1918, 13, 18884, 822, 2594, 29898, 1311, 1125, 1209, 29871, 396, 9846, 5712, 310, 18387, 13, 9651, 1583, 29889, 9294, 9843, 29898, 29943, 17255, 16595, 23515, 1649, 29892, 8853, 1646, 29908, 1800, 13, 9651, 1583, 29889, 9294, 29934, 1759, 267, 29898, 1542, 2392, 29892, 383, 29897, 29871, 396, 1363, 2594, 338, 9846, 1286, 13, 9651, 1583, 29889, 9294, 5574, 29898, 275, 16595, 29898, 29943, 876, 13, 13, 1678, 822, 1243, 29918, 2783, 924, 943, 29918, 2541, 29918, 16595, 5696, 29898, 1311, 1125, 13, 4706, 770, 315, 29898, 2527, 562, 605, 29922, 10736, 29889, 19658, 19346, 1125, 13, 9651, 732, 6799, 13, 9651, 732, 10736, 29889, 16595, 5696, 13, 9651, 822, 7953, 29898, 1311, 1125, 736, 29871, 29941, 13, 9651, 732, 5431, 29889, 842, 357, 13, 9651, 732, 10736, 29889, 16595, 5696, 13, 9651, 822, 7953, 29898, 1311, 29892, 659, 1125, 1209, 13, 4706, 1583, 29889, 9294, 29934, 1759, 267, 29898, 1542, 2392, 29892, 315, 29897, 13, 4706, 770, 360, 29898, 29907, 1125, 13, 9651, 732, 29907, 29889, 5431, 29889, 657, 357, 13, 9651, 822, 7953, 29898, 1311, 1125, 736, 2428, 2141, 5431, 13, 4706, 1583, 29889, 9294, 29934, 1759, 267, 29898, 1542, 2392, 29892, 360, 29897, 13, 4706, 770, 382, 29898, 29928, 1125, 13, 9651, 732, 29928, 29889, 5431, 29889, 842, 357, 13, 9651, 822, 7953, 29898, 1311, 29892, 659, 1125, 1209, 13, 4706, 1583, 29889, 9294, 9843, 29898, 29923, 2141, 5431, 29892, 29871, 29941, 29897, 13, 4706, 396, 1423, 393, 278, 2875, 29915, 29879, 4770, 275, 16595, 5696, 1649, 553, 11709, 947, 278, 13, 4706, 396, 1492, 2655, 746, 9132, 411, 263, 995, 393, 8465, 8760, 6724, 29901, 13, 4706, 770, 2216, 24693, 29898, 3318, 1125, 13, 9651, 822, 4770, 5464, 9171, 12035, 1311, 1125, 13, 18884, 12020, 7865, 2392, 580, 13, 9651, 4770, 2435, 1649, 353, 4770, 5464, 9171, 1649, 13, 4706, 411, 1583, 29889, 9294, 29934, 1759, 267, 29898, 1917, 2392, 1125, 13, 9651, 770, 383, 29898, 29907, 1125, 13, 18884, 822, 2594, 29898, 1311, 1125, 13, 462, 1678, 1209, 13, 18884, 2594, 17255, 275, 16595, 5696, 1649, 353, 2216, 24693, 580, 13, 18884, 7953, 353, 2875, 29898, 1646, 29897, 13, 13, 13, 1678, 822, 1243, 29918, 6341, 2783, 924, 943, 29918, 2541, 29918, 16595, 5696, 29898, 1311, 1125, 13, 4706, 770, 2726, 11709, 29901, 13, 9651, 822, 4770, 2344, 12035, 1311, 29892, 285, 657, 29892, 285, 842, 29922, 8516, 1125, 13, 18884, 1583, 3032, 29888, 657, 353, 285, 657, 13, 18884, 1583, 3032, 29888, 842, 353, 285, 842, 13, 9651, 822, 679, 357, 29898, 1311, 29892, 1246, 519, 1125, 13, 18884, 736, 2726, 11709, 29898, 4804, 519, 29892, 1583, 3032, 29888, 657, 29897, 13, 9651, 822, 731, 357, 29898, 1311, 29892, 1246, 519, 1125, 13, 18884, 736, 2726, 11709, 29898, 1311, 3032, 29888, 657, 29892, 1246, 519, 29897, 13, 9651, 732, 6799, 13, 9651, 822, 4770, 275, 16595, 5696, 12035, 1311, 1125, 13, 18884, 736, 313, 657, 5552, 29898, 1311, 3032, 29888, 657, 29892, 525, 1649, 275, 16595, 5696, 1649, 742, 7700, 29897, 13, 462, 4706, 470, 679, 5552, 29898, 1311, 3032, 29888, 842, 29892, 525, 1649, 275, 16595, 5696, 1649, 742, 7700, 876, 13, 4706, 770, 315, 29898, 2527, 562, 605, 29922, 10736, 29889, 19658, 19346, 1125, 13, 9651, 732, 19124, 13, 9651, 732, 10736, 29889, 16595, 5696, 13, 9651, 822, 7953, 29898, 1311, 1125, 736, 29871, 29941, 13, 9651, 732, 5431, 29889, 842, 357, 13, 9651, 732, 10736, 29889, 16595, 5696, 13, 9651, 822, 7953, 29898, 1311, 29892, 659, 1125, 1209, 13, 4706, 1583, 29889, 9294, 29934, 1759, 267, 29898, 1542, 2392, 29892, 315, 29897, 13, 4706, 770, 360, 29898, 29907, 1125, 13, 9651, 732, 29907, 29889, 5431, 29889, 657, 357, 13, 9651, 822, 7953, 29898, 1311, 1125, 736, 2428, 2141, 5431, 13, 4706, 1583, 29889, 9294, 29934, 1759, 267, 29898, 1542, 2392, 29892, 360, 29897, 13, 4706, 770, 382, 29898, 29928, 1125, 13, 9651, 732, 29928, 29889, 5431, 29889, 842, 357, 13, 9651, 822, 7953, 29898, 1311, 29892, 659, 1125, 1209, 13, 4706, 1583, 29889, 9294, 8824, 29898, 29923, 29889, 5431, 17255, 275, 16595, 5696, 1649, 29897, 13, 13, 1678, 822, 1243, 29918, 2527, 562, 605, 29918, 10736, 29898, 1311, 1125, 13, 4706, 396, 4737, 562, 605, 267, 508, 367, 16417, 29879, 29892, 2086, 29889, 13, 4706, 770, 319, 29898, 2527, 562, 605, 29922, 10736, 29889, 19658, 19346, 1125, 13, 9651, 732, 10736, 29889, 16595, 5696, 13, 9651, 822, 921, 29898, 1311, 1125, 13, 18884, 1209, 13, 4706, 1583, 29889, 9294, 9843, 29898, 29909, 17255, 16595, 23515, 1649, 29892, 8853, 29916, 29908, 1800, 13, 4706, 770, 12700, 29898, 1853, 29892, 319, 1125, 13, 9651, 822, 921, 29898, 1311, 1125, 13, 18884, 736, 29871, 29896, 13, 4706, 770, 315, 29898, 2527, 562, 605, 29922, 7299, 1125, 13, 9651, 1209, 13, 13, 1678, 822, 1243, 29918, 1727, 8306, 29918, 6500, 1199, 29898, 1311, 1125, 13, 4706, 770, 319, 29898, 2527, 562, 605, 29922, 10736, 29889, 19658, 19346, 1125, 13, 9651, 1209, 13, 4706, 770, 350, 29898, 3318, 1125, 13, 9651, 1209, 13, 4706, 289, 353, 350, 580, 13, 4706, 1583, 29889, 9294, 8824, 29898, 790, 431, 1990, 29898, 29933, 29892, 319, 876, 13, 4706, 1583, 29889, 9294, 8824, 29898, 790, 431, 1990, 29898, 29933, 29892, 313, 29909, 29892, 4961, 13, 4706, 1583, 29889, 9294, 3664, 3624, 4998, 29898, 29890, 29892, 319, 29897, 13, 4706, 1583, 29889, 9294, 3664, 3624, 4998, 29898, 29890, 29892, 313, 29909, 29892, 876, 13, 4706, 350, 29896, 353, 319, 29889, 9573, 29898, 29933, 29897, 13, 4706, 1583, 29889, 9294, 5574, 29898, 790, 431, 1990, 29898, 29933, 29892, 319, 876, 13, 4706, 1583, 29889, 9294, 5574, 29898, 790, 431, 1990, 29898, 29933, 29892, 313, 29909, 29892, 4961, 13, 4706, 1583, 29889, 9294, 3624, 4998, 29898, 29890, 29892, 319, 29897, 13, 4706, 1583, 29889, 9294, 3624, 4998, 29898, 29890, 29892, 313, 29909, 29892, 876, 13, 4706, 1583, 29889, 9294, 3624, 29898, 29933, 29896, 29892, 350, 29897, 13, 4706, 770, 315, 29898, 29933, 1125, 13, 9651, 1209, 13, 4706, 274, 353, 315, 580, 13, 4706, 1583, 29889, 9294, 5574, 29898, 790, 431, 1990, 29898, 29907, 29892, 319, 876, 13, 4706, 1583, 29889, 9294, 5574, 29898, 790, 431, 1990, 29898, 29907, 29892, 313, 29909, 29892, 4961, 13, 4706, 1583, 29889, 9294, 3624, 4998, 29898, 29883, 29892, 319, 29897, 13, 4706, 1583, 29889, 9294, 3624, 4998, 29898, 29883, 29892, 313, 29909, 29892, 876, 13, 13, 1678, 822, 1243, 29918, 9573, 29918, 294, 29918, 1990, 29918, 311, 1111, 29898, 1311, 1125, 13, 4706, 770, 319, 29898, 2527, 562, 605, 29922, 10736, 29889, 19658, 19346, 1125, 13, 9651, 1209, 13, 4706, 732, 29909, 29889, 9573, 13, 4706, 770, 350, 29898, 3318, 1125, 13, 9651, 1209, 13, 4706, 289, 353, 350, 580, 13, 4706, 1583, 29889, 9294, 5574, 29898, 790, 431, 1990, 29898, 29933, 29892, 319, 876, 13, 4706, 1583, 29889, 9294, 5574, 29898, 790, 431, 1990, 29898, 29933, 29892, 313, 29909, 29892, 4961, 13, 4706, 1583, 29889, 9294, 3624, 4998, 29898, 29890, 29892, 319, 29897, 13, 4706, 1583, 29889, 9294, 3624, 4998, 29898, 29890, 29892, 313, 29909, 29892, 876, 13, 4706, 732, 29909, 29889, 9573, 13, 4706, 770, 315, 29898, 29933, 1125, 13, 9651, 1209, 13, 4706, 274, 353, 315, 580, 13, 4706, 1583, 29889, 9294, 5574, 29898, 790, 431, 1990, 29898, 29907, 29892, 319, 876, 13, 4706, 1583, 29889, 9294, 5574, 29898, 790, 431, 1990, 29898, 29907, 29892, 313, 29909, 29892, 4961, 13, 4706, 1583, 29889, 9294, 3624, 4998, 29898, 29883, 29892, 319, 29897, 13, 4706, 1583, 29889, 9294, 3624, 4998, 29898, 29883, 29892, 313, 29909, 29892, 876, 13, 4706, 1583, 29889, 9294, 3624, 29898, 29907, 29892, 319, 29889, 9573, 29898, 29907, 876, 13, 13, 1678, 822, 1243, 29918, 275, 8758, 29918, 262, 18157, 29898, 1311, 1125, 13, 4706, 770, 319, 29898, 2527, 562, 605, 29922, 10736, 29889, 19658, 19346, 1125, 13, 9651, 1209, 13, 4706, 770, 350, 29901, 13, 9651, 1209, 13, 4706, 289, 353, 350, 580, 13, 4706, 1583, 29889, 9294, 8824, 29898, 275, 8758, 29898, 29890, 29892, 319, 876, 13, 4706, 1583, 29889, 9294, 8824, 29898, 275, 8758, 29898, 29890, 29892, 313, 29909, 29892, 4961, 13, 4706, 319, 29889, 9573, 29898, 29933, 29897, 13, 4706, 1583, 29889, 9294, 5574, 29898, 275, 8758, 29898, 29890, 29892, 319, 876, 13, 4706, 1583, 29889, 9294, 5574, 29898, 275, 8758, 29898, 29890, 29892, 313, 29909, 29892, 4961, 13, 13, 1678, 822, 1243, 29918, 1727, 8306, 29918, 16145, 1144, 29898, 1311, 1125, 13, 4706, 770, 319, 29898, 2527, 562, 605, 29922, 10736, 29889, 19658, 19346, 1125, 13, 9651, 1209, 13, 4706, 319, 29889, 9573, 29898, 524, 29897, 13, 4706, 1583, 29889, 9294, 3624, 4998, 29898, 29946, 29906, 29892, 319, 29897, 13, 4706, 1583, 29889, 9294, 3624, 4998, 29898, 29946, 29906, 29892, 313, 29909, 29892, 876, 13, 4706, 1583, 29889, 9294, 5574, 29898, 790, 431, 1990, 29898, 524, 29892, 319, 876, 13, 4706, 1583, 29889, 9294, 5574, 29898, 790, 431, 1990, 29898, 524, 29892, 313, 29909, 29892, 4961, 13, 4706, 770, 350, 29898, 29909, 1125, 13, 9651, 1209, 13, 4706, 350, 29889, 9573, 29898, 710, 29897, 13, 4706, 770, 315, 29898, 710, 1125, 1209, 13, 4706, 1583, 29889, 9294, 3624, 4998, 703, 613, 319, 29897, 13, 4706, 1583, 29889, 9294, 3624, 4998, 703, 613, 313, 29909, 29892, 876, 13, 4706, 1583, 29889, 9294, 5574, 29898, 790, 431, 1990, 29898, 710, 29892, 319, 876, 13, 4706, 1583, 29889, 9294, 5574, 29898, 790, 431, 1990, 29898, 710, 29892, 313, 29909, 29892, 4961, 13, 4706, 1583, 29889, 9294, 5574, 29898, 790, 431, 1990, 29898, 29907, 29892, 319, 876, 13, 4706, 1583, 29889, 9294, 5574, 29898, 790, 431, 1990, 29898, 29907, 29892, 313, 29909, 29892, 4961, 13, 13, 1678, 822, 1243, 29918, 1727, 8306, 29918, 12864, 29918, 11436, 29898, 1311, 1125, 13, 4706, 770, 319, 29898, 2527, 562, 605, 29922, 10736, 29889, 19658, 19346, 1125, 13, 9651, 1209, 13, 4706, 319, 29889, 9573, 29898, 29909, 29897, 29871, 396, 881, 1209, 4047, 2705, 13, 4706, 770, 319, 29896, 29898, 29909, 1125, 13, 9651, 1209, 13, 4706, 1583, 29889, 9294, 29934, 1759, 267, 29898, 7944, 2392, 29892, 319, 29896, 29889, 9573, 29892, 319, 29897, 29871, 396, 25785, 451, 6068, 13, 4706, 770, 350, 29898, 3318, 1125, 13, 9651, 1209, 13, 4706, 319, 29896, 29889, 9573, 29898, 29933, 29897, 29871, 396, 3431, 13, 4706, 319, 29896, 29889, 9573, 29898, 29933, 29897, 29871, 396, 881, 1209, 4047, 2705, 13, 4706, 770, 315, 29898, 29909, 1125, 13, 9651, 1209, 13, 4706, 319, 29889, 9573, 29898, 29907, 29897, 29871, 396, 881, 1209, 4047, 2705, 13, 4706, 1583, 29889, 9294, 29934, 1759, 267, 29898, 7944, 2392, 29892, 315, 29889, 9573, 29892, 319, 29897, 29871, 396, 25785, 451, 6068, 13, 4706, 315, 29889, 9573, 29898, 29933, 29897, 29871, 396, 3431, 13, 13, 1678, 822, 1243, 29918, 9573, 29918, 5464, 29918, 1990, 29898, 1311, 1125, 13, 4706, 770, 319, 29898, 2527, 562, 605, 29922, 10736, 29889, 19658, 19346, 1125, 13, 9651, 1209, 13, 4706, 1583, 29889, 9294, 29934, 1759, 267, 4597, 735, 29898, 1542, 2392, 29892, 376, 6028, 871, 6036, 4413, 613, 13, 462, 1669, 319, 29889, 9573, 29892, 29871, 29946, 29897, 13, 13, 1678, 822, 1243, 29918, 1727, 8306, 29918, 3286, 277, 20193, 29898, 1311, 1125, 13, 4706, 770, 319, 29898, 2527, 562, 605, 29922, 10736, 29889, 19658, 19346, 1125, 13, 9651, 1209, 13, 4706, 1583, 29889, 9294, 5574, 29898, 790, 431, 1990, 29898, 29909, 29892, 319, 876, 13, 4706, 1583, 29889, 9294, 5574, 29898, 790, 431, 1990, 29898, 29909, 29892, 313, 29909, 29892, 4961, 13, 4706, 770, 350, 29898, 2527, 562, 605, 29922, 10736, 29889, 19658, 19346, 1125, 13, 9651, 1209, 13, 4706, 1583, 29889, 9294, 8824, 29898, 790, 431, 1990, 29898, 29909, 29892, 350, 876, 13, 4706, 1583, 29889, 9294, 8824, 29898, 790, 431, 1990, 29898, 29909, 29892, 313, 29933, 29892, 4961, 13, 4706, 1583, 29889, 9294, 8824, 29898, 790, 431, 1990, 29898, 29933, 29892, 319, 876, 13, 4706, 1583, 29889, 9294, 8824, 29898, 790, 431, 1990, 29898, 29933, 29892, 313, 29909, 29892, 4961, 13, 4706, 770, 315, 29898, 2527, 562, 605, 29922, 10736, 29889, 19658, 19346, 1125, 13, 9651, 1209, 13, 4706, 319, 29889, 9573, 29898, 29933, 29897, 13, 4706, 770, 350, 29896, 29898, 29933, 1125, 13, 9651, 1209, 13, 4706, 1583, 29889, 9294, 5574, 29898, 790, 431, 1990, 29898, 29933, 29896, 29892, 319, 876, 13, 4706, 1583, 29889, 9294, 5574, 29898, 790, 431, 1990, 29898, 29933, 29896, 29892, 313, 29909, 29892, 4961, 13, 4706, 770, 315, 29896, 29898, 29907, 1125, 13, 9651, 1209, 13, 4706, 350, 29896, 29889, 9573, 29898, 29907, 29896, 29897, 13, 4706, 1583, 29889, 9294, 8824, 29898, 790, 431, 1990, 29898, 29907, 29892, 350, 876, 13, 4706, 1583, 29889, 9294, 8824, 29898, 790, 431, 1990, 29898, 29907, 29892, 313, 29933, 29892, 4961, 13, 4706, 1583, 29889, 9294, 8824, 29898, 790, 431, 1990, 29898, 29907, 29892, 350, 29896, 876, 13, 4706, 1583, 29889, 9294, 8824, 29898, 790, 431, 1990, 29898, 29907, 29892, 313, 29933, 29896, 29892, 4961, 13, 4706, 1583, 29889, 9294, 5574, 29898, 790, 431, 1990, 29898, 29907, 29896, 29892, 319, 876, 13, 4706, 1583, 29889, 9294, 5574, 29898, 790, 431, 1990, 29898, 29907, 29896, 29892, 313, 29909, 29892, 4961, 13, 4706, 1583, 29889, 9294, 5574, 29898, 790, 431, 1990, 29898, 29907, 29896, 29892, 350, 876, 13, 4706, 1583, 29889, 9294, 5574, 29898, 790, 431, 1990, 29898, 29907, 29896, 29892, 313, 29933, 29892, 4961, 13, 4706, 1583, 29889, 9294, 5574, 29898, 790, 431, 1990, 29898, 29907, 29896, 29892, 350, 29896, 876, 13, 4706, 1583, 29889, 9294, 5574, 29898, 790, 431, 1990, 29898, 29907, 29896, 29892, 313, 29933, 29896, 29892, 4961, 13, 4706, 315, 29896, 29889, 9573, 29898, 524, 29897, 13, 4706, 770, 1619, 2928, 29898, 524, 1125, 13, 9651, 1209, 13, 4706, 1583, 29889, 9294, 5574, 29898, 790, 431, 1990, 29898, 3421, 2928, 29892, 319, 876, 13, 4706, 1583, 29889, 9294, 5574, 29898, 790, 431, 1990, 29898, 3421, 2928, 29892, 313, 29909, 29892, 4961, 13, 4706, 1583, 29889, 9294, 3624, 4998, 29898, 29946, 29906, 29892, 319, 29897, 13, 4706, 1583, 29889, 9294, 3624, 4998, 29898, 29946, 29906, 29892, 313, 29909, 29892, 876, 13, 13, 1678, 822, 1243, 29918, 497, 29918, 1482, 29918, 23515, 29918, 598, 29918, 13998, 29898, 1311, 1125, 13, 4706, 770, 319, 29898, 2527, 562, 605, 29922, 10736, 29889, 19658, 19346, 1125, 13, 9651, 1209, 13, 4706, 770, 350, 29898, 3318, 1125, 13, 9651, 6795, 353, 29871, 29900, 13, 9651, 822, 4770, 1482, 12035, 25932, 1125, 13, 18884, 350, 29889, 11808, 4619, 29871, 29896, 13, 18884, 736, 2428, 2141, 1649, 1482, 12035, 25932, 29897, 13, 4706, 770, 315, 29898, 29909, 29892, 350, 1125, 13, 9651, 1209, 13, 4706, 1583, 29889, 9294, 9843, 29898, 29933, 29889, 11808, 29892, 29871, 29900, 29897, 13, 4706, 315, 580, 13, 4706, 1583, 29889, 9294, 9843, 29898, 29933, 29889, 11808, 29892, 29871, 29896, 29897, 13, 13, 13, 361, 4770, 978, 1649, 1275, 376, 1649, 3396, 1649, 1115, 13, 1678, 443, 27958, 29889, 3396, 580, 13, 2 ]
docs/source/examples/client-server-request.py
lslebodn/conu
95
139504
# -*- coding: utf-8 -*- # # Copyright Contributors to the Conu project. # SPDX-License-Identifier: MIT # import subprocess import logging import time from conu import DockerBackend, DockerRunBuilder environment = ["-e", "POSTGRESQL_USER=user", "-e", "POSTGRESQL_PASSWORD=<PASSWORD>", "-e", "POSTGRESQL_DATABASE=db"] with DockerBackend(logging_level=logging.DEBUG) as backend: image = backend.ImageClass('centos/postgresql-96-centos7') # create server additional_opts = environment dbcont = image.run_via_binary(additional_opts=additional_opts) # wait for server port to be ready dbcont.wait_for_port(5432) # prepare request endpoint = "postgresql://user@" + dbcont.get_IPv4s()[0] + ":5432/" + 'db' request_command = DockerRunBuilder(command=['psql', endpoint], additional_opts=['-i']) # create client clientcont = image.run_via_binary_in_foreground( request_command, popen_params={"stdin": subprocess.PIPE} ) # send requests clientcont.write_to_stdin(b'pass\n') # give postgres time to process time.sleep(0.1) clientcont.write_to_stdin(b'SELECT 1;\n') # give postgres time to process time.sleep(0.2) logs_bytes = clientcont.logs_in_bytes() expected_output = b'Password: \n ?column? \n----------\n 1\n(1 row)' try: assert b'Password: ' in logs_bytes assert b'(1 row)' in logs_bytes assert clientcont.is_running() finally: dbcont.delete(force=True) clientcont.delete(force=True)
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 29937, 13, 29937, 14187, 1266, 2866, 1091, 29560, 304, 278, 1281, 29884, 2060, 29889, 13, 29937, 10937, 29928, 29990, 29899, 29931, 293, 1947, 29899, 12889, 29901, 341, 1806, 13, 29937, 13, 13, 5215, 1014, 5014, 13, 5215, 12183, 13, 5215, 931, 13, 13, 3166, 378, 29884, 1053, 20868, 5841, 355, 29892, 20868, 6558, 5627, 13, 13, 13, 20944, 353, 6796, 29899, 29872, 613, 376, 5438, 29954, 1525, 4176, 29918, 11889, 29922, 1792, 613, 13, 1669, 11663, 29872, 613, 376, 5438, 29954, 1525, 4176, 29918, 25711, 17013, 29922, 29966, 25711, 17013, 28341, 13, 1669, 11663, 29872, 613, 376, 5438, 29954, 1525, 4176, 29918, 25832, 27982, 29922, 2585, 3108, 13, 13, 2541, 20868, 5841, 355, 29898, 21027, 29918, 5563, 29922, 21027, 29889, 18525, 29897, 408, 14998, 29901, 13, 1678, 1967, 353, 14998, 29889, 2940, 2385, 877, 1760, 359, 29914, 29272, 29899, 29929, 29953, 29899, 1760, 359, 29955, 1495, 13, 13, 1678, 396, 1653, 1923, 13, 1678, 5684, 29918, 25707, 353, 5177, 13, 1678, 4833, 1285, 353, 1967, 29889, 3389, 29918, 6071, 29918, 19541, 29898, 1202, 3245, 29918, 25707, 29922, 1202, 3245, 29918, 25707, 29897, 13, 13, 1678, 396, 4480, 363, 1923, 2011, 304, 367, 7960, 13, 1678, 4833, 1285, 29889, 10685, 29918, 1454, 29918, 637, 29898, 29945, 29946, 29941, 29906, 29897, 13, 13, 1678, 396, 19012, 2009, 13, 1678, 16248, 353, 376, 29272, 597, 1792, 5507, 718, 4833, 1285, 29889, 657, 29918, 5690, 29894, 29946, 29879, 580, 29961, 29900, 29962, 718, 29242, 29945, 29946, 29941, 29906, 12975, 718, 525, 2585, 29915, 13, 1678, 2009, 29918, 6519, 353, 20868, 6558, 5627, 29898, 6519, 29922, 1839, 567, 1519, 742, 16248, 1402, 5684, 29918, 25707, 29922, 1839, 29899, 29875, 11287, 13, 13, 1678, 396, 1653, 3132, 13, 1678, 3132, 1285, 353, 1967, 29889, 3389, 29918, 6071, 29918, 19541, 29918, 262, 29918, 1454, 18128, 29898, 13, 4706, 2009, 29918, 6519, 29892, 13, 4706, 1835, 264, 29918, 7529, 3790, 29908, 4172, 262, 1115, 1014, 5014, 29889, 2227, 4162, 29913, 13, 1678, 1723, 13, 13, 1678, 396, 3638, 7274, 13, 1678, 3132, 1285, 29889, 3539, 29918, 517, 29918, 4172, 262, 29898, 29890, 29915, 3364, 29905, 29876, 1495, 13, 1678, 396, 2367, 1400, 7201, 931, 304, 1889, 13, 1678, 931, 29889, 17059, 29898, 29900, 29889, 29896, 29897, 13, 1678, 3132, 1285, 29889, 3539, 29918, 517, 29918, 4172, 262, 29898, 29890, 29915, 6404, 29871, 29896, 10436, 29876, 1495, 13, 1678, 396, 2367, 1400, 7201, 931, 304, 1889, 13, 1678, 931, 29889, 17059, 29898, 29900, 29889, 29906, 29897, 13, 1678, 10748, 29918, 13193, 353, 3132, 1285, 29889, 20756, 29918, 262, 29918, 13193, 580, 13, 1678, 3806, 29918, 4905, 353, 289, 29915, 10048, 29901, 320, 29876, 1577, 4914, 29973, 320, 29876, 28400, 29905, 29876, 308, 29896, 29905, 29876, 29898, 29896, 1948, 16029, 13, 1678, 1018, 29901, 13, 4706, 4974, 289, 29915, 10048, 29901, 525, 297, 10748, 29918, 13193, 13, 4706, 4974, 289, 12215, 29896, 1948, 16029, 297, 10748, 29918, 13193, 13, 4706, 4974, 3132, 1285, 29889, 275, 29918, 21094, 580, 13, 1678, 7146, 29901, 13, 4706, 4833, 1285, 29889, 8143, 29898, 10118, 29922, 5574, 29897, 13, 4706, 3132, 1285, 29889, 8143, 29898, 10118, 29922, 5574, 29897, 13, 2 ]
scratch/trycubes/cubes.py
ibrahemesam/Fos
0
84971
import numpy as np from itertools import chain, islice, product, repeat, cycle, izip from fos.actor.surf import CommonSurfaceGroup, IlluminatedSurfaceGroup from fos.core.world import World from fos.lib.pyglet.gl import * from fos.lib.pyglet.graphics import Batch from fos.core.actor import Actor from fos.geometry.vec3 import Vec3 from fos.geometry.math3d import * type_to_enum = { gl.GLubyte: gl.GL_UNSIGNED_BYTE, gl.GLushort: gl.GL_UNSIGNED_SHORT, gl.GLuint: gl.GL_UNSIGNED_INT, } def glarray(gltype, seq, length): ''' Convert a list of lists into a flattened ctypes array, eg: [ (1, 2, 3), (4, 5, 6) ] -> (GLfloat*6)(1, 2, 3, 4, 5, 6) ''' arraytype = gltype * length return arraytype(*seq) def tessellate(face): ''' Return the given face broken into a list of triangles, wound in the same direction as the original poly. Does not work for concave faces. e.g. [0, 1, 2, 3, 4] -> [[0, 1, 2], [0, 2, 3], [0, 3, 4]] ''' return ( [face[0], face[index], face[index + 1]] for index in xrange(1, len(face) - 1) ) def face_normal(vertices, face): ''' Return the unit normal vector (at right angles to) this face. Note that the direction of the normal will be reversed if the face's winding is reversed. ''' v0 = vertices[face[0]] v1 = vertices[face[1]] v2 = vertices[face[2]] a = v0 - v1 b = v2 - v1 return b.cross(a).normalized() class GLPrimitive(object): def __init__(self): self.num_glvertices = None self.glvertices = None self.glindex_type = None self.glindices = None self.glcolors = None self.glnormals = None def get_num_glvertices(_, faces): return len(list(chain(*faces))) def get_glvertices(self, vertices, faces): glverts = chain.from_iterable( vertices[index] for face in faces for index in face ) self.num_glvertices = self.get_num_glvertices(faces) return glarray(gl.GLfloat, glverts, self.num_glvertices * 3) def get_glindex_type(self): ''' The type of the glindices array depends on how many vertices there are ''' if self.num_glvertices < 256: index_type = gl.GLubyte elif self.num_glvertices < 65536: index_type = gl.GLushort else: index_type = gl.GLuint return index_type def get_glindices(self, faces): glindices = [] face_offset = 0 for face in faces: indices = xrange(face_offset, face_offset + len(face)) glindices.extend(chain(*tessellate(indices))) face_offset += len(face) self.glindex_type = self.get_glindex_type() return glarray(self.glindex_type, glindices, len(glindices)) def get_glcolors(self, faces, face_colors): glcolors = chain.from_iterable( repeat(color, len(face)) for face, color in izip(faces, face_colors) ) return glarray(gl.GLubyte, chain(*glcolors), self.num_glvertices * 4) def get_glnormals(self, vertices, faces): normals = ( face_normal(vertices, face) for face in faces ) glnormals = chain.from_iterable( repeat(normal, len(face)) for face, normal in izip(faces, normals) ) return glarray( gl.GLfloat, chain(*glnormals), self.num_glvertices * 3) def from_shape(self, vertices, faces, face_colors, affine): self.glvertices = self.get_glvertices(vertices, faces) self.glindices = self.get_glindices(faces) self.glcolors = self.get_glcolors(faces, face_colors) self.glnormals = self.get_glnormals(vertices, faces) self.affine = self.get_affine(affine) def get_affine(self, affine): ident = M3DMatrix44f() ident = m3dLoadIdentity44(ident) translate = m3dTranslateMatrix44(ident, affine[0,3], affine[1,3], affine[2.3]) # do the rotation return translate class Polyhedron(object): ''' Defines a polyhedron, a 3D shape with flat faces and straight edges. Each vertex defines a point in 3d space. Each face is a list of indices into the vertex array, forming a coplanar convex ring defining the face's edges. Each face has its own color. ''' def __init__(self, vertices, faces, face_colors=None, affine=None): if len(vertices) > 0 and not isinstance(vertices[0], Vec3): vertices = [Vec3(*v) for v in vertices] self.vertices = vertices for face in faces: assert len(face) >= 3 for index in face: assert 0 <= index < len(vertices) self.faces = faces if face_colors is None: face_colors = repeat((255, 0, 0, 255)) # if face_colors is None: # face_colors = white # if isinstance(face_colors, Color): # face_colors = repeat(face_colors) # TODO: colors of koch_cube/tetra break if we remove this 'list' # and set face_colors to the return of 'islice'. Don't know why. # returns a list of tuples of len self.faces of the given facecolors self.face_colors = list(islice(cycle(face_colors), len(self.faces))) self.affine = affine def get_glprimitive(self): glprimitive = GLPrimitive() glprimitive.from_shape(self.vertices, self.faces, self.face_colors, self.affine) return glprimitive class Cubes(Actor): def __init__(self, location): ''' # just one cube e2 = 1. / 2 verts = list(product(*repeat([-e2, +e2], 3))) faces = [ [0, 1, 3, 2], # left [4, 6, 7, 5], # right [7, 3, 1, 5], # front [0, 2, 6, 4], # back [3, 7, 6, 2], # top [1, 0, 4, 5], # bottom ] oc = Polyhedron(verts, faces) glprim = oc.get_glprimitive() group = IlluminatedSurfaceGroup() ''' self.primitives = [] nr_cubes = location.shape[0] for i in xrange(nr_cubes): self.primitives.append(self.create_cubes(location[:,i],1.0)) def create_cubes(self, location, edge_size, color=None): e2 = edge_size / 2.0 verts = list(product(*repeat([-e2, +e2], 3))) faces = [ [0, 1, 3, 2], # left [4, 6, 7, 5], # right [7, 3, 1, 5], # front [0, 2, 6, 4], # back [3, 7, 6, 2], # top [1, 0, 4, 5], # bottom ] aff= np.eye(4) aff[3,:3] = location oc = Polyhedron(verts, faces, affine = aff) return oc ''' self.vertex_list = [] self.batch=Batch() self.vertex_list.append(self.batch.add_indexed(len(glprim.glvertices) / 3,\ GL_TRIANGLES,\ None,\ list(glprim.glindices),\ ('v3f/static',np.array(glprim.glvertices)),\ ('n3f/static',list(glprim.glnormals)),\ ('c4B/static',list(glprim.glcolors)) ) ) ver = np.array(glprim.glvertices) for i in range(1,300): self.vertex_list.append(self.batch.add_indexed(len(glprim.glvertices) / 3,\ GL_TRIANGLES,\ None,\ list(glprim.glindices),\ ('v3f/static',ver+(i*1)),\ ('n3f/static',list(glprim.glnormals)),\ ('c4B/static',list(glprim.glcolors)) )) self.vertex_list.append(self.batch.add_indexed(len(glprim.glvertices) / 3,\ GL_TRIANGLES,\ None,\ list(glprim.glindices),\ ('v3f/static',ver-(i*1)),\ ('n3f/static',list(glprim.glnormals)),\ ('c4B/static',list(glprim.glcolors)) )) ''' def draw(self): gl.glEnableClientState(gl.GL_NORMAL_ARRAY) for item in self.primitives: gl.glPushMatrix() # gl.glMultMatrixf(glyph.affine) glyph = item.get_glprimitive() gl.glVertexPointer( 3, gl.GL_FLOAT, 0, glyph.glvertices) gl.glColorPointer( 4, gl.GL_UNSIGNED_BYTE, 0, glyph.glcolors) gl.glNormalPointer(gl.GL_FLOAT, 0, glyph.glnormals) gl.glDrawElements( gl.GL_TRIANGLES, len(glyph.glindices), type_to_enum[glyph.glindex_type], glyph.glindices) gl.glPopMatrix() # self.batch.draw() def delete(self): self.vertex_list.delete() if __name__ == '__main__': mycubes = Cubes( np.array([0.0,0.0,0.0]) )
[ 1, 1053, 12655, 408, 7442, 13, 3166, 4256, 8504, 1053, 9704, 29892, 338, 5897, 29892, 3234, 29892, 12312, 29892, 11412, 29892, 5951, 666, 13, 13, 3166, 14452, 29889, 7168, 29889, 7610, 29888, 1053, 13103, 18498, 2161, 4782, 29892, 8408, 9735, 630, 18498, 2161, 4782, 13, 3166, 14452, 29889, 3221, 29889, 11526, 1053, 2787, 13, 3166, 14452, 29889, 1982, 29889, 2272, 29887, 1026, 29889, 3820, 1053, 334, 13, 13, 3166, 14452, 29889, 1982, 29889, 2272, 29887, 1026, 29889, 6420, 1053, 350, 905, 13, 3166, 14452, 29889, 3221, 29889, 7168, 1053, 319, 2801, 13, 13, 13, 3166, 14452, 29889, 19156, 29889, 2003, 29941, 1053, 26393, 29941, 13, 3166, 14452, 29889, 19156, 29889, 755, 29941, 29881, 1053, 334, 13, 13, 1853, 29918, 517, 29918, 18605, 353, 426, 13, 1678, 3144, 29889, 7239, 4471, 371, 29901, 3144, 29889, 7239, 29918, 29965, 3059, 17298, 3352, 29918, 22716, 4330, 29892, 13, 1678, 3144, 29889, 7239, 1878, 441, 29901, 3144, 29889, 7239, 29918, 29965, 3059, 17298, 3352, 29918, 7068, 8476, 29892, 13, 1678, 3144, 29889, 7239, 13470, 29901, 3144, 29889, 7239, 29918, 29965, 3059, 17298, 3352, 29918, 10192, 29892, 13, 29913, 13, 13, 1753, 3144, 2378, 29898, 3820, 1853, 29892, 19359, 29892, 3309, 1125, 13, 1678, 14550, 13, 1678, 14806, 263, 1051, 310, 8857, 964, 263, 1652, 8606, 287, 274, 8768, 1409, 29892, 8087, 29901, 13, 1678, 518, 313, 29896, 29892, 29871, 29906, 29892, 29871, 29941, 511, 313, 29946, 29892, 29871, 29945, 29892, 29871, 29953, 29897, 4514, 1599, 313, 7239, 7411, 29930, 29953, 5033, 29896, 29892, 29871, 29906, 29892, 29871, 29941, 29892, 29871, 29946, 29892, 29871, 29945, 29892, 29871, 29953, 29897, 13, 1678, 14550, 13, 1678, 1409, 1853, 353, 3144, 1853, 334, 3309, 13, 1678, 736, 1409, 1853, 10456, 11762, 29897, 13, 13, 13, 1753, 260, 404, 514, 403, 29898, 2161, 1125, 13, 1678, 14550, 13, 1678, 7106, 278, 2183, 3700, 9391, 964, 263, 1051, 310, 3367, 19536, 29892, 281, 618, 297, 278, 13, 1678, 1021, 5305, 408, 278, 2441, 15680, 29889, 5538, 451, 664, 363, 378, 1113, 345, 17240, 29889, 13, 1678, 321, 29889, 29887, 29889, 518, 29900, 29892, 29871, 29896, 29892, 29871, 29906, 29892, 29871, 29941, 29892, 29871, 29946, 29962, 1599, 5519, 29900, 29892, 29871, 29896, 29892, 29871, 29906, 1402, 518, 29900, 29892, 29871, 29906, 29892, 29871, 29941, 1402, 518, 29900, 29892, 29871, 29941, 29892, 29871, 29946, 5262, 13, 1678, 14550, 13, 1678, 736, 313, 13, 4706, 518, 2161, 29961, 29900, 1402, 3700, 29961, 2248, 1402, 3700, 29961, 2248, 718, 29871, 29896, 5262, 13, 4706, 363, 2380, 297, 921, 3881, 29898, 29896, 29892, 7431, 29898, 2161, 29897, 448, 29871, 29896, 29897, 13, 1678, 1723, 13, 13, 1753, 3700, 29918, 8945, 29898, 1765, 1575, 29892, 3700, 1125, 13, 1678, 14550, 13, 1678, 7106, 278, 5190, 4226, 4608, 313, 271, 1492, 23619, 304, 29897, 445, 3700, 29889, 13, 1678, 3940, 393, 278, 5305, 310, 278, 4226, 674, 367, 18764, 287, 565, 278, 13, 1678, 3700, 29915, 29879, 281, 4015, 338, 18764, 287, 29889, 13, 1678, 14550, 13, 1678, 325, 29900, 353, 13791, 29961, 2161, 29961, 29900, 5262, 13, 1678, 325, 29896, 353, 13791, 29961, 2161, 29961, 29896, 5262, 13, 1678, 325, 29906, 353, 13791, 29961, 2161, 29961, 29906, 5262, 13, 1678, 263, 353, 325, 29900, 448, 325, 29896, 13, 1678, 289, 353, 325, 29906, 448, 325, 29896, 13, 1678, 736, 289, 29889, 19128, 29898, 29874, 467, 8945, 1891, 580, 13, 13, 1990, 12729, 18213, 3321, 29898, 3318, 1125, 13, 268, 13, 1678, 822, 4770, 2344, 12035, 1311, 1125, 13, 4706, 1583, 29889, 1949, 29918, 3820, 1765, 1575, 353, 6213, 13, 4706, 1583, 29889, 3820, 1765, 1575, 353, 6213, 13, 4706, 1583, 29889, 29887, 1915, 1390, 29918, 1853, 353, 6213, 13, 4706, 1583, 29889, 3820, 513, 1575, 353, 6213, 13, 4706, 1583, 29889, 3820, 27703, 353, 6213, 13, 4706, 1583, 29889, 29887, 3083, 555, 1338, 353, 6213, 13, 13, 13, 1678, 822, 679, 29918, 1949, 29918, 3820, 1765, 1575, 29898, 3383, 17240, 1125, 13, 4706, 736, 7431, 29898, 1761, 29898, 14153, 10456, 8726, 4961, 13, 13, 13, 1678, 822, 679, 29918, 3820, 1765, 1575, 29898, 1311, 29892, 13791, 29892, 17240, 1125, 13, 4706, 3144, 369, 1372, 353, 9704, 29889, 3166, 29918, 1524, 519, 29898, 13, 9651, 13791, 29961, 2248, 29962, 13, 9651, 363, 3700, 297, 17240, 13, 9651, 363, 2380, 297, 3700, 13, 4706, 1723, 13, 4706, 1583, 29889, 1949, 29918, 3820, 1765, 1575, 353, 1583, 29889, 657, 29918, 1949, 29918, 3820, 1765, 1575, 29898, 8726, 29897, 13, 4706, 736, 3144, 2378, 29898, 3820, 29889, 7239, 7411, 29892, 3144, 369, 1372, 29892, 1583, 29889, 1949, 29918, 3820, 1765, 1575, 334, 29871, 29941, 29897, 13, 13, 13, 1678, 822, 679, 29918, 29887, 1915, 1390, 29918, 1853, 29898, 1311, 1125, 13, 4706, 14550, 13, 4706, 450, 1134, 310, 278, 3144, 513, 1575, 1409, 7111, 373, 920, 1784, 13791, 727, 526, 13, 4706, 14550, 13, 4706, 565, 1583, 29889, 1949, 29918, 3820, 1765, 1575, 529, 29871, 29906, 29945, 29953, 29901, 13, 9651, 2380, 29918, 1853, 353, 3144, 29889, 7239, 4471, 371, 13, 4706, 25342, 1583, 29889, 1949, 29918, 3820, 1765, 1575, 529, 29871, 29953, 29945, 29945, 29941, 29953, 29901, 13, 9651, 2380, 29918, 1853, 353, 3144, 29889, 7239, 1878, 441, 13, 4706, 1683, 29901, 13, 9651, 2380, 29918, 1853, 353, 3144, 29889, 7239, 13470, 13, 4706, 736, 2380, 29918, 1853, 13, 13, 13, 1678, 822, 679, 29918, 3820, 513, 1575, 29898, 1311, 29892, 17240, 1125, 13, 4706, 3144, 513, 1575, 353, 5159, 13, 4706, 3700, 29918, 10289, 353, 29871, 29900, 13, 4706, 363, 3700, 297, 17240, 29901, 13, 9651, 16285, 353, 921, 3881, 29898, 2161, 29918, 10289, 29892, 3700, 29918, 10289, 718, 7431, 29898, 2161, 876, 13, 9651, 3144, 513, 1575, 29889, 21843, 29898, 14153, 10456, 29873, 404, 514, 403, 29898, 513, 1575, 4961, 13, 9651, 3700, 29918, 10289, 4619, 7431, 29898, 2161, 29897, 13, 4706, 1583, 29889, 29887, 1915, 1390, 29918, 1853, 353, 1583, 29889, 657, 29918, 29887, 1915, 1390, 29918, 1853, 580, 13, 4706, 736, 3144, 2378, 29898, 1311, 29889, 29887, 1915, 1390, 29918, 1853, 29892, 3144, 513, 1575, 29892, 7431, 29898, 3820, 513, 1575, 876, 13, 13, 13, 1678, 822, 679, 29918, 3820, 27703, 29898, 1311, 29892, 17240, 29892, 3700, 29918, 27703, 1125, 13, 4706, 3144, 27703, 353, 9704, 29889, 3166, 29918, 1524, 519, 29898, 13, 9651, 12312, 29898, 2780, 29892, 7431, 29898, 2161, 876, 13, 9651, 363, 3700, 29892, 2927, 297, 5951, 666, 29898, 8726, 29892, 3700, 29918, 27703, 29897, 13, 4706, 1723, 13, 4706, 736, 3144, 2378, 29898, 3820, 29889, 7239, 4471, 371, 29892, 9704, 10456, 3820, 27703, 511, 1583, 29889, 1949, 29918, 3820, 1765, 1575, 334, 29871, 29946, 29897, 29871, 13, 308, 13, 13, 1678, 822, 679, 29918, 29887, 3083, 555, 1338, 29898, 1311, 29892, 13791, 29892, 17240, 1125, 13, 4706, 6056, 1338, 353, 313, 13, 9651, 3700, 29918, 8945, 29898, 1765, 1575, 29892, 3700, 29897, 13, 9651, 363, 3700, 297, 17240, 13, 4706, 1723, 13, 4706, 330, 3083, 555, 1338, 353, 9704, 29889, 3166, 29918, 1524, 519, 29898, 13, 9651, 12312, 29898, 8945, 29892, 7431, 29898, 2161, 876, 13, 9651, 363, 3700, 29892, 4226, 297, 5951, 666, 29898, 8726, 29892, 6056, 1338, 29897, 13, 4706, 1723, 13, 4706, 736, 3144, 2378, 29898, 13, 9651, 3144, 29889, 7239, 7411, 29892, 9704, 10456, 29887, 3083, 555, 1338, 511, 1583, 29889, 1949, 29918, 3820, 1765, 1575, 334, 29871, 29941, 29897, 13, 13, 13, 1678, 822, 515, 29918, 12181, 29898, 1311, 29892, 13791, 29892, 17240, 29892, 3700, 29918, 27703, 29892, 2756, 457, 1125, 13, 4706, 1583, 29889, 3820, 1765, 1575, 353, 1583, 29889, 657, 29918, 3820, 1765, 1575, 29898, 1765, 1575, 29892, 17240, 29897, 13, 4706, 1583, 29889, 3820, 513, 1575, 353, 1583, 29889, 657, 29918, 3820, 513, 1575, 29898, 8726, 29897, 13, 4706, 1583, 29889, 3820, 27703, 353, 1583, 29889, 657, 29918, 3820, 27703, 29898, 8726, 29892, 3700, 29918, 27703, 29897, 13, 4706, 1583, 29889, 29887, 3083, 555, 1338, 353, 1583, 29889, 657, 29918, 29887, 3083, 555, 1338, 29898, 1765, 1575, 29892, 17240, 29897, 13, 4706, 1583, 29889, 3470, 457, 353, 1583, 29889, 657, 29918, 3470, 457, 29898, 3470, 457, 29897, 13, 308, 13, 1678, 822, 679, 29918, 3470, 457, 29898, 1311, 29892, 2756, 457, 1125, 13, 4706, 2893, 353, 341, 29941, 29928, 14609, 29946, 29946, 29888, 580, 13, 4706, 2893, 353, 286, 29941, 29881, 5896, 18415, 29946, 29946, 29898, 1693, 29897, 13, 4706, 14240, 353, 286, 29941, 29881, 4300, 9632, 14609, 29946, 29946, 29898, 1693, 29892, 13, 462, 462, 308, 2756, 457, 29961, 29900, 29892, 29941, 1402, 13, 462, 462, 308, 2756, 457, 29961, 29896, 29892, 29941, 1402, 13, 462, 462, 308, 2756, 457, 29961, 29906, 29889, 29941, 2314, 13, 4706, 396, 437, 278, 13733, 13, 4706, 736, 14240, 13, 308, 13, 308, 13, 1990, 21755, 17143, 1617, 29898, 3318, 1125, 13, 1678, 14550, 13, 1678, 5282, 1475, 263, 15680, 17143, 1617, 29892, 263, 29871, 29941, 29928, 8267, 411, 12151, 17240, 322, 7812, 12770, 29889, 13, 1678, 7806, 12688, 17645, 263, 1298, 297, 29871, 29941, 29881, 2913, 29889, 7806, 3700, 338, 263, 1051, 310, 16285, 13, 1678, 964, 278, 12688, 1409, 29892, 25391, 263, 5614, 6468, 279, 18635, 9228, 16184, 278, 3700, 29915, 29879, 13, 1678, 12770, 29889, 7806, 3700, 756, 967, 1914, 2927, 29889, 13, 1678, 14550, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 13791, 29892, 17240, 29892, 3700, 29918, 27703, 29922, 8516, 29892, 2756, 457, 29922, 8516, 1125, 13, 308, 13, 4706, 565, 7431, 29898, 1765, 1575, 29897, 1405, 29871, 29900, 322, 451, 338, 8758, 29898, 1765, 1575, 29961, 29900, 1402, 26393, 29941, 1125, 13, 9651, 13791, 353, 518, 25987, 29941, 10456, 29894, 29897, 363, 325, 297, 13791, 29962, 13, 4706, 1583, 29889, 1765, 1575, 353, 13791, 13, 13, 4706, 363, 3700, 297, 17240, 29901, 13, 9651, 4974, 7431, 29898, 2161, 29897, 6736, 29871, 29941, 13, 9651, 363, 2380, 297, 3700, 29901, 13, 18884, 4974, 29871, 29900, 5277, 2380, 529, 7431, 29898, 1765, 1575, 29897, 13, 4706, 1583, 29889, 8726, 353, 17240, 13, 13, 4706, 565, 3700, 29918, 27703, 338, 6213, 29901, 13, 9651, 3700, 29918, 27703, 353, 12312, 3552, 29906, 29945, 29945, 29892, 29871, 29900, 29892, 29871, 29900, 29892, 29871, 29906, 29945, 29945, 876, 13, 308, 13, 29937, 4706, 565, 3700, 29918, 27703, 338, 6213, 29901, 13, 29937, 9651, 3700, 29918, 27703, 353, 4796, 13, 29937, 4706, 565, 338, 8758, 29898, 2161, 29918, 27703, 29892, 9159, 1125, 13, 29937, 9651, 3700, 29918, 27703, 353, 12312, 29898, 2161, 29918, 27703, 29897, 13, 13, 4706, 396, 14402, 29901, 11955, 310, 413, 2878, 29918, 29883, 4003, 29914, 29873, 27280, 2867, 565, 591, 3349, 445, 525, 1761, 29915, 13, 4706, 396, 322, 731, 3700, 29918, 27703, 304, 278, 736, 310, 525, 275, 5897, 4286, 3872, 29915, 29873, 1073, 2020, 29889, 13, 308, 13, 4706, 396, 3639, 263, 1051, 310, 5291, 2701, 310, 7431, 1583, 29889, 8726, 310, 278, 2183, 3700, 27703, 13, 4706, 1583, 29889, 2161, 29918, 27703, 353, 1051, 29898, 275, 5897, 29898, 23090, 29898, 2161, 29918, 27703, 511, 7431, 29898, 1311, 29889, 8726, 4961, 13, 308, 13, 4706, 1583, 29889, 3470, 457, 353, 2756, 457, 13, 308, 13, 1678, 822, 679, 29918, 3820, 9469, 3321, 29898, 1311, 1125, 13, 4706, 3144, 9469, 3321, 353, 12729, 18213, 3321, 580, 13, 4706, 3144, 9469, 3321, 29889, 3166, 29918, 12181, 29898, 1311, 29889, 1765, 1575, 29892, 1583, 29889, 8726, 29892, 1583, 29889, 2161, 29918, 27703, 29892, 1583, 29889, 3470, 457, 29897, 13, 4706, 736, 3144, 9469, 3321, 13, 308, 13, 13, 1990, 28618, 267, 29898, 29909, 2801, 1125, 13, 268, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 4423, 1125, 13, 4706, 14550, 13, 4706, 396, 925, 697, 28704, 13, 4706, 321, 29906, 353, 29871, 29896, 29889, 847, 29871, 29906, 13, 4706, 4837, 29879, 353, 1051, 29898, 4704, 10456, 14358, 4197, 29899, 29872, 29906, 29892, 718, 29872, 29906, 1402, 29871, 29941, 4961, 13, 4706, 17240, 353, 518, 13, 9651, 518, 29900, 29892, 29871, 29896, 29892, 29871, 29941, 29892, 29871, 29906, 1402, 396, 2175, 13, 9651, 518, 29946, 29892, 29871, 29953, 29892, 29871, 29955, 29892, 29871, 29945, 1402, 396, 1492, 13, 9651, 518, 29955, 29892, 29871, 29941, 29892, 29871, 29896, 29892, 29871, 29945, 1402, 396, 4565, 13, 9651, 518, 29900, 29892, 29871, 29906, 29892, 29871, 29953, 29892, 29871, 29946, 1402, 396, 1250, 13, 9651, 518, 29941, 29892, 29871, 29955, 29892, 29871, 29953, 29892, 29871, 29906, 1402, 396, 2246, 13, 9651, 518, 29896, 29892, 29871, 29900, 29892, 29871, 29946, 29892, 29871, 29945, 1402, 396, 5970, 13, 4706, 4514, 13, 308, 13, 4706, 12954, 353, 21755, 17143, 1617, 29898, 369, 1372, 29892, 17240, 29897, 13, 4706, 3144, 9469, 353, 12954, 29889, 657, 29918, 3820, 9469, 3321, 580, 13, 4706, 2318, 353, 8408, 9735, 630, 18498, 2161, 4782, 580, 13, 4706, 14550, 13, 4706, 1583, 29889, 9469, 277, 3145, 353, 5159, 13, 4706, 17114, 29918, 29883, 431, 267, 353, 4423, 29889, 12181, 29961, 29900, 29962, 13, 4706, 363, 474, 297, 921, 3881, 29898, 22230, 29918, 29883, 431, 267, 1125, 13, 9651, 1583, 29889, 9469, 277, 3145, 29889, 4397, 29898, 1311, 29889, 3258, 29918, 29883, 431, 267, 29898, 5479, 7503, 29892, 29875, 1402, 29896, 29889, 29900, 876, 13, 462, 308, 13, 1678, 822, 1653, 29918, 29883, 431, 267, 29898, 1311, 29892, 4423, 29892, 7636, 29918, 2311, 29892, 2927, 29922, 8516, 1125, 13, 4706, 321, 29906, 353, 7636, 29918, 2311, 29871, 847, 29871, 29906, 29889, 29900, 13, 4706, 4837, 29879, 353, 1051, 29898, 4704, 10456, 14358, 4197, 29899, 29872, 29906, 29892, 718, 29872, 29906, 1402, 29871, 29941, 4961, 13, 4706, 17240, 353, 518, 13, 9651, 518, 29900, 29892, 29871, 29896, 29892, 29871, 29941, 29892, 29871, 29906, 1402, 396, 2175, 13, 9651, 518, 29946, 29892, 29871, 29953, 29892, 29871, 29955, 29892, 29871, 29945, 1402, 396, 1492, 13, 9651, 518, 29955, 29892, 29871, 29941, 29892, 29871, 29896, 29892, 29871, 29945, 1402, 396, 4565, 13, 9651, 518, 29900, 29892, 29871, 29906, 29892, 29871, 29953, 29892, 29871, 29946, 1402, 396, 1250, 13, 9651, 518, 29941, 29892, 29871, 29955, 29892, 29871, 29953, 29892, 29871, 29906, 1402, 396, 2246, 13, 9651, 518, 29896, 29892, 29871, 29900, 29892, 29871, 29946, 29892, 29871, 29945, 1402, 396, 5970, 13, 4706, 4514, 13, 4706, 2756, 29922, 7442, 29889, 1032, 29872, 29898, 29946, 29897, 13, 4706, 2756, 29961, 29941, 29892, 29901, 29941, 29962, 353, 4423, 13, 4706, 12954, 353, 21755, 17143, 1617, 29898, 369, 1372, 29892, 17240, 29892, 2756, 457, 353, 2756, 29897, 13, 4706, 736, 12954, 13, 13, 4706, 14550, 13, 4706, 1583, 29889, 369, 4776, 29918, 1761, 353, 5159, 13, 4706, 1583, 29889, 16175, 29922, 23145, 580, 13, 4706, 1583, 29889, 369, 4776, 29918, 1761, 29889, 4397, 29898, 1311, 29889, 16175, 29889, 1202, 29918, 2248, 287, 29898, 2435, 29898, 3820, 9469, 29889, 3820, 1765, 1575, 29897, 847, 29871, 29941, 2053, 13, 462, 462, 462, 12729, 29918, 29911, 3960, 19453, 17101, 2053, 13, 462, 462, 462, 6213, 2053, 13, 462, 462, 462, 1051, 29898, 3820, 9469, 29889, 3820, 513, 1575, 20481, 13, 462, 462, 462, 6702, 29894, 29941, 29888, 29914, 7959, 742, 9302, 29889, 2378, 29898, 3820, 9469, 29889, 3820, 1765, 1575, 8243, 29905, 13, 462, 462, 462, 6702, 29876, 29941, 29888, 29914, 7959, 742, 1761, 29898, 3820, 9469, 29889, 29887, 3083, 555, 1338, 8243, 29905, 13, 462, 462, 462, 6702, 29883, 29946, 29933, 29914, 7959, 742, 1761, 29898, 3820, 9469, 29889, 3820, 27703, 876, 13, 462, 462, 462, 1723, 1723, 13, 13, 4706, 1147, 353, 7442, 29889, 2378, 29898, 3820, 9469, 29889, 3820, 1765, 1575, 29897, 13, 4706, 363, 474, 297, 3464, 29898, 29896, 29892, 29941, 29900, 29900, 1125, 13, 9651, 1583, 29889, 369, 4776, 29918, 1761, 29889, 4397, 29898, 1311, 29889, 16175, 29889, 1202, 29918, 2248, 287, 29898, 2435, 29898, 3820, 9469, 29889, 3820, 1765, 1575, 29897, 847, 29871, 29941, 2053, 13, 462, 462, 462, 12729, 29918, 29911, 3960, 19453, 17101, 2053, 13, 462, 462, 462, 6213, 2053, 13, 462, 462, 462, 1051, 29898, 3820, 9469, 29889, 3820, 513, 1575, 20481, 13, 462, 462, 462, 6702, 29894, 29941, 29888, 29914, 7959, 742, 369, 17108, 29875, 29930, 29896, 8243, 29905, 13, 462, 462, 462, 6702, 29876, 29941, 29888, 29914, 7959, 742, 1761, 29898, 3820, 9469, 29889, 29887, 3083, 555, 1338, 8243, 29905, 13, 462, 462, 462, 6702, 29883, 29946, 29933, 29914, 7959, 742, 1761, 29898, 3820, 9469, 29889, 3820, 27703, 876, 13, 462, 462, 462, 29871, 876, 13, 9651, 1583, 29889, 369, 4776, 29918, 1761, 29889, 4397, 29898, 1311, 29889, 16175, 29889, 1202, 29918, 2248, 287, 29898, 2435, 29898, 3820, 9469, 29889, 3820, 1765, 1575, 29897, 847, 29871, 29941, 2053, 13, 462, 462, 462, 12729, 29918, 29911, 3960, 19453, 17101, 2053, 13, 462, 462, 462, 6213, 2053, 13, 462, 462, 462, 1051, 29898, 3820, 9469, 29889, 3820, 513, 1575, 20481, 13, 462, 462, 462, 6702, 29894, 29941, 29888, 29914, 7959, 742, 369, 17722, 29875, 29930, 29896, 8243, 29905, 13, 462, 462, 462, 6702, 29876, 29941, 29888, 29914, 7959, 742, 1761, 29898, 3820, 9469, 29889, 29887, 3083, 555, 1338, 8243, 29905, 13, 462, 462, 462, 6702, 29883, 29946, 29933, 29914, 7959, 742, 1761, 29898, 3820, 9469, 29889, 3820, 27703, 876, 13, 462, 462, 462, 29871, 876, 268, 13, 308, 14550, 13, 632, 13, 462, 13, 13, 308, 13, 1678, 822, 4216, 29898, 1311, 1125, 13, 13, 4706, 3144, 29889, 3820, 20701, 4032, 2792, 29898, 3820, 29889, 7239, 29918, 29940, 1955, 1529, 29931, 29918, 1718, 22800, 29897, 13, 4706, 363, 2944, 297, 1583, 29889, 9469, 277, 3145, 29901, 13, 13, 9651, 3144, 29889, 3820, 27031, 14609, 580, 13, 13, 29937, 9651, 3144, 29889, 3820, 6857, 14609, 29888, 29898, 16808, 561, 29889, 3470, 457, 29897, 13, 632, 13, 9651, 330, 27026, 353, 2944, 29889, 657, 29918, 3820, 9469, 3321, 580, 13, 9651, 3144, 29889, 3820, 22479, 14516, 29898, 13, 462, 29941, 29892, 3144, 29889, 7239, 29918, 29943, 3927, 1299, 29892, 29871, 29900, 29892, 330, 27026, 29889, 3820, 1765, 1575, 29897, 13, 9651, 3144, 29889, 3820, 3306, 14516, 29898, 13, 462, 29946, 29892, 3144, 29889, 7239, 29918, 29965, 3059, 17298, 3352, 29918, 22716, 4330, 29892, 29871, 29900, 29892, 330, 27026, 29889, 3820, 27703, 29897, 13, 9651, 3144, 29889, 3820, 19077, 14516, 29898, 3820, 29889, 7239, 29918, 29943, 3927, 1299, 29892, 29871, 29900, 29892, 330, 27026, 29889, 29887, 3083, 555, 1338, 29897, 13, 9651, 3144, 29889, 3820, 8537, 18868, 29898, 13, 18884, 3144, 29889, 7239, 29918, 29911, 3960, 19453, 17101, 29892, 13, 18884, 7431, 29898, 16808, 561, 29889, 3820, 513, 1575, 511, 13, 18884, 1134, 29918, 517, 29918, 18605, 29961, 16808, 561, 29889, 29887, 1915, 1390, 29918, 1853, 1402, 13, 18884, 330, 27026, 29889, 3820, 513, 1575, 29897, 13, 13, 9651, 3144, 29889, 3820, 12310, 14609, 580, 13, 632, 13, 29937, 4706, 1583, 29889, 16175, 29889, 4012, 580, 13, 308, 13, 1678, 822, 5217, 29898, 1311, 1125, 13, 4706, 1583, 29889, 369, 4776, 29918, 1761, 29889, 8143, 580, 13, 308, 13, 308, 13, 361, 4770, 978, 1649, 1275, 525, 1649, 3396, 1649, 2396, 13, 268, 13, 268, 13, 1678, 590, 29883, 431, 267, 353, 28618, 267, 29898, 7442, 29889, 2378, 4197, 29900, 29889, 29900, 29892, 29900, 29889, 29900, 29892, 29900, 29889, 29900, 2314, 1723, 13, 268, 13, 268, 2 ]
main.py
henryshunt/psn-logger
0
42214
<filename>main.py import json import os from datetime import datetime import sys import queue import threading import smtplib import ssl import daemon import paho.mqtt.client as mqtt import pymysql import config import helpers broker = None alarm_analysis_queue = queue.Queue() is_processing_alarms = False def on_connect(client, user_data, flags, result): """ Called when the MQTT broker connects to an MQTT server """ if result: return # Return if error # Subscribe to the outbound and reports topics subscribe_result = broker.subscribe( [("nodes/+/outbound/+", 1), ("nodes/+/reports/+", 1)]) def send_alarm_email(alarm, report_time, value): """ Sends an email to the owner of a session to indicate a triggered alarm """ message = ( "Subject: PSN Alarm Triggered\n\n" "Notice from the Phenotyping Sensor Network that a sensor node in one of your " "sessions raised an alarm." "\n\nAlarm triggered based on data on {0} UTC" "\n\nSession name: {1}" "\nSensor node location: {2}" "\nAlarm: {3} (safe value range: {4} - {5})" "\nReported value: {6}") parameter_friendly = "" if alarm[1] == "airt": parameter_friendly = "Temperature" elif alarm[1] == "relh": parameter_friendly = "Humidity" if alarm[1] == "batv": parameter_friendly = "Battery Voltage" # Email the owner of the session server = smtplib.SMTP_SSL(config.email_server, 465) try: server.login(config.email_address, config.email_password) time_string = report_time.strftime("%d/%m/%Y at %H:%M") message_formatted = message.format(time_string, alarm[4], alarm[5], parameter_friendly, alarm[2], alarm[3], value) server.sendmail(config.email_address, alarm[6], message_formatted) except: pass server.quit() def process_alarms(): """ Checks all reports in the alarm analysis queue to see if they trigger any alarms and triggers the alarms if they do """ global is_processing_alarms if is_processing_alarms == True: return is_processing_alarms = True while alarm_analysis_queue.empty() == False: report = alarm_analysis_queue.get() report_time = datetime.strptime(report[1]["time"], "%Y-%m-%dT%H:%M:%SZ") try: # Get all alarms for this node that may be able to trigger alarms = helpers.get_triggered_alarms(report[0], report[1]["session_id"], report_time) if alarms == None: continue # Trigger any alarms that have a report value outside the alarm range for alarm in alarms: try: if alarm[1] == "airt": if (report[1]["airt"] != None and (report[1]["airt"] < alarm[2] or report[1]["airt"] > alarm[3])): helpers.update_alarm_triggered(alarm[0], report_time) send_alarm_email(alarm, report_time, report[1]["airt"]) elif alarm[1] == "relh": if (report[1]["relh"] != None and (report[1]["relh"] < alarm[2] or report[1]["relh"] > alarm[3])): helpers.update_alarm_triggered(alarm[0], report_time) send_alarm_email(alarm, report_time, report[1]["relh"]) elif alarm[1] == "batv": if (report[1]["batv"] != None and (report[1]["batv"] < alarm[2] or report[1]["batv"] > alarm[3])): helpers.update_alarm_triggered(alarm[0], report_time) send_alarm_email(alarm, report_time, report[1]["batv"]) except: continue except: continue is_processing_alarms = False def on_message(client, user_data, message): """ Called when a message is received from the MQTT broker """ topic_sections = message.topic.split('/') node_address = topic_sections[1] endpoint = topic_sections[2] message_id = topic_sections[3] inbound_topic = "nodes/" + node_address + "/inbound/" + message_id # Request received from a sensor node if endpoint == "outbound": # Send back the active session for this sensor node if message.payload.decode() == "get_session": try: session = helpers.get_active_session(node_address) if session == None: broker.publish(inbound_topic, "no_session", 0) return response = ("{{\"session_id\":{0},\"interval\":{1},\"batch_size\":{2}}}" .format(str(session[0]), str(session[1]), str(session[2]))) broker.publish(inbound_topic, response, 0) except: broker.publish(inbound_topic, "error", 0) # Report received from a sensor node elif endpoint == "reports": try: report = json.loads(message.payload.decode()) report_time = datetime.strptime(report["time"], "%Y-%m-%dT%H:%M:%SZ") # Add to database if report time is within time range of specified session if helpers.is_time_in_session(node_address, report["session_id"], report_time): try: helpers.insert_report(node_address, report) # Trigger any alarms based on the values in this report alarm_analysis_queue.put((node_address, report)) threading.Thread(target=process_alarms).start() except pymysql.IntegrityError as e: # Report for this node with this time already exists (unique key # constraint fails) if e.args[0] == 1062: pass # Session and/or node does not exist (foreign key constraint fails) elif e.args[0] == 1452: broker.publish(inbound_topic, "no_session", 0) return else: raise broker.publish(inbound_topic, "ok", 0) else: broker.publish(inbound_topic, "no_session", 0) except: broker.publish(inbound_topic, "error", 0) if __name__ == "__main__": current_dir = os.path.dirname(os.path.realpath(__file__)) with daemon.DaemonContext(working_directory=current_dir): if not config.load(): sys.exit(1) # Check if the database is accessible try: helpers.db_connection() except: sys.exit(1) # Create and connect to the MQTT broker broker = mqtt.Client() broker.on_connect = on_connect broker.on_message = on_message try: broker.connect(config.broker_address, config.broker_port) except: sys.exit(1) # Enter loop to receive messages (handles auto-reconnecting) broker.loop_forever()
[ 1, 529, 9507, 29958, 3396, 29889, 2272, 13, 5215, 4390, 30004, 13, 5215, 2897, 30004, 13, 3166, 12865, 1053, 12865, 30004, 13, 5215, 10876, 30004, 13, 5215, 9521, 30004, 13, 5215, 3244, 292, 30004, 13, 5215, 1560, 9392, 1982, 30004, 13, 5215, 24250, 30004, 13, 30004, 13, 5215, 1146, 9857, 30004, 13, 5215, 282, 29745, 29889, 28466, 698, 29889, 4645, 408, 286, 29939, 698, 30004, 13, 5215, 282, 962, 952, 1519, 30004, 13, 30004, 13, 5215, 2295, 30004, 13, 5215, 1371, 414, 30004, 13, 30004, 13, 30004, 13, 6729, 3946, 353, 6213, 30004, 13, 284, 2817, 29918, 15916, 29918, 9990, 353, 9521, 29889, 10620, 26471, 13, 275, 29918, 19170, 29918, 284, 279, 1516, 353, 7700, 30004, 13, 30004, 13, 30004, 13, 1753, 373, 29918, 6915, 29898, 4645, 29892, 1404, 29918, 1272, 29892, 13449, 29892, 1121, 1125, 30004, 13, 1678, 9995, 3037, 839, 746, 278, 341, 29984, 19988, 2545, 3946, 4511, 29879, 304, 385, 341, 29984, 19988, 1923, 30004, 13, 1678, 9995, 30004, 13, 1678, 565, 1121, 29901, 736, 396, 7106, 565, 1059, 30004, 13, 30004, 13, 1678, 396, 3323, 13086, 304, 278, 714, 9917, 322, 13676, 23820, 30004, 13, 1678, 1014, 13086, 29918, 2914, 353, 2545, 3946, 29889, 19496, 29898, 30004, 13, 4706, 518, 703, 18010, 29914, 29974, 29914, 449, 9917, 29914, 29974, 613, 29871, 29896, 511, 4852, 18010, 29914, 29974, 29914, 276, 4011, 29914, 29974, 613, 29871, 29896, 29897, 2314, 30004, 13, 30004, 13, 30004, 13, 1753, 3638, 29918, 284, 2817, 29918, 5269, 29898, 284, 2817, 29892, 3461, 29918, 2230, 29892, 995, 1125, 30004, 13, 1678, 9995, 317, 1975, 385, 4876, 304, 278, 12271, 310, 263, 4867, 304, 12266, 263, 19799, 21200, 30004, 13, 1678, 9995, 30004, 13, 1678, 2643, 353, 313, 30004, 13, 4706, 376, 20622, 29901, 11323, 29940, 838, 2817, 1605, 3567, 287, 29905, 29876, 29905, 29876, 19451, 13, 4706, 376, 3664, 625, 515, 278, 1963, 264, 327, 1478, 292, 317, 6073, 8527, 393, 263, 23530, 2943, 297, 697, 310, 596, 376, 30004, 13, 4706, 376, 29879, 10964, 10425, 385, 21200, 1213, 30004, 13, 4706, 6634, 29876, 29905, 29876, 2499, 2817, 19799, 2729, 373, 848, 373, 426, 29900, 29913, 17998, 19451, 13, 4706, 6634, 29876, 29905, 29876, 7317, 1024, 29901, 426, 29896, 5038, 30004, 13, 4706, 6634, 29876, 29903, 6073, 2943, 4423, 29901, 426, 29906, 5038, 30004, 13, 4706, 6634, 29876, 2499, 2817, 29901, 426, 29941, 29913, 313, 11177, 995, 3464, 29901, 426, 29946, 29913, 448, 426, 29945, 1800, 19451, 13, 4706, 6634, 29876, 13020, 287, 995, 29901, 426, 29953, 27195, 30004, 13, 1678, 6756, 13, 1678, 3443, 29918, 18326, 368, 353, 5124, 30004, 13, 1678, 565, 21200, 29961, 29896, 29962, 1275, 376, 1466, 29873, 1115, 3443, 29918, 18326, 368, 353, 376, 5776, 546, 1535, 19451, 13, 1678, 25342, 21200, 29961, 29896, 29962, 1275, 376, 2674, 29882, 1115, 3443, 29918, 18326, 368, 353, 376, 29950, 398, 333, 537, 19451, 13, 1678, 565, 21200, 29961, 29896, 29962, 1275, 376, 10222, 29894, 1115, 3443, 29918, 18326, 368, 353, 376, 29933, 2620, 29891, 3684, 29873, 482, 19451, 13, 30004, 13, 1678, 396, 22608, 278, 12271, 310, 278, 4867, 30004, 13, 1678, 1923, 353, 1560, 9392, 1982, 29889, 17061, 3557, 29918, 18641, 29898, 2917, 29889, 5269, 29918, 2974, 29892, 29871, 29946, 29953, 29945, 8443, 13, 30004, 13, 1678, 1018, 29901, 30004, 13, 4706, 1923, 29889, 7507, 29898, 2917, 29889, 5269, 29918, 7328, 29892, 2295, 29889, 5269, 29918, 5630, 8443, 13, 30004, 13, 4706, 931, 29918, 1807, 353, 3461, 29918, 2230, 29889, 710, 615, 603, 11702, 29881, 22584, 29885, 22584, 29979, 472, 1273, 29950, 16664, 29924, 1159, 30004, 13, 4706, 2643, 29918, 689, 19667, 353, 2643, 29889, 4830, 29898, 2230, 29918, 1807, 29892, 21200, 29961, 29946, 1402, 21200, 29961, 29945, 1402, 30004, 13, 9651, 3443, 29918, 18326, 368, 29892, 21200, 29961, 29906, 1402, 21200, 29961, 29941, 1402, 995, 8443, 13, 4706, 1923, 29889, 6717, 2549, 29898, 2917, 29889, 5269, 29918, 7328, 29892, 21200, 29961, 29953, 1402, 2643, 29918, 689, 19667, 8443, 13, 1678, 5174, 29901, 1209, 30004, 13, 30004, 13, 1678, 1923, 29889, 28358, 26471, 13, 30004, 13, 1753, 1889, 29918, 284, 279, 1516, 7295, 30004, 13, 1678, 9995, 5399, 29879, 599, 13676, 297, 278, 21200, 7418, 9521, 304, 1074, 565, 896, 7135, 738, 394, 279, 1516, 30004, 13, 4706, 322, 23660, 278, 394, 279, 1516, 565, 896, 437, 30004, 13, 1678, 9995, 30004, 13, 1678, 5534, 338, 29918, 19170, 29918, 284, 279, 1516, 30004, 13, 1678, 565, 338, 29918, 19170, 29918, 284, 279, 1516, 1275, 5852, 29901, 736, 30004, 13, 1678, 338, 29918, 19170, 29918, 284, 279, 1516, 353, 5852, 30004, 13, 30004, 13, 1678, 1550, 21200, 29918, 15916, 29918, 9990, 29889, 6310, 580, 1275, 7700, 29901, 30004, 13, 4706, 3461, 353, 21200, 29918, 15916, 29918, 9990, 29889, 657, 26471, 13, 4706, 3461, 29918, 2230, 353, 12865, 29889, 710, 415, 603, 29898, 12276, 29961, 29896, 29962, 3366, 2230, 12436, 11860, 29979, 19222, 29885, 19222, 29881, 29911, 29995, 29950, 16664, 29924, 16664, 29903, 29999, 1159, 30004, 13, 30004, 13, 4706, 1018, 29901, 30004, 13, 9651, 396, 3617, 599, 394, 279, 1516, 363, 445, 2943, 393, 1122, 367, 2221, 304, 7135, 30004, 13, 9651, 394, 279, 1516, 353, 1371, 414, 29889, 657, 29918, 21001, 287, 29918, 284, 279, 1516, 29898, 12276, 29961, 29900, 1402, 3461, 29961, 29896, 29962, 3366, 7924, 29918, 333, 12436, 30004, 13, 18884, 3461, 29918, 2230, 8443, 13, 9651, 565, 394, 279, 1516, 1275, 6213, 29901, 6773, 30004, 13, 30004, 13, 9651, 396, 1605, 3567, 738, 394, 279, 1516, 393, 505, 263, 3461, 995, 5377, 278, 21200, 3464, 30004, 13, 9651, 363, 21200, 297, 394, 279, 1516, 29901, 30004, 13, 18884, 1018, 29901, 30004, 13, 462, 1678, 565, 21200, 29961, 29896, 29962, 1275, 376, 1466, 29873, 1115, 30004, 13, 462, 4706, 565, 313, 12276, 29961, 29896, 29962, 3366, 1466, 29873, 3108, 2804, 6213, 322, 30004, 13, 462, 9651, 313, 12276, 29961, 29896, 29962, 3366, 1466, 29873, 3108, 529, 21200, 29961, 29906, 29962, 470, 3461, 29961, 29896, 29962, 3366, 1466, 29873, 3108, 1405, 21200, 29961, 29941, 12622, 29901, 30004, 13, 462, 9651, 1371, 414, 29889, 5504, 29918, 284, 2817, 29918, 21001, 287, 29898, 284, 2817, 29961, 29900, 1402, 3461, 29918, 2230, 8443, 13, 462, 9651, 3638, 29918, 284, 2817, 29918, 5269, 29898, 284, 2817, 29892, 3461, 29918, 2230, 29892, 3461, 29961, 29896, 29962, 3366, 1466, 29873, 20068, 30004, 13, 30004, 13, 462, 1678, 25342, 21200, 29961, 29896, 29962, 1275, 376, 2674, 29882, 1115, 30004, 13, 462, 4706, 565, 313, 12276, 29961, 29896, 29962, 3366, 2674, 29882, 3108, 2804, 6213, 322, 30004, 13, 462, 9651, 313, 12276, 29961, 29896, 29962, 3366, 2674, 29882, 3108, 529, 21200, 29961, 29906, 29962, 470, 3461, 29961, 29896, 29962, 3366, 2674, 29882, 3108, 1405, 21200, 29961, 29941, 12622, 29901, 30004, 13, 462, 9651, 1371, 414, 29889, 5504, 29918, 284, 2817, 29918, 21001, 287, 29898, 284, 2817, 29961, 29900, 1402, 3461, 29918, 2230, 8443, 13, 462, 9651, 3638, 29918, 284, 2817, 29918, 5269, 29898, 284, 2817, 29892, 3461, 29918, 2230, 29892, 3461, 29961, 29896, 29962, 3366, 2674, 29882, 20068, 30004, 13, 30004, 13, 462, 1678, 25342, 21200, 29961, 29896, 29962, 1275, 376, 10222, 29894, 1115, 30004, 13, 462, 4706, 565, 313, 12276, 29961, 29896, 29962, 3366, 10222, 29894, 3108, 2804, 6213, 322, 30004, 13, 462, 9651, 313, 12276, 29961, 29896, 29962, 3366, 10222, 29894, 3108, 529, 21200, 29961, 29906, 29962, 470, 3461, 29961, 29896, 29962, 3366, 10222, 29894, 3108, 1405, 21200, 29961, 29941, 12622, 29901, 30004, 13, 462, 9651, 1371, 414, 29889, 5504, 29918, 284, 2817, 29918, 21001, 287, 29898, 284, 2817, 29961, 29900, 1402, 3461, 29918, 2230, 8443, 13, 462, 9651, 3638, 29918, 284, 2817, 29918, 5269, 29898, 284, 2817, 29892, 3461, 29918, 2230, 29892, 3461, 29961, 29896, 29962, 3366, 10222, 29894, 20068, 30004, 13, 18884, 5174, 29901, 6773, 30004, 13, 4706, 5174, 29901, 6773, 30004, 13, 30004, 13, 1678, 338, 29918, 19170, 29918, 284, 279, 1516, 353, 7700, 30004, 13, 30004, 13, 1753, 373, 29918, 4906, 29898, 4645, 29892, 1404, 29918, 1272, 29892, 2643, 1125, 30004, 13, 1678, 9995, 3037, 839, 746, 263, 2643, 338, 4520, 515, 278, 341, 29984, 19988, 2545, 3946, 30004, 13, 1678, 9995, 30004, 13, 1678, 11261, 29918, 27117, 353, 2643, 29889, 13010, 29889, 5451, 11219, 1495, 30004, 13, 1678, 2943, 29918, 7328, 353, 11261, 29918, 27117, 29961, 29896, 29962, 30004, 13, 1678, 16248, 353, 11261, 29918, 27117, 29961, 29906, 29962, 30004, 13, 1678, 2643, 29918, 333, 353, 11261, 29918, 27117, 29961, 29941, 29962, 30004, 13, 30004, 13, 1678, 297, 9917, 29918, 13010, 353, 376, 18010, 12975, 718, 2943, 29918, 7328, 718, 5591, 262, 9917, 12975, 718, 2643, 29918, 333, 30004, 13, 30004, 13, 1678, 396, 10729, 4520, 515, 263, 23530, 2943, 30004, 13, 1678, 565, 16248, 1275, 376, 449, 9917, 1115, 30004, 13, 30004, 13, 4706, 396, 15076, 1250, 278, 6136, 4867, 363, 445, 23530, 2943, 30004, 13, 4706, 565, 2643, 29889, 23813, 29889, 13808, 580, 1275, 376, 657, 29918, 7924, 1115, 30004, 13, 9651, 1018, 29901, 30004, 13, 18884, 4867, 353, 1371, 414, 29889, 657, 29918, 4925, 29918, 7924, 29898, 3177, 29918, 7328, 8443, 13, 18884, 565, 4867, 1275, 6213, 29901, 30004, 13, 462, 1678, 2545, 3946, 29889, 23679, 29898, 262, 9917, 29918, 13010, 29892, 376, 1217, 29918, 7924, 613, 29871, 29900, 8443, 13, 462, 1678, 736, 30004, 13, 30004, 13, 18884, 2933, 353, 4852, 16195, 29908, 7924, 29918, 333, 16203, 29912, 29900, 1118, 5931, 19207, 16203, 29912, 29896, 1118, 5931, 16175, 29918, 2311, 16203, 29912, 29906, 930, 5038, 30004, 13, 462, 1678, 869, 4830, 29898, 710, 29898, 7924, 29961, 29900, 11724, 851, 29898, 7924, 29961, 29896, 11724, 851, 29898, 7924, 29961, 29906, 29962, 4961, 30004, 13, 18884, 2545, 3946, 29889, 23679, 29898, 262, 9917, 29918, 13010, 29892, 2933, 29892, 29871, 29900, 8443, 13, 9651, 5174, 29901, 2545, 3946, 29889, 23679, 29898, 262, 9917, 29918, 13010, 29892, 376, 2704, 613, 29871, 29900, 8443, 13, 30004, 13, 1678, 396, 13969, 4520, 515, 263, 23530, 2943, 30004, 13, 1678, 25342, 16248, 1275, 376, 276, 4011, 1115, 30004, 13, 4706, 1018, 29901, 30004, 13, 9651, 3461, 353, 4390, 29889, 18132, 29898, 4906, 29889, 23813, 29889, 13808, 3101, 30004, 13, 9651, 3461, 29918, 2230, 353, 12865, 29889, 710, 415, 603, 29898, 12276, 3366, 2230, 12436, 11860, 29979, 19222, 29885, 19222, 29881, 29911, 29995, 29950, 16664, 29924, 16664, 29903, 29999, 1159, 30004, 13, 4706, 6756, 13, 9651, 396, 3462, 304, 2566, 565, 3461, 931, 338, 2629, 931, 3464, 310, 6790, 4867, 30004, 13, 9651, 565, 1371, 414, 29889, 275, 29918, 2230, 29918, 262, 29918, 7924, 29898, 3177, 29918, 7328, 29892, 3461, 3366, 7924, 29918, 333, 12436, 3461, 29918, 2230, 1125, 30004, 13, 18884, 1018, 29901, 30004, 13, 462, 1678, 1371, 414, 29889, 7851, 29918, 12276, 29898, 3177, 29918, 7328, 29892, 3461, 8443, 13, 30004, 13, 462, 1678, 396, 1605, 3567, 738, 394, 279, 1516, 2729, 373, 278, 1819, 297, 445, 3461, 30004, 13, 462, 1678, 21200, 29918, 15916, 29918, 9990, 29889, 649, 3552, 3177, 29918, 7328, 29892, 3461, 876, 30004, 13, 462, 1678, 3244, 292, 29889, 4899, 29898, 5182, 29922, 5014, 29918, 284, 279, 1516, 467, 2962, 26471, 13, 18884, 5174, 282, 962, 952, 1519, 29889, 23573, 537, 2392, 408, 321, 29901, 30004, 13, 30004, 13, 462, 1678, 396, 13969, 363, 445, 2943, 411, 445, 931, 2307, 4864, 313, 13092, 1820, 30004, 13, 462, 1678, 396, 7276, 8465, 8443, 13, 462, 1678, 565, 321, 29889, 5085, 29961, 29900, 29962, 1275, 29871, 29896, 29900, 29953, 29906, 29901, 1209, 30004, 13, 462, 1678, 6756, 13, 462, 1678, 396, 16441, 322, 29914, 272, 2943, 947, 451, 1863, 313, 1079, 647, 1820, 7276, 8465, 8443, 13, 462, 1678, 25342, 321, 29889, 5085, 29961, 29900, 29962, 1275, 29871, 29896, 29946, 29945, 29906, 29901, 30004, 13, 462, 4706, 2545, 3946, 29889, 23679, 29898, 262, 9917, 29918, 13010, 29892, 376, 1217, 29918, 7924, 613, 29871, 29900, 8443, 13, 462, 4706, 736, 30004, 13, 462, 1678, 1683, 29901, 12020, 30004, 13, 30004, 13, 18884, 2545, 3946, 29889, 23679, 29898, 262, 9917, 29918, 13010, 29892, 376, 554, 613, 29871, 29900, 8443, 13, 9651, 1683, 29901, 2545, 3946, 29889, 23679, 29898, 262, 9917, 29918, 13010, 29892, 376, 1217, 29918, 7924, 613, 29871, 29900, 8443, 13, 4706, 5174, 29901, 2545, 3946, 29889, 23679, 29898, 262, 9917, 29918, 13010, 29892, 376, 2704, 613, 29871, 29900, 8443, 13, 30004, 13, 30004, 13, 361, 4770, 978, 1649, 1275, 376, 1649, 3396, 1649, 1115, 30004, 13, 1678, 1857, 29918, 3972, 353, 2897, 29889, 2084, 29889, 25721, 29898, 359, 29889, 2084, 29889, 6370, 2084, 22168, 1445, 1649, 876, 30004, 13, 30004, 13, 1678, 411, 1146, 9857, 29889, 27838, 9857, 2677, 29898, 22899, 29918, 12322, 29922, 3784, 29918, 3972, 1125, 30004, 13, 4706, 565, 451, 2295, 29889, 1359, 7295, 10876, 29889, 13322, 29898, 29896, 8443, 13, 30004, 13, 4706, 396, 5399, 565, 278, 2566, 338, 15579, 30004, 13, 4706, 1018, 29901, 30004, 13, 9651, 1371, 414, 29889, 2585, 29918, 9965, 26471, 13, 4706, 5174, 29901, 10876, 29889, 13322, 29898, 29896, 8443, 13, 30004, 13, 4706, 396, 6204, 322, 4511, 304, 278, 341, 29984, 19988, 2545, 3946, 30004, 13, 4706, 2545, 3946, 353, 286, 29939, 698, 29889, 4032, 26471, 13, 4706, 2545, 3946, 29889, 265, 29918, 6915, 353, 373, 29918, 6915, 30004, 13, 4706, 2545, 3946, 29889, 265, 29918, 4906, 353, 373, 29918, 4906, 30004, 13, 30004, 13, 4706, 1018, 29901, 30004, 13, 9651, 2545, 3946, 29889, 6915, 29898, 2917, 29889, 6729, 3946, 29918, 7328, 29892, 2295, 29889, 6729, 3946, 29918, 637, 8443, 13, 4706, 5174, 29901, 10876, 29889, 13322, 29898, 29896, 8443, 13, 30004, 13, 4706, 396, 9041, 2425, 304, 7150, 7191, 313, 3179, 793, 4469, 29899, 276, 6915, 292, 8443, 13, 4706, 2545, 3946, 29889, 7888, 29918, 1079, 369, 580, 2 ]
skrypt.py
kosiacz3q/isbh
0
80339
import sys def longest_common_substring(s1, s2): m = [[0] * (1 + len(s2)) for i in range(1 + len(s1))] longest, x_longest = 0, 0 for x in range(1, 1 + len(s1)): for y in range(1, 1 + len(s2)): if s1[x - 1] == s2[y - 1]: m[x][y] = m[x - 1][y - 1] + 1 if m[x][y] > longest: longest = m[x][y] x_longest = x else: m[x][y] = 0 return s1[x_longest - longest: x_longest] def levenshtein(s1, s2): if len(s1) < len(s2): return levenshtein(s2, s1) # len(s1) >= len(s2) if len(s2) == 0: return len(s1) previous_row = range(len(s2) + 1) for i, c1 in enumerate(s1): current_row = [i + 1] for j, c2 in enumerate(s2): insertions = previous_row[ j + 1] + 1 # j+1 instead of j since previous_row and current_row are one character longer deletions = current_row[j] + 1 # than s2 substitutions = previous_row[j] + (c1 != c2) current_row.append(min(insertions, deletions, substitutions)) previous_row = current_row return previous_row[-1] def av(list): wynik = result() temp = 0 for element in list: wynik.lcs += element.lcs wynik.leve += element.leve wynik.normalised_dist += element.normalised_dist wynik.normalised_lcs += element.normalised_lcs wynik.base += element.base wynik.length += element.length temp += 1 wynik.length /= temp wynik.lcs /= temp wynik.leve /= temp wynik.normalised_dist /= temp wynik.normalised_lcs /= temp wynik.base /= temp return wynik class result: lcs = 0 leve = 0 normalised_dist = 0 normalised_lcs = 0 base = 0 length = 0 def run(self, first, second): self.base = len(first) self.lcs = len(longest_common_substring(first, second)) self.leve = levenshtein(first, second) self.normalised_dist = 1.0 - self.leve / len(second) self.normalised_lcs = self.lcs/self.base self.length = len(second) def show(self): print("len: " + self.length.__str__()) print("LCS: " + self.lcs.__str__()) print("normalised LCS: " + self.normalised_lcs.__str__()) print("levenshtein distace: " + self.leve.__str__()) print("normalised distance: " + self.normalised_dist.__str__()) def make_test(): if len(sys.argv) > 1: f = open(sys.argv[1]) base = f.readline()[:-1] temp = [] for line in f: wyn = result() wyn.run(base, line[:-1]) temp.append(wyn) #wyn.show() res = av(temp) res.show() make_test()
[ 1, 1053, 10876, 13, 13, 13, 1753, 27217, 29918, 9435, 29918, 20363, 29898, 29879, 29896, 29892, 269, 29906, 1125, 13, 1678, 286, 353, 5519, 29900, 29962, 334, 313, 29896, 718, 7431, 29898, 29879, 29906, 876, 363, 474, 297, 3464, 29898, 29896, 718, 7431, 29898, 29879, 29896, 28166, 13, 1678, 27217, 29892, 921, 29918, 5426, 342, 353, 29871, 29900, 29892, 29871, 29900, 13, 1678, 363, 921, 297, 3464, 29898, 29896, 29892, 29871, 29896, 718, 7431, 29898, 29879, 29896, 22164, 13, 4706, 363, 343, 297, 3464, 29898, 29896, 29892, 29871, 29896, 718, 7431, 29898, 29879, 29906, 22164, 13, 9651, 565, 269, 29896, 29961, 29916, 448, 29871, 29896, 29962, 1275, 269, 29906, 29961, 29891, 448, 29871, 29896, 5387, 13, 18884, 286, 29961, 29916, 3816, 29891, 29962, 353, 286, 29961, 29916, 448, 29871, 29896, 3816, 29891, 448, 29871, 29896, 29962, 718, 29871, 29896, 13, 18884, 565, 286, 29961, 29916, 3816, 29891, 29962, 1405, 27217, 29901, 13, 462, 1678, 27217, 353, 286, 29961, 29916, 3816, 29891, 29962, 13, 462, 1678, 921, 29918, 5426, 342, 353, 921, 13, 9651, 1683, 29901, 13, 18884, 286, 29961, 29916, 3816, 29891, 29962, 353, 29871, 29900, 13, 1678, 736, 269, 29896, 29961, 29916, 29918, 5426, 342, 448, 27217, 29901, 921, 29918, 5426, 342, 29962, 13, 13, 13, 1753, 454, 9852, 29882, 371, 262, 29898, 29879, 29896, 29892, 269, 29906, 1125, 13, 1678, 565, 7431, 29898, 29879, 29896, 29897, 529, 7431, 29898, 29879, 29906, 1125, 13, 4706, 736, 454, 9852, 29882, 371, 262, 29898, 29879, 29906, 29892, 269, 29896, 29897, 13, 13, 1678, 396, 7431, 29898, 29879, 29896, 29897, 6736, 7431, 29898, 29879, 29906, 29897, 13, 1678, 565, 7431, 29898, 29879, 29906, 29897, 1275, 29871, 29900, 29901, 13, 4706, 736, 7431, 29898, 29879, 29896, 29897, 13, 13, 1678, 3517, 29918, 798, 353, 3464, 29898, 2435, 29898, 29879, 29906, 29897, 718, 29871, 29896, 29897, 13, 1678, 363, 474, 29892, 274, 29896, 297, 26985, 29898, 29879, 29896, 1125, 13, 4706, 1857, 29918, 798, 353, 518, 29875, 718, 29871, 29896, 29962, 13, 4706, 363, 432, 29892, 274, 29906, 297, 26985, 29898, 29879, 29906, 1125, 13, 9651, 4635, 1080, 353, 3517, 29918, 798, 29961, 13, 462, 632, 432, 718, 29871, 29896, 29962, 718, 29871, 29896, 29871, 396, 432, 29974, 29896, 2012, 310, 432, 1951, 3517, 29918, 798, 322, 1857, 29918, 798, 526, 697, 2931, 5520, 13, 9651, 7374, 1080, 353, 1857, 29918, 798, 29961, 29926, 29962, 718, 29871, 29896, 29871, 396, 1135, 269, 29906, 13, 9651, 23697, 29879, 353, 3517, 29918, 798, 29961, 29926, 29962, 718, 313, 29883, 29896, 2804, 274, 29906, 29897, 13, 9651, 1857, 29918, 798, 29889, 4397, 29898, 1195, 29898, 7851, 1080, 29892, 7374, 1080, 29892, 23697, 29879, 876, 13, 4706, 3517, 29918, 798, 353, 1857, 29918, 798, 13, 13, 1678, 736, 3517, 29918, 798, 14352, 29896, 29962, 13, 13, 13, 1753, 1029, 29898, 1761, 1125, 13, 1678, 18042, 638, 353, 1121, 580, 13, 1678, 5694, 353, 29871, 29900, 13, 1678, 363, 1543, 297, 1051, 29901, 13, 4706, 18042, 638, 29889, 29880, 2395, 4619, 1543, 29889, 29880, 2395, 13, 4706, 18042, 638, 29889, 280, 345, 4619, 1543, 29889, 280, 345, 13, 4706, 18042, 638, 29889, 8945, 3368, 29918, 5721, 4619, 1543, 29889, 8945, 3368, 29918, 5721, 13, 4706, 18042, 638, 29889, 8945, 3368, 29918, 29880, 2395, 4619, 1543, 29889, 8945, 3368, 29918, 29880, 2395, 13, 4706, 18042, 638, 29889, 3188, 4619, 1543, 29889, 3188, 13, 4706, 18042, 638, 29889, 2848, 4619, 1543, 29889, 2848, 13, 4706, 5694, 4619, 29871, 29896, 13, 13, 1678, 18042, 638, 29889, 2848, 847, 29922, 5694, 268, 13, 1678, 18042, 638, 29889, 29880, 2395, 847, 29922, 5694, 13, 1678, 18042, 638, 29889, 280, 345, 847, 29922, 5694, 13, 1678, 18042, 638, 29889, 8945, 3368, 29918, 5721, 847, 29922, 5694, 13, 1678, 18042, 638, 29889, 8945, 3368, 29918, 29880, 2395, 847, 29922, 5694, 13, 1678, 18042, 638, 29889, 3188, 847, 29922, 5694, 13, 1678, 736, 18042, 638, 13, 13, 13, 1990, 1121, 29901, 13, 1678, 301, 2395, 353, 29871, 29900, 13, 1678, 454, 345, 353, 29871, 29900, 13, 1678, 4226, 3368, 29918, 5721, 353, 29871, 29900, 13, 1678, 4226, 3368, 29918, 29880, 2395, 353, 29871, 29900, 13, 1678, 2967, 353, 29871, 29900, 13, 1678, 3309, 353, 29871, 29900, 13, 13, 1678, 822, 1065, 29898, 1311, 29892, 937, 29892, 1473, 1125, 13, 4706, 1583, 29889, 3188, 353, 7431, 29898, 4102, 29897, 13, 4706, 1583, 29889, 29880, 2395, 353, 7431, 29898, 5426, 342, 29918, 9435, 29918, 20363, 29898, 4102, 29892, 1473, 876, 13, 4706, 1583, 29889, 280, 345, 353, 454, 9852, 29882, 371, 262, 29898, 4102, 29892, 1473, 29897, 13, 4706, 1583, 29889, 8945, 3368, 29918, 5721, 353, 29871, 29896, 29889, 29900, 448, 1583, 29889, 280, 345, 847, 7431, 29898, 7496, 29897, 13, 4706, 1583, 29889, 8945, 3368, 29918, 29880, 2395, 353, 1583, 29889, 29880, 2395, 29914, 1311, 29889, 3188, 13, 4706, 1583, 29889, 2848, 353, 7431, 29898, 7496, 29897, 13, 13, 13, 1678, 822, 1510, 29898, 1311, 1125, 13, 4706, 1596, 703, 2435, 29901, 376, 718, 1583, 29889, 2848, 17255, 710, 1649, 3101, 13, 4706, 1596, 703, 29931, 9295, 29901, 376, 718, 1583, 29889, 29880, 2395, 17255, 710, 1649, 3101, 13, 4706, 1596, 703, 8945, 3368, 365, 9295, 29901, 376, 718, 1583, 29889, 8945, 3368, 29918, 29880, 2395, 17255, 710, 1649, 3101, 13, 4706, 1596, 703, 2608, 575, 29882, 371, 262, 1320, 815, 29901, 376, 718, 1583, 29889, 280, 345, 17255, 710, 1649, 3101, 13, 4706, 1596, 703, 8945, 3368, 5418, 29901, 376, 718, 1583, 29889, 8945, 3368, 29918, 5721, 17255, 710, 1649, 3101, 13, 13, 13, 1753, 1207, 29918, 1688, 7295, 13, 1678, 565, 7431, 29898, 9675, 29889, 19218, 29897, 1405, 29871, 29896, 29901, 13, 4706, 285, 353, 1722, 29898, 9675, 29889, 19218, 29961, 29896, 2314, 13, 4706, 2967, 353, 285, 29889, 949, 1220, 580, 7503, 29899, 29896, 29962, 13, 4706, 5694, 353, 5159, 13, 13, 4706, 363, 1196, 297, 285, 29901, 13, 9651, 18042, 353, 1121, 580, 13, 9651, 18042, 29889, 3389, 29898, 3188, 29892, 1196, 7503, 29899, 29896, 2314, 13, 9651, 5694, 29889, 4397, 29898, 29893, 948, 29897, 13, 9651, 396, 29893, 948, 29889, 4294, 580, 13, 13, 4706, 620, 353, 1029, 29898, 7382, 29897, 13, 13, 13, 4706, 620, 29889, 4294, 580, 13, 13, 13, 5675, 29918, 1688, 580, 13, 13, 13, 13, 13, 13, 13, 13, 2 ]
solutions/recommendation_system/quick_deploy/movie_recommender/milvus_tool/milvus_insert.py
NotRyan/bootcamp
6
76705
from pymilvus_orm import * # from milvus_tool.config import MILVUS_HOST, MILVUS_PORT, schema, index_param from milvus_tool.config import * class VecToMilvus(): def __init__(self): try: connections.connect(host=MILVUS_HOST, port=MILVUS_PORT) collection = None except Exception as e: print("Fail to connect Milvus:", e) def has_collec(self, collection_name): try: return utility.has_collection(collection_name) except Exception as e: print("Milvus has_collec error:", e) def set_collection(self, collection_name): try: if self.has_collec(collection_name): self.collection = Collection(name=collection_name) else: print('No collection {}'.format(collection_name)) except Exception as e: print('Milvus set collection error:', e) def creat_collection(self, collection_name): try: self.collection = Collection(name=collection_name, schema=schema) print("Create collection {} successfully".format(collection_name)) return collection except Exception as e: print("Milvus create collection error:", e) def create_index(self, collection_name): try: self.set_collection(collection_name) status = self.collection.create_index(field_name="embedding", index_params=index_param) print("Create index {} successfully".format(collection_name)) return status except Exception as e: print("Milvus create index error:", e) def has_partition(self, collection_name, partition_name): try: self.set_collection(collection_name) return self.collection.has_partition(partition_name) except Exception as e: print("Milvus has partition error:", e) def create_partition(self, collection_name, partition_name): try: self.set_collection(collection_name) status = self.collection.create_partition(partition_name) print('Create partition {} successfully'.format(partition_name)) return status except Exception as e: print("Milvus create partition error:", e) def drop(): try: self.set_collection(collection_name) collection.drop() print("Drop collection {}".format(collection_name)) except Exception as e: print("Milvus drop collection error", e) def insert(self, ids, vectors, collection_name, partition_name=None): try: if not self.has_collec(collection_name): self.creat_collection(collection_name) self.create_index(collection_name) print("collection info: {}".format(self.collection)) if (partition_name is not None) and (not self.has_partition(collection_name, partition_name)): self.create_partition(collection_name, partition_name) mr = self.collection.insert(data=[ids, vectors], partition_name=partition_name) utility.get_connection().flush([collection_name]) print("Insert {} entities, there are {} entities after insert data.".format(len(ids), self.collection.num_entities)) return mr except Exception as e: print("Milvus insert error:", e) if __name__ == '__main__': import random client = VecToMilvus() collection_name = 'test1' partition_name = 'partition_1' ids = [random.randint(0, 1000) for _ in range(100)] embeddings = [[random.random() for _ in range(dim)] for _ in range(100)] mr = client.insert(ids=ids, vectors=embeddings, collection_name=collection_name, partition_name=partition_name) print(mr) # print(ids)
[ 1, 515, 282, 962, 309, 29894, 375, 29918, 555, 1053, 334, 13, 13, 29937, 515, 2316, 29894, 375, 29918, 10154, 29889, 2917, 1053, 341, 6227, 29963, 3308, 29918, 20832, 29892, 341, 6227, 29963, 3308, 29918, 15082, 29892, 10938, 29892, 2380, 29918, 3207, 13, 13, 3166, 2316, 29894, 375, 29918, 10154, 29889, 2917, 1053, 334, 13, 13, 13, 1990, 26393, 1762, 29316, 29894, 375, 7295, 13, 1678, 822, 4770, 2344, 12035, 1311, 1125, 13, 4706, 1018, 29901, 13, 9651, 12368, 29889, 6915, 29898, 3069, 29922, 29924, 6227, 29963, 3308, 29918, 20832, 29892, 2011, 29922, 29924, 6227, 29963, 3308, 29918, 15082, 29897, 13, 9651, 4333, 353, 6213, 13, 4706, 5174, 8960, 408, 321, 29901, 13, 9651, 1596, 703, 16243, 304, 4511, 3833, 29894, 375, 29901, 613, 321, 29897, 13, 13, 1678, 822, 756, 29918, 1054, 280, 29883, 29898, 1311, 29892, 4333, 29918, 978, 1125, 13, 4706, 1018, 29901, 13, 9651, 736, 19725, 29889, 5349, 29918, 10855, 29898, 10855, 29918, 978, 29897, 13, 4706, 5174, 8960, 408, 321, 29901, 13, 9651, 1596, 703, 29316, 29894, 375, 756, 29918, 1054, 280, 29883, 1059, 29901, 613, 321, 29897, 13, 13, 1678, 822, 731, 29918, 10855, 29898, 1311, 29892, 4333, 29918, 978, 1125, 13, 4706, 1018, 29901, 13, 9651, 565, 1583, 29889, 5349, 29918, 1054, 280, 29883, 29898, 10855, 29918, 978, 1125, 13, 18884, 1583, 29889, 10855, 353, 14348, 29898, 978, 29922, 10855, 29918, 978, 29897, 13, 9651, 1683, 29901, 13, 18884, 1596, 877, 3782, 4333, 6571, 4286, 4830, 29898, 10855, 29918, 978, 876, 13, 4706, 5174, 8960, 408, 321, 29901, 13, 18884, 1596, 877, 29316, 29894, 375, 731, 4333, 1059, 29901, 742, 321, 29897, 13, 13, 1678, 822, 907, 271, 29918, 10855, 29898, 1311, 29892, 4333, 29918, 978, 1125, 13, 4706, 1018, 29901, 13, 9651, 1583, 29889, 10855, 353, 14348, 29898, 978, 29922, 10855, 29918, 978, 29892, 10938, 29922, 11010, 29897, 13, 9651, 1596, 703, 4391, 4333, 6571, 8472, 1642, 4830, 29898, 10855, 29918, 978, 876, 13, 9651, 736, 4333, 13, 4706, 5174, 8960, 408, 321, 29901, 13, 9651, 1596, 703, 29316, 29894, 375, 1653, 4333, 1059, 29901, 613, 321, 29897, 13, 13, 1678, 822, 1653, 29918, 2248, 29898, 1311, 29892, 4333, 29918, 978, 1125, 13, 4706, 1018, 29901, 13, 9651, 1583, 29889, 842, 29918, 10855, 29898, 10855, 29918, 978, 29897, 13, 9651, 4660, 353, 1583, 29889, 10855, 29889, 3258, 29918, 2248, 29898, 2671, 29918, 978, 543, 17987, 8497, 613, 2380, 29918, 7529, 29922, 2248, 29918, 3207, 29897, 13, 9651, 1596, 703, 4391, 2380, 6571, 8472, 1642, 4830, 29898, 10855, 29918, 978, 876, 13, 9651, 736, 4660, 13, 4706, 5174, 8960, 408, 321, 29901, 13, 9651, 1596, 703, 29316, 29894, 375, 1653, 2380, 1059, 29901, 613, 321, 29897, 13, 13, 1678, 822, 756, 29918, 16707, 29898, 1311, 29892, 4333, 29918, 978, 29892, 8877, 29918, 978, 1125, 13, 4706, 1018, 29901, 13, 9651, 1583, 29889, 842, 29918, 10855, 29898, 10855, 29918, 978, 29897, 13, 9651, 736, 1583, 29889, 10855, 29889, 5349, 29918, 16707, 29898, 16707, 29918, 978, 29897, 13, 4706, 5174, 8960, 408, 321, 29901, 13, 9651, 1596, 703, 29316, 29894, 375, 756, 8877, 1059, 29901, 613, 321, 29897, 13, 13, 1678, 822, 1653, 29918, 16707, 29898, 1311, 29892, 4333, 29918, 978, 29892, 8877, 29918, 978, 1125, 13, 4706, 1018, 29901, 13, 9651, 1583, 29889, 842, 29918, 10855, 29898, 10855, 29918, 978, 29897, 13, 9651, 4660, 353, 1583, 29889, 10855, 29889, 3258, 29918, 16707, 29898, 16707, 29918, 978, 29897, 13, 9651, 1596, 877, 4391, 8877, 6571, 8472, 4286, 4830, 29898, 16707, 29918, 978, 876, 13, 9651, 736, 4660, 13, 4706, 5174, 8960, 408, 321, 29901, 13, 9651, 1596, 703, 29316, 29894, 375, 1653, 8877, 1059, 29901, 613, 321, 29897, 13, 13, 1678, 822, 5768, 7295, 13, 4706, 1018, 29901, 13, 9651, 1583, 29889, 842, 29918, 10855, 29898, 10855, 29918, 978, 29897, 13, 9651, 4333, 29889, 8865, 580, 13, 9651, 1596, 703, 15063, 4333, 6571, 1642, 4830, 29898, 10855, 29918, 978, 876, 13, 4706, 5174, 8960, 408, 321, 29901, 13, 9651, 1596, 703, 29316, 29894, 375, 5768, 4333, 1059, 613, 321, 29897, 13, 13, 1678, 822, 4635, 29898, 1311, 29892, 18999, 29892, 12047, 29892, 4333, 29918, 978, 29892, 8877, 29918, 978, 29922, 8516, 1125, 13, 4706, 1018, 29901, 13, 9651, 565, 451, 1583, 29889, 5349, 29918, 1054, 280, 29883, 29898, 10855, 29918, 978, 1125, 13, 18884, 1583, 29889, 1037, 271, 29918, 10855, 29898, 10855, 29918, 978, 29897, 13, 18884, 1583, 29889, 3258, 29918, 2248, 29898, 10855, 29918, 978, 29897, 13, 18884, 1596, 703, 10855, 5235, 29901, 6571, 1642, 4830, 29898, 1311, 29889, 10855, 876, 13, 9651, 565, 313, 16707, 29918, 978, 338, 451, 6213, 29897, 322, 313, 1333, 1583, 29889, 5349, 29918, 16707, 29898, 10855, 29918, 978, 29892, 8877, 29918, 978, 22164, 13, 18884, 1583, 29889, 3258, 29918, 16707, 29898, 10855, 29918, 978, 29892, 8877, 29918, 978, 29897, 13, 9651, 286, 29878, 353, 1583, 29889, 10855, 29889, 7851, 29898, 1272, 11759, 4841, 29892, 12047, 1402, 8877, 29918, 978, 29922, 16707, 29918, 978, 29897, 13, 9651, 19725, 29889, 657, 29918, 9965, 2141, 23126, 4197, 10855, 29918, 978, 2314, 13, 9651, 1596, 703, 17491, 6571, 16212, 29892, 727, 526, 6571, 16212, 1156, 4635, 848, 1213, 29889, 4830, 29898, 2435, 29898, 4841, 511, 1583, 29889, 10855, 29889, 1949, 29918, 296, 1907, 876, 13, 9651, 736, 286, 29878, 13, 4706, 5174, 8960, 408, 321, 29901, 13, 9651, 1596, 703, 29316, 29894, 375, 4635, 1059, 29901, 613, 321, 29897, 13, 13, 13, 361, 4770, 978, 1649, 1275, 525, 1649, 3396, 1649, 2396, 13, 1678, 1053, 4036, 13, 13, 1678, 3132, 353, 26393, 1762, 29316, 29894, 375, 580, 13, 1678, 4333, 29918, 978, 353, 525, 1688, 29896, 29915, 13, 1678, 8877, 29918, 978, 353, 525, 16707, 29918, 29896, 29915, 13, 1678, 18999, 353, 518, 8172, 29889, 9502, 524, 29898, 29900, 29892, 29871, 29896, 29900, 29900, 29900, 29897, 363, 903, 297, 3464, 29898, 29896, 29900, 29900, 4638, 13, 1678, 8297, 29881, 886, 353, 5519, 8172, 29889, 8172, 580, 363, 903, 297, 3464, 29898, 6229, 4638, 363, 903, 297, 3464, 29898, 29896, 29900, 29900, 4638, 13, 1678, 286, 29878, 353, 3132, 29889, 7851, 29898, 4841, 29922, 4841, 29892, 12047, 29922, 17987, 29881, 886, 29892, 4333, 29918, 978, 29922, 10855, 29918, 978, 29892, 8877, 29918, 978, 29922, 16707, 29918, 978, 29897, 13, 1678, 1596, 29898, 29885, 29878, 29897, 13, 1678, 396, 1596, 29898, 4841, 29897, 13, 2 ]
snafu/installations.py
uranusjr/snafu
27
148414
import contextlib import itertools import os import pathlib import re import subprocess import attr @attr.s class Installation: path = attr.ib(convert=pathlib.Path) @property def python(self): return self.path.joinpath('python.exe') @property def scripts_dir(self): return self.path.joinpath('Scripts') @property def pip(self): return self.scripts_dir.joinpath('pip.exe') def get_version_info(self): output = subprocess.check_output( [str(self.python), '--version'], encoding='ascii', ).strip() match = re.match(r'^Python (\d+)\.(\d+)\.(\d+)$', output) return tuple(int(x) for x in match.groups()) def find_script(self, name): names = itertools.chain([name], [ '{}{}'.format(name, ext) for ext in os.environ['PATHEXT'].split(';') ]) for name in names: with contextlib.suppress(FileNotFoundError): return self.scripts_dir.joinpath(name).resolve(strict=True) raise FileNotFoundError(name)
[ 1, 1053, 3030, 1982, 13, 5215, 4256, 8504, 13, 5215, 2897, 13, 5215, 2224, 1982, 13, 5215, 337, 13, 5215, 1014, 5014, 13, 13, 5215, 12421, 13, 13, 13, 29992, 5552, 29889, 29879, 13, 1990, 16052, 362, 29901, 13, 13, 1678, 2224, 353, 12421, 29889, 747, 29898, 13441, 29922, 2084, 1982, 29889, 2605, 29897, 13, 13, 1678, 732, 6799, 13, 1678, 822, 3017, 29898, 1311, 1125, 13, 4706, 736, 1583, 29889, 2084, 29889, 7122, 2084, 877, 4691, 29889, 8097, 1495, 13, 13, 1678, 732, 6799, 13, 1678, 822, 12078, 29918, 3972, 29898, 1311, 1125, 13, 4706, 736, 1583, 29889, 2084, 29889, 7122, 2084, 877, 4081, 29879, 1495, 13, 13, 1678, 732, 6799, 13, 1678, 822, 8450, 29898, 1311, 1125, 13, 4706, 736, 1583, 29889, 16713, 29918, 3972, 29889, 7122, 2084, 877, 13096, 29889, 8097, 1495, 13, 13, 1678, 822, 679, 29918, 3259, 29918, 3888, 29898, 1311, 1125, 13, 4706, 1962, 353, 1014, 5014, 29889, 3198, 29918, 4905, 29898, 13, 9651, 518, 710, 29898, 1311, 29889, 4691, 511, 525, 489, 3259, 7464, 8025, 2433, 294, 18869, 742, 13, 4706, 13742, 17010, 580, 13, 4706, 1993, 353, 337, 29889, 4352, 29898, 29878, 29915, 29985, 11980, 3441, 29881, 29974, 2144, 29889, 1194, 29881, 29974, 2144, 29889, 1194, 29881, 29974, 1262, 742, 1962, 29897, 13, 4706, 736, 18761, 29898, 524, 29898, 29916, 29897, 363, 921, 297, 1993, 29889, 13155, 3101, 13, 13, 1678, 822, 1284, 29918, 2154, 29898, 1311, 29892, 1024, 1125, 13, 4706, 2983, 353, 4256, 8504, 29889, 14153, 4197, 978, 1402, 518, 13, 9651, 22372, 1157, 29913, 4286, 4830, 29898, 978, 29892, 1294, 29897, 13, 9651, 363, 1294, 297, 2897, 29889, 21813, 1839, 10145, 12194, 13359, 5451, 877, 29936, 1495, 13, 308, 2314, 13, 4706, 363, 1024, 297, 2983, 29901, 13, 9651, 411, 3030, 1982, 29889, 19303, 1253, 29898, 2283, 17413, 2392, 1125, 13, 18884, 736, 1583, 29889, 16713, 29918, 3972, 29889, 7122, 2084, 29898, 978, 467, 17863, 29898, 710, 919, 29922, 5574, 29897, 13, 4706, 12020, 3497, 17413, 2392, 29898, 978, 29897, 13, 2 ]
Dataset/Leetcode/valid/35/31.py
kkcookies99/UAST
0
32238
<gh_stars>0 class Solution: def XXX(self, nums: List[int], target: int) -> int: l, r = 0, len(nums)-1 # 找到第一个大于或等于target的位置 while l<r: m = (l+r) // 2 if nums[m] >= target: r = m else: l = m + 1 if nums[r] >= target: return r else: return r+1
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 770, 24380, 29901, 13, 1678, 822, 22615, 29898, 1311, 29892, 954, 29879, 29901, 2391, 29961, 524, 1402, 3646, 29901, 938, 29897, 1599, 938, 29901, 13, 4706, 301, 29892, 364, 353, 29871, 29900, 29892, 7431, 29898, 1949, 29879, 6817, 29896, 13, 13, 4706, 396, 29871, 233, 140, 193, 30780, 30622, 30287, 30502, 30257, 30909, 31391, 31184, 30909, 5182, 30210, 30956, 30669, 13, 4706, 1550, 301, 29966, 29878, 29901, 13, 9651, 286, 353, 313, 29880, 29974, 29878, 29897, 849, 29871, 29906, 13, 9651, 565, 954, 29879, 29961, 29885, 29962, 6736, 3646, 29901, 13, 18884, 364, 353, 286, 13, 9651, 1683, 29901, 13, 18884, 301, 353, 286, 718, 29871, 29896, 13, 13, 4706, 565, 954, 29879, 29961, 29878, 29962, 6736, 3646, 29901, 13, 9651, 736, 364, 13, 4706, 1683, 29901, 13, 9651, 736, 364, 29974, 29896, 13, 13, 2 ]
planex/cms_site/blocks/hero.py
octue/planex-cms
0
117946
from wagtail.core.blocks import CharBlock, StreamBlock, StructBlock, TextBlock, URLBlock from wagtail.embeds.blocks import EmbedBlock from wagtail.images.blocks import ImageChooserBlock from .base import SectionBlock class HeroSectionBlock(SectionBlock): heading = CharBlock( required=False, max_length=100, label="Hero Heading", help_text="Add the big hero text. Keep it snappy.", default="We are heroes", ) description = TextBlock( required=False, max_length=400, label="Hero Description", help_text="Add a couple of lines under the hero text", default="Here is a list of our Head Peeps. They look glorious here but are probably just normal, mortal humans.", ) image = ImageChooserBlock(required=False, label="Hero image") content = StreamBlock( [ ( "button", StructBlock( [ ("text", CharBlock(required=False, max_length=80, label="Label")), ("url", URLBlock(required=False, label="URL")), ], required=False, label="Call to action", help_text='A "call-to-action" button, like "Sign Up Now!"', ), ), ("video", EmbedBlock(required=False, label="Video")), ( "quote", StructBlock( [("text", TextBlock()), ("author", CharBlock(required=False))], required=False, label="Quote", help_text="An inspiring quotation, optionally attributed to someone", ), ), ], required=False, block_counts={"button": {"max_num": 1}, "video": {"max_num": 1}, "quote": {"max_num": 1}}, ) class Meta: icon = "placeholder" label = "Hero Section"
[ 1, 515, 281, 351, 18237, 29889, 3221, 29889, 1271, 29879, 1053, 2896, 7445, 29892, 13763, 7445, 29892, 28771, 7445, 29892, 3992, 7445, 29892, 3988, 7445, 13, 3166, 281, 351, 18237, 29889, 1590, 5779, 29889, 1271, 29879, 1053, 2812, 2580, 7445, 13, 3166, 281, 351, 18237, 29889, 8346, 29889, 1271, 29879, 1053, 7084, 15954, 22969, 7445, 13, 13, 3166, 869, 3188, 1053, 9779, 7445, 13, 13, 13, 1990, 22167, 13438, 7445, 29898, 13438, 7445, 1125, 13, 1678, 28435, 353, 2896, 7445, 29898, 13, 4706, 3734, 29922, 8824, 29892, 13, 4706, 4236, 29918, 2848, 29922, 29896, 29900, 29900, 29892, 13, 4706, 3858, 543, 29950, 1489, 940, 9382, 613, 13, 4706, 1371, 29918, 726, 543, 2528, 278, 4802, 13444, 1426, 29889, 19152, 372, 5807, 14862, 19602, 13, 4706, 2322, 543, 4806, 526, 13444, 267, 613, 13, 1678, 1723, 13, 1678, 6139, 353, 3992, 7445, 29898, 13, 4706, 3734, 29922, 8824, 29892, 13, 4706, 4236, 29918, 2848, 29922, 29946, 29900, 29900, 29892, 13, 4706, 3858, 543, 29950, 1489, 12953, 613, 13, 4706, 1371, 29918, 726, 543, 2528, 263, 7303, 310, 3454, 1090, 278, 13444, 1426, 613, 13, 4706, 2322, 543, 10605, 338, 263, 1051, 310, 1749, 12252, 349, 3905, 567, 29889, 2688, 1106, 3144, 23308, 1244, 541, 526, 3117, 925, 4226, 29892, 5758, 284, 25618, 19602, 13, 1678, 1723, 13, 1678, 1967, 353, 7084, 15954, 22969, 7445, 29898, 12403, 29922, 8824, 29892, 3858, 543, 29950, 1489, 1967, 1159, 13, 1678, 2793, 353, 13763, 7445, 29898, 13, 4706, 518, 13, 9651, 313, 13, 18884, 376, 3092, 613, 13, 18884, 28771, 7445, 29898, 13, 462, 1678, 518, 13, 462, 4706, 4852, 726, 613, 2896, 7445, 29898, 12403, 29922, 8824, 29892, 4236, 29918, 2848, 29922, 29947, 29900, 29892, 3858, 543, 4775, 1159, 511, 13, 462, 4706, 4852, 2271, 613, 3988, 7445, 29898, 12403, 29922, 8824, 29892, 3858, 543, 4219, 1159, 511, 13, 462, 1678, 21251, 13, 462, 1678, 3734, 29922, 8824, 29892, 13, 462, 1678, 3858, 543, 5594, 304, 3158, 613, 13, 462, 1678, 1371, 29918, 726, 2433, 29909, 376, 4804, 29899, 517, 29899, 2467, 29908, 2826, 29892, 763, 376, 10140, 5020, 2567, 3850, 742, 13, 18884, 10353, 13, 9651, 10353, 13, 9651, 4852, 9641, 613, 2812, 2580, 7445, 29898, 12403, 29922, 8824, 29892, 3858, 543, 15167, 1159, 511, 13, 9651, 313, 13, 18884, 376, 1396, 613, 13, 18884, 28771, 7445, 29898, 13, 462, 1678, 518, 703, 726, 613, 3992, 7445, 25739, 4852, 8921, 613, 2896, 7445, 29898, 12403, 29922, 8824, 876, 1402, 13, 462, 1678, 3734, 29922, 8824, 29892, 13, 462, 1678, 3858, 543, 2182, 866, 613, 13, 462, 1678, 1371, 29918, 726, 543, 2744, 8681, 8491, 13911, 362, 29892, 2984, 635, 29393, 304, 4856, 613, 13, 18884, 10353, 13, 9651, 10353, 13, 4706, 21251, 13, 4706, 3734, 29922, 8824, 29892, 13, 4706, 2908, 29918, 2798, 29879, 3790, 29908, 3092, 1115, 8853, 3317, 29918, 1949, 1115, 29871, 29896, 1118, 376, 9641, 1115, 8853, 3317, 29918, 1949, 1115, 29871, 29896, 1118, 376, 1396, 1115, 8853, 3317, 29918, 1949, 1115, 29871, 29896, 11656, 13, 1678, 1723, 13, 13, 1678, 770, 20553, 29901, 13, 4706, 9849, 353, 376, 27074, 29908, 13, 4706, 3858, 353, 376, 29950, 1489, 9779, 29908, 13, 2 ]
spotpuppy/rotation/rotation_sensor_base.py
JoshPattman/Spot-Puppy-Lib
1
158845
import numpy as np class sensor: def __init__(self, inverse_x=False, inverse_z=False): self.inverse_x = inverse_x self.inverse_z = inverse_z self.flip_x_z = False self.rotation = np.array([0, 0]) def get_angle(self): rot = np.copy(self.rotation) if self.flip_x_z: rot[0], rot[1] = rot[1], rot[0] if self.inverse_x: rot[0] = -rot[0] if self.inverse_z: rot[1] = -rot[1] return rot # Override update to add functionality def update(self): pass # Override update to add the ability to calibrate def calibrate(self): pass def get_json_params(self): return {"inverse_x": self.inverse_x, "inverse_z": self.inverse_z, "flip_x_z": self.flip_x_z } def set_json_params(self, d): self.inverse_x = d['inverse_x'] self.inverse_z = d['inverse_z'] self.flip_x_z = d['flip_x_z']
[ 1, 1053, 12655, 408, 7442, 13, 13, 13, 1990, 23530, 29901, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 16402, 29918, 29916, 29922, 8824, 29892, 16402, 29918, 29920, 29922, 8824, 1125, 13, 4706, 1583, 29889, 262, 3901, 29918, 29916, 353, 16402, 29918, 29916, 13, 4706, 1583, 29889, 262, 3901, 29918, 29920, 353, 16402, 29918, 29920, 13, 4706, 1583, 29889, 29888, 3466, 29918, 29916, 29918, 29920, 353, 7700, 13, 4706, 1583, 29889, 5450, 362, 353, 7442, 29889, 2378, 4197, 29900, 29892, 29871, 29900, 2314, 13, 13, 1678, 822, 679, 29918, 2521, 29898, 1311, 1125, 13, 4706, 5731, 353, 7442, 29889, 8552, 29898, 1311, 29889, 5450, 362, 29897, 13, 4706, 565, 1583, 29889, 29888, 3466, 29918, 29916, 29918, 29920, 29901, 13, 9651, 5731, 29961, 29900, 1402, 5731, 29961, 29896, 29962, 353, 5731, 29961, 29896, 1402, 5731, 29961, 29900, 29962, 13, 4706, 565, 1583, 29889, 262, 3901, 29918, 29916, 29901, 13, 9651, 5731, 29961, 29900, 29962, 353, 448, 5450, 29961, 29900, 29962, 13, 4706, 565, 1583, 29889, 262, 3901, 29918, 29920, 29901, 13, 9651, 5731, 29961, 29896, 29962, 353, 448, 5450, 29961, 29896, 29962, 13, 4706, 736, 5731, 13, 13, 1678, 396, 6811, 2426, 2767, 304, 788, 9863, 13, 1678, 822, 2767, 29898, 1311, 1125, 13, 4706, 1209, 13, 13, 1678, 396, 6811, 2426, 2767, 304, 788, 278, 11509, 304, 1208, 4626, 403, 13, 1678, 822, 1208, 4626, 403, 29898, 1311, 1125, 13, 4706, 1209, 13, 13, 1678, 822, 679, 29918, 3126, 29918, 7529, 29898, 1311, 1125, 13, 4706, 736, 8853, 262, 3901, 29918, 29916, 1115, 1583, 29889, 262, 3901, 29918, 29916, 29892, 13, 18884, 376, 262, 3901, 29918, 29920, 1115, 1583, 29889, 262, 3901, 29918, 29920, 29892, 13, 18884, 376, 29888, 3466, 29918, 29916, 29918, 29920, 1115, 1583, 29889, 29888, 3466, 29918, 29916, 29918, 29920, 13, 18884, 500, 13, 13, 1678, 822, 731, 29918, 3126, 29918, 7529, 29898, 1311, 29892, 270, 1125, 13, 4706, 1583, 29889, 262, 3901, 29918, 29916, 353, 270, 1839, 262, 3901, 29918, 29916, 2033, 13, 4706, 1583, 29889, 262, 3901, 29918, 29920, 353, 270, 1839, 262, 3901, 29918, 29920, 2033, 13, 4706, 1583, 29889, 29888, 3466, 29918, 29916, 29918, 29920, 353, 270, 1839, 29888, 3466, 29918, 29916, 29918, 29920, 2033, 13, 2 ]
vsm/extensions/corpusbuilders/__init__.py
inpho/vsm
31
51260
""" [Documentation about the corpusbuilders extension] """ from __future__ import absolute_import from .corpusbuilders import *
[ 1, 9995, 13, 29961, 6268, 362, 1048, 278, 1034, 13364, 4282, 414, 6081, 29962, 13, 15945, 29908, 13, 3166, 4770, 29888, 9130, 1649, 1053, 8380, 29918, 5215, 13, 13, 3166, 869, 2616, 13364, 4282, 414, 1053, 334, 13, 2 ]
christmasflix/tests.py
jbettenh/last_christmas
0
31909
<reponame>jbettenh/last_christmas from django.test import TestCase from django.shortcuts import reverse from .models import MovieList from christmasflix import omdbmovies class MovieListIndexViewTests(TestCase): def test_no_lists(self): response = self.client.get(reverse('christmasflix:index')) self.assertEqual(response.status_code, 200) self.assertContains(response, "No lists are available.") self.assertQuerysetEqual(response.context['movie_lists'], []) def test_one_movie_list(self): mylist1 = MovieList.objects.create(name="mylist1") response = self.client.get(reverse('christmasflix:index')) self.assertQuerysetEqual(response.context['movie_lists'], [mylist1]) def test_two_movie_lists(self): mylist1 = MovieList.objects.create(name="mylist1") mylist2 = MovieList.objects.create(name="mylist2") response = self.client.get(reverse('christmasflix:index')) self.assertQuerysetEqual(response.context['movie_lists'], [mylist1, mylist2], ordered=False) class IndexViewTest(TestCase): def test_index_uses_template(self): response = self.client.get(f'/christmasflix/') self.assertTemplateUsed(response, 'christmasflix/index.html') class DetailViewTest(TestCase): def test_list_uses_template(self): my_list = MovieList.objects.create() response = self.client.get(f'/christmasflix/{my_list.id}/') self.assertTemplateUsed(response, 'christmasflix/movie_list.html') class MovieViewTest(TestCase): def test_movies_uses_template(self): response = self.client.get(f'/christmasflix/movies/') self.assertTemplateUsed(response, 'christmasflix/movies.html') class MovieResultsTest(TestCase): def test_no_movie_found(self): # asdasdfc omdbmovies.search_movie("Die Hard") self.assertRaises(KeyError)
[ 1, 529, 276, 1112, 420, 29958, 29926, 6878, 841, 29882, 29914, 4230, 29918, 305, 2021, 8247, 13, 3166, 9557, 29889, 1688, 1053, 4321, 8259, 13, 3166, 9557, 29889, 12759, 7582, 29879, 1053, 11837, 13, 13, 3166, 869, 9794, 1053, 7871, 1293, 13, 3166, 25542, 8247, 20157, 29916, 1053, 2703, 2585, 13529, 583, 13, 13, 13, 1990, 7871, 1293, 3220, 1043, 24376, 29898, 3057, 8259, 1125, 13, 1678, 822, 1243, 29918, 1217, 29918, 21513, 29898, 1311, 1125, 13, 4706, 2933, 353, 1583, 29889, 4645, 29889, 657, 29898, 24244, 877, 305, 2021, 8247, 20157, 29916, 29901, 2248, 8785, 13, 4706, 1583, 29889, 9294, 9843, 29898, 5327, 29889, 4882, 29918, 401, 29892, 29871, 29906, 29900, 29900, 29897, 13, 4706, 1583, 29889, 9294, 21409, 29898, 5327, 29892, 376, 3782, 8857, 526, 3625, 23157, 13, 4706, 1583, 29889, 9294, 3010, 842, 9843, 29898, 5327, 29889, 4703, 1839, 27362, 29918, 21513, 7464, 518, 2314, 13, 13, 1678, 822, 1243, 29918, 650, 29918, 27362, 29918, 1761, 29898, 1311, 1125, 13, 4706, 590, 1761, 29896, 353, 7871, 1293, 29889, 12650, 29889, 3258, 29898, 978, 543, 1357, 1761, 29896, 1159, 13, 4706, 2933, 353, 1583, 29889, 4645, 29889, 657, 29898, 24244, 877, 305, 2021, 8247, 20157, 29916, 29901, 2248, 8785, 13, 13, 4706, 1583, 29889, 9294, 3010, 842, 9843, 29898, 5327, 29889, 4703, 1839, 27362, 29918, 21513, 7464, 518, 1357, 1761, 29896, 2314, 13, 13, 1678, 822, 1243, 29918, 10184, 29918, 27362, 29918, 21513, 29898, 1311, 1125, 13, 4706, 590, 1761, 29896, 353, 7871, 1293, 29889, 12650, 29889, 3258, 29898, 978, 543, 1357, 1761, 29896, 1159, 13, 4706, 590, 1761, 29906, 353, 7871, 1293, 29889, 12650, 29889, 3258, 29898, 978, 543, 1357, 1761, 29906, 1159, 13, 4706, 2933, 353, 1583, 29889, 4645, 29889, 657, 29898, 24244, 877, 305, 2021, 8247, 20157, 29916, 29901, 2248, 8785, 13, 13, 4706, 1583, 29889, 9294, 3010, 842, 9843, 29898, 5327, 29889, 4703, 1839, 27362, 29918, 21513, 7464, 518, 1357, 1761, 29896, 29892, 590, 1761, 29906, 1402, 10372, 29922, 8824, 29897, 13, 13, 13, 1990, 11374, 1043, 3057, 29898, 3057, 8259, 1125, 13, 1678, 822, 1243, 29918, 2248, 29918, 6394, 29918, 6886, 29898, 1311, 1125, 13, 4706, 2933, 353, 1583, 29889, 4645, 29889, 657, 29898, 29888, 29915, 29914, 305, 2021, 8247, 20157, 29916, 29914, 1495, 13, 13, 4706, 1583, 29889, 9294, 6733, 29965, 8485, 29898, 5327, 29892, 525, 305, 2021, 8247, 20157, 29916, 29914, 2248, 29889, 1420, 1495, 13, 13, 13, 1990, 5953, 737, 1043, 3057, 29898, 3057, 8259, 1125, 13, 1678, 822, 1243, 29918, 1761, 29918, 6394, 29918, 6886, 29898, 1311, 1125, 13, 4706, 590, 29918, 1761, 353, 7871, 1293, 29889, 12650, 29889, 3258, 580, 13, 4706, 2933, 353, 1583, 29889, 4645, 29889, 657, 29898, 29888, 29915, 29914, 305, 2021, 8247, 20157, 29916, 19248, 1357, 29918, 1761, 29889, 333, 6822, 1495, 13, 13, 4706, 1583, 29889, 9294, 6733, 29965, 8485, 29898, 5327, 29892, 525, 305, 2021, 8247, 20157, 29916, 29914, 27362, 29918, 1761, 29889, 1420, 1495, 13, 13, 13, 1990, 7871, 1043, 3057, 29898, 3057, 8259, 1125, 13, 1678, 822, 1243, 29918, 13529, 583, 29918, 6394, 29918, 6886, 29898, 1311, 1125, 13, 4706, 2933, 353, 1583, 29889, 4645, 29889, 657, 29898, 29888, 29915, 29914, 305, 2021, 8247, 20157, 29916, 29914, 13529, 583, 29914, 1495, 13, 13, 4706, 1583, 29889, 9294, 6733, 29965, 8485, 29898, 5327, 29892, 525, 305, 2021, 8247, 20157, 29916, 29914, 13529, 583, 29889, 1420, 1495, 13, 13, 13, 1990, 7871, 12191, 3057, 29898, 3057, 8259, 1125, 13, 1678, 822, 1243, 29918, 1217, 29918, 27362, 29918, 11940, 29898, 1311, 1125, 13, 4706, 396, 408, 17370, 2176, 29883, 13, 4706, 2703, 2585, 13529, 583, 29889, 4478, 29918, 27362, 703, 16334, 10999, 1159, 13, 4706, 1583, 29889, 9294, 29934, 1759, 267, 29898, 2558, 2392, 29897, 2 ]
joblib/SubprocessFunctionCaller.py
Topaz1618/Plasticine
0
116069
import time import multiprocessing class SubprocessFunctionCaller(object): class CliFunction(object): def __init__(self, s2c, c2s, lock): self.s2c = s2c self.c2s = c2s self.lock = lock def __call__(self, *args, **kwargs): self.lock.acquire() self.c2s.put ( {'args':args, 'kwargs':kwargs} ) while True: if not self.s2c.empty(): obj = self.s2c.get() self.lock.release() return obj time.sleep(0.005) class HostProcessor(object): def __init__(self, s2c, c2s, func): self.s2c = s2c self.c2s = c2s self.func = func def process_messages(self): while not self.c2s.empty(): obj = self.c2s.get() result = self.func ( *obj['args'], **obj['kwargs'] ) self.s2c.put (result) @staticmethod def make_pair( func ): s2c = multiprocessing.Queue() c2s = multiprocessing.Queue() lock = multiprocessing.Lock() host_processor = SubprocessFunctionCaller.HostProcessor (s2c, c2s, func) cli_func = SubprocessFunctionCaller.CliFunction (s2c, c2s, lock) return host_processor, cli_func
[ 1, 1053, 931, 13, 5215, 6674, 307, 985, 292, 13, 13, 1990, 3323, 5014, 6678, 5594, 261, 29898, 3318, 1125, 13, 1678, 770, 315, 492, 6678, 29898, 3318, 1125, 13, 4706, 822, 4770, 2344, 12035, 1311, 29892, 269, 29906, 29883, 29892, 274, 29906, 29879, 29892, 7714, 1125, 13, 9651, 1583, 29889, 29879, 29906, 29883, 353, 269, 29906, 29883, 13, 9651, 1583, 29889, 29883, 29906, 29879, 353, 274, 29906, 29879, 13, 9651, 1583, 29889, 908, 353, 7714, 13, 13, 4706, 822, 4770, 4804, 12035, 1311, 29892, 334, 5085, 29892, 3579, 19290, 1125, 13, 9651, 1583, 29889, 908, 29889, 562, 1548, 580, 13, 9651, 1583, 29889, 29883, 29906, 29879, 29889, 649, 313, 11117, 5085, 2396, 5085, 29892, 525, 19290, 2396, 19290, 29913, 1723, 13, 9651, 1550, 5852, 29901, 13, 18884, 565, 451, 1583, 29889, 29879, 29906, 29883, 29889, 6310, 7295, 13, 462, 1678, 5446, 353, 1583, 29889, 29879, 29906, 29883, 29889, 657, 580, 13, 462, 1678, 1583, 29889, 908, 29889, 14096, 580, 13, 462, 1678, 736, 5446, 13, 18884, 931, 29889, 17059, 29898, 29900, 29889, 29900, 29900, 29945, 29897, 13, 13, 1678, 770, 16956, 18689, 29898, 3318, 1125, 13, 4706, 822, 4770, 2344, 12035, 1311, 29892, 269, 29906, 29883, 29892, 274, 29906, 29879, 29892, 3653, 1125, 13, 9651, 1583, 29889, 29879, 29906, 29883, 353, 269, 29906, 29883, 13, 9651, 1583, 29889, 29883, 29906, 29879, 353, 274, 29906, 29879, 13, 9651, 1583, 29889, 9891, 353, 3653, 13, 13, 4706, 822, 1889, 29918, 19158, 29898, 1311, 1125, 13, 9651, 1550, 451, 1583, 29889, 29883, 29906, 29879, 29889, 6310, 7295, 13, 18884, 5446, 353, 1583, 29889, 29883, 29906, 29879, 29889, 657, 580, 13, 18884, 1121, 353, 1583, 29889, 9891, 313, 334, 5415, 1839, 5085, 7464, 3579, 5415, 1839, 19290, 2033, 1723, 13, 18884, 1583, 29889, 29879, 29906, 29883, 29889, 649, 313, 2914, 29897, 13, 13, 1678, 732, 7959, 5696, 13, 1678, 822, 1207, 29918, 18784, 29898, 3653, 29871, 1125, 13, 4706, 269, 29906, 29883, 353, 6674, 307, 985, 292, 29889, 10620, 580, 13, 4706, 274, 29906, 29879, 353, 6674, 307, 985, 292, 29889, 10620, 580, 13, 4706, 7714, 353, 6674, 307, 985, 292, 29889, 16542, 580, 13, 13, 4706, 3495, 29918, 26482, 353, 3323, 5014, 6678, 5594, 261, 29889, 8514, 18689, 313, 29879, 29906, 29883, 29892, 274, 29906, 29879, 29892, 3653, 29897, 13, 4706, 9335, 29918, 9891, 353, 3323, 5014, 6678, 5594, 261, 29889, 29907, 492, 6678, 313, 29879, 29906, 29883, 29892, 274, 29906, 29879, 29892, 7714, 29897, 13, 13, 4706, 736, 3495, 29918, 26482, 29892, 9335, 29918, 9891, 13, 2 ]
storm_control/test/test_buffered_1.py
shiwei23/STORM6
47
59491
<gh_stars>10-100 #!/usr/bin/env python """ A test of the BufferedFunctionality class. """ import sys import time from PyQt5 import QtCore, QtWidgets import storm_control.sc_hardware.baseClasses.hardwareModule as hardwareModule class TBWidgetBase(QtWidgets.QWidget): processed = QtCore.pyqtSignal(str) def __init__(self, **kwds): super().__init__(**kwds) self.bf = hardwareModule.BufferedFunctionality(device_mutex = QtCore.QMutex()) self.timer = QtCore.QTimer() self.timer.setInterval(10) self.timer.timeout.connect(self.runTest) self.timer.setSingleShot(True) self.timer.start() self.processed.connect(self.handleProcessed) def handleProcessed(self, string): pass def runTest(self): pass class TBWidget1(TBWidgetBase): """ Check for correct execution order. """ def __init__(self, **kwds): super().__init__(**kwds) self.strings = [] def editString(self, string): time.sleep(0.2) string = "0" + string return string def handleProcessed(self, string): self.strings.append(string) if "end" in string: try: assert(self.strings == ["0111", "0212", "0end"]) except AssertionError as exc: print(self.strings, "is not expected") raise exc self.bf.wait() self.close() def runTest(self): for string in ["111", "222", "333", "444", "555", "end"]: self.bf.maybeRun(task = self.editString, args = [string], ret_signal = self.processed) if(string == "222"): self.bf.mustRun(task = self.editString, args = ["212"], ret_signal = self.processed) class TBWidget2(TBWidgetBase): """ Check that kill timer works. """ def __init__(self, **kwds): super().__init__(**kwds) self.bf.kill_timer.setInterval(200) def handleProcessed(self, string): assert False def longWait(self): time.sleep(2.0) def runTest(self): self.bf.mustRun(task = self.longWait, args = [], ret_signal = self.processed) class TBWidget3(TBWidgetBase): """ Check that kill timer reset works. """ def __init__(self, **kwds): super().__init__(**kwds) self.max_jobs = 20 self.bf.kill_timer.setInterval(500) def handleProcessed(self, string): print("processed", string) if (string == str(self.max_jobs - 1)): self.bf.wait() self.close() def shortWait(self, job_id): time.sleep(0.1) return job_id def runTest(self): for i in range(self.max_jobs): self.bf.mustRun(task = self.shortWait, args = [str(i)], ret_signal = self.processed) def test_buffered_1(): app = QtWidgets.QApplication(sys.argv) tb1 = TBWidget1() app.exec_() app = None def buffered_2(): app = QtWidgets.QApplication(sys.argv) tb1 = TBWidget2() app.exec_() app = None def test_buffered_3(): app = QtWidgets.QApplication(sys.argv) tb1 = TBWidget3() app.exec_() app = None if (__name__ == "__main__"): test_buffered_1() #buffered_2() test_buffered_3()
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29900, 29899, 29896, 29900, 29900, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 13, 15945, 29908, 13, 29909, 1243, 310, 278, 22217, 6678, 2877, 770, 29889, 13, 15945, 29908, 13, 5215, 10876, 13, 5215, 931, 13, 13, 3166, 10772, 17303, 29945, 1053, 14705, 9203, 29892, 14705, 8801, 29879, 13, 13, 5215, 14280, 29918, 6451, 29889, 1557, 29918, 6800, 2519, 29889, 3188, 27403, 29889, 6800, 2519, 7355, 408, 12837, 7355, 13, 13, 13, 1990, 323, 29933, 8801, 5160, 29898, 17303, 8801, 29879, 29889, 29984, 8801, 1125, 13, 1678, 19356, 353, 14705, 9203, 29889, 2272, 17915, 10140, 284, 29898, 710, 29897, 13, 268, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 3579, 11022, 6289, 1125, 13, 4706, 2428, 2141, 1649, 2344, 12035, 1068, 11022, 6289, 29897, 13, 4706, 1583, 29889, 1635, 353, 12837, 7355, 29889, 7701, 287, 6678, 2877, 29898, 10141, 29918, 6149, 735, 353, 14705, 9203, 29889, 29984, 29924, 329, 735, 3101, 13, 308, 13, 4706, 1583, 29889, 20404, 353, 14705, 9203, 29889, 29984, 14745, 580, 13, 4706, 1583, 29889, 20404, 29889, 842, 12506, 29898, 29896, 29900, 29897, 13, 4706, 1583, 29889, 20404, 29889, 15619, 29889, 6915, 29898, 1311, 29889, 3389, 3057, 29897, 13, 4706, 1583, 29889, 20404, 29889, 842, 15771, 2713, 327, 29898, 5574, 29897, 13, 4706, 1583, 29889, 20404, 29889, 2962, 580, 13, 13, 4706, 1583, 29889, 5014, 287, 29889, 6915, 29898, 1311, 29889, 8411, 7032, 287, 29897, 13, 13, 1678, 822, 4386, 7032, 287, 29898, 1311, 29892, 1347, 1125, 13, 4706, 1209, 13, 13, 1678, 822, 1065, 3057, 29898, 1311, 1125, 13, 4706, 1209, 13, 268, 13, 632, 13, 1990, 323, 29933, 8801, 29896, 29898, 24895, 8801, 5160, 1125, 13, 1678, 9995, 13, 1678, 5399, 363, 1959, 8225, 1797, 29889, 13, 1678, 9995, 268, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 3579, 11022, 6289, 1125, 13, 4706, 2428, 2141, 1649, 2344, 12035, 1068, 11022, 6289, 29897, 13, 4706, 1583, 29889, 19651, 353, 5159, 13, 13, 1678, 822, 3863, 1231, 29898, 1311, 29892, 1347, 1125, 13, 4706, 931, 29889, 17059, 29898, 29900, 29889, 29906, 29897, 13, 4706, 1347, 353, 376, 29900, 29908, 718, 1347, 13, 4706, 736, 1347, 13, 268, 13, 1678, 822, 4386, 7032, 287, 29898, 1311, 29892, 1347, 1125, 13, 4706, 1583, 29889, 19651, 29889, 4397, 29898, 1807, 29897, 13, 4706, 565, 376, 355, 29908, 297, 1347, 29901, 13, 9651, 1018, 29901, 13, 18884, 4974, 29898, 1311, 29889, 19651, 1275, 6796, 29900, 29896, 29896, 29896, 613, 376, 29900, 29906, 29896, 29906, 613, 376, 29900, 355, 20068, 13, 9651, 5174, 16499, 291, 2392, 408, 5566, 29901, 13, 18884, 1596, 29898, 1311, 29889, 19651, 29892, 376, 275, 451, 3806, 1159, 13, 18884, 12020, 5566, 13, 9651, 1583, 29889, 1635, 29889, 10685, 580, 13, 9651, 1583, 29889, 5358, 580, 13, 308, 13, 1678, 822, 1065, 3057, 29898, 1311, 1125, 13, 4706, 363, 1347, 297, 6796, 29896, 29896, 29896, 613, 376, 29906, 29906, 29906, 613, 376, 29941, 29941, 29941, 613, 376, 29946, 29946, 29946, 613, 376, 29945, 29945, 29945, 613, 376, 355, 3108, 29901, 13, 9651, 1583, 29889, 1635, 29889, 26026, 6558, 29898, 7662, 353, 1583, 29889, 5628, 1231, 29892, 13, 462, 632, 6389, 353, 518, 1807, 1402, 13, 462, 632, 3240, 29918, 25436, 353, 1583, 29889, 5014, 287, 29897, 13, 9651, 565, 29898, 1807, 1275, 376, 29906, 29906, 29906, 29908, 1125, 13, 18884, 1583, 29889, 1635, 29889, 21969, 6558, 29898, 7662, 353, 1583, 29889, 5628, 1231, 29892, 13, 462, 18884, 6389, 353, 6796, 29906, 29896, 29906, 12436, 13, 462, 18884, 3240, 29918, 25436, 353, 1583, 29889, 5014, 287, 29897, 13, 13, 13, 1990, 323, 29933, 8801, 29906, 29898, 24895, 8801, 5160, 1125, 13, 1678, 9995, 13, 1678, 5399, 393, 12088, 12237, 1736, 29889, 13, 1678, 9995, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 3579, 11022, 6289, 1125, 13, 4706, 2428, 2141, 1649, 2344, 12035, 1068, 11022, 6289, 29897, 13, 4706, 1583, 29889, 1635, 29889, 21174, 29918, 20404, 29889, 842, 12506, 29898, 29906, 29900, 29900, 29897, 13, 13, 1678, 822, 4386, 7032, 287, 29898, 1311, 29892, 1347, 1125, 13, 4706, 4974, 7700, 13, 308, 13, 1678, 822, 1472, 15716, 29898, 1311, 1125, 13, 4706, 931, 29889, 17059, 29898, 29906, 29889, 29900, 29897, 13, 13, 1678, 822, 1065, 3057, 29898, 1311, 1125, 13, 4706, 1583, 29889, 1635, 29889, 21969, 6558, 29898, 7662, 353, 1583, 29889, 5426, 15716, 29892, 13, 462, 4706, 6389, 353, 19997, 13, 462, 4706, 3240, 29918, 25436, 353, 1583, 29889, 5014, 287, 29897, 13, 13, 13, 1990, 323, 29933, 8801, 29941, 29898, 24895, 8801, 5160, 1125, 13, 1678, 9995, 13, 1678, 5399, 393, 12088, 12237, 10092, 1736, 29889, 13, 1678, 9995, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 3579, 11022, 6289, 1125, 13, 4706, 2428, 2141, 1649, 2344, 12035, 1068, 11022, 6289, 29897, 13, 4706, 1583, 29889, 3317, 29918, 9057, 29879, 353, 29871, 29906, 29900, 13, 4706, 1583, 29889, 1635, 29889, 21174, 29918, 20404, 29889, 842, 12506, 29898, 29945, 29900, 29900, 29897, 13, 13, 1678, 822, 4386, 7032, 287, 29898, 1311, 29892, 1347, 1125, 13, 4706, 1596, 703, 5014, 287, 613, 1347, 29897, 13, 4706, 565, 313, 1807, 1275, 851, 29898, 1311, 29889, 3317, 29918, 9057, 29879, 448, 29871, 29896, 22164, 13, 9651, 1583, 29889, 1635, 29889, 10685, 580, 13, 9651, 1583, 29889, 5358, 580, 13, 308, 13, 1678, 822, 3273, 15716, 29898, 1311, 29892, 4982, 29918, 333, 1125, 13, 4706, 931, 29889, 17059, 29898, 29900, 29889, 29896, 29897, 13, 4706, 736, 4982, 29918, 333, 13, 13, 1678, 822, 1065, 3057, 29898, 1311, 1125, 13, 4706, 363, 474, 297, 3464, 29898, 1311, 29889, 3317, 29918, 9057, 29879, 1125, 13, 9651, 1583, 29889, 1635, 29889, 21969, 6558, 29898, 7662, 353, 1583, 29889, 12759, 15716, 29892, 13, 462, 9651, 6389, 353, 518, 710, 29898, 29875, 29897, 1402, 13, 462, 9651, 3240, 29918, 25436, 353, 1583, 29889, 5014, 287, 29897, 308, 13, 462, 13, 13, 1753, 1243, 29918, 9040, 287, 29918, 29896, 7295, 13, 1678, 623, 353, 14705, 8801, 29879, 29889, 29984, 4873, 29898, 9675, 29889, 19218, 29897, 13, 1678, 260, 29890, 29896, 353, 323, 29933, 8801, 29896, 580, 13, 1678, 623, 29889, 4258, 29918, 580, 13, 1678, 623, 353, 6213, 13, 13, 1753, 6835, 287, 29918, 29906, 7295, 13, 1678, 623, 353, 14705, 8801, 29879, 29889, 29984, 4873, 29898, 9675, 29889, 19218, 29897, 13, 1678, 260, 29890, 29896, 353, 323, 29933, 8801, 29906, 580, 13, 1678, 623, 29889, 4258, 29918, 580, 13, 1678, 623, 353, 6213, 13, 13, 1753, 1243, 29918, 9040, 287, 29918, 29941, 7295, 13, 1678, 623, 353, 14705, 8801, 29879, 29889, 29984, 4873, 29898, 9675, 29889, 19218, 29897, 13, 1678, 260, 29890, 29896, 353, 323, 29933, 8801, 29941, 580, 13, 1678, 623, 29889, 4258, 29918, 580, 13, 1678, 623, 353, 6213, 268, 13, 268, 13, 361, 313, 1649, 978, 1649, 1275, 376, 1649, 3396, 1649, 29908, 1125, 13, 1678, 1243, 29918, 9040, 287, 29918, 29896, 580, 13, 1678, 396, 9040, 287, 29918, 29906, 580, 13, 1678, 1243, 29918, 9040, 287, 29918, 29941, 580, 13, 2 ]
abandonedio/urls.py
Kunstmord/abandoned
0
175223
<reponame>Kunstmord/abandoned import abandoned.views from django.conf.urls import patterns, include, url from django.contrib import admin from rest_framework import routers router = routers.DefaultRouter() router.register(r'tags', abandoned.views.TagViewSet) router.register(r'authors', abandoned.views.AuthorViewSet) router.register(r'reasons', abandoned.views.ReasonViewSet) router.register(r'projects', abandoned.views.ProjectViewSet) router.register(r'languages', abandoned.views.LanguageViewSet) urlpatterns = patterns('', url(r'^$', abandoned.views.main_page, name='main_page'), url(r'^projects/$', abandoned.views.projects_view, name='projects_latest'), url(r'^projects/(?P<sorting>\w+)/$', abandoned.views.projects_view, name='projects'), url(r'^project/(?P<project_id>\d+)/$', abandoned.views.single_project_view, name='project'), url(r'^languages/$', abandoned.views.languages_view, name='languages_alphabetical'), url(r'^languages/(?P<sorting>\w+)/$', abandoned.views.languages_view, name='languages'), url(r'^language/(?P<language_id>\d+)/$', abandoned.views.single_language_view, name='language'), url(r'^tags/$', abandoned.views.tags_view, name='tags_alphabetical'), url(r'^tags/(?P<sorting>\w+)/$', abandoned.views.tags_view, name='tags'), url(r'^tag/(?P<tag_id>\w+)/$', abandoned.views.single_tag_view, name='tag'), url(r'^authors/$', abandoned.views.authors_view, name='authors_alphabetical'), url(r'^authors/(?P<sorting>\w+)/$', abandoned.views.authors_view, name='authors'), url(r'^author/(?P<author_id>\d+)/$', abandoned.views.single_author_view, name='author'), url(r'^reasons/$', abandoned.views.reasons_view, name='reasons_alphabetical'), url(r'^reasons/(?P<sorting>\w+)/$', abandoned.views.reasons_view, name='reasons'), url(r'^reason/(?P<reason_id>\d+)/$', abandoned.views.single_reason_view, name='reason'), url(r'^upvote/$', abandoned.views.handle_upvote, name='upvote'), url(r'^submit/$', abandoned.views.handle_submit, name='submit'), url(r'^api_info/$', abandoned.views.api_info_view, name='api_info'), url(r'^cookies/$', abandoned.views.cookie_info_view, name='cookies'), url(r'^api/', include(router.urls)), url(r'^admin/', include(admin.site.urls)), )
[ 1, 529, 276, 1112, 420, 29958, 29968, 6465, 29885, 536, 29914, 370, 9214, 287, 13, 5215, 23181, 29889, 7406, 13, 3166, 9557, 29889, 5527, 29889, 26045, 1053, 15038, 29892, 3160, 29892, 3142, 13, 3166, 9557, 29889, 21570, 1053, 4113, 13, 3166, 1791, 29918, 4468, 1053, 16053, 2153, 13, 13, 13, 15140, 353, 16053, 2153, 29889, 4592, 23971, 580, 13, 15140, 29889, 9573, 29898, 29878, 29915, 11338, 742, 23181, 29889, 7406, 29889, 8176, 1043, 2697, 29897, 13, 15140, 29889, 9573, 29898, 29878, 29915, 5150, 943, 742, 23181, 29889, 7406, 29889, 13720, 1043, 2697, 29897, 13, 15140, 29889, 9573, 29898, 29878, 29915, 276, 7040, 742, 23181, 29889, 7406, 29889, 1123, 1658, 1043, 2697, 29897, 13, 15140, 29889, 9573, 29898, 29878, 29915, 16418, 742, 23181, 29889, 7406, 29889, 7653, 1043, 2697, 29897, 13, 15140, 29889, 9573, 29898, 29878, 29915, 29880, 8737, 742, 23181, 29889, 7406, 29889, 21233, 1043, 2697, 29897, 13, 13, 2271, 11037, 29879, 353, 15038, 877, 742, 13, 462, 539, 3142, 29898, 29878, 29915, 29985, 29938, 742, 23181, 29889, 7406, 29889, 3396, 29918, 3488, 29892, 1024, 2433, 3396, 29918, 3488, 5477, 13, 462, 539, 3142, 29898, 29878, 29915, 29985, 16418, 13346, 742, 23181, 29889, 7406, 29889, 16418, 29918, 1493, 29892, 1024, 2433, 16418, 29918, 12333, 5477, 13, 462, 539, 3142, 29898, 29878, 29915, 29985, 16418, 29914, 10780, 29925, 29966, 6605, 292, 14247, 29893, 29974, 6802, 29938, 742, 23181, 29889, 7406, 29889, 16418, 29918, 1493, 29892, 1024, 2433, 16418, 5477, 13, 462, 539, 3142, 29898, 29878, 29915, 29985, 4836, 29914, 10780, 29925, 29966, 4836, 29918, 333, 14247, 29881, 29974, 6802, 29938, 742, 23181, 29889, 7406, 29889, 14369, 29918, 4836, 29918, 1493, 29892, 1024, 2433, 4836, 5477, 13, 462, 539, 3142, 29898, 29878, 29915, 29985, 29880, 8737, 13346, 742, 23181, 29889, 7406, 29889, 29880, 8737, 29918, 1493, 29892, 1024, 2433, 29880, 8737, 29918, 284, 17416, 936, 5477, 13, 462, 539, 3142, 29898, 29878, 29915, 29985, 29880, 8737, 29914, 10780, 29925, 29966, 6605, 292, 14247, 29893, 29974, 6802, 29938, 742, 23181, 29889, 7406, 29889, 29880, 8737, 29918, 1493, 29892, 1024, 2433, 29880, 8737, 5477, 13, 462, 539, 3142, 29898, 29878, 29915, 29985, 11675, 29914, 10780, 29925, 29966, 11675, 29918, 333, 14247, 29881, 29974, 6802, 29938, 742, 23181, 29889, 7406, 29889, 14369, 29918, 11675, 29918, 1493, 29892, 1024, 2433, 11675, 5477, 13, 462, 539, 3142, 29898, 29878, 29915, 29985, 11338, 13346, 742, 23181, 29889, 7406, 29889, 11338, 29918, 1493, 29892, 1024, 2433, 11338, 29918, 284, 17416, 936, 5477, 13, 462, 539, 3142, 29898, 29878, 29915, 29985, 11338, 29914, 10780, 29925, 29966, 6605, 292, 14247, 29893, 29974, 6802, 29938, 742, 23181, 29889, 7406, 29889, 11338, 29918, 1493, 29892, 1024, 2433, 11338, 5477, 13, 462, 539, 3142, 29898, 29878, 29915, 29985, 4039, 29914, 10780, 29925, 29966, 4039, 29918, 333, 14247, 29893, 29974, 6802, 29938, 742, 23181, 29889, 7406, 29889, 14369, 29918, 4039, 29918, 1493, 29892, 1024, 2433, 4039, 5477, 13, 462, 539, 3142, 29898, 29878, 29915, 29985, 5150, 943, 13346, 742, 23181, 29889, 7406, 29889, 5150, 943, 29918, 1493, 29892, 1024, 2433, 5150, 943, 29918, 284, 17416, 936, 5477, 13, 462, 539, 3142, 29898, 29878, 29915, 29985, 5150, 943, 29914, 10780, 29925, 29966, 6605, 292, 14247, 29893, 29974, 6802, 29938, 742, 23181, 29889, 7406, 29889, 5150, 943, 29918, 1493, 29892, 1024, 2433, 5150, 943, 5477, 13, 462, 539, 3142, 29898, 29878, 29915, 29985, 8921, 29914, 10780, 29925, 29966, 8921, 29918, 333, 14247, 29881, 29974, 6802, 29938, 742, 23181, 29889, 7406, 29889, 14369, 29918, 8921, 29918, 1493, 29892, 1024, 2433, 8921, 5477, 13, 462, 539, 3142, 29898, 29878, 29915, 29985, 276, 7040, 13346, 742, 23181, 29889, 7406, 29889, 276, 7040, 29918, 1493, 29892, 1024, 2433, 276, 7040, 29918, 284, 17416, 936, 5477, 13, 462, 539, 3142, 29898, 29878, 29915, 29985, 276, 7040, 29914, 10780, 29925, 29966, 6605, 292, 14247, 29893, 29974, 6802, 29938, 742, 23181, 29889, 7406, 29889, 276, 7040, 29918, 1493, 29892, 1024, 2433, 276, 7040, 5477, 13, 462, 539, 3142, 29898, 29878, 29915, 29985, 23147, 29914, 10780, 29925, 29966, 23147, 29918, 333, 14247, 29881, 29974, 6802, 29938, 742, 23181, 29889, 7406, 29889, 14369, 29918, 23147, 29918, 1493, 29892, 1024, 2433, 23147, 5477, 13, 462, 539, 3142, 29898, 29878, 29915, 29985, 786, 15814, 13346, 742, 23181, 29889, 7406, 29889, 8411, 29918, 786, 15814, 29892, 1024, 2433, 786, 15814, 5477, 13, 462, 539, 3142, 29898, 29878, 29915, 29985, 7892, 13346, 742, 23181, 29889, 7406, 29889, 8411, 29918, 7892, 29892, 1024, 2433, 7892, 5477, 13, 462, 539, 3142, 29898, 29878, 29915, 29985, 2754, 29918, 3888, 13346, 742, 23181, 29889, 7406, 29889, 2754, 29918, 3888, 29918, 1493, 29892, 1024, 2433, 2754, 29918, 3888, 5477, 13, 462, 539, 3142, 29898, 29878, 29915, 29985, 15108, 583, 13346, 742, 23181, 29889, 7406, 29889, 21509, 29918, 3888, 29918, 1493, 29892, 1024, 2433, 15108, 583, 5477, 13, 462, 539, 3142, 29898, 29878, 29915, 29985, 2754, 29914, 742, 3160, 29898, 15140, 29889, 26045, 8243, 13, 462, 539, 3142, 29898, 29878, 29915, 29985, 6406, 29914, 742, 3160, 29898, 6406, 29889, 2746, 29889, 26045, 8243, 13, 462, 539, 1723, 2 ]
tests/settings.py
Francislley/CrudDajndo2017.2
0
49881
SECRET_KEY = 'testing' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:', } } INSTALLED_APPS = [ 'django.contrib.contenttypes', 'django.contrib.auth', 'django.contrib.admin', 'django.contrib.staticfiles', 'django.contrib.sessions', 'cruditor', ] # We really don't rely on the urlconf but we need to set a path anyway. ROOT_URLCONF = 'django.contrib.staticfiles.urls' STATIC_URL = '/static/'
[ 1, 3725, 22245, 29911, 29918, 10818, 353, 525, 13424, 29915, 13, 13, 25832, 27982, 29903, 353, 426, 13, 1678, 525, 4381, 2396, 426, 13, 4706, 525, 1430, 29954, 8895, 2396, 525, 14095, 29889, 2585, 29889, 1627, 1975, 29889, 22793, 29941, 742, 13, 4706, 525, 5813, 2396, 525, 29901, 14834, 29901, 742, 13, 1678, 500, 13, 29913, 13, 13, 25580, 1964, 20566, 29918, 3301, 7024, 353, 518, 13, 1678, 525, 14095, 29889, 21570, 29889, 3051, 8768, 742, 13, 1678, 525, 14095, 29889, 21570, 29889, 5150, 742, 13, 1678, 525, 14095, 29889, 21570, 29889, 6406, 742, 13, 1678, 525, 14095, 29889, 21570, 29889, 7959, 5325, 742, 13, 1678, 525, 14095, 29889, 21570, 29889, 29879, 10964, 742, 13, 1678, 525, 7283, 566, 2105, 742, 13, 29962, 13, 13, 29937, 1334, 2289, 1016, 29915, 29873, 19104, 373, 278, 3142, 5527, 541, 591, 817, 304, 731, 263, 2224, 8763, 29889, 13, 21289, 29918, 4219, 6007, 29943, 353, 525, 14095, 29889, 21570, 29889, 7959, 5325, 29889, 26045, 29915, 13, 13, 17816, 2965, 29918, 4219, 353, 8207, 7959, 22208, 13, 2 ]
tests/test_annotations_notebook.py
jeromedockes/pylabelbuddy
0
6684
from pylabelbuddy import _annotations_notebook def test_annotations_notebook(root, annotations_mock, dataset_mock): nb = _annotations_notebook.AnnotationsNotebook( root, annotations_mock, dataset_mock ) nb.change_database() assert nb.notebook.index(nb.notebook.select()) == 2 nb.go_to_annotations() assert nb.notebook.index(nb.notebook.select()) == 0
[ 1, 515, 11451, 1643, 15841, 4518, 1053, 903, 6735, 800, 29918, 1333, 19273, 13, 13, 13, 1753, 1243, 29918, 6735, 800, 29918, 1333, 19273, 29898, 4632, 29892, 25495, 29918, 17640, 29892, 8783, 29918, 17640, 1125, 13, 1678, 302, 29890, 353, 903, 6735, 800, 29918, 1333, 19273, 29889, 2744, 1333, 800, 3664, 19273, 29898, 13, 4706, 3876, 29892, 25495, 29918, 17640, 29892, 8783, 29918, 17640, 13, 1678, 1723, 13, 1678, 302, 29890, 29889, 3167, 29918, 9803, 580, 13, 1678, 4974, 302, 29890, 29889, 1333, 19273, 29889, 2248, 29898, 9877, 29889, 1333, 19273, 29889, 2622, 3101, 1275, 29871, 29906, 13, 1678, 302, 29890, 29889, 1484, 29918, 517, 29918, 6735, 800, 580, 13, 1678, 4974, 302, 29890, 29889, 1333, 19273, 29889, 2248, 29898, 9877, 29889, 1333, 19273, 29889, 2622, 3101, 1275, 29871, 29900, 13, 2 ]
sanic_jwt_extended/decorators.py
devArtoria/Sanic-JWT-extended
465
133930
from functools import wraps from typing import Callable, List, Optional, Tuple from sanic.request import Request from sanic_jwt_extended.exceptions import ( AccessDeniedError, ConfigurationConflictError, CSRFError, FreshTokenRequiredError, InvalidHeaderError, NoAuthorizationError, RevokedTokenError, WrongTokenError, ) from sanic_jwt_extended.jwt_manager import JWT from sanic_jwt_extended.tokens import Token try: from hmac import compare_digest except ImportError: # pragma: no cover def compare_digest(a, b): if isinstance(a, str): a = a.encode("utf-8") if isinstance(b, str): b = b.encode("utf-8") if len(a) != len(b): return False r = 0 for x, y in zip(a, b): r |= x ^ y return not r jwt_get_function = Callable[[Request, bool], Tuple[str, Optional[str]]] def _get_request(args) -> Request: if isinstance(args[0], Request): request = args[0] else: request = args[1] return request def _get_raw_jwt_from_request(request, is_access=True): functions: List[jwt_get_function] = [] for eligible_location in JWT.config.token_location: if eligible_location == "header": functions.append(_get_raw_jwt_from_headers) if eligible_location == "query": functions.append(_get_raw_jwt_from_query_params) if eligible_location == "cookies": functions.append(_get_raw_jwt_from_cookies) raw_jwt = None csrf_value = None errors = [] for f in functions: try: raw_jwt, csrf_value = f(request, is_access) break except NoAuthorizationError as e: errors.append(str(e)) if not raw_jwt: raise NoAuthorizationError(', '.join(errors)) return raw_jwt, csrf_value def _get_raw_jwt_from_headers(request, is_access): header_key = ( JWT.config.jwt_header_key if is_access else JWT.config.refresh_jwt_header_key ) header_prefix = JWT.config.jwt_header_prefix token_header = request.headers.get(header_key) if not token_header: raise NoAuthorizationError(f'Missing header "{header_key}"') parts: List[str] = token_header.split() if parts[0] != header_prefix or len(parts) != 2: raise InvalidHeaderError( f"Bad {header_key} header. Expected value '{header_prefix} <JWT>'" ) encoded_token: str = parts[1] return encoded_token, None def _get_raw_jwt_from_query_params(request, _): encoded_token = request.args.get(JWT.config.jwt_query_param_name) if not encoded_token: raise NoAuthorizationError( f'Missing query parameter "{JWT.config.jwt_query_param_name}"' ) return encoded_token, None def _get_raw_jwt_from_cookies(request, is_access): cookie_key = JWT.config.jwt_cookie if is_access else JWT.config.refresh_jwt_cookie csrf_header_key = ( JWT.config.jwt_csrf_header if is_access else JWT.config.refresh_jwt_csrf_header ) encoded_token = request.cookies.get(cookie_key) csrf_value = None if not encoded_token: raise NoAuthorizationError(f'Missing cookie "{cookie_key}"') if JWT.config.csrf_protect and request.method in JWT.config.csrf_request_methods: csrf_value = request.headers.get(csrf_header_key) if not csrf_value: raise CSRFError("Missing CSRF token") return encoded_token, csrf_value def _csrf_check(csrf_from_request, csrf_from_jwt): if not csrf_from_jwt or not isinstance(csrf_from_jwt, str): raise CSRFError('Can not find valid CSRF data from token') if not compare_digest(csrf_from_request, csrf_from_jwt): raise CSRFError('CSRF double submit tokens do not match') def jwt_required( function=None, *, allow=None, deny=None, fresh_required=False, ): def real(fn): @wraps(fn) async def wrapper(*args, **kwargs): request = _get_request(args) raw_jwt, csrf_value = _get_raw_jwt_from_request(request) token_obj = Token(raw_jwt) if csrf_value: _csrf_check(csrf_value, token_obj.csrf) if token_obj.type != "access": raise WrongTokenError("Only access tokens are allowed") if fresh_required and not token_obj.fresh: raise FreshTokenRequiredError("Only fresh access tokens are allowed") if allow and token_obj.role not in allow: raise AccessDeniedError("You are not allowed to access here") if deny and token_obj.role in deny: raise AccessDeniedError("You are not allowed to access here") if JWT.config.use_blacklist and await JWT.blacklist.is_blacklisted( token_obj ): raise RevokedTokenError("Token has been revoked") kwargs["token"] = token_obj return await fn(*args, **kwargs) return wrapper if function: return real(function) else: if allow and deny: raise ConfigurationConflictError( "Can not use 'deny' and 'allow' option together." ) return real def jwt_optional(function): @wraps(function) async def wrapper(*args, **kwargs): request = _get_request(args) token_obj: Optional[Token] = None try: raw_jwt, csrf_value = _get_raw_jwt_from_request(request) token_obj = Token(raw_jwt) if csrf_value: _csrf_check(csrf_value, token_obj.csrf) if token_obj.type != "access": raise WrongTokenError("Only access tokens are allowed") except (NoAuthorizationError, InvalidHeaderError): pass kwargs["token"] = token_obj return await function(*args, **kwargs) return wrapper def refresh_jwt_required(function=None, *, allow=None, deny=None): def real(fn): @wraps(fn) async def wrapper(*args, **kwargs): request = _get_request(args) raw_jwt, csrf_value = _get_raw_jwt_from_request(request, is_access=False) token_obj = Token(raw_jwt) if csrf_value: _csrf_check(csrf_value, token_obj.csrf) if token_obj.type != "refresh": raise WrongTokenError("Only refresh tokens are allowed") if allow and token_obj.role not in allow: raise AccessDeniedError("You are not allowed to refresh in here") if deny and token_obj.role in deny: raise AccessDeniedError("You are not allowed to refresh in here") if JWT.config.use_blacklist and await JWT.blacklist.is_blacklisted( token_obj ): raise RevokedTokenError("Token has been revoked") kwargs["token"] = token_obj return await fn(*args, **kwargs) return wrapper if function: return real(function) else: if allow and deny: raise ConfigurationConflictError( "Can not use 'deny' and 'allow' option together." ) return real
[ 1, 515, 2090, 312, 8789, 1053, 11463, 567, 13, 3166, 19229, 1053, 8251, 519, 29892, 2391, 29892, 28379, 29892, 12603, 552, 13, 13, 3166, 9753, 293, 29889, 3827, 1053, 10729, 13, 13, 3166, 9753, 293, 29918, 29926, 14554, 29918, 1062, 2760, 29889, 11739, 29879, 1053, 313, 13, 1678, 11028, 29315, 1000, 2392, 29892, 13, 1678, 20999, 16376, 29176, 2392, 29892, 13, 1678, 315, 14098, 29943, 2392, 29892, 13, 1678, 383, 3781, 6066, 19347, 2392, 29892, 13, 1678, 21403, 7850, 2392, 29892, 13, 1678, 1939, 25471, 2392, 29892, 13, 1678, 11459, 12504, 6066, 2392, 29892, 13, 1678, 399, 29373, 6066, 2392, 29892, 13, 29897, 13, 3166, 9753, 293, 29918, 29926, 14554, 29918, 1062, 2760, 29889, 29926, 14554, 29918, 12847, 1053, 435, 17755, 13, 3166, 9753, 293, 29918, 29926, 14554, 29918, 1062, 2760, 29889, 517, 12360, 1053, 25159, 13, 13, 2202, 29901, 13, 1678, 515, 298, 8628, 1053, 7252, 29918, 7501, 342, 13, 19499, 16032, 2392, 29901, 29871, 396, 282, 23929, 29901, 694, 4612, 13, 13, 1678, 822, 7252, 29918, 7501, 342, 29898, 29874, 29892, 289, 1125, 13, 4706, 565, 338, 8758, 29898, 29874, 29892, 851, 1125, 13, 9651, 263, 353, 263, 29889, 12508, 703, 9420, 29899, 29947, 1159, 13, 4706, 565, 338, 8758, 29898, 29890, 29892, 851, 1125, 13, 9651, 289, 353, 289, 29889, 12508, 703, 9420, 29899, 29947, 1159, 13, 13, 4706, 565, 7431, 29898, 29874, 29897, 2804, 7431, 29898, 29890, 1125, 13, 9651, 736, 7700, 13, 13, 4706, 364, 353, 29871, 29900, 13, 4706, 363, 921, 29892, 343, 297, 14319, 29898, 29874, 29892, 289, 1125, 13, 9651, 364, 891, 29922, 921, 6228, 343, 13, 13, 4706, 736, 451, 364, 13, 13, 13, 29926, 14554, 29918, 657, 29918, 2220, 353, 8251, 519, 8999, 3089, 29892, 6120, 1402, 12603, 552, 29961, 710, 29892, 28379, 29961, 710, 5262, 29962, 13, 13, 13, 1753, 903, 657, 29918, 3827, 29898, 5085, 29897, 1599, 10729, 29901, 13, 1678, 565, 338, 8758, 29898, 5085, 29961, 29900, 1402, 10729, 1125, 13, 4706, 2009, 353, 6389, 29961, 29900, 29962, 13, 1678, 1683, 29901, 13, 4706, 2009, 353, 6389, 29961, 29896, 29962, 13, 1678, 736, 2009, 13, 13, 13, 1753, 903, 657, 29918, 1610, 29918, 29926, 14554, 29918, 3166, 29918, 3827, 29898, 3827, 29892, 338, 29918, 5943, 29922, 5574, 1125, 13, 1678, 3168, 29901, 2391, 29961, 29926, 14554, 29918, 657, 29918, 2220, 29962, 353, 5159, 13, 13, 1678, 363, 560, 335, 1821, 29918, 5479, 297, 435, 17755, 29889, 2917, 29889, 6979, 29918, 5479, 29901, 13, 4706, 565, 560, 335, 1821, 29918, 5479, 1275, 376, 6672, 1115, 13, 9651, 3168, 29889, 4397, 7373, 657, 29918, 1610, 29918, 29926, 14554, 29918, 3166, 29918, 13662, 29897, 13, 4706, 565, 560, 335, 1821, 29918, 5479, 1275, 376, 1972, 1115, 13, 9651, 3168, 29889, 4397, 7373, 657, 29918, 1610, 29918, 29926, 14554, 29918, 3166, 29918, 1972, 29918, 7529, 29897, 13, 4706, 565, 560, 335, 1821, 29918, 5479, 1275, 376, 15108, 583, 1115, 13, 9651, 3168, 29889, 4397, 7373, 657, 29918, 1610, 29918, 29926, 14554, 29918, 3166, 29918, 15108, 583, 29897, 13, 13, 1678, 10650, 29918, 29926, 14554, 353, 6213, 13, 1678, 5939, 9600, 29918, 1767, 353, 6213, 13, 1678, 4436, 353, 5159, 13, 13, 1678, 363, 285, 297, 3168, 29901, 13, 4706, 1018, 29901, 13, 9651, 10650, 29918, 29926, 14554, 29892, 5939, 9600, 29918, 1767, 353, 285, 29898, 3827, 29892, 338, 29918, 5943, 29897, 13, 9651, 2867, 13, 4706, 5174, 1939, 25471, 2392, 408, 321, 29901, 13, 9651, 4436, 29889, 4397, 29898, 710, 29898, 29872, 876, 13, 13, 1678, 565, 451, 10650, 29918, 29926, 14554, 29901, 13, 4706, 12020, 1939, 25471, 2392, 29317, 15300, 7122, 29898, 12523, 876, 13, 13, 1678, 736, 10650, 29918, 29926, 14554, 29892, 5939, 9600, 29918, 1767, 13, 13, 13, 1753, 903, 657, 29918, 1610, 29918, 29926, 14554, 29918, 3166, 29918, 13662, 29898, 3827, 29892, 338, 29918, 5943, 1125, 13, 1678, 4839, 29918, 1989, 353, 313, 13, 4706, 435, 17755, 29889, 2917, 29889, 29926, 14554, 29918, 6672, 29918, 1989, 565, 338, 29918, 5943, 1683, 435, 17755, 29889, 2917, 29889, 22379, 29918, 29926, 14554, 29918, 6672, 29918, 1989, 13, 1678, 1723, 13, 1678, 4839, 29918, 13506, 353, 435, 17755, 29889, 2917, 29889, 29926, 14554, 29918, 6672, 29918, 13506, 13, 13, 1678, 5993, 29918, 6672, 353, 2009, 29889, 13662, 29889, 657, 29898, 6672, 29918, 1989, 29897, 13, 13, 1678, 565, 451, 5993, 29918, 6672, 29901, 13, 4706, 12020, 1939, 25471, 2392, 29898, 29888, 29915, 18552, 292, 4839, 29850, 6672, 29918, 1989, 5038, 1495, 13, 13, 1678, 5633, 29901, 2391, 29961, 710, 29962, 353, 5993, 29918, 6672, 29889, 5451, 580, 13, 13, 1678, 565, 5633, 29961, 29900, 29962, 2804, 4839, 29918, 13506, 470, 7431, 29898, 20895, 29897, 2804, 29871, 29906, 29901, 13, 4706, 12020, 21403, 7850, 2392, 29898, 13, 9651, 285, 29908, 22050, 426, 6672, 29918, 1989, 29913, 4839, 29889, 1222, 6021, 995, 22372, 6672, 29918, 13506, 29913, 529, 29967, 17755, 29958, 11838, 13, 4706, 1723, 13, 13, 1678, 18511, 29918, 6979, 29901, 851, 353, 5633, 29961, 29896, 29962, 13, 13, 1678, 736, 18511, 29918, 6979, 29892, 6213, 13, 13, 13, 1753, 903, 657, 29918, 1610, 29918, 29926, 14554, 29918, 3166, 29918, 1972, 29918, 7529, 29898, 3827, 29892, 903, 1125, 13, 1678, 18511, 29918, 6979, 353, 2009, 29889, 5085, 29889, 657, 29898, 29967, 17755, 29889, 2917, 29889, 29926, 14554, 29918, 1972, 29918, 3207, 29918, 978, 29897, 13, 1678, 565, 451, 18511, 29918, 6979, 29901, 13, 4706, 12020, 1939, 25471, 2392, 29898, 13, 9651, 285, 29915, 18552, 292, 2346, 3443, 29850, 29967, 17755, 29889, 2917, 29889, 29926, 14554, 29918, 1972, 29918, 3207, 29918, 978, 5038, 29915, 13, 4706, 1723, 13, 13, 1678, 736, 18511, 29918, 6979, 29892, 6213, 13, 13, 13, 1753, 903, 657, 29918, 1610, 29918, 29926, 14554, 29918, 3166, 29918, 15108, 583, 29898, 3827, 29892, 338, 29918, 5943, 1125, 13, 1678, 15327, 29918, 1989, 353, 435, 17755, 29889, 2917, 29889, 29926, 14554, 29918, 21509, 565, 338, 29918, 5943, 1683, 435, 17755, 29889, 2917, 29889, 22379, 29918, 29926, 14554, 29918, 21509, 13, 1678, 5939, 9600, 29918, 6672, 29918, 1989, 353, 313, 13, 4706, 435, 17755, 29889, 2917, 29889, 29926, 14554, 29918, 2395, 9600, 29918, 6672, 565, 338, 29918, 5943, 1683, 435, 17755, 29889, 2917, 29889, 22379, 29918, 29926, 14554, 29918, 2395, 9600, 29918, 6672, 13, 1678, 1723, 13, 13, 1678, 18511, 29918, 6979, 353, 2009, 29889, 15108, 583, 29889, 657, 29898, 21509, 29918, 1989, 29897, 13, 1678, 5939, 9600, 29918, 1767, 353, 6213, 13, 13, 1678, 565, 451, 18511, 29918, 6979, 29901, 13, 4706, 12020, 1939, 25471, 2392, 29898, 29888, 29915, 18552, 292, 15327, 29850, 21509, 29918, 1989, 5038, 1495, 13, 13, 1678, 565, 435, 17755, 29889, 2917, 29889, 2395, 9600, 29918, 14676, 312, 322, 2009, 29889, 5696, 297, 435, 17755, 29889, 2917, 29889, 2395, 9600, 29918, 3827, 29918, 23515, 29901, 13, 4706, 5939, 9600, 29918, 1767, 353, 2009, 29889, 13662, 29889, 657, 29898, 2395, 9600, 29918, 6672, 29918, 1989, 29897, 13, 13, 4706, 565, 451, 5939, 9600, 29918, 1767, 29901, 13, 9651, 12020, 315, 14098, 29943, 2392, 703, 18552, 292, 315, 14098, 29943, 5993, 1159, 13, 13, 1678, 736, 18511, 29918, 6979, 29892, 5939, 9600, 29918, 1767, 13, 13, 13, 1753, 903, 2395, 9600, 29918, 3198, 29898, 2395, 9600, 29918, 3166, 29918, 3827, 29892, 5939, 9600, 29918, 3166, 29918, 29926, 14554, 1125, 13, 1678, 565, 451, 5939, 9600, 29918, 3166, 29918, 29926, 14554, 470, 451, 338, 8758, 29898, 2395, 9600, 29918, 3166, 29918, 29926, 14554, 29892, 851, 1125, 13, 4706, 12020, 315, 14098, 29943, 2392, 877, 6028, 451, 1284, 2854, 315, 14098, 29943, 848, 515, 5993, 1495, 13, 1678, 565, 451, 7252, 29918, 7501, 342, 29898, 2395, 9600, 29918, 3166, 29918, 3827, 29892, 5939, 9600, 29918, 3166, 29918, 29926, 14554, 1125, 13, 4706, 12020, 315, 14098, 29943, 2392, 877, 9295, 29934, 29943, 3765, 9752, 18897, 437, 451, 1993, 1495, 13, 13, 13, 1753, 432, 14554, 29918, 12403, 29898, 13, 1678, 740, 29922, 8516, 29892, 334, 29892, 2758, 29922, 8516, 29892, 972, 29891, 29922, 8516, 29892, 10849, 29918, 12403, 29922, 8824, 29892, 13, 1125, 13, 1678, 822, 1855, 29898, 9144, 1125, 13, 4706, 732, 29893, 336, 567, 29898, 9144, 29897, 13, 4706, 7465, 822, 14476, 10456, 5085, 29892, 3579, 19290, 1125, 13, 9651, 2009, 353, 903, 657, 29918, 3827, 29898, 5085, 29897, 13, 9651, 10650, 29918, 29926, 14554, 29892, 5939, 9600, 29918, 1767, 353, 903, 657, 29918, 1610, 29918, 29926, 14554, 29918, 3166, 29918, 3827, 29898, 3827, 29897, 13, 13, 9651, 5993, 29918, 5415, 353, 25159, 29898, 1610, 29918, 29926, 14554, 29897, 13, 13, 9651, 565, 5939, 9600, 29918, 1767, 29901, 13, 18884, 903, 2395, 9600, 29918, 3198, 29898, 2395, 9600, 29918, 1767, 29892, 5993, 29918, 5415, 29889, 2395, 9600, 29897, 13, 13, 9651, 565, 5993, 29918, 5415, 29889, 1853, 2804, 376, 5943, 1115, 13, 18884, 12020, 399, 29373, 6066, 2392, 703, 11730, 2130, 18897, 526, 6068, 1159, 13, 13, 9651, 565, 10849, 29918, 12403, 322, 451, 5993, 29918, 5415, 29889, 29888, 3781, 29901, 13, 18884, 12020, 383, 3781, 6066, 19347, 2392, 703, 11730, 10849, 2130, 18897, 526, 6068, 1159, 13, 13, 9651, 565, 2758, 322, 5993, 29918, 5415, 29889, 12154, 451, 297, 2758, 29901, 13, 18884, 12020, 11028, 29315, 1000, 2392, 703, 3492, 526, 451, 6068, 304, 2130, 1244, 1159, 13, 13, 9651, 565, 972, 29891, 322, 5993, 29918, 5415, 29889, 12154, 297, 972, 29891, 29901, 13, 18884, 12020, 11028, 29315, 1000, 2392, 703, 3492, 526, 451, 6068, 304, 2130, 1244, 1159, 13, 13, 9651, 565, 435, 17755, 29889, 2917, 29889, 1509, 29918, 8517, 1761, 322, 7272, 435, 17755, 29889, 8517, 1761, 29889, 275, 29918, 8517, 1761, 287, 29898, 13, 18884, 5993, 29918, 5415, 13, 632, 1125, 13, 18884, 12020, 11459, 12504, 6066, 2392, 703, 6066, 756, 1063, 6664, 12504, 1159, 13, 13, 9651, 9049, 5085, 3366, 6979, 3108, 353, 5993, 29918, 5415, 13, 13, 9651, 736, 7272, 7876, 10456, 5085, 29892, 3579, 19290, 29897, 13, 13, 4706, 736, 14476, 13, 13, 1678, 565, 740, 29901, 13, 4706, 736, 1855, 29898, 2220, 29897, 13, 1678, 1683, 29901, 13, 4706, 565, 2758, 322, 972, 29891, 29901, 13, 9651, 12020, 20999, 16376, 29176, 2392, 29898, 13, 18884, 376, 6028, 451, 671, 525, 1145, 29891, 29915, 322, 525, 9536, 29915, 2984, 4208, 1213, 13, 9651, 1723, 13, 4706, 736, 1855, 13, 13, 13, 1753, 432, 14554, 29918, 25253, 29898, 2220, 1125, 13, 1678, 732, 29893, 336, 567, 29898, 2220, 29897, 13, 1678, 7465, 822, 14476, 10456, 5085, 29892, 3579, 19290, 1125, 13, 4706, 2009, 353, 903, 657, 29918, 3827, 29898, 5085, 29897, 13, 4706, 5993, 29918, 5415, 29901, 28379, 29961, 6066, 29962, 353, 6213, 13, 13, 4706, 1018, 29901, 13, 9651, 10650, 29918, 29926, 14554, 29892, 5939, 9600, 29918, 1767, 353, 903, 657, 29918, 1610, 29918, 29926, 14554, 29918, 3166, 29918, 3827, 29898, 3827, 29897, 13, 13, 9651, 5993, 29918, 5415, 353, 25159, 29898, 1610, 29918, 29926, 14554, 29897, 13, 13, 9651, 565, 5939, 9600, 29918, 1767, 29901, 13, 18884, 903, 2395, 9600, 29918, 3198, 29898, 2395, 9600, 29918, 1767, 29892, 5993, 29918, 5415, 29889, 2395, 9600, 29897, 13, 13, 9651, 565, 5993, 29918, 5415, 29889, 1853, 2804, 376, 5943, 1115, 13, 18884, 12020, 399, 29373, 6066, 2392, 703, 11730, 2130, 18897, 526, 6068, 1159, 13, 4706, 5174, 313, 3782, 25471, 2392, 29892, 21403, 7850, 2392, 1125, 13, 9651, 1209, 13, 13, 4706, 9049, 5085, 3366, 6979, 3108, 353, 5993, 29918, 5415, 13, 13, 4706, 736, 7272, 740, 10456, 5085, 29892, 3579, 19290, 29897, 13, 13, 1678, 736, 14476, 13, 13, 13, 1753, 11086, 29918, 29926, 14554, 29918, 12403, 29898, 2220, 29922, 8516, 29892, 334, 29892, 2758, 29922, 8516, 29892, 972, 29891, 29922, 8516, 1125, 13, 1678, 822, 1855, 29898, 9144, 1125, 13, 4706, 732, 29893, 336, 567, 29898, 9144, 29897, 13, 4706, 7465, 822, 14476, 10456, 5085, 29892, 3579, 19290, 1125, 13, 9651, 2009, 353, 903, 657, 29918, 3827, 29898, 5085, 29897, 13, 9651, 10650, 29918, 29926, 14554, 29892, 5939, 9600, 29918, 1767, 353, 903, 657, 29918, 1610, 29918, 29926, 14554, 29918, 3166, 29918, 3827, 29898, 3827, 29892, 338, 29918, 5943, 29922, 8824, 29897, 13, 13, 9651, 5993, 29918, 5415, 353, 25159, 29898, 1610, 29918, 29926, 14554, 29897, 13, 13, 9651, 565, 5939, 9600, 29918, 1767, 29901, 13, 18884, 903, 2395, 9600, 29918, 3198, 29898, 2395, 9600, 29918, 1767, 29892, 5993, 29918, 5415, 29889, 2395, 9600, 29897, 13, 13, 9651, 565, 5993, 29918, 5415, 29889, 1853, 2804, 376, 22379, 1115, 13, 18884, 12020, 399, 29373, 6066, 2392, 703, 11730, 11086, 18897, 526, 6068, 1159, 13, 13, 9651, 565, 2758, 322, 5993, 29918, 5415, 29889, 12154, 451, 297, 2758, 29901, 13, 18884, 12020, 11028, 29315, 1000, 2392, 703, 3492, 526, 451, 6068, 304, 11086, 297, 1244, 1159, 13, 13, 9651, 565, 972, 29891, 322, 5993, 29918, 5415, 29889, 12154, 297, 972, 29891, 29901, 13, 18884, 12020, 11028, 29315, 1000, 2392, 703, 3492, 526, 451, 6068, 304, 11086, 297, 1244, 1159, 13, 13, 9651, 565, 435, 17755, 29889, 2917, 29889, 1509, 29918, 8517, 1761, 322, 7272, 435, 17755, 29889, 8517, 1761, 29889, 275, 29918, 8517, 1761, 287, 29898, 13, 18884, 5993, 29918, 5415, 13, 632, 1125, 13, 18884, 12020, 11459, 12504, 6066, 2392, 703, 6066, 756, 1063, 6664, 12504, 1159, 13, 13, 9651, 9049, 5085, 3366, 6979, 3108, 353, 5993, 29918, 5415, 13, 13, 9651, 736, 7272, 7876, 10456, 5085, 29892, 3579, 19290, 29897, 13, 13, 4706, 736, 14476, 13, 13, 1678, 565, 740, 29901, 13, 4706, 736, 1855, 29898, 2220, 29897, 13, 1678, 1683, 29901, 13, 4706, 565, 2758, 322, 972, 29891, 29901, 13, 9651, 12020, 20999, 16376, 29176, 2392, 29898, 13, 18884, 376, 6028, 451, 671, 525, 1145, 29891, 29915, 322, 525, 9536, 29915, 2984, 4208, 1213, 13, 9651, 1723, 13, 4706, 736, 1855, 13, 2 ]
gen/build_deploy/powershell.py
KostiantynOleksiienko/dcos
0
101060
""" Generates a powershell script to install Windows agent - dcos_install.ps1 """ import os import os.path import gen.build_deploy.util as util import gen.template import gen.util import pkgpanda import pkgpanda.util def generate(gen_out, output_dir): print("Generating Powershell configuration files for DC/OS") make_powershell(gen_out, output_dir) def make_powershell(gen_out, output_dir): """Build powershell deployment script and store this at Bootstrap serve""" output_dir = output_dir + '/windows/' pkgpanda.util.make_directory(output_dir) bootstrap_url = gen_out.arguments['bootstrap_url'] if gen_out.arguments['master_discovery'] == 'static': master_list = gen_out.arguments['master_list'] elif gen_out.arguments['master_discovery'] == 'master_http_loadbalancer': master_list = gen_out.arguments['exhibitor_address'] + ':2181' else: master_list = 'zk-1.zk:2181,zk-2.zk:2181,zk-3.zk:2181,zk-4.zk:2181,zk-5.zk:2181' powershell_template_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'powershell/dcos_install.ps1.in') with open(powershell_template_path, 'r') as f: powershell_template = f.read() powershell_script = gen.template.parse_str(powershell_template).render({ 'dcos_image_commit': util.dcos_image_commit, 'generation_date': util.template_generation_date, 'bootstrap_url': bootstrap_url, 'master_list': master_list, }) # Output the dcos install ps1 script install_script_filename = 'dcos_install.ps1' pkgpanda.util.write_string(install_script_filename, powershell_script) pkgpanda.util.write_string(output_dir + install_script_filename, powershell_script) f.close()
[ 1, 9995, 13, 5631, 1078, 263, 25532, 2471, 304, 2601, 3852, 10823, 448, 270, 3944, 29918, 6252, 29889, 567, 29896, 13, 15945, 29908, 13, 13, 5215, 2897, 13, 5215, 2897, 29889, 2084, 13, 13, 5215, 2531, 29889, 4282, 29918, 16519, 29889, 4422, 408, 3667, 13, 5215, 2531, 29889, 6886, 13, 5215, 2531, 29889, 4422, 13, 13, 5215, 282, 9415, 29886, 5863, 13, 5215, 282, 9415, 29886, 5863, 29889, 4422, 13, 13, 13, 1753, 5706, 29898, 1885, 29918, 449, 29892, 1962, 29918, 3972, 1125, 13, 1678, 1596, 703, 5631, 1218, 12265, 27456, 5285, 2066, 363, 13681, 29914, 3267, 1159, 13, 1678, 1207, 29918, 12248, 27456, 29898, 1885, 29918, 449, 29892, 1962, 29918, 3972, 29897, 13, 13, 13, 1753, 1207, 29918, 12248, 27456, 29898, 1885, 29918, 449, 29892, 1962, 29918, 3972, 1125, 13, 1678, 9995, 8893, 25532, 18209, 2471, 322, 3787, 445, 472, 25746, 9080, 15945, 29908, 13, 13, 1678, 1962, 29918, 3972, 353, 1962, 29918, 3972, 718, 8207, 10499, 22208, 13, 1678, 282, 9415, 29886, 5863, 29889, 4422, 29889, 5675, 29918, 12322, 29898, 4905, 29918, 3972, 29897, 13, 13, 1678, 16087, 29918, 2271, 353, 2531, 29918, 449, 29889, 25699, 1839, 8704, 29918, 2271, 2033, 13, 1678, 565, 2531, 29918, 449, 29889, 25699, 1839, 6207, 29918, 2218, 11911, 29891, 2033, 1275, 525, 7959, 2396, 13, 4706, 5835, 29918, 1761, 353, 2531, 29918, 449, 29889, 25699, 1839, 6207, 29918, 1761, 2033, 13, 1678, 25342, 2531, 29918, 449, 29889, 25699, 1839, 6207, 29918, 2218, 11911, 29891, 2033, 1275, 525, 6207, 29918, 1124, 29918, 1359, 5521, 25856, 2396, 13, 4706, 5835, 29918, 1761, 353, 2531, 29918, 449, 29889, 25699, 1839, 735, 6335, 2105, 29918, 7328, 2033, 718, 525, 29901, 29906, 29896, 29947, 29896, 29915, 13, 1678, 1683, 29901, 13, 4706, 5835, 29918, 1761, 353, 525, 7730, 29899, 29896, 29889, 7730, 29901, 29906, 29896, 29947, 29896, 29892, 7730, 29899, 29906, 29889, 7730, 29901, 29906, 29896, 29947, 29896, 29892, 7730, 29899, 29941, 29889, 7730, 29901, 29906, 29896, 29947, 29896, 29892, 7730, 29899, 29946, 29889, 7730, 29901, 29906, 29896, 29947, 29896, 29892, 7730, 29899, 29945, 29889, 7730, 29901, 29906, 29896, 29947, 29896, 29915, 13, 13, 1678, 25532, 29918, 6886, 29918, 2084, 353, 2897, 29889, 2084, 29889, 7122, 29898, 359, 29889, 2084, 29889, 25721, 29898, 359, 29889, 2084, 29889, 6370, 2084, 22168, 1445, 1649, 8243, 13, 462, 462, 9651, 525, 12248, 27456, 29914, 29881, 3944, 29918, 6252, 29889, 567, 29896, 29889, 262, 1495, 13, 1678, 411, 1722, 29898, 12248, 27456, 29918, 6886, 29918, 2084, 29892, 525, 29878, 1495, 408, 285, 29901, 13, 4706, 25532, 29918, 6886, 353, 285, 29889, 949, 580, 13, 4706, 25532, 29918, 2154, 353, 2531, 29889, 6886, 29889, 5510, 29918, 710, 29898, 12248, 27456, 29918, 6886, 467, 9482, 3319, 13, 9651, 525, 29881, 3944, 29918, 3027, 29918, 15060, 2396, 3667, 29889, 29881, 3944, 29918, 3027, 29918, 15060, 29892, 13, 9651, 525, 4738, 362, 29918, 1256, 2396, 3667, 29889, 6886, 29918, 4738, 362, 29918, 1256, 29892, 13, 9651, 525, 8704, 29918, 2271, 2396, 16087, 29918, 2271, 29892, 13, 9651, 525, 6207, 29918, 1761, 2396, 5835, 29918, 1761, 29892, 13, 9651, 5615, 13, 1678, 396, 10604, 278, 270, 3944, 2601, 6529, 29896, 2471, 13, 1678, 2601, 29918, 2154, 29918, 9507, 353, 525, 29881, 3944, 29918, 6252, 29889, 567, 29896, 29915, 13, 1678, 282, 9415, 29886, 5863, 29889, 4422, 29889, 3539, 29918, 1807, 29898, 6252, 29918, 2154, 29918, 9507, 29892, 25532, 29918, 2154, 29897, 13, 1678, 282, 9415, 29886, 5863, 29889, 4422, 29889, 3539, 29918, 1807, 29898, 4905, 29918, 3972, 718, 2601, 29918, 2154, 29918, 9507, 29892, 25532, 29918, 2154, 29897, 13, 1678, 285, 29889, 5358, 580, 13, 2 ]
http-lib-serv/test/__main__.py
jbschool/hpotter-api
0
129358
<gh_stars>0 import unittest # import schema class TestCanTest(unittest.TestCase): def setUp(self): print('setting up...') def test_true_is_true(self): self.assertTrue(1 == 1) def test_false_is_false(self): self.assertFalse(False) if __name__ == '__main__': unittest.main()
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 5215, 443, 27958, 13, 29937, 1053, 10938, 13, 13, 1990, 4321, 6028, 3057, 29898, 348, 27958, 29889, 3057, 8259, 1125, 13, 13, 1678, 822, 731, 3373, 29898, 1311, 1125, 13, 4706, 1596, 877, 26740, 701, 856, 1495, 13, 13, 1678, 822, 1243, 29918, 3009, 29918, 275, 29918, 3009, 29898, 1311, 1125, 13, 4706, 1583, 29889, 9294, 5574, 29898, 29896, 1275, 29871, 29896, 29897, 13, 13, 1678, 822, 1243, 29918, 4541, 29918, 275, 29918, 4541, 29898, 1311, 1125, 13, 4706, 1583, 29889, 9294, 8824, 29898, 8824, 29897, 13, 13, 13, 361, 4770, 978, 1649, 1275, 525, 1649, 3396, 1649, 2396, 13, 1678, 443, 27958, 29889, 3396, 580, 2 ]
jumeg/gui/tsv/wxutils/jumeg_tsv_wxutils_dlg_options.py
fboers/jumeg
6
144730
#!/usr/bin/env python3 # -+-coding: utf-8 -+- #-------------------------------------------- # Authors: <NAME> <<EMAIL>> # #-------------------------------------------- # Date: 05.09.19 #-------------------------------------------- # License: BSD (3-clause) #-------------------------------------------- # Updates #-------------------------------------------- import numpy as np import wx import sys,logging from jumeg.base import jumeg_logger logger = logging.getLogger('jumeg') from jumeg.gui.wxlib.utils.jumeg_gui_wxlib_utils_controls import JuMEG_wxControlGrid from jumeg.gui.tsv.wxutils.jumeg_tsv_wxutils import DLGButtonPanel __version__="2019-09-13-001" LEA = wx.ALIGN_LEFT | wx.EXPAND | wx.ALL class PopupColourTable(wx.PopupTransientWindow): def __init__(self, parent,**kwargs): super().__init__(parent,wx.NO_BORDER) self._wx_init(**kwargs) self._ApplyLayout() def _wx_init(self,**kwargs): self.SetBackgroundColour(kwargs.get("bg","GREY60")) w = kwargs.get("w",24) self._C = kwargs.get("colours") self._caller = kwargs.get("caller") self._callback = kwargs.get("callback") self._title = kwargs.get("title","JuMEG Select Colour") self._colour_text = None bmp = wx.Bitmap() ctrls = [] for i in range( self._C.n_colours ): #--- select colour ctrls.append( ["BTBMP",self._C.labels[i],bmp,(w,w),wx.NO_BORDER|wx.BU_NOTEXT,self._C.colours[i] ,self._C.labels[i],self.ClickOnCtrls] ) #--- calc cols for grid n_cols,rest = divmod( len(ctrls),4) if rest: n_cols += 1 self._pnl = JuMEG_wxControlGrid(self,label= self._title,control_list=ctrls,cols=n_cols,set_ctrl_prefix=False) def ClickOnCtrls(self,evt): obj = evt.GetEventObject() try: if obj.GetToolTip(): self._colour_text = obj.GetToolTipText() #--- call the caller-function in parent if self._colour_text: self._callback( self._caller,self._colour_text ) #--- close self.Dismiss() # close it except: logger.exception("---> ERROR can not set ToolTip".format(self._colour_text)) def _ApplyLayout(self): vbox = wx.BoxSizer(wx.VERTICAL) vbox.Add(self._pnl,1,LEA,2) self.SetAutoLayout(True) self.SetSizer(vbox) self.Fit() self.Layout() class GroupDLG(wx.Dialog): """ Example: --------- input group dict labels = ['grad','mag','eeg','stim','eog','emg','ecg','ref_meg'] grp={ 'mag': {"selected":True,"colour":"RED", "prescale":200,"unit":"fT"}, 'grad': {"selected":True,"colour":"BLUE", "prescale":200,"unit":"fT"}, 'ref_meg':{"selected":True,"colour":"GREEN", "prescale":2, "unit":"pT"}, 'eeg': {"selected":True,"colour":"BLUE", "prescale":1, "unit":"uV"}, 'eog': {"selected":True,"colour":"PURPLE", "prescale":100,"unit":"uV"}, 'emg': {"selected":True,"colour":"DARKORANGE","prescale":100,"unit":"uV"}, 'ecg': {"selected":True,"colour":"DARKGREEN", "prescale":100,"unit":"mV"}, 'stim': {"selected":True,"colour":"CYAN", "prescale":1, "unit":"bits"} } """ @property def Group(self): return self._GRP def __init__(self,parent,**kwargs): style=wx.CLOSE_BOX|wx.MAXIMIZE_BOX|wx.MINIMIZE_BOX |wx.RESIZE_BORDER super().__init__(parent,title="JuMEG Group Settings",style=style) self._init(**kwargs) def _init(self,**kwargs): self._GRP = kwargs.get("grp") self._wx_init(**kwargs) self._wx_button_box() self._ApplyLayout() def _wx_button_box(self): """ show DLG cancel apply bts :return: """ self._pnl_button_box = DLGButtonPanel(self,style=wx.SUNKEN_BORDER) def _wx_init(self,**kwargs): w = kwargs.get("w",24) self.SetBackgroundColour(kwargs.get("bg","GREY90")) self.SetMinSize(( 620,400) ) # self._bt=wx.Button(self,-1,"TEST") bmp = wx.Bitmap() ctrls = [ ["STXT","Groups","Groups"], ["STXT","Colour","Colour"], ["STXT","Scale","Scale/Div"],[ "STXT","Unit","Unit"],["STXT","Scale Mode","Scale Mode"],["STXT","DC Offset","DC Offset"]] n_cols= len(ctrls) for grp in self._GRP.labels: g = grp.upper() #--- ckbutton select group ctrls.append( ["CK", g+".SELECTED",g,self._GRP.GetSelected(grp),'de/select group',self.ClickOnCtrls] ) #--- select colour label = self._GRP.GetColour(grp) ctrls.append( ["BTBMP",g+".colour",bmp,(w,w),wx.NO_BORDER|wx.BU_NOTEXT,label,label +"\nclick to change",self.ClickOnCtrls] ) #--- grp prescale ctrls.append(["COMBO",g.upper()+".PRESCALE",str(self._GRP.GetPreScale(grp)),self._GRP.Unit.prescales,'set scaling',self.ClickOnCtrls]) #--- grp unit wit prefix e.g. m,u,n,p,f,a => mT,uT,... self._GRP.Unit.unit = self._GRP.GetUnit(grp) # update Unit CLS ctrls.append(["COMBO",g+".UNIT",self._GRP.Unit.unit,self._GRP.Unit.GetUnits(),'set scaling unit',self.ClickOnCtrls]) #--- grp scale mode m = self._GRP.ScaleModes[ self._GRP.GetScaleMode(grp) ] ctrls.append( ["COMBO",g.upper() + ".SCALE",m,self._GRP.ScaleModes,'scale on Custom or MinMax',self.ClickOnScaleMode]) #--- combo select DCoffset # ctrls.append( ["CK", g+".DCOFFSET","",self._GRP.GetDCoffset(grp),'DC Offset',self.ClickOnCtrls] ) m = self._GRP.DCOffsetModes[ self._GRP.GetDCOffsetMode(grp) ] ctrls.append( ["COMBO",g.upper() + ".DCOFFSET",m,self._GRP.DCOffsetModes,'DC Offset Modes e.g.: [None,Global,Time Window]',self.ClickOnCtrls]) self._pnl_groups = JuMEG_wxControlGrid(self,label="Group Parameter",control_list=ctrls,cols=n_cols,set_ctrl_prefix=False,AddGrowableCol=[2,3,4,5]) #self._bt.Bind(wx.EVT_BUTTON,self.ClickOnButton) def _popup_colour_table(self,obj,grp): PCT = PopupColourTable(self,title="Group: "+obj.GetName().split(".")[0],caller=obj,colours=self._GRP.Colour,callback=self.update_colour) pos = wx.GetMousePosition() PCT.Position(pos,(0,0)) PCT.Popup() def update_colour(self,obj,label): """ sets the group colour this is the callback executed from PopupColourTable may use wx.EVENTS or pubsub :param obj: colour bitmapbutton :param label:colour label: RED,GREEN has to be in colour-object label list ... :return: """ grp,key = obj.GetName().lower().split(".") c = self._GRP.Colour.label2colour(label) obj.SetBackgroundColour( c ) obj.SetToolTipString( label+"\nclick to change") self._GRP.SetColour( grp, label ) # logger.info("set group: {} colour: {}".format(grp,self._GRP.GetGroup(grp) )) def ClickOnScaleMode(self,evt): """ update scale mode in group obj if <division> enable "PRESCALE","UNIT" else disable :param evt: :return: """ obj = evt.GetEventObject() grp,key = obj.GetName().lower().split(".") idx = obj.GetSelection() self._GRP.SetScaleMode(grp,idx) for label in ["PRESCALE","UNIT"]: w = self.FindWindowByName(grp.upper() + "." + label) w.Enable( not bool(idx) ) def ClickOnCtrls(self,evt): obj = evt.GetEventObject() grp,key = obj.GetName().lower().split(".") if key == "colour": self._popup_colour_table(obj,grp) return v = obj.GetValue() if key == "selected": self._GRP.SetSelected(grp,v ) elif key == "prescale": self._GRP.SetPreScale(grp,v) elif key == "unit": self._GRP.SetUnit(grp,v) elif key =="dcoffset": self._GRP.SetDCOffsetMode(grp,obj.GetSelection()) def ClickOnButton(self,evt): pass def _ApplyLayout(self): vbox = wx.BoxSizer(wx.VERTICAL) #vbox.Add(self._bt,0,LEA,2) vbox.Add(self._pnl_groups,1,LEA,2) #--- fix size to show combos of scale and unit stl = wx.StaticLine(self,size=(520,2) ) stl.SetBackgroundColour("GREY85") vbox.Add(stl,0,LEA,1) vbox.Add(self._pnl_button_box,0,LEA,2) self.SetAutoLayout(True) self.SetSizer(vbox) self.Fit() self.Layout() class ChannelDLG(GroupDLG): def __init__(self,**kwargs): super().__init__(**kwargs) class MainFrame(wx.Frame): def __init__(self, parent, title,**kwargs): super().__init__(parent, title = title) self._init(**kwargs) self._ApplyLayout() def _init(self,**kwargs): self.test = wx.Panel(self) self.show_group_dialog(**kwargs) self.Close() def _ApplyLayout(self): vbox = wx.BoxSizer(wx.VERTICAL) vbox.Add(self.test,1,LEA,4) self.SetSizer(vbox) self.SetAutoLayout(True) self.Fit() self.Show(True) def show_group_dialog(self,**kwargs): dlg = GroupDLG(self,**kwargs) out = dlg.ShowModal() if out == wx.ID_APPLY: grp = dlg.Group.GetGroup(None) for g in grp.keys(): logger.info("OUTPUT: {} => {} \n {}".format(g,dlg.Group.GetScaling(g),grp.get(g))) dlg.Destroy() if __name__ == "__main__": opt=None #--- Testing DEBUG from tsv.utils.jumeg_tsv_utils_io_data import JuMEG_TSV_Utils_IO_Data from tsv.plot.jumeg_tsv_plot2d_data_options import JuMEG_TSV_PLOT2D_DATA_OPTIONS,GroupOptions # from tsv.wxutils.jumeg_tsv_wxutils_dlg_settings import GroupDLG,ChannelDLG verbose = True path = "data" path = "~/MEGBoers/programs/JuMEG/jumeg-py/jumeg-py-git-fboers-2019-08-21/projects/JuMEGTSV/data" fname = '200098_leda_test_10_raw.fif' raw = None jumeg_logger.setup_script_logging(name="JuMEG",opt=opt,logger=logger) IO = JuMEG_TSV_Utils_IO_Data() raw,bads = IO.load_data(raw,fname,path) #--- ToDo use only groups from raw GRP = GroupOptions() DOpt = JuMEG_TSV_PLOT2D_DATA_OPTIONS(raw=raw) DOpt.update(verbose=True,debug=True) app = wx.App() MainFrame(None,'JuMEG demo',grp=GRP) app.MainLoop()
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 29937, 448, 29974, 29899, 29883, 3689, 29901, 23616, 29899, 29947, 448, 29974, 29899, 13, 13, 29937, 2683, 2683, 9072, 13, 29937, 13189, 943, 29901, 529, 5813, 29958, 3532, 26862, 6227, 6778, 13, 29937, 13, 29937, 2683, 2683, 9072, 13, 29937, 4712, 29901, 29871, 29900, 29945, 29889, 29900, 29929, 29889, 29896, 29929, 13, 29937, 2683, 2683, 9072, 13, 29937, 19245, 29901, 350, 7230, 313, 29941, 29899, 16398, 1509, 29897, 13, 29937, 2683, 2683, 9072, 13, 29937, 5020, 15190, 13, 29937, 2683, 2683, 9072, 13, 13, 5215, 12655, 408, 7442, 13, 5215, 26437, 13, 5215, 10876, 29892, 21027, 13, 13, 3166, 432, 398, 387, 29889, 3188, 1053, 432, 398, 387, 29918, 21707, 13, 21707, 353, 12183, 29889, 657, 16363, 877, 29926, 398, 387, 1495, 13, 13, 13, 3166, 432, 398, 387, 29889, 23569, 29889, 23310, 1982, 29889, 13239, 29889, 29926, 398, 387, 29918, 23569, 29918, 23310, 1982, 29918, 13239, 29918, 26255, 1053, 5342, 2303, 29954, 29918, 23310, 4809, 5756, 13, 3166, 432, 398, 387, 29889, 23569, 29889, 1372, 29894, 29889, 23310, 13239, 29889, 29926, 398, 387, 29918, 1372, 29894, 29918, 23310, 13239, 795, 1053, 360, 29931, 29954, 3125, 7490, 13, 13, 1649, 3259, 1649, 543, 29906, 29900, 29896, 29929, 29899, 29900, 29929, 29899, 29896, 29941, 29899, 29900, 29900, 29896, 29908, 13, 13, 1307, 29909, 353, 26437, 29889, 1964, 17298, 29918, 28024, 891, 26437, 29889, 5746, 29925, 9468, 891, 26437, 29889, 9818, 13, 13, 1990, 6977, 786, 1625, 473, 3562, 29898, 23310, 29889, 12310, 786, 4300, 993, 5907, 1125, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 3847, 29892, 1068, 19290, 1125, 13, 4706, 2428, 2141, 1649, 2344, 12035, 3560, 29892, 23310, 29889, 6632, 29918, 29933, 22364, 29897, 13, 4706, 1583, 3032, 23310, 29918, 2344, 29898, 1068, 19290, 29897, 13, 4706, 1583, 3032, 2052, 368, 3453, 580, 13, 13, 1678, 822, 903, 23310, 29918, 2344, 29898, 1311, 29892, 1068, 19290, 1125, 13, 4706, 1583, 29889, 2697, 10581, 1625, 473, 29898, 19290, 29889, 657, 703, 16264, 3284, 29954, 1525, 29979, 29953, 29900, 5783, 13, 4706, 281, 353, 9049, 5085, 29889, 657, 703, 29893, 613, 29906, 29946, 29897, 13, 4706, 1583, 3032, 29907, 4706, 353, 9049, 5085, 29889, 657, 703, 1054, 2470, 1159, 13, 4706, 1583, 3032, 4804, 261, 259, 353, 9049, 5085, 29889, 657, 703, 4804, 261, 1159, 13, 4706, 1583, 3032, 14035, 353, 9049, 5085, 29889, 657, 703, 14035, 1159, 13, 4706, 1583, 3032, 3257, 1678, 353, 9049, 5085, 29889, 657, 703, 3257, 3284, 29967, 29884, 2303, 29954, 7605, 1530, 473, 1159, 13, 4706, 1583, 3032, 1054, 473, 29918, 726, 353, 6213, 13, 308, 13, 4706, 289, 1526, 259, 353, 26437, 29889, 15184, 580, 13, 4706, 274, 509, 3137, 353, 5159, 13, 308, 13, 4706, 363, 474, 297, 3464, 29898, 1583, 3032, 29907, 29889, 29876, 29918, 1054, 2470, 29871, 1125, 13, 965, 396, 5634, 1831, 12384, 13, 9651, 274, 509, 3137, 29889, 4397, 29898, 6796, 29933, 24895, 3580, 613, 1311, 3032, 29907, 29889, 21134, 29961, 29875, 1402, 29890, 1526, 22657, 29893, 29892, 29893, 511, 23310, 29889, 6632, 29918, 29933, 22364, 29989, 23310, 29889, 7838, 29918, 12256, 12194, 29892, 1311, 3032, 29907, 29889, 1054, 2470, 29961, 29875, 29962, 1919, 1311, 3032, 29907, 29889, 21134, 29961, 29875, 1402, 1311, 29889, 4164, 2951, 29907, 509, 3137, 29962, 1723, 13, 418, 13, 539, 396, 5634, 22235, 28730, 363, 6856, 13, 4706, 302, 29918, 22724, 29892, 5060, 353, 1933, 1545, 29898, 7431, 29898, 24220, 29879, 511, 29946, 29897, 13, 4706, 565, 1791, 29901, 302, 29918, 22724, 4619, 29871, 29896, 13, 308, 13, 4706, 1583, 3032, 29886, 12938, 353, 5342, 2303, 29954, 29918, 23310, 4809, 5756, 29898, 1311, 29892, 1643, 29922, 1583, 3032, 3257, 29892, 6451, 29918, 1761, 29922, 24220, 29879, 29892, 22724, 29922, 29876, 29918, 22724, 29892, 842, 29918, 24220, 29918, 13506, 29922, 8824, 29897, 13, 308, 13, 308, 13, 1678, 822, 16297, 2951, 29907, 509, 3137, 29898, 1311, 29892, 5750, 29873, 1125, 13, 4706, 5446, 353, 3415, 29873, 29889, 2577, 2624, 2061, 580, 13, 308, 13, 4706, 1018, 29901, 13, 965, 565, 5446, 29889, 2577, 12229, 29911, 666, 7295, 13, 632, 1583, 3032, 1054, 473, 29918, 726, 353, 5446, 29889, 2577, 12229, 29911, 666, 1626, 580, 13, 965, 396, 5634, 1246, 278, 24959, 29899, 2220, 297, 3847, 13, 632, 565, 1583, 3032, 1054, 473, 29918, 726, 29901, 13, 18884, 1583, 3032, 14035, 29898, 1583, 3032, 4804, 261, 29892, 1311, 3032, 1054, 473, 29918, 726, 1723, 13, 965, 396, 5634, 3802, 13, 632, 1583, 29889, 29928, 28303, 580, 396, 3802, 372, 13, 4706, 5174, 29901, 13, 9651, 17927, 29889, 11739, 703, 489, 976, 14431, 508, 451, 731, 21704, 29911, 666, 1642, 4830, 29898, 1311, 3032, 1054, 473, 29918, 726, 876, 13, 308, 13, 1678, 822, 903, 2052, 368, 3453, 29898, 1311, 1125, 13, 4706, 325, 1884, 353, 26437, 29889, 3313, 29903, 3950, 29898, 23310, 29889, 5348, 29911, 2965, 1964, 29897, 13, 4706, 325, 1884, 29889, 2528, 29898, 1311, 3032, 29886, 12938, 29892, 29896, 29892, 1307, 29909, 29892, 29906, 29897, 13, 418, 13, 4706, 1583, 29889, 2697, 12300, 3453, 29898, 5574, 29897, 13, 4706, 1583, 29889, 2697, 29903, 3950, 29898, 29894, 1884, 29897, 13, 4706, 1583, 29889, 29943, 277, 580, 13, 4706, 1583, 29889, 3453, 580, 13, 308, 13, 13, 1990, 6431, 19558, 29954, 29898, 23310, 29889, 7647, 1125, 13, 1678, 9995, 13, 268, 13, 1678, 8741, 29901, 13, 1678, 448, 1378, 13, 1678, 1881, 2318, 9657, 13, 268, 13, 1678, 11073, 353, 6024, 5105, 3788, 11082, 3788, 29872, 387, 3788, 303, 326, 3788, 29872, 468, 3788, 331, 29887, 3788, 687, 29887, 3788, 999, 29918, 29885, 387, 2033, 13, 1678, 867, 29886, 3790, 13, 462, 539, 525, 11082, 2396, 1678, 8853, 8391, 1115, 5574, 1699, 1054, 473, 4710, 19386, 613, 539, 376, 4569, 29883, 744, 1115, 29906, 29900, 29900, 1699, 5441, 4710, 29888, 29911, 10758, 13, 462, 539, 525, 5105, 2396, 259, 8853, 8391, 1115, 5574, 1699, 1054, 473, 4710, 13367, 4462, 613, 418, 376, 4569, 29883, 744, 1115, 29906, 29900, 29900, 1699, 5441, 4710, 29888, 29911, 10758, 13, 462, 539, 525, 999, 29918, 29885, 387, 2396, 6377, 8391, 1115, 5574, 1699, 1054, 473, 4710, 29954, 1525, 1430, 613, 268, 376, 4569, 29883, 744, 1115, 29906, 29892, 29871, 376, 5441, 4710, 29886, 29911, 10758, 13, 462, 539, 525, 29872, 387, 2396, 1678, 8853, 8391, 1115, 5574, 1699, 1054, 473, 4710, 13367, 4462, 613, 418, 376, 4569, 29883, 744, 1115, 29896, 29892, 29871, 376, 5441, 4710, 29884, 29963, 10758, 13, 462, 539, 525, 29872, 468, 2396, 1678, 8853, 8391, 1115, 5574, 1699, 1054, 473, 4710, 29925, 4574, 29925, 1307, 613, 1678, 376, 4569, 29883, 744, 1115, 29896, 29900, 29900, 1699, 5441, 4710, 29884, 29963, 10758, 13, 462, 539, 525, 331, 29887, 2396, 1678, 8853, 8391, 1115, 5574, 1699, 1054, 473, 4710, 29928, 1718, 29968, 1955, 24336, 3284, 4569, 29883, 744, 1115, 29896, 29900, 29900, 1699, 5441, 4710, 29884, 29963, 10758, 13, 462, 539, 525, 687, 29887, 2396, 1678, 8853, 8391, 1115, 5574, 1699, 1054, 473, 4710, 29928, 1718, 29968, 29954, 1525, 1430, 613, 376, 4569, 29883, 744, 1115, 29896, 29900, 29900, 1699, 5441, 4710, 29885, 29963, 10758, 13, 462, 539, 525, 303, 326, 2396, 259, 8853, 8391, 1115, 5574, 1699, 1054, 473, 4710, 29907, 29979, 2190, 613, 418, 376, 4569, 29883, 744, 1115, 29896, 29892, 29871, 376, 5441, 4710, 14836, 9092, 13, 462, 539, 500, 13, 539, 13, 268, 13, 1678, 9995, 13, 1678, 732, 6799, 13, 1678, 822, 6431, 29898, 1311, 1125, 736, 1583, 3032, 14345, 29925, 13, 268, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 3560, 29892, 1068, 19290, 1125, 13, 4706, 3114, 29922, 23310, 29889, 29907, 3927, 1660, 29918, 8456, 29990, 29989, 23310, 29889, 12648, 7833, 29902, 10721, 29918, 8456, 29990, 29989, 23310, 29889, 16173, 7833, 29902, 10721, 29918, 8456, 29990, 891, 23310, 29889, 1525, 14226, 29918, 29933, 22364, 13, 4706, 2428, 2141, 1649, 2344, 12035, 3560, 29892, 3257, 543, 29967, 29884, 2303, 29954, 6431, 19215, 613, 3293, 29922, 3293, 29897, 13, 4706, 1583, 3032, 2344, 29898, 1068, 19290, 29897, 13, 13, 1678, 822, 903, 2344, 29898, 1311, 29892, 1068, 19290, 1125, 13, 4706, 1583, 3032, 14345, 29925, 353, 9049, 5085, 29889, 657, 703, 629, 29886, 1159, 13, 308, 13, 4706, 1583, 3032, 23310, 29918, 2344, 29898, 1068, 19290, 29897, 13, 4706, 1583, 3032, 23310, 29918, 3092, 29918, 1884, 580, 13, 4706, 1583, 3032, 2052, 368, 3453, 580, 13, 308, 13, 1678, 822, 903, 23310, 29918, 3092, 29918, 1884, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 1510, 360, 29931, 29954, 12611, 3394, 289, 1372, 13, 4706, 584, 2457, 29901, 13, 4706, 9995, 13, 4706, 1583, 3032, 29886, 12938, 29918, 3092, 29918, 1884, 353, 360, 29931, 29954, 3125, 7490, 29898, 1311, 29892, 3293, 29922, 23310, 29889, 29903, 3904, 29968, 1430, 29918, 29933, 22364, 29897, 13, 268, 13, 1678, 822, 903, 23310, 29918, 2344, 29898, 1311, 29892, 1068, 19290, 1125, 13, 4706, 281, 353, 9049, 5085, 29889, 657, 703, 29893, 613, 29906, 29946, 29897, 13, 4706, 1583, 29889, 2697, 10581, 1625, 473, 29898, 19290, 29889, 657, 703, 16264, 3284, 29954, 1525, 29979, 29929, 29900, 5783, 13, 4706, 1583, 29889, 2697, 8140, 3505, 3552, 29871, 29953, 29906, 29900, 29892, 29946, 29900, 29900, 29897, 1723, 13, 4706, 396, 1583, 3032, 3116, 29922, 23310, 29889, 3125, 29898, 1311, 6653, 29896, 1699, 18267, 1159, 13, 308, 13, 4706, 289, 1526, 259, 353, 26437, 29889, 15184, 580, 13, 4706, 274, 509, 3137, 353, 518, 6796, 1254, 12188, 3284, 24020, 3284, 24020, 12436, 6796, 1254, 12188, 3284, 1625, 473, 3284, 1625, 473, 12436, 6796, 1254, 12188, 3284, 17185, 3284, 17185, 29914, 12596, 12436, 29961, 376, 1254, 12188, 3284, 8325, 3284, 8325, 12436, 3366, 1254, 12188, 3284, 17185, 21864, 3284, 17185, 21864, 12436, 3366, 1254, 12188, 3284, 12696, 5947, 842, 3284, 12696, 5947, 842, 3108, 29962, 13, 4706, 302, 29918, 22724, 29922, 7431, 29898, 24220, 29879, 29897, 13, 308, 13, 4706, 363, 867, 29886, 297, 1583, 3032, 14345, 29925, 29889, 21134, 29901, 13, 9651, 330, 353, 867, 29886, 29889, 21064, 580, 13, 632, 13, 3986, 396, 5634, 274, 29895, 3092, 1831, 2318, 13, 9651, 274, 509, 3137, 29889, 4397, 29898, 6796, 7077, 613, 29871, 330, 29974, 1642, 6404, 3352, 613, 29887, 29892, 1311, 3032, 14345, 29925, 29889, 2577, 8592, 29898, 629, 29886, 511, 29915, 311, 29914, 2622, 2318, 742, 1311, 29889, 4164, 2951, 29907, 509, 3137, 29962, 1723, 13, 3986, 396, 5634, 1831, 12384, 13, 9651, 3858, 353, 1583, 3032, 14345, 29925, 29889, 2577, 1625, 473, 29898, 629, 29886, 29897, 13, 9651, 274, 509, 3137, 29889, 4397, 29898, 6796, 29933, 24895, 3580, 613, 29887, 29974, 1642, 1054, 473, 613, 29890, 1526, 22657, 29893, 29892, 29893, 511, 23310, 29889, 6632, 29918, 29933, 22364, 29989, 23310, 29889, 7838, 29918, 12256, 12194, 29892, 1643, 29892, 1643, 718, 26732, 29876, 3808, 304, 1735, 613, 1311, 29889, 4164, 2951, 29907, 509, 3137, 29962, 1723, 13, 3986, 396, 5634, 867, 29886, 2225, 29883, 744, 13, 9651, 274, 509, 3137, 29889, 4397, 29898, 3366, 19795, 8456, 613, 29887, 29889, 21064, 580, 29974, 1642, 15094, 29903, 5454, 1307, 613, 710, 29898, 1311, 3032, 14345, 29925, 29889, 2577, 6572, 17185, 29898, 629, 29886, 8243, 1311, 3032, 14345, 29925, 29889, 8325, 29889, 4569, 1052, 267, 5501, 842, 21640, 742, 1311, 29889, 4164, 2951, 29907, 509, 3137, 2314, 13, 3986, 396, 5634, 867, 29886, 5190, 12309, 29871, 10944, 321, 29889, 29887, 29889, 286, 29892, 29884, 29892, 29876, 29892, 29886, 29892, 29888, 29892, 29874, 1149, 286, 29911, 29892, 29884, 29911, 29892, 856, 13, 9651, 1583, 3032, 14345, 29925, 29889, 8325, 29889, 5441, 353, 1583, 3032, 14345, 29925, 29889, 2577, 8325, 29898, 629, 29886, 29897, 396, 2767, 13223, 315, 8547, 13, 9651, 274, 509, 3137, 29889, 4397, 29898, 3366, 19795, 8456, 613, 29887, 29974, 1642, 3904, 1806, 613, 1311, 3032, 14345, 29925, 29889, 8325, 29889, 5441, 29892, 1311, 3032, 14345, 29925, 29889, 8325, 29889, 2577, 2525, 1169, 3285, 29915, 842, 21640, 5190, 742, 1311, 29889, 4164, 2951, 29907, 509, 3137, 2314, 13, 3986, 396, 5634, 867, 29886, 6287, 4464, 13, 9651, 286, 353, 1583, 3032, 14345, 29925, 29889, 17185, 2111, 267, 29961, 1583, 3032, 14345, 29925, 29889, 2577, 17185, 6818, 29898, 629, 29886, 29897, 4514, 13, 9651, 274, 509, 3137, 29889, 4397, 29898, 6796, 19795, 8456, 613, 29887, 29889, 21064, 580, 718, 11393, 29903, 5454, 1307, 613, 29885, 29892, 1311, 3032, 14345, 29925, 29889, 17185, 2111, 267, 5501, 7052, 373, 8701, 470, 3080, 7976, 742, 1311, 29889, 4164, 2951, 17185, 6818, 2314, 13, 3986, 396, 5634, 419, 833, 1831, 13681, 10289, 13, 965, 396, 274, 509, 3137, 29889, 4397, 29898, 6796, 7077, 613, 29871, 330, 29974, 1642, 29928, 3217, 4198, 10490, 3284, 613, 1311, 3032, 14345, 29925, 29889, 2577, 12696, 10289, 29898, 629, 29886, 511, 29915, 12696, 5947, 842, 742, 1311, 29889, 4164, 2951, 29907, 509, 3137, 29962, 1723, 13, 9651, 286, 353, 1583, 3032, 14345, 29925, 29889, 29928, 3217, 600, 842, 2111, 267, 29961, 1583, 3032, 14345, 29925, 29889, 2577, 29928, 3217, 600, 842, 6818, 29898, 629, 29886, 29897, 4514, 13, 9651, 274, 509, 3137, 29889, 4397, 29898, 6796, 19795, 8456, 613, 29887, 29889, 21064, 580, 718, 11393, 29928, 3217, 4198, 10490, 613, 29885, 29892, 1311, 3032, 14345, 29925, 29889, 29928, 3217, 600, 842, 2111, 267, 5501, 12696, 5947, 842, 341, 2631, 321, 29889, 29887, 4898, 518, 8516, 29892, 12756, 29892, 2481, 18379, 29962, 742, 1311, 29889, 4164, 2951, 29907, 509, 3137, 2314, 13, 965, 13, 4706, 1583, 3032, 29886, 12938, 29918, 13155, 353, 5342, 2303, 29954, 29918, 23310, 4809, 5756, 29898, 1311, 29892, 1643, 543, 4782, 24953, 613, 6451, 29918, 1761, 29922, 24220, 29879, 29892, 22724, 29922, 29876, 29918, 22724, 29892, 842, 29918, 24220, 29918, 13506, 29922, 8824, 29892, 2528, 29954, 798, 519, 1625, 11759, 29906, 29892, 29941, 29892, 29946, 29892, 29945, 2314, 13, 418, 13, 4706, 396, 1311, 3032, 3116, 29889, 15708, 29898, 23310, 29889, 22240, 29911, 29918, 29933, 2692, 29911, 1164, 29892, 1311, 29889, 4164, 2951, 3125, 29897, 13, 1678, 13, 1678, 822, 903, 7323, 786, 29918, 1054, 473, 29918, 2371, 29898, 1311, 29892, 5415, 29892, 629, 29886, 1125, 13, 4706, 349, 1783, 353, 6977, 786, 1625, 473, 3562, 29898, 1311, 29892, 3257, 543, 4782, 29901, 15691, 5415, 29889, 2577, 1170, 2141, 5451, 17350, 1159, 29961, 29900, 1402, 4804, 261, 29922, 5415, 29892, 1054, 2470, 29922, 1311, 3032, 14345, 29925, 29889, 1625, 473, 29892, 14035, 29922, 1311, 29889, 5504, 29918, 1054, 473, 29897, 13, 4706, 926, 353, 26437, 29889, 2577, 14346, 8003, 580, 13, 4706, 349, 1783, 29889, 8003, 29898, 1066, 22657, 29900, 29892, 29900, 876, 13, 4706, 349, 1783, 29889, 12310, 786, 580, 13, 268, 13, 1678, 822, 2767, 29918, 1054, 473, 29898, 1311, 29892, 5415, 29892, 1643, 1125, 13, 4706, 9995, 13, 4706, 6166, 278, 2318, 12384, 13, 4706, 445, 338, 278, 6939, 8283, 515, 6977, 786, 1625, 473, 3562, 13, 4706, 1122, 671, 26437, 29889, 22240, 3919, 29903, 470, 2529, 1491, 13, 4706, 584, 3207, 5446, 29901, 29871, 12384, 29871, 21170, 3092, 13, 4706, 584, 3207, 3858, 29901, 1054, 473, 3858, 29901, 390, 3352, 29892, 29954, 1525, 1430, 756, 304, 367, 297, 12384, 29899, 3318, 3858, 1051, 2023, 13, 4706, 584, 2457, 29901, 13, 4706, 9995, 13, 4706, 867, 29886, 29892, 1989, 353, 5446, 29889, 2577, 1170, 2141, 13609, 2141, 5451, 17350, 1159, 13, 4706, 274, 353, 1583, 3032, 14345, 29925, 29889, 1625, 473, 29889, 1643, 29906, 1054, 473, 29898, 1643, 29897, 13, 4706, 5446, 29889, 2697, 10581, 1625, 473, 29898, 274, 1723, 13, 4706, 5446, 29889, 2697, 12229, 29911, 666, 1231, 29898, 3858, 13578, 29905, 29876, 3808, 304, 1735, 1159, 13, 4706, 1583, 3032, 14345, 29925, 29889, 2697, 1625, 473, 29898, 867, 29886, 29892, 3858, 1723, 13, 308, 13, 4706, 396, 17927, 29889, 3888, 703, 842, 2318, 29901, 6571, 12384, 29901, 6571, 1642, 4830, 29898, 629, 29886, 29892, 1311, 3032, 14345, 29925, 29889, 2577, 4782, 29898, 629, 29886, 29897, 29871, 876, 13, 268, 13, 1678, 822, 16297, 2951, 17185, 6818, 29898, 1311, 29892, 5750, 29873, 1125, 13, 4706, 9995, 13, 4706, 2767, 6287, 4464, 297, 2318, 5446, 13, 4706, 565, 529, 4563, 2459, 29958, 9025, 376, 15094, 29903, 5454, 1307, 3284, 3904, 1806, 29908, 13, 4706, 1683, 11262, 13, 308, 13, 4706, 584, 3207, 3415, 29873, 29901, 13, 4706, 584, 2457, 29901, 13, 4706, 9995, 13, 4706, 5446, 353, 3415, 29873, 29889, 2577, 2624, 2061, 580, 13, 4706, 867, 29886, 29892, 1989, 353, 5446, 29889, 2577, 1170, 2141, 13609, 2141, 5451, 17350, 1159, 13, 308, 13, 4706, 22645, 353, 5446, 29889, 2577, 15097, 580, 13, 4706, 1583, 3032, 14345, 29925, 29889, 2697, 17185, 6818, 29898, 629, 29886, 29892, 13140, 29897, 13, 4706, 363, 3858, 297, 6796, 15094, 29903, 5454, 1307, 3284, 3904, 1806, 3108, 29901, 13, 9651, 281, 353, 1583, 29889, 12542, 5907, 2059, 1170, 29898, 629, 29886, 29889, 21064, 580, 718, 376, 1213, 718, 3858, 29897, 13, 9651, 281, 29889, 20701, 29898, 451, 6120, 29898, 13140, 29897, 1723, 13, 13, 1678, 822, 16297, 2951, 29907, 509, 3137, 29898, 1311, 29892, 5750, 29873, 1125, 13, 4706, 5446, 268, 353, 3415, 29873, 29889, 2577, 2624, 2061, 580, 13, 4706, 867, 29886, 29892, 1989, 353, 5446, 29889, 2577, 1170, 2141, 13609, 2141, 5451, 17350, 1159, 13, 308, 13, 4706, 565, 1820, 1275, 376, 1054, 473, 1115, 13, 965, 1583, 3032, 7323, 786, 29918, 1054, 473, 29918, 2371, 29898, 5415, 29892, 629, 29886, 29897, 13, 965, 736, 13, 308, 13, 4706, 325, 353, 5446, 29889, 2577, 1917, 580, 13, 4706, 565, 1820, 1275, 376, 8391, 1115, 13, 965, 1583, 3032, 14345, 29925, 29889, 2697, 8592, 29898, 629, 29886, 29892, 29894, 1723, 13, 4706, 25342, 1820, 1275, 376, 4569, 29883, 744, 1115, 13, 632, 1583, 3032, 14345, 29925, 29889, 2697, 6572, 17185, 29898, 629, 29886, 29892, 29894, 29897, 13, 4706, 25342, 1820, 1275, 376, 5441, 1115, 13, 9651, 1583, 3032, 14345, 29925, 29889, 2697, 8325, 29898, 629, 29886, 29892, 29894, 29897, 13, 4706, 25342, 1820, 353, 543, 29881, 1111, 600, 842, 1115, 13, 9651, 1583, 3032, 14345, 29925, 29889, 2697, 29928, 3217, 600, 842, 6818, 29898, 629, 29886, 29892, 5415, 29889, 2577, 15097, 3101, 13, 268, 13, 1678, 822, 16297, 2951, 3125, 29898, 1311, 29892, 5750, 29873, 1125, 13, 4706, 1209, 13, 1678, 13, 1678, 822, 903, 2052, 368, 3453, 29898, 1311, 1125, 13, 4706, 325, 1884, 353, 26437, 29889, 3313, 29903, 3950, 29898, 23310, 29889, 5348, 29911, 2965, 1964, 29897, 13, 4706, 396, 29894, 1884, 29889, 2528, 29898, 1311, 3032, 3116, 29892, 29900, 29892, 1307, 29909, 29892, 29906, 29897, 13, 4706, 325, 1884, 29889, 2528, 29898, 1311, 3032, 29886, 12938, 29918, 13155, 29892, 29896, 29892, 1307, 29909, 29892, 29906, 29897, 13, 268, 13, 539, 396, 5634, 2329, 2159, 304, 1510, 4145, 359, 310, 6287, 322, 5190, 13, 4706, 380, 29880, 353, 26437, 29889, 17046, 3542, 29898, 1311, 29892, 2311, 7607, 29945, 29906, 29900, 29892, 29906, 29897, 1723, 13, 4706, 380, 29880, 29889, 2697, 10581, 1625, 473, 703, 29954, 1525, 29979, 29947, 29945, 1159, 13, 4706, 325, 1884, 29889, 2528, 29898, 303, 29880, 29892, 29900, 29892, 1307, 29909, 29892, 29896, 29897, 13, 4706, 325, 1884, 29889, 2528, 29898, 1311, 3032, 29886, 12938, 29918, 3092, 29918, 1884, 29892, 29900, 29892, 1307, 29909, 29892, 29906, 29897, 13, 268, 13, 4706, 1583, 29889, 2697, 12300, 3453, 29898, 5574, 29897, 13, 4706, 1583, 29889, 2697, 29903, 3950, 29898, 29894, 1884, 29897, 13, 4706, 1583, 29889, 29943, 277, 580, 13, 4706, 1583, 29889, 3453, 580, 13, 13, 1990, 17368, 19558, 29954, 29898, 4782, 19558, 29954, 1125, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 1068, 19290, 1125, 13, 4706, 2428, 2141, 1649, 2344, 12035, 1068, 19290, 29897, 13, 308, 13, 308, 13, 1990, 4241, 4308, 29898, 23310, 29889, 4308, 1125, 13, 1678, 13, 259, 822, 4770, 2344, 12035, 1311, 29892, 3847, 29892, 3611, 29892, 1068, 19290, 1125, 13, 418, 2428, 2141, 1649, 2344, 12035, 3560, 29892, 3611, 353, 3611, 29897, 13, 418, 1583, 3032, 2344, 29898, 1068, 19290, 29897, 13, 418, 1583, 3032, 2052, 368, 3453, 580, 13, 1678, 13, 259, 822, 903, 2344, 29898, 1311, 29892, 1068, 19290, 1125, 13, 539, 1583, 29889, 1688, 353, 26437, 29889, 7490, 29898, 1311, 29897, 13, 539, 1583, 29889, 4294, 29918, 2972, 29918, 15901, 29898, 1068, 19290, 29897, 13, 539, 1583, 29889, 11123, 580, 13, 4706, 13, 259, 822, 903, 2052, 368, 3453, 29898, 1311, 1125, 13, 539, 325, 1884, 353, 26437, 29889, 3313, 29903, 3950, 29898, 23310, 29889, 5348, 29911, 2965, 1964, 29897, 13, 539, 325, 1884, 29889, 2528, 29898, 1311, 29889, 1688, 29892, 29896, 29892, 1307, 29909, 29892, 29946, 29897, 13, 539, 1583, 29889, 2697, 29903, 3950, 29898, 29894, 1884, 29897, 13, 539, 1583, 29889, 2697, 12300, 3453, 29898, 5574, 29897, 13, 539, 1583, 29889, 29943, 277, 580, 13, 539, 1583, 29889, 8964, 29898, 5574, 29897, 13, 4706, 13, 259, 822, 1510, 29918, 2972, 29918, 15901, 29898, 1311, 29892, 1068, 19290, 1125, 13, 539, 270, 19920, 353, 6431, 19558, 29954, 29898, 1311, 29892, 1068, 19290, 29897, 13, 539, 714, 353, 270, 19920, 29889, 8964, 19751, 580, 13, 268, 13, 539, 565, 714, 1275, 26437, 29889, 1367, 29918, 3301, 7390, 29979, 29901, 13, 3986, 867, 29886, 353, 270, 19920, 29889, 4782, 29889, 2577, 4782, 29898, 8516, 29897, 13, 3986, 363, 330, 297, 867, 29886, 29889, 8149, 7295, 13, 795, 17927, 29889, 3888, 703, 12015, 12336, 29901, 6571, 1149, 6571, 320, 29876, 6571, 1642, 4830, 29898, 29887, 29892, 11671, 29887, 29889, 4782, 29889, 2577, 29636, 292, 29898, 29887, 511, 629, 29886, 29889, 657, 29898, 29887, 4961, 13, 268, 13, 539, 270, 19920, 29889, 14994, 4727, 580, 13, 13, 13, 13, 361, 4770, 978, 1649, 1275, 376, 1649, 3396, 1649, 1115, 13, 1678, 3523, 29922, 8516, 13, 13, 1678, 396, 5634, 29871, 4321, 292, 21681, 13, 1678, 515, 260, 4501, 29889, 13239, 29889, 29926, 398, 387, 29918, 1372, 29894, 29918, 13239, 29918, 601, 29918, 1272, 539, 1053, 5342, 2303, 29954, 29918, 29911, 7597, 29918, 12177, 29918, 5971, 29918, 1469, 13, 1678, 515, 260, 4501, 29889, 5317, 29889, 29926, 398, 387, 29918, 1372, 29894, 29918, 5317, 29906, 29881, 29918, 1272, 29918, 6768, 29871, 1053, 5342, 2303, 29954, 29918, 29911, 7597, 29918, 7390, 2891, 29906, 29928, 29918, 14573, 29918, 14094, 27946, 29892, 4782, 5856, 13, 268, 13, 1678, 396, 515, 260, 4501, 29889, 23310, 13239, 29889, 29926, 398, 387, 29918, 1372, 29894, 29918, 23310, 13239, 29918, 11671, 29887, 29918, 11027, 1053, 6431, 19558, 29954, 29892, 13599, 19558, 29954, 13, 268, 13, 1678, 26952, 353, 5852, 13, 1678, 2224, 29871, 353, 376, 1272, 29908, 13, 1678, 2224, 29871, 353, 376, 20038, 2303, 7210, 29877, 414, 29914, 8860, 29879, 29914, 29967, 29884, 2303, 29954, 29914, 29926, 398, 387, 29899, 2272, 29914, 29926, 398, 387, 29899, 2272, 29899, 5559, 29899, 29888, 833, 414, 29899, 29906, 29900, 29896, 29929, 29899, 29900, 29947, 29899, 29906, 29896, 29914, 16418, 29914, 29967, 29884, 2303, 23799, 7597, 29914, 1272, 29908, 13, 1678, 285, 978, 353, 525, 29906, 29900, 29900, 29900, 29929, 29947, 29918, 839, 29874, 29918, 1688, 29918, 29896, 29900, 29918, 1610, 29889, 28491, 29915, 13, 1678, 10650, 259, 353, 6213, 13, 13, 268, 13, 268, 13, 1678, 432, 398, 387, 29918, 21707, 29889, 14669, 29918, 2154, 29918, 21027, 29898, 978, 543, 29967, 29884, 2303, 29954, 613, 3670, 29922, 3670, 29892, 21707, 29922, 21707, 29897, 13, 268, 13, 1678, 10663, 539, 353, 5342, 2303, 29954, 29918, 29911, 7597, 29918, 12177, 29918, 5971, 29918, 1469, 580, 13, 1678, 10650, 29892, 29890, 7925, 353, 10663, 29889, 1359, 29918, 1272, 29898, 1610, 29892, 29888, 978, 29892, 2084, 29897, 13, 259, 396, 5634, 1763, 6132, 671, 871, 6471, 515, 10650, 13, 1678, 18016, 29925, 418, 353, 6431, 5856, 580, 13, 268, 13, 1678, 11662, 415, 353, 5342, 2303, 29954, 29918, 29911, 7597, 29918, 7390, 2891, 29906, 29928, 29918, 14573, 29918, 14094, 27946, 29898, 1610, 29922, 1610, 29897, 13, 1678, 11662, 415, 29889, 5504, 29898, 369, 15828, 29922, 5574, 29892, 8382, 29922, 5574, 29897, 13, 268, 13, 1678, 623, 353, 26437, 29889, 2052, 580, 13, 1678, 4241, 4308, 29898, 8516, 5501, 29967, 29884, 2303, 29954, 13455, 742, 629, 29886, 29922, 14345, 29925, 29897, 13, 1678, 623, 29889, 6330, 18405, 580, 13, 2 ]
du/ps_utils.py
diogo149/doo
1
14670
import os import psutil import time def process_time(): p = psutil.Process(os.getpid()) return time.time() - p.create_time()
[ 1, 1053, 2897, 13, 5215, 6529, 4422, 13, 5215, 931, 13, 13, 13, 1753, 1889, 29918, 2230, 7295, 13, 1678, 282, 353, 6529, 4422, 29889, 7032, 29898, 359, 29889, 657, 5935, 3101, 13, 1678, 736, 931, 29889, 2230, 580, 448, 282, 29889, 3258, 29918, 2230, 580, 13, 2 ]
scripts/hdfs_store.py
coastrock/CEBD1261-2019-fall-group-project
1
26604
<gh_stars>1-10 try: from zipfile import ZipFile from pyspark import SparkContext, SparkConf from pyspark.sql import SparkSession import pyspark.sql.functions as f import os except Exception as e: print(e) ## http://www.hongyusu.com/imt/technology/spark-via-python-basic-setup-count-lines-and-word-counts.html def push_acc(): spark = SparkSession.builder \ .master('spark://master:7077') \ .appName("Push Accidents data to HDFS") \ .getOrCreate() sc = spark.sparkContext sc.setLogLevel('WARN') # unzip the file # with ZipFile("/volume/data/accidents_2012_2018.zip", 'r') as zipObj: # zipObj.extractall('/volume/data') # read the data from the volume acc_data = spark.read.csv("/volume/data/") # push the data on HDFS as parquet acc_data.write.parquet("hdfs://hadoop/acc_data_parquet") if __name__ == "__main__": push_acc()
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 2202, 29901, 13, 1678, 515, 14319, 1445, 1053, 796, 666, 2283, 13, 1678, 515, 282, 952, 6378, 1053, 20814, 2677, 29892, 20814, 16376, 13, 1678, 515, 282, 952, 6378, 29889, 2850, 1053, 20814, 7317, 13, 1678, 1053, 282, 952, 6378, 29889, 2850, 29889, 12171, 408, 285, 13, 1678, 1053, 2897, 13, 19499, 8960, 408, 321, 29901, 13, 1678, 1596, 29898, 29872, 29897, 13, 13, 2277, 1732, 597, 1636, 29889, 29882, 549, 29891, 375, 29884, 29889, 510, 29914, 326, 29873, 29914, 21695, 3002, 29914, 12597, 29899, 6071, 29899, 4691, 29899, 16121, 29899, 14669, 29899, 2798, 29899, 9012, 29899, 392, 29899, 1742, 29899, 2798, 29879, 29889, 1420, 13, 1753, 5503, 29918, 5753, 7295, 13, 1678, 16267, 353, 20814, 7317, 29889, 16409, 320, 13, 1678, 869, 6207, 877, 12597, 597, 6207, 29901, 29955, 29900, 29955, 29955, 1495, 320, 13, 1678, 869, 932, 1170, 703, 27031, 4831, 16719, 848, 304, 379, 4037, 29903, 1159, 320, 13, 1678, 869, 657, 2816, 4391, 580, 13, 1678, 885, 353, 16267, 29889, 12597, 2677, 13, 1678, 885, 29889, 842, 3403, 10108, 877, 29956, 15249, 1495, 13, 268, 13, 1678, 396, 443, 7554, 278, 934, 29871, 13, 13, 259, 396, 411, 796, 666, 2283, 11974, 24623, 29914, 1272, 29914, 5753, 16719, 29918, 29906, 29900, 29896, 29906, 29918, 29906, 29900, 29896, 29947, 29889, 7554, 613, 525, 29878, 1495, 408, 14319, 9930, 29901, 13, 539, 396, 14319, 9930, 29889, 21111, 497, 11219, 24623, 29914, 1272, 1495, 13, 4706, 13, 1678, 396, 1303, 278, 848, 515, 278, 7977, 13, 268, 13, 1678, 1035, 29918, 1272, 353, 16267, 29889, 949, 29889, 7638, 11974, 24623, 29914, 1272, 29914, 1159, 13, 268, 13, 1678, 396, 5503, 278, 848, 373, 379, 4037, 29903, 408, 610, 12621, 13, 268, 13, 1678, 1035, 29918, 1272, 29889, 3539, 29889, 862, 12621, 703, 29882, 29069, 597, 22075, 29914, 5753, 29918, 1272, 29918, 862, 12621, 1159, 13, 1678, 13, 361, 4770, 978, 1649, 1275, 376, 1649, 3396, 1649, 1115, 13, 1678, 5503, 29918, 5753, 580, 13, 2 ]
parsifal/reviews/metaanalysis/urls.py
glauberferreira/parsifal-mec
1
141682
# coding: utf-8 from django.conf.urls import patterns, include, url urlpatterns = patterns('parsifal.reviews.metaanalysis.views', url(r'^save_metaanalysis/$', 'save_metaanalysis', name='save_metaanalysis'), )
[ 1, 396, 14137, 29901, 23616, 29899, 29947, 13, 13, 3166, 9557, 29889, 5527, 29889, 26045, 1053, 15038, 29892, 3160, 29892, 3142, 13, 13, 2271, 11037, 29879, 353, 15038, 877, 862, 29879, 361, 284, 29889, 276, 7406, 29889, 7299, 15916, 29889, 7406, 742, 13, 1678, 3142, 29898, 29878, 29915, 29985, 7620, 29918, 7299, 15916, 13346, 742, 525, 7620, 29918, 7299, 15916, 742, 1024, 2433, 7620, 29918, 7299, 15916, 5477, 13, 29897, 13, 2 ]
0120.triangle/solution.py
WZMJ/Algorithms
5
100012
<filename>0120.triangle/solution.py from typing import List class Solution: def minimumTotal(self, triangle: List[List[int]]) -> int: # 自底向上 length = len(triangle) if not length: return 0 for i in range(length - 2, -1, -1): for j in range(i + 1): triangle[i][j] = triangle[i][j] + min(triangle[i + 1][j], triangle[i + 1][j + 1]) return triangle[0][0] def top_down(self, triangle) -> int: # 自顶向下 length = len(triangle) if not length: return 0 for i in range(1, length): for j in range(i + 1): if j == 0: triangle[i][0] += triangle[i - 1][0] elif i == j: triangle[i][j] += triangle[i - 1][j - 1] else: triangle[i][j] += min(triangle[i - 1][j], triangle[i - 1][j - 1]) return min(triangle[-1])
[ 1, 529, 9507, 29958, 29900, 29896, 29906, 29900, 29889, 26701, 29914, 2929, 918, 29889, 2272, 13, 3166, 19229, 1053, 2391, 13, 13, 13, 1990, 24380, 29901, 13, 1678, 822, 9212, 11536, 29898, 1311, 29892, 17205, 29901, 2391, 29961, 1293, 29961, 524, 24960, 1599, 938, 29901, 13, 4706, 396, 29871, 30688, 232, 189, 152, 31331, 30429, 13, 4706, 3309, 353, 7431, 29898, 26701, 29897, 13, 4706, 565, 451, 3309, 29901, 13, 9651, 736, 29871, 29900, 13, 4706, 363, 474, 297, 3464, 29898, 2848, 448, 29871, 29906, 29892, 448, 29896, 29892, 448, 29896, 1125, 13, 9651, 363, 432, 297, 3464, 29898, 29875, 718, 29871, 29896, 1125, 13, 18884, 17205, 29961, 29875, 3816, 29926, 29962, 353, 17205, 29961, 29875, 3816, 29926, 29962, 718, 1375, 29898, 26701, 29961, 29875, 718, 29871, 29896, 3816, 29926, 1402, 17205, 29961, 29875, 718, 29871, 29896, 3816, 29926, 718, 29871, 29896, 2314, 13, 4706, 736, 17205, 29961, 29900, 3816, 29900, 29962, 13, 13, 1678, 822, 2246, 29918, 3204, 29898, 1311, 29892, 17205, 29897, 1599, 938, 29901, 13, 4706, 396, 29871, 30688, 236, 164, 185, 31331, 30557, 13, 4706, 3309, 353, 7431, 29898, 26701, 29897, 13, 4706, 565, 451, 3309, 29901, 13, 9651, 736, 29871, 29900, 13, 4706, 363, 474, 297, 3464, 29898, 29896, 29892, 3309, 1125, 13, 9651, 363, 432, 297, 3464, 29898, 29875, 718, 29871, 29896, 1125, 13, 18884, 565, 432, 1275, 29871, 29900, 29901, 13, 462, 1678, 17205, 29961, 29875, 3816, 29900, 29962, 4619, 17205, 29961, 29875, 448, 29871, 29896, 3816, 29900, 29962, 13, 18884, 25342, 474, 1275, 432, 29901, 13, 462, 1678, 17205, 29961, 29875, 3816, 29926, 29962, 4619, 17205, 29961, 29875, 448, 29871, 29896, 3816, 29926, 448, 29871, 29896, 29962, 13, 18884, 1683, 29901, 13, 462, 1678, 17205, 29961, 29875, 3816, 29926, 29962, 4619, 1375, 29898, 26701, 29961, 29875, 448, 29871, 29896, 3816, 29926, 1402, 17205, 29961, 29875, 448, 29871, 29896, 3816, 29926, 448, 29871, 29896, 2314, 13, 4706, 736, 1375, 29898, 26701, 14352, 29896, 2314, 13, 2 ]
libweasyl/libweasyl/test/test_text.py
theSeracen/weasyl
0
194640
# encoding: utf-8 from lxml.etree import LIBXML_VERSION import pytest from libweasyl.text import markdown, markdown_excerpt, markdown_link libxml_xfail = pytest.mark.xfail(LIBXML_VERSION < (2, 9), reason='libxml2 too old to preserve whitespace') user_linking_markdown_tests = [ ('<~spam>', '<a href="/~spam">spam</a>'), ('<!spam>', '<a href="/~spam" class="user-icon"><img src="/~spam/avatar" alt="spam"></a>'), ('![](user:spam)![](user:spam)', '<a href="/~spam" class="user-icon"><img src="/~spam/avatar" alt="spam"></a>' '<a href="/~spam" class="user-icon"><img src="/~spam/avatar" alt="spam"></a>'), ('<!~spam>', '<a href="/~spam" class="user-icon"><img src="/~spam/avatar" alt="spam"> <span>spam</span></a>'), ('![user image with alt text](user:example)', '<a href="/~example" class="user-icon"><img src="/~example/avatar"> <span>user image with alt text</span></a>'), ('<user:spam>', '<a href="/~spam">spam</a>'), ('[link](user:spam)', '<a href="/~spam">link</a>'), ('<fa:spam>', '<a href="https://www.furaffinity.net/user/spam" rel="nofollow ugc">spam</a>'), ('<da:spam>', '<a href="https://www.deviantart.com/spam" rel="nofollow ugc">spam</a>'), ('<ib:spam>', '<a href="https://inkbunny.net/spam" rel="nofollow ugc">spam</a>'), ('<sf:spam>', '<a href="https://spam.sofurry.com/" rel="nofollow ugc">spam</a>'), ] @pytest.mark.parametrize(('target', 'expected'), user_linking_markdown_tests) def test_markdown_basic_user_linking(target, expected): assert markdown(target) == '<p>%s</p>\n' % (expected,) @pytest.mark.parametrize(('target', 'expected'), user_linking_markdown_tests) def test_markdown_user_linking_in_tag(target, expected): assert markdown('<em>%s</em>' % (target,)) == '<p><em>%s</em></p>\n' % (expected,) @pytest.mark.parametrize(('target', 'expected'), user_linking_markdown_tests) def test_markdown_user_linking_in_tail(target, expected): assert markdown('<em>eggs</em>%s' % (target,)) == '<p><em>eggs</em>%s</p>\n' % (expected,) @libxml_xfail @pytest.mark.parametrize(('target', 'expected'), user_linking_markdown_tests) def test_markdown_user_linking_twice_in_tag(target, expected): assert markdown('<em>%s %s</em>' % (target, target)) == '<p><em>%s %s</em></p>\n' % (expected, expected) @pytest.mark.parametrize(('target', 'expected'), user_linking_markdown_tests) def test_markdown_user_linking_twice_in_tag_with_more_text_between(target, expected): assert markdown('<em>%s spam %s</em>' % (target, target)) == '<p><em>%s spam %s</em></p>\n' % (expected, expected) @libxml_xfail @pytest.mark.parametrize(('target', 'expected'), user_linking_markdown_tests) def test_markdown_user_linking_twice_in_tail(target, expected): assert markdown('<em>eggs</em>%s %s' % (target, target)) == ( '<p><em>eggs</em>%s %s</p>\n' % (expected, expected)) @pytest.mark.parametrize(('target', 'expected'), user_linking_markdown_tests) def test_markdown_user_linking_twice_in_tail_with_more_text_betweeen(target, expected): assert markdown('<em>eggs</em>%s spam %s' % (target, target)) == ( '<p><em>eggs</em>%s spam %s</p>\n' % (expected, expected)) @pytest.mark.parametrize(('target', 'expected'), user_linking_markdown_tests) def test_markdown_user_linking_in_markdown(target, expected): assert markdown('*%s*' % (target,)) == '<p><em>%s</em></p>\n' % (expected,) def test_markdown_no_user_links_in_code(): assert markdown('<code><~spam></code>') == '<p><code>&lt;~spam&gt;</code></p>\n' def test_markdown_no_user_links_in_pre(): assert markdown('<pre><~spam></pre>') == '<pre><p>&lt;~spam&gt;</p></pre>\n' def test_markdown_no_user_links_in_links(): assert markdown('<a><~spam></a>') == '<p><a>&lt;~spam&gt;</a></p>\n' def test_markdown_escaped_user_link(): assert markdown('\\\\<~spam>') == '<p>&lt;~spam&gt;</p>\n' def test_markdown_multi_element(): assert markdown('one\n\ntwo') == '<p>one</p>\n\n<p>two</p>\n' def test_markdown_user_linking_with_underscore(): assert markdown('<~hello_world>') == '<p><a href="/~helloworld">hello_world</a></p>\n' def test_markdown_image_replacement(): assert markdown('![example](http://example)') == '<p><a href="http://example" rel="nofollow ugc">example</a></p>\n' assert markdown('<img alt="broken">') == '<p><a href="">broken</a></p>\n' def test_forum_whitelist(): assert markdown('https://forums.weasyl.com/foo') == ( '<p><a href="https://forums.weasyl.com/foo">https://forums.weasyl.com/foo</a></p>\n') def test_markdown_unordered_list(): assert markdown('- five\n- six\n- seven') == '<ul><li>five</li>\n<li>six</li>\n<li>seven</li>\n</ul>' def test_markdown_regular_ordered_list_start(): assert markdown('1. five\n1. six\n1. seven') == '<ol start="1"><li>five</li>\n<li>six</li>\n<li>seven</li>\n</ol>' def test_markdown_respect_ordered_list_start(): assert markdown('5. five\n6. six\n7. seven') == '<ol start="5"><li>five</li>\n<li>six</li>\n<li>seven</li>\n</ol>' def test_markdown_strikethrough(): assert markdown(u"~~test~~") == u"<p><del>test</del></p>\n" @pytest.mark.parametrize(('target', 'expected'), [ (u"[external](http://example.com/)", u'<a href="http://example.com/" rel="nofollow ugc">external</a>'), (u'<a href="http://example.com/">external</a>', u'<a href="http://example.com/" rel="nofollow ugc">external</a>'), (u'<a href="http://example.com/" rel="noreferrer">external</a>', u'<a href="http://example.com/" rel="nofollow ugc">external</a>'), (u"[external](//example.com/)", u'<a href="//example.com/" rel="nofollow ugc">external</a>'), ]) def test_markdown_external_link_noreferrer(target, expected): assert markdown(target) == u"<p>%s</p>\n" % (expected,) markdown_link_tests = [ (('spam', '/eggs'), '[spam](/eggs)'), ((']spam[', '/eggs'), r'[\]spam\[](/eggs)'), (('[[spam]', '/eggs'), r'[\[\[spam\]](/eggs)'), ] @pytest.mark.parametrize(('target', 'expected'), markdown_link_tests) def test_markdown_link(target, expected): assert markdown_link(*target) == expected def test_tag_stripping(): assert markdown(u"<button>text</button>") == u"<p>text</p>\n" assert markdown(u"<button><button>text</button></button>") == u"<p>text</p>\n" assert markdown(u"<!--[if IE]><script>alert(1)</script><![endif]-->") == u"\n" markdown_excerpt_tests = [ (u'', u''), (u'short', u'short'), (u'just short enoughAAAAAAAAAAAAA', u'just short enoughAAAAAAAAAAAAA'), (u'not short enoughAAAAAAAAAAAAAAA', u'not short enoughAAAAAAAAAAAAA…'), (u'*leading* inline formatting', u'leading inline formatting'), (u'middle *inline* formatting', u'middle inline formatting'), (u'trailing inline *formatting*', u'trailing inline formatting'), (u'*nested **inline** formatting*', u'nested inline formatting'), (u' unnecessary whitespace\t', u'unnecessary whitespace'), (u'multiple\nlines', u'multiple lines'), (u'multiple \nlines', u'multiple lines'), (u'multiple\n\nparagraphs', u'multiple paragraphs'), (u'Üñíçôđe\N{COMBINING ACUTE ACCENT}', u'Üñíçôđe\N{COMBINING ACUTE ACCENT}'), (u'single-codepoint graphemes😊😊😊😊', u'single-codepoint graphemes😊😊😊😊'), (u'single-codepoint graphemes😊😊😊😊😊', u'single-codepoint graphemes😊😊😊…'), (u'test\n - lists\n - of\n - items\n\ntest', u'test lists of items test'), ] @pytest.mark.parametrize(('target', 'expected'), markdown_excerpt_tests) def test_excerpt(target, expected): assert markdown_excerpt(target, length=30) == expected def test_excerpt_default_length(): assert markdown_excerpt(u'a' * 300) == u'a' * 300 assert markdown_excerpt(u'a' * 301) == u'a' * 299 + u'…'
[ 1, 396, 8025, 29901, 23616, 29899, 29947, 13, 3166, 301, 3134, 29889, 300, 929, 1053, 365, 8979, 9165, 29918, 16358, 13, 5215, 11451, 1688, 13, 13, 3166, 4303, 705, 294, 2904, 29889, 726, 1053, 2791, 3204, 29892, 2791, 3204, 29918, 735, 2265, 415, 29892, 2791, 3204, 29918, 2324, 13, 13, 13, 1982, 3134, 29918, 29916, 14057, 353, 11451, 1688, 29889, 3502, 29889, 29916, 14057, 29898, 5265, 29933, 9165, 29918, 16358, 529, 313, 29906, 29892, 29871, 29929, 511, 2769, 2433, 1982, 3134, 29906, 2086, 2030, 304, 19905, 24358, 1495, 13, 13, 1792, 29918, 2324, 292, 29918, 3502, 3204, 29918, 21150, 353, 518, 13, 1678, 6702, 29966, 30022, 1028, 314, 29958, 742, 12801, 29874, 2822, 13802, 30022, 1028, 314, 1013, 1028, 314, 829, 29874, 29958, 5477, 13, 1678, 6702, 29966, 29991, 1028, 314, 29958, 742, 12801, 29874, 2822, 13802, 30022, 1028, 314, 29908, 770, 543, 1792, 29899, 4144, 3254, 2492, 4765, 13802, 30022, 1028, 314, 29914, 485, 14873, 29908, 5272, 543, 1028, 314, 5319, 29874, 29958, 5477, 13, 1678, 6702, 21298, 850, 1792, 29901, 1028, 314, 20198, 29961, 850, 1792, 29901, 1028, 314, 29897, 742, 13, 268, 12801, 29874, 2822, 13802, 30022, 1028, 314, 29908, 770, 543, 1792, 29899, 4144, 3254, 2492, 4765, 13802, 30022, 1028, 314, 29914, 485, 14873, 29908, 5272, 543, 1028, 314, 5319, 29874, 16299, 13, 268, 12801, 29874, 2822, 13802, 30022, 1028, 314, 29908, 770, 543, 1792, 29899, 4144, 3254, 2492, 4765, 13802, 30022, 1028, 314, 29914, 485, 14873, 29908, 5272, 543, 1028, 314, 5319, 29874, 29958, 5477, 13, 1678, 6702, 29966, 29991, 30022, 1028, 314, 29958, 742, 12801, 29874, 2822, 13802, 30022, 1028, 314, 29908, 770, 543, 1792, 29899, 4144, 3254, 2492, 4765, 13802, 30022, 1028, 314, 29914, 485, 14873, 29908, 5272, 543, 1028, 314, 1013, 529, 9653, 29958, 1028, 314, 829, 9653, 2565, 29874, 29958, 5477, 13, 1678, 6702, 21298, 1792, 1967, 411, 5272, 1426, 850, 1792, 29901, 4773, 29897, 742, 12801, 29874, 2822, 13802, 30022, 4773, 29908, 770, 543, 1792, 29899, 4144, 3254, 2492, 4765, 13802, 30022, 4773, 29914, 485, 14873, 1013, 529, 9653, 29958, 1792, 1967, 411, 5272, 1426, 829, 9653, 2565, 29874, 29958, 5477, 13, 1678, 6702, 29966, 1792, 29901, 1028, 314, 29958, 742, 12801, 29874, 2822, 13802, 30022, 1028, 314, 1013, 1028, 314, 829, 29874, 29958, 5477, 13, 1678, 6702, 29961, 2324, 850, 1792, 29901, 1028, 314, 29897, 742, 12801, 29874, 2822, 13802, 30022, 1028, 314, 1013, 2324, 829, 29874, 29958, 5477, 13, 1678, 6702, 29966, 5444, 29901, 1028, 314, 29958, 742, 12801, 29874, 2822, 543, 991, 597, 1636, 29889, 29888, 2002, 600, 13593, 29889, 1212, 29914, 1792, 29914, 1028, 314, 29908, 1104, 543, 4043, 318, 27354, 1013, 1028, 314, 829, 29874, 29958, 5477, 13, 1678, 6702, 29966, 1388, 29901, 1028, 314, 29958, 742, 12801, 29874, 2822, 543, 991, 597, 1636, 29889, 311, 1403, 424, 442, 29889, 510, 29914, 1028, 314, 29908, 1104, 543, 4043, 318, 27354, 1013, 1028, 314, 829, 29874, 29958, 5477, 13, 1678, 6702, 29966, 747, 29901, 1028, 314, 29958, 742, 12801, 29874, 2822, 543, 991, 597, 682, 29890, 348, 1460, 29889, 1212, 29914, 1028, 314, 29908, 1104, 543, 4043, 318, 27354, 1013, 1028, 314, 829, 29874, 29958, 5477, 13, 1678, 6702, 29966, 4668, 29901, 1028, 314, 29958, 742, 12801, 29874, 2822, 543, 991, 597, 1028, 314, 29889, 578, 22613, 719, 29889, 510, 12975, 1104, 543, 4043, 318, 27354, 1013, 1028, 314, 829, 29874, 29958, 5477, 13, 29962, 13, 13, 13, 29992, 2272, 1688, 29889, 3502, 29889, 3207, 300, 374, 911, 29898, 877, 5182, 742, 525, 9684, 5477, 1404, 29918, 2324, 292, 29918, 3502, 3204, 29918, 21150, 29897, 13, 1753, 1243, 29918, 3502, 3204, 29918, 16121, 29918, 1792, 29918, 2324, 292, 29898, 5182, 29892, 3806, 1125, 13, 1678, 4974, 2791, 3204, 29898, 5182, 29897, 1275, 12801, 29886, 29958, 29995, 29879, 829, 29886, 14247, 29876, 29915, 1273, 313, 9684, 29892, 29897, 13, 13, 13, 29992, 2272, 1688, 29889, 3502, 29889, 3207, 300, 374, 911, 29898, 877, 5182, 742, 525, 9684, 5477, 1404, 29918, 2324, 292, 29918, 3502, 3204, 29918, 21150, 29897, 13, 1753, 1243, 29918, 3502, 3204, 29918, 1792, 29918, 2324, 292, 29918, 262, 29918, 4039, 29898, 5182, 29892, 3806, 1125, 13, 1678, 4974, 2791, 3204, 877, 29966, 331, 29958, 29995, 29879, 829, 331, 16299, 1273, 313, 5182, 29892, 876, 1275, 12801, 29886, 5299, 331, 29958, 29995, 29879, 829, 331, 2565, 29886, 14247, 29876, 29915, 1273, 313, 9684, 29892, 29897, 13, 13, 13, 29992, 2272, 1688, 29889, 3502, 29889, 3207, 300, 374, 911, 29898, 877, 5182, 742, 525, 9684, 5477, 1404, 29918, 2324, 292, 29918, 3502, 3204, 29918, 21150, 29897, 13, 1753, 1243, 29918, 3502, 3204, 29918, 1792, 29918, 2324, 292, 29918, 262, 29918, 18237, 29898, 5182, 29892, 3806, 1125, 13, 1678, 4974, 2791, 3204, 877, 29966, 331, 29958, 387, 3174, 829, 331, 29958, 29995, 29879, 29915, 1273, 313, 5182, 29892, 876, 1275, 12801, 29886, 5299, 331, 29958, 387, 3174, 829, 331, 29958, 29995, 29879, 829, 29886, 14247, 29876, 29915, 1273, 313, 9684, 29892, 29897, 13, 13, 13, 29992, 1982, 3134, 29918, 29916, 14057, 13, 29992, 2272, 1688, 29889, 3502, 29889, 3207, 300, 374, 911, 29898, 877, 5182, 742, 525, 9684, 5477, 1404, 29918, 2324, 292, 29918, 3502, 3204, 29918, 21150, 29897, 13, 1753, 1243, 29918, 3502, 3204, 29918, 1792, 29918, 2324, 292, 29918, 7516, 625, 29918, 262, 29918, 4039, 29898, 5182, 29892, 3806, 1125, 13, 1678, 4974, 2791, 3204, 877, 29966, 331, 29958, 29995, 29879, 1273, 29879, 829, 331, 16299, 1273, 313, 5182, 29892, 3646, 876, 1275, 12801, 29886, 5299, 331, 29958, 29995, 29879, 1273, 29879, 829, 331, 2565, 29886, 14247, 29876, 29915, 1273, 313, 9684, 29892, 3806, 29897, 13, 13, 13, 29992, 2272, 1688, 29889, 3502, 29889, 3207, 300, 374, 911, 29898, 877, 5182, 742, 525, 9684, 5477, 1404, 29918, 2324, 292, 29918, 3502, 3204, 29918, 21150, 29897, 13, 1753, 1243, 29918, 3502, 3204, 29918, 1792, 29918, 2324, 292, 29918, 7516, 625, 29918, 262, 29918, 4039, 29918, 2541, 29918, 5514, 29918, 726, 29918, 14811, 29898, 5182, 29892, 3806, 1125, 13, 1678, 4974, 2791, 3204, 877, 29966, 331, 29958, 29995, 29879, 805, 314, 1273, 29879, 829, 331, 16299, 1273, 313, 5182, 29892, 3646, 876, 1275, 12801, 29886, 5299, 331, 29958, 29995, 29879, 805, 314, 1273, 29879, 829, 331, 2565, 29886, 14247, 29876, 29915, 1273, 313, 9684, 29892, 3806, 29897, 13, 13, 13, 29992, 1982, 3134, 29918, 29916, 14057, 13, 29992, 2272, 1688, 29889, 3502, 29889, 3207, 300, 374, 911, 29898, 877, 5182, 742, 525, 9684, 5477, 1404, 29918, 2324, 292, 29918, 3502, 3204, 29918, 21150, 29897, 13, 1753, 1243, 29918, 3502, 3204, 29918, 1792, 29918, 2324, 292, 29918, 7516, 625, 29918, 262, 29918, 18237, 29898, 5182, 29892, 3806, 1125, 13, 1678, 4974, 2791, 3204, 877, 29966, 331, 29958, 387, 3174, 829, 331, 29958, 29995, 29879, 1273, 29879, 29915, 1273, 313, 5182, 29892, 3646, 876, 1275, 313, 13, 4706, 12801, 29886, 5299, 331, 29958, 387, 3174, 829, 331, 29958, 29995, 29879, 1273, 29879, 829, 29886, 14247, 29876, 29915, 1273, 313, 9684, 29892, 3806, 876, 13, 13, 13, 29992, 2272, 1688, 29889, 3502, 29889, 3207, 300, 374, 911, 29898, 877, 5182, 742, 525, 9684, 5477, 1404, 29918, 2324, 292, 29918, 3502, 3204, 29918, 21150, 29897, 13, 1753, 1243, 29918, 3502, 3204, 29918, 1792, 29918, 2324, 292, 29918, 7516, 625, 29918, 262, 29918, 18237, 29918, 2541, 29918, 5514, 29918, 726, 29918, 6878, 705, 27294, 29898, 5182, 29892, 3806, 1125, 13, 1678, 4974, 2791, 3204, 877, 29966, 331, 29958, 387, 3174, 829, 331, 29958, 29995, 29879, 805, 314, 1273, 29879, 29915, 1273, 313, 5182, 29892, 3646, 876, 1275, 313, 13, 4706, 12801, 29886, 5299, 331, 29958, 387, 3174, 829, 331, 29958, 29995, 29879, 805, 314, 1273, 29879, 829, 29886, 14247, 29876, 29915, 1273, 313, 9684, 29892, 3806, 876, 13, 13, 13, 29992, 2272, 1688, 29889, 3502, 29889, 3207, 300, 374, 911, 29898, 877, 5182, 742, 525, 9684, 5477, 1404, 29918, 2324, 292, 29918, 3502, 3204, 29918, 21150, 29897, 13, 1753, 1243, 29918, 3502, 3204, 29918, 1792, 29918, 2324, 292, 29918, 262, 29918, 3502, 3204, 29898, 5182, 29892, 3806, 1125, 13, 1678, 4974, 2791, 3204, 877, 29930, 29995, 29879, 29930, 29915, 1273, 313, 5182, 29892, 876, 1275, 12801, 29886, 5299, 331, 29958, 29995, 29879, 829, 331, 2565, 29886, 14247, 29876, 29915, 1273, 313, 9684, 29892, 29897, 13, 13, 13, 1753, 1243, 29918, 3502, 3204, 29918, 1217, 29918, 1792, 29918, 4965, 29918, 262, 29918, 401, 7295, 13, 1678, 4974, 2791, 3204, 877, 29966, 401, 5299, 30022, 1028, 314, 2565, 401, 29958, 1495, 1275, 12801, 29886, 5299, 401, 19250, 1896, 29936, 30022, 1028, 314, 29987, 4141, 14814, 401, 2565, 29886, 14247, 29876, 29915, 13, 13, 13, 1753, 1243, 29918, 3502, 3204, 29918, 1217, 29918, 1792, 29918, 4965, 29918, 262, 29918, 1457, 7295, 13, 1678, 4974, 2791, 3204, 877, 29966, 1457, 5299, 30022, 1028, 314, 2565, 1457, 29958, 1495, 1275, 12801, 1457, 5299, 29886, 19250, 1896, 29936, 30022, 1028, 314, 29987, 4141, 14814, 29886, 2565, 1457, 14247, 29876, 29915, 13, 13, 13, 1753, 1243, 29918, 3502, 3204, 29918, 1217, 29918, 1792, 29918, 4965, 29918, 262, 29918, 4965, 7295, 13, 1678, 4974, 2791, 3204, 877, 29966, 29874, 5299, 30022, 1028, 314, 2565, 29874, 29958, 1495, 1275, 12801, 29886, 5299, 29874, 19250, 1896, 29936, 30022, 1028, 314, 29987, 4141, 14814, 29874, 2565, 29886, 14247, 29876, 29915, 13, 13, 13, 1753, 1243, 29918, 3502, 3204, 29918, 267, 5030, 287, 29918, 1792, 29918, 2324, 7295, 13, 1678, 4974, 2791, 3204, 877, 1966, 1966, 29966, 30022, 1028, 314, 29958, 1495, 1275, 12801, 29886, 19250, 1896, 29936, 30022, 1028, 314, 29987, 4141, 14814, 29886, 14247, 29876, 29915, 13, 13, 13, 1753, 1243, 29918, 3502, 3204, 29918, 9910, 29918, 5029, 7295, 13, 1678, 4974, 2791, 3204, 877, 650, 29905, 29876, 29905, 593, 827, 1495, 1275, 12801, 29886, 29958, 650, 829, 29886, 14247, 29876, 29905, 29876, 29966, 29886, 29958, 10184, 829, 29886, 14247, 29876, 29915, 13, 13, 13, 1753, 1243, 29918, 3502, 3204, 29918, 1792, 29918, 2324, 292, 29918, 2541, 29918, 870, 414, 3221, 7295, 13, 1678, 4974, 2791, 3204, 877, 29966, 30022, 12199, 29918, 11526, 29958, 1495, 1275, 12801, 29886, 5299, 29874, 2822, 13802, 30022, 29882, 4743, 1613, 1013, 12199, 29918, 11526, 829, 29874, 2565, 29886, 14247, 29876, 29915, 13, 13, 13, 1753, 1243, 29918, 3502, 3204, 29918, 3027, 29918, 3445, 9552, 7295, 13, 1678, 4974, 2791, 3204, 877, 21298, 4773, 850, 1124, 597, 4773, 29897, 1495, 1275, 12801, 29886, 5299, 29874, 2822, 543, 1124, 597, 4773, 29908, 1104, 543, 4043, 318, 27354, 1013, 4773, 829, 29874, 2565, 29886, 14247, 29876, 29915, 13, 1678, 4974, 2791, 3204, 877, 29966, 2492, 5272, 543, 6729, 1717, 1013, 1495, 1275, 12801, 29886, 5299, 29874, 2822, 543, 1013, 6729, 1717, 829, 29874, 2565, 29886, 14247, 29876, 29915, 13, 13, 13, 1753, 1243, 29918, 23343, 29918, 1332, 7454, 391, 7295, 13, 1678, 4974, 2791, 3204, 877, 991, 597, 1454, 6762, 29889, 705, 294, 2904, 29889, 510, 29914, 5431, 1495, 1275, 313, 13, 4706, 12801, 29886, 5299, 29874, 2822, 543, 991, 597, 1454, 6762, 29889, 705, 294, 2904, 29889, 510, 29914, 5431, 1013, 991, 597, 1454, 6762, 29889, 705, 294, 2904, 29889, 510, 29914, 5431, 829, 29874, 2565, 29886, 14247, 29876, 1495, 13, 13, 13, 1753, 1243, 29918, 3502, 3204, 29918, 348, 21693, 29918, 1761, 7295, 13, 1678, 4974, 2791, 3204, 877, 29899, 5320, 29905, 29876, 29899, 4832, 29905, 29876, 29899, 9881, 1495, 1275, 12801, 352, 5299, 492, 29958, 20818, 829, 492, 14247, 29876, 29966, 492, 29958, 28319, 829, 492, 14247, 29876, 29966, 492, 29958, 344, 854, 829, 492, 14247, 29876, 829, 352, 16299, 13, 13, 13, 1753, 1243, 29918, 3502, 3204, 29918, 15227, 29918, 21693, 29918, 1761, 29918, 2962, 7295, 13, 1678, 4974, 2791, 3204, 877, 29896, 29889, 5320, 29905, 29876, 29896, 29889, 4832, 29905, 29876, 29896, 29889, 9881, 1495, 1275, 12801, 324, 1369, 543, 29896, 3254, 492, 29958, 20818, 829, 492, 14247, 29876, 29966, 492, 29958, 28319, 829, 492, 14247, 29876, 29966, 492, 29958, 344, 854, 829, 492, 14247, 29876, 829, 324, 16299, 13, 13, 13, 1753, 1243, 29918, 3502, 3204, 29918, 690, 1103, 29918, 21693, 29918, 1761, 29918, 2962, 7295, 13, 1678, 4974, 2791, 3204, 877, 29945, 29889, 5320, 29905, 29876, 29953, 29889, 4832, 29905, 29876, 29955, 29889, 9881, 1495, 1275, 12801, 324, 1369, 543, 29945, 3254, 492, 29958, 20818, 829, 492, 14247, 29876, 29966, 492, 29958, 28319, 829, 492, 14247, 29876, 29966, 492, 29958, 344, 854, 829, 492, 14247, 29876, 829, 324, 16299, 13, 13, 13, 1753, 1243, 29918, 3502, 3204, 29918, 303, 5357, 621, 10573, 7295, 13, 1678, 4974, 2791, 3204, 29898, 29884, 29908, 7377, 1688, 7377, 1159, 1275, 318, 29908, 29966, 29886, 5299, 6144, 29958, 1688, 829, 6144, 2565, 29886, 14247, 29876, 29908, 13, 13, 13, 29992, 2272, 1688, 29889, 3502, 29889, 3207, 300, 374, 911, 29898, 877, 5182, 742, 525, 9684, 5477, 518, 13, 1678, 313, 29884, 29908, 29961, 23176, 850, 1124, 597, 4773, 29889, 510, 4551, 613, 318, 29915, 29966, 29874, 2822, 543, 1124, 597, 4773, 29889, 510, 12975, 1104, 543, 4043, 318, 27354, 1013, 23176, 829, 29874, 29958, 5477, 13, 1678, 313, 29884, 29915, 29966, 29874, 2822, 543, 1124, 597, 4773, 29889, 510, 29914, 1013, 23176, 829, 29874, 29958, 742, 318, 29915, 29966, 29874, 2822, 543, 1124, 597, 4773, 29889, 510, 12975, 1104, 543, 4043, 318, 27354, 1013, 23176, 829, 29874, 29958, 5477, 13, 1678, 313, 29884, 29915, 29966, 29874, 2822, 543, 1124, 597, 4773, 29889, 510, 12975, 1104, 543, 23148, 1013, 23176, 829, 29874, 29958, 742, 318, 29915, 29966, 29874, 2822, 543, 1124, 597, 4773, 29889, 510, 12975, 1104, 543, 4043, 318, 27354, 1013, 23176, 829, 29874, 29958, 5477, 13, 1678, 313, 29884, 29908, 29961, 23176, 850, 458, 4773, 29889, 510, 4551, 613, 318, 29915, 29966, 29874, 2822, 543, 458, 4773, 29889, 510, 12975, 1104, 543, 4043, 318, 27354, 1013, 23176, 829, 29874, 29958, 5477, 13, 2314, 13, 1753, 1243, 29918, 3502, 3204, 29918, 23176, 29918, 2324, 29918, 23148, 29898, 5182, 29892, 3806, 1125, 13, 1678, 4974, 2791, 3204, 29898, 5182, 29897, 1275, 318, 29908, 29966, 29886, 29958, 29995, 29879, 829, 29886, 14247, 29876, 29908, 1273, 313, 9684, 29892, 29897, 13, 13, 13, 3502, 3204, 29918, 2324, 29918, 21150, 353, 518, 13, 1678, 313, 877, 1028, 314, 742, 8207, 387, 3174, 5477, 525, 29961, 1028, 314, 26909, 387, 3174, 29897, 5477, 13, 1678, 313, 877, 29962, 1028, 314, 29961, 742, 8207, 387, 3174, 5477, 364, 29915, 7110, 29962, 1028, 314, 29905, 29961, 26909, 387, 3174, 29897, 5477, 13, 1678, 313, 877, 8999, 1028, 314, 29962, 742, 8207, 387, 3174, 5477, 364, 29915, 7110, 7110, 29961, 1028, 314, 18899, 26909, 387, 3174, 29897, 5477, 13, 29962, 13, 13, 13, 29992, 2272, 1688, 29889, 3502, 29889, 3207, 300, 374, 911, 29898, 877, 5182, 742, 525, 9684, 5477, 2791, 3204, 29918, 2324, 29918, 21150, 29897, 13, 1753, 1243, 29918, 3502, 3204, 29918, 2324, 29898, 5182, 29892, 3806, 1125, 13, 1678, 4974, 2791, 3204, 29918, 2324, 10456, 5182, 29897, 1275, 3806, 13, 13, 13, 1753, 1243, 29918, 4039, 29918, 303, 374, 3262, 7295, 13, 1678, 4974, 2791, 3204, 29898, 29884, 29908, 29966, 3092, 29958, 726, 829, 3092, 29958, 1159, 1275, 318, 29908, 29966, 29886, 29958, 726, 829, 29886, 14247, 29876, 29908, 13, 1678, 4974, 2791, 3204, 29898, 29884, 29908, 29966, 3092, 5299, 3092, 29958, 726, 829, 3092, 2565, 3092, 29958, 1159, 1275, 318, 29908, 29966, 29886, 29958, 726, 829, 29886, 14247, 29876, 29908, 13, 1678, 4974, 2791, 3204, 29898, 29884, 29908, 14136, 29961, 361, 7159, 29962, 5299, 2154, 29958, 12888, 29898, 29896, 29897, 829, 2154, 5299, 21298, 15224, 29962, 15110, 1159, 1275, 318, 26732, 29876, 29908, 13, 13, 13, 3502, 3204, 29918, 735, 2265, 415, 29918, 21150, 353, 518, 13, 1678, 313, 29884, 29915, 742, 318, 4907, 511, 13, 1678, 313, 29884, 29915, 12759, 742, 318, 29915, 12759, 5477, 13, 1678, 313, 29884, 29915, 5143, 3273, 3307, 23184, 23184, 23184, 29909, 742, 318, 29915, 5143, 3273, 3307, 23184, 23184, 23184, 29909, 5477, 13, 1678, 313, 29884, 29915, 1333, 3273, 3307, 23184, 23184, 23184, 6344, 29909, 742, 318, 29915, 1333, 3273, 3307, 23184, 23184, 23184, 29909, 30098, 5477, 13, 1678, 313, 29884, 29915, 29930, 25369, 29930, 10583, 15998, 742, 318, 29915, 25369, 10583, 15998, 5477, 13, 1678, 313, 29884, 29915, 17662, 334, 14764, 29930, 15998, 742, 318, 29915, 17662, 10583, 15998, 5477, 13, 1678, 313, 29884, 29915, 3018, 6504, 10583, 334, 689, 23980, 29930, 742, 318, 29915, 3018, 6504, 10583, 15998, 5477, 13, 1678, 313, 29884, 29915, 29930, 27420, 3579, 14764, 1068, 15998, 29930, 742, 318, 29915, 27420, 10583, 15998, 5477, 13, 1678, 313, 29884, 29915, 259, 19039, 29871, 24358, 29905, 29873, 742, 318, 29915, 348, 15107, 653, 24358, 5477, 13, 1678, 313, 29884, 29915, 20787, 29905, 29876, 9012, 742, 318, 29915, 20787, 3454, 5477, 13, 1678, 313, 29884, 29915, 20787, 29871, 320, 29876, 9012, 742, 318, 29915, 20787, 3454, 5477, 13, 1678, 313, 29884, 29915, 20787, 29905, 29876, 29905, 29876, 26956, 29879, 742, 318, 29915, 20787, 14880, 29879, 5477, 13, 1678, 313, 29884, 29915, 30104, 30046, 29983, 30019, 30069, 30128, 29872, 29905, 29940, 29912, 3217, 9486, 1177, 4214, 14614, 26027, 319, 4174, 3919, 29913, 742, 318, 29915, 30104, 30046, 29983, 30019, 30069, 30128, 29872, 29905, 29940, 29912, 3217, 9486, 1177, 4214, 14614, 26027, 319, 4174, 3919, 29913, 5477, 13, 1678, 313, 29884, 29915, 14369, 29899, 401, 3149, 3983, 13826, 243, 162, 155, 141, 243, 162, 155, 141, 243, 162, 155, 141, 243, 162, 155, 141, 742, 318, 29915, 14369, 29899, 401, 3149, 3983, 13826, 243, 162, 155, 141, 243, 162, 155, 141, 243, 162, 155, 141, 243, 162, 155, 141, 5477, 13, 1678, 313, 29884, 29915, 14369, 29899, 401, 3149, 3983, 13826, 243, 162, 155, 141, 243, 162, 155, 141, 243, 162, 155, 141, 243, 162, 155, 141, 243, 162, 155, 141, 742, 318, 29915, 14369, 29899, 401, 3149, 3983, 13826, 243, 162, 155, 141, 243, 162, 155, 141, 243, 162, 155, 141, 30098, 5477, 13, 1678, 313, 29884, 29915, 1688, 29905, 29876, 448, 8857, 29905, 29876, 448, 310, 29905, 29876, 448, 4452, 29905, 29876, 29905, 593, 342, 742, 318, 29915, 1688, 8857, 310, 4452, 1243, 5477, 13, 29962, 13, 13, 13, 29992, 2272, 1688, 29889, 3502, 29889, 3207, 300, 374, 911, 29898, 877, 5182, 742, 525, 9684, 5477, 2791, 3204, 29918, 735, 2265, 415, 29918, 21150, 29897, 13, 1753, 1243, 29918, 735, 2265, 415, 29898, 5182, 29892, 3806, 1125, 13, 1678, 4974, 2791, 3204, 29918, 735, 2265, 415, 29898, 5182, 29892, 3309, 29922, 29941, 29900, 29897, 1275, 3806, 13, 13, 13, 1753, 1243, 29918, 735, 2265, 415, 29918, 4381, 29918, 2848, 7295, 13, 1678, 4974, 2791, 3204, 29918, 735, 2265, 415, 29898, 29884, 29915, 29874, 29915, 334, 29871, 29941, 29900, 29900, 29897, 1275, 318, 29915, 29874, 29915, 334, 29871, 29941, 29900, 29900, 13, 1678, 4974, 2791, 3204, 29918, 735, 2265, 415, 29898, 29884, 29915, 29874, 29915, 334, 29871, 29941, 29900, 29896, 29897, 1275, 318, 29915, 29874, 29915, 334, 29871, 29906, 29929, 29929, 718, 318, 29915, 30098, 29915, 13, 2 ]
cli/work_cli.py
ayonymus/gits
4
83377
class WorkCli: def __init__(self, workbranch): self.workbranch = workbranch def add_subparser(self, subparsers): work_parser = subparsers.add_parser('work', help="Keep track of a currently important branch") work_parser.add_argument("current", nargs="?", type=str, default=None, help="Show current work branch") work_parser.add_argument("-s", action="store_true", help="Set current work branch") work_parser.add_argument("-c", action="store_true", help="Checkout current work branch") work_parser.add_argument("-ch", type=int, help="Checkout work branch from history by id") work_parser.add_argument("-H", "--history", action="store_true", help="Show work branch history") work_parser.set_defaults(func=self.handle_work) def handle_work(self, args): if args.s: self.set_work_branch() elif args.c: self.checkout_work_branch() elif args.ch: self.checkout_work_branch_history(args.ch) elif args.history: self.print_work_branch_history() else: self.print_current_work_branch() def print_current_work_branch(self): current = self.workbranch.get_work_branch() print("Current work branch is", ("not set" if current is None else current)) def print_work_branch_history(self): for i, branch in enumerate(self.workbranch.get_work_branch_history()): print(i, branch) def set_work_branch(self): branch = self.workbranch.set_work_branch() print("Current work branch is %s" % branch) def checkout_work_branch(self): branch = self.workbranch.checkout_work_branch() print("Switched to branch '%s'" % branch) def checkout_work_branch_history(self, index): branch = self.workbranch.checkout_work_branch_from_history(index) print("No such branch" if branch is None else "Switched to branch '%s'" % branch)
[ 1, 29871, 13, 1990, 5244, 29907, 492, 29901, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 664, 17519, 1125, 13, 4706, 1583, 29889, 1287, 17519, 353, 664, 17519, 13, 13, 1678, 822, 788, 29918, 1491, 16680, 29898, 1311, 29892, 1014, 862, 4253, 1125, 13, 4706, 664, 29918, 16680, 353, 1014, 862, 4253, 29889, 1202, 29918, 16680, 877, 1287, 742, 1371, 543, 9598, 1022, 5702, 310, 263, 5279, 4100, 5443, 1159, 13, 4706, 664, 29918, 16680, 29889, 1202, 29918, 23516, 703, 3784, 613, 302, 5085, 543, 29973, 613, 1134, 29922, 710, 29892, 2322, 29922, 8516, 29892, 1371, 543, 8964, 1857, 664, 5443, 1159, 13, 4706, 664, 29918, 16680, 29889, 1202, 29918, 23516, 703, 29899, 29879, 613, 3158, 543, 8899, 29918, 3009, 613, 1371, 543, 2697, 1857, 664, 5443, 1159, 13, 4706, 664, 29918, 16680, 29889, 1202, 29918, 23516, 703, 29899, 29883, 613, 3158, 543, 8899, 29918, 3009, 613, 1371, 543, 5596, 449, 1857, 664, 5443, 1159, 13, 4706, 664, 29918, 16680, 29889, 1202, 29918, 23516, 703, 29899, 305, 613, 1134, 29922, 524, 29892, 29871, 1371, 543, 5596, 449, 664, 5443, 515, 4955, 491, 1178, 1159, 13, 4706, 664, 29918, 16680, 29889, 1202, 29918, 23516, 703, 29899, 29950, 613, 376, 489, 18434, 613, 3158, 543, 8899, 29918, 3009, 613, 1371, 543, 8964, 664, 5443, 4955, 1159, 13, 4706, 664, 29918, 16680, 29889, 842, 29918, 4381, 29879, 29898, 9891, 29922, 1311, 29889, 8411, 29918, 1287, 29897, 13, 13, 1678, 822, 4386, 29918, 1287, 29898, 1311, 29892, 6389, 1125, 13, 4706, 565, 6389, 29889, 29879, 29901, 13, 9651, 1583, 29889, 842, 29918, 1287, 29918, 17519, 580, 13, 4706, 25342, 6389, 29889, 29883, 29901, 13, 9651, 1583, 29889, 3198, 449, 29918, 1287, 29918, 17519, 580, 13, 4706, 25342, 6389, 29889, 305, 29901, 13, 9651, 1583, 29889, 3198, 449, 29918, 1287, 29918, 17519, 29918, 18434, 29898, 5085, 29889, 305, 29897, 13, 4706, 25342, 6389, 29889, 18434, 29901, 13, 9651, 1583, 29889, 2158, 29918, 1287, 29918, 17519, 29918, 18434, 580, 13, 4706, 1683, 29901, 13, 9651, 1583, 29889, 2158, 29918, 3784, 29918, 1287, 29918, 17519, 580, 13, 13, 1678, 822, 1596, 29918, 3784, 29918, 1287, 29918, 17519, 29898, 1311, 1125, 13, 4706, 1857, 353, 1583, 29889, 1287, 17519, 29889, 657, 29918, 1287, 29918, 17519, 580, 13, 4706, 1596, 703, 7583, 664, 5443, 338, 613, 4852, 1333, 731, 29908, 565, 1857, 338, 6213, 1683, 1857, 876, 13, 13, 1678, 822, 1596, 29918, 1287, 29918, 17519, 29918, 18434, 29898, 1311, 1125, 13, 4706, 363, 474, 29892, 5443, 297, 26985, 29898, 1311, 29889, 1287, 17519, 29889, 657, 29918, 1287, 29918, 17519, 29918, 18434, 580, 1125, 13, 9651, 1596, 29898, 29875, 29892, 5443, 29897, 13, 13, 1678, 822, 731, 29918, 1287, 29918, 17519, 29898, 1311, 1125, 13, 4706, 5443, 353, 1583, 29889, 1287, 17519, 29889, 842, 29918, 1287, 29918, 17519, 580, 13, 4706, 1596, 703, 7583, 664, 5443, 338, 1273, 29879, 29908, 1273, 5443, 29897, 13, 13, 1678, 822, 24808, 29918, 1287, 29918, 17519, 29898, 1311, 1125, 13, 4706, 5443, 353, 1583, 29889, 1287, 17519, 29889, 3198, 449, 29918, 1287, 29918, 17519, 580, 13, 4706, 1596, 703, 24995, 287, 304, 5443, 14210, 29879, 11838, 1273, 5443, 29897, 13, 13, 1678, 822, 24808, 29918, 1287, 29918, 17519, 29918, 18434, 29898, 1311, 29892, 2380, 1125, 13, 4706, 5443, 353, 1583, 29889, 1287, 17519, 29889, 3198, 449, 29918, 1287, 29918, 17519, 29918, 3166, 29918, 18434, 29898, 2248, 29897, 13, 4706, 1596, 703, 3782, 1316, 5443, 29908, 565, 5443, 338, 6213, 1683, 376, 24995, 287, 304, 5443, 14210, 29879, 11838, 1273, 5443, 29897, 2 ]
model-server/ServeAll.py
tmobile/node-red-contrib-yolo-object-detection
2
151936
#!/usr/bin/env python3 import base64 from gevent.pywsgi import WSGIServer import io import os import signal import sys import shutil from threading import Thread def get_parent_dir(n=1): """ returns the n-th parent dicrectory of the current working directory """ current_path = os.path.dirname(os.path.abspath(__file__)) for k in range(n): current_path = os.path.dirname(current_path) return current_path src_path = os.path.dirname(os.path.abspath(__file__)) sys.path.append(src_path) # Get model path. Default to home directory models/yolov3. MODEL_PATH = os.getenv("MODEL_PATH",os.path.join( os.getenv("HOME"), "models", "yolov3")) # Lower logging level. os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' from utils import load_extractor_model, load_features, parse_input, detect_object from keras_yolo3.yolo import YOLO, detect_video from PIL import Image, ImageFont, ImageDraw # Set related model file paths based on base path convention. anchors_path = os.path.join(MODEL_PATH, "anchors.txt") classes_path = os.path.join(MODEL_PATH, "classes.txt") model_weights = os.path.join(MODEL_PATH, "weights.h5") gpu_num = 1 model_image_size = (416, 416) score = .25 from flask import Flask, json, jsonify, request app = Flask(__name__) def init_yolo(model_weights, anchors_path, score, gpu_num, model_image_size): yolo = YOLO( **{ "model_path": model_weights, "anchors_path": anchors_path, "classes_path": classes_path, "score": score, "gpu_num": gpu_num, "model_image_size": model_image_size, } ) print("MODELSERVER: Model initialized") return yolo @app.route('/',methods=['POST','GET']) def detect(): global yolo # Get input image. # DBG print("is_json:", request.is_json) if request.is_json: content = request.get_json() image = Image.open("frame.jpg") else: content = request.data image = Image.open(io.BytesIO(content)) # DBG image = Image.open("test.jpg") # Use local capture frame from video stream instead. if image.mode != "RGB": image = image.convert("RGB") # Perform object detection. detections, new_image = yolo.detect_image(image) # DBG Save image with bounding boxes from detection. # DBG new_image.save("result.jpg") image_buffer = io.BytesIO() new_image.save(image_buffer, format="JPEG") base64_image = base64.b64encode(image_buffer.getvalue()).decode("utf-8") # DBG print("detections", detections) result = { "image": base64_image, "detections": [], "things": [] } # DBG print("yolo.class_names", yolo.class_names) # detection = (left, top, right, bottom, class, score). for detection in detections: # DBG print("detection:", detection) left = int(detection[0]) top = int(detection[1]) right = int(detection[2]) bottom = int(detection[3]) class_id = int(detection[4]) class_name = yolo.class_names[class_id] score = float(detection[5]) final_detection = { 'bbox': [ left, top, right, bottom ], 'class': class_name, 'score': score } print("detection:", final_detection) result["detections"].append(final_detection) result["things"].append({"thing": class_name}) # DBG print("result:", result) # return jsonify(result) response = app.response_class( response=json.dumps(result), status=200, mimetype='application/json' ) return response def sig_handler(signum, frame): print("Serve caught signal:", signum) print("Exiting...") os._exit(0) def run_video_thread(srcpath, camera_mode): try: if not camera_mode or camera_mode == "picamera": print("Running ServeVideoPiCamera...") import ServeVideoPiCamera except: print("Caught camera exception from ServeVideoPiCamera.") finally: if not camera_mode or camera_mode == "opencv": print("Running ServeVideo...") import ServeVideo ServeVideo.main() def run_video(camera_mode): dirpath = os.path.dirname(os.path.realpath(__file__)) srcpath = dirpath + "/ServeVideo.py" video_thread = Thread(target = run_video_thread, args = (srcpath, camera_mode)) video_thread.start() if __name__ == "__main__": signal.signal(signal.SIGTERM, sig_handler) signal.signal(signal.SIGINT, sig_handler) run_video(os.getenv("CAMERA_MODE", "")) yolo = init_yolo(model_weights, anchors_path, score, gpu_num, model_image_size) http_server = WSGIServer(('', 8888), app) http_server.serve_forever()
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 13, 5215, 2967, 29953, 29946, 13, 3166, 1737, 794, 29889, 2272, 5652, 3146, 1053, 399, 26016, 29902, 6004, 13, 5215, 12013, 13, 5215, 2897, 13, 5215, 7182, 13, 5215, 10876, 13, 5215, 528, 4422, 13, 3166, 3244, 292, 1053, 10480, 13, 13, 13, 1753, 679, 29918, 3560, 29918, 3972, 29898, 29876, 29922, 29896, 1125, 13, 1678, 9995, 3639, 278, 302, 29899, 386, 3847, 12124, 1621, 706, 310, 278, 1857, 13, 1678, 1985, 3884, 9995, 13, 1678, 1857, 29918, 2084, 353, 2897, 29889, 2084, 29889, 25721, 29898, 359, 29889, 2084, 29889, 370, 1028, 493, 22168, 1445, 1649, 876, 13, 1678, 363, 413, 297, 3464, 29898, 29876, 1125, 13, 4706, 1857, 29918, 2084, 353, 2897, 29889, 2084, 29889, 25721, 29898, 3784, 29918, 2084, 29897, 13, 1678, 736, 1857, 29918, 2084, 13, 13, 13, 4351, 29918, 2084, 353, 2897, 29889, 2084, 29889, 25721, 29898, 359, 29889, 2084, 29889, 370, 1028, 493, 22168, 1445, 1649, 876, 13, 9675, 29889, 2084, 29889, 4397, 29898, 4351, 29918, 2084, 29897, 13, 13, 29937, 3617, 1904, 2224, 29889, 13109, 304, 3271, 3884, 4733, 29914, 29891, 324, 586, 29941, 29889, 13, 20387, 29931, 29918, 10145, 353, 2897, 29889, 657, 6272, 703, 20387, 29931, 29918, 10145, 613, 359, 29889, 2084, 29889, 7122, 29898, 13, 1678, 2897, 29889, 657, 6272, 703, 17353, 4968, 376, 9794, 613, 376, 29891, 324, 586, 29941, 5783, 13, 13, 29937, 27723, 12183, 3233, 29889, 13, 359, 29889, 21813, 1839, 8969, 29918, 6271, 29925, 29918, 16173, 29918, 14480, 29918, 1307, 29963, 6670, 2033, 353, 525, 29941, 29915, 13, 13, 3166, 3667, 29879, 1053, 2254, 29918, 21111, 272, 29918, 4299, 29892, 2254, 29918, 22100, 29892, 6088, 29918, 2080, 29892, 6459, 29918, 3318, 13, 3166, 13023, 294, 29918, 29891, 3543, 29941, 29889, 29891, 3543, 1053, 612, 29949, 3927, 29892, 6459, 29918, 9641, 13, 3166, 349, 6227, 1053, 7084, 29892, 7084, 9824, 29892, 7084, 8537, 13, 13, 29937, 3789, 4475, 1904, 934, 10898, 2729, 373, 2967, 2224, 15687, 29889, 13, 14588, 943, 29918, 2084, 353, 2897, 29889, 2084, 29889, 7122, 29898, 20387, 29931, 29918, 10145, 29892, 376, 14588, 943, 29889, 3945, 1159, 13, 13203, 29918, 2084, 353, 2897, 29889, 2084, 29889, 7122, 29898, 20387, 29931, 29918, 10145, 29892, 376, 13203, 29889, 3945, 1159, 13, 4299, 29918, 705, 5861, 353, 2897, 29889, 2084, 29889, 7122, 29898, 20387, 29931, 29918, 10145, 29892, 376, 705, 5861, 29889, 29882, 29945, 1159, 13, 13, 29887, 3746, 29918, 1949, 353, 29871, 29896, 13, 4299, 29918, 3027, 29918, 2311, 353, 313, 29946, 29896, 29953, 29892, 29871, 29946, 29896, 29953, 29897, 13, 13628, 353, 869, 29906, 29945, 13, 13, 3166, 29784, 1053, 2379, 1278, 29892, 4390, 29892, 4390, 1598, 29892, 2009, 13, 932, 353, 2379, 1278, 22168, 978, 1649, 29897, 13, 13, 13, 1753, 2069, 29918, 29891, 3543, 29898, 4299, 29918, 705, 5861, 29892, 23791, 943, 29918, 2084, 29892, 8158, 29892, 330, 3746, 29918, 1949, 29892, 1904, 29918, 3027, 29918, 2311, 1125, 13, 1678, 343, 3543, 353, 612, 29949, 3927, 29898, 13, 4706, 3579, 29912, 13, 9651, 376, 4299, 29918, 2084, 1115, 1904, 29918, 705, 5861, 29892, 13, 9651, 376, 14588, 943, 29918, 2084, 1115, 23791, 943, 29918, 2084, 29892, 13, 9651, 376, 13203, 29918, 2084, 1115, 4413, 29918, 2084, 29892, 13, 9651, 376, 13628, 1115, 8158, 29892, 13, 9651, 376, 29887, 3746, 29918, 1949, 1115, 330, 3746, 29918, 1949, 29892, 13, 9651, 376, 4299, 29918, 3027, 29918, 2311, 1115, 1904, 29918, 3027, 29918, 2311, 29892, 13, 4706, 500, 13, 1678, 1723, 13, 1678, 1596, 703, 20387, 29931, 18603, 29901, 8125, 16601, 1159, 13, 1678, 736, 343, 3543, 13, 13, 13, 29992, 932, 29889, 13134, 11219, 742, 23515, 29922, 1839, 5438, 3788, 7194, 11287, 13, 1753, 6459, 7295, 13, 1678, 5534, 343, 3543, 13, 1678, 396, 3617, 1881, 1967, 29889, 13, 1678, 396, 6535, 29954, 1596, 703, 275, 29918, 3126, 29901, 613, 2009, 29889, 275, 29918, 3126, 29897, 13, 1678, 565, 2009, 29889, 275, 29918, 3126, 29901, 13, 4706, 2793, 353, 2009, 29889, 657, 29918, 3126, 580, 13, 4706, 1967, 353, 7084, 29889, 3150, 703, 2557, 29889, 6173, 1159, 13, 1678, 1683, 29901, 13, 4706, 2793, 353, 2009, 29889, 1272, 13, 4706, 1967, 353, 7084, 29889, 3150, 29898, 601, 29889, 11207, 5971, 29898, 3051, 876, 13, 1678, 396, 6535, 29954, 1967, 353, 7084, 29889, 3150, 703, 1688, 29889, 6173, 1159, 13, 1678, 396, 4803, 1887, 10446, 3515, 515, 4863, 4840, 2012, 29889, 13, 1678, 565, 1967, 29889, 8513, 2804, 376, 28212, 1115, 13, 4706, 1967, 353, 1967, 29889, 13441, 703, 28212, 1159, 13, 13, 1678, 396, 27313, 1203, 15326, 29889, 13, 1678, 1439, 29872, 1953, 29892, 716, 29918, 3027, 353, 343, 3543, 29889, 4801, 522, 29918, 3027, 29898, 3027, 29897, 13, 13, 1678, 396, 6535, 29954, 16913, 1967, 411, 3216, 292, 16273, 515, 15326, 29889, 13, 1678, 396, 6535, 29954, 716, 29918, 3027, 29889, 7620, 703, 2914, 29889, 6173, 1159, 13, 1678, 1967, 29918, 9040, 353, 12013, 29889, 11207, 5971, 580, 13, 1678, 716, 29918, 3027, 29889, 7620, 29898, 3027, 29918, 9040, 29892, 3402, 543, 29967, 4162, 29954, 1159, 13, 1678, 2967, 29953, 29946, 29918, 3027, 353, 2967, 29953, 29946, 29889, 29890, 29953, 29946, 12508, 29898, 3027, 29918, 9040, 29889, 657, 1767, 16655, 13808, 703, 9420, 29899, 29947, 1159, 13, 13, 1678, 396, 6535, 29954, 1596, 703, 29881, 2650, 1953, 613, 1439, 29872, 1953, 29897, 13, 1678, 1121, 353, 426, 13, 9651, 376, 3027, 1115, 2967, 29953, 29946, 29918, 3027, 29892, 13, 9651, 376, 29881, 2650, 1953, 1115, 19997, 13, 9651, 376, 386, 886, 1115, 5159, 13, 9651, 500, 13, 1678, 396, 6535, 29954, 1596, 703, 29891, 3543, 29889, 1990, 29918, 7039, 613, 343, 3543, 29889, 1990, 29918, 7039, 29897, 13, 1678, 396, 15326, 353, 313, 1563, 29892, 2246, 29892, 1492, 29892, 5970, 29892, 770, 29892, 8158, 467, 13, 1678, 363, 15326, 297, 1439, 29872, 1953, 29901, 13, 4706, 396, 6535, 29954, 1596, 703, 29881, 2650, 428, 29901, 613, 15326, 29897, 13, 4706, 2175, 353, 938, 29898, 29881, 2650, 428, 29961, 29900, 2314, 13, 4706, 2246, 353, 938, 29898, 29881, 2650, 428, 29961, 29896, 2314, 13, 4706, 1492, 353, 938, 29898, 29881, 2650, 428, 29961, 29906, 2314, 13, 4706, 5970, 353, 938, 29898, 29881, 2650, 428, 29961, 29941, 2314, 13, 4706, 770, 29918, 333, 353, 938, 29898, 29881, 2650, 428, 29961, 29946, 2314, 13, 4706, 770, 29918, 978, 353, 343, 3543, 29889, 1990, 29918, 7039, 29961, 1990, 29918, 333, 29962, 13, 4706, 8158, 353, 5785, 29898, 29881, 2650, 428, 29961, 29945, 2314, 13, 4706, 2186, 29918, 29881, 2650, 428, 353, 426, 13, 9651, 525, 29890, 1884, 2396, 518, 2175, 29892, 2246, 29892, 1492, 29892, 5970, 21251, 13, 9651, 525, 1990, 2396, 770, 29918, 978, 29892, 13, 9651, 525, 13628, 2396, 8158, 13, 4706, 500, 13, 4706, 1596, 703, 29881, 2650, 428, 29901, 613, 2186, 29918, 29881, 2650, 428, 29897, 13, 4706, 1121, 3366, 29881, 2650, 1953, 16862, 4397, 29898, 8394, 29918, 29881, 2650, 428, 29897, 13, 4706, 1121, 3366, 386, 886, 16862, 4397, 3319, 29908, 1918, 1115, 770, 29918, 978, 1800, 13, 13, 1678, 396, 6535, 29954, 1596, 703, 2914, 29901, 613, 1121, 29897, 13, 13, 1678, 396, 736, 4390, 1598, 29898, 2914, 29897, 13, 1678, 2933, 353, 623, 29889, 5327, 29918, 1990, 29898, 13, 4706, 2933, 29922, 3126, 29889, 29881, 17204, 29898, 2914, 511, 13, 4706, 4660, 29922, 29906, 29900, 29900, 29892, 13, 4706, 286, 17528, 668, 2433, 6214, 29914, 3126, 29915, 13, 1678, 1723, 13, 1678, 736, 2933, 13, 13, 13, 1753, 4365, 29918, 13789, 29898, 4530, 398, 29892, 3515, 1125, 13, 1678, 1596, 703, 1748, 345, 12624, 7182, 29901, 613, 1804, 398, 29897, 13, 1678, 1596, 703, 1252, 11407, 856, 1159, 13, 1678, 2897, 3032, 13322, 29898, 29900, 29897, 13, 13, 13, 1753, 1065, 29918, 9641, 29918, 7097, 29898, 4351, 2084, 29892, 10656, 29918, 8513, 1125, 13, 1678, 1018, 29901, 13, 4706, 565, 451, 10656, 29918, 8513, 470, 10656, 29918, 8513, 1275, 376, 16447, 314, 1572, 1115, 13, 9651, 1596, 703, 27795, 1816, 345, 15167, 12197, 20717, 856, 1159, 13, 9651, 1053, 1816, 345, 15167, 12197, 20717, 13, 1678, 5174, 29901, 13, 4706, 1596, 703, 29907, 6482, 10656, 3682, 515, 1816, 345, 15167, 12197, 20717, 23157, 13, 1678, 7146, 29901, 13, 4706, 565, 451, 10656, 29918, 8513, 470, 10656, 29918, 8513, 1275, 376, 3150, 11023, 1115, 13, 9651, 1596, 703, 27795, 1816, 345, 15167, 856, 1159, 13, 9651, 1053, 1816, 345, 15167, 13, 9651, 1816, 345, 15167, 29889, 3396, 580, 13, 13, 13, 1753, 1065, 29918, 9641, 29898, 26065, 29918, 8513, 1125, 13, 1678, 4516, 2084, 353, 2897, 29889, 2084, 29889, 25721, 29898, 359, 29889, 2084, 29889, 6370, 2084, 22168, 1445, 1649, 876, 13, 1678, 4765, 2084, 353, 4516, 2084, 718, 5591, 1748, 345, 15167, 29889, 2272, 29908, 13, 1678, 4863, 29918, 7097, 353, 10480, 29898, 5182, 353, 1065, 29918, 9641, 29918, 7097, 29892, 6389, 353, 313, 4351, 2084, 29892, 10656, 29918, 8513, 876, 13, 1678, 4863, 29918, 7097, 29889, 2962, 580, 13, 13, 13, 361, 4770, 978, 1649, 1275, 376, 1649, 3396, 1649, 1115, 13, 1678, 7182, 29889, 25436, 29898, 25436, 29889, 5425, 29954, 4945, 29924, 29892, 4365, 29918, 13789, 29897, 13, 1678, 7182, 29889, 25436, 29898, 25436, 29889, 5425, 29954, 10192, 29892, 4365, 29918, 13789, 29897, 13, 1678, 1065, 29918, 9641, 29898, 359, 29889, 657, 6272, 703, 29907, 5194, 1001, 29909, 29918, 20387, 613, 5124, 876, 13, 1678, 343, 3543, 353, 2069, 29918, 29891, 3543, 29898, 4299, 29918, 705, 5861, 29892, 23791, 943, 29918, 2084, 29892, 8158, 29892, 330, 3746, 29918, 1949, 29892, 1904, 29918, 3027, 29918, 2311, 29897, 13, 1678, 1732, 29918, 2974, 353, 399, 26016, 29902, 6004, 29898, 877, 742, 29871, 29947, 29947, 29947, 29947, 511, 623, 29897, 13, 1678, 1732, 29918, 2974, 29889, 16349, 29918, 1079, 369, 580, 13, 2 ]
core/topology/constraint/any.py
xUndero/noc
0
57976
<reponame>xUndero/noc # -*- coding: utf-8 -*- # ---------------------------------------------------------------------- # AnyConstraint # ---------------------------------------------------------------------- # Copyright (C) 2007-2019 The NOC Project # See LICENSE for details # ---------------------------------------------------------------------- # Python modules from __future__ import absolute_import # NOC modules from .base import BaseConstraint class AnyConstraint(BaseConstraint): """ Always true """ def __and__(self, other): # type: (BaseConstraint) -> BaseConstraint return other def __or__(self, other): # type: (BaseConstraint) -> BaseConstraint return other
[ 1, 529, 276, 1112, 420, 29958, 29916, 25263, 1489, 29914, 10763, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 29937, 448, 2683, 2683, 2683, 2683, 23648, 13, 29937, 3139, 21529, 13, 29937, 448, 2683, 2683, 2683, 2683, 23648, 13, 29937, 14187, 1266, 313, 29907, 29897, 29871, 29906, 29900, 29900, 29955, 29899, 29906, 29900, 29896, 29929, 450, 11698, 29907, 8010, 13, 29937, 2823, 365, 2965, 1430, 1660, 363, 4902, 13, 29937, 448, 2683, 2683, 2683, 2683, 23648, 13, 13, 29937, 5132, 10585, 13, 3166, 4770, 29888, 9130, 1649, 1053, 8380, 29918, 5215, 13, 13, 29937, 11698, 29907, 10585, 13, 3166, 869, 3188, 1053, 7399, 21529, 13, 13, 13, 1990, 3139, 21529, 29898, 5160, 21529, 1125, 13, 1678, 9995, 13, 1678, 29849, 1565, 13, 1678, 9995, 13, 13, 1678, 822, 4770, 392, 12035, 1311, 29892, 916, 1125, 13, 4706, 396, 1134, 29901, 313, 5160, 21529, 29897, 1599, 7399, 21529, 13, 4706, 736, 916, 13, 13, 1678, 822, 4770, 272, 12035, 1311, 29892, 916, 1125, 13, 4706, 396, 1134, 29901, 313, 5160, 21529, 29897, 1599, 7399, 21529, 13, 4706, 736, 916, 13, 2 ]
tests/integration/agenda/test_models.py
rolandgeider/OpenSlides
0
6459
<reponame>rolandgeider/OpenSlides from openslides.agenda.models import Item from openslides.core.models import CustomSlide from openslides.utils.test import TestCase class TestItemManager(TestCase): def test_get_root_and_children_db_queries(self): """ Test that get_root_and_children needs only one db query. """ for i in range(10): CustomSlide.objects.create(title='item{}'.format(i)) with self.assertNumQueries(1): Item.objects.get_root_and_children()
[ 1, 529, 276, 1112, 420, 29958, 307, 1049, 479, 1241, 29914, 6585, 16973, 2247, 13, 3166, 13246, 29880, 2247, 29889, 351, 8395, 29889, 9794, 1053, 10976, 13, 3166, 13246, 29880, 2247, 29889, 3221, 29889, 9794, 1053, 8701, 29903, 7459, 13, 3166, 13246, 29880, 2247, 29889, 13239, 29889, 1688, 1053, 4321, 8259, 13, 13, 13, 1990, 4321, 2001, 3260, 29898, 3057, 8259, 1125, 13, 1678, 822, 1243, 29918, 657, 29918, 4632, 29918, 392, 29918, 11991, 29918, 2585, 29918, 339, 6358, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 4321, 393, 679, 29918, 4632, 29918, 392, 29918, 11991, 4225, 871, 697, 4833, 2346, 29889, 13, 4706, 9995, 13, 4706, 363, 474, 297, 3464, 29898, 29896, 29900, 1125, 13, 9651, 8701, 29903, 7459, 29889, 12650, 29889, 3258, 29898, 3257, 2433, 667, 8875, 4286, 4830, 29898, 29875, 876, 13, 13, 4706, 411, 1583, 29889, 9294, 8009, 2182, 6358, 29898, 29896, 1125, 13, 9651, 10976, 29889, 12650, 29889, 657, 29918, 4632, 29918, 392, 29918, 11991, 580, 13, 2 ]
Beginner/WhileLoop.py
mihirkemkar/pythonexercises
0
152106
num = 1 factors = list() while num <= 100: if (num % 10) == 0: factors.append(num) num = num + 1 print("Factors :",factors)
[ 1, 6756, 13, 1949, 353, 29871, 29896, 30004, 13, 17028, 943, 353, 1051, 26471, 13, 8000, 954, 5277, 29871, 29896, 29900, 29900, 29901, 30004, 13, 1678, 565, 313, 1949, 1273, 29871, 29896, 29900, 29897, 1275, 29871, 29900, 29901, 30004, 13, 4706, 13879, 29889, 4397, 29898, 1949, 8443, 13, 30004, 13, 1678, 954, 353, 954, 718, 29871, 29896, 30004, 13, 2158, 703, 20738, 943, 584, 613, 17028, 943, 8443, 13, 30004, 13, 30004, 13, 30004, 13, 30004, 13, 30004, 13, 30004, 13, 2 ]
src/greplin/defer/semaphore_test.py
Cue/greplin-twisted-utils
2
1605621
# Copyright 2012 The greplin-twisted-utils 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. """Tests for deferred semaphores.""" from greplin.defer import base, semaphore from twisted.internet import defer import unittest import functools class PrioritySemaphoreTest(unittest.TestCase): """Tests for deferred priority semaphore""" def setUp(self): """Sets up the test.""" self.log = [] self.queue = semaphore.DeferredPrioritySemaphore(tokens=3) def call(self, fn, *args): """Calls the function with the given name and args and logs various related events.""" desc = ' '.join([fn] + list(str(ai) for ai in args)) self.log.append(desc) result = getattr(self.queue, fn)(*args) if isinstance(result, defer.Deferred): self.log.append('result: Deferred') result.addCallback(lambda _: self.log.append('callback ' + desc)) else: self.log.append('result: %s' % result) def testDescription(self): """Tests the description of the Deferred objects from the semaphore.""" d = [self.queue.acquire(i * 2) for i in range(5)] self.assertEqual( '*DeferredPrioritySemaphore(@%x, #1/5, priority=0, waiting=2)' % id(d[0]), base.describeDeferred(d[0]).partition(' ')[2]) # split off the active time self.assertEqual( 'DeferredPrioritySemaphore(@%x, #5/5, priority=8, waiting=2)' % id(d[4]), base.describeDeferred(d[4]).partition(' ')[2]) # split off the active time def testBasics(self): """Test the basics of a deferred priority semaphore.""" acq, rel = functools.partial(self.call, 'acquire'), functools.partial(self.call, 'release') acq(3) acq(4) acq(1) acq(0) acq(5) acq(6) acq(4) rel() rel() rel() acq(0) acq(9) acq(2) rel() rel() rel() rel() rel() rel() rel() self.assertEquals(["acquire 3", "result: Deferred", "callback acquire 3", "acquire 4", "result: Deferred", "callback acquire 4", "acquire 1", "result: Deferred", "callback acquire 1", "acquire 0", "result: Deferred", "acquire 5", "result: Deferred", "acquire 6", "result: Deferred", "acquire 4", "result: Deferred", "release", "callback acquire 0", "result: None", "release", "callback acquire 4", "result: None", "release", "callback acquire 5", "result: None", "acquire 0", "result: Deferred", "acquire 9", "result: Deferred", "acquire 2", "result: Deferred", "release", "callback acquire 0", "result: None", "release", "callback acquire 2", "result: None", "release", "callback acquire 6", "result: None", "release", "callback acquire 9", "result: None", "release", "result: None", "release", "result: None", "release", "result: None" ], self.log)
[ 1, 396, 14187, 1266, 29871, 29906, 29900, 29896, 29906, 450, 1395, 572, 262, 29899, 7516, 12652, 29899, 13239, 13189, 943, 29889, 13, 29937, 13, 29937, 10413, 21144, 1090, 278, 13380, 19245, 29892, 10079, 29871, 29906, 29889, 29900, 313, 1552, 376, 29931, 293, 1947, 1496, 13, 29937, 366, 1122, 451, 671, 445, 934, 5174, 297, 752, 13036, 411, 278, 19245, 29889, 13, 29937, 887, 1122, 4017, 263, 3509, 310, 278, 19245, 472, 13, 29937, 13, 29937, 268, 1732, 597, 1636, 29889, 4288, 29889, 990, 29914, 506, 11259, 29914, 27888, 1430, 1660, 29899, 29906, 29889, 29900, 13, 29937, 13, 29937, 25870, 3734, 491, 22903, 4307, 470, 15502, 304, 297, 5007, 29892, 7047, 13, 29937, 13235, 1090, 278, 19245, 338, 13235, 373, 385, 376, 3289, 8519, 29908, 350, 3289, 3235, 29892, 13, 29937, 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, 2823, 278, 19245, 363, 278, 2702, 4086, 14765, 1076, 11239, 322, 13, 29937, 27028, 1090, 278, 19245, 29889, 13, 13, 15945, 29908, 24376, 363, 316, 14373, 3031, 481, 2015, 267, 1213, 15945, 13, 13, 3166, 1395, 572, 262, 29889, 311, 571, 1053, 2967, 29892, 3031, 12451, 487, 13, 13, 3166, 3252, 12652, 29889, 14168, 300, 1053, 316, 571, 13, 13, 5215, 443, 27958, 13, 13, 5215, 2090, 312, 8789, 13, 13, 13, 13, 1990, 22096, 537, 28516, 12451, 487, 3057, 29898, 348, 27958, 29889, 3057, 8259, 1125, 13, 29871, 9995, 24376, 363, 316, 14373, 20136, 3031, 12451, 487, 15945, 29908, 13, 13, 13, 29871, 822, 731, 3373, 29898, 1311, 1125, 13, 1678, 9995, 29903, 1691, 701, 278, 1243, 1213, 15945, 13, 1678, 1583, 29889, 1188, 353, 5159, 13, 1678, 1583, 29889, 9990, 353, 3031, 12451, 487, 29889, 2772, 14373, 29925, 21766, 28516, 12451, 487, 29898, 517, 12360, 29922, 29941, 29897, 13, 13, 13, 29871, 822, 1246, 29898, 1311, 29892, 7876, 29892, 334, 5085, 1125, 13, 1678, 9995, 29907, 4293, 278, 740, 411, 278, 2183, 1024, 322, 6389, 322, 10748, 5164, 4475, 4959, 1213, 15945, 13, 1678, 5153, 353, 525, 15300, 7122, 4197, 9144, 29962, 718, 1051, 29898, 710, 29898, 1794, 29897, 363, 7468, 297, 6389, 876, 13, 1678, 1583, 29889, 1188, 29889, 4397, 29898, 14273, 29897, 13, 1678, 1121, 353, 679, 5552, 29898, 1311, 29889, 9990, 29892, 7876, 5033, 29930, 5085, 29897, 13, 1678, 565, 338, 8758, 29898, 2914, 29892, 316, 571, 29889, 2772, 14373, 1125, 13, 418, 1583, 29889, 1188, 29889, 4397, 877, 2914, 29901, 897, 14373, 1495, 13, 418, 1121, 29889, 1202, 10717, 29898, 2892, 903, 29901, 1583, 29889, 1188, 29889, 4397, 877, 14035, 525, 718, 5153, 876, 13, 1678, 1683, 29901, 13, 418, 1583, 29889, 1188, 29889, 4397, 877, 2914, 29901, 1273, 29879, 29915, 1273, 1121, 29897, 13, 13, 13, 29871, 822, 1243, 9868, 29898, 1311, 1125, 13, 1678, 9995, 24376, 278, 6139, 310, 278, 897, 14373, 3618, 515, 278, 3031, 12451, 487, 1213, 15945, 13, 1678, 270, 353, 518, 1311, 29889, 9990, 29889, 562, 1548, 29898, 29875, 334, 29871, 29906, 29897, 363, 474, 297, 3464, 29898, 29945, 4638, 13, 1678, 1583, 29889, 9294, 9843, 29898, 13, 4706, 525, 29930, 2772, 14373, 29925, 21766, 28516, 12451, 487, 10394, 29995, 29916, 29892, 396, 29896, 29914, 29945, 29892, 20136, 29922, 29900, 29892, 10534, 29922, 29906, 16029, 1273, 1178, 29898, 29881, 29961, 29900, 11724, 13, 4706, 2967, 29889, 2783, 29581, 2772, 14373, 29898, 29881, 29961, 29900, 14664, 16707, 877, 525, 9601, 29906, 2314, 396, 6219, 1283, 278, 6136, 931, 13, 1678, 1583, 29889, 9294, 9843, 29898, 13, 4706, 525, 2772, 14373, 29925, 21766, 28516, 12451, 487, 10394, 29995, 29916, 29892, 396, 29945, 29914, 29945, 29892, 20136, 29922, 29947, 29892, 10534, 29922, 29906, 16029, 1273, 1178, 29898, 29881, 29961, 29946, 11724, 13, 4706, 2967, 29889, 2783, 29581, 2772, 14373, 29898, 29881, 29961, 29946, 14664, 16707, 877, 525, 9601, 29906, 2314, 396, 6219, 1283, 278, 6136, 931, 13, 13, 13, 29871, 822, 1243, 9496, 1199, 29898, 1311, 1125, 13, 1678, 9995, 3057, 278, 2362, 1199, 310, 263, 316, 14373, 20136, 3031, 12451, 487, 1213, 15945, 13, 1678, 1274, 29939, 29892, 1104, 353, 2090, 312, 8789, 29889, 3846, 29898, 1311, 29889, 4804, 29892, 525, 562, 1548, 5477, 2090, 312, 8789, 29889, 3846, 29898, 1311, 29889, 4804, 29892, 525, 14096, 1495, 13, 1678, 1274, 29939, 29898, 29941, 29897, 13, 1678, 1274, 29939, 29898, 29946, 29897, 13, 1678, 1274, 29939, 29898, 29896, 29897, 13, 1678, 1274, 29939, 29898, 29900, 29897, 13, 1678, 1274, 29939, 29898, 29945, 29897, 13, 1678, 1274, 29939, 29898, 29953, 29897, 13, 1678, 1274, 29939, 29898, 29946, 29897, 13, 1678, 1104, 580, 13, 1678, 1104, 580, 13, 1678, 1104, 580, 13, 1678, 1274, 29939, 29898, 29900, 29897, 13, 1678, 1274, 29939, 29898, 29929, 29897, 13, 1678, 1274, 29939, 29898, 29906, 29897, 13, 1678, 1104, 580, 13, 1678, 1104, 580, 13, 1678, 1104, 580, 13, 1678, 1104, 580, 13, 1678, 1104, 580, 13, 1678, 1104, 580, 13, 1678, 1104, 580, 13, 13, 1678, 1583, 29889, 9294, 14776, 29898, 3366, 562, 1548, 29871, 29941, 613, 13, 462, 539, 376, 2914, 29901, 897, 14373, 613, 13, 462, 539, 376, 14035, 1274, 1548, 29871, 29941, 613, 13, 462, 539, 376, 562, 1548, 29871, 29946, 613, 13, 462, 539, 376, 2914, 29901, 897, 14373, 613, 13, 462, 539, 376, 14035, 1274, 1548, 29871, 29946, 613, 13, 462, 539, 376, 562, 1548, 29871, 29896, 613, 13, 462, 539, 376, 2914, 29901, 897, 14373, 613, 13, 462, 539, 376, 14035, 1274, 1548, 29871, 29896, 613, 13, 462, 539, 376, 562, 1548, 29871, 29900, 613, 13, 462, 539, 376, 2914, 29901, 897, 14373, 613, 13, 462, 539, 376, 562, 1548, 29871, 29945, 613, 13, 462, 539, 376, 2914, 29901, 897, 14373, 613, 13, 462, 539, 376, 562, 1548, 29871, 29953, 613, 13, 462, 539, 376, 2914, 29901, 897, 14373, 613, 13, 462, 539, 376, 562, 1548, 29871, 29946, 613, 13, 462, 539, 376, 2914, 29901, 897, 14373, 613, 13, 462, 539, 376, 14096, 613, 13, 462, 539, 376, 14035, 1274, 1548, 29871, 29900, 613, 13, 462, 539, 376, 2914, 29901, 6213, 613, 13, 462, 539, 376, 14096, 613, 13, 462, 539, 376, 14035, 1274, 1548, 29871, 29946, 613, 13, 462, 539, 376, 2914, 29901, 6213, 613, 13, 462, 539, 376, 14096, 613, 13, 462, 539, 376, 14035, 1274, 1548, 29871, 29945, 613, 13, 462, 539, 376, 2914, 29901, 6213, 613, 13, 462, 539, 376, 562, 1548, 29871, 29900, 613, 13, 462, 539, 376, 2914, 29901, 897, 14373, 613, 13, 462, 539, 376, 562, 1548, 29871, 29929, 613, 13, 462, 539, 376, 2914, 29901, 897, 14373, 613, 13, 462, 539, 376, 562, 1548, 29871, 29906, 613, 13, 462, 539, 376, 2914, 29901, 897, 14373, 613, 13, 462, 539, 376, 14096, 613, 13, 462, 539, 376, 14035, 1274, 1548, 29871, 29900, 613, 13, 462, 539, 376, 2914, 29901, 6213, 613, 13, 462, 539, 376, 14096, 613, 13, 462, 539, 376, 14035, 1274, 1548, 29871, 29906, 613, 13, 462, 539, 376, 2914, 29901, 6213, 613, 13, 462, 539, 376, 14096, 613, 13, 462, 539, 376, 14035, 1274, 1548, 29871, 29953, 613, 13, 462, 539, 376, 2914, 29901, 6213, 613, 13, 462, 539, 376, 14096, 613, 13, 462, 539, 376, 14035, 1274, 1548, 29871, 29929, 613, 13, 462, 539, 376, 2914, 29901, 6213, 613, 13, 462, 539, 376, 14096, 613, 13, 462, 539, 376, 2914, 29901, 6213, 613, 13, 462, 539, 376, 14096, 613, 13, 462, 539, 376, 2914, 29901, 6213, 613, 13, 462, 539, 376, 14096, 613, 13, 462, 539, 376, 2914, 29901, 6213, 29908, 13, 462, 418, 21251, 1583, 29889, 1188, 29897, 13, 13, 2 ]
src/philipstv/pairing.py
bcyran/philipstv
0
1603563
<reponame>bcyran/philipstv<filename>src/philipstv/pairing.py import logging from base64 import b64decode from typing import Callable from ._utils import create_signature from .api import PhilipsTVAPI from .exceptions import PhilipsTVPairingError from .model import DeviceInfo, PairingAuthInfo, PairingGrantPayload, PairingRequestPayload from .types import Credentials LOGGER = logging.getLogger(__name__) _SECRET = b64decode( "<KEY>" ) PinCallback = Callable[[], str] class PhilipsTVPairer: """Encapsulates the pairing process and allows to perform it in a single call.""" def __init__(self, api: PhilipsTVAPI, device_info: DeviceInfo) -> None: """ Args: api: :class:`PhilipsTVAPI` instance with which pairing will be performed. device_info: Informations about the device which requests the pairing. This doesn't really seem to have any effect, besides the fact that `id` given here serves as a "username" and later will be the first value in the credentials tuple. """ self._api: PhilipsTVAPI = api self.device_info = device_info def pair(self, pin_callback: PinCallback) -> Credentials: """Perfom the pairing. Hint: If the pairing is successful, this leaves the underlying :class:`PhilipsTVAPI` instance in authenticated state, so you don't have to set :attr:`PhilipsTVAPI.auth` with the received credentials. Args: pin_callback: Callback function which should return the PIN displayed on the TV screen as a string. It's impossible to know the PIN before requesting pairing so this function should be used to prompt the user for the PIN. Returns: Authentication credentials tuple. This value can be used to authenticate with the TV at any point in future. """ self._api.auth = None pair_response = self._api.pair_request(self._get_request_payload()) is_success = pair_response.error_id == "SUCCESS" if not (is_success and pair_response.auth_key and pair_response.timestamp): raise PhilipsTVPairingError(pair_response) pair_pin = pin_callback() self._api.auth = (self.device_info.id, pair_response.auth_key) grant_response = self._api.pair_grant( self._get_grant_payload(pair_pin, pair_response.timestamp) ) if grant_response.error_id != "SUCCESS": self._api.auth = None raise PhilipsTVPairingError(grant_response) return (self.device_info.id, pair_response.auth_key) def _get_request_payload(self) -> PairingRequestPayload: return PairingRequestPayload( scope=["read", "write", "control"], device=self.device_info, ) def _get_grant_payload(self, pin: str, timestamp: int) -> PairingGrantPayload: signature = create_signature(_SECRET, f"{timestamp}{pin}".encode()).decode() return PairingGrantPayload( auth=PairingAuthInfo(pin=pin, auth_timestamp=timestamp, auth_signature=signature), device=self.device_info, )
[ 1, 529, 276, 1112, 420, 29958, 29890, 1270, 661, 29914, 561, 309, 666, 303, 29894, 29966, 9507, 29958, 4351, 29914, 561, 309, 666, 303, 29894, 29914, 18784, 292, 29889, 2272, 13, 5215, 12183, 13, 3166, 2967, 29953, 29946, 1053, 289, 29953, 29946, 13808, 13, 3166, 19229, 1053, 8251, 519, 13, 13, 3166, 869, 29918, 13239, 1053, 1653, 29918, 4530, 1535, 13, 3166, 869, 2754, 1053, 8234, 567, 8050, 8787, 13, 3166, 869, 11739, 29879, 1053, 8234, 567, 8050, 20547, 292, 2392, 13, 3166, 869, 4299, 1053, 21830, 3401, 29892, 349, 1466, 292, 6444, 3401, 29892, 349, 1466, 292, 3338, 424, 15467, 1359, 29892, 349, 1466, 292, 3089, 15467, 1359, 13, 3166, 869, 8768, 1053, 24596, 9409, 13, 13, 14480, 17070, 353, 12183, 29889, 657, 16363, 22168, 978, 1649, 29897, 13, 13, 29918, 1660, 22245, 29911, 353, 289, 29953, 29946, 13808, 29898, 13, 1678, 9872, 10818, 11903, 13, 29897, 13, 13, 13, 29925, 262, 10717, 353, 8251, 519, 8999, 1402, 851, 29962, 13, 13, 13, 1990, 8234, 567, 8050, 20547, 261, 29901, 13, 1678, 9995, 8566, 2547, 352, 1078, 278, 5101, 292, 1889, 322, 6511, 304, 2189, 372, 297, 263, 2323, 1246, 1213, 15945, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 7882, 29901, 8234, 567, 8050, 8787, 29892, 4742, 29918, 3888, 29901, 21830, 3401, 29897, 1599, 6213, 29901, 13, 4706, 9995, 13, 4706, 826, 3174, 29901, 13, 9651, 7882, 29901, 584, 1990, 18078, 4819, 2638, 567, 8050, 8787, 29952, 2777, 411, 607, 5101, 292, 674, 367, 8560, 29889, 13, 9651, 4742, 29918, 3888, 29901, 15162, 800, 1048, 278, 4742, 607, 7274, 278, 5101, 292, 29889, 910, 1838, 29915, 29873, 13, 18884, 2289, 2833, 304, 505, 738, 2779, 29892, 18034, 278, 2114, 393, 421, 333, 29952, 2183, 1244, 19700, 408, 263, 13, 18884, 376, 6786, 29908, 322, 2678, 674, 367, 278, 937, 995, 297, 278, 16140, 18761, 29889, 13, 4706, 9995, 13, 4706, 1583, 3032, 2754, 29901, 8234, 567, 8050, 8787, 353, 7882, 13, 4706, 1583, 29889, 10141, 29918, 3888, 353, 4742, 29918, 3888, 13, 13, 1678, 822, 5101, 29898, 1311, 29892, 12534, 29918, 14035, 29901, 17434, 10717, 29897, 1599, 24596, 9409, 29901, 13, 4706, 9995, 5894, 29888, 290, 278, 5101, 292, 29889, 13, 13, 4706, 379, 524, 29901, 13, 9651, 960, 278, 5101, 292, 338, 9150, 29892, 445, 11308, 278, 14407, 584, 1990, 18078, 4819, 2638, 567, 8050, 8787, 29952, 2777, 13, 9651, 297, 15585, 630, 2106, 29892, 577, 366, 1016, 29915, 29873, 505, 304, 731, 584, 5552, 18078, 4819, 2638, 567, 8050, 8787, 29889, 5150, 29952, 411, 278, 13, 9651, 4520, 16140, 29889, 13, 13, 4706, 826, 3174, 29901, 13, 9651, 12534, 29918, 14035, 29901, 8251, 1627, 740, 607, 881, 736, 278, 349, 1177, 8833, 373, 278, 5648, 13, 18884, 4315, 408, 263, 1347, 29889, 739, 29915, 29879, 9301, 304, 1073, 278, 349, 1177, 1434, 2009, 292, 5101, 292, 13, 18884, 577, 445, 740, 881, 367, 1304, 304, 9508, 278, 1404, 363, 278, 349, 1177, 29889, 13, 13, 4706, 16969, 29901, 13, 9651, 27241, 16140, 18761, 29889, 910, 995, 508, 367, 1304, 304, 15585, 403, 411, 278, 5648, 13, 9651, 472, 738, 1298, 297, 5434, 29889, 13, 13, 4706, 9995, 13, 4706, 1583, 3032, 2754, 29889, 5150, 353, 6213, 13, 4706, 5101, 29918, 5327, 353, 1583, 3032, 2754, 29889, 18784, 29918, 3827, 29898, 1311, 3032, 657, 29918, 3827, 29918, 23813, 3101, 13, 13, 4706, 338, 29918, 8698, 353, 5101, 29918, 5327, 29889, 2704, 29918, 333, 1275, 376, 14605, 26925, 29908, 13, 4706, 565, 451, 313, 275, 29918, 8698, 322, 5101, 29918, 5327, 29889, 5150, 29918, 1989, 322, 5101, 29918, 5327, 29889, 16394, 1125, 13, 9651, 12020, 8234, 567, 8050, 20547, 292, 2392, 29898, 18784, 29918, 5327, 29897, 13, 13, 4706, 5101, 29918, 12687, 353, 12534, 29918, 14035, 580, 13, 13, 4706, 1583, 3032, 2754, 29889, 5150, 353, 313, 1311, 29889, 10141, 29918, 3888, 29889, 333, 29892, 5101, 29918, 5327, 29889, 5150, 29918, 1989, 29897, 13, 4706, 16690, 29918, 5327, 353, 1583, 3032, 2754, 29889, 18784, 29918, 629, 424, 29898, 13, 9651, 1583, 3032, 657, 29918, 629, 424, 29918, 23813, 29898, 18784, 29918, 12687, 29892, 5101, 29918, 5327, 29889, 16394, 29897, 13, 4706, 1723, 13, 13, 4706, 565, 16690, 29918, 5327, 29889, 2704, 29918, 333, 2804, 376, 14605, 26925, 1115, 13, 9651, 1583, 3032, 2754, 29889, 5150, 353, 6213, 13, 9651, 12020, 8234, 567, 8050, 20547, 292, 2392, 29898, 629, 424, 29918, 5327, 29897, 13, 13, 4706, 736, 313, 1311, 29889, 10141, 29918, 3888, 29889, 333, 29892, 5101, 29918, 5327, 29889, 5150, 29918, 1989, 29897, 13, 13, 1678, 822, 903, 657, 29918, 3827, 29918, 23813, 29898, 1311, 29897, 1599, 349, 1466, 292, 3089, 15467, 1359, 29901, 13, 4706, 736, 349, 1466, 292, 3089, 15467, 1359, 29898, 13, 9651, 6874, 29922, 3366, 949, 613, 376, 3539, 613, 376, 6451, 12436, 13, 9651, 4742, 29922, 1311, 29889, 10141, 29918, 3888, 29892, 13, 4706, 1723, 13, 13, 1678, 822, 903, 657, 29918, 629, 424, 29918, 23813, 29898, 1311, 29892, 12534, 29901, 851, 29892, 14334, 29901, 938, 29897, 1599, 349, 1466, 292, 3338, 424, 15467, 1359, 29901, 13, 4706, 12608, 353, 1653, 29918, 4530, 1535, 7373, 1660, 22245, 29911, 29892, 285, 29908, 29912, 16394, 1157, 12687, 29913, 1642, 12508, 16655, 13808, 580, 13, 4706, 736, 349, 1466, 292, 3338, 424, 15467, 1359, 29898, 13, 9651, 4817, 29922, 20547, 292, 6444, 3401, 29898, 12687, 29922, 12687, 29892, 4817, 29918, 16394, 29922, 16394, 29892, 4817, 29918, 4530, 1535, 29922, 4530, 1535, 511, 13, 9651, 4742, 29922, 1311, 29889, 10141, 29918, 3888, 29892, 13, 4706, 1723, 13, 2 ]
Stack_and_Queue/S_and_Q_Review.py
misscindy/Interview
0
190284
# Stack & Queue Review # 9.3 valid paren # 9.4 Longest Valid Paren # "(()))(()())" def longest_valid(s): left_p, max_len, end = [], 0, -1 for ndx, p in enumerate(s): if p == "(": left_p.append(ndx) # see a ")" else: if not left_p: end = ndx else: left_p.pop() start = end if not left_p else left_p[-1] max_len = max(max_len, ndx - start) return max_len # 9.5 simplify path # 9.6 print bst def load_src(name, fpath): import os, imp p = fpath if os.path.isabs(fpath) \ else os.path.join(os.path.dirname(__file__), fpath) return imp.load_source(name, p) util = load_src("util", "../Tree/util.py") def print_bst(node): tn = util.TreeNode() # 9.7 search posting list class RandomListNode: def __init__(self, x): self.val = x self.next = None self.random = None self.order = -1 def __repr__(self): rand = self.random.val return "Node(%i): %i " % (rand, self.val) def jump_first(head): _visit(head, [0]) def _visit(node, cur_order): if node and node.order == -1: node.order = cur_order[0] cur_order[0] += 1 _visit(node.random, cur_order) _visit(node.next, cur_order) def jump_first_i(head): order, stack = 0, [head] while stack: nxt = stack.pop() if nxt.order == -1: nxt.order = order + 1 order += 1 if nxt.next: stack.append(nxt.next) if nxt.random: stack.append(nxt.random) # 9.8 sunset view stream def out_put_sunsets(): bldgs = [] nxt = raw_input("nxt building height > ") while nxt != "": newbie = int(nxt) while bldgs and newbie >= bldgs[-1]: bldgs.pop() bldgs.append(newbie) nxt = raw_input("nxt building height > ") for i in bldgs: print i, print # 9.9 # sort a stack def sort(stack): if not stack: return top = stack.pop() sort(stack) insert(top, stack) def insert(val, stack): if not stack or stack[-1] >= val: stack.append(val) else: top = stack.pop() insert(val, stack) stack.append(top) if __name__ == '__main__': a = [1, 2, 3, 2, 5, 2] sort(a) print a print "9.8" out_put_sunsets() print "9.7" head = RandomListNode(0) first = RandomListNode(1) sec = RandomListNode(2) third = RandomListNode(3) head.next, head.random = first, sec first.next, first.random = sec, head sec.next, sec.random = third, third third.next, third.random = None, sec # runner = head # while runner: # print runner, # runner = runner.next # print jump_first_i(head) #jump_first(head, 0) runner = head while runner: print runner, "order : ", runner.order runner = runner.next print "Longest valid paren" test_cases = ["(())", "()(", ")))()"] for i in test_cases: print longest_valid(i)
[ 1, 396, 10292, 669, 5462, 434, 13957, 13, 13, 13, 29937, 29871, 29929, 29889, 29941, 2854, 610, 264, 13, 13, 13, 29937, 29871, 29929, 29889, 29946, 6242, 342, 15758, 1459, 264, 13, 29937, 376, 14885, 876, 14885, 3101, 29908, 13, 1753, 27217, 29918, 3084, 29898, 29879, 1125, 13, 1678, 2175, 29918, 29886, 29892, 4236, 29918, 2435, 29892, 1095, 353, 19997, 29871, 29900, 29892, 448, 29896, 13, 13, 1678, 363, 29871, 299, 29916, 29892, 282, 297, 26985, 29898, 29879, 1125, 13, 4706, 565, 282, 1275, 376, 703, 29901, 13, 9651, 2175, 29918, 29886, 29889, 4397, 29898, 299, 29916, 29897, 13, 4706, 396, 1074, 263, 376, 5513, 13, 4706, 1683, 29901, 13, 9651, 565, 451, 2175, 29918, 29886, 29901, 13, 18884, 1095, 353, 29871, 299, 29916, 13, 9651, 1683, 29901, 13, 18884, 2175, 29918, 29886, 29889, 7323, 580, 13, 18884, 1369, 353, 1095, 565, 451, 2175, 29918, 29886, 1683, 2175, 29918, 29886, 14352, 29896, 29962, 13, 18884, 4236, 29918, 2435, 353, 4236, 29898, 3317, 29918, 2435, 29892, 29871, 299, 29916, 448, 1369, 29897, 13, 1678, 736, 4236, 29918, 2435, 13, 13, 13, 13, 13, 29937, 29871, 29929, 29889, 29945, 21092, 2224, 13, 13, 13, 29937, 29871, 29929, 29889, 29953, 1596, 289, 303, 13, 1753, 2254, 29918, 4351, 29898, 978, 29892, 285, 2084, 1125, 13, 1678, 1053, 2897, 29892, 2411, 13, 1678, 282, 353, 285, 2084, 565, 2897, 29889, 2084, 29889, 275, 6897, 29898, 29888, 2084, 29897, 320, 13, 4706, 1683, 2897, 29889, 2084, 29889, 7122, 29898, 359, 29889, 2084, 29889, 25721, 22168, 1445, 1649, 511, 285, 2084, 29897, 13, 1678, 736, 2411, 29889, 1359, 29918, 4993, 29898, 978, 29892, 282, 29897, 13, 13, 4422, 353, 2254, 29918, 4351, 703, 4422, 613, 376, 6995, 9643, 29914, 4422, 29889, 2272, 1159, 13, 13, 13, 1753, 1596, 29918, 7891, 29898, 3177, 1125, 13, 1678, 260, 29876, 353, 3667, 29889, 9643, 4247, 580, 13, 13, 13, 13, 13, 29937, 29871, 29929, 29889, 29955, 2740, 16742, 1051, 13, 13, 13, 1990, 16968, 1293, 4247, 29901, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 921, 1125, 13, 4706, 1583, 29889, 791, 353, 921, 13, 4706, 1583, 29889, 4622, 353, 6213, 13, 4706, 1583, 29889, 8172, 353, 6213, 13, 4706, 1583, 29889, 2098, 353, 448, 29896, 13, 13, 1678, 822, 4770, 276, 558, 12035, 1311, 1125, 13, 4706, 20088, 353, 1583, 29889, 8172, 29889, 791, 13, 4706, 736, 376, 4247, 29414, 29875, 1125, 1273, 29875, 376, 1273, 313, 9502, 29892, 1583, 29889, 791, 29897, 13, 13, 13, 1753, 12500, 29918, 4102, 29898, 2813, 1125, 13, 1678, 903, 1730, 277, 29898, 2813, 29892, 518, 29900, 2314, 13, 13, 13, 1753, 903, 1730, 277, 29898, 3177, 29892, 3151, 29918, 2098, 1125, 13, 1678, 565, 2943, 322, 2943, 29889, 2098, 1275, 448, 29896, 29901, 13, 4706, 2943, 29889, 2098, 353, 3151, 29918, 2098, 29961, 29900, 29962, 13, 4706, 3151, 29918, 2098, 29961, 29900, 29962, 4619, 29871, 29896, 13, 4706, 903, 1730, 277, 29898, 3177, 29889, 8172, 29892, 3151, 29918, 2098, 29897, 13, 4706, 903, 1730, 277, 29898, 3177, 29889, 4622, 29892, 3151, 29918, 2098, 29897, 13, 13, 13, 1753, 12500, 29918, 4102, 29918, 29875, 29898, 2813, 1125, 13, 1678, 1797, 29892, 5096, 353, 29871, 29900, 29892, 518, 2813, 29962, 13, 1678, 1550, 5096, 29901, 13, 4706, 302, 486, 353, 5096, 29889, 7323, 580, 13, 4706, 565, 302, 486, 29889, 2098, 1275, 448, 29896, 29901, 13, 9651, 302, 486, 29889, 2098, 353, 1797, 718, 29871, 29896, 13, 9651, 1797, 4619, 29871, 29896, 13, 9651, 565, 302, 486, 29889, 4622, 29901, 13, 18884, 5096, 29889, 4397, 29898, 29876, 486, 29889, 4622, 29897, 13, 9651, 565, 302, 486, 29889, 8172, 29901, 13, 18884, 5096, 29889, 4397, 29898, 29876, 486, 29889, 8172, 29897, 13, 13, 13, 13, 13, 13, 13, 13, 29937, 29871, 29929, 29889, 29947, 6575, 842, 1776, 4840, 13, 13, 1753, 714, 29918, 649, 29918, 11445, 7224, 7295, 13, 1678, 289, 430, 3174, 353, 5159, 13, 1678, 302, 486, 353, 10650, 29918, 2080, 703, 29876, 486, 5214, 3171, 1405, 16521, 13, 1678, 1550, 302, 486, 2804, 376, 1115, 13, 4706, 716, 10993, 353, 938, 29898, 29876, 486, 29897, 13, 4706, 1550, 289, 430, 3174, 322, 716, 10993, 6736, 289, 430, 3174, 14352, 29896, 5387, 13, 9651, 289, 430, 3174, 29889, 7323, 580, 13, 4706, 289, 430, 3174, 29889, 4397, 29898, 1482, 10993, 29897, 13, 4706, 302, 486, 353, 10650, 29918, 2080, 703, 29876, 486, 5214, 3171, 1405, 16521, 13, 1678, 363, 474, 297, 289, 430, 3174, 29901, 13, 4706, 1596, 474, 29892, 13, 1678, 1596, 13, 13, 13, 13, 29937, 29871, 29929, 29889, 29929, 13, 29937, 2656, 263, 5096, 13, 13, 13, 1753, 2656, 29898, 1429, 1125, 13, 13, 1678, 565, 451, 5096, 29901, 13, 4706, 736, 13, 1678, 2246, 353, 5096, 29889, 7323, 580, 13, 1678, 2656, 29898, 1429, 29897, 13, 1678, 4635, 29898, 3332, 29892, 5096, 29897, 13, 13, 13, 1753, 4635, 29898, 791, 29892, 5096, 1125, 13, 1678, 565, 451, 5096, 470, 5096, 14352, 29896, 29962, 6736, 659, 29901, 13, 4706, 5096, 29889, 4397, 29898, 791, 29897, 13, 13, 1678, 1683, 29901, 13, 4706, 2246, 353, 5096, 29889, 7323, 580, 13, 4706, 4635, 29898, 791, 29892, 5096, 29897, 13, 4706, 5096, 29889, 4397, 29898, 3332, 29897, 13, 13, 13, 361, 4770, 978, 1649, 1275, 525, 1649, 3396, 1649, 2396, 13, 1678, 263, 353, 518, 29896, 29892, 29871, 29906, 29892, 29871, 29941, 29892, 29871, 29906, 29892, 29871, 29945, 29892, 29871, 29906, 29962, 13, 1678, 2656, 29898, 29874, 29897, 13, 1678, 1596, 263, 13, 1678, 1596, 376, 29929, 29889, 29947, 29908, 13, 1678, 714, 29918, 649, 29918, 11445, 7224, 580, 13, 1678, 1596, 376, 29929, 29889, 29955, 29908, 13, 1678, 2343, 353, 16968, 1293, 4247, 29898, 29900, 29897, 13, 1678, 937, 353, 16968, 1293, 4247, 29898, 29896, 29897, 13, 1678, 5226, 353, 16968, 1293, 4247, 29898, 29906, 29897, 13, 1678, 4654, 353, 16968, 1293, 4247, 29898, 29941, 29897, 13, 1678, 2343, 29889, 4622, 29892, 2343, 29889, 8172, 353, 937, 29892, 5226, 13, 1678, 937, 29889, 4622, 29892, 937, 29889, 8172, 353, 5226, 29892, 2343, 13, 1678, 5226, 29889, 4622, 29892, 5226, 29889, 8172, 353, 4654, 29892, 4654, 13, 1678, 4654, 29889, 4622, 29892, 4654, 29889, 8172, 353, 6213, 29892, 5226, 13, 1678, 396, 28877, 353, 2343, 13, 1678, 396, 1550, 28877, 29901, 13, 1678, 396, 1596, 28877, 29892, 13, 1678, 396, 29871, 12, 27492, 353, 28877, 29889, 4622, 13, 13, 1678, 396, 1596, 13, 1678, 12500, 29918, 4102, 29918, 29875, 29898, 2813, 29897, 13, 1678, 396, 29926, 3427, 29918, 4102, 29898, 2813, 29892, 29871, 29900, 29897, 13, 1678, 28877, 353, 2343, 13, 1678, 1550, 28877, 29901, 13, 4706, 1596, 28877, 29892, 376, 2098, 584, 9162, 28877, 29889, 2098, 13, 4706, 28877, 353, 28877, 29889, 4622, 13, 1678, 1596, 376, 8208, 342, 2854, 610, 264, 29908, 13, 1678, 1243, 29918, 11436, 353, 6796, 29898, 3101, 613, 376, 580, 28165, 376, 4961, 580, 3108, 13, 1678, 363, 474, 297, 1243, 29918, 11436, 29901, 13, 4706, 1596, 27217, 29918, 3084, 29898, 29875, 29897, 13, 13, 2 ]
papermerge/core/migrations/0023_auto_20200921_0456.py
jcollie/papermerge-core
45
109231
# Generated by Django 3.0.10 on 2020-09-21 04:56 from django.db import migrations, models import taggit.managers class Migration(migrations.Migration): dependencies = [ ('core', '0022_auto_20200909_0826'), ] operations = [ migrations.AlterModelOptions( name='tag', options={'ordering': ['name'], 'verbose_name': 'Tag', 'verbose_name_plural': 'Tags'}, ), migrations.RemoveField( model_name='automate', name='plugin_name', ), migrations.AddField( model_name='automate', name='tags', field=taggit.managers.TaggableManager(help_text='A comma-separated list of tags.', through='core.ColoredTag', to='core.Tag', verbose_name='Tags'), ), migrations.AlterField( model_name='tag', name='pinned', field=models.BooleanField(default=False, help_text='Pinned tag will be displayed under Documents menu. It serves as shortcut to quickly filter folders/documents associated with this tag'), ), ]
[ 1, 396, 3251, 630, 491, 15337, 29871, 29941, 29889, 29900, 29889, 29896, 29900, 373, 29871, 29906, 29900, 29906, 29900, 29899, 29900, 29929, 29899, 29906, 29896, 29871, 29900, 29946, 29901, 29945, 29953, 13, 13, 3166, 9557, 29889, 2585, 1053, 9725, 800, 29892, 4733, 13, 5215, 4055, 5559, 29889, 1171, 18150, 13, 13, 13, 1990, 341, 16783, 29898, 26983, 800, 29889, 29924, 16783, 1125, 13, 13, 1678, 9962, 353, 518, 13, 4706, 6702, 3221, 742, 525, 29900, 29900, 29906, 29906, 29918, 6921, 29918, 29906, 29900, 29906, 29900, 29900, 29929, 29900, 29929, 29918, 29900, 29947, 29906, 29953, 5477, 13, 1678, 4514, 13, 13, 1678, 6931, 353, 518, 13, 4706, 9725, 800, 29889, 2499, 357, 3195, 5856, 29898, 13, 9651, 1024, 2433, 4039, 742, 13, 9651, 3987, 3790, 29915, 2098, 292, 2396, 6024, 978, 7464, 525, 369, 15828, 29918, 978, 2396, 525, 8176, 742, 525, 369, 15828, 29918, 978, 29918, 572, 3631, 2396, 525, 28089, 16675, 13, 4706, 10353, 13, 4706, 9725, 800, 29889, 15941, 3073, 29898, 13, 9651, 1904, 29918, 978, 2433, 17405, 403, 742, 13, 9651, 1024, 2433, 8582, 29918, 978, 742, 13, 4706, 10353, 13, 4706, 9725, 800, 29889, 2528, 3073, 29898, 13, 9651, 1904, 29918, 978, 2433, 17405, 403, 742, 13, 9651, 1024, 2433, 11338, 742, 13, 9651, 1746, 29922, 4039, 5559, 29889, 1171, 18150, 29889, 8176, 29531, 3260, 29898, 8477, 29918, 726, 2433, 29909, 16694, 29899, 25048, 630, 1051, 310, 8282, 29889, 742, 1549, 2433, 3221, 29889, 3306, 287, 8176, 742, 304, 2433, 3221, 29889, 8176, 742, 26952, 29918, 978, 2433, 28089, 5477, 13, 4706, 10353, 13, 4706, 9725, 800, 29889, 2499, 357, 3073, 29898, 13, 9651, 1904, 29918, 978, 2433, 4039, 742, 13, 9651, 1024, 2433, 29886, 27464, 742, 13, 9651, 1746, 29922, 9794, 29889, 18146, 3073, 29898, 4381, 29922, 8824, 29892, 1371, 29918, 726, 2433, 29925, 27464, 4055, 674, 367, 8833, 1090, 10854, 29879, 6143, 29889, 739, 19700, 408, 21697, 304, 9098, 4175, 16495, 29914, 3225, 29879, 6942, 411, 445, 4055, 5477, 13, 4706, 10353, 13, 1678, 4514, 13, 2 ]
app/omwebapp/tests/view/__init__.py
JojiKoike/OMWebAppEngine
0
109341
""" View(WebAPI)のテストコード群パッケージです。 """
[ 1, 9995, 13, 1043, 29898, 3609, 8787, 29897, 30199, 30572, 30255, 30279, 30459, 30185, 30335, 31829, 30715, 30317, 30978, 30185, 30391, 30499, 30427, 30267, 13, 15945, 29908, 13, 2 ]
Exercicios/ex013.py
GabrielMazzuchello/Curso-Em-Video
2
125190
<reponame>GabrielMazzuchello/Curso-Em-Video s = float(input('qual erá o salario do funcionario? R$')) aul = s * 15 / 100 print('o salario do funcionari que andes custava R${:.2f} agora com 15% de aumento custará R${:.2f}'.format(s, (s+aul)))
[ 1, 529, 276, 1112, 420, 29958, 29954, 370, 12836, 29924, 7511, 987, 3156, 29914, 23902, 578, 29899, 6026, 29899, 15167, 13, 29879, 353, 5785, 29898, 2080, 877, 15380, 604, 29976, 288, 4497, 2628, 437, 21802, 2628, 29973, 390, 29938, 8785, 13, 29874, 352, 353, 269, 334, 29871, 29896, 29945, 847, 29871, 29896, 29900, 29900, 13, 2158, 877, 29877, 4497, 2628, 437, 21802, 1306, 712, 322, 267, 25387, 879, 390, 5303, 29901, 29889, 29906, 29888, 29913, 946, 2207, 419, 29871, 29896, 29945, 29995, 316, 19291, 29877, 25387, 20484, 390, 5303, 29901, 29889, 29906, 29888, 29913, 4286, 4830, 29898, 29879, 29892, 313, 29879, 29974, 29874, 352, 4961, 13, 2 ]
Code/ConvNetAbel.py
abel-gr/AbelNN
1
17902
<reponame>abel-gr/AbelNN # Copyright <NAME>. All Rights Reserved. # https://github.com/abel-gr/AbelNN import numpy as np import copy as copy import random import matplotlib import matplotlib.pyplot as plt import matplotlib.cm as cm from pylab import text import math class ConvNetAbel: version = 1.2 def __init__(self, hidden = [1], nEpochs = 1, learningRate=0.1, manualWeights=[], debugLevel=1, rangeRandomWeight=None, showLogs=False, softmax=False, activationFunction='leakyrelu', verbose = False, use='classification', batch_size=1, batch_gradient='average', batch_mult=1, dropout=0, pre_norm=False, shuffle=True, iterationDrop=0, convFilters = [32, 64, 128], convStride=2, convFilterSizes=3, learningRateConv=0.001, convEpochs=10, kernel_initializer='he_normal'): self.hiddenL = copy.deepcopy(hidden) self.hiddenL2 = copy.deepcopy(hidden) self.learningRate = learningRate self.numEpochs = nEpochs self.costs = [] # Costs list to check performance self.debugWeights = [] self.meanCostByEpoch = [] self.hiddenWeights = [] self.manualWeights = manualWeights self.debugMode = debugLevel self.rangeRandomWeight = rangeRandomWeight self.showLogs = showLogs self.softmax = softmax self.n_layer0 = -1 self.activationFunction = activationFunction self.verbose = verbose self.use = use self.batch_size = batch_size self.batch_gradient = batch_gradient self.batch_mult = batch_mult self.dropout = dropout self.pre_norm = pre_norm self.shuffle = shuffle self.iterationDrop = iterationDrop self.XavierInitialization = '1' self.lastLayerNeurons = -1 # ConvNet: self.convFilters = convFilters self.filtersValues = [None] * len(convFilters) self.convStride = convStride self.convFilterSizes = convFilterSizes self.learningRateConv = learningRateConv self.convEpochs = convEpochs self.kernel_initializer = kernel_initializer # Conv2 with only one kernel def conv2(self, x, kernel, stride=1): output = [] #np.zeros((kernel.shape), dtype=np.float32) kernel_l = kernel.shape[0] kernel_size = kernel.shape[0] * kernel.shape[1] c = int(kernel_l / 2) for i in range(c, x.shape[0] - c, stride): o = [] for j in range(c, x.shape[1] - c, stride): i0 = i - c j0 = j - c i1 = i + c + 1 j1 = j + c + 1 o.append(np.sum(x[i0:i1, j0:j1] * kernel)) output.append(o) output = np.asarray(output) return output # Convolution with multi-filters def conv_filters(self, x, filters, stride=1, relu=False, mode='same'): lex = len(x.shape) lef = len(filters.shape) if lex > lef: print('conv_filters: The input array cannot have more dimensions than the filter array.') return 0 output = [] kernel_l = filters.shape[0] kernel_size = filters.shape[0] * filters.shape[1] if lef == 2: num_filters = 1 else: num_filters = filters.shape[-1] c = int(kernel_l / 2) dim3 = False evenShapeKernel = (kernel_l % 2 == 0) if lex == 2: dim2 = True p0 = x.shape[0] p1 = x.shape[1] else: # x parameter was the output of this method previously called if lex == lef: num_new_filters = int(num_filters / x.shape[-1]) if (num_new_filters % 2 != 0) and (num_filters % 2 == 0): num_new_filters = num_new_filters - 1 if (num_new_filters == 0): num_new_filters = 1 else: # It is the first convolutional layer of a color image num_new_filters = num_filters dim3 = True dim2 = False p0 = x.shape[0] p1 = x.shape[1] if mode == 'full': fs0 = int(filters.shape[0] / 2) fs1 = int(filters.shape[1] / 2) max0 = p0 + fs0 max1 = p1 + fs1 ini0 = -1 * fs0 ini1 = -1 * fs1 elif mode == 'same': max0 = p0 max1 = p1 ini0 = 0 ini1 = 0 elif mode == 'valid': fs0 = int(filters.shape[0] / 2) fs1 = int(filters.shape[1] / 2) max0 = p0 - fs0 max1 = p1 - fs1 ini0 = fs0 ini1 = fs1 else: print('Mode must be same, valid or full') return 0 if evenShapeKernel and mode == 'valid': max0 = max0 + 1 max1 = max1 + 1 for i in range(ini0, max0, stride): o = [] for j in range(ini1, max1, stride): i0 = i - c j0 = j - c i1 = i + c + 1 j1 = j + c + 1 if evenShapeKernel: i0 = i0 + 1 j0 = j0 + 1 zero_padding_top = 0 zero_padding_bottom = 0 zero_padding_left = 0 zero_padding_right = 0 if i0 < 0: zero_padding_top = abs(i0) i0 = 0 if j0 < 0: zero_padding_left = abs(j0) j0 = 0 if i1 > p0: zero_padding_bottom = i1 - p0 i1 = p0 if j1 > p1: zero_padding_right = j1 - p1 j1 = p1 if dim2: m = x[i0:i1, j0:j1] #print('mshape:', m.shape, kernel_size, zero_padding_top, zero_padding_left) # Zero padding: m = np.pad(m, ((zero_padding_top,zero_padding_bottom),(zero_padding_left,zero_padding_right)), 'constant') if lef != 2: m = np.expand_dims(m, axis=-1) m = np.repeat(m, num_filters, axis=-1) else: xi = x[i0:i1, j0:j1, :] # Zero padding: xi = np.pad(xi, ((zero_padding_top,zero_padding_bottom),(zero_padding_left,zero_padding_right),(0,0)), 'constant') if dim3: xi = np.expand_dims(xi, axis=-1) m = np.repeat(xi, num_new_filters, axis=-1) #print('M,F\n', m[:,:,0], filters[:,:,0]) #print(m.shape, filters.shape) m = m * filters #print('m*f\n', m[:,:,0]) m = np.sum(m, axis=0) m = np.sum(m, axis=0) if dim3: m = np.sum(m, axis=0) o.append(m) output.append(o) output = np.asarray(output) if relu: output[output < 0] = 0 return output def kernelInitializer(self, i, ksize, inSize, outSize): if 'xavier' in self.kernel_initializer: if self.kernel_initializer == 'xavier_normal': if len(ksize) == 4: self.filtersValues[i] = np.random.randn(ksize[0],ksize[1],ksize[2],ksize[3]) * math.sqrt(2.0 / (inSize + outSize)) else: self.filtersValues[i] = np.random.randn(ksize[0],ksize[1],ksize[2]) * math.sqrt(2.0 / (inSize + outSize)) elif self.kernel_initializer == 'xavier_uniform': highVal = math.sqrt(6.0 / (inSize + outSize)) lowVal = -1 * highVal self.filtersValues[i] = np.random.uniform(low=lowVal, high=highVal, size=ksize) else: if self.kernel_initializer == 'he_normal': if len(ksize) == 4: self.filtersValues[i] = np.random.randn(ksize[0],ksize[1],ksize[2],ksize[3]) * math.sqrt(2.0 / inSize) else: self.filtersValues[i] = np.random.randn(ksize[0],ksize[1],ksize[2]) * math.sqrt(2.0 / inSize) elif self.kernel_initializer == 'he_uniform': highVal = math.sqrt(6.0 / inSize) lowVal = -1 * highVal self.filtersValues[i] = np.random.uniform(low=lowVal, high=highVal, size=ksize) def convLayersFeedForward(self, im): self.convInputs = [] len_m = len(im.shape) #print('len_m:', len_m) for i, cl in enumerate(self.convFilters): self.convInputs.append(im) if (self.filtersValues[i] is None): if (type(self.convFilterSizes) == list): ks = self.convFilterSizes[i] else: ks = self.convFilterSizes inSize = np.prod(im.shape) if 'xavier' in self.kernel_initializer: if self.batch_size == 1: imshape = np.asarray([im.shape[0], im.shape[1]]) else: imshape = np.asarray([im.shape[1], im.shape[2]]) extraShape = int((ks % 2) == 0) ks2 = int(ks / 2) * 2 outSize = np.prod((imshape - ks2 + extraShape)) * cl else: outSize = 0 if i == 0 and len_m == 3: if self.batch_size == 1: self.kernelInitializer(i, (ks,ks,im.shape[2],cl), inSize, outSize) else: self.kernelInitializer(i, (ks,ks,cl), inSize, outSize) else: self.kernelInitializer(i, (ks,ks,cl), inSize, outSize) k_filters = self.filtersValues[i] if (type(self.convStride) == list): stride_par = self.convStride[i] else: stride_par = self.convStride #print('Convolutional layer', i, '\n') #print('Layer input shape:', im.shape) #print('Layer filters array shape:', k_filters.shape) # Start of convolutions #im = self.conv_filters(im, k_filters, relu=True, stride=stride_par, mode='valid') filtersValues_shape01 = np.asarray([k_filters.shape[0], k_filters.shape[1]]) filtersValues_shape_d2 = (filtersValues_shape01 / 2).astype(int) extraShape = (filtersValues_shape01 % 2) == 0 eS0 = extraShape[0].astype(int) eS1 = extraShape[1].astype(int) posYf = eS0 posXf = eS1 filter_shape0 = k_filters.shape[0] filter_shape1 = k_filters.shape[1] if (len(k_filters.shape) >= 3): num_filters = k_filters.shape[-1] else: num_filters = 1 if self.batch_size == 1: xshape = np.asarray([im.shape[0], im.shape[1]]) else: xshape = np.asarray([im.shape[1], im.shape[2]]) output_shape = xshape - filtersValues_shape_d2*2 + eS0 if ((len(im.shape) < len(k_filters.shape)) or (len(im.shape) == 2 and num_filters == 1)): Xr = np.expand_dims(im, axis=-1) Xr = np.repeat(Xr, num_filters, axis=-1) else: if (len(im.shape) == len(k_filters.shape)): if self.batch_size == 1: new_filters = int(im.shape[-1] / num_filters) Xr = np.repeat(im, new_filters, axis=-1) else: Xr = np.expand_dims(im, axis=-1) Xr = np.repeat(Xr, num_filters, axis=-1) else: Xr = im if (len(Xr.shape) == 2): npad = ((0,eS0), (0,eS1)) out_s = [output_shape[0], output_shape[1], 1] elif (len(Xr.shape) == 3): npad = ((0,eS0), (0,eS1), (0,0)) out_s = [output_shape[0], output_shape[1], num_filters] elif (len(Xr.shape) == 4): if self.batch_size == 1: npad = ((0,eS0), (0,eS1), (0,0), (0,0)) out_s = [output_shape[0], output_shape[1], im.shape[2], num_filters] else: npad = ((0,0), (0,eS0), (0,eS1), (0,0)) out_s = [im.shape[0], output_shape[0], output_shape[1], num_filters] X_pad = np.pad(Xr, npad, 'constant') out_s[0 if self.batch_size == 1 else 1] = int(np.ceil(out_s[0 if self.batch_size == 1 else 1] / stride_par)) out_s[1 if self.batch_size == 1 else 2] = int(np.ceil(out_s[1 if self.batch_size == 1 else 2] / stride_par)) conv_output = np.zeros(out_s) if self.batch_size != 1: k_filters = np.expand_dims(k_filters, axis=0) k_filters = np.repeat(k_filters, im.shape[0], axis=0) #print(Xr.shape, X_pad.shape, k_filters.shape, conv_output.shape, output_shape) for posY in range(0, filter_shape0): for posX in range(0, filter_shape1): # valid convolution if self.batch_size == 1: conv_output += X_pad[posYf:posYf+output_shape[0]:stride_par, posXf:posXf+output_shape[1]:stride_par] * k_filters[posY, posX] else: conv_output += X_pad[:, posYf:posYf+output_shape[0]:stride_par, posXf:posXf+output_shape[1]:stride_par] * k_filters[:, posY, posX].reshape(k_filters.shape[0],1,1,k_filters.shape[3]) posXf = posXf + 1 posYf = posYf + 1 posXf = eS1 # End of convolutions if self.pre_norm: ax_f = tuple(range(0,len(conv_output.shape))) if self.batch_size == 1: ax_f = ax_f[0:-1] conv_output = (conv_output - np.mean(conv_output, axis=ax_f)) / (np.std(conv_output, axis=ax_f) + 1e-7) else: ax_f = ax_f[1:-1] conv_output = (conv_output - np.mean(conv_output, axis=ax_f).reshape(conv_output.shape[0],1,1,conv_output.shape[3])) / (np.std(conv_output, axis=ax_f).reshape(conv_output.shape[0],1,1,conv_output.shape[3]) + 1e-7) #conv_output = (conv_output - conv_output.mean()) / (conv_output.std() + 1e-7) im = self.ActivationFunction(conv_output, 'relu') #print('Layer output shape:', im.shape, '\n---------------------\n') return im def convLayersBackpropagation(self, last_layer_output, prev_cost): i = len(self.filtersValues) - 1 last_shape = list(last_layer_output.shape) if self.batch_size != 1: batch_el = last_shape[0] last_shape = last_shape[1:] + [batch_el] error_by_x = np.reshape(prev_cost, last_shape) """ if self.batch_size == 1: num_filters = last_layer_output.shape[2] else: num_filters = last_layer_output.shape[3] """ self.log('Start of convLayersBackpropagation:', '\n') #self.log('prev_cost:', prev_cost.shape, prev_cost, '\n') #self.log('last_layer_output:', last_layer_output.shape, last_layer_output, '\n') #self.log('error_by_x:', error_by_x.shape, error_by_x, '\n') #if self.batch_size != 1: #error_by_x = np.mean(error_by_x, axis=0) for k_filters in self.filtersValues[::-1]: X = self.convInputs[i] if self.batch_size != 1: X_batchshape = list(X.shape) X_batch_elements = X_batchshape[0] X_batchshape = X_batchshape[1:] + [X_batch_elements] X = np.reshape(X, X_batchshape) #X = np.mean(X, axis=0) # to dilate gradient if needed because of stride if (type(self.convStride) == list): stride_par = self.convStride[i] else: stride_par = self.convStride if stride_par != 1: #erShape = error_by_x.shape[0] * stride_par erShape = (X.shape[0]) if self.batch_size == 1: error_by_output = np.zeros((erShape, erShape, self.convFilters[i]), dtype=float) else: error_by_output = np.zeros((erShape, erShape, self.convFilters[i], batch_el), dtype=float) #print(error_by_output.shape, error_by_x.shape) posI = 0 posJ = 0 erx1 = (error_by_x.shape[0]) erx2 = (error_by_x.shape[1]) # Zero-interweave: for pe_i in range(0, erx1): for pe_j in range(0, erx2): error_by_output[posI, posJ] = error_by_x[pe_i, pe_j] if (posJ + 2) < erShape: posJ = posJ + 2 else: posJ = posJ + 1 if (posI + 2) < erShape: posI = posI + 2 else: posI = posI + 1 posJ = 0 else: # dE/dO error_by_output = error_by_x f_rotated = np.flip(self.filtersValues[i], 0) f_rotated = np.flip(f_rotated, 1) # dE/dF #error_by_filter = self.conv_filters(X, error_by_output, relu=False, stride=1, mode='valid') # dE/dX #error_by_x = self.conv_filters(f_rotated, error_by_output, relu=False, stride=1, mode='full') # Start of convolutions err_output_shape01 = np.asarray([error_by_output.shape[0], error_by_output.shape[1]]) err_out_shape_d2 = (err_output_shape01 / 2).astype(int) xshape = np.asarray([X.shape[0], X.shape[1]]) fshape = np.asarray([f_rotated.shape[0], f_rotated.shape[1]]) extraShape = (err_output_shape01 % 2) == 0 eS0 = extraShape[0].astype(int) eS1 = extraShape[1].astype(int) err_filt_shape = xshape - err_out_shape_d2*2 + eS0 err_x_shape = fshape + err_out_shape_d2*2 + eS0 num_filters = self.filtersValues[i].shape[-1] #print(error_by_output.shape, xshape, err_output_shape01, err_out_shape_d2*2, eS0, err_filt_shape) if self.batch_size == 1: error_by_filter = np.zeros((err_filt_shape[0], err_filt_shape[1], num_filters)) error_by_x = np.zeros((err_x_shape[0], err_x_shape[1], num_filters)) else: error_by_filter = np.zeros((err_filt_shape[0], err_filt_shape[1], num_filters, X_batch_elements)) error_by_x = np.zeros((err_x_shape[0], err_x_shape[1], num_filters, X_batch_elements)) err_out_shape0 = error_by_output.shape[0] err_out_shape1 = error_by_output.shape[1] fil_shape0 = error_by_filter.shape[0] fil_shape1 = error_by_filter.shape[1] ex_shape0 = self.filtersValues[i].shape[0] ex_shape1 = self.filtersValues[i].shape[1] posYf = eS0 posXf = eS1 if (len(X.shape) < 3): Xr = np.expand_dims(X, axis=-1) Xr = np.repeat(Xr, num_filters, axis=-1) else: Xr = X if (len(Xr.shape) == 3): X_pad = np.pad(Xr, ((0,eS0), (0,eS1), (0,0)), 'constant') elif (len(Xr.shape) == 4): X_pad = np.pad(Xr, ((0,eS0), (0,eS1), (0,0), (0,0)), 'constant') else: # color image with batch X_pad = np.pad(Xr, ((0,0), (0,eS0), (0,eS1), (0,0), (0,0)), 'constant') layer_filters = self.filtersValues[i] if self.batch_size != 1: layer_filters = np.expand_dims(layer_filters, axis=-1) layer_filters = np.repeat(layer_filters, X_batch_elements, axis=-1) #print(X_pad.shape, error_by_output.shape, error_by_filter.shape, self.filtersValues[i].shape, error_by_output.shape, error_by_x.shape) for posY in range(0, err_out_shape0): for posX in range(0, err_out_shape1): # valid convolution (dE/dF) error_by_filter += X_pad[posYf:posYf+fil_shape0, posXf:posXf+fil_shape1] * error_by_output[posY, posX] # full convolution (dE/dX) error_by_x[posYf:posYf+ex_shape0, posXf:posXf+ex_shape1] += layer_filters * error_by_output[posY, posX] posXf = posXf + 1 posYf = posYf + 1 posXf = eS1 error_by_x = np.flip(error_by_x, 0) error_by_x = np.flip(error_by_x, 1) # End of convolutions #print(X.shape, X_pad.shape, self.filtersValues[i].shape, error_by_filter.shape, error_by_x.shape, error_by_output.shape) #self.log('error_by_filter:', error_by_filter[:,:,0], '\n\n') #self.log('prev filtersValues[i]:', self.filtersValues[i][:,:,0], '\n\n') #self.log('error_by_x:', error_by_x[:,:,0], '\n\n') if self.batch_size != 1: error_by_filter = np.mean(error_by_filter, axis=-1) #if self.pre_norm: #ax_f = tuple(range(0,len(error_by_filter[i].shape)))[0:-1] #error_by_filter = (error_by_filter - np.mean(error_by_filter, axis=ax_f)) / (np.std(error_by_filter, axis=ax_f) + 1e-7) #error_by_filter = (error_by_filter - error_by_filter.mean()) / (error_by_filter.std() + 1e-7) # Filters update self.filtersValues[i] = self.filtersValues[i] - self.learningRateConv * error_by_filter if self.pre_norm: ax_f = tuple(range(0,len(self.filtersValues[i].shape)))[0:-1] self.filtersValues[i] = (self.filtersValues[i] - np.mean(self.filtersValues[i], axis=ax_f)) / (np.std(self.filtersValues[i], axis=ax_f) + 1e-7) #self.log('filtersValues[i] updated:', self.filtersValues[i][:,:,0], '\n\n') #self.log('\n-----------------------\n') i = i - 1 self.log('End of convLayersBackpropagation') def draw(self, showWeights=False, textSize=9, customRadius=0): plt.figure(figsize=(10,8)) fig = plt.gcf() ax = fig.gca() ax.set_xlim(xmin=0, xmax=1) ax.set_ylim(ymin=0, ymax=1) xmin, xmax, ymin, ymax = ax.axis() xdim = xmax - xmin ydim = ymax - ymin space_per_layer = xdim / (len(self.hiddenL) + 1) x0 = xmin x1 = xmin + space_per_layer medio_intervalo = space_per_layer / 2 if customRadius <= 0: radio = 1 / ((sum(self.hiddenL) + self.n_layer0) * 5) else: radio = customRadius lista_lineas_xy = [] lasth = self.n_layer0 for capa,h in enumerate([self.n_layer0] + self.hiddenL): space_per_neuron = ydim / h y0 = ymin y1 = ymin + space_per_neuron medio_intervalo_n = space_per_neuron / 2 lista_lineas_xy_pre = [] ne = (lasth * h) - 1 neY = h - 1 for j in range(0, h): ax.add_patch(plt.Circle(((medio_intervalo + x0), (medio_intervalo_n + y0)), radio, color='r')) neX = lasth - 1 for xy in lista_lineas_xy: if True: #j == 2: plt.plot([xy[0],(medio_intervalo + x0)],[xy[1], (medio_intervalo_n + y0)]) #print(capa, ne, self.hiddenWeights[capa-1][ne]) my = ((medio_intervalo_n + y0) - xy[1]) mx = ((medio_intervalo + x0) - xy[0]) pendiente = my / mx ordenada_origen = xy[1] - pendiente * xy[0] margen_ord = 0.015 if pendiente < 0: margen_ord = -0.045 # para compensar la rotacion del texto ordenada_origen = ordenada_origen + margen_ord # para evitar que el texto salga encima de la linea no sobre ella # aleatorio entre las x del segmento de la recta (menos un margen para que no salga demasiado cerca de la neurona) mx2 = random.uniform(xy[0] + 0.04, (medio_intervalo + x0) - 0.04) my2 = pendiente*mx2 + ordenada_origen alfa = math.degrees(math.atan(pendiente)) if showWeights: #print(h, capa-1, neX, neY) text(mx2, my2, round(self.hiddenWeights[capa-1][neX][neY],3), rotation = alfa, fontsize = textSize) ne = ne - 1 neX = neX - 1 lista_lineas_xy_pre.append([(medio_intervalo + x0), (medio_intervalo_n + y0)]) neY = neY - 1 y0 = y0 + space_per_neuron y1 = y1 + space_per_neuron lasth = h #print('\n') x0 = x0 + space_per_layer x1 = x1 + space_per_layer #print('-------------\n') lista_lineas_xy = lista_lineas_xy_pre plt.show() def importModel(self, path='', filename='ConvNetAbel_model'): self.hiddenWeights = np.load(path + filename + '_weights.npy', allow_pickle=True) mConfig = np.load(path + filename + '_config.npy', allow_pickle=True) self.n_layer0 = int(mConfig[0]) self.showLogs = bool(mConfig[1]) self.lastLayerNeurons = int(mConfig[2]) self.numEpochs = int(mConfig[3]) self.learningRate = float(mConfig[4]) self.debugMode = int(mConfig[5]) self.softmax = bool(mConfig[6]) self.activationFunction = str(mConfig[7]) self.verbose = bool(mConfig[8]) self.use = str(mConfig[9]) self.batch_size = int(mConfig[10]) self.batch_gradient = str(mConfig[11]) self.batch_mult = int(mConfig[12]) self.dropout = float(mConfig[13]) self.pre_norm = bool(mConfig[14]) self.shuffle = bool(mConfig[15]) self.iterationDrop = float(mConfig[16]) self.version_importedModel = mConfig[17] self.hiddenL2 = mConfig[18] self.hiddenL = mConfig[19] convConfig = np.load(path + filename + '_convConfig.npy', allow_pickle=True) self.convFilters = convConfig[0] self.convStride = convConfig[1] self.convFilterSizes = convConfig[2] self.kernel_initializer = str(convConfig[3]) self.convEpochs = int(convConfig[4]) self.learningRateConv = float(convConfig[5]) self.filtersValues = np.load(path + filename + '_filtersValues.npy', allow_pickle=True) if self.debugMode > 0: self.meanCostByEpoch = np.load(path + filename + '_meanCostByEpoch.npy', allow_pickle=True).tolist() if self.debugMode > 1: self.debugWeights = np.load(path + filename + '_debugWeights.npy', allow_pickle=True).tolist() def exportModel(self, path='', filename='ConvNetAbel_model'): np.save(path + filename + '_weights.npy', np.asarray(self.hiddenWeights, dtype=object)) mConfig = [] mConfig.append(self.n_layer0) mConfig.append(self.showLogs) mConfig.append(self.lastLayerNeurons) mConfig.append(self.numEpochs) mConfig.append(self.learningRate) mConfig.append(self.debugMode) mConfig.append(self.softmax) mConfig.append(self.activationFunction) mConfig.append(self.verbose) mConfig.append(self.use) mConfig.append(self.batch_size) mConfig.append(self.batch_gradient) mConfig.append(self.batch_mult) mConfig.append(self.dropout) mConfig.append(self.pre_norm) mConfig.append(self.shuffle) mConfig.append(self.iterationDrop) mConfig.append(self.version) mConfig.append(self.hiddenL2) mConfig.append(self.hiddenL) mConfig = np.asarray(mConfig, dtype=object) np.save(path + filename + '_config.npy', mConfig) convConfig = [] convConfig.append(self.convFilters) convConfig.append(self.convStride) convConfig.append(self.convFilterSizes) convConfig.append(self.kernel_initializer) convConfig.append(self.convEpochs) convConfig.append(self.learningRateConv) convConfig = np.asarray(convConfig, dtype=object) np.save(path + filename + '_convConfig.npy', convConfig) np.save(path + filename + '_filtersValues.npy', np.asarray(self.filtersValues, dtype=np.float32)) if self.debugMode > 0: np.save(path + filename + '_meanCostByEpoch.npy', self.meanCostByEpoch) if self.debugMode > 1: np.save(path + filename + '_debugWeights.npy', np.asarray(self.debugWeights, dtype=object)) def log(self, *m): if self.showLogs: print(*m) def printVerbose(self, *m): if self.verbose: print(*m) def initializeWeight(self, n, i, lastN): if len(self.manualWeights) == 0: numW = n * lastN if self.rangeRandomWeight is None: if self.activationFunction == 'sigmoid': if self.XavierInitialization == 'normalized': # Normalized Xavier initialization highVal = math.sqrt(6.0) / math.sqrt(lastN + n) lowVal = -1 * highVal mnar = np.random.uniform(low=lowVal, high=highVal, size=(numW,1)) else: # Xavier initialization mnar = np.random.randn(numW, 1) * math.sqrt(1.0 / lastN) else: mnar = np.random.randn(numW, 1) * math.sqrt(2.0 / lastN) # He initialization else: highVal = self.rangeRandomWeight[1] lowVal = self.rangeRandomWeight[0] mnar = np.random.uniform(low=lowVal, high=highVal, size=(numW,1)) else: mnar = np.asarray(self.manualWeights[i]) #mnar = mnar.reshape(mnar.shape[0], 1) #ns = int(mnar.shape[0] / lastN) #print('ns: ', ns) mnar = mnar.reshape(lastN, n, order='F') return mnar def ActivationFunction(self, x, activ_type='sigmoid'): if activ_type=='sigmoid': return 1.0/(1 + np.exp(-1*x)) elif activ_type=='relu': return np.where(x > 0, x, 0) elif activ_type=='softplus': return np.log(1 + np.exp(x)) elif activ_type=='leakyrelu': return np.where(x > 0, x, 0.01 * x) elif activ_type=='identity': return np.copy(x) else: x[x>0.5] = 1 x[x<=0.5] = 0 return x def functionDerivative(self, x, activ_type='sigmoid'): if activ_type=='sigmoid': return self.ActivationFunction(x,activ_type) * (1-self.ActivationFunction(x,activ_type)) elif activ_type=='relu': return np.where(x >= 0, 1, 0) elif activ_type=='softplus': return 1.0/(1 + np.exp(-1*x)) elif activ_type=='leakyrelu': return np.where(x >= 0, 1, 0.01) elif activ_type=='identity': return 1 else: return 1 def cost(self, y_true, y_pred): c = y_true - y_pred return c def softmaxF(self, x): if np.max(np.abs(x)) < 500: # prevent overflow expX = np.exp(x) return expX / np.sum(expX, axis=-1).reshape(-1, 1) else: return x / np.maximum(1, np.sum(x, axis=-1).reshape(-1, 1)) def pre_norm_forward_FC(self, v_layer): if self.batch_size == 1 or len(v_layer.shape) == 1: v_layer_norm = (v_layer - v_layer.mean()) / (v_layer.std() + 1e-7) else: v_layer_norm = ((v_layer.T - np.mean(v_layer, axis=1)) / (np.std(v_layer, axis=1) + 1e-7)).T return v_layer_norm def fit(self, x, y): n_layer0 = -1 self.hiddenL = copy.deepcopy(self.hiddenL2) hiddenW = [None] * (len(self.hiddenL) + 1) self.lastLayerNeurons = y.shape[1] self.hiddenL.append(y.shape[1]) self.convOutputs = [] self.printVerbose('Training started with', x.shape[0], 'samples') if self.batch_size == 1: numIterations = x.shape[0] else: numIterations = math.ceil(x.shape[0] / self.batch_size) numIterations = int(numIterations * (1 - self.iterationDrop)) for epochs in range(0, self.numEpochs): meanCostByEpochE = 0 batch_pos = 0 if epochs < self.convEpochs: xy_ind = np.arange(x.shape[0]) else: xy_ind = np.arange(len(self.convOutputs)) if self.shuffle: np.random.shuffle(xy_ind) for x_pos in range(0, numIterations): if epochs < self.convEpochs: if self.batch_size == 1: c_positions = xy_ind[x_pos] else: if (batch_pos + self.batch_size) < xy_ind.shape[0]: c_positions = xy_ind[batch_pos:batch_pos+self.batch_size] else: c_positions = xy_ind[batch_pos:] x_val = x[c_positions] x_val_batch_s = x_val.shape[0] last_layer_output = self.convLayersFeedForward(x_val) x_val = last_layer_output.flatten() if self.batch_size != 1: x_val = x_val.reshape(x_val_batch_s, int(x_val.shape[0] / x_val_batch_s)) if epochs == (self.convEpochs - 1): self.convOutputs.append([x_val, c_positions]) else: x_val, c_positions = self.convOutputs[xy_ind[x_pos]] #self.log('x_val:', x_val.shape, x_val) #print(x_val.shape) if n_layer0 == -1: if self.batch_size == 1: n_layer0 = x_val.shape[0] else: n_layer0 = x_val.shape[1] self.n_layer0 = n_layer0 v_layer = x_val lastN = n_layer0 layerValues = [] preActivateValues = [] f_vlayer = self.ActivationFunction(v_layer, 'identity') layerValues.append(f_vlayer) preActivateValues.append(v_layer) f_vlayer = v_layer dropout_values = [] for i, hiddenLayer in enumerate(self.hiddenL): entries = hiddenLayer * lastN if hiddenW[i] is None: hiddenW[i] = self.initializeWeight(hiddenLayer, i, lastN) # Initialize weights valuesForPerc = int(entries / hiddenLayer) firstPos = 0 lastPos = valuesForPerc self.log('x_j: ', f_vlayer) self.log('w_j: ', hiddenW[i]) v_layer = f_vlayer.dot(hiddenW[i]) if self.pre_norm and (i < (len(self.hiddenL) - 1)): v_layer = self.pre_norm_forward_FC(v_layer) if self.dropout != 0 and (i < (len(self.hiddenL) - 1)): dropout_v = np.random.binomial(1, 1-self.dropout, size=hiddenLayer) / (1-self.dropout) v_layer = v_layer * dropout_v dropout_values.append(dropout_v) self.log('net_j:', v_layer, '\n') if (i == (len(self.hiddenL) - 1)): if(self.softmax): f_vlayer = self.softmaxF(v_layer).reshape(-1) else: if self.use == 'classification': f_vlayer = self.ActivationFunction(v_layer, 'sigmoid') # use sigmoid on last layer if classification else: f_vlayer = self.ActivationFunction(v_layer, 'identity') # use identity on last layer if regression else: f_vlayer = self.ActivationFunction(v_layer, self.activationFunction)#.reshape(-1) layerValues.append(f_vlayer) preActivateValues.append(v_layer) v_layer = f_vlayer self.log('f(net_j):', f_vlayer, '\n') lastN = hiddenLayer coste_anterior = None i = len(self.hiddenL) - 1 #print(f_vlayer) """ if(self.softmax): f_vlayer = self.softmaxF(f_vlayer).reshape(-1) self.log('f_vlayer (Softmax output):', f_vlayer) #print(f_vlayer) """ #print(f_vlayer, '\n\n') self.log('-----------------\nBackPropagation: \n') # backpropagation: for hiddenLayer in ([n_layer0] + self.hiddenL)[::-1]: self.log('Neurons in this layer: ', hiddenLayer) #print('i: ', i, '\n') if coste_anterior is None: if(self.softmax): derivf_coste = self.functionDerivative(v_layer, self.activationFunction) else: if self.use == 'classification': derivf_coste = self.functionDerivative(v_layer, 'sigmoid') else: derivf_coste = self.functionDerivative(v_layer, 'identity') f_cost = self.cost(y[c_positions], f_vlayer) #if self.batch_size != 1: #f_cost = f_cost / v_layer.shape[0] coste = f_cost * derivf_coste if self.batch_size != 1: batch_pos = batch_pos + self.batch_size #coste = coste.reshape(-1) #coste = coste.reshape(coste.shape[0], 1) #if self.batch_size != 1: #coste = np.sum(coste, axis=0) #derivf_coste = np.sum(derivf_coste, axis=0) if self.debugMode > 0: meanCostByEpochE = meanCostByEpochE + (abs(coste) if self.batch_size == 1 else np.mean(np.absolute(coste), axis=0)) if self.debugMode > 2: self.costs.append(coste) self.log('derivf_coste: ', derivf_coste, 'cost: ', coste, '\n') else: entries = hiddenLayer * nextN valuesForPerc = int(entries / hiddenLayer) firstPos = 0 lastPos = valuesForPerc #coste = [] #coste = np.zeros(shape=(hiddenLayer)) self.log('prev_error: ', coste_anterior) pesos_salientes = hiddenW[i+1].T #print('hiddenW[i+1][j::hiddenLayer]: ', pesos_salientes) preActivateValueM = preActivateValues[i+1] preDeriv = self.functionDerivative(preActivateValueM, self.activationFunction) self.log('preDeriv: ', preDeriv) costeA = coste_anterior.dot(pesos_salientes) # coste por los pesos que salen de la neurona #costeA = np.asarray(costeA) self.log("preCostA: ", costeA) costeA = costeA * (preDeriv) #costeA = costeA.reshape(-1) #costeA = costeA.T if self.dropout != 0 and i > -1: # dropout is not done on input layer costeA = costeA * dropout_values[i] self.log('costA: ', costeA) layerValueM = layerValues[i+1] #print("coste_anterior.shape: ", coste_anterior.shape) self.log("layer values: ", layerValueM) if self.batch_gradient == 'sum': preT1 = coste_anterior.reshape((1 if self.batch_size==1 else coste_anterior.shape[0]), (coste_anterior.shape[0] if self.batch_size==1 else coste_anterior.shape[1])) preT2 = layerValueM.reshape((layerValueM.shape[0] if self.batch_size==1 else layerValueM.shape[1]), (1 if self.batch_size==1 else layerValueM.shape[0])) elif self.batch_size == 1: preT1 = coste_anterior.reshape(1, coste_anterior.shape[0]) preT2 = layerValueM.reshape(layerValueM.shape[0], 1) else: preT1 = np.mean(coste_anterior, axis=0) preT1 = preT1.reshape(1, preT1.shape[0]) preT2 = np.mean(layerValueM, axis=0) preT2 = preT2.reshape(preT2.shape[0], 1) pre = preT2.dot(preT1) #if self.batch_size != 1: #pre = pre * (1.0 / layerValueM.shape[0]) pre = pre * self.learningRate self.log('pre: ', pre, '\n') self.log('Old weight: ', hiddenW[i+1]) hiddenW[i+1] = (hiddenW[i+1] + pre) self.log('New weight: ', hiddenW[i+1], '\n\n') coste = costeA self.log('\n\n') #coste = coste.reshape(-1) #print(coste.shape) #if len(coste.shape) == 3: #coste = coste.reshape(coste.shape[0] * coste.shape[1], coste.shape[2]) #print('Coste: ' , coste, coste.shape) #print("\n\n") coste_anterior = coste nextN = hiddenLayer i = i - 1 #print('------------------') #print('\n\nNuevos pesos: ', hiddenW) #print('Coste anterior shape: ', coste_anterior.shape) if epochs < self.convEpochs: # because of resources limitations self.convLayersBackpropagation(last_layer_output, coste_anterior) self.printVerbose('\nEpoch', str(epochs+1) + '/' + str(self.numEpochs), 'completed') if self.debugMode > 0: self.meanCostByEpoch.append(meanCostByEpochE / numIterations) self.printVerbose('--- Epoch loss:', round(np.mean(self.meanCostByEpoch[-1]),4)) if self.debugMode > 1: self.debugWeights.append(copy.deepcopy(hiddenW)) self.batch_size = int(self.batch_size * self.batch_mult) self.hiddenWeights = hiddenW #print('\n\nNuevos pesos: ', hiddenW) self.printVerbose('\n\nTraining finished\n\n') return self def predict(self, x, noProba=1): n_layer0 = -1 layerValues = np.zeros(shape=(x.shape[0],self.lastLayerNeurons)) batch_pos = 0 if self.batch_size == 1: numIterations = x.shape[0] else: numIterations = math.ceil(x.shape[0] / self.batch_size) for x_pos in range(0, numIterations): if self.batch_size == 1: x_val = x[x_pos] else: if (batch_pos + self.batch_size) < x.shape[0]: x_val = x[batch_pos:batch_pos+self.batch_size] else: x_val = x[batch_pos:] x_val_batch_s = x_val.shape[0] #for x_pos, x_val in enumerate(x): x_val = self.convLayersFeedForward(x_val).flatten() if self.batch_size != 1: x_val = x_val.reshape(x_val_batch_s, int(x_val.shape[0] / x_val_batch_s)) if n_layer0 == -1: n_layer0 = x_val.shape[0] self.n_layer0 = n_layer0 v_layer = x_val lastN = n_layer0 f_vlayer = self.ActivationFunction(v_layer, 'identity') for i, hiddenLayer in enumerate(self.hiddenL): entries = hiddenLayer * lastN valuesForPerc = int(entries / hiddenLayer) firstPos = 0 lastPos = valuesForPerc v_layer = f_vlayer.dot(self.hiddenWeights[i]) if self.pre_norm and (i < (len(self.hiddenL) - 1)): v_layer = self.pre_norm_forward_FC(v_layer) if (i == (len(self.hiddenL) - 1)): if(self.softmax): f_vlayer = self.softmaxF(v_layer).reshape(-1) else: if self.use == 'classification': f_vlayer = self.ActivationFunction(v_layer, 'sigmoid') # use sigmoid on last layer if classification else: f_vlayer = self.ActivationFunction(v_layer, 'identity') # use identity on last layer if regression else: f_vlayer = self.ActivationFunction(v_layer, self.activationFunction)#.reshape(-1) v_layer = f_vlayer lastN = hiddenLayer if self.batch_size == 1: layerValues[x_pos] = f_vlayer else: if (batch_pos + self.batch_size) < x.shape[0]: layerValues[batch_pos:batch_pos+self.batch_size] = f_vlayer else: layerValues[batch_pos:] = f_vlayer batch_pos = batch_pos + self.batch_size """ if(self.softmax): layerValues = self.softmaxF(layerValues) """ if noProba==1: if self.use == 'classification': return self.ActivationFunction(layerValues, 2).astype(int) else: return layerValues else: return layerValues def predict_proba(self, x): return self.predict(x, 0) def plot_mean_error_last_layer(self, customLabels=[], byClass=False): if self.debugMode > 0: meancost = np.asarray(self.meanCostByEpoch) if len(meancost.shape) > 1 and not byClass: meancost = np.mean(meancost, axis=1) ptitle = 'Last layer mean error by epoch' fig, ax = plt.subplots(figsize=(8,6)) ax.plot(range(0, meancost.shape[0]), meancost) ax.set(xlabel='Epoch', ylabel='Mean error', title=ptitle) ax.grid() if len(meancost.shape) > 1: if meancost.shape[1] > 1: if len(customLabels) == 0: neur = [("Neuron " + str(i)) for i in range(0, meancost.shape[1])] else: neur = customLabels plt.legend(neur, loc="upper right") plt.show() else: print('ConvNet debug mode must be level 1 or higher') def plot_weights_by_epoch(self, max_weights=-1): if self.debugMode > 1: dw = self.debugWeights dwx = dw[0][len(dw[0]) - 1][:] fig, ax = plt.subplots(figsize=(8,6)) ygrafico = {} for jposH, posH in enumerate(range(0, len(dw))): # for each epoch dwF = dw[jposH][len(dw[0]) - 1][:] #print(dwF.shape) for posg, neu in enumerate(dwF): #print(neu.shape) if posg in ygrafico: ygrafico[posg].append(neu[0]) else: ygrafico[posg] = [neu[0]] if max_weights == -1: for ygrafico2 in ygrafico.values(): ax.plot(range(0, len(ygrafico2)), ygrafico2) else: if max_weights < 1: print('max_weights must be bigger than 0') elif max_weights > len(ygrafico.values()): print('max_weights must be lower than total weights of last layer') else: ygrafico3 = [] # Gets the weights that have changed the most from beginning to end. for yi, ygrafico2 in enumerate(ygrafico.values()): a = abs(ygrafico[yi][0] - ygrafico[yi][-1]) #print(ygrafico[yi][0], a) ygrafico3.append([ygrafico2, a]) for ygrafico4 in sorted(ygrafico3, key=lambda tupval: -1*tupval[1])[0:max_weights]: #print(ygrafico4) plt.plot(range(0, len(ygrafico4[0])), ygrafico4[0]) ax.set(xlabel='Epoch', ylabel='Weight', title='Last layer weights by epoch') ax.grid() plt.show() else: print('ConvNet debug mode must be level 2 or higher')
[ 1, 529, 276, 1112, 420, 29958, 1107, 29899, 629, 29914, 4920, 295, 10262, 13, 29937, 14187, 1266, 529, 5813, 15513, 2178, 26863, 2538, 9841, 29889, 13, 29937, 2045, 597, 3292, 29889, 510, 29914, 1107, 29899, 629, 29914, 4920, 295, 10262, 13, 13, 5215, 12655, 408, 7442, 13, 5215, 3509, 408, 3509, 13, 5215, 4036, 13, 5215, 22889, 13, 5215, 22889, 29889, 2272, 5317, 408, 14770, 13, 5215, 22889, 29889, 4912, 408, 7477, 13, 3166, 282, 2904, 370, 1053, 1426, 13, 5215, 5844, 13, 13, 13, 1990, 1281, 29894, 6779, 4920, 295, 29901, 13, 13, 1678, 1873, 353, 29871, 29896, 29889, 29906, 13, 268, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 7934, 353, 518, 29896, 1402, 302, 29923, 1129, 12168, 353, 29871, 29896, 29892, 6509, 19907, 29922, 29900, 29889, 29896, 29892, 12219, 4806, 5861, 11759, 1402, 13, 462, 4744, 10108, 29922, 29896, 29892, 3464, 17875, 22676, 29922, 8516, 29892, 1510, 3403, 29879, 29922, 8824, 29892, 4964, 3317, 29922, 8824, 29892, 13, 462, 26229, 6678, 2433, 280, 557, 29891, 2674, 29884, 742, 26952, 353, 7700, 29892, 671, 2433, 1990, 2450, 742, 13, 462, 9853, 29918, 2311, 29922, 29896, 29892, 9853, 29918, 24970, 2433, 12483, 482, 742, 9853, 29918, 4713, 29922, 29896, 29892, 5768, 449, 29922, 29900, 29892, 758, 29918, 12324, 29922, 8824, 29892, 13, 462, 528, 21897, 29922, 5574, 29892, 12541, 15063, 29922, 29900, 29892, 7602, 3434, 2153, 353, 518, 29941, 29906, 29892, 29871, 29953, 29946, 29892, 29871, 29896, 29906, 29947, 1402, 7602, 855, 2426, 29922, 29906, 29892, 13, 462, 7602, 5072, 29903, 7093, 29922, 29941, 29892, 6509, 19907, 1168, 29894, 29922, 29900, 29889, 29900, 29900, 29896, 29892, 7602, 29923, 1129, 12168, 29922, 29896, 29900, 29892, 8466, 29918, 11228, 3950, 2433, 354, 29918, 8945, 29374, 13, 308, 13, 4706, 1583, 29889, 10892, 29931, 353, 3509, 29889, 24535, 8552, 29898, 10892, 29897, 13, 4706, 1583, 29889, 10892, 29931, 29906, 353, 3509, 29889, 24535, 8552, 29898, 10892, 29897, 13, 308, 13, 4706, 1583, 29889, 21891, 19907, 353, 6509, 19907, 13, 308, 13, 4706, 1583, 29889, 1949, 29923, 1129, 12168, 353, 302, 29923, 1129, 12168, 13, 308, 13, 4706, 1583, 29889, 18253, 29879, 353, 5159, 396, 9839, 29879, 1051, 304, 1423, 4180, 13, 308, 13, 4706, 1583, 29889, 8382, 4806, 5861, 353, 5159, 13, 308, 13, 4706, 1583, 29889, 12676, 25733, 2059, 29923, 1129, 305, 353, 5159, 13, 308, 13, 4706, 1583, 29889, 10892, 4806, 5861, 353, 5159, 13, 308, 13, 4706, 1583, 29889, 11288, 4806, 5861, 353, 12219, 4806, 5861, 13, 308, 13, 4706, 1583, 29889, 8382, 6818, 353, 4744, 10108, 13, 308, 13, 4706, 1583, 29889, 3881, 17875, 22676, 353, 3464, 17875, 22676, 13, 308, 13, 4706, 1583, 29889, 4294, 3403, 29879, 353, 1510, 3403, 29879, 13, 308, 13, 4706, 1583, 29889, 2695, 3317, 353, 4964, 3317, 13, 308, 13, 4706, 1583, 29889, 29876, 29918, 13148, 29900, 353, 448, 29896, 13, 308, 13, 4706, 1583, 29889, 11236, 362, 6678, 353, 26229, 6678, 13, 308, 13, 4706, 1583, 29889, 369, 15828, 353, 26952, 13, 308, 13, 4706, 1583, 29889, 1509, 353, 671, 13, 308, 13, 4706, 1583, 29889, 16175, 29918, 2311, 353, 9853, 29918, 2311, 13, 308, 13, 4706, 1583, 29889, 16175, 29918, 24970, 353, 9853, 29918, 24970, 13, 308, 13, 4706, 1583, 29889, 16175, 29918, 4713, 353, 9853, 29918, 4713, 13, 308, 13, 4706, 1583, 29889, 8865, 449, 353, 5768, 449, 13, 308, 13, 4706, 1583, 29889, 1457, 29918, 12324, 353, 758, 29918, 12324, 13, 308, 13, 4706, 1583, 29889, 845, 21897, 353, 528, 21897, 13, 308, 13, 4706, 1583, 29889, 1524, 362, 15063, 353, 12541, 15063, 13, 308, 13, 4706, 1583, 29889, 29990, 18852, 15514, 2133, 353, 525, 29896, 29915, 13, 13, 4706, 1583, 29889, 4230, 14420, 29940, 5411, 787, 353, 448, 29896, 13, 308, 13, 308, 13, 4706, 396, 1281, 29894, 6779, 29901, 13, 4706, 1583, 29889, 20580, 3434, 2153, 353, 7602, 3434, 2153, 13, 4706, 1583, 29889, 26705, 9065, 353, 518, 8516, 29962, 334, 7431, 29898, 20580, 3434, 2153, 29897, 13, 4706, 1583, 29889, 20580, 855, 2426, 353, 7602, 855, 2426, 13, 4706, 1583, 29889, 20580, 5072, 29903, 7093, 353, 7602, 5072, 29903, 7093, 13, 4706, 1583, 29889, 21891, 19907, 1168, 29894, 353, 6509, 19907, 1168, 29894, 13, 4706, 1583, 29889, 20580, 29923, 1129, 12168, 353, 7602, 29923, 1129, 12168, 13, 4706, 1583, 29889, 17460, 29918, 11228, 3950, 353, 8466, 29918, 11228, 3950, 13, 308, 13, 1678, 396, 1281, 29894, 29906, 411, 871, 697, 8466, 13, 1678, 822, 7602, 29906, 29898, 1311, 29892, 921, 29892, 8466, 29892, 380, 2426, 29922, 29896, 1125, 13, 4706, 1962, 353, 5159, 396, 9302, 29889, 3298, 359, 3552, 17460, 29889, 12181, 511, 26688, 29922, 9302, 29889, 7411, 29941, 29906, 29897, 13, 4706, 8466, 29918, 29880, 353, 8466, 29889, 12181, 29961, 29900, 29962, 13, 4706, 8466, 29918, 2311, 353, 8466, 29889, 12181, 29961, 29900, 29962, 334, 8466, 29889, 12181, 29961, 29896, 29962, 13, 308, 13, 4706, 274, 353, 938, 29898, 17460, 29918, 29880, 847, 29871, 29906, 29897, 13, 308, 13, 4706, 363, 474, 297, 3464, 29898, 29883, 29892, 921, 29889, 12181, 29961, 29900, 29962, 448, 274, 29892, 380, 2426, 1125, 13, 632, 13, 9651, 288, 353, 5159, 13, 632, 13, 9651, 363, 432, 297, 3464, 29898, 29883, 29892, 921, 29889, 12181, 29961, 29896, 29962, 448, 274, 29892, 380, 2426, 1125, 13, 462, 13, 18884, 474, 29900, 353, 474, 448, 274, 13, 18884, 432, 29900, 353, 432, 448, 274, 13, 462, 13, 18884, 474, 29896, 353, 474, 718, 274, 718, 29871, 29896, 13, 18884, 432, 29896, 353, 432, 718, 274, 718, 29871, 29896, 13, 462, 13, 18884, 288, 29889, 4397, 29898, 9302, 29889, 2083, 29898, 29916, 29961, 29875, 29900, 29901, 29875, 29896, 29892, 432, 29900, 29901, 29926, 29896, 29962, 334, 8466, 876, 13, 462, 13, 9651, 1962, 29889, 4397, 29898, 29877, 29897, 13, 632, 13, 4706, 1962, 353, 7442, 29889, 294, 2378, 29898, 4905, 29897, 13, 462, 13, 4706, 736, 1962, 13, 268, 13, 1678, 396, 1281, 4068, 411, 2473, 29899, 26705, 13, 1678, 822, 7602, 29918, 26705, 29898, 1311, 29892, 921, 29892, 18094, 29892, 380, 2426, 29922, 29896, 29892, 1104, 29884, 29922, 8824, 29892, 4464, 2433, 17642, 29374, 13, 308, 13, 4706, 19566, 353, 7431, 29898, 29916, 29889, 12181, 29897, 13, 4706, 454, 29888, 353, 7431, 29898, 26705, 29889, 12181, 29897, 13, 308, 13, 4706, 565, 19566, 1405, 454, 29888, 29901, 13, 9651, 1596, 877, 20580, 29918, 26705, 29901, 450, 1881, 1409, 2609, 505, 901, 13391, 1135, 278, 4175, 1409, 29889, 1495, 13, 9651, 736, 29871, 29900, 13, 308, 13, 4706, 1962, 353, 5159, 13, 4706, 8466, 29918, 29880, 353, 18094, 29889, 12181, 29961, 29900, 29962, 13, 4706, 8466, 29918, 2311, 353, 18094, 29889, 12181, 29961, 29900, 29962, 334, 18094, 29889, 12181, 29961, 29896, 29962, 13, 308, 13, 4706, 565, 454, 29888, 1275, 29871, 29906, 29901, 13, 9651, 954, 29918, 26705, 353, 29871, 29896, 13, 4706, 1683, 29901, 13, 9651, 954, 29918, 26705, 353, 18094, 29889, 12181, 14352, 29896, 29962, 13, 308, 13, 4706, 274, 353, 938, 29898, 17460, 29918, 29880, 847, 29871, 29906, 29897, 13, 462, 13, 4706, 3964, 29941, 353, 7700, 13, 308, 13, 4706, 1584, 24111, 29968, 5851, 353, 313, 17460, 29918, 29880, 1273, 29871, 29906, 1275, 29871, 29900, 29897, 13, 308, 13, 4706, 565, 19566, 1275, 29871, 29906, 29901, 632, 13, 9651, 3964, 29906, 353, 5852, 13, 9651, 282, 29900, 353, 921, 29889, 12181, 29961, 29900, 29962, 13, 9651, 282, 29896, 353, 921, 29889, 12181, 29961, 29896, 29962, 13, 4706, 1683, 29901, 13, 632, 13, 9651, 396, 921, 3443, 471, 278, 1962, 310, 445, 1158, 9251, 2000, 13, 9651, 565, 19566, 1275, 454, 29888, 29901, 13, 18884, 954, 29918, 1482, 29918, 26705, 353, 938, 29898, 1949, 29918, 26705, 847, 921, 29889, 12181, 14352, 29896, 2314, 13, 632, 13, 18884, 565, 313, 1949, 29918, 1482, 29918, 26705, 1273, 29871, 29906, 2804, 29871, 29900, 29897, 322, 313, 1949, 29918, 26705, 1273, 29871, 29906, 1275, 29871, 29900, 1125, 13, 462, 1678, 954, 29918, 1482, 29918, 26705, 353, 954, 29918, 1482, 29918, 26705, 448, 29871, 29896, 13, 462, 268, 13, 18884, 565, 313, 1949, 29918, 1482, 29918, 26705, 1275, 29871, 29900, 1125, 13, 462, 1678, 954, 29918, 1482, 29918, 26705, 353, 29871, 29896, 13, 632, 13, 9651, 1683, 29901, 396, 739, 338, 278, 937, 26851, 284, 7546, 310, 263, 2927, 1967, 13, 18884, 954, 29918, 1482, 29918, 26705, 353, 954, 29918, 26705, 13, 18884, 3964, 29941, 353, 5852, 13, 632, 13, 9651, 3964, 29906, 353, 7700, 13, 9651, 282, 29900, 353, 921, 29889, 12181, 29961, 29900, 29962, 13, 9651, 282, 29896, 353, 921, 29889, 12181, 29961, 29896, 29962, 13, 308, 13, 4706, 565, 4464, 1275, 525, 8159, 2396, 13, 9651, 18920, 29900, 353, 938, 29898, 26705, 29889, 12181, 29961, 29900, 29962, 847, 29871, 29906, 29897, 13, 9651, 18920, 29896, 353, 938, 29898, 26705, 29889, 12181, 29961, 29896, 29962, 847, 29871, 29906, 29897, 13, 632, 13, 9651, 4236, 29900, 353, 282, 29900, 718, 18920, 29900, 13, 9651, 4236, 29896, 353, 282, 29896, 718, 18920, 29896, 13, 632, 13, 9651, 297, 29875, 29900, 353, 448, 29896, 334, 18920, 29900, 13, 9651, 297, 29875, 29896, 353, 448, 29896, 334, 18920, 29896, 13, 632, 13, 4706, 25342, 4464, 1275, 525, 17642, 2396, 13, 9651, 4236, 29900, 353, 282, 29900, 13, 9651, 4236, 29896, 353, 282, 29896, 13, 632, 13, 9651, 297, 29875, 29900, 353, 29871, 29900, 13, 9651, 297, 29875, 29896, 353, 29871, 29900, 13, 632, 13, 4706, 25342, 4464, 1275, 525, 3084, 2396, 13, 9651, 18920, 29900, 353, 938, 29898, 26705, 29889, 12181, 29961, 29900, 29962, 847, 29871, 29906, 29897, 13, 9651, 18920, 29896, 353, 938, 29898, 26705, 29889, 12181, 29961, 29896, 29962, 847, 29871, 29906, 29897, 13, 632, 13, 9651, 4236, 29900, 353, 282, 29900, 448, 18920, 29900, 13, 9651, 4236, 29896, 353, 282, 29896, 448, 18920, 29896, 13, 632, 13, 9651, 297, 29875, 29900, 353, 18920, 29900, 13, 9651, 297, 29875, 29896, 353, 18920, 29896, 13, 632, 13, 4706, 1683, 29901, 13, 9651, 1596, 877, 6818, 1818, 367, 1021, 29892, 2854, 470, 2989, 1495, 13, 9651, 736, 29871, 29900, 13, 308, 13, 4706, 565, 1584, 24111, 29968, 5851, 322, 4464, 1275, 525, 3084, 2396, 13, 9651, 4236, 29900, 353, 4236, 29900, 718, 29871, 29896, 13, 9651, 4236, 29896, 353, 4236, 29896, 718, 29871, 29896, 13, 308, 13, 4706, 363, 474, 297, 3464, 29898, 2172, 29900, 29892, 4236, 29900, 29892, 380, 2426, 1125, 13, 632, 13, 9651, 288, 353, 5159, 13, 632, 13, 9651, 363, 432, 297, 3464, 29898, 2172, 29896, 29892, 4236, 29896, 29892, 380, 2426, 1125, 13, 462, 13, 18884, 474, 29900, 353, 474, 448, 274, 13, 18884, 432, 29900, 353, 432, 448, 274, 13, 462, 13, 18884, 474, 29896, 353, 474, 718, 274, 718, 29871, 29896, 13, 18884, 432, 29896, 353, 432, 718, 274, 718, 29871, 29896, 13, 462, 462, 13, 18884, 565, 1584, 24111, 29968, 5851, 29901, 13, 462, 1678, 474, 29900, 353, 474, 29900, 718, 29871, 29896, 13, 462, 1678, 432, 29900, 353, 432, 29900, 718, 29871, 29896, 13, 539, 13, 18884, 5225, 29918, 12791, 29918, 3332, 353, 29871, 29900, 13, 18884, 5225, 29918, 12791, 29918, 8968, 353, 29871, 29900, 13, 18884, 5225, 29918, 12791, 29918, 1563, 353, 29871, 29900, 13, 18884, 5225, 29918, 12791, 29918, 1266, 353, 29871, 29900, 13, 462, 13, 18884, 565, 474, 29900, 529, 29871, 29900, 29901, 13, 462, 1678, 5225, 29918, 12791, 29918, 3332, 353, 6425, 29898, 29875, 29900, 29897, 13, 462, 1678, 474, 29900, 353, 29871, 29900, 13, 462, 268, 13, 18884, 565, 432, 29900, 529, 29871, 29900, 29901, 13, 462, 1678, 5225, 29918, 12791, 29918, 1563, 353, 6425, 29898, 29926, 29900, 29897, 13, 462, 1678, 432, 29900, 353, 29871, 29900, 13, 462, 268, 13, 18884, 565, 474, 29896, 1405, 282, 29900, 29901, 13, 462, 1678, 5225, 29918, 12791, 29918, 8968, 353, 474, 29896, 448, 282, 29900, 13, 462, 1678, 474, 29896, 353, 282, 29900, 13, 462, 268, 13, 18884, 565, 432, 29896, 1405, 282, 29896, 29901, 13, 462, 1678, 5225, 29918, 12791, 29918, 1266, 353, 432, 29896, 448, 282, 29896, 13, 462, 1678, 432, 29896, 353, 282, 29896, 13, 462, 268, 13, 18884, 565, 3964, 29906, 29901, 13, 462, 1678, 286, 353, 921, 29961, 29875, 29900, 29901, 29875, 29896, 29892, 432, 29900, 29901, 29926, 29896, 29962, 13, 462, 268, 13, 462, 1678, 396, 2158, 877, 29885, 12181, 29901, 742, 286, 29889, 12181, 29892, 8466, 29918, 2311, 29892, 5225, 29918, 12791, 29918, 3332, 29892, 5225, 29918, 12791, 29918, 1563, 29897, 13, 462, 268, 13, 462, 1678, 396, 28933, 7164, 29901, 13, 462, 1678, 286, 353, 7442, 29889, 8305, 29898, 29885, 29892, 5135, 9171, 29918, 12791, 29918, 3332, 29892, 9171, 29918, 12791, 29918, 8968, 21336, 9171, 29918, 12791, 29918, 1563, 29892, 9171, 29918, 12791, 29918, 1266, 8243, 525, 23362, 1495, 13, 462, 268, 13, 462, 1678, 565, 454, 29888, 2804, 29871, 29906, 29901, 13, 462, 4706, 286, 353, 7442, 29889, 18837, 29918, 6229, 29879, 29898, 29885, 29892, 9685, 10457, 29896, 29897, 13, 462, 4706, 286, 353, 7442, 29889, 14358, 29898, 29885, 29892, 954, 29918, 26705, 29892, 9685, 10457, 29896, 29897, 13, 462, 268, 13, 18884, 1683, 29901, 13, 462, 1678, 921, 29875, 353, 921, 29961, 29875, 29900, 29901, 29875, 29896, 29892, 432, 29900, 29901, 29926, 29896, 29892, 584, 29962, 13, 462, 268, 13, 462, 1678, 396, 28933, 7164, 29901, 13, 462, 1678, 921, 29875, 353, 7442, 29889, 8305, 29898, 5389, 29892, 5135, 9171, 29918, 12791, 29918, 3332, 29892, 9171, 29918, 12791, 29918, 8968, 21336, 9171, 29918, 12791, 29918, 1563, 29892, 9171, 29918, 12791, 29918, 1266, 21336, 29900, 29892, 29900, 8243, 525, 23362, 1495, 13, 462, 268, 13, 462, 1678, 565, 3964, 29941, 29901, 13, 462, 4706, 921, 29875, 353, 7442, 29889, 18837, 29918, 6229, 29879, 29898, 5389, 29892, 9685, 10457, 29896, 29897, 13, 462, 268, 13, 462, 1678, 286, 353, 7442, 29889, 14358, 29898, 5389, 29892, 954, 29918, 1482, 29918, 26705, 29892, 9685, 10457, 29896, 29897, 13, 462, 268, 13, 462, 13, 18884, 396, 2158, 877, 29924, 29892, 29943, 29905, 29876, 742, 286, 7503, 29892, 29901, 29892, 29900, 1402, 18094, 7503, 29892, 29901, 29892, 29900, 2314, 13, 18884, 396, 2158, 29898, 29885, 29889, 12181, 29892, 18094, 29889, 12181, 29897, 13, 18884, 286, 353, 286, 334, 18094, 13, 462, 13, 18884, 396, 2158, 877, 29885, 29930, 29888, 29905, 29876, 742, 286, 7503, 29892, 29901, 29892, 29900, 2314, 13, 462, 13, 18884, 286, 353, 7442, 29889, 2083, 29898, 29885, 29892, 9685, 29922, 29900, 29897, 13, 18884, 286, 353, 7442, 29889, 2083, 29898, 29885, 29892, 9685, 29922, 29900, 29897, 13, 462, 13, 18884, 565, 3964, 29941, 29901, 13, 462, 1678, 286, 353, 7442, 29889, 2083, 29898, 29885, 29892, 9685, 29922, 29900, 29897, 462, 268, 13, 462, 13, 18884, 288, 29889, 4397, 29898, 29885, 29897, 13, 462, 13, 9651, 1962, 29889, 4397, 29898, 29877, 29897, 13, 632, 13, 4706, 1962, 353, 7442, 29889, 294, 2378, 29898, 4905, 29897, 13, 308, 13, 4706, 565, 1104, 29884, 29901, 13, 9651, 1962, 29961, 4905, 529, 29871, 29900, 29962, 353, 29871, 29900, 13, 462, 13, 4706, 736, 1962, 13, 268, 13, 1678, 822, 8466, 15514, 3950, 29898, 1311, 29892, 474, 29892, 413, 2311, 29892, 297, 3505, 29892, 714, 3505, 1125, 13, 308, 13, 4706, 565, 525, 29916, 18852, 29915, 297, 1583, 29889, 17460, 29918, 11228, 3950, 29901, 13, 632, 13, 9651, 565, 1583, 29889, 17460, 29918, 11228, 3950, 1275, 525, 29916, 18852, 29918, 8945, 2396, 13, 632, 13, 18884, 565, 7431, 29898, 2039, 675, 29897, 1275, 29871, 29946, 29901, 13, 462, 1678, 1583, 29889, 26705, 9065, 29961, 29875, 29962, 353, 7442, 29889, 8172, 29889, 9502, 29876, 29898, 2039, 675, 29961, 29900, 1402, 2039, 675, 29961, 29896, 1402, 2039, 675, 29961, 29906, 1402, 2039, 675, 29961, 29941, 2314, 334, 5844, 29889, 3676, 29898, 29906, 29889, 29900, 847, 313, 262, 3505, 718, 714, 3505, 876, 13, 18884, 1683, 29901, 13, 462, 1678, 1583, 29889, 26705, 9065, 29961, 29875, 29962, 353, 7442, 29889, 8172, 29889, 9502, 29876, 29898, 2039, 675, 29961, 29900, 1402, 2039, 675, 29961, 29896, 1402, 2039, 675, 29961, 29906, 2314, 334, 5844, 29889, 3676, 29898, 29906, 29889, 29900, 847, 313, 262, 3505, 718, 714, 3505, 876, 13, 462, 13, 9651, 25342, 1583, 29889, 17460, 29918, 11228, 3950, 1275, 525, 29916, 18852, 29918, 29590, 2396, 13, 462, 13, 18884, 1880, 1440, 353, 5844, 29889, 3676, 29898, 29953, 29889, 29900, 847, 313, 262, 3505, 718, 714, 3505, 876, 13, 18884, 4482, 1440, 353, 448, 29896, 334, 1880, 1440, 13, 13, 18884, 1583, 29889, 26705, 9065, 29961, 29875, 29962, 353, 7442, 29889, 8172, 29889, 29590, 29898, 677, 29922, 677, 1440, 29892, 1880, 29922, 9812, 1440, 29892, 2159, 29922, 2039, 675, 29897, 13, 462, 13, 4706, 1683, 29901, 13, 632, 13, 9651, 565, 1583, 29889, 17460, 29918, 11228, 3950, 1275, 525, 354, 29918, 8945, 2396, 13, 462, 13, 18884, 565, 7431, 29898, 2039, 675, 29897, 1275, 29871, 29946, 29901, 13, 462, 1678, 1583, 29889, 26705, 9065, 29961, 29875, 29962, 353, 7442, 29889, 8172, 29889, 9502, 29876, 29898, 2039, 675, 29961, 29900, 1402, 2039, 675, 29961, 29896, 1402, 2039, 675, 29961, 29906, 1402, 2039, 675, 29961, 29941, 2314, 334, 5844, 29889, 3676, 29898, 29906, 29889, 29900, 847, 297, 3505, 29897, 13, 18884, 1683, 29901, 13, 462, 1678, 1583, 29889, 26705, 9065, 29961, 29875, 29962, 353, 7442, 29889, 8172, 29889, 9502, 29876, 29898, 2039, 675, 29961, 29900, 1402, 2039, 675, 29961, 29896, 1402, 2039, 675, 29961, 29906, 2314, 334, 5844, 29889, 3676, 29898, 29906, 29889, 29900, 847, 297, 3505, 29897, 13, 462, 13, 9651, 25342, 1583, 29889, 17460, 29918, 11228, 3950, 1275, 525, 354, 29918, 29590, 2396, 13, 462, 13, 18884, 1880, 1440, 353, 5844, 29889, 3676, 29898, 29953, 29889, 29900, 847, 297, 3505, 29897, 13, 18884, 4482, 1440, 353, 448, 29896, 334, 1880, 1440, 13, 462, 13, 18884, 1583, 29889, 26705, 9065, 29961, 29875, 29962, 353, 7442, 29889, 8172, 29889, 29590, 29898, 677, 29922, 677, 1440, 29892, 1880, 29922, 9812, 1440, 29892, 2159, 29922, 2039, 675, 29897, 13, 268, 13, 1678, 822, 7602, 29931, 388, 414, 29737, 2831, 1328, 29898, 1311, 29892, 527, 1125, 13, 308, 13, 4706, 1583, 29889, 20580, 4290, 29879, 353, 5159, 13, 308, 13, 4706, 7431, 29918, 29885, 353, 7431, 29898, 326, 29889, 12181, 29897, 13, 4706, 396, 2158, 877, 2435, 29918, 29885, 29901, 742, 7431, 29918, 29885, 29897, 13, 308, 13, 4706, 363, 474, 29892, 1067, 297, 26985, 29898, 1311, 29889, 20580, 3434, 2153, 1125, 13, 632, 13, 9651, 1583, 29889, 20580, 4290, 29879, 29889, 4397, 29898, 326, 29897, 13, 632, 13, 9651, 565, 313, 1311, 29889, 26705, 9065, 29961, 29875, 29962, 338, 6213, 1125, 13, 462, 13, 18884, 565, 313, 1853, 29898, 1311, 29889, 20580, 5072, 29903, 7093, 29897, 1275, 1051, 1125, 13, 462, 1678, 413, 29879, 353, 1583, 29889, 20580, 5072, 29903, 7093, 29961, 29875, 29962, 13, 18884, 1683, 29901, 13, 462, 1678, 413, 29879, 353, 1583, 29889, 20580, 5072, 29903, 7093, 13, 462, 13, 462, 13, 18884, 297, 3505, 353, 7442, 29889, 10633, 29898, 326, 29889, 12181, 29897, 13, 462, 13, 18884, 565, 525, 29916, 18852, 29915, 297, 1583, 29889, 17460, 29918, 11228, 3950, 29901, 13, 462, 1678, 565, 1583, 29889, 16175, 29918, 2311, 1275, 29871, 29896, 29901, 13, 462, 4706, 527, 12181, 353, 7442, 29889, 294, 2378, 4197, 326, 29889, 12181, 29961, 29900, 1402, 527, 29889, 12181, 29961, 29896, 24960, 13, 462, 1678, 1683, 29901, 13, 462, 4706, 527, 12181, 353, 7442, 29889, 294, 2378, 4197, 326, 29889, 12181, 29961, 29896, 1402, 527, 29889, 12181, 29961, 29906, 24960, 13, 462, 308, 13, 462, 1678, 4805, 24111, 353, 938, 3552, 2039, 1273, 29871, 29906, 29897, 1275, 29871, 29900, 29897, 13, 462, 1678, 413, 29879, 29906, 353, 938, 29898, 2039, 847, 29871, 29906, 29897, 334, 29871, 29906, 13, 462, 1678, 714, 3505, 353, 7442, 29889, 10633, 3552, 326, 12181, 448, 413, 29879, 29906, 718, 4805, 24111, 876, 334, 1067, 13, 18884, 1683, 29901, 13, 462, 1678, 714, 3505, 353, 29871, 29900, 13, 13, 462, 13, 18884, 565, 474, 1275, 29871, 29900, 322, 7431, 29918, 29885, 1275, 29871, 29941, 29901, 13, 462, 268, 13, 462, 1678, 565, 1583, 29889, 16175, 29918, 2311, 1275, 29871, 29896, 29901, 13, 462, 4706, 1583, 29889, 17460, 15514, 3950, 29898, 29875, 29892, 313, 2039, 29892, 2039, 29892, 326, 29889, 12181, 29961, 29906, 1402, 695, 511, 297, 3505, 29892, 714, 3505, 29897, 13, 462, 1678, 1683, 29901, 13, 462, 4706, 1583, 29889, 17460, 15514, 3950, 29898, 29875, 29892, 313, 2039, 29892, 2039, 29892, 695, 511, 297, 3505, 29892, 714, 3505, 29897, 13, 462, 268, 13, 18884, 1683, 29901, 13, 462, 268, 13, 462, 1678, 1583, 29889, 17460, 15514, 3950, 29898, 29875, 29892, 313, 2039, 29892, 2039, 29892, 695, 511, 297, 3505, 29892, 714, 3505, 29897, 13, 462, 462, 308, 13, 632, 13, 9651, 413, 29918, 26705, 353, 1583, 29889, 26705, 9065, 29961, 29875, 29962, 13, 632, 13, 9651, 565, 313, 1853, 29898, 1311, 29889, 20580, 855, 2426, 29897, 1275, 1051, 1125, 13, 18884, 380, 2426, 29918, 862, 353, 1583, 29889, 20580, 855, 2426, 29961, 29875, 29962, 13, 9651, 1683, 29901, 13, 18884, 380, 2426, 29918, 862, 353, 1583, 29889, 20580, 855, 2426, 13, 632, 13, 9651, 396, 2158, 877, 1168, 4068, 284, 7546, 742, 474, 29892, 11297, 29876, 1495, 13, 9651, 396, 2158, 877, 14420, 1881, 8267, 29901, 742, 527, 29889, 12181, 29897, 13, 9651, 396, 2158, 877, 14420, 18094, 1409, 8267, 29901, 742, 413, 29918, 26705, 29889, 12181, 29897, 13, 632, 13, 632, 13, 9651, 396, 7370, 310, 26851, 29879, 13, 632, 13, 9651, 396, 326, 353, 1583, 29889, 20580, 29918, 26705, 29898, 326, 29892, 413, 29918, 26705, 29892, 1104, 29884, 29922, 5574, 29892, 380, 2426, 29922, 303, 2426, 29918, 862, 29892, 4464, 2433, 3084, 1495, 13, 632, 13, 9651, 18094, 9065, 29918, 12181, 29900, 29896, 353, 7442, 29889, 294, 2378, 4197, 29895, 29918, 26705, 29889, 12181, 29961, 29900, 1402, 413, 29918, 26705, 29889, 12181, 29961, 29896, 24960, 13, 9651, 18094, 9065, 29918, 12181, 29918, 29881, 29906, 353, 313, 26705, 9065, 29918, 12181, 29900, 29896, 847, 29871, 29906, 467, 579, 668, 29898, 524, 29897, 13, 13, 9651, 4805, 24111, 353, 313, 26705, 9065, 29918, 12181, 29900, 29896, 1273, 29871, 29906, 29897, 1275, 29871, 29900, 13, 9651, 321, 29903, 29900, 353, 4805, 24111, 29961, 29900, 1822, 579, 668, 29898, 524, 29897, 13, 9651, 321, 29903, 29896, 353, 4805, 24111, 29961, 29896, 1822, 579, 668, 29898, 524, 29897, 13, 9651, 926, 29979, 29888, 353, 321, 29903, 29900, 13, 9651, 926, 29990, 29888, 353, 321, 29903, 29896, 13, 13, 9651, 4175, 29918, 12181, 29900, 353, 413, 29918, 26705, 29889, 12181, 29961, 29900, 29962, 13, 9651, 4175, 29918, 12181, 29896, 353, 413, 29918, 26705, 29889, 12181, 29961, 29896, 29962, 13, 13, 9651, 565, 313, 2435, 29898, 29895, 29918, 26705, 29889, 12181, 29897, 6736, 29871, 29941, 1125, 13, 18884, 954, 29918, 26705, 353, 413, 29918, 26705, 29889, 12181, 14352, 29896, 29962, 13, 9651, 1683, 29901, 13, 18884, 954, 29918, 26705, 353, 29871, 29896, 13, 13, 9651, 565, 1583, 29889, 16175, 29918, 2311, 1275, 29871, 29896, 29901, 13, 18884, 921, 12181, 353, 7442, 29889, 294, 2378, 4197, 326, 29889, 12181, 29961, 29900, 1402, 527, 29889, 12181, 29961, 29896, 24960, 13, 9651, 1683, 29901, 13, 18884, 921, 12181, 353, 7442, 29889, 294, 2378, 4197, 326, 29889, 12181, 29961, 29896, 1402, 527, 29889, 12181, 29961, 29906, 24960, 13, 462, 13, 9651, 1962, 29918, 12181, 353, 921, 12181, 448, 18094, 9065, 29918, 12181, 29918, 29881, 29906, 29930, 29906, 718, 321, 29903, 29900, 13, 13, 13, 9651, 565, 5135, 2435, 29898, 326, 29889, 12181, 29897, 529, 7431, 29898, 29895, 29918, 26705, 29889, 12181, 876, 470, 313, 2435, 29898, 326, 29889, 12181, 29897, 1275, 29871, 29906, 322, 954, 29918, 26705, 1275, 29871, 29896, 22164, 13, 18884, 1060, 29878, 353, 7442, 29889, 18837, 29918, 6229, 29879, 29898, 326, 29892, 9685, 10457, 29896, 29897, 13, 18884, 1060, 29878, 353, 7442, 29889, 14358, 29898, 29990, 29878, 29892, 954, 29918, 26705, 29892, 9685, 10457, 29896, 29897, 13, 13, 9651, 1683, 29901, 13, 13, 18884, 565, 313, 2435, 29898, 326, 29889, 12181, 29897, 1275, 7431, 29898, 29895, 29918, 26705, 29889, 12181, 22164, 13, 462, 268, 13, 462, 1678, 565, 1583, 29889, 16175, 29918, 2311, 1275, 29871, 29896, 29901, 13, 462, 308, 13, 462, 4706, 716, 29918, 26705, 353, 938, 29898, 326, 29889, 12181, 14352, 29896, 29962, 847, 954, 29918, 26705, 29897, 13, 462, 4706, 1060, 29878, 353, 7442, 29889, 14358, 29898, 326, 29892, 716, 29918, 26705, 29892, 9685, 10457, 29896, 29897, 13, 462, 308, 13, 462, 1678, 1683, 29901, 13, 462, 308, 13, 462, 4706, 1060, 29878, 353, 7442, 29889, 18837, 29918, 6229, 29879, 29898, 326, 29892, 9685, 10457, 29896, 29897, 13, 462, 4706, 1060, 29878, 353, 7442, 29889, 14358, 29898, 29990, 29878, 29892, 954, 29918, 26705, 29892, 9685, 10457, 29896, 29897, 13, 462, 308, 13, 13, 18884, 1683, 29901, 13, 462, 1678, 1060, 29878, 353, 527, 13, 13, 9651, 565, 313, 2435, 29898, 29990, 29878, 29889, 12181, 29897, 1275, 29871, 29906, 1125, 13, 18884, 7442, 328, 353, 5135, 29900, 29892, 29872, 29903, 29900, 511, 313, 29900, 29892, 29872, 29903, 29896, 876, 13, 18884, 714, 29918, 29879, 353, 518, 4905, 29918, 12181, 29961, 29900, 1402, 1962, 29918, 12181, 29961, 29896, 1402, 29871, 29896, 29962, 13, 9651, 25342, 313, 2435, 29898, 29990, 29878, 29889, 12181, 29897, 1275, 29871, 29941, 1125, 13, 18884, 7442, 328, 353, 5135, 29900, 29892, 29872, 29903, 29900, 511, 313, 29900, 29892, 29872, 29903, 29896, 511, 313, 29900, 29892, 29900, 876, 13, 18884, 714, 29918, 29879, 353, 518, 4905, 29918, 12181, 29961, 29900, 1402, 1962, 29918, 12181, 29961, 29896, 1402, 954, 29918, 26705, 29962, 13, 9651, 25342, 313, 2435, 29898, 29990, 29878, 29889, 12181, 29897, 1275, 29871, 29946, 1125, 13, 462, 13, 18884, 565, 1583, 29889, 16175, 29918, 2311, 1275, 29871, 29896, 29901, 13, 462, 1678, 7442, 328, 353, 5135, 29900, 29892, 29872, 29903, 29900, 511, 313, 29900, 29892, 29872, 29903, 29896, 511, 313, 29900, 29892, 29900, 511, 313, 29900, 29892, 29900, 876, 13, 462, 1678, 714, 29918, 29879, 353, 518, 4905, 29918, 12181, 29961, 29900, 1402, 1962, 29918, 12181, 29961, 29896, 1402, 527, 29889, 12181, 29961, 29906, 1402, 954, 29918, 26705, 29962, 13, 18884, 1683, 29901, 13, 462, 1678, 7442, 328, 353, 5135, 29900, 29892, 29900, 511, 313, 29900, 29892, 29872, 29903, 29900, 511, 313, 29900, 29892, 29872, 29903, 29896, 511, 313, 29900, 29892, 29900, 876, 13, 462, 1678, 714, 29918, 29879, 353, 518, 326, 29889, 12181, 29961, 29900, 1402, 1962, 29918, 12181, 29961, 29900, 1402, 1962, 29918, 12181, 29961, 29896, 1402, 954, 29918, 26705, 29962, 13, 13, 9651, 1060, 29918, 8305, 353, 7442, 29889, 8305, 29898, 29990, 29878, 29892, 7442, 328, 29892, 525, 23362, 1495, 13, 13, 9651, 714, 29918, 29879, 29961, 29900, 565, 1583, 29889, 16175, 29918, 2311, 1275, 29871, 29896, 1683, 29871, 29896, 29962, 353, 938, 29898, 9302, 29889, 27696, 29898, 449, 29918, 29879, 29961, 29900, 565, 1583, 29889, 16175, 29918, 2311, 1275, 29871, 29896, 1683, 29871, 29896, 29962, 847, 380, 2426, 29918, 862, 876, 13, 9651, 714, 29918, 29879, 29961, 29896, 565, 1583, 29889, 16175, 29918, 2311, 1275, 29871, 29896, 1683, 29871, 29906, 29962, 353, 938, 29898, 9302, 29889, 27696, 29898, 449, 29918, 29879, 29961, 29896, 565, 1583, 29889, 16175, 29918, 2311, 1275, 29871, 29896, 1683, 29871, 29906, 29962, 847, 380, 2426, 29918, 862, 876, 13, 9651, 7602, 29918, 4905, 353, 7442, 29889, 3298, 359, 29898, 449, 29918, 29879, 29897, 13, 13, 632, 13, 632, 13, 9651, 565, 1583, 29889, 16175, 29918, 2311, 2804, 29871, 29896, 29901, 13, 18884, 413, 29918, 26705, 353, 7442, 29889, 18837, 29918, 6229, 29879, 29898, 29895, 29918, 26705, 29892, 9685, 29922, 29900, 29897, 13, 18884, 413, 29918, 26705, 353, 7442, 29889, 14358, 29898, 29895, 29918, 26705, 29892, 527, 29889, 12181, 29961, 29900, 1402, 9685, 29922, 29900, 29897, 13, 462, 13, 9651, 396, 2158, 29898, 29990, 29878, 29889, 12181, 29892, 1060, 29918, 8305, 29889, 12181, 29892, 413, 29918, 26705, 29889, 12181, 29892, 7602, 29918, 4905, 29889, 12181, 29892, 1962, 29918, 12181, 29897, 13, 13, 9651, 363, 926, 29979, 297, 3464, 29898, 29900, 29892, 4175, 29918, 12181, 29900, 1125, 13, 18884, 363, 926, 29990, 297, 3464, 29898, 29900, 29892, 4175, 29918, 12181, 29896, 1125, 4706, 13, 13, 462, 1678, 396, 2854, 26851, 13, 462, 1678, 565, 1583, 29889, 16175, 29918, 2311, 1275, 29871, 29896, 29901, 13, 462, 4706, 7602, 29918, 4905, 4619, 1060, 29918, 8305, 29961, 1066, 29979, 29888, 29901, 1066, 29979, 29888, 29974, 4905, 29918, 12181, 29961, 29900, 5387, 303, 2426, 29918, 862, 29892, 926, 29990, 29888, 29901, 1066, 29990, 29888, 29974, 4905, 29918, 12181, 29961, 29896, 5387, 303, 2426, 29918, 862, 29962, 334, 413, 29918, 26705, 29961, 1066, 29979, 29892, 926, 29990, 29962, 13, 462, 1678, 1683, 29901, 13, 462, 4706, 7602, 29918, 4905, 4619, 1060, 29918, 8305, 7503, 29892, 926, 29979, 29888, 29901, 1066, 29979, 29888, 29974, 4905, 29918, 12181, 29961, 29900, 5387, 303, 2426, 29918, 862, 29892, 926, 29990, 29888, 29901, 1066, 29990, 29888, 29974, 4905, 29918, 12181, 29961, 29896, 5387, 303, 2426, 29918, 862, 29962, 334, 413, 29918, 26705, 7503, 29892, 926, 29979, 29892, 926, 29990, 1822, 690, 14443, 29898, 29895, 29918, 26705, 29889, 12181, 29961, 29900, 1402, 29896, 29892, 29896, 29892, 29895, 29918, 26705, 29889, 12181, 29961, 29941, 2314, 13, 13, 462, 1678, 926, 29990, 29888, 353, 926, 29990, 29888, 718, 29871, 29896, 13, 13, 18884, 926, 29979, 29888, 353, 926, 29979, 29888, 718, 29871, 29896, 13, 18884, 926, 29990, 29888, 353, 321, 29903, 29896, 13, 632, 13, 9651, 396, 2796, 310, 26851, 29879, 13, 632, 13, 9651, 565, 1583, 29889, 1457, 29918, 12324, 29901, 13, 462, 13, 18884, 4853, 29918, 29888, 353, 18761, 29898, 3881, 29898, 29900, 29892, 2435, 29898, 20580, 29918, 4905, 29889, 12181, 4961, 13, 462, 13, 18884, 565, 1583, 29889, 16175, 29918, 2311, 1275, 29871, 29896, 29901, 13, 462, 1678, 4853, 29918, 29888, 353, 4853, 29918, 29888, 29961, 29900, 13018, 29896, 29962, 13, 462, 1678, 7602, 29918, 4905, 353, 313, 20580, 29918, 4905, 448, 7442, 29889, 12676, 29898, 20580, 29918, 4905, 29892, 9685, 29922, 1165, 29918, 29888, 876, 847, 313, 9302, 29889, 4172, 29898, 20580, 29918, 4905, 29892, 9685, 29922, 1165, 29918, 29888, 29897, 718, 29871, 29896, 29872, 29899, 29955, 29897, 13, 18884, 1683, 29901, 13, 462, 1678, 4853, 29918, 29888, 353, 4853, 29918, 29888, 29961, 29896, 13018, 29896, 29962, 13, 462, 1678, 7602, 29918, 4905, 353, 313, 20580, 29918, 4905, 448, 7442, 29889, 12676, 29898, 20580, 29918, 4905, 29892, 9685, 29922, 1165, 29918, 29888, 467, 690, 14443, 29898, 20580, 29918, 4905, 29889, 12181, 29961, 29900, 1402, 29896, 29892, 29896, 29892, 20580, 29918, 4905, 29889, 12181, 29961, 29941, 12622, 847, 313, 9302, 29889, 4172, 29898, 20580, 29918, 4905, 29892, 9685, 29922, 1165, 29918, 29888, 467, 690, 14443, 29898, 20580, 29918, 4905, 29889, 12181, 29961, 29900, 1402, 29896, 29892, 29896, 29892, 20580, 29918, 4905, 29889, 12181, 29961, 29941, 2314, 718, 29871, 29896, 29872, 29899, 29955, 29897, 13, 462, 18884, 13, 18884, 396, 20580, 29918, 4905, 353, 313, 20580, 29918, 4905, 448, 7602, 29918, 4905, 29889, 12676, 3101, 847, 313, 20580, 29918, 4905, 29889, 4172, 580, 718, 29871, 29896, 29872, 29899, 29955, 29897, 13, 462, 13, 9651, 527, 353, 1583, 29889, 21786, 362, 6678, 29898, 20580, 29918, 4905, 29892, 525, 2674, 29884, 1495, 13, 632, 13, 9651, 396, 2158, 877, 14420, 1962, 8267, 29901, 742, 527, 29889, 12181, 29892, 11297, 29876, 2683, 807, 2612, 29876, 1495, 632, 13, 632, 13, 632, 13, 4706, 736, 527, 13, 418, 13, 308, 13, 1678, 822, 7602, 29931, 388, 414, 5841, 7728, 351, 362, 29898, 1311, 29892, 1833, 29918, 13148, 29918, 4905, 29892, 12379, 29918, 18253, 1125, 13, 308, 13, 4706, 474, 353, 7431, 29898, 1311, 29889, 26705, 9065, 29897, 448, 29871, 29896, 13, 462, 462, 13, 4706, 1833, 29918, 12181, 353, 1051, 29898, 4230, 29918, 13148, 29918, 4905, 29889, 12181, 29897, 13, 308, 13, 4706, 565, 1583, 29889, 16175, 29918, 2311, 2804, 29871, 29896, 29901, 13, 9651, 9853, 29918, 295, 353, 1833, 29918, 12181, 29961, 29900, 29962, 13, 9651, 1833, 29918, 12181, 353, 1833, 29918, 12181, 29961, 29896, 17531, 718, 518, 16175, 29918, 295, 29962, 13, 462, 13, 4706, 1059, 29918, 1609, 29918, 29916, 353, 7442, 29889, 690, 14443, 29898, 16304, 29918, 18253, 29892, 1833, 29918, 12181, 29897, 13, 308, 13, 4706, 9995, 13, 4706, 565, 1583, 29889, 16175, 29918, 2311, 1275, 29871, 29896, 29901, 13, 9651, 954, 29918, 26705, 353, 1833, 29918, 13148, 29918, 4905, 29889, 12181, 29961, 29906, 29962, 13, 4706, 1683, 29901, 13, 9651, 954, 29918, 26705, 353, 1833, 29918, 13148, 29918, 4905, 29889, 12181, 29961, 29941, 29962, 13, 4706, 9995, 13, 308, 13, 4706, 1583, 29889, 1188, 877, 4763, 310, 7602, 29931, 388, 414, 5841, 7728, 351, 362, 29901, 742, 11297, 29876, 1495, 13, 308, 13, 4706, 396, 1311, 29889, 1188, 877, 16304, 29918, 18253, 29901, 742, 12379, 29918, 18253, 29889, 12181, 29892, 12379, 29918, 18253, 29892, 11297, 29876, 1495, 13, 4706, 396, 1311, 29889, 1188, 877, 4230, 29918, 13148, 29918, 4905, 29901, 742, 1833, 29918, 13148, 29918, 4905, 29889, 12181, 29892, 1833, 29918, 13148, 29918, 4905, 29892, 11297, 29876, 1495, 13, 4706, 396, 1311, 29889, 1188, 877, 2704, 29918, 1609, 29918, 29916, 29901, 742, 1059, 29918, 1609, 29918, 29916, 29889, 12181, 29892, 1059, 29918, 1609, 29918, 29916, 29892, 11297, 29876, 1495, 13, 308, 13, 4706, 396, 361, 1583, 29889, 16175, 29918, 2311, 2804, 29871, 29896, 29901, 13, 9651, 396, 2704, 29918, 1609, 29918, 29916, 353, 7442, 29889, 12676, 29898, 2704, 29918, 1609, 29918, 29916, 29892, 9685, 29922, 29900, 29897, 13, 632, 13, 308, 13, 4706, 363, 413, 29918, 26705, 297, 1583, 29889, 26705, 9065, 29961, 1057, 29899, 29896, 5387, 13, 632, 13, 9651, 1060, 353, 1583, 29889, 20580, 4290, 29879, 29961, 29875, 29962, 13, 632, 13, 9651, 565, 1583, 29889, 16175, 29918, 2311, 2804, 29871, 29896, 29901, 13, 18884, 1060, 29918, 16175, 12181, 353, 1051, 29898, 29990, 29889, 12181, 29897, 13, 18884, 1060, 29918, 16175, 29918, 17664, 353, 1060, 29918, 16175, 12181, 29961, 29900, 29962, 13, 18884, 1060, 29918, 16175, 12181, 353, 1060, 29918, 16175, 12181, 29961, 29896, 17531, 718, 518, 29990, 29918, 16175, 29918, 17664, 29962, 13, 462, 13, 18884, 1060, 353, 7442, 29889, 690, 14443, 29898, 29990, 29892, 1060, 29918, 16175, 12181, 29897, 13, 462, 462, 13, 18884, 396, 29990, 353, 7442, 29889, 12676, 29898, 29990, 29892, 9685, 29922, 29900, 29897, 13, 462, 308, 13, 632, 13, 9651, 396, 304, 21749, 403, 16030, 565, 4312, 1363, 310, 380, 2426, 13, 9651, 565, 313, 1853, 29898, 1311, 29889, 20580, 855, 2426, 29897, 1275, 1051, 1125, 13, 18884, 380, 2426, 29918, 862, 353, 1583, 29889, 20580, 855, 2426, 29961, 29875, 29962, 13, 9651, 1683, 29901, 13, 18884, 380, 2426, 29918, 862, 353, 1583, 29889, 20580, 855, 2426, 13, 632, 13, 9651, 565, 380, 2426, 29918, 862, 2804, 29871, 29896, 29901, 13, 462, 13, 18884, 396, 261, 24111, 353, 1059, 29918, 1609, 29918, 29916, 29889, 12181, 29961, 29900, 29962, 334, 380, 2426, 29918, 862, 13, 18884, 604, 24111, 353, 313, 29990, 29889, 12181, 29961, 29900, 2314, 13, 462, 13, 18884, 565, 1583, 29889, 16175, 29918, 2311, 1275, 29871, 29896, 29901, 13, 462, 1678, 1059, 29918, 1609, 29918, 4905, 353, 7442, 29889, 3298, 359, 3552, 261, 24111, 29892, 604, 24111, 29892, 1583, 29889, 20580, 3434, 2153, 29961, 29875, 11724, 26688, 29922, 7411, 29897, 13, 18884, 1683, 29901, 13, 462, 1678, 1059, 29918, 1609, 29918, 4905, 353, 7442, 29889, 3298, 359, 3552, 261, 24111, 29892, 604, 24111, 29892, 1583, 29889, 20580, 3434, 2153, 29961, 29875, 1402, 9853, 29918, 295, 511, 26688, 29922, 7411, 29897, 13, 13, 18884, 396, 2158, 29898, 2704, 29918, 1609, 29918, 4905, 29889, 12181, 29892, 1059, 29918, 1609, 29918, 29916, 29889, 12181, 29897, 13, 462, 13, 18884, 926, 29902, 353, 29871, 29900, 13, 18884, 926, 29967, 353, 29871, 29900, 13, 18884, 604, 29916, 29896, 353, 313, 2704, 29918, 1609, 29918, 29916, 29889, 12181, 29961, 29900, 2314, 13, 18884, 604, 29916, 29906, 353, 313, 2704, 29918, 1609, 29918, 29916, 29889, 12181, 29961, 29896, 2314, 13, 18884, 396, 28933, 29899, 1639, 705, 1351, 29901, 13, 18884, 363, 1236, 29918, 29875, 297, 3464, 29898, 29900, 29892, 604, 29916, 29896, 1125, 13, 462, 1678, 363, 1236, 29918, 29926, 297, 3464, 29898, 29900, 29892, 604, 29916, 29906, 1125, 13, 462, 308, 13, 462, 4706, 1059, 29918, 1609, 29918, 4905, 29961, 1066, 29902, 29892, 926, 29967, 29962, 353, 1059, 29918, 1609, 29918, 29916, 29961, 412, 29918, 29875, 29892, 1236, 29918, 29926, 29962, 13, 462, 308, 13, 462, 4706, 565, 313, 1066, 29967, 718, 29871, 29906, 29897, 529, 604, 24111, 29901, 13, 462, 9651, 926, 29967, 353, 926, 29967, 718, 29871, 29906, 13, 462, 4706, 1683, 29901, 13, 462, 9651, 926, 29967, 353, 926, 29967, 718, 29871, 29896, 13, 462, 268, 13, 462, 1678, 565, 313, 1066, 29902, 718, 29871, 29906, 29897, 529, 604, 24111, 29901, 13, 462, 4706, 926, 29902, 353, 926, 29902, 718, 29871, 29906, 13, 462, 1678, 1683, 29901, 13, 462, 4706, 926, 29902, 353, 926, 29902, 718, 29871, 29896, 13, 462, 308, 13, 462, 1678, 926, 29967, 353, 29871, 29900, 13, 632, 13, 9651, 1683, 29901, 13, 462, 13, 18884, 396, 270, 29923, 29914, 29881, 29949, 13, 18884, 1059, 29918, 1609, 29918, 4905, 353, 1059, 29918, 1609, 29918, 29916, 13, 308, 13, 462, 4706, 13, 9651, 285, 29918, 5450, 630, 353, 7442, 29889, 29888, 3466, 29898, 1311, 29889, 26705, 9065, 29961, 29875, 1402, 29871, 29900, 29897, 13, 9651, 285, 29918, 5450, 630, 353, 7442, 29889, 29888, 3466, 29898, 29888, 29918, 5450, 630, 29892, 29871, 29896, 29897, 13, 462, 308, 13, 9651, 396, 270, 29923, 29914, 29881, 29943, 13, 9651, 396, 2704, 29918, 1609, 29918, 4572, 353, 1583, 29889, 20580, 29918, 26705, 29898, 29990, 29892, 1059, 29918, 1609, 29918, 4905, 29892, 1104, 29884, 29922, 8824, 29892, 380, 2426, 29922, 29896, 29892, 4464, 2433, 3084, 1495, 13, 9651, 396, 270, 29923, 29914, 29881, 29990, 13, 9651, 396, 2704, 29918, 1609, 29918, 29916, 353, 1583, 29889, 20580, 29918, 26705, 29898, 29888, 29918, 5450, 630, 29892, 1059, 29918, 1609, 29918, 4905, 29892, 1104, 29884, 29922, 8824, 29892, 380, 2426, 29922, 29896, 29892, 4464, 2433, 8159, 1495, 13, 632, 13, 462, 13, 9651, 396, 7370, 310, 26851, 29879, 13, 632, 13, 9651, 4589, 29918, 4905, 29918, 12181, 29900, 29896, 353, 7442, 29889, 294, 2378, 4197, 2704, 29918, 1609, 29918, 4905, 29889, 12181, 29961, 29900, 1402, 1059, 29918, 1609, 29918, 4905, 29889, 12181, 29961, 29896, 24960, 13, 9651, 4589, 29918, 449, 29918, 12181, 29918, 29881, 29906, 353, 313, 3127, 29918, 4905, 29918, 12181, 29900, 29896, 847, 29871, 29906, 467, 579, 668, 29898, 524, 29897, 13, 13, 632, 13, 9651, 921, 12181, 353, 7442, 29889, 294, 2378, 4197, 29990, 29889, 12181, 29961, 29900, 1402, 1060, 29889, 12181, 29961, 29896, 24960, 13, 9651, 285, 12181, 353, 7442, 29889, 294, 2378, 4197, 29888, 29918, 5450, 630, 29889, 12181, 29961, 29900, 1402, 285, 29918, 5450, 630, 29889, 12181, 29961, 29896, 24960, 13, 13, 9651, 4805, 24111, 353, 313, 3127, 29918, 4905, 29918, 12181, 29900, 29896, 1273, 29871, 29906, 29897, 1275, 29871, 29900, 13, 9651, 321, 29903, 29900, 353, 4805, 24111, 29961, 29900, 1822, 579, 668, 29898, 524, 29897, 13, 9651, 321, 29903, 29896, 353, 4805, 24111, 29961, 29896, 1822, 579, 668, 29898, 524, 29897, 13, 632, 13, 9651, 4589, 29918, 1777, 29873, 29918, 12181, 353, 921, 12181, 448, 4589, 29918, 449, 29918, 12181, 29918, 29881, 29906, 29930, 29906, 718, 321, 29903, 29900, 13, 9651, 4589, 29918, 29916, 29918, 12181, 353, 285, 12181, 718, 4589, 29918, 449, 29918, 12181, 29918, 29881, 29906, 29930, 29906, 718, 321, 29903, 29900, 13, 632, 13, 9651, 954, 29918, 26705, 353, 1583, 29889, 26705, 9065, 29961, 29875, 1822, 12181, 14352, 29896, 29962, 13, 632, 13, 9651, 396, 2158, 29898, 2704, 29918, 1609, 29918, 4905, 29889, 12181, 29892, 921, 12181, 29892, 4589, 29918, 4905, 29918, 12181, 29900, 29896, 29892, 4589, 29918, 449, 29918, 12181, 29918, 29881, 29906, 29930, 29906, 29892, 321, 29903, 29900, 29892, 4589, 29918, 1777, 29873, 29918, 12181, 29897, 13, 632, 13, 9651, 565, 1583, 29889, 16175, 29918, 2311, 1275, 29871, 29896, 29901, 13, 18884, 1059, 29918, 1609, 29918, 4572, 353, 7442, 29889, 3298, 359, 3552, 3127, 29918, 1777, 29873, 29918, 12181, 29961, 29900, 1402, 4589, 29918, 1777, 29873, 29918, 12181, 29961, 29896, 1402, 954, 29918, 26705, 876, 13, 18884, 1059, 29918, 1609, 29918, 29916, 353, 7442, 29889, 3298, 359, 3552, 3127, 29918, 29916, 29918, 12181, 29961, 29900, 1402, 4589, 29918, 29916, 29918, 12181, 29961, 29896, 1402, 954, 29918, 26705, 876, 13, 9651, 1683, 29901, 13, 18884, 1059, 29918, 1609, 29918, 4572, 353, 7442, 29889, 3298, 359, 3552, 3127, 29918, 1777, 29873, 29918, 12181, 29961, 29900, 1402, 4589, 29918, 1777, 29873, 29918, 12181, 29961, 29896, 1402, 954, 29918, 26705, 29892, 1060, 29918, 16175, 29918, 17664, 876, 13, 18884, 1059, 29918, 1609, 29918, 29916, 353, 7442, 29889, 3298, 359, 3552, 3127, 29918, 29916, 29918, 12181, 29961, 29900, 1402, 4589, 29918, 29916, 29918, 12181, 29961, 29896, 1402, 954, 29918, 26705, 29892, 1060, 29918, 16175, 29918, 17664, 876, 13, 632, 13, 632, 13, 9651, 4589, 29918, 449, 29918, 12181, 29900, 353, 1059, 29918, 1609, 29918, 4905, 29889, 12181, 29961, 29900, 29962, 13, 9651, 4589, 29918, 449, 29918, 12181, 29896, 353, 1059, 29918, 1609, 29918, 4905, 29889, 12181, 29961, 29896, 29962, 13, 13, 9651, 977, 29918, 12181, 29900, 353, 1059, 29918, 1609, 29918, 4572, 29889, 12181, 29961, 29900, 29962, 13, 9651, 977, 29918, 12181, 29896, 353, 1059, 29918, 1609, 29918, 4572, 29889, 12181, 29961, 29896, 29962, 13, 13, 9651, 429, 29918, 12181, 29900, 353, 1583, 29889, 26705, 9065, 29961, 29875, 1822, 12181, 29961, 29900, 29962, 13, 9651, 429, 29918, 12181, 29896, 353, 1583, 29889, 26705, 9065, 29961, 29875, 1822, 12181, 29961, 29896, 29962, 13, 13, 9651, 926, 29979, 29888, 353, 321, 29903, 29900, 13, 9651, 926, 29990, 29888, 353, 321, 29903, 29896, 13, 632, 13, 9651, 565, 313, 2435, 29898, 29990, 29889, 12181, 29897, 529, 29871, 29941, 1125, 13, 18884, 1060, 29878, 353, 7442, 29889, 18837, 29918, 6229, 29879, 29898, 29990, 29892, 9685, 10457, 29896, 29897, 13, 18884, 1060, 29878, 353, 7442, 29889, 14358, 29898, 29990, 29878, 29892, 954, 29918, 26705, 29892, 9685, 10457, 29896, 29897, 13, 9651, 1683, 29901, 13, 18884, 1060, 29878, 353, 1060, 13, 632, 13, 9651, 565, 313, 2435, 29898, 29990, 29878, 29889, 12181, 29897, 1275, 29871, 29941, 1125, 13, 18884, 1060, 29918, 8305, 353, 7442, 29889, 8305, 29898, 29990, 29878, 29892, 5135, 29900, 29892, 29872, 29903, 29900, 511, 313, 29900, 29892, 29872, 29903, 29896, 511, 313, 29900, 29892, 29900, 8243, 525, 23362, 1495, 13, 9651, 25342, 313, 2435, 29898, 29990, 29878, 29889, 12181, 29897, 1275, 29871, 29946, 1125, 13, 18884, 1060, 29918, 8305, 353, 7442, 29889, 8305, 29898, 29990, 29878, 29892, 5135, 29900, 29892, 29872, 29903, 29900, 511, 313, 29900, 29892, 29872, 29903, 29896, 511, 313, 29900, 29892, 29900, 511, 313, 29900, 29892, 29900, 8243, 525, 23362, 1495, 29871, 13, 9651, 1683, 29901, 396, 2927, 1967, 411, 9853, 13, 18884, 1060, 29918, 8305, 353, 7442, 29889, 8305, 29898, 29990, 29878, 29892, 5135, 29900, 29892, 29900, 511, 313, 29900, 29892, 29872, 29903, 29900, 511, 313, 29900, 29892, 29872, 29903, 29896, 511, 313, 29900, 29892, 29900, 511, 313, 29900, 29892, 29900, 8243, 525, 23362, 1495, 13, 13, 632, 13, 9651, 7546, 29918, 26705, 353, 1583, 29889, 26705, 9065, 29961, 29875, 29962, 13, 632, 13, 9651, 565, 1583, 29889, 16175, 29918, 2311, 2804, 29871, 29896, 29901, 13, 18884, 7546, 29918, 26705, 353, 7442, 29889, 18837, 29918, 6229, 29879, 29898, 13148, 29918, 26705, 29892, 9685, 10457, 29896, 29897, 13, 18884, 7546, 29918, 26705, 353, 7442, 29889, 14358, 29898, 13148, 29918, 26705, 29892, 1060, 29918, 16175, 29918, 17664, 29892, 9685, 10457, 29896, 29897, 13, 632, 13, 632, 13, 9651, 396, 2158, 29898, 29990, 29918, 8305, 29889, 12181, 29892, 1059, 29918, 1609, 29918, 4905, 29889, 12181, 29892, 1059, 29918, 1609, 29918, 4572, 29889, 12181, 29892, 1583, 29889, 26705, 9065, 29961, 29875, 1822, 12181, 29892, 1059, 29918, 1609, 29918, 4905, 29889, 12181, 29892, 1059, 29918, 1609, 29918, 29916, 29889, 12181, 29897, 13, 9651, 363, 926, 29979, 297, 3464, 29898, 29900, 29892, 4589, 29918, 449, 29918, 12181, 29900, 1125, 13, 18884, 363, 926, 29990, 297, 3464, 29898, 29900, 29892, 4589, 29918, 449, 29918, 12181, 29896, 1125, 4706, 13, 13, 462, 1678, 396, 2854, 26851, 313, 29881, 29923, 29914, 29881, 29943, 29897, 13, 462, 1678, 1059, 29918, 1609, 29918, 4572, 4619, 1060, 29918, 8305, 29961, 1066, 29979, 29888, 29901, 1066, 29979, 29888, 29974, 1777, 29918, 12181, 29900, 29892, 926, 29990, 29888, 29901, 1066, 29990, 29888, 29974, 1777, 29918, 12181, 29896, 29962, 334, 1059, 29918, 1609, 29918, 4905, 29961, 1066, 29979, 29892, 926, 29990, 29962, 13, 13, 462, 1678, 396, 2989, 26851, 313, 29881, 29923, 29914, 29881, 29990, 29897, 13, 462, 1678, 1059, 29918, 1609, 29918, 29916, 29961, 1066, 29979, 29888, 29901, 1066, 29979, 29888, 29974, 735, 29918, 12181, 29900, 29892, 926, 29990, 29888, 29901, 1066, 29990, 29888, 29974, 735, 29918, 12181, 29896, 29962, 4619, 7546, 29918, 26705, 334, 1059, 29918, 1609, 29918, 4905, 29961, 1066, 29979, 29892, 926, 29990, 29962, 13, 13, 462, 1678, 926, 29990, 29888, 353, 926, 29990, 29888, 718, 29871, 29896, 13, 13, 18884, 926, 29979, 29888, 353, 926, 29979, 29888, 718, 29871, 29896, 13, 18884, 926, 29990, 29888, 353, 321, 29903, 29896, 13, 13, 9651, 1059, 29918, 1609, 29918, 29916, 353, 7442, 29889, 29888, 3466, 29898, 2704, 29918, 1609, 29918, 29916, 29892, 29871, 29900, 29897, 13, 9651, 1059, 29918, 1609, 29918, 29916, 353, 7442, 29889, 29888, 3466, 29898, 2704, 29918, 1609, 29918, 29916, 29892, 29871, 29896, 29897, 13, 632, 13, 632, 13, 9651, 396, 2796, 310, 26851, 29879, 13, 462, 13, 462, 13, 9651, 396, 2158, 29898, 29990, 29889, 12181, 29892, 1060, 29918, 8305, 29889, 12181, 29892, 1583, 29889, 26705, 9065, 29961, 29875, 1822, 12181, 29892, 1059, 29918, 1609, 29918, 4572, 29889, 12181, 29892, 1059, 29918, 1609, 29918, 29916, 29889, 12181, 29892, 1059, 29918, 1609, 29918, 4905, 29889, 12181, 29897, 13, 462, 268, 13, 9651, 396, 1311, 29889, 1188, 877, 2704, 29918, 1609, 29918, 4572, 29901, 742, 1059, 29918, 1609, 29918, 4572, 7503, 29892, 29901, 29892, 29900, 1402, 11297, 29876, 29905, 29876, 1495, 13, 9651, 396, 1311, 29889, 1188, 877, 16304, 18094, 9065, 29961, 29875, 5387, 742, 1583, 29889, 26705, 9065, 29961, 29875, 3816, 29901, 29892, 29901, 29892, 29900, 1402, 11297, 29876, 29905, 29876, 1495, 13, 9651, 396, 1311, 29889, 1188, 877, 2704, 29918, 1609, 29918, 29916, 29901, 742, 1059, 29918, 1609, 29918, 29916, 7503, 29892, 29901, 29892, 29900, 1402, 11297, 29876, 29905, 29876, 1495, 13, 632, 13, 9651, 565, 1583, 29889, 16175, 29918, 2311, 2804, 29871, 29896, 29901, 13, 18884, 1059, 29918, 1609, 29918, 4572, 353, 7442, 29889, 12676, 29898, 2704, 29918, 1609, 29918, 4572, 29892, 9685, 10457, 29896, 29897, 13, 632, 13, 9651, 396, 361, 1583, 29889, 1457, 29918, 12324, 29901, 13, 18884, 396, 1165, 29918, 29888, 353, 18761, 29898, 3881, 29898, 29900, 29892, 2435, 29898, 2704, 29918, 1609, 29918, 4572, 29961, 29875, 1822, 12181, 4961, 29961, 29900, 13018, 29896, 29962, 13, 18884, 396, 2704, 29918, 1609, 29918, 4572, 353, 313, 2704, 29918, 1609, 29918, 4572, 448, 7442, 29889, 12676, 29898, 2704, 29918, 1609, 29918, 4572, 29892, 9685, 29922, 1165, 29918, 29888, 876, 847, 313, 9302, 29889, 4172, 29898, 2704, 29918, 1609, 29918, 4572, 29892, 9685, 29922, 1165, 29918, 29888, 29897, 718, 29871, 29896, 29872, 29899, 29955, 29897, 13, 462, 13, 18884, 396, 2704, 29918, 1609, 29918, 4572, 353, 313, 2704, 29918, 1609, 29918, 4572, 448, 1059, 29918, 1609, 29918, 4572, 29889, 12676, 3101, 847, 313, 2704, 29918, 1609, 29918, 4572, 29889, 4172, 580, 718, 29871, 29896, 29872, 29899, 29955, 29897, 13, 632, 13, 9651, 396, 2514, 2153, 2767, 13, 9651, 1583, 29889, 26705, 9065, 29961, 29875, 29962, 353, 1583, 29889, 26705, 9065, 29961, 29875, 29962, 448, 1583, 29889, 21891, 19907, 1168, 29894, 334, 1059, 29918, 1609, 29918, 4572, 13, 632, 13, 9651, 565, 1583, 29889, 1457, 29918, 12324, 29901, 13, 18884, 4853, 29918, 29888, 353, 18761, 29898, 3881, 29898, 29900, 29892, 2435, 29898, 1311, 29889, 26705, 9065, 29961, 29875, 1822, 12181, 4961, 29961, 29900, 13018, 29896, 29962, 13, 18884, 1583, 29889, 26705, 9065, 29961, 29875, 29962, 353, 313, 1311, 29889, 26705, 9065, 29961, 29875, 29962, 448, 7442, 29889, 12676, 29898, 1311, 29889, 26705, 9065, 29961, 29875, 1402, 9685, 29922, 1165, 29918, 29888, 876, 847, 313, 9302, 29889, 4172, 29898, 1311, 29889, 26705, 9065, 29961, 29875, 1402, 9685, 29922, 1165, 29918, 29888, 29897, 718, 29871, 29896, 29872, 29899, 29955, 29897, 13, 632, 13, 9651, 396, 1311, 29889, 1188, 877, 26705, 9065, 29961, 29875, 29962, 4784, 29901, 742, 1583, 29889, 26705, 9065, 29961, 29875, 3816, 29901, 29892, 29901, 29892, 29900, 1402, 11297, 29876, 29905, 29876, 1495, 632, 13, 9651, 396, 1311, 29889, 1188, 28909, 29876, 2683, 22158, 2612, 29876, 1495, 13, 632, 13, 9651, 474, 353, 474, 448, 29871, 29896, 13, 632, 13, 4706, 1583, 29889, 1188, 877, 5044, 310, 7602, 29931, 388, 414, 5841, 7728, 351, 362, 1495, 13, 308, 13, 1678, 822, 4216, 29898, 1311, 29892, 1510, 4806, 5861, 29922, 8824, 29892, 1426, 3505, 29922, 29929, 29892, 2888, 20494, 29922, 29900, 1125, 13, 4706, 14770, 29889, 4532, 29898, 1003, 2311, 7607, 29896, 29900, 29892, 29947, 876, 13, 13, 4706, 2537, 353, 14770, 29889, 29887, 6854, 580, 13, 4706, 4853, 353, 2537, 29889, 29887, 1113, 580, 13, 13, 4706, 4853, 29889, 842, 29918, 29916, 2576, 29898, 29916, 1195, 29922, 29900, 29892, 921, 3317, 29922, 29896, 29897, 13, 4706, 4853, 29889, 842, 29918, 29891, 2576, 29898, 962, 262, 29922, 29900, 29892, 343, 3317, 29922, 29896, 29897, 13, 13, 4706, 921, 1195, 29892, 921, 3317, 29892, 343, 1195, 29892, 343, 3317, 353, 4853, 29889, 8990, 580, 13, 13, 4706, 921, 6229, 353, 921, 3317, 448, 921, 1195, 13, 4706, 343, 6229, 353, 343, 3317, 448, 343, 1195, 13, 13, 4706, 2913, 29918, 546, 29918, 13148, 353, 921, 6229, 847, 313, 2435, 29898, 1311, 29889, 10892, 29931, 29897, 718, 29871, 29896, 29897, 13, 13, 4706, 921, 29900, 353, 921, 1195, 13, 4706, 921, 29896, 353, 921, 1195, 718, 2913, 29918, 546, 29918, 13148, 13, 13, 4706, 19301, 29918, 19207, 29877, 353, 2913, 29918, 546, 29918, 13148, 847, 29871, 29906, 13, 13, 4706, 565, 2888, 20494, 5277, 29871, 29900, 29901, 13, 9651, 7155, 353, 29871, 29896, 847, 5135, 2083, 29898, 1311, 29889, 10892, 29931, 29897, 718, 1583, 29889, 29876, 29918, 13148, 29900, 29897, 334, 29871, 29945, 29897, 13, 4706, 1683, 29901, 13, 9651, 7155, 353, 2888, 20494, 13, 13, 4706, 15023, 29918, 1220, 294, 29918, 3594, 353, 5159, 13, 308, 13, 4706, 1869, 386, 353, 1583, 29889, 29876, 29918, 13148, 29900, 13, 13, 4706, 363, 2117, 29874, 29892, 29882, 297, 26985, 4197, 1311, 29889, 29876, 29918, 13148, 29900, 29962, 718, 1583, 29889, 10892, 29931, 1125, 13, 9651, 2913, 29918, 546, 29918, 16115, 265, 353, 343, 6229, 847, 298, 13, 9651, 343, 29900, 353, 343, 1195, 13, 9651, 343, 29896, 353, 343, 1195, 718, 2913, 29918, 546, 29918, 16115, 265, 13, 9651, 19301, 29918, 19207, 29877, 29918, 29876, 353, 2913, 29918, 546, 29918, 16115, 265, 847, 29871, 29906, 13, 9651, 15023, 29918, 1220, 294, 29918, 3594, 29918, 1457, 353, 5159, 13, 9651, 452, 353, 313, 3333, 386, 334, 298, 29897, 448, 29871, 29896, 13, 9651, 452, 29979, 353, 298, 448, 29871, 29896, 13, 9651, 363, 432, 297, 3464, 29898, 29900, 29892, 298, 1125, 13, 18884, 4853, 29889, 1202, 29918, 5041, 29898, 572, 29873, 29889, 23495, 280, 3552, 29898, 2168, 601, 29918, 19207, 29877, 718, 921, 29900, 511, 313, 2168, 601, 29918, 19207, 29877, 29918, 29876, 718, 343, 29900, 8243, 7155, 29892, 2927, 2433, 29878, 8785, 13, 462, 13, 18884, 452, 29990, 353, 1869, 386, 448, 29871, 29896, 13, 13, 18884, 363, 921, 29891, 297, 15023, 29918, 1220, 294, 29918, 3594, 29901, 13, 462, 1678, 565, 5852, 29901, 396, 29926, 1275, 29871, 29906, 29901, 13, 462, 4706, 14770, 29889, 5317, 4197, 3594, 29961, 29900, 1402, 29898, 2168, 601, 29918, 19207, 29877, 718, 921, 29900, 29897, 16272, 3594, 29961, 29896, 1402, 313, 2168, 601, 29918, 19207, 29877, 29918, 29876, 718, 343, 29900, 29897, 2314, 13, 462, 4706, 396, 2158, 29898, 5030, 29874, 29892, 452, 29892, 1583, 29889, 10892, 4806, 5861, 29961, 5030, 29874, 29899, 29896, 3816, 484, 2314, 13, 13, 462, 4706, 590, 353, 5135, 2168, 601, 29918, 19207, 29877, 29918, 29876, 718, 343, 29900, 29897, 448, 921, 29891, 29961, 29896, 2314, 13, 462, 4706, 286, 29916, 353, 5135, 2168, 601, 29918, 19207, 29877, 718, 921, 29900, 29897, 448, 921, 29891, 29961, 29900, 2314, 13, 462, 4706, 282, 355, 6759, 353, 590, 847, 286, 29916, 13, 462, 4706, 16075, 1114, 29918, 272, 2101, 353, 921, 29891, 29961, 29896, 29962, 448, 282, 355, 6759, 334, 921, 29891, 29961, 29900, 29962, 13, 462, 4706, 15276, 264, 29918, 536, 353, 29871, 29900, 29889, 29900, 29896, 29945, 13, 462, 4706, 565, 282, 355, 6759, 529, 29871, 29900, 29901, 13, 462, 9651, 15276, 264, 29918, 536, 353, 448, 29900, 29889, 29900, 29946, 29945, 396, 1702, 22874, 279, 425, 5731, 16337, 628, 1426, 29877, 462, 308, 13, 462, 4706, 16075, 1114, 29918, 272, 2101, 353, 16075, 1114, 29918, 272, 2101, 718, 15276, 264, 29918, 536, 396, 1702, 3415, 3673, 712, 560, 1426, 29877, 4497, 3249, 2094, 2946, 316, 425, 26241, 694, 4166, 16634, 13, 462, 308, 13, 462, 4706, 396, 8080, 21392, 2637, 1869, 921, 628, 10768, 29877, 316, 425, 7705, 29874, 313, 1527, 359, 443, 15276, 264, 1702, 712, 694, 4497, 3249, 1261, 6840, 912, 16995, 316, 425, 26808, 2681, 29897, 13, 462, 4706, 286, 29916, 29906, 353, 4036, 29889, 29590, 29898, 3594, 29961, 29900, 29962, 718, 29871, 29900, 29889, 29900, 29946, 29892, 313, 2168, 601, 29918, 19207, 29877, 718, 921, 29900, 29897, 448, 29871, 29900, 29889, 29900, 29946, 29897, 13, 462, 4706, 590, 29906, 353, 282, 355, 6759, 29930, 16838, 29906, 718, 16075, 1114, 29918, 272, 2101, 13, 13, 462, 4706, 394, 5444, 353, 5844, 29889, 311, 7979, 267, 29898, 755, 29889, 23402, 29898, 14081, 6759, 876, 13, 462, 308, 13, 462, 4706, 565, 1510, 4806, 5861, 29901, 13, 462, 9651, 396, 2158, 29898, 29882, 29892, 2117, 29874, 29899, 29896, 29892, 452, 29990, 29892, 452, 29979, 29897, 13, 462, 9651, 1426, 29898, 16838, 29906, 29892, 590, 29906, 29892, 4513, 29898, 1311, 29889, 10892, 4806, 5861, 29961, 5030, 29874, 29899, 29896, 3816, 484, 29990, 3816, 484, 29979, 1402, 29941, 511, 13733, 353, 394, 5444, 29892, 4079, 2311, 353, 1426, 3505, 29897, 13, 462, 632, 13, 462, 1678, 452, 353, 452, 448, 29871, 29896, 13, 462, 1678, 452, 29990, 353, 452, 29990, 448, 29871, 29896, 13, 13, 18884, 15023, 29918, 1220, 294, 29918, 3594, 29918, 1457, 29889, 4397, 4197, 29898, 2168, 601, 29918, 19207, 29877, 718, 921, 29900, 511, 313, 2168, 601, 29918, 19207, 29877, 29918, 29876, 718, 343, 29900, 29897, 2314, 13, 462, 13, 18884, 452, 29979, 353, 452, 29979, 448, 29871, 29896, 13, 13, 18884, 343, 29900, 353, 343, 29900, 718, 2913, 29918, 546, 29918, 16115, 265, 13, 18884, 343, 29896, 353, 343, 29896, 718, 2913, 29918, 546, 29918, 16115, 265, 13, 462, 13, 18884, 1869, 386, 353, 298, 13, 18884, 396, 2158, 28909, 29876, 1495, 13, 13, 9651, 921, 29900, 353, 921, 29900, 718, 2913, 29918, 546, 29918, 13148, 13, 9651, 921, 29896, 353, 921, 29896, 718, 2913, 29918, 546, 29918, 13148, 13, 13, 9651, 396, 2158, 877, 9072, 2612, 29876, 1495, 13, 13, 9651, 15023, 29918, 1220, 294, 29918, 3594, 353, 15023, 29918, 1220, 294, 29918, 3594, 29918, 1457, 13, 13, 4706, 14770, 29889, 4294, 580, 13, 308, 13, 1678, 822, 1053, 3195, 29898, 1311, 29892, 2224, 2433, 742, 10422, 2433, 1168, 29894, 6779, 4920, 295, 29918, 4299, 29374, 13, 308, 13, 4706, 1583, 29889, 10892, 4806, 5861, 353, 7442, 29889, 1359, 29898, 2084, 718, 10422, 718, 22868, 705, 5861, 29889, 29876, 2272, 742, 2758, 29918, 23945, 280, 29922, 5574, 29897, 13, 632, 13, 4706, 286, 3991, 353, 7442, 29889, 1359, 29898, 2084, 718, 10422, 718, 22868, 2917, 29889, 29876, 2272, 742, 2758, 29918, 23945, 280, 29922, 5574, 29897, 13, 632, 13, 4706, 1583, 29889, 29876, 29918, 13148, 29900, 353, 938, 29898, 29885, 3991, 29961, 29900, 2314, 13, 4706, 1583, 29889, 4294, 3403, 29879, 353, 6120, 29898, 29885, 3991, 29961, 29896, 2314, 13, 4706, 1583, 29889, 4230, 14420, 29940, 5411, 787, 353, 938, 29898, 29885, 3991, 29961, 29906, 2314, 13, 4706, 1583, 29889, 1949, 29923, 1129, 12168, 353, 938, 29898, 29885, 3991, 29961, 29941, 2314, 13, 4706, 1583, 29889, 21891, 19907, 353, 5785, 29898, 29885, 3991, 29961, 29946, 2314, 13, 4706, 1583, 29889, 8382, 6818, 353, 938, 29898, 29885, 3991, 29961, 29945, 2314, 13, 4706, 1583, 29889, 2695, 3317, 353, 6120, 29898, 29885, 3991, 29961, 29953, 2314, 13, 4706, 1583, 29889, 11236, 362, 6678, 353, 851, 29898, 29885, 3991, 29961, 29955, 2314, 13, 4706, 1583, 29889, 369, 15828, 353, 6120, 29898, 29885, 3991, 29961, 29947, 2314, 13, 4706, 1583, 29889, 1509, 353, 851, 29898, 29885, 3991, 29961, 29929, 2314, 13, 4706, 1583, 29889, 16175, 29918, 2311, 353, 938, 29898, 29885, 3991, 29961, 29896, 29900, 2314, 13, 4706, 1583, 29889, 16175, 29918, 24970, 353, 851, 29898, 29885, 3991, 29961, 29896, 29896, 2314, 13, 4706, 1583, 29889, 16175, 29918, 4713, 353, 938, 29898, 29885, 3991, 29961, 29896, 29906, 2314, 13, 4706, 1583, 29889, 8865, 449, 353, 5785, 29898, 29885, 3991, 29961, 29896, 29941, 2314, 13, 4706, 1583, 29889, 1457, 29918, 12324, 353, 6120, 29898, 29885, 3991, 29961, 29896, 29946, 2314, 13, 4706, 1583, 29889, 845, 21897, 353, 6120, 29898, 29885, 3991, 29961, 29896, 29945, 2314, 13, 4706, 1583, 29889, 1524, 362, 15063, 353, 5785, 29898, 29885, 3991, 29961, 29896, 29953, 2314, 13, 4706, 1583, 29889, 3259, 29918, 5215, 287, 3195, 353, 286, 3991, 29961, 29896, 29955, 29962, 13, 4706, 1583, 29889, 10892, 29931, 29906, 353, 286, 3991, 29961, 29896, 29947, 29962, 13, 4706, 1583, 29889, 10892, 29931, 353, 286, 3991, 29961, 29896, 29929, 29962, 13, 13, 13, 4706, 7602, 3991, 353, 7442, 29889, 1359, 29898, 2084, 718, 10422, 718, 22868, 20580, 3991, 29889, 29876, 2272, 742, 2758, 29918, 23945, 280, 29922, 5574, 29897, 13, 13, 4706, 1583, 29889, 20580, 3434, 2153, 353, 7602, 3991, 29961, 29900, 29962, 13, 4706, 1583, 29889, 20580, 855, 2426, 353, 7602, 3991, 29961, 29896, 29962, 13, 4706, 1583, 29889, 20580, 5072, 29903, 7093, 353, 7602, 3991, 29961, 29906, 29962, 13, 4706, 1583, 29889, 17460, 29918, 11228, 3950, 353, 851, 29898, 20580, 3991, 29961, 29941, 2314, 13, 4706, 1583, 29889, 20580, 29923, 1129, 12168, 353, 938, 29898, 20580, 3991, 29961, 29946, 2314, 13, 4706, 1583, 29889, 21891, 19907, 1168, 29894, 353, 5785, 29898, 20580, 3991, 29961, 29945, 2314, 13, 13, 4706, 1583, 29889, 26705, 9065, 353, 7442, 29889, 1359, 29898, 2084, 718, 10422, 718, 22868, 26705, 9065, 29889, 29876, 2272, 742, 2758, 29918, 23945, 280, 29922, 5574, 29897, 13, 13, 462, 308, 13, 4706, 565, 1583, 29889, 8382, 6818, 1405, 29871, 29900, 29901, 13, 632, 13, 9651, 1583, 29889, 12676, 25733, 2059, 29923, 1129, 305, 353, 7442, 29889, 1359, 29898, 2084, 718, 10422, 718, 22868, 12676, 25733, 2059, 29923, 1129, 305, 29889, 29876, 2272, 742, 2758, 29918, 23945, 280, 29922, 5574, 467, 25027, 391, 580, 13, 632, 13, 4706, 565, 1583, 29889, 8382, 6818, 1405, 29871, 29896, 29901, 13, 13, 9651, 1583, 29889, 8382, 4806, 5861, 353, 7442, 29889, 1359, 29898, 2084, 718, 10422, 718, 22868, 8382, 4806, 5861, 29889, 29876, 2272, 742, 2758, 29918, 23945, 280, 29922, 5574, 467, 25027, 391, 580, 13, 268, 13, 1678, 822, 5609, 3195, 29898, 1311, 29892, 2224, 2433, 742, 10422, 2433, 1168, 29894, 6779, 4920, 295, 29918, 4299, 29374, 13, 308, 13, 4706, 7442, 29889, 7620, 29898, 2084, 718, 10422, 718, 22868, 705, 5861, 29889, 29876, 2272, 742, 7442, 29889, 294, 2378, 29898, 1311, 29889, 10892, 4806, 5861, 29892, 26688, 29922, 3318, 876, 13, 632, 13, 632, 13, 4706, 286, 3991, 353, 5159, 13, 4706, 286, 3991, 29889, 4397, 29898, 1311, 29889, 29876, 29918, 13148, 29900, 29897, 13, 4706, 286, 3991, 29889, 4397, 29898, 1311, 29889, 4294, 3403, 29879, 29897, 13, 4706, 286, 3991, 29889, 4397, 29898, 1311, 29889, 4230, 14420, 29940, 5411, 787, 29897, 13, 4706, 286, 3991, 29889, 4397, 29898, 1311, 29889, 1949, 29923, 1129, 12168, 29897, 13, 4706, 286, 3991, 29889, 4397, 29898, 1311, 29889, 21891, 19907, 29897, 13, 4706, 286, 3991, 29889, 4397, 29898, 1311, 29889, 8382, 6818, 29897, 13, 4706, 286, 3991, 29889, 4397, 29898, 1311, 29889, 2695, 3317, 29897, 13, 4706, 286, 3991, 29889, 4397, 29898, 1311, 29889, 11236, 362, 6678, 29897, 13, 4706, 286, 3991, 29889, 4397, 29898, 1311, 29889, 369, 15828, 29897, 13, 4706, 286, 3991, 29889, 4397, 29898, 1311, 29889, 1509, 29897, 13, 4706, 286, 3991, 29889, 4397, 29898, 1311, 29889, 16175, 29918, 2311, 29897, 13, 4706, 286, 3991, 29889, 4397, 29898, 1311, 29889, 16175, 29918, 24970, 29897, 13, 4706, 286, 3991, 29889, 4397, 29898, 1311, 29889, 16175, 29918, 4713, 29897, 13, 4706, 286, 3991, 29889, 4397, 29898, 1311, 29889, 8865, 449, 29897, 13, 4706, 286, 3991, 29889, 4397, 29898, 1311, 29889, 1457, 29918, 12324, 29897, 13, 4706, 286, 3991, 29889, 4397, 29898, 1311, 29889, 845, 21897, 29897, 13, 4706, 286, 3991, 29889, 4397, 29898, 1311, 29889, 1524, 362, 15063, 29897, 13, 4706, 286, 3991, 29889, 4397, 29898, 1311, 29889, 3259, 29897, 13, 4706, 286, 3991, 29889, 4397, 29898, 1311, 29889, 10892, 29931, 29906, 29897, 13, 4706, 286, 3991, 29889, 4397, 29898, 1311, 29889, 10892, 29931, 29897, 13, 13, 4706, 286, 3991, 353, 7442, 29889, 294, 2378, 29898, 29885, 3991, 29892, 26688, 29922, 3318, 29897, 13, 308, 13, 4706, 7442, 29889, 7620, 29898, 2084, 718, 10422, 718, 22868, 2917, 29889, 29876, 2272, 742, 286, 3991, 29897, 13, 13, 13, 4706, 7602, 3991, 353, 5159, 13, 4706, 7602, 3991, 29889, 4397, 29898, 1311, 29889, 20580, 3434, 2153, 29897, 13, 4706, 7602, 3991, 29889, 4397, 29898, 1311, 29889, 20580, 855, 2426, 29897, 13, 4706, 7602, 3991, 29889, 4397, 29898, 1311, 29889, 20580, 5072, 29903, 7093, 29897, 13, 4706, 7602, 3991, 29889, 4397, 29898, 1311, 29889, 17460, 29918, 11228, 3950, 29897, 13, 4706, 7602, 3991, 29889, 4397, 29898, 1311, 29889, 20580, 29923, 1129, 12168, 29897, 13, 4706, 7602, 3991, 29889, 4397, 29898, 1311, 29889, 21891, 19907, 1168, 29894, 29897, 13, 13, 4706, 7602, 3991, 353, 7442, 29889, 294, 2378, 29898, 20580, 3991, 29892, 26688, 29922, 3318, 29897, 13, 308, 13, 4706, 7442, 29889, 7620, 29898, 2084, 718, 10422, 718, 22868, 20580, 3991, 29889, 29876, 2272, 742, 7602, 3991, 29897, 13, 13, 4706, 7442, 29889, 7620, 29898, 2084, 718, 10422, 718, 22868, 26705, 9065, 29889, 29876, 2272, 742, 7442, 29889, 294, 2378, 29898, 1311, 29889, 26705, 9065, 29892, 26688, 29922, 9302, 29889, 7411, 29941, 29906, 876, 13, 13, 632, 13, 632, 13, 4706, 565, 1583, 29889, 8382, 6818, 1405, 29871, 29900, 29901, 13, 632, 13, 9651, 7442, 29889, 7620, 29898, 2084, 718, 10422, 718, 22868, 12676, 25733, 2059, 29923, 1129, 305, 29889, 29876, 2272, 742, 1583, 29889, 12676, 25733, 2059, 29923, 1129, 305, 29897, 13, 632, 13, 4706, 565, 1583, 29889, 8382, 6818, 1405, 29871, 29896, 29901, 13, 13, 9651, 7442, 29889, 7620, 29898, 2084, 718, 10422, 718, 22868, 8382, 4806, 5861, 29889, 29876, 2272, 742, 7442, 29889, 294, 2378, 29898, 1311, 29889, 8382, 4806, 5861, 29892, 26688, 29922, 3318, 876, 13, 13, 308, 13, 1678, 822, 1480, 29898, 1311, 29892, 334, 29885, 1125, 13, 4706, 565, 1583, 29889, 4294, 3403, 29879, 29901, 13, 9651, 1596, 10456, 29885, 29897, 13, 632, 13, 1678, 822, 1596, 6565, 15828, 29898, 1311, 29892, 334, 29885, 1125, 13, 4706, 565, 1583, 29889, 369, 15828, 29901, 13, 9651, 1596, 10456, 29885, 29897, 13, 308, 13, 1678, 822, 11905, 22676, 29898, 1311, 29892, 302, 29892, 474, 29892, 1833, 29940, 1125, 13, 4706, 565, 7431, 29898, 1311, 29889, 11288, 4806, 5861, 29897, 1275, 29871, 29900, 29901, 13, 9651, 954, 29956, 353, 302, 334, 1833, 29940, 13, 632, 13, 9651, 565, 1583, 29889, 3881, 17875, 22676, 338, 6213, 29901, 13, 462, 13, 18884, 565, 1583, 29889, 11236, 362, 6678, 1275, 525, 18816, 29885, 3398, 2396, 13, 13, 462, 1678, 565, 1583, 29889, 29990, 18852, 15514, 2133, 1275, 525, 8945, 1891, 2396, 396, 21981, 1891, 1060, 18852, 17865, 13, 462, 308, 13, 462, 4706, 1880, 1440, 353, 5844, 29889, 3676, 29898, 29953, 29889, 29900, 29897, 847, 5844, 29889, 3676, 29898, 4230, 29940, 718, 302, 29897, 29871, 13, 462, 4706, 4482, 1440, 353, 448, 29896, 334, 1880, 1440, 13, 13, 462, 4706, 286, 24156, 353, 7442, 29889, 8172, 29889, 29590, 29898, 677, 29922, 677, 1440, 29892, 1880, 29922, 9812, 1440, 29892, 2159, 7607, 1949, 29956, 29892, 29896, 876, 13, 462, 268, 13, 462, 1678, 1683, 29901, 396, 1060, 18852, 17865, 13, 462, 308, 13, 462, 4706, 286, 24156, 353, 7442, 29889, 8172, 29889, 9502, 29876, 29898, 1949, 29956, 29892, 29871, 29896, 29897, 334, 5844, 29889, 3676, 29898, 29896, 29889, 29900, 847, 1833, 29940, 29897, 13, 462, 268, 13, 18884, 1683, 29901, 13, 462, 268, 13, 462, 1678, 286, 24156, 353, 7442, 29889, 8172, 29889, 9502, 29876, 29898, 1949, 29956, 29892, 29871, 29896, 29897, 334, 5844, 29889, 3676, 29898, 29906, 29889, 29900, 847, 1833, 29940, 29897, 396, 940, 17865, 13, 462, 13, 9651, 1683, 29901, 13, 462, 13, 18884, 1880, 1440, 353, 1583, 29889, 3881, 17875, 22676, 29961, 29896, 29962, 13, 18884, 4482, 1440, 353, 1583, 29889, 3881, 17875, 22676, 29961, 29900, 29962, 13, 632, 13, 18884, 286, 24156, 353, 7442, 29889, 8172, 29889, 29590, 29898, 677, 29922, 677, 1440, 29892, 1880, 29922, 9812, 1440, 29892, 2159, 7607, 1949, 29956, 29892, 29896, 876, 13, 632, 13, 4706, 1683, 29901, 13, 9651, 286, 24156, 353, 7442, 29889, 294, 2378, 29898, 1311, 29889, 11288, 4806, 5861, 29961, 29875, 2314, 13, 9651, 396, 23521, 279, 353, 286, 24156, 29889, 690, 14443, 29898, 23521, 279, 29889, 12181, 29961, 29900, 1402, 29871, 29896, 29897, 13, 308, 13, 4706, 396, 1983, 353, 938, 29898, 23521, 279, 29889, 12181, 29961, 29900, 29962, 847, 1833, 29940, 29897, 13, 4706, 396, 2158, 877, 1983, 29901, 13420, 17534, 29897, 13, 4706, 286, 24156, 353, 286, 24156, 29889, 690, 14443, 29898, 4230, 29940, 29892, 302, 29892, 1797, 2433, 29943, 1495, 13, 308, 13, 4706, 736, 286, 24156, 13, 268, 13, 1678, 822, 21775, 362, 6678, 29898, 1311, 29892, 921, 29892, 5039, 29918, 1853, 2433, 18816, 29885, 3398, 29374, 13, 4706, 565, 5039, 29918, 1853, 1360, 29915, 18816, 29885, 3398, 2396, 13, 9651, 736, 29871, 29896, 29889, 29900, 14571, 29896, 718, 7442, 29889, 4548, 6278, 29896, 29930, 29916, 876, 13, 4706, 25342, 5039, 29918, 1853, 1360, 29915, 2674, 29884, 2396, 13, 9651, 736, 7442, 29889, 3062, 29898, 29916, 1405, 29871, 29900, 29892, 921, 29892, 29871, 29900, 29897, 13, 4706, 25342, 5039, 29918, 1853, 1360, 29915, 2695, 11242, 2396, 13, 9651, 736, 7442, 29889, 1188, 29898, 29896, 718, 7442, 29889, 4548, 29898, 29916, 876, 13, 4706, 25342, 5039, 29918, 1853, 1360, 29915, 280, 557, 29891, 2674, 29884, 2396, 13, 9651, 736, 7442, 29889, 3062, 29898, 29916, 1405, 29871, 29900, 29892, 921, 29892, 29871, 29900, 29889, 29900, 29896, 334, 921, 29897, 13, 4706, 25342, 5039, 29918, 1853, 1360, 29915, 22350, 2396, 13, 9651, 736, 7442, 29889, 8552, 29898, 29916, 29897, 13, 4706, 1683, 29901, 13, 9651, 921, 29961, 29916, 29958, 29900, 29889, 29945, 29962, 353, 29871, 29896, 13, 9651, 921, 29961, 29916, 14065, 29900, 29889, 29945, 29962, 353, 29871, 29900, 13, 9651, 736, 921, 13, 268, 13, 1678, 822, 740, 15383, 440, 1230, 29898, 1311, 29892, 921, 29892, 5039, 29918, 1853, 2433, 18816, 29885, 3398, 29374, 13, 4706, 565, 5039, 29918, 1853, 1360, 29915, 18816, 29885, 3398, 2396, 13, 9651, 736, 1583, 29889, 21786, 362, 6678, 29898, 29916, 29892, 11236, 29918, 1853, 29897, 334, 313, 29896, 29899, 1311, 29889, 21786, 362, 6678, 29898, 29916, 29892, 11236, 29918, 1853, 876, 13, 4706, 25342, 5039, 29918, 1853, 1360, 29915, 2674, 29884, 2396, 13, 9651, 736, 7442, 29889, 3062, 29898, 29916, 6736, 29871, 29900, 29892, 29871, 29896, 29892, 29871, 29900, 29897, 13, 4706, 25342, 5039, 29918, 1853, 1360, 29915, 2695, 11242, 2396, 13, 9651, 736, 29871, 29896, 29889, 29900, 14571, 29896, 718, 7442, 29889, 4548, 6278, 29896, 29930, 29916, 876, 13, 4706, 25342, 5039, 29918, 1853, 1360, 29915, 280, 557, 29891, 2674, 29884, 2396, 13, 9651, 736, 7442, 29889, 3062, 29898, 29916, 6736, 29871, 29900, 29892, 29871, 29896, 29892, 29871, 29900, 29889, 29900, 29896, 29897, 13, 4706, 25342, 5039, 29918, 1853, 1360, 29915, 22350, 2396, 13, 9651, 736, 29871, 29896, 13, 4706, 1683, 29901, 13, 9651, 736, 29871, 29896, 13, 268, 13, 1678, 822, 3438, 29898, 1311, 29892, 343, 29918, 3009, 29892, 343, 29918, 11965, 1125, 13, 4706, 274, 353, 343, 29918, 3009, 448, 343, 29918, 11965, 13, 4706, 736, 274, 13, 268, 13, 1678, 822, 4964, 3317, 29943, 29898, 1311, 29892, 921, 1125, 13, 4706, 565, 7442, 29889, 3317, 29898, 9302, 29889, 6897, 29898, 29916, 876, 529, 29871, 29945, 29900, 29900, 29901, 396, 5557, 11969, 13, 9651, 1518, 29990, 353, 7442, 29889, 4548, 29898, 29916, 29897, 13, 9651, 736, 1518, 29990, 847, 7442, 29889, 2083, 29898, 4548, 29990, 29892, 9685, 10457, 29896, 467, 690, 14443, 6278, 29896, 29892, 29871, 29896, 29897, 13, 4706, 1683, 29901, 13, 9651, 736, 921, 847, 7442, 29889, 27525, 398, 29898, 29896, 29892, 7442, 29889, 2083, 29898, 29916, 29892, 9685, 10457, 29896, 467, 690, 14443, 6278, 29896, 29892, 29871, 29896, 876, 13, 539, 13, 308, 13, 1678, 822, 758, 29918, 12324, 29918, 11333, 29918, 8610, 29898, 1311, 29892, 325, 29918, 13148, 1125, 13, 13, 4706, 565, 1583, 29889, 16175, 29918, 2311, 1275, 29871, 29896, 470, 7431, 29898, 29894, 29918, 13148, 29889, 12181, 29897, 1275, 29871, 29896, 29901, 13, 9651, 325, 29918, 13148, 29918, 12324, 353, 313, 29894, 29918, 13148, 448, 325, 29918, 13148, 29889, 12676, 3101, 847, 313, 29894, 29918, 13148, 29889, 4172, 580, 718, 29871, 29896, 29872, 29899, 29955, 29897, 13, 4706, 1683, 29901, 13, 9651, 325, 29918, 13148, 29918, 12324, 353, 5135, 29894, 29918, 13148, 29889, 29911, 448, 7442, 29889, 12676, 29898, 29894, 29918, 13148, 29892, 9685, 29922, 29896, 876, 847, 313, 9302, 29889, 4172, 29898, 29894, 29918, 13148, 29892, 9685, 29922, 29896, 29897, 718, 29871, 29896, 29872, 29899, 29955, 8106, 29911, 13, 308, 13, 4706, 736, 325, 29918, 13148, 29918, 12324, 13, 268, 13, 268, 13, 268, 13, 1678, 822, 6216, 29898, 1311, 29892, 921, 29892, 343, 1125, 13, 4706, 302, 29918, 13148, 29900, 353, 448, 29896, 13, 308, 13, 4706, 1583, 29889, 10892, 29931, 353, 3509, 29889, 24535, 8552, 29898, 1311, 29889, 10892, 29931, 29906, 29897, 13, 462, 13, 4706, 7934, 29956, 353, 518, 8516, 29962, 334, 313, 2435, 29898, 1311, 29889, 10892, 29931, 29897, 718, 29871, 29896, 29897, 13, 308, 13, 4706, 1583, 29889, 4230, 14420, 29940, 5411, 787, 353, 343, 29889, 12181, 29961, 29896, 29962, 13, 462, 13, 4706, 1583, 29889, 10892, 29931, 29889, 4397, 29898, 29891, 29889, 12181, 29961, 29896, 2314, 13, 308, 13, 4706, 1583, 29889, 20580, 6466, 29879, 353, 5159, 13, 308, 13, 4706, 1583, 29889, 2158, 6565, 15828, 877, 5323, 2827, 4687, 411, 742, 921, 29889, 12181, 29961, 29900, 1402, 525, 27736, 1495, 13, 308, 13, 4706, 565, 1583, 29889, 16175, 29918, 2311, 1275, 29871, 29896, 29901, 13, 9651, 954, 13463, 800, 353, 921, 29889, 12181, 29961, 29900, 29962, 13, 4706, 1683, 29901, 13, 9651, 954, 13463, 800, 353, 5844, 29889, 27696, 29898, 29916, 29889, 12181, 29961, 29900, 29962, 847, 1583, 29889, 16175, 29918, 2311, 29897, 13, 632, 13, 4706, 954, 13463, 800, 353, 938, 29898, 1949, 13463, 800, 334, 313, 29896, 448, 1583, 29889, 1524, 362, 15063, 876, 13, 632, 13, 308, 13, 4706, 363, 21502, 12168, 297, 3464, 29898, 29900, 29892, 1583, 29889, 1949, 29923, 1129, 12168, 1125, 13, 632, 13, 9651, 2099, 25733, 2059, 29923, 1129, 305, 29923, 353, 29871, 29900, 13, 632, 13, 9651, 9853, 29918, 1066, 353, 29871, 29900, 13, 632, 13, 13, 9651, 565, 21502, 12168, 529, 1583, 29889, 20580, 29923, 1129, 12168, 29901, 13, 18884, 921, 29891, 29918, 513, 353, 7442, 29889, 279, 927, 29898, 29916, 29889, 12181, 29961, 29900, 2314, 13, 9651, 1683, 29901, 13, 18884, 921, 29891, 29918, 513, 353, 7442, 29889, 279, 927, 29898, 2435, 29898, 1311, 29889, 20580, 6466, 29879, 876, 13, 632, 13, 9651, 565, 1583, 29889, 845, 21897, 29901, 13, 18884, 7442, 29889, 8172, 29889, 845, 21897, 29898, 3594, 29918, 513, 29897, 13, 462, 308, 13, 9651, 363, 921, 29918, 1066, 297, 3464, 29898, 29900, 29892, 954, 13463, 800, 1125, 13, 462, 13, 18884, 565, 21502, 12168, 529, 1583, 29889, 20580, 29923, 1129, 12168, 29901, 13, 462, 268, 13, 462, 1678, 565, 1583, 29889, 16175, 29918, 2311, 1275, 29871, 29896, 29901, 13, 462, 4706, 274, 29918, 1066, 2187, 353, 921, 29891, 29918, 513, 29961, 29916, 29918, 1066, 29962, 13, 462, 1678, 1683, 29901, 13, 462, 4706, 565, 313, 16175, 29918, 1066, 718, 1583, 29889, 16175, 29918, 2311, 29897, 529, 921, 29891, 29918, 513, 29889, 12181, 29961, 29900, 5387, 13, 462, 9651, 274, 29918, 1066, 2187, 353, 921, 29891, 29918, 513, 29961, 16175, 29918, 1066, 29901, 16175, 29918, 1066, 29974, 1311, 29889, 16175, 29918, 2311, 29962, 13, 462, 4706, 1683, 29901, 13, 462, 9651, 274, 29918, 1066, 2187, 353, 921, 29891, 29918, 513, 29961, 16175, 29918, 1066, 17531, 13, 13, 462, 1678, 921, 29918, 791, 353, 921, 29961, 29883, 29918, 1066, 2187, 29962, 13, 13, 462, 1678, 921, 29918, 791, 29918, 16175, 29918, 29879, 353, 921, 29918, 791, 29889, 12181, 29961, 29900, 29962, 13, 462, 13, 462, 13, 462, 268, 13, 462, 1678, 1833, 29918, 13148, 29918, 4905, 353, 1583, 29889, 20580, 29931, 388, 414, 29737, 2831, 1328, 29898, 29916, 29918, 791, 29897, 13, 462, 1678, 921, 29918, 791, 353, 1833, 29918, 13148, 29918, 4905, 29889, 1579, 8606, 580, 13, 462, 268, 13, 462, 1678, 565, 1583, 29889, 16175, 29918, 2311, 2804, 29871, 29896, 29901, 13, 462, 4706, 921, 29918, 791, 353, 921, 29918, 791, 29889, 690, 14443, 29898, 29916, 29918, 791, 29918, 16175, 29918, 29879, 29892, 938, 29898, 29916, 29918, 791, 29889, 12181, 29961, 29900, 29962, 847, 921, 29918, 791, 29918, 16175, 29918, 29879, 876, 13, 462, 268, 13, 462, 1678, 565, 21502, 12168, 1275, 313, 1311, 29889, 20580, 29923, 1129, 12168, 448, 29871, 29896, 1125, 13, 462, 268, 13, 462, 4706, 1583, 29889, 20580, 6466, 29879, 29889, 4397, 4197, 29916, 29918, 791, 29892, 274, 29918, 1066, 2187, 2314, 13, 462, 308, 13, 18884, 1683, 29901, 13, 462, 268, 13, 462, 1678, 921, 29918, 791, 29892, 274, 29918, 1066, 2187, 353, 1583, 29889, 20580, 6466, 29879, 29961, 3594, 29918, 513, 29961, 29916, 29918, 1066, 5262, 13, 462, 13, 18884, 396, 1311, 29889, 1188, 877, 29916, 29918, 791, 29901, 742, 921, 29918, 791, 29889, 12181, 29892, 921, 29918, 791, 29897, 13, 462, 462, 13, 18884, 396, 2158, 29898, 29916, 29918, 791, 29889, 12181, 29897, 13, 462, 13, 18884, 565, 302, 29918, 13148, 29900, 1275, 448, 29896, 29901, 13, 462, 268, 13, 462, 1678, 565, 1583, 29889, 16175, 29918, 2311, 1275, 29871, 29896, 29901, 13, 462, 4706, 302, 29918, 13148, 29900, 353, 921, 29918, 791, 29889, 12181, 29961, 29900, 29962, 13, 462, 1678, 1683, 29901, 13, 462, 4706, 302, 29918, 13148, 29900, 353, 921, 29918, 791, 29889, 12181, 29961, 29896, 29962, 13, 462, 308, 13, 462, 1678, 1583, 29889, 29876, 29918, 13148, 29900, 353, 302, 29918, 13148, 29900, 13, 632, 13, 18884, 325, 29918, 13148, 353, 921, 29918, 791, 29871, 13, 18884, 1833, 29940, 353, 302, 29918, 13148, 29900, 13, 13, 18884, 7546, 9065, 353, 5159, 13, 18884, 758, 21786, 403, 9065, 353, 5159, 13, 462, 13, 18884, 285, 29918, 29894, 13148, 353, 1583, 29889, 21786, 362, 6678, 29898, 29894, 29918, 13148, 29892, 525, 22350, 1495, 13, 18884, 7546, 9065, 29889, 4397, 29898, 29888, 29918, 29894, 13148, 29897, 13, 18884, 758, 21786, 403, 9065, 29889, 4397, 29898, 29894, 29918, 13148, 29897, 13, 462, 13, 18884, 285, 29918, 29894, 13148, 353, 325, 29918, 13148, 13, 462, 13, 18884, 5768, 449, 29918, 5975, 353, 5159, 13, 462, 13, 18884, 363, 474, 29892, 7934, 14420, 297, 26985, 29898, 1311, 29889, 10892, 29931, 1125, 13, 462, 1678, 9976, 353, 7934, 14420, 334, 1833, 29940, 13, 13, 462, 1678, 565, 7934, 29956, 29961, 29875, 29962, 338, 6213, 29901, 13, 462, 4706, 7934, 29956, 29961, 29875, 29962, 353, 1583, 29889, 24926, 22676, 29898, 10892, 14420, 29892, 474, 29892, 1833, 29940, 29897, 396, 25455, 18177, 13, 13, 462, 1678, 1819, 2831, 5894, 29883, 353, 938, 29898, 26586, 847, 7934, 14420, 29897, 13, 13, 462, 1678, 937, 9135, 353, 29871, 29900, 13, 462, 1678, 1833, 9135, 353, 1819, 2831, 5894, 29883, 13, 462, 268, 13, 462, 1678, 1583, 29889, 1188, 877, 29916, 29918, 29926, 29901, 13420, 285, 29918, 29894, 13148, 29897, 13, 462, 1678, 1583, 29889, 1188, 877, 29893, 29918, 29926, 29901, 13420, 7934, 29956, 29961, 29875, 2314, 13, 13, 462, 268, 13, 462, 1678, 325, 29918, 13148, 353, 285, 29918, 29894, 13148, 29889, 6333, 29898, 10892, 29956, 29961, 29875, 2314, 13, 462, 268, 13, 462, 1678, 565, 1583, 29889, 1457, 29918, 12324, 322, 313, 29875, 529, 313, 2435, 29898, 1311, 29889, 10892, 29931, 29897, 448, 29871, 29896, 22164, 13, 462, 4706, 325, 29918, 13148, 353, 1583, 29889, 1457, 29918, 12324, 29918, 11333, 29918, 8610, 29898, 29894, 29918, 13148, 29897, 13, 462, 268, 13, 462, 1678, 565, 1583, 29889, 8865, 449, 2804, 29871, 29900, 322, 313, 29875, 529, 313, 2435, 29898, 1311, 29889, 10892, 29931, 29897, 448, 29871, 29896, 22164, 13, 462, 4706, 5768, 449, 29918, 29894, 353, 7442, 29889, 8172, 29889, 2109, 7615, 29898, 29896, 29892, 29871, 29896, 29899, 1311, 29889, 8865, 449, 29892, 2159, 29922, 10892, 14420, 29897, 847, 313, 29896, 29899, 1311, 29889, 8865, 449, 29897, 13, 462, 4706, 325, 29918, 13148, 353, 325, 29918, 13148, 334, 5768, 449, 29918, 29894, 13, 462, 308, 13, 462, 4706, 5768, 449, 29918, 5975, 29889, 4397, 29898, 8865, 449, 29918, 29894, 29897, 13, 462, 13, 462, 268, 13, 462, 1678, 1583, 29889, 1188, 877, 1212, 29918, 29926, 29901, 742, 325, 29918, 13148, 29892, 11297, 29876, 1495, 13, 462, 268, 13, 462, 1678, 565, 313, 29875, 1275, 313, 2435, 29898, 1311, 29889, 10892, 29931, 29897, 448, 29871, 29896, 22164, 13, 462, 4706, 565, 29898, 1311, 29889, 2695, 3317, 1125, 13, 462, 9651, 285, 29918, 29894, 13148, 353, 1583, 29889, 2695, 3317, 29943, 29898, 29894, 29918, 13148, 467, 690, 14443, 6278, 29896, 29897, 13, 462, 4706, 1683, 29901, 13, 462, 9651, 565, 1583, 29889, 1509, 1275, 525, 1990, 2450, 2396, 13, 462, 18884, 285, 29918, 29894, 13148, 353, 1583, 29889, 21786, 362, 6678, 29898, 29894, 29918, 13148, 29892, 525, 18816, 29885, 3398, 1495, 396, 671, 4365, 29885, 3398, 373, 1833, 7546, 565, 12965, 13, 462, 9651, 1683, 29901, 13, 462, 18884, 285, 29918, 29894, 13148, 353, 1583, 29889, 21786, 362, 6678, 29898, 29894, 29918, 13148, 29892, 525, 22350, 1495, 396, 671, 10110, 373, 1833, 7546, 565, 17855, 13, 462, 1678, 1683, 29901, 13, 462, 4706, 285, 29918, 29894, 13148, 353, 1583, 29889, 21786, 362, 6678, 29898, 29894, 29918, 13148, 29892, 1583, 29889, 11236, 362, 6678, 29897, 29937, 29889, 690, 14443, 6278, 29896, 29897, 13, 462, 268, 13, 462, 1678, 7546, 9065, 29889, 4397, 29898, 29888, 29918, 29894, 13148, 29897, 13, 462, 1678, 758, 21786, 403, 9065, 29889, 4397, 29898, 29894, 29918, 13148, 29897, 13, 462, 1678, 325, 29918, 13148, 353, 285, 29918, 29894, 13148, 13, 462, 268, 13, 462, 1678, 1583, 29889, 1188, 877, 29888, 29898, 1212, 29918, 29926, 1125, 742, 285, 29918, 29894, 13148, 29892, 11297, 29876, 1495, 13, 462, 418, 13, 462, 268, 13, 462, 1678, 1833, 29940, 353, 7934, 14420, 13, 462, 268, 13, 18884, 3438, 29872, 29918, 273, 8733, 353, 6213, 13, 13, 18884, 474, 353, 7431, 29898, 1311, 29889, 10892, 29931, 29897, 448, 29871, 29896, 13, 462, 13, 18884, 396, 2158, 29898, 29888, 29918, 29894, 13148, 29897, 13, 462, 13, 18884, 9995, 13, 18884, 565, 29898, 1311, 29889, 2695, 3317, 1125, 13, 462, 1678, 285, 29918, 29894, 13148, 353, 1583, 29889, 2695, 3317, 29943, 29898, 29888, 29918, 29894, 13148, 467, 690, 14443, 6278, 29896, 29897, 13, 462, 1678, 1583, 29889, 1188, 877, 29888, 29918, 29894, 13148, 313, 6295, 615, 3317, 1962, 1125, 742, 285, 29918, 29894, 13148, 29897, 13, 462, 1678, 396, 2158, 29898, 29888, 29918, 29894, 13148, 29897, 13, 18884, 9995, 13, 462, 268, 13, 18884, 396, 2158, 29898, 29888, 29918, 29894, 13148, 29892, 11297, 29876, 29905, 29876, 1495, 13, 462, 13, 18884, 1583, 29889, 1188, 877, 2683, 2612, 29876, 5841, 1184, 13573, 362, 29901, 320, 29876, 1495, 13, 462, 13, 18884, 396, 1250, 7728, 351, 362, 29901, 13, 18884, 363, 7934, 14420, 297, 9310, 29876, 29918, 13148, 29900, 29962, 718, 1583, 29889, 10892, 29931, 9601, 1057, 29899, 29896, 5387, 13, 462, 1678, 1583, 29889, 1188, 877, 29940, 5411, 787, 297, 445, 7546, 29901, 13420, 7934, 14420, 29897, 13, 462, 1678, 396, 2158, 877, 29875, 29901, 13420, 474, 29892, 11297, 29876, 1495, 13, 13, 462, 1678, 565, 3438, 29872, 29918, 273, 8733, 338, 6213, 29901, 13, 462, 4706, 565, 29898, 1311, 29889, 2695, 3317, 1125, 13, 462, 9651, 7750, 29888, 29918, 18253, 29872, 353, 1583, 29889, 2220, 15383, 440, 1230, 29898, 29894, 29918, 13148, 29892, 1583, 29889, 11236, 362, 6678, 29897, 13, 462, 4706, 1683, 29901, 462, 632, 13, 462, 9651, 565, 1583, 29889, 1509, 1275, 525, 1990, 2450, 2396, 13, 462, 18884, 7750, 29888, 29918, 18253, 29872, 353, 1583, 29889, 2220, 15383, 440, 1230, 29898, 29894, 29918, 13148, 29892, 525, 18816, 29885, 3398, 1495, 13, 462, 9651, 1683, 29901, 13, 462, 18884, 7750, 29888, 29918, 18253, 29872, 353, 1583, 29889, 2220, 15383, 440, 1230, 29898, 29894, 29918, 13148, 29892, 525, 22350, 1495, 13, 462, 308, 13, 462, 308, 13, 462, 4706, 285, 29918, 18253, 353, 1583, 29889, 18253, 29898, 29891, 29961, 29883, 29918, 1066, 2187, 1402, 285, 29918, 29894, 13148, 29897, 13, 462, 4706, 396, 361, 1583, 29889, 16175, 29918, 2311, 2804, 29871, 29896, 29901, 13, 462, 9651, 396, 29888, 29918, 18253, 353, 285, 29918, 18253, 847, 325, 29918, 13148, 29889, 12181, 29961, 29900, 29962, 13, 462, 632, 13, 462, 4706, 3438, 29872, 353, 285, 29918, 18253, 334, 7750, 29888, 29918, 18253, 29872, 13, 462, 308, 13, 462, 4706, 565, 1583, 29889, 16175, 29918, 2311, 2804, 29871, 29896, 29901, 13, 462, 9651, 9853, 29918, 1066, 353, 9853, 29918, 1066, 718, 1583, 29889, 16175, 29918, 2311, 13, 462, 308, 13, 462, 4706, 396, 18253, 29872, 353, 3438, 29872, 29889, 690, 14443, 6278, 29896, 29897, 13, 462, 4706, 396, 18253, 29872, 353, 3438, 29872, 29889, 690, 14443, 29898, 18253, 29872, 29889, 12181, 29961, 29900, 1402, 29871, 29896, 29897, 13, 462, 308, 13, 462, 308, 13, 462, 4706, 396, 361, 1583, 29889, 16175, 29918, 2311, 2804, 29871, 29896, 29901, 13, 462, 9651, 396, 18253, 29872, 353, 7442, 29889, 2083, 29898, 18253, 29872, 29892, 9685, 29922, 29900, 29897, 13, 462, 9651, 396, 672, 440, 29888, 29918, 18253, 29872, 353, 7442, 29889, 2083, 29898, 672, 440, 29888, 29918, 18253, 29872, 29892, 9685, 29922, 29900, 29897, 13, 462, 632, 13, 462, 632, 13, 462, 795, 13, 462, 4706, 565, 1583, 29889, 8382, 6818, 1405, 29871, 29900, 29901, 13, 462, 9651, 2099, 25733, 2059, 29923, 1129, 305, 29923, 353, 2099, 25733, 2059, 29923, 1129, 305, 29923, 718, 313, 6897, 29898, 18253, 29872, 29897, 565, 1583, 29889, 16175, 29918, 2311, 1275, 29871, 29896, 1683, 7442, 29889, 12676, 29898, 9302, 29889, 23552, 29898, 18253, 29872, 511, 9685, 29922, 29900, 876, 13, 462, 632, 13, 462, 4706, 565, 1583, 29889, 8382, 6818, 1405, 29871, 29906, 29901, 13, 462, 9651, 1583, 29889, 18253, 29879, 29889, 4397, 29898, 18253, 29872, 29897, 462, 632, 13, 462, 308, 13, 462, 4706, 1583, 29889, 1188, 877, 672, 440, 29888, 29918, 18253, 29872, 29901, 13420, 7750, 29888, 29918, 18253, 29872, 29892, 525, 18253, 29901, 13420, 3438, 29872, 29892, 11297, 29876, 1495, 13, 13, 462, 1678, 1683, 29901, 13, 13, 462, 4706, 9976, 353, 7934, 14420, 334, 2446, 29940, 13, 462, 4706, 1819, 2831, 5894, 29883, 353, 938, 29898, 26586, 847, 7934, 14420, 29897, 13, 462, 4706, 937, 9135, 353, 29871, 29900, 13, 462, 4706, 1833, 9135, 353, 1819, 2831, 5894, 29883, 13, 13, 462, 4706, 396, 18253, 29872, 353, 5159, 13, 462, 4706, 396, 18253, 29872, 353, 7442, 29889, 3298, 359, 29898, 12181, 7607, 10892, 14420, 876, 13, 462, 308, 13, 462, 4706, 1583, 29889, 1188, 877, 16304, 29918, 2704, 29901, 13420, 3438, 29872, 29918, 273, 8733, 29897, 13, 462, 632, 13, 462, 4706, 8928, 359, 29918, 19585, 13833, 353, 7934, 29956, 29961, 29875, 29974, 29896, 1822, 29911, 13, 462, 632, 13, 462, 4706, 396, 2158, 877, 10892, 29956, 29961, 29875, 29974, 29896, 3816, 29926, 1057, 10892, 14420, 5387, 13420, 8928, 359, 29918, 19585, 13833, 29897, 13, 462, 632, 13, 462, 4706, 758, 21786, 403, 1917, 29924, 353, 758, 21786, 403, 9065, 29961, 29875, 29974, 29896, 29962, 13, 462, 632, 13, 462, 632, 13, 462, 4706, 758, 15383, 440, 353, 1583, 29889, 2220, 15383, 440, 1230, 29898, 1457, 21786, 403, 1917, 29924, 29892, 1583, 29889, 11236, 362, 6678, 29897, 13, 462, 4706, 1583, 29889, 1188, 877, 1457, 15383, 440, 29901, 13420, 758, 15383, 440, 29897, 13, 462, 632, 13, 462, 632, 13, 462, 4706, 3438, 29872, 29909, 353, 3438, 29872, 29918, 273, 8733, 29889, 6333, 29898, 5547, 359, 29918, 19585, 13833, 29897, 396, 3438, 29872, 1277, 1232, 8928, 359, 712, 4497, 264, 316, 425, 26808, 2681, 13, 462, 4706, 396, 18253, 29872, 29909, 353, 7442, 29889, 294, 2378, 29898, 18253, 29872, 29909, 29897, 13, 462, 4706, 1583, 29889, 1188, 703, 1457, 25733, 29909, 29901, 9162, 3438, 29872, 29909, 29897, 13, 462, 4706, 3438, 29872, 29909, 353, 3438, 29872, 29909, 334, 313, 1457, 15383, 440, 29897, 13, 462, 4706, 396, 18253, 29872, 29909, 353, 3438, 29872, 29909, 29889, 690, 14443, 6278, 29896, 29897, 13, 462, 4706, 396, 18253, 29872, 29909, 353, 3438, 29872, 29909, 29889, 29911, 13, 462, 308, 13, 462, 4706, 565, 1583, 29889, 8865, 449, 2804, 29871, 29900, 322, 474, 1405, 448, 29896, 29901, 396, 5768, 449, 338, 451, 2309, 373, 1881, 7546, 13, 462, 9651, 3438, 29872, 29909, 353, 3438, 29872, 29909, 334, 5768, 449, 29918, 5975, 29961, 29875, 29962, 13, 462, 308, 13, 462, 4706, 1583, 29889, 1188, 877, 18253, 29909, 29901, 13420, 3438, 29872, 29909, 29897, 13, 462, 632, 13, 462, 632, 13, 462, 4706, 7546, 1917, 29924, 353, 7546, 9065, 29961, 29875, 29974, 29896, 29962, 13, 462, 965, 13, 462, 4706, 396, 2158, 703, 18253, 29872, 29918, 273, 8733, 29889, 12181, 29901, 9162, 3438, 29872, 29918, 273, 8733, 29889, 12181, 29897, 13, 462, 4706, 1583, 29889, 1188, 703, 13148, 1819, 29901, 9162, 7546, 1917, 29924, 29897, 13, 462, 308, 13, 462, 632, 13, 462, 308, 13, 462, 4706, 565, 1583, 29889, 16175, 29918, 24970, 1275, 525, 2083, 2396, 13, 462, 632, 13, 462, 9651, 758, 29911, 29896, 353, 3438, 29872, 29918, 273, 8733, 29889, 690, 14443, 3552, 29896, 565, 1583, 29889, 16175, 29918, 2311, 1360, 29896, 1683, 3438, 29872, 29918, 273, 8733, 29889, 12181, 29961, 29900, 11724, 313, 18253, 29872, 29918, 273, 8733, 29889, 12181, 29961, 29900, 29962, 565, 1583, 29889, 16175, 29918, 2311, 1360, 29896, 1683, 3438, 29872, 29918, 273, 8733, 29889, 12181, 29961, 29896, 12622, 13, 462, 9651, 758, 29911, 29906, 353, 7546, 1917, 29924, 29889, 690, 14443, 3552, 13148, 1917, 29924, 29889, 12181, 29961, 29900, 29962, 565, 1583, 29889, 16175, 29918, 2311, 1360, 29896, 1683, 7546, 1917, 29924, 29889, 12181, 29961, 29896, 11724, 313, 29896, 565, 1583, 29889, 16175, 29918, 2311, 1360, 29896, 1683, 7546, 1917, 29924, 29889, 12181, 29961, 29900, 12622, 13, 462, 308, 13, 462, 4706, 25342, 1583, 29889, 16175, 29918, 2311, 1275, 29871, 29896, 29901, 13, 462, 632, 13, 462, 9651, 758, 29911, 29896, 353, 3438, 29872, 29918, 273, 8733, 29889, 690, 14443, 29898, 29896, 29892, 3438, 29872, 29918, 273, 8733, 29889, 12181, 29961, 29900, 2314, 13, 462, 9651, 758, 29911, 29906, 353, 7546, 1917, 29924, 29889, 690, 14443, 29898, 13148, 1917, 29924, 29889, 12181, 29961, 29900, 1402, 29871, 29896, 29897, 13, 462, 308, 13, 462, 4706, 1683, 29901, 13, 462, 632, 13, 462, 9651, 758, 29911, 29896, 353, 7442, 29889, 12676, 29898, 18253, 29872, 29918, 273, 8733, 29892, 9685, 29922, 29900, 29897, 13, 462, 9651, 758, 29911, 29896, 353, 758, 29911, 29896, 29889, 690, 14443, 29898, 29896, 29892, 758, 29911, 29896, 29889, 12181, 29961, 29900, 2314, 13, 462, 632, 13, 462, 9651, 758, 29911, 29906, 353, 7442, 29889, 12676, 29898, 13148, 1917, 29924, 29892, 9685, 29922, 29900, 29897, 13, 462, 9651, 758, 29911, 29906, 353, 758, 29911, 29906, 29889, 690, 14443, 29898, 1457, 29911, 29906, 29889, 12181, 29961, 29900, 1402, 29871, 29896, 29897, 13, 462, 632, 13, 462, 462, 462, 13, 462, 4706, 758, 353, 758, 29911, 29906, 29889, 6333, 29898, 1457, 29911, 29896, 29897, 13, 462, 308, 13, 462, 4706, 396, 361, 1583, 29889, 16175, 29918, 2311, 2804, 29871, 29896, 29901, 13, 462, 9651, 396, 1457, 353, 758, 334, 313, 29896, 29889, 29900, 847, 7546, 1917, 29924, 29889, 12181, 29961, 29900, 2314, 13, 462, 632, 13, 462, 308, 13, 462, 4706, 758, 353, 758, 334, 1583, 29889, 21891, 19907, 13, 462, 308, 13, 462, 308, 13, 462, 4706, 1583, 29889, 1188, 877, 1457, 29901, 13420, 758, 29892, 11297, 29876, 1495, 13, 462, 4706, 1583, 29889, 1188, 877, 21648, 7688, 29901, 13420, 7934, 29956, 29961, 29875, 29974, 29896, 2314, 13, 462, 4706, 7934, 29956, 29961, 29875, 29974, 29896, 29962, 353, 313, 10892, 29956, 29961, 29875, 29974, 29896, 29962, 718, 758, 29897, 13, 462, 4706, 1583, 29889, 1188, 877, 4373, 7688, 29901, 13420, 7934, 29956, 29961, 29875, 29974, 29896, 1402, 11297, 29876, 29905, 29876, 1495, 13, 462, 632, 13, 462, 4706, 3438, 29872, 353, 3438, 29872, 29909, 13, 462, 462, 462, 308, 13, 462, 4706, 1583, 29889, 1188, 28909, 29876, 29905, 29876, 1495, 13, 13, 462, 1678, 396, 18253, 29872, 353, 3438, 29872, 29889, 690, 14443, 6278, 29896, 29897, 13, 462, 1678, 396, 2158, 29898, 18253, 29872, 29889, 12181, 29897, 13, 462, 268, 13, 462, 1678, 396, 361, 7431, 29898, 18253, 29872, 29889, 12181, 29897, 1275, 29871, 29941, 29901, 13, 462, 4706, 396, 18253, 29872, 353, 3438, 29872, 29889, 690, 14443, 29898, 18253, 29872, 29889, 12181, 29961, 29900, 29962, 334, 3438, 29872, 29889, 12181, 29961, 29896, 1402, 3438, 29872, 29889, 12181, 29961, 29906, 2314, 13, 462, 308, 13, 462, 1678, 396, 2158, 877, 25733, 29872, 29901, 525, 1919, 3438, 29872, 29892, 3438, 29872, 29889, 12181, 29897, 13, 462, 1678, 396, 2158, 14182, 29876, 29905, 29876, 1159, 13, 462, 1678, 3438, 29872, 29918, 273, 8733, 353, 3438, 29872, 13, 462, 1678, 2446, 29940, 353, 7934, 14420, 13, 462, 1678, 474, 353, 474, 448, 29871, 29896, 13, 462, 268, 13, 462, 1678, 396, 2158, 877, 2683, 489, 1495, 13, 462, 268, 13, 462, 1678, 396, 2158, 28909, 29876, 29905, 29876, 29940, 434, 23517, 8928, 359, 29901, 13420, 7934, 29956, 29897, 13, 462, 1678, 396, 2158, 877, 25733, 29872, 14123, 8267, 29901, 13420, 3438, 29872, 29918, 273, 8733, 29889, 12181, 29897, 13, 632, 13, 18884, 565, 21502, 12168, 529, 1583, 29889, 20580, 29923, 1129, 12168, 29901, 396, 1363, 310, 7788, 27028, 13, 462, 1678, 1583, 29889, 20580, 29931, 388, 414, 5841, 7728, 351, 362, 29898, 4230, 29918, 13148, 29918, 4905, 29892, 3438, 29872, 29918, 273, 8733, 29897, 13, 462, 13, 9651, 1583, 29889, 2158, 6565, 15828, 28909, 29876, 29923, 1129, 305, 742, 851, 29898, 1022, 2878, 29879, 29974, 29896, 29897, 718, 8207, 29915, 718, 851, 29898, 1311, 29889, 1949, 29923, 1129, 12168, 511, 525, 5729, 9446, 1495, 13, 632, 13, 9651, 565, 1583, 29889, 8382, 6818, 1405, 29871, 29900, 29901, 13, 18884, 1583, 29889, 12676, 25733, 2059, 29923, 1129, 305, 29889, 4397, 29898, 12676, 25733, 2059, 29923, 1129, 305, 29923, 847, 954, 13463, 800, 29897, 13, 462, 13, 18884, 1583, 29889, 2158, 6565, 15828, 877, 5634, 382, 1129, 305, 6410, 29901, 742, 4513, 29898, 9302, 29889, 12676, 29898, 1311, 29889, 12676, 25733, 2059, 29923, 1129, 305, 14352, 29896, 11724, 29946, 876, 13, 462, 13, 9651, 565, 1583, 29889, 8382, 6818, 1405, 29871, 29896, 29901, 13, 18884, 1583, 29889, 8382, 4806, 5861, 29889, 4397, 29898, 8552, 29889, 24535, 8552, 29898, 10892, 29956, 876, 13, 462, 13, 632, 13, 9651, 1583, 29889, 16175, 29918, 2311, 353, 938, 29898, 1311, 29889, 16175, 29918, 2311, 334, 1583, 29889, 16175, 29918, 4713, 29897, 13, 632, 13, 462, 9651, 13, 4706, 1583, 29889, 10892, 4806, 5861, 353, 7934, 29956, 13, 4706, 396, 2158, 28909, 29876, 29905, 29876, 29940, 434, 23517, 8928, 359, 29901, 13420, 7934, 29956, 29897, 13, 308, 13, 4706, 1583, 29889, 2158, 6565, 15828, 28909, 29876, 29905, 29876, 5323, 2827, 7743, 29905, 29876, 29905, 29876, 1495, 13, 308, 13, 4706, 736, 1583, 13, 462, 13, 1678, 822, 8500, 29898, 1311, 29892, 921, 29892, 694, 1184, 2291, 29922, 29896, 1125, 13, 9651, 302, 29918, 13148, 29900, 353, 448, 29896, 13, 632, 13, 9651, 7546, 9065, 353, 7442, 29889, 3298, 359, 29898, 12181, 7607, 29916, 29889, 12181, 29961, 29900, 1402, 1311, 29889, 4230, 14420, 29940, 5411, 787, 876, 13, 308, 13, 308, 13, 9651, 9853, 29918, 1066, 353, 29871, 29900, 13, 632, 13, 9651, 565, 1583, 29889, 16175, 29918, 2311, 1275, 29871, 29896, 29901, 13, 18884, 954, 13463, 800, 353, 921, 29889, 12181, 29961, 29900, 29962, 13, 9651, 1683, 29901, 13, 18884, 954, 13463, 800, 353, 5844, 29889, 27696, 29898, 29916, 29889, 12181, 29961, 29900, 29962, 847, 1583, 29889, 16175, 29918, 2311, 29897, 13, 462, 308, 13, 9651, 363, 921, 29918, 1066, 297, 3464, 29898, 29900, 29892, 954, 13463, 800, 1125, 13, 462, 13, 18884, 565, 1583, 29889, 16175, 29918, 2311, 1275, 29871, 29896, 29901, 13, 462, 1678, 921, 29918, 791, 353, 921, 29961, 29916, 29918, 1066, 29962, 13, 18884, 1683, 29901, 13, 462, 1678, 565, 313, 16175, 29918, 1066, 718, 1583, 29889, 16175, 29918, 2311, 29897, 529, 921, 29889, 12181, 29961, 29900, 5387, 13, 462, 4706, 921, 29918, 791, 353, 921, 29961, 16175, 29918, 1066, 29901, 16175, 29918, 1066, 29974, 1311, 29889, 16175, 29918, 2311, 29962, 13, 462, 1678, 1683, 29901, 13, 462, 4706, 921, 29918, 791, 353, 921, 29961, 16175, 29918, 1066, 17531, 13, 462, 308, 13, 462, 1678, 921, 29918, 791, 29918, 16175, 29918, 29879, 353, 921, 29918, 791, 29889, 12181, 29961, 29900, 29962, 13, 462, 268, 13, 462, 268, 13, 9651, 396, 1454, 921, 29918, 1066, 29892, 921, 29918, 791, 297, 26985, 29898, 29916, 1125, 13, 462, 13, 18884, 921, 29918, 791, 353, 1583, 29889, 20580, 29931, 388, 414, 29737, 2831, 1328, 29898, 29916, 29918, 791, 467, 1579, 8606, 580, 13, 18884, 565, 1583, 29889, 16175, 29918, 2311, 2804, 29871, 29896, 29901, 13, 462, 1678, 921, 29918, 791, 353, 921, 29918, 791, 29889, 690, 14443, 29898, 29916, 29918, 791, 29918, 16175, 29918, 29879, 29892, 938, 29898, 29916, 29918, 791, 29889, 12181, 29961, 29900, 29962, 847, 921, 29918, 791, 29918, 16175, 29918, 29879, 876, 13, 462, 13, 18884, 565, 302, 29918, 13148, 29900, 1275, 448, 29896, 29901, 13, 462, 268, 13, 462, 1678, 302, 29918, 13148, 29900, 353, 921, 29918, 791, 29889, 12181, 29961, 29900, 29962, 13, 462, 1678, 1583, 29889, 29876, 29918, 13148, 29900, 353, 302, 29918, 13148, 29900, 13, 632, 13, 18884, 325, 29918, 13148, 353, 921, 29918, 791, 13, 18884, 1833, 29940, 353, 302, 29918, 13148, 29900, 13, 462, 13, 18884, 285, 29918, 29894, 13148, 353, 1583, 29889, 21786, 362, 6678, 29898, 29894, 29918, 13148, 29892, 525, 22350, 1495, 13, 462, 13, 18884, 363, 474, 29892, 7934, 14420, 297, 26985, 29898, 1311, 29889, 10892, 29931, 1125, 13, 462, 1678, 9976, 353, 7934, 14420, 334, 1833, 29940, 13, 13, 462, 1678, 1819, 2831, 5894, 29883, 353, 938, 29898, 26586, 847, 7934, 14420, 29897, 13, 13, 462, 1678, 937, 9135, 353, 29871, 29900, 13, 462, 1678, 1833, 9135, 353, 1819, 2831, 5894, 29883, 13, 13, 462, 1678, 325, 29918, 13148, 353, 285, 29918, 29894, 13148, 29889, 6333, 29898, 1311, 29889, 10892, 4806, 5861, 29961, 29875, 2314, 13, 462, 268, 13, 462, 1678, 565, 1583, 29889, 1457, 29918, 12324, 322, 313, 29875, 529, 313, 2435, 29898, 1311, 29889, 10892, 29931, 29897, 448, 29871, 29896, 22164, 13, 462, 4706, 325, 29918, 13148, 353, 1583, 29889, 1457, 29918, 12324, 29918, 11333, 29918, 8610, 29898, 29894, 29918, 13148, 29897, 13, 462, 268, 13, 462, 1678, 565, 313, 29875, 1275, 313, 2435, 29898, 1311, 29889, 10892, 29931, 29897, 448, 29871, 29896, 22164, 13, 462, 4706, 565, 29898, 1311, 29889, 2695, 3317, 1125, 13, 462, 9651, 285, 29918, 29894, 13148, 353, 1583, 29889, 2695, 3317, 29943, 29898, 29894, 29918, 13148, 467, 690, 14443, 6278, 29896, 29897, 13, 462, 4706, 1683, 29901, 13, 462, 9651, 565, 1583, 29889, 1509, 1275, 525, 1990, 2450, 2396, 13, 462, 18884, 285, 29918, 29894, 13148, 353, 1583, 29889, 21786, 362, 6678, 29898, 29894, 29918, 13148, 29892, 525, 18816, 29885, 3398, 1495, 396, 671, 4365, 29885, 3398, 373, 1833, 7546, 565, 12965, 13, 462, 9651, 1683, 29901, 13, 462, 18884, 285, 29918, 29894, 13148, 353, 1583, 29889, 21786, 362, 6678, 29898, 29894, 29918, 13148, 29892, 525, 22350, 1495, 396, 671, 10110, 373, 1833, 7546, 565, 17855, 13, 462, 1678, 1683, 29901, 13, 462, 4706, 285, 29918, 29894, 13148, 353, 1583, 29889, 21786, 362, 6678, 29898, 29894, 29918, 13148, 29892, 1583, 29889, 11236, 362, 6678, 29897, 29937, 29889, 690, 14443, 6278, 29896, 29897, 13, 462, 268, 13, 462, 1678, 325, 29918, 13148, 353, 285, 29918, 29894, 13148, 13, 462, 462, 308, 13, 462, 1678, 1833, 29940, 353, 7934, 14420, 13, 462, 268, 13, 18884, 565, 1583, 29889, 16175, 29918, 2311, 1275, 29871, 29896, 29901, 13, 462, 1678, 7546, 9065, 29961, 29916, 29918, 1066, 29962, 353, 285, 29918, 29894, 13148, 13, 18884, 1683, 29901, 13, 462, 1678, 565, 313, 16175, 29918, 1066, 718, 1583, 29889, 16175, 29918, 2311, 29897, 529, 921, 29889, 12181, 29961, 29900, 5387, 13, 462, 4706, 7546, 9065, 29961, 16175, 29918, 1066, 29901, 16175, 29918, 1066, 29974, 1311, 29889, 16175, 29918, 2311, 29962, 353, 285, 29918, 29894, 13148, 13, 462, 1678, 1683, 29901, 13, 462, 4706, 7546, 9065, 29961, 16175, 29918, 1066, 17531, 353, 285, 29918, 29894, 13148, 13, 462, 308, 13, 462, 1678, 9853, 29918, 1066, 353, 9853, 29918, 1066, 718, 1583, 29889, 16175, 29918, 2311, 13, 462, 268, 13, 462, 13, 9651, 9995, 268, 13, 9651, 565, 29898, 1311, 29889, 2695, 3317, 1125, 13, 18884, 7546, 9065, 353, 1583, 29889, 2695, 3317, 29943, 29898, 13148, 9065, 29897, 13, 9651, 9995, 13, 462, 268, 13, 632, 13, 9651, 565, 694, 1184, 2291, 1360, 29896, 29901, 13, 18884, 565, 1583, 29889, 1509, 1275, 525, 1990, 2450, 2396, 13, 462, 1678, 736, 1583, 29889, 21786, 362, 6678, 29898, 13148, 9065, 29892, 29871, 29906, 467, 579, 668, 29898, 524, 29897, 13, 18884, 1683, 29901, 13, 462, 1678, 736, 7546, 9065, 13, 9651, 1683, 29901, 13, 18884, 736, 7546, 9065, 13, 308, 13, 268, 13, 1678, 822, 8500, 29918, 771, 2291, 29898, 1311, 29892, 921, 1125, 13, 4706, 736, 1583, 29889, 27711, 29898, 29916, 29892, 29871, 29900, 29897, 13, 268, 13, 268, 13, 1678, 822, 6492, 29918, 12676, 29918, 2704, 29918, 4230, 29918, 13148, 29898, 1311, 29892, 2888, 4775, 29879, 11759, 1402, 491, 2385, 29922, 8824, 1125, 13, 13, 4706, 565, 1583, 29889, 8382, 6818, 1405, 29871, 29900, 29901, 13, 13, 9651, 2099, 18253, 353, 7442, 29889, 294, 2378, 29898, 1311, 29889, 12676, 25733, 2059, 29923, 1129, 305, 29897, 13, 13, 9651, 565, 7431, 29898, 1004, 4564, 520, 29889, 12181, 29897, 1405, 29871, 29896, 322, 451, 491, 2385, 29901, 13, 18884, 2099, 18253, 353, 7442, 29889, 12676, 29898, 1004, 4564, 520, 29892, 9685, 29922, 29896, 29897, 13, 13, 9651, 282, 3257, 353, 525, 8897, 7546, 2099, 1059, 491, 21502, 305, 29915, 1678, 13, 13, 9651, 2537, 29892, 4853, 353, 14770, 29889, 1491, 26762, 29898, 1003, 2311, 7607, 29947, 29892, 29953, 876, 13, 9651, 4853, 29889, 5317, 29898, 3881, 29898, 29900, 29892, 2099, 18253, 29889, 12181, 29961, 29900, 11724, 2099, 18253, 29897, 13, 9651, 4853, 29889, 842, 29898, 29916, 1643, 2433, 29923, 1129, 305, 742, 343, 1643, 2433, 6816, 273, 1059, 742, 3611, 29922, 415, 1740, 29897, 13, 9651, 4853, 29889, 7720, 580, 13, 13, 9651, 565, 7431, 29898, 1004, 4564, 520, 29889, 12181, 29897, 1405, 29871, 29896, 29901, 13, 18884, 565, 2099, 18253, 29889, 12181, 29961, 29896, 29962, 1405, 29871, 29896, 29901, 13, 462, 1678, 565, 7431, 29898, 6341, 4775, 29879, 29897, 1275, 29871, 29900, 29901, 13, 462, 4706, 26808, 353, 518, 703, 29940, 5411, 265, 376, 718, 851, 29898, 29875, 876, 363, 474, 297, 3464, 29898, 29900, 29892, 2099, 18253, 29889, 12181, 29961, 29896, 2314, 29962, 13, 462, 1678, 1683, 29901, 13, 462, 4706, 26808, 353, 2888, 4775, 29879, 13, 13, 462, 1678, 14770, 29889, 26172, 29898, 16115, 29892, 1180, 543, 21064, 1492, 1159, 13, 13, 9651, 14770, 29889, 4294, 580, 13, 13, 4706, 1683, 29901, 13, 9651, 1596, 877, 1168, 29894, 6779, 4744, 4464, 1818, 367, 3233, 29871, 29896, 470, 6133, 1495, 13, 13, 1678, 822, 6492, 29918, 705, 5861, 29918, 1609, 29918, 1022, 2878, 29898, 1311, 29892, 4236, 29918, 705, 5861, 10457, 29896, 1125, 13, 13, 4706, 565, 1583, 29889, 8382, 6818, 1405, 29871, 29896, 29901, 13, 13, 9651, 11988, 353, 1583, 29889, 8382, 4806, 5861, 13, 13, 9651, 11988, 29916, 353, 11988, 29961, 29900, 3816, 2435, 29898, 28012, 29961, 29900, 2314, 448, 29871, 29896, 3816, 17531, 13, 13, 9651, 2537, 29892, 4853, 353, 14770, 29889, 1491, 26762, 29898, 1003, 2311, 7607, 29947, 29892, 29953, 876, 13, 13, 9651, 343, 29887, 1929, 1417, 353, 6571, 13, 13, 9651, 363, 432, 1066, 29950, 29892, 926, 29950, 297, 26985, 29898, 3881, 29898, 29900, 29892, 7431, 29898, 28012, 876, 1125, 396, 363, 1269, 21502, 305, 13, 13, 18884, 11988, 29943, 353, 11988, 29961, 29926, 1066, 29950, 3816, 2435, 29898, 28012, 29961, 29900, 2314, 448, 29871, 29896, 3816, 17531, 13, 18884, 396, 2158, 29898, 28012, 29943, 29889, 12181, 29897, 13, 18884, 363, 926, 29887, 29892, 17167, 297, 26985, 29898, 28012, 29943, 1125, 13, 462, 1678, 396, 2158, 29898, 484, 29884, 29889, 12181, 29897, 308, 13, 462, 1678, 565, 926, 29887, 297, 343, 29887, 1929, 1417, 29901, 13, 462, 4706, 343, 29887, 1929, 1417, 29961, 1066, 29887, 1822, 4397, 29898, 484, 29884, 29961, 29900, 2314, 13, 462, 1678, 1683, 29901, 13, 462, 4706, 343, 29887, 1929, 1417, 29961, 1066, 29887, 29962, 353, 518, 484, 29884, 29961, 29900, 5262, 13, 13, 9651, 565, 4236, 29918, 705, 5861, 1275, 448, 29896, 29901, 13, 13, 18884, 363, 343, 29887, 1929, 1417, 29906, 297, 343, 29887, 1929, 1417, 29889, 5975, 7295, 13, 462, 1678, 4853, 29889, 5317, 29898, 3881, 29898, 29900, 29892, 7431, 29898, 4790, 1929, 1417, 29906, 8243, 343, 29887, 1929, 1417, 29906, 29897, 13, 9651, 1683, 29901, 13, 13, 18884, 565, 4236, 29918, 705, 5861, 529, 29871, 29896, 29901, 13, 13, 462, 1678, 1596, 877, 3317, 29918, 705, 5861, 1818, 367, 16600, 1135, 29871, 29900, 1495, 13, 13, 18884, 25342, 4236, 29918, 705, 5861, 1405, 7431, 29898, 4790, 1929, 1417, 29889, 5975, 580, 1125, 13, 13, 462, 1678, 1596, 877, 3317, 29918, 705, 5861, 1818, 367, 5224, 1135, 3001, 18177, 310, 1833, 7546, 1495, 13, 13, 18884, 1683, 29901, 13, 13, 462, 1678, 343, 29887, 1929, 1417, 29941, 353, 5159, 13, 462, 268, 13, 462, 1678, 396, 402, 1691, 278, 18177, 393, 505, 3939, 278, 1556, 515, 6763, 304, 1095, 29889, 13, 13, 462, 1678, 363, 343, 29875, 29892, 343, 29887, 1929, 1417, 29906, 297, 26985, 29898, 4790, 1929, 1417, 29889, 5975, 580, 1125, 13, 462, 4706, 263, 353, 6425, 29898, 4790, 1929, 1417, 29961, 25675, 3816, 29900, 29962, 448, 343, 29887, 1929, 1417, 29961, 25675, 3816, 29899, 29896, 2314, 13, 462, 4706, 396, 2158, 29898, 4790, 1929, 1417, 29961, 25675, 3816, 29900, 1402, 263, 29897, 13, 462, 4706, 343, 29887, 1929, 1417, 29941, 29889, 4397, 4197, 4790, 1929, 1417, 29906, 29892, 263, 2314, 13, 13, 462, 1678, 363, 343, 29887, 1929, 1417, 29946, 297, 12705, 29898, 4790, 1929, 1417, 29941, 29892, 1820, 29922, 2892, 260, 786, 791, 29901, 448, 29896, 29930, 29873, 786, 791, 29961, 29896, 2314, 29961, 29900, 29901, 3317, 29918, 705, 5861, 5387, 13, 462, 4706, 396, 2158, 29898, 4790, 1929, 1417, 29946, 29897, 13, 462, 4706, 14770, 29889, 5317, 29898, 3881, 29898, 29900, 29892, 7431, 29898, 4790, 1929, 1417, 29946, 29961, 29900, 2314, 511, 343, 29887, 1929, 1417, 29946, 29961, 29900, 2314, 13, 13, 9651, 4853, 29889, 842, 29898, 29916, 1643, 2433, 29923, 1129, 305, 742, 343, 1643, 2433, 22676, 742, 3611, 2433, 8897, 7546, 18177, 491, 21502, 305, 1495, 13, 9651, 4853, 29889, 7720, 580, 13, 13, 9651, 14770, 29889, 4294, 580, 13, 13, 4706, 1683, 29901, 13, 9651, 1596, 877, 1168, 29894, 6779, 4744, 4464, 1818, 367, 3233, 29871, 29906, 470, 6133, 1495, 2 ]
src/iert/router.py
IERT-Prayagraj/iert_django_webapp
0
121660
<reponame>IERT-Prayagraj/iert_django_webapp<gh_stars>0 from iert_news.api.viewsets import newViewset from rest_framework import
[ 1, 529, 276, 1112, 420, 29958, 29902, 20161, 29899, 29925, 764, 351, 10665, 29914, 3722, 29918, 14095, 29918, 2676, 932, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 474, 814, 29918, 15753, 29889, 2754, 29889, 1493, 7224, 1053, 716, 1043, 842, 13, 3166, 1791, 29918, 4468, 1053, 29871, 13, 2 ]
about.py
astrid-project/cubebeat
1
175524
title = 'Cubebeat' version = '1.1.0' description = ''
[ 1, 3611, 353, 525, 29907, 431, 774, 29872, 271, 29915, 13, 3259, 353, 525, 29896, 29889, 29896, 29889, 29900, 29915, 13, 8216, 353, 6629, 13, 2 ]
print_numbers.py
sonmezbaris/python-exercises
0
151404
#Prints the number in matrix form def print_numbers(number): for i in range(1,number+1): for j in range(1, number+1): print(i,end=" ") print() number=int(input("please enter a number: ")) if number%2==0: print_numbers(number+1) else: print_numbers(number-1)
[ 1, 29871, 13, 29937, 4040, 9466, 278, 1353, 297, 4636, 883, 13, 1753, 1596, 29918, 20326, 29898, 4537, 1125, 13, 1678, 363, 474, 297, 3464, 29898, 29896, 29892, 4537, 29974, 29896, 1125, 13, 4706, 363, 432, 297, 3464, 29898, 29896, 29892, 1353, 29974, 29896, 1125, 13, 9651, 1596, 29898, 29875, 29892, 355, 543, 16521, 29871, 13, 4706, 1596, 580, 13, 13, 13, 4537, 29922, 524, 29898, 2080, 703, 552, 559, 3896, 263, 1353, 29901, 376, 876, 13, 13, 361, 1353, 29995, 29906, 1360, 29900, 29901, 13, 1678, 1596, 29918, 20326, 29898, 4537, 29974, 29896, 29897, 13, 2870, 29901, 13, 1678, 1596, 29918, 20326, 29898, 4537, 29899, 29896, 29897, 13, 13, 13, 2 ]
main.py
cryos/qmicroscope
0
110099
<reponame>cryos/qmicroscope import sys from qtpy.QtCore import ( QPoint, QSettings, QSize, ) from qtpy.QtWidgets import ( QCheckBox, QLineEdit, QPushButton, QApplication, QVBoxLayout, QHBoxLayout, QFormLayout, QSpinBox, QMainWindow, QWidget, ) from microscope.microscope import Microscope from microscope.container import Container from microscope.settings import Settings class Form(QMainWindow): def __init__(self, parent=None): super(Form, self).__init__(parent) # Create widgets self.setWindowTitle("NSLS-II Microscope Widget") self.container = Container(self) self.container.count = 3 self.container.size = [2, 2] self.microscope = self.container.microscope(0) #self.microscope = Microscope(self) self.startButton = QPushButton('Start') self.settingsButton = QPushButton('Settings') # Create layout and add widgets layout = QVBoxLayout() layout.addWidget(self.container) hButtonBox = QHBoxLayout() hButtonBox.addStretch() hButtonBox.addWidget(self.startButton) hButtonBox.addWidget(self.settingsButton) hButtonBox.addStretch() layout.addLayout(hButtonBox) # Set main windows widget using our central layout widget = QWidget() widget.setLayout(layout) self.setCentralWidget(widget) # Add button signal to slot to start/stop self.startButton.clicked.connect(self.startButtonPressed) self.settingsButton.clicked.connect(self.settingsButtonClicked) # Connect to the microscope ROI clicked signal self.microscope.roiClicked.connect(self.onRoiClicked) # Read the settings and persist them settings = QSettings() self.readSettings(settings) self.settingsDialog = Settings(self) self.settingsDialog.setContainer(self.container) # event : QCloseEvent def closeEvent(self, event): settings = QSettings() self.writeSettings(settings) event.accept() def startButtonPressed(self): # Currently being a little lame - only update state on start/stop. print('Button pressed!', self.startButton.text()) if self.startButton.text() == 'Start': self.container.start(True) self.startButton.setText('Stop') else: self.container.start(False) self.startButton.setText('Start') def settingsButtonClicked(self): # Open the settings dialog. self.settingsDialog.show() def onRoiClicked(self, x, y): print(f'ROI: {x}, {y}') def readSettings(self, settings): """ Load the application's settings. """ settings.beginGroup('MainWindow') self.resize(settings.value('size', QSize(400, 400))) self.move(settings.value('pos', QPoint(200, 200))) self.container.readSettings(settings) settings.endGroup() def writeSettings(self, settings): """ Save the applications's settings persistently. """ settings.beginGroup('MainWindow') settings.setValue('size', self.size()) settings.setValue('pos', self.pos()) self.container.writeSettings(settings) settings.endGroup() if __name__ == '__main__': # Set up some application basics for saving settings QApplication.setOrganizationName('BNL') QApplication.setOrganizationDomain('bnl.gov') QApplication.setApplicationName('QCamera') # Create the Qt Application app = QApplication(sys.argv) # Create and show the form form = Form() form.show() # Run the main Qt loop sys.exit(app.exec_())
[ 1, 529, 276, 1112, 420, 29958, 29883, 719, 359, 29914, 29939, 13076, 1883, 4338, 13, 5215, 10876, 13, 13, 3166, 3855, 29873, 2272, 29889, 17303, 9203, 1053, 313, 13, 1678, 660, 5228, 29892, 13, 1678, 660, 9585, 29892, 13, 1678, 660, 3505, 29892, 13, 29897, 13, 13, 3166, 3855, 29873, 2272, 29889, 17303, 8801, 29879, 1053, 313, 13, 1678, 660, 28360, 29892, 13, 1678, 660, 3542, 6103, 29892, 13, 1678, 660, 27031, 3125, 29892, 13, 1678, 660, 4873, 29892, 13, 1678, 660, 29963, 3313, 3453, 29892, 13, 1678, 660, 29950, 3313, 3453, 29892, 13, 1678, 660, 2500, 3453, 29892, 13, 1678, 660, 5592, 262, 3313, 29892, 13, 1678, 660, 6330, 5907, 29892, 13, 1678, 660, 8801, 29892, 13, 29897, 13, 13, 3166, 20710, 1883, 4338, 29889, 13076, 1883, 4338, 1053, 20279, 1883, 4338, 13, 3166, 20710, 1883, 4338, 29889, 7611, 1053, 21679, 13, 3166, 20710, 1883, 4338, 29889, 11027, 1053, 19215, 13, 13, 1990, 3812, 29898, 29984, 6330, 5907, 1125, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 3847, 29922, 8516, 1125, 13, 4706, 2428, 29898, 2500, 29892, 1583, 467, 1649, 2344, 12035, 3560, 29897, 13, 4706, 396, 6204, 11109, 29879, 13, 4706, 1583, 29889, 842, 5907, 7030, 703, 3059, 8547, 29899, 2687, 20279, 1883, 4338, 27080, 1159, 13, 4706, 1583, 29889, 7611, 353, 21679, 29898, 1311, 29897, 13, 4706, 1583, 29889, 7611, 29889, 2798, 353, 29871, 29941, 13, 4706, 1583, 29889, 7611, 29889, 2311, 353, 518, 29906, 29892, 29871, 29906, 29962, 13, 4706, 1583, 29889, 13076, 1883, 4338, 353, 1583, 29889, 7611, 29889, 13076, 1883, 4338, 29898, 29900, 29897, 13, 4706, 396, 1311, 29889, 13076, 1883, 4338, 353, 20279, 1883, 4338, 29898, 1311, 29897, 13, 13, 4706, 1583, 29889, 2962, 3125, 353, 660, 27031, 3125, 877, 4763, 1495, 13, 4706, 1583, 29889, 11027, 3125, 353, 660, 27031, 3125, 877, 9585, 1495, 13, 13, 4706, 396, 6204, 5912, 322, 788, 11109, 29879, 13, 4706, 5912, 353, 660, 29963, 3313, 3453, 580, 13, 4706, 5912, 29889, 1202, 8801, 29898, 1311, 29889, 7611, 29897, 13, 4706, 298, 3125, 3313, 353, 660, 29950, 3313, 3453, 580, 13, 4706, 298, 3125, 3313, 29889, 1202, 855, 10301, 580, 13, 4706, 298, 3125, 3313, 29889, 1202, 8801, 29898, 1311, 29889, 2962, 3125, 29897, 13, 4706, 298, 3125, 3313, 29889, 1202, 8801, 29898, 1311, 29889, 11027, 3125, 29897, 13, 4706, 298, 3125, 3313, 29889, 1202, 855, 10301, 580, 13, 4706, 5912, 29889, 1202, 3453, 29898, 29882, 3125, 3313, 29897, 13, 13, 4706, 396, 3789, 1667, 5417, 11109, 773, 1749, 6555, 5912, 13, 4706, 11109, 353, 660, 8801, 580, 13, 4706, 11109, 29889, 842, 3453, 29898, 2680, 29897, 13, 4706, 1583, 29889, 842, 23369, 1705, 8801, 29898, 8030, 29897, 13, 13, 4706, 396, 3462, 2826, 7182, 304, 21497, 304, 1369, 29914, 9847, 13, 4706, 1583, 29889, 2962, 3125, 29889, 3808, 287, 29889, 6915, 29898, 1311, 29889, 2962, 3125, 24104, 29897, 13, 4706, 1583, 29889, 11027, 3125, 29889, 3808, 287, 29889, 6915, 29898, 1311, 29889, 11027, 3125, 4164, 287, 29897, 13, 13, 4706, 396, 14971, 304, 278, 20710, 1883, 4338, 16641, 29902, 11484, 7182, 13, 4706, 1583, 29889, 13076, 1883, 4338, 29889, 307, 29875, 4164, 287, 29889, 6915, 29898, 1311, 29889, 265, 29934, 7768, 4164, 287, 29897, 13, 13, 4706, 396, 7523, 278, 6055, 322, 24379, 963, 13, 4706, 6055, 353, 660, 9585, 580, 13, 4706, 1583, 29889, 949, 9585, 29898, 11027, 29897, 13, 13, 4706, 1583, 29889, 11027, 7647, 353, 19215, 29898, 1311, 29897, 13, 4706, 1583, 29889, 11027, 7647, 29889, 842, 7895, 29898, 1311, 29889, 7611, 29897, 13, 13, 1678, 396, 1741, 584, 660, 11123, 2624, 13, 1678, 822, 3802, 2624, 29898, 1311, 29892, 1741, 1125, 13, 4706, 6055, 353, 660, 9585, 580, 13, 4706, 1583, 29889, 3539, 9585, 29898, 11027, 29897, 13, 4706, 1741, 29889, 16044, 580, 13, 13, 1678, 822, 1369, 3125, 24104, 29898, 1311, 1125, 13, 4706, 396, 15447, 1641, 263, 2217, 301, 420, 448, 871, 2767, 2106, 373, 1369, 29914, 9847, 29889, 13, 4706, 1596, 877, 3125, 15385, 29991, 742, 1583, 29889, 2962, 3125, 29889, 726, 3101, 13, 4706, 565, 1583, 29889, 2962, 3125, 29889, 726, 580, 1275, 525, 4763, 2396, 13, 9651, 1583, 29889, 7611, 29889, 2962, 29898, 5574, 29897, 13, 9651, 1583, 29889, 2962, 3125, 29889, 12038, 877, 16329, 1495, 13, 4706, 1683, 29901, 13, 9651, 1583, 29889, 7611, 29889, 2962, 29898, 8824, 29897, 13, 9651, 1583, 29889, 2962, 3125, 29889, 12038, 877, 4763, 1495, 13, 13, 1678, 822, 6055, 3125, 4164, 287, 29898, 1311, 1125, 13, 4706, 396, 4673, 278, 6055, 7928, 29889, 13, 4706, 1583, 29889, 11027, 7647, 29889, 4294, 580, 13, 13, 1678, 822, 373, 29934, 7768, 4164, 287, 29898, 1311, 29892, 921, 29892, 343, 1125, 13, 4706, 1596, 29898, 29888, 29915, 1672, 29902, 29901, 426, 29916, 1118, 426, 29891, 29913, 1495, 13, 13, 1678, 822, 1303, 9585, 29898, 1311, 29892, 6055, 1125, 13, 4706, 9995, 16012, 278, 2280, 29915, 29879, 6055, 29889, 9995, 13, 4706, 6055, 29889, 463, 4782, 877, 6330, 5907, 1495, 13, 4706, 1583, 29889, 21476, 29898, 11027, 29889, 1767, 877, 2311, 742, 660, 3505, 29898, 29946, 29900, 29900, 29892, 29871, 29946, 29900, 29900, 4961, 13, 4706, 1583, 29889, 11631, 29898, 11027, 29889, 1767, 877, 1066, 742, 660, 5228, 29898, 29906, 29900, 29900, 29892, 29871, 29906, 29900, 29900, 4961, 13, 4706, 1583, 29889, 7611, 29889, 949, 9585, 29898, 11027, 29897, 13, 4706, 6055, 29889, 355, 4782, 580, 13, 13, 1678, 822, 2436, 9585, 29898, 1311, 29892, 6055, 1125, 13, 4706, 9995, 16913, 278, 8324, 29915, 29879, 6055, 24379, 2705, 29889, 9995, 13, 4706, 6055, 29889, 463, 4782, 877, 6330, 5907, 1495, 13, 4706, 6055, 29889, 842, 1917, 877, 2311, 742, 1583, 29889, 2311, 3101, 13, 4706, 6055, 29889, 842, 1917, 877, 1066, 742, 1583, 29889, 1066, 3101, 13, 4706, 1583, 29889, 7611, 29889, 3539, 9585, 29898, 11027, 29897, 13, 4706, 6055, 29889, 355, 4782, 580, 13, 13, 13, 361, 4770, 978, 1649, 1275, 525, 1649, 3396, 1649, 2396, 13, 1678, 396, 3789, 701, 777, 2280, 2362, 1199, 363, 14238, 6055, 13, 1678, 660, 4873, 29889, 842, 27356, 2133, 1170, 877, 29933, 25103, 1495, 13, 1678, 660, 4873, 29889, 842, 27356, 2133, 15951, 877, 11197, 29880, 29889, 13513, 1495, 13, 1678, 660, 4873, 29889, 842, 4873, 1170, 877, 29984, 20717, 1495, 13, 13, 1678, 396, 6204, 278, 14705, 8427, 13, 1678, 623, 353, 660, 4873, 29898, 9675, 29889, 19218, 29897, 13, 13, 1678, 396, 6204, 322, 1510, 278, 883, 13, 1678, 883, 353, 3812, 580, 13, 1678, 883, 29889, 4294, 580, 13, 13, 1678, 396, 7525, 278, 1667, 14705, 2425, 13, 1678, 10876, 29889, 13322, 29898, 932, 29889, 4258, 29918, 3101, 13, 2 ]
examples/scoring/energy_gbsa/run.py
JonnyWideFoot/pd.arcus
0
175320
<gh_stars>0 from pd import * cseed(4) info() timer() ffps = FFParamSet() ffps.readLib("amber03aa.ff") ## test simple loading of PDB file sim = PDB_In(ffps, "trpcage.pdb"); sim.loadAll(); # create workspace from the system sim wspace = WorkSpace( sim ) # print loaded system - this can be compared later wspace.printPDB("inout.pdb") # create a few common forcefield components ff = Forcefield(wspace) bonds = BondedForcefield(wspace) gb = GB_Still( wspace) gb.Cutoff = 12.0 gb.InnerCutoff = 9.0 gb.FastMode = 1 sasa = SASA_LCPO( wspace ) sasa.GlobalASP = 0.005 ## add all the forcefield components to our forcefield ff.add( bonds ) ff.add( gb ) ff.add( sasa ) ## print energies as summary ff.printEnergySummary() ## and dy detail (useful for when things DO break) ff.printEnergyByAtom() ## also show parameters ff.info()
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 10518, 1053, 334, 13, 29883, 26776, 29898, 29946, 29897, 13, 3888, 580, 13, 20404, 580, 13, 13, 600, 567, 353, 21379, 4736, 2697, 580, 13, 600, 567, 29889, 949, 14868, 703, 314, 495, 29900, 29941, 7340, 29889, 600, 1159, 13, 13, 2277, 1243, 2560, 8363, 310, 349, 4051, 934, 13, 3601, 353, 349, 4051, 29918, 797, 29898, 600, 567, 29892, 376, 509, 6739, 482, 29889, 29886, 2585, 1496, 13, 3601, 29889, 1359, 3596, 890, 13, 13, 29937, 1653, 664, 3493, 515, 278, 1788, 1027, 13, 29893, 3493, 353, 5244, 14936, 29898, 1027, 1723, 13, 13, 29937, 1596, 7500, 1788, 448, 445, 508, 367, 9401, 2678, 13, 29893, 3493, 29889, 2158, 29925, 4051, 703, 262, 449, 29889, 29886, 2585, 1159, 13, 13, 29937, 1653, 263, 2846, 3619, 4889, 2671, 7117, 13, 13, 600, 353, 11004, 2671, 29898, 29893, 3493, 29897, 13, 29890, 13788, 353, 26370, 287, 2831, 346, 2671, 29898, 29893, 3493, 29897, 13, 26300, 1678, 353, 19289, 29918, 855, 453, 29898, 281, 3493, 29897, 13, 26300, 29889, 29907, 329, 2696, 353, 29871, 29896, 29906, 29889, 29900, 13, 26300, 29889, 27748, 29907, 329, 2696, 353, 259, 29929, 29889, 29900, 13, 26300, 29889, 29943, 579, 6818, 353, 29871, 29896, 13, 29879, 11290, 29871, 353, 317, 3289, 29909, 29918, 29931, 6271, 29949, 29898, 281, 3493, 1723, 13, 29879, 11290, 29889, 12756, 3289, 29925, 353, 29871, 29900, 29889, 29900, 29900, 29945, 13, 13, 2277, 788, 599, 278, 4889, 2671, 7117, 304, 1749, 4889, 2671, 13, 600, 29889, 1202, 29898, 289, 13788, 1723, 13, 600, 29889, 1202, 29898, 330, 29890, 1723, 13, 600, 29889, 1202, 29898, 269, 11290, 1723, 13, 13, 2277, 1596, 18190, 583, 408, 15837, 13, 600, 29889, 2158, 29923, 1089, 1927, 26289, 580, 13, 13, 2277, 322, 13475, 9493, 313, 1509, 1319, 363, 746, 2712, 11662, 2867, 29897, 13, 600, 29889, 2158, 29923, 1089, 1927, 2059, 4178, 290, 580, 13, 13, 2277, 884, 1510, 4128, 13, 600, 29889, 3888, 580, 13, 13, 13, 2 ]
library/python/stu/maya/__init__.py
smiletechnologyunited/seminar_sample
3
1611143
<reponame>smiletechnologyunited/seminar_sample<gh_stars>1-10 #!/usr/bin/env python # coding=utf-8 from __future__ import absolute_import, division, print_function import maya.mel def _escape(msg): m = msg m = m.replace(u"\n", u"\\n") m = m.replace(u"\t", u"\\t") return m.replace(u"\"", u"'") def error(msg): try: maya.mel.eval(u"error(\"{0}\")".format(_escape(msg))) except Exception: pass
[ 1, 529, 276, 1112, 420, 29958, 3844, 488, 21695, 3002, 348, 1573, 29914, 12846, 18220, 29918, 11249, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 30143, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 14137, 29922, 9420, 29899, 29947, 13, 13, 3166, 4770, 29888, 9130, 1649, 1053, 8380, 29918, 5215, 29892, 8542, 29892, 1596, 29918, 2220, 13, 13, 5215, 1122, 29874, 29889, 12873, 13, 13, 13, 1753, 903, 21587, 29898, 7645, 1125, 13, 1678, 286, 353, 10191, 13, 1678, 286, 353, 286, 29889, 6506, 29898, 29884, 26732, 29876, 613, 318, 29908, 1966, 29876, 1159, 13, 1678, 286, 353, 286, 29889, 6506, 29898, 29884, 26732, 29873, 613, 318, 29908, 1966, 29873, 1159, 13, 1678, 736, 286, 29889, 6506, 29898, 29884, 29908, 5931, 613, 318, 29908, 29915, 1159, 13, 13, 13, 1753, 1059, 29898, 7645, 1125, 13, 1678, 1018, 29901, 13, 4706, 1122, 29874, 29889, 12873, 29889, 14513, 29898, 29884, 29908, 2704, 1194, 29908, 29912, 29900, 1012, 1159, 1642, 4830, 7373, 21587, 29898, 7645, 4961, 13, 1678, 5174, 8960, 29901, 13, 4706, 1209, 13, 2 ]
webserver/contest/context_processors.py
theSage21/judge-interface
3
29864
<gh_stars>1-10 from contest import models from django.utils import timezone from contest.functions import is_contest_on, contest_phase def contest_time(request): context = {} now = timezone.now() contest = models.ContestControl.objects.first() if now < contest.start: time = contest.start elif contest.start <= now <= contest.end: time = contest.end else: time = None context['contest_time'] = time context['contest_on'] = is_contest_on() context['contest_phase'] = contest_phase() return context
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 3166, 17793, 1053, 4733, 13, 3166, 9557, 29889, 13239, 1053, 29431, 13, 3166, 17793, 29889, 12171, 1053, 338, 29918, 1285, 342, 29918, 265, 29892, 17793, 29918, 21646, 13, 13, 13, 1753, 17793, 29918, 2230, 29898, 3827, 1125, 13, 1678, 3030, 353, 6571, 13, 1678, 1286, 353, 29431, 29889, 3707, 580, 13, 1678, 17793, 353, 4733, 29889, 1323, 342, 4809, 29889, 12650, 29889, 4102, 580, 13, 1678, 565, 1286, 529, 17793, 29889, 2962, 29901, 13, 4706, 931, 353, 17793, 29889, 2962, 13, 1678, 25342, 17793, 29889, 2962, 5277, 1286, 5277, 17793, 29889, 355, 29901, 13, 4706, 931, 353, 17793, 29889, 355, 13, 1678, 1683, 29901, 13, 4706, 931, 353, 6213, 13, 1678, 3030, 1839, 1285, 342, 29918, 2230, 2033, 353, 931, 13, 1678, 3030, 1839, 1285, 342, 29918, 265, 2033, 353, 338, 29918, 1285, 342, 29918, 265, 580, 13, 1678, 3030, 1839, 1285, 342, 29918, 21646, 2033, 353, 17793, 29918, 21646, 580, 13, 1678, 736, 3030, 13, 2 ]
hazelcast/metrics.py
tonytheonlypony/hazelcast-python-client
0
193477
import zlib from hazelcast.serialization import ( BYTE_SIZE_IN_BYTES, CHAR_SIZE_IN_BYTES, BE_UINT16, DOUBLE_SIZE_IN_BYTES, BE_DOUBLE, INT_SIZE_IN_BYTES, BE_INT, LONG_SIZE_IN_BYTES, BE_LONG, BE_UINT8, ) _MASK_PREFIX = 1 _MASK_METRIC = 1 << 1 _MASK_DISCRIMINATOR = 1 << 2 _MASK_DISCRIMINATOR_VALUE = 1 << 3 _MASK_UNIT = 1 << 4 _MASK_EXCLUDED_TARGETS = 1 << 5 _MASK_TAG_COUNT = 1 << 6 _NULL_DICTIONARY_ID = -1 _NULL_UNIT = -1 _MAX_WORD_LENGTH = 255 _BITS_IN_BYTE = 8 _BYTE_MASK = 0xFF _BINARY_FORMAT_VERSION = 1 _SIZE_VERSION = 2 _SIZE_DICTIONARY_BLOB = 4 _SIZE_COUNT_METRICS = 4 _OUTPUT_BUFFER_INITIAL_SIZE = 1024 _OUTPUT_BUFFER_GROW_FACTOR = 1.2 class MetricDescriptor(object): """Describes a metric to be sent to the members. It is a simplified version of the Java's MetricDescriptorImpl, sufficient for the needs of the Python client. """ __slots__ = ("prefix", "metric", "discriminator", "discriminator_value", "unit") def __init__( self, metric, prefix=None, discriminator=None, discriminator_value=None, unit=None ): self.metric = metric """str: Name of the metric.""" self.prefix = prefix """str: Prefix of the metric.""" self.discriminator = discriminator """str: Discriminator for the metrics that have the same name and prefix.""" self.discriminator_value = discriminator_value """str: Tag of the discriminator.""" self.unit = unit """ProbeUnit: Unit of the metric.""" class ProbeUnit(object): """Measurement unit of a probe. The values of the constants below should be in sync with the ProbeUnit enum in Java. """ BYTES = 0 """Size or counter represented in bytes.""" MS = 1 """Timestamp or duration represented in milliseconds.""" NS = 2 """Timestamp or duration represented in nanoseconds.""" PERCENT = 3 """An integer mostly in range 0..100 or a double mostly in range 0..1.""" COUNT = 4 """Number of items: size, counter...""" BOOLEAN = 5 """0 or 1.""" ENUM = 6 """0..n, ordinal of an enum.""" # New enum values should be converted to a tag to ensure backward # compatibility during compressing the metrics. see ProbeUnit#newUnit # handling in Java for that. We don't implement this functionality yet in # the Python client, as we don't use such enum members. class ValueType(object): """Type of the metric values. The values of the constants below should be in sync ValueType enum in Java. """ LONG = 0 DOUBLE = 1 class MetricsCompressor(object): """Compresses metrics into a ``bytearray`` blob. The compressor uses dictionary based delta compression and deflates the resulting ``bytearray`` by using ``zlib.compress()``. This compressor doesn't use the textual representation of the :class:`MetricDescriptor` hence it is agnostic to the order of the tags in that representation. Adding metrics by calling :func:`add_long` or :func:`add_double` builds a dictionary by mapping all words found in the passed :class:`MetricDescriptor`s to ``int``s and these ``int``s will be written to the resulting ``bytearray`` blob. Before these ``int``s are written, the current :class:`MetricDescriptor` is compared to the previous one and only the fields of the descriptor that are different from the previous will be written to the metrics blob. When the blob is retrieved from this compressor (when the metrics collection cycle finishes) the dictionary is stored in the dictionary blob. The compressor iterates over the words stored in the dictionary in ascending order and writes them to the blob by skipping the first N characters that are equal to the first N character of the previously written word, hence using delta compression here too. After both the metrics and the dictionary blob is constructed, they are copied into a final blob in the following structure: +--------------------------------+--------------------+ | Compressor version | 2 bytes (short) | +--------------------------------+--------------------+ | Size of dictionary blob | 4 bytes (int) | +--------------------------------+--------------------+ | Dictionary blob | variable size | +--------------------------------+--------------------+ | Number of metrics in the blob | 4 bytes (int) | +--------------------------------+--------------------+ | Metrics blob | variable size | +--------------------------------+--------------------+ """ __slots__ = ("_metrics_buf", "_dict_buf", "_metrics_dict", "_metrics_count", "_last_descriptor") def __init__(self): self._metrics_buf = _OutputBuffer() self._dict_buf = _OutputBuffer() self._metrics_dict = _MetricsDictionary() self._metrics_count = 0 self._last_descriptor = None def add_long(self, descriptor, value): self._write_descriptor(descriptor) self._metrics_buf.write_byte(ValueType.LONG) self._metrics_buf.write_long(value) def add_double(self, descriptor, value): self._write_descriptor(descriptor) self._metrics_buf.write_byte(ValueType.DOUBLE) self._metrics_buf.write_double(value) def generate_blob(self): self._write_metrics_dict() metrics_buf = self._metrics_buf.compress() dict_buf = self._dict_buf.compress() complete_size = ( _SIZE_VERSION + _SIZE_DICTIONARY_BLOB + len(dict_buf) + _SIZE_COUNT_METRICS + len(metrics_buf) ) final_buf = _OutputBuffer(complete_size) final_buf.write_byte((_BINARY_FORMAT_VERSION >> _BITS_IN_BYTE) & _BYTE_MASK) final_buf.write_byte(_BINARY_FORMAT_VERSION & _BYTE_MASK) final_buf.write_int(len(dict_buf)) final_buf.write_bytearray(dict_buf) final_buf.write_int(self._metrics_count) final_buf.write_bytearray(metrics_buf) return final_buf.to_bytearray() def _write_descriptor(self, descriptor): mask = self._calculate_descriptor_mask(descriptor) self._metrics_buf.write_byte(mask) # Only write to metrics buffer if the values below are # different than the values of the previous descriptor if mask & _MASK_PREFIX == 0: self._metrics_buf.write_int(self._get_dict_id(descriptor.prefix)) if mask & _MASK_METRIC == 0: self._metrics_buf.write_int(self._get_dict_id(descriptor.metric)) if mask & _MASK_DISCRIMINATOR == 0: self._metrics_buf.write_int(self._get_dict_id(descriptor.discriminator)) if mask & _MASK_DISCRIMINATOR_VALUE == 0: self._metrics_buf.write_int(self._get_dict_id(descriptor.discriminator_value)) if mask & _MASK_UNIT == 0: if descriptor.unit is None: self._metrics_buf.write_byte(_NULL_UNIT) else: self._metrics_buf.write_byte(descriptor.unit) # include excludedTargets and tags bytes for compatibility purposes if mask & _MASK_EXCLUDED_TARGETS == 0: self._metrics_buf.write_byte(0) if mask & _MASK_TAG_COUNT == 0: self._metrics_buf.write_byte(0) self._metrics_count += 1 self._last_descriptor = descriptor def _calculate_descriptor_mask(self, descriptor): mask = 0 if not self._last_descriptor: return mask last_descriptor = self._last_descriptor if descriptor.prefix == last_descriptor.prefix: mask |= _MASK_PREFIX if descriptor.metric == last_descriptor.metric: mask |= _MASK_METRIC if descriptor.discriminator == last_descriptor.discriminator: mask |= _MASK_DISCRIMINATOR if descriptor.discriminator_value == last_descriptor.discriminator_value: mask |= _MASK_DISCRIMINATOR_VALUE if descriptor.unit == last_descriptor.unit: mask |= _MASK_UNIT # include excludedTargets and tags bits for compatibility purposes mask |= _MASK_EXCLUDED_TARGETS mask |= _MASK_TAG_COUNT return mask def _get_dict_id(self, word): if not word: return _NULL_DICTIONARY_ID return self._metrics_dict.get_dict_id(word) def _write_metrics_dict(self): words = self._metrics_dict.get_words() self._dict_buf.write_int(len(words)) last_word_text = "" for word in words: word_text = word.word max_common_len = min(len(last_word_text), len(word_text)) common_len = 0 while ( common_len < max_common_len and word_text[common_len] == last_word_text[common_len] ): common_len += 1 diff_len = len(word_text) - common_len self._dict_buf.write_int(word.dict_id) self._dict_buf.write_byte(common_len) self._dict_buf.write_byte(diff_len) for i in range(common_len, len(word_text)): self._dict_buf.write_char(word_text[i]) last_word_text = word_text class _OutputBuffer(object): __slots__ = ("_buf", "_pos") def __init__(self, size=None): self._buf = bytearray(size or _OUTPUT_BUFFER_INITIAL_SIZE) self._pos = 0 def to_bytearray(self): if self._pos == len(self._buf): return self._buf return self._buf[: self._pos] def write_bytearray(self, buf): n = len(buf) self._ensure_available(n) self._buf[self._pos : self._pos + n] = buf self._pos += n def write_byte(self, value): self._ensure_available(BYTE_SIZE_IN_BYTES) BE_UINT8.pack_into(self._buf, self._pos, value & _BYTE_MASK) self._pos += BYTE_SIZE_IN_BYTES def write_char(self, value): self._ensure_available(CHAR_SIZE_IN_BYTES) BE_UINT16.pack_into(self._buf, self._pos, ord(value)) self._pos += CHAR_SIZE_IN_BYTES def write_double(self, value): self._ensure_available(DOUBLE_SIZE_IN_BYTES) BE_DOUBLE.pack_into(self._buf, self._pos, value) self._pos += DOUBLE_SIZE_IN_BYTES def write_int(self, value): self._ensure_available(INT_SIZE_IN_BYTES) BE_INT.pack_into(self._buf, self._pos, value) self._pos += INT_SIZE_IN_BYTES def write_long(self, value): self._ensure_available(LONG_SIZE_IN_BYTES) BE_LONG.pack_into(self._buf, self._pos, value) self._pos += LONG_SIZE_IN_BYTES def compress(self): buf = self.to_bytearray() # Set level to 1 for best speed (less CPU overhead) return zlib.compress(buf, 1) def _ensure_available(self, size): if self._available() < size: # Grow memory more than needed new_size = int((self._pos + size) * _OUTPUT_BUFFER_GROW_FACTOR) if new_size % 2 != 0: new_size += 1 new_buf = bytearray(new_size) new_buf[: self._pos] = self._buf self._buf = new_buf def _available(self): return len(self._buf) - self._pos class _Word(object): __slots__ = ("word", "dict_id") def __init__(self, word, dict_id): self.word = word self.dict_id = dict_id class _MetricsDictionary(object): """Stores word -> id mappings. Used by :class:`MetricsCompressor`'s dictionary-based algorithm. """ __slots__ = ("_words",) def __init__(self): self._words = {} def get_dict_id(self, word_text): """Returns the dictionary id for the given word. If the word is not yet stored in the dictionary, the word gets stored and a newly assigned id is returned. Args: word_text (str): Textual representation of a word. Returns: int: The dictionary id. Raises: ValueError: If the length of the word cannot fit into unsigned byte range. """ if len(word_text) > _MAX_WORD_LENGTH: raise ValueError( "Too long value in the metric descriptor found, maximum is %s: %s" % (_MAX_WORD_LENGTH, word_text) ) word = self._words.get(word_text, None) if word: word_id = word.dict_id else: word_id = len(self._words) self._words[word_text] = _Word(word_text, word_id) return word_id def get_words(self): """Returns all stored word<->id mappings ordered by word. Returns: list[_Word]: Words. """ words = self._words.values() return sorted(words, key=lambda w: w.word)
[ 1, 1053, 503, 1982, 13, 13, 3166, 447, 10533, 4384, 29889, 15550, 2133, 1053, 313, 13, 1678, 6770, 4330, 29918, 14226, 29918, 1177, 29918, 22716, 29911, 2890, 29892, 13, 1678, 26871, 29918, 14226, 29918, 1177, 29918, 22716, 29911, 2890, 29892, 13, 1678, 20700, 29918, 29965, 10192, 29896, 29953, 29892, 13, 1678, 11662, 7466, 1307, 29918, 14226, 29918, 1177, 29918, 22716, 29911, 2890, 29892, 13, 1678, 20700, 29918, 3970, 7466, 1307, 29892, 13, 1678, 19578, 29918, 14226, 29918, 1177, 29918, 22716, 29911, 2890, 29892, 13, 1678, 20700, 29918, 10192, 29892, 13, 1678, 365, 20614, 29918, 14226, 29918, 1177, 29918, 22716, 29911, 2890, 29892, 13, 1678, 20700, 29918, 29931, 20614, 29892, 13, 1678, 20700, 29918, 29965, 10192, 29947, 29892, 13, 29897, 13, 13, 29918, 1529, 16033, 29918, 15094, 25634, 353, 29871, 29896, 13, 29918, 1529, 16033, 29918, 2303, 5659, 2965, 353, 29871, 29896, 3532, 29871, 29896, 13, 29918, 1529, 16033, 29918, 23711, 29907, 3960, 16173, 1299, 1955, 353, 29871, 29896, 3532, 29871, 29906, 13, 29918, 1529, 16033, 29918, 23711, 29907, 3960, 16173, 1299, 1955, 29918, 19143, 353, 29871, 29896, 3532, 29871, 29941, 13, 29918, 1529, 16033, 29918, 3904, 1806, 353, 29871, 29896, 3532, 29871, 29946, 13, 29918, 1529, 16033, 29918, 5746, 6154, 29965, 2287, 29928, 29918, 29911, 1718, 7194, 29903, 353, 29871, 29896, 3532, 29871, 29945, 13, 29918, 1529, 16033, 29918, 16881, 29918, 18736, 353, 29871, 29896, 3532, 29871, 29953, 13, 13, 29918, 10074, 29918, 4571, 9838, 19926, 29918, 1367, 353, 448, 29896, 13, 29918, 10074, 29918, 3904, 1806, 353, 448, 29896, 13, 29918, 12648, 29918, 17013, 29918, 19433, 353, 29871, 29906, 29945, 29945, 13, 13, 29918, 22698, 29903, 29918, 1177, 29918, 22716, 4330, 353, 29871, 29947, 13, 29918, 22716, 4330, 29918, 1529, 16033, 353, 29871, 29900, 29916, 4198, 13, 29918, 29933, 1177, 19926, 29918, 19094, 1299, 29918, 16358, 353, 29871, 29896, 13, 29918, 14226, 29918, 16358, 353, 29871, 29906, 13, 29918, 14226, 29918, 4571, 9838, 19926, 29918, 29933, 28902, 353, 29871, 29946, 13, 29918, 14226, 29918, 18736, 29918, 2303, 5659, 2965, 29903, 353, 29871, 29946, 13, 13, 29918, 12015, 12336, 29918, 7838, 28483, 29918, 26019, 25758, 29918, 14226, 353, 29871, 29896, 29900, 29906, 29946, 13, 29918, 12015, 12336, 29918, 7838, 28483, 29918, 29954, 25180, 29918, 4519, 1783, 1955, 353, 29871, 29896, 29889, 29906, 13, 13, 13, 1990, 4737, 2200, 19124, 29898, 3318, 1125, 13, 1678, 9995, 4002, 699, 5707, 263, 12714, 304, 367, 2665, 304, 278, 5144, 29889, 13, 13, 1678, 739, 338, 263, 20875, 1873, 310, 278, 3355, 29915, 29879, 4737, 2200, 19124, 6647, 29892, 8002, 13, 1678, 363, 278, 4225, 310, 278, 5132, 3132, 29889, 13, 1678, 9995, 13, 13, 1678, 4770, 2536, 1862, 1649, 353, 4852, 13506, 613, 376, 16414, 613, 376, 2218, 29883, 20386, 1061, 613, 376, 2218, 29883, 20386, 1061, 29918, 1767, 613, 376, 5441, 1159, 13, 13, 1678, 822, 4770, 2344, 12035, 13, 4706, 1583, 29892, 12714, 29892, 10944, 29922, 8516, 29892, 2313, 20386, 1061, 29922, 8516, 29892, 2313, 20386, 1061, 29918, 1767, 29922, 8516, 29892, 5190, 29922, 8516, 13, 268, 1125, 13, 4706, 1583, 29889, 16414, 353, 12714, 13, 4706, 9995, 710, 29901, 4408, 310, 278, 12714, 1213, 15945, 13, 13, 4706, 1583, 29889, 13506, 353, 10944, 13, 4706, 9995, 710, 29901, 349, 9569, 310, 278, 12714, 1213, 15945, 13, 13, 4706, 1583, 29889, 2218, 29883, 20386, 1061, 353, 2313, 20386, 1061, 13, 4706, 9995, 710, 29901, 8565, 20386, 1061, 363, 278, 21556, 393, 505, 278, 1021, 1024, 322, 10944, 1213, 15945, 13, 13, 4706, 1583, 29889, 2218, 29883, 20386, 1061, 29918, 1767, 353, 2313, 20386, 1061, 29918, 1767, 13, 4706, 9995, 710, 29901, 10522, 310, 278, 2313, 20386, 1061, 1213, 15945, 13, 13, 4706, 1583, 29889, 5441, 353, 5190, 13, 4706, 9995, 1184, 915, 8325, 29901, 13223, 310, 278, 12714, 1213, 15945, 13, 13, 13, 1990, 1019, 915, 8325, 29898, 3318, 1125, 13, 1678, 9995, 6816, 3745, 358, 5190, 310, 263, 410, 915, 29889, 13, 13, 1678, 450, 1819, 310, 278, 17727, 2400, 881, 367, 297, 16523, 411, 278, 1019, 915, 8325, 13, 1678, 14115, 297, 3355, 29889, 13, 1678, 9995, 13, 13, 1678, 6770, 29911, 2890, 353, 29871, 29900, 13, 1678, 9995, 3505, 470, 6795, 9875, 297, 6262, 1213, 15945, 13, 13, 1678, 10888, 353, 29871, 29896, 13, 1678, 9995, 27939, 470, 14385, 9875, 297, 3533, 21462, 1213, 15945, 13, 13, 1678, 3865, 353, 29871, 29906, 13, 1678, 9995, 27939, 470, 14385, 9875, 297, 23432, 852, 1116, 29879, 1213, 15945, 13, 13, 1678, 349, 1001, 29907, 3919, 353, 29871, 29941, 13, 1678, 9995, 2744, 6043, 11149, 297, 3464, 29871, 29900, 636, 29896, 29900, 29900, 470, 263, 3765, 11149, 297, 3464, 29871, 29900, 636, 29896, 1213, 15945, 13, 13, 1678, 21122, 353, 29871, 29946, 13, 1678, 9995, 4557, 310, 4452, 29901, 2159, 29892, 6795, 856, 15945, 29908, 13, 13, 1678, 16437, 29949, 1307, 2190, 353, 29871, 29945, 13, 1678, 9995, 29900, 470, 29871, 29896, 1213, 15945, 13, 13, 1678, 12524, 5005, 353, 29871, 29953, 13, 1678, 9995, 29900, 636, 29876, 29892, 4356, 979, 310, 385, 14115, 1213, 15945, 13, 13, 1678, 396, 1570, 14115, 1819, 881, 367, 11543, 304, 263, 4055, 304, 9801, 1250, 1328, 13, 1678, 396, 24521, 2645, 27122, 292, 278, 21556, 29889, 1074, 1019, 915, 8325, 29937, 1482, 8325, 13, 1678, 396, 11415, 297, 3355, 363, 393, 29889, 1334, 1016, 29915, 29873, 2334, 445, 9863, 3447, 297, 13, 1678, 396, 278, 5132, 3132, 29892, 408, 591, 1016, 29915, 29873, 671, 1316, 14115, 5144, 29889, 13, 13, 13, 1990, 7865, 1542, 29898, 3318, 1125, 13, 1678, 9995, 1542, 310, 278, 12714, 1819, 29889, 13, 13, 1678, 450, 1819, 310, 278, 17727, 2400, 881, 367, 297, 16523, 7865, 1542, 14115, 297, 3355, 29889, 13, 1678, 9995, 13, 13, 1678, 365, 20614, 353, 29871, 29900, 13, 1678, 11662, 7466, 1307, 353, 29871, 29896, 13, 13, 13, 1990, 4737, 10817, 1523, 2139, 272, 29898, 3318, 1125, 13, 1678, 9995, 1523, 2139, 267, 21556, 964, 263, 4954, 10389, 2378, 16159, 23755, 29889, 13, 13, 1678, 450, 27122, 272, 3913, 8600, 2729, 19471, 24221, 322, 822, 29880, 1078, 13, 1678, 278, 9819, 4954, 10389, 2378, 16159, 491, 773, 4954, 29920, 1982, 29889, 510, 2139, 2555, 1412, 910, 13, 1678, 27122, 272, 1838, 29915, 29873, 671, 278, 1426, 950, 8954, 310, 278, 13, 1678, 584, 1990, 18078, 10095, 2200, 19124, 29952, 8151, 372, 338, 946, 6582, 293, 304, 278, 1797, 310, 278, 13, 1678, 8282, 297, 393, 8954, 29889, 13, 13, 1678, 18804, 21556, 491, 5432, 584, 9891, 18078, 1202, 29918, 5426, 29952, 470, 584, 9891, 18078, 1202, 29918, 8896, 29952, 13, 1678, 23315, 263, 8600, 491, 10417, 599, 3838, 1476, 297, 278, 4502, 13, 1678, 584, 1990, 18078, 10095, 2200, 19124, 29952, 29879, 304, 4954, 524, 16159, 29879, 322, 1438, 4954, 524, 16159, 29879, 674, 367, 13, 1678, 3971, 304, 278, 9819, 4954, 10389, 2378, 16159, 23755, 29889, 10949, 1438, 4954, 524, 16159, 29879, 13, 1678, 526, 3971, 29892, 278, 1857, 584, 1990, 18078, 10095, 2200, 19124, 29952, 338, 9401, 304, 278, 13, 1678, 3517, 697, 322, 871, 278, 4235, 310, 278, 553, 11709, 393, 526, 1422, 13, 1678, 515, 278, 3517, 674, 367, 3971, 304, 278, 21556, 23755, 29889, 13, 13, 1678, 1932, 278, 23755, 338, 27387, 515, 445, 27122, 272, 313, 8256, 278, 21556, 13, 1678, 4333, 11412, 8341, 267, 29897, 278, 8600, 338, 6087, 297, 278, 8600, 13, 1678, 23755, 29889, 450, 27122, 272, 4256, 1078, 975, 278, 3838, 6087, 297, 278, 8600, 13, 1678, 297, 12066, 2548, 1797, 322, 15873, 963, 304, 278, 23755, 491, 14993, 3262, 278, 937, 13, 1678, 405, 4890, 393, 526, 5186, 304, 278, 937, 405, 2931, 310, 278, 9251, 13, 1678, 3971, 1734, 29892, 8151, 773, 19471, 24221, 1244, 2086, 29889, 13, 13, 1678, 2860, 1716, 278, 21556, 322, 278, 8600, 23755, 338, 13319, 29892, 896, 13, 1678, 526, 13746, 964, 263, 2186, 23755, 297, 278, 1494, 3829, 29901, 13, 13, 1678, 718, 2683, 2683, 29974, 2683, 27385, 13, 1678, 891, 422, 2139, 272, 1873, 632, 891, 1678, 29906, 6262, 313, 12759, 29897, 29871, 891, 13, 1678, 718, 2683, 2683, 29974, 2683, 27385, 13, 1678, 891, 21179, 310, 8600, 23755, 4706, 891, 1678, 29946, 6262, 313, 524, 29897, 1678, 891, 13, 1678, 718, 2683, 2683, 29974, 2683, 27385, 13, 1678, 891, 13343, 23755, 18884, 891, 259, 2286, 2159, 1678, 891, 13, 1678, 718, 2683, 2683, 29974, 2683, 27385, 13, 1678, 891, 9681, 310, 21556, 297, 278, 23755, 29871, 891, 1678, 29946, 6262, 313, 524, 29897, 1678, 891, 13, 1678, 718, 2683, 2683, 29974, 2683, 27385, 13, 1678, 891, 4737, 10817, 23755, 462, 259, 891, 259, 2286, 2159, 1678, 891, 13, 1678, 718, 2683, 2683, 29974, 2683, 27385, 13, 1678, 9995, 13, 13, 1678, 4770, 2536, 1862, 1649, 353, 4852, 29918, 2527, 10817, 29918, 9721, 613, 11119, 8977, 29918, 9721, 613, 11119, 2527, 10817, 29918, 8977, 613, 11119, 2527, 10817, 29918, 2798, 613, 11119, 4230, 29918, 2783, 11709, 1159, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 1125, 13, 4706, 1583, 3032, 2527, 10817, 29918, 9721, 353, 903, 6466, 7701, 580, 13, 4706, 1583, 3032, 8977, 29918, 9721, 353, 903, 6466, 7701, 580, 13, 4706, 1583, 3032, 2527, 10817, 29918, 8977, 353, 903, 10095, 10817, 11513, 580, 13, 4706, 1583, 3032, 2527, 10817, 29918, 2798, 353, 29871, 29900, 13, 4706, 1583, 3032, 4230, 29918, 2783, 11709, 353, 6213, 13, 13, 1678, 822, 788, 29918, 5426, 29898, 1311, 29892, 553, 11709, 29892, 995, 1125, 13, 4706, 1583, 3032, 3539, 29918, 2783, 11709, 29898, 2783, 11709, 29897, 13, 4706, 1583, 3032, 2527, 10817, 29918, 9721, 29889, 3539, 29918, 10389, 29898, 1917, 1542, 29889, 29931, 20614, 29897, 13, 4706, 1583, 3032, 2527, 10817, 29918, 9721, 29889, 3539, 29918, 5426, 29898, 1767, 29897, 13, 13, 1678, 822, 788, 29918, 8896, 29898, 1311, 29892, 553, 11709, 29892, 995, 1125, 13, 4706, 1583, 3032, 3539, 29918, 2783, 11709, 29898, 2783, 11709, 29897, 13, 4706, 1583, 3032, 2527, 10817, 29918, 9721, 29889, 3539, 29918, 10389, 29898, 1917, 1542, 29889, 3970, 7466, 1307, 29897, 13, 4706, 1583, 3032, 2527, 10817, 29918, 9721, 29889, 3539, 29918, 8896, 29898, 1767, 29897, 13, 13, 1678, 822, 5706, 29918, 10054, 29898, 1311, 1125, 13, 4706, 1583, 3032, 3539, 29918, 2527, 10817, 29918, 8977, 580, 13, 4706, 21556, 29918, 9721, 353, 1583, 3032, 2527, 10817, 29918, 9721, 29889, 510, 2139, 580, 13, 4706, 9657, 29918, 9721, 353, 1583, 3032, 8977, 29918, 9721, 29889, 510, 2139, 580, 13, 13, 4706, 4866, 29918, 2311, 353, 313, 13, 9651, 903, 14226, 29918, 16358, 13, 9651, 718, 903, 14226, 29918, 4571, 9838, 19926, 29918, 29933, 28902, 13, 9651, 718, 7431, 29898, 8977, 29918, 9721, 29897, 13, 9651, 718, 903, 14226, 29918, 18736, 29918, 2303, 5659, 2965, 29903, 13, 9651, 718, 7431, 29898, 2527, 10817, 29918, 9721, 29897, 13, 4706, 1723, 13, 4706, 2186, 29918, 9721, 353, 903, 6466, 7701, 29898, 8835, 29918, 2311, 29897, 13, 4706, 2186, 29918, 9721, 29889, 3539, 29918, 10389, 3552, 29918, 29933, 1177, 19926, 29918, 19094, 1299, 29918, 16358, 5099, 903, 22698, 29903, 29918, 1177, 29918, 22716, 4330, 29897, 669, 903, 22716, 4330, 29918, 1529, 16033, 29897, 13, 4706, 2186, 29918, 9721, 29889, 3539, 29918, 10389, 7373, 29933, 1177, 19926, 29918, 19094, 1299, 29918, 16358, 669, 903, 22716, 4330, 29918, 1529, 16033, 29897, 13, 4706, 2186, 29918, 9721, 29889, 3539, 29918, 524, 29898, 2435, 29898, 8977, 29918, 9721, 876, 13, 4706, 2186, 29918, 9721, 29889, 3539, 29918, 10389, 2378, 29898, 8977, 29918, 9721, 29897, 13, 4706, 2186, 29918, 9721, 29889, 3539, 29918, 524, 29898, 1311, 3032, 2527, 10817, 29918, 2798, 29897, 13, 4706, 2186, 29918, 9721, 29889, 3539, 29918, 10389, 2378, 29898, 2527, 10817, 29918, 9721, 29897, 13, 4706, 736, 2186, 29918, 9721, 29889, 517, 29918, 10389, 2378, 580, 13, 13, 1678, 822, 903, 3539, 29918, 2783, 11709, 29898, 1311, 29892, 553, 11709, 1125, 13, 4706, 11105, 353, 1583, 3032, 15807, 403, 29918, 2783, 11709, 29918, 13168, 29898, 2783, 11709, 29897, 13, 4706, 1583, 3032, 2527, 10817, 29918, 9721, 29889, 3539, 29918, 10389, 29898, 13168, 29897, 13, 13, 4706, 396, 9333, 2436, 304, 21556, 6835, 565, 278, 1819, 2400, 526, 13, 4706, 396, 1422, 1135, 278, 1819, 310, 278, 3517, 553, 11709, 13, 4706, 565, 11105, 669, 903, 1529, 16033, 29918, 15094, 25634, 1275, 29871, 29900, 29901, 13, 9651, 1583, 3032, 2527, 10817, 29918, 9721, 29889, 3539, 29918, 524, 29898, 1311, 3032, 657, 29918, 8977, 29918, 333, 29898, 2783, 11709, 29889, 13506, 876, 13, 13, 4706, 565, 11105, 669, 903, 1529, 16033, 29918, 2303, 5659, 2965, 1275, 29871, 29900, 29901, 13, 9651, 1583, 3032, 2527, 10817, 29918, 9721, 29889, 3539, 29918, 524, 29898, 1311, 3032, 657, 29918, 8977, 29918, 333, 29898, 2783, 11709, 29889, 16414, 876, 13, 13, 4706, 565, 11105, 669, 903, 1529, 16033, 29918, 23711, 29907, 3960, 16173, 1299, 1955, 1275, 29871, 29900, 29901, 13, 9651, 1583, 3032, 2527, 10817, 29918, 9721, 29889, 3539, 29918, 524, 29898, 1311, 3032, 657, 29918, 8977, 29918, 333, 29898, 2783, 11709, 29889, 2218, 29883, 20386, 1061, 876, 13, 13, 4706, 565, 11105, 669, 903, 1529, 16033, 29918, 23711, 29907, 3960, 16173, 1299, 1955, 29918, 19143, 1275, 29871, 29900, 29901, 13, 9651, 1583, 3032, 2527, 10817, 29918, 9721, 29889, 3539, 29918, 524, 29898, 1311, 3032, 657, 29918, 8977, 29918, 333, 29898, 2783, 11709, 29889, 2218, 29883, 20386, 1061, 29918, 1767, 876, 13, 13, 4706, 565, 11105, 669, 903, 1529, 16033, 29918, 3904, 1806, 1275, 29871, 29900, 29901, 13, 9651, 565, 553, 11709, 29889, 5441, 338, 6213, 29901, 13, 18884, 1583, 3032, 2527, 10817, 29918, 9721, 29889, 3539, 29918, 10389, 7373, 10074, 29918, 3904, 1806, 29897, 13, 9651, 1683, 29901, 13, 18884, 1583, 3032, 2527, 10817, 29918, 9721, 29889, 3539, 29918, 10389, 29898, 2783, 11709, 29889, 5441, 29897, 13, 13, 4706, 396, 3160, 429, 13347, 8667, 29879, 322, 8282, 6262, 363, 24521, 11976, 13, 4706, 565, 11105, 669, 903, 1529, 16033, 29918, 5746, 6154, 29965, 2287, 29928, 29918, 29911, 1718, 7194, 29903, 1275, 29871, 29900, 29901, 13, 9651, 1583, 3032, 2527, 10817, 29918, 9721, 29889, 3539, 29918, 10389, 29898, 29900, 29897, 13, 13, 4706, 565, 11105, 669, 903, 1529, 16033, 29918, 16881, 29918, 18736, 1275, 29871, 29900, 29901, 13, 9651, 1583, 3032, 2527, 10817, 29918, 9721, 29889, 3539, 29918, 10389, 29898, 29900, 29897, 13, 13, 4706, 1583, 3032, 2527, 10817, 29918, 2798, 4619, 29871, 29896, 13, 4706, 1583, 3032, 4230, 29918, 2783, 11709, 353, 553, 11709, 13, 13, 1678, 822, 903, 15807, 403, 29918, 2783, 11709, 29918, 13168, 29898, 1311, 29892, 553, 11709, 1125, 13, 4706, 11105, 353, 29871, 29900, 13, 4706, 565, 451, 1583, 3032, 4230, 29918, 2783, 11709, 29901, 13, 9651, 736, 11105, 13, 13, 4706, 1833, 29918, 2783, 11709, 353, 1583, 3032, 4230, 29918, 2783, 11709, 13, 13, 4706, 565, 553, 11709, 29889, 13506, 1275, 1833, 29918, 2783, 11709, 29889, 13506, 29901, 13, 9651, 11105, 891, 29922, 903, 1529, 16033, 29918, 15094, 25634, 13, 13, 4706, 565, 553, 11709, 29889, 16414, 1275, 1833, 29918, 2783, 11709, 29889, 16414, 29901, 13, 9651, 11105, 891, 29922, 903, 1529, 16033, 29918, 2303, 5659, 2965, 13, 13, 4706, 565, 553, 11709, 29889, 2218, 29883, 20386, 1061, 1275, 1833, 29918, 2783, 11709, 29889, 2218, 29883, 20386, 1061, 29901, 13, 9651, 11105, 891, 29922, 903, 1529, 16033, 29918, 23711, 29907, 3960, 16173, 1299, 1955, 13, 13, 4706, 565, 553, 11709, 29889, 2218, 29883, 20386, 1061, 29918, 1767, 1275, 1833, 29918, 2783, 11709, 29889, 2218, 29883, 20386, 1061, 29918, 1767, 29901, 13, 9651, 11105, 891, 29922, 903, 1529, 16033, 29918, 23711, 29907, 3960, 16173, 1299, 1955, 29918, 19143, 13, 13, 4706, 565, 553, 11709, 29889, 5441, 1275, 1833, 29918, 2783, 11709, 29889, 5441, 29901, 13, 9651, 11105, 891, 29922, 903, 1529, 16033, 29918, 3904, 1806, 13, 13, 4706, 396, 3160, 429, 13347, 8667, 29879, 322, 8282, 9978, 363, 24521, 11976, 13, 4706, 11105, 891, 29922, 903, 1529, 16033, 29918, 5746, 6154, 29965, 2287, 29928, 29918, 29911, 1718, 7194, 29903, 13, 4706, 11105, 891, 29922, 903, 1529, 16033, 29918, 16881, 29918, 18736, 13, 13, 4706, 736, 11105, 13, 13, 1678, 822, 903, 657, 29918, 8977, 29918, 333, 29898, 1311, 29892, 1734, 1125, 13, 4706, 565, 451, 1734, 29901, 13, 9651, 736, 903, 10074, 29918, 4571, 9838, 19926, 29918, 1367, 13, 13, 4706, 736, 1583, 3032, 2527, 10817, 29918, 8977, 29889, 657, 29918, 8977, 29918, 333, 29898, 1742, 29897, 13, 13, 1678, 822, 903, 3539, 29918, 2527, 10817, 29918, 8977, 29898, 1311, 1125, 13, 4706, 3838, 353, 1583, 3032, 2527, 10817, 29918, 8977, 29889, 657, 29918, 9303, 580, 13, 4706, 1583, 3032, 8977, 29918, 9721, 29889, 3539, 29918, 524, 29898, 2435, 29898, 9303, 876, 13, 13, 4706, 1833, 29918, 1742, 29918, 726, 353, 5124, 13, 4706, 363, 1734, 297, 3838, 29901, 13, 9651, 1734, 29918, 726, 353, 1734, 29889, 1742, 13, 9651, 4236, 29918, 9435, 29918, 2435, 353, 1375, 29898, 2435, 29898, 4230, 29918, 1742, 29918, 726, 511, 7431, 29898, 1742, 29918, 726, 876, 13, 9651, 3619, 29918, 2435, 353, 29871, 29900, 13, 9651, 1550, 313, 13, 18884, 3619, 29918, 2435, 529, 4236, 29918, 9435, 29918, 2435, 322, 1734, 29918, 726, 29961, 9435, 29918, 2435, 29962, 1275, 1833, 29918, 1742, 29918, 726, 29961, 9435, 29918, 2435, 29962, 13, 632, 1125, 13, 18884, 3619, 29918, 2435, 4619, 29871, 29896, 13, 13, 9651, 2923, 29918, 2435, 353, 7431, 29898, 1742, 29918, 726, 29897, 448, 3619, 29918, 2435, 13, 13, 9651, 1583, 3032, 8977, 29918, 9721, 29889, 3539, 29918, 524, 29898, 1742, 29889, 8977, 29918, 333, 29897, 13, 9651, 1583, 3032, 8977, 29918, 9721, 29889, 3539, 29918, 10389, 29898, 9435, 29918, 2435, 29897, 13, 9651, 1583, 3032, 8977, 29918, 9721, 29889, 3539, 29918, 10389, 29898, 12765, 29918, 2435, 29897, 13, 9651, 363, 474, 297, 3464, 29898, 9435, 29918, 2435, 29892, 7431, 29898, 1742, 29918, 726, 22164, 13, 18884, 1583, 3032, 8977, 29918, 9721, 29889, 3539, 29918, 3090, 29898, 1742, 29918, 726, 29961, 29875, 2314, 13, 13, 9651, 1833, 29918, 1742, 29918, 726, 353, 1734, 29918, 726, 13, 13, 13, 1990, 903, 6466, 7701, 29898, 3318, 1125, 13, 1678, 4770, 2536, 1862, 1649, 353, 4852, 29918, 9721, 613, 11119, 1066, 1159, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 2159, 29922, 8516, 1125, 13, 4706, 1583, 3032, 9721, 353, 7023, 2378, 29898, 2311, 470, 903, 12015, 12336, 29918, 7838, 28483, 29918, 26019, 25758, 29918, 14226, 29897, 13, 4706, 1583, 3032, 1066, 353, 29871, 29900, 13, 13, 1678, 822, 304, 29918, 10389, 2378, 29898, 1311, 1125, 13, 4706, 565, 1583, 3032, 1066, 1275, 7431, 29898, 1311, 3032, 9721, 1125, 13, 9651, 736, 1583, 3032, 9721, 13, 13, 4706, 736, 1583, 3032, 9721, 7503, 1583, 3032, 1066, 29962, 13, 13, 1678, 822, 2436, 29918, 10389, 2378, 29898, 1311, 29892, 18392, 1125, 13, 4706, 302, 353, 7431, 29898, 9721, 29897, 13, 4706, 1583, 3032, 7469, 29918, 16515, 29898, 29876, 29897, 13, 4706, 1583, 3032, 9721, 29961, 1311, 3032, 1066, 584, 1583, 3032, 1066, 718, 302, 29962, 353, 18392, 13, 4706, 1583, 3032, 1066, 4619, 302, 13, 13, 1678, 822, 2436, 29918, 10389, 29898, 1311, 29892, 995, 1125, 13, 4706, 1583, 3032, 7469, 29918, 16515, 29898, 22716, 4330, 29918, 14226, 29918, 1177, 29918, 22716, 29911, 2890, 29897, 13, 4706, 20700, 29918, 29965, 10192, 29947, 29889, 4058, 29918, 8941, 29898, 1311, 3032, 9721, 29892, 1583, 3032, 1066, 29892, 995, 669, 903, 22716, 4330, 29918, 1529, 16033, 29897, 13, 4706, 1583, 3032, 1066, 4619, 6770, 4330, 29918, 14226, 29918, 1177, 29918, 22716, 29911, 2890, 13, 13, 1678, 822, 2436, 29918, 3090, 29898, 1311, 29892, 995, 1125, 13, 4706, 1583, 3032, 7469, 29918, 16515, 29898, 11282, 29918, 14226, 29918, 1177, 29918, 22716, 29911, 2890, 29897, 13, 4706, 20700, 29918, 29965, 10192, 29896, 29953, 29889, 4058, 29918, 8941, 29898, 1311, 3032, 9721, 29892, 1583, 3032, 1066, 29892, 4356, 29898, 1767, 876, 13, 4706, 1583, 3032, 1066, 4619, 26871, 29918, 14226, 29918, 1177, 29918, 22716, 29911, 2890, 13, 13, 1678, 822, 2436, 29918, 8896, 29898, 1311, 29892, 995, 1125, 13, 4706, 1583, 3032, 7469, 29918, 16515, 29898, 3970, 7466, 1307, 29918, 14226, 29918, 1177, 29918, 22716, 29911, 2890, 29897, 13, 4706, 20700, 29918, 3970, 7466, 1307, 29889, 4058, 29918, 8941, 29898, 1311, 3032, 9721, 29892, 1583, 3032, 1066, 29892, 995, 29897, 13, 4706, 1583, 3032, 1066, 4619, 11662, 7466, 1307, 29918, 14226, 29918, 1177, 29918, 22716, 29911, 2890, 13, 13, 1678, 822, 2436, 29918, 524, 29898, 1311, 29892, 995, 1125, 13, 4706, 1583, 3032, 7469, 29918, 16515, 29898, 10192, 29918, 14226, 29918, 1177, 29918, 22716, 29911, 2890, 29897, 13, 4706, 20700, 29918, 10192, 29889, 4058, 29918, 8941, 29898, 1311, 3032, 9721, 29892, 1583, 3032, 1066, 29892, 995, 29897, 13, 4706, 1583, 3032, 1066, 4619, 19578, 29918, 14226, 29918, 1177, 29918, 22716, 29911, 2890, 13, 13, 1678, 822, 2436, 29918, 5426, 29898, 1311, 29892, 995, 1125, 13, 4706, 1583, 3032, 7469, 29918, 16515, 29898, 29931, 20614, 29918, 14226, 29918, 1177, 29918, 22716, 29911, 2890, 29897, 13, 4706, 20700, 29918, 29931, 20614, 29889, 4058, 29918, 8941, 29898, 1311, 3032, 9721, 29892, 1583, 3032, 1066, 29892, 995, 29897, 13, 4706, 1583, 3032, 1066, 4619, 365, 20614, 29918, 14226, 29918, 1177, 29918, 22716, 29911, 2890, 13, 13, 1678, 822, 27122, 29898, 1311, 1125, 13, 4706, 18392, 353, 1583, 29889, 517, 29918, 10389, 2378, 580, 13, 13, 4706, 396, 3789, 3233, 304, 29871, 29896, 363, 1900, 6210, 313, 2222, 10808, 18702, 29897, 13, 4706, 736, 503, 1982, 29889, 510, 2139, 29898, 9721, 29892, 29871, 29896, 29897, 13, 13, 1678, 822, 903, 7469, 29918, 16515, 29898, 1311, 29892, 2159, 1125, 13, 4706, 565, 1583, 3032, 16515, 580, 529, 2159, 29901, 13, 9651, 396, 402, 798, 3370, 901, 1135, 4312, 13, 9651, 716, 29918, 2311, 353, 938, 3552, 1311, 3032, 1066, 718, 2159, 29897, 334, 903, 12015, 12336, 29918, 7838, 28483, 29918, 29954, 25180, 29918, 4519, 1783, 1955, 29897, 13, 9651, 565, 716, 29918, 2311, 1273, 29871, 29906, 2804, 29871, 29900, 29901, 13, 18884, 716, 29918, 2311, 4619, 29871, 29896, 13, 13, 9651, 716, 29918, 9721, 353, 7023, 2378, 29898, 1482, 29918, 2311, 29897, 13, 9651, 716, 29918, 9721, 7503, 1583, 3032, 1066, 29962, 353, 1583, 3032, 9721, 13, 9651, 1583, 3032, 9721, 353, 716, 29918, 9721, 13, 13, 1678, 822, 903, 16515, 29898, 1311, 1125, 13, 4706, 736, 7431, 29898, 1311, 3032, 9721, 29897, 448, 1583, 3032, 1066, 13, 13, 13, 1990, 903, 14463, 29898, 3318, 1125, 13, 1678, 4770, 2536, 1862, 1649, 353, 4852, 1742, 613, 376, 8977, 29918, 333, 1159, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 1734, 29892, 9657, 29918, 333, 1125, 13, 4706, 1583, 29889, 1742, 353, 1734, 13, 4706, 1583, 29889, 8977, 29918, 333, 353, 9657, 29918, 333, 13, 13, 13, 1990, 903, 10095, 10817, 11513, 29898, 3318, 1125, 13, 1678, 9995, 855, 2361, 1734, 1599, 1178, 611, 27775, 29889, 13, 13, 1678, 501, 8485, 491, 584, 1990, 18078, 10095, 10817, 1523, 2139, 272, 20497, 29879, 8600, 29899, 6707, 5687, 29889, 13, 1678, 9995, 13, 13, 1678, 4770, 2536, 1862, 1649, 353, 4852, 29918, 9303, 613, 29897, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 1125, 13, 4706, 1583, 3032, 9303, 353, 6571, 13, 13, 1678, 822, 679, 29918, 8977, 29918, 333, 29898, 1311, 29892, 1734, 29918, 726, 1125, 13, 4706, 9995, 11609, 29879, 278, 8600, 1178, 363, 278, 2183, 1734, 29889, 13, 13, 4706, 960, 278, 1734, 338, 451, 3447, 6087, 297, 278, 8600, 29892, 278, 1734, 4947, 6087, 13, 4706, 322, 263, 15141, 9859, 1178, 338, 4133, 29889, 13, 13, 4706, 826, 3174, 29901, 13, 9651, 1734, 29918, 726, 313, 710, 1125, 3992, 950, 8954, 310, 263, 1734, 29889, 13, 13, 4706, 16969, 29901, 13, 9651, 938, 29901, 450, 8600, 1178, 29889, 13, 13, 4706, 390, 1759, 267, 29901, 13, 9651, 7865, 2392, 29901, 960, 278, 3309, 310, 278, 1734, 2609, 6216, 964, 12780, 13, 18884, 7023, 3464, 29889, 13, 4706, 9995, 13, 4706, 565, 7431, 29898, 1742, 29918, 726, 29897, 1405, 903, 12648, 29918, 17013, 29918, 19433, 29901, 13, 9651, 12020, 7865, 2392, 29898, 13, 18884, 376, 1762, 29877, 1472, 995, 297, 278, 12714, 553, 11709, 1476, 29892, 7472, 338, 1273, 29879, 29901, 1273, 29879, 29908, 13, 18884, 1273, 9423, 12648, 29918, 17013, 29918, 19433, 29892, 1734, 29918, 726, 29897, 13, 9651, 1723, 13, 13, 4706, 1734, 353, 1583, 3032, 9303, 29889, 657, 29898, 1742, 29918, 726, 29892, 6213, 29897, 13, 4706, 565, 1734, 29901, 13, 9651, 1734, 29918, 333, 353, 1734, 29889, 8977, 29918, 333, 13, 4706, 1683, 29901, 13, 9651, 1734, 29918, 333, 353, 7431, 29898, 1311, 3032, 9303, 29897, 13, 9651, 1583, 3032, 9303, 29961, 1742, 29918, 726, 29962, 353, 903, 14463, 29898, 1742, 29918, 726, 29892, 1734, 29918, 333, 29897, 13, 13, 4706, 736, 1734, 29918, 333, 13, 13, 1678, 822, 679, 29918, 9303, 29898, 1311, 1125, 13, 4706, 9995, 11609, 29879, 599, 6087, 1734, 29966, 976, 333, 611, 27775, 10372, 491, 1734, 29889, 13, 13, 4706, 16969, 29901, 13, 9651, 1051, 28513, 14463, 5387, 399, 4339, 29889, 13, 4706, 9995, 13, 4706, 3838, 353, 1583, 3032, 9303, 29889, 5975, 580, 13, 4706, 736, 12705, 29898, 9303, 29892, 1820, 29922, 2892, 281, 29901, 281, 29889, 1742, 29897, 13, 2 ]
operations/sgRNAProcessing/UpdateGroupReferences.py
BioGRID/CUP-LIMS
2
160863
<filename>operations/sgRNAProcessing/UpdateGroupReferences.py #!/bin/env python # Take a set of sgRNA_Groups and attempt to map them # to better references import sys, string, argparse import MySQLdb import Config import Database from classes import Lookups with Database.db as cursor : cursor.execute( "SELECT sgrna_group_id, sgrna_group_reference_original, sgrna_group_reference_original_type FROM " + Config.DB_MAIN + ".sgRNA_groups WHERE sgrna_group_reference='-'" ) for row in cursor.fetchall( ) : # See if we can find a match with an Official Symbol cursor.execute( "SELECT gene_id FROM " + Config.DB_QUICK + ".quick_identifiers WHERE quick_identifier_value=%s AND quick_identifier_type IN ('OFFICIAL SYMBOL') AND organism_id='9606' GROUP BY gene_id", [row['sgrna_group_reference_original']] ) idInfo = "" if cursor.rowcount == 1 : idInfo = cursor.fetchone( ) else : cursor.execute( "SELECT gene_id FROM " + Config.DB_QUICK + ".quick_identifiers WHERE quick_identifier_value=%s AND quick_identifier_type IN ('SYNONYM', 'ORDERED LOCUS') AND organism_id='9606' GROUP BY gene_id", [row['sgrna_group_reference_original']] ) if cursor.rowcount == 1 : idInfo = cursor.fetchone( ) if idInfo != "" : cursor.execute( "UPDATE " + Config.DB_MAIN + ".sgRNA_groups SET sgrna_group_reference=%s, sgrna_group_reference_type=%s WHERE sgrna_group_id=%s", [idInfo['gene_id'], 'BIOGRID', row['sgrna_group_id']] ) else : cursor.execute( "UPDATE " + Config.DB_MAIN + ".sgRNA_groups SET sgrna_group_reference=%s, sgrna_group_reference_type=%s WHERE sgrna_group_id=%s", [row['sgrna_group_reference_original'], row['sgrna_group_reference_original_type'], row['sgrna_group_id']] ) Database.db.commit( ) Database.db.commit( ) sys.exit( )
[ 1, 529, 9507, 29958, 3372, 800, 29914, 5311, 29934, 3521, 7032, 292, 29914, 6422, 4782, 1123, 10662, 29889, 2272, 13, 29937, 14708, 2109, 29914, 6272, 3017, 13, 13, 29937, 11190, 263, 731, 310, 269, 29887, 29934, 3521, 29918, 24020, 322, 4218, 304, 2910, 963, 13, 29937, 304, 2253, 9282, 13, 13, 5215, 10876, 29892, 1347, 29892, 1852, 5510, 13, 5215, 9254, 2585, 13, 5215, 12782, 13, 5215, 5470, 13, 13, 3166, 4413, 1053, 7419, 14340, 13, 13, 2541, 5470, 29889, 2585, 408, 10677, 584, 13, 13, 12, 18127, 29889, 7978, 29898, 376, 6404, 269, 629, 1056, 29918, 2972, 29918, 333, 29892, 269, 629, 1056, 29918, 2972, 29918, 5679, 29918, 13492, 29892, 269, 629, 1056, 29918, 2972, 29918, 5679, 29918, 13492, 29918, 1853, 3895, 376, 718, 12782, 29889, 4051, 29918, 29032, 718, 11393, 5311, 29934, 3521, 29918, 13155, 5754, 269, 629, 1056, 29918, 2972, 29918, 5679, 2433, 29899, 11838, 1723, 13, 12, 13, 12, 1454, 1948, 297, 10677, 29889, 9155, 497, 29898, 1723, 584, 13, 12, 12, 13, 12, 12, 29937, 2823, 565, 591, 508, 1284, 263, 1993, 411, 385, 10564, 23858, 13, 12, 12, 18127, 29889, 7978, 29898, 376, 6404, 18530, 29918, 333, 3895, 376, 718, 12782, 29889, 4051, 29918, 13356, 2965, 29968, 718, 11393, 24561, 29918, 1693, 14903, 5754, 4996, 29918, 25378, 29918, 1767, 16328, 29879, 5300, 4996, 29918, 25378, 29918, 1853, 2672, 6702, 27681, 2965, 25758, 28962, 9486, 5607, 1495, 5300, 2894, 1608, 29918, 333, 2433, 29929, 29953, 29900, 29953, 29915, 15345, 6770, 18530, 29918, 333, 613, 518, 798, 1839, 29879, 629, 1056, 29918, 2972, 29918, 5679, 29918, 13492, 2033, 29962, 1723, 13, 12, 12, 13, 12, 12, 333, 3401, 353, 5124, 13, 12, 12, 361, 10677, 29889, 798, 2798, 1275, 29871, 29896, 584, 13, 12, 12, 12, 333, 3401, 353, 10677, 29889, 9155, 650, 29898, 1723, 29871, 13, 12, 12, 2870, 584, 13, 12, 12, 12, 12, 13, 12, 12, 12, 18127, 29889, 7978, 29898, 376, 6404, 18530, 29918, 333, 3895, 376, 718, 12782, 29889, 4051, 29918, 13356, 2965, 29968, 718, 11393, 24561, 29918, 1693, 14903, 5754, 4996, 29918, 25378, 29918, 1767, 16328, 29879, 5300, 4996, 29918, 25378, 29918, 1853, 2672, 6702, 14816, 29940, 1164, 29979, 29924, 742, 525, 22364, 3352, 11247, 29907, 3308, 1495, 5300, 2894, 1608, 29918, 333, 2433, 29929, 29953, 29900, 29953, 29915, 15345, 6770, 18530, 29918, 333, 613, 518, 798, 1839, 29879, 629, 1056, 29918, 2972, 29918, 5679, 29918, 13492, 2033, 29962, 1723, 13, 12, 12, 12, 12, 13, 12, 12, 12, 361, 10677, 29889, 798, 2798, 1275, 29871, 29896, 584, 13, 12, 12, 12, 12, 333, 3401, 353, 10677, 29889, 9155, 650, 29898, 1723, 13, 12, 12, 12, 12, 12, 13, 12, 12, 361, 1178, 3401, 2804, 5124, 584, 13, 12, 12, 12, 18127, 29889, 7978, 29898, 376, 14474, 376, 718, 12782, 29889, 4051, 29918, 29032, 718, 11393, 5311, 29934, 3521, 29918, 13155, 11368, 269, 629, 1056, 29918, 2972, 29918, 5679, 16328, 29879, 29892, 269, 629, 1056, 29918, 2972, 29918, 5679, 29918, 1853, 16328, 29879, 5754, 269, 629, 1056, 29918, 2972, 29918, 333, 16328, 29879, 613, 518, 333, 3401, 1839, 29887, 1600, 29918, 333, 7464, 525, 29933, 5971, 14345, 1367, 742, 1948, 1839, 29879, 629, 1056, 29918, 2972, 29918, 333, 2033, 29962, 1723, 13, 12, 12, 2870, 584, 13, 12, 12, 12, 18127, 29889, 7978, 29898, 376, 14474, 376, 718, 12782, 29889, 4051, 29918, 29032, 718, 11393, 5311, 29934, 3521, 29918, 13155, 11368, 269, 629, 1056, 29918, 2972, 29918, 5679, 16328, 29879, 29892, 269, 629, 1056, 29918, 2972, 29918, 5679, 29918, 1853, 16328, 29879, 5754, 269, 629, 1056, 29918, 2972, 29918, 333, 16328, 29879, 613, 518, 798, 1839, 29879, 629, 1056, 29918, 2972, 29918, 5679, 29918, 13492, 7464, 1948, 1839, 29879, 629, 1056, 29918, 2972, 29918, 5679, 29918, 13492, 29918, 1853, 7464, 1948, 1839, 29879, 629, 1056, 29918, 2972, 29918, 333, 2033, 29962, 1723, 13, 12, 12, 12, 12, 13, 12, 12, 9112, 29889, 2585, 29889, 15060, 29898, 1723, 13, 12, 9112, 29889, 2585, 29889, 15060, 29898, 1723, 13, 12, 12, 12, 13, 9675, 29889, 13322, 29898, 1723, 2 ]
blog/admin.py
Developer-R-7/CaffeineCode
1
137505
from django.contrib import admin from .models import Category, Post admin.site.register(Post) admin.site.register(Category)
[ 1, 515, 9557, 29889, 21570, 1053, 4113, 13, 13, 3166, 869, 9794, 1053, 17943, 29892, 4918, 13, 6406, 29889, 2746, 29889, 9573, 29898, 6747, 29897, 13, 6406, 29889, 2746, 29889, 9573, 29898, 10900, 29897, 2 ]
physics_aware_training/model_architectures/SplitInputParameterNet.py
mcmahon-lab/Physics-Aware-Training
182
64240
import torch import torch.nn as nn import physics_aware_training.digital_twin_utils class SplitInputParameterNet(nn.Module): def __init__(self, input_dim, nparams, output_dim, parameterNunits = [100,100,100], internalNunits = [10,10,10]): ''' Defines network that splits inputs x into physical system input and parameters. Inputs are propagated through a "main" neural network whose weights are predicted by an auxiliary neural network whose inputs are the parameters. Args: inputDim (int): dimension of physical system inputs outputDim (int): dimension of physical system outputs parameterDim (int): dimension of all physical system parameters combined parameterNunits (list of int): defines the number of hidden units per layer in the auxiliary parameter network. internalDim (int): number of hidden units per layer of the main neural network that propagates physical system inputs inputNlayers (int): number of hidden layers of main neural network ''' super(SplitInputParameterNet, self).__init__() self.input_dim = input_dim self.nparams = nparams self.output_dim = output_dim self.internalNunits = internalNunits self.inputNlayers = len(internalNunits) nparameters = 0 for i in range(len(internalNunits)-1): nparameters += internalNunits[i]*internalNunits[i+1] nparameters += internalNunits[i+1] # parameterNet is a submodel that predicts a matrix of dimensions self.parameterNet = torch.nn.Sequential() self.parameterNet.add_module("fcIn", torch.nn.Linear(nparams, parameterNunits[0])) for i in range(len(parameterNunits)): if i<len(parameterNunits)-1: self.parameterNet.add_module(f"relu{i}", torch.nn.ReLU()) self.parameterNet.add_module(f"fc{i}", torch.nn.Linear(parameterNunits[i], parameterNunits[i+1])) else: self.parameterNet.add_module(f"relu{i}", torch.nn.ReLU()) self.parameterNet.add_module(f"fcOut", torch.nn.Linear(parameterNunits[i], nparameters)) # two fully connected input and output layers adjust the input and output dimenstion to # the internal dimension self.fcIn = nn.Linear(input_dim, internalNunits[0]) self.fcOut = nn.Linear(internalNunits[-1], output_dim) def forward(self, x): batch_size, _ = x.shape # initialize matrices for inputNet inputNetMatrices = [] inputNetBiases = [] for i in range(len(self.internalNunits)-1): inputNetMatrices.append([torch.zeros(batch_size, self.internalNunits[i], self.internalNunits[i+1])]) inputNetBiases.append([torch.zeros(batch_size, self.internalNunits[i+1], 1)]) # split x into physical system inputs and parameters inputs = x[:, :self.input_dim] parameters = x[:, self.input_dim:] # AUXILIARY PARAMETER NETWORK parameters = self.parameterNet(parameters) # fill inputNetMatrices with outputs from parameterNet index = 0 for i in range(len(self.internalNunits)-1): index_temp = index index += self.internalNunits[i] * self.internalNunits[i+1] inputNetMatrices[i] = parameters[:, index_temp:index].reshape(batch_size, self.internalNunits[i+1], self.internalNunits[i]) # fill inputNetBiases with outputs from parameterNet for i in range(len(self.internalNunits)-1): index_temp = index index += self.internalNunits[i+1] inputNetBiases[i] = parameters[:, index_temp:index].reshape(batch_size, self.internalNunits[i+1], 1) # MAIN INPUT NETWORK inputs = self.fcIn(inputs).unsqueeze(-1) # MAIN INPUT NETWORK for i in range(len(self.internalNunits)-1): # apply matrices and biases just filled with outputs from parameterNet inputs = torch.bmm(inputNetMatrices[i], inputs) inputs += inputNetBiases[i] inputs = torch.relu(inputs) return self.fcOut(inputs.squeeze(-1)) class SplitInputParameterObjective(object): # define class to smuggle additional arguments into objective function def __init__(self, train_loader, test_loader, dt_path, input_dim, nparams, output_dim, **modelargs): self.modelargs = modelargs self.dt_path = dt_path self.train_loader = train_loader self.test_loader = test_loader self.input_dim = input_dim self.nparams = nparams self.output_dim = output_dim def __call__(self, trial): lr = trial.suggest_loguniform("lr", 1e-4, 1e-1) parameterNlayers = trial.suggest_categorical("parameterNlayers", [1, 2, 3, 4, 5]) parameterNunits = [] if parameterNlayers == 1: parameterNunits.append(int(trial.suggest_loguniform("Nunits1", 50, 1000))) if parameterNlayers == 2: parameterNunits.append(int(trial.suggest_loguniform("Nunits1", 50, 1000))) parameterNunits.append(int(trial.suggest_loguniform("Nunits2", 50, 1000))) if parameterNlayers == 3: parameterNunits.append(int(trial.suggest_loguniform("Nunits1", 50, 1000))) parameterNunits.append(int(trial.suggest_loguniform("Nunits2", 50, 1000))) parameterNunits.append(int(trial.suggest_loguniform("Nunits3", 50, 1000))) if parameterNlayers == 4: parameterNunits.append(int(trial.suggest_loguniform("Nunits1", 50, 1000))) parameterNunits.append(int(trial.suggest_loguniform("Nunits2", 50, 1000))) parameterNunits.append(int(trial.suggest_loguniform("Nunits3", 50, 1000))) parameterNunits.append(int(trial.suggest_loguniform("Nunits4", 50, 1000))) if parameterNlayers == 5: parameterNunits.append(int(trial.suggest_loguniform("Nunits1", 50, 1000))) parameterNunits.append(int(trial.suggest_loguniform("Nunits2", 50, 1000))) parameterNunits.append(int(trial.suggest_loguniform("Nunits3", 50, 1000))) parameterNunits.append(int(trial.suggest_loguniform("Nunits4", 50, 1000))) parameterNunits.append(int(trial.suggest_loguniform("Nunits5", 50, 1000))) internalNlayers = trial.suggest_categorical("internalNlayers", [1, 2, 3, 4, 5]) internalNunits = [] if parameterNlayers == 1: internalNunits.append(int(trial.suggest_loguniform("iNunits1", 10, 100))) if parameterNlayers == 2: internalNunits.append(int(trial.suggest_loguniform("iNunits1", 10, 100))) internalNunits.append(int(trial.suggest_loguniform("iNunits2", 10, 100))) if parameterNlayers == 3: internalNunits.append(int(trial.suggest_loguniform("iNunits1", 10, 100))) internalNunits.append(int(trial.suggest_loguniform("iNunits2", 10, 100))) internalNunits.append(int(trial.suggest_loguniform("iNunits3", 10, 100))) if parameterNlayers == 4: internalNunits.append(int(trial.suggest_loguniform("iNunits1", 10, 100))) internalNunits.append(int(trial.suggest_loguniform("iNunits2", 10, 100))) internalNunits.append(int(trial.suggest_loguniform("iNunits3", 10, 100))) internalNunits.append(int(trial.suggest_loguniform("iNunits4", 10, 100))) if parameterNlayers == 5: internalNunits.append(int(trial.suggest_loguniform("iNunits1", 10, 100))) internalNunits.append(int(trial.suggest_loguniform("iNunits2", 10, 100))) internalNunits.append(int(trial.suggest_loguniform("iNunits3", 10, 100))) internalNunits.append(int(trial.suggest_loguniform("iNunits4", 10, 100))) internalNunits.append(int(trial.suggest_loguniform("iNunits5", 10, 100))) name = f"{self.dt_path}_v{trial.number}" #create name with trial index value, model_path = physics_aware_training.digital_twin_utils.train_loop_reg_model( self.train_loader, self.test_loader, name, self.input_dim, self.nparams, self.output_dim, Model = SplitInputParameterNet, parameterNunits = parameterNunits, internalNunits = internalNunits, lr = lr, **self.modelargs) trial.set_user_attr('model_path', model_path) #save the model path string in NAS study return value
[ 1, 1053, 4842, 305, 13, 5215, 4842, 305, 29889, 15755, 408, 302, 29876, 13, 5215, 17558, 29918, 28327, 29918, 26495, 29889, 7501, 2410, 29918, 29873, 5080, 29918, 13239, 13, 13, 1990, 26178, 4290, 9329, 6779, 29898, 15755, 29889, 7355, 1125, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 29871, 13, 462, 1881, 29918, 6229, 29892, 29871, 13, 462, 302, 7529, 29892, 29871, 13, 462, 1962, 29918, 6229, 29892, 29871, 13, 462, 3443, 29940, 348, 1169, 353, 518, 29896, 29900, 29900, 29892, 29896, 29900, 29900, 29892, 29896, 29900, 29900, 1402, 29871, 13, 462, 7463, 29940, 348, 1169, 353, 518, 29896, 29900, 29892, 29896, 29900, 29892, 29896, 29900, 29962, 1125, 29871, 13, 4706, 14550, 13, 4706, 5282, 1475, 3564, 393, 8536, 1169, 10970, 921, 964, 9128, 1788, 1881, 322, 4128, 29889, 13, 4706, 10567, 29879, 526, 13089, 630, 1549, 263, 376, 3396, 29908, 19677, 3564, 5069, 18177, 526, 25383, 491, 385, 13, 4706, 29587, 653, 19677, 3564, 5069, 10970, 526, 278, 4128, 29889, 29871, 13, 308, 13, 4706, 826, 3174, 29901, 13, 9651, 1881, 16142, 313, 524, 1125, 9927, 310, 9128, 1788, 10970, 13, 9651, 1962, 16142, 313, 524, 1125, 9927, 310, 9128, 1788, 14391, 29871, 13, 9651, 3443, 16142, 313, 524, 1125, 9927, 310, 599, 9128, 1788, 4128, 12420, 13, 9651, 3443, 29940, 348, 1169, 313, 1761, 310, 938, 1125, 17645, 278, 1353, 310, 7934, 10340, 639, 7546, 297, 278, 13, 18884, 29587, 653, 3443, 3564, 29889, 13, 9651, 7463, 16142, 313, 524, 1125, 1353, 310, 7934, 10340, 639, 7546, 310, 278, 1667, 19677, 3564, 393, 29871, 13, 18884, 13089, 1078, 9128, 1788, 10970, 13, 9651, 1881, 29940, 29277, 313, 524, 1125, 1353, 310, 7934, 15359, 310, 1667, 19677, 3564, 13, 4706, 14550, 13, 4706, 2428, 29898, 18772, 4290, 9329, 6779, 29892, 1583, 467, 1649, 2344, 1649, 580, 13, 308, 13, 4706, 1583, 29889, 2080, 29918, 6229, 353, 1881, 29918, 6229, 13, 4706, 1583, 29889, 29876, 7529, 353, 302, 7529, 29871, 13, 4706, 1583, 29889, 4905, 29918, 6229, 353, 1962, 29918, 6229, 13, 4706, 1583, 29889, 7564, 29940, 348, 1169, 353, 7463, 29940, 348, 1169, 29871, 13, 4706, 1583, 29889, 2080, 29940, 29277, 353, 7431, 29898, 7564, 29940, 348, 1169, 29897, 29871, 13, 308, 13, 4706, 302, 16744, 353, 29871, 29900, 13, 4706, 363, 474, 297, 3464, 29898, 2435, 29898, 7564, 29940, 348, 1169, 6817, 29896, 1125, 13, 9651, 302, 16744, 4619, 7463, 29940, 348, 1169, 29961, 29875, 14178, 7564, 29940, 348, 1169, 29961, 29875, 29974, 29896, 29962, 13, 9651, 302, 16744, 4619, 7463, 29940, 348, 1169, 29961, 29875, 29974, 29896, 29962, 13, 308, 13, 4706, 396, 3443, 6779, 338, 263, 1014, 4299, 393, 8500, 29879, 263, 4636, 310, 13391, 29871, 13, 4706, 1583, 29889, 15501, 6779, 353, 4842, 305, 29889, 15755, 29889, 16941, 2556, 580, 13, 4706, 1583, 29889, 15501, 6779, 29889, 1202, 29918, 5453, 703, 13801, 797, 613, 4842, 305, 29889, 15755, 29889, 12697, 29898, 29876, 7529, 29892, 3443, 29940, 348, 1169, 29961, 29900, 12622, 13, 4706, 363, 474, 297, 3464, 29898, 2435, 29898, 15501, 29940, 348, 1169, 22164, 13, 9651, 565, 474, 29966, 2435, 29898, 15501, 29940, 348, 1169, 6817, 29896, 29901, 13, 18884, 1583, 29889, 15501, 6779, 29889, 1202, 29918, 5453, 29898, 29888, 29908, 2674, 29884, 29912, 29875, 17671, 4842, 305, 29889, 15755, 29889, 1123, 29931, 29965, 3101, 13, 18884, 1583, 29889, 15501, 6779, 29889, 1202, 29918, 5453, 29898, 29888, 29908, 13801, 29912, 29875, 17671, 4842, 305, 29889, 15755, 29889, 12697, 29898, 15501, 29940, 348, 1169, 29961, 29875, 1402, 3443, 29940, 348, 1169, 29961, 29875, 29974, 29896, 12622, 13, 9651, 1683, 29901, 13, 18884, 1583, 29889, 15501, 6779, 29889, 1202, 29918, 5453, 29898, 29888, 29908, 2674, 29884, 29912, 29875, 17671, 4842, 305, 29889, 15755, 29889, 1123, 29931, 29965, 3101, 13, 18884, 1583, 29889, 15501, 6779, 29889, 1202, 29918, 5453, 29898, 29888, 29908, 13801, 3744, 613, 4842, 305, 29889, 15755, 29889, 12697, 29898, 15501, 29940, 348, 1169, 29961, 29875, 1402, 302, 16744, 876, 13, 462, 13, 4706, 396, 1023, 8072, 6631, 1881, 322, 1962, 15359, 10365, 278, 1881, 322, 1962, 3964, 25059, 291, 304, 13, 4706, 396, 278, 7463, 9927, 13, 4706, 1583, 29889, 13801, 797, 353, 302, 29876, 29889, 12697, 29898, 2080, 29918, 6229, 29892, 7463, 29940, 348, 1169, 29961, 29900, 2314, 13, 4706, 1583, 29889, 13801, 3744, 353, 302, 29876, 29889, 12697, 29898, 7564, 29940, 348, 1169, 14352, 29896, 1402, 1962, 29918, 6229, 29897, 13, 308, 13, 13, 1678, 822, 6375, 29898, 1311, 29892, 921, 1125, 13, 4706, 9853, 29918, 2311, 29892, 903, 353, 921, 29889, 12181, 13, 308, 13, 4706, 396, 11905, 13516, 363, 1881, 6779, 13, 4706, 1881, 6779, 29924, 8141, 1575, 353, 5159, 13, 4706, 1881, 6779, 20517, 2129, 353, 5159, 13, 4706, 363, 474, 297, 3464, 29898, 2435, 29898, 1311, 29889, 7564, 29940, 348, 1169, 6817, 29896, 1125, 13, 9651, 1881, 6779, 29924, 8141, 1575, 29889, 4397, 4197, 7345, 305, 29889, 3298, 359, 29898, 16175, 29918, 2311, 29892, 1583, 29889, 7564, 29940, 348, 1169, 29961, 29875, 1402, 1583, 29889, 7564, 29940, 348, 1169, 29961, 29875, 29974, 29896, 2314, 2314, 13, 9651, 1881, 6779, 20517, 2129, 29889, 4397, 4197, 7345, 305, 29889, 3298, 359, 29898, 16175, 29918, 2311, 29892, 1583, 29889, 7564, 29940, 348, 1169, 29961, 29875, 29974, 29896, 1402, 29871, 29896, 29897, 2314, 13, 13, 4706, 396, 6219, 921, 964, 9128, 1788, 10970, 322, 4128, 13, 4706, 10970, 353, 921, 7503, 29892, 584, 1311, 29889, 2080, 29918, 6229, 29962, 13, 4706, 4128, 353, 921, 7503, 29892, 1583, 29889, 2080, 29918, 6229, 17531, 13, 308, 13, 4706, 396, 319, 29965, 29990, 29902, 5265, 19926, 349, 1718, 25797, 4945, 405, 2544, 11686, 29968, 13, 4706, 4128, 353, 1583, 29889, 15501, 6779, 29898, 16744, 29897, 13, 308, 13, 4706, 396, 5445, 1881, 6779, 29924, 8141, 1575, 411, 14391, 515, 3443, 6779, 13, 4706, 2380, 353, 29871, 29900, 13, 4706, 363, 474, 297, 3464, 29898, 2435, 29898, 1311, 29889, 7564, 29940, 348, 1169, 6817, 29896, 1125, 13, 9651, 2380, 29918, 7382, 353, 2380, 13, 9651, 2380, 4619, 1583, 29889, 7564, 29940, 348, 1169, 29961, 29875, 29962, 334, 1583, 29889, 7564, 29940, 348, 1169, 29961, 29875, 29974, 29896, 29962, 13, 9651, 1881, 6779, 29924, 8141, 1575, 29961, 29875, 29962, 353, 4128, 7503, 29892, 2380, 29918, 7382, 29901, 2248, 1822, 690, 14443, 29898, 16175, 29918, 2311, 29892, 1583, 29889, 7564, 29940, 348, 1169, 29961, 29875, 29974, 29896, 1402, 1583, 29889, 7564, 29940, 348, 1169, 29961, 29875, 2314, 13, 13, 4706, 396, 5445, 1881, 6779, 20517, 2129, 411, 14391, 515, 3443, 6779, 13, 4706, 363, 474, 297, 3464, 29898, 2435, 29898, 1311, 29889, 7564, 29940, 348, 1169, 6817, 29896, 1125, 13, 9651, 2380, 29918, 7382, 353, 2380, 13, 9651, 2380, 4619, 1583, 29889, 7564, 29940, 348, 1169, 29961, 29875, 29974, 29896, 29962, 13, 9651, 1881, 6779, 20517, 2129, 29961, 29875, 29962, 353, 4128, 7503, 29892, 2380, 29918, 7382, 29901, 2248, 1822, 690, 14443, 29898, 16175, 29918, 2311, 29892, 1583, 29889, 7564, 29940, 348, 1169, 29961, 29875, 29974, 29896, 1402, 29871, 29896, 29897, 13, 308, 13, 4706, 396, 14861, 1177, 2672, 12336, 405, 2544, 11686, 29968, 13, 4706, 10970, 353, 1583, 29889, 13801, 797, 29898, 2080, 29879, 467, 6948, 802, 29872, 911, 6278, 29896, 29897, 13, 4706, 396, 14861, 1177, 2672, 12336, 405, 2544, 11686, 29968, 13, 4706, 363, 474, 297, 3464, 29898, 2435, 29898, 1311, 29889, 7564, 29940, 348, 1169, 6817, 29896, 1125, 13, 9651, 396, 3394, 13516, 322, 4768, 2129, 925, 10423, 411, 14391, 515, 3443, 6779, 13, 9651, 10970, 353, 4842, 305, 29889, 29890, 4317, 29898, 2080, 6779, 29924, 8141, 1575, 29961, 29875, 1402, 10970, 29897, 13, 9651, 10970, 4619, 1881, 6779, 20517, 2129, 29961, 29875, 29962, 13, 9651, 10970, 353, 4842, 305, 29889, 2674, 29884, 29898, 2080, 29879, 29897, 13, 632, 13, 4706, 736, 1583, 29889, 13801, 3744, 29898, 2080, 29879, 29889, 29879, 802, 29872, 911, 6278, 29896, 876, 13, 268, 13, 1990, 26178, 4290, 9329, 2061, 573, 29898, 3318, 1125, 13, 1678, 396, 4529, 770, 304, 1560, 688, 6234, 5684, 6273, 964, 12091, 740, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 7945, 29918, 12657, 29892, 1243, 29918, 12657, 29892, 11636, 29918, 2084, 29892, 1881, 29918, 6229, 29892, 302, 7529, 29892, 1962, 29918, 6229, 29892, 3579, 4299, 5085, 1125, 13, 4706, 1583, 29889, 4299, 5085, 353, 1904, 5085, 13, 4706, 1583, 29889, 6008, 29918, 2084, 353, 11636, 29918, 2084, 13, 4706, 1583, 29889, 14968, 29918, 12657, 353, 7945, 29918, 12657, 13, 4706, 1583, 29889, 1688, 29918, 12657, 353, 1243, 29918, 12657, 13, 4706, 1583, 29889, 2080, 29918, 6229, 353, 1881, 29918, 6229, 13, 4706, 1583, 29889, 29876, 7529, 353, 302, 7529, 29871, 13, 4706, 1583, 29889, 4905, 29918, 6229, 353, 1962, 29918, 6229, 13, 13, 1678, 822, 4770, 4804, 12035, 1311, 29892, 14260, 1125, 13, 4706, 301, 29878, 353, 14260, 29889, 29879, 688, 7118, 29918, 1188, 29590, 703, 29212, 613, 29871, 29896, 29872, 29899, 29946, 29892, 29871, 29896, 29872, 29899, 29896, 29897, 13, 308, 13, 4706, 3443, 29940, 29277, 353, 14260, 29889, 29879, 688, 7118, 29918, 29883, 20440, 936, 703, 15501, 29940, 29277, 613, 518, 29896, 29892, 29871, 29906, 29892, 29871, 29941, 29892, 29871, 29946, 29892, 29871, 29945, 2314, 13, 4706, 3443, 29940, 348, 1169, 353, 5159, 13, 4706, 565, 3443, 29940, 29277, 1275, 29871, 29896, 29901, 13, 9651, 3443, 29940, 348, 1169, 29889, 4397, 29898, 524, 29898, 3626, 284, 29889, 29879, 688, 7118, 29918, 1188, 29590, 703, 29940, 348, 1169, 29896, 613, 29871, 29945, 29900, 29892, 29871, 29896, 29900, 29900, 29900, 4961, 13, 4706, 565, 3443, 29940, 29277, 1275, 29871, 29906, 29901, 13, 9651, 3443, 29940, 348, 1169, 29889, 4397, 29898, 524, 29898, 3626, 284, 29889, 29879, 688, 7118, 29918, 1188, 29590, 703, 29940, 348, 1169, 29896, 613, 29871, 29945, 29900, 29892, 29871, 29896, 29900, 29900, 29900, 4961, 13, 9651, 3443, 29940, 348, 1169, 29889, 4397, 29898, 524, 29898, 3626, 284, 29889, 29879, 688, 7118, 29918, 1188, 29590, 703, 29940, 348, 1169, 29906, 613, 29871, 29945, 29900, 29892, 29871, 29896, 29900, 29900, 29900, 4961, 13, 4706, 565, 3443, 29940, 29277, 1275, 29871, 29941, 29901, 13, 9651, 3443, 29940, 348, 1169, 29889, 4397, 29898, 524, 29898, 3626, 284, 29889, 29879, 688, 7118, 29918, 1188, 29590, 703, 29940, 348, 1169, 29896, 613, 29871, 29945, 29900, 29892, 29871, 29896, 29900, 29900, 29900, 4961, 13, 9651, 3443, 29940, 348, 1169, 29889, 4397, 29898, 524, 29898, 3626, 284, 29889, 29879, 688, 7118, 29918, 1188, 29590, 703, 29940, 348, 1169, 29906, 613, 29871, 29945, 29900, 29892, 29871, 29896, 29900, 29900, 29900, 4961, 13, 9651, 3443, 29940, 348, 1169, 29889, 4397, 29898, 524, 29898, 3626, 284, 29889, 29879, 688, 7118, 29918, 1188, 29590, 703, 29940, 348, 1169, 29941, 613, 29871, 29945, 29900, 29892, 29871, 29896, 29900, 29900, 29900, 4961, 13, 4706, 565, 3443, 29940, 29277, 1275, 29871, 29946, 29901, 13, 9651, 3443, 29940, 348, 1169, 29889, 4397, 29898, 524, 29898, 3626, 284, 29889, 29879, 688, 7118, 29918, 1188, 29590, 703, 29940, 348, 1169, 29896, 613, 29871, 29945, 29900, 29892, 29871, 29896, 29900, 29900, 29900, 4961, 13, 9651, 3443, 29940, 348, 1169, 29889, 4397, 29898, 524, 29898, 3626, 284, 29889, 29879, 688, 7118, 29918, 1188, 29590, 703, 29940, 348, 1169, 29906, 613, 29871, 29945, 29900, 29892, 29871, 29896, 29900, 29900, 29900, 4961, 13, 9651, 3443, 29940, 348, 1169, 29889, 4397, 29898, 524, 29898, 3626, 284, 29889, 29879, 688, 7118, 29918, 1188, 29590, 703, 29940, 348, 1169, 29941, 613, 29871, 29945, 29900, 29892, 29871, 29896, 29900, 29900, 29900, 4961, 13, 9651, 3443, 29940, 348, 1169, 29889, 4397, 29898, 524, 29898, 3626, 284, 29889, 29879, 688, 7118, 29918, 1188, 29590, 703, 29940, 348, 1169, 29946, 613, 29871, 29945, 29900, 29892, 29871, 29896, 29900, 29900, 29900, 4961, 13, 4706, 565, 3443, 29940, 29277, 1275, 29871, 29945, 29901, 13, 9651, 3443, 29940, 348, 1169, 29889, 4397, 29898, 524, 29898, 3626, 284, 29889, 29879, 688, 7118, 29918, 1188, 29590, 703, 29940, 348, 1169, 29896, 613, 29871, 29945, 29900, 29892, 29871, 29896, 29900, 29900, 29900, 4961, 13, 9651, 3443, 29940, 348, 1169, 29889, 4397, 29898, 524, 29898, 3626, 284, 29889, 29879, 688, 7118, 29918, 1188, 29590, 703, 29940, 348, 1169, 29906, 613, 29871, 29945, 29900, 29892, 29871, 29896, 29900, 29900, 29900, 4961, 13, 9651, 3443, 29940, 348, 1169, 29889, 4397, 29898, 524, 29898, 3626, 284, 29889, 29879, 688, 7118, 29918, 1188, 29590, 703, 29940, 348, 1169, 29941, 613, 29871, 29945, 29900, 29892, 29871, 29896, 29900, 29900, 29900, 4961, 13, 9651, 3443, 29940, 348, 1169, 29889, 4397, 29898, 524, 29898, 3626, 284, 29889, 29879, 688, 7118, 29918, 1188, 29590, 703, 29940, 348, 1169, 29946, 613, 29871, 29945, 29900, 29892, 29871, 29896, 29900, 29900, 29900, 4961, 13, 9651, 3443, 29940, 348, 1169, 29889, 4397, 29898, 524, 29898, 3626, 284, 29889, 29879, 688, 7118, 29918, 1188, 29590, 703, 29940, 348, 1169, 29945, 613, 29871, 29945, 29900, 29892, 29871, 29896, 29900, 29900, 29900, 4961, 13, 632, 13, 4706, 7463, 29940, 29277, 353, 14260, 29889, 29879, 688, 7118, 29918, 29883, 20440, 936, 703, 7564, 29940, 29277, 613, 518, 29896, 29892, 29871, 29906, 29892, 29871, 29941, 29892, 29871, 29946, 29892, 29871, 29945, 2314, 13, 4706, 7463, 29940, 348, 1169, 353, 5159, 13, 4706, 565, 3443, 29940, 29277, 1275, 29871, 29896, 29901, 13, 9651, 7463, 29940, 348, 1169, 29889, 4397, 29898, 524, 29898, 3626, 284, 29889, 29879, 688, 7118, 29918, 1188, 29590, 703, 29875, 29940, 348, 1169, 29896, 613, 29871, 29896, 29900, 29892, 29871, 29896, 29900, 29900, 4961, 13, 4706, 565, 3443, 29940, 29277, 1275, 29871, 29906, 29901, 13, 9651, 7463, 29940, 348, 1169, 29889, 4397, 29898, 524, 29898, 3626, 284, 29889, 29879, 688, 7118, 29918, 1188, 29590, 703, 29875, 29940, 348, 1169, 29896, 613, 29871, 29896, 29900, 29892, 29871, 29896, 29900, 29900, 4961, 13, 9651, 7463, 29940, 348, 1169, 29889, 4397, 29898, 524, 29898, 3626, 284, 29889, 29879, 688, 7118, 29918, 1188, 29590, 703, 29875, 29940, 348, 1169, 29906, 613, 29871, 29896, 29900, 29892, 29871, 29896, 29900, 29900, 4961, 13, 4706, 565, 3443, 29940, 29277, 1275, 29871, 29941, 29901, 13, 9651, 7463, 29940, 348, 1169, 29889, 4397, 29898, 524, 29898, 3626, 284, 29889, 29879, 688, 7118, 29918, 1188, 29590, 703, 29875, 29940, 348, 1169, 29896, 613, 29871, 29896, 29900, 29892, 29871, 29896, 29900, 29900, 4961, 13, 9651, 7463, 29940, 348, 1169, 29889, 4397, 29898, 524, 29898, 3626, 284, 29889, 29879, 688, 7118, 29918, 1188, 29590, 703, 29875, 29940, 348, 1169, 29906, 613, 29871, 29896, 29900, 29892, 29871, 29896, 29900, 29900, 4961, 13, 9651, 7463, 29940, 348, 1169, 29889, 4397, 29898, 524, 29898, 3626, 284, 29889, 29879, 688, 7118, 29918, 1188, 29590, 703, 29875, 29940, 348, 1169, 29941, 613, 29871, 29896, 29900, 29892, 29871, 29896, 29900, 29900, 4961, 13, 4706, 565, 3443, 29940, 29277, 1275, 29871, 29946, 29901, 13, 9651, 7463, 29940, 348, 1169, 29889, 4397, 29898, 524, 29898, 3626, 284, 29889, 29879, 688, 7118, 29918, 1188, 29590, 703, 29875, 29940, 348, 1169, 29896, 613, 29871, 29896, 29900, 29892, 29871, 29896, 29900, 29900, 4961, 13, 9651, 7463, 29940, 348, 1169, 29889, 4397, 29898, 524, 29898, 3626, 284, 29889, 29879, 688, 7118, 29918, 1188, 29590, 703, 29875, 29940, 348, 1169, 29906, 613, 29871, 29896, 29900, 29892, 29871, 29896, 29900, 29900, 4961, 13, 9651, 7463, 29940, 348, 1169, 29889, 4397, 29898, 524, 29898, 3626, 284, 29889, 29879, 688, 7118, 29918, 1188, 29590, 703, 29875, 29940, 348, 1169, 29941, 613, 29871, 29896, 29900, 29892, 29871, 29896, 29900, 29900, 4961, 13, 9651, 7463, 29940, 348, 1169, 29889, 4397, 29898, 524, 29898, 3626, 284, 29889, 29879, 688, 7118, 29918, 1188, 29590, 703, 29875, 29940, 348, 1169, 29946, 613, 29871, 29896, 29900, 29892, 29871, 29896, 29900, 29900, 4961, 13, 4706, 565, 3443, 29940, 29277, 1275, 29871, 29945, 29901, 13, 9651, 7463, 29940, 348, 1169, 29889, 4397, 29898, 524, 29898, 3626, 284, 29889, 29879, 688, 7118, 29918, 1188, 29590, 703, 29875, 29940, 348, 1169, 29896, 613, 29871, 29896, 29900, 29892, 29871, 29896, 29900, 29900, 4961, 13, 9651, 7463, 29940, 348, 1169, 29889, 4397, 29898, 524, 29898, 3626, 284, 29889, 29879, 688, 7118, 29918, 1188, 29590, 703, 29875, 29940, 348, 1169, 29906, 613, 29871, 29896, 29900, 29892, 29871, 29896, 29900, 29900, 4961, 13, 9651, 7463, 29940, 348, 1169, 29889, 4397, 29898, 524, 29898, 3626, 284, 29889, 29879, 688, 7118, 29918, 1188, 29590, 703, 29875, 29940, 348, 1169, 29941, 613, 29871, 29896, 29900, 29892, 29871, 29896, 29900, 29900, 4961, 13, 9651, 7463, 29940, 348, 1169, 29889, 4397, 29898, 524, 29898, 3626, 284, 29889, 29879, 688, 7118, 29918, 1188, 29590, 703, 29875, 29940, 348, 1169, 29946, 613, 29871, 29896, 29900, 29892, 29871, 29896, 29900, 29900, 4961, 13, 9651, 7463, 29940, 348, 1169, 29889, 4397, 29898, 524, 29898, 3626, 284, 29889, 29879, 688, 7118, 29918, 1188, 29590, 703, 29875, 29940, 348, 1169, 29945, 613, 29871, 29896, 29900, 29892, 29871, 29896, 29900, 29900, 4961, 13, 13, 4706, 1024, 353, 285, 29908, 29912, 1311, 29889, 6008, 29918, 2084, 2403, 29894, 29912, 3626, 284, 29889, 4537, 5038, 396, 3258, 1024, 411, 14260, 2380, 13, 4706, 995, 29892, 1904, 29918, 2084, 353, 17558, 29918, 28327, 29918, 26495, 29889, 7501, 2410, 29918, 29873, 5080, 29918, 13239, 29889, 14968, 29918, 7888, 29918, 1727, 29918, 4299, 29898, 13, 462, 462, 1669, 1583, 29889, 14968, 29918, 12657, 29892, 13, 462, 462, 1669, 1583, 29889, 1688, 29918, 12657, 29892, 13, 462, 462, 1669, 1024, 29892, 13, 462, 462, 1669, 1583, 29889, 2080, 29918, 6229, 29892, 13, 462, 462, 1669, 1583, 29889, 29876, 7529, 29892, 13, 462, 462, 1669, 1583, 29889, 4905, 29918, 6229, 29892, 13, 462, 462, 1669, 8125, 353, 26178, 4290, 9329, 6779, 29892, 13, 462, 462, 1669, 3443, 29940, 348, 1169, 353, 3443, 29940, 348, 1169, 29892, 29871, 13, 462, 462, 1669, 7463, 29940, 348, 1169, 353, 7463, 29940, 348, 1169, 29892, 29871, 13, 462, 462, 1669, 301, 29878, 353, 301, 29878, 29892, 29871, 13, 462, 462, 1669, 3579, 1311, 29889, 4299, 5085, 29897, 13, 4706, 14260, 29889, 842, 29918, 1792, 29918, 5552, 877, 4299, 29918, 2084, 742, 1904, 29918, 2084, 29897, 396, 7620, 278, 1904, 2224, 1347, 297, 16938, 6559, 13, 4706, 736, 995, 2 ]
slackforms/conf.py
Albatrous/django-slack-forms
1
43546
""" Use this file to configure pluggable app settings and resolve defaults with any overrides set in project settings. """ from django.conf import settings as project_settings class Settings: pass Settings.SECRET_KEY = getattr( project_settings, "SLACKFORMS_SECRET_KEY", "a-bad-secret-key" ) Settings.SLACK_VERIFICATION_TOKEN = getattr( project_settings, "SLACKFORMS_SLACK_VERIFICATION_TOKEN", "" ) Settings.SLACK_BOT_TOKEN = getattr( project_settings, "SLACKFORMS_SLACK_BOT_TOKEN", "" ) Settings.SLACK_API_TOKEN = getattr( project_settings, "SLACKFORMS_SLACK_API_TOKEN", "" ) Settings.ROOT_URL = getattr(project_settings, "SLACKFORMS_ROOT_URL", "") settings = Settings
[ 1, 9995, 13, 11403, 445, 934, 304, 10822, 715, 12981, 519, 623, 6055, 322, 8814, 21274, 13, 2541, 738, 975, 24040, 731, 297, 2060, 6055, 29889, 13, 15945, 29908, 13, 13, 3166, 9557, 29889, 5527, 1053, 6055, 408, 2060, 29918, 11027, 13, 13, 13, 1990, 19215, 29901, 13, 1678, 1209, 13, 13, 13, 9585, 29889, 1660, 22245, 29911, 29918, 10818, 353, 679, 5552, 29898, 13, 1678, 2060, 29918, 11027, 29892, 376, 12750, 11375, 22051, 4345, 29918, 1660, 22245, 29911, 29918, 10818, 613, 376, 29874, 29899, 12313, 29899, 19024, 29899, 1989, 29908, 13, 29897, 13, 13, 9585, 29889, 12750, 11375, 29918, 5348, 6545, 28541, 29918, 4986, 29968, 1430, 353, 679, 5552, 29898, 13, 1678, 2060, 29918, 11027, 29892, 376, 12750, 11375, 22051, 4345, 29918, 12750, 11375, 29918, 5348, 6545, 28541, 29918, 4986, 29968, 1430, 613, 5124, 13, 29897, 13, 13, 9585, 29889, 12750, 11375, 29918, 29933, 2891, 29918, 4986, 29968, 1430, 353, 679, 5552, 29898, 13, 1678, 2060, 29918, 11027, 29892, 376, 12750, 11375, 22051, 4345, 29918, 12750, 11375, 29918, 29933, 2891, 29918, 4986, 29968, 1430, 613, 5124, 13, 29897, 13, 13, 9585, 29889, 12750, 11375, 29918, 8787, 29918, 4986, 29968, 1430, 353, 679, 5552, 29898, 13, 1678, 2060, 29918, 11027, 29892, 376, 12750, 11375, 22051, 4345, 29918, 12750, 11375, 29918, 8787, 29918, 4986, 29968, 1430, 613, 5124, 13, 29897, 13, 13, 9585, 29889, 21289, 29918, 4219, 353, 679, 5552, 29898, 4836, 29918, 11027, 29892, 376, 12750, 11375, 22051, 4345, 29918, 21289, 29918, 4219, 613, 20569, 13, 13, 11027, 353, 19215, 13, 2 ]
blog/models.py
gnidoc327/django_web_dev_bookmark
0
87666
from __future__ import unicode_literals from django.contrib.auth.models import User from django.utils.encoding import python_2_unicode_compatible from django.db import models from django.core.urlresolvers import reverse @python_2_unicode_compatible class Post(models.Model): title = models.CharField('TITLE',max_length=50) slug = models.SlugField('SLUG', unique=True, allow_unicode=True, help_text='one word for title alias.') description = models.CharField('DESCRIPTION', max_length=100, blank=True, help_text='simple description text') content = models.TextField('CONTENT') create_date = models.DateTimeField('Create Date', auto_now_add=True) modify_date = models.DateTimeField('Modify Date', auto_now=True) owner = models.ForeignKey(User, null=True) class Meta: verbose_name = 'post' verbose_name_plural = 'posts' db_table = 'my_post' ordering = ('-modify_date',) def __str__(self): return self.title def get_absolute_url(self): return reverse('blog:post_detail', args=(self.slug,)) def get_previous_post(self): return self.get_previous_by_modify_date() def get_next_post(self): return self.get_next_by_modify_date()
[ 1, 515, 4770, 29888, 9130, 1649, 1053, 29104, 29918, 20889, 1338, 13, 13, 3166, 9557, 29889, 21570, 29889, 5150, 29889, 9794, 1053, 4911, 13, 3166, 9557, 29889, 13239, 29889, 22331, 1053, 3017, 29918, 29906, 29918, 2523, 356, 29918, 23712, 13, 3166, 9557, 29889, 2585, 1053, 4733, 13, 3166, 9557, 29889, 3221, 29889, 2271, 9778, 874, 1053, 11837, 13, 13, 13, 29992, 4691, 29918, 29906, 29918, 2523, 356, 29918, 23712, 13, 1990, 4918, 29898, 9794, 29889, 3195, 1125, 13, 1678, 3611, 353, 4733, 29889, 27890, 877, 29911, 1806, 1307, 742, 3317, 29918, 2848, 29922, 29945, 29900, 29897, 13, 1678, 2243, 688, 353, 4733, 29889, 16973, 688, 3073, 877, 12750, 23338, 742, 5412, 29922, 5574, 29892, 2758, 29918, 2523, 356, 29922, 5574, 29892, 1371, 29918, 726, 2433, 650, 1734, 363, 3611, 13995, 29889, 1495, 13, 1678, 6139, 353, 4733, 29889, 27890, 877, 2287, 7187, 24290, 2725, 742, 4236, 29918, 2848, 29922, 29896, 29900, 29900, 29892, 9654, 29922, 5574, 29892, 1371, 29918, 726, 2433, 12857, 6139, 1426, 1495, 13, 1678, 2793, 353, 4733, 29889, 15778, 877, 22412, 3919, 1495, 13, 1678, 1653, 29918, 1256, 353, 4733, 29889, 11384, 3073, 877, 4391, 4712, 742, 4469, 29918, 3707, 29918, 1202, 29922, 5574, 29897, 13, 1678, 6623, 29918, 1256, 353, 4733, 29889, 11384, 3073, 877, 2111, 1598, 4712, 742, 4469, 29918, 3707, 29922, 5574, 29897, 13, 1678, 12271, 353, 4733, 29889, 27755, 2558, 29898, 2659, 29892, 1870, 29922, 5574, 29897, 13, 13, 1678, 770, 20553, 29901, 13, 4706, 26952, 29918, 978, 353, 525, 2490, 29915, 13, 4706, 26952, 29918, 978, 29918, 572, 3631, 353, 525, 14080, 29915, 13, 4706, 4833, 29918, 2371, 353, 525, 1357, 29918, 2490, 29915, 13, 4706, 20520, 353, 6702, 29899, 1545, 1598, 29918, 1256, 742, 29897, 13, 13, 1678, 822, 4770, 710, 12035, 1311, 1125, 13, 4706, 736, 1583, 29889, 3257, 13, 13, 1678, 822, 679, 29918, 23552, 29918, 2271, 29898, 1311, 1125, 13, 4706, 736, 11837, 877, 7312, 29901, 2490, 29918, 16432, 742, 6389, 7607, 1311, 29889, 29517, 29892, 876, 13, 13, 1678, 822, 679, 29918, 24957, 29918, 2490, 29898, 1311, 1125, 13, 4706, 736, 1583, 29889, 657, 29918, 24957, 29918, 1609, 29918, 1545, 1598, 29918, 1256, 580, 13, 13, 1678, 822, 679, 29918, 4622, 29918, 2490, 29898, 1311, 1125, 13, 4706, 736, 1583, 29889, 657, 29918, 4622, 29918, 1609, 29918, 1545, 1598, 29918, 1256, 580, 13, 2 ]
src/app/bin/slack.py
bclarkejr/slack-alerts
8
96173
<filename>src/app/bin/slack.py import json import re import sys import time import traceback from copy import deepcopy from fnmatch import fnmatch from safe_fmt import safe_format from six import ensure_binary from six.moves import urllib SEVERITY_COLORS = ['#555555','#6DB7C6','#65A637','#F7BC38','#F58F39','#D93F3C'] OK = 0 ERROR_CODE_UNKNOWN = 1 ERROR_CODE_VALIDATION_FAILED = 2 ERROR_CODE_CHANNEL_NOT_FOUND = 3 ERROR_CODE_FORBIDDEN = 4 ERROR_CODE_HTTP_FAIL = 5 ERROR_CODE_UNEXPECTED = 6 def log(msg, *args): sys.stderr.write(msg + " ".join([str(a) for a in args]) + "\n") def build_fields_attachment(payload): res = payload.get('result', dict()) available_fields = list(res.keys()) field_attachments = [] seen_fields = set() field_list = re.split(r'\s*,\s*', payload['configuration'].get('fields', '').strip()) for f in field_list: for af in available_fields: if af not in seen_fields and fnmatch(af, f): seen_fields.add(af) val = res[af] if isinstance(val, list): val = val[0] field_attachments.append(dict(title=af, value=val, short=True)) return field_attachments def format_template(template_key, payload, fallback=''): config = payload['configuration'] template = config.get(template_key) if template is not None: fallback = template try: args = deepcopy(payload) args['configuration']['webhook_url'] = '****' args['configuration']['webhook_url_override'] = '****' return safe_format(template, args) except: log("WARN Failed to format template %s \"%s\" -" % (template_key, template), sys.exc_info()[1]) return fallback def build_alert_attachment(payload): config = payload['configuration'] attachment = dict() if 'info_severity' in config: try: attachment['color'] = SEVERITY_COLORS[int(config['info_severity'])] except: pass attachment['fallback'] = format_template('attachment_fallback', payload) attachment_title_key = 'attachment_alert_title' if payload.get('search_name') else 'attachment_adhoc_title' attachment['title'] = format_template(attachment_title_key, payload, 'Alert') if config.get('attachment', 'none') == 'message': attachment['text'] = format_template('message', payload) else: attachment['text'] = format_template('attachment_results_link', payload) attachment['title_link'] = config.get('view_link') attachment['footer'] = format_template('attachment_footer_text', payload) attachment['footer_icon'] = 'https://s3-us-west-1.amazonaws.com/ziegfried-apps/slack-alerts/splunk-icon.png' try: attachment['ts'] = int(float(config.get('info_trigger_time'))) except: pass if config.get('fields'): attachment['fields'] = build_fields_attachment(payload) return attachment def build_slack_message(payload): config = payload.get('configuration') params = dict() if config['attachment'] != 'message': params['text'] = format_template('message', payload) params['username'] = config.get('from_user', 'Splunk') params['icon_url'] = config.get('from_user_icon') channel = config.get('channel') if channel: params['channel'] = channel else: log("WARN No channel supplied, using default for webhook") if config.get('attachment', 'none') != 'none': params['attachments'] = [build_alert_attachment(payload)] elif config.get('fields'): params['attachments'] = [dict(fields=build_fields_attachment(payload))] return params def send_slack_message(payload): try: config = payload.get('configuration') url = config.get('webhook_url', '') if config.get('webhook_url_override'): url = config.get('webhook_url_override', '') log("INFO Using webhook URL from webhook_url_override: %s" % url) elif not url: log("FATAL No webhook URL configured and no override specified") return ERROR_CODE_VALIDATION_FAILED else: log("INFO Using configured webhook URL: %s" % url) if not url.startswith('https:'): log("FATAL Invalid webhook URL specified. The URL must use HTTPS.") return ERROR_CODE_VALIDATION_FAILED body = json.dumps(build_slack_message(payload)) log('DEBUG Calling url="%s" with body=%s' % (url, body)) req = urllib.request.Request(url, ensure_binary(body), {"Content-Type": "application/json"}) try: res = urllib.request.urlopen(req) body = res.read() log("INFO Slack API responded with HTTP status=%d" % res.code) log("DEBUG Slack API response: %s" % body) if 200 <= res.code < 300: return OK except urllib.error.HTTPError as e: log("ERROR HTTP request to Slack webhook URL failed: %s" % e) try: res = e.read() log("ERROR Slack error response: %s" % res) if res in ('channel_not_found', 'channel_is_archived'): return ERROR_CODE_CHANNEL_NOT_FOUND if res == 'action_prohibited': return ERROR_CODE_FORBIDDEN except: pass return ERROR_CODE_HTTP_FAIL except: log("FATAL Unexpected error:", sys.exc_info()[0]) track = traceback.format_exc() log(track) return ERROR_CODE_UNEXPECTED def validate_payload(payload): if not 'configuration' in payload: log("FATAL Invalid payload, missing 'configuration'") return False config = payload.get('configuration') channel = config.get('channel') if channel and (channel[0] != '#' and channel[0] != '@'): # Only warn here for now log("WARN Validation warning: Parameter `channel` \"%s\" should start with # or @" % channel) msg = config.get('message') if not msg: log("FATAL Validation error: Parameter `message` is missing or empty") return False att = config.get('attachment') if att and att not in ('alert_link', 'message'): log("WARN Validation warning: Parameter `attachment` must be ether \"alert_link\" or \"message\"") return True if __name__ == '__main__': log("INFO Running python %s" % (sys.version_info[0])) if len(sys.argv) > 1 and sys.argv[1] == "--execute": payload = json.loads(sys.stdin.read()) if not validate_payload(payload): sys.exit(ERROR_CODE_VALIDATION_FAILED) result = send_slack_message(payload) if result == OK: log("INFO Successfully sent slack message") else: log("FATAL Alert action failed") sys.exit(result)
[ 1, 529, 9507, 29958, 4351, 29914, 932, 29914, 2109, 29914, 29879, 2364, 29889, 2272, 13, 5215, 4390, 13, 5215, 337, 13, 5215, 10876, 13, 5215, 931, 13, 5215, 9637, 1627, 13, 3166, 3509, 1053, 6483, 8552, 13, 3166, 7876, 4352, 1053, 7876, 4352, 13, 3166, 9109, 29918, 23479, 1053, 9109, 29918, 4830, 13, 3166, 4832, 1053, 9801, 29918, 19541, 13, 3166, 4832, 29889, 13529, 267, 1053, 3142, 1982, 13, 13, 1660, 5348, 11937, 29918, 15032, 24125, 353, 6024, 29937, 29945, 29945, 29945, 29945, 29945, 29945, 3788, 29937, 29953, 4051, 29955, 29907, 29953, 3788, 29937, 29953, 29945, 29909, 29953, 29941, 29955, 3788, 29937, 29943, 29955, 5371, 29941, 29947, 3788, 29937, 29943, 29945, 29947, 29943, 29941, 29929, 3788, 29937, 29928, 29929, 29941, 29943, 29941, 29907, 2033, 13, 13, 8949, 353, 29871, 29900, 13, 11432, 29918, 16524, 29918, 3904, 29968, 6632, 16048, 353, 29871, 29896, 13, 11432, 29918, 16524, 29918, 26707, 8098, 29918, 4519, 29902, 20566, 353, 29871, 29906, 13, 11432, 29918, 16524, 29918, 3210, 2190, 29940, 6670, 29918, 12256, 29918, 5800, 18783, 353, 29871, 29941, 13, 11432, 29918, 16524, 29918, 22051, 29933, 1367, 29928, 1430, 353, 29871, 29946, 13, 11432, 29918, 16524, 29918, 10493, 29918, 4519, 6227, 353, 29871, 29945, 13, 11432, 29918, 16524, 29918, 3904, 5746, 4162, 1783, 3352, 353, 29871, 29953, 13, 13, 1753, 1480, 29898, 7645, 29892, 334, 5085, 1125, 13, 1678, 10876, 29889, 303, 20405, 29889, 3539, 29898, 7645, 718, 376, 11393, 7122, 4197, 710, 29898, 29874, 29897, 363, 263, 297, 6389, 2314, 718, 6634, 29876, 1159, 13, 13, 1753, 2048, 29918, 9621, 29918, 14930, 358, 29898, 23813, 1125, 13, 1678, 620, 353, 20092, 29889, 657, 877, 2914, 742, 9657, 3101, 13, 1678, 3625, 29918, 9621, 353, 1051, 29898, 690, 29889, 8149, 3101, 13, 1678, 1746, 29918, 14930, 1860, 353, 5159, 13, 1678, 3595, 29918, 9621, 353, 731, 580, 13, 1678, 1746, 29918, 1761, 353, 337, 29889, 5451, 29898, 29878, 12764, 29879, 29930, 2053, 29879, 29930, 742, 20092, 1839, 13305, 13359, 657, 877, 9621, 742, 525, 2824, 17010, 3101, 13, 1678, 363, 285, 297, 1746, 29918, 1761, 29901, 13, 4706, 363, 2511, 297, 3625, 29918, 9621, 29901, 13, 9651, 565, 2511, 451, 297, 3595, 29918, 9621, 322, 7876, 4352, 29898, 2142, 29892, 285, 1125, 13, 18884, 3595, 29918, 9621, 29889, 1202, 29898, 2142, 29897, 13, 18884, 659, 353, 620, 29961, 2142, 29962, 13, 18884, 565, 338, 8758, 29898, 791, 29892, 1051, 1125, 13, 462, 1678, 659, 353, 659, 29961, 29900, 29962, 13, 18884, 1746, 29918, 14930, 1860, 29889, 4397, 29898, 8977, 29898, 3257, 29922, 2142, 29892, 995, 29922, 791, 29892, 3273, 29922, 5574, 876, 13, 1678, 736, 1746, 29918, 14930, 1860, 13, 13, 1753, 3402, 29918, 6886, 29898, 6886, 29918, 1989, 29892, 20092, 29892, 6416, 1627, 2433, 29374, 13, 1678, 2295, 353, 20092, 1839, 13305, 2033, 13, 1678, 4472, 353, 2295, 29889, 657, 29898, 6886, 29918, 1989, 29897, 13, 1678, 565, 4472, 338, 451, 6213, 29901, 13, 4706, 6416, 1627, 353, 4472, 13, 4706, 1018, 29901, 13, 9651, 6389, 353, 6483, 8552, 29898, 23813, 29897, 13, 9651, 6389, 1839, 13305, 16215, 2676, 20849, 29918, 2271, 2033, 353, 525, 2328, 29915, 13, 9651, 6389, 1839, 13305, 16215, 2676, 20849, 29918, 2271, 29918, 15752, 2033, 353, 525, 2328, 29915, 13, 9651, 736, 9109, 29918, 4830, 29898, 6886, 29892, 6389, 29897, 13, 4706, 5174, 29901, 13, 9651, 1480, 703, 29956, 15249, 18390, 304, 3402, 4472, 1273, 29879, 13218, 29995, 29879, 5931, 448, 29908, 1273, 313, 6886, 29918, 1989, 29892, 4472, 511, 10876, 29889, 735, 29883, 29918, 3888, 580, 29961, 29896, 2314, 13, 1678, 736, 6416, 1627, 13, 13, 1753, 2048, 29918, 12888, 29918, 14930, 358, 29898, 23813, 1125, 13, 1678, 2295, 353, 20092, 1839, 13305, 2033, 13, 1678, 26305, 353, 9657, 580, 13, 1678, 565, 525, 3888, 29918, 344, 369, 537, 29915, 297, 2295, 29901, 13, 4706, 1018, 29901, 13, 9651, 26305, 1839, 2780, 2033, 353, 3725, 5348, 11937, 29918, 15032, 24125, 29961, 524, 29898, 2917, 1839, 3888, 29918, 344, 369, 537, 2033, 4638, 13, 4706, 5174, 29901, 1209, 13, 1678, 26305, 1839, 11950, 1627, 2033, 353, 3402, 29918, 6886, 877, 14930, 358, 29918, 11950, 1627, 742, 20092, 29897, 13, 1678, 26305, 29918, 3257, 29918, 1989, 353, 525, 14930, 358, 29918, 12888, 29918, 3257, 29915, 565, 20092, 29889, 657, 877, 4478, 29918, 978, 1495, 1683, 525, 14930, 358, 29918, 328, 29882, 542, 29918, 3257, 29915, 13, 1678, 26305, 1839, 3257, 2033, 353, 3402, 29918, 6886, 29898, 14930, 358, 29918, 3257, 29918, 1989, 29892, 20092, 29892, 525, 16649, 1495, 13, 1678, 565, 2295, 29889, 657, 877, 14930, 358, 742, 525, 9290, 1495, 1275, 525, 4906, 2396, 13, 4706, 26305, 1839, 726, 2033, 353, 3402, 29918, 6886, 877, 4906, 742, 20092, 29897, 13, 1678, 1683, 29901, 13, 4706, 26305, 1839, 726, 2033, 353, 3402, 29918, 6886, 877, 14930, 358, 29918, 9902, 29918, 2324, 742, 20092, 29897, 13, 1678, 26305, 1839, 3257, 29918, 2324, 2033, 353, 2295, 29889, 657, 877, 1493, 29918, 2324, 1495, 13, 1678, 26305, 1839, 21720, 2033, 353, 3402, 29918, 6886, 877, 14930, 358, 29918, 21720, 29918, 726, 742, 20092, 29897, 13, 1678, 26305, 1839, 21720, 29918, 4144, 2033, 353, 525, 991, 597, 29879, 29941, 29899, 375, 29899, 5933, 29899, 29896, 29889, 17260, 10467, 29889, 510, 29914, 3914, 29887, 17283, 29899, 13371, 29914, 29879, 2364, 29899, 12888, 29879, 29914, 23579, 2960, 29899, 4144, 29889, 2732, 29915, 13, 1678, 1018, 29901, 13, 4706, 26305, 1839, 1372, 2033, 353, 938, 29898, 7411, 29898, 2917, 29889, 657, 877, 3888, 29918, 21001, 29918, 2230, 29915, 4961, 13, 1678, 5174, 29901, 1209, 13, 1678, 565, 2295, 29889, 657, 877, 9621, 29374, 13, 4706, 26305, 1839, 9621, 2033, 353, 2048, 29918, 9621, 29918, 14930, 358, 29898, 23813, 29897, 13, 1678, 736, 26305, 13, 13, 1753, 2048, 29918, 29879, 2364, 29918, 4906, 29898, 23813, 1125, 13, 1678, 2295, 353, 20092, 29889, 657, 877, 13305, 1495, 13, 1678, 8636, 353, 9657, 580, 13, 13, 1678, 565, 2295, 1839, 14930, 358, 2033, 2804, 525, 4906, 2396, 13, 4706, 8636, 1839, 726, 2033, 353, 3402, 29918, 6886, 877, 4906, 742, 20092, 29897, 13, 1678, 8636, 1839, 6786, 2033, 353, 2295, 29889, 657, 877, 3166, 29918, 1792, 742, 525, 29903, 572, 2960, 1495, 13, 1678, 8636, 1839, 4144, 29918, 2271, 2033, 353, 2295, 29889, 657, 877, 3166, 29918, 1792, 29918, 4144, 1495, 13, 13, 1678, 8242, 353, 2295, 29889, 657, 877, 12719, 1495, 13, 1678, 565, 8242, 29901, 13, 4706, 8636, 1839, 12719, 2033, 353, 8242, 13, 1678, 1683, 29901, 13, 4706, 1480, 703, 29956, 15249, 1939, 8242, 19056, 29892, 773, 2322, 363, 1856, 20849, 1159, 13, 13, 1678, 565, 2295, 29889, 657, 877, 14930, 358, 742, 525, 9290, 1495, 2804, 525, 9290, 2396, 13, 4706, 8636, 1839, 14930, 1860, 2033, 353, 518, 4282, 29918, 12888, 29918, 14930, 358, 29898, 23813, 4638, 13, 1678, 25342, 2295, 29889, 657, 877, 9621, 29374, 13, 4706, 8636, 1839, 14930, 1860, 2033, 353, 518, 8977, 29898, 9621, 29922, 4282, 29918, 9621, 29918, 14930, 358, 29898, 23813, 28166, 13, 1678, 736, 8636, 13, 13, 1753, 3638, 29918, 29879, 2364, 29918, 4906, 29898, 23813, 1125, 13, 1678, 1018, 29901, 13, 4706, 2295, 353, 20092, 29889, 657, 877, 13305, 1495, 13, 4706, 3142, 353, 2295, 29889, 657, 877, 2676, 20849, 29918, 2271, 742, 27255, 13, 4706, 565, 2295, 29889, 657, 877, 2676, 20849, 29918, 2271, 29918, 15752, 29374, 13, 9651, 3142, 353, 2295, 29889, 657, 877, 2676, 20849, 29918, 2271, 29918, 15752, 742, 27255, 13, 9651, 1480, 703, 11690, 5293, 1856, 20849, 3988, 515, 1856, 20849, 29918, 2271, 29918, 15752, 29901, 1273, 29879, 29908, 1273, 3142, 29897, 13, 4706, 25342, 451, 3142, 29901, 13, 9651, 1480, 703, 29943, 1299, 1964, 1939, 1856, 20849, 3988, 13252, 322, 694, 5712, 6790, 1159, 13, 9651, 736, 14431, 29918, 16524, 29918, 26707, 8098, 29918, 4519, 29902, 20566, 13, 4706, 1683, 29901, 13, 9651, 1480, 703, 11690, 5293, 13252, 1856, 20849, 3988, 29901, 1273, 29879, 29908, 1273, 3142, 29897, 13, 13, 4706, 565, 451, 3142, 29889, 27382, 2541, 877, 991, 11283, 1125, 13, 9651, 1480, 703, 29943, 1299, 1964, 21403, 1856, 20849, 3988, 6790, 29889, 450, 3988, 1818, 671, 7331, 29903, 23157, 13, 9651, 736, 14431, 29918, 16524, 29918, 26707, 8098, 29918, 4519, 29902, 20566, 13, 13, 4706, 3573, 353, 4390, 29889, 29881, 17204, 29898, 4282, 29918, 29879, 2364, 29918, 4906, 29898, 23813, 876, 13, 13, 4706, 1480, 877, 18525, 8251, 292, 3142, 543, 29995, 29879, 29908, 411, 3573, 16328, 29879, 29915, 1273, 313, 2271, 29892, 3573, 876, 13, 4706, 12428, 353, 3142, 1982, 29889, 3827, 29889, 3089, 29898, 2271, 29892, 9801, 29918, 19541, 29898, 2587, 511, 8853, 3916, 29899, 1542, 1115, 376, 6214, 29914, 3126, 29908, 1800, 13, 4706, 1018, 29901, 13, 9651, 620, 353, 3142, 1982, 29889, 3827, 29889, 332, 417, 2238, 29898, 7971, 29897, 13, 9651, 3573, 353, 620, 29889, 949, 580, 13, 9651, 1480, 703, 11690, 317, 2364, 3450, 10049, 287, 411, 7331, 4660, 16328, 29881, 29908, 1273, 620, 29889, 401, 29897, 13, 9651, 1480, 703, 18525, 317, 2364, 3450, 2933, 29901, 1273, 29879, 29908, 1273, 3573, 29897, 13, 9651, 565, 29871, 29906, 29900, 29900, 5277, 620, 29889, 401, 529, 29871, 29941, 29900, 29900, 29901, 13, 18884, 736, 9280, 13, 4706, 5174, 3142, 1982, 29889, 2704, 29889, 10493, 2392, 408, 321, 29901, 13, 9651, 1480, 703, 11432, 7331, 2009, 304, 317, 2364, 1856, 20849, 3988, 5229, 29901, 1273, 29879, 29908, 1273, 321, 29897, 13, 9651, 1018, 29901, 13, 18884, 620, 353, 321, 29889, 949, 580, 13, 18884, 1480, 703, 11432, 317, 2364, 1059, 2933, 29901, 1273, 29879, 29908, 1273, 620, 29897, 13, 18884, 565, 620, 297, 6702, 12719, 29918, 1333, 29918, 11940, 742, 525, 12719, 29918, 275, 29918, 1279, 2347, 29374, 13, 462, 1678, 736, 14431, 29918, 16524, 29918, 3210, 2190, 29940, 6670, 29918, 12256, 29918, 5800, 18783, 13, 18884, 565, 620, 1275, 525, 2467, 29918, 771, 6335, 1573, 2396, 13, 462, 1678, 736, 14431, 29918, 16524, 29918, 22051, 29933, 1367, 29928, 1430, 13, 9651, 5174, 29901, 13, 18884, 1209, 13, 9651, 736, 14431, 29918, 16524, 29918, 10493, 29918, 4519, 6227, 13, 1678, 5174, 29901, 13, 4706, 1480, 703, 29943, 1299, 1964, 10016, 29916, 6021, 1059, 29901, 613, 10876, 29889, 735, 29883, 29918, 3888, 580, 29961, 29900, 2314, 13, 4706, 5702, 353, 9637, 1627, 29889, 4830, 29918, 735, 29883, 580, 13, 4706, 1480, 29898, 11294, 29897, 13, 4706, 736, 14431, 29918, 16524, 29918, 3904, 5746, 4162, 1783, 3352, 13, 13, 1753, 12725, 29918, 23813, 29898, 23813, 1125, 13, 1678, 565, 451, 525, 13305, 29915, 297, 20092, 29901, 13, 4706, 1480, 703, 29943, 1299, 1964, 21403, 20092, 29892, 4567, 525, 13305, 29915, 1159, 13, 4706, 736, 7700, 13, 1678, 2295, 353, 20092, 29889, 657, 877, 13305, 1495, 13, 1678, 8242, 353, 2295, 29889, 657, 877, 12719, 1495, 13, 13, 1678, 565, 8242, 322, 313, 12719, 29961, 29900, 29962, 2804, 16321, 29915, 322, 8242, 29961, 29900, 29962, 2804, 18803, 29374, 13, 4706, 396, 9333, 29383, 1244, 363, 1286, 13, 4706, 1480, 703, 29956, 15249, 15758, 362, 9177, 29901, 24953, 421, 12719, 29952, 13218, 29995, 29879, 5931, 881, 1369, 411, 396, 470, 12490, 1273, 8242, 29897, 13, 13, 1678, 10191, 353, 2295, 29889, 657, 877, 4906, 1495, 13, 1678, 565, 451, 10191, 29901, 13, 4706, 1480, 703, 29943, 1299, 1964, 15758, 362, 1059, 29901, 24953, 421, 4906, 29952, 338, 4567, 470, 4069, 1159, 13, 4706, 736, 7700, 13, 13, 1678, 1098, 353, 2295, 29889, 657, 877, 14930, 358, 1495, 13, 1678, 565, 1098, 322, 1098, 451, 297, 6702, 12888, 29918, 2324, 742, 525, 4906, 29374, 13, 4706, 1480, 703, 29956, 15249, 15758, 362, 9177, 29901, 24953, 421, 14930, 358, 29952, 1818, 367, 29871, 1979, 13218, 12888, 29918, 2324, 5931, 470, 13218, 4906, 5931, 1159, 13, 13, 1678, 736, 5852, 13, 13, 361, 4770, 978, 1649, 1275, 525, 1649, 3396, 1649, 2396, 13, 1678, 1480, 703, 11690, 19509, 3017, 1273, 29879, 29908, 1273, 313, 9675, 29889, 3259, 29918, 3888, 29961, 29900, 12622, 13, 1678, 565, 7431, 29898, 9675, 29889, 19218, 29897, 1405, 29871, 29896, 322, 10876, 29889, 19218, 29961, 29896, 29962, 1275, 376, 489, 7978, 1115, 13, 4706, 20092, 353, 4390, 29889, 18132, 29898, 9675, 29889, 4172, 262, 29889, 949, 3101, 13, 4706, 565, 451, 12725, 29918, 23813, 29898, 23813, 1125, 13, 9651, 10876, 29889, 13322, 29898, 11432, 29918, 16524, 29918, 26707, 8098, 29918, 4519, 29902, 20566, 29897, 13, 4706, 1121, 353, 3638, 29918, 29879, 2364, 29918, 4906, 29898, 23813, 29897, 13, 4706, 565, 1121, 1275, 9280, 29901, 13, 9651, 1480, 703, 11690, 21397, 3730, 2665, 269, 2364, 2643, 1159, 13, 4706, 1683, 29901, 13, 9651, 1480, 703, 29943, 1299, 1964, 28861, 3158, 5229, 1159, 13, 4706, 10876, 29889, 13322, 29898, 2914, 29897, 13, 2 ]
baselines/bert_model.py
vvyadrincev/taxonomy-enrichment
11
168088
<reponame>vvyadrincev/taxonomy-enrichment<gh_stars>10-100 import numpy as np from tensorflow.keras.preprocessing.sequence import pad_sequences import torch device = torch.device('cuda') n_gpu = torch.cuda.device_count() for i in range(n_gpu): print(torch.cuda.get_device_name(i)) torch.manual_seed(117) from pytorch_pretrained_bert import BertTokenizer, BertModel class BertPretrained: def __init__(self, model_path): self.tokenizer = BertTokenizer.from_pretrained(model_path) self.model = BertModel.from_pretrained(model_path) self.model.cuda('cuda') self.model.eval() def vectorize_sentences(self, sentences): result_batch = [] indexed_batch = [] segment_batch = [] mapping = [] for sentence in sentences: tokens, ids, map_to_tok = self.tokenize(sentence) indexed_batch.append(tokens) segment_batch.append(ids) mapping.append(map_to_tok) tokens_tensor = torch.LongTensor(pad_sequences(indexed_batch, dtype='long', padding='post')) segments_tensors = torch.LongTensor(pad_sequences(segment_batch, dtype='long', padding='post')) tokens_tensor = tokens_tensor.to('cuda') segments_tensors = segments_tensors.to('cuda') with torch.no_grad(): encoded_layers, _ = self.model(tokens_tensor, segments_tensors) token_embeddings = torch.stack(encoded_layers, dim=0) token_embeddings = token_embeddings[-4:, :, :, :].permute(1, 2, 0, 3) token_embeddings = torch.flatten(token_embeddings, start_dim=2) for index, tensor in zip(mapping, token_embeddings): result_batch.append(self.unmap_to_tokens(index, tensor)) return result_batch def tokenize(self, orig_tokens): tokenized_text = ["[CLS]"] orig_to_tok_map = [] for orig_token in orig_tokens: orig_to_tok_map.append(len(tokenized_text)) tokenized_text.extend(self.tokenizer.tokenize(orig_token)) orig_to_tok_map.append(len(tokenized_text)) tokenized_text.append("[SEP]") indexed_tokens = self.tokenizer.convert_tokens_to_ids(tokenized_text) segments_ids = [1] * len(tokenized_text) return indexed_tokens, segments_ids, orig_to_tok_map def unmap_to_tokens(self, mapping, tensor): result = np.zeros((len(mapping) - 1, 3072)) for j, index in enumerate(mapping): if j != len(mapping) - 1: result[j] = torch.mean(tensor.cpu()[index:mapping[j + 1]], 0) return result
[ 1, 529, 276, 1112, 420, 29958, 29894, 13308, 7887, 1239, 29894, 29914, 20725, 21926, 29899, 264, 4018, 358, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29900, 29899, 29896, 29900, 29900, 13, 5215, 12655, 408, 7442, 13, 3166, 26110, 29889, 3946, 294, 29889, 1457, 19170, 29889, 16506, 1053, 17132, 29918, 6831, 2063, 13, 5215, 4842, 305, 13, 13, 10141, 353, 4842, 305, 29889, 10141, 877, 29883, 6191, 1495, 13, 29876, 29918, 29887, 3746, 353, 4842, 305, 29889, 29883, 6191, 29889, 10141, 29918, 2798, 580, 13, 13, 1454, 474, 297, 3464, 29898, 29876, 29918, 29887, 3746, 1125, 13, 1678, 1596, 29898, 7345, 305, 29889, 29883, 6191, 29889, 657, 29918, 10141, 29918, 978, 29898, 29875, 876, 13, 13, 7345, 305, 29889, 11288, 29918, 26776, 29898, 29896, 29896, 29955, 29897, 13, 13, 3166, 282, 3637, 25350, 29918, 1457, 3018, 1312, 29918, 2151, 1053, 16662, 6066, 3950, 29892, 16662, 3195, 13, 13, 13, 1990, 16662, 29925, 2267, 22042, 29901, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 1904, 29918, 2084, 1125, 13, 4706, 1583, 29889, 6979, 3950, 353, 16662, 6066, 3950, 29889, 3166, 29918, 1457, 3018, 1312, 29898, 4299, 29918, 2084, 29897, 13, 4706, 1583, 29889, 4299, 353, 16662, 3195, 29889, 3166, 29918, 1457, 3018, 1312, 29898, 4299, 29918, 2084, 29897, 13, 4706, 1583, 29889, 4299, 29889, 29883, 6191, 877, 29883, 6191, 1495, 13, 4706, 1583, 29889, 4299, 29889, 14513, 580, 13, 13, 1678, 822, 4608, 675, 29918, 18616, 2063, 29898, 1311, 29892, 25260, 1125, 13, 4706, 1121, 29918, 16175, 353, 5159, 13, 4706, 27541, 29918, 16175, 353, 5159, 13, 4706, 10768, 29918, 16175, 353, 5159, 13, 4706, 10417, 353, 5159, 13, 4706, 363, 10541, 297, 25260, 29901, 13, 9651, 18897, 29892, 18999, 29892, 2910, 29918, 517, 29918, 17082, 353, 1583, 29889, 6979, 675, 29898, 18616, 663, 29897, 13, 9651, 27541, 29918, 16175, 29889, 4397, 29898, 517, 12360, 29897, 13, 9651, 10768, 29918, 16175, 29889, 4397, 29898, 4841, 29897, 13, 9651, 10417, 29889, 4397, 29898, 1958, 29918, 517, 29918, 17082, 29897, 13, 13, 4706, 18897, 29918, 20158, 353, 4842, 305, 29889, 8208, 29911, 6073, 29898, 8305, 29918, 6831, 2063, 29898, 2248, 287, 29918, 16175, 29892, 26688, 2433, 5426, 742, 7164, 2433, 2490, 8785, 13, 4706, 24611, 29918, 29873, 575, 943, 353, 4842, 305, 29889, 8208, 29911, 6073, 29898, 8305, 29918, 6831, 2063, 29898, 28192, 29918, 16175, 29892, 26688, 2433, 5426, 742, 7164, 2433, 2490, 8785, 13, 4706, 18897, 29918, 20158, 353, 18897, 29918, 20158, 29889, 517, 877, 29883, 6191, 1495, 13, 4706, 24611, 29918, 29873, 575, 943, 353, 24611, 29918, 29873, 575, 943, 29889, 517, 877, 29883, 6191, 1495, 13, 13, 4706, 411, 4842, 305, 29889, 1217, 29918, 5105, 7295, 13, 9651, 18511, 29918, 29277, 29892, 903, 353, 1583, 29889, 4299, 29898, 517, 12360, 29918, 20158, 29892, 24611, 29918, 29873, 575, 943, 29897, 13, 13, 4706, 5993, 29918, 17987, 29881, 886, 353, 4842, 305, 29889, 1429, 29898, 26716, 29918, 29277, 29892, 3964, 29922, 29900, 29897, 13, 4706, 5993, 29918, 17987, 29881, 886, 353, 5993, 29918, 17987, 29881, 886, 14352, 29946, 29901, 29892, 584, 29892, 584, 29892, 584, 1822, 17858, 1082, 29898, 29896, 29892, 29871, 29906, 29892, 29871, 29900, 29892, 29871, 29941, 29897, 13, 4706, 5993, 29918, 17987, 29881, 886, 353, 4842, 305, 29889, 1579, 8606, 29898, 6979, 29918, 17987, 29881, 886, 29892, 1369, 29918, 6229, 29922, 29906, 29897, 13, 13, 4706, 363, 2380, 29892, 12489, 297, 14319, 29898, 20698, 29892, 5993, 29918, 17987, 29881, 886, 1125, 13, 9651, 1121, 29918, 16175, 29889, 4397, 29898, 1311, 29889, 348, 1958, 29918, 517, 29918, 517, 12360, 29898, 2248, 29892, 12489, 876, 13, 4706, 736, 1121, 29918, 16175, 13, 13, 1678, 822, 5993, 675, 29898, 1311, 29892, 1677, 29918, 517, 12360, 1125, 13, 4706, 5993, 1891, 29918, 726, 353, 6796, 29961, 6154, 29903, 29962, 3108, 13, 4706, 1677, 29918, 517, 29918, 17082, 29918, 1958, 353, 5159, 13, 4706, 363, 1677, 29918, 6979, 297, 1677, 29918, 517, 12360, 29901, 13, 9651, 1677, 29918, 517, 29918, 17082, 29918, 1958, 29889, 4397, 29898, 2435, 29898, 6979, 1891, 29918, 726, 876, 13, 9651, 5993, 1891, 29918, 726, 29889, 21843, 29898, 1311, 29889, 6979, 3950, 29889, 6979, 675, 29898, 12683, 29918, 6979, 876, 13, 4706, 1677, 29918, 517, 29918, 17082, 29918, 1958, 29889, 4397, 29898, 2435, 29898, 6979, 1891, 29918, 726, 876, 13, 4706, 5993, 1891, 29918, 726, 29889, 4397, 703, 29961, 1660, 29925, 29962, 1159, 13, 4706, 27541, 29918, 517, 12360, 353, 1583, 29889, 6979, 3950, 29889, 13441, 29918, 517, 12360, 29918, 517, 29918, 4841, 29898, 6979, 1891, 29918, 726, 29897, 13, 4706, 24611, 29918, 4841, 353, 518, 29896, 29962, 334, 7431, 29898, 6979, 1891, 29918, 726, 29897, 13, 4706, 736, 27541, 29918, 517, 12360, 29892, 24611, 29918, 4841, 29892, 1677, 29918, 517, 29918, 17082, 29918, 1958, 13, 13, 1678, 822, 443, 1958, 29918, 517, 29918, 517, 12360, 29898, 1311, 29892, 10417, 29892, 12489, 1125, 13, 4706, 1121, 353, 7442, 29889, 3298, 359, 3552, 2435, 29898, 20698, 29897, 448, 29871, 29896, 29892, 29871, 29941, 29900, 29955, 29906, 876, 13, 4706, 363, 432, 29892, 2380, 297, 26985, 29898, 20698, 1125, 13, 9651, 565, 432, 2804, 7431, 29898, 20698, 29897, 448, 29871, 29896, 29901, 13, 18884, 1121, 29961, 29926, 29962, 353, 4842, 305, 29889, 12676, 29898, 20158, 29889, 21970, 580, 29961, 2248, 29901, 20698, 29961, 29926, 718, 29871, 29896, 20526, 29871, 29900, 29897, 13, 4706, 736, 1121, 13, 2 ]
servo_appdynamics_test.py
opsani/servo-appdynamics
0
182105
<reponame>opsani/servo-appdynamics import pytest import datetime import re import httpx import respx import freezegun import pydantic import servo from servo.types import * from servo_appdynamics import ( AppdynamicsChecks, AppdynamicsConfiguration, AppdynamicsMetric, AppdynamicsRequest, AppdynamicsConnector ) class TestAppdynamicsMetric: # Query def test_query_required(self): try: AppdynamicsMetric( name="throughput", unit=Unit.requests_per_minute, query=None ) except pydantic.ValidationError as error: assert { "loc": ("query",), "msg": "none is not an allowed value", "type": "type_error.none.not_allowed", } in error.errors() class TestAppdynamicsConfiguration: @pytest.fixture() def appdynamics_config(self) -> AppdynamicsConfiguration: return AppdynamicsConfiguration(metrics=[], username='user', password='<PASSWORD>', account='acc', app_id='app', tier='test-tier', ) def test_url_required(self, appdynamics_config): try: appdynamics_config except pydantic.ValidationError as error: assert { "loc": ("base_url",), "msg": "none is not an allowed value", "type": "type_error.none.not_allowed", } in error.errors() def test_supports_localhost_url(self): config = AppdynamicsConfiguration(base_url="http://localhost:8090", metrics=[], username='user', password='<PASSWORD>', account='acc', app_id='app', tier='test-tier', ) assert config.base_url == "http://localhost:8090" def test_supports_cluster_url(self): config = AppdynamicsConfiguration( base_url="http://appdynamics.com:8090", metrics=[], username='user', password='<PASSWORD>', account='acc', app_id='app', tier='test-tier', ) assert config.base_url == "http://appdynamics.com:8090" def test_rejects_invalid_url(self): try: AppdynamicsConfiguration(base_url="gopher://this-is-invalid", metrics=[], username='user', password='<PASSWORD>', account='acc', app_id='app', tier='test-tier', ) except pydantic.ValidationError as error: assert { "loc": ("base_url",), "msg": "URL scheme not permitted", "type": "value_error.url.scheme", "ctx": { "allowed_schemes": { "http", "https", }, }, } in error.errors() def test_api_url(self): config = AppdynamicsConfiguration( base_url="http://appdynamics.com:8090", metrics=[], username='user', password='<PASSWORD>', account='acc', app_id='app', tier='test-tier', ) assert ( config.api_url == "http://appdynamics.com:8090/controller/rest/" ) # Metrics def test_metrics_required(self): try: AppdynamicsConfiguration(metrics=None, username='user', password='<PASSWORD>', account='acc', app_id='app', tier='test-tier', ) except pydantic.ValidationError as error: assert { "loc": ("metrics",), "msg": "none is not an allowed value", "type": "type_error.none.not_allowed", } in error.errors() class TestAppdynamicsRequest: @freezegun.freeze_time("2020-01-01") def test_url(self): request = AppdynamicsRequest( base_url="http://appdynamics.com", start=datetime.datetime.now(), end=datetime.datetime.now() + Duration("36h"), metric=AppdynamicsMetric( "throughput", servo.Unit.requests_per_minute, query='Overall Application Performance|Calls per Minute', ), ) assert ( request.endpoint == '?metric-path=Overall Application Performance|Calls per Minute&time-range-type=BETWEEN_TIMES&start-time=1577836800000&end-time=1577966400000&rollup=false&output=JSON' ) overall_application_performance_throughput = [{ 'frequency': 'ONE_MIN', 'metricId': 11318904, 'metricName': 'BTM|Application Summary|Calls per Minute', 'metricPath': 'Overall Application Performance|Calls per Minute', 'metricValues': [{'count': 5, 'current': 2098, 'max': 1119, 'min': 12, 'occurrences': 1, 'standardDeviation': 0, 'startTimeInMillis': 1614647040000, 'sum': 2098, 'useRange': False, 'value': 2098}, {'count': 5, 'current': 1249, 'max': 615, 'min': 12, 'occurrences': 1, 'standardDeviation': 0, 'startTimeInMillis': 1614647100000, 'sum': 1249, 'useRange': False, 'value': 1249}, {'count': 5, 'current': 1659, 'max': 959, 'min': 12, 'occurrences': 1, 'standardDeviation': 0, 'startTimeInMillis': 1614647160000, 'sum': 1659, 'useRange': False, 'value': 1659}, {'count': 5, 'current': 1696, 'max': 861, 'min': 12, 'occurrences': 1, 'standardDeviation': 0, 'startTimeInMillis': 1614647220000, 'sum': 1696, 'useRange': False, 'value': 1696}, {'count': 5, 'current': 2549, 'max': 1315, 'min': 12, 'occurrences': 1, 'standardDeviation': 0, 'startTimeInMillis': 1614647280000, 'sum': 2549, 'useRange': False, 'value': 2549}, {'count': 5, 'current': 2474, 'max': 1380, 'min': 12, 'occurrences': 1, 'standardDeviation': 0, 'startTimeInMillis': 1614647340000, 'sum': 2474, 'useRange': False, 'value': 2474}, {'count': 5, 'current': 1603, 'max': 792, 'min': 12, 'occurrences': 1, 'standardDeviation': 0, 'startTimeInMillis': 1614647400000, 'sum': 1603, 'useRange': False, 'value': 1603}, {'count': 5, 'current': 1909, 'max': 1103, 'min': 12, 'occurrences': 1, 'standardDeviation': 0, 'startTimeInMillis': 1614647460000, 'sum': 1909, 'useRange': False, 'value': 1909}, {'count': 5, 'current': 2241, 'max': 1270, 'min': 12, 'occurrences': 1, 'standardDeviation': 0, 'startTimeInMillis': 1614647520000, 'sum': 2241, 'useRange': False, 'value': 2241}, {'count': 5, 'current': 2665, 'max': 1491, 'min': 12, 'occurrences': 1, 'standardDeviation': 0, 'startTimeInMillis': 1614647580000, 'sum': 2665, 'useRange': False, 'value': 2665}] }] class TestAppdynamicsChecks: @pytest.fixture def metric(self) -> AppdynamicsMetric: return AppdynamicsMetric( name="throughput", unit=Unit.requests_per_minute, query='Overall Application Performance|Calls per Minute', ) @pytest.fixture def overall_application_performance_throughput(self) -> List[dict]: return [{ 'frequency': 'ONE_MIN', 'metricId': 11318904, 'metricName': 'BTM|Application Summary|Calls per Minute', 'metricPath': 'Overall Application Performance|Calls per Minute', 'metricValues': [{'count': 5, 'current': 2098, 'max': 1119, 'min': 12, 'occurrences': 1, 'standardDeviation': 0, 'startTimeInMillis': 1614647040000, 'sum': 2098, 'useRange': False, 'value': 2098}, {'count': 5, 'current': 1249, 'max': 615, 'min': 12, 'occurrences': 1, 'standardDeviation': 0, 'startTimeInMillis': 1614647100000, 'sum': 1249, 'useRange': False, 'value': 1249}, {'count': 5, 'current': 1659, 'max': 959, 'min': 12, 'occurrences': 1, 'standardDeviation': 0, 'startTimeInMillis': 1614647160000, 'sum': 1659, 'useRange': False, 'value': 1659}, {'count': 5, 'current': 1696, 'max': 861, 'min': 12, 'occurrences': 1, 'standardDeviation': 0, 'startTimeInMillis': 1614647220000, 'sum': 1696, 'useRange': False, 'value': 1696}, {'count': 5, 'current': 2549, 'max': 1315, 'min': 12, 'occurrences': 1, 'standardDeviation': 0, 'startTimeInMillis': 1614647280000, 'sum': 2549, 'useRange': False, 'value': 2549}, {'count': 5, 'current': 2474, 'max': 1380, 'min': 12, 'occurrences': 1, 'standardDeviation': 0, 'startTimeInMillis': 1614647340000, 'sum': 2474, 'useRange': False, 'value': 2474}, {'count': 5, 'current': 1603, 'max': 792, 'min': 12, 'occurrences': 1, 'standardDeviation': 0, 'startTimeInMillis': 1614647400000, 'sum': 1603, 'useRange': False, 'value': 1603}, {'count': 5, 'current': 1909, 'max': 1103, 'min': 12, 'occurrences': 1, 'standardDeviation': 0, 'startTimeInMillis': 1614647460000, 'sum': 1909, 'useRange': False, 'value': 1909}, {'count': 5, 'current': 2241, 'max': 1270, 'min': 12, 'occurrences': 1, 'standardDeviation': 0, 'startTimeInMillis': 1614647520000, 'sum': 2241, 'useRange': False, 'value': 2241}, {'count': 5, 'current': 2665, 'max': 1491, 'min': 12, 'occurrences': 1, 'standardDeviation': 0, 'startTimeInMillis': 1614647580000, 'sum': 2665, 'useRange': False, 'value': 2665}] }] @pytest.fixture def mocked_api(self, overall_application_performance_throughput): with respx.mock( base_url="http://localhost:8090", assert_all_called=False ) as respx_mock: respx_mock.get( re.compile(r"/controller/rest/.+"), name="query" ).mock(httpx.Response(200, json=overall_application_performance_throughput)) yield respx_mock @pytest.fixture def checks(self, metric) -> AppdynamicsChecks: config = AppdynamicsConfiguration( base_url="http://localhost:8090", metrics=[metric], username='user', password='<PASSWORD>', account='acc', app_id='app', tier='test-tier', ) return AppdynamicsChecks(config=config) @respx.mock async def test_check_queries(self, mocked_api, checks) -> None: request = mocked_api["query"] multichecks = await checks._expand_multichecks() check = await multichecks[0]() assert request.called assert check assert check.name == r'Run query "Overall Application Performance|Calls per Minute"' assert check.id == "check_queries_item_0" assert not check.critical assert check.success assert check.message == "returned 5 results" class TestAppdynamicsConnector: @pytest.fixture def metric(self) -> AppdynamicsMetric: return AppdynamicsMetric( name="test", unit=Unit.requests_per_minute, query='Overall Application Performance|Calls per Minute', ) @pytest.fixture def overall_application_performance_throughput(self) -> List[dict]: return [{ 'frequency': 'ONE_MIN', 'metricId': 11318904, 'metricName': 'BTM|Application Summary|Calls per Minute', 'metricPath': 'Overall Application Performance|Calls per Minute', 'metricValues': [{'count': 5, 'current': 2098, 'max': 1119, 'min': 12, 'occurrences': 1, 'standardDeviation': 0, 'startTimeInMillis': 1614647040000, 'sum': 2098, 'useRange': False, 'value': 2098}, {'count': 5, 'current': 1249, 'max': 615, 'min': 12, 'occurrences': 1, 'standardDeviation': 0, 'startTimeInMillis': 1614647100000, 'sum': 1249, 'useRange': False, 'value': 1249}, {'count': 5, 'current': 1659, 'max': 959, 'min': 12, 'occurrences': 1, 'standardDeviation': 0, 'startTimeInMillis': 1614647160000, 'sum': 1659, 'useRange': False, 'value': 1659}, {'count': 5, 'current': 1696, 'max': 861, 'min': 12, 'occurrences': 1, 'standardDeviation': 0, 'startTimeInMillis': 1614647220000, 'sum': 1696, 'useRange': False, 'value': 1696}, {'count': 5, 'current': 2549, 'max': 1315, 'min': 12, 'occurrences': 1, 'standardDeviation': 0, 'startTimeInMillis': 1614647280000, 'sum': 2549, 'useRange': False, 'value': 2549}, {'count': 5, 'current': 2474, 'max': 1380, 'min': 12, 'occurrences': 1, 'standardDeviation': 0, 'startTimeInMillis': 1614647340000, 'sum': 2474, 'useRange': False, 'value': 2474}, {'count': 5, 'current': 1603, 'max': 792, 'min': 12, 'occurrences': 1, 'standardDeviation': 0, 'startTimeInMillis': 1614647400000, 'sum': 1603, 'useRange': False, 'value': 1603}, {'count': 5, 'current': 1909, 'max': 1103, 'min': 12, 'occurrences': 1, 'standardDeviation': 0, 'startTimeInMillis': 1614647460000, 'sum': 1909, 'useRange': False, 'value': 1909}, {'count': 5, 'current': 2241, 'max': 1270, 'min': 12, 'occurrences': 1, 'standardDeviation': 0, 'startTimeInMillis': 1614647520000, 'sum': 2241, 'useRange': False, 'value': 2241}, {'count': 5, 'current': 2665, 'max': 1491, 'min': 12, 'occurrences': 1, 'standardDeviation': 0, 'startTimeInMillis': 1614647580000, 'sum': 2665, 'useRange': False, 'value': 2665}] }] @pytest.fixture def mocked_api(self, overall_application_performance_throughput): with respx.mock( base_url="http://localhost:8090", assert_all_called=False ) as respx_mock: respx_mock.get( re.compile(r"/controller/rest/.+"), name="query", ).mock(httpx.Response(200, json=overall_application_performance_throughput)) yield respx_mock @pytest.fixture def connector(self, metric) -> AppdynamicsConnector: config = AppdynamicsConfiguration( base_url="http://localhost:8090", metrics=[metric], username='user', password='<PASSWORD>', account='acc', app_id='app', tier='test-tier', ) return AppdynamicsConnector(config=config) async def test_describe(self, connector) -> None: described = connector.describe() assert described.metrics == connector.metrics() # TODO: Handle conditional flow for metrics # @respx.mock # async def test_measure(self, mocked_api, connector) -> None: # request = mocked_api["query"] # print(connector.metrics()) # measurements = await connector.measure() # assert request.called # # Assert float values are the same (for first entry from first reading) # print(measurements.readings[0].data_points[0][1]) # assert measurements.readings[0].data_points[0][1] == overall_application_performance_throughput[0]["metricValues"][0]["value"]
[ 1, 529, 276, 1112, 420, 29958, 3554, 3270, 29914, 643, 1365, 29899, 932, 29881, 2926, 1199, 13, 5215, 11451, 1688, 13, 5215, 12865, 13, 5215, 337, 13, 13, 5215, 1732, 29916, 13, 5215, 620, 1756, 13, 5215, 3889, 28530, 348, 13, 5215, 282, 2941, 7716, 13, 13, 5215, 724, 1365, 13, 3166, 724, 1365, 29889, 8768, 1053, 334, 13, 3166, 724, 1365, 29918, 932, 29881, 2926, 1199, 1053, 313, 13, 1678, 2401, 29881, 2926, 1199, 5596, 29879, 29892, 13, 1678, 2401, 29881, 2926, 1199, 8614, 29892, 13, 1678, 2401, 29881, 2926, 1199, 10095, 2200, 29892, 13, 1678, 2401, 29881, 2926, 1199, 3089, 29892, 13, 1678, 2401, 29881, 2926, 1199, 20971, 2801, 13, 29897, 13, 13, 1990, 4321, 2052, 29881, 2926, 1199, 10095, 2200, 29901, 13, 13, 1678, 396, 13641, 13, 1678, 822, 1243, 29918, 1972, 29918, 12403, 29898, 1311, 1125, 13, 4706, 1018, 29901, 13, 9651, 2401, 29881, 2926, 1199, 10095, 2200, 29898, 13, 18884, 1024, 543, 20678, 649, 613, 5190, 29922, 8325, 29889, 24830, 29918, 546, 29918, 1195, 1082, 29892, 2346, 29922, 8516, 13, 9651, 1723, 13, 4706, 5174, 282, 2941, 7716, 29889, 19448, 2392, 408, 1059, 29901, 13, 9651, 4974, 426, 13, 18884, 376, 2029, 1115, 4852, 1972, 613, 511, 13, 18884, 376, 7645, 1115, 376, 9290, 338, 451, 385, 6068, 995, 613, 13, 462, 539, 376, 1853, 1115, 376, 1853, 29918, 2704, 29889, 9290, 29889, 1333, 29918, 24622, 613, 13, 9651, 500, 297, 1059, 29889, 12523, 580, 13, 13, 13, 1990, 4321, 2052, 29881, 2926, 1199, 8614, 29901, 13, 13, 1678, 732, 2272, 1688, 29889, 7241, 15546, 580, 13, 1678, 822, 623, 29881, 2926, 1199, 29918, 2917, 29898, 1311, 29897, 1599, 2401, 29881, 2926, 1199, 8614, 29901, 13, 4706, 736, 2401, 29881, 2926, 1199, 8614, 29898, 2527, 10817, 11759, 1402, 13, 462, 462, 4706, 8952, 2433, 1792, 742, 13, 462, 462, 4706, 4800, 2433, 29966, 25711, 17013, 29958, 742, 13, 462, 462, 4706, 3633, 2433, 5753, 742, 13, 462, 462, 4706, 623, 29918, 333, 2433, 932, 742, 13, 462, 462, 4706, 26485, 2433, 1688, 29899, 29873, 631, 742, 13, 462, 462, 4706, 1723, 13, 13, 1678, 822, 1243, 29918, 2271, 29918, 12403, 29898, 1311, 29892, 623, 29881, 2926, 1199, 29918, 2917, 1125, 13, 4706, 1018, 29901, 13, 9651, 623, 29881, 2926, 1199, 29918, 2917, 13, 4706, 5174, 282, 2941, 7716, 29889, 19448, 2392, 408, 1059, 29901, 13, 9651, 4974, 426, 13, 18884, 376, 2029, 1115, 4852, 3188, 29918, 2271, 613, 511, 13, 18884, 376, 7645, 1115, 376, 9290, 338, 451, 385, 6068, 995, 613, 13, 462, 539, 376, 1853, 1115, 376, 1853, 29918, 2704, 29889, 9290, 29889, 1333, 29918, 24622, 613, 13, 9651, 500, 297, 1059, 29889, 12523, 580, 13, 13, 1678, 822, 1243, 29918, 5924, 29879, 29918, 7640, 29918, 2271, 29898, 1311, 1125, 13, 4706, 2295, 353, 2401, 29881, 2926, 1199, 8614, 29898, 3188, 29918, 2271, 543, 1124, 597, 7640, 29901, 29947, 29900, 29929, 29900, 613, 13, 462, 462, 3986, 21556, 11759, 1402, 13, 462, 462, 3986, 8952, 2433, 1792, 742, 13, 462, 462, 3986, 4800, 2433, 29966, 25711, 17013, 29958, 742, 13, 462, 462, 3986, 3633, 2433, 5753, 742, 13, 462, 462, 3986, 623, 29918, 333, 2433, 932, 742, 13, 462, 462, 3986, 26485, 2433, 1688, 29899, 29873, 631, 742, 13, 462, 462, 3986, 1723, 13, 4706, 4974, 2295, 29889, 3188, 29918, 2271, 1275, 376, 1124, 597, 7640, 29901, 29947, 29900, 29929, 29900, 29908, 13, 13, 1678, 822, 1243, 29918, 5924, 29879, 29918, 19594, 29918, 2271, 29898, 1311, 1125, 13, 4706, 2295, 353, 2401, 29881, 2926, 1199, 8614, 29898, 13, 9651, 2967, 29918, 2271, 543, 1124, 597, 932, 29881, 2926, 1199, 29889, 510, 29901, 29947, 29900, 29929, 29900, 613, 13, 9651, 21556, 11759, 1402, 13, 9651, 8952, 2433, 1792, 742, 13, 9651, 4800, 2433, 29966, 25711, 17013, 29958, 742, 13, 9651, 3633, 2433, 5753, 742, 13, 9651, 623, 29918, 333, 2433, 932, 742, 13, 9651, 26485, 2433, 1688, 29899, 29873, 631, 742, 13, 4706, 1723, 13, 4706, 4974, 2295, 29889, 3188, 29918, 2271, 1275, 376, 1124, 597, 932, 29881, 2926, 1199, 29889, 510, 29901, 29947, 29900, 29929, 29900, 29908, 13, 13, 1678, 822, 1243, 29918, 276, 622, 29879, 29918, 20965, 29918, 2271, 29898, 1311, 1125, 13, 4706, 1018, 29901, 13, 9651, 2401, 29881, 2926, 1199, 8614, 29898, 3188, 29918, 2271, 543, 29887, 13434, 597, 1366, 29899, 275, 29899, 20965, 613, 13, 462, 462, 268, 21556, 11759, 1402, 13, 462, 462, 268, 8952, 2433, 1792, 742, 13, 462, 462, 268, 4800, 2433, 29966, 25711, 17013, 29958, 742, 13, 462, 462, 268, 3633, 2433, 5753, 742, 13, 462, 462, 268, 623, 29918, 333, 2433, 932, 742, 13, 462, 462, 268, 26485, 2433, 1688, 29899, 29873, 631, 742, 13, 462, 462, 268, 1723, 13, 4706, 5174, 282, 2941, 7716, 29889, 19448, 2392, 408, 1059, 29901, 13, 9651, 4974, 426, 13, 18884, 376, 2029, 1115, 4852, 3188, 29918, 2271, 613, 511, 13, 18884, 376, 7645, 1115, 376, 4219, 11380, 451, 21905, 613, 13, 462, 539, 376, 1853, 1115, 376, 1767, 29918, 2704, 29889, 2271, 29889, 816, 2004, 613, 13, 462, 539, 376, 13073, 1115, 426, 13, 462, 965, 376, 24622, 29918, 816, 13826, 1115, 426, 13, 462, 1669, 376, 1124, 613, 13, 462, 1669, 376, 991, 613, 13, 462, 965, 2981, 13, 18884, 2981, 13, 9651, 500, 297, 1059, 29889, 12523, 580, 13, 13, 1678, 822, 1243, 29918, 2754, 29918, 2271, 29898, 1311, 1125, 13, 4706, 2295, 353, 2401, 29881, 2926, 1199, 8614, 29898, 13, 9651, 2967, 29918, 2271, 543, 1124, 597, 932, 29881, 2926, 1199, 29889, 510, 29901, 29947, 29900, 29929, 29900, 613, 13, 9651, 21556, 11759, 1402, 13, 9651, 8952, 2433, 1792, 742, 13, 9651, 4800, 2433, 29966, 25711, 17013, 29958, 742, 13, 9651, 3633, 2433, 5753, 742, 13, 9651, 623, 29918, 333, 2433, 932, 742, 13, 9651, 26485, 2433, 1688, 29899, 29873, 631, 742, 13, 4706, 1723, 13, 4706, 4974, 313, 13, 9651, 2295, 29889, 2754, 29918, 2271, 1275, 376, 1124, 597, 932, 29881, 2926, 1199, 29889, 510, 29901, 29947, 29900, 29929, 29900, 29914, 8299, 29914, 5060, 12975, 13, 4706, 1723, 13, 13, 1678, 396, 4737, 10817, 13, 1678, 822, 1243, 29918, 2527, 10817, 29918, 12403, 29898, 1311, 1125, 13, 4706, 1018, 29901, 13, 9651, 2401, 29881, 2926, 1199, 8614, 29898, 2527, 10817, 29922, 8516, 29892, 13, 462, 462, 268, 8952, 2433, 1792, 742, 13, 462, 462, 268, 4800, 2433, 29966, 25711, 17013, 29958, 742, 13, 462, 462, 268, 3633, 2433, 5753, 742, 13, 462, 462, 268, 623, 29918, 333, 2433, 932, 742, 13, 462, 462, 268, 26485, 2433, 1688, 29899, 29873, 631, 742, 13, 462, 462, 268, 1723, 13, 4706, 5174, 282, 2941, 7716, 29889, 19448, 2392, 408, 1059, 29901, 13, 9651, 4974, 426, 13, 18884, 376, 2029, 1115, 4852, 2527, 10817, 613, 511, 13, 18884, 376, 7645, 1115, 376, 9290, 338, 451, 385, 6068, 995, 613, 13, 462, 539, 376, 1853, 1115, 376, 1853, 29918, 2704, 29889, 9290, 29889, 1333, 29918, 24622, 613, 13, 9651, 500, 297, 1059, 29889, 12523, 580, 13, 13, 13, 1990, 4321, 2052, 29881, 2926, 1199, 3089, 29901, 13, 1678, 732, 9021, 28530, 348, 29889, 9021, 911, 29918, 2230, 703, 29906, 29900, 29906, 29900, 29899, 29900, 29896, 29899, 29900, 29896, 1159, 13, 1678, 822, 1243, 29918, 2271, 29898, 1311, 1125, 13, 4706, 2009, 353, 2401, 29881, 2926, 1199, 3089, 29898, 13, 9651, 2967, 29918, 2271, 543, 1124, 597, 932, 29881, 2926, 1199, 29889, 510, 613, 13, 9651, 1369, 29922, 12673, 29889, 12673, 29889, 3707, 3285, 13, 9651, 1095, 29922, 12673, 29889, 12673, 29889, 3707, 580, 718, 360, 2633, 703, 29941, 29953, 29882, 4968, 13, 9651, 12714, 29922, 2052, 29881, 2926, 1199, 10095, 2200, 29898, 13, 18884, 376, 20678, 649, 613, 13, 18884, 724, 1365, 29889, 8325, 29889, 24830, 29918, 546, 29918, 1195, 1082, 29892, 13, 18884, 2346, 2433, 3563, 497, 8427, 23768, 29989, 29907, 4293, 639, 3080, 1082, 742, 13, 9651, 10353, 13, 4706, 1723, 13, 4706, 4974, 313, 13, 9651, 2009, 29889, 29734, 13, 9651, 1275, 525, 29973, 16414, 29899, 2084, 29922, 3563, 497, 8427, 23768, 29989, 29907, 4293, 639, 3080, 1082, 29987, 2230, 29899, 3881, 29899, 1853, 29922, 29933, 2544, 8851, 1430, 29918, 15307, 29903, 29987, 2962, 29899, 2230, 29922, 29896, 29945, 29955, 29955, 29947, 29941, 29953, 29947, 29900, 29900, 29900, 29900, 29900, 29987, 355, 29899, 2230, 29922, 29896, 29945, 29955, 29955, 29929, 29953, 29953, 29946, 29900, 29900, 29900, 29900, 29900, 29987, 1245, 786, 29922, 4541, 29987, 4905, 29922, 7249, 29915, 13, 4706, 1723, 13, 13, 13, 957, 497, 29918, 6214, 29918, 546, 13390, 29918, 20678, 649, 353, 15974, 13, 1678, 525, 10745, 23860, 2396, 525, 12413, 29918, 16173, 742, 13, 1678, 525, 16414, 1204, 2396, 29871, 29896, 29896, 29941, 29896, 29947, 29929, 29900, 29946, 29892, 13, 1678, 525, 16414, 1170, 2396, 525, 29933, 23081, 29989, 4873, 6991, 5219, 29989, 29907, 4293, 639, 3080, 1082, 742, 13, 1678, 525, 16414, 2605, 2396, 525, 3563, 497, 8427, 23768, 29989, 29907, 4293, 639, 3080, 1082, 742, 13, 1678, 525, 16414, 9065, 2396, 518, 10998, 2798, 2396, 29871, 29945, 29892, 13, 462, 418, 525, 3784, 2396, 29871, 29906, 29900, 29929, 29947, 29892, 13, 462, 418, 525, 3317, 2396, 29871, 29896, 29896, 29896, 29929, 29892, 13, 462, 418, 525, 1195, 2396, 29871, 29896, 29906, 29892, 13, 462, 418, 525, 15693, 1038, 2063, 2396, 29871, 29896, 29892, 13, 462, 418, 525, 15770, 2772, 14641, 2396, 29871, 29900, 29892, 13, 462, 418, 525, 2962, 2481, 797, 19169, 275, 2396, 29871, 29896, 29953, 29896, 29946, 29953, 29946, 29955, 29900, 29946, 29900, 29900, 29900, 29900, 29892, 13, 462, 418, 525, 2083, 2396, 29871, 29906, 29900, 29929, 29947, 29892, 13, 462, 418, 525, 1509, 6069, 2396, 7700, 29892, 13, 462, 418, 525, 1767, 2396, 29871, 29906, 29900, 29929, 29947, 1118, 13, 462, 268, 11117, 2798, 2396, 29871, 29945, 29892, 13, 462, 418, 525, 3784, 2396, 29871, 29896, 29906, 29946, 29929, 29892, 13, 462, 418, 525, 3317, 2396, 29871, 29953, 29896, 29945, 29892, 13, 462, 418, 525, 1195, 2396, 29871, 29896, 29906, 29892, 13, 462, 418, 525, 15693, 1038, 2063, 2396, 29871, 29896, 29892, 13, 462, 418, 525, 15770, 2772, 14641, 2396, 29871, 29900, 29892, 13, 462, 418, 525, 2962, 2481, 797, 19169, 275, 2396, 29871, 29896, 29953, 29896, 29946, 29953, 29946, 29955, 29896, 29900, 29900, 29900, 29900, 29900, 29892, 13, 462, 418, 525, 2083, 2396, 29871, 29896, 29906, 29946, 29929, 29892, 13, 462, 418, 525, 1509, 6069, 2396, 7700, 29892, 13, 462, 418, 525, 1767, 2396, 29871, 29896, 29906, 29946, 29929, 1118, 13, 462, 268, 11117, 2798, 2396, 29871, 29945, 29892, 13, 462, 418, 525, 3784, 2396, 29871, 29896, 29953, 29945, 29929, 29892, 13, 462, 418, 525, 3317, 2396, 29871, 29929, 29945, 29929, 29892, 13, 462, 418, 525, 1195, 2396, 29871, 29896, 29906, 29892, 13, 462, 418, 525, 15693, 1038, 2063, 2396, 29871, 29896, 29892, 13, 462, 418, 525, 15770, 2772, 14641, 2396, 29871, 29900, 29892, 13, 462, 418, 525, 2962, 2481, 797, 19169, 275, 2396, 29871, 29896, 29953, 29896, 29946, 29953, 29946, 29955, 29896, 29953, 29900, 29900, 29900, 29900, 29892, 13, 462, 418, 525, 2083, 2396, 29871, 29896, 29953, 29945, 29929, 29892, 13, 462, 418, 525, 1509, 6069, 2396, 7700, 29892, 13, 462, 418, 525, 1767, 2396, 29871, 29896, 29953, 29945, 29929, 1118, 13, 462, 268, 11117, 2798, 2396, 29871, 29945, 29892, 13, 462, 418, 525, 3784, 2396, 29871, 29896, 29953, 29929, 29953, 29892, 13, 462, 418, 525, 3317, 2396, 29871, 29947, 29953, 29896, 29892, 13, 462, 418, 525, 1195, 2396, 29871, 29896, 29906, 29892, 13, 462, 418, 525, 15693, 1038, 2063, 2396, 29871, 29896, 29892, 13, 462, 418, 525, 15770, 2772, 14641, 2396, 29871, 29900, 29892, 13, 462, 418, 525, 2962, 2481, 797, 19169, 275, 2396, 29871, 29896, 29953, 29896, 29946, 29953, 29946, 29955, 29906, 29906, 29900, 29900, 29900, 29900, 29892, 13, 462, 418, 525, 2083, 2396, 29871, 29896, 29953, 29929, 29953, 29892, 13, 462, 418, 525, 1509, 6069, 2396, 7700, 29892, 13, 462, 418, 525, 1767, 2396, 29871, 29896, 29953, 29929, 29953, 1118, 13, 462, 268, 11117, 2798, 2396, 29871, 29945, 29892, 13, 462, 418, 525, 3784, 2396, 29871, 29906, 29945, 29946, 29929, 29892, 13, 462, 418, 525, 3317, 2396, 29871, 29896, 29941, 29896, 29945, 29892, 13, 462, 418, 525, 1195, 2396, 29871, 29896, 29906, 29892, 13, 462, 418, 525, 15693, 1038, 2063, 2396, 29871, 29896, 29892, 13, 462, 418, 525, 15770, 2772, 14641, 2396, 29871, 29900, 29892, 13, 462, 418, 525, 2962, 2481, 797, 19169, 275, 2396, 29871, 29896, 29953, 29896, 29946, 29953, 29946, 29955, 29906, 29947, 29900, 29900, 29900, 29900, 29892, 13, 462, 418, 525, 2083, 2396, 29871, 29906, 29945, 29946, 29929, 29892, 13, 462, 418, 525, 1509, 6069, 2396, 7700, 29892, 13, 462, 418, 525, 1767, 2396, 29871, 29906, 29945, 29946, 29929, 1118, 13, 462, 268, 11117, 2798, 2396, 29871, 29945, 29892, 13, 462, 418, 525, 3784, 2396, 29871, 29906, 29946, 29955, 29946, 29892, 13, 462, 418, 525, 3317, 2396, 29871, 29896, 29941, 29947, 29900, 29892, 13, 462, 418, 525, 1195, 2396, 29871, 29896, 29906, 29892, 13, 462, 418, 525, 15693, 1038, 2063, 2396, 29871, 29896, 29892, 13, 462, 418, 525, 15770, 2772, 14641, 2396, 29871, 29900, 29892, 13, 462, 418, 525, 2962, 2481, 797, 19169, 275, 2396, 29871, 29896, 29953, 29896, 29946, 29953, 29946, 29955, 29941, 29946, 29900, 29900, 29900, 29900, 29892, 13, 462, 418, 525, 2083, 2396, 29871, 29906, 29946, 29955, 29946, 29892, 13, 462, 418, 525, 1509, 6069, 2396, 7700, 29892, 13, 462, 418, 525, 1767, 2396, 29871, 29906, 29946, 29955, 29946, 1118, 13, 462, 268, 11117, 2798, 2396, 29871, 29945, 29892, 13, 462, 418, 525, 3784, 2396, 29871, 29896, 29953, 29900, 29941, 29892, 13, 462, 418, 525, 3317, 2396, 29871, 29955, 29929, 29906, 29892, 13, 462, 418, 525, 1195, 2396, 29871, 29896, 29906, 29892, 13, 462, 418, 525, 15693, 1038, 2063, 2396, 29871, 29896, 29892, 13, 462, 418, 525, 15770, 2772, 14641, 2396, 29871, 29900, 29892, 13, 462, 418, 525, 2962, 2481, 797, 19169, 275, 2396, 29871, 29896, 29953, 29896, 29946, 29953, 29946, 29955, 29946, 29900, 29900, 29900, 29900, 29900, 29892, 13, 462, 418, 525, 2083, 2396, 29871, 29896, 29953, 29900, 29941, 29892, 13, 462, 418, 525, 1509, 6069, 2396, 7700, 29892, 13, 462, 418, 525, 1767, 2396, 29871, 29896, 29953, 29900, 29941, 1118, 13, 462, 268, 11117, 2798, 2396, 29871, 29945, 29892, 13, 462, 418, 525, 3784, 2396, 29871, 29896, 29929, 29900, 29929, 29892, 13, 462, 418, 525, 3317, 2396, 29871, 29896, 29896, 29900, 29941, 29892, 13, 462, 418, 525, 1195, 2396, 29871, 29896, 29906, 29892, 13, 462, 418, 525, 15693, 1038, 2063, 2396, 29871, 29896, 29892, 13, 462, 418, 525, 15770, 2772, 14641, 2396, 29871, 29900, 29892, 13, 462, 418, 525, 2962, 2481, 797, 19169, 275, 2396, 29871, 29896, 29953, 29896, 29946, 29953, 29946, 29955, 29946, 29953, 29900, 29900, 29900, 29900, 29892, 13, 462, 418, 525, 2083, 2396, 29871, 29896, 29929, 29900, 29929, 29892, 13, 462, 418, 525, 1509, 6069, 2396, 7700, 29892, 13, 462, 418, 525, 1767, 2396, 29871, 29896, 29929, 29900, 29929, 1118, 13, 462, 268, 11117, 2798, 2396, 29871, 29945, 29892, 13, 462, 418, 525, 3784, 2396, 29871, 29906, 29906, 29946, 29896, 29892, 13, 462, 418, 525, 3317, 2396, 29871, 29896, 29906, 29955, 29900, 29892, 13, 462, 418, 525, 1195, 2396, 29871, 29896, 29906, 29892, 13, 462, 418, 525, 15693, 1038, 2063, 2396, 29871, 29896, 29892, 13, 462, 418, 525, 15770, 2772, 14641, 2396, 29871, 29900, 29892, 13, 462, 418, 525, 2962, 2481, 797, 19169, 275, 2396, 29871, 29896, 29953, 29896, 29946, 29953, 29946, 29955, 29945, 29906, 29900, 29900, 29900, 29900, 29892, 13, 462, 418, 525, 2083, 2396, 29871, 29906, 29906, 29946, 29896, 29892, 13, 462, 418, 525, 1509, 6069, 2396, 7700, 29892, 13, 462, 418, 525, 1767, 2396, 29871, 29906, 29906, 29946, 29896, 1118, 13, 462, 268, 11117, 2798, 2396, 29871, 29945, 29892, 13, 462, 418, 525, 3784, 2396, 29871, 29906, 29953, 29953, 29945, 29892, 13, 462, 418, 525, 3317, 2396, 29871, 29896, 29946, 29929, 29896, 29892, 13, 462, 418, 525, 1195, 2396, 29871, 29896, 29906, 29892, 13, 462, 418, 525, 15693, 1038, 2063, 2396, 29871, 29896, 29892, 13, 462, 418, 525, 15770, 2772, 14641, 2396, 29871, 29900, 29892, 13, 462, 418, 525, 2962, 2481, 797, 19169, 275, 2396, 29871, 29896, 29953, 29896, 29946, 29953, 29946, 29955, 29945, 29947, 29900, 29900, 29900, 29900, 29892, 13, 462, 418, 525, 2083, 2396, 29871, 29906, 29953, 29953, 29945, 29892, 13, 462, 418, 525, 1509, 6069, 2396, 7700, 29892, 13, 462, 418, 525, 1767, 2396, 29871, 29906, 29953, 29953, 29945, 6525, 13, 6525, 13, 13, 13, 1990, 4321, 2052, 29881, 2926, 1199, 5596, 29879, 29901, 13, 13, 1678, 732, 2272, 1688, 29889, 7241, 15546, 13, 1678, 822, 12714, 29898, 1311, 29897, 1599, 2401, 29881, 2926, 1199, 10095, 2200, 29901, 13, 4706, 736, 2401, 29881, 2926, 1199, 10095, 2200, 29898, 13, 9651, 1024, 543, 20678, 649, 613, 13, 9651, 5190, 29922, 8325, 29889, 24830, 29918, 546, 29918, 1195, 1082, 29892, 13, 9651, 2346, 2433, 3563, 497, 8427, 23768, 29989, 29907, 4293, 639, 3080, 1082, 742, 13, 4706, 1723, 13, 13, 1678, 732, 2272, 1688, 29889, 7241, 15546, 13, 1678, 822, 12463, 29918, 6214, 29918, 546, 13390, 29918, 20678, 649, 29898, 1311, 29897, 1599, 2391, 29961, 8977, 5387, 13, 4706, 736, 15974, 13, 9651, 525, 10745, 23860, 2396, 525, 12413, 29918, 16173, 742, 13, 9651, 525, 16414, 1204, 2396, 29871, 29896, 29896, 29941, 29896, 29947, 29929, 29900, 29946, 29892, 13, 9651, 525, 16414, 1170, 2396, 525, 29933, 23081, 29989, 4873, 6991, 5219, 29989, 29907, 4293, 639, 3080, 1082, 742, 13, 9651, 525, 16414, 2605, 2396, 525, 3563, 497, 8427, 23768, 29989, 29907, 4293, 639, 3080, 1082, 742, 13, 9651, 525, 16414, 9065, 2396, 518, 10998, 2798, 2396, 29871, 29945, 29892, 13, 462, 795, 525, 3784, 2396, 29871, 29906, 29900, 29929, 29947, 29892, 13, 462, 795, 525, 3317, 2396, 29871, 29896, 29896, 29896, 29929, 29892, 13, 462, 795, 525, 1195, 2396, 29871, 29896, 29906, 29892, 13, 462, 795, 525, 15693, 1038, 2063, 2396, 29871, 29896, 29892, 13, 462, 795, 525, 15770, 2772, 14641, 2396, 29871, 29900, 29892, 13, 462, 795, 525, 2962, 2481, 797, 19169, 275, 2396, 29871, 29896, 29953, 29896, 29946, 29953, 29946, 29955, 29900, 29946, 29900, 29900, 29900, 29900, 29892, 13, 462, 795, 525, 2083, 2396, 29871, 29906, 29900, 29929, 29947, 29892, 13, 462, 795, 525, 1509, 6069, 2396, 7700, 29892, 13, 462, 795, 525, 1767, 2396, 29871, 29906, 29900, 29929, 29947, 1118, 13, 462, 632, 11117, 2798, 2396, 29871, 29945, 29892, 13, 462, 795, 525, 3784, 2396, 29871, 29896, 29906, 29946, 29929, 29892, 13, 462, 795, 525, 3317, 2396, 29871, 29953, 29896, 29945, 29892, 13, 462, 795, 525, 1195, 2396, 29871, 29896, 29906, 29892, 13, 462, 795, 525, 15693, 1038, 2063, 2396, 29871, 29896, 29892, 13, 462, 795, 525, 15770, 2772, 14641, 2396, 29871, 29900, 29892, 13, 462, 795, 525, 2962, 2481, 797, 19169, 275, 2396, 29871, 29896, 29953, 29896, 29946, 29953, 29946, 29955, 29896, 29900, 29900, 29900, 29900, 29900, 29892, 13, 462, 795, 525, 2083, 2396, 29871, 29896, 29906, 29946, 29929, 29892, 13, 462, 795, 525, 1509, 6069, 2396, 7700, 29892, 13, 462, 795, 525, 1767, 2396, 29871, 29896, 29906, 29946, 29929, 1118, 13, 462, 632, 11117, 2798, 2396, 29871, 29945, 29892, 13, 462, 795, 525, 3784, 2396, 29871, 29896, 29953, 29945, 29929, 29892, 13, 462, 795, 525, 3317, 2396, 29871, 29929, 29945, 29929, 29892, 13, 462, 795, 525, 1195, 2396, 29871, 29896, 29906, 29892, 13, 462, 795, 525, 15693, 1038, 2063, 2396, 29871, 29896, 29892, 13, 462, 795, 525, 15770, 2772, 14641, 2396, 29871, 29900, 29892, 13, 462, 795, 525, 2962, 2481, 797, 19169, 275, 2396, 29871, 29896, 29953, 29896, 29946, 29953, 29946, 29955, 29896, 29953, 29900, 29900, 29900, 29900, 29892, 13, 462, 795, 525, 2083, 2396, 29871, 29896, 29953, 29945, 29929, 29892, 13, 462, 795, 525, 1509, 6069, 2396, 7700, 29892, 13, 462, 795, 525, 1767, 2396, 29871, 29896, 29953, 29945, 29929, 1118, 13, 462, 632, 11117, 2798, 2396, 29871, 29945, 29892, 13, 462, 795, 525, 3784, 2396, 29871, 29896, 29953, 29929, 29953, 29892, 13, 462, 795, 525, 3317, 2396, 29871, 29947, 29953, 29896, 29892, 13, 462, 795, 525, 1195, 2396, 29871, 29896, 29906, 29892, 13, 462, 795, 525, 15693, 1038, 2063, 2396, 29871, 29896, 29892, 13, 462, 795, 525, 15770, 2772, 14641, 2396, 29871, 29900, 29892, 13, 462, 795, 525, 2962, 2481, 797, 19169, 275, 2396, 29871, 29896, 29953, 29896, 29946, 29953, 29946, 29955, 29906, 29906, 29900, 29900, 29900, 29900, 29892, 13, 462, 795, 525, 2083, 2396, 29871, 29896, 29953, 29929, 29953, 29892, 13, 462, 795, 525, 1509, 6069, 2396, 7700, 29892, 13, 462, 795, 525, 1767, 2396, 29871, 29896, 29953, 29929, 29953, 1118, 13, 462, 632, 11117, 2798, 2396, 29871, 29945, 29892, 13, 462, 795, 525, 3784, 2396, 29871, 29906, 29945, 29946, 29929, 29892, 13, 462, 795, 525, 3317, 2396, 29871, 29896, 29941, 29896, 29945, 29892, 13, 462, 795, 525, 1195, 2396, 29871, 29896, 29906, 29892, 13, 462, 795, 525, 15693, 1038, 2063, 2396, 29871, 29896, 29892, 13, 462, 795, 525, 15770, 2772, 14641, 2396, 29871, 29900, 29892, 13, 462, 795, 525, 2962, 2481, 797, 19169, 275, 2396, 29871, 29896, 29953, 29896, 29946, 29953, 29946, 29955, 29906, 29947, 29900, 29900, 29900, 29900, 29892, 13, 462, 795, 525, 2083, 2396, 29871, 29906, 29945, 29946, 29929, 29892, 13, 462, 795, 525, 1509, 6069, 2396, 7700, 29892, 13, 462, 795, 525, 1767, 2396, 29871, 29906, 29945, 29946, 29929, 1118, 13, 462, 632, 11117, 2798, 2396, 29871, 29945, 29892, 13, 462, 795, 525, 3784, 2396, 29871, 29906, 29946, 29955, 29946, 29892, 13, 462, 795, 525, 3317, 2396, 29871, 29896, 29941, 29947, 29900, 29892, 13, 462, 795, 525, 1195, 2396, 29871, 29896, 29906, 29892, 13, 462, 795, 525, 15693, 1038, 2063, 2396, 29871, 29896, 29892, 13, 462, 795, 525, 15770, 2772, 14641, 2396, 29871, 29900, 29892, 13, 462, 795, 525, 2962, 2481, 797, 19169, 275, 2396, 29871, 29896, 29953, 29896, 29946, 29953, 29946, 29955, 29941, 29946, 29900, 29900, 29900, 29900, 29892, 13, 462, 795, 525, 2083, 2396, 29871, 29906, 29946, 29955, 29946, 29892, 13, 462, 795, 525, 1509, 6069, 2396, 7700, 29892, 13, 462, 795, 525, 1767, 2396, 29871, 29906, 29946, 29955, 29946, 1118, 13, 462, 632, 11117, 2798, 2396, 29871, 29945, 29892, 13, 462, 795, 525, 3784, 2396, 29871, 29896, 29953, 29900, 29941, 29892, 13, 462, 795, 525, 3317, 2396, 29871, 29955, 29929, 29906, 29892, 13, 462, 795, 525, 1195, 2396, 29871, 29896, 29906, 29892, 13, 462, 795, 525, 15693, 1038, 2063, 2396, 29871, 29896, 29892, 13, 462, 795, 525, 15770, 2772, 14641, 2396, 29871, 29900, 29892, 13, 462, 795, 525, 2962, 2481, 797, 19169, 275, 2396, 29871, 29896, 29953, 29896, 29946, 29953, 29946, 29955, 29946, 29900, 29900, 29900, 29900, 29900, 29892, 13, 462, 795, 525, 2083, 2396, 29871, 29896, 29953, 29900, 29941, 29892, 13, 462, 795, 525, 1509, 6069, 2396, 7700, 29892, 13, 462, 795, 525, 1767, 2396, 29871, 29896, 29953, 29900, 29941, 1118, 13, 462, 632, 11117, 2798, 2396, 29871, 29945, 29892, 13, 462, 795, 525, 3784, 2396, 29871, 29896, 29929, 29900, 29929, 29892, 13, 462, 795, 525, 3317, 2396, 29871, 29896, 29896, 29900, 29941, 29892, 13, 462, 795, 525, 1195, 2396, 29871, 29896, 29906, 29892, 13, 462, 795, 525, 15693, 1038, 2063, 2396, 29871, 29896, 29892, 13, 462, 795, 525, 15770, 2772, 14641, 2396, 29871, 29900, 29892, 13, 462, 795, 525, 2962, 2481, 797, 19169, 275, 2396, 29871, 29896, 29953, 29896, 29946, 29953, 29946, 29955, 29946, 29953, 29900, 29900, 29900, 29900, 29892, 13, 462, 795, 525, 2083, 2396, 29871, 29896, 29929, 29900, 29929, 29892, 13, 462, 795, 525, 1509, 6069, 2396, 7700, 29892, 13, 462, 795, 525, 1767, 2396, 29871, 29896, 29929, 29900, 29929, 1118, 13, 462, 632, 11117, 2798, 2396, 29871, 29945, 29892, 13, 462, 795, 525, 3784, 2396, 29871, 29906, 29906, 29946, 29896, 29892, 13, 462, 795, 525, 3317, 2396, 29871, 29896, 29906, 29955, 29900, 29892, 13, 462, 795, 525, 1195, 2396, 29871, 29896, 29906, 29892, 13, 462, 795, 525, 15693, 1038, 2063, 2396, 29871, 29896, 29892, 13, 462, 795, 525, 15770, 2772, 14641, 2396, 29871, 29900, 29892, 13, 462, 795, 525, 2962, 2481, 797, 19169, 275, 2396, 29871, 29896, 29953, 29896, 29946, 29953, 29946, 29955, 29945, 29906, 29900, 29900, 29900, 29900, 29892, 13, 462, 795, 525, 2083, 2396, 29871, 29906, 29906, 29946, 29896, 29892, 13, 462, 795, 525, 1509, 6069, 2396, 7700, 29892, 13, 462, 795, 525, 1767, 2396, 29871, 29906, 29906, 29946, 29896, 1118, 13, 462, 632, 11117, 2798, 2396, 29871, 29945, 29892, 13, 462, 795, 525, 3784, 2396, 29871, 29906, 29953, 29953, 29945, 29892, 13, 462, 795, 525, 3317, 2396, 29871, 29896, 29946, 29929, 29896, 29892, 13, 462, 795, 525, 1195, 2396, 29871, 29896, 29906, 29892, 13, 462, 795, 525, 15693, 1038, 2063, 2396, 29871, 29896, 29892, 13, 462, 795, 525, 15770, 2772, 14641, 2396, 29871, 29900, 29892, 13, 462, 795, 525, 2962, 2481, 797, 19169, 275, 2396, 29871, 29896, 29953, 29896, 29946, 29953, 29946, 29955, 29945, 29947, 29900, 29900, 29900, 29900, 29892, 13, 462, 795, 525, 2083, 2396, 29871, 29906, 29953, 29953, 29945, 29892, 13, 462, 795, 525, 1509, 6069, 2396, 7700, 29892, 13, 462, 795, 525, 1767, 2396, 29871, 29906, 29953, 29953, 29945, 6525, 13, 4706, 500, 29962, 13, 13, 1678, 732, 2272, 1688, 29889, 7241, 15546, 13, 1678, 822, 11187, 287, 29918, 2754, 29898, 1311, 29892, 12463, 29918, 6214, 29918, 546, 13390, 29918, 20678, 649, 1125, 13, 4706, 411, 620, 1756, 29889, 17640, 29898, 13, 18884, 2967, 29918, 2271, 543, 1124, 597, 7640, 29901, 29947, 29900, 29929, 29900, 613, 4974, 29918, 497, 29918, 13998, 29922, 8824, 13, 4706, 1723, 408, 620, 1756, 29918, 17640, 29901, 13, 9651, 620, 1756, 29918, 17640, 29889, 657, 29898, 13, 18884, 337, 29889, 12198, 29898, 29878, 23901, 8299, 29914, 5060, 6294, 29974, 4968, 13, 18884, 1024, 543, 1972, 29908, 13, 9651, 13742, 17640, 29898, 1124, 29916, 29889, 5103, 29898, 29906, 29900, 29900, 29892, 4390, 29922, 957, 497, 29918, 6214, 29918, 546, 13390, 29918, 20678, 649, 876, 13, 9651, 7709, 620, 1756, 29918, 17640, 13, 13, 1678, 732, 2272, 1688, 29889, 7241, 15546, 13, 1678, 822, 12747, 29898, 1311, 29892, 12714, 29897, 1599, 2401, 29881, 2926, 1199, 5596, 29879, 29901, 13, 4706, 2295, 353, 2401, 29881, 2926, 1199, 8614, 29898, 13, 9651, 2967, 29918, 2271, 543, 1124, 597, 7640, 29901, 29947, 29900, 29929, 29900, 613, 13, 9651, 21556, 11759, 16414, 1402, 13, 9651, 8952, 2433, 1792, 742, 13, 9651, 4800, 2433, 29966, 25711, 17013, 29958, 742, 13, 9651, 3633, 2433, 5753, 742, 13, 9651, 623, 29918, 333, 2433, 932, 742, 13, 9651, 26485, 2433, 1688, 29899, 29873, 631, 742, 13, 4706, 1723, 13, 4706, 736, 2401, 29881, 2926, 1199, 5596, 29879, 29898, 2917, 29922, 2917, 29897, 13, 13, 1678, 732, 690, 1756, 29889, 17640, 13, 1678, 7465, 822, 1243, 29918, 3198, 29918, 339, 6358, 29898, 1311, 29892, 11187, 287, 29918, 2754, 29892, 12747, 29897, 1599, 6213, 29901, 13, 4706, 2009, 353, 11187, 287, 29918, 2754, 3366, 1972, 3108, 13, 4706, 1773, 293, 3202, 29879, 353, 7272, 12747, 3032, 18837, 29918, 4713, 293, 3202, 29879, 580, 13, 4706, 1423, 353, 7272, 1773, 293, 3202, 29879, 29961, 29900, 29962, 580, 13, 4706, 4974, 2009, 29889, 13998, 13, 4706, 4974, 1423, 13, 4706, 4974, 1423, 29889, 978, 1275, 364, 29915, 6558, 2346, 376, 3563, 497, 8427, 23768, 29989, 29907, 4293, 639, 3080, 1082, 29908, 29915, 13, 4706, 4974, 1423, 29889, 333, 1275, 376, 3198, 29918, 339, 6358, 29918, 667, 29918, 29900, 29908, 13, 4706, 4974, 451, 1423, 29889, 9695, 936, 13, 4706, 4974, 1423, 29889, 8698, 13, 4706, 4974, 1423, 29889, 4906, 1275, 376, 2457, 287, 29871, 29945, 2582, 29908, 13, 13, 13, 1990, 4321, 2052, 29881, 2926, 1199, 20971, 2801, 29901, 13, 13, 1678, 732, 2272, 1688, 29889, 7241, 15546, 13, 1678, 822, 12714, 29898, 1311, 29897, 1599, 2401, 29881, 2926, 1199, 10095, 2200, 29901, 13, 4706, 736, 2401, 29881, 2926, 1199, 10095, 2200, 29898, 13, 9651, 1024, 543, 1688, 613, 13, 9651, 5190, 29922, 8325, 29889, 24830, 29918, 546, 29918, 1195, 1082, 29892, 13, 9651, 2346, 2433, 3563, 497, 8427, 23768, 29989, 29907, 4293, 639, 3080, 1082, 742, 13, 4706, 1723, 13, 13, 1678, 732, 2272, 1688, 29889, 7241, 15546, 13, 1678, 822, 12463, 29918, 6214, 29918, 546, 13390, 29918, 20678, 649, 29898, 1311, 29897, 1599, 2391, 29961, 8977, 5387, 13, 4706, 736, 15974, 13, 9651, 525, 10745, 23860, 2396, 525, 12413, 29918, 16173, 742, 13, 9651, 525, 16414, 1204, 2396, 29871, 29896, 29896, 29941, 29896, 29947, 29929, 29900, 29946, 29892, 13, 9651, 525, 16414, 1170, 2396, 525, 29933, 23081, 29989, 4873, 6991, 5219, 29989, 29907, 4293, 639, 3080, 1082, 742, 13, 9651, 525, 16414, 2605, 2396, 525, 3563, 497, 8427, 23768, 29989, 29907, 4293, 639, 3080, 1082, 742, 13, 9651, 525, 16414, 9065, 2396, 518, 10998, 2798, 2396, 29871, 29945, 29892, 13, 462, 795, 525, 3784, 2396, 29871, 29906, 29900, 29929, 29947, 29892, 13, 462, 795, 525, 3317, 2396, 29871, 29896, 29896, 29896, 29929, 29892, 13, 462, 795, 525, 1195, 2396, 29871, 29896, 29906, 29892, 13, 462, 795, 525, 15693, 1038, 2063, 2396, 29871, 29896, 29892, 13, 462, 795, 525, 15770, 2772, 14641, 2396, 29871, 29900, 29892, 13, 462, 795, 525, 2962, 2481, 797, 19169, 275, 2396, 29871, 29896, 29953, 29896, 29946, 29953, 29946, 29955, 29900, 29946, 29900, 29900, 29900, 29900, 29892, 13, 462, 795, 525, 2083, 2396, 29871, 29906, 29900, 29929, 29947, 29892, 13, 462, 795, 525, 1509, 6069, 2396, 7700, 29892, 13, 462, 795, 525, 1767, 2396, 29871, 29906, 29900, 29929, 29947, 1118, 13, 462, 632, 11117, 2798, 2396, 29871, 29945, 29892, 13, 462, 795, 525, 3784, 2396, 29871, 29896, 29906, 29946, 29929, 29892, 13, 462, 795, 525, 3317, 2396, 29871, 29953, 29896, 29945, 29892, 13, 462, 795, 525, 1195, 2396, 29871, 29896, 29906, 29892, 13, 462, 795, 525, 15693, 1038, 2063, 2396, 29871, 29896, 29892, 13, 462, 795, 525, 15770, 2772, 14641, 2396, 29871, 29900, 29892, 13, 462, 795, 525, 2962, 2481, 797, 19169, 275, 2396, 29871, 29896, 29953, 29896, 29946, 29953, 29946, 29955, 29896, 29900, 29900, 29900, 29900, 29900, 29892, 13, 462, 795, 525, 2083, 2396, 29871, 29896, 29906, 29946, 29929, 29892, 13, 462, 795, 525, 1509, 6069, 2396, 7700, 29892, 13, 462, 795, 525, 1767, 2396, 29871, 29896, 29906, 29946, 29929, 1118, 13, 462, 632, 11117, 2798, 2396, 29871, 29945, 29892, 13, 462, 795, 525, 3784, 2396, 29871, 29896, 29953, 29945, 29929, 29892, 13, 462, 795, 525, 3317, 2396, 29871, 29929, 29945, 29929, 29892, 13, 462, 795, 525, 1195, 2396, 29871, 29896, 29906, 29892, 13, 462, 795, 525, 15693, 1038, 2063, 2396, 29871, 29896, 29892, 13, 462, 795, 525, 15770, 2772, 14641, 2396, 29871, 29900, 29892, 13, 462, 795, 525, 2962, 2481, 797, 19169, 275, 2396, 29871, 29896, 29953, 29896, 29946, 29953, 29946, 29955, 29896, 29953, 29900, 29900, 29900, 29900, 29892, 13, 462, 795, 525, 2083, 2396, 29871, 29896, 29953, 29945, 29929, 29892, 13, 462, 795, 525, 1509, 6069, 2396, 7700, 29892, 13, 462, 795, 525, 1767, 2396, 29871, 29896, 29953, 29945, 29929, 1118, 13, 462, 632, 11117, 2798, 2396, 29871, 29945, 29892, 13, 462, 795, 525, 3784, 2396, 29871, 29896, 29953, 29929, 29953, 29892, 13, 462, 795, 525, 3317, 2396, 29871, 29947, 29953, 29896, 29892, 13, 462, 795, 525, 1195, 2396, 29871, 29896, 29906, 29892, 13, 462, 795, 525, 15693, 1038, 2063, 2396, 29871, 29896, 29892, 13, 462, 795, 525, 15770, 2772, 14641, 2396, 29871, 29900, 29892, 13, 462, 795, 525, 2962, 2481, 797, 19169, 275, 2396, 29871, 29896, 29953, 29896, 29946, 29953, 29946, 29955, 29906, 29906, 29900, 29900, 29900, 29900, 29892, 13, 462, 795, 525, 2083, 2396, 29871, 29896, 29953, 29929, 29953, 29892, 13, 462, 795, 525, 1509, 6069, 2396, 7700, 29892, 13, 462, 795, 525, 1767, 2396, 29871, 29896, 29953, 29929, 29953, 1118, 13, 462, 632, 11117, 2798, 2396, 29871, 29945, 29892, 13, 462, 795, 525, 3784, 2396, 29871, 29906, 29945, 29946, 29929, 29892, 13, 462, 795, 525, 3317, 2396, 29871, 29896, 29941, 29896, 29945, 29892, 13, 462, 795, 525, 1195, 2396, 29871, 29896, 29906, 29892, 13, 462, 795, 525, 15693, 1038, 2063, 2396, 29871, 29896, 29892, 13, 462, 795, 525, 15770, 2772, 14641, 2396, 29871, 29900, 29892, 13, 462, 795, 525, 2962, 2481, 797, 19169, 275, 2396, 29871, 29896, 29953, 29896, 29946, 29953, 29946, 29955, 29906, 29947, 29900, 29900, 29900, 29900, 29892, 13, 462, 795, 525, 2083, 2396, 29871, 29906, 29945, 29946, 29929, 29892, 13, 462, 795, 525, 1509, 6069, 2396, 7700, 29892, 13, 462, 795, 525, 1767, 2396, 29871, 29906, 29945, 29946, 29929, 1118, 13, 462, 632, 11117, 2798, 2396, 29871, 29945, 29892, 13, 462, 795, 525, 3784, 2396, 29871, 29906, 29946, 29955, 29946, 29892, 13, 462, 795, 525, 3317, 2396, 29871, 29896, 29941, 29947, 29900, 29892, 13, 462, 795, 525, 1195, 2396, 29871, 29896, 29906, 29892, 13, 462, 795, 525, 15693, 1038, 2063, 2396, 29871, 29896, 29892, 13, 462, 795, 525, 15770, 2772, 14641, 2396, 29871, 29900, 29892, 13, 462, 795, 525, 2962, 2481, 797, 19169, 275, 2396, 29871, 29896, 29953, 29896, 29946, 29953, 29946, 29955, 29941, 29946, 29900, 29900, 29900, 29900, 29892, 13, 462, 795, 525, 2083, 2396, 29871, 29906, 29946, 29955, 29946, 29892, 13, 462, 795, 525, 1509, 6069, 2396, 7700, 29892, 13, 462, 795, 525, 1767, 2396, 29871, 29906, 29946, 29955, 29946, 1118, 13, 462, 632, 11117, 2798, 2396, 29871, 29945, 29892, 13, 462, 795, 525, 3784, 2396, 29871, 29896, 29953, 29900, 29941, 29892, 13, 462, 795, 525, 3317, 2396, 29871, 29955, 29929, 29906, 29892, 13, 462, 795, 525, 1195, 2396, 29871, 29896, 29906, 29892, 13, 462, 795, 525, 15693, 1038, 2063, 2396, 29871, 29896, 29892, 13, 462, 795, 525, 15770, 2772, 14641, 2396, 29871, 29900, 29892, 13, 462, 795, 525, 2962, 2481, 797, 19169, 275, 2396, 29871, 29896, 29953, 29896, 29946, 29953, 29946, 29955, 29946, 29900, 29900, 29900, 29900, 29900, 29892, 13, 462, 795, 525, 2083, 2396, 29871, 29896, 29953, 29900, 29941, 29892, 13, 462, 795, 525, 1509, 6069, 2396, 7700, 29892, 13, 462, 795, 525, 1767, 2396, 29871, 29896, 29953, 29900, 29941, 1118, 13, 462, 632, 11117, 2798, 2396, 29871, 29945, 29892, 13, 462, 795, 525, 3784, 2396, 29871, 29896, 29929, 29900, 29929, 29892, 13, 462, 795, 525, 3317, 2396, 29871, 29896, 29896, 29900, 29941, 29892, 13, 462, 795, 525, 1195, 2396, 29871, 29896, 29906, 29892, 13, 462, 795, 525, 15693, 1038, 2063, 2396, 29871, 29896, 29892, 13, 462, 795, 525, 15770, 2772, 14641, 2396, 29871, 29900, 29892, 13, 462, 795, 525, 2962, 2481, 797, 19169, 275, 2396, 29871, 29896, 29953, 29896, 29946, 29953, 29946, 29955, 29946, 29953, 29900, 29900, 29900, 29900, 29892, 13, 462, 795, 525, 2083, 2396, 29871, 29896, 29929, 29900, 29929, 29892, 13, 462, 795, 525, 1509, 6069, 2396, 7700, 29892, 13, 462, 795, 525, 1767, 2396, 29871, 29896, 29929, 29900, 29929, 1118, 13, 462, 632, 11117, 2798, 2396, 29871, 29945, 29892, 13, 462, 795, 525, 3784, 2396, 29871, 29906, 29906, 29946, 29896, 29892, 13, 462, 795, 525, 3317, 2396, 29871, 29896, 29906, 29955, 29900, 29892, 13, 462, 795, 525, 1195, 2396, 29871, 29896, 29906, 29892, 13, 462, 795, 525, 15693, 1038, 2063, 2396, 29871, 29896, 29892, 13, 462, 795, 525, 15770, 2772, 14641, 2396, 29871, 29900, 29892, 13, 462, 795, 525, 2962, 2481, 797, 19169, 275, 2396, 29871, 29896, 29953, 29896, 29946, 29953, 29946, 29955, 29945, 29906, 29900, 29900, 29900, 29900, 29892, 13, 462, 795, 525, 2083, 2396, 29871, 29906, 29906, 29946, 29896, 29892, 13, 462, 795, 525, 1509, 6069, 2396, 7700, 29892, 13, 462, 795, 525, 1767, 2396, 29871, 29906, 29906, 29946, 29896, 1118, 13, 462, 632, 11117, 2798, 2396, 29871, 29945, 29892, 13, 462, 795, 525, 3784, 2396, 29871, 29906, 29953, 29953, 29945, 29892, 13, 462, 795, 525, 3317, 2396, 29871, 29896, 29946, 29929, 29896, 29892, 13, 462, 795, 525, 1195, 2396, 29871, 29896, 29906, 29892, 13, 462, 795, 525, 15693, 1038, 2063, 2396, 29871, 29896, 29892, 13, 462, 795, 525, 15770, 2772, 14641, 2396, 29871, 29900, 29892, 13, 462, 795, 525, 2962, 2481, 797, 19169, 275, 2396, 29871, 29896, 29953, 29896, 29946, 29953, 29946, 29955, 29945, 29947, 29900, 29900, 29900, 29900, 29892, 13, 462, 795, 525, 2083, 2396, 29871, 29906, 29953, 29953, 29945, 29892, 13, 462, 795, 525, 1509, 6069, 2396, 7700, 29892, 13, 462, 795, 525, 1767, 2396, 29871, 29906, 29953, 29953, 29945, 6525, 13, 4706, 500, 29962, 13, 13, 1678, 732, 2272, 1688, 29889, 7241, 15546, 13, 1678, 822, 11187, 287, 29918, 2754, 29898, 1311, 29892, 12463, 29918, 6214, 29918, 546, 13390, 29918, 20678, 649, 1125, 13, 4706, 411, 620, 1756, 29889, 17640, 29898, 13, 9651, 2967, 29918, 2271, 543, 1124, 597, 7640, 29901, 29947, 29900, 29929, 29900, 613, 4974, 29918, 497, 29918, 13998, 29922, 8824, 13, 4706, 1723, 408, 620, 1756, 29918, 17640, 29901, 13, 9651, 620, 1756, 29918, 17640, 29889, 657, 29898, 13, 18884, 337, 29889, 12198, 29898, 29878, 23901, 8299, 29914, 5060, 6294, 29974, 4968, 13, 18884, 1024, 543, 1972, 613, 13, 9651, 13742, 17640, 29898, 1124, 29916, 29889, 5103, 29898, 29906, 29900, 29900, 29892, 4390, 29922, 957, 497, 29918, 6214, 29918, 546, 13390, 29918, 20678, 649, 876, 13, 9651, 7709, 620, 1756, 29918, 17640, 13, 13, 1678, 732, 2272, 1688, 29889, 7241, 15546, 13, 1678, 822, 1826, 2801, 29898, 1311, 29892, 12714, 29897, 1599, 2401, 29881, 2926, 1199, 20971, 2801, 29901, 13, 4706, 2295, 353, 2401, 29881, 2926, 1199, 8614, 29898, 13, 9651, 2967, 29918, 2271, 543, 1124, 597, 7640, 29901, 29947, 29900, 29929, 29900, 613, 13, 9651, 21556, 11759, 16414, 1402, 13, 9651, 8952, 2433, 1792, 742, 13, 9651, 4800, 2433, 29966, 25711, 17013, 29958, 742, 13, 9651, 3633, 2433, 5753, 742, 13, 9651, 623, 29918, 333, 2433, 932, 742, 13, 9651, 26485, 2433, 1688, 29899, 29873, 631, 742, 13, 4706, 1723, 13, 4706, 736, 2401, 29881, 2926, 1199, 20971, 2801, 29898, 2917, 29922, 2917, 29897, 13, 13, 1678, 7465, 822, 1243, 29918, 2783, 29581, 29898, 1311, 29892, 1826, 2801, 29897, 1599, 6213, 29901, 13, 4706, 5439, 353, 1826, 2801, 29889, 2783, 29581, 580, 13, 4706, 4974, 5439, 29889, 2527, 10817, 1275, 1826, 2801, 29889, 2527, 10817, 580, 13, 13, 1678, 396, 14402, 29901, 29273, 15047, 4972, 363, 21556, 13, 1678, 396, 732, 690, 1756, 29889, 17640, 13, 1678, 396, 7465, 822, 1243, 29918, 26658, 29898, 1311, 29892, 11187, 287, 29918, 2754, 29892, 1826, 2801, 29897, 1599, 6213, 29901, 13, 1678, 396, 268, 2009, 353, 11187, 287, 29918, 2754, 3366, 1972, 3108, 13, 1678, 396, 268, 1596, 29898, 11958, 2801, 29889, 2527, 10817, 3101, 13, 1678, 396, 268, 20398, 353, 7272, 1826, 2801, 29889, 26658, 580, 13, 1678, 396, 268, 4974, 2009, 29889, 13998, 13, 1678, 396, 268, 396, 16499, 5785, 1819, 526, 278, 1021, 313, 1454, 937, 6251, 515, 937, 5183, 29897, 13, 1678, 396, 268, 1596, 29898, 26658, 1860, 29889, 949, 886, 29961, 29900, 1822, 1272, 29918, 9748, 29961, 29900, 3816, 29896, 2314, 13, 1678, 396, 268, 4974, 20398, 29889, 949, 886, 29961, 29900, 1822, 1272, 29918, 9748, 29961, 29900, 3816, 29896, 29962, 1275, 12463, 29918, 6214, 29918, 546, 13390, 29918, 20678, 649, 29961, 29900, 29962, 3366, 16414, 9065, 3108, 29961, 29900, 29962, 3366, 1767, 3108, 13, 2 ]
ChatApp/settings.py
xckomorebi/ChatApp
0
79491
import os from pathlib import Path DB_NAME = "chatapp.db" PROJECT_PATH = Path(__file__).parents[1] DB_PATH = os.path.join(PROJECT_PATH, "resource", DB_NAME) PORT_MIN = 1024 PORT_MAX = 65535 DEBUG = os.getenv("CHAT_APP_DEBUG", False) if DEBUG: TIMEOUT = 30 else: TIMEOUT = 0.5
[ 1, 1053, 2897, 13, 3166, 2224, 1982, 1053, 10802, 13, 13, 4051, 29918, 5813, 353, 376, 305, 532, 407, 29889, 2585, 29908, 13, 8618, 17637, 29918, 10145, 353, 10802, 22168, 1445, 1649, 467, 862, 1237, 29961, 29896, 29962, 13, 4051, 29918, 10145, 353, 2897, 29889, 2084, 29889, 7122, 29898, 8618, 17637, 29918, 10145, 29892, 376, 10314, 613, 6535, 29918, 5813, 29897, 13, 13, 15082, 29918, 16173, 353, 29871, 29896, 29900, 29906, 29946, 13, 15082, 29918, 12648, 353, 29871, 29953, 29945, 29945, 29941, 29945, 13, 13, 18525, 353, 2897, 29889, 657, 6272, 703, 3210, 1299, 29918, 20576, 29918, 18525, 613, 7700, 29897, 13, 13, 361, 21681, 29901, 13, 1678, 323, 8890, 12015, 353, 29871, 29941, 29900, 13, 2870, 29901, 13, 1678, 323, 8890, 12015, 353, 29871, 29900, 29889, 29945, 13, 2 ]
responsibleai/responsibleai/modelanalysis/model_analysis.py
PYTHON01100100/responsible-ai-widgets
1
197447
# Copyright (c) Microsoft Corporation # Licensed under the MIT License. """Defines the ModelAnalysis class.""" import json import numpy as np import pandas as pd from pathlib import Path import pickle import warnings from responsibleai._input_processing import _convert_to_list from responsibleai._interfaces import ModelAnalysisData, Dataset from responsibleai._internal.constants import\ ManagerNames, Metadata, SKLearn from responsibleai._managers.counterfactual_manager import ( CounterfactualManager) from responsibleai._managers.error_analysis_manager import ErrorAnalysisManager from responsibleai._managers.explainer_manager import ExplainerManager from responsibleai._managers.causal_manager import CausalManager from responsibleai.exceptions import UserConfigValidationException from responsibleai.modelanalysis.constants import ModelTask _DTYPES = 'dtypes' _TRAIN = 'train' _TEST = 'test' _TARGET_COLUMN = 'target_column' _TASK_TYPE = 'task_type' _MODEL = Metadata.MODEL _MODEL_PKL = _MODEL + '.pkl' _SERIALIZER = 'serializer' _CLASSES = 'classes' _MANAGERS = 'managers' _CATEGORICAL_FEATURES = 'categorical_features' _TRAN_LABELS = 'train_labels' _META_JSON = Metadata.META_JSON class ModelAnalysis(object): """Defines the top-level Model Analysis API. Use ModelAnalysis to analyze errors, explain the most important features, compute counterfactuals and run causal analysis in a single API. :param model: The model to compute RAI insights for. A model that implements sklearn.predict or sklearn.predict_proba or function that accepts a 2d ndarray. :type model: object :param train: The training dataset including the label column. :type train: pandas.DataFrame :param test: The test dataset including the label column. :type test: pandas.DataFrame :param target_column: The name of the label column. :type target_column: str :param task_type: The task to run, can be `classification` or `regression`. :type task_type: str :param categorical_features: The categorical feature names. :type categorical_features: list[str] :param train_labels: The class labels in the training dataset :type train_labels: ndarray :param serializer: Picklable custom serializer with save and load methods for custom model serialization. The save method writes the model to file given a parent directory. The load method returns the deserialized model from the same parent directory. :type serializer: object """ def __init__(self, model, train, test, target_column, task_type, categorical_features=None, train_labels=None, serializer=None): """Defines the top-level Model Analysis API. Use ModelAnalysis to analyze errors, explain the most important features, compute counterfactuals and run causal analysis in a single API. :param model: The model to compute RAI insights for. A model that implements sklearn.predict or sklearn.predict_proba or function that accepts a 2d ndarray. :type model: object :param train: The training dataset including the label column. :type train: pandas.DataFrame :param test: The test dataset including the label column. :type test: pandas.DataFrame :param target_column: The name of the label column. :type target_column: str :param task_type: The task to run, can be `classification` or `regression`. :type task_type: str :param categorical_features: The categorical feature names. :type categorical_features: list[str] :param train_labels: The class labels in the training dataset :type train_labels: ndarray :param serializer: Picklable custom serializer with save and load methods defined for model that is not serializable. The save method returns a dictionary state and load method returns the model. :type serializer: object """ self._validate_model_analysis_input_parameters( model=model, train=train, test=test, target_column=target_column, task_type=task_type, categorical_features=categorical_features, train_labels=train_labels, serializer=serializer) self.model = model self.train = train self.test = test self.target_column = target_column self.task_type = task_type self.categorical_features = categorical_features self._serializer = serializer self._train_labels = train_labels self._classes = ModelAnalysis._get_classes( task_type=self.task_type, train=self.train, target_column=self.target_column, train_labels=self._train_labels ) self._causal_manager = CausalManager( train, test, target_column, task_type, categorical_features) self._counterfactual_manager = CounterfactualManager( model=model, train=train, test=test, target_column=target_column, task_type=task_type, categorical_features=categorical_features) self._error_analysis_manager = ErrorAnalysisManager( model, test, target_column, categorical_features) self._explainer_manager = ExplainerManager( model, train, test, target_column, self._classes, categorical_features=categorical_features) self._managers = [self._causal_manager, self._counterfactual_manager, self._error_analysis_manager, self._explainer_manager] @staticmethod def _get_classes(task_type, train, target_column, train_labels): if task_type == ModelTask.CLASSIFICATION: if train_labels is None: return train[target_column].unique() else: return train_labels else: return None def _validate_model_analysis_input_parameters( self, model, train, test, target_column, task_type, categorical_features=None, train_labels=None, serializer=None): """ Validate the inputs for ModelAnalysis class. :param model: The model to compute RAI insights for. A model that implements sklearn.predict or sklearn.predict_proba or function that accepts a 2d ndarray. :type model: object :param train: The training dataset including the label column. :type train: pandas.DataFrame :param test: The test dataset including the label column. :type test: pandas.DataFrame :param target_column: The name of the label column. :type target_column: str :param task_type: The task to run, can be `classification` or `regression`. :type task_type: str :param categorical_features: The categorical feature names. :type categorical_features: list[str] :param train_labels: The class labels in the training dataset :type train_labels: ndarray :param serializer: Picklable custom serializer with save and load methods defined for model that is not serializable. The save method returns a dictionary state and load method returns the model. :type serializer: object """ valid_tasks = [ ModelTask.CLASSIFICATION.value, ModelTask.REGRESSION.value ] if task_type not in valid_tasks: message = (f"Unsupported task type '{task_type}'. " f"Should be one of {valid_tasks}") raise UserConfigValidationException(message) if model is None: warnings.warn( 'INVALID-MODEL-WARNING: No valid model is supplied. ' 'The explanations, error analysis and counterfactuals ' 'may not work') if serializer is not None: if not hasattr(serializer, 'save'): raise UserConfigValidationException( 'The serializer does not implement save()') if not hasattr(serializer, 'load'): raise UserConfigValidationException( 'The serializer does not implement load()') try: pickle.dumps(serializer) except Exception: raise UserConfigValidationException( 'The serializer should be serializable via pickle') if isinstance(train, pd.DataFrame) and isinstance(test, pd.DataFrame): if len(set(train.columns) - set(test.columns)) != 0 or \ len(set(test.columns) - set(train.columns)): raise UserConfigValidationException( 'The features in train and test data do not match') if target_column not in list(train.columns) or \ target_column not in list(test.columns): raise UserConfigValidationException( 'Target name {0} not present in train/test data'.format( target_column) ) if categorical_features is not None and \ len(categorical_features) > 0: if target_column in categorical_features: raise UserConfigValidationException( 'Found target name {0} in ' 'categorical feature list'.format( target_column) ) difference_set = set(categorical_features) - set(train.columns) if len(difference_set) > 0: message = ("Feature names in categorical_features " "do not exist in train data: " f"{list(difference_set)}") raise UserConfigValidationException(message) if train_labels is not None and task_type == \ ModelTask.CLASSIFICATION: if len(set(train[target_column].unique()) - set(train_labels)) != 0 or \ len(set(train_labels) - set(train[target_column].unique())) != 0: raise UserConfigValidationException( 'The train labels and distinct values in ' 'target (train data) do not match') if len(set(test[target_column].unique()) - set(train_labels)) != 0 or \ len(set(train_labels) - set(test[target_column].unique())) != 0: raise UserConfigValidationException( 'The train labels and distinct values in ' 'target (test data) do not match') if model is not None: # Pick one row from train and test data small_train_data = train.iloc[0:1].drop( [target_column], axis=1) small_test_data = test.iloc[0:1].drop( [target_column], axis=1) # Run predict() of the model try: model.predict(small_train_data) model.predict(small_test_data) except Exception: raise UserConfigValidationException( 'The model passed cannot be used for' ' getting predictions via predict()' ) # Run predict_proba() of the model if task_type == ModelTask.CLASSIFICATION: try: model.predict_proba(small_train_data) model.predict_proba(small_test_data) except Exception: raise UserConfigValidationException( 'The model passed cannot be used for' ' getting predictions via predict_proba()' ) @property def causal(self) -> CausalManager: """Get the causal manager. :return: The causal manager. :rtype: CausalManager """ return self._causal_manager @property def counterfactual(self) -> CounterfactualManager: """Get the counterfactual manager. :return: The counterfactual manager. :rtype: CounterfactualManager """ return self._counterfactual_manager @property def error_analysis(self) -> ErrorAnalysisManager: """Get the error analysis manager. :return: The error analysis manager. :rtype: ErrorAnalysisManager """ return self._error_analysis_manager @property def explainer(self) -> ExplainerManager: """Get the explainer manager. :return: The explainer manager. :rtype: ExplainerManager """ return self._explainer_manager def compute(self): """Calls compute on each of the managers.""" for manager in self._managers: manager.compute() def list(self): """List information about each of the managers. :return: Information about each of the managers. :rtype: dict """ configs = {} for manager in self._managers: configs[manager.name] = manager.list() return configs def get(self): """List information about each of the managers. :return: Information about each of the managers. :rtype: dict """ configs = {} for manager in self._managers: configs[manager.name] = manager.get() return configs def get_data(self): """Get all data as ModelAnalysisData object :return: Model Analysis Data :rtype: ModelAnalysisData """ data = ModelAnalysisData() data.dataset = self._get_dataset() data.modelExplanationData = self.explainer.get_data() data.errorAnalysisData = self.error_analysis.get_data() data.causalAnalysisData = self.causal.get_data() data.counterfactualData = self.counterfactual.get_data() return data def _get_dataset(self): dashboard_dataset = Dataset() dashboard_dataset.task_type = self.task_type dashboard_dataset.categorical_features = self.categorical_features dashboard_dataset.class_names = _convert_to_list( self._classes) predicted_y = None feature_length = None dataset: pd.DataFrame = self.test.drop( [self.target_column], axis=1) if isinstance(dataset, pd.DataFrame) and hasattr(dataset, 'columns'): self._dataframeColumns = dataset.columns try: list_dataset = _convert_to_list(dataset) except Exception as ex: raise ValueError( "Unsupported dataset type") from ex if dataset is not None and self.model is not None: try: predicted_y = self.model.predict(dataset) except Exception as ex: msg = "Model does not support predict method for given" "dataset type" raise ValueError(msg) from ex try: predicted_y = _convert_to_list(predicted_y) except Exception as ex: raise ValueError( "Model prediction output of unsupported type,") from ex if predicted_y is not None: if(self.task_type == "classification" and dashboard_dataset.class_names is not None): predicted_y = [dashboard_dataset.class_names.index( y) for y in predicted_y] dashboard_dataset.predicted_y = predicted_y row_length = 0 if list_dataset is not None: row_length, feature_length = np.shape(list_dataset) if row_length > 100000: raise ValueError( "Exceeds maximum number of rows" "for visualization (100000)") if feature_length > 1000: raise ValueError("Exceeds maximum number of features for" " visualization (1000). Please regenerate the" " explanation using fewer features or" " initialize the dashboard without passing a" " dataset.") dashboard_dataset.features = list_dataset true_y = self.test[self.target_column] if true_y is not None and len(true_y) == row_length: if(self.task_type == "classification" and dashboard_dataset.class_names is not None): true_y = [dashboard_dataset.class_names.index( y) for y in true_y] dashboard_dataset.true_y = _convert_to_list(true_y) features = dataset.columns if features is not None: features = _convert_to_list(features) if feature_length is not None and len(features) != feature_length: raise ValueError("Feature vector length mismatch:" " feature names length differs" " from local explanations dimension") dashboard_dataset.feature_names = features dashboard_dataset.target_column = self.target_column if (self.model is not None and hasattr(self.model, SKLearn.PREDICT_PROBA) and self.model.predict_proba is not None and dataset is not None): try: probability_y = self.model.predict_proba(dataset) except Exception as ex: raise ValueError("Model does not support predict_proba method" " for given dataset type,") from ex try: probability_y = _convert_to_list(probability_y) except Exception as ex: raise ValueError( "Model predict_proba output of unsupported type,") from ex dashboard_dataset.probability_y = probability_y return dashboard_dataset def _write_to_file(self, file_path, content): """Save the string content to the given file path. :param file_path: The file path to save the content to. :type file_path: str :param content: The string content to save. :type content: str """ with open(file_path, 'w') as file: file.write(content) def save(self, path): """Save the ModelAnalysis to the given path. :param path: The directory path to save the ModelAnalysis to. :type path: str """ top_dir = Path(path) # save each of the individual managers for manager in self._managers: manager._save(top_dir / manager.name) # save current state dtypes = self.train.dtypes.astype(str).to_dict() self._write_to_file(top_dir / (_TRAIN + _DTYPES), json.dumps(dtypes)) self._write_to_file(top_dir / _TRAIN, self.train.to_json()) dtypes = self.test.dtypes.astype(str).to_dict() self._write_to_file(top_dir / (_TEST + _DTYPES), json.dumps(dtypes)) self._write_to_file(top_dir / _TEST, self.test.to_json()) meta = { _TARGET_COLUMN: self.target_column, _TASK_TYPE: self.task_type, _CATEGORICAL_FEATURES: self.categorical_features, _TRAN_LABELS: self._train_labels } with open(top_dir / _META_JSON, 'w') as file: json.dump(meta, file) if self._serializer is not None: # save the model self._serializer.save(self.model, top_dir) # save the serializer with open(top_dir / _SERIALIZER, 'wb') as file: pickle.dump(self._serializer, file) else: if self.model is not None: has_setstate = hasattr(self.model, '__setstate__') has_getstate = hasattr(self.model, '__getstate__') if not (has_setstate and has_getstate): raise ValueError( "Model must be picklable or a custom serializer must" " be specified") with open(top_dir / _MODEL_PKL, 'wb') as file: pickle.dump(self.model, file) @staticmethod def load(path): """Load the ModelAnalysis from the given path. :param path: The directory path to load the ModelAnalysis from. :type path: str """ # create the ModelAnalysis without any properties using the __new__ # function, similar to pickle inst = ModelAnalysis.__new__(ModelAnalysis) top_dir = Path(path) # load current state with open(top_dir / (_TRAIN + _DTYPES), 'r') as file: types = json.load(file) with open(top_dir / _TRAIN, 'r') as file: train = pd.read_json(file, dtype=types) inst.__dict__[_TRAIN] = train with open(top_dir / (_TEST + _DTYPES), 'r') as file: types = json.load(file) with open(top_dir / _TEST, 'r') as file: test = pd.read_json(file, dtype=types) inst.__dict__[_TEST] = test with open(top_dir / _META_JSON, 'r') as meta_file: meta = meta_file.read() meta = json.loads(meta) inst.__dict__[_TARGET_COLUMN] = meta[_TARGET_COLUMN] inst.__dict__[_TASK_TYPE] = meta[_TASK_TYPE] inst.__dict__[_CATEGORICAL_FEATURES] = meta[_CATEGORICAL_FEATURES] inst.__dict__['_' + _TRAN_LABELS] = meta[_TRAN_LABELS] inst.__dict__['_' + _CLASSES] = ModelAnalysis._get_classes( task_type=meta[_TASK_TYPE], train=train, target_column=meta[_TARGET_COLUMN], train_labels=meta[_TRAN_LABELS] ) serializer_path = top_dir / _SERIALIZER if serializer_path.exists(): with open(serializer_path, 'rb') as file: serializer = pickle.load(file) inst.__dict__['_' + _SERIALIZER] = serializer inst.__dict__[_MODEL] = serializer.load(top_dir) else: inst.__dict__['_' + _SERIALIZER] = None with open(top_dir / _MODEL_PKL, 'rb') as file: inst.__dict__[_MODEL] = pickle.load(file) # load each of the individual managers manager_map = { ManagerNames.CAUSAL: CausalManager, ManagerNames.COUNTERFACTUAL: CounterfactualManager, ManagerNames.ERROR_ANALYSIS: ErrorAnalysisManager, ManagerNames.EXPLAINER: ExplainerManager, } managers = [] for manager_name, manager_class in manager_map.items(): full_name = f'_{manager_name}_manager' manager_dir = top_dir / manager_name manager = manager_class._load(manager_dir, inst) inst.__dict__[full_name] = manager managers.append(manager) inst.__dict__['_' + _MANAGERS] = managers return inst
[ 1, 396, 14187, 1266, 313, 29883, 29897, 7783, 15025, 13, 29937, 10413, 21144, 1090, 278, 341, 1806, 19245, 29889, 13, 13, 15945, 29908, 3206, 1475, 278, 8125, 21067, 4848, 770, 1213, 15945, 13, 13, 5215, 4390, 13, 5215, 12655, 408, 7442, 13, 5215, 11701, 408, 10518, 13, 3166, 2224, 1982, 1053, 10802, 13, 5215, 5839, 280, 13, 5215, 18116, 13, 13, 13, 3166, 14040, 1794, 3032, 2080, 29918, 19170, 1053, 903, 13441, 29918, 517, 29918, 1761, 13, 3166, 14040, 1794, 3032, 1639, 8726, 1053, 8125, 21067, 4848, 1469, 29892, 13373, 24541, 13, 3166, 14040, 1794, 3032, 7564, 29889, 3075, 1934, 1053, 29905, 13, 1678, 15629, 8659, 29892, 4737, 7221, 29892, 18581, 29931, 799, 29876, 13, 3166, 14040, 1794, 3032, 1171, 18150, 29889, 11808, 17028, 950, 29918, 12847, 1053, 313, 13, 1678, 315, 5336, 17028, 950, 3260, 29897, 13, 3166, 14040, 1794, 3032, 1171, 18150, 29889, 2704, 29918, 15916, 29918, 12847, 1053, 4829, 21067, 4848, 3260, 13, 3166, 14040, 1794, 3032, 1171, 18150, 29889, 4548, 433, 4983, 29918, 12847, 1053, 12027, 433, 4983, 3260, 13, 3166, 14040, 1794, 3032, 1171, 18150, 29889, 1113, 375, 284, 29918, 12847, 1053, 315, 1485, 284, 3260, 13, 3166, 14040, 1794, 29889, 11739, 29879, 1053, 4911, 3991, 19448, 2451, 13, 3166, 14040, 1794, 29889, 4299, 15916, 29889, 3075, 1934, 1053, 8125, 5398, 13, 13, 13, 29918, 12972, 29979, 29925, 2890, 353, 525, 29881, 8768, 29915, 13, 29918, 29911, 4717, 1177, 353, 525, 14968, 29915, 13, 29918, 18267, 353, 525, 1688, 29915, 13, 29918, 29911, 1718, 7194, 29918, 15032, 29127, 353, 525, 5182, 29918, 4914, 29915, 13, 29918, 29911, 3289, 29968, 29918, 11116, 353, 525, 7662, 29918, 1853, 29915, 13, 29918, 20387, 29931, 353, 4737, 7221, 29889, 20387, 29931, 13, 29918, 20387, 29931, 29918, 21738, 29931, 353, 903, 20387, 29931, 718, 15300, 29886, 6321, 29915, 13, 29918, 6304, 25758, 26664, 1001, 353, 525, 15550, 3950, 29915, 13, 29918, 6154, 3289, 1660, 29903, 353, 525, 13203, 29915, 13, 29918, 1529, 3521, 17070, 29903, 353, 525, 1171, 18150, 29915, 13, 29918, 29907, 3040, 29954, 1955, 2965, 1964, 29918, 16359, 1299, 11499, 29903, 353, 525, 29883, 20440, 936, 29918, 22100, 29915, 13, 29918, 26813, 29918, 24461, 6670, 29903, 353, 525, 14968, 29918, 21134, 29915, 13, 29918, 2303, 6040, 29918, 7249, 353, 4737, 7221, 29889, 2303, 6040, 29918, 7249, 13, 13, 13, 1990, 8125, 21067, 4848, 29898, 3318, 1125, 13, 13, 1678, 9995, 3206, 1475, 278, 2246, 29899, 5563, 8125, 24352, 3450, 29889, 13, 1678, 4803, 8125, 21067, 4848, 304, 27599, 4436, 29892, 5649, 278, 1556, 4100, 13, 1678, 5680, 29892, 10272, 6795, 17028, 27101, 322, 1065, 3269, 284, 7418, 297, 263, 13, 1678, 2323, 3450, 29889, 13, 1678, 584, 3207, 1904, 29901, 450, 1904, 304, 10272, 18865, 29902, 1663, 5861, 363, 29889, 13, 4706, 319, 1904, 393, 10703, 2071, 19668, 29889, 27711, 470, 2071, 19668, 29889, 27711, 29918, 771, 2291, 13, 4706, 470, 740, 393, 21486, 263, 29871, 29906, 29881, 29871, 299, 2378, 29889, 13, 1678, 584, 1853, 1904, 29901, 1203, 13, 1678, 584, 3207, 7945, 29901, 450, 6694, 8783, 3704, 278, 3858, 1897, 29889, 13, 1678, 584, 1853, 7945, 29901, 11701, 29889, 17271, 13, 1678, 584, 3207, 1243, 29901, 450, 1243, 8783, 3704, 278, 3858, 1897, 29889, 13, 1678, 584, 1853, 1243, 29901, 11701, 29889, 17271, 13, 1678, 584, 3207, 3646, 29918, 4914, 29901, 450, 1024, 310, 278, 3858, 1897, 29889, 13, 1678, 584, 1853, 3646, 29918, 4914, 29901, 851, 13, 1678, 584, 3207, 3414, 29918, 1853, 29901, 450, 3414, 304, 1065, 29892, 508, 367, 421, 1990, 2450, 29952, 470, 13, 4706, 421, 276, 11476, 1412, 13, 1678, 584, 1853, 3414, 29918, 1853, 29901, 851, 13, 1678, 584, 3207, 11608, 936, 29918, 22100, 29901, 450, 11608, 936, 4682, 2983, 29889, 13, 1678, 584, 1853, 11608, 936, 29918, 22100, 29901, 1051, 29961, 710, 29962, 13, 1678, 584, 3207, 7945, 29918, 21134, 29901, 450, 770, 11073, 297, 278, 6694, 8783, 13, 1678, 584, 1853, 7945, 29918, 21134, 29901, 29871, 299, 2378, 13, 1678, 584, 3207, 7797, 3950, 29901, 23868, 29880, 519, 2888, 7797, 3950, 411, 4078, 322, 2254, 13, 4706, 3519, 363, 2888, 1904, 7797, 2133, 29889, 13, 4706, 450, 4078, 1158, 15873, 278, 1904, 304, 934, 2183, 263, 3847, 3884, 29889, 13, 4706, 450, 2254, 1158, 3639, 278, 16964, 616, 1891, 1904, 515, 278, 1021, 13, 4706, 3847, 3884, 29889, 13, 1678, 584, 1853, 7797, 3950, 29901, 1203, 13, 1678, 9995, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 1904, 29892, 7945, 29892, 1243, 29892, 3646, 29918, 4914, 29892, 13, 462, 3414, 29918, 1853, 29892, 11608, 936, 29918, 22100, 29922, 8516, 29892, 7945, 29918, 21134, 29922, 8516, 29892, 13, 462, 7797, 3950, 29922, 8516, 1125, 13, 4706, 9995, 3206, 1475, 278, 2246, 29899, 5563, 8125, 24352, 3450, 29889, 13, 4706, 4803, 8125, 21067, 4848, 304, 27599, 4436, 29892, 5649, 278, 1556, 4100, 13, 4706, 5680, 29892, 10272, 6795, 17028, 27101, 322, 1065, 3269, 284, 7418, 297, 263, 13, 4706, 2323, 3450, 29889, 13, 4706, 584, 3207, 1904, 29901, 450, 1904, 304, 10272, 18865, 29902, 1663, 5861, 363, 29889, 13, 9651, 319, 1904, 393, 10703, 2071, 19668, 29889, 27711, 470, 2071, 19668, 29889, 27711, 29918, 771, 2291, 13, 9651, 470, 740, 393, 21486, 263, 29871, 29906, 29881, 29871, 299, 2378, 29889, 13, 4706, 584, 1853, 1904, 29901, 1203, 13, 4706, 584, 3207, 7945, 29901, 450, 6694, 8783, 3704, 278, 3858, 1897, 29889, 13, 4706, 584, 1853, 7945, 29901, 11701, 29889, 17271, 13, 4706, 584, 3207, 1243, 29901, 450, 1243, 8783, 3704, 278, 3858, 1897, 29889, 13, 4706, 584, 1853, 1243, 29901, 11701, 29889, 17271, 13, 4706, 584, 3207, 3646, 29918, 4914, 29901, 450, 1024, 310, 278, 3858, 1897, 29889, 13, 4706, 584, 1853, 3646, 29918, 4914, 29901, 851, 13, 4706, 584, 3207, 3414, 29918, 1853, 29901, 450, 3414, 304, 1065, 29892, 508, 367, 421, 1990, 2450, 29952, 470, 13, 9651, 421, 276, 11476, 1412, 13, 4706, 584, 1853, 3414, 29918, 1853, 29901, 851, 13, 4706, 584, 3207, 11608, 936, 29918, 22100, 29901, 450, 11608, 936, 4682, 2983, 29889, 13, 4706, 584, 1853, 11608, 936, 29918, 22100, 29901, 1051, 29961, 710, 29962, 13, 4706, 584, 3207, 7945, 29918, 21134, 29901, 450, 770, 11073, 297, 278, 6694, 8783, 13, 4706, 584, 1853, 7945, 29918, 21134, 29901, 29871, 299, 2378, 13, 4706, 584, 3207, 7797, 3950, 29901, 23868, 29880, 519, 2888, 7797, 3950, 411, 4078, 322, 2254, 13, 9651, 3519, 3342, 363, 1904, 393, 338, 451, 7797, 13902, 29889, 450, 4078, 13, 9651, 1158, 3639, 263, 8600, 2106, 322, 2254, 1158, 3639, 278, 13, 9651, 1904, 29889, 13, 4706, 584, 1853, 7797, 3950, 29901, 1203, 13, 4706, 9995, 13, 4706, 1583, 3032, 15480, 29918, 4299, 29918, 15916, 29918, 2080, 29918, 16744, 29898, 13, 9651, 1904, 29922, 4299, 29892, 7945, 29922, 14968, 29892, 1243, 29922, 1688, 29892, 13, 9651, 3646, 29918, 4914, 29922, 5182, 29918, 4914, 29892, 3414, 29918, 1853, 29922, 7662, 29918, 1853, 29892, 13, 9651, 11608, 936, 29918, 22100, 29922, 29883, 20440, 936, 29918, 22100, 29892, 13, 9651, 7945, 29918, 21134, 29922, 14968, 29918, 21134, 29892, 13, 9651, 7797, 3950, 29922, 15550, 3950, 29897, 13, 4706, 1583, 29889, 4299, 353, 1904, 13, 4706, 1583, 29889, 14968, 353, 7945, 13, 4706, 1583, 29889, 1688, 353, 1243, 13, 4706, 1583, 29889, 5182, 29918, 4914, 353, 3646, 29918, 4914, 13, 4706, 1583, 29889, 7662, 29918, 1853, 353, 3414, 29918, 1853, 13, 4706, 1583, 29889, 29883, 20440, 936, 29918, 22100, 353, 11608, 936, 29918, 22100, 13, 4706, 1583, 3032, 15550, 3950, 353, 7797, 3950, 13, 4706, 1583, 3032, 14968, 29918, 21134, 353, 7945, 29918, 21134, 13, 4706, 1583, 3032, 13203, 353, 8125, 21067, 4848, 3032, 657, 29918, 13203, 29898, 13, 9651, 3414, 29918, 1853, 29922, 1311, 29889, 7662, 29918, 1853, 29892, 13, 9651, 7945, 29922, 1311, 29889, 14968, 29892, 13, 9651, 3646, 29918, 4914, 29922, 1311, 29889, 5182, 29918, 4914, 29892, 13, 9651, 7945, 29918, 21134, 29922, 1311, 3032, 14968, 29918, 21134, 13, 4706, 1723, 13, 13, 4706, 1583, 3032, 1113, 375, 284, 29918, 12847, 353, 315, 1485, 284, 3260, 29898, 13, 9651, 7945, 29892, 1243, 29892, 3646, 29918, 4914, 29892, 3414, 29918, 1853, 29892, 11608, 936, 29918, 22100, 29897, 13, 13, 4706, 1583, 3032, 11808, 17028, 950, 29918, 12847, 353, 315, 5336, 17028, 950, 3260, 29898, 13, 9651, 1904, 29922, 4299, 29892, 7945, 29922, 14968, 29892, 1243, 29922, 1688, 29892, 13, 9651, 3646, 29918, 4914, 29922, 5182, 29918, 4914, 29892, 3414, 29918, 1853, 29922, 7662, 29918, 1853, 29892, 13, 9651, 11608, 936, 29918, 22100, 29922, 29883, 20440, 936, 29918, 22100, 29897, 13, 13, 4706, 1583, 3032, 2704, 29918, 15916, 29918, 12847, 353, 4829, 21067, 4848, 3260, 29898, 13, 9651, 1904, 29892, 1243, 29892, 3646, 29918, 4914, 29892, 13, 9651, 11608, 936, 29918, 22100, 29897, 13, 13, 4706, 1583, 3032, 4548, 433, 4983, 29918, 12847, 353, 12027, 433, 4983, 3260, 29898, 13, 9651, 1904, 29892, 7945, 29892, 1243, 29892, 13, 9651, 3646, 29918, 4914, 29892, 13, 9651, 1583, 3032, 13203, 29892, 13, 9651, 11608, 936, 29918, 22100, 29922, 29883, 20440, 936, 29918, 22100, 29897, 13, 13, 4706, 1583, 3032, 1171, 18150, 353, 518, 1311, 3032, 1113, 375, 284, 29918, 12847, 29892, 13, 462, 3986, 1583, 3032, 11808, 17028, 950, 29918, 12847, 29892, 13, 462, 3986, 1583, 3032, 2704, 29918, 15916, 29918, 12847, 29892, 13, 462, 3986, 1583, 3032, 4548, 433, 4983, 29918, 12847, 29962, 13, 13, 1678, 732, 7959, 5696, 13, 1678, 822, 903, 657, 29918, 13203, 29898, 7662, 29918, 1853, 29892, 7945, 29892, 3646, 29918, 4914, 29892, 7945, 29918, 21134, 1125, 13, 4706, 565, 3414, 29918, 1853, 1275, 8125, 5398, 29889, 13875, 1799, 6545, 28541, 29901, 13, 9651, 565, 7945, 29918, 21134, 338, 6213, 29901, 13, 18884, 736, 7945, 29961, 5182, 29918, 4914, 1822, 13092, 580, 13, 9651, 1683, 29901, 13, 18884, 736, 7945, 29918, 21134, 13, 4706, 1683, 29901, 13, 9651, 736, 6213, 13, 13, 1678, 822, 903, 15480, 29918, 4299, 29918, 15916, 29918, 2080, 29918, 16744, 29898, 13, 9651, 1583, 29892, 1904, 29892, 7945, 29892, 1243, 29892, 3646, 29918, 4914, 29892, 13, 9651, 3414, 29918, 1853, 29892, 11608, 936, 29918, 22100, 29922, 8516, 29892, 7945, 29918, 21134, 29922, 8516, 29892, 13, 9651, 7797, 3950, 29922, 8516, 1125, 13, 4706, 9995, 13, 4706, 15758, 403, 278, 10970, 363, 8125, 21067, 4848, 770, 29889, 13, 13, 4706, 584, 3207, 1904, 29901, 450, 1904, 304, 10272, 18865, 29902, 1663, 5861, 363, 29889, 13, 9651, 319, 1904, 393, 10703, 2071, 19668, 29889, 27711, 470, 2071, 19668, 29889, 27711, 29918, 771, 2291, 13, 9651, 470, 740, 393, 21486, 263, 29871, 29906, 29881, 29871, 299, 2378, 29889, 13, 4706, 584, 1853, 1904, 29901, 1203, 13, 4706, 584, 3207, 7945, 29901, 450, 6694, 8783, 3704, 278, 3858, 1897, 29889, 13, 4706, 584, 1853, 7945, 29901, 11701, 29889, 17271, 13, 4706, 584, 3207, 1243, 29901, 450, 1243, 8783, 3704, 278, 3858, 1897, 29889, 13, 4706, 584, 1853, 1243, 29901, 11701, 29889, 17271, 13, 4706, 584, 3207, 3646, 29918, 4914, 29901, 450, 1024, 310, 278, 3858, 1897, 29889, 13, 4706, 584, 1853, 3646, 29918, 4914, 29901, 851, 13, 4706, 584, 3207, 3414, 29918, 1853, 29901, 450, 3414, 304, 1065, 29892, 508, 367, 421, 1990, 2450, 29952, 470, 13, 9651, 421, 276, 11476, 1412, 13, 4706, 584, 1853, 3414, 29918, 1853, 29901, 851, 13, 4706, 584, 3207, 11608, 936, 29918, 22100, 29901, 450, 11608, 936, 4682, 2983, 29889, 13, 4706, 584, 1853, 11608, 936, 29918, 22100, 29901, 1051, 29961, 710, 29962, 13, 4706, 584, 3207, 7945, 29918, 21134, 29901, 450, 770, 11073, 297, 278, 6694, 8783, 13, 4706, 584, 1853, 7945, 29918, 21134, 29901, 29871, 299, 2378, 13, 4706, 584, 3207, 7797, 3950, 29901, 23868, 29880, 519, 2888, 7797, 3950, 411, 4078, 322, 2254, 13, 9651, 3519, 3342, 363, 1904, 393, 338, 451, 7797, 13902, 29889, 450, 4078, 13, 9651, 1158, 3639, 263, 8600, 2106, 322, 2254, 1158, 3639, 278, 13, 9651, 1904, 29889, 13, 4706, 584, 1853, 7797, 3950, 29901, 1203, 13, 4706, 9995, 13, 13, 4706, 2854, 29918, 20673, 353, 518, 13, 9651, 8125, 5398, 29889, 13875, 1799, 6545, 28541, 29889, 1767, 29892, 13, 9651, 8125, 5398, 29889, 18166, 1525, 13507, 29889, 1767, 13, 4706, 4514, 13, 4706, 565, 3414, 29918, 1853, 451, 297, 2854, 29918, 20673, 29901, 13, 9651, 2643, 353, 313, 29888, 29908, 25807, 29884, 3016, 287, 3414, 1134, 22372, 7662, 29918, 1853, 29913, 4286, 376, 13, 462, 539, 285, 29908, 26857, 367, 697, 310, 426, 3084, 29918, 20673, 27195, 13, 9651, 12020, 4911, 3991, 19448, 2451, 29898, 4906, 29897, 13, 13, 4706, 565, 1904, 338, 6213, 29901, 13, 9651, 18116, 29889, 25442, 29898, 13, 18884, 525, 1177, 26707, 29899, 20387, 29931, 29899, 29956, 25614, 29901, 1939, 2854, 1904, 338, 19056, 29889, 525, 13, 18884, 525, 1576, 7309, 800, 29892, 1059, 7418, 322, 6795, 17028, 27101, 525, 13, 18884, 525, 13029, 451, 664, 1495, 13, 13, 4706, 565, 7797, 3950, 338, 451, 6213, 29901, 13, 9651, 565, 451, 756, 5552, 29898, 15550, 3950, 29892, 525, 7620, 29374, 13, 18884, 12020, 4911, 3991, 19448, 2451, 29898, 13, 462, 1678, 525, 1576, 7797, 3950, 947, 451, 2334, 4078, 580, 1495, 13, 13, 9651, 565, 451, 756, 5552, 29898, 15550, 3950, 29892, 525, 1359, 29374, 13, 18884, 12020, 4911, 3991, 19448, 2451, 29898, 13, 462, 1678, 525, 1576, 7797, 3950, 947, 451, 2334, 2254, 580, 1495, 13, 13, 9651, 1018, 29901, 13, 18884, 5839, 280, 29889, 29881, 17204, 29898, 15550, 3950, 29897, 13, 9651, 5174, 8960, 29901, 13, 18884, 12020, 4911, 3991, 19448, 2451, 29898, 13, 462, 1678, 525, 1576, 7797, 3950, 881, 367, 7797, 13902, 3025, 5839, 280, 1495, 13, 13, 4706, 565, 338, 8758, 29898, 14968, 29892, 10518, 29889, 17271, 29897, 322, 338, 8758, 29898, 1688, 29892, 10518, 29889, 17271, 1125, 13, 9651, 565, 7431, 29898, 842, 29898, 14968, 29889, 13099, 29897, 448, 731, 29898, 1688, 29889, 13099, 876, 2804, 29871, 29900, 470, 320, 13, 462, 1678, 7431, 29898, 842, 29898, 1688, 29889, 13099, 29897, 448, 731, 29898, 14968, 29889, 13099, 22164, 13, 18884, 12020, 4911, 3991, 19448, 2451, 29898, 13, 462, 1678, 525, 1576, 5680, 297, 7945, 322, 1243, 848, 437, 451, 1993, 1495, 13, 13, 9651, 565, 3646, 29918, 4914, 451, 297, 1051, 29898, 14968, 29889, 13099, 29897, 470, 320, 13, 462, 1678, 3646, 29918, 4914, 451, 297, 1051, 29898, 1688, 29889, 13099, 1125, 13, 18884, 12020, 4911, 3991, 19448, 2451, 29898, 13, 462, 1678, 525, 8667, 1024, 426, 29900, 29913, 451, 2198, 297, 7945, 29914, 1688, 848, 4286, 4830, 29898, 13, 462, 4706, 3646, 29918, 4914, 29897, 13, 18884, 1723, 13, 13, 9651, 565, 11608, 936, 29918, 22100, 338, 451, 6213, 322, 320, 13, 462, 1678, 7431, 29898, 29883, 20440, 936, 29918, 22100, 29897, 1405, 29871, 29900, 29901, 13, 18884, 565, 3646, 29918, 4914, 297, 11608, 936, 29918, 22100, 29901, 13, 462, 1678, 12020, 4911, 3991, 19448, 2451, 29898, 13, 462, 4706, 525, 9692, 3646, 1024, 426, 29900, 29913, 297, 525, 13, 462, 4706, 525, 29883, 20440, 936, 4682, 1051, 4286, 4830, 29898, 13, 462, 9651, 3646, 29918, 4914, 29897, 13, 462, 1678, 1723, 13, 13, 18884, 4328, 29918, 842, 353, 731, 29898, 29883, 20440, 936, 29918, 22100, 29897, 448, 731, 29898, 14968, 29889, 13099, 29897, 13, 18884, 565, 7431, 29898, 29881, 17678, 29918, 842, 29897, 1405, 29871, 29900, 29901, 13, 462, 1678, 2643, 353, 4852, 19132, 2983, 297, 11608, 936, 29918, 22100, 376, 13, 462, 1669, 376, 1867, 451, 1863, 297, 7945, 848, 29901, 376, 13, 462, 1669, 285, 29908, 29912, 1761, 29898, 29881, 17678, 29918, 842, 2915, 1159, 13, 462, 1678, 12020, 4911, 3991, 19448, 2451, 29898, 4906, 29897, 13, 13, 9651, 565, 7945, 29918, 21134, 338, 451, 6213, 322, 3414, 29918, 1853, 1275, 320, 13, 462, 1678, 8125, 5398, 29889, 13875, 1799, 6545, 28541, 29901, 13, 18884, 565, 7431, 29898, 842, 29898, 14968, 29961, 5182, 29918, 4914, 1822, 13092, 3101, 448, 13, 462, 539, 731, 29898, 14968, 29918, 21134, 876, 2804, 29871, 29900, 470, 320, 13, 462, 4706, 7431, 29898, 842, 29898, 14968, 29918, 21134, 29897, 448, 13, 462, 9651, 731, 29898, 14968, 29961, 5182, 29918, 4914, 1822, 13092, 22130, 2804, 29871, 29900, 29901, 13, 462, 1678, 12020, 4911, 3991, 19448, 2451, 29898, 13, 462, 4706, 525, 1576, 7945, 11073, 322, 8359, 1819, 297, 525, 13, 462, 4706, 525, 5182, 313, 14968, 848, 29897, 437, 451, 1993, 1495, 13, 13, 18884, 565, 7431, 29898, 842, 29898, 1688, 29961, 5182, 29918, 4914, 1822, 13092, 3101, 448, 13, 462, 539, 731, 29898, 14968, 29918, 21134, 876, 2804, 29871, 29900, 470, 320, 13, 462, 4706, 7431, 29898, 842, 29898, 14968, 29918, 21134, 29897, 448, 13, 462, 9651, 731, 29898, 1688, 29961, 5182, 29918, 4914, 1822, 13092, 22130, 2804, 29871, 29900, 29901, 13, 462, 1678, 12020, 4911, 3991, 19448, 2451, 29898, 13, 462, 4706, 525, 1576, 7945, 11073, 322, 8359, 1819, 297, 525, 13, 462, 4706, 525, 5182, 313, 1688, 848, 29897, 437, 451, 1993, 1495, 13, 13, 9651, 565, 1904, 338, 451, 6213, 29901, 13, 18884, 396, 23868, 697, 1948, 515, 7945, 322, 1243, 848, 13, 18884, 2319, 29918, 14968, 29918, 1272, 353, 7945, 29889, 309, 542, 29961, 29900, 29901, 29896, 1822, 8865, 29898, 13, 462, 1678, 518, 5182, 29918, 4914, 1402, 9685, 29922, 29896, 29897, 13, 18884, 2319, 29918, 1688, 29918, 1272, 353, 1243, 29889, 309, 542, 29961, 29900, 29901, 29896, 1822, 8865, 29898, 13, 462, 1678, 518, 5182, 29918, 4914, 1402, 9685, 29922, 29896, 29897, 13, 13, 18884, 396, 7525, 8500, 580, 310, 278, 1904, 13, 18884, 1018, 29901, 13, 462, 1678, 1904, 29889, 27711, 29898, 9278, 29918, 14968, 29918, 1272, 29897, 13, 462, 1678, 1904, 29889, 27711, 29898, 9278, 29918, 1688, 29918, 1272, 29897, 13, 18884, 5174, 8960, 29901, 13, 462, 1678, 12020, 4911, 3991, 19448, 2451, 29898, 13, 462, 4706, 525, 1576, 1904, 4502, 2609, 367, 1304, 363, 29915, 13, 462, 4706, 525, 2805, 27303, 3025, 8500, 580, 29915, 13, 462, 1678, 1723, 13, 13, 18884, 396, 7525, 8500, 29918, 771, 2291, 580, 310, 278, 1904, 13, 18884, 565, 3414, 29918, 1853, 1275, 8125, 5398, 29889, 13875, 1799, 6545, 28541, 29901, 13, 462, 1678, 1018, 29901, 13, 462, 4706, 1904, 29889, 27711, 29918, 771, 2291, 29898, 9278, 29918, 14968, 29918, 1272, 29897, 13, 462, 4706, 1904, 29889, 27711, 29918, 771, 2291, 29898, 9278, 29918, 1688, 29918, 1272, 29897, 13, 462, 1678, 5174, 8960, 29901, 13, 462, 4706, 12020, 4911, 3991, 19448, 2451, 29898, 13, 462, 9651, 525, 1576, 1904, 4502, 2609, 367, 1304, 363, 29915, 13, 462, 9651, 525, 2805, 27303, 3025, 8500, 29918, 771, 2291, 580, 29915, 13, 462, 4706, 1723, 13, 13, 1678, 732, 6799, 13, 1678, 822, 3269, 284, 29898, 1311, 29897, 1599, 315, 1485, 284, 3260, 29901, 13, 4706, 9995, 2577, 278, 3269, 284, 8455, 29889, 13, 4706, 584, 2457, 29901, 450, 3269, 284, 8455, 29889, 13, 4706, 584, 29878, 1853, 29901, 315, 1485, 284, 3260, 13, 4706, 9995, 13, 4706, 736, 1583, 3032, 1113, 375, 284, 29918, 12847, 13, 13, 1678, 732, 6799, 13, 1678, 822, 6795, 17028, 950, 29898, 1311, 29897, 1599, 315, 5336, 17028, 950, 3260, 29901, 13, 4706, 9995, 2577, 278, 6795, 17028, 950, 8455, 29889, 13, 4706, 584, 2457, 29901, 450, 6795, 17028, 950, 8455, 29889, 13, 4706, 584, 29878, 1853, 29901, 315, 5336, 17028, 950, 3260, 13, 4706, 9995, 13, 4706, 736, 1583, 3032, 11808, 17028, 950, 29918, 12847, 13, 13, 1678, 732, 6799, 13, 1678, 822, 1059, 29918, 15916, 29898, 1311, 29897, 1599, 4829, 21067, 4848, 3260, 29901, 13, 4706, 9995, 2577, 278, 1059, 7418, 8455, 29889, 13, 4706, 584, 2457, 29901, 450, 1059, 7418, 8455, 29889, 13, 4706, 584, 29878, 1853, 29901, 4829, 21067, 4848, 3260, 13, 4706, 9995, 13, 4706, 736, 1583, 3032, 2704, 29918, 15916, 29918, 12847, 13, 13, 1678, 732, 6799, 13, 1678, 822, 3641, 4983, 29898, 1311, 29897, 1599, 12027, 433, 4983, 3260, 29901, 13, 4706, 9995, 2577, 278, 3641, 4983, 8455, 29889, 13, 4706, 584, 2457, 29901, 450, 3641, 4983, 8455, 29889, 13, 4706, 584, 29878, 1853, 29901, 12027, 433, 4983, 3260, 13, 4706, 9995, 13, 4706, 736, 1583, 3032, 4548, 433, 4983, 29918, 12847, 13, 13, 1678, 822, 10272, 29898, 1311, 1125, 13, 4706, 9995, 29907, 4293, 10272, 373, 1269, 310, 278, 767, 18150, 1213, 15945, 13, 4706, 363, 8455, 297, 1583, 3032, 1171, 18150, 29901, 13, 9651, 8455, 29889, 26017, 580, 13, 13, 1678, 822, 1051, 29898, 1311, 1125, 13, 4706, 9995, 1293, 2472, 1048, 1269, 310, 278, 767, 18150, 29889, 13, 4706, 584, 2457, 29901, 10343, 1048, 1269, 310, 278, 767, 18150, 29889, 13, 4706, 584, 29878, 1853, 29901, 9657, 13, 4706, 9995, 13, 4706, 2295, 29879, 353, 6571, 13, 4706, 363, 8455, 297, 1583, 3032, 1171, 18150, 29901, 13, 9651, 2295, 29879, 29961, 12847, 29889, 978, 29962, 353, 8455, 29889, 1761, 580, 13, 4706, 736, 2295, 29879, 13, 13, 1678, 822, 679, 29898, 1311, 1125, 13, 4706, 9995, 1293, 2472, 1048, 1269, 310, 278, 767, 18150, 29889, 13, 13, 4706, 584, 2457, 29901, 10343, 1048, 1269, 310, 278, 767, 18150, 29889, 13, 4706, 584, 29878, 1853, 29901, 9657, 13, 4706, 9995, 13, 4706, 2295, 29879, 353, 6571, 13, 4706, 363, 8455, 297, 1583, 3032, 1171, 18150, 29901, 13, 9651, 2295, 29879, 29961, 12847, 29889, 978, 29962, 353, 8455, 29889, 657, 580, 13, 4706, 736, 2295, 29879, 13, 13, 1678, 822, 679, 29918, 1272, 29898, 1311, 1125, 13, 4706, 9995, 2577, 599, 848, 408, 8125, 21067, 4848, 1469, 1203, 13, 13, 4706, 584, 2457, 29901, 8125, 24352, 3630, 13, 4706, 584, 29878, 1853, 29901, 8125, 21067, 4848, 1469, 13, 4706, 9995, 13, 4706, 848, 353, 8125, 21067, 4848, 1469, 580, 13, 4706, 848, 29889, 24713, 353, 1583, 3032, 657, 29918, 24713, 580, 13, 4706, 848, 29889, 4299, 1252, 9018, 362, 1469, 353, 1583, 29889, 4548, 433, 4983, 29889, 657, 29918, 1272, 580, 13, 4706, 848, 29889, 2704, 21067, 4848, 1469, 353, 1583, 29889, 2704, 29918, 15916, 29889, 657, 29918, 1272, 580, 13, 4706, 848, 29889, 1113, 375, 284, 21067, 4848, 1469, 353, 1583, 29889, 1113, 375, 284, 29889, 657, 29918, 1272, 580, 13, 4706, 848, 29889, 11808, 17028, 950, 1469, 353, 1583, 29889, 11808, 17028, 950, 29889, 657, 29918, 1272, 580, 13, 4706, 736, 848, 13, 13, 1678, 822, 903, 657, 29918, 24713, 29898, 1311, 1125, 13, 4706, 12569, 3377, 29918, 24713, 353, 13373, 24541, 580, 13, 4706, 12569, 3377, 29918, 24713, 29889, 7662, 29918, 1853, 353, 1583, 29889, 7662, 29918, 1853, 13, 4706, 12569, 3377, 29918, 24713, 29889, 29883, 20440, 936, 29918, 22100, 353, 1583, 29889, 29883, 20440, 936, 29918, 22100, 13, 4706, 12569, 3377, 29918, 24713, 29889, 1990, 29918, 7039, 353, 903, 13441, 29918, 517, 29918, 1761, 29898, 13, 9651, 1583, 3032, 13203, 29897, 13, 13, 4706, 25383, 29918, 29891, 353, 6213, 13, 4706, 4682, 29918, 2848, 353, 6213, 13, 13, 4706, 8783, 29901, 10518, 29889, 17271, 353, 1583, 29889, 1688, 29889, 8865, 29898, 13, 9651, 518, 1311, 29889, 5182, 29918, 4914, 1402, 9685, 29922, 29896, 29897, 13, 13, 4706, 565, 338, 8758, 29898, 24713, 29892, 10518, 29889, 17271, 29897, 322, 756, 5552, 29898, 24713, 29892, 525, 13099, 29374, 13, 9651, 1583, 3032, 1272, 2557, 14289, 353, 8783, 29889, 13099, 13, 4706, 1018, 29901, 13, 9651, 1051, 29918, 24713, 353, 903, 13441, 29918, 517, 29918, 1761, 29898, 24713, 29897, 13, 4706, 5174, 8960, 408, 429, 29901, 13, 9651, 12020, 7865, 2392, 29898, 13, 18884, 376, 25807, 29884, 3016, 287, 8783, 1134, 1159, 515, 429, 13, 4706, 565, 8783, 338, 451, 6213, 322, 1583, 29889, 4299, 338, 451, 6213, 29901, 13, 9651, 1018, 29901, 13, 18884, 25383, 29918, 29891, 353, 1583, 29889, 4299, 29889, 27711, 29898, 24713, 29897, 13, 9651, 5174, 8960, 408, 429, 29901, 13, 18884, 10191, 353, 376, 3195, 947, 451, 2304, 8500, 1158, 363, 2183, 29908, 13, 18884, 376, 24713, 1134, 29908, 13, 18884, 12020, 7865, 2392, 29898, 7645, 29897, 515, 429, 13, 9651, 1018, 29901, 13, 18884, 25383, 29918, 29891, 353, 903, 13441, 29918, 517, 29918, 1761, 29898, 11965, 18186, 29918, 29891, 29897, 13, 9651, 5174, 8960, 408, 429, 29901, 13, 18884, 12020, 7865, 2392, 29898, 13, 462, 1678, 376, 3195, 18988, 1962, 310, 443, 23765, 1134, 29892, 1159, 515, 429, 13, 4706, 565, 25383, 29918, 29891, 338, 451, 6213, 29901, 13, 9651, 565, 29898, 1311, 29889, 7662, 29918, 1853, 1275, 376, 1990, 2450, 29908, 322, 13, 462, 1678, 12569, 3377, 29918, 24713, 29889, 1990, 29918, 7039, 338, 451, 6213, 1125, 13, 18884, 25383, 29918, 29891, 353, 518, 14592, 3377, 29918, 24713, 29889, 1990, 29918, 7039, 29889, 2248, 29898, 13, 462, 1678, 343, 29897, 363, 343, 297, 25383, 29918, 29891, 29962, 13, 9651, 12569, 3377, 29918, 24713, 29889, 11965, 18186, 29918, 29891, 353, 25383, 29918, 29891, 13, 4706, 1948, 29918, 2848, 353, 29871, 29900, 13, 13, 4706, 565, 1051, 29918, 24713, 338, 451, 6213, 29901, 13, 9651, 1948, 29918, 2848, 29892, 4682, 29918, 2848, 353, 7442, 29889, 12181, 29898, 1761, 29918, 24713, 29897, 13, 9651, 565, 1948, 29918, 2848, 1405, 29871, 29896, 29900, 29900, 29900, 29900, 29900, 29901, 13, 18884, 12020, 7865, 2392, 29898, 13, 462, 1678, 376, 1252, 3947, 29879, 7472, 1353, 310, 4206, 29908, 13, 462, 1678, 376, 1454, 7604, 2133, 313, 29896, 29900, 29900, 29900, 29900, 29900, 25760, 13, 9651, 565, 4682, 29918, 2848, 1405, 29871, 29896, 29900, 29900, 29900, 29901, 13, 18884, 12020, 7865, 2392, 703, 1252, 3947, 29879, 7472, 1353, 310, 5680, 363, 29908, 13, 462, 462, 376, 7604, 2133, 313, 29896, 29900, 29900, 29900, 467, 3529, 1072, 759, 403, 278, 29908, 13, 462, 462, 376, 8252, 773, 28145, 5680, 470, 29908, 13, 462, 462, 376, 11905, 278, 12569, 3377, 1728, 6819, 263, 29908, 13, 462, 462, 376, 8783, 23157, 13, 9651, 12569, 3377, 29918, 24713, 29889, 22100, 353, 1051, 29918, 24713, 13, 13, 4706, 1565, 29918, 29891, 353, 1583, 29889, 1688, 29961, 1311, 29889, 5182, 29918, 4914, 29962, 13, 13, 4706, 565, 1565, 29918, 29891, 338, 451, 6213, 322, 7431, 29898, 3009, 29918, 29891, 29897, 1275, 1948, 29918, 2848, 29901, 13, 9651, 565, 29898, 1311, 29889, 7662, 29918, 1853, 1275, 376, 1990, 2450, 29908, 322, 13, 1669, 12569, 3377, 29918, 24713, 29889, 1990, 29918, 7039, 338, 451, 6213, 1125, 13, 18884, 1565, 29918, 29891, 353, 518, 14592, 3377, 29918, 24713, 29889, 1990, 29918, 7039, 29889, 2248, 29898, 13, 462, 1678, 343, 29897, 363, 343, 297, 1565, 29918, 29891, 29962, 13, 9651, 12569, 3377, 29918, 24713, 29889, 3009, 29918, 29891, 353, 903, 13441, 29918, 517, 29918, 1761, 29898, 3009, 29918, 29891, 29897, 13, 13, 4706, 5680, 353, 8783, 29889, 13099, 13, 13, 4706, 565, 5680, 338, 451, 6213, 29901, 13, 9651, 5680, 353, 903, 13441, 29918, 517, 29918, 1761, 29898, 22100, 29897, 13, 9651, 565, 4682, 29918, 2848, 338, 451, 6213, 322, 7431, 29898, 22100, 29897, 2804, 4682, 29918, 2848, 29901, 13, 18884, 12020, 7865, 2392, 703, 19132, 4608, 3309, 29635, 6160, 13, 462, 462, 376, 4682, 2983, 3309, 2923, 414, 29908, 13, 462, 462, 376, 515, 1887, 7309, 800, 9927, 1159, 13, 9651, 12569, 3377, 29918, 24713, 29889, 14394, 29918, 7039, 353, 5680, 13, 4706, 12569, 3377, 29918, 24713, 29889, 5182, 29918, 4914, 353, 1583, 29889, 5182, 29918, 4914, 13, 4706, 565, 313, 1311, 29889, 4299, 338, 451, 6213, 322, 13, 18884, 756, 5552, 29898, 1311, 29889, 4299, 29892, 18581, 29931, 799, 29876, 29889, 15094, 4571, 1783, 29918, 8618, 5688, 29897, 322, 13, 18884, 1583, 29889, 4299, 29889, 27711, 29918, 771, 2291, 338, 451, 6213, 322, 13, 18884, 8783, 338, 451, 6213, 1125, 13, 9651, 1018, 29901, 13, 18884, 6976, 29918, 29891, 353, 1583, 29889, 4299, 29889, 27711, 29918, 771, 2291, 29898, 24713, 29897, 13, 9651, 5174, 8960, 408, 429, 29901, 13, 18884, 12020, 7865, 2392, 703, 3195, 947, 451, 2304, 8500, 29918, 771, 2291, 1158, 29908, 13, 462, 462, 376, 363, 2183, 8783, 1134, 29892, 1159, 515, 429, 13, 9651, 1018, 29901, 13, 18884, 6976, 29918, 29891, 353, 903, 13441, 29918, 517, 29918, 1761, 29898, 22795, 3097, 29918, 29891, 29897, 13, 9651, 5174, 8960, 408, 429, 29901, 13, 18884, 12020, 7865, 2392, 29898, 13, 462, 1678, 376, 3195, 8500, 29918, 771, 2291, 1962, 310, 443, 23765, 1134, 29892, 1159, 515, 429, 13, 9651, 12569, 3377, 29918, 24713, 29889, 22795, 3097, 29918, 29891, 353, 6976, 29918, 29891, 13, 13, 4706, 736, 12569, 3377, 29918, 24713, 13, 13, 1678, 822, 903, 3539, 29918, 517, 29918, 1445, 29898, 1311, 29892, 934, 29918, 2084, 29892, 2793, 1125, 13, 4706, 9995, 11371, 278, 1347, 2793, 304, 278, 2183, 934, 2224, 29889, 13, 4706, 584, 3207, 934, 29918, 2084, 29901, 450, 934, 2224, 304, 4078, 278, 2793, 304, 29889, 13, 4706, 584, 1853, 934, 29918, 2084, 29901, 851, 13, 4706, 584, 3207, 2793, 29901, 450, 1347, 2793, 304, 4078, 29889, 13, 4706, 584, 1853, 2793, 29901, 851, 13, 4706, 9995, 13, 4706, 411, 1722, 29898, 1445, 29918, 2084, 29892, 525, 29893, 1495, 408, 934, 29901, 13, 9651, 934, 29889, 3539, 29898, 3051, 29897, 13, 13, 1678, 822, 4078, 29898, 1311, 29892, 2224, 1125, 13, 4706, 9995, 11371, 278, 8125, 21067, 4848, 304, 278, 2183, 2224, 29889, 13, 4706, 584, 3207, 2224, 29901, 450, 3884, 2224, 304, 4078, 278, 8125, 21067, 4848, 304, 29889, 13, 4706, 584, 1853, 2224, 29901, 851, 13, 4706, 9995, 13, 4706, 2246, 29918, 3972, 353, 10802, 29898, 2084, 29897, 13, 4706, 396, 4078, 1269, 310, 278, 5375, 767, 18150, 13, 4706, 363, 8455, 297, 1583, 3032, 1171, 18150, 29901, 13, 9651, 8455, 3032, 7620, 29898, 3332, 29918, 3972, 847, 8455, 29889, 978, 29897, 13, 4706, 396, 4078, 1857, 2106, 13, 4706, 270, 8768, 353, 1583, 29889, 14968, 29889, 29881, 8768, 29889, 579, 668, 29898, 710, 467, 517, 29918, 8977, 580, 13, 4706, 1583, 3032, 3539, 29918, 517, 29918, 1445, 29898, 3332, 29918, 3972, 847, 9423, 29911, 4717, 1177, 718, 903, 12972, 29979, 29925, 2890, 511, 13, 462, 9651, 4390, 29889, 29881, 17204, 29898, 29881, 8768, 876, 13, 4706, 1583, 3032, 3539, 29918, 517, 29918, 1445, 29898, 3332, 29918, 3972, 847, 903, 29911, 4717, 1177, 29892, 1583, 29889, 14968, 29889, 517, 29918, 3126, 3101, 13, 4706, 270, 8768, 353, 1583, 29889, 1688, 29889, 29881, 8768, 29889, 579, 668, 29898, 710, 467, 517, 29918, 8977, 580, 13, 4706, 1583, 3032, 3539, 29918, 517, 29918, 1445, 29898, 3332, 29918, 3972, 847, 9423, 18267, 718, 903, 12972, 29979, 29925, 2890, 511, 13, 462, 9651, 4390, 29889, 29881, 17204, 29898, 29881, 8768, 876, 13, 4706, 1583, 3032, 3539, 29918, 517, 29918, 1445, 29898, 3332, 29918, 3972, 847, 903, 18267, 29892, 1583, 29889, 1688, 29889, 517, 29918, 3126, 3101, 13, 4706, 12700, 353, 426, 13, 9651, 903, 29911, 1718, 7194, 29918, 15032, 29127, 29901, 1583, 29889, 5182, 29918, 4914, 29892, 13, 9651, 903, 29911, 3289, 29968, 29918, 11116, 29901, 1583, 29889, 7662, 29918, 1853, 29892, 13, 9651, 903, 29907, 3040, 29954, 1955, 2965, 1964, 29918, 16359, 1299, 11499, 29903, 29901, 1583, 29889, 29883, 20440, 936, 29918, 22100, 29892, 13, 9651, 903, 26813, 29918, 24461, 6670, 29903, 29901, 1583, 3032, 14968, 29918, 21134, 13, 4706, 500, 13, 4706, 411, 1722, 29898, 3332, 29918, 3972, 847, 903, 2303, 6040, 29918, 7249, 29892, 525, 29893, 1495, 408, 934, 29901, 13, 9651, 4390, 29889, 15070, 29898, 7299, 29892, 934, 29897, 13, 4706, 565, 1583, 3032, 15550, 3950, 338, 451, 6213, 29901, 13, 9651, 396, 4078, 278, 1904, 13, 9651, 1583, 3032, 15550, 3950, 29889, 7620, 29898, 1311, 29889, 4299, 29892, 2246, 29918, 3972, 29897, 13, 9651, 396, 4078, 278, 7797, 3950, 13, 9651, 411, 1722, 29898, 3332, 29918, 3972, 847, 903, 6304, 25758, 26664, 1001, 29892, 525, 29893, 29890, 1495, 408, 934, 29901, 13, 18884, 5839, 280, 29889, 15070, 29898, 1311, 3032, 15550, 3950, 29892, 934, 29897, 13, 4706, 1683, 29901, 13, 9651, 565, 1583, 29889, 4299, 338, 451, 6213, 29901, 13, 18884, 756, 29918, 842, 3859, 353, 756, 5552, 29898, 1311, 29889, 4299, 29892, 525, 1649, 842, 3859, 1649, 1495, 13, 18884, 756, 29918, 657, 3859, 353, 756, 5552, 29898, 1311, 29889, 4299, 29892, 525, 1649, 657, 3859, 1649, 1495, 13, 18884, 565, 451, 313, 5349, 29918, 842, 3859, 322, 756, 29918, 657, 3859, 1125, 13, 462, 1678, 12020, 7865, 2392, 29898, 13, 462, 4706, 376, 3195, 1818, 367, 5839, 29880, 519, 470, 263, 2888, 7797, 3950, 1818, 29908, 13, 462, 4706, 376, 367, 6790, 1159, 13, 9651, 411, 1722, 29898, 3332, 29918, 3972, 847, 903, 20387, 29931, 29918, 21738, 29931, 29892, 525, 29893, 29890, 1495, 408, 934, 29901, 13, 18884, 5839, 280, 29889, 15070, 29898, 1311, 29889, 4299, 29892, 934, 29897, 13, 13, 1678, 732, 7959, 5696, 13, 1678, 822, 2254, 29898, 2084, 1125, 13, 4706, 9995, 5896, 278, 8125, 21067, 4848, 515, 278, 2183, 2224, 29889, 13, 4706, 584, 3207, 2224, 29901, 450, 3884, 2224, 304, 2254, 278, 8125, 21067, 4848, 515, 29889, 13, 4706, 584, 1853, 2224, 29901, 851, 13, 4706, 9995, 13, 4706, 396, 1653, 278, 8125, 21067, 4848, 1728, 738, 4426, 773, 278, 4770, 1482, 1649, 13, 4706, 396, 740, 29892, 2788, 304, 5839, 280, 13, 4706, 832, 353, 8125, 21067, 4848, 17255, 1482, 12035, 3195, 21067, 4848, 29897, 13, 4706, 2246, 29918, 3972, 353, 10802, 29898, 2084, 29897, 13, 4706, 396, 2254, 1857, 2106, 13, 4706, 411, 1722, 29898, 3332, 29918, 3972, 847, 9423, 29911, 4717, 1177, 718, 903, 12972, 29979, 29925, 2890, 511, 525, 29878, 1495, 408, 934, 29901, 13, 9651, 4072, 353, 4390, 29889, 1359, 29898, 1445, 29897, 13, 4706, 411, 1722, 29898, 3332, 29918, 3972, 847, 903, 29911, 4717, 1177, 29892, 525, 29878, 1495, 408, 934, 29901, 13, 9651, 7945, 353, 10518, 29889, 949, 29918, 3126, 29898, 1445, 29892, 26688, 29922, 8768, 29897, 13, 4706, 832, 17255, 8977, 1649, 28513, 29911, 4717, 1177, 29962, 353, 7945, 13, 4706, 411, 1722, 29898, 3332, 29918, 3972, 847, 9423, 18267, 718, 903, 12972, 29979, 29925, 2890, 511, 525, 29878, 1495, 408, 934, 29901, 13, 9651, 4072, 353, 4390, 29889, 1359, 29898, 1445, 29897, 13, 4706, 411, 1722, 29898, 3332, 29918, 3972, 847, 903, 18267, 29892, 525, 29878, 1495, 408, 934, 29901, 13, 9651, 1243, 353, 10518, 29889, 949, 29918, 3126, 29898, 1445, 29892, 26688, 29922, 8768, 29897, 13, 4706, 832, 17255, 8977, 1649, 28513, 18267, 29962, 353, 1243, 13, 4706, 411, 1722, 29898, 3332, 29918, 3972, 847, 903, 2303, 6040, 29918, 7249, 29892, 525, 29878, 1495, 408, 12700, 29918, 1445, 29901, 13, 9651, 12700, 353, 12700, 29918, 1445, 29889, 949, 580, 13, 4706, 12700, 353, 4390, 29889, 18132, 29898, 7299, 29897, 13, 4706, 832, 17255, 8977, 1649, 28513, 29911, 1718, 7194, 29918, 15032, 29127, 29962, 353, 12700, 28513, 29911, 1718, 7194, 29918, 15032, 29127, 29962, 13, 4706, 832, 17255, 8977, 1649, 28513, 29911, 3289, 29968, 29918, 11116, 29962, 353, 12700, 28513, 29911, 3289, 29968, 29918, 11116, 29962, 13, 4706, 832, 17255, 8977, 1649, 28513, 29907, 3040, 29954, 1955, 2965, 1964, 29918, 16359, 1299, 11499, 29903, 29962, 353, 12700, 28513, 29907, 3040, 29954, 1955, 2965, 1964, 29918, 16359, 1299, 11499, 29903, 29962, 13, 4706, 832, 17255, 8977, 1649, 1839, 29918, 29915, 718, 903, 26813, 29918, 24461, 6670, 29903, 29962, 353, 12700, 28513, 26813, 29918, 24461, 6670, 29903, 29962, 13, 4706, 832, 17255, 8977, 1649, 1839, 29918, 29915, 718, 903, 6154, 3289, 1660, 29903, 29962, 353, 8125, 21067, 4848, 3032, 657, 29918, 13203, 29898, 13, 9651, 3414, 29918, 1853, 29922, 7299, 28513, 29911, 3289, 29968, 29918, 11116, 1402, 13, 9651, 7945, 29922, 14968, 29892, 13, 9651, 3646, 29918, 4914, 29922, 7299, 28513, 29911, 1718, 7194, 29918, 15032, 29127, 1402, 13, 9651, 7945, 29918, 21134, 29922, 7299, 28513, 26813, 29918, 24461, 6670, 29903, 29962, 13, 4706, 1723, 13, 13, 4706, 7797, 3950, 29918, 2084, 353, 2246, 29918, 3972, 847, 903, 6304, 25758, 26664, 1001, 13, 4706, 565, 7797, 3950, 29918, 2084, 29889, 9933, 7295, 13, 9651, 411, 1722, 29898, 15550, 3950, 29918, 2084, 29892, 525, 6050, 1495, 408, 934, 29901, 13, 18884, 7797, 3950, 353, 5839, 280, 29889, 1359, 29898, 1445, 29897, 13, 9651, 832, 17255, 8977, 1649, 1839, 29918, 29915, 718, 903, 6304, 25758, 26664, 1001, 29962, 353, 7797, 3950, 13, 9651, 832, 17255, 8977, 1649, 28513, 20387, 29931, 29962, 353, 7797, 3950, 29889, 1359, 29898, 3332, 29918, 3972, 29897, 13, 4706, 1683, 29901, 13, 9651, 832, 17255, 8977, 1649, 1839, 29918, 29915, 718, 903, 6304, 25758, 26664, 1001, 29962, 353, 6213, 13, 9651, 411, 1722, 29898, 3332, 29918, 3972, 847, 903, 20387, 29931, 29918, 21738, 29931, 29892, 525, 6050, 1495, 408, 934, 29901, 13, 18884, 832, 17255, 8977, 1649, 28513, 20387, 29931, 29962, 353, 5839, 280, 29889, 1359, 29898, 1445, 29897, 13, 13, 4706, 396, 2254, 1269, 310, 278, 5375, 767, 18150, 13, 4706, 8455, 29918, 1958, 353, 426, 13, 9651, 15629, 8659, 29889, 5454, 3308, 1964, 29901, 315, 1485, 284, 3260, 29892, 13, 9651, 15629, 8659, 29889, 3217, 3904, 4945, 4519, 1783, 29965, 1964, 29901, 315, 5336, 17028, 950, 3260, 29892, 13, 9651, 15629, 8659, 29889, 11432, 29918, 2190, 1964, 21554, 3235, 29901, 4829, 21067, 4848, 3260, 29892, 13, 9651, 15629, 8659, 29889, 5746, 29925, 4375, 1177, 1001, 29901, 12027, 433, 4983, 3260, 29892, 13, 4706, 500, 13, 4706, 767, 18150, 353, 5159, 13, 4706, 363, 8455, 29918, 978, 29892, 8455, 29918, 1990, 297, 8455, 29918, 1958, 29889, 7076, 7295, 13, 9651, 2989, 29918, 978, 353, 285, 29915, 648, 12847, 29918, 978, 2403, 12847, 29915, 13, 9651, 8455, 29918, 3972, 353, 2246, 29918, 3972, 847, 8455, 29918, 978, 13, 9651, 8455, 353, 8455, 29918, 1990, 3032, 1359, 29898, 12847, 29918, 3972, 29892, 832, 29897, 13, 9651, 832, 17255, 8977, 1649, 29961, 8159, 29918, 978, 29962, 353, 8455, 13, 9651, 767, 18150, 29889, 4397, 29898, 12847, 29897, 13, 13, 4706, 832, 17255, 8977, 1649, 1839, 29918, 29915, 718, 903, 1529, 3521, 17070, 29903, 29962, 353, 767, 18150, 13, 4706, 736, 832, 13, 2 ]
kanpai/array.py
chandrakantap/kanpai
3
1607769
<filename>kanpai/array.py from .validator import Validator, RequiredMixin class Array(RequiredMixin): def __init__(self, error="Expecting an array.", convert_none_to_empty=False): self.processors = [] self.processors.append({ 'action': self.__assert_array, 'attribs': { 'error': error, 'convert_none_to_empty': convert_none_to_empty } }) def __assert_array(self, data, attribs): if data is None: if attribs.get('convert_none_to_empty', False): return self.validation_success([]) else: return self.validation_success(data) if type(data) is list or type(data) is tuple: return self.validation_success(data) else: return self.validation_error(data, attribs.get('error')) def of(self, element_validator): if not isinstance(element_validator, Validator): raise TypeError( f'Expecting a instance of validator in element_validator') self.processors.append({ 'action': self.__validate_elements, 'attribs': { 'element_validator': element_validator } }) return self def __validate_elements(self, data, attribs): if data is None: return self.validation_success(data) validation_success = True validation_error = {} validated_data = [] element_validator = attribs.get('element_validator') for index, element in enumerate(data): validation_result = element_validator.validate(element) validation_success = validation_success and validation_result.get( 'success') validated_data.append(validation_result.get('data')) if validation_result.get('success') is False: validation_error[index] = validation_result.get('error') return { 'success': validation_success, 'data': validated_data, 'error': validation_error } def min(self, min_length, error=None): if type(min_length) is not int: raise ValueError( 'value for min_length is expected to be an integer') if error is None: error = f"At least {min_length} element required." self.processors.append({ 'action': self.__assert_min, 'attribs': { 'min_length': min_length, 'error': error } }) return self def __assert_min(self, data, attribs): if data is not None and len(data) < attribs['min_length']: return self.validation_error(data, attribs['error']) else: return self.validation_success(data) def max(self, max_length, error=None): if type(max_length) is not int: raise ValueError( 'value for max_length is expected to be an integer') if error is None: error = f"Maximum {max_length} element allowed." self.processors.append({ 'action': self.__assert_max, 'attribs': { 'max_length': max_length, 'error': error } }) return self def __assert_max(self, data, attribs): if data is not None and len(data) > attribs['max_length']: return self.validation_error(data, attribs['error']) else: return self.validation_success(data)
[ 1, 529, 9507, 29958, 11052, 29886, 1794, 29914, 2378, 29889, 2272, 13, 3166, 869, 3084, 1061, 1053, 15758, 1061, 29892, 830, 5958, 29924, 861, 262, 13, 13, 13, 1990, 4398, 29898, 19347, 29924, 861, 262, 1125, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 1059, 543, 1252, 1103, 292, 385, 1409, 19602, 3588, 29918, 9290, 29918, 517, 29918, 6310, 29922, 8824, 1125, 13, 4706, 1583, 29889, 5014, 943, 353, 5159, 13, 4706, 1583, 29889, 5014, 943, 29889, 4397, 3319, 13, 9651, 525, 2467, 2396, 1583, 17255, 9294, 29918, 2378, 29892, 13, 9651, 525, 1131, 1091, 29879, 2396, 426, 13, 18884, 525, 2704, 2396, 1059, 29892, 13, 18884, 525, 13441, 29918, 9290, 29918, 517, 29918, 6310, 2396, 3588, 29918, 9290, 29918, 517, 29918, 6310, 13, 9651, 500, 13, 4706, 5615, 13, 13, 1678, 822, 4770, 9294, 29918, 2378, 29898, 1311, 29892, 848, 29892, 1098, 1091, 29879, 1125, 13, 4706, 565, 848, 338, 6213, 29901, 13, 9651, 565, 1098, 1091, 29879, 29889, 657, 877, 13441, 29918, 9290, 29918, 517, 29918, 6310, 742, 7700, 1125, 13, 18884, 736, 1583, 29889, 18157, 29918, 8698, 4197, 2314, 13, 9651, 1683, 29901, 13, 18884, 736, 1583, 29889, 18157, 29918, 8698, 29898, 1272, 29897, 13, 13, 4706, 565, 1134, 29898, 1272, 29897, 338, 1051, 470, 1134, 29898, 1272, 29897, 338, 18761, 29901, 13, 9651, 736, 1583, 29889, 18157, 29918, 8698, 29898, 1272, 29897, 13, 4706, 1683, 29901, 13, 9651, 736, 1583, 29889, 18157, 29918, 2704, 29898, 1272, 29892, 1098, 1091, 29879, 29889, 657, 877, 2704, 8785, 13, 13, 1678, 822, 310, 29898, 1311, 29892, 1543, 29918, 3084, 1061, 1125, 13, 4706, 565, 451, 338, 8758, 29898, 5029, 29918, 3084, 1061, 29892, 15758, 1061, 1125, 13, 9651, 12020, 20948, 29898, 13, 18884, 285, 29915, 1252, 1103, 292, 263, 2777, 310, 2854, 1061, 297, 1543, 29918, 3084, 1061, 1495, 13, 13, 4706, 1583, 29889, 5014, 943, 29889, 4397, 3319, 13, 9651, 525, 2467, 2396, 1583, 17255, 15480, 29918, 17664, 29892, 13, 9651, 525, 1131, 1091, 29879, 2396, 426, 13, 18884, 525, 5029, 29918, 3084, 1061, 2396, 1543, 29918, 3084, 1061, 13, 9651, 500, 13, 4706, 5615, 13, 13, 4706, 736, 1583, 13, 13, 1678, 822, 4770, 15480, 29918, 17664, 29898, 1311, 29892, 848, 29892, 1098, 1091, 29879, 1125, 13, 4706, 565, 848, 338, 6213, 29901, 13, 9651, 736, 1583, 29889, 18157, 29918, 8698, 29898, 1272, 29897, 13, 13, 4706, 8845, 29918, 8698, 353, 5852, 13, 4706, 8845, 29918, 2704, 353, 6571, 13, 4706, 2854, 630, 29918, 1272, 353, 5159, 13, 13, 4706, 1543, 29918, 3084, 1061, 353, 1098, 1091, 29879, 29889, 657, 877, 5029, 29918, 3084, 1061, 1495, 13, 13, 4706, 363, 2380, 29892, 1543, 297, 26985, 29898, 1272, 1125, 13, 9651, 8845, 29918, 2914, 353, 1543, 29918, 3084, 1061, 29889, 15480, 29898, 5029, 29897, 13, 9651, 8845, 29918, 8698, 353, 8845, 29918, 8698, 322, 8845, 29918, 2914, 29889, 657, 29898, 13, 18884, 525, 8698, 1495, 13, 9651, 2854, 630, 29918, 1272, 29889, 4397, 29898, 18157, 29918, 2914, 29889, 657, 877, 1272, 8785, 13, 13, 9651, 565, 8845, 29918, 2914, 29889, 657, 877, 8698, 1495, 338, 7700, 29901, 13, 18884, 8845, 29918, 2704, 29961, 2248, 29962, 353, 8845, 29918, 2914, 29889, 657, 877, 2704, 1495, 13, 13, 4706, 736, 426, 13, 9651, 525, 8698, 2396, 8845, 29918, 8698, 29892, 13, 9651, 525, 1272, 2396, 2854, 630, 29918, 1272, 29892, 13, 9651, 525, 2704, 2396, 8845, 29918, 2704, 13, 4706, 500, 13, 13, 1678, 822, 1375, 29898, 1311, 29892, 1375, 29918, 2848, 29892, 1059, 29922, 8516, 1125, 13, 4706, 565, 1134, 29898, 1195, 29918, 2848, 29897, 338, 451, 938, 29901, 13, 9651, 12020, 7865, 2392, 29898, 13, 18884, 525, 1767, 363, 1375, 29918, 2848, 338, 3806, 304, 367, 385, 6043, 1495, 13, 13, 4706, 565, 1059, 338, 6213, 29901, 13, 9651, 1059, 353, 285, 29908, 4178, 3203, 426, 1195, 29918, 2848, 29913, 1543, 3734, 1213, 13, 13, 4706, 1583, 29889, 5014, 943, 29889, 4397, 3319, 13, 9651, 525, 2467, 2396, 1583, 17255, 9294, 29918, 1195, 29892, 13, 9651, 525, 1131, 1091, 29879, 2396, 426, 13, 18884, 525, 1195, 29918, 2848, 2396, 1375, 29918, 2848, 29892, 13, 18884, 525, 2704, 2396, 1059, 13, 9651, 500, 13, 4706, 5615, 13, 13, 4706, 736, 1583, 13, 13, 1678, 822, 4770, 9294, 29918, 1195, 29898, 1311, 29892, 848, 29892, 1098, 1091, 29879, 1125, 13, 4706, 565, 848, 338, 451, 6213, 322, 7431, 29898, 1272, 29897, 529, 1098, 1091, 29879, 1839, 1195, 29918, 2848, 2033, 29901, 13, 9651, 736, 1583, 29889, 18157, 29918, 2704, 29898, 1272, 29892, 1098, 1091, 29879, 1839, 2704, 11287, 13, 4706, 1683, 29901, 13, 9651, 736, 1583, 29889, 18157, 29918, 8698, 29898, 1272, 29897, 13, 13, 1678, 822, 4236, 29898, 1311, 29892, 4236, 29918, 2848, 29892, 1059, 29922, 8516, 1125, 13, 4706, 565, 1134, 29898, 3317, 29918, 2848, 29897, 338, 451, 938, 29901, 13, 9651, 12020, 7865, 2392, 29898, 13, 18884, 525, 1767, 363, 4236, 29918, 2848, 338, 3806, 304, 367, 385, 6043, 1495, 13, 13, 4706, 565, 1059, 338, 6213, 29901, 13, 9651, 1059, 353, 285, 29908, 7976, 12539, 426, 3317, 29918, 2848, 29913, 1543, 6068, 1213, 13, 13, 4706, 1583, 29889, 5014, 943, 29889, 4397, 3319, 13, 9651, 525, 2467, 2396, 1583, 17255, 9294, 29918, 3317, 29892, 13, 9651, 525, 1131, 1091, 29879, 2396, 426, 13, 18884, 525, 3317, 29918, 2848, 2396, 4236, 29918, 2848, 29892, 13, 18884, 525, 2704, 2396, 1059, 13, 9651, 500, 13, 4706, 5615, 13, 13, 4706, 736, 1583, 13, 13, 1678, 822, 4770, 9294, 29918, 3317, 29898, 1311, 29892, 848, 29892, 1098, 1091, 29879, 1125, 13, 4706, 565, 848, 338, 451, 6213, 322, 7431, 29898, 1272, 29897, 1405, 1098, 1091, 29879, 1839, 3317, 29918, 2848, 2033, 29901, 13, 9651, 736, 1583, 29889, 18157, 29918, 2704, 29898, 1272, 29892, 1098, 1091, 29879, 1839, 2704, 11287, 13, 4706, 1683, 29901, 13, 9651, 736, 1583, 29889, 18157, 29918, 8698, 29898, 1272, 29897, 13, 2 ]
convert/photo2movie.py
penrin/SP-mapping
0
47433
<reponame>penrin/SP-mapping import sys import cv2 import argparse import time from math import ceil class ProgressBar(): def __init__(self, bar_length=40, slug='#', space='-', countdown=True): self.bar_length = bar_length self.slug = slug self.space = space self.countdown = countdown self.start_time = None self.start_parcent = 0 def bar(self, percent, end=1, tail=''): percent = percent / end if self.countdown == True: progress = percent - self.start_parcent if self.start_time == None: self.start_time = time.perf_counter() self.start_parcent = percent remain = 'Remain --:--:--' elif progress == 0: remain = 'Remain --:--:--' elif progress != 0: elapsed_time = time.perf_counter() - self.start_time progress = percent - self.start_parcent remain_t = (elapsed_time / progress) * (1 - percent) remain_t = ceil(remain_t) h = remain_t // 3600 m = remain_t % 3600 // 60 s = remain_t % 60 remain = 'Remain %02d:%02d:%02d' % (h, m, s) else: remain = '' len_slugs = int(percent * self.bar_length) slugs = self.slug * len_slugs spaces = self.space * (self.bar_length - len_slugs) txt = '\r[{bar}] {percent:.1%} {remain} {tail}'.format( bar=(slugs + spaces), percent=percent, remain=remain, tail=tail) if percent == 1: txt += '\n' self.start_time = None sys.stdout.write(txt) sys.stdout.flush() class ProgressBar2(ProgressBar): def __init__(self, end, bar_length=40, slug='#', space='-', countdown=True): super().__init__(bar_length=40, slug='#', space='-', countdown=True) self.counter = 0 self.end = end self.bar() def bar(self, tail=''): super().bar(self.counter, end=self.end, tail='') self.counter += 1 if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('filename', help='output filename') parser.add_argument('-i', type=str, help='input image filename', required=True) parser.add_argument('--nframes', type=int, default=30, help='number of frames') parser.add_argument('--fps', type=float, default=30, help='fps') args = parser.parse_args() filename_img = args.i filename_mov = args.filename nframes = args.nframes fps = args.fps img = cv2.imread(filename_img) if img is None: print('image cannot be read') sys.exit() shape = img.shape[1], img.shape[0] fourcc = cv2.VideoWriter_fourcc(*'mp4v') writer = cv2.VideoWriter(filename_mov, fourcc, fps, shape) pg = ProgressBar2(nframes) for i in range(nframes): writer.write(img) pg.bar() writer.release()
[ 1, 529, 276, 1112, 420, 29958, 2238, 17056, 29914, 5550, 29899, 20698, 13, 5215, 10876, 13, 5215, 13850, 29906, 13, 5215, 1852, 5510, 13, 5215, 931, 13, 3166, 5844, 1053, 2257, 309, 13, 13, 13, 1990, 20018, 4297, 7295, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 2594, 29918, 2848, 29922, 29946, 29900, 29892, 2243, 688, 2433, 29937, 742, 2913, 2433, 29899, 742, 2302, 3204, 29922, 5574, 1125, 13, 13, 4706, 1583, 29889, 1646, 29918, 2848, 353, 2594, 29918, 2848, 13, 4706, 1583, 29889, 29517, 353, 2243, 688, 13, 4706, 1583, 29889, 3493, 353, 2913, 13, 4706, 1583, 29889, 2798, 3204, 353, 2302, 3204, 13, 4706, 1583, 29889, 2962, 29918, 2230, 353, 6213, 13, 4706, 1583, 29889, 2962, 29918, 862, 1760, 353, 29871, 29900, 13, 268, 13, 1678, 822, 2594, 29898, 1311, 29892, 10151, 29892, 1095, 29922, 29896, 29892, 12464, 2433, 29374, 13, 4706, 10151, 353, 10151, 847, 1095, 13, 13, 4706, 565, 1583, 29889, 2798, 3204, 1275, 5852, 29901, 13, 9651, 6728, 353, 10151, 448, 1583, 29889, 2962, 29918, 862, 1760, 13, 632, 13, 9651, 565, 1583, 29889, 2962, 29918, 2230, 1275, 6213, 29901, 13, 18884, 1583, 29889, 2962, 29918, 2230, 353, 931, 29889, 546, 29888, 29918, 11808, 580, 13, 18884, 1583, 29889, 2962, 29918, 862, 1760, 353, 10151, 13, 18884, 3933, 353, 525, 7301, 475, 1192, 20296, 20296, 29915, 13, 462, 13, 9651, 25342, 6728, 1275, 29871, 29900, 29901, 13, 18884, 3933, 353, 525, 7301, 475, 1192, 20296, 20296, 29915, 13, 632, 13, 9651, 25342, 6728, 2804, 29871, 29900, 29901, 13, 18884, 560, 28170, 29918, 2230, 353, 931, 29889, 546, 29888, 29918, 11808, 580, 448, 1583, 29889, 2962, 29918, 2230, 13, 18884, 6728, 353, 10151, 448, 1583, 29889, 2962, 29918, 862, 1760, 13, 18884, 3933, 29918, 29873, 353, 313, 295, 28170, 29918, 2230, 847, 6728, 29897, 334, 313, 29896, 448, 10151, 29897, 13, 18884, 3933, 29918, 29873, 353, 2257, 309, 29898, 1745, 475, 29918, 29873, 29897, 13, 18884, 298, 353, 3933, 29918, 29873, 849, 29871, 29941, 29953, 29900, 29900, 13, 18884, 286, 353, 3933, 29918, 29873, 1273, 29871, 29941, 29953, 29900, 29900, 849, 29871, 29953, 29900, 13, 18884, 269, 353, 3933, 29918, 29873, 1273, 29871, 29953, 29900, 13, 18884, 3933, 353, 525, 7301, 475, 1273, 29900, 29906, 29881, 16664, 29900, 29906, 29881, 16664, 29900, 29906, 29881, 29915, 1273, 313, 29882, 29892, 286, 29892, 269, 29897, 29871, 13, 462, 13, 4706, 1683, 29901, 13, 9651, 3933, 353, 6629, 13, 308, 13, 4706, 7431, 29918, 2536, 16926, 353, 938, 29898, 25376, 334, 1583, 29889, 1646, 29918, 2848, 29897, 13, 4706, 2243, 16926, 353, 1583, 29889, 29517, 334, 7431, 29918, 2536, 16926, 13, 4706, 8162, 353, 1583, 29889, 3493, 334, 313, 1311, 29889, 1646, 29918, 2848, 448, 7431, 29918, 2536, 16926, 29897, 13, 4706, 13872, 353, 11297, 29878, 19660, 1646, 6525, 426, 25376, 29901, 29889, 29896, 29995, 29913, 426, 1745, 475, 29913, 426, 18237, 29913, 4286, 4830, 29898, 13, 18884, 2594, 7607, 2536, 16926, 718, 8162, 511, 10151, 29922, 25376, 29892, 13, 18884, 3933, 29922, 1745, 475, 29892, 12464, 29922, 18237, 29897, 13, 4706, 565, 10151, 1275, 29871, 29896, 29901, 13, 9651, 13872, 4619, 11297, 29876, 29915, 13, 9651, 1583, 29889, 2962, 29918, 2230, 353, 6213, 13, 4706, 10876, 29889, 25393, 29889, 3539, 29898, 3945, 29897, 13, 4706, 10876, 29889, 25393, 29889, 23126, 580, 13, 308, 13, 13, 13, 1990, 20018, 4297, 29906, 29898, 14470, 4297, 1125, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 1095, 29892, 2594, 29918, 2848, 29922, 29946, 29900, 29892, 2243, 688, 2433, 29937, 742, 2913, 2433, 29899, 742, 2302, 3204, 29922, 5574, 1125, 13, 308, 13, 4706, 2428, 2141, 1649, 2344, 12035, 1646, 29918, 2848, 29922, 29946, 29900, 29892, 2243, 688, 2433, 29937, 742, 2913, 2433, 29899, 742, 2302, 3204, 29922, 5574, 29897, 13, 4706, 1583, 29889, 11808, 353, 29871, 29900, 13, 4706, 1583, 29889, 355, 353, 1095, 13, 4706, 1583, 29889, 1646, 580, 13, 308, 13, 1678, 822, 2594, 29898, 1311, 29892, 12464, 2433, 29374, 13, 4706, 2428, 2141, 1646, 29898, 1311, 29889, 11808, 29892, 1095, 29922, 1311, 29889, 355, 29892, 12464, 2433, 1495, 13, 4706, 1583, 29889, 11808, 4619, 29871, 29896, 13, 13, 13, 13, 361, 4770, 978, 1649, 1275, 525, 1649, 3396, 1649, 2396, 13, 13, 1678, 13812, 353, 1852, 5510, 29889, 15730, 11726, 580, 13, 1678, 13812, 29889, 1202, 29918, 23516, 877, 9507, 742, 1371, 2433, 4905, 10422, 1495, 13, 1678, 13812, 29889, 1202, 29918, 23516, 877, 29899, 29875, 742, 1134, 29922, 710, 29892, 1371, 2433, 2080, 1967, 10422, 742, 3734, 29922, 5574, 29897, 13, 1678, 13812, 29889, 1202, 29918, 23516, 877, 489, 29876, 19935, 742, 1134, 29922, 524, 29892, 2322, 29922, 29941, 29900, 29892, 1371, 2433, 4537, 310, 16608, 1495, 13, 1678, 13812, 29889, 1202, 29918, 23516, 877, 489, 29888, 567, 742, 1134, 29922, 7411, 29892, 2322, 29922, 29941, 29900, 29892, 1371, 2433, 29888, 567, 1495, 13, 1678, 6389, 353, 13812, 29889, 5510, 29918, 5085, 580, 13, 268, 13, 1678, 10422, 29918, 2492, 353, 6389, 29889, 29875, 13, 1678, 10422, 29918, 13529, 353, 6389, 29889, 9507, 13, 1678, 302, 19935, 353, 6389, 29889, 29876, 19935, 13, 1678, 285, 567, 353, 6389, 29889, 29888, 567, 13, 268, 13, 1678, 10153, 353, 13850, 29906, 29889, 326, 949, 29898, 9507, 29918, 2492, 29897, 13, 13, 1678, 565, 10153, 338, 6213, 29901, 13, 4706, 1596, 877, 3027, 2609, 367, 1303, 1495, 13, 4706, 10876, 29889, 13322, 580, 13, 13, 1678, 8267, 353, 10153, 29889, 12181, 29961, 29896, 1402, 10153, 29889, 12181, 29961, 29900, 29962, 13, 13, 1678, 3023, 617, 353, 13850, 29906, 29889, 15167, 10507, 29918, 17823, 617, 10456, 29915, 1526, 29946, 29894, 1495, 13, 1678, 9227, 353, 13850, 29906, 29889, 15167, 10507, 29898, 9507, 29918, 13529, 29892, 3023, 617, 29892, 285, 567, 29892, 8267, 29897, 13, 13, 1678, 23822, 353, 20018, 4297, 29906, 29898, 29876, 19935, 29897, 13, 268, 13, 1678, 363, 474, 297, 3464, 29898, 29876, 19935, 1125, 13, 4706, 9227, 29889, 3539, 29898, 2492, 29897, 13, 4706, 23822, 29889, 1646, 580, 13, 13, 1678, 9227, 29889, 14096, 580, 13, 13, 13, 13, 2 ]
migrator/cf.py
cloud-gov/external-domain-broker-migrator
1
82815
import logging from cloudfoundry_client.client import CloudFoundryClient from cloudfoundry_client.errors import InvalidStatusCode logger = logging.getLogger(__name__) def get_cf_client(config): # "why is this a function, and the rest of these are static?" # good question. The __init__ on this immediately probes the # api endpoint, which means we need to stub it for testing. # and having to add that stub to every test that _might_ # `import extensions` would be bonkers. As a function, we should # only need to stub when we're actually thinking about CF logger.debug("getting cf client") client = CloudFoundryClient(config.CF_API_ENDPOINT) client.init_with_user_credentials(config.CF_USERNAME, config.CF_PASSWORD) return client def enable_plan_for_org(plan_id, org_id, client): logger.debug("enabling plan for %s", org_id) try: response = client.v2.service_plan_visibilities.create(plan_id, org_id) except InvalidStatusCode as e: if e.body["error_code"] != "CF-ServicePlanVisibilityAlreadyExists": raise e def get_service_plan_visibility_ids_for_org(plan_id, org_id, client): logger.debug("getting plan visibilities for %s", org_id) service_plan_visibilities = client.v2.service_plan_visibilities.list( service_plan_guid=plan_id, organization_guid=org_id ) return [ service_plan_visibility["metadata"]["guid"] for service_plan_visibility in service_plan_visibilities ] def disable_plan_for_org(service_plan_visibility_id, client): logger.debug("disabling plan visibility") return client.v2.service_plan_visibilities.remove(service_plan_visibility_id) def get_space_id_for_service_instance_id(instance_id, client): logger.debug("getting space_id for instance %s", instance_id) response = client.v2.service_instances.get(instance_id) return response["entity"]["space_guid"] def get_org_id_for_space_id(space_id, client): logger.debug("getting org_id for space %s", space_id) response = client.v3.spaces.get(space_id) return response["relationships"]["organization"]["data"]["guid"] def get_all_space_ids_for_org(org_id, client): logger.debug("getting space_ids for org %s", org_id) spaces = client.v3.spaces.list(organization_guids=[org_id]) return [space["guid"] for space in spaces] def create_bare_migrator_service_instance_in_space( space_id, plan_id, instance_name, domains, client ): logger.debug("creating service instance for space %s", space_id) response = client.v2.service_instances.create( space_guid=space_id, instance_name=instance_name, plan_guid=plan_id, accepts_incomplete=True, parameters=dict(domains=domains), ) return { "guid": response["metadata"]["guid"], "state": response["entity"]["last_operation"]["state"], "type": response["entity"]["last_operation"]["type"], } def get_migrator_service_instance_status(instance_id, client): logger.debug("polling service instance status for instance %s", instance_id) response = client.v2.service_instances.get(instance_id) return response["entity"]["last_operation"]["state"] def update_existing_cdn_domain_service_instance( instance_id, params, client, *, new_instance_name=None, new_plan_guid=None ): logger.debug("updating service instance %s", instance_id) return client.v2.service_instances.update( instance_id, parameters=params, instance_name=new_instance_name, plan_guid=new_plan_guid, accepts_incomplete=True, ) def purge_service_instance(instance_id, client): logger.debug("purging service instance %s", instance_id) return client.v2.service_instances.remove(instance_id, purge=True) def get_instance_data(instance_id, client): return client.v2.service_instances.get(instance_id)
[ 1, 1053, 12183, 13, 3166, 1067, 283, 2176, 618, 719, 29918, 4645, 29889, 4645, 1053, 14293, 9692, 719, 4032, 13, 3166, 1067, 283, 2176, 618, 719, 29918, 4645, 29889, 12523, 1053, 21403, 5709, 3399, 13, 13, 21707, 353, 12183, 29889, 657, 16363, 22168, 978, 1649, 29897, 13, 13, 13, 1753, 679, 29918, 6854, 29918, 4645, 29898, 2917, 1125, 13, 1678, 396, 376, 14606, 338, 445, 263, 740, 29892, 322, 278, 1791, 310, 1438, 526, 2294, 3026, 13, 1678, 396, 1781, 1139, 29889, 450, 4770, 2344, 1649, 373, 445, 7389, 2070, 267, 278, 13, 1678, 396, 7882, 16248, 29892, 607, 2794, 591, 817, 304, 19281, 372, 363, 6724, 29889, 13, 1678, 396, 322, 2534, 304, 788, 393, 19281, 304, 1432, 1243, 393, 903, 29885, 523, 29918, 13, 1678, 396, 421, 5215, 17752, 29952, 723, 367, 10814, 29895, 414, 29889, 1094, 263, 740, 29892, 591, 881, 13, 1678, 396, 871, 817, 304, 19281, 746, 591, 29915, 276, 2869, 7291, 1048, 17861, 13, 1678, 17927, 29889, 8382, 703, 29264, 274, 29888, 3132, 1159, 13, 1678, 3132, 353, 14293, 9692, 719, 4032, 29898, 2917, 29889, 9207, 29918, 8787, 29918, 1430, 11191, 6992, 29911, 29897, 13, 1678, 3132, 29889, 2344, 29918, 2541, 29918, 1792, 29918, 11944, 9409, 29898, 2917, 29889, 9207, 29918, 11889, 5813, 29892, 2295, 29889, 9207, 29918, 25711, 17013, 29897, 13, 1678, 736, 3132, 13, 13, 13, 1753, 9025, 29918, 9018, 29918, 1454, 29918, 990, 29898, 9018, 29918, 333, 29892, 1638, 29918, 333, 29892, 3132, 1125, 13, 1678, 17927, 29889, 8382, 703, 264, 17961, 3814, 363, 1273, 29879, 613, 1638, 29918, 333, 29897, 13, 1678, 1018, 29901, 13, 4706, 2933, 353, 3132, 29889, 29894, 29906, 29889, 5509, 29918, 9018, 29918, 1730, 747, 9770, 29889, 3258, 29898, 9018, 29918, 333, 29892, 1638, 29918, 333, 29897, 13, 1678, 5174, 21403, 5709, 3399, 408, 321, 29901, 13, 4706, 565, 321, 29889, 2587, 3366, 2704, 29918, 401, 3108, 2804, 376, 9207, 29899, 3170, 20334, 23318, 2499, 2040, 24217, 1115, 13, 9651, 12020, 321, 13, 13, 13, 1753, 679, 29918, 5509, 29918, 9018, 29918, 28814, 29918, 4841, 29918, 1454, 29918, 990, 29898, 9018, 29918, 333, 29892, 1638, 29918, 333, 29892, 3132, 1125, 13, 1678, 17927, 29889, 8382, 703, 29264, 3814, 1998, 747, 9770, 363, 1273, 29879, 613, 1638, 29918, 333, 29897, 13, 1678, 2669, 29918, 9018, 29918, 1730, 747, 9770, 353, 3132, 29889, 29894, 29906, 29889, 5509, 29918, 9018, 29918, 1730, 747, 9770, 29889, 1761, 29898, 13, 4706, 2669, 29918, 9018, 29918, 2543, 333, 29922, 9018, 29918, 333, 29892, 13013, 29918, 2543, 333, 29922, 990, 29918, 333, 13, 1678, 1723, 13, 1678, 736, 518, 13, 4706, 2669, 29918, 9018, 29918, 28814, 3366, 19635, 3108, 3366, 2543, 333, 3108, 13, 4706, 363, 2669, 29918, 9018, 29918, 28814, 297, 2669, 29918, 9018, 29918, 1730, 747, 9770, 13, 1678, 4514, 13, 13, 13, 1753, 11262, 29918, 9018, 29918, 1454, 29918, 990, 29898, 5509, 29918, 9018, 29918, 28814, 29918, 333, 29892, 3132, 1125, 13, 1678, 17927, 29889, 8382, 703, 2218, 17961, 3814, 26401, 1159, 13, 1678, 736, 3132, 29889, 29894, 29906, 29889, 5509, 29918, 9018, 29918, 1730, 747, 9770, 29889, 5992, 29898, 5509, 29918, 9018, 29918, 28814, 29918, 333, 29897, 13, 13, 13, 1753, 679, 29918, 3493, 29918, 333, 29918, 1454, 29918, 5509, 29918, 8758, 29918, 333, 29898, 8758, 29918, 333, 29892, 3132, 1125, 13, 1678, 17927, 29889, 8382, 703, 29264, 2913, 29918, 333, 363, 2777, 1273, 29879, 613, 2777, 29918, 333, 29897, 13, 1678, 2933, 353, 3132, 29889, 29894, 29906, 29889, 5509, 29918, 2611, 2925, 29889, 657, 29898, 8758, 29918, 333, 29897, 13, 1678, 736, 2933, 3366, 10041, 3108, 3366, 3493, 29918, 2543, 333, 3108, 13, 13, 13, 1753, 679, 29918, 990, 29918, 333, 29918, 1454, 29918, 3493, 29918, 333, 29898, 3493, 29918, 333, 29892, 3132, 1125, 13, 1678, 17927, 29889, 8382, 703, 29264, 1638, 29918, 333, 363, 2913, 1273, 29879, 613, 2913, 29918, 333, 29897, 13, 1678, 2933, 353, 3132, 29889, 29894, 29941, 29889, 22854, 29889, 657, 29898, 3493, 29918, 333, 29897, 13, 1678, 736, 2933, 3366, 2674, 800, 14587, 3108, 3366, 6388, 2133, 3108, 3366, 1272, 3108, 3366, 2543, 333, 3108, 13, 13, 13, 1753, 679, 29918, 497, 29918, 3493, 29918, 4841, 29918, 1454, 29918, 990, 29898, 990, 29918, 333, 29892, 3132, 1125, 13, 1678, 17927, 29889, 8382, 703, 29264, 2913, 29918, 4841, 363, 1638, 1273, 29879, 613, 1638, 29918, 333, 29897, 13, 1678, 8162, 353, 3132, 29889, 29894, 29941, 29889, 22854, 29889, 1761, 29898, 6388, 2133, 29918, 2543, 4841, 11759, 990, 29918, 333, 2314, 13, 1678, 736, 518, 3493, 3366, 2543, 333, 3108, 363, 2913, 297, 8162, 29962, 13, 13, 13, 1753, 1653, 29918, 18354, 29918, 26983, 1061, 29918, 5509, 29918, 8758, 29918, 262, 29918, 3493, 29898, 13, 1678, 2913, 29918, 333, 29892, 3814, 29918, 333, 29892, 2777, 29918, 978, 29892, 21904, 29892, 3132, 13, 1125, 13, 1678, 17927, 29889, 8382, 703, 1037, 1218, 2669, 2777, 363, 2913, 1273, 29879, 613, 2913, 29918, 333, 29897, 13, 1678, 2933, 353, 3132, 29889, 29894, 29906, 29889, 5509, 29918, 2611, 2925, 29889, 3258, 29898, 13, 4706, 2913, 29918, 2543, 333, 29922, 3493, 29918, 333, 29892, 13, 4706, 2777, 29918, 978, 29922, 8758, 29918, 978, 29892, 13, 4706, 3814, 29918, 2543, 333, 29922, 9018, 29918, 333, 29892, 13, 4706, 21486, 29918, 262, 8835, 29922, 5574, 29892, 13, 4706, 4128, 29922, 8977, 29898, 3129, 2708, 29922, 3129, 2708, 511, 13, 1678, 1723, 13, 1678, 736, 426, 13, 4706, 376, 2543, 333, 1115, 2933, 3366, 19635, 3108, 3366, 2543, 333, 12436, 13, 4706, 376, 3859, 1115, 2933, 3366, 10041, 3108, 3366, 4230, 29918, 16453, 3108, 3366, 3859, 12436, 13, 4706, 376, 1853, 1115, 2933, 3366, 10041, 3108, 3366, 4230, 29918, 16453, 3108, 3366, 1853, 12436, 13, 1678, 500, 13, 13, 13, 1753, 679, 29918, 26983, 1061, 29918, 5509, 29918, 8758, 29918, 4882, 29898, 8758, 29918, 333, 29892, 3132, 1125, 13, 1678, 17927, 29889, 8382, 703, 3733, 1847, 2669, 2777, 4660, 363, 2777, 1273, 29879, 613, 2777, 29918, 333, 29897, 13, 1678, 2933, 353, 3132, 29889, 29894, 29906, 29889, 5509, 29918, 2611, 2925, 29889, 657, 29898, 8758, 29918, 333, 29897, 13, 1678, 736, 2933, 3366, 10041, 3108, 3366, 4230, 29918, 16453, 3108, 3366, 3859, 3108, 13, 13, 13, 1753, 2767, 29918, 735, 15423, 29918, 13687, 29918, 7247, 29918, 5509, 29918, 8758, 29898, 13, 1678, 2777, 29918, 333, 29892, 8636, 29892, 3132, 29892, 334, 29892, 716, 29918, 8758, 29918, 978, 29922, 8516, 29892, 716, 29918, 9018, 29918, 2543, 333, 29922, 8516, 13, 1125, 13, 1678, 17927, 29889, 8382, 703, 786, 26747, 2669, 2777, 1273, 29879, 613, 2777, 29918, 333, 29897, 13, 1678, 736, 3132, 29889, 29894, 29906, 29889, 5509, 29918, 2611, 2925, 29889, 5504, 29898, 13, 4706, 2777, 29918, 333, 29892, 13, 4706, 4128, 29922, 7529, 29892, 13, 4706, 2777, 29918, 978, 29922, 1482, 29918, 8758, 29918, 978, 29892, 13, 4706, 3814, 29918, 2543, 333, 29922, 1482, 29918, 9018, 29918, 2543, 333, 29892, 13, 4706, 21486, 29918, 262, 8835, 29922, 5574, 29892, 13, 1678, 1723, 13, 13, 13, 1753, 3708, 479, 29918, 5509, 29918, 8758, 29898, 8758, 29918, 333, 29892, 3132, 1125, 13, 1678, 17927, 29889, 8382, 703, 29886, 2007, 292, 2669, 2777, 1273, 29879, 613, 2777, 29918, 333, 29897, 13, 1678, 736, 3132, 29889, 29894, 29906, 29889, 5509, 29918, 2611, 2925, 29889, 5992, 29898, 8758, 29918, 333, 29892, 3708, 479, 29922, 5574, 29897, 13, 13, 13, 1753, 679, 29918, 8758, 29918, 1272, 29898, 8758, 29918, 333, 29892, 3132, 1125, 13, 1678, 736, 3132, 29889, 29894, 29906, 29889, 5509, 29918, 2611, 2925, 29889, 657, 29898, 8758, 29918, 333, 29897, 13, 2 ]
CodeForces/easy problems/230_b_t_primes.py
dimitrov-dimitar/competitive-programming
0
112361
<filename>CodeForces/easy problems/230_b_t_primes.py<gh_stars>0 # https://codeforces.com/problemset/problem/230/B n = int(input()) numbers = [int(x) for x in input().split()] counter = 0 for number in numbers: if number == 1 or number == 2: print('NO') continue for x in range(2, number): if counter > 1: break if number % x == 0: counter += 1 if counter == 1: print('YES') else: print('NO') counter = 0
[ 1, 529, 9507, 29958, 3399, 2831, 778, 29914, 29872, 8995, 4828, 29914, 29906, 29941, 29900, 29918, 29890, 29918, 29873, 29918, 558, 1355, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 2045, 597, 401, 1454, 778, 29889, 510, 29914, 17199, 842, 29914, 17199, 29914, 29906, 29941, 29900, 29914, 29933, 13, 13, 29876, 353, 938, 29898, 2080, 3101, 13, 20326, 353, 518, 524, 29898, 29916, 29897, 363, 921, 297, 1881, 2141, 5451, 580, 29962, 13, 13, 11808, 353, 29871, 29900, 13, 13, 1454, 1353, 297, 3694, 29901, 13, 1678, 565, 1353, 1275, 29871, 29896, 470, 1353, 1275, 29871, 29906, 29901, 13, 4706, 1596, 877, 6632, 1495, 13, 4706, 6773, 13, 1678, 363, 921, 297, 3464, 29898, 29906, 29892, 1353, 1125, 13, 4706, 565, 6795, 1405, 29871, 29896, 29901, 13, 9651, 2867, 13, 4706, 565, 1353, 1273, 921, 1275, 29871, 29900, 29901, 13, 9651, 6795, 4619, 29871, 29896, 13, 1678, 565, 6795, 1275, 29871, 29896, 29901, 13, 4706, 1596, 877, 21143, 1495, 13, 1678, 1683, 29901, 13, 4706, 1596, 877, 6632, 1495, 13, 1678, 6795, 353, 29871, 29900, 13, 2 ]
tutorial/11_Segmentation/03_cluster_extraction.py
maguangyan/pclpy_tutorial
17
1610114
# -*- coding: utf-8 -*- # @Time : DATE:2021/10/6 # @Author : yan # @Email : <EMAIL> # @File : 03_cluster_extraction.py import pclpy from pclpy import pcl import numpy as np def compareCloudShow(cloud, cloud_filtered): # Open 3D viewer and add point cloud and normals viewer = pcl.visualization.PCLVisualizer("viewer") v0 = 1 viewer.createViewPort(0.0, 0.0, 0.5, 1.0, v0) viewer.setBackgroundColor(0.0, 0.0, 0.0, v0) single_color = pcl.visualization.PointCloudColorHandlerCustom.PointXYZ(cloud, 0.0, 255.0, 0.0) viewer.addPointCloud(cloud, single_color, "sample cloud1", v0) v1 = 2 viewer.createViewPort(0.5, 0.0, 1.0, 1.0, v1) viewer.setBackgroundColor(0.0, 0.0, 0.0, v1) single_color = pcl.visualization.PointCloudColorHandlerCustom.PointXYZ(cloud_filtered, 0.0, 255.0, 0.0) viewer.addPointCloud(cloud_filtered, single_color, "sample cloud2", v1) viewer.setPointCloudRenderingProperties(0, 1, "sample cloud1", v0) viewer.setPointCloudRenderingProperties(0, 1, "sample cloud2", v1) viewer.addCoordinateSystem(1.0) while not viewer.wasStopped(): viewer.spinOnce(10) if __name__ == '__main__': reader = pcl.io.PCDReader() cloud = pcl.PointCloud.PointXYZ() cloud_f = pcl.PointCloud.PointXYZ() reader.read('../../data/table_scene_lms400.pcd', cloud) print('PointCloud before filtering has: ', cloud.size(), ' data points.') # 下采样 使用leaf size为1cm vg = pcl.filters.VoxelGrid.PointXYZ() cloud_filtered = pcl.PointCloud.PointXYZ() vg.setInputCloud(cloud) vg.setLeafSize(0.01, 0.01, 0.01) vg.filter(cloud_filtered) print('PointCloud after filtering has: ', cloud_filtered.size(), ' data points.') # 平面分割 seg = pcl.segmentation.SACSegmentation.PointXYZ() inliers = pcl.PointIndices() coefficients = pcl.ModelCoefficients() cloud_plane = pcl.PointCloud.PointXYZ() writer = pcl.io.PCDWriter() seg.setOptimizeCoefficients(True) seg.setModelType(0) seg.setMethodType(0) seg.setMaxIterations(100) seg.setDistanceThreshold(0.02) nr_points = cloud_filtered.size() while cloud_filtered.size() > 0.3 * nr_points: # 在剩余的点云中分割出最大的平面成分 seg.setInputCloud(cloud_filtered) seg.segment(inliers, coefficients) if len(inliers.indices) == 0: print('Could not estimate a planar model for the given dataset.') break # 提取平面内点 extract = pcl.filters.ExtractIndices.PointXYZ() extract.setInputCloud(cloud_filtered) extract.setIndices(inliers) extract.setNegative(False) extract.filter(cloud_plane) # 可视化提取出来的平面 compareCloudShow(cloud_filtered, cloud_plane) print('PointCloud representing the planar component: ', cloud_plane.size(), ' data points.') # 去除上面提取到的平面内点,得到剩余点 extract.setNegative(True) extract.filter(cloud_f) cloud_filtered = cloud_f writer.write('cloud_cluster_source.pcd', cloud_filtered, False) # 创建KdTree tree = pcl.search.KdTree.PointXYZ() tree.setInputCloud(cloud_filtered) cluster_indices = pcl.vectors.PointIndices() ec = pcl.segmentation.EuclideanClusterExtraction.PointXYZ() ec.setClusterTolerance(0.02) # 2cm ec.setMinClusterSize(100) ec.setMaxClusterSize(25000) ec.setSearchMethod(tree) ec.setInputCloud(cloud_filtered) ec.extract(cluster_indices) j = 0 for it in cluster_indices: cloud_cluster = pcl.PointCloud.PointXYZ() for pit in it.indices: cloud_cluster.push_back(cloud_filtered.at(pit)) cloud_cluster.width = cloud_cluster.size() cloud_cluster.height = 1 cloud_cluster.is_dense = True print('PointCloud representing the Cluster: ', cloud_cluster.size(), ' data points.') ss = 'cloud_cluster_' + str(j) + '.pcd' writer.write(ss, cloud_cluster, False) j = j + 1
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 29937, 732, 2481, 584, 20231, 29901, 29906, 29900, 29906, 29896, 29914, 29896, 29900, 29914, 29953, 13, 29937, 732, 13720, 584, 343, 273, 13, 29937, 732, 9823, 584, 529, 26862, 6227, 29958, 13, 29937, 732, 2283, 584, 29871, 29900, 29941, 29918, 19594, 29918, 1062, 13857, 29889, 2272, 13, 13, 5215, 282, 695, 2272, 13, 3166, 282, 695, 2272, 1053, 282, 695, 13, 5215, 12655, 408, 7442, 13, 13, 13, 1753, 7252, 20442, 8964, 29898, 9274, 29892, 9570, 29918, 4572, 287, 1125, 13, 1678, 396, 4673, 29871, 29941, 29928, 6316, 556, 322, 788, 1298, 9570, 322, 6056, 1338, 13, 1678, 6316, 556, 353, 282, 695, 29889, 20119, 2133, 29889, 29925, 6154, 16227, 3950, 703, 29894, 15580, 1159, 13, 1678, 325, 29900, 353, 29871, 29896, 13, 1678, 6316, 556, 29889, 3258, 1043, 2290, 29898, 29900, 29889, 29900, 29892, 29871, 29900, 29889, 29900, 29892, 29871, 29900, 29889, 29945, 29892, 29871, 29896, 29889, 29900, 29892, 325, 29900, 29897, 13, 1678, 6316, 556, 29889, 842, 10581, 3306, 29898, 29900, 29889, 29900, 29892, 29871, 29900, 29889, 29900, 29892, 29871, 29900, 29889, 29900, 29892, 325, 29900, 29897, 13, 1678, 2323, 29918, 2780, 353, 282, 695, 29889, 20119, 2133, 29889, 5228, 20442, 3306, 4598, 7281, 29889, 5228, 18454, 29999, 29898, 9274, 29892, 29871, 29900, 29889, 29900, 29892, 29871, 29906, 29945, 29945, 29889, 29900, 29892, 29871, 29900, 29889, 29900, 29897, 13, 1678, 6316, 556, 29889, 1202, 5228, 20442, 29898, 9274, 29892, 2323, 29918, 2780, 29892, 376, 11249, 9570, 29896, 613, 325, 29900, 29897, 13, 13, 1678, 325, 29896, 353, 29871, 29906, 13, 1678, 6316, 556, 29889, 3258, 1043, 2290, 29898, 29900, 29889, 29945, 29892, 29871, 29900, 29889, 29900, 29892, 29871, 29896, 29889, 29900, 29892, 29871, 29896, 29889, 29900, 29892, 325, 29896, 29897, 13, 1678, 6316, 556, 29889, 842, 10581, 3306, 29898, 29900, 29889, 29900, 29892, 29871, 29900, 29889, 29900, 29892, 29871, 29900, 29889, 29900, 29892, 325, 29896, 29897, 13, 1678, 2323, 29918, 2780, 353, 282, 695, 29889, 20119, 2133, 29889, 5228, 20442, 3306, 4598, 7281, 29889, 5228, 18454, 29999, 29898, 9274, 29918, 4572, 287, 29892, 29871, 29900, 29889, 29900, 29892, 29871, 29906, 29945, 29945, 29889, 29900, 29892, 29871, 29900, 29889, 29900, 29897, 13, 1678, 6316, 556, 29889, 1202, 5228, 20442, 29898, 9274, 29918, 4572, 287, 29892, 2323, 29918, 2780, 29892, 376, 11249, 9570, 29906, 613, 325, 29896, 29897, 13, 13, 1678, 6316, 556, 29889, 842, 5228, 20442, 10716, 292, 11857, 29898, 29900, 29892, 29871, 29896, 29892, 376, 11249, 9570, 29896, 613, 325, 29900, 29897, 13, 1678, 6316, 556, 29889, 842, 5228, 20442, 10716, 292, 11857, 29898, 29900, 29892, 29871, 29896, 29892, 376, 11249, 9570, 29906, 613, 325, 29896, 29897, 13, 1678, 6316, 556, 29889, 1202, 7967, 16065, 3924, 29898, 29896, 29889, 29900, 29897, 13, 1678, 1550, 451, 6316, 556, 29889, 11102, 20754, 2986, 7295, 13, 4706, 6316, 556, 29889, 1028, 262, 26222, 29898, 29896, 29900, 29897, 13, 13, 13, 361, 4770, 978, 1649, 1275, 525, 1649, 3396, 1649, 2396, 13, 1678, 9591, 353, 282, 695, 29889, 601, 29889, 29925, 6530, 6982, 580, 13, 1678, 9570, 353, 282, 695, 29889, 5228, 20442, 29889, 5228, 18454, 29999, 580, 13, 1678, 9570, 29918, 29888, 353, 282, 695, 29889, 5228, 20442, 29889, 5228, 18454, 29999, 580, 13, 1678, 9591, 29889, 949, 877, 21546, 1272, 29914, 2371, 29918, 24645, 29918, 29880, 1516, 29946, 29900, 29900, 29889, 29886, 2252, 742, 9570, 29897, 13, 1678, 1596, 877, 5228, 20442, 1434, 21166, 756, 29901, 13420, 9570, 29889, 2311, 3285, 525, 848, 3291, 29889, 1495, 13, 13, 1678, 396, 29871, 30557, 236, 138, 138, 31819, 29871, 30785, 30406, 29500, 2159, 30573, 29896, 4912, 13, 1678, 325, 29887, 353, 282, 695, 29889, 26705, 29889, 29963, 2251, 295, 5756, 29889, 5228, 18454, 29999, 580, 13, 1678, 9570, 29918, 4572, 287, 353, 282, 695, 29889, 5228, 20442, 29889, 5228, 18454, 29999, 580, 13, 1678, 325, 29887, 29889, 842, 4290, 20442, 29898, 9274, 29897, 13, 1678, 325, 29887, 29889, 842, 3226, 2142, 3505, 29898, 29900, 29889, 29900, 29896, 29892, 29871, 29900, 29889, 29900, 29896, 29892, 29871, 29900, 29889, 29900, 29896, 29897, 13, 1678, 325, 29887, 29889, 4572, 29898, 9274, 29918, 4572, 287, 29897, 13, 1678, 1596, 877, 5228, 20442, 1156, 21166, 756, 29901, 13420, 9570, 29918, 4572, 287, 29889, 2311, 3285, 525, 848, 3291, 29889, 1495, 13, 13, 1678, 396, 29871, 30606, 30806, 30748, 232, 140, 181, 13, 1678, 2377, 353, 282, 695, 29889, 28192, 362, 29889, 29903, 2477, 17669, 358, 362, 29889, 5228, 18454, 29999, 580, 13, 1678, 297, 27801, 353, 282, 695, 29889, 5228, 2568, 1575, 580, 13, 1678, 16127, 353, 282, 695, 29889, 3195, 29907, 7297, 4543, 29879, 580, 13, 1678, 9570, 29918, 22116, 353, 282, 695, 29889, 5228, 20442, 29889, 5228, 18454, 29999, 580, 13, 1678, 9227, 353, 282, 695, 29889, 601, 29889, 29925, 6530, 10507, 580, 13, 1678, 2377, 29889, 842, 20624, 326, 675, 29907, 7297, 4543, 29879, 29898, 5574, 29897, 13, 1678, 2377, 29889, 842, 3195, 1542, 29898, 29900, 29897, 13, 1678, 2377, 29889, 842, 4062, 1542, 29898, 29900, 29897, 13, 1678, 2377, 29889, 842, 7976, 13463, 800, 29898, 29896, 29900, 29900, 29897, 13, 1678, 2377, 29889, 842, 27469, 1349, 12268, 29898, 29900, 29889, 29900, 29906, 29897, 13, 13, 1678, 17114, 29918, 9748, 353, 9570, 29918, 4572, 287, 29889, 2311, 580, 13, 1678, 1550, 9570, 29918, 4572, 287, 29889, 2311, 580, 1405, 29871, 29900, 29889, 29941, 334, 17114, 29918, 9748, 29901, 13, 4706, 396, 29871, 30505, 232, 140, 172, 231, 192, 156, 30210, 30940, 31784, 30275, 30748, 232, 140, 181, 30544, 30878, 30257, 30210, 30606, 30806, 30494, 30748, 13, 4706, 2377, 29889, 842, 4290, 20442, 29898, 9274, 29918, 4572, 287, 29897, 13, 4706, 2377, 29889, 28192, 29898, 262, 27801, 29892, 16127, 29897, 13, 4706, 565, 7431, 29898, 262, 27801, 29889, 513, 1575, 29897, 1275, 29871, 29900, 29901, 13, 9651, 1596, 877, 23323, 451, 12678, 263, 3814, 279, 1904, 363, 278, 2183, 8783, 29889, 1495, 13, 9651, 2867, 13, 13, 4706, 396, 29871, 31302, 30683, 30606, 30806, 30728, 30940, 13, 4706, 6597, 353, 282, 695, 29889, 26705, 29889, 5647, 1461, 2568, 1575, 29889, 5228, 18454, 29999, 580, 13, 4706, 6597, 29889, 842, 4290, 20442, 29898, 9274, 29918, 4572, 287, 29897, 13, 4706, 6597, 29889, 842, 2568, 1575, 29898, 262, 27801, 29897, 13, 4706, 6597, 29889, 842, 29940, 387, 1230, 29898, 8824, 29897, 13, 13, 4706, 6597, 29889, 4572, 29898, 9274, 29918, 22116, 29897, 13, 4706, 396, 29871, 30682, 31568, 30705, 31302, 30683, 30544, 30805, 30210, 30606, 30806, 13, 4706, 7252, 20442, 8964, 29898, 9274, 29918, 4572, 287, 29892, 9570, 29918, 22116, 29897, 13, 4706, 1596, 877, 5228, 20442, 15783, 278, 3814, 279, 4163, 29901, 13420, 9570, 29918, 22116, 29889, 2311, 3285, 525, 848, 3291, 29889, 1495, 13, 13, 4706, 396, 29871, 31475, 31152, 30429, 30806, 31302, 30683, 30780, 30210, 30606, 30806, 30728, 30940, 30214, 31050, 30780, 232, 140, 172, 231, 192, 156, 30940, 13, 4706, 6597, 29889, 842, 29940, 387, 1230, 29898, 5574, 29897, 13, 4706, 6597, 29889, 4572, 29898, 9274, 29918, 29888, 29897, 13, 4706, 9570, 29918, 4572, 287, 353, 9570, 29918, 29888, 13, 13, 1678, 9227, 29889, 3539, 877, 9274, 29918, 19594, 29918, 4993, 29889, 29886, 2252, 742, 9570, 29918, 4572, 287, 29892, 7700, 29897, 13, 1678, 396, 29871, 31441, 30886, 29968, 29881, 9643, 13, 1678, 5447, 353, 282, 695, 29889, 4478, 29889, 29968, 29881, 9643, 29889, 5228, 18454, 29999, 580, 13, 1678, 5447, 29889, 842, 4290, 20442, 29898, 9274, 29918, 4572, 287, 29897, 13, 13, 1678, 9867, 29918, 513, 1575, 353, 282, 695, 29889, 345, 14359, 29889, 5228, 2568, 1575, 580, 13, 1678, 21226, 353, 282, 695, 29889, 28192, 362, 29889, 29923, 27511, 6821, 5402, 5647, 13857, 29889, 5228, 18454, 29999, 580, 13, 1678, 21226, 29889, 842, 6821, 5402, 29911, 324, 261, 749, 29898, 29900, 29889, 29900, 29906, 29897, 29871, 396, 29871, 29906, 4912, 13, 1678, 21226, 29889, 842, 8140, 6821, 5402, 3505, 29898, 29896, 29900, 29900, 29897, 13, 1678, 21226, 29889, 842, 7976, 6821, 5402, 3505, 29898, 29906, 29945, 29900, 29900, 29900, 29897, 13, 1678, 21226, 29889, 842, 7974, 4062, 29898, 8336, 29897, 13, 1678, 21226, 29889, 842, 4290, 20442, 29898, 9274, 29918, 4572, 287, 29897, 13, 1678, 21226, 29889, 21111, 29898, 19594, 29918, 513, 1575, 29897, 13, 13, 1678, 432, 353, 29871, 29900, 13, 1678, 363, 372, 297, 9867, 29918, 513, 1575, 29901, 13, 4706, 9570, 29918, 19594, 353, 282, 695, 29889, 5228, 20442, 29889, 5228, 18454, 29999, 580, 13, 4706, 363, 22754, 297, 372, 29889, 513, 1575, 29901, 13, 9651, 9570, 29918, 19594, 29889, 5910, 29918, 1627, 29898, 9274, 29918, 4572, 287, 29889, 271, 29898, 23600, 876, 13, 4706, 9570, 29918, 19594, 29889, 2103, 353, 9570, 29918, 19594, 29889, 2311, 580, 13, 4706, 9570, 29918, 19594, 29889, 3545, 353, 29871, 29896, 13, 4706, 9570, 29918, 19594, 29889, 275, 29918, 1145, 344, 353, 5852, 13, 13, 4706, 1596, 877, 5228, 20442, 15783, 278, 2233, 5402, 29901, 13420, 9570, 29918, 19594, 29889, 2311, 3285, 525, 848, 3291, 29889, 1495, 13, 13, 4706, 17971, 353, 525, 9274, 29918, 19594, 29918, 29915, 718, 851, 29898, 29926, 29897, 718, 15300, 29886, 2252, 29915, 13, 4706, 9227, 29889, 3539, 29898, 893, 29892, 9570, 29918, 19594, 29892, 7700, 29897, 13, 4706, 432, 353, 432, 718, 29871, 29896, 13, 2 ]
website/openeuler_release_refresher/obs/__init__.py
openeuler-mirror/infrastructure
1
1615335
<reponame>openeuler-mirror/infrastructure<filename>website/openeuler_release_refresher/obs/__init__.py # -*- coding:utf-8 -*- # Copyright 2019 Huawei Technologies Co.,Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); you may not use # this file except in compliance with the License. You may obtain a copy of the # License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software distributed # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR # CONDITIONS OF ANY KIND, either express or implied. See the License for the # specific language governing permissions and limitations under the License. from obs.ilog import LogConf from obs.client import ObsClient from obs.model import * __all__ = [ 'LogConf', 'ObsClient', 'CompletePart', 'Permission', 'StorageClass', 'EventType', 'RestoreTier', 'Group', 'Grantee', 'Grant', 'ExtensionGrant', 'Owner', 'ACL', 'Condition', 'DateTime', 'SseCHeader', 'SseKmsHeader', 'CopyObjectHeader', 'SetObjectMetadataHeader', 'CorsRule', 'CreateBucketHeader', 'ErrorDocument', 'IndexDocument', 'Expiration', 'NoncurrentVersionExpiration', 'GetObjectHeader', 'HeadPermission', 'Lifecycle', 'Notification', 'TopicConfiguration', 'FunctionGraphConfiguration', 'FilterRule', 'Replication', 'ReplicationRule', 'Options', 'PutObjectHeader', 'AppendObjectHeader', 'AppendObjectContent', 'RedirectAllRequestTo', 'Redirect', 'RoutingRule', 'Tag', 'TagInfo', 'Transition', 'NoncurrentVersionTransition', 'Rule', 'Versions', 'Object', 'WebsiteConfiguration', 'Logging', 'CompleteMultipartUploadRequest', 'DeleteObjectsRequest', 'ListMultipartUploadsRequest', 'GetObjectRequest', 'UploadFileHeader' ]
[ 1, 529, 276, 1112, 420, 29958, 459, 1600, 8584, 29899, 11038, 729, 29914, 262, 14867, 12425, 29966, 9507, 29958, 22942, 29914, 459, 1600, 8584, 29918, 14096, 29918, 999, 690, 2276, 29914, 26290, 29914, 1649, 2344, 26914, 2272, 13, 29937, 448, 29930, 29899, 14137, 29901, 9420, 29899, 29947, 448, 29930, 29899, 13, 29937, 14187, 1266, 29871, 29906, 29900, 29896, 29929, 379, 3357, 26599, 8364, 11763, 3189, 1696, 29931, 1594, 29889, 13, 29937, 10413, 21144, 1090, 278, 13380, 19245, 29892, 10079, 29871, 29906, 29889, 29900, 313, 1552, 376, 29931, 293, 1947, 1496, 366, 1122, 451, 671, 13, 29937, 445, 934, 5174, 297, 752, 13036, 411, 278, 19245, 29889, 29871, 887, 1122, 4017, 263, 3509, 310, 278, 13, 29937, 19245, 472, 13, 13, 29937, 1732, 597, 1636, 29889, 4288, 29889, 990, 29914, 506, 11259, 29914, 27888, 1430, 1660, 29899, 29906, 29889, 29900, 13, 13, 29937, 25870, 3734, 491, 22903, 4307, 470, 15502, 304, 297, 5007, 29892, 7047, 13235, 13, 29937, 1090, 278, 19245, 338, 13235, 373, 385, 376, 3289, 8519, 29908, 350, 3289, 3235, 29892, 399, 1806, 8187, 2692, 399, 1718, 29934, 13566, 29059, 6323, 13, 29937, 8707, 29928, 22122, 29903, 8079, 13764, 29979, 476, 22255, 29892, 2845, 4653, 470, 2411, 2957, 29889, 29871, 2823, 278, 19245, 363, 278, 13, 29937, 2702, 4086, 14765, 1076, 11239, 322, 27028, 1090, 278, 19245, 29889, 13, 13, 13, 3166, 20881, 29889, 26140, 1053, 4522, 16376, 13, 3166, 20881, 29889, 4645, 1053, 4250, 29879, 4032, 13, 3166, 20881, 29889, 4299, 1053, 334, 13, 13, 13, 1649, 497, 1649, 353, 518, 13, 1678, 525, 3403, 16376, 742, 13, 1678, 525, 29949, 5824, 4032, 742, 13, 1678, 525, 17813, 7439, 742, 13, 1678, 525, 27293, 742, 13, 1678, 525, 10486, 2385, 742, 29871, 13, 1678, 525, 2624, 1542, 742, 13, 1678, 525, 15078, 487, 29911, 631, 742, 13, 1678, 525, 4782, 742, 13, 1678, 525, 29954, 661, 371, 29872, 742, 13, 1678, 525, 3338, 424, 742, 13, 1678, 525, 17657, 3338, 424, 742, 13, 1678, 525, 28213, 742, 13, 1678, 525, 2477, 29931, 742, 13, 1678, 525, 25255, 742, 13, 1678, 525, 11384, 742, 13, 1678, 525, 29903, 344, 3210, 1479, 261, 742, 13, 1678, 525, 29903, 344, 29968, 1516, 7850, 742, 13, 1678, 525, 11882, 2061, 7850, 742, 13, 1678, 525, 2697, 2061, 18417, 7850, 742, 13, 1678, 525, 29907, 943, 10740, 742, 13, 1678, 525, 4391, 29933, 2707, 300, 7850, 742, 13, 1678, 525, 2392, 6268, 742, 13, 1678, 525, 3220, 6268, 742, 13, 1678, 525, 9544, 12232, 742, 13, 1678, 525, 12283, 3784, 6594, 9544, 12232, 742, 13, 1678, 525, 2577, 2061, 7850, 742, 13, 1678, 525, 5494, 27293, 742, 13, 1678, 525, 29931, 22532, 742, 13, 1678, 525, 12958, 742, 13, 1678, 525, 7031, 293, 8614, 742, 13, 1678, 525, 6678, 9527, 8614, 742, 13, 1678, 525, 5072, 10740, 742, 13, 1678, 525, 5612, 1414, 742, 13, 1678, 525, 5612, 1414, 10740, 742, 13, 1678, 525, 5856, 742, 13, 1678, 525, 22908, 2061, 7850, 742, 13, 1678, 525, 18277, 2061, 7850, 742, 13, 1678, 525, 18277, 2061, 3916, 742, 13, 1678, 525, 24735, 3596, 3089, 1762, 742, 13, 1678, 525, 24735, 742, 13, 1678, 525, 24254, 292, 10740, 742, 13, 1678, 525, 8176, 742, 13, 1678, 525, 8176, 3401, 742, 13, 1678, 525, 4300, 654, 742, 13, 1678, 525, 12283, 3784, 6594, 4300, 654, 742, 13, 1678, 525, 10740, 742, 13, 1678, 525, 29963, 414, 1080, 742, 13, 1678, 525, 2061, 742, 13, 1678, 525, 3609, 2746, 8614, 742, 13, 1678, 525, 3403, 3460, 742, 13, 1678, 525, 17813, 6857, 27494, 17553, 3089, 742, 13, 1678, 525, 12498, 12724, 3089, 742, 13, 1678, 525, 1293, 6857, 27494, 17553, 29879, 3089, 742, 13, 1678, 525, 2577, 2061, 3089, 742, 13, 1678, 525, 17553, 2283, 7850, 29915, 13, 29962, 13, 13, 2 ]
days/01/part1.py
gr3yknigh1/aoc2021
0
12537
<filename>days/01/part1.py<gh_stars>0 from __future__ import annotations import os import collections BASE_PATH = os.path.dirname(__file__) INPUT_PATH = os.path.join(BASE_PATH, "input.txt") OUTPUT_PATH = os.path.join(BASE_PATH, "output.txt") def proceed_buffer(buffer: str) -> list[int]: return [int(line) for line in buffer.splitlines()] def main() -> int: buffer: str = "" with open(INPUT_PATH, mode='r', encoding="utf-8") as f: buffer = f.read() measurements: list[int] = proceed_buffer(buffer) measurements_counter = collections.Counter() output_buffer: str = "" prev: int = None for i in measurements: if prev is None: output_buffer += f"{i} (N/A - no previous measurement)\n" measurements_counter["None"] += 1 elif prev > i: output_buffer += f"{i} (decrease)\n" measurements_counter["Decreased"] += 1 elif prev < i: output_buffer += f"{i} (increase)\n" measurements_counter["Increased"] += 1 elif prev == i: output_buffer += f"{i} (not changed)\n" measurements_counter["Equal"] += 1 prev = i output_buffer += "\n====\n" output_buffer += "Total:\n" output_buffer += f": {measurements_counter}" with open(OUTPUT_PATH, mode='w', encoding="utf-8") as f: f.write(output_buffer) return 0 if __name__ == "__main__": raise SystemExit(main())
[ 1, 529, 9507, 29958, 16700, 29914, 29900, 29896, 29914, 1595, 29896, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 4770, 29888, 9130, 1649, 1053, 25495, 13, 5215, 2897, 13, 5215, 16250, 13, 13, 13, 25416, 29918, 10145, 353, 29871, 2897, 29889, 2084, 29889, 25721, 22168, 1445, 1649, 29897, 29871, 13, 1177, 12336, 29918, 10145, 353, 2897, 29889, 2084, 29889, 7122, 29898, 25416, 29918, 10145, 29892, 376, 2080, 29889, 3945, 1159, 13, 12015, 12336, 29918, 10145, 353, 2897, 29889, 2084, 29889, 7122, 29898, 25416, 29918, 10145, 29892, 376, 4905, 29889, 3945, 1159, 13, 13, 13, 1753, 8469, 29918, 9040, 29898, 9040, 29901, 851, 29897, 1599, 1051, 29961, 524, 5387, 13, 1678, 736, 518, 524, 29898, 1220, 29897, 363, 1196, 297, 6835, 29889, 5451, 9012, 580, 29962, 13, 13, 13, 1753, 1667, 580, 1599, 938, 29901, 13, 13, 1678, 6835, 29901, 851, 353, 5124, 13, 1678, 411, 1722, 29898, 1177, 12336, 29918, 10145, 29892, 4464, 2433, 29878, 742, 8025, 543, 9420, 29899, 29947, 1159, 408, 285, 29901, 13, 4706, 6835, 353, 285, 29889, 949, 580, 13, 13, 1678, 20398, 29901, 1051, 29961, 524, 29962, 353, 8469, 29918, 9040, 29898, 9040, 29897, 13, 1678, 20398, 29918, 11808, 353, 16250, 29889, 17779, 580, 13, 268, 13, 1678, 1962, 29918, 9040, 29901, 851, 353, 5124, 13, 1678, 12379, 29901, 938, 353, 6213, 13, 268, 13, 1678, 363, 474, 297, 20398, 29901, 13, 4706, 565, 12379, 338, 6213, 29901, 13, 9651, 1962, 29918, 9040, 4619, 285, 29908, 29912, 29875, 29913, 313, 29940, 29914, 29909, 448, 694, 3517, 20039, 2144, 29876, 29908, 13, 9651, 20398, 29918, 11808, 3366, 8516, 3108, 4619, 29871, 29896, 13, 4706, 25342, 12379, 1405, 474, 29901, 13, 9651, 1962, 29918, 9040, 4619, 285, 29908, 29912, 29875, 29913, 313, 311, 1037, 559, 2144, 29876, 29908, 13, 9651, 20398, 29918, 11808, 3366, 6185, 276, 1463, 3108, 4619, 29871, 29896, 13, 4706, 25342, 12379, 529, 474, 29901, 13, 9651, 1962, 29918, 9040, 4619, 285, 29908, 29912, 29875, 29913, 313, 262, 1037, 559, 2144, 29876, 29908, 13, 9651, 20398, 29918, 11808, 3366, 797, 1037, 1463, 3108, 4619, 29871, 29896, 13, 4706, 25342, 12379, 1275, 474, 29901, 13, 9651, 1962, 29918, 9040, 4619, 285, 29908, 29912, 29875, 29913, 313, 1333, 3939, 2144, 29876, 29908, 13, 9651, 20398, 29918, 11808, 3366, 9843, 3108, 4619, 29871, 29896, 13, 4706, 12379, 353, 474, 29871, 13, 13, 1678, 1962, 29918, 9040, 4619, 6634, 29876, 2751, 29905, 29876, 29908, 13, 1678, 1962, 29918, 9040, 4619, 376, 11536, 3583, 29876, 29908, 13, 1678, 1962, 29918, 9040, 4619, 285, 1115, 426, 26658, 1860, 29918, 11808, 5038, 13, 13, 13, 1678, 411, 1722, 29898, 12015, 12336, 29918, 10145, 29892, 4464, 2433, 29893, 742, 8025, 543, 9420, 29899, 29947, 1159, 408, 285, 29901, 13, 4706, 285, 29889, 3539, 29898, 4905, 29918, 9040, 29897, 13, 13, 1678, 736, 29871, 29900, 13, 13, 13, 361, 4770, 978, 1649, 1275, 376, 1649, 3396, 1649, 1115, 13, 1678, 12020, 2184, 24365, 29898, 3396, 3101, 13, 2 ]
falconcv/data/scraper/flickr_scraper.py
haruiz/FalconCV
16
17703
import logging import math import re import time import dask import numpy as np import requests import json import xml.etree.ElementTree as ET from falconcv.data.scraper.scraper import ImagesScraper from falconcv.util import ImageUtil logger = logging.getLogger(__name__) FLICKR_ENDPOINT = "https://www.flickr.com/services/rest" # List of sizes: # url_o: Original (4520 × 3229) # url_k: Large 2048 (2048 × 1463) # url_h: Large 1600 (1600 × 1143) # url_l=: Large 1024 (1024 × 732) # url_c: Medium 800 (800 × 572) # url_z: Medium 640 (640 × 457) # url_m: Medium 500 (500 × 357) # url_n: Small 320 (320 × 229) # url_s: Small 240 (240 × 171) # url_t: Thumbnail (100 × 71) # url_q: Square 150 (150 × 150) # url_sq: Square 75 (75 × 75) class FlickrScraper(ImagesScraper): def __init__(self, api_key): super(FlickrScraper, self).__init__() self.api_key = api_key def _authenticate(self): pass def _get_total_matches(self, q): total_matches = 0 try: response = requests.get(url=FLICKR_ENDPOINT, params={ "api_key": self.api_key, "method": "flickr.photos.search", "tags": ",".join(q), "tag_mode": "any", # "privacy_filter": "1" "content_type": 1, "media": "photos", "per_page": 0, "format": "json" }) if response.status_code == 200: json_text = re.search(r'\((.*?)\)', response.text).group(1) json_object = json.loads(json_text) if json_object["stat"] == "ok": total_matches = int(json_object["photos"]["total"]) # total_matches = json_object["photos"] except Exception as ex: logger.error("Error making the request : {}".format(ex)) return total_matches def _request_photos(self, q, count, page): images = [] try: response = requests.get(url=FLICKR_ENDPOINT, params={ "api_key": self.api_key, "method": "flickr.photos.search", "tags": ",".join(q), "tag_mode": "any", # "privacy_filter": "1" "content_type": 1, "media": "photos", "per_page": count, "page": page, "extras": ",".join(["url_o", "url_k", "url_h", "url_l", "url_c", "url_m"]) }) if response.status_code == 200: try: # print(response.text) root: ET.Element = ET.fromstring(response.text) stat = root.get("stat") if stat == "ok": for photo in root.iterfind("photos/photo"): photo: ET.Element images.append(photo.attrib) except Exception as ex: logger.error("error gathering the response: {}".format(ex)) except Exception as ex: logger.error("Error making the request : {}".format(ex)) return images @dask.delayed def _fetch_image(self, image_info, sz): try: if sz in image_info: url = image_info[sz] return ImageUtil.url2img(url) except Exception as ex: logger.error("Error fetching the image: " % ex) return None def fetch(self, q, batch_size: int = 100, timestamp=1, sz="url_m"): try: assert batch_size <= 500, "invalid count parameter" total_matches = self._get_total_matches(q) logger.debug("{} images found ".format(total_matches)) number_of_pages = math.ceil(total_matches / batch_size) for page in range(1, number_of_pages): photos = self._request_photos(q, batch_size, page) delayed_tasks = list(map(lambda img: self._fetch_image(img, sz), photos)) compute_result = dask.compute(*delayed_tasks) yield [img for img in compute_result if isinstance(img, np.ndarray)] time.sleep(timestamp) except Exception as ex: logger.error("error fetching the images: {}".format(ex))
[ 1, 1053, 12183, 13, 5215, 5844, 13, 5215, 337, 13, 5215, 931, 13, 5215, 270, 1278, 13, 5215, 12655, 408, 7442, 13, 5215, 7274, 13, 5215, 4390, 13, 5215, 4903, 29889, 300, 929, 29889, 2642, 9643, 408, 382, 29911, 13, 3166, 11092, 535, 11023, 29889, 1272, 29889, 1557, 336, 546, 29889, 1557, 336, 546, 1053, 1954, 1179, 4421, 336, 546, 13, 3166, 11092, 535, 11023, 29889, 4422, 1053, 7084, 7270, 13, 21707, 353, 12183, 29889, 657, 16363, 22168, 978, 1649, 29897, 13, 10536, 2965, 29968, 29934, 29918, 1430, 11191, 6992, 29911, 353, 376, 991, 597, 1636, 29889, 29888, 1406, 29878, 29889, 510, 29914, 9916, 29914, 5060, 29908, 13, 29937, 2391, 310, 15786, 29901, 13, 29937, 3142, 29918, 29877, 29901, 8533, 313, 29946, 29945, 29906, 29900, 13105, 29871, 29941, 29906, 29906, 29929, 29897, 13, 29937, 3142, 29918, 29895, 29901, 8218, 479, 29871, 29906, 29900, 29946, 29947, 313, 29906, 29900, 29946, 29947, 13105, 29871, 29896, 29946, 29953, 29941, 29897, 13, 29937, 3142, 29918, 29882, 29901, 8218, 479, 29871, 29896, 29953, 29900, 29900, 313, 29896, 29953, 29900, 29900, 13105, 29871, 29896, 29896, 29946, 29941, 29897, 13, 29937, 3142, 29918, 29880, 29922, 29901, 8218, 479, 29871, 29896, 29900, 29906, 29946, 313, 29896, 29900, 29906, 29946, 13105, 29871, 29955, 29941, 29906, 29897, 13, 29937, 3142, 29918, 29883, 29901, 3436, 1974, 29871, 29947, 29900, 29900, 313, 29947, 29900, 29900, 13105, 29871, 29945, 29955, 29906, 29897, 13, 29937, 3142, 29918, 29920, 29901, 3436, 1974, 29871, 29953, 29946, 29900, 313, 29953, 29946, 29900, 13105, 29871, 29946, 29945, 29955, 29897, 13, 29937, 3142, 29918, 29885, 29901, 3436, 1974, 29871, 29945, 29900, 29900, 313, 29945, 29900, 29900, 13105, 29871, 29941, 29945, 29955, 29897, 13, 29937, 3142, 29918, 29876, 29901, 18285, 29871, 29941, 29906, 29900, 313, 29941, 29906, 29900, 13105, 29871, 29906, 29906, 29929, 29897, 13, 29937, 3142, 29918, 29879, 29901, 18285, 29871, 29906, 29946, 29900, 313, 29906, 29946, 29900, 13105, 29871, 29896, 29955, 29896, 29897, 13, 29937, 3142, 29918, 29873, 29901, 498, 21145, 313, 29896, 29900, 29900, 13105, 29871, 29955, 29896, 29897, 13, 29937, 3142, 29918, 29939, 29901, 19256, 29871, 29896, 29945, 29900, 313, 29896, 29945, 29900, 13105, 29871, 29896, 29945, 29900, 29897, 13, 29937, 3142, 29918, 3044, 29901, 19256, 29871, 29955, 29945, 313, 29955, 29945, 13105, 29871, 29955, 29945, 29897, 13, 13, 1990, 383, 1406, 29878, 4421, 336, 546, 29898, 20163, 4421, 336, 546, 1125, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 7882, 29918, 1989, 1125, 13, 4706, 2428, 29898, 29943, 1406, 29878, 4421, 336, 546, 29892, 1583, 467, 1649, 2344, 1649, 580, 13, 4706, 1583, 29889, 2754, 29918, 1989, 353, 7882, 29918, 1989, 13, 13, 1678, 822, 903, 27218, 403, 29898, 1311, 1125, 13, 4706, 1209, 13, 13, 1678, 822, 903, 657, 29918, 7827, 29918, 20317, 29898, 1311, 29892, 3855, 1125, 13, 4706, 3001, 29918, 20317, 353, 29871, 29900, 13, 4706, 1018, 29901, 13, 9651, 2933, 353, 7274, 29889, 657, 29898, 2271, 29922, 10536, 2965, 29968, 29934, 29918, 1430, 11191, 6992, 29911, 29892, 8636, 3790, 13, 18884, 376, 2754, 29918, 1989, 1115, 1583, 29889, 2754, 29918, 1989, 29892, 13, 18884, 376, 5696, 1115, 376, 29888, 1406, 29878, 29889, 561, 15788, 29889, 4478, 613, 13, 18884, 376, 11338, 1115, 9162, 1642, 7122, 29898, 29939, 511, 13, 18884, 376, 4039, 29918, 8513, 1115, 376, 1384, 613, 13, 18884, 396, 376, 22534, 4135, 29918, 4572, 1115, 376, 29896, 29908, 13, 18884, 376, 3051, 29918, 1853, 1115, 29871, 29896, 29892, 13, 18884, 376, 9799, 1115, 376, 561, 15788, 613, 13, 18884, 376, 546, 29918, 3488, 1115, 29871, 29900, 29892, 13, 18884, 376, 4830, 1115, 376, 3126, 29908, 13, 9651, 5615, 13, 9651, 565, 2933, 29889, 4882, 29918, 401, 1275, 29871, 29906, 29900, 29900, 29901, 13, 18884, 4390, 29918, 726, 353, 337, 29889, 4478, 29898, 29878, 12764, 3552, 5575, 29973, 27779, 742, 2933, 29889, 726, 467, 2972, 29898, 29896, 29897, 13, 18884, 4390, 29918, 3318, 353, 4390, 29889, 18132, 29898, 3126, 29918, 726, 29897, 13, 18884, 565, 4390, 29918, 3318, 3366, 6112, 3108, 1275, 376, 554, 1115, 13, 462, 1678, 3001, 29918, 20317, 353, 938, 29898, 3126, 29918, 3318, 3366, 561, 15788, 3108, 3366, 7827, 20068, 13, 462, 1678, 396, 3001, 29918, 20317, 353, 4390, 29918, 3318, 3366, 561, 15788, 3108, 13, 4706, 5174, 8960, 408, 429, 29901, 13, 9651, 17927, 29889, 2704, 703, 2392, 3907, 278, 2009, 584, 6571, 1642, 4830, 29898, 735, 876, 13, 4706, 736, 3001, 29918, 20317, 13, 13, 1678, 822, 903, 3827, 29918, 561, 15788, 29898, 1311, 29892, 3855, 29892, 2302, 29892, 1813, 1125, 13, 4706, 4558, 353, 5159, 13, 4706, 1018, 29901, 13, 9651, 2933, 353, 7274, 29889, 657, 29898, 2271, 29922, 10536, 2965, 29968, 29934, 29918, 1430, 11191, 6992, 29911, 29892, 8636, 3790, 13, 18884, 376, 2754, 29918, 1989, 1115, 1583, 29889, 2754, 29918, 1989, 29892, 13, 18884, 376, 5696, 1115, 376, 29888, 1406, 29878, 29889, 561, 15788, 29889, 4478, 613, 13, 18884, 376, 11338, 1115, 9162, 1642, 7122, 29898, 29939, 511, 13, 18884, 376, 4039, 29918, 8513, 1115, 376, 1384, 613, 13, 18884, 396, 376, 22534, 4135, 29918, 4572, 1115, 376, 29896, 29908, 13, 18884, 376, 3051, 29918, 1853, 1115, 29871, 29896, 29892, 13, 18884, 376, 9799, 1115, 376, 561, 15788, 613, 13, 18884, 376, 546, 29918, 3488, 1115, 2302, 29892, 13, 18884, 376, 3488, 1115, 1813, 29892, 13, 18884, 376, 1062, 3417, 1115, 9162, 1642, 7122, 29898, 3366, 2271, 29918, 29877, 613, 376, 2271, 29918, 29895, 613, 376, 2271, 29918, 29882, 613, 376, 2271, 29918, 29880, 613, 376, 2271, 29918, 29883, 613, 376, 2271, 29918, 29885, 20068, 13, 9651, 5615, 13, 9651, 565, 2933, 29889, 4882, 29918, 401, 1275, 29871, 29906, 29900, 29900, 29901, 13, 18884, 1018, 29901, 13, 462, 1678, 396, 1596, 29898, 5327, 29889, 726, 29897, 13, 462, 1678, 3876, 29901, 382, 29911, 29889, 2642, 353, 382, 29911, 29889, 3166, 1807, 29898, 5327, 29889, 726, 29897, 13, 462, 1678, 1002, 353, 3876, 29889, 657, 703, 6112, 1159, 13, 462, 1678, 565, 1002, 1275, 376, 554, 1115, 13, 462, 4706, 363, 15373, 297, 3876, 29889, 1524, 2886, 703, 561, 15788, 29914, 21596, 29908, 1125, 13, 462, 9651, 15373, 29901, 382, 29911, 29889, 2642, 13, 462, 9651, 4558, 29889, 4397, 29898, 21596, 29889, 1131, 1091, 29897, 13, 18884, 5174, 8960, 408, 429, 29901, 13, 462, 1678, 17927, 29889, 2704, 703, 2704, 11705, 292, 278, 2933, 29901, 6571, 1642, 4830, 29898, 735, 876, 13, 4706, 5174, 8960, 408, 429, 29901, 13, 9651, 17927, 29889, 2704, 703, 2392, 3907, 278, 2009, 584, 6571, 1642, 4830, 29898, 735, 876, 13, 4706, 736, 4558, 13, 13, 1678, 732, 29881, 1278, 29889, 18829, 287, 13, 1678, 822, 903, 9155, 29918, 3027, 29898, 1311, 29892, 1967, 29918, 3888, 29892, 2268, 1125, 13, 4706, 1018, 29901, 13, 9651, 565, 2268, 297, 1967, 29918, 3888, 29901, 13, 18884, 3142, 353, 1967, 29918, 3888, 29961, 3616, 29962, 13, 18884, 736, 7084, 7270, 29889, 2271, 29906, 2492, 29898, 2271, 29897, 13, 4706, 5174, 8960, 408, 429, 29901, 13, 9651, 17927, 29889, 2704, 703, 2392, 6699, 292, 278, 1967, 29901, 29871, 376, 1273, 429, 29897, 13, 4706, 736, 6213, 13, 13, 1678, 822, 6699, 29898, 1311, 29892, 3855, 29892, 9853, 29918, 2311, 29901, 938, 353, 29871, 29896, 29900, 29900, 29892, 14334, 29922, 29896, 29892, 2268, 543, 2271, 29918, 29885, 29908, 1125, 13, 4706, 1018, 29901, 13, 9651, 4974, 9853, 29918, 2311, 5277, 29871, 29945, 29900, 29900, 29892, 376, 20965, 2302, 3443, 29908, 13, 9651, 3001, 29918, 20317, 353, 1583, 3032, 657, 29918, 7827, 29918, 20317, 29898, 29939, 29897, 13, 9651, 17927, 29889, 8382, 703, 8875, 4558, 1476, 11393, 4830, 29898, 7827, 29918, 20317, 876, 13, 9651, 1353, 29918, 974, 29918, 12292, 353, 5844, 29889, 27696, 29898, 7827, 29918, 20317, 847, 9853, 29918, 2311, 29897, 13, 9651, 363, 1813, 297, 3464, 29898, 29896, 29892, 1353, 29918, 974, 29918, 12292, 1125, 13, 18884, 20612, 353, 1583, 3032, 3827, 29918, 561, 15788, 29898, 29939, 29892, 9853, 29918, 2311, 29892, 1813, 29897, 13, 18884, 29801, 29918, 20673, 353, 1051, 29898, 1958, 29898, 2892, 10153, 29901, 1583, 3032, 9155, 29918, 3027, 29898, 2492, 29892, 2268, 511, 20612, 876, 13, 18884, 10272, 29918, 2914, 353, 270, 1278, 29889, 26017, 10456, 18829, 287, 29918, 20673, 29897, 13, 18884, 7709, 518, 2492, 363, 10153, 297, 10272, 29918, 2914, 565, 338, 8758, 29898, 2492, 29892, 7442, 29889, 299, 2378, 4638, 13, 18884, 931, 29889, 17059, 29898, 16394, 29897, 13, 4706, 5174, 8960, 408, 429, 29901, 13, 9651, 17927, 29889, 2704, 703, 2704, 6699, 292, 278, 4558, 29901, 29871, 6571, 1642, 4830, 29898, 735, 876, 13, 2 ]
engineer/apps.py
mostafaitalian/digitec
0
1610949
from django.apps import AppConfig class EngineerConfig(AppConfig): name = 'engineer'
[ 1, 515, 9557, 29889, 13371, 1053, 2401, 3991, 13, 13, 13, 1990, 10863, 261, 3991, 29898, 2052, 3991, 1125, 13, 1678, 1024, 353, 525, 10599, 261, 29915, 13, 2 ]
reverse_linked_list.py
jaebradley/leetcode.py
0
148325
# Reverse a singly linked list. # Input: 1->2->3->4->5->NULL # Output: 5->4->3->2->1->NULL class Solution(object): def reverseList(self, head): """ Iterative solution that involves changing the next reference for the following node to point at current node. If empty list (i.e. head is None) return None. If single value list (i.e. head.next is None) return list If multiple values, use first and second variables to store references to nodes that are neighbors :type head: ListNode :rtype: ListNode """ if head is None or head.next is None: return head first = head second = head.next head.next = None while second is not None: next_node = self.swap(first, second) first = second second = next_node return first def swap(self, first_node, second_node): if second_node is None: return None next_node = second_node.next second_node.next = first_node return next_node def reverseList2(self, head): return self.reverseList2Helper(head, None) def reverseList2Helper(self, head, next_head): """ Recursive solution where subproblem is reversing list starting from remaining nodes. The reversed list is the current node swapped with reverse of all remaining nodes. head refers to current node and next_head refers to what will eventually be head.next. :type head: ListNode :rtype: ListNode """ if head is None: return next_head next_node = head.next head.next = next_head return self.reverseList2Helper(next_node, head)
[ 1, 396, 830, 3901, 263, 1809, 368, 9024, 1051, 29889, 13, 29937, 10567, 29901, 29871, 29896, 976, 29906, 976, 29941, 976, 29946, 976, 29945, 976, 10074, 13, 29937, 10604, 29901, 29871, 29945, 976, 29946, 976, 29941, 976, 29906, 976, 29896, 976, 10074, 13, 13, 13, 1990, 24380, 29898, 3318, 1125, 13, 1678, 822, 11837, 1293, 29898, 1311, 29892, 2343, 1125, 13, 4706, 9995, 13, 4706, 20504, 1230, 1650, 393, 20789, 6480, 278, 2446, 3407, 363, 278, 1494, 2943, 304, 1298, 472, 1857, 2943, 29889, 13, 13, 4706, 960, 4069, 1051, 313, 29875, 29889, 29872, 29889, 2343, 338, 6213, 29897, 736, 6213, 29889, 13, 4706, 960, 2323, 995, 1051, 313, 29875, 29889, 29872, 29889, 2343, 29889, 4622, 338, 6213, 29897, 736, 1051, 13, 4706, 960, 2999, 1819, 29892, 671, 937, 322, 1473, 3651, 304, 3787, 9282, 304, 7573, 393, 526, 22092, 943, 13, 4706, 584, 1853, 2343, 29901, 2391, 4247, 13, 4706, 584, 29878, 1853, 29901, 2391, 4247, 13, 4706, 9995, 13, 4706, 565, 2343, 338, 6213, 470, 2343, 29889, 4622, 338, 6213, 29901, 13, 9651, 736, 2343, 13, 13, 4706, 937, 353, 2343, 13, 4706, 1473, 353, 2343, 29889, 4622, 13, 4706, 2343, 29889, 4622, 353, 6213, 13, 13, 4706, 1550, 1473, 338, 451, 6213, 29901, 13, 9651, 2446, 29918, 3177, 353, 1583, 29889, 26276, 29898, 4102, 29892, 1473, 29897, 13, 9651, 937, 353, 1473, 13, 9651, 1473, 353, 2446, 29918, 3177, 13, 13, 4706, 736, 937, 13, 13, 1678, 822, 17945, 29898, 1311, 29892, 937, 29918, 3177, 29892, 1473, 29918, 3177, 1125, 13, 4706, 565, 1473, 29918, 3177, 338, 6213, 29901, 13, 9651, 736, 6213, 13, 13, 4706, 2446, 29918, 3177, 353, 1473, 29918, 3177, 29889, 4622, 13, 4706, 1473, 29918, 3177, 29889, 4622, 353, 937, 29918, 3177, 13, 13, 4706, 736, 2446, 29918, 3177, 13, 13, 1678, 822, 11837, 1293, 29906, 29898, 1311, 29892, 2343, 1125, 13, 4706, 736, 1583, 29889, 24244, 1293, 29906, 10739, 29898, 2813, 29892, 6213, 29897, 13, 13, 1678, 822, 11837, 1293, 29906, 10739, 29898, 1311, 29892, 2343, 29892, 2446, 29918, 2813, 1125, 13, 4706, 9995, 13, 4706, 3599, 25397, 1650, 988, 1014, 17199, 338, 18764, 292, 1051, 6257, 515, 9886, 7573, 29889, 13, 4706, 450, 18764, 287, 1051, 338, 278, 1857, 2943, 2381, 17280, 411, 11837, 310, 599, 9886, 7573, 29889, 13, 4706, 2343, 14637, 304, 1857, 2943, 322, 2446, 29918, 2813, 14637, 304, 825, 674, 10201, 367, 2343, 29889, 4622, 29889, 13, 13, 4706, 584, 1853, 2343, 29901, 2391, 4247, 13, 4706, 584, 29878, 1853, 29901, 2391, 4247, 13, 4706, 9995, 13, 13, 4706, 565, 2343, 338, 6213, 29901, 13, 9651, 736, 2446, 29918, 2813, 13, 13, 4706, 2446, 29918, 3177, 353, 2343, 29889, 4622, 13, 4706, 2343, 29889, 4622, 353, 2446, 29918, 2813, 13, 13, 4706, 736, 1583, 29889, 24244, 1293, 29906, 10739, 29898, 4622, 29918, 3177, 29892, 2343, 29897, 13, 2 ]
tests/stack_test.py
arthurlogilab/py_zipkin
225
3494
import mock import pytest import py_zipkin.storage @pytest.fixture(autouse=True, scope="module") def create_zipkin_attrs(): # The following tests all expect _thread_local.zipkin_attrs to exist: if it # doesn't, mock.patch will fail. py_zipkin.storage.ThreadLocalStack().get() def test_get_zipkin_attrs_returns_none_if_no_zipkin_attrs(): tracer = py_zipkin.storage.get_default_tracer() with mock.patch.object(tracer._context_stack, "_storage", []): assert not py_zipkin.storage.ThreadLocalStack().get() assert not py_zipkin.storage.ThreadLocalStack().get() def test_get_zipkin_attrs_with_context_returns_none_if_no_zipkin_attrs(): with mock.patch.object(py_zipkin.storage.log, "warning", autospec=True) as log: assert not py_zipkin.storage.Stack([]).get() assert log.call_count == 1 def test_storage_stack_still_works_if_you_dont_pass_in_storage(): # Let's make sure this still works if we don't pass in a custom storage. assert not py_zipkin.storage.Stack().get() def test_get_zipkin_attrs_returns_the_last_of_the_list(): tracer = py_zipkin.storage.get_default_tracer() with mock.patch.object(tracer._context_stack, "_storage", ["foo"]): assert "foo" == py_zipkin.storage.ThreadLocalStack().get() def test_get_zipkin_attrs_with_context_returns_the_last_of_the_list(): assert "foo" == py_zipkin.storage.Stack(["bar", "foo"]).get() def test_pop_zipkin_attrs_does_nothing_if_no_requests(): tracer = py_zipkin.storage.get_default_tracer() with mock.patch.object(tracer._context_stack, "_storage", []): assert not py_zipkin.storage.ThreadLocalStack().pop() def test_pop_zipkin_attrs_with_context_does_nothing_if_no_requests(): assert not py_zipkin.storage.Stack([]).pop() def test_pop_zipkin_attrs_removes_the_last_zipkin_attrs(): tracer = py_zipkin.storage.get_default_tracer() with mock.patch.object(tracer._context_stack, "_storage", ["foo", "bar"]): assert "bar" == py_zipkin.storage.ThreadLocalStack().pop() assert "foo" == py_zipkin.storage.ThreadLocalStack().get() def test_pop_zipkin_attrs_with_context_removes_the_last_zipkin_attrs(): context_stack = py_zipkin.storage.Stack(["foo", "bar"]) assert "bar" == context_stack.pop() assert "foo" == context_stack.get() def test_push_zipkin_attrs_adds_new_zipkin_attrs_to_list(): tracer = py_zipkin.storage.get_default_tracer() with mock.patch.object(tracer._context_stack, "_storage", ["foo"]): assert "foo" == py_zipkin.storage.ThreadLocalStack().get() py_zipkin.storage.ThreadLocalStack().push("bar") assert "bar" == py_zipkin.storage.ThreadLocalStack().get() def test_push_zipkin_attrs_with_context_adds_new_zipkin_attrs_to_list(): stack = py_zipkin.storage.Stack(["foo"]) assert "foo" == stack.get() stack.push("bar") assert "bar" == stack.get() def test_stack_copy(): stack = py_zipkin.storage.Stack() stack.push("a") stack.push("b") the_copy = stack.copy() the_copy.push("c") stack.push("d") assert ["a", "b", "c"] == the_copy._storage assert ["a", "b", "d"] == stack._storage
[ 1, 1053, 11187, 13, 5215, 11451, 1688, 13, 13, 5215, 11451, 29918, 7554, 9089, 29889, 12925, 13, 13, 13, 29992, 2272, 1688, 29889, 7241, 15546, 29898, 1300, 1709, 29922, 5574, 29892, 6874, 543, 5453, 1159, 13, 1753, 1653, 29918, 7554, 9089, 29918, 5552, 29879, 7295, 13, 1678, 396, 450, 1494, 6987, 599, 2149, 903, 7097, 29918, 2997, 29889, 7554, 9089, 29918, 5552, 29879, 304, 1863, 29901, 565, 372, 13, 1678, 396, 1838, 29915, 29873, 29892, 11187, 29889, 5041, 674, 4418, 29889, 13, 1678, 11451, 29918, 7554, 9089, 29889, 12925, 29889, 4899, 7717, 7264, 2141, 657, 580, 13, 13, 13, 1753, 1243, 29918, 657, 29918, 7554, 9089, 29918, 5552, 29879, 29918, 18280, 29918, 9290, 29918, 361, 29918, 1217, 29918, 7554, 9089, 29918, 5552, 29879, 7295, 13, 1678, 16703, 261, 353, 11451, 29918, 7554, 9089, 29889, 12925, 29889, 657, 29918, 4381, 29918, 29873, 945, 261, 580, 13, 1678, 411, 11187, 29889, 5041, 29889, 3318, 29898, 29873, 945, 261, 3032, 4703, 29918, 1429, 29892, 11119, 12925, 613, 5159, 1125, 13, 4706, 4974, 451, 11451, 29918, 7554, 9089, 29889, 12925, 29889, 4899, 7717, 7264, 2141, 657, 580, 13, 4706, 4974, 451, 11451, 29918, 7554, 9089, 29889, 12925, 29889, 4899, 7717, 7264, 2141, 657, 580, 13, 13, 13, 1753, 1243, 29918, 657, 29918, 7554, 9089, 29918, 5552, 29879, 29918, 2541, 29918, 4703, 29918, 18280, 29918, 9290, 29918, 361, 29918, 1217, 29918, 7554, 9089, 29918, 5552, 29879, 7295, 13, 1678, 411, 11187, 29889, 5041, 29889, 3318, 29898, 2272, 29918, 7554, 9089, 29889, 12925, 29889, 1188, 29892, 376, 27392, 613, 1120, 359, 3135, 29922, 5574, 29897, 408, 1480, 29901, 13, 4706, 4974, 451, 11451, 29918, 7554, 9089, 29889, 12925, 29889, 7264, 29898, 2636, 467, 657, 580, 13, 4706, 4974, 1480, 29889, 4804, 29918, 2798, 1275, 29871, 29896, 13, 13, 13, 1753, 1243, 29918, 12925, 29918, 1429, 29918, 303, 453, 29918, 13129, 29918, 361, 29918, 6293, 29918, 29881, 609, 29918, 3364, 29918, 262, 29918, 12925, 7295, 13, 1678, 396, 2803, 29915, 29879, 1207, 1854, 445, 1603, 1736, 565, 591, 1016, 29915, 29873, 1209, 297, 263, 2888, 8635, 29889, 13, 1678, 4974, 451, 11451, 29918, 7554, 9089, 29889, 12925, 29889, 7264, 2141, 657, 580, 13, 13, 13, 1753, 1243, 29918, 657, 29918, 7554, 9089, 29918, 5552, 29879, 29918, 18280, 29918, 1552, 29918, 4230, 29918, 974, 29918, 1552, 29918, 1761, 7295, 13, 1678, 16703, 261, 353, 11451, 29918, 7554, 9089, 29889, 12925, 29889, 657, 29918, 4381, 29918, 29873, 945, 261, 580, 13, 1678, 411, 11187, 29889, 5041, 29889, 3318, 29898, 29873, 945, 261, 3032, 4703, 29918, 1429, 29892, 11119, 12925, 613, 6796, 5431, 3108, 1125, 13, 4706, 4974, 376, 5431, 29908, 1275, 11451, 29918, 7554, 9089, 29889, 12925, 29889, 4899, 7717, 7264, 2141, 657, 580, 13, 13, 13, 1753, 1243, 29918, 657, 29918, 7554, 9089, 29918, 5552, 29879, 29918, 2541, 29918, 4703, 29918, 18280, 29918, 1552, 29918, 4230, 29918, 974, 29918, 1552, 29918, 1761, 7295, 13, 1678, 4974, 376, 5431, 29908, 1275, 11451, 29918, 7554, 9089, 29889, 12925, 29889, 7264, 29898, 3366, 1646, 613, 376, 5431, 3108, 467, 657, 580, 13, 13, 13, 1753, 1243, 29918, 7323, 29918, 7554, 9089, 29918, 5552, 29879, 29918, 13221, 29918, 28450, 29918, 361, 29918, 1217, 29918, 24830, 7295, 13, 1678, 16703, 261, 353, 11451, 29918, 7554, 9089, 29889, 12925, 29889, 657, 29918, 4381, 29918, 29873, 945, 261, 580, 13, 1678, 411, 11187, 29889, 5041, 29889, 3318, 29898, 29873, 945, 261, 3032, 4703, 29918, 1429, 29892, 11119, 12925, 613, 5159, 1125, 13, 4706, 4974, 451, 11451, 29918, 7554, 9089, 29889, 12925, 29889, 4899, 7717, 7264, 2141, 7323, 580, 13, 13, 13, 1753, 1243, 29918, 7323, 29918, 7554, 9089, 29918, 5552, 29879, 29918, 2541, 29918, 4703, 29918, 13221, 29918, 28450, 29918, 361, 29918, 1217, 29918, 24830, 7295, 13, 1678, 4974, 451, 11451, 29918, 7554, 9089, 29889, 12925, 29889, 7264, 29898, 2636, 467, 7323, 580, 13, 13, 13, 1753, 1243, 29918, 7323, 29918, 7554, 9089, 29918, 5552, 29879, 29918, 1745, 586, 267, 29918, 1552, 29918, 4230, 29918, 7554, 9089, 29918, 5552, 29879, 7295, 13, 1678, 16703, 261, 353, 11451, 29918, 7554, 9089, 29889, 12925, 29889, 657, 29918, 4381, 29918, 29873, 945, 261, 580, 13, 1678, 411, 11187, 29889, 5041, 29889, 3318, 29898, 29873, 945, 261, 3032, 4703, 29918, 1429, 29892, 11119, 12925, 613, 6796, 5431, 613, 376, 1646, 3108, 1125, 13, 4706, 4974, 376, 1646, 29908, 1275, 11451, 29918, 7554, 9089, 29889, 12925, 29889, 4899, 7717, 7264, 2141, 7323, 580, 13, 4706, 4974, 376, 5431, 29908, 1275, 11451, 29918, 7554, 9089, 29889, 12925, 29889, 4899, 7717, 7264, 2141, 657, 580, 13, 13, 13, 1753, 1243, 29918, 7323, 29918, 7554, 9089, 29918, 5552, 29879, 29918, 2541, 29918, 4703, 29918, 1745, 586, 267, 29918, 1552, 29918, 4230, 29918, 7554, 9089, 29918, 5552, 29879, 7295, 13, 1678, 3030, 29918, 1429, 353, 11451, 29918, 7554, 9089, 29889, 12925, 29889, 7264, 29898, 3366, 5431, 613, 376, 1646, 20068, 13, 1678, 4974, 376, 1646, 29908, 1275, 3030, 29918, 1429, 29889, 7323, 580, 13, 1678, 4974, 376, 5431, 29908, 1275, 3030, 29918, 1429, 29889, 657, 580, 13, 13, 13, 1753, 1243, 29918, 5910, 29918, 7554, 9089, 29918, 5552, 29879, 29918, 1202, 29879, 29918, 1482, 29918, 7554, 9089, 29918, 5552, 29879, 29918, 517, 29918, 1761, 7295, 13, 1678, 16703, 261, 353, 11451, 29918, 7554, 9089, 29889, 12925, 29889, 657, 29918, 4381, 29918, 29873, 945, 261, 580, 13, 1678, 411, 11187, 29889, 5041, 29889, 3318, 29898, 29873, 945, 261, 3032, 4703, 29918, 1429, 29892, 11119, 12925, 613, 6796, 5431, 3108, 1125, 13, 4706, 4974, 376, 5431, 29908, 1275, 11451, 29918, 7554, 9089, 29889, 12925, 29889, 4899, 7717, 7264, 2141, 657, 580, 13, 4706, 11451, 29918, 7554, 9089, 29889, 12925, 29889, 4899, 7717, 7264, 2141, 5910, 703, 1646, 1159, 13, 4706, 4974, 376, 1646, 29908, 1275, 11451, 29918, 7554, 9089, 29889, 12925, 29889, 4899, 7717, 7264, 2141, 657, 580, 13, 13, 13, 1753, 1243, 29918, 5910, 29918, 7554, 9089, 29918, 5552, 29879, 29918, 2541, 29918, 4703, 29918, 1202, 29879, 29918, 1482, 29918, 7554, 9089, 29918, 5552, 29879, 29918, 517, 29918, 1761, 7295, 13, 1678, 5096, 353, 11451, 29918, 7554, 9089, 29889, 12925, 29889, 7264, 29898, 3366, 5431, 20068, 13, 1678, 4974, 376, 5431, 29908, 1275, 5096, 29889, 657, 580, 13, 1678, 5096, 29889, 5910, 703, 1646, 1159, 13, 1678, 4974, 376, 1646, 29908, 1275, 5096, 29889, 657, 580, 13, 13, 13, 1753, 1243, 29918, 1429, 29918, 8552, 7295, 13, 1678, 5096, 353, 11451, 29918, 7554, 9089, 29889, 12925, 29889, 7264, 580, 13, 1678, 5096, 29889, 5910, 703, 29874, 1159, 13, 1678, 5096, 29889, 5910, 703, 29890, 1159, 13, 13, 1678, 278, 29918, 8552, 353, 5096, 29889, 8552, 580, 13, 1678, 278, 29918, 8552, 29889, 5910, 703, 29883, 1159, 13, 13, 1678, 5096, 29889, 5910, 703, 29881, 1159, 13, 13, 1678, 4974, 6796, 29874, 613, 376, 29890, 613, 376, 29883, 3108, 1275, 278, 29918, 8552, 3032, 12925, 13, 1678, 4974, 6796, 29874, 613, 376, 29890, 613, 376, 29881, 3108, 1275, 5096, 3032, 12925, 13, 2 ]
Taller de Estrucuras de Control Repeticion/Punto01.py
Ricardoppp/Talleres_De_Algoritmos_Ricardo
0
41759
#punto 1 #entradas n=int(input("Escriba el primer digito ")) k=int(input("Escriba el primer digito ")) #caja negra y salidas while True: n=0 if(k<n): n=n-1 print(n) elif(n==k): print(k) break
[ 1, 396, 29886, 12578, 29871, 29896, 13, 29937, 296, 3665, 294, 29871, 13, 29876, 29922, 524, 29898, 2080, 703, 29923, 7588, 2291, 560, 7130, 4697, 2049, 376, 876, 13, 29895, 29922, 524, 29898, 2080, 703, 29923, 7588, 2291, 560, 7130, 4697, 2049, 376, 876, 13, 29937, 1113, 1764, 3480, 336, 343, 4497, 8817, 13, 8000, 5852, 29901, 13, 1678, 302, 29922, 29900, 13, 1678, 565, 29898, 29895, 29966, 29876, 1125, 13, 4706, 302, 29922, 29876, 29899, 29896, 13, 4706, 1596, 29898, 29876, 29897, 13, 1678, 25342, 29898, 29876, 1360, 29895, 1125, 13, 4706, 1596, 29898, 29895, 29897, 13, 1678, 2867, 2 ]
Solutions/Problem7.py
igerry/ProjectEulerInPython
0
109766
<gh_stars>0 #!/usr/bin/python class Problem7: ''' 10001st prime Problem 7 104743 By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13. What is the 10 001st prime number? ''' def solution(self): primes = [] nextPrime = 2 for i in range(10001): print('%d, %d' % (i, nextPrime)) nextPrime = self.getNextPrime(primes) return nextPrime def getNextPrime(self, primes): if (len(primes) == 0): primes.append(2) return 2 if (len(primes) == 1): primes.append(3) return 3 findNewPrime = False nextPrime = primes[-1] + 2 while not findNewPrime: findNewPrime = True for i in primes: if not nextPrime % i: findNewPrime = False break if (findNewPrime): primes.append(nextPrime) break nextPrime += 2 return nextPrime p = Problem7() print(p.solution())
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 14708, 4855, 29914, 2109, 29914, 4691, 13, 13, 1990, 11583, 29955, 29901, 13, 1678, 14550, 13, 268, 29896, 29900, 29900, 29900, 29896, 303, 6019, 13, 1678, 11583, 29871, 29955, 13, 268, 29896, 29900, 29946, 29955, 29946, 29941, 13, 13, 1678, 2648, 18028, 278, 937, 4832, 6019, 3694, 29901, 29871, 29906, 29892, 29871, 29941, 29892, 29871, 29945, 29892, 29871, 29955, 29892, 29871, 29896, 29896, 29892, 322, 29871, 29896, 29941, 29892, 591, 508, 1074, 393, 278, 29871, 29953, 386, 6019, 338, 29871, 29896, 29941, 29889, 13, 1678, 1724, 338, 278, 29871, 29896, 29900, 29871, 29900, 29900, 29896, 303, 6019, 1353, 29973, 13, 1678, 14550, 13, 13, 1678, 822, 1650, 29898, 1311, 1125, 13, 4706, 544, 1355, 353, 5159, 13, 4706, 2446, 4040, 603, 353, 29871, 29906, 13, 4706, 363, 474, 297, 3464, 29898, 29896, 29900, 29900, 29900, 29896, 1125, 13, 9651, 1596, 877, 29995, 29881, 29892, 1273, 29881, 29915, 1273, 313, 29875, 29892, 2446, 4040, 603, 876, 13, 9651, 2446, 4040, 603, 353, 1583, 29889, 657, 9190, 4040, 603, 29898, 558, 1355, 29897, 13, 4706, 736, 2446, 4040, 603, 13, 13, 1678, 822, 679, 9190, 4040, 603, 29898, 1311, 29892, 544, 1355, 1125, 13, 4706, 565, 313, 2435, 29898, 558, 1355, 29897, 1275, 29871, 29900, 1125, 13, 9651, 544, 1355, 29889, 4397, 29898, 29906, 29897, 13, 9651, 736, 29871, 29906, 13, 13, 4706, 565, 313, 2435, 29898, 558, 1355, 29897, 1275, 29871, 29896, 1125, 13, 9651, 544, 1355, 29889, 4397, 29898, 29941, 29897, 13, 9651, 736, 29871, 29941, 13, 13, 4706, 1284, 4373, 4040, 603, 353, 7700, 13, 4706, 2446, 4040, 603, 353, 544, 1355, 14352, 29896, 29962, 718, 29871, 29906, 13, 4706, 1550, 451, 1284, 4373, 4040, 603, 29901, 13, 9651, 1284, 4373, 4040, 603, 353, 5852, 13, 9651, 363, 474, 297, 544, 1355, 29901, 13, 18884, 565, 451, 2446, 4040, 603, 1273, 474, 29901, 13, 462, 1678, 1284, 4373, 4040, 603, 353, 7700, 13, 462, 1678, 2867, 13, 965, 13, 9651, 565, 313, 2886, 4373, 4040, 603, 1125, 13, 18884, 544, 1355, 29889, 4397, 29898, 4622, 4040, 603, 29897, 13, 18884, 2867, 13, 632, 13, 9651, 2446, 4040, 603, 4619, 29871, 29906, 13, 13, 4706, 736, 2446, 4040, 603, 13, 13, 29886, 353, 11583, 29955, 580, 13, 2158, 29898, 29886, 29889, 2929, 918, 3101, 2 ]
text/color/__init__.py
jedhsu/text
0
43781
""" *graphical color* Spectral color measures. """ # from ._color import Color # from ._rgb import Rgba # from ._hsv import Hsba __all__ = [ "Color", "Rgba", "Hsba", ]
[ 1, 9995, 13, 13, 1678, 334, 4262, 936, 2927, 29930, 13, 13, 29871, 27738, 1705, 2927, 15366, 29889, 13, 13, 15945, 29908, 13, 13, 29937, 515, 869, 29918, 2780, 1053, 9159, 13, 13, 29937, 515, 869, 29918, 23973, 1053, 390, 29887, 2291, 13, 29937, 515, 869, 29918, 29882, 4501, 1053, 379, 29879, 2291, 13, 13, 1649, 497, 1649, 353, 518, 13, 1678, 376, 3306, 613, 13, 1678, 376, 29934, 29887, 2291, 613, 13, 1678, 376, 29950, 29879, 2291, 613, 13, 29962, 13, 2 ]
perses/samplers/__init__.py
schallerdavid/perses
99
28150
from perses.samplers.samplers import *
[ 1, 515, 3736, 267, 29889, 13445, 572, 414, 29889, 13445, 572, 414, 1053, 334, 13, 2 ]
CL_Net/Referential_Game/Number_Set/teacher.py
MarkFzp/ToM-Pragmatics
0
66860
import os import math import numpy as np import tensorflow as tf from concept import Concept import pdb np.set_printoptions(precision=5, suppress=True) class Teacher: def __init__(self, sess, rl_gamma, boltzman_beta, belief_var_1d, num_distractors, attributes_size, message_space_size): self.sess = sess self.num_distractors_ = num_distractors self.attributes_size_ = attributes_size self.message_space_size_ = message_space_size self.rl_gamma_ = rl_gamma self.boltzman_beta_ = boltzman_beta self.belief_var_1d_ = belief_var_1d ################ # Placeholders # ################ with tf.variable_scope('Teacher'): self.distractors_ = tf.placeholder(tf.float32, name = 'distractors', shape = [None, self.num_distractors_, self.attributes_size_]) self.distractors_tensor_ = tf.expand_dims(self.distractors_, 2) self.message_ = tf.placeholder(tf.float32, shape = [None, self.message_space_size_], name = 'message') self.teacher_belief_ = tf.placeholder(tf.float32, shape = [None, self.num_distractors_], name = 'teacher_belief') self.student_belief_ = tf.placeholder(tf.float32, shape = [None, self.num_distractors_], name = 'student_belief') self.student_belief_spvs_ = tf.placeholder(tf.float32, shape = [None, self.num_distractors_], name = 'student_belief_spvs') self.q_net_spvs_ = tf.placeholder(tf.float32, shape = [None]) ######################## # Belief Update Module # ######################## self.belief_update_opt_ = tf.train.AdamOptimizer(learning_rate = 1e-3) with tf.variable_scope('Belief_Update'): self.df1_ = tf.layers.conv2d(self.distractors_tensor_, 3 * self.message_space_size_, kernel_size = [1, 1], kernel_initializer = tf.random_normal_initializer(mean = 0.0, stddev = 1), activation = tf.nn.leaky_relu) self.df2_ = tf.layers.conv2d(self.df1_, 3 * self.message_space_size_, kernel_size = [1, 1], kernel_initializer = tf.random_normal_initializer(mean = 0.0, stddev = 1e-1), activation = tf.nn.leaky_relu) # self.df3_ = tf.layers.conv2d(self.df2_, 1 * self.message_space_size_, kernel_size = [1, 1], # kernel_initializer = tf.random_normal_initializer(mean = 0.0, stddev = 1e-2), # activation = None) self.msg_from_df_1_ = [] for _ in range(self.num_distractors_): self.msg_from_df_1_.append(tf.layers.conv2d(self.df2_, 2 * self.message_space_size_, kernel_size = [self.num_distractors_, 1], kernel_initializer = tf.random_normal_initializer(mean = 0.0, stddev = 1e-1), padding = 'valid', activation = tf.nn.leaky_relu)) self.msg_est_tensor_1_ = tf.concat(self.msg_from_df_1_, axis = 1) self.msg_from_df_2_ = [] for _ in range(self.num_distractors_): self.msg_from_df_2_.append(tf.layers.conv2d(self.msg_est_tensor_1_, 1 * self.message_space_size_, kernel_size = [self.num_distractors_, 1], kernel_initializer = tf.random_normal_initializer(mean = 0.0, stddev = 1e-2), padding = 'valid', activation = None)) self.msg_est_tensor_2_ = tf.concat(self.msg_from_df_2_, axis = 1) self.reg_varlist_ = [v for v in tf.get_collection(tf.GraphKeys.TRAINABLE_VARIABLES) if v.name.startswith('Belief')] ####################### #network belief update# ####################### self.msg_est_tensor_2d_ = tf.squeeze(self.msg_est_tensor_2_, axis = 2) self.belief_var_1d_ = tf.exp(tf.Variable(initial_value = self.belief_var_1d_, trainable = True, dtype = tf.float32)) # self.belief_var_ = tf.layers.conv2d(self.msg_est_tensor_3_, 1, kernel_size = [self.num_distractors_, 1], # kernel_initializer = tf.random_normal_initializer(mean = 0.0, stddev = 1e-3), # padding = 'valid', activation = None) # self.belief_var_1d_ = tf.squeeze(self.belief_var_, axis = 2) self.boltzman_beta_ = tf.Variable(initial_value = self.boltzman_beta_, trainable = False, dtype = tf.float32, name = 'boltzman_beta') self.msg_indices_ = tf.where(tf.not_equal(self.message_, 0)) self.df_msg_match_ = tf.exp(self.boltzman_beta_ * self.msg_est_tensor_2d_) self.df_msg_match_norm_ = tf.div_no_nan(self.df_msg_match_, tf.reduce_sum(self.df_msg_match_, axis = 2, keepdims = True)) self.df_msg_2_norm_ = tf.gather_nd(tf.transpose(self.df_msg_match_norm_, perm = [0, 2, 1]), self.msg_indices_) #self.df_msg_1_ = tf.multiply(self.dfb_merge_pre_3_, tf.expand_dims(tf.expand_dims(self.message_, 1), 1)) #self.df_msg_2_ = tf.exp(self.boltzman_beta_ * tf.reduce_sum(tf.squeeze(self.df_msg_1_, 2), axis = 2)) #self.df_msg_2_norm_ = tf.nn.relu(self.df_msg_2_ + self.belief_var_1_) self.belief_pred_1_ = tf.multiply(self.df_msg_2_norm_, self.student_belief_) self.belief_pred_full_ = tf.concat([self.belief_pred_1_, self.belief_var_1d_ * tf.slice(tf.ones_like(self.belief_pred_1_), [0, 0], [-1, 1])], axis = 1) ####################### #network belief update# ####################### ''' ###################### #kernel belief update# ###################### self.kernel_columns_ = [] for i in range(self.num_distractors_): self.df_msg_1_ = tf.multiply(self.msg_est_tensor_2_, tf.expand_dims(tf.expand_dims(self.message_, 1), 1)) self.df_msg_2_ = tf.contrib.layers.fully_connected(tf.layers.flatten(self.df_msg_1_),\ 2 * self.num_distractors_, activation_fn = tf.nn.leaky_relu) self.df_msg_3_ = tf.contrib.layers.fully_connected(self.df_msg_2_, self.num_distractors_, activation_fn = None) kernel_column = tf.nn.relu(self.df_msg_3_) self.kernel_columns_.append(tf.expand_dims(tf.div_no_nan(kernel_column, tf.reduce_sum(kernel_column, axis = 1, keepdims = True)), -1)) self.kernel_pre_norm_ = tf.no_op() self.kernel_ = tf.concat(self.kernel_columns_, axis = 2) print('<Belief Update Kernel Generator Constructed>') self.belief_pred_ = tf.nn.relu(tf.squeeze(tf.matmul(self.kernel_, tf.expand_dims(self.student_belief_, -1)), -1)) ###################### #kernel belief update# ###################### ''' self.belief_pred_full_norm_ = tf.div_no_nan(self.belief_pred_full_, tf.reduce_sum(self.belief_pred_full_, axis = 1, keepdims = True)) self.belief_pred_ = tf.slice(self.belief_pred_full_norm_, [0, 0], [-1, self.num_distractors_]) self.regularization_ = 1e-4 * tf.add_n([ tf.nn.l2_loss(v) for v in self.reg_varlist_ if 'bias' not in v.name ]) self.cross_entropy_1_ = -1 * tf.reduce_mean(tf.reduce_sum(tf.multiply(self.student_belief_spvs_, tf.math.log(self.belief_pred_)), axis = 1)) self.cross_entropy_2_ = -1 * tf.reduce_mean(tf.reduce_sum(tf.multiply(self.belief_pred_, tf.math.log(self.student_belief_spvs_ + 1e-9)), axis = 1)) self.cross_entropy_ = self.cross_entropy_1_ + self.cross_entropy_2_ + self.regularization_ self.belief_train_varlist_ = [v for v in tf.get_collection(tf.GraphKeys.TRAINABLE_VARIABLES) if v.name.startswith('Belief_Update')] self.belief_update_varlist_ = [v for v in tf.get_collection(tf.GraphKeys.GLOBAL_VARIABLES) if v.name.startswith('Belief_Update')] self.belief_update_train_op_ = self.belief_update_opt_.minimize(self.cross_entropy_, var_list = self.belief_train_varlist_) self.belief_update_saver_ = tf.train.Saver() self.belief_update_loader_ = tf.train.Saver(self.belief_update_varlist_) #################### # Q-network Module # #################### self.q_net_opt_ = tf.train.AdamOptimizer(learning_rate = 1e-5) with tf.variable_scope('q_net'): self.distct_feat_1_ = tf.layers.conv2d(self.distractors_tensor_, 3 * self.message_space_size_, kernel_size = [1, 1], kernel_initializer = tf.random_normal_initializer(mean = 0.0, stddev = 1e-1), activation = tf.nn.leaky_relu) self.distct_feat_2_ = tf.layers.conv2d(self.distct_feat_1_, 2 * self.message_space_size_, kernel_size = [1, 1], kernel_initializer = tf.random_normal_initializer(mean = 0.0, stddev = 1e-1), activation = tf.nn.leaky_relu) self.distct_feat_2_weighted_ = tf.multiply(self.distct_feat_2_, tf.expand_dims(tf.expand_dims(self.belief_pred_, -1), -1)) self.distcts_feat_1_ = [] for _ in range(self.num_distractors_): self.distcts_feat_1_.append(tf.layers.conv2d(self.distct_feat_2_weighted_, 1 * self.message_space_size_, kernel_size = [self.num_distractors_, 1], kernel_initializer = tf.random_normal_initializer(mean = 0.0, stddev = 1e-1), padding = 'valid', activation = tf.nn.leaky_relu)) self.distcts_feat_tensor_1_ = tf.concat(self.distcts_feat_1_, axis = 1) self.distcts_feat_2_ = [] for _ in range(self.num_distractors_): self.distcts_feat_2_.append(tf.layers.conv2d(self.distcts_feat_tensor_1_, 1 * self.message_space_size_, kernel_size = [self.num_distractors_, 1], kernel_initializer = tf.random_normal_initializer(mean = 0.0, stddev = 1e-1), padding = 'valid', activation = tf.nn.leaky_relu)) self.distcts_feat_tensor_2_ = tf.concat(self.distcts_feat_2_, axis = 1) self.custome_activaiton_ = lambda x: tf.where(tf.math.greater(x, 0), (tf.exp(x) - 1), (-1 * tf.exp(-x) + 1)) self.distcts_feat_3_ = [] for _ in range(self.num_distractors_): self.distcts_feat_3_.append(tf.layers.conv2d(self.distcts_feat_tensor_2_, 1, kernel_size = [self.num_distractors_, 1], kernel_initializer = tf.random_normal_initializer(mean = 0.0, stddev = 1e-1), padding = 'valid', activation = self.custome_activaiton_)) self.distcts_feat_tensor_3_ = tf.concat(self.distcts_feat_3_, axis = 1) self.value_param_1_ = tf.Variable(initial_value = -1, trainable = False, dtype = tf.float32) self.value_ = tf.reduce_sum(tf.multiply(tf.squeeze(self.distcts_feat_tensor_3_), self.teacher_belief_), axis = 1) +\ (1 - tf.reduce_sum(self.belief_pred_, axis = 1)) * self.value_param_1_ ''' self.df_b1_ = tf.multiply(tf.squeeze(self.distct_feat_2_, axis = 2), tf.expand_dims(self.teacher_belief_, -1)) self.df_b2_ = tf.multiply(tf.squeeze(self.distct_feat_2_, axis = 2), tf.expand_dims(self.belief_pred_, -1)) self.concat_df_b_ = tf.layers.flatten(tf.concat((self.df_b1_, self.df_b2_), axis = 2)) # self.dfb_merge_pre_ = tf.contrib.layers.fully_connected(tf.reduce_sum(tf.abs(self.df_b1_ - self.df_b2_), axis = 1), 4, activation_fn = tf.nn.leaky_relu, # weights_initializer = tf.random_normal_initializer(mean = 0.0, stddev = 1e-2)) self.dfb_merge_pre_1_ = tf.contrib.layers.fully_connected(self.concat_df_b_, 6, activation_fn = tf.nn.leaky_relu, weights_initializer = tf.random_normal_initializer(mean = 0.0, stddev = 1e-2)) self.dfb_merge_pre_2_ = tf.contrib.layers.fully_connected(self.dfb_merge_pre_1_, 4, activation_fn = tf.nn.leaky_relu, weights_initializer = tf.random_normal_initializer(mean = 0.0, stddev = 1e-2)) self.dfb_merge_ = tf.contrib.layers.fully_connected(self.dfb_merge_pre_2_, 1, activation_fn = None, weights_initializer = tf.random_normal_initializer(mean = 0.0, stddev = 1e-2)) self.value_ = tf.squeeze(self.dfb_merge_) ''' # self.dfb_merge_ = tf.reduce_sum(tf.square(self.df_b1_ - self.df_b2_), axis = [1, 2]) # self.value_param_0_ = tf.squeeze(tf.contrib.layers.fully_connected(self.concat_df_b_, 1, activation_fn = None)) # self.value_param_00_ = tf.squeeze(tf.contrib.layers.fully_connected(self.dfb_merge_pre_1_, 1, activation_fn = None)) # self.value_param_000_ = tf.squeeze(tf.contrib.layers.fully_connected(self.dfb_merge_pre_1_, 1, activation_fn = None)) # self.value_param_0000_ = tf.squeeze(tf.contrib.layers.fully_connected(self.dfb_merge_pre_1_, 1, activation_fn = None)) # self.value_param_1_ = tf.Variable(initial_value = -1, trainable = True, dtype = tf.float32) # self.value_param_2_ = tf.Variable(initial_value = 1, trainable = True, dtype = tf.float32) # self.value_param_3_ = tf.Variable(initial_value = -1, trainable = True, dtype = tf.float32) #self.value_param_2_ * tf.exp(self.value_param_1_ * tf.squeeze(self.dfb_merge_)) + self.value_param_3_ #self.value_ = 1 - tf.squeeze(tf.contrib.layers.fully_connected(tf.reduce_sum(self.df_b1_ - self.df_b2_, axis = 2), 1, activation_fn = None)) self.reg_varlist_q_ = [v for v in tf.get_collection(tf.GraphKeys.TRAINABLE_VARIABLES) if v.name.startswith('q_net')] self.regularization_q_ = 1e-4 * tf.add_n([ tf.nn.l2_loss(v) for v in self.reg_varlist_q_ if 'bias' not in v.name ]) self.q_net_loss_pre_ = tf.square(self.value_ - self.q_net_spvs_) self.success_mask_ = tf.to_float(tf.math.greater(self.q_net_spvs_, 0.0)) self.fail_mask_ = tf.to_float(tf.math.greater(0.0, self.q_net_spvs_)) self.imbalance_penalty_ = self.success_mask_ + self.fail_mask_ * tf.div_no_nan(tf.reduce_sum(self.success_mask_), tf.reduce_sum(self.fail_mask_)) #self.q_net_loss_ = tf.reduce_mean(self.q_net_loss_pre_ * tf.to_float(self.q_net_loss_pre_ > 0.05) * self.imbalance_penalty_) + self.regularization_q_ self.q_net_loss_ = tf.reduce_mean(self.q_net_loss_pre_ * self.imbalance_penalty_) + self.regularization_q_ self.q_net_varlist_ = [v for v in tf.get_collection(tf.GraphKeys.TRAINABLE_VARIABLES) if v.name.startswith('q_net')] self.q_net_train_op_ = self.q_net_opt_.minimize(self.q_net_loss_, var_list = self.q_net_varlist_) self.total_loader_ = tf.train.Saver([v for v in tf.get_collection(tf.GraphKeys.GLOBAL_VARIABLES) if 'Adam' not in v.name]) self.total_saver_ = tf.train.Saver() def train_belief_update(self, data_batch): _, cross_entropy, belief_pred, posterior, likelihood = self.sess.run([self.belief_update_train_op_, self.cross_entropy_, self.belief_pred_, self.belief_pred_1_, self.df_msg_2_norm_], feed_dict = {self.student_belief_: data_batch['prev_belief'], self.message_: data_batch['message'], self.distractors_: data_batch['distractors'], self.student_belief_spvs_: data_batch['new_belief']}) return cross_entropy, belief_pred, posterior[:10], likelihood[:10] def pretrain_bayesian_belief_update(self, concept_generator, teacher_pretraining_steps, teacher_pretrain_batch_size, teacher_pretrain_ckpt_dir, teacher_pretrain_ckpt_name, continue_steps = 0, silent = False): if not os.path.exists(teacher_pretrain_ckpt_dir): os.makedirs(teacher_pretrain_ckpt_dir) ckpt = tf.train.get_checkpoint_state(teacher_pretrain_ckpt_dir) train_steps = teacher_pretraining_steps if ckpt: self.belief_update_loader_.restore(self.sess, ckpt.model_checkpoint_path) print('Loaded teacher belief update ckpt from %s' % teacher_pretrain_ckpt_dir) train_steps = continue_steps else: print('Cannot loaded teacher belief update ckpt from %s' % teacher_pretrain_ckpt_dir) accuracies = [] l1_diffs = [] bayesian_wrongs = [] for ts in range(train_steps): data_batch = concept_generator.generate_batch(teacher_pretrain_batch_size) cross_entropy, belief_pred, posterior, likelihood = self.train_belief_update(data_batch) l1_diff = np.sum(abs(belief_pred - data_batch['new_belief']), axis = 1) correct = (l1_diff <= 5e-2) bayesian_wrong = np.mean(np.sum((data_batch['new_belief'] == 0) * (belief_pred > 1e-5), axis = 1) > 0) accuracies.append(np.mean(correct)) l1_diffs.append(np.mean(l1_diff)) bayesian_wrongs.append(bayesian_wrong) if np.sum(np.isnan(belief_pred)) != 0: pdb.set_trace() if ts % 1000 == 0 and not silent: print('[T%d] batch mean cross entropy: %f, mean accuracies: %f, mean l1: %f, bayesian wrong: %f'\ % (ts + 1, cross_entropy, np.mean(accuracies), np.mean(l1_diffs), np.mean(bayesian_wrongs))) boltzman_beta, belief_var_1d = self.sess.run([self.boltzman_beta_, self.belief_var_1d_]) print('boltzman_beta: %f, belief_var_1d: %f' % (boltzman_beta, belief_var_1d)) print('new_belief: ') print(data_batch['new_belief'][:10]) print('prior: ') print(data_batch['prev_belief'][:10]) print('likelihood: ') print(likelihood) print('posterior: ') print(posterior) print('predict_belief: ') print(belief_pred[:10]) if np.mean(accuracies) > 0.9: #idx = np.random.randint(teacher_pretrain_batch_size) idx = teacher_pretrain_batch_size for i in range(idx): print('\t target:', data_batch['new_belief'][i, :]) print('\t predict', belief_pred[i, :]) accuracies = [] l1_diffs = [] bayesian_wrongs = [] if (ts + 1) % 10000 == 0: self.belief_update_saver_.save(self.sess, os.path.join(teacher_pretrain_ckpt_dir, teacher_pretrain_ckpt_name), global_step = teacher_pretraining_steps) print('Saved teacher belief update ckpt to %s after %d training'\ % (teacher_pretrain_ckpt_dir, ts)) if train_steps != 0: self.belief_update_saver_.save(self.sess, os.path.join(teacher_pretrain_ckpt_dir, teacher_pretrain_ckpt_name), global_step = teacher_pretraining_steps) print('Saved teacher belief update ckpt to %s after %d training'\ % (teacher_pretrain_ckpt_dir, train_steps)) def train_q_net(self, data_batch): _, q_net_loss, value = self.sess.run([self.q_net_train_op_, self.q_net_loss_, self.value_],\ feed_dict = {self.q_net_spvs_: data_batch['target_q'], self.student_belief_: data_batch['student_belief'], self.message_: data_batch['message'], self.distractors_: data_batch['distractors'], self.teacher_belief_: data_batch['teacher_belief']}) print('Q learning loss: %f' % q_net_loss) ridx = np.random.randint(value.shape[0]) #print(value[ridx], data_batch['target_q'][ridx]) print('0.8: %f, 0.2: %f' % (np.sum(value * (data_batch['target_q'] == 0.8)) / np.sum(data_batch['target_q'] == 0.8), np.sum(value * (data_batch['target_q'] == -0.2)) / np.sum(data_batch['target_q'] == -0.2))) print('Teacher value est:', value[ridx: ridx + 10], data_batch['target_q'][ridx: ridx + 10]) #print(distcts_feat_tensor_3[ridx, :]) return q_net_loss def get_q_value_for_all_msg(self, teacher_belief, student_belief, embeded_concepts): all_msg_embeddings = np.identity(self.message_space_size_) teacher_belief_tile = np.tile(teacher_belief, (self.message_space_size_, 1)) student_belief_tile = np.tile(student_belief, (self.message_space_size_, 1)) embeded_concepts_tile = np.tile(embeded_concepts, (self.message_space_size_, 1, 1)) q_values, belief_pred, distcts_feat_tensor_3, belief_dst, msg_est_tensor = self.sess.run([self.value_, self.belief_pred_, self.distcts_feat_tensor_3_, self.value_, self.msg_est_tensor_2_], feed_dict = {self.distractors_: embeded_concepts_tile, self.message_: all_msg_embeddings, self.teacher_belief_: teacher_belief_tile, self.student_belief_: student_belief_tile}) return q_values, belief_pred, distcts_feat_tensor_3, belief_dst, msg_est_tensor[0] def update_net(self, belief_update_tuples, q_learning_tuples, update_term = 'Both'): debug_structure = {} belief_update_batch = {} belief_update_batch['prev_belief'] = [] belief_update_batch['new_belief'] = [] belief_update_batch['message'] = [] belief_update_batch['distractors'] = [] for belief_tuple in belief_update_tuples: belief_update_batch['distractors'].append(belief_tuple[0]) belief_update_batch['prev_belief'].append(belief_tuple[1]) belief_update_batch['message'].append(belief_tuple[2]) belief_update_batch['new_belief'].append(belief_tuple[3]) for k in belief_update_batch: belief_update_batch[k] = np.array(belief_update_batch[k]) if update_term == 'Both' or update_term == 'Belief': cross_entropy, belief_pred = self.train_belief_update(belief_update_batch) print('Teacher\'s belief esimate cross_entropy: %f' % cross_entropy) debug_structure['teacher_belief_prediction'] = belief_pred q_learning_batch = {} q_learning_batch['student_belief'] = [] q_learning_batch['teacher_belief'] = [] q_learning_batch['message'] = [] q_learning_batch['distractors'] = [] q_learning_batch['target_q'] = [] for q_learning_tuple in q_learning_tuples: q_learning_batch['distractors'].append(q_learning_tuple[0]) q_learning_batch['student_belief'].append(q_learning_tuple[1]) q_learning_batch['teacher_belief'].append(q_learning_tuple[2]) q_learning_batch['message'].append(q_learning_tuple[3]) q_learning_batch['target_q'].append(q_learning_tuple[4]) for k in q_learning_batch: q_learning_batch[k] = np.array(q_learning_batch[k]) if update_term == 'Both' or update_term == 'Q-Net': q_net_loss = self.train_q_net(q_learning_batch) return debug_structure if __name__ == '__main__': main()
[ 1, 1053, 2897, 13, 5215, 5844, 13, 5215, 12655, 408, 7442, 13, 5215, 26110, 408, 15886, 13, 13, 3166, 6964, 1053, 1281, 1547, 13, 5215, 282, 2585, 13, 9302, 29889, 842, 29918, 558, 8941, 1980, 29898, 17990, 2459, 29922, 29945, 29892, 21301, 29922, 5574, 29897, 13, 13, 1990, 1920, 11665, 29901, 13, 12, 1753, 4770, 2344, 12035, 1311, 29892, 27937, 29892, 364, 29880, 29918, 4283, 29892, 289, 14339, 29920, 1171, 29918, 3571, 29892, 13, 12, 12, 12, 12, 17750, 29918, 1707, 29918, 29896, 29881, 29892, 954, 29918, 5721, 1461, 943, 29892, 8393, 29918, 2311, 29892, 13, 12, 12, 12, 12, 2643, 29918, 3493, 29918, 2311, 1125, 13, 12, 12, 1311, 29889, 29879, 404, 353, 27937, 13, 12, 12, 1311, 29889, 1949, 29918, 5721, 1461, 943, 29918, 353, 954, 29918, 5721, 1461, 943, 13, 12, 12, 1311, 29889, 15697, 29918, 2311, 29918, 353, 8393, 29918, 2311, 13, 12, 12, 1311, 29889, 4906, 29918, 3493, 29918, 2311, 29918, 353, 2643, 29918, 3493, 29918, 2311, 13, 12, 12, 1311, 29889, 2096, 29918, 4283, 29918, 353, 364, 29880, 29918, 4283, 13, 12, 12, 1311, 29889, 2095, 17559, 1171, 29918, 3571, 29918, 353, 289, 14339, 29920, 1171, 29918, 3571, 13, 12, 12, 1311, 29889, 6596, 2575, 29918, 1707, 29918, 29896, 29881, 29918, 353, 17750, 29918, 1707, 29918, 29896, 29881, 13, 12, 12, 13383, 13, 12, 12, 29937, 15484, 8948, 414, 396, 13, 12, 12, 13383, 13, 12, 12, 2541, 15886, 29889, 11918, 29918, 6078, 877, 29911, 4204, 261, 29374, 13, 12, 12, 12, 1311, 29889, 5721, 1461, 943, 29918, 353, 15886, 29889, 27074, 29898, 13264, 29889, 7411, 29941, 29906, 29892, 1024, 353, 525, 5721, 1461, 943, 742, 29871, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 29871, 8267, 353, 518, 8516, 29892, 1583, 29889, 1949, 29918, 5721, 1461, 943, 3383, 1583, 29889, 15697, 29918, 2311, 29918, 2314, 13, 12, 12, 12, 1311, 29889, 5721, 1461, 943, 29918, 20158, 29918, 353, 15886, 29889, 18837, 29918, 6229, 29879, 29898, 1311, 29889, 5721, 1461, 943, 3383, 29871, 29906, 29897, 13, 12, 12, 12, 1311, 29889, 4906, 29918, 353, 15886, 29889, 27074, 29898, 13264, 29889, 7411, 29941, 29906, 29892, 8267, 353, 518, 8516, 29892, 1583, 29889, 4906, 29918, 3493, 29918, 2311, 29918, 1402, 1024, 353, 525, 4906, 1495, 13, 13, 12, 12, 12, 1311, 29889, 371, 11665, 29918, 6596, 2575, 29918, 353, 15886, 29889, 27074, 29898, 13264, 29889, 7411, 29941, 29906, 29892, 8267, 353, 518, 8516, 29892, 1583, 29889, 1949, 29918, 5721, 1461, 943, 29918, 1402, 1024, 353, 525, 371, 11665, 29918, 6596, 2575, 1495, 13, 12, 12, 12, 1311, 29889, 18945, 29918, 6596, 2575, 29918, 353, 15886, 29889, 27074, 29898, 13264, 29889, 7411, 29941, 29906, 29892, 8267, 353, 518, 8516, 29892, 1583, 29889, 1949, 29918, 5721, 1461, 943, 29918, 1402, 1024, 353, 525, 18945, 29918, 6596, 2575, 1495, 13, 12, 12, 12, 1311, 29889, 18945, 29918, 6596, 2575, 29918, 1028, 4270, 29918, 353, 15886, 29889, 27074, 29898, 13264, 29889, 7411, 29941, 29906, 29892, 8267, 353, 518, 8516, 29892, 1583, 29889, 1949, 29918, 5721, 1461, 943, 29918, 1402, 1024, 353, 525, 18945, 29918, 6596, 2575, 29918, 1028, 4270, 1495, 13, 12, 12, 12, 13, 12, 12, 12, 1311, 29889, 29939, 29918, 1212, 29918, 1028, 4270, 29918, 353, 15886, 29889, 27074, 29898, 13264, 29889, 7411, 29941, 29906, 29892, 8267, 353, 518, 8516, 2314, 13, 12, 12, 13383, 7346, 13, 12, 12, 29937, 3741, 2575, 10318, 15591, 396, 13, 12, 12, 13383, 7346, 13, 12, 12, 1311, 29889, 6596, 2575, 29918, 5504, 29918, 3670, 29918, 353, 15886, 29889, 14968, 29889, 3253, 314, 20624, 326, 3950, 29898, 21891, 29918, 10492, 353, 29871, 29896, 29872, 29899, 29941, 29897, 13, 12, 12, 2541, 15886, 29889, 11918, 29918, 6078, 877, 21140, 2575, 29918, 6422, 29374, 13, 12, 12, 12, 1311, 29889, 2176, 29896, 29918, 353, 15886, 29889, 29277, 29889, 20580, 29906, 29881, 29898, 1311, 29889, 5721, 1461, 943, 29918, 20158, 3383, 29871, 29941, 334, 1583, 29889, 4906, 29918, 3493, 29918, 2311, 3383, 8466, 29918, 2311, 353, 518, 29896, 29892, 29871, 29896, 1402, 13, 12, 12, 12, 12, 12, 12, 12, 12, 1678, 12, 12, 17460, 29918, 11228, 3950, 353, 15886, 29889, 8172, 29918, 8945, 29918, 11228, 3950, 29898, 12676, 353, 29871, 29900, 29889, 29900, 29892, 3659, 3359, 353, 29871, 29896, 511, 13, 12, 12, 12, 12, 12, 12, 12, 12, 1678, 12, 12, 11236, 362, 353, 15886, 29889, 15755, 29889, 280, 557, 29891, 29918, 2674, 29884, 29897, 13, 12, 12, 12, 1311, 29889, 2176, 29906, 29918, 353, 15886, 29889, 29277, 29889, 20580, 29906, 29881, 29898, 1311, 29889, 2176, 29896, 3383, 29871, 29941, 334, 1583, 29889, 4906, 29918, 3493, 29918, 2311, 3383, 8466, 29918, 2311, 353, 518, 29896, 29892, 29871, 29896, 1402, 13, 12, 12, 12, 12, 12, 12, 12, 12, 1678, 12, 12, 17460, 29918, 11228, 3950, 353, 15886, 29889, 8172, 29918, 8945, 29918, 11228, 3950, 29898, 12676, 353, 29871, 29900, 29889, 29900, 29892, 3659, 3359, 353, 29871, 29896, 29872, 29899, 29896, 511, 13, 12, 12, 12, 12, 12, 12, 12, 12, 1678, 12, 12, 11236, 362, 353, 15886, 29889, 15755, 29889, 280, 557, 29891, 29918, 2674, 29884, 29897, 13, 12, 12, 12, 29937, 1583, 29889, 2176, 29941, 29918, 353, 15886, 29889, 29277, 29889, 20580, 29906, 29881, 29898, 1311, 29889, 2176, 29906, 3383, 29871, 29896, 334, 1583, 29889, 4906, 29918, 3493, 29918, 2311, 3383, 8466, 29918, 2311, 353, 518, 29896, 29892, 29871, 29896, 1402, 13, 12, 12, 12, 29937, 29871, 12, 12, 12, 12, 12, 1678, 12, 12, 17460, 29918, 11228, 3950, 353, 15886, 29889, 8172, 29918, 8945, 29918, 11228, 3950, 29898, 12676, 353, 29871, 29900, 29889, 29900, 29892, 3659, 3359, 353, 29871, 29896, 29872, 29899, 29906, 511, 13, 12, 12, 12, 29937, 29871, 12, 12, 12, 12, 12, 1678, 12, 12, 11236, 362, 353, 6213, 29897, 13, 13, 12, 12, 12, 1311, 29889, 7645, 29918, 3166, 29918, 2176, 29918, 29896, 29918, 353, 5159, 13, 12, 12, 12, 1454, 903, 297, 3464, 29898, 1311, 29889, 1949, 29918, 5721, 1461, 943, 29918, 1125, 13, 12, 12, 12, 12, 1311, 29889, 7645, 29918, 3166, 29918, 2176, 29918, 29896, 5396, 4397, 29898, 13264, 29889, 29277, 29889, 20580, 29906, 29881, 29898, 1311, 29889, 2176, 29906, 3383, 29871, 29906, 334, 1583, 29889, 4906, 29918, 3493, 29918, 2311, 3383, 8466, 29918, 2311, 353, 518, 1311, 29889, 1949, 29918, 5721, 1461, 943, 3383, 29871, 29896, 1402, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 29871, 8466, 29918, 11228, 3950, 353, 15886, 29889, 8172, 29918, 8945, 29918, 11228, 3950, 29898, 12676, 353, 29871, 29900, 29889, 29900, 29892, 3659, 3359, 353, 29871, 29896, 29872, 29899, 29896, 511, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 29871, 7164, 353, 525, 3084, 742, 26229, 353, 15886, 29889, 15755, 29889, 280, 557, 29891, 29918, 2674, 29884, 876, 13, 13, 12, 12, 12, 1311, 29889, 7645, 29918, 342, 29918, 20158, 29918, 29896, 29918, 353, 15886, 29889, 17685, 29898, 1311, 29889, 7645, 29918, 3166, 29918, 2176, 29918, 29896, 3383, 9685, 353, 29871, 29896, 29897, 13, 13, 12, 12, 12, 1311, 29889, 7645, 29918, 3166, 29918, 2176, 29918, 29906, 29918, 353, 5159, 13, 12, 12, 12, 1454, 903, 297, 3464, 29898, 1311, 29889, 1949, 29918, 5721, 1461, 943, 29918, 1125, 13, 12, 12, 12, 12, 1311, 29889, 7645, 29918, 3166, 29918, 2176, 29918, 29906, 5396, 4397, 29898, 13264, 29889, 29277, 29889, 20580, 29906, 29881, 29898, 1311, 29889, 7645, 29918, 342, 29918, 20158, 29918, 29896, 3383, 29871, 29896, 334, 1583, 29889, 4906, 29918, 3493, 29918, 2311, 3383, 8466, 29918, 2311, 353, 518, 1311, 29889, 1949, 29918, 5721, 1461, 943, 3383, 29871, 29896, 1402, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 29871, 8466, 29918, 11228, 3950, 353, 15886, 29889, 8172, 29918, 8945, 29918, 11228, 3950, 29898, 12676, 353, 29871, 29900, 29889, 29900, 29892, 3659, 3359, 353, 29871, 29896, 29872, 29899, 29906, 511, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 29871, 7164, 353, 525, 3084, 742, 26229, 353, 6213, 876, 13, 13, 12, 12, 12, 1311, 29889, 7645, 29918, 342, 29918, 20158, 29918, 29906, 29918, 353, 15886, 29889, 17685, 29898, 1311, 29889, 7645, 29918, 3166, 29918, 2176, 29918, 29906, 3383, 9685, 353, 29871, 29896, 29897, 13, 12, 12, 12, 13, 12, 12, 12, 1311, 29889, 1727, 29918, 1707, 1761, 29918, 353, 518, 29894, 363, 325, 297, 15886, 29889, 657, 29918, 10855, 29898, 13264, 29889, 9527, 15506, 29889, 29911, 4717, 1177, 6181, 29918, 26865, 29902, 6181, 29903, 29897, 565, 325, 29889, 978, 29889, 27382, 2541, 877, 21140, 2575, 1495, 29962, 13, 12, 12, 12, 13383, 4136, 2277, 29937, 13, 12, 12, 12, 29937, 11618, 17750, 2767, 29937, 13, 12, 12, 12, 13383, 4136, 2277, 29937, 13, 12, 12, 12, 1311, 29889, 7645, 29918, 342, 29918, 20158, 29918, 29906, 29881, 29918, 353, 15886, 29889, 29879, 802, 29872, 911, 29898, 1311, 29889, 7645, 29918, 342, 29918, 20158, 29918, 29906, 3383, 9685, 353, 29871, 29906, 29897, 13, 12, 12, 12, 13, 12, 12, 12, 1311, 29889, 6596, 2575, 29918, 1707, 29918, 29896, 29881, 29918, 353, 15886, 29889, 4548, 29898, 13264, 29889, 16174, 29898, 11228, 29918, 1767, 353, 1583, 29889, 6596, 2575, 29918, 1707, 29918, 29896, 29881, 3383, 7945, 519, 353, 5852, 29892, 26688, 353, 15886, 29889, 7411, 29941, 29906, 876, 13, 12, 12, 12, 29937, 1583, 29889, 6596, 2575, 29918, 1707, 29918, 353, 15886, 29889, 29277, 29889, 20580, 29906, 29881, 29898, 1311, 29889, 7645, 29918, 342, 29918, 20158, 29918, 29941, 3383, 29871, 29896, 29892, 8466, 29918, 2311, 353, 518, 1311, 29889, 1949, 29918, 5721, 1461, 943, 3383, 29871, 29896, 1402, 13, 12, 12, 12, 29937, 29871, 12, 12, 12, 12, 12, 12, 12, 12, 12, 17460, 29918, 11228, 3950, 353, 15886, 29889, 8172, 29918, 8945, 29918, 11228, 3950, 29898, 12676, 353, 29871, 29900, 29889, 29900, 29892, 3659, 3359, 353, 29871, 29896, 29872, 29899, 29941, 511, 13, 12, 12, 12, 29937, 29871, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12791, 353, 525, 3084, 742, 26229, 353, 6213, 29897, 13, 12, 12, 12, 29937, 1583, 29889, 6596, 2575, 29918, 1707, 29918, 29896, 29881, 29918, 353, 15886, 29889, 29879, 802, 29872, 911, 29898, 1311, 29889, 6596, 2575, 29918, 1707, 3383, 9685, 353, 29871, 29906, 29897, 13, 12, 12, 12, 1311, 29889, 2095, 17559, 1171, 29918, 3571, 29918, 353, 15886, 29889, 16174, 29898, 11228, 29918, 1767, 353, 1583, 29889, 2095, 17559, 1171, 29918, 3571, 3383, 7945, 519, 353, 7700, 29892, 26688, 353, 15886, 29889, 7411, 29941, 29906, 29892, 1024, 353, 525, 2095, 17559, 1171, 29918, 3571, 1495, 13, 13, 12, 12, 12, 13, 12, 12, 12, 1311, 29889, 7645, 29918, 513, 1575, 29918, 353, 15886, 29889, 3062, 29898, 13264, 29889, 1333, 29918, 11745, 29898, 1311, 29889, 4906, 3383, 29871, 29900, 876, 13, 12, 12, 12, 13, 12, 12, 12, 1311, 29889, 2176, 29918, 7645, 29918, 4352, 29918, 353, 15886, 29889, 4548, 29898, 1311, 29889, 2095, 17559, 1171, 29918, 3571, 29918, 334, 1583, 29889, 7645, 29918, 342, 29918, 20158, 29918, 29906, 29881, 19925, 13, 12, 12, 12, 1311, 29889, 2176, 29918, 7645, 29918, 4352, 29918, 12324, 29918, 353, 29871, 15886, 29889, 4563, 29918, 1217, 29918, 13707, 29898, 1311, 29889, 2176, 29918, 7645, 29918, 4352, 3383, 15886, 29889, 17469, 29918, 2083, 29898, 1311, 29889, 2176, 29918, 7645, 29918, 4352, 3383, 9685, 353, 29871, 29906, 29892, 3013, 6229, 29879, 353, 5852, 876, 13, 12, 12, 12, 13, 12, 12, 12, 1311, 29889, 2176, 29918, 7645, 29918, 29906, 29918, 12324, 29918, 353, 15886, 29889, 29887, 1624, 29918, 299, 29898, 13264, 29889, 3286, 4220, 29898, 1311, 29889, 2176, 29918, 7645, 29918, 4352, 29918, 12324, 3383, 3635, 353, 518, 29900, 29892, 29871, 29906, 29892, 29871, 29896, 11724, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 29871, 1583, 29889, 7645, 29918, 513, 1575, 19925, 13, 12, 12, 12, 12, 12, 12, 13, 12, 12, 12, 29937, 1311, 29889, 2176, 29918, 7645, 29918, 29896, 29918, 353, 15886, 29889, 18056, 368, 29898, 1311, 29889, 2176, 29890, 29918, 14634, 29918, 1457, 29918, 29941, 3383, 15886, 29889, 18837, 29918, 6229, 29879, 29898, 13264, 29889, 18837, 29918, 6229, 29879, 29898, 1311, 29889, 4906, 3383, 29871, 29896, 511, 29871, 29896, 876, 13, 12, 12, 12, 29937, 1311, 29889, 2176, 29918, 7645, 29918, 29906, 29918, 353, 15886, 29889, 4548, 29898, 1311, 29889, 2095, 17559, 1171, 29918, 3571, 29918, 334, 15886, 29889, 17469, 29918, 2083, 29898, 13264, 29889, 29879, 802, 29872, 911, 29898, 1311, 29889, 2176, 29918, 7645, 29918, 29896, 3383, 29871, 29906, 511, 9685, 353, 29871, 29906, 876, 13, 12, 12, 12, 29937, 1311, 29889, 2176, 29918, 7645, 29918, 29906, 29918, 12324, 29918, 353, 15886, 29889, 15755, 29889, 2674, 29884, 29898, 1311, 29889, 2176, 29918, 7645, 29918, 29906, 29918, 718, 1583, 29889, 6596, 2575, 29918, 1707, 29918, 29896, 19925, 13, 13, 12, 12, 12, 1311, 29889, 6596, 2575, 29918, 11965, 29918, 29896, 29918, 353, 15886, 29889, 18056, 368, 29898, 1311, 29889, 2176, 29918, 7645, 29918, 29906, 29918, 12324, 3383, 1583, 29889, 18945, 29918, 6596, 2575, 19925, 13, 12, 12, 12, 1311, 29889, 6596, 2575, 29918, 11965, 29918, 8159, 29918, 353, 15886, 29889, 17685, 4197, 1311, 29889, 6596, 2575, 29918, 11965, 29918, 29896, 3383, 1583, 29889, 6596, 2575, 29918, 1707, 29918, 29896, 29881, 29918, 334, 15886, 29889, 18337, 29898, 13264, 29889, 2873, 29918, 4561, 29898, 1311, 29889, 6596, 2575, 29918, 11965, 29918, 29896, 29918, 511, 518, 29900, 29892, 29871, 29900, 1402, 21069, 29896, 29892, 29871, 29896, 2314, 1402, 9685, 353, 29871, 29896, 29897, 13, 12, 12, 12, 13, 12, 12, 12, 13383, 4136, 2277, 29937, 13, 12, 12, 12, 29937, 11618, 17750, 2767, 29937, 13, 12, 12, 12, 13383, 4136, 2277, 29937, 13, 12, 12, 12, 13, 12, 12, 12, 12008, 13, 12, 12, 12, 13383, 4136, 2277, 13, 12, 12, 12, 29937, 17460, 17750, 2767, 29937, 13, 12, 12, 12, 13383, 4136, 2277, 13, 12, 12, 12, 1311, 29889, 17460, 29918, 13099, 29918, 353, 5159, 13, 12, 12, 12, 1454, 474, 297, 3464, 29898, 1311, 29889, 1949, 29918, 5721, 1461, 943, 29918, 1125, 13, 12, 12, 12, 12, 1311, 29889, 2176, 29918, 7645, 29918, 29896, 29918, 353, 15886, 29889, 18056, 368, 29898, 1311, 29889, 7645, 29918, 342, 29918, 20158, 29918, 29906, 3383, 15886, 29889, 18837, 29918, 6229, 29879, 29898, 13264, 29889, 18837, 29918, 6229, 29879, 29898, 1311, 29889, 4906, 3383, 29871, 29896, 511, 29871, 29896, 876, 13, 12, 12, 12, 12, 1311, 29889, 2176, 29918, 7645, 29918, 29906, 29918, 353, 15886, 29889, 21570, 29889, 29277, 29889, 3730, 29918, 18045, 29898, 13264, 29889, 29277, 29889, 1579, 8606, 29898, 1311, 29889, 2176, 29918, 7645, 29918, 29896, 29918, 20481, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 259, 29906, 334, 1583, 29889, 1949, 29918, 5721, 1461, 943, 3383, 26229, 29918, 9144, 353, 15886, 29889, 15755, 29889, 280, 557, 29891, 29918, 2674, 29884, 29897, 13, 12, 12, 12, 12, 1311, 29889, 2176, 29918, 7645, 29918, 29941, 29918, 353, 15886, 29889, 21570, 29889, 29277, 29889, 3730, 29918, 18045, 29898, 1311, 29889, 2176, 29918, 7645, 29918, 29906, 3383, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 29871, 1583, 29889, 1949, 29918, 5721, 1461, 943, 3383, 26229, 29918, 9144, 353, 6213, 29897, 13, 12, 12, 12, 12, 17460, 29918, 4914, 353, 15886, 29889, 15755, 29889, 2674, 29884, 29898, 1311, 29889, 2176, 29918, 7645, 29918, 29941, 19925, 13, 12, 12, 12, 12, 1311, 29889, 17460, 29918, 13099, 5396, 4397, 29898, 13264, 29889, 18837, 29918, 6229, 29879, 29898, 13264, 29889, 4563, 29918, 1217, 29918, 13707, 29898, 17460, 29918, 4914, 29892, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 29871, 15886, 29889, 17469, 29918, 2083, 29898, 17460, 29918, 4914, 29892, 9685, 353, 29871, 29896, 29892, 3013, 6229, 29879, 353, 5852, 8243, 448, 29896, 876, 13, 12, 12, 12, 1311, 29889, 17460, 29918, 1457, 29918, 12324, 29918, 353, 15886, 29889, 1217, 29918, 459, 580, 13, 12, 12, 12, 1311, 29889, 17460, 29918, 353, 15886, 29889, 17685, 29898, 1311, 29889, 17460, 29918, 13099, 3383, 9685, 353, 29871, 29906, 29897, 13, 12, 12, 12, 2158, 877, 29966, 21140, 2575, 10318, 476, 5851, 3251, 1061, 1281, 4984, 287, 29958, 1495, 13, 12, 12, 12, 1311, 29889, 6596, 2575, 29918, 11965, 29918, 353, 15886, 29889, 15755, 29889, 2674, 29884, 29898, 13264, 29889, 29879, 802, 29872, 911, 29898, 13264, 29889, 2922, 16109, 29898, 1311, 29889, 17460, 3383, 15886, 29889, 18837, 29918, 6229, 29879, 29898, 1311, 29889, 18945, 29918, 6596, 2575, 3383, 448, 29896, 8243, 448, 29896, 876, 13, 12, 12, 12, 13383, 4136, 2277, 13, 12, 12, 12, 29937, 17460, 17750, 2767, 29937, 13, 12, 12, 12, 13383, 4136, 2277, 13, 12, 12, 12, 12008, 13, 12, 12, 12, 1311, 29889, 6596, 2575, 29918, 11965, 29918, 8159, 29918, 12324, 29918, 353, 15886, 29889, 4563, 29918, 1217, 29918, 13707, 29898, 1311, 29889, 6596, 2575, 29918, 11965, 29918, 8159, 3383, 15886, 29889, 17469, 29918, 2083, 29898, 1311, 29889, 6596, 2575, 29918, 11965, 29918, 8159, 3383, 9685, 353, 29871, 29896, 29892, 3013, 6229, 29879, 353, 5852, 876, 13, 12, 12, 12, 1311, 29889, 6596, 2575, 29918, 11965, 29918, 353, 15886, 29889, 18337, 29898, 1311, 29889, 6596, 2575, 29918, 11965, 29918, 8159, 29918, 12324, 3383, 518, 29900, 29892, 29871, 29900, 1402, 21069, 29896, 29892, 1583, 29889, 1949, 29918, 5721, 1461, 943, 29918, 2314, 13, 12, 12, 12, 1311, 29889, 15227, 2133, 29918, 353, 29871, 29896, 29872, 29899, 29946, 334, 15886, 29889, 1202, 29918, 29876, 4197, 15886, 29889, 15755, 29889, 29880, 29906, 29918, 6758, 29898, 29894, 29897, 363, 325, 297, 1583, 29889, 1727, 29918, 1707, 1761, 29918, 565, 525, 29890, 3173, 29915, 451, 297, 325, 29889, 978, 29871, 2314, 13, 12, 12, 12, 1311, 29889, 19128, 29918, 296, 14441, 29918, 29896, 29918, 353, 448, 29896, 334, 15886, 29889, 17469, 29918, 12676, 29898, 13264, 29889, 17469, 29918, 2083, 29898, 13264, 29889, 18056, 368, 29898, 1311, 29889, 18945, 29918, 6596, 2575, 29918, 1028, 4270, 3383, 15886, 29889, 755, 29889, 1188, 29898, 1311, 29889, 6596, 2575, 29918, 11965, 29918, 8243, 9685, 353, 29871, 29896, 876, 13, 12, 12, 12, 1311, 29889, 19128, 29918, 296, 14441, 29918, 29906, 29918, 353, 448, 29896, 334, 15886, 29889, 17469, 29918, 12676, 29898, 13264, 29889, 17469, 29918, 2083, 29898, 13264, 29889, 18056, 368, 29898, 1311, 29889, 6596, 2575, 29918, 11965, 3383, 15886, 29889, 755, 29889, 1188, 29898, 1311, 29889, 18945, 29918, 6596, 2575, 29918, 1028, 4270, 29918, 718, 29871, 29896, 29872, 29899, 29929, 8243, 9685, 353, 29871, 29896, 876, 13, 12, 12, 12, 1311, 29889, 19128, 29918, 296, 14441, 29918, 353, 1583, 29889, 19128, 29918, 296, 14441, 29918, 29896, 29918, 718, 1583, 29889, 19128, 29918, 296, 14441, 29918, 29906, 29918, 718, 1583, 29889, 15227, 2133, 29918, 13, 12, 12, 1311, 29889, 6596, 2575, 29918, 14968, 29918, 1707, 1761, 29918, 353, 518, 29894, 363, 325, 297, 15886, 29889, 657, 29918, 10855, 29898, 13264, 29889, 9527, 15506, 29889, 29911, 4717, 1177, 6181, 29918, 26865, 29902, 6181, 29903, 29897, 565, 325, 29889, 978, 29889, 27382, 2541, 877, 21140, 2575, 29918, 6422, 1495, 29962, 13, 12, 12, 1311, 29889, 6596, 2575, 29918, 5504, 29918, 1707, 1761, 29918, 353, 518, 29894, 363, 325, 297, 15886, 29889, 657, 29918, 10855, 29898, 13264, 29889, 9527, 15506, 29889, 29954, 28902, 1964, 29918, 26865, 29902, 6181, 29903, 29897, 565, 325, 29889, 978, 29889, 27382, 2541, 877, 21140, 2575, 29918, 6422, 1495, 29962, 13, 12, 12, 1311, 29889, 6596, 2575, 29918, 5504, 29918, 14968, 29918, 459, 29918, 353, 1583, 29889, 6596, 2575, 29918, 5504, 29918, 3670, 5396, 1195, 326, 675, 29898, 1311, 29889, 19128, 29918, 296, 14441, 3383, 722, 29918, 1761, 353, 1583, 29889, 6596, 2575, 29918, 14968, 29918, 1707, 1761, 19925, 13, 12, 12, 1311, 29889, 6596, 2575, 29918, 5504, 29918, 4977, 369, 29918, 353, 15886, 29889, 14968, 29889, 29903, 12483, 580, 13, 12, 12, 1311, 29889, 6596, 2575, 29918, 5504, 29918, 12657, 29918, 353, 15886, 29889, 14968, 29889, 29903, 12483, 29898, 1311, 29889, 6596, 2575, 29918, 5504, 29918, 1707, 1761, 19925, 13, 12, 12, 13383, 4136, 13, 12, 12, 29937, 660, 29899, 11618, 15591, 396, 13, 12, 12, 13383, 4136, 13, 12, 12, 1311, 29889, 29939, 29918, 1212, 29918, 3670, 29918, 353, 15886, 29889, 14968, 29889, 3253, 314, 20624, 326, 3950, 29898, 21891, 29918, 10492, 353, 29871, 29896, 29872, 29899, 29945, 29897, 13, 12, 12, 2541, 15886, 29889, 11918, 29918, 6078, 877, 29939, 29918, 1212, 29374, 13, 12, 12, 12, 1311, 29889, 5721, 312, 29918, 1725, 271, 29918, 29896, 29918, 353, 15886, 29889, 29277, 29889, 20580, 29906, 29881, 29898, 1311, 29889, 5721, 1461, 943, 29918, 20158, 3383, 29871, 29941, 334, 1583, 29889, 4906, 29918, 3493, 29918, 2311, 3383, 8466, 29918, 2311, 353, 518, 29896, 29892, 29871, 29896, 1402, 13, 12, 12, 12, 12, 12, 12, 12, 12, 1678, 12, 12, 12, 12, 259, 8466, 29918, 11228, 3950, 353, 15886, 29889, 8172, 29918, 8945, 29918, 11228, 3950, 29898, 12676, 353, 29871, 29900, 29889, 29900, 29892, 3659, 3359, 353, 29871, 29896, 29872, 29899, 29896, 511, 13, 12, 12, 12, 12, 12, 12, 12, 12, 1678, 12, 12, 12, 12, 259, 26229, 353, 15886, 29889, 15755, 29889, 280, 557, 29891, 29918, 2674, 29884, 29897, 13, 12, 12, 12, 1311, 29889, 5721, 312, 29918, 1725, 271, 29918, 29906, 29918, 353, 15886, 29889, 29277, 29889, 20580, 29906, 29881, 29898, 1311, 29889, 5721, 312, 29918, 1725, 271, 29918, 29896, 3383, 29871, 29906, 334, 1583, 29889, 4906, 29918, 3493, 29918, 2311, 3383, 8466, 29918, 2311, 353, 518, 29896, 29892, 29871, 29896, 1402, 13, 12, 12, 12, 12, 12, 12, 12, 12, 1678, 12, 12, 12, 12, 259, 8466, 29918, 11228, 3950, 353, 15886, 29889, 8172, 29918, 8945, 29918, 11228, 3950, 29898, 12676, 353, 29871, 29900, 29889, 29900, 29892, 3659, 3359, 353, 29871, 29896, 29872, 29899, 29896, 511, 13, 12, 12, 12, 12, 12, 12, 12, 12, 1678, 12, 12, 12, 12, 259, 26229, 353, 15886, 29889, 15755, 29889, 280, 557, 29891, 29918, 2674, 29884, 29897, 13, 12, 12, 12, 13, 12, 12, 12, 1311, 29889, 5721, 312, 29918, 1725, 271, 29918, 29906, 29918, 7915, 287, 29918, 353, 15886, 29889, 18056, 368, 29898, 1311, 29889, 5721, 312, 29918, 1725, 271, 29918, 29906, 3383, 15886, 29889, 18837, 29918, 6229, 29879, 29898, 13264, 29889, 18837, 29918, 6229, 29879, 29898, 1311, 29889, 6596, 2575, 29918, 11965, 3383, 448, 29896, 511, 448, 29896, 876, 13, 12, 12, 12, 13, 12, 12, 12, 1311, 29889, 5721, 312, 29879, 29918, 1725, 271, 29918, 29896, 29918, 353, 5159, 13, 12, 12, 12, 1454, 903, 297, 3464, 29898, 1311, 29889, 1949, 29918, 5721, 1461, 943, 29918, 1125, 13, 12, 12, 12, 12, 1311, 29889, 5721, 312, 29879, 29918, 1725, 271, 29918, 29896, 5396, 4397, 29898, 13264, 29889, 29277, 29889, 20580, 29906, 29881, 29898, 1311, 29889, 5721, 312, 29918, 1725, 271, 29918, 29906, 29918, 7915, 287, 3383, 29871, 29896, 334, 1583, 29889, 4906, 29918, 3493, 29918, 2311, 3383, 8466, 29918, 2311, 353, 518, 1311, 29889, 1949, 29918, 5721, 1461, 943, 3383, 29871, 29896, 1402, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 29871, 8466, 29918, 11228, 3950, 353, 15886, 29889, 8172, 29918, 8945, 29918, 11228, 3950, 29898, 12676, 353, 29871, 29900, 29889, 29900, 29892, 3659, 3359, 353, 29871, 29896, 29872, 29899, 29896, 511, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 29871, 7164, 353, 525, 3084, 742, 26229, 353, 15886, 29889, 15755, 29889, 280, 557, 29891, 29918, 2674, 29884, 876, 13, 13, 12, 12, 12, 1311, 29889, 5721, 312, 29879, 29918, 1725, 271, 29918, 20158, 29918, 29896, 29918, 353, 15886, 29889, 17685, 29898, 1311, 29889, 5721, 312, 29879, 29918, 1725, 271, 29918, 29896, 3383, 9685, 353, 29871, 29896, 29897, 13, 13, 12, 12, 12, 1311, 29889, 5721, 312, 29879, 29918, 1725, 271, 29918, 29906, 29918, 353, 5159, 13, 12, 12, 12, 1454, 903, 297, 3464, 29898, 1311, 29889, 1949, 29918, 5721, 1461, 943, 29918, 1125, 13, 12, 12, 12, 12, 1311, 29889, 5721, 312, 29879, 29918, 1725, 271, 29918, 29906, 5396, 4397, 29898, 13264, 29889, 29277, 29889, 20580, 29906, 29881, 29898, 1311, 29889, 5721, 312, 29879, 29918, 1725, 271, 29918, 20158, 29918, 29896, 3383, 29871, 29896, 334, 1583, 29889, 4906, 29918, 3493, 29918, 2311, 3383, 8466, 29918, 2311, 353, 518, 1311, 29889, 1949, 29918, 5721, 1461, 943, 3383, 29871, 29896, 1402, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 29871, 8466, 29918, 11228, 3950, 353, 15886, 29889, 8172, 29918, 8945, 29918, 11228, 3950, 29898, 12676, 353, 29871, 29900, 29889, 29900, 29892, 3659, 3359, 353, 29871, 29896, 29872, 29899, 29896, 511, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 29871, 7164, 353, 525, 3084, 742, 26229, 353, 15886, 29889, 15755, 29889, 280, 557, 29891, 29918, 2674, 29884, 876, 13, 13, 12, 12, 12, 1311, 29889, 5721, 312, 29879, 29918, 1725, 271, 29918, 20158, 29918, 29906, 29918, 353, 15886, 29889, 17685, 29898, 1311, 29889, 5721, 312, 29879, 29918, 1725, 271, 29918, 29906, 3383, 9685, 353, 29871, 29896, 29897, 13, 13, 12, 12, 12, 1311, 29889, 29883, 504, 608, 29918, 11236, 1249, 265, 29918, 353, 14013, 921, 29901, 15886, 29889, 3062, 29898, 13264, 29889, 755, 29889, 7979, 1008, 29898, 29916, 29892, 29871, 29900, 511, 313, 13264, 29889, 4548, 29898, 29916, 29897, 448, 29871, 29896, 511, 8521, 29896, 334, 15886, 29889, 4548, 6278, 29916, 29897, 718, 29871, 29896, 876, 13, 12, 12, 12, 1311, 29889, 5721, 312, 29879, 29918, 1725, 271, 29918, 29941, 29918, 353, 5159, 13, 12, 12, 12, 1454, 903, 297, 3464, 29898, 1311, 29889, 1949, 29918, 5721, 1461, 943, 29918, 1125, 13, 12, 12, 12, 12, 1311, 29889, 5721, 312, 29879, 29918, 1725, 271, 29918, 29941, 5396, 4397, 29898, 13264, 29889, 29277, 29889, 20580, 29906, 29881, 29898, 1311, 29889, 5721, 312, 29879, 29918, 1725, 271, 29918, 20158, 29918, 29906, 3383, 29871, 29896, 29892, 8466, 29918, 2311, 353, 518, 1311, 29889, 1949, 29918, 5721, 1461, 943, 3383, 29871, 29896, 1402, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 29871, 8466, 29918, 11228, 3950, 353, 15886, 29889, 8172, 29918, 8945, 29918, 11228, 3950, 29898, 12676, 353, 29871, 29900, 29889, 29900, 29892, 3659, 3359, 353, 29871, 29896, 29872, 29899, 29896, 511, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 29871, 7164, 353, 525, 3084, 742, 26229, 353, 1583, 29889, 29883, 504, 608, 29918, 11236, 1249, 265, 29918, 876, 13, 13, 12, 12, 12, 1311, 29889, 5721, 312, 29879, 29918, 1725, 271, 29918, 20158, 29918, 29941, 29918, 353, 15886, 29889, 17685, 29898, 1311, 29889, 5721, 312, 29879, 29918, 1725, 271, 29918, 29941, 3383, 9685, 353, 29871, 29896, 29897, 13, 12, 12, 12, 13, 12, 12, 12, 1311, 29889, 1767, 29918, 3207, 29918, 29896, 29918, 353, 15886, 29889, 16174, 29898, 11228, 29918, 1767, 353, 448, 29896, 29892, 7945, 519, 353, 7700, 29892, 26688, 353, 15886, 29889, 7411, 29941, 29906, 29897, 13, 13, 12, 12, 12, 1311, 29889, 1767, 29918, 353, 15886, 29889, 17469, 29918, 2083, 29898, 13264, 29889, 18056, 368, 29898, 13264, 29889, 29879, 802, 29872, 911, 29898, 1311, 29889, 5721, 312, 29879, 29918, 1725, 271, 29918, 20158, 29918, 29941, 29918, 511, 1583, 29889, 371, 11665, 29918, 6596, 2575, 29918, 511, 9685, 353, 29871, 29896, 29897, 17501, 13, 12, 12, 12, 12, 12, 12, 29871, 313, 29896, 448, 15886, 29889, 17469, 29918, 2083, 29898, 1311, 29889, 6596, 2575, 29918, 11965, 3383, 9685, 353, 29871, 29896, 876, 334, 1583, 29889, 1767, 29918, 3207, 29918, 29896, 29918, 13, 12, 12, 12, 12008, 13, 13, 12, 12, 12, 13, 12, 12, 12, 1311, 29889, 2176, 29918, 29890, 29896, 29918, 353, 15886, 29889, 18056, 368, 29898, 13264, 29889, 29879, 802, 29872, 911, 29898, 1311, 29889, 5721, 312, 29918, 1725, 271, 29918, 29906, 3383, 9685, 353, 29871, 29906, 511, 15886, 29889, 18837, 29918, 6229, 29879, 29898, 1311, 29889, 371, 11665, 29918, 6596, 2575, 3383, 448, 29896, 876, 13, 12, 12, 12, 1311, 29889, 2176, 29918, 29890, 29906, 29918, 353, 15886, 29889, 18056, 368, 29898, 13264, 29889, 29879, 802, 29872, 911, 29898, 1311, 29889, 5721, 312, 29918, 1725, 271, 29918, 29906, 3383, 9685, 353, 29871, 29906, 511, 15886, 29889, 18837, 29918, 6229, 29879, 29898, 1311, 29889, 6596, 2575, 29918, 11965, 3383, 448, 29896, 876, 13, 12, 12, 12, 1311, 29889, 17685, 29918, 2176, 29918, 29890, 29918, 353, 15886, 29889, 29277, 29889, 1579, 8606, 29898, 13264, 29889, 17685, 3552, 1311, 29889, 2176, 29918, 29890, 29896, 3383, 1583, 29889, 2176, 29918, 29890, 29906, 29918, 511, 9685, 353, 29871, 29906, 876, 13, 12, 12, 12, 29937, 1583, 29889, 2176, 29890, 29918, 14634, 29918, 1457, 29918, 353, 15886, 29889, 21570, 29889, 29277, 29889, 3730, 29918, 18045, 29898, 13264, 29889, 17469, 29918, 2083, 29898, 13264, 29889, 6897, 29898, 1311, 29889, 2176, 29918, 29890, 29896, 29918, 448, 1583, 29889, 2176, 29918, 29890, 29906, 29918, 511, 9685, 353, 29871, 29896, 511, 29871, 29946, 29892, 26229, 29918, 9144, 353, 15886, 29889, 15755, 29889, 280, 557, 29891, 29918, 2674, 29884, 29892, 13, 12, 12, 12, 29937, 29871, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 705, 5861, 29918, 11228, 3950, 353, 15886, 29889, 8172, 29918, 8945, 29918, 11228, 3950, 29898, 12676, 353, 29871, 29900, 29889, 29900, 29892, 3659, 3359, 353, 29871, 29896, 29872, 29899, 29906, 876, 13, 12, 12, 12, 1311, 29889, 2176, 29890, 29918, 14634, 29918, 1457, 29918, 29896, 29918, 353, 15886, 29889, 21570, 29889, 29277, 29889, 3730, 29918, 18045, 29898, 1311, 29889, 17685, 29918, 2176, 29918, 29890, 3383, 29871, 29953, 29892, 26229, 29918, 9144, 353, 15886, 29889, 15755, 29889, 280, 557, 29891, 29918, 2674, 29884, 29892, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 705, 5861, 29918, 11228, 3950, 353, 15886, 29889, 8172, 29918, 8945, 29918, 11228, 3950, 29898, 12676, 353, 29871, 29900, 29889, 29900, 29892, 3659, 3359, 353, 29871, 29896, 29872, 29899, 29906, 876, 13, 12, 12, 12, 1311, 29889, 2176, 29890, 29918, 14634, 29918, 1457, 29918, 29906, 29918, 353, 15886, 29889, 21570, 29889, 29277, 29889, 3730, 29918, 18045, 29898, 1311, 29889, 2176, 29890, 29918, 14634, 29918, 1457, 29918, 29896, 3383, 29871, 29946, 29892, 26229, 29918, 9144, 353, 15886, 29889, 15755, 29889, 280, 557, 29891, 29918, 2674, 29884, 29892, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 705, 5861, 29918, 11228, 3950, 353, 15886, 29889, 8172, 29918, 8945, 29918, 11228, 3950, 29898, 12676, 353, 29871, 29900, 29889, 29900, 29892, 3659, 3359, 353, 29871, 29896, 29872, 29899, 29906, 876, 13, 12, 12, 12, 1311, 29889, 2176, 29890, 29918, 14634, 29918, 353, 15886, 29889, 21570, 29889, 29277, 29889, 3730, 29918, 18045, 29898, 1311, 29889, 2176, 29890, 29918, 14634, 29918, 1457, 29918, 29906, 3383, 29871, 29896, 29892, 26229, 29918, 9144, 353, 6213, 29892, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 705, 5861, 29918, 11228, 3950, 353, 15886, 29889, 8172, 29918, 8945, 29918, 11228, 3950, 29898, 12676, 353, 29871, 29900, 29889, 29900, 29892, 3659, 3359, 353, 29871, 29896, 29872, 29899, 29906, 876, 13, 12, 12, 12, 1311, 29889, 1767, 29918, 353, 15886, 29889, 29879, 802, 29872, 911, 29898, 1311, 29889, 2176, 29890, 29918, 14634, 19925, 13, 12, 12, 12, 12008, 13, 12, 12, 12, 29937, 1583, 29889, 2176, 29890, 29918, 14634, 29918, 353, 15886, 29889, 17469, 29918, 2083, 29898, 13264, 29889, 17619, 29898, 1311, 29889, 2176, 29918, 29890, 29896, 29918, 448, 1583, 29889, 2176, 29918, 29890, 29906, 29918, 511, 9685, 353, 518, 29896, 29892, 29871, 29906, 2314, 13, 12, 12, 12, 13, 12, 12, 12, 29937, 1583, 29889, 1767, 29918, 3207, 29918, 29900, 29918, 353, 15886, 29889, 29879, 802, 29872, 911, 29898, 13264, 29889, 21570, 29889, 29277, 29889, 3730, 29918, 18045, 29898, 1311, 29889, 17685, 29918, 2176, 29918, 29890, 3383, 29871, 29896, 29892, 26229, 29918, 9144, 353, 6213, 876, 13, 12, 12, 12, 29937, 1583, 29889, 1767, 29918, 3207, 29918, 29900, 29900, 29918, 353, 15886, 29889, 29879, 802, 29872, 911, 29898, 13264, 29889, 21570, 29889, 29277, 29889, 3730, 29918, 18045, 29898, 1311, 29889, 2176, 29890, 29918, 14634, 29918, 1457, 29918, 29896, 3383, 29871, 29896, 29892, 26229, 29918, 9144, 353, 6213, 876, 13, 12, 12, 12, 29937, 1583, 29889, 1767, 29918, 3207, 29918, 29900, 29900, 29900, 29918, 353, 15886, 29889, 29879, 802, 29872, 911, 29898, 13264, 29889, 21570, 29889, 29277, 29889, 3730, 29918, 18045, 29898, 1311, 29889, 2176, 29890, 29918, 14634, 29918, 1457, 29918, 29896, 3383, 29871, 29896, 29892, 26229, 29918, 9144, 353, 6213, 876, 13, 12, 12, 12, 29937, 1583, 29889, 1767, 29918, 3207, 29918, 29900, 29900, 29900, 29900, 29918, 353, 15886, 29889, 29879, 802, 29872, 911, 29898, 13264, 29889, 21570, 29889, 29277, 29889, 3730, 29918, 18045, 29898, 1311, 29889, 2176, 29890, 29918, 14634, 29918, 1457, 29918, 29896, 3383, 29871, 29896, 29892, 26229, 29918, 9144, 353, 6213, 876, 13, 12, 12, 12, 29937, 1583, 29889, 1767, 29918, 3207, 29918, 29896, 29918, 353, 15886, 29889, 16174, 29898, 11228, 29918, 1767, 353, 448, 29896, 29892, 7945, 519, 353, 5852, 29892, 26688, 353, 15886, 29889, 7411, 29941, 29906, 29897, 13, 12, 12, 12, 29937, 1583, 29889, 1767, 29918, 3207, 29918, 29906, 29918, 353, 15886, 29889, 16174, 29898, 11228, 29918, 1767, 353, 29871, 29896, 29892, 7945, 519, 353, 5852, 29892, 26688, 353, 15886, 29889, 7411, 29941, 29906, 29897, 13, 12, 12, 12, 29937, 1583, 29889, 1767, 29918, 3207, 29918, 29941, 29918, 353, 15886, 29889, 16174, 29898, 11228, 29918, 1767, 353, 448, 29896, 29892, 7945, 519, 353, 5852, 29892, 26688, 353, 15886, 29889, 7411, 29941, 29906, 29897, 13, 12, 12, 12, 13, 12, 12, 12, 29937, 1311, 29889, 1767, 29918, 3207, 29918, 29906, 29918, 334, 15886, 29889, 4548, 29898, 1311, 29889, 1767, 29918, 3207, 29918, 29896, 29918, 334, 15886, 29889, 29879, 802, 29872, 911, 29898, 1311, 29889, 2176, 29890, 29918, 14634, 29918, 876, 718, 1583, 29889, 1767, 29918, 3207, 29918, 29941, 29918, 13, 12, 12, 12, 29937, 1311, 29889, 1767, 29918, 353, 29871, 29896, 448, 15886, 29889, 29879, 802, 29872, 911, 29898, 13264, 29889, 21570, 29889, 29277, 29889, 3730, 29918, 18045, 29898, 13264, 29889, 17469, 29918, 2083, 29898, 1311, 29889, 2176, 29918, 29890, 29896, 29918, 448, 1583, 29889, 2176, 29918, 29890, 29906, 3383, 9685, 353, 29871, 29906, 511, 29871, 29896, 29892, 26229, 29918, 9144, 353, 6213, 876, 13, 12, 12, 12, 1311, 29889, 1727, 29918, 1707, 1761, 29918, 29939, 29918, 353, 518, 29894, 363, 325, 297, 15886, 29889, 657, 29918, 10855, 29898, 13264, 29889, 9527, 15506, 29889, 29911, 4717, 1177, 6181, 29918, 26865, 29902, 6181, 29903, 29897, 565, 325, 29889, 978, 29889, 27382, 2541, 877, 29939, 29918, 1212, 1495, 29962, 13, 12, 12, 12, 1311, 29889, 15227, 2133, 29918, 29939, 29918, 353, 29871, 29896, 29872, 29899, 29946, 334, 15886, 29889, 1202, 29918, 29876, 4197, 15886, 29889, 15755, 29889, 29880, 29906, 29918, 6758, 29898, 29894, 29897, 363, 325, 297, 1583, 29889, 1727, 29918, 1707, 1761, 29918, 29939, 29918, 565, 525, 29890, 3173, 29915, 451, 297, 325, 29889, 978, 29871, 2314, 13, 12, 12, 12, 1311, 29889, 29939, 29918, 1212, 29918, 6758, 29918, 1457, 29918, 353, 15886, 29889, 17619, 29898, 1311, 29889, 1767, 29918, 448, 1583, 29889, 29939, 29918, 1212, 29918, 1028, 4270, 19925, 13, 12, 12, 12, 1311, 29889, 8698, 29918, 13168, 29918, 353, 15886, 29889, 517, 29918, 7411, 29898, 13264, 29889, 755, 29889, 7979, 1008, 29898, 1311, 29889, 29939, 29918, 1212, 29918, 1028, 4270, 3383, 29871, 29900, 29889, 29900, 876, 13, 12, 12, 12, 1311, 29889, 14057, 29918, 13168, 29918, 353, 15886, 29889, 517, 29918, 7411, 29898, 13264, 29889, 755, 29889, 7979, 1008, 29898, 29900, 29889, 29900, 29892, 1583, 29889, 29939, 29918, 1212, 29918, 1028, 4270, 29918, 876, 13, 12, 12, 12, 1311, 29889, 326, 5521, 749, 29918, 2238, 18745, 29918, 353, 1583, 29889, 8698, 29918, 13168, 29918, 718, 1583, 29889, 14057, 29918, 13168, 29918, 334, 15886, 29889, 4563, 29918, 1217, 29918, 13707, 29898, 13264, 29889, 17469, 29918, 2083, 29898, 1311, 29889, 8698, 29918, 13168, 29918, 511, 15886, 29889, 17469, 29918, 2083, 29898, 1311, 29889, 14057, 29918, 13168, 29918, 876, 13, 12, 12, 12, 29937, 1311, 29889, 29939, 29918, 1212, 29918, 6758, 29918, 353, 15886, 29889, 17469, 29918, 12676, 29898, 1311, 29889, 29939, 29918, 1212, 29918, 6758, 29918, 1457, 29918, 334, 15886, 29889, 517, 29918, 7411, 29898, 1311, 29889, 29939, 29918, 1212, 29918, 6758, 29918, 1457, 29918, 1405, 29871, 29900, 29889, 29900, 29945, 29897, 334, 1583, 29889, 326, 5521, 749, 29918, 2238, 18745, 19925, 718, 1583, 29889, 15227, 2133, 29918, 29939, 29918, 13, 12, 12, 12, 1311, 29889, 29939, 29918, 1212, 29918, 6758, 29918, 353, 15886, 29889, 17469, 29918, 12676, 29898, 1311, 29889, 29939, 29918, 1212, 29918, 6758, 29918, 1457, 29918, 334, 1583, 29889, 326, 5521, 749, 29918, 2238, 18745, 19925, 718, 1583, 29889, 15227, 2133, 29918, 29939, 29918, 13, 12, 12, 12, 1311, 29889, 29939, 29918, 1212, 29918, 1707, 1761, 29918, 353, 518, 29894, 363, 325, 297, 15886, 29889, 657, 29918, 10855, 29898, 13264, 29889, 9527, 15506, 29889, 29911, 4717, 1177, 6181, 29918, 26865, 29902, 6181, 29903, 29897, 565, 325, 29889, 978, 29889, 27382, 2541, 877, 29939, 29918, 1212, 1495, 29962, 13, 12, 12, 12, 1311, 29889, 29939, 29918, 1212, 29918, 14968, 29918, 459, 29918, 353, 1583, 29889, 29939, 29918, 1212, 29918, 3670, 5396, 1195, 326, 675, 29898, 1311, 29889, 29939, 29918, 1212, 29918, 6758, 3383, 722, 29918, 1761, 353, 1583, 29889, 29939, 29918, 1212, 29918, 1707, 1761, 19925, 13, 12, 12, 1311, 29889, 7827, 29918, 12657, 29918, 353, 15886, 29889, 14968, 29889, 29903, 12483, 4197, 29894, 363, 325, 297, 15886, 29889, 657, 29918, 10855, 29898, 13264, 29889, 9527, 15506, 29889, 29954, 28902, 1964, 29918, 26865, 29902, 6181, 29903, 29897, 565, 525, 3253, 314, 29915, 451, 297, 325, 29889, 978, 2314, 13, 12, 12, 1311, 29889, 7827, 29918, 4977, 369, 29918, 353, 15886, 29889, 14968, 29889, 29903, 12483, 580, 13, 13, 12, 1753, 7945, 29918, 6596, 2575, 29918, 5504, 29898, 1311, 29892, 848, 29918, 16175, 1125, 13, 12, 12, 3383, 4891, 29918, 296, 14441, 29892, 17750, 29918, 11965, 29892, 13446, 29892, 4188, 22342, 353, 1583, 29889, 29879, 404, 29889, 3389, 4197, 1311, 29889, 6596, 2575, 29918, 5504, 29918, 14968, 29918, 459, 3383, 1583, 29889, 19128, 29918, 296, 14441, 3383, 1583, 29889, 6596, 2575, 29918, 11965, 3383, 1583, 29889, 6596, 2575, 29918, 11965, 29918, 29896, 3383, 1583, 29889, 2176, 29918, 7645, 29918, 29906, 29918, 12324, 29918, 1402, 13, 12, 12, 12, 12, 12, 12, 29871, 8343, 29918, 8977, 353, 426, 1311, 29889, 18945, 29918, 6596, 2575, 29918, 29901, 848, 29918, 16175, 1839, 16304, 29918, 6596, 2575, 7464, 13, 12, 12, 12, 12, 12, 12, 1678, 12, 12, 12, 259, 1583, 29889, 4906, 29918, 29901, 848, 29918, 16175, 1839, 4906, 7464, 13, 12, 12, 12, 12, 12, 12, 1678, 12, 12, 12, 259, 1583, 29889, 5721, 1461, 943, 29918, 29901, 848, 29918, 16175, 1839, 5721, 1461, 943, 7464, 13, 12, 12, 12, 12, 12, 12, 1678, 12, 12, 12, 259, 1583, 29889, 18945, 29918, 6596, 2575, 29918, 1028, 4270, 29918, 29901, 848, 29918, 16175, 1839, 1482, 29918, 6596, 2575, 2033, 1800, 13, 12, 12, 13, 12, 12, 2457, 4891, 29918, 296, 14441, 29892, 17750, 29918, 11965, 29892, 13446, 7503, 29896, 29900, 1402, 4188, 22342, 7503, 29896, 29900, 29962, 13, 13, 12, 1753, 758, 14968, 29918, 27495, 18970, 29918, 6596, 2575, 29918, 5504, 29898, 1311, 29892, 6964, 29918, 27959, 29892, 15703, 29918, 1457, 26495, 29918, 24530, 29892, 15703, 29918, 1457, 14968, 29918, 16175, 29918, 2311, 29892, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 371, 11665, 29918, 1457, 14968, 29918, 384, 415, 29918, 3972, 29892, 15703, 29918, 1457, 14968, 29918, 384, 415, 29918, 978, 29892, 6773, 29918, 24530, 353, 29871, 29900, 29892, 17436, 353, 7700, 1125, 13, 12, 12, 361, 451, 2897, 29889, 2084, 29889, 9933, 29898, 371, 11665, 29918, 1457, 14968, 29918, 384, 415, 29918, 3972, 1125, 13, 12, 12, 12, 359, 29889, 29885, 12535, 12935, 29898, 371, 11665, 29918, 1457, 14968, 29918, 384, 415, 29918, 3972, 29897, 13, 13, 12, 12, 384, 415, 353, 15886, 29889, 14968, 29889, 657, 29918, 3198, 3149, 29918, 3859, 29898, 371, 11665, 29918, 1457, 14968, 29918, 384, 415, 29918, 3972, 29897, 13, 12, 12, 14968, 29918, 24530, 353, 15703, 29918, 1457, 26495, 29918, 24530, 13, 12, 12, 361, 274, 29895, 415, 29901, 13, 12, 12, 12, 1311, 29889, 6596, 2575, 29918, 5504, 29918, 12657, 5396, 5060, 487, 29898, 1311, 29889, 29879, 404, 29892, 274, 29895, 415, 29889, 4299, 29918, 3198, 3149, 29918, 2084, 29897, 13, 12, 12, 12, 2158, 877, 29147, 15703, 17750, 2767, 274, 29895, 415, 515, 1273, 29879, 29915, 1273, 15703, 29918, 1457, 14968, 29918, 384, 415, 29918, 3972, 29897, 13, 12, 12, 12, 14968, 29918, 24530, 353, 6773, 29918, 24530, 13, 12, 12, 2870, 29901, 13, 12, 12, 12, 2158, 877, 29089, 7500, 15703, 17750, 2767, 274, 29895, 415, 515, 1273, 29879, 29915, 1273, 15703, 29918, 1457, 14968, 29918, 384, 415, 29918, 3972, 29897, 13, 12, 12, 12, 13, 12, 12, 5753, 2002, 2478, 353, 5159, 13, 12, 12, 29880, 29896, 29918, 12765, 29879, 353, 5159, 13, 12, 12, 27495, 18970, 29918, 15866, 24733, 353, 5159, 13, 12, 12, 1454, 18696, 297, 3464, 29898, 14968, 29918, 24530, 1125, 13, 12, 12, 12, 1272, 29918, 16175, 353, 6964, 29918, 27959, 29889, 17158, 29918, 16175, 29898, 371, 11665, 29918, 1457, 14968, 29918, 16175, 29918, 2311, 29897, 13, 12, 12, 12, 19128, 29918, 296, 14441, 29892, 17750, 29918, 11965, 29892, 13446, 29892, 4188, 22342, 353, 1583, 29889, 14968, 29918, 6596, 2575, 29918, 5504, 29898, 1272, 29918, 16175, 29897, 13, 12, 12, 12, 13, 12, 12, 12, 29880, 29896, 29918, 12765, 353, 7442, 29889, 2083, 29898, 6897, 29898, 6596, 2575, 29918, 11965, 448, 848, 29918, 16175, 1839, 1482, 29918, 6596, 2575, 2033, 511, 9685, 353, 29871, 29896, 29897, 13, 12, 12, 12, 15728, 353, 313, 29880, 29896, 29918, 12765, 5277, 29871, 29945, 29872, 29899, 29906, 29897, 13, 12, 12, 12, 27495, 18970, 29918, 15866, 549, 353, 7442, 29889, 12676, 29898, 9302, 29889, 2083, 3552, 1272, 29918, 16175, 1839, 1482, 29918, 6596, 2575, 2033, 1275, 29871, 29900, 29897, 334, 313, 6596, 2575, 29918, 11965, 1405, 29871, 29896, 29872, 29899, 29945, 511, 9685, 353, 29871, 29896, 29897, 1405, 29871, 29900, 29897, 13, 12, 12, 12, 5753, 2002, 2478, 29889, 4397, 29898, 9302, 29889, 12676, 29898, 15728, 876, 13, 12, 12, 12, 29880, 29896, 29918, 12765, 29879, 29889, 4397, 29898, 9302, 29889, 12676, 29898, 29880, 29896, 29918, 12765, 876, 13, 12, 12, 12, 27495, 18970, 29918, 15866, 24733, 29889, 4397, 29898, 27495, 18970, 29918, 15866, 549, 29897, 13, 12, 12, 12, 361, 7442, 29889, 2083, 29898, 9302, 29889, 275, 13707, 29898, 6596, 2575, 29918, 11965, 876, 2804, 29871, 29900, 29901, 13, 12, 12, 12, 12, 29886, 2585, 29889, 842, 29918, 15003, 580, 13, 12, 12, 12, 361, 18696, 1273, 29871, 29896, 29900, 29900, 29900, 1275, 29871, 29900, 322, 451, 17436, 29901, 13, 12, 12, 12, 12, 2158, 877, 29961, 29911, 29995, 29881, 29962, 9853, 2099, 4891, 24687, 29901, 1273, 29888, 29892, 2099, 1035, 2002, 2478, 29901, 1273, 29888, 29892, 2099, 301, 29896, 29901, 1273, 29888, 29892, 23041, 18970, 2743, 29901, 1273, 29888, 12764, 13, 12, 12, 12, 12, 12, 29871, 1273, 313, 1372, 718, 29871, 29896, 29892, 4891, 29918, 296, 14441, 29892, 7442, 29889, 12676, 29898, 5753, 2002, 2478, 511, 7442, 29889, 12676, 29898, 29880, 29896, 29918, 12765, 29879, 511, 7442, 29889, 12676, 29898, 27495, 18970, 29918, 15866, 24733, 4961, 13, 12, 12, 12, 12, 2095, 17559, 1171, 29918, 3571, 29892, 17750, 29918, 1707, 29918, 29896, 29881, 353, 1583, 29889, 29879, 404, 29889, 3389, 4197, 1311, 29889, 2095, 17559, 1171, 29918, 3571, 3383, 1583, 29889, 6596, 2575, 29918, 1707, 29918, 29896, 29881, 29918, 2314, 13, 12, 12, 12, 12, 2158, 877, 2095, 17559, 1171, 29918, 3571, 29901, 1273, 29888, 29892, 17750, 29918, 1707, 29918, 29896, 29881, 29901, 1273, 29888, 29915, 1273, 313, 2095, 17559, 1171, 29918, 3571, 29892, 17750, 29918, 1707, 29918, 29896, 29881, 876, 13, 12, 12, 12, 12, 2158, 877, 1482, 29918, 6596, 2575, 29901, 25710, 13, 12, 12, 12, 12, 2158, 29898, 1272, 29918, 16175, 1839, 1482, 29918, 6596, 2575, 2033, 7503, 29896, 29900, 2314, 13, 12, 12, 12, 12, 2158, 877, 29886, 13479, 29901, 25710, 13, 12, 12, 12, 12, 2158, 29898, 1272, 29918, 16175, 1839, 16304, 29918, 6596, 2575, 2033, 7503, 29896, 29900, 2314, 13, 12, 12, 12, 12, 2158, 877, 5081, 22342, 29901, 25710, 13, 12, 12, 12, 12, 2158, 29898, 5081, 22342, 29897, 13, 12, 12, 12, 12, 2158, 877, 2490, 261, 1611, 29901, 25710, 13, 12, 12, 12, 12, 2158, 29898, 2490, 261, 1611, 29897, 13, 12, 12, 12, 12, 2158, 877, 27711, 29918, 6596, 2575, 29901, 25710, 13, 12, 12, 12, 12, 2158, 29898, 6596, 2575, 29918, 11965, 7503, 29896, 29900, 2314, 13, 12, 12, 12, 12, 361, 7442, 29889, 12676, 29898, 5753, 2002, 2478, 29897, 1405, 29871, 29900, 29889, 29929, 29901, 13, 12, 12, 12, 12, 12, 29937, 13140, 353, 7442, 29889, 8172, 29889, 9502, 524, 29898, 371, 11665, 29918, 1457, 14968, 29918, 16175, 29918, 2311, 29897, 13, 12, 12, 12, 12, 12, 13140, 353, 15703, 29918, 1457, 14968, 29918, 16175, 29918, 2311, 13, 12, 12, 12, 12, 12, 1454, 474, 297, 3464, 29898, 13140, 1125, 13, 12, 12, 12, 12, 12, 12, 2158, 28909, 29873, 3646, 29901, 742, 848, 29918, 16175, 1839, 1482, 29918, 6596, 2575, 2033, 29961, 29875, 29892, 584, 2314, 13, 12, 12, 12, 12, 12, 12, 2158, 28909, 29873, 8500, 742, 17750, 29918, 11965, 29961, 29875, 29892, 584, 2314, 13, 12, 12, 12, 12, 5753, 2002, 2478, 353, 5159, 13, 12, 12, 12, 12, 29880, 29896, 29918, 12765, 29879, 353, 5159, 13, 12, 12, 12, 12, 27495, 18970, 29918, 15866, 24733, 353, 5159, 13, 12, 12, 12, 361, 313, 1372, 718, 29871, 29896, 29897, 1273, 29871, 29896, 29900, 29900, 29900, 29900, 1275, 29871, 29900, 29901, 13, 12, 12, 12, 12, 1311, 29889, 6596, 2575, 29918, 5504, 29918, 4977, 369, 5396, 7620, 29898, 1311, 29889, 29879, 404, 29892, 2897, 29889, 2084, 29889, 7122, 29898, 371, 11665, 29918, 1457, 14968, 29918, 384, 415, 29918, 3972, 29892, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 259, 15703, 29918, 1457, 14968, 29918, 384, 415, 29918, 978, 511, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 29871, 5534, 29918, 10568, 353, 15703, 29918, 1457, 26495, 29918, 24530, 29897, 13, 12, 12, 12, 12, 2158, 877, 29903, 10511, 15703, 17750, 2767, 274, 29895, 415, 304, 1273, 29879, 1156, 1273, 29881, 6694, 12764, 13, 12, 12, 12, 12, 29871, 1273, 313, 371, 11665, 29918, 1457, 14968, 29918, 384, 415, 29918, 3972, 29892, 18696, 876, 13, 12, 12, 361, 7945, 29918, 24530, 2804, 29871, 29900, 29901, 13, 12, 12, 12, 1311, 29889, 6596, 2575, 29918, 5504, 29918, 4977, 369, 5396, 7620, 29898, 1311, 29889, 29879, 404, 29892, 2897, 29889, 2084, 29889, 7122, 29898, 371, 11665, 29918, 1457, 14968, 29918, 384, 415, 29918, 3972, 29892, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 259, 15703, 29918, 1457, 14968, 29918, 384, 415, 29918, 978, 511, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 29871, 5534, 29918, 10568, 353, 15703, 29918, 1457, 26495, 29918, 24530, 29897, 13, 12, 12, 12, 2158, 877, 29903, 10511, 15703, 17750, 2767, 274, 29895, 415, 304, 1273, 29879, 1156, 1273, 29881, 6694, 12764, 13, 12, 12, 12, 12, 29871, 1273, 313, 371, 11665, 29918, 1457, 14968, 29918, 384, 415, 29918, 3972, 29892, 7945, 29918, 24530, 876, 13, 13, 12, 1753, 7945, 29918, 29939, 29918, 1212, 29898, 1311, 29892, 848, 29918, 16175, 1125, 13, 12, 12, 3383, 3855, 29918, 1212, 29918, 6758, 29892, 995, 353, 1583, 29889, 29879, 404, 29889, 3389, 4197, 1311, 29889, 29939, 29918, 1212, 29918, 14968, 29918, 459, 3383, 1583, 29889, 29939, 29918, 1212, 29918, 6758, 3383, 1583, 29889, 1767, 29918, 1402, 29905, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 29871, 8343, 29918, 8977, 353, 426, 1311, 29889, 29939, 29918, 1212, 29918, 1028, 4270, 29918, 29901, 848, 29918, 16175, 1839, 5182, 29918, 29939, 7464, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 259, 12, 12, 12, 259, 1583, 29889, 18945, 29918, 6596, 2575, 29918, 29901, 848, 29918, 16175, 1839, 18945, 29918, 6596, 2575, 7464, 13, 12, 12, 12, 12, 12, 12, 1678, 12, 12, 12, 1678, 12, 12, 12, 259, 1583, 29889, 4906, 29918, 29901, 848, 29918, 16175, 1839, 4906, 7464, 13, 12, 12, 12, 12, 12, 12, 1678, 12, 12, 12, 1678, 12, 12, 12, 259, 1583, 29889, 5721, 1461, 943, 29918, 29901, 848, 29918, 16175, 1839, 5721, 1461, 943, 7464, 13, 12, 12, 12, 12, 12, 12, 1678, 12, 12, 12, 1678, 12, 12, 12, 259, 1583, 29889, 371, 11665, 29918, 6596, 2575, 29918, 29901, 848, 29918, 16175, 1839, 371, 11665, 29918, 6596, 2575, 2033, 1800, 13, 12, 12, 2158, 877, 29984, 6509, 6410, 29901, 1273, 29888, 29915, 1273, 3855, 29918, 1212, 29918, 6758, 29897, 13, 12, 12, 2429, 29916, 353, 7442, 29889, 8172, 29889, 9502, 524, 29898, 1767, 29889, 12181, 29961, 29900, 2314, 13, 12, 12, 29937, 2158, 29898, 1767, 29961, 2429, 29916, 1402, 848, 29918, 16175, 1839, 5182, 29918, 29939, 2033, 29961, 2429, 29916, 2314, 13, 12, 12, 2158, 877, 29900, 29889, 29947, 29901, 1273, 29888, 29892, 29871, 29900, 29889, 29906, 29901, 1273, 29888, 29915, 1273, 313, 9302, 29889, 2083, 29898, 1767, 334, 313, 1272, 29918, 16175, 1839, 5182, 29918, 29939, 2033, 1275, 29871, 29900, 29889, 29947, 876, 847, 7442, 29889, 2083, 29898, 1272, 29918, 16175, 1839, 5182, 29918, 29939, 2033, 1275, 29871, 29900, 29889, 29947, 511, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 9302, 29889, 2083, 29898, 1767, 334, 313, 1272, 29918, 16175, 1839, 5182, 29918, 29939, 2033, 1275, 448, 29900, 29889, 29906, 876, 847, 7442, 29889, 2083, 29898, 1272, 29918, 16175, 1839, 5182, 29918, 29939, 2033, 1275, 448, 29900, 29889, 29906, 4961, 13, 12, 12, 2158, 877, 29911, 4204, 261, 995, 707, 29901, 742, 995, 29961, 2429, 29916, 29901, 8177, 29916, 718, 29871, 29896, 29900, 1402, 848, 29918, 16175, 1839, 5182, 29918, 29939, 2033, 29961, 2429, 29916, 29901, 8177, 29916, 718, 29871, 29896, 29900, 2314, 13, 12, 12, 29937, 2158, 29898, 5721, 312, 29879, 29918, 1725, 271, 29918, 20158, 29918, 29941, 29961, 2429, 29916, 29892, 584, 2314, 13, 13, 12, 12, 2457, 3855, 29918, 1212, 29918, 6758, 13, 13, 12, 1753, 679, 29918, 29939, 29918, 1767, 29918, 1454, 29918, 497, 29918, 7645, 29898, 1311, 29892, 15703, 29918, 6596, 2575, 29892, 8368, 29918, 6596, 2575, 29892, 8297, 287, 29918, 535, 1547, 29879, 1125, 13, 12, 12, 13, 12, 12, 497, 29918, 7645, 29918, 17987, 29881, 886, 353, 7442, 29889, 22350, 29898, 1311, 29889, 4906, 29918, 3493, 29918, 2311, 19925, 13, 12, 12, 371, 11665, 29918, 6596, 2575, 29918, 29873, 488, 353, 7442, 29889, 29873, 488, 29898, 371, 11665, 29918, 6596, 2575, 29892, 313, 1311, 29889, 4906, 29918, 3493, 29918, 2311, 3383, 29871, 29896, 876, 13, 12, 12, 18945, 29918, 6596, 2575, 29918, 29873, 488, 353, 7442, 29889, 29873, 488, 29898, 18945, 29918, 6596, 2575, 29892, 313, 1311, 29889, 4906, 29918, 3493, 29918, 2311, 3383, 29871, 29896, 876, 13, 12, 12, 17987, 287, 29918, 535, 1547, 29879, 29918, 29873, 488, 353, 7442, 29889, 29873, 488, 29898, 17987, 287, 29918, 535, 1547, 29879, 29892, 313, 1311, 29889, 4906, 29918, 3493, 29918, 2311, 3383, 29871, 29896, 29892, 29871, 29896, 876, 13, 13, 12, 12, 29939, 29918, 5975, 29892, 17750, 29918, 11965, 29892, 1320, 312, 29879, 29918, 1725, 271, 29918, 20158, 29918, 29941, 29892, 17750, 29918, 22992, 29892, 10191, 29918, 342, 29918, 20158, 353, 1583, 29889, 29879, 404, 29889, 3389, 4197, 1311, 29889, 1767, 3383, 1583, 29889, 6596, 2575, 29918, 11965, 3383, 1583, 29889, 5721, 312, 29879, 29918, 1725, 271, 29918, 20158, 29918, 29941, 3383, 1583, 29889, 1767, 3383, 1583, 29889, 7645, 29918, 342, 29918, 20158, 29918, 29906, 29918, 1402, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 259, 12, 18798, 29918, 8977, 353, 426, 1311, 29889, 5721, 1461, 943, 29918, 29901, 8297, 287, 29918, 535, 1547, 29879, 29918, 29873, 488, 29892, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 259, 1583, 29889, 4906, 29918, 29901, 599, 29918, 7645, 29918, 17987, 29881, 886, 29892, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 259, 1583, 29889, 371, 11665, 29918, 6596, 2575, 29918, 29901, 15703, 29918, 6596, 2575, 29918, 29873, 488, 29892, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 259, 1583, 29889, 18945, 29918, 6596, 2575, 29918, 29901, 8368, 29918, 6596, 2575, 29918, 29873, 488, 1800, 13, 12, 12, 2457, 3855, 29918, 5975, 29892, 17750, 29918, 11965, 29892, 1320, 312, 29879, 29918, 1725, 271, 29918, 20158, 29918, 29941, 29892, 17750, 29918, 22992, 29892, 10191, 29918, 342, 29918, 20158, 29961, 29900, 29962, 13, 13, 12, 1753, 2767, 29918, 1212, 29898, 1311, 29892, 17750, 29918, 5504, 29918, 9161, 2701, 29892, 3855, 29918, 21891, 29918, 9161, 2701, 29892, 2767, 29918, 8489, 353, 525, 29933, 720, 29374, 13, 13, 12, 12, 8382, 29918, 23905, 353, 6571, 13, 13, 12, 12, 6596, 2575, 29918, 5504, 29918, 16175, 353, 6571, 13, 12, 12, 6596, 2575, 29918, 5504, 29918, 16175, 1839, 16304, 29918, 6596, 2575, 2033, 353, 5159, 13, 12, 12, 6596, 2575, 29918, 5504, 29918, 16175, 1839, 1482, 29918, 6596, 2575, 2033, 353, 5159, 13, 12, 12, 6596, 2575, 29918, 5504, 29918, 16175, 1839, 4906, 2033, 353, 5159, 13, 12, 12, 6596, 2575, 29918, 5504, 29918, 16175, 1839, 5721, 1461, 943, 2033, 353, 5159, 13, 12, 12, 1454, 17750, 29918, 23583, 297, 17750, 29918, 5504, 29918, 9161, 2701, 29901, 13, 12, 12, 12, 6596, 2575, 29918, 5504, 29918, 16175, 1839, 5721, 1461, 943, 13359, 4397, 29898, 6596, 2575, 29918, 23583, 29961, 29900, 2314, 13, 12, 12, 12, 6596, 2575, 29918, 5504, 29918, 16175, 1839, 16304, 29918, 6596, 2575, 13359, 4397, 29898, 6596, 2575, 29918, 23583, 29961, 29896, 2314, 13, 12, 12, 12, 6596, 2575, 29918, 5504, 29918, 16175, 1839, 4906, 13359, 4397, 29898, 6596, 2575, 29918, 23583, 29961, 29906, 2314, 13, 12, 12, 12, 6596, 2575, 29918, 5504, 29918, 16175, 1839, 1482, 29918, 6596, 2575, 13359, 4397, 29898, 6596, 2575, 29918, 23583, 29961, 29941, 2314, 13, 13, 12, 12, 1454, 413, 297, 17750, 29918, 5504, 29918, 16175, 29901, 13, 12, 12, 12, 6596, 2575, 29918, 5504, 29918, 16175, 29961, 29895, 29962, 353, 7442, 29889, 2378, 29898, 6596, 2575, 29918, 5504, 29918, 16175, 29961, 29895, 2314, 13, 12, 12, 361, 2767, 29918, 8489, 1275, 525, 29933, 720, 29915, 470, 2767, 29918, 8489, 1275, 525, 21140, 2575, 2396, 13, 12, 12, 12, 19128, 29918, 296, 14441, 29892, 17750, 29918, 11965, 353, 1583, 29889, 14968, 29918, 6596, 2575, 29918, 5504, 29898, 6596, 2575, 29918, 5504, 29918, 16175, 29897, 13, 12, 12, 12, 2158, 877, 29911, 4204, 261, 20333, 29879, 17750, 831, 6490, 4891, 29918, 296, 14441, 29901, 1273, 29888, 29915, 1273, 4891, 29918, 296, 14441, 29897, 13, 13, 12, 12, 12, 8382, 29918, 23905, 1839, 371, 11665, 29918, 6596, 2575, 29918, 11965, 2463, 2033, 353, 17750, 29918, 11965, 13, 13, 12, 12, 29939, 29918, 21891, 29918, 16175, 353, 6571, 13, 12, 12, 29939, 29918, 21891, 29918, 16175, 1839, 18945, 29918, 6596, 2575, 2033, 353, 5159, 13, 12, 12, 29939, 29918, 21891, 29918, 16175, 1839, 371, 11665, 29918, 6596, 2575, 2033, 353, 5159, 13, 12, 12, 29939, 29918, 21891, 29918, 16175, 1839, 4906, 2033, 353, 5159, 13, 12, 12, 29939, 29918, 21891, 29918, 16175, 1839, 5721, 1461, 943, 2033, 353, 5159, 13, 12, 12, 29939, 29918, 21891, 29918, 16175, 1839, 5182, 29918, 29939, 2033, 353, 5159, 13, 12, 12, 1454, 3855, 29918, 21891, 29918, 23583, 297, 3855, 29918, 21891, 29918, 9161, 2701, 29901, 13, 12, 12, 12, 29939, 29918, 21891, 29918, 16175, 1839, 5721, 1461, 943, 13359, 4397, 29898, 29939, 29918, 21891, 29918, 23583, 29961, 29900, 2314, 13, 12, 12, 12, 29939, 29918, 21891, 29918, 16175, 1839, 18945, 29918, 6596, 2575, 13359, 4397, 29898, 29939, 29918, 21891, 29918, 23583, 29961, 29896, 2314, 13, 12, 12, 12, 29939, 29918, 21891, 29918, 16175, 1839, 371, 11665, 29918, 6596, 2575, 13359, 4397, 29898, 29939, 29918, 21891, 29918, 23583, 29961, 29906, 2314, 13, 12, 12, 12, 29939, 29918, 21891, 29918, 16175, 1839, 4906, 13359, 4397, 29898, 29939, 29918, 21891, 29918, 23583, 29961, 29941, 2314, 13, 12, 12, 12, 29939, 29918, 21891, 29918, 16175, 1839, 5182, 29918, 29939, 13359, 4397, 29898, 29939, 29918, 21891, 29918, 23583, 29961, 29946, 2314, 13, 13, 13, 12, 12, 1454, 413, 297, 3855, 29918, 21891, 29918, 16175, 29901, 13, 12, 12, 12, 29939, 29918, 21891, 29918, 16175, 29961, 29895, 29962, 353, 7442, 29889, 2378, 29898, 29939, 29918, 21891, 29918, 16175, 29961, 29895, 2314, 13, 12, 12, 361, 2767, 29918, 8489, 1275, 525, 29933, 720, 29915, 470, 2767, 29918, 8489, 1275, 525, 29984, 29899, 6779, 2396, 13, 12, 12, 12, 29939, 29918, 1212, 29918, 6758, 353, 1583, 29889, 14968, 29918, 29939, 29918, 1212, 29898, 29939, 29918, 21891, 29918, 16175, 29897, 13, 13, 12, 12, 2457, 4744, 29918, 23905, 13, 12, 12, 13, 13, 361, 4770, 978, 1649, 1275, 525, 1649, 3396, 1649, 2396, 13, 12, 3396, 580, 13, 2 ]
src/game/law_scope.py
Tequilac/Hacknarok2021
1
166325
<filename>src/game/law_scope.py<gh_stars>1-10 from enum import Enum, auto class LawScope(Enum): state = auto() city = auto()
[ 1, 529, 9507, 29958, 4351, 29914, 11802, 29914, 10653, 29918, 6078, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 3166, 14115, 1053, 1174, 398, 29892, 4469, 13, 13, 13, 1990, 7927, 15289, 29898, 16854, 1125, 13, 1678, 2106, 353, 4469, 580, 13, 1678, 4272, 353, 4469, 580, 13, 2 ]
src/engineV2.py
JTechnologies/daze-lang
2
72540
<filename>src/engineV2.py escapeProtect = "🵋" def parseTag(line, skip=0): skipNext = skip split = line.replace("\:", "🵋") split = line.split(":") for i in range(len(split)-1): split[i] = split[i].replace("🵋", ":") split[i] = split[i].replace("\(", "🵋") split[0] = split[0].replace("(", "") for i in range(len(split)-1): split[i].replace("🵋", "(") if len(split) != 2: for i in range(1,len(split)): if skipNext!=0: skipNext = skipNext-1 pass elif skipNext==0: split[i] = split[i].replace("\)", "🵋") split[i] = split[i].replace(")", "") split[i] = split[i].replace("🵋", ")") if split[i][0] == " ": if split[i][1] == "'" or split[i][1] == '"': split[i] = split[i][2:-1] elif split[i][1] == "(": print(split[i]) this = split[i][1:] next = split[i+1] fl = True c=1 p=next while fl==True: if p[0] == "(" or p[1] == "(": next=f'{next}:{split[i+c]}' p = split[i+c] skipNext=skipNext+1 c=c+1 else: skipNext=skipNext+1 fl = False while next[-1] == ")": if next[-1] == ")": next = next[0:-1] addBack = 0 for j in range(len(next)): if(next[j] == "("): addBack = addBack + 1 while addBack>0: next=next+")" addBack = addBack-1 print(i) split[i] = parseTag(f"{this}:{next}", skip=skipNext) elif split[i][0] == "'" or '"': split[i] = split[1][2:-1] elif split[i][0] == "(": print(split[i]) this = split[i][1:] next = split[i+1] fl = True c=1 p=next while fl==True: if p[0] == "(" or p[1] == "(": next=f'{next}:{split[i+c]}' p = split[i+c] skipNext=skipNext+1 c=c+1 else: skipNext=skipNext+1 fl = False while next[-1] == ")": if next[-1] == ")": next = next[0:-1] addBack = 0 for j in range(len(next)): if(next[j] == "("): addBack = addBack + 1 while addBack>0: next=next+")" addBack = addBack-1 print(i) split[i] = parseTag(f"{this}:{next}", skip=skipNext) else: split[1] = split[1].replace("\)", "🵋") split[1] = split[1].replace(")", "") split[1] = split[1].replace("🵋", ")") if split[1][0] == " ": if split[1][1] == "'" or '"': split[1] = split[1][2:-1] elif split[1][1] == "(": print("ERR") elif split[1][0] == "'" or '"': split[1] = split[1][2:-1] elif split[1][0] == "(": pass #print([split[0], split[1]]) return [split[0],split[1]] def parseSite(input): lines = [] comments=[] variables={} metavariables={} tags=[] for line in input: lines.append(line) for line in lines: if line[:2] == "##": comments.append(line[2:]) elif line[:2] == "+!": variable = line[2:].replace(" = ", "=").split("=") if variable[1][0] == "'" or variable[1][0] == '"': variable[1] =['str', variable[1][1:-1]] elif variable[1] == "True" or variable[1] == "False": variable[1]=['bol', variable[1]] elif int(variable[1]): variable[1]=['int', variable[1]] elif variable[1][0] == "!": variable[1]=variables[variable[1]] elif variable[1][0] == "%": variable[1]=metavariables[variable[1]] else: #TODO: GET CURRENT LINE NUMBER FOR ERROR return("!!Error on line (tba): Invalid Variable Type") variables[variable[0]]=variable[1] elif line[:2] == "+%": variable = line[2:].replace(" = ", "=").split("=") if variable[1][0] == "'" or variable[1][0] == '"': variable[1] =['str', variable[1][1:-1]] elif variable[1] == "True" or variable[1] == "False": variable[1]=['bol', variable[1]] elif int(variable[1]): variable[1]=['int', variable[1]] elif variable[1][0] == "!": variable[1]=variables[variable[1]] elif variable[1][0] == "%": variable[1]=metavariables[variable[1]] else: #TODO: GET CURRENT LINE NUMBER FOR ERROR return("!!Error on line (tba): Invalid MetaVariable Type") metavariables[variable[0]]=variable[1] elif line[0] == "(": tags.append(parseTag(line)) #print(parseTag(line)) elif line[0] == "$": pass elif line[0] == "+": working = line working = working[1:] working = working.replace(" = ", "=").split("=") if working[1][0] == "!": working[1]=variables[working[1][1:]][1] elif working[1][0] == "'" or working[1][0] == '"': working[1]=working[1][1:-1] tag = tags[-1] #print(tag) if len(tag) == 2: tag.append([working]) elif len(tag) == 3: tag[2].append(working) else: return("!!Error: Internal Error. Submit an issue with code 'r01:ev2:086'") #print(tag) else: return(f"!!Error on line (tba): Unknown line start. {line}") return comments, variables, metavariables, tags def toHtml(input, part="head"): textInput = input input = input.replace("; ", "\n").replace(";", "\n") input = input.replace("\\\n", ";") input = input.splitlines() tags = [] comments = [] variables = {} metavariables = {} print(input, "\n") if input[0] == "$site": comments, variables, metavariables, tags = parseSite(input) elif input[0] == "$script": return "!!Error: Attempt to compile pure script into HTML" else: return f"!!Error on line 1: Unknown Daze type '{input[0]}'" output = input return metavariables, variables, tags, comments # Testing Area print(toHtml("$site; +!lol = 'rofl'; (div: (div: (div: (p: 'hey')))); +lol='lol'"))
[ 1, 529, 9507, 29958, 4351, 29914, 10599, 29963, 29906, 29889, 2272, 13, 21587, 1184, 371, 312, 353, 376, 243, 162, 184, 142, 29908, 13, 1753, 6088, 8176, 29898, 1220, 29892, 14383, 29922, 29900, 1125, 13, 1678, 14383, 9190, 353, 14383, 13, 1678, 6219, 353, 1196, 29889, 6506, 14182, 29901, 613, 376, 243, 162, 184, 142, 1159, 13, 1678, 6219, 353, 1196, 29889, 5451, 703, 29901, 1159, 13, 1678, 363, 474, 297, 3464, 29898, 2435, 29898, 5451, 6817, 29896, 1125, 13, 4706, 6219, 29961, 29875, 29962, 353, 6219, 29961, 29875, 1822, 6506, 703, 243, 162, 184, 142, 613, 29242, 1159, 13, 4706, 6219, 29961, 29875, 29962, 353, 6219, 29961, 29875, 1822, 6506, 14182, 28165, 376, 243, 162, 184, 142, 1159, 13, 1678, 6219, 29961, 29900, 29962, 353, 6219, 29961, 29900, 1822, 6506, 703, 28165, 20569, 13, 1678, 363, 474, 297, 3464, 29898, 2435, 29898, 5451, 6817, 29896, 1125, 13, 4706, 6219, 29961, 29875, 1822, 6506, 703, 243, 162, 184, 142, 613, 376, 703, 29897, 13, 1678, 565, 7431, 29898, 5451, 29897, 2804, 29871, 29906, 29901, 13, 4706, 363, 474, 297, 3464, 29898, 29896, 29892, 2435, 29898, 5451, 22164, 13, 9651, 565, 14383, 9190, 19216, 29900, 29901, 13, 18884, 14383, 9190, 353, 14383, 9190, 29899, 29896, 13, 18884, 1209, 13, 9651, 25342, 14383, 9190, 1360, 29900, 29901, 13, 18884, 6219, 29961, 29875, 29962, 353, 6219, 29961, 29875, 1822, 6506, 703, 7244, 613, 376, 243, 162, 184, 142, 1159, 13, 18884, 6219, 29961, 29875, 29962, 353, 6219, 29961, 29875, 1822, 6506, 703, 19123, 20569, 13, 18884, 6219, 29961, 29875, 29962, 353, 6219, 29961, 29875, 1822, 6506, 703, 243, 162, 184, 142, 613, 16521, 1159, 13, 18884, 565, 6219, 29961, 29875, 3816, 29900, 29962, 1275, 376, 29242, 13, 462, 1678, 565, 6219, 29961, 29875, 3816, 29896, 29962, 1275, 376, 11838, 470, 6219, 29961, 29875, 3816, 29896, 29962, 1275, 18793, 2396, 13, 462, 4706, 6219, 29961, 29875, 29962, 353, 6219, 29961, 29875, 3816, 29906, 13018, 29896, 29962, 13, 462, 1678, 25342, 6219, 29961, 29875, 3816, 29896, 29962, 1275, 376, 703, 29901, 13, 462, 4706, 1596, 29898, 5451, 29961, 29875, 2314, 13, 462, 4706, 445, 353, 6219, 29961, 29875, 3816, 29896, 17531, 13, 462, 4706, 2446, 353, 6219, 29961, 29875, 29974, 29896, 29962, 13, 462, 4706, 1652, 353, 5852, 13, 462, 4706, 274, 29922, 29896, 13, 462, 4706, 282, 29922, 4622, 13, 462, 4706, 1550, 1652, 1360, 5574, 29901, 13, 462, 9651, 565, 282, 29961, 29900, 29962, 1275, 376, 703, 470, 282, 29961, 29896, 29962, 1275, 376, 703, 29901, 13, 462, 18884, 2446, 29922, 29888, 29915, 29912, 4622, 6177, 29912, 5451, 29961, 29875, 29974, 29883, 29962, 10162, 13, 462, 18884, 282, 353, 6219, 29961, 29875, 29974, 29883, 29962, 13, 462, 18884, 14383, 9190, 29922, 11014, 9190, 29974, 29896, 13, 462, 18884, 274, 29922, 29883, 29974, 29896, 13, 462, 9651, 1683, 29901, 13, 462, 18884, 14383, 9190, 29922, 11014, 9190, 29974, 29896, 13, 462, 18884, 1652, 353, 7700, 13, 462, 4706, 1550, 2446, 14352, 29896, 29962, 1275, 16521, 1115, 13, 462, 9651, 565, 2446, 14352, 29896, 29962, 1275, 16521, 1115, 13, 462, 18884, 2446, 353, 2446, 29961, 29900, 13018, 29896, 29962, 13, 462, 4706, 788, 5841, 353, 29871, 29900, 13, 462, 4706, 363, 432, 297, 3464, 29898, 2435, 29898, 4622, 22164, 13, 462, 9651, 565, 29898, 4622, 29961, 29926, 29962, 1275, 376, 703, 1125, 13, 462, 18884, 788, 5841, 353, 788, 5841, 718, 29871, 29896, 13, 462, 4706, 1550, 788, 5841, 29958, 29900, 29901, 13, 462, 9651, 2446, 29922, 4622, 29974, 1159, 29908, 13, 462, 9651, 788, 5841, 353, 788, 5841, 29899, 29896, 13, 462, 4706, 1596, 29898, 29875, 29897, 13, 462, 4706, 6219, 29961, 29875, 29962, 353, 6088, 8176, 29898, 29888, 29908, 29912, 1366, 6177, 29912, 4622, 17671, 14383, 29922, 11014, 9190, 29897, 13, 18884, 25342, 6219, 29961, 29875, 3816, 29900, 29962, 1275, 376, 11838, 470, 18793, 2396, 13, 462, 1678, 6219, 29961, 29875, 29962, 353, 6219, 29961, 29896, 3816, 29906, 13018, 29896, 29962, 13, 18884, 25342, 6219, 29961, 29875, 3816, 29900, 29962, 1275, 376, 703, 29901, 13, 462, 4706, 1596, 29898, 5451, 29961, 29875, 2314, 13, 462, 4706, 445, 353, 6219, 29961, 29875, 3816, 29896, 17531, 13, 462, 4706, 2446, 353, 6219, 29961, 29875, 29974, 29896, 29962, 13, 462, 4706, 1652, 353, 5852, 13, 462, 4706, 274, 29922, 29896, 13, 462, 4706, 282, 29922, 4622, 13, 462, 4706, 1550, 1652, 1360, 5574, 29901, 13, 462, 9651, 565, 282, 29961, 29900, 29962, 1275, 376, 703, 470, 282, 29961, 29896, 29962, 1275, 376, 703, 29901, 13, 462, 18884, 2446, 29922, 29888, 29915, 29912, 4622, 6177, 29912, 5451, 29961, 29875, 29974, 29883, 29962, 10162, 13, 462, 18884, 282, 353, 6219, 29961, 29875, 29974, 29883, 29962, 13, 462, 18884, 14383, 9190, 29922, 11014, 9190, 29974, 29896, 13, 462, 18884, 274, 29922, 29883, 29974, 29896, 13, 462, 9651, 1683, 29901, 13, 462, 18884, 14383, 9190, 29922, 11014, 9190, 29974, 29896, 13, 462, 18884, 1652, 353, 7700, 13, 462, 4706, 1550, 2446, 14352, 29896, 29962, 1275, 16521, 1115, 13, 462, 9651, 565, 2446, 14352, 29896, 29962, 1275, 16521, 1115, 13, 462, 18884, 2446, 353, 2446, 29961, 29900, 13018, 29896, 29962, 13, 462, 4706, 788, 5841, 353, 29871, 29900, 13, 462, 4706, 363, 432, 297, 3464, 29898, 2435, 29898, 4622, 22164, 13, 462, 9651, 565, 29898, 4622, 29961, 29926, 29962, 1275, 376, 703, 1125, 13, 462, 18884, 788, 5841, 353, 788, 5841, 718, 29871, 29896, 13, 462, 4706, 1550, 788, 5841, 29958, 29900, 29901, 13, 462, 9651, 2446, 29922, 4622, 29974, 1159, 29908, 13, 462, 9651, 788, 5841, 353, 788, 5841, 29899, 29896, 13, 462, 4706, 1596, 29898, 29875, 29897, 13, 462, 4706, 6219, 29961, 29875, 29962, 353, 6088, 8176, 29898, 29888, 29908, 29912, 1366, 6177, 29912, 4622, 17671, 14383, 29922, 11014, 9190, 29897, 13, 1678, 1683, 29901, 13, 4706, 6219, 29961, 29896, 29962, 353, 6219, 29961, 29896, 1822, 6506, 703, 7244, 613, 376, 243, 162, 184, 142, 1159, 13, 4706, 6219, 29961, 29896, 29962, 353, 6219, 29961, 29896, 1822, 6506, 703, 19123, 20569, 13, 4706, 6219, 29961, 29896, 29962, 353, 6219, 29961, 29896, 1822, 6506, 703, 243, 162, 184, 142, 613, 16521, 1159, 13, 4706, 565, 6219, 29961, 29896, 3816, 29900, 29962, 1275, 376, 29242, 13, 9651, 565, 6219, 29961, 29896, 3816, 29896, 29962, 1275, 376, 11838, 470, 18793, 2396, 13, 18884, 6219, 29961, 29896, 29962, 353, 6219, 29961, 29896, 3816, 29906, 13018, 29896, 29962, 13, 9651, 25342, 6219, 29961, 29896, 3816, 29896, 29962, 1275, 376, 703, 29901, 13, 18884, 1596, 703, 21662, 1159, 13, 4706, 25342, 6219, 29961, 29896, 3816, 29900, 29962, 1275, 376, 11838, 470, 18793, 2396, 13, 9651, 6219, 29961, 29896, 29962, 353, 6219, 29961, 29896, 3816, 29906, 13018, 29896, 29962, 13, 4706, 25342, 6219, 29961, 29896, 3816, 29900, 29962, 1275, 376, 703, 29901, 13, 9651, 1209, 13, 1678, 396, 2158, 4197, 5451, 29961, 29900, 1402, 6219, 29961, 29896, 24960, 13, 1678, 736, 518, 5451, 29961, 29900, 1402, 5451, 29961, 29896, 5262, 13, 1753, 6088, 17033, 29898, 2080, 1125, 13, 1678, 3454, 353, 5159, 13, 1678, 6589, 29922, 2636, 13, 1678, 3651, 3790, 29913, 13, 1678, 1539, 485, 1306, 1849, 3790, 29913, 13, 1678, 8282, 29922, 2636, 13, 1678, 363, 1196, 297, 1881, 29901, 13, 4706, 3454, 29889, 4397, 29898, 1220, 29897, 13, 1678, 363, 1196, 297, 3454, 29901, 13, 4706, 565, 1196, 7503, 29906, 29962, 1275, 376, 2277, 1115, 13, 9651, 6589, 29889, 4397, 29898, 1220, 29961, 29906, 29901, 2314, 13, 4706, 25342, 1196, 7503, 29906, 29962, 1275, 15691, 29991, 1115, 13, 9651, 2286, 353, 1196, 29961, 29906, 29901, 1822, 6506, 703, 353, 9162, 376, 543, 467, 5451, 703, 543, 29897, 13, 9651, 565, 2286, 29961, 29896, 3816, 29900, 29962, 1275, 376, 11838, 470, 2286, 29961, 29896, 3816, 29900, 29962, 1275, 18793, 2396, 13, 18884, 2286, 29961, 29896, 29962, 353, 1839, 710, 742, 2286, 29961, 29896, 3816, 29896, 13018, 29896, 5262, 13, 9651, 25342, 2286, 29961, 29896, 29962, 1275, 376, 5574, 29908, 470, 2286, 29961, 29896, 29962, 1275, 376, 8824, 1115, 13, 18884, 2286, 29961, 29896, 13192, 1839, 2095, 742, 2286, 29961, 29896, 5262, 13, 9651, 25342, 938, 29898, 11918, 29961, 29896, 29962, 1125, 13, 18884, 2286, 29961, 29896, 13192, 1839, 524, 742, 2286, 29961, 29896, 5262, 13, 9651, 25342, 2286, 29961, 29896, 3816, 29900, 29962, 1275, 376, 29991, 1115, 13, 18884, 2286, 29961, 29896, 13192, 20897, 29961, 11918, 29961, 29896, 5262, 13, 9651, 25342, 2286, 29961, 29896, 3816, 29900, 29962, 1275, 11860, 1115, 13, 18884, 2286, 29961, 29896, 13192, 2527, 485, 1306, 1849, 29961, 11918, 29961, 29896, 5262, 13, 9651, 1683, 29901, 13, 18884, 396, 4986, 3970, 29901, 12354, 315, 4574, 29450, 365, 8895, 28019, 13635, 15842, 14431, 13, 18884, 736, 703, 6824, 2392, 373, 1196, 313, 29873, 2291, 1125, 21403, 28736, 5167, 1159, 13, 9651, 3651, 29961, 11918, 29961, 29900, 5262, 29922, 11918, 29961, 29896, 29962, 13, 4706, 25342, 1196, 7503, 29906, 29962, 1275, 15691, 29995, 1115, 13, 9651, 2286, 353, 1196, 29961, 29906, 29901, 1822, 6506, 703, 353, 9162, 376, 543, 467, 5451, 703, 543, 29897, 13, 9651, 565, 2286, 29961, 29896, 3816, 29900, 29962, 1275, 376, 11838, 470, 2286, 29961, 29896, 3816, 29900, 29962, 1275, 18793, 2396, 13, 18884, 2286, 29961, 29896, 29962, 353, 1839, 710, 742, 2286, 29961, 29896, 3816, 29896, 13018, 29896, 5262, 13, 9651, 25342, 2286, 29961, 29896, 29962, 1275, 376, 5574, 29908, 470, 2286, 29961, 29896, 29962, 1275, 376, 8824, 1115, 13, 18884, 2286, 29961, 29896, 13192, 1839, 2095, 742, 2286, 29961, 29896, 5262, 13, 9651, 25342, 938, 29898, 11918, 29961, 29896, 29962, 1125, 13, 18884, 2286, 29961, 29896, 13192, 1839, 524, 742, 2286, 29961, 29896, 5262, 13, 9651, 25342, 2286, 29961, 29896, 3816, 29900, 29962, 1275, 376, 29991, 1115, 13, 18884, 2286, 29961, 29896, 13192, 20897, 29961, 11918, 29961, 29896, 5262, 13, 9651, 25342, 2286, 29961, 29896, 3816, 29900, 29962, 1275, 11860, 1115, 13, 18884, 2286, 29961, 29896, 13192, 2527, 485, 1306, 1849, 29961, 11918, 29961, 29896, 5262, 13, 9651, 1683, 29901, 13, 18884, 396, 4986, 3970, 29901, 12354, 315, 4574, 29450, 365, 8895, 28019, 13635, 15842, 14431, 13, 18884, 736, 703, 6824, 2392, 373, 1196, 313, 29873, 2291, 1125, 21403, 20553, 16174, 5167, 1159, 13, 9651, 1539, 485, 1306, 1849, 29961, 11918, 29961, 29900, 5262, 29922, 11918, 29961, 29896, 29962, 13, 4706, 25342, 1196, 29961, 29900, 29962, 1275, 376, 703, 29901, 13, 9651, 8282, 29889, 4397, 29898, 5510, 8176, 29898, 1220, 876, 13, 9651, 396, 2158, 29898, 5510, 8176, 29898, 1220, 876, 13, 4706, 25342, 1196, 29961, 29900, 29962, 1275, 3908, 1115, 13, 9651, 1209, 13, 4706, 25342, 1196, 29961, 29900, 29962, 1275, 15691, 1115, 13, 9651, 1985, 353, 1196, 13, 9651, 1985, 353, 1985, 29961, 29896, 17531, 13, 9651, 1985, 353, 1985, 29889, 6506, 703, 353, 9162, 376, 543, 467, 5451, 703, 543, 29897, 13, 9651, 565, 1985, 29961, 29896, 3816, 29900, 29962, 1275, 376, 29991, 1115, 13, 18884, 1985, 29961, 29896, 13192, 20897, 29961, 22899, 29961, 29896, 3816, 29896, 17531, 3816, 29896, 29962, 13, 9651, 25342, 1985, 29961, 29896, 3816, 29900, 29962, 1275, 376, 11838, 470, 1985, 29961, 29896, 3816, 29900, 29962, 1275, 18793, 2396, 13, 18884, 1985, 29961, 29896, 13192, 22899, 29961, 29896, 3816, 29896, 13018, 29896, 29962, 29871, 13, 9651, 4055, 353, 8282, 14352, 29896, 29962, 13, 9651, 396, 2158, 29898, 4039, 29897, 13, 9651, 565, 7431, 29898, 4039, 29897, 1275, 29871, 29906, 29901, 13, 18884, 4055, 29889, 4397, 4197, 22899, 2314, 13, 9651, 25342, 7431, 29898, 4039, 29897, 1275, 29871, 29941, 29901, 13, 18884, 4055, 29961, 29906, 1822, 4397, 29898, 22899, 29897, 13, 9651, 1683, 29901, 13, 18884, 736, 703, 6824, 2392, 29901, 512, 1890, 4829, 29889, 3323, 2415, 385, 2228, 411, 775, 525, 29878, 29900, 29896, 29901, 5750, 29906, 29901, 29900, 29947, 29953, 29915, 1159, 13, 9651, 396, 2158, 29898, 4039, 29897, 13, 4706, 1683, 29901, 13, 9651, 736, 29898, 29888, 29908, 6824, 2392, 373, 1196, 313, 29873, 2291, 1125, 853, 5203, 1196, 1369, 29889, 426, 1220, 27195, 13, 1678, 736, 6589, 29892, 3651, 29892, 1539, 485, 1306, 1849, 29892, 8282, 13, 1753, 304, 10922, 29898, 2080, 29892, 760, 543, 2813, 29908, 1125, 13, 1678, 1426, 4290, 353, 1881, 13, 1678, 1881, 353, 1881, 29889, 6506, 703, 29936, 9162, 6634, 29876, 2564, 6506, 703, 29936, 613, 6634, 29876, 1159, 13, 1678, 1881, 353, 1881, 29889, 6506, 703, 1966, 29905, 29876, 613, 12159, 1159, 13, 1678, 1881, 353, 1881, 29889, 5451, 9012, 580, 13, 1678, 8282, 353, 5159, 13, 1678, 6589, 353, 5159, 13, 1678, 3651, 353, 6571, 13, 1678, 1539, 485, 1306, 1849, 353, 6571, 13, 1678, 1596, 29898, 2080, 29892, 6634, 29876, 1159, 13, 1678, 565, 1881, 29961, 29900, 29962, 1275, 3908, 2746, 1115, 13, 4706, 6589, 29892, 3651, 29892, 1539, 485, 1306, 1849, 29892, 8282, 353, 6088, 17033, 29898, 2080, 29897, 13, 1678, 25342, 1881, 29961, 29900, 29962, 1275, 3908, 2154, 1115, 13, 4706, 736, 376, 6824, 2392, 29901, 6212, 3456, 304, 6633, 8296, 2471, 964, 4544, 29908, 13, 1678, 1683, 29901, 13, 4706, 736, 285, 29908, 6824, 2392, 373, 1196, 29871, 29896, 29901, 853, 5203, 360, 28334, 1134, 22372, 2080, 29961, 29900, 29962, 10162, 29908, 13, 1678, 1962, 353, 1881, 29871, 13, 1678, 736, 1539, 485, 1306, 1849, 29892, 3651, 29892, 8282, 29892, 6589, 13, 13, 29937, 4321, 292, 18320, 13, 2158, 29898, 517, 10922, 703, 29938, 2746, 29936, 718, 29991, 29880, 324, 353, 525, 307, 1579, 2670, 313, 4563, 29901, 313, 4563, 29901, 313, 4563, 29901, 313, 29886, 29901, 525, 354, 29891, 8785, 2483, 718, 29880, 324, 2433, 29880, 324, 29915, 5783, 2 ]
uwsgiconf/options/alarms.py
graceshaw/uwsgiconf
0
1601087
<filename>uwsgiconf/options/alarms.py<gh_stars>0 from operator import attrgetter from typing import List from .alarm_types import AlarmType, AlarmCommand, AlarmSignal, AlarmCurl, AlarmLog, AlarmMule, AlarmXmpp from ..base import OptionsGroup from ..utils import listify TypeAlarmExt = List[AlarmType] class Alarms(OptionsGroup): """Alarms. This subsystem allows the developer/sysadmin to "announce" special conditions of an app via various channels. * http://uwsgi-docs.readthedocs.io/en/latest/AlarmSubsystem.html """ class alarm_types: """Alarm types available for ``.register_alarm()``.""" command = AlarmCommand curl = AlarmCurl log = AlarmLog mule = AlarmMule signal = AlarmSignal xmpp = AlarmXmpp def __init__(self, *args, **kwargs): self._alarms = [] super().__init__(*args, **kwargs) def set_basic_params(self, msg_size: int = None, cheap: bool = None, anti_loop_timeout: int = None): """ :param msg_size: Set the max size of an alarm message in bytes. Default: 8192. :param cheap: Use main alarm thread rather than create dedicated threads for curl-based alarms :param anti_loop_timeout: Tune the anti-loop alarm system. Default: 3 seconds. """ self._set('alarm-msg-size', msg_size) self._set('alarm-cheap', cheap, cast=bool) self._set('alarm-freq', anti_loop_timeout) return self._section def print_alarms(self): """Print out enabled alarms.""" self._set('alarm-list', True, cast=bool) return self._section def register_alarm(self, alarm: TypeAlarmExt): """Register (create) an alarm. :param alarm: Alarm. """ for alarm in listify(alarm): if alarm not in self._alarms: self._set('alarm', alarm, multi=True) self._alarms.append(alarm) return self._section def alarm_on_log(self, alarm: TypeAlarmExt, matcher: str, skip: bool = False): """Raise (or skip) the specified alarm when a log line matches the specified regexp. :param alarm: Alarm. :param matcher: Regular expression to match log line. :param skip: """ self.register_alarm(alarm) value = f"{','.join(map(attrgetter('alias'), listify(alarm)))} {matcher}" self._set('not-alarm-log' if skip else 'alarm-log', value) return self._section def alarm_on_fd_ready(self, alarm: TypeAlarmExt, fd: str, message: str, byte_count: int = None): """Triggers the alarm when the specified file descriptor is ready for read. This is really useful for integration with the Linux eventfd() facility. Pretty low-level and the basis of most of the alarm plugins. * http://uwsgi-docs.readthedocs.io/en/latest/Changelog-1.9.7.html#alarm-fd :param alarm: Alarm. :param fd: File descriptor. :param message: Message to send. :param byte_count: Files to read. Default: 1 byte. .. note:: For ``eventfd`` set 8. """ self.register_alarm(alarm) value = fd if byte_count: value += f':{byte_count}' value += f' {message}' for alarm_ in listify(alarm): self._set('alarm-fd', f'{alarm_.alias} {value}', multi=True) return self._section def alarm_on_queue_full(self, alarm: TypeAlarmExt): """Raise the specified alarm when the socket backlog queue is full. :param alarm: Alarm. """ self.register_alarm(alarm) for alarm_ in listify(alarm): self._set('alarm-backlog', alarm_.alias, multi=True) return self._section def alarm_on_segfault(self, alarm: TypeAlarmExt): """Raise the specified alarm when the segmentation fault handler is executed. Sends a backtrace. :param alarm: Alarm. """ self.register_alarm(alarm) for alarm_ in listify(alarm): self._set('alarm-segfault', alarm_.alias, multi=True) return self._section
[ 1, 529, 9507, 29958, 7262, 5311, 4144, 29888, 29914, 6768, 29914, 284, 279, 1516, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 5455, 1053, 12421, 657, 357, 13, 3166, 19229, 1053, 2391, 13, 13, 3166, 869, 284, 2817, 29918, 8768, 1053, 838, 2817, 1542, 29892, 838, 2817, 6255, 29892, 838, 2817, 10140, 284, 29892, 838, 2817, 29907, 2271, 29892, 838, 2817, 3403, 29892, 838, 2817, 29924, 1297, 29892, 838, 2817, 29990, 29885, 407, 13, 3166, 6317, 3188, 1053, 25186, 4782, 13, 3166, 6317, 13239, 1053, 1051, 1598, 13, 13, 1542, 2499, 2817, 5647, 353, 2391, 29961, 2499, 2817, 1542, 29962, 13, 13, 13, 1990, 838, 279, 1516, 29898, 5856, 4782, 1125, 13, 1678, 9995, 2499, 279, 1516, 29889, 13, 13, 1678, 910, 1014, 5205, 6511, 278, 13897, 29914, 9675, 6406, 304, 376, 812, 21543, 29908, 13, 1678, 4266, 5855, 310, 385, 623, 3025, 5164, 18196, 29889, 13, 13, 1678, 334, 1732, 597, 29884, 5652, 3146, 29899, 2640, 29889, 949, 386, 287, 12332, 29889, 601, 29914, 264, 29914, 12333, 29914, 2499, 2817, 4035, 5205, 29889, 1420, 13, 13, 1678, 9995, 13, 1678, 770, 21200, 29918, 8768, 29901, 13, 4706, 9995, 2499, 2817, 4072, 3625, 363, 421, 1412, 9573, 29918, 284, 2817, 2555, 29952, 1213, 15945, 13, 13, 4706, 1899, 353, 838, 2817, 6255, 13, 4706, 11051, 353, 838, 2817, 29907, 2271, 13, 4706, 1480, 353, 838, 2817, 3403, 13, 4706, 286, 1297, 353, 838, 2817, 29924, 1297, 13, 4706, 7182, 353, 838, 2817, 10140, 284, 13, 4706, 921, 29885, 407, 353, 838, 2817, 29990, 29885, 407, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 334, 5085, 29892, 3579, 19290, 1125, 13, 4706, 1583, 3032, 284, 279, 1516, 353, 5159, 13, 4706, 2428, 2141, 1649, 2344, 1649, 10456, 5085, 29892, 3579, 19290, 29897, 13, 13, 1678, 822, 731, 29918, 16121, 29918, 7529, 29898, 1311, 29892, 10191, 29918, 2311, 29901, 938, 353, 6213, 29892, 28773, 29901, 6120, 353, 6213, 29892, 9418, 29918, 7888, 29918, 15619, 29901, 938, 353, 6213, 1125, 13, 4706, 9995, 13, 4706, 584, 3207, 10191, 29918, 2311, 29901, 3789, 278, 4236, 2159, 310, 385, 21200, 2643, 297, 6262, 29889, 13109, 29901, 29871, 29947, 29896, 29929, 29906, 29889, 13, 13, 4706, 584, 3207, 28773, 29901, 4803, 1667, 21200, 3244, 3265, 1135, 1653, 16955, 13, 9651, 9717, 363, 11051, 29899, 6707, 394, 279, 1516, 13, 13, 4706, 584, 3207, 9418, 29918, 7888, 29918, 15619, 29901, 323, 1540, 278, 9418, 29899, 7888, 21200, 1788, 29889, 13109, 29901, 29871, 29941, 6923, 29889, 13, 13, 4706, 9995, 13, 4706, 1583, 3032, 842, 877, 284, 2817, 29899, 7645, 29899, 2311, 742, 10191, 29918, 2311, 29897, 13, 4706, 1583, 3032, 842, 877, 284, 2817, 29899, 1173, 481, 742, 28773, 29892, 4320, 29922, 11227, 29897, 13, 4706, 1583, 3032, 842, 877, 284, 2817, 29899, 29888, 7971, 742, 9418, 29918, 7888, 29918, 15619, 29897, 13, 13, 4706, 736, 1583, 3032, 2042, 13, 13, 1678, 822, 1596, 29918, 284, 279, 1516, 29898, 1311, 1125, 13, 4706, 9995, 11816, 714, 9615, 394, 279, 1516, 1213, 15945, 13, 13, 4706, 1583, 3032, 842, 877, 284, 2817, 29899, 1761, 742, 5852, 29892, 4320, 29922, 11227, 29897, 13, 13, 4706, 736, 1583, 3032, 2042, 13, 13, 1678, 822, 6036, 29918, 284, 2817, 29898, 1311, 29892, 21200, 29901, 5167, 2499, 2817, 5647, 1125, 13, 4706, 9995, 15213, 313, 3258, 29897, 385, 21200, 29889, 13, 13, 4706, 584, 3207, 21200, 29901, 838, 2817, 29889, 13, 13, 4706, 9995, 13, 4706, 363, 21200, 297, 1051, 1598, 29898, 284, 2817, 1125, 13, 9651, 565, 21200, 451, 297, 1583, 3032, 284, 279, 1516, 29901, 13, 18884, 1583, 3032, 842, 877, 284, 2817, 742, 21200, 29892, 2473, 29922, 5574, 29897, 13, 18884, 1583, 3032, 284, 279, 1516, 29889, 4397, 29898, 284, 2817, 29897, 13, 13, 4706, 736, 1583, 3032, 2042, 13, 13, 1678, 822, 21200, 29918, 265, 29918, 1188, 29898, 1311, 29892, 21200, 29901, 5167, 2499, 2817, 5647, 29892, 1993, 261, 29901, 851, 29892, 14383, 29901, 6120, 353, 7700, 1125, 13, 4706, 9995, 29934, 29874, 895, 313, 272, 14383, 29897, 278, 6790, 21200, 746, 263, 1480, 1196, 7087, 278, 6790, 6528, 29886, 29889, 13, 13, 4706, 584, 3207, 21200, 29901, 838, 2817, 29889, 13, 13, 4706, 584, 3207, 1993, 261, 29901, 2169, 1070, 4603, 304, 1993, 1480, 1196, 29889, 13, 13, 4706, 584, 3207, 14383, 29901, 13, 13, 4706, 9995, 13, 4706, 1583, 29889, 9573, 29918, 284, 2817, 29898, 284, 2817, 29897, 13, 13, 4706, 995, 353, 285, 29908, 29912, 3788, 29889, 7122, 29898, 1958, 29898, 5552, 657, 357, 877, 19973, 5477, 1051, 1598, 29898, 284, 2817, 876, 2915, 426, 4352, 261, 5038, 13, 13, 4706, 1583, 3032, 842, 877, 1333, 29899, 284, 2817, 29899, 1188, 29915, 565, 14383, 1683, 525, 284, 2817, 29899, 1188, 742, 995, 29897, 13, 13, 4706, 736, 1583, 3032, 2042, 13, 13, 1678, 822, 21200, 29918, 265, 29918, 11512, 29918, 2040, 29898, 1311, 29892, 21200, 29901, 5167, 2499, 2817, 5647, 29892, 285, 29881, 29901, 851, 29892, 2643, 29901, 851, 29892, 7023, 29918, 2798, 29901, 938, 353, 6213, 1125, 13, 4706, 9995, 2308, 335, 5743, 278, 21200, 746, 278, 6790, 934, 553, 11709, 338, 7960, 363, 1303, 29889, 13, 13, 4706, 910, 338, 2289, 5407, 363, 13465, 411, 278, 8074, 1741, 11512, 580, 24454, 29889, 13, 4706, 4721, 4349, 4482, 29899, 5563, 322, 278, 8405, 310, 1556, 310, 278, 21200, 18224, 29889, 13, 13, 4706, 334, 1732, 597, 29884, 5652, 3146, 29899, 2640, 29889, 949, 386, 287, 12332, 29889, 601, 29914, 264, 29914, 12333, 29914, 1451, 9477, 468, 29899, 29896, 29889, 29929, 29889, 29955, 29889, 1420, 29937, 284, 2817, 29899, 11512, 13, 13, 4706, 584, 3207, 21200, 29901, 838, 2817, 29889, 13, 13, 4706, 584, 3207, 285, 29881, 29901, 3497, 553, 11709, 29889, 13, 13, 4706, 584, 3207, 2643, 29901, 7777, 304, 3638, 29889, 13, 13, 4706, 584, 3207, 7023, 29918, 2798, 29901, 12745, 304, 1303, 29889, 13109, 29901, 29871, 29896, 7023, 29889, 13, 13, 9651, 6317, 4443, 1057, 1152, 4954, 3696, 11512, 16159, 731, 29871, 29947, 29889, 13, 13, 4706, 9995, 13, 4706, 1583, 29889, 9573, 29918, 284, 2817, 29898, 284, 2817, 29897, 13, 13, 4706, 995, 353, 285, 29881, 13, 13, 4706, 565, 7023, 29918, 2798, 29901, 13, 9651, 995, 4619, 285, 2396, 29912, 10389, 29918, 2798, 10162, 13, 13, 4706, 995, 4619, 285, 29915, 426, 4906, 10162, 13, 13, 4706, 363, 21200, 29918, 297, 1051, 1598, 29898, 284, 2817, 1125, 13, 9651, 1583, 3032, 842, 877, 284, 2817, 29899, 11512, 742, 285, 29915, 29912, 284, 2817, 5396, 19973, 29913, 426, 1767, 29913, 742, 2473, 29922, 5574, 29897, 13, 13, 4706, 736, 1583, 3032, 2042, 13, 13, 1678, 822, 21200, 29918, 265, 29918, 9990, 29918, 8159, 29898, 1311, 29892, 21200, 29901, 5167, 2499, 2817, 5647, 1125, 13, 4706, 9995, 29934, 29874, 895, 278, 6790, 21200, 746, 278, 9909, 1250, 1188, 9521, 338, 2989, 29889, 13, 13, 4706, 584, 3207, 21200, 29901, 838, 2817, 29889, 13, 13, 4706, 9995, 13, 4706, 1583, 29889, 9573, 29918, 284, 2817, 29898, 284, 2817, 29897, 13, 13, 4706, 363, 21200, 29918, 297, 1051, 1598, 29898, 284, 2817, 1125, 13, 9651, 1583, 3032, 842, 877, 284, 2817, 29899, 1627, 1188, 742, 21200, 5396, 19973, 29892, 2473, 29922, 5574, 29897, 13, 13, 4706, 736, 1583, 3032, 2042, 13, 13, 1678, 822, 21200, 29918, 265, 29918, 10199, 27934, 29898, 1311, 29892, 21200, 29901, 5167, 2499, 2817, 5647, 1125, 13, 4706, 9995, 29934, 29874, 895, 278, 6790, 21200, 746, 278, 10768, 362, 12570, 7834, 338, 8283, 29889, 13, 13, 4706, 317, 1975, 263, 1250, 15003, 29889, 13, 13, 4706, 584, 3207, 21200, 29901, 838, 2817, 29889, 13, 13, 4706, 9995, 13, 4706, 1583, 29889, 9573, 29918, 284, 2817, 29898, 284, 2817, 29897, 13, 13, 4706, 363, 21200, 29918, 297, 1051, 1598, 29898, 284, 2817, 1125, 13, 9651, 1583, 3032, 842, 877, 284, 2817, 29899, 10199, 27934, 742, 21200, 5396, 19973, 29892, 2473, 29922, 5574, 29897, 13, 13, 4706, 736, 1583, 3032, 2042, 13, 2 ]
src/ambient/cli.py
mikepqr/ambient
1
128348
<reponame>mikepqr/ambient<filename>src/ambient/cli.py import logging import click from ambient.ambient import make_context from ambient.ambient import today as _today from ambient.ambient import yesterday as _yesterday from ambient.backfill import backfill as _backfill @click.group() @click.version_option() @click.option("--quiet", "-q", help="Be quiet", is_flag=True, default=False) @click.option("--application-key", required=True) @click.option("--api-key", required=True) @click.option("--mac", required=True) @click.pass_context def cli(ctx, quiet, application_key, api_key, mac): if quiet: logging.basicConfig(level=logging.WARN, format="%(message)s") else: logging.basicConfig(level=logging.INFO, format="%(message)s") auth_data = { "application_key": application_key, "api_key": api_key, "mac": mac, } ctx.obj = make_context(auth_data) @cli.command() @click.pass_obj def today(context): _today(context) @cli.command() @click.pass_obj def yesterday(context): _yesterday(context) @cli.command() @click.pass_obj def backfill(context): _backfill(context) def main(): cli(auto_envvar_prefix="AMBIENT")
[ 1, 529, 276, 1112, 420, 29958, 2460, 446, 29886, 29939, 29878, 29914, 1117, 993, 29966, 9507, 29958, 4351, 29914, 1117, 993, 29914, 11303, 29889, 2272, 13, 5215, 12183, 13, 13, 5215, 2828, 13, 13, 3166, 25040, 29889, 1117, 993, 1053, 1207, 29918, 4703, 13, 3166, 25040, 29889, 1117, 993, 1053, 9826, 408, 903, 27765, 13, 3166, 25040, 29889, 1117, 993, 1053, 22600, 408, 903, 29891, 18358, 13, 3166, 25040, 29889, 1627, 5589, 1053, 1250, 5589, 408, 903, 1627, 5589, 13, 13, 13, 29992, 3808, 29889, 2972, 580, 13, 29992, 3808, 29889, 3259, 29918, 3385, 580, 13, 29992, 3808, 29889, 3385, 703, 489, 339, 2035, 613, 11663, 29939, 613, 1371, 543, 3629, 11813, 613, 338, 29918, 15581, 29922, 5574, 29892, 2322, 29922, 8824, 29897, 13, 29992, 3808, 29889, 3385, 703, 489, 6214, 29899, 1989, 613, 3734, 29922, 5574, 29897, 13, 29992, 3808, 29889, 3385, 703, 489, 2754, 29899, 1989, 613, 3734, 29922, 5574, 29897, 13, 29992, 3808, 29889, 3385, 703, 489, 8628, 613, 3734, 29922, 5574, 29897, 13, 29992, 3808, 29889, 3364, 29918, 4703, 13, 1753, 9335, 29898, 13073, 29892, 11813, 29892, 2280, 29918, 1989, 29892, 7882, 29918, 1989, 29892, 5825, 1125, 13, 1678, 565, 11813, 29901, 13, 4706, 12183, 29889, 16121, 3991, 29898, 5563, 29922, 21027, 29889, 29956, 15249, 29892, 3402, 543, 29995, 29898, 4906, 29897, 29879, 1159, 13, 1678, 1683, 29901, 13, 4706, 12183, 29889, 16121, 3991, 29898, 5563, 29922, 21027, 29889, 11690, 29892, 3402, 543, 29995, 29898, 4906, 29897, 29879, 1159, 13, 1678, 4817, 29918, 1272, 353, 426, 13, 4706, 376, 6214, 29918, 1989, 1115, 2280, 29918, 1989, 29892, 13, 4706, 376, 2754, 29918, 1989, 1115, 7882, 29918, 1989, 29892, 13, 4706, 376, 8628, 1115, 5825, 29892, 13, 1678, 500, 13, 1678, 12893, 29889, 5415, 353, 1207, 29918, 4703, 29898, 5150, 29918, 1272, 29897, 13, 13, 13, 29992, 11303, 29889, 6519, 580, 13, 29992, 3808, 29889, 3364, 29918, 5415, 13, 1753, 9826, 29898, 4703, 1125, 13, 1678, 903, 27765, 29898, 4703, 29897, 13, 13, 13, 29992, 11303, 29889, 6519, 580, 13, 29992, 3808, 29889, 3364, 29918, 5415, 13, 1753, 22600, 29898, 4703, 1125, 13, 1678, 903, 29891, 18358, 29898, 4703, 29897, 13, 13, 13, 29992, 11303, 29889, 6519, 580, 13, 29992, 3808, 29889, 3364, 29918, 5415, 13, 1753, 1250, 5589, 29898, 4703, 1125, 13, 1678, 903, 1627, 5589, 29898, 4703, 29897, 13, 13, 13, 1753, 1667, 7295, 13, 1678, 9335, 29898, 6921, 29918, 6272, 1707, 29918, 13506, 543, 5194, 12809, 3919, 1159, 13, 2 ]
lib/utils/views/decorators.py
arkanister/minitickets
0
114578
# -*- coding: utf-8 -*- from django.conf import settings from django.contrib.auth import REDIRECT_FIELD_NAME from django.contrib.auth.decorators import login_required as django_login_required, user_passes_test from django.contrib.auth.views import redirect_to_login from django.core.exceptions import PermissionDenied from django.shortcuts import resolve_url from django.utils.decorators import method_decorator from django.utils.encoding import force_str from.types import CREATE, UPDATE, DELETE, DETAIL, LIST def login_required(method, redirect_field_name=REDIRECT_FIELD_NAME, login_url=None): """ Decorator for views that checks that the user is logged in, redirecting to the log-in page if necessary. """ def wrapper(self, *args, **kwargs): required = getattr(self, 'login_required', True) if required: @method_decorator(django_login_required(redirect_field_name=redirect_field_name, login_url=login_url)) def wrap(_self, *ag, **kag): return method(_self, *ag, **kag) return wrap(self, *args, **kwargs) return method(self, *args, **kwargs) return wrapper def permission_required(method, login_url=None, raise_exception=True): """ Decorator for views that checks that the user has perms, redirecting to the log-in page if necessary. """ def wrapper(self, *args, **kwargs): perms = getattr(self, 'perms', []) model = getattr(self, 'model', None) view_type = getattr(self, '_TYPE', None) if model is not None and view_type is not None and isinstance(perms, list): # get a perms from a specific view opts = getattr(model, "_meta") app_name = opts.app_label.lower() perm = None if view_type == CREATE: perm = opts.get_add_permission() elif view_type == UPDATE: perm = opts.get_change_permission() elif view_type == DELETE: perm = opts.get_delete_permission() elif view_type in (DETAIL, LIST): perm = "view_%s" % opts.object_name.lower() if perm is not None: perms.append("%s.%s" % (app_name, perm)) # is required if exists a perms required = isinstance(perms, list) and len(perms) > 0 if required: def check_perms(user): if not user.is_authenticated() or user.has_perms(perms): return True if raise_exception: raise PermissionDenied return False @method_decorator(user_passes_test(check_perms, login_url=login_url)) def wrap(_self, *ag, **kwg): return method(_self, *ag, **kwg) return wrap(self, *args, **kwargs) return method(self, *args, **kwargs) return wrapper def ajax_required(method, redirect_field_name=REDIRECT_FIELD_NAME, login_url=None, raise_exception=False): """ Decorator for views that checks that the user is logged in, redirecting to the log-in page if necessary. """ def wrapper(self, *args, **kwargs): required = getattr(self, 'ajax_required', True) request = getattr(self, 'request', False) if required and not request.is_ajax(): if raise_exception: raise PermissionDenied # urlparse chokes on lazy objects in Python 3, force to str resolved_login_url = force_str(resolve_url(login_url or settings.LOGIN_URL)) path = request.get_full_path() response = redirect_to_login( path, resolved_login_url, redirect_field_name) response.status_code = 405 return response return method(self, *args, **kwargs) return wrapper
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 3166, 9557, 29889, 5527, 1053, 6055, 13, 13, 3166, 9557, 29889, 21570, 29889, 5150, 1053, 390, 3352, 29902, 26282, 29918, 3738, 27286, 29918, 5813, 13, 3166, 9557, 29889, 21570, 29889, 5150, 29889, 19557, 4097, 1053, 6464, 29918, 12403, 408, 9557, 29918, 7507, 29918, 12403, 29892, 1404, 29918, 3364, 267, 29918, 1688, 13, 3166, 9557, 29889, 21570, 29889, 5150, 29889, 7406, 1053, 6684, 29918, 517, 29918, 7507, 13, 3166, 9557, 29889, 3221, 29889, 11739, 29879, 1053, 20894, 2333, 29315, 1000, 13, 3166, 9557, 29889, 12759, 7582, 29879, 1053, 8814, 29918, 2271, 13, 3166, 9557, 29889, 13239, 29889, 19557, 4097, 1053, 1158, 29918, 19557, 1061, 13, 3166, 9557, 29889, 13239, 29889, 22331, 1053, 4889, 29918, 710, 13, 13, 3166, 29889, 8768, 1053, 14602, 29892, 16924, 29892, 5012, 18476, 29892, 360, 2544, 29909, 6227, 29892, 365, 9047, 13, 13, 13, 1753, 6464, 29918, 12403, 29898, 5696, 29892, 6684, 29918, 2671, 29918, 978, 29922, 1525, 4571, 26282, 29918, 3738, 27286, 29918, 5813, 29892, 6464, 29918, 2271, 29922, 8516, 1125, 13, 1678, 9995, 13, 1678, 3826, 272, 1061, 363, 8386, 393, 12747, 393, 278, 1404, 338, 13817, 297, 29892, 6684, 292, 13, 1678, 304, 278, 1480, 29899, 262, 1813, 565, 5181, 29889, 13, 1678, 9995, 13, 13, 1678, 822, 14476, 29898, 1311, 29892, 334, 5085, 29892, 3579, 19290, 1125, 13, 13, 4706, 3734, 353, 679, 5552, 29898, 1311, 29892, 525, 7507, 29918, 12403, 742, 5852, 29897, 13, 13, 4706, 565, 3734, 29901, 13, 13, 9651, 732, 5696, 29918, 19557, 1061, 29898, 14095, 29918, 7507, 29918, 12403, 29898, 17886, 29918, 2671, 29918, 978, 29922, 17886, 29918, 2671, 29918, 978, 29892, 6464, 29918, 2271, 29922, 7507, 29918, 2271, 876, 13, 9651, 822, 12244, 7373, 1311, 29892, 334, 351, 29892, 3579, 29895, 351, 1125, 13, 18884, 736, 1158, 7373, 1311, 29892, 334, 351, 29892, 3579, 29895, 351, 29897, 13, 13, 9651, 736, 12244, 29898, 1311, 29892, 334, 5085, 29892, 3579, 19290, 29897, 13, 13, 4706, 736, 1158, 29898, 1311, 29892, 334, 5085, 29892, 3579, 19290, 29897, 13, 13, 1678, 736, 14476, 13, 13, 13, 1753, 10751, 29918, 12403, 29898, 5696, 29892, 6464, 29918, 2271, 29922, 8516, 29892, 12020, 29918, 11739, 29922, 5574, 1125, 13, 13, 1678, 9995, 13, 1678, 3826, 272, 1061, 363, 8386, 393, 12747, 393, 278, 1404, 756, 639, 1516, 29892, 6684, 292, 13, 1678, 304, 278, 1480, 29899, 262, 1813, 565, 5181, 29889, 13, 1678, 9995, 13, 13, 1678, 822, 14476, 29898, 1311, 29892, 334, 5085, 29892, 3579, 19290, 1125, 13, 4706, 639, 1516, 353, 679, 5552, 29898, 1311, 29892, 525, 546, 1516, 742, 518, 2314, 13, 4706, 1904, 353, 679, 5552, 29898, 1311, 29892, 525, 4299, 742, 6213, 29897, 13, 4706, 1776, 29918, 1853, 353, 679, 5552, 29898, 1311, 29892, 22868, 11116, 742, 6213, 29897, 13, 13, 4706, 565, 1904, 338, 451, 6213, 322, 1776, 29918, 1853, 338, 451, 6213, 322, 338, 8758, 29898, 546, 1516, 29892, 1051, 1125, 13, 9651, 396, 679, 263, 639, 1516, 515, 263, 2702, 1776, 13, 9651, 29111, 353, 679, 5552, 29898, 4299, 29892, 11119, 7299, 1159, 13, 9651, 623, 29918, 978, 353, 29111, 29889, 932, 29918, 1643, 29889, 13609, 580, 13, 9651, 3635, 353, 6213, 13, 9651, 565, 1776, 29918, 1853, 1275, 14602, 29901, 13, 18884, 3635, 353, 29111, 29889, 657, 29918, 1202, 29918, 16074, 580, 13, 9651, 25342, 1776, 29918, 1853, 1275, 16924, 29901, 13, 18884, 3635, 353, 29111, 29889, 657, 29918, 3167, 29918, 16074, 580, 13, 9651, 25342, 1776, 29918, 1853, 1275, 5012, 18476, 29901, 13, 18884, 3635, 353, 29111, 29889, 657, 29918, 8143, 29918, 16074, 580, 13, 9651, 25342, 1776, 29918, 1853, 297, 313, 2287, 6040, 6227, 29892, 365, 9047, 1125, 13, 18884, 3635, 353, 376, 1493, 29918, 29995, 29879, 29908, 1273, 29111, 29889, 3318, 29918, 978, 29889, 13609, 580, 13, 13, 9651, 565, 3635, 338, 451, 6213, 29901, 13, 18884, 639, 1516, 29889, 4397, 11702, 29879, 29889, 29995, 29879, 29908, 1273, 313, 932, 29918, 978, 29892, 3635, 876, 13, 13, 4706, 396, 338, 3734, 565, 4864, 263, 639, 1516, 13, 4706, 3734, 353, 338, 8758, 29898, 546, 1516, 29892, 1051, 29897, 322, 7431, 29898, 546, 1516, 29897, 1405, 29871, 29900, 13, 13, 4706, 565, 3734, 29901, 13, 13, 9651, 822, 1423, 29918, 546, 1516, 29898, 1792, 1125, 13, 13, 18884, 565, 451, 1404, 29889, 275, 29918, 27218, 630, 580, 470, 1404, 29889, 5349, 29918, 546, 1516, 29898, 546, 1516, 1125, 13, 462, 1678, 736, 5852, 13, 13, 18884, 565, 12020, 29918, 11739, 29901, 13, 462, 1678, 12020, 20894, 2333, 29315, 1000, 13, 13, 18884, 736, 7700, 13, 13, 9651, 732, 5696, 29918, 19557, 1061, 29898, 1792, 29918, 3364, 267, 29918, 1688, 29898, 3198, 29918, 546, 1516, 29892, 6464, 29918, 2271, 29922, 7507, 29918, 2271, 876, 13, 9651, 822, 12244, 7373, 1311, 29892, 334, 351, 29892, 3579, 11022, 29887, 1125, 13, 18884, 736, 1158, 7373, 1311, 29892, 334, 351, 29892, 3579, 11022, 29887, 29897, 13, 13, 9651, 736, 12244, 29898, 1311, 29892, 334, 5085, 29892, 3579, 19290, 29897, 13, 13, 4706, 736, 1158, 29898, 1311, 29892, 334, 5085, 29892, 3579, 19290, 29897, 13, 13, 1678, 736, 14476, 13, 13, 13, 1753, 9349, 29918, 12403, 29898, 5696, 29892, 6684, 29918, 2671, 29918, 978, 29922, 1525, 4571, 26282, 29918, 3738, 27286, 29918, 5813, 29892, 6464, 29918, 2271, 29922, 8516, 29892, 12020, 29918, 11739, 29922, 8824, 1125, 13, 1678, 9995, 13, 1678, 3826, 272, 1061, 363, 8386, 393, 12747, 393, 278, 1404, 338, 13817, 297, 29892, 6684, 292, 13, 1678, 304, 278, 1480, 29899, 262, 1813, 565, 5181, 29889, 13, 1678, 9995, 13, 13, 1678, 822, 14476, 29898, 1311, 29892, 334, 5085, 29892, 3579, 19290, 1125, 13, 13, 4706, 3734, 353, 679, 5552, 29898, 1311, 29892, 525, 6538, 29918, 12403, 742, 5852, 29897, 13, 4706, 2009, 353, 679, 5552, 29898, 1311, 29892, 525, 3827, 742, 7700, 29897, 13, 13, 4706, 565, 3734, 322, 451, 2009, 29889, 275, 29918, 6538, 7295, 13, 13, 9651, 565, 12020, 29918, 11739, 29901, 13, 18884, 12020, 20894, 2333, 29315, 1000, 13, 13, 9651, 396, 3142, 5510, 521, 23195, 373, 17366, 3618, 297, 5132, 29871, 29941, 29892, 4889, 304, 851, 13, 9651, 11527, 29918, 7507, 29918, 2271, 353, 4889, 29918, 710, 29898, 17863, 29918, 2271, 29898, 7507, 29918, 2271, 470, 6055, 29889, 14480, 1177, 29918, 4219, 876, 13, 9651, 2224, 353, 2009, 29889, 657, 29918, 8159, 29918, 2084, 580, 13, 13, 9651, 2933, 353, 6684, 29918, 517, 29918, 7507, 29898, 13, 18884, 2224, 29892, 11527, 29918, 7507, 29918, 2271, 29892, 6684, 29918, 2671, 29918, 978, 29897, 13, 9651, 2933, 29889, 4882, 29918, 401, 353, 29871, 29946, 29900, 29945, 13, 13, 9651, 736, 2933, 13, 13, 4706, 736, 1158, 29898, 1311, 29892, 334, 5085, 29892, 3579, 19290, 29897, 13, 13, 1678, 736, 14476, 2 ]
migrations/versions/013_Fields.py
LCBRU/lbrc_upload
0
169391
from sqlalchemy import ( MetaData, Table, Column, Integer, DateTime, NVARCHAR, String, Index, Boolean, ) from migrate.changeset.constraint import ForeignKeyConstraint, UniqueConstraint meta = MetaData() field = Table( "field", meta, Column("id", Integer, primary_key=True), Column("study_id", Integer), Column("order", Integer), Column("field_type_id", Integer), Column("field_name", String(100)), Column("required", Boolean), Column("max_length", Integer), Column("default", String(250)), Column("choices", String(250)), Column("allowed_file_extensions", String(250)), ) Index("ix_field_study_id", field.c.study_id) def upgrade(migrate_engine): meta.bind = migrate_engine field.create() field_type = Table("field_type", meta, autoload=True) study = Table("study", meta, autoload=True) fk_field_type = ForeignKeyConstraint([field.c.field_type_id], [field_type.c.id]) fk_field_type.create() fk_study = ForeignKeyConstraint([field.c.study_id], [study.c.id]) fk_study.create() uk_study_id_order = UniqueConstraint(field.c.study_id, field.c.order, table=field) uk_study_id_order.create() def downgrade(migrate_engine): meta.bind = migrate_engine field.drop()
[ 1, 515, 4576, 284, 305, 6764, 1053, 313, 13, 1678, 20553, 1469, 29892, 13, 1678, 6137, 29892, 13, 1678, 12481, 29892, 13, 1678, 8102, 29892, 13, 1678, 12315, 29892, 13, 1678, 405, 29963, 15364, 29892, 13, 1678, 1714, 29892, 13, 1678, 11374, 29892, 13, 1678, 11185, 29892, 13, 29897, 13, 3166, 9725, 403, 29889, 25990, 300, 29889, 13646, 1053, 19358, 2558, 21529, 29892, 853, 1387, 21529, 13, 13, 13, 7299, 353, 20553, 1469, 580, 13, 13, 2671, 353, 6137, 29898, 13, 1678, 376, 2671, 613, 13, 1678, 12700, 29892, 13, 1678, 12481, 703, 333, 613, 8102, 29892, 7601, 29918, 1989, 29922, 5574, 511, 13, 1678, 12481, 703, 18082, 29891, 29918, 333, 613, 8102, 511, 13, 1678, 12481, 703, 2098, 613, 8102, 511, 13, 1678, 12481, 703, 2671, 29918, 1853, 29918, 333, 613, 8102, 511, 13, 1678, 12481, 703, 2671, 29918, 978, 613, 1714, 29898, 29896, 29900, 29900, 8243, 13, 1678, 12481, 703, 12403, 613, 11185, 511, 13, 1678, 12481, 703, 3317, 29918, 2848, 613, 8102, 511, 13, 1678, 12481, 703, 4381, 613, 1714, 29898, 29906, 29945, 29900, 8243, 13, 1678, 12481, 703, 1859, 1575, 613, 1714, 29898, 29906, 29945, 29900, 8243, 13, 1678, 12481, 703, 24622, 29918, 1445, 29918, 24299, 613, 1714, 29898, 29906, 29945, 29900, 8243, 13, 29897, 13, 13, 3220, 703, 861, 29918, 2671, 29918, 18082, 29891, 29918, 333, 613, 1746, 29889, 29883, 29889, 18082, 29891, 29918, 333, 29897, 13, 13, 13, 1753, 14955, 29898, 26983, 403, 29918, 10599, 1125, 13, 1678, 12700, 29889, 5355, 353, 9725, 403, 29918, 10599, 13, 1678, 1746, 29889, 3258, 580, 13, 13, 1678, 1746, 29918, 1853, 353, 6137, 703, 2671, 29918, 1853, 613, 12700, 29892, 1120, 3543, 328, 29922, 5574, 29897, 13, 1678, 6559, 353, 6137, 703, 18082, 29891, 613, 12700, 29892, 1120, 3543, 328, 29922, 5574, 29897, 13, 13, 1678, 285, 29895, 29918, 2671, 29918, 1853, 353, 19358, 2558, 21529, 4197, 2671, 29889, 29883, 29889, 2671, 29918, 1853, 29918, 333, 1402, 518, 2671, 29918, 1853, 29889, 29883, 29889, 333, 2314, 13, 1678, 285, 29895, 29918, 2671, 29918, 1853, 29889, 3258, 580, 13, 13, 1678, 285, 29895, 29918, 18082, 29891, 353, 19358, 2558, 21529, 4197, 2671, 29889, 29883, 29889, 18082, 29891, 29918, 333, 1402, 518, 18082, 29891, 29889, 29883, 29889, 333, 2314, 13, 1678, 285, 29895, 29918, 18082, 29891, 29889, 3258, 580, 13, 13, 1678, 18293, 29918, 18082, 29891, 29918, 333, 29918, 2098, 353, 853, 1387, 21529, 29898, 2671, 29889, 29883, 29889, 18082, 29891, 29918, 333, 29892, 1746, 29889, 29883, 29889, 2098, 29892, 1591, 29922, 2671, 29897, 13, 1678, 18293, 29918, 18082, 29891, 29918, 333, 29918, 2098, 29889, 3258, 580, 13, 13, 13, 1753, 1623, 8228, 29898, 26983, 403, 29918, 10599, 1125, 13, 1678, 12700, 29889, 5355, 353, 9725, 403, 29918, 10599, 13, 1678, 1746, 29889, 8865, 580, 13, 2 ]
web/fixtures/load_psite_gps_coordinates.py
MTES-MCT/biocarburants
4
1602137
import sys, os import django import csv import pandas as pd os.environ.setdefault("DJANGO_SETTINGS_MODULE", "carbure.settings") django.setup() from producers.models import ProductionSite filename = '%s/web/fixtures/csv/production_sites_gps.csv' % (os.environ['CARBURE_HOME']) df = pd.read_csv(filename, delimiter=';').set_index('zip')['gps'].to_dict() print(df) psites = ProductionSite.objects.all() for p in psites: try: code = int(p.postal_code) except: print('missing zip code for %s' % p.name) continue if code in df: print('FOUND gps for %s' % (p.name)) print(df[code]) p.gps_coordinates = df[code] p.save() else: print('could not find gps for %s, %s' % (p.name, p.postal_code))
[ 1, 1053, 10876, 29892, 2897, 13, 5215, 9557, 13, 5215, 11799, 13, 5215, 11701, 408, 10518, 13, 13, 359, 29889, 21813, 29889, 842, 4381, 703, 29928, 29967, 2190, 17080, 29918, 10490, 29911, 4214, 29903, 29918, 6720, 14849, 1307, 613, 376, 4287, 29890, 545, 29889, 11027, 1159, 13, 14095, 29889, 14669, 580, 13, 13, 3166, 1391, 22543, 29889, 9794, 1053, 19561, 17033, 13, 13, 9507, 353, 14210, 29879, 29914, 2676, 29914, 7241, 486, 1973, 29914, 7638, 29914, 24601, 29918, 16315, 29918, 29887, 567, 29889, 7638, 29915, 1273, 313, 359, 29889, 21813, 1839, 29907, 1718, 7838, 1525, 29918, 17353, 11287, 13, 13, 2176, 353, 10518, 29889, 949, 29918, 7638, 29898, 9507, 29892, 28552, 2433, 29936, 2824, 842, 29918, 2248, 877, 7554, 1495, 1839, 29887, 567, 13359, 517, 29918, 8977, 580, 13, 2158, 29898, 2176, 29897, 13, 13, 13, 567, 3246, 353, 19561, 17033, 29889, 12650, 29889, 497, 580, 13, 13, 1454, 282, 297, 6529, 3246, 29901, 13, 1678, 1018, 29901, 13, 4706, 775, 353, 938, 29898, 29886, 29889, 2490, 284, 29918, 401, 29897, 13, 1678, 5174, 29901, 13, 4706, 1596, 877, 27259, 14319, 775, 363, 1273, 29879, 29915, 1273, 282, 29889, 978, 29897, 13, 4706, 6773, 13, 1678, 565, 775, 297, 4489, 29901, 13, 4706, 1596, 877, 5800, 18783, 330, 567, 363, 1273, 29879, 29915, 1273, 313, 29886, 29889, 978, 876, 13, 4706, 1596, 29898, 2176, 29961, 401, 2314, 13, 4706, 282, 29889, 29887, 567, 29918, 1111, 24266, 353, 4489, 29961, 401, 29962, 13, 4706, 282, 29889, 7620, 580, 13, 1678, 1683, 29901, 13, 4706, 1596, 877, 26680, 451, 1284, 330, 567, 363, 1273, 29879, 29892, 1273, 29879, 29915, 1273, 313, 29886, 29889, 978, 29892, 282, 29889, 2490, 284, 29918, 401, 876, 13, 2 ]
layers/modules/fast_mask_iou.py
sebastian-ruiz/yolact
1
23701
<reponame>sebastian-ruiz/yolact import torch from torch import nn import torch.nn.functional as F #locals from data.config import Config from utils.functions import make_net from utils.script_module_wrapper import ScriptModuleWrapper, script_method_wrapper class FastMaskIoUNet(ScriptModuleWrapper): def __init__(self, config:Config): super().__init__() cfg = config input_channels = 1 last_layer = [(cfg.num_classes-1, 1, {})] self.maskiou_net, _ = make_net(input_channels, cfg.maskiou_net + last_layer, include_last_relu=True) def forward(self, x): x = self.maskiou_net(x) maskiou_p = F.max_pool2d(x, kernel_size=x.size()[2:]).squeeze(-1).squeeze(-1) return maskiou_p
[ 1, 529, 276, 1112, 420, 29958, 344, 29890, 579, 713, 29899, 582, 466, 29914, 29891, 324, 627, 13, 5215, 4842, 305, 13, 3166, 4842, 305, 1053, 302, 29876, 13, 5215, 4842, 305, 29889, 15755, 29889, 2220, 284, 408, 383, 13, 13, 29937, 2997, 29879, 13, 3166, 848, 29889, 2917, 1053, 12782, 13, 3166, 3667, 29879, 29889, 12171, 1053, 1207, 29918, 1212, 13, 3166, 3667, 29879, 29889, 2154, 29918, 5453, 29918, 17699, 1053, 14415, 7355, 15646, 29892, 2471, 29918, 5696, 29918, 17699, 13, 13, 1990, 23786, 19832, 29902, 29877, 3904, 300, 29898, 4081, 7355, 15646, 1125, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 2295, 29901, 3991, 1125, 13, 4706, 2428, 2141, 1649, 2344, 1649, 580, 13, 13, 4706, 274, 16434, 353, 2295, 13, 4706, 1881, 29918, 305, 12629, 353, 29871, 29896, 13, 4706, 1833, 29918, 13148, 353, 17288, 16859, 29889, 1949, 29918, 13203, 29899, 29896, 29892, 29871, 29896, 29892, 426, 1800, 29962, 13, 4706, 1583, 29889, 13168, 29875, 283, 29918, 1212, 29892, 903, 353, 1207, 29918, 1212, 29898, 2080, 29918, 305, 12629, 29892, 274, 16434, 29889, 13168, 29875, 283, 29918, 1212, 718, 1833, 29918, 13148, 29892, 3160, 29918, 4230, 29918, 2674, 29884, 29922, 5574, 29897, 13, 13, 1678, 822, 6375, 29898, 1311, 29892, 921, 1125, 13, 4706, 921, 353, 1583, 29889, 13168, 29875, 283, 29918, 1212, 29898, 29916, 29897, 13, 4706, 11105, 29875, 283, 29918, 29886, 353, 383, 29889, 3317, 29918, 10109, 29906, 29881, 29898, 29916, 29892, 8466, 29918, 2311, 29922, 29916, 29889, 2311, 580, 29961, 29906, 29901, 14664, 29879, 802, 29872, 911, 6278, 29896, 467, 29879, 802, 29872, 911, 6278, 29896, 29897, 13, 4706, 736, 11105, 29875, 283, 29918, 29886, 13, 13, 2 ]
src/test_likdelta.py
casutton/bayes-qnet
12
187128
import unittest import qnet import qnetu import numpy import numpy.random import mytime import netutils import estimation import yaml import arrivals import sampling import qstats import sys class TestLikDelta (unittest.TestCase): def test_mm1_delta (self): sampling.set_seed(68310) nreps = 10 ntasks = 10 pct = 0.5 net = self.mm1 self.do_test_delta_internal (net, nreps, ntasks, pct) def test_mmk_delta (self): sampling.set_seed(68310) nreps = 10 ntasks = 10 pct = 0.5 net = self.mmk self.do_test_delta_internal (net, nreps, ntasks, pct) def test_mmrss_delta (self): sampling.set_seed(68310) nreps = 10 ntasks = 100 pct = 0.25 net = self.mmrss self.do_test_delta_internal (net, nreps, ntasks, pct) def do_test_delta_internal (self, net, nreps, ntasks, pct): for ri in range(nreps): arrv = net.sample (ntasks) obs = arrv.subset_by_task (pct) samples = net.slice_resample (obs, 0, 5) arrv_from = samples[len(samples)-1] print "Computing LIK0" lik0 = net.log_prob (arrv_from) for e in arrv_from: if not e.obs_d: # print "Testing evt ", e dfn = qnet.GGkGibbs(net, arrv_from, e, lik0).dfn() d0 = e.d d_test = [ d0+delta for delta in [ -0.5, -0.1, 0.1, 0.5, 1.0, 1.5, 3.0 ] ] for d1 in d_test: # print "Testing departure ", d1 lik_incremental = dfn(d1) if numpy.isinf (lik_incremental): continue # probably right lik_true = self.compute_full_lik (net, arrv_from, e, d1) print "%d %.4f %.4f %.4f %.4f" % (e.eid, d0, d1, lik_incremental, lik_true) if numpy.isinf(lik_true): self.assertTrue (numpy.isinf(lik_incremental)) else: self.assertAlmostEquals (lik_true, lik_incremental, 5) def compute_full_lik (self, net, arrv0, evt, d): arrv = arrv0.duplicate() dl0 = evt.queue().pyDiffListForDeparture (evt, d) evt_next = evt.next_by_task() if evt_next: dl0.extend (evt_next.queue().pyDiffListForArrival(evt_next, d)) arrv.applyDiffList (dl0, 0) return net.log_prob (arrv) mm1_text = """ states: - name: INITIAL queues: [ INITIAL ] successors: [ TIER1 ] initial: TRUE - name: TIER1 queues: [ WEB1, WEB2 ] successors: [ TIER2 ] - name: TIER2 queues: [ APP1 ] queues: - { name: INITIAL, service: [M, 10.0] } - { name: WEB1, service: [M, 3.0] } - { name: WEB2, service: [M, 3.0] } - { name: APP1, service: [M, 8.0] } """ mmk_text = """ states: - name: INITIAL queues: [ INITIAL ] successors: [ TIER1 ] initial: TRUE - name: TIER1 queues: [ WEB1, WEB2 ] successors: [ TIER2 ] - name: TIER2 queues: [ APP1 ] queues: - { name: INITIAL, service: [M, 5.0] } - { name: WEB1, service: [M, 3.0], processors: 3 } - { name: WEB2, service: [M, 3.0], processors: 4 } - { name: APP1, service: [M, 8.0], processors: 2 } """ mmrss_text = """ states: - name: INITIAL queues: [ INITIAL ] successors: [ TIER1 ] initial: TRUE - name: TIER1 queues: [ WEB1, WEB2 ] successors: [ TIER2 ] - name: TIER2 queues: [ APP1, APP2 ] successors: [ TIER3 ] - name: TIER3 queues: [ DB1, DB2 ] queues: - { name: INITIAL, service: [M, 10.0] } - { name: WEB1, service: [M, 15.0], type: GG1R } - { name: WEB2, service: [M, 17.0], type: GG1R } - { name: APP1, service: [M, 10.0], type: GG1R } - { name: APP2, service: [M, 10.0], type: GG1R } - { name: DB1, service: [M, 7.0], type: GG1R } - { name: DB2, service: [M, 7.0], type: GG1R } """ def setUp (self): self.mm1 = qnetu.qnet_from_text (TestLikDelta.mm1_text) self.mmk = qnetu.qnet_from_text (TestLikDelta.mmk_text) self.mmrss = qnetu.qnet_from_text (TestLikDelta.mmrss_text) def main(): if len(sys.argv) > 1: for test_name in sys.argv[1:]: suite = unittest.TestLoader().loadTestsFromName("test_likdelta.TestLikDelta.%s" % (test_name,)) unittest.TextTestRunner(verbosity=2).run(suite) else: unittest.main() if __name__ == "__main__": main()
[ 1, 1053, 443, 27958, 13, 5215, 3855, 1212, 13, 5215, 3855, 1212, 29884, 13, 5215, 12655, 13, 5215, 12655, 29889, 8172, 13, 5215, 590, 2230, 13, 5215, 7787, 13239, 13, 5215, 23248, 13, 5215, 343, 8807, 13, 5215, 18517, 29879, 13, 5215, 23460, 13, 13, 5215, 3855, 16202, 13, 13, 5215, 10876, 13, 13, 1990, 4321, 29931, 638, 5268, 313, 348, 27958, 29889, 3057, 8259, 1125, 259, 13, 13, 1678, 822, 1243, 29918, 4317, 29896, 29918, 4181, 313, 1311, 1125, 13, 4706, 23460, 29889, 842, 29918, 26776, 29898, 29953, 29947, 29941, 29896, 29900, 29897, 268, 13, 4706, 302, 276, 567, 353, 29871, 29896, 29900, 13, 4706, 302, 20673, 353, 29871, 29896, 29900, 13, 4706, 282, 312, 353, 29871, 29900, 29889, 29945, 13, 4706, 7787, 353, 1583, 29889, 4317, 29896, 13, 4706, 1583, 29889, 1867, 29918, 1688, 29918, 4181, 29918, 7564, 313, 1212, 29892, 302, 276, 567, 29892, 302, 20673, 29892, 282, 312, 29897, 13, 13, 1678, 822, 1243, 29918, 4317, 29895, 29918, 4181, 313, 1311, 1125, 13, 4706, 23460, 29889, 842, 29918, 26776, 29898, 29953, 29947, 29941, 29896, 29900, 29897, 268, 13, 4706, 302, 276, 567, 353, 29871, 29896, 29900, 13, 4706, 302, 20673, 353, 29871, 29896, 29900, 13, 4706, 282, 312, 353, 29871, 29900, 29889, 29945, 13, 4706, 7787, 353, 1583, 29889, 4317, 29895, 13, 4706, 1583, 29889, 1867, 29918, 1688, 29918, 4181, 29918, 7564, 313, 1212, 29892, 302, 276, 567, 29892, 302, 20673, 29892, 282, 312, 29897, 13, 13, 1678, 822, 1243, 29918, 4317, 29878, 893, 29918, 4181, 313, 1311, 1125, 13, 4706, 23460, 29889, 842, 29918, 26776, 29898, 29953, 29947, 29941, 29896, 29900, 29897, 268, 13, 4706, 302, 276, 567, 353, 29871, 29896, 29900, 13, 4706, 302, 20673, 353, 29871, 29896, 29900, 29900, 13, 4706, 282, 312, 353, 29871, 29900, 29889, 29906, 29945, 13, 4706, 7787, 353, 1583, 29889, 4317, 29878, 893, 13, 4706, 1583, 29889, 1867, 29918, 1688, 29918, 4181, 29918, 7564, 313, 1212, 29892, 302, 276, 567, 29892, 302, 20673, 29892, 282, 312, 29897, 13, 13, 1678, 822, 437, 29918, 1688, 29918, 4181, 29918, 7564, 313, 1311, 29892, 7787, 29892, 302, 276, 567, 29892, 302, 20673, 29892, 282, 312, 1125, 13, 4706, 363, 10107, 297, 3464, 29898, 29876, 276, 567, 1125, 13, 9651, 3948, 29894, 353, 7787, 29889, 11249, 313, 593, 1278, 29879, 29897, 13, 9651, 20881, 353, 3948, 29894, 29889, 6484, 29918, 1609, 29918, 7662, 313, 29886, 312, 29897, 13, 9651, 11916, 353, 7787, 29889, 18337, 29918, 690, 981, 313, 26290, 29892, 29871, 29900, 29892, 29871, 29945, 29897, 13, 9651, 3948, 29894, 29918, 3166, 353, 11916, 29961, 2435, 29898, 27736, 6817, 29896, 29962, 13, 9651, 1596, 376, 20606, 292, 17705, 29968, 29900, 29908, 13, 9651, 4188, 29900, 353, 7787, 29889, 1188, 29918, 22795, 313, 2749, 29894, 29918, 3166, 29897, 13, 9651, 363, 321, 297, 3948, 29894, 29918, 3166, 29901, 13, 18884, 565, 451, 321, 29889, 26290, 29918, 29881, 29901, 13, 29937, 462, 1678, 1596, 376, 3057, 292, 3415, 29873, 9162, 321, 13, 462, 1678, 4489, 29876, 353, 3855, 1212, 29889, 26788, 29895, 29954, 747, 5824, 29898, 1212, 29892, 3948, 29894, 29918, 3166, 29892, 321, 29892, 4188, 29900, 467, 2176, 29876, 580, 13, 462, 1678, 270, 29900, 353, 321, 29889, 29881, 13, 462, 1678, 270, 29918, 1688, 353, 518, 270, 29900, 29974, 4181, 363, 19471, 297, 518, 448, 29900, 29889, 29945, 29892, 448, 29900, 29889, 29896, 29892, 29871, 29900, 29889, 29896, 29892, 29871, 29900, 29889, 29945, 29892, 29871, 29896, 29889, 29900, 29892, 29871, 29896, 29889, 29945, 29892, 29871, 29941, 29889, 29900, 4514, 4514, 13, 462, 1678, 363, 270, 29896, 297, 270, 29918, 1688, 29901, 13, 29937, 462, 4706, 1596, 376, 3057, 292, 25619, 9162, 270, 29896, 13, 462, 4706, 4188, 29918, 25629, 284, 353, 4489, 29876, 29898, 29881, 29896, 29897, 13, 462, 4706, 565, 12655, 29889, 275, 7192, 313, 5081, 29918, 25629, 284, 1125, 6773, 396, 3117, 1492, 13, 462, 4706, 4188, 29918, 3009, 353, 1583, 29889, 26017, 29918, 8159, 29918, 5081, 313, 1212, 29892, 3948, 29894, 29918, 3166, 29892, 321, 29892, 270, 29896, 29897, 13, 462, 4706, 1596, 11860, 29881, 18695, 29946, 29888, 18695, 29946, 29888, 18695, 29946, 29888, 18695, 29946, 29888, 29908, 1273, 313, 29872, 29889, 29872, 333, 29892, 270, 29900, 29892, 270, 29896, 29892, 4188, 29918, 25629, 284, 29892, 4188, 29918, 3009, 29897, 13, 462, 4706, 565, 12655, 29889, 275, 7192, 29898, 5081, 29918, 3009, 1125, 13, 462, 9651, 1583, 29889, 9294, 5574, 313, 23749, 29889, 275, 7192, 29898, 5081, 29918, 25629, 284, 876, 13, 462, 4706, 1683, 29901, 13, 462, 9651, 1583, 29889, 9294, 2499, 3242, 14776, 313, 5081, 29918, 3009, 29892, 4188, 29918, 25629, 284, 29892, 29871, 29945, 29897, 13, 13, 1678, 822, 10272, 29918, 8159, 29918, 5081, 313, 1311, 29892, 7787, 29892, 3948, 29894, 29900, 29892, 3415, 29873, 29892, 270, 1125, 13, 4706, 3948, 29894, 353, 3948, 29894, 29900, 29889, 20908, 5926, 580, 13, 4706, 270, 29880, 29900, 353, 3415, 29873, 29889, 9990, 2141, 2272, 26023, 1293, 2831, 8498, 442, 545, 313, 5750, 29873, 29892, 270, 29897, 13, 4706, 3415, 29873, 29918, 4622, 353, 3415, 29873, 29889, 4622, 29918, 1609, 29918, 7662, 580, 13, 4706, 565, 3415, 29873, 29918, 4622, 29901, 13, 9651, 270, 29880, 29900, 29889, 21843, 313, 5750, 29873, 29918, 4622, 29889, 9990, 2141, 2272, 26023, 1293, 2831, 1433, 15081, 29898, 5750, 29873, 29918, 4622, 29892, 270, 876, 13, 4706, 3948, 29894, 29889, 7302, 26023, 1293, 313, 11671, 29900, 29892, 29871, 29900, 29897, 13, 4706, 736, 7787, 29889, 1188, 29918, 22795, 313, 2749, 29894, 29897, 13, 13, 268, 13, 1678, 5654, 29896, 29918, 726, 353, 9995, 13, 28631, 29901, 13, 29871, 448, 1024, 29901, 2672, 1806, 25758, 13, 1678, 712, 1041, 29901, 518, 2672, 1806, 25758, 4514, 13, 1678, 2551, 943, 29901, 518, 323, 29902, 1001, 29896, 4514, 13, 1678, 2847, 29901, 15676, 29871, 13, 29871, 448, 1024, 29901, 323, 29902, 1001, 29896, 13, 1678, 712, 1041, 29901, 518, 399, 25752, 29896, 29892, 399, 25752, 29906, 4514, 13, 1678, 2551, 943, 29901, 518, 323, 29902, 1001, 29906, 4514, 13, 29871, 448, 1024, 29901, 323, 29902, 1001, 29906, 13, 1678, 712, 1041, 29901, 518, 12279, 29925, 29896, 4514, 13, 802, 1041, 29901, 13, 29871, 448, 426, 1024, 29901, 2672, 1806, 25758, 29892, 2669, 29901, 518, 29924, 29892, 29871, 29896, 29900, 29889, 29900, 29962, 29871, 500, 13, 29871, 448, 426, 1024, 29901, 399, 25752, 29896, 29892, 2669, 29901, 518, 29924, 29892, 29871, 29941, 29889, 29900, 29962, 500, 13, 29871, 448, 426, 1024, 29901, 399, 25752, 29906, 29892, 2669, 29901, 518, 29924, 29892, 29871, 29941, 29889, 29900, 29962, 500, 13, 29871, 448, 426, 1024, 29901, 12279, 29925, 29896, 29892, 2669, 29901, 518, 29924, 29892, 29871, 29947, 29889, 29900, 29962, 500, 13, 15945, 29908, 13, 13, 308, 13, 1678, 5654, 29895, 29918, 726, 353, 9995, 13, 28631, 29901, 13, 29871, 448, 1024, 29901, 2672, 1806, 25758, 13, 1678, 712, 1041, 29901, 518, 2672, 1806, 25758, 4514, 13, 1678, 2551, 943, 29901, 518, 323, 29902, 1001, 29896, 4514, 13, 1678, 2847, 29901, 15676, 29871, 13, 29871, 448, 1024, 29901, 323, 29902, 1001, 29896, 13, 1678, 712, 1041, 29901, 518, 399, 25752, 29896, 29892, 399, 25752, 29906, 4514, 13, 1678, 2551, 943, 29901, 518, 323, 29902, 1001, 29906, 4514, 13, 29871, 448, 1024, 29901, 323, 29902, 1001, 29906, 13, 1678, 712, 1041, 29901, 518, 12279, 29925, 29896, 4514, 13, 802, 1041, 29901, 13, 29871, 448, 426, 1024, 29901, 2672, 1806, 25758, 29892, 2669, 29901, 518, 29924, 29892, 29871, 29945, 29889, 29900, 29962, 29871, 500, 13, 29871, 448, 426, 1024, 29901, 399, 25752, 29896, 29892, 2669, 29901, 518, 29924, 29892, 29871, 29941, 29889, 29900, 1402, 1889, 943, 29901, 29871, 29941, 500, 13, 29871, 448, 426, 1024, 29901, 399, 25752, 29906, 29892, 2669, 29901, 518, 29924, 29892, 29871, 29941, 29889, 29900, 1402, 1889, 943, 29901, 29871, 29946, 500, 13, 29871, 448, 426, 1024, 29901, 12279, 29925, 29896, 29892, 2669, 29901, 518, 29924, 29892, 29871, 29947, 29889, 29900, 1402, 1889, 943, 29901, 29871, 29906, 500, 13, 15945, 29908, 13, 308, 13, 1678, 5654, 29878, 893, 29918, 726, 353, 9995, 13, 28631, 29901, 13, 29871, 448, 1024, 29901, 2672, 1806, 25758, 13, 1678, 712, 1041, 29901, 518, 2672, 1806, 25758, 4514, 13, 1678, 2551, 943, 29901, 518, 323, 29902, 1001, 29896, 4514, 13, 1678, 2847, 29901, 15676, 29871, 13, 29871, 448, 1024, 29901, 323, 29902, 1001, 29896, 13, 1678, 712, 1041, 29901, 518, 399, 25752, 29896, 29892, 399, 25752, 29906, 4514, 13, 1678, 2551, 943, 29901, 518, 323, 29902, 1001, 29906, 4514, 13, 29871, 448, 1024, 29901, 323, 29902, 1001, 29906, 13, 1678, 712, 1041, 29901, 518, 12279, 29925, 29896, 29892, 12279, 29925, 29906, 4514, 13, 1678, 2551, 943, 29901, 518, 323, 29902, 1001, 29941, 4514, 13, 29871, 448, 1024, 29901, 323, 29902, 1001, 29941, 13, 1678, 712, 1041, 29901, 518, 6535, 29896, 29892, 6535, 29906, 4514, 268, 13, 802, 1041, 29901, 13, 29871, 448, 426, 1024, 29901, 2672, 1806, 25758, 29892, 2669, 29901, 518, 29924, 29892, 29871, 29896, 29900, 29889, 29900, 29962, 29871, 500, 13, 29871, 448, 426, 1024, 29901, 399, 25752, 29896, 29892, 2669, 29901, 518, 29924, 29892, 29871, 29896, 29945, 29889, 29900, 1402, 1134, 29901, 402, 29954, 29896, 29934, 500, 13, 29871, 448, 426, 1024, 29901, 399, 25752, 29906, 29892, 2669, 29901, 518, 29924, 29892, 29871, 29896, 29955, 29889, 29900, 1402, 1134, 29901, 402, 29954, 29896, 29934, 500, 13, 29871, 448, 426, 1024, 29901, 12279, 29925, 29896, 29892, 2669, 29901, 518, 29924, 29892, 29871, 29896, 29900, 29889, 29900, 1402, 1134, 29901, 402, 29954, 29896, 29934, 500, 13, 29871, 448, 426, 1024, 29901, 12279, 29925, 29906, 29892, 2669, 29901, 518, 29924, 29892, 29871, 29896, 29900, 29889, 29900, 1402, 1134, 29901, 402, 29954, 29896, 29934, 500, 13, 29871, 448, 426, 1024, 29901, 6535, 29896, 29892, 2669, 29901, 518, 29924, 29892, 29871, 29955, 29889, 29900, 1402, 1134, 29901, 402, 29954, 29896, 29934, 500, 13, 29871, 448, 426, 1024, 29901, 6535, 29906, 29892, 2669, 29901, 518, 29924, 29892, 29871, 29955, 29889, 29900, 1402, 1134, 29901, 402, 29954, 29896, 29934, 500, 13, 15945, 29908, 13, 13, 1678, 822, 731, 3373, 313, 1311, 1125, 13, 4706, 1583, 29889, 4317, 29896, 353, 3855, 1212, 29884, 29889, 29939, 1212, 29918, 3166, 29918, 726, 313, 3057, 29931, 638, 5268, 29889, 4317, 29896, 29918, 726, 29897, 13, 4706, 1583, 29889, 4317, 29895, 353, 3855, 1212, 29884, 29889, 29939, 1212, 29918, 3166, 29918, 726, 313, 3057, 29931, 638, 5268, 29889, 4317, 29895, 29918, 726, 29897, 13, 4706, 1583, 29889, 4317, 29878, 893, 353, 3855, 1212, 29884, 29889, 29939, 1212, 29918, 3166, 29918, 726, 313, 3057, 29931, 638, 5268, 29889, 4317, 29878, 893, 29918, 726, 29897, 13, 13, 1753, 1667, 7295, 13, 1678, 565, 7431, 29898, 9675, 29889, 19218, 29897, 1405, 29871, 29896, 29901, 13, 4706, 363, 1243, 29918, 978, 297, 10876, 29889, 19218, 29961, 29896, 29901, 5387, 13, 9651, 9460, 353, 443, 27958, 29889, 3057, 10036, 2141, 1359, 24376, 4591, 1170, 703, 1688, 29918, 5081, 4181, 29889, 3057, 29931, 638, 5268, 29889, 29995, 29879, 29908, 1273, 313, 1688, 29918, 978, 29892, 876, 13, 9651, 443, 27958, 29889, 1626, 3057, 16802, 29898, 18248, 359, 537, 29922, 29906, 467, 3389, 29898, 13495, 29897, 13, 1678, 1683, 29901, 13, 4706, 443, 27958, 29889, 3396, 580, 13, 13, 361, 4770, 978, 1649, 1275, 376, 1649, 3396, 1649, 1115, 13, 1678, 1667, 580, 13, 13, 2 ]
Image Processing/03_Geometric_Transformations.py
siddarthjha/Opencv
2
186001
import numpy as np import cv2 from matplotlib import pyplot as plt # Scaling img = cv2.imread('a.jpg') print(img.shape) cv2.imshow('img', img) res = cv2.resize(img, None, fx=2, fy=2, interpolation = cv2.INTER_AREA) print(res.shape) print(img.shape) cv2.imshow('res', res) cv2.waitKey(0) cv2.destroyAllWindows() # Translation img = cv2.imread('b.jpg', 0) rows, cols = img.shape M = np.float32([[1, 0, 100], [0, 1, 50]]) dst = cv2.warpAffine(img, M, (cols, rows)) cv2.imshow('img', dst) cv2.waitKey(0) cv2.destroyAllWindows() # Rotation img = cv2.imread('b.jpg', 0) rows,cols = img.shape M = cv2.getRotationMatrix2D((cols/2, rows/2), 270, 1) dst = cv2.warpAffine(img, M, (cols, rows)) cv2.imshow('Rotation', dst) cv2.waitKey(0) cv2.destroyAllWindows() # cv2.warpAffine takes a 2x3 transformation matrix while cv2.warpPerspective takes a 3x3 transformation matrix as input. # Affine Transformation img = cv2.imread('a.jpg') img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB) rows,cols,ch = img.shape pts1 = np.float32([[50, 50], [200, 50], [50, 200]]) pts2 = np.float32([[10, 100], [200, 50], [100, 250]]) M = cv2.getAffineTransform(pts1, pts2) dst = cv2.warpAffine(img, M, (cols, rows)) plt.subplot(121) plt.imshow(img) plt.title('Input') plt.subplot(122) plt.imshow(dst) plt.title('Output') plt.show() # Perspective Transformation img = cv2.imread('b.jpg') img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB) rows, cols, ch = img.shape pts1 = np.float32([[56, 65], [368, 52], [28, 387], [389, 390]]) pts2 = np.float32([[0, 0], [300, 0], [0, 300], [300, 300]]) M = cv2.getPerspectiveTransform(pts1, pts2) dst = cv2.warpPerspective(img, M, (300, 300)) plt.subplot(121),plt.imshow(img),plt.title('Input') plt.subplot(122),plt.imshow(dst),plt.title('Output') plt.show()
[ 1, 1053, 12655, 408, 7442, 13, 5215, 13850, 29906, 13, 3166, 22889, 1053, 11451, 5317, 408, 14770, 13, 13, 29937, 317, 1052, 292, 13, 2492, 353, 13850, 29906, 29889, 326, 949, 877, 29874, 29889, 6173, 1495, 13, 2158, 29898, 2492, 29889, 12181, 29897, 13, 13, 11023, 29906, 29889, 326, 4294, 877, 2492, 742, 10153, 29897, 13, 690, 353, 13850, 29906, 29889, 21476, 29898, 2492, 29892, 6213, 29892, 285, 29916, 29922, 29906, 29892, 285, 29891, 29922, 29906, 29892, 29694, 353, 13850, 29906, 29889, 23845, 29918, 29909, 1525, 29909, 29897, 13, 2158, 29898, 690, 29889, 12181, 29897, 13, 2158, 29898, 2492, 29889, 12181, 29897, 13, 11023, 29906, 29889, 326, 4294, 877, 690, 742, 620, 29897, 13, 11023, 29906, 29889, 10685, 2558, 29898, 29900, 29897, 13, 11023, 29906, 29889, 20524, 3596, 7685, 580, 13, 13, 29937, 4103, 18411, 13, 2492, 353, 13850, 29906, 29889, 326, 949, 877, 29890, 29889, 6173, 742, 29871, 29900, 29897, 13, 5727, 29892, 28730, 353, 10153, 29889, 12181, 13, 13, 29924, 353, 7442, 29889, 7411, 29941, 29906, 4197, 29961, 29896, 29892, 29871, 29900, 29892, 29871, 29896, 29900, 29900, 1402, 518, 29900, 29892, 29871, 29896, 29892, 29871, 29945, 29900, 24960, 13, 22992, 353, 13850, 29906, 29889, 4495, 29886, 27867, 457, 29898, 2492, 29892, 341, 29892, 313, 22724, 29892, 4206, 876, 13, 13, 11023, 29906, 29889, 326, 4294, 877, 2492, 742, 29743, 29897, 13, 11023, 29906, 29889, 10685, 2558, 29898, 29900, 29897, 13, 11023, 29906, 29889, 20524, 3596, 7685, 580, 13, 13, 13, 29937, 9664, 362, 13, 2492, 353, 13850, 29906, 29889, 326, 949, 877, 29890, 29889, 6173, 742, 29871, 29900, 29897, 13, 5727, 29892, 22724, 353, 10153, 29889, 12181, 13, 13, 29924, 353, 13850, 29906, 29889, 657, 21281, 362, 14609, 29906, 29928, 3552, 22724, 29914, 29906, 29892, 4206, 29914, 29906, 511, 29871, 29906, 29955, 29900, 29892, 29871, 29896, 29897, 13, 22992, 353, 13850, 29906, 29889, 4495, 29886, 27867, 457, 29898, 2492, 29892, 341, 29892, 313, 22724, 29892, 4206, 876, 13, 11023, 29906, 29889, 326, 4294, 877, 21281, 362, 742, 29743, 29897, 13, 11023, 29906, 29889, 10685, 2558, 29898, 29900, 29897, 13, 11023, 29906, 29889, 20524, 3596, 7685, 580, 13, 13, 13, 29937, 13850, 29906, 29889, 4495, 29886, 27867, 457, 4893, 263, 29871, 29906, 29916, 29941, 13852, 4636, 1550, 13850, 29906, 29889, 4495, 29886, 15136, 12645, 4893, 263, 29871, 29941, 29916, 29941, 13852, 4636, 408, 1881, 29889, 13, 13, 29937, 13737, 457, 4103, 5404, 13, 2492, 353, 13850, 29906, 29889, 326, 949, 877, 29874, 29889, 6173, 1495, 13, 2492, 353, 13850, 29906, 29889, 11023, 29873, 3306, 29898, 2492, 29892, 13850, 29906, 29889, 15032, 1955, 29918, 29933, 14345, 29906, 28212, 29897, 13, 5727, 29892, 22724, 29892, 305, 353, 10153, 29889, 12181, 13, 13, 16485, 29896, 353, 7442, 29889, 7411, 29941, 29906, 4197, 29961, 29945, 29900, 29892, 29871, 29945, 29900, 1402, 518, 29906, 29900, 29900, 29892, 29871, 29945, 29900, 1402, 518, 29945, 29900, 29892, 29871, 29906, 29900, 29900, 24960, 13, 16485, 29906, 353, 7442, 29889, 7411, 29941, 29906, 4197, 29961, 29896, 29900, 29892, 29871, 29896, 29900, 29900, 1402, 518, 29906, 29900, 29900, 29892, 29871, 29945, 29900, 1402, 518, 29896, 29900, 29900, 29892, 29871, 29906, 29945, 29900, 24960, 13, 13, 29924, 353, 13850, 29906, 29889, 657, 27867, 457, 13372, 29898, 16485, 29896, 29892, 282, 1372, 29906, 29897, 13, 13, 22992, 353, 13850, 29906, 29889, 4495, 29886, 27867, 457, 29898, 2492, 29892, 341, 29892, 313, 22724, 29892, 4206, 876, 13, 13, 572, 29873, 29889, 1491, 5317, 29898, 29896, 29906, 29896, 29897, 13, 572, 29873, 29889, 326, 4294, 29898, 2492, 29897, 13, 572, 29873, 29889, 3257, 877, 4290, 1495, 13, 572, 29873, 29889, 1491, 5317, 29898, 29896, 29906, 29906, 29897, 13, 572, 29873, 29889, 326, 4294, 29898, 22992, 29897, 13, 572, 29873, 29889, 3257, 877, 6466, 1495, 13, 572, 29873, 29889, 4294, 580, 13, 13, 29937, 9034, 12645, 4103, 5404, 13, 2492, 353, 13850, 29906, 29889, 326, 949, 877, 29890, 29889, 6173, 1495, 13, 2492, 353, 13850, 29906, 29889, 11023, 29873, 3306, 29898, 2492, 29892, 13850, 29906, 29889, 15032, 1955, 29918, 29933, 14345, 29906, 28212, 29897, 13, 5727, 29892, 28730, 29892, 521, 353, 10153, 29889, 12181, 13, 13, 16485, 29896, 353, 7442, 29889, 7411, 29941, 29906, 4197, 29961, 29945, 29953, 29892, 29871, 29953, 29945, 1402, 518, 29941, 29953, 29947, 29892, 29871, 29945, 29906, 1402, 518, 29906, 29947, 29892, 29871, 29941, 29947, 29955, 1402, 518, 29941, 29947, 29929, 29892, 29871, 29941, 29929, 29900, 24960, 13, 16485, 29906, 353, 7442, 29889, 7411, 29941, 29906, 4197, 29961, 29900, 29892, 29871, 29900, 1402, 518, 29941, 29900, 29900, 29892, 29871, 29900, 1402, 518, 29900, 29892, 29871, 29941, 29900, 29900, 1402, 518, 29941, 29900, 29900, 29892, 29871, 29941, 29900, 29900, 24960, 13, 13, 29924, 353, 13850, 29906, 29889, 657, 15136, 12645, 13372, 29898, 16485, 29896, 29892, 282, 1372, 29906, 29897, 13, 13, 22992, 353, 13850, 29906, 29889, 4495, 29886, 15136, 12645, 29898, 2492, 29892, 341, 29892, 313, 29941, 29900, 29900, 29892, 29871, 29941, 29900, 29900, 876, 13, 13, 572, 29873, 29889, 1491, 5317, 29898, 29896, 29906, 29896, 511, 572, 29873, 29889, 326, 4294, 29898, 2492, 511, 572, 29873, 29889, 3257, 877, 4290, 1495, 13, 572, 29873, 29889, 1491, 5317, 29898, 29896, 29906, 29906, 511, 572, 29873, 29889, 326, 4294, 29898, 22992, 511, 572, 29873, 29889, 3257, 877, 6466, 1495, 13, 572, 29873, 29889, 4294, 580, 13, 2 ]
DSTK/Timeseries/recurrence_plots.py
jotterbach/dstk
12
27649
import _recurrence_map import numpy as np def poincare_map(ts, ts2=None, threshold=0.1): rec_dist = poincare_recurrence_dist(ts, ts2) return (rec_dist < threshold).astype(int) def poincare_recurrence_dist(ts, ts2=None): if ts2 is None: return _recurrence_map.recurrence_map(ts, ts) else: return _recurrence_map.recurrence_map(ts, ts2)
[ 1, 1053, 903, 3757, 26841, 29918, 1958, 13, 5215, 12655, 408, 7442, 13, 13, 13, 1753, 772, 3742, 598, 29918, 1958, 29898, 1372, 29892, 18696, 29906, 29922, 8516, 29892, 16897, 29922, 29900, 29889, 29896, 1125, 13, 1678, 1162, 29918, 5721, 353, 772, 3742, 598, 29918, 3757, 26841, 29918, 5721, 29898, 1372, 29892, 18696, 29906, 29897, 13, 1678, 736, 313, 3757, 29918, 5721, 529, 16897, 467, 579, 668, 29898, 524, 29897, 13, 13, 13, 1753, 772, 3742, 598, 29918, 3757, 26841, 29918, 5721, 29898, 1372, 29892, 18696, 29906, 29922, 8516, 1125, 13, 1678, 565, 18696, 29906, 338, 6213, 29901, 13, 4706, 736, 903, 3757, 26841, 29918, 1958, 29889, 3757, 26841, 29918, 1958, 29898, 1372, 29892, 18696, 29897, 13, 1678, 1683, 29901, 13, 4706, 736, 903, 3757, 26841, 29918, 1958, 29889, 3757, 26841, 29918, 1958, 29898, 1372, 29892, 18696, 29906, 29897, 13, 13, 2 ]
sokoapp/contests/tests/test_app/models.py
Mercy-Nekesa/sokoapp
1
120743
<filename>sokoapp/contests/tests/test_app/models.py<gh_stars>1-10 from referee.models import TimePeriodBase class TimePeriod(TimePeriodBase): pass
[ 1, 529, 9507, 29958, 29879, 15218, 932, 29914, 1285, 9197, 29914, 21150, 29914, 1688, 29918, 932, 29914, 9794, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 3166, 2143, 23987, 29889, 9794, 1053, 5974, 29853, 5160, 13, 13, 13, 1990, 5974, 29853, 29898, 2481, 29853, 5160, 1125, 13, 1678, 1209, 13, 2 ]
main.py
felipedmsantos95/hangman-game-py
1
141513
<filename>main.py from lerArquivo import * from utilitariosJogo import * from datetime import datetime import os import json #-------------------------------- Variáveis de controle do jogo ------------------------------ tentativasLetra = 6 letrasErradas = 0 suporPalavras = 3 ganhouJogo = False letrasUtilizadas = [] #------------------------------------- Funções de controle ----------------------------------- #Verifica se a letra já foi testada pelo usuário def letraRepetida(letra, listaLetras): if(letra not in listaLetras): return False else: return True # def printarStatus(dica, tentativasLetra, suporPalavras): os.system('cls' if os.name == 'nt' else 'clear') printarForca(tentativasLetra) print('Palavra: ' + dica + '\n') print('Tentativas de letra restantes: ' + str(tentativasLetra)) print('Tentativas de palavra restantes: ' + str(suporPalavras)) print('Letras tentadas: ' + ','.join(letrasUtilizadas)) print('Letras erradas: ' + str(letrasErradas) + '\n') #--------------------------------------- INICIO DO JOGO -------------------------------------- print('### JOGO DA FORCA ###') nomeUsuario = input('Digite seu nome: ') emailUsuario = input('Digite seu email: ') print("\nA palavra foi escolhida, dica inicial: \n") palavraOculta = sortearPalavra('baseDados.txt') dica = dicaPalavra(palavraOculta) printarForca(tentativasLetra) while((tentativasLetra > 0) and (suporPalavras > 0) and not(ganhouJogo)): print('Digite a ação que deseja tomar:') print('1 - Advinhar letra\n2 - Advinhar a palavra') option = input('Digite a opção: ') if(option == '1'): print('\n####################') letra = input('Insira uma letra: ') #Realizando a verficação antes de prosseguir while(not(letraCorreta(letra))): letra = input("\nPor favor, digite uma letra no formato correto: ") while(letraRepetida(letra, letrasUtilizadas)): letra = input('Você já tentou esta letra, por favor tente outra: ') letrasUtilizadas.append(letra) estadoAnteriorDica = dica dica = letraPalavra(letra, palavraOculta, dica) #Verifica se errou a letra if(estadoAnteriorDica == dica): letrasErradas += 1 tentativasLetra -= 1 printarStatus(dica, tentativasLetra, suporPalavras) elif(dica == True): #Verifica se o jogo foi ganho print('Parabéns! Você descobriu a palavra oculta!') print('Palavra: ' + palavraOculta + '\n') ganhouJogo = True else: printarStatus(dica, tentativasLetra, suporPalavras) elif (option == '2'): print('\n####################') palpite = input('Insira seu palpite: ') if(palpitePalavra(palpite, palavraOculta)): #Verifica se o jogo foi ganho print('Palavra: ' + palavraOculta + '\n') ganhouJogo = True else: suporPalavras -= 1 printarStatus(dica, tentativasLetra, suporPalavras) else: print('Por favor, insira uma opção válida!\n') #Tratamento final ao status do jogo if(not ganhouJogo): print('Você perdeu o jogo! :(') print('A palavra era: ' + palavraOculta + '\n') status = 'Perdeu o jogo! :(' else: status = 'Venceu o jogo!' data = datetime.now().strftime("%d/%m/%Y %H:%M:%S") resultadoJogo = { '<NAME>': nomeUsuario, 'E-<NAME>': emailUsuario, 'Palavra Oculta': palavraOculta, 'Status': status, 'Data e Hora': data } with open('historico.json', 'a') as arquivoJson: json.dump(resultadoJogo, arquivoJson, indent=4)
[ 1, 529, 9507, 29958, 3396, 29889, 2272, 13, 3166, 301, 261, 1433, 339, 4243, 1053, 334, 13, 3166, 3667, 277, 8596, 29967, 10482, 1053, 334, 13, 3166, 12865, 1053, 12865, 13, 5215, 2897, 13, 5215, 4390, 13, 13, 29937, 2683, 2683, 9586, 29976, 27072, 316, 8239, 280, 437, 432, 10482, 448, 2683, 9072, 29899, 13, 29873, 296, 26126, 12024, 336, 353, 29871, 29953, 13, 280, 10678, 2110, 3665, 294, 353, 29871, 29900, 13, 12587, 272, 18210, 485, 3417, 353, 29871, 29941, 13, 6249, 10774, 29967, 10482, 353, 7700, 13, 280, 10678, 7270, 466, 3922, 353, 5159, 13, 13, 13, 29937, 2683, 2683, 23648, 13811, 5616, 316, 8239, 280, 448, 2683, 2683, 489, 13, 13, 29937, 6565, 15039, 409, 263, 1235, 336, 17333, 4732, 1243, 1114, 10845, 502, 29884, 12288, 13, 1753, 1235, 336, 5612, 300, 1458, 29898, 1026, 336, 29892, 15023, 12024, 3417, 1125, 29871, 13, 1678, 565, 29898, 1026, 336, 451, 297, 15023, 12024, 3417, 1125, 13, 4706, 736, 7700, 13, 1678, 1683, 29901, 13, 4706, 736, 5852, 13, 29871, 13, 396, 1678, 13, 1753, 1596, 279, 5709, 29898, 29881, 983, 29892, 12033, 26126, 12024, 336, 29892, 480, 1971, 18210, 485, 3417, 1125, 13, 1678, 2897, 29889, 5205, 877, 25932, 29915, 565, 2897, 29889, 978, 1275, 525, 593, 29915, 1683, 525, 8551, 1495, 13, 1678, 1596, 279, 2831, 1113, 29898, 29873, 296, 26126, 12024, 336, 29897, 13, 1678, 1596, 877, 18210, 485, 336, 29901, 525, 718, 270, 983, 718, 11297, 29876, 1495, 13, 1678, 1596, 877, 29911, 296, 26126, 316, 1235, 336, 1791, 3794, 29901, 525, 718, 851, 29898, 29873, 296, 26126, 12024, 336, 876, 13, 1678, 1596, 877, 29911, 296, 26126, 316, 5112, 485, 336, 1791, 3794, 29901, 525, 718, 851, 29898, 12587, 272, 18210, 485, 3417, 876, 13, 1678, 1596, 877, 12024, 3417, 12033, 3922, 29901, 525, 718, 13420, 4286, 7122, 29898, 280, 10678, 7270, 466, 3922, 876, 13, 1678, 1596, 877, 12024, 3417, 604, 3665, 294, 29901, 525, 718, 851, 29898, 280, 10678, 2110, 3665, 294, 29897, 29871, 718, 11297, 29876, 1495, 13, 13, 13, 13, 29937, 2683, 2683, 26589, 2672, 2965, 5971, 11662, 435, 29949, 17080, 448, 2683, 2683, 23648, 13, 13, 2158, 877, 2277, 29937, 435, 29949, 17080, 21330, 15842, 5454, 835, 1495, 13, 13, 25155, 29965, 2146, 2628, 353, 1881, 877, 14991, 568, 5078, 9235, 29901, 25710, 13, 5269, 29965, 2146, 2628, 353, 1881, 877, 14991, 568, 5078, 4876, 29901, 25710, 13, 13, 2158, 14182, 29876, 29909, 5112, 485, 336, 4732, 25224, 29882, 1458, 29892, 270, 983, 24879, 29901, 320, 29876, 1159, 13, 7830, 485, 336, 29949, 29883, 499, 29874, 353, 29835, 279, 18210, 485, 336, 877, 3188, 29928, 2255, 29889, 3945, 1495, 13, 29881, 983, 353, 270, 983, 18210, 485, 336, 29898, 7830, 485, 336, 29949, 29883, 499, 29874, 29897, 13, 2158, 279, 2831, 1113, 29898, 29873, 296, 26126, 12024, 336, 29897, 13, 13, 13, 8000, 3552, 29873, 296, 26126, 12024, 336, 1405, 29871, 29900, 29897, 322, 313, 12587, 272, 18210, 485, 3417, 1405, 29871, 29900, 29897, 322, 451, 29898, 6249, 10774, 29967, 10482, 22164, 13, 268, 13, 1678, 1596, 877, 14991, 568, 263, 263, 2340, 712, 553, 29872, 1764, 6454, 279, 29901, 1495, 13, 1678, 1596, 877, 29896, 448, 2087, 3845, 8222, 1235, 336, 29905, 29876, 29906, 448, 2087, 3845, 8222, 263, 5112, 485, 336, 1495, 13, 268, 13, 1678, 2984, 353, 1881, 877, 14991, 568, 263, 1015, 2340, 29901, 25710, 13, 13, 1678, 565, 29898, 3385, 1275, 525, 29896, 29374, 13, 4706, 1596, 28909, 29876, 13383, 4136, 1495, 13, 4706, 1235, 336, 353, 1881, 877, 797, 1039, 336, 3672, 1235, 336, 29901, 25710, 259, 13, 308, 13, 4706, 396, 21713, 466, 1743, 263, 1147, 12619, 2340, 12971, 316, 10791, 21664, 381, 13, 4706, 1550, 29898, 1333, 29898, 1026, 336, 12521, 276, 941, 29898, 1026, 336, 876, 1125, 13, 9651, 1235, 336, 353, 1881, 14182, 29876, 29925, 272, 7853, 29892, 4697, 568, 3672, 1235, 336, 694, 883, 1219, 14515, 517, 29901, 16521, 13, 13, 4706, 1550, 29898, 1026, 336, 5612, 300, 1458, 29898, 1026, 336, 29892, 454, 10678, 7270, 466, 3922, 22164, 13, 9651, 1235, 336, 353, 1881, 877, 29963, 542, 30037, 17333, 12033, 283, 7444, 1235, 336, 29892, 1277, 7853, 260, 2016, 714, 336, 29901, 25710, 13, 632, 13, 4706, 454, 10678, 7270, 466, 3922, 29889, 4397, 29898, 1026, 336, 29897, 13, 13, 4706, 12082, 2744, 8733, 29928, 983, 353, 270, 983, 13, 4706, 270, 983, 353, 1235, 336, 18210, 485, 336, 29898, 1026, 336, 29892, 5112, 485, 336, 29949, 29883, 499, 29874, 29892, 270, 983, 29897, 13, 13, 4706, 396, 6565, 15039, 409, 4589, 283, 263, 1235, 336, 13, 4706, 565, 29898, 342, 912, 2744, 8733, 29928, 983, 1275, 270, 983, 1125, 13, 9651, 454, 10678, 2110, 3665, 294, 4619, 29871, 29896, 13, 9651, 12033, 26126, 12024, 336, 22361, 29871, 29896, 13, 9651, 1596, 279, 5709, 29898, 29881, 983, 29892, 12033, 26126, 12024, 336, 29892, 480, 1971, 18210, 485, 3417, 29897, 13, 308, 13, 4706, 25342, 29898, 29881, 983, 1275, 5852, 1125, 396, 6565, 15039, 409, 288, 432, 10482, 4732, 9581, 1251, 13, 9651, 1596, 877, 2177, 370, 1690, 29879, 29991, 478, 542, 30037, 5153, 711, 374, 29884, 263, 5112, 485, 336, 12954, 499, 29874, 29991, 1495, 13, 9651, 1596, 877, 18210, 485, 336, 29901, 525, 718, 5112, 485, 336, 29949, 29883, 499, 29874, 718, 11297, 29876, 1495, 13, 9651, 9581, 10774, 29967, 10482, 353, 5852, 13, 308, 13, 4706, 1683, 29901, 13, 9651, 1596, 279, 5709, 29898, 29881, 983, 29892, 12033, 26126, 12024, 336, 29892, 480, 1971, 18210, 485, 3417, 29897, 13, 308, 13, 1678, 25342, 313, 3385, 1275, 525, 29906, 29374, 13, 4706, 1596, 28909, 29876, 13383, 4136, 1495, 13, 4706, 5112, 29886, 568, 353, 1881, 877, 797, 1039, 336, 5078, 5112, 29886, 568, 29901, 25710, 13, 13, 4706, 565, 29898, 7830, 29886, 568, 18210, 485, 336, 29898, 7830, 29886, 568, 29892, 5112, 485, 336, 29949, 29883, 499, 29874, 22164, 396, 6565, 15039, 409, 288, 432, 10482, 4732, 9581, 1251, 13, 9651, 1596, 877, 18210, 485, 336, 29901, 525, 718, 5112, 485, 336, 29949, 29883, 499, 29874, 718, 11297, 29876, 1495, 13, 9651, 9581, 10774, 29967, 10482, 353, 5852, 13, 4706, 1683, 29901, 13, 9651, 480, 1971, 18210, 485, 3417, 22361, 29871, 29896, 13, 9651, 1596, 279, 5709, 29898, 29881, 983, 29892, 12033, 26126, 12024, 336, 29892, 480, 1971, 18210, 485, 3417, 29897, 13, 1678, 1683, 29901, 13, 4706, 1596, 877, 29925, 272, 7853, 29892, 297, 1039, 336, 3672, 1015, 2340, 12196, 1458, 9903, 29876, 1495, 13, 13, 29937, 2308, 271, 4487, 2186, 5017, 4660, 437, 432, 10482, 13, 361, 29898, 1333, 9581, 10774, 29967, 10482, 1125, 13, 1678, 1596, 877, 29963, 542, 30037, 639, 311, 29884, 288, 432, 10482, 29991, 584, 877, 29897, 13, 1678, 1596, 877, 29909, 5112, 485, 336, 3152, 29901, 525, 718, 5112, 485, 336, 29949, 29883, 499, 29874, 718, 11297, 29876, 1495, 13, 1678, 4660, 353, 525, 5894, 311, 29884, 288, 432, 10482, 29991, 584, 877, 13, 2870, 29901, 13, 1678, 4660, 353, 525, 29963, 663, 29884, 288, 432, 10482, 20714, 13, 13, 1272, 353, 12865, 29889, 3707, 2141, 710, 615, 603, 11702, 29881, 22584, 29885, 22584, 29979, 1273, 29950, 16664, 29924, 16664, 29903, 1159, 13, 13, 13, 690, 2727, 29967, 10482, 353, 426, 13, 1678, 12801, 5813, 29958, 2396, 9235, 29965, 2146, 2628, 29892, 13, 1678, 525, 29923, 29899, 29966, 5813, 29958, 2396, 4876, 29965, 2146, 2628, 29892, 13, 1678, 525, 18210, 485, 336, 438, 29883, 499, 29874, 2396, 5112, 485, 336, 29949, 29883, 499, 29874, 29892, 13, 1678, 525, 5709, 2396, 4660, 29892, 13, 1678, 525, 1469, 321, 379, 2207, 2396, 848, 13, 29913, 13, 13, 2541, 1722, 877, 16211, 1417, 29889, 3126, 742, 525, 29874, 1495, 408, 19325, 4243, 8148, 29901, 13, 1678, 4390, 29889, 15070, 29898, 690, 2727, 29967, 10482, 29892, 19325, 4243, 8148, 29892, 29536, 29922, 29946, 29897, 2 ]
Project1-name.py
the-fridge/Python_Projects
1
169745
# !/usr/bin/env python3 # -*- coding: utf-8 -*- # authors: <NAME> / <NAME> """`Project1-name.py` is a program that asks for the user's name Then it print the given name, and the lenght of this name. """ def initial_way (): """ asks the name, print it with its lenght Original code by <NAME>, using several `print()` """ print('Hello') user_name = input('What is your name?\n') print('It\'s nice to meet you', user_name) print('Length of your name is:') print(len(user_name)) def initial_way_2(): """ asks the name, print it with its lenght Original code by <NAME>, using a variable to store the message and format it before display """ print('Hello') user_name = input('What is your name?\n'). name_size = len(user_name) msg = 'It\'s nice to meet you {0}!\nThe length of your name is: {1}'.format(user_name, name_size) print(msg) def get_name_info(): """ asks the name, print it with its lenght Remake of initial_way() by <NAME> """ name = input('Hello,\nPlease, write your name: ') print('---\nPlease to meet you {}. You name is {} char(s) long.\n---' .format(name, len(name))) def main() : """ Main function of the script Call the other functions """ get_name_info() initial_way() initial_way_2() if __name__ == '__main__': main()
[ 1, 396, 1738, 29914, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 29937, 15717, 29901, 529, 5813, 29958, 847, 529, 5813, 29958, 13, 13, 15945, 6937, 7653, 29896, 29899, 978, 29889, 2272, 29952, 338, 263, 1824, 393, 19514, 363, 278, 1404, 29915, 29879, 1024, 13, 11760, 372, 1596, 278, 2183, 1024, 29892, 322, 278, 28537, 400, 310, 445, 1024, 29889, 13, 15945, 29908, 13, 13, 1753, 2847, 29918, 1582, 313, 1125, 13, 1678, 9995, 19514, 278, 1024, 29892, 1596, 372, 411, 967, 28537, 400, 13, 13, 1678, 8533, 775, 491, 529, 5813, 10202, 773, 3196, 421, 2158, 2555, 13, 1678, 9995, 13, 1678, 1596, 877, 10994, 1495, 13, 1678, 1404, 29918, 978, 353, 1881, 877, 5618, 338, 596, 1024, 29973, 29905, 29876, 1495, 13, 1678, 1596, 877, 3112, 20333, 29879, 7575, 304, 5870, 366, 742, 1404, 29918, 978, 29897, 13, 1678, 1596, 877, 6513, 310, 596, 1024, 338, 29901, 1495, 13, 1678, 1596, 29898, 2435, 29898, 1792, 29918, 978, 876, 13, 13, 1753, 2847, 29918, 1582, 29918, 29906, 7295, 13, 1678, 9995, 19514, 278, 1024, 29892, 1596, 372, 411, 967, 28537, 400, 13, 13, 1678, 8533, 775, 491, 529, 5813, 10202, 773, 263, 2286, 304, 13, 1678, 3787, 278, 2643, 322, 3402, 372, 1434, 2479, 13, 1678, 9995, 13, 1678, 1596, 877, 10994, 1495, 13, 1678, 1404, 29918, 978, 353, 1881, 877, 5618, 338, 596, 1024, 29973, 29905, 29876, 2824, 13, 1678, 1024, 29918, 2311, 353, 7431, 29898, 1792, 29918, 978, 29897, 13, 1678, 10191, 353, 525, 3112, 20333, 29879, 7575, 304, 5870, 366, 426, 29900, 29913, 9903, 29876, 1576, 3309, 310, 596, 1024, 338, 29901, 426, 29896, 29913, 4286, 4830, 29898, 1792, 29918, 978, 29892, 1024, 29918, 2311, 29897, 13, 1678, 1596, 29898, 7645, 29897, 13, 13, 1753, 679, 29918, 978, 29918, 3888, 7295, 13, 1678, 9995, 19514, 278, 1024, 29892, 1596, 372, 411, 967, 28537, 400, 13, 13, 1678, 5240, 1296, 310, 2847, 29918, 1582, 580, 491, 529, 5813, 29958, 13, 1678, 9995, 13, 1678, 1024, 353, 1881, 877, 10994, 2053, 29876, 12148, 29892, 2436, 596, 1024, 29901, 25710, 13, 1678, 1596, 877, 489, 2612, 29876, 12148, 304, 5870, 366, 426, 1836, 887, 1024, 338, 6571, 1373, 29898, 29879, 29897, 1472, 7790, 29876, 5634, 29915, 13, 4706, 869, 4830, 29898, 978, 29892, 7431, 29898, 978, 4961, 13, 13, 13, 1753, 1667, 580, 584, 13, 1678, 9995, 4241, 740, 310, 278, 2471, 13, 13, 1678, 8251, 278, 916, 3168, 13, 1678, 9995, 13, 1678, 679, 29918, 978, 29918, 3888, 580, 13, 1678, 2847, 29918, 1582, 580, 13, 1678, 2847, 29918, 1582, 29918, 29906, 580, 13, 13, 13, 361, 4770, 978, 1649, 1275, 525, 1649, 3396, 1649, 2396, 13, 1678, 1667, 580, 13, 2 ]
TemplatesAndTests.py
LSRCT/TandT
0
113402
""" Usefull functions for loading files etc. -AN """ import os import pickle import zipfile, lzma import numpy as np import matplotlib.pyplot as plt from collections import OrderedDict # saves dict to csv using keys as headers def saveToCSV(savedict, filename = "", path = ""): try: #print(savedict) if not filename: datanum = 1 filename = "data" while os.path.isfile("".join([filename,str(datanum),".csv"])): datanum += 1 filename = "".join([filename,str(datanum)]) if filename[-4:] != ".csv": filename = "".join([filename,".csv"]) if not path: path = os.getcwd() if not os.path.isdir(path): os.makedirs(path) if not os.path.isfile("".join([path,filename])): file = open("".join([path,filename]),'w') file.write("".join([";".join(list(savedict.keys())),";\n"])) file.close() file = open("".join([path,filename]),'a') valueslist = list(savedict.values()) for rowcount in range((len(list(valueslist[0])))): for values in valueslist: file.write("".join([str(values[rowcount]), ";"])) file.write(";\n") except PermissionError: print("Error saving data, is the file open?") except (AttributeError, TypeError): print("Error in dataformat, use a dict filled with lists.") except KeyError: print("Error in length of data") return 1 # takes a dict and gives a list with dicts. Kinda sorts by relKey def splitIntoDicts(data, relKey="Lackh (m)"): dicts = [] for group in set(data[relKey]): datanew = OrderedDict() for gnumb, gline in enumerate(data[relKey]): if gline == group: for key in data: if key in datanew: datanew[key].append(data[key][gnumb]) else: datanew[key] = [data[key][gnumb]] dicts.append(datanew) return dicts def parseSubDirs(filtlistlist, dirname="", dirstruct=[]): """ :param filtlistlist: list of lists of strings :param dirname: dir to start parsing from added to cwd :param dirstruct use predefined dirstruct to avoid calling os.walk all the time :return: list of all files containing at least one of the strings of all the lists in filtlistlist """ if not dirname: path = os.getcwd() else: path = dirname files = [] if len(dirstruct) > 0: dirs = dirstruct else: dirs = list(os.walk(path)) for r, d, f in dirs: for file in f: for filtlist in filtlistlist: if not np.any([filt in os.path.join(r, file) for filt in filtlist]): break else: files.append(os.path.join(r, file)) return files def multiReadData(paths, filtlist, splitString="Frequenz [Hz]"): dataDict = OrderedDict() for path in paths: data, metadata = readData(path) filename = path.split("\\")[-1] if splitString not in data: splitString = "frequenz (Hz)" # in case you spelled it wrong data = splitData(data, splitString) for filtkey in filtlist: if filtkey in path: if not filtkey in dataDict: dataDict[filtkey] = OrderedDict() if not filename in dataDict[filtkey]: dataDict[filtkey][filename] = OrderedDict() dataDict[filtkey][filename]["data"] = data dataDict[filtkey][filename]["metadata"] = metadata dataDict[filtkey][filename]["metadata"]["path"] = path return dataDict def splitData(data, relKey = "Frequenz [Hz]"): """ :param data: dictionary with data :return: data separated into sweeps """ if relKey in data: relKey = relKey elif "frequenz (Hz)" in data: relKey = "frequenz (Hz)" elif 'Frequenz [Hz]' in data: relKey = 'Frequenz [Hz]' elif ' Frequenz [Hz]' in data: relKey = ' Frequenz [Hz]' newdict = OrderedDict() sweepAm = 0 # if len(set(data[relKey])) % len(data[relKey]): # print("shortcut") # for key in data: # newdict[key] = [data[key][x*len(set(data[relKey])):len(set(data[relKey]))*(1+x)] for x in range(int(len(data[relKey])/len(set(data[relKey]))))] # return newdict cor = -(data[relKey][0]-data[relKey][1])/np.abs(data[relKey][0]-data[relKey][1]) for point, el in enumerate(data[relKey]): if (point > 0 and (el*cor) < (data[relKey][point-1])*cor) or (point == len(data[relKey])-cor): for key in data: if key in newdict: newdict[key].append(data[key][sweepAm:point]) else: newdict[key] = [data[key][sweepAm:point]] sweepAm=point return newdict def savePickle(savedict, filename = "", path =""): datanum = 1 while os.path.isfile(path+str(datanum)+".pkl"): datanum += 1 filename = "".join([filename,str(datanum)]) if filename[-4:] != ".pkl": filename = "".join([filename,".pkl"]) if not os.path.isdir(path): os.makedirs(path) with open("".join([path,filename]), 'wb+') as rawF: pickle.dump(savedict, rawF, pickle.HIGHEST_PROTOCOL) def transDataML(dataDict, xKey, compFunc=lambda a: a): X = [] y = [] for campNumb, campaign in enumerate(dataDict): for fileCount, messfile in enumerate(dataDict[campaign]): for data in dataDict[campaign][messfile]["data"][xKey]: X.append(data) y.append(dataDict[campaign][messfile]["metadata"]["Chip:"] + " " + dataDict[campaign][messfile]["metadata"]["Substanz:"]) return X, y def winAvg(data, winWidth=0, winfunc=np.blackman, mode="same"): if not winWidth: if int(len(data)*(5/100))>0: winWidth = int(len(data)*(10/100)) if not winWidth % 2: winWidth += 1 else: return data kernel = winfunc(winWidth)/np.sum(winfunc(winWidth)) data = np.convolve(data, kernel, mode=mode) return data # zips raw data of all sub folders to path containing the provided string def zipRaw(path = os.getcwd(), mark="_raw", outname = "raw.zip"): if outname[-4:] != ".zip": outname = "".join([outname,".zip"]) zf = zipfile.ZipFile(outname, mode="w") cTree = list(os.walk(path)) for folder in cTree[0][1]: if mark in folder: for datei in list(os.walk(path+ "//" +folder))[0][2]: zf.write(folder+"//"+datei, compress_type=zipfile.ZIP_LZMA) zf.close() return 1 def readData(filename, path=""): """ :param filename: trivial :param path: trivial :return: data, metadata as dicts """ data = dict() metadata = dict() with open("".join([path, filename]),'r') as file: lines = [[part for part in line.rstrip('\n').split(";") if part] for line in file] for count, line in enumerate(lines): if len(line) > 3: keyline = line keypoint = count break if len(line) == 2 or not line[0]: metadata[str(line[0])] = str(line[1]) for key in keyline: data[key] = [] for line in lines: if len(line) == len(data.keys()): for pos in range(len(keyline)): try: data[keyline[pos]].append(float(line[pos])) except: pass metadata["dataKeys"] = data.keys() return data, metadata if __name__ == "__main__": testdict = {"temperature": [1,2,3,4], "length":[4,5,6,7], "time":[8,9,10,11]} data,metadata = readData("Daten_sim.csv", path="/home/an/01_XSensor/Chipvergleich/") data = splitData(data) signal = {"values": data["UBol (V), Spannung"]} print(np.shape(signal["values"])) plt.plot(signal["values"][0]) plt.show()
[ 1, 9995, 30004, 13, 11403, 8159, 3168, 363, 8363, 2066, 2992, 22993, 13, 29899, 2190, 30004, 13, 15945, 19451, 13, 30004, 13, 5215, 2897, 30004, 13, 5215, 5839, 280, 30004, 13, 5215, 14319, 1445, 29892, 301, 29920, 655, 30004, 13, 5215, 12655, 408, 7442, 30004, 13, 5215, 22889, 29889, 2272, 5317, 408, 14770, 30004, 13, 3166, 16250, 1053, 8170, 287, 21533, 30004, 13, 29937, 27401, 9657, 304, 11799, 773, 6611, 408, 9066, 30004, 13, 1753, 4078, 1762, 29907, 7597, 29898, 17314, 919, 29892, 10422, 353, 12633, 2224, 353, 5124, 1125, 30004, 13, 1678, 1018, 29901, 30004, 13, 4706, 396, 2158, 29898, 17314, 919, 8443, 13, 4706, 565, 451, 10422, 29901, 30004, 13, 9651, 1418, 273, 398, 353, 29871, 29896, 30004, 13, 9651, 10422, 353, 376, 1272, 19451, 13, 9651, 1550, 2897, 29889, 2084, 29889, 275, 1445, 703, 1642, 7122, 4197, 9507, 29892, 710, 29898, 4130, 273, 398, 511, 1642, 7638, 3108, 22164, 30004, 13, 18884, 1418, 273, 398, 4619, 29871, 29896, 30004, 13, 9651, 10422, 353, 376, 1642, 7122, 4197, 9507, 29892, 710, 29898, 4130, 273, 398, 29897, 2314, 30004, 13, 4706, 565, 10422, 14352, 29946, 17531, 2804, 11393, 7638, 1115, 30004, 13, 9651, 10422, 353, 376, 1642, 7122, 4197, 9507, 29892, 1642, 7638, 20068, 30004, 13, 4706, 565, 451, 2224, 29901, 30004, 13, 9651, 2224, 353, 2897, 29889, 657, 29883, 9970, 26471, 13, 4706, 565, 451, 2897, 29889, 2084, 29889, 275, 3972, 29898, 2084, 1125, 30004, 13, 9651, 2897, 29889, 29885, 12535, 12935, 29898, 2084, 8443, 13, 4706, 565, 451, 2897, 29889, 2084, 29889, 275, 1445, 703, 1642, 7122, 4197, 2084, 29892, 9507, 12622, 29901, 30004, 13, 9651, 934, 353, 1722, 703, 1642, 7122, 4197, 2084, 29892, 9507, 11724, 29915, 29893, 1495, 30004, 13, 9651, 934, 29889, 3539, 703, 1642, 7122, 4197, 1769, 1642, 7122, 29898, 1761, 29898, 17314, 919, 29889, 8149, 3101, 511, 1769, 29905, 29876, 3108, 876, 30004, 13, 9651, 934, 29889, 5358, 26471, 13, 4706, 934, 353, 1722, 703, 1642, 7122, 4197, 2084, 29892, 9507, 11724, 29915, 29874, 1495, 30004, 13, 4706, 1819, 1761, 353, 1051, 29898, 17314, 919, 29889, 5975, 3101, 30004, 13, 4706, 363, 1948, 2798, 297, 3464, 3552, 2435, 29898, 1761, 29898, 5975, 1761, 29961, 29900, 12622, 22164, 30004, 13, 9651, 363, 1819, 297, 1819, 1761, 29901, 30004, 13, 18884, 934, 29889, 3539, 703, 1642, 7122, 4197, 710, 29898, 5975, 29961, 798, 2798, 11724, 12159, 3108, 876, 30004, 13, 9651, 934, 29889, 3539, 703, 10436, 29876, 1159, 30004, 13, 1678, 5174, 20894, 2333, 2392, 29901, 30004, 13, 4706, 1596, 703, 2392, 14238, 848, 29892, 338, 278, 934, 1722, 29973, 1159, 30004, 13, 1678, 5174, 313, 6708, 2392, 29892, 20948, 1125, 30004, 13, 4706, 1596, 703, 2392, 297, 848, 4830, 29892, 671, 263, 9657, 10423, 411, 8857, 23157, 30004, 13, 1678, 5174, 7670, 2392, 29901, 30004, 13, 4706, 1596, 703, 2392, 297, 3309, 310, 848, 1159, 30004, 13, 1678, 736, 29871, 29896, 30004, 13, 30004, 13, 30004, 13, 29937, 4893, 263, 9657, 322, 4076, 263, 1051, 411, 9657, 29879, 29889, 476, 11054, 23551, 491, 1104, 2558, 30004, 13, 1753, 6219, 797, 517, 21533, 29879, 29898, 1272, 29892, 1104, 2558, 543, 29931, 547, 29882, 313, 29885, 5513, 1125, 30004, 13, 1678, 9657, 29879, 353, 5159, 30004, 13, 1678, 363, 2318, 297, 731, 29898, 1272, 29961, 2674, 2558, 29962, 1125, 30004, 13, 4706, 1418, 273, 809, 353, 8170, 287, 21533, 26471, 13, 4706, 363, 330, 1949, 29890, 29892, 330, 1220, 297, 26985, 29898, 1272, 29961, 2674, 2558, 29962, 1125, 30004, 13, 9651, 565, 330, 1220, 1275, 2318, 29901, 30004, 13, 18884, 363, 1820, 297, 848, 29901, 30004, 13, 462, 1678, 565, 1820, 297, 1418, 273, 809, 29901, 30004, 13, 462, 4706, 1418, 273, 809, 29961, 1989, 1822, 4397, 29898, 1272, 29961, 1989, 3816, 29887, 1949, 29890, 2314, 30004, 13, 462, 1678, 1683, 29901, 30004, 13, 462, 4706, 1418, 273, 809, 29961, 1989, 29962, 353, 518, 1272, 29961, 1989, 3816, 29887, 1949, 29890, 5262, 30004, 13, 4706, 9657, 29879, 29889, 4397, 29898, 4130, 273, 809, 8443, 13, 1678, 736, 9657, 29879, 30004, 13, 30004, 13, 30004, 13, 1753, 6088, 4035, 9170, 29879, 29898, 1777, 29873, 1761, 1761, 29892, 4516, 978, 543, 613, 270, 765, 1247, 29922, 2636, 1125, 30004, 13, 1678, 9995, 30004, 13, 1678, 584, 3207, 977, 29873, 1761, 1761, 29901, 1051, 310, 8857, 310, 6031, 30004, 13, 1678, 584, 3207, 4516, 978, 29901, 4516, 304, 1369, 13755, 515, 2715, 304, 274, 9970, 30004, 13, 1678, 584, 3207, 270, 765, 1247, 671, 758, 12119, 270, 765, 1247, 304, 4772, 5432, 2897, 29889, 20919, 599, 278, 931, 30004, 13, 1678, 584, 2457, 29901, 1051, 310, 599, 2066, 6943, 472, 3203, 697, 310, 278, 6031, 310, 599, 278, 8857, 297, 977, 29873, 1761, 1761, 30004, 13, 1678, 9995, 30004, 13, 1678, 565, 451, 4516, 978, 29901, 30004, 13, 4706, 2224, 353, 2897, 29889, 657, 29883, 9970, 26471, 13, 1678, 1683, 29901, 30004, 13, 4706, 2224, 353, 4516, 978, 30004, 13, 1678, 2066, 353, 5159, 30004, 13, 1678, 565, 7431, 29898, 29881, 765, 1247, 29897, 1405, 29871, 29900, 29901, 30004, 13, 4706, 4516, 29879, 353, 270, 765, 1247, 30004, 13, 1678, 1683, 29901, 30004, 13, 4706, 4516, 29879, 353, 1051, 29898, 359, 29889, 20919, 29898, 2084, 876, 30004, 13, 1678, 363, 364, 29892, 270, 29892, 285, 297, 4516, 29879, 29901, 30004, 13, 4706, 363, 934, 297, 285, 29901, 30004, 13, 9651, 363, 977, 29873, 1761, 297, 977, 29873, 1761, 1761, 29901, 30004, 13, 18884, 565, 451, 7442, 29889, 1384, 4197, 1777, 29873, 297, 2897, 29889, 2084, 29889, 7122, 29898, 29878, 29892, 934, 29897, 363, 977, 29873, 297, 977, 29873, 1761, 29962, 1125, 30004, 13, 462, 1678, 2867, 30004, 13, 9651, 1683, 29901, 30004, 13, 18884, 2066, 29889, 4397, 29898, 359, 29889, 2084, 29889, 7122, 29898, 29878, 29892, 934, 876, 30004, 13, 1678, 736, 2066, 30004, 13, 30004, 13, 1753, 2473, 6359, 1469, 29898, 24772, 29892, 977, 29873, 1761, 29892, 6219, 1231, 543, 23923, 339, 4666, 518, 12661, 18017, 1125, 30004, 13, 1678, 848, 21533, 353, 8170, 287, 21533, 26471, 13, 1678, 363, 2224, 297, 10898, 29901, 30004, 13, 4706, 848, 29892, 15562, 353, 1303, 1469, 29898, 2084, 8443, 13, 4706, 10422, 353, 2224, 29889, 5451, 703, 1966, 1159, 14352, 29896, 29962, 30004, 13, 4706, 565, 6219, 1231, 451, 297, 848, 29901, 30004, 13, 9651, 6219, 1231, 353, 376, 10745, 339, 4666, 313, 12661, 5513, 29871, 396, 297, 1206, 366, 805, 14356, 372, 2743, 30004, 13, 4706, 848, 353, 6219, 1469, 29898, 1272, 29892, 6219, 1231, 8443, 13, 4706, 363, 977, 29873, 1989, 297, 977, 29873, 1761, 29901, 30004, 13, 9651, 565, 977, 29873, 1989, 297, 2224, 29901, 30004, 13, 18884, 565, 451, 977, 29873, 1989, 297, 848, 21533, 29901, 30004, 13, 462, 1678, 848, 21533, 29961, 1777, 29873, 1989, 29962, 353, 8170, 287, 21533, 26471, 13, 18884, 565, 451, 10422, 297, 848, 21533, 29961, 1777, 29873, 1989, 5387, 30004, 13, 462, 1678, 848, 21533, 29961, 1777, 29873, 1989, 3816, 9507, 29962, 353, 8170, 287, 21533, 26471, 13, 18884, 848, 21533, 29961, 1777, 29873, 1989, 3816, 9507, 29962, 3366, 1272, 3108, 353, 848, 30004, 13, 18884, 848, 21533, 29961, 1777, 29873, 1989, 3816, 9507, 29962, 3366, 19635, 3108, 353, 15562, 30004, 13, 18884, 848, 21533, 29961, 1777, 29873, 1989, 3816, 9507, 29962, 3366, 19635, 3108, 3366, 2084, 3108, 353, 2224, 30004, 13, 1678, 736, 848, 21533, 30004, 13, 30004, 13, 30004, 13, 1753, 6219, 1469, 29898, 1272, 29892, 1104, 2558, 353, 376, 23923, 339, 4666, 518, 12661, 18017, 1125, 30004, 13, 1678, 9995, 30004, 13, 1678, 584, 3207, 848, 29901, 30004, 13, 4706, 8600, 411, 848, 30004, 13, 1678, 584, 2457, 29901, 30004, 13, 4706, 848, 13055, 964, 7901, 8961, 30004, 13, 1678, 9995, 30004, 13, 1678, 565, 1104, 2558, 297, 848, 29901, 30004, 13, 4706, 1104, 2558, 353, 1104, 2558, 30004, 13, 1678, 25342, 376, 10745, 339, 4666, 313, 12661, 5513, 297, 848, 29901, 30004, 13, 4706, 1104, 2558, 353, 376, 10745, 339, 4666, 313, 12661, 5513, 30004, 13, 1678, 25342, 525, 23923, 339, 4666, 518, 12661, 29962, 29915, 297, 848, 29901, 30004, 13, 4706, 1104, 2558, 353, 525, 23923, 339, 4666, 518, 12661, 29962, 29915, 30004, 13, 1678, 25342, 525, 3878, 339, 4666, 518, 12661, 29962, 29915, 297, 848, 29901, 30004, 13, 4706, 1104, 2558, 353, 525, 3878, 339, 4666, 518, 12661, 29962, 29915, 30004, 13, 1678, 716, 8977, 353, 8170, 287, 21533, 26471, 13, 1678, 7901, 1022, 6833, 353, 29871, 29900, 30004, 13, 1678, 396, 565, 7431, 29898, 842, 29898, 1272, 29961, 2674, 2558, 12622, 1273, 7431, 29898, 1272, 29961, 2674, 2558, 29962, 1125, 30004, 13, 1678, 396, 268, 1596, 703, 12759, 7582, 1159, 30004, 13, 1678, 396, 268, 363, 1820, 297, 848, 29901, 30004, 13, 1678, 396, 308, 716, 8977, 29961, 1989, 29962, 353, 518, 1272, 29961, 1989, 3816, 29916, 29930, 2435, 29898, 842, 29898, 1272, 29961, 2674, 2558, 12622, 29901, 2435, 29898, 842, 29898, 1272, 29961, 2674, 2558, 12622, 16395, 29896, 29974, 29916, 4638, 363, 921, 297, 3464, 29898, 524, 29898, 2435, 29898, 1272, 29961, 2674, 2558, 2314, 29914, 2435, 29898, 842, 29898, 1272, 29961, 2674, 2558, 12622, 28166, 30004, 13, 1678, 396, 268, 736, 716, 8977, 30004, 13, 1678, 1034, 353, 19691, 1272, 29961, 2674, 2558, 3816, 29900, 29962, 29899, 1272, 29961, 2674, 2558, 3816, 29896, 2314, 29914, 9302, 29889, 6897, 29898, 1272, 29961, 2674, 2558, 3816, 29900, 29962, 29899, 1272, 29961, 2674, 2558, 3816, 29896, 2314, 30004, 13, 1678, 363, 1298, 29892, 560, 297, 26985, 29898, 1272, 29961, 2674, 2558, 29962, 1125, 30004, 13, 4706, 565, 313, 3149, 1405, 29871, 29900, 322, 313, 295, 29930, 2616, 29897, 529, 313, 1272, 29961, 2674, 2558, 3816, 3149, 29899, 29896, 2314, 29930, 2616, 29897, 470, 313, 3149, 1275, 7431, 29898, 1272, 29961, 2674, 2558, 2314, 29899, 2616, 1125, 30004, 13, 9651, 363, 1820, 297, 848, 29901, 30004, 13, 18884, 565, 1820, 297, 716, 8977, 29901, 30004, 13, 462, 1678, 716, 8977, 29961, 1989, 1822, 4397, 29898, 1272, 29961, 1989, 3816, 29879, 705, 1022, 6833, 29901, 3149, 2314, 30004, 13, 18884, 1683, 29901, 30004, 13, 462, 1678, 716, 8977, 29961, 1989, 29962, 353, 518, 1272, 29961, 1989, 3816, 29879, 705, 1022, 6833, 29901, 3149, 5262, 30004, 13, 9651, 7901, 1022, 6833, 29922, 3149, 30004, 13, 1678, 736, 716, 8977, 30004, 13, 30004, 13, 1753, 4078, 29925, 860, 280, 29898, 17314, 919, 29892, 10422, 353, 12633, 2224, 353, 15945, 1125, 30004, 13, 1678, 1418, 273, 398, 353, 29871, 29896, 30004, 13, 1678, 1550, 2897, 29889, 2084, 29889, 275, 1445, 29898, 2084, 29974, 710, 29898, 4130, 273, 398, 7240, 1642, 29886, 6321, 29908, 1125, 30004, 13, 4706, 1418, 273, 398, 4619, 29871, 29896, 30004, 13, 1678, 10422, 353, 376, 1642, 7122, 4197, 9507, 29892, 710, 29898, 4130, 273, 398, 29897, 2314, 30004, 13, 1678, 565, 10422, 14352, 29946, 17531, 2804, 11393, 29886, 6321, 1115, 30004, 13, 4706, 10422, 353, 376, 1642, 7122, 4197, 9507, 29892, 1642, 29886, 6321, 20068, 30004, 13, 1678, 565, 451, 2897, 29889, 2084, 29889, 275, 3972, 29898, 2084, 1125, 30004, 13, 4706, 2897, 29889, 29885, 12535, 12935, 29898, 2084, 8443, 13, 1678, 411, 1722, 703, 1642, 7122, 4197, 2084, 29892, 9507, 11724, 525, 29893, 29890, 29974, 1495, 408, 10650, 29943, 29901, 30004, 13, 4706, 5839, 280, 29889, 15070, 29898, 17314, 919, 29892, 10650, 29943, 29892, 5839, 280, 29889, 29950, 6259, 9606, 1254, 29918, 8618, 4986, 15032, 8443, 13, 30004, 13, 1753, 1301, 1469, 1988, 29898, 1272, 21533, 29892, 921, 2558, 29892, 752, 14400, 29922, 2892, 263, 29901, 263, 1125, 30004, 13, 1678, 1060, 353, 5159, 30004, 13, 1678, 343, 353, 5159, 30004, 13, 1678, 363, 4242, 29940, 3774, 29892, 11531, 297, 26985, 29898, 1272, 21533, 1125, 30004, 13, 4706, 363, 934, 3981, 29892, 4473, 1445, 297, 26985, 29898, 1272, 21533, 29961, 24821, 8729, 29962, 1125, 30004, 13, 9651, 363, 848, 297, 848, 21533, 29961, 24821, 8729, 3816, 12062, 1445, 29962, 3366, 1272, 3108, 29961, 29916, 2558, 5387, 30004, 13, 18884, 1060, 29889, 4397, 29898, 1272, 8443, 13, 18884, 343, 29889, 4397, 29898, 1272, 21533, 29961, 24821, 8729, 3816, 12062, 1445, 29962, 3366, 19635, 3108, 3366, 1451, 666, 29901, 3108, 718, 376, 376, 718, 848, 21533, 29961, 24821, 8729, 3816, 12062, 1445, 29962, 3366, 19635, 3108, 3366, 4035, 303, 4096, 6160, 2314, 30004, 13, 1678, 736, 1060, 29892, 343, 30004, 13, 30004, 13, 30004, 13, 1753, 5401, 12810, 29887, 29898, 1272, 29892, 5401, 6110, 29922, 29900, 29892, 5401, 9891, 29922, 9302, 29889, 8517, 1171, 29892, 4464, 543, 17642, 29908, 1125, 30004, 13, 1678, 565, 451, 5401, 6110, 29901, 30004, 13, 4706, 565, 938, 29898, 2435, 29898, 1272, 11877, 29898, 29945, 29914, 29896, 29900, 29900, 876, 29958, 29900, 29901, 30004, 13, 9651, 5401, 6110, 353, 938, 29898, 2435, 29898, 1272, 11877, 29898, 29896, 29900, 29914, 29896, 29900, 29900, 876, 30004, 13, 9651, 565, 451, 5401, 6110, 1273, 29871, 29906, 29901, 30004, 13, 18884, 5401, 6110, 4619, 29871, 29896, 30004, 13, 4706, 1683, 29901, 736, 848, 30004, 13, 1678, 8466, 353, 5401, 9891, 29898, 5080, 6110, 6802, 9302, 29889, 2083, 29898, 5080, 9891, 29898, 5080, 6110, 876, 30004, 13, 1678, 848, 353, 7442, 29889, 535, 1555, 345, 29898, 1272, 29892, 8466, 29892, 4464, 29922, 8513, 8443, 13, 1678, 736, 848, 30004, 13, 30004, 13, 30004, 13, 29937, 503, 4512, 10650, 848, 310, 599, 1014, 16495, 304, 2224, 6943, 278, 4944, 1347, 30004, 13, 1753, 14319, 22131, 29898, 2084, 353, 2897, 29889, 657, 29883, 9970, 3285, 2791, 543, 29918, 1610, 613, 714, 978, 353, 376, 1610, 29889, 7554, 29908, 1125, 30004, 13, 1678, 565, 714, 978, 14352, 29946, 17531, 2804, 11393, 7554, 1115, 30004, 13, 4706, 714, 978, 353, 376, 1642, 7122, 4197, 449, 978, 29892, 1642, 7554, 20068, 30004, 13, 1678, 503, 29888, 353, 14319, 1445, 29889, 26264, 2283, 29898, 449, 978, 29892, 4464, 543, 29893, 1159, 30004, 13, 1678, 274, 9643, 353, 1051, 29898, 359, 29889, 20919, 29898, 2084, 876, 30004, 13, 1678, 363, 4138, 297, 274, 9643, 29961, 29900, 3816, 29896, 5387, 30004, 13, 4706, 565, 2791, 297, 4138, 29901, 30004, 13, 9651, 363, 2635, 29875, 297, 1051, 29898, 359, 29889, 20919, 29898, 2084, 29974, 376, 458, 29908, 718, 12083, 876, 29961, 29900, 3816, 29906, 5387, 30004, 13, 18884, 503, 29888, 29889, 3539, 29898, 12083, 13578, 458, 17969, 27563, 29892, 27122, 29918, 1853, 29922, 7554, 1445, 29889, 29999, 5690, 29918, 29931, 29999, 1529, 8443, 13, 1678, 503, 29888, 29889, 5358, 26471, 13, 1678, 736, 29871, 29896, 30004, 13, 30004, 13, 1753, 1303, 1469, 29898, 9507, 29892, 2224, 13776, 1125, 30004, 13, 1678, 9995, 30004, 13, 1678, 584, 3207, 10422, 29901, 12604, 30004, 13, 1678, 584, 3207, 2224, 29901, 12604, 30004, 13, 1678, 584, 2457, 29901, 848, 29892, 15562, 408, 9657, 29879, 30004, 13, 1678, 9995, 30004, 13, 1678, 848, 353, 9657, 26471, 13, 1678, 15562, 353, 9657, 26471, 13, 1678, 411, 1722, 703, 1642, 7122, 4197, 2084, 29892, 10422, 11724, 29915, 29878, 1495, 408, 934, 29901, 30004, 13, 4706, 3454, 353, 5519, 1595, 363, 760, 297, 1196, 29889, 29878, 17010, 28909, 29876, 2824, 5451, 703, 29936, 1159, 565, 760, 29962, 363, 1196, 297, 934, 29962, 30004, 13, 4706, 363, 2302, 29892, 1196, 297, 26985, 29898, 9012, 1125, 30004, 13, 9651, 565, 7431, 29898, 1220, 29897, 1405, 29871, 29941, 29901, 30004, 13, 18884, 1820, 1220, 353, 1196, 30004, 13, 18884, 1820, 3149, 353, 2302, 30004, 13, 18884, 2867, 30004, 13, 9651, 565, 7431, 29898, 1220, 29897, 1275, 29871, 29906, 470, 451, 1196, 29961, 29900, 5387, 30004, 13, 18884, 15562, 29961, 710, 29898, 1220, 29961, 29900, 2314, 29962, 353, 851, 29898, 1220, 29961, 29896, 2314, 30004, 13, 4706, 363, 1820, 297, 1820, 1220, 29901, 30004, 13, 9651, 848, 29961, 1989, 29962, 353, 5159, 30004, 13, 4706, 363, 1196, 297, 3454, 29901, 30004, 13, 9651, 565, 7431, 29898, 1220, 29897, 1275, 7431, 29898, 1272, 29889, 8149, 580, 1125, 30004, 13, 18884, 363, 926, 297, 3464, 29898, 2435, 29898, 1989, 1220, 22164, 30004, 13, 462, 1678, 1018, 29901, 30004, 13, 462, 4706, 848, 29961, 1989, 1220, 29961, 1066, 29962, 1822, 4397, 29898, 7411, 29898, 1220, 29961, 1066, 12622, 30004, 13, 462, 1678, 5174, 29901, 1209, 30004, 13, 1678, 15562, 3366, 1272, 15506, 3108, 353, 848, 29889, 8149, 26471, 13, 1678, 736, 848, 29892, 15562, 30004, 13, 30004, 13, 30004, 13, 30004, 13, 30004, 13, 30004, 13, 361, 4770, 978, 1649, 1275, 376, 1649, 3396, 1649, 1115, 30004, 13, 1678, 1243, 8977, 353, 8853, 12863, 1535, 1115, 518, 29896, 29892, 29906, 29892, 29941, 29892, 29946, 1402, 376, 2848, 1115, 29961, 29946, 29892, 29945, 29892, 29953, 29892, 29955, 1402, 376, 2230, 1115, 29961, 29947, 29892, 29929, 29892, 29896, 29900, 29892, 29896, 29896, 29962, 8117, 13, 1678, 848, 29892, 19635, 353, 1303, 1469, 703, 29928, 2579, 29918, 3601, 29889, 7638, 613, 2224, 13802, 5184, 29914, 273, 29914, 29900, 29896, 29918, 29990, 29903, 6073, 29914, 1451, 666, 369, 19867, 29914, 1159, 30004, 13, 1678, 848, 353, 6219, 1469, 29898, 1272, 8443, 13, 1678, 7182, 353, 8853, 5975, 1115, 848, 3366, 7466, 324, 313, 29963, 511, 1706, 812, 686, 3108, 8117, 13, 1678, 1596, 29898, 9302, 29889, 12181, 29898, 25436, 3366, 5975, 3108, 876, 30004, 13, 1678, 14770, 29889, 5317, 29898, 25436, 3366, 5975, 3108, 29961, 29900, 2314, 30004, 13, 1678, 14770, 29889, 4294, 580, 2 ]
docs/hydrostatic-pressure/hydrostatic_pressure.py
TOKU-Systems/tutorials
0
24824
<filename>docs/hydrostatic-pressure/hydrostatic_pressure.py import pandas as pd df = pd.read_sql( ''' SELECT a.name, h.name, s.name, sd.t, sd.y FROM assets a JOIN hardpoints h ON a.id = h.asset_id JOIN signals s ON h.id = s.hardpoint_id JOIN LATERAL ( SELECT x.t, x.y FROM signal_data x WHERE x.signal_id = s.id ORDER BY x.t DESC LIMIT 1 ) sd ON true where s.name='Pressure' ''', "postgresql://data_viewer:[email protected]/new_mareland") df_new = df.set_axis([ 'Asset name', 'Hardpoint', 'Signal name', 'Last time', 'Height'], axis=1, inplace=False) print('Enter the specific gravity of the liquid in kg/m3: ') user_input_specific_gravity = float(input()) g = 9.81 df_new['Height'] = df_new['Height']/(user_input_specific_gravity * g) for index, row in df_new.iterrows(): df_new.iloc[index, [4]] = row['Height'] df_new.iloc[index, [3]] = pd.to_datetime(row['Last time']) print(df_new.to_string( formatters={ 'Last time': lambda x: f'{pd.to_datetime(x,unit="D"):%X}', 'Height': lambda x: f'{x:.5g}' }))
[ 1, 529, 9507, 29958, 2640, 29914, 29882, 11279, 7959, 29899, 2139, 545, 29914, 29882, 11279, 7959, 29918, 2139, 545, 29889, 2272, 13, 5215, 11701, 408, 10518, 13, 13, 13, 2176, 353, 10518, 29889, 949, 29918, 2850, 29898, 13, 1678, 14550, 13, 1678, 5097, 263, 29889, 978, 29892, 298, 29889, 978, 29892, 269, 29889, 978, 29892, 28972, 29889, 29873, 29892, 28972, 29889, 29891, 13, 1678, 3895, 21608, 263, 13, 1678, 8780, 2898, 9748, 298, 6732, 263, 29889, 333, 353, 298, 29889, 24129, 29918, 333, 13, 1678, 8780, 18470, 269, 6732, 298, 29889, 333, 353, 269, 29889, 6800, 3149, 29918, 333, 13, 1678, 8780, 365, 1299, 1001, 1964, 313, 13, 4706, 5097, 921, 29889, 29873, 29892, 921, 29889, 29891, 13, 4706, 3895, 7182, 29918, 1272, 921, 13, 4706, 5754, 921, 29889, 25436, 29918, 333, 353, 269, 29889, 333, 13, 4706, 15606, 6770, 921, 29889, 29873, 23050, 13, 4706, 27848, 29871, 29896, 13, 4706, 1723, 28972, 6732, 1565, 988, 269, 29889, 978, 2433, 10923, 545, 29915, 13, 1678, 6629, 742, 13, 1678, 376, 29272, 597, 1272, 29918, 29894, 15580, 29901, 517, 2120, 481, 680, 7681, 973, 29879, 29992, 481, 680, 4346, 29889, 17082, 375, 973, 29879, 29889, 510, 29914, 1482, 29918, 29885, 598, 1049, 1159, 13, 13, 2176, 29918, 1482, 353, 4489, 29889, 842, 29918, 8990, 4197, 13, 1678, 525, 26405, 1024, 742, 13, 1678, 525, 29950, 538, 3149, 742, 13, 1678, 525, 10140, 284, 1024, 742, 13, 1678, 525, 8897, 931, 742, 13, 1678, 525, 7011, 7464, 9685, 29922, 29896, 29892, 297, 6689, 29922, 8824, 29897, 13, 2158, 877, 10399, 278, 2702, 20953, 310, 278, 23904, 297, 12118, 29914, 29885, 29941, 29901, 25710, 13, 1792, 29918, 2080, 29918, 14940, 29918, 23439, 353, 5785, 29898, 2080, 3101, 13, 29887, 353, 29871, 29929, 29889, 29947, 29896, 13, 2176, 29918, 1482, 1839, 7011, 2033, 353, 4489, 29918, 1482, 1839, 7011, 2033, 14571, 1792, 29918, 2080, 29918, 14940, 29918, 23439, 334, 330, 29897, 13, 1454, 2380, 29892, 1948, 297, 4489, 29918, 1482, 29889, 1524, 5727, 7295, 13, 1678, 4489, 29918, 1482, 29889, 309, 542, 29961, 2248, 29892, 518, 29946, 5262, 353, 1948, 1839, 7011, 2033, 13, 1678, 4489, 29918, 1482, 29889, 309, 542, 29961, 2248, 29892, 518, 29941, 5262, 353, 10518, 29889, 517, 29918, 12673, 29898, 798, 1839, 8897, 931, 11287, 13, 13, 2158, 29898, 2176, 29918, 1482, 29889, 517, 29918, 1807, 29898, 13, 1678, 3402, 2153, 3790, 13, 4706, 525, 8897, 931, 2396, 14013, 921, 29901, 285, 29915, 29912, 15926, 29889, 517, 29918, 12673, 29898, 29916, 29892, 5441, 543, 29928, 29908, 1125, 29995, 29990, 29913, 742, 13, 4706, 525, 7011, 2396, 14013, 921, 29901, 285, 29915, 29912, 29916, 29901, 29889, 29945, 29887, 10162, 13, 1678, 500, 876, 13, 2 ]
matchmaker/api.py
gnmerritt/casino
2
65575
from flask import request, jsonify, abort from flask.ext.login import login_required, current_user import bots from matchmaker import app, db import matches import match_logs import util import profile # # Public API # @app.route('/api/matches') @login_required def open_matches(): open = matches.OpenMatches(db) return util.paged_json(open.active(app.config)) @app.route('/api/matches/finished') @login_required def finished_matches(): offset = request.args.get('offset', type=int, default=0) finished = matches.FinishedMatches(db, offset) pagination, hits = finished.finished(current_user) return util.paged_json(hits, pagination) @app.route('/api/matches/<match_id>') @login_required def get_match_logs(match_id): streamer = match_logs.MatchLogBuilder(match_id) if not streamer.valid(): abort(404) return jsonify(streamer.data()) @app.route('/api/bot/<guid_or_key>') def get_bot(guid_or_key): bot = bots.BotInfo(db, guid_or_key).bot if not bot: abort(404) return jsonify({ "success": True, "bot": bot, }) @app.route('/api/bot/<name>', methods=['POST']) @login_required def new_bot(name): creator = profile.BotMaker(current_user, name) bot = creator.create(db) return jsonify({ "success": True, "bot": bot, }) # # Internal API # @app.route('/api/internal/new_match', methods=['POST']) def new_match(): maker = matches.NewMatch() maker.create(db) return jsonify(**{ "key": maker.guid(), "success": True, }) @app.route('/api/internal/join/<game_key>', methods=['POST']) def player_joined(game_key): bot_key = request.args.get('key') joiner = matches.MatchJoiner(game_key, bot_key) code, message = joiner.join(db) return jsonify(status=code, message=message), code @app.route('/api/internal/finished/<game_key>', methods=['POST']) def game_finished(game_key): match_results = request.get_json(force=True) if not match_results: abort(404) writer = matches.MatchResultsWriter(game_key) if not writer.valid(): abort(404) writer.record(db, match_results) new_match = matches.MatchCreatorJob(db) new_match.run() return jsonify({"success": True})
[ 1, 515, 29784, 1053, 2009, 29892, 4390, 1598, 29892, 27450, 13, 3166, 29784, 29889, 1062, 29889, 7507, 1053, 6464, 29918, 12403, 29892, 1857, 29918, 1792, 13, 13, 5215, 289, 1862, 13, 3166, 1993, 28107, 1053, 623, 29892, 4833, 13, 5215, 7087, 13, 5215, 1993, 29918, 20756, 13, 5215, 3667, 13, 5215, 8722, 13, 13, 13, 29937, 13, 29937, 29871, 5236, 3450, 13, 29937, 13, 13, 29992, 932, 29889, 13134, 11219, 2754, 29914, 20317, 1495, 13, 29992, 7507, 29918, 12403, 13, 1753, 1722, 29918, 20317, 7295, 13, 1678, 1722, 353, 7087, 29889, 6585, 9652, 267, 29898, 2585, 29897, 13, 1678, 736, 3667, 29889, 29886, 4063, 29918, 3126, 29898, 3150, 29889, 4925, 29898, 932, 29889, 2917, 876, 13, 13, 13, 29992, 932, 29889, 13134, 11219, 2754, 29914, 20317, 29914, 4951, 3276, 1495, 13, 29992, 7507, 29918, 12403, 13, 1753, 7743, 29918, 20317, 7295, 13, 1678, 9210, 353, 2009, 29889, 5085, 29889, 657, 877, 10289, 742, 1134, 29922, 524, 29892, 2322, 29922, 29900, 29897, 13, 1678, 7743, 353, 7087, 29889, 12881, 3276, 9652, 267, 29898, 2585, 29892, 9210, 29897, 13, 1678, 10203, 3381, 29892, 19572, 353, 7743, 29889, 4951, 3276, 29898, 3784, 29918, 1792, 29897, 13, 1678, 736, 3667, 29889, 29886, 4063, 29918, 3126, 29898, 29882, 1169, 29892, 10203, 3381, 29897, 13, 13, 13, 29992, 932, 29889, 13134, 11219, 2754, 29914, 20317, 29914, 29966, 4352, 29918, 333, 29958, 1495, 13, 29992, 7507, 29918, 12403, 13, 1753, 679, 29918, 4352, 29918, 20756, 29898, 4352, 29918, 333, 1125, 13, 1678, 4840, 261, 353, 1993, 29918, 20756, 29889, 9652, 3403, 5627, 29898, 4352, 29918, 333, 29897, 13, 1678, 565, 451, 4840, 261, 29889, 3084, 7295, 13, 4706, 27450, 29898, 29946, 29900, 29946, 29897, 13, 1678, 736, 4390, 1598, 29898, 5461, 261, 29889, 1272, 3101, 13, 13, 13, 29992, 932, 29889, 13134, 11219, 2754, 29914, 7451, 29914, 29966, 2543, 333, 29918, 272, 29918, 1989, 29958, 1495, 13, 1753, 679, 29918, 7451, 29898, 2543, 333, 29918, 272, 29918, 1989, 1125, 13, 1678, 9225, 353, 289, 1862, 29889, 29933, 327, 3401, 29898, 2585, 29892, 16605, 29918, 272, 29918, 1989, 467, 7451, 13, 1678, 565, 451, 9225, 29901, 13, 4706, 27450, 29898, 29946, 29900, 29946, 29897, 13, 1678, 736, 4390, 1598, 3319, 13, 4706, 376, 8698, 1115, 5852, 29892, 13, 4706, 376, 7451, 1115, 9225, 29892, 13, 1678, 5615, 13, 13, 13, 29992, 932, 29889, 13134, 11219, 2754, 29914, 7451, 29914, 29966, 978, 29958, 742, 3519, 29922, 1839, 5438, 11287, 13, 29992, 7507, 29918, 12403, 13, 1753, 716, 29918, 7451, 29898, 978, 1125, 13, 1678, 907, 1061, 353, 8722, 29889, 29933, 327, 29924, 5790, 29898, 3784, 29918, 1792, 29892, 1024, 29897, 13, 1678, 9225, 353, 907, 1061, 29889, 3258, 29898, 2585, 29897, 13, 1678, 736, 4390, 1598, 3319, 13, 4706, 376, 8698, 1115, 5852, 29892, 13, 4706, 376, 7451, 1115, 9225, 29892, 13, 1678, 5615, 13, 13, 29937, 13, 29937, 512, 1890, 3450, 13, 29937, 13, 13, 13, 29992, 932, 29889, 13134, 11219, 2754, 29914, 7564, 29914, 1482, 29918, 4352, 742, 3519, 29922, 1839, 5438, 11287, 13, 1753, 716, 29918, 4352, 7295, 13, 1678, 2136, 261, 353, 7087, 29889, 4373, 9652, 580, 13, 1678, 2136, 261, 29889, 3258, 29898, 2585, 29897, 13, 1678, 736, 4390, 1598, 29898, 1068, 29912, 13, 4706, 376, 1989, 1115, 2136, 261, 29889, 2543, 333, 3285, 13, 4706, 376, 8698, 1115, 5852, 29892, 13, 1678, 5615, 13, 13, 13, 29992, 932, 29889, 13134, 11219, 2754, 29914, 7564, 29914, 7122, 29914, 29966, 11802, 29918, 1989, 29958, 742, 3519, 29922, 1839, 5438, 11287, 13, 1753, 4847, 29918, 2212, 1312, 29898, 11802, 29918, 1989, 1125, 13, 1678, 9225, 29918, 1989, 353, 2009, 29889, 5085, 29889, 657, 877, 1989, 1495, 13, 1678, 2958, 4983, 353, 7087, 29889, 9652, 10844, 4983, 29898, 11802, 29918, 1989, 29892, 9225, 29918, 1989, 29897, 13, 1678, 775, 29892, 2643, 353, 2958, 4983, 29889, 7122, 29898, 2585, 29897, 13, 1678, 736, 4390, 1598, 29898, 4882, 29922, 401, 29892, 2643, 29922, 4906, 511, 775, 13, 13, 13, 29992, 932, 29889, 13134, 11219, 2754, 29914, 7564, 29914, 4951, 3276, 29914, 29966, 11802, 29918, 1989, 29958, 742, 3519, 29922, 1839, 5438, 11287, 13, 1753, 3748, 29918, 4951, 3276, 29898, 11802, 29918, 1989, 1125, 13, 1678, 1993, 29918, 9902, 353, 2009, 29889, 657, 29918, 3126, 29898, 10118, 29922, 5574, 29897, 13, 1678, 565, 451, 1993, 29918, 9902, 29901, 13, 4706, 27450, 29898, 29946, 29900, 29946, 29897, 13, 1678, 9227, 353, 7087, 29889, 9652, 12191, 10507, 29898, 11802, 29918, 1989, 29897, 13, 1678, 565, 451, 9227, 29889, 3084, 7295, 13, 4706, 27450, 29898, 29946, 29900, 29946, 29897, 13, 1678, 9227, 29889, 11651, 29898, 2585, 29892, 1993, 29918, 9902, 29897, 13, 1678, 716, 29918, 4352, 353, 7087, 29889, 9652, 9832, 1061, 11947, 29898, 2585, 29897, 13, 1678, 716, 29918, 4352, 29889, 3389, 580, 13, 1678, 736, 4390, 1598, 3319, 29908, 8698, 1115, 5852, 1800, 13, 2 ]
graphstar/utils.py
pengboomouch/graphstar
0
2303
""" graphstar.utils ~~~~~~~~~~~~~~~ <NAME> A simple bedirectional graph with A* and breadth-first pathfinding. Utils are either used by the search algorithm, or when needed :) Pretty self explainatory (I hope) For more information see the examples and tests folder """ def smooth_path(p): # If the path is only two nodes long, then # we can’t smooth it, so return if len(p) == 2: return p # Compile an output path output = [p[0]] # Keep track of where we are in the input path # We start at 2, because we assume two adjacent # nodes will pass the ray cast i = 2 # Loop until we find the last item in the input while i < len(p)-1: # Do the ray cast if not ray_clear(output[len(output)-1], p[i]): # The ray text failed, add the last node that # passed to the output list output += p[i-1] # Consider the next node i += 1 # We’ve reached the end of the input path, add the # end node to the output and return it output += p[len(p)-1] return output def clean_route_list(route_stack: list, goal_node_id: int): """ Creates an ordered route list from start to finish with all node ids needed to traverse to the goal. :param route_stack: All routes found until goal :param goal_node: int ID of the goal node :return: list A ordered list from start to goal """ r = [] next_node = goal_node_id reversed_stack = reversed(route_stack) for c in reversed_stack: if c.to_node.id == next_node: r.append(c.to_node.id) r.append(c.from_node.id) next_node = c.from_node.id return list(set(r))
[ 1, 9995, 13, 12, 4262, 8508, 29889, 13239, 13, 12, 26594, 14087, 7377, 30022, 13, 12, 29966, 5813, 29958, 13, 13, 12, 29909, 2560, 6592, 8684, 284, 3983, 411, 319, 29930, 322, 18423, 386, 29899, 4102, 2224, 2886, 292, 29889, 13, 13, 12, 12177, 526, 2845, 1304, 491, 278, 2740, 5687, 29892, 470, 746, 4312, 4248, 13, 12, 6572, 4349, 1583, 5649, 7606, 313, 29902, 4966, 29897, 13, 13, 12, 2831, 901, 2472, 1074, 278, 6455, 322, 6987, 4138, 13, 15945, 29908, 13, 13, 13, 1753, 10597, 29918, 2084, 29898, 29886, 1125, 13, 12, 29937, 960, 278, 2224, 338, 871, 1023, 7573, 1472, 29892, 769, 13, 12, 29937, 591, 508, 30010, 29873, 10597, 372, 29892, 577, 736, 13, 12, 361, 7431, 29898, 29886, 29897, 1275, 29871, 29906, 29901, 13, 12, 12, 2457, 282, 13, 13, 12, 29937, 3831, 488, 385, 1962, 2224, 13, 12, 4905, 353, 518, 29886, 29961, 29900, 5262, 13, 13, 12, 29937, 19152, 5702, 310, 988, 591, 526, 297, 278, 1881, 2224, 13, 12, 29937, 1334, 1369, 472, 29871, 29906, 29892, 1363, 591, 5251, 1023, 20114, 13, 12, 29937, 7573, 674, 1209, 278, 15570, 4320, 13, 12, 29875, 353, 29871, 29906, 13, 12, 29937, 21493, 2745, 591, 1284, 278, 1833, 2944, 297, 278, 1881, 13, 12, 8000, 474, 529, 7431, 29898, 29886, 6817, 29896, 29901, 13, 12, 12, 29937, 1938, 278, 15570, 4320, 13, 12, 12, 361, 451, 15570, 29918, 8551, 29898, 4905, 29961, 2435, 29898, 4905, 6817, 29896, 1402, 282, 29961, 29875, 29962, 1125, 13, 12, 12, 12, 29937, 450, 15570, 1426, 5229, 29892, 788, 278, 1833, 2943, 393, 13, 12, 12, 12, 29937, 4502, 304, 278, 1962, 1051, 13, 12, 12, 12, 4905, 4619, 282, 29961, 29875, 29899, 29896, 29962, 13, 12, 12, 29937, 10056, 278, 2446, 2943, 13, 12, 12, 29875, 4619, 29871, 29896, 13, 13, 12, 29937, 1334, 30010, 345, 7450, 278, 1095, 310, 278, 1881, 2224, 29892, 788, 278, 13, 12, 29937, 1095, 2943, 304, 278, 1962, 322, 736, 372, 13, 12, 4905, 4619, 282, 29961, 2435, 29898, 29886, 6817, 29896, 29962, 13, 12, 2457, 1962, 13, 13, 13, 1753, 5941, 29918, 13134, 29918, 1761, 29898, 13134, 29918, 1429, 29901, 1051, 29892, 7306, 29918, 3177, 29918, 333, 29901, 938, 1125, 13, 12, 15945, 29908, 13, 12, 9832, 1078, 385, 10372, 5782, 1051, 515, 1369, 304, 8341, 13, 12, 2541, 599, 2943, 18999, 4312, 304, 29370, 304, 278, 7306, 29889, 13, 13, 12, 29901, 3207, 5782, 29918, 1429, 29901, 268, 2178, 12049, 1476, 2745, 7306, 13, 12, 29901, 3207, 7306, 29918, 3177, 29901, 938, 259, 3553, 310, 278, 7306, 2943, 13, 12, 29901, 2457, 29901, 1051, 965, 319, 10372, 1051, 515, 1369, 304, 7306, 13, 12, 15945, 29908, 13, 12, 29878, 353, 5159, 13, 12, 4622, 29918, 3177, 353, 7306, 29918, 3177, 29918, 333, 13, 12, 276, 874, 287, 29918, 1429, 353, 18764, 287, 29898, 13134, 29918, 1429, 29897, 13, 12, 1454, 274, 297, 18764, 287, 29918, 1429, 29901, 13, 12, 12, 361, 274, 29889, 517, 29918, 3177, 29889, 333, 1275, 2446, 29918, 3177, 29901, 13, 12, 12, 12, 29878, 29889, 4397, 29898, 29883, 29889, 517, 29918, 3177, 29889, 333, 29897, 13, 12, 12, 12, 29878, 29889, 4397, 29898, 29883, 29889, 3166, 29918, 3177, 29889, 333, 29897, 13, 12, 12, 12, 4622, 29918, 3177, 353, 274, 29889, 3166, 29918, 3177, 29889, 333, 13, 13, 12, 2457, 1051, 29898, 842, 29898, 29878, 876, 13, 2 ]
util.py
andrewdyates/geo_api
1
187412
#!/usr/bin/python from geo import * def get_gpl(gpl_brief=None, gpl_data=None, is_tab=True): """Return geo.Local_GPL object from GPL file names. Args: gpl_brief: str of file path to GPL file meta data brief (as from geo_downloader) gpl_data: str of file path to GPL row descriptions IN DATA ROW ORDER (as from geo_downloader) may either be .tab for SOFT text file format is_tab: bool if gpl_data is in .tab format Returns: geo_api.GPL of loaded row descriptions """ gpl = LocalGPL(fname_brief=gpl_brief, fname_data=gpl_data, data_is_tab=is_tab) gpl.load() return gpl def assert_row_alignment(n, varlist, gpl): """Assert that GPL row descriptions and row id list aligns to data rows.""" assert n == len(gpl.row_desc) == len(gpl.probe_list) == len(gpl.probe_idx_map), \ " != ".join((n, len(gpl.row_desc), len(gpl.probe_list), len(gpl.probe_idx_map))) for i in xrange(n): s = gpl.probe_list[i] assert s == varlist[i] assert gpl.probe_idx_map[s] == i assert s in gpl.row_desc
[ 1, 18787, 4855, 29914, 2109, 29914, 4691, 13, 3166, 1737, 29877, 1053, 334, 13, 13, 1753, 679, 29918, 29887, 572, 29898, 29887, 572, 29918, 1182, 2575, 29922, 8516, 29892, 330, 572, 29918, 1272, 29922, 8516, 29892, 338, 29918, 3891, 29922, 5574, 1125, 13, 29871, 9995, 11609, 1737, 29877, 29889, 7717, 29918, 29954, 7390, 1203, 515, 402, 7390, 934, 2983, 29889, 13, 13, 29871, 826, 3174, 29901, 13, 1678, 330, 572, 29918, 1182, 2575, 29901, 851, 310, 934, 2224, 304, 402, 7390, 934, 12700, 848, 11473, 313, 294, 515, 1737, 29877, 29918, 10382, 261, 29897, 13, 1678, 330, 572, 29918, 1272, 29901, 851, 310, 934, 2224, 304, 402, 7390, 1948, 2342, 1980, 2672, 360, 8254, 390, 9806, 15606, 313, 294, 515, 1737, 29877, 29918, 10382, 261, 29897, 13, 418, 1122, 2845, 367, 869, 3891, 363, 7791, 7818, 1426, 934, 3402, 13, 1678, 338, 29918, 3891, 29901, 6120, 565, 330, 572, 29918, 1272, 338, 297, 869, 3891, 3402, 13, 29871, 16969, 29901, 13, 1678, 1737, 29877, 29918, 2754, 29889, 29954, 7390, 310, 7500, 1948, 2342, 1980, 13, 29871, 9995, 13, 29871, 330, 572, 353, 9959, 29954, 7390, 29898, 29888, 978, 29918, 1182, 2575, 29922, 29887, 572, 29918, 1182, 2575, 29892, 285, 978, 29918, 1272, 29922, 29887, 572, 29918, 1272, 29892, 848, 29918, 275, 29918, 3891, 29922, 275, 29918, 3891, 29897, 13, 29871, 330, 572, 29889, 1359, 580, 13, 29871, 736, 330, 572, 13, 13, 1753, 4974, 29918, 798, 29918, 2520, 358, 29898, 29876, 29892, 722, 1761, 29892, 330, 572, 1125, 13, 29871, 9995, 14697, 393, 402, 7390, 1948, 2342, 1980, 322, 1948, 1178, 1051, 7595, 29879, 304, 848, 4206, 1213, 15945, 13, 29871, 4974, 302, 1275, 7431, 29898, 29887, 572, 29889, 798, 29918, 14273, 29897, 1275, 7431, 29898, 29887, 572, 29889, 771, 915, 29918, 1761, 29897, 1275, 7431, 29898, 29887, 572, 29889, 771, 915, 29918, 13140, 29918, 1958, 511, 320, 13, 418, 376, 2804, 11393, 7122, 3552, 29876, 29892, 7431, 29898, 29887, 572, 29889, 798, 29918, 14273, 511, 7431, 29898, 29887, 572, 29889, 771, 915, 29918, 1761, 511, 7431, 29898, 29887, 572, 29889, 771, 915, 29918, 13140, 29918, 1958, 4961, 13, 29871, 363, 474, 297, 921, 3881, 29898, 29876, 1125, 13, 1678, 269, 353, 330, 572, 29889, 771, 915, 29918, 1761, 29961, 29875, 29962, 13, 1678, 4974, 269, 1275, 722, 1761, 29961, 29875, 29962, 13, 1678, 4974, 330, 572, 29889, 771, 915, 29918, 13140, 29918, 1958, 29961, 29879, 29962, 1275, 474, 13, 1678, 4974, 269, 297, 330, 572, 29889, 798, 29918, 14273, 13, 2 ]
demo/demo.py
lrscy/Unsupervised-Dual-Learning-Neural-Machine-Translation-Model
3
68011
<gh_stars>1-10 # coding: utf-8 """ Abstract The demo is a prototype of the project model. Codes and structure here could change in the future. The main point of codes below is to run on local computer and test whether it works on small scale of data. Now: Prove that original model is inaccessible. Start to implemente original RNN-LSTM and treat it as baseline. TODO: 1. Try new way to approach the unsupervised method. 2. Try to understand how to control gradient in Tensorflow. """ import os import sys import random import math import multiprocessing import h5py import tqdm import json import numpy as np import tensorflow as tf import keras as K import keras.backend.tensorflow_backend as KTF from keras.models import Model from keras.callbacks import ModelCheckpoint from keras.layers import Input, Embedding, LSTM, Dense, Lambda, concatenate, Multiply K.backend.clear_session() KTF.set_session( tf.Session( config = tf.ConfigProto( device_count = {'gpu':0} ) ) ) """ Get train data from path Read paralelled train data from files for each language and save to a dictionary. Args: dataPath: file path of train data. Default value is "../../Data/train/". langList: language list. Indicating which language data will be included in train data. Default value is ["Chinese", "English"]. encoding: encoding of each file in train directory. ratio: propotion of train data, others will be treat as dev data. Default value is 0.98. Returns: trainData: a dictionary of train data sentences of each language. Its structure is: {language A: [[word1, word2, ...], [...], ...], language B: ...}. devData: a dictionary of dev data sentences of each language. Its structure is: {language A: [[word1, word2, ...], [...], ...], language B: ...}. """ def getTrainData( dataPath = "../../Data/train/", lanList = ["chinese", "english"], encoding = "UTF-8", ratio = 0.98 ): trainData = {} devData = {} data = {} for lan in lanList: if lan not in data: data[lan] = [] print( "Reading " + lan + " files..." ) files = os.listdir( dataPath + lan + "/" ) for file in files: with open( dataPath + lan + "/" + file, encoding = encoding ) as f: line = f.readline() while line: wordList = line.split() data[lan].append( ["<S>"] + wordList + ["</S>"] ) line = f.readline() noOfSentences = len( data[lanList[0]] ) arr = [i for i in range( noOfSentences )] random.shuffle( arr ) for lan in lanList: if lan not in trainData: trainData[lan] = [] if lan not in devData: devData[lan] = [] data[lan] = np.array( data[lan] )[arr].tolist() noOfTrainData = int( noOfSentences * ratio ) devData[lan] = data[lan][noOfTrainData:] trainData[lan] = data[lan][:noOfTrainData] print( trainData[lan][:5] ) return trainData, devData """ Generate dictionary and preprocess setences for each language Generate dictionary for each language and convert word to corresponding index. Here we set two dictionaries to speed up the whole program. Moreover, the function will replace word in sentences to index automatically. Args: data: a dictionary contains sentences of each language. Its structure is: {language A: [[word1, word2, ...], [...], ...], language B: ...}. threshold: a word will be replace with <UNK> if frequency of a word is less than threshold. If the value is less than 1, it means no need to replace any word to <UNK>. Default value is 0. Returns: wordNumDict: a dictionary which can convert words to index in each language. Its structure is: {language A: {word A: index A, word B: ..., ...}, language B: ..., ...}. numWordDict: a dictionary which can convert index to word in each language. Its structure is: {language A: {index A: word A, index B: ..., ...}, language B: ..., ...}. """ def generateDict( data, threshold = 0 ): wordNumDict = {} numWordDict = {} for lan, sentences in data.items(): if lan not in wordNumDict: # Add special word to dictionary wordNumDict[lan] = {"<PAD>": 0, "<S>": 1, "</S>": 2, "<UNK>": 3} if lan not in numWordDict: # Add special word to dictionary numWordDict[lan] = {0: "<PAD>", 1: "<S>", 2: "</S>", 3: "<UNK>"} # Count word frequency wordCount = {} for sentence in sentences: for word in sentence: if word not in wordCount: wordCount[word] = 0 wordCount[word] += 1 # Find and replace with <UNK> for sentence in sentences: for i in range( len( sentence ) ): word = sentence[i] if wordCount[word] < threshold: word = "<UNK>" if word not in wordNumDict[lan]: number = len( wordNumDict[lan] ) wordNumDict[lan][word] = number numWordDict[lan][number] = word sentence[i] = wordNumDict[lan][word] return wordNumDict, numWordDict """Save dictionary to file Args: dt: the dictionary to save. fileName: the name of file to save. path: the path of file to save. Returns: None. """ def saveDict( dt, fileName, path ): print( "Saving to " + path + fileName + "..." ) fileName = path + fileName with open( fileName, "w" ) as f: jsn = json.dumps( dt ) f.write( jsn ) """Sort dictionary by length of original language Args: data: a dictionary contains sentences of each language. Its structure is: {language A: [[word1, word2, ...], [...], ...], language B: ...}. lan: a list of language. The first one is the original language, the second one is the target language. For example: [language A, language B]. Returns: None. """ def sortByOriLan( data, lan = ["chinese", "english"] ): print( "Sorting..." ) tmp = list( zip( data[lan[0]], data[lan[1]] ) ) tmp.sort( key = lambda x: len( x[0] ) ) data[lan[0]], data[lan[1]] = zip( *tmp ) """Number to One-hot Only convert sentences which length are small than 30. Args: data: a dictionary contains sentences of each language. Its structure is: {language A: [[word1, word2, ...], [...], ...], language B: ...}. lan: a list of language. The first one is the original language, the second one is the target language. For example: [language A, language B]. dictLength: dictionary length of language B. Returns: status: boolean value. True represents successfully extract batch data. False represents extract nothing from original data. ndata: data like dictionary. lan1d: 3-D data contains one-hot format label data. """ def toCategory( data, lan, dictLength ): maxlLan0 = 0 maxlLan1 = 0 n = 0 for i in range( len( data[lan[0]] ) ): if len( data[lan[0]][i] ) <= 32: n += 1 maxlLan0 = max( maxlLan0, len( data[lan[0]][i] ) ) maxlLan1 = max( maxlLan1, len( data[lan[1]][i] ) ) if n == 0: return False, [], [] lan0 = np.zeros( ( n, maxlLan0 ) ) lan1 = np.zeros( ( n, maxlLan1 ) ) # lan1d = np.zeros( ( n, maxlLan1, dictLength ) ) n = 0 for i in range( len( data[lan[0]] ) ): if len( data[lan[0]][i] ) <= 32: for j in range( len( data[lan[0]][i] ) ): lan0[n, j] = data[lan[0]][i][j] for j in range( len( data[lan[1]][i] ) ): lan1[n, j] = data[lan[1]][i][j] # if j: # w = data[lan[1]][i][j] # lan1d[n, j - 1, w] = 1 n += 1 data[lan[0]] = lan0 data[lan[1]] = lan1 return True, data#, lan1d def toCategoryWrap( args ): return toCategory( *args ) """ Simple Seqence to Sequence Implementation A simple implementation of Sequence to Sequence model. It works as baseline Args: input_dim: dimension of input word vector. output_dim: dimension of output word vector. hidden_dim: dimension of hidden states vector. output_vocab_size: size of output language vocabulary size. input_vocab_size: size of input language vocabulary size. word_vec_dim: dimension of word-vector. name: name of the model. Returns: model: the whole model of simple Seq2Seq model. """ def simpleSeq2Seq( output_vocab_size, input_vocab_size, hidden_dim = 128, word_vec_dim = 300, name = "demo" ): embedding_encoder = Embedding( output_dim = word_vec_dim, input_dim = input_vocab_size, name = name + "_encoder_embedding", mask_zero = True ) # embedding_decoder = Embedding( output_dim = word_vec_dim, input_dim = output_vocab_size, name = name + "_decoder_embedding", mask_zero = True ) # # Encoder encoder_input = Input( shape = ( None, ), name = name + "_encoder_input" ) # change when using pre-trained embedding trainable= False encoder = LSTM( hidden_dim, return_state = True ) encoder_input_emb = embedding_encoder( encoder_input ) _, state_h, state_c = encoder( encoder_input_emb ) state_encoder = [state_h, state_c] # Decoder decoder = LSTM( hidden_dim, return_sequences = True ) decoder_input = Input( shape = ( None, ), name = name + "_decoder_input" ) decoder_input_emb = embedding_decoder( decoder_input ) decoder_outputs = decoder( decoder_input_emb, initial_state = state_encoder ) decoder_dense = Dense( output_vocab_size, activation = "softmax", name = name + "_decoder_output" ) decoder_outputs = decoder_dense( decoder_outputs ) # Build model model = Model( inputs = [encoder_input, decoder_input], outputs = decoder_outputs, name = name ) model.compile( optimizer = 'adam', loss = "categorical_crossentropy" ) return model trainData, devData = getTrainData( "../../Data/train/" ) wordNumDict, numWordDict = generateDict( trainData, threshold = 5 ) saveDict( wordNumDict, "wordNumDict", "Dicts" ) saveDict( numWordDict, "numWordDict", "Dicts" ) sortByOriLan( trainData, ["chinese", "english"] ) ivs = len( wordNumDict["chinese"] ) ovs = len( wordNumDict["english"] ) print( ivs, ovs ) trainData["chinese"] = trainData["chinese"][::-1] devData["chinese"] = devData["chinese"][::-1] trainData["english"] = trainData["english"][::-1] devData["english"] = devData["english"][::-1] model = simpleSeq2Seq( output_vocab_size = ovs, input_vocab_size = ivs, name = "demo" ) model.summary() batch_size = 64 losses = [] n = 0 total = len( trainData["chinese"] ) length = len( wordNumDict["english"] ) print( "parallizly processing training data" ) cores = multiprocessing.cpu_count() pool = multiprocessing.Pool( processes = cores ) params = [] for i in range( 0, total + batch_size, batch_size ): # Divide data into batch tdata = {} tdata["chinese"] = trainData["chinese"][i:i + batch_size] tdata["english"] = trainData["english"][i:i + batch_size] # Combine all params params.append( [tdata, ["chinese", "english"], length] ) print( "MAP" ) rets = [] for ret in tqdm.tqdm( pool.imap_unordered( toCategoryWrap, params ) ): rets.append( ret ) #rets = pool.map( toCategoryWrap, params ) pool.close() pool.join() n = 0 print( "Training..." ) for epoch in range( 2 ): for ret in rets: # status, newTrainData, td = toCategory( trainData, ["chinese", "english"], length, i, min( i + batch_size, total ) ) if ret[0] == False: continue label = K.utils.to_categorical( ret[1]["english"], length ) loss = model.train_on_batch( [ret[1]["chinese"], ret[1]["english"]], label ) n += 1 print( n, loss ) if n and n % 3000 == 0: model.save_weights("Models/model_weights_" + str( n ) + ".h5" ) losses.append( loss ) model.save_weights("Models/model_weights_" + str( n ) + ".h5" ) with open( "losses", "w" ) as f: for loss in losses: f.write( str( loss ) + "\n" )
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 29937, 14137, 29901, 23616, 29899, 29947, 13, 13, 15945, 29908, 25513, 13, 13, 1576, 13455, 338, 263, 22267, 310, 278, 2060, 1904, 29889, 315, 2631, 322, 3829, 1244, 1033, 1735, 297, 278, 5434, 29889, 13, 1576, 1667, 1298, 310, 11561, 2400, 338, 304, 1065, 373, 1887, 6601, 322, 1243, 3692, 372, 1736, 373, 2319, 6287, 310, 848, 29889, 13, 13, 10454, 29901, 13, 1678, 1019, 345, 393, 2441, 1904, 338, 297, 5943, 1821, 29889, 7370, 304, 2334, 29872, 2441, 390, 10262, 29899, 29931, 1254, 29924, 322, 7539, 372, 408, 2362, 5570, 29889, 13, 13, 4986, 3970, 29901, 13, 268, 29896, 29889, 3967, 716, 982, 304, 2948, 278, 443, 9136, 11292, 1158, 29889, 13, 268, 29906, 29889, 3967, 304, 2274, 920, 304, 2761, 16030, 297, 323, 6073, 1731, 29889, 13, 15945, 29908, 13, 13, 5215, 2897, 13, 5215, 10876, 13, 5215, 4036, 13, 5215, 5844, 13, 5215, 6674, 307, 985, 292, 13, 5215, 298, 29945, 2272, 13, 5215, 260, 29939, 18933, 13, 5215, 4390, 13, 5215, 12655, 408, 7442, 13, 5215, 26110, 408, 15886, 13, 5215, 13023, 294, 408, 476, 13, 5215, 13023, 294, 29889, 27852, 29889, 29056, 29918, 27852, 408, 476, 8969, 13, 3166, 13023, 294, 29889, 9794, 1053, 8125, 13, 3166, 13023, 294, 29889, 14035, 29879, 1053, 8125, 5596, 3149, 13, 3166, 13023, 294, 29889, 29277, 1053, 10567, 29892, 2812, 2580, 8497, 29892, 365, 1254, 29924, 29892, 360, 1947, 29892, 365, 2269, 29892, 16125, 403, 29892, 9683, 666, 368, 13, 13, 29968, 29889, 27852, 29889, 8551, 29918, 7924, 580, 13, 29968, 8969, 29889, 842, 29918, 7924, 29898, 15886, 29889, 7317, 29898, 2295, 353, 15886, 29889, 3991, 1184, 517, 29898, 4742, 29918, 2798, 353, 11117, 29887, 3746, 2396, 29900, 29913, 1723, 1723, 1723, 13, 13, 15945, 29908, 3617, 7945, 848, 515, 2224, 13, 13, 6359, 610, 744, 29880, 839, 7945, 848, 515, 2066, 363, 1269, 4086, 322, 4078, 304, 263, 8600, 29889, 13, 13, 7883, 29901, 13, 1678, 848, 2605, 29901, 934, 2224, 310, 7945, 848, 29889, 13109, 995, 338, 376, 21546, 1469, 29914, 14968, 29914, 1642, 13, 1678, 6361, 1293, 29901, 4086, 1051, 29889, 1894, 293, 1218, 607, 4086, 848, 674, 367, 5134, 297, 7945, 848, 29889, 13, 795, 13109, 995, 338, 6796, 1451, 8233, 613, 376, 24636, 16862, 13, 1678, 8025, 29901, 8025, 310, 1269, 934, 297, 7945, 3884, 29889, 13, 1678, 11959, 29901, 3107, 8194, 310, 7945, 848, 29892, 4045, 674, 367, 7539, 408, 2906, 848, 29889, 13109, 995, 338, 29871, 29900, 29889, 29929, 29947, 29889, 13, 13, 11609, 29879, 29901, 13, 1678, 7945, 1469, 29901, 263, 8600, 310, 7945, 848, 25260, 310, 1269, 4086, 29889, 8011, 3829, 338, 29901, 13, 268, 13, 1669, 426, 11675, 319, 29901, 5519, 1742, 29896, 29892, 1734, 29906, 29892, 2023, 1402, 518, 856, 1402, 2023, 1402, 4086, 350, 29901, 2023, 1836, 13, 268, 13, 1678, 2906, 1469, 29901, 263, 8600, 310, 2906, 848, 25260, 310, 1269, 4086, 29889, 8011, 3829, 338, 29901, 13, 268, 13, 1669, 426, 11675, 319, 29901, 5519, 1742, 29896, 29892, 1734, 29906, 29892, 2023, 1402, 518, 856, 1402, 2023, 1402, 4086, 350, 29901, 2023, 1836, 13, 15945, 29908, 13, 1753, 679, 5323, 262, 1469, 29898, 848, 2605, 353, 376, 21546, 1469, 29914, 14968, 29914, 613, 10906, 1293, 353, 6796, 305, 8233, 613, 376, 996, 1674, 12436, 13, 462, 29871, 8025, 353, 376, 10496, 29899, 29947, 613, 11959, 353, 29871, 29900, 29889, 29929, 29947, 29871, 1125, 13, 1678, 7945, 1469, 353, 6571, 13, 1678, 2906, 1469, 259, 353, 6571, 13, 1678, 848, 353, 6571, 13, 1678, 363, 10906, 297, 10906, 1293, 29901, 13, 4706, 565, 10906, 451, 297, 848, 29901, 13, 9651, 848, 29961, 6468, 29962, 353, 5159, 13, 4706, 1596, 29898, 376, 6359, 292, 376, 718, 10906, 718, 376, 2066, 17794, 1723, 13, 4706, 2066, 353, 2897, 29889, 1761, 3972, 29898, 848, 2605, 718, 10906, 718, 5591, 29908, 1723, 13, 4706, 363, 934, 297, 2066, 29901, 13, 9651, 411, 1722, 29898, 848, 2605, 718, 10906, 718, 5591, 29908, 718, 934, 29892, 8025, 353, 8025, 1723, 408, 285, 29901, 13, 18884, 1196, 353, 285, 29889, 949, 1220, 580, 13, 18884, 1550, 1196, 29901, 13, 462, 1678, 1734, 1293, 353, 1196, 29889, 5451, 580, 13, 462, 1678, 848, 29961, 6468, 1822, 4397, 29898, 6796, 29966, 29903, 29958, 3108, 718, 1734, 1293, 718, 6796, 829, 29903, 29958, 3108, 1723, 13, 462, 1678, 1196, 353, 285, 29889, 949, 1220, 580, 13, 1678, 694, 2776, 29903, 296, 2063, 353, 7431, 29898, 848, 29961, 6468, 1293, 29961, 29900, 5262, 1723, 13, 1678, 3948, 353, 518, 29875, 363, 474, 297, 3464, 29898, 694, 2776, 29903, 296, 2063, 1723, 29962, 13, 1678, 4036, 29889, 845, 21897, 29898, 3948, 1723, 13, 1678, 363, 10906, 297, 10906, 1293, 29901, 13, 4706, 565, 10906, 451, 297, 7945, 1469, 29901, 13, 9651, 7945, 1469, 29961, 6468, 29962, 353, 5159, 13, 4706, 565, 10906, 451, 297, 2906, 1469, 29901, 13, 9651, 2906, 1469, 29961, 6468, 29962, 353, 5159, 13, 4706, 848, 29961, 6468, 29962, 353, 7442, 29889, 2378, 29898, 848, 29961, 6468, 29962, 1723, 29961, 2749, 1822, 25027, 391, 580, 13, 4706, 694, 2776, 5323, 262, 1469, 353, 938, 29898, 694, 2776, 29903, 296, 2063, 334, 11959, 1723, 13, 4706, 2906, 1469, 29961, 6468, 29962, 259, 353, 848, 29961, 6468, 3816, 1217, 2776, 5323, 262, 1469, 17531, 13, 4706, 7945, 1469, 29961, 6468, 29962, 353, 848, 29961, 6468, 3816, 29901, 1217, 2776, 5323, 262, 1469, 29962, 13, 4706, 1596, 29898, 7945, 1469, 29961, 6468, 3816, 29901, 29945, 29962, 1723, 13, 1678, 736, 7945, 1469, 29892, 2906, 1469, 13, 13, 15945, 29908, 3251, 403, 8600, 322, 758, 5014, 731, 2063, 363, 1269, 4086, 13, 13, 5631, 403, 8600, 363, 1269, 4086, 322, 3588, 1734, 304, 6590, 2380, 29889, 13, 10605, 591, 731, 1023, 21503, 4314, 304, 6210, 701, 278, 3353, 1824, 29889, 13, 13, 20761, 957, 29892, 278, 740, 674, 5191, 1734, 297, 25260, 304, 2380, 6336, 29889, 13, 13, 7883, 29901, 13, 1678, 848, 29901, 263, 8600, 3743, 25260, 310, 1269, 4086, 29889, 29871, 8011, 3829, 338, 29901, 13, 268, 13, 3986, 426, 11675, 319, 29901, 5519, 1742, 29896, 29892, 1734, 29906, 29892, 2023, 1402, 518, 856, 1402, 2023, 1402, 4086, 350, 29901, 2023, 1836, 13, 268, 13, 1678, 16897, 29901, 263, 1734, 674, 367, 5191, 411, 529, 3904, 29968, 29958, 565, 10868, 310, 263, 1734, 338, 13, 1669, 3109, 1135, 16897, 29889, 960, 278, 995, 338, 3109, 1135, 29871, 29896, 29892, 372, 2794, 13, 1669, 694, 817, 304, 5191, 738, 1734, 304, 529, 3904, 29968, 15513, 13109, 995, 338, 29871, 29900, 29889, 13, 13, 11609, 29879, 29901, 13, 1678, 1734, 8009, 21533, 29901, 263, 8600, 607, 508, 3588, 3838, 304, 2380, 297, 1269, 4086, 29889, 13, 462, 8011, 3829, 338, 29901, 13, 462, 29871, 13, 462, 426, 11675, 319, 29901, 426, 1742, 319, 29901, 2380, 319, 29892, 1734, 350, 29901, 2023, 29892, 2023, 1118, 4086, 350, 29901, 2023, 29892, 2023, 1836, 13, 268, 13, 1678, 954, 14463, 21533, 29901, 263, 8600, 607, 508, 3588, 2380, 304, 1734, 297, 1269, 4086, 29889, 13, 462, 8011, 3829, 338, 29901, 13, 462, 29871, 13, 462, 426, 11675, 319, 29901, 426, 2248, 319, 29901, 1734, 319, 29892, 2380, 350, 29901, 2023, 29892, 2023, 1118, 4086, 350, 29901, 2023, 29892, 2023, 1836, 13, 15945, 29908, 13, 1753, 5706, 21533, 29898, 848, 29892, 16897, 353, 29871, 29900, 29871, 1125, 13, 1678, 1734, 8009, 21533, 353, 6571, 13, 1678, 954, 14463, 21533, 353, 6571, 13, 1678, 363, 10906, 29892, 25260, 297, 848, 29889, 7076, 7295, 13, 4706, 565, 10906, 451, 297, 1734, 8009, 21533, 29901, 13, 9651, 396, 3462, 4266, 1734, 304, 8600, 13, 9651, 1734, 8009, 21533, 29961, 6468, 29962, 353, 8853, 29966, 29925, 3035, 29958, 1115, 29871, 29900, 29892, 9872, 29903, 29958, 1115, 29871, 29896, 29892, 25225, 29903, 29958, 1115, 29871, 29906, 29892, 9872, 3904, 29968, 29958, 1115, 29871, 29941, 29913, 13, 4706, 565, 10906, 451, 297, 954, 14463, 21533, 29901, 13, 9651, 396, 3462, 4266, 1734, 304, 8600, 13, 9651, 954, 14463, 21533, 29961, 6468, 29962, 353, 426, 29900, 29901, 9872, 29925, 3035, 28341, 29871, 29896, 29901, 9872, 29903, 28341, 29871, 29906, 29901, 25225, 29903, 28341, 29871, 29941, 29901, 9872, 3904, 29968, 29958, 9092, 13, 308, 13, 4706, 396, 3917, 1734, 10868, 13, 4706, 1734, 3981, 353, 6571, 13, 4706, 363, 10541, 297, 25260, 29901, 13, 9651, 363, 1734, 297, 10541, 29901, 13, 18884, 565, 1734, 451, 297, 1734, 3981, 29901, 13, 462, 1678, 1734, 3981, 29961, 1742, 29962, 353, 29871, 29900, 13, 18884, 1734, 3981, 29961, 1742, 29962, 4619, 29871, 29896, 13, 308, 13, 4706, 396, 10987, 322, 5191, 411, 529, 3904, 29968, 29958, 13, 4706, 363, 10541, 297, 25260, 29901, 13, 9651, 363, 474, 297, 3464, 29898, 7431, 29898, 10541, 1723, 29871, 1125, 13, 18884, 1734, 353, 10541, 29961, 29875, 29962, 13, 18884, 565, 1734, 3981, 29961, 1742, 29962, 529, 16897, 29901, 13, 462, 1678, 1734, 353, 9872, 3904, 29968, 11903, 13, 18884, 565, 1734, 451, 297, 1734, 8009, 21533, 29961, 6468, 5387, 13, 462, 1678, 1353, 353, 7431, 29898, 1734, 8009, 21533, 29961, 6468, 29962, 1723, 13, 462, 1678, 1734, 8009, 21533, 29961, 6468, 3816, 1742, 29962, 353, 1353, 13, 462, 1678, 954, 14463, 21533, 29961, 6468, 3816, 4537, 29962, 353, 1734, 13, 18884, 10541, 29961, 29875, 29962, 353, 1734, 8009, 21533, 29961, 6468, 3816, 1742, 29962, 13, 1678, 736, 1734, 8009, 21533, 29892, 954, 14463, 21533, 13, 13, 15945, 29908, 11371, 8600, 304, 934, 13, 13, 7883, 29901, 13, 1678, 11636, 29901, 278, 8600, 304, 4078, 29889, 13, 1678, 29729, 29901, 278, 1024, 310, 934, 304, 4078, 29889, 13, 1678, 2224, 29901, 278, 2224, 310, 934, 304, 4078, 29889, 13, 13, 11609, 29879, 29901, 13, 1678, 6213, 29889, 13, 15945, 29908, 13, 1753, 4078, 21533, 29898, 11636, 29892, 29729, 29892, 2224, 29871, 1125, 13, 1678, 1596, 29898, 376, 29903, 5555, 304, 376, 718, 2224, 718, 29729, 718, 376, 17794, 1723, 13, 1678, 29729, 353, 2224, 718, 29729, 13, 1678, 411, 1722, 29898, 29729, 29892, 376, 29893, 29908, 1723, 408, 285, 29901, 13, 4706, 6965, 29876, 353, 4390, 29889, 29881, 17204, 29898, 11636, 1723, 13, 4706, 285, 29889, 3539, 29898, 6965, 29876, 1723, 13, 13, 15945, 29908, 13685, 8600, 491, 3309, 310, 2441, 4086, 13, 13, 7883, 29901, 13, 1678, 848, 29901, 263, 8600, 3743, 25260, 310, 1269, 4086, 29889, 29871, 8011, 3829, 338, 29901, 13, 268, 13, 3986, 426, 11675, 319, 29901, 5519, 1742, 29896, 29892, 1734, 29906, 29892, 2023, 1402, 518, 856, 1402, 2023, 1402, 4086, 350, 29901, 2023, 1836, 13, 268, 13, 1678, 10906, 29901, 263, 1051, 310, 4086, 29889, 450, 937, 697, 338, 278, 2441, 4086, 29892, 278, 1473, 13, 308, 697, 338, 278, 3646, 4086, 29889, 1152, 1342, 29901, 13, 13, 308, 518, 11675, 319, 29892, 4086, 350, 1822, 13, 13, 11609, 29879, 29901, 13, 1678, 6213, 29889, 13, 15945, 29908, 13, 1753, 2656, 2059, 15988, 29931, 273, 29898, 848, 29892, 10906, 353, 6796, 305, 8233, 613, 376, 996, 1674, 3108, 29871, 1125, 13, 1678, 1596, 29898, 376, 13685, 292, 17794, 1723, 13, 1678, 13128, 353, 1051, 29898, 14319, 29898, 848, 29961, 6468, 29961, 29900, 20526, 848, 29961, 6468, 29961, 29896, 5262, 1723, 1723, 13, 1678, 13128, 29889, 6605, 29898, 1820, 353, 14013, 921, 29901, 7431, 29898, 921, 29961, 29900, 29962, 1723, 1723, 13, 1678, 848, 29961, 6468, 29961, 29900, 20526, 848, 29961, 6468, 29961, 29896, 5262, 353, 14319, 29898, 334, 7050, 1723, 13, 13, 15945, 29908, 4557, 304, 3118, 29899, 8711, 13, 13, 11730, 3588, 25260, 607, 3309, 526, 2319, 1135, 29871, 29941, 29900, 29889, 13, 13, 7883, 29901, 13, 1678, 848, 29901, 263, 8600, 3743, 25260, 310, 1269, 4086, 29889, 29871, 8011, 3829, 338, 29901, 13, 268, 13, 3986, 426, 11675, 319, 29901, 5519, 1742, 29896, 29892, 1734, 29906, 29892, 2023, 1402, 518, 856, 1402, 2023, 1402, 4086, 350, 29901, 2023, 1836, 13, 268, 13, 1678, 10906, 29901, 263, 1051, 310, 4086, 29889, 450, 937, 697, 338, 278, 2441, 4086, 29892, 278, 1473, 13, 308, 697, 338, 278, 3646, 4086, 29889, 1152, 1342, 29901, 13, 13, 308, 518, 11675, 319, 29892, 4086, 350, 1822, 13, 13, 1678, 9657, 6513, 29901, 8600, 3309, 310, 4086, 350, 29889, 13, 13, 11609, 29879, 29901, 13, 1678, 4660, 29901, 7223, 995, 29889, 5852, 11524, 8472, 6597, 9853, 848, 29889, 7700, 13, 9651, 11524, 6597, 3078, 515, 2441, 848, 29889, 13, 268, 299, 532, 29901, 848, 763, 8600, 29889, 13, 1678, 10906, 29896, 29881, 29901, 29871, 29941, 29899, 29928, 848, 3743, 697, 29899, 8711, 3402, 3858, 848, 29889, 13, 15945, 29908, 13, 1753, 304, 10900, 29898, 848, 29892, 10906, 29892, 9657, 6513, 29871, 1125, 13, 1678, 4236, 29880, 29931, 273, 29900, 353, 29871, 29900, 13, 1678, 4236, 29880, 29931, 273, 29896, 353, 29871, 29900, 13, 1678, 302, 353, 29871, 29900, 13, 1678, 363, 474, 297, 3464, 29898, 7431, 29898, 848, 29961, 6468, 29961, 29900, 5262, 1723, 29871, 1125, 13, 4706, 565, 7431, 29898, 848, 29961, 6468, 29961, 29900, 29962, 3816, 29875, 29962, 1723, 5277, 29871, 29941, 29906, 29901, 13, 9651, 302, 4619, 29871, 29896, 13, 9651, 4236, 29880, 29931, 273, 29900, 353, 4236, 29898, 4236, 29880, 29931, 273, 29900, 29892, 7431, 29898, 848, 29961, 6468, 29961, 29900, 29962, 3816, 29875, 29962, 1723, 1723, 13, 9651, 4236, 29880, 29931, 273, 29896, 353, 4236, 29898, 4236, 29880, 29931, 273, 29896, 29892, 7431, 29898, 848, 29961, 6468, 29961, 29896, 29962, 3816, 29875, 29962, 1723, 1723, 13, 1678, 565, 302, 1275, 29871, 29900, 29901, 13, 4706, 736, 7700, 29892, 19997, 5159, 13, 1678, 10906, 29900, 353, 7442, 29889, 3298, 359, 29898, 313, 302, 29892, 4236, 29880, 29931, 273, 29900, 1723, 1723, 13, 1678, 10906, 29896, 353, 7442, 29889, 3298, 359, 29898, 313, 302, 29892, 4236, 29880, 29931, 273, 29896, 1723, 1723, 13, 29937, 1678, 10906, 29896, 29881, 353, 7442, 29889, 3298, 359, 29898, 313, 302, 29892, 4236, 29880, 29931, 273, 29896, 29892, 9657, 6513, 1723, 1723, 13, 1678, 302, 353, 29871, 29900, 13, 1678, 363, 474, 297, 3464, 29898, 7431, 29898, 848, 29961, 6468, 29961, 29900, 5262, 1723, 29871, 1125, 13, 4706, 565, 7431, 29898, 848, 29961, 6468, 29961, 29900, 29962, 3816, 29875, 29962, 1723, 5277, 29871, 29941, 29906, 29901, 13, 9651, 363, 432, 297, 3464, 29898, 7431, 29898, 848, 29961, 6468, 29961, 29900, 29962, 3816, 29875, 29962, 1723, 29871, 1125, 13, 18884, 10906, 29900, 29961, 29876, 29892, 432, 29962, 353, 848, 29961, 6468, 29961, 29900, 29962, 3816, 29875, 3816, 29926, 29962, 13, 9651, 363, 432, 297, 3464, 29898, 7431, 29898, 848, 29961, 6468, 29961, 29896, 29962, 3816, 29875, 29962, 1723, 29871, 1125, 13, 18884, 10906, 29896, 29961, 29876, 29892, 432, 29962, 353, 848, 29961, 6468, 29961, 29896, 29962, 3816, 29875, 3816, 29926, 29962, 13, 29937, 18884, 565, 432, 29901, 13, 29937, 462, 1678, 281, 353, 848, 29961, 6468, 29961, 29896, 29962, 3816, 29875, 3816, 29926, 29962, 13, 29937, 462, 1678, 10906, 29896, 29881, 29961, 29876, 29892, 432, 448, 29871, 29896, 29892, 281, 29962, 353, 29871, 29896, 13, 9651, 302, 4619, 29871, 29896, 13, 1678, 848, 29961, 6468, 29961, 29900, 5262, 353, 10906, 29900, 13, 1678, 848, 29961, 6468, 29961, 29896, 5262, 353, 10906, 29896, 13, 1678, 736, 5852, 29892, 848, 6552, 10906, 29896, 29881, 13, 13, 1753, 304, 10900, 29956, 2390, 29898, 6389, 29871, 1125, 13, 1678, 736, 304, 10900, 29898, 334, 5085, 1723, 13, 13, 15945, 29908, 12545, 25981, 663, 304, 922, 3910, 1954, 14607, 13, 13, 29909, 2560, 5314, 310, 922, 3910, 304, 922, 3910, 1904, 29889, 739, 1736, 408, 2362, 5570, 13, 13, 7883, 29901, 13, 1678, 1881, 29918, 6229, 29901, 29871, 9927, 310, 1881, 1734, 4608, 29889, 13, 1678, 1962, 29918, 6229, 29901, 9927, 310, 1962, 1734, 4608, 29889, 13, 1678, 7934, 29918, 6229, 29901, 9927, 310, 7934, 5922, 4608, 29889, 13, 1678, 1962, 29918, 29894, 542, 370, 29918, 2311, 29901, 2159, 310, 1962, 4086, 7931, 370, 352, 653, 2159, 29889, 13, 1678, 1881, 29918, 29894, 542, 370, 29918, 2311, 29901, 29871, 2159, 310, 1881, 29871, 4086, 7931, 370, 352, 653, 2159, 29889, 13, 1678, 1734, 29918, 2003, 29918, 6229, 29901, 9927, 310, 1734, 29899, 8111, 29889, 13, 1678, 1024, 29901, 1024, 310, 278, 1904, 29889, 13, 13, 11609, 29879, 29901, 13, 1678, 1904, 29901, 278, 3353, 1904, 310, 2560, 25981, 29906, 23718, 1904, 29889, 13, 13, 15945, 29908, 13, 1753, 2560, 23718, 29906, 23718, 29898, 1962, 29918, 29894, 542, 370, 29918, 2311, 29892, 1881, 29918, 29894, 542, 370, 29918, 2311, 29892, 7934, 29918, 6229, 353, 29871, 29896, 29906, 29947, 29892, 13, 462, 259, 1734, 29918, 2003, 29918, 6229, 353, 29871, 29941, 29900, 29900, 29892, 1024, 353, 376, 17482, 29908, 29871, 1125, 13, 1678, 23655, 29918, 3977, 6119, 29871, 353, 2812, 2580, 8497, 29898, 1962, 29918, 6229, 353, 1734, 29918, 2003, 29918, 6229, 29892, 1881, 29918, 6229, 353, 1881, 29918, 29894, 542, 370, 29918, 2311, 29892, 13, 462, 462, 1024, 353, 1024, 718, 11119, 3977, 6119, 29918, 17987, 8497, 613, 11105, 29918, 9171, 353, 5852, 1723, 396, 29871, 13, 1678, 23655, 29918, 7099, 6119, 353, 2812, 2580, 8497, 29898, 1962, 29918, 6229, 353, 1734, 29918, 2003, 29918, 6229, 29892, 1881, 29918, 6229, 353, 1962, 29918, 29894, 542, 370, 29918, 2311, 29892, 13, 462, 462, 1024, 353, 1024, 718, 11119, 7099, 6119, 29918, 17987, 8497, 613, 11105, 29918, 9171, 353, 5852, 1723, 396, 29871, 13, 1678, 396, 11346, 6119, 13, 1678, 2094, 6119, 29918, 2080, 268, 353, 10567, 29898, 8267, 353, 313, 6213, 29892, 10353, 1024, 353, 1024, 718, 11119, 3977, 6119, 29918, 2080, 29908, 1723, 13, 1678, 396, 1735, 746, 773, 758, 29899, 3018, 1312, 23655, 7945, 519, 29922, 7700, 13, 1678, 2094, 6119, 965, 353, 365, 1254, 29924, 29898, 7934, 29918, 6229, 29892, 736, 29918, 3859, 353, 5852, 1723, 13, 1678, 2094, 6119, 29918, 2080, 29918, 1590, 353, 23655, 29918, 3977, 6119, 29898, 2094, 6119, 29918, 2080, 1723, 13, 1678, 17117, 2106, 29918, 29882, 29892, 2106, 29918, 29883, 353, 2094, 6119, 29898, 2094, 6119, 29918, 2080, 29918, 1590, 1723, 13, 1678, 2106, 29918, 3977, 6119, 268, 353, 518, 3859, 29918, 29882, 29892, 2106, 29918, 29883, 29962, 13, 1678, 396, 3826, 6119, 13, 1678, 1602, 6119, 353, 365, 1254, 29924, 29898, 7934, 29918, 6229, 29892, 736, 29918, 6831, 2063, 353, 5852, 1723, 13, 13, 1678, 1602, 6119, 29918, 2080, 268, 353, 10567, 29898, 8267, 353, 313, 6213, 29892, 10353, 1024, 353, 1024, 718, 11119, 7099, 6119, 29918, 2080, 29908, 1723, 13, 1678, 1602, 6119, 29918, 2080, 29918, 1590, 353, 23655, 29918, 7099, 6119, 29898, 1602, 6119, 29918, 2080, 1723, 13, 1678, 1602, 6119, 29918, 4905, 29879, 259, 353, 1602, 6119, 29898, 1602, 6119, 29918, 2080, 29918, 1590, 29892, 2847, 29918, 3859, 353, 2106, 29918, 3977, 6119, 1723, 13, 1678, 1602, 6119, 29918, 1145, 344, 268, 353, 360, 1947, 29898, 1962, 29918, 29894, 542, 370, 29918, 2311, 29892, 26229, 353, 376, 2695, 3317, 613, 1024, 353, 1024, 718, 11119, 7099, 6119, 29918, 4905, 29908, 1723, 13, 1678, 1602, 6119, 29918, 4905, 29879, 259, 353, 1602, 6119, 29918, 1145, 344, 29898, 1602, 6119, 29918, 4905, 29879, 1723, 13, 13, 1678, 396, 8878, 1904, 13, 1678, 1904, 353, 8125, 29898, 10970, 353, 518, 3977, 6119, 29918, 2080, 29892, 1602, 6119, 29918, 2080, 1402, 14391, 353, 1602, 6119, 29918, 4905, 29879, 29892, 1024, 353, 1024, 1723, 13, 1678, 1904, 29889, 12198, 29898, 5994, 3950, 353, 525, 328, 314, 742, 6410, 353, 376, 29883, 20440, 936, 29918, 19128, 296, 14441, 29908, 1723, 13, 1678, 736, 1904, 13, 13, 14968, 1469, 29892, 2906, 1469, 353, 679, 5323, 262, 1469, 29898, 376, 21546, 1469, 29914, 14968, 12975, 1723, 13, 1742, 8009, 21533, 29892, 954, 14463, 21533, 353, 5706, 21533, 29898, 7945, 1469, 29892, 16897, 353, 29871, 29945, 1723, 13, 7620, 21533, 29898, 1734, 8009, 21533, 29892, 376, 1742, 8009, 21533, 613, 376, 21533, 29879, 29908, 1723, 13, 7620, 21533, 29898, 954, 14463, 21533, 29892, 376, 1949, 14463, 21533, 613, 376, 21533, 29879, 29908, 1723, 13, 6605, 2059, 15988, 29931, 273, 29898, 7945, 1469, 29892, 6796, 305, 8233, 613, 376, 996, 1674, 3108, 1723, 13, 440, 29879, 353, 7431, 29898, 1734, 8009, 21533, 3366, 305, 8233, 3108, 1723, 13, 586, 29879, 353, 7431, 29898, 1734, 8009, 21533, 3366, 996, 1674, 3108, 1723, 13, 2158, 29898, 20444, 29879, 29892, 288, 4270, 1723, 13, 13, 14968, 1469, 3366, 305, 8233, 3108, 353, 7945, 1469, 3366, 305, 8233, 3108, 29961, 1057, 29899, 29896, 29962, 13, 3359, 1469, 3366, 305, 8233, 3108, 353, 2906, 1469, 3366, 305, 8233, 3108, 29961, 1057, 29899, 29896, 29962, 13, 14968, 1469, 3366, 996, 1674, 3108, 353, 7945, 1469, 3366, 996, 1674, 3108, 29961, 1057, 29899, 29896, 29962, 13, 3359, 1469, 3366, 996, 1674, 3108, 353, 2906, 1469, 3366, 996, 1674, 3108, 29961, 1057, 29899, 29896, 29962, 13, 13, 4299, 353, 2560, 23718, 29906, 23718, 29898, 1962, 29918, 29894, 542, 370, 29918, 2311, 353, 288, 4270, 29892, 1881, 29918, 29894, 542, 370, 29918, 2311, 353, 20444, 29879, 29892, 1024, 353, 376, 17482, 29908, 1723, 13, 4299, 29889, 7727, 580, 13, 13, 16175, 29918, 2311, 353, 29871, 29953, 29946, 13, 6758, 267, 353, 5159, 13, 29876, 353, 29871, 29900, 13, 7827, 353, 7431, 29898, 7945, 1469, 3366, 305, 8233, 3108, 1723, 13, 2848, 353, 7431, 29898, 1734, 8009, 21533, 3366, 996, 1674, 3108, 1723, 13, 13, 2158, 29898, 376, 862, 497, 466, 368, 9068, 6694, 848, 29908, 1723, 13, 29883, 2361, 353, 6674, 307, 985, 292, 29889, 21970, 29918, 2798, 580, 13, 10109, 353, 6674, 307, 985, 292, 29889, 11426, 29898, 10174, 353, 28337, 1723, 13, 7529, 353, 5159, 13, 1454, 474, 297, 3464, 29898, 29871, 29900, 29892, 3001, 718, 9853, 29918, 2311, 29892, 9853, 29918, 2311, 29871, 1125, 13, 1678, 396, 4910, 680, 848, 964, 9853, 13, 1678, 260, 1272, 353, 6571, 13, 1678, 260, 1272, 3366, 305, 8233, 3108, 353, 7945, 1469, 3366, 305, 8233, 3108, 29961, 29875, 29901, 29875, 718, 9853, 29918, 2311, 29962, 13, 1678, 260, 1272, 3366, 996, 1674, 3108, 353, 7945, 1469, 3366, 996, 1674, 3108, 29961, 29875, 29901, 29875, 718, 9853, 29918, 2311, 29962, 13, 1678, 396, 422, 26062, 599, 8636, 13, 1678, 8636, 29889, 4397, 29898, 518, 29873, 1272, 29892, 6796, 305, 8233, 613, 376, 996, 1674, 12436, 3309, 29962, 1723, 13, 2158, 29898, 376, 23827, 29908, 1723, 13, 27487, 353, 5159, 13, 1454, 3240, 297, 260, 29939, 18933, 29889, 29873, 29939, 18933, 29898, 11565, 29889, 326, 481, 29918, 348, 21693, 29898, 304, 10900, 29956, 2390, 29892, 8636, 1723, 29871, 1125, 13, 1678, 337, 1372, 29889, 4397, 29898, 3240, 1723, 13, 29937, 27487, 353, 11565, 29889, 1958, 29898, 304, 10900, 29956, 2390, 29892, 8636, 1723, 13, 10109, 29889, 5358, 580, 13, 10109, 29889, 7122, 580, 13, 13, 29876, 353, 29871, 29900, 13, 2158, 29898, 376, 5323, 2827, 17794, 1723, 13, 1454, 21502, 305, 297, 3464, 29898, 29871, 29906, 29871, 1125, 13, 1678, 363, 3240, 297, 337, 1372, 29901, 13, 1678, 396, 1678, 4660, 29892, 716, 5323, 262, 1469, 29892, 22599, 353, 304, 10900, 29898, 7945, 1469, 29892, 6796, 305, 8233, 613, 376, 996, 1674, 12436, 3309, 29892, 474, 29892, 1375, 29898, 474, 718, 9853, 29918, 2311, 29892, 3001, 1723, 1723, 13, 4706, 565, 3240, 29961, 29900, 29962, 1275, 7700, 29901, 13, 9651, 6773, 13, 4706, 3858, 353, 476, 29889, 13239, 29889, 517, 29918, 29883, 20440, 936, 29898, 3240, 29961, 29896, 29962, 3366, 996, 1674, 12436, 3309, 1723, 13, 4706, 6410, 353, 1904, 29889, 14968, 29918, 265, 29918, 16175, 29898, 518, 2267, 29961, 29896, 29962, 3366, 305, 8233, 12436, 3240, 29961, 29896, 29962, 3366, 996, 1674, 3108, 1402, 3858, 1723, 13, 4706, 302, 4619, 29871, 29896, 13, 4706, 1596, 29898, 302, 29892, 6410, 1723, 13, 4706, 565, 302, 322, 302, 1273, 29871, 29941, 29900, 29900, 29900, 1275, 29871, 29900, 29901, 13, 9651, 1904, 29889, 7620, 29918, 705, 5861, 703, 23785, 29914, 4299, 29918, 705, 5861, 27508, 718, 851, 29898, 302, 1723, 718, 11393, 29882, 29945, 29908, 1723, 29871, 13, 4706, 28495, 29889, 4397, 29898, 6410, 1723, 13, 1678, 1904, 29889, 7620, 29918, 705, 5861, 703, 23785, 29914, 4299, 29918, 705, 5861, 27508, 718, 851, 29898, 302, 1723, 718, 11393, 29882, 29945, 29908, 1723, 29871, 13, 2541, 1722, 29898, 376, 6758, 267, 613, 376, 29893, 29908, 1723, 408, 285, 29901, 13, 1678, 363, 6410, 297, 28495, 29901, 13, 4706, 285, 29889, 3539, 29898, 851, 29898, 6410, 1723, 718, 6634, 29876, 29908, 1723, 13, 2 ]
types-operations/strings.py
rawzes/python-book
0
149733
s = 'test' print(s[:]) # print whole string print(s[0:-1]) # print tes print(s[1]) # e print(s + "xyz") # concatination testxyz print("A"*90) #s[0] = "s" #str' object does not support item assignment S = "strawberry" L = list(S) print(L) L[0] = 'Z' print(''.join(L)) # Ztrawberry s = ''.join(L) s = s.replace('rr', 'rrr') print(s) line = 'aaa,bbb,ccc' print(line.split(',')) # разбить по разделителю строку print(line.upper()) test_string = '''etst gdf rt \ttew''' print(test_string) print(line.encode("utf-8")) print(line.encode("utf-16"))
[ 1, 29871, 13, 29879, 353, 525, 1688, 29915, 13, 2158, 29898, 29879, 7503, 2314, 396, 1596, 3353, 1347, 13, 2158, 29898, 29879, 29961, 29900, 13018, 29896, 2314, 396, 1596, 260, 267, 13, 2158, 29898, 29879, 29961, 29896, 2314, 396, 321, 13, 2158, 29898, 29879, 718, 376, 20230, 1159, 396, 3022, 271, 3381, 1243, 20230, 13, 2158, 703, 29909, 29908, 29930, 29929, 29900, 29897, 13, 29937, 29879, 29961, 29900, 29962, 353, 376, 29879, 29908, 29871, 396, 710, 29915, 1203, 947, 451, 2304, 2944, 12827, 13, 29903, 353, 376, 303, 1610, 16344, 29908, 13, 29931, 353, 1051, 29898, 29903, 29897, 13, 2158, 29898, 29931, 29897, 13, 29931, 29961, 29900, 29962, 353, 525, 29999, 29915, 13, 2158, 877, 4286, 7122, 29898, 29931, 876, 29871, 396, 796, 29873, 1610, 16344, 13, 29879, 353, 525, 4286, 7122, 29898, 29931, 29897, 13, 29879, 353, 269, 29889, 6506, 877, 21478, 742, 525, 21478, 29878, 1495, 13, 2158, 29898, 29879, 29897, 13, 1220, 353, 525, 7340, 29874, 29892, 1327, 29890, 29892, 26854, 29915, 13, 2158, 29898, 1220, 29889, 5451, 29898, 3788, 876, 396, 3212, 2384, 1413, 733, 3212, 23890, 730, 2583, 2091, 576, 1382, 13, 2158, 29898, 1220, 29889, 21064, 3101, 13, 1688, 29918, 1807, 353, 14550, 300, 303, 13, 29887, 2176, 13, 2273, 13, 29905, 24087, 29893, 12008, 13, 2158, 29898, 1688, 29918, 1807, 29897, 13, 2158, 29898, 1220, 29889, 12508, 703, 9420, 29899, 29947, 5783, 13, 2158, 29898, 1220, 29889, 12508, 703, 9420, 29899, 29896, 29953, 5783, 2 ]
ui_lanzou.py
wangkun19930608/lanzou-gui
0
1607854
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'lanzou-gui/lanzou.ui' # # Created by: PyQt5 UI code generator 5.13.2, and I have edited # from PyQt5 import QtCore, QtGui, QtWidgets from dialogs import MyLineEdit class MyTableView(QtWidgets.QTableView): """加入拖拽功能的表格显示器""" drop_files = QtCore.pyqtSignal(object) def __init__(self, parent): super(MyTableView, self).__init__(parent) self.setDragDropMode(QtWidgets.QAbstractItemView.InternalMove) self.setDragEnabled(True) self.setAcceptDrops(True) self.setDropIndicatorShown(True) def dragEnterEvent(self, event): m = event.mimeData() if m.hasUrls(): for url in m.urls(): if url.isLocalFile(): event.accept() return event.ignore() def dropEvent(self, event): if event.source(): QtWidgets.QListView.dropEvent(self, event) else: m = event.mimeData() if m.hasUrls(): urls = [url.toLocalFile() for url in m.urls() if url.isLocalFile()] if urls: self.drop_files.emit(urls) event.acceptProposedAction() class Ui_MainWindow(QtWidgets.QMainWindow): def __init__(self): super(Ui_MainWindow, self).__init__() def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.setEnabled(True) MainWindow.resize(1000, 650) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.verticalLayout = QtWidgets.QVBoxLayout(self.centralwidget) self.verticalLayout.setObjectName("verticalLayout") self.tabWidget = QtWidgets.QTabWidget(self.centralwidget) self.tabWidget.setObjectName("tabWidget") self.share_tab = QtWidgets.QWidget() self.share_tab.setObjectName("share_tab") self.share_vlayout = QtWidgets.QVBoxLayout(self.share_tab) self.share_vlayout.setObjectName("share_vlayout") self.share_hlayout_top = QtWidgets.QHBoxLayout() self.share_hlayout_top.setObjectName("share_hlayout_top") self.label_share_url = QtWidgets.QLabel(self.share_tab) self.label_share_url.setObjectName("label_share_url") self.share_hlayout_top.addWidget(self.label_share_url) self.line_share_url = QtWidgets.QLineEdit(self.share_tab) self.line_share_url.setObjectName("line_share_url") self.share_hlayout_top.addWidget(self.line_share_url) self.btn_extract = QtWidgets.QPushButton(self.share_tab) self.btn_extract.setObjectName("btn_extract") self.share_hlayout_top.addWidget(self.btn_extract) self.share_vlayout.addLayout(self.share_hlayout_top) self.table_share = QtWidgets.QTableView(self.share_tab) self.table_share.setObjectName("table_share") self.share_vlayout.addWidget(self.table_share) self.share_hlayout_bottom = QtWidgets.QHBoxLayout() self.share_hlayout_bottom.setObjectName("share_hlayout_bottom") self.btn_share_select_all = QtWidgets.QPushButton(self.share_tab) self.btn_share_select_all.setObjectName("btn_share_select_all") self.share_hlayout_bottom.addWidget(self.btn_share_select_all) self.label_dl_path = QtWidgets.QLabel(self.share_tab) self.label_dl_path.setObjectName("label_dl_path") self.share_hlayout_bottom.addWidget(self.label_dl_path) self.share_set_dl_path = MyLineEdit(self.share_tab) self.share_set_dl_path.setObjectName("share_set_dl_path") self.share_hlayout_bottom.addWidget(self.share_set_dl_path) self.btn_share_dl = QtWidgets.QPushButton(self.share_tab) self.btn_share_dl.setObjectName("btn_share_dl") self.share_hlayout_bottom.addWidget(self.btn_share_dl) self.share_vlayout.addLayout(self.share_hlayout_bottom) self.tabWidget.addTab(self.share_tab, "") self.disk_tab = QtWidgets.QWidget() self.disk_tab.setEnabled(True) self.disk_tab.setMinimumSize(QtCore.QSize(620, 0)) self.disk_tab.setObjectName("disk_tab") self.disk_vlayout = QtWidgets.QVBoxLayout(self.disk_tab) self.disk_vlayout.setObjectName("disk_vlayout") self.disk_hlayout_top = QtWidgets.QHBoxLayout() self.disk_hlayout_top.setObjectName("disk_hlayout_top") self.disk_loc_hbox = QtWidgets.QHBoxLayout() self.disk_loc_hbox.setObjectName("disk_loc") self.label_disk_loc = QtWidgets.QLabel(self.disk_tab) self.label_disk_loc.setObjectName("label_disk_loc") self.disk_loc_hbox.addWidget(self.label_disk_loc) self.disk_hlayout_top.addLayout(self.disk_loc_hbox) spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.disk_hlayout_top.addItem(spacerItem) self.btn_disk_mkdir = QtWidgets.QPushButton(self.disk_tab) self.btn_disk_mkdir.setObjectName("btn_disk_mkdir") self.disk_hlayout_top.addWidget(self.btn_disk_mkdir) self.disk_vlayout.addLayout(self.disk_hlayout_top) self.table_disk = MyTableView(self.disk_tab) self.table_disk.setObjectName("table_disk") self.disk_vlayout.addWidget(self.table_disk) self.disk_hlayout_bottom = QtWidgets.QHBoxLayout() self.disk_hlayout_bottom.setObjectName("disk_hlayout_bottom") self.btn_disk_select_all = QtWidgets.QPushButton(self.disk_tab) self.btn_disk_select_all.setObjectName("btn_disk_select_all") self.disk_hlayout_bottom.addWidget(self.btn_disk_select_all) spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.disk_hlayout_bottom.addItem(spacerItem1) self.btn_disk_delete = QtWidgets.QPushButton(self.disk_tab) self.btn_disk_delete.setObjectName("btn_disk_delete") self.disk_hlayout_bottom.addWidget(self.btn_disk_delete) self.btn_disk_dl = QtWidgets.QPushButton(self.disk_tab) self.btn_disk_dl.setObjectName("btn_disk_dl") self.disk_hlayout_bottom.addWidget(self.btn_disk_dl) self.disk_vlayout.addLayout(self.disk_hlayout_bottom) self.tabWidget.addTab(self.disk_tab, "") self.rec_tab = QtWidgets.QWidget() self.rec_tab.setObjectName("rec_tab") self.rec_verticalLayout = QtWidgets.QVBoxLayout(self.rec_tab) self.rec_verticalLayout.setObjectName("rec_verticalLayout") self.rec_horizontalLayout = QtWidgets.QHBoxLayout() self.rec_horizontalLayout.setObjectName("rec_horizontalLayout") self.btn_rec_select_all = QtWidgets.QPushButton(self.rec_tab) self.btn_rec_select_all.setObjectName("btn_rec_select_all") self.rec_horizontalLayout.addWidget(self.btn_rec_select_all) self.btn_recovery = QtWidgets.QPushButton(self.rec_tab) self.btn_recovery.setObjectName("btn_recovery") self.rec_horizontalLayout.addWidget(self.btn_recovery) self.btn_rec_delete = QtWidgets.QPushButton(self.rec_tab) self.btn_rec_delete.setObjectName("btn_rec_delete") self.rec_horizontalLayout.addWidget(self.btn_rec_delete) self.rec_horizontalLayout.addStretch(1) self.btn_rec_clean = QtWidgets.QPushButton(self.rec_tab) self.btn_rec_clean.setObjectName("btn_rec_clean") self.rec_horizontalLayout.addWidget(self.btn_rec_clean) self.btn_recovery_all = QtWidgets.QPushButton(self.rec_tab) self.btn_recovery_all.setObjectName("btn_recovery_all") self.rec_horizontalLayout.addWidget(self.btn_recovery_all) self.btn_rec_expire_files = QtWidgets.QPushButton(self.rec_tab) self.btn_rec_expire_files.setObjectName("btn_rec_expire_files") self.rec_horizontalLayout.addWidget(self.btn_rec_expire_files) self.rec_verticalLayout.addLayout(self.rec_horizontalLayout) self.table_rec = QtWidgets.QTableView(self.rec_tab) self.table_rec.setObjectName("table_rec") self.rec_verticalLayout.addWidget(self.table_rec) self.tabWidget.addTab(self.rec_tab, "") self.jobs_tab = QtWidgets.QWidget() self.jobs_tab.setObjectName("jobs_tab") self.jobs_verticalLayout = QtWidgets.QVBoxLayout(self.jobs_tab) self.jobs_verticalLayout.setObjectName("jobs_verticalLayout") self.jobs_horizontalLayout = QtWidgets.QHBoxLayout() self.jobs_horizontalLayout.setObjectName("jobs_horizontalLayout") self.btn_jobs_start_all = QtWidgets.QPushButton(self.jobs_tab) self.btn_jobs_clean_all = QtWidgets.QPushButton(self.jobs_tab) self.jobs_horizontalLayout.addWidget(self.btn_jobs_start_all) self.jobs_horizontalLayout.addStretch(1) self.jobs_horizontalLayout.addWidget(self.btn_jobs_clean_all) self.table_jobs = MyTableView(self.jobs_tab) self.table_jobs.setObjectName("table_jobs") self.jobs_verticalLayout.addLayout(self.jobs_horizontalLayout) self.jobs_verticalLayout.addWidget(self.table_jobs) self.tabWidget.addTab(self.jobs_tab, "") self.verticalLayout.addWidget(self.tabWidget) MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtWidgets.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 640, 30)) self.menubar.setObjectName("menubar") self.acount = QtWidgets.QMenu(self.menubar) self.acount.setObjectName("acount") self.files = QtWidgets.QMenu(self.menubar) self.files.setObjectName("files") self.help = QtWidgets.QMenu(self.menubar) self.help.setObjectName("help") MainWindow.setMenuBar(self.menubar) self.statusbar = QtWidgets.QStatusBar(MainWindow) self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) self.toolbar = QtWidgets.QToolBar(MainWindow) self.toolbar.setObjectName("toolbar") MainWindow.addToolBar(QtCore.Qt.TopToolBarArea, self.toolbar) self.login = QtWidgets.QAction(MainWindow) self.login.setObjectName("login") self.logout = QtWidgets.QAction(MainWindow) self.logout.setObjectName("logout") self.upload = QtWidgets.QAction(MainWindow) self.upload.setObjectName("upload") self.download = QtWidgets.QAction(MainWindow) self.download.setObjectName("download") self.delete = QtWidgets.QAction(MainWindow) self.delete.setObjectName("delete") self.how = QtWidgets.QAction(MainWindow) self.how.setObjectName("how") self.about = QtWidgets.QAction(MainWindow) self.about.setObjectName("about") self.acount.addSeparator() self.acount.addAction(self.login) self.acount.addAction(self.logout) self.files.addAction(self.upload) self.files.addAction(self.download) self.files.addAction(self.delete) self.help.addAction(self.how) self.help.addAction(self.about) self.menubar.addAction(self.acount.menuAction()) self.menubar.addAction(self.files.menuAction()) self.menubar.addAction(self.help.menuAction()) # 状态栏 self.statusbar_msg_label = QtWidgets.QLabel() self.statusbar_load_lb = QtWidgets.QLabel() self.statusbar_load_movie = QtGui.QMovie("src/loading_more.gif") self.statusbar_load_movie.setScaledSize(QtCore.QSize(24, 24)) self.statusbar_load_lb.setMovie(self.statusbar_load_movie) self.statusbar_msg_label.setObjectName("msg_label") self.statusbar_load_lb.setObjectName("msg_movie_lb") self.statusbar.addWidget(self.statusbar_load_lb) self.statusbar.addWidget(self.statusbar_msg_label) self.retranslateUi(MainWindow) self.tabWidget.setCurrentIndex(1) QtCore.QMetaObject.connectSlotsByName(MainWindow) def retranslateUi(self, MainWindow): _translate = QtCore.QCoreApplication.translate MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow")) self.label_share_url.setText(_translate("MainWindow", "蓝奏链接")) self.btn_extract.setText(_translate("MainWindow", "提取")) self.btn_share_select_all.setText(_translate("MainWindow", "全选")) self.label_dl_path.setText(_translate("MainWindow", "文件下载路径")) self.btn_share_dl.setText(_translate("MainWindow", "下载选中文件")) self.tabWidget.setTabText(self.tabWidget.indexOf(self.share_tab), _translate("MainWindow", "蓝奏云链接提取")) self.label_disk_loc.setText(_translate("MainWindow", "位置")) self.btn_disk_mkdir.setText(_translate("MainWindow", "新建文件夹")) self.btn_disk_select_all.setText(_translate("MainWindow", "全选")) self.btn_disk_delete.setText(_translate("MainWindow", "删除")) self.btn_disk_dl.setText(_translate("MainWindow", "下载")) self.tabWidget.setTabText(self.tabWidget.indexOf(self.disk_tab), _translate("MainWindow", "我的蓝奏云")) self.btn_rec_select_all.setText(_translate("MainWindow", "全选")) self.btn_recovery.setText(_translate("MainWindow", "还原")) self.btn_rec_delete.setText(_translate("MainWindow", "彻底删除")) self.btn_rec_clean.setText(_translate("MainWindow", "清空回收站")) self.btn_recovery_all.setText(_translate("MainWindow", "全部还原")) self.btn_rec_expire_files.setText(_translate("MainWindow", "过期文件")) self.tabWidget.setTabText(self.tabWidget.indexOf(self.rec_tab), _translate("MainWindow", "回收站")) self.btn_jobs_start_all.setText(_translate("MainWindow", "开始所有任务")) self.btn_jobs_clean_all.setText(_translate("MainWindow", "删除已完成任务")) self.tabWidget.setTabText(self.tabWidget.indexOf(self.jobs_tab), _translate("MainWindow", "任务管理")) self.acount.setTitle(_translate("MainWindow", "登录")) self.files.setTitle(_translate("MainWindow", "文件")) self.help.setTitle(_translate("MainWindow", "帮助")) self.toolbar.setWindowTitle(_translate("MainWindow", "toolBar")) self.login.setText(_translate("MainWindow", "登录")) self.logout.setText(_translate("MainWindow", "登出")) self.upload.setText(_translate("MainWindow", "上传")) self.download.setText(_translate("MainWindow", "下载")) self.delete.setText(_translate("MainWindow", "删除")) self.how.setText(_translate("MainWindow", "使用说明")) self.about.setText(_translate("MainWindow", "关于"))
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 13, 29937, 3812, 5314, 5759, 515, 5183, 14313, 934, 525, 29880, 4096, 283, 29899, 23569, 29914, 29880, 4096, 283, 29889, 1481, 29915, 13, 29937, 13, 29937, 6760, 630, 491, 29901, 10772, 17303, 29945, 3740, 775, 15299, 29871, 29945, 29889, 29896, 29941, 29889, 29906, 29892, 322, 306, 505, 8788, 13, 29937, 13, 3166, 10772, 17303, 29945, 1053, 14705, 9203, 29892, 14705, 28707, 29892, 14705, 8801, 29879, 13, 3166, 7928, 29879, 1053, 1619, 3542, 6103, 13, 13, 1990, 1619, 3562, 1043, 29898, 17303, 8801, 29879, 29889, 29984, 3562, 1043, 1125, 13, 1678, 9995, 30666, 30752, 233, 142, 153, 233, 142, 192, 31134, 30815, 30210, 30746, 31168, 31542, 30858, 30943, 15945, 29908, 13, 1678, 5768, 29918, 5325, 353, 14705, 9203, 29889, 2272, 17915, 10140, 284, 29898, 3318, 29897, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 3847, 1125, 13, 4706, 2428, 29898, 3421, 3562, 1043, 29892, 1583, 467, 1649, 2344, 12035, 3560, 29897, 13, 4706, 1583, 29889, 842, 23978, 15063, 6818, 29898, 17303, 8801, 29879, 29889, 29984, 9118, 2001, 1043, 29889, 16491, 16619, 29897, 13, 4706, 1583, 29889, 842, 23978, 10861, 29898, 5574, 29897, 13, 4706, 1583, 29889, 842, 23965, 29928, 307, 567, 29898, 5574, 29897, 13, 4706, 1583, 29889, 842, 15063, 28013, 2713, 776, 29898, 5574, 29897, 13, 13, 1678, 822, 8338, 10399, 2624, 29898, 1311, 29892, 1741, 1125, 13, 4706, 286, 353, 1741, 29889, 29885, 603, 1469, 580, 13, 4706, 565, 286, 29889, 5349, 5983, 29879, 7295, 13, 9651, 363, 3142, 297, 286, 29889, 26045, 7295, 13, 18884, 565, 3142, 29889, 275, 7717, 2283, 7295, 13, 462, 1678, 1741, 29889, 16044, 580, 13, 462, 1678, 736, 13, 4706, 1741, 29889, 17281, 580, 13, 13, 1678, 822, 5768, 2624, 29898, 1311, 29892, 1741, 1125, 13, 4706, 565, 1741, 29889, 4993, 7295, 13, 9651, 14705, 8801, 29879, 29889, 29984, 15660, 29889, 8865, 2624, 29898, 1311, 29892, 1741, 29897, 13, 4706, 1683, 29901, 13, 9651, 286, 353, 1741, 29889, 29885, 603, 1469, 580, 13, 9651, 565, 286, 29889, 5349, 5983, 29879, 7295, 13, 18884, 23942, 353, 518, 2271, 29889, 517, 7717, 2283, 580, 363, 3142, 297, 286, 29889, 26045, 580, 565, 3142, 29889, 275, 7717, 2283, 580, 29962, 13, 18884, 565, 23942, 29901, 13, 462, 1678, 1583, 29889, 8865, 29918, 5325, 29889, 21976, 29898, 26045, 29897, 13, 462, 1678, 1741, 29889, 16044, 1184, 4752, 4276, 580, 13, 13, 13, 1990, 501, 29875, 29918, 6330, 5907, 29898, 17303, 8801, 29879, 29889, 29984, 6330, 5907, 1125, 13, 1678, 822, 4770, 2344, 12035, 1311, 1125, 13, 4706, 2428, 29898, 29965, 29875, 29918, 6330, 5907, 29892, 1583, 467, 1649, 2344, 1649, 580, 13, 13, 1678, 822, 6230, 29965, 29875, 29898, 1311, 29892, 4241, 5907, 1125, 13, 4706, 4241, 5907, 29889, 842, 2061, 1170, 703, 6330, 5907, 1159, 13, 4706, 4241, 5907, 29889, 842, 10861, 29898, 5574, 29897, 13, 4706, 4241, 5907, 29889, 21476, 29898, 29896, 29900, 29900, 29900, 29892, 29871, 29953, 29945, 29900, 29897, 13, 4706, 1583, 29889, 25171, 8030, 353, 14705, 8801, 29879, 29889, 29984, 8801, 29898, 6330, 5907, 29897, 13, 4706, 1583, 29889, 25171, 8030, 29889, 842, 2061, 1170, 703, 25171, 8030, 1159, 13, 4706, 1583, 29889, 18575, 3453, 353, 14705, 8801, 29879, 29889, 29984, 29963, 3313, 3453, 29898, 1311, 29889, 25171, 8030, 29897, 13, 4706, 1583, 29889, 18575, 3453, 29889, 842, 2061, 1170, 703, 18575, 3453, 1159, 13, 4706, 1583, 29889, 3891, 8801, 353, 14705, 8801, 29879, 29889, 29984, 8863, 8801, 29898, 1311, 29889, 25171, 8030, 29897, 13, 4706, 1583, 29889, 3891, 8801, 29889, 842, 2061, 1170, 703, 3891, 8801, 1159, 13, 4706, 1583, 29889, 13653, 29918, 3891, 353, 14705, 8801, 29879, 29889, 29984, 8801, 580, 13, 4706, 1583, 29889, 13653, 29918, 3891, 29889, 842, 2061, 1170, 703, 13653, 29918, 3891, 1159, 13, 4706, 1583, 29889, 13653, 29918, 29894, 2680, 353, 14705, 8801, 29879, 29889, 29984, 29963, 3313, 3453, 29898, 1311, 29889, 13653, 29918, 3891, 29897, 13, 4706, 1583, 29889, 13653, 29918, 29894, 2680, 29889, 842, 2061, 1170, 703, 13653, 29918, 29894, 2680, 1159, 13, 4706, 1583, 29889, 13653, 29918, 29882, 2680, 29918, 3332, 353, 14705, 8801, 29879, 29889, 29984, 29950, 3313, 3453, 580, 13, 4706, 1583, 29889, 13653, 29918, 29882, 2680, 29918, 3332, 29889, 842, 2061, 1170, 703, 13653, 29918, 29882, 2680, 29918, 3332, 1159, 13, 4706, 1583, 29889, 1643, 29918, 13653, 29918, 2271, 353, 14705, 8801, 29879, 29889, 2239, 1107, 29898, 1311, 29889, 13653, 29918, 3891, 29897, 13, 4706, 1583, 29889, 1643, 29918, 13653, 29918, 2271, 29889, 842, 2061, 1170, 703, 1643, 29918, 13653, 29918, 2271, 1159, 13, 4706, 1583, 29889, 13653, 29918, 29882, 2680, 29918, 3332, 29889, 1202, 8801, 29898, 1311, 29889, 1643, 29918, 13653, 29918, 2271, 29897, 13, 4706, 1583, 29889, 1220, 29918, 13653, 29918, 2271, 353, 14705, 8801, 29879, 29889, 2239, 457, 6103, 29898, 1311, 29889, 13653, 29918, 3891, 29897, 13, 4706, 1583, 29889, 1220, 29918, 13653, 29918, 2271, 29889, 842, 2061, 1170, 703, 1220, 29918, 13653, 29918, 2271, 1159, 13, 4706, 1583, 29889, 13653, 29918, 29882, 2680, 29918, 3332, 29889, 1202, 8801, 29898, 1311, 29889, 1220, 29918, 13653, 29918, 2271, 29897, 13, 4706, 1583, 29889, 7290, 29918, 21111, 353, 14705, 8801, 29879, 29889, 29984, 27031, 3125, 29898, 1311, 29889, 13653, 29918, 3891, 29897, 13, 4706, 1583, 29889, 7290, 29918, 21111, 29889, 842, 2061, 1170, 703, 7290, 29918, 21111, 1159, 13, 4706, 1583, 29889, 13653, 29918, 29882, 2680, 29918, 3332, 29889, 1202, 8801, 29898, 1311, 29889, 7290, 29918, 21111, 29897, 13, 4706, 1583, 29889, 13653, 29918, 29894, 2680, 29889, 1202, 3453, 29898, 1311, 29889, 13653, 29918, 29882, 2680, 29918, 3332, 29897, 13, 4706, 1583, 29889, 2371, 29918, 13653, 353, 14705, 8801, 29879, 29889, 29984, 3562, 1043, 29898, 1311, 29889, 13653, 29918, 3891, 29897, 13, 4706, 1583, 29889, 2371, 29918, 13653, 29889, 842, 2061, 1170, 703, 2371, 29918, 13653, 1159, 13, 4706, 1583, 29889, 13653, 29918, 29894, 2680, 29889, 1202, 8801, 29898, 1311, 29889, 2371, 29918, 13653, 29897, 13, 4706, 1583, 29889, 13653, 29918, 29882, 2680, 29918, 8968, 353, 14705, 8801, 29879, 29889, 29984, 29950, 3313, 3453, 580, 13, 4706, 1583, 29889, 13653, 29918, 29882, 2680, 29918, 8968, 29889, 842, 2061, 1170, 703, 13653, 29918, 29882, 2680, 29918, 8968, 1159, 13, 4706, 1583, 29889, 7290, 29918, 13653, 29918, 2622, 29918, 497, 353, 14705, 8801, 29879, 29889, 29984, 27031, 3125, 29898, 1311, 29889, 13653, 29918, 3891, 29897, 13, 4706, 1583, 29889, 7290, 29918, 13653, 29918, 2622, 29918, 497, 29889, 842, 2061, 1170, 703, 7290, 29918, 13653, 29918, 2622, 29918, 497, 1159, 13, 4706, 1583, 29889, 13653, 29918, 29882, 2680, 29918, 8968, 29889, 1202, 8801, 29898, 1311, 29889, 7290, 29918, 13653, 29918, 2622, 29918, 497, 29897, 13, 4706, 1583, 29889, 1643, 29918, 11671, 29918, 2084, 353, 14705, 8801, 29879, 29889, 2239, 1107, 29898, 1311, 29889, 13653, 29918, 3891, 29897, 13, 4706, 1583, 29889, 1643, 29918, 11671, 29918, 2084, 29889, 842, 2061, 1170, 703, 1643, 29918, 11671, 29918, 2084, 1159, 13, 4706, 1583, 29889, 13653, 29918, 29882, 2680, 29918, 8968, 29889, 1202, 8801, 29898, 1311, 29889, 1643, 29918, 11671, 29918, 2084, 29897, 13, 4706, 1583, 29889, 13653, 29918, 842, 29918, 11671, 29918, 2084, 353, 1619, 3542, 6103, 29898, 1311, 29889, 13653, 29918, 3891, 29897, 13, 4706, 1583, 29889, 13653, 29918, 842, 29918, 11671, 29918, 2084, 29889, 842, 2061, 1170, 703, 13653, 29918, 842, 29918, 11671, 29918, 2084, 1159, 13, 4706, 1583, 29889, 13653, 29918, 29882, 2680, 29918, 8968, 29889, 1202, 8801, 29898, 1311, 29889, 13653, 29918, 842, 29918, 11671, 29918, 2084, 29897, 13, 4706, 1583, 29889, 7290, 29918, 13653, 29918, 11671, 353, 14705, 8801, 29879, 29889, 29984, 27031, 3125, 29898, 1311, 29889, 13653, 29918, 3891, 29897, 13, 4706, 1583, 29889, 7290, 29918, 13653, 29918, 11671, 29889, 842, 2061, 1170, 703, 7290, 29918, 13653, 29918, 11671, 1159, 13, 4706, 1583, 29889, 13653, 29918, 29882, 2680, 29918, 8968, 29889, 1202, 8801, 29898, 1311, 29889, 7290, 29918, 13653, 29918, 11671, 29897, 13, 4706, 1583, 29889, 13653, 29918, 29894, 2680, 29889, 1202, 3453, 29898, 1311, 29889, 13653, 29918, 29882, 2680, 29918, 8968, 29897, 13, 4706, 1583, 29889, 3891, 8801, 29889, 1202, 8863, 29898, 1311, 29889, 13653, 29918, 3891, 29892, 20569, 13, 4706, 1583, 29889, 20960, 29918, 3891, 353, 14705, 8801, 29879, 29889, 29984, 8801, 580, 13, 4706, 1583, 29889, 20960, 29918, 3891, 29889, 842, 10861, 29898, 5574, 29897, 13, 4706, 1583, 29889, 20960, 29918, 3891, 29889, 842, 8140, 12539, 3505, 29898, 17303, 9203, 29889, 29984, 3505, 29898, 29953, 29906, 29900, 29892, 29871, 29900, 876, 13, 4706, 1583, 29889, 20960, 29918, 3891, 29889, 842, 2061, 1170, 703, 20960, 29918, 3891, 1159, 13, 4706, 1583, 29889, 20960, 29918, 29894, 2680, 353, 14705, 8801, 29879, 29889, 29984, 29963, 3313, 3453, 29898, 1311, 29889, 20960, 29918, 3891, 29897, 13, 4706, 1583, 29889, 20960, 29918, 29894, 2680, 29889, 842, 2061, 1170, 703, 20960, 29918, 29894, 2680, 1159, 13, 4706, 1583, 29889, 20960, 29918, 29882, 2680, 29918, 3332, 353, 14705, 8801, 29879, 29889, 29984, 29950, 3313, 3453, 580, 13, 4706, 1583, 29889, 20960, 29918, 29882, 2680, 29918, 3332, 29889, 842, 2061, 1170, 703, 20960, 29918, 29882, 2680, 29918, 3332, 1159, 13, 4706, 1583, 29889, 20960, 29918, 2029, 29918, 21368, 353, 14705, 8801, 29879, 29889, 29984, 29950, 3313, 3453, 580, 13, 4706, 1583, 29889, 20960, 29918, 2029, 29918, 21368, 29889, 842, 2061, 1170, 703, 20960, 29918, 2029, 1159, 13, 4706, 1583, 29889, 1643, 29918, 20960, 29918, 2029, 353, 14705, 8801, 29879, 29889, 2239, 1107, 29898, 1311, 29889, 20960, 29918, 3891, 29897, 13, 4706, 1583, 29889, 1643, 29918, 20960, 29918, 2029, 29889, 842, 2061, 1170, 703, 1643, 29918, 20960, 29918, 2029, 1159, 13, 4706, 1583, 29889, 20960, 29918, 2029, 29918, 21368, 29889, 1202, 8801, 29898, 1311, 29889, 1643, 29918, 20960, 29918, 2029, 29897, 13, 4706, 1583, 29889, 20960, 29918, 29882, 2680, 29918, 3332, 29889, 1202, 3453, 29898, 1311, 29889, 20960, 29918, 2029, 29918, 21368, 29897, 13, 4706, 26325, 261, 2001, 353, 14705, 8801, 29879, 29889, 29984, 5592, 562, 261, 2001, 29898, 29946, 29900, 29892, 29871, 29906, 29900, 29892, 14705, 8801, 29879, 29889, 29984, 3505, 15644, 29889, 29777, 292, 29892, 14705, 8801, 29879, 29889, 29984, 3505, 15644, 29889, 8140, 12539, 29897, 13, 4706, 1583, 29889, 20960, 29918, 29882, 2680, 29918, 3332, 29889, 1202, 2001, 29898, 1028, 562, 261, 2001, 29897, 13, 4706, 1583, 29889, 7290, 29918, 20960, 29918, 11256, 3972, 353, 14705, 8801, 29879, 29889, 29984, 27031, 3125, 29898, 1311, 29889, 20960, 29918, 3891, 29897, 13, 4706, 1583, 29889, 7290, 29918, 20960, 29918, 11256, 3972, 29889, 842, 2061, 1170, 703, 7290, 29918, 20960, 29918, 11256, 3972, 1159, 13, 4706, 1583, 29889, 20960, 29918, 29882, 2680, 29918, 3332, 29889, 1202, 8801, 29898, 1311, 29889, 7290, 29918, 20960, 29918, 11256, 3972, 29897, 13, 4706, 1583, 29889, 20960, 29918, 29894, 2680, 29889, 1202, 3453, 29898, 1311, 29889, 20960, 29918, 29882, 2680, 29918, 3332, 29897, 13, 4706, 1583, 29889, 2371, 29918, 20960, 353, 1619, 3562, 1043, 29898, 1311, 29889, 20960, 29918, 3891, 29897, 13, 4706, 1583, 29889, 2371, 29918, 20960, 29889, 842, 2061, 1170, 703, 2371, 29918, 20960, 1159, 13, 4706, 1583, 29889, 20960, 29918, 29894, 2680, 29889, 1202, 8801, 29898, 1311, 29889, 2371, 29918, 20960, 29897, 13, 4706, 1583, 29889, 20960, 29918, 29882, 2680, 29918, 8968, 353, 14705, 8801, 29879, 29889, 29984, 29950, 3313, 3453, 580, 13, 4706, 1583, 29889, 20960, 29918, 29882, 2680, 29918, 8968, 29889, 842, 2061, 1170, 703, 20960, 29918, 29882, 2680, 29918, 8968, 1159, 13, 4706, 1583, 29889, 7290, 29918, 20960, 29918, 2622, 29918, 497, 353, 14705, 8801, 29879, 29889, 29984, 27031, 3125, 29898, 1311, 29889, 20960, 29918, 3891, 29897, 13, 4706, 1583, 29889, 7290, 29918, 20960, 29918, 2622, 29918, 497, 29889, 842, 2061, 1170, 703, 7290, 29918, 20960, 29918, 2622, 29918, 497, 1159, 13, 4706, 1583, 29889, 20960, 29918, 29882, 2680, 29918, 8968, 29889, 1202, 8801, 29898, 1311, 29889, 7290, 29918, 20960, 29918, 2622, 29918, 497, 29897, 13, 4706, 26325, 261, 2001, 29896, 353, 14705, 8801, 29879, 29889, 29984, 5592, 562, 261, 2001, 29898, 29946, 29900, 29892, 29871, 29906, 29900, 29892, 14705, 8801, 29879, 29889, 29984, 3505, 15644, 29889, 29777, 292, 29892, 14705, 8801, 29879, 29889, 29984, 3505, 15644, 29889, 8140, 12539, 29897, 13, 4706, 1583, 29889, 20960, 29918, 29882, 2680, 29918, 8968, 29889, 1202, 2001, 29898, 1028, 562, 261, 2001, 29896, 29897, 13, 4706, 1583, 29889, 7290, 29918, 20960, 29918, 8143, 353, 14705, 8801, 29879, 29889, 29984, 27031, 3125, 29898, 1311, 29889, 20960, 29918, 3891, 29897, 13, 4706, 1583, 29889, 7290, 29918, 20960, 29918, 8143, 29889, 842, 2061, 1170, 703, 7290, 29918, 20960, 29918, 8143, 1159, 13, 4706, 1583, 29889, 20960, 29918, 29882, 2680, 29918, 8968, 29889, 1202, 8801, 29898, 1311, 29889, 7290, 29918, 20960, 29918, 8143, 29897, 13, 4706, 1583, 29889, 7290, 29918, 20960, 29918, 11671, 353, 14705, 8801, 29879, 29889, 29984, 27031, 3125, 29898, 1311, 29889, 20960, 29918, 3891, 29897, 13, 4706, 1583, 29889, 7290, 29918, 20960, 29918, 11671, 29889, 842, 2061, 1170, 703, 7290, 29918, 20960, 29918, 11671, 1159, 13, 4706, 1583, 29889, 20960, 29918, 29882, 2680, 29918, 8968, 29889, 1202, 8801, 29898, 1311, 29889, 7290, 29918, 20960, 29918, 11671, 29897, 13, 4706, 1583, 29889, 20960, 29918, 29894, 2680, 29889, 1202, 3453, 29898, 1311, 29889, 20960, 29918, 29882, 2680, 29918, 8968, 29897, 13, 4706, 1583, 29889, 3891, 8801, 29889, 1202, 8863, 29898, 1311, 29889, 20960, 29918, 3891, 29892, 20569, 13, 13, 4706, 1583, 29889, 3757, 29918, 3891, 353, 14705, 8801, 29879, 29889, 29984, 8801, 580, 13, 4706, 1583, 29889, 3757, 29918, 3891, 29889, 842, 2061, 1170, 703, 3757, 29918, 3891, 1159, 13, 4706, 1583, 29889, 3757, 29918, 18575, 3453, 353, 14705, 8801, 29879, 29889, 29984, 29963, 3313, 3453, 29898, 1311, 29889, 3757, 29918, 3891, 29897, 13, 4706, 1583, 29889, 3757, 29918, 18575, 3453, 29889, 842, 2061, 1170, 703, 3757, 29918, 18575, 3453, 1159, 13, 4706, 1583, 29889, 3757, 29918, 22672, 3453, 353, 14705, 8801, 29879, 29889, 29984, 29950, 3313, 3453, 580, 13, 4706, 1583, 29889, 3757, 29918, 22672, 3453, 29889, 842, 2061, 1170, 703, 3757, 29918, 22672, 3453, 1159, 13, 4706, 1583, 29889, 7290, 29918, 3757, 29918, 2622, 29918, 497, 353, 14705, 8801, 29879, 29889, 29984, 27031, 3125, 29898, 1311, 29889, 3757, 29918, 3891, 29897, 13, 4706, 1583, 29889, 7290, 29918, 3757, 29918, 2622, 29918, 497, 29889, 842, 2061, 1170, 703, 7290, 29918, 3757, 29918, 2622, 29918, 497, 1159, 13, 4706, 1583, 29889, 3757, 29918, 22672, 3453, 29889, 1202, 8801, 29898, 1311, 29889, 7290, 29918, 3757, 29918, 2622, 29918, 497, 29897, 13, 4706, 1583, 29889, 7290, 29918, 3757, 22205, 353, 14705, 8801, 29879, 29889, 29984, 27031, 3125, 29898, 1311, 29889, 3757, 29918, 3891, 29897, 13, 4706, 1583, 29889, 7290, 29918, 3757, 22205, 29889, 842, 2061, 1170, 703, 7290, 29918, 3757, 22205, 1159, 13, 4706, 1583, 29889, 3757, 29918, 22672, 3453, 29889, 1202, 8801, 29898, 1311, 29889, 7290, 29918, 3757, 22205, 29897, 13, 4706, 1583, 29889, 7290, 29918, 3757, 29918, 8143, 353, 14705, 8801, 29879, 29889, 29984, 27031, 3125, 29898, 1311, 29889, 3757, 29918, 3891, 29897, 13, 4706, 1583, 29889, 7290, 29918, 3757, 29918, 8143, 29889, 842, 2061, 1170, 703, 7290, 29918, 3757, 29918, 8143, 1159, 13, 4706, 1583, 29889, 3757, 29918, 22672, 3453, 29889, 1202, 8801, 29898, 1311, 29889, 7290, 29918, 3757, 29918, 8143, 29897, 13, 4706, 1583, 29889, 3757, 29918, 22672, 3453, 29889, 1202, 855, 10301, 29898, 29896, 29897, 13, 4706, 1583, 29889, 7290, 29918, 3757, 29918, 14941, 353, 14705, 8801, 29879, 29889, 29984, 27031, 3125, 29898, 1311, 29889, 3757, 29918, 3891, 29897, 13, 4706, 1583, 29889, 7290, 29918, 3757, 29918, 14941, 29889, 842, 2061, 1170, 703, 7290, 29918, 3757, 29918, 14941, 1159, 13, 4706, 1583, 29889, 3757, 29918, 22672, 3453, 29889, 1202, 8801, 29898, 1311, 29889, 7290, 29918, 3757, 29918, 14941, 29897, 13, 4706, 1583, 29889, 7290, 29918, 3757, 22205, 29918, 497, 353, 14705, 8801, 29879, 29889, 29984, 27031, 3125, 29898, 1311, 29889, 3757, 29918, 3891, 29897, 13, 4706, 1583, 29889, 7290, 29918, 3757, 22205, 29918, 497, 29889, 842, 2061, 1170, 703, 7290, 29918, 3757, 22205, 29918, 497, 1159, 13, 4706, 1583, 29889, 3757, 29918, 22672, 3453, 29889, 1202, 8801, 29898, 1311, 29889, 7290, 29918, 3757, 22205, 29918, 497, 29897, 13, 4706, 1583, 29889, 7290, 29918, 3757, 29918, 4548, 533, 29918, 5325, 353, 14705, 8801, 29879, 29889, 29984, 27031, 3125, 29898, 1311, 29889, 3757, 29918, 3891, 29897, 13, 4706, 1583, 29889, 7290, 29918, 3757, 29918, 4548, 533, 29918, 5325, 29889, 842, 2061, 1170, 703, 7290, 29918, 3757, 29918, 4548, 533, 29918, 5325, 1159, 13, 4706, 1583, 29889, 3757, 29918, 22672, 3453, 29889, 1202, 8801, 29898, 1311, 29889, 7290, 29918, 3757, 29918, 4548, 533, 29918, 5325, 29897, 13, 4706, 1583, 29889, 3757, 29918, 18575, 3453, 29889, 1202, 3453, 29898, 1311, 29889, 3757, 29918, 22672, 3453, 29897, 13, 4706, 1583, 29889, 2371, 29918, 3757, 353, 14705, 8801, 29879, 29889, 29984, 3562, 1043, 29898, 1311, 29889, 3757, 29918, 3891, 29897, 13, 4706, 1583, 29889, 2371, 29918, 3757, 29889, 842, 2061, 1170, 703, 2371, 29918, 3757, 1159, 13, 4706, 1583, 29889, 3757, 29918, 18575, 3453, 29889, 1202, 8801, 29898, 1311, 29889, 2371, 29918, 3757, 29897, 13, 4706, 1583, 29889, 3891, 8801, 29889, 1202, 8863, 29898, 1311, 29889, 3757, 29918, 3891, 29892, 20569, 13, 13, 4706, 1583, 29889, 9057, 29879, 29918, 3891, 353, 14705, 8801, 29879, 29889, 29984, 8801, 580, 13, 4706, 1583, 29889, 9057, 29879, 29918, 3891, 29889, 842, 2061, 1170, 703, 9057, 29879, 29918, 3891, 1159, 13, 4706, 1583, 29889, 9057, 29879, 29918, 18575, 3453, 353, 14705, 8801, 29879, 29889, 29984, 29963, 3313, 3453, 29898, 1311, 29889, 9057, 29879, 29918, 3891, 29897, 13, 4706, 1583, 29889, 9057, 29879, 29918, 18575, 3453, 29889, 842, 2061, 1170, 703, 9057, 29879, 29918, 18575, 3453, 1159, 13, 4706, 1583, 29889, 9057, 29879, 29918, 22672, 3453, 353, 14705, 8801, 29879, 29889, 29984, 29950, 3313, 3453, 580, 13, 4706, 1583, 29889, 9057, 29879, 29918, 22672, 3453, 29889, 842, 2061, 1170, 703, 9057, 29879, 29918, 22672, 3453, 1159, 13, 4706, 1583, 29889, 7290, 29918, 9057, 29879, 29918, 2962, 29918, 497, 353, 14705, 8801, 29879, 29889, 29984, 27031, 3125, 29898, 1311, 29889, 9057, 29879, 29918, 3891, 29897, 13, 4706, 1583, 29889, 7290, 29918, 9057, 29879, 29918, 14941, 29918, 497, 353, 14705, 8801, 29879, 29889, 29984, 27031, 3125, 29898, 1311, 29889, 9057, 29879, 29918, 3891, 29897, 13, 4706, 1583, 29889, 9057, 29879, 29918, 22672, 3453, 29889, 1202, 8801, 29898, 1311, 29889, 7290, 29918, 9057, 29879, 29918, 2962, 29918, 497, 29897, 13, 4706, 1583, 29889, 9057, 29879, 29918, 22672, 3453, 29889, 1202, 855, 10301, 29898, 29896, 29897, 13, 4706, 1583, 29889, 9057, 29879, 29918, 22672, 3453, 29889, 1202, 8801, 29898, 1311, 29889, 7290, 29918, 9057, 29879, 29918, 14941, 29918, 497, 29897, 13, 4706, 1583, 29889, 2371, 29918, 9057, 29879, 353, 1619, 3562, 1043, 29898, 1311, 29889, 9057, 29879, 29918, 3891, 29897, 13, 4706, 1583, 29889, 2371, 29918, 9057, 29879, 29889, 842, 2061, 1170, 703, 2371, 29918, 9057, 29879, 1159, 13, 4706, 1583, 29889, 9057, 29879, 29918, 18575, 3453, 29889, 1202, 3453, 29898, 1311, 29889, 9057, 29879, 29918, 22672, 3453, 29897, 13, 4706, 1583, 29889, 9057, 29879, 29918, 18575, 3453, 29889, 1202, 8801, 29898, 1311, 29889, 2371, 29918, 9057, 29879, 29897, 13, 4706, 1583, 29889, 3891, 8801, 29889, 1202, 8863, 29898, 1311, 29889, 9057, 29879, 29918, 3891, 29892, 20569, 13, 13, 4706, 1583, 29889, 18575, 3453, 29889, 1202, 8801, 29898, 1311, 29889, 3891, 8801, 29897, 13, 4706, 4241, 5907, 29889, 842, 23369, 1705, 8801, 29898, 1311, 29889, 25171, 8030, 29897, 13, 4706, 1583, 29889, 1527, 431, 279, 353, 14705, 8801, 29879, 29889, 29984, 6823, 4297, 29898, 6330, 5907, 29897, 13, 4706, 1583, 29889, 1527, 431, 279, 29889, 842, 7999, 7843, 29898, 17303, 9203, 29889, 29984, 7364, 29898, 29900, 29892, 29871, 29900, 29892, 29871, 29953, 29946, 29900, 29892, 29871, 29941, 29900, 876, 13, 4706, 1583, 29889, 1527, 431, 279, 29889, 842, 2061, 1170, 703, 1527, 431, 279, 1159, 13, 4706, 1583, 29889, 562, 792, 353, 14705, 8801, 29879, 29889, 29984, 6823, 29898, 1311, 29889, 1527, 431, 279, 29897, 13, 4706, 1583, 29889, 562, 792, 29889, 842, 2061, 1170, 703, 562, 792, 1159, 13, 4706, 1583, 29889, 5325, 353, 14705, 8801, 29879, 29889, 29984, 6823, 29898, 1311, 29889, 1527, 431, 279, 29897, 13, 4706, 1583, 29889, 5325, 29889, 842, 2061, 1170, 703, 5325, 1159, 13, 4706, 1583, 29889, 8477, 353, 14705, 8801, 29879, 29889, 29984, 6823, 29898, 1311, 29889, 1527, 431, 279, 29897, 13, 4706, 1583, 29889, 8477, 29889, 842, 2061, 1170, 703, 8477, 1159, 13, 4706, 4241, 5907, 29889, 842, 6823, 4297, 29898, 1311, 29889, 1527, 431, 279, 29897, 13, 4706, 1583, 29889, 4882, 1646, 353, 14705, 8801, 29879, 29889, 29984, 5709, 4297, 29898, 6330, 5907, 29897, 13, 4706, 1583, 29889, 4882, 1646, 29889, 842, 2061, 1170, 703, 4882, 1646, 1159, 13, 4706, 4241, 5907, 29889, 842, 5709, 4297, 29898, 1311, 29889, 4882, 1646, 29897, 13, 4706, 1583, 29889, 10154, 1646, 353, 14705, 8801, 29879, 29889, 29984, 12229, 4297, 29898, 6330, 5907, 29897, 13, 4706, 1583, 29889, 10154, 1646, 29889, 842, 2061, 1170, 703, 10154, 1646, 1159, 13, 4706, 4241, 5907, 29889, 1202, 12229, 4297, 29898, 17303, 9203, 29889, 17303, 29889, 7031, 12229, 4297, 13799, 29892, 1583, 29889, 10154, 1646, 29897, 13, 4706, 1583, 29889, 7507, 353, 14705, 8801, 29879, 29889, 29984, 4276, 29898, 6330, 5907, 29897, 13, 4706, 1583, 29889, 7507, 29889, 842, 2061, 1170, 703, 7507, 1159, 13, 4706, 1583, 29889, 1188, 449, 353, 14705, 8801, 29879, 29889, 29984, 4276, 29898, 6330, 5907, 29897, 13, 4706, 1583, 29889, 1188, 449, 29889, 842, 2061, 1170, 703, 1188, 449, 1159, 13, 4706, 1583, 29889, 9009, 353, 14705, 8801, 29879, 29889, 29984, 4276, 29898, 6330, 5907, 29897, 13, 4706, 1583, 29889, 9009, 29889, 842, 2061, 1170, 703, 9009, 1159, 13, 4706, 1583, 29889, 10382, 353, 14705, 8801, 29879, 29889, 29984, 4276, 29898, 6330, 5907, 29897, 13, 4706, 1583, 29889, 10382, 29889, 842, 2061, 1170, 703, 10382, 1159, 13, 4706, 1583, 29889, 8143, 353, 14705, 8801, 29879, 29889, 29984, 4276, 29898, 6330, 5907, 29897, 13, 4706, 1583, 29889, 8143, 29889, 842, 2061, 1170, 703, 8143, 1159, 13, 4706, 1583, 29889, 3525, 353, 14705, 8801, 29879, 29889, 29984, 4276, 29898, 6330, 5907, 29897, 13, 4706, 1583, 29889, 3525, 29889, 842, 2061, 1170, 703, 3525, 1159, 13, 4706, 1583, 29889, 12717, 353, 14705, 8801, 29879, 29889, 29984, 4276, 29898, 6330, 5907, 29897, 13, 4706, 1583, 29889, 12717, 29889, 842, 2061, 1170, 703, 12717, 1159, 13, 4706, 1583, 29889, 562, 792, 29889, 1202, 2008, 17954, 580, 13, 4706, 1583, 29889, 562, 792, 29889, 1202, 4276, 29898, 1311, 29889, 7507, 29897, 13, 4706, 1583, 29889, 562, 792, 29889, 1202, 4276, 29898, 1311, 29889, 1188, 449, 29897, 13, 4706, 1583, 29889, 5325, 29889, 1202, 4276, 29898, 1311, 29889, 9009, 29897, 13, 4706, 1583, 29889, 5325, 29889, 1202, 4276, 29898, 1311, 29889, 10382, 29897, 13, 4706, 1583, 29889, 5325, 29889, 1202, 4276, 29898, 1311, 29889, 8143, 29897, 13, 4706, 1583, 29889, 8477, 29889, 1202, 4276, 29898, 1311, 29889, 3525, 29897, 13, 4706, 1583, 29889, 8477, 29889, 1202, 4276, 29898, 1311, 29889, 12717, 29897, 13, 4706, 1583, 29889, 1527, 431, 279, 29889, 1202, 4276, 29898, 1311, 29889, 562, 792, 29889, 6510, 4276, 3101, 13, 4706, 1583, 29889, 1527, 431, 279, 29889, 1202, 4276, 29898, 1311, 29889, 5325, 29889, 6510, 4276, 3101, 13, 4706, 1583, 29889, 1527, 431, 279, 29889, 1202, 4276, 29898, 1311, 29889, 8477, 29889, 6510, 4276, 3101, 13, 13, 4706, 396, 29871, 31531, 31613, 233, 163, 146, 13, 4706, 1583, 29889, 4882, 1646, 29918, 7645, 29918, 1643, 353, 14705, 8801, 29879, 29889, 2239, 1107, 580, 13, 4706, 1583, 29889, 4882, 1646, 29918, 1359, 29918, 27728, 353, 14705, 8801, 29879, 29889, 2239, 1107, 580, 13, 4706, 1583, 29889, 4882, 1646, 29918, 1359, 29918, 27362, 353, 14705, 28707, 29889, 29984, 18749, 703, 4351, 29914, 13234, 29918, 5514, 29889, 18660, 1159, 13, 4706, 1583, 29889, 4882, 1646, 29918, 1359, 29918, 27362, 29889, 842, 4421, 7943, 3505, 29898, 17303, 9203, 29889, 29984, 3505, 29898, 29906, 29946, 29892, 29871, 29906, 29946, 876, 13, 4706, 1583, 29889, 4882, 1646, 29918, 1359, 29918, 27728, 29889, 842, 18749, 29898, 1311, 29889, 4882, 1646, 29918, 1359, 29918, 27362, 29897, 13, 4706, 1583, 29889, 4882, 1646, 29918, 7645, 29918, 1643, 29889, 842, 2061, 1170, 703, 7645, 29918, 1643, 1159, 13, 4706, 1583, 29889, 4882, 1646, 29918, 1359, 29918, 27728, 29889, 842, 2061, 1170, 703, 7645, 29918, 27362, 29918, 27728, 1159, 13, 4706, 1583, 29889, 4882, 1646, 29889, 1202, 8801, 29898, 1311, 29889, 4882, 1646, 29918, 1359, 29918, 27728, 29897, 13, 4706, 1583, 29889, 4882, 1646, 29889, 1202, 8801, 29898, 1311, 29889, 4882, 1646, 29918, 7645, 29918, 1643, 29897, 13, 13, 4706, 1583, 29889, 276, 21652, 29965, 29875, 29898, 6330, 5907, 29897, 13, 4706, 1583, 29889, 3891, 8801, 29889, 842, 7583, 3220, 29898, 29896, 29897, 13, 4706, 14705, 9203, 29889, 29984, 19346, 2061, 29889, 6915, 16973, 1862, 2059, 1170, 29898, 6330, 5907, 29897, 13, 13, 1678, 822, 337, 21652, 29965, 29875, 29898, 1311, 29892, 4241, 5907, 1125, 13, 4706, 903, 21652, 353, 14705, 9203, 29889, 29984, 9203, 4873, 29889, 21652, 13, 4706, 4241, 5907, 29889, 842, 5907, 7030, 7373, 21652, 703, 6330, 5907, 613, 376, 6330, 5907, 5783, 13, 4706, 1583, 29889, 1643, 29918, 13653, 29918, 2271, 29889, 12038, 7373, 21652, 703, 6330, 5907, 613, 376, 235, 150, 160, 232, 168, 146, 236, 150, 193, 31092, 5783, 13, 4706, 1583, 29889, 7290, 29918, 21111, 29889, 12038, 7373, 21652, 703, 6330, 5907, 613, 376, 31302, 30683, 5783, 13, 4706, 1583, 29889, 7290, 29918, 13653, 29918, 2622, 29918, 497, 29889, 12038, 7373, 21652, 703, 6330, 5907, 613, 376, 30753, 31333, 5783, 13, 4706, 1583, 29889, 1643, 29918, 11671, 29918, 2084, 29889, 12038, 7373, 21652, 703, 6330, 5907, 613, 376, 30333, 30631, 30557, 31526, 30874, 232, 193, 135, 5783, 13, 4706, 1583, 29889, 7290, 29918, 13653, 29918, 11671, 29889, 12038, 7373, 21652, 703, 6330, 5907, 613, 376, 30557, 31526, 31333, 30275, 30333, 30631, 5783, 13, 4706, 1583, 29889, 3891, 8801, 29889, 842, 8863, 1626, 29898, 1311, 29889, 3891, 8801, 29889, 19402, 29898, 1311, 29889, 13653, 29918, 3891, 511, 903, 21652, 703, 6330, 5907, 613, 376, 235, 150, 160, 232, 168, 146, 31784, 236, 150, 193, 31092, 31302, 30683, 5783, 13, 4706, 1583, 29889, 1643, 29918, 20960, 29918, 2029, 29889, 12038, 7373, 21652, 703, 6330, 5907, 613, 376, 30956, 30669, 5783, 13, 4706, 1583, 29889, 7290, 29918, 20960, 29918, 11256, 3972, 29889, 12038, 7373, 21652, 703, 6330, 5907, 613, 376, 30374, 30886, 30333, 30631, 232, 167, 188, 5783, 13, 4706, 1583, 29889, 7290, 29918, 20960, 29918, 2622, 29918, 497, 29889, 12038, 7373, 21652, 703, 6330, 5907, 613, 376, 30753, 31333, 5783, 13, 4706, 1583, 29889, 7290, 29918, 20960, 29918, 8143, 29889, 12038, 7373, 21652, 703, 6330, 5907, 613, 376, 31916, 31152, 5783, 13, 4706, 1583, 29889, 7290, 29918, 20960, 29918, 11671, 29889, 12038, 7373, 21652, 703, 6330, 5907, 613, 376, 30557, 31526, 5783, 13, 4706, 1583, 29889, 3891, 8801, 29889, 842, 8863, 1626, 29898, 1311, 29889, 3891, 8801, 29889, 19402, 29898, 1311, 29889, 20960, 29918, 3891, 511, 903, 21652, 703, 6330, 5907, 613, 376, 30672, 30210, 235, 150, 160, 232, 168, 146, 31784, 5783, 13, 4706, 1583, 29889, 7290, 29918, 3757, 29918, 2622, 29918, 497, 29889, 12038, 7373, 21652, 703, 6330, 5907, 613, 376, 30753, 31333, 5783, 13, 4706, 1583, 29889, 7290, 29918, 3757, 22205, 29889, 12038, 7373, 21652, 703, 6330, 5907, 613, 376, 31994, 30667, 5783, 13, 4706, 1583, 29889, 7290, 29918, 3757, 29918, 8143, 29889, 12038, 7373, 21652, 703, 6330, 5907, 613, 376, 232, 192, 190, 232, 189, 152, 31916, 31152, 5783, 13, 4706, 1583, 29889, 7290, 29918, 3757, 29918, 14941, 29889, 12038, 7373, 21652, 703, 6330, 5907, 613, 376, 30989, 30816, 30742, 31997, 31433, 5783, 13, 4706, 1583, 29889, 7290, 29918, 3757, 22205, 29918, 497, 29889, 12038, 7373, 21652, 703, 6330, 5907, 613, 376, 30753, 30636, 31994, 30667, 5783, 13, 4706, 1583, 29889, 7290, 29918, 3757, 29918, 4548, 533, 29918, 5325, 29889, 12038, 7373, 21652, 703, 6330, 5907, 613, 376, 31138, 31117, 30333, 30631, 5783, 13, 4706, 1583, 29889, 3891, 8801, 29889, 842, 8863, 1626, 29898, 1311, 29889, 3891, 8801, 29889, 19402, 29898, 1311, 29889, 3757, 29918, 3891, 511, 903, 21652, 703, 6330, 5907, 613, 376, 30742, 31997, 31433, 5783, 13, 4706, 1583, 29889, 7290, 29918, 9057, 29879, 29918, 2962, 29918, 497, 29889, 12038, 7373, 21652, 703, 6330, 5907, 613, 376, 31026, 31020, 30744, 30417, 31450, 31358, 5783, 13, 4706, 1583, 29889, 7290, 29918, 9057, 29879, 29918, 14941, 29918, 497, 29889, 12038, 7373, 21652, 703, 6330, 5907, 613, 376, 31916, 31152, 31290, 31366, 30494, 31450, 31358, 5783, 13, 4706, 1583, 29889, 3891, 8801, 29889, 842, 8863, 1626, 29898, 1311, 29889, 3891, 8801, 29889, 19402, 29898, 1311, 29889, 9057, 29879, 29918, 3891, 511, 903, 21652, 703, 6330, 5907, 613, 376, 31450, 31358, 31624, 30687, 5783, 13, 4706, 1583, 29889, 562, 792, 29889, 842, 7030, 7373, 21652, 703, 6330, 5907, 613, 376, 31451, 31283, 5783, 13, 4706, 1583, 29889, 5325, 29889, 842, 7030, 7373, 21652, 703, 6330, 5907, 613, 376, 30333, 30631, 5783, 13, 4706, 1583, 29889, 8477, 29889, 842, 7030, 7373, 21652, 703, 6330, 5907, 613, 376, 232, 187, 177, 31931, 5783, 13, 4706, 1583, 29889, 10154, 1646, 29889, 842, 5907, 7030, 7373, 21652, 703, 6330, 5907, 613, 376, 10154, 4297, 5783, 13, 4706, 1583, 29889, 7507, 29889, 12038, 7373, 21652, 703, 6330, 5907, 613, 376, 31451, 31283, 5783, 13, 4706, 1583, 29889, 1188, 449, 29889, 12038, 7373, 21652, 703, 6330, 5907, 613, 376, 31451, 30544, 5783, 13, 4706, 1583, 29889, 9009, 29889, 12038, 7373, 21652, 703, 6330, 5907, 613, 376, 30429, 31471, 5783, 13, 4706, 1583, 29889, 10382, 29889, 12038, 7373, 21652, 703, 6330, 5907, 613, 376, 30557, 31526, 5783, 13, 4706, 1583, 29889, 8143, 29889, 12038, 7373, 21652, 703, 6330, 5907, 613, 376, 31916, 31152, 5783, 13, 4706, 1583, 29889, 3525, 29889, 12038, 7373, 21652, 703, 6330, 5907, 613, 376, 30785, 30406, 31639, 30592, 5783, 13, 4706, 1583, 29889, 12717, 29889, 12038, 7373, 21652, 703, 6330, 5907, 613, 376, 31057, 30909, 5783, 13, 2 ]
Backend/core/destiny/profile.py
LukasSchmid97/elevatorbot
0
74535
import asyncio import dataclasses import datetime from typing import Optional from anyio import to_thread from sqlalchemy.ext.asyncio import AsyncSession from Backend.core.errors import CustomException from Backend.crud import crud_activities, destiny_manifest, discord_users from Backend.crud.destiny.collectibles import collectibles from Backend.crud.destiny.items import destiny_items from Backend.crud.destiny.records import records from Backend.database.models import ( Collectibles, DestinyPresentationNodeDefinition, DestinyRecordDefinition, DiscordUsers, Records, ) from Backend.misc.cache import cache from Backend.misc.helperFunctions import get_datetime_from_bungie_entry from Backend.networking.bungieApi import BungieApi from Backend.networking.bungieRoutes import clan_user_route, profile_route, stat_route from Shared.enums.destiny import DestinyInventoryBucketEnum, DestinyPresentationNodeWeaponSlotEnum from Shared.functions.formatting import make_progress_bar_text from Shared.functions.helperFunctions import get_now_with_tz from Shared.networkingSchemas import ValueModel from Shared.networkingSchemas.destiny import ( BoolModelObjective, BoolModelRecord, DestinyCatalystModel, DestinyCatalystsModel, DestinyCharacterModel, DestinyCharactersModel, DestinyRecordModel, DestinySealModel, DestinySealsModel, DestinyTriumphScoreModel, SeasonalChallengesModel, SeasonalChallengesRecordModel, SeasonalChallengesTopicsModel, ) from Shared.networkingSchemas.destiny.clan import DestinyClanModel @dataclasses.dataclass class DestinyProfile: """User specific API calls""" db: AsyncSession user: DiscordUsers race_map = {2803282938: "Awoken", 898834093: "Exo", 3887404748: "Human"} gender_map = { 2204441813: "Female", 3111576190: "Male", } class_map = {671679327: "Hunter", 2271682572: "Warlock", 3655393761: "Titan"} _triumphs: dict = dataclasses.field(init=False, default_factory=dict) def __post_init__(self): # some shortcuts self.discord_id = self.user.discord_id self.destiny_id = self.user.destiny_id self.system = self.user.system # the network class self.api = BungieApi(db=self.db, user=self.user) async def get_clan(self) -> DestinyClanModel: """Return the user's clan""" response = await self.api.get(route=clan_user_route.format(destiny_id=self.destiny_id, system=self.system)) results = response.content["results"] if not results: raise CustomException("UserNoClan") return DestinyClanModel(id=results[0]["group"]["groupId"], name=results[0]["group"]["name"]) async def get_seal_completion(self) -> DestinySealsModel: """Gets all seals and the users completion status""" # get the seals seals = await destiny_items.get_seals(db=self.db) # loop through the seals and format the data result = DestinySealsModel() for seal, triumphs in seals.items(): # get user completion user_guilded_completed = [] user_guilded_completed_int = 0 user_completed = [] user_completed_int = 0 for triumph in triumphs: user_data = await self.has_triumph(triumph.reference_id) model = DestinyRecordModel( name=triumph.name, description=triumph.description, completed=user_data.bool, ) # handle guilded triumphs differently if triumph.for_title_gilding: user_guilded_completed.append(model) if user_data.bool: user_guilded_completed_int += 1 else: user_completed.append(model) if user_data.bool: user_completed_int += 1 # normal triumph data completion_percentage = user_completed_int / len(user_completed) data = DestinySealModel( name=seal.name, description=seal.description, completed=True if completion_percentage == 1 else False, completion_percentage=completion_percentage, completion_status=make_progress_bar_text(completion_percentage), records=user_completed, ) # add it to the correct type if data.completed: result.completed.append(data) else: result.not_completed.append(data) # guilded triumph data if user_guilded_completed: completion_percentage = user_guilded_completed_int / len(user_guilded_completed) data = DestinySealModel( name=seal.name, description=seal.description, completed=True if completion_percentage == 1 else False, completion_percentage=completion_percentage, completion_status=make_progress_bar_text(completion_percentage), records=user_guilded_completed, ) # add it to the correct type if data.completed: result.guilded.append(data) else: result.not_guilded.append(data) return result async def get_catalyst_completion(self) -> DestinyCatalystsModel: """Gets all catalysts and the users completion status""" catalysts = await destiny_items.get_catalysts(db=self.db) triumphs = await self.get_triumphs() # check their completion result = DestinyCatalystsModel() for catalyst in catalysts: # get the completion rate if await self.has_triumph(catalyst.reference_id): completion_percentage = 1 else: user_data = triumphs[str(catalyst.reference_id)] if user_data["objectives"] and user_data["objectives"][0]["completionValue"]: i = 0 percentages = [] for part in user_data["objectives"]: i += 1 percentages.append( part["progress"] / part["completionValue"] if part["completionValue"] != 0 else 0 ) completion_percentage = sum(percentages) / len(percentages) else: completion_percentage = 0 model = DestinyCatalystModel( name=catalyst.name, complete=completion_percentage == 1, completion_percentage=completion_percentage, completion_status=make_progress_bar_text(completion_percentage), ) # get the slot and sort them if DestinyPresentationNodeWeaponSlotEnum.KINETIC.value in catalyst.parent_node_hashes: result.kinetic.append(model) elif DestinyPresentationNodeWeaponSlotEnum.ENERGY.value in catalyst.parent_node_hashes: result.energy.append(model) elif DestinyPresentationNodeWeaponSlotEnum.POWER.value in catalyst.parent_node_hashes: result.power.append(model) # add to the total if model.complete: result.completed += 1 return result async def get_used_vault_space(self) -> int: """Gets the current used vault space of the user""" buckets = await self.__get_inventory_bucket(DestinyInventoryBucketEnum.VAULT) return len(buckets[DestinyInventoryBucketEnum.VAULT]) async def get_bright_dust(self) -> int: """Gets the current bright dust of the user""" return await self.__get_currency_amount(bucket=DestinyInventoryBucketEnum.BRIGHT_DUST) async def get_legendary_shards(self) -> int: """Gets the current legendary shards of the user""" return await self.__get_currency_amount(bucket=DestinyInventoryBucketEnum.SHARDS) async def get_consumable_amount(self, consumable_id: int) -> int: """Returns the amount of a consumable this user has""" buckets = await self.__get_inventory_bucket( DestinyInventoryBucketEnum.VAULT, DestinyInventoryBucketEnum.CONSUMABLES ) # get the value value = 0 for bucket in buckets.values(): if consumable_id in bucket: value += bucket[consumable_id]["quantity"] return value async def get_max_power(self) -> float: """Returns the max power of the user""" char_data = await self.__get_all_inventory_bucket(include_item_level=True) # look at each character max_power = await to_thread.run_sync(get_max_power_subprocess, char_data) return max_power async def get_last_online(self) -> datetime.datetime: """Returns the last online time""" result = await self.__get_profile() return get_datetime_from_bungie_entry(result["profile"]["data"]["dateLastPlayed"]) async def get_triumph_score(self) -> DestinyTriumphScoreModel: """Returns the triumph score""" triumphs_data = await self.get_triumphs() return DestinyTriumphScoreModel( active_score=triumphs_data["active_score"], legacy_score=triumphs_data["legacy_score"], lifetime_score=triumphs_data["lifetime_score"], ) async def has_triumph(self, triumph_hash: str | int) -> BoolModelRecord: """Returns if the triumph is gotten""" triumph_hash = int(triumph_hash) # check cache async with asyncio.Lock(): if self.destiny_id not in cache.triumphs: cache.triumphs.update({self.destiny_id: {}}) if triumph_hash not in cache.triumphs[self.destiny_id]: # check if the last update is older than 10 minutes if self._triumphs and ( self.user.triumphs_last_updated + datetime.timedelta(minutes=10) > get_now_with_tz() ): sought_triumph = self._triumphs[str(triumph_hash)] else: # get from db and return that if it says user got the triumph result = await records.has_record(db=self.db, destiny_id=self.destiny_id, triumph_hash=triumph_hash) if result: # only caching already got triumphs cache.triumphs[self.destiny_id].update({triumph_hash: True}) return BoolModelRecord(bool=True) # alright, the user doesn't have the triumph, at least not in the db. So let's update the db entries triumphs_data = await self.get_triumphs() to_insert = [] sought_triumph = {} # loop through all triumphs and add them / update them in the db for triumph_id, triumph_info in triumphs_data.items(): try: triumph_id = int(triumph_id) except ValueError: # this is the "active_score", ... fields continue if triumph_id in cache.triumphs[self.destiny_id]: continue # does the entry exist in the db? # we don't need to re calc the state if its already marked as earned in the db result = await records.get_record( db=self.db, destiny_id=self.destiny_id, triumph_hash=triumph_id ) if result and result.completed: cache.triumphs[self.destiny_id].update({triumph_id: True}) continue # calculate if the triumph is gotten and save the triumph we are looking for status = True if "objectives" not in triumph_info: # make sure it's RewardUnavailable aka legacy assert triumph_info["state"] & 2 # https://bungie-net.github.io/multi/schema_Destiny-DestinyRecordState.html#schema_Destiny-DestinyRecordState status &= triumph_info["state"] & 1 else: for part in triumph_info["objectives"]: status &= part["complete"] # is this the triumph we are looking for? if triumph_id == triumph_hash: sought_triumph = triumph_info # don't really need to insert not-gained triumphs if status: cache.triumphs[self.destiny_id].update({triumph_id: True}) # do we need to update or insert? if not result: # insert to_insert.append( Records(destiny_id=self.destiny_id, record_id=triumph_id, completed=True) ) else: # update await records.update_record(db=self.db, obj=result, completed=True) # mass insert the missing entries if to_insert: await records.insert_records(db=self.db, objs=to_insert) # save the update time await discord_users.update(db=self.db, to_update=self.user, triumphs_last_updated=get_now_with_tz()) # now check again if its completed if triumph_hash in cache.triumphs[self.destiny_id]: return BoolModelRecord(bool=True) # if not, return the data with the objectives info result = BoolModelRecord(bool=False) if "objectives" in sought_triumph: for part in sought_triumph["objectives"]: result.objectives.append(BoolModelObjective(objective_id=part["objectiveHash"], bool=part["complete"])) return result async def has_collectible(self, collectible_hash: str | int) -> bool: """Returns if the collectible is gotten""" collectible_hash = int(collectible_hash) # check cache async with asyncio.Lock(): if self.destiny_id not in cache.collectibles: cache.collectibles.update({self.destiny_id: {}}) if collectible_hash not in cache.collectibles[self.destiny_id]: # check if the last update is older than 10 minutes if self.user.collectibles_last_updated + datetime.timedelta(minutes=10) > get_now_with_tz(): return False # get from db and return that if it says user got the collectible result = await collectibles.has_collectible( db=self.db, destiny_id=self.destiny_id, collectible_hash=collectible_hash ) if result: # only caching already got collectibles cache.collectibles[self.destiny_id].update({collectible_hash: True}) return True # as with the triumphs, we need to update our local collectible data now collectibles_data = await self.get_collectibles() to_insert = [] # loop through the collectibles for collectible_id, collectible_info in collectibles_data.items(): collectible_id = int(collectible_id) if collectible_id in cache.collectibles[self.destiny_id]: continue # does the entry exist in the db? # we don't need to re calc the state if its already marked as owned in the db result = await collectibles.get_collectible( db=self.db, destiny_id=self.destiny_id, collectible_hash=collectible_id ) if result and result.owned: cache.collectibles[self.destiny_id].update({collectible_id: True}) continue # bit 1 not being set means the collectible is gotten # see https://bungie-net.github.io/multi/schema_Destiny-DestinyCollectibleState.html#schema_Destiny-DestinyCollectibleState status = collectible_info["state"] & 1 == 0 # don't really need to insert not-owned collectibles if status: cache.collectibles[self.destiny_id].update({collectible_id: True}) # do we need to update or insert? if not result: # insert to_insert.append( Collectibles(destiny_id=self.destiny_id, collectible_id=collectible_id, owned=True) ) else: # update await collectibles.update_collectible(db=self.db, obj=result, owned=True) # mass insert the missing entries if to_insert: await collectibles.insert_collectibles(db=self.db, objs=to_insert) # save the update time await discord_users.update(db=self.db, to_update=self.user, collectibles_last_updated=get_now_with_tz()) # now check again if its owned if collectible_hash in cache.collectibles[self.destiny_id]: return True else: return False async def get_metric_value(self, metric_hash: str | int) -> int: """Returns the value of the given metric hash""" metric_hash = str(metric_hash) metrics = await self.get_metrics() try: return metrics[metric_hash]["objectiveProgress"]["progress"] except KeyError: raise CustomException("BungieDestinyItemNotExist") async def get_stat_value( self, stat_name: str, stat_category: str = "allTime", character_id: Optional[int | str] = None, ) -> int | float: """Returns the value of the given stat. Int if no decimals, else float""" possible_stat_categories = [ "allTime", "allPvE", "allPvP", ] assert stat_category in possible_stat_categories, f"Stat must be one of {possible_stat_categories}" topic = "merged" if stat_category == "allTime" else "results" stats = await self.get_stats() # character stats if character_id: found = False for char in stats["characters"]: if char["characterId"] == str(character_id): stats = char found = True if not found: raise CustomException("CharacterIdNotFound") # total stats else: stats = stats["mergedAllCharacters"] stats = stats[topic][stat_category] if stat_category != "allTime": stats = stats["allTime"] stat: float = stats[stat_name]["basic"]["value"] return int(stat) if stat.is_integer() else stat async def get_artifact_level(self) -> ValueModel: """Returns the seasonal artifact data""" result = await self.__get_profile() return ValueModel(value=result["profileProgression"]["data"]["seasonalArtifact"]["powerBonus"]) async def get_season_pass_level(self) -> ValueModel: """Returns the seasonal pass level""" # get the current season pass hash async with asyncio.Lock(): if not cache.season_pass_definition: cache.season_pass_definition = await destiny_manifest.get_current_season_pass(db=self.db) # get a character id since they are character specific character_id = (await self.get_character_ids())[0] result = await self.__get_profile() character_data = result["characterProgressions"]["data"][str(character_id)]["progressions"] return ValueModel( value=character_data[str(cache.season_pass_definition.reward_progression_hash)]["level"] + character_data[str(cache.season_pass_definition.prestige_progression_hash)]["level"] ) async def get_seasonal_challenges(self) -> SeasonalChallengesModel: """Returns the seasonal challenges completion info""" # do we have the info cached? async with asyncio.Lock(): if not cache.seasonal_challenges_definition: definition = SeasonalChallengesModel() # get the info from the db sc_category_hash = 3443694067 sc_presentation_node = await destiny_manifest.get( db=self.db, table=DestinyPresentationNodeDefinition, primary_key=sc_category_hash ) # loop through those categories and get the "Weekly" one for category_hash in sc_presentation_node.children_presentation_node_hash: category = await destiny_manifest.get( db=self.db, table=DestinyPresentationNodeDefinition, primary_key=category_hash ) if category.name == "Weekly": # loop through the seasonal challenges topics (Week1, Week2, etc...) for sc_topic_hash in category.children_presentation_node_hash: sc_topic = await destiny_manifest.get( db=self.db, table=DestinyPresentationNodeDefinition, primary_key=sc_topic_hash ) topic = SeasonalChallengesTopicsModel(name=sc_topic.name) # loop through the actual seasonal challenges for sc_hash in sc_topic.children_record_hash: sc = await destiny_manifest.get( db=self.db, table=DestinyRecordDefinition, primary_key=sc_hash ) topic.seasonal_challenges.append( SeasonalChallengesRecordModel( record_id=sc.reference_id, name=sc.name, description=sc.description ) ) definition.topics.append(topic) break cache.seasonal_challenges_definition = definition user_sc = cache.seasonal_challenges_definition.copy() user_records = await self.get_triumphs() # now calculate the members completions status user_sc = await to_thread.run_sync(get_seasonal_challenges_subprocess, user_sc, user_records) return user_sc async def get_character_id_by_class(self, character_class: str) -> Optional[int]: """Return the matching character id if exists""" # make sure the class exists class_names = list(self.class_map.values()) if character_class not in class_names: return None # loop through the chars and return the matching one characters = await self.get_character_info() if characters: for character_data in characters.characters: if character_data.character_class == character_class: return character_data.character_id return None async def get_character_ids(self) -> list[int]: """Return the character ids only""" characters = await self.get_character_info() ids = [] if characters: for character_data in characters.characters: ids.append(character_data.character_id) return ids async def get_character_info(self) -> DestinyCharactersModel: """Get character info""" characters = DestinyCharactersModel() result = await self.__get_profile() # loop through each character for character_id, character_data in result["characters"]["data"].items(): character_id = int(character_id) # format the data correctly and convert the hashes to strings characters.characters.append( DestinyCharacterModel( character_id=character_id, character_class=self.class_map[character_data["classHash"]], character_race=self.race_map[character_data["raceHash"]], character_gender=self.gender_map[character_data["genderHash"]], ) ) return characters async def get_triumphs(self) -> dict: """Populate the triumphs and then return them""" result = await self.__get_profile() # combine profile and character ones self._triumphs = await to_thread.run_sync(get_triumphs_subprocess, result) return self._triumphs async def get_collectibles(self) -> dict: """Populate the collectibles and then return them""" result = await self.__get_profile() # combine profile and character ones return await to_thread.run_sync(get_collectibles_subprocess, result) async def get_metrics(self) -> dict: """Populate the metrics and then return them""" metrics = await self.__get_profile() return metrics["metrics"]["data"]["metrics"] async def get_stats(self) -> dict: """Get destiny stats""" route = stat_route.format(system=self.system, destiny_id=self.destiny_id) result = await self.api.get(route=route) return result.content async def get_items_in_inventory_bucket(self, bucket: int) -> list: """ Returns all items in bucket. Default is vault hash, for others search "bucket" at https://data.destinysets.com/ Some buckets that are important: Vault: 138197802 """ result = await self.__get_profile() all_items = result["profileInventory"]["data"]["items"] items = [] for item in all_items: if item["bucketHash"] == bucket: items.append(item) return items async def get_time_played( self, start_time: datetime.datetime, end_time: datetime.datetime, mode: int = 0, activity_ids: Optional[list[int]] = None, character_class: Optional[str] = None, ) -> int: """Get the time played (in seconds)""" return await crud_activities.calculate_time_played( db=self.db, destiny_id=self.destiny_id, mode=mode, activity_ids=activity_ids, start_time=start_time, end_time=end_time, character_class=character_class, ) async def __get_inventory_bucket( self, *buckets: DestinyInventoryBucketEnum ) -> dict[DestinyInventoryBucketEnum, dict[int, dict]]: """ Get all the items from an inventory bucket. Default: All buckets Returns: { DestinyInventoryBucketEnum: { item_hash: dict_data, ... }, ... } """ # default is vault if not buckets: buckets = DestinyInventoryBucketEnum.all() result = await self.__get_profile() # only get the items in the correct buckets items = await to_thread.run_sync(get_inventory_bucket_subprocess, result, buckets) return items async def __get_all_inventory_bucket( self, *buckets: DestinyInventoryBucketEnum, include_item_level: bool = False ) -> dict[int, dict[DestinyInventoryBucketEnum, dict[int, dict]]]: """ Get all the items from an inventory bucket. Includes both profile and character. Default: All buckets Includes the power level is asked for under "power_level" Returns: { character_id: { DestinyInventoryBucketEnum: { itemInstanceId: itemComponents_data, ... }, ... }, ... } """ def add_info(result_dict: dict, item: dict, char_id: int): """Func to add the items""" # only get the items in the correct buckets for bucket in buckets: if item["bucketHash"] == bucket.value: if bucket not in result_dict[char_id]: result_dict[char_id].update({bucket: {}}) result_dict[char_id][bucket].update({item["itemInstanceId"]: item}) if include_item_level: try: result_dict[char_id][bucket][item["itemInstanceId"]].update( { "power_level": result["itemComponents"]["instances"]["data"][ item["itemInstanceId"] ]["primaryStat"]["value"] } ) except KeyError: pass break # default is vault if not buckets: buckets = DestinyInventoryBucketEnum.all() result = await self.__get_profile() items = {} # first get the character ids and their class character_ids = {} for character_id, character_data in result["characters"]["data"].items(): class_type = character_data["classType"] if class_type not in character_ids: character_ids.update({class_type: [int(character_id)]}) else: character_ids[class_type].append(int(character_id)) # get character inventory for character_id, character_data in result["characterInventories"]["data"].items(): character_id = int(character_id) if character_id not in items: items.update({character_id: {}}) for inv_item in character_data["items"]: await to_thread.run_sync(add_info, items, inv_item, character_id) # get character equipped for character_id, character_data in result["characterEquipment"]["data"].items(): character_id = int(character_id) for inv_item in character_data["items"]: await to_thread.run_sync(add_info, items, inv_item, character_id) # get stuff in vault that is character specific for profile_data in result["profileInventory"]["data"]["items"]: # only check if it has a instance id and is in the correct bucket if ( profile_data["bucketHash"] == DestinyInventoryBucketEnum.VAULT.value and "itemInstanceId" in profile_data ): # get the character class and actual bucket hash from the item id definition = await destiny_items.get_item(db=self.db, item_id=profile_data["itemHash"]) profile_data["bucketHash"] = definition.bucket_type_hash # try to catch users which deleted their warlock but still have warlock items if definition.class_type in character_ids: # add the data to each character actual_character_ids = character_ids[definition.class_type] for actual_character_id in actual_character_ids: await to_thread.run_sync(add_info, items, profile_data, actual_character_id) return items async def __get_profile(self) -> dict: """ Return info from the profile call https://bungie-net.github.io/multi/schema_Destiny-DestinyComponentType.html#schema_Destiny-DestinyComponentType """ # just calling nearly all of them. Don't need all quite yet, but who knows what the future will bring components = ( 100, 101, 102, 103, 104, 105, 200, 201, 202, 204, 205, 300, 301, 302, 304, 305, 306, 307, 400, 401, 402, 500, 600, 700, 800, 900, 1100, ) route = profile_route.format(system=self.system, destiny_id=self.destiny_id) params = {"components": ",".join(map(str, components))} # need to call this with a token, since this data is sensitive response = await self.api.get(route=route, params=params, with_token=True) # get bungie name bungie_name = f"""{response.content["profile"]["data"]["userInfo"]["bungieGlobalDisplayName"]}#{response.content["profile"]["data"]["userInfo"]["bungieGlobalDisplayNameCode"]}""" # update name if different if bungie_name != self.user.bungie_name: await discord_users.update(db=self.db, to_update=self.user, bungie_name=bungie_name) return response.content async def __get_currency_amount(self, bucket: DestinyInventoryBucketEnum) -> int: """Returns the amount of the specified currency owned""" profile = await self.__get_profile() items = profile["profileCurrencies"]["data"]["items"] # get the item with the correct bucket value = 0 for item in items: if item["bucketHash"] == bucket.value: value = item["quantity"] return value def get_max_power_subprocess(char_data: dict) -> int: """Run in anyio subprocess on another thread since this might be slow""" max_power = 0 for character in char_data: helmet = 0 gauntlet = 0 chest = 0 leg = 0 class_item = 0 kinetic = 0 energy = 0 power = 0 for bucket, data in char_data[character].items(): # save the items light level for item_id, item_data in data.items(): match bucket: case DestinyInventoryBucketEnum.HELMET: if item_data["power_level"] > helmet: helmet = item_data["power_level"] case DestinyInventoryBucketEnum.GAUNTLETS: if item_data["power_level"] > gauntlet: gauntlet = item_data["power_level"] case DestinyInventoryBucketEnum.CHEST: if item_data["power_level"] > chest: chest = item_data["power_level"] case DestinyInventoryBucketEnum.LEG: if item_data["power_level"] > leg: leg = item_data["power_level"] case DestinyInventoryBucketEnum.CLASS: if item_data["power_level"] > class_item: class_item = item_data["power_level"] case DestinyInventoryBucketEnum.KINETIC: if item_data["power_level"] > kinetic: kinetic = item_data["power_level"] case DestinyInventoryBucketEnum.ENERGY: if item_data["power_level"] > energy: energy = item_data["power_level"] case DestinyInventoryBucketEnum.POWER: if item_data["power_level"] > power: power = item_data["power_level"] # get the max power char_max_power = (helmet + gauntlet + chest + leg + class_item + kinetic + energy + power) / 8 if char_max_power > max_power: max_power = char_max_power return max_power def get_seasonal_challenges_subprocess(user_sc: SeasonalChallengesModel, user_records: dict) -> SeasonalChallengesModel: """Run in anyio subprocess on another thread since this might be slow""" for topic in user_sc.topics: for sc in topic.seasonal_challenges: record = user_records[str(sc.record_id)] # calculate completion rate rate = [] for objective in record["objectives"]: rate.append(objective["progress"] / objective["completionValue"] if not objective["complete"] else 1) percentage = sum(rate) / len(rate) # make emoji art for completion rate sc.completion_percentage = percentage sc.completion_status = make_progress_bar_text(percentage) return user_sc def get_triumphs_subprocess(result: dict) -> dict: """Run in anyio subprocess on another thread since this might be slow""" # get profile triumphs triumphs = result["profileRecords"]["data"]["records"] triumphs.update( { "active_score": result["profileRecords"]["data"]["activeScore"], "legacy_score": result["profileRecords"]["data"]["legacyScore"], "lifetime_score": result["profileRecords"]["data"]["lifetimeScore"], } ) # get character triumphs character_triumphs = [ character_triumphs["records"] for character_id, character_triumphs in result["characterRecords"]["data"].items() ] # combine them for triumph in character_triumphs: triumphs.update(triumph) return triumphs def get_collectibles_subprocess(result: dict) -> dict: """Run in anyio subprocess on another thread since this might be slow""" # get profile triumphs user_collectibles = result["profileCollectibles"]["data"]["collectibles"] # get character triumphs character_collectibles = [ character_triumphs["collectibles"] for _, character_triumphs in result["characterCollectibles"]["data"].items() ] # combine them for character in character_collectibles: # loop through all the collectibles and only update them if the collectible is earned # see https://bungie-net.github.io/multi/schema_Destiny-DestinyCollectibleState.html#schema_Destiny-DestinyCollectibleState for collectible_hash, collectible_state in character.items(): if collectible_state["state"] & 1 == 0: user_collectibles.update({collectible_hash: collectible_state}) return user_collectibles def get_inventory_bucket_subprocess(result: dict, buckets: list[DestinyInventoryBucketEnum]) -> dict: """Run in anyio subprocess on another thread since this might be slow""" items = {} for item in result["profileInventory"]["data"]["items"]: for bucket in buckets: if item["bucketHash"] == bucket.value: item_hash = int(item["itemHash"]) if bucket not in items: items.update({bucket: {}}) items[bucket].update({item_hash: item}) try: items[bucket][item_hash].update( { "power_level": result["itemComponents"]["instances"]["data"][str(item_hash)]["primaryStat"][ "value" ] } ) except KeyError: pass break return items
[ 1, 1053, 408, 948, 3934, 13, 5215, 848, 13203, 13, 5215, 12865, 13, 3166, 19229, 1053, 28379, 13, 13, 3166, 738, 601, 1053, 304, 29918, 7097, 13, 3166, 4576, 284, 305, 6764, 29889, 1062, 29889, 294, 948, 3934, 1053, 20688, 7317, 13, 13, 3166, 7437, 355, 29889, 3221, 29889, 12523, 1053, 8701, 2451, 13, 3166, 7437, 355, 29889, 7283, 566, 1053, 2181, 566, 29918, 11236, 1907, 29892, 2731, 4901, 29918, 29135, 29892, 2313, 536, 29918, 7193, 13, 3166, 7437, 355, 29889, 7283, 566, 29889, 7854, 4901, 29889, 15914, 13876, 1053, 6314, 13876, 13, 3166, 7437, 355, 29889, 7283, 566, 29889, 7854, 4901, 29889, 7076, 1053, 2731, 4901, 29918, 7076, 13, 3166, 7437, 355, 29889, 7283, 566, 29889, 7854, 4901, 29889, 3757, 4339, 1053, 6475, 13, 3166, 7437, 355, 29889, 9803, 29889, 9794, 1053, 313, 13, 1678, 24930, 13876, 29892, 13, 1678, 15435, 4901, 13504, 9233, 4247, 14683, 29892, 13, 1678, 15435, 4901, 9182, 14683, 29892, 13, 1678, 8565, 536, 5959, 29892, 13, 1678, 7983, 29892, 13, 29897, 13, 3166, 7437, 355, 29889, 29885, 10669, 29889, 8173, 1053, 7090, 13, 3166, 7437, 355, 29889, 29885, 10669, 29889, 20907, 6678, 29879, 1053, 679, 29918, 12673, 29918, 3166, 29918, 29890, 686, 347, 29918, 8269, 13, 3166, 7437, 355, 29889, 11618, 292, 29889, 29890, 686, 347, 11713, 1053, 350, 686, 347, 11713, 13, 3166, 7437, 355, 29889, 11618, 292, 29889, 29890, 686, 347, 24254, 267, 1053, 1067, 273, 29918, 1792, 29918, 13134, 29892, 8722, 29918, 13134, 29892, 1002, 29918, 13134, 13, 3166, 21236, 29889, 264, 6762, 29889, 7854, 4901, 1053, 15435, 4901, 797, 23886, 29933, 2707, 300, 16854, 29892, 15435, 4901, 13504, 9233, 4247, 4806, 481, 265, 29903, 8276, 16854, 13, 3166, 21236, 29889, 12171, 29889, 689, 23980, 1053, 1207, 29918, 18035, 29918, 1646, 29918, 726, 13, 3166, 21236, 29889, 12171, 29889, 20907, 6678, 29879, 1053, 679, 29918, 3707, 29918, 2541, 29918, 17559, 13, 3166, 21236, 29889, 11618, 292, 4504, 8609, 1053, 7865, 3195, 13, 3166, 21236, 29889, 11618, 292, 4504, 8609, 29889, 7854, 4901, 1053, 313, 13, 1678, 18912, 3195, 2061, 573, 29892, 13, 1678, 18912, 3195, 9182, 29892, 13, 1678, 15435, 4901, 29907, 2075, 858, 3195, 29892, 13, 1678, 15435, 4901, 29907, 2075, 858, 29879, 3195, 29892, 13, 1678, 15435, 4901, 20755, 3195, 29892, 13, 1678, 15435, 4901, 5914, 21706, 3195, 29892, 13, 1678, 15435, 4901, 9182, 3195, 29892, 13, 1678, 15435, 4901, 2008, 284, 3195, 29892, 13, 1678, 15435, 4901, 2008, 1338, 3195, 29892, 13, 1678, 15435, 4901, 29911, 16241, 561, 20097, 3195, 29892, 13, 1678, 24791, 284, 1451, 16047, 267, 3195, 29892, 13, 1678, 24791, 284, 1451, 16047, 267, 9182, 3195, 29892, 13, 1678, 24791, 284, 1451, 16047, 267, 7031, 1199, 3195, 29892, 13, 29897, 13, 3166, 21236, 29889, 11618, 292, 4504, 8609, 29889, 7854, 4901, 29889, 695, 273, 1053, 15435, 4901, 29907, 6468, 3195, 13, 13, 13, 29992, 1272, 13203, 29889, 1272, 1990, 13, 1990, 15435, 4901, 13909, 29901, 13, 1678, 9995, 2659, 2702, 3450, 5717, 15945, 29908, 13, 13, 1678, 4833, 29901, 20688, 7317, 13, 1678, 1404, 29901, 8565, 536, 5959, 13, 13, 1678, 8175, 29918, 1958, 353, 426, 29906, 29947, 29900, 29941, 29906, 29947, 29906, 29929, 29941, 29947, 29901, 376, 29909, 29893, 4476, 613, 29871, 29947, 29929, 29947, 29947, 29941, 29946, 29900, 29929, 29941, 29901, 376, 1252, 29877, 613, 29871, 29941, 29947, 29947, 29955, 29946, 29900, 29946, 29955, 29946, 29947, 29901, 376, 29950, 7889, 9092, 13, 1678, 23346, 29918, 1958, 353, 426, 13, 308, 29906, 29906, 29900, 29946, 29946, 29946, 29896, 29947, 29896, 29941, 29901, 376, 29943, 331, 744, 613, 13, 308, 29941, 29896, 29896, 29896, 29945, 29955, 29953, 29896, 29929, 29900, 29901, 376, 29924, 744, 613, 13, 1678, 500, 13, 1678, 770, 29918, 1958, 353, 426, 29953, 29955, 29896, 29953, 29955, 29929, 29941, 29906, 29955, 29901, 376, 29950, 8428, 613, 29871, 29906, 29906, 29955, 29896, 29953, 29947, 29906, 29945, 29955, 29906, 29901, 376, 29956, 279, 908, 613, 29871, 29941, 29953, 29945, 29945, 29941, 29929, 29941, 29955, 29953, 29896, 29901, 376, 29911, 8929, 9092, 13, 13, 1678, 903, 3626, 19149, 29879, 29901, 9657, 353, 848, 13203, 29889, 2671, 29898, 2344, 29922, 8824, 29892, 2322, 29918, 14399, 29922, 8977, 29897, 13, 13, 1678, 822, 4770, 2490, 29918, 2344, 12035, 1311, 1125, 13, 4706, 396, 777, 21697, 29879, 13, 4706, 1583, 29889, 2218, 16090, 29918, 333, 353, 1583, 29889, 1792, 29889, 2218, 16090, 29918, 333, 13, 4706, 1583, 29889, 7854, 4901, 29918, 333, 353, 1583, 29889, 1792, 29889, 7854, 4901, 29918, 333, 13, 4706, 1583, 29889, 5205, 353, 1583, 29889, 1792, 29889, 5205, 13, 13, 4706, 396, 278, 3564, 770, 13, 4706, 1583, 29889, 2754, 353, 350, 686, 347, 11713, 29898, 2585, 29922, 1311, 29889, 2585, 29892, 1404, 29922, 1311, 29889, 1792, 29897, 13, 13, 1678, 7465, 822, 679, 29918, 695, 273, 29898, 1311, 29897, 1599, 15435, 4901, 29907, 6468, 3195, 29901, 13, 4706, 9995, 11609, 278, 1404, 29915, 29879, 1067, 273, 15945, 29908, 13, 13, 4706, 2933, 353, 7272, 1583, 29889, 2754, 29889, 657, 29898, 13134, 29922, 695, 273, 29918, 1792, 29918, 13134, 29889, 4830, 29898, 7854, 4901, 29918, 333, 29922, 1311, 29889, 7854, 4901, 29918, 333, 29892, 1788, 29922, 1311, 29889, 5205, 876, 13, 4706, 2582, 353, 2933, 29889, 3051, 3366, 9902, 3108, 13, 4706, 565, 451, 2582, 29901, 13, 9651, 12020, 8701, 2451, 703, 2659, 3782, 29907, 6468, 1159, 13, 4706, 736, 15435, 4901, 29907, 6468, 3195, 29898, 333, 29922, 9902, 29961, 29900, 29962, 3366, 2972, 3108, 3366, 9688, 12436, 1024, 29922, 9902, 29961, 29900, 29962, 3366, 2972, 3108, 3366, 978, 20068, 13, 13, 1678, 7465, 822, 679, 29918, 344, 284, 29918, 5729, 12757, 29898, 1311, 29897, 1599, 15435, 4901, 2008, 1338, 3195, 29901, 13, 4706, 9995, 29954, 1691, 599, 409, 1338, 322, 278, 4160, 13285, 4660, 15945, 29908, 13, 13, 4706, 396, 679, 278, 409, 1338, 13, 4706, 409, 1338, 353, 7272, 2731, 4901, 29918, 7076, 29889, 657, 29918, 344, 1338, 29898, 2585, 29922, 1311, 29889, 2585, 29897, 13, 13, 4706, 396, 2425, 1549, 278, 409, 1338, 322, 3402, 278, 848, 13, 4706, 1121, 353, 15435, 4901, 2008, 1338, 3195, 580, 13, 4706, 363, 409, 284, 29892, 24124, 29879, 297, 409, 1338, 29889, 7076, 7295, 13, 9651, 396, 679, 1404, 13285, 13, 9651, 1404, 29918, 2543, 789, 287, 29918, 5729, 9446, 353, 5159, 13, 9651, 1404, 29918, 2543, 789, 287, 29918, 5729, 9446, 29918, 524, 353, 29871, 29900, 13, 9651, 1404, 29918, 5729, 9446, 353, 5159, 13, 9651, 1404, 29918, 5729, 9446, 29918, 524, 353, 29871, 29900, 13, 9651, 363, 24124, 297, 24124, 29879, 29901, 13, 18884, 1404, 29918, 1272, 353, 7272, 1583, 29889, 5349, 29918, 3626, 19149, 29898, 3626, 19149, 29889, 5679, 29918, 333, 29897, 13, 18884, 1904, 353, 15435, 4901, 9182, 3195, 29898, 13, 462, 1678, 1024, 29922, 3626, 19149, 29889, 978, 29892, 13, 462, 1678, 6139, 29922, 3626, 19149, 29889, 8216, 29892, 13, 462, 1678, 8676, 29922, 1792, 29918, 1272, 29889, 11227, 29892, 13, 18884, 1723, 13, 13, 18884, 396, 4386, 1410, 789, 287, 24124, 29879, 17587, 13, 18884, 565, 24124, 29889, 1454, 29918, 3257, 29918, 29887, 789, 292, 29901, 13, 462, 1678, 1404, 29918, 2543, 789, 287, 29918, 5729, 9446, 29889, 4397, 29898, 4299, 29897, 13, 462, 1678, 565, 1404, 29918, 1272, 29889, 11227, 29901, 13, 462, 4706, 1404, 29918, 2543, 789, 287, 29918, 5729, 9446, 29918, 524, 4619, 29871, 29896, 13, 13, 18884, 1683, 29901, 13, 462, 1678, 1404, 29918, 5729, 9446, 29889, 4397, 29898, 4299, 29897, 13, 462, 1678, 565, 1404, 29918, 1272, 29889, 11227, 29901, 13, 462, 4706, 1404, 29918, 5729, 9446, 29918, 524, 4619, 29871, 29896, 13, 13, 9651, 396, 4226, 24124, 848, 13, 9651, 13285, 29918, 25376, 482, 353, 1404, 29918, 5729, 9446, 29918, 524, 847, 7431, 29898, 1792, 29918, 5729, 9446, 29897, 13, 9651, 848, 353, 15435, 4901, 2008, 284, 3195, 29898, 13, 18884, 1024, 29922, 344, 284, 29889, 978, 29892, 13, 18884, 6139, 29922, 344, 284, 29889, 8216, 29892, 13, 18884, 8676, 29922, 5574, 565, 13285, 29918, 25376, 482, 1275, 29871, 29896, 1683, 7700, 29892, 13, 18884, 13285, 29918, 25376, 482, 29922, 5729, 12757, 29918, 25376, 482, 29892, 13, 18884, 13285, 29918, 4882, 29922, 5675, 29918, 18035, 29918, 1646, 29918, 726, 29898, 5729, 12757, 29918, 25376, 482, 511, 13, 18884, 6475, 29922, 1792, 29918, 5729, 9446, 29892, 13, 9651, 1723, 13, 13, 9651, 396, 788, 372, 304, 278, 1959, 1134, 13, 9651, 565, 848, 29889, 5729, 9446, 29901, 13, 18884, 1121, 29889, 5729, 9446, 29889, 4397, 29898, 1272, 29897, 13, 9651, 1683, 29901, 13, 18884, 1121, 29889, 1333, 29918, 5729, 9446, 29889, 4397, 29898, 1272, 29897, 13, 13, 9651, 396, 1410, 789, 287, 24124, 848, 13, 9651, 565, 1404, 29918, 2543, 789, 287, 29918, 5729, 9446, 29901, 13, 18884, 13285, 29918, 25376, 482, 353, 1404, 29918, 2543, 789, 287, 29918, 5729, 9446, 29918, 524, 847, 7431, 29898, 1792, 29918, 2543, 789, 287, 29918, 5729, 9446, 29897, 13, 18884, 848, 353, 15435, 4901, 2008, 284, 3195, 29898, 13, 462, 1678, 1024, 29922, 344, 284, 29889, 978, 29892, 13, 462, 1678, 6139, 29922, 344, 284, 29889, 8216, 29892, 13, 462, 1678, 8676, 29922, 5574, 565, 13285, 29918, 25376, 482, 1275, 29871, 29896, 1683, 7700, 29892, 13, 462, 1678, 13285, 29918, 25376, 482, 29922, 5729, 12757, 29918, 25376, 482, 29892, 13, 462, 1678, 13285, 29918, 4882, 29922, 5675, 29918, 18035, 29918, 1646, 29918, 726, 29898, 5729, 12757, 29918, 25376, 482, 511, 13, 462, 1678, 6475, 29922, 1792, 29918, 2543, 789, 287, 29918, 5729, 9446, 29892, 13, 18884, 1723, 13, 13, 18884, 396, 788, 372, 304, 278, 1959, 1134, 13, 18884, 565, 848, 29889, 5729, 9446, 29901, 13, 462, 1678, 1121, 29889, 2543, 789, 287, 29889, 4397, 29898, 1272, 29897, 13, 18884, 1683, 29901, 13, 462, 1678, 1121, 29889, 1333, 29918, 2543, 789, 287, 29889, 4397, 29898, 1272, 29897, 13, 13, 4706, 736, 1121, 13, 13, 1678, 7465, 822, 679, 29918, 16431, 858, 29918, 5729, 12757, 29898, 1311, 29897, 1599, 15435, 4901, 29907, 2075, 858, 29879, 3195, 29901, 13, 4706, 9995, 29954, 1691, 599, 17246, 858, 29879, 322, 278, 4160, 13285, 4660, 15945, 29908, 13, 13, 4706, 17246, 858, 29879, 353, 7272, 2731, 4901, 29918, 7076, 29889, 657, 29918, 16431, 858, 29879, 29898, 2585, 29922, 1311, 29889, 2585, 29897, 13, 4706, 24124, 29879, 353, 7272, 1583, 29889, 657, 29918, 3626, 19149, 29879, 580, 13, 13, 4706, 396, 1423, 1009, 13285, 13, 4706, 1121, 353, 15435, 4901, 29907, 2075, 858, 29879, 3195, 580, 13, 4706, 363, 17246, 858, 297, 17246, 858, 29879, 29901, 13, 9651, 396, 679, 278, 13285, 6554, 13, 9651, 565, 7272, 1583, 29889, 5349, 29918, 3626, 19149, 29898, 16431, 858, 29889, 5679, 29918, 333, 1125, 13, 18884, 13285, 29918, 25376, 482, 353, 29871, 29896, 13, 9651, 1683, 29901, 13, 18884, 1404, 29918, 1272, 353, 24124, 29879, 29961, 710, 29898, 16431, 858, 29889, 5679, 29918, 333, 4638, 13, 13, 18884, 565, 1404, 29918, 1272, 3366, 3318, 3145, 3108, 322, 1404, 29918, 1272, 3366, 3318, 3145, 3108, 29961, 29900, 29962, 3366, 5729, 12757, 1917, 3108, 29901, 13, 462, 1678, 474, 353, 29871, 29900, 13, 462, 1678, 10151, 1179, 353, 5159, 13, 462, 1678, 363, 760, 297, 1404, 29918, 1272, 3366, 3318, 3145, 3108, 29901, 13, 462, 4706, 474, 4619, 29871, 29896, 13, 462, 4706, 10151, 1179, 29889, 4397, 29898, 13, 462, 9651, 760, 3366, 18035, 3108, 847, 760, 3366, 5729, 12757, 1917, 3108, 565, 760, 3366, 5729, 12757, 1917, 3108, 2804, 29871, 29900, 1683, 29871, 29900, 13, 462, 4706, 1723, 13, 462, 1678, 13285, 29918, 25376, 482, 353, 2533, 29898, 25376, 1179, 29897, 847, 7431, 29898, 25376, 1179, 29897, 13, 18884, 1683, 29901, 13, 462, 1678, 13285, 29918, 25376, 482, 353, 29871, 29900, 13, 13, 9651, 1904, 353, 15435, 4901, 29907, 2075, 858, 3195, 29898, 13, 18884, 1024, 29922, 16431, 858, 29889, 978, 29892, 13, 18884, 4866, 29922, 5729, 12757, 29918, 25376, 482, 1275, 29871, 29896, 29892, 13, 18884, 13285, 29918, 25376, 482, 29922, 5729, 12757, 29918, 25376, 482, 29892, 13, 18884, 13285, 29918, 4882, 29922, 5675, 29918, 18035, 29918, 1646, 29918, 726, 29898, 5729, 12757, 29918, 25376, 482, 511, 13, 9651, 1723, 13, 13, 9651, 396, 679, 278, 21497, 322, 2656, 963, 13, 9651, 565, 15435, 4901, 13504, 9233, 4247, 4806, 481, 265, 29903, 8276, 16854, 29889, 29968, 1177, 2544, 2965, 29889, 1767, 297, 17246, 858, 29889, 3560, 29918, 3177, 29918, 8568, 267, 29901, 13, 18884, 1121, 29889, 9089, 7492, 29889, 4397, 29898, 4299, 29897, 13, 9651, 25342, 15435, 4901, 13504, 9233, 4247, 4806, 481, 265, 29903, 8276, 16854, 29889, 1430, 1001, 29954, 29979, 29889, 1767, 297, 17246, 858, 29889, 3560, 29918, 3177, 29918, 8568, 267, 29901, 13, 18884, 1121, 29889, 27548, 29889, 4397, 29898, 4299, 29897, 13, 9651, 25342, 15435, 4901, 13504, 9233, 4247, 4806, 481, 265, 29903, 8276, 16854, 29889, 29925, 9806, 1001, 29889, 1767, 297, 17246, 858, 29889, 3560, 29918, 3177, 29918, 8568, 267, 29901, 13, 18884, 1121, 29889, 13519, 29889, 4397, 29898, 4299, 29897, 13, 13, 9651, 396, 788, 304, 278, 3001, 13, 9651, 565, 1904, 29889, 8835, 29901, 13, 18884, 1121, 29889, 5729, 9446, 4619, 29871, 29896, 13, 13, 4706, 736, 1121, 13, 13, 1678, 7465, 822, 679, 29918, 3880, 29918, 29894, 1292, 29918, 3493, 29898, 1311, 29897, 1599, 938, 29901, 13, 4706, 9995, 29954, 1691, 278, 1857, 1304, 325, 1292, 2913, 310, 278, 1404, 15945, 29908, 13, 13, 4706, 1321, 9737, 353, 7272, 1583, 17255, 657, 29918, 262, 23886, 29918, 21454, 29898, 14994, 4901, 797, 23886, 29933, 2707, 300, 16854, 29889, 20449, 8647, 29897, 13, 13, 4706, 736, 7431, 29898, 2423, 9737, 29961, 14994, 4901, 797, 23886, 29933, 2707, 300, 16854, 29889, 20449, 8647, 2314, 13, 13, 1678, 7465, 822, 679, 29918, 1182, 523, 29918, 29881, 504, 29898, 1311, 29897, 1599, 938, 29901, 13, 4706, 9995, 29954, 1691, 278, 1857, 11785, 19786, 310, 278, 1404, 15945, 29908, 13, 13, 4706, 736, 7272, 1583, 17255, 657, 29918, 26095, 29918, 14506, 29898, 21454, 29922, 14994, 4901, 797, 23886, 29933, 2707, 300, 16854, 29889, 29933, 22789, 3912, 29918, 14849, 1254, 29897, 13, 13, 1678, 7465, 822, 679, 29918, 26172, 653, 29918, 845, 3163, 29898, 1311, 29897, 1599, 938, 29901, 13, 4706, 9995, 29954, 1691, 278, 1857, 15983, 653, 528, 3163, 310, 278, 1404, 15945, 29908, 13, 13, 4706, 736, 7272, 1583, 17255, 657, 29918, 26095, 29918, 14506, 29898, 21454, 29922, 14994, 4901, 797, 23886, 29933, 2707, 300, 16854, 29889, 7068, 1718, 8452, 29897, 13, 13, 1678, 7465, 822, 679, 29918, 25978, 519, 29918, 14506, 29898, 1311, 29892, 11233, 519, 29918, 333, 29901, 938, 29897, 1599, 938, 29901, 13, 4706, 9995, 11609, 29879, 278, 5253, 310, 263, 11233, 519, 445, 1404, 756, 15945, 29908, 13, 13, 4706, 1321, 9737, 353, 7272, 1583, 17255, 657, 29918, 262, 23886, 29918, 21454, 29898, 13, 9651, 15435, 4901, 797, 23886, 29933, 2707, 300, 16854, 29889, 20449, 8647, 29892, 15435, 4901, 797, 23886, 29933, 2707, 300, 16854, 29889, 6007, 14605, 1529, 29933, 17101, 13, 4706, 1723, 13, 13, 4706, 396, 679, 278, 995, 13, 4706, 995, 353, 29871, 29900, 13, 4706, 363, 20968, 297, 1321, 9737, 29889, 5975, 7295, 13, 9651, 565, 11233, 519, 29918, 333, 297, 20968, 29901, 13, 18884, 995, 4619, 20968, 29961, 25978, 519, 29918, 333, 29962, 3366, 22640, 3108, 13, 13, 4706, 736, 995, 13, 13, 1678, 7465, 822, 679, 29918, 3317, 29918, 13519, 29898, 1311, 29897, 1599, 5785, 29901, 13, 4706, 9995, 11609, 29879, 278, 4236, 3081, 310, 278, 1404, 15945, 29908, 13, 13, 4706, 1373, 29918, 1272, 353, 7272, 1583, 17255, 657, 29918, 497, 29918, 262, 23886, 29918, 21454, 29898, 2856, 29918, 667, 29918, 5563, 29922, 5574, 29897, 13, 13, 4706, 396, 1106, 472, 1269, 2931, 13, 4706, 4236, 29918, 13519, 353, 7272, 304, 29918, 7097, 29889, 3389, 29918, 16593, 29898, 657, 29918, 3317, 29918, 13519, 29918, 1491, 5014, 29892, 1373, 29918, 1272, 29897, 13, 13, 4706, 736, 4236, 29918, 13519, 13, 13, 1678, 7465, 822, 679, 29918, 4230, 29918, 14627, 29898, 1311, 29897, 1599, 12865, 29889, 12673, 29901, 13, 4706, 9995, 11609, 29879, 278, 1833, 7395, 931, 15945, 29908, 13, 13, 4706, 1121, 353, 7272, 1583, 17255, 657, 29918, 10185, 580, 13, 4706, 736, 679, 29918, 12673, 29918, 3166, 29918, 29890, 686, 347, 29918, 8269, 29898, 2914, 3366, 10185, 3108, 3366, 1272, 3108, 3366, 1256, 8897, 13454, 287, 20068, 13, 13, 1678, 7465, 822, 679, 29918, 3626, 19149, 29918, 13628, 29898, 1311, 29897, 1599, 15435, 4901, 29911, 16241, 561, 20097, 3195, 29901, 13, 4706, 9995, 11609, 29879, 278, 24124, 8158, 15945, 29908, 13, 13, 4706, 24124, 29879, 29918, 1272, 353, 7272, 1583, 29889, 657, 29918, 3626, 19149, 29879, 580, 13, 13, 4706, 736, 15435, 4901, 29911, 16241, 561, 20097, 3195, 29898, 13, 9651, 6136, 29918, 13628, 29922, 3626, 19149, 29879, 29918, 1272, 3366, 4925, 29918, 13628, 12436, 13, 9651, 25000, 29918, 13628, 29922, 3626, 19149, 29879, 29918, 1272, 3366, 1397, 4135, 29918, 13628, 12436, 13, 9651, 25423, 29918, 13628, 29922, 3626, 19149, 29879, 29918, 1272, 3366, 29880, 361, 5410, 29918, 13628, 12436, 13, 4706, 1723, 13, 13, 1678, 7465, 822, 756, 29918, 3626, 19149, 29898, 1311, 29892, 24124, 29918, 8568, 29901, 851, 891, 938, 29897, 1599, 18912, 3195, 9182, 29901, 13, 4706, 9995, 11609, 29879, 565, 278, 24124, 338, 2355, 841, 15945, 29908, 13, 13, 4706, 24124, 29918, 8568, 353, 938, 29898, 3626, 19149, 29918, 8568, 29897, 13, 13, 4706, 396, 1423, 7090, 13, 4706, 7465, 411, 408, 948, 3934, 29889, 16542, 7295, 13, 9651, 565, 1583, 29889, 7854, 4901, 29918, 333, 451, 297, 7090, 29889, 3626, 19149, 29879, 29901, 13, 18884, 7090, 29889, 3626, 19149, 29879, 29889, 5504, 3319, 1311, 29889, 7854, 4901, 29918, 333, 29901, 426, 24289, 13, 13, 9651, 565, 24124, 29918, 8568, 451, 297, 7090, 29889, 3626, 19149, 29879, 29961, 1311, 29889, 7854, 4901, 29918, 333, 5387, 13, 18884, 396, 1423, 565, 278, 1833, 2767, 338, 9642, 1135, 29871, 29896, 29900, 6233, 13, 18884, 565, 1583, 3032, 3626, 19149, 29879, 322, 313, 13, 462, 1678, 1583, 29889, 1792, 29889, 3626, 19149, 29879, 29918, 4230, 29918, 21402, 718, 12865, 29889, 9346, 287, 2554, 29898, 1195, 2667, 29922, 29896, 29900, 29897, 1405, 679, 29918, 3707, 29918, 2541, 29918, 17559, 580, 13, 462, 1125, 13, 462, 1678, 18365, 29918, 3626, 19149, 353, 1583, 3032, 3626, 19149, 29879, 29961, 710, 29898, 3626, 19149, 29918, 8568, 4638, 13, 13, 18884, 1683, 29901, 13, 462, 1678, 396, 679, 515, 4833, 322, 736, 393, 565, 372, 4083, 1404, 2355, 278, 24124, 13, 462, 1678, 1121, 353, 7272, 6475, 29889, 5349, 29918, 11651, 29898, 2585, 29922, 1311, 29889, 2585, 29892, 2731, 4901, 29918, 333, 29922, 1311, 29889, 7854, 4901, 29918, 333, 29892, 24124, 29918, 8568, 29922, 3626, 19149, 29918, 8568, 29897, 13, 462, 1678, 565, 1121, 29901, 13, 462, 4706, 396, 871, 22488, 2307, 2355, 24124, 29879, 13, 462, 4706, 7090, 29889, 3626, 19149, 29879, 29961, 1311, 29889, 7854, 4901, 29918, 333, 1822, 5504, 3319, 3626, 19149, 29918, 8568, 29901, 5852, 1800, 13, 462, 4706, 736, 18912, 3195, 9182, 29898, 11227, 29922, 5574, 29897, 13, 13, 462, 1678, 396, 394, 1266, 29892, 278, 1404, 1838, 29915, 29873, 505, 278, 24124, 29892, 472, 3203, 451, 297, 278, 4833, 29889, 1105, 1235, 29915, 29879, 2767, 278, 4833, 9976, 13, 462, 1678, 24124, 29879, 29918, 1272, 353, 7272, 1583, 29889, 657, 29918, 3626, 19149, 29879, 580, 13, 462, 1678, 304, 29918, 7851, 353, 5159, 13, 462, 1678, 18365, 29918, 3626, 19149, 353, 6571, 13, 13, 462, 1678, 396, 2425, 1549, 599, 24124, 29879, 322, 788, 963, 847, 2767, 963, 297, 278, 4833, 13, 462, 1678, 363, 24124, 29918, 333, 29892, 24124, 29918, 3888, 297, 24124, 29879, 29918, 1272, 29889, 7076, 7295, 13, 462, 4706, 1018, 29901, 13, 462, 9651, 24124, 29918, 333, 353, 938, 29898, 3626, 19149, 29918, 333, 29897, 13, 462, 4706, 5174, 7865, 2392, 29901, 13, 462, 9651, 396, 445, 338, 278, 376, 4925, 29918, 13628, 613, 2023, 4235, 13, 462, 9651, 6773, 13, 13, 462, 4706, 565, 24124, 29918, 333, 297, 7090, 29889, 3626, 19149, 29879, 29961, 1311, 29889, 7854, 4901, 29918, 333, 5387, 13, 462, 9651, 6773, 13, 13, 462, 4706, 396, 947, 278, 6251, 1863, 297, 278, 4833, 29973, 13, 462, 4706, 396, 591, 1016, 29915, 29873, 817, 304, 337, 22235, 278, 2106, 565, 967, 2307, 10902, 408, 20591, 297, 278, 4833, 13, 462, 4706, 1121, 353, 7272, 6475, 29889, 657, 29918, 11651, 29898, 13, 462, 9651, 4833, 29922, 1311, 29889, 2585, 29892, 2731, 4901, 29918, 333, 29922, 1311, 29889, 7854, 4901, 29918, 333, 29892, 24124, 29918, 8568, 29922, 3626, 19149, 29918, 333, 13, 462, 4706, 1723, 13, 462, 4706, 565, 1121, 322, 1121, 29889, 5729, 9446, 29901, 13, 462, 9651, 7090, 29889, 3626, 19149, 29879, 29961, 1311, 29889, 7854, 4901, 29918, 333, 1822, 5504, 3319, 3626, 19149, 29918, 333, 29901, 5852, 1800, 13, 462, 9651, 6773, 13, 13, 462, 4706, 396, 8147, 565, 278, 24124, 338, 2355, 841, 322, 4078, 278, 24124, 591, 526, 3063, 363, 13, 462, 4706, 4660, 353, 5852, 13, 462, 4706, 565, 376, 3318, 3145, 29908, 451, 297, 24124, 29918, 3888, 29901, 13, 462, 9651, 396, 1207, 1854, 372, 29915, 29879, 390, 809, 538, 2525, 16515, 263, 1335, 25000, 13, 462, 9651, 4974, 24124, 29918, 3888, 3366, 3859, 3108, 669, 29871, 29906, 13, 13, 462, 9651, 396, 2045, 597, 29890, 686, 347, 29899, 1212, 29889, 3292, 29889, 601, 29914, 9910, 29914, 11010, 29918, 14994, 4901, 29899, 14994, 4901, 9182, 2792, 29889, 1420, 29937, 11010, 29918, 14994, 4901, 29899, 14994, 4901, 9182, 2792, 13, 462, 9651, 4660, 7878, 24124, 29918, 3888, 3366, 3859, 3108, 669, 29871, 29896, 13, 13, 462, 4706, 1683, 29901, 13, 462, 9651, 363, 760, 297, 24124, 29918, 3888, 3366, 3318, 3145, 3108, 29901, 13, 462, 18884, 4660, 7878, 760, 3366, 8835, 3108, 13, 13, 462, 4706, 396, 338, 445, 278, 24124, 591, 526, 3063, 363, 29973, 13, 462, 4706, 565, 24124, 29918, 333, 1275, 24124, 29918, 8568, 29901, 13, 462, 9651, 18365, 29918, 3626, 19149, 353, 24124, 29918, 3888, 13, 13, 462, 4706, 396, 1016, 29915, 29873, 2289, 817, 304, 4635, 451, 29899, 29887, 7114, 24124, 29879, 13, 462, 4706, 565, 4660, 29901, 13, 462, 9651, 7090, 29889, 3626, 19149, 29879, 29961, 1311, 29889, 7854, 4901, 29918, 333, 1822, 5504, 3319, 3626, 19149, 29918, 333, 29901, 5852, 1800, 13, 462, 9651, 396, 437, 591, 817, 304, 2767, 470, 4635, 29973, 13, 462, 9651, 565, 451, 1121, 29901, 13, 462, 18884, 396, 4635, 13, 462, 18884, 304, 29918, 7851, 29889, 4397, 29898, 13, 462, 462, 1678, 7983, 29898, 7854, 4901, 29918, 333, 29922, 1311, 29889, 7854, 4901, 29918, 333, 29892, 2407, 29918, 333, 29922, 3626, 19149, 29918, 333, 29892, 8676, 29922, 5574, 29897, 13, 462, 18884, 1723, 13, 13, 462, 9651, 1683, 29901, 13, 462, 18884, 396, 2767, 13, 462, 18884, 7272, 6475, 29889, 5504, 29918, 11651, 29898, 2585, 29922, 1311, 29889, 2585, 29892, 5446, 29922, 2914, 29892, 8676, 29922, 5574, 29897, 13, 13, 462, 1678, 396, 4158, 4635, 278, 4567, 9976, 13, 462, 1678, 565, 304, 29918, 7851, 29901, 13, 462, 4706, 7272, 6475, 29889, 7851, 29918, 3757, 4339, 29898, 2585, 29922, 1311, 29889, 2585, 29892, 704, 1315, 29922, 517, 29918, 7851, 29897, 13, 13, 462, 1678, 396, 4078, 278, 2767, 931, 13, 462, 1678, 7272, 2313, 536, 29918, 7193, 29889, 5504, 29898, 2585, 29922, 1311, 29889, 2585, 29892, 304, 29918, 5504, 29922, 1311, 29889, 1792, 29892, 24124, 29879, 29918, 4230, 29918, 21402, 29922, 657, 29918, 3707, 29918, 2541, 29918, 17559, 3101, 13, 13, 4706, 396, 1286, 1423, 1449, 565, 967, 8676, 13, 4706, 565, 24124, 29918, 8568, 297, 7090, 29889, 3626, 19149, 29879, 29961, 1311, 29889, 7854, 4901, 29918, 333, 5387, 13, 9651, 736, 18912, 3195, 9182, 29898, 11227, 29922, 5574, 29897, 13, 13, 4706, 396, 565, 451, 29892, 736, 278, 848, 411, 278, 1203, 3145, 5235, 13, 4706, 1121, 353, 18912, 3195, 9182, 29898, 11227, 29922, 8824, 29897, 13, 4706, 565, 376, 3318, 3145, 29908, 297, 18365, 29918, 3626, 19149, 29901, 13, 9651, 363, 760, 297, 18365, 29918, 3626, 19149, 3366, 3318, 3145, 3108, 29901, 13, 18884, 1121, 29889, 3318, 3145, 29889, 4397, 29898, 24693, 3195, 2061, 573, 29898, 3318, 573, 29918, 333, 29922, 1595, 3366, 3318, 573, 10438, 12436, 6120, 29922, 1595, 3366, 8835, 3108, 876, 13, 4706, 736, 1121, 13, 13, 1678, 7465, 822, 756, 29918, 15914, 1821, 29898, 1311, 29892, 6314, 1821, 29918, 8568, 29901, 851, 891, 938, 29897, 1599, 6120, 29901, 13, 4706, 9995, 11609, 29879, 565, 278, 6314, 1821, 338, 2355, 841, 15945, 29908, 13, 13, 4706, 6314, 1821, 29918, 8568, 353, 938, 29898, 15914, 1821, 29918, 8568, 29897, 13, 13, 4706, 396, 1423, 7090, 13, 4706, 7465, 411, 408, 948, 3934, 29889, 16542, 7295, 13, 9651, 565, 1583, 29889, 7854, 4901, 29918, 333, 451, 297, 7090, 29889, 15914, 13876, 29901, 13, 18884, 7090, 29889, 15914, 13876, 29889, 5504, 3319, 1311, 29889, 7854, 4901, 29918, 333, 29901, 426, 24289, 13, 13, 9651, 565, 6314, 1821, 29918, 8568, 451, 297, 7090, 29889, 15914, 13876, 29961, 1311, 29889, 7854, 4901, 29918, 333, 5387, 13, 18884, 396, 1423, 565, 278, 1833, 2767, 338, 9642, 1135, 29871, 29896, 29900, 6233, 13, 18884, 565, 1583, 29889, 1792, 29889, 15914, 13876, 29918, 4230, 29918, 21402, 718, 12865, 29889, 9346, 287, 2554, 29898, 1195, 2667, 29922, 29896, 29900, 29897, 1405, 679, 29918, 3707, 29918, 2541, 29918, 17559, 7295, 13, 462, 1678, 736, 7700, 13, 13, 18884, 396, 679, 515, 4833, 322, 736, 393, 565, 372, 4083, 1404, 2355, 278, 6314, 1821, 13, 18884, 1121, 353, 7272, 6314, 13876, 29889, 5349, 29918, 15914, 1821, 29898, 13, 462, 1678, 4833, 29922, 1311, 29889, 2585, 29892, 2731, 4901, 29918, 333, 29922, 1311, 29889, 7854, 4901, 29918, 333, 29892, 6314, 1821, 29918, 8568, 29922, 15914, 1821, 29918, 8568, 13, 18884, 1723, 13, 18884, 565, 1121, 29901, 13, 462, 1678, 396, 871, 22488, 2307, 2355, 6314, 13876, 13, 462, 1678, 7090, 29889, 15914, 13876, 29961, 1311, 29889, 7854, 4901, 29918, 333, 1822, 5504, 3319, 15914, 1821, 29918, 8568, 29901, 5852, 1800, 13, 462, 1678, 736, 5852, 13, 13, 18884, 396, 408, 411, 278, 24124, 29879, 29892, 591, 817, 304, 2767, 1749, 1887, 6314, 1821, 848, 1286, 13, 18884, 6314, 13876, 29918, 1272, 353, 7272, 1583, 29889, 657, 29918, 15914, 13876, 580, 13, 18884, 304, 29918, 7851, 353, 5159, 13, 13, 18884, 396, 2425, 1549, 278, 6314, 13876, 13, 18884, 363, 6314, 1821, 29918, 333, 29892, 6314, 1821, 29918, 3888, 297, 6314, 13876, 29918, 1272, 29889, 7076, 7295, 13, 462, 1678, 6314, 1821, 29918, 333, 353, 938, 29898, 15914, 1821, 29918, 333, 29897, 13, 13, 462, 1678, 565, 6314, 1821, 29918, 333, 297, 7090, 29889, 15914, 13876, 29961, 1311, 29889, 7854, 4901, 29918, 333, 5387, 13, 462, 4706, 6773, 13, 13, 462, 1678, 396, 947, 278, 6251, 1863, 297, 278, 4833, 29973, 13, 462, 1678, 396, 591, 1016, 29915, 29873, 817, 304, 337, 22235, 278, 2106, 565, 967, 2307, 10902, 408, 15205, 297, 278, 4833, 13, 462, 1678, 1121, 353, 7272, 6314, 13876, 29889, 657, 29918, 15914, 1821, 29898, 13, 462, 4706, 4833, 29922, 1311, 29889, 2585, 29892, 2731, 4901, 29918, 333, 29922, 1311, 29889, 7854, 4901, 29918, 333, 29892, 6314, 1821, 29918, 8568, 29922, 15914, 1821, 29918, 333, 13, 462, 1678, 1723, 13, 462, 1678, 565, 1121, 322, 1121, 29889, 26689, 29901, 13, 462, 4706, 7090, 29889, 15914, 13876, 29961, 1311, 29889, 7854, 4901, 29918, 333, 1822, 5504, 3319, 15914, 1821, 29918, 333, 29901, 5852, 1800, 13, 462, 4706, 6773, 13, 13, 462, 1678, 396, 2586, 29871, 29896, 451, 1641, 731, 2794, 278, 6314, 1821, 338, 2355, 841, 13, 462, 1678, 396, 1074, 2045, 597, 29890, 686, 347, 29899, 1212, 29889, 3292, 29889, 601, 29914, 9910, 29914, 11010, 29918, 14994, 4901, 29899, 14994, 4901, 28916, 1821, 2792, 29889, 1420, 29937, 11010, 29918, 14994, 4901, 29899, 14994, 4901, 28916, 1821, 2792, 13, 462, 1678, 4660, 353, 6314, 1821, 29918, 3888, 3366, 3859, 3108, 669, 29871, 29896, 1275, 29871, 29900, 13, 13, 462, 1678, 396, 1016, 29915, 29873, 2289, 817, 304, 4635, 451, 29899, 26689, 6314, 13876, 13, 462, 1678, 565, 4660, 29901, 13, 462, 4706, 7090, 29889, 15914, 13876, 29961, 1311, 29889, 7854, 4901, 29918, 333, 1822, 5504, 3319, 15914, 1821, 29918, 333, 29901, 5852, 1800, 13, 462, 4706, 396, 437, 591, 817, 304, 2767, 470, 4635, 29973, 13, 462, 4706, 565, 451, 1121, 29901, 13, 462, 9651, 396, 4635, 13, 462, 9651, 304, 29918, 7851, 29889, 4397, 29898, 13, 462, 18884, 24930, 13876, 29898, 7854, 4901, 29918, 333, 29922, 1311, 29889, 7854, 4901, 29918, 333, 29892, 6314, 1821, 29918, 333, 29922, 15914, 1821, 29918, 333, 29892, 15205, 29922, 5574, 29897, 13, 462, 9651, 1723, 13, 13, 462, 4706, 1683, 29901, 13, 462, 9651, 396, 2767, 13, 462, 9651, 7272, 6314, 13876, 29889, 5504, 29918, 15914, 1821, 29898, 2585, 29922, 1311, 29889, 2585, 29892, 5446, 29922, 2914, 29892, 15205, 29922, 5574, 29897, 13, 13, 18884, 396, 4158, 4635, 278, 4567, 9976, 13, 18884, 565, 304, 29918, 7851, 29901, 13, 462, 1678, 7272, 6314, 13876, 29889, 7851, 29918, 15914, 13876, 29898, 2585, 29922, 1311, 29889, 2585, 29892, 704, 1315, 29922, 517, 29918, 7851, 29897, 13, 13, 18884, 396, 4078, 278, 2767, 931, 13, 18884, 7272, 2313, 536, 29918, 7193, 29889, 5504, 29898, 2585, 29922, 1311, 29889, 2585, 29892, 304, 29918, 5504, 29922, 1311, 29889, 1792, 29892, 6314, 13876, 29918, 4230, 29918, 21402, 29922, 657, 29918, 3707, 29918, 2541, 29918, 17559, 3101, 13, 13, 4706, 396, 1286, 1423, 1449, 565, 967, 15205, 13, 4706, 565, 6314, 1821, 29918, 8568, 297, 7090, 29889, 15914, 13876, 29961, 1311, 29889, 7854, 4901, 29918, 333, 5387, 13, 9651, 736, 5852, 13, 4706, 1683, 29901, 13, 9651, 736, 7700, 13, 13, 1678, 7465, 822, 679, 29918, 16414, 29918, 1767, 29898, 1311, 29892, 12714, 29918, 8568, 29901, 851, 891, 938, 29897, 1599, 938, 29901, 13, 4706, 9995, 11609, 29879, 278, 995, 310, 278, 2183, 12714, 6608, 15945, 29908, 13, 13, 4706, 12714, 29918, 8568, 353, 851, 29898, 16414, 29918, 8568, 29897, 13, 4706, 21556, 353, 7272, 1583, 29889, 657, 29918, 2527, 10817, 580, 13, 13, 4706, 1018, 29901, 13, 9651, 736, 21556, 29961, 16414, 29918, 8568, 29962, 3366, 3318, 573, 14470, 3108, 3366, 18035, 3108, 13, 4706, 5174, 7670, 2392, 29901, 13, 9651, 12020, 8701, 2451, 703, 29933, 686, 347, 14994, 4901, 2001, 3664, 1252, 391, 1159, 13, 13, 1678, 7465, 822, 679, 29918, 6112, 29918, 1767, 29898, 13, 4706, 1583, 29892, 13, 4706, 1002, 29918, 978, 29901, 851, 29892, 13, 4706, 1002, 29918, 7320, 29901, 851, 353, 376, 497, 2481, 613, 13, 4706, 2931, 29918, 333, 29901, 28379, 29961, 524, 891, 851, 29962, 353, 6213, 29892, 13, 1678, 1723, 1599, 938, 891, 5785, 29901, 13, 4706, 9995, 11609, 29879, 278, 995, 310, 278, 2183, 1002, 29889, 3159, 565, 694, 1602, 326, 1338, 29892, 1683, 5785, 15945, 29908, 13, 13, 4706, 1950, 29918, 6112, 29918, 20683, 353, 518, 13, 9651, 376, 497, 2481, 613, 13, 9651, 376, 497, 29925, 29894, 29923, 613, 13, 9651, 376, 497, 29925, 29894, 29925, 613, 13, 4706, 4514, 13, 4706, 4974, 1002, 29918, 7320, 297, 1950, 29918, 6112, 29918, 20683, 29892, 285, 29908, 9513, 1818, 367, 697, 310, 426, 27338, 29918, 6112, 29918, 20683, 5038, 13, 4706, 11261, 353, 376, 1050, 3192, 29908, 565, 1002, 29918, 7320, 1275, 376, 497, 2481, 29908, 1683, 376, 9902, 29908, 13, 13, 4706, 22663, 353, 7272, 1583, 29889, 657, 29918, 16202, 580, 13, 13, 4706, 396, 2931, 22663, 13, 4706, 565, 2931, 29918, 333, 29901, 13, 9651, 1476, 353, 7700, 13, 9651, 363, 1373, 297, 22663, 3366, 3090, 21706, 3108, 29901, 13, 18884, 565, 1373, 3366, 18609, 1204, 3108, 1275, 851, 29898, 18609, 29918, 333, 1125, 13, 462, 1678, 22663, 353, 1373, 13, 462, 1678, 1476, 353, 5852, 13, 13, 9651, 565, 451, 1476, 29901, 13, 18884, 12020, 8701, 2451, 703, 20755, 1204, 17413, 1159, 13, 13, 4706, 396, 3001, 22663, 13, 4706, 1683, 29901, 13, 9651, 22663, 353, 22663, 3366, 1050, 3192, 3596, 5914, 21706, 3108, 13, 13, 4706, 22663, 353, 22663, 29961, 13010, 3816, 6112, 29918, 7320, 29962, 13, 4706, 565, 1002, 29918, 7320, 2804, 376, 497, 2481, 1115, 13, 9651, 22663, 353, 22663, 3366, 497, 2481, 3108, 13, 4706, 1002, 29901, 5785, 353, 22663, 29961, 6112, 29918, 978, 29962, 3366, 16121, 3108, 3366, 1767, 3108, 13, 4706, 736, 938, 29898, 6112, 29897, 565, 1002, 29889, 275, 29918, 16031, 580, 1683, 1002, 13, 13, 1678, 7465, 822, 679, 29918, 8813, 29918, 5563, 29898, 1311, 29897, 1599, 7865, 3195, 29901, 13, 4706, 9995, 11609, 29879, 278, 4259, 284, 24238, 848, 15945, 29908, 13, 13, 4706, 1121, 353, 7272, 1583, 17255, 657, 29918, 10185, 580, 13, 4706, 736, 7865, 3195, 29898, 1767, 29922, 2914, 3366, 10185, 1184, 11476, 3108, 3366, 1272, 3108, 3366, 25682, 284, 9986, 7060, 3108, 3366, 13519, 29933, 265, 375, 20068, 13, 13, 1678, 7465, 822, 679, 29918, 25682, 29918, 3364, 29918, 5563, 29898, 1311, 29897, 1599, 7865, 3195, 29901, 13, 4706, 9995, 11609, 29879, 278, 4259, 284, 1209, 3233, 15945, 29908, 13, 13, 4706, 396, 679, 278, 1857, 4259, 1209, 6608, 13, 4706, 7465, 411, 408, 948, 3934, 29889, 16542, 7295, 13, 9651, 565, 451, 7090, 29889, 25682, 29918, 3364, 29918, 16553, 29901, 13, 18884, 7090, 29889, 25682, 29918, 3364, 29918, 16553, 353, 7272, 2731, 4901, 29918, 29135, 29889, 657, 29918, 3784, 29918, 25682, 29918, 3364, 29898, 2585, 29922, 1311, 29889, 2585, 29897, 13, 13, 4706, 396, 679, 263, 2931, 1178, 1951, 896, 526, 2931, 2702, 13, 4706, 2931, 29918, 333, 353, 313, 20675, 1583, 29889, 657, 29918, 18609, 29918, 4841, 3101, 29961, 29900, 29962, 13, 13, 4706, 1121, 353, 7272, 1583, 17255, 657, 29918, 10185, 580, 13, 4706, 2931, 29918, 1272, 353, 1121, 3366, 18609, 14470, 1080, 3108, 3366, 1272, 3108, 29961, 710, 29898, 18609, 29918, 333, 4638, 3366, 18035, 1080, 3108, 13, 4706, 736, 7865, 3195, 29898, 13, 9651, 995, 29922, 18609, 29918, 1272, 29961, 710, 29898, 8173, 29889, 25682, 29918, 3364, 29918, 16553, 29889, 276, 1328, 29918, 771, 11476, 29918, 8568, 4638, 3366, 5563, 3108, 13, 9651, 718, 2931, 29918, 1272, 29961, 710, 29898, 8173, 29889, 25682, 29918, 3364, 29918, 16553, 29889, 558, 342, 2231, 29918, 771, 11476, 29918, 8568, 4638, 3366, 5563, 3108, 13, 4706, 1723, 13, 13, 1678, 7465, 822, 679, 29918, 25682, 284, 29918, 305, 16047, 267, 29898, 1311, 29897, 1599, 24791, 284, 1451, 16047, 267, 3195, 29901, 13, 4706, 9995, 11609, 29879, 278, 4259, 284, 18066, 267, 13285, 5235, 15945, 29908, 13, 13, 4706, 396, 437, 591, 505, 278, 5235, 22152, 29973, 13, 4706, 7465, 411, 408, 948, 3934, 29889, 16542, 7295, 13, 9651, 565, 451, 7090, 29889, 25682, 284, 29918, 305, 16047, 267, 29918, 16553, 29901, 13, 18884, 5023, 353, 24791, 284, 1451, 16047, 267, 3195, 580, 13, 13, 18884, 396, 679, 278, 5235, 515, 278, 4833, 13, 18884, 885, 29918, 7320, 29918, 8568, 353, 29871, 29941, 29946, 29946, 29941, 29953, 29929, 29946, 29900, 29953, 29955, 13, 18884, 885, 29918, 26081, 29918, 3177, 353, 7272, 2731, 4901, 29918, 29135, 29889, 657, 29898, 13, 462, 1678, 4833, 29922, 1311, 29889, 2585, 29892, 1591, 29922, 14994, 4901, 13504, 9233, 4247, 14683, 29892, 7601, 29918, 1989, 29922, 1557, 29918, 7320, 29918, 8568, 13, 18884, 1723, 13, 13, 18884, 396, 2425, 1549, 1906, 13997, 322, 679, 278, 376, 22606, 368, 29908, 697, 13, 18884, 363, 7663, 29918, 8568, 297, 885, 29918, 26081, 29918, 3177, 29889, 11991, 29918, 26081, 29918, 3177, 29918, 8568, 29901, 13, 462, 1678, 7663, 353, 7272, 2731, 4901, 29918, 29135, 29889, 657, 29898, 13, 462, 4706, 4833, 29922, 1311, 29889, 2585, 29892, 1591, 29922, 14994, 4901, 13504, 9233, 4247, 14683, 29892, 7601, 29918, 1989, 29922, 7320, 29918, 8568, 13, 462, 1678, 1723, 13, 13, 462, 1678, 565, 7663, 29889, 978, 1275, 376, 22606, 368, 1115, 13, 462, 4706, 396, 2425, 1549, 278, 4259, 284, 18066, 267, 23820, 313, 22606, 29896, 29892, 15511, 29906, 29892, 2992, 11410, 13, 462, 4706, 363, 885, 29918, 13010, 29918, 8568, 297, 7663, 29889, 11991, 29918, 26081, 29918, 3177, 29918, 8568, 29901, 13, 462, 9651, 885, 29918, 13010, 353, 7272, 2731, 4901, 29918, 29135, 29889, 657, 29898, 13, 462, 18884, 4833, 29922, 1311, 29889, 2585, 29892, 1591, 29922, 14994, 4901, 13504, 9233, 4247, 14683, 29892, 7601, 29918, 1989, 29922, 1557, 29918, 13010, 29918, 8568, 13, 462, 9651, 1723, 13, 13, 462, 9651, 11261, 353, 24791, 284, 1451, 16047, 267, 7031, 1199, 3195, 29898, 978, 29922, 1557, 29918, 13010, 29889, 978, 29897, 13, 13, 462, 9651, 396, 2425, 1549, 278, 3935, 4259, 284, 18066, 267, 13, 462, 9651, 363, 885, 29918, 8568, 297, 885, 29918, 13010, 29889, 11991, 29918, 11651, 29918, 8568, 29901, 13, 462, 18884, 885, 353, 7272, 2731, 4901, 29918, 29135, 29889, 657, 29898, 13, 462, 462, 1678, 4833, 29922, 1311, 29889, 2585, 29892, 1591, 29922, 14994, 4901, 9182, 14683, 29892, 7601, 29918, 1989, 29922, 1557, 29918, 8568, 13, 462, 18884, 1723, 13, 13, 462, 18884, 11261, 29889, 25682, 284, 29918, 305, 16047, 267, 29889, 4397, 29898, 13, 462, 462, 1678, 24791, 284, 1451, 16047, 267, 9182, 3195, 29898, 13, 462, 462, 4706, 2407, 29918, 333, 29922, 1557, 29889, 5679, 29918, 333, 29892, 1024, 29922, 1557, 29889, 978, 29892, 6139, 29922, 1557, 29889, 8216, 13, 462, 462, 1678, 1723, 13, 462, 18884, 1723, 13, 13, 462, 9651, 5023, 29889, 3332, 1199, 29889, 4397, 29898, 13010, 29897, 13, 462, 4706, 2867, 13, 13, 18884, 7090, 29889, 25682, 284, 29918, 305, 16047, 267, 29918, 16553, 353, 5023, 13, 13, 4706, 1404, 29918, 1557, 353, 7090, 29889, 25682, 284, 29918, 305, 16047, 267, 29918, 16553, 29889, 8552, 580, 13, 4706, 1404, 29918, 3757, 4339, 353, 7272, 1583, 29889, 657, 29918, 3626, 19149, 29879, 580, 13, 13, 4706, 396, 1286, 8147, 278, 5144, 3315, 1080, 4660, 13, 4706, 1404, 29918, 1557, 353, 7272, 304, 29918, 7097, 29889, 3389, 29918, 16593, 29898, 657, 29918, 25682, 284, 29918, 305, 16047, 267, 29918, 1491, 5014, 29892, 1404, 29918, 1557, 29892, 1404, 29918, 3757, 4339, 29897, 13, 13, 4706, 736, 1404, 29918, 1557, 13, 13, 1678, 7465, 822, 679, 29918, 18609, 29918, 333, 29918, 1609, 29918, 1990, 29898, 1311, 29892, 2931, 29918, 1990, 29901, 851, 29897, 1599, 28379, 29961, 524, 5387, 13, 4706, 9995, 11609, 278, 9686, 2931, 1178, 565, 4864, 15945, 29908, 13, 13, 4706, 396, 1207, 1854, 278, 770, 4864, 13, 4706, 770, 29918, 7039, 353, 1051, 29898, 1311, 29889, 1990, 29918, 1958, 29889, 5975, 3101, 13, 4706, 565, 2931, 29918, 1990, 451, 297, 770, 29918, 7039, 29901, 13, 9651, 736, 6213, 13, 13, 4706, 396, 2425, 1549, 278, 22524, 322, 736, 278, 9686, 697, 13, 4706, 4890, 353, 7272, 1583, 29889, 657, 29918, 18609, 29918, 3888, 580, 13, 4706, 565, 4890, 29901, 13, 9651, 363, 2931, 29918, 1272, 297, 4890, 29889, 3090, 21706, 29901, 13, 18884, 565, 2931, 29918, 1272, 29889, 18609, 29918, 1990, 1275, 2931, 29918, 1990, 29901, 13, 462, 1678, 736, 2931, 29918, 1272, 29889, 18609, 29918, 333, 13, 4706, 736, 6213, 13, 13, 1678, 7465, 822, 679, 29918, 18609, 29918, 4841, 29898, 1311, 29897, 1599, 1051, 29961, 524, 5387, 13, 4706, 9995, 11609, 278, 2931, 18999, 871, 15945, 29908, 13, 13, 4706, 4890, 353, 7272, 1583, 29889, 657, 29918, 18609, 29918, 3888, 580, 13, 13, 4706, 18999, 353, 5159, 13, 4706, 565, 4890, 29901, 13, 9651, 363, 2931, 29918, 1272, 297, 4890, 29889, 3090, 21706, 29901, 13, 18884, 18999, 29889, 4397, 29898, 18609, 29918, 1272, 29889, 18609, 29918, 333, 29897, 13, 4706, 736, 18999, 13, 13, 1678, 7465, 822, 679, 29918, 18609, 29918, 3888, 29898, 1311, 29897, 1599, 15435, 4901, 5914, 21706, 3195, 29901, 13, 4706, 9995, 2577, 2931, 5235, 15945, 29908, 13, 13, 4706, 4890, 353, 15435, 4901, 5914, 21706, 3195, 580, 13, 4706, 1121, 353, 7272, 1583, 17255, 657, 29918, 10185, 580, 13, 13, 4706, 396, 2425, 1549, 1269, 2931, 13, 4706, 363, 2931, 29918, 333, 29892, 2931, 29918, 1272, 297, 1121, 3366, 3090, 21706, 3108, 3366, 1272, 16862, 7076, 7295, 13, 9651, 2931, 29918, 333, 353, 938, 29898, 18609, 29918, 333, 29897, 13, 13, 9651, 396, 3402, 278, 848, 5149, 322, 3588, 278, 6608, 267, 304, 6031, 13, 9651, 4890, 29889, 3090, 21706, 29889, 4397, 29898, 13, 18884, 15435, 4901, 20755, 3195, 29898, 13, 462, 1678, 2931, 29918, 333, 29922, 18609, 29918, 333, 29892, 13, 462, 1678, 2931, 29918, 1990, 29922, 1311, 29889, 1990, 29918, 1958, 29961, 18609, 29918, 1272, 3366, 1990, 10438, 3108, 1402, 13, 462, 1678, 2931, 29918, 25525, 29922, 1311, 29889, 25525, 29918, 1958, 29961, 18609, 29918, 1272, 3366, 25525, 10438, 3108, 1402, 13, 462, 1678, 2931, 29918, 26098, 29922, 1311, 29889, 26098, 29918, 1958, 29961, 18609, 29918, 1272, 3366, 26098, 10438, 3108, 1402, 13, 18884, 1723, 13, 9651, 1723, 13, 13, 4706, 736, 4890, 13, 13, 1678, 7465, 822, 679, 29918, 3626, 19149, 29879, 29898, 1311, 29897, 1599, 9657, 29901, 13, 4706, 9995, 12310, 5987, 278, 24124, 29879, 322, 769, 736, 963, 15945, 29908, 13, 13, 4706, 1121, 353, 7272, 1583, 17255, 657, 29918, 10185, 580, 13, 13, 4706, 396, 14405, 8722, 322, 2931, 6743, 13, 4706, 1583, 3032, 3626, 19149, 29879, 353, 7272, 304, 29918, 7097, 29889, 3389, 29918, 16593, 29898, 657, 29918, 3626, 19149, 29879, 29918, 1491, 5014, 29892, 1121, 29897, 13, 13, 4706, 736, 1583, 3032, 3626, 19149, 29879, 13, 13, 1678, 7465, 822, 679, 29918, 15914, 13876, 29898, 1311, 29897, 1599, 9657, 29901, 13, 4706, 9995, 12310, 5987, 278, 6314, 13876, 322, 769, 736, 963, 15945, 29908, 13, 13, 4706, 1121, 353, 7272, 1583, 17255, 657, 29918, 10185, 580, 13, 13, 4706, 396, 14405, 8722, 322, 2931, 6743, 13, 4706, 736, 7272, 304, 29918, 7097, 29889, 3389, 29918, 16593, 29898, 657, 29918, 15914, 13876, 29918, 1491, 5014, 29892, 1121, 29897, 13, 13, 1678, 7465, 822, 679, 29918, 2527, 10817, 29898, 1311, 29897, 1599, 9657, 29901, 13, 4706, 9995, 12310, 5987, 278, 21556, 322, 769, 736, 963, 15945, 29908, 13, 13, 4706, 21556, 353, 7272, 1583, 17255, 657, 29918, 10185, 580, 13, 4706, 736, 21556, 3366, 2527, 10817, 3108, 3366, 1272, 3108, 3366, 2527, 10817, 3108, 13, 13, 1678, 7465, 822, 679, 29918, 16202, 29898, 1311, 29897, 1599, 9657, 29901, 13, 4706, 9995, 2577, 2731, 4901, 22663, 15945, 29908, 13, 13, 4706, 5782, 353, 1002, 29918, 13134, 29889, 4830, 29898, 5205, 29922, 1311, 29889, 5205, 29892, 2731, 4901, 29918, 333, 29922, 1311, 29889, 7854, 4901, 29918, 333, 29897, 13, 4706, 1121, 353, 7272, 1583, 29889, 2754, 29889, 657, 29898, 13134, 29922, 13134, 29897, 13, 4706, 736, 1121, 29889, 3051, 13, 13, 1678, 7465, 822, 679, 29918, 7076, 29918, 262, 29918, 262, 23886, 29918, 21454, 29898, 1311, 29892, 20968, 29901, 938, 29897, 1599, 1051, 29901, 13, 4706, 9995, 13, 4706, 16969, 599, 4452, 297, 20968, 29889, 13109, 338, 325, 1292, 6608, 29892, 363, 4045, 2740, 376, 21454, 29908, 472, 2045, 597, 1272, 29889, 7854, 4901, 7224, 29889, 510, 29914, 13, 13, 4706, 3834, 1321, 9737, 393, 526, 4100, 29901, 13, 9651, 478, 1292, 29901, 29871, 29896, 29941, 29947, 29896, 29929, 29955, 29947, 29900, 29906, 13, 4706, 9995, 13, 13, 4706, 1121, 353, 7272, 1583, 17255, 657, 29918, 10185, 580, 13, 4706, 599, 29918, 7076, 353, 1121, 3366, 10185, 797, 23886, 3108, 3366, 1272, 3108, 3366, 7076, 3108, 13, 4706, 4452, 353, 5159, 13, 4706, 363, 2944, 297, 599, 29918, 7076, 29901, 13, 9651, 565, 2944, 3366, 21454, 10438, 3108, 1275, 20968, 29901, 13, 18884, 4452, 29889, 4397, 29898, 667, 29897, 13, 13, 4706, 736, 4452, 13, 13, 1678, 7465, 822, 679, 29918, 2230, 29918, 1456, 287, 29898, 13, 4706, 1583, 29892, 13, 4706, 1369, 29918, 2230, 29901, 12865, 29889, 12673, 29892, 13, 4706, 1095, 29918, 2230, 29901, 12865, 29889, 12673, 29892, 13, 4706, 4464, 29901, 938, 353, 29871, 29900, 29892, 13, 4706, 6354, 29918, 4841, 29901, 28379, 29961, 1761, 29961, 524, 5262, 353, 6213, 29892, 13, 4706, 2931, 29918, 1990, 29901, 28379, 29961, 710, 29962, 353, 6213, 29892, 13, 1678, 1723, 1599, 938, 29901, 13, 4706, 9995, 2577, 278, 931, 5318, 313, 262, 6923, 5513, 15945, 13, 13, 4706, 736, 7272, 2181, 566, 29918, 11236, 1907, 29889, 15807, 403, 29918, 2230, 29918, 1456, 287, 29898, 13, 9651, 4833, 29922, 1311, 29889, 2585, 29892, 13, 9651, 2731, 4901, 29918, 333, 29922, 1311, 29889, 7854, 4901, 29918, 333, 29892, 13, 9651, 4464, 29922, 8513, 29892, 13, 9651, 6354, 29918, 4841, 29922, 10072, 29918, 4841, 29892, 13, 9651, 1369, 29918, 2230, 29922, 2962, 29918, 2230, 29892, 13, 9651, 1095, 29918, 2230, 29922, 355, 29918, 2230, 29892, 13, 9651, 2931, 29918, 1990, 29922, 18609, 29918, 1990, 29892, 13, 4706, 1723, 13, 13, 1678, 7465, 822, 4770, 657, 29918, 262, 23886, 29918, 21454, 29898, 13, 4706, 1583, 29892, 334, 2423, 9737, 29901, 15435, 4901, 797, 23886, 29933, 2707, 300, 16854, 13, 1678, 1723, 1599, 9657, 29961, 14994, 4901, 797, 23886, 29933, 2707, 300, 16854, 29892, 9657, 29961, 524, 29892, 9657, 5262, 29901, 13, 4706, 9995, 13, 4706, 3617, 599, 278, 4452, 515, 385, 11817, 706, 20968, 29889, 13109, 29901, 2178, 1321, 9737, 13, 13, 4706, 16969, 29901, 13, 4706, 426, 13, 9651, 15435, 4901, 797, 23886, 29933, 2707, 300, 16854, 29901, 426, 13, 18884, 2944, 29918, 8568, 29901, 9657, 29918, 1272, 29892, 13, 18884, 2023, 13, 9651, 2981, 13, 9651, 2023, 13, 4706, 500, 13, 4706, 9995, 13, 13, 4706, 396, 2322, 338, 325, 1292, 13, 4706, 565, 451, 1321, 9737, 29901, 13, 9651, 1321, 9737, 353, 15435, 4901, 797, 23886, 29933, 2707, 300, 16854, 29889, 497, 580, 13, 13, 4706, 1121, 353, 7272, 1583, 17255, 657, 29918, 10185, 580, 13, 13, 4706, 396, 871, 679, 278, 4452, 297, 278, 1959, 1321, 9737, 13, 4706, 4452, 353, 7272, 304, 29918, 7097, 29889, 3389, 29918, 16593, 29898, 657, 29918, 262, 23886, 29918, 21454, 29918, 1491, 5014, 29892, 1121, 29892, 1321, 9737, 29897, 13, 13, 4706, 736, 4452, 13, 13, 1678, 7465, 822, 4770, 657, 29918, 497, 29918, 262, 23886, 29918, 21454, 29898, 13, 4706, 1583, 29892, 334, 2423, 9737, 29901, 15435, 4901, 797, 23886, 29933, 2707, 300, 16854, 29892, 3160, 29918, 667, 29918, 5563, 29901, 6120, 353, 7700, 13, 1678, 1723, 1599, 9657, 29961, 524, 29892, 9657, 29961, 14994, 4901, 797, 23886, 29933, 2707, 300, 16854, 29892, 9657, 29961, 524, 29892, 9657, 5262, 5387, 13, 4706, 9995, 13, 4706, 3617, 599, 278, 4452, 515, 385, 11817, 706, 20968, 29889, 512, 27722, 1716, 8722, 322, 2931, 29889, 13109, 29901, 2178, 1321, 9737, 13, 4706, 512, 27722, 278, 3081, 3233, 338, 4433, 363, 1090, 376, 13519, 29918, 5563, 29908, 13, 13, 4706, 16969, 29901, 13, 4706, 426, 13, 9651, 2931, 29918, 333, 29901, 426, 13, 18884, 15435, 4901, 797, 23886, 29933, 2707, 300, 16854, 29901, 426, 13, 462, 1678, 2944, 4998, 1204, 29901, 2944, 25503, 29918, 1272, 29892, 13, 462, 1678, 2023, 13, 18884, 2981, 13, 18884, 2023, 13, 9651, 2981, 13, 9651, 2023, 13, 4706, 500, 13, 4706, 9995, 13, 13, 4706, 822, 788, 29918, 3888, 29898, 2914, 29918, 8977, 29901, 9657, 29892, 2944, 29901, 9657, 29892, 1373, 29918, 333, 29901, 938, 1125, 13, 9651, 9995, 14400, 304, 788, 278, 4452, 15945, 29908, 13, 13, 9651, 396, 871, 679, 278, 4452, 297, 278, 1959, 1321, 9737, 13, 9651, 363, 20968, 297, 1321, 9737, 29901, 13, 18884, 565, 2944, 3366, 21454, 10438, 3108, 1275, 20968, 29889, 1767, 29901, 13, 462, 1678, 565, 20968, 451, 297, 1121, 29918, 8977, 29961, 3090, 29918, 333, 5387, 13, 462, 4706, 1121, 29918, 8977, 29961, 3090, 29918, 333, 1822, 5504, 3319, 21454, 29901, 426, 24289, 13, 462, 1678, 1121, 29918, 8977, 29961, 3090, 29918, 333, 3816, 21454, 1822, 5504, 3319, 667, 3366, 667, 4998, 1204, 3108, 29901, 2944, 1800, 13, 462, 1678, 565, 3160, 29918, 667, 29918, 5563, 29901, 13, 462, 4706, 1018, 29901, 13, 462, 9651, 1121, 29918, 8977, 29961, 3090, 29918, 333, 3816, 21454, 3816, 667, 3366, 667, 4998, 1204, 3108, 1822, 5504, 29898, 13, 462, 18884, 426, 13, 462, 462, 1678, 376, 13519, 29918, 5563, 1115, 1121, 3366, 667, 25503, 3108, 3366, 2611, 2925, 3108, 3366, 1272, 3108, 29961, 13, 462, 462, 4706, 2944, 3366, 667, 4998, 1204, 3108, 13, 462, 462, 1678, 4514, 3366, 16072, 9513, 3108, 3366, 1767, 3108, 13, 462, 18884, 500, 13, 462, 9651, 1723, 13, 462, 4706, 5174, 7670, 2392, 29901, 13, 462, 9651, 1209, 13, 462, 1678, 2867, 13, 13, 4706, 396, 2322, 338, 325, 1292, 13, 4706, 565, 451, 1321, 9737, 29901, 13, 9651, 1321, 9737, 353, 15435, 4901, 797, 23886, 29933, 2707, 300, 16854, 29889, 497, 580, 13, 13, 4706, 1121, 353, 7272, 1583, 17255, 657, 29918, 10185, 580, 13, 4706, 4452, 353, 6571, 13, 13, 4706, 396, 937, 679, 278, 2931, 18999, 322, 1009, 770, 13, 4706, 2931, 29918, 4841, 353, 6571, 13, 4706, 363, 2931, 29918, 333, 29892, 2931, 29918, 1272, 297, 1121, 3366, 3090, 21706, 3108, 3366, 1272, 16862, 7076, 7295, 13, 9651, 770, 29918, 1853, 353, 2931, 29918, 1272, 3366, 1990, 1542, 3108, 13, 9651, 565, 770, 29918, 1853, 451, 297, 2931, 29918, 4841, 29901, 13, 18884, 2931, 29918, 4841, 29889, 5504, 3319, 1990, 29918, 1853, 29901, 518, 524, 29898, 18609, 29918, 333, 4638, 1800, 13, 9651, 1683, 29901, 13, 18884, 2931, 29918, 4841, 29961, 1990, 29918, 1853, 1822, 4397, 29898, 524, 29898, 18609, 29918, 333, 876, 13, 13, 4706, 396, 679, 2931, 11817, 706, 13, 4706, 363, 2931, 29918, 333, 29892, 2931, 29918, 1272, 297, 1121, 3366, 18609, 797, 794, 3842, 3108, 3366, 1272, 16862, 7076, 7295, 13, 9651, 2931, 29918, 333, 353, 938, 29898, 18609, 29918, 333, 29897, 13, 9651, 565, 2931, 29918, 333, 451, 297, 4452, 29901, 13, 18884, 4452, 29889, 5504, 3319, 18609, 29918, 333, 29901, 426, 24289, 13, 13, 9651, 363, 2437, 29918, 667, 297, 2931, 29918, 1272, 3366, 7076, 3108, 29901, 13, 18884, 7272, 304, 29918, 7097, 29889, 3389, 29918, 16593, 29898, 1202, 29918, 3888, 29892, 4452, 29892, 2437, 29918, 667, 29892, 2931, 29918, 333, 29897, 13, 13, 4706, 396, 679, 2931, 1592, 16242, 13, 4706, 363, 2931, 29918, 333, 29892, 2931, 29918, 1272, 297, 1121, 3366, 18609, 6108, 666, 358, 3108, 3366, 1272, 16862, 7076, 7295, 13, 9651, 2931, 29918, 333, 353, 938, 29898, 18609, 29918, 333, 29897, 13, 9651, 363, 2437, 29918, 667, 297, 2931, 29918, 1272, 3366, 7076, 3108, 29901, 13, 18884, 7272, 304, 29918, 7097, 29889, 3389, 29918, 16593, 29898, 1202, 29918, 3888, 29892, 4452, 29892, 2437, 29918, 667, 29892, 2931, 29918, 333, 29897, 13, 13, 4706, 396, 679, 6433, 297, 325, 1292, 393, 338, 2931, 2702, 13, 4706, 363, 8722, 29918, 1272, 297, 1121, 3366, 10185, 797, 23886, 3108, 3366, 1272, 3108, 3366, 7076, 3108, 29901, 13, 9651, 396, 871, 1423, 565, 372, 756, 263, 2777, 1178, 322, 338, 297, 278, 1959, 20968, 13, 9651, 565, 313, 13, 18884, 8722, 29918, 1272, 3366, 21454, 10438, 3108, 1275, 15435, 4901, 797, 23886, 29933, 2707, 300, 16854, 29889, 20449, 8647, 29889, 1767, 13, 18884, 322, 376, 667, 4998, 1204, 29908, 297, 8722, 29918, 1272, 13, 632, 1125, 13, 18884, 396, 679, 278, 2931, 770, 322, 3935, 20968, 6608, 515, 278, 2944, 1178, 13, 18884, 5023, 353, 7272, 2731, 4901, 29918, 7076, 29889, 657, 29918, 667, 29898, 2585, 29922, 1311, 29889, 2585, 29892, 2944, 29918, 333, 29922, 10185, 29918, 1272, 3366, 667, 10438, 20068, 13, 18884, 8722, 29918, 1272, 3366, 21454, 10438, 3108, 353, 5023, 29889, 21454, 29918, 1853, 29918, 8568, 13, 13, 18884, 396, 1018, 304, 4380, 4160, 607, 11132, 1009, 1370, 908, 541, 1603, 505, 1370, 908, 4452, 13, 18884, 565, 5023, 29889, 1990, 29918, 1853, 297, 2931, 29918, 4841, 29901, 13, 462, 1678, 396, 788, 278, 848, 304, 1269, 2931, 13, 462, 1678, 3935, 29918, 18609, 29918, 4841, 353, 2931, 29918, 4841, 29961, 16553, 29889, 1990, 29918, 1853, 29962, 13, 462, 1678, 363, 3935, 29918, 18609, 29918, 333, 297, 3935, 29918, 18609, 29918, 4841, 29901, 13, 462, 4706, 7272, 304, 29918, 7097, 29889, 3389, 29918, 16593, 29898, 1202, 29918, 3888, 29892, 4452, 29892, 8722, 29918, 1272, 29892, 3935, 29918, 18609, 29918, 333, 29897, 13, 13, 4706, 736, 4452, 13, 13, 1678, 7465, 822, 4770, 657, 29918, 10185, 29898, 1311, 29897, 1599, 9657, 29901, 13, 4706, 9995, 13, 4706, 7106, 5235, 515, 278, 8722, 1246, 13, 4706, 2045, 597, 29890, 686, 347, 29899, 1212, 29889, 3292, 29889, 601, 29914, 9910, 29914, 11010, 29918, 14994, 4901, 29899, 14994, 4901, 5308, 1542, 29889, 1420, 29937, 11010, 29918, 14994, 4901, 29899, 14994, 4901, 5308, 1542, 13, 4706, 9995, 13, 4706, 396, 925, 5432, 8886, 599, 310, 963, 29889, 3872, 29915, 29873, 817, 599, 3755, 3447, 29892, 541, 1058, 9906, 825, 278, 5434, 674, 6963, 13, 4706, 7117, 353, 313, 13, 632, 29896, 29900, 29900, 29892, 13, 632, 29896, 29900, 29896, 29892, 13, 632, 29896, 29900, 29906, 29892, 13, 632, 29896, 29900, 29941, 29892, 13, 632, 29896, 29900, 29946, 29892, 13, 632, 29896, 29900, 29945, 29892, 13, 632, 29906, 29900, 29900, 29892, 13, 632, 29906, 29900, 29896, 29892, 13, 632, 29906, 29900, 29906, 29892, 13, 632, 29906, 29900, 29946, 29892, 13, 632, 29906, 29900, 29945, 29892, 13, 632, 29941, 29900, 29900, 29892, 13, 632, 29941, 29900, 29896, 29892, 13, 632, 29941, 29900, 29906, 29892, 13, 632, 29941, 29900, 29946, 29892, 13, 632, 29941, 29900, 29945, 29892, 13, 632, 29941, 29900, 29953, 29892, 13, 632, 29941, 29900, 29955, 29892, 13, 632, 29946, 29900, 29900, 29892, 13, 632, 29946, 29900, 29896, 29892, 13, 632, 29946, 29900, 29906, 29892, 13, 632, 29945, 29900, 29900, 29892, 13, 632, 29953, 29900, 29900, 29892, 13, 632, 29955, 29900, 29900, 29892, 13, 632, 29947, 29900, 29900, 29892, 13, 632, 29929, 29900, 29900, 29892, 13, 632, 29896, 29896, 29900, 29900, 29892, 13, 4706, 1723, 13, 13, 4706, 5782, 353, 8722, 29918, 13134, 29889, 4830, 29898, 5205, 29922, 1311, 29889, 5205, 29892, 2731, 4901, 29918, 333, 29922, 1311, 29889, 7854, 4901, 29918, 333, 29897, 13, 4706, 8636, 353, 8853, 14036, 1115, 9162, 1642, 7122, 29898, 1958, 29898, 710, 29892, 7117, 876, 29913, 13, 13, 4706, 396, 817, 304, 1246, 445, 411, 263, 5993, 29892, 1951, 445, 848, 338, 20502, 13, 4706, 2933, 353, 7272, 1583, 29889, 2754, 29889, 657, 29898, 13134, 29922, 13134, 29892, 8636, 29922, 7529, 29892, 411, 29918, 6979, 29922, 5574, 29897, 13, 13, 4706, 396, 679, 289, 686, 347, 1024, 13, 4706, 289, 686, 347, 29918, 978, 353, 285, 15945, 29908, 29912, 5327, 29889, 3051, 3366, 10185, 3108, 3366, 1272, 3108, 3366, 1792, 3401, 3108, 3366, 29890, 686, 347, 12756, 9323, 1170, 3108, 29913, 26660, 5327, 29889, 3051, 3366, 10185, 3108, 3366, 1272, 3108, 3366, 1792, 3401, 3108, 3366, 29890, 686, 347, 12756, 9323, 1170, 3399, 3108, 5038, 15945, 13, 13, 4706, 396, 2767, 1024, 565, 1422, 13, 4706, 565, 289, 686, 347, 29918, 978, 2804, 1583, 29889, 1792, 29889, 29890, 686, 347, 29918, 978, 29901, 13, 9651, 7272, 2313, 536, 29918, 7193, 29889, 5504, 29898, 2585, 29922, 1311, 29889, 2585, 29892, 304, 29918, 5504, 29922, 1311, 29889, 1792, 29892, 289, 686, 347, 29918, 978, 29922, 29890, 686, 347, 29918, 978, 29897, 13, 13, 4706, 736, 2933, 29889, 3051, 13, 13, 1678, 7465, 822, 4770, 657, 29918, 26095, 29918, 14506, 29898, 1311, 29892, 20968, 29901, 15435, 4901, 797, 23886, 29933, 2707, 300, 16854, 29897, 1599, 938, 29901, 13, 4706, 9995, 11609, 29879, 278, 5253, 310, 278, 6790, 27550, 15205, 15945, 29908, 13, 13, 4706, 8722, 353, 7272, 1583, 17255, 657, 29918, 10185, 580, 13, 4706, 4452, 353, 8722, 3366, 10185, 29907, 1038, 15942, 3108, 3366, 1272, 3108, 3366, 7076, 3108, 13, 13, 4706, 396, 679, 278, 2944, 411, 278, 1959, 20968, 13, 4706, 995, 353, 29871, 29900, 13, 4706, 363, 2944, 297, 4452, 29901, 13, 9651, 565, 2944, 3366, 21454, 10438, 3108, 1275, 20968, 29889, 1767, 29901, 13, 18884, 995, 353, 2944, 3366, 22640, 3108, 13, 4706, 736, 995, 13, 13, 13, 1753, 679, 29918, 3317, 29918, 13519, 29918, 1491, 5014, 29898, 3090, 29918, 1272, 29901, 9657, 29897, 1599, 938, 29901, 13, 1678, 9995, 6558, 297, 738, 601, 1014, 5014, 373, 1790, 3244, 1951, 445, 1795, 367, 5232, 15945, 29908, 13, 13, 1678, 4236, 29918, 13519, 353, 29871, 29900, 13, 1678, 363, 2931, 297, 1373, 29918, 1272, 29901, 13, 4706, 1081, 2527, 353, 29871, 29900, 13, 4706, 10364, 1657, 1026, 353, 29871, 29900, 13, 4706, 521, 342, 353, 29871, 29900, 13, 4706, 2814, 353, 29871, 29900, 13, 4706, 770, 29918, 667, 353, 29871, 29900, 13, 13, 4706, 19015, 7492, 353, 29871, 29900, 13, 4706, 5864, 353, 29871, 29900, 13, 4706, 3081, 353, 29871, 29900, 13, 13, 4706, 363, 20968, 29892, 848, 297, 1373, 29918, 1272, 29961, 18609, 1822, 7076, 7295, 13, 9651, 396, 4078, 278, 4452, 3578, 3233, 13, 9651, 363, 2944, 29918, 333, 29892, 2944, 29918, 1272, 297, 848, 29889, 7076, 7295, 13, 18884, 1993, 20968, 29901, 13, 462, 1678, 1206, 15435, 4901, 797, 23886, 29933, 2707, 300, 16854, 29889, 29950, 6670, 2303, 29911, 29901, 13, 462, 4706, 565, 2944, 29918, 1272, 3366, 13519, 29918, 5563, 3108, 1405, 1081, 2527, 29901, 13, 462, 9651, 1081, 2527, 353, 2944, 29918, 1272, 3366, 13519, 29918, 5563, 3108, 13, 462, 1678, 1206, 15435, 4901, 797, 23886, 29933, 2707, 300, 16854, 29889, 12739, 10356, 1307, 9375, 29901, 13, 462, 4706, 565, 2944, 29918, 1272, 3366, 13519, 29918, 5563, 3108, 1405, 10364, 1657, 1026, 29901, 13, 462, 9651, 10364, 1657, 1026, 353, 2944, 29918, 1272, 3366, 13519, 29918, 5563, 3108, 13, 462, 1678, 1206, 15435, 4901, 797, 23886, 29933, 2707, 300, 16854, 29889, 3210, 29923, 1254, 29901, 13, 462, 4706, 565, 2944, 29918, 1272, 3366, 13519, 29918, 5563, 3108, 1405, 521, 342, 29901, 13, 462, 9651, 521, 342, 353, 2944, 29918, 1272, 3366, 13519, 29918, 5563, 3108, 13, 462, 1678, 1206, 15435, 4901, 797, 23886, 29933, 2707, 300, 16854, 29889, 1307, 29954, 29901, 13, 462, 4706, 565, 2944, 29918, 1272, 3366, 13519, 29918, 5563, 3108, 1405, 2814, 29901, 13, 462, 9651, 2814, 353, 2944, 29918, 1272, 3366, 13519, 29918, 5563, 3108, 13, 462, 1678, 1206, 15435, 4901, 797, 23886, 29933, 2707, 300, 16854, 29889, 13875, 1799, 29901, 13, 462, 4706, 565, 2944, 29918, 1272, 3366, 13519, 29918, 5563, 3108, 1405, 770, 29918, 667, 29901, 13, 462, 9651, 770, 29918, 667, 353, 2944, 29918, 1272, 3366, 13519, 29918, 5563, 3108, 13, 462, 1678, 1206, 15435, 4901, 797, 23886, 29933, 2707, 300, 16854, 29889, 29968, 1177, 2544, 2965, 29901, 13, 462, 4706, 565, 2944, 29918, 1272, 3366, 13519, 29918, 5563, 3108, 1405, 19015, 7492, 29901, 13, 462, 9651, 19015, 7492, 353, 2944, 29918, 1272, 3366, 13519, 29918, 5563, 3108, 13, 462, 1678, 1206, 15435, 4901, 797, 23886, 29933, 2707, 300, 16854, 29889, 1430, 1001, 29954, 29979, 29901, 13, 462, 4706, 565, 2944, 29918, 1272, 3366, 13519, 29918, 5563, 3108, 1405, 5864, 29901, 13, 462, 9651, 5864, 353, 2944, 29918, 1272, 3366, 13519, 29918, 5563, 3108, 13, 462, 1678, 1206, 15435, 4901, 797, 23886, 29933, 2707, 300, 16854, 29889, 29925, 9806, 1001, 29901, 13, 462, 4706, 565, 2944, 29918, 1272, 3366, 13519, 29918, 5563, 3108, 1405, 3081, 29901, 13, 462, 9651, 3081, 353, 2944, 29918, 1272, 3366, 13519, 29918, 5563, 3108, 13, 13, 4706, 396, 679, 278, 4236, 3081, 13, 4706, 1373, 29918, 3317, 29918, 13519, 353, 313, 3952, 2527, 718, 10364, 1657, 1026, 718, 521, 342, 718, 2814, 718, 770, 29918, 667, 718, 19015, 7492, 718, 5864, 718, 3081, 29897, 847, 29871, 29947, 13, 4706, 565, 1373, 29918, 3317, 29918, 13519, 1405, 4236, 29918, 13519, 29901, 13, 9651, 4236, 29918, 13519, 353, 1373, 29918, 3317, 29918, 13519, 13, 13, 1678, 736, 4236, 29918, 13519, 13, 13, 13, 1753, 679, 29918, 25682, 284, 29918, 305, 16047, 267, 29918, 1491, 5014, 29898, 1792, 29918, 1557, 29901, 24791, 284, 1451, 16047, 267, 3195, 29892, 1404, 29918, 3757, 4339, 29901, 9657, 29897, 1599, 24791, 284, 1451, 16047, 267, 3195, 29901, 13, 1678, 9995, 6558, 297, 738, 601, 1014, 5014, 373, 1790, 3244, 1951, 445, 1795, 367, 5232, 15945, 29908, 13, 13, 1678, 363, 11261, 297, 1404, 29918, 1557, 29889, 3332, 1199, 29901, 13, 4706, 363, 885, 297, 11261, 29889, 25682, 284, 29918, 305, 16047, 267, 29901, 13, 9651, 2407, 353, 1404, 29918, 3757, 4339, 29961, 710, 29898, 1557, 29889, 11651, 29918, 333, 4638, 13, 13, 9651, 396, 8147, 13285, 6554, 13, 9651, 6554, 353, 5159, 13, 9651, 363, 12091, 297, 2407, 3366, 3318, 3145, 3108, 29901, 13, 18884, 6554, 29889, 4397, 29898, 3318, 573, 3366, 18035, 3108, 847, 12091, 3366, 5729, 12757, 1917, 3108, 565, 451, 12091, 3366, 8835, 3108, 1683, 29871, 29896, 29897, 13, 9651, 19649, 353, 2533, 29898, 10492, 29897, 847, 7431, 29898, 10492, 29897, 13, 13, 9651, 396, 1207, 953, 29877, 2397, 1616, 363, 13285, 6554, 13, 9651, 885, 29889, 5729, 12757, 29918, 25376, 482, 353, 19649, 13, 9651, 885, 29889, 5729, 12757, 29918, 4882, 353, 1207, 29918, 18035, 29918, 1646, 29918, 726, 29898, 25376, 482, 29897, 13, 13, 1678, 736, 1404, 29918, 1557, 13, 13, 13, 1753, 679, 29918, 3626, 19149, 29879, 29918, 1491, 5014, 29898, 2914, 29901, 9657, 29897, 1599, 9657, 29901, 13, 1678, 9995, 6558, 297, 738, 601, 1014, 5014, 373, 1790, 3244, 1951, 445, 1795, 367, 5232, 15945, 29908, 13, 13, 1678, 396, 679, 8722, 24124, 29879, 13, 1678, 24124, 29879, 353, 1121, 3366, 10185, 4789, 4339, 3108, 3366, 1272, 3108, 3366, 3757, 4339, 3108, 13, 1678, 24124, 29879, 29889, 5504, 29898, 13, 4706, 426, 13, 9651, 376, 4925, 29918, 13628, 1115, 1121, 3366, 10185, 4789, 4339, 3108, 3366, 1272, 3108, 3366, 4925, 20097, 12436, 13, 9651, 376, 1397, 4135, 29918, 13628, 1115, 1121, 3366, 10185, 4789, 4339, 3108, 3366, 1272, 3108, 3366, 1397, 4135, 20097, 12436, 13, 9651, 376, 29880, 361, 5410, 29918, 13628, 1115, 1121, 3366, 10185, 4789, 4339, 3108, 3366, 1272, 3108, 3366, 29880, 361, 5410, 20097, 12436, 13, 4706, 500, 13, 1678, 1723, 13, 13, 1678, 396, 679, 2931, 24124, 29879, 13, 1678, 2931, 29918, 3626, 19149, 29879, 353, 518, 13, 4706, 2931, 29918, 3626, 19149, 29879, 3366, 3757, 4339, 3108, 363, 2931, 29918, 333, 29892, 2931, 29918, 3626, 19149, 29879, 297, 1121, 3366, 18609, 4789, 4339, 3108, 3366, 1272, 16862, 7076, 580, 13, 1678, 4514, 13, 13, 1678, 396, 14405, 963, 13, 1678, 363, 24124, 297, 2931, 29918, 3626, 19149, 29879, 29901, 13, 4706, 24124, 29879, 29889, 5504, 29898, 3626, 19149, 29897, 13, 13, 1678, 736, 24124, 29879, 13, 13, 13, 1753, 679, 29918, 15914, 13876, 29918, 1491, 5014, 29898, 2914, 29901, 9657, 29897, 1599, 9657, 29901, 13, 1678, 9995, 6558, 297, 738, 601, 1014, 5014, 373, 1790, 3244, 1951, 445, 1795, 367, 5232, 15945, 29908, 13, 13, 1678, 396, 679, 8722, 24124, 29879, 13, 1678, 1404, 29918, 15914, 13876, 353, 1121, 3366, 10185, 28916, 13876, 3108, 3366, 1272, 3108, 3366, 15914, 13876, 3108, 13, 13, 1678, 396, 679, 2931, 24124, 29879, 13, 1678, 2931, 29918, 15914, 13876, 353, 518, 13, 4706, 2931, 29918, 3626, 19149, 29879, 3366, 15914, 13876, 3108, 363, 17117, 2931, 29918, 3626, 19149, 29879, 297, 1121, 3366, 18609, 28916, 13876, 3108, 3366, 1272, 16862, 7076, 580, 13, 1678, 4514, 13, 13, 1678, 396, 14405, 963, 13, 1678, 363, 2931, 297, 2931, 29918, 15914, 13876, 29901, 13, 4706, 396, 2425, 1549, 599, 278, 6314, 13876, 322, 871, 2767, 963, 565, 278, 6314, 1821, 338, 20591, 13, 4706, 396, 1074, 2045, 597, 29890, 686, 347, 29899, 1212, 29889, 3292, 29889, 601, 29914, 9910, 29914, 11010, 29918, 14994, 4901, 29899, 14994, 4901, 28916, 1821, 2792, 29889, 1420, 29937, 11010, 29918, 14994, 4901, 29899, 14994, 4901, 28916, 1821, 2792, 13, 4706, 363, 6314, 1821, 29918, 8568, 29892, 6314, 1821, 29918, 3859, 297, 2931, 29889, 7076, 7295, 13, 9651, 565, 6314, 1821, 29918, 3859, 3366, 3859, 3108, 669, 29871, 29896, 1275, 29871, 29900, 29901, 13, 18884, 1404, 29918, 15914, 13876, 29889, 5504, 3319, 15914, 1821, 29918, 8568, 29901, 6314, 1821, 29918, 3859, 1800, 13, 13, 1678, 736, 1404, 29918, 15914, 13876, 13, 13, 13, 1753, 679, 29918, 262, 23886, 29918, 21454, 29918, 1491, 5014, 29898, 2914, 29901, 9657, 29892, 1321, 9737, 29901, 1051, 29961, 14994, 4901, 797, 23886, 29933, 2707, 300, 16854, 2314, 1599, 9657, 29901, 13, 1678, 9995, 6558, 297, 738, 601, 1014, 5014, 373, 1790, 3244, 1951, 445, 1795, 367, 5232, 15945, 29908, 13, 13, 1678, 4452, 353, 6571, 13, 13, 1678, 363, 2944, 297, 1121, 3366, 10185, 797, 23886, 3108, 3366, 1272, 3108, 3366, 7076, 3108, 29901, 13, 4706, 363, 20968, 297, 1321, 9737, 29901, 13, 9651, 565, 2944, 3366, 21454, 10438, 3108, 1275, 20968, 29889, 1767, 29901, 13, 18884, 2944, 29918, 8568, 353, 938, 29898, 667, 3366, 667, 10438, 20068, 13, 18884, 565, 20968, 451, 297, 4452, 29901, 13, 462, 1678, 4452, 29889, 5504, 3319, 21454, 29901, 426, 24289, 13, 18884, 4452, 29961, 21454, 1822, 5504, 3319, 667, 29918, 8568, 29901, 2944, 1800, 13, 18884, 1018, 29901, 13, 462, 1678, 4452, 29961, 21454, 3816, 667, 29918, 8568, 1822, 5504, 29898, 13, 462, 4706, 426, 13, 462, 9651, 376, 13519, 29918, 5563, 1115, 1121, 3366, 667, 25503, 3108, 3366, 2611, 2925, 3108, 3366, 1272, 3108, 29961, 710, 29898, 667, 29918, 8568, 4638, 3366, 16072, 9513, 3108, 29961, 13, 462, 18884, 376, 1767, 29908, 13, 462, 9651, 4514, 13, 462, 4706, 500, 13, 462, 1678, 1723, 13, 18884, 5174, 7670, 2392, 29901, 13, 462, 1678, 1209, 13, 18884, 2867, 13, 13, 1678, 736, 4452, 13, 2 ]