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
weather.py
shuiyouren/weather-python
1
43225
<gh_stars>1-10 # -*- coding: utf-8 -*- import requests import sys import os # curent_dir = os.path.dirname(__file__) # print(curent_dir) # sys.path.append(curent_dir) from bs4 import BeautifulSoup from .weather_id import mylist def show_weather(sumht,sumwea): str = None try: l1 = '温度:'+sumht[0] l2 = '天气:'+sumwea[0] str = "{0}; {1}".format(l2, l1) except: print('未查询到天气!!!') else: print(l1) print(l2) return str def get_city_id(name_id): l = mylist() for i in l: if i['name'] == name_id: s = i['id'] return s def get_7dweather(header,id): #最高温 temperatureHigh = [] #天气 wth = [] url = 'http://www.weather.com.cn/weather/%s.shtml'%id req = requests.get(url,headers=header) req.encoding = 'utf-8' html = req.text bs = BeautifulSoup(html,'html.parser') tagToday = bs.select('p[class="tem"]') wth1 = bs.select('p[class="wea"]') for x in tagToday: temperatureHigh.append(x.text.strip()) for z in wth1: wth.append(z.string) return (temperatureHigh, wth) def get_weather_info(city: str): header = { 'Accept':'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', 'Accept-Encoding':'gzip, deflate, sdch', 'Accept-Language':'zh-CN,zh;q=0.8', 'User-Agent':'Mozilla/5.0 (Windows NT 6.1; WOW64) \ AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36' } city_id = get_city_id(city) (sumht, sumwea) = get_7dweather(header,city_id) return show_weather(sumht,sumwea) def get_weather_list_str(): text = "上海(%s)\n杭州(%s)\n" % (get_weather_info('上海'), get_weather_info('杭州')) return text if __name__ == '__main__': get_weather_info('上海') print(get_weather_list_str())
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 13, 5215, 7274, 13, 5215, 10876, 13, 5215, 2897, 13, 29937, 3151, 296, 29918, 3972, 353, 2897, 29889, 2084, 29889, 25721, 22168, 1445, 1649, 29897, 13, 29937, 1596, 29898, 2764, 296, 29918, 3972, 29897, 13, 29937, 10876, 29889, 2084, 29889, 4397, 29898, 2764, 296, 29918, 3972, 29897, 13, 13, 3166, 24512, 29946, 1053, 25685, 29903, 1132, 13, 3166, 869, 705, 1624, 29918, 333, 1053, 590, 1761, 13, 13, 13, 1753, 1510, 29918, 705, 1624, 29898, 2083, 400, 29892, 2083, 705, 29874, 1125, 13, 1678, 851, 353, 6213, 13, 1678, 1018, 29901, 13, 4706, 301, 29896, 353, 525, 233, 187, 172, 30898, 11283, 29974, 2083, 400, 29961, 29900, 29962, 13, 4706, 301, 29906, 353, 525, 30408, 233, 179, 151, 11283, 29974, 2083, 705, 29874, 29961, 29900, 29962, 13, 4706, 851, 353, 29850, 29900, 3400, 426, 29896, 29913, 1642, 4830, 29898, 29880, 29906, 29892, 301, 29896, 29897, 13, 1678, 5174, 29901, 13, 4706, 1596, 877, 31295, 31213, 235, 178, 165, 30780, 30408, 233, 179, 151, 21004, 1495, 13, 1678, 1683, 29901, 13, 4706, 1596, 29898, 29880, 29896, 29897, 13, 4706, 1596, 29898, 29880, 29906, 29897, 13, 1678, 736, 851, 13, 13, 1753, 679, 29918, 12690, 29918, 333, 29898, 978, 29918, 333, 1125, 13, 1678, 301, 353, 590, 1761, 580, 13, 1678, 363, 474, 297, 301, 29901, 13, 4706, 565, 474, 1839, 978, 2033, 1275, 1024, 29918, 333, 29901, 13, 9651, 269, 353, 474, 1839, 333, 2033, 13, 1678, 736, 269, 13, 13, 1753, 679, 29918, 29955, 29881, 705, 1624, 29898, 6672, 29892, 333, 1125, 13, 1678, 396, 30878, 30528, 233, 187, 172, 13, 1678, 10430, 16382, 353, 5159, 13, 1678, 396, 30408, 233, 179, 151, 13, 1678, 281, 386, 353, 5159, 13, 1678, 3142, 353, 525, 1124, 597, 1636, 29889, 705, 1624, 29889, 510, 29889, 18038, 29914, 705, 1624, 22584, 29879, 29889, 29879, 1420, 29915, 29995, 333, 13, 1678, 12428, 353, 7274, 29889, 657, 29898, 2271, 29892, 13662, 29922, 6672, 29897, 13, 1678, 12428, 29889, 22331, 353, 525, 9420, 29899, 29947, 29915, 13, 1678, 3472, 353, 12428, 29889, 726, 13, 1678, 24512, 353, 25685, 29903, 1132, 29898, 1420, 5501, 1420, 29889, 16680, 1495, 13, 1678, 4055, 29911, 397, 388, 353, 24512, 29889, 2622, 877, 29886, 29961, 1990, 543, 1356, 3108, 1495, 13, 1678, 281, 386, 29896, 353, 24512, 29889, 2622, 877, 29886, 29961, 1990, 543, 705, 29874, 3108, 1495, 13, 1678, 363, 921, 297, 4055, 29911, 397, 388, 29901, 13, 4706, 10430, 16382, 29889, 4397, 29898, 29916, 29889, 726, 29889, 17010, 3101, 13, 1678, 363, 503, 297, 281, 386, 29896, 29901, 13, 4706, 281, 386, 29889, 4397, 29898, 29920, 29889, 1807, 29897, 13, 1678, 736, 313, 12863, 1535, 16382, 29892, 281, 386, 29897, 13, 13, 1753, 679, 29918, 705, 1624, 29918, 3888, 29898, 12690, 29901, 851, 1125, 13, 1678, 4839, 353, 426, 13, 1678, 525, 23965, 22099, 726, 29914, 1420, 29892, 6214, 29914, 28392, 29974, 3134, 29892, 6214, 29914, 3134, 29936, 29939, 29922, 29900, 29889, 29929, 29892, 3027, 29914, 2676, 29886, 29892, 3877, 29930, 29936, 29939, 29922, 29900, 29889, 29947, 742, 13, 1678, 525, 23965, 29899, 14934, 22099, 29887, 7554, 29892, 822, 9632, 29892, 28972, 305, 742, 13, 1678, 525, 23965, 29899, 21233, 22099, 17599, 29899, 13778, 29892, 17599, 29936, 29939, 29922, 29900, 29889, 29947, 742, 13, 1678, 525, 2659, 29899, 19661, 22099, 29924, 2112, 2911, 29914, 29945, 29889, 29900, 313, 7685, 405, 29911, 29871, 29953, 29889, 29896, 29936, 399, 9806, 29953, 29946, 29897, 320, 13, 1678, 12113, 3609, 13117, 29914, 29945, 29941, 29955, 29889, 29941, 29953, 313, 29968, 7020, 29892, 763, 1879, 27604, 29897, 10228, 29914, 29945, 29945, 29889, 29900, 29889, 29906, 29947, 29947, 29941, 29889, 29947, 29955, 24544, 29914, 29945, 29941, 29955, 29889, 29941, 29953, 29915, 13, 1678, 500, 13, 1678, 4272, 29918, 333, 353, 679, 29918, 12690, 29918, 333, 29898, 12690, 29897, 13, 1678, 313, 2083, 400, 29892, 2533, 705, 29874, 29897, 353, 679, 29918, 29955, 29881, 705, 1624, 29898, 6672, 29892, 12690, 29918, 333, 29897, 13, 1678, 736, 1510, 29918, 705, 1624, 29898, 2083, 400, 29892, 2083, 705, 29874, 29897, 13, 13, 1753, 679, 29918, 705, 1624, 29918, 1761, 29918, 710, 7295, 13, 1678, 1426, 353, 376, 30429, 30581, 29414, 29879, 2144, 29876, 233, 160, 176, 30765, 29414, 29879, 2144, 29876, 29908, 1273, 313, 657, 29918, 705, 1624, 29918, 3888, 877, 30429, 30581, 5477, 679, 29918, 705, 1624, 29918, 3888, 877, 233, 160, 176, 30765, 8785, 13, 1678, 736, 1426, 13, 13, 361, 4770, 978, 1649, 1275, 525, 1649, 3396, 1649, 2396, 13, 1678, 679, 29918, 705, 1624, 29918, 3888, 877, 30429, 30581, 1495, 13, 1678, 1596, 29898, 657, 29918, 705, 1624, 29918, 1761, 29918, 710, 3101, 13, 2 ]
tests/integration/application/test_attribute_server_and_client.py
microprediction/predictionserver
1
24806
<filename>tests/integration/application/test_attribute_server_and_client.py from predictionserver.clientmixins.attributereader import ( AttributeReader, AttributeType, AttributeGranularity ) from predictionserver.set_config import MICRO_TEST_CONFIG from predictionserver.servermixins.attributeserver import AttributeServer BABLOH_CATTLE = MICRO_TEST_CONFIG['BABLOH_CATTLE'] PUBLIC_PROFILE = { AttributeType.homepage: 'https://www.savetrumble.com.au', AttributeType.repository: 'https://pypi.org/project/microfilter/', AttributeType.paper: 'https://arxiv.org/pdf/1512.01389.pdf', AttributeType.topic: 'AutoMl', AttributeType.description: 'Herding cattle using AutoMl' } PRIVATE_PROFILE = { AttributeType.email: '<EMAIL>', AttributeType.description: 'private description' } # def test_attribute_server(localhost_process): # """ Test using local flask app (see testconf.py """ # print('Running localhost_process test') # ar = AttributeReader() # ar.base_url = 'http://127.0.0.1:5000' # server = AttributeServer() # server.connect(**MICRO_TEST_CONFIG) # email = '<EMAIL>' # server.set_attribute( # attribute_type=AttributeType.email, # granularity=AttributeGranularity.write_key, # write_key=BABLOH_CATTLE, # value=email # ) # email_back = server.get_attribute( # attribute_type=AttributeType.email, # granularity=AttributeGranularity.write_key, # write_key=BABLOH_CATTLE # ) # assert email == email_back # email_back_from_client = ar.get_attribute( # attribute_type=AttributeType.email, # granularity=AttributeGranularity.write_key, # write_key=BABLOH_CATTLE # ) # assert email == email_back_from_client
[ 1, 529, 9507, 29958, 21150, 29914, 27925, 29914, 6214, 29914, 1688, 29918, 12715, 29918, 2974, 29918, 392, 29918, 4645, 29889, 2272, 13, 3166, 18988, 2974, 29889, 4645, 28084, 1144, 29889, 1131, 1091, 329, 406, 1664, 1053, 313, 13, 1678, 23833, 6982, 29892, 23833, 1542, 29892, 23833, 29954, 661, 1070, 537, 13, 29897, 13, 3166, 18988, 2974, 29889, 842, 29918, 2917, 1053, 341, 2965, 1672, 29918, 18267, 29918, 25903, 13, 3166, 18988, 2974, 29889, 2974, 28084, 1144, 29889, 15697, 261, 369, 1053, 23833, 6004, 13, 13, 29933, 2882, 3927, 29950, 29918, 23972, 29911, 1307, 353, 341, 2965, 1672, 29918, 18267, 29918, 25903, 1839, 29933, 2882, 3927, 29950, 29918, 23972, 29911, 1307, 2033, 13, 13, 7056, 13367, 2965, 29918, 8618, 7724, 353, 426, 13, 1678, 23833, 1542, 29889, 5184, 3488, 29901, 525, 991, 597, 1636, 29889, 29879, 485, 300, 5848, 569, 29889, 510, 29889, 585, 742, 13, 1678, 23833, 1542, 29889, 19033, 29901, 525, 991, 597, 29886, 1478, 29875, 29889, 990, 29914, 4836, 29914, 29885, 2357, 4572, 29914, 742, 13, 1678, 23833, 1542, 29889, 19773, 29901, 525, 991, 597, 279, 26560, 29889, 990, 29914, 5140, 29914, 29896, 29945, 29896, 29906, 29889, 29900, 29896, 29941, 29947, 29929, 29889, 5140, 742, 13, 1678, 23833, 1542, 29889, 13010, 29901, 525, 12300, 29924, 29880, 742, 13, 1678, 23833, 1542, 29889, 8216, 29901, 525, 29950, 2018, 292, 27498, 773, 11133, 29924, 29880, 29915, 13, 29913, 13, 13, 29829, 29963, 3040, 29918, 8618, 7724, 353, 426, 13, 1678, 23833, 1542, 29889, 5269, 29901, 12801, 26862, 6227, 29958, 742, 13, 1678, 23833, 1542, 29889, 8216, 29901, 525, 9053, 6139, 29915, 13, 29913, 13, 13, 13, 29937, 822, 1243, 29918, 12715, 29918, 2974, 29898, 7640, 29918, 5014, 1125, 13, 29937, 268, 9995, 4321, 773, 1887, 29784, 623, 313, 4149, 1243, 5527, 29889, 2272, 9995, 13, 29937, 268, 1596, 877, 27795, 15683, 29918, 5014, 1243, 1495, 13, 29937, 268, 564, 353, 23833, 6982, 580, 13, 29937, 268, 564, 29889, 3188, 29918, 2271, 353, 525, 1124, 597, 29896, 29906, 29955, 29889, 29900, 29889, 29900, 29889, 29896, 29901, 29945, 29900, 29900, 29900, 29915, 13, 29937, 268, 1923, 353, 23833, 6004, 580, 13, 29937, 268, 1923, 29889, 6915, 29898, 1068, 29924, 2965, 1672, 29918, 18267, 29918, 25903, 29897, 13, 29937, 268, 4876, 353, 12801, 26862, 6227, 16299, 13, 29937, 268, 1923, 29889, 842, 29918, 12715, 29898, 13, 29937, 308, 5352, 29918, 1853, 29922, 6708, 1542, 29889, 5269, 29892, 13, 29937, 308, 3803, 1070, 537, 29922, 6708, 29954, 661, 1070, 537, 29889, 3539, 29918, 1989, 29892, 13, 29937, 308, 2436, 29918, 1989, 29922, 29933, 2882, 3927, 29950, 29918, 23972, 29911, 1307, 29892, 13, 29937, 308, 995, 29922, 5269, 13, 29937, 268, 1723, 13, 29937, 268, 4876, 29918, 1627, 353, 1923, 29889, 657, 29918, 12715, 29898, 13, 29937, 308, 5352, 29918, 1853, 29922, 6708, 1542, 29889, 5269, 29892, 13, 29937, 308, 3803, 1070, 537, 29922, 6708, 29954, 661, 1070, 537, 29889, 3539, 29918, 1989, 29892, 13, 29937, 308, 2436, 29918, 1989, 29922, 29933, 2882, 3927, 29950, 29918, 23972, 29911, 1307, 13, 29937, 268, 1723, 13, 29937, 268, 4974, 4876, 1275, 4876, 29918, 1627, 13, 29937, 268, 4876, 29918, 1627, 29918, 3166, 29918, 4645, 353, 564, 29889, 657, 29918, 12715, 29898, 13, 29937, 308, 5352, 29918, 1853, 29922, 6708, 1542, 29889, 5269, 29892, 13, 29937, 308, 3803, 1070, 537, 29922, 6708, 29954, 661, 1070, 537, 29889, 3539, 29918, 1989, 29892, 13, 29937, 308, 2436, 29918, 1989, 29922, 29933, 2882, 3927, 29950, 29918, 23972, 29911, 1307, 13, 29937, 268, 1723, 13, 29937, 268, 4974, 4876, 1275, 4876, 29918, 1627, 29918, 3166, 29918, 4645, 13, 2 ]
vis/app/xblock/data/pad.py
ImperialNLP/X-Block
0
162102
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # File : pad.py # Author : <NAME> <<EMAIL>> # Date : 01.11.2020 # Last Modified Date: 09.11.2021 # Last Modified By : <NAME> <<EMAIL>> # # Copyright (c) 2020, Imperial College, London # All rights reserved. # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright notice, this # list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright notice, # this list of conditions and the following disclaimer in the documentation # and/or other materials provided with the distribution. # 3. Neither the name of Imperial College nor the names of its contributors may # be used to endorse or promote products derived from this software without # specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR # TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # # pad sequences to maximum length for batch processing # code borrowed from keras_preprocessing (comes with MIT license) import numpy as np def pad_sequences(sequences, maxlen=None, dtype='int32', padding='pre', truncating='pre', value=0.): """Pads sequences to the same length. """ if not hasattr(sequences, '__len__'): raise ValueError('`sequences` must be iterable.') total_samples = len(sequences) lengths = [] sample_shape = () flag = True for x in sequences: try: lengths.append(len(x)) if flag and len(x): sample_shape = np.asarray(x).shape[1:] flag = False except TypeError: raise ValueError('`sequences` must be a list of iterables. ' 'Found non-iterable: ' + str(x)) if maxlen is None: maxlen = np.max(lengths) is_dtype_str = np.issubdtype(dtype, np.str_) or np.issubdtype(dtype, np.unicode_) if isinstance(value, str) and dtype != object and not is_dtype_str: raise ValueError("`dtype` {} is not compatible with `value`'s type: {}\n" "You should set `dtype=object` for variable length strings." .format(dtype, type(value))) x = np.full((total_samples, maxlen) + sample_shape, value, dtype=dtype) for idx, s in enumerate(sequences): if not len(s): continue # empty list/array was found if truncating == 'pre': trunc = s[-maxlen:] elif truncating == 'post': trunc = s[:maxlen] else: raise ValueError('Truncating type "%s" ' 'not understood' % truncating) # check `trunc` has expected shape trunc = np.asarray(trunc, dtype=dtype) if trunc.shape[1:] != sample_shape: raise ValueError('Shape of sample %s of sequence at position %s ' 'is different from expected shape %s' % (trunc.shape[1:], idx, sample_shape)) if padding == 'post': x[idx, :len(trunc)] = trunc elif padding == 'pre': x[idx, -len(trunc):] = trunc else: raise ValueError('Padding type "%s" not understood' % padding) return x
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 29937, 3497, 795, 584, 17132, 29889, 2272, 13, 29937, 13361, 9651, 584, 529, 5813, 29958, 3532, 26862, 6227, 6778, 13, 29937, 4712, 795, 584, 29871, 29900, 29896, 29889, 29896, 29896, 29889, 29906, 29900, 29906, 29900, 13, 29937, 9208, 3382, 2164, 4712, 29901, 29871, 29900, 29929, 29889, 29896, 29896, 29889, 29906, 29900, 29906, 29896, 13, 29937, 9208, 3382, 2164, 2648, 29871, 584, 529, 5813, 29958, 3532, 26862, 6227, 6778, 13, 29937, 13, 29937, 14187, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29906, 29900, 29892, 21080, 6346, 29892, 4517, 13, 29937, 2178, 10462, 21676, 29889, 13, 29937, 4367, 391, 3224, 322, 671, 297, 2752, 322, 7581, 7190, 29892, 411, 470, 1728, 21733, 29892, 13, 29937, 526, 21905, 4944, 393, 278, 1494, 5855, 526, 1539, 29901, 13, 29937, 1678, 29896, 29889, 4367, 391, 3224, 29879, 310, 2752, 775, 1818, 11551, 278, 2038, 3509, 1266, 8369, 29892, 445, 13, 29937, 418, 1051, 310, 5855, 322, 278, 1494, 2313, 433, 4193, 29889, 13, 29937, 1678, 29906, 29889, 4367, 391, 3224, 29879, 297, 7581, 883, 1818, 18532, 278, 2038, 3509, 1266, 8369, 29892, 13, 29937, 418, 445, 1051, 310, 5855, 322, 278, 1494, 2313, 433, 4193, 297, 278, 5106, 13, 29937, 418, 322, 29914, 272, 916, 17279, 4944, 411, 278, 4978, 29889, 13, 29937, 1678, 29941, 29889, 2448, 2121, 278, 1024, 310, 21080, 6346, 3643, 278, 2983, 310, 967, 17737, 29560, 1122, 13, 29937, 418, 367, 1304, 304, 1095, 272, 344, 470, 27391, 9316, 10723, 515, 445, 7047, 1728, 13, 29937, 418, 2702, 7536, 3971, 10751, 29889, 13, 29937, 13, 29937, 3446, 3235, 7791, 7818, 12982, 1525, 8519, 13756, 13044, 3352, 6770, 6093, 315, 4590, 29979, 22789, 3912, 379, 5607, 8032, 29903, 5300, 8707, 29911, 3960, 29933, 2692, 24125, 376, 3289, 8519, 29908, 5300, 13, 29937, 13764, 29979, 8528, 15094, 1799, 6323, 306, 3580, 5265, 3352, 399, 1718, 29934, 13566, 29059, 29892, 2672, 6154, 15789, 4214, 29892, 350, 2692, 6058, 27848, 3352, 7495, 29892, 6093, 306, 3580, 5265, 3352, 13, 29937, 399, 1718, 29934, 13566, 29059, 8079, 341, 1001, 3210, 13566, 2882, 6227, 11937, 5300, 383, 1806, 8186, 1799, 15842, 319, 349, 8322, 2965, 13309, 1718, 349, 4574, 13152, 1660, 319, 1525, 13, 29937, 28657, 13875, 8890, 29928, 29889, 2672, 11698, 382, 29963, 3919, 24972, 9818, 6093, 315, 4590, 29979, 22789, 3912, 379, 5607, 8032, 6323, 8707, 29911, 3960, 29933, 2692, 24125, 20700, 17705, 6181, 13, 29937, 15842, 13764, 29979, 22471, 26282, 29892, 2672, 4571, 26282, 29892, 2672, 29907, 1367, 3919, 1964, 29892, 317, 4162, 8426, 1964, 29892, 8528, 29923, 3580, 29931, 19926, 29892, 6323, 8707, 1660, 13356, 3919, 25758, 29871, 13, 29937, 21330, 1529, 1692, 29903, 313, 1177, 6154, 15789, 4214, 29892, 350, 2692, 6058, 27848, 3352, 7495, 29892, 13756, 29907, 11499, 13780, 8079, 27092, 1254, 1806, 26027, 21947, 29949, 8452, 6323, 29871, 13, 29937, 26996, 29963, 2965, 2890, 29936, 11247, 1799, 8079, 501, 1660, 29892, 360, 8254, 29892, 6323, 13756, 29943, 1806, 29903, 29936, 6323, 350, 3308, 8895, 1799, 2672, 4945, 29934, 4897, 29911, 2725, 29897, 29832, 8851, 5348, 29871, 13, 29937, 12766, 17171, 29928, 5300, 6732, 13764, 29979, 6093, 18929, 8079, 17705, 2882, 6227, 11937, 29892, 12317, 2544, 4448, 2672, 8707, 29911, 4717, 1783, 29892, 6850, 3960, 1783, 17705, 2882, 6227, 11937, 29892, 6323, 29871, 13, 29937, 323, 8476, 313, 1177, 6154, 15789, 4214, 405, 11787, 5265, 24647, 4741, 6323, 438, 29911, 4448, 22119, 1660, 29897, 9033, 3235, 4214, 2672, 13764, 29979, 399, 29909, 29979, 19474, 8079, 6093, 501, 1660, 29871, 13, 29937, 8079, 3446, 3235, 7791, 7818, 12982, 1525, 29892, 382, 29963, 1430, 10762, 11033, 18118, 1660, 29928, 8079, 6093, 21521, 1799, 8979, 6227, 11937, 8079, 20134, 3210, 21330, 1529, 1692, 29889, 13, 29937, 13, 29937, 17132, 15602, 304, 7472, 3309, 363, 9853, 9068, 13, 29937, 775, 27942, 287, 515, 13023, 294, 29918, 1457, 19170, 313, 26807, 411, 341, 1806, 19405, 29897, 13, 13, 5215, 12655, 408, 7442, 13, 13, 1753, 17132, 29918, 6831, 2063, 29898, 6831, 2063, 29892, 4236, 2435, 29922, 8516, 29892, 26688, 2433, 524, 29941, 29906, 742, 13, 462, 29871, 7164, 2433, 1457, 742, 21022, 1218, 2433, 1457, 742, 995, 29922, 29900, 9575, 13, 1678, 9995, 29925, 7925, 15602, 304, 278, 1021, 3309, 29889, 13, 1678, 9995, 13, 1678, 565, 451, 756, 5552, 29898, 6831, 2063, 29892, 525, 1649, 2435, 1649, 29374, 13, 4706, 12020, 7865, 2392, 877, 29952, 6831, 2063, 29952, 1818, 367, 4256, 519, 29889, 1495, 13, 1678, 3001, 29918, 27736, 353, 7431, 29898, 6831, 2063, 29897, 13, 13, 1678, 27497, 353, 5159, 13, 1678, 4559, 29918, 12181, 353, 3861, 13, 1678, 7353, 353, 5852, 13, 13, 1678, 363, 921, 297, 15602, 29901, 13, 4706, 1018, 29901, 13, 9651, 27497, 29889, 4397, 29898, 2435, 29898, 29916, 876, 13, 9651, 565, 7353, 322, 7431, 29898, 29916, 1125, 13, 18884, 4559, 29918, 12181, 353, 7442, 29889, 294, 2378, 29898, 29916, 467, 12181, 29961, 29896, 17531, 13, 18884, 7353, 353, 7700, 13, 4706, 5174, 20948, 29901, 13, 9651, 12020, 7865, 2392, 877, 29952, 6831, 2063, 29952, 1818, 367, 263, 1051, 310, 4256, 1849, 29889, 525, 13, 462, 632, 525, 9692, 1661, 29899, 1524, 519, 29901, 525, 718, 851, 29898, 29916, 876, 13, 13, 1678, 565, 4236, 2435, 338, 6213, 29901, 13, 4706, 4236, 2435, 353, 7442, 29889, 3317, 29898, 2848, 29879, 29897, 13, 13, 1678, 338, 29918, 29881, 1853, 29918, 710, 353, 7442, 29889, 790, 431, 29881, 1853, 29898, 29881, 1853, 29892, 7442, 29889, 710, 19925, 470, 7442, 29889, 790, 431, 29881, 1853, 29898, 29881, 1853, 29892, 7442, 29889, 2523, 356, 19925, 13, 1678, 565, 338, 8758, 29898, 1767, 29892, 851, 29897, 322, 26688, 2804, 1203, 322, 451, 338, 29918, 29881, 1853, 29918, 710, 29901, 13, 4706, 12020, 7865, 2392, 703, 29952, 29881, 1853, 29952, 6571, 338, 451, 15878, 411, 421, 1767, 20497, 29879, 1134, 29901, 426, 1012, 29876, 29908, 13, 462, 308, 376, 3492, 881, 731, 421, 29881, 1853, 29922, 3318, 29952, 363, 2286, 3309, 6031, 1213, 13, 462, 308, 869, 4830, 29898, 29881, 1853, 29892, 1134, 29898, 1767, 4961, 13, 13, 1678, 921, 353, 7442, 29889, 8159, 3552, 7827, 29918, 27736, 29892, 4236, 2435, 29897, 718, 4559, 29918, 12181, 29892, 995, 29892, 26688, 29922, 29881, 1853, 29897, 13, 1678, 363, 22645, 29892, 269, 297, 26985, 29898, 6831, 2063, 1125, 13, 4706, 565, 451, 7431, 29898, 29879, 1125, 13, 9651, 6773, 29871, 396, 4069, 1051, 29914, 2378, 471, 1476, 13, 4706, 565, 21022, 1218, 1275, 525, 1457, 2396, 13, 9651, 21022, 353, 269, 14352, 3317, 2435, 17531, 13, 4706, 25342, 21022, 1218, 1275, 525, 2490, 2396, 13, 9651, 21022, 353, 269, 7503, 3317, 2435, 29962, 13, 4706, 1683, 29901, 13, 9651, 12020, 7865, 2392, 877, 2308, 4661, 1218, 1134, 11860, 29879, 29908, 525, 13, 462, 632, 525, 1333, 11098, 29915, 1273, 21022, 1218, 29897, 13, 13, 4706, 396, 1423, 421, 509, 4661, 29952, 756, 3806, 8267, 13, 4706, 21022, 353, 7442, 29889, 294, 2378, 29898, 509, 4661, 29892, 26688, 29922, 29881, 1853, 29897, 13, 4706, 565, 21022, 29889, 12181, 29961, 29896, 17531, 2804, 4559, 29918, 12181, 29901, 13, 9651, 12020, 7865, 2392, 877, 24111, 310, 4559, 1273, 29879, 310, 5665, 472, 2602, 1273, 29879, 525, 13, 462, 632, 525, 275, 1422, 515, 3806, 8267, 1273, 29879, 29915, 1273, 13, 462, 632, 313, 509, 4661, 29889, 12181, 29961, 29896, 29901, 1402, 22645, 29892, 4559, 29918, 12181, 876, 13, 13, 4706, 565, 7164, 1275, 525, 2490, 2396, 13, 9651, 921, 29961, 13140, 29892, 584, 2435, 29898, 509, 4661, 4638, 353, 21022, 13, 4706, 25342, 7164, 1275, 525, 1457, 2396, 13, 9651, 921, 29961, 13140, 29892, 448, 2435, 29898, 509, 4661, 1125, 29962, 353, 21022, 13, 4706, 1683, 29901, 13, 9651, 12020, 7865, 2392, 877, 29925, 4676, 1134, 11860, 29879, 29908, 451, 11098, 29915, 1273, 7164, 29897, 13, 1678, 736, 921, 13, 13, 2 ]
tools/gen-precalc-tables.py
andrejo/zxmaze3d
4
42110
#! /usr/bin/env python3 import math import decimal N_DIRECTIONS = 256 # If rounded up to 384 and last element has max value, it has the bit # pattern, that prevents bisection from searching past the last element. N_PRECALC_DRAW_DIST = 384 # Python round() uses "banker's rounding", i.e. "round half even" def round_half_up(d): return int(decimal.Decimal(d).to_integral_value(rounding=decimal.ROUND_HALF_UP)) def fixed_from_float(d): if d >= 127.0: return 0x7FFF elif d <= -128.0: return -0x8000 elif d >= 0.0: return round_half_up(d * 256.0) else: return round_half_up(-d * -256.0) def float_from_fixed(f): return f/256.0 def phi_from_direction(i): return i * 2.0 * math.pi / N_DIRECTIONS def generate_array(f, el_type, name, comment, n_el, geterateValue): f.write(f"// {comment}\n") f.write(f"{el_type} {name}[] = {{") for i in range(n_el): if (i > 0): f.write(",") f.write("\n") f.write(str(geterateValue(i))) f.write("};\n") def generate_direction_array(f, el_type, name, func, comment=None): generate_array(f, el_type, name, comment if comment else name, N_DIRECTIONS, lambda i : func(i, phi_from_direction(i), math.sin(phi_from_direction(i)), math.cos(phi_from_direction(i)))) def generate_distance_array(f, el_type, name, func, comment=None): generate_array(f, el_type, name, comment if comment else name, N_PRECALC_DRAW_DIST, lambda i : func(i, 16*i)) f = open("../tables.c", "w") f.write("// Precalculated Look-up tables\n") f.write("// Generated by " + __file__ + "\n") f.write("\n") f.write("#include <stdlib.h>\n") f.write("\n") generate_direction_array(f, "int", "f_dir_sin", \ lambda i, phi, sin_phi, cos_phi : fixed_from_float(sin_phi)) generate_direction_array(f, "int", "f_dir_cos", \ lambda i, phi, sin_phi, cos_phi : fixed_from_float(cos_phi)) generate_direction_array(f, "int", "f_dir_ctan", \ lambda i, phi, sin_phi, cos_phi : fixed_from_float(cos_phi / sin_phi if sin_phi != 0.0 else (127.0 if cos_phi > 0 else -128.0)), comment="ctan of direction, saturated") generate_direction_array(f, "int", "f_dir_tan", \ lambda i, phi, sin_phi, cos_phi : fixed_from_float(sin_phi / cos_phi if cos_phi != 0.0 else (127.0 if sin_phi > 0 else -128.0)), comment="tan of direction, saturated") generate_distance_array(f, "long", "f16_sqrs", \ lambda distidx, f_dist: (f_dist * f_dist) if (distidx < N_PRECALC_DRAW_DIST-1) else 0x7FFFFFFF, comment="Squares of distance, in 16-shifted fixed point, for fast sqrt") def gen_height(distidx, f_dist): if f_dist > 0: height = round_half_up(65.0 / float_from_fixed(f_dist)) result = 95 - height; return max(result, 0); else: return 0 generate_distance_array(f, "uchar", "draw_heigths", gen_height, comment="Heights of given distance index") def gen_height1(distidx, f_dist): if f_dist > 0: height = round_half_up(100.0 / float_from_fixed(f_dist)) result = 97 + height; return min(result, 191); else: return 191 generate_distance_array(f, "uchar", "draw_heigths1", gen_height1, comment="Heights of given distance index") def gen_height(distidx, f_dist): N_INTENSITIES = 17 INTENSITY_WHITE = 16 if f_dist > 0: distance = float_from_fixed(f_dist) intensity = INTENSITY_WHITE - round_half_up((16.0 * (1.0 / ((distance + 2.0) * 0.34)))) return max(0, min(intensity, INTENSITY_WHITE)); else: return 0 generate_distance_array(f, "uchar", "draw_intens", gen_height, comment="Color intensities of given distance index") f.close()
[ 1, 396, 29991, 847, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 13, 5215, 5844, 13, 5215, 13677, 13, 13, 13, 29940, 29918, 4571, 1525, 9838, 29903, 353, 29871, 29906, 29945, 29953, 13, 13, 13, 29937, 960, 28240, 701, 304, 29871, 29941, 29947, 29946, 322, 1833, 1543, 756, 4236, 995, 29892, 372, 756, 278, 2586, 13, 29937, 4766, 29892, 393, 28057, 289, 895, 428, 515, 11975, 4940, 278, 1833, 1543, 29889, 13, 29940, 29918, 15094, 29907, 1964, 29907, 29918, 29928, 4717, 29956, 29918, 4571, 1254, 353, 29871, 29941, 29947, 29946, 13, 13, 13, 29937, 5132, 4513, 580, 3913, 376, 9157, 261, 29915, 29879, 4513, 292, 613, 474, 29889, 29872, 29889, 376, 14486, 4203, 1584, 29908, 13, 1753, 4513, 29918, 24498, 29918, 786, 29898, 29881, 1125, 13, 1678, 736, 938, 29898, 7099, 3039, 29889, 23307, 29898, 29881, 467, 517, 29918, 14146, 284, 29918, 1767, 29898, 29878, 12449, 29922, 7099, 3039, 29889, 1672, 18783, 29918, 29950, 1964, 29943, 29918, 4897, 876, 13, 13, 13, 1753, 4343, 29918, 3166, 29918, 7411, 29898, 29881, 1125, 13, 1678, 565, 270, 6736, 29871, 29896, 29906, 29955, 29889, 29900, 29901, 13, 4706, 736, 29871, 29900, 29916, 29955, 4198, 29943, 13, 1678, 25342, 270, 5277, 448, 29896, 29906, 29947, 29889, 29900, 29901, 13, 4706, 736, 448, 29900, 29916, 29947, 29900, 29900, 29900, 13, 1678, 25342, 270, 6736, 29871, 29900, 29889, 29900, 29901, 13, 4706, 736, 4513, 29918, 24498, 29918, 786, 29898, 29881, 334, 29871, 29906, 29945, 29953, 29889, 29900, 29897, 13, 1678, 1683, 29901, 13, 4706, 736, 4513, 29918, 24498, 29918, 786, 6278, 29881, 334, 448, 29906, 29945, 29953, 29889, 29900, 29897, 13, 13, 13, 1753, 5785, 29918, 3166, 29918, 20227, 29898, 29888, 1125, 13, 1678, 736, 285, 29914, 29906, 29945, 29953, 29889, 29900, 13, 13, 13, 1753, 1374, 29875, 29918, 3166, 29918, 20845, 29898, 29875, 1125, 13, 1678, 736, 474, 334, 29871, 29906, 29889, 29900, 334, 5844, 29889, 1631, 847, 405, 29918, 4571, 1525, 9838, 29903, 13, 13, 13, 1753, 5706, 29918, 2378, 29898, 29888, 29892, 560, 29918, 1853, 29892, 1024, 29892, 3440, 29892, 302, 29918, 295, 29892, 679, 261, 403, 1917, 1125, 13, 1678, 285, 29889, 3539, 29898, 29888, 29908, 458, 426, 9342, 1012, 29876, 1159, 13, 1678, 285, 29889, 3539, 29898, 29888, 29908, 29912, 295, 29918, 1853, 29913, 426, 978, 29913, 2636, 353, 8620, 1159, 13, 1678, 363, 474, 297, 3464, 29898, 29876, 29918, 295, 1125, 13, 4706, 565, 313, 29875, 1405, 29871, 29900, 1125, 13, 9651, 285, 29889, 3539, 28165, 1159, 13, 4706, 285, 29889, 3539, 14182, 29876, 1159, 13, 4706, 285, 29889, 3539, 29898, 710, 29898, 657, 261, 403, 1917, 29898, 29875, 4961, 13, 1678, 285, 29889, 3539, 703, 3400, 29905, 29876, 1159, 13, 13, 13, 1753, 5706, 29918, 20845, 29918, 2378, 29898, 29888, 29892, 560, 29918, 1853, 29892, 1024, 29892, 3653, 29892, 3440, 29922, 8516, 1125, 13, 1678, 5706, 29918, 2378, 29898, 29888, 29892, 560, 29918, 1853, 29892, 1024, 29892, 3440, 565, 3440, 1683, 1024, 29892, 405, 29918, 4571, 1525, 9838, 29903, 29892, 14013, 474, 584, 3653, 29898, 29875, 29892, 1374, 29875, 29918, 3166, 29918, 20845, 29898, 29875, 511, 5844, 29889, 5223, 29898, 2876, 29918, 3166, 29918, 20845, 29898, 29875, 8243, 5844, 29889, 3944, 29898, 2876, 29918, 3166, 29918, 20845, 29898, 29875, 13697, 13, 13, 13, 1753, 5706, 29918, 19244, 29918, 2378, 29898, 29888, 29892, 560, 29918, 1853, 29892, 1024, 29892, 3653, 29892, 3440, 29922, 8516, 1125, 13, 1678, 5706, 29918, 2378, 29898, 29888, 29892, 560, 29918, 1853, 29892, 1024, 29892, 3440, 565, 3440, 1683, 1024, 29892, 405, 29918, 15094, 29907, 1964, 29907, 29918, 29928, 4717, 29956, 29918, 4571, 1254, 29892, 14013, 474, 584, 3653, 29898, 29875, 29892, 29871, 29896, 29953, 29930, 29875, 876, 13, 13, 13, 29888, 353, 1722, 703, 6995, 24051, 29889, 29883, 613, 376, 29893, 1159, 13, 13, 29888, 29889, 3539, 703, 458, 4721, 15807, 630, 7419, 29899, 786, 6131, 29905, 29876, 1159, 13, 29888, 29889, 3539, 703, 458, 3251, 630, 491, 376, 718, 4770, 1445, 1649, 718, 6634, 29876, 1159, 13, 29888, 29889, 3539, 14182, 29876, 1159, 13, 29888, 29889, 3539, 14822, 2856, 529, 4172, 1982, 29889, 29882, 14247, 29876, 1159, 13, 29888, 29889, 3539, 14182, 29876, 1159, 13, 13, 13, 17158, 29918, 20845, 29918, 2378, 29898, 29888, 29892, 376, 524, 613, 376, 29888, 29918, 3972, 29918, 5223, 613, 320, 13, 1678, 14013, 474, 29892, 1374, 29875, 29892, 4457, 29918, 2876, 29892, 6776, 29918, 2876, 584, 4343, 29918, 3166, 29918, 7411, 29898, 5223, 29918, 2876, 876, 13, 13, 13, 17158, 29918, 20845, 29918, 2378, 29898, 29888, 29892, 376, 524, 613, 376, 29888, 29918, 3972, 29918, 3944, 613, 320, 13, 1678, 14013, 474, 29892, 1374, 29875, 29892, 4457, 29918, 2876, 29892, 6776, 29918, 2876, 584, 4343, 29918, 3166, 29918, 7411, 29898, 3944, 29918, 2876, 876, 13, 13, 13, 17158, 29918, 20845, 29918, 2378, 29898, 29888, 29892, 376, 524, 613, 376, 29888, 29918, 3972, 29918, 312, 273, 613, 320, 13, 1678, 14013, 474, 29892, 1374, 29875, 29892, 4457, 29918, 2876, 29892, 6776, 29918, 2876, 584, 4343, 29918, 3166, 29918, 7411, 29898, 3944, 29918, 2876, 847, 4457, 29918, 2876, 565, 4457, 29918, 2876, 2804, 29871, 29900, 29889, 29900, 1683, 313, 29896, 29906, 29955, 29889, 29900, 565, 6776, 29918, 2876, 1405, 29871, 29900, 1683, 448, 29896, 29906, 29947, 29889, 29900, 8243, 3440, 543, 312, 273, 310, 5305, 29892, 269, 1337, 630, 1159, 13, 13, 13, 17158, 29918, 20845, 29918, 2378, 29898, 29888, 29892, 376, 524, 613, 376, 29888, 29918, 3972, 29918, 13161, 613, 320, 13, 1678, 14013, 474, 29892, 1374, 29875, 29892, 4457, 29918, 2876, 29892, 6776, 29918, 2876, 584, 4343, 29918, 3166, 29918, 7411, 29898, 5223, 29918, 2876, 847, 6776, 29918, 2876, 565, 6776, 29918, 2876, 2804, 29871, 29900, 29889, 29900, 1683, 313, 29896, 29906, 29955, 29889, 29900, 565, 4457, 29918, 2876, 1405, 29871, 29900, 1683, 448, 29896, 29906, 29947, 29889, 29900, 8243, 3440, 543, 13161, 310, 5305, 29892, 269, 1337, 630, 1159, 13, 13, 13, 17158, 29918, 19244, 29918, 2378, 29898, 29888, 29892, 376, 5426, 613, 376, 29888, 29896, 29953, 29918, 3044, 2288, 613, 320, 13, 1678, 14013, 1320, 13140, 29892, 285, 29918, 5721, 29901, 313, 29888, 29918, 5721, 334, 285, 29918, 5721, 29897, 565, 313, 5721, 13140, 529, 405, 29918, 15094, 29907, 1964, 29907, 29918, 29928, 4717, 29956, 29918, 4571, 1254, 29899, 29896, 29897, 1683, 29871, 29900, 29916, 29955, 22098, 4198, 29943, 29892, 3440, 543, 29903, 339, 5114, 310, 5418, 29892, 297, 29871, 29896, 29953, 29899, 10889, 287, 4343, 1298, 29892, 363, 5172, 18074, 2273, 1159, 13, 13, 13, 1753, 2531, 29918, 3545, 29898, 5721, 13140, 29892, 285, 29918, 5721, 1125, 13, 1678, 565, 285, 29918, 5721, 1405, 29871, 29900, 29901, 13, 4706, 3171, 353, 4513, 29918, 24498, 29918, 786, 29898, 29953, 29945, 29889, 29900, 847, 5785, 29918, 3166, 29918, 20227, 29898, 29888, 29918, 5721, 876, 13, 4706, 1121, 353, 29871, 29929, 29945, 448, 3171, 29936, 13, 4706, 736, 4236, 29898, 2914, 29892, 29871, 29900, 416, 13, 1678, 1683, 29901, 13, 4706, 736, 29871, 29900, 13, 17158, 29918, 19244, 29918, 2378, 29898, 29888, 29892, 376, 24059, 613, 376, 4012, 29918, 354, 335, 386, 29879, 613, 2531, 29918, 3545, 29892, 3440, 543, 3868, 5861, 310, 2183, 5418, 2380, 1159, 13, 13, 13, 1753, 2531, 29918, 3545, 29896, 29898, 5721, 13140, 29892, 285, 29918, 5721, 1125, 13, 1678, 565, 285, 29918, 5721, 1405, 29871, 29900, 29901, 13, 4706, 3171, 353, 4513, 29918, 24498, 29918, 786, 29898, 29896, 29900, 29900, 29889, 29900, 847, 5785, 29918, 3166, 29918, 20227, 29898, 29888, 29918, 5721, 876, 13, 4706, 1121, 353, 29871, 29929, 29955, 718, 3171, 29936, 13, 4706, 736, 1375, 29898, 2914, 29892, 29871, 29896, 29929, 29896, 416, 13, 1678, 1683, 29901, 13, 4706, 736, 29871, 29896, 29929, 29896, 13, 17158, 29918, 19244, 29918, 2378, 29898, 29888, 29892, 376, 24059, 613, 376, 4012, 29918, 354, 335, 386, 29879, 29896, 613, 2531, 29918, 3545, 29896, 29892, 3440, 543, 3868, 5861, 310, 2183, 5418, 2380, 1159, 13, 13, 13, 1753, 2531, 29918, 3545, 29898, 5721, 13140, 29892, 285, 29918, 5721, 1125, 13, 1678, 405, 29918, 10192, 1430, 29903, 1806, 29059, 353, 29871, 29896, 29955, 13, 1678, 19578, 1430, 29903, 11937, 29918, 25039, 9094, 353, 29871, 29896, 29953, 13, 1678, 565, 285, 29918, 5721, 1405, 29871, 29900, 29901, 13, 4706, 5418, 353, 5785, 29918, 3166, 29918, 20227, 29898, 29888, 29918, 5721, 29897, 13, 4706, 26171, 353, 19578, 1430, 29903, 11937, 29918, 25039, 9094, 448, 4513, 29918, 24498, 29918, 786, 3552, 29896, 29953, 29889, 29900, 334, 313, 29896, 29889, 29900, 847, 5135, 19244, 718, 29871, 29906, 29889, 29900, 29897, 334, 29871, 29900, 29889, 29941, 29946, 13697, 13, 4706, 736, 4236, 29898, 29900, 29892, 1375, 29898, 524, 575, 537, 29892, 19578, 1430, 29903, 11937, 29918, 25039, 9094, 2483, 13, 1678, 1683, 29901, 13, 4706, 736, 29871, 29900, 13, 17158, 29918, 19244, 29918, 2378, 29898, 29888, 29892, 376, 24059, 613, 376, 4012, 29918, 524, 575, 613, 2531, 29918, 3545, 29892, 3440, 543, 3306, 12838, 1907, 310, 2183, 5418, 2380, 1159, 13, 13, 29888, 29889, 5358, 580, 13, 2 ]
library/cohesity_agent.py
cohesity/cohesity-ansible-role
10
146876
#!/usr/bin/python # Copyright (c) 2018 Cohesity Inc # Apache License Version 2.0 from __future__ import (absolute_import, division, print_function) __metaclass__ = type import json import os import shutil import time from ansible.module_utils.basic import AnsibleModule from ansible.module_utils._text import to_bytes, to_native from ansible.module_utils.urls import open_url, urllib_error from tempfile import mkstemp, mkdtemp try: # => When unit testing, we need to look in the correct location however, when run via ansible, # => the expectation is that the modules will live under ansible. from module_utils.storage.cohesity.cohesity_utilities import cohesity_common_argument_spec, \ raise__cohesity_exception__handler, REQUEST_TIMEOUT from module_utils.storage.cohesity.cohesity_auth import get__cohesity_auth__token except Exception as e: from ansible.module_utils.storage.cohesity.cohesity_utilities import cohesity_common_argument_spec, \ raise__cohesity_exception__handler, REQUEST_TIMEOUT from ansible.module_utils.storage.cohesity.cohesity_auth import get__cohesity_auth__token ANSIBLE_METADATA = { 'metadata_version': '1.0', 'supported_by': 'community', 'status': ['preview'] } DOCUMENTATION = ''' module: cohesity_agent short_description: Management of Cohesity Physical Agent description: - Ansible Module used to deploy or remove the Cohesity Physical Agent from supported Linux Machines. - When executed in a playbook, the Cohesity Agent installation will be validated and the appropriate - state action will be applied. The most recent version of the Cohesity Agent will be automatically - downloaded to the host. version_added: '2.6.5' author: - <NAME> (github.com/exospheredata) - Cohesity, Inc options: state: description: - Determines if the agent should be C(present) or C(absent) from the host choices: - present - absent default: 'present' download_location: description: - Optional directory path to which the installer will be downloaded. If not selected, then a temporary - directory will be created in the default System Temp Directory. When choosing an alternate directory, - the directory and installer will not be deleted at the end of the execution. service_user: description: - Username underwhich the Cohesity Agent will be installed and run. - This user must exist unless I(create_user=True) is also configured. - This user must be an existing user for native installation. default: 'cohesityagent' for script based installation service_group: description: - Group underwhich permissions will be configured for the Cohesity Agent configuration. - This group must exist unless I(create_user=True) is also configured. - This parameter doesn't apply for native installation default: 'cohesityagent' for script based installation create_user: description: - When enabled, will create a new user and group based on the values of I(service_user) and I(service_group) - This parameter does not apply for native installations type: bool default: True file_based: description: - When enabled, will install the agent in non-LVM mode and support only file based backups type: bool default: False native_package: description: - When enabled, native installer packages are used based on the operating system type: bool default: False download_uri: description: - The download uri from where the installer can be downloaded default: '' operating_system: description: - ansible_distribution from facts, this value is automatically populated. Not given by module user extends_documentation_fragment: - cohesity requirements: [] ''' EXAMPLES = ''' # Install the current version of the agent on Linux - cohesity_agent: server: cohesity.lab cohesity_admin: admin cohesity_password: password state: present # Install the current version of the agent with custom User and Group - cohesity_agent: server: cohesity.lab cohesity_admin: admin cohesity_password: password state: present service_user: cagent service_group: cagent create_user: True # Removes the current installed agent from the host - cohesity_agent: server: cohesity.lab cohesity_admin: admin cohesity_password: password state: absent # Download the agent installer to a custom location. - cohesity_agent: server: cohesity.lab cohesity_admin: admin cohesity_password: password download_location: /software/installers state: present # Install the current version of the agent on Linux using native installers, the service user here should be an # existing user - cohesity_agent: server: cohesity.lab cohesity_admin: admin cohesity_password: password state: present service_user: cagent native_package: True # Install the cohesity agent using native package downloaded from given URI. Here, the Cohesity cluster credentials are not required - cohesity_agent: state: present service_user: cagent native_package: True download_uri: 'http://10.2.145.47/files/bin/installers/el-cohesity-agent-6.3-1.x86_64.rpm' ''' RETURN = ''' ''' SLEEP_TIME_SECONDS = 120 SECONDS_MINUTES_CONVERSION = 60 class InstallError(Exception): pass def verify_dependencies(): # => TODO: Need to add package dependency checks for: # => wget, rsync, lsof, nfs-utils, lvm2 pass def check_agent(module, results): # => Determine if the Cohesity Agent is currently installed aix_agent_path = "/usr/local/cohesity/agent/aix_agent.sh" def_agent_path = "/etc/init.d/cohesity-agent" # Look for default ansible agent path and aix agent path. agent_path = def_agent_path if os.path.exists(def_agent_path) else \ aix_agent_path if os.path.exists(aix_agent_path) else None if agent_path: cmd = "%s version" % agent_path rc, out, err = module.run_command(cmd) split_out = out.split("\n") version = "" for v in split_out: if v.startswith('Version'): version = v.split(" ")[-1] break if version: # => When the agent is installed, we should be able to return # => the version information results['version'] = version else: # => If this didn't return a Version, then we have bigger problems # => and probably should try to re-install or force the uninstall. results['version'] = "unknown" results['check_agent'] = dict( stdout=out, stderr=err ) return results elif os.path.exists("/etc/cohesity-agent"): # => If the file is found then let's return an unknown state # => immediately results['version'] = "unknown" return results else: cmd = "ps -aux | grep crux/bin/linux_agent | grep -v python | awk '{print $2}'" rc, out, err = module.run_command( cmd, check_rc=True, use_unsafe_shell=True) if out: orphaned_agents = out.split("\n") for process in orphaned_agents: if process: try: cmd = "kill -9 {0}".format(process) except BaseException: cmd = "kill -9 %s" % (process) rc, out, err = module.run_command(cmd) if err: pattern = "No such process" if pattern in err: # => Since the kill command returned 'No such process' we will just continue pass else: results['changed'] = False results['Failed'] = True results['check_agent'] = dict( stdout=out, stderr=err ) results['process_id'] = process module.fail_json( msg="Failed to remove an orphaned Cohesity Agent service which is still running", **results) else: pass results['version'] = False return results else: # => If the files are not found then let's return False # => immediately results['version'] = False return results def download_agent(module, path): try: if module.params.get('operating_system') == "AIX": server = module.params.get('cluster') token = get__cohesity_auth__token(module) uri = "https://" + server + \ "/irisservices/api/v1/public/physicalAgents/download?hostType=kAix&agentType=kJava" headers = { "Accept": "application/octet-stream", "Authorization": "Bearer " + token, "user-agent": "cohesity-ansible/v2.3.0"} elif not module.params.get('download_uri'): os_type = "Linux" server = module.params.get('cluster') token = get__cohesity_auth__token(module) package_type = 'kScript' if module.params.get('native_package'): if module.params.get('operating_system') in ('CentOS', 'RedHat'): package_type = 'kRPM' elif module.params.get('operating_system') == 'SLES': package_type = 'kSuseRPM' elif module.params.get('operating_system') == 'Ubuntu': package_type = 'kDEB' uri = "https://" + server + \ "/irisservices/api/v1/public/physicalAgents/download?hostType=k" + os_type + '&pkgType=' + package_type headers = { "Accept": "application/octet-stream", "Authorization": "Bearer " + token, "user-agent": "cohesity-ansible/v2.3.0"} else: uri = module.params.get('download_uri') headers = { "Accept": "application/octet-stream", "user-agent": "cohesity-ansible/v2.3.0"} agent = open_url(url=uri, headers=headers, validate_certs=False, timeout=REQUEST_TIMEOUT) resp_headers = agent.headers if 'content-disposition' in resp_headers.keys(): filename = resp_headers['content-disposition'].split("=")[1] else: filename = 'cohesity-agent-installer' filename = path + "/" + filename try: f = open(filename, "wb") f.write(agent.read()) os.chmod(filename, 0o755) except Exception as e: raise InstallError(e) finally: f.close() except urllib_error.HTTPError as e: error_msg = json.loads(e.read()) if 'message' in error_msg: module.fail_json( msg="Failed to download the Cohesity Agent", reason=error_msg['message']) else: raise__cohesity_exception__handler(e, module) except urllib_error.URLError as e: # => Capture and report any error messages. raise__cohesity_exception__handler(e.read(), module) except Exception as error: raise__cohesity_exception__handler(error, module) return filename def installation_failures(module, stdout, rc, message): # => The way that this installer works, we will not get back messages in stderr # => when a failure occurs. For this reason, we need to jump through some hoops # => to extract the error messages. The install will *Partially* complete even # => if certain dependencies are missing. # => # => This block of code will first split the stdout into a List of strings that # => we will filter for any line which contains *Error:*. Those lines will be # => returned to a new list *stderr* which will be formatted into a \n delimited # => string as the final step, we will raise a module failure to halt progress. stdout_lines = stdout.split("\n") # => Grab any Line that begins with Error: stderr = [k for k in stdout_lines if 'Error:' in k] stderr = "\n".join(stderr) # => Grab any Line that begins with WARNING: stdwarn = [k for k in stdout_lines if 'WARNING:' in k] stdwarn = "\n".join(stdwarn) module.fail_json( changed=False, msg=message, error=stderr, output=stdout, warn=stdwarn, exitcode=rc) def install_agent(module, installer, native): # => This command will run the self-extracting installer for the agent on machine and # => suppress opening a new window (nox11) and not show the extraction (noprogress) results # => which end up in stderr. # # => Note: Python 2.6 doesn't fully support the new string formatters, so this # => try..except will give us a clean backwards compatibility. if not native: install_opts = "--create-user " + \ str(int(module.params.get('create_user'))) + " " if module.params.get('service_user'): install_opts += "--service-user " + \ module.params.get('service_user') + " " if module.params.get('service_group'): install_opts += "--service-group " + \ module.params.get('service_group') + " " if module.params.get('file_based'): install_opts += "--skip-lvm-check " try: cmd = "{0}/setup.sh --install --yes {1}".format( installer, install_opts) except Exception as e: cmd = "%s/setup.sh --install --yes %s" % (installer, install_opts) else: try: if module.params.get('service_user'): user = module.params.get('service_user') if module.params.get('operating_system') == "Ubuntu": cmd = "sudo COHESITYUSER={0} dpkg -i {1}".format(user, installer) elif module.params.get('operating_system') in ("CentOS", "RedHat"): cmd = "sudo COHESITYUSER={0} rpm -i {1}".format(user, installer) elif module.params.get('operating_system') == "AIX": cmd = "sudo COHESITYUSER={0} installp -ad {1} all".format(user, installer) else: installation_failures( module, "", "", str(module.params.get('operating_system')) + " isn't supported by cohesity ansible module") except Exception as e: if module.params.get('operating_system') == "Ubuntu": cmd = "sudo COHESITYUSER=%s dpkg -i %s" % (user, installer) elif module.params.get('operating_system') in ("CentOS", "RedHat"): cmd = "sudo COHESITYUSER=%s rpm -i %s" % (user, installer) rc, stdout, stderr = module.run_command(cmd, cwd=installer) # => Any return code other than 0 is considered a failure. if rc: installation_failures( module, stdout, rc, "Cohesity Agent is partially installed") return (True, "Successfully Installed the Cohesity agent") def extract_agent(module, filename): # => This command will run the self-extracting installer in no execution mode # # => Note: Python 2.6 doesn't fully support the new string formatters, so this # => try..except will give us a clean backwards compatibility. directory = os.path.dirname(os.path.abspath(filename)) target = directory + "/install_files" create_download_dir(module, target) try: cmd = "{0} --nox11 --noexec --target {1} ".format(filename, target) except Exception as e: cmd = "%s --nox11 --noexec --target %s " % (filename, target) rc, stdout, stderr = module.run_command(cmd) # => Any return code other than 0 is considered a failure. if rc: installation_failures( module, stdout, rc, "Cohesity Agent is partially installed") return (True, "Successfully Installed the Cohesity agent", target) def remove_agent(module, installer, native): # => This command will run the self-extracting installer for the agent on machine and # => suppress opening a new window (nox11) and not show the extraction (noprogress) results # => which end up in stderr. # # => Note: Python 2.6 doesn't fully support the new string formatters, so this # => try..except will give us a clean backwards compatibility. if not native: try: cmd = "{0}/setup.sh --full-uninstall --yes".format(installer) except Exception as e: cmd = "%s/setup.sh --full-uninstall --yes" % (installer) rc, out, err = module.run_command(cmd, cwd=installer) # => Any return code other than 0 is considered a failure. if rc: installation_failures( module, out, rc, "Cohesity Agent is partially installed") else: if module.params.get('operating_system') == "AIX": cmd = "installp -u cohesity_agent.rte" rc, out, err = module.run_command(cmd) if rc: installation_failures( module, stdout, rc, "Failed to uninstall cohesity agent") elif module.params.get('operating_system') == "Ubuntu": cmd = "sudo dpkg -P cohesity-agent" rc, stdout, stderr = module.run_command(cmd) if rc: installation_failures( module, stdout, rc, "Failed to uninstall cohesity agent ") elif module.params.get('operating_system') in ("CentOS", "RedHat"): cmd = "sudo rpm -e cohesity-agent" rc, stdout, stderr = module.run_command(cmd) if rc: installation_failures( module, stdout, rc, "Failed to uninstall cohesity agent") cmd = "sudo rm -rf /etc/cohesity-agent" rc, stdout, stderr = module.run_command(cmd) if rc: installation_failures( module, stdout, rc, "The cohesity agent is uninstalled but failed to remove /etc/cohesity-agent") else: installation_failures( module, "", "", str(module.params.get('operating_system')) + " is not supported by cohesity ansible module") return (True, "Successfully Removed the Cohesity agent") def create_download_dir(module, dir_path): # => Note: 2018-12-06 # => Added this method to provide an alternate parameter to download the installer. # => This code was almost entirely pulled out of the Ansible File module. curpath = '' # => Determine if the download directory exists and if not then create it. for dirname in dir_path.strip('/').split('/'): curpath = '/'.join([curpath, dirname]) # Remove leading slash if we're creating a relative path if not os.path.isabs(dir_path): curpath = curpath.lstrip('/') b_curpath = to_bytes(curpath, errors='surrogate_or_strict') if not os.path.exists(b_curpath): try: os.mkdir(b_curpath) except OSError as ex: import errno # Possibly something else created the dir since the os.path.exists # check above. As long as it's a dir, we don't need to error # out. if not (ex.errno == errno.EEXIST and os.path.isdir(b_curpath)): raise def get_source_details(module, source_id): ''' Get protection source details :param module: object that holds parameters passed to the module :param source_id: protection source id :return: ''' server = module.params.get('cluster') validate_certs = module.params.get('validate_certs') token = get__cohesity_auth__token(module) try: if source_id: uri = "https://" + server + \ "/irisservices/api/v1/public/protectionSources?id=" + str(source_id) else: uri = "https://" + server + \ "/irisservices/api/v1/public/protectionSources?environments=kPhysical" headers = {"Accept": "application/json", "Authorization": "Bearer " + token, "user-agent": "cohesity-ansible/v2.3.0"} response = open_url( url=uri, headers=headers, validate_certs=validate_certs, method="GET", timeout=REQUEST_TIMEOUT) response = json.loads(response.read()) if source_id: nodes = response else: nodes = response[0]['nodes'] source_details = dict() for source in nodes: if source['protectionSource']['name'] == module.params.get('host'): source_details['agent'] =\ source['protectionSource']['physicalProtectionSource']['agents'][0] source_details['id'] = source['protectionSource']['id'] if not source_details: module.fail_json( changed=False, msg="Can't find the host on the cluster") return source_details except urllib_error.URLError as e: # => Capture and report any error messages. raise__cohesity_exception__handler(e.read(), module) except Exception as error: raise__cohesity_exception__handler(error, module) def update_agent(module): ''' upgrades the agent on physical servers :param module: object that holds parameters passed to the module :return: ''' server = module.params.get('cluster') validate_certs = module.params.get('validate_certs') token = get__cohesity_auth__token(module) result = dict( changed=False, msg='', version='' ) try: source_details = get_source_details(module, None) if source_details['agent']['upgradability'] == 'kUpgradable': uri = "https://" + server + \ "/irisservices/api/v1/public/physicalAgents/upgrade" headers = {"Accept": "application/json", "Authorization": "Bearer " + token, "user-agent": "cohesity-ansible/v2.3.0"} payload = { "agentIds": [source_details['agent']['id']] } response = open_url( url=uri, data=json.dumps(payload), headers=headers, validate_certs=validate_certs, method="POST", timeout=REQUEST_TIMEOUT) wait_time = module.params.get('wait_minutes') while wait_time > 0: poll_source_details = get_source_details(module, source_details['id']) if not poll_source_details: result['changed'] = True result['msg'] = "Update agent request is accepted but failed to check agent" \ " status during upgrade wait time" result['version'] = source_details['agent']['version'] module.exit_json(**result) elif poll_source_details['agent'].get('upgradeStatusMessage', ''): module.fail_json( changed=False, msg="Failed to upgrade agent. " + poll_source_details['agent']['upgradeStatusMessage']) elif poll_source_details['agent']['upgradeStatus'] == 'kFinished': result['changed'] = True result['msg'] = "Successfully upgraded the agent" result['version'] = poll_source_details['agent']['version'] module.exit_json(**result) time.sleep(SLEEP_TIME_SECONDS) wait_time = wait_time - (SLEEP_TIME_SECONDS/SECONDS_MINUTES_CONVERSION) result['changed'] = True result['msg'] = "The agent upgrade request is accepted." \ " The upgrade is not finished in the wait time" result['version'] = source_details['agent']['version'] module.exit_json(**result) elif source_details['agent']['upgradability'] == 'kCurrent': result['msg'] = "The host has the latest agent version" result['version'] = source_details['agent']['version'] module.exit_json(**result) elif source_details['agent']['upgradability'] == 'kNonUpgradableAgentIsNewer': result['msg'] = "The agent version running on the host is newer" \ " than the agent version on the cluster" result['version'] = source_details['agent']['version'] module.exit_json(**result) elif source_details['agent']['upgradability'] == 'kNonUpgradableAgentIsOld': module.fail_json( changed=False, msg="The agent version running on the host is too old to support upgrades") else: module.fail_json( changed=False, msg="Can't upgrade the agent due to unknown or invalid" " agent version running on the host") except urllib_error.URLError as e: # => Capture and report any error messages. raise__cohesity_exception__handler(e.read(), module) except Exception as error: raise__cohesity_exception__handler(error, module) def main(): # => Load the default arguments including those specific to the Cohesity Agent. argument_spec = cohesity_common_argument_spec() argument_spec.update( dict( state=dict(choices=['present', 'absent'], default='present'), download_location=dict(default=''), service_user=dict(default='cohesityagent'), service_group=dict(default='cohesityagent'), create_user=dict(default=True, type='bool'), file_based=dict(default=False, type='bool'), native_package=dict(default=False, type='bool'), download_uri=dict(defaut=''), operating_system=dict(defalut="", type='str'), host=dict(type='str', default=''), upgrade=dict(type='bool', default=False), wait_minutes=dict(type='int', default=30), ) ) # => Create a new module object module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=True) results = dict( changed=False, version=False, state=module.params.get('state') ) # => Make a temporary directory to house the downloaded installer. if module.params.get('download_location'): tempdir = module.params.get('download_location') create_download_dir(module, tempdir) else: tempdir = mkdtemp( prefix="ansible." ) # Agent installation for AIX operating system is done using native package. if module.params.get('operating_system') == "AIX": module.params['native_package'] = True success = True try: if module.check_mode: results = check_agent(module, results) check_mode_results = dict( changed=False, msg="Check Mode: Agent is Currently not Installed", version="" ) if module.params.get('state') == "present": if results['version']: check_mode_results[ 'msg'] = "Check Mode: Agent is currently installed. No changes" else: check_mode_results[ 'msg'] = "Check Mode: Agent is currently not installed. This action would install the Agent." check_mode_results['version'] = results['version'] else: if results['version']: check_mode_results[ 'msg'] = "Check Mode: Agent is currently installed. This action would uninstall the Agent." check_mode_results['version'] = results['version'] else: check_mode_results[ 'msg'] = "Check Mode: Agent is currently not installed. No changes." module.exit_json(**check_mode_results) elif module.params.get('state') == "present" and not module.params.get('upgrade'): # => Check if the Cohesity Agent is currently installed and only trigger the install # => if the agent does not exist. results = check_agent(module, results) if not results['version']: if not module.params.get('native_package'): results['filename'] = download_agent(module, tempdir) results['changed'], results['message'], results['installer'] = extract_agent( module, results['filename']) results['changed'], results['message'] = install_agent( module, results['installer'], False) results = check_agent(module, results) else: results['filename'] = download_agent(module, tempdir) results['changed'], results['message'] = install_agent(module, results['filename'], True) results = check_agent(module, results) elif results['version'] == "unknown": # => There is a problem that we should invesitgate. module.fail_json( msg="Cohesity Agent is partially installed", **results) else: # => If we received a valid version then the assumption will be # => that the Agent is installed. We should simply pass it foward # => and act like things are normal. pass elif module.params.get('state') == "present" and module.params.get('upgrade'): if not module.params.get('host'): module.fail_json( changed=False, msg="The host parameter is required for agent upgrades") update_agent(module) elif module.params.get('state') == "absent": # => Check if the Cohesity Agent is currently installed and only trigger the uninstall # => if the agent exists. results = check_agent(module, results) # => If anything is returned, we should remove the agent. We also don't care if there # => is any output from the check so we will pop that out of the results to clean up # => our return data. if results['version']: if not module.params.get('native_package'): results.pop('check_agent', None) # => When removing the agent, we will need to download the installer once again, # => and then run the --full-uninstall command. results['filename'] = download_agent(module, tempdir) results['changed'], results['message'], results['installer'] = extract_agent( module, results['filename']) results['changed'], results['message'] = remove_agent( module, results['installer'], False) else: results['changed'], results['message'] = remove_agent(module, "", True) else: # => This error should never happen based on the set assigned to the parameter. # => However, in case, we should raise an appropriate error. module.fail_json(msg="Invalid State selected: {0}".format( module.params.get('state')), changed=False) except Exception as error: # => The exception handler should still trigger but just in case, let's set this # => variable 'success' to be False. success = False # => Call the proper error handler. msg = "Unexpected error caused while managing the Cohesity Linux Agent." raise__cohesity_exception__handler(error, module, msg) finally: # => We should delete the downloaded installer regardless of our success. This could be debated # => either way but seems like a better choice. if module.params.get('download_location'): if 'installer' in results: shutil.rmtree(results['installer']) else: shutil.rmtree(tempdir) if success: # -> Return Ansible JSON module.exit_json(**results) else: module.fail_json(msg="Cohesity Agent Failed", **results) if __name__ == '__main__': main()
[ 1, 18787, 4855, 29914, 2109, 29914, 4691, 13, 29937, 14187, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29896, 29947, 315, 1148, 267, 537, 9266, 13, 29937, 13380, 19245, 10079, 29871, 29906, 29889, 29900, 13, 13, 3166, 4770, 29888, 9130, 1649, 1053, 313, 23552, 29918, 5215, 29892, 8542, 29892, 1596, 29918, 2220, 29897, 13, 1649, 2527, 562, 605, 1649, 353, 1134, 13, 13, 5215, 4390, 13, 5215, 2897, 13, 5215, 528, 4422, 13, 5215, 931, 13, 13, 3166, 385, 1687, 29889, 5453, 29918, 13239, 29889, 16121, 1053, 530, 1687, 7355, 13, 3166, 385, 1687, 29889, 5453, 29918, 13239, 3032, 726, 1053, 304, 29918, 13193, 29892, 304, 29918, 11487, 13, 3166, 385, 1687, 29889, 5453, 29918, 13239, 29889, 26045, 1053, 1722, 29918, 2271, 29892, 3142, 1982, 29918, 2704, 13, 3166, 5694, 1445, 1053, 14690, 303, 3451, 29892, 14690, 29881, 7382, 13, 13, 2202, 29901, 13, 1678, 396, 1149, 1932, 5190, 6724, 29892, 591, 817, 304, 1106, 297, 278, 1959, 4423, 3138, 29892, 746, 1065, 3025, 385, 1687, 29892, 13, 1678, 396, 1149, 278, 23227, 338, 393, 278, 10585, 674, 5735, 1090, 385, 1687, 29889, 13, 1678, 515, 3883, 29918, 13239, 29889, 12925, 29889, 1111, 13244, 537, 29889, 1111, 13244, 537, 29918, 4422, 1907, 1053, 16165, 267, 537, 29918, 9435, 29918, 23516, 29918, 6550, 29892, 320, 13, 4706, 12020, 1649, 1111, 13244, 537, 29918, 11739, 1649, 13789, 29892, 5195, 14130, 29918, 15307, 12015, 13, 1678, 515, 3883, 29918, 13239, 29889, 12925, 29889, 1111, 13244, 537, 29889, 1111, 13244, 537, 29918, 5150, 1053, 679, 1649, 1111, 13244, 537, 29918, 5150, 1649, 6979, 13, 19499, 8960, 408, 321, 29901, 13, 1678, 515, 385, 1687, 29889, 5453, 29918, 13239, 29889, 12925, 29889, 1111, 13244, 537, 29889, 1111, 13244, 537, 29918, 4422, 1907, 1053, 16165, 267, 537, 29918, 9435, 29918, 23516, 29918, 6550, 29892, 320, 13, 4706, 12020, 1649, 1111, 13244, 537, 29918, 11739, 1649, 13789, 29892, 5195, 14130, 29918, 15307, 12015, 13, 1678, 515, 385, 1687, 29889, 5453, 29918, 13239, 29889, 12925, 29889, 1111, 13244, 537, 29889, 1111, 13244, 537, 29918, 5150, 1053, 679, 1649, 1111, 13244, 537, 29918, 5150, 1649, 6979, 13, 13, 13, 2190, 5425, 29933, 1307, 29918, 2303, 29911, 3035, 8254, 353, 426, 13, 1678, 525, 19635, 29918, 3259, 2396, 525, 29896, 29889, 29900, 742, 13, 1678, 525, 23765, 29918, 1609, 2396, 525, 23834, 742, 13, 1678, 525, 4882, 2396, 6024, 25347, 2033, 13, 29913, 13, 13, 28665, 5005, 3919, 8098, 353, 14550, 13, 5453, 29901, 16165, 267, 537, 29918, 14748, 13, 12759, 29918, 8216, 29901, 15057, 310, 315, 1148, 267, 537, 11661, 936, 28330, 13, 8216, 29901, 13, 1678, 448, 530, 1687, 15591, 1304, 304, 7246, 470, 3349, 278, 315, 1148, 267, 537, 11661, 936, 28330, 515, 6969, 8074, 17197, 1475, 29889, 13, 1678, 448, 1932, 8283, 297, 263, 1708, 2909, 29892, 278, 315, 1148, 267, 537, 28330, 11161, 674, 367, 2854, 630, 322, 278, 8210, 13, 1678, 448, 2106, 3158, 674, 367, 7436, 29889, 29871, 450, 1556, 7786, 1873, 310, 278, 315, 1148, 267, 537, 28330, 674, 367, 6336, 13, 1678, 448, 16532, 304, 278, 3495, 29889, 13, 3259, 29918, 23959, 29901, 525, 29906, 29889, 29953, 29889, 29945, 29915, 13, 8921, 29901, 13, 29871, 448, 529, 5813, 29958, 313, 3292, 29889, 510, 29914, 735, 359, 8096, 287, 532, 29897, 13, 29871, 448, 315, 1148, 267, 537, 29892, 9266, 13, 13, 6768, 29901, 13, 29871, 2106, 29901, 13, 1678, 6139, 29901, 13, 418, 448, 5953, 837, 1475, 565, 278, 10823, 881, 367, 315, 29898, 6338, 29897, 470, 315, 29898, 6897, 296, 29897, 515, 278, 3495, 13, 1678, 19995, 29901, 13, 418, 448, 2198, 13, 418, 448, 29207, 13, 1678, 2322, 29901, 525, 6338, 29915, 13, 29871, 5142, 29918, 5479, 29901, 13, 1678, 6139, 29901, 13, 418, 448, 28379, 3884, 2224, 304, 607, 278, 27786, 674, 367, 16532, 29889, 29871, 960, 451, 4629, 29892, 769, 263, 13201, 13, 418, 448, 3884, 674, 367, 2825, 297, 278, 2322, 2184, 21121, 18862, 29889, 29871, 1932, 23906, 385, 25010, 3884, 29892, 13, 418, 448, 278, 3884, 322, 27786, 674, 451, 367, 11132, 472, 278, 1095, 310, 278, 8225, 29889, 13, 29871, 2669, 29918, 1792, 29901, 13, 1678, 6139, 29901, 13, 418, 448, 4911, 978, 1090, 4716, 278, 315, 1148, 267, 537, 28330, 674, 367, 5130, 322, 1065, 29889, 13, 418, 448, 910, 1404, 1818, 1863, 6521, 306, 29898, 3258, 29918, 1792, 29922, 5574, 29897, 338, 884, 13252, 29889, 13, 418, 448, 910, 1404, 1818, 367, 385, 5923, 1404, 363, 7531, 11161, 29889, 13, 1678, 2322, 29901, 525, 1111, 13244, 537, 14748, 29915, 363, 2471, 2729, 11161, 13, 29871, 2669, 29918, 2972, 29901, 13, 1678, 6139, 29901, 13, 418, 448, 6431, 1090, 4716, 11239, 674, 367, 13252, 363, 278, 315, 1148, 267, 537, 28330, 5285, 29889, 13, 418, 448, 910, 2318, 1818, 1863, 6521, 306, 29898, 3258, 29918, 1792, 29922, 5574, 29897, 338, 884, 13252, 29889, 13, 418, 448, 910, 3443, 1838, 29915, 29873, 3394, 363, 7531, 11161, 13, 1678, 2322, 29901, 525, 1111, 13244, 537, 14748, 29915, 363, 2471, 2729, 11161, 13, 29871, 1653, 29918, 1792, 29901, 13, 1678, 6139, 29901, 13, 418, 448, 1932, 9615, 29892, 674, 1653, 263, 716, 1404, 322, 2318, 2729, 373, 278, 1819, 310, 306, 29898, 5509, 29918, 1792, 29897, 322, 306, 29898, 5509, 29918, 2972, 29897, 13, 418, 448, 910, 3443, 947, 451, 3394, 363, 7531, 2601, 800, 13, 1678, 1134, 29901, 6120, 13, 1678, 2322, 29901, 5852, 13, 29871, 934, 29918, 6707, 29901, 13, 1678, 6139, 29901, 13, 418, 448, 1932, 9615, 29892, 674, 2601, 278, 10823, 297, 1661, 29899, 29931, 9219, 4464, 322, 2304, 871, 934, 2729, 1250, 14340, 13, 1678, 1134, 29901, 6120, 13, 1678, 2322, 29901, 7700, 13, 29871, 7531, 29918, 5113, 29901, 13, 1678, 6139, 29901, 13, 418, 448, 1932, 9615, 29892, 7531, 27786, 9741, 526, 1304, 2729, 373, 278, 13598, 1788, 13, 1678, 1134, 29901, 6120, 13, 1678, 2322, 29901, 7700, 13, 29871, 5142, 29918, 5338, 29901, 13, 1678, 6139, 29901, 13, 418, 448, 450, 5142, 21333, 515, 988, 278, 27786, 508, 367, 16532, 13, 1678, 2322, 29901, 6629, 13, 29871, 13598, 29918, 5205, 29901, 13, 1678, 6139, 29901, 13, 418, 448, 385, 1687, 29918, 27691, 515, 17099, 29892, 445, 995, 338, 6336, 24146, 29889, 2216, 2183, 491, 3883, 1404, 13, 1062, 1975, 29918, 12663, 29918, 20777, 29901, 13, 1678, 448, 16165, 267, 537, 13, 12277, 1860, 29901, 5159, 13, 12008, 13, 13, 5746, 19297, 17101, 353, 14550, 13, 29937, 16052, 278, 1857, 1873, 310, 278, 10823, 373, 8074, 13, 29899, 16165, 267, 537, 29918, 14748, 29901, 13, 1678, 1923, 29901, 16165, 267, 537, 29889, 8205, 13, 1678, 16165, 267, 537, 29918, 6406, 29901, 4113, 13, 1678, 16165, 267, 537, 29918, 5630, 29901, 4800, 13, 1678, 2106, 29901, 2198, 13, 13, 29937, 16052, 278, 1857, 1873, 310, 278, 10823, 411, 2888, 4911, 322, 6431, 13, 29899, 16165, 267, 537, 29918, 14748, 29901, 13, 1678, 1923, 29901, 16165, 267, 537, 29889, 8205, 13, 1678, 16165, 267, 537, 29918, 6406, 29901, 4113, 13, 1678, 16165, 267, 537, 29918, 5630, 29901, 4800, 13, 1678, 2106, 29901, 2198, 13, 1678, 2669, 29918, 1792, 29901, 274, 14748, 13, 1678, 2669, 29918, 2972, 29901, 274, 14748, 13, 1678, 1653, 29918, 1792, 29901, 5852, 13, 13, 29937, 5240, 586, 267, 278, 1857, 5130, 10823, 515, 278, 3495, 13, 29899, 16165, 267, 537, 29918, 14748, 29901, 13, 1678, 1923, 29901, 16165, 267, 537, 29889, 8205, 13, 1678, 16165, 267, 537, 29918, 6406, 29901, 4113, 13, 1678, 16165, 267, 537, 29918, 5630, 29901, 4800, 13, 1678, 2106, 29901, 29207, 13, 13, 29937, 25553, 278, 10823, 27786, 304, 263, 2888, 4423, 29889, 13, 29899, 16165, 267, 537, 29918, 14748, 29901, 13, 1678, 1923, 29901, 16165, 267, 537, 29889, 8205, 13, 1678, 16165, 267, 537, 29918, 6406, 29901, 4113, 13, 1678, 16165, 267, 537, 29918, 5630, 29901, 4800, 13, 1678, 5142, 29918, 5479, 29901, 847, 20415, 29914, 6252, 414, 13, 1678, 2106, 29901, 2198, 13, 13, 29937, 16052, 278, 1857, 1873, 310, 278, 10823, 373, 8074, 773, 7531, 2601, 414, 29892, 278, 2669, 1404, 1244, 881, 367, 385, 13, 29937, 5923, 1404, 13, 29899, 16165, 267, 537, 29918, 14748, 29901, 13, 1678, 1923, 29901, 16165, 267, 537, 29889, 8205, 13, 1678, 16165, 267, 537, 29918, 6406, 29901, 4113, 13, 1678, 16165, 267, 537, 29918, 5630, 29901, 4800, 13, 1678, 2106, 29901, 2198, 13, 1678, 2669, 29918, 1792, 29901, 274, 14748, 13, 1678, 7531, 29918, 5113, 29901, 5852, 13, 13, 29937, 16052, 278, 16165, 267, 537, 10823, 773, 7531, 3577, 16532, 515, 2183, 23539, 29889, 2266, 29892, 278, 315, 1148, 267, 537, 9867, 16140, 526, 451, 3734, 13, 29899, 16165, 267, 537, 29918, 14748, 29901, 13, 1678, 2106, 29901, 2198, 13, 1678, 2669, 29918, 1792, 29901, 274, 14748, 13, 1678, 7531, 29918, 5113, 29901, 5852, 13, 1678, 5142, 29918, 5338, 29901, 525, 1124, 597, 29896, 29900, 29889, 29906, 29889, 29896, 29946, 29945, 29889, 29946, 29955, 29914, 5325, 29914, 2109, 29914, 6252, 414, 29914, 295, 29899, 1111, 13244, 537, 29899, 14748, 29899, 29953, 29889, 29941, 29899, 29896, 29889, 29916, 29947, 29953, 29918, 29953, 29946, 29889, 29878, 3358, 29915, 13, 13, 12008, 13, 13, 1525, 29911, 24015, 353, 14550, 13, 12008, 13, 13, 29903, 1307, 15488, 29918, 15307, 29918, 1660, 6007, 8452, 353, 29871, 29896, 29906, 29900, 13, 1660, 6007, 8452, 29918, 16173, 2692, 2890, 29918, 6007, 16358, 353, 29871, 29953, 29900, 13, 13, 1990, 16052, 2392, 29898, 2451, 1125, 13, 1678, 1209, 13, 13, 13, 1753, 11539, 29918, 22594, 7295, 13, 1678, 396, 1149, 14402, 29901, 29871, 20768, 304, 788, 3577, 10609, 12747, 363, 29901, 13, 1678, 396, 1149, 281, 657, 29892, 364, 16593, 29892, 301, 578, 29888, 29892, 302, 5847, 29899, 13239, 29892, 301, 6925, 29906, 13, 1678, 1209, 13, 13, 13, 1753, 1423, 29918, 14748, 29898, 5453, 29892, 2582, 1125, 13, 1678, 396, 1149, 5953, 837, 457, 565, 278, 315, 1148, 267, 537, 28330, 338, 5279, 5130, 13, 1678, 23609, 29918, 14748, 29918, 2084, 353, 5591, 4855, 29914, 2997, 29914, 1111, 13244, 537, 29914, 14748, 29914, 29874, 861, 29918, 14748, 29889, 845, 29908, 13, 1678, 822, 29918, 14748, 29918, 2084, 353, 5591, 7070, 29914, 2344, 29889, 29881, 29914, 1111, 13244, 537, 29899, 14748, 29908, 13, 13, 1678, 396, 7419, 363, 2322, 385, 1687, 10823, 2224, 322, 23609, 10823, 2224, 29889, 13, 1678, 10823, 29918, 2084, 353, 822, 29918, 14748, 29918, 2084, 565, 2897, 29889, 2084, 29889, 9933, 29898, 1753, 29918, 14748, 29918, 2084, 29897, 1683, 320, 13, 4706, 23609, 29918, 14748, 29918, 2084, 565, 2897, 29889, 2084, 29889, 9933, 29898, 29874, 861, 29918, 14748, 29918, 2084, 29897, 1683, 6213, 13, 1678, 565, 10823, 29918, 2084, 29901, 13, 4706, 9920, 353, 11860, 29879, 1873, 29908, 1273, 10823, 29918, 2084, 13, 4706, 364, 29883, 29892, 714, 29892, 4589, 353, 3883, 29889, 3389, 29918, 6519, 29898, 9006, 29897, 13, 4706, 6219, 29918, 449, 353, 714, 29889, 5451, 14182, 29876, 1159, 13, 4706, 1873, 353, 5124, 13, 4706, 363, 325, 297, 6219, 29918, 449, 29901, 13, 9651, 565, 325, 29889, 27382, 2541, 877, 6594, 29374, 13, 18884, 1873, 353, 325, 29889, 5451, 703, 376, 9601, 29899, 29896, 29962, 13, 18884, 2867, 13, 4706, 565, 1873, 29901, 13, 9651, 396, 1149, 1932, 278, 10823, 338, 5130, 29892, 591, 881, 367, 2221, 304, 736, 13, 9651, 396, 1149, 278, 1873, 2472, 13, 9651, 2582, 1839, 3259, 2033, 353, 1873, 13, 4706, 1683, 29901, 13, 9651, 396, 1149, 960, 445, 3282, 29915, 29873, 736, 263, 10079, 29892, 769, 591, 505, 16600, 4828, 13, 9651, 396, 1149, 322, 3117, 881, 1018, 304, 337, 29899, 6252, 470, 4889, 278, 27608, 29889, 13, 9651, 2582, 1839, 3259, 2033, 353, 376, 26690, 29908, 13, 9651, 2582, 1839, 3198, 29918, 14748, 2033, 353, 9657, 29898, 13, 18884, 27591, 29922, 449, 29892, 13, 18884, 380, 20405, 29922, 3127, 13, 9651, 1723, 13, 13, 4706, 736, 2582, 13, 1678, 25342, 2897, 29889, 2084, 29889, 9933, 11974, 7070, 29914, 1111, 13244, 537, 29899, 14748, 29908, 1125, 13, 4706, 396, 1149, 960, 278, 934, 338, 1476, 769, 1235, 29915, 29879, 736, 385, 9815, 2106, 13, 4706, 396, 1149, 7389, 13, 4706, 2582, 1839, 3259, 2033, 353, 376, 26690, 29908, 13, 4706, 736, 2582, 13, 1678, 1683, 29901, 13, 4706, 9920, 353, 376, 567, 448, 2993, 891, 12680, 7618, 29916, 29914, 2109, 29914, 9389, 29918, 14748, 891, 12680, 448, 29894, 3017, 891, 13689, 22372, 2158, 395, 29906, 10162, 29908, 13, 4706, 364, 29883, 29892, 714, 29892, 4589, 353, 3883, 29889, 3389, 29918, 6519, 29898, 13, 9651, 9920, 29892, 1423, 29918, 2214, 29922, 5574, 29892, 671, 29918, 348, 11177, 29918, 15903, 29922, 5574, 29897, 13, 4706, 565, 714, 29901, 13, 9651, 470, 16711, 287, 29918, 351, 1237, 353, 714, 29889, 5451, 14182, 29876, 1159, 13, 9651, 363, 1889, 297, 470, 16711, 287, 29918, 351, 1237, 29901, 13, 18884, 565, 1889, 29901, 13, 462, 1678, 1018, 29901, 13, 462, 4706, 9920, 353, 376, 21174, 448, 29929, 426, 29900, 29913, 1642, 4830, 29898, 5014, 29897, 13, 462, 1678, 5174, 7399, 2451, 29901, 13, 462, 4706, 9920, 353, 376, 21174, 448, 29929, 1273, 29879, 29908, 1273, 313, 5014, 29897, 13, 462, 1678, 364, 29883, 29892, 714, 29892, 4589, 353, 3883, 29889, 3389, 29918, 6519, 29898, 9006, 29897, 13, 13, 462, 1678, 565, 4589, 29901, 13, 462, 4706, 4766, 353, 376, 3782, 1316, 1889, 29908, 13, 462, 4706, 565, 4766, 297, 4589, 29901, 13, 462, 9651, 396, 1149, 4001, 278, 12088, 1899, 4133, 525, 3782, 1316, 1889, 29915, 591, 674, 925, 6773, 13, 462, 9651, 1209, 13, 462, 4706, 1683, 29901, 13, 462, 9651, 2582, 1839, 15033, 2033, 353, 7700, 13, 462, 9651, 2582, 1839, 17776, 2033, 353, 5852, 13, 462, 9651, 2582, 1839, 3198, 29918, 14748, 2033, 353, 9657, 29898, 13, 462, 18884, 27591, 29922, 449, 29892, 13, 462, 18884, 380, 20405, 29922, 3127, 13, 462, 9651, 1723, 13, 462, 9651, 2582, 1839, 5014, 29918, 333, 2033, 353, 1889, 13, 462, 9651, 3883, 29889, 14057, 29918, 3126, 29898, 13, 462, 18884, 10191, 543, 17776, 304, 3349, 385, 470, 16711, 287, 315, 1148, 267, 537, 28330, 2669, 607, 338, 1603, 2734, 613, 13, 462, 18884, 3579, 9902, 29897, 13, 462, 1678, 1683, 29901, 13, 462, 4706, 1209, 13, 9651, 2582, 1839, 3259, 2033, 353, 7700, 13, 9651, 736, 2582, 13, 13, 4706, 1683, 29901, 13, 9651, 396, 1149, 960, 278, 2066, 526, 451, 1476, 769, 1235, 29915, 29879, 736, 7700, 13, 9651, 396, 1149, 7389, 13, 9651, 2582, 1839, 3259, 2033, 353, 7700, 13, 9651, 736, 2582, 13, 13, 13, 1753, 5142, 29918, 14748, 29898, 5453, 29892, 2224, 1125, 13, 1678, 1018, 29901, 13, 4706, 565, 3883, 29889, 7529, 29889, 657, 877, 3372, 1218, 29918, 5205, 1495, 1275, 376, 29909, 6415, 1115, 13, 9651, 1923, 353, 3883, 29889, 7529, 29889, 657, 877, 19594, 1495, 13, 9651, 5993, 353, 679, 1649, 1111, 13244, 537, 29918, 5150, 1649, 6979, 29898, 5453, 29897, 13, 9651, 21333, 353, 376, 991, 597, 29908, 718, 1923, 718, 320, 13, 18884, 5591, 381, 275, 9916, 29914, 2754, 29914, 29894, 29896, 29914, 3597, 29914, 14017, 936, 14769, 1237, 29914, 10382, 29973, 3069, 1542, 29922, 29895, 29909, 861, 29987, 14748, 1542, 29922, 29895, 8404, 29908, 13, 9651, 9066, 353, 426, 13, 18884, 376, 23965, 1115, 376, 6214, 29914, 20082, 300, 29899, 5461, 613, 13, 18884, 376, 25471, 1115, 376, 29933, 799, 261, 376, 718, 5993, 29892, 13, 18884, 376, 1792, 29899, 14748, 1115, 376, 1111, 13244, 537, 29899, 550, 1821, 29914, 29894, 29906, 29889, 29941, 29889, 29900, 9092, 13, 4706, 25342, 451, 3883, 29889, 7529, 29889, 657, 877, 10382, 29918, 5338, 29374, 13, 9651, 2897, 29918, 1853, 353, 376, 24085, 29908, 13, 9651, 1923, 353, 3883, 29889, 7529, 29889, 657, 877, 19594, 1495, 13, 9651, 5993, 353, 679, 1649, 1111, 13244, 537, 29918, 5150, 1649, 6979, 29898, 5453, 29897, 13, 9651, 3577, 29918, 1853, 353, 525, 29895, 4081, 29915, 13, 9651, 565, 3883, 29889, 7529, 29889, 657, 877, 11487, 29918, 5113, 29374, 13, 18884, 565, 3883, 29889, 7529, 29889, 657, 877, 3372, 1218, 29918, 5205, 1495, 297, 6702, 23369, 3267, 742, 525, 9039, 29950, 271, 29374, 13, 462, 1678, 3577, 29918, 1853, 353, 525, 29895, 29934, 13427, 29915, 13, 18884, 25342, 3883, 29889, 7529, 29889, 657, 877, 3372, 1218, 29918, 5205, 1495, 1275, 525, 29903, 17101, 2396, 13, 462, 1678, 3577, 29918, 1853, 353, 525, 29895, 29903, 1509, 29934, 13427, 29915, 13, 18884, 25342, 3883, 29889, 7529, 29889, 657, 877, 3372, 1218, 29918, 5205, 1495, 1275, 525, 29965, 6037, 2396, 13, 462, 1678, 3577, 29918, 1853, 353, 525, 29895, 2287, 29933, 29915, 13, 9651, 21333, 353, 376, 991, 597, 29908, 718, 1923, 718, 320, 13, 18884, 5591, 381, 275, 9916, 29914, 2754, 29914, 29894, 29896, 29914, 3597, 29914, 14017, 936, 14769, 1237, 29914, 10382, 29973, 3069, 1542, 29922, 29895, 29908, 718, 2897, 29918, 1853, 718, 525, 29987, 15865, 1542, 2433, 718, 3577, 29918, 1853, 13, 9651, 9066, 353, 426, 13, 18884, 376, 23965, 1115, 376, 6214, 29914, 20082, 300, 29899, 5461, 613, 13, 18884, 376, 25471, 1115, 376, 29933, 799, 261, 376, 718, 5993, 29892, 13, 18884, 376, 1792, 29899, 14748, 1115, 376, 1111, 13244, 537, 29899, 550, 1821, 29914, 29894, 29906, 29889, 29941, 29889, 29900, 9092, 13, 4706, 1683, 29901, 13, 9651, 21333, 353, 3883, 29889, 7529, 29889, 657, 877, 10382, 29918, 5338, 1495, 13, 9651, 9066, 353, 426, 13, 18884, 376, 23965, 1115, 376, 6214, 29914, 20082, 300, 29899, 5461, 613, 13, 18884, 376, 1792, 29899, 14748, 1115, 376, 1111, 13244, 537, 29899, 550, 1821, 29914, 29894, 29906, 29889, 29941, 29889, 29900, 9092, 13, 13, 4706, 10823, 353, 1722, 29918, 2271, 29898, 2271, 29922, 5338, 29892, 9066, 29922, 13662, 29892, 13, 462, 308, 12725, 29918, 6327, 29879, 29922, 8824, 29892, 11815, 29922, 16244, 29918, 15307, 12015, 29897, 13, 4706, 4613, 29918, 13662, 353, 10823, 29889, 13662, 13, 4706, 565, 525, 3051, 29899, 2218, 3283, 29915, 297, 4613, 29918, 13662, 29889, 8149, 7295, 13, 9651, 10422, 353, 4613, 29918, 13662, 1839, 3051, 29899, 2218, 3283, 13359, 5451, 703, 543, 9601, 29896, 29962, 13, 4706, 1683, 29901, 13, 9651, 10422, 353, 525, 1111, 13244, 537, 29899, 14748, 29899, 6252, 261, 29915, 13, 4706, 10422, 353, 2224, 718, 5591, 29908, 718, 10422, 13, 4706, 1018, 29901, 13, 9651, 285, 353, 1722, 29898, 9507, 29892, 376, 29893, 29890, 1159, 13, 9651, 285, 29889, 3539, 29898, 14748, 29889, 949, 3101, 13, 9651, 2897, 29889, 305, 1545, 29898, 9507, 29892, 29871, 29900, 29877, 29955, 29945, 29945, 29897, 13, 4706, 5174, 8960, 408, 321, 29901, 13, 9651, 12020, 16052, 2392, 29898, 29872, 29897, 13, 4706, 7146, 29901, 13, 9651, 285, 29889, 5358, 580, 13, 1678, 5174, 3142, 1982, 29918, 2704, 29889, 10493, 2392, 408, 321, 29901, 13, 4706, 1059, 29918, 7645, 353, 4390, 29889, 18132, 29898, 29872, 29889, 949, 3101, 13, 4706, 565, 525, 4906, 29915, 297, 1059, 29918, 7645, 29901, 13, 9651, 3883, 29889, 14057, 29918, 3126, 29898, 13, 18884, 10191, 543, 17776, 304, 5142, 278, 315, 1148, 267, 537, 28330, 613, 13, 18884, 2769, 29922, 2704, 29918, 7645, 1839, 4906, 11287, 13, 4706, 1683, 29901, 13, 9651, 12020, 1649, 1111, 13244, 537, 29918, 11739, 1649, 13789, 29898, 29872, 29892, 3883, 29897, 13, 1678, 5174, 3142, 1982, 29918, 2704, 29889, 4574, 1307, 24616, 408, 321, 29901, 13, 4706, 396, 1149, 8868, 545, 322, 3461, 738, 1059, 7191, 29889, 13, 4706, 12020, 1649, 1111, 13244, 537, 29918, 11739, 1649, 13789, 29898, 29872, 29889, 949, 3285, 3883, 29897, 13, 1678, 5174, 8960, 408, 1059, 29901, 13, 4706, 12020, 1649, 1111, 13244, 537, 29918, 11739, 1649, 13789, 29898, 2704, 29892, 3883, 29897, 13, 1678, 736, 10422, 13, 13, 13, 1753, 11161, 29918, 14057, 1973, 29898, 5453, 29892, 27591, 29892, 364, 29883, 29892, 2643, 1125, 13, 1678, 396, 1149, 450, 982, 393, 445, 27786, 1736, 29892, 591, 674, 451, 679, 1250, 7191, 297, 380, 20405, 13, 1678, 396, 1149, 746, 263, 10672, 10008, 29889, 29871, 1152, 445, 2769, 29892, 591, 817, 304, 12500, 1549, 777, 5089, 3554, 13, 1678, 396, 1149, 304, 6597, 278, 1059, 7191, 29889, 29871, 450, 2601, 674, 334, 7439, 616, 368, 29930, 4866, 1584, 13, 1678, 396, 1149, 565, 3058, 9962, 526, 4567, 29889, 13, 1678, 396, 1149, 13, 1678, 396, 1149, 910, 2908, 310, 775, 674, 937, 6219, 278, 27591, 964, 263, 2391, 310, 6031, 393, 13, 1678, 396, 1149, 591, 674, 4175, 363, 738, 1196, 607, 3743, 334, 2392, 29901, 10521, 29871, 16025, 3454, 674, 367, 13, 1678, 396, 1149, 4133, 304, 263, 716, 1051, 334, 303, 20405, 29930, 607, 674, 367, 20917, 964, 263, 320, 29876, 628, 326, 1573, 13, 1678, 396, 1149, 1347, 408, 278, 2186, 4331, 29892, 591, 674, 12020, 263, 3883, 10672, 304, 25212, 6728, 29889, 13, 1678, 27591, 29918, 9012, 353, 27591, 29889, 5451, 14182, 29876, 1159, 13, 13, 1678, 396, 1149, 22351, 738, 7407, 393, 16410, 411, 4829, 29901, 13, 1678, 380, 20405, 353, 518, 29895, 363, 413, 297, 27591, 29918, 9012, 565, 525, 2392, 11283, 297, 413, 29962, 13, 1678, 380, 20405, 353, 6634, 29876, 1642, 7122, 29898, 303, 20405, 29897, 13, 13, 1678, 396, 1149, 22351, 738, 7407, 393, 16410, 411, 399, 25614, 29901, 13, 1678, 3659, 25442, 353, 518, 29895, 363, 413, 297, 27591, 29918, 9012, 565, 525, 29956, 25614, 11283, 297, 413, 29962, 13, 1678, 3659, 25442, 353, 6634, 29876, 1642, 7122, 29898, 4172, 25442, 29897, 13, 1678, 3883, 29889, 14057, 29918, 3126, 29898, 13, 4706, 3939, 29922, 8824, 29892, 13, 4706, 10191, 29922, 4906, 29892, 13, 4706, 1059, 29922, 303, 20405, 29892, 13, 4706, 1962, 29922, 25393, 29892, 13, 4706, 29383, 29922, 4172, 25442, 29892, 13, 4706, 6876, 401, 29922, 2214, 29897, 13, 13, 13, 1753, 2601, 29918, 14748, 29898, 5453, 29892, 27786, 29892, 7531, 1125, 13, 13, 1678, 396, 1149, 910, 1899, 674, 1065, 278, 1583, 29899, 21111, 292, 27786, 363, 278, 10823, 373, 4933, 322, 13, 1678, 396, 1149, 21301, 8718, 263, 716, 3474, 313, 1217, 29916, 29896, 29896, 29897, 322, 451, 1510, 278, 4805, 428, 313, 29876, 26555, 3663, 29897, 2582, 13, 1678, 396, 1149, 607, 1095, 701, 297, 380, 20405, 29889, 13, 1678, 396, 13, 1678, 396, 1149, 3940, 29901, 5132, 29871, 29906, 29889, 29953, 1838, 29915, 29873, 8072, 2304, 278, 716, 1347, 3402, 2153, 29892, 577, 445, 13, 1678, 396, 1149, 1018, 636, 19499, 674, 2367, 502, 263, 5941, 28953, 24521, 29889, 13, 1678, 565, 451, 7531, 29901, 13, 4706, 2601, 29918, 25707, 353, 376, 489, 3258, 29899, 1792, 376, 718, 320, 13, 9651, 851, 29898, 524, 29898, 5453, 29889, 7529, 29889, 657, 877, 3258, 29918, 1792, 29915, 4961, 718, 376, 376, 13, 4706, 565, 3883, 29889, 7529, 29889, 657, 877, 5509, 29918, 1792, 29374, 13, 9651, 2601, 29918, 25707, 4619, 376, 489, 5509, 29899, 1792, 376, 718, 320, 13, 18884, 3883, 29889, 7529, 29889, 657, 877, 5509, 29918, 1792, 1495, 718, 376, 376, 13, 4706, 565, 3883, 29889, 7529, 29889, 657, 877, 5509, 29918, 2972, 29374, 13, 9651, 2601, 29918, 25707, 4619, 376, 489, 5509, 29899, 2972, 376, 718, 320, 13, 18884, 3883, 29889, 7529, 29889, 657, 877, 5509, 29918, 2972, 1495, 718, 376, 376, 13, 4706, 565, 3883, 29889, 7529, 29889, 657, 877, 1445, 29918, 6707, 29374, 13, 9651, 2601, 29918, 25707, 4619, 376, 489, 11014, 29899, 29880, 6925, 29899, 3198, 376, 13, 4706, 1018, 29901, 13, 9651, 9920, 353, 29850, 29900, 6822, 14669, 29889, 845, 1192, 6252, 1192, 3582, 426, 29896, 29913, 1642, 4830, 29898, 13, 18884, 27786, 29892, 2601, 29918, 25707, 29897, 13, 4706, 5174, 8960, 408, 321, 29901, 13, 9651, 9920, 353, 11860, 29879, 29914, 14669, 29889, 845, 1192, 6252, 1192, 3582, 1273, 29879, 29908, 1273, 313, 6252, 261, 29892, 2601, 29918, 25707, 29897, 13, 1678, 1683, 29901, 13, 4706, 1018, 29901, 13, 9651, 565, 3883, 29889, 7529, 29889, 657, 877, 5509, 29918, 1792, 29374, 13, 18884, 1404, 353, 3883, 29889, 7529, 29889, 657, 877, 5509, 29918, 1792, 1495, 13, 9651, 565, 3883, 29889, 7529, 29889, 657, 877, 3372, 1218, 29918, 5205, 1495, 1275, 376, 29965, 6037, 1115, 13, 18884, 9920, 353, 376, 15360, 4810, 29950, 2890, 11937, 11889, 3790, 29900, 29913, 270, 15865, 448, 29875, 426, 29896, 29913, 1642, 4830, 29898, 1792, 29892, 27786, 29897, 13, 9651, 25342, 3883, 29889, 7529, 29889, 657, 877, 3372, 1218, 29918, 5205, 1495, 297, 4852, 23369, 3267, 613, 376, 9039, 29950, 271, 29908, 1125, 13, 18884, 9920, 353, 376, 15360, 4810, 29950, 2890, 11937, 11889, 3790, 29900, 29913, 364, 3358, 448, 29875, 426, 29896, 29913, 1642, 4830, 29898, 1792, 29892, 27786, 29897, 13, 9651, 25342, 3883, 29889, 7529, 29889, 657, 877, 3372, 1218, 29918, 5205, 1495, 1275, 376, 29909, 6415, 1115, 13, 18884, 9920, 353, 376, 15360, 4810, 29950, 2890, 11937, 11889, 3790, 29900, 29913, 2601, 29886, 448, 328, 426, 29896, 29913, 599, 1642, 4830, 29898, 1792, 29892, 27786, 29897, 13, 9651, 1683, 29901, 13, 18884, 11161, 29918, 14057, 1973, 29898, 13, 462, 1678, 3883, 29892, 12633, 12633, 13, 462, 1678, 851, 29898, 5453, 29889, 7529, 29889, 657, 877, 3372, 1218, 29918, 5205, 8785, 718, 376, 3508, 29915, 29873, 6969, 491, 16165, 267, 537, 385, 1687, 3883, 1159, 13, 4706, 5174, 8960, 408, 321, 29901, 13, 9651, 565, 3883, 29889, 7529, 29889, 657, 877, 3372, 1218, 29918, 5205, 1495, 1275, 376, 29965, 6037, 1115, 13, 18884, 9920, 353, 376, 15360, 4810, 29950, 2890, 11937, 11889, 16328, 29879, 270, 15865, 448, 29875, 1273, 29879, 29908, 1273, 313, 1792, 29892, 27786, 29897, 13, 9651, 25342, 3883, 29889, 7529, 29889, 657, 877, 3372, 1218, 29918, 5205, 1495, 297, 4852, 23369, 3267, 613, 376, 9039, 29950, 271, 29908, 1125, 13, 18884, 9920, 353, 376, 15360, 4810, 29950, 2890, 11937, 11889, 16328, 29879, 29871, 364, 3358, 448, 29875, 1273, 29879, 29908, 1273, 313, 1792, 29892, 27786, 29897, 13, 13, 1678, 364, 29883, 29892, 27591, 29892, 380, 20405, 353, 3883, 29889, 3389, 29918, 6519, 29898, 9006, 29892, 274, 9970, 29922, 6252, 261, 29897, 13, 1678, 396, 1149, 3139, 736, 775, 916, 1135, 29871, 29900, 338, 5545, 263, 10672, 29889, 13, 1678, 565, 364, 29883, 29901, 13, 4706, 11161, 29918, 14057, 1973, 29898, 13, 9651, 3883, 29892, 27591, 29892, 364, 29883, 29892, 376, 29907, 1148, 267, 537, 28330, 338, 22039, 5130, 1159, 13, 1678, 736, 313, 5574, 29892, 376, 14191, 3730, 2799, 4212, 278, 315, 1148, 267, 537, 10823, 1159, 13, 13, 13, 1753, 6597, 29918, 14748, 29898, 5453, 29892, 10422, 1125, 13, 13, 1678, 396, 1149, 910, 1899, 674, 1065, 278, 1583, 29899, 21111, 292, 27786, 297, 694, 8225, 4464, 13, 1678, 396, 13, 1678, 396, 1149, 3940, 29901, 5132, 29871, 29906, 29889, 29953, 1838, 29915, 29873, 8072, 2304, 278, 716, 1347, 3402, 2153, 29892, 577, 445, 13, 1678, 396, 1149, 1018, 636, 19499, 674, 2367, 502, 263, 5941, 28953, 24521, 29889, 13, 13, 1678, 3884, 353, 2897, 29889, 2084, 29889, 25721, 29898, 359, 29889, 2084, 29889, 370, 1028, 493, 29898, 9507, 876, 13, 1678, 3646, 353, 3884, 718, 5591, 6252, 29918, 5325, 29908, 13, 1678, 1653, 29918, 10382, 29918, 3972, 29898, 5453, 29892, 3646, 29897, 13, 13, 1678, 1018, 29901, 13, 4706, 9920, 353, 29850, 29900, 29913, 1192, 1217, 29916, 29896, 29896, 1192, 1217, 4258, 1192, 5182, 426, 29896, 29913, 11393, 4830, 29898, 9507, 29892, 3646, 29897, 13, 1678, 5174, 8960, 408, 321, 29901, 13, 4706, 9920, 353, 11860, 29879, 1192, 1217, 29916, 29896, 29896, 1192, 1217, 4258, 1192, 5182, 1273, 29879, 376, 1273, 313, 9507, 29892, 3646, 29897, 13, 13, 1678, 364, 29883, 29892, 27591, 29892, 380, 20405, 353, 3883, 29889, 3389, 29918, 6519, 29898, 9006, 29897, 13, 13, 1678, 396, 1149, 3139, 736, 775, 916, 1135, 29871, 29900, 338, 5545, 263, 10672, 29889, 13, 1678, 565, 364, 29883, 29901, 13, 4706, 11161, 29918, 14057, 1973, 29898, 13, 9651, 3883, 29892, 27591, 29892, 364, 29883, 29892, 376, 29907, 1148, 267, 537, 28330, 338, 22039, 5130, 1159, 13, 1678, 736, 313, 5574, 29892, 376, 14191, 3730, 2799, 4212, 278, 315, 1148, 267, 537, 10823, 613, 3646, 29897, 13, 13, 13, 1753, 3349, 29918, 14748, 29898, 5453, 29892, 27786, 29892, 7531, 1125, 13, 13, 1678, 396, 1149, 910, 1899, 674, 1065, 278, 1583, 29899, 21111, 292, 27786, 363, 278, 10823, 373, 4933, 322, 13, 1678, 396, 1149, 21301, 8718, 263, 716, 3474, 313, 1217, 29916, 29896, 29896, 29897, 322, 451, 1510, 278, 4805, 428, 313, 29876, 26555, 3663, 29897, 2582, 13, 1678, 396, 1149, 607, 1095, 701, 297, 380, 20405, 29889, 13, 1678, 396, 13, 1678, 396, 1149, 3940, 29901, 5132, 29871, 29906, 29889, 29953, 1838, 29915, 29873, 8072, 2304, 278, 716, 1347, 3402, 2153, 29892, 577, 445, 13, 1678, 396, 1149, 1018, 636, 19499, 674, 2367, 502, 263, 5941, 28953, 24521, 29889, 13, 1678, 565, 451, 7531, 29901, 13, 4706, 1018, 29901, 13, 9651, 9920, 353, 29850, 29900, 6822, 14669, 29889, 845, 1192, 8159, 29899, 348, 6252, 1192, 3582, 1642, 4830, 29898, 6252, 261, 29897, 13, 4706, 5174, 8960, 408, 321, 29901, 13, 9651, 9920, 353, 11860, 29879, 29914, 14669, 29889, 845, 1192, 8159, 29899, 348, 6252, 1192, 3582, 29908, 1273, 313, 6252, 261, 29897, 13, 4706, 364, 29883, 29892, 714, 29892, 4589, 353, 3883, 29889, 3389, 29918, 6519, 29898, 9006, 29892, 274, 9970, 29922, 6252, 261, 29897, 13, 13, 4706, 396, 1149, 3139, 736, 775, 916, 1135, 29871, 29900, 338, 5545, 263, 10672, 29889, 13, 4706, 565, 364, 29883, 29901, 13, 9651, 11161, 29918, 14057, 1973, 29898, 13, 18884, 3883, 29892, 714, 29892, 364, 29883, 29892, 376, 29907, 1148, 267, 537, 28330, 338, 22039, 5130, 1159, 13, 1678, 1683, 29901, 13, 4706, 565, 3883, 29889, 7529, 29889, 657, 877, 3372, 1218, 29918, 5205, 1495, 1275, 376, 29909, 6415, 1115, 13, 9651, 9920, 353, 376, 6252, 29886, 448, 29884, 16165, 267, 537, 29918, 14748, 29889, 29878, 371, 29908, 13, 9651, 364, 29883, 29892, 714, 29892, 4589, 353, 3883, 29889, 3389, 29918, 6519, 29898, 9006, 29897, 13, 9651, 565, 364, 29883, 29901, 13, 18884, 11161, 29918, 14057, 1973, 29898, 13, 462, 1678, 3883, 29892, 27591, 29892, 364, 29883, 29892, 376, 17776, 304, 27608, 16165, 267, 537, 10823, 1159, 13, 4706, 25342, 3883, 29889, 7529, 29889, 657, 877, 3372, 1218, 29918, 5205, 1495, 1275, 376, 29965, 6037, 1115, 13, 9651, 9920, 353, 376, 15360, 270, 15865, 448, 29925, 16165, 267, 537, 29899, 14748, 29908, 13, 9651, 364, 29883, 29892, 27591, 29892, 380, 20405, 353, 3883, 29889, 3389, 29918, 6519, 29898, 9006, 29897, 13, 9651, 565, 364, 29883, 29901, 13, 18884, 11161, 29918, 14057, 1973, 29898, 13, 462, 1678, 3883, 29892, 27591, 29892, 364, 29883, 29892, 376, 17776, 304, 27608, 16165, 267, 537, 10823, 16521, 13, 4706, 25342, 3883, 29889, 7529, 29889, 657, 877, 3372, 1218, 29918, 5205, 1495, 297, 4852, 23369, 3267, 613, 376, 9039, 29950, 271, 29908, 1125, 13, 9651, 9920, 353, 376, 15360, 364, 3358, 448, 29872, 16165, 267, 537, 29899, 14748, 29908, 13, 9651, 364, 29883, 29892, 27591, 29892, 380, 20405, 353, 3883, 29889, 3389, 29918, 6519, 29898, 9006, 29897, 13, 9651, 565, 364, 29883, 29901, 13, 18884, 11161, 29918, 14057, 1973, 29898, 13, 462, 1678, 3883, 29892, 27591, 29892, 364, 29883, 29892, 376, 17776, 304, 27608, 16165, 267, 537, 10823, 1159, 13, 9651, 9920, 353, 376, 15360, 20241, 448, 9600, 847, 7070, 29914, 1111, 13244, 537, 29899, 14748, 29908, 13, 9651, 364, 29883, 29892, 27591, 29892, 380, 20405, 353, 3883, 29889, 3389, 29918, 6519, 29898, 9006, 29897, 13, 9651, 565, 364, 29883, 29901, 13, 18884, 11161, 29918, 14057, 1973, 29898, 13, 462, 1678, 3883, 29892, 27591, 29892, 364, 29883, 29892, 376, 1576, 16165, 267, 537, 10823, 338, 443, 25537, 541, 5229, 304, 3349, 847, 7070, 29914, 1111, 13244, 537, 29899, 14748, 1159, 13, 4706, 1683, 29901, 13, 9651, 11161, 29918, 14057, 1973, 29898, 13, 18884, 3883, 29892, 12633, 12633, 13, 18884, 851, 29898, 5453, 29889, 7529, 29889, 657, 877, 3372, 1218, 29918, 5205, 8785, 718, 376, 338, 451, 6969, 491, 16165, 267, 537, 385, 1687, 3883, 1159, 13, 13, 1678, 736, 313, 5574, 29892, 376, 14191, 3730, 5240, 8238, 278, 315, 1148, 267, 537, 10823, 1159, 13, 13, 13, 1753, 1653, 29918, 10382, 29918, 3972, 29898, 5453, 29892, 4516, 29918, 2084, 1125, 13, 1678, 396, 1149, 3940, 29901, 29871, 29906, 29900, 29896, 29947, 29899, 29896, 29906, 29899, 29900, 29953, 13, 1678, 396, 1149, 25601, 445, 1158, 304, 3867, 385, 25010, 3443, 304, 5142, 278, 27786, 29889, 13, 1678, 396, 1149, 910, 775, 471, 4359, 9186, 20043, 714, 310, 278, 530, 1687, 3497, 3883, 29889, 13, 1678, 3151, 2084, 353, 6629, 13, 1678, 396, 1149, 5953, 837, 457, 565, 278, 5142, 3884, 4864, 322, 565, 451, 769, 1653, 372, 29889, 13, 1678, 363, 4516, 978, 297, 4516, 29918, 2084, 29889, 17010, 11219, 2824, 5451, 11219, 29374, 13, 4706, 3151, 2084, 353, 8207, 4286, 7122, 4197, 2764, 2084, 29892, 4516, 978, 2314, 13, 4706, 396, 15154, 8236, 24765, 565, 591, 29915, 276, 4969, 263, 6198, 2224, 13, 4706, 565, 451, 2897, 29889, 2084, 29889, 275, 6897, 29898, 3972, 29918, 2084, 1125, 13, 9651, 3151, 2084, 353, 3151, 2084, 29889, 29880, 17010, 11219, 1495, 13, 4706, 289, 29918, 2764, 2084, 353, 304, 29918, 13193, 29898, 2764, 2084, 29892, 4436, 2433, 7610, 9102, 403, 29918, 272, 29918, 710, 919, 1495, 13, 4706, 565, 451, 2897, 29889, 2084, 29889, 9933, 29898, 29890, 29918, 2764, 2084, 1125, 13, 9651, 1018, 29901, 13, 18884, 2897, 29889, 11256, 3972, 29898, 29890, 29918, 2764, 2084, 29897, 13, 9651, 5174, 438, 29173, 408, 429, 29901, 13, 18884, 1053, 4589, 1217, 13, 18884, 396, 29863, 14981, 1554, 1683, 2825, 278, 4516, 1951, 278, 2897, 29889, 2084, 29889, 9933, 13, 18884, 396, 1423, 2038, 29889, 1094, 1472, 408, 372, 29915, 29879, 263, 4516, 29892, 591, 1016, 29915, 29873, 817, 304, 1059, 13, 18884, 396, 714, 29889, 13, 18884, 565, 451, 313, 735, 29889, 3127, 1217, 1275, 4589, 1217, 29889, 29923, 5746, 9047, 322, 2897, 29889, 2084, 29889, 275, 3972, 29898, 29890, 29918, 2764, 2084, 22164, 13, 462, 1678, 12020, 13, 13, 13, 1753, 679, 29918, 4993, 29918, 14144, 29898, 5453, 29892, 2752, 29918, 333, 1125, 13, 1678, 14550, 13, 1678, 3617, 13047, 2752, 4902, 13, 1678, 584, 3207, 3883, 29901, 1203, 393, 8640, 4128, 4502, 304, 278, 3883, 13, 1678, 584, 3207, 2752, 29918, 333, 29901, 13047, 2752, 1178, 13, 1678, 584, 2457, 29901, 13, 1678, 14550, 13, 1678, 1923, 353, 3883, 29889, 7529, 29889, 657, 877, 19594, 1495, 13, 1678, 12725, 29918, 6327, 29879, 353, 3883, 29889, 7529, 29889, 657, 877, 15480, 29918, 6327, 29879, 1495, 13, 1678, 5993, 353, 679, 1649, 1111, 13244, 537, 29918, 5150, 1649, 6979, 29898, 5453, 29897, 13, 1678, 1018, 29901, 13, 4706, 565, 2752, 29918, 333, 29901, 13, 9651, 21333, 353, 376, 991, 597, 29908, 718, 1923, 718, 320, 13, 462, 29871, 5591, 381, 275, 9916, 29914, 2754, 29914, 29894, 29896, 29914, 3597, 29914, 14676, 428, 29903, 2863, 29973, 333, 543, 718, 851, 29898, 4993, 29918, 333, 29897, 13, 4706, 1683, 29901, 13, 9651, 21333, 353, 376, 991, 597, 29908, 718, 1923, 718, 320, 13, 462, 29871, 5591, 381, 275, 9916, 29914, 2754, 29914, 29894, 29896, 29914, 3597, 29914, 14676, 428, 29903, 2863, 29973, 21813, 1860, 29922, 29895, 25847, 936, 29908, 13, 4706, 9066, 353, 8853, 23965, 1115, 376, 6214, 29914, 3126, 613, 13, 462, 259, 376, 25471, 1115, 376, 29933, 799, 261, 376, 718, 5993, 29892, 13, 462, 259, 376, 1792, 29899, 14748, 1115, 376, 1111, 13244, 537, 29899, 550, 1821, 29914, 29894, 29906, 29889, 29941, 29889, 29900, 9092, 13, 4706, 2933, 353, 1722, 29918, 2271, 29898, 13, 9651, 3142, 29922, 5338, 29892, 13, 9651, 9066, 29922, 13662, 29892, 13, 9651, 12725, 29918, 6327, 29879, 29922, 15480, 29918, 6327, 29879, 29892, 13, 9651, 1158, 543, 7194, 613, 11815, 29922, 16244, 29918, 15307, 12015, 29897, 13, 4706, 2933, 353, 4390, 29889, 18132, 29898, 5327, 29889, 949, 3101, 13, 4706, 565, 2752, 29918, 333, 29901, 13, 9651, 7573, 353, 2933, 13, 4706, 1683, 29901, 13, 9651, 7573, 353, 2933, 29961, 29900, 22322, 18010, 2033, 13, 4706, 2752, 29918, 14144, 353, 9657, 580, 13, 4706, 363, 2752, 297, 7573, 29901, 13, 9651, 565, 2752, 1839, 14676, 428, 4435, 16215, 978, 2033, 1275, 3883, 29889, 7529, 29889, 657, 877, 3069, 29374, 13, 18884, 2752, 29918, 14144, 1839, 14748, 2033, 17313, 13, 462, 1678, 2752, 1839, 14676, 428, 4435, 16215, 14017, 936, 1184, 371, 428, 4435, 16215, 351, 1237, 2033, 29961, 29900, 29962, 13, 18884, 2752, 29918, 14144, 1839, 333, 2033, 353, 2752, 1839, 14676, 428, 4435, 16215, 333, 2033, 13, 4706, 565, 451, 2752, 29918, 14144, 29901, 13, 9651, 3883, 29889, 14057, 29918, 3126, 29898, 13, 18884, 3939, 29922, 8824, 29892, 13, 18884, 10191, 543, 6028, 29915, 29873, 1284, 278, 3495, 373, 278, 9867, 1159, 13, 4706, 736, 2752, 29918, 14144, 13, 1678, 5174, 3142, 1982, 29918, 2704, 29889, 4574, 1307, 24616, 408, 321, 29901, 13, 4706, 396, 1149, 8868, 545, 322, 3461, 738, 1059, 7191, 29889, 13, 4706, 12020, 1649, 1111, 13244, 537, 29918, 11739, 1649, 13789, 29898, 29872, 29889, 949, 3285, 3883, 29897, 13, 1678, 5174, 8960, 408, 1059, 29901, 13, 4706, 12020, 1649, 1111, 13244, 537, 29918, 11739, 1649, 13789, 29898, 2704, 29892, 3883, 29897, 13, 13, 13, 1753, 2767, 29918, 14748, 29898, 5453, 1125, 13, 1678, 14550, 13, 1678, 701, 629, 3076, 278, 10823, 373, 9128, 12424, 13, 1678, 584, 3207, 3883, 29901, 1203, 393, 8640, 4128, 4502, 304, 278, 3883, 13, 1678, 584, 2457, 29901, 13, 1678, 14550, 13, 1678, 1923, 353, 3883, 29889, 7529, 29889, 657, 877, 19594, 1495, 13, 1678, 12725, 29918, 6327, 29879, 353, 3883, 29889, 7529, 29889, 657, 877, 15480, 29918, 6327, 29879, 1495, 13, 1678, 5993, 353, 679, 1649, 1111, 13244, 537, 29918, 5150, 1649, 6979, 29898, 5453, 29897, 13, 1678, 1121, 353, 9657, 29898, 13, 4706, 3939, 29922, 8824, 29892, 13, 4706, 10191, 2433, 742, 13, 4706, 1873, 2433, 29915, 13, 1678, 1723, 13, 1678, 1018, 29901, 13, 4706, 2752, 29918, 14144, 353, 679, 29918, 4993, 29918, 14144, 29898, 5453, 29892, 6213, 29897, 13, 4706, 565, 2752, 29918, 14144, 1839, 14748, 16215, 786, 5105, 3097, 2033, 1275, 525, 29895, 3373, 5105, 519, 2396, 13, 9651, 21333, 353, 376, 991, 597, 29908, 718, 1923, 718, 320, 13, 462, 29871, 5591, 381, 275, 9916, 29914, 2754, 29914, 29894, 29896, 29914, 3597, 29914, 14017, 936, 14769, 1237, 29914, 786, 8228, 29908, 13, 9651, 9066, 353, 8853, 23965, 1115, 376, 6214, 29914, 3126, 613, 13, 462, 539, 376, 25471, 1115, 376, 29933, 799, 261, 376, 718, 5993, 29892, 13, 462, 539, 376, 1792, 29899, 14748, 1115, 376, 1111, 13244, 537, 29899, 550, 1821, 29914, 29894, 29906, 29889, 29941, 29889, 29900, 9092, 13, 9651, 20092, 353, 426, 13, 18884, 376, 14748, 21943, 1115, 518, 4993, 29918, 14144, 1839, 14748, 16215, 333, 2033, 29962, 13, 9651, 500, 13, 9651, 2933, 353, 1722, 29918, 2271, 29898, 13, 18884, 3142, 29922, 5338, 29892, 13, 18884, 848, 29922, 3126, 29889, 29881, 17204, 29898, 23813, 511, 13, 18884, 9066, 29922, 13662, 29892, 13, 18884, 12725, 29918, 6327, 29879, 29922, 15480, 29918, 6327, 29879, 29892, 13, 18884, 1158, 543, 5438, 613, 11815, 29922, 16244, 29918, 15307, 12015, 29897, 13, 13, 9651, 4480, 29918, 2230, 353, 3883, 29889, 7529, 29889, 657, 877, 10685, 29918, 1195, 2667, 1495, 13, 9651, 1550, 4480, 29918, 2230, 1405, 29871, 29900, 29901, 13, 18884, 21180, 29918, 4993, 29918, 14144, 353, 679, 29918, 4993, 29918, 14144, 29898, 5453, 29892, 2752, 29918, 14144, 1839, 333, 11287, 13, 18884, 565, 451, 21180, 29918, 4993, 29918, 14144, 29901, 13, 462, 1678, 1121, 1839, 15033, 2033, 353, 5852, 13, 462, 1678, 1121, 1839, 7645, 2033, 353, 376, 6422, 10823, 2009, 338, 9259, 541, 5229, 304, 1423, 10823, 29908, 320, 13, 462, 462, 1678, 376, 4660, 2645, 14955, 4480, 931, 29908, 13, 462, 1678, 1121, 1839, 3259, 2033, 353, 2752, 29918, 14144, 1839, 14748, 16215, 3259, 2033, 13, 462, 1678, 3883, 29889, 13322, 29918, 3126, 29898, 1068, 2914, 29897, 13, 18884, 25342, 21180, 29918, 4993, 29918, 14144, 1839, 14748, 13359, 657, 877, 786, 8228, 5709, 3728, 742, 6629, 1125, 13, 462, 1678, 3883, 29889, 14057, 29918, 3126, 29898, 13, 462, 4706, 3939, 29922, 8824, 29892, 13, 462, 4706, 10191, 543, 17776, 304, 14955, 10823, 29889, 376, 718, 21180, 29918, 4993, 29918, 14144, 1839, 14748, 16215, 786, 8228, 5709, 3728, 11287, 13, 18884, 25342, 21180, 29918, 4993, 29918, 14144, 1839, 14748, 16215, 786, 8228, 5709, 2033, 1275, 525, 29895, 12881, 3276, 2396, 13, 462, 1678, 1121, 1839, 15033, 2033, 353, 5852, 13, 462, 1678, 1121, 1839, 7645, 2033, 353, 376, 14191, 3730, 20337, 287, 278, 10823, 29908, 13, 462, 1678, 1121, 1839, 3259, 2033, 353, 21180, 29918, 4993, 29918, 14144, 1839, 14748, 16215, 3259, 2033, 13, 462, 1678, 3883, 29889, 13322, 29918, 3126, 29898, 1068, 2914, 29897, 13, 18884, 931, 29889, 17059, 29898, 29903, 1307, 15488, 29918, 15307, 29918, 1660, 6007, 8452, 29897, 13, 18884, 4480, 29918, 2230, 353, 4480, 29918, 2230, 448, 313, 29903, 1307, 15488, 29918, 15307, 29918, 1660, 6007, 8452, 29914, 1660, 6007, 8452, 29918, 16173, 2692, 2890, 29918, 6007, 16358, 29897, 13, 9651, 1121, 1839, 15033, 2033, 353, 5852, 13, 9651, 1121, 1839, 7645, 2033, 353, 376, 1576, 10823, 14955, 2009, 338, 9259, 1213, 320, 13, 462, 9651, 376, 450, 14955, 338, 451, 7743, 297, 278, 4480, 931, 29908, 13, 9651, 1121, 1839, 3259, 2033, 353, 2752, 29918, 14144, 1839, 14748, 16215, 3259, 2033, 13, 9651, 3883, 29889, 13322, 29918, 3126, 29898, 1068, 2914, 29897, 13, 4706, 25342, 2752, 29918, 14144, 1839, 14748, 16215, 786, 5105, 3097, 2033, 1275, 525, 29895, 7583, 2396, 13, 9651, 1121, 1839, 7645, 2033, 353, 376, 1576, 3495, 756, 278, 9281, 10823, 1873, 29908, 13, 9651, 1121, 1839, 3259, 2033, 353, 2752, 29918, 14144, 1839, 14748, 16215, 3259, 2033, 13, 9651, 3883, 29889, 13322, 29918, 3126, 29898, 1068, 2914, 29897, 13, 4706, 25342, 2752, 29918, 14144, 1839, 14748, 16215, 786, 5105, 3097, 2033, 1275, 525, 29895, 12283, 3373, 5105, 519, 19661, 3624, 8139, 556, 2396, 13, 9651, 1121, 1839, 7645, 2033, 353, 376, 1576, 10823, 1873, 2734, 373, 278, 3495, 338, 20687, 29908, 320, 13, 462, 9651, 376, 1135, 278, 10823, 1873, 373, 278, 9867, 29908, 13, 9651, 1121, 1839, 3259, 2033, 353, 2752, 29918, 14144, 1839, 14748, 16215, 3259, 2033, 13, 9651, 3883, 29889, 13322, 29918, 3126, 29898, 1068, 2914, 29897, 13, 4706, 25342, 2752, 29918, 14144, 1839, 14748, 16215, 786, 5105, 3097, 2033, 1275, 525, 29895, 12283, 3373, 5105, 519, 19661, 3624, 21648, 2396, 13, 9651, 3883, 29889, 14057, 29918, 3126, 29898, 13, 18884, 3939, 29922, 8824, 29892, 13, 18884, 10191, 543, 1576, 10823, 1873, 2734, 373, 278, 3495, 338, 2086, 2030, 304, 2304, 701, 629, 3076, 1159, 13, 4706, 1683, 29901, 13, 9651, 3883, 29889, 14057, 29918, 3126, 29898, 13, 18884, 3939, 29922, 8824, 29892, 13, 18884, 10191, 543, 6028, 29915, 29873, 14955, 278, 10823, 2861, 304, 9815, 470, 8340, 29908, 13, 462, 1678, 376, 10823, 1873, 2734, 373, 278, 3495, 1159, 13, 1678, 5174, 3142, 1982, 29918, 2704, 29889, 4574, 1307, 24616, 408, 321, 29901, 13, 4706, 396, 1149, 8868, 545, 322, 3461, 738, 1059, 7191, 29889, 13, 4706, 12020, 1649, 1111, 13244, 537, 29918, 11739, 1649, 13789, 29898, 29872, 29889, 949, 3285, 3883, 29897, 13, 1678, 5174, 8960, 408, 1059, 29901, 13, 4706, 12020, 1649, 1111, 13244, 537, 29918, 11739, 1649, 13789, 29898, 2704, 29892, 3883, 29897, 13, 13, 13, 1753, 1667, 7295, 13, 1678, 396, 1149, 16012, 278, 2322, 6273, 3704, 1906, 2702, 304, 278, 315, 1148, 267, 537, 28330, 29889, 13, 1678, 2980, 29918, 6550, 353, 16165, 267, 537, 29918, 9435, 29918, 23516, 29918, 6550, 580, 13, 1678, 2980, 29918, 6550, 29889, 5504, 29898, 13, 4706, 9657, 29898, 13, 9651, 2106, 29922, 8977, 29898, 1859, 1575, 29922, 1839, 6338, 742, 525, 6897, 296, 7464, 2322, 2433, 6338, 5477, 13, 9651, 5142, 29918, 5479, 29922, 8977, 29898, 4381, 2433, 5477, 13, 9651, 2669, 29918, 1792, 29922, 8977, 29898, 4381, 2433, 1111, 13244, 537, 14748, 5477, 13, 9651, 2669, 29918, 2972, 29922, 8977, 29898, 4381, 2433, 1111, 13244, 537, 14748, 5477, 13, 9651, 1653, 29918, 1792, 29922, 8977, 29898, 4381, 29922, 5574, 29892, 1134, 2433, 11227, 5477, 13, 9651, 934, 29918, 6707, 29922, 8977, 29898, 4381, 29922, 8824, 29892, 1134, 2433, 11227, 5477, 13, 9651, 7531, 29918, 5113, 29922, 8977, 29898, 4381, 29922, 8824, 29892, 1134, 2433, 11227, 5477, 13, 9651, 5142, 29918, 5338, 29922, 8977, 29898, 1753, 1300, 2433, 5477, 13, 9651, 13598, 29918, 5205, 29922, 8977, 29898, 1753, 284, 329, 543, 613, 1134, 2433, 710, 5477, 13, 9651, 3495, 29922, 8977, 29898, 1853, 2433, 710, 742, 2322, 2433, 5477, 13, 9651, 14955, 29922, 8977, 29898, 1853, 2433, 11227, 742, 2322, 29922, 8824, 511, 13, 9651, 4480, 29918, 1195, 2667, 29922, 8977, 29898, 1853, 2433, 524, 742, 2322, 29922, 29941, 29900, 511, 13, 4706, 1723, 13, 1678, 1723, 13, 13, 1678, 396, 1149, 6204, 263, 716, 3883, 1203, 13, 1678, 3883, 353, 530, 1687, 7355, 29898, 23516, 29918, 6550, 29922, 23516, 29918, 6550, 29892, 13, 462, 965, 11286, 29918, 3198, 29918, 8513, 29922, 5574, 29897, 13, 1678, 2582, 353, 9657, 29898, 13, 4706, 3939, 29922, 8824, 29892, 13, 4706, 1873, 29922, 8824, 29892, 13, 4706, 2106, 29922, 5453, 29889, 7529, 29889, 657, 877, 3859, 1495, 13, 1678, 1723, 13, 13, 1678, 396, 1149, 8561, 263, 13201, 3884, 304, 3699, 278, 16532, 27786, 29889, 13, 1678, 565, 3883, 29889, 7529, 29889, 657, 877, 10382, 29918, 5479, 29374, 13, 4706, 5694, 3972, 353, 3883, 29889, 7529, 29889, 657, 877, 10382, 29918, 5479, 1495, 13, 4706, 1653, 29918, 10382, 29918, 3972, 29898, 5453, 29892, 5694, 3972, 29897, 13, 1678, 1683, 29901, 13, 4706, 5694, 3972, 353, 14690, 29881, 7382, 29898, 13, 9651, 10944, 543, 550, 1821, 1213, 13, 4706, 1723, 13, 1678, 396, 28330, 11161, 363, 319, 6415, 13598, 1788, 338, 2309, 773, 7531, 3577, 29889, 13, 1678, 565, 3883, 29889, 7529, 29889, 657, 877, 3372, 1218, 29918, 5205, 1495, 1275, 376, 29909, 6415, 1115, 13, 4706, 3883, 29889, 7529, 1839, 11487, 29918, 5113, 2033, 353, 5852, 13, 13, 1678, 2551, 353, 5852, 13, 1678, 1018, 29901, 13, 4706, 565, 3883, 29889, 3198, 29918, 8513, 29901, 13, 9651, 2582, 353, 1423, 29918, 14748, 29898, 5453, 29892, 2582, 29897, 13, 9651, 1423, 29918, 8513, 29918, 9902, 353, 9657, 29898, 13, 18884, 3939, 29922, 8824, 29892, 13, 18884, 10191, 543, 5596, 21864, 29901, 28330, 338, 15447, 451, 2799, 4212, 613, 13, 18884, 1873, 13776, 13, 9651, 1723, 13, 9651, 565, 3883, 29889, 7529, 29889, 657, 877, 3859, 1495, 1275, 376, 6338, 1115, 13, 18884, 565, 2582, 1839, 3259, 2033, 29901, 13, 462, 1678, 1423, 29918, 8513, 29918, 9902, 29961, 13, 462, 4706, 525, 7645, 2033, 353, 376, 5596, 21864, 29901, 28330, 338, 5279, 5130, 29889, 29871, 1939, 3620, 29908, 13, 18884, 1683, 29901, 13, 462, 1678, 1423, 29918, 8513, 29918, 9902, 29961, 13, 462, 4706, 525, 7645, 2033, 353, 376, 5596, 21864, 29901, 28330, 338, 5279, 451, 5130, 29889, 29871, 910, 3158, 723, 2601, 278, 28330, 1213, 13, 462, 1678, 1423, 29918, 8513, 29918, 9902, 1839, 3259, 2033, 353, 2582, 1839, 3259, 2033, 13, 9651, 1683, 29901, 13, 18884, 565, 2582, 1839, 3259, 2033, 29901, 13, 462, 1678, 1423, 29918, 8513, 29918, 9902, 29961, 13, 462, 4706, 525, 7645, 2033, 353, 376, 5596, 21864, 29901, 28330, 338, 5279, 5130, 29889, 29871, 910, 3158, 723, 27608, 278, 28330, 1213, 13, 462, 1678, 1423, 29918, 8513, 29918, 9902, 1839, 3259, 2033, 353, 2582, 1839, 3259, 2033, 13, 18884, 1683, 29901, 13, 462, 1678, 1423, 29918, 8513, 29918, 9902, 29961, 13, 462, 4706, 525, 7645, 2033, 353, 376, 5596, 21864, 29901, 28330, 338, 5279, 451, 5130, 29889, 29871, 1939, 3620, 1213, 13, 9651, 3883, 29889, 13322, 29918, 3126, 29898, 1068, 3198, 29918, 8513, 29918, 9902, 29897, 13, 13, 4706, 25342, 3883, 29889, 7529, 29889, 657, 877, 3859, 1495, 1275, 376, 6338, 29908, 322, 451, 3883, 29889, 7529, 29889, 657, 877, 786, 8228, 29374, 13, 9651, 396, 1149, 5399, 565, 278, 315, 1148, 267, 537, 28330, 338, 5279, 5130, 322, 871, 7135, 278, 2601, 13, 9651, 396, 1149, 565, 278, 10823, 947, 451, 1863, 29889, 13, 9651, 2582, 353, 1423, 29918, 14748, 29898, 5453, 29892, 2582, 29897, 13, 13, 9651, 565, 451, 2582, 1839, 3259, 2033, 29901, 13, 18884, 565, 451, 3883, 29889, 7529, 29889, 657, 877, 11487, 29918, 5113, 29374, 13, 462, 1678, 2582, 1839, 9507, 2033, 353, 5142, 29918, 14748, 29898, 5453, 29892, 5694, 3972, 29897, 13, 462, 1678, 2582, 1839, 15033, 7464, 2582, 1839, 4906, 7464, 2582, 1839, 6252, 261, 2033, 353, 6597, 29918, 14748, 29898, 13, 462, 4706, 3883, 29892, 2582, 1839, 9507, 11287, 13, 462, 1678, 2582, 1839, 15033, 7464, 2582, 1839, 4906, 2033, 353, 2601, 29918, 14748, 29898, 13, 462, 4706, 3883, 29892, 2582, 1839, 6252, 261, 7464, 7700, 29897, 13, 462, 1678, 2582, 353, 1423, 29918, 14748, 29898, 5453, 29892, 2582, 29897, 13, 18884, 1683, 29901, 13, 462, 1678, 2582, 1839, 9507, 2033, 353, 5142, 29918, 14748, 29898, 5453, 29892, 5694, 3972, 29897, 13, 462, 1678, 2582, 1839, 15033, 7464, 2582, 1839, 4906, 2033, 353, 2601, 29918, 14748, 29898, 5453, 29892, 2582, 1839, 9507, 7464, 5852, 29897, 13, 462, 1678, 2582, 353, 1423, 29918, 14748, 29898, 5453, 29892, 2582, 29897, 13, 9651, 25342, 2582, 1839, 3259, 2033, 1275, 376, 26690, 1115, 13, 18884, 396, 1149, 1670, 338, 263, 1108, 393, 591, 881, 297, 1960, 277, 17062, 29889, 13, 18884, 3883, 29889, 14057, 29918, 3126, 29898, 13, 462, 1678, 10191, 543, 29907, 1148, 267, 537, 28330, 338, 22039, 5130, 613, 3579, 9902, 29897, 13, 9651, 1683, 29901, 13, 18884, 396, 1149, 960, 591, 4520, 263, 2854, 1873, 769, 278, 11833, 674, 367, 13, 18884, 396, 1149, 393, 278, 28330, 338, 5130, 29889, 29871, 1334, 881, 3763, 1209, 372, 285, 340, 538, 13, 18884, 396, 1149, 322, 1044, 763, 2712, 526, 4226, 29889, 13, 18884, 1209, 13, 4706, 25342, 3883, 29889, 7529, 29889, 657, 877, 3859, 1495, 1275, 376, 6338, 29908, 322, 3883, 29889, 7529, 29889, 657, 877, 786, 8228, 29374, 13, 9651, 565, 451, 3883, 29889, 7529, 29889, 657, 877, 3069, 29374, 13, 18884, 3883, 29889, 14057, 29918, 3126, 29898, 13, 462, 1678, 3939, 29922, 8824, 29892, 13, 462, 1678, 10191, 543, 1576, 3495, 3443, 338, 3734, 363, 10823, 701, 629, 3076, 1159, 13, 9651, 2767, 29918, 14748, 29898, 5453, 29897, 13, 4706, 25342, 3883, 29889, 7529, 29889, 657, 877, 3859, 1495, 1275, 376, 6897, 296, 1115, 13, 9651, 396, 1149, 5399, 565, 278, 315, 1148, 267, 537, 28330, 338, 5279, 5130, 322, 871, 7135, 278, 27608, 13, 9651, 396, 1149, 565, 278, 10823, 4864, 29889, 13, 9651, 2582, 353, 1423, 29918, 14748, 29898, 5453, 29892, 2582, 29897, 13, 13, 9651, 396, 1149, 960, 3099, 338, 4133, 29892, 591, 881, 3349, 278, 10823, 29889, 29871, 1334, 884, 1016, 29915, 29873, 2562, 565, 727, 13, 9651, 396, 1149, 338, 738, 1962, 515, 278, 1423, 577, 591, 674, 1835, 393, 714, 310, 278, 2582, 304, 5941, 701, 13, 9651, 396, 1149, 1749, 736, 848, 29889, 13, 9651, 565, 2582, 1839, 3259, 2033, 29901, 13, 18884, 565, 451, 3883, 29889, 7529, 29889, 657, 877, 11487, 29918, 5113, 29374, 13, 462, 1678, 2582, 29889, 7323, 877, 3198, 29918, 14748, 742, 6213, 29897, 13, 462, 1678, 396, 1149, 1932, 11077, 278, 10823, 29892, 591, 674, 817, 304, 5142, 278, 27786, 2748, 1449, 29892, 13, 462, 1678, 396, 1149, 322, 769, 1065, 278, 1192, 8159, 29899, 348, 6252, 1899, 29889, 13, 462, 1678, 2582, 1839, 9507, 2033, 353, 5142, 29918, 14748, 29898, 5453, 29892, 5694, 3972, 29897, 13, 462, 1678, 2582, 1839, 15033, 7464, 2582, 1839, 4906, 7464, 2582, 1839, 6252, 261, 2033, 353, 6597, 29918, 14748, 29898, 13, 462, 4706, 3883, 29892, 2582, 1839, 9507, 11287, 13, 462, 1678, 2582, 1839, 15033, 7464, 2582, 1839, 4906, 2033, 353, 3349, 29918, 14748, 29898, 13, 462, 4706, 3883, 29892, 2582, 1839, 6252, 261, 7464, 7700, 29897, 13, 18884, 1683, 29901, 13, 462, 1678, 2582, 1839, 15033, 7464, 2582, 1839, 4906, 2033, 353, 3349, 29918, 14748, 29898, 5453, 29892, 12633, 5852, 29897, 13, 4706, 1683, 29901, 13, 9651, 396, 1149, 910, 1059, 881, 2360, 3799, 2729, 373, 278, 731, 9859, 304, 278, 3443, 29889, 13, 9651, 396, 1149, 2398, 29892, 297, 1206, 29892, 591, 881, 12020, 385, 8210, 1059, 29889, 13, 9651, 3883, 29889, 14057, 29918, 3126, 29898, 7645, 543, 13919, 4306, 4629, 29901, 426, 29900, 29913, 1642, 4830, 29898, 13, 18884, 3883, 29889, 7529, 29889, 657, 877, 3859, 1495, 511, 3939, 29922, 8824, 29897, 13, 1678, 5174, 8960, 408, 1059, 29901, 13, 4706, 396, 1149, 450, 3682, 7834, 881, 1603, 7135, 541, 925, 297, 1206, 29892, 1235, 29915, 29879, 731, 445, 13, 4706, 396, 1149, 2286, 525, 8698, 29915, 304, 367, 7700, 29889, 13, 4706, 2551, 353, 7700, 13, 13, 4706, 396, 1149, 8251, 278, 1571, 1059, 7834, 29889, 13, 4706, 10191, 353, 376, 29965, 13996, 6021, 1059, 8581, 1550, 767, 6751, 278, 315, 1148, 267, 537, 8074, 28330, 1213, 13, 4706, 12020, 1649, 1111, 13244, 537, 29918, 11739, 1649, 13789, 29898, 2704, 29892, 3883, 29892, 10191, 29897, 13, 13, 1678, 7146, 29901, 13, 4706, 396, 1149, 1334, 881, 5217, 278, 16532, 27786, 17126, 310, 1749, 2551, 29889, 29871, 910, 1033, 367, 2553, 630, 13, 4706, 396, 1149, 2845, 982, 541, 2444, 763, 263, 2253, 7348, 29889, 13, 4706, 565, 3883, 29889, 7529, 29889, 657, 877, 10382, 29918, 5479, 29374, 13, 9651, 565, 525, 6252, 261, 29915, 297, 2582, 29901, 13, 18884, 528, 4422, 29889, 1758, 8336, 29898, 9902, 1839, 6252, 261, 11287, 13, 4706, 1683, 29901, 13, 9651, 528, 4422, 29889, 1758, 8336, 29898, 7382, 3972, 29897, 13, 13, 1678, 565, 2551, 29901, 13, 4706, 396, 1599, 7106, 530, 1687, 4663, 13, 4706, 3883, 29889, 13322, 29918, 3126, 29898, 1068, 9902, 29897, 13, 1678, 1683, 29901, 13, 4706, 3883, 29889, 14057, 29918, 3126, 29898, 7645, 543, 29907, 1148, 267, 537, 28330, 18390, 613, 3579, 9902, 29897, 13, 13, 13, 361, 4770, 978, 1649, 1275, 525, 1649, 3396, 1649, 2396, 13, 1678, 1667, 580, 13, 2 ]
source/upload_user_stats.py
CheyenneNS/metrics
0
174989
<reponame>CheyenneNS/metrics<gh_stars>0 import time import methods_upload_user_stats import datetime print("############################################") print("User Stats Upload (UTC): " + str(datetime.datetime.utcnow())) start_time = time.time() user_stats_dict = methods_upload_user_stats.get_user_info_from_auth2() user_stats_dict = methods_upload_user_stats.get_internal_users(user_stats_dict) user_stats_dict = methods_upload_user_stats.get_user_orgs_count(user_stats_dict) user_stats_dict = methods_upload_user_stats.get_user_narrative_stats(user_stats_dict) user_stats_dict = methods_upload_user_stats.get_institution_and_country(user_stats_dict) print("--- gather data %s seconds ---" % (time.time() - start_time)) methods_upload_user_stats.upload_user_data(user_stats_dict) print("--- including user info and user_stats upload %s seconds ---" % (time.time() - start_time))
[ 1, 529, 276, 1112, 420, 29958, 26856, 29891, 4584, 3059, 29914, 2527, 10817, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 5215, 931, 13, 5215, 3519, 29918, 9009, 29918, 1792, 29918, 16202, 13, 5215, 12865, 13, 2158, 703, 13383, 13383, 7346, 4136, 1159, 13, 2158, 703, 2659, 624, 1446, 5020, 1359, 313, 26913, 1125, 376, 718, 851, 29898, 12673, 29889, 12673, 29889, 329, 29883, 3707, 22130, 13, 2962, 29918, 2230, 353, 931, 29889, 2230, 580, 13, 1792, 29918, 16202, 29918, 8977, 353, 3519, 29918, 9009, 29918, 1792, 29918, 16202, 29889, 657, 29918, 1792, 29918, 3888, 29918, 3166, 29918, 5150, 29906, 580, 13, 1792, 29918, 16202, 29918, 8977, 353, 3519, 29918, 9009, 29918, 1792, 29918, 16202, 29889, 657, 29918, 7564, 29918, 7193, 29898, 1792, 29918, 16202, 29918, 8977, 29897, 13, 1792, 29918, 16202, 29918, 8977, 353, 3519, 29918, 9009, 29918, 1792, 29918, 16202, 29889, 657, 29918, 1792, 29918, 990, 29879, 29918, 2798, 29898, 1792, 29918, 16202, 29918, 8977, 29897, 13, 1792, 29918, 16202, 29918, 8977, 353, 3519, 29918, 9009, 29918, 1792, 29918, 16202, 29889, 657, 29918, 1792, 29918, 29876, 2749, 1230, 29918, 16202, 29898, 1792, 29918, 16202, 29918, 8977, 29897, 13, 1792, 29918, 16202, 29918, 8977, 353, 3519, 29918, 9009, 29918, 1792, 29918, 16202, 29889, 657, 29918, 2611, 5008, 29918, 392, 29918, 13509, 29898, 1792, 29918, 16202, 29918, 8977, 29897, 13, 2158, 703, 5634, 11705, 848, 1273, 29879, 6923, 11474, 29908, 1273, 313, 2230, 29889, 2230, 580, 448, 1369, 29918, 2230, 876, 13, 23515, 29918, 9009, 29918, 1792, 29918, 16202, 29889, 9009, 29918, 1792, 29918, 1272, 29898, 1792, 29918, 16202, 29918, 8977, 29897, 13, 2158, 703, 5634, 3704, 1404, 5235, 322, 1404, 29918, 16202, 6441, 1273, 29879, 6923, 11474, 29908, 1273, 313, 2230, 29889, 2230, 580, 448, 1369, 29918, 2230, 876, 13, 13, 13, 13, 2 ]
subversion/tests/cmdline/svnlook_tests.py
jmckaskill/subversion
1
129021
<reponame>jmckaskill/subversion #!/usr/bin/env python # # svnlook_tests.py: testing the 'svnlook' tool. # # Subversion is a tool for revision control. # See http://subversion.apache.org for more information. # # ==================================================================== # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. ###################################################################### # General modules import re, os, logging logger = logging.getLogger() # Our testing module import svntest # (abbreviation) Skip = svntest.testcase.Skip_deco SkipUnless = svntest.testcase.SkipUnless_deco XFail = svntest.testcase.XFail_deco Issues = svntest.testcase.Issues_deco Issue = svntest.testcase.Issue_deco Wimp = svntest.testcase.Wimp_deco Item = svntest.wc.StateItem #---------------------------------------------------------------------- # Convenience functions to make writing more tests easier def run_svnlook(*varargs): """Run svnlook with VARARGS, returns stdout as list of lines. Raises Failure if any stderr messages.""" exit_code, output, dummy_errput = svntest.main.run_command( svntest.main.svnlook_binary, 0, 0, *varargs) return output def expect(tag, expected, got): if expected != got: logger.warn("When testing: %s", tag) logger.warn("Expected: %s", expected) logger.warn(" Got: %s", got) raise svntest.Failure # Tests def test_misc(sbox): "test miscellaneous svnlook features" sbox.build() wc_dir = sbox.wc_dir repo_dir = sbox.repo_dir # Make a couple of local mods to files mu_path = os.path.join(wc_dir, 'A', 'mu') rho_path = os.path.join(wc_dir, 'A', 'D', 'G', 'rho') svntest.main.file_append(mu_path, 'appended mu text') svntest.main.file_append(rho_path, 'new appended text for rho') # Created expected output tree for 'svn ci' expected_output = svntest.wc.State(wc_dir, { 'A/mu' : Item(verb='Sending'), 'A/D/G/rho' : Item(verb='Sending'), }) # Create expected status tree; all local revisions should be at 1, # but mu and rho should be at revision 2. expected_status = svntest.actions.get_virginal_state(wc_dir, 1) expected_status.tweak('A/mu', 'A/D/G/rho', wc_rev=2) svntest.actions.run_and_verify_commit(wc_dir, expected_output, expected_status, None, wc_dir) # give the repo a new UUID uuid = "01234567-89ab-cdef-89ab-cdef01234567" svntest.main.run_command_stdin(svntest.main.svnadmin_binary, None, 0, 1, ["SVN-fs-dump-format-version: 2\n", "\n", "UUID: ", uuid, "\n", ], 'load', '--force-uuid', repo_dir) expect('youngest', [ '2\n' ], run_svnlook('youngest', repo_dir)) expect('uuid', [ uuid + '\n' ], run_svnlook('uuid', repo_dir)) # it would be nice to test the author too, but the current test framework # does not pull a username when testing over ra_neon or ra_svn, # so the commits have an empty author. expect('log', [ 'log msg\n' ], run_svnlook('log', repo_dir)) # check if the 'svnlook tree' output can be expanded to # the 'svnlook tree --full-paths' output if demanding the whole repository treelist = run_svnlook('tree', repo_dir) treelistfull = run_svnlook('tree', '--full-paths', repo_dir) path = '' treelistexpand = [] for entry in treelist: len1 = len(entry) len2 = len(entry.lstrip()) path = path[0:2*(len1-len2)-1] + entry.strip() + '\n' if path == '/\n': treelistexpand.append(path) else: treelistexpand.append(path[1:]) treelistexpand = svntest.verify.UnorderedOutput(treelistexpand) svntest.verify.compare_and_display_lines('Unexpected result from tree', '', treelistexpand, treelistfull) # check if the 'svnlook tree' output is the ending of # the 'svnlook tree --full-paths' output if demanding # any part of the repository treelist = run_svnlook('tree', repo_dir, '/A/B') treelistfull = run_svnlook('tree', '--full-paths', repo_dir, '/A/B') path = '' treelistexpand = [] for entry in treelist: len1 = len(entry) len2 = len(entry.lstrip()) path = path[0:2*(len1-len2)] + entry.strip() + '\n' treelistexpand.append('/A/' + path) treelistexpand = svntest.verify.UnorderedOutput(treelistexpand) svntest.verify.compare_and_display_lines('Unexpected result from tree', '', treelistexpand, treelistfull) treelist = run_svnlook('tree', repo_dir, '/') if treelist[0] != '/\n': raise svntest.Failure expect('propget svn:log', [ 'log msg' ], run_svnlook('propget', '--revprop', repo_dir, 'svn:log')) proplist = run_svnlook('proplist', '--revprop', repo_dir) proplist = sorted([prop.strip() for prop in proplist]) # We cannot rely on svn:author's presence. ra_svn doesn't set it. if not (proplist == [ 'svn:author', 'svn:date', 'svn:log' ] or proplist == [ 'svn:date', 'svn:log' ]): logger.warn("Unexpected result from proplist: %s", proplist) raise svntest.Failure prop_name = 'foo:bar-baz-quux' exit_code, output, errput = svntest.main.run_svnlook('propget', '--revprop', repo_dir, prop_name) expected_err = "Property '%s' not found on revision " % prop_name for line in errput: if line.find(expected_err) != -1: break else: raise svntest.main.SVNUnmatchedError exit_code, output, errput = svntest.main.run_svnlook('propget', '-r1', repo_dir, prop_name, '/') expected_err = "Property '%s' not found on path '/' in revision " % prop_name for line in errput: if line.find(expected_err) != -1: break else: raise svntest.main.SVNUnmatchedError #---------------------------------------------------------------------- # Issue 1089 @Issue(1089) def delete_file_in_moved_dir(sbox): "delete file in moved dir" sbox.build() wc_dir = sbox.wc_dir repo_dir = sbox.repo_dir # move E to E2 and delete E2/alpha E_path = os.path.join(wc_dir, 'A', 'B', 'E') E2_path = os.path.join(wc_dir, 'A', 'B', 'E2') svntest.actions.run_and_verify_svn(None, None, [], 'mv', E_path, E2_path) alpha_path = os.path.join(E2_path, 'alpha') svntest.actions.run_and_verify_svn(None, None, [], 'rm', alpha_path) # commit expected_output = svntest.wc.State(wc_dir, { 'A/B/E' : Item(verb='Deleting'), 'A/B/E2' : Item(verb='Adding'), 'A/B/E2/alpha' : Item(verb='Deleting'), }) expected_status = svntest.actions.get_virginal_state(wc_dir, 1) expected_status.remove('A/B/E', 'A/B/E/alpha', 'A/B/E/beta') expected_status.add({ 'A/B/E2' : Item(status=' ', wc_rev=2), 'A/B/E2/beta' : Item(status=' ', wc_rev=2), }) ### this commit fails. the 'alpha' node is marked 'not-present' since it ### is a deleted child of a move/copy. this is all well and proper. ### however, during the commit, the parent node is committed down to just ### the BASE node. at that point, 'alpha' has no parent in WORKING which ### is a schema violation. there is a plan for committing in this kind of ### situation, layed out in wc-ng-design. that needs to be implemented ### in order to get this commit working again. svntest.actions.run_and_verify_commit(wc_dir, expected_output, expected_status, None, wc_dir) exit_code, output, errput = svntest.main.run_svnlook("dirs-changed", repo_dir) if errput: raise svntest.Failure # Okay. No failure, but did we get the right output? if len(output) != 2: raise svntest.Failure if not ((output[0].strip() == 'A/B/') and (output[1].strip() == 'A/B/E2/')): raise svntest.Failure #---------------------------------------------------------------------- # Issue 1241 @Issue(1241) def test_print_property_diffs(sbox): "test the printing of property diffs" sbox.build() wc_dir = sbox.wc_dir repo_dir = sbox.repo_dir # Add a bogus property to iota iota_path = os.path.join(wc_dir, 'iota') svntest.actions.run_and_verify_svn(None, None, [], 'propset', 'bogus_prop', 'bogus_val', iota_path) # commit the change svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m', 'log msg', iota_path) # Grab the diff exit_code, expected_output, err = svntest.actions.run_and_verify_svn( None, None, [], 'diff', '-r', 'PREV', iota_path) exit_code, output, errput = svntest.main.run_svnlook("diff", repo_dir) if errput: raise svntest.Failure # Okay. No failure, but did we get the right output? if len(output) != len(expected_output): raise svntest.Failure canonical_iota_path = iota_path.replace(os.path.sep, '/') # replace wcdir/iota with iota in expected_output for i in range(len(expected_output)): expected_output[i] = expected_output[i].replace(canonical_iota_path, 'iota') # Check that the header filenames match. if expected_output[2].split()[1] != output[2].split()[1]: raise svntest.Failure if expected_output[3].split()[1] != output[3].split()[1]: raise svntest.Failure svntest.verify.compare_and_display_lines('', '', expected_output[4:], output[4:]) #---------------------------------------------------------------------- # Check that svnlook info repairs allows inconsistent line endings in logs. def info_bad_newlines(sbox): "svnlook info must allow inconsistent newlines" dump_str = """SVN-fs-dump-format-version: 2 UUID: dc40867b-38f6-0310-9f5f-f81aa277e06e Revision-number: 0 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2005-05-03T19:09:41.129900Z PROPS-END Revision-number: 1 Prop-content-length: 99 Content-length: 99 K 7 svn:log V 3 \n\r\n K 10 svn:author V 2 pl K 8 svn:date V 27 2005-05-03T19:10:19.975578Z PROPS-END Node-path: file Node-kind: file Node-action: add Prop-content-length: 10 Text-content-length: 5 Text-content-md5: e1cbb0c3879af8347246f12c559a86b5 Content-length: 15 PROPS-END text """ # load dumpfile with inconsistent newlines into repos. svntest.actions.load_repo(sbox, dump_str=dump_str, bypass_prop_validation=True) exit_code, output, errput = svntest.main.run_svnlook("info", sbox.repo_dir, "-r1") if errput: raise svntest.Failure def changed_copy_info(sbox): "test --copy-info flag on the changed command" sbox.build() wc_dir = sbox.wc_dir repo_dir = sbox.repo_dir # Copy alpha to /A/alpha2. E_path = os.path.join(wc_dir, 'A', 'B', 'E') alpha_path = os.path.join(wc_dir, 'A', 'B', 'E', 'alpha') alpha2_path = os.path.join(wc_dir, 'A', 'alpha2') svntest.actions.run_and_verify_svn(None, None, [], 'cp', alpha_path, alpha2_path) # commit expected_output = svntest.wc.State(wc_dir, { 'A/alpha2' : Item(verb='Adding'), }) expected_status = svntest.actions.get_virginal_state(wc_dir, 1) expected_status.add({ 'A/alpha2' : Item(status=' ', wc_rev=2), }) svntest.actions.run_and_verify_commit(wc_dir, expected_output, expected_status, None, wc_dir) exit_code, output, errput = svntest.main.run_svnlook("changed", repo_dir) if errput: raise svntest.Failure expect("changed without --copy-info", ["A A/alpha2\n"], output) exit_code, output, errput = svntest.main.run_svnlook("changed", repo_dir, "--copy-info") if errput: raise svntest.Failure expect("changed with --copy-info", ["A + A/alpha2\n", " (from A/B/E/alpha:r1)\n"], output) #---------------------------------------------------------------------- # Issue 2663 @Issue(2663) def tree_non_recursive(sbox): "test 'svnlook tree --non-recursive'" sbox.build() repo_dir = sbox.repo_dir expected_results_root = ('/', ' iota', ' A/') expected_results_deep = ('B/', ' lambda', ' E/', ' F/') # check the output of svnlook --non-recursive on the # root of the repository treelist = run_svnlook('tree', '--non-recursive', repo_dir) for entry in treelist: if not entry.rstrip() in expected_results_root: logger.warn("Unexpected result from tree with --non-recursive:") logger.warn(" entry : %s", entry.rstrip()) raise svntest.Failure if len(treelist) != len(expected_results_root): logger.warn("Expected %i output entries, found %i", len(expected_results_root), len(treelist)) raise svntest.Failure # check the output of svnlook --non-recursive on a # subdirectory of the repository treelist = run_svnlook('tree', '--non-recursive', repo_dir, '/A/B') for entry in treelist: if not entry.rstrip() in expected_results_deep: logger.warn("Unexpected result from tree with --non-recursive:") logger.warn(" entry : %s", entry.rstrip()) raise svntest.Failure if len(treelist) != len(expected_results_deep): logger.warn("Expected %i output entries, found %i", len(expected_results_deep), len(treelist)) raise svntest.Failure #---------------------------------------------------------------------- def limit_history(sbox): "history --limit" sbox.build(create_wc=False) repo_url = sbox.repo_url svntest.actions.run_and_verify_svn(None, None, [], 'mv', '-m', 'log msg', repo_url + "/iota", repo_url + "/iota2") svntest.actions.run_and_verify_svn(None, None, [], 'mv', '-m', 'log msg', repo_url + "/A/mu", repo_url + "/iota") history = run_svnlook("history", "--limit=1", sbox.repo_dir) # Ignore the two lines of header, and verify expected number of items. if len(history[2:]) != 1: raise svntest.Failure("Output not limited to expected number of items") #---------------------------------------------------------------------- def diff_ignore_whitespace(sbox): "test 'svnlook diff -x -b' and 'svnlook diff -x -w'" sbox.build() repo_dir = sbox.repo_dir wc_dir = sbox.wc_dir # Make whitespace-only changes to mu mu_path = os.path.join(wc_dir, 'A', 'mu') svntest.main.file_write(mu_path, "This is the file 'mu'.\n", "wb") # Created expected output tree for 'svn ci' expected_output = svntest.wc.State(wc_dir, { 'A/mu' : Item(verb='Sending'), }) # Create expected status tree; all local revisions should be at 1, # but mu should be at revision 2. expected_status = svntest.actions.get_virginal_state(wc_dir, 1) expected_status.tweak('A/mu', wc_rev=2) svntest.actions.run_and_verify_commit(wc_dir, expected_output, expected_status, None, wc_dir) # Check the output of 'svnlook diff -x --ignore-space-change' on mu. # It should not print anything. output = run_svnlook('diff', '-r2', '-x', '--ignore-space-change', repo_dir) if output != []: raise svntest.Failure # Check the output of 'svnlook diff -x --ignore-all-space' on mu. # It should not print anything. output = run_svnlook('diff', '-r2', '-x', '--ignore-all-space', repo_dir) if output != []: raise svntest.Failure #---------------------------------------------------------------------- def diff_ignore_eolstyle(sbox): "test 'svnlook diff -x --ignore-eol-style'" sbox.build() repo_dir = sbox.repo_dir wc_dir = sbox.wc_dir if os.name == 'nt': crlf = '\n' else: crlf = '\r\n' mu_path = os.path.join(wc_dir, 'A', 'mu') rev = 1 # do the --ignore-eol-style test for each eol-style for eol, eolchar in zip(['CRLF', 'CR', 'native', 'LF'], [crlf, '\015', '\n', '\012']): # rewrite file mu and set the eol-style property. svntest.main.file_write(mu_path, "This is the file 'mu'." + eolchar, 'wb') svntest.main.run_svn(None, 'propset', 'svn:eol-style', eol, mu_path) # Created expected output tree for 'svn ci' expected_output = svntest.wc.State(wc_dir, { 'A/mu' : Item(verb='Sending'), }) # Create expected status tree; all local revisions should be at # revision 1, but mu should be at revision rev + 1. expected_status = svntest.actions.get_virginal_state(wc_dir, 1) expected_status.tweak('A/mu', wc_rev=rev + 1) svntest.actions.run_and_verify_commit(wc_dir, expected_output, expected_status, None, wc_dir) # Grab the diff exit_code, expected_output, err = svntest.actions.run_and_verify_svn( None, None, [], 'diff', '-r', 'PREV', '-x', '--ignore-eol-style', mu_path) output = run_svnlook('diff', '-r', str(rev + 1), '-x', '--ignore-eol-style', repo_dir) rev += 1 canonical_mu_path = mu_path.replace(os.path.sep, '/') # replace wcdir/A/mu with A/mu in expected_output for i in range(len(expected_output)): expected_output[i] = expected_output[i].replace(canonical_mu_path, 'A/mu') # Check that the header filenames match. if expected_output[2].split()[1] != output[2].split()[1]: raise svntest.Failure if expected_output[3].split()[1] != output[3].split()[1]: raise svntest.Failure svntest.verify.compare_and_display_lines('', '', expected_output[4:], output[4:]) #---------------------------------------------------------------------- def diff_binary(sbox): "test 'svnlook diff' on binary files" sbox.build() repo_dir = sbox.repo_dir wc_dir = sbox.wc_dir # Set A/mu to a binary mime-type, tweak its text, and commit. mu_path = os.path.join(wc_dir, 'A', 'mu') svntest.main.file_append(mu_path, 'new appended text for mu') svntest.main.run_svn(None, 'propset', 'svn:mime-type', 'application/octet-stream', mu_path) svntest.main.run_svn(None, 'ci', '-m', 'log msg', mu_path) # Now run 'svnlook diff' and look for the "Binary files differ" message. output = run_svnlook('diff', repo_dir) if not "(Binary files differ)\n" in output: raise svntest.Failure("No 'Binary files differ' indication in " "'svnlook diff' output.") #---------------------------------------------------------------------- def test_filesize(sbox): "test 'svnlook filesize'" sbox.build() repo_dir = sbox.repo_dir wc_dir = sbox.wc_dir tree_output = run_svnlook('tree', '--full-paths', repo_dir) for line in tree_output: # Drop line endings line = line.rstrip() # Skip directories if line[-1] == '/': continue # Run 'svnlook cat' and measure the size of the output. cat_output = run_svnlook('cat', repo_dir, line) cat_size = len("".join(cat_output)) # Run 'svnlook filesize' and compare the results with the CAT_SIZE. filesize_output = run_svnlook('filesize', repo_dir, line) if len(filesize_output) != 1: raise svntest.Failure("'svnlook filesize' printed something other than " "a single line of output.") filesize = int(filesize_output[0].strip()) if filesize != cat_size: raise svntest.Failure("'svnlook filesize' and the counted length of " "'svnlook cat's output differ for the path " "'%s'." % (line)) #---------------------------------------------------------------------- def verify_logfile(logfilename, expected_data): if os.path.exists(logfilename): fp = open(logfilename) else: raise svntest.verify.SVNUnexpectedOutput("hook logfile %s not found"\ % logfilename) actual_data = fp.readlines() fp.close() os.unlink(logfilename) svntest.verify.compare_and_display_lines('wrong hook logfile content', 'STDOUT', expected_data, actual_data) def test_txn_flag(sbox): "test 'svnlook * -t'" sbox.build() repo_dir = sbox.repo_dir wc_dir = sbox.wc_dir logfilepath = os.path.join(repo_dir, 'hooks.log') # List changed dirs and files in this transaction hook_template = """import sys,os,subprocess svnlook_bin=%s fp = open(os.path.join(sys.argv[1], 'hooks.log'), 'wb') def output_command(fp, cmd, opt): command = [svnlook_bin, cmd, '-t', sys.argv[2], sys.argv[1]] + opt process = subprocess.Popen(command, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=False, bufsize=-1) (output, errors) = process.communicate() status = process.returncode fp.write(output) fp.write(errors) return status for (svnlook_cmd, svnlook_opt) in %s: output_command(fp, svnlook_cmd, svnlook_opt.split()) fp.close()""" pre_commit_hook = svntest.main.get_pre_commit_hook_path(repo_dir) # 1. svnlook 'changed' -t and 'dirs-changed' -t hook_instance = hook_template % (repr(svntest.main.svnlook_binary), repr([('changed', ''), ('dirs-changed', '')])) svntest.main.create_python_hook_script(pre_commit_hook, hook_instance) # Change files mu and rho A_path = os.path.join(wc_dir, 'A') mu_path = os.path.join(wc_dir, 'A', 'mu') rho_path = os.path.join(wc_dir, 'A', 'D', 'G', 'rho') svntest.main.file_append(mu_path, 'appended mu text') svntest.main.file_append(rho_path, 'new appended text for rho') # commit, and check the hook's logfile svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m', 'log msg', wc_dir) svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) expected_data = [ 'U A/D/G/rho\n', 'U A/mu\n', 'A/\n', 'A/D/G/\n' ] verify_logfile(logfilepath, expected_data) # 2. svnlook 'propget' -t, 'proplist' -t # 2. Change a dir and revision property hook_instance = hook_template % (repr(svntest.main.svnlook_binary), repr([('propget', 'bogus_prop /A'), ('propget', '--revprop bogus_rev_prop'), ('proplist', '/A'), ('proplist', '--revprop')])) svntest.main.create_python_hook_script(pre_commit_hook, hook_instance) svntest.actions.run_and_verify_svn(None, None, [], 'propset', 'bogus_prop', 'bogus_val\n', A_path) svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m', 'log msg', wc_dir, '--with-revprop', 'bogus_rev_prop=bogus_rev_val\n') # Now check the logfile expected_data = [ 'bogus_val\n', 'bogus_rev_val\n', ' bogus_prop\n', ' svn:log\n', ' svn:author\n', # internal property, not really expected ' svn:check-locks\n', ' bogus_rev_prop\n', ' svn:date\n'] verify_logfile(logfilepath, svntest.verify.UnorderedOutput(expected_data)) def property_delete(sbox): "property delete" sbox.build() repo_dir = sbox.repo_dir sbox.simple_propset('foo', 'bar', 'A/mu') sbox.simple_commit() sbox.simple_propdel('foo', 'A/mu') sbox.simple_commit() # XFail since r1293375, changed and diff produce no output on a # property delete svntest.actions.run_and_verify_svnlook(None, ["_U A/mu\n"], [], 'changed', repo_dir) ######################################################################## # Run the tests # list all tests here, starting with None: test_list = [ None, test_misc, delete_file_in_moved_dir, test_print_property_diffs, info_bad_newlines, changed_copy_info, tree_non_recursive, limit_history, diff_ignore_whitespace, diff_ignore_eolstyle, diff_binary, test_filesize, test_txn_flag, property_delete, ] if __name__ == '__main__': svntest.main.run_tests(test_list) # NOTREACHED ### End of file.
[ 1, 529, 276, 1112, 420, 29958, 21231, 384, 1278, 453, 29914, 1491, 3259, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 13, 29937, 29871, 3731, 29876, 6914, 29918, 21150, 29889, 2272, 29901, 29871, 6724, 278, 525, 27517, 6914, 29915, 5780, 29889, 13, 29937, 13, 29937, 29871, 3323, 3259, 338, 263, 5780, 363, 26554, 2761, 29889, 13, 29937, 29871, 2823, 1732, 597, 1491, 3259, 29889, 4288, 29889, 990, 363, 901, 2472, 29889, 13, 29937, 13, 29937, 1275, 9166, 9166, 9166, 9166, 1360, 13, 29937, 1678, 10413, 21144, 304, 278, 13380, 18540, 10606, 313, 3289, 29943, 29897, 1090, 697, 13, 29937, 1678, 470, 901, 17737, 3406, 19405, 8571, 4110, 29889, 29871, 2823, 278, 6058, 12107, 934, 13, 29937, 1678, 13235, 411, 445, 664, 363, 5684, 2472, 13, 29937, 1678, 11211, 3509, 1266, 27428, 29889, 29871, 450, 3339, 29943, 7794, 11259, 445, 934, 13, 29937, 1678, 304, 366, 1090, 278, 13380, 19245, 29892, 10079, 29871, 29906, 29889, 29900, 313, 1552, 13, 29937, 1678, 376, 29931, 293, 1947, 1496, 366, 1122, 451, 671, 445, 934, 5174, 297, 752, 13036, 13, 29937, 1678, 411, 278, 19245, 29889, 29871, 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, 1678, 25870, 3734, 491, 22903, 4307, 470, 15502, 304, 297, 5007, 29892, 13, 29937, 1678, 7047, 13235, 1090, 278, 19245, 338, 13235, 373, 385, 13, 29937, 1678, 376, 3289, 8519, 29908, 350, 3289, 3235, 29892, 399, 1806, 8187, 2692, 399, 1718, 29934, 13566, 29059, 6323, 8707, 29928, 22122, 29903, 8079, 13764, 29979, 13, 29937, 1678, 476, 22255, 29892, 2845, 4653, 470, 2411, 2957, 29889, 29871, 2823, 278, 19245, 363, 278, 13, 29937, 1678, 2702, 4086, 14765, 1076, 11239, 322, 27028, 13, 29937, 1678, 1090, 278, 19245, 29889, 13, 13383, 13383, 13383, 13383, 4136, 2277, 13, 13, 29937, 4593, 10585, 13, 5215, 337, 29892, 2897, 29892, 12183, 13, 13, 21707, 353, 12183, 29889, 657, 16363, 580, 13, 13, 29937, 8680, 6724, 3883, 13, 5215, 3731, 593, 342, 13, 13, 13, 29937, 313, 370, 1030, 14641, 29897, 13, 15797, 666, 353, 3731, 593, 342, 29889, 1688, 4878, 29889, 15797, 666, 29918, 311, 1111, 13, 15797, 666, 2525, 2222, 353, 3731, 593, 342, 29889, 1688, 4878, 29889, 15797, 666, 2525, 2222, 29918, 311, 1111, 13, 29990, 16243, 353, 3731, 593, 342, 29889, 1688, 4878, 29889, 29990, 16243, 29918, 311, 1111, 13, 29902, 893, 1041, 353, 3731, 593, 342, 29889, 1688, 4878, 29889, 29902, 893, 1041, 29918, 311, 1111, 13, 29902, 893, 434, 353, 3731, 593, 342, 29889, 1688, 4878, 29889, 29902, 893, 434, 29918, 311, 1111, 13, 29956, 6574, 353, 3731, 593, 342, 29889, 1688, 4878, 29889, 29956, 6574, 29918, 311, 1111, 13, 2001, 353, 3731, 593, 342, 29889, 29893, 29883, 29889, 2792, 2001, 13, 13, 13, 29937, 2683, 2683, 2683, 2683, 22158, 13, 13, 29937, 1281, 854, 5597, 3168, 304, 1207, 5007, 901, 6987, 6775, 13, 13, 1753, 1065, 29918, 27517, 6914, 10456, 1707, 5085, 1125, 13, 29871, 9995, 6558, 3731, 29876, 6914, 411, 478, 1718, 1718, 10749, 29892, 3639, 27591, 408, 1051, 310, 3454, 29889, 13, 29871, 390, 1759, 267, 29098, 545, 565, 738, 380, 20405, 7191, 1213, 15945, 13, 29871, 6876, 29918, 401, 29892, 1962, 29892, 20254, 29918, 3127, 649, 353, 3731, 593, 342, 29889, 3396, 29889, 3389, 29918, 6519, 29898, 13, 1678, 3731, 593, 342, 29889, 3396, 29889, 27517, 6914, 29918, 19541, 29892, 29871, 29900, 29892, 29871, 29900, 29892, 334, 1707, 5085, 29897, 13, 13, 29871, 736, 1962, 13, 13, 13, 1753, 2149, 29898, 4039, 29892, 3806, 29892, 2355, 1125, 13, 29871, 565, 3806, 2804, 2355, 29901, 13, 1678, 17927, 29889, 25442, 703, 10401, 6724, 29901, 1273, 29879, 613, 4055, 29897, 13, 1678, 17927, 29889, 25442, 703, 1252, 6021, 29901, 1273, 29879, 613, 3806, 29897, 13, 1678, 17927, 29889, 25442, 703, 268, 15992, 29901, 1273, 29879, 613, 2355, 29897, 13, 1678, 12020, 3731, 593, 342, 29889, 24155, 13, 13, 13, 29937, 4321, 29879, 13, 13, 1753, 1243, 29918, 29885, 10669, 29898, 29879, 1884, 1125, 13, 29871, 376, 1688, 3984, 3729, 23584, 3731, 29876, 6914, 5680, 29908, 13, 13, 29871, 269, 1884, 29889, 4282, 580, 13, 29871, 28678, 29918, 3972, 353, 269, 1884, 29889, 29893, 29883, 29918, 3972, 13, 29871, 13761, 29918, 3972, 353, 269, 1884, 29889, 20095, 29918, 3972, 13, 13, 29871, 396, 8561, 263, 7303, 310, 1887, 878, 29879, 304, 2066, 13, 29871, 3887, 29918, 2084, 353, 2897, 29889, 2084, 29889, 7122, 29898, 29893, 29883, 29918, 3972, 29892, 525, 29909, 742, 525, 2589, 1495, 13, 29871, 364, 1251, 29918, 2084, 353, 2897, 29889, 2084, 29889, 7122, 29898, 29893, 29883, 29918, 3972, 29892, 525, 29909, 742, 525, 29928, 742, 525, 29954, 742, 525, 4650, 1495, 13, 29871, 3731, 593, 342, 29889, 3396, 29889, 1445, 29918, 4397, 29898, 2589, 29918, 2084, 29892, 525, 932, 2760, 3887, 1426, 1495, 13, 29871, 3731, 593, 342, 29889, 3396, 29889, 1445, 29918, 4397, 29898, 4650, 29918, 2084, 29892, 525, 1482, 623, 2760, 1426, 363, 364, 1251, 1495, 13, 13, 29871, 396, 6760, 630, 3806, 1962, 5447, 363, 525, 27517, 4583, 29915, 13, 29871, 3806, 29918, 4905, 353, 3731, 593, 342, 29889, 29893, 29883, 29889, 2792, 29898, 29893, 29883, 29918, 3972, 29892, 426, 13, 1678, 525, 29909, 29914, 2589, 29915, 584, 10976, 29898, 18248, 2433, 29903, 2548, 5477, 13, 1678, 525, 29909, 29914, 29928, 29914, 29954, 29914, 4650, 29915, 584, 10976, 29898, 18248, 2433, 29903, 2548, 5477, 13, 1678, 5615, 13, 13, 29871, 396, 6204, 3806, 4660, 5447, 29936, 599, 1887, 23484, 1080, 881, 367, 472, 29871, 29896, 29892, 13, 29871, 396, 541, 3887, 322, 364, 1251, 881, 367, 472, 26554, 29871, 29906, 29889, 13, 29871, 3806, 29918, 4882, 353, 3731, 593, 342, 29889, 7387, 29889, 657, 29918, 2405, 29887, 979, 29918, 3859, 29898, 29893, 29883, 29918, 3972, 29892, 29871, 29896, 29897, 13, 29871, 3806, 29918, 4882, 29889, 29873, 25129, 877, 29909, 29914, 2589, 742, 525, 29909, 29914, 29928, 29914, 29954, 29914, 4650, 742, 28678, 29918, 13478, 29922, 29906, 29897, 13, 13, 29871, 3731, 593, 342, 29889, 7387, 29889, 3389, 29918, 392, 29918, 27902, 29918, 15060, 29898, 29893, 29883, 29918, 3972, 29892, 13, 462, 462, 4706, 3806, 29918, 4905, 29892, 13, 462, 462, 4706, 3806, 29918, 4882, 29892, 13, 462, 462, 4706, 6213, 29892, 13, 462, 462, 4706, 28678, 29918, 3972, 29897, 13, 13, 29871, 396, 2367, 278, 13761, 263, 716, 501, 11150, 13, 29871, 318, 5416, 353, 376, 29900, 29896, 29906, 29941, 29946, 29945, 29953, 29955, 29899, 29947, 29929, 370, 29899, 29883, 1753, 29899, 29947, 29929, 370, 29899, 29883, 1753, 29900, 29896, 29906, 29941, 29946, 29945, 29953, 29955, 29908, 13, 29871, 3731, 593, 342, 29889, 3396, 29889, 3389, 29918, 6519, 29918, 4172, 262, 29898, 4501, 593, 342, 29889, 3396, 29889, 27517, 6406, 29918, 19541, 29892, 6213, 29892, 29871, 29900, 29892, 29871, 29896, 29892, 13, 462, 965, 6796, 7597, 29940, 29899, 5847, 29899, 15070, 29899, 4830, 29899, 3259, 29901, 29871, 29906, 29905, 29876, 613, 13, 462, 9651, 6634, 29876, 613, 13, 462, 9651, 376, 29965, 11150, 29901, 9162, 318, 5416, 29892, 6634, 29876, 613, 13, 462, 965, 21251, 13, 462, 965, 525, 1359, 742, 525, 489, 10118, 29899, 25118, 742, 13761, 29918, 3972, 29897, 13, 13, 29871, 2149, 877, 6293, 865, 342, 742, 518, 525, 29906, 29905, 29876, 29915, 21251, 1065, 29918, 27517, 6914, 877, 6293, 865, 342, 742, 13761, 29918, 3972, 876, 13, 13, 29871, 2149, 877, 25118, 742, 518, 318, 5416, 718, 11297, 29876, 29915, 21251, 1065, 29918, 27517, 6914, 877, 25118, 742, 13761, 29918, 3972, 876, 13, 13, 29871, 396, 372, 723, 367, 7575, 304, 1243, 278, 4148, 2086, 29892, 541, 278, 1857, 1243, 6890, 13, 29871, 396, 947, 451, 8206, 263, 8952, 746, 6724, 975, 1153, 29918, 484, 265, 470, 1153, 29918, 27517, 29892, 13, 29871, 396, 577, 278, 25741, 505, 385, 4069, 4148, 29889, 13, 13, 29871, 2149, 877, 1188, 742, 518, 525, 1188, 10191, 29905, 29876, 29915, 21251, 1065, 29918, 27517, 6914, 877, 1188, 742, 13761, 29918, 3972, 876, 13, 13, 29871, 396, 1423, 565, 278, 525, 27517, 6914, 5447, 29915, 1962, 508, 367, 17832, 304, 13, 29871, 396, 278, 525, 27517, 6914, 5447, 1192, 8159, 29899, 24772, 29915, 1962, 565, 9667, 292, 278, 3353, 9810, 13, 29871, 2578, 295, 391, 353, 1065, 29918, 27517, 6914, 877, 8336, 742, 13761, 29918, 3972, 29897, 13, 29871, 2578, 295, 391, 8159, 353, 1065, 29918, 27517, 6914, 877, 8336, 742, 525, 489, 8159, 29899, 24772, 742, 13761, 29918, 3972, 29897, 13, 13, 29871, 2224, 353, 6629, 13, 29871, 2578, 295, 2488, 26330, 392, 353, 5159, 13, 29871, 363, 6251, 297, 2578, 295, 391, 29901, 13, 1678, 7431, 29896, 353, 7431, 29898, 8269, 29897, 13, 1678, 7431, 29906, 353, 7431, 29898, 8269, 29889, 29880, 17010, 3101, 13, 1678, 2224, 353, 2224, 29961, 29900, 29901, 29906, 16395, 2435, 29896, 29899, 2435, 29906, 6817, 29896, 29962, 718, 6251, 29889, 17010, 580, 718, 11297, 29876, 29915, 13, 1678, 565, 2224, 1275, 525, 7998, 29876, 2396, 13, 418, 2578, 295, 2488, 26330, 392, 29889, 4397, 29898, 2084, 29897, 13, 1678, 1683, 29901, 13, 418, 2578, 295, 2488, 26330, 392, 29889, 4397, 29898, 2084, 29961, 29896, 29901, 2314, 13, 13, 29871, 2578, 295, 2488, 26330, 392, 353, 3731, 593, 342, 29889, 27902, 29889, 2525, 21693, 6466, 29898, 2484, 295, 2488, 26330, 392, 29897, 13, 29871, 3731, 593, 342, 29889, 27902, 29889, 18307, 29918, 392, 29918, 4990, 29918, 9012, 877, 29965, 13996, 6021, 1121, 515, 5447, 742, 15516, 13, 462, 462, 965, 2578, 295, 2488, 26330, 392, 29892, 2578, 295, 391, 8159, 29897, 13, 13, 29871, 396, 1423, 565, 278, 525, 27517, 6914, 5447, 29915, 1962, 338, 278, 17140, 310, 13, 29871, 396, 278, 525, 27517, 6914, 5447, 1192, 8159, 29899, 24772, 29915, 1962, 565, 9667, 292, 13, 29871, 396, 738, 760, 310, 278, 9810, 13, 29871, 2578, 295, 391, 353, 1065, 29918, 27517, 6914, 877, 8336, 742, 13761, 29918, 3972, 29892, 8207, 29909, 29914, 29933, 1495, 13, 29871, 2578, 295, 391, 8159, 353, 1065, 29918, 27517, 6914, 877, 8336, 742, 525, 489, 8159, 29899, 24772, 742, 13761, 29918, 3972, 29892, 8207, 29909, 29914, 29933, 1495, 13, 13, 29871, 2224, 353, 6629, 13, 29871, 2578, 295, 2488, 26330, 392, 353, 5159, 13, 29871, 363, 6251, 297, 2578, 295, 391, 29901, 13, 1678, 7431, 29896, 353, 7431, 29898, 8269, 29897, 13, 1678, 7431, 29906, 353, 7431, 29898, 8269, 29889, 29880, 17010, 3101, 13, 1678, 2224, 353, 2224, 29961, 29900, 29901, 29906, 16395, 2435, 29896, 29899, 2435, 29906, 4638, 718, 6251, 29889, 17010, 580, 718, 11297, 29876, 29915, 13, 1678, 2578, 295, 2488, 26330, 392, 29889, 4397, 11219, 29909, 22208, 718, 2224, 29897, 13, 13, 29871, 2578, 295, 2488, 26330, 392, 353, 3731, 593, 342, 29889, 27902, 29889, 2525, 21693, 6466, 29898, 2484, 295, 2488, 26330, 392, 29897, 13, 29871, 3731, 593, 342, 29889, 27902, 29889, 18307, 29918, 392, 29918, 4990, 29918, 9012, 877, 29965, 13996, 6021, 1121, 515, 5447, 742, 15516, 13, 462, 462, 965, 2578, 295, 2488, 26330, 392, 29892, 2578, 295, 391, 8159, 29897, 13, 13, 29871, 2578, 295, 391, 353, 1065, 29918, 27517, 6914, 877, 8336, 742, 13761, 29918, 3972, 29892, 8207, 1495, 13, 29871, 565, 2578, 295, 391, 29961, 29900, 29962, 2804, 525, 7998, 29876, 2396, 13, 1678, 12020, 3731, 593, 342, 29889, 24155, 13, 13, 29871, 2149, 877, 7728, 657, 3731, 29876, 29901, 1188, 742, 518, 525, 1188, 10191, 29915, 21251, 13, 418, 1065, 29918, 27517, 6914, 877, 7728, 657, 742, 525, 489, 13478, 7728, 742, 13761, 29918, 3972, 29892, 525, 27517, 29901, 1188, 8785, 13, 13, 13, 29871, 410, 572, 391, 353, 1065, 29918, 27517, 6914, 877, 771, 572, 391, 742, 525, 489, 13478, 7728, 742, 13761, 29918, 3972, 29897, 13, 29871, 410, 572, 391, 353, 12705, 4197, 7728, 29889, 17010, 580, 363, 3107, 297, 410, 572, 391, 2314, 13, 13, 29871, 396, 1334, 2609, 19104, 373, 3731, 29876, 29901, 8921, 29915, 29879, 10122, 29889, 1153, 29918, 27517, 1838, 29915, 29873, 731, 372, 29889, 13, 29871, 565, 451, 313, 771, 572, 391, 1275, 518, 525, 27517, 29901, 8921, 742, 525, 27517, 29901, 1256, 742, 525, 27517, 29901, 1188, 29915, 4514, 13, 418, 470, 410, 572, 391, 1275, 518, 525, 27517, 29901, 1256, 742, 525, 27517, 29901, 1188, 29915, 4514, 1125, 13, 1678, 17927, 29889, 25442, 703, 29965, 13996, 6021, 1121, 515, 410, 572, 391, 29901, 1273, 29879, 613, 410, 572, 391, 29897, 13, 1678, 12020, 3731, 593, 342, 29889, 24155, 13, 13, 29871, 3107, 29918, 978, 353, 525, 5431, 29901, 1646, 29899, 27975, 29899, 339, 1314, 29915, 13, 29871, 6876, 29918, 401, 29892, 1962, 29892, 4589, 649, 353, 3731, 593, 342, 29889, 3396, 29889, 3389, 29918, 27517, 6914, 877, 7728, 657, 742, 13, 462, 462, 462, 539, 525, 489, 13478, 7728, 742, 13761, 29918, 3972, 29892, 13, 462, 462, 462, 539, 3107, 29918, 978, 29897, 13, 13, 29871, 3806, 29918, 3127, 353, 376, 4854, 14210, 29879, 29915, 451, 1476, 373, 26554, 376, 1273, 3107, 29918, 978, 13, 29871, 363, 1196, 297, 4589, 649, 29901, 13, 1678, 565, 1196, 29889, 2886, 29898, 9684, 29918, 3127, 29897, 2804, 448, 29896, 29901, 13, 418, 2867, 13, 29871, 1683, 29901, 13, 1678, 12020, 3731, 593, 342, 29889, 3396, 29889, 7597, 29940, 2525, 4352, 287, 2392, 13, 13, 29871, 6876, 29918, 401, 29892, 1962, 29892, 4589, 649, 353, 3731, 593, 342, 29889, 3396, 29889, 3389, 29918, 27517, 6914, 877, 7728, 657, 742, 13, 462, 462, 462, 539, 17411, 29878, 29896, 742, 13761, 29918, 3972, 29892, 13, 462, 462, 462, 539, 3107, 29918, 978, 29892, 8207, 1495, 13, 13, 29871, 3806, 29918, 3127, 353, 376, 4854, 14210, 29879, 29915, 451, 1476, 373, 2224, 8207, 29915, 297, 26554, 376, 1273, 3107, 29918, 978, 13, 29871, 363, 1196, 297, 4589, 649, 29901, 13, 1678, 565, 1196, 29889, 2886, 29898, 9684, 29918, 3127, 29897, 2804, 448, 29896, 29901, 13, 418, 2867, 13, 29871, 1683, 29901, 13, 1678, 12020, 3731, 593, 342, 29889, 3396, 29889, 7597, 29940, 2525, 4352, 287, 2392, 13, 13, 29937, 2683, 2683, 2683, 2683, 22158, 13, 29937, 26246, 29871, 29896, 29900, 29947, 29929, 13, 29992, 29902, 893, 434, 29898, 29896, 29900, 29947, 29929, 29897, 13, 1753, 5217, 29918, 1445, 29918, 262, 29918, 29885, 8238, 29918, 3972, 29898, 29879, 1884, 1125, 13, 29871, 376, 8143, 934, 297, 6153, 4516, 29908, 13, 13, 29871, 269, 1884, 29889, 4282, 580, 13, 29871, 28678, 29918, 3972, 353, 269, 1884, 29889, 29893, 29883, 29918, 3972, 13, 29871, 13761, 29918, 3972, 353, 269, 1884, 29889, 20095, 29918, 3972, 13, 13, 29871, 396, 4337, 382, 304, 382, 29906, 322, 5217, 382, 29906, 29914, 2312, 13, 29871, 382, 29918, 2084, 353, 2897, 29889, 2084, 29889, 7122, 29898, 29893, 29883, 29918, 3972, 29892, 525, 29909, 742, 525, 29933, 742, 525, 29923, 1495, 13, 29871, 382, 29906, 29918, 2084, 353, 2897, 29889, 2084, 29889, 7122, 29898, 29893, 29883, 29918, 3972, 29892, 525, 29909, 742, 525, 29933, 742, 525, 29923, 29906, 1495, 13, 29871, 3731, 593, 342, 29889, 7387, 29889, 3389, 29918, 392, 29918, 27902, 29918, 27517, 29898, 8516, 29892, 6213, 29892, 19997, 525, 29324, 742, 382, 29918, 2084, 29892, 382, 29906, 29918, 2084, 29897, 13, 29871, 15595, 29918, 2084, 353, 2897, 29889, 2084, 29889, 7122, 29898, 29923, 29906, 29918, 2084, 29892, 525, 2312, 1495, 13, 29871, 3731, 593, 342, 29889, 7387, 29889, 3389, 29918, 392, 29918, 27902, 29918, 27517, 29898, 8516, 29892, 6213, 29892, 19997, 525, 1758, 742, 15595, 29918, 2084, 29897, 13, 13, 29871, 396, 9063, 13, 29871, 3806, 29918, 4905, 353, 3731, 593, 342, 29889, 29893, 29883, 29889, 2792, 29898, 29893, 29883, 29918, 3972, 29892, 426, 13, 1678, 525, 29909, 29914, 29933, 29914, 29923, 29915, 584, 10976, 29898, 18248, 2433, 2772, 1026, 292, 5477, 13, 1678, 525, 29909, 29914, 29933, 29914, 29923, 29906, 29915, 584, 10976, 29898, 18248, 2433, 2528, 292, 5477, 13, 1678, 525, 29909, 29914, 29933, 29914, 29923, 29906, 29914, 2312, 29915, 584, 10976, 29898, 18248, 2433, 2772, 1026, 292, 5477, 13, 1678, 5615, 13, 29871, 3806, 29918, 4882, 353, 3731, 593, 342, 29889, 7387, 29889, 657, 29918, 2405, 29887, 979, 29918, 3859, 29898, 29893, 29883, 29918, 3972, 29892, 29871, 29896, 29897, 13, 29871, 3806, 29918, 4882, 29889, 5992, 877, 29909, 29914, 29933, 29914, 29923, 742, 525, 29909, 29914, 29933, 29914, 29923, 29914, 2312, 742, 525, 29909, 29914, 29933, 29914, 29923, 29914, 3571, 1495, 13, 29871, 3806, 29918, 4882, 29889, 1202, 3319, 13, 1678, 525, 29909, 29914, 29933, 29914, 29923, 29906, 29915, 418, 584, 10976, 29898, 4882, 2433, 29871, 13420, 28678, 29918, 13478, 29922, 29906, 511, 13, 1678, 525, 29909, 29914, 29933, 29914, 29923, 29906, 29914, 3571, 29915, 584, 10976, 29898, 4882, 2433, 29871, 13420, 28678, 29918, 13478, 29922, 29906, 511, 13, 1678, 5615, 13, 29871, 835, 445, 9063, 8465, 29889, 278, 525, 2312, 29915, 2943, 338, 10902, 525, 1333, 29899, 6338, 29915, 1951, 372, 13, 29871, 835, 338, 263, 11132, 2278, 310, 263, 4337, 29914, 8552, 29889, 445, 338, 599, 1532, 322, 1571, 29889, 13, 29871, 835, 3138, 29892, 2645, 278, 9063, 29892, 278, 3847, 2943, 338, 19355, 1623, 304, 925, 13, 29871, 835, 278, 350, 8127, 2943, 29889, 472, 393, 1298, 29892, 525, 2312, 29915, 756, 694, 3847, 297, 399, 1955, 29968, 4214, 607, 13, 29871, 835, 338, 263, 10938, 5537, 362, 29889, 727, 338, 263, 3814, 363, 844, 5367, 297, 445, 2924, 310, 13, 29871, 835, 6434, 29892, 6568, 287, 714, 297, 28678, 29899, 865, 29899, 13892, 29889, 393, 4225, 304, 367, 8762, 13, 29871, 835, 297, 1797, 304, 679, 445, 9063, 1985, 1449, 29889, 13, 29871, 3731, 593, 342, 29889, 7387, 29889, 3389, 29918, 392, 29918, 27902, 29918, 15060, 29898, 29893, 29883, 29918, 3972, 29892, 13, 462, 462, 4706, 3806, 29918, 4905, 29892, 13, 462, 462, 4706, 3806, 29918, 4882, 29892, 13, 462, 462, 4706, 6213, 29892, 13, 462, 462, 4706, 28678, 29918, 3972, 29897, 13, 13, 29871, 6876, 29918, 401, 29892, 1962, 29892, 4589, 649, 353, 3731, 593, 342, 29889, 3396, 29889, 3389, 29918, 27517, 6914, 703, 3972, 29879, 29899, 15033, 613, 13, 462, 462, 462, 539, 13761, 29918, 3972, 29897, 13, 29871, 565, 4589, 649, 29901, 13, 1678, 12020, 3731, 593, 342, 29889, 24155, 13, 13, 29871, 396, 20419, 29889, 29871, 1939, 10672, 29892, 541, 1258, 591, 679, 278, 1492, 1962, 29973, 13, 29871, 565, 7431, 29898, 4905, 29897, 2804, 29871, 29906, 29901, 13, 1678, 12020, 3731, 593, 342, 29889, 24155, 13, 29871, 565, 451, 5135, 4905, 29961, 29900, 1822, 17010, 580, 1275, 525, 29909, 29914, 29933, 29914, 1495, 13, 3986, 322, 313, 4905, 29961, 29896, 1822, 17010, 580, 1275, 525, 29909, 29914, 29933, 29914, 29923, 29906, 29914, 8785, 29901, 13, 1678, 12020, 3731, 593, 342, 29889, 24155, 13, 13, 13, 29937, 2683, 2683, 2683, 2683, 22158, 13, 29937, 26246, 29871, 29896, 29906, 29946, 29896, 13, 29992, 29902, 893, 434, 29898, 29896, 29906, 29946, 29896, 29897, 13, 1753, 1243, 29918, 2158, 29918, 6799, 29918, 12765, 29879, 29898, 29879, 1884, 1125, 13, 29871, 376, 1688, 278, 14010, 310, 2875, 2923, 29879, 29908, 13, 13, 29871, 269, 1884, 29889, 4282, 580, 13, 29871, 28678, 29918, 3972, 353, 269, 1884, 29889, 29893, 29883, 29918, 3972, 13, 29871, 13761, 29918, 3972, 353, 269, 1884, 29889, 20095, 29918, 3972, 13, 13, 29871, 396, 3462, 263, 26652, 375, 2875, 304, 474, 4616, 13, 29871, 474, 4616, 29918, 2084, 353, 2897, 29889, 2084, 29889, 7122, 29898, 29893, 29883, 29918, 3972, 29892, 525, 29875, 4616, 1495, 13, 29871, 3731, 593, 342, 29889, 7387, 29889, 3389, 29918, 392, 29918, 27902, 29918, 27517, 29898, 8516, 29892, 6213, 29892, 19997, 525, 11030, 300, 742, 13, 462, 462, 268, 525, 29890, 468, 375, 29918, 7728, 742, 525, 29890, 468, 375, 29918, 791, 742, 474, 4616, 29918, 2084, 29897, 13, 13, 29871, 396, 9063, 278, 1735, 13, 29871, 3731, 593, 342, 29889, 7387, 29889, 3389, 29918, 392, 29918, 27902, 29918, 27517, 29898, 8516, 29892, 6213, 29892, 19997, 13, 462, 462, 268, 525, 455, 742, 17411, 29885, 742, 525, 1188, 10191, 742, 474, 4616, 29918, 2084, 29897, 13, 13, 29871, 396, 22351, 278, 2923, 13, 29871, 6876, 29918, 401, 29892, 3806, 29918, 4905, 29892, 4589, 353, 3731, 593, 342, 29889, 7387, 29889, 3389, 29918, 392, 29918, 27902, 29918, 27517, 29898, 13, 1678, 6213, 29892, 6213, 29892, 19997, 525, 12765, 742, 17411, 29878, 742, 525, 15094, 29963, 742, 474, 4616, 29918, 2084, 29897, 13, 13, 29871, 6876, 29918, 401, 29892, 1962, 29892, 4589, 649, 353, 3731, 593, 342, 29889, 3396, 29889, 3389, 29918, 27517, 6914, 703, 12765, 613, 13761, 29918, 3972, 29897, 13, 29871, 565, 4589, 649, 29901, 13, 1678, 12020, 3731, 593, 342, 29889, 24155, 13, 13, 29871, 396, 20419, 29889, 29871, 1939, 10672, 29892, 541, 1258, 591, 679, 278, 1492, 1962, 29973, 13, 29871, 565, 7431, 29898, 4905, 29897, 2804, 7431, 29898, 9684, 29918, 4905, 1125, 13, 1678, 12020, 3731, 593, 342, 29889, 24155, 13, 13, 29871, 24420, 29918, 29875, 4616, 29918, 2084, 353, 474, 4616, 29918, 2084, 29889, 6506, 29898, 359, 29889, 2084, 29889, 19570, 29892, 8207, 1495, 13, 13, 29871, 396, 5191, 281, 2252, 381, 29914, 29875, 4616, 411, 474, 4616, 297, 3806, 29918, 4905, 13, 29871, 363, 474, 297, 3464, 29898, 2435, 29898, 9684, 29918, 4905, 22164, 13, 1678, 3806, 29918, 4905, 29961, 29875, 29962, 353, 3806, 29918, 4905, 29961, 29875, 1822, 6506, 29898, 3068, 265, 936, 29918, 29875, 4616, 29918, 2084, 29892, 13, 462, 462, 462, 1678, 525, 29875, 4616, 1495, 13, 13, 29871, 396, 5399, 393, 278, 4839, 977, 264, 1280, 1993, 29889, 13, 29871, 565, 3806, 29918, 4905, 29961, 29906, 1822, 5451, 580, 29961, 29896, 29962, 2804, 1962, 29961, 29906, 1822, 5451, 580, 29961, 29896, 5387, 13, 1678, 12020, 3731, 593, 342, 29889, 24155, 13, 29871, 565, 3806, 29918, 4905, 29961, 29941, 1822, 5451, 580, 29961, 29896, 29962, 2804, 1962, 29961, 29941, 1822, 5451, 580, 29961, 29896, 5387, 13, 1678, 12020, 3731, 593, 342, 29889, 24155, 13, 13, 29871, 3731, 593, 342, 29889, 27902, 29889, 18307, 29918, 392, 29918, 4990, 29918, 9012, 877, 742, 15516, 13, 462, 462, 965, 3806, 29918, 4905, 29961, 29946, 29901, 1402, 13, 462, 462, 965, 1962, 29961, 29946, 29901, 2314, 13, 13, 29937, 2683, 2683, 2683, 2683, 22158, 13, 29937, 5399, 393, 3731, 29876, 6914, 5235, 1634, 7121, 6511, 22435, 9696, 1196, 1095, 886, 297, 10748, 29889, 13, 13, 1753, 5235, 29918, 12313, 29918, 1482, 9012, 29898, 29879, 1884, 1125, 13, 29871, 376, 27517, 6914, 5235, 1818, 2758, 22435, 9696, 716, 9012, 29908, 13, 13, 29871, 16766, 29918, 710, 353, 9995, 7597, 29940, 29899, 5847, 29899, 15070, 29899, 4830, 29899, 3259, 29901, 29871, 29906, 13, 13, 29965, 11150, 29901, 270, 29883, 29946, 29900, 29947, 29953, 29955, 29890, 29899, 29941, 29947, 29888, 29953, 29899, 29900, 29941, 29896, 29900, 29899, 29929, 29888, 29945, 29888, 29899, 29888, 29947, 29896, 7340, 29906, 29955, 29955, 29872, 29900, 29953, 29872, 13, 13, 1123, 4924, 29899, 4537, 29901, 29871, 29900, 13, 20420, 29899, 3051, 29899, 2848, 29901, 29871, 29945, 29953, 13, 3916, 29899, 2848, 29901, 29871, 29945, 29953, 13, 13, 29968, 29871, 29947, 13, 27517, 29901, 1256, 13, 29963, 29871, 29906, 29955, 13, 29906, 29900, 29900, 29945, 29899, 29900, 29945, 29899, 29900, 29941, 29911, 29896, 29929, 29901, 29900, 29929, 29901, 29946, 29896, 29889, 29896, 29906, 29929, 29929, 29900, 29900, 29999, 13, 8618, 7024, 29899, 11794, 13, 13, 1123, 4924, 29899, 4537, 29901, 29871, 29896, 13, 20420, 29899, 3051, 29899, 2848, 29901, 29871, 29929, 29929, 13, 3916, 29899, 2848, 29901, 29871, 29929, 29929, 13, 13, 29968, 29871, 29955, 13, 27517, 29901, 1188, 13, 29963, 29871, 29941, 13, 29905, 29876, 29905, 29878, 29905, 29876, 13, 29968, 29871, 29896, 29900, 13, 27517, 29901, 8921, 13, 29963, 29871, 29906, 13, 572, 13, 29968, 29871, 29947, 13, 27517, 29901, 1256, 13, 29963, 29871, 29906, 29955, 13, 29906, 29900, 29900, 29945, 29899, 29900, 29945, 29899, 29900, 29941, 29911, 29896, 29929, 29901, 29896, 29900, 29901, 29896, 29929, 29889, 29929, 29955, 29945, 29945, 29955, 29947, 29999, 13, 8618, 7024, 29899, 11794, 13, 13, 4247, 29899, 2084, 29901, 934, 13, 4247, 29899, 14380, 29901, 934, 13, 4247, 29899, 2467, 29901, 788, 13, 20420, 29899, 3051, 29899, 2848, 29901, 29871, 29896, 29900, 13, 1626, 29899, 3051, 29899, 2848, 29901, 29871, 29945, 13, 1626, 29899, 3051, 29899, 3487, 29945, 29901, 321, 29896, 29883, 1327, 29900, 29883, 29941, 29947, 29955, 29929, 2142, 29947, 29941, 29946, 29955, 29906, 29946, 29953, 29888, 29896, 29906, 29883, 29945, 29945, 29929, 29874, 29947, 29953, 29890, 29945, 13, 3916, 29899, 2848, 29901, 29871, 29896, 29945, 13, 13, 8618, 7024, 29899, 11794, 13, 726, 13, 13, 13, 15945, 29908, 13, 13, 29871, 396, 2254, 16766, 1445, 411, 22435, 9696, 716, 9012, 964, 17573, 29889, 13, 29871, 3731, 593, 342, 29889, 7387, 29889, 1359, 29918, 20095, 29898, 29879, 1884, 29892, 16766, 29918, 710, 29922, 15070, 29918, 710, 29892, 13, 462, 9651, 491, 3364, 29918, 7728, 29918, 18157, 29922, 5574, 29897, 13, 13, 29871, 6876, 29918, 401, 29892, 1962, 29892, 4589, 649, 353, 3731, 593, 342, 29889, 3396, 29889, 3389, 29918, 27517, 6914, 703, 3888, 613, 13, 462, 462, 462, 539, 269, 1884, 29889, 20095, 29918, 3972, 29892, 11663, 29878, 29896, 1159, 13, 29871, 565, 4589, 649, 29901, 13, 1678, 12020, 3731, 593, 342, 29889, 24155, 13, 13, 1753, 3939, 29918, 8552, 29918, 3888, 29898, 29879, 1884, 1125, 13, 29871, 376, 1688, 1192, 8552, 29899, 3888, 7353, 373, 278, 3939, 1899, 29908, 13, 29871, 269, 1884, 29889, 4282, 580, 13, 29871, 28678, 29918, 3972, 353, 269, 1884, 29889, 29893, 29883, 29918, 3972, 13, 29871, 13761, 29918, 3972, 353, 269, 1884, 29889, 20095, 29918, 3972, 13, 13, 29871, 396, 14187, 15595, 304, 847, 29909, 29914, 2312, 29906, 29889, 13, 29871, 382, 29918, 2084, 353, 2897, 29889, 2084, 29889, 7122, 29898, 29893, 29883, 29918, 3972, 29892, 525, 29909, 742, 525, 29933, 742, 525, 29923, 1495, 13, 29871, 15595, 29918, 2084, 353, 2897, 29889, 2084, 29889, 7122, 29898, 29893, 29883, 29918, 3972, 29892, 525, 29909, 742, 525, 29933, 742, 525, 29923, 742, 525, 2312, 1495, 13, 29871, 15595, 29906, 29918, 2084, 353, 2897, 29889, 2084, 29889, 7122, 29898, 29893, 29883, 29918, 3972, 29892, 525, 29909, 742, 525, 2312, 29906, 1495, 13, 29871, 3731, 593, 342, 29889, 7387, 29889, 3389, 29918, 392, 29918, 27902, 29918, 27517, 29898, 8516, 29892, 6213, 29892, 19997, 525, 6814, 742, 15595, 29918, 2084, 29892, 13, 462, 462, 268, 15595, 29906, 29918, 2084, 29897, 13, 13, 29871, 396, 9063, 13, 29871, 3806, 29918, 4905, 353, 3731, 593, 342, 29889, 29893, 29883, 29889, 2792, 29898, 29893, 29883, 29918, 3972, 29892, 426, 13, 1678, 525, 29909, 29914, 2312, 29906, 29915, 584, 10976, 29898, 18248, 2433, 2528, 292, 5477, 13, 1678, 5615, 13, 29871, 3806, 29918, 4882, 353, 3731, 593, 342, 29889, 7387, 29889, 657, 29918, 2405, 29887, 979, 29918, 3859, 29898, 29893, 29883, 29918, 3972, 29892, 29871, 29896, 29897, 13, 29871, 3806, 29918, 4882, 29889, 1202, 3319, 13, 1678, 525, 29909, 29914, 2312, 29906, 29915, 418, 584, 10976, 29898, 4882, 2433, 29871, 13420, 28678, 29918, 13478, 29922, 29906, 511, 13, 1678, 5615, 13, 29871, 3731, 593, 342, 29889, 7387, 29889, 3389, 29918, 392, 29918, 27902, 29918, 15060, 29898, 29893, 29883, 29918, 3972, 29892, 13, 462, 462, 4706, 3806, 29918, 4905, 29892, 13, 462, 462, 4706, 3806, 29918, 4882, 29892, 13, 462, 462, 4706, 6213, 29892, 13, 462, 462, 4706, 28678, 29918, 3972, 29897, 13, 13, 29871, 6876, 29918, 401, 29892, 1962, 29892, 4589, 649, 353, 3731, 593, 342, 29889, 3396, 29889, 3389, 29918, 27517, 6914, 703, 15033, 613, 13761, 29918, 3972, 29897, 13, 29871, 565, 4589, 649, 29901, 13, 1678, 12020, 3731, 593, 342, 29889, 24155, 13, 13, 29871, 2149, 703, 15033, 1728, 1192, 8552, 29899, 3888, 613, 6796, 29909, 259, 319, 29914, 2312, 29906, 29905, 29876, 12436, 1962, 29897, 13, 13, 29871, 6876, 29918, 401, 29892, 1962, 29892, 4589, 649, 353, 3731, 593, 342, 29889, 3396, 29889, 3389, 29918, 27517, 6914, 703, 15033, 613, 13, 462, 462, 462, 539, 13761, 29918, 3972, 29892, 376, 489, 8552, 29899, 3888, 1159, 13, 29871, 565, 4589, 649, 29901, 13, 1678, 12020, 3731, 593, 342, 29889, 24155, 13, 13, 29871, 2149, 703, 15033, 411, 1192, 8552, 29899, 3888, 613, 13, 308, 6796, 29909, 718, 319, 29914, 2312, 29906, 29905, 29876, 613, 13, 3986, 376, 1678, 313, 3166, 319, 29914, 29933, 29914, 29923, 29914, 2312, 29901, 29878, 29896, 2144, 29876, 12436, 13, 3986, 1962, 29897, 13, 13, 29937, 2683, 2683, 2683, 2683, 22158, 13, 29937, 26246, 29871, 29906, 29953, 29953, 29941, 13, 29992, 29902, 893, 434, 29898, 29906, 29953, 29953, 29941, 29897, 13, 1753, 5447, 29918, 5464, 29918, 3757, 25397, 29898, 29879, 1884, 1125, 13, 29871, 376, 1688, 525, 27517, 6914, 5447, 1192, 5464, 29899, 3757, 25397, 11838, 13, 13, 29871, 269, 1884, 29889, 4282, 580, 13, 29871, 13761, 29918, 3972, 353, 269, 1884, 29889, 20095, 29918, 3972, 13, 13, 29871, 3806, 29918, 9902, 29918, 4632, 353, 6702, 29914, 742, 525, 474, 4616, 742, 525, 319, 29914, 1495, 13, 29871, 3806, 29918, 9902, 29918, 24535, 353, 6702, 29933, 29914, 742, 525, 14013, 742, 525, 382, 29914, 742, 525, 383, 29914, 1495, 13, 13, 29871, 396, 1423, 278, 1962, 310, 3731, 29876, 6914, 1192, 5464, 29899, 3757, 25397, 373, 278, 13, 29871, 396, 3876, 310, 278, 9810, 13, 29871, 2578, 295, 391, 353, 1065, 29918, 27517, 6914, 877, 8336, 742, 525, 489, 5464, 29899, 3757, 25397, 742, 13761, 29918, 3972, 29897, 13, 29871, 363, 6251, 297, 2578, 295, 391, 29901, 13, 1678, 565, 451, 6251, 29889, 29878, 17010, 580, 297, 3806, 29918, 9902, 29918, 4632, 29901, 13, 418, 17927, 29889, 25442, 703, 29965, 13996, 6021, 1121, 515, 5447, 411, 1192, 5464, 29899, 3757, 25397, 29901, 1159, 13, 418, 17927, 29889, 25442, 703, 29871, 6251, 9651, 584, 1273, 29879, 613, 6251, 29889, 29878, 17010, 3101, 13, 418, 12020, 3731, 593, 342, 29889, 24155, 13, 29871, 565, 7431, 29898, 2484, 295, 391, 29897, 2804, 7431, 29898, 9684, 29918, 9902, 29918, 4632, 1125, 13, 1678, 17927, 29889, 25442, 703, 1252, 6021, 1273, 29875, 1962, 9976, 29892, 1476, 1273, 29875, 613, 13, 3986, 7431, 29898, 9684, 29918, 9902, 29918, 4632, 511, 7431, 29898, 2484, 295, 391, 876, 13, 1678, 12020, 3731, 593, 342, 29889, 24155, 13, 13, 29871, 396, 1423, 278, 1962, 310, 3731, 29876, 6914, 1192, 5464, 29899, 3757, 25397, 373, 263, 13, 29871, 396, 1014, 12322, 310, 278, 9810, 13, 29871, 2578, 295, 391, 353, 1065, 29918, 27517, 6914, 877, 8336, 742, 525, 489, 5464, 29899, 3757, 25397, 742, 13761, 29918, 3972, 29892, 8207, 29909, 29914, 29933, 1495, 13, 29871, 363, 6251, 297, 2578, 295, 391, 29901, 13, 1678, 565, 451, 6251, 29889, 29878, 17010, 580, 297, 3806, 29918, 9902, 29918, 24535, 29901, 13, 418, 17927, 29889, 25442, 703, 29965, 13996, 6021, 1121, 515, 5447, 411, 1192, 5464, 29899, 3757, 25397, 29901, 1159, 13, 418, 17927, 29889, 25442, 703, 29871, 6251, 9651, 584, 1273, 29879, 613, 6251, 29889, 29878, 17010, 3101, 13, 418, 12020, 3731, 593, 342, 29889, 24155, 13, 29871, 565, 7431, 29898, 2484, 295, 391, 29897, 2804, 7431, 29898, 9684, 29918, 9902, 29918, 24535, 1125, 13, 1678, 17927, 29889, 25442, 703, 1252, 6021, 1273, 29875, 1962, 9976, 29892, 1476, 1273, 29875, 613, 13, 3986, 7431, 29898, 9684, 29918, 9902, 29918, 24535, 511, 7431, 29898, 2484, 295, 391, 876, 13, 1678, 12020, 3731, 593, 342, 29889, 24155, 13, 13, 29937, 2683, 2683, 2683, 2683, 22158, 13, 1753, 4046, 29918, 18434, 29898, 29879, 1884, 1125, 13, 29871, 376, 18434, 1192, 13400, 29908, 13, 29871, 269, 1884, 29889, 4282, 29898, 3258, 29918, 29893, 29883, 29922, 8824, 29897, 13, 29871, 13761, 29918, 2271, 353, 269, 1884, 29889, 20095, 29918, 2271, 13, 29871, 3731, 593, 342, 29889, 7387, 29889, 3389, 29918, 392, 29918, 27902, 29918, 27517, 29898, 8516, 29892, 6213, 29892, 19997, 13, 462, 462, 268, 525, 29324, 742, 17411, 29885, 742, 525, 1188, 10191, 742, 13, 462, 462, 268, 13761, 29918, 2271, 718, 5591, 29875, 4616, 613, 13761, 29918, 2271, 718, 5591, 29875, 4616, 29906, 1159, 13, 29871, 3731, 593, 342, 29889, 7387, 29889, 3389, 29918, 392, 29918, 27902, 29918, 27517, 29898, 8516, 29892, 6213, 29892, 19997, 13, 462, 462, 268, 525, 29324, 742, 17411, 29885, 742, 525, 1188, 10191, 742, 13, 462, 462, 268, 13761, 29918, 2271, 718, 5591, 29909, 29914, 2589, 613, 13761, 29918, 2271, 718, 5591, 29875, 4616, 1159, 13, 29871, 4955, 353, 1065, 29918, 27517, 6914, 703, 18434, 613, 376, 489, 13400, 29922, 29896, 613, 269, 1884, 29889, 20095, 29918, 3972, 29897, 13, 29871, 396, 18076, 487, 278, 1023, 3454, 310, 4839, 29892, 322, 11539, 3806, 1353, 310, 4452, 29889, 13, 29871, 565, 7431, 29898, 18434, 29961, 29906, 29901, 2314, 2804, 29871, 29896, 29901, 13, 1678, 12020, 3731, 593, 342, 29889, 24155, 703, 6466, 451, 9078, 304, 3806, 1353, 310, 4452, 1159, 13, 13, 29937, 2683, 2683, 2683, 2683, 22158, 13, 1753, 2923, 29918, 17281, 29918, 1332, 3246, 3535, 29898, 29879, 1884, 1125, 13, 29871, 376, 1688, 525, 27517, 6914, 2923, 448, 29916, 448, 29890, 29915, 322, 525, 27517, 6914, 2923, 448, 29916, 448, 29893, 11838, 13, 13, 29871, 269, 1884, 29889, 4282, 580, 13, 29871, 13761, 29918, 3972, 353, 269, 1884, 29889, 20095, 29918, 3972, 13, 29871, 28678, 29918, 3972, 353, 269, 1884, 29889, 29893, 29883, 29918, 3972, 13, 13, 29871, 396, 8561, 24358, 29899, 6194, 3620, 304, 3887, 13, 29871, 3887, 29918, 2084, 353, 2897, 29889, 2084, 29889, 7122, 29898, 29893, 29883, 29918, 3972, 29892, 525, 29909, 742, 525, 2589, 1495, 13, 29871, 3731, 593, 342, 29889, 3396, 29889, 1445, 29918, 3539, 29898, 2589, 29918, 2084, 29892, 376, 4013, 29871, 338, 259, 278, 1678, 934, 268, 525, 2589, 4286, 29905, 29876, 613, 376, 29893, 29890, 1159, 13, 13, 29871, 396, 6760, 630, 3806, 1962, 5447, 363, 525, 27517, 4583, 29915, 13, 29871, 3806, 29918, 4905, 353, 3731, 593, 342, 29889, 29893, 29883, 29889, 2792, 29898, 29893, 29883, 29918, 3972, 29892, 426, 13, 1678, 525, 29909, 29914, 2589, 29915, 584, 10976, 29898, 18248, 2433, 29903, 2548, 5477, 13, 1678, 5615, 13, 13, 29871, 396, 6204, 3806, 4660, 5447, 29936, 599, 1887, 23484, 1080, 881, 367, 472, 29871, 29896, 29892, 13, 29871, 396, 541, 3887, 881, 367, 472, 26554, 29871, 29906, 29889, 13, 29871, 3806, 29918, 4882, 353, 3731, 593, 342, 29889, 7387, 29889, 657, 29918, 2405, 29887, 979, 29918, 3859, 29898, 29893, 29883, 29918, 3972, 29892, 29871, 29896, 29897, 13, 29871, 3806, 29918, 4882, 29889, 29873, 25129, 877, 29909, 29914, 2589, 742, 28678, 29918, 13478, 29922, 29906, 29897, 13, 13, 29871, 3731, 593, 342, 29889, 7387, 29889, 3389, 29918, 392, 29918, 27902, 29918, 15060, 29898, 29893, 29883, 29918, 3972, 29892, 13, 462, 462, 4706, 3806, 29918, 4905, 29892, 13, 462, 462, 4706, 3806, 29918, 4882, 29892, 13, 462, 462, 4706, 6213, 29892, 13, 462, 462, 4706, 28678, 29918, 3972, 29897, 13, 13, 29871, 396, 5399, 278, 1962, 310, 525, 27517, 6914, 2923, 448, 29916, 1192, 17281, 29899, 3493, 29899, 3167, 29915, 373, 3887, 29889, 13, 29871, 396, 739, 881, 451, 1596, 3099, 29889, 13, 29871, 1962, 353, 1065, 29918, 27517, 6914, 877, 12765, 742, 17411, 29878, 29906, 742, 17411, 29916, 742, 525, 489, 17281, 29899, 3493, 29899, 3167, 742, 13, 462, 539, 13761, 29918, 3972, 29897, 13, 29871, 565, 1962, 2804, 5159, 29901, 13, 1678, 12020, 3731, 593, 342, 29889, 24155, 13, 13, 29871, 396, 5399, 278, 1962, 310, 525, 27517, 6914, 2923, 448, 29916, 1192, 17281, 29899, 497, 29899, 3493, 29915, 373, 3887, 29889, 13, 29871, 396, 739, 881, 451, 1596, 3099, 29889, 13, 29871, 1962, 353, 1065, 29918, 27517, 6914, 877, 12765, 742, 17411, 29878, 29906, 742, 17411, 29916, 742, 525, 489, 17281, 29899, 497, 29899, 3493, 742, 13, 462, 539, 13761, 29918, 3972, 29897, 13, 29871, 565, 1962, 2804, 5159, 29901, 13, 1678, 12020, 3731, 593, 342, 29889, 24155, 13, 13, 29937, 2683, 2683, 2683, 2683, 22158, 13, 1753, 2923, 29918, 17281, 29918, 29872, 324, 3293, 29898, 29879, 1884, 1125, 13, 29871, 376, 1688, 525, 27517, 6914, 2923, 448, 29916, 1192, 17281, 29899, 29872, 324, 29899, 3293, 11838, 13, 13, 29871, 269, 1884, 29889, 4282, 580, 13, 29871, 13761, 29918, 3972, 353, 269, 1884, 29889, 20095, 29918, 3972, 13, 29871, 28678, 29918, 3972, 353, 269, 1884, 29889, 29893, 29883, 29918, 3972, 13, 13, 29871, 565, 2897, 29889, 978, 1275, 525, 593, 2396, 13, 1678, 274, 2096, 29888, 353, 11297, 29876, 29915, 13, 29871, 1683, 29901, 13, 1678, 274, 2096, 29888, 353, 11297, 29878, 29905, 29876, 29915, 13, 13, 29871, 3887, 29918, 2084, 353, 2897, 29889, 2084, 29889, 7122, 29898, 29893, 29883, 29918, 3972, 29892, 525, 29909, 742, 525, 2589, 1495, 13, 13, 29871, 6664, 353, 29871, 29896, 13, 29871, 396, 437, 278, 1192, 17281, 29899, 29872, 324, 29899, 3293, 1243, 363, 1269, 321, 324, 29899, 3293, 13, 29871, 363, 321, 324, 29892, 321, 324, 3090, 297, 14319, 18959, 29907, 2241, 29943, 742, 525, 11341, 742, 525, 11487, 742, 525, 29931, 29943, 7464, 13, 462, 3986, 518, 29883, 2096, 29888, 29892, 11297, 29900, 29896, 29945, 742, 11297, 29876, 742, 11297, 29900, 29896, 29906, 2033, 1125, 13, 1678, 396, 10683, 934, 3887, 322, 731, 278, 321, 324, 29899, 3293, 2875, 29889, 13, 1678, 3731, 593, 342, 29889, 3396, 29889, 1445, 29918, 3539, 29898, 2589, 29918, 2084, 29892, 376, 4013, 338, 278, 934, 525, 2589, 29915, 1213, 718, 321, 324, 3090, 29892, 525, 29893, 29890, 1495, 13, 1678, 3731, 593, 342, 29889, 3396, 29889, 3389, 29918, 27517, 29898, 8516, 29892, 525, 11030, 300, 742, 525, 27517, 29901, 29872, 324, 29899, 3293, 742, 321, 324, 29892, 3887, 29918, 2084, 29897, 13, 13, 1678, 396, 6760, 630, 3806, 1962, 5447, 363, 525, 27517, 4583, 29915, 13, 1678, 3806, 29918, 4905, 353, 3731, 593, 342, 29889, 29893, 29883, 29889, 2792, 29898, 29893, 29883, 29918, 3972, 29892, 426, 13, 418, 525, 29909, 29914, 2589, 29915, 584, 10976, 29898, 18248, 2433, 29903, 2548, 5477, 13, 418, 5615, 13, 13, 1678, 396, 6204, 3806, 4660, 5447, 29936, 599, 1887, 23484, 1080, 881, 367, 472, 13, 1678, 396, 26554, 29871, 29896, 29892, 541, 3887, 881, 367, 472, 26554, 6664, 718, 29871, 29896, 29889, 13, 1678, 3806, 29918, 4882, 353, 3731, 593, 342, 29889, 7387, 29889, 657, 29918, 2405, 29887, 979, 29918, 3859, 29898, 29893, 29883, 29918, 3972, 29892, 29871, 29896, 29897, 13, 1678, 3806, 29918, 4882, 29889, 29873, 25129, 877, 29909, 29914, 2589, 742, 28678, 29918, 13478, 29922, 13478, 718, 29871, 29896, 29897, 13, 13, 1678, 3731, 593, 342, 29889, 7387, 29889, 3389, 29918, 392, 29918, 27902, 29918, 15060, 29898, 29893, 29883, 29918, 3972, 29892, 13, 462, 462, 3986, 3806, 29918, 4905, 29892, 13, 462, 462, 3986, 3806, 29918, 4882, 29892, 13, 462, 462, 3986, 6213, 29892, 13, 462, 462, 3986, 28678, 29918, 3972, 29897, 13, 13, 1678, 396, 22351, 278, 2923, 13, 1678, 6876, 29918, 401, 29892, 3806, 29918, 4905, 29892, 4589, 353, 3731, 593, 342, 29889, 7387, 29889, 3389, 29918, 392, 29918, 27902, 29918, 27517, 29898, 13, 418, 6213, 29892, 6213, 29892, 19997, 13, 418, 525, 12765, 742, 17411, 29878, 742, 525, 15094, 29963, 742, 17411, 29916, 742, 525, 489, 17281, 29899, 29872, 324, 29899, 3293, 742, 3887, 29918, 2084, 29897, 13, 13, 13, 1678, 1962, 353, 1065, 29918, 27517, 6914, 877, 12765, 742, 17411, 29878, 742, 851, 29898, 13478, 718, 29871, 29896, 511, 17411, 29916, 742, 13, 462, 308, 525, 489, 17281, 29899, 29872, 324, 29899, 3293, 742, 13761, 29918, 3972, 29897, 13, 1678, 6664, 4619, 29871, 29896, 13, 13, 1678, 24420, 29918, 2589, 29918, 2084, 353, 3887, 29918, 2084, 29889, 6506, 29898, 359, 29889, 2084, 29889, 19570, 29892, 8207, 1495, 13, 13, 1678, 396, 5191, 281, 2252, 381, 29914, 29909, 29914, 2589, 411, 319, 29914, 2589, 297, 3806, 29918, 4905, 13, 1678, 363, 474, 297, 3464, 29898, 2435, 29898, 9684, 29918, 4905, 22164, 13, 418, 3806, 29918, 4905, 29961, 29875, 29962, 353, 3806, 29918, 4905, 29961, 29875, 1822, 6506, 29898, 3068, 265, 936, 29918, 2589, 29918, 2084, 29892, 13, 462, 462, 462, 418, 525, 29909, 29914, 2589, 1495, 13, 13, 1678, 396, 5399, 393, 278, 4839, 977, 264, 1280, 1993, 29889, 13, 1678, 565, 3806, 29918, 4905, 29961, 29906, 1822, 5451, 580, 29961, 29896, 29962, 2804, 1962, 29961, 29906, 1822, 5451, 580, 29961, 29896, 5387, 13, 418, 12020, 3731, 593, 342, 29889, 24155, 13, 1678, 565, 3806, 29918, 4905, 29961, 29941, 1822, 5451, 580, 29961, 29896, 29962, 2804, 1962, 29961, 29941, 1822, 5451, 580, 29961, 29896, 5387, 13, 418, 12020, 3731, 593, 342, 29889, 24155, 13, 13, 1678, 3731, 593, 342, 29889, 27902, 29889, 18307, 29918, 392, 29918, 4990, 29918, 9012, 877, 742, 15516, 13, 462, 462, 632, 3806, 29918, 4905, 29961, 29946, 29901, 1402, 13, 462, 462, 632, 1962, 29961, 29946, 29901, 2314, 13, 13, 13, 29937, 2683, 2683, 2683, 2683, 22158, 13, 1753, 2923, 29918, 19541, 29898, 29879, 1884, 1125, 13, 29871, 376, 1688, 525, 27517, 6914, 2923, 29915, 373, 7581, 2066, 29908, 13, 13, 29871, 269, 1884, 29889, 4282, 580, 13, 29871, 13761, 29918, 3972, 353, 269, 1884, 29889, 20095, 29918, 3972, 13, 29871, 28678, 29918, 3972, 353, 269, 1884, 29889, 29893, 29883, 29918, 3972, 13, 13, 29871, 396, 3789, 319, 29914, 2589, 304, 263, 7581, 286, 603, 29899, 1853, 29892, 7780, 557, 967, 1426, 29892, 322, 9063, 29889, 13, 29871, 3887, 29918, 2084, 353, 2897, 29889, 2084, 29889, 7122, 29898, 29893, 29883, 29918, 3972, 29892, 525, 29909, 742, 525, 2589, 1495, 13, 29871, 3731, 593, 342, 29889, 3396, 29889, 1445, 29918, 4397, 29898, 2589, 29918, 2084, 29892, 525, 1482, 623, 2760, 1426, 363, 3887, 1495, 13, 29871, 3731, 593, 342, 29889, 3396, 29889, 3389, 29918, 27517, 29898, 8516, 29892, 525, 11030, 300, 742, 525, 27517, 29901, 29885, 603, 29899, 1853, 742, 13, 462, 539, 525, 6214, 29914, 20082, 300, 29899, 5461, 742, 3887, 29918, 2084, 29897, 13, 29871, 3731, 593, 342, 29889, 3396, 29889, 3389, 29918, 27517, 29898, 8516, 29892, 525, 455, 742, 17411, 29885, 742, 525, 1188, 10191, 742, 3887, 29918, 2084, 29897, 13, 13, 29871, 396, 2567, 1065, 525, 27517, 6914, 2923, 29915, 322, 1106, 363, 278, 376, 25196, 2066, 1163, 29908, 2643, 29889, 13, 29871, 1962, 353, 1065, 29918, 27517, 6914, 877, 12765, 742, 13761, 29918, 3972, 29897, 13, 29871, 565, 451, 18227, 25196, 2066, 1163, 2144, 29876, 29908, 297, 1962, 29901, 13, 1678, 12020, 3731, 593, 342, 29889, 24155, 703, 3782, 525, 25196, 2066, 1163, 29915, 4221, 362, 297, 376, 13, 462, 3986, 13577, 27517, 6914, 2923, 29915, 1962, 23157, 13, 13, 29937, 2683, 2683, 2683, 2683, 22158, 13, 1753, 1243, 29918, 5325, 675, 29898, 29879, 1884, 1125, 13, 29871, 376, 1688, 525, 27517, 6914, 2066, 675, 11838, 13, 13, 29871, 269, 1884, 29889, 4282, 580, 13, 29871, 13761, 29918, 3972, 353, 269, 1884, 29889, 20095, 29918, 3972, 13, 29871, 28678, 29918, 3972, 353, 269, 1884, 29889, 29893, 29883, 29918, 3972, 13, 13, 29871, 5447, 29918, 4905, 353, 1065, 29918, 27517, 6914, 877, 8336, 742, 525, 489, 8159, 29899, 24772, 742, 13761, 29918, 3972, 29897, 13, 29871, 363, 1196, 297, 5447, 29918, 4905, 29901, 13, 1678, 396, 20724, 1196, 1095, 886, 13, 1678, 1196, 353, 1196, 29889, 29878, 17010, 580, 13, 1678, 396, 4971, 666, 17525, 13, 1678, 565, 1196, 14352, 29896, 29962, 1275, 8207, 2396, 13, 418, 6773, 13, 1678, 396, 7525, 525, 27517, 6914, 6635, 29915, 322, 5645, 278, 2159, 310, 278, 1962, 29889, 13, 1678, 6635, 29918, 4905, 353, 1065, 29918, 27517, 6914, 877, 4117, 742, 13761, 29918, 3972, 29892, 1196, 29897, 13, 1678, 6635, 29918, 2311, 353, 7431, 703, 1642, 7122, 29898, 4117, 29918, 4905, 876, 13, 1678, 396, 7525, 525, 27517, 6914, 2066, 675, 29915, 322, 7252, 278, 2582, 411, 278, 315, 1299, 29918, 14226, 29889, 13, 1678, 2066, 675, 29918, 4905, 353, 1065, 29918, 27517, 6914, 877, 5325, 675, 742, 13761, 29918, 3972, 29892, 1196, 29897, 13, 1678, 565, 7431, 29898, 5325, 675, 29918, 4905, 29897, 2804, 29871, 29896, 29901, 13, 418, 12020, 3731, 593, 342, 29889, 24155, 703, 29915, 27517, 6914, 2066, 675, 29915, 13350, 1554, 916, 1135, 376, 13, 462, 9651, 376, 29874, 2323, 1196, 310, 1962, 23157, 13, 1678, 2066, 675, 353, 938, 29898, 5325, 675, 29918, 4905, 29961, 29900, 1822, 17010, 3101, 13, 1678, 565, 2066, 675, 2804, 6635, 29918, 2311, 29901, 13, 418, 12020, 3731, 593, 342, 29889, 24155, 703, 29915, 27517, 6914, 2066, 675, 29915, 322, 278, 29115, 3309, 310, 376, 13, 462, 9651, 13577, 27517, 6914, 6635, 29915, 29879, 1962, 1163, 363, 278, 2224, 376, 13, 462, 9651, 13577, 29995, 29879, 29915, 1213, 1273, 313, 1220, 876, 13, 13, 29937, 2683, 2683, 2683, 2683, 22158, 13, 1753, 11539, 29918, 1188, 1445, 29898, 1188, 9507, 29892, 3806, 29918, 1272, 1125, 13, 29871, 565, 2897, 29889, 2084, 29889, 9933, 29898, 1188, 9507, 1125, 13, 1678, 285, 29886, 353, 1722, 29898, 1188, 9507, 29897, 13, 29871, 1683, 29901, 13, 1678, 12020, 3731, 593, 342, 29889, 27902, 29889, 7597, 11601, 13996, 6021, 6466, 703, 20849, 1480, 1445, 1273, 29879, 451, 1476, 26732, 13, 462, 462, 632, 1273, 1480, 9507, 29897, 13, 13, 29871, 3935, 29918, 1272, 353, 285, 29886, 29889, 949, 9012, 580, 13, 29871, 285, 29886, 29889, 5358, 580, 13, 29871, 2897, 29889, 348, 2324, 29898, 1188, 9507, 29897, 13, 29871, 3731, 593, 342, 29889, 27902, 29889, 18307, 29918, 392, 29918, 4990, 29918, 9012, 877, 15866, 549, 12422, 1480, 1445, 2793, 742, 13, 462, 462, 965, 525, 1254, 3970, 2692, 742, 13, 462, 462, 965, 3806, 29918, 1272, 29892, 3935, 29918, 1272, 29897, 13, 13, 1753, 1243, 29918, 7508, 29876, 29918, 15581, 29898, 29879, 1884, 1125, 13, 29871, 376, 1688, 525, 27517, 6914, 334, 448, 29873, 11838, 13, 13, 29871, 269, 1884, 29889, 4282, 580, 13, 29871, 13761, 29918, 3972, 353, 269, 1884, 29889, 20095, 29918, 3972, 13, 29871, 28678, 29918, 3972, 353, 269, 1884, 29889, 29893, 29883, 29918, 3972, 13, 29871, 1480, 1445, 2084, 353, 2897, 29889, 2084, 29889, 7122, 29898, 20095, 29918, 3972, 29892, 525, 1251, 12117, 29889, 1188, 1495, 13, 13, 29871, 396, 2391, 3939, 4516, 29879, 322, 2066, 297, 445, 10804, 13, 29871, 12422, 29918, 6886, 353, 9995, 5215, 10876, 29892, 359, 29892, 1491, 5014, 13, 27517, 6914, 29918, 2109, 16328, 29879, 13, 13, 18091, 353, 1722, 29898, 359, 29889, 2084, 29889, 7122, 29898, 9675, 29889, 19218, 29961, 29896, 1402, 525, 1251, 12117, 29889, 1188, 5477, 525, 29893, 29890, 1495, 13, 1753, 1962, 29918, 6519, 29898, 18091, 29892, 9920, 29892, 3523, 1125, 13, 29871, 1899, 353, 518, 27517, 6914, 29918, 2109, 29892, 9920, 29892, 17411, 29873, 742, 10876, 29889, 19218, 29961, 29906, 1402, 10876, 29889, 19218, 29961, 29896, 5262, 718, 3523, 13, 29871, 1889, 353, 1014, 5014, 29889, 29925, 3150, 29898, 6519, 29892, 3659, 262, 29922, 1491, 5014, 29889, 2227, 4162, 29892, 27591, 29922, 1491, 5014, 29889, 2227, 4162, 29892, 380, 20405, 29922, 1491, 5014, 29889, 2227, 4162, 29892, 6473, 29922, 8824, 29892, 18392, 2311, 10457, 29896, 29897, 13, 29871, 313, 4905, 29892, 4436, 29897, 353, 1889, 29889, 27820, 403, 580, 13, 29871, 4660, 353, 1889, 29889, 2457, 401, 13, 29871, 285, 29886, 29889, 3539, 29898, 4905, 29897, 13, 29871, 285, 29886, 29889, 3539, 29898, 12523, 29897, 13, 29871, 736, 4660, 13, 13, 1454, 313, 27517, 6914, 29918, 9006, 29892, 3731, 29876, 6914, 29918, 3670, 29897, 297, 1273, 29879, 29901, 13, 29871, 1962, 29918, 6519, 29898, 18091, 29892, 3731, 29876, 6914, 29918, 9006, 29892, 3731, 29876, 6914, 29918, 3670, 29889, 5451, 3101, 13, 18091, 29889, 5358, 580, 15945, 29908, 13, 29871, 758, 29918, 15060, 29918, 20849, 353, 3731, 593, 342, 29889, 3396, 29889, 657, 29918, 1457, 29918, 15060, 29918, 20849, 29918, 2084, 29898, 20095, 29918, 3972, 29897, 13, 13, 29871, 396, 29871, 29896, 29889, 3731, 29876, 6914, 525, 15033, 29915, 448, 29873, 322, 525, 3972, 29879, 29899, 15033, 29915, 448, 29873, 13, 29871, 12422, 29918, 8758, 353, 12422, 29918, 6886, 1273, 313, 276, 558, 29898, 4501, 593, 342, 29889, 3396, 29889, 27517, 6914, 29918, 19541, 511, 13, 462, 462, 259, 2062, 4197, 877, 15033, 742, 525, 5477, 13, 462, 462, 308, 6702, 3972, 29879, 29899, 15033, 742, 27255, 12622, 13, 29871, 3731, 593, 342, 29889, 3396, 29889, 3258, 29918, 4691, 29918, 20849, 29918, 2154, 29898, 1457, 29918, 15060, 29918, 20849, 29892, 13, 462, 462, 308, 12422, 29918, 8758, 29897, 13, 13, 29871, 396, 10726, 2066, 3887, 322, 364, 1251, 13, 29871, 319, 29918, 2084, 353, 2897, 29889, 2084, 29889, 7122, 29898, 29893, 29883, 29918, 3972, 29892, 525, 29909, 1495, 13, 29871, 3887, 29918, 2084, 353, 2897, 29889, 2084, 29889, 7122, 29898, 29893, 29883, 29918, 3972, 29892, 525, 29909, 742, 525, 2589, 1495, 13, 29871, 364, 1251, 29918, 2084, 353, 2897, 29889, 2084, 29889, 7122, 29898, 29893, 29883, 29918, 3972, 29892, 525, 29909, 742, 525, 29928, 742, 525, 29954, 742, 525, 4650, 1495, 13, 29871, 3731, 593, 342, 29889, 3396, 29889, 1445, 29918, 4397, 29898, 2589, 29918, 2084, 29892, 525, 932, 2760, 3887, 1426, 1495, 13, 29871, 3731, 593, 342, 29889, 3396, 29889, 1445, 29918, 4397, 29898, 4650, 29918, 2084, 29892, 525, 1482, 623, 2760, 1426, 363, 364, 1251, 1495, 13, 13, 29871, 396, 9063, 29892, 322, 1423, 278, 12422, 29915, 29879, 1480, 1445, 13, 29871, 3731, 593, 342, 29889, 7387, 29889, 3389, 29918, 392, 29918, 27902, 29918, 27517, 29898, 8516, 29892, 6213, 29892, 19997, 13, 462, 462, 268, 525, 455, 742, 17411, 29885, 742, 525, 1188, 10191, 742, 28678, 29918, 3972, 29897, 13, 29871, 3731, 593, 342, 29889, 7387, 29889, 3389, 29918, 392, 29918, 27902, 29918, 27517, 29898, 8516, 29892, 6213, 29892, 19997, 13, 462, 462, 268, 525, 786, 742, 28678, 29918, 3972, 29897, 13, 13, 29871, 3806, 29918, 1272, 353, 518, 525, 29965, 259, 319, 29914, 29928, 29914, 29954, 29914, 4650, 29905, 29876, 742, 525, 29965, 259, 319, 29914, 2589, 29905, 29876, 742, 525, 29909, 7998, 29876, 742, 525, 29909, 29914, 29928, 29914, 29954, 7998, 29876, 29915, 4514, 13, 29871, 11539, 29918, 1188, 1445, 29898, 1188, 1445, 2084, 29892, 3806, 29918, 1272, 29897, 13, 13, 29871, 396, 29871, 29906, 29889, 3731, 29876, 6914, 525, 7728, 657, 29915, 448, 29873, 29892, 525, 771, 572, 391, 29915, 448, 29873, 13, 29871, 396, 29871, 29906, 29889, 10726, 263, 4516, 322, 26554, 2875, 13, 29871, 12422, 29918, 8758, 353, 12422, 29918, 6886, 1273, 313, 276, 558, 29898, 4501, 593, 342, 29889, 3396, 29889, 27517, 6914, 29918, 19541, 511, 13, 462, 462, 259, 2062, 4197, 877, 7728, 657, 742, 525, 29890, 468, 375, 29918, 7728, 847, 29909, 5477, 13, 462, 462, 308, 6702, 7728, 657, 742, 525, 489, 13478, 7728, 26652, 375, 29918, 13478, 29918, 7728, 5477, 13, 462, 462, 308, 6702, 771, 572, 391, 742, 8207, 29909, 5477, 13, 462, 462, 308, 6702, 771, 572, 391, 742, 525, 489, 13478, 7728, 1495, 12622, 13, 29871, 3731, 593, 342, 29889, 3396, 29889, 3258, 29918, 4691, 29918, 20849, 29918, 2154, 29898, 1457, 29918, 15060, 29918, 20849, 29892, 13, 462, 462, 308, 12422, 29918, 8758, 29897, 13, 13, 29871, 3731, 593, 342, 29889, 7387, 29889, 3389, 29918, 392, 29918, 27902, 29918, 27517, 29898, 8516, 29892, 6213, 29892, 19997, 525, 11030, 300, 742, 13, 462, 462, 268, 525, 29890, 468, 375, 29918, 7728, 742, 525, 29890, 468, 375, 29918, 791, 29905, 29876, 742, 319, 29918, 2084, 29897, 13, 29871, 3731, 593, 342, 29889, 7387, 29889, 3389, 29918, 392, 29918, 27902, 29918, 27517, 29898, 8516, 29892, 6213, 29892, 19997, 13, 462, 462, 268, 525, 455, 742, 17411, 29885, 742, 525, 1188, 10191, 742, 28678, 29918, 3972, 29892, 13, 462, 462, 268, 525, 489, 2541, 29899, 13478, 7728, 742, 525, 29890, 468, 375, 29918, 13478, 29918, 7728, 29922, 29890, 468, 375, 29918, 13478, 29918, 791, 29905, 29876, 1495, 13, 29871, 396, 2567, 1423, 278, 1480, 1445, 13, 29871, 3806, 29918, 1272, 353, 518, 525, 29890, 468, 375, 29918, 791, 29905, 29876, 742, 13, 462, 1678, 525, 29890, 468, 375, 29918, 13478, 29918, 791, 29905, 29876, 742, 13, 462, 1678, 525, 29871, 26652, 375, 29918, 7728, 29905, 29876, 742, 13, 462, 1678, 525, 29871, 3731, 29876, 29901, 1188, 29905, 29876, 742, 525, 29871, 3731, 29876, 29901, 8921, 29905, 29876, 742, 13, 462, 1678, 396, 29871, 7463, 2875, 29892, 451, 2289, 3806, 13, 462, 1678, 525, 29871, 3731, 29876, 29901, 3198, 29899, 908, 29879, 29905, 29876, 742, 13, 462, 1678, 525, 29871, 26652, 375, 29918, 13478, 29918, 7728, 29905, 29876, 742, 525, 29871, 3731, 29876, 29901, 1256, 29905, 29876, 2033, 13, 29871, 11539, 29918, 1188, 1445, 29898, 1188, 1445, 2084, 29892, 3731, 593, 342, 29889, 27902, 29889, 2525, 21693, 6466, 29898, 9684, 29918, 1272, 876, 13, 13, 1753, 2875, 29918, 8143, 29898, 29879, 1884, 1125, 13, 29871, 376, 6799, 5217, 29908, 13, 13, 29871, 269, 1884, 29889, 4282, 580, 13, 29871, 13761, 29918, 3972, 353, 269, 1884, 29889, 20095, 29918, 3972, 13, 13, 29871, 269, 1884, 29889, 12857, 29918, 11030, 300, 877, 5431, 742, 525, 1646, 742, 525, 29909, 29914, 2589, 1495, 13, 29871, 269, 1884, 29889, 12857, 29918, 15060, 580, 13, 29871, 269, 1884, 29889, 12857, 29918, 7728, 6144, 877, 5431, 742, 525, 29909, 29914, 2589, 1495, 13, 29871, 269, 1884, 29889, 12857, 29918, 15060, 580, 13, 13, 29871, 396, 1060, 16243, 1951, 364, 29896, 29906, 29929, 29941, 29941, 29955, 29945, 29892, 3939, 322, 2923, 7738, 694, 1962, 373, 263, 13, 29871, 396, 2875, 5217, 13, 29871, 3731, 593, 342, 29889, 7387, 29889, 3389, 29918, 392, 29918, 27902, 29918, 27517, 6914, 29898, 8516, 29892, 6796, 29918, 29965, 29871, 319, 29914, 2589, 29905, 29876, 12436, 19997, 13, 462, 462, 308, 525, 15033, 742, 13761, 29918, 3972, 29897, 13, 13, 13, 13383, 13383, 13383, 13383, 7346, 13, 29937, 7525, 278, 6987, 13, 13, 13, 29937, 1051, 599, 6987, 1244, 29892, 6257, 411, 6213, 29901, 13, 1688, 29918, 1761, 353, 518, 6213, 29892, 13, 795, 1243, 29918, 29885, 10669, 29892, 13, 795, 5217, 29918, 1445, 29918, 262, 29918, 29885, 8238, 29918, 3972, 29892, 13, 795, 1243, 29918, 2158, 29918, 6799, 29918, 12765, 29879, 29892, 13, 795, 5235, 29918, 12313, 29918, 1482, 9012, 29892, 13, 795, 3939, 29918, 8552, 29918, 3888, 29892, 13, 795, 5447, 29918, 5464, 29918, 3757, 25397, 29892, 13, 795, 4046, 29918, 18434, 29892, 13, 795, 2923, 29918, 17281, 29918, 1332, 3246, 3535, 29892, 13, 795, 2923, 29918, 17281, 29918, 29872, 324, 3293, 29892, 13, 795, 2923, 29918, 19541, 29892, 13, 795, 1243, 29918, 5325, 675, 29892, 13, 795, 1243, 29918, 7508, 29876, 29918, 15581, 29892, 13, 795, 2875, 29918, 8143, 29892, 13, 632, 4514, 13, 13, 361, 4770, 978, 1649, 1275, 525, 1649, 3396, 1649, 2396, 13, 29871, 3731, 593, 342, 29889, 3396, 29889, 3389, 29918, 21150, 29898, 1688, 29918, 1761, 29897, 13, 29871, 396, 6058, 1525, 2477, 29950, 3352, 13, 13, 13, 2277, 29937, 2796, 310, 934, 29889, 13, 2 ]
src/EdgelistExtractor.py
centre-for-humanities-computing/ProdigalNetworks
0
58435
#!/usr/bin/env python # coding: utf-8 # import packages import re import pandas as pd from bs4 import BeautifulSoup from collections import defaultdict # Function definitions def extract_all_characters(soup): """ Function to extract characters from XML file of a play. Extracts the value of two tag attributes One relates to Act/Scene divisions and the other is for the name of the speaking character. These should be fairly clear from the code. This function should be modified to deal with different XML schema. """ idList = [] for a in soup.findAll(['div', 'sp']): if 'type' in a.attrs.keys(): idList.append(a.attrs['type']) elif 'who' in a.attrs.keys(): idList.append(a.attrs['who']) df = pd.DataFrame(idList, columns=['names']) return df def character_pairings_in(l): """ Function to create list of tuples of character pairings from extracted data This also (quite crudely) removes any Act or Scene divisions, which have all been tagged using an asterisk. """ # Create list from Pandas DF #l = dataframe[0].tolist() l = [x for x in l if str(x) != 'nan'] # Create pairings from list l2 = [(l[i],l[i+1]) for i in range(len(l)-1)] # Remove all Act and Scene markers #x = [[t for t in a if not '#' in t] for a in l2] # Keep only pairs of characters y = [row for row in l2 if len(row) > 1] # Create list of tuples character_pairings = [tuple(l) for l in y] return character_pairings def create_edgelist_from(pairs): """ Function to create edgelists for "speaking-in-turn" pairs Returns results in a way that will be useful in Gephi """ # Create edgelist using defaultDict edges = defaultdict(int) for people in pairs: for personA in people: for personB in people: if personA < personB: edges[personA + ",undirected," + personB] += 1 # Create a dataframe from the defaultDict df = pd.DataFrame.from_dict(edges, orient='index') df.reset_index(level=0, inplace=True) # Split cell on comma into muliple columns split = (df['index'].str.split(',', expand=True).rename(columns=lambda x: f"col{x+1}")) # Merge these split columns with the 'weights' from the first df merged = split.join(df[0]) # Rename columns for use in Gephi merged.columns = ["Source", "Type", "Target", "Weight"] return merged if __name__=="__main__": # List of filenames targets = ["KL", "ado", "2h4", "wt"] # Read in play and create BeautifulSoup object for target in targets: filename = f"/Users/au564346/Desktop/{target}.xml" with open(filename, 'r') as file: raw = file.read() soup = BeautifulSoup(raw, 'lxml') # Create list using extract function character_list = extract_all_characters(soup) # Cleaning #cleaned = pd.read_csv(f"{target}.csv", header=None) #merged = pd.merge(character_list, cleaned, left_on="names", right_on=0, how="left") #merged = merged[1].dropna() #merged = merged[~merged.str.contains('#')] # Create edgelist edgelist_df = create_edgelist_from(character_pairings_in(character_list)) print(edgelist_df) # Save to csv edgelist_df.to_csv(f"{target}.csv", sep=",", index=False, header=True)
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 14137, 29901, 23616, 29899, 29947, 13, 13, 29937, 1053, 9741, 13, 5215, 337, 13, 5215, 11701, 408, 10518, 13, 3166, 24512, 29946, 1053, 25685, 29903, 1132, 13, 3166, 16250, 1053, 2322, 8977, 13, 13, 29937, 6680, 15848, 13, 13, 1753, 6597, 29918, 497, 29918, 3090, 21706, 29898, 29879, 1132, 1125, 13, 1678, 9995, 13, 1678, 6680, 304, 6597, 4890, 515, 6560, 934, 310, 263, 1708, 29889, 13, 13, 1678, 7338, 1461, 29879, 278, 995, 310, 1023, 4055, 8393, 13, 13, 4706, 3118, 1104, 1078, 304, 3185, 29914, 23472, 25884, 322, 278, 916, 338, 363, 13, 4706, 278, 1024, 310, 278, 13590, 2931, 29889, 4525, 881, 367, 12558, 13, 4706, 2821, 515, 278, 775, 29889, 13, 13, 1678, 910, 740, 881, 367, 9120, 304, 5376, 411, 1422, 6560, 10938, 29889, 13, 1678, 9995, 13, 1678, 1178, 1293, 353, 5159, 13, 1678, 363, 263, 297, 22300, 29889, 2886, 3596, 18959, 4563, 742, 525, 1028, 2033, 1125, 13, 4706, 565, 525, 1853, 29915, 297, 263, 29889, 5552, 29879, 29889, 8149, 7295, 13, 9651, 1178, 1293, 29889, 4397, 29898, 29874, 29889, 5552, 29879, 1839, 1853, 11287, 13, 4706, 25342, 525, 15970, 29915, 297, 263, 29889, 5552, 29879, 29889, 8149, 7295, 13, 9651, 1178, 1293, 29889, 4397, 29898, 29874, 29889, 5552, 29879, 1839, 15970, 11287, 13, 9651, 4489, 353, 10518, 29889, 17271, 29898, 333, 1293, 29892, 4341, 29922, 1839, 7039, 11287, 13, 9651, 736, 4489, 13, 13, 1753, 2931, 29918, 18784, 886, 29918, 262, 29898, 29880, 1125, 13, 1678, 9995, 13, 1678, 6680, 304, 1653, 1051, 310, 5291, 2701, 310, 2931, 5101, 886, 515, 23892, 848, 13, 13, 1678, 910, 884, 313, 339, 568, 2181, 566, 873, 29897, 25388, 738, 3185, 470, 2522, 1600, 25884, 29892, 607, 505, 599, 13, 1678, 1063, 4055, 3192, 773, 385, 263, 2475, 3873, 29889, 13, 1678, 9995, 13, 1678, 396, 6204, 1051, 515, 349, 7086, 360, 29943, 13, 1678, 396, 29880, 353, 12205, 29961, 29900, 1822, 25027, 391, 580, 13, 1678, 301, 353, 518, 29916, 363, 921, 297, 301, 565, 851, 29898, 29916, 29897, 2804, 525, 13707, 2033, 13, 1678, 396, 6204, 5101, 886, 515, 1051, 13, 1678, 301, 29906, 353, 17288, 29880, 29961, 29875, 1402, 29880, 29961, 29875, 29974, 29896, 2314, 363, 474, 297, 3464, 29898, 2435, 29898, 29880, 6817, 29896, 4638, 13, 1678, 396, 15154, 599, 3185, 322, 2522, 1600, 29320, 13, 1678, 396, 29916, 353, 5519, 29873, 363, 260, 297, 263, 565, 451, 16321, 29915, 297, 260, 29962, 363, 263, 297, 301, 29906, 29962, 13, 1678, 396, 19152, 871, 11000, 310, 4890, 13, 1678, 343, 353, 518, 798, 363, 1948, 297, 301, 29906, 565, 7431, 29898, 798, 29897, 1405, 29871, 29896, 29962, 13, 1678, 396, 6204, 1051, 310, 5291, 2701, 13, 1678, 2931, 29918, 18784, 886, 353, 518, 23583, 29898, 29880, 29897, 363, 301, 297, 343, 29962, 13, 13, 1678, 736, 2931, 29918, 18784, 886, 13, 13, 1753, 1653, 29918, 287, 7467, 391, 29918, 3166, 29898, 29886, 7121, 1125, 13, 1678, 9995, 13, 1678, 6680, 304, 1653, 1226, 7467, 2879, 363, 376, 5965, 5086, 29899, 262, 29899, 685, 29908, 11000, 13, 13, 1678, 16969, 2582, 297, 263, 982, 393, 674, 367, 5407, 297, 1879, 2876, 13, 1678, 9995, 13, 1678, 396, 6204, 1226, 7467, 391, 773, 2322, 21533, 13, 1678, 12770, 353, 2322, 8977, 29898, 524, 29897, 13, 1678, 363, 2305, 297, 11000, 29901, 13, 4706, 363, 2022, 29909, 297, 2305, 29901, 13, 9651, 363, 2022, 29933, 297, 2305, 29901, 13, 18884, 565, 2022, 29909, 529, 2022, 29933, 29901, 13, 462, 1678, 12770, 29961, 10532, 29909, 718, 9162, 870, 1088, 287, 1699, 718, 2022, 29933, 29962, 4619, 29871, 29896, 13, 13, 1678, 396, 6204, 263, 12205, 515, 278, 2322, 21533, 13, 1678, 4489, 353, 10518, 29889, 17271, 29889, 3166, 29918, 8977, 29898, 287, 2710, 29892, 7769, 2433, 2248, 1495, 13, 1678, 4489, 29889, 12071, 29918, 2248, 29898, 5563, 29922, 29900, 29892, 297, 6689, 29922, 5574, 29897, 13, 13, 1678, 396, 26178, 3038, 373, 16694, 964, 286, 14549, 552, 4341, 13, 1678, 6219, 353, 313, 2176, 1839, 2248, 13359, 710, 29889, 5451, 29317, 742, 7985, 29922, 5574, 467, 1267, 420, 29898, 13099, 29922, 2892, 921, 29901, 285, 29908, 1054, 29912, 29916, 29974, 29896, 5038, 876, 13, 13, 1678, 396, 4702, 479, 1438, 6219, 4341, 411, 278, 525, 705, 5861, 29915, 515, 278, 937, 4489, 13, 1678, 19412, 353, 6219, 29889, 7122, 29898, 2176, 29961, 29900, 2314, 13, 13, 1678, 396, 390, 3871, 4341, 363, 671, 297, 1879, 2876, 13, 1678, 19412, 29889, 13099, 353, 6796, 4435, 613, 376, 1542, 613, 376, 8667, 613, 376, 22676, 3108, 13, 13, 1678, 736, 19412, 13, 13, 361, 4770, 978, 1649, 26359, 1649, 3396, 1649, 1115, 13, 29937, 2391, 310, 977, 264, 1280, 13, 1678, 22525, 353, 29871, 6796, 29968, 29931, 613, 376, 912, 613, 376, 29906, 29882, 29946, 613, 376, 14554, 3108, 13, 13, 1678, 396, 7523, 297, 1708, 322, 1653, 25685, 29903, 1132, 1203, 13, 1678, 363, 3646, 297, 22525, 29901, 13, 4706, 10422, 353, 285, 23901, 5959, 29914, 585, 29945, 29953, 29946, 29941, 29946, 29953, 29914, 17600, 19248, 5182, 1836, 3134, 29908, 13, 4706, 411, 1722, 29898, 9507, 29892, 525, 29878, 1495, 408, 934, 29901, 13, 9651, 10650, 353, 934, 29889, 949, 580, 13, 9651, 22300, 353, 25685, 29903, 1132, 29898, 1610, 29892, 525, 29880, 3134, 1495, 13, 13, 4706, 396, 6204, 1051, 773, 6597, 740, 13, 4706, 2931, 29918, 1761, 353, 6597, 29918, 497, 29918, 3090, 21706, 29898, 29879, 1132, 29897, 13, 13, 4706, 396, 315, 14044, 292, 13, 13, 4706, 396, 14941, 287, 353, 10518, 29889, 949, 29918, 7638, 29898, 29888, 29908, 29912, 5182, 1836, 7638, 613, 4839, 29922, 8516, 29897, 13, 4706, 396, 1050, 3192, 353, 10518, 29889, 14634, 29898, 18609, 29918, 1761, 29892, 5941, 287, 29892, 2175, 29918, 265, 543, 7039, 613, 1492, 29918, 265, 29922, 29900, 29892, 920, 543, 1563, 1159, 13, 4706, 396, 1050, 3192, 353, 19412, 29961, 29896, 1822, 8865, 1056, 580, 13, 4706, 396, 1050, 3192, 353, 19412, 29961, 30022, 1050, 3192, 29889, 710, 29889, 11516, 14237, 1495, 29962, 13, 13, 4706, 396, 6204, 1226, 7467, 391, 13, 4706, 1226, 7467, 391, 29918, 2176, 353, 1653, 29918, 287, 7467, 391, 29918, 3166, 29898, 18609, 29918, 18784, 886, 29918, 262, 29898, 18609, 29918, 1761, 876, 13, 4706, 1596, 29898, 287, 7467, 391, 29918, 2176, 29897, 13, 4706, 396, 16913, 304, 11799, 13, 4706, 1226, 7467, 391, 29918, 2176, 29889, 517, 29918, 7638, 29898, 29888, 29908, 29912, 5182, 1836, 7638, 613, 16345, 543, 29892, 613, 2380, 29922, 8824, 29892, 4839, 29922, 5574, 29897, 13, 2 ]
tests/test_utils/test_pywriting_utils.py
heylohousing/quickbase-client
0
549
import os from tempfile import TemporaryDirectory from quickbase_client.utils.pywriting_utils import BasicPyFileWriter from quickbase_client.utils.pywriting_utils import PyPackageWriter class TestBasicFileWriter: def test_outputs_lines(self): w = BasicPyFileWriter() w.add_line('import abc') w.add_line('import os').space() s = w.get_file_as_string() assert s == 'import abc\nimport os\n' def test_indent_dedent(self): w = BasicPyFileWriter() w.add_line('def foo():').indent().add_line('return 5').dedent().space() s = w.get_file_as_string() assert s == 'def foo():\n return 5\n' def test_use_refs(self): w = BasicPyFileWriter() w.add_line('a = "A"') ref = w.make_ref() w.add_line('d = "D"') ref.add_line('b = "B"').add_line('c = "C"') s = w.get_file_as_string() lns = s.split('\n') assert 'a' in lns[0] assert 'b' in lns[1] assert 'c' in lns[2] assert 'd' in lns[3] class TestPyPackageWriter: def test_includes_init(self): with TemporaryDirectory() as d: w = PyPackageWriter(pkg_name='foo', parent_dir=d) assert '__init__' in w.modules assert w.has_module_name('__init__') assert w.pkg_path == os.path.join(d, 'foo') w.write() assert os.path.exists(d) assert os.path.exists(os.path.join(d, 'foo')) assert os.path.exists(os.path.join(d, 'foo', '__init__.py'))
[ 1, 1053, 2897, 13, 3166, 5694, 1445, 1053, 6789, 1971, 653, 9882, 13, 13, 3166, 4996, 3188, 29918, 4645, 29889, 13239, 29889, 2272, 16554, 29918, 13239, 1053, 19219, 19737, 2283, 10507, 13, 3166, 4996, 3188, 29918, 4645, 29889, 13239, 29889, 2272, 16554, 29918, 13239, 1053, 10772, 14459, 10507, 13, 13, 13, 1990, 4321, 16616, 2283, 10507, 29901, 13, 13, 1678, 822, 1243, 29918, 4905, 29879, 29918, 9012, 29898, 1311, 1125, 13, 4706, 281, 353, 19219, 19737, 2283, 10507, 580, 13, 4706, 281, 29889, 1202, 29918, 1220, 877, 5215, 25638, 1495, 13, 4706, 281, 29889, 1202, 29918, 1220, 877, 5215, 2897, 2824, 3493, 580, 13, 4706, 269, 353, 281, 29889, 657, 29918, 1445, 29918, 294, 29918, 1807, 580, 13, 4706, 4974, 269, 1275, 525, 5215, 25638, 29905, 29876, 5215, 2897, 29905, 29876, 29915, 13, 13, 1678, 822, 1243, 29918, 12860, 29918, 7176, 296, 29898, 1311, 1125, 13, 4706, 281, 353, 19219, 19737, 2283, 10507, 580, 13, 4706, 281, 29889, 1202, 29918, 1220, 877, 1753, 7953, 7295, 2824, 12860, 2141, 1202, 29918, 1220, 877, 2457, 29871, 29945, 2824, 7176, 296, 2141, 3493, 580, 13, 4706, 269, 353, 281, 29889, 657, 29918, 1445, 29918, 294, 29918, 1807, 580, 13, 4706, 4974, 269, 1275, 525, 1753, 7953, 580, 3583, 29876, 1678, 736, 29871, 29945, 29905, 29876, 29915, 13, 13, 1678, 822, 1243, 29918, 1509, 29918, 24539, 29898, 1311, 1125, 13, 4706, 281, 353, 19219, 19737, 2283, 10507, 580, 13, 4706, 281, 29889, 1202, 29918, 1220, 877, 29874, 353, 376, 29909, 29908, 1495, 13, 4706, 2143, 353, 281, 29889, 5675, 29918, 999, 580, 13, 4706, 281, 29889, 1202, 29918, 1220, 877, 29881, 353, 376, 29928, 29908, 1495, 13, 4706, 2143, 29889, 1202, 29918, 1220, 877, 29890, 353, 376, 29933, 29908, 2824, 1202, 29918, 1220, 877, 29883, 353, 376, 29907, 29908, 1495, 13, 4706, 269, 353, 281, 29889, 657, 29918, 1445, 29918, 294, 29918, 1807, 580, 13, 4706, 301, 1983, 353, 269, 29889, 5451, 28909, 29876, 1495, 13, 4706, 4974, 525, 29874, 29915, 297, 301, 1983, 29961, 29900, 29962, 13, 4706, 4974, 525, 29890, 29915, 297, 301, 1983, 29961, 29896, 29962, 13, 4706, 4974, 525, 29883, 29915, 297, 301, 1983, 29961, 29906, 29962, 13, 4706, 4974, 525, 29881, 29915, 297, 301, 1983, 29961, 29941, 29962, 13, 13, 13, 1990, 4321, 19737, 14459, 10507, 29901, 13, 13, 1678, 822, 1243, 29918, 24572, 29918, 2344, 29898, 1311, 1125, 13, 4706, 411, 6789, 1971, 653, 9882, 580, 408, 270, 29901, 13, 9651, 281, 353, 10772, 14459, 10507, 29898, 15865, 29918, 978, 2433, 5431, 742, 3847, 29918, 3972, 29922, 29881, 29897, 13, 9651, 4974, 525, 1649, 2344, 1649, 29915, 297, 281, 29889, 7576, 13, 9651, 4974, 281, 29889, 5349, 29918, 5453, 29918, 978, 877, 1649, 2344, 1649, 1495, 13, 9651, 4974, 281, 29889, 15865, 29918, 2084, 1275, 2897, 29889, 2084, 29889, 7122, 29898, 29881, 29892, 525, 5431, 1495, 13, 9651, 281, 29889, 3539, 580, 13, 9651, 4974, 2897, 29889, 2084, 29889, 9933, 29898, 29881, 29897, 13, 9651, 4974, 2897, 29889, 2084, 29889, 9933, 29898, 359, 29889, 2084, 29889, 7122, 29898, 29881, 29892, 525, 5431, 8785, 13, 9651, 4974, 2897, 29889, 2084, 29889, 9933, 29898, 359, 29889, 2084, 29889, 7122, 29898, 29881, 29892, 525, 5431, 742, 525, 1649, 2344, 26914, 2272, 8785, 13, 2 ]
runtests.py
luzfcb/django-versioning
0
61228
<gh_stars>0 # -*- coding: utf-8 -*- import os import sys def main(): from django.conf import settings settings.configure( DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:' } }, INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'versioning', ], MIDDLEWARE_CLASSES = [ 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', "versioning.middleware.VersioningMiddleware", ], STATIC_URL = '/static/', TEST_RUNNER = 'django.test.simple.DjangoTestSuiteRunner', TEMPLATE_DIRS = [], DEBUG = True, TEMPLATE_DEBUG = True, ROOT_URLCONF = 'runtests', ) from django.conf.urls import patterns, include, url from django.contrib import admin global urlpatterns urlpatterns = patterns( '', url(r'^admin/', include(admin.site.urls)), url(r'^versioning/', include('versioning.urls')), ) admin.autodiscover() # Run the test suite, including the extra validation tests. from django.test.utils import get_runner TestRunner = get_runner(settings) test_runner = TestRunner(verbosity=1, interactive=False, failfast=False) failures = test_runner.run_tests(['versioning']) sys.exit(failures) if __name__ == "__main__": main()
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 5215, 2897, 13, 5215, 10876, 13, 13, 13, 1753, 1667, 7295, 13, 1678, 515, 9557, 29889, 5527, 1053, 6055, 13, 1678, 6055, 29889, 17591, 29898, 13, 4706, 27640, 27982, 29903, 353, 426, 13, 9651, 525, 4381, 2396, 426, 13, 18884, 525, 1430, 29954, 8895, 2396, 525, 14095, 29889, 2585, 29889, 1627, 1975, 29889, 22793, 29941, 742, 13, 18884, 525, 5813, 2396, 525, 29901, 14834, 11283, 13, 9651, 500, 13, 4706, 2981, 13, 4706, 2672, 1254, 1964, 20566, 29918, 3301, 7024, 353, 518, 13, 9651, 525, 14095, 29889, 21570, 29889, 6406, 742, 13, 9651, 525, 14095, 29889, 21570, 29889, 5150, 742, 13, 9651, 525, 14095, 29889, 21570, 29889, 3051, 8768, 742, 13, 9651, 525, 14095, 29889, 21570, 29889, 29879, 10964, 742, 13, 9651, 525, 14095, 29889, 21570, 29889, 19158, 742, 13, 9651, 525, 14095, 29889, 21570, 29889, 7959, 5325, 742, 13, 9651, 525, 3259, 292, 742, 13, 4706, 21251, 13, 4706, 341, 1367, 29928, 1307, 12982, 1525, 29918, 6154, 3289, 1660, 29903, 353, 518, 13, 9651, 525, 14095, 29889, 21570, 29889, 29879, 10964, 29889, 17662, 2519, 29889, 7317, 25411, 2519, 742, 13, 9651, 525, 14095, 29889, 17662, 2519, 29889, 9435, 29889, 18877, 25411, 2519, 742, 13, 9651, 525, 14095, 29889, 17662, 2519, 29889, 2395, 9600, 29889, 29907, 29879, 9600, 1043, 25411, 2519, 742, 13, 9651, 525, 14095, 29889, 21570, 29889, 5150, 29889, 17662, 2519, 29889, 16746, 25411, 2519, 742, 13, 9651, 525, 14095, 29889, 21570, 29889, 19158, 29889, 17662, 2519, 29889, 3728, 25411, 2519, 742, 13, 9651, 525, 14095, 29889, 17662, 2519, 29889, 3808, 21452, 292, 29889, 29990, 4308, 5856, 25411, 2519, 742, 13, 9651, 376, 3259, 292, 29889, 17662, 2519, 29889, 6594, 292, 25411, 2519, 613, 13, 4706, 21251, 13, 4706, 6850, 1299, 2965, 29918, 4219, 353, 8207, 7959, 29914, 742, 13, 4706, 17067, 1254, 29918, 29934, 3904, 13865, 353, 525, 14095, 29889, 1688, 29889, 12857, 29889, 29928, 5364, 3057, 5091, 568, 16802, 742, 13, 4706, 17067, 3580, 29931, 3040, 29918, 9464, 29903, 353, 19997, 13, 4706, 21681, 353, 5852, 29892, 13, 4706, 17067, 3580, 29931, 3040, 29918, 18525, 353, 5852, 29892, 13, 4706, 16641, 2891, 29918, 4219, 6007, 29943, 353, 525, 29878, 1657, 9197, 742, 13, 1678, 1723, 13, 13, 1678, 515, 9557, 29889, 5527, 29889, 26045, 1053, 15038, 29892, 3160, 29892, 3142, 13, 1678, 515, 9557, 29889, 21570, 1053, 4113, 13, 1678, 5534, 3142, 11037, 29879, 13, 1678, 3142, 11037, 29879, 353, 15038, 29898, 13, 4706, 15516, 13, 4706, 3142, 29898, 29878, 29915, 29985, 6406, 29914, 742, 3160, 29898, 6406, 29889, 2746, 29889, 26045, 8243, 13, 4706, 3142, 29898, 29878, 29915, 29985, 3259, 292, 29914, 742, 3160, 877, 3259, 292, 29889, 26045, 1495, 511, 13, 1678, 1723, 13, 1678, 4113, 29889, 1300, 397, 10669, 957, 580, 13, 13, 1678, 396, 7525, 278, 1243, 9460, 29892, 3704, 278, 4805, 8845, 6987, 29889, 13, 1678, 515, 9557, 29889, 1688, 29889, 13239, 1053, 679, 29918, 27492, 13, 1678, 4321, 16802, 353, 679, 29918, 27492, 29898, 11027, 29897, 13, 13, 1678, 1243, 29918, 27492, 353, 4321, 16802, 29898, 18248, 359, 537, 29922, 29896, 29892, 28923, 29922, 8824, 29892, 4418, 11255, 29922, 8824, 29897, 13, 1678, 4418, 1973, 353, 1243, 29918, 27492, 29889, 3389, 29918, 21150, 18959, 3259, 292, 11287, 13, 1678, 10876, 29889, 13322, 29898, 14057, 1973, 29897, 13, 13, 13, 361, 4770, 978, 1649, 1275, 376, 1649, 3396, 1649, 1115, 13, 1678, 1667, 580, 13, 2 ]
graph.py
lokkelvin2/dc_tts
25
129291
from data_load import load_vocab from hyperparams import Hyperparams as hp from networks import TextEnc, AudioEnc, AudioDec, Attention, SSRN import tensorflow as tf class Graph: def __init__(self, num=1, mode="train"): ''' Args: num: Either 1 or 2. 1 for Text2Mel 2 for SSRN. mode: Either "train" or "synthesize". ''' # Load vocabulary self.char2idx, self.idx2char = load_vocab() # Set flag training = True if mode=="train" else False # Graph # Data Feeding ## L: Text. (B, N), int32 ## mels: Reduced melspectrogram. (B, T/r, n_mels) float32 ## mags: Magnitude. (B, T, n_fft//2+1) float32 self.L = tf.placeholder(tf.int32, shape=(None, None)) self.mels = tf.placeholder(tf.float32, shape=(None, None, hp.n_mels)) self.prev_max_attentions = tf.placeholder(tf.int32, shape=(None,)) with tf.variable_scope("Text2Mel"): # Get S or decoder inputs. (B, T//r, n_mels) self.S = tf.concat((tf.zeros_like(self.mels[:, :1, :]), self.mels[:, :-1, :]), 1) # Networks with tf.variable_scope("TextEnc"): self.K, self.V = TextEnc(self.L, training=training) # (N, Tx, e) with tf.variable_scope("AudioEnc"): self.Q = AudioEnc(self.S, training=training) with tf.variable_scope("Attention"): # R: (B, T/r, 2d) # alignments: (B, N, T/r) # max_attentions: (B,) self.R, self.alignments, self.max_attentions = Attention(self.Q, self.K, self.V, mononotic_attention=(not training), prev_max_attentions=self.prev_max_attentions) with tf.variable_scope("AudioDec"): self.Y_logits, self.Y = AudioDec(self.R, training=training) # (B, T/r, n_mels) # During inference, the predicted melspectrogram values are fed. with tf.variable_scope("SSRN"): self.Z_logits, self.Z = SSRN(self.Y, training=training) with tf.variable_scope("gs"): self.global_step = tf.Variable(0, name='global_step', trainable=False)
[ 1, 29871, 13, 3166, 848, 29918, 1359, 1053, 2254, 29918, 29894, 542, 370, 13, 3166, 11266, 7529, 1053, 26078, 7529, 408, 298, 29886, 13, 3166, 14379, 1053, 3992, 8566, 29892, 21764, 8566, 29892, 21764, 6185, 29892, 6212, 2509, 29892, 5886, 29934, 29940, 13, 5215, 26110, 408, 15886, 13, 13, 13, 1990, 12367, 29901, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 954, 29922, 29896, 29892, 4464, 543, 14968, 29908, 1125, 13, 4706, 14550, 13, 4706, 826, 3174, 29901, 13, 3986, 954, 29901, 20370, 29871, 29896, 470, 29871, 29906, 29889, 29871, 29896, 363, 3992, 29906, 29924, 295, 29871, 29906, 363, 5886, 29934, 29940, 29889, 13, 3986, 4464, 29901, 20370, 376, 14968, 29908, 470, 376, 19274, 26041, 675, 1642, 13, 4706, 14550, 13, 4706, 396, 16012, 7931, 370, 352, 653, 13, 4706, 1583, 29889, 3090, 29906, 13140, 29892, 1583, 29889, 13140, 29906, 3090, 353, 2254, 29918, 29894, 542, 370, 580, 13, 13, 4706, 396, 3789, 7353, 13, 4706, 6694, 353, 5852, 565, 4464, 26359, 14968, 29908, 1683, 7700, 13, 13, 4706, 396, 12367, 13, 4706, 396, 3630, 5169, 21219, 13, 4706, 444, 365, 29901, 3992, 29889, 313, 29933, 29892, 405, 511, 938, 29941, 29906, 13, 4706, 444, 286, 1379, 29901, 4367, 29884, 1133, 286, 1379, 1103, 307, 1393, 29889, 313, 29933, 29892, 323, 29914, 29878, 29892, 302, 29918, 29885, 1379, 29897, 5785, 29941, 29906, 13, 4706, 444, 286, 810, 29901, 19975, 4279, 29889, 313, 29933, 29892, 323, 29892, 302, 29918, 600, 29873, 458, 29906, 29974, 29896, 29897, 5785, 29941, 29906, 13, 13, 4706, 1583, 29889, 29931, 353, 15886, 29889, 27074, 29898, 13264, 29889, 524, 29941, 29906, 29892, 8267, 7607, 8516, 29892, 6213, 876, 13, 4706, 1583, 29889, 29885, 1379, 353, 15886, 29889, 27074, 29898, 13264, 29889, 7411, 29941, 29906, 29892, 8267, 7607, 8516, 29892, 6213, 29892, 298, 29886, 29889, 29876, 29918, 29885, 1379, 876, 13, 4706, 1583, 29889, 16304, 29918, 3317, 29918, 1131, 296, 1080, 353, 15886, 29889, 27074, 29898, 13264, 29889, 524, 29941, 29906, 29892, 8267, 7607, 8516, 29892, 876, 13, 13, 308, 13, 4706, 411, 15886, 29889, 11918, 29918, 6078, 703, 1626, 29906, 29924, 295, 29908, 1125, 13, 9651, 396, 3617, 317, 470, 1602, 6119, 10970, 29889, 313, 29933, 29892, 323, 458, 29878, 29892, 302, 29918, 29885, 1379, 29897, 13, 9651, 1583, 29889, 29903, 353, 15886, 29889, 17685, 3552, 13264, 29889, 3298, 359, 29918, 4561, 29898, 1311, 29889, 29885, 1379, 7503, 29892, 584, 29896, 29892, 584, 11724, 1583, 29889, 29885, 1379, 7503, 29892, 8956, 29896, 29892, 584, 11724, 29871, 29896, 29897, 13, 13, 9651, 396, 8527, 29879, 13, 9651, 411, 15886, 29889, 11918, 29918, 6078, 703, 1626, 8566, 29908, 1125, 13, 18884, 1583, 29889, 29968, 29892, 1583, 29889, 29963, 353, 3992, 8566, 29898, 1311, 29889, 29931, 29892, 6694, 29922, 26495, 29897, 29871, 396, 313, 29940, 29892, 323, 29916, 29892, 321, 29897, 13, 13, 9651, 411, 15886, 29889, 11918, 29918, 6078, 703, 17111, 8566, 29908, 1125, 13, 18884, 1583, 29889, 29984, 353, 21764, 8566, 29898, 1311, 29889, 29903, 29892, 6694, 29922, 26495, 29897, 13, 13, 9651, 411, 15886, 29889, 11918, 29918, 6078, 703, 4165, 2509, 29908, 1125, 13, 18884, 396, 390, 29901, 313, 29933, 29892, 323, 29914, 29878, 29892, 29871, 29906, 29881, 29897, 13, 18884, 396, 7595, 1860, 29901, 313, 29933, 29892, 405, 29892, 323, 29914, 29878, 29897, 13, 18884, 396, 4236, 29918, 1131, 296, 1080, 29901, 313, 29933, 29892, 29897, 13, 18884, 1583, 29889, 29934, 29892, 1583, 29889, 2520, 1860, 29892, 1583, 29889, 3317, 29918, 1131, 296, 1080, 353, 6212, 2509, 29898, 1311, 29889, 29984, 29892, 1583, 29889, 29968, 29892, 1583, 29889, 29963, 29892, 13, 462, 462, 462, 462, 9651, 1601, 265, 13574, 29918, 1131, 2509, 7607, 1333, 6694, 511, 13, 462, 462, 462, 462, 9651, 12379, 29918, 3317, 29918, 1131, 296, 1080, 29922, 1311, 29889, 16304, 29918, 3317, 29918, 1131, 296, 1080, 29897, 13, 9651, 411, 15886, 29889, 11918, 29918, 6078, 703, 17111, 6185, 29908, 1125, 13, 18884, 1583, 29889, 29979, 29918, 1188, 1169, 29892, 1583, 29889, 29979, 353, 21764, 6185, 29898, 1311, 29889, 29934, 29892, 6694, 29922, 26495, 29897, 396, 313, 29933, 29892, 323, 29914, 29878, 29892, 302, 29918, 29885, 1379, 29897, 13, 308, 13, 9651, 396, 7133, 27262, 29892, 278, 25383, 286, 1379, 1103, 307, 1393, 1819, 526, 21242, 29889, 13, 4706, 411, 15886, 29889, 11918, 29918, 6078, 703, 1799, 29934, 29940, 29908, 1125, 13, 9651, 1583, 29889, 29999, 29918, 1188, 1169, 29892, 1583, 29889, 29999, 353, 5886, 29934, 29940, 29898, 1311, 29889, 29979, 29892, 6694, 29922, 26495, 29897, 13, 13, 4706, 411, 15886, 29889, 11918, 29918, 6078, 703, 3174, 29908, 1125, 13, 9651, 1583, 29889, 10945, 29918, 10568, 353, 15886, 29889, 16174, 29898, 29900, 29892, 1024, 2433, 10945, 29918, 10568, 742, 7945, 519, 29922, 8824, 29897, 13, 13, 308, 2 ]
main.py
DonnC/retail-simulation
0
101951
<filename>main.py import simpy import random import os import datetime from transaction import transaction_from_dict from prettytable import PrettyTable # Specify the Column Names while initializing the Table myTable = PrettyTable( ["Agent", "Date", "Customer Number", "Amount", "Transaction Id"]) ACCOUNT_BALANCE = 10000.0 NUMBER_OF_AGENTS = 7 T_INTER = [30, 300] # Create an egent every [min, max] seconds AGENT_BALANCE = [500, 5500] # create [min, max] balance to allocate to agent SIM_TIME = 1000 # Simulation time in seconds # keep record transactions = [] fname = 'result.txt' if os.path.exists(fname): os.remove(fname) def write_to_file(info): ''' write stats to file ''' # print(info) with open(fname, 'a+') as f: f.write(str(info)) class Agent(): ''' registered agent, manages his own agent_balance allocated by owner ''' def __init__(self, env, name, allocated_balance: float) -> None: self.env = env self.name = name self.allocated_balance = allocated_balance # keep track of this agent allocated balance self.agent_balance = simpy.Container( env, allocated_balance, init=allocated_balance) def perform_sale(self, oab: simpy.Container): ''' agent to peform sale, sell airtime oab: owner actual current balance (actual_balance container instance) ''' while True: # generate random sale amount, with upper threshold to cater for excess sale amount sale_amount = random.randint(50, self.allocated_balance + 30) # first check if agent bal is enough to perform request if (sale_amount < self.agent_balance.level) and (oab.level > sale_amount): # proceed with transaction sale if sale_amount < 0: sale_amount = 0 self.agent_balance.get(amount=sale_amount) # update actual balance also oab.get(amount=sale_amount) write_to_file( f'[Agent: {self.name}] I performed a sale of ${sale_amount} | agent bal now : ${self.agent_balance.level} | owner balance: ${oab.level}\n\n') # add transaction history trans = { "agent": f"Agent {self.name}", "amount": sale_amount, "transaction_id": str(random.randint(0, 9999)), "date": datetime.datetime.now().isoformat(), "phone_number": f'0778{random.randint(1, 9)}72{random.randint(10, 99)}3' } t = transaction_from_dict(trans) transactions.append(t) yield self.env.timeout(random.randint(1, 5)) else: yield self.env.timeout(random.randint(1, 3)) # insufficient balance, request owner to topup write_to_file( f'[Agent: {self.name}] Insufficient balance to perform sale of ${sale_amount}. I have ${self.agent_balance.level}, Please allocate me more funds | owner balance: ${oab.level}\n\n') class Owner(): ''' shop owner, can allocate Y amount to agents manages agents ''' def __init__(self, env, oab: simpy.Container, vcb: simpy.Container) -> None: self.env = env self.oab = oab # owner actual balance self.vcb = vcb # virtual current balance def register_agents(self): ''' register a new agent ''' for i in range(NUMBER_OF_AGENTS): yield env.timeout(random.randint(*T_INTER)) # allocate funds to agent agent = self.allocate_funds_to_agent(agent_name=i) if agent: env.process(agent.perform_sale(self.oab)) def allocate_funds_to_agent(self, agent_name): ''' allocate funds to an agent ''' vb = self.vcb.level to_allocate = random.randint(*AGENT_BALANCE) if to_allocate < vb: # get amount to allocate self.vcb.get(amount=to_allocate) write_to_file( f'[Agent: {agent_name}] Here i am, I have been allocated ${to_allocate}, current virtual balance: ${self.vcb.level}\n\n') # proceed return Agent(name=agent_name, env=self.env, allocated_balance=to_allocate) else: # not enough funds write_to_file( f'[ERROR] Not enough funds to allocate Agent: {agent_name} | virtual balance: ${vb} | to allocate ${to_allocate}\n\n') return None print('-- Simulation Retail System --') env = simpy.Environment() # hold actual account balance actual_balance = simpy.Container(env, ACCOUNT_BALANCE, init=ACCOUNT_BALANCE) # initially hold a copy of the actual balance virtual_balance = simpy.Container(env, ACCOUNT_BALANCE, init=ACCOUNT_BALANCE) owner = Owner(env=env, oab=actual_balance, vcb=virtual_balance) # add process env.process(owner.register_agents()) # Execute! env.run(until=SIM_TIME) print('---- stats ----') total_agent_sales = 0.0 for t in transactions: myTable.add_row([t.agent, t.date, t.phone_number, t.amount, t.transaction_id]) total_agent_sales += t.amount print(myTable) print(f'\n\n[INFO] Total agent sales: ${total_agent_sales}\n\n') print( f'[INFO] Remaing virtual balance: ${virtual_balance.level} | initial balance: ${virtual_balance.capacity}\n\n') print( f'[INFO] Remaing owner balance: ${actual_balance.level} | initial balance: ${actual_balance.capacity}\n\n') write_to_file(str(myTable)) write_to_file(f'\n\n[INFO] Total agent sales: ${total_agent_sales}\n\n') write_to_file( f'[INFO] Remaing virtual balance: ${virtual_balance.level} | initial balance: ${virtual_balance.capacity}\n\n') write_to_file( f'[INFO] Remaing owner balance: ${actual_balance.level} | initial balance: ${actual_balance.capacity}\n\n') print('-- Done! --')
[ 1, 529, 9507, 29958, 3396, 29889, 2272, 13, 5215, 1027, 2272, 13, 5215, 4036, 13, 5215, 2897, 13, 5215, 12865, 13, 13, 3166, 10804, 1053, 10804, 29918, 3166, 29918, 8977, 13, 13, 3166, 5051, 2371, 1053, 4721, 4349, 3562, 13, 13, 29937, 12048, 1598, 278, 12481, 14706, 1550, 2847, 5281, 278, 6137, 13, 1357, 3562, 353, 4721, 4349, 3562, 29898, 13, 1678, 6796, 19661, 613, 376, 2539, 613, 376, 15122, 9681, 613, 376, 18087, 613, 376, 12460, 5163, 20068, 13, 13, 13, 2477, 18736, 29918, 29933, 1964, 23219, 353, 29871, 29896, 29900, 29900, 29900, 29900, 29889, 29900, 13, 23207, 29918, 9800, 29918, 10051, 3919, 29903, 353, 29871, 29955, 13, 29911, 29918, 23845, 353, 518, 29941, 29900, 29892, 29871, 29941, 29900, 29900, 29962, 4706, 396, 6204, 385, 321, 5362, 1432, 518, 1195, 29892, 4236, 29962, 6923, 13, 10051, 3919, 29918, 29933, 1964, 23219, 353, 518, 29945, 29900, 29900, 29892, 29871, 29945, 29945, 29900, 29900, 29962, 29871, 396, 1653, 518, 1195, 29892, 4236, 29962, 17346, 304, 23632, 304, 10823, 13, 5425, 29924, 29918, 15307, 353, 29871, 29896, 29900, 29900, 29900, 9651, 396, 3439, 2785, 931, 297, 6923, 13, 13, 29937, 3013, 2407, 13, 3286, 7387, 353, 5159, 13, 13, 29888, 978, 353, 525, 2914, 29889, 3945, 29915, 13, 13, 361, 2897, 29889, 2084, 29889, 9933, 29898, 29888, 978, 1125, 13, 1678, 2897, 29889, 5992, 29898, 29888, 978, 29897, 13, 13, 13, 1753, 2436, 29918, 517, 29918, 1445, 29898, 3888, 1125, 13, 1678, 14550, 13, 4706, 2436, 22663, 304, 934, 13, 1678, 14550, 13, 13, 259, 396, 1596, 29898, 3888, 29897, 13, 13, 1678, 411, 1722, 29898, 29888, 978, 29892, 525, 29874, 29974, 1495, 408, 285, 29901, 13, 4706, 285, 29889, 3539, 29898, 710, 29898, 3888, 876, 13, 13, 13, 1990, 28330, 7295, 13, 1678, 14550, 13, 268, 15443, 10823, 29892, 767, 1179, 670, 1914, 10823, 29918, 5521, 749, 19591, 491, 12271, 13, 1678, 14550, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 8829, 29892, 1024, 29892, 19591, 29918, 5521, 749, 29901, 5785, 29897, 1599, 6213, 29901, 13, 4706, 1583, 29889, 6272, 353, 8829, 13, 4706, 1583, 29889, 978, 353, 1024, 13, 4706, 1583, 29889, 15956, 630, 29918, 5521, 749, 353, 19591, 29918, 5521, 749, 13, 13, 4706, 396, 3013, 5702, 310, 445, 10823, 19591, 17346, 13, 4706, 1583, 29889, 14748, 29918, 5521, 749, 353, 1027, 2272, 29889, 7895, 29898, 13, 9651, 8829, 29892, 19591, 29918, 5521, 749, 29892, 2069, 29922, 15956, 630, 29918, 5521, 749, 29897, 13, 13, 1678, 822, 2189, 29918, 29879, 744, 29898, 1311, 29892, 288, 370, 29901, 1027, 2272, 29889, 7895, 1125, 13, 4706, 14550, 13, 4706, 10823, 304, 1236, 689, 14686, 29892, 19417, 4799, 2230, 13, 4706, 288, 370, 29901, 12271, 3935, 1857, 17346, 313, 19304, 29918, 5521, 749, 5639, 2777, 29897, 13, 4706, 14550, 13, 13, 4706, 1550, 5852, 29901, 13, 9651, 396, 5706, 4036, 14686, 5253, 29892, 411, 7568, 16897, 304, 274, 1008, 363, 19163, 14686, 5253, 13, 9651, 14686, 29918, 14506, 353, 4036, 29889, 9502, 524, 29898, 29945, 29900, 29892, 1583, 29889, 15956, 630, 29918, 5521, 749, 718, 29871, 29941, 29900, 29897, 13, 13, 9651, 396, 937, 1423, 565, 10823, 6411, 338, 3307, 304, 2189, 2009, 13, 9651, 565, 313, 29879, 744, 29918, 14506, 529, 1583, 29889, 14748, 29918, 5521, 749, 29889, 5563, 29897, 322, 313, 29877, 370, 29889, 5563, 1405, 14686, 29918, 14506, 1125, 13, 18884, 396, 8469, 411, 10804, 14686, 13, 18884, 565, 14686, 29918, 14506, 529, 29871, 29900, 29901, 13, 462, 1678, 14686, 29918, 14506, 353, 29871, 29900, 13, 13, 18884, 1583, 29889, 14748, 29918, 5521, 749, 29889, 657, 29898, 14506, 29922, 29879, 744, 29918, 14506, 29897, 13, 13, 18884, 396, 2767, 3935, 17346, 884, 13, 18884, 288, 370, 29889, 657, 29898, 14506, 29922, 29879, 744, 29918, 14506, 29897, 13, 13, 18884, 2436, 29918, 517, 29918, 1445, 29898, 13, 462, 1678, 285, 29915, 29961, 19661, 29901, 426, 1311, 29889, 978, 6525, 306, 8560, 263, 14686, 310, 6435, 29879, 744, 29918, 14506, 29913, 891, 10823, 6411, 1286, 584, 6435, 1311, 29889, 14748, 29918, 5521, 749, 29889, 5563, 29913, 891, 12271, 17346, 29901, 6435, 29877, 370, 29889, 5563, 1012, 29876, 29905, 29876, 1495, 13, 13, 18884, 396, 788, 10804, 4955, 13, 18884, 1301, 353, 426, 13, 462, 1678, 376, 14748, 1115, 285, 29908, 19661, 426, 1311, 29889, 978, 17671, 13, 462, 1678, 376, 14506, 1115, 14686, 29918, 14506, 29892, 13, 462, 1678, 376, 20736, 29918, 333, 1115, 851, 29898, 8172, 29889, 9502, 524, 29898, 29900, 29892, 29871, 29929, 29929, 29929, 29929, 8243, 13, 462, 1678, 376, 1256, 1115, 12865, 29889, 12673, 29889, 3707, 2141, 10718, 4830, 3285, 13, 462, 1678, 376, 6710, 29918, 4537, 1115, 285, 29915, 29900, 29955, 29955, 29947, 29912, 8172, 29889, 9502, 524, 29898, 29896, 29892, 29871, 29929, 2915, 29955, 29906, 29912, 8172, 29889, 9502, 524, 29898, 29896, 29900, 29892, 29871, 29929, 29929, 2915, 29941, 29915, 13, 18884, 500, 13, 13, 18884, 260, 353, 10804, 29918, 3166, 29918, 8977, 29898, 3286, 29897, 13, 13, 18884, 22160, 29889, 4397, 29898, 29873, 29897, 13, 13, 18884, 7709, 1583, 29889, 6272, 29889, 15619, 29898, 8172, 29889, 9502, 524, 29898, 29896, 29892, 29871, 29945, 876, 13, 13, 9651, 1683, 29901, 13, 18884, 7709, 1583, 29889, 6272, 29889, 15619, 29898, 8172, 29889, 9502, 524, 29898, 29896, 29892, 29871, 29941, 876, 13, 13, 18884, 396, 1663, 29884, 4543, 17346, 29892, 2009, 12271, 304, 2246, 786, 13, 18884, 2436, 29918, 517, 29918, 1445, 29898, 13, 462, 1678, 285, 29915, 29961, 19661, 29901, 426, 1311, 29889, 978, 6525, 512, 2146, 4543, 17346, 304, 2189, 14686, 310, 6435, 29879, 744, 29918, 14506, 1836, 306, 505, 6435, 1311, 29889, 14748, 29918, 5521, 749, 29889, 5563, 1118, 29871, 3529, 23632, 592, 901, 29199, 891, 12271, 17346, 29901, 6435, 29877, 370, 29889, 5563, 1012, 29876, 29905, 29876, 1495, 13, 13, 13, 1990, 438, 23007, 7295, 13, 1678, 14550, 13, 4706, 18296, 12271, 29892, 508, 23632, 612, 5253, 304, 19518, 13, 4706, 767, 1179, 19518, 13, 1678, 14550, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 8829, 29892, 288, 370, 29901, 1027, 2272, 29889, 7895, 29892, 325, 10702, 29901, 1027, 2272, 29889, 7895, 29897, 1599, 6213, 29901, 13, 4706, 1583, 29889, 6272, 353, 8829, 13, 4706, 1583, 29889, 29877, 370, 353, 288, 370, 29871, 396, 12271, 3935, 17346, 13, 4706, 1583, 29889, 7071, 29890, 353, 325, 10702, 29871, 396, 6901, 1857, 17346, 13, 13, 1678, 822, 6036, 29918, 351, 1237, 29898, 1311, 1125, 13, 4706, 14550, 13, 9651, 6036, 263, 716, 10823, 13, 4706, 14550, 13, 13, 4706, 363, 474, 297, 3464, 29898, 23207, 29918, 9800, 29918, 10051, 3919, 29903, 1125, 13, 9651, 7709, 8829, 29889, 15619, 29898, 8172, 29889, 9502, 524, 10456, 29911, 29918, 23845, 876, 13, 13, 9651, 396, 23632, 29199, 304, 10823, 13, 13, 9651, 10823, 353, 1583, 29889, 15956, 403, 29918, 27159, 29879, 29918, 517, 29918, 14748, 29898, 14748, 29918, 978, 29922, 29875, 29897, 13, 13, 9651, 565, 10823, 29901, 13, 18884, 8829, 29889, 5014, 29898, 14748, 29889, 19826, 29918, 29879, 744, 29898, 1311, 29889, 29877, 370, 876, 13, 13, 1678, 822, 23632, 29918, 27159, 29879, 29918, 517, 29918, 14748, 29898, 1311, 29892, 10823, 29918, 978, 1125, 13, 4706, 14550, 13, 9651, 23632, 29199, 304, 385, 10823, 13, 4706, 14550, 13, 4706, 16822, 353, 1583, 29889, 7071, 29890, 29889, 5563, 13, 13, 4706, 304, 29918, 15956, 403, 353, 4036, 29889, 9502, 524, 10456, 10051, 3919, 29918, 29933, 1964, 23219, 29897, 13, 13, 4706, 565, 304, 29918, 15956, 403, 529, 16822, 29901, 13, 9651, 396, 679, 5253, 304, 23632, 13, 9651, 1583, 29889, 7071, 29890, 29889, 657, 29898, 14506, 29922, 517, 29918, 15956, 403, 29897, 13, 13, 9651, 2436, 29918, 517, 29918, 1445, 29898, 13, 18884, 285, 29915, 29961, 19661, 29901, 426, 14748, 29918, 978, 6525, 2266, 474, 626, 29892, 306, 505, 1063, 19591, 6435, 517, 29918, 15956, 403, 1118, 1857, 6901, 17346, 29901, 6435, 1311, 29889, 7071, 29890, 29889, 5563, 1012, 29876, 29905, 29876, 1495, 13, 13, 9651, 396, 8469, 13, 9651, 736, 28330, 29898, 978, 29922, 14748, 29918, 978, 29892, 8829, 29922, 1311, 29889, 6272, 29892, 19591, 29918, 5521, 749, 29922, 517, 29918, 15956, 403, 29897, 13, 13, 4706, 1683, 29901, 13, 9651, 396, 451, 3307, 29199, 13, 9651, 2436, 29918, 517, 29918, 1445, 29898, 13, 18884, 285, 29915, 29961, 11432, 29962, 2216, 3307, 29199, 304, 23632, 28330, 29901, 426, 14748, 29918, 978, 29913, 891, 6901, 17346, 29901, 6435, 24666, 29913, 891, 304, 23632, 6435, 517, 29918, 15956, 403, 1012, 29876, 29905, 29876, 1495, 13, 9651, 736, 6213, 13, 13, 13, 2158, 877, 489, 3439, 2785, 4649, 737, 2184, 1192, 1495, 13, 13, 6272, 353, 1027, 2272, 29889, 18649, 580, 13, 13, 29937, 4808, 3935, 3633, 17346, 13, 19304, 29918, 5521, 749, 353, 1027, 2272, 29889, 7895, 29898, 6272, 29892, 14614, 18736, 29918, 29933, 1964, 23219, 29892, 2069, 29922, 2477, 18736, 29918, 29933, 1964, 23219, 29897, 13, 13, 29937, 12919, 4808, 263, 3509, 310, 278, 3935, 17346, 13, 18714, 29918, 5521, 749, 353, 1027, 2272, 29889, 7895, 29898, 6272, 29892, 14614, 18736, 29918, 29933, 1964, 23219, 29892, 2069, 29922, 2477, 18736, 29918, 29933, 1964, 23219, 29897, 13, 13, 20348, 353, 438, 23007, 29898, 6272, 29922, 6272, 29892, 288, 370, 29922, 19304, 29918, 5521, 749, 29892, 325, 10702, 29922, 18714, 29918, 5521, 749, 29897, 13, 13, 29937, 788, 1889, 13, 6272, 29889, 5014, 29898, 20348, 29889, 9573, 29918, 351, 1237, 3101, 13, 13, 13, 29937, 11080, 1082, 29991, 13, 6272, 29889, 3389, 29898, 29305, 29922, 5425, 29924, 29918, 15307, 29897, 13, 13, 2158, 877, 807, 22663, 23250, 1495, 13, 13, 7827, 29918, 14748, 29918, 29879, 2122, 353, 29871, 29900, 29889, 29900, 13, 13, 1454, 260, 297, 22160, 29901, 13, 1678, 590, 3562, 29889, 1202, 29918, 798, 4197, 29873, 29889, 14748, 29892, 260, 29889, 1256, 29892, 260, 29889, 6710, 29918, 4537, 29892, 13, 462, 268, 260, 29889, 14506, 29892, 260, 29889, 20736, 29918, 333, 2314, 13, 13, 1678, 3001, 29918, 14748, 29918, 29879, 2122, 4619, 260, 29889, 14506, 13, 13, 2158, 29898, 1357, 3562, 29897, 13, 13, 2158, 29898, 29888, 12764, 29876, 29905, 29876, 29961, 11690, 29962, 14990, 10823, 16538, 29901, 6435, 7827, 29918, 14748, 29918, 29879, 2122, 1012, 29876, 29905, 29876, 1495, 13, 13, 2158, 29898, 13, 1678, 285, 29915, 29961, 11690, 29962, 390, 2603, 292, 6901, 17346, 29901, 6435, 18714, 29918, 5521, 749, 29889, 5563, 29913, 891, 2847, 17346, 29901, 6435, 18714, 29918, 5521, 749, 29889, 5030, 5946, 1012, 29876, 29905, 29876, 1495, 13, 13, 2158, 29898, 13, 1678, 285, 29915, 29961, 11690, 29962, 390, 2603, 292, 12271, 17346, 29901, 6435, 19304, 29918, 5521, 749, 29889, 5563, 29913, 891, 2847, 17346, 29901, 6435, 19304, 29918, 5521, 749, 29889, 5030, 5946, 1012, 29876, 29905, 29876, 1495, 13, 13, 3539, 29918, 517, 29918, 1445, 29898, 710, 29898, 1357, 3562, 876, 13, 13, 3539, 29918, 517, 29918, 1445, 29898, 29888, 12764, 29876, 29905, 29876, 29961, 11690, 29962, 14990, 10823, 16538, 29901, 6435, 7827, 29918, 14748, 29918, 29879, 2122, 1012, 29876, 29905, 29876, 1495, 13, 13, 3539, 29918, 517, 29918, 1445, 29898, 13, 1678, 285, 29915, 29961, 11690, 29962, 390, 2603, 292, 6901, 17346, 29901, 6435, 18714, 29918, 5521, 749, 29889, 5563, 29913, 891, 2847, 17346, 29901, 6435, 18714, 29918, 5521, 749, 29889, 5030, 5946, 1012, 29876, 29905, 29876, 1495, 13, 13, 3539, 29918, 517, 29918, 1445, 29898, 13, 1678, 285, 29915, 29961, 11690, 29962, 390, 2603, 292, 12271, 17346, 29901, 6435, 19304, 29918, 5521, 749, 29889, 5563, 29913, 891, 2847, 17346, 29901, 6435, 19304, 29918, 5521, 749, 29889, 5030, 5946, 1012, 29876, 29905, 29876, 1495, 13, 13, 2158, 877, 489, 25679, 29991, 1192, 1495, 13, 2 ]
selfbot/__init__.py
TibebeJS/tg-selfbot
1
117746
from .selfbot import *
[ 1, 515, 869, 1311, 7451, 1053, 334, 2 ]
checking/classes/mocking/doubles.py
igrekus/checking
4
177622
import builtins from typing import Any, List, Tuple from .calls import Call from .interfaces import Observer from .wrapper import AttributeWrapper def fake_builtins(): real_isinstance = builtins.isinstance def fake_isinstance(initial: Any, class_or_tuple: Any) -> bool: if real_isinstance(initial, Spy): return initial.class_ == class_or_tuple return real_isinstance(initial, class_or_tuple) builtins.isinstance = fake_isinstance class Spy(Observer): """ The test-double (spy), which replaces the desired object. His attributes return None, and the methods do not do anything if unless otherwise indicated, but all of the calls are fixed. This class in used due to make sure in the call of respectively functions with arguments. """ first_instance = False def __init__(self, obj: Any = None): super().__init__() if not Spy.first_instance: Spy.first_instance = True fake_builtins() self.chain: List[Call] = [] self._returns = None self._raises = None if obj is not None: for name in dir(obj): if name == '__dict__': continue if callable(getattr(obj, name)): if name != '__class__': setattr(self, name, AttributeWrapper(name, self)) else: setattr(self, name, self.__class__) else: setattr(self, name, None) self.basic = obj self.class_ = obj.__class__ def notify(self, _call: Call): self.chain.append(_call) def __call__(self, *args, **kwargs): if self._raises is not None: raise self._raises self.chain.append(Call('', *args, **kwargs)) return self._returns def __str__(self): if self.basic is None: return f'Empty Test Spy' return f'Test spy of the "{self.basic}" {type(self.basic)}' def all_calls(self) -> List[Call]: """ Returns list of Call objects (all method calls of the spied object) :return: List[Call] """ return self.chain def was_called(self) -> bool: """ Returns True if spy object was called itself :return: bool """ return self.was_function_called('') def was_called_with_argument(self, arg: Any) -> bool: """ Returns True if spy object was called itself with exact argument :param arg: Any argument to look for :return: bool """ return self.was_function_with_argument_called('', arg) def returns(self, result: Any): """ If spy object will be called itself return result :param result: any type to return when call :return: None """ self._returns = result def raises(self, exception_object: Exception): """ Raise an exception if object will be called itself (not its methods!) :param exception_object: exception object to raise :return: None """ self._raises = exception_object def was_function_called(self, name: str) -> bool: """ Returns True if exact function/method was called on spied object :param name: name of the function/method :return: bool """ return any([e for e in self.chain if e.name == name]) def was_function_with_argument_called(self, name: str, arg: Any) -> bool: """ Returns True if exact function/method was called with exact argument on spied object :param name: name of the function/method :param arg: any argument :return: bool """ if not self.was_function_called(name): return False return any([e for e in self.chain if e.name == name and arg in e.args]) def was_exact_function_called(self, name, *args, **kwargs): call = Call(name, *args, **kwargs) return any([e for e in self.chain if e == call]) def all_calls_args(self) -> List[Tuple]: """ Returns all called function/method arguments :return: List[Tuple] """ return [e.args for e in self.chain] def all_calls_args_flatten(self) -> List[Any]: """ Returns flat list of all arguments of all called functions :return: List[Any] """ return [arg for call in self.chain for arg in call.args] class TestDouble(Spy): """ The full test-double (twin of the object), the main difference with Spy is behaviour. Behaviour stays the same as original object has, but all calls fixed and you can change return result of the methods. This class in used due to make sure in the call of respectively functions with arguments. """ def __init__(self, obj: Any = None): super().__init__() if obj is not None: for name in dir(obj): attr = getattr(obj, name) if callable(attr): if name == '__dict__': continue if name != '__class__': wrapper = AttributeWrapper(name, self) wrapper.use_function(attr) setattr(self, name, wrapper) else: setattr(self, name, self.__class__) else: setattr(self, name, attr) wrapper = AttributeWrapper('len', self) setattr(self, 'len', wrapper) wrapper = AttributeWrapper('bool', self) setattr(self, 'bool', wrapper) wrapper = AttributeWrapper('iter', self) setattr(self, 'iter', wrapper) self.basic = obj self.class_ = obj.__class__ def __str__(self): return f'Test Double of the "{self.basic}" {type(self.basic)}' def __len__(self): if self.len._return is not None or self.len._function: return self.len() self.len() return len(self.basic) def __bool__(self): if self.bool._return is not None or self.bool._function: return self.bool() self.bool() return bool(self.basic) def __iter__(self): if self.iter._return is not None or self.iter._function: return self.iter() self.iter() return iter(self.basic)
[ 1, 1053, 4240, 1144, 13, 3166, 19229, 1053, 3139, 29892, 2391, 29892, 12603, 552, 13, 13, 3166, 869, 29883, 4293, 1053, 8251, 13, 3166, 869, 1639, 8726, 1053, 4250, 2974, 13, 3166, 869, 17699, 1053, 23833, 15646, 13, 13, 13, 1753, 25713, 29918, 16145, 1144, 7295, 13, 1678, 1855, 29918, 275, 8758, 353, 4240, 1144, 29889, 275, 8758, 13, 13, 1678, 822, 25713, 29918, 275, 8758, 29898, 11228, 29901, 3139, 29892, 770, 29918, 272, 29918, 23583, 29901, 3139, 29897, 1599, 6120, 29901, 13, 4706, 565, 1855, 29918, 275, 8758, 29898, 11228, 29892, 1706, 29891, 1125, 13, 9651, 736, 2847, 29889, 1990, 29918, 1275, 770, 29918, 272, 29918, 23583, 13, 4706, 736, 1855, 29918, 275, 8758, 29898, 11228, 29892, 770, 29918, 272, 29918, 23583, 29897, 13, 13, 1678, 4240, 1144, 29889, 275, 8758, 353, 25713, 29918, 275, 8758, 13, 13, 13, 1990, 1706, 29891, 29898, 28066, 1125, 13, 1678, 9995, 13, 1678, 450, 1243, 29899, 8896, 313, 1028, 29891, 511, 607, 1634, 6048, 278, 7429, 1203, 29889, 3600, 8393, 736, 6213, 29892, 322, 278, 3519, 437, 451, 437, 13, 1678, 3099, 565, 6521, 6467, 18694, 29892, 541, 599, 310, 278, 5717, 526, 4343, 29889, 910, 770, 297, 1304, 2861, 304, 1207, 1854, 297, 13, 1678, 278, 1246, 310, 8307, 3168, 411, 6273, 29889, 13, 1678, 9995, 13, 1678, 937, 29918, 8758, 353, 7700, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 5446, 29901, 3139, 353, 6213, 1125, 13, 4706, 2428, 2141, 1649, 2344, 1649, 580, 13, 4706, 565, 451, 1706, 29891, 29889, 4102, 29918, 8758, 29901, 13, 9651, 1706, 29891, 29889, 4102, 29918, 8758, 353, 5852, 13, 9651, 25713, 29918, 16145, 1144, 580, 13, 4706, 1583, 29889, 14153, 29901, 2391, 29961, 5594, 29962, 353, 5159, 13, 4706, 1583, 3032, 18280, 353, 6213, 13, 4706, 1583, 3032, 336, 4637, 353, 6213, 13, 4706, 565, 5446, 338, 451, 6213, 29901, 13, 9651, 363, 1024, 297, 4516, 29898, 5415, 1125, 13, 18884, 565, 1024, 1275, 525, 1649, 8977, 1649, 2396, 13, 462, 1678, 6773, 13, 18884, 565, 1246, 519, 29898, 657, 5552, 29898, 5415, 29892, 1024, 22164, 13, 462, 1678, 565, 1024, 2804, 525, 1649, 1990, 1649, 2396, 13, 462, 4706, 731, 5552, 29898, 1311, 29892, 1024, 29892, 23833, 15646, 29898, 978, 29892, 1583, 876, 13, 462, 1678, 1683, 29901, 13, 462, 4706, 731, 5552, 29898, 1311, 29892, 1024, 29892, 1583, 17255, 1990, 1649, 29897, 13, 18884, 1683, 29901, 13, 462, 1678, 731, 5552, 29898, 1311, 29892, 1024, 29892, 6213, 29897, 13, 4706, 1583, 29889, 16121, 353, 5446, 13, 4706, 1583, 29889, 1990, 29918, 353, 5446, 17255, 1990, 1649, 13, 13, 1678, 822, 26051, 29898, 1311, 29892, 903, 4804, 29901, 8251, 1125, 13, 4706, 1583, 29889, 14153, 29889, 4397, 7373, 4804, 29897, 13, 13, 1678, 822, 4770, 4804, 12035, 1311, 29892, 334, 5085, 29892, 3579, 19290, 1125, 13, 4706, 565, 1583, 3032, 336, 4637, 338, 451, 6213, 29901, 13, 9651, 12020, 1583, 3032, 336, 4637, 13, 4706, 1583, 29889, 14153, 29889, 4397, 29898, 5594, 877, 742, 334, 5085, 29892, 3579, 19290, 876, 13, 4706, 736, 1583, 3032, 18280, 13, 13, 1678, 822, 4770, 710, 12035, 1311, 1125, 13, 4706, 565, 1583, 29889, 16121, 338, 6213, 29901, 13, 9651, 736, 285, 29915, 8915, 4321, 1706, 29891, 29915, 13, 4706, 736, 285, 29915, 3057, 805, 29891, 310, 278, 29850, 1311, 29889, 16121, 5038, 426, 1853, 29898, 1311, 29889, 16121, 2915, 29915, 13, 13, 1678, 822, 599, 29918, 29883, 4293, 29898, 1311, 29897, 1599, 2391, 29961, 5594, 5387, 13, 4706, 9995, 13, 4706, 16969, 1051, 310, 8251, 3618, 313, 497, 1158, 5717, 310, 278, 805, 1000, 1203, 29897, 13, 4706, 584, 2457, 29901, 2391, 29961, 5594, 29962, 13, 4706, 9995, 13, 4706, 736, 1583, 29889, 14153, 13, 13, 1678, 822, 471, 29918, 13998, 29898, 1311, 29897, 1599, 6120, 29901, 13, 4706, 9995, 13, 4706, 16969, 5852, 565, 805, 29891, 1203, 471, 2000, 3528, 13, 4706, 584, 2457, 29901, 6120, 13, 4706, 9995, 13, 4706, 736, 1583, 29889, 11102, 29918, 2220, 29918, 13998, 877, 1495, 13, 13, 1678, 822, 471, 29918, 13998, 29918, 2541, 29918, 23516, 29898, 1311, 29892, 1852, 29901, 3139, 29897, 1599, 6120, 29901, 13, 4706, 9995, 13, 4706, 16969, 5852, 565, 805, 29891, 1203, 471, 2000, 3528, 411, 2684, 2980, 13, 4706, 584, 3207, 1852, 29901, 3139, 2980, 304, 1106, 363, 13, 4706, 584, 2457, 29901, 6120, 13, 4706, 9995, 13, 4706, 736, 1583, 29889, 11102, 29918, 2220, 29918, 2541, 29918, 23516, 29918, 13998, 877, 742, 1852, 29897, 13, 13, 1678, 822, 3639, 29898, 1311, 29892, 1121, 29901, 3139, 1125, 13, 4706, 9995, 13, 4706, 960, 805, 29891, 1203, 674, 367, 2000, 3528, 736, 1121, 13, 4706, 584, 3207, 1121, 29901, 738, 1134, 304, 736, 746, 1246, 13, 4706, 584, 2457, 29901, 6213, 13, 4706, 9995, 13, 4706, 1583, 3032, 18280, 353, 1121, 13, 13, 1678, 822, 1153, 4637, 29898, 1311, 29892, 3682, 29918, 3318, 29901, 8960, 1125, 13, 4706, 9995, 13, 4706, 6981, 895, 385, 3682, 565, 1203, 674, 367, 2000, 3528, 313, 1333, 967, 3519, 14366, 13, 4706, 584, 3207, 3682, 29918, 3318, 29901, 3682, 1203, 304, 12020, 13, 4706, 584, 2457, 29901, 6213, 13, 4706, 9995, 13, 4706, 1583, 3032, 336, 4637, 353, 3682, 29918, 3318, 13, 13, 1678, 822, 471, 29918, 2220, 29918, 13998, 29898, 1311, 29892, 1024, 29901, 851, 29897, 1599, 6120, 29901, 13, 4706, 9995, 13, 4706, 16969, 5852, 565, 2684, 740, 29914, 5696, 471, 2000, 373, 805, 1000, 1203, 13, 4706, 584, 3207, 1024, 29901, 1024, 310, 278, 740, 29914, 5696, 13, 4706, 584, 2457, 29901, 6120, 13, 4706, 9995, 13, 4706, 736, 738, 4197, 29872, 363, 321, 297, 1583, 29889, 14153, 565, 321, 29889, 978, 1275, 1024, 2314, 13, 13, 1678, 822, 471, 29918, 2220, 29918, 2541, 29918, 23516, 29918, 13998, 29898, 1311, 29892, 1024, 29901, 851, 29892, 1852, 29901, 3139, 29897, 1599, 6120, 29901, 13, 4706, 9995, 13, 4706, 16969, 5852, 565, 2684, 740, 29914, 5696, 471, 2000, 411, 2684, 2980, 373, 805, 1000, 1203, 13, 4706, 584, 3207, 1024, 29901, 1024, 310, 278, 740, 29914, 5696, 13, 4706, 584, 3207, 1852, 29901, 738, 2980, 13, 4706, 584, 2457, 29901, 6120, 13, 4706, 9995, 13, 4706, 565, 451, 1583, 29889, 11102, 29918, 2220, 29918, 13998, 29898, 978, 1125, 13, 9651, 736, 7700, 13, 4706, 736, 738, 4197, 29872, 363, 321, 297, 1583, 29889, 14153, 565, 321, 29889, 978, 1275, 1024, 322, 1852, 297, 321, 29889, 5085, 2314, 13, 13, 1678, 822, 471, 29918, 735, 627, 29918, 2220, 29918, 13998, 29898, 1311, 29892, 1024, 29892, 334, 5085, 29892, 3579, 19290, 1125, 13, 4706, 1246, 353, 8251, 29898, 978, 29892, 334, 5085, 29892, 3579, 19290, 29897, 13, 4706, 736, 738, 4197, 29872, 363, 321, 297, 1583, 29889, 14153, 565, 321, 1275, 1246, 2314, 13, 13, 1678, 822, 599, 29918, 29883, 4293, 29918, 5085, 29898, 1311, 29897, 1599, 2391, 29961, 23215, 552, 5387, 13, 4706, 9995, 13, 4706, 16969, 599, 2000, 740, 29914, 5696, 6273, 13, 4706, 584, 2457, 29901, 2391, 29961, 23215, 552, 29962, 13, 4706, 9995, 13, 4706, 736, 518, 29872, 29889, 5085, 363, 321, 297, 1583, 29889, 14153, 29962, 13, 13, 1678, 822, 599, 29918, 29883, 4293, 29918, 5085, 29918, 1579, 8606, 29898, 1311, 29897, 1599, 2391, 29961, 10773, 5387, 13, 4706, 9995, 13, 4706, 16969, 12151, 1051, 310, 599, 6273, 310, 599, 2000, 3168, 13, 4706, 584, 2457, 29901, 2391, 29961, 10773, 29962, 13, 4706, 9995, 13, 4706, 736, 518, 1191, 363, 1246, 297, 1583, 29889, 14153, 363, 1852, 297, 1246, 29889, 5085, 29962, 13, 13, 13, 1990, 4321, 11843, 29898, 29903, 2272, 1125, 13, 1678, 9995, 13, 1678, 450, 2989, 1243, 29899, 8896, 313, 29873, 5080, 310, 278, 1203, 511, 278, 1667, 4328, 411, 1706, 29891, 338, 10468, 29889, 1522, 8708, 8975, 27111, 278, 1021, 13, 1678, 408, 2441, 1203, 756, 29892, 541, 599, 5717, 4343, 322, 366, 508, 1735, 736, 1121, 310, 278, 3519, 29889, 13, 1678, 910, 770, 297, 1304, 2861, 304, 1207, 1854, 297, 278, 1246, 310, 8307, 3168, 411, 6273, 29889, 13, 1678, 9995, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 5446, 29901, 3139, 353, 6213, 1125, 13, 4706, 2428, 2141, 1649, 2344, 1649, 580, 13, 4706, 565, 5446, 338, 451, 6213, 29901, 13, 9651, 363, 1024, 297, 4516, 29898, 5415, 1125, 13, 18884, 12421, 353, 679, 5552, 29898, 5415, 29892, 1024, 29897, 13, 18884, 565, 1246, 519, 29898, 5552, 1125, 13, 462, 1678, 565, 1024, 1275, 525, 1649, 8977, 1649, 2396, 13, 462, 4706, 6773, 13, 462, 1678, 565, 1024, 2804, 525, 1649, 1990, 1649, 2396, 13, 462, 4706, 14476, 353, 23833, 15646, 29898, 978, 29892, 1583, 29897, 13, 462, 4706, 14476, 29889, 1509, 29918, 2220, 29898, 5552, 29897, 13, 462, 4706, 731, 5552, 29898, 1311, 29892, 1024, 29892, 14476, 29897, 13, 462, 1678, 1683, 29901, 13, 462, 4706, 731, 5552, 29898, 1311, 29892, 1024, 29892, 1583, 17255, 1990, 1649, 29897, 13, 18884, 1683, 29901, 13, 462, 1678, 731, 5552, 29898, 1311, 29892, 1024, 29892, 12421, 29897, 13, 4706, 14476, 353, 23833, 15646, 877, 2435, 742, 1583, 29897, 13, 4706, 731, 5552, 29898, 1311, 29892, 525, 2435, 742, 14476, 29897, 13, 4706, 14476, 353, 23833, 15646, 877, 11227, 742, 1583, 29897, 13, 4706, 731, 5552, 29898, 1311, 29892, 525, 11227, 742, 14476, 29897, 13, 4706, 14476, 353, 23833, 15646, 877, 1524, 742, 1583, 29897, 13, 4706, 731, 5552, 29898, 1311, 29892, 525, 1524, 742, 14476, 29897, 13, 4706, 1583, 29889, 16121, 353, 5446, 13, 4706, 1583, 29889, 1990, 29918, 353, 5446, 17255, 1990, 1649, 13, 13, 1678, 822, 4770, 710, 12035, 1311, 1125, 13, 4706, 736, 285, 29915, 3057, 11599, 310, 278, 29850, 1311, 29889, 16121, 5038, 426, 1853, 29898, 1311, 29889, 16121, 2915, 29915, 13, 13, 1678, 822, 4770, 2435, 12035, 1311, 1125, 13, 4706, 565, 1583, 29889, 2435, 3032, 2457, 338, 451, 6213, 470, 1583, 29889, 2435, 3032, 2220, 29901, 13, 9651, 736, 1583, 29889, 2435, 580, 13, 4706, 1583, 29889, 2435, 580, 13, 4706, 736, 7431, 29898, 1311, 29889, 16121, 29897, 13, 13, 1678, 822, 4770, 11227, 12035, 1311, 1125, 13, 4706, 565, 1583, 29889, 11227, 3032, 2457, 338, 451, 6213, 470, 1583, 29889, 11227, 3032, 2220, 29901, 13, 9651, 736, 1583, 29889, 11227, 580, 13, 4706, 1583, 29889, 11227, 580, 13, 4706, 736, 6120, 29898, 1311, 29889, 16121, 29897, 13, 13, 1678, 822, 4770, 1524, 12035, 1311, 1125, 13, 4706, 565, 1583, 29889, 1524, 3032, 2457, 338, 451, 6213, 470, 1583, 29889, 1524, 3032, 2220, 29901, 13, 9651, 736, 1583, 29889, 1524, 580, 13, 4706, 1583, 29889, 1524, 580, 13, 4706, 736, 4256, 29898, 1311, 29889, 16121, 29897, 13, 2 ]
bob/bio/base/test/dummy/preprocessor.py
bioidiap/bob.bio.base
16
138809
<gh_stars>10-100 from bob.bio.base.preprocessor import Preprocessor from bob.bio.base.database import BioFile import numpy numpy.random.seed(10) class DummyPreprocessor (Preprocessor): def __init__(self, return_none=False, probability_of_none=1, **kwargs): Preprocessor.__init__(self) self.return_none = return_none self.probability_of_none = probability_of_none def __call__(self, data, annotation): """Does nothing, simply converts the data type of the data, ignoring any annotation.""" if self.return_none: return numpy.random.choice([None, data], p=[self.probability_of_none, 1-self.probability_of_none]) return data preprocessor = DummyPreprocessor() class DummyPreprocessorMetadata (DummyPreprocessor): def __call__(self, data, annotation, metadata=None): """Does nothing, simply converts the data type of the data, ignoring any annotation.""" assert isinstance(metadata, BioFile) return super(DummyPreprocessorMetadata, self).__call__(data, annotation) preprocessor_metadata = DummyPreprocessorMetadata()
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29900, 29899, 29896, 29900, 29900, 13, 3166, 289, 711, 29889, 24840, 29889, 3188, 29889, 1457, 26482, 1053, 4721, 26482, 13, 3166, 289, 711, 29889, 24840, 29889, 3188, 29889, 9803, 1053, 21184, 2283, 13, 5215, 12655, 13, 23749, 29889, 8172, 29889, 26776, 29898, 29896, 29900, 29897, 13, 13, 13, 1990, 360, 11770, 6572, 26482, 313, 6572, 26482, 1125, 13, 29871, 822, 4770, 2344, 12035, 1311, 29892, 736, 29918, 9290, 29922, 8824, 29892, 6976, 29918, 974, 29918, 9290, 29922, 29896, 29892, 3579, 19290, 1125, 13, 1678, 4721, 26482, 17255, 2344, 12035, 1311, 29897, 13, 1678, 1583, 29889, 2457, 29918, 9290, 353, 736, 29918, 9290, 13, 1678, 1583, 29889, 22795, 3097, 29918, 974, 29918, 9290, 353, 6976, 29918, 974, 29918, 9290, 13, 13, 29871, 822, 4770, 4804, 12035, 1311, 29892, 848, 29892, 17195, 1125, 13, 1678, 9995, 25125, 3078, 29892, 3763, 29436, 278, 848, 1134, 310, 278, 848, 29892, 5330, 8253, 738, 17195, 1213, 15945, 13, 1678, 565, 1583, 29889, 2457, 29918, 9290, 29901, 13, 418, 736, 12655, 29889, 8172, 29889, 16957, 4197, 8516, 29892, 848, 1402, 282, 11759, 1311, 29889, 22795, 3097, 29918, 974, 29918, 9290, 29892, 29871, 29896, 29899, 1311, 29889, 22795, 3097, 29918, 974, 29918, 9290, 2314, 13, 539, 13, 1678, 736, 848, 13, 13, 1457, 26482, 353, 360, 11770, 6572, 26482, 580, 13, 13, 13, 1990, 360, 11770, 6572, 26482, 18417, 313, 29928, 11770, 6572, 26482, 1125, 13, 13, 29871, 822, 4770, 4804, 12035, 1311, 29892, 848, 29892, 17195, 29892, 15562, 29922, 8516, 1125, 13, 1678, 9995, 25125, 3078, 29892, 3763, 29436, 278, 848, 1134, 310, 278, 848, 29892, 5330, 8253, 738, 17195, 1213, 15945, 13, 1678, 4974, 338, 8758, 29898, 19635, 29892, 21184, 2283, 29897, 13, 1678, 736, 2428, 29898, 29928, 11770, 6572, 26482, 18417, 29892, 1583, 467, 1649, 4804, 12035, 1272, 29892, 17195, 29897, 13, 13, 1457, 26482, 29918, 19635, 353, 360, 11770, 6572, 26482, 18417, 580, 13, 2 ]
docs/modeling/code/timingExample.py
pramodsu/ILA-Tools
1
83874
<reponame>pramodsu/ILA-Tools Accelerator = ila.Abstraction('ExampleILA') # Define the Abstraction # Define the Interface write_grant = Accelerator.inp('write_grant', 1) # - request grant write_data = Accelerator.reg('write_data' , 32) # - data port write_length= Accelerator.reg('write_len' , 16) # - burst length ... # - possibly more ports writing = Accelerator.reg('writing' , 1) # 1 bit flag indicating if # it is writing to the bus Accerlator.decode_exprs += [ write_grant == 1 ] # The grant operation is considered as an instruction to the accelerator writing_nxt = ila.ite( write_grant == 1, # The effect of the instruction above b1, # This is the complete function writing ) # without holes. However, you can # use synthesis to create this # function #Note: b0 = ila.const(0,1) (1-bit-wide constant 0) #and b1 = ila.const(1,1) (1-bit-wide constant 1) Accelerator.set_next('writing', writing_nxt ) write_fsm = Accelerator.add_microabstraction('WriteFsm', writing == 1 ) # Bus Write logic. counter = write_fsm.reg('counter', 32) # The counter here is used # to count cycles write_fsm.set_init('counter', h0_16 ) # b0_16 = ila.const(0,16) write_fsm.set_next('counter', counter + 1) write_fsm.set_next('writing', ila.ite(counter == write_length-1, b0, writing) ) # turn the flag off, # when necessary write_fsm.set_next('write_data', ?? ) # write some values # each cycle
[ 1, 529, 276, 1112, 420, 29958, 558, 314, 397, 2146, 29914, 29902, 4375, 29899, 24183, 13, 7504, 7367, 1061, 353, 980, 29874, 29889, 4920, 4151, 428, 877, 14023, 29902, 4375, 1495, 308, 396, 22402, 278, 1976, 4151, 428, 13, 462, 462, 462, 1678, 396, 22402, 278, 25796, 13, 3539, 29918, 629, 424, 353, 4831, 7367, 1061, 29889, 262, 29886, 877, 3539, 29918, 629, 424, 742, 259, 29896, 29897, 1678, 396, 259, 448, 2009, 16690, 13, 3539, 29918, 1272, 29871, 353, 4831, 7367, 1061, 29889, 1727, 877, 3539, 29918, 1272, 29915, 1919, 29871, 29941, 29906, 29897, 1678, 396, 259, 448, 848, 2011, 13, 3539, 29918, 2848, 29922, 4831, 7367, 1061, 29889, 1727, 877, 3539, 29918, 2435, 29915, 29871, 1919, 29871, 29896, 29953, 29897, 1678, 396, 259, 448, 20887, 3309, 13, 856, 462, 462, 462, 396, 259, 448, 10075, 901, 16169, 13, 16554, 268, 353, 4831, 7367, 1061, 29889, 1727, 877, 16554, 29915, 1678, 1919, 259, 29896, 29897, 1678, 396, 29871, 29896, 2586, 7353, 23941, 565, 259, 13, 462, 462, 462, 1678, 396, 372, 338, 5007, 304, 278, 3593, 13, 7504, 261, 29880, 1061, 29889, 13808, 29918, 13338, 29879, 4619, 518, 2436, 29918, 629, 424, 1275, 29871, 29896, 4514, 418, 13, 29937, 450, 16690, 5858, 338, 5545, 408, 385, 15278, 304, 278, 15592, 1061, 13, 13, 16554, 29918, 29876, 486, 353, 980, 29874, 29889, 568, 29898, 2436, 29918, 629, 424, 1275, 29871, 29896, 29892, 29871, 396, 450, 2779, 310, 278, 15278, 2038, 13, 18884, 289, 29896, 29892, 462, 539, 396, 910, 338, 278, 4866, 740, 29871, 13, 18884, 5007, 1723, 462, 396, 1728, 26532, 29889, 2398, 29892, 366, 508, 29871, 13, 462, 462, 3986, 396, 671, 14710, 6656, 304, 1653, 445, 13, 462, 462, 3986, 396, 740, 13, 29937, 9842, 29901, 289, 29900, 353, 980, 29874, 29889, 3075, 29898, 29900, 29892, 29896, 29897, 313, 29896, 29899, 2966, 29899, 8157, 4868, 29871, 29900, 29897, 13, 29937, 392, 259, 289, 29896, 353, 980, 29874, 29889, 3075, 29898, 29896, 29892, 29896, 29897, 313, 29896, 29899, 2966, 29899, 8157, 4868, 29871, 29896, 29897, 13, 13, 7504, 7367, 1061, 29889, 842, 29918, 4622, 877, 16554, 742, 5007, 29918, 29876, 486, 1723, 13, 13, 3539, 29918, 29888, 3844, 259, 353, 4831, 7367, 1061, 29889, 1202, 29918, 29885, 2357, 370, 4151, 428, 877, 6113, 29943, 3844, 742, 5007, 1275, 29871, 29896, 1723, 259, 13, 29937, 8406, 14350, 5900, 29889, 13, 11808, 268, 353, 2436, 29918, 29888, 3844, 29889, 1727, 877, 11808, 742, 29871, 29941, 29906, 29897, 396, 450, 6795, 1244, 338, 1304, 29871, 13, 462, 462, 965, 396, 304, 2302, 25785, 13, 3539, 29918, 29888, 3844, 29889, 842, 29918, 2344, 877, 11808, 742, 298, 29900, 29918, 29896, 29953, 1723, 418, 396, 289, 29900, 29918, 29896, 29953, 353, 980, 29874, 29889, 3075, 29898, 29900, 29892, 29896, 29953, 29897, 13, 3539, 29918, 29888, 3844, 29889, 842, 29918, 4622, 877, 11808, 742, 6795, 718, 29871, 29896, 29897, 13, 3539, 29918, 29888, 3844, 29889, 842, 29918, 4622, 877, 16554, 742, 29871, 13, 4706, 980, 29874, 29889, 568, 29898, 11808, 1275, 2436, 29918, 2848, 29899, 29896, 29892, 289, 29900, 29892, 5007, 29897, 1723, 29871, 396, 2507, 278, 7353, 1283, 29892, 13, 462, 462, 462, 965, 396, 746, 5181, 13, 3539, 29918, 29888, 3844, 29889, 842, 29918, 4622, 877, 3539, 29918, 1272, 742, 13626, 1723, 462, 418, 396, 2436, 777, 1819, 29871, 13, 462, 462, 462, 965, 396, 1269, 11412, 13, 13, 13, 13, 2 ]
Auditor.py
bryanabsmith/Auditor
0
97871
#!/usr/bin/python import ipgetter import os import platform import subprocess import time import wx # TODO Clean up the code. # Licenced under the MIT Licence. See LICENCE for more details. class Auditor(wx.Frame): def __init__(self, parent, title): self.audit = "" self.version = "0.1 (b2)" self.serial = True self.run_allChecked = False self.wildcardSave = "Text document (*.txt)|*.txt" # http://zetcode.com/wxpython/layout/ super(Auditor, self).__init__(parent, title=title, size=(350, 300), style=wx.MINIMIZE_BOX | wx.CLOSE_BOX) self.panelMain = wx.Panel(self) self.vBoxMain = wx.BoxSizer(wx.VERTICAL) self.labelSelect = wx.StaticText(self.panelMain, label="Select the information that you'd like collected:") self.vBoxOptions = wx.BoxSizer(wx.VERTICAL) self.checkBoxOpen = wx.CheckBox(self.panelMain, label="Open report when done") self.checkBoxForumOptimized = wx.CheckBox(self.panelMain, label="Optimize for forums (BBCode)") self.buttonrun_all = wx.Button(self.panelMain, label="All", size=(120, 30)) self.buttonrun_selected = wx.Button(self.panelMain, label="Selected", size=(120, 30)) self.checkListBoxAudits = wx.CheckListBox(self.panelMain, -1, choices=["Basic", "Networking", "Platform", "Power", "Usage"]) self.hBoxButtons = wx.BoxSizer(wx.HORIZONTAL) self.sbOptions = wx.StaticBox(self.panelMain, label="Options") self.sbOptionsBox = wx.StaticBoxSizer(self.sbOptions, wx.VERTICAL) self.menuBarMain = wx.MenuBar() self.menuRun = wx.Menu() self.menuTemplates = wx.Menu() self.menuHelp = wx.Menu() self.dialogSave = wx.FileDialog(None, message="Save report as ...", defaultDir=os.path.expanduser("~") + "/Desktop/", defaultFile="", wildcard=self.wildcardSave, style=wx.SAVE) self.init_ui() self.Centre() self.Show() def init_ui(self): self.vBoxMain.Add(self.labelSelect, proportion=0, flag=wx.LEFT | wx.TOP, border=10) self.vBoxMain.Add(self.checkListBoxAudits, proportion=1, flag=wx.LEFT | wx.RIGHT | wx.TOP | wx.EXPAND, border=10) self.sbOptionsBox.Add(self.checkBoxForumOptimized, proportion=0, flag=wx.LEFT) self.sbOptionsBox.Add(self.checkBoxOpen, proportion=0, flag=wx.LEFT) self.vBoxMain.Add(self.sbOptionsBox, proportion=0, flag=wx.LEFT | wx.RIGHT | wx.TOP | wx.EXPAND, border=10) self.hBoxButtons = wx.BoxSizer(wx.HORIZONTAL) self.hBoxButtons.Add(self.buttonrun_selected, proportion=0, flag=wx.RIGHT, border=10) self.hBoxButtons.Add(self.buttonrun_all, proportion=0, flag=wx.RIGHT, border=10) self.vBoxMain.Add(self.hBoxButtons, flag=wx.ALIGN_RIGHT | wx.BOTTOM, border=10) self.panelMain.SetSizer(self.vBoxMain) self.menuRun.Append(101, "Run all...\tCtrl-A") self.menuRun.Append(102, "Run selected...\tCtrl-S") self.menuTemplates.Append(201, "Mac-Forums essentials\tCtrl-M") self.menuHelp.Append(wx.ID_ABOUT, "&About Auditor") self.menuHelp.Append(301, "About data collected...\tCtrl-H") self.menuBarMain.Append(self.menuRun, "&Run") self.menuBarMain.Append(self.menuTemplates, "&Templates") self.menuBarMain.Append(self.menuHelp, "&Help") self.SetMenuBar(self.menuBarMain) self.Bind(wx.EVT_MENU, self.about_menu_click, id=wx.ID_ABOUT) self.Bind(wx.EVT_MENU, self.run_all, id=101) self.Bind(wx.EVT_MENU, self.run_selected, id=102) self.Bind(wx.EVT_MENU, self.template_mfessentials, id=201) self.Bind(wx.EVT_MENU, self.show_help, id=301) self.Bind(wx.EVT_BUTTON, self.run_all, self.buttonrun_all) self.Bind(wx.EVT_BUTTON, self.run_selected, self.buttonrun_selected) def template_mfessentials(self, event): self.checkListBoxAudits.SetCheckedStrings(["Basic", "Platform", "Usage"]) self.checkBoxForumOptimized.SetValue(True) self.serial = False def show_help(self, event): message = """ Here is a list of all the pieces of information collected: - Basic: - OS X Version - OS X Build - Processor Info - Memory Info - Model Name - Model ID - Serial number - Platform Info - Platform - Node - Release - Version - Machine - Processor - Usage - Memory Usage: Used Memory, Wired Memory, Unused Memory - Hard Disk Usage, Mounted at /: Total Space, Used Space, Available Space - Networking - SSID - Link Auth - IP Addresses: en0, en1 - External IP - External Host - Ethernet DNS - Wi-Fi DNS - Power - Battery Cycle Count - Battery Condition """ dlg = wx.MessageDialog(self.panelMain, message, "Output", wx.OK | wx.ICON_INFORMATION) dlg.ShowModal() dlg.Destroy() def run_all_or_not(self, event): if self.checkBoxAll.GetValue(): self.run_allChecked = True self.checkListBoxAudits.Disable() else: self.run_allChecked = False self.checkListBoxAudits.Enable() def about_menu_click(self, event): about_options = wx.AboutDialogInfo() about_options.SetName("Auditor") about_options.SetVersion(self.version) about_options.SetCopyright("(c) 2015 <NAME>.\n\nIcon courtesy of the Tango Project.\n\nExternal IP library, ipgetter, licenced under the DWTFYWT licence (http://www.wtfpl.net/)") aboutBox = wx.AboutBox(about_options) print(aboutBox) def button_run_audit_click(self, event): check = self.checkListBoxAudits.GetCheckedStrings() if self.run_allChecked == False and len(check) == 0: dialogNoChecks = wx.MessageDialog(self, "No options selected.", "Auditor", wx.OK | wx.ICON_NONE) # | wx.ICON_INFORMATION dialogNoChecks.ShowModal() dialogNoChecks.Destroy() else: if self.run_allChecked: self.run_all() else: self.run_selected() def run_all(self, event): if self.checkBoxForumOptimized.GetValue() == True: self.audit = "[code]\nAuditor Report\n" else: self.audit = "Auditor Report\n" # http://www.cyberciti.biz/faq/howto-get-current-date-time-in-python/ self.audit += time.strftime("%d/%m/%Y, %H:%M:%S") progValue = 1 # java2s.com/Tutorial/Python/0380__wxPython/Aprogressbox.htm dialog = wx.ProgressDialog("Collection Progress", "Starting...", 5, style=wx.PD_CAN_ABORT | wx.PD_AUTO_HIDE | wx.PD_SMOOTH) dialog.Pulse() self.get_basic() dialog.Update(progValue, "Getting basic information...") progValue += 1 self.get_platform() dialog.Update(progValue, "Getting platform information...") progValue += 1 self.get_usage() dialog.Update(progValue, "Getting usage information...") progValue += 1 self.get_networking() dialog.Update(progValue, "Getting networking information...") progValue += 1 self.get_power() dialog.Update(progValue, "Getting power information...") if self.checkBoxForumOptimized.GetValue(): self.audit += "\n[/code]" path = "" self.dialogSave.SetFilename("Auditor-" + time.strftime("%d-%m-%Y-at-%H-%M-%S")) if self.dialogSave.ShowModal() == wx.ID_OK: path = self.dialogSave.GetPath() output = open(path, "w") output.write(self.audit) output.close() if self.checkBoxOpen.GetValue(): subprocess.Popen(('open', path), stdout=subprocess.PIPE) self.checkListBoxAudits.Enable() self.serial = True def run_selected(self, event): check = self.checkListBoxAudits.GetCheckedStrings() checkLen = len(check) progValue = 1 if checkLen == 0: dlg = wx.MessageDialog(self.panelMain, "Please select some options or run all audits.", "Error", wx.OK | wx.ICON_ERROR) dlg.ShowModal() dlg.Destroy() return 0 if self.checkBoxForumOptimized.GetValue() == True: self.audit = "[code]\nAuditor Report\n" else: self.audit = "Auditor Report\n" # http://www.cyberciti.biz/faq/howto-get-current-date-time-in-python/ self.audit += time.strftime("%d/%m/%Y, %H:%M:%S") dialog = wx.ProgressDialog("Collection Progress", "Starting...", checkLen, style=wx.PD_CAN_ABORT | wx.PD_AUTO_HIDE | wx.PD_SMOOTH) dialog.Pulse() for x in check: if x == "Basic": self.get_basic() dialog.Update(progValue, "Getting basic information...") progValue += 1 elif x == "Platform": self.get_platform() dialog.Update(progValue, "Getting platform information...") progValue += 1 elif x == "Usage": self.get_usage() dialog.Update(progValue, "Getting usage information...") progValue += 1 elif x == "Networking": self.get_networking() dialog.Update(progValue, "Getting networking information...") progValue += 1 elif x == "Power": self.get_power() dialog.Update(progValue, "Getting power information...") progValue += 1 if self.checkBoxForumOptimized.GetValue() == True: self.audit += "\n[/code]" dialog.Destroy() path = "" self.dialogSave.SetFilename("Auditor-" + time.strftime("%d-%m-%Y-at-%H-%M-%S")) if self.dialogSave.ShowModal() == wx.ID_OK: path = self.dialogSave.GetPath() output = open(path, "w") output.write(self.audit) output.close() if self.checkBoxOpen.GetValue(): subprocess.Popen(('open', path), stdout=subprocess.PIPE) self.checkListBoxAudits.Enable() self.serial = True def get_basic(self): self.audit += "\n\n:: Basic Info ::\n" # http://stackoverflow.com/a/13332300 sysctlProc = subprocess.Popen(('sysctl', '-a'), stdout=subprocess.PIPE) sysctlProcPipe = subprocess.check_output(('grep', 'machdep.cpu.brand_string'), stdin=sysctlProc.stdout) sysctlMem = subprocess.Popen(('sysctl', '-a'), stdout=subprocess.PIPE) sysctlMemPipe = subprocess.check_output(('grep', 'hw.memsize'), stdin=sysctlMem.stdout) self.audit += " OS X Version: " + subprocess.check_output(["sw_vers", "-productVersion"]) self.audit += " OS X Build: " + subprocess.check_output(["sw_vers", "-buildVersion"]) self.audit += " Processor Info: " + sysctlProcPipe[26:] memMB = (int(sysctlMemPipe[12:]) / 1024) / 1024 memGB = ((int(sysctlMemPipe[12:]) / 1024) / 1024) / 1024 self.audit += " Memory Info: " + str(memGB) + "GB (" + str(memMB) + "MB)" self.audit += "\n Model Name: " modelName = subprocess.Popen(('system_profiler', 'SPHardwareDataType'), stdout=subprocess.PIPE) modelNamePipe = subprocess.check_output(('grep', 'Model Name'), stdin=modelName.stdout) for x in modelNamePipe.split(): if x == "Model" or x == "Name:": pass else: self.audit += x + " " modelID = subprocess.Popen(('system_profiler', 'SPHardwareDataType'), stdout=subprocess.PIPE) modelIDPipe = subprocess.check_output(('grep', 'Identifier'), stdin=modelID.stdout) self.audit += "\n Model ID: " + modelIDPipe.split()[2] if self.serial == True: serialNumber = subprocess.Popen(('system_profiler', 'SPHardwareDataType'), stdout=subprocess.PIPE) serialNumberPipe = subprocess.check_output(('grep', 'Serial'), stdin=serialNumber.stdout) self.audit += "\n Serial number: " + serialNumberPipe.split()[3] # Model name - http://apple.stackexchange.com/a/98089 (curl http://support-sp.apple.com/sp/product?cc=DTY3) def get_power(self): self.audit += "\n\n:: Power Info ::\n" try: cycleCount = subprocess.Popen(('system_profiler', 'SPPowerDataType'), stdout=subprocess.PIPE) cycleCountPipe = subprocess.check_output(('grep', 'Cycle Count'), stdin=cycleCount.stdout) self.audit += " Battery Cycle Count: " + cycleCountPipe.split()[2] except: self.audit += " Battery Cycle Count: N/A" try: condition = subprocess.Popen(('system_profiler', 'SPPowerDataType'), stdout=subprocess.PIPE) conditionPipe = subprocess.check_output(('grep', 'Condition'), stdin=condition.stdout) self.audit += "\n Battery Condition: " + conditionPipe.split()[1] except: self.audit += "\n Battery Condition: N/A" def get_platform(self): self.audit += "\n\n:: Platform Info ::\n" # http://pymotw.com/2/platform/ self.audit += " Platform: " + platform.system() self.audit += "\n Node: " + platform.node() self.audit += "\n Release: " + platform.release() self.audit += "\n Version: " + platform.version() self.audit += "\n Machine: " + platform.machine() self.audit += "\n Processor: " + platform.processor() def get_usage(self): self.audit += "\n\n:: Usage Info ::\n" # http://stackoverflow.com/questions/21162721/how-to-get-physical-memory-from-top-l1-using-awk-in-os-x-mavericks - physical memory usedMem = subprocess.Popen(('top', '-l1'), stdout=subprocess.PIPE) usedMemPipe = subprocess.check_output(('grep', 'PhysMem'), stdin=usedMem.stdout) usedMemUsed = usedMemPipe.split()[1] usedMemWired = usedMemPipe.split()[3] usedMemUnused = usedMemPipe.split()[5] self.audit += " Memory Usage:\n Used Memory: " + usedMemUsed + "\n Wired Memory: " + usedMemWired.replace( "(", "") + "\n Unused Memory: " + usedMemUnused diskSpace = subprocess.Popen(["df", "-H", "/"], stdout=subprocess.PIPE) diskSpaceInfo = diskSpace.communicate()[0] totalSpace = diskSpaceInfo.split()[11] usedSpace = diskSpaceInfo.split()[12] availableSpace = diskSpaceInfo.split()[13] self.audit += "\n Hard Disk Usage, Mounted at /:\n Total Space: " + totalSpace + "\n Used Space: " + usedSpace + "\n Available Space: " + availableSpace def get_networking(self): # Timing: # - 0.1b1: 23s # - 0.1b2: self.audit += "\n\n:: Networking Info ::\n" try: # /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I | grep SSID ssid = subprocess.Popen( ('/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport', '-I'), stdout=subprocess.PIPE) ssidPipe = subprocess.check_output(('grep', 'SSID'), stdin=ssid.stdout) self.audit += " SSID: " + ssidPipe.split()[3] except subprocess.CalledProcessError: self.audit += " SSID: N/A" # try: # linkAuth = subprocess.Popen(('/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport', '-I'), stdout=subprocess.PIPE) # linkAuthPipe = subprocess.check_output(('grep', 'link'), stdin=linkAuth.stdout) # self.audit += "\n Link Auth: " + linkAuthPipe.split()[2] # except subprocess.CalledProcessError: # self.audit += "\n Link Auth: N/A" ipEN0 = subprocess.Popen(["ipconfig", "getifaddr", "en0"], stdout=subprocess.PIPE) ipEN0Value = ipEN0.communicate()[0].strip("\n") if ipEN0Value == "": self.audit += "\n IP Addresses:\n en0: N/A" else: self.audit += "\n IP Addresses:\n en0: " + ipEN0Value print(ipEN0Value) ipEN1 = subprocess.Popen(["ipconfig", "getifaddr", "en1"], stdout=subprocess.PIPE) ipEN1Value = ipEN1.communicate()[0].strip("\n") if ipEN1Value == "": self.audit += "\n en1: N/A" else: self.audit += "\n en1: " + ipEN1Value print(ipEN1Value) # extIP = subprocess.Popen(["curl", "ifconfig.me"], stdout=subprocess.PIPE) extIP = ipgetter.myip() self.audit += "\n External IP: " + extIP # extHost = subprocess.Popen(["curl", "ifconfig.me/host"], stdout=subprocess.PIPE) # self.audit += " External Host: " + extHost.communicate()[0] ethernetDNS = subprocess.Popen(["networksetup", "-getdnsservers", "Ethernet"], stdout=subprocess.PIPE) self.audit += "\n Ethernet DNS: " + ethernetDNS.communicate()[0].replace("\n", " ") wifiDNS = subprocess.Popen(["networksetup", "-getdnsservers", "Wi-Fi"], stdout=subprocess.PIPE) self.audit += "\n Wi-Fi DNS: " + wifiDNS.communicate()[0].replace("\n", " ") if __name__ == "__main__": app = wx.App() Auditor(None, title="Auditor") app.MainLoop()
[ 1, 18787, 4855, 29914, 2109, 29914, 4691, 13, 13, 5215, 10377, 657, 357, 13, 5215, 2897, 13, 5215, 7481, 13, 5215, 1014, 5014, 13, 5215, 931, 13, 5215, 26437, 13, 13, 29937, 14402, 315, 14044, 701, 278, 775, 29889, 13, 13, 13, 29937, 10413, 9223, 1090, 278, 341, 1806, 10413, 663, 29889, 2823, 365, 2965, 1430, 4741, 363, 901, 4902, 29889, 13, 13, 1990, 8612, 2105, 29898, 23310, 29889, 4308, 1125, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 3847, 29892, 3611, 1125, 13, 13, 4706, 1583, 29889, 15052, 277, 353, 5124, 13, 4706, 1583, 29889, 3259, 353, 376, 29900, 29889, 29896, 313, 29890, 29906, 5513, 13, 13, 4706, 1583, 29889, 15550, 353, 5852, 13, 13, 4706, 1583, 29889, 3389, 29918, 497, 17817, 353, 7700, 13, 4706, 1583, 29889, 29893, 789, 7543, 11371, 353, 376, 1626, 1842, 3070, 29889, 3945, 10531, 10521, 3945, 29908, 13, 13, 4706, 396, 1732, 597, 4975, 401, 29889, 510, 29914, 23310, 4691, 29914, 2680, 29914, 13, 4706, 2428, 29898, 29909, 566, 2105, 29892, 1583, 467, 1649, 2344, 12035, 3560, 29892, 3611, 29922, 3257, 29892, 2159, 7607, 29941, 29945, 29900, 29892, 29871, 29941, 29900, 29900, 511, 3114, 29922, 23310, 29889, 16173, 7833, 29902, 10721, 29918, 8456, 29990, 891, 26437, 29889, 29907, 3927, 1660, 29918, 8456, 29990, 29897, 13, 13, 4706, 1583, 29889, 15119, 6330, 353, 26437, 29889, 7490, 29898, 1311, 29897, 13, 4706, 1583, 29889, 29894, 3313, 6330, 353, 26437, 29889, 3313, 29903, 3950, 29898, 23310, 29889, 5348, 29911, 2965, 1964, 29897, 13, 4706, 1583, 29889, 1643, 3549, 353, 26437, 29889, 17046, 1626, 29898, 1311, 29889, 15119, 6330, 29892, 3858, 543, 3549, 278, 2472, 393, 366, 29915, 29881, 763, 16531, 29901, 1159, 13, 4706, 1583, 29889, 29894, 3313, 5856, 353, 26437, 29889, 3313, 29903, 3950, 29898, 23310, 29889, 5348, 29911, 2965, 1964, 29897, 13, 4706, 1583, 29889, 3198, 3313, 6585, 353, 26437, 29889, 28360, 29898, 1311, 29889, 15119, 6330, 29892, 3858, 543, 6585, 3461, 746, 2309, 1159, 13, 4706, 1583, 29889, 3198, 3313, 2831, 398, 20624, 326, 1891, 353, 26437, 29889, 28360, 29898, 1311, 29889, 15119, 6330, 29892, 3858, 543, 20624, 326, 675, 363, 363, 6762, 313, 14388, 3399, 25760, 13, 4706, 1583, 29889, 3092, 3389, 29918, 497, 353, 26437, 29889, 3125, 29898, 1311, 29889, 15119, 6330, 29892, 3858, 543, 3596, 613, 2159, 7607, 29896, 29906, 29900, 29892, 29871, 29941, 29900, 876, 13, 4706, 1583, 29889, 3092, 3389, 29918, 8391, 353, 26437, 29889, 3125, 29898, 1311, 29889, 15119, 6330, 29892, 3858, 543, 8592, 613, 2159, 7607, 29896, 29906, 29900, 29892, 29871, 29941, 29900, 876, 13, 4706, 1583, 29889, 3198, 1293, 3313, 29909, 566, 1169, 353, 26437, 29889, 5596, 1293, 3313, 29898, 1311, 29889, 15119, 6330, 29892, 448, 29896, 29892, 13, 462, 462, 462, 29871, 19995, 29922, 3366, 16616, 613, 376, 13724, 292, 613, 376, 21889, 613, 376, 21472, 613, 376, 27573, 20068, 13, 4706, 1583, 29889, 29882, 3313, 29819, 787, 353, 26437, 29889, 3313, 29903, 3950, 29898, 23310, 29889, 29950, 1955, 26664, 1164, 29911, 1964, 29897, 13, 13, 4706, 1583, 29889, 20778, 5856, 353, 26437, 29889, 17046, 3313, 29898, 1311, 29889, 15119, 6330, 29892, 3858, 543, 5856, 1159, 13, 4706, 1583, 29889, 20778, 5856, 3313, 353, 26437, 29889, 17046, 3313, 29903, 3950, 29898, 1311, 29889, 20778, 5856, 29892, 26437, 29889, 5348, 29911, 2965, 1964, 29897, 13, 13, 4706, 1583, 29889, 6510, 4297, 6330, 353, 26437, 29889, 6823, 4297, 580, 13, 4706, 1583, 29889, 6510, 6558, 353, 26437, 29889, 6823, 580, 13, 4706, 1583, 29889, 6510, 5776, 9884, 353, 26437, 29889, 6823, 580, 13, 4706, 1583, 29889, 6510, 29648, 353, 26437, 29889, 6823, 580, 13, 4706, 1583, 29889, 15901, 11371, 353, 26437, 29889, 2283, 7647, 29898, 8516, 29892, 2643, 543, 11371, 3461, 408, 2023, 613, 13, 462, 462, 4706, 2322, 9170, 29922, 359, 29889, 2084, 29889, 18837, 1792, 703, 30022, 1159, 718, 5591, 17600, 29914, 613, 2322, 2283, 543, 613, 13, 462, 462, 4706, 8775, 7543, 29922, 1311, 29889, 29893, 789, 7543, 11371, 29892, 3114, 29922, 23310, 29889, 29903, 7520, 29923, 29897, 13, 13, 4706, 1583, 29889, 2344, 29918, 1481, 580, 13, 4706, 1583, 29889, 29907, 14056, 580, 13, 4706, 1583, 29889, 8964, 580, 13, 13, 1678, 822, 2069, 29918, 1481, 29898, 1311, 1125, 13, 4706, 1583, 29889, 29894, 3313, 6330, 29889, 2528, 29898, 1311, 29889, 1643, 3549, 29892, 18618, 29922, 29900, 29892, 7353, 29922, 23310, 29889, 28024, 891, 26437, 29889, 29911, 4590, 29892, 5139, 29922, 29896, 29900, 29897, 13, 13, 4706, 1583, 29889, 29894, 3313, 6330, 29889, 2528, 29898, 1311, 29889, 3198, 1293, 3313, 29909, 566, 1169, 29892, 18618, 29922, 29896, 29892, 7353, 29922, 23310, 29889, 28024, 891, 26437, 29889, 22789, 3912, 891, 26437, 29889, 29911, 4590, 891, 26437, 29889, 5746, 29925, 9468, 29892, 13, 462, 3986, 5139, 29922, 29896, 29900, 29897, 13, 4706, 1583, 29889, 20778, 5856, 3313, 29889, 2528, 29898, 1311, 29889, 3198, 3313, 2831, 398, 20624, 326, 1891, 29892, 18618, 29922, 29900, 29892, 7353, 29922, 23310, 29889, 28024, 29897, 13, 4706, 1583, 29889, 20778, 5856, 3313, 29889, 2528, 29898, 1311, 29889, 3198, 3313, 6585, 29892, 18618, 29922, 29900, 29892, 7353, 29922, 23310, 29889, 28024, 29897, 13, 4706, 1583, 29889, 29894, 3313, 6330, 29889, 2528, 29898, 1311, 29889, 20778, 5856, 3313, 29892, 18618, 29922, 29900, 29892, 7353, 29922, 23310, 29889, 28024, 891, 26437, 29889, 22789, 3912, 891, 26437, 29889, 29911, 4590, 891, 26437, 29889, 5746, 29925, 9468, 29892, 5139, 29922, 29896, 29900, 29897, 13, 13, 4706, 1583, 29889, 29882, 3313, 29819, 787, 353, 26437, 29889, 3313, 29903, 3950, 29898, 23310, 29889, 29950, 1955, 26664, 1164, 29911, 1964, 29897, 13, 4706, 1583, 29889, 29882, 3313, 29819, 787, 29889, 2528, 29898, 1311, 29889, 3092, 3389, 29918, 8391, 29892, 18618, 29922, 29900, 29892, 7353, 29922, 23310, 29889, 22789, 3912, 29892, 5139, 29922, 29896, 29900, 29897, 13, 4706, 1583, 29889, 29882, 3313, 29819, 787, 29889, 2528, 29898, 1311, 29889, 3092, 3389, 29918, 497, 29892, 18618, 29922, 29900, 29892, 7353, 29922, 23310, 29889, 22789, 3912, 29892, 5139, 29922, 29896, 29900, 29897, 13, 4706, 1583, 29889, 29894, 3313, 6330, 29889, 2528, 29898, 1311, 29889, 29882, 3313, 29819, 787, 29892, 7353, 29922, 23310, 29889, 1964, 17298, 29918, 22789, 3912, 891, 26437, 29889, 29933, 2891, 4986, 29924, 29892, 5139, 29922, 29896, 29900, 29897, 13, 4706, 1583, 29889, 15119, 6330, 29889, 2697, 29903, 3950, 29898, 1311, 29889, 29894, 3313, 6330, 29897, 13, 13, 4706, 1583, 29889, 6510, 6558, 29889, 18277, 29898, 29896, 29900, 29896, 29892, 376, 6558, 599, 856, 29905, 29873, 18069, 29899, 29909, 1159, 13, 4706, 1583, 29889, 6510, 6558, 29889, 18277, 29898, 29896, 29900, 29906, 29892, 376, 6558, 4629, 856, 29905, 29873, 18069, 29899, 29903, 1159, 13, 13, 4706, 1583, 29889, 6510, 5776, 9884, 29889, 18277, 29898, 29906, 29900, 29896, 29892, 376, 15735, 29899, 2831, 6762, 3686, 9409, 29905, 29873, 18069, 29899, 29924, 1159, 13, 13, 4706, 1583, 29889, 6510, 29648, 29889, 18277, 29898, 23310, 29889, 1367, 29918, 2882, 12015, 29892, 376, 29987, 28173, 8612, 2105, 1159, 13, 4706, 1583, 29889, 6510, 29648, 29889, 18277, 29898, 29941, 29900, 29896, 29892, 376, 28173, 848, 16531, 856, 29905, 29873, 18069, 29899, 29950, 1159, 13, 13, 4706, 1583, 29889, 6510, 4297, 6330, 29889, 18277, 29898, 1311, 29889, 6510, 6558, 29892, 376, 29987, 6558, 1159, 13, 4706, 1583, 29889, 6510, 4297, 6330, 29889, 18277, 29898, 1311, 29889, 6510, 5776, 9884, 29892, 376, 29987, 5776, 9884, 1159, 13, 4706, 1583, 29889, 6510, 4297, 6330, 29889, 18277, 29898, 1311, 29889, 6510, 29648, 29892, 376, 29987, 29648, 1159, 13, 13, 4706, 1583, 29889, 2697, 6823, 4297, 29898, 1311, 29889, 6510, 4297, 6330, 29897, 13, 4706, 1583, 29889, 15708, 29898, 23310, 29889, 22240, 29911, 29918, 29924, 1430, 29965, 29892, 1583, 29889, 12717, 29918, 6510, 29918, 3808, 29892, 1178, 29922, 23310, 29889, 1367, 29918, 2882, 12015, 29897, 13, 4706, 1583, 29889, 15708, 29898, 23310, 29889, 22240, 29911, 29918, 29924, 1430, 29965, 29892, 1583, 29889, 3389, 29918, 497, 29892, 1178, 29922, 29896, 29900, 29896, 29897, 13, 4706, 1583, 29889, 15708, 29898, 23310, 29889, 22240, 29911, 29918, 29924, 1430, 29965, 29892, 1583, 29889, 3389, 29918, 8391, 29892, 1178, 29922, 29896, 29900, 29906, 29897, 13, 4706, 1583, 29889, 15708, 29898, 23310, 29889, 22240, 29911, 29918, 29924, 1430, 29965, 29892, 1583, 29889, 6886, 29918, 29885, 29888, 404, 9409, 29892, 1178, 29922, 29906, 29900, 29896, 29897, 13, 4706, 1583, 29889, 15708, 29898, 23310, 29889, 22240, 29911, 29918, 29924, 1430, 29965, 29892, 1583, 29889, 4294, 29918, 8477, 29892, 1178, 29922, 29941, 29900, 29896, 29897, 13, 4706, 1583, 29889, 15708, 29898, 23310, 29889, 22240, 29911, 29918, 29933, 2692, 29911, 1164, 29892, 1583, 29889, 3389, 29918, 497, 29892, 1583, 29889, 3092, 3389, 29918, 497, 29897, 13, 4706, 1583, 29889, 15708, 29898, 23310, 29889, 22240, 29911, 29918, 29933, 2692, 29911, 1164, 29892, 1583, 29889, 3389, 29918, 8391, 29892, 1583, 29889, 3092, 3389, 29918, 8391, 29897, 13, 13, 1678, 822, 4472, 29918, 29885, 29888, 404, 9409, 29898, 1311, 29892, 1741, 1125, 13, 4706, 1583, 29889, 3198, 1293, 3313, 29909, 566, 1169, 29889, 2697, 17817, 26545, 29898, 3366, 16616, 613, 376, 21889, 613, 376, 27573, 20068, 13, 4706, 1583, 29889, 3198, 3313, 2831, 398, 20624, 326, 1891, 29889, 2697, 1917, 29898, 5574, 29897, 13, 4706, 1583, 29889, 15550, 353, 7700, 13, 13, 1678, 822, 1510, 29918, 8477, 29898, 1311, 29892, 1741, 1125, 13, 4706, 2643, 353, 9995, 13, 10605, 338, 263, 1051, 310, 599, 278, 12785, 310, 2472, 16531, 29901, 13, 13, 29899, 19219, 29901, 13, 1678, 448, 6570, 1060, 10079, 13, 1678, 448, 6570, 1060, 8878, 13, 1678, 448, 10554, 272, 22140, 13, 1678, 448, 18914, 22140, 13, 1678, 448, 8125, 4408, 13, 1678, 448, 8125, 3553, 13, 1678, 448, 18896, 1353, 13, 13, 29899, 28096, 22140, 13, 1678, 448, 28096, 13, 1678, 448, 9071, 13, 1678, 448, 23708, 13, 1678, 448, 10079, 13, 1678, 448, 6189, 13, 1678, 448, 10554, 272, 13, 13, 29899, 10783, 482, 13, 1678, 448, 18914, 10783, 482, 29901, 501, 8485, 18914, 29892, 399, 2859, 18914, 29892, 853, 3880, 18914, 13, 1678, 448, 10999, 20579, 10783, 482, 29892, 8040, 287, 472, 847, 29901, 14990, 14121, 29892, 501, 8485, 14121, 29892, 7740, 3106, 14121, 13, 13, 29899, 8527, 292, 13, 1678, 448, 5886, 1367, 13, 1678, 448, 6645, 13189, 13, 1678, 448, 5641, 16428, 267, 29901, 427, 29900, 29892, 427, 29896, 13, 1678, 448, 3985, 5641, 13, 1678, 448, 3985, 16956, 13, 1678, 448, 382, 721, 1212, 16332, 13, 1678, 448, 14570, 29899, 18800, 16332, 13, 13, 29899, 9206, 13, 1678, 448, 350, 2620, 29891, 8045, 2841, 3917, 13, 1678, 448, 350, 2620, 29891, 11790, 654, 13, 15945, 29908, 13, 13, 4706, 270, 19920, 353, 26437, 29889, 3728, 7647, 29898, 1311, 29889, 15119, 6330, 29892, 2643, 29892, 376, 6466, 613, 26437, 29889, 8949, 891, 26437, 29889, 2965, 1164, 29918, 1177, 19094, 8098, 29897, 13, 4706, 270, 19920, 29889, 8964, 19751, 580, 13, 4706, 270, 19920, 29889, 14994, 4727, 580, 13, 13, 1678, 822, 1065, 29918, 497, 29918, 272, 29918, 1333, 29898, 1311, 29892, 1741, 1125, 13, 4706, 565, 1583, 29889, 3198, 3313, 3596, 29889, 2577, 1917, 7295, 13, 9651, 1583, 29889, 3389, 29918, 497, 17817, 353, 5852, 13, 9651, 1583, 29889, 3198, 1293, 3313, 29909, 566, 1169, 29889, 4205, 519, 580, 13, 4706, 1683, 29901, 13, 9651, 1583, 29889, 3389, 29918, 497, 17817, 353, 7700, 13, 9651, 1583, 29889, 3198, 1293, 3313, 29909, 566, 1169, 29889, 20701, 580, 13, 13, 1678, 822, 1048, 29918, 6510, 29918, 3808, 29898, 1311, 29892, 1741, 1125, 13, 4706, 1048, 29918, 6768, 353, 26437, 29889, 28173, 7647, 3401, 580, 13, 4706, 1048, 29918, 6768, 29889, 2697, 1170, 703, 29909, 566, 2105, 1159, 13, 4706, 1048, 29918, 6768, 29889, 2697, 6594, 29898, 1311, 29889, 3259, 29897, 13, 4706, 1048, 29918, 6768, 29889, 2697, 11882, 1266, 703, 29898, 29883, 29897, 29871, 29906, 29900, 29896, 29945, 529, 5813, 29958, 7790, 29876, 29905, 29876, 12492, 2085, 2167, 29891, 310, 278, 323, 4524, 8010, 7790, 29876, 29905, 29876, 25865, 5641, 3489, 29892, 10377, 657, 357, 29892, 7794, 9223, 1090, 278, 360, 29956, 8969, 29979, 17755, 7794, 663, 313, 1124, 597, 1636, 29889, 29893, 13264, 572, 29889, 1212, 4551, 1159, 13, 4706, 1048, 3313, 353, 26437, 29889, 28173, 3313, 29898, 12717, 29918, 6768, 29897, 13, 4706, 1596, 29898, 12717, 3313, 29897, 13, 13, 1678, 822, 2826, 29918, 3389, 29918, 15052, 277, 29918, 3808, 29898, 1311, 29892, 1741, 1125, 13, 4706, 1423, 353, 1583, 29889, 3198, 1293, 3313, 29909, 566, 1169, 29889, 2577, 17817, 26545, 580, 13, 4706, 565, 1583, 29889, 3389, 29918, 497, 17817, 1275, 7700, 322, 7431, 29898, 3198, 29897, 1275, 29871, 29900, 29901, 13, 9651, 7928, 3782, 5596, 29879, 353, 26437, 29889, 3728, 7647, 29898, 1311, 29892, 376, 3782, 3987, 4629, 19602, 376, 29909, 566, 2105, 613, 13, 462, 462, 795, 26437, 29889, 8949, 891, 26437, 29889, 2965, 1164, 29918, 29940, 12413, 29897, 29871, 396, 891, 26437, 29889, 2965, 1164, 29918, 1177, 19094, 8098, 13, 9651, 7928, 3782, 5596, 29879, 29889, 8964, 19751, 580, 13, 9651, 7928, 3782, 5596, 29879, 29889, 14994, 4727, 580, 13, 4706, 1683, 29901, 13, 9651, 565, 1583, 29889, 3389, 29918, 497, 17817, 29901, 13, 18884, 1583, 29889, 3389, 29918, 497, 580, 13, 9651, 1683, 29901, 13, 18884, 1583, 29889, 3389, 29918, 8391, 580, 13, 13, 1678, 822, 1065, 29918, 497, 29898, 1311, 29892, 1741, 1125, 13, 4706, 565, 1583, 29889, 3198, 3313, 2831, 398, 20624, 326, 1891, 29889, 2577, 1917, 580, 1275, 5852, 29901, 13, 9651, 1583, 29889, 15052, 277, 353, 14704, 401, 10725, 29876, 29909, 566, 2105, 13969, 29905, 29876, 29908, 13, 4706, 1683, 29901, 13, 9651, 1583, 29889, 15052, 277, 353, 376, 29909, 566, 2105, 13969, 29905, 29876, 29908, 13, 13, 4706, 396, 1732, 597, 1636, 29889, 1270, 495, 29883, 4812, 29889, 29890, 466, 29914, 5444, 29939, 29914, 3525, 517, 29899, 657, 29899, 3784, 29899, 1256, 29899, 2230, 29899, 262, 29899, 4691, 29914, 13, 4706, 1583, 29889, 15052, 277, 4619, 931, 29889, 710, 615, 603, 11702, 29881, 22584, 29885, 22584, 29979, 29892, 1273, 29950, 16664, 29924, 16664, 29903, 1159, 13, 13, 4706, 410, 29887, 1917, 353, 29871, 29896, 13, 13, 4706, 396, 2115, 29906, 29879, 29889, 510, 29914, 29911, 6072, 29914, 11980, 29914, 29900, 29941, 29947, 29900, 1649, 23310, 11980, 29914, 29909, 18035, 1884, 29889, 13357, 13, 4706, 7928, 353, 26437, 29889, 14470, 7647, 703, 7196, 20018, 613, 376, 4763, 292, 856, 613, 29871, 29945, 29892, 3114, 29922, 23310, 29889, 25014, 29918, 29907, 2190, 29918, 2882, 8476, 891, 26437, 29889, 25014, 29918, 20656, 29949, 29918, 29950, 22027, 891, 26437, 29889, 25014, 29918, 29903, 6720, 2891, 29950, 29897, 13, 4706, 7928, 29889, 29925, 19994, 580, 13, 13, 4706, 1583, 29889, 657, 29918, 16121, 580, 13, 4706, 7928, 29889, 6422, 29898, 29097, 1917, 29892, 376, 2577, 1259, 6996, 2472, 856, 1159, 13, 4706, 410, 29887, 1917, 4619, 29871, 29896, 13, 13, 4706, 1583, 29889, 657, 29918, 12120, 580, 13, 4706, 7928, 29889, 6422, 29898, 29097, 1917, 29892, 376, 2577, 1259, 7481, 2472, 856, 1159, 13, 4706, 410, 29887, 1917, 4619, 29871, 29896, 13, 13, 4706, 1583, 29889, 657, 29918, 21125, 580, 13, 4706, 7928, 29889, 6422, 29898, 29097, 1917, 29892, 376, 2577, 1259, 8744, 2472, 856, 1159, 13, 4706, 410, 29887, 1917, 4619, 29871, 29896, 13, 13, 4706, 1583, 29889, 657, 29918, 11618, 292, 580, 13, 4706, 7928, 29889, 6422, 29898, 29097, 1917, 29892, 376, 2577, 1259, 28127, 2472, 856, 1159, 13, 4706, 410, 29887, 1917, 4619, 29871, 29896, 13, 13, 4706, 1583, 29889, 657, 29918, 13519, 580, 13, 4706, 7928, 29889, 6422, 29898, 29097, 1917, 29892, 376, 2577, 1259, 3081, 2472, 856, 1159, 13, 13, 4706, 565, 1583, 29889, 3198, 3313, 2831, 398, 20624, 326, 1891, 29889, 2577, 1917, 7295, 13, 9651, 1583, 29889, 15052, 277, 4619, 6634, 29876, 29961, 29914, 401, 18017, 13, 13, 4706, 2224, 353, 5124, 13, 4706, 1583, 29889, 15901, 11371, 29889, 2697, 3434, 3871, 703, 29909, 566, 2105, 29899, 29908, 718, 931, 29889, 710, 615, 603, 11702, 29881, 19222, 29885, 19222, 29979, 29899, 271, 19222, 29950, 19222, 29924, 19222, 29903, 5783, 13, 4706, 565, 1583, 29889, 15901, 11371, 29889, 8964, 19751, 580, 1275, 26437, 29889, 1367, 29918, 8949, 29901, 13, 9651, 2224, 353, 1583, 29889, 15901, 11371, 29889, 2577, 2605, 580, 13, 9651, 1962, 353, 1722, 29898, 2084, 29892, 376, 29893, 1159, 13, 9651, 1962, 29889, 3539, 29898, 1311, 29889, 15052, 277, 29897, 13, 9651, 1962, 29889, 5358, 580, 13, 9651, 565, 1583, 29889, 3198, 3313, 6585, 29889, 2577, 1917, 7295, 13, 18884, 1014, 5014, 29889, 29925, 3150, 29898, 877, 3150, 742, 2224, 511, 27591, 29922, 1491, 5014, 29889, 2227, 4162, 29897, 13, 13, 4706, 1583, 29889, 3198, 1293, 3313, 29909, 566, 1169, 29889, 20701, 580, 13, 13, 4706, 1583, 29889, 15550, 353, 5852, 13, 13, 1678, 822, 1065, 29918, 8391, 29898, 1311, 29892, 1741, 1125, 13, 4706, 1423, 353, 1583, 29889, 3198, 1293, 3313, 29909, 566, 1169, 29889, 2577, 17817, 26545, 580, 13, 4706, 1423, 21515, 353, 7431, 29898, 3198, 29897, 13, 4706, 410, 29887, 1917, 353, 29871, 29896, 13, 13, 4706, 565, 1423, 21515, 1275, 29871, 29900, 29901, 13, 9651, 270, 19920, 353, 26437, 29889, 3728, 7647, 29898, 1311, 29889, 15119, 6330, 29892, 376, 12148, 1831, 777, 3987, 470, 1065, 599, 12990, 1169, 19602, 376, 2392, 613, 26437, 29889, 8949, 891, 26437, 29889, 2965, 1164, 29918, 11432, 29897, 13, 9651, 270, 19920, 29889, 8964, 19751, 580, 13, 9651, 270, 19920, 29889, 14994, 4727, 580, 13, 9651, 736, 29871, 29900, 13, 13, 4706, 565, 1583, 29889, 3198, 3313, 2831, 398, 20624, 326, 1891, 29889, 2577, 1917, 580, 1275, 5852, 29901, 13, 9651, 1583, 29889, 15052, 277, 353, 14704, 401, 10725, 29876, 29909, 566, 2105, 13969, 29905, 29876, 29908, 13, 4706, 1683, 29901, 13, 9651, 1583, 29889, 15052, 277, 353, 376, 29909, 566, 2105, 13969, 29905, 29876, 29908, 13, 13, 4706, 396, 1732, 597, 1636, 29889, 1270, 495, 29883, 4812, 29889, 29890, 466, 29914, 5444, 29939, 29914, 3525, 517, 29899, 657, 29899, 3784, 29899, 1256, 29899, 2230, 29899, 262, 29899, 4691, 29914, 13, 4706, 1583, 29889, 15052, 277, 4619, 931, 29889, 710, 615, 603, 11702, 29881, 22584, 29885, 22584, 29979, 29892, 1273, 29950, 16664, 29924, 16664, 29903, 1159, 13, 13, 4706, 7928, 353, 26437, 29889, 14470, 7647, 703, 7196, 20018, 613, 376, 4763, 292, 856, 613, 1423, 21515, 29892, 3114, 29922, 23310, 29889, 25014, 29918, 29907, 2190, 29918, 2882, 8476, 891, 26437, 29889, 25014, 29918, 20656, 29949, 29918, 29950, 22027, 891, 26437, 29889, 25014, 29918, 29903, 6720, 2891, 29950, 29897, 13, 4706, 7928, 29889, 29925, 19994, 580, 13, 13, 4706, 363, 921, 297, 1423, 29901, 13, 9651, 565, 921, 1275, 376, 16616, 1115, 13, 18884, 1583, 29889, 657, 29918, 16121, 580, 13, 18884, 7928, 29889, 6422, 29898, 29097, 1917, 29892, 376, 2577, 1259, 6996, 2472, 856, 1159, 13, 18884, 410, 29887, 1917, 4619, 29871, 29896, 13, 9651, 25342, 921, 1275, 376, 21889, 1115, 13, 18884, 1583, 29889, 657, 29918, 12120, 580, 13, 18884, 7928, 29889, 6422, 29898, 29097, 1917, 29892, 376, 2577, 1259, 7481, 2472, 856, 1159, 13, 18884, 410, 29887, 1917, 4619, 29871, 29896, 13, 9651, 25342, 921, 1275, 376, 27573, 1115, 13, 18884, 1583, 29889, 657, 29918, 21125, 580, 13, 18884, 7928, 29889, 6422, 29898, 29097, 1917, 29892, 376, 2577, 1259, 8744, 2472, 856, 1159, 13, 18884, 410, 29887, 1917, 4619, 29871, 29896, 13, 9651, 25342, 921, 1275, 376, 13724, 292, 1115, 13, 18884, 1583, 29889, 657, 29918, 11618, 292, 580, 13, 18884, 7928, 29889, 6422, 29898, 29097, 1917, 29892, 376, 2577, 1259, 28127, 2472, 856, 1159, 13, 18884, 410, 29887, 1917, 4619, 29871, 29896, 13, 9651, 25342, 921, 1275, 376, 21472, 1115, 13, 18884, 1583, 29889, 657, 29918, 13519, 580, 13, 18884, 7928, 29889, 6422, 29898, 29097, 1917, 29892, 376, 2577, 1259, 3081, 2472, 856, 1159, 13, 18884, 410, 29887, 1917, 4619, 29871, 29896, 13, 13, 13, 4706, 565, 1583, 29889, 3198, 3313, 2831, 398, 20624, 326, 1891, 29889, 2577, 1917, 580, 1275, 5852, 29901, 13, 9651, 1583, 29889, 15052, 277, 4619, 6634, 29876, 29961, 29914, 401, 18017, 13, 13, 4706, 7928, 29889, 14994, 4727, 580, 13, 13, 4706, 2224, 353, 5124, 13, 4706, 1583, 29889, 15901, 11371, 29889, 2697, 3434, 3871, 703, 29909, 566, 2105, 29899, 29908, 718, 931, 29889, 710, 615, 603, 11702, 29881, 19222, 29885, 19222, 29979, 29899, 271, 19222, 29950, 19222, 29924, 19222, 29903, 5783, 13, 4706, 565, 1583, 29889, 15901, 11371, 29889, 8964, 19751, 580, 1275, 26437, 29889, 1367, 29918, 8949, 29901, 13, 9651, 2224, 353, 1583, 29889, 15901, 11371, 29889, 2577, 2605, 580, 13, 9651, 1962, 353, 1722, 29898, 2084, 29892, 376, 29893, 1159, 13, 9651, 1962, 29889, 3539, 29898, 1311, 29889, 15052, 277, 29897, 13, 9651, 1962, 29889, 5358, 580, 13, 9651, 565, 1583, 29889, 3198, 3313, 6585, 29889, 2577, 1917, 7295, 13, 18884, 1014, 5014, 29889, 29925, 3150, 29898, 877, 3150, 742, 2224, 511, 27591, 29922, 1491, 5014, 29889, 2227, 4162, 29897, 13, 13, 4706, 1583, 29889, 3198, 1293, 3313, 29909, 566, 1169, 29889, 20701, 580, 13, 4706, 1583, 29889, 15550, 353, 5852, 13, 13, 1678, 822, 679, 29918, 16121, 29898, 1311, 1125, 13, 13, 4706, 1583, 29889, 15052, 277, 4619, 6634, 29876, 29905, 29876, 1057, 19219, 22140, 584, 3583, 29876, 29908, 13, 13, 4706, 396, 1732, 597, 2417, 29889, 510, 29914, 29874, 29914, 29896, 29941, 29941, 29941, 29906, 29941, 29900, 29900, 13, 4706, 10876, 16948, 27893, 353, 1014, 5014, 29889, 29925, 3150, 29898, 877, 9675, 16948, 742, 17411, 29874, 5477, 27591, 29922, 1491, 5014, 29889, 2227, 4162, 29897, 13, 4706, 10876, 16948, 27893, 12197, 412, 353, 1014, 5014, 29889, 3198, 29918, 4905, 29898, 877, 22385, 742, 525, 29885, 496, 2716, 29889, 21970, 29889, 16472, 29918, 1807, 5477, 3659, 262, 29922, 9675, 16948, 27893, 29889, 25393, 29897, 13, 13, 4706, 10876, 16948, 11442, 353, 1014, 5014, 29889, 29925, 3150, 29898, 877, 9675, 16948, 742, 17411, 29874, 5477, 27591, 29922, 1491, 5014, 29889, 2227, 4162, 29897, 13, 4706, 10876, 16948, 11442, 12197, 412, 353, 1014, 5014, 29889, 3198, 29918, 4905, 29898, 877, 22385, 742, 525, 26828, 29889, 29885, 1567, 675, 5477, 3659, 262, 29922, 9675, 16948, 11442, 29889, 25393, 29897, 13, 13, 4706, 1583, 29889, 15052, 277, 4619, 376, 268, 6570, 1060, 10079, 29901, 376, 718, 1014, 5014, 29889, 3198, 29918, 4905, 29898, 3366, 2774, 29918, 874, 613, 11663, 4704, 6594, 20068, 13, 4706, 1583, 29889, 15052, 277, 4619, 376, 268, 6570, 1060, 8878, 29901, 376, 718, 1014, 5014, 29889, 3198, 29918, 4905, 29898, 3366, 2774, 29918, 874, 613, 11663, 4282, 6594, 20068, 13, 4706, 1583, 29889, 15052, 277, 4619, 376, 268, 10554, 272, 22140, 29901, 376, 718, 10876, 16948, 27893, 12197, 412, 29961, 29906, 29953, 17531, 13, 13, 4706, 2626, 9486, 353, 313, 524, 29898, 9675, 16948, 11442, 12197, 412, 29961, 29896, 29906, 29901, 2314, 847, 29871, 29896, 29900, 29906, 29946, 29897, 847, 29871, 29896, 29900, 29906, 29946, 13, 4706, 2626, 7210, 353, 5135, 524, 29898, 9675, 16948, 11442, 12197, 412, 29961, 29896, 29906, 29901, 2314, 847, 29871, 29896, 29900, 29906, 29946, 29897, 847, 29871, 29896, 29900, 29906, 29946, 29897, 847, 29871, 29896, 29900, 29906, 29946, 13, 4706, 1583, 29889, 15052, 277, 4619, 376, 268, 18914, 22140, 29901, 376, 718, 851, 29898, 6954, 7210, 29897, 718, 376, 7210, 4852, 718, 851, 29898, 6954, 9486, 29897, 718, 376, 9486, 5513, 13, 13, 4706, 1583, 29889, 15052, 277, 4619, 6634, 29876, 268, 8125, 4408, 29901, 376, 13, 4706, 1904, 1170, 353, 1014, 5014, 29889, 29925, 3150, 29898, 877, 5205, 29918, 771, 1777, 261, 742, 525, 5550, 29950, 538, 2519, 1469, 1542, 5477, 27591, 29922, 1491, 5014, 29889, 2227, 4162, 29897, 13, 4706, 1904, 1170, 12197, 412, 353, 1014, 5014, 29889, 3198, 29918, 4905, 29898, 877, 22385, 742, 525, 3195, 4408, 5477, 3659, 262, 29922, 4299, 1170, 29889, 25393, 29897, 13, 4706, 363, 921, 297, 1904, 1170, 12197, 412, 29889, 5451, 7295, 13, 9651, 565, 921, 1275, 376, 3195, 29908, 470, 921, 1275, 376, 1170, 29901, 1115, 13, 18884, 1209, 13, 9651, 1683, 29901, 13, 18884, 1583, 29889, 15052, 277, 4619, 921, 718, 376, 376, 13, 13, 4706, 1904, 1367, 353, 1014, 5014, 29889, 29925, 3150, 29898, 877, 5205, 29918, 771, 1777, 261, 742, 525, 5550, 29950, 538, 2519, 1469, 1542, 5477, 27591, 29922, 1491, 5014, 29889, 2227, 4162, 29897, 13, 4706, 1904, 1367, 12197, 412, 353, 1014, 5014, 29889, 3198, 29918, 4905, 29898, 877, 22385, 742, 525, 12889, 5477, 3659, 262, 29922, 4299, 1367, 29889, 25393, 29897, 13, 4706, 1583, 29889, 15052, 277, 4619, 6634, 29876, 268, 8125, 3553, 29901, 376, 718, 1904, 1367, 12197, 412, 29889, 5451, 580, 29961, 29906, 29962, 13, 13, 4706, 565, 1583, 29889, 15550, 1275, 5852, 29901, 13, 9651, 7797, 4557, 353, 1014, 5014, 29889, 29925, 3150, 29898, 877, 5205, 29918, 771, 1777, 261, 742, 525, 5550, 29950, 538, 2519, 1469, 1542, 5477, 27591, 29922, 1491, 5014, 29889, 2227, 4162, 29897, 13, 9651, 7797, 4557, 12197, 412, 353, 1014, 5014, 29889, 3198, 29918, 4905, 29898, 877, 22385, 742, 525, 9125, 5477, 3659, 262, 29922, 15550, 4557, 29889, 25393, 29897, 13, 9651, 1583, 29889, 15052, 277, 4619, 6634, 29876, 268, 18896, 1353, 29901, 376, 718, 7797, 4557, 12197, 412, 29889, 5451, 580, 29961, 29941, 29962, 13, 13, 4706, 396, 8125, 1024, 448, 1732, 597, 11548, 29889, 7041, 29889, 510, 29914, 29874, 29914, 29929, 29947, 29900, 29947, 29929, 313, 18963, 1732, 597, 5924, 29899, 1028, 29889, 11548, 29889, 510, 29914, 1028, 29914, 4704, 29973, 617, 29922, 12972, 29979, 29941, 29897, 13, 13, 1678, 822, 679, 29918, 13519, 29898, 1311, 1125, 13, 13, 4706, 1583, 29889, 15052, 277, 4619, 6634, 29876, 29905, 29876, 1057, 9206, 22140, 584, 3583, 29876, 29908, 13, 13, 4706, 1018, 29901, 13, 9651, 11412, 3981, 353, 1014, 5014, 29889, 29925, 3150, 29898, 877, 5205, 29918, 771, 1777, 261, 742, 525, 5550, 21472, 1469, 1542, 5477, 27591, 29922, 1491, 5014, 29889, 2227, 4162, 29897, 13, 9651, 11412, 3981, 12197, 412, 353, 1014, 5014, 29889, 3198, 29918, 4905, 29898, 877, 22385, 742, 525, 29907, 13317, 3917, 5477, 3659, 262, 29922, 23090, 3981, 29889, 25393, 29897, 13, 9651, 1583, 29889, 15052, 277, 4619, 376, 268, 350, 2620, 29891, 8045, 2841, 3917, 29901, 376, 718, 11412, 3981, 12197, 412, 29889, 5451, 580, 29961, 29906, 29962, 13, 4706, 5174, 29901, 13, 9651, 1583, 29889, 15052, 277, 4619, 376, 268, 350, 2620, 29891, 8045, 2841, 3917, 29901, 405, 29914, 29909, 29908, 13, 13, 4706, 1018, 29901, 13, 9651, 4195, 353, 1014, 5014, 29889, 29925, 3150, 29898, 877, 5205, 29918, 771, 1777, 261, 742, 525, 5550, 21472, 1469, 1542, 5477, 27591, 29922, 1491, 5014, 29889, 2227, 4162, 29897, 13, 9651, 4195, 12197, 412, 353, 1014, 5014, 29889, 3198, 29918, 4905, 29898, 877, 22385, 742, 525, 25255, 5477, 3659, 262, 29922, 16122, 29889, 25393, 29897, 13, 9651, 1583, 29889, 15052, 277, 4619, 6634, 29876, 268, 350, 2620, 29891, 11790, 654, 29901, 376, 718, 4195, 12197, 412, 29889, 5451, 580, 29961, 29896, 29962, 13, 4706, 5174, 29901, 13, 9651, 1583, 29889, 15052, 277, 4619, 6634, 29876, 268, 350, 2620, 29891, 11790, 654, 29901, 405, 29914, 29909, 29908, 13, 13, 1678, 822, 679, 29918, 12120, 29898, 1311, 1125, 13, 13, 4706, 1583, 29889, 15052, 277, 4619, 6634, 29876, 29905, 29876, 1057, 28096, 22140, 584, 3583, 29876, 29908, 13, 13, 4706, 396, 1732, 597, 29886, 962, 327, 29893, 29889, 510, 29914, 29906, 29914, 12120, 29914, 13, 4706, 1583, 29889, 15052, 277, 4619, 376, 268, 28096, 29901, 376, 718, 7481, 29889, 5205, 580, 13, 4706, 1583, 29889, 15052, 277, 4619, 6634, 29876, 268, 9071, 29901, 376, 718, 7481, 29889, 3177, 580, 13, 4706, 1583, 29889, 15052, 277, 4619, 6634, 29876, 268, 23708, 29901, 376, 718, 7481, 29889, 14096, 580, 13, 4706, 1583, 29889, 15052, 277, 4619, 6634, 29876, 268, 10079, 29901, 376, 718, 7481, 29889, 3259, 580, 13, 4706, 1583, 29889, 15052, 277, 4619, 6634, 29876, 268, 6189, 29901, 376, 718, 7481, 29889, 23523, 580, 13, 4706, 1583, 29889, 15052, 277, 4619, 6634, 29876, 268, 10554, 272, 29901, 376, 718, 7481, 29889, 26482, 580, 13, 13, 1678, 822, 679, 29918, 21125, 29898, 1311, 1125, 13, 13, 4706, 1583, 29889, 15052, 277, 4619, 6634, 29876, 29905, 29876, 1057, 10783, 482, 22140, 584, 3583, 29876, 29908, 13, 13, 4706, 396, 1732, 597, 2417, 29889, 510, 29914, 2619, 29914, 29906, 29896, 29896, 29953, 29906, 29955, 29906, 29896, 29914, 3525, 29899, 517, 29899, 657, 29899, 14017, 936, 29899, 14834, 29899, 3166, 29899, 3332, 29899, 29880, 29896, 29899, 4746, 29899, 20011, 29899, 262, 29899, 359, 29899, 29916, 29899, 655, 369, 7358, 448, 9128, 3370, 13, 4706, 1304, 11442, 353, 1014, 5014, 29889, 29925, 3150, 29898, 877, 3332, 742, 17411, 29880, 29896, 5477, 27591, 29922, 1491, 5014, 29889, 2227, 4162, 29897, 13, 4706, 1304, 11442, 12197, 412, 353, 1014, 5014, 29889, 3198, 29918, 4905, 29898, 877, 22385, 742, 525, 25847, 11442, 5477, 3659, 262, 29922, 3880, 11442, 29889, 25393, 29897, 13, 4706, 1304, 11442, 29965, 8485, 353, 1304, 11442, 12197, 412, 29889, 5451, 580, 29961, 29896, 29962, 13, 4706, 1304, 11442, 29956, 2859, 353, 1304, 11442, 12197, 412, 29889, 5451, 580, 29961, 29941, 29962, 13, 4706, 1304, 11442, 2525, 3880, 353, 1304, 11442, 12197, 412, 29889, 5451, 580, 29961, 29945, 29962, 13, 4706, 1583, 29889, 15052, 277, 4619, 376, 268, 18914, 10783, 482, 3583, 29876, 3986, 501, 8485, 18914, 29901, 376, 718, 1304, 11442, 29965, 8485, 718, 6634, 29876, 3986, 399, 2859, 18914, 29901, 376, 718, 1304, 11442, 29956, 2859, 29889, 6506, 29898, 13, 9651, 18227, 613, 20569, 718, 6634, 29876, 3986, 853, 3880, 18914, 29901, 376, 718, 1304, 11442, 2525, 3880, 13, 13, 4706, 8086, 14936, 353, 1014, 5014, 29889, 29925, 3150, 29898, 3366, 2176, 613, 11663, 29950, 613, 5591, 12436, 27591, 29922, 1491, 5014, 29889, 2227, 4162, 29897, 13, 4706, 8086, 14936, 3401, 353, 8086, 14936, 29889, 27820, 403, 580, 29961, 29900, 29962, 13, 4706, 3001, 14936, 353, 8086, 14936, 3401, 29889, 5451, 580, 29961, 29896, 29896, 29962, 13, 4706, 1304, 14936, 353, 8086, 14936, 3401, 29889, 5451, 580, 29961, 29896, 29906, 29962, 13, 4706, 3625, 14936, 353, 8086, 14936, 3401, 29889, 5451, 580, 29961, 29896, 29941, 29962, 13, 4706, 1583, 29889, 15052, 277, 4619, 6634, 29876, 268, 10999, 20579, 10783, 482, 29892, 8040, 287, 472, 847, 3583, 29876, 3986, 14990, 14121, 29901, 376, 718, 3001, 14936, 718, 6634, 29876, 3986, 501, 8485, 14121, 29901, 376, 718, 1304, 14936, 718, 6634, 29876, 3986, 7740, 3106, 14121, 29901, 376, 718, 3625, 14936, 13, 13, 1678, 822, 679, 29918, 11618, 292, 29898, 1311, 1125, 13, 4706, 396, 7870, 292, 29901, 13, 4706, 396, 259, 448, 29871, 29900, 29889, 29896, 29890, 29896, 29901, 29871, 29906, 29941, 29879, 13, 4706, 396, 259, 448, 29871, 29900, 29889, 29896, 29890, 29906, 29901, 13, 13, 4706, 1583, 29889, 15052, 277, 4619, 6634, 29876, 29905, 29876, 1057, 8527, 292, 22140, 584, 3583, 29876, 29908, 13, 13, 4706, 1018, 29901, 13, 9651, 396, 847, 3924, 29914, 12284, 29914, 25207, 4308, 13129, 29914, 2052, 280, 29947, 29900, 29906, 29896, 29896, 29889, 4468, 29914, 29963, 414, 1080, 29914, 7583, 29914, 13770, 29914, 1466, 637, 448, 29902, 891, 12680, 5886, 1367, 13, 9651, 17971, 333, 353, 1014, 5014, 29889, 29925, 3150, 29898, 13, 18884, 6702, 29914, 3924, 29914, 12284, 29914, 25207, 4308, 13129, 29914, 2052, 280, 29947, 29900, 29906, 29896, 29896, 29889, 4468, 29914, 29963, 414, 1080, 29914, 7583, 29914, 13770, 29914, 1466, 637, 742, 17411, 29902, 5477, 13, 18884, 27591, 29922, 1491, 5014, 29889, 2227, 4162, 29897, 13, 9651, 17971, 333, 12197, 412, 353, 1014, 5014, 29889, 3198, 29918, 4905, 29898, 877, 22385, 742, 525, 1799, 1367, 5477, 3659, 262, 29922, 893, 333, 29889, 25393, 29897, 13, 9651, 1583, 29889, 15052, 277, 4619, 376, 268, 5886, 1367, 29901, 376, 718, 17971, 333, 12197, 412, 29889, 5451, 580, 29961, 29941, 29962, 13, 4706, 5174, 1014, 5014, 29889, 29907, 4212, 7032, 2392, 29901, 13, 9651, 1583, 29889, 15052, 277, 4619, 376, 268, 5886, 1367, 29901, 405, 29914, 29909, 29908, 13, 13, 4706, 396, 1018, 29901, 13, 9651, 396, 1544, 6444, 353, 1014, 5014, 29889, 29925, 3150, 29898, 11219, 3924, 29914, 12284, 29914, 25207, 4308, 13129, 29914, 2052, 280, 29947, 29900, 29906, 29896, 29896, 29889, 4468, 29914, 29963, 414, 1080, 29914, 7583, 29914, 13770, 29914, 1466, 637, 742, 17411, 29902, 5477, 27591, 29922, 1491, 5014, 29889, 2227, 4162, 29897, 13, 9651, 396, 1544, 6444, 12197, 412, 353, 1014, 5014, 29889, 3198, 29918, 4905, 29898, 877, 22385, 742, 525, 2324, 5477, 3659, 262, 29922, 2324, 6444, 29889, 25393, 29897, 13, 9651, 396, 1583, 29889, 15052, 277, 4619, 6634, 29876, 268, 6645, 13189, 29901, 376, 718, 1544, 6444, 12197, 412, 29889, 5451, 580, 29961, 29906, 29962, 13, 4706, 396, 5174, 1014, 5014, 29889, 29907, 4212, 7032, 2392, 29901, 13, 9651, 396, 1583, 29889, 15052, 277, 4619, 6634, 29876, 268, 6645, 13189, 29901, 405, 29914, 29909, 29908, 13, 13, 4706, 10377, 1430, 29900, 353, 1014, 5014, 29889, 29925, 3150, 29898, 3366, 666, 2917, 613, 376, 657, 361, 10030, 613, 376, 264, 29900, 12436, 27591, 29922, 1491, 5014, 29889, 2227, 4162, 29897, 13, 4706, 10377, 1430, 29900, 1917, 353, 10377, 1430, 29900, 29889, 27820, 403, 580, 29961, 29900, 1822, 17010, 14182, 29876, 1159, 13, 4706, 565, 10377, 1430, 29900, 1917, 1275, 376, 1115, 13, 9651, 1583, 29889, 15052, 277, 4619, 6634, 29876, 268, 5641, 16428, 267, 3583, 29876, 3986, 427, 29900, 29901, 405, 29914, 29909, 29908, 13, 4706, 1683, 29901, 13, 9651, 1583, 29889, 15052, 277, 4619, 6634, 29876, 268, 5641, 16428, 267, 3583, 29876, 3986, 427, 29900, 29901, 376, 718, 10377, 1430, 29900, 1917, 13, 4706, 1596, 29898, 666, 1430, 29900, 1917, 29897, 13, 13, 4706, 10377, 1430, 29896, 353, 1014, 5014, 29889, 29925, 3150, 29898, 3366, 666, 2917, 613, 376, 657, 361, 10030, 613, 376, 264, 29896, 12436, 27591, 29922, 1491, 5014, 29889, 2227, 4162, 29897, 13, 4706, 10377, 1430, 29896, 1917, 353, 10377, 1430, 29896, 29889, 27820, 403, 580, 29961, 29900, 1822, 17010, 14182, 29876, 1159, 13, 4706, 565, 10377, 1430, 29896, 1917, 1275, 376, 1115, 13, 9651, 1583, 29889, 15052, 277, 4619, 6634, 29876, 3986, 427, 29896, 29901, 405, 29914, 29909, 29908, 13, 4706, 1683, 29901, 13, 9651, 1583, 29889, 15052, 277, 4619, 6634, 29876, 3986, 427, 29896, 29901, 376, 718, 10377, 1430, 29896, 1917, 13, 4706, 1596, 29898, 666, 1430, 29896, 1917, 29897, 13, 13, 4706, 396, 1294, 5690, 353, 1014, 5014, 29889, 29925, 3150, 29898, 3366, 18963, 613, 376, 361, 2917, 29889, 1004, 12436, 27591, 29922, 1491, 5014, 29889, 2227, 4162, 29897, 13, 4706, 1294, 5690, 353, 10377, 657, 357, 29889, 1357, 666, 580, 13, 4706, 1583, 29889, 15052, 277, 4619, 6634, 29876, 3986, 3985, 5641, 29901, 376, 718, 1294, 5690, 13, 13, 4706, 396, 1294, 8514, 353, 1014, 5014, 29889, 29925, 3150, 29898, 3366, 18963, 613, 376, 361, 2917, 29889, 1004, 29914, 3069, 12436, 27591, 29922, 1491, 5014, 29889, 2227, 4162, 29897, 13, 4706, 396, 1583, 29889, 15052, 277, 4619, 376, 3986, 3985, 16956, 29901, 376, 718, 1294, 8514, 29889, 27820, 403, 580, 29961, 29900, 29962, 13, 13, 4706, 11314, 824, 300, 29928, 3059, 353, 1014, 5014, 29889, 29925, 3150, 29898, 3366, 11618, 14669, 613, 11663, 657, 29881, 1983, 643, 874, 613, 376, 29923, 721, 1212, 12436, 27591, 29922, 1491, 5014, 29889, 2227, 4162, 29897, 13, 4706, 1583, 29889, 15052, 277, 4619, 6634, 29876, 3986, 382, 721, 1212, 16332, 29901, 376, 718, 11314, 824, 300, 29928, 3059, 29889, 27820, 403, 580, 29961, 29900, 1822, 6506, 14182, 29876, 613, 376, 29871, 16521, 13, 13, 4706, 281, 6832, 29928, 3059, 353, 1014, 5014, 29889, 29925, 3150, 29898, 3366, 11618, 14669, 613, 11663, 657, 29881, 1983, 643, 874, 613, 376, 29956, 29875, 29899, 18800, 12436, 27591, 29922, 1491, 5014, 29889, 2227, 4162, 29897, 13, 4706, 1583, 29889, 15052, 277, 4619, 6634, 29876, 3986, 14570, 29899, 18800, 16332, 29901, 376, 718, 281, 6832, 29928, 3059, 29889, 27820, 403, 580, 29961, 29900, 1822, 6506, 14182, 29876, 613, 376, 29871, 16521, 13, 13, 361, 4770, 978, 1649, 1275, 376, 1649, 3396, 1649, 1115, 13, 1678, 623, 353, 26437, 29889, 2052, 580, 13, 1678, 8612, 2105, 29898, 8516, 29892, 3611, 543, 29909, 566, 2105, 1159, 13, 1678, 623, 29889, 6330, 18405, 580, 2 ]
democracy_bot/utils.py
TheDuckFIN/democracy-bot
0
82354
<gh_stars>0 """Utility functions""" import discord def get_name(member: discord.Member): """Returns nick primarily and falls back to username""" return member.name if member.nick is None else member.nick
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 15945, 29908, 7270, 537, 3168, 15945, 29908, 13, 13, 5215, 2313, 536, 13, 13, 13, 1753, 679, 29918, 978, 29898, 14242, 29901, 2313, 536, 29889, 13404, 1125, 13, 1678, 9995, 11609, 29879, 25985, 19434, 322, 20074, 1250, 304, 8952, 15945, 29908, 13, 1678, 736, 4509, 29889, 978, 565, 4509, 29889, 19254, 338, 6213, 1683, 4509, 29889, 19254, 13, 2 ]
python/ql/test/2/library-tests/PointsTo/imports/test.py
vadi2/codeql
4,036
134900
from package import foo as myfoo
[ 1, 29871, 13, 3166, 3577, 1053, 7953, 408, 590, 5431, 13, 2 ]
pipeline/schemas/friend_invite.py
mystic-ai/pipeline
7
183281
from enum import Enum from .base import BaseModel class FriendInviteStatus(Enum): CREATED = "created" #: Friend has accepted the invite ACCEPTED = "accepted" #: The friend is still under trial period TRIAL = "trial" #: Cycle complete, the inviter has been credited COMPLETE = "complete" class FriendInviteBase(BaseModel): #: The ID of the User who sent the invite inviter_id: str #: The email the invite is to be sent to invitee_email: str class FriendInviteCreate(FriendInviteBase): """Create an invitation for a friend to join""" pass class FriendInviteGet(FriendInviteBase): """View of an invitation for a friend to join""" #: The ID of this invite id: str #: The status of the invite status: FriendInviteStatus class FriendInvitePatch(BaseModel): """Patch the status of a friend invitation""" status: FriendInviteStatus
[ 1, 515, 14115, 1053, 1174, 398, 13, 13, 3166, 869, 3188, 1053, 7399, 3195, 13, 13, 13, 1990, 20702, 12165, 568, 5709, 29898, 16854, 1125, 13, 1678, 14602, 29928, 353, 376, 11600, 29908, 13, 1678, 396, 29901, 20702, 756, 9259, 278, 2437, 568, 13, 1678, 319, 19043, 7982, 3352, 353, 376, 16044, 287, 29908, 13, 1678, 396, 29901, 450, 5121, 338, 1603, 1090, 14260, 3785, 13, 1678, 323, 3960, 1964, 353, 376, 3626, 284, 29908, 13, 1678, 396, 29901, 8045, 2841, 4866, 29892, 278, 2437, 1524, 756, 1063, 6625, 1573, 13, 1678, 4810, 3580, 18476, 353, 376, 8835, 29908, 13, 13, 13, 1990, 20702, 12165, 568, 5160, 29898, 5160, 3195, 1125, 13, 1678, 396, 29901, 450, 3553, 310, 278, 4911, 1058, 2665, 278, 2437, 568, 13, 1678, 2437, 1524, 29918, 333, 29901, 851, 13, 1678, 396, 29901, 450, 4876, 278, 2437, 568, 338, 304, 367, 2665, 304, 13, 1678, 2437, 568, 29872, 29918, 5269, 29901, 851, 13, 13, 13, 1990, 20702, 12165, 568, 4391, 29898, 27034, 355, 12165, 568, 5160, 1125, 13, 1678, 9995, 4391, 385, 2437, 7018, 363, 263, 5121, 304, 5988, 15945, 29908, 13, 13, 1678, 1209, 13, 13, 13, 1990, 20702, 12165, 568, 2577, 29898, 27034, 355, 12165, 568, 5160, 1125, 13, 1678, 9995, 1043, 310, 385, 2437, 7018, 363, 263, 5121, 304, 5988, 15945, 29908, 13, 13, 1678, 396, 29901, 450, 3553, 310, 445, 2437, 568, 13, 1678, 1178, 29901, 851, 13, 1678, 396, 29901, 450, 4660, 310, 278, 2437, 568, 13, 1678, 4660, 29901, 20702, 12165, 568, 5709, 13, 13, 13, 1990, 20702, 12165, 568, 29925, 905, 29898, 5160, 3195, 1125, 13, 1678, 9995, 29925, 905, 278, 4660, 310, 263, 5121, 2437, 7018, 15945, 29908, 13, 13, 1678, 4660, 29901, 20702, 12165, 568, 5709, 13, 2 ]
renewer/smtp.py
cloud-gov/legacy-domain-certificate-renewer
1
145467
<reponame>cloud-gov/legacy-domain-certificate-renewer from email.mime.text import MIMEText import smtplib import ssl from renewer.extensions import config def send_email(email, subject, body): msg = MIMEText(body, "html") msg["Subject"] = subject msg["To"] = email msg["From"] = config.SMTP_FROM s = smtplib.SMTP(config.SMTP_HOST, config.SMTP_PORT) # if we have a cert, then trust it if config.SMTP_TLS: sslcontext = ssl.create_default_context() if config.SMTP_CERT is not None: sslcontext.load_verify_locations(cadata=config.SMTP_CERT) s.starttls(context=sslcontext) # if smtp credentials were provided, login if config.SMTP_USER is not None and config.SMTP_PASS is not None: s.login(config.SMTP_USER, config.SMTP_PASS) s.sendmail(config.SMTP_FROM, [email], msg.as_string()) s.quit() def send_failed_operation_alert(operation): subject = f"[{config.ENV}] - legacy-domain-certificate-renewer pipeline failed" body = f""" <h1>Pipeline failed unexpectedly!</h1> operation id: {operation.id} <br/> service instance id: {operation.route.instance_id} <br/> service instance type: {operation.route.route_type} <br/> """ send_email(config.SMTP_TO, subject, body)
[ 1, 529, 276, 1112, 420, 29958, 9274, 29899, 13513, 29914, 1397, 4135, 29899, 7247, 29899, 6327, 8021, 29899, 28593, 556, 13, 3166, 4876, 29889, 29885, 603, 29889, 726, 1053, 341, 8890, 1626, 13, 5215, 1560, 9392, 1982, 13, 5215, 24250, 13, 13, 3166, 364, 1600, 556, 29889, 24299, 1053, 2295, 13, 13, 13, 1753, 3638, 29918, 5269, 29898, 5269, 29892, 4967, 29892, 3573, 1125, 13, 1678, 10191, 353, 341, 8890, 1626, 29898, 2587, 29892, 376, 1420, 1159, 13, 1678, 10191, 3366, 20622, 3108, 353, 4967, 13, 1678, 10191, 3366, 1762, 3108, 353, 4876, 13, 1678, 10191, 3366, 4591, 3108, 353, 2295, 29889, 17061, 3557, 29918, 21482, 13, 13, 1678, 269, 353, 1560, 9392, 1982, 29889, 17061, 3557, 29898, 2917, 29889, 17061, 3557, 29918, 20832, 29892, 2295, 29889, 17061, 3557, 29918, 15082, 29897, 13, 13, 1678, 396, 565, 591, 505, 263, 2284, 29892, 769, 9311, 372, 13, 1678, 565, 2295, 29889, 17061, 3557, 29918, 29911, 8547, 29901, 13, 4706, 24250, 4703, 353, 24250, 29889, 3258, 29918, 4381, 29918, 4703, 580, 13, 4706, 565, 2295, 29889, 17061, 3557, 29918, 29907, 20161, 338, 451, 6213, 29901, 13, 9651, 24250, 4703, 29889, 1359, 29918, 27902, 29918, 2029, 800, 29898, 29883, 7221, 29922, 2917, 29889, 17061, 3557, 29918, 29907, 20161, 29897, 13, 4706, 269, 29889, 2962, 29873, 3137, 29898, 4703, 29922, 16265, 4703, 29897, 13, 13, 1678, 396, 565, 1560, 9392, 16140, 892, 4944, 29892, 6464, 13, 1678, 565, 2295, 29889, 17061, 3557, 29918, 11889, 338, 451, 6213, 322, 2295, 29889, 17061, 3557, 29918, 25711, 338, 451, 6213, 29901, 13, 4706, 269, 29889, 7507, 29898, 2917, 29889, 17061, 3557, 29918, 11889, 29892, 2295, 29889, 17061, 3557, 29918, 25711, 29897, 13, 13, 1678, 269, 29889, 6717, 2549, 29898, 2917, 29889, 17061, 3557, 29918, 21482, 29892, 518, 5269, 1402, 10191, 29889, 294, 29918, 1807, 3101, 13, 1678, 269, 29889, 28358, 580, 13, 13, 13, 1753, 3638, 29918, 26061, 29918, 16453, 29918, 12888, 29898, 16453, 1125, 13, 1678, 4967, 353, 285, 29908, 19660, 2917, 29889, 25838, 6525, 448, 25000, 29899, 7247, 29899, 6327, 8021, 29899, 28593, 556, 16439, 5229, 29908, 13, 1678, 3573, 353, 285, 15945, 29908, 13, 29966, 29882, 29896, 29958, 29925, 23828, 5229, 15668, 368, 29991, 829, 29882, 29896, 29958, 13, 13, 16453, 1178, 29901, 426, 16453, 29889, 333, 29913, 529, 1182, 3779, 13, 5509, 2777, 1178, 29901, 426, 16453, 29889, 13134, 29889, 8758, 29918, 333, 29913, 529, 1182, 3779, 13, 5509, 2777, 1134, 29901, 426, 16453, 29889, 13134, 29889, 13134, 29918, 1853, 29913, 529, 1182, 3779, 13, 1678, 9995, 13, 1678, 3638, 29918, 5269, 29898, 2917, 29889, 17061, 3557, 29918, 4986, 29892, 4967, 29892, 3573, 29897, 13, 2 ]
rtmlparse/templates/simplephotometry.py
thusser/rtml-parse
1
55853
from zope.interface import implementer from rtmlparse.irtml import ITemplate from rtmlparse.elements import * @implementer(ITemplate) class SimplePhotometry(object): name = "SimplePhotometry" type = Setup def __init__(self, element=None, rtml=None): # define our elements self.setup = None self.Camera = None self.Filter = None self.Target = None self.Exposure = None self.ExposureConstraint = None # existing or new? if element is None: # do we have rtml? if rtml is None: raise ValueError('Need RTML instance for creating new template.') # create all necessary elements self.create(rtml) else: # store it, just use the first matching elements found self.setup = element self.Camera = self.setup.find_first(Camera) self.Target = self.setup.find_first(Target) self.Filter = self.setup.find_first(Filter) self.Exposure = self.setup.find_first(Exposure) self.ExposureConstraint = self.setup.find_first(ExposureConstraint) def create(self, rtml): self.setup = Setup(rtml, name='template:SimplePhotometry') self.Camera = Camera(self.setup) self.Filter = Filter(self.setup) self.Target = Target(self.setup) self.Exposure = Exposure(self.setup) self.ExposureConstraint = ExposureConstraint(self.setup)
[ 1, 515, 503, 2300, 29889, 13248, 1053, 2334, 261, 13, 3166, 364, 2871, 5510, 29889, 2728, 828, 1053, 306, 6733, 13, 3166, 364, 2871, 5510, 29889, 17664, 1053, 334, 13, 13, 13, 29992, 326, 2037, 261, 29898, 1806, 331, 2341, 29897, 13, 1990, 12545, 4819, 327, 7843, 29898, 3318, 1125, 13, 1678, 1024, 353, 376, 15427, 4819, 327, 7843, 29908, 13, 1678, 1134, 353, 3789, 786, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 1543, 29922, 8516, 29892, 364, 2871, 29922, 8516, 1125, 13, 4706, 396, 4529, 1749, 3161, 13, 4706, 1583, 29889, 14669, 353, 6213, 13, 4706, 1583, 29889, 20717, 353, 6213, 13, 4706, 1583, 29889, 5072, 353, 6213, 13, 4706, 1583, 29889, 8667, 353, 6213, 13, 4706, 1583, 29889, 1252, 1066, 545, 353, 6213, 13, 4706, 1583, 29889, 1252, 1066, 545, 21529, 353, 6213, 13, 13, 4706, 396, 5923, 470, 716, 29973, 13, 4706, 565, 1543, 338, 6213, 29901, 13, 9651, 396, 437, 591, 505, 364, 2871, 29973, 13, 9651, 565, 364, 2871, 338, 6213, 29901, 13, 18884, 12020, 7865, 2392, 877, 8139, 287, 390, 29911, 1988, 2777, 363, 4969, 716, 4472, 29889, 1495, 13, 9651, 396, 1653, 599, 5181, 3161, 13, 9651, 1583, 29889, 3258, 29898, 2273, 828, 29897, 13, 4706, 1683, 29901, 13, 9651, 396, 3787, 372, 29892, 925, 671, 278, 937, 9686, 3161, 1476, 13, 9651, 1583, 29889, 14669, 353, 1543, 13, 9651, 1583, 29889, 20717, 353, 1583, 29889, 14669, 29889, 2886, 29918, 4102, 29898, 20717, 29897, 13, 9651, 1583, 29889, 8667, 353, 1583, 29889, 14669, 29889, 2886, 29918, 4102, 29898, 8667, 29897, 13, 9651, 1583, 29889, 5072, 353, 1583, 29889, 14669, 29889, 2886, 29918, 4102, 29898, 5072, 29897, 13, 9651, 1583, 29889, 1252, 1066, 545, 353, 1583, 29889, 14669, 29889, 2886, 29918, 4102, 29898, 1252, 1066, 545, 29897, 13, 9651, 1583, 29889, 1252, 1066, 545, 21529, 353, 1583, 29889, 14669, 29889, 2886, 29918, 4102, 29898, 1252, 1066, 545, 21529, 29897, 13, 13, 1678, 822, 1653, 29898, 1311, 29892, 364, 2871, 1125, 13, 4706, 1583, 29889, 14669, 353, 3789, 786, 29898, 2273, 828, 29892, 1024, 2433, 6886, 29901, 15427, 4819, 327, 7843, 1495, 13, 4706, 1583, 29889, 20717, 353, 24321, 29898, 1311, 29889, 14669, 29897, 13, 4706, 1583, 29889, 5072, 353, 19916, 29898, 1311, 29889, 14669, 29897, 13, 4706, 1583, 29889, 8667, 353, 17157, 29898, 1311, 29889, 14669, 29897, 13, 4706, 1583, 29889, 1252, 1066, 545, 353, 1222, 1066, 545, 29898, 1311, 29889, 14669, 29897, 13, 4706, 1583, 29889, 1252, 1066, 545, 21529, 353, 1222, 1066, 545, 21529, 29898, 1311, 29889, 14669, 29897, 13, 2 ]
designate/backend/impl_infoblox/record_factory.py
infobloxopen/designate
0
27355
<reponame>infobloxopen/designate # Copyright 2014 Infoblox # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import logging from designate.i18n import _LI from designate.backend.impl_infoblox.records import a from designate.backend.impl_infoblox.records import aaaa from designate.backend.impl_infoblox.records import cname from designate.backend.impl_infoblox.records import ptr from designate.backend.impl_infoblox.records import soa from designate.backend.impl_infoblox.records import ns LOG = logging.getLogger(__name__) class RecordFactory(object): @staticmethod def get_record(recordset, infoblox, tenant_name): if recordset.type == "A": return a.ARecord(infoblox, tenant_name) if recordset.type == "CNAME": return cname.CNameRecord(infoblox, tenant_name) if recordset.type == "NS": return ns.NSRecord(infoblox, tenant_name) if recordset.type == "SOA": return soa.SOARecord(infoblox, tenant_name) if recordset.type == "PTR": return ptr.PTRRecord(infoblox, tenant_name) if recordset.type == "AAAA": return aaaa.AAAARecord(infoblox, tenant_name) LOG.error(_LI("Unknown type %s"), recordset.type)
[ 1, 529, 276, 1112, 420, 29958, 7192, 711, 417, 29916, 3150, 29914, 13892, 403, 13, 29937, 14187, 1266, 29871, 29906, 29900, 29896, 29946, 9969, 711, 417, 29916, 13, 29937, 13, 29937, 10413, 21144, 1090, 278, 13380, 19245, 29892, 10079, 29871, 29906, 29889, 29900, 313, 1552, 376, 29931, 293, 1947, 1496, 366, 1122, 13, 29937, 451, 671, 445, 934, 5174, 297, 752, 13036, 411, 278, 19245, 29889, 887, 1122, 4017, 13, 29937, 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, 399, 1806, 8187, 2692, 13, 29937, 399, 1718, 29934, 13566, 29059, 6323, 8707, 29928, 22122, 29903, 8079, 13764, 29979, 476, 22255, 29892, 2845, 4653, 470, 2411, 2957, 29889, 2823, 278, 13, 29937, 19245, 363, 278, 2702, 4086, 14765, 1076, 11239, 322, 27028, 13, 29937, 1090, 278, 19245, 29889, 13, 13, 5215, 12183, 13, 13, 3166, 2874, 403, 29889, 29875, 29896, 29947, 29876, 1053, 903, 5265, 13, 3166, 2874, 403, 29889, 27852, 29889, 13699, 29918, 7192, 711, 417, 29916, 29889, 3757, 4339, 1053, 263, 13, 3166, 2874, 403, 29889, 27852, 29889, 13699, 29918, 7192, 711, 417, 29916, 29889, 3757, 4339, 1053, 263, 7340, 29874, 13, 3166, 2874, 403, 29889, 27852, 29889, 13699, 29918, 7192, 711, 417, 29916, 29889, 3757, 4339, 1053, 274, 978, 13, 3166, 2874, 403, 29889, 27852, 29889, 13699, 29918, 7192, 711, 417, 29916, 29889, 3757, 4339, 1053, 23246, 13, 3166, 2874, 403, 29889, 27852, 29889, 13699, 29918, 7192, 711, 417, 29916, 29889, 3757, 4339, 1053, 577, 29874, 13, 3166, 2874, 403, 29889, 27852, 29889, 13699, 29918, 7192, 711, 417, 29916, 29889, 3757, 4339, 1053, 17534, 13, 14480, 353, 12183, 29889, 657, 16363, 22168, 978, 1649, 29897, 13, 13, 13, 1990, 14164, 5126, 29898, 3318, 1125, 13, 1678, 732, 7959, 5696, 13, 1678, 822, 679, 29918, 11651, 29898, 11651, 842, 29892, 3041, 711, 417, 29916, 29892, 3006, 424, 29918, 978, 1125, 13, 4706, 565, 2407, 842, 29889, 1853, 1275, 376, 29909, 1115, 13, 9651, 736, 263, 29889, 1718, 687, 536, 29898, 7192, 711, 417, 29916, 29892, 3006, 424, 29918, 978, 29897, 13, 4706, 565, 2407, 842, 29889, 1853, 1275, 376, 29907, 5813, 1115, 13, 9651, 736, 274, 978, 29889, 29907, 1170, 9182, 29898, 7192, 711, 417, 29916, 29892, 3006, 424, 29918, 978, 29897, 13, 4706, 565, 2407, 842, 29889, 1853, 1275, 376, 3059, 1115, 13, 9651, 736, 17534, 29889, 3059, 9182, 29898, 7192, 711, 417, 29916, 29892, 3006, 424, 29918, 978, 29897, 13, 4706, 565, 2407, 842, 29889, 1853, 1275, 376, 6156, 29909, 1115, 13, 9651, 736, 577, 29874, 29889, 6156, 1718, 687, 536, 29898, 7192, 711, 417, 29916, 29892, 3006, 424, 29918, 978, 29897, 13, 4706, 565, 2407, 842, 29889, 1853, 1275, 376, 29925, 5659, 1115, 13, 9651, 736, 23246, 29889, 29925, 5659, 9182, 29898, 7192, 711, 417, 29916, 29892, 3006, 424, 29918, 978, 29897, 13, 4706, 565, 2407, 842, 29889, 1853, 1275, 376, 23184, 1115, 13, 9651, 736, 263, 7340, 29874, 29889, 6344, 29909, 1718, 687, 536, 29898, 7192, 711, 417, 29916, 29892, 3006, 424, 29918, 978, 29897, 13, 4706, 25401, 29889, 2704, 7373, 5265, 703, 14148, 1134, 1273, 29879, 4968, 2407, 842, 29889, 1853, 29897, 13, 2 ]
swiftwind/core/exceptions.py
m-den-i/swiftwind
11
174826
<reponame>m-den-i/swiftwind class CannotCreateMultipleSettingsInstances(Exception): pass
[ 1, 529, 276, 1112, 420, 29958, 29885, 29899, 1145, 29899, 29875, 29914, 26792, 14800, 13, 1990, 15808, 4391, 15329, 552, 9585, 3379, 2925, 29898, 2451, 1125, 1209, 13, 2 ]
python/include/wl_oracle.py
bopopescu/Heimdallr
0
177879
#!/bin/env python #-*-coding:utf-8-*- import MySQLdb import string import sys reload(sys) sys.setdefaultencoding('utf8') import ConfigParser def get_item(data_dict,item): try: item_value = data_dict[item] return item_value except: pass def get_parameters(conn): try: curs=conn.cursor() data=curs.execute('select name,value from v$parameter'); data_list=curs.fetchall() parameters={} for item in data_list: parameters[item[0]] = item[1] return parameters except Exception,e: print e finally: curs.close() def get_sysstat(conn): try: curs=conn.cursor() data=curs.execute('select name,value value from v$sysstat'); data_list=curs.fetchall() sysstat={} for item in data_list: sysstat[item[0]] = item[1] return sysstat except Exception,e: print e finally: curs.close() def get_instance(conn,field): try: curs=conn.cursor() curs.execute("select %s from v$instance" %(field) ); result = curs.fetchone()[0] return result except Exception,e: result = '' print e finally: curs.close() def get_database(conn,field): try: curs=conn.cursor() curs.execute("select %s from v$database" %(field) ); result = curs.fetchone()[0] return result except Exception,e: result = '' print e finally: curs.close() def get_version(conn): try: curs=conn.cursor() curs.execute("select product,version from product_component_version where product like '%Database%'"); result = curs.fetchone()[1] return result except Exception,e: print e finally: curs.close() def get_current_snap_id(conn, inst_id): try: curs=conn.cursor() curs.execute("select max(snap_id) from wrm$_snapshot where instance_number = %s" %(inst_id)); result = curs.fetchone()[0] return result except Exception,e: print e finally: curs.close() def get_end_interval_time(conn, inst_id): try: curs=conn.cursor() curs.execute("""select to_char(t.end_interval_time, 'yyyy-mm-dd hh24:mi:ss') from wrm$_snapshot t where t.snap_id in (select max(snap_id) from wrm$_snapshot) and t.instance_number = %s """ %(inst_id)); result = curs.fetchone()[0] return result except Exception,e: print e finally: curs.close() def get_sessions(conn): try: curs=conn.cursor() curs.execute("select count(*) from v$session"); result = curs.fetchone()[0] return result except Exception,e: return null print e finally: curs.close() def get_actives(conn): try: curs=conn.cursor() curs.execute("select count(*) from v$session where STATUS='ACTIVE'"); result = curs.fetchone()[0] return result except Exception,e: return null print e finally: curs.close() def get_waits(conn): try: curs=conn.cursor() curs.execute("select count(*) from v$session where event like 'library%' or event like 'cursor%' or event like 'latch%' or event like 'enq%' or event like 'log file%'"); result = curs.fetchone()[0] return result except Exception,e: return null print e finally: curs.close() def get_dg_stats(conn): try: curs=conn.cursor() curs.execute("SELECT substr((SUBSTR(VALUE,5)),0,2)*3600 + substr((SUBSTR(VALUE,5)),4,2)*60 + substr((SUBSTR(VALUE,5)),7,2) AS seconds,VALUE FROM v$dataguard_stats a WHERE NAME ='apply lag'"); list = curs.fetchone() if list: result = 1 else: result = 0 return result except Exception,e: return null print e finally: curs.close() def get_dg_delay(conn): try: curs=conn.cursor() curs.execute("SELECT substr((SUBSTR(VALUE,5)),0,2)*3600 + substr((SUBSTR(VALUE,5)),4,2)*60 + substr((SUBSTR(VALUE,5)),7,2) AS seconds,VALUE FROM v$dataguard_stats a WHERE NAME ='apply lag'"); list = curs.fetchone() if list: result = list[0] else: result = '---' return result except Exception,e: return null print e finally: curs.close() def get_sysdate(conn): try: curs=conn.cursor() curs.execute("select to_char(sysdate, 'yyyymmddhh24miss') from dual"); result = curs.fetchone()[0] return result except Exception,e: return null print e finally: curs.close() def get_dg_p_info(conn, dest_id): try: curs=conn.cursor() curs.execute("""select * from (select dest_id, thread#, sequence#+1, archived, applied, current_scn, to_char(scn_to_timestamp(current_scn), 'yyyy-mm-dd hh24:mi:ss') curr_db_time, row_number() over(partition by thread# order by sequence# desc) rn from v$archived_log t, v$database d where t.dest_id = %s) where rn = 1 """ %(dest_id)); result = curs.fetchall() return result except Exception,e: return None print e finally: curs.close() def get_dg_p_info_2(conn, dest_id): try: curs=conn.cursor() curs.execute("""select * from (select t.dest_id, transmit_mode, thread#, sequence#+1, archived, applied, current_scn, to_char(scn_to_timestamp(current_scn), 'yyyy-mm-dd hh24:mi:ss') curr_db_time, row_number() over(partition by thread# order by sequence# desc) rn from v$archived_log t, v$archive_dest a, v$database d where t.dest_id = a.dest_id and t.dest_id = %s) where rn = 1 """ %(dest_id)); result = curs.fetchall() return result except Exception,e: return None print e finally: curs.close() def get_log_archived_delay(conn, dest_id, thread_id): try: result = 0 curs=conn.cursor() curs.execute("""select count(1) from v$archived_log where dest_id = %s and thread# = %s and archived= 'NO' group by dest_id """ %(dest_id, thread_id)); list = curs.fetchone() if list: result = list[0] else: result = 0 return result except Exception,e: return None print e finally: curs.close() def get_log_applied_delay(conn, dest_id, thread_id): try: result = 0 curs=conn.cursor() curs.execute("""select count(1) from v$archived_log where dest_id = %s and thread# = %s and applied= 'NO' group by dest_id """ %(dest_id, thread_id)); list = curs.fetchone() if list: result = list[0] else: result = 0 return result except Exception,e: return None print e finally: curs.close() def get_redo_per_hour(conn): try: curs=conn.cursor() curs.execute("""select to_char(first_time, 'yyyy-mm-dd hh24')||':00' key_time, trunc(sum(blocks * block_size) / 1024 / 1024) redo_p_h from v$archived_log where to_char(first_time, 'yyyymmddhh24') = to_char(sysdate, 'yyyymmddhh24') and standby_dest = 'NO' group by to_char(first_time, 'yyyy-mm-dd hh24') """); result = curs.fetchone() return result except Exception,e: print e return None finally: curs.close() def get_db_time(conn, snap_id, inst_id): try: curs=conn.cursor() curs.execute("""select snap_id, end_time, dbtime, elapsed, round(dbtime/elapsed, 2) as rate from ( select n.stat_name as name, e.snap_id, to_char(te.end_interval_time,'yyyy-mm-dd hh24:mi:ss') as end_time, round((case when (e.value - b.value) > 0 then e.value - b.value else e.value end) / 1000 / 1000, 2) as dbtime, (to_date(to_char(te.end_interval_time,'yyyy-mm-dd hh24:mi:ss'),'yyyy-mm-dd hh24:mi:ss') - to_date(to_char(tb.end_interval_time,'yyyy-mm-dd hh24:mi:ss'),'yyyy-mm-dd hh24:mi:ss'))*86400 as elapsed from wrh$_sys_time_model e, wrh$_sys_time_model b, wrh$_stat_name n, wrm$_snapshot tb, wrm$_snapshot te where e.stat_id = n.stat_id and b.stat_id = n.stat_id and b.snap_id = e.snap_id - 1 and e.snap_id = %s and e.snap_id = te.snap_id and e.instance_number = te.instance_number and b.snap_id = tb.snap_id and b.instance_number = tb.instance_number and e.instance_number=b.instance_number and e.instance_number=%s and n.stat_name = 'DB time') tmp """ %(snap_id, inst_id)); result = curs.fetchone() return result except Exception,e: print e return None finally: curs.close() def get_dg_s_ms(conn): try: curs=conn.cursor() curs.execute("""select ms.thread#, ms.sequence#, ms.block#, ms.delay_mins from v$managed_standby ms where ms.process in ('MRP0') and ms.sequence# <> 0 """); result = curs.fetchone() return result except Exception,e: return None print e finally: curs.close() def get_dg_s_al(conn, scn): try: curs=conn.cursor() curs.execute(""" select thread#,sequence# from v$archived_log where first_change#<%s and next_change#>=%s """ %(scn,scn)); result = curs.fetchone() return result except Exception,e: return None print e finally: curs.close() def get_dg_s_rate(conn): try: curs=conn.cursor() curs.execute("""select * from (select rp.sofar avg_apply_rate from v$recovery_progress rp where rp.item = 'Average Apply Rate' order by start_time desc) where rownum < 2 """); result = curs.fetchone() return result except Exception,e: return None print e finally: curs.close() def get_dg_s_mrp(conn): try: curs=conn.cursor() curs.execute("""select status from gv$session where program like '%(MRP0)' """); list = curs.fetchone() if list: result = 1 else: result = 0 return result except Exception,e: return 0 print e finally: curs.close() def get_standby_redo_count(conn): try: curs=conn.cursor() curs.execute("""select count(1) from v$standby_log """); result = curs.fetchone()[0] return result except Exception,e: return 0 print e finally: curs.close() def get_time_by_scn(conn, scn): try: result=None curs=conn.cursor() curs.execute("""select to_char(scn_to_timestamp(%s), 'yyyy-mm-dd hh24:mi:ss') curr_db_time from v$database """ %(scn)); res = curs.fetchone() if res: result = res[0] else: result = None return result except Exception,e: #print e return None finally: curs.close() def get_time_from_restorepoint(conn, scn): try: result=None curs=conn.cursor() curs.execute("""select to_char(time, 'yyyy-mm-dd hh24:mi:ss') curr_db_time from v$restore_point where scn = %s """ %(scn)); res = curs.fetchone() if res: result = res[0] else: result = None return result except Exception,e: print e return None finally: curs.close() def get_pri_id_by_server(conn, id): try: result=None curs=conn.cursor() curs.execute("""select CASE is_switch WHEN 0 THEN standby_db_id ELSE primary_db_id END as sta_id from db_cfg_oracle_dg where primary_db_id = %s or standby_db_id = %s """ %(id, id)); res = curs.fetchone() if res: result = res[0] else: result = None return result except Exception,e: print e return None finally: curs.close() def get_earliest_fbscn(conn): try: curs=conn.cursor() curs.execute("""select min(scn) from v$restore_point """); result = curs.fetchone()[0] return result except Exception,e: return None print e finally: curs.close() def get_earliest_fbtime(conn,flashback_retention): try: curs=conn.cursor() curs.execute("""select to_char(min(time) + 1/48, 'yyyy-mm-dd hh24:mi:ss') mintime from v$restore_point where time > sysdate -%s/24/60 """ %(flashback_retention)); mintime = curs.fetchone() result = 'null' if mintime[0]: result = mintime[0] return result except Exception,e: print e return None finally: curs.close() def get_last_fbtime(conn): try: curs=conn.cursor() curs.execute("""select to_char(max(time), 'yyyymmddhh24miss') maxtime from v$restore_point """); lasttime = curs.fetchone() result = 'null' if lasttime[0]: result = lasttime[0] return result except Exception,e: print e return None finally: curs.close() def get_flashback_space_used(conn): try: curs=conn.cursor() curs.execute("""select sum(percent_space_used) from v$flash_recovery_area_usage """); fb_space = curs.fetchone() result = 0 if fb_space: result = fb_space[0] if result == '' or result is None: result = 0 return result except Exception,e: print e return None finally: curs.close() def get_restorepoint(conn, flashback_retention): try: curs=conn.cursor() curs.execute("select name from v$restore_point where time > sysdate -%s/60/24 order by name desc " %(flashback_retention)); list = curs.fetchall() return list except Exception,e: return None print e finally: curs.close() def get_expire_restore_list(conn, flashback_retention): try: curs=conn.cursor() curs.execute("select name from v$restore_point where time < sysdate - %s/60/24 " %(flashback_retention)); list = curs.fetchall() return list except Exception,e: return None print e finally: curs.close() def get_tablespace(conn): try: curs=conn.cursor() curs.execute("""select tpsname,status,mgr,max_size,curr_size, max_used from (SELECT d.tablespace_name tpsname, d.status status, d.segment_space_management mgr, TO_CHAR(NVL(trunc(A.maxbytes / 1024 / 1024), 0), '99999990') max_size, TO_CHAR(NVL(trunc(a.bytes / 1024 / 1024), 0), '99999990') curr_size, TO_CHAR(NVL((a.bytes - NVL(f.bytes, 0)) / a.bytes * 100, 0), '990D00') c_used, TO_CHAR(NVL((a.bytes - NVL(f.bytes, 0)) / a.maxbytes * 100, 0), '990D00') max_used FROM sys.dba_tablespaces d, (SELECT tablespace_name, sum(bytes) bytes, SUM(case autoextensible when 'NO' then BYTES when 'YES' then MAXBYTES else null end) maxbytes FROM dba_data_files GROUP BY tablespace_name) a, (SELECT tablespace_name, SUM(bytes) bytes, MAX(bytes) largest_free FROM dba_free_space GROUP BY tablespace_name) f WHERE d.tablespace_name = a.tablespace_name AND d.tablespace_name = f.tablespace_name(+)) order by max_used desc """); list = curs.fetchall() return list except Exception,e: return None print e finally: curs.close() def get_diskgroup(conn): try: curs=conn.cursor() curs.execute("""select name, state, type, total_mb, free_mb, trunc(((total_mb - free_mb) / total_mb) * 100, 2) used_rate from v$asm_diskgroup """); list = curs.fetchall() return list except Exception,e: return None print e finally: curs.close() def get_tables(conn): try: curs=conn.cursor() curs.execute("select owner, owner || '.' || table_name from dba_tables "); list = curs.fetchall() return list except Exception,e: return None print e finally: curs.close()
[ 1, 18787, 2109, 29914, 6272, 3017, 13, 29937, 29899, 29930, 29899, 29883, 3689, 29901, 9420, 29899, 29947, 29899, 29930, 29899, 13, 13, 5215, 9254, 2585, 13, 5215, 1347, 13, 5215, 10876, 29871, 13, 28120, 29898, 9675, 29897, 29871, 13, 9675, 29889, 842, 4381, 22331, 877, 9420, 29947, 1495, 13, 5215, 12782, 11726, 13, 13, 1753, 679, 29918, 667, 29898, 1272, 29918, 8977, 29892, 667, 1125, 13, 1678, 1018, 29901, 13, 539, 2944, 29918, 1767, 353, 848, 29918, 8977, 29961, 667, 29962, 13, 539, 736, 2944, 29918, 1767, 13, 1678, 5174, 29901, 13, 539, 1209, 13, 13, 13, 1753, 679, 29918, 16744, 29898, 13082, 1125, 13, 1678, 1018, 29901, 13, 4706, 18580, 29922, 13082, 29889, 18127, 580, 13, 4706, 848, 29922, 29883, 1295, 29889, 7978, 877, 2622, 1024, 29892, 1767, 515, 325, 29938, 15501, 2157, 13, 4706, 848, 29918, 1761, 29922, 29883, 1295, 29889, 9155, 497, 580, 13, 4706, 4128, 3790, 29913, 13, 4706, 363, 2944, 297, 848, 29918, 1761, 29901, 13, 9651, 4128, 29961, 667, 29961, 29900, 5262, 353, 2944, 29961, 29896, 29962, 13, 13, 13, 4706, 736, 4128, 13, 1678, 5174, 8960, 29892, 29872, 29901, 13, 4706, 1596, 321, 13, 13, 1678, 7146, 29901, 13, 4706, 18580, 29889, 5358, 580, 13, 13, 13, 1753, 679, 29918, 9675, 6112, 29898, 13082, 1125, 13, 1678, 1018, 29901, 13, 4706, 18580, 29922, 13082, 29889, 18127, 580, 13, 4706, 848, 29922, 29883, 1295, 29889, 7978, 877, 2622, 1024, 29892, 1767, 995, 515, 325, 29938, 9675, 6112, 2157, 13, 4706, 848, 29918, 1761, 29922, 29883, 1295, 29889, 9155, 497, 580, 13, 4706, 10876, 6112, 3790, 29913, 13, 4706, 363, 2944, 297, 848, 29918, 1761, 29901, 13, 9651, 10876, 6112, 29961, 667, 29961, 29900, 5262, 353, 2944, 29961, 29896, 29962, 13, 13, 4706, 736, 10876, 6112, 13, 1678, 5174, 8960, 29892, 29872, 29901, 13, 4706, 1596, 321, 13, 13, 1678, 7146, 29901, 13, 4706, 18580, 29889, 5358, 580, 13, 13, 13, 1753, 679, 29918, 8758, 29898, 13082, 29892, 2671, 1125, 13, 1678, 1018, 29901, 13, 4706, 18580, 29922, 13082, 29889, 18127, 580, 13, 4706, 18580, 29889, 7978, 703, 2622, 1273, 29879, 515, 325, 29938, 8758, 29908, 1273, 29898, 2671, 29897, 3482, 13, 4706, 1121, 353, 18580, 29889, 9155, 650, 580, 29961, 29900, 29962, 13, 13, 4706, 736, 1121, 13, 1678, 5174, 8960, 29892, 29872, 29901, 13, 4706, 1121, 353, 6629, 13, 4706, 1596, 321, 13, 13, 1678, 7146, 29901, 13, 4706, 18580, 29889, 5358, 580, 13, 13, 13, 1753, 679, 29918, 9803, 29898, 13082, 29892, 2671, 1125, 13, 1678, 1018, 29901, 13, 4706, 18580, 29922, 13082, 29889, 18127, 580, 13, 4706, 18580, 29889, 7978, 703, 2622, 1273, 29879, 515, 325, 29938, 9803, 29908, 1273, 29898, 2671, 29897, 3482, 13, 4706, 1121, 353, 18580, 29889, 9155, 650, 580, 29961, 29900, 29962, 13, 4706, 736, 1121, 13, 13, 1678, 5174, 8960, 29892, 29872, 29901, 13, 4706, 1121, 353, 6629, 13, 4706, 1596, 321, 13, 13, 1678, 7146, 29901, 13, 4706, 18580, 29889, 5358, 580, 13, 13, 13, 1753, 679, 29918, 3259, 29898, 13082, 1125, 13, 1678, 1018, 29901, 13, 4706, 18580, 29922, 13082, 29889, 18127, 580, 13, 4706, 18580, 29889, 7978, 703, 2622, 3234, 29892, 3259, 515, 3234, 29918, 9700, 29918, 3259, 988, 3234, 763, 14210, 9112, 29001, 1496, 13, 4706, 1121, 353, 18580, 29889, 9155, 650, 580, 29961, 29896, 29962, 13, 13, 4706, 736, 1121, 13, 1678, 5174, 8960, 29892, 29872, 29901, 13, 4706, 1596, 321, 13, 13, 1678, 7146, 29901, 13, 4706, 18580, 29889, 5358, 580, 13, 13, 13, 1753, 679, 29918, 3784, 29918, 29879, 8971, 29918, 333, 29898, 13082, 29892, 832, 29918, 333, 1125, 13, 1678, 1018, 29901, 13, 4706, 18580, 29922, 13082, 29889, 18127, 580, 13, 4706, 18580, 29889, 7978, 703, 2622, 4236, 29898, 29879, 8971, 29918, 333, 29897, 515, 281, 1758, 14630, 29879, 14551, 988, 2777, 29918, 4537, 353, 1273, 29879, 29908, 1273, 29898, 2611, 29918, 333, 2483, 13, 4706, 1121, 353, 18580, 29889, 9155, 650, 580, 29961, 29900, 29962, 13, 13, 4706, 736, 1121, 13, 1678, 5174, 8960, 29892, 29872, 29901, 13, 4706, 1596, 321, 13, 13, 1678, 7146, 29901, 13, 4706, 18580, 29889, 5358, 580, 13, 13, 268, 13, 1753, 679, 29918, 355, 29918, 19207, 29918, 2230, 29898, 13082, 29892, 832, 29918, 333, 1125, 13, 1678, 1018, 29901, 13, 4706, 18580, 29922, 13082, 29889, 18127, 580, 13, 4706, 18580, 29889, 7978, 703, 15945, 2622, 304, 29918, 3090, 29898, 29873, 29889, 355, 29918, 19207, 29918, 2230, 29892, 525, 18855, 29899, 4317, 29899, 1289, 298, 29882, 29906, 29946, 29901, 2460, 29901, 893, 1495, 515, 281, 1758, 14630, 29879, 14551, 260, 29871, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 3062, 260, 29889, 29879, 8971, 29918, 333, 297, 313, 2622, 4236, 29898, 29879, 8971, 29918, 333, 29897, 515, 281, 1758, 14630, 29879, 14551, 29897, 29871, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 392, 260, 29889, 8758, 29918, 4537, 353, 1273, 29879, 9995, 1273, 29898, 2611, 29918, 333, 2483, 13, 4706, 1121, 353, 18580, 29889, 9155, 650, 580, 29961, 29900, 29962, 13, 13, 4706, 736, 1121, 13, 1678, 5174, 8960, 29892, 29872, 29901, 13, 4706, 1596, 321, 13, 13, 1678, 7146, 29901, 13, 4706, 18580, 29889, 5358, 580, 13, 13, 268, 13, 268, 13, 268, 13, 1753, 679, 29918, 29879, 10964, 29898, 13082, 1125, 13, 1678, 1018, 29901, 13, 4706, 18580, 29922, 13082, 29889, 18127, 580, 13, 4706, 18580, 29889, 7978, 703, 2622, 2302, 22798, 515, 325, 29938, 7924, 1496, 13, 4706, 1121, 353, 18580, 29889, 9155, 650, 580, 29961, 29900, 29962, 13, 4706, 736, 1121, 13, 13, 1678, 5174, 8960, 29892, 29872, 29901, 13, 4706, 736, 1870, 268, 13, 4706, 1596, 321, 13, 13, 1678, 7146, 29901, 13, 4706, 18580, 29889, 5358, 580, 13, 13, 13, 13, 1753, 679, 29918, 627, 3145, 29898, 13082, 1125, 13, 1678, 1018, 29901, 13, 4706, 18580, 29922, 13082, 29889, 18127, 580, 13, 4706, 18580, 29889, 7978, 703, 2622, 2302, 22798, 515, 325, 29938, 7924, 988, 6850, 1299, 3308, 2433, 17923, 18474, 29915, 1496, 13, 4706, 1121, 353, 18580, 29889, 9155, 650, 580, 29961, 29900, 29962, 13, 4706, 736, 1121, 13, 13, 1678, 5174, 8960, 29892, 29872, 29901, 13, 4706, 736, 1870, 13, 4706, 1596, 321, 13, 13, 1678, 7146, 29901, 13, 4706, 18580, 29889, 5358, 580, 13, 13, 13, 1753, 679, 29918, 2766, 1169, 29898, 13082, 1125, 13, 1678, 1018, 29901, 13, 4706, 18580, 29922, 13082, 29889, 18127, 580, 13, 4706, 18580, 29889, 7978, 703, 2622, 2302, 22798, 515, 325, 29938, 7924, 988, 1741, 763, 525, 5258, 29001, 470, 1741, 763, 525, 18127, 29001, 470, 1741, 763, 525, 29880, 905, 29001, 29871, 470, 1741, 763, 525, 264, 29939, 29001, 470, 1741, 763, 525, 1188, 934, 29001, 1496, 13, 4706, 1121, 353, 18580, 29889, 9155, 650, 580, 29961, 29900, 29962, 13, 4706, 736, 1121, 13, 13, 1678, 5174, 8960, 29892, 29872, 29901, 13, 4706, 736, 1870, 13, 4706, 1596, 321, 13, 13, 1678, 7146, 29901, 13, 4706, 18580, 29889, 5358, 580, 13, 13, 13, 1753, 679, 29918, 20726, 29918, 16202, 29898, 13082, 1125, 13, 1678, 1018, 29901, 13, 4706, 18580, 29922, 13082, 29889, 18127, 580, 13, 4706, 18580, 29889, 7978, 703, 6404, 25148, 3552, 20633, 10810, 29898, 19143, 29892, 29945, 8243, 29900, 29892, 29906, 11877, 29941, 29953, 29900, 29900, 718, 25148, 3552, 20633, 10810, 29898, 19143, 29892, 29945, 8243, 29946, 29892, 29906, 11877, 29953, 29900, 718, 25148, 3552, 20633, 10810, 29898, 19143, 29892, 29945, 8243, 29955, 29892, 29906, 29897, 3339, 6923, 29892, 19143, 3895, 325, 29938, 4130, 10617, 538, 29918, 16202, 263, 5754, 27085, 353, 29915, 7302, 11755, 29915, 1496, 13, 4706, 1051, 353, 18580, 29889, 9155, 650, 580, 13, 4706, 565, 1051, 29901, 13, 9651, 1121, 353, 29871, 29896, 13, 4706, 1683, 29901, 13, 9651, 1121, 353, 29871, 29900, 13, 4706, 736, 1121, 13, 13, 1678, 5174, 8960, 29892, 29872, 29901, 13, 4706, 736, 1870, 13, 4706, 1596, 321, 13, 13, 1678, 7146, 29901, 13, 4706, 18580, 29889, 5358, 580, 13, 13, 13, 13, 1753, 679, 29918, 20726, 29918, 18829, 29898, 13082, 1125, 13, 1678, 1018, 29901, 13, 4706, 18580, 29922, 13082, 29889, 18127, 580, 13, 4706, 18580, 29889, 7978, 703, 6404, 25148, 3552, 20633, 10810, 29898, 19143, 29892, 29945, 8243, 29900, 29892, 29906, 11877, 29941, 29953, 29900, 29900, 718, 25148, 3552, 20633, 10810, 29898, 19143, 29892, 29945, 8243, 29946, 29892, 29906, 11877, 29953, 29900, 718, 25148, 3552, 20633, 10810, 29898, 19143, 29892, 29945, 8243, 29955, 29892, 29906, 29897, 3339, 6923, 29892, 19143, 3895, 325, 29938, 4130, 10617, 538, 29918, 16202, 263, 5754, 27085, 353, 29915, 7302, 11755, 29915, 1496, 13, 4706, 1051, 353, 18580, 29889, 9155, 650, 580, 13, 4706, 565, 1051, 29901, 13, 9651, 1121, 353, 1051, 29961, 29900, 29962, 29871, 13, 4706, 1683, 29901, 13, 9651, 1121, 353, 525, 5634, 29915, 13, 4706, 736, 1121, 13, 13, 1678, 5174, 8960, 29892, 29872, 29901, 13, 4706, 736, 1870, 13, 4706, 1596, 321, 13, 13, 1678, 7146, 29901, 13, 4706, 18580, 29889, 5358, 580, 13, 13, 13, 1753, 679, 29918, 9675, 1256, 29898, 13082, 1125, 13, 1678, 1018, 29901, 13, 4706, 18580, 29922, 13082, 29889, 18127, 580, 13, 4706, 18580, 29889, 7978, 703, 2622, 304, 29918, 3090, 29898, 9675, 1256, 29892, 525, 8071, 29891, 962, 29885, 1289, 25446, 29906, 29946, 9894, 1495, 515, 14581, 1496, 13, 4706, 1121, 353, 18580, 29889, 9155, 650, 580, 29961, 29900, 29962, 13, 4706, 736, 1121, 13, 13, 1678, 5174, 8960, 29892, 29872, 29901, 13, 4706, 736, 1870, 13, 4706, 1596, 321, 13, 13, 1678, 7146, 29901, 13, 4706, 18580, 29889, 5358, 580, 13, 13, 13, 1753, 679, 29918, 20726, 29918, 29886, 29918, 3888, 29898, 13082, 29892, 2731, 29918, 333, 1125, 13, 1678, 1018, 29901, 13, 4706, 18580, 29922, 13082, 29889, 18127, 580, 13, 4706, 18580, 29889, 7978, 703, 15945, 2622, 334, 13, 462, 9651, 515, 313, 2622, 2731, 29918, 333, 29892, 13, 462, 462, 4706, 3244, 6552, 13, 462, 462, 4706, 5665, 29937, 29974, 29896, 29892, 13, 462, 462, 4706, 3190, 2347, 29892, 13, 462, 462, 4706, 7436, 29892, 13, 462, 462, 4706, 1857, 29918, 1557, 29876, 29892, 13, 462, 462, 4706, 304, 29918, 3090, 29898, 1557, 29876, 29918, 517, 29918, 16394, 29898, 3784, 29918, 1557, 29876, 511, 525, 18855, 29899, 4317, 29899, 1289, 298, 29882, 29906, 29946, 29901, 2460, 29901, 893, 1495, 16256, 29918, 2585, 29918, 2230, 29892, 13, 462, 462, 4706, 1948, 29918, 4537, 580, 975, 29898, 16707, 491, 3244, 29937, 1797, 491, 5665, 29937, 5153, 29897, 364, 29876, 13, 462, 462, 1678, 515, 325, 29938, 1279, 2347, 29918, 1188, 260, 29892, 325, 29938, 9803, 270, 13, 462, 462, 1678, 988, 260, 29889, 7854, 29918, 333, 353, 1273, 29879, 29897, 13, 462, 9651, 988, 364, 29876, 353, 29871, 29896, 9995, 1273, 29898, 7854, 29918, 333, 2483, 13, 4706, 1121, 353, 18580, 29889, 9155, 497, 580, 13, 308, 13, 4706, 736, 1121, 13, 1678, 5174, 8960, 29892, 29872, 29901, 13, 4706, 736, 6213, 13, 4706, 1596, 321, 13, 13, 1678, 7146, 29901, 13, 4706, 18580, 29889, 5358, 580, 13, 13, 13, 1753, 679, 29918, 20726, 29918, 29886, 29918, 3888, 29918, 29906, 29898, 13082, 29892, 2731, 29918, 333, 1125, 13, 1678, 1018, 29901, 13, 4706, 18580, 29922, 13082, 29889, 18127, 580, 13, 4706, 18580, 29889, 7978, 703, 15945, 2622, 334, 13, 462, 9651, 515, 313, 2622, 260, 29889, 7854, 29918, 333, 29892, 13, 462, 462, 4706, 22649, 29918, 8513, 29892, 13, 462, 462, 4706, 3244, 6552, 13, 462, 462, 4706, 5665, 29937, 29974, 29896, 29892, 13, 462, 462, 4706, 3190, 2347, 29892, 13, 462, 462, 4706, 7436, 29892, 13, 462, 462, 4706, 1857, 29918, 1557, 29876, 29892, 13, 462, 462, 4706, 304, 29918, 3090, 29898, 1557, 29876, 29918, 517, 29918, 16394, 29898, 3784, 29918, 1557, 29876, 511, 525, 18855, 29899, 4317, 29899, 1289, 298, 29882, 29906, 29946, 29901, 2460, 29901, 893, 1495, 16256, 29918, 2585, 29918, 2230, 29892, 13, 462, 462, 4706, 1948, 29918, 4537, 580, 975, 29898, 16707, 491, 3244, 29937, 1797, 491, 5665, 29937, 5153, 29897, 364, 29876, 13, 462, 462, 1678, 515, 325, 29938, 1279, 2347, 29918, 1188, 260, 29892, 325, 29938, 10867, 29918, 7854, 263, 29892, 325, 29938, 9803, 270, 13, 462, 462, 1678, 988, 260, 29889, 7854, 29918, 333, 353, 263, 29889, 7854, 29918, 333, 13, 462, 462, 418, 322, 260, 29889, 7854, 29918, 333, 353, 1273, 29879, 29897, 13, 462, 9651, 988, 364, 29876, 353, 29871, 29896, 9995, 1273, 29898, 7854, 29918, 333, 2483, 13, 4706, 1121, 353, 18580, 29889, 9155, 497, 580, 13, 308, 13, 4706, 736, 1121, 13, 1678, 5174, 8960, 29892, 29872, 29901, 13, 4706, 736, 6213, 13, 4706, 1596, 321, 13, 13, 1678, 7146, 29901, 13, 4706, 18580, 29889, 5358, 580, 13, 308, 13, 1753, 679, 29918, 1188, 29918, 1279, 2347, 29918, 18829, 29898, 13082, 29892, 2731, 29918, 333, 29892, 3244, 29918, 333, 1125, 13, 1678, 1018, 29901, 13, 4706, 1121, 353, 29871, 29900, 13, 4706, 18580, 29922, 13082, 29889, 18127, 580, 13, 4706, 18580, 29889, 7978, 703, 15945, 2622, 2302, 29898, 29896, 29897, 515, 325, 29938, 1279, 2347, 29918, 1188, 988, 2731, 29918, 333, 353, 1273, 29879, 322, 3244, 29937, 353, 1273, 29879, 322, 3190, 2347, 29922, 525, 6632, 29915, 2318, 491, 2731, 29918, 333, 9995, 1273, 29898, 7854, 29918, 333, 29892, 3244, 29918, 333, 2483, 13, 4706, 1051, 353, 18580, 29889, 9155, 650, 580, 13, 308, 13, 4706, 565, 1051, 29901, 13, 9651, 1121, 353, 1051, 29961, 29900, 29962, 29871, 13, 4706, 1683, 29901, 13, 9651, 1121, 353, 29871, 29900, 13, 632, 13, 4706, 736, 1121, 13, 1678, 5174, 8960, 29892, 29872, 29901, 13, 4706, 736, 6213, 13, 4706, 1596, 321, 13, 13, 1678, 7146, 29901, 13, 4706, 18580, 29889, 5358, 580, 13, 308, 13, 13, 1753, 679, 29918, 1188, 29918, 932, 2957, 29918, 18829, 29898, 13082, 29892, 2731, 29918, 333, 29892, 3244, 29918, 333, 1125, 13, 1678, 1018, 29901, 13, 4706, 1121, 353, 29871, 29900, 13, 4706, 18580, 29922, 13082, 29889, 18127, 580, 13, 4706, 18580, 29889, 7978, 703, 15945, 2622, 2302, 29898, 29896, 29897, 515, 325, 29938, 1279, 2347, 29918, 1188, 988, 2731, 29918, 333, 353, 1273, 29879, 322, 3244, 29937, 353, 1273, 29879, 322, 7436, 29922, 525, 6632, 29915, 2318, 491, 2731, 29918, 333, 9995, 1273, 29898, 7854, 29918, 333, 29892, 3244, 29918, 333, 2483, 13, 4706, 1051, 353, 18580, 29889, 9155, 650, 580, 13, 308, 13, 4706, 565, 1051, 29901, 13, 9651, 1121, 353, 1051, 29961, 29900, 29962, 29871, 13, 4706, 1683, 29901, 13, 9651, 1121, 353, 29871, 29900, 13, 632, 13, 4706, 736, 1121, 13, 1678, 5174, 8960, 29892, 29872, 29901, 13, 4706, 736, 6213, 13, 4706, 1596, 321, 13, 13, 1678, 7146, 29901, 13, 4706, 18580, 29889, 5358, 580, 13, 13, 13, 1753, 679, 29918, 1127, 29877, 29918, 546, 29918, 18721, 29898, 13082, 1125, 13, 1678, 1018, 29901, 13, 4706, 18580, 29922, 13082, 29889, 18127, 580, 13, 4706, 18580, 29889, 7978, 703, 15945, 2622, 304, 29918, 3090, 29898, 4102, 29918, 2230, 29892, 525, 18855, 29899, 4317, 29899, 1289, 298, 29882, 29906, 29946, 1495, 8876, 2396, 29900, 29900, 29915, 1820, 29918, 2230, 29892, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 21022, 29898, 2083, 29898, 1271, 29879, 334, 2908, 29918, 2311, 29897, 847, 29871, 29896, 29900, 29906, 29946, 847, 29871, 29896, 29900, 29906, 29946, 29897, 337, 1867, 29918, 29886, 29918, 29882, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 29871, 515, 325, 29938, 1279, 2347, 29918, 1188, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 988, 304, 29918, 3090, 29898, 4102, 29918, 2230, 29892, 525, 8071, 29891, 962, 29885, 1289, 25446, 29906, 29946, 1495, 353, 304, 29918, 3090, 29898, 9675, 1256, 29892, 525, 8071, 29891, 962, 29885, 1289, 25446, 29906, 29946, 1495, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 259, 322, 2317, 1609, 29918, 7854, 353, 525, 6632, 29915, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 2318, 491, 304, 29918, 3090, 29898, 4102, 29918, 2230, 29892, 525, 18855, 29899, 4317, 29899, 1289, 298, 29882, 29906, 29946, 1495, 5124, 1496, 13, 4706, 1121, 353, 18580, 29889, 9155, 650, 580, 13, 308, 13, 4706, 736, 1121, 13, 1678, 5174, 8960, 29892, 29872, 29901, 13, 4706, 1596, 321, 13, 4706, 736, 6213, 13, 13, 1678, 7146, 29901, 13, 4706, 18580, 29889, 5358, 580, 13, 13, 13, 1753, 679, 29918, 2585, 29918, 2230, 29898, 13082, 29892, 15101, 29918, 333, 29892, 832, 29918, 333, 1125, 13, 1678, 1018, 29901, 13, 4706, 18580, 29922, 13082, 29889, 18127, 580, 13, 4706, 18580, 29889, 7978, 703, 15945, 2622, 15101, 29918, 333, 29892, 1095, 29918, 2230, 29892, 4833, 2230, 29892, 560, 28170, 29892, 4513, 29898, 2585, 2230, 29914, 295, 28170, 29892, 29871, 29906, 29897, 408, 6554, 515, 313, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 2622, 302, 29889, 6112, 29918, 978, 408, 1024, 29892, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 29872, 29889, 29879, 8971, 29918, 333, 29892, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 517, 29918, 3090, 29898, 371, 29889, 355, 29918, 19207, 29918, 2230, 5501, 18855, 29899, 4317, 29899, 1289, 298, 29882, 29906, 29946, 29901, 2460, 29901, 893, 1495, 408, 1095, 29918, 2230, 29892, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 539, 4513, 3552, 4878, 746, 313, 29872, 29889, 1767, 448, 289, 29889, 1767, 29897, 1405, 29871, 29900, 769, 321, 29889, 1767, 448, 289, 29889, 1767, 1683, 321, 29889, 1767, 1095, 29897, 847, 29871, 29896, 29900, 29900, 29900, 847, 29871, 29896, 29900, 29900, 29900, 29892, 29871, 29906, 29897, 408, 4833, 2230, 29892, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 539, 313, 517, 29918, 1256, 29898, 517, 29918, 3090, 29898, 371, 29889, 355, 29918, 19207, 29918, 2230, 5501, 18855, 29899, 4317, 29899, 1289, 298, 29882, 29906, 29946, 29901, 2460, 29901, 893, 5477, 29915, 18855, 29899, 4317, 29899, 1289, 298, 29882, 29906, 29946, 29901, 2460, 29901, 893, 1495, 448, 29871, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 539, 304, 29918, 1256, 29898, 517, 29918, 3090, 29898, 22625, 29889, 355, 29918, 19207, 29918, 2230, 5501, 18855, 29899, 4317, 29899, 1289, 298, 29882, 29906, 29946, 29901, 2460, 29901, 893, 5477, 29915, 18855, 29899, 4317, 29899, 1289, 298, 29882, 29906, 29946, 29901, 2460, 29901, 893, 8785, 29930, 29947, 29953, 29946, 29900, 29900, 408, 560, 28170, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 29871, 515, 2358, 29882, 14630, 9675, 29918, 2230, 29918, 4299, 321, 29892, 2358, 29882, 14630, 9675, 29918, 2230, 29918, 4299, 289, 29892, 2358, 29882, 14630, 6112, 29918, 978, 302, 29892, 281, 1758, 14630, 29879, 14551, 260, 29890, 29892, 281, 1758, 14630, 29879, 14551, 734, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 988, 321, 29889, 6112, 29918, 333, 353, 302, 29889, 6112, 29918, 333, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 259, 322, 289, 29889, 6112, 29918, 333, 353, 302, 29889, 6112, 29918, 333, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 259, 322, 289, 29889, 29879, 8971, 29918, 333, 353, 321, 29889, 29879, 8971, 29918, 333, 448, 29871, 29896, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 259, 322, 321, 29889, 29879, 8971, 29918, 333, 353, 1273, 29879, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 259, 322, 321, 29889, 29879, 8971, 29918, 333, 353, 734, 29889, 29879, 8971, 29918, 333, 322, 321, 29889, 8758, 29918, 4537, 353, 734, 29889, 8758, 29918, 4537, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 259, 322, 289, 29889, 29879, 8971, 29918, 333, 353, 260, 29890, 29889, 29879, 8971, 29918, 333, 322, 289, 29889, 8758, 29918, 4537, 353, 260, 29890, 29889, 8758, 29918, 4537, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 259, 322, 321, 29889, 8758, 29918, 4537, 29922, 29890, 29889, 8758, 29918, 4537, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 259, 322, 321, 29889, 8758, 29918, 4537, 16328, 29879, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 259, 322, 302, 29889, 6112, 29918, 978, 353, 525, 4051, 931, 1495, 13128, 9995, 1273, 29898, 29879, 8971, 29918, 333, 29892, 832, 29918, 333, 2483, 13, 4706, 1121, 353, 18580, 29889, 9155, 650, 580, 13, 4706, 736, 1121, 13, 1678, 5174, 8960, 29892, 29872, 29901, 13, 4706, 1596, 321, 13, 4706, 736, 6213, 13, 13, 1678, 7146, 29901, 13, 4706, 18580, 29889, 5358, 580, 13, 308, 13, 795, 13, 965, 13, 1753, 679, 29918, 20726, 29918, 29879, 29918, 1516, 29898, 13082, 1125, 13, 1678, 1018, 29901, 13, 4706, 18580, 29922, 13082, 29889, 18127, 580, 13, 4706, 18580, 29889, 7978, 703, 15945, 2622, 10887, 29889, 7097, 6552, 13, 462, 1669, 10887, 29889, 16506, 6552, 13, 462, 1669, 10887, 29889, 1271, 6552, 13, 462, 1669, 10887, 29889, 18829, 29918, 29885, 1144, 13, 462, 3986, 515, 325, 29938, 25240, 29918, 1689, 1609, 29871, 10887, 13, 462, 308, 988, 10887, 29889, 5014, 297, 6702, 21055, 29925, 29900, 1495, 13, 462, 965, 322, 10887, 29889, 16506, 29937, 15271, 29871, 29900, 5124, 1496, 13, 4706, 1121, 353, 18580, 29889, 9155, 650, 580, 13, 13, 4706, 736, 1121, 13, 1678, 5174, 8960, 29892, 29872, 29901, 13, 4706, 736, 6213, 13, 4706, 1596, 321, 13, 13, 1678, 7146, 29901, 13, 4706, 18580, 29889, 5358, 580, 13, 13, 13, 1753, 679, 29918, 20726, 29918, 29879, 29918, 284, 29898, 13082, 29892, 885, 29876, 1125, 13, 1678, 1018, 29901, 13, 4706, 18580, 29922, 13082, 29889, 18127, 580, 13, 4706, 18580, 29889, 7978, 703, 15945, 1831, 3244, 6552, 16506, 29937, 515, 325, 29938, 1279, 2347, 29918, 1188, 988, 937, 29918, 3167, 29937, 29966, 29995, 29879, 322, 2446, 29918, 3167, 29937, 29958, 16328, 29879, 9995, 1273, 29898, 1557, 29876, 29892, 1557, 29876, 2483, 13, 4706, 1121, 353, 18580, 29889, 9155, 650, 580, 13, 13, 4706, 736, 1121, 13, 1678, 5174, 8960, 29892, 29872, 29901, 13, 4706, 736, 6213, 13, 4706, 1596, 321, 13, 13, 1678, 7146, 29901, 13, 4706, 18580, 29889, 5358, 580, 13, 13, 13, 1753, 679, 29918, 20726, 29918, 29879, 29918, 10492, 29898, 13082, 1125, 13, 1678, 1018, 29901, 13, 4706, 18580, 29922, 13082, 29889, 18127, 580, 13, 4706, 18580, 29889, 7978, 703, 15945, 2622, 334, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 29871, 515, 313, 2622, 364, 29886, 29889, 578, 15641, 1029, 29887, 29918, 7302, 29918, 10492, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 3986, 515, 325, 29938, 3757, 22205, 29918, 18035, 364, 29886, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 308, 988, 364, 29886, 29889, 667, 353, 525, 29909, 19698, 2401, 368, 390, 403, 29915, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 308, 1797, 491, 1369, 29918, 2230, 5153, 29897, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 988, 696, 1233, 398, 529, 29871, 29906, 5124, 1496, 13, 4706, 1121, 353, 18580, 29889, 9155, 650, 580, 13, 13, 4706, 736, 1121, 13, 1678, 5174, 8960, 29892, 29872, 29901, 13, 4706, 736, 6213, 13, 4706, 1596, 321, 13, 13, 1678, 7146, 29901, 13, 4706, 18580, 29889, 5358, 580, 13, 13, 13, 1753, 679, 29918, 20726, 29918, 29879, 29918, 29885, 19080, 29898, 13082, 1125, 13, 1678, 1018, 29901, 13, 4706, 18580, 29922, 13082, 29889, 18127, 580, 13, 4706, 18580, 29889, 7978, 703, 15945, 2622, 4660, 515, 330, 29894, 29938, 7924, 988, 1824, 763, 14210, 29898, 21055, 29925, 29900, 16029, 5124, 1496, 13, 4706, 1051, 353, 18580, 29889, 9155, 650, 580, 13, 308, 13, 4706, 565, 1051, 29901, 13, 9651, 1121, 353, 29871, 29896, 13, 4706, 1683, 29901, 13, 9651, 1121, 353, 29871, 29900, 13, 13, 4706, 736, 1121, 13, 1678, 5174, 8960, 29892, 29872, 29901, 13, 4706, 736, 29871, 29900, 13, 4706, 1596, 321, 13, 13, 1678, 7146, 29901, 13, 4706, 18580, 29889, 5358, 580, 13, 13, 1753, 679, 29918, 1689, 1609, 29918, 1127, 29877, 29918, 2798, 29898, 13082, 1125, 13, 1678, 1018, 29901, 13, 4706, 18580, 29922, 13082, 29889, 18127, 580, 13, 4706, 18580, 29889, 7978, 703, 15945, 2622, 2302, 29898, 29896, 29897, 515, 325, 29938, 1689, 1609, 29918, 1188, 5124, 1496, 13, 4706, 1121, 353, 18580, 29889, 9155, 650, 580, 29961, 29900, 29962, 13, 308, 13, 4706, 736, 1121, 13, 1678, 5174, 8960, 29892, 29872, 29901, 13, 4706, 736, 29871, 29900, 13, 4706, 1596, 321, 13, 13, 1678, 7146, 29901, 13, 4706, 18580, 29889, 5358, 580, 13, 462, 13, 13, 1753, 679, 29918, 2230, 29918, 1609, 29918, 1557, 29876, 29898, 13082, 29892, 885, 29876, 1125, 13, 1678, 1018, 29901, 13, 4706, 1121, 29922, 8516, 13, 4706, 18580, 29922, 13082, 29889, 18127, 580, 13, 4706, 18580, 29889, 7978, 703, 15945, 2622, 304, 29918, 3090, 29898, 1557, 29876, 29918, 517, 29918, 16394, 29414, 29879, 511, 525, 18855, 29899, 4317, 29899, 1289, 298, 29882, 29906, 29946, 29901, 2460, 29901, 893, 1495, 16256, 29918, 2585, 29918, 2230, 29871, 515, 325, 29938, 9803, 9995, 1273, 29898, 1557, 29876, 2483, 13, 4706, 620, 353, 18580, 29889, 9155, 650, 580, 13, 13, 4706, 565, 620, 29901, 13, 9651, 1121, 353, 620, 29961, 29900, 29962, 13, 4706, 1683, 29901, 13, 9651, 1121, 353, 6213, 13, 632, 13, 4706, 736, 1121, 13, 1678, 5174, 8960, 29892, 29872, 29901, 13, 4706, 396, 2158, 321, 13, 4706, 736, 6213, 13, 13, 1678, 7146, 29901, 13, 4706, 18580, 29889, 5358, 580, 13, 308, 13, 13, 13, 1753, 679, 29918, 2230, 29918, 3166, 29918, 5060, 487, 3149, 29898, 13082, 29892, 885, 29876, 1125, 13, 1678, 1018, 29901, 13, 4706, 1121, 29922, 8516, 13, 4706, 18580, 29922, 13082, 29889, 18127, 580, 13, 4706, 18580, 29889, 7978, 703, 15945, 2622, 304, 29918, 3090, 29898, 2230, 29892, 525, 18855, 29899, 4317, 29899, 1289, 298, 29882, 29906, 29946, 29901, 2460, 29901, 893, 1495, 16256, 29918, 2585, 29918, 2230, 29871, 515, 325, 29938, 5060, 487, 29918, 3149, 988, 885, 29876, 353, 1273, 29879, 9995, 1273, 29898, 1557, 29876, 2483, 13, 4706, 620, 353, 18580, 29889, 9155, 650, 580, 13, 13, 4706, 565, 620, 29901, 13, 9651, 1121, 353, 620, 29961, 29900, 29962, 13, 4706, 1683, 29901, 13, 9651, 1121, 353, 6213, 13, 632, 13, 4706, 736, 1121, 13, 1678, 5174, 8960, 29892, 29872, 29901, 13, 4706, 1596, 321, 13, 4706, 736, 6213, 13, 13, 1678, 7146, 29901, 13, 4706, 18580, 29889, 5358, 580, 13, 308, 13, 308, 13, 1753, 679, 29918, 29886, 374, 29918, 333, 29918, 1609, 29918, 2974, 29898, 13082, 29892, 1178, 1125, 13, 1678, 1018, 29901, 13, 4706, 1121, 29922, 8516, 13, 4706, 18580, 29922, 13082, 29889, 18127, 580, 13, 4706, 18580, 29889, 7978, 703, 15945, 2622, 29134, 338, 29918, 15123, 13, 462, 462, 9651, 17980, 29871, 29900, 8183, 2317, 1609, 29918, 2585, 29918, 333, 29871, 13, 462, 462, 9651, 26446, 7601, 29918, 2585, 29918, 333, 13, 462, 462, 4706, 11056, 408, 9523, 29918, 333, 13, 462, 462, 259, 515, 4833, 29918, 16859, 29918, 11347, 29918, 20726, 13, 462, 462, 29871, 988, 7601, 29918, 2585, 29918, 333, 353, 1273, 29879, 470, 2317, 1609, 29918, 2585, 29918, 333, 353, 1273, 29879, 29871, 9995, 1273, 29898, 333, 29892, 1178, 2483, 13, 4706, 620, 353, 18580, 29889, 9155, 650, 580, 13, 308, 13, 4706, 565, 620, 29901, 13, 9651, 1121, 353, 620, 29961, 29900, 29962, 13, 4706, 1683, 29901, 13, 9651, 1121, 353, 6213, 13, 13, 4706, 736, 1121, 13, 1678, 5174, 8960, 29892, 29872, 29901, 13, 4706, 1596, 321, 13, 4706, 736, 6213, 13, 13, 1678, 7146, 29901, 13, 4706, 18580, 29889, 5358, 580, 13, 308, 13, 13, 13, 1753, 679, 29918, 799, 20409, 29918, 14943, 1557, 29876, 29898, 13082, 1125, 13, 1678, 1018, 29901, 13, 4706, 18580, 29922, 13082, 29889, 18127, 580, 13, 4706, 18580, 29889, 7978, 703, 15945, 2622, 1375, 29898, 1557, 29876, 29897, 515, 325, 29938, 5060, 487, 29918, 3149, 5124, 1496, 13, 4706, 1121, 353, 18580, 29889, 9155, 650, 580, 29961, 29900, 29962, 13, 13, 4706, 736, 1121, 13, 1678, 5174, 8960, 29892, 29872, 29901, 13, 4706, 736, 6213, 13, 4706, 1596, 321, 13, 13, 1678, 7146, 29901, 13, 4706, 18580, 29889, 5358, 580, 13, 13, 13, 308, 13, 308, 13, 1753, 679, 29918, 799, 20409, 29918, 14943, 2230, 29898, 13082, 29892, 28041, 1627, 29918, 2267, 2509, 1125, 13, 1678, 1018, 29901, 13, 4706, 18580, 29922, 13082, 29889, 18127, 580, 13, 4706, 18580, 29889, 7978, 703, 15945, 2622, 304, 29918, 3090, 29898, 1195, 29898, 2230, 29897, 718, 29871, 29896, 29914, 29946, 29947, 29892, 525, 18855, 29899, 4317, 29899, 1289, 298, 29882, 29906, 29946, 29901, 2460, 29901, 893, 1495, 20559, 603, 515, 325, 29938, 5060, 487, 29918, 3149, 988, 931, 1405, 10876, 1256, 448, 29995, 29879, 29914, 29906, 29946, 29914, 29953, 29900, 9995, 1273, 29898, 28041, 1627, 29918, 2267, 2509, 2483, 13, 4706, 20559, 603, 353, 18580, 29889, 9155, 650, 580, 13, 308, 13, 4706, 1121, 353, 525, 4304, 29915, 13, 4706, 565, 20559, 603, 29961, 29900, 5387, 13, 9651, 1121, 353, 20559, 603, 29961, 29900, 29962, 13, 13, 4706, 736, 1121, 13, 1678, 5174, 8960, 29892, 29872, 29901, 13, 4706, 1596, 321, 13, 4706, 736, 6213, 13, 13, 1678, 7146, 29901, 13, 4706, 18580, 29889, 5358, 580, 13, 13, 13, 1753, 679, 29918, 4230, 29918, 14943, 2230, 29898, 13082, 1125, 13, 1678, 1018, 29901, 13, 4706, 18580, 29922, 13082, 29889, 18127, 580, 13, 4706, 18580, 29889, 7978, 703, 15945, 2622, 304, 29918, 3090, 29898, 3317, 29898, 2230, 511, 525, 8071, 29891, 962, 29885, 1289, 25446, 29906, 29946, 9894, 1495, 611, 486, 603, 515, 325, 29938, 5060, 487, 29918, 3149, 5124, 1496, 13, 4706, 1833, 2230, 353, 18580, 29889, 9155, 650, 580, 13, 13, 4706, 1121, 353, 525, 4304, 29915, 13, 4706, 565, 1833, 2230, 29961, 29900, 5387, 13, 9651, 1121, 353, 1833, 2230, 29961, 29900, 29962, 13, 632, 13, 4706, 736, 1121, 13, 1678, 5174, 8960, 29892, 29872, 29901, 13, 4706, 1596, 321, 13, 4706, 736, 6213, 13, 13, 1678, 7146, 29901, 13, 4706, 18580, 29889, 5358, 580, 13, 13, 13, 1753, 679, 29918, 28041, 1627, 29918, 3493, 29918, 3880, 29898, 13082, 1125, 13, 1678, 1018, 29901, 13, 4706, 18580, 29922, 13082, 29889, 18127, 580, 13, 4706, 18580, 29889, 7978, 703, 15945, 2622, 2533, 29898, 25376, 29918, 3493, 29918, 3880, 29897, 515, 325, 29938, 28041, 29918, 3757, 22205, 29918, 6203, 29918, 21125, 5124, 1496, 13, 4706, 285, 29890, 29918, 3493, 353, 18580, 29889, 9155, 650, 580, 13, 308, 13, 4706, 1121, 353, 29871, 29900, 13, 4706, 565, 285, 29890, 29918, 3493, 29901, 13, 9651, 1121, 353, 285, 29890, 29918, 3493, 29961, 29900, 29962, 13, 9651, 565, 1121, 1275, 6629, 470, 1121, 338, 6213, 29901, 13, 18884, 1121, 353, 29871, 29900, 13, 13, 4706, 736, 1121, 13, 1678, 5174, 8960, 29892, 29872, 29901, 13, 4706, 1596, 321, 13, 4706, 736, 6213, 13, 13, 1678, 7146, 29901, 13, 4706, 18580, 29889, 5358, 580, 13, 13, 13, 1753, 679, 29918, 5060, 487, 3149, 29898, 13082, 29892, 11013, 1627, 29918, 2267, 2509, 1125, 13, 1678, 1018, 29901, 13, 4706, 18580, 29922, 13082, 29889, 18127, 580, 13, 4706, 18580, 29889, 7978, 703, 2622, 1024, 515, 325, 29938, 5060, 487, 29918, 3149, 988, 931, 1405, 10876, 1256, 448, 29995, 29879, 29914, 29953, 29900, 29914, 29906, 29946, 1797, 491, 1024, 5153, 376, 1273, 29898, 28041, 1627, 29918, 2267, 2509, 2483, 13, 4706, 1051, 353, 18580, 29889, 9155, 497, 580, 13, 4706, 736, 1051, 13, 13, 1678, 5174, 8960, 29892, 29872, 29901, 13, 4706, 736, 6213, 13, 4706, 1596, 321, 13, 13, 1678, 7146, 29901, 13, 4706, 18580, 29889, 5358, 580, 13, 13, 13, 1753, 679, 29918, 4548, 533, 29918, 5060, 487, 29918, 1761, 29898, 13082, 29892, 11013, 1627, 29918, 2267, 2509, 1125, 13, 1678, 1018, 29901, 13, 4706, 18580, 29922, 13082, 29889, 18127, 580, 13, 4706, 18580, 29889, 7978, 703, 2622, 1024, 515, 325, 29938, 5060, 487, 29918, 3149, 988, 931, 529, 10876, 1256, 448, 1273, 29879, 29914, 29953, 29900, 29914, 29906, 29946, 376, 1273, 29898, 28041, 1627, 29918, 2267, 2509, 2483, 13, 4706, 1051, 353, 18580, 29889, 9155, 497, 580, 13, 4706, 736, 1051, 13, 13, 1678, 5174, 8960, 29892, 29872, 29901, 13, 4706, 736, 6213, 13, 4706, 1596, 321, 13, 13, 1678, 7146, 29901, 13, 4706, 18580, 29889, 5358, 580, 13, 308, 13, 308, 13, 1753, 679, 29918, 24051, 3535, 29898, 13082, 1125, 13, 1678, 1018, 29901, 13, 4706, 18580, 29922, 13082, 29889, 18127, 580, 13, 4706, 18580, 29889, 7978, 703, 15945, 2622, 260, 567, 978, 29892, 4882, 29892, 29885, 629, 29892, 3317, 29918, 2311, 29892, 21962, 29918, 2311, 29892, 4236, 29918, 3880, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 29871, 515, 313, 6404, 270, 29889, 24051, 3535, 29918, 978, 260, 567, 978, 29892, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 1669, 270, 29889, 4882, 4660, 29892, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 1669, 270, 29889, 28192, 29918, 3493, 29918, 21895, 286, 629, 29892, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 1669, 7495, 29918, 11282, 29898, 29940, 29963, 29931, 29898, 509, 4661, 29898, 29909, 29889, 3317, 13193, 847, 29871, 29896, 29900, 29906, 29946, 847, 29871, 29896, 29900, 29906, 29946, 511, 29871, 29900, 511, 525, 29929, 29929, 29929, 29929, 29929, 29929, 29929, 29900, 1495, 4236, 29918, 2311, 29892, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 1669, 7495, 29918, 11282, 29898, 29940, 29963, 29931, 29898, 509, 4661, 29898, 29874, 29889, 13193, 847, 29871, 29896, 29900, 29906, 29946, 847, 29871, 29896, 29900, 29906, 29946, 511, 29871, 29900, 511, 525, 29929, 29929, 29929, 29929, 29929, 29929, 29929, 29900, 1495, 16256, 29918, 2311, 29892, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 1669, 7495, 29918, 11282, 29898, 29940, 29963, 29931, 3552, 29874, 29889, 13193, 448, 405, 29963, 29931, 29898, 29888, 29889, 13193, 29892, 29871, 29900, 876, 847, 263, 29889, 13193, 334, 29871, 29896, 29900, 29900, 29892, 29871, 29900, 511, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 462, 539, 525, 29929, 29929, 29900, 29928, 29900, 29900, 1495, 274, 29918, 3880, 29892, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 1669, 7495, 29918, 11282, 29898, 29940, 29963, 29931, 3552, 29874, 29889, 13193, 448, 405, 29963, 29931, 29898, 29888, 29889, 13193, 29892, 29871, 29900, 876, 847, 263, 29889, 3317, 13193, 334, 29871, 29896, 29900, 29900, 29892, 29871, 29900, 511, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 462, 539, 525, 29929, 29929, 29900, 29928, 29900, 29900, 1495, 4236, 29918, 3880, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 3986, 3895, 10876, 29889, 29881, 2291, 29918, 24051, 22459, 270, 29892, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 1669, 313, 6404, 6131, 3535, 29918, 978, 29892, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 462, 539, 2533, 29898, 13193, 29897, 6262, 29892, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 462, 539, 22753, 29898, 4878, 4469, 1062, 575, 1821, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 462, 632, 746, 525, 6632, 29915, 769, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 462, 795, 6770, 29911, 2890, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 462, 632, 746, 525, 21143, 29915, 769, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 462, 795, 18134, 22716, 29911, 2890, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 462, 632, 1683, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 462, 795, 1870, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 462, 965, 1095, 29897, 4236, 13193, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 462, 29871, 3895, 270, 2291, 29918, 1272, 29918, 5325, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 462, 15345, 6770, 6131, 3535, 29918, 978, 29897, 263, 29892, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 1669, 313, 6404, 6131, 3535, 29918, 978, 29892, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 462, 539, 22753, 29898, 13193, 29897, 6262, 29892, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 462, 539, 18134, 29898, 13193, 29897, 10150, 29918, 9021, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 462, 29871, 3895, 270, 2291, 29918, 9021, 29918, 3493, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 462, 15345, 6770, 6131, 3535, 29918, 978, 29897, 285, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 308, 5754, 270, 29889, 24051, 3535, 29918, 978, 353, 263, 29889, 24051, 3535, 29918, 978, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 965, 5300, 270, 29889, 24051, 3535, 29918, 978, 353, 285, 29889, 24051, 3535, 29918, 978, 29898, 29974, 876, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 1797, 491, 4236, 29918, 3880, 5153, 5124, 1496, 13, 4706, 1051, 353, 18580, 29889, 9155, 497, 580, 13, 4706, 736, 1051, 13, 13, 1678, 5174, 8960, 29892, 29872, 29901, 13, 4706, 736, 6213, 13, 4706, 1596, 321, 13, 13, 1678, 7146, 29901, 13, 4706, 18580, 29889, 5358, 580, 13, 308, 13, 13, 1753, 679, 29918, 20960, 2972, 29898, 13082, 1125, 13, 1678, 1018, 29901, 13, 4706, 18580, 29922, 13082, 29889, 18127, 580, 13, 4706, 18580, 29889, 7978, 703, 15945, 2622, 1024, 29892, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 539, 2106, 29892, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 539, 1134, 29892, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 539, 3001, 29918, 8337, 29892, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 539, 3889, 29918, 8337, 29892, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 539, 21022, 3552, 29898, 7827, 29918, 8337, 448, 3889, 29918, 8337, 29897, 847, 3001, 29918, 8337, 29897, 334, 29871, 29896, 29900, 29900, 29892, 29871, 29906, 29897, 1304, 29918, 10492, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 29871, 515, 325, 29938, 11625, 29918, 20960, 2972, 5124, 1496, 13, 4706, 1051, 353, 18580, 29889, 9155, 497, 580, 13, 4706, 736, 1051, 13, 13, 1678, 5174, 8960, 29892, 29872, 29901, 13, 4706, 736, 6213, 13, 4706, 1596, 321, 13, 13, 1678, 7146, 29901, 13, 4706, 18580, 29889, 5358, 580, 13, 308, 13, 462, 13, 1753, 679, 29918, 24051, 29898, 13082, 1125, 13, 1678, 1018, 29901, 13, 4706, 18580, 29922, 13082, 29889, 18127, 580, 13, 4706, 18580, 29889, 7978, 703, 2622, 12271, 29892, 12271, 3830, 525, 6169, 3830, 1591, 29918, 978, 515, 270, 2291, 29918, 24051, 14796, 13, 4706, 1051, 353, 18580, 29889, 9155, 497, 580, 13, 4706, 736, 1051, 13, 13, 1678, 5174, 8960, 29892, 29872, 29901, 13, 4706, 736, 6213, 13, 4706, 1596, 321, 13, 13, 1678, 7146, 29901, 13, 4706, 18580, 29889, 5358, 580, 13, 2 ]
sobolev_alignment/krr_approx.py
saroudant/sobolev_alignment
1
1606970
<reponame>saroudant/sobolev_alignment<filename>sobolev_alignment/krr_approx.py """ Encoder approximation by Kernel Ridge Regression @author: <NAME> This modules train a Kernel Ridge Regression (KRR) on a pair of samples (x_hat) and embeddings (z_hat) using two possible implementations: - scikit-learn: deterministic, but limited in memory and time efficiency. - Falkon: stochastic Nyström approximation, faster both in memory and computation time. Optimised for multi GPUs. References ------- [1] Mourragui et al 2022 [2] Meanti et al, Kernel methods through the roof: handling billions of points efficiently, NeurIPS, 2020. [3] Pedregosa et al, Scikit-learn: Machine Learning in Python, Journal of Machine Learning Research, 2011. """ import os, sys, torch, gc import numpy as np from pickle import load, dump from sklearn.preprocessing import StandardScaler # Falkon import from falkon import Falkon, kernels from falkon.options import FalkonOptions from falkon.kernels import GaussianKernel, MaternKernel, LaplacianKernel # Scikit-learn import from sklearn.metrics.pairwise import rbf_kernel, laplacian_kernel from sklearn.gaussian_process.kernels import Matern, RBF from sklearn.gaussian_process.kernels import PairwiseKernel from sklearn.kernel_ridge import KernelRidge class KRRApprox: """ Kernel Ridge Regression approximation. This class contains the functions used to approximate the encoding functions of a Variational Auto Encoder (VAE) by a kernel machines by means of Kernel Ridge Regression (KRR). <br/> This class takes as input a training data and executes the learning process. The generation of artificial samples and subsequent computation of embeddings is not part of this class. """ sklearn_kernel = { 'rbf': 'wrapper', 'gaussian': 'wrapper', 'laplacian': 'wrapper', 'matern': Matern, } falkon_kernel = { 'rbf': GaussianKernel, 'gaussian': GaussianKernel, 'laplacian': LaplacianKernel, 'matern': MaternKernel, } default_kernel_params = { 'falkon': { 'rbf': {'sigma': 1}, 'gaussian': {'sigma': 1}, 'laplacian': {'sigma': 1}, 'matern': {'sigma': 1, 'nu': .5}}, 'sklearn': { 'rbf': {}, 'gaussian': {}, 'laplacian': {}, 'matern': {}} } def __init__( self, method: str = 'sklearn', kernel: str = 'rbf', M: int = 100, kernel_params: dict = None, penalization: float = 1e-6, maxiter: int=20, falkon_options: dict = {}, mean_center: bool=False, unit_std: bool=False ): """ Parameters ---------- method: str, default to 'sklearn'. Method used for KRR approximation, 'sklearn' or 'falkon'. kernel: str, default to 'rbf' Name of the kernel to use in the approximation: 'rbf' (Gaussian kernel), 'matern' (Matern kernel), 'laplace' (Laplace). M: int, default to 100 Number of anchors samples for the Nyström approximation. Only used when method='falkon'. Default to 100 corresponds to a very low number of anchors and would lead to a poor approximation. kernel_params: dict, default to None Dictionary containing the kernel hyper-parameters, e.g. nu or sigma parameters for a Matérn kernel. penalization: float, default to 1e-6 Amount of penalization. Higher values induce more penalization. When method='sklearn', it corresponds to alpha (sklearn.kernel_ridge.KernelRidge). maxiter: int, default to 20 Maximum number of iterations in Falkon. falkon_options: dictionary, default to None Additional options to provide to falkon.options.FalkonOptions. More information on Falkon's documentation: https://falkonml.github.io/falkon/api_reference/options.html#falkonoptions mean_center: bool, default to False Whether to mean center features (genes) before regression. unit_std: bool, default to False Whether to standardize features (genes) before regression. """ self.method = method # Set kernel self.kernel = kernel self.kernel_params = kernel_params if kernel_params is not None else self.default_kernel_params[self.method][self.kernel] self._make_kernel() # Set penalization parameters self.penalization = penalization self.M = M self.maxiter = maxiter # Set hardware specifications self.falkon_options = falkon_options # Preprocessing self.mean_center = mean_center self.unit_std = unit_std self.pre_process_ = StandardScaler(with_mean=mean_center, with_std=unit_std, copy=False) def _make_kernel(self): """ Process the kernel parameters and set up the kernel to be used in KRR. Returns ------- True if kernel has successfully been set up. """ # scikit-learn initialization if self.method.lower() == 'sklearn': if self.sklearn_kernel[self.kernel.lower()] != 'wrapper': self.kernel_ = self.sklearn_kernel[self.kernel.lower()](**self.kernel_params) else: self.kernel_ = PairwiseKernel(metric=self.kernel.lower(), **self.kernel_params) # Falkon elif self.method.lower() == 'falkon': self.kernel_ = self.falkon_kernel[self.kernel.lower()](**self.kernel_params) # If not implemented else: raise NotImplementedError('%s not implemented. Choices: sklearn and falkon'%(self.method)) return True def fit(self, X: torch.Tensor, y: torch.Tensor): """ Train a regression model (KRR) between X and all columns of Y. Parameters ---------- X: torch.Tensor Tensor containing the artificial input (x_hat), with samples in the rows. y: torch.Tensor Tensor containing the artificial embedding (z_hat). Called y for compliance with sklearn functions. Returns ------- self: fitted KRRApprox instance. """ self._setup_clf() # Process data if required. No direct use of StandardScaler when mean_center and unit_std # are False as it can have a large memory footprint. if self.mean_center or self.unit_std: self.pre_process_.fit(X) self.training_data_ = torch.Tensor(self.pre_process_.transform(torch.Tensor(X))) else: self.training_data_ = X self.training_label_ = y # Train KRR instances. if self.method == 'sklearn': self.ridge_clf_.fit(self.kernel_(self.training_data_), y) elif self.method == 'falkon': self.ridge_clf_.fit(self.training_data_, y) self._save_coefs() if self.method == 'falkon': self.training_data_ = self.ridge_clf_.ny_points_ gc.collect() return self def _setup_clf(self): if self.method.lower() == 'sklearn': self._setup_sklearn_clf() elif self.method.lower() == 'falkon': self._setup_falkon_clf() def _setup_sklearn_clf(self): """ Set up the regression model using scikit-learn implementation Returns ------- True if set up ran properly. """ self.ridge_clf_ = KernelRidge(kernel='precomputed',alpha=self.penalization) return True def _setup_falkon_clf(self): """ Set up the regression model using Falkon implementation Returns ------- True if set up ran properly. """ self.ridge_clf_ = Falkon( kernel=self.kernel_, penalty=self.penalization, M=self.M, maxiter=self.maxiter, options=FalkonOptions(**self.falkon_options) ) return True def _save_coefs(self): if self.method.lower() == 'sklearn': self._process_coef_ridge_sklearn() elif self.method.lower() == 'falkon': self._process_coef_ridge_falkon() def _process_coef_ridge_sklearn(self): """ Save and process (i.e. transform to torch.Tensor) the coefficients obtained after kernel ridge regression with scikit-learn implementation """ self.sample_weights_ = torch.Tensor(self.ridge_clf_.dual_coef_) self.ridge_samples_idx_ = np.arange(self.training_data_.shape[0]) def _process_coef_ridge_falkon(self): """ Save the coefficients obtained after kernel ridge regression with Falkon implementation. """ self.sample_weights_ = self.ridge_clf_.alpha_ def anchors(self): """ Return anchor points used in KRR. """ return self.training_data_ def transform( self, X: torch.Tensor ): """ Apply the trained KRR models to a given data. This corresponds to the out-of-sample extension. Parameters ---------- X: torch.Tensor Tensor containing gene expression profiles with samples in the rows. <br/> <b>WARNING:</b> genes (features) need to be following the same order as the training data. Returns ------- torch.Tensor with predicted values for each of the encoding functions. Samples are in the rows and encoding functions (embedding) in the columns. """ if self.mean_center or self.unit_std: X = torch.Tensor(self.pre_process_.transform(X)) if self.method == 'sklearn': return self.ridge_clf_.predict(self.kernel_(X, self.training_data_)) elif self.method == 'falkon': return self.ridge_clf_.predict(X) else: raise NotImplementedError('%s not implemented. Choices: sklearn and falkon'%(self.method)) def save(self, folder:str = '.'): """ Save the instance Parameters ---------- folder: str, default to '.' Folder path to use for saving the instance Returns ------- True if the instance was properly saved. """ # Create path should it not exist yet. if not os.path.exists(folder) and not os.path.isdir(folder): os.mkdir(folder) # Save parameters of KRR. params = { 'method': self.method, 'kernel': self.kernel_, 'M': self.M, 'penalization': self.penalization, 'mean_center': self.mean_center, 'unit_std': self.unit_std } params.update(self.kernel_params) dump(params, open('%s/params.pkl'%(folder), 'wb')) # Save important material: # - KRR weights # - Samples used for prediction. torch.save( torch.Tensor(self.anchors()), open('%s/sample_anchors.pt'%(folder), 'wb') ) torch.save( torch.Tensor(self.sample_weights_), open('%s/sample_weights.pt'%(folder), 'wb') ) # Save weights and anchors as csv. Longer to load, but compatible with all platforms. # NOTE: was created to insure higher compatibility than torch saving option. np.savetxt('%s/sample_weights.csv'%(folder), self.sample_weights_.detach().numpy()) np.savetxt('%s/sample_anchors.csv'%(folder), self.anchors().detach().numpy()) return True def load(folder:str = '.'): """ Load a KRRApprox instance. Parameters ---------- folder: str, default to '.' Folder path where the instance is located Returns ------- KRRApprox: instance saved at the folder location. """ # Load and format parameters. params = load(open('%s/params.pkl'%(folder), 'rb')) krr_params = {e:f for e,f in params.items() if e in ['method', 'M', 'penalization', 'mean_center', 'unit_std']} # krr_params['kernel'] = krr_params['kernel'].kernel_name krr_approx_clf = KRRApprox(**krr_params) krr_approx_clf.kernel_ = params['kernel'] # Load sample weights and anchors. # NOTE: we use the torch option. In case of incompatibility, one could use the csv option. krr_approx_clf.sample_weights_ = torch.load(open('%s/sample_weights.pt'%(folder), 'rb')) krr_approx_clf.training_data_ = torch.load(open('%s/sample_anchors.pt'%(folder), 'rb')) # Set up classifiers for out-of-sample application. krr_approx_clf._setup_clf() krr_approx_clf.ridge_clf_.ny_points_ = krr_approx_clf.training_data_ krr_approx_clf.ridge_clf_.alpha_ = krr_approx_clf.sample_weights_ return krr_approx_clf
[ 1, 529, 276, 1112, 420, 29958, 29879, 279, 2736, 424, 29914, 578, 833, 2608, 29918, 2520, 358, 29966, 9507, 29958, 578, 833, 2608, 29918, 2520, 358, 29914, 12748, 29878, 29918, 14850, 29889, 2272, 13, 15945, 29908, 11346, 6119, 16845, 491, 476, 5851, 390, 5525, 2169, 23881, 13, 13, 29992, 8921, 29901, 529, 5813, 29958, 13, 13, 4013, 10585, 7945, 263, 476, 5851, 390, 5525, 2169, 23881, 313, 29968, 29934, 29934, 29897, 373, 263, 5101, 310, 11916, 29871, 13, 29898, 29916, 29918, 2455, 29897, 322, 8297, 29881, 886, 313, 29920, 29918, 2455, 29897, 773, 1023, 1950, 20240, 29901, 13, 1678, 448, 4560, 7354, 29899, 19668, 29901, 11806, 4695, 29892, 541, 9078, 297, 3370, 322, 931, 19201, 29889, 13, 1678, 448, 383, 2235, 265, 29901, 380, 28225, 16693, 25961, 16845, 29892, 8473, 1716, 297, 3370, 29871, 13, 1678, 322, 16287, 931, 29889, 20693, 326, 3368, 363, 2473, 22796, 29879, 29889, 13, 12, 13, 1123, 10662, 13, 26589, 13, 29961, 29896, 29962, 341, 473, 1431, 1481, 634, 394, 29871, 29906, 29900, 29906, 29906, 13, 29961, 29906, 29962, 2191, 3656, 634, 394, 29892, 476, 5851, 3519, 1549, 278, 17526, 29901, 11415, 11118, 1080, 310, 3291, 29497, 29892, 13, 29940, 5411, 5690, 29903, 29892, 29871, 29906, 29900, 29906, 29900, 29889, 13, 29961, 29941, 29962, 9293, 1727, 3628, 634, 394, 29892, 5636, 7354, 29899, 19668, 29901, 6189, 29257, 297, 5132, 29892, 8237, 310, 6189, 29257, 13, 1666, 2842, 29892, 29871, 29906, 29900, 29896, 29896, 29889, 13, 15945, 29908, 13, 13, 5215, 2897, 29892, 10876, 29892, 4842, 305, 29892, 330, 29883, 13, 5215, 12655, 408, 7442, 13, 3166, 5839, 280, 1053, 2254, 29892, 16766, 13, 3166, 2071, 19668, 29889, 1457, 19170, 1053, 10117, 29636, 261, 13, 13, 29937, 383, 2235, 265, 1053, 13, 3166, 285, 2235, 265, 1053, 383, 2235, 265, 29892, 413, 824, 1379, 13, 3166, 285, 2235, 265, 29889, 6768, 1053, 383, 2235, 265, 5856, 13, 3166, 285, 2235, 265, 29889, 22178, 1379, 1053, 22477, 29968, 5851, 29892, 5345, 824, 29968, 5851, 29892, 20298, 433, 28445, 29968, 5851, 13, 13, 29937, 5636, 7354, 29899, 19668, 1053, 13, 3166, 2071, 19668, 29889, 2527, 10817, 29889, 18784, 3538, 1053, 364, 1635, 29918, 17460, 29892, 425, 13974, 28445, 29918, 17460, 13, 3166, 2071, 19668, 29889, 29887, 17019, 29918, 5014, 29889, 22178, 1379, 1053, 5345, 824, 29892, 390, 28062, 13, 3166, 2071, 19668, 29889, 29887, 17019, 29918, 5014, 29889, 22178, 1379, 1053, 349, 1466, 3538, 29968, 5851, 13, 3166, 2071, 19668, 29889, 17460, 29918, 8605, 1053, 476, 5851, 29934, 5525, 13, 13, 13, 1990, 476, 29934, 29934, 2052, 307, 29916, 29901, 13, 1678, 9995, 13, 1678, 476, 5851, 390, 5525, 2169, 23881, 16845, 29889, 13, 13, 1678, 910, 770, 3743, 278, 3168, 1304, 304, 26368, 278, 8025, 3168, 310, 263, 9586, 1288, 13, 1678, 11133, 11346, 6119, 313, 29963, 16036, 29897, 491, 263, 8466, 14884, 491, 2794, 310, 476, 5851, 390, 5525, 2169, 23881, 313, 29968, 29934, 29934, 467, 29871, 13, 1678, 529, 1182, 3779, 13, 1678, 910, 770, 4893, 408, 1881, 263, 6694, 848, 322, 24138, 278, 6509, 1889, 29889, 450, 12623, 310, 29871, 13, 1678, 23116, 11916, 322, 15352, 16287, 310, 8297, 29881, 886, 338, 451, 760, 310, 445, 770, 29889, 13, 1678, 9995, 13, 13, 1678, 2071, 19668, 29918, 17460, 353, 426, 13, 4706, 525, 29878, 1635, 2396, 525, 17699, 742, 13, 4706, 525, 29887, 17019, 2396, 525, 17699, 742, 13, 4706, 525, 6984, 433, 28445, 2396, 525, 17699, 742, 13, 4706, 525, 2922, 824, 2396, 5345, 824, 29892, 13, 1678, 500, 13, 13, 1678, 285, 2235, 265, 29918, 17460, 353, 426, 13, 4706, 525, 29878, 1635, 2396, 22477, 29968, 5851, 29892, 13, 4706, 525, 29887, 17019, 2396, 22477, 29968, 5851, 29892, 13, 4706, 525, 6984, 433, 28445, 2396, 20298, 433, 28445, 29968, 5851, 29892, 13, 4706, 525, 2922, 824, 2396, 5345, 824, 29968, 5851, 29892, 13, 1678, 500, 13, 13, 1678, 2322, 29918, 17460, 29918, 7529, 353, 426, 13, 4706, 525, 29888, 2235, 265, 2396, 426, 525, 29878, 1635, 2396, 11117, 3754, 2396, 29871, 29896, 1118, 525, 29887, 17019, 2396, 11117, 3754, 2396, 29871, 29896, 1118, 525, 6984, 433, 28445, 2396, 11117, 3754, 2396, 29871, 29896, 1118, 525, 2922, 824, 2396, 11117, 3754, 2396, 29871, 29896, 29892, 525, 3433, 2396, 869, 29945, 11656, 13, 4706, 525, 808, 19668, 2396, 426, 525, 29878, 1635, 2396, 24335, 525, 29887, 17019, 2396, 24335, 525, 6984, 433, 28445, 2396, 24335, 525, 2922, 824, 2396, 426, 930, 13, 1678, 500, 13, 13, 1678, 822, 4770, 2344, 12035, 13, 4706, 1583, 29892, 13, 4706, 1158, 29901, 851, 353, 525, 808, 19668, 742, 13, 4706, 8466, 29901, 851, 353, 525, 29878, 1635, 742, 13, 4706, 341, 29901, 938, 353, 29871, 29896, 29900, 29900, 29892, 13, 4706, 8466, 29918, 7529, 29901, 9657, 353, 6213, 29892, 13, 4706, 6584, 284, 2133, 29901, 5785, 353, 29871, 29896, 29872, 29899, 29953, 29892, 13, 4706, 4236, 1524, 29901, 938, 29922, 29906, 29900, 29892, 13, 4706, 285, 2235, 265, 29918, 6768, 29901, 9657, 353, 24335, 13, 4706, 2099, 29918, 5064, 29901, 6120, 29922, 8824, 29892, 13, 4706, 5190, 29918, 4172, 29901, 6120, 29922, 8824, 13, 268, 1125, 13, 4706, 9995, 13, 4706, 12662, 2699, 13, 4706, 448, 1378, 29899, 13, 4706, 1158, 29901, 851, 29892, 2322, 304, 525, 808, 19668, 4286, 13, 9651, 8108, 1304, 363, 476, 29934, 29934, 16845, 29892, 525, 808, 19668, 29915, 470, 525, 29888, 2235, 265, 4286, 13, 4706, 8466, 29901, 851, 29892, 2322, 304, 525, 29878, 1635, 29915, 13, 9651, 4408, 310, 278, 8466, 304, 671, 297, 278, 16845, 29901, 525, 29878, 1635, 29915, 313, 29954, 17019, 8466, 511, 29871, 13, 9651, 525, 2922, 824, 29915, 313, 9782, 824, 8466, 511, 525, 433, 6689, 29915, 313, 29931, 481, 1265, 467, 13, 4706, 341, 29901, 938, 29892, 2322, 304, 29871, 29896, 29900, 29900, 13, 9651, 9681, 310, 23791, 943, 11916, 363, 278, 16693, 25961, 16845, 29889, 9333, 1304, 746, 13, 9651, 1158, 2433, 29888, 2235, 265, 4286, 13109, 304, 29871, 29896, 29900, 29900, 16161, 304, 263, 1407, 4482, 1353, 310, 23791, 943, 13, 9651, 322, 723, 3275, 304, 263, 6460, 16845, 29889, 13, 4706, 8466, 29918, 7529, 29901, 9657, 29892, 2322, 304, 6213, 13, 9651, 13343, 6943, 278, 8466, 11266, 29899, 16744, 29892, 321, 29889, 29887, 29889, 4948, 470, 269, 2934, 4128, 13, 9651, 363, 263, 5345, 1064, 29876, 8466, 29889, 13, 4706, 6584, 284, 2133, 29901, 5785, 29892, 2322, 304, 29871, 29896, 29872, 29899, 29953, 13, 9651, 1913, 792, 310, 6584, 284, 2133, 29889, 5057, 261, 1819, 9013, 346, 901, 6584, 284, 2133, 29889, 1932, 1158, 2433, 808, 19668, 742, 29871, 13, 9651, 372, 16161, 304, 15595, 313, 808, 19668, 29889, 17460, 29918, 8605, 29889, 29968, 5851, 29934, 5525, 467, 13, 4706, 4236, 1524, 29901, 938, 29892, 2322, 304, 29871, 29906, 29900, 13, 9651, 5918, 12539, 1353, 310, 24372, 297, 383, 2235, 265, 29889, 13, 4706, 285, 2235, 265, 29918, 6768, 29901, 8600, 29892, 2322, 304, 6213, 13, 9651, 3462, 3245, 3987, 304, 3867, 304, 285, 2235, 265, 29889, 6768, 29889, 29943, 2235, 265, 5856, 29889, 5853, 2472, 373, 29871, 13, 9651, 383, 2235, 265, 29915, 29879, 5106, 29901, 29871, 13, 9651, 2045, 597, 29888, 2235, 265, 828, 29889, 3292, 29889, 601, 29914, 29888, 2235, 265, 29914, 2754, 29918, 5679, 29914, 6768, 29889, 1420, 29937, 29888, 2235, 3231, 1980, 13, 4706, 2099, 29918, 5064, 29901, 6120, 29892, 2322, 304, 7700, 13, 9651, 26460, 304, 2099, 4818, 5680, 313, 1885, 267, 29897, 1434, 17855, 29889, 13, 4706, 5190, 29918, 4172, 29901, 6120, 29892, 2322, 304, 7700, 13, 9651, 26460, 304, 3918, 675, 5680, 313, 1885, 267, 29897, 1434, 17855, 29889, 13, 13, 4706, 9995, 13, 13, 13, 4706, 1583, 29889, 5696, 353, 1158, 13, 13, 4706, 396, 3789, 8466, 13, 4706, 1583, 29889, 17460, 353, 8466, 13, 4706, 1583, 29889, 17460, 29918, 7529, 353, 8466, 29918, 7529, 565, 8466, 29918, 7529, 338, 451, 6213, 1683, 1583, 29889, 4381, 29918, 17460, 29918, 7529, 29961, 1311, 29889, 5696, 3816, 1311, 29889, 17460, 29962, 13, 4706, 1583, 3032, 5675, 29918, 17460, 580, 13, 13, 4706, 396, 3789, 6584, 284, 2133, 4128, 13, 4706, 1583, 29889, 2238, 284, 2133, 353, 6584, 284, 2133, 13, 4706, 1583, 29889, 29924, 353, 341, 13, 4706, 1583, 29889, 3317, 1524, 353, 4236, 1524, 13, 13, 4706, 396, 3789, 12837, 2702, 800, 13, 4706, 1583, 29889, 29888, 2235, 265, 29918, 6768, 353, 285, 2235, 265, 29918, 6768, 13, 13, 4706, 396, 4721, 19170, 13, 4706, 1583, 29889, 12676, 29918, 5064, 353, 2099, 29918, 5064, 13, 4706, 1583, 29889, 5441, 29918, 4172, 353, 5190, 29918, 4172, 13, 4706, 1583, 29889, 1457, 29918, 5014, 29918, 353, 10117, 29636, 261, 29898, 2541, 29918, 12676, 29922, 12676, 29918, 5064, 29892, 411, 29918, 4172, 29922, 5441, 29918, 4172, 29892, 3509, 29922, 8824, 29897, 13, 13, 13, 1678, 822, 903, 5675, 29918, 17460, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 10554, 278, 8466, 4128, 322, 731, 701, 278, 8466, 304, 367, 1304, 297, 476, 29934, 29934, 29889, 13, 13, 4706, 16969, 13, 4706, 448, 22158, 13, 4706, 5852, 565, 8466, 756, 8472, 1063, 731, 701, 29889, 13, 4706, 9995, 13, 13, 4706, 396, 4560, 7354, 29899, 19668, 17865, 13, 4706, 565, 1583, 29889, 5696, 29889, 13609, 580, 1275, 525, 808, 19668, 2396, 13, 9651, 565, 1583, 29889, 808, 19668, 29918, 17460, 29961, 1311, 29889, 17460, 29889, 13609, 580, 29962, 2804, 525, 17699, 2396, 13, 18884, 1583, 29889, 17460, 29918, 353, 1583, 29889, 808, 19668, 29918, 17460, 29961, 1311, 29889, 17460, 29889, 13609, 580, 850, 1068, 1311, 29889, 17460, 29918, 7529, 29897, 13, 9651, 1683, 29901, 13, 18884, 1583, 29889, 17460, 29918, 353, 349, 1466, 3538, 29968, 5851, 29898, 16414, 29922, 1311, 29889, 17460, 29889, 13609, 3285, 3579, 1311, 29889, 17460, 29918, 7529, 29897, 13, 13, 4706, 396, 383, 2235, 265, 13, 4706, 25342, 1583, 29889, 5696, 29889, 13609, 580, 1275, 525, 29888, 2235, 265, 2396, 13, 9651, 1583, 29889, 17460, 29918, 353, 1583, 29889, 29888, 2235, 265, 29918, 17460, 29961, 1311, 29889, 17460, 29889, 13609, 580, 850, 1068, 1311, 29889, 17460, 29918, 7529, 29897, 13, 13, 4706, 396, 960, 451, 8762, 13, 4706, 1683, 29901, 13, 9651, 12020, 2216, 1888, 2037, 287, 2392, 877, 29995, 29879, 451, 8762, 29889, 14542, 1575, 29901, 2071, 19668, 322, 285, 2235, 265, 29915, 29995, 29898, 1311, 29889, 5696, 876, 13, 13, 4706, 736, 5852, 13, 13, 13, 1678, 822, 6216, 29898, 1311, 29892, 1060, 29901, 4842, 305, 29889, 29911, 6073, 29892, 343, 29901, 4842, 305, 29889, 29911, 6073, 1125, 13, 4706, 9995, 13, 4706, 28186, 263, 17855, 1904, 313, 29968, 29934, 29934, 29897, 1546, 1060, 322, 599, 4341, 310, 612, 29889, 13, 13, 4706, 12662, 2699, 13, 4706, 448, 1378, 29899, 13, 4706, 1060, 29901, 4842, 305, 29889, 29911, 6073, 13, 9651, 323, 6073, 6943, 278, 23116, 1881, 313, 29916, 29918, 2455, 511, 411, 11916, 297, 278, 4206, 29889, 13, 4706, 343, 29901, 4842, 305, 29889, 29911, 6073, 13, 9651, 323, 6073, 6943, 278, 23116, 23655, 313, 29920, 29918, 2455, 467, 3037, 839, 343, 363, 752, 13036, 411, 13, 9651, 2071, 19668, 3168, 29889, 13, 13, 4706, 16969, 13, 4706, 448, 22158, 13, 4706, 1583, 29901, 25890, 476, 29934, 29934, 2052, 307, 29916, 2777, 29889, 13, 4706, 9995, 13, 13, 4706, 1583, 3032, 14669, 29918, 695, 29888, 580, 13, 13, 4706, 396, 10554, 848, 565, 3734, 29889, 1939, 1513, 671, 310, 10117, 29636, 261, 746, 2099, 29918, 5064, 322, 5190, 29918, 4172, 13, 4706, 396, 526, 7700, 408, 372, 508, 505, 263, 2919, 3370, 3661, 2158, 29889, 13, 4706, 565, 1583, 29889, 12676, 29918, 5064, 470, 1583, 29889, 5441, 29918, 4172, 29901, 13, 9651, 1583, 29889, 1457, 29918, 5014, 5396, 9202, 29898, 29990, 29897, 13, 9651, 1583, 29889, 26495, 29918, 1272, 29918, 353, 4842, 305, 29889, 29911, 6073, 29898, 1311, 29889, 1457, 29918, 5014, 5396, 9067, 29898, 7345, 305, 29889, 29911, 6073, 29898, 29990, 4961, 13, 4706, 1683, 29901, 13, 9651, 1583, 29889, 26495, 29918, 1272, 29918, 353, 1060, 13, 13, 4706, 1583, 29889, 26495, 29918, 1643, 29918, 353, 343, 13, 13, 4706, 396, 28186, 476, 29934, 29934, 8871, 29889, 13, 4706, 565, 1583, 29889, 5696, 1275, 525, 808, 19668, 2396, 13, 9651, 1583, 29889, 8605, 29918, 695, 29888, 5396, 9202, 29898, 1311, 29889, 17460, 23538, 1311, 29889, 26495, 29918, 1272, 29918, 511, 343, 29897, 13, 4706, 25342, 1583, 29889, 5696, 1275, 525, 29888, 2235, 265, 2396, 13, 9651, 1583, 29889, 8605, 29918, 695, 29888, 5396, 9202, 29898, 1311, 29889, 26495, 29918, 1272, 3383, 343, 29897, 13, 13, 4706, 1583, 3032, 7620, 29918, 1111, 1389, 29879, 580, 13, 13, 4706, 565, 1583, 29889, 5696, 1275, 525, 29888, 2235, 265, 2396, 13, 9651, 1583, 29889, 26495, 29918, 1272, 29918, 353, 1583, 29889, 8605, 29918, 695, 29888, 5396, 1460, 29918, 9748, 29918, 13, 4706, 330, 29883, 29889, 15914, 580, 13, 13, 4706, 736, 1583, 13, 13, 13, 1678, 822, 903, 14669, 29918, 695, 29888, 29898, 1311, 1125, 13, 4706, 565, 1583, 29889, 5696, 29889, 13609, 580, 1275, 525, 808, 19668, 2396, 13, 9651, 1583, 3032, 14669, 29918, 808, 19668, 29918, 695, 29888, 580, 13, 4706, 25342, 1583, 29889, 5696, 29889, 13609, 580, 1275, 525, 29888, 2235, 265, 2396, 13, 9651, 1583, 3032, 14669, 29918, 29888, 2235, 265, 29918, 695, 29888, 580, 13, 13, 13, 1678, 822, 903, 14669, 29918, 808, 19668, 29918, 695, 29888, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 3789, 701, 278, 17855, 1904, 773, 4560, 7354, 29899, 19668, 5314, 13, 13, 4706, 16969, 13, 4706, 448, 22158, 13, 4706, 5852, 565, 731, 701, 6350, 6284, 29889, 13, 4706, 9995, 13, 4706, 1583, 29889, 8605, 29918, 695, 29888, 29918, 353, 476, 5851, 29934, 5525, 29898, 17460, 2433, 1457, 12097, 287, 742, 2312, 29922, 1311, 29889, 2238, 284, 2133, 29897, 13, 4706, 736, 5852, 13, 13, 13, 1678, 822, 903, 14669, 29918, 29888, 2235, 265, 29918, 695, 29888, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 3789, 701, 278, 17855, 1904, 773, 383, 2235, 265, 5314, 13, 13, 4706, 16969, 13, 4706, 448, 22158, 13, 4706, 5852, 565, 731, 701, 6350, 6284, 29889, 13, 4706, 9995, 13, 4706, 1583, 29889, 8605, 29918, 695, 29888, 29918, 353, 383, 2235, 265, 29898, 13, 9651, 8466, 29922, 1311, 29889, 17460, 3383, 13, 9651, 27368, 29922, 1311, 29889, 2238, 284, 2133, 29892, 13, 9651, 341, 29922, 1311, 29889, 29924, 29892, 13, 9651, 4236, 1524, 29922, 1311, 29889, 3317, 1524, 29892, 13, 9651, 3987, 29922, 29943, 2235, 265, 5856, 29898, 1068, 1311, 29889, 29888, 2235, 265, 29918, 6768, 29897, 13, 4706, 1723, 13, 4706, 736, 5852, 13, 13, 13, 1678, 822, 903, 7620, 29918, 1111, 1389, 29879, 29898, 1311, 1125, 13, 4706, 565, 1583, 29889, 5696, 29889, 13609, 580, 1275, 525, 808, 19668, 2396, 13, 9651, 1583, 3032, 5014, 29918, 1111, 1389, 29918, 8605, 29918, 808, 19668, 580, 13, 4706, 25342, 1583, 29889, 5696, 29889, 13609, 580, 1275, 525, 29888, 2235, 265, 2396, 13, 9651, 1583, 3032, 5014, 29918, 1111, 1389, 29918, 8605, 29918, 29888, 2235, 265, 580, 13, 13, 13, 1678, 822, 903, 5014, 29918, 1111, 1389, 29918, 8605, 29918, 808, 19668, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 16913, 322, 1889, 313, 29875, 29889, 29872, 29889, 4327, 304, 4842, 305, 29889, 29911, 6073, 29897, 278, 16127, 7625, 13, 4706, 1156, 8466, 364, 5525, 17855, 411, 4560, 7354, 29899, 19668, 5314, 29871, 13, 4706, 9995, 13, 4706, 1583, 29889, 11249, 29918, 705, 5861, 29918, 353, 4842, 305, 29889, 29911, 6073, 29898, 1311, 29889, 8605, 29918, 695, 29888, 5396, 700, 284, 29918, 1111, 1389, 19925, 13, 4706, 1583, 29889, 8605, 29918, 27736, 29918, 13140, 29918, 353, 7442, 29889, 279, 927, 29898, 1311, 29889, 26495, 29918, 1272, 5396, 12181, 29961, 29900, 2314, 13, 13, 13, 1678, 822, 903, 5014, 29918, 1111, 1389, 29918, 8605, 29918, 29888, 2235, 265, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 16913, 278, 16127, 7625, 1156, 8466, 364, 5525, 17855, 411, 383, 2235, 265, 13, 4706, 5314, 29889, 29871, 13, 4706, 9995, 13, 4706, 1583, 29889, 11249, 29918, 705, 5861, 29918, 353, 1583, 29889, 8605, 29918, 695, 29888, 5396, 2312, 29918, 13, 13, 13, 1678, 822, 23791, 943, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 7106, 17360, 3291, 1304, 297, 476, 29934, 29934, 29889, 13, 4706, 9995, 13, 4706, 736, 1583, 29889, 26495, 29918, 1272, 29918, 13, 13, 13, 1678, 822, 4327, 29898, 13, 9651, 1583, 29892, 13, 9651, 1060, 29901, 4842, 305, 29889, 29911, 6073, 13, 268, 1125, 13, 4706, 9995, 13, 4706, 2401, 368, 278, 16370, 476, 29934, 29934, 4733, 304, 263, 2183, 848, 29889, 910, 16161, 304, 278, 714, 29899, 974, 29899, 11249, 13, 4706, 6081, 29889, 13, 13, 4706, 12662, 2699, 13, 4706, 448, 1378, 29899, 13, 4706, 1060, 29901, 4842, 305, 29889, 29911, 6073, 13, 9651, 323, 6073, 6943, 18530, 4603, 28723, 411, 11916, 297, 278, 4206, 29889, 13, 9651, 529, 1182, 3779, 13, 9651, 529, 29890, 29958, 29956, 25614, 29901, 829, 29890, 29958, 2531, 267, 313, 22100, 29897, 817, 304, 367, 1494, 278, 1021, 1797, 408, 278, 6694, 13, 9651, 848, 29889, 13, 13, 4706, 16969, 13, 4706, 448, 22158, 13, 4706, 4842, 305, 29889, 29911, 6073, 411, 25383, 1819, 363, 1269, 310, 278, 8025, 3168, 29889, 3685, 2701, 526, 297, 278, 13, 4706, 4206, 322, 8025, 3168, 313, 17987, 8497, 29897, 297, 278, 4341, 29889, 13, 4706, 9995, 13, 13, 4706, 565, 1583, 29889, 12676, 29918, 5064, 470, 1583, 29889, 5441, 29918, 4172, 29901, 13, 9651, 1060, 353, 4842, 305, 29889, 29911, 6073, 29898, 1311, 29889, 1457, 29918, 5014, 5396, 9067, 29898, 29990, 876, 13, 13, 4706, 565, 1583, 29889, 5696, 1275, 525, 808, 19668, 2396, 13, 9651, 736, 1583, 29889, 8605, 29918, 695, 29888, 5396, 27711, 29898, 1311, 29889, 17460, 23538, 29990, 29892, 1583, 29889, 26495, 29918, 1272, 29918, 876, 13, 4706, 25342, 1583, 29889, 5696, 1275, 525, 29888, 2235, 265, 2396, 13, 9651, 736, 1583, 29889, 8605, 29918, 695, 29888, 5396, 27711, 29898, 29990, 29897, 13, 4706, 1683, 29901, 13, 9651, 12020, 2216, 1888, 2037, 287, 2392, 877, 29995, 29879, 451, 8762, 29889, 14542, 1575, 29901, 2071, 19668, 322, 285, 2235, 265, 29915, 29995, 29898, 1311, 29889, 5696, 876, 13, 13, 13, 1678, 822, 4078, 29898, 1311, 29892, 4138, 29901, 710, 353, 525, 6169, 1125, 13, 4706, 9995, 13, 4706, 16913, 278, 2777, 13, 13, 4706, 12662, 2699, 13, 4706, 448, 1378, 29899, 13, 4706, 4138, 29901, 851, 29892, 2322, 304, 525, 6169, 13, 9651, 383, 3194, 2224, 304, 671, 363, 14238, 278, 2777, 13, 13, 4706, 16969, 13, 4706, 448, 22158, 13, 4706, 5852, 565, 278, 2777, 471, 6284, 7160, 29889, 13, 4706, 9995, 13, 13, 4706, 396, 6204, 2224, 881, 372, 451, 1863, 3447, 29889, 13, 4706, 565, 451, 2897, 29889, 2084, 29889, 9933, 29898, 12083, 29897, 322, 451, 2897, 29889, 2084, 29889, 275, 3972, 29898, 12083, 1125, 13, 9651, 2897, 29889, 11256, 3972, 29898, 12083, 29897, 13, 13, 4706, 396, 16913, 4128, 310, 476, 29934, 29934, 29889, 13, 4706, 8636, 353, 426, 13, 9651, 525, 5696, 2396, 1583, 29889, 5696, 29892, 13, 9651, 525, 17460, 2396, 1583, 29889, 17460, 3383, 13, 9651, 525, 29924, 2396, 1583, 29889, 29924, 29892, 13, 9651, 525, 2238, 284, 2133, 2396, 1583, 29889, 2238, 284, 2133, 29892, 13, 9651, 525, 12676, 29918, 5064, 2396, 1583, 29889, 12676, 29918, 5064, 29892, 13, 9651, 525, 5441, 29918, 4172, 2396, 1583, 29889, 5441, 29918, 4172, 13, 4706, 500, 13, 4706, 8636, 29889, 5504, 29898, 1311, 29889, 17460, 29918, 7529, 29897, 13, 4706, 16766, 29898, 7529, 29892, 1722, 877, 29995, 29879, 29914, 7529, 29889, 29886, 6321, 29915, 29995, 29898, 12083, 511, 525, 29893, 29890, 8785, 13, 13, 4706, 396, 16913, 4100, 5518, 29901, 13, 4706, 396, 259, 448, 476, 29934, 29934, 18177, 13, 4706, 396, 259, 448, 3685, 2701, 1304, 363, 18988, 29889, 13, 4706, 4842, 305, 29889, 7620, 29898, 13, 9651, 4842, 305, 29889, 29911, 6073, 29898, 1311, 29889, 14588, 943, 25739, 29871, 13, 9651, 1722, 877, 29995, 29879, 29914, 11249, 29918, 14588, 943, 29889, 415, 29915, 29995, 29898, 12083, 511, 525, 29893, 29890, 1495, 13, 4706, 1723, 13, 4706, 4842, 305, 29889, 7620, 29898, 13, 9651, 4842, 305, 29889, 29911, 6073, 29898, 1311, 29889, 11249, 29918, 705, 5861, 29918, 511, 29871, 13, 9651, 1722, 877, 29995, 29879, 29914, 11249, 29918, 705, 5861, 29889, 415, 29915, 29995, 29898, 12083, 511, 525, 29893, 29890, 1495, 13, 4706, 1723, 13, 308, 13, 4706, 396, 16913, 18177, 322, 23791, 943, 408, 11799, 29889, 6242, 261, 304, 2254, 29892, 541, 15878, 411, 599, 21796, 29889, 13, 4706, 396, 6058, 29923, 29901, 471, 2825, 304, 1663, 545, 6133, 24521, 1135, 4842, 305, 14238, 2984, 29889, 13, 4706, 7442, 29889, 29879, 485, 300, 486, 877, 29995, 29879, 29914, 11249, 29918, 705, 5861, 29889, 7638, 29915, 29995, 29898, 12083, 511, 1583, 29889, 11249, 29918, 705, 5861, 5396, 4801, 496, 2141, 23749, 3101, 13, 4706, 7442, 29889, 29879, 485, 300, 486, 877, 29995, 29879, 29914, 11249, 29918, 14588, 943, 29889, 7638, 29915, 29995, 29898, 12083, 511, 1583, 29889, 14588, 943, 2141, 4801, 496, 2141, 23749, 3101, 13, 13, 4706, 736, 5852, 13, 13, 13, 1678, 822, 2254, 29898, 12083, 29901, 710, 353, 525, 6169, 1125, 13, 4706, 9995, 13, 4706, 16012, 263, 476, 29934, 29934, 2052, 307, 29916, 2777, 29889, 13, 13, 4706, 12662, 2699, 13, 4706, 448, 1378, 29899, 13, 4706, 4138, 29901, 851, 29892, 2322, 304, 525, 6169, 13, 9651, 383, 3194, 2224, 988, 278, 2777, 338, 5982, 13, 13, 4706, 16969, 13, 4706, 448, 22158, 13, 4706, 476, 29934, 29934, 2052, 307, 29916, 29901, 2777, 7160, 472, 278, 4138, 4423, 29889, 13, 4706, 9995, 13, 13, 4706, 396, 16012, 322, 3402, 4128, 29889, 13, 4706, 8636, 353, 2254, 29898, 3150, 877, 29995, 29879, 29914, 7529, 29889, 29886, 6321, 29915, 29995, 29898, 12083, 511, 525, 6050, 8785, 13, 4706, 12920, 29878, 29918, 7529, 353, 426, 29872, 29901, 29888, 363, 321, 29892, 29888, 297, 8636, 29889, 7076, 580, 565, 321, 297, 6024, 5696, 742, 525, 29924, 742, 525, 2238, 284, 2133, 742, 525, 12676, 29918, 5064, 742, 525, 5441, 29918, 4172, 2033, 29913, 13, 4706, 396, 12920, 29878, 29918, 7529, 1839, 17460, 2033, 353, 12920, 29878, 29918, 7529, 1839, 17460, 13359, 17460, 29918, 978, 13, 4706, 12920, 29878, 29918, 14850, 29918, 695, 29888, 353, 476, 29934, 29934, 2052, 307, 29916, 29898, 1068, 12748, 29878, 29918, 7529, 29897, 13, 4706, 12920, 29878, 29918, 14850, 29918, 695, 29888, 29889, 17460, 29918, 353, 8636, 1839, 17460, 2033, 13, 13, 4706, 396, 16012, 4559, 18177, 322, 23791, 943, 29889, 13, 4706, 396, 6058, 29923, 29901, 591, 671, 278, 4842, 305, 2984, 29889, 512, 1206, 310, 297, 12667, 4127, 29892, 697, 1033, 671, 278, 11799, 2984, 29889, 13, 4706, 12920, 29878, 29918, 14850, 29918, 695, 29888, 29889, 11249, 29918, 705, 5861, 29918, 353, 4842, 305, 29889, 1359, 29898, 3150, 877, 29995, 29879, 29914, 11249, 29918, 705, 5861, 29889, 415, 29915, 29995, 29898, 12083, 511, 525, 6050, 8785, 13, 4706, 12920, 29878, 29918, 14850, 29918, 695, 29888, 29889, 26495, 29918, 1272, 29918, 353, 4842, 305, 29889, 1359, 29898, 3150, 877, 29995, 29879, 29914, 11249, 29918, 14588, 943, 29889, 415, 29915, 29995, 29898, 12083, 511, 525, 6050, 8785, 13, 13, 4706, 396, 3789, 701, 770, 14903, 363, 714, 29899, 974, 29899, 11249, 2280, 29889, 13, 4706, 12920, 29878, 29918, 14850, 29918, 695, 29888, 3032, 14669, 29918, 695, 29888, 580, 13, 4706, 12920, 29878, 29918, 14850, 29918, 695, 29888, 29889, 8605, 29918, 695, 29888, 5396, 1460, 29918, 9748, 29918, 353, 12920, 29878, 29918, 14850, 29918, 695, 29888, 29889, 26495, 29918, 1272, 29918, 13, 4706, 12920, 29878, 29918, 14850, 29918, 695, 29888, 29889, 8605, 29918, 695, 29888, 5396, 2312, 29918, 353, 12920, 29878, 29918, 14850, 29918, 695, 29888, 29889, 11249, 29918, 705, 5861, 29918, 13, 13, 4706, 736, 12920, 29878, 29918, 14850, 29918, 695, 29888, 2 ]
docs/conf.py
urm8/django-translations
100
6893
<reponame>urm8/django-translations # -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/master/config # -- Path setup -------------------------------------------------------------- # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. # import os import sys import json import datetime # `Django setup` below, will add the path to `translations` module # automatically because it's been included in `project.settings`, so no need # to import it here # -- Django setup ------------------------------------------------------------ # generated project settings import django sys.path.insert( 0, os.path.join(os.path.dirname(os.path.abspath('.')), 'project') ) os.environ['DJANGO_SETTINGS_MODULE'] = 'project.settings' django.setup() # -- Project information ----------------------------------------------------- with open( os.path.join( os.path.dirname(os.path.abspath('.')), 'config.json' ), 'r') as fh: info = json.load(fh) # project project = info['project']['name'] # description description = info['project']['desc'] # author author = info['author']['name'] # The short X.Y version version = info['release']['version'] # The full version, including alpha/beta/rc tags release = info['release']['name'] # github github_user = info['github']['user'] github_repo = info['github']['repo'] # donation donate_url = info['urls']['funding'] # logo logo = info['project']['logo'] # documentation documentation = '{} {}'.format(project, 'Documentation') # year year = datetime.datetime.now().year # copyright copyright = '{year}, {author}'.format(year=year, author=author) # -- General configuration --------------------------------------------------- # If your documentation needs a minimal Sphinx version, state it here. # # needs_sphinx = '1.0' # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.intersphinx', 'sphinx.ext.viewcode', 'sphinx.ext.githubpages', ] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] # The suffix(es) of source filenames. # You can specify multiple suffix as a list of string: # # source_suffix = ['.rst', '.md'] source_suffix = '.rst' # The master toctree document. master_doc = 'index' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. language = None # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This pattern also affects html_static_path and html_extra_path . exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'monokai' # -- Options for HTML output ------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # html_theme = 'alabaster' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. # html_theme_options = { 'note_bg': '#fec', 'note_border': '#ffe2a8', 'show_relbars': True, 'logo': logo, 'touch_icon': logo, 'logo_name': True, 'description': description, 'github_user': github_user, 'github_repo': github_repo, 'github_banner': True, } # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['_static'] # Custom sidebar templates, must be a dictionary that maps document names # to template names. # # The default sidebars (for documents that don't match any pattern) are # defined by theme itself. Builtin themes are using these templates by # default: ``['localtoc.html', 'relations.html', 'sourcelink.html', # 'searchbox.html']``. # # html_sidebars = {} # -- Options for HTMLHelp output --------------------------------------------- # Output file base name for HTML help builder. htmlhelp_basename = 'DjangoTranslationsdoc' # -- Options for LaTeX output ------------------------------------------------ latex_elements = { # The paper size ('letterpaper' or 'a4paper'). # # 'papersize': 'letterpaper', # The font size ('10pt', '11pt' or '12pt'). # # 'pointsize': '10pt', # Additional stuff for the LaTeX preamble. # # 'preamble': '', # Latex figure (float) alignment # # 'figure_align': 'htbp', } # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ (master_doc, 'DjangoTranslations.tex', documentation, author, 'manual'), ] # -- Options for manual page output ------------------------------------------ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ (master_doc, 'djangotranslations', documentation, [author], 1) ] # -- Options for Texinfo output ---------------------------------------------- # Grouping the document tree into Texinfo files. List of tuples # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ (master_doc, 'DjangoTranslations', documentation, author, 'DjangoTranslations', description, 'Miscellaneous'), ] # -- Extension configuration ------------------------------------------------- # -- Options for intersphinx extension --------------------------------------- # Example configuration for intersphinx: refer to the Python standard library. intersphinx_mapping = { 'python': ('https://docs.python.org/', None), 'django': ('http://django.readthedocs.org/en/latest/', None), } # -- Options for doctest extension ------------------------------------------- doctest_global_setup = """ import builtins from django.db import connection from django.test import TestCase from sample.utils import create_samples import beautifier # Turn on the test database for the doctests connection.creation.create_test_db(verbosity=0) TestCase.setUpClass() # Beautify `testoutput` def print(value='', end='\\n'): builtins.print(beautifier.beautify(value, False), end=end) # Sample creation def create_doc_samples(translations=True): if translations: create_samples( continent_names=['europe', 'asia'], country_names=['germany', 'south korea'], city_names=['cologne', 'seoul'], continent_fields=['name', 'denonym'], country_fields=['name', 'denonym'], city_fields=['name', 'denonym'], langs=['de'] ) else: create_samples( continent_names=['europe', 'asia'], country_names=['germany', 'south korea'], city_names=['cologne', 'seoul'], ) """ doctest_global_cleanup = """ import builtins from django.db import connection from django.test import TestCase # Normalize `testoutput` def print(value='', end='\\n'): builtins.print(value, end=end) # Turn off the test database for the doctests TestCase.tearDownClass() connection.creation.destroy_test_db(verbosity=0) """
[ 1, 529, 276, 1112, 420, 29958, 17095, 29947, 29914, 14095, 29899, 3286, 29880, 800, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 29937, 13, 29937, 20999, 934, 363, 278, 317, 561, 14668, 5106, 12856, 29889, 13, 29937, 13, 29937, 910, 934, 947, 871, 1712, 263, 9262, 310, 278, 1556, 3619, 3987, 29889, 1152, 263, 13, 29937, 2989, 1051, 1074, 278, 5106, 29901, 13, 29937, 1732, 597, 1636, 29889, 29879, 561, 14668, 29899, 1514, 29889, 990, 29914, 264, 29914, 6207, 29914, 2917, 13, 13, 29937, 1192, 10802, 6230, 448, 2683, 2683, 2683, 9072, 29899, 13, 13, 29937, 960, 17752, 313, 272, 10585, 304, 1842, 411, 1120, 397, 542, 29897, 526, 297, 1790, 3884, 29892, 13, 29937, 788, 1438, 17525, 304, 10876, 29889, 2084, 1244, 29889, 960, 278, 3884, 338, 6198, 304, 278, 13, 29937, 5106, 3876, 29892, 671, 2897, 29889, 2084, 29889, 370, 1028, 493, 304, 1207, 372, 8380, 29892, 763, 4318, 1244, 29889, 13, 29937, 13, 5215, 2897, 13, 5215, 10876, 13, 5215, 4390, 13, 5215, 12865, 13, 13, 29937, 421, 29928, 5364, 6230, 29952, 2400, 29892, 674, 788, 278, 2224, 304, 421, 3286, 29880, 800, 29952, 3883, 13, 29937, 6336, 1363, 372, 29915, 29879, 1063, 5134, 297, 421, 4836, 29889, 11027, 1673, 577, 694, 817, 13, 29937, 304, 1053, 372, 1244, 13, 13, 29937, 1192, 15337, 6230, 448, 2683, 2683, 2683, 1378, 5634, 13, 13, 29937, 5759, 2060, 6055, 13, 5215, 9557, 13, 13, 9675, 29889, 2084, 29889, 7851, 29898, 13, 268, 29900, 29892, 13, 1678, 2897, 29889, 2084, 29889, 7122, 29898, 359, 29889, 2084, 29889, 25721, 29898, 359, 29889, 2084, 29889, 370, 1028, 493, 12839, 1495, 511, 525, 4836, 1495, 13, 29897, 13, 359, 29889, 21813, 1839, 29928, 29967, 2190, 17080, 29918, 10490, 29911, 4214, 29903, 29918, 6720, 14849, 1307, 2033, 353, 525, 4836, 29889, 11027, 29915, 13, 14095, 29889, 14669, 580, 13, 13, 29937, 1192, 8010, 2472, 448, 2683, 2683, 2683, 807, 13, 13, 2541, 1722, 29898, 13, 4706, 2897, 29889, 2084, 29889, 7122, 29898, 13, 9651, 2897, 29889, 2084, 29889, 25721, 29898, 359, 29889, 2084, 29889, 370, 1028, 493, 12839, 1495, 511, 13, 9651, 525, 2917, 29889, 3126, 29915, 13, 4706, 10353, 525, 29878, 1495, 408, 285, 29882, 29901, 13, 1678, 5235, 353, 4390, 29889, 1359, 29898, 29888, 29882, 29897, 13, 13, 13, 29937, 2060, 13, 4836, 353, 5235, 1839, 4836, 16215, 978, 2033, 13, 13, 29937, 6139, 13, 8216, 353, 5235, 1839, 4836, 16215, 14273, 2033, 13, 13, 29937, 4148, 13, 8921, 353, 5235, 1839, 8921, 16215, 978, 2033, 13, 13, 29937, 450, 3273, 1060, 29889, 29979, 1873, 13, 3259, 353, 5235, 1839, 14096, 16215, 3259, 2033, 13, 13, 29937, 450, 2989, 1873, 29892, 3704, 15595, 29914, 3571, 29914, 2214, 8282, 13, 14096, 353, 5235, 1839, 14096, 16215, 978, 2033, 13, 13, 29937, 18546, 13, 3292, 29918, 1792, 353, 5235, 1839, 3292, 16215, 1792, 2033, 13, 3292, 29918, 20095, 353, 5235, 1839, 3292, 16215, 20095, 2033, 13, 13, 29937, 1016, 362, 13, 9176, 403, 29918, 2271, 353, 5235, 1839, 26045, 16215, 27159, 292, 2033, 13, 13, 29937, 20194, 13, 14569, 353, 5235, 1839, 4836, 16215, 14569, 2033, 13, 13, 29937, 5106, 13, 12663, 353, 525, 8875, 6571, 4286, 4830, 29898, 4836, 29892, 525, 6268, 362, 1495, 13, 13, 29937, 1629, 13, 6360, 353, 12865, 29889, 12673, 29889, 3707, 2141, 6360, 13, 13, 29937, 3509, 1266, 13, 8552, 1266, 353, 22372, 6360, 1118, 426, 8921, 29913, 4286, 4830, 29898, 6360, 29922, 6360, 29892, 4148, 29922, 8921, 29897, 13, 13, 29937, 1192, 4593, 5285, 448, 2683, 2683, 2683, 489, 13, 13, 29937, 960, 596, 5106, 4225, 263, 13114, 317, 561, 14668, 1873, 29892, 2106, 372, 1244, 29889, 13, 29937, 13, 29937, 4225, 29918, 29879, 561, 14668, 353, 525, 29896, 29889, 29900, 29915, 13, 13, 29937, 3462, 738, 317, 561, 14668, 6081, 3883, 2983, 1244, 29892, 408, 6031, 29889, 2688, 508, 367, 13, 29937, 17752, 6421, 411, 317, 561, 14668, 313, 17514, 525, 29879, 561, 14668, 29889, 1062, 5575, 1495, 470, 596, 2888, 13, 29937, 6743, 29889, 13, 24299, 353, 518, 13, 1678, 525, 29879, 561, 14668, 29889, 1062, 29889, 1300, 397, 542, 742, 13, 1678, 525, 29879, 561, 14668, 29889, 1062, 29889, 1867, 312, 342, 742, 13, 1678, 525, 29879, 561, 14668, 29889, 1062, 29889, 1639, 29879, 561, 14668, 742, 13, 1678, 525, 29879, 561, 14668, 29889, 1062, 29889, 1493, 401, 742, 13, 1678, 525, 29879, 561, 14668, 29889, 1062, 29889, 3292, 12292, 742, 13, 29962, 13, 13, 29937, 3462, 738, 10898, 393, 1712, 17475, 1244, 29892, 6198, 304, 445, 3884, 29889, 13, 20943, 29918, 2084, 353, 6024, 29918, 20943, 2033, 13, 13, 29937, 450, 25557, 29898, 267, 29897, 310, 2752, 977, 264, 1280, 29889, 13, 29937, 887, 508, 6084, 2999, 25557, 408, 263, 1051, 310, 1347, 29901, 13, 29937, 13, 29937, 2752, 29918, 2146, 600, 861, 353, 518, 4286, 29878, 303, 742, 15300, 3487, 2033, 13, 4993, 29918, 2146, 600, 861, 353, 15300, 29878, 303, 29915, 13, 13, 29937, 450, 5835, 304, 312, 929, 1842, 29889, 13, 6207, 29918, 1514, 353, 525, 2248, 29915, 13, 13, 29937, 450, 4086, 363, 2793, 1120, 468, 759, 630, 491, 317, 561, 14668, 29889, 4118, 304, 5106, 13, 29937, 363, 263, 1051, 310, 6969, 10276, 29889, 13, 29937, 13, 29937, 910, 338, 884, 1304, 565, 366, 437, 2793, 13962, 3025, 679, 726, 16653, 29879, 29889, 13, 29937, 26991, 366, 731, 376, 11675, 29908, 515, 278, 1899, 1196, 363, 1438, 4251, 29889, 13, 11675, 353, 6213, 13, 13, 29937, 2391, 310, 15038, 29892, 6198, 304, 2752, 3884, 29892, 393, 1993, 2066, 322, 13, 29937, 17525, 304, 11455, 746, 3063, 363, 2752, 2066, 29889, 13, 29937, 910, 4766, 884, 6602, 29879, 3472, 29918, 7959, 29918, 2084, 322, 3472, 29918, 17833, 29918, 2084, 869, 13, 735, 2325, 29918, 11037, 29879, 353, 6024, 29918, 4282, 742, 525, 1349, 3774, 29879, 29889, 2585, 742, 15300, 8452, 29918, 9044, 2033, 13, 13, 29937, 450, 1024, 310, 278, 349, 4790, 1860, 313, 29562, 12141, 292, 29897, 3114, 304, 671, 29889, 13, 2272, 29887, 1860, 29918, 3293, 353, 525, 3712, 554, 1794, 29915, 13, 13, 13, 29937, 1192, 25186, 363, 4544, 1962, 448, 2683, 2683, 2683, 13, 13, 29937, 450, 10929, 304, 671, 363, 4544, 322, 4544, 22305, 6515, 29889, 29871, 2823, 278, 5106, 363, 13, 29937, 263, 1051, 310, 4240, 262, 963, 267, 29889, 13, 29937, 13, 1420, 29918, 18193, 353, 525, 284, 370, 1901, 29915, 13, 13, 29937, 498, 2004, 3987, 526, 10929, 29899, 14940, 322, 2888, 675, 278, 1106, 322, 4459, 310, 263, 10929, 13, 29937, 4340, 29889, 29871, 1152, 263, 1051, 310, 3987, 3625, 363, 1269, 10929, 29892, 1074, 278, 13, 29937, 5106, 29889, 13, 29937, 13, 1420, 29918, 18193, 29918, 6768, 353, 426, 13, 1678, 525, 6812, 29918, 16264, 2396, 16321, 29888, 687, 742, 13, 1678, 525, 6812, 29918, 11466, 2396, 16321, 17615, 29906, 29874, 29947, 742, 13, 1678, 525, 4294, 29918, 2674, 28408, 2396, 5852, 29892, 13, 1678, 525, 14569, 2396, 20194, 29892, 13, 1678, 525, 16747, 29918, 4144, 2396, 20194, 29892, 13, 1678, 525, 14569, 29918, 978, 2396, 5852, 29892, 13, 1678, 525, 8216, 2396, 6139, 29892, 13, 1678, 525, 3292, 29918, 1792, 2396, 18546, 29918, 1792, 29892, 13, 1678, 525, 3292, 29918, 20095, 2396, 18546, 29918, 20095, 29892, 13, 1678, 525, 3292, 29918, 29890, 7310, 2396, 5852, 29892, 13, 29913, 13, 13, 29937, 3462, 738, 10898, 393, 1712, 2888, 2294, 2066, 313, 14565, 408, 3114, 26718, 29897, 1244, 29892, 13, 29937, 6198, 304, 445, 3884, 29889, 2688, 526, 13746, 1156, 278, 4240, 262, 2294, 2066, 29892, 13, 29937, 577, 263, 934, 4257, 376, 4381, 29889, 4268, 29908, 674, 26556, 278, 4240, 262, 376, 4381, 29889, 4268, 1642, 13, 1420, 29918, 7959, 29918, 2084, 353, 6024, 29918, 7959, 2033, 13, 13, 29937, 8701, 2625, 1646, 17475, 29892, 1818, 367, 263, 8600, 393, 11053, 1842, 2983, 13, 29937, 304, 4472, 2983, 29889, 13, 29937, 13, 29937, 450, 2322, 2625, 28408, 313, 1454, 10701, 393, 1016, 29915, 29873, 1993, 738, 4766, 29897, 526, 13, 29937, 3342, 491, 10929, 3528, 29889, 29871, 5373, 2782, 262, 963, 267, 526, 773, 1438, 17475, 491, 13, 29937, 2322, 29901, 4954, 1839, 2997, 517, 29883, 29889, 1420, 742, 525, 2674, 800, 29889, 1420, 742, 525, 29879, 473, 2242, 682, 29889, 1420, 742, 13, 29937, 525, 4478, 1884, 29889, 1420, 2033, 29952, 1412, 13, 29937, 13, 29937, 3472, 29918, 2975, 28408, 353, 6571, 13, 13, 13, 29937, 1192, 25186, 363, 4544, 29648, 1962, 448, 2683, 2683, 9072, 13, 13, 29937, 10604, 934, 2967, 1024, 363, 4544, 1371, 12856, 29889, 13, 1420, 8477, 29918, 6500, 3871, 353, 525, 29928, 5364, 4300, 29880, 800, 1514, 29915, 13, 13, 13, 29937, 1192, 25186, 363, 29186, 1962, 448, 2683, 2683, 9072, 5634, 13, 13, 25694, 29918, 17664, 353, 426, 13, 1678, 396, 450, 5650, 2159, 6702, 15670, 19773, 29915, 470, 525, 29874, 29946, 19773, 2824, 13, 1678, 396, 13, 1678, 396, 525, 29886, 21321, 675, 2396, 525, 15670, 19773, 742, 13, 13, 1678, 396, 450, 4079, 2159, 6702, 29896, 29900, 415, 742, 525, 29896, 29896, 415, 29915, 470, 525, 29896, 29906, 415, 2824, 13, 1678, 396, 13, 1678, 396, 525, 3149, 2311, 2396, 525, 29896, 29900, 415, 742, 13, 13, 1678, 396, 3462, 3245, 6433, 363, 278, 29186, 758, 314, 569, 29889, 13, 1678, 396, 13, 1678, 396, 525, 1457, 314, 569, 2396, 15516, 13, 13, 1678, 396, 23089, 29916, 4377, 313, 7411, 29897, 22239, 13, 1678, 396, 13, 1678, 396, 525, 4532, 29918, 2520, 2396, 525, 400, 25288, 742, 13, 29913, 13, 13, 29937, 6431, 292, 278, 1842, 5447, 964, 29186, 2066, 29889, 2391, 310, 5291, 2701, 13, 29937, 313, 4993, 1369, 934, 29892, 3646, 1024, 29892, 3611, 29892, 13, 29937, 29871, 4148, 29892, 1842, 1990, 518, 3525, 517, 29892, 12219, 29892, 470, 1914, 770, 14664, 13, 25694, 29918, 3225, 29879, 353, 518, 13, 1678, 313, 6207, 29918, 1514, 29892, 525, 29928, 5364, 4300, 29880, 800, 29889, 4776, 742, 5106, 29892, 13, 268, 4148, 29892, 525, 11288, 5477, 13, 29962, 13, 13, 13, 29937, 1192, 25186, 363, 12219, 1813, 1962, 448, 2683, 2683, 1378, 29899, 13, 13, 29937, 3118, 6251, 639, 12219, 1813, 29889, 2391, 310, 5291, 2701, 13, 29937, 313, 4993, 1369, 934, 29892, 1024, 29892, 6139, 29892, 15717, 29892, 12219, 4004, 467, 13, 1171, 29918, 12292, 353, 518, 13, 1678, 313, 6207, 29918, 1514, 29892, 525, 19776, 574, 25730, 550, 29880, 800, 742, 5106, 29892, 13, 268, 518, 8921, 1402, 29871, 29896, 29897, 13, 29962, 13, 13, 13, 29937, 1192, 25186, 363, 8490, 3888, 1962, 448, 2683, 2683, 9072, 29899, 13, 13, 29937, 6431, 292, 278, 1842, 5447, 964, 8490, 3888, 2066, 29889, 2391, 310, 5291, 2701, 13, 29937, 313, 4993, 1369, 934, 29892, 3646, 1024, 29892, 3611, 29892, 4148, 29892, 13, 29937, 29871, 4516, 6143, 6251, 29892, 6139, 29892, 7663, 29897, 13, 4776, 3888, 29918, 3225, 29879, 353, 518, 13, 1678, 313, 6207, 29918, 1514, 29892, 525, 29928, 5364, 4300, 29880, 800, 742, 5106, 29892, 13, 268, 4148, 29892, 525, 29928, 5364, 4300, 29880, 800, 742, 6139, 29892, 13, 268, 525, 29924, 275, 3729, 23584, 5477, 13, 29962, 13, 13, 13, 29937, 1192, 7338, 2673, 5285, 448, 2683, 2683, 2683, 13, 13, 29937, 1192, 25186, 363, 1006, 29879, 561, 14668, 6081, 448, 2683, 2683, 22158, 13, 13, 29937, 8741, 5285, 363, 1006, 29879, 561, 14668, 29901, 2737, 304, 278, 5132, 3918, 3489, 29889, 13, 1639, 29879, 561, 14668, 29918, 20698, 353, 426, 13, 1678, 525, 4691, 2396, 6702, 991, 597, 2640, 29889, 4691, 29889, 990, 29914, 742, 6213, 511, 13, 1678, 525, 14095, 2396, 6702, 1124, 597, 14095, 29889, 949, 386, 287, 12332, 29889, 990, 29914, 264, 29914, 12333, 29914, 742, 6213, 511, 13, 29913, 13, 13, 29937, 1192, 25186, 363, 437, 312, 342, 6081, 448, 2683, 2683, 28400, 13, 13, 1867, 312, 342, 29918, 10945, 29918, 14669, 353, 9995, 13, 5215, 4240, 1144, 13, 13, 3166, 9557, 29889, 2585, 1053, 3957, 13, 3166, 9557, 29889, 1688, 1053, 4321, 8259, 13, 13, 3166, 4559, 29889, 13239, 1053, 1653, 29918, 27736, 13, 13, 5215, 6562, 3709, 13, 13, 13, 29937, 9603, 373, 278, 1243, 2566, 363, 278, 437, 312, 9197, 13, 9965, 29889, 1037, 362, 29889, 3258, 29918, 1688, 29918, 2585, 29898, 18248, 359, 537, 29922, 29900, 29897, 13, 3057, 8259, 29889, 842, 3373, 2385, 580, 13, 13, 13, 29937, 19618, 1598, 421, 1688, 4905, 29952, 13, 1753, 1596, 29898, 1767, 2433, 742, 1095, 2433, 1966, 29876, 29374, 13, 1678, 4240, 1144, 29889, 2158, 29898, 915, 1300, 3709, 29889, 915, 1300, 1598, 29898, 1767, 29892, 7700, 511, 1095, 29922, 355, 29897, 13, 13, 13, 29937, 21029, 11265, 13, 1753, 1653, 29918, 1514, 29918, 27736, 29898, 3286, 29880, 800, 29922, 5574, 1125, 13, 1678, 565, 5578, 800, 29901, 13, 4706, 1653, 29918, 27736, 29898, 13, 9651, 25523, 29918, 7039, 29922, 1839, 29872, 3214, 742, 525, 26252, 7464, 13, 9651, 4234, 29918, 7039, 29922, 1839, 29887, 837, 1384, 742, 525, 29879, 2438, 413, 487, 29874, 7464, 13, 9651, 4272, 29918, 7039, 29922, 1839, 21553, 484, 742, 525, 344, 5059, 7464, 13, 9651, 25523, 29918, 9621, 29922, 1839, 978, 742, 525, 1145, 4735, 7464, 13, 9651, 4234, 29918, 9621, 29922, 1839, 978, 742, 525, 1145, 4735, 7464, 13, 9651, 4272, 29918, 9621, 29922, 1839, 978, 742, 525, 1145, 4735, 7464, 13, 9651, 6361, 29879, 29922, 1839, 311, 2033, 13, 4706, 1723, 13, 1678, 1683, 29901, 13, 4706, 1653, 29918, 27736, 29898, 13, 9651, 25523, 29918, 7039, 29922, 1839, 29872, 3214, 742, 525, 26252, 7464, 13, 9651, 4234, 29918, 7039, 29922, 1839, 29887, 837, 1384, 742, 525, 29879, 2438, 413, 487, 29874, 7464, 13, 9651, 4272, 29918, 7039, 29922, 1839, 21553, 484, 742, 525, 344, 5059, 7464, 13, 4706, 1723, 13, 13, 15945, 29908, 13, 13, 1867, 312, 342, 29918, 10945, 29918, 14941, 786, 353, 9995, 13, 5215, 4240, 1144, 13, 13, 3166, 9557, 29889, 2585, 1053, 3957, 13, 3166, 9557, 29889, 1688, 1053, 4321, 8259, 13, 13, 13, 29937, 21981, 675, 421, 1688, 4905, 29952, 13, 1753, 1596, 29898, 1767, 2433, 742, 1095, 2433, 1966, 29876, 29374, 13, 1678, 4240, 1144, 29889, 2158, 29898, 1767, 29892, 1095, 29922, 355, 29897, 13, 13, 13, 29937, 9603, 1283, 278, 1243, 2566, 363, 278, 437, 312, 9197, 13, 3057, 8259, 29889, 371, 279, 6767, 2385, 580, 13, 9965, 29889, 1037, 362, 29889, 20524, 29918, 1688, 29918, 2585, 29898, 18248, 359, 537, 29922, 29900, 29897, 13, 13, 15945, 29908, 13, 2 ]
example.py
kaplanbr/Adversarial-Predictor
0
96507
# -*- coding: utf-8 -*- from AdversarialPredictor import AdversarialPredictionClassifier #dependencies %matplotlib inline import matplotlib.pyplot as plt import numpy as np from sklearn import datasets from sklearn.linear_model import LogisticRegression from sklearn.gaussian_process import GaussianProcessClassifier from sklearn.gaussian_process.kernels import RBF #download dataset iris_dataset = datasets.load_iris() #limit features to sepal and petal lenght X = iris_dataset["data"][:,[0,2]] y = iris_dataset["target"] #limited sample with virginica and versicolor species Xt = X[y<>0] yt = y[y<>0] Xs = X[y==0] #setosa sample #2 class model fit m_logr = LogisticRegression() m_logr.fit(Xt,yt) #3 class plot plt.title('3-class plot') plt.scatter(X[:,0][y==0],X[:,1][y==0], label="setosa",color="green",edgecolors=(0, 0, 0)) plt.scatter(X[:,0][y==1],X[:,1][y==1], label="versicolor",color="red",edgecolors=(0, 0, 0)) plt.scatter(X[:,0][y==2],X[:,1][y==2], label="virginica",color="blue",edgecolors=(0, 0, 0)) plt.xlabel("Sepal Length") plt.ylabel("Petal Length") plt.xlim(4,8) plt.ylim(0.5,7.5) plt.legend() plt.savefig("3-class.pdf") #2 class plot plt.title('2-class plot') plt.scatter(X[:,0][y==1],X[:,1][y==1], label="versicolor",color="red",edgecolors=(0, 0, 0)) plt.scatter(X[:,0][y==2],X[:,1][y==2], label="virginica",color="blue",edgecolors=(0, 0, 0)) plt.xlabel("Sepal Length") plt.ylabel("Petal Length") plt.xlim(4,8) plt.ylim(0.5,7.5) plt.legend() plt.savefig("2-class.pdf") #2 class logistic regression decision boundary xx, yy = np.mgrid[4:8:.01, 0.5:7.5:.01] grid = np.c_[xx.ravel(), yy.ravel()] probs = m_logr.predict_proba(grid)[:, 1].reshape(xx.shape) plt.title('2-class Logistic Regression Decision Boundary') plt.scatter(X[:,0][y==1],X[:,1][y==1], label="versicolor",color="red",edgecolors=(0, 0, 0)) plt.scatter(X[:,0][y==2],X[:,1][y==2], label="virginica",color="blue",edgecolors=(0, 0, 0)) plt.xlabel("Sepal Length") plt.ylabel("Petal Length") plt.xlim(4,8) plt.ylim(0.5,7.5) plt.legend() plt.contour(xx, yy, probs, levels=[.5], colors="black") plt.savefig("2-class-logr.pdf") #3 class logistic regression probabilistic decision boundary xx, yy = np.mgrid[4:8:0.01, 0.5:7.5:0.01] Z = m_logr.predict_proba(np.vstack((xx.ravel(), yy.ravel())).T)[:, 1] Z = Z.reshape(xx.shape) image = plt.imshow(Z.T, interpolation='nearest', extent=(4, 8, 0.5, 7.5), aspect='auto', origin='lower', cmap=plt.cm.RdBu) plt.colorbar(image) plt.title('2-class Logistic Regression\n Probabilistic Decision Boundary') plt.scatter(X[:,0][y==1],X[:,1][y==1], label="versicolor",color="red",edgecolors=(0, 0, 0)) plt.scatter(X[:,0][y==2],X[:,1][y==2], label="virginica",color="blue",edgecolors=(0, 0, 0)) plt.scatter(X[:,0][y==0],X[:,1][y==0], label="setosa",color="green",edgecolors=(0, 0, 0)) plt.xlabel("Sepal Length") plt.ylabel("Petal Length") plt.xlim(4,8) plt.ylim(0.5,7.5) plt.legend() plt.savefig("2-class-logr-prob.pdf") #gaussian process decision map xx, yy = np.mgrid[4:8:0.05, 0.5:7.5:0.05] kernel = 1.0 * RBF([1.0, 1.0])#rbf_anisotropic m_gpc = GaussianProcessClassifier(kernel=kernel).fit(Xt, yt) Z = m_gpc.predict_proba(np.vstack((xx.ravel(), yy.ravel())).T)[:, 1] Z = Z.reshape(xx.shape) image = plt.imshow(Z.T, interpolation='nearest', extent=(4, 8, 0.5, 7.5), aspect='auto', origin='lower', cmap=plt.cm.RdBu) plt.scatter(X[:,0][y==1],X[:,1][y==1], label="versicolor",color="red",edgecolors=(0, 0, 0)) plt.scatter(X[:,0][y==2],X[:,1][y==2], label="virginica",color="blue",edgecolors=(0, 0, 0)) plt.scatter(X[:,0][y==0],X[:,1][y==0], label="setosa",color="green",edgecolors=(0, 0, 0)) plt.colorbar(image) plt.title("2-class RBF Gaussian Process Classifier\n Decision Map") plt.xlabel("Sepal Length") plt.ylabel("Petal Length") plt.xlim(4,8) plt.ylim(0.5,7.5) plt.legend() plt.savefig("2-class-gpc-prob.pdf") #adversarial predictor classifier m_apc = AdversarialPredictionClassifier() m_apc.fit(Xt,yt) xx, yy = np.mgrid[4:8:0.05, 0.5:7.5:0.05] Z = m_apc.predict_conf(np.vstack((xx.ravel(), yy.ravel())).T) Z_a = [] for i in Z: if i[0][0]>i[0][1]: Z_a.append(0.5-i[1]/2.) else: Z_a.append(0.5+i[1]/2.) Z_a = np.array(Z_a) Z_a = Z_a.reshape(xx.shape) image = plt.imshow(Z_a.T, interpolation='nearest', extent=(4, 8,0.5, 7.5), aspect='auto', origin='lower', cmap=plt.cm.RdBu) plt.scatter(X[:,0][y==1],X[:,1][y==1], label="versicolor",color="red",edgecolors=(0, 0, 0)) plt.scatter(X[:,0][y==2],X[:,1][y==2], label="virginica",color="blue",edgecolors=(0, 0, 0)) plt.scatter(X[:,0][y==0],X[:,1][y==0], label="setosa",color="green",edgecolors=(0, 0, 0)) plt.colorbar(image) plt.title("2-class Adversarial Predictor Classifier\n Confidence Map") plt.xlabel("Sepal Length") plt.ylabel("Petal Length") plt.xlim(4,8) plt.ylim(0.5,7.5) plt.legend() plt.savefig("2-class-apc-prob4.pdf") #visual description of apc pred = m_apc.predict_conf(Xs[1].reshape(1,2)) X_cand = np.array(m_apc.X_cand) plt.title('Predicting new sample x') plt.scatter(X[:,0][y==1],X[:,1][y==1], label="versicolor",color="red",edgecolors=(0, 0, 0)) plt.scatter(X[:,0][y==2],X[:,1][y==2], label="virginica",color="blue",edgecolors=(0, 0, 0)) plt.scatter(Xs[1][0],Xs[1][1], label="new sample to be predicted",color="grey",edgecolors=(0, 0, 0),marker="x") plt.xlabel("Sepal Length") plt.ylabel("Petal Length") plt.xlim(4,8) plt.ylim(0.5,7.5) plt.legend() plt.savefig("new-sample.pdf") plt.title('Base classifier prediction: versicolor') plt.scatter(X[:,0][y==1],X[:,1][y==1], label="versicolor",color="red",edgecolors=(0, 0, 0)) plt.scatter(Xs[1][0],Xs[1][1], label="new sample to be predicted",color="grey",edgecolors=(0, 0, 0),marker="x") plt.xlabel("Sepal Length") plt.ylabel("Petal Length") plt.xlim(4,8) plt.ylim(0.5,7.5) plt.legend() plt.savefig("versicolor-predicted.pdf") plt.title('Adversarial sample is generated') plt.scatter(X[:,0][y==1],X[:,1][y==1], label="versicolor",color="red",edgecolors=(0, 0, 0)) plt.scatter(X_cand[:,0],X_cand[:,1], label="adversarial sample",color="grey",edgecolors=(0, 0, 0),marker="x") plt.xlabel("Sepal Length") plt.ylabel("Petal Length") plt.xlim(4,8) plt.ylim(0.5,7.5) plt.legend() plt.savefig("adversarial-sample.pdf") xx, yy = np.mgrid[4:8:.01, 0.5:7.5:.01] grid = np.c_[xx.ravel(), yy.ravel()] probs = m_apc.m_adv.predict_proba(grid)[:, 1].reshape(xx.shape) plt.title('High accuracy means low confidence') plt.scatter(X[:,0][y==1],X[:,1][y==1], label="versicolor",color="red",edgecolors=(0, 0, 0)) plt.scatter(X_cand[:,0],X_cand[:,1], label="adversarial sample",color="grey",edgecolors=(0, 0, 0),marker="x") plt.xlabel("Sepal Length") plt.ylabel("Petal Length") plt.xlim(4,8) plt.ylim(0.5,7.5) plt.contour(xx, yy, probs, levels=[.5], colors="black") plt.legend() plt.savefig("confidence-classifier.pdf")
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 30004, 13, 30004, 13, 3166, 2087, 874, 27521, 23084, 919, 272, 1053, 2087, 874, 27521, 23084, 2463, 2385, 3709, 30004, 13, 30004, 13, 29937, 22594, 30004, 13, 29995, 2922, 17357, 10583, 30004, 13, 5215, 22889, 29889, 2272, 5317, 408, 14770, 30004, 13, 5215, 12655, 408, 7442, 30004, 13, 3166, 2071, 19668, 1053, 20035, 30004, 13, 3166, 2071, 19668, 29889, 10660, 29918, 4299, 1053, 4522, 4695, 4597, 23881, 30004, 13, 3166, 2071, 19668, 29889, 29887, 17019, 29918, 5014, 1053, 22477, 7032, 2385, 3709, 30004, 13, 3166, 2071, 19668, 29889, 29887, 17019, 29918, 5014, 29889, 22178, 1379, 1053, 390, 28062, 30004, 13, 30004, 13, 30004, 13, 29937, 10382, 8783, 30004, 13, 381, 275, 29918, 24713, 353, 20035, 29889, 1359, 29918, 381, 275, 26471, 13, 29937, 13400, 5680, 304, 409, 7830, 322, 5697, 284, 28537, 400, 30004, 13, 29990, 353, 3805, 275, 29918, 24713, 3366, 1272, 3108, 7503, 17094, 29900, 29892, 29906, 5262, 30004, 13, 29891, 353, 3805, 275, 29918, 24713, 3366, 5182, 3108, 30004, 13, 29937, 29044, 4559, 411, 10636, 5359, 983, 322, 1224, 5283, 272, 6606, 30004, 13, 29990, 29873, 353, 1060, 29961, 29891, 25299, 29900, 29962, 30004, 13, 3637, 353, 343, 29961, 29891, 25299, 29900, 29962, 30004, 13, 29990, 29879, 353, 1060, 29961, 29891, 1360, 29900, 29962, 396, 842, 3628, 4559, 30004, 13, 30004, 13, 29937, 29906, 770, 1904, 6216, 30004, 13, 29885, 29918, 417, 629, 353, 4522, 4695, 4597, 23881, 26471, 13, 29885, 29918, 417, 629, 29889, 9202, 29898, 29990, 29873, 29892, 3637, 8443, 13, 30004, 13, 29937, 29941, 770, 6492, 30004, 13, 572, 29873, 29889, 3257, 877, 29941, 29899, 1990, 6492, 1495, 30004, 13, 572, 29873, 29889, 1557, 2620, 29898, 29990, 7503, 29892, 29900, 3816, 29891, 1360, 29900, 1402, 29990, 7503, 29892, 29896, 3816, 29891, 1360, 29900, 1402, 3858, 543, 842, 3628, 613, 2780, 543, 12692, 613, 12864, 27703, 7607, 29900, 29892, 29871, 29900, 29892, 29871, 29900, 876, 30004, 13, 572, 29873, 29889, 1557, 2620, 29898, 29990, 7503, 29892, 29900, 3816, 29891, 1360, 29896, 1402, 29990, 7503, 29892, 29896, 3816, 29891, 1360, 29896, 1402, 3858, 543, 874, 5283, 272, 613, 2780, 543, 1127, 613, 12864, 27703, 7607, 29900, 29892, 29871, 29900, 29892, 29871, 29900, 876, 30004, 13, 572, 29873, 29889, 1557, 2620, 29898, 29990, 7503, 29892, 29900, 3816, 29891, 1360, 29906, 1402, 29990, 7503, 29892, 29896, 3816, 29891, 1360, 29906, 1402, 3858, 543, 2405, 5359, 983, 613, 2780, 543, 9539, 613, 12864, 27703, 7607, 29900, 29892, 29871, 29900, 29892, 29871, 29900, 876, 30004, 13, 572, 29873, 29889, 29916, 1643, 703, 29903, 1022, 284, 365, 1477, 1159, 30004, 13, 572, 29873, 29889, 29891, 1643, 703, 29925, 26310, 365, 1477, 1159, 30004, 13, 572, 29873, 29889, 29916, 2576, 29898, 29946, 29892, 29947, 8443, 13, 572, 29873, 29889, 29891, 2576, 29898, 29900, 29889, 29945, 29892, 29955, 29889, 29945, 8443, 13, 572, 29873, 29889, 26172, 26471, 13, 572, 29873, 29889, 7620, 1003, 703, 29941, 29899, 1990, 29889, 5140, 1159, 30004, 13, 30004, 13, 29937, 29906, 770, 6492, 30004, 13, 572, 29873, 29889, 3257, 877, 29906, 29899, 1990, 6492, 1495, 30004, 13, 572, 29873, 29889, 1557, 2620, 29898, 29990, 7503, 29892, 29900, 3816, 29891, 1360, 29896, 1402, 29990, 7503, 29892, 29896, 3816, 29891, 1360, 29896, 1402, 3858, 543, 874, 5283, 272, 613, 2780, 543, 1127, 613, 12864, 27703, 7607, 29900, 29892, 29871, 29900, 29892, 29871, 29900, 876, 30004, 13, 572, 29873, 29889, 1557, 2620, 29898, 29990, 7503, 29892, 29900, 3816, 29891, 1360, 29906, 1402, 29990, 7503, 29892, 29896, 3816, 29891, 1360, 29906, 1402, 3858, 543, 2405, 5359, 983, 613, 2780, 543, 9539, 613, 12864, 27703, 7607, 29900, 29892, 29871, 29900, 29892, 29871, 29900, 876, 30004, 13, 572, 29873, 29889, 29916, 1643, 703, 29903, 1022, 284, 365, 1477, 1159, 30004, 13, 572, 29873, 29889, 29891, 1643, 703, 29925, 26310, 365, 1477, 1159, 30004, 13, 572, 29873, 29889, 29916, 2576, 29898, 29946, 29892, 29947, 8443, 13, 572, 29873, 29889, 29891, 2576, 29898, 29900, 29889, 29945, 29892, 29955, 29889, 29945, 8443, 13, 572, 29873, 29889, 26172, 26471, 13, 572, 29873, 29889, 7620, 1003, 703, 29906, 29899, 1990, 29889, 5140, 1159, 30004, 13, 30004, 13, 30004, 13, 29937, 29906, 770, 1480, 4695, 17855, 10608, 10452, 30004, 13, 4419, 29892, 343, 29891, 353, 7442, 29889, 29885, 7720, 29961, 29946, 29901, 29947, 29901, 29889, 29900, 29896, 29892, 29871, 29900, 29889, 29945, 29901, 29955, 29889, 29945, 29901, 29889, 29900, 29896, 29962, 30004, 13, 7720, 353, 7442, 29889, 29883, 29918, 29961, 4419, 29889, 336, 955, 3285, 343, 29891, 29889, 336, 955, 580, 29962, 30004, 13, 771, 5824, 353, 286, 29918, 417, 629, 29889, 27711, 29918, 771, 2291, 29898, 7720, 29897, 7503, 29892, 29871, 29896, 1822, 690, 14443, 29898, 4419, 29889, 12181, 8443, 13, 30004, 13, 572, 29873, 29889, 3257, 877, 29906, 29899, 1990, 4522, 4695, 2169, 23881, 3826, 2459, 350, 618, 653, 1495, 30004, 13, 572, 29873, 29889, 1557, 2620, 29898, 29990, 7503, 29892, 29900, 3816, 29891, 1360, 29896, 1402, 29990, 7503, 29892, 29896, 3816, 29891, 1360, 29896, 1402, 3858, 543, 874, 5283, 272, 613, 2780, 543, 1127, 613, 12864, 27703, 7607, 29900, 29892, 29871, 29900, 29892, 29871, 29900, 876, 30004, 13, 572, 29873, 29889, 1557, 2620, 29898, 29990, 7503, 29892, 29900, 3816, 29891, 1360, 29906, 1402, 29990, 7503, 29892, 29896, 3816, 29891, 1360, 29906, 1402, 3858, 543, 2405, 5359, 983, 613, 2780, 543, 9539, 613, 12864, 27703, 7607, 29900, 29892, 29871, 29900, 29892, 29871, 29900, 876, 30004, 13, 572, 29873, 29889, 29916, 1643, 703, 29903, 1022, 284, 365, 1477, 1159, 30004, 13, 572, 29873, 29889, 29891, 1643, 703, 29925, 26310, 365, 1477, 1159, 30004, 13, 572, 29873, 29889, 29916, 2576, 29898, 29946, 29892, 29947, 8443, 13, 572, 29873, 29889, 29891, 2576, 29898, 29900, 29889, 29945, 29892, 29955, 29889, 29945, 8443, 13, 572, 29873, 29889, 26172, 26471, 13, 572, 29873, 29889, 1285, 473, 29898, 4419, 29892, 343, 29891, 29892, 2070, 29879, 29892, 11174, 11759, 29889, 29945, 1402, 11955, 543, 8517, 1159, 30004, 13, 572, 29873, 29889, 7620, 1003, 703, 29906, 29899, 1990, 29899, 417, 629, 29889, 5140, 1159, 30004, 13, 30004, 13, 30004, 13, 29937, 29941, 770, 1480, 4695, 17855, 23950, 4695, 10608, 10452, 30004, 13, 4419, 29892, 343, 29891, 353, 7442, 29889, 29885, 7720, 29961, 29946, 29901, 29947, 29901, 29900, 29889, 29900, 29896, 29892, 29871, 29900, 29889, 29945, 29901, 29955, 29889, 29945, 29901, 29900, 29889, 29900, 29896, 29962, 30004, 13, 29999, 353, 286, 29918, 417, 629, 29889, 27711, 29918, 771, 2291, 29898, 9302, 29889, 29894, 1429, 3552, 4419, 29889, 336, 955, 3285, 343, 29891, 29889, 336, 955, 3101, 467, 29911, 29897, 7503, 29892, 29871, 29896, 29962, 30004, 13, 29999, 353, 796, 29889, 690, 14443, 29898, 4419, 29889, 12181, 8443, 13, 3027, 353, 14770, 29889, 326, 4294, 29898, 29999, 29889, 29911, 29892, 29694, 2433, 28502, 342, 23592, 13, 462, 259, 15834, 7607, 29946, 29892, 29871, 29947, 29892, 29871, 29900, 29889, 29945, 29892, 29871, 29955, 29889, 29945, 511, 30004, 13, 462, 259, 9565, 2433, 6921, 742, 3978, 2433, 13609, 742, 274, 1958, 29922, 572, 29873, 29889, 4912, 29889, 29934, 29881, 3727, 8443, 13, 572, 29873, 29889, 2780, 1646, 29898, 3027, 8443, 13, 572, 29873, 29889, 3257, 877, 29906, 29899, 1990, 4522, 4695, 2169, 23881, 29905, 29876, 1019, 29890, 4427, 4695, 3826, 2459, 350, 618, 653, 1495, 30004, 13, 572, 29873, 29889, 1557, 2620, 29898, 29990, 7503, 29892, 29900, 3816, 29891, 1360, 29896, 1402, 29990, 7503, 29892, 29896, 3816, 29891, 1360, 29896, 1402, 3858, 543, 874, 5283, 272, 613, 2780, 543, 1127, 613, 12864, 27703, 7607, 29900, 29892, 29871, 29900, 29892, 29871, 29900, 876, 30004, 13, 572, 29873, 29889, 1557, 2620, 29898, 29990, 7503, 29892, 29900, 3816, 29891, 1360, 29906, 1402, 29990, 7503, 29892, 29896, 3816, 29891, 1360, 29906, 1402, 3858, 543, 2405, 5359, 983, 613, 2780, 543, 9539, 613, 12864, 27703, 7607, 29900, 29892, 29871, 29900, 29892, 29871, 29900, 876, 30004, 13, 572, 29873, 29889, 1557, 2620, 29898, 29990, 7503, 29892, 29900, 3816, 29891, 1360, 29900, 1402, 29990, 7503, 29892, 29896, 3816, 29891, 1360, 29900, 1402, 3858, 543, 842, 3628, 613, 2780, 543, 12692, 613, 12864, 27703, 7607, 29900, 29892, 29871, 29900, 29892, 29871, 29900, 876, 30004, 13, 572, 29873, 29889, 29916, 1643, 703, 29903, 1022, 284, 365, 1477, 1159, 30004, 13, 572, 29873, 29889, 29891, 1643, 703, 29925, 26310, 365, 1477, 1159, 30004, 13, 572, 29873, 29889, 29916, 2576, 29898, 29946, 29892, 29947, 8443, 13, 572, 29873, 29889, 29891, 2576, 29898, 29900, 29889, 29945, 29892, 29955, 29889, 29945, 8443, 13, 572, 29873, 29889, 26172, 26471, 13, 572, 29873, 29889, 7620, 1003, 703, 29906, 29899, 1990, 29899, 417, 629, 29899, 22795, 29889, 5140, 1159, 30004, 13, 30004, 13, 30004, 13, 29937, 29887, 17019, 1889, 10608, 2910, 30004, 13, 4419, 29892, 343, 29891, 353, 7442, 29889, 29885, 7720, 29961, 29946, 29901, 29947, 29901, 29900, 29889, 29900, 29945, 29892, 29871, 29900, 29889, 29945, 29901, 29955, 29889, 29945, 29901, 29900, 29889, 29900, 29945, 29962, 30004, 13, 17460, 353, 29871, 29896, 29889, 29900, 334, 390, 28062, 4197, 29896, 29889, 29900, 29892, 29871, 29896, 29889, 29900, 2314, 29937, 29878, 1635, 29918, 273, 275, 28467, 293, 30004, 13, 29885, 29918, 29887, 6739, 353, 22477, 7032, 2385, 3709, 29898, 17460, 29922, 17460, 467, 9202, 29898, 29990, 29873, 29892, 343, 29873, 8443, 13, 29999, 353, 286, 29918, 29887, 6739, 29889, 27711, 29918, 771, 2291, 29898, 9302, 29889, 29894, 1429, 3552, 4419, 29889, 336, 955, 3285, 343, 29891, 29889, 336, 955, 3101, 467, 29911, 29897, 7503, 29892, 29871, 29896, 29962, 30004, 13, 29999, 353, 796, 29889, 690, 14443, 29898, 4419, 29889, 12181, 8443, 13, 3027, 353, 14770, 29889, 326, 4294, 29898, 29999, 29889, 29911, 29892, 29694, 2433, 28502, 342, 23592, 13, 462, 259, 15834, 7607, 29946, 29892, 29871, 29947, 29892, 29871, 29900, 29889, 29945, 29892, 29871, 29955, 29889, 29945, 511, 30004, 13, 462, 259, 9565, 2433, 6921, 742, 3978, 2433, 13609, 742, 274, 1958, 29922, 572, 29873, 29889, 4912, 29889, 29934, 29881, 3727, 8443, 13, 572, 29873, 29889, 1557, 2620, 29898, 29990, 7503, 29892, 29900, 3816, 29891, 1360, 29896, 1402, 29990, 7503, 29892, 29896, 3816, 29891, 1360, 29896, 1402, 3858, 543, 874, 5283, 272, 613, 2780, 543, 1127, 613, 12864, 27703, 7607, 29900, 29892, 29871, 29900, 29892, 29871, 29900, 876, 30004, 13, 572, 29873, 29889, 1557, 2620, 29898, 29990, 7503, 29892, 29900, 3816, 29891, 1360, 29906, 1402, 29990, 7503, 29892, 29896, 3816, 29891, 1360, 29906, 1402, 3858, 543, 2405, 5359, 983, 613, 2780, 543, 9539, 613, 12864, 27703, 7607, 29900, 29892, 29871, 29900, 29892, 29871, 29900, 876, 30004, 13, 572, 29873, 29889, 1557, 2620, 29898, 29990, 7503, 29892, 29900, 3816, 29891, 1360, 29900, 1402, 29990, 7503, 29892, 29896, 3816, 29891, 1360, 29900, 1402, 3858, 543, 842, 3628, 613, 2780, 543, 12692, 613, 12864, 27703, 7607, 29900, 29892, 29871, 29900, 29892, 29871, 29900, 876, 30004, 13, 572, 29873, 29889, 2780, 1646, 29898, 3027, 8443, 13, 572, 29873, 29889, 3257, 703, 29906, 29899, 1990, 390, 28062, 22477, 10554, 4134, 3709, 29905, 29876, 3826, 2459, 7315, 1159, 30004, 13, 572, 29873, 29889, 29916, 1643, 703, 29903, 1022, 284, 365, 1477, 1159, 30004, 13, 572, 29873, 29889, 29891, 1643, 703, 29925, 26310, 365, 1477, 1159, 30004, 13, 572, 29873, 29889, 29916, 2576, 29898, 29946, 29892, 29947, 8443, 13, 572, 29873, 29889, 29891, 2576, 29898, 29900, 29889, 29945, 29892, 29955, 29889, 29945, 8443, 13, 572, 29873, 29889, 26172, 26471, 13, 572, 29873, 29889, 7620, 1003, 703, 29906, 29899, 1990, 29899, 29887, 6739, 29899, 22795, 29889, 5140, 1159, 30004, 13, 30004, 13, 29937, 328, 874, 27521, 8500, 272, 770, 3709, 30004, 13, 29885, 29918, 481, 29883, 353, 2087, 874, 27521, 23084, 2463, 2385, 3709, 26471, 13, 29885, 29918, 481, 29883, 29889, 9202, 29898, 29990, 29873, 29892, 3637, 8443, 13, 30004, 13, 4419, 29892, 343, 29891, 353, 7442, 29889, 29885, 7720, 29961, 29946, 29901, 29947, 29901, 29900, 29889, 29900, 29945, 29892, 29871, 29900, 29889, 29945, 29901, 29955, 29889, 29945, 29901, 29900, 29889, 29900, 29945, 29962, 30004, 13, 29999, 353, 286, 29918, 481, 29883, 29889, 27711, 29918, 5527, 29898, 9302, 29889, 29894, 1429, 3552, 4419, 29889, 336, 955, 3285, 343, 29891, 29889, 336, 955, 3101, 467, 29911, 8443, 13, 29999, 29918, 29874, 353, 5159, 30004, 13, 1454, 474, 297, 796, 29901, 30004, 13, 1678, 565, 474, 29961, 29900, 3816, 29900, 29962, 29958, 29875, 29961, 29900, 3816, 29896, 5387, 30004, 13, 4706, 796, 29918, 29874, 29889, 4397, 29898, 29900, 29889, 29945, 29899, 29875, 29961, 29896, 16261, 29906, 1846, 30004, 13, 1678, 1683, 29901, 30004, 13, 4706, 796, 29918, 29874, 29889, 4397, 29898, 29900, 29889, 29945, 29974, 29875, 29961, 29896, 16261, 29906, 1846, 30004, 13, 1669, 6756, 13, 29999, 29918, 29874, 353, 7442, 29889, 2378, 29898, 29999, 29918, 29874, 8443, 13, 29999, 29918, 29874, 353, 796, 29918, 29874, 29889, 690, 14443, 29898, 4419, 29889, 12181, 8443, 13, 3027, 353, 14770, 29889, 326, 4294, 29898, 29999, 29918, 29874, 29889, 29911, 29892, 29694, 2433, 28502, 342, 23592, 13, 462, 259, 15834, 7607, 29946, 29892, 29871, 29947, 29892, 29900, 29889, 29945, 29892, 29871, 29955, 29889, 29945, 511, 30004, 13, 462, 259, 9565, 2433, 6921, 742, 3978, 2433, 13609, 742, 274, 1958, 29922, 572, 29873, 29889, 4912, 29889, 29934, 29881, 3727, 8443, 13, 572, 29873, 29889, 1557, 2620, 29898, 29990, 7503, 29892, 29900, 3816, 29891, 1360, 29896, 1402, 29990, 7503, 29892, 29896, 3816, 29891, 1360, 29896, 1402, 3858, 543, 874, 5283, 272, 613, 2780, 543, 1127, 613, 12864, 27703, 7607, 29900, 29892, 29871, 29900, 29892, 29871, 29900, 876, 30004, 13, 572, 29873, 29889, 1557, 2620, 29898, 29990, 7503, 29892, 29900, 3816, 29891, 1360, 29906, 1402, 29990, 7503, 29892, 29896, 3816, 29891, 1360, 29906, 1402, 3858, 543, 2405, 5359, 983, 613, 2780, 543, 9539, 613, 12864, 27703, 7607, 29900, 29892, 29871, 29900, 29892, 29871, 29900, 876, 30004, 13, 572, 29873, 29889, 1557, 2620, 29898, 29990, 7503, 29892, 29900, 3816, 29891, 1360, 29900, 1402, 29990, 7503, 29892, 29896, 3816, 29891, 1360, 29900, 1402, 3858, 543, 842, 3628, 613, 2780, 543, 12692, 613, 12864, 27703, 7607, 29900, 29892, 29871, 29900, 29892, 29871, 29900, 876, 30004, 13, 572, 29873, 29889, 2780, 1646, 29898, 3027, 8443, 13, 572, 29873, 29889, 3257, 703, 29906, 29899, 1990, 2087, 874, 27521, 21099, 919, 272, 4134, 3709, 29905, 29876, 10811, 5084, 7315, 1159, 30004, 13, 572, 29873, 29889, 29916, 1643, 703, 29903, 1022, 284, 365, 1477, 1159, 30004, 13, 572, 29873, 29889, 29891, 1643, 703, 29925, 26310, 365, 1477, 1159, 30004, 13, 572, 29873, 29889, 29916, 2576, 29898, 29946, 29892, 29947, 8443, 13, 572, 29873, 29889, 29891, 2576, 29898, 29900, 29889, 29945, 29892, 29955, 29889, 29945, 8443, 13, 572, 29873, 29889, 26172, 26471, 13, 572, 29873, 29889, 7620, 1003, 703, 29906, 29899, 1990, 29899, 481, 29883, 29899, 22795, 29946, 29889, 5140, 1159, 30004, 13, 30004, 13, 29937, 20119, 6139, 310, 3095, 29883, 30004, 13, 11965, 353, 286, 29918, 481, 29883, 29889, 27711, 29918, 5527, 29898, 29990, 29879, 29961, 29896, 1822, 690, 14443, 29898, 29896, 29892, 29906, 876, 30004, 13, 29990, 29918, 29883, 392, 353, 7442, 29889, 2378, 29898, 29885, 29918, 481, 29883, 29889, 29990, 29918, 29883, 392, 8443, 13, 30004, 13, 572, 29873, 29889, 3257, 877, 23084, 919, 292, 716, 4559, 921, 1495, 30004, 13, 572, 29873, 29889, 1557, 2620, 29898, 29990, 7503, 29892, 29900, 3816, 29891, 1360, 29896, 1402, 29990, 7503, 29892, 29896, 3816, 29891, 1360, 29896, 1402, 3858, 543, 874, 5283, 272, 613, 2780, 543, 1127, 613, 12864, 27703, 7607, 29900, 29892, 29871, 29900, 29892, 29871, 29900, 876, 30004, 13, 572, 29873, 29889, 1557, 2620, 29898, 29990, 7503, 29892, 29900, 3816, 29891, 1360, 29906, 1402, 29990, 7503, 29892, 29896, 3816, 29891, 1360, 29906, 1402, 3858, 543, 2405, 5359, 983, 613, 2780, 543, 9539, 613, 12864, 27703, 7607, 29900, 29892, 29871, 29900, 29892, 29871, 29900, 876, 30004, 13, 572, 29873, 29889, 1557, 2620, 29898, 29990, 29879, 29961, 29896, 3816, 29900, 1402, 29990, 29879, 29961, 29896, 3816, 29896, 1402, 3858, 543, 1482, 4559, 304, 367, 25383, 613, 2780, 543, 7979, 29891, 613, 12864, 27703, 7607, 29900, 29892, 29871, 29900, 29892, 29871, 29900, 511, 22976, 543, 29916, 1159, 30004, 13, 572, 29873, 29889, 29916, 1643, 703, 29903, 1022, 284, 365, 1477, 1159, 30004, 13, 572, 29873, 29889, 29891, 1643, 703, 29925, 26310, 365, 1477, 1159, 30004, 13, 572, 29873, 29889, 29916, 2576, 29898, 29946, 29892, 29947, 8443, 13, 572, 29873, 29889, 29891, 2576, 29898, 29900, 29889, 29945, 29892, 29955, 29889, 29945, 8443, 13, 572, 29873, 29889, 26172, 26471, 13, 572, 29873, 29889, 7620, 1003, 703, 1482, 29899, 11249, 29889, 5140, 1159, 30004, 13, 30004, 13, 30004, 13, 572, 29873, 29889, 3257, 877, 5160, 770, 3709, 18988, 29901, 1224, 5283, 272, 1495, 30004, 13, 572, 29873, 29889, 1557, 2620, 29898, 29990, 7503, 29892, 29900, 3816, 29891, 1360, 29896, 1402, 29990, 7503, 29892, 29896, 3816, 29891, 1360, 29896, 1402, 3858, 543, 874, 5283, 272, 613, 2780, 543, 1127, 613, 12864, 27703, 7607, 29900, 29892, 29871, 29900, 29892, 29871, 29900, 876, 30004, 13, 572, 29873, 29889, 1557, 2620, 29898, 29990, 29879, 29961, 29896, 3816, 29900, 1402, 29990, 29879, 29961, 29896, 3816, 29896, 1402, 3858, 543, 1482, 4559, 304, 367, 25383, 613, 2780, 543, 7979, 29891, 613, 12864, 27703, 7607, 29900, 29892, 29871, 29900, 29892, 29871, 29900, 511, 22976, 543, 29916, 1159, 30004, 13, 572, 29873, 29889, 29916, 1643, 703, 29903, 1022, 284, 365, 1477, 1159, 30004, 13, 572, 29873, 29889, 29891, 1643, 703, 29925, 26310, 365, 1477, 1159, 30004, 13, 572, 29873, 29889, 29916, 2576, 29898, 29946, 29892, 29947, 8443, 13, 572, 29873, 29889, 29891, 2576, 29898, 29900, 29889, 29945, 29892, 29955, 29889, 29945, 8443, 13, 572, 29873, 29889, 26172, 26471, 13, 572, 29873, 29889, 7620, 1003, 703, 874, 5283, 272, 29899, 11965, 18186, 29889, 5140, 1159, 30004, 13, 30004, 13, 572, 29873, 29889, 3257, 877, 3253, 874, 27521, 4559, 338, 5759, 1495, 30004, 13, 572, 29873, 29889, 1557, 2620, 29898, 29990, 7503, 29892, 29900, 3816, 29891, 1360, 29896, 1402, 29990, 7503, 29892, 29896, 3816, 29891, 1360, 29896, 1402, 3858, 543, 874, 5283, 272, 613, 2780, 543, 1127, 613, 12864, 27703, 7607, 29900, 29892, 29871, 29900, 29892, 29871, 29900, 876, 30004, 13, 572, 29873, 29889, 1557, 2620, 29898, 29990, 29918, 29883, 392, 7503, 29892, 29900, 1402, 29990, 29918, 29883, 392, 7503, 29892, 29896, 1402, 3858, 543, 328, 874, 27521, 4559, 613, 2780, 543, 7979, 29891, 613, 12864, 27703, 7607, 29900, 29892, 29871, 29900, 29892, 29871, 29900, 511, 22976, 543, 29916, 1159, 30004, 13, 572, 29873, 29889, 29916, 1643, 703, 29903, 1022, 284, 365, 1477, 1159, 30004, 13, 572, 29873, 29889, 29891, 1643, 703, 29925, 26310, 365, 1477, 1159, 30004, 13, 572, 29873, 29889, 29916, 2576, 29898, 29946, 29892, 29947, 8443, 13, 572, 29873, 29889, 29891, 2576, 29898, 29900, 29889, 29945, 29892, 29955, 29889, 29945, 8443, 13, 572, 29873, 29889, 26172, 26471, 13, 572, 29873, 29889, 7620, 1003, 703, 328, 874, 27521, 29899, 11249, 29889, 5140, 1159, 30004, 13, 30004, 13, 30004, 13, 4419, 29892, 343, 29891, 353, 7442, 29889, 29885, 7720, 29961, 29946, 29901, 29947, 29901, 29889, 29900, 29896, 29892, 29871, 29900, 29889, 29945, 29901, 29955, 29889, 29945, 29901, 29889, 29900, 29896, 29962, 30004, 13, 7720, 353, 7442, 29889, 29883, 29918, 29961, 4419, 29889, 336, 955, 3285, 343, 29891, 29889, 336, 955, 580, 29962, 30004, 13, 771, 5824, 353, 286, 29918, 481, 29883, 29889, 29885, 29918, 17263, 29889, 27711, 29918, 771, 2291, 29898, 7720, 29897, 7503, 29892, 29871, 29896, 1822, 690, 14443, 29898, 4419, 29889, 12181, 8443, 13, 30004, 13, 572, 29873, 29889, 3257, 877, 16382, 13600, 2794, 4482, 16420, 1495, 30004, 13, 572, 29873, 29889, 1557, 2620, 29898, 29990, 7503, 29892, 29900, 3816, 29891, 1360, 29896, 1402, 29990, 7503, 29892, 29896, 3816, 29891, 1360, 29896, 1402, 3858, 543, 874, 5283, 272, 613, 2780, 543, 1127, 613, 12864, 27703, 7607, 29900, 29892, 29871, 29900, 29892, 29871, 29900, 876, 30004, 13, 572, 29873, 29889, 1557, 2620, 29898, 29990, 29918, 29883, 392, 7503, 29892, 29900, 1402, 29990, 29918, 29883, 392, 7503, 29892, 29896, 1402, 3858, 543, 328, 874, 27521, 4559, 613, 2780, 543, 7979, 29891, 613, 12864, 27703, 7607, 29900, 29892, 29871, 29900, 29892, 29871, 29900, 511, 22976, 543, 29916, 1159, 30004, 13, 572, 29873, 29889, 29916, 1643, 703, 29903, 1022, 284, 365, 1477, 1159, 30004, 13, 572, 29873, 29889, 29891, 1643, 703, 29925, 26310, 365, 1477, 1159, 30004, 13, 572, 29873, 29889, 29916, 2576, 29898, 29946, 29892, 29947, 8443, 13, 572, 29873, 29889, 29891, 2576, 29898, 29900, 29889, 29945, 29892, 29955, 29889, 29945, 8443, 13, 572, 29873, 29889, 1285, 473, 29898, 4419, 29892, 343, 29891, 29892, 2070, 29879, 29892, 11174, 11759, 29889, 29945, 1402, 11955, 543, 8517, 1159, 30004, 13, 572, 29873, 29889, 26172, 26471, 13, 572, 29873, 29889, 7620, 1003, 703, 5527, 5084, 29899, 1990, 3709, 29889, 5140, 1159, 30004, 13, 30004, 13, 2 ]
Gym/web_athlete/models.py
Ahmadrezasamadi/django-internship
6
83688
from django.db import models from django.contrib.auth.models import User import datetime # Create your models here. class Time_option(models.Model): timee = models.CharField(max_length = 10) def __str__(self): return self.timee class Fields(models.Model): name = models.CharField(max_length = 200) def __str__(self): return self.name class F_t(models.Model): user = models.ForeignKey(User, on_delete=models.CASCADE) time = models.DateField(auto_now=datetime.datetime.now()) Field = models.ForeignKey(Fields, on_delete=models.CASCADE) time_options = models.ForeignKey(Time_option, on_delete=models.CASCADE) class Member(models.Model): sexuality = ( ('M','male'), ('F','female'), ('O','other'), ) skills = ( ('‌‌B','beginner'), ('E','elementary'), ('P','professional'), ) name = models.CharField(max_length = 200) user = models.ForeignKey(User,on_delete=models.CASCADE) phone_number = models.CharField(max_length = 11) field = models.ForeignKey(Fields,on_delete=models.CASCADE) birth_date = models.DateTimeField() first_session_date = models.DateTimeField(auto_now=True) sex = models.CharField(max_length =1 ,choices=sexuality) age = models.IntegerField() skill = models.CharField(max_length=1,choices = skills) profile = models.TextField(max_length = 200) class_time = models.ForeignKey(Time_option,on_delete=models.CASCADE) def __str__(self): return self.name
[ 1, 515, 9557, 29889, 2585, 1053, 4733, 13, 3166, 9557, 29889, 21570, 29889, 5150, 29889, 9794, 1053, 4911, 13, 5215, 12865, 13, 29937, 6204, 596, 4733, 1244, 29889, 13, 13, 1990, 5974, 29918, 3385, 29898, 9794, 29889, 3195, 1125, 13, 1678, 931, 29872, 353, 4733, 29889, 27890, 29898, 3317, 29918, 2848, 353, 29871, 29896, 29900, 29897, 13, 13, 1678, 822, 4770, 710, 12035, 1311, 1125, 13, 9651, 736, 1583, 29889, 2230, 29872, 13, 13, 1990, 8989, 29879, 29898, 9794, 29889, 3195, 1125, 13, 1678, 1024, 353, 4733, 29889, 27890, 29898, 3317, 29918, 2848, 353, 29871, 29906, 29900, 29900, 29897, 13, 1678, 822, 4770, 710, 12035, 1311, 1125, 13, 4706, 736, 1583, 29889, 978, 13, 13, 13, 1990, 383, 29918, 29873, 29898, 9794, 29889, 3195, 1125, 13, 1678, 1404, 353, 4733, 29889, 27755, 2558, 29898, 2659, 29892, 373, 29918, 8143, 29922, 9794, 29889, 29907, 3289, 5454, 2287, 29897, 13, 1678, 931, 353, 4733, 29889, 2539, 3073, 29898, 6921, 29918, 3707, 29922, 12673, 29889, 12673, 29889, 3707, 3101, 13, 1678, 8989, 353, 4733, 29889, 27755, 2558, 29898, 14256, 29892, 373, 29918, 8143, 29922, 9794, 29889, 29907, 3289, 5454, 2287, 29897, 13, 1678, 931, 29918, 6768, 353, 4733, 29889, 27755, 2558, 29898, 2481, 29918, 3385, 29892, 373, 29918, 8143, 29922, 9794, 29889, 29907, 3289, 5454, 2287, 29897, 13, 13, 13, 13, 13, 13, 1990, 19495, 29898, 9794, 29889, 3195, 1125, 259, 13, 1678, 18287, 537, 353, 313, 13, 4706, 6702, 29924, 3788, 19202, 5477, 13, 4706, 6702, 29943, 3788, 29888, 331, 744, 5477, 13, 4706, 6702, 29949, 3788, 1228, 5477, 13, 1678, 1723, 13, 1678, 25078, 353, 313, 13, 4706, 6702, 30430, 30430, 29933, 3788, 463, 1089, 5477, 13, 4706, 6702, 29923, 3788, 5029, 653, 5477, 13, 4706, 6702, 29925, 3788, 23221, 15750, 5477, 13, 1678, 1723, 13, 1678, 1024, 353, 4733, 29889, 27890, 29898, 3317, 29918, 2848, 353, 29871, 29906, 29900, 29900, 29897, 13, 1678, 1404, 353, 4733, 29889, 27755, 2558, 29898, 2659, 29892, 265, 29918, 8143, 29922, 9794, 29889, 29907, 3289, 5454, 2287, 29897, 13, 1678, 9008, 29918, 4537, 353, 4733, 29889, 27890, 29898, 3317, 29918, 2848, 353, 29871, 29896, 29896, 29897, 13, 1678, 1746, 353, 4733, 29889, 27755, 2558, 29898, 14256, 29892, 265, 29918, 8143, 29922, 9794, 29889, 29907, 3289, 5454, 2287, 29897, 13, 1678, 12060, 29918, 1256, 353, 4733, 29889, 11384, 3073, 580, 13, 1678, 937, 29918, 7924, 29918, 1256, 353, 4733, 29889, 11384, 3073, 29898, 6921, 29918, 3707, 29922, 5574, 29897, 13, 1678, 7916, 353, 4733, 29889, 27890, 29898, 3317, 29918, 2848, 353, 29896, 1919, 1859, 1575, 29922, 14167, 950, 537, 29897, 13, 1678, 5046, 353, 4733, 29889, 7798, 3073, 580, 13, 1678, 19911, 353, 4733, 29889, 27890, 29898, 3317, 29918, 2848, 29922, 29896, 29892, 1859, 1575, 353, 25078, 29897, 13, 1678, 8722, 353, 4733, 29889, 15778, 29898, 3317, 29918, 2848, 353, 29871, 29906, 29900, 29900, 29897, 1678, 13, 1678, 770, 29918, 2230, 353, 4733, 29889, 27755, 2558, 29898, 2481, 29918, 3385, 29892, 265, 29918, 8143, 29922, 9794, 29889, 29907, 3289, 5454, 2287, 29897, 29871, 13, 13, 1678, 822, 4770, 710, 12035, 1311, 1125, 13, 4706, 736, 1583, 29889, 978, 2 ]
src/ase2sprkkr/potentials/definitions/potential.py
ase2sprkkr/ase2sprkkr
1
143153
<gh_stars>1-10 """ Here, the format of the potential_file is defined """ from .sections import * def fce(): from ...common.misc import OrderedDict from ...common.grammar_types import \ Keyword, DefKeyword, Table, Array, Sequence, \ integer, Date, boolean, line_string from ..potential_definitions import \ PotSectionDefinition, \ ASEArraySectionDefinition, \ PotValueDefinition as V,\ PotentialDefinition, \ Separator import datetime sections = [] def Section(*args, cls=PotSectionDefinition, **kwargs): x=cls(*args, **kwargs) sections.append(x) return x def ArraySection(array_name): def factory(*args, **kwargs): return ASEArraySectionDefinition(*args, array_name = array_name, **kwargs) return factory Section('HEADER', [ Separator(), V('HEADER', line_string, lambda x: f'SPR-KKR potential file, created at {datetime.datetime.now()}'), Separator(), V('TITLE', line_string, 'Created by ASE-SPR-KKR wrapper'), V('SYSTEM', line_string, lambda x: 'System: {}'.format(x._get_root_container().atoms.symbols) ), V('PACKAGE', line_string, 'SPR-KKR'), V('FORMAT', Sequence(int, Date(prefix='(', postfix=')'), names = ['VERSION', 'DATE']), default_value = [7, datetime.datetime(2007,5,21)]), ], name_in_grammar = False) Section('GLOBAL SYSTEM PARAMETER', cls = GlobalSystemParameterDefinition) Section('SCF-INFO', [ V('INFO', line_string, 'NONE'), V('SCFSTATUS', DefKeyword('START', 'CONVERGED', 'ITR-BULK')), V('FULLPOT', False), V('BREITINT', False), V('NONMAG', False, alternative_names='NOMAG'), V('ORBPOL', str, 'NONE'), V('EXTFIELD', False), V('BLCOUPL', False), V('BEXT', 0.0), V('SEMICORE', False), V('LLOYD', False), V('NE', Array(int), is_optional = True), V('IBZINT', int, is_optional = True), V('NKTAB', int, is_optional = True), # V('XC-POT', str, is_optional = True), V('SCF-ALG', Keyword('BROYDEN', 'BROYDEN2'), is_optional = True), V('SCF-ITER', 0), V('SCF-MIX', 0.2), V('SCF-TOL', 1e-5), V('RMSAVV', 999999.), V('RMSAVB', 999999.), V('EF', 999999.), V('VMTZ', 0.7), ], ) Section('LATTICE', cls = LatticeSectionDefinition) Section('SITES', cls = SitesSectionDefinition) Section('OCCUPATION', cls = OccupationSectionDefinition) Section('REFERENCE SYSTEM', cls = ReferenceSystemSectionDefinition) Section('MAGNETISATION DIRECTION', [ V('KMROT', int, 0), V('QMVEC', Array([0.,0.,0.])), V('DATA', Table({'MTET_Q' : float, 'MPHI_Q' : float }, numbering='IQ', free_header = True)), V('IT_DATA', Table({'IT': int, 'MTET_Q' : float, 'MPHI_T' : float, 'MGAM_T': float}, free_header = lambda x: '*' not in x), is_optional=True), ], cls = ArraySection('magnetisation_direction') ) Section('MESH INFORMATION', cls = MeshInformationSectionDefinition) Section('OCCUPATION', cls = OccupationSectionDefinition) Section('TYPES', cls = TypesSectionDefinition) return PotentialDefinition(sections) potential_definition = fce() """ Potential file format definition """ del fce
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 15945, 29908, 2266, 29892, 278, 3402, 310, 278, 7037, 29918, 1445, 338, 3342, 9995, 13, 13, 3166, 869, 27117, 1053, 334, 13, 13, 1753, 285, 346, 7295, 13, 29871, 515, 2023, 9435, 29889, 29885, 10669, 1053, 8170, 287, 21533, 13, 29871, 515, 29871, 2023, 9435, 29889, 1393, 3034, 29918, 8768, 1053, 320, 13, 4706, 7670, 1742, 29892, 5282, 2558, 1742, 29892, 6137, 29892, 4398, 29892, 922, 3910, 29892, 320, 13, 4706, 6043, 29892, 4712, 29892, 7223, 29892, 1196, 29918, 1807, 13, 29871, 515, 6317, 17765, 2556, 29918, 25476, 2187, 1053, 320, 13, 4706, 10173, 13438, 14683, 29892, 320, 13, 4706, 319, 1660, 2588, 13438, 14683, 29892, 320, 13, 4706, 10173, 1917, 14683, 408, 478, 2053, 13, 4706, 10173, 2556, 14683, 29892, 320, 13, 4706, 922, 17954, 13, 29871, 1053, 12865, 13, 13, 29871, 13926, 353, 5159, 13, 29871, 822, 9779, 10456, 5085, 29892, 1067, 29879, 29922, 29925, 327, 13438, 14683, 29892, 3579, 19290, 1125, 13, 268, 921, 29922, 25932, 10456, 5085, 29892, 3579, 19290, 29897, 13, 268, 13926, 29889, 4397, 29898, 29916, 29897, 13, 268, 736, 921, 13, 13, 29871, 822, 4398, 13438, 29898, 2378, 29918, 978, 1125, 13, 418, 822, 12529, 10456, 5085, 29892, 3579, 19290, 1125, 13, 3986, 736, 319, 1660, 2588, 13438, 14683, 10456, 5085, 29892, 1409, 29918, 978, 353, 1409, 29918, 978, 29892, 3579, 19290, 29897, 13, 418, 736, 12529, 13, 13, 29871, 9779, 877, 23252, 1001, 742, 518, 13, 1678, 922, 17954, 3285, 13, 1678, 478, 877, 23252, 1001, 742, 1196, 29918, 1807, 29892, 14013, 921, 29901, 285, 29915, 5550, 29934, 29899, 29968, 29968, 29934, 7037, 934, 29892, 2825, 472, 426, 12673, 29889, 12673, 29889, 3707, 28296, 5477, 13, 1678, 922, 17954, 3285, 13, 1678, 478, 877, 29911, 1806, 1307, 742, 1196, 29918, 1807, 29892, 525, 20399, 491, 319, 1660, 29899, 5550, 29934, 29899, 29968, 29968, 29934, 14476, 5477, 13, 1678, 478, 877, 14816, 1254, 12665, 742, 1196, 29918, 1807, 29892, 14013, 921, 29901, 525, 3924, 29901, 6571, 4286, 4830, 29898, 29916, 3032, 657, 29918, 4632, 29918, 7611, 2141, 271, 4835, 29889, 18098, 29879, 29897, 10353, 13, 1678, 478, 877, 29925, 11375, 10461, 742, 1196, 29918, 1807, 29892, 525, 5550, 29934, 29899, 29968, 29968, 29934, 5477, 13, 1678, 478, 877, 19094, 1299, 742, 922, 3910, 29898, 524, 29892, 4712, 29898, 13506, 2433, 29317, 1400, 5878, 29922, 1495, 5477, 2983, 353, 6024, 16358, 742, 525, 6248, 2033, 511, 13, 3986, 2322, 29918, 1767, 353, 518, 29955, 29892, 12865, 29889, 12673, 29898, 29906, 29900, 29900, 29955, 29892, 29945, 29892, 29906, 29896, 4638, 511, 13, 29871, 21251, 1024, 29918, 262, 29918, 1393, 3034, 353, 7700, 29897, 13, 13, 29871, 9779, 877, 29954, 28902, 1964, 28962, 1254, 12665, 349, 1718, 25797, 4945, 742, 1067, 29879, 353, 12002, 3924, 9329, 14683, 29897, 13, 13, 29871, 9779, 877, 7187, 29943, 29899, 11690, 742, 518, 13, 1678, 478, 877, 11690, 742, 1196, 29918, 1807, 29892, 525, 29940, 12413, 5477, 13, 1678, 478, 877, 7187, 29943, 27047, 742, 5282, 2558, 1742, 877, 25826, 742, 525, 6007, 5348, 1692, 29928, 742, 525, 1806, 29934, 29899, 7838, 29931, 29968, 1495, 511, 13, 1678, 478, 877, 29943, 3299, 29925, 2891, 742, 7700, 511, 13, 1678, 478, 877, 29933, 1525, 1806, 10192, 742, 7700, 511, 13, 1678, 478, 877, 29940, 1164, 1529, 29954, 742, 7700, 29892, 8671, 29918, 7039, 2433, 6632, 1529, 29954, 5477, 13, 1678, 478, 877, 1955, 29933, 29925, 5607, 742, 851, 29892, 525, 29940, 12413, 5477, 13, 1678, 478, 877, 12194, 3738, 27286, 742, 7700, 511, 13, 1678, 478, 877, 13367, 3217, 4897, 29931, 742, 7700, 511, 13, 1678, 478, 877, 29933, 12194, 742, 29871, 29900, 29889, 29900, 511, 13, 1678, 478, 877, 1660, 29924, 2965, 29949, 1525, 742, 7700, 511, 13, 1678, 478, 877, 2208, 29949, 29979, 29928, 742, 7700, 511, 13, 1678, 478, 877, 8186, 742, 4398, 29898, 524, 511, 338, 29918, 25253, 353, 5852, 511, 13, 1678, 478, 877, 8979, 29999, 10192, 742, 938, 29892, 338, 29918, 25253, 353, 5852, 511, 13, 1678, 478, 877, 29940, 29968, 29911, 2882, 742, 938, 29892, 338, 29918, 25253, 353, 5852, 511, 13, 29937, 259, 478, 877, 29990, 29907, 29899, 29925, 2891, 742, 851, 29892, 338, 29918, 25253, 353, 5852, 511, 13, 1678, 478, 877, 7187, 29943, 29899, 1964, 29954, 742, 7670, 1742, 877, 29933, 1672, 29979, 29928, 1430, 742, 525, 29933, 1672, 29979, 29928, 1430, 29906, 5477, 338, 29918, 25253, 353, 5852, 511, 13, 1678, 478, 877, 7187, 29943, 29899, 1806, 1001, 742, 29871, 29900, 511, 13, 1678, 478, 877, 7187, 29943, 29899, 29924, 6415, 742, 29871, 29900, 29889, 29906, 511, 13, 1678, 478, 877, 7187, 29943, 29899, 4986, 29931, 742, 29871, 29896, 29872, 29899, 29945, 511, 13, 1678, 478, 877, 29934, 4345, 7520, 29963, 742, 29871, 29929, 29929, 29929, 29929, 29929, 29929, 9774, 13, 1678, 478, 877, 29934, 4345, 7520, 29933, 742, 29871, 29929, 29929, 29929, 29929, 29929, 29929, 9774, 13, 1678, 478, 877, 29638, 742, 29871, 29929, 29929, 29929, 29929, 29929, 29929, 9774, 13, 1678, 478, 877, 9219, 29911, 29999, 742, 29871, 29900, 29889, 29955, 511, 13, 29871, 21251, 1723, 13, 13, 29871, 9779, 877, 29931, 1299, 29911, 12107, 742, 1067, 29879, 353, 365, 19704, 13438, 14683, 29897, 13, 29871, 9779, 877, 29903, 1806, 2890, 742, 259, 1067, 29879, 353, 317, 3246, 13438, 14683, 29897, 13, 29871, 9779, 877, 29949, 4174, 4897, 8098, 742, 259, 1067, 29879, 353, 16117, 786, 362, 13438, 14683, 29897, 13, 29871, 9779, 877, 25866, 1001, 1430, 4741, 28962, 1254, 12665, 742, 1067, 29879, 353, 12105, 3924, 13438, 14683, 29897, 13, 29871, 9779, 877, 1529, 29954, 6006, 3235, 8098, 22471, 1525, 9838, 742, 518, 13, 1678, 478, 877, 29968, 29924, 1672, 29911, 742, 938, 29892, 29871, 29900, 511, 13, 1678, 478, 877, 29984, 29924, 29963, 11206, 742, 4398, 4197, 29900, 1696, 29900, 1696, 29900, 29889, 2314, 511, 13, 1678, 478, 877, 14573, 742, 6137, 3319, 29915, 11490, 2544, 29918, 29984, 29915, 584, 5785, 29892, 525, 3580, 17628, 29918, 29984, 29915, 584, 5785, 2981, 1353, 292, 2433, 29902, 29984, 742, 3889, 29918, 6672, 353, 5852, 8243, 13, 1678, 478, 877, 1806, 29918, 14573, 742, 6137, 3319, 29915, 1806, 2396, 938, 29892, 525, 11490, 2544, 29918, 29984, 29915, 584, 5785, 29892, 525, 3580, 17628, 29918, 29911, 29915, 584, 5785, 29892, 525, 29924, 29954, 5194, 29918, 29911, 2396, 5785, 1118, 3889, 29918, 6672, 353, 14013, 921, 29901, 525, 29930, 29915, 451, 297, 921, 511, 13, 418, 338, 29918, 25253, 29922, 5574, 511, 13, 1678, 21251, 13, 1678, 1067, 29879, 353, 4398, 13438, 877, 11082, 1212, 4371, 29918, 20845, 1495, 13, 29871, 1723, 13, 29871, 9779, 877, 2303, 7068, 2672, 19094, 8098, 742, 1067, 29879, 353, 341, 12094, 20350, 13438, 14683, 29897, 13, 29871, 9779, 877, 29949, 4174, 4897, 8098, 742, 259, 1067, 29879, 353, 16117, 786, 362, 13438, 14683, 29897, 13, 29871, 9779, 877, 15631, 29925, 2890, 742, 1067, 29879, 353, 28025, 13438, 14683, 29897, 13, 13, 29871, 736, 10173, 2556, 14683, 29898, 27117, 29897, 13, 13, 17765, 2556, 29918, 16553, 353, 285, 346, 580, 13, 15945, 29908, 10173, 2556, 934, 3402, 5023, 9995, 13, 13, 6144, 285, 346, 13, 2 ]
Ch6/iris.py
quietcoolwu/MLCode
0
187161
<gh_stars>0 # Code from Chapter 6 of Machine Learning: An Algorithmic Perspective (2nd Edition) # by <NAME> (http://stephenmonika.net) # You are free to use, change, or redistribute the code in any way you wish for # non-commercial purposes, but please maintain the name of the original author. # This code comes with no warranty of any kind. # <NAME>, 2008, 2014 # Various dimensionality reductions running on the Iris dataset import pylab as pl import numpy as np iris = np.loadtxt('../3 MLP/iris_proc.data', delimiter=',') iris[:, :4] = iris[:, :4] - iris[:, :4].mean(axis=0) imax = np.concatenate((iris.max(axis=0) * np.ones((1, 5)), iris.min(axis=0) * np.ones((1, 5))), axis=0).max(axis=0) iris[:, :4] = iris[:, :4] / imax[:4] labels = iris[:, 4:] iris = iris[:, :4] order = list(range(np.shape(iris)[0])) np.random.shuffle(order) iris = iris[order, :] labels = labels[order, 0] w0 = np.where(labels == 0) w1 = np.where(labels == 1) w2 = np.where(labels == 2) import lda newData, w = lda.lda(iris, labels, 2) print(np.shape(newData)) pl.plot(iris[w0, 0], iris[w0, 1], 'ok') pl.plot(iris[w1, 0], iris[w1, 1], '^k') pl.plot(iris[w2, 0], iris[w2, 1], 'vk') pl.axis([-1.5, 1.8, -1.5, 1.8]) pl.axis('off') pl.figure(2) pl.plot(newData[w0, 0], newData[w0, 1], 'ok') pl.plot(newData[w1, 0], newData[w1, 1], '^k') pl.plot(newData[w2, 0], newData[w2, 1], 'vk') pl.axis([-1.5, 1.8, -1.5, 1.8]) pl.axis('off') import pca x, y, evals, evecs = pca.pca(iris, 2) pl.figure(3) pl.plot(y[w0, 0], y[w0, 1], 'ok') pl.plot(y[w1, 0], y[w1, 1], '^k') pl.plot(y[w2, 0], y[w2, 1], 'vk') pl.axis('off') import kernelpca newData = kernelpca.kernelpca(iris, 'gaussian', 2) pl.figure(4) pl.plot(newData[w0, 0], newData[w0, 1], 'ok') pl.plot(newData[w1, 0], newData[w1, 1], '^k') pl.plot(newData[w2, 0], newData[w2, 1], 'vk') pl.axis('off') import factoranalysis newData = factoranalysis.factoranalysis(iris, 2) # print newData pl.figure(5) pl.plot(newData[w0, 0], newData[w0, 1], 'ok') pl.plot(newData[w1, 0], newData[w1, 1], '^k') pl.plot(newData[w2, 0], newData[w2, 1], 'vk') pl.axis('off') import lle print(np.shape(iris)) a, b, newData = lle.lle(iris, 2, 12) print(np.shape(newData)) print(newData[w0, :]) print("---") print(newData[w1, :]) print("---") print(newData[w2, :]) pl.plot(newData[w0, 0], newData[w0, 1], 'ok') pl.plot(newData[w1, 0], newData[w1, 1], '^k') pl.plot(newData[w2, 0], newData[w2, 1], 'vk') pl.axis('off') import isomap print(labels) newData, newLabels = isomap.isomap(iris, 2, 100) print(np.shape(newData)) print(newLabels) w0 = np.where(newLabels == 0) w1 = np.where(newLabels == 1) w2 = np.where(newLabels == 2) pl.plot(newData[w0, 0], newData[w0, 1], 'ok') pl.plot(newData[w1, 0], newData[w1, 1], '^k') pl.plot(newData[w2, 0], newData[w2, 1], 'vk') pl.axis('off') print("Done") pl.show()
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 5920, 515, 23040, 29871, 29953, 310, 6189, 29257, 29901, 530, 29068, 293, 9034, 12645, 313, 29906, 299, 17138, 29897, 13, 29937, 491, 529, 5813, 29958, 313, 1124, 597, 1655, 9789, 3712, 4106, 29889, 1212, 29897, 13, 13, 29937, 887, 526, 3889, 304, 671, 29892, 1735, 29892, 470, 2654, 391, 2666, 278, 775, 297, 738, 982, 366, 6398, 363, 13, 29937, 1661, 29899, 510, 1050, 1455, 11976, 29892, 541, 3113, 7344, 278, 1024, 310, 278, 2441, 4148, 29889, 13, 29937, 910, 775, 5304, 411, 694, 1370, 21867, 29891, 310, 738, 2924, 29889, 13, 13, 29937, 529, 5813, 10202, 29871, 29906, 29900, 29900, 29947, 29892, 29871, 29906, 29900, 29896, 29946, 13, 13, 29937, 9586, 681, 22112, 537, 3724, 1953, 2734, 373, 278, 306, 3780, 8783, 13, 5215, 282, 2904, 370, 408, 715, 13, 5215, 12655, 408, 7442, 13, 13, 381, 275, 353, 7442, 29889, 1359, 3945, 877, 6995, 29941, 341, 13208, 29914, 381, 275, 29918, 15439, 29889, 1272, 742, 28552, 29922, 742, 1495, 13, 381, 275, 7503, 29892, 584, 29946, 29962, 353, 3805, 275, 7503, 29892, 584, 29946, 29962, 448, 3805, 275, 7503, 29892, 584, 29946, 1822, 12676, 29898, 8990, 29922, 29900, 29897, 13, 326, 1165, 353, 7442, 29889, 535, 29883, 2579, 403, 3552, 381, 275, 29889, 3317, 29898, 8990, 29922, 29900, 29897, 334, 7442, 29889, 2873, 3552, 29896, 29892, 29871, 29945, 8243, 3805, 275, 29889, 1195, 29898, 8990, 29922, 29900, 29897, 334, 7442, 29889, 2873, 3552, 29896, 29892, 29871, 29945, 876, 511, 9685, 29922, 29900, 467, 3317, 29898, 8990, 29922, 29900, 29897, 13, 381, 275, 7503, 29892, 584, 29946, 29962, 353, 3805, 275, 7503, 29892, 584, 29946, 29962, 847, 527, 1165, 7503, 29946, 29962, 13, 21134, 353, 3805, 275, 7503, 29892, 29871, 29946, 17531, 13, 381, 275, 353, 3805, 275, 7503, 29892, 584, 29946, 29962, 13, 13, 2098, 353, 1051, 29898, 3881, 29898, 9302, 29889, 12181, 29898, 381, 275, 9601, 29900, 12622, 13, 9302, 29889, 8172, 29889, 845, 21897, 29898, 2098, 29897, 13, 381, 275, 353, 3805, 275, 29961, 2098, 29892, 584, 29962, 13, 21134, 353, 11073, 29961, 2098, 29892, 29871, 29900, 29962, 13, 13, 29893, 29900, 353, 7442, 29889, 3062, 29898, 21134, 1275, 29871, 29900, 29897, 13, 29893, 29896, 353, 7442, 29889, 3062, 29898, 21134, 1275, 29871, 29896, 29897, 13, 29893, 29906, 353, 7442, 29889, 3062, 29898, 21134, 1275, 29871, 29906, 29897, 13, 13, 5215, 301, 1388, 13, 13, 1482, 1469, 29892, 281, 353, 301, 1388, 29889, 430, 29874, 29898, 381, 275, 29892, 11073, 29892, 29871, 29906, 29897, 13, 2158, 29898, 9302, 29889, 12181, 29898, 1482, 1469, 876, 13, 572, 29889, 5317, 29898, 381, 275, 29961, 29893, 29900, 29892, 29871, 29900, 1402, 3805, 275, 29961, 29893, 29900, 29892, 29871, 29896, 1402, 525, 554, 1495, 13, 572, 29889, 5317, 29898, 381, 275, 29961, 29893, 29896, 29892, 29871, 29900, 1402, 3805, 275, 29961, 29893, 29896, 29892, 29871, 29896, 1402, 525, 29985, 29895, 1495, 13, 572, 29889, 5317, 29898, 381, 275, 29961, 29893, 29906, 29892, 29871, 29900, 1402, 3805, 275, 29961, 29893, 29906, 29892, 29871, 29896, 1402, 525, 29894, 29895, 1495, 13, 572, 29889, 8990, 4197, 29899, 29896, 29889, 29945, 29892, 29871, 29896, 29889, 29947, 29892, 448, 29896, 29889, 29945, 29892, 29871, 29896, 29889, 29947, 2314, 13, 572, 29889, 8990, 877, 2696, 1495, 13, 572, 29889, 4532, 29898, 29906, 29897, 13, 572, 29889, 5317, 29898, 1482, 1469, 29961, 29893, 29900, 29892, 29871, 29900, 1402, 716, 1469, 29961, 29893, 29900, 29892, 29871, 29896, 1402, 525, 554, 1495, 13, 572, 29889, 5317, 29898, 1482, 1469, 29961, 29893, 29896, 29892, 29871, 29900, 1402, 716, 1469, 29961, 29893, 29896, 29892, 29871, 29896, 1402, 525, 29985, 29895, 1495, 13, 572, 29889, 5317, 29898, 1482, 1469, 29961, 29893, 29906, 29892, 29871, 29900, 1402, 716, 1469, 29961, 29893, 29906, 29892, 29871, 29896, 1402, 525, 29894, 29895, 1495, 13, 572, 29889, 8990, 4197, 29899, 29896, 29889, 29945, 29892, 29871, 29896, 29889, 29947, 29892, 448, 29896, 29889, 29945, 29892, 29871, 29896, 29889, 29947, 2314, 13, 572, 29889, 8990, 877, 2696, 1495, 13, 13, 5215, 282, 1113, 13, 13, 29916, 29892, 343, 29892, 19745, 29879, 29892, 321, 2003, 29879, 353, 282, 1113, 29889, 29886, 1113, 29898, 381, 275, 29892, 29871, 29906, 29897, 13, 572, 29889, 4532, 29898, 29941, 29897, 13, 572, 29889, 5317, 29898, 29891, 29961, 29893, 29900, 29892, 29871, 29900, 1402, 343, 29961, 29893, 29900, 29892, 29871, 29896, 1402, 525, 554, 1495, 13, 572, 29889, 5317, 29898, 29891, 29961, 29893, 29896, 29892, 29871, 29900, 1402, 343, 29961, 29893, 29896, 29892, 29871, 29896, 1402, 525, 29985, 29895, 1495, 13, 572, 29889, 5317, 29898, 29891, 29961, 29893, 29906, 29892, 29871, 29900, 1402, 343, 29961, 29893, 29906, 29892, 29871, 29896, 1402, 525, 29894, 29895, 1495, 13, 572, 29889, 8990, 877, 2696, 1495, 13, 13, 5215, 8466, 29886, 1113, 13, 13, 1482, 1469, 353, 8466, 29886, 1113, 29889, 17460, 29886, 1113, 29898, 381, 275, 29892, 525, 29887, 17019, 742, 29871, 29906, 29897, 13, 572, 29889, 4532, 29898, 29946, 29897, 13, 572, 29889, 5317, 29898, 1482, 1469, 29961, 29893, 29900, 29892, 29871, 29900, 1402, 716, 1469, 29961, 29893, 29900, 29892, 29871, 29896, 1402, 525, 554, 1495, 13, 572, 29889, 5317, 29898, 1482, 1469, 29961, 29893, 29896, 29892, 29871, 29900, 1402, 716, 1469, 29961, 29893, 29896, 29892, 29871, 29896, 1402, 525, 29985, 29895, 1495, 13, 572, 29889, 5317, 29898, 1482, 1469, 29961, 29893, 29906, 29892, 29871, 29900, 1402, 716, 1469, 29961, 29893, 29906, 29892, 29871, 29896, 1402, 525, 29894, 29895, 1495, 13, 572, 29889, 8990, 877, 2696, 1495, 13, 13, 5215, 7329, 15916, 13, 13, 1482, 1469, 353, 7329, 15916, 29889, 19790, 15916, 29898, 381, 275, 29892, 29871, 29906, 29897, 13, 29937, 1596, 716, 1469, 13, 572, 29889, 4532, 29898, 29945, 29897, 13, 572, 29889, 5317, 29898, 1482, 1469, 29961, 29893, 29900, 29892, 29871, 29900, 1402, 716, 1469, 29961, 29893, 29900, 29892, 29871, 29896, 1402, 525, 554, 1495, 13, 572, 29889, 5317, 29898, 1482, 1469, 29961, 29893, 29896, 29892, 29871, 29900, 1402, 716, 1469, 29961, 29893, 29896, 29892, 29871, 29896, 1402, 525, 29985, 29895, 1495, 13, 572, 29889, 5317, 29898, 1482, 1469, 29961, 29893, 29906, 29892, 29871, 29900, 1402, 716, 1469, 29961, 29893, 29906, 29892, 29871, 29896, 1402, 525, 29894, 29895, 1495, 13, 572, 29889, 8990, 877, 2696, 1495, 13, 13, 5215, 19804, 13, 13, 2158, 29898, 9302, 29889, 12181, 29898, 381, 275, 876, 13, 29874, 29892, 289, 29892, 716, 1469, 353, 19804, 29889, 19091, 29898, 381, 275, 29892, 29871, 29906, 29892, 29871, 29896, 29906, 29897, 13, 2158, 29898, 9302, 29889, 12181, 29898, 1482, 1469, 876, 13, 2158, 29898, 1482, 1469, 29961, 29893, 29900, 29892, 584, 2314, 13, 2158, 703, 5634, 1159, 13, 2158, 29898, 1482, 1469, 29961, 29893, 29896, 29892, 584, 2314, 13, 2158, 703, 5634, 1159, 13, 2158, 29898, 1482, 1469, 29961, 29893, 29906, 29892, 584, 2314, 13, 13, 572, 29889, 5317, 29898, 1482, 1469, 29961, 29893, 29900, 29892, 29871, 29900, 1402, 716, 1469, 29961, 29893, 29900, 29892, 29871, 29896, 1402, 525, 554, 1495, 13, 572, 29889, 5317, 29898, 1482, 1469, 29961, 29893, 29896, 29892, 29871, 29900, 1402, 716, 1469, 29961, 29893, 29896, 29892, 29871, 29896, 1402, 525, 29985, 29895, 1495, 13, 572, 29889, 5317, 29898, 1482, 1469, 29961, 29893, 29906, 29892, 29871, 29900, 1402, 716, 1469, 29961, 29893, 29906, 29892, 29871, 29896, 1402, 525, 29894, 29895, 1495, 13, 572, 29889, 8990, 877, 2696, 1495, 13, 13, 5215, 338, 290, 481, 13, 13, 2158, 29898, 21134, 29897, 13, 1482, 1469, 29892, 716, 4775, 29879, 353, 338, 290, 481, 29889, 275, 290, 481, 29898, 381, 275, 29892, 29871, 29906, 29892, 29871, 29896, 29900, 29900, 29897, 13, 2158, 29898, 9302, 29889, 12181, 29898, 1482, 1469, 876, 13, 2158, 29898, 1482, 4775, 29879, 29897, 13, 29893, 29900, 353, 7442, 29889, 3062, 29898, 1482, 4775, 29879, 1275, 29871, 29900, 29897, 13, 29893, 29896, 353, 7442, 29889, 3062, 29898, 1482, 4775, 29879, 1275, 29871, 29896, 29897, 13, 29893, 29906, 353, 7442, 29889, 3062, 29898, 1482, 4775, 29879, 1275, 29871, 29906, 29897, 13, 572, 29889, 5317, 29898, 1482, 1469, 29961, 29893, 29900, 29892, 29871, 29900, 1402, 716, 1469, 29961, 29893, 29900, 29892, 29871, 29896, 1402, 525, 554, 1495, 13, 572, 29889, 5317, 29898, 1482, 1469, 29961, 29893, 29896, 29892, 29871, 29900, 1402, 716, 1469, 29961, 29893, 29896, 29892, 29871, 29896, 1402, 525, 29985, 29895, 1495, 13, 572, 29889, 5317, 29898, 1482, 1469, 29961, 29893, 29906, 29892, 29871, 29900, 1402, 716, 1469, 29961, 29893, 29906, 29892, 29871, 29896, 1402, 525, 29894, 29895, 1495, 13, 572, 29889, 8990, 877, 2696, 1495, 13, 13, 2158, 703, 25632, 1159, 13, 13, 572, 29889, 4294, 580, 13, 2 ]
lastfm.py
Metastruct/hal1320
1
164643
from sopel.module import commands from sopel.config import ConfigurationError from sopel.config.types import StaticSection, ValidatedAttribute import urllib, json class LastFMsection(StaticSection): path = ValidatedAttribute('apikey') def setup(bot): bot.config.define_section('lastfm', LastFMsection) def configure(config): config.define_section('lastfm', LastFMsection, validate=False) config.lastfm.configure_setting('apikey', 'Last.fm API key') @commands('lastfm') def lastfm(bot, trigger): username = trigger.group(2) if not username: bot.say('You need to specify a username.') else: resp = urllib.urlopen("http://ws.audioscrobbler.com/2.0/?method=user.getrecenttracks&user={0}&api_key={1}&format=json".format(username, bot.config.lastfm.apikey)) if not resp: bot.say('Failed to request last.fm data.') else: data = json.loads(resp.read()) if not data: bot.say('Failed to parse last.fm data.') else: if not 'recenttracks' in data or not 'track' in data['recenttracks']: bot.say('Invalid username or no recently played tracks.') else: currenttrack = '' for track in data['recenttracks']['track']: if '@attr' in track and track['@attr']['nowplaying']: currenttrack = '{0} - {1}'.format(track['artist']['#text'], track['name']) break if currenttrack != '': bot.say('{0} is currently listening to: {1} (via last.fm)'.format(username, currenttrack)) else: bot.say('%s is not currently listening to anything.' % username)
[ 1, 515, 12103, 295, 29889, 5453, 1053, 8260, 13, 3166, 12103, 295, 29889, 2917, 1053, 20999, 2392, 13, 3166, 12103, 295, 29889, 2917, 29889, 8768, 1053, 624, 2454, 13438, 29892, 15758, 630, 6708, 13, 13, 5215, 3142, 1982, 29892, 4390, 13, 13, 1990, 9208, 22192, 2042, 29898, 17046, 13438, 1125, 13, 1678, 2224, 353, 15758, 630, 6708, 877, 2754, 1989, 1495, 13, 13, 1753, 6230, 29898, 7451, 1125, 13, 1678, 9225, 29889, 2917, 29889, 7922, 29918, 2042, 877, 4230, 24826, 742, 9208, 22192, 2042, 29897, 13, 13, 1753, 10822, 29898, 2917, 1125, 13, 1678, 2295, 29889, 7922, 29918, 2042, 877, 4230, 24826, 742, 9208, 22192, 2042, 29892, 12725, 29922, 8824, 29897, 13, 1678, 2295, 29889, 4230, 24826, 29889, 17591, 29918, 26740, 877, 2754, 1989, 742, 525, 8897, 29889, 24826, 3450, 1820, 1495, 13, 13, 29992, 26381, 877, 4230, 24826, 1495, 13, 1753, 1833, 24826, 29898, 7451, 29892, 7135, 1125, 13, 1678, 8952, 353, 7135, 29889, 2972, 29898, 29906, 29897, 13, 13, 1678, 565, 451, 8952, 29901, 13, 4706, 9225, 29889, 20834, 877, 3492, 817, 304, 6084, 263, 8952, 29889, 1495, 13, 1678, 1683, 29901, 13, 4706, 4613, 353, 3142, 1982, 29889, 332, 417, 2238, 703, 1124, 597, 5652, 29889, 15052, 2363, 24077, 1327, 1358, 29889, 510, 29914, 29906, 29889, 29900, 13401, 5696, 29922, 1792, 29889, 657, 276, 1760, 3018, 4684, 29987, 1792, 3790, 29900, 15704, 2754, 29918, 1989, 3790, 29896, 15704, 4830, 29922, 3126, 1642, 4830, 29898, 6786, 29892, 9225, 29889, 2917, 29889, 4230, 24826, 29889, 2754, 1989, 876, 13, 13, 4706, 565, 451, 4613, 29901, 13, 9651, 9225, 29889, 20834, 877, 17776, 304, 2009, 1833, 29889, 24826, 848, 29889, 1495, 13, 4706, 1683, 29901, 13, 9651, 848, 353, 4390, 29889, 18132, 29898, 13713, 29889, 949, 3101, 13, 13, 9651, 565, 451, 848, 29901, 13, 18884, 9225, 29889, 20834, 877, 17776, 304, 6088, 1833, 29889, 24826, 848, 29889, 1495, 13, 9651, 1683, 29901, 13, 18884, 565, 451, 525, 276, 1760, 3018, 4684, 29915, 297, 848, 470, 451, 525, 11294, 29915, 297, 848, 1839, 276, 1760, 3018, 4684, 2033, 29901, 13, 462, 1678, 9225, 29889, 20834, 877, 13919, 8952, 470, 694, 10325, 5318, 16257, 29889, 1495, 13, 18884, 1683, 29901, 13, 462, 1678, 1857, 11294, 353, 6629, 13, 13, 462, 1678, 363, 5702, 297, 848, 1839, 276, 1760, 3018, 4684, 16215, 11294, 2033, 29901, 13, 462, 4706, 565, 18803, 5552, 29915, 297, 5702, 322, 5702, 1839, 29992, 5552, 16215, 3707, 1456, 292, 2033, 29901, 13, 462, 9651, 1857, 11294, 353, 22372, 29900, 29913, 448, 426, 29896, 29913, 4286, 4830, 29898, 11294, 1839, 442, 391, 16215, 29937, 726, 7464, 5702, 1839, 978, 11287, 29871, 13, 462, 9651, 2867, 13, 13, 462, 1678, 565, 1857, 11294, 2804, 525, 2396, 13, 462, 4706, 9225, 29889, 20834, 877, 29912, 29900, 29913, 338, 5279, 19866, 304, 29901, 426, 29896, 29913, 313, 6071, 1833, 29889, 24826, 29897, 4286, 4830, 29898, 6786, 29892, 1857, 11294, 876, 13, 462, 1678, 1683, 29901, 13, 462, 4706, 9225, 29889, 20834, 877, 29995, 29879, 338, 451, 5279, 19866, 304, 3099, 6169, 1273, 8952, 29897, 2 ]
back/color.py
PoCInnovation/AI4UX
0
27906
<filename>back/color.py import extcolors import PIL def new_image(image, x1, y1, x2, y2): area = (x1, y1, x2, y2) tmp = image.crop(area) return tmp def nbColor_daltonisme(image, total): protanopie = [] # Ne voit pas le rouge deutéranopie = [] # Ne voit pas le vert tritanopie = [] # Ne voit pas le bleu color_tab = [] colors, pixel_count = extcolors.extract_from_image(image) above = 0 for color in colors: percentage = color[1] / total * 100 if percentage > 15: above += 1 if percentage > 5 and color[0][2] > 200 and color[0][0] < 200 and color[0][1] < 200: tritanopie.append(color) if percentage > 5 and color[0][1] > 200 and color[0][0] < 200 and color[0][2] < 200: deutéranopie.append(color) if percentage > 5 and color[0][0] > 200 and color[0][1] < 200 and color[0][2] < 200: protanopie.append(color) color_tuple = (color[0][0], color[0][1], color[0][2], percentage) color_tab.append(color_tuple) return above, (len(protanopie) + len(deutéranopie) + len(tritanopie)) / len(colors), color_tab def padding_ratio(image, total): colors, pixel = extcolors.extract_from_image(image) i = 0 total_percent = 0 percentage = 0 for color in colors: percentage = color[1] / total * 100 if i < 3: total_percent += percentage i += 1 return total_percent def dataColor(image): width, height = image.size total = width * height above, score_dalto, color_tab = nbColor_daltonisme(image, total) image_first = new_image(image, 0, 0, width // 4, height) size_first_w, size_first_h = image_first.size total_first = size_first_w * size_first_h percent_first = padding_ratio(image_first, total_first) image_forth = new_image(image, (width // 4) * 3, 0, width, height) size_forth_w, size_forth_h = image_forth.size total_forth = size_forth_w * size_forth_h percent_forth = padding_ratio(image_forth, total_forth) score_color = 1.0 if above > 3: score_color -= 0.15 * (above - 3) if score_color < 0.0: score_color = 0.0 return score_color, 1 - score_dalto, round(percent_first) / 100, round(percent_forth) / 100, color_tab if __name__ == "__main__": ## IMAGE ## image = PIL.Image.open("web_screenshot.png") print(dataColor(image))
[ 1, 529, 9507, 29958, 1627, 29914, 2780, 29889, 2272, 13, 5215, 1294, 27703, 13, 5215, 349, 6227, 13, 13, 13, 1753, 716, 29918, 3027, 29898, 3027, 29892, 921, 29896, 29892, 343, 29896, 29892, 921, 29906, 29892, 343, 29906, 1125, 13, 1678, 4038, 353, 313, 29916, 29896, 29892, 343, 29896, 29892, 921, 29906, 29892, 343, 29906, 29897, 13, 1678, 13128, 353, 1967, 29889, 29883, 1336, 29898, 6203, 29897, 13, 1678, 736, 13128, 13, 13, 13, 1753, 302, 29890, 3306, 29918, 12293, 880, 6386, 29898, 3027, 29892, 3001, 1125, 13, 1678, 410, 13161, 459, 347, 353, 5159, 29871, 396, 2448, 24722, 2331, 454, 16053, 479, 13, 1678, 316, 329, 29948, 661, 459, 347, 353, 5159, 29871, 396, 2448, 24722, 2331, 454, 4837, 13, 1678, 534, 8929, 459, 347, 353, 5159, 29871, 396, 2448, 24722, 2331, 454, 10767, 29884, 13, 1678, 2927, 29918, 3891, 353, 5159, 13, 1678, 11955, 29892, 15526, 29918, 2798, 353, 1294, 27703, 29889, 21111, 29918, 3166, 29918, 3027, 29898, 3027, 29897, 13, 1678, 2038, 353, 29871, 29900, 13, 1678, 363, 2927, 297, 11955, 29901, 13, 4706, 19649, 353, 2927, 29961, 29896, 29962, 847, 3001, 334, 29871, 29896, 29900, 29900, 13, 4706, 565, 19649, 1405, 29871, 29896, 29945, 29901, 13, 9651, 2038, 4619, 29871, 29896, 13, 4706, 565, 19649, 1405, 29871, 29945, 322, 2927, 29961, 29900, 3816, 29906, 29962, 1405, 29871, 29906, 29900, 29900, 322, 2927, 29961, 29900, 3816, 29900, 29962, 529, 29871, 29906, 29900, 29900, 322, 2927, 29961, 29900, 3816, 29896, 29962, 529, 29871, 29906, 29900, 29900, 29901, 13, 9651, 534, 8929, 459, 347, 29889, 4397, 29898, 2780, 29897, 13, 4706, 565, 19649, 1405, 29871, 29945, 322, 2927, 29961, 29900, 3816, 29896, 29962, 1405, 29871, 29906, 29900, 29900, 322, 2927, 29961, 29900, 3816, 29900, 29962, 529, 29871, 29906, 29900, 29900, 322, 2927, 29961, 29900, 3816, 29906, 29962, 529, 29871, 29906, 29900, 29900, 29901, 13, 9651, 316, 329, 29948, 661, 459, 347, 29889, 4397, 29898, 2780, 29897, 13, 4706, 565, 19649, 1405, 29871, 29945, 322, 2927, 29961, 29900, 3816, 29900, 29962, 1405, 29871, 29906, 29900, 29900, 322, 2927, 29961, 29900, 3816, 29896, 29962, 529, 29871, 29906, 29900, 29900, 322, 2927, 29961, 29900, 3816, 29906, 29962, 529, 29871, 29906, 29900, 29900, 29901, 13, 9651, 410, 13161, 459, 347, 29889, 4397, 29898, 2780, 29897, 13, 4706, 2927, 29918, 23583, 353, 313, 2780, 29961, 29900, 3816, 29900, 1402, 2927, 29961, 29900, 3816, 29896, 1402, 2927, 29961, 29900, 3816, 29906, 1402, 19649, 29897, 13, 4706, 2927, 29918, 3891, 29889, 4397, 29898, 2780, 29918, 23583, 29897, 13, 1678, 736, 2038, 29892, 313, 2435, 29898, 771, 13161, 459, 347, 29897, 718, 7431, 29898, 311, 329, 29948, 661, 459, 347, 29897, 718, 7431, 29898, 509, 8929, 459, 347, 876, 847, 7431, 29898, 27703, 511, 2927, 29918, 3891, 13, 13, 13, 1753, 7164, 29918, 3605, 601, 29898, 3027, 29892, 3001, 1125, 13, 1678, 11955, 29892, 15526, 353, 1294, 27703, 29889, 21111, 29918, 3166, 29918, 3027, 29898, 3027, 29897, 13, 1678, 474, 353, 29871, 29900, 13, 1678, 3001, 29918, 25376, 353, 29871, 29900, 13, 1678, 19649, 353, 29871, 29900, 13, 1678, 363, 2927, 297, 11955, 29901, 13, 4706, 19649, 353, 2927, 29961, 29896, 29962, 847, 3001, 334, 29871, 29896, 29900, 29900, 13, 4706, 565, 474, 529, 29871, 29941, 29901, 13, 9651, 3001, 29918, 25376, 4619, 19649, 13, 9651, 474, 4619, 29871, 29896, 13, 1678, 736, 3001, 29918, 25376, 13, 13, 13, 1753, 848, 3306, 29898, 3027, 1125, 13, 1678, 2920, 29892, 3171, 353, 1967, 29889, 2311, 13, 1678, 3001, 353, 2920, 334, 3171, 13, 1678, 2038, 29892, 8158, 29918, 12293, 517, 29892, 2927, 29918, 3891, 353, 302, 29890, 3306, 29918, 12293, 880, 6386, 29898, 3027, 29892, 3001, 29897, 13, 1678, 1967, 29918, 4102, 353, 716, 29918, 3027, 29898, 3027, 29892, 29871, 29900, 29892, 29871, 29900, 29892, 2920, 849, 29871, 29946, 29892, 3171, 29897, 13, 1678, 2159, 29918, 4102, 29918, 29893, 29892, 2159, 29918, 4102, 29918, 29882, 353, 1967, 29918, 4102, 29889, 2311, 13, 1678, 3001, 29918, 4102, 353, 2159, 29918, 4102, 29918, 29893, 334, 2159, 29918, 4102, 29918, 29882, 13, 1678, 10151, 29918, 4102, 353, 7164, 29918, 3605, 601, 29898, 3027, 29918, 4102, 29892, 3001, 29918, 4102, 29897, 13, 1678, 1967, 29918, 1454, 386, 353, 716, 29918, 3027, 29898, 3027, 29892, 313, 2103, 849, 29871, 29946, 29897, 334, 29871, 29941, 29892, 29871, 29900, 29892, 2920, 29892, 3171, 29897, 13, 1678, 2159, 29918, 1454, 386, 29918, 29893, 29892, 2159, 29918, 1454, 386, 29918, 29882, 353, 1967, 29918, 1454, 386, 29889, 2311, 13, 1678, 3001, 29918, 1454, 386, 353, 2159, 29918, 1454, 386, 29918, 29893, 334, 2159, 29918, 1454, 386, 29918, 29882, 13, 1678, 10151, 29918, 1454, 386, 353, 7164, 29918, 3605, 601, 29898, 3027, 29918, 1454, 386, 29892, 3001, 29918, 1454, 386, 29897, 13, 13, 1678, 8158, 29918, 2780, 353, 29871, 29896, 29889, 29900, 13, 1678, 565, 2038, 1405, 29871, 29941, 29901, 13, 4706, 8158, 29918, 2780, 22361, 29871, 29900, 29889, 29896, 29945, 334, 313, 27215, 448, 29871, 29941, 29897, 13, 1678, 565, 8158, 29918, 2780, 529, 29871, 29900, 29889, 29900, 29901, 13, 4706, 8158, 29918, 2780, 353, 29871, 29900, 29889, 29900, 13, 13, 1678, 736, 8158, 29918, 2780, 29892, 29871, 29896, 448, 8158, 29918, 12293, 517, 29892, 4513, 29898, 25376, 29918, 4102, 29897, 847, 29871, 29896, 29900, 29900, 29892, 4513, 29898, 25376, 29918, 1454, 386, 29897, 847, 29871, 29896, 29900, 29900, 29892, 2927, 29918, 3891, 13, 13, 13, 361, 4770, 978, 1649, 1275, 376, 1649, 3396, 1649, 1115, 13, 1678, 444, 306, 1529, 1692, 444, 13, 1678, 1967, 353, 349, 6227, 29889, 2940, 29889, 3150, 703, 2676, 29918, 29879, 24546, 8711, 29889, 2732, 1159, 13, 1678, 1596, 29898, 1272, 3306, 29898, 3027, 876, 13, 2 ]
PFERD/crawl/ilias/__init__.py
Toorero/PFERD
74
127196
<filename>PFERD/crawl/ilias/__init__.py from .kit_ilias_web_crawler import KitIliasWebCrawler, KitIliasWebCrawlerSection __all__ = ["KitIliasWebCrawler", "KitIliasWebCrawlerSection"]
[ 1, 529, 9507, 29958, 13691, 1001, 29928, 29914, 29883, 1610, 29880, 29914, 2638, 294, 29914, 1649, 2344, 26914, 2272, 13, 3166, 869, 7354, 29918, 2638, 294, 29918, 2676, 29918, 29883, 1610, 1358, 1053, 26240, 29902, 18849, 3609, 29907, 1610, 1358, 29892, 26240, 29902, 18849, 3609, 29907, 1610, 1358, 13438, 13, 13, 1649, 497, 1649, 353, 6796, 13117, 29902, 18849, 3609, 29907, 1610, 1358, 613, 376, 13117, 29902, 18849, 3609, 29907, 1610, 1358, 13438, 3108, 13, 2 ]
blender/2.79/scripts/addons/add_mesh_extra_objects/geodesic_domes/__init__.py
uzairakbar/bpy2.79
2
66521
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # ##### END GPL LICENSE BLOCK ##### bl_info = { "name": "Geodesic Domes2", "author": "Noctumsolis, PKHG, Meta Androcto, <NAME>", "version": (0, 3, 2), "blender": (2, 7, 1), "location": "Toolshelf > Create Tab", "description": "Create geodesic dome type objects.", "warning": "", "wiki_url": "https://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Modeling/Geodesic_Domes", "tracker_url": "", "category": "Mesh"} if "bpy" in locals(): import importlib importlib.reload(third_domes_panel_271) else: from . import third_domes_panel_271 import bpy def register(): bpy.utils.register_module(__name__) def unregister(): bpy.utils.unregister_module(__name__) if __name__ == "__main__": register()
[ 1, 396, 16101, 22815, 402, 7390, 365, 2965, 1430, 1660, 350, 21339, 16101, 13, 29937, 13, 29937, 29871, 910, 1824, 338, 3889, 7047, 29936, 366, 508, 2654, 391, 2666, 372, 322, 29914, 272, 13, 29937, 29871, 6623, 372, 1090, 278, 4958, 310, 278, 15143, 4593, 5236, 19245, 13, 29937, 29871, 408, 6369, 491, 278, 12362, 18540, 10606, 29936, 2845, 1873, 29871, 29906, 13, 29937, 29871, 310, 278, 19245, 29892, 470, 313, 271, 596, 2984, 29897, 738, 2678, 1873, 29889, 13, 29937, 13, 29937, 29871, 910, 1824, 338, 13235, 297, 278, 4966, 393, 372, 674, 367, 5407, 29892, 13, 29937, 29871, 541, 399, 1806, 8187, 2692, 13764, 29979, 399, 1718, 29934, 13566, 29979, 29936, 1728, 1584, 278, 2411, 2957, 1370, 21867, 29891, 310, 13, 29937, 29871, 341, 1001, 3210, 13566, 2882, 6227, 11937, 470, 383, 1806, 8186, 1799, 15842, 319, 349, 8322, 2965, 13309, 1718, 349, 4574, 13152, 1660, 29889, 29871, 2823, 278, 13, 29937, 29871, 15143, 4593, 5236, 19245, 363, 901, 4902, 29889, 13, 29937, 13, 29937, 29871, 887, 881, 505, 4520, 263, 3509, 310, 278, 15143, 4593, 5236, 19245, 13, 29937, 29871, 3412, 411, 445, 1824, 29936, 565, 451, 29892, 2436, 304, 278, 12362, 18540, 10606, 29892, 13, 29937, 29871, 9266, 1696, 29871, 29945, 29896, 21504, 7103, 29892, 29008, 386, 383, 10102, 29892, 12115, 29892, 14861, 29871, 29900, 29906, 29896, 29896, 29900, 29899, 29896, 29941, 29900, 29896, 29892, 8278, 29889, 13, 29937, 13, 29937, 16101, 11056, 402, 7390, 365, 2965, 1430, 1660, 350, 21339, 16101, 13, 13, 2204, 29918, 3888, 353, 426, 13, 1678, 376, 978, 1115, 376, 7999, 2631, 293, 7809, 267, 29906, 613, 13, 1678, 376, 8921, 1115, 376, 3782, 312, 398, 2929, 275, 29892, 24457, 29950, 29954, 29892, 20553, 1126, 307, 312, 29877, 29892, 529, 5813, 28341, 13, 1678, 376, 3259, 1115, 313, 29900, 29892, 29871, 29941, 29892, 29871, 29906, 511, 13, 1678, 376, 2204, 1581, 1115, 313, 29906, 29892, 29871, 29955, 29892, 29871, 29896, 511, 13, 1678, 376, 5479, 1115, 376, 12229, 845, 761, 1405, 6204, 11090, 613, 13, 1678, 376, 8216, 1115, 376, 4391, 1737, 2631, 293, 270, 608, 1134, 3618, 19602, 13, 1678, 376, 27392, 1115, 12633, 13, 1678, 376, 4594, 29918, 2271, 1115, 376, 991, 597, 4594, 29889, 2204, 1581, 29889, 990, 29914, 2248, 29889, 1961, 29914, 26982, 29901, 29906, 29889, 29953, 29914, 19737, 29914, 4081, 29879, 29914, 3195, 292, 29914, 7999, 2631, 293, 29918, 11096, 267, 613, 13, 1678, 376, 3018, 4937, 29918, 2271, 1115, 12633, 13, 1678, 376, 7320, 1115, 376, 29924, 12094, 9092, 13, 13, 361, 376, 29890, 2272, 29908, 297, 1180, 1338, 7295, 13, 1678, 1053, 1053, 1982, 13, 1678, 1053, 1982, 29889, 28120, 29898, 22585, 29918, 3129, 267, 29918, 15119, 29918, 29906, 29955, 29896, 29897, 13, 13, 2870, 29901, 13, 1678, 515, 869, 1053, 4654, 29918, 3129, 267, 29918, 15119, 29918, 29906, 29955, 29896, 13, 13, 5215, 289, 2272, 13, 13, 13, 1753, 6036, 7295, 13, 1678, 289, 2272, 29889, 13239, 29889, 9573, 29918, 5453, 22168, 978, 1649, 29897, 13, 13, 13, 1753, 443, 9573, 7295, 13, 1678, 289, 2272, 29889, 13239, 29889, 348, 9573, 29918, 5453, 22168, 978, 1649, 29897, 13, 13, 13, 361, 4770, 978, 1649, 1275, 376, 1649, 3396, 1649, 1115, 13, 1678, 6036, 580, 13, 2 ]
pyaud_plugins/_plugins/action.py
jshwi/pyaud-plugins
0
170014
""" pyaud_plugins._plugins.action ============================= """ import shutil import typing as t from pathlib import Path import pyaud from pyaud_plugins._abc import SphinxBuild from pyaud_plugins._environ import environ as e from pyaud_plugins._parsers import LineSwitch, Md2Rst from pyaud_plugins._utils import colors @pyaud.plugins.register() class Tests(pyaud.plugins.Action): """Run the package unit-tests with ``pytest``.""" pytest = "pytest" cache = True cache_all = True @property def exe(self) -> t.List[str]: return [self.pytest] @property def is_tests(self) -> bool: """Confirm that a test suite exists. :return: Does a test suite exist? True or False. """ return any( f for f in pyaud.files for p in ("test_*.py", "*_test.py") if f.match(p) and str(e.TESTS) in str(f) ) def action(self, *args: str, **kwargs: bool) -> int: if self.is_tests: return self.subprocess[self.pytest].call(*args, **kwargs) print("No tests found") return 0 @pyaud.plugins.register() class Coverage(Tests): """Run package unit-tests with ``pytest`` and ``coverage``.""" coverage = "coverage" @property def exe(self) -> t.List[str]: return [self.pytest, self.coverage] def action(self, *args: str, **kwargs: bool) -> int: returncode = super().action( *[f"--cov={i}" for i in pyaud.files.reduce()], **kwargs ) if self.is_tests and not returncode: kwargs["suppress"] = True return self.subprocess[self.coverage].call("xml", *args, **kwargs) print("No coverage to report") return returncode @pyaud.plugins.register() class Docs(SphinxBuild): """Compile package documentation with ``Sphinx``. This is so the hyperlink isn't exactly the same as the package documentation. Build the ``Sphinx`` html documentation. Return the README's title to what it originally was. """ @property def args(self) -> t.Tuple[t.Union[str, Path], ...]: return "-M", "html", e.DOCS, e.BUILDDIR, "-W" def action(self, *args: str, **kwargs: bool) -> int: returncode = 0 pyaud.plugins.get("toc")(*args, **kwargs) shutil.rmtree(e.BUILDDIR, ignore_errors=True) with Md2Rst(e.README_MD, temp=True): if e.DOCS_CONF.is_file() and e.README_RST.is_file(): with LineSwitch( e.README_RST, {0: e.README_RST.stem, 1: len(e.README_RST.stem) * "="}, ): returncode = self.sphinx_build(*args, **kwargs) return returncode @pyaud.plugins.register() class DoctestReadme(pyaud.plugins.Action): """Run ``doctest`` on Python code-blocks in README.""" python = "python" @property def exe(self) -> t.List[str]: return [self.python] def action(self, *args: str, **kwargs: bool) -> int: returncode = self.subprocess[self.python].call( "-m", "doctest", e.README_RST ) if not returncode: colors.green.bold.print( "Success: No issues found in {}".format( e.README_RST.relative_to(Path.cwd()) ) ) return returncode @pyaud.plugins.register() class DoctestPackage(SphinxBuild): """Run ``doctest`` on package.""" cache = True @property def args(self) -> t.Tuple[t.Union[str, Path], ...]: return "-M", "doctest", e.DOCS, e.BUILDDIR
[ 1, 9995, 13, 2272, 15052, 29918, 12800, 3032, 12800, 29889, 2467, 13, 9166, 4936, 2751, 29922, 13, 15945, 29908, 13, 5215, 528, 4422, 13, 5215, 19229, 408, 260, 13, 3166, 2224, 1982, 1053, 10802, 13, 13, 5215, 282, 3761, 566, 13, 13, 3166, 282, 3761, 566, 29918, 12800, 3032, 10736, 1053, 317, 561, 14668, 8893, 13, 3166, 282, 3761, 566, 29918, 12800, 3032, 21813, 1053, 12471, 408, 321, 13, 3166, 282, 3761, 566, 29918, 12800, 3032, 862, 4253, 1053, 7407, 24995, 29892, 341, 29881, 29906, 29934, 303, 13, 3166, 282, 3761, 566, 29918, 12800, 3032, 13239, 1053, 11955, 13, 13, 13, 29992, 2272, 15052, 29889, 12800, 29889, 9573, 580, 13, 1990, 4321, 29879, 29898, 2272, 15052, 29889, 12800, 29889, 4276, 1125, 13, 1678, 9995, 6558, 278, 3577, 5190, 29899, 21150, 411, 4954, 2272, 1688, 16159, 1213, 15945, 13, 13, 1678, 11451, 1688, 353, 376, 2272, 1688, 29908, 13, 1678, 7090, 353, 5852, 13, 1678, 7090, 29918, 497, 353, 5852, 13, 13, 1678, 732, 6799, 13, 1678, 822, 429, 29872, 29898, 1311, 29897, 1599, 260, 29889, 1293, 29961, 710, 5387, 13, 4706, 736, 518, 1311, 29889, 2272, 1688, 29962, 13, 13, 1678, 732, 6799, 13, 1678, 822, 338, 29918, 21150, 29898, 1311, 29897, 1599, 6120, 29901, 13, 4706, 9995, 16376, 3568, 393, 263, 1243, 9460, 4864, 29889, 13, 13, 4706, 584, 2457, 29901, 5538, 263, 1243, 9460, 1863, 29973, 5852, 470, 7700, 29889, 13, 4706, 9995, 13, 4706, 736, 738, 29898, 13, 9651, 285, 13, 9651, 363, 285, 297, 282, 3761, 566, 29889, 5325, 13, 9651, 363, 282, 297, 4852, 1688, 29918, 10521, 2272, 613, 26345, 29918, 1688, 29889, 2272, 1159, 13, 9651, 565, 285, 29889, 4352, 29898, 29886, 29897, 322, 851, 29898, 29872, 29889, 18267, 29903, 29897, 297, 851, 29898, 29888, 29897, 13, 4706, 1723, 13, 13, 1678, 822, 3158, 29898, 1311, 29892, 334, 5085, 29901, 851, 29892, 3579, 19290, 29901, 6120, 29897, 1599, 938, 29901, 13, 4706, 565, 1583, 29889, 275, 29918, 21150, 29901, 13, 9651, 736, 1583, 29889, 1491, 5014, 29961, 1311, 29889, 2272, 1688, 1822, 4804, 10456, 5085, 29892, 3579, 19290, 29897, 13, 13, 4706, 1596, 703, 3782, 6987, 1476, 1159, 13, 4706, 736, 29871, 29900, 13, 13, 13, 29992, 2272, 15052, 29889, 12800, 29889, 9573, 580, 13, 1990, 26428, 482, 29898, 24376, 1125, 13, 1678, 9995, 6558, 3577, 5190, 29899, 21150, 411, 4954, 2272, 1688, 16159, 322, 4954, 11911, 482, 16159, 1213, 15945, 13, 13, 1678, 23746, 353, 376, 11911, 482, 29908, 13, 13, 1678, 732, 6799, 13, 1678, 822, 429, 29872, 29898, 1311, 29897, 1599, 260, 29889, 1293, 29961, 710, 5387, 13, 4706, 736, 518, 1311, 29889, 2272, 1688, 29892, 1583, 29889, 11911, 482, 29962, 13, 13, 1678, 822, 3158, 29898, 1311, 29892, 334, 5085, 29901, 851, 29892, 3579, 19290, 29901, 6120, 29897, 1599, 938, 29901, 13, 4706, 736, 401, 353, 2428, 2141, 2467, 29898, 13, 9651, 334, 29961, 29888, 29908, 489, 24542, 3790, 29875, 5038, 363, 474, 297, 282, 3761, 566, 29889, 5325, 29889, 17469, 580, 1402, 3579, 19290, 13, 4706, 1723, 13, 4706, 565, 1583, 29889, 275, 29918, 21150, 322, 451, 736, 401, 29901, 13, 9651, 9049, 5085, 3366, 19303, 1253, 3108, 353, 5852, 13, 9651, 736, 1583, 29889, 1491, 5014, 29961, 1311, 29889, 11911, 482, 1822, 4804, 703, 3134, 613, 334, 5085, 29892, 3579, 19290, 29897, 13, 13, 4706, 1596, 703, 3782, 23746, 304, 3461, 1159, 13, 4706, 736, 736, 401, 13, 13, 13, 29992, 2272, 15052, 29889, 12800, 29889, 9573, 580, 13, 1990, 360, 12332, 29898, 29903, 561, 14668, 8893, 1125, 13, 1678, 9995, 6843, 488, 3577, 5106, 411, 4954, 29903, 561, 14668, 29952, 1412, 13, 13, 1678, 910, 338, 577, 278, 11266, 2324, 3508, 29915, 29873, 3721, 278, 1021, 408, 278, 3577, 13, 1678, 5106, 29889, 13, 13, 1678, 8878, 278, 4954, 29903, 561, 14668, 16159, 3472, 5106, 29889, 7106, 278, 5195, 3035, 2303, 29915, 29879, 3611, 13, 1678, 304, 825, 372, 10437, 471, 29889, 13, 1678, 9995, 13, 13, 1678, 732, 6799, 13, 1678, 822, 6389, 29898, 1311, 29897, 1599, 260, 29889, 23215, 552, 29961, 29873, 29889, 19986, 29961, 710, 29892, 10802, 1402, 2023, 5387, 13, 4706, 736, 11663, 29924, 613, 376, 1420, 613, 321, 29889, 3970, 9295, 29892, 321, 29889, 29933, 25282, 9464, 29892, 11663, 29956, 29908, 13, 13, 1678, 822, 3158, 29898, 1311, 29892, 334, 5085, 29901, 851, 29892, 3579, 19290, 29901, 6120, 29897, 1599, 938, 29901, 13, 4706, 736, 401, 353, 29871, 29900, 13, 4706, 282, 3761, 566, 29889, 12800, 29889, 657, 703, 517, 29883, 1159, 10456, 5085, 29892, 3579, 19290, 29897, 13, 4706, 528, 4422, 29889, 1758, 8336, 29898, 29872, 29889, 29933, 25282, 9464, 29892, 11455, 29918, 12523, 29922, 5574, 29897, 13, 4706, 411, 341, 29881, 29906, 29934, 303, 29898, 29872, 29889, 16310, 2303, 29918, 5773, 29892, 5694, 29922, 5574, 1125, 13, 9651, 565, 321, 29889, 3970, 9295, 29918, 6007, 29943, 29889, 275, 29918, 1445, 580, 322, 321, 29889, 16310, 2303, 29918, 29934, 1254, 29889, 275, 29918, 1445, 7295, 13, 18884, 411, 7407, 24995, 29898, 13, 462, 1678, 321, 29889, 16310, 2303, 29918, 29934, 1254, 29892, 13, 462, 1678, 426, 29900, 29901, 321, 29889, 16310, 2303, 29918, 29934, 1254, 29889, 303, 331, 29892, 29871, 29896, 29901, 7431, 29898, 29872, 29889, 16310, 2303, 29918, 29934, 1254, 29889, 303, 331, 29897, 334, 376, 543, 1118, 13, 462, 1125, 13, 462, 1678, 736, 401, 353, 1583, 29889, 29879, 561, 14668, 29918, 4282, 10456, 5085, 29892, 3579, 19290, 29897, 13, 13, 4706, 736, 736, 401, 13, 13, 13, 29992, 2272, 15052, 29889, 12800, 29889, 9573, 580, 13, 1990, 1938, 312, 342, 6359, 1004, 29898, 2272, 15052, 29889, 12800, 29889, 4276, 1125, 13, 1678, 9995, 6558, 4954, 1867, 312, 342, 16159, 373, 5132, 775, 29899, 1271, 29879, 297, 5195, 3035, 2303, 1213, 15945, 13, 13, 1678, 3017, 353, 376, 4691, 29908, 13, 13, 1678, 732, 6799, 13, 1678, 822, 429, 29872, 29898, 1311, 29897, 1599, 260, 29889, 1293, 29961, 710, 5387, 13, 4706, 736, 518, 1311, 29889, 4691, 29962, 13, 13, 1678, 822, 3158, 29898, 1311, 29892, 334, 5085, 29901, 851, 29892, 3579, 19290, 29901, 6120, 29897, 1599, 938, 29901, 13, 4706, 736, 401, 353, 1583, 29889, 1491, 5014, 29961, 1311, 29889, 4691, 1822, 4804, 29898, 13, 9651, 11663, 29885, 613, 376, 1867, 312, 342, 613, 321, 29889, 16310, 2303, 29918, 29934, 1254, 13, 4706, 1723, 13, 4706, 565, 451, 736, 401, 29901, 13, 9651, 11955, 29889, 12692, 29889, 8934, 29889, 2158, 29898, 13, 18884, 376, 14191, 29901, 1939, 5626, 1476, 297, 6571, 1642, 4830, 29898, 13, 462, 1678, 321, 29889, 16310, 2303, 29918, 29934, 1254, 29889, 22925, 29918, 517, 29898, 2605, 29889, 29883, 9970, 3101, 13, 18884, 1723, 13, 9651, 1723, 13, 13, 4706, 736, 736, 401, 13, 13, 13, 29992, 2272, 15052, 29889, 12800, 29889, 9573, 580, 13, 1990, 1938, 312, 342, 14459, 29898, 29903, 561, 14668, 8893, 1125, 13, 1678, 9995, 6558, 4954, 1867, 312, 342, 16159, 373, 3577, 1213, 15945, 13, 13, 1678, 7090, 353, 5852, 13, 13, 1678, 732, 6799, 13, 1678, 822, 6389, 29898, 1311, 29897, 1599, 260, 29889, 23215, 552, 29961, 29873, 29889, 19986, 29961, 710, 29892, 10802, 1402, 2023, 5387, 13, 4706, 736, 11663, 29924, 613, 376, 1867, 312, 342, 613, 321, 29889, 3970, 9295, 29892, 321, 29889, 29933, 25282, 9464, 13, 2 ]
powerflow.py
simoncometto/PowerFlow
0
159449
# coding=utf-8 import numpy as np import scipy as sp import scipy.sparse as sparse import scipy.sparse.linalg as sparse_alg from time import time import IEEE_cdf as cdf from jacobian import jacobian from P_Q import P_Q class powerflow: ''' ''' def __init__(self, filename=''): n, mat_admitancia, load, generation, voltage_phase, swing_bus, PV_buses = cdf.read(filename) self.n = n self.Y = sparse.coo_matrix(mat_admitancia) self.swing_bus = swing_bus self.PV_buses = PV_buses delta_PQ = generation-load self.P = delta_PQ.real self.Q = delta_PQ.imag self.P_Q_inj = delta_PQ[1:].real self.P_Q_inj = np.append(self.P_Q_inj, delta_PQ[1:].imag) def J(self, x): '''Computa el jacobiano para un valor de tensión y ángulo dado :parameter x: un vactor de 2*(n-1) donde n es la cantidad de nodos del sistema :returns jacobiano: una matriz de 2(n-1) x 2(n-1) ''' return jacobian(self.Y, x, self.swing_bus, self.last_P_Q) def f(self, x): ''' Computa deltaP y deltaQ para un valor de tensión y ángulo dado :parameter x un vactor de 2*(n-1) donde n es la cantidad de nodos del sistema :returns delta_PQ: una vector de 2(n-1)''' self.last_P_Q = P_Q(self.Y, x) return (self.P_Q_inj - self.last_P_Q) def solve_newton(self, initial_voltage=1, initial_angle=0): theta = initial_angle * np.ones(self.n-1) v = initial_voltage * np.ones(self.n-1) x = np.append(theta, v) #while(delta_x < convergencia): for i in range(1): func = self.f(x) #self.disp_matrix(np.vstack([func, func])) jaco = self.J(x) J_to_disp = jaco.todense() #self.disp_matrix(J_to_disp[:self.n-1,:self.n-1]) #Jacobiano reducido rJ = jaco.todense() #Las filas a eliminar son aquellas que corresponden a la dQ/dtheta de un PV bus filas_a_eliminar = self.PV_buses- 1 + self.n-1 #Las columas a eliminar son aquellas que corresponden a la dP/dV de un PV bus columnas_a_eliminar = filas_a_eliminar rJ = np.delete(rJ, filas_a_eliminar, 0) rJ = np.delete(rJ, columnas_a_eliminar, 1) #self.disp_matrix(rJ) #a = sparse_alg.spsolve(jaco,-func) func_reducido = np.delete(func, columnas_a_eliminar) a = np.linalg.solve(rJ, -func_reducido) xn = a - x x = xn return x def disp_matrix(self, mat): import matplotlib.pyplot as plt if sparse.issparse(mat): mat = mat.todense() mat_plot = mat != 0.0 plt.matshow(mat_plot) plt.show() #--------------------------------------------------------------------------------------------- if __name__ == '__main__': ieee14bus = powerflow('IEEE14cdf.txt') start = time() x = ieee14bus.solve_newton() end = time() #print(x) print('Tiempo: ', end-start, 's')
[ 1, 396, 14137, 29922, 9420, 29899, 29947, 13, 5215, 12655, 408, 7442, 13, 5215, 4560, 2272, 408, 805, 13, 5215, 4560, 2272, 29889, 29879, 5510, 408, 29234, 13, 5215, 4560, 2272, 29889, 29879, 5510, 29889, 29880, 979, 29887, 408, 29234, 29918, 9564, 13, 3166, 931, 1053, 931, 13, 5215, 7159, 17896, 29918, 29883, 2176, 408, 274, 2176, 13, 3166, 432, 562, 711, 713, 1053, 432, 562, 711, 713, 13, 3166, 349, 29918, 29984, 1053, 349, 29918, 29984, 13, 13, 1990, 3081, 1731, 29901, 13, 1678, 14550, 13, 13, 1678, 14550, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 10422, 2433, 29374, 13, 4706, 302, 29892, 1775, 29918, 328, 2415, 14006, 29892, 2254, 29892, 12623, 29892, 11749, 29918, 21646, 29892, 24500, 29918, 8262, 29892, 349, 29963, 29918, 29890, 6394, 353, 274, 2176, 29889, 949, 29898, 9507, 29897, 13, 13, 4706, 1583, 29889, 29876, 353, 302, 13, 4706, 1583, 29889, 29979, 353, 29234, 29889, 1111, 29877, 29918, 5344, 29898, 2922, 29918, 328, 2415, 14006, 29897, 13, 4706, 1583, 29889, 18013, 29918, 8262, 353, 24500, 29918, 8262, 13, 4706, 1583, 29889, 29925, 29963, 29918, 29890, 6394, 353, 349, 29963, 29918, 29890, 6394, 13, 13, 4706, 19471, 29918, 29925, 29984, 353, 12623, 29899, 1359, 13, 4706, 1583, 29889, 29925, 353, 19471, 29918, 29925, 29984, 29889, 6370, 13, 4706, 1583, 29889, 29984, 353, 19471, 29918, 29925, 29984, 29889, 326, 351, 13, 13, 4706, 1583, 29889, 29925, 29918, 29984, 29918, 262, 29926, 353, 19471, 29918, 29925, 29984, 29961, 29896, 29901, 1822, 6370, 13, 4706, 1583, 29889, 29925, 29918, 29984, 29918, 262, 29926, 353, 7442, 29889, 4397, 29898, 1311, 29889, 29925, 29918, 29984, 29918, 262, 29926, 29892, 19471, 29918, 29925, 29984, 29961, 29896, 29901, 1822, 326, 351, 29897, 13, 13, 1678, 822, 435, 29898, 1311, 29892, 921, 1125, 13, 4706, 14550, 20606, 29874, 560, 432, 562, 711, 3328, 1702, 443, 16497, 316, 25187, 3175, 343, 3976, 865, 7207, 270, 912, 13, 4706, 584, 15501, 921, 29901, 443, 325, 7168, 316, 29871, 29906, 16395, 29876, 29899, 29896, 29897, 8334, 302, 831, 425, 5107, 2368, 316, 18778, 359, 628, 10502, 13, 4706, 584, 18280, 432, 562, 711, 3328, 29901, 1185, 1775, 7485, 316, 29871, 29906, 29898, 29876, 29899, 29896, 29897, 921, 29871, 29906, 29898, 29876, 29899, 29896, 29897, 13, 4706, 14550, 13, 4706, 736, 432, 562, 711, 713, 29898, 1311, 29889, 29979, 29892, 921, 29892, 1583, 29889, 18013, 29918, 8262, 29892, 1583, 29889, 4230, 29918, 29925, 29918, 29984, 29897, 13, 13, 1678, 822, 285, 29898, 1311, 29892, 921, 1125, 13, 4706, 14550, 11796, 29874, 19471, 29925, 343, 19471, 29984, 1702, 443, 16497, 316, 25187, 3175, 343, 3976, 865, 7207, 270, 912, 13, 4706, 584, 15501, 921, 443, 325, 7168, 316, 29871, 29906, 16395, 29876, 29899, 29896, 29897, 8334, 302, 831, 425, 5107, 2368, 316, 18778, 359, 628, 10502, 13, 4706, 584, 18280, 19471, 29918, 29925, 29984, 29901, 1185, 4608, 316, 29871, 29906, 29898, 29876, 29899, 29896, 29897, 12008, 13, 4706, 1583, 29889, 4230, 29918, 29925, 29918, 29984, 353, 349, 29918, 29984, 29898, 1311, 29889, 29979, 29892, 921, 29897, 13, 4706, 736, 313, 1311, 29889, 29925, 29918, 29984, 29918, 262, 29926, 448, 1583, 29889, 4230, 29918, 29925, 29918, 29984, 29897, 13, 13, 1678, 822, 4505, 29918, 1482, 880, 29898, 1311, 29892, 2847, 29918, 1555, 29873, 482, 29922, 29896, 29892, 2847, 29918, 2521, 29922, 29900, 1125, 13, 4706, 278, 941, 353, 2847, 29918, 2521, 334, 7442, 29889, 2873, 29898, 1311, 29889, 29876, 29899, 29896, 29897, 13, 4706, 325, 353, 2847, 29918, 1555, 29873, 482, 334, 7442, 29889, 2873, 29898, 1311, 29889, 29876, 29899, 29896, 29897, 13, 13, 4706, 921, 353, 7442, 29889, 4397, 29898, 3416, 29892, 325, 29897, 13, 13, 4706, 396, 8000, 29898, 4181, 29918, 29916, 529, 5486, 1885, 1512, 1125, 13, 4706, 363, 474, 297, 3464, 29898, 29896, 1125, 13, 9651, 3653, 353, 1583, 29889, 29888, 29898, 29916, 29897, 13, 9651, 396, 1311, 29889, 2218, 29886, 29918, 5344, 29898, 9302, 29889, 29894, 1429, 4197, 9891, 29892, 3653, 12622, 13, 13, 9651, 432, 11216, 353, 1583, 29889, 29967, 29898, 29916, 29897, 13, 9651, 435, 29918, 517, 29918, 2218, 29886, 353, 432, 11216, 29889, 20034, 1947, 580, 13, 9651, 396, 1311, 29889, 2218, 29886, 29918, 5344, 29898, 29967, 29918, 517, 29918, 2218, 29886, 7503, 1311, 29889, 29876, 29899, 29896, 29892, 29901, 1311, 29889, 29876, 29899, 29896, 2314, 13, 13, 9651, 396, 24288, 711, 3328, 3724, 13321, 13, 9651, 364, 29967, 353, 432, 11216, 29889, 20034, 1947, 580, 13, 9651, 396, 29931, 294, 977, 294, 263, 10397, 279, 1487, 10592, 514, 294, 712, 3928, 264, 263, 425, 270, 29984, 29914, 29881, 3416, 316, 443, 349, 29963, 3593, 13, 9651, 977, 294, 29918, 29874, 29918, 295, 8332, 279, 353, 1583, 29889, 29925, 29963, 29918, 29890, 6394, 29899, 29871, 29896, 718, 1583, 29889, 29876, 29899, 29896, 13, 9651, 396, 29931, 294, 784, 398, 294, 263, 10397, 279, 1487, 10592, 514, 294, 712, 3928, 264, 263, 425, 270, 29925, 29914, 29881, 29963, 316, 443, 349, 29963, 3593, 13, 9651, 1897, 294, 29918, 29874, 29918, 295, 8332, 279, 353, 977, 294, 29918, 29874, 29918, 295, 8332, 279, 13, 9651, 364, 29967, 353, 7442, 29889, 8143, 29898, 29878, 29967, 29892, 977, 294, 29918, 29874, 29918, 295, 8332, 279, 29892, 29871, 29900, 29897, 13, 9651, 364, 29967, 353, 7442, 29889, 8143, 29898, 29878, 29967, 29892, 1897, 294, 29918, 29874, 29918, 295, 8332, 279, 29892, 29871, 29896, 29897, 13, 13, 9651, 396, 1311, 29889, 2218, 29886, 29918, 5344, 29898, 29878, 29967, 29897, 13, 9651, 396, 29874, 353, 29234, 29918, 9564, 29889, 29879, 567, 324, 345, 29898, 29926, 11216, 6653, 9891, 29897, 13, 9651, 3653, 29918, 9313, 13321, 353, 7442, 29889, 8143, 29898, 9891, 29892, 1897, 294, 29918, 29874, 29918, 295, 8332, 279, 29897, 13, 9651, 263, 353, 7442, 29889, 29880, 979, 29887, 29889, 2929, 345, 29898, 29878, 29967, 29892, 448, 9891, 29918, 9313, 13321, 29897, 13, 9651, 921, 29876, 353, 263, 448, 921, 13, 9651, 921, 353, 921, 29876, 13, 13, 4706, 736, 921, 13, 13, 1678, 822, 12272, 29918, 5344, 29898, 1311, 29892, 1775, 1125, 13, 4706, 1053, 22889, 29889, 2272, 5317, 408, 14770, 13, 4706, 565, 29234, 29889, 790, 5510, 29898, 2922, 1125, 13, 9651, 1775, 353, 1775, 29889, 20034, 1947, 580, 13, 13, 4706, 1775, 29918, 5317, 353, 1775, 2804, 29871, 29900, 29889, 29900, 13, 4706, 14770, 29889, 2922, 4294, 29898, 2922, 29918, 5317, 29897, 13, 4706, 14770, 29889, 4294, 580, 13, 13, 13, 29937, 2683, 2683, 2683, 2683, 2683, 9072, 29899, 13, 13, 361, 4770, 978, 1649, 1275, 525, 1649, 3396, 1649, 2396, 13, 1678, 19282, 3905, 29896, 29946, 8262, 353, 3081, 1731, 877, 8673, 17896, 29896, 29946, 29883, 2176, 29889, 3945, 1495, 13, 13, 1678, 1369, 353, 931, 580, 13, 1678, 921, 353, 19282, 3905, 29896, 29946, 8262, 29889, 2929, 345, 29918, 1482, 880, 580, 13, 1678, 1095, 353, 931, 580, 13, 1678, 396, 2158, 29898, 29916, 29897, 13, 1678, 1596, 877, 29911, 3768, 1129, 29901, 13420, 1095, 29899, 2962, 29892, 525, 29879, 1495, 13, 2 ]
tests/test_filters.py
Ryanb58/algoliaqb
4
79598
from algoliaqb import AlgoliaQueryBuilder def test_normal_filters(): aqb = AlgoliaQueryBuilder( search_param="search", filter_map={ "is_reported": "is_reported" } ) flask_request_args = { "is_reported": True } filter_query = aqb.get_filter_query(flask_request_args) assert filter_query == "is_reported:True" def test_object_filters(): aqb = AlgoliaQueryBuilder( search_param="search", filter_map={ "status_id": { "status_id": "statuses.status_id", "group_id": "statuses.group_id" }, "is_reported": "is_reported" } ) flask_request_args = { "is_reported": True, "status_id": 21, "group_id": 4 } filter_query = aqb.get_filter_query(flask_request_args) assert "is_reported:True" in filter_query assert "statuses.status_id:21" in filter_query assert "statuses.group_id:4" in filter_query assert filter_query == "(statuses.status_id:21 AND statuses.group_id:4) AND is_reported:True" def test_date_filter(): aqb = AlgoliaQueryBuilder( search_param="search", filter_map={ "group_id":"group_id", "created_on": { "type": "date", "created_on_start": "created_on", "created_on_end": "created_on" } } ) flask_request_args = { "group_id": 4, "created_on_start": "1538697600", } filter_query = aqb.get_filter_query(flask_request_args) assert "created_on > 1538697600" in filter_query assert filter_query == "group_id:4 AND created_on > 1538697600" flask_request_args = { "group_id": 4, "created_on_start": "1538697600", "created_on_end": "1539697800", } filter_query = aqb.get_filter_query(flask_request_args) assert "created_on:1538697600 TO 1539697800" in filter_query assert filter_query == "group_id:4 AND created_on:1538697600 TO 1539697800" flask_request_args = { "group_id": 4, "created_on_end": "1539697800", } filter_query = aqb.get_filter_query(flask_request_args) assert "created_on < 1539697800" in filter_query assert filter_query == "group_id:4 AND created_on < 1539697800" def test_not_using_normal_string_filters(): aqb = AlgoliaQueryBuilder( search_param="search", filter_map={ "group_id": "group_id", "status_id": { "group_id": "statuses.group_id", "status_id": "statuses.status_id", }, "is_reported": "is_reported", "main_contact_account_id": "main_contact.account_id", "created_on": { "type": "date", "created_on_start": "created_on", "created_on_end": "created_on", }, "updated_on": { "type": "date", "updated_on_start": "updated_on", "updated_on_end": "updated_on", }, "referral_source_id": { "group_id": "referral_sources.group_id", "referral_source_id": "referral_sources.id", }, "tag_id": { "group_id": "tags.group_id", "tag_id": "tags.id", } } ) flask_request_args = { "page": 1, "order_by": "status_custom-position", "group_id": 4, } filter_query = aqb.get_filter_query(flask_request_args) assert "group_id:4" in filter_query assert filter_query == "group_id:4"
[ 1, 515, 3093, 18001, 29939, 29890, 1053, 11545, 18001, 3010, 5627, 13, 13, 13, 1753, 1243, 29918, 8945, 29918, 26705, 7295, 13, 1678, 263, 29939, 29890, 353, 11545, 18001, 3010, 5627, 29898, 13, 4706, 2740, 29918, 3207, 543, 4478, 613, 13, 4706, 4175, 29918, 1958, 3790, 13, 9651, 376, 275, 29918, 12276, 287, 1115, 376, 275, 29918, 12276, 287, 29908, 13, 4706, 500, 13, 1678, 1723, 13, 13, 1678, 29784, 29918, 3827, 29918, 5085, 353, 426, 13, 4706, 376, 275, 29918, 12276, 287, 1115, 5852, 13, 1678, 500, 13, 13, 1678, 4175, 29918, 1972, 353, 263, 29939, 29890, 29889, 657, 29918, 4572, 29918, 1972, 29898, 1579, 1278, 29918, 3827, 29918, 5085, 29897, 13, 13, 1678, 4974, 4175, 29918, 1972, 1275, 376, 275, 29918, 12276, 287, 29901, 5574, 29908, 13, 13, 13, 13, 13, 1753, 1243, 29918, 3318, 29918, 26705, 7295, 13, 1678, 263, 29939, 29890, 353, 11545, 18001, 3010, 5627, 29898, 13, 4706, 2740, 29918, 3207, 543, 4478, 613, 13, 4706, 4175, 29918, 1958, 3790, 13, 9651, 376, 4882, 29918, 333, 1115, 426, 13, 18884, 376, 4882, 29918, 333, 1115, 376, 4882, 267, 29889, 4882, 29918, 333, 613, 13, 18884, 376, 2972, 29918, 333, 1115, 376, 4882, 267, 29889, 2972, 29918, 333, 29908, 13, 9651, 2981, 13, 9651, 376, 275, 29918, 12276, 287, 1115, 376, 275, 29918, 12276, 287, 29908, 13, 4706, 500, 13, 1678, 1723, 13, 13, 1678, 29784, 29918, 3827, 29918, 5085, 353, 426, 13, 4706, 376, 275, 29918, 12276, 287, 1115, 5852, 29892, 13, 4706, 376, 4882, 29918, 333, 1115, 29871, 29906, 29896, 29892, 13, 4706, 376, 2972, 29918, 333, 1115, 29871, 29946, 13, 1678, 500, 13, 13, 1678, 4175, 29918, 1972, 353, 263, 29939, 29890, 29889, 657, 29918, 4572, 29918, 1972, 29898, 1579, 1278, 29918, 3827, 29918, 5085, 29897, 13, 13, 1678, 4974, 376, 275, 29918, 12276, 287, 29901, 5574, 29908, 297, 4175, 29918, 1972, 13, 1678, 4974, 376, 4882, 267, 29889, 4882, 29918, 333, 29901, 29906, 29896, 29908, 297, 4175, 29918, 1972, 13, 1678, 4974, 376, 4882, 267, 29889, 2972, 29918, 333, 29901, 29946, 29908, 297, 4175, 29918, 1972, 13, 13, 1678, 4974, 4175, 29918, 1972, 1275, 18227, 4882, 267, 29889, 4882, 29918, 333, 29901, 29906, 29896, 5300, 4660, 267, 29889, 2972, 29918, 333, 29901, 29946, 29897, 5300, 338, 29918, 12276, 287, 29901, 5574, 29908, 13, 13, 13, 1753, 1243, 29918, 1256, 29918, 4572, 7295, 13, 1678, 263, 29939, 29890, 353, 11545, 18001, 3010, 5627, 29898, 13, 4706, 2740, 29918, 3207, 543, 4478, 613, 13, 4706, 4175, 29918, 1958, 3790, 13, 9651, 376, 2972, 29918, 333, 4710, 2972, 29918, 333, 613, 13, 9651, 376, 11600, 29918, 265, 1115, 426, 13, 18884, 376, 1853, 1115, 376, 1256, 613, 13, 18884, 376, 11600, 29918, 265, 29918, 2962, 1115, 376, 11600, 29918, 265, 613, 13, 18884, 376, 11600, 29918, 265, 29918, 355, 1115, 376, 11600, 29918, 265, 29908, 13, 9651, 500, 13, 4706, 500, 13, 1678, 1723, 13, 13, 1678, 29784, 29918, 3827, 29918, 5085, 353, 426, 13, 4706, 376, 2972, 29918, 333, 1115, 29871, 29946, 29892, 13, 4706, 376, 11600, 29918, 265, 29918, 2962, 1115, 29871, 376, 29896, 29945, 29941, 29947, 29953, 29929, 29955, 29953, 29900, 29900, 613, 13, 1678, 500, 13, 13, 1678, 4175, 29918, 1972, 353, 263, 29939, 29890, 29889, 657, 29918, 4572, 29918, 1972, 29898, 1579, 1278, 29918, 3827, 29918, 5085, 29897, 13, 13, 1678, 4974, 376, 11600, 29918, 265, 1405, 29871, 29896, 29945, 29941, 29947, 29953, 29929, 29955, 29953, 29900, 29900, 29908, 297, 4175, 29918, 1972, 13, 1678, 4974, 4175, 29918, 1972, 1275, 376, 2972, 29918, 333, 29901, 29946, 5300, 2825, 29918, 265, 1405, 29871, 29896, 29945, 29941, 29947, 29953, 29929, 29955, 29953, 29900, 29900, 29908, 13, 13, 13, 1678, 29784, 29918, 3827, 29918, 5085, 353, 426, 13, 4706, 376, 2972, 29918, 333, 1115, 29871, 29946, 29892, 13, 4706, 376, 11600, 29918, 265, 29918, 2962, 1115, 29871, 376, 29896, 29945, 29941, 29947, 29953, 29929, 29955, 29953, 29900, 29900, 613, 13, 4706, 376, 11600, 29918, 265, 29918, 355, 1115, 29871, 376, 29896, 29945, 29941, 29929, 29953, 29929, 29955, 29947, 29900, 29900, 613, 13, 1678, 500, 13, 13, 1678, 4175, 29918, 1972, 353, 263, 29939, 29890, 29889, 657, 29918, 4572, 29918, 1972, 29898, 1579, 1278, 29918, 3827, 29918, 5085, 29897, 13, 13, 1678, 4974, 376, 11600, 29918, 265, 29901, 29896, 29945, 29941, 29947, 29953, 29929, 29955, 29953, 29900, 29900, 7495, 29871, 29896, 29945, 29941, 29929, 29953, 29929, 29955, 29947, 29900, 29900, 29908, 297, 4175, 29918, 1972, 13, 1678, 4974, 4175, 29918, 1972, 1275, 376, 2972, 29918, 333, 29901, 29946, 5300, 2825, 29918, 265, 29901, 29896, 29945, 29941, 29947, 29953, 29929, 29955, 29953, 29900, 29900, 7495, 29871, 29896, 29945, 29941, 29929, 29953, 29929, 29955, 29947, 29900, 29900, 29908, 13, 13, 1678, 29784, 29918, 3827, 29918, 5085, 353, 426, 13, 4706, 376, 2972, 29918, 333, 1115, 29871, 29946, 29892, 13, 4706, 376, 11600, 29918, 265, 29918, 355, 1115, 29871, 376, 29896, 29945, 29941, 29929, 29953, 29929, 29955, 29947, 29900, 29900, 613, 13, 1678, 500, 13, 13, 1678, 4175, 29918, 1972, 353, 263, 29939, 29890, 29889, 657, 29918, 4572, 29918, 1972, 29898, 1579, 1278, 29918, 3827, 29918, 5085, 29897, 13, 13, 1678, 4974, 376, 11600, 29918, 265, 529, 29871, 29896, 29945, 29941, 29929, 29953, 29929, 29955, 29947, 29900, 29900, 29908, 297, 4175, 29918, 1972, 13, 1678, 4974, 4175, 29918, 1972, 1275, 376, 2972, 29918, 333, 29901, 29946, 5300, 2825, 29918, 265, 529, 29871, 29896, 29945, 29941, 29929, 29953, 29929, 29955, 29947, 29900, 29900, 29908, 13, 13, 13, 1753, 1243, 29918, 1333, 29918, 4746, 29918, 8945, 29918, 1807, 29918, 26705, 7295, 13, 1678, 263, 29939, 29890, 353, 11545, 18001, 3010, 5627, 29898, 13, 4706, 2740, 29918, 3207, 543, 4478, 613, 13, 4706, 4175, 29918, 1958, 3790, 13, 9651, 376, 2972, 29918, 333, 1115, 376, 2972, 29918, 333, 613, 13, 9651, 376, 4882, 29918, 333, 1115, 426, 13, 18884, 376, 2972, 29918, 333, 1115, 376, 4882, 267, 29889, 2972, 29918, 333, 613, 13, 18884, 376, 4882, 29918, 333, 1115, 376, 4882, 267, 29889, 4882, 29918, 333, 613, 13, 9651, 2981, 13, 9651, 376, 275, 29918, 12276, 287, 1115, 376, 275, 29918, 12276, 287, 613, 13, 9651, 376, 3396, 29918, 12346, 29918, 10149, 29918, 333, 1115, 376, 3396, 29918, 12346, 29889, 10149, 29918, 333, 613, 13, 9651, 376, 11600, 29918, 265, 1115, 426, 13, 18884, 376, 1853, 1115, 376, 1256, 613, 13, 18884, 376, 11600, 29918, 265, 29918, 2962, 1115, 376, 11600, 29918, 265, 613, 13, 18884, 376, 11600, 29918, 265, 29918, 355, 1115, 376, 11600, 29918, 265, 613, 13, 9651, 2981, 13, 9651, 376, 21402, 29918, 265, 1115, 426, 13, 18884, 376, 1853, 1115, 376, 1256, 613, 13, 18884, 376, 21402, 29918, 265, 29918, 2962, 1115, 376, 21402, 29918, 265, 613, 13, 18884, 376, 21402, 29918, 265, 29918, 355, 1115, 376, 21402, 29918, 265, 613, 13, 9651, 2981, 13, 9651, 376, 20275, 1705, 29918, 4993, 29918, 333, 1115, 426, 13, 18884, 376, 2972, 29918, 333, 1115, 376, 20275, 1705, 29918, 29879, 2863, 29889, 2972, 29918, 333, 613, 13, 18884, 376, 20275, 1705, 29918, 4993, 29918, 333, 1115, 376, 20275, 1705, 29918, 29879, 2863, 29889, 333, 613, 13, 9651, 2981, 13, 9651, 376, 4039, 29918, 333, 1115, 426, 13, 18884, 376, 2972, 29918, 333, 1115, 376, 11338, 29889, 2972, 29918, 333, 613, 13, 18884, 376, 4039, 29918, 333, 1115, 376, 11338, 29889, 333, 613, 13, 9651, 500, 13, 4706, 500, 13, 1678, 1723, 13, 13, 1678, 29784, 29918, 3827, 29918, 5085, 353, 426, 13, 4706, 376, 3488, 1115, 29871, 29896, 29892, 13, 4706, 376, 2098, 29918, 1609, 1115, 376, 4882, 29918, 6341, 29899, 3283, 613, 13, 4706, 376, 2972, 29918, 333, 1115, 29871, 29946, 29892, 13, 1678, 500, 13, 13, 1678, 4175, 29918, 1972, 353, 263, 29939, 29890, 29889, 657, 29918, 4572, 29918, 1972, 29898, 1579, 1278, 29918, 3827, 29918, 5085, 29897, 13, 13, 1678, 4974, 376, 2972, 29918, 333, 29901, 29946, 29908, 297, 4175, 29918, 1972, 13, 1678, 4974, 4175, 29918, 1972, 1275, 376, 2972, 29918, 333, 29901, 29946, 29908, 13, 2 ]
deepx/nn/stats.py
sharadmv/deepx
74
47543
import numpy as np from .. import T from ..layer import ShapedLayer from ..initialization import initialize_weights from .full import Linear from .. import stats __all__ = ['Gaussian', 'Bernoulli', 'IdentityVariance'] class Gaussian(Linear): def __init__(self, *args, **kwargs): self.cov_type = kwargs.pop('cov_type', 'diagonal') self.min_stdev = kwargs.pop('min_stdev', 1e-2) super(Gaussian, self).__init__(*args, **kwargs) assert not self.elementwise def initialize(self): if not self.elementwise: dim_in, dim_out = self.get_dim_in()[-1], self.get_dim_out()[-1] left = initialize_weights(self.initialization, [dim_in, dim_out // 2]) right = T.zeros([dim_in, dim_out // 2]) self.create_parameter('W', [dim_in, dim_out], initial_value=( T.concatenate([ right, left ], -1) )) self.create_parameter('b', [dim_out], initial_value=np.zeros([dim_out])) def get_dim_out(self): return [self.dim_out[0] * 2] def activate(self, X): if self.cov_type == 'diagonal': scale_diag, mu = T.split(X, 2, axis=-1) if hasattr(self, 'min_stdev'): scale_diag = T.softplus(scale_diag) + self.min_stdev else: scale_diag = T.softplus(scale_diag) + 1e-5 return stats.GaussianScaleDiag([scale_diag, mu], parameter_type='regular') raise Exception("Undefined covariance type: %s" % self.cov_type) def __str__(self): return "Gaussian(%s)" % self.dim_out class Bernoulli(Linear): def __init__(self, *args, **kwargs): self.parameter_type = kwargs.pop('parameter_type', 'natural') super(Bernoulli, self).__init__(*args, **kwargs) def activate(self, X): if self.elementwise: return stats.Bernoulli(X, parameter_type=self.parameter_type) return stats.Bernoulli(X, parameter_type=self.parameter_type) def __str__(self): return "Bernoulli(%s)" % self.dim_out class IdentityVariance(ShapedLayer): def __init__(self, variance=1e-4, *args, **kwargs): self.variance = variance super(IdentityVariance, self).__init__(*args, **kwargs) def initialize(self): pass def get_parameters(self): return [] def infer_shape(self, shape): if shape is None: return if self.elementwise: self.dim_in = shape self.dim_out = shape return if self.dim_in is None: self.dim_in = shape def forward(self, X): return stats.GaussianScaleDiag([np.sqrt(self.variance) * T.ones_like(X), X])
[ 1, 1053, 12655, 408, 7442, 13, 3166, 6317, 1053, 323, 13, 3166, 6317, 13148, 1053, 1383, 10501, 14420, 13, 3166, 6317, 11228, 2133, 1053, 11905, 29918, 705, 5861, 13, 3166, 869, 8159, 1053, 22985, 13, 13, 3166, 6317, 1053, 22663, 13, 13, 13, 1649, 497, 1649, 353, 6024, 29954, 17019, 742, 525, 29933, 824, 5059, 492, 742, 525, 18415, 9037, 8837, 2033, 13, 13, 1990, 22477, 29898, 12697, 1125, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 334, 5085, 29892, 3579, 19290, 1125, 13, 4706, 1583, 29889, 24542, 29918, 1853, 353, 9049, 5085, 29889, 7323, 877, 24542, 29918, 1853, 742, 525, 6051, 351, 7177, 1495, 13, 4706, 1583, 29889, 1195, 29918, 303, 3359, 353, 9049, 5085, 29889, 7323, 877, 1195, 29918, 303, 3359, 742, 29871, 29896, 29872, 29899, 29906, 29897, 13, 4706, 2428, 29898, 29954, 17019, 29892, 1583, 467, 1649, 2344, 1649, 10456, 5085, 29892, 3579, 19290, 29897, 13, 4706, 4974, 451, 1583, 29889, 5029, 3538, 13, 13, 1678, 822, 11905, 29898, 1311, 1125, 13, 4706, 565, 451, 1583, 29889, 5029, 3538, 29901, 13, 9651, 3964, 29918, 262, 29892, 3964, 29918, 449, 353, 1583, 29889, 657, 29918, 6229, 29918, 262, 580, 14352, 29896, 1402, 1583, 29889, 657, 29918, 6229, 29918, 449, 580, 14352, 29896, 29962, 13, 9651, 2175, 353, 11905, 29918, 705, 5861, 29898, 1311, 29889, 11228, 2133, 29892, 518, 6229, 29918, 262, 29892, 3964, 29918, 449, 849, 29871, 29906, 2314, 13, 9651, 1492, 353, 323, 29889, 3298, 359, 4197, 6229, 29918, 262, 29892, 3964, 29918, 449, 849, 29871, 29906, 2314, 13, 9651, 1583, 29889, 3258, 29918, 15501, 877, 29956, 742, 518, 6229, 29918, 262, 29892, 3964, 29918, 449, 1402, 2847, 29918, 1767, 7607, 13, 18884, 323, 29889, 535, 29883, 2579, 403, 4197, 13, 462, 1678, 1492, 29892, 2175, 13, 18884, 21251, 448, 29896, 29897, 13, 632, 876, 13, 9651, 1583, 29889, 3258, 29918, 15501, 877, 29890, 742, 518, 6229, 29918, 449, 1402, 2847, 29918, 1767, 29922, 9302, 29889, 3298, 359, 4197, 6229, 29918, 449, 12622, 13, 13, 1678, 822, 679, 29918, 6229, 29918, 449, 29898, 1311, 1125, 13, 4706, 736, 518, 1311, 29889, 6229, 29918, 449, 29961, 29900, 29962, 334, 29871, 29906, 29962, 13, 13, 1678, 822, 5039, 403, 29898, 1311, 29892, 1060, 1125, 13, 4706, 565, 1583, 29889, 24542, 29918, 1853, 1275, 525, 6051, 351, 7177, 2396, 13, 9651, 6287, 29918, 6051, 351, 29892, 3887, 353, 323, 29889, 5451, 29898, 29990, 29892, 29871, 29906, 29892, 9685, 10457, 29896, 29897, 13, 9651, 565, 756, 5552, 29898, 1311, 29892, 525, 1195, 29918, 303, 3359, 29374, 13, 18884, 6287, 29918, 6051, 351, 353, 323, 29889, 2695, 11242, 29898, 7052, 29918, 6051, 351, 29897, 718, 1583, 29889, 1195, 29918, 303, 3359, 13, 9651, 1683, 29901, 13, 18884, 6287, 29918, 6051, 351, 353, 323, 29889, 2695, 11242, 29898, 7052, 29918, 6051, 351, 29897, 718, 29871, 29896, 29872, 29899, 29945, 13, 9651, 736, 22663, 29889, 29954, 17019, 17185, 12130, 351, 4197, 7052, 29918, 6051, 351, 29892, 3887, 1402, 3443, 29918, 1853, 2433, 15227, 1495, 13, 4706, 12020, 8960, 703, 25263, 5598, 18838, 279, 8837, 1134, 29901, 1273, 29879, 29908, 1273, 1583, 29889, 24542, 29918, 1853, 29897, 13, 13, 1678, 822, 4770, 710, 12035, 1311, 1125, 13, 4706, 736, 376, 29954, 17019, 29414, 29879, 5513, 1273, 1583, 29889, 6229, 29918, 449, 13, 13, 13, 1990, 6209, 5059, 492, 29898, 12697, 1125, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 334, 5085, 29892, 3579, 19290, 1125, 13, 4706, 1583, 29889, 15501, 29918, 1853, 353, 9049, 5085, 29889, 7323, 877, 15501, 29918, 1853, 742, 525, 25047, 1495, 13, 4706, 2428, 29898, 29933, 824, 5059, 492, 29892, 1583, 467, 1649, 2344, 1649, 10456, 5085, 29892, 3579, 19290, 29897, 13, 13, 1678, 822, 5039, 403, 29898, 1311, 29892, 1060, 1125, 13, 4706, 565, 1583, 29889, 5029, 3538, 29901, 13, 9651, 736, 22663, 29889, 29933, 824, 5059, 492, 29898, 29990, 29892, 3443, 29918, 1853, 29922, 1311, 29889, 15501, 29918, 1853, 29897, 13, 4706, 736, 22663, 29889, 29933, 824, 5059, 492, 29898, 29990, 29892, 3443, 29918, 1853, 29922, 1311, 29889, 15501, 29918, 1853, 29897, 13, 13, 1678, 822, 4770, 710, 12035, 1311, 1125, 13, 4706, 736, 376, 29933, 824, 5059, 492, 29414, 29879, 5513, 1273, 1583, 29889, 6229, 29918, 449, 13, 13, 13, 1990, 27486, 9037, 8837, 29898, 2713, 10501, 14420, 1125, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 20162, 29922, 29896, 29872, 29899, 29946, 29892, 334, 5085, 29892, 3579, 19290, 1125, 13, 4706, 1583, 29889, 1707, 8837, 353, 20162, 13, 4706, 2428, 29898, 18415, 9037, 8837, 29892, 1583, 467, 1649, 2344, 1649, 10456, 5085, 29892, 3579, 19290, 29897, 13, 13, 1678, 822, 11905, 29898, 1311, 1125, 13, 4706, 1209, 13, 13, 1678, 822, 679, 29918, 16744, 29898, 1311, 1125, 13, 4706, 736, 5159, 13, 13, 1678, 822, 10115, 29918, 12181, 29898, 1311, 29892, 8267, 1125, 13, 4706, 565, 8267, 338, 6213, 29901, 736, 13, 4706, 565, 1583, 29889, 5029, 3538, 29901, 13, 9651, 1583, 29889, 6229, 29918, 262, 353, 8267, 13, 9651, 1583, 29889, 6229, 29918, 449, 353, 8267, 13, 9651, 736, 13, 4706, 565, 1583, 29889, 6229, 29918, 262, 338, 6213, 29901, 13, 9651, 1583, 29889, 6229, 29918, 262, 353, 8267, 13, 13, 1678, 822, 6375, 29898, 1311, 29892, 1060, 1125, 13, 4706, 736, 22663, 29889, 29954, 17019, 17185, 12130, 351, 4197, 9302, 29889, 3676, 29898, 1311, 29889, 1707, 8837, 29897, 334, 323, 29889, 2873, 29918, 4561, 29898, 29990, 511, 1060, 2314, 13, 2 ]
packages/main/tests/python/test_pdf.py
ete99/rpaframework
2
1611911
from pathlib import Path import pytest from RPA.PDF import PDF RESOURCE_DIR = Path(__file__).resolve().parent / ".." / "resources" TEMP_DIR = Path(__file__).resolve().parent / ".." / "temp" imagesandtext_pdf = RESOURCE_DIR / "imagesandtext.pdf" invoice_pdf = RESOURCE_DIR / "invoice.pdf" vero_pdf = RESOURCE_DIR / "vero.pdf" pytest_pdf = RESOURCE_DIR / "18467.pdf" loremipsum_pdf = RESOURCE_DIR / "LoremIpsum.pdf" encrypted_pdf = RESOURCE_DIR / "encrypted.pdf" @pytest.fixture def library(): return PDF() def test_page_count(library): assert library.get_number_of_pages(invoice_pdf) == 1 assert library.get_number_of_pages(vero_pdf) == 2 assert library.get_number_of_pages(pytest_pdf) == 9 def test_page_info(library): info = library.get_info(pytest_pdf) assert info["Pages"] == 9 assert not info["Encrypted"] assert not info["Fields"] info = library.get_info(vero_pdf) assert info["Fields"] assert info["Pages"] == 2 def test_get_text_from_all_pages(library): text = library.get_text_from_pdf(loremipsum_pdf) assert len(text) == 1, "text should be parsed from 1 pages" assert len(text[1]) == 3622 text = library.get_text_from_pdf(vero_pdf) assert len(text) == 2, "text should be parsed from 2 pages" assert "Muualle lomakkeeseen kirjoittamaasi tietoa ei käsitellä." in text[2] def test_get_text_from_specific_page(library): text = library.get_text_from_pdf(pytest_pdf, pages=[7]) assert "Plugins for Web Development" in text[7] def test_set_anchor_to_element(library): library.open_pdf_document(invoice_pdf) result = library.set_anchor_to_element("text:due date") assert result result = library.set_anchor_to_element("text:due to the date") assert not result def test_get_value_from_anchor_by_default_from_right(library): library.open_pdf_document(invoice_pdf) invoice_number = library.get_value_from_anchor("text:invoice number") order_number = library.get_value_from_anchor("text:order number") invoice_date = library.get_value_from_anchor("text:invoice date") due_date = library.get_value_from_anchor("text:due date") total_due = library.get_value_from_anchor("text:total due") assert invoice_number.text == "INV-3337" assert order_number.text == "12345" assert invoice_date.text == "January 25, 2016" assert due_date.text == "January 31, 2016" assert total_due.text == "$93.50" def test_get_value_from_anchor_from_left(library): library.open_pdf_document(invoice_pdf) invoice_label = library.get_value_from_anchor("text:INV-3337", direction="left") assert invoice_label.text == "Invoice Number" def test_get_from_anchor_from_bottom(library): library.open_pdf_document(invoice_pdf) service = library.get_value_from_anchor("text:service", direction="bottom") assert "Web Design" in service.text def test_get_from_anchor_from_top(library): library.open_pdf_document(invoice_pdf) item = library.get_value_from_anchor("text:Tax", direction="top") assert item.text == "Sub Total" def test_extract_pages_from_pdf(library): pages = [7, 8] target_pdf = TEMP_DIR / "extracted.pdf" library.extract_pages_from_pdf(pytest_pdf, target_pdf, pages) assert library.get_number_of_pages(target_pdf) == 2 text = library.get_text_from_pdf(target_pdf) assert "Plugins for Web Development" in text[1] def test_rotating(library): target_pdf = TEMP_DIR / "rotated.pdf" library.page_rotate(1, vero_pdf, target_pdf) # TODO. Assert def test_get_pdf_xml_dump(library): library.open_pdf_document(invoice_pdf) xml = library.dump_pdf_as_xml() assert '<?xml version="1.0" encoding="utf-8" ?>' in xml def test_get_input_fields(library): fields = library.get_input_fields(vero_pdf) assert fields["Puhelinnumero"]["value"] == "" assert isinstance(fields["Puhelinnumero"]["rect"], list) fields = library.get_input_fields(vero_pdf, replace_none_value=True) assert fields["Puhelinnumero"]["value"] == "Puhelinnumero" @pytest.mark.skip(reason="known issue of reading fields of already updated pdf") def test_update_field_values(library): update_fields = {"Puhelinnumero": "10-1231233", "Paivays": "01.01.2020"} target_pdf = TEMP_DIR / "values_updated.pdf" fields = library.get_input_fields(vero_pdf) assert fields["Puhelinnumero"]["value"] == "" library.update_field_values(vero_pdf, target_pdf, update_fields) fields = library.get_input_fields(target_pdf) assert fields["Puhelinnumero"]["value"] == update_fields["Puhelinnumero"] assert fields["Paivays"]["value"] == update_fields["Paivays"] def test_set_field_value(library): target_pdf = TEMP_DIR / "copy_of_vero.pdf" library.open_pdf_document(vero_pdf) library.set_field_value("Puhelinnumero", "+358-55-12322121312") library.set_field_value("Paivays", "31.12.2020") library.save_pdf(vero_pdf, target_pdf) def test_get_texts_matching_regexp(library): pass
[ 1, 515, 2224, 1982, 1053, 10802, 13, 5215, 11451, 1688, 13, 3166, 390, 7228, 29889, 8493, 1053, 11328, 13, 13, 1525, 27839, 4741, 29918, 9464, 353, 10802, 22168, 1445, 1649, 467, 17863, 2141, 3560, 847, 376, 636, 29908, 847, 376, 13237, 29908, 13, 4330, 3580, 29918, 9464, 353, 10802, 22168, 1445, 1649, 467, 17863, 2141, 3560, 847, 376, 636, 29908, 847, 376, 7382, 29908, 13, 8346, 392, 726, 29918, 5140, 353, 390, 2890, 22970, 4741, 29918, 9464, 847, 376, 8346, 392, 726, 29889, 5140, 29908, 13, 262, 14917, 29918, 5140, 353, 390, 2890, 22970, 4741, 29918, 9464, 847, 376, 262, 14917, 29889, 5140, 29908, 13, 369, 29877, 29918, 5140, 353, 390, 2890, 22970, 4741, 29918, 9464, 847, 376, 369, 29877, 29889, 5140, 29908, 13, 2272, 1688, 29918, 5140, 353, 390, 2890, 22970, 4741, 29918, 9464, 847, 376, 29896, 29947, 29946, 29953, 29955, 29889, 5140, 29908, 13, 29880, 3668, 4512, 398, 29918, 5140, 353, 390, 2890, 22970, 4741, 29918, 9464, 847, 376, 29931, 3668, 29902, 15663, 29889, 5140, 29908, 13, 3977, 14740, 29918, 5140, 353, 390, 2890, 22970, 4741, 29918, 9464, 847, 376, 3977, 14740, 29889, 5140, 29908, 13, 13, 13, 29992, 2272, 1688, 29889, 7241, 15546, 13, 1753, 3489, 7295, 13, 1678, 736, 11328, 580, 13, 13, 13, 1753, 1243, 29918, 3488, 29918, 2798, 29898, 5258, 1125, 13, 1678, 4974, 3489, 29889, 657, 29918, 4537, 29918, 974, 29918, 12292, 29898, 262, 14917, 29918, 5140, 29897, 1275, 29871, 29896, 13, 1678, 4974, 3489, 29889, 657, 29918, 4537, 29918, 974, 29918, 12292, 29898, 369, 29877, 29918, 5140, 29897, 1275, 29871, 29906, 13, 1678, 4974, 3489, 29889, 657, 29918, 4537, 29918, 974, 29918, 12292, 29898, 2272, 1688, 29918, 5140, 29897, 1275, 29871, 29929, 13, 13, 13, 1753, 1243, 29918, 3488, 29918, 3888, 29898, 5258, 1125, 13, 1678, 5235, 353, 3489, 29889, 657, 29918, 3888, 29898, 2272, 1688, 29918, 5140, 29897, 13, 1678, 4974, 5235, 3366, 27514, 3108, 1275, 29871, 29929, 13, 1678, 4974, 451, 5235, 3366, 8566, 14740, 3108, 13, 1678, 4974, 451, 5235, 3366, 14256, 3108, 13, 1678, 5235, 353, 3489, 29889, 657, 29918, 3888, 29898, 369, 29877, 29918, 5140, 29897, 13, 1678, 4974, 5235, 3366, 14256, 3108, 13, 1678, 4974, 5235, 3366, 27514, 3108, 1275, 29871, 29906, 13, 13, 13, 1753, 1243, 29918, 657, 29918, 726, 29918, 3166, 29918, 497, 29918, 12292, 29898, 5258, 1125, 13, 1678, 1426, 353, 3489, 29889, 657, 29918, 726, 29918, 3166, 29918, 5140, 29898, 29880, 3668, 4512, 398, 29918, 5140, 29897, 13, 1678, 4974, 7431, 29898, 726, 29897, 1275, 29871, 29896, 29892, 376, 726, 881, 367, 21213, 515, 29871, 29896, 6515, 29908, 13, 1678, 4974, 7431, 29898, 726, 29961, 29896, 2314, 1275, 29871, 29941, 29953, 29906, 29906, 13, 1678, 1426, 353, 3489, 29889, 657, 29918, 726, 29918, 3166, 29918, 5140, 29898, 369, 29877, 29918, 5140, 29897, 13, 1678, 4974, 7431, 29898, 726, 29897, 1275, 29871, 29906, 29892, 376, 726, 881, 367, 21213, 515, 29871, 29906, 6515, 29908, 13, 1678, 4974, 376, 29924, 29884, 950, 280, 301, 290, 557, 446, 968, 264, 18990, 2212, 986, 3304, 6840, 260, 2035, 19807, 321, 29875, 413, 6373, 277, 514, 29986, 1213, 297, 1426, 29961, 29906, 29962, 13, 13, 13, 1753, 1243, 29918, 657, 29918, 726, 29918, 3166, 29918, 14940, 29918, 3488, 29898, 5258, 1125, 13, 1678, 1426, 353, 3489, 29889, 657, 29918, 726, 29918, 3166, 29918, 5140, 29898, 2272, 1688, 29918, 5140, 29892, 6515, 11759, 29955, 2314, 13, 1678, 4974, 376, 3247, 8385, 363, 2563, 14650, 29908, 297, 1426, 29961, 29955, 29962, 13, 13, 13, 1753, 1243, 29918, 842, 29918, 25367, 29918, 517, 29918, 5029, 29898, 5258, 1125, 13, 1678, 3489, 29889, 3150, 29918, 5140, 29918, 3225, 29898, 262, 14917, 29918, 5140, 29897, 13, 1678, 1121, 353, 3489, 29889, 842, 29918, 25367, 29918, 517, 29918, 5029, 703, 726, 29901, 29123, 2635, 1159, 13, 1678, 4974, 1121, 13, 1678, 1121, 353, 3489, 29889, 842, 29918, 25367, 29918, 517, 29918, 5029, 703, 726, 29901, 29123, 304, 278, 2635, 1159, 13, 1678, 4974, 451, 1121, 13, 13, 13, 1753, 1243, 29918, 657, 29918, 1767, 29918, 3166, 29918, 25367, 29918, 1609, 29918, 4381, 29918, 3166, 29918, 1266, 29898, 5258, 1125, 13, 1678, 3489, 29889, 3150, 29918, 5140, 29918, 3225, 29898, 262, 14917, 29918, 5140, 29897, 13, 1678, 297, 14917, 29918, 4537, 353, 3489, 29889, 657, 29918, 1767, 29918, 3166, 29918, 25367, 703, 726, 29901, 262, 14917, 1353, 1159, 13, 1678, 1797, 29918, 4537, 353, 3489, 29889, 657, 29918, 1767, 29918, 3166, 29918, 25367, 703, 726, 29901, 2098, 1353, 1159, 13, 1678, 297, 14917, 29918, 1256, 353, 3489, 29889, 657, 29918, 1767, 29918, 3166, 29918, 25367, 703, 726, 29901, 262, 14917, 2635, 1159, 13, 1678, 2861, 29918, 1256, 353, 3489, 29889, 657, 29918, 1767, 29918, 3166, 29918, 25367, 703, 726, 29901, 29123, 2635, 1159, 13, 1678, 3001, 29918, 29123, 353, 3489, 29889, 657, 29918, 1767, 29918, 3166, 29918, 25367, 703, 726, 29901, 7827, 2861, 1159, 13, 1678, 4974, 297, 14917, 29918, 4537, 29889, 726, 1275, 376, 1177, 29963, 29899, 29941, 29941, 29941, 29955, 29908, 13, 1678, 4974, 1797, 29918, 4537, 29889, 726, 1275, 376, 29896, 29906, 29941, 29946, 29945, 29908, 13, 1678, 4974, 297, 14917, 29918, 1256, 29889, 726, 1275, 376, 29967, 15623, 653, 29871, 29906, 29945, 29892, 29871, 29906, 29900, 29896, 29953, 29908, 13, 1678, 4974, 2861, 29918, 1256, 29889, 726, 1275, 376, 29967, 15623, 653, 29871, 29941, 29896, 29892, 29871, 29906, 29900, 29896, 29953, 29908, 13, 1678, 4974, 3001, 29918, 29123, 29889, 726, 1275, 3908, 29929, 29941, 29889, 29945, 29900, 29908, 13, 13, 13, 1753, 1243, 29918, 657, 29918, 1767, 29918, 3166, 29918, 25367, 29918, 3166, 29918, 1563, 29898, 5258, 1125, 13, 1678, 3489, 29889, 3150, 29918, 5140, 29918, 3225, 29898, 262, 14917, 29918, 5140, 29897, 13, 1678, 297, 14917, 29918, 1643, 353, 3489, 29889, 657, 29918, 1767, 29918, 3166, 29918, 25367, 703, 726, 29901, 1177, 29963, 29899, 29941, 29941, 29941, 29955, 613, 5305, 543, 1563, 1159, 13, 1678, 4974, 297, 14917, 29918, 1643, 29889, 726, 1275, 376, 797, 14917, 9681, 29908, 13, 13, 13, 1753, 1243, 29918, 657, 29918, 3166, 29918, 25367, 29918, 3166, 29918, 8968, 29898, 5258, 1125, 13, 1678, 3489, 29889, 3150, 29918, 5140, 29918, 3225, 29898, 262, 14917, 29918, 5140, 29897, 13, 1678, 2669, 353, 3489, 29889, 657, 29918, 1767, 29918, 3166, 29918, 25367, 703, 726, 29901, 5509, 613, 5305, 543, 8968, 1159, 13, 1678, 4974, 376, 3609, 12037, 29908, 297, 2669, 29889, 726, 13, 13, 13, 1753, 1243, 29918, 657, 29918, 3166, 29918, 25367, 29918, 3166, 29918, 3332, 29898, 5258, 1125, 13, 1678, 3489, 29889, 3150, 29918, 5140, 29918, 3225, 29898, 262, 14917, 29918, 5140, 29897, 13, 1678, 2944, 353, 3489, 29889, 657, 29918, 1767, 29918, 3166, 29918, 25367, 703, 726, 29901, 29911, 1165, 613, 5305, 543, 3332, 1159, 13, 1678, 4974, 2944, 29889, 726, 1275, 376, 4035, 14990, 29908, 13, 13, 13, 1753, 1243, 29918, 21111, 29918, 12292, 29918, 3166, 29918, 5140, 29898, 5258, 1125, 13, 1678, 6515, 353, 518, 29955, 29892, 29871, 29947, 29962, 13, 1678, 3646, 29918, 5140, 353, 17067, 3580, 29918, 9464, 847, 376, 21111, 287, 29889, 5140, 29908, 13, 1678, 3489, 29889, 21111, 29918, 12292, 29918, 3166, 29918, 5140, 29898, 2272, 1688, 29918, 5140, 29892, 3646, 29918, 5140, 29892, 6515, 29897, 13, 1678, 4974, 3489, 29889, 657, 29918, 4537, 29918, 974, 29918, 12292, 29898, 5182, 29918, 5140, 29897, 1275, 29871, 29906, 13, 1678, 1426, 353, 3489, 29889, 657, 29918, 726, 29918, 3166, 29918, 5140, 29898, 5182, 29918, 5140, 29897, 13, 1678, 4974, 376, 3247, 8385, 363, 2563, 14650, 29908, 297, 1426, 29961, 29896, 29962, 13, 13, 13, 1753, 1243, 29918, 5450, 1218, 29898, 5258, 1125, 13, 1678, 3646, 29918, 5140, 353, 17067, 3580, 29918, 9464, 847, 376, 5450, 630, 29889, 5140, 29908, 13, 1678, 3489, 29889, 3488, 29918, 23361, 29898, 29896, 29892, 1147, 29877, 29918, 5140, 29892, 3646, 29918, 5140, 29897, 13, 1678, 396, 14402, 29889, 16499, 13, 13, 13, 1753, 1243, 29918, 657, 29918, 5140, 29918, 3134, 29918, 15070, 29898, 5258, 1125, 13, 1678, 3489, 29889, 3150, 29918, 5140, 29918, 3225, 29898, 262, 14917, 29918, 5140, 29897, 13, 1678, 4903, 353, 3489, 29889, 15070, 29918, 5140, 29918, 294, 29918, 3134, 580, 13, 1678, 4974, 525, 8169, 3134, 1873, 543, 29896, 29889, 29900, 29908, 8025, 543, 9420, 29899, 29947, 29908, 6681, 29915, 297, 4903, 13, 13, 13, 1753, 1243, 29918, 657, 29918, 2080, 29918, 9621, 29898, 5258, 1125, 13, 1678, 4235, 353, 3489, 29889, 657, 29918, 2080, 29918, 9621, 29898, 369, 29877, 29918, 5140, 29897, 13, 1678, 4974, 4235, 3366, 29925, 29884, 3952, 262, 1949, 1489, 3108, 3366, 1767, 3108, 1275, 5124, 13, 1678, 4974, 338, 8758, 29898, 9621, 3366, 29925, 29884, 3952, 262, 1949, 1489, 3108, 3366, 1621, 12436, 1051, 29897, 13, 1678, 4235, 353, 3489, 29889, 657, 29918, 2080, 29918, 9621, 29898, 369, 29877, 29918, 5140, 29892, 5191, 29918, 9290, 29918, 1767, 29922, 5574, 29897, 13, 1678, 4974, 4235, 3366, 29925, 29884, 3952, 262, 1949, 1489, 3108, 3366, 1767, 3108, 1275, 376, 29925, 29884, 3952, 262, 1949, 1489, 29908, 13, 13, 13, 29992, 2272, 1688, 29889, 3502, 29889, 11014, 29898, 23147, 543, 5203, 2228, 310, 5183, 4235, 310, 2307, 4784, 13552, 1159, 13, 1753, 1243, 29918, 5504, 29918, 2671, 29918, 5975, 29898, 5258, 1125, 13, 1678, 2767, 29918, 9621, 353, 8853, 29925, 29884, 3952, 262, 1949, 1489, 1115, 376, 29896, 29900, 29899, 29896, 29906, 29941, 29896, 29906, 29941, 29941, 613, 376, 11868, 440, 1036, 1115, 376, 29900, 29896, 29889, 29900, 29896, 29889, 29906, 29900, 29906, 29900, 9092, 13, 1678, 3646, 29918, 5140, 353, 17067, 3580, 29918, 9464, 847, 376, 5975, 29918, 21402, 29889, 5140, 29908, 13, 13, 1678, 4235, 353, 3489, 29889, 657, 29918, 2080, 29918, 9621, 29898, 369, 29877, 29918, 5140, 29897, 13, 1678, 4974, 4235, 3366, 29925, 29884, 3952, 262, 1949, 1489, 3108, 3366, 1767, 3108, 1275, 5124, 13, 13, 1678, 3489, 29889, 5504, 29918, 2671, 29918, 5975, 29898, 369, 29877, 29918, 5140, 29892, 3646, 29918, 5140, 29892, 2767, 29918, 9621, 29897, 13, 1678, 4235, 353, 3489, 29889, 657, 29918, 2080, 29918, 9621, 29898, 5182, 29918, 5140, 29897, 13, 1678, 4974, 4235, 3366, 29925, 29884, 3952, 262, 1949, 1489, 3108, 3366, 1767, 3108, 1275, 2767, 29918, 9621, 3366, 29925, 29884, 3952, 262, 1949, 1489, 3108, 13, 1678, 4974, 4235, 3366, 11868, 440, 1036, 3108, 3366, 1767, 3108, 1275, 2767, 29918, 9621, 3366, 11868, 440, 1036, 3108, 13, 13, 13, 1753, 1243, 29918, 842, 29918, 2671, 29918, 1767, 29898, 5258, 1125, 13, 1678, 3646, 29918, 5140, 353, 17067, 3580, 29918, 9464, 847, 376, 8552, 29918, 974, 29918, 369, 29877, 29889, 5140, 29908, 13, 1678, 3489, 29889, 3150, 29918, 5140, 29918, 3225, 29898, 369, 29877, 29918, 5140, 29897, 13, 1678, 3489, 29889, 842, 29918, 2671, 29918, 1767, 703, 29925, 29884, 3952, 262, 1949, 1489, 613, 15691, 29941, 29945, 29947, 29899, 29945, 29945, 29899, 29896, 29906, 29941, 29906, 29906, 29896, 29906, 29896, 29941, 29896, 29906, 1159, 13, 1678, 3489, 29889, 842, 29918, 2671, 29918, 1767, 703, 11868, 440, 1036, 613, 376, 29941, 29896, 29889, 29896, 29906, 29889, 29906, 29900, 29906, 29900, 1159, 13, 1678, 3489, 29889, 7620, 29918, 5140, 29898, 369, 29877, 29918, 5140, 29892, 3646, 29918, 5140, 29897, 13, 13, 13, 1753, 1243, 29918, 657, 29918, 726, 29879, 29918, 4352, 292, 29918, 13087, 29886, 29898, 5258, 1125, 13, 1678, 1209, 13, 2 ]
test/test_app.py
dmillington/lunchroulette
1
97595
import pytest from unittest.mock import MagicMock, patch from lunchroulette.models import SlackAccessToken, RouletteMessage # test / (hello world) def test_root(client): resp = client.get('/') assert resp.status_code == 200 assert resp.get_data() == b'Hello World' # test /begin_auth def test_begin_auth(client): CLIENT_ID = 'NOCLIENTID' OAUTH_SCOPE = 'NOBOTSCOPE' resp = client.get('/begin_auth') assert resp.status_code == 200 assert resp.get_data().decode() == f'<a href="https://slack.com/oauth/authorize?scope={ OAUTH_SCOPE }&client_id={ CLIENT_ID }">Add to Slack</a>' # test /finish_auth @patch('slack.WebClient.oauth_access') def test_finish_auth_new_token(mock_oa, client, session): mock_oa.return_value = dict(team_id='a', bot={'bot_access_token': 'b'}) resp = client.get('/finish_auth', query_string=dict(code='thecode')) mock_oa.assert_called_once() assert resp.status_code == 200 assert resp.get_data().decode() == 'Auth complete!' tokens = session.query(SlackAccessToken).all() assert len(tokens) == 1 assert tokens[0].team_id == 'a' assert tokens[0].access_token == 'b' # Test requesting for same team updates existing row mock_oa.return_value = dict(team_id='a', bot={'bot_access_token': 'c'}) resp = client.get('/finish_auth', query_string=dict(code='thecode')) mock_oa.assert_called() assert resp.status_code == 200 assert resp.get_data().decode() == 'Auth complete!' tokens = session.query(SlackAccessToken).all() assert len(tokens) == 1 assert tokens[0].team_id == 'a' assert tokens[0].access_token == 'c' # test /start_roulette @patch('slack.WebClient.chat_postMessage') def test_start_roulette_success(mock_pm, client, session): mock_pm.return_value = dict(channel='C012AB3CD', ts='1234567890.123456') session.add(SlackAccessToken(team_id='T12345', access_token='xoxa-access-token-string')) session.commit() resp = client.post('/start_roulette', data=dict(team_id='T12345', channel_id='C012AB3CD')) mock_pm.assert_called() assert resp.status_code == 200 messages = session.query(RouletteMessage).all() assert len(messages) == 1 assert messages[0].channel == 'C012AB3CD' assert messages[0].timestamp == '1234567890.123456' @patch('slack.WebClient.chat_postMessage') def test_start_roulette_already_started(mock_pm, client, session): session.add(SlackAccessToken(team_id='T12345', access_token='xoxa-access-token-string')) session.add(RouletteMessage(channel='C012AB3CD', timestamp='1234567890.123456')) session.commit() resp = client.post('/start_roulette', data=dict(team_id='T12345', channel_id='C012AB3CD')) mock_pm.assert_not_called() assert resp.status_code == 500 assert resp.headers.get('error') == 'There is already a roulette happening in this channel!' # test /end_roulette @patch('slack.WebClient.chat_postMessage') @patch('slack.WebClient.conversations_open') @patch('slack.WebClient.reactions_get') def test_end_roulette_success(mock_reactions, mock_conversations_open, mock_pm, client, session): mock_reactions.return_value = dict(message=dict(reactions=[dict(users=['ABCD','EFGH'])]), ts='1234567890.123456') mocked_channel_id = 'C012AB3CD' mocked_group_channel_id = 'D012AB3CD' mock_conversations_open.return_value = dict(channel=dict(id=mocked_group_channel_id)) session.add(SlackAccessToken(team_id='T12345', access_token='xoxa-access-token-string')) session.add(RouletteMessage(channel=mocked_channel_id, timestamp='1234567890.123456')) session.commit() resp = client.post('/end_roulette', data=dict(team_id='T12345', channel_id=mocked_channel_id)) mock_pm.assert_called_once_with(channel=mocked_group_channel_id, text="Hi! You all are going to get Lunch! You can use this channel to coordinate logistics.") assert resp.get_data() == b'Roulette ended! Matching people for lunch now. Participants will receive a group DM with their lunch buddies.' @patch('slack.WebClient.chat_postMessage') def test_end_roulette_not_started(mock_pm, client, session): mocked_channel_id = 'C012AB3CD' session.add(SlackAccessToken(team_id='T12345', access_token='xoxa-access-token-string')) session.commit() resp = client.post('/end_roulette', data=dict(team_id='T12345', channel_id=mocked_channel_id)) mock_pm.assert_not_called() assert resp.status_code == 500 assert resp.headers.get('error') == 'No roulette started. Try /lr_start first'
[ 1, 1053, 11451, 1688, 13, 3166, 443, 27958, 29889, 17640, 1053, 26494, 18680, 29892, 13261, 13, 3166, 301, 3322, 27537, 20200, 29889, 9794, 1053, 317, 2364, 6638, 6066, 29892, 15915, 20200, 3728, 13, 13, 29937, 1243, 847, 313, 12199, 3186, 29897, 13, 1753, 1243, 29918, 4632, 29898, 4645, 1125, 13, 1678, 4613, 353, 3132, 29889, 657, 11219, 1495, 13, 1678, 4974, 4613, 29889, 4882, 29918, 401, 1275, 29871, 29906, 29900, 29900, 13, 1678, 4974, 4613, 29889, 657, 29918, 1272, 580, 1275, 289, 29915, 10994, 2787, 29915, 13, 13, 29937, 1243, 847, 463, 29918, 5150, 13, 1753, 1243, 29918, 463, 29918, 5150, 29898, 4645, 1125, 13, 1678, 24492, 3919, 29918, 1367, 353, 525, 6632, 27205, 3919, 1367, 29915, 13, 1678, 438, 20656, 29950, 29918, 29903, 3217, 4162, 353, 525, 6632, 29933, 2891, 29903, 3217, 4162, 29915, 13, 1678, 4613, 353, 3132, 29889, 657, 11219, 463, 29918, 5150, 1495, 13, 1678, 4974, 4613, 29889, 4882, 29918, 401, 1275, 29871, 29906, 29900, 29900, 13, 1678, 4974, 4613, 29889, 657, 29918, 1272, 2141, 13808, 580, 1275, 285, 29915, 29966, 29874, 2822, 543, 991, 597, 29879, 2364, 29889, 510, 29914, 23106, 29914, 8921, 675, 29973, 6078, 3790, 438, 20656, 29950, 29918, 29903, 3217, 4162, 500, 29987, 4645, 29918, 333, 3790, 24492, 3919, 29918, 1367, 500, 1013, 2528, 304, 317, 2364, 829, 29874, 16299, 13, 13, 29937, 1243, 847, 4951, 728, 29918, 5150, 13, 29992, 5041, 877, 29879, 2364, 29889, 3609, 4032, 29889, 23106, 29918, 5943, 1495, 13, 1753, 1243, 29918, 4951, 728, 29918, 5150, 29918, 1482, 29918, 6979, 29898, 17640, 29918, 19807, 29892, 3132, 29892, 4867, 1125, 13, 1678, 11187, 29918, 19807, 29889, 2457, 29918, 1767, 353, 9657, 29898, 14318, 29918, 333, 2433, 29874, 742, 9225, 3790, 29915, 7451, 29918, 5943, 29918, 6979, 2396, 525, 29890, 29915, 1800, 13, 13, 1678, 4613, 353, 3132, 29889, 657, 11219, 4951, 728, 29918, 5150, 742, 2346, 29918, 1807, 29922, 8977, 29898, 401, 2433, 1552, 401, 8785, 13, 1678, 11187, 29918, 19807, 29889, 9294, 29918, 13998, 29918, 10646, 580, 13, 1678, 4974, 4613, 29889, 4882, 29918, 401, 1275, 29871, 29906, 29900, 29900, 13, 1678, 4974, 4613, 29889, 657, 29918, 1272, 2141, 13808, 580, 1275, 525, 6444, 4866, 20714, 13, 1678, 18897, 353, 4867, 29889, 1972, 29898, 29903, 2364, 6638, 6066, 467, 497, 580, 13, 1678, 4974, 7431, 29898, 517, 12360, 29897, 1275, 29871, 29896, 13, 1678, 4974, 18897, 29961, 29900, 1822, 14318, 29918, 333, 1275, 525, 29874, 29915, 13, 1678, 4974, 18897, 29961, 29900, 1822, 5943, 29918, 6979, 1275, 525, 29890, 29915, 13, 13, 1678, 396, 4321, 2009, 292, 363, 1021, 3815, 11217, 5923, 1948, 13, 1678, 11187, 29918, 19807, 29889, 2457, 29918, 1767, 353, 9657, 29898, 14318, 29918, 333, 2433, 29874, 742, 9225, 3790, 29915, 7451, 29918, 5943, 29918, 6979, 2396, 525, 29883, 29915, 1800, 13, 1678, 4613, 353, 3132, 29889, 657, 11219, 4951, 728, 29918, 5150, 742, 2346, 29918, 1807, 29922, 8977, 29898, 401, 2433, 1552, 401, 8785, 13, 1678, 11187, 29918, 19807, 29889, 9294, 29918, 13998, 580, 13, 1678, 4974, 4613, 29889, 4882, 29918, 401, 1275, 29871, 29906, 29900, 29900, 13, 1678, 4974, 4613, 29889, 657, 29918, 1272, 2141, 13808, 580, 1275, 525, 6444, 4866, 20714, 13, 1678, 18897, 353, 4867, 29889, 1972, 29898, 29903, 2364, 6638, 6066, 467, 497, 580, 13, 1678, 4974, 7431, 29898, 517, 12360, 29897, 1275, 29871, 29896, 13, 1678, 4974, 18897, 29961, 29900, 1822, 14318, 29918, 333, 1275, 525, 29874, 29915, 13, 1678, 4974, 18897, 29961, 29900, 1822, 5943, 29918, 6979, 1275, 525, 29883, 29915, 13, 13, 29937, 1243, 847, 2962, 29918, 27537, 20200, 13, 29992, 5041, 877, 29879, 2364, 29889, 3609, 4032, 29889, 13496, 29918, 2490, 3728, 1495, 13, 1753, 1243, 29918, 2962, 29918, 27537, 20200, 29918, 8698, 29898, 17640, 29918, 3358, 29892, 3132, 29892, 4867, 1125, 13, 1678, 11187, 29918, 3358, 29889, 2457, 29918, 1767, 353, 9657, 29898, 12719, 2433, 29907, 29900, 29896, 29906, 2882, 29941, 6530, 742, 18696, 2433, 29896, 29906, 29941, 29946, 29945, 29953, 29955, 29947, 29929, 29900, 29889, 29896, 29906, 29941, 29946, 29945, 29953, 1495, 13, 13, 1678, 4867, 29889, 1202, 29898, 29903, 2364, 6638, 6066, 29898, 14318, 29918, 333, 2433, 29911, 29896, 29906, 29941, 29946, 29945, 742, 2130, 29918, 6979, 2433, 29916, 2251, 29874, 29899, 5943, 29899, 6979, 29899, 1807, 8785, 13, 1678, 4867, 29889, 15060, 580, 13, 1678, 4613, 353, 3132, 29889, 2490, 11219, 2962, 29918, 27537, 20200, 742, 848, 29922, 8977, 29898, 14318, 29918, 333, 2433, 29911, 29896, 29906, 29941, 29946, 29945, 742, 8242, 29918, 333, 2433, 29907, 29900, 29896, 29906, 2882, 29941, 6530, 8785, 13, 1678, 11187, 29918, 3358, 29889, 9294, 29918, 13998, 580, 13, 13, 1678, 4974, 4613, 29889, 4882, 29918, 401, 1275, 29871, 29906, 29900, 29900, 13, 1678, 7191, 353, 4867, 29889, 1972, 29898, 29934, 283, 20200, 3728, 467, 497, 580, 13, 1678, 4974, 7431, 29898, 19158, 29897, 1275, 29871, 29896, 13, 1678, 4974, 7191, 29961, 29900, 1822, 12719, 1275, 525, 29907, 29900, 29896, 29906, 2882, 29941, 6530, 29915, 13, 1678, 4974, 7191, 29961, 29900, 1822, 16394, 1275, 525, 29896, 29906, 29941, 29946, 29945, 29953, 29955, 29947, 29929, 29900, 29889, 29896, 29906, 29941, 29946, 29945, 29953, 29915, 13, 13, 29992, 5041, 877, 29879, 2364, 29889, 3609, 4032, 29889, 13496, 29918, 2490, 3728, 1495, 13, 1753, 1243, 29918, 2962, 29918, 27537, 20200, 29918, 284, 2040, 29918, 2962, 287, 29898, 17640, 29918, 3358, 29892, 3132, 29892, 4867, 1125, 13, 1678, 4867, 29889, 1202, 29898, 29903, 2364, 6638, 6066, 29898, 14318, 29918, 333, 2433, 29911, 29896, 29906, 29941, 29946, 29945, 742, 2130, 29918, 6979, 2433, 29916, 2251, 29874, 29899, 5943, 29899, 6979, 29899, 1807, 8785, 13, 1678, 4867, 29889, 1202, 29898, 29934, 283, 20200, 3728, 29898, 12719, 2433, 29907, 29900, 29896, 29906, 2882, 29941, 6530, 742, 14334, 2433, 29896, 29906, 29941, 29946, 29945, 29953, 29955, 29947, 29929, 29900, 29889, 29896, 29906, 29941, 29946, 29945, 29953, 8785, 13, 1678, 4867, 29889, 15060, 580, 13, 1678, 4613, 353, 3132, 29889, 2490, 11219, 2962, 29918, 27537, 20200, 742, 848, 29922, 8977, 29898, 14318, 29918, 333, 2433, 29911, 29896, 29906, 29941, 29946, 29945, 742, 8242, 29918, 333, 2433, 29907, 29900, 29896, 29906, 2882, 29941, 6530, 8785, 13, 1678, 11187, 29918, 3358, 29889, 9294, 29918, 1333, 29918, 13998, 580, 13, 13, 1678, 4974, 4613, 29889, 4882, 29918, 401, 1275, 29871, 29945, 29900, 29900, 13, 1678, 4974, 4613, 29889, 13662, 29889, 657, 877, 2704, 1495, 1275, 525, 8439, 338, 2307, 263, 16053, 20200, 10464, 297, 445, 8242, 20714, 13, 13, 29937, 1243, 847, 355, 29918, 27537, 20200, 13, 29992, 5041, 877, 29879, 2364, 29889, 3609, 4032, 29889, 13496, 29918, 2490, 3728, 1495, 13, 29992, 5041, 877, 29879, 2364, 29889, 3609, 4032, 29889, 535, 874, 800, 29918, 3150, 1495, 13, 29992, 5041, 877, 29879, 2364, 29889, 3609, 4032, 29889, 5638, 1953, 29918, 657, 1495, 13, 1753, 1243, 29918, 355, 29918, 27537, 20200, 29918, 8698, 29898, 17640, 29918, 5638, 1953, 29892, 11187, 29918, 535, 874, 800, 29918, 3150, 29892, 11187, 29918, 3358, 29892, 3132, 29892, 4867, 1125, 13, 1678, 11187, 29918, 5638, 1953, 29889, 2457, 29918, 1767, 353, 9657, 29898, 4906, 29922, 8977, 29898, 5638, 1953, 11759, 8977, 29898, 7193, 29922, 1839, 2882, 6530, 3788, 29638, 29954, 29950, 2033, 4638, 511, 18696, 2433, 29896, 29906, 29941, 29946, 29945, 29953, 29955, 29947, 29929, 29900, 29889, 29896, 29906, 29941, 29946, 29945, 29953, 1495, 13, 1678, 11187, 287, 29918, 12719, 29918, 333, 353, 525, 29907, 29900, 29896, 29906, 2882, 29941, 6530, 29915, 13, 1678, 11187, 287, 29918, 2972, 29918, 12719, 29918, 333, 353, 525, 29928, 29900, 29896, 29906, 2882, 29941, 6530, 29915, 13, 1678, 11187, 29918, 535, 874, 800, 29918, 3150, 29889, 2457, 29918, 1767, 353, 9657, 29898, 12719, 29922, 8977, 29898, 333, 29922, 17640, 287, 29918, 2972, 29918, 12719, 29918, 333, 876, 13, 13, 1678, 4867, 29889, 1202, 29898, 29903, 2364, 6638, 6066, 29898, 14318, 29918, 333, 2433, 29911, 29896, 29906, 29941, 29946, 29945, 742, 2130, 29918, 6979, 2433, 29916, 2251, 29874, 29899, 5943, 29899, 6979, 29899, 1807, 8785, 13, 1678, 4867, 29889, 1202, 29898, 29934, 283, 20200, 3728, 29898, 12719, 29922, 17640, 287, 29918, 12719, 29918, 333, 29892, 14334, 2433, 29896, 29906, 29941, 29946, 29945, 29953, 29955, 29947, 29929, 29900, 29889, 29896, 29906, 29941, 29946, 29945, 29953, 8785, 13, 1678, 4867, 29889, 15060, 580, 13, 13, 1678, 4613, 353, 3132, 29889, 2490, 11219, 355, 29918, 27537, 20200, 742, 848, 29922, 8977, 29898, 14318, 29918, 333, 2433, 29911, 29896, 29906, 29941, 29946, 29945, 742, 8242, 29918, 333, 29922, 17640, 287, 29918, 12719, 29918, 333, 876, 13, 1678, 11187, 29918, 3358, 29889, 9294, 29918, 13998, 29918, 10646, 29918, 2541, 29898, 12719, 29922, 17640, 287, 29918, 2972, 29918, 12719, 29918, 333, 29892, 1426, 543, 18567, 29991, 887, 599, 526, 2675, 304, 679, 365, 3322, 29991, 887, 508, 671, 445, 8242, 304, 14821, 1480, 6765, 23157, 13, 1678, 4974, 4613, 29889, 657, 29918, 1272, 580, 1275, 289, 29915, 29934, 283, 20200, 9698, 29991, 14514, 292, 2305, 363, 301, 3322, 1286, 29889, 3455, 12654, 1934, 674, 7150, 263, 2318, 27692, 411, 1009, 301, 3322, 8619, 29881, 583, 6169, 13, 13, 29992, 5041, 877, 29879, 2364, 29889, 3609, 4032, 29889, 13496, 29918, 2490, 3728, 1495, 13, 1753, 1243, 29918, 355, 29918, 27537, 20200, 29918, 1333, 29918, 2962, 287, 29898, 17640, 29918, 3358, 29892, 3132, 29892, 4867, 1125, 13, 1678, 11187, 287, 29918, 12719, 29918, 333, 353, 525, 29907, 29900, 29896, 29906, 2882, 29941, 6530, 29915, 13, 13, 1678, 4867, 29889, 1202, 29898, 29903, 2364, 6638, 6066, 29898, 14318, 29918, 333, 2433, 29911, 29896, 29906, 29941, 29946, 29945, 742, 2130, 29918, 6979, 2433, 29916, 2251, 29874, 29899, 5943, 29899, 6979, 29899, 1807, 8785, 13, 1678, 4867, 29889, 15060, 580, 13, 13, 1678, 4613, 353, 3132, 29889, 2490, 11219, 355, 29918, 27537, 20200, 742, 848, 29922, 8977, 29898, 14318, 29918, 333, 2433, 29911, 29896, 29906, 29941, 29946, 29945, 742, 8242, 29918, 333, 29922, 17640, 287, 29918, 12719, 29918, 333, 876, 13, 1678, 11187, 29918, 3358, 29889, 9294, 29918, 1333, 29918, 13998, 580, 13, 1678, 4974, 4613, 29889, 4882, 29918, 401, 1275, 29871, 29945, 29900, 29900, 13, 1678, 4974, 4613, 29889, 13662, 29889, 657, 877, 2704, 1495, 1275, 525, 3782, 16053, 20200, 4687, 29889, 3967, 847, 29212, 29918, 2962, 937, 29915, 13, 2 ]
environment_data.py
Yacine22/test_dome
0
76110
<gh_stars>0 """ Environment Data ----- """ from tkinter import * class environement_data: global date, place, projectname, object_of_interest def __init__(self): self.envi_wind = Tk() self.envi_wind.attributes('-fullscreen', True) self.envi_wind.title('environment') self.frame_exit = Frame(self.envi_wind) self.frame = Frame(self.envi_wind) keypad_frame = Frame(self.envi_wind) self.environment_list = ["Date", "Place", "Appelation", "Object Of Int"] self.button_exit = Button(self.frame_exit, text="Sortir", width=8, height=3, bg='white', fg='blue', font=('helvetica', 14, 'bold'), command=self.envi_wind.destroy) for i, data in enumerate(self.environment_list): label = Label(self.frame, text=data, width=15) label.grid(row=i, column=0, padx=10, pady=10, sticky='news') self.entries = [Entry(self.frame, width=30, bd=3, font=('helvetica', 10)) for i in range(len(self.environment_list))] self.entry_list = [] for i,e in enumerate(self.entries): e.grid(row=i, column=1, padx=5, pady=5) self.entry_list.append(e) btn_delete = Button(self.frame_exit, text='Del', bd=2, bg='white', fg='blue', font=('helvetica', 12), borderwidth=0, command=self.delete_text).grid(row=0, column=10, padx=5, pady=2, sticky='ne') btn_save = Button(self.frame_exit, text='Save', bd=2, bg='white', fg='blue', font=('helvetica', 12), borderwidth=0, command=self.save_data).grid(row=0, column=11, padx=5, pady=2, sticky='ne') cara = {1: (5, 2), 2: (5, 3), 3: (5, 4), 4: (5, 5), 5: (5, 6), 6: (5, 7), 7: (5, 8), 8: (5, 9), 9: (5, 10), 0: (5, 11), 'A':(6, 2), 'Z':(6, 3), 'E':(6, 4), 'R':(6, 5), 'T': (6, 6), 'Y':(6, 7), 'U':(6, 8), 'I':(6, 9), 'O':(6, 10), 'P':(6, 11), 'Q':(7, 2), 'S':(7, 3), 'D':(7, 4), 'F':(7, 5), 'G':(7, 6), 'H':(7, 7), 'J':(7, 8), 'K':(7, 9), 'L':(7, 10), 'M':(7, 11), 'W':(8, 2), 'X':(8, 3), 'C':(8, 4), 'V':(8, 5), 'B':(8, 6), 'N':(8, 7), ' ':(8, 8), '_':(8, 9), '-':(8, 10)} for car, grid_value in cara.items(): if grid_value[0] == 5: button = Button(keypad_frame, text=str(car), bg='white', fg='blue', font=('helvetica', 14, 'bold'), borderwidth=0, command=lambda x=car: self.set_text(x)).grid(row=grid_value[0], column=grid_value[1], padx=1, pady=2, sticky='news') if grid_value[0] == 6: button = Button(keypad_frame, text=str(car), bg='white', fg='blue', font=('helvetica', 14, 'bold'), borderwidth=0, command=lambda x=car: self.set_text(x)).grid(row=grid_value[0], column=grid_value[1], pady=2, sticky='news') if grid_value[0] == 7: button = Button(keypad_frame, text=str(car), bg='white', fg='blue', font=('helvetica', 14, 'bold'), borderwidth=0, command=lambda x=car: self.set_text(x)).grid(row=grid_value[0], column=grid_value[1], pady=2, sticky='news') if grid_value[0] == 8: button = Button(keypad_frame, text=str(car), bg='white', fg='blue', font=('helvetica', 14, 'bold'), borderwidth=0, command=lambda x=car: self.set_text(x)).grid(row=grid_value[0], column=grid_value[1], pady=2, sticky='news') self.envi_wind.rowconfigure(0, weight=1) self.envi_wind.columnconfigure(0, weight=1) self.frame_exit.grid(row=0, column=0, sticky='ne') self.frame.grid(row=0, column=0, sticky='n') keypad_frame.grid(row=0, column=0, sticky='s') self.button_exit.grid(row=0, column=0, sticky='news') def set_text(self, text): widget = self.envi_wind.focus_get() if widget in self.entries: widget.insert("insert", text) def delete_text(self): widget = self.envi_wind.focus_get() widget.delete(0, END) def save_data(self): global data data_dict = {} for s, i in enumerate(self.entry_list): widget = i data = widget.get() data_dict[s] = data data_dict[self.environment_list[s]] = data_dict.pop(s) new_wind = Toplevel() new_wind.title("info") new_wind.attributes('-fullscreen', True) new_lab = Label(new_wind, text="data Saved!").grid(row=0, column=0) btn_quit_ = Button(new_wind, text="OK", command=new_wind.destroy).grid(row=1, column=0) inside_data['WHEN'] = data_dict["Date"] inside_data['WHERE'] = data_dict["Place"] what_keys = ["Appelation", "Object Of Int"] what_subset = {key: data_dict[key] for key in what_keys} inside_data['WHAT'] = what_subset data = data_dict["Date"] place = data_dict["Place"] projectname = data_dict["Appelation"] print(inside_data) return projectname class others: def __init__(self): self.envi_wind = Tk() self.envi_wind.attributes('-fullscreen', True) self.envi_wind.title('environment') self.frame_exit = Frame(self.envi_wind) self.frame = Frame(self.envi_wind) keypad_frame = Frame(self.envi_wind) self.environment_list = ["But de Projet", "Type de Projet", "Technique", "Distance objet"] self.button_exit = Button(self.frame_exit, text="Sortir", width=8, height=3, bg='white', fg='blue', font=('helvetica', 14, 'bold'), command=self.envi_wind.destroy) for i, data in enumerate(self.environment_list): label = Label(self.frame, text=data, width=15) label.grid(row=i, column=0, padx=10, pady=10, sticky='news') self.entries = [Entry(self.frame, width=30, bd=3, font=('helvetica', 10)) for i in range(len(self.environment_list))] self.entry_list = [] for i,e in enumerate(self.entries): e.grid(row=i, column=1, padx=5, pady=5) self.entry_list.append(e) btn_delete = Button(self.frame_exit, text='Del', bd=2, bg='white', fg='blue', font=('helvetica', 12), borderwidth=0, command=self.delete_text).grid(row=0, column=10, padx=5, pady=2, sticky='ne') btn_save = Button(self.frame_exit, text='Save', bd=2, bg='white', fg='blue', font=('helvetica', 12), borderwidth=0, command=self.save_data).grid(row=0, column=11, padx=5, pady=2, sticky='ne') cara = {1: (5, 2), 2: (5, 3), 3: (5, 4), 4: (5, 5), 5: (5, 6), 6: (5, 7), 7: (5, 8), 8: (5, 9), 9: (5, 10), 0: (5, 11), 'A':(6, 2), 'Z':(6, 3), 'E':(6, 4), 'R':(6, 5), 'T': (6, 6), 'Y':(6, 7), 'U':(6, 8), 'I':(6, 9), 'O':(6, 10), 'P':(6, 11), 'Q':(7, 2), 'S':(7, 3), 'D':(7, 4), 'F':(7, 5), 'G':(7, 6), 'H':(7, 7), 'J':(7, 8), 'K':(7, 9), 'L':(7, 10), 'M':(7, 11), 'W':(8, 2), 'X':(8, 3), 'C':(8, 4), 'V':(8, 5), 'B':(8, 6), 'N':(8, 7), ' ':(8, 8), '_':(8, 9), '-':(8, 10)} for car, grid_value in cara.items(): if grid_value[0] == 5: button = Button(keypad_frame, text=str(car), bg='white', fg='blue', font=('helvetica', 14, 'bold'), borderwidth=0, command=lambda x=car: self.set_text(x)).grid(row=grid_value[0], column=grid_value[1], padx=1, pady=2, sticky='news') if grid_value[0] == 6: button = Button(keypad_frame, text=str(car), bg='white', fg='blue', font=('helvetica', 14, 'bold'), borderwidth=0, command=lambda x=car: self.set_text(x)).grid(row=grid_value[0], column=grid_value[1], pady=2, sticky='news') if grid_value[0] == 7: button = Button(keypad_frame, text=str(car), bg='white', fg='blue', font=('helvetica', 14, 'bold'), borderwidth=0, command=lambda x=car: self.set_text(x)).grid(row=grid_value[0], column=grid_value[1], pady=2, sticky='news') if grid_value[0] == 8: button = Button(keypad_frame, text=str(car), bg='white', fg='blue', font=('helvetica', 14, 'bold'), borderwidth=0, command=lambda x=car: self.set_text(x)).grid(row=grid_value[0], column=grid_value[1], pady=2, sticky='news') self.envi_wind.rowconfigure(0, weight=1) self.envi_wind.columnconfigure(0, weight=1) self.frame_exit.grid(row=0, column=0, sticky='ne') self.frame.grid(row=0, column=0, sticky='n') keypad_frame.grid(row=0, column=0, sticky='s') self.button_exit.grid(row=0, column=0, sticky='news') def set_text(self, text): widget = self.envi_wind.focus_get() if widget in self.entries: widget.insert("insert", text) def delete_text(self): widget = self.envi_wind.focus_get() widget.delete(0, END) def save_data(self): global data data_dict = {} for s, i in enumerate(self.entry_list): widget = i data = widget.get() data_dict[s] = data data_dict[self.environment_list[s]] = data_dict.pop(s) new_wind = Toplevel() new_wind.title("info") new_wind.attributes('-fullscreen', True) new_lab = Label(new_wind, text="data Saved!").grid(row=0, column=0) btn_quit_ = Button(new_wind, text="OK", command=new_wind.destroy).grid(row=1, column=0) inside_data['WHY'] = data_dict["But de Projet"] inside_data['WHY'] = data_dict["Type de Projet"] what_keys = ["Technique", "Distance objet"] what_subset = {key: data_dict[key] for key in what_keys} inside_data['HOW'] = what_subset print(inside_data)
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 15945, 29908, 13, 18649, 3630, 448, 807, 29871, 13, 15945, 29908, 13, 3166, 18883, 1639, 1053, 334, 13, 13, 13, 1990, 12471, 882, 29918, 1272, 29901, 13, 1678, 5534, 2635, 29892, 2058, 29892, 2060, 978, 29892, 1203, 29918, 974, 29918, 1639, 342, 13, 268, 13, 1678, 822, 4770, 2344, 12035, 1311, 1125, 13, 4706, 1583, 29889, 264, 1403, 29918, 14800, 353, 323, 29895, 580, 13, 4706, 1583, 29889, 264, 1403, 29918, 14800, 29889, 15697, 877, 29899, 8159, 10525, 742, 5852, 29897, 13, 4706, 1583, 29889, 264, 1403, 29918, 14800, 29889, 3257, 877, 20944, 1495, 13, 308, 13, 4706, 1583, 29889, 2557, 29918, 13322, 353, 12218, 29898, 1311, 29889, 264, 1403, 29918, 14800, 29897, 13, 4706, 1583, 29889, 2557, 353, 12218, 29898, 1311, 29889, 264, 1403, 29918, 14800, 29897, 13, 4706, 1820, 8305, 29918, 2557, 353, 12218, 29898, 1311, 29889, 264, 1403, 29918, 14800, 29897, 13, 308, 13, 4706, 1583, 29889, 20944, 29918, 1761, 353, 6796, 2539, 613, 376, 22150, 613, 376, 2052, 295, 362, 613, 376, 2061, 4587, 3159, 3108, 13, 308, 13, 4706, 1583, 29889, 3092, 29918, 13322, 353, 11025, 29898, 1311, 29889, 2557, 29918, 13322, 29892, 1426, 543, 13685, 381, 613, 2920, 29922, 29947, 29892, 3171, 29922, 29941, 29892, 25989, 2433, 10921, 742, 285, 29887, 2433, 9539, 742, 4079, 29922, 877, 3952, 5990, 983, 742, 29871, 29896, 29946, 29892, 525, 8934, 5477, 13, 462, 462, 29871, 1899, 29922, 1311, 29889, 264, 1403, 29918, 14800, 29889, 20524, 29897, 13, 308, 13, 308, 13, 4706, 363, 474, 29892, 848, 297, 26985, 29898, 1311, 29889, 20944, 29918, 1761, 1125, 13, 9651, 3858, 353, 15796, 29898, 1311, 29889, 2557, 29892, 1426, 29922, 1272, 29892, 2920, 29922, 29896, 29945, 29897, 13, 9651, 3858, 29889, 7720, 29898, 798, 29922, 29875, 29892, 1897, 29922, 29900, 29892, 17132, 29916, 29922, 29896, 29900, 29892, 282, 3714, 29922, 29896, 29900, 29892, 12070, 29891, 2433, 15753, 1495, 13, 632, 13, 632, 13, 4706, 1583, 29889, 26586, 353, 518, 9634, 29898, 1311, 29889, 2557, 29892, 2920, 29922, 29941, 29900, 29892, 289, 29881, 29922, 29941, 29892, 4079, 29922, 877, 3952, 5990, 983, 742, 29871, 29896, 29900, 876, 363, 474, 297, 3464, 29898, 2435, 29898, 1311, 29889, 20944, 29918, 1761, 28166, 13, 4706, 1583, 29889, 8269, 29918, 1761, 353, 5159, 13, 4706, 363, 474, 29892, 29872, 297, 26985, 29898, 1311, 29889, 26586, 1125, 13, 9651, 321, 29889, 7720, 29898, 798, 29922, 29875, 29892, 1897, 29922, 29896, 29892, 17132, 29916, 29922, 29945, 29892, 282, 3714, 29922, 29945, 29897, 13, 9651, 1583, 29889, 8269, 29918, 1761, 29889, 4397, 29898, 29872, 29897, 13, 632, 13, 4706, 9503, 29918, 8143, 353, 11025, 29898, 1311, 29889, 2557, 29918, 13322, 29892, 1426, 2433, 13157, 742, 289, 29881, 29922, 29906, 29892, 25989, 2433, 10921, 742, 285, 29887, 2433, 9539, 742, 4079, 29922, 877, 3952, 5990, 983, 742, 29871, 29896, 29906, 511, 13, 462, 9651, 5139, 2103, 29922, 29900, 29892, 1899, 29922, 1311, 29889, 8143, 29918, 726, 467, 7720, 29898, 798, 29922, 29900, 29892, 1897, 29922, 29896, 29900, 29892, 17132, 29916, 29922, 29945, 29892, 282, 3714, 29922, 29906, 29892, 12070, 29891, 2433, 484, 1495, 13, 308, 13, 4706, 9503, 29918, 7620, 353, 11025, 29898, 1311, 29889, 2557, 29918, 13322, 29892, 1426, 2433, 11371, 742, 289, 29881, 29922, 29906, 29892, 25989, 2433, 10921, 742, 285, 29887, 2433, 9539, 742, 4079, 29922, 877, 3952, 5990, 983, 742, 29871, 29896, 29906, 511, 13, 462, 9651, 5139, 2103, 29922, 29900, 29892, 1899, 29922, 1311, 29889, 7620, 29918, 1272, 467, 7720, 29898, 798, 29922, 29900, 29892, 1897, 29922, 29896, 29896, 29892, 17132, 29916, 29922, 29945, 29892, 282, 3714, 29922, 29906, 29892, 12070, 29891, 2433, 484, 1495, 29871, 13, 308, 13, 4706, 1559, 29874, 353, 426, 29896, 29901, 313, 29945, 29892, 29871, 29906, 511, 29871, 29906, 29901, 313, 29945, 29892, 29871, 29941, 511, 29871, 29941, 29901, 313, 29945, 29892, 29871, 29946, 511, 13, 462, 308, 29946, 29901, 313, 29945, 29892, 29871, 29945, 511, 29871, 29945, 29901, 313, 29945, 29892, 29871, 29953, 511, 29871, 29953, 29901, 313, 29945, 29892, 29871, 29955, 511, 13, 462, 308, 29955, 29901, 313, 29945, 29892, 29871, 29947, 511, 29871, 29947, 29901, 313, 29945, 29892, 29871, 29929, 511, 29871, 29929, 29901, 313, 29945, 29892, 29871, 29896, 29900, 511, 13, 462, 4706, 29900, 29901, 313, 29945, 29892, 29871, 29896, 29896, 511, 525, 29909, 2396, 29898, 29953, 29892, 29871, 29906, 511, 525, 29999, 2396, 29898, 29953, 29892, 29871, 29941, 511, 525, 29923, 2396, 29898, 29953, 29892, 29871, 29946, 511, 525, 29934, 2396, 29898, 29953, 29892, 29871, 29945, 511, 525, 29911, 2396, 313, 29953, 29892, 29871, 29953, 511, 525, 29979, 2396, 29898, 29953, 29892, 29871, 29955, 511, 525, 29965, 2396, 29898, 29953, 29892, 29871, 29947, 511, 525, 29902, 2396, 29898, 29953, 29892, 29871, 29929, 511, 13, 462, 418, 525, 29949, 2396, 29898, 29953, 29892, 29871, 29896, 29900, 511, 525, 29925, 2396, 29898, 29953, 29892, 29871, 29896, 29896, 511, 525, 29984, 2396, 29898, 29955, 29892, 29871, 29906, 511, 525, 29903, 2396, 29898, 29955, 29892, 29871, 29941, 511, 525, 29928, 2396, 29898, 29955, 29892, 29871, 29946, 511, 525, 29943, 2396, 29898, 29955, 29892, 29871, 29945, 511, 525, 29954, 2396, 29898, 29955, 29892, 29871, 29953, 511, 525, 29950, 2396, 29898, 29955, 29892, 29871, 29955, 511, 13, 462, 418, 525, 29967, 2396, 29898, 29955, 29892, 29871, 29947, 511, 525, 29968, 2396, 29898, 29955, 29892, 29871, 29929, 511, 525, 29931, 2396, 29898, 29955, 29892, 29871, 29896, 29900, 511, 525, 29924, 2396, 29898, 29955, 29892, 29871, 29896, 29896, 511, 525, 29956, 2396, 29898, 29947, 29892, 29871, 29906, 511, 525, 29990, 2396, 29898, 29947, 29892, 29871, 29941, 511, 525, 29907, 2396, 29898, 29947, 29892, 29871, 29946, 511, 525, 29963, 2396, 29898, 29947, 29892, 29871, 29945, 511, 13, 462, 418, 525, 29933, 2396, 29898, 29947, 29892, 29871, 29953, 511, 525, 29940, 2396, 29898, 29947, 29892, 29871, 29955, 511, 525, 525, 5919, 29947, 29892, 29871, 29947, 511, 22868, 2396, 29898, 29947, 29892, 29871, 29929, 511, 17411, 2396, 29898, 29947, 29892, 29871, 29896, 29900, 2915, 13, 308, 13, 308, 13, 632, 13, 4706, 363, 1559, 29892, 6856, 29918, 1767, 297, 1559, 29874, 29889, 7076, 7295, 13, 9651, 565, 6856, 29918, 1767, 29961, 29900, 29962, 1275, 29871, 29945, 29901, 13, 18884, 2826, 353, 11025, 29898, 446, 1478, 328, 29918, 2557, 29892, 1426, 29922, 710, 29898, 4287, 511, 25989, 2433, 10921, 742, 285, 29887, 2433, 9539, 742, 4079, 29922, 877, 3952, 5990, 983, 742, 29871, 29896, 29946, 29892, 525, 8934, 5477, 13, 462, 9651, 5139, 2103, 29922, 29900, 29892, 1899, 29922, 2892, 921, 29922, 4287, 29901, 1583, 29889, 842, 29918, 726, 29898, 29916, 8106, 7720, 29898, 798, 29922, 7720, 29918, 1767, 29961, 29900, 1402, 1897, 29922, 7720, 29918, 1767, 29961, 29896, 1402, 17132, 29916, 29922, 29896, 29892, 282, 3714, 29922, 29906, 29892, 12070, 29891, 2433, 15753, 1495, 13, 462, 13, 9651, 565, 6856, 29918, 1767, 29961, 29900, 29962, 1275, 29871, 29953, 29901, 13, 18884, 2826, 353, 11025, 29898, 446, 1478, 328, 29918, 2557, 29892, 1426, 29922, 710, 29898, 4287, 511, 25989, 2433, 10921, 742, 285, 29887, 2433, 9539, 742, 4079, 29922, 877, 3952, 5990, 983, 742, 29871, 29896, 29946, 29892, 525, 8934, 5477, 13, 462, 9651, 5139, 2103, 29922, 29900, 29892, 1899, 29922, 2892, 921, 29922, 4287, 29901, 1583, 29889, 842, 29918, 726, 29898, 29916, 8106, 7720, 29898, 798, 29922, 7720, 29918, 1767, 29961, 29900, 1402, 1897, 29922, 7720, 29918, 1767, 29961, 29896, 1402, 282, 3714, 29922, 29906, 29892, 12070, 29891, 2433, 15753, 1495, 13, 462, 13, 9651, 565, 6856, 29918, 1767, 29961, 29900, 29962, 1275, 29871, 29955, 29901, 13, 18884, 2826, 353, 11025, 29898, 446, 1478, 328, 29918, 2557, 29892, 1426, 29922, 710, 29898, 4287, 511, 25989, 2433, 10921, 742, 285, 29887, 2433, 9539, 742, 4079, 29922, 877, 3952, 5990, 983, 742, 29871, 29896, 29946, 29892, 525, 8934, 5477, 13, 462, 9651, 5139, 2103, 29922, 29900, 29892, 1899, 29922, 2892, 921, 29922, 4287, 29901, 1583, 29889, 842, 29918, 726, 29898, 29916, 8106, 7720, 29898, 798, 29922, 7720, 29918, 1767, 29961, 29900, 1402, 1897, 29922, 7720, 29918, 1767, 29961, 29896, 1402, 282, 3714, 29922, 29906, 29892, 12070, 29891, 2433, 15753, 1495, 13, 462, 13, 9651, 565, 6856, 29918, 1767, 29961, 29900, 29962, 1275, 29871, 29947, 29901, 13, 18884, 2826, 353, 11025, 29898, 446, 1478, 328, 29918, 2557, 29892, 1426, 29922, 710, 29898, 4287, 511, 25989, 2433, 10921, 742, 285, 29887, 2433, 9539, 742, 4079, 29922, 877, 3952, 5990, 983, 742, 29871, 29896, 29946, 29892, 525, 8934, 5477, 13, 462, 9651, 5139, 2103, 29922, 29900, 29892, 1899, 29922, 2892, 921, 29922, 4287, 29901, 1583, 29889, 842, 29918, 726, 29898, 29916, 8106, 7720, 29898, 798, 29922, 7720, 29918, 1767, 29961, 29900, 1402, 1897, 29922, 7720, 29918, 1767, 29961, 29896, 1402, 282, 3714, 29922, 29906, 29892, 12070, 29891, 2433, 15753, 1495, 13, 462, 13, 308, 13, 308, 13, 308, 13, 4706, 1583, 29889, 264, 1403, 29918, 14800, 29889, 798, 17591, 29898, 29900, 29892, 7688, 29922, 29896, 29897, 13, 4706, 1583, 29889, 264, 1403, 29918, 14800, 29889, 4914, 17591, 29898, 29900, 29892, 7688, 29922, 29896, 29897, 13, 308, 13, 4706, 1583, 29889, 2557, 29918, 13322, 29889, 7720, 29898, 798, 29922, 29900, 29892, 1897, 29922, 29900, 29892, 12070, 29891, 2433, 484, 1495, 13, 4706, 1583, 29889, 2557, 29889, 7720, 29898, 798, 29922, 29900, 29892, 1897, 29922, 29900, 29892, 12070, 29891, 2433, 29876, 1495, 13, 4706, 1820, 8305, 29918, 2557, 29889, 7720, 29898, 798, 29922, 29900, 29892, 1897, 29922, 29900, 29892, 12070, 29891, 2433, 29879, 1495, 13, 308, 13, 308, 13, 4706, 1583, 29889, 3092, 29918, 13322, 29889, 7720, 29898, 798, 29922, 29900, 29892, 1897, 29922, 29900, 29892, 12070, 29891, 2433, 15753, 1495, 13, 308, 13, 308, 13, 308, 13, 308, 13, 1678, 822, 731, 29918, 726, 29898, 1311, 29892, 1426, 1125, 13, 4706, 11109, 353, 1583, 29889, 264, 1403, 29918, 14800, 29889, 18037, 29918, 657, 580, 13, 4706, 565, 11109, 297, 1583, 29889, 26586, 29901, 13, 9651, 11109, 29889, 7851, 703, 7851, 613, 1426, 29897, 13, 632, 13, 1678, 822, 5217, 29918, 726, 29898, 1311, 1125, 13, 4706, 11109, 353, 1583, 29889, 264, 1403, 29918, 14800, 29889, 18037, 29918, 657, 580, 13, 4706, 11109, 29889, 8143, 29898, 29900, 29892, 11056, 29897, 13, 268, 13, 268, 13, 1678, 822, 4078, 29918, 1272, 29898, 1311, 1125, 13, 4706, 5534, 848, 13, 4706, 848, 29918, 8977, 353, 6571, 13, 4706, 363, 269, 29892, 474, 297, 26985, 29898, 1311, 29889, 8269, 29918, 1761, 1125, 13, 9651, 11109, 353, 474, 13, 9651, 848, 353, 11109, 29889, 657, 580, 13, 9651, 848, 29918, 8977, 29961, 29879, 29962, 353, 848, 13, 9651, 848, 29918, 8977, 29961, 1311, 29889, 20944, 29918, 1761, 29961, 29879, 5262, 353, 848, 29918, 8977, 29889, 7323, 29898, 29879, 29897, 13, 4706, 716, 29918, 14800, 353, 323, 1991, 955, 580, 13, 4706, 716, 29918, 14800, 29889, 3257, 703, 3888, 1159, 13, 4706, 716, 29918, 14800, 29889, 15697, 877, 29899, 8159, 10525, 742, 5852, 29897, 13, 4706, 716, 29918, 8205, 353, 15796, 29898, 1482, 29918, 14800, 29892, 1426, 543, 1272, 9583, 287, 29991, 2564, 7720, 29898, 798, 29922, 29900, 29892, 1897, 29922, 29900, 29897, 13, 4706, 9503, 29918, 28358, 29918, 353, 11025, 29898, 1482, 29918, 14800, 29892, 1426, 543, 8949, 613, 1899, 29922, 1482, 29918, 14800, 29889, 20524, 467, 7720, 29898, 798, 29922, 29896, 29892, 1897, 29922, 29900, 29897, 13, 308, 13, 4706, 2768, 29918, 1272, 1839, 25039, 1430, 2033, 353, 848, 29918, 8977, 3366, 2539, 3108, 13, 4706, 2768, 29918, 1272, 1839, 22043, 2033, 353, 848, 29918, 8977, 3366, 22150, 3108, 13, 4706, 825, 29918, 8149, 353, 6796, 2052, 295, 362, 613, 376, 2061, 4587, 3159, 3108, 13, 4706, 825, 29918, 6484, 353, 426, 1989, 29901, 848, 29918, 8977, 29961, 1989, 29962, 363, 1820, 297, 825, 29918, 8149, 29913, 13, 4706, 2768, 29918, 1272, 1839, 25039, 1299, 2033, 353, 825, 29918, 6484, 13, 308, 13, 4706, 848, 353, 848, 29918, 8977, 3366, 2539, 3108, 13, 4706, 2058, 353, 848, 29918, 8977, 3366, 22150, 3108, 13, 4706, 2060, 978, 353, 848, 29918, 8977, 3366, 2052, 295, 362, 3108, 13, 4706, 1596, 29898, 26102, 29918, 1272, 29897, 13, 308, 13, 4706, 736, 2060, 978, 13, 308, 13, 13, 1990, 4045, 29901, 13, 268, 13, 1678, 822, 4770, 2344, 12035, 1311, 1125, 13, 4706, 1583, 29889, 264, 1403, 29918, 14800, 353, 323, 29895, 580, 13, 4706, 1583, 29889, 264, 1403, 29918, 14800, 29889, 15697, 877, 29899, 8159, 10525, 742, 5852, 29897, 13, 4706, 1583, 29889, 264, 1403, 29918, 14800, 29889, 3257, 877, 20944, 1495, 13, 308, 13, 4706, 1583, 29889, 2557, 29918, 13322, 353, 12218, 29898, 1311, 29889, 264, 1403, 29918, 14800, 29897, 13, 4706, 1583, 29889, 2557, 353, 12218, 29898, 1311, 29889, 264, 1403, 29918, 14800, 29897, 13, 4706, 1820, 8305, 29918, 2557, 353, 12218, 29898, 1311, 29889, 264, 1403, 29918, 14800, 29897, 13, 308, 13, 4706, 1583, 29889, 20944, 29918, 1761, 353, 6796, 6246, 316, 1019, 4026, 613, 376, 1542, 316, 1019, 4026, 613, 376, 29911, 5309, 1240, 802, 613, 376, 27469, 13413, 3108, 13, 308, 13, 4706, 1583, 29889, 3092, 29918, 13322, 353, 11025, 29898, 1311, 29889, 2557, 29918, 13322, 29892, 1426, 543, 13685, 381, 613, 2920, 29922, 29947, 29892, 3171, 29922, 29941, 29892, 25989, 2433, 10921, 742, 285, 29887, 2433, 9539, 742, 4079, 29922, 877, 3952, 5990, 983, 742, 29871, 29896, 29946, 29892, 525, 8934, 5477, 13, 462, 462, 29871, 1899, 29922, 1311, 29889, 264, 1403, 29918, 14800, 29889, 20524, 29897, 13, 308, 13, 308, 13, 4706, 363, 474, 29892, 848, 297, 26985, 29898, 1311, 29889, 20944, 29918, 1761, 1125, 13, 9651, 3858, 353, 15796, 29898, 1311, 29889, 2557, 29892, 1426, 29922, 1272, 29892, 2920, 29922, 29896, 29945, 29897, 13, 9651, 3858, 29889, 7720, 29898, 798, 29922, 29875, 29892, 1897, 29922, 29900, 29892, 17132, 29916, 29922, 29896, 29900, 29892, 282, 3714, 29922, 29896, 29900, 29892, 12070, 29891, 2433, 15753, 1495, 13, 632, 13, 632, 13, 4706, 1583, 29889, 26586, 353, 518, 9634, 29898, 1311, 29889, 2557, 29892, 2920, 29922, 29941, 29900, 29892, 289, 29881, 29922, 29941, 29892, 4079, 29922, 877, 3952, 5990, 983, 742, 29871, 29896, 29900, 876, 363, 474, 297, 3464, 29898, 2435, 29898, 1311, 29889, 20944, 29918, 1761, 28166, 13, 4706, 1583, 29889, 8269, 29918, 1761, 353, 5159, 13, 4706, 363, 474, 29892, 29872, 297, 26985, 29898, 1311, 29889, 26586, 1125, 13, 9651, 321, 29889, 7720, 29898, 798, 29922, 29875, 29892, 1897, 29922, 29896, 29892, 17132, 29916, 29922, 29945, 29892, 282, 3714, 29922, 29945, 29897, 13, 9651, 1583, 29889, 8269, 29918, 1761, 29889, 4397, 29898, 29872, 29897, 13, 632, 13, 4706, 9503, 29918, 8143, 353, 11025, 29898, 1311, 29889, 2557, 29918, 13322, 29892, 1426, 2433, 13157, 742, 289, 29881, 29922, 29906, 29892, 25989, 2433, 10921, 742, 285, 29887, 2433, 9539, 742, 4079, 29922, 877, 3952, 5990, 983, 742, 29871, 29896, 29906, 511, 13, 462, 9651, 5139, 2103, 29922, 29900, 29892, 1899, 29922, 1311, 29889, 8143, 29918, 726, 467, 7720, 29898, 798, 29922, 29900, 29892, 1897, 29922, 29896, 29900, 29892, 17132, 29916, 29922, 29945, 29892, 282, 3714, 29922, 29906, 29892, 12070, 29891, 2433, 484, 1495, 13, 308, 13, 4706, 9503, 29918, 7620, 353, 11025, 29898, 1311, 29889, 2557, 29918, 13322, 29892, 1426, 2433, 11371, 742, 289, 29881, 29922, 29906, 29892, 25989, 2433, 10921, 742, 285, 29887, 2433, 9539, 742, 4079, 29922, 877, 3952, 5990, 983, 742, 29871, 29896, 29906, 511, 13, 462, 9651, 5139, 2103, 29922, 29900, 29892, 1899, 29922, 1311, 29889, 7620, 29918, 1272, 467, 7720, 29898, 798, 29922, 29900, 29892, 1897, 29922, 29896, 29896, 29892, 17132, 29916, 29922, 29945, 29892, 282, 3714, 29922, 29906, 29892, 12070, 29891, 2433, 484, 1495, 29871, 13, 308, 13, 4706, 1559, 29874, 353, 426, 29896, 29901, 313, 29945, 29892, 29871, 29906, 511, 29871, 29906, 29901, 313, 29945, 29892, 29871, 29941, 511, 29871, 29941, 29901, 313, 29945, 29892, 29871, 29946, 511, 13, 462, 308, 29946, 29901, 313, 29945, 29892, 29871, 29945, 511, 29871, 29945, 29901, 313, 29945, 29892, 29871, 29953, 511, 29871, 29953, 29901, 313, 29945, 29892, 29871, 29955, 511, 13, 462, 308, 29955, 29901, 313, 29945, 29892, 29871, 29947, 511, 29871, 29947, 29901, 313, 29945, 29892, 29871, 29929, 511, 29871, 29929, 29901, 313, 29945, 29892, 29871, 29896, 29900, 511, 13, 462, 4706, 29900, 29901, 313, 29945, 29892, 29871, 29896, 29896, 511, 525, 29909, 2396, 29898, 29953, 29892, 29871, 29906, 511, 525, 29999, 2396, 29898, 29953, 29892, 29871, 29941, 511, 525, 29923, 2396, 29898, 29953, 29892, 29871, 29946, 511, 525, 29934, 2396, 29898, 29953, 29892, 29871, 29945, 511, 525, 29911, 2396, 313, 29953, 29892, 29871, 29953, 511, 525, 29979, 2396, 29898, 29953, 29892, 29871, 29955, 511, 525, 29965, 2396, 29898, 29953, 29892, 29871, 29947, 511, 525, 29902, 2396, 29898, 29953, 29892, 29871, 29929, 511, 13, 462, 418, 525, 29949, 2396, 29898, 29953, 29892, 29871, 29896, 29900, 511, 525, 29925, 2396, 29898, 29953, 29892, 29871, 29896, 29896, 511, 525, 29984, 2396, 29898, 29955, 29892, 29871, 29906, 511, 525, 29903, 2396, 29898, 29955, 29892, 29871, 29941, 511, 525, 29928, 2396, 29898, 29955, 29892, 29871, 29946, 511, 525, 29943, 2396, 29898, 29955, 29892, 29871, 29945, 511, 525, 29954, 2396, 29898, 29955, 29892, 29871, 29953, 511, 525, 29950, 2396, 29898, 29955, 29892, 29871, 29955, 511, 13, 462, 418, 525, 29967, 2396, 29898, 29955, 29892, 29871, 29947, 511, 525, 29968, 2396, 29898, 29955, 29892, 29871, 29929, 511, 525, 29931, 2396, 29898, 29955, 29892, 29871, 29896, 29900, 511, 525, 29924, 2396, 29898, 29955, 29892, 29871, 29896, 29896, 511, 525, 29956, 2396, 29898, 29947, 29892, 29871, 29906, 511, 525, 29990, 2396, 29898, 29947, 29892, 29871, 29941, 511, 525, 29907, 2396, 29898, 29947, 29892, 29871, 29946, 511, 525, 29963, 2396, 29898, 29947, 29892, 29871, 29945, 511, 13, 462, 418, 525, 29933, 2396, 29898, 29947, 29892, 29871, 29953, 511, 525, 29940, 2396, 29898, 29947, 29892, 29871, 29955, 511, 525, 525, 5919, 29947, 29892, 29871, 29947, 511, 22868, 2396, 29898, 29947, 29892, 29871, 29929, 511, 17411, 2396, 29898, 29947, 29892, 29871, 29896, 29900, 2915, 13, 308, 13, 308, 13, 632, 13, 4706, 363, 1559, 29892, 6856, 29918, 1767, 297, 1559, 29874, 29889, 7076, 7295, 13, 9651, 565, 6856, 29918, 1767, 29961, 29900, 29962, 1275, 29871, 29945, 29901, 13, 18884, 2826, 353, 11025, 29898, 446, 1478, 328, 29918, 2557, 29892, 1426, 29922, 710, 29898, 4287, 511, 25989, 2433, 10921, 742, 285, 29887, 2433, 9539, 742, 4079, 29922, 877, 3952, 5990, 983, 742, 29871, 29896, 29946, 29892, 525, 8934, 5477, 13, 462, 9651, 5139, 2103, 29922, 29900, 29892, 1899, 29922, 2892, 921, 29922, 4287, 29901, 1583, 29889, 842, 29918, 726, 29898, 29916, 8106, 7720, 29898, 798, 29922, 7720, 29918, 1767, 29961, 29900, 1402, 1897, 29922, 7720, 29918, 1767, 29961, 29896, 1402, 17132, 29916, 29922, 29896, 29892, 282, 3714, 29922, 29906, 29892, 12070, 29891, 2433, 15753, 1495, 13, 462, 13, 9651, 565, 6856, 29918, 1767, 29961, 29900, 29962, 1275, 29871, 29953, 29901, 13, 18884, 2826, 353, 11025, 29898, 446, 1478, 328, 29918, 2557, 29892, 1426, 29922, 710, 29898, 4287, 511, 25989, 2433, 10921, 742, 285, 29887, 2433, 9539, 742, 4079, 29922, 877, 3952, 5990, 983, 742, 29871, 29896, 29946, 29892, 525, 8934, 5477, 13, 462, 9651, 5139, 2103, 29922, 29900, 29892, 1899, 29922, 2892, 921, 29922, 4287, 29901, 1583, 29889, 842, 29918, 726, 29898, 29916, 8106, 7720, 29898, 798, 29922, 7720, 29918, 1767, 29961, 29900, 1402, 1897, 29922, 7720, 29918, 1767, 29961, 29896, 1402, 282, 3714, 29922, 29906, 29892, 12070, 29891, 2433, 15753, 1495, 13, 462, 13, 9651, 565, 6856, 29918, 1767, 29961, 29900, 29962, 1275, 29871, 29955, 29901, 13, 18884, 2826, 353, 11025, 29898, 446, 1478, 328, 29918, 2557, 29892, 1426, 29922, 710, 29898, 4287, 511, 25989, 2433, 10921, 742, 285, 29887, 2433, 9539, 742, 4079, 29922, 877, 3952, 5990, 983, 742, 29871, 29896, 29946, 29892, 525, 8934, 5477, 13, 462, 9651, 5139, 2103, 29922, 29900, 29892, 1899, 29922, 2892, 921, 29922, 4287, 29901, 1583, 29889, 842, 29918, 726, 29898, 29916, 8106, 7720, 29898, 798, 29922, 7720, 29918, 1767, 29961, 29900, 1402, 1897, 29922, 7720, 29918, 1767, 29961, 29896, 1402, 282, 3714, 29922, 29906, 29892, 12070, 29891, 2433, 15753, 1495, 13, 462, 13, 9651, 565, 6856, 29918, 1767, 29961, 29900, 29962, 1275, 29871, 29947, 29901, 13, 18884, 2826, 353, 11025, 29898, 446, 1478, 328, 29918, 2557, 29892, 1426, 29922, 710, 29898, 4287, 511, 25989, 2433, 10921, 742, 285, 29887, 2433, 9539, 742, 4079, 29922, 877, 3952, 5990, 983, 742, 29871, 29896, 29946, 29892, 525, 8934, 5477, 13, 462, 9651, 5139, 2103, 29922, 29900, 29892, 1899, 29922, 2892, 921, 29922, 4287, 29901, 1583, 29889, 842, 29918, 726, 29898, 29916, 8106, 7720, 29898, 798, 29922, 7720, 29918, 1767, 29961, 29900, 1402, 1897, 29922, 7720, 29918, 1767, 29961, 29896, 1402, 282, 3714, 29922, 29906, 29892, 12070, 29891, 2433, 15753, 1495, 13, 462, 13, 308, 13, 308, 13, 308, 13, 4706, 1583, 29889, 264, 1403, 29918, 14800, 29889, 798, 17591, 29898, 29900, 29892, 7688, 29922, 29896, 29897, 13, 4706, 1583, 29889, 264, 1403, 29918, 14800, 29889, 4914, 17591, 29898, 29900, 29892, 7688, 29922, 29896, 29897, 13, 308, 13, 4706, 1583, 29889, 2557, 29918, 13322, 29889, 7720, 29898, 798, 29922, 29900, 29892, 1897, 29922, 29900, 29892, 12070, 29891, 2433, 484, 1495, 13, 4706, 1583, 29889, 2557, 29889, 7720, 29898, 798, 29922, 29900, 29892, 1897, 29922, 29900, 29892, 12070, 29891, 2433, 29876, 1495, 13, 4706, 1820, 8305, 29918, 2557, 29889, 7720, 29898, 798, 29922, 29900, 29892, 1897, 29922, 29900, 29892, 12070, 29891, 2433, 29879, 1495, 13, 308, 13, 308, 13, 4706, 1583, 29889, 3092, 29918, 13322, 29889, 7720, 29898, 798, 29922, 29900, 29892, 1897, 29922, 29900, 29892, 12070, 29891, 2433, 15753, 1495, 13, 308, 13, 308, 13, 1678, 822, 731, 29918, 726, 29898, 1311, 29892, 1426, 1125, 13, 4706, 11109, 353, 1583, 29889, 264, 1403, 29918, 14800, 29889, 18037, 29918, 657, 580, 13, 4706, 565, 11109, 297, 1583, 29889, 26586, 29901, 13, 9651, 11109, 29889, 7851, 703, 7851, 613, 1426, 29897, 13, 632, 13, 1678, 822, 5217, 29918, 726, 29898, 1311, 1125, 13, 4706, 11109, 353, 1583, 29889, 264, 1403, 29918, 14800, 29889, 18037, 29918, 657, 580, 13, 4706, 11109, 29889, 8143, 29898, 29900, 29892, 11056, 29897, 13, 268, 13, 268, 13, 1678, 822, 4078, 29918, 1272, 29898, 1311, 1125, 13, 4706, 5534, 848, 13, 4706, 848, 29918, 8977, 353, 6571, 13, 4706, 363, 269, 29892, 474, 297, 26985, 29898, 1311, 29889, 8269, 29918, 1761, 1125, 13, 9651, 11109, 353, 474, 13, 9651, 848, 353, 11109, 29889, 657, 580, 13, 9651, 848, 29918, 8977, 29961, 29879, 29962, 353, 848, 13, 9651, 848, 29918, 8977, 29961, 1311, 29889, 20944, 29918, 1761, 29961, 29879, 5262, 353, 848, 29918, 8977, 29889, 7323, 29898, 29879, 29897, 13, 4706, 716, 29918, 14800, 353, 323, 1991, 955, 580, 13, 4706, 716, 29918, 14800, 29889, 3257, 703, 3888, 1159, 13, 4706, 716, 29918, 14800, 29889, 15697, 877, 29899, 8159, 10525, 742, 5852, 29897, 13, 4706, 716, 29918, 8205, 353, 15796, 29898, 1482, 29918, 14800, 29892, 1426, 543, 1272, 9583, 287, 29991, 2564, 7720, 29898, 798, 29922, 29900, 29892, 1897, 29922, 29900, 29897, 13, 4706, 9503, 29918, 28358, 29918, 353, 11025, 29898, 1482, 29918, 14800, 29892, 1426, 543, 8949, 613, 1899, 29922, 1482, 29918, 14800, 29889, 20524, 467, 7720, 29898, 798, 29922, 29896, 29892, 1897, 29922, 29900, 29897, 13, 308, 13, 4706, 2768, 29918, 1272, 1839, 25039, 29979, 2033, 353, 848, 29918, 8977, 3366, 6246, 316, 1019, 4026, 3108, 13, 4706, 2768, 29918, 1272, 1839, 25039, 29979, 2033, 353, 848, 29918, 8977, 3366, 1542, 316, 1019, 4026, 3108, 13, 4706, 825, 29918, 8149, 353, 6796, 29911, 5309, 1240, 802, 613, 376, 27469, 13413, 3108, 13, 4706, 825, 29918, 6484, 353, 426, 1989, 29901, 848, 29918, 8977, 29961, 1989, 29962, 363, 1820, 297, 825, 29918, 8149, 29913, 13, 4706, 2768, 29918, 1272, 1839, 8187, 29956, 2033, 353, 825, 29918, 6484, 13, 308, 13, 4706, 1596, 29898, 26102, 29918, 1272, 29897, 13, 308, 13, 965, 13, 2 ]
venv/lib/python3.6/site-packages/tensorflow/python/framework/cpp_shape_inference_pb2.py
yuxuan1995liu/darkflowyolo_detection
6
194726
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: tensorflow/python/framework/cpp_shape_inference.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() from tensorflow.core.framework import types_pb2 as tensorflow_dot_core_dot_framework_dot_types__pb2 from tensorflow.core.framework import tensor_shape_pb2 as tensorflow_dot_core_dot_framework_dot_tensor__shape__pb2 DESCRIPTOR = _descriptor.FileDescriptor( name='tensorflow/python/framework/cpp_shape_inference.proto', package='tensorflow', syntax='proto3', serialized_options=_b('\370\001\001'), serialized_pb=_b('\n5tensorflow/python/framework/cpp_shape_inference.proto\x12\ntensorflow\x1a%tensorflow/core/framework/types.proto\x1a,tensorflow/core/framework/tensor_shape.proto\"\xed\x02\n\x17\x43ppShapeInferenceResult\x12+\n\x05shape\x18\x01 \x01(\x0b\x32\x1c.tensorflow.TensorShapeProto\x12\x43\n\x0bhandle_data\x18\x04 \x01(\x0b\x32..tensorflow.CppShapeInferenceResult.HandleData\x1a\x66\n\x12HandleShapeAndType\x12+\n\x05shape\x18\x01 \x01(\x0b\x32\x1c.tensorflow.TensorShapeProto\x12#\n\x05\x64type\x18\x02 \x01(\x0e\x32\x14.tensorflow.DataType\x1al\n\nHandleData\x12\x0e\n\x06is_set\x18\x01 \x01(\x08\x12N\n\x0eshape_and_type\x18\x02 \x03(\x0b\x32\x36.tensorflow.CppShapeInferenceResult.HandleShapeAndTypeJ\x04\x08\x02\x10\x03J\x04\x08\x03\x10\x04\"e\n\x1d\x43ppShapeInferenceInputsNeeded\x12\x1c\n\x14input_tensors_needed\x18\x01 \x03(\x05\x12&\n\x1einput_tensors_as_shapes_needed\x18\x02 \x03(\x05\x42\x03\xf8\x01\x01\x62\x06proto3') , dependencies=[tensorflow_dot_core_dot_framework_dot_types__pb2.DESCRIPTOR,tensorflow_dot_core_dot_framework_dot_tensor__shape__pb2.DESCRIPTOR,]) _CPPSHAPEINFERENCERESULT_HANDLESHAPEANDTYPE = _descriptor.Descriptor( name='HandleShapeAndType', full_name='tensorflow.CppShapeInferenceResult.HandleShapeAndType', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='shape', full_name='tensorflow.CppShapeInferenceResult.HandleShapeAndType.shape', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='dtype', full_name='tensorflow.CppShapeInferenceResult.HandleShapeAndType.dtype', index=1, number=2, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=296, serialized_end=398, ) _CPPSHAPEINFERENCERESULT_HANDLEDATA = _descriptor.Descriptor( name='HandleData', full_name='tensorflow.CppShapeInferenceResult.HandleData', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='is_set', full_name='tensorflow.CppShapeInferenceResult.HandleData.is_set', index=0, number=1, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='shape_and_type', full_name='tensorflow.CppShapeInferenceResult.HandleData.shape_and_type', index=1, number=2, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=400, serialized_end=508, ) _CPPSHAPEINFERENCERESULT = _descriptor.Descriptor( name='CppShapeInferenceResult', full_name='tensorflow.CppShapeInferenceResult', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='shape', full_name='tensorflow.CppShapeInferenceResult.shape', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='handle_data', full_name='tensorflow.CppShapeInferenceResult.handle_data', index=1, number=4, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[_CPPSHAPEINFERENCERESULT_HANDLESHAPEANDTYPE, _CPPSHAPEINFERENCERESULT_HANDLEDATA, ], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=155, serialized_end=520, ) _CPPSHAPEINFERENCEINPUTSNEEDED = _descriptor.Descriptor( name='CppShapeInferenceInputsNeeded', full_name='tensorflow.CppShapeInferenceInputsNeeded', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='input_tensors_needed', full_name='tensorflow.CppShapeInferenceInputsNeeded.input_tensors_needed', index=0, number=1, type=5, cpp_type=1, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='input_tensors_as_shapes_needed', full_name='tensorflow.CppShapeInferenceInputsNeeded.input_tensors_as_shapes_needed', index=1, number=2, type=5, cpp_type=1, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=522, serialized_end=623, ) _CPPSHAPEINFERENCERESULT_HANDLESHAPEANDTYPE.fields_by_name['shape'].message_type = tensorflow_dot_core_dot_framework_dot_tensor__shape__pb2._TENSORSHAPEPROTO _CPPSHAPEINFERENCERESULT_HANDLESHAPEANDTYPE.fields_by_name['dtype'].enum_type = tensorflow_dot_core_dot_framework_dot_types__pb2._DATATYPE _CPPSHAPEINFERENCERESULT_HANDLESHAPEANDTYPE.containing_type = _CPPSHAPEINFERENCERESULT _CPPSHAPEINFERENCERESULT_HANDLEDATA.fields_by_name['shape_and_type'].message_type = _CPPSHAPEINFERENCERESULT_HANDLESHAPEANDTYPE _CPPSHAPEINFERENCERESULT_HANDLEDATA.containing_type = _CPPSHAPEINFERENCERESULT _CPPSHAPEINFERENCERESULT.fields_by_name['shape'].message_type = tensorflow_dot_core_dot_framework_dot_tensor__shape__pb2._TENSORSHAPEPROTO _CPPSHAPEINFERENCERESULT.fields_by_name['handle_data'].message_type = _CPPSHAPEINFERENCERESULT_HANDLEDATA DESCRIPTOR.message_types_by_name['CppShapeInferenceResult'] = _CPPSHAPEINFERENCERESULT DESCRIPTOR.message_types_by_name['CppShapeInferenceInputsNeeded'] = _CPPSHAPEINFERENCEINPUTSNEEDED _sym_db.RegisterFileDescriptor(DESCRIPTOR) CppShapeInferenceResult = _reflection.GeneratedProtocolMessageType('CppShapeInferenceResult', (_message.Message,), dict( HandleShapeAndType = _reflection.GeneratedProtocolMessageType('HandleShapeAndType', (_message.Message,), dict( DESCRIPTOR = _CPPSHAPEINFERENCERESULT_HANDLESHAPEANDTYPE, __module__ = 'tensorflow.python.framework.cpp_shape_inference_pb2' # @@protoc_insertion_point(class_scope:tensorflow.CppShapeInferenceResult.HandleShapeAndType) )) , HandleData = _reflection.GeneratedProtocolMessageType('HandleData', (_message.Message,), dict( DESCRIPTOR = _CPPSHAPEINFERENCERESULT_HANDLEDATA, __module__ = 'tensorflow.python.framework.cpp_shape_inference_pb2' # @@protoc_insertion_point(class_scope:tensorflow.CppShapeInferenceResult.HandleData) )) , DESCRIPTOR = _CPPSHAPEINFERENCERESULT, __module__ = 'tensorflow.python.framework.cpp_shape_inference_pb2' # @@protoc_insertion_point(class_scope:tensorflow.CppShapeInferenceResult) )) _sym_db.RegisterMessage(CppShapeInferenceResult) _sym_db.RegisterMessage(CppShapeInferenceResult.HandleShapeAndType) _sym_db.RegisterMessage(CppShapeInferenceResult.HandleData) CppShapeInferenceInputsNeeded = _reflection.GeneratedProtocolMessageType('CppShapeInferenceInputsNeeded', (_message.Message,), dict( DESCRIPTOR = _CPPSHAPEINFERENCEINPUTSNEEDED, __module__ = 'tensorflow.python.framework.cpp_shape_inference_pb2' # @@protoc_insertion_point(class_scope:tensorflow.CppShapeInferenceInputsNeeded) )) _sym_db.RegisterMessage(CppShapeInferenceInputsNeeded) DESCRIPTOR._options = None # @@protoc_insertion_point(module_scope)
[ 1, 396, 3251, 630, 491, 278, 9608, 6835, 6516, 29889, 29871, 11662, 6058, 11488, 29991, 13, 29937, 2752, 29901, 26110, 29914, 4691, 29914, 4468, 29914, 8223, 29918, 12181, 29918, 262, 1659, 29889, 17529, 13, 13, 5215, 10876, 13, 29918, 29890, 29922, 9675, 29889, 3259, 29918, 3888, 29961, 29900, 29962, 29966, 29941, 322, 313, 2892, 921, 29901, 29916, 29897, 470, 313, 2892, 921, 29901, 29916, 29889, 12508, 877, 5066, 262, 29896, 8785, 13, 3166, 5386, 29889, 17529, 9721, 1053, 553, 11709, 408, 903, 2783, 11709, 13, 3166, 5386, 29889, 17529, 9721, 1053, 2643, 408, 903, 4906, 13, 3166, 5386, 29889, 17529, 9721, 1053, 17842, 408, 903, 999, 1464, 13, 3166, 5386, 29889, 17529, 9721, 1053, 5829, 29918, 9803, 408, 903, 18098, 29918, 9803, 13, 29937, 732, 29992, 17529, 29883, 29918, 7851, 291, 29918, 3149, 29898, 326, 4011, 29897, 13, 13, 29918, 11967, 29918, 2585, 353, 903, 18098, 29918, 9803, 29889, 4592, 580, 13, 13, 13, 3166, 26110, 29889, 3221, 29889, 4468, 1053, 4072, 29918, 24381, 29906, 408, 26110, 29918, 6333, 29918, 3221, 29918, 6333, 29918, 4468, 29918, 6333, 29918, 8768, 1649, 24381, 29906, 13, 3166, 26110, 29889, 3221, 29889, 4468, 1053, 12489, 29918, 12181, 29918, 24381, 29906, 408, 26110, 29918, 6333, 29918, 3221, 29918, 6333, 29918, 4468, 29918, 6333, 29918, 20158, 1649, 12181, 1649, 24381, 29906, 13, 13, 13, 2287, 7187, 24290, 1955, 353, 903, 2783, 11709, 29889, 2283, 19124, 29898, 13, 29871, 1024, 2433, 29056, 29914, 4691, 29914, 4468, 29914, 8223, 29918, 12181, 29918, 262, 1659, 29889, 17529, 742, 13, 29871, 3577, 2433, 29056, 742, 13, 29871, 5877, 2433, 17529, 29941, 742, 13, 29871, 7797, 1891, 29918, 6768, 29922, 29918, 29890, 28909, 29941, 29955, 29900, 29905, 29900, 29900, 29896, 29905, 29900, 29900, 29896, 5477, 13, 29871, 7797, 1891, 29918, 24381, 29922, 29918, 29890, 28909, 29876, 29945, 29056, 29914, 4691, 29914, 4468, 29914, 8223, 29918, 12181, 29918, 262, 1659, 29889, 17529, 29905, 29916, 29896, 29906, 29905, 593, 6073, 1731, 29905, 29916, 29896, 29874, 29995, 29056, 29914, 3221, 29914, 4468, 29914, 8768, 29889, 17529, 29905, 29916, 29896, 29874, 29892, 29056, 29914, 3221, 29914, 4468, 29914, 20158, 29918, 12181, 29889, 17529, 5931, 29905, 29916, 287, 29905, 29916, 29900, 29906, 29905, 29876, 29905, 29916, 29896, 29955, 29905, 29916, 29946, 29941, 407, 24111, 797, 1659, 3591, 29905, 29916, 29896, 29906, 3124, 29876, 29905, 29916, 29900, 29945, 12181, 29905, 29916, 29896, 29947, 29905, 29916, 29900, 29896, 320, 29916, 29900, 29896, 1194, 29916, 29900, 29890, 29905, 29916, 29941, 29906, 29905, 29916, 29896, 29883, 29889, 29056, 29889, 29911, 6073, 24111, 1184, 517, 29905, 29916, 29896, 29906, 29905, 29916, 29946, 29941, 29905, 29876, 29905, 29916, 29900, 29890, 8411, 29918, 1272, 29905, 29916, 29896, 29947, 29905, 29916, 29900, 29946, 320, 29916, 29900, 29896, 1194, 29916, 29900, 29890, 29905, 29916, 29941, 29906, 636, 29056, 29889, 29907, 407, 24111, 797, 1659, 3591, 29889, 13554, 1469, 29905, 29916, 29896, 29874, 29905, 29916, 29953, 29953, 29905, 29876, 29905, 29916, 29896, 29906, 13554, 24111, 2855, 1542, 29905, 29916, 29896, 29906, 3124, 29876, 29905, 29916, 29900, 29945, 12181, 29905, 29916, 29896, 29947, 29905, 29916, 29900, 29896, 320, 29916, 29900, 29896, 1194, 29916, 29900, 29890, 29905, 29916, 29941, 29906, 29905, 29916, 29896, 29883, 29889, 29056, 29889, 29911, 6073, 24111, 1184, 517, 29905, 29916, 29896, 29906, 29937, 29905, 29876, 29905, 29916, 29900, 29945, 29905, 29916, 29953, 29946, 1853, 29905, 29916, 29896, 29947, 29905, 29916, 29900, 29906, 320, 29916, 29900, 29896, 1194, 29916, 29900, 29872, 29905, 29916, 29941, 29906, 29905, 29916, 29896, 29946, 29889, 29056, 29889, 1469, 1542, 29905, 29916, 29896, 284, 29905, 29876, 29905, 29876, 13554, 1469, 29905, 29916, 29896, 29906, 29905, 29916, 29900, 29872, 29905, 29876, 29905, 29916, 29900, 29953, 275, 29918, 842, 29905, 29916, 29896, 29947, 29905, 29916, 29900, 29896, 320, 29916, 29900, 29896, 1194, 29916, 29900, 29947, 29905, 29916, 29896, 29906, 29940, 29905, 29876, 29905, 29916, 29900, 267, 14443, 29918, 392, 29918, 1853, 29905, 29916, 29896, 29947, 29905, 29916, 29900, 29906, 320, 29916, 29900, 29941, 1194, 29916, 29900, 29890, 29905, 29916, 29941, 29906, 29905, 29916, 29941, 29953, 29889, 29056, 29889, 29907, 407, 24111, 797, 1659, 3591, 29889, 13554, 24111, 2855, 1542, 29967, 29905, 29916, 29900, 29946, 29905, 29916, 29900, 29947, 29905, 29916, 29900, 29906, 29905, 29916, 29896, 29900, 29905, 29916, 29900, 29941, 29967, 29905, 29916, 29900, 29946, 29905, 29916, 29900, 29947, 29905, 29916, 29900, 29941, 29905, 29916, 29896, 29900, 29905, 29916, 29900, 29946, 5931, 29872, 29905, 29876, 29905, 29916, 29896, 29881, 29905, 29916, 29946, 29941, 407, 24111, 797, 1659, 4290, 29879, 8139, 19226, 29905, 29916, 29896, 29906, 29905, 29916, 29896, 29883, 29905, 29876, 29905, 29916, 29896, 29946, 2080, 29918, 29873, 575, 943, 29918, 484, 19226, 29905, 29916, 29896, 29947, 29905, 29916, 29900, 29896, 320, 29916, 29900, 29941, 1194, 29916, 29900, 29945, 29905, 29916, 29896, 29906, 11035, 29876, 29905, 29916, 29896, 29872, 2080, 29918, 29873, 575, 943, 29918, 294, 29918, 845, 11603, 29918, 484, 19226, 29905, 29916, 29896, 29947, 29905, 29916, 29900, 29906, 320, 29916, 29900, 29941, 1194, 29916, 29900, 29945, 29905, 29916, 29946, 29906, 29905, 29916, 29900, 29941, 29905, 24660, 29947, 29905, 29916, 29900, 29896, 29905, 29916, 29900, 29896, 29905, 29916, 29953, 29906, 29905, 29916, 29900, 29953, 17529, 29941, 1495, 13, 29871, 1919, 13, 29871, 9962, 11759, 29056, 29918, 6333, 29918, 3221, 29918, 6333, 29918, 4468, 29918, 6333, 29918, 8768, 1649, 24381, 29906, 29889, 2287, 7187, 24290, 1955, 29892, 29056, 29918, 6333, 29918, 3221, 29918, 6333, 29918, 4468, 29918, 6333, 29918, 20158, 1649, 12181, 1649, 24381, 29906, 29889, 2287, 7187, 24290, 1955, 29892, 2314, 13, 13, 13, 13, 13, 29918, 6271, 7024, 29950, 3301, 29923, 24065, 1001, 1430, 29907, 1001, 2890, 8647, 29918, 29950, 9468, 1307, 7068, 3301, 29923, 9468, 11116, 353, 903, 2783, 11709, 29889, 19124, 29898, 13, 29871, 1024, 2433, 13554, 24111, 2855, 1542, 742, 13, 29871, 2989, 29918, 978, 2433, 29056, 29889, 29907, 407, 24111, 797, 1659, 3591, 29889, 13554, 24111, 2855, 1542, 742, 13, 29871, 10422, 29922, 8516, 29892, 13, 29871, 934, 29922, 2287, 7187, 24290, 1955, 29892, 13, 29871, 6943, 29918, 1853, 29922, 8516, 29892, 13, 29871, 4235, 11759, 13, 1678, 903, 2783, 11709, 29889, 3073, 19124, 29898, 13, 418, 1024, 2433, 12181, 742, 2989, 29918, 978, 2433, 29056, 29889, 29907, 407, 24111, 797, 1659, 3591, 29889, 13554, 24111, 2855, 1542, 29889, 12181, 742, 2380, 29922, 29900, 29892, 13, 418, 1353, 29922, 29896, 29892, 1134, 29922, 29896, 29896, 29892, 274, 407, 29918, 1853, 29922, 29896, 29900, 29892, 3858, 29922, 29896, 29892, 13, 418, 756, 29918, 4381, 29918, 1767, 29922, 8824, 29892, 2322, 29918, 1767, 29922, 8516, 29892, 13, 418, 2643, 29918, 1853, 29922, 8516, 29892, 14115, 29918, 1853, 29922, 8516, 29892, 6943, 29918, 1853, 29922, 8516, 29892, 13, 418, 338, 29918, 17588, 29922, 8824, 29892, 6081, 29918, 6078, 29922, 8516, 29892, 13, 418, 7797, 1891, 29918, 6768, 29922, 8516, 29892, 934, 29922, 2287, 7187, 24290, 1955, 511, 13, 1678, 903, 2783, 11709, 29889, 3073, 19124, 29898, 13, 418, 1024, 2433, 29881, 1853, 742, 2989, 29918, 978, 2433, 29056, 29889, 29907, 407, 24111, 797, 1659, 3591, 29889, 13554, 24111, 2855, 1542, 29889, 29881, 1853, 742, 2380, 29922, 29896, 29892, 13, 418, 1353, 29922, 29906, 29892, 1134, 29922, 29896, 29946, 29892, 274, 407, 29918, 1853, 29922, 29947, 29892, 3858, 29922, 29896, 29892, 13, 418, 756, 29918, 4381, 29918, 1767, 29922, 8824, 29892, 2322, 29918, 1767, 29922, 29900, 29892, 13, 418, 2643, 29918, 1853, 29922, 8516, 29892, 14115, 29918, 1853, 29922, 8516, 29892, 6943, 29918, 1853, 29922, 8516, 29892, 13, 418, 338, 29918, 17588, 29922, 8824, 29892, 6081, 29918, 6078, 29922, 8516, 29892, 13, 418, 7797, 1891, 29918, 6768, 29922, 8516, 29892, 934, 29922, 2287, 7187, 24290, 1955, 511, 13, 29871, 21251, 13, 29871, 17752, 11759, 13, 29871, 21251, 13, 29871, 9322, 29918, 8768, 11759, 1402, 13, 29871, 14115, 29918, 8768, 11759, 13, 29871, 21251, 13, 29871, 7797, 1891, 29918, 6768, 29922, 8516, 29892, 13, 29871, 338, 29918, 21843, 519, 29922, 8824, 29892, 13, 29871, 5877, 2433, 17529, 29941, 742, 13, 29871, 6081, 29918, 29878, 6916, 11759, 1402, 13, 29871, 697, 974, 29879, 11759, 13, 29871, 21251, 13, 29871, 7797, 1891, 29918, 2962, 29922, 29906, 29929, 29953, 29892, 13, 29871, 7797, 1891, 29918, 355, 29922, 29941, 29929, 29947, 29892, 13, 29897, 13, 13, 29918, 6271, 7024, 29950, 3301, 29923, 24065, 1001, 1430, 29907, 1001, 2890, 8647, 29918, 29950, 9468, 1307, 14573, 353, 903, 2783, 11709, 29889, 19124, 29898, 13, 29871, 1024, 2433, 13554, 1469, 742, 13, 29871, 2989, 29918, 978, 2433, 29056, 29889, 29907, 407, 24111, 797, 1659, 3591, 29889, 13554, 1469, 742, 13, 29871, 10422, 29922, 8516, 29892, 13, 29871, 934, 29922, 2287, 7187, 24290, 1955, 29892, 13, 29871, 6943, 29918, 1853, 29922, 8516, 29892, 13, 29871, 4235, 11759, 13, 1678, 903, 2783, 11709, 29889, 3073, 19124, 29898, 13, 418, 1024, 2433, 275, 29918, 842, 742, 2989, 29918, 978, 2433, 29056, 29889, 29907, 407, 24111, 797, 1659, 3591, 29889, 13554, 1469, 29889, 275, 29918, 842, 742, 2380, 29922, 29900, 29892, 13, 418, 1353, 29922, 29896, 29892, 1134, 29922, 29947, 29892, 274, 407, 29918, 1853, 29922, 29955, 29892, 3858, 29922, 29896, 29892, 13, 418, 756, 29918, 4381, 29918, 1767, 29922, 8824, 29892, 2322, 29918, 1767, 29922, 8824, 29892, 13, 418, 2643, 29918, 1853, 29922, 8516, 29892, 14115, 29918, 1853, 29922, 8516, 29892, 6943, 29918, 1853, 29922, 8516, 29892, 13, 418, 338, 29918, 17588, 29922, 8824, 29892, 6081, 29918, 6078, 29922, 8516, 29892, 13, 418, 7797, 1891, 29918, 6768, 29922, 8516, 29892, 934, 29922, 2287, 7187, 24290, 1955, 511, 13, 1678, 903, 2783, 11709, 29889, 3073, 19124, 29898, 13, 418, 1024, 2433, 12181, 29918, 392, 29918, 1853, 742, 2989, 29918, 978, 2433, 29056, 29889, 29907, 407, 24111, 797, 1659, 3591, 29889, 13554, 1469, 29889, 12181, 29918, 392, 29918, 1853, 742, 2380, 29922, 29896, 29892, 13, 418, 1353, 29922, 29906, 29892, 1134, 29922, 29896, 29896, 29892, 274, 407, 29918, 1853, 29922, 29896, 29900, 29892, 3858, 29922, 29941, 29892, 13, 418, 756, 29918, 4381, 29918, 1767, 29922, 8824, 29892, 2322, 29918, 1767, 11759, 1402, 13, 418, 2643, 29918, 1853, 29922, 8516, 29892, 14115, 29918, 1853, 29922, 8516, 29892, 6943, 29918, 1853, 29922, 8516, 29892, 13, 418, 338, 29918, 17588, 29922, 8824, 29892, 6081, 29918, 6078, 29922, 8516, 29892, 13, 418, 7797, 1891, 29918, 6768, 29922, 8516, 29892, 934, 29922, 2287, 7187, 24290, 1955, 511, 13, 29871, 21251, 13, 29871, 17752, 11759, 13, 29871, 21251, 13, 29871, 9322, 29918, 8768, 11759, 1402, 13, 29871, 14115, 29918, 8768, 11759, 13, 29871, 21251, 13, 29871, 7797, 1891, 29918, 6768, 29922, 8516, 29892, 13, 29871, 338, 29918, 21843, 519, 29922, 8824, 29892, 13, 29871, 5877, 2433, 17529, 29941, 742, 13, 29871, 6081, 29918, 29878, 6916, 11759, 1402, 13, 29871, 697, 974, 29879, 11759, 13, 29871, 21251, 13, 29871, 7797, 1891, 29918, 2962, 29922, 29946, 29900, 29900, 29892, 13, 29871, 7797, 1891, 29918, 355, 29922, 29945, 29900, 29947, 29892, 13, 29897, 13, 13, 29918, 6271, 7024, 29950, 3301, 29923, 24065, 1001, 1430, 29907, 1001, 2890, 8647, 353, 903, 2783, 11709, 29889, 19124, 29898, 13, 29871, 1024, 2433, 29907, 407, 24111, 797, 1659, 3591, 742, 13, 29871, 2989, 29918, 978, 2433, 29056, 29889, 29907, 407, 24111, 797, 1659, 3591, 742, 13, 29871, 10422, 29922, 8516, 29892, 13, 29871, 934, 29922, 2287, 7187, 24290, 1955, 29892, 13, 29871, 6943, 29918, 1853, 29922, 8516, 29892, 13, 29871, 4235, 11759, 13, 1678, 903, 2783, 11709, 29889, 3073, 19124, 29898, 13, 418, 1024, 2433, 12181, 742, 2989, 29918, 978, 2433, 29056, 29889, 29907, 407, 24111, 797, 1659, 3591, 29889, 12181, 742, 2380, 29922, 29900, 29892, 13, 418, 1353, 29922, 29896, 29892, 1134, 29922, 29896, 29896, 29892, 274, 407, 29918, 1853, 29922, 29896, 29900, 29892, 3858, 29922, 29896, 29892, 13, 418, 756, 29918, 4381, 29918, 1767, 29922, 8824, 29892, 2322, 29918, 1767, 29922, 8516, 29892, 13, 418, 2643, 29918, 1853, 29922, 8516, 29892, 14115, 29918, 1853, 29922, 8516, 29892, 6943, 29918, 1853, 29922, 8516, 29892, 13, 418, 338, 29918, 17588, 29922, 8824, 29892, 6081, 29918, 6078, 29922, 8516, 29892, 13, 418, 7797, 1891, 29918, 6768, 29922, 8516, 29892, 934, 29922, 2287, 7187, 24290, 1955, 511, 13, 1678, 903, 2783, 11709, 29889, 3073, 19124, 29898, 13, 418, 1024, 2433, 8411, 29918, 1272, 742, 2989, 29918, 978, 2433, 29056, 29889, 29907, 407, 24111, 797, 1659, 3591, 29889, 8411, 29918, 1272, 742, 2380, 29922, 29896, 29892, 13, 418, 1353, 29922, 29946, 29892, 1134, 29922, 29896, 29896, 29892, 274, 407, 29918, 1853, 29922, 29896, 29900, 29892, 3858, 29922, 29896, 29892, 13, 418, 756, 29918, 4381, 29918, 1767, 29922, 8824, 29892, 2322, 29918, 1767, 29922, 8516, 29892, 13, 418, 2643, 29918, 1853, 29922, 8516, 29892, 14115, 29918, 1853, 29922, 8516, 29892, 6943, 29918, 1853, 29922, 8516, 29892, 13, 418, 338, 29918, 17588, 29922, 8824, 29892, 6081, 29918, 6078, 29922, 8516, 29892, 13, 418, 7797, 1891, 29918, 6768, 29922, 8516, 29892, 934, 29922, 2287, 7187, 24290, 1955, 511, 13, 29871, 21251, 13, 29871, 17752, 11759, 13, 29871, 21251, 13, 29871, 9322, 29918, 8768, 11759, 29918, 6271, 7024, 29950, 3301, 29923, 24065, 1001, 1430, 29907, 1001, 2890, 8647, 29918, 29950, 9468, 1307, 7068, 3301, 29923, 9468, 11116, 29892, 903, 6271, 7024, 29950, 3301, 29923, 24065, 1001, 1430, 29907, 1001, 2890, 8647, 29918, 29950, 9468, 1307, 14573, 29892, 21251, 13, 29871, 14115, 29918, 8768, 11759, 13, 29871, 21251, 13, 29871, 7797, 1891, 29918, 6768, 29922, 8516, 29892, 13, 29871, 338, 29918, 21843, 519, 29922, 8824, 29892, 13, 29871, 5877, 2433, 17529, 29941, 742, 13, 29871, 6081, 29918, 29878, 6916, 11759, 1402, 13, 29871, 697, 974, 29879, 11759, 13, 29871, 21251, 13, 29871, 7797, 1891, 29918, 2962, 29922, 29896, 29945, 29945, 29892, 13, 29871, 7797, 1891, 29918, 355, 29922, 29945, 29906, 29900, 29892, 13, 29897, 13, 13, 13, 29918, 6271, 7024, 29950, 3301, 29923, 24065, 1001, 1430, 4741, 1177, 12336, 29903, 8186, 29923, 2287, 29928, 353, 903, 2783, 11709, 29889, 19124, 29898, 13, 29871, 1024, 2433, 29907, 407, 24111, 797, 1659, 4290, 29879, 8139, 19226, 742, 13, 29871, 2989, 29918, 978, 2433, 29056, 29889, 29907, 407, 24111, 797, 1659, 4290, 29879, 8139, 19226, 742, 13, 29871, 10422, 29922, 8516, 29892, 13, 29871, 934, 29922, 2287, 7187, 24290, 1955, 29892, 13, 29871, 6943, 29918, 1853, 29922, 8516, 29892, 13, 29871, 4235, 11759, 13, 1678, 903, 2783, 11709, 29889, 3073, 19124, 29898, 13, 418, 1024, 2433, 2080, 29918, 29873, 575, 943, 29918, 484, 19226, 742, 2989, 29918, 978, 2433, 29056, 29889, 29907, 407, 24111, 797, 1659, 4290, 29879, 8139, 19226, 29889, 2080, 29918, 29873, 575, 943, 29918, 484, 19226, 742, 2380, 29922, 29900, 29892, 13, 418, 1353, 29922, 29896, 29892, 1134, 29922, 29945, 29892, 274, 407, 29918, 1853, 29922, 29896, 29892, 3858, 29922, 29941, 29892, 13, 418, 756, 29918, 4381, 29918, 1767, 29922, 8824, 29892, 2322, 29918, 1767, 11759, 1402, 13, 418, 2643, 29918, 1853, 29922, 8516, 29892, 14115, 29918, 1853, 29922, 8516, 29892, 6943, 29918, 1853, 29922, 8516, 29892, 13, 418, 338, 29918, 17588, 29922, 8824, 29892, 6081, 29918, 6078, 29922, 8516, 29892, 13, 418, 7797, 1891, 29918, 6768, 29922, 8516, 29892, 934, 29922, 2287, 7187, 24290, 1955, 511, 13, 1678, 903, 2783, 11709, 29889, 3073, 19124, 29898, 13, 418, 1024, 2433, 2080, 29918, 29873, 575, 943, 29918, 294, 29918, 845, 11603, 29918, 484, 19226, 742, 2989, 29918, 978, 2433, 29056, 29889, 29907, 407, 24111, 797, 1659, 4290, 29879, 8139, 19226, 29889, 2080, 29918, 29873, 575, 943, 29918, 294, 29918, 845, 11603, 29918, 484, 19226, 742, 2380, 29922, 29896, 29892, 13, 418, 1353, 29922, 29906, 29892, 1134, 29922, 29945, 29892, 274, 407, 29918, 1853, 29922, 29896, 29892, 3858, 29922, 29941, 29892, 13, 418, 756, 29918, 4381, 29918, 1767, 29922, 8824, 29892, 2322, 29918, 1767, 11759, 1402, 13, 418, 2643, 29918, 1853, 29922, 8516, 29892, 14115, 29918, 1853, 29922, 8516, 29892, 6943, 29918, 1853, 29922, 8516, 29892, 13, 418, 338, 29918, 17588, 29922, 8824, 29892, 6081, 29918, 6078, 29922, 8516, 29892, 13, 418, 7797, 1891, 29918, 6768, 29922, 8516, 29892, 934, 29922, 2287, 7187, 24290, 1955, 511, 13, 29871, 21251, 13, 29871, 17752, 11759, 13, 29871, 21251, 13, 29871, 9322, 29918, 8768, 11759, 1402, 13, 29871, 14115, 29918, 8768, 11759, 13, 29871, 21251, 13, 29871, 7797, 1891, 29918, 6768, 29922, 8516, 29892, 13, 29871, 338, 29918, 21843, 519, 29922, 8824, 29892, 13, 29871, 5877, 2433, 17529, 29941, 742, 13, 29871, 6081, 29918, 29878, 6916, 11759, 1402, 13, 29871, 697, 974, 29879, 11759, 13, 29871, 21251, 13, 29871, 7797, 1891, 29918, 2962, 29922, 29945, 29906, 29906, 29892, 13, 29871, 7797, 1891, 29918, 355, 29922, 29953, 29906, 29941, 29892, 13, 29897, 13, 13, 29918, 6271, 7024, 29950, 3301, 29923, 24065, 1001, 1430, 29907, 1001, 2890, 8647, 29918, 29950, 9468, 1307, 7068, 3301, 29923, 9468, 11116, 29889, 9621, 29918, 1609, 29918, 978, 1839, 12181, 13359, 4906, 29918, 1853, 353, 26110, 29918, 6333, 29918, 3221, 29918, 6333, 29918, 4468, 29918, 6333, 29918, 20158, 1649, 12181, 1649, 24381, 29906, 3032, 29911, 1430, 29903, 1955, 7068, 3301, 29923, 8618, 4986, 13, 29918, 6271, 7024, 29950, 3301, 29923, 24065, 1001, 1430, 29907, 1001, 2890, 8647, 29918, 29950, 9468, 1307, 7068, 3301, 29923, 9468, 11116, 29889, 9621, 29918, 1609, 29918, 978, 1839, 29881, 1853, 13359, 18605, 29918, 1853, 353, 26110, 29918, 6333, 29918, 3221, 29918, 6333, 29918, 4468, 29918, 6333, 29918, 8768, 1649, 24381, 29906, 3032, 25832, 1299, 6959, 13, 29918, 6271, 7024, 29950, 3301, 29923, 24065, 1001, 1430, 29907, 1001, 2890, 8647, 29918, 29950, 9468, 1307, 7068, 3301, 29923, 9468, 11116, 29889, 1285, 17225, 29918, 1853, 353, 903, 6271, 7024, 29950, 3301, 29923, 24065, 1001, 1430, 29907, 1001, 2890, 8647, 13, 29918, 6271, 7024, 29950, 3301, 29923, 24065, 1001, 1430, 29907, 1001, 2890, 8647, 29918, 29950, 9468, 1307, 14573, 29889, 9621, 29918, 1609, 29918, 978, 1839, 12181, 29918, 392, 29918, 1853, 13359, 4906, 29918, 1853, 353, 903, 6271, 7024, 29950, 3301, 29923, 24065, 1001, 1430, 29907, 1001, 2890, 8647, 29918, 29950, 9468, 1307, 7068, 3301, 29923, 9468, 11116, 13, 29918, 6271, 7024, 29950, 3301, 29923, 24065, 1001, 1430, 29907, 1001, 2890, 8647, 29918, 29950, 9468, 1307, 14573, 29889, 1285, 17225, 29918, 1853, 353, 903, 6271, 7024, 29950, 3301, 29923, 24065, 1001, 1430, 29907, 1001, 2890, 8647, 13, 29918, 6271, 7024, 29950, 3301, 29923, 24065, 1001, 1430, 29907, 1001, 2890, 8647, 29889, 9621, 29918, 1609, 29918, 978, 1839, 12181, 13359, 4906, 29918, 1853, 353, 26110, 29918, 6333, 29918, 3221, 29918, 6333, 29918, 4468, 29918, 6333, 29918, 20158, 1649, 12181, 1649, 24381, 29906, 3032, 29911, 1430, 29903, 1955, 7068, 3301, 29923, 8618, 4986, 13, 29918, 6271, 7024, 29950, 3301, 29923, 24065, 1001, 1430, 29907, 1001, 2890, 8647, 29889, 9621, 29918, 1609, 29918, 978, 1839, 8411, 29918, 1272, 13359, 4906, 29918, 1853, 353, 903, 6271, 7024, 29950, 3301, 29923, 24065, 1001, 1430, 29907, 1001, 2890, 8647, 29918, 29950, 9468, 1307, 14573, 13, 2287, 7187, 24290, 1955, 29889, 4906, 29918, 8768, 29918, 1609, 29918, 978, 1839, 29907, 407, 24111, 797, 1659, 3591, 2033, 353, 903, 6271, 7024, 29950, 3301, 29923, 24065, 1001, 1430, 29907, 1001, 2890, 8647, 13, 2287, 7187, 24290, 1955, 29889, 4906, 29918, 8768, 29918, 1609, 29918, 978, 1839, 29907, 407, 24111, 797, 1659, 4290, 29879, 8139, 19226, 2033, 353, 903, 6271, 7024, 29950, 3301, 29923, 24065, 1001, 1430, 4741, 1177, 12336, 29903, 8186, 29923, 2287, 29928, 13, 29918, 11967, 29918, 2585, 29889, 15213, 2283, 19124, 29898, 2287, 7187, 24290, 1955, 29897, 13, 13, 29907, 407, 24111, 797, 1659, 3591, 353, 903, 999, 1464, 29889, 24565, 17830, 3728, 1542, 877, 29907, 407, 24111, 797, 1659, 3591, 742, 9423, 4906, 29889, 3728, 29892, 511, 9657, 29898, 13, 13, 29871, 29273, 24111, 2855, 1542, 353, 903, 999, 1464, 29889, 24565, 17830, 3728, 1542, 877, 13554, 24111, 2855, 1542, 742, 9423, 4906, 29889, 3728, 29892, 511, 9657, 29898, 13, 1678, 23050, 24290, 1955, 353, 903, 6271, 7024, 29950, 3301, 29923, 24065, 1001, 1430, 29907, 1001, 2890, 8647, 29918, 29950, 9468, 1307, 7068, 3301, 29923, 9468, 11116, 29892, 13, 1678, 4770, 5453, 1649, 353, 525, 29056, 29889, 4691, 29889, 4468, 29889, 8223, 29918, 12181, 29918, 262, 1659, 29918, 24381, 29906, 29915, 13, 1678, 396, 732, 29992, 17529, 29883, 29918, 7851, 291, 29918, 3149, 29898, 1990, 29918, 6078, 29901, 29056, 29889, 29907, 407, 24111, 797, 1659, 3591, 29889, 13554, 24111, 2855, 1542, 29897, 13, 268, 876, 13, 29871, 1919, 13, 13, 29871, 29273, 1469, 353, 903, 999, 1464, 29889, 24565, 17830, 3728, 1542, 877, 13554, 1469, 742, 9423, 4906, 29889, 3728, 29892, 511, 9657, 29898, 13, 1678, 23050, 24290, 1955, 353, 903, 6271, 7024, 29950, 3301, 29923, 24065, 1001, 1430, 29907, 1001, 2890, 8647, 29918, 29950, 9468, 1307, 14573, 29892, 13, 1678, 4770, 5453, 1649, 353, 525, 29056, 29889, 4691, 29889, 4468, 29889, 8223, 29918, 12181, 29918, 262, 1659, 29918, 24381, 29906, 29915, 13, 1678, 396, 732, 29992, 17529, 29883, 29918, 7851, 291, 29918, 3149, 29898, 1990, 29918, 6078, 29901, 29056, 29889, 29907, 407, 24111, 797, 1659, 3591, 29889, 13554, 1469, 29897, 13, 268, 876, 13, 29871, 1919, 13, 29871, 23050, 24290, 1955, 353, 903, 6271, 7024, 29950, 3301, 29923, 24065, 1001, 1430, 29907, 1001, 2890, 8647, 29892, 13, 29871, 4770, 5453, 1649, 353, 525, 29056, 29889, 4691, 29889, 4468, 29889, 8223, 29918, 12181, 29918, 262, 1659, 29918, 24381, 29906, 29915, 13, 29871, 396, 732, 29992, 17529, 29883, 29918, 7851, 291, 29918, 3149, 29898, 1990, 29918, 6078, 29901, 29056, 29889, 29907, 407, 24111, 797, 1659, 3591, 29897, 13, 259, 876, 13, 29918, 11967, 29918, 2585, 29889, 15213, 3728, 29898, 29907, 407, 24111, 797, 1659, 3591, 29897, 13, 29918, 11967, 29918, 2585, 29889, 15213, 3728, 29898, 29907, 407, 24111, 797, 1659, 3591, 29889, 13554, 24111, 2855, 1542, 29897, 13, 29918, 11967, 29918, 2585, 29889, 15213, 3728, 29898, 29907, 407, 24111, 797, 1659, 3591, 29889, 13554, 1469, 29897, 13, 13, 29907, 407, 24111, 797, 1659, 4290, 29879, 8139, 19226, 353, 903, 999, 1464, 29889, 24565, 17830, 3728, 1542, 877, 29907, 407, 24111, 797, 1659, 4290, 29879, 8139, 19226, 742, 9423, 4906, 29889, 3728, 29892, 511, 9657, 29898, 13, 29871, 23050, 24290, 1955, 353, 903, 6271, 7024, 29950, 3301, 29923, 24065, 1001, 1430, 4741, 1177, 12336, 29903, 8186, 29923, 2287, 29928, 29892, 13, 29871, 4770, 5453, 1649, 353, 525, 29056, 29889, 4691, 29889, 4468, 29889, 8223, 29918, 12181, 29918, 262, 1659, 29918, 24381, 29906, 29915, 13, 29871, 396, 732, 29992, 17529, 29883, 29918, 7851, 291, 29918, 3149, 29898, 1990, 29918, 6078, 29901, 29056, 29889, 29907, 407, 24111, 797, 1659, 4290, 29879, 8139, 19226, 29897, 13, 259, 876, 13, 29918, 11967, 29918, 2585, 29889, 15213, 3728, 29898, 29907, 407, 24111, 797, 1659, 4290, 29879, 8139, 19226, 29897, 13, 13, 13, 2287, 7187, 24290, 1955, 3032, 6768, 353, 6213, 13, 29937, 732, 29992, 17529, 29883, 29918, 7851, 291, 29918, 3149, 29898, 5453, 29918, 6078, 29897, 13, 2 ]
Scripts/check_two_strings_are_anagrams.py
alexcamargos/Learning_Python_Programming
2
188866
# #!/usr/bin/env python # encoding: utf-8 # -------------------------------------------------------------------------------------------------------------------- # # Name: check_two_strings_are_anagrams.py # Version: 1.0 # # Summary: Find Whether Two Strings are Anagrams # An interesting application of the Counter class is to find anagrams. # An anagram is a word or phrase formed by rearranging the letters of a different word or phrase. # If the Counter objects of two strings are equal, then they are anagrams. # # Author: <NAME> # Author-email: <EMAIL> # # License: MIT # # -------------------------------------------------------------------------------------------------------------------- """ Find Whether Two Strings are Anagrams An interesting application of the Counter class is to find anagrams. An anagram is a word or phrase formed by rearranging the letters of a different word or phrase. If the Counter objects of two strings are equal, then they are anagrams. """ # A Counter is a dict subclass for counting hashable objects. from collections import Counter string_1 = 'acbde' string_2 = 'abced' string_3 = 'abcda' strings_list = [string_1, string_2, string_3] my_list = [Counter(counter) for counter in strings_list] if my_list[0] == my_list[1]: print(f'{string_1} and {string_2} are anagram.') else: print(f"{string_1} and {string_2} aren't anagram.") if my_list[1] == my_list[2]: print(f"{string_2} and {string_3} are anagram.") else: print(f"{string_2} and {string_3} aren't anagram.")
[ 1, 396, 29871, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 29871, 8025, 29901, 23616, 29899, 29947, 13, 13, 29937, 448, 2683, 2683, 2683, 2683, 2683, 2683, 2683, 5634, 13, 29937, 13, 29937, 4408, 29901, 1423, 29918, 10184, 29918, 19651, 29918, 598, 29918, 273, 10312, 2232, 29889, 2272, 13, 29937, 10079, 29901, 29871, 29896, 29889, 29900, 13, 29937, 13, 29937, 6991, 5219, 29901, 10987, 26460, 7803, 3767, 886, 526, 530, 10312, 2232, 13, 29937, 3986, 530, 8031, 2280, 310, 278, 315, 5336, 770, 338, 304, 1284, 385, 10312, 2232, 29889, 13, 29937, 3986, 530, 385, 14442, 338, 263, 1734, 470, 16549, 8429, 491, 337, 2749, 9776, 278, 8721, 310, 263, 1422, 1734, 470, 16549, 29889, 13, 29937, 3986, 960, 278, 315, 5336, 3618, 310, 1023, 6031, 526, 5186, 29892, 769, 896, 526, 385, 10312, 2232, 29889, 13, 29937, 13, 29937, 13361, 29901, 529, 5813, 29958, 13, 29937, 13361, 29899, 5269, 29901, 529, 26862, 6227, 29958, 13, 29937, 13, 29937, 19245, 29901, 341, 1806, 13, 29937, 13, 29937, 448, 2683, 2683, 2683, 2683, 2683, 2683, 2683, 5634, 13, 13, 15945, 29908, 13, 12542, 26460, 7803, 3767, 886, 526, 530, 10312, 2232, 13, 13, 2744, 8031, 2280, 310, 278, 315, 5336, 770, 338, 304, 1284, 385, 10312, 2232, 29889, 13, 2744, 385, 14442, 338, 263, 1734, 470, 16549, 8429, 491, 337, 2749, 9776, 278, 8721, 310, 263, 1422, 1734, 470, 16549, 29889, 13, 3644, 278, 315, 5336, 3618, 310, 1023, 6031, 526, 5186, 29892, 769, 896, 526, 385, 10312, 2232, 29889, 13, 15945, 29908, 13, 13, 29937, 319, 315, 5336, 338, 263, 9657, 19481, 363, 21248, 6608, 519, 3618, 29889, 13, 3166, 16250, 1053, 315, 5336, 13, 13, 1807, 29918, 29896, 353, 525, 562, 29890, 311, 29915, 13, 1807, 29918, 29906, 353, 525, 370, 1133, 29915, 13, 1807, 29918, 29941, 353, 525, 10736, 1388, 29915, 13, 19651, 29918, 1761, 353, 518, 1807, 29918, 29896, 29892, 1347, 29918, 29906, 29892, 1347, 29918, 29941, 29962, 13, 13, 1357, 29918, 1761, 353, 518, 17779, 29898, 11808, 29897, 363, 6795, 297, 6031, 29918, 1761, 29962, 13, 13, 361, 590, 29918, 1761, 29961, 29900, 29962, 1275, 590, 29918, 1761, 29961, 29896, 5387, 13, 1678, 1596, 29898, 29888, 29915, 29912, 1807, 29918, 29896, 29913, 322, 426, 1807, 29918, 29906, 29913, 526, 385, 14442, 29889, 1495, 13, 2870, 29901, 13, 1678, 1596, 29898, 29888, 29908, 29912, 1807, 29918, 29896, 29913, 322, 426, 1807, 29918, 29906, 29913, 9455, 29915, 29873, 385, 14442, 23157, 13, 13, 361, 590, 29918, 1761, 29961, 29896, 29962, 1275, 590, 29918, 1761, 29961, 29906, 5387, 13, 1678, 1596, 29898, 29888, 29908, 29912, 1807, 29918, 29906, 29913, 322, 426, 1807, 29918, 29941, 29913, 526, 385, 14442, 23157, 13, 2870, 29901, 13, 1678, 1596, 29898, 29888, 29908, 29912, 1807, 29918, 29906, 29913, 322, 426, 1807, 29918, 29941, 29913, 9455, 29915, 29873, 385, 14442, 23157, 13, 2 ]
lib.py
miami-acm/unit-testing
0
45317
#!/usr/bin/env python3 def sleep_in(weekday, vacation): """ The parameter weekday is True if it is a weekday, and the parameter vacation is True if we are on vacation. We sleep in if it is not a weekday or we're on vacation. Return True if we sleep in. sleep_in(False, False) → True sleep_in(True, False) → False sleep_in(False, True) → True """ return False def monkey_trouble(a_smile, b_smile): """ We have two monkeys, a and b, and the parameters a_smile and b_smile indicate if each is smiling. We are in trouble if they are both smiling or if neither of them is smiling. Return True if we are in trouble. monkey_trouble(True, True) → True monkey_trouble(False, False) → True monkey_trouble(True, False) → False """ return False def sum_double(a, b): """ Given two int values, return their sum. Unless the two values are the same, then return double their sum. sum_double(1, 2) → 3 sum_double(3, 2) → 5 sum_double(2, 2) → 8 """ return 0 def diff21(n): """ Given an int n, return the absolute difference between n and 21, except return double the absolute difference if n is over 21. diff21(19) → 2 diff21(10) → 11 diff21(21) → 0 """ return 0 def count_evens(nums): """ Return the number of even ints in the given array. Note: the % "mod" operator computes the remainder, e.g. 5 % 2 is 1. count_evens([2, 1, 2, 3, 4]) → 3 count_evens([2, 2, 0]) → 3 count_evens([1, 3, 5]) → 0 """ return 0 def xyz_there(s): """ Return True if the given string contains an appearance of "xyz" where the xyz is not directly preceeded by a period (.). So "xxyz" counts but "x.xyz" does not. xyz_there('abcxyz') → True xyz_there('abc.xyz') → False xyz_there('xyz.abc') → True """ return False def is_prime(n): """ Return True if the given number is prime. is_prime(2) → True is_prime(4) → False is_prime(11) → True """ return False
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 13, 13, 1753, 8709, 29918, 262, 29898, 18448, 3250, 29892, 11757, 362, 1125, 13, 1678, 9995, 13, 1678, 450, 3443, 4723, 3250, 338, 5852, 565, 372, 338, 263, 4723, 3250, 29892, 322, 278, 3443, 13, 1678, 11757, 362, 338, 5852, 565, 591, 526, 373, 11757, 362, 29889, 1334, 8709, 297, 565, 372, 338, 451, 263, 13, 1678, 4723, 3250, 470, 591, 29915, 276, 373, 11757, 362, 29889, 7106, 5852, 565, 591, 8709, 297, 29889, 13, 13, 1678, 8709, 29918, 262, 29898, 8824, 29892, 7700, 29897, 10309, 5852, 13, 1678, 8709, 29918, 262, 29898, 5574, 29892, 7700, 29897, 10309, 7700, 13, 1678, 8709, 29918, 262, 29898, 8824, 29892, 5852, 29897, 10309, 5852, 13, 1678, 9995, 13, 1678, 736, 7700, 13, 13, 13, 1753, 1601, 1989, 29918, 509, 2074, 29898, 29874, 29918, 3844, 488, 29892, 289, 29918, 3844, 488, 1125, 13, 1678, 9995, 13, 1678, 1334, 505, 1023, 1601, 8149, 29892, 263, 322, 289, 29892, 322, 278, 4128, 263, 29918, 3844, 488, 322, 289, 29918, 3844, 488, 13, 1678, 12266, 565, 1269, 338, 1560, 6504, 29889, 1334, 526, 297, 7458, 565, 896, 526, 1716, 1560, 6504, 470, 13, 1678, 565, 9561, 310, 963, 338, 1560, 6504, 29889, 7106, 5852, 565, 591, 526, 297, 7458, 29889, 13, 13, 1678, 1601, 1989, 29918, 509, 2074, 29898, 5574, 29892, 5852, 29897, 10309, 5852, 13, 1678, 1601, 1989, 29918, 509, 2074, 29898, 8824, 29892, 7700, 29897, 10309, 5852, 13, 1678, 1601, 1989, 29918, 509, 2074, 29898, 5574, 29892, 7700, 29897, 10309, 7700, 13, 1678, 9995, 13, 1678, 736, 7700, 13, 13, 13, 1753, 2533, 29918, 8896, 29898, 29874, 29892, 289, 1125, 13, 1678, 9995, 13, 1678, 11221, 1023, 938, 1819, 29892, 736, 1009, 2533, 29889, 25870, 278, 1023, 1819, 526, 278, 1021, 29892, 13, 1678, 769, 736, 3765, 1009, 2533, 29889, 13, 13, 1678, 2533, 29918, 8896, 29898, 29896, 29892, 29871, 29906, 29897, 10309, 29871, 29941, 13, 1678, 2533, 29918, 8896, 29898, 29941, 29892, 29871, 29906, 29897, 10309, 29871, 29945, 13, 1678, 2533, 29918, 8896, 29898, 29906, 29892, 29871, 29906, 29897, 10309, 29871, 29947, 13, 1678, 9995, 13, 1678, 736, 29871, 29900, 13, 13, 13, 1753, 2923, 29906, 29896, 29898, 29876, 1125, 13, 1678, 9995, 13, 1678, 11221, 385, 938, 302, 29892, 736, 278, 8380, 4328, 1546, 302, 322, 29871, 29906, 29896, 29892, 5174, 13, 1678, 736, 3765, 278, 8380, 4328, 565, 302, 338, 975, 29871, 29906, 29896, 29889, 13, 13, 1678, 2923, 29906, 29896, 29898, 29896, 29929, 29897, 10309, 29871, 29906, 13, 1678, 2923, 29906, 29896, 29898, 29896, 29900, 29897, 10309, 29871, 29896, 29896, 13, 1678, 2923, 29906, 29896, 29898, 29906, 29896, 29897, 10309, 29871, 29900, 13, 1678, 9995, 13, 1678, 736, 29871, 29900, 13, 13, 13, 1753, 2302, 29918, 5750, 575, 29898, 1949, 29879, 1125, 13, 1678, 9995, 13, 1678, 7106, 278, 1353, 310, 1584, 938, 29879, 297, 278, 2183, 1409, 29889, 3940, 29901, 278, 1273, 376, 1545, 29908, 13, 1678, 5455, 2912, 267, 278, 21162, 29892, 321, 29889, 29887, 29889, 29871, 29945, 1273, 29871, 29906, 338, 29871, 29896, 29889, 13, 13, 1678, 2302, 29918, 5750, 575, 4197, 29906, 29892, 29871, 29896, 29892, 29871, 29906, 29892, 29871, 29941, 29892, 29871, 29946, 2314, 10309, 29871, 29941, 13, 1678, 2302, 29918, 5750, 575, 4197, 29906, 29892, 29871, 29906, 29892, 29871, 29900, 2314, 10309, 29871, 29941, 13, 1678, 2302, 29918, 5750, 575, 4197, 29896, 29892, 29871, 29941, 29892, 29871, 29945, 2314, 10309, 29871, 29900, 13, 1678, 9995, 13, 1678, 736, 29871, 29900, 13, 13, 13, 1753, 921, 12339, 29918, 12711, 29898, 29879, 1125, 13, 1678, 9995, 13, 1678, 7106, 5852, 565, 278, 2183, 1347, 3743, 385, 10097, 310, 376, 20230, 29908, 988, 278, 13, 1678, 921, 12339, 338, 451, 4153, 758, 3947, 287, 491, 263, 3785, 313, 6250, 1105, 376, 29916, 20230, 29908, 18139, 541, 376, 29916, 29889, 20230, 29908, 13, 1678, 947, 451, 29889, 13, 13, 1678, 921, 12339, 29918, 12711, 877, 10736, 20230, 1495, 10309, 5852, 13, 1678, 921, 12339, 29918, 12711, 877, 10736, 29889, 20230, 1495, 10309, 7700, 13, 1678, 921, 12339, 29918, 12711, 877, 20230, 29889, 10736, 1495, 10309, 5852, 13, 1678, 9995, 13, 1678, 736, 7700, 13, 13, 13, 1753, 338, 29918, 10080, 29898, 29876, 1125, 13, 1678, 9995, 13, 1678, 7106, 5852, 565, 278, 2183, 1353, 338, 6019, 29889, 13, 13, 1678, 338, 29918, 10080, 29898, 29906, 29897, 10309, 5852, 13, 1678, 338, 29918, 10080, 29898, 29946, 29897, 10309, 7700, 13, 1678, 338, 29918, 10080, 29898, 29896, 29896, 29897, 10309, 5852, 13, 1678, 9995, 13, 1678, 736, 7700, 13, 2 ]
PlantAnalysis/sharpen_image.py
godzmaru/PlantAnalysis
0
113128
<reponame>godzmaru/PlantAnalysis #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Feb 14 13:06:40 2018 @author: hendrawahyu """ import cv2 import numpy as np # ============================================================================= # This function is used to sharpen the image using a simple kernel # ============================================================================= def sharpen_image(image): kernel = np.array([[-1,-1,-1], [-1,9,-1], [-1,-1,-1]]) image = cv2.filter2D(image, -1, kernel) return image
[ 1, 529, 276, 1112, 420, 29958, 17083, 29920, 3034, 29884, 29914, 3247, 424, 21067, 4848, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 15945, 29908, 13, 20399, 373, 15050, 26319, 29871, 29896, 29946, 29871, 29896, 29941, 29901, 29900, 29953, 29901, 29946, 29900, 29871, 29906, 29900, 29896, 29947, 13, 13, 29992, 8921, 29901, 298, 355, 1610, 801, 29891, 29884, 13, 15945, 29908, 13, 5215, 13850, 29906, 13, 5215, 12655, 408, 7442, 13, 13, 29937, 1275, 9166, 9166, 9166, 9166, 4936, 25512, 13, 29937, 910, 740, 338, 1304, 304, 528, 279, 2238, 278, 1967, 773, 263, 2560, 8466, 13, 29937, 1275, 9166, 9166, 9166, 9166, 4936, 25512, 13, 1753, 528, 279, 2238, 29918, 3027, 29898, 3027, 1125, 13, 1678, 8466, 353, 7442, 29889, 2378, 4197, 14352, 29896, 6653, 29896, 6653, 29896, 1402, 21069, 29896, 29892, 29929, 6653, 29896, 1402, 21069, 29896, 6653, 29896, 6653, 29896, 24960, 13, 1678, 1967, 353, 13850, 29906, 29889, 4572, 29906, 29928, 29898, 3027, 29892, 448, 29896, 29892, 8466, 29897, 13, 1678, 736, 1967, 2 ]
unwarp_models.py
zgjslc/Film-Recovery-master1
0
6639
import torch import torch.nn as nn import torch.nn.functional as F from models.misc import modules constrain_path = { ('threeD', 'normal'): (True, True, ''), ('threeD', 'depth'): (True, True, ''), ('normal', 'depth'): (True, True, ''), ('depth', 'normal'): (True, True, ''), } class UnwarpNet(nn.Module): def __init__(self, use_simple=False, combine_num=3, use_constrain=True, constrain_configure=None): super(UnwarpNet, self).__init__() self.combine_num = combine_num self.use_simple = use_simple self.use_constrain = use_constrain self.constrain_configure = constrain_configure self.geo_encoder = modules.Encoder(downsample=6, in_channels=3) self.threeD_decoder = modules.Decoder(downsample=6, out_channels=3, combine_num=self.combine_num) self.normal_decoder = modules.Decoder(downsample=6, out_channels=3, combine_num=self.combine_num) self.depth_decoder = modules.Decoder(downsample=6, out_channels=1, combine_num=self.combine_num) self.mask_decoder = modules.Decoder(downsample=6, out_channels=1, combine_num=0) bottle_neck = sum([2 ** (i + 4) for i in range(self.combine_num)]) self.second_encoder = modules.Encoder(downsample=6, in_channels=bottle_neck * 3 + 3) self.uv_decoder = modules.Decoder(downsample=6, out_channels=2, combine_num=0) # self.albedo_decoder = modules.AlbedoDecoder(downsample=6, out_channels=1) self.albedo_decoder = modules.Decoder(downsample=6, out_channels=1, combine_num=0) self.deform_decoder = modules.Decoder(downsample=6, out_channels=2, combine_num=0) self.dep2nor = None self.threeD_to_nor2dep = None self.nor2dep = None def forward(self, x): gxvals, gx_encode = self.geo_encoder(x) threeD_map, threeD_feature = self.threeD_decoder(gxvals, gx_encode) threeD_map = nn.functional.tanh(threeD_map) dep_map, dep_feature = self.depth_decoder(gxvals, gx_encode) dep_map = nn.functional.tanh(dep_map) nor_map, nor_feature = self.normal_decoder(gxvals, gx_encode) nor_map = nn.functional.tanh(nor_map) mask_map, mask_feature = self.mask_decoder(gxvals, gx_encode) mask_map = torch.nn.functional.sigmoid(mask_map) # geo_feature = torch.cat([threeD_feature, nor_feature, dep_feature], dim=1) geo_feature = torch.cat([threeD_feature, nor_feature, dep_feature, x], dim=1) b, c, h, w = geo_feature.size() geo_feature_mask = geo_feature.mul(mask_map.expand(b, c, h, w)) secvals, sec_encode = self.second_encoder(geo_feature_mask) uv_map, _ = self.uv_decoder(secvals, sec_encode) uv_map = nn.functional.tanh(uv_map) alb_map, _ = self.albedo_decoder(secvals, sec_encode) alb_map = nn.functional.tanh(alb_map) deform_map, _ = self.deform_decoder(secvals, sec_encode) deform_map = nn.functional.tanh(deform_map) return uv_map, threeD_map, nor_map, alb_map, dep_map, mask_map, \ None, None, None, None, None, deform_map
[ 1, 1053, 4842, 305, 13, 5215, 4842, 305, 29889, 15755, 408, 302, 29876, 13, 5215, 4842, 305, 29889, 15755, 29889, 2220, 284, 408, 383, 13, 3166, 4733, 29889, 29885, 10669, 1053, 10585, 13, 13, 3075, 6038, 29918, 2084, 353, 426, 13, 1678, 6702, 17536, 29928, 742, 525, 8945, 29374, 313, 5574, 29892, 5852, 29892, 525, 5477, 13, 1678, 6702, 17536, 29928, 742, 525, 19488, 29374, 313, 5574, 29892, 5852, 29892, 525, 5477, 13, 1678, 6702, 8945, 742, 525, 19488, 29374, 313, 5574, 29892, 5852, 29892, 525, 5477, 13, 1678, 6702, 19488, 742, 525, 8945, 29374, 313, 5574, 29892, 5852, 29892, 525, 5477, 13, 13, 29913, 13, 13, 13, 1990, 853, 4495, 29886, 6779, 29898, 15755, 29889, 7355, 1125, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 671, 29918, 12857, 29922, 8824, 29892, 14405, 29918, 1949, 29922, 29941, 29892, 671, 29918, 3075, 6038, 29922, 5574, 29892, 1040, 6038, 29918, 17591, 29922, 8516, 1125, 13, 4706, 2428, 29898, 2525, 4495, 29886, 6779, 29892, 1583, 467, 1649, 2344, 1649, 580, 13, 4706, 1583, 29889, 17743, 457, 29918, 1949, 353, 14405, 29918, 1949, 13, 4706, 1583, 29889, 1509, 29918, 12857, 353, 671, 29918, 12857, 13, 4706, 1583, 29889, 1509, 29918, 3075, 6038, 353, 671, 29918, 3075, 6038, 13, 4706, 1583, 29889, 3075, 6038, 29918, 17591, 353, 1040, 6038, 29918, 17591, 13, 308, 13, 4706, 1583, 29889, 24756, 29918, 3977, 6119, 353, 10585, 29889, 8566, 6119, 29898, 3204, 11249, 29922, 29953, 29892, 297, 29918, 305, 12629, 29922, 29941, 29897, 13, 4706, 1583, 29889, 17536, 29928, 29918, 7099, 6119, 353, 10585, 29889, 6185, 6119, 29898, 3204, 11249, 29922, 29953, 29892, 714, 29918, 305, 12629, 29922, 29941, 29892, 14405, 29918, 1949, 29922, 1311, 29889, 17743, 457, 29918, 1949, 29897, 13, 4706, 1583, 29889, 8945, 29918, 7099, 6119, 353, 10585, 29889, 6185, 6119, 29898, 3204, 11249, 29922, 29953, 29892, 714, 29918, 305, 12629, 29922, 29941, 29892, 14405, 29918, 1949, 29922, 1311, 29889, 17743, 457, 29918, 1949, 29897, 13, 4706, 1583, 29889, 19488, 29918, 7099, 6119, 353, 10585, 29889, 6185, 6119, 29898, 3204, 11249, 29922, 29953, 29892, 714, 29918, 305, 12629, 29922, 29896, 29892, 14405, 29918, 1949, 29922, 1311, 29889, 17743, 457, 29918, 1949, 29897, 13, 4706, 1583, 29889, 13168, 29918, 7099, 6119, 353, 10585, 29889, 6185, 6119, 29898, 3204, 11249, 29922, 29953, 29892, 714, 29918, 305, 12629, 29922, 29896, 29892, 14405, 29918, 1949, 29922, 29900, 29897, 13, 4706, 18046, 280, 29918, 484, 384, 353, 2533, 4197, 29906, 3579, 313, 29875, 718, 29871, 29946, 29897, 363, 474, 297, 3464, 29898, 1311, 29889, 17743, 457, 29918, 1949, 29897, 2314, 13, 4706, 1583, 29889, 7496, 29918, 3977, 6119, 353, 10585, 29889, 8566, 6119, 29898, 3204, 11249, 29922, 29953, 29892, 297, 29918, 305, 12629, 29922, 29890, 1501, 280, 29918, 484, 384, 334, 29871, 29941, 718, 29871, 29941, 29897, 13, 4706, 1583, 29889, 4090, 29918, 7099, 6119, 353, 10585, 29889, 6185, 6119, 29898, 3204, 11249, 29922, 29953, 29892, 714, 29918, 305, 12629, 29922, 29906, 29892, 14405, 29918, 1949, 29922, 29900, 29897, 13, 4706, 396, 1583, 29889, 284, 2580, 29877, 29918, 7099, 6119, 353, 10585, 29889, 2499, 2580, 29877, 6185, 6119, 29898, 3204, 11249, 29922, 29953, 29892, 714, 29918, 305, 12629, 29922, 29896, 29897, 13, 4706, 1583, 29889, 284, 2580, 29877, 29918, 7099, 6119, 353, 10585, 29889, 6185, 6119, 29898, 3204, 11249, 29922, 29953, 29892, 714, 29918, 305, 12629, 29922, 29896, 29892, 14405, 29918, 1949, 29922, 29900, 29897, 13, 4706, 1583, 29889, 311, 689, 29918, 7099, 6119, 353, 10585, 29889, 6185, 6119, 29898, 3204, 11249, 29922, 29953, 29892, 714, 29918, 305, 12629, 29922, 29906, 29892, 14405, 29918, 1949, 29922, 29900, 29897, 13, 4706, 1583, 29889, 2716, 29906, 15459, 353, 6213, 13, 4706, 1583, 29889, 17536, 29928, 29918, 517, 29918, 15459, 29906, 2716, 353, 6213, 13, 4706, 1583, 29889, 15459, 29906, 2716, 353, 6213, 13, 308, 13, 1678, 822, 6375, 29898, 1311, 29892, 921, 1125, 13, 4706, 330, 29916, 791, 29879, 29892, 330, 29916, 29918, 12508, 353, 1583, 29889, 24756, 29918, 3977, 6119, 29898, 29916, 29897, 13, 4706, 2211, 29928, 29918, 1958, 29892, 2211, 29928, 29918, 14394, 353, 1583, 29889, 17536, 29928, 29918, 7099, 6119, 29898, 29887, 29916, 791, 29879, 29892, 330, 29916, 29918, 12508, 29897, 13, 4706, 2211, 29928, 29918, 1958, 353, 302, 29876, 29889, 2220, 284, 29889, 13161, 29882, 29898, 17536, 29928, 29918, 1958, 29897, 13, 4706, 1401, 29918, 1958, 29892, 1401, 29918, 14394, 353, 1583, 29889, 19488, 29918, 7099, 6119, 29898, 29887, 29916, 791, 29879, 29892, 330, 29916, 29918, 12508, 29897, 13, 4706, 1401, 29918, 1958, 353, 302, 29876, 29889, 2220, 284, 29889, 13161, 29882, 29898, 2716, 29918, 1958, 29897, 13, 4706, 3643, 29918, 1958, 29892, 3643, 29918, 14394, 353, 1583, 29889, 8945, 29918, 7099, 6119, 29898, 29887, 29916, 791, 29879, 29892, 330, 29916, 29918, 12508, 29897, 13, 4706, 3643, 29918, 1958, 353, 302, 29876, 29889, 2220, 284, 29889, 13161, 29882, 29898, 15459, 29918, 1958, 29897, 13, 4706, 11105, 29918, 1958, 29892, 11105, 29918, 14394, 353, 1583, 29889, 13168, 29918, 7099, 6119, 29898, 29887, 29916, 791, 29879, 29892, 330, 29916, 29918, 12508, 29897, 13, 4706, 11105, 29918, 1958, 353, 4842, 305, 29889, 15755, 29889, 2220, 284, 29889, 18816, 29885, 3398, 29898, 13168, 29918, 1958, 29897, 13, 4706, 396, 1737, 29877, 29918, 14394, 353, 4842, 305, 29889, 4117, 4197, 17536, 29928, 29918, 14394, 29892, 3643, 29918, 14394, 29892, 1401, 29918, 14394, 1402, 3964, 29922, 29896, 29897, 13, 4706, 1737, 29877, 29918, 14394, 353, 4842, 305, 29889, 4117, 4197, 17536, 29928, 29918, 14394, 29892, 3643, 29918, 14394, 29892, 1401, 29918, 14394, 29892, 921, 1402, 3964, 29922, 29896, 29897, 13, 4706, 289, 29892, 274, 29892, 298, 29892, 281, 353, 1737, 29877, 29918, 14394, 29889, 2311, 580, 13, 4706, 1737, 29877, 29918, 14394, 29918, 13168, 353, 1737, 29877, 29918, 14394, 29889, 16109, 29898, 13168, 29918, 1958, 29889, 18837, 29898, 29890, 29892, 274, 29892, 298, 29892, 281, 876, 13, 4706, 5226, 791, 29879, 29892, 5226, 29918, 12508, 353, 1583, 29889, 7496, 29918, 3977, 6119, 29898, 24756, 29918, 14394, 29918, 13168, 29897, 13, 4706, 318, 29894, 29918, 1958, 29892, 903, 353, 1583, 29889, 4090, 29918, 7099, 6119, 29898, 3471, 791, 29879, 29892, 5226, 29918, 12508, 29897, 13, 4706, 318, 29894, 29918, 1958, 353, 302, 29876, 29889, 2220, 284, 29889, 13161, 29882, 29898, 4090, 29918, 1958, 29897, 13, 4706, 27234, 29918, 1958, 29892, 903, 353, 1583, 29889, 284, 2580, 29877, 29918, 7099, 6119, 29898, 3471, 791, 29879, 29892, 5226, 29918, 12508, 29897, 13, 4706, 27234, 29918, 1958, 353, 302, 29876, 29889, 2220, 284, 29889, 13161, 29882, 29898, 284, 29890, 29918, 1958, 29897, 13, 4706, 316, 689, 29918, 1958, 29892, 903, 353, 1583, 29889, 311, 689, 29918, 7099, 6119, 29898, 3471, 791, 29879, 29892, 5226, 29918, 12508, 29897, 13, 4706, 316, 689, 29918, 1958, 353, 302, 29876, 29889, 2220, 284, 29889, 13161, 29882, 29898, 311, 689, 29918, 1958, 29897, 13, 4706, 736, 318, 29894, 29918, 1958, 29892, 2211, 29928, 29918, 1958, 29892, 3643, 29918, 1958, 29892, 27234, 29918, 1958, 29892, 1401, 29918, 1958, 29892, 11105, 29918, 1958, 29892, 320, 13, 1669, 6213, 29892, 6213, 29892, 6213, 29892, 6213, 29892, 6213, 29892, 316, 689, 29918, 1958, 13, 2 ]
t2/primes.py
Macelai/security
0
71958
import random import time BITS_LENGTH = [40, 56, 80, 128, 168, 224, 256, 512, 1024, 2048, 4096] def lcg(m: int, seed: int = None) -> int: a = 39177369995579819498972128804676596941198511312402174107900118507767888787985319889078498768125726538781142699985438519849879849879867913387985078149715117956575598705232859627482107678765877225323948753141 c = 0 num = seed or 1 while True: num = (a * num + c) % m yield num def xorshift32(seed: int, n: int) -> int: xor_parts = list() while n != 0: x = seed & 0x7fffffff # 32 bits x ^= x << 13 x ^= x >> 17 x ^= x << 5 x = x & 0x7fffffff # 32 bits novamente xor_parts.append(x) n >>= 32 x = 0 for i, part in enumerate(xor_parts): x |= part << (32 * i) return x def miller_rabin(n: int, k: int) -> bool: if n == 2: return True if n % 2 == 0: return False r, s = 0, n - 1 while s % 2 == 0: r += 1 s //= 2 for _ in range(k): a = random.randrange(2, n - 1) x = pow(a, s, n) if x == 1 or x == n - 1: continue for _ in range(r - 1): x = pow(x, 2, n) if x == n - 1: break else: return False return True def fermat_little_theorem(n: int) -> bool: return (2 << (n - 2)) % n == 1 def measure_time(f): n = 100000 start = time.time() for _ in range(n): f() end = time.time() time_ = (end - start) / n print(time_) if __name__ == "__main__": for length in BITS_LENGTH: print(f"LCG {length}") measure_time(lambda: lcg(m=length, seed=2**length-1)) print(f"Xorshift {length}") measure_time(lambda: xorshift32(n=length, seed=1)) x = False generator = lcg(m=2**length, seed=2**length-1) start = time.time() while(not x): x = miller_rabin(next(generator), 40) end = time.time() print(f"{length} : {(end - start)}")
[ 1, 1053, 4036, 13, 5215, 931, 13, 13, 13, 22698, 29903, 29918, 19433, 353, 518, 29946, 29900, 29892, 29871, 29945, 29953, 29892, 29871, 29947, 29900, 29892, 29871, 29896, 29906, 29947, 29892, 29871, 29896, 29953, 29947, 29892, 29871, 29906, 29906, 29946, 29892, 29871, 29906, 29945, 29953, 29892, 29871, 29945, 29896, 29906, 29892, 29871, 29896, 29900, 29906, 29946, 29892, 29871, 29906, 29900, 29946, 29947, 29892, 29871, 29946, 29900, 29929, 29953, 29962, 13, 13, 13, 1753, 301, 29883, 29887, 29898, 29885, 29901, 938, 29892, 16717, 29901, 938, 353, 6213, 29897, 1599, 938, 29901, 13, 1678, 263, 353, 29871, 29941, 29929, 29896, 29955, 29955, 29941, 29953, 29929, 29929, 29929, 29945, 29945, 29955, 29929, 29947, 29896, 29929, 29946, 29929, 29947, 29929, 29955, 29906, 29896, 29906, 29947, 29947, 29900, 29946, 29953, 29955, 29953, 29945, 29929, 29953, 29929, 29946, 29896, 29896, 29929, 29947, 29945, 29896, 29896, 29941, 29896, 29906, 29946, 29900, 29906, 29896, 29955, 29946, 29896, 29900, 29955, 29929, 29900, 29900, 29896, 29896, 29947, 29945, 29900, 29955, 29955, 29953, 29955, 29947, 29947, 29947, 29955, 29947, 29955, 29929, 29947, 29945, 29941, 29896, 29929, 29947, 29947, 29929, 29900, 29955, 29947, 29946, 29929, 29947, 29955, 29953, 29947, 29896, 29906, 29945, 29955, 29906, 29953, 29945, 29941, 29947, 29955, 29947, 29896, 29896, 29946, 29906, 29953, 29929, 29929, 29929, 29947, 29945, 29946, 29941, 29947, 29945, 29896, 29929, 29947, 29946, 29929, 29947, 29955, 29929, 29947, 29946, 29929, 29947, 29955, 29929, 29947, 29953, 29955, 29929, 29896, 29941, 29941, 29947, 29955, 29929, 29947, 29945, 29900, 29955, 29947, 29896, 29946, 29929, 29955, 29896, 29945, 29896, 29896, 29955, 29929, 29945, 29953, 29945, 29955, 29945, 29945, 29929, 29947, 29955, 29900, 29945, 29906, 29941, 29906, 29947, 29945, 29929, 29953, 29906, 29955, 29946, 29947, 29906, 29896, 29900, 29955, 29953, 29955, 29947, 29955, 29953, 29945, 29947, 29955, 29955, 29906, 29906, 29945, 29941, 29906, 29941, 29929, 29946, 29947, 29955, 29945, 29941, 29896, 29946, 29896, 13, 1678, 274, 353, 29871, 29900, 13, 1678, 954, 353, 16717, 470, 29871, 29896, 13, 1678, 1550, 5852, 29901, 13, 4706, 954, 353, 313, 29874, 334, 954, 718, 274, 29897, 1273, 286, 13, 4706, 7709, 954, 13, 13, 13, 1753, 921, 272, 10889, 29941, 29906, 29898, 26776, 29901, 938, 29892, 302, 29901, 938, 29897, 1599, 938, 29901, 13, 1678, 921, 272, 29918, 20895, 353, 1051, 580, 13, 13, 1678, 1550, 302, 2804, 29871, 29900, 29901, 13, 4706, 921, 353, 16717, 669, 29871, 29900, 29916, 29955, 17156, 18725, 29871, 396, 29871, 29941, 29906, 9978, 13, 4706, 921, 6228, 29922, 921, 3532, 29871, 29896, 29941, 13, 4706, 921, 6228, 29922, 921, 5099, 29871, 29896, 29955, 13, 4706, 921, 6228, 29922, 921, 3532, 29871, 29945, 13, 4706, 921, 353, 921, 669, 29871, 29900, 29916, 29955, 17156, 18725, 29871, 396, 29871, 29941, 29906, 9978, 2420, 2503, 13, 4706, 921, 272, 29918, 20895, 29889, 4397, 29898, 29916, 29897, 13, 13, 4706, 302, 5099, 29922, 29871, 29941, 29906, 13, 13, 1678, 921, 353, 29871, 29900, 13, 1678, 363, 474, 29892, 760, 297, 26985, 29898, 29916, 272, 29918, 20895, 1125, 13, 4706, 921, 891, 29922, 760, 3532, 313, 29941, 29906, 334, 474, 29897, 13, 13, 1678, 736, 921, 13, 13, 13, 1753, 3533, 261, 29918, 336, 2109, 29898, 29876, 29901, 938, 29892, 413, 29901, 938, 29897, 1599, 6120, 29901, 13, 1678, 565, 302, 1275, 29871, 29906, 29901, 13, 4706, 736, 5852, 13, 13, 1678, 565, 302, 1273, 29871, 29906, 1275, 29871, 29900, 29901, 13, 4706, 736, 7700, 13, 13, 1678, 364, 29892, 269, 353, 29871, 29900, 29892, 302, 448, 29871, 29896, 13, 1678, 1550, 269, 1273, 29871, 29906, 1275, 29871, 29900, 29901, 13, 4706, 364, 4619, 29871, 29896, 13, 4706, 269, 849, 29922, 29871, 29906, 13, 1678, 363, 903, 297, 3464, 29898, 29895, 1125, 13, 4706, 263, 353, 4036, 29889, 9502, 3881, 29898, 29906, 29892, 302, 448, 29871, 29896, 29897, 13, 4706, 921, 353, 4764, 29898, 29874, 29892, 269, 29892, 302, 29897, 13, 4706, 565, 921, 1275, 29871, 29896, 470, 921, 1275, 302, 448, 29871, 29896, 29901, 13, 9651, 6773, 13, 4706, 363, 903, 297, 3464, 29898, 29878, 448, 29871, 29896, 1125, 13, 9651, 921, 353, 4764, 29898, 29916, 29892, 29871, 29906, 29892, 302, 29897, 13, 9651, 565, 921, 1275, 302, 448, 29871, 29896, 29901, 13, 18884, 2867, 13, 4706, 1683, 29901, 13, 9651, 736, 7700, 13, 1678, 736, 5852, 13, 13, 13, 1753, 16895, 271, 29918, 29880, 1992, 29918, 14648, 29898, 29876, 29901, 938, 29897, 1599, 6120, 29901, 13, 1678, 736, 313, 29906, 3532, 313, 29876, 448, 29871, 29906, 876, 1273, 302, 1275, 29871, 29896, 13, 13, 13, 1753, 5645, 29918, 2230, 29898, 29888, 1125, 13, 1678, 302, 353, 29871, 29896, 29900, 29900, 29900, 29900, 29900, 13, 1678, 1369, 353, 931, 29889, 2230, 580, 13, 1678, 363, 903, 297, 3464, 29898, 29876, 1125, 13, 4706, 285, 580, 13, 1678, 1095, 353, 931, 29889, 2230, 580, 13, 1678, 931, 29918, 353, 313, 355, 448, 1369, 29897, 847, 302, 13, 13, 1678, 1596, 29898, 2230, 19925, 13, 13, 13, 361, 4770, 978, 1649, 1275, 376, 1649, 3396, 1649, 1115, 13, 1678, 363, 3309, 297, 350, 1806, 29903, 29918, 19433, 29901, 13, 4706, 1596, 29898, 29888, 29908, 29931, 11135, 426, 2848, 27195, 13, 4706, 5645, 29918, 2230, 29898, 2892, 29901, 301, 29883, 29887, 29898, 29885, 29922, 2848, 29892, 16717, 29922, 29906, 1068, 2848, 29899, 29896, 876, 13, 4706, 1596, 29898, 29888, 29908, 29990, 272, 10889, 426, 2848, 27195, 13, 4706, 5645, 29918, 2230, 29898, 2892, 29901, 921, 272, 10889, 29941, 29906, 29898, 29876, 29922, 2848, 29892, 16717, 29922, 29896, 876, 13, 4706, 921, 353, 7700, 13, 4706, 15299, 353, 301, 29883, 29887, 29898, 29885, 29922, 29906, 1068, 2848, 29892, 16717, 29922, 29906, 1068, 2848, 29899, 29896, 29897, 13, 4706, 1369, 353, 931, 29889, 2230, 580, 13, 4706, 1550, 29898, 1333, 921, 1125, 13, 9651, 921, 353, 3533, 261, 29918, 336, 2109, 29898, 4622, 29898, 27959, 511, 29871, 29946, 29900, 29897, 13, 4706, 1095, 353, 931, 29889, 2230, 580, 13, 4706, 1596, 29898, 29888, 29908, 29912, 2848, 29913, 584, 29871, 426, 29898, 355, 448, 1369, 2915, 1159, 13, 2 ]
sherpa_client/models/engine_name.py
kairntech/sherpa-client
0
1610392
<filename>sherpa_client/models/engine_name.py<gh_stars>0 from typing import Any, Dict, Type, TypeVar import attr T = TypeVar("T", bound="EngineName") @attr.s(auto_attribs=True) class EngineName: """ """ name: str def to_dict(self) -> Dict[str, Any]: name = self.name field_dict: Dict[str, Any] = {} field_dict.update( { "name": name, } ) return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() name = d.pop("name") engine_name = cls( name=name, ) return engine_name
[ 1, 529, 9507, 29958, 845, 261, 3274, 29918, 4645, 29914, 9794, 29914, 10599, 29918, 978, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 19229, 1053, 3139, 29892, 360, 919, 29892, 5167, 29892, 5167, 9037, 13, 13, 5215, 12421, 13, 13, 29911, 353, 5167, 9037, 703, 29911, 613, 3216, 543, 12412, 1170, 1159, 13, 13, 13, 29992, 5552, 29889, 29879, 29898, 6921, 29918, 1131, 1091, 29879, 29922, 5574, 29897, 13, 1990, 10863, 1170, 29901, 13, 1678, 9995, 9995, 13, 13, 1678, 1024, 29901, 851, 13, 13, 1678, 822, 304, 29918, 8977, 29898, 1311, 29897, 1599, 360, 919, 29961, 710, 29892, 3139, 5387, 13, 4706, 1024, 353, 1583, 29889, 978, 13, 13, 4706, 1746, 29918, 8977, 29901, 360, 919, 29961, 710, 29892, 3139, 29962, 353, 6571, 13, 4706, 1746, 29918, 8977, 29889, 5504, 29898, 13, 9651, 426, 13, 18884, 376, 978, 1115, 1024, 29892, 13, 9651, 500, 13, 4706, 1723, 13, 13, 4706, 736, 1746, 29918, 8977, 13, 13, 1678, 732, 1990, 5696, 13, 1678, 822, 515, 29918, 8977, 29898, 25932, 29901, 5167, 29961, 29911, 1402, 4765, 29918, 8977, 29901, 360, 919, 29961, 710, 29892, 3139, 2314, 1599, 323, 29901, 13, 4706, 270, 353, 4765, 29918, 8977, 29889, 8552, 580, 13, 4706, 1024, 353, 270, 29889, 7323, 703, 978, 1159, 13, 13, 4706, 6012, 29918, 978, 353, 1067, 29879, 29898, 13, 9651, 1024, 29922, 978, 29892, 13, 4706, 1723, 13, 13, 4706, 736, 6012, 29918, 978, 13, 2 ]
code/figures/5.0-plot-fig-S2.py
edunnsigouin/ds21grl
1
84287
""" Plots fig S2: Specifically, zonal-mean root-mean-square of stationary wave meridional wind at 850 hPa for both reanalysis and aquaplanet simulation data for ANNUAL and NDJFM. NOTE: since the reviewer asked for a measure of interannual variability in stationary wave amplitude, here we calculate stationary waves as the annual or seasonal mean for each year and then calculate the rms over all years. """ import numpy as np import xarray as xr from matplotlib import pyplot as plt from ds21grl import dim_aqua,dim_erai from ds21grl.config import data_name,dir_interim,dir_fig # INPUT ----------------------------------------------------------- ilat = 70 write2file = 1 # ----------------------------------------------------------------- # read rms data from experiments L+, 2L+, Lk1 and erai filename1 = dir_interim + data_name[0] + '/zm_rms_V850_stw_pl_70N_' + dim_erai.timestamp + '.nc' filename2 = dir_interim + data_name[2] + '/zm_rms_V850_stw_ml_70N_' + dim_aqua.timestamp + '.nc' filename3 = dir_interim + data_name[6] + '/zm_rms_V850_stw_ml_70N_' + dim_aqua.timestamp + '.nc' filename4 = dir_interim + data_name[7] + '/zm_rms_V850_stw_ml_70N_' + dim_aqua.timestamp + '.nc' ds1 = xr.open_dataset(filename1) ds2 = xr.open_dataset(filename2) ds3 = xr.open_dataset(filename3) ds4 = xr.open_dataset(filename4) rms_erai = ds1['rms_stw'].values rms_L = ds2['rms_stw'].values rms_2L = ds3['rms_stw'].values rms_Lk1 = ds4['rms_stw'].values # plotting positions = np.array([1,2,3,4]) fontsize = 12 figsize = np.array([10,5]) plt.figure(figsize=(figsize[0],figsize[1])) plt.subplots_adjust(hspace=0.3,wspace=0.2,left=0.075,right=0.95,top=0.95,bottom=0.1) plt.plot(positions[0],rms_erai[0],'k',marker='o',markersize=10) plt.plot(positions[1],rms_L[0],'k',marker='o',markersize=10) plt.plot(positions[2],rms_2L[0],'k',marker='o',markersize=10) plt.plot(positions[3],rms_Lk1[0],'k',marker='o',markersize=10) plt.plot(positions[0],rms_erai[1],'tab:blue',marker='o',markersize=10) plt.plot(positions[1],rms_L[1],'tab:blue',marker='o',markersize=10) plt.plot(positions[2],rms_2L[1],'tab:blue',marker='o',markersize=10) plt.plot(positions[3],rms_Lk1[1],'tab:blue',marker='o',markersize=10) plt.plot([],[],'k',marker='o',markersize=10,label='ANN') plt.plot([],[],'tab:blue',marker='o',markersize=10,label='NDJFM') plt.legend(loc='lower right',frameon=False,fontsize=fontsize,labelcolor='linecolor',markerscale=0) plt.xticks(positions,['reanalysis','L+','2L+',r'L$_{k1}$'],fontsize=fontsize) plt.yticks(np.arange(0,3,0.5),np.arange(0,3,0.5),fontsize=fontsize) plt.xlabel('experiment',fontsize=fontsize) plt.ylabel(r'$[\overline{v}^*_{rms}]_{850hPa}$',fontsize=fontsize) plt.ylim([0,2.5]) if write2file == 1: plt.savefig(dir_fig + 'fig_S2.pdf') plt.show()
[ 1, 9995, 13, 3247, 1862, 2537, 317, 29906, 29901, 13, 10299, 928, 635, 29892, 503, 7177, 29899, 12676, 3876, 29899, 12676, 29899, 17619, 310, 5073, 653, 10742, 2778, 333, 1848, 8805, 29871, 13, 271, 29871, 29947, 29945, 29900, 298, 11868, 363, 1716, 337, 15916, 322, 10592, 481, 6468, 300, 17402, 848, 363, 319, 10262, 29965, 1964, 322, 405, 29928, 29967, 22192, 29889, 13, 12256, 29923, 29901, 1951, 278, 6664, 15580, 4433, 363, 263, 5645, 310, 1006, 812, 950, 1197, 3097, 297, 29871, 13, 19569, 653, 10742, 28347, 29892, 1244, 591, 8147, 5073, 653, 20037, 408, 278, 17568, 470, 13, 25682, 284, 2099, 363, 1269, 1629, 322, 769, 8147, 278, 364, 1516, 975, 599, 2440, 29889, 29871, 13, 15945, 29908, 13, 13, 5215, 12655, 965, 408, 7442, 13, 5215, 921, 2378, 3986, 408, 921, 29878, 13, 3166, 22889, 4706, 1053, 11451, 5317, 408, 14770, 13, 3166, 29871, 18031, 29906, 29896, 629, 29880, 3986, 1053, 3964, 29918, 18463, 29874, 29892, 6229, 29918, 1572, 29875, 13, 3166, 18031, 29906, 29896, 629, 29880, 29889, 2917, 1678, 1053, 848, 29918, 978, 29892, 3972, 29918, 1639, 326, 29892, 3972, 29918, 1003, 13, 13, 29937, 2672, 12336, 448, 2683, 2683, 2683, 28400, 259, 13, 309, 271, 9651, 353, 29871, 29955, 29900, 13, 3539, 29906, 1445, 418, 353, 29871, 29896, 13, 29937, 448, 2683, 2683, 2683, 2683, 13, 13, 29937, 1303, 364, 1516, 848, 515, 15729, 365, 29974, 29892, 29871, 29906, 29931, 29974, 29892, 365, 29895, 29896, 322, 604, 1794, 13, 9507, 29896, 418, 353, 4516, 29918, 1639, 326, 718, 848, 29918, 978, 29961, 29900, 29962, 718, 8207, 14018, 29918, 29878, 1516, 29918, 29963, 29947, 29945, 29900, 29918, 303, 29893, 29918, 572, 29918, 29955, 29900, 29940, 29918, 29915, 718, 3964, 29918, 1572, 29875, 29889, 16394, 718, 15300, 17608, 29915, 13, 9507, 29906, 418, 353, 4516, 29918, 1639, 326, 718, 848, 29918, 978, 29961, 29906, 29962, 718, 8207, 14018, 29918, 29878, 1516, 29918, 29963, 29947, 29945, 29900, 29918, 303, 29893, 29918, 828, 29918, 29955, 29900, 29940, 29918, 29915, 718, 3964, 29918, 18463, 29874, 29889, 16394, 718, 15300, 17608, 29915, 13, 9507, 29941, 418, 353, 4516, 29918, 1639, 326, 718, 848, 29918, 978, 29961, 29953, 29962, 718, 8207, 14018, 29918, 29878, 1516, 29918, 29963, 29947, 29945, 29900, 29918, 303, 29893, 29918, 828, 29918, 29955, 29900, 29940, 29918, 29915, 718, 3964, 29918, 18463, 29874, 29889, 16394, 718, 15300, 17608, 29915, 13, 9507, 29946, 418, 353, 4516, 29918, 1639, 326, 718, 848, 29918, 978, 29961, 29955, 29962, 718, 8207, 14018, 29918, 29878, 1516, 29918, 29963, 29947, 29945, 29900, 29918, 303, 29893, 29918, 828, 29918, 29955, 29900, 29940, 29918, 29915, 718, 3964, 29918, 18463, 29874, 29889, 16394, 718, 15300, 17608, 29915, 13, 6289, 29896, 9651, 353, 921, 29878, 29889, 3150, 29918, 24713, 29898, 9507, 29896, 29897, 13, 6289, 29906, 9651, 353, 921, 29878, 29889, 3150, 29918, 24713, 29898, 9507, 29906, 29897, 13, 6289, 29941, 9651, 353, 921, 29878, 29889, 3150, 29918, 24713, 29898, 9507, 29941, 29897, 13, 6289, 29946, 9651, 353, 921, 29878, 29889, 3150, 29918, 24713, 29898, 9507, 29946, 29897, 13, 29878, 1516, 29918, 1572, 29875, 539, 353, 18031, 29896, 1839, 29878, 1516, 29918, 303, 29893, 13359, 5975, 13, 29878, 1516, 29918, 29931, 3986, 353, 18031, 29906, 1839, 29878, 1516, 29918, 303, 29893, 13359, 5975, 29871, 13, 29878, 1516, 29918, 29906, 29931, 308, 353, 18031, 29941, 1839, 29878, 1516, 29918, 303, 29893, 13359, 5975, 13, 29878, 1516, 29918, 29931, 29895, 29896, 4706, 353, 18031, 29946, 1839, 29878, 1516, 29918, 303, 29893, 13359, 5975, 13, 13, 13, 29937, 6492, 1259, 29871, 13, 1066, 2187, 353, 7442, 29889, 2378, 4197, 29896, 29892, 29906, 29892, 29941, 29892, 29946, 2314, 13, 5657, 2311, 29871, 353, 29871, 29896, 29906, 13, 1003, 2311, 259, 353, 7442, 29889, 2378, 4197, 29896, 29900, 29892, 29945, 2314, 13, 13, 572, 29873, 29889, 4532, 29898, 1003, 2311, 7607, 1003, 2311, 29961, 29900, 1402, 1003, 2311, 29961, 29896, 12622, 13, 572, 29873, 29889, 1491, 26762, 29918, 328, 5143, 29898, 14158, 29922, 29900, 29889, 29941, 29892, 29893, 3493, 29922, 29900, 29889, 29906, 29892, 1563, 29922, 29900, 29889, 29900, 29955, 29945, 29892, 1266, 29922, 29900, 29889, 29929, 29945, 29892, 3332, 29922, 29900, 29889, 29929, 29945, 29892, 8968, 29922, 29900, 29889, 29896, 29897, 13, 13, 572, 29873, 29889, 5317, 29898, 1066, 2187, 29961, 29900, 1402, 29878, 1516, 29918, 1572, 29875, 29961, 29900, 1402, 29915, 29895, 742, 22976, 2433, 29877, 742, 3502, 414, 675, 29922, 29896, 29900, 29897, 13, 572, 29873, 29889, 5317, 29898, 1066, 2187, 29961, 29896, 1402, 29878, 1516, 29918, 29931, 29961, 29900, 1402, 29915, 29895, 742, 22976, 2433, 29877, 742, 3502, 414, 675, 29922, 29896, 29900, 29897, 13, 572, 29873, 29889, 5317, 29898, 1066, 2187, 29961, 29906, 1402, 29878, 1516, 29918, 29906, 29931, 29961, 29900, 1402, 29915, 29895, 742, 22976, 2433, 29877, 742, 3502, 414, 675, 29922, 29896, 29900, 29897, 13, 572, 29873, 29889, 5317, 29898, 1066, 2187, 29961, 29941, 1402, 29878, 1516, 29918, 29931, 29895, 29896, 29961, 29900, 1402, 29915, 29895, 742, 22976, 2433, 29877, 742, 3502, 414, 675, 29922, 29896, 29900, 29897, 13, 13, 572, 29873, 29889, 5317, 29898, 1066, 2187, 29961, 29900, 1402, 29878, 1516, 29918, 1572, 29875, 29961, 29896, 1402, 29915, 3891, 29901, 9539, 742, 22976, 2433, 29877, 742, 3502, 414, 675, 29922, 29896, 29900, 29897, 13, 572, 29873, 29889, 5317, 29898, 1066, 2187, 29961, 29896, 1402, 29878, 1516, 29918, 29931, 29961, 29896, 1402, 29915, 3891, 29901, 9539, 742, 22976, 2433, 29877, 742, 3502, 414, 675, 29922, 29896, 29900, 29897, 13, 572, 29873, 29889, 5317, 29898, 1066, 2187, 29961, 29906, 1402, 29878, 1516, 29918, 29906, 29931, 29961, 29896, 1402, 29915, 3891, 29901, 9539, 742, 22976, 2433, 29877, 742, 3502, 414, 675, 29922, 29896, 29900, 29897, 13, 572, 29873, 29889, 5317, 29898, 1066, 2187, 29961, 29941, 1402, 29878, 1516, 29918, 29931, 29895, 29896, 29961, 29896, 1402, 29915, 3891, 29901, 9539, 742, 22976, 2433, 29877, 742, 3502, 414, 675, 29922, 29896, 29900, 29897, 13, 13, 268, 13, 572, 29873, 29889, 5317, 4197, 16272, 1402, 29915, 29895, 742, 22976, 2433, 29877, 742, 3502, 414, 675, 29922, 29896, 29900, 29892, 1643, 2433, 2190, 29940, 1495, 13, 572, 29873, 29889, 5317, 4197, 16272, 1402, 29915, 3891, 29901, 9539, 742, 22976, 2433, 29877, 742, 3502, 414, 675, 29922, 29896, 29900, 29892, 1643, 2433, 2797, 29967, 22192, 1495, 13, 572, 29873, 29889, 26172, 29898, 2029, 2433, 13609, 1492, 742, 2557, 265, 29922, 8824, 29892, 5657, 2311, 29922, 5657, 2311, 29892, 1643, 2780, 2433, 1220, 2780, 742, 3502, 414, 29883, 744, 29922, 29900, 29897, 13, 13, 572, 29873, 29889, 486, 7358, 29898, 1066, 2187, 29892, 1839, 276, 15916, 3788, 29931, 29974, 3788, 29906, 29931, 29974, 742, 29878, 29915, 29931, 29938, 648, 29895, 29896, 1042, 7464, 5657, 2311, 29922, 5657, 2311, 29897, 13, 572, 29873, 29889, 3637, 7358, 29898, 9302, 29889, 279, 927, 29898, 29900, 29892, 29941, 29892, 29900, 29889, 29945, 511, 9302, 29889, 279, 927, 29898, 29900, 29892, 29941, 29892, 29900, 29889, 29945, 511, 5657, 2311, 29922, 5657, 2311, 29897, 13, 572, 29873, 29889, 29916, 1643, 877, 735, 15362, 742, 5657, 2311, 29922, 5657, 2311, 29897, 13, 572, 29873, 29889, 29891, 1643, 29898, 29878, 13090, 7110, 6875, 29912, 29894, 2137, 29930, 648, 29878, 1516, 6525, 648, 29947, 29945, 29900, 29882, 11868, 1042, 742, 5657, 2311, 29922, 5657, 2311, 29897, 13, 13, 572, 29873, 29889, 29891, 2576, 4197, 29900, 29892, 29906, 29889, 29945, 2314, 13, 13, 361, 2436, 29906, 1445, 1275, 29871, 29896, 29901, 13, 1678, 14770, 29889, 7620, 1003, 29898, 3972, 29918, 1003, 718, 525, 1003, 29918, 29903, 29906, 29889, 5140, 1495, 13, 13, 572, 29873, 29889, 4294, 580, 13, 13, 13, 2 ]
fpb/base/dask.py
cloudmercato/python-fpb
3
134244
<reponame>cloudmercato/python-fpb import multiprocessing import dask import dask.array as da import dask.dataframe as dd from fpb.base import common from fpb.base import numpy class BaseDaskRunner(numpy.BaseNumpyRunner): dd = dd da = da extra_data = { 'numpy_version': numpy.np.__version__, 'dask_version': dask.__version__, } scheduler = 'threads' def check_output(self, output): if self.da.isinf(output).any(): raise self.TypeTooSmall() class BaseDask1dRunner(common.Runner1dMixin, BaseDaskRunner): """Helpers for Dask Runners in 1 dimension array""" def prepare(self, size, dtype): chunksize = int(size / multiprocessing.cpu_count()) data = self.da.random.random(size, chunks=chunksize)\ .astype(dtype) return data class BaseDask2dRunner(common.Runner2dMixin, BaseDaskRunner): """Helpers for Dask Runners in 2 dimension array""" def prepare(self, size, size_y, dtype): chunksize = (int(size / multiprocessing.cpu_count()), 1) data = self.da.random\ .random((size, size_y))\ .rechunk(chunksize)\ .astype(dtype) return data class BaseDaskDataframe2dRunner(BaseDask2dRunner): """Helpers for Dask Runners in 2 dataframes""" def check_output(self, output): pass def prepare(self, size, size_y, dtype): chunksize = (int(size / multiprocessing.cpu_count()), 1) da_data = self.da.random\ .random((size, size_y))\ .rechunk(chunksize)\ .astype(dtype) data = da_data.to_dask_dataframe() return data
[ 1, 529, 276, 1112, 420, 29958, 9274, 1050, 29883, 1219, 29914, 4691, 29899, 18091, 29890, 13, 5215, 6674, 307, 985, 292, 13, 5215, 270, 1278, 13, 5215, 270, 1278, 29889, 2378, 408, 1146, 13, 5215, 270, 1278, 29889, 1272, 2557, 408, 24488, 13, 3166, 285, 24381, 29889, 3188, 1053, 3619, 13, 3166, 285, 24381, 29889, 3188, 1053, 12655, 13, 13, 13, 1990, 7399, 29928, 1278, 16802, 29898, 23749, 29889, 5160, 8009, 2272, 16802, 1125, 13, 1678, 24488, 353, 24488, 13, 1678, 1146, 353, 1146, 13, 1678, 4805, 29918, 1272, 353, 426, 13, 4706, 525, 23749, 29918, 3259, 2396, 12655, 29889, 9302, 17255, 3259, 1649, 29892, 13, 4706, 525, 29881, 1278, 29918, 3259, 2396, 270, 1278, 17255, 3259, 1649, 29892, 13, 1678, 500, 13, 13, 1678, 1364, 14952, 353, 525, 28993, 29915, 13, 13, 1678, 822, 1423, 29918, 4905, 29898, 1311, 29892, 1962, 1125, 13, 4706, 565, 1583, 29889, 1388, 29889, 275, 7192, 29898, 4905, 467, 1384, 7295, 13, 9651, 12020, 1583, 29889, 1542, 1762, 29877, 12636, 497, 580, 13, 13, 13, 1990, 7399, 29928, 1278, 29896, 29881, 16802, 29898, 9435, 29889, 16802, 29896, 29881, 29924, 861, 262, 29892, 7399, 29928, 1278, 16802, 1125, 13, 1678, 9995, 7658, 6774, 363, 360, 1278, 390, 5963, 414, 297, 29871, 29896, 9927, 1409, 15945, 29908, 13, 1678, 822, 19012, 29898, 1311, 29892, 2159, 29892, 26688, 1125, 13, 4706, 521, 18801, 675, 353, 938, 29898, 2311, 847, 6674, 307, 985, 292, 29889, 21970, 29918, 2798, 3101, 13, 4706, 848, 353, 1583, 29889, 1388, 29889, 8172, 29889, 8172, 29898, 2311, 29892, 521, 18801, 29922, 305, 18801, 675, 2144, 13, 9651, 869, 579, 668, 29898, 29881, 1853, 29897, 13, 4706, 736, 848, 13, 13, 13, 1990, 7399, 29928, 1278, 29906, 29881, 16802, 29898, 9435, 29889, 16802, 29906, 29881, 29924, 861, 262, 29892, 7399, 29928, 1278, 16802, 1125, 13, 1678, 9995, 7658, 6774, 363, 360, 1278, 390, 5963, 414, 297, 29871, 29906, 9927, 1409, 15945, 29908, 13, 1678, 822, 19012, 29898, 1311, 29892, 2159, 29892, 2159, 29918, 29891, 29892, 26688, 1125, 13, 4706, 521, 18801, 675, 353, 313, 524, 29898, 2311, 847, 6674, 307, 985, 292, 29889, 21970, 29918, 2798, 25739, 29871, 29896, 29897, 13, 4706, 848, 353, 1583, 29889, 1388, 29889, 8172, 29905, 13, 9651, 869, 8172, 3552, 2311, 29892, 2159, 29918, 29891, 28986, 13, 9651, 869, 276, 29812, 29898, 305, 18801, 675, 2144, 13, 9651, 869, 579, 668, 29898, 29881, 1853, 29897, 13, 4706, 736, 848, 13, 13, 13, 1990, 7399, 29928, 1278, 1469, 2557, 29906, 29881, 16802, 29898, 5160, 29928, 1278, 29906, 29881, 16802, 1125, 13, 1678, 9995, 7658, 6774, 363, 360, 1278, 390, 5963, 414, 297, 29871, 29906, 848, 19935, 15945, 29908, 13, 1678, 822, 1423, 29918, 4905, 29898, 1311, 29892, 1962, 1125, 13, 4706, 1209, 13, 13, 1678, 822, 19012, 29898, 1311, 29892, 2159, 29892, 2159, 29918, 29891, 29892, 26688, 1125, 13, 4706, 521, 18801, 675, 353, 313, 524, 29898, 2311, 847, 6674, 307, 985, 292, 29889, 21970, 29918, 2798, 25739, 29871, 29896, 29897, 13, 4706, 1146, 29918, 1272, 353, 1583, 29889, 1388, 29889, 8172, 29905, 13, 9651, 869, 8172, 3552, 2311, 29892, 2159, 29918, 29891, 28986, 13, 9651, 869, 276, 29812, 29898, 305, 18801, 675, 2144, 13, 9651, 869, 579, 668, 29898, 29881, 1853, 29897, 13, 4706, 848, 353, 1146, 29918, 1272, 29889, 517, 29918, 29881, 1278, 29918, 1272, 2557, 580, 13, 4706, 736, 848, 13, 2 ]
examples/periodic2D/plot_diffraction_efficiencies.py
benvial/pytheas
10
99166
# -*- coding: utf-8 -*- """ Simulating diffraction by a 2D metamaterial =========================================== Finite element simulation of the diffraction of a plane wave by a mono-periodic grating and calculation of diffraction efficiencies. """ ############################################################################## # First we import the required modules and class import numpy as np import matplotlib.pyplot as plt from pytheas import genmat from pytheas import Periodic2D ############################################################################## # Then we need to instanciate the class :py:class:`Periodic2D`: fem = Periodic2D() ############################################################################## # The model consist of a single unit cell with quasi-periodic boundary conditions # in the :math:`x` direction enclosed with perfectly matched layers (PMLs) # in the :math:`y` direction to truncate the semi infinite media. From top to bottom: # # - PML top # - superstrate (incident medium) # - layer 1 # - design layer: this is the layer containing the periodic pattern, can be continuous or discrete # - layer 2 # - substrate # - PML bottom # # We define here the opto-geometric parameters: mum = 1e-6 #: flt: the scale of the problem (here micrometers) fem.d = 0.4 * mum #: flt: period fem.h_sup = 1.0 * mum #: flt: "thickness" superstrate fem.h_sub = 1.0 * mum #: flt: "thickness" substrate fem.h_layer1 = 0.1 * mum #: flt: thickness layer 1 fem.h_layer2 = 0.1 * mum #: flt: thickness layer 2 fem.h_des = 0.4 * mum #: flt: thickness layer design fem.h_pmltop = 1.0 * mum #: flt: thickness pml top fem.h_pmlbot = 1.0 * mum #: flt: thickness pml bot fem.a_pml = 1 #: flt: PMLs parameter, real part fem.b_pml = 1 #: flt: PMLs parameter, imaginary part fem.eps_sup = 1 #: flt: permittivity superstrate fem.eps_sub = 3 #: flt: permittivity substrate fem.eps_layer1 = 1 #: flt: permittivity layer 1 fem.eps_layer2 = 1 #: flt: permittivity layer 2 fem.eps_des = 1 #: flt: permittivity layer design fem.lambda0 = 0.6 * mum #: flt: incident wavelength fem.theta_deg = 0.0 #: flt: incident angle fem.pola = "TE" #: str: polarization (TE or TM) fem.lambda_mesh = 0.6 * mum #: flt: incident wavelength #: mesh parameters, correspond to a mesh size of lambda_mesh/(n*parmesh), #: where n is the refractive index of the medium fem.parmesh_des = 15 fem.parmesh = 13 fem.parmesh_pml = fem.parmesh * 2 / 3 fem.type_des = "elements" ############################################################################## # We then initialize the model (copying files, etc...) and mesh the unit # cell using gmsh fem.getdp_verbose = 0 fem.gmsh_verbose = 0 fem.initialize() mesh = fem.make_mesh() ############################################################################## # We use the :py:mod:`genmat` module to generate a material pattern genmat.np.random.seed(100) mat = genmat.MaterialDensity() # instanciate mat.n_x, mat.n_y, mat.n_z = 2 ** 7, 2 ** 7, 1 # sizes mat.xsym = True # symmetric with respect to x? mat.p_seed = mat.mat_rand # fix the pattern random seed mat.nb_threshold = 3 # number of materials mat._threshold_val = np.random.permutation(mat.threshold_val) mat.pattern = mat.discrete_pattern fig, ax = plt.subplots() mat.plot_pattern(fig, ax) ############################################################################## # We now assign the permittivity fem.register_pattern(mat.pattern, mat._threshold_val) fem.matprop_pattern = [1.4, 4 - 0.02 * 1j, 2] # refractive index values ############################################################################## # Now we're ready to compute the solution: fem.compute_solution() ############################################################################## # Finally we compute the diffraction efficiencies, absorption and energy balance effs_TE = fem.diffraction_efficiencies() print("efficiencies TE", effs_TE) ############################################################################## # It is fairly easy to switch to TM polarization: fem.pola = "TM" fem.compute_solution() effs_TM = fem.diffraction_efficiencies() print("efficiencies TM", effs_TM)
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 15945, 29908, 13, 8942, 18099, 2923, 13857, 491, 263, 29871, 29906, 29928, 1539, 314, 3795, 13, 9166, 9166, 4936, 25512, 13, 13, 12881, 568, 1543, 17402, 310, 278, 2923, 13857, 310, 263, 10694, 10742, 491, 263, 1601, 29877, 29899, 19145, 293, 13, 629, 1218, 322, 13944, 310, 2923, 13857, 6366, 819, 2478, 29889, 13, 15945, 29908, 13, 13, 13383, 13383, 13383, 13383, 7346, 4136, 2277, 13, 29937, 3824, 591, 1053, 278, 3734, 10585, 322, 770, 13, 13, 13, 5215, 12655, 408, 7442, 13, 5215, 22889, 29889, 2272, 5317, 408, 14770, 13, 3166, 11451, 1552, 294, 1053, 2531, 2922, 13, 3166, 11451, 1552, 294, 1053, 29498, 293, 29906, 29928, 13, 13, 13383, 13383, 13383, 13383, 7346, 4136, 2277, 13, 29937, 1987, 591, 817, 304, 832, 8463, 403, 278, 770, 584, 2272, 29901, 1990, 18078, 29853, 293, 29906, 29928, 6998, 13, 13, 29888, 331, 353, 29498, 293, 29906, 29928, 580, 13, 13, 13383, 13383, 13383, 13383, 7346, 4136, 2277, 13, 29937, 450, 1904, 5718, 310, 263, 2323, 5190, 3038, 411, 16452, 29899, 19145, 293, 10452, 5855, 13, 29937, 297, 278, 584, 755, 18078, 29916, 29952, 5305, 427, 15603, 411, 7970, 19228, 15359, 313, 29925, 1988, 29879, 29897, 13, 29937, 297, 278, 584, 755, 18078, 29891, 29952, 5305, 304, 21022, 403, 278, 12647, 10362, 5745, 29889, 3645, 2246, 304, 5970, 29901, 13, 29937, 13, 29937, 448, 349, 1988, 2246, 13, 29937, 448, 2428, 710, 403, 313, 3742, 1693, 18350, 29897, 13, 29937, 448, 7546, 29871, 29896, 13, 29937, 448, 2874, 7546, 29901, 445, 338, 278, 7546, 6943, 278, 29591, 4766, 29892, 508, 367, 9126, 470, 19554, 13, 29937, 448, 7546, 29871, 29906, 13, 29937, 448, 25148, 403, 13, 29937, 448, 349, 1988, 5970, 13, 29937, 13, 29937, 1334, 4529, 1244, 278, 3523, 29877, 29899, 479, 14066, 4128, 29901, 13, 13, 29885, 398, 353, 29871, 29896, 29872, 29899, 29953, 29871, 396, 29901, 1652, 29873, 29901, 278, 6287, 310, 278, 1108, 313, 4150, 20710, 456, 2699, 29897, 13, 29888, 331, 29889, 29881, 353, 29871, 29900, 29889, 29946, 334, 286, 398, 29871, 396, 29901, 1652, 29873, 29901, 3785, 13, 29888, 331, 29889, 29882, 29918, 12587, 353, 29871, 29896, 29889, 29900, 334, 286, 398, 29871, 396, 29901, 1652, 29873, 29901, 376, 27996, 2264, 29908, 2428, 710, 403, 13, 29888, 331, 29889, 29882, 29918, 1491, 353, 29871, 29896, 29889, 29900, 334, 286, 398, 29871, 396, 29901, 1652, 29873, 29901, 376, 27996, 2264, 29908, 25148, 403, 13, 29888, 331, 29889, 29882, 29918, 13148, 29896, 353, 29871, 29900, 29889, 29896, 334, 286, 398, 29871, 396, 29901, 1652, 29873, 29901, 12003, 2264, 7546, 29871, 29896, 13, 29888, 331, 29889, 29882, 29918, 13148, 29906, 353, 29871, 29900, 29889, 29896, 334, 286, 398, 29871, 396, 29901, 1652, 29873, 29901, 12003, 2264, 7546, 29871, 29906, 13, 29888, 331, 29889, 29882, 29918, 2783, 353, 29871, 29900, 29889, 29946, 334, 286, 398, 29871, 396, 29901, 1652, 29873, 29901, 12003, 2264, 7546, 2874, 13, 29888, 331, 29889, 29882, 29918, 29886, 828, 3332, 353, 29871, 29896, 29889, 29900, 334, 286, 398, 29871, 396, 29901, 1652, 29873, 29901, 12003, 2264, 282, 828, 2246, 13, 29888, 331, 29889, 29882, 29918, 29886, 828, 7451, 353, 29871, 29896, 29889, 29900, 334, 286, 398, 29871, 396, 29901, 1652, 29873, 29901, 12003, 2264, 282, 828, 9225, 13, 29888, 331, 29889, 29874, 29918, 29886, 828, 353, 29871, 29896, 29871, 396, 29901, 1652, 29873, 29901, 349, 1988, 29879, 3443, 29892, 1855, 760, 13, 29888, 331, 29889, 29890, 29918, 29886, 828, 353, 29871, 29896, 29871, 396, 29901, 1652, 29873, 29901, 349, 1988, 29879, 3443, 29892, 6382, 3821, 760, 13, 29888, 331, 29889, 8961, 29918, 12587, 353, 29871, 29896, 29871, 396, 29901, 1652, 29873, 29901, 3635, 986, 2068, 2428, 710, 403, 13, 29888, 331, 29889, 8961, 29918, 1491, 353, 29871, 29941, 29871, 396, 29901, 1652, 29873, 29901, 3635, 986, 2068, 25148, 403, 13, 29888, 331, 29889, 8961, 29918, 13148, 29896, 353, 29871, 29896, 29871, 396, 29901, 1652, 29873, 29901, 3635, 986, 2068, 7546, 29871, 29896, 13, 29888, 331, 29889, 8961, 29918, 13148, 29906, 353, 29871, 29896, 29871, 396, 29901, 1652, 29873, 29901, 3635, 986, 2068, 7546, 29871, 29906, 13, 29888, 331, 29889, 8961, 29918, 2783, 353, 29871, 29896, 29871, 396, 29901, 1652, 29873, 29901, 3635, 986, 2068, 7546, 2874, 13, 29888, 331, 29889, 2892, 29900, 353, 29871, 29900, 29889, 29953, 334, 286, 398, 29871, 396, 29901, 1652, 29873, 29901, 15134, 281, 6447, 1477, 13, 29888, 331, 29889, 3416, 29918, 12163, 353, 29871, 29900, 29889, 29900, 29871, 396, 29901, 1652, 29873, 29901, 15134, 10696, 13, 29888, 331, 29889, 29886, 2963, 353, 376, 4330, 29908, 29871, 396, 29901, 851, 29901, 16755, 2133, 313, 4330, 470, 323, 29924, 29897, 13, 29888, 331, 29889, 2892, 29918, 4467, 29882, 353, 29871, 29900, 29889, 29953, 334, 286, 398, 29871, 396, 29901, 1652, 29873, 29901, 15134, 281, 6447, 1477, 13, 29937, 29901, 27716, 4128, 29892, 3928, 304, 263, 27716, 2159, 310, 14013, 29918, 4467, 29882, 14571, 29876, 29930, 862, 4467, 29882, 511, 13, 29937, 29901, 988, 302, 338, 278, 2143, 1461, 573, 2380, 310, 278, 18350, 13, 29888, 331, 29889, 862, 4467, 29882, 29918, 2783, 353, 29871, 29896, 29945, 13, 29888, 331, 29889, 862, 4467, 29882, 353, 29871, 29896, 29941, 13, 29888, 331, 29889, 862, 4467, 29882, 29918, 29886, 828, 353, 4445, 29889, 862, 4467, 29882, 334, 29871, 29906, 847, 29871, 29941, 13, 29888, 331, 29889, 1853, 29918, 2783, 353, 376, 17664, 29908, 13, 13, 13, 13383, 13383, 13383, 13383, 7346, 4136, 2277, 13, 29937, 1334, 769, 11905, 278, 1904, 313, 8552, 292, 2066, 29892, 2992, 11410, 322, 27716, 278, 5190, 13, 29937, 3038, 773, 330, 29885, 845, 13, 13, 29888, 331, 29889, 657, 6099, 29918, 369, 15828, 353, 29871, 29900, 13, 29888, 331, 29889, 29887, 29885, 845, 29918, 369, 15828, 353, 29871, 29900, 13, 13, 29888, 331, 29889, 24926, 580, 13, 4467, 29882, 353, 4445, 29889, 5675, 29918, 4467, 29882, 580, 13, 13, 13383, 13383, 13383, 13383, 7346, 4136, 2277, 13, 29937, 1334, 671, 278, 584, 2272, 29901, 1545, 18078, 1885, 2922, 29952, 3883, 304, 5706, 263, 5518, 4766, 13, 13, 1885, 2922, 29889, 9302, 29889, 8172, 29889, 26776, 29898, 29896, 29900, 29900, 29897, 13, 2922, 353, 2531, 2922, 29889, 24095, 29928, 575, 537, 580, 29871, 396, 832, 8463, 403, 13, 2922, 29889, 29876, 29918, 29916, 29892, 1775, 29889, 29876, 29918, 29891, 29892, 1775, 29889, 29876, 29918, 29920, 353, 29871, 29906, 3579, 29871, 29955, 29892, 29871, 29906, 3579, 29871, 29955, 29892, 29871, 29896, 29871, 396, 15786, 13, 2922, 29889, 10351, 962, 353, 5852, 29871, 396, 18348, 411, 3390, 304, 921, 29973, 13, 2922, 29889, 29886, 29918, 26776, 353, 1775, 29889, 2922, 29918, 9502, 29871, 396, 2329, 278, 4766, 4036, 16717, 13, 2922, 29889, 9877, 29918, 386, 12268, 353, 29871, 29941, 29871, 396, 1353, 310, 17279, 13, 2922, 3032, 386, 12268, 29918, 791, 353, 7442, 29889, 8172, 29889, 546, 6149, 362, 29898, 2922, 29889, 386, 12268, 29918, 791, 29897, 13, 2922, 29889, 11037, 353, 1775, 29889, 2218, 9084, 29918, 11037, 13, 1003, 29892, 4853, 353, 14770, 29889, 1491, 26762, 580, 13, 2922, 29889, 5317, 29918, 11037, 29898, 1003, 29892, 4853, 29897, 13, 13, 13, 13383, 13383, 13383, 13383, 7346, 4136, 2277, 13, 29937, 1334, 1286, 3566, 278, 3635, 986, 2068, 13, 13, 29888, 331, 29889, 9573, 29918, 11037, 29898, 2922, 29889, 11037, 29892, 1775, 3032, 386, 12268, 29918, 791, 29897, 13, 29888, 331, 29889, 2922, 7728, 29918, 11037, 353, 518, 29896, 29889, 29946, 29892, 29871, 29946, 448, 29871, 29900, 29889, 29900, 29906, 334, 29871, 29896, 29926, 29892, 29871, 29906, 29962, 29871, 396, 2143, 1461, 573, 2380, 1819, 13, 13, 13383, 13383, 13383, 13383, 7346, 4136, 2277, 13, 29937, 2567, 591, 29915, 276, 7960, 304, 10272, 278, 1650, 29901, 13, 13, 29888, 331, 29889, 26017, 29918, 2929, 918, 580, 13, 13, 13383, 13383, 13383, 13383, 7346, 4136, 2277, 13, 29937, 9788, 591, 10272, 278, 2923, 13857, 6366, 819, 2478, 29892, 17977, 683, 322, 5864, 17346, 13, 13, 12352, 29879, 29918, 4330, 353, 4445, 29889, 12765, 13857, 29918, 29872, 2416, 819, 2478, 580, 13, 2158, 703, 29872, 2416, 819, 2478, 17067, 613, 1801, 29879, 29918, 4330, 29897, 13, 13, 13383, 13383, 13383, 13383, 7346, 4136, 2277, 13, 29937, 739, 338, 12558, 4780, 304, 4607, 304, 323, 29924, 16755, 2133, 29901, 13, 13, 29888, 331, 29889, 29886, 2963, 353, 376, 23081, 29908, 13, 29888, 331, 29889, 26017, 29918, 2929, 918, 580, 13, 12352, 29879, 29918, 23081, 353, 4445, 29889, 12765, 13857, 29918, 29872, 2416, 819, 2478, 580, 13, 2158, 703, 29872, 2416, 819, 2478, 323, 29924, 613, 1801, 29879, 29918, 23081, 29897, 13, 2 ]
django_cradmin/uicontainer/container.py
appressoas/django_cradmin
11
32117
<reponame>appressoas/django_cradmin from django.conf import settings from django.forms.utils import flatatt from django_cradmin import renderable class NotBootsrappedError(Exception): """ Raised when trying to use features of :class:`.AbstractContainerRenderable` that requires is to have been bootstrapped. """ class AlreadyBootsrappedError(Exception): """ Raised when trying to :meth:`~.AbstractContainerRenderable.bootstrap` and already bootstrapped :class:`.AbstractContainerRenderable`. """ class NotAllowedToAddChildrenError(Exception): """ Raised when trying to add children to a :class:`.AbstractContainerRenderable` where :meth:`~.AbstractContainerRenderable.html_tag_supports_children` returns ``False``. """ class UnsupportedHtmlTagError(ValueError): """ Raised when providing an invalid ``html_tag`` kwarg to :class:`.AbstractContainerRenderable`. See :obj:`.AbstractContainerRenderable.supported_html_tags`. """ class InvalidBemError(ValueError): """ Raised when invalid BEM is supplied. """ class InvalidDomIdError(ValueError): """ Raised when invalid dom_id is supplied. """ class AbstractContainerRenderable(renderable.AbstractRenderableWithCss): """ Base class for all renderables in the uicontainer framework. This can not be used directly. You extend it, and at least override :meth:`.get_default_html_tag`, or use one of the subclasses. The most basic subclass is :class:`django_cradmin.uicontainer.div.Div`. .. attribute:: parent The parent AbstractContainerRenderable. Set in :meth:`.bootstrap`. The attribute does not exist if :meth:`.bootstrap` has not been run. Is ``None`` if this is the root of the container tree. .. attribute:: properties A dict of properties. These properties is copied down to the ``properties`` attribute of children (with the update-method, not full replace) in :meth:`.bootstrap`. This means that you can add properties in ``__init__()``, and make them available to any children recursively. """ template_name = 'django_cradmin/uicontainer/container.django.html' #: You can override this to specify a set of supported HTML tags #: for the ``html_tag`` attribute for :meth:`~.AbstractContainerRenderable.__init__`. #: This is useful to avoid typing errors. It should not be a big problem if you #: forget a tag that should be supported - developers can just create a subclass. #: #: If the value of this field is None, or any other value that is considered False by #: ``bool()``, we do not validate the ``html_tag`` kwarg. supported_html_tags = None def __init__(self, children=None, bem_block=None, bem_element=None, bem_variant_list=None, html_tag=None, css_classes_list=None, extra_css_classes_list=None, test_css_class_suffixes_list=None, role=False, dom_id=False, html_element_attributes=None, **kwargs): """ Args: children: List of children. Children must be objects of subclasses of :class:`.AbstractContainerRenderable`. css_classes_list (list): Override the :meth:`default css classes <.get_default_css_classes_list>` with your own list of css classes. extra_css_classes_list (list): Add extra css classes. This is appended to the css classes in the ``css_classes_list`` kwarg if that is specified, or appended to the css classes returned by :meth:`.get_default_css_classes_list`. role (str): The value of the role attribute. If this is not specified, we fall back on the value returned by :meth:`.get_default_role`. If both is ``False``, we do not render the role attribute. dom_id (str): The value of the id attribute. If this is not specified, we fall back on the value returned by :meth:`.get_default_dom_id`. If both is ``False``, we do not render the id attribute. html_element_attributes (dict): HTML element attributes to add to the HTML element. This adds attributes returned by :meth:`.get_html_element_attributes`. If this dict includes attributes returned by :meth:`.get_html_element_attributes`, the attributes specified in this kwarg takes presedense. The format of the dict is specified in :meth:`.get_html_element_attributes`. """ self.kwargs = kwargs self.validate_dom_id(dom_id=dom_id) self.validate_bem(bem_block=bem_block, bem_element=bem_element) self.validate_html_tag(html_tag=html_tag) self._childrenlist = [] self._virtual_childrenlist = [] self._is_bootstrapped = False self.properties = {} self._overridden_bem_block_or_element = bem_block or bem_element self._overridden_bem_variant_list = bem_variant_list self._overridden_role = role self._overridden_dom_id = dom_id self._overridden_html_tag = html_tag self._html_element_attributes = html_element_attributes self._overridden_css_classes_list = css_classes_list self._overridden_test_css_class_suffixes_list = test_css_class_suffixes_list self._extra_css_classes_list = extra_css_classes_list self.add_children(*self.prepopulate_children_list()) self.add_virtual_children(*self.prepopulate_virtual_children_list()) if children: self.add_children(*children) def should_validate_dom_id(self): """ Should we raise :class:`.InvalidDomIdError` exception when the ``dom_id`` kwarg is malformed. Returns the value of the :setting:`DJANGO_CRADMIN_UICONTAINER_VALIDATE_DOM_ID` setting, falling back to ``True`` if it is not defined. The validator requires the dom_id to start with ``id_``, be lowercase, and not contain ``-``. We recommend to not override this to ensure uniform DOM id naming. You should disable this validation in production using the :setting:`DJANGO_CRADMIN_UICONTAINER_VALIDATE_DOM_ID` setting. """ return getattr(settings, 'DJANGO_CRADMIN_UICONTAINER_VALIDATE_DOM_ID', True) def should_validate_bem(self): """ Should we raise :class:`.InvalidBemIdError` exception when the ``bem_block`` or ``bem_element`` kwarg is malformed? Returns the value of the :setting:`DJANGO_CRADMIN_UICONTAINER_VALIDATE_BEM` setting, falling back to ``True`` if it is not defined. The validator requires the bem_block to not contain ``__`` (double underscore), and the bem_element to comtain ``__`` (double underscore). We recommend to not chanding this to ensure BEM elements and blocks are used correctly. You should disable this validation in production using the :setting:`DJANGO_CRADMIN_UICONTAINER_VALIDATE_BEM` setting. """ return getattr(settings, 'DJANGO_CRADMIN_UICONTAINER_VALIDATE_BEM', True) def validate_dom_id(self, dom_id): if dom_id is False: return if not self.should_validate_dom_id(): return normalized_dom_id = dom_id.replace('-', '').lower() if not dom_id.startswith('id_') or dom_id != normalized_dom_id: raise InvalidDomIdError( 'dom_id must begin with "id_", be all lowercase, and can not contain "-". ' '{dom_id!r} does not match this requirement.'.format( dom_id=dom_id)) def validate_bem(self, bem_block, bem_element): if not self.should_validate_bem(): return if bem_block and bem_element: raise InvalidBemError( 'Can not specify both bem_element or bem_block. An ' 'HTML element is eighter a BEM block or a BEM element.') if bem_block: if '__' in bem_block: raise InvalidBemError( '{bem_block} is not a valid BEM block name. ' 'BEM blocks do not contain "__". Are you sure you ' 'did not mean to use the bem_element kwarg?'.format( bem_block=bem_block )) elif bem_element: if '__' not in bem_element: raise InvalidBemError( '{bem_element} is not a valid BEM element name. ' 'BEM elements must contain "__". Are you sure you ' 'did not mean to use the bem_block kwarg?'.format( bem_element=bem_element )) def get_full_class_path_as_string(self): """ Get full class path as string. Useful for providing some extra information in exceptions. Normally this will be in a traceback, but when dealing with things rendered by a Django template, this information is not always included. """ return '{}.{}'.format(self.__class__.__module__, self.__class__.__name__) def validate_html_tag(self, html_tag): if html_tag and self.supported_html_tags and html_tag not in self.supported_html_tags: raise UnsupportedHtmlTagError('Unsupported HTML tag for {classpath}: {html_tag}'.format( classpath=self.get_full_class_path_as_string(), html_tag=self._overridden_html_tag )) def get_default_html_tag(self): """ Get the default HTML tag to wrap renderable in. Can be overriden by the ``html_tag`` kwarg for :meth:`.__init__`. Returns ``"div"`` by default. """ return 'div' @property def html_tag(self): """ Get the HTML tag for this container. """ return self._overridden_html_tag or self.get_default_html_tag() @property def html_tag_supports_children(self): """ Does the html tag support children? If this returns ``False``, we: - Do not render an end tag for the wrapper element. - Do not allow children to be added to the container. Should be overridden to return ``False`` if the :meth:`.get_default_html_tag` does not allow for children. Examples of this case is if the wrapper html tag i ``input`` or ``hr``. See also :meth:`.can_have_children`, which should be used if the HTML tag should have and end tag, but not children. Returns: boolean: True by default. """ return True @property def can_have_children(self): """ Can this container have children? If this returns ``False``, :meth:`.add_child` will raise :class:`.NotAllowedToAddChildrenError`. Returns: boolean: The return value from :meth:`.html_tag_supports_children` by default. """ return self.html_tag_supports_children def get_default_role(self): """ Get the default value for the role attribute of the html element. Defaults to ``False``. """ return False @property def role(self): """ Get the value for the role attribute of the html element. You should not override this. Override :meth:`.get_default_role` instead. """ return self._overridden_role or self.get_default_role() def get_default_dom_id(self): """ Get the default value for the id attribute of the html element. Defaults to ``False``. """ return False @property def dom_id(self): """ Get the value for the id attribute of the html element. You should not override this. Override :meth:`.get_default_dom_id` instead. """ return self._overridden_dom_id or self.get_default_dom_id() def get_html_element_attributes(self): """ Get HTML element attributes as a dict. The dict is parsed by :func:`django.forms.utils.flatatt`, so: - ``{'myattribute': True}`` results in ``myattribute`` (no value). - ``{'myattribute': False}`` results in the attribute beeing ignored (not included in the output). - ``{'myattribute': 'Some value'}`` results in the ``myattribute="Some value"``. If you override this method, *remember to call super* to get the attributes set in the superclass. """ html_element_attributes = { 'role': self.role, 'id': self.dom_id, 'class': self.css_classes or False, # Fall back to false to avoid class="" } if self._html_element_attributes: html_element_attributes.update(self._html_element_attributes) return html_element_attributes @property def html_element_attributes_string(self): """ Get :meth:`.get_html_element_attributes` + any attributes in the ``html_element_attributes`` kwarg for :meth:`.__init__` encoded as a string using :func:`django.forms.utils.flatatt`. """ return flatatt(self.get_html_element_attributes()) def get_default_css_classes_list(self): """ Override this to provide a default list of css classes. The css classes specified here can be overridden using the ``css_classes_list`` kwarg for :meth:`.__init__`. """ return [] def get_default_bem_block_or_element(self): """ Get the default BEM block or element. A HTML element is eighter a BEM block or a BEM element, so we have joined this into a single method. """ return None def get_bem_block_or_element(self): """ Get the BEM block or element. DO NOT OVERRIDE THIS METHOD. Override :meth:`.get_default_bem_block_or_element` instead. """ return (self._overridden_bem_block_or_element or self.get_default_bem_block_or_element()) def get_default_bem_variant_list(self): """ Get the default BEM variants. The full CSS class of any variant in the list will be :meth:`.get_bem_block_or_element` with ``--`` and the variant appended, so if the bem block/element is ``"menu"``, and the variant is ``"expanded"``, the resulting css class will be ``"menu--expanded"``. """ return [] def get_bem_variant_list(self): """ Get the list of BEM variants. DO NOT OVERRIDE THIS METHOD. Override :meth:`.get_default_bem_variant_list` instead. """ return self._overridden_bem_variant_list or self.get_default_bem_variant_list() def get_bem_css_classes_list(self): """ Get the BEM css classes as list. DO NOT OVERRIDE THIS METHOD. Override :meth:`.get_default_bem_block_or_element` and :meth:`.get_default_bem_variant_list` instead. """ bem_block_or_element = self.get_bem_block_or_element() bem_css_classes = [] if bem_block_or_element: bem_css_classes.append(bem_block_or_element) for variant in self.get_bem_variant_list(): css_class = '{}--{}'.format(bem_block_or_element, variant) bem_css_classes.append(css_class) return bem_css_classes def get_css_classes_list(self): """ DO NOT OVERRIDE THIS METHOD. Unlike with :class:`django_cradmin.renderable.AbstractRenderableWithCss`, you do not override this class to add your own css classes. Override :meth:`.get_default_css_classes_list`. This is because this method respects the ``css_classes_list`` kwarg for :meth:`.__init__`, and just falls back to :meth:`.get_default_css_classes_list`. So if you override this method, the ``css_classes_list`` kwarg will be useless. """ css_classes_list = self.get_bem_css_classes_list() if self._overridden_css_classes_list: css_classes_list.extend(self._overridden_css_classes_list) else: css_classes_list.extend(self.get_default_css_classes_list()) if self._extra_css_classes_list: css_classes_list.extend(self._extra_css_classes_list) return css_classes_list def get_default_test_css_class_suffixes_list(self): """ Override this to provide a default list of css classes for unit tests. The css classes specified here can be overridden using the ``test_css_class_suffixes_list`` kwarg for :meth:`.__init__`. """ return ['uicontainer-{}'.format(self.__class__.__name__.lower())] def get_test_css_class_suffixes_list(self): """ DO NOT OVERRIDE THIS METHOD. Unlike with :class:`django_cradmin.renderable.AbstractRenderableWithCss`, you do not override this class to add your own test css classes. Override :meth:`.get_default_test_css_class_suffixes_list`. This is because this method respects the ``test_css_class_suffixes_list`` kwarg for :meth:`.__init__`, and just falls back to :meth:`.get_default_test_css_class_suffixes_list`. So if you override this method, the ``test_css_class_suffixes_list`` kwarg will be useless. """ if self._overridden_test_css_class_suffixes_list: test_css_class_suffixes_list = self._overridden_test_css_class_suffixes_list else: test_css_class_suffixes_list = self.get_default_test_css_class_suffixes_list() return test_css_class_suffixes_list def bootstrap(self, parent=None): """ Bootstrap the container. Must be called once on the top-level container in the tree of containers. Sets the provided parent as :attr:`.parent`. Updates the properties of all children (using dict update()) with :attr:`.properties`. """ if self._is_bootstrapped: raise AlreadyBootsrappedError('The container is already bootstrapped. Can not bootstrap ' 'the same container twice.') self.parent = parent if self.parent: self.properties.update(self.parent.properties) for child in self._virtual_childrenlist: child.bootstrap(parent=self) for child in self._childrenlist: child.bootstrap(parent=self) self._is_bootstrapped = True return self def prepopulate_children_list(self): """ Pre-polulate the children list. This is called in :meth:`.__init__` before any children from the kwargs is added. Returns: list: An empty list by default, but you can override this in subclasses. """ return [] def prepopulate_virtual_children_list(self): """ Pre-polulate the virtual children list. This is called in :meth:`.__init__` before any children from the kwargs is added, and before any children is :meth:`.prepopulate_children_list` is added. Returns: list: An empty list by default, but you can override this in subclasses. """ return [] def add_child(self, childcontainer): """ Add a child to the container. Args: childcontainer: A :class:`.AbstractContainerRenderable` object. Returns: A reference to self. This means that you can chain calls to this method. """ if self.can_have_children: self._childrenlist.append(childcontainer) if self._is_bootstrapped and not childcontainer._is_bootstrapped: childcontainer.bootstrap(parent=self) else: raise NotAllowedToAddChildrenError('{modulename}.{classname} can not have children'.format( modulename=self.__class__.__module__, classname=self.__class__.__name__ )) return self def add_virtual_child(self, childcontainer): """ Add a "virtual" child to the container. This child is not rendered as a child of the container automatically (that is left to the template rendering the container). But it inherits properties and is automatically bootstrapped just like a regular child. Args: childcontainer: A :class:`.AbstractContainerRenderable` object. Returns: A reference to self. This means that you can chain calls to this method. """ if self.can_have_children: self._virtual_childrenlist.append(childcontainer) if self._is_bootstrapped and not childcontainer._is_bootstrapped: childcontainer.bootstrap(parent=self) return self def add_children(self, *childcontainers): """ Add children to the container. Args: *childcontainers: Zero or more :class:`.AbstractContainerRenderable` objects. Returns: A reference to self. This means that you can chain calls to this method. """ for childcontainer in childcontainers: self.add_child(childcontainer) return self def add_virtual_children(self, *childcontainers): """ Add virtual children to the container. Args: *childcontainers: Zero or more :class:`.AbstractContainerRenderable` objects. Returns: A reference to self. This means that you can chain calls to this method. """ for childcontainer in childcontainers: self.add_virtual_child(childcontainer) return self def iter_children(self): """ Returns an iterator over the children of this container. The yielded children will be objects of :class:`.AbstractContainerRenderable` subclasses. """ return iter(self._childrenlist) def iter_virtual_children(self): """ Returns an iterator over the virtual children of this container. The yielded children will be objects of :class:`.AbstractContainerRenderable` subclasses. """ return iter(self._virtual_childrenlist) def get_childcount(self): """ Get the number of children in the container. """ return len(self._childrenlist) def get_virtual_childcount(self): """ Get the number of virtual children in the container. """ return len(self._virtual_childrenlist) @property def should_render(self): """ Should we render anything? Override this to make the :meth:`.render` to control if the container is rendered. If this returns ``False``, :meth:`.render` returns an empty string instead of rendering the template. Returns: bool: ``True`` by default, but subclasses can override this behavior. """ return True def render(self, **kwargs): """ Overrides :meth:`django_cradmin.renderable.AbstractRenderable.render`. The only change is that we return an empty string if :meth:`.should_render` returns ``False``. If it returns ``True``, we call the overriden method and returns the result. Args: **kwargs: Forwarded to the overridden method if it is called. """ if not self._is_bootstrapped: raise NotBootsrappedError( 'Can not render an AbstractContainerRenderable that has not been bootstrapped. ' 'Ensure you call bootsrap() on the top-level container in the container ' 'hierarchy before rendering. Class causing this issue: {classpath}'.format( classpath=self.get_full_class_path_as_string() )) if self.should_render: return super(AbstractContainerRenderable, self).render(**kwargs) else: return '' class Div(AbstractContainerRenderable): """ Renders a ``<div>``. The only thing this class does is to override :meth:`django_cradmin.uicontainer.container.AbstractContainerRenderable.get_default_html_tag` and return ``"div"``. """ def get_default_html_tag(self): return 'div' class NoWrapperElement(AbstractContainerRenderable): """ Renders children, but no wrapper HTML element. """ template_name = 'django_cradmin/uicontainer/no_wrapper_element.django.html'
[ 1, 529, 276, 1112, 420, 29958, 932, 1253, 29877, 294, 29914, 14095, 29918, 29883, 3665, 1195, 13, 3166, 9557, 29889, 5527, 1053, 6055, 13, 3166, 9557, 29889, 9514, 29889, 13239, 1053, 12151, 1131, 13, 3166, 9557, 29918, 29883, 3665, 1195, 1053, 4050, 519, 13, 13, 13, 1990, 2216, 8431, 1862, 336, 2986, 2392, 29898, 2451, 1125, 13, 1678, 9995, 13, 1678, 390, 1759, 287, 746, 1811, 304, 671, 5680, 310, 13, 1678, 584, 1990, 29901, 1412, 9118, 7895, 10716, 519, 29952, 13, 1678, 393, 6858, 338, 304, 505, 1063, 6579, 4151, 2986, 29889, 13, 1678, 9995, 13, 13, 13, 1990, 838, 2040, 8431, 1862, 336, 2986, 2392, 29898, 2451, 1125, 13, 1678, 9995, 13, 1678, 390, 1759, 287, 746, 1811, 304, 584, 29885, 621, 18078, 30022, 29889, 9118, 7895, 10716, 519, 29889, 8704, 29952, 13, 1678, 322, 2307, 6579, 4151, 2986, 584, 1990, 29901, 1412, 9118, 7895, 10716, 519, 1412, 13, 1678, 9995, 13, 13, 13, 1990, 2216, 15930, 287, 1762, 2528, 19334, 2392, 29898, 2451, 1125, 13, 1678, 9995, 13, 1678, 390, 1759, 287, 746, 1811, 304, 788, 4344, 304, 263, 584, 1990, 29901, 1412, 9118, 7895, 10716, 519, 29952, 13, 1678, 988, 584, 29885, 621, 18078, 30022, 29889, 9118, 7895, 10716, 519, 29889, 1420, 29918, 4039, 29918, 5924, 29879, 29918, 11991, 29952, 13, 1678, 3639, 4954, 8824, 29952, 1412, 13, 1678, 9995, 13, 13, 13, 1990, 853, 23765, 10922, 8176, 2392, 29898, 1917, 2392, 1125, 13, 1678, 9995, 13, 1678, 390, 1759, 287, 746, 13138, 385, 8340, 4954, 1420, 29918, 4039, 16159, 9049, 1191, 304, 584, 1990, 29901, 1412, 9118, 7895, 10716, 519, 1412, 13, 13, 1678, 2823, 584, 5415, 29901, 1412, 9118, 7895, 10716, 519, 29889, 23765, 29918, 1420, 29918, 11338, 1412, 13, 1678, 9995, 13, 13, 13, 1990, 21403, 29933, 331, 2392, 29898, 1917, 2392, 1125, 13, 1678, 9995, 13, 1678, 390, 1759, 287, 746, 8340, 350, 12665, 338, 19056, 29889, 13, 1678, 9995, 13, 13, 13, 1990, 21403, 11096, 1204, 2392, 29898, 1917, 2392, 1125, 13, 1678, 9995, 13, 1678, 390, 1759, 287, 746, 8340, 2432, 29918, 333, 338, 19056, 29889, 13, 1678, 9995, 13, 13, 13, 1990, 25513, 7895, 10716, 519, 29898, 9482, 519, 29889, 9118, 10716, 519, 3047, 29907, 893, 1125, 13, 1678, 9995, 13, 1678, 7399, 770, 363, 599, 4050, 1849, 297, 278, 318, 293, 609, 4008, 6890, 29889, 13, 13, 1678, 910, 508, 451, 367, 1304, 4153, 29889, 887, 10985, 372, 29892, 322, 472, 3203, 5712, 13, 1678, 584, 29885, 621, 29901, 1412, 657, 29918, 4381, 29918, 1420, 29918, 4039, 1673, 470, 671, 697, 310, 278, 1014, 13203, 29889, 13, 13, 1678, 450, 1556, 6996, 19481, 338, 584, 1990, 18078, 14095, 29918, 29883, 3665, 1195, 29889, 29884, 293, 609, 4008, 29889, 4563, 29889, 12596, 1412, 13, 13, 1678, 6317, 5352, 1057, 3847, 13, 13, 4706, 450, 3847, 25513, 7895, 10716, 519, 29889, 3789, 297, 584, 29885, 621, 29901, 1412, 8704, 1412, 13, 4706, 450, 5352, 947, 451, 1863, 565, 584, 29885, 621, 29901, 1412, 8704, 29952, 756, 451, 1063, 13, 4706, 1065, 29889, 1317, 4954, 8516, 16159, 565, 445, 338, 278, 3876, 310, 278, 5639, 5447, 29889, 13, 13, 1678, 6317, 5352, 1057, 4426, 13, 13, 4706, 319, 9657, 310, 4426, 29889, 4525, 4426, 338, 13746, 1623, 304, 278, 13, 4706, 4954, 11330, 16159, 5352, 310, 4344, 313, 2541, 278, 2767, 29899, 5696, 29892, 451, 2989, 5191, 29897, 13, 4706, 297, 584, 29885, 621, 29901, 1412, 8704, 1412, 13, 4706, 910, 2794, 393, 366, 508, 788, 4426, 297, 4954, 1649, 2344, 1649, 2555, 1673, 13, 4706, 322, 1207, 963, 3625, 304, 738, 4344, 8304, 3598, 29889, 13, 1678, 9995, 13, 1678, 4472, 29918, 978, 353, 525, 14095, 29918, 29883, 3665, 1195, 29914, 29884, 293, 609, 4008, 29914, 7611, 29889, 14095, 29889, 1420, 29915, 13, 13, 1678, 396, 29901, 887, 508, 5712, 445, 304, 6084, 263, 731, 310, 6969, 4544, 8282, 13, 1678, 396, 29901, 363, 278, 4954, 1420, 29918, 4039, 16159, 5352, 363, 584, 29885, 621, 18078, 30022, 29889, 9118, 7895, 10716, 519, 17255, 2344, 1649, 1412, 13, 1678, 396, 29901, 910, 338, 5407, 304, 4772, 19229, 4436, 29889, 739, 881, 451, 367, 263, 4802, 1108, 565, 366, 13, 1678, 396, 29901, 9566, 263, 4055, 393, 881, 367, 6969, 448, 18777, 508, 925, 1653, 263, 19481, 29889, 13, 1678, 396, 29901, 13, 1678, 396, 29901, 960, 278, 995, 310, 445, 1746, 338, 6213, 29892, 470, 738, 916, 995, 393, 338, 5545, 7700, 491, 13, 1678, 396, 29901, 4954, 11227, 2555, 1673, 591, 437, 451, 12725, 278, 4954, 1420, 29918, 4039, 16159, 9049, 1191, 29889, 13, 1678, 6969, 29918, 1420, 29918, 11338, 353, 6213, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 4344, 29922, 8516, 29892, 13, 462, 15522, 29918, 1271, 29922, 8516, 29892, 15522, 29918, 5029, 29922, 8516, 29892, 15522, 29918, 19365, 29918, 1761, 29922, 8516, 29892, 13, 462, 3472, 29918, 4039, 29922, 8516, 29892, 13, 462, 5997, 29918, 13203, 29918, 1761, 29922, 8516, 29892, 13, 462, 4805, 29918, 4268, 29918, 13203, 29918, 1761, 29922, 8516, 29892, 13, 462, 1243, 29918, 4268, 29918, 1990, 29918, 2146, 600, 861, 267, 29918, 1761, 29922, 8516, 29892, 13, 462, 6297, 29922, 8824, 29892, 13, 462, 2432, 29918, 333, 29922, 8824, 29892, 13, 462, 3472, 29918, 5029, 29918, 15697, 29922, 8516, 29892, 13, 462, 3579, 19290, 1125, 13, 4706, 9995, 13, 4706, 826, 3174, 29901, 13, 9651, 4344, 29901, 2391, 310, 4344, 29889, 20986, 1818, 367, 3618, 310, 1014, 13203, 13, 18884, 310, 584, 1990, 29901, 1412, 9118, 7895, 10716, 519, 1412, 13, 9651, 5997, 29918, 13203, 29918, 1761, 313, 1761, 1125, 6811, 2426, 278, 584, 29885, 621, 18078, 4381, 5997, 4413, 529, 29889, 657, 29918, 4381, 29918, 4268, 29918, 13203, 29918, 1761, 13885, 13, 18884, 411, 596, 1914, 1051, 310, 5997, 4413, 29889, 13, 9651, 4805, 29918, 4268, 29918, 13203, 29918, 1761, 313, 1761, 1125, 3462, 4805, 5997, 4413, 29889, 910, 338, 623, 2760, 304, 13, 18884, 278, 5997, 4413, 297, 278, 4954, 4268, 29918, 13203, 29918, 1761, 16159, 9049, 1191, 565, 393, 338, 6790, 29892, 13, 18884, 470, 623, 2760, 304, 278, 5997, 4413, 4133, 491, 13, 18884, 584, 29885, 621, 29901, 1412, 657, 29918, 4381, 29918, 4268, 29918, 13203, 29918, 1761, 1412, 13, 9651, 6297, 313, 710, 1125, 450, 995, 310, 278, 6297, 5352, 29889, 13, 18884, 960, 445, 338, 451, 6790, 29892, 591, 6416, 1250, 373, 278, 995, 4133, 13, 18884, 491, 584, 29885, 621, 29901, 1412, 657, 29918, 4381, 29918, 12154, 1412, 13, 18884, 960, 1716, 338, 4954, 8824, 29952, 1673, 591, 437, 451, 4050, 278, 6297, 5352, 29889, 13, 9651, 2432, 29918, 333, 313, 710, 1125, 450, 995, 310, 278, 1178, 5352, 29889, 13, 18884, 960, 445, 338, 451, 6790, 29892, 591, 6416, 1250, 373, 278, 995, 4133, 13, 18884, 491, 584, 29885, 621, 29901, 1412, 657, 29918, 4381, 29918, 3129, 29918, 333, 1412, 13, 18884, 960, 1716, 338, 4954, 8824, 29952, 1673, 591, 437, 451, 4050, 278, 1178, 5352, 29889, 13, 9651, 3472, 29918, 5029, 29918, 15697, 313, 8977, 1125, 4544, 1543, 8393, 304, 788, 13, 18884, 304, 278, 4544, 1543, 29889, 910, 12778, 8393, 4133, 13, 18884, 491, 584, 29885, 621, 29901, 1412, 657, 29918, 1420, 29918, 5029, 29918, 15697, 1412, 960, 445, 9657, 7805, 13, 18884, 8393, 4133, 491, 584, 29885, 621, 29901, 1412, 657, 29918, 1420, 29918, 5029, 29918, 15697, 1673, 13, 18884, 278, 8393, 6790, 297, 445, 9049, 1191, 4893, 2225, 287, 1947, 29889, 13, 18884, 450, 3402, 310, 278, 9657, 338, 6790, 297, 584, 29885, 621, 29901, 1412, 657, 29918, 1420, 29918, 5029, 29918, 15697, 1412, 13, 4706, 9995, 13, 4706, 1583, 29889, 19290, 353, 9049, 5085, 13, 4706, 1583, 29889, 15480, 29918, 3129, 29918, 333, 29898, 3129, 29918, 333, 29922, 3129, 29918, 333, 29897, 13, 4706, 1583, 29889, 15480, 29918, 29890, 331, 29898, 29890, 331, 29918, 1271, 29922, 29890, 331, 29918, 1271, 29892, 13, 462, 3986, 15522, 29918, 5029, 29922, 29890, 331, 29918, 5029, 29897, 13, 4706, 1583, 29889, 15480, 29918, 1420, 29918, 4039, 29898, 1420, 29918, 4039, 29922, 1420, 29918, 4039, 29897, 13, 4706, 1583, 3032, 11991, 1761, 353, 5159, 13, 4706, 1583, 3032, 18714, 29918, 11991, 1761, 353, 5159, 13, 4706, 1583, 3032, 275, 29918, 4777, 4151, 2986, 353, 7700, 13, 4706, 1583, 29889, 11330, 353, 6571, 13, 4706, 1583, 3032, 957, 2429, 1145, 29918, 29890, 331, 29918, 1271, 29918, 272, 29918, 5029, 353, 15522, 29918, 1271, 470, 15522, 29918, 5029, 13, 4706, 1583, 3032, 957, 2429, 1145, 29918, 29890, 331, 29918, 19365, 29918, 1761, 353, 15522, 29918, 19365, 29918, 1761, 13, 4706, 1583, 3032, 957, 2429, 1145, 29918, 12154, 353, 6297, 13, 4706, 1583, 3032, 957, 2429, 1145, 29918, 3129, 29918, 333, 353, 2432, 29918, 333, 13, 4706, 1583, 3032, 957, 2429, 1145, 29918, 1420, 29918, 4039, 353, 3472, 29918, 4039, 13, 4706, 1583, 3032, 1420, 29918, 5029, 29918, 15697, 353, 3472, 29918, 5029, 29918, 15697, 13, 4706, 1583, 3032, 957, 2429, 1145, 29918, 4268, 29918, 13203, 29918, 1761, 353, 5997, 29918, 13203, 29918, 1761, 13, 4706, 1583, 3032, 957, 2429, 1145, 29918, 1688, 29918, 4268, 29918, 1990, 29918, 2146, 600, 861, 267, 29918, 1761, 353, 1243, 29918, 4268, 29918, 1990, 29918, 2146, 600, 861, 267, 29918, 1761, 13, 4706, 1583, 3032, 17833, 29918, 4268, 29918, 13203, 29918, 1761, 353, 4805, 29918, 4268, 29918, 13203, 29918, 1761, 13, 4706, 1583, 29889, 1202, 29918, 11991, 10456, 1311, 29889, 1457, 7323, 5987, 29918, 11991, 29918, 1761, 3101, 13, 4706, 1583, 29889, 1202, 29918, 18714, 29918, 11991, 10456, 1311, 29889, 1457, 7323, 5987, 29918, 18714, 29918, 11991, 29918, 1761, 3101, 13, 4706, 565, 4344, 29901, 13, 9651, 1583, 29889, 1202, 29918, 11991, 10456, 11991, 29897, 13, 13, 1678, 822, 881, 29918, 15480, 29918, 3129, 29918, 333, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 10575, 591, 12020, 584, 1990, 29901, 1412, 13919, 11096, 1204, 2392, 29952, 3682, 13, 4706, 746, 278, 4954, 3129, 29918, 333, 16159, 9049, 1191, 338, 4439, 15628, 29889, 13, 13, 4706, 16969, 278, 995, 310, 278, 584, 26740, 18078, 29928, 29967, 2190, 17080, 29918, 11341, 3035, 16173, 29918, 29965, 2965, 1164, 6040, 1177, 1001, 29918, 26707, 3040, 29918, 22141, 29918, 1367, 29952, 13, 4706, 4444, 29892, 20327, 1250, 304, 4954, 5574, 16159, 565, 372, 338, 451, 3342, 29889, 13, 13, 4706, 450, 2854, 1061, 6858, 278, 2432, 29918, 333, 13, 4706, 304, 1369, 411, 4954, 333, 29918, 29952, 1673, 367, 5224, 4878, 29892, 322, 451, 1712, 4954, 29899, 29952, 1412, 13, 13, 4706, 1334, 6907, 304, 451, 5712, 445, 304, 9801, 9090, 12369, 1178, 22006, 29889, 13, 13, 4706, 887, 881, 11262, 445, 8845, 297, 5802, 773, 278, 13, 4706, 584, 26740, 18078, 29928, 29967, 2190, 17080, 29918, 11341, 3035, 16173, 29918, 29965, 2965, 1164, 6040, 1177, 1001, 29918, 26707, 3040, 29918, 22141, 29918, 1367, 29952, 4444, 29889, 13, 4706, 9995, 13, 4706, 736, 679, 5552, 29898, 11027, 29892, 525, 29928, 29967, 2190, 17080, 29918, 11341, 3035, 16173, 29918, 29965, 2965, 1164, 6040, 1177, 1001, 29918, 26707, 3040, 29918, 22141, 29918, 1367, 742, 5852, 29897, 13, 13, 1678, 822, 881, 29918, 15480, 29918, 29890, 331, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 10575, 591, 12020, 584, 1990, 29901, 1412, 13919, 29933, 331, 1204, 2392, 29952, 3682, 13, 4706, 746, 278, 4954, 29890, 331, 29918, 1271, 16159, 470, 4954, 29890, 331, 29918, 5029, 16159, 9049, 1191, 338, 4439, 15628, 29973, 13, 13, 4706, 16969, 278, 995, 310, 278, 584, 26740, 18078, 29928, 29967, 2190, 17080, 29918, 11341, 3035, 16173, 29918, 29965, 2965, 1164, 6040, 1177, 1001, 29918, 26707, 3040, 29918, 29933, 12665, 29952, 13, 4706, 4444, 29892, 20327, 1250, 304, 4954, 5574, 16159, 565, 372, 338, 451, 3342, 29889, 13, 13, 4706, 450, 2854, 1061, 6858, 278, 15522, 29918, 1271, 304, 451, 1712, 4954, 1649, 16159, 13, 4706, 313, 8896, 23400, 3221, 511, 322, 278, 15522, 29918, 5029, 304, 419, 2408, 4954, 1649, 16159, 313, 8896, 13, 4706, 23400, 3221, 467, 13, 13, 4706, 1334, 6907, 304, 451, 521, 392, 292, 445, 304, 9801, 350, 12665, 3161, 322, 13, 4706, 10930, 526, 1304, 5149, 29889, 13, 13, 4706, 887, 881, 11262, 445, 8845, 297, 5802, 773, 278, 13, 4706, 584, 26740, 18078, 29928, 29967, 2190, 17080, 29918, 11341, 3035, 16173, 29918, 29965, 2965, 1164, 6040, 1177, 1001, 29918, 26707, 3040, 29918, 29933, 12665, 29952, 4444, 29889, 13, 4706, 9995, 13, 4706, 736, 679, 5552, 29898, 11027, 29892, 525, 29928, 29967, 2190, 17080, 29918, 11341, 3035, 16173, 29918, 29965, 2965, 1164, 6040, 1177, 1001, 29918, 26707, 3040, 29918, 29933, 12665, 742, 5852, 29897, 13, 13, 1678, 822, 12725, 29918, 3129, 29918, 333, 29898, 1311, 29892, 2432, 29918, 333, 1125, 13, 4706, 565, 2432, 29918, 333, 338, 7700, 29901, 13, 9651, 736, 13, 4706, 565, 451, 1583, 29889, 9344, 29918, 15480, 29918, 3129, 29918, 333, 7295, 13, 9651, 736, 13, 4706, 4226, 1891, 29918, 3129, 29918, 333, 353, 2432, 29918, 333, 29889, 6506, 877, 29899, 742, 525, 2824, 13609, 580, 13, 4706, 565, 451, 2432, 29918, 333, 29889, 27382, 2541, 877, 333, 29918, 1495, 470, 2432, 29918, 333, 2804, 4226, 1891, 29918, 3129, 29918, 333, 29901, 13, 9651, 12020, 21403, 11096, 1204, 2392, 29898, 13, 18884, 525, 3129, 29918, 333, 1818, 3380, 411, 376, 333, 29918, 613, 367, 599, 5224, 4878, 29892, 322, 508, 451, 1712, 11663, 1642, 525, 13, 18884, 22372, 3129, 29918, 333, 29991, 29878, 29913, 947, 451, 1993, 445, 11809, 29889, 4286, 4830, 29898, 13, 462, 1678, 2432, 29918, 333, 29922, 3129, 29918, 333, 876, 13, 13, 1678, 822, 12725, 29918, 29890, 331, 29898, 1311, 29892, 15522, 29918, 1271, 29892, 15522, 29918, 5029, 1125, 13, 4706, 565, 451, 1583, 29889, 9344, 29918, 15480, 29918, 29890, 331, 7295, 13, 9651, 736, 13, 4706, 565, 15522, 29918, 1271, 322, 15522, 29918, 5029, 29901, 13, 9651, 12020, 21403, 29933, 331, 2392, 29898, 13, 18884, 525, 6028, 451, 6084, 1716, 15522, 29918, 5029, 470, 15522, 29918, 1271, 29889, 530, 525, 13, 18884, 525, 7020, 1543, 338, 321, 14643, 263, 350, 12665, 2908, 470, 263, 350, 12665, 1543, 29889, 1495, 13, 4706, 565, 15522, 29918, 1271, 29901, 13, 9651, 565, 525, 1649, 29915, 297, 15522, 29918, 1271, 29901, 13, 18884, 12020, 21403, 29933, 331, 2392, 29898, 13, 462, 1678, 22372, 29890, 331, 29918, 1271, 29913, 338, 451, 263, 2854, 350, 12665, 2908, 1024, 29889, 525, 13, 462, 1678, 525, 29933, 12665, 10930, 437, 451, 1712, 376, 1649, 1642, 4683, 366, 1854, 366, 525, 13, 462, 1678, 525, 18361, 451, 2099, 304, 671, 278, 15522, 29918, 5029, 9049, 1191, 29973, 4286, 4830, 29898, 13, 462, 4706, 15522, 29918, 1271, 29922, 29890, 331, 29918, 1271, 13, 462, 268, 876, 13, 4706, 25342, 15522, 29918, 5029, 29901, 13, 9651, 565, 525, 1649, 29915, 451, 297, 15522, 29918, 5029, 29901, 13, 18884, 12020, 21403, 29933, 331, 2392, 29898, 13, 462, 1678, 22372, 29890, 331, 29918, 5029, 29913, 338, 451, 263, 2854, 350, 12665, 1543, 1024, 29889, 525, 13, 462, 1678, 525, 29933, 12665, 3161, 1818, 1712, 376, 1649, 1642, 4683, 366, 1854, 366, 525, 13, 462, 1678, 525, 18361, 451, 2099, 304, 671, 278, 15522, 29918, 1271, 9049, 1191, 29973, 4286, 4830, 29898, 13, 462, 4706, 15522, 29918, 5029, 29922, 29890, 331, 29918, 5029, 13, 462, 268, 876, 13, 13, 1678, 822, 679, 29918, 8159, 29918, 1990, 29918, 2084, 29918, 294, 29918, 1807, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 3617, 2989, 770, 2224, 408, 1347, 29889, 13, 13, 4706, 4803, 1319, 363, 13138, 777, 4805, 2472, 297, 15283, 29889, 13, 4706, 5655, 635, 445, 674, 367, 297, 263, 9637, 1627, 29892, 541, 746, 16743, 411, 13, 4706, 2712, 13751, 491, 263, 15337, 4472, 29892, 445, 2472, 338, 451, 13, 4706, 2337, 5134, 29889, 13, 4706, 9995, 13, 4706, 736, 22372, 1836, 8875, 4286, 4830, 29898, 1311, 17255, 1990, 1649, 17255, 5453, 1649, 29892, 1583, 17255, 1990, 1649, 17255, 978, 1649, 29897, 13, 13, 1678, 822, 12725, 29918, 1420, 29918, 4039, 29898, 1311, 29892, 3472, 29918, 4039, 1125, 13, 4706, 565, 3472, 29918, 4039, 322, 1583, 29889, 23765, 29918, 1420, 29918, 11338, 322, 3472, 29918, 4039, 451, 297, 1583, 29889, 23765, 29918, 1420, 29918, 11338, 29901, 13, 9651, 12020, 853, 23765, 10922, 8176, 2392, 877, 25807, 29884, 3016, 287, 4544, 4055, 363, 426, 1990, 2084, 6177, 426, 1420, 29918, 4039, 29913, 4286, 4830, 29898, 13, 18884, 770, 2084, 29922, 1311, 29889, 657, 29918, 8159, 29918, 1990, 29918, 2084, 29918, 294, 29918, 1807, 3285, 13, 18884, 3472, 29918, 4039, 29922, 1311, 3032, 957, 2429, 1145, 29918, 1420, 29918, 4039, 13, 632, 876, 13, 13, 1678, 822, 679, 29918, 4381, 29918, 1420, 29918, 4039, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 3617, 278, 2322, 4544, 4055, 304, 12244, 4050, 519, 297, 29889, 13, 13, 4706, 1815, 367, 20831, 264, 491, 278, 4954, 1420, 29918, 4039, 16159, 9049, 1191, 363, 584, 29885, 621, 29901, 1412, 1649, 2344, 1649, 1412, 13, 13, 4706, 16969, 4954, 29908, 4563, 6937, 29952, 491, 2322, 29889, 13, 4706, 9995, 13, 4706, 736, 525, 4563, 29915, 13, 13, 1678, 732, 6799, 13, 1678, 822, 3472, 29918, 4039, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 3617, 278, 4544, 4055, 363, 445, 5639, 29889, 13, 4706, 9995, 13, 4706, 736, 1583, 3032, 957, 2429, 1145, 29918, 1420, 29918, 4039, 470, 1583, 29889, 657, 29918, 4381, 29918, 1420, 29918, 4039, 580, 13, 13, 1678, 732, 6799, 13, 1678, 822, 3472, 29918, 4039, 29918, 5924, 29879, 29918, 11991, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 5538, 278, 3472, 4055, 2304, 4344, 29973, 13, 13, 4706, 960, 445, 3639, 4954, 8824, 29952, 1673, 591, 29901, 13, 13, 4706, 448, 1938, 451, 4050, 385, 1095, 4055, 363, 278, 14476, 1543, 29889, 13, 4706, 448, 1938, 451, 2758, 4344, 304, 367, 2715, 304, 278, 5639, 29889, 13, 13, 4706, 10575, 367, 20831, 1145, 304, 736, 4954, 8824, 16159, 565, 278, 584, 29885, 621, 29901, 1412, 657, 29918, 4381, 29918, 1420, 29918, 4039, 29952, 13, 4706, 947, 451, 2758, 363, 4344, 29889, 1222, 9422, 310, 445, 1206, 338, 565, 278, 13, 4706, 14476, 3472, 4055, 474, 4954, 2080, 16159, 470, 4954, 1092, 29952, 1412, 13, 13, 4706, 2823, 884, 584, 29885, 621, 29901, 1412, 3068, 29918, 17532, 29918, 11991, 1673, 607, 881, 367, 1304, 565, 278, 4544, 4055, 13, 4706, 881, 505, 322, 1095, 4055, 29892, 541, 451, 4344, 29889, 13, 13, 4706, 16969, 29901, 13, 9651, 7223, 29901, 5852, 491, 2322, 29889, 13, 4706, 9995, 13, 4706, 736, 5852, 13, 13, 1678, 732, 6799, 13, 1678, 822, 508, 29918, 17532, 29918, 11991, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 1815, 445, 5639, 505, 4344, 29973, 13, 13, 4706, 960, 445, 3639, 4954, 8824, 29952, 1673, 584, 29885, 621, 29901, 1412, 1202, 29918, 5145, 29952, 674, 12020, 13, 4706, 584, 1990, 29901, 1412, 3664, 15930, 287, 1762, 2528, 19334, 2392, 1412, 13, 13, 4706, 16969, 29901, 13, 9651, 7223, 29901, 450, 736, 995, 515, 584, 29885, 621, 29901, 1412, 1420, 29918, 4039, 29918, 5924, 29879, 29918, 11991, 29952, 491, 2322, 29889, 13, 4706, 9995, 13, 4706, 736, 1583, 29889, 1420, 29918, 4039, 29918, 5924, 29879, 29918, 11991, 13, 13, 1678, 822, 679, 29918, 4381, 29918, 12154, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 3617, 278, 2322, 995, 363, 278, 6297, 5352, 310, 278, 3472, 1543, 29889, 13, 13, 4706, 13109, 29879, 304, 4954, 8824, 29952, 1412, 13, 4706, 9995, 13, 4706, 736, 7700, 13, 13, 1678, 732, 6799, 13, 1678, 822, 6297, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 3617, 278, 995, 363, 278, 6297, 5352, 310, 278, 3472, 1543, 29889, 13, 13, 4706, 887, 881, 451, 5712, 445, 29889, 6811, 2426, 584, 29885, 621, 29901, 1412, 657, 29918, 4381, 29918, 12154, 29952, 2012, 29889, 13, 4706, 9995, 13, 4706, 736, 1583, 3032, 957, 2429, 1145, 29918, 12154, 470, 1583, 29889, 657, 29918, 4381, 29918, 12154, 580, 13, 13, 1678, 822, 679, 29918, 4381, 29918, 3129, 29918, 333, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 3617, 278, 2322, 995, 363, 278, 1178, 5352, 310, 278, 3472, 1543, 29889, 13, 13, 4706, 13109, 29879, 304, 4954, 8824, 29952, 1412, 13, 4706, 9995, 13, 4706, 736, 7700, 13, 13, 1678, 732, 6799, 13, 1678, 822, 2432, 29918, 333, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 3617, 278, 995, 363, 278, 1178, 5352, 310, 278, 3472, 1543, 29889, 13, 13, 4706, 887, 881, 451, 5712, 445, 29889, 6811, 2426, 584, 29885, 621, 29901, 1412, 657, 29918, 4381, 29918, 3129, 29918, 333, 29952, 2012, 29889, 13, 4706, 9995, 13, 4706, 736, 1583, 3032, 957, 2429, 1145, 29918, 3129, 29918, 333, 470, 1583, 29889, 657, 29918, 4381, 29918, 3129, 29918, 333, 580, 13, 13, 1678, 822, 679, 29918, 1420, 29918, 5029, 29918, 15697, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 3617, 4544, 1543, 8393, 408, 263, 9657, 29889, 13, 13, 4706, 450, 9657, 338, 21213, 491, 584, 9891, 18078, 14095, 29889, 9514, 29889, 13239, 29889, 20620, 1131, 1673, 13, 4706, 577, 29901, 13, 13, 4706, 448, 4954, 10998, 1357, 12715, 2396, 5852, 10114, 29952, 2582, 297, 4954, 1357, 12715, 16159, 313, 1217, 995, 467, 13, 4706, 448, 4954, 10998, 1357, 12715, 2396, 7700, 10114, 29952, 2582, 297, 278, 5352, 367, 22430, 17262, 313, 1333, 5134, 297, 278, 1962, 467, 13, 4706, 448, 4954, 10998, 1357, 12715, 2396, 525, 9526, 995, 29915, 10114, 29952, 2582, 297, 278, 4954, 1357, 12715, 543, 9526, 995, 6937, 1412, 13, 13, 4706, 960, 366, 5712, 445, 1158, 29892, 334, 1745, 1096, 304, 1246, 2428, 29930, 304, 679, 13, 4706, 278, 8393, 731, 297, 278, 2428, 1990, 29889, 13, 4706, 9995, 13, 4706, 3472, 29918, 5029, 29918, 15697, 353, 426, 13, 9651, 525, 12154, 2396, 1583, 29889, 12154, 29892, 13, 9651, 525, 333, 2396, 1583, 29889, 3129, 29918, 333, 29892, 13, 9651, 525, 1990, 2396, 1583, 29889, 4268, 29918, 13203, 470, 7700, 29892, 29871, 396, 14053, 1250, 304, 2089, 304, 4772, 770, 13776, 13, 4706, 500, 13, 4706, 565, 1583, 3032, 1420, 29918, 5029, 29918, 15697, 29901, 13, 9651, 3472, 29918, 5029, 29918, 15697, 29889, 5504, 29898, 1311, 3032, 1420, 29918, 5029, 29918, 15697, 29897, 13, 4706, 736, 3472, 29918, 5029, 29918, 15697, 13, 13, 1678, 732, 6799, 13, 1678, 822, 3472, 29918, 5029, 29918, 15697, 29918, 1807, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 3617, 584, 29885, 621, 29901, 1412, 657, 29918, 1420, 29918, 5029, 29918, 15697, 29952, 718, 738, 8393, 297, 13, 4706, 278, 4954, 1420, 29918, 5029, 29918, 15697, 16159, 9049, 1191, 363, 584, 29885, 621, 29901, 1412, 1649, 2344, 1649, 29952, 13, 4706, 18511, 408, 263, 1347, 773, 584, 9891, 18078, 14095, 29889, 9514, 29889, 13239, 29889, 20620, 1131, 1412, 13, 4706, 9995, 13, 4706, 736, 12151, 1131, 29898, 1311, 29889, 657, 29918, 1420, 29918, 5029, 29918, 15697, 3101, 13, 13, 1678, 822, 679, 29918, 4381, 29918, 4268, 29918, 13203, 29918, 1761, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 6811, 2426, 445, 304, 3867, 263, 2322, 1051, 310, 5997, 4413, 29889, 13, 13, 4706, 450, 5997, 4413, 6790, 1244, 508, 367, 20831, 1145, 773, 13, 4706, 278, 4954, 4268, 29918, 13203, 29918, 1761, 16159, 9049, 1191, 363, 584, 29885, 621, 29901, 1412, 1649, 2344, 1649, 1412, 13, 4706, 9995, 13, 4706, 736, 5159, 13, 13, 1678, 822, 679, 29918, 4381, 29918, 29890, 331, 29918, 1271, 29918, 272, 29918, 5029, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 3617, 278, 2322, 350, 12665, 2908, 470, 1543, 29889, 13, 13, 4706, 319, 4544, 1543, 338, 321, 14643, 263, 350, 12665, 2908, 470, 263, 13, 4706, 350, 12665, 1543, 29892, 577, 591, 505, 8772, 445, 964, 13, 4706, 263, 2323, 1158, 29889, 13, 4706, 9995, 13, 4706, 736, 6213, 13, 13, 1678, 822, 679, 29918, 29890, 331, 29918, 1271, 29918, 272, 29918, 5029, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 3617, 278, 350, 12665, 2908, 470, 1543, 29889, 13, 13, 4706, 11662, 6058, 438, 5348, 29934, 22027, 3446, 3235, 341, 2544, 8187, 29928, 29889, 13, 4706, 6811, 2426, 584, 29885, 621, 29901, 1412, 657, 29918, 4381, 29918, 29890, 331, 29918, 1271, 29918, 272, 29918, 5029, 29952, 2012, 29889, 13, 4706, 9995, 13, 4706, 736, 313, 1311, 3032, 957, 2429, 1145, 29918, 29890, 331, 29918, 1271, 29918, 272, 29918, 5029, 470, 13, 18884, 1583, 29889, 657, 29918, 4381, 29918, 29890, 331, 29918, 1271, 29918, 272, 29918, 5029, 3101, 13, 13, 1678, 822, 679, 29918, 4381, 29918, 29890, 331, 29918, 19365, 29918, 1761, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 3617, 278, 2322, 350, 12665, 29161, 29889, 13, 13, 4706, 450, 2989, 6783, 770, 310, 738, 17305, 297, 278, 1051, 674, 13, 4706, 367, 584, 29885, 621, 29901, 1412, 657, 29918, 29890, 331, 29918, 1271, 29918, 272, 29918, 5029, 29952, 411, 4954, 489, 16159, 322, 13, 4706, 278, 17305, 623, 2760, 29892, 577, 565, 278, 15522, 2908, 29914, 5029, 338, 13, 4706, 4954, 29908, 6510, 6937, 1673, 322, 278, 17305, 338, 4954, 29908, 18837, 287, 6937, 1673, 278, 13, 4706, 9819, 5997, 770, 674, 367, 4954, 29908, 6510, 489, 18837, 287, 6937, 1412, 13, 4706, 9995, 13, 4706, 736, 5159, 13, 13, 1678, 822, 679, 29918, 29890, 331, 29918, 19365, 29918, 1761, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 3617, 278, 1051, 310, 350, 12665, 29161, 29889, 13, 13, 4706, 11662, 6058, 438, 5348, 29934, 22027, 3446, 3235, 341, 2544, 8187, 29928, 29889, 13, 4706, 6811, 2426, 584, 29885, 621, 29901, 1412, 657, 29918, 4381, 29918, 29890, 331, 29918, 19365, 29918, 1761, 29952, 2012, 29889, 13, 4706, 9995, 13, 4706, 736, 1583, 3032, 957, 2429, 1145, 29918, 29890, 331, 29918, 19365, 29918, 1761, 470, 1583, 29889, 657, 29918, 4381, 29918, 29890, 331, 29918, 19365, 29918, 1761, 580, 13, 13, 1678, 822, 679, 29918, 29890, 331, 29918, 4268, 29918, 13203, 29918, 1761, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 3617, 278, 350, 12665, 5997, 4413, 408, 1051, 29889, 13, 13, 4706, 11662, 6058, 438, 5348, 29934, 22027, 3446, 3235, 341, 2544, 8187, 29928, 29889, 13, 4706, 6811, 2426, 584, 29885, 621, 29901, 1412, 657, 29918, 4381, 29918, 29890, 331, 29918, 1271, 29918, 272, 29918, 5029, 29952, 13, 4706, 322, 584, 29885, 621, 29901, 1412, 657, 29918, 4381, 29918, 29890, 331, 29918, 19365, 29918, 1761, 29952, 2012, 29889, 13, 4706, 9995, 13, 4706, 15522, 29918, 1271, 29918, 272, 29918, 5029, 353, 1583, 29889, 657, 29918, 29890, 331, 29918, 1271, 29918, 272, 29918, 5029, 580, 13, 4706, 15522, 29918, 4268, 29918, 13203, 353, 5159, 13, 4706, 565, 15522, 29918, 1271, 29918, 272, 29918, 5029, 29901, 13, 9651, 15522, 29918, 4268, 29918, 13203, 29889, 4397, 29898, 29890, 331, 29918, 1271, 29918, 272, 29918, 5029, 29897, 13, 9651, 363, 17305, 297, 1583, 29889, 657, 29918, 29890, 331, 29918, 19365, 29918, 1761, 7295, 13, 18884, 5997, 29918, 1990, 353, 525, 8875, 489, 8875, 4286, 4830, 29898, 29890, 331, 29918, 1271, 29918, 272, 29918, 5029, 29892, 17305, 29897, 13, 18884, 15522, 29918, 4268, 29918, 13203, 29889, 4397, 29898, 4268, 29918, 1990, 29897, 13, 4706, 736, 15522, 29918, 4268, 29918, 13203, 13, 13, 1678, 822, 679, 29918, 4268, 29918, 13203, 29918, 1761, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 11662, 6058, 438, 5348, 29934, 22027, 3446, 3235, 341, 2544, 8187, 29928, 29889, 13, 13, 4706, 853, 4561, 411, 584, 1990, 18078, 14095, 29918, 29883, 3665, 1195, 29889, 9482, 519, 29889, 9118, 10716, 519, 3047, 29907, 893, 1673, 13, 4706, 366, 437, 451, 5712, 445, 770, 304, 788, 596, 1914, 5997, 4413, 29889, 6811, 2426, 13, 4706, 584, 29885, 621, 29901, 1412, 657, 29918, 4381, 29918, 4268, 29918, 13203, 29918, 1761, 1412, 13, 13, 4706, 910, 338, 1363, 445, 1158, 3390, 29879, 278, 4954, 4268, 29918, 13203, 29918, 1761, 16159, 9049, 1191, 13, 4706, 363, 584, 29885, 621, 29901, 1412, 1649, 2344, 1649, 1673, 322, 925, 20074, 1250, 304, 584, 29885, 621, 29901, 1412, 657, 29918, 4381, 29918, 4268, 29918, 13203, 29918, 1761, 1412, 13, 4706, 1105, 565, 366, 5712, 445, 1158, 29892, 278, 4954, 4268, 29918, 13203, 29918, 1761, 16159, 9049, 1191, 674, 367, 19315, 29889, 13, 4706, 9995, 13, 4706, 5997, 29918, 13203, 29918, 1761, 353, 1583, 29889, 657, 29918, 29890, 331, 29918, 4268, 29918, 13203, 29918, 1761, 580, 13, 4706, 565, 1583, 3032, 957, 2429, 1145, 29918, 4268, 29918, 13203, 29918, 1761, 29901, 13, 9651, 5997, 29918, 13203, 29918, 1761, 29889, 21843, 29898, 1311, 3032, 957, 2429, 1145, 29918, 4268, 29918, 13203, 29918, 1761, 29897, 13, 4706, 1683, 29901, 13, 9651, 5997, 29918, 13203, 29918, 1761, 29889, 21843, 29898, 1311, 29889, 657, 29918, 4381, 29918, 4268, 29918, 13203, 29918, 1761, 3101, 13, 4706, 565, 1583, 3032, 17833, 29918, 4268, 29918, 13203, 29918, 1761, 29901, 13, 9651, 5997, 29918, 13203, 29918, 1761, 29889, 21843, 29898, 1311, 3032, 17833, 29918, 4268, 29918, 13203, 29918, 1761, 29897, 13, 4706, 736, 5997, 29918, 13203, 29918, 1761, 13, 13, 1678, 822, 679, 29918, 4381, 29918, 1688, 29918, 4268, 29918, 1990, 29918, 2146, 600, 861, 267, 29918, 1761, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 6811, 2426, 445, 304, 3867, 263, 2322, 1051, 310, 5997, 4413, 363, 5190, 6987, 29889, 13, 13, 4706, 450, 5997, 4413, 6790, 1244, 508, 367, 20831, 1145, 773, 13, 4706, 278, 4954, 1688, 29918, 4268, 29918, 1990, 29918, 2146, 600, 861, 267, 29918, 1761, 16159, 9049, 1191, 363, 584, 29885, 621, 29901, 1412, 1649, 2344, 1649, 1412, 13, 4706, 9995, 13, 4706, 736, 6024, 29884, 293, 609, 4008, 29899, 8875, 4286, 4830, 29898, 1311, 17255, 1990, 1649, 17255, 978, 26914, 13609, 3101, 29962, 13, 13, 1678, 822, 679, 29918, 1688, 29918, 4268, 29918, 1990, 29918, 2146, 600, 861, 267, 29918, 1761, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 11662, 6058, 438, 5348, 29934, 22027, 3446, 3235, 341, 2544, 8187, 29928, 29889, 13, 13, 4706, 853, 4561, 411, 584, 1990, 18078, 14095, 29918, 29883, 3665, 1195, 29889, 9482, 519, 29889, 9118, 10716, 519, 3047, 29907, 893, 1673, 13, 4706, 366, 437, 451, 5712, 445, 770, 304, 788, 596, 1914, 1243, 5997, 4413, 29889, 6811, 2426, 13, 4706, 584, 29885, 621, 29901, 1412, 657, 29918, 4381, 29918, 1688, 29918, 4268, 29918, 1990, 29918, 2146, 600, 861, 267, 29918, 1761, 1412, 13, 13, 4706, 910, 338, 1363, 445, 1158, 3390, 29879, 278, 4954, 1688, 29918, 4268, 29918, 1990, 29918, 2146, 600, 861, 267, 29918, 1761, 16159, 9049, 1191, 13, 4706, 363, 584, 29885, 621, 29901, 1412, 1649, 2344, 1649, 1673, 322, 925, 20074, 1250, 304, 584, 29885, 621, 29901, 1412, 657, 29918, 4381, 29918, 1688, 29918, 4268, 29918, 1990, 29918, 2146, 600, 861, 267, 29918, 1761, 1412, 13, 4706, 1105, 565, 366, 5712, 445, 1158, 29892, 278, 4954, 1688, 29918, 4268, 29918, 1990, 29918, 2146, 600, 861, 267, 29918, 1761, 16159, 9049, 1191, 674, 367, 19315, 29889, 13, 4706, 9995, 13, 4706, 565, 1583, 3032, 957, 2429, 1145, 29918, 1688, 29918, 4268, 29918, 1990, 29918, 2146, 600, 861, 267, 29918, 1761, 29901, 13, 9651, 1243, 29918, 4268, 29918, 1990, 29918, 2146, 600, 861, 267, 29918, 1761, 353, 1583, 3032, 957, 2429, 1145, 29918, 1688, 29918, 4268, 29918, 1990, 29918, 2146, 600, 861, 267, 29918, 1761, 13, 4706, 1683, 29901, 13, 9651, 1243, 29918, 4268, 29918, 1990, 29918, 2146, 600, 861, 267, 29918, 1761, 353, 1583, 29889, 657, 29918, 4381, 29918, 1688, 29918, 4268, 29918, 1990, 29918, 2146, 600, 861, 267, 29918, 1761, 580, 13, 4706, 736, 1243, 29918, 4268, 29918, 1990, 29918, 2146, 600, 861, 267, 29918, 1761, 13, 13, 1678, 822, 16087, 29898, 1311, 29892, 3847, 29922, 8516, 1125, 13, 4706, 9995, 13, 4706, 25746, 278, 5639, 29889, 13, 13, 4706, 19928, 367, 2000, 2748, 373, 278, 2246, 29899, 5563, 5639, 13, 4706, 297, 278, 5447, 310, 22637, 29889, 13, 13, 4706, 317, 1691, 278, 4944, 3847, 408, 584, 5552, 29901, 1412, 3560, 1412, 13, 13, 4706, 5020, 15190, 278, 4426, 310, 599, 4344, 313, 4746, 9657, 2767, 3101, 13, 4706, 411, 584, 5552, 29901, 1412, 11330, 1412, 13, 4706, 9995, 13, 4706, 565, 1583, 3032, 275, 29918, 4777, 4151, 2986, 29901, 13, 9651, 12020, 838, 2040, 8431, 1862, 336, 2986, 2392, 877, 1576, 5639, 338, 2307, 6579, 4151, 2986, 29889, 1815, 451, 16087, 525, 13, 462, 462, 3986, 525, 1552, 1021, 5639, 8951, 29889, 1495, 13, 4706, 1583, 29889, 3560, 353, 3847, 13, 4706, 565, 1583, 29889, 3560, 29901, 13, 9651, 1583, 29889, 11330, 29889, 5504, 29898, 1311, 29889, 3560, 29889, 11330, 29897, 13, 4706, 363, 2278, 297, 1583, 3032, 18714, 29918, 11991, 1761, 29901, 13, 9651, 2278, 29889, 8704, 29898, 3560, 29922, 1311, 29897, 13, 4706, 363, 2278, 297, 1583, 3032, 11991, 1761, 29901, 13, 9651, 2278, 29889, 8704, 29898, 3560, 29922, 1311, 29897, 13, 4706, 1583, 3032, 275, 29918, 4777, 4151, 2986, 353, 5852, 13, 4706, 736, 1583, 13, 13, 1678, 822, 758, 7323, 5987, 29918, 11991, 29918, 1761, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 4721, 29899, 3733, 5987, 278, 4344, 1051, 29889, 13, 13, 4706, 910, 338, 2000, 297, 584, 29885, 621, 29901, 1412, 1649, 2344, 1649, 29952, 1434, 13, 4706, 738, 4344, 515, 278, 9049, 5085, 338, 2715, 29889, 13, 13, 4706, 16969, 29901, 13, 9651, 1051, 29901, 530, 4069, 1051, 491, 2322, 29892, 541, 366, 508, 5712, 445, 13, 9651, 297, 1014, 13203, 29889, 13, 4706, 9995, 13, 4706, 736, 5159, 13, 13, 1678, 822, 758, 7323, 5987, 29918, 18714, 29918, 11991, 29918, 1761, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 4721, 29899, 3733, 5987, 278, 6901, 4344, 1051, 29889, 13, 13, 4706, 910, 338, 2000, 297, 584, 29885, 621, 29901, 1412, 1649, 2344, 1649, 29952, 1434, 13, 4706, 738, 4344, 515, 278, 9049, 5085, 338, 2715, 29892, 322, 1434, 738, 4344, 13, 4706, 338, 584, 29885, 621, 29901, 1412, 1457, 7323, 5987, 29918, 11991, 29918, 1761, 29952, 338, 2715, 29889, 13, 13, 4706, 16969, 29901, 13, 9651, 1051, 29901, 530, 4069, 1051, 491, 2322, 29892, 541, 366, 508, 5712, 445, 13, 9651, 297, 1014, 13203, 29889, 13, 4706, 9995, 13, 4706, 736, 5159, 13, 13, 1678, 822, 788, 29918, 5145, 29898, 1311, 29892, 2278, 7611, 1125, 13, 4706, 9995, 13, 4706, 3462, 263, 2278, 304, 278, 5639, 29889, 13, 13, 4706, 826, 3174, 29901, 13, 9651, 2278, 7611, 29901, 319, 584, 1990, 29901, 1412, 9118, 7895, 10716, 519, 29952, 1203, 29889, 13, 13, 4706, 16969, 29901, 13, 9651, 319, 3407, 304, 1583, 29889, 910, 2794, 393, 366, 508, 9704, 5717, 304, 445, 1158, 29889, 13, 4706, 9995, 13, 4706, 565, 1583, 29889, 3068, 29918, 17532, 29918, 11991, 29901, 13, 9651, 1583, 3032, 11991, 1761, 29889, 4397, 29898, 5145, 7611, 29897, 13, 9651, 565, 1583, 3032, 275, 29918, 4777, 4151, 2986, 322, 451, 2278, 7611, 3032, 275, 29918, 4777, 4151, 2986, 29901, 13, 18884, 2278, 7611, 29889, 8704, 29898, 3560, 29922, 1311, 29897, 13, 4706, 1683, 29901, 13, 9651, 12020, 2216, 15930, 287, 1762, 2528, 19334, 2392, 877, 29912, 1545, 352, 3871, 1836, 29912, 1990, 978, 29913, 508, 451, 505, 4344, 4286, 4830, 29898, 13, 18884, 878, 352, 3871, 29922, 1311, 17255, 1990, 1649, 17255, 5453, 1649, 29892, 13, 18884, 770, 978, 29922, 1311, 17255, 1990, 1649, 17255, 978, 1649, 13, 632, 876, 13, 4706, 736, 1583, 13, 13, 1678, 822, 788, 29918, 18714, 29918, 5145, 29898, 1311, 29892, 2278, 7611, 1125, 13, 4706, 9995, 13, 4706, 3462, 263, 376, 18714, 29908, 2278, 304, 278, 5639, 29889, 13, 13, 4706, 910, 2278, 338, 451, 13751, 408, 263, 2278, 310, 278, 5639, 6336, 13, 4706, 313, 5747, 338, 2175, 304, 278, 4472, 15061, 278, 5639, 467, 1205, 372, 13, 4706, 7846, 1169, 4426, 322, 338, 6336, 6579, 4151, 2986, 925, 763, 263, 13, 4706, 4943, 2278, 29889, 13, 13, 4706, 826, 3174, 29901, 13, 9651, 2278, 7611, 29901, 319, 584, 1990, 29901, 1412, 9118, 7895, 10716, 519, 29952, 1203, 29889, 13, 4706, 16969, 29901, 13, 9651, 319, 3407, 304, 1583, 29889, 910, 2794, 393, 366, 508, 9704, 5717, 304, 445, 1158, 29889, 13, 4706, 9995, 13, 4706, 565, 1583, 29889, 3068, 29918, 17532, 29918, 11991, 29901, 13, 9651, 1583, 3032, 18714, 29918, 11991, 1761, 29889, 4397, 29898, 5145, 7611, 29897, 13, 9651, 565, 1583, 3032, 275, 29918, 4777, 4151, 2986, 322, 451, 2278, 7611, 3032, 275, 29918, 4777, 4151, 2986, 29901, 13, 18884, 2278, 7611, 29889, 8704, 29898, 3560, 29922, 1311, 29897, 13, 4706, 736, 1583, 13, 13, 1678, 822, 788, 29918, 11991, 29898, 1311, 29892, 334, 5145, 1285, 475, 414, 1125, 13, 4706, 9995, 13, 4706, 3462, 4344, 304, 278, 5639, 29889, 13, 13, 4706, 826, 3174, 29901, 13, 9651, 334, 5145, 1285, 475, 414, 29901, 28933, 470, 901, 584, 1990, 29901, 1412, 9118, 7895, 10716, 519, 29952, 3618, 29889, 13, 13, 4706, 16969, 29901, 13, 9651, 319, 3407, 304, 1583, 29889, 910, 2794, 393, 366, 508, 9704, 5717, 304, 445, 1158, 29889, 13, 4706, 9995, 13, 4706, 363, 2278, 7611, 297, 2278, 1285, 475, 414, 29901, 13, 9651, 1583, 29889, 1202, 29918, 5145, 29898, 5145, 7611, 29897, 13, 4706, 736, 1583, 13, 13, 1678, 822, 788, 29918, 18714, 29918, 11991, 29898, 1311, 29892, 334, 5145, 1285, 475, 414, 1125, 13, 4706, 9995, 13, 4706, 3462, 6901, 4344, 304, 278, 5639, 29889, 13, 13, 4706, 826, 3174, 29901, 13, 9651, 334, 5145, 1285, 475, 414, 29901, 28933, 470, 901, 584, 1990, 29901, 1412, 9118, 7895, 10716, 519, 29952, 3618, 29889, 13, 13, 4706, 16969, 29901, 13, 9651, 319, 3407, 304, 1583, 29889, 910, 2794, 393, 366, 508, 9704, 5717, 304, 445, 1158, 29889, 13, 4706, 9995, 13, 4706, 363, 2278, 7611, 297, 2278, 1285, 475, 414, 29901, 13, 9651, 1583, 29889, 1202, 29918, 18714, 29918, 5145, 29898, 5145, 7611, 29897, 13, 4706, 736, 1583, 13, 13, 1678, 822, 4256, 29918, 11991, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 16969, 385, 20380, 975, 278, 4344, 310, 445, 5639, 29889, 13, 13, 4706, 450, 7709, 287, 4344, 674, 367, 3618, 310, 584, 1990, 29901, 1412, 9118, 7895, 10716, 519, 29952, 13, 4706, 1014, 13203, 29889, 13, 4706, 9995, 13, 4706, 736, 4256, 29898, 1311, 3032, 11991, 1761, 29897, 13, 13, 1678, 822, 4256, 29918, 18714, 29918, 11991, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 16969, 385, 20380, 975, 278, 6901, 4344, 310, 445, 5639, 29889, 13, 13, 4706, 450, 7709, 287, 4344, 674, 367, 3618, 310, 584, 1990, 29901, 1412, 9118, 7895, 10716, 519, 29952, 13, 4706, 1014, 13203, 29889, 13, 4706, 9995, 13, 4706, 736, 4256, 29898, 1311, 3032, 18714, 29918, 11991, 1761, 29897, 13, 13, 1678, 822, 679, 29918, 5145, 2798, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 3617, 278, 1353, 310, 4344, 297, 278, 5639, 29889, 13, 4706, 9995, 13, 4706, 736, 7431, 29898, 1311, 3032, 11991, 1761, 29897, 13, 13, 1678, 822, 679, 29918, 18714, 29918, 5145, 2798, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 3617, 278, 1353, 310, 6901, 4344, 297, 278, 5639, 29889, 13, 4706, 9995, 13, 4706, 736, 7431, 29898, 1311, 3032, 18714, 29918, 11991, 1761, 29897, 13, 13, 1678, 732, 6799, 13, 1678, 822, 881, 29918, 9482, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 10575, 591, 4050, 3099, 29973, 13, 13, 4706, 6811, 2426, 445, 304, 1207, 278, 584, 29885, 621, 29901, 1412, 9482, 29952, 304, 2761, 13, 4706, 565, 278, 5639, 338, 13751, 29889, 960, 445, 3639, 4954, 8824, 29952, 1673, 13, 4706, 584, 29885, 621, 29901, 1412, 9482, 29952, 3639, 385, 4069, 1347, 2012, 310, 13, 4706, 15061, 278, 4472, 29889, 13, 13, 4706, 16969, 29901, 13, 9651, 6120, 29901, 4954, 5574, 16159, 491, 2322, 29892, 541, 1014, 13203, 508, 5712, 445, 6030, 29889, 13, 4706, 9995, 13, 4706, 736, 5852, 13, 13, 1678, 822, 4050, 29898, 1311, 29892, 3579, 19290, 1125, 13, 4706, 9995, 13, 4706, 6811, 24040, 584, 29885, 621, 18078, 14095, 29918, 29883, 3665, 1195, 29889, 9482, 519, 29889, 9118, 10716, 519, 29889, 9482, 1412, 13, 4706, 450, 871, 1735, 338, 393, 591, 736, 385, 4069, 1347, 565, 13, 4706, 584, 29885, 621, 29901, 1412, 9344, 29918, 9482, 29952, 3639, 4954, 8824, 29952, 1412, 960, 372, 3639, 4954, 5574, 29952, 1673, 13, 4706, 591, 1246, 278, 20831, 264, 1158, 322, 3639, 278, 1121, 29889, 13, 13, 4706, 826, 3174, 29901, 13, 9651, 3579, 19290, 29901, 1152, 1328, 287, 304, 278, 20831, 1145, 1158, 565, 372, 338, 2000, 29889, 13, 4706, 9995, 13, 4706, 565, 451, 1583, 3032, 275, 29918, 4777, 4151, 2986, 29901, 13, 9651, 12020, 2216, 8431, 1862, 336, 2986, 2392, 29898, 13, 18884, 525, 6028, 451, 4050, 385, 25513, 7895, 10716, 519, 393, 756, 451, 1063, 6579, 4151, 2986, 29889, 525, 13, 18884, 525, 29923, 1983, 545, 366, 1246, 1045, 1862, 2390, 580, 373, 278, 2246, 29899, 5563, 5639, 297, 278, 5639, 525, 13, 18884, 525, 29882, 631, 12040, 1434, 15061, 29889, 4134, 10805, 445, 2228, 29901, 426, 1990, 2084, 29913, 4286, 4830, 29898, 13, 462, 1678, 770, 2084, 29922, 1311, 29889, 657, 29918, 8159, 29918, 1990, 29918, 2084, 29918, 294, 29918, 1807, 580, 13, 462, 876, 13, 4706, 565, 1583, 29889, 9344, 29918, 9482, 29901, 13, 9651, 736, 2428, 29898, 9118, 7895, 10716, 519, 29892, 1583, 467, 9482, 29898, 1068, 19290, 29897, 13, 4706, 1683, 29901, 13, 9651, 736, 6629, 13, 13, 13, 1990, 4910, 29898, 9118, 7895, 10716, 519, 1125, 13, 1678, 9995, 13, 1678, 390, 21043, 263, 4954, 29966, 4563, 13885, 1412, 13, 13, 1678, 450, 871, 2655, 445, 770, 947, 338, 304, 5712, 13, 1678, 584, 29885, 621, 18078, 14095, 29918, 29883, 3665, 1195, 29889, 29884, 293, 609, 4008, 29889, 7611, 29889, 9118, 7895, 10716, 519, 29889, 657, 29918, 4381, 29918, 1420, 29918, 4039, 29952, 13, 1678, 322, 736, 4954, 29908, 4563, 6937, 1412, 13, 1678, 9995, 13, 1678, 822, 679, 29918, 4381, 29918, 1420, 29918, 4039, 29898, 1311, 1125, 13, 4706, 736, 525, 4563, 29915, 13, 13, 13, 1990, 1939, 15646, 2642, 29898, 9118, 7895, 10716, 519, 1125, 13, 1678, 9995, 13, 1678, 390, 21043, 4344, 29892, 541, 694, 14476, 4544, 1543, 29889, 13, 1678, 9995, 13, 1678, 4472, 29918, 978, 353, 525, 14095, 29918, 29883, 3665, 1195, 29914, 29884, 293, 609, 4008, 29914, 1217, 29918, 17699, 29918, 5029, 29889, 14095, 29889, 1420, 29915, 13, 2 ]
pythonexercicios/ex042-analisandotrianguloV2.py
marroni1103/exercicios-pyton
0
108920
print('\033[34m-=\033[m'*12) print('Analisador de Trianulo') print('\033[34m-=\033[m'*12) a = float(input('Informe a primeira reta: ')) b = float(input('Informe a segunda reta: ')) c = float(input('Informe a terceira reta: ')) if a + b > c and a + c > b and b + c > a: print(f'Com essas retas {a} X {b} X {c} consegeuimos montar um triangulo.') if a == b == c: print(f'Esse é um triangulo Equilátero.') elif a == b and a != c or a == c and a != b: print(f'Esse é um triangulo Isósceles.') elif a != b and a != c and b != c: print(f'Esse é um triangulo Escaleno.') else: print(f'Com essas retas {a} X {b} X {c} NÃO consegeuimos montar um triangulo.')
[ 1, 1596, 28909, 29900, 29941, 29941, 29961, 29941, 29946, 29885, 29899, 2013, 29900, 29941, 29941, 29961, 29885, 29915, 29930, 29896, 29906, 29897, 13, 2158, 877, 2744, 5711, 3136, 316, 323, 6392, 7207, 1495, 13, 2158, 28909, 29900, 29941, 29941, 29961, 29941, 29946, 29885, 29899, 2013, 29900, 29941, 29941, 29961, 29885, 29915, 29930, 29896, 29906, 29897, 13, 13, 29874, 353, 5785, 29898, 2080, 877, 797, 689, 29872, 263, 20997, 337, 941, 29901, 525, 876, 13, 29890, 353, 5785, 29898, 2080, 877, 797, 689, 29872, 263, 17329, 337, 941, 29901, 525, 876, 13, 29883, 353, 5785, 29898, 2080, 877, 797, 689, 29872, 263, 1935, 346, 3055, 337, 941, 29901, 525, 876, 13, 13, 361, 263, 718, 289, 1405, 274, 322, 263, 718, 274, 1405, 289, 322, 289, 718, 274, 1405, 263, 29901, 13, 1678, 1596, 29898, 29888, 29915, 1523, 3686, 294, 3240, 294, 426, 29874, 29913, 1060, 426, 29890, 29913, 1060, 426, 29883, 29913, 5178, 479, 29884, 18594, 7629, 279, 1922, 3367, 574, 7207, 29889, 1495, 13, 1678, 565, 263, 1275, 289, 1275, 274, 29901, 13, 4706, 1596, 29898, 29888, 29915, 14190, 344, 904, 1922, 3367, 574, 7207, 11243, 309, 29976, 24175, 29889, 1495, 13, 1678, 25342, 263, 1275, 289, 322, 263, 2804, 274, 470, 263, 1275, 274, 322, 263, 2804, 289, 29901, 13, 4706, 1596, 29898, 29888, 29915, 14190, 344, 904, 1922, 3367, 574, 7207, 1317, 29980, 1557, 5830, 29889, 1495, 13, 1678, 25342, 263, 2804, 289, 322, 263, 2804, 274, 322, 289, 2804, 274, 29901, 13, 4706, 1596, 29898, 29888, 29915, 14190, 344, 904, 1922, 3367, 574, 7207, 3423, 1052, 8154, 29889, 1495, 13, 2870, 29901, 13, 1678, 1596, 29898, 29888, 29915, 1523, 3686, 294, 3240, 294, 426, 29874, 29913, 1060, 426, 29890, 29913, 1060, 426, 29883, 29913, 405, 30179, 29949, 5178, 479, 29884, 18594, 7629, 279, 1922, 3367, 574, 7207, 29889, 1495, 13, 2 ]
src/quiche/ast_heuristic_cost_model.py
riswords/quiche
0
62851
from typing import Dict, Tuple from quiche.analysis import CostModel from quiche.egraph import ENode, EClassID from quiche.ast_quiche_tree import ASTQuicheTree class ASTHeuristicCostModel(CostModel): """ Cost model for AST nodes, based on "size", i.e., number of children and also a relative weighting for AST nodes. The default weighting may optionally be altered by users. """ def __init__(self, node_weights: Dict[str, int] = None): self.node_weights = { 'Module': 1, 'Interactive': 1, 'Expression': 1, 'Suite': 1, 'FunctionDef': 1, 'AsyncFunctionDef': 1, 'ClassDef': 1, 'Return': 1, 'Delete': 1, 'Assign': 1, 'AugAssign': 1, 'AnnAssign': 1, 'For': 1, 'AsyncFor': 1, 'While': 1, 'If': 1, 'With': 1, 'AsyncWith': 1, 'Raise': 1, 'Try': 1, 'Assert': 1, 'Import': 1, 'ImportFrom': 1, 'Global': 1, 'Nonlocal': 1, 'Expr': 1, 'Pass': 1, 'Break': 1, 'Continue': 1, 'BoolOp': 1, 'BinOp': 1, 'UnaryOp': 1, 'Lambda': 1, 'IfExp': 1, 'Dict': 1, 'Set': 1, 'ListComp': 1, 'SetComp': 1, 'DictComp': 1, 'GeneratorExp': 1, 'Yield': 1, 'YieldFrom': 1, 'Compare': 1, 'Call': 1, 'Num': 1, 'Str': 1, 'FormattedValue': 1, 'JoinedStr': 1, 'Bytes': 1, 'NameConstant': 5, 'Ellipsis': 1, 'Constant': 1, 'Attribute': 1, 'Subscript': 1, 'Starred': 1, 'Name': 1, 'List': 1, 'Tuple': 1, 'Load': 1, 'Store': 1, 'Del': 1, 'AugLoad': 1, 'AugStore': 1, 'Param': 1, 'Slice': 1, 'ExtSlice': 1, 'Index': 1, 'And': 1, 'Or': 1, 'Add': 1, 'Sub': 1, 'Mult': 1, 'MatMult': 1, 'Div': 1, 'Mod': 1, 'Pow': 1, 'LShift': 1, 'RShift': 1, 'BitOr': 1, 'BitXor': 1, 'BitAnd': 1, 'FloorDiv': 1, 'Invert': 1, 'Not': 1, 'UAdd': 1, 'USub': 1, 'Eq': 1, 'NotEq': 1, 'Lt': 1, 'LtE': 1, 'Gt': 1, 'GtE': 1, 'Is': 1, 'IsNot': 1, 'In': 1, 'NotIn': 1, 'ExceptHandler': 1, # special leaf kinds: 'int': 0, 'float': 1, 'bool': 2, 'complex': 3, 'str': 4, } if node_weights: self.node_weights.update(node_weights) def enode_cost(self, node: ENode, costs: Dict[EClassID, Tuple[int, ENode]]) -> int: """ Calculate the cost of a node based solely on its key (not its children) """ key = node.key if hasattr(node.key, '__name__'): key = node.key.__name__ elif isinstance(node.key, tuple): key = node.key[0] if key in self.node_weights: return self.node_weights[key] elif node.key in self.node_weights: return self.node_weights[node.key] return 1 def enode_cost_rec( self, enode: ENode, costs: Dict[EClassID, Tuple[int, ENode]] ) -> int: """ Calculate the cost of a node based on its key and its children :param enode: the node to calculate the cost of :param costs: dictionary containing costs of children """ child_costs = sum(costs[eid][0] for eid in enode.args) return self.enode_cost(enode, costs) + child_costs def lookup( self, eclassid: EClassID, costs: Dict[EClassID, Tuple[int, ENode]] ) -> ASTQuicheTree: enode = costs[eclassid][1] return ASTQuicheTree.make_node(enode.key, [self.lookup(eid, costs) for eid in enode.args])
[ 1, 515, 19229, 1053, 360, 919, 29892, 12603, 552, 13, 13, 3166, 439, 4070, 29889, 15916, 1053, 9839, 3195, 13, 3166, 439, 4070, 29889, 387, 1140, 1053, 382, 4247, 29892, 382, 2385, 1367, 13, 3166, 439, 4070, 29889, 579, 29918, 339, 4070, 29918, 8336, 1053, 319, 1254, 2182, 4070, 9643, 13, 13, 13, 1990, 319, 1254, 3868, 332, 4695, 25733, 3195, 29898, 25733, 3195, 1125, 13, 1678, 9995, 13, 1678, 9839, 1904, 363, 319, 1254, 7573, 29892, 2729, 373, 376, 2311, 613, 474, 29889, 29872, 1696, 1353, 310, 4344, 13, 1678, 322, 884, 263, 6198, 7688, 292, 363, 319, 1254, 7573, 29889, 450, 2322, 7688, 292, 13, 1678, 1122, 2984, 635, 367, 10551, 287, 491, 4160, 29889, 13, 1678, 9995, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 2943, 29918, 705, 5861, 29901, 360, 919, 29961, 710, 29892, 938, 29962, 353, 6213, 1125, 13, 4706, 1583, 29889, 3177, 29918, 705, 5861, 353, 426, 13, 9651, 525, 7355, 2396, 29871, 29896, 29892, 13, 9651, 525, 4074, 4925, 2396, 29871, 29896, 29892, 13, 9651, 525, 10960, 2396, 29871, 29896, 29892, 13, 9651, 525, 5091, 568, 2396, 29871, 29896, 29892, 13, 9651, 525, 6678, 3206, 2396, 29871, 29896, 29892, 13, 9651, 525, 8123, 6678, 3206, 2396, 29871, 29896, 29892, 13, 9651, 525, 2385, 3206, 2396, 29871, 29896, 29892, 13, 9651, 525, 11609, 2396, 29871, 29896, 29892, 13, 9651, 525, 12498, 2396, 29871, 29896, 29892, 13, 9651, 525, 7900, 647, 2396, 29871, 29896, 29892, 13, 9651, 525, 29909, 688, 7900, 647, 2396, 29871, 29896, 29892, 13, 9651, 525, 2744, 29876, 7900, 647, 2396, 29871, 29896, 29892, 13, 9651, 525, 2831, 2396, 29871, 29896, 29892, 13, 9651, 525, 8123, 2831, 2396, 29871, 29896, 29892, 13, 9651, 525, 8809, 488, 2396, 29871, 29896, 29892, 13, 9651, 525, 3644, 2396, 29871, 29896, 29892, 13, 9651, 525, 3047, 2396, 29871, 29896, 29892, 13, 9651, 525, 8123, 3047, 2396, 29871, 29896, 29892, 13, 9651, 525, 29934, 29874, 895, 2396, 29871, 29896, 29892, 13, 9651, 525, 15870, 2396, 29871, 29896, 29892, 13, 9651, 525, 14697, 2396, 29871, 29896, 29892, 13, 9651, 525, 17518, 2396, 29871, 29896, 29892, 13, 9651, 525, 17518, 4591, 2396, 29871, 29896, 29892, 13, 9651, 525, 12756, 2396, 29871, 29896, 29892, 13, 9651, 525, 12283, 2997, 2396, 29871, 29896, 29892, 13, 9651, 525, 21176, 2396, 29871, 29896, 29892, 13, 9651, 525, 7129, 2396, 29871, 29896, 29892, 13, 9651, 525, 20130, 557, 2396, 29871, 29896, 29892, 13, 9651, 525, 1323, 14150, 2396, 29871, 29896, 29892, 13, 9651, 525, 24693, 11746, 2396, 29871, 29896, 29892, 13, 9651, 525, 29933, 262, 11746, 2396, 29871, 29896, 29892, 13, 9651, 525, 2525, 653, 11746, 2396, 29871, 29896, 29892, 13, 9651, 525, 9099, 2396, 29871, 29896, 29892, 13, 9651, 525, 3644, 9544, 2396, 29871, 29896, 29892, 13, 9651, 525, 21533, 2396, 29871, 29896, 29892, 13, 9651, 525, 2697, 2396, 29871, 29896, 29892, 13, 9651, 525, 1293, 6843, 2396, 29871, 29896, 29892, 13, 9651, 525, 2697, 6843, 2396, 29871, 29896, 29892, 13, 9651, 525, 21533, 6843, 2396, 29871, 29896, 29892, 13, 9651, 525, 21575, 9544, 2396, 29871, 29896, 29892, 13, 9651, 525, 29979, 969, 2396, 29871, 29896, 29892, 13, 9651, 525, 29979, 969, 4591, 2396, 29871, 29896, 29892, 13, 9651, 525, 6843, 598, 2396, 29871, 29896, 29892, 13, 9651, 525, 5594, 2396, 29871, 29896, 29892, 13, 9651, 525, 8009, 2396, 29871, 29896, 29892, 13, 9651, 525, 5015, 2396, 29871, 29896, 29892, 13, 9651, 525, 2500, 19667, 1917, 2396, 29871, 29896, 29892, 13, 9651, 525, 10844, 1312, 5015, 2396, 29871, 29896, 29892, 13, 9651, 525, 11207, 2396, 29871, 29896, 29892, 13, 9651, 525, 1170, 12075, 424, 2396, 29871, 29945, 29892, 13, 9651, 525, 6489, 492, 567, 275, 2396, 29871, 29896, 29892, 13, 9651, 525, 12075, 424, 2396, 29871, 29896, 29892, 13, 9651, 525, 6708, 2396, 29871, 29896, 29892, 13, 9651, 525, 4035, 2154, 2396, 29871, 29896, 29892, 13, 9651, 525, 16213, 1127, 2396, 29871, 29896, 29892, 13, 9651, 525, 1170, 2396, 29871, 29896, 29892, 13, 9651, 525, 1293, 2396, 29871, 29896, 29892, 13, 9651, 525, 23215, 552, 2396, 29871, 29896, 29892, 13, 9651, 525, 5896, 2396, 29871, 29896, 29892, 13, 9651, 525, 9044, 2396, 29871, 29896, 29892, 13, 9651, 525, 13157, 2396, 29871, 29896, 29892, 13, 9651, 525, 29909, 688, 5896, 2396, 29871, 29896, 29892, 13, 9651, 525, 29909, 688, 9044, 2396, 29871, 29896, 29892, 13, 9651, 525, 4736, 2396, 29871, 29896, 29892, 13, 9651, 525, 29903, 5897, 2396, 29871, 29896, 29892, 13, 9651, 525, 5647, 29903, 5897, 2396, 29871, 29896, 29892, 13, 9651, 525, 3220, 2396, 29871, 29896, 29892, 13, 9651, 525, 2855, 2396, 29871, 29896, 29892, 13, 9651, 525, 2816, 2396, 29871, 29896, 29892, 13, 9651, 525, 2528, 2396, 29871, 29896, 29892, 13, 9651, 525, 4035, 2396, 29871, 29896, 29892, 13, 9651, 525, 6857, 2396, 29871, 29896, 29892, 13, 9651, 525, 9782, 6857, 2396, 29871, 29896, 29892, 13, 9651, 525, 12596, 2396, 29871, 29896, 29892, 13, 9651, 525, 2111, 2396, 29871, 29896, 29892, 13, 9651, 525, 29925, 340, 2396, 29871, 29896, 29892, 13, 9651, 525, 29931, 29657, 2396, 29871, 29896, 29892, 13, 9651, 525, 29934, 29657, 2396, 29871, 29896, 29892, 13, 9651, 525, 21591, 2816, 2396, 29871, 29896, 29892, 13, 9651, 525, 21591, 29990, 272, 2396, 29871, 29896, 29892, 13, 9651, 525, 21591, 2855, 2396, 29871, 29896, 29892, 13, 9651, 525, 29943, 10102, 12596, 2396, 29871, 29896, 29892, 13, 9651, 525, 797, 1765, 2396, 29871, 29896, 29892, 13, 9651, 525, 3664, 2396, 29871, 29896, 29892, 13, 9651, 525, 29965, 2528, 2396, 29871, 29896, 29892, 13, 9651, 525, 3308, 431, 2396, 29871, 29896, 29892, 13, 9651, 525, 18630, 2396, 29871, 29896, 29892, 13, 9651, 525, 3664, 18630, 2396, 29871, 29896, 29892, 13, 9651, 525, 29931, 29873, 2396, 29871, 29896, 29892, 13, 9651, 525, 29931, 29873, 29923, 2396, 29871, 29896, 29892, 13, 9651, 525, 29954, 29873, 2396, 29871, 29896, 29892, 13, 9651, 525, 29954, 29873, 29923, 2396, 29871, 29896, 29892, 13, 9651, 525, 3624, 2396, 29871, 29896, 29892, 13, 9651, 525, 3624, 3664, 2396, 29871, 29896, 29892, 13, 9651, 525, 797, 2396, 29871, 29896, 29892, 13, 9651, 525, 3664, 797, 2396, 29871, 29896, 29892, 13, 9651, 525, 1252, 1547, 4598, 2396, 29871, 29896, 29892, 13, 9651, 396, 4266, 20447, 17690, 29901, 13, 9651, 525, 524, 2396, 29871, 29900, 29892, 13, 9651, 525, 7411, 2396, 29871, 29896, 29892, 13, 9651, 525, 11227, 2396, 29871, 29906, 29892, 13, 9651, 525, 19676, 2396, 29871, 29941, 29892, 13, 9651, 525, 710, 2396, 29871, 29946, 29892, 13, 4706, 500, 13, 4706, 565, 2943, 29918, 705, 5861, 29901, 13, 9651, 1583, 29889, 3177, 29918, 705, 5861, 29889, 5504, 29898, 3177, 29918, 705, 5861, 29897, 13, 13, 1678, 822, 427, 356, 29918, 18253, 29898, 1311, 29892, 2943, 29901, 382, 4247, 29892, 21544, 29901, 360, 919, 29961, 29923, 2385, 1367, 29892, 12603, 552, 29961, 524, 29892, 382, 4247, 24960, 1599, 938, 29901, 13, 4706, 9995, 13, 4706, 20535, 403, 278, 3438, 310, 263, 2943, 2729, 14419, 368, 373, 967, 1820, 313, 1333, 967, 4344, 29897, 13, 4706, 9995, 13, 4706, 1820, 353, 2943, 29889, 1989, 13, 4706, 565, 756, 5552, 29898, 3177, 29889, 1989, 29892, 525, 1649, 978, 1649, 29374, 13, 9651, 1820, 353, 2943, 29889, 1989, 17255, 978, 1649, 13, 4706, 25342, 338, 8758, 29898, 3177, 29889, 1989, 29892, 18761, 1125, 13, 9651, 1820, 353, 2943, 29889, 1989, 29961, 29900, 29962, 13, 13, 4706, 565, 1820, 297, 1583, 29889, 3177, 29918, 705, 5861, 29901, 13, 9651, 736, 1583, 29889, 3177, 29918, 705, 5861, 29961, 1989, 29962, 13, 4706, 25342, 2943, 29889, 1989, 297, 1583, 29889, 3177, 29918, 705, 5861, 29901, 13, 9651, 736, 1583, 29889, 3177, 29918, 705, 5861, 29961, 3177, 29889, 1989, 29962, 13, 4706, 736, 29871, 29896, 13, 13, 1678, 822, 427, 356, 29918, 18253, 29918, 3757, 29898, 13, 4706, 1583, 29892, 427, 356, 29901, 382, 4247, 29892, 21544, 29901, 360, 919, 29961, 29923, 2385, 1367, 29892, 12603, 552, 29961, 524, 29892, 382, 4247, 5262, 13, 1678, 1723, 1599, 938, 29901, 13, 4706, 9995, 13, 4706, 20535, 403, 278, 3438, 310, 263, 2943, 2729, 373, 967, 1820, 322, 967, 4344, 13, 13, 4706, 584, 3207, 427, 356, 29901, 278, 2943, 304, 8147, 278, 3438, 310, 13, 4706, 584, 3207, 21544, 29901, 8600, 6943, 21544, 310, 4344, 13, 4706, 9995, 13, 4706, 2278, 29918, 18253, 29879, 353, 2533, 29898, 18253, 29879, 29961, 29872, 333, 3816, 29900, 29962, 363, 321, 333, 297, 427, 356, 29889, 5085, 29897, 13, 4706, 736, 1583, 29889, 264, 356, 29918, 18253, 29898, 264, 356, 29892, 21544, 29897, 718, 2278, 29918, 18253, 29879, 13, 13, 1678, 822, 16280, 29898, 13, 4706, 1583, 29892, 321, 1990, 333, 29901, 382, 2385, 1367, 29892, 21544, 29901, 360, 919, 29961, 29923, 2385, 1367, 29892, 12603, 552, 29961, 524, 29892, 382, 4247, 5262, 13, 1678, 1723, 1599, 319, 1254, 2182, 4070, 9643, 29901, 13, 4706, 427, 356, 353, 21544, 29961, 687, 605, 333, 3816, 29896, 29962, 13, 4706, 736, 319, 1254, 2182, 4070, 9643, 29889, 5675, 29918, 3177, 29898, 264, 356, 29889, 1989, 29892, 518, 1311, 29889, 20401, 29898, 29872, 333, 29892, 21544, 29897, 363, 321, 333, 297, 427, 356, 29889, 5085, 2314, 13, 2 ]
src/waldur_openstack/openstack/migrations/0006_router.py
geant-multicloud/MCMS-mastermind
26
162937
# Generated by Django 2.2.13 on 2020-10-09 17:57 import django.db.models.deletion import django.utils.timezone import model_utils.fields from django.db import migrations, models import waldur_core.core.fields import waldur_core.core.models import waldur_core.core.shims import waldur_core.core.validators import waldur_core.structure.models class Migration(migrations.Migration): dependencies = [ ('taggit', '0003_taggeditem_add_unique_index'), ('openstack', '0005_error_traceback'), ] operations = [ migrations.CreateModel( name='Router', fields=[ ( 'id', models.AutoField( auto_created=True, primary_key=True, serialize=False, verbose_name='ID', ), ), ( 'created', model_utils.fields.AutoCreatedField( default=django.utils.timezone.now, editable=False, verbose_name='created', ), ), ( 'modified', model_utils.fields.AutoLastModifiedField( default=django.utils.timezone.now, editable=False, verbose_name='modified', ), ), ( 'description', models.CharField( blank=True, max_length=2000, verbose_name='description' ), ), ( 'name', models.CharField( max_length=150, validators=[waldur_core.core.validators.validate_name], verbose_name='name', ), ), ('uuid', waldur_core.core.fields.UUIDField()), ('backend_id', models.CharField(blank=True, max_length=255)), ( 'service_project_link', models.ForeignKey( on_delete=django.db.models.deletion.PROTECT, related_name='routers', to='openstack.OpenStackServiceProjectLink', ), ), ( 'tags', waldur_core.core.shims.TaggableManager( blank=True, help_text='A comma-separated list of tags.', related_name='router_router_openstack', through='taggit.TaggedItem', to='taggit.Tag', verbose_name='Tags', ), ), ( 'tenant', models.ForeignKey( on_delete=django.db.models.deletion.CASCADE, related_name='routers', to='openstack.Tenant', ), ), ], options={'abstract': False,}, bases=( waldur_core.core.models.DescendantMixin, waldur_core.core.models.BackendModelMixin, waldur_core.structure.models.StructureLoggableMixin, models.Model, ), ), ]
[ 1, 396, 3251, 630, 491, 15337, 29871, 29906, 29889, 29906, 29889, 29896, 29941, 373, 29871, 29906, 29900, 29906, 29900, 29899, 29896, 29900, 29899, 29900, 29929, 29871, 29896, 29955, 29901, 29945, 29955, 13, 13, 5215, 9557, 29889, 2585, 29889, 9794, 29889, 311, 1026, 291, 13, 5215, 9557, 29889, 13239, 29889, 2230, 8028, 13, 5215, 1904, 29918, 13239, 29889, 9621, 13, 3166, 9557, 29889, 2585, 1053, 9725, 800, 29892, 4733, 13, 13, 5215, 281, 2741, 332, 29918, 3221, 29889, 3221, 29889, 9621, 13, 5215, 281, 2741, 332, 29918, 3221, 29889, 3221, 29889, 9794, 13, 5215, 281, 2741, 332, 29918, 3221, 29889, 3221, 29889, 845, 9893, 13, 5215, 281, 2741, 332, 29918, 3221, 29889, 3221, 29889, 3084, 4097, 13, 5215, 281, 2741, 332, 29918, 3221, 29889, 23905, 29889, 9794, 13, 13, 13, 1990, 341, 16783, 29898, 26983, 800, 29889, 29924, 16783, 1125, 13, 13, 1678, 9962, 353, 518, 13, 4706, 6702, 4039, 5559, 742, 525, 29900, 29900, 29900, 29941, 29918, 4039, 3192, 667, 29918, 1202, 29918, 13092, 29918, 2248, 5477, 13, 4706, 6702, 3150, 1429, 742, 525, 29900, 29900, 29900, 29945, 29918, 2704, 29918, 15003, 1627, 5477, 13, 1678, 4514, 13, 13, 1678, 6931, 353, 518, 13, 4706, 9725, 800, 29889, 4391, 3195, 29898, 13, 9651, 1024, 2433, 23971, 742, 13, 9651, 4235, 11759, 13, 18884, 313, 13, 462, 1678, 525, 333, 742, 13, 462, 1678, 4733, 29889, 12300, 3073, 29898, 13, 462, 4706, 4469, 29918, 11600, 29922, 5574, 29892, 13, 462, 4706, 7601, 29918, 1989, 29922, 5574, 29892, 13, 462, 4706, 28755, 29922, 8824, 29892, 13, 462, 4706, 26952, 29918, 978, 2433, 1367, 742, 13, 462, 1678, 10353, 13, 18884, 10353, 13, 18884, 313, 13, 462, 1678, 525, 11600, 742, 13, 462, 1678, 1904, 29918, 13239, 29889, 9621, 29889, 12300, 20399, 3073, 29898, 13, 462, 4706, 2322, 29922, 14095, 29889, 13239, 29889, 2230, 8028, 29889, 3707, 29892, 13, 462, 4706, 3863, 519, 29922, 8824, 29892, 13, 462, 4706, 26952, 29918, 978, 2433, 11600, 742, 13, 462, 1678, 10353, 13, 18884, 10353, 13, 18884, 313, 13, 462, 1678, 525, 1545, 2164, 742, 13, 462, 1678, 1904, 29918, 13239, 29889, 9621, 29889, 12300, 8897, 2111, 2164, 3073, 29898, 13, 462, 4706, 2322, 29922, 14095, 29889, 13239, 29889, 2230, 8028, 29889, 3707, 29892, 13, 462, 4706, 3863, 519, 29922, 8824, 29892, 13, 462, 4706, 26952, 29918, 978, 2433, 1545, 2164, 742, 13, 462, 1678, 10353, 13, 18884, 10353, 13, 18884, 313, 13, 462, 1678, 525, 8216, 742, 13, 462, 1678, 4733, 29889, 27890, 29898, 13, 462, 4706, 9654, 29922, 5574, 29892, 4236, 29918, 2848, 29922, 29906, 29900, 29900, 29900, 29892, 26952, 29918, 978, 2433, 8216, 29915, 13, 462, 1678, 10353, 13, 18884, 10353, 13, 18884, 313, 13, 462, 1678, 525, 978, 742, 13, 462, 1678, 4733, 29889, 27890, 29898, 13, 462, 4706, 4236, 29918, 2848, 29922, 29896, 29945, 29900, 29892, 13, 462, 4706, 2854, 4097, 11759, 18370, 332, 29918, 3221, 29889, 3221, 29889, 3084, 4097, 29889, 15480, 29918, 978, 1402, 13, 462, 4706, 26952, 29918, 978, 2433, 978, 742, 13, 462, 1678, 10353, 13, 18884, 10353, 13, 18884, 6702, 25118, 742, 281, 2741, 332, 29918, 3221, 29889, 3221, 29889, 9621, 29889, 29965, 11150, 3073, 25739, 13, 18884, 6702, 27852, 29918, 333, 742, 4733, 29889, 27890, 29898, 19465, 29922, 5574, 29892, 4236, 29918, 2848, 29922, 29906, 29945, 29945, 8243, 13, 18884, 313, 13, 462, 1678, 525, 5509, 29918, 4836, 29918, 2324, 742, 13, 462, 1678, 4733, 29889, 27755, 2558, 29898, 13, 462, 4706, 373, 29918, 8143, 29922, 14095, 29889, 2585, 29889, 9794, 29889, 311, 1026, 291, 29889, 8618, 4330, 1783, 29892, 13, 462, 4706, 4475, 29918, 978, 2433, 27537, 2153, 742, 13, 462, 4706, 304, 2433, 3150, 1429, 29889, 6585, 7264, 3170, 7653, 6595, 742, 13, 462, 1678, 10353, 13, 18884, 10353, 13, 18884, 313, 13, 462, 1678, 525, 11338, 742, 13, 462, 1678, 281, 2741, 332, 29918, 3221, 29889, 3221, 29889, 845, 9893, 29889, 8176, 29531, 3260, 29898, 13, 462, 4706, 9654, 29922, 5574, 29892, 13, 462, 4706, 1371, 29918, 726, 2433, 29909, 16694, 29899, 25048, 630, 1051, 310, 8282, 29889, 742, 13, 462, 4706, 4475, 29918, 978, 2433, 15140, 29918, 15140, 29918, 3150, 1429, 742, 13, 462, 4706, 1549, 2433, 4039, 5559, 29889, 8176, 3192, 2001, 742, 13, 462, 4706, 304, 2433, 4039, 5559, 29889, 8176, 742, 13, 462, 4706, 26952, 29918, 978, 2433, 28089, 742, 13, 462, 1678, 10353, 13, 18884, 10353, 13, 18884, 313, 13, 462, 1678, 525, 841, 424, 742, 13, 462, 1678, 4733, 29889, 27755, 2558, 29898, 13, 462, 4706, 373, 29918, 8143, 29922, 14095, 29889, 2585, 29889, 9794, 29889, 311, 1026, 291, 29889, 29907, 3289, 5454, 2287, 29892, 13, 462, 4706, 4475, 29918, 978, 2433, 27537, 2153, 742, 13, 462, 4706, 304, 2433, 3150, 1429, 29889, 29911, 27153, 742, 13, 462, 1678, 10353, 13, 18884, 10353, 13, 9651, 21251, 13, 9651, 3987, 3790, 29915, 16595, 2396, 7700, 29892, 1118, 13, 9651, 22561, 7607, 13, 18884, 281, 2741, 332, 29918, 3221, 29889, 3221, 29889, 9794, 29889, 19617, 5818, 29924, 861, 262, 29892, 13, 18884, 281, 2741, 332, 29918, 3221, 29889, 3221, 29889, 9794, 29889, 5841, 355, 3195, 29924, 861, 262, 29892, 13, 18884, 281, 2741, 332, 29918, 3221, 29889, 23905, 29889, 9794, 29889, 5015, 12425, 3403, 29531, 29924, 861, 262, 29892, 13, 18884, 4733, 29889, 3195, 29892, 13, 9651, 10353, 13, 4706, 10353, 13, 1678, 4514, 13, 2 ]
cymepy/export_manager/hooks/JSON_writer.py
GMLC-TDC/cymepy
1
36257
<gh_stars>1-10 from cymepy.export_manager.base_definations import ExportManager from cymepy.common import EXPORT_FILENAME import json import os class Writer(ExportManager): def __init__(self, sim_instance, solver, options, logger, **kwargs): super(Writer, self).__init__(sim_instance, solver, options, logger, **kwargs) self.results = [] self.path = os.path.join( self.settings["project"]['project_path'], 'exports', f"{EXPORT_FILENAME}.json" ) pass def update(self): results = super().update() self.results.append(results) return def export(self): with open(self.path, "w") as write_file: json.dump(self.results, write_file, indent=4, sort_keys=True)
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 3166, 274, 962, 1022, 29891, 29889, 15843, 29918, 12847, 29889, 3188, 29918, 25476, 800, 1053, 1222, 637, 3260, 13, 3166, 274, 962, 1022, 29891, 29889, 9435, 1053, 8528, 15082, 29918, 7724, 5813, 13, 5215, 4390, 13, 5215, 2897, 13, 13, 1990, 399, 5385, 29898, 26382, 3260, 1125, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 1027, 29918, 8758, 29892, 899, 369, 29892, 3987, 29892, 17927, 29892, 3579, 19290, 1125, 13, 4706, 2428, 29898, 10507, 29892, 1583, 467, 1649, 2344, 12035, 3601, 29918, 8758, 29892, 899, 369, 29892, 3987, 29892, 17927, 29892, 3579, 19290, 29897, 13, 4706, 1583, 29889, 9902, 353, 5159, 13, 4706, 1583, 29889, 2084, 353, 2897, 29889, 2084, 29889, 7122, 29898, 13, 9651, 1583, 29889, 11027, 3366, 4836, 3108, 1839, 4836, 29918, 2084, 7464, 13, 9651, 525, 26500, 742, 13, 9651, 285, 29908, 29912, 5746, 15082, 29918, 7724, 5813, 1836, 3126, 29908, 13, 4706, 1723, 13, 4706, 1209, 13, 13, 1678, 822, 2767, 29898, 1311, 1125, 13, 4706, 2582, 353, 2428, 2141, 5504, 580, 13, 4706, 1583, 29889, 9902, 29889, 4397, 29898, 9902, 29897, 13, 4706, 736, 13, 13, 1678, 822, 5609, 29898, 1311, 1125, 13, 4706, 411, 1722, 29898, 1311, 29889, 2084, 29892, 376, 29893, 1159, 408, 2436, 29918, 1445, 29901, 13, 9651, 4390, 29889, 15070, 29898, 1311, 29889, 9902, 29892, 2436, 29918, 1445, 29892, 29536, 29922, 29946, 29892, 2656, 29918, 8149, 29922, 5574, 29897, 13, 2 ]
drl_grasping/envs/models/primitives/__init__.py
Tiamat-Tech/drl_grasping
126
103702
from .box import Box from .cylinder import Cylinder from .sphere import Sphere from .random_primitive import RandomPrimitive from .plane import Plane
[ 1, 515, 869, 1884, 1053, 11773, 13, 3166, 869, 1270, 29880, 4995, 1053, 315, 2904, 4995, 13, 3166, 869, 29879, 9085, 1053, 317, 9085, 13, 3166, 869, 8172, 29918, 9469, 3321, 1053, 16968, 18213, 3321, 13, 3166, 869, 22116, 1053, 1858, 1662, 2 ]
blog/models/__init__.py
sharif-42/Personal_Website
0
161530
<reponame>sharif-42/Personal_Website<filename>blog/models/__init__.py from .post import Post from .comments import Comment
[ 1, 529, 276, 1112, 420, 29958, 845, 279, 361, 29899, 29946, 29906, 29914, 7435, 284, 29918, 3609, 2746, 29966, 9507, 29958, 7312, 29914, 9794, 29914, 1649, 2344, 26914, 2272, 13, 3166, 869, 2490, 1053, 4918, 13, 3166, 869, 21032, 1053, 461, 13, 2 ]
tests/e2e/utils.py
BeryJu/passbook
15
169884
"""authentik e2e testing utilities""" import json import os from functools import lru_cache, wraps from os import environ, makedirs from time import sleep, time from typing import Any, Callable, Optional from django.apps import apps from django.contrib.staticfiles.testing import StaticLiveServerTestCase from django.db import connection from django.db.migrations.loader import MigrationLoader from django.db.migrations.operations.special import RunPython from django.test.testcases import TransactionTestCase from django.urls import reverse from docker import DockerClient, from_env from docker.errors import DockerException from docker.models.containers import Container from selenium import webdriver from selenium.common.exceptions import NoSuchElementException, TimeoutException, WebDriverException from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys from selenium.webdriver.remote.webdriver import WebDriver from selenium.webdriver.remote.webelement import WebElement from selenium.webdriver.support.ui import WebDriverWait from structlog.stdlib import get_logger from authentik.core.api.users import UserSerializer from authentik.core.models import User from authentik.core.tests.utils import create_test_admin_user from authentik.managed.manager import ObjectManager RETRIES = int(environ.get("RETRIES", "3")) def get_docker_tag() -> str: """Get docker-tag based off of CI variables""" env_pr_branch = "GITHUB_HEAD_REF" default_branch = "GITHUB_REF" branch_name = os.environ.get(default_branch, "main") if os.environ.get(env_pr_branch, "") != "": branch_name = os.environ[env_pr_branch] branch_name = branch_name.replace("refs/heads/", "").replace("/", "-") return f"gh-{branch_name}" class SeleniumTestCase(StaticLiveServerTestCase): """StaticLiveServerTestCase which automatically creates a Webdriver instance""" container: Optional[Container] = None wait_timeout: int user: User def setUp(self): super().setUp() # pylint: disable=invalid-name self.maxDiff = None self.wait_timeout = 60 self.driver = self._get_driver() self.driver.maximize_window() self.driver.implicitly_wait(30) self.wait = WebDriverWait(self.driver, self.wait_timeout) self.logger = get_logger() self.user = create_test_admin_user() if specs := self.get_container_specs(): self.container = self._start_container(specs) def get_container_image(self, base: str) -> str: """Try to pull docker image based on git branch, fallback to main if not found.""" client: DockerClient = from_env() image = f"{base}:gh-main" try: branch_image = f"{base}:{get_docker_tag()}" client.images.pull(branch_image) return branch_image except DockerException: client.images.pull(image) return image def _start_container(self, specs: dict[str, Any]) -> Container: client: DockerClient = from_env() container = client.containers.run(**specs) if "healthcheck" not in specs: return container while True: container.reload() status = container.attrs.get("State", {}).get("Health", {}).get("Status") if status == "healthy": return container self.logger.info("Container failed healthcheck") sleep(1) def output_container_logs(self, container: Optional[Container] = None): """Output the container logs to our STDOUT""" _container = container or self.container print(f"--------container logs {_container.image.tags[0]}") for log in _container.logs().decode().split("\n"): print(log) print(f"--------end container logs {_container.image.tags[0]}") def get_container_specs(self) -> Optional[dict[str, Any]]: """Optionally get container specs which will launched on setup, wait for the container to be healthy, and deleted again on tearDown""" return None def _get_driver(self) -> WebDriver: count = 0 while count < RETRIES: try: return webdriver.Remote( command_executor="http://localhost:4444/wd/hub", options=webdriver.ChromeOptions(), ) except WebDriverException: count += 1 raise ValueError(f"Webdriver failed after {RETRIES}.") def tearDown(self): if "TF_BUILD" in environ: makedirs("selenium_screenshots/", exist_ok=True) screenshot_file = f"selenium_screenshots/{self.__class__.__name__}_{time()}.png" self.driver.save_screenshot(screenshot_file) self.logger.warning("Saved screenshot", file=screenshot_file) self.logger.debug("--------browser logs") for line in self.driver.get_log("browser"): self.logger.debug(line["message"], source=line["source"], level=line["level"]) self.logger.debug("--------end browser logs") if self.container: self.output_container_logs() self.container.kill() self.driver.quit() super().tearDown() def wait_for_url(self, desired_url): """Wait until URL is `desired_url`.""" self.wait.until( lambda driver: driver.current_url == desired_url, f"URL {self.driver.current_url} doesn't match expected URL {desired_url}", ) def url(self, view, **kwargs) -> str: """reverse `view` with `**kwargs` into full URL using live_server_url""" return self.live_server_url + reverse(view, kwargs=kwargs) def if_user_url(self, view) -> str: """same as self.url() but show URL in shell""" return f"{self.live_server_url}/if/user/#{view}" def get_shadow_root(self, selector: str, container: Optional[WebElement] = None) -> WebElement: """Get shadow root element's inner shadowRoot""" if not container: container = self.driver shadow_root = container.find_element(By.CSS_SELECTOR, selector) element = self.driver.execute_script("return arguments[0].shadowRoot", shadow_root) return element def login(self): """Do entire login flow and check user afterwards""" flow_executor = self.get_shadow_root("ak-flow-executor") identification_stage = self.get_shadow_root("ak-stage-identification", flow_executor) identification_stage.find_element(By.CSS_SELECTOR, "input[name=uidField]").click() identification_stage.find_element(By.CSS_SELECTOR, "input[name=uidField]").send_keys( self.user.username ) identification_stage.find_element(By.CSS_SELECTOR, "input[name=uidField]").send_keys( Keys.ENTER ) flow_executor = self.get_shadow_root("ak-flow-executor") password_stage = self.get_shadow_root("ak-stage-password", flow_executor) password_stage.find_element(By.CSS_SELECTOR, "input[name=password]").send_keys( self.user.username ) password_stage.find_element(By.CSS_SELECTOR, "input[name=password]").send_keys(Keys.ENTER) sleep(1) def assert_user(self, expected_user: User): """Check users/me API and assert it matches expected_user""" self.driver.get(self.url("authentik_api:user-me") + "?format=json") user_json = self.driver.find_element(By.CSS_SELECTOR, "pre").text user = UserSerializer(data=json.loads(user_json)["user"]) user.is_valid() self.assertEqual(user["username"].value, expected_user.username) self.assertEqual(user["name"].value, expected_user.name) self.assertEqual(user["email"].value, expected_user.email) @lru_cache def get_loader(): """Thin wrapper to lazily get a Migration Loader, only when it's needed and only once""" return MigrationLoader(connection) def apply_migration(app_name: str, migration_name: str): """Re-apply migrations that create objects using RunPython before test cases""" def wrapper_outter(func: Callable): """Retry test multiple times""" @wraps(func) def wrapper(self: TransactionTestCase, *args, **kwargs): migration = get_loader().get_migration(app_name, migration_name) with connection.schema_editor() as schema_editor: for operation in migration.operations: if not isinstance(operation, RunPython): continue operation.code(apps, schema_editor) return func(self, *args, **kwargs) return wrapper return wrapper_outter def object_manager(func: Callable): """Run objectmanager before a test function""" @wraps(func) def wrapper(*args, **kwargs): """Run objectmanager before a test function""" ObjectManager().run() return func(*args, **kwargs) return wrapper def retry(max_retires=RETRIES, exceptions=None): """Retry test multiple times. Default to catching Selenium Timeout Exception""" if not exceptions: exceptions = [WebDriverException, TimeoutException, NoSuchElementException] logger = get_logger() def retry_actual(func: Callable): """Retry test multiple times""" count = 1 @wraps(func) def wrapper(self: TransactionTestCase, *args, **kwargs): """Run test again if we're below max_retries, including tearDown and setUp. Otherwise raise the error""" nonlocal count try: return func(self, *args, **kwargs) # pylint: disable=catching-non-exception except tuple(exceptions) as exc: count += 1 if count > max_retires: logger.debug("Exceeded retry count", exc=exc, test=self) # pylint: disable=raising-non-exception raise exc logger.debug("Retrying on error", exc=exc, test=self) self.tearDown() self._post_teardown() # noqa self.setUp() return wrapper(self, *args, **kwargs) return wrapper return retry_actual
[ 1, 9995, 5150, 296, 638, 321, 29906, 29872, 6724, 3667, 1907, 15945, 29908, 13, 5215, 4390, 13, 5215, 2897, 13, 3166, 2090, 312, 8789, 1053, 301, 582, 29918, 8173, 29892, 11463, 567, 13, 3166, 2897, 1053, 12471, 29892, 2136, 287, 12935, 13, 3166, 931, 1053, 8709, 29892, 931, 13, 3166, 19229, 1053, 3139, 29892, 8251, 519, 29892, 28379, 13, 13, 3166, 9557, 29889, 13371, 1053, 11446, 13, 3166, 9557, 29889, 21570, 29889, 7959, 5325, 29889, 13424, 1053, 624, 2454, 23859, 6004, 3057, 8259, 13, 3166, 9557, 29889, 2585, 1053, 3957, 13, 3166, 9557, 29889, 2585, 29889, 26983, 800, 29889, 12657, 1053, 341, 16783, 10036, 13, 3166, 9557, 29889, 2585, 29889, 26983, 800, 29889, 3372, 800, 29889, 18732, 1053, 7525, 11980, 13, 3166, 9557, 29889, 1688, 29889, 1688, 11436, 1053, 4103, 2467, 3057, 8259, 13, 3166, 9557, 29889, 26045, 1053, 11837, 13, 3166, 10346, 1053, 20868, 4032, 29892, 515, 29918, 6272, 13, 3166, 10346, 29889, 12523, 1053, 20868, 2451, 13, 3166, 10346, 29889, 9794, 29889, 1285, 475, 414, 1053, 21679, 13, 3166, 18866, 1053, 1856, 9465, 13, 3166, 18866, 29889, 9435, 29889, 11739, 29879, 1053, 1939, 29903, 987, 2642, 2451, 29892, 5974, 449, 2451, 29892, 2563, 12376, 2451, 13, 3166, 18866, 29889, 29813, 29889, 9435, 29889, 1609, 1053, 2648, 13, 3166, 18866, 29889, 29813, 29889, 9435, 29889, 8149, 1053, 4813, 952, 13, 3166, 18866, 29889, 29813, 29889, 16674, 29889, 29813, 1053, 2563, 12376, 13, 3166, 18866, 29889, 29813, 29889, 16674, 29889, 705, 915, 944, 1053, 2563, 2642, 13, 3166, 18866, 29889, 29813, 29889, 5924, 29889, 1481, 1053, 2563, 12376, 15716, 13, 3166, 2281, 1188, 29889, 4172, 1982, 1053, 679, 29918, 21707, 13, 13, 3166, 4817, 296, 638, 29889, 3221, 29889, 2754, 29889, 7193, 1053, 4911, 17679, 13, 3166, 4817, 296, 638, 29889, 3221, 29889, 9794, 1053, 4911, 13, 3166, 4817, 296, 638, 29889, 3221, 29889, 21150, 29889, 13239, 1053, 1653, 29918, 1688, 29918, 6406, 29918, 1792, 13, 3166, 4817, 296, 638, 29889, 25240, 29889, 12847, 1053, 4669, 3260, 13, 13, 1525, 29911, 3960, 2890, 353, 938, 29898, 21813, 29889, 657, 703, 1525, 29911, 3960, 2890, 613, 376, 29941, 5783, 13, 13, 13, 1753, 679, 29918, 14695, 29918, 4039, 580, 1599, 851, 29901, 13, 1678, 9995, 2577, 10346, 29899, 4039, 2729, 1283, 310, 25781, 3651, 15945, 29908, 13, 1678, 8829, 29918, 558, 29918, 17519, 353, 376, 29954, 13054, 7466, 29918, 23252, 29918, 25866, 29908, 13, 1678, 2322, 29918, 17519, 353, 376, 29954, 13054, 7466, 29918, 25866, 29908, 13, 1678, 5443, 29918, 978, 353, 2897, 29889, 21813, 29889, 657, 29898, 4381, 29918, 17519, 29892, 376, 3396, 1159, 13, 1678, 565, 2897, 29889, 21813, 29889, 657, 29898, 6272, 29918, 558, 29918, 17519, 29892, 20569, 2804, 376, 1115, 13, 4706, 5443, 29918, 978, 353, 2897, 29889, 21813, 29961, 6272, 29918, 558, 29918, 17519, 29962, 13, 1678, 5443, 29918, 978, 353, 5443, 29918, 978, 29889, 6506, 703, 24539, 29914, 2813, 29879, 29914, 613, 376, 2564, 6506, 11974, 613, 11663, 1159, 13, 1678, 736, 285, 29908, 12443, 29899, 29912, 17519, 29918, 978, 5038, 13, 13, 13, 1990, 317, 13462, 3057, 8259, 29898, 17046, 23859, 6004, 3057, 8259, 1125, 13, 1678, 9995, 17046, 23859, 6004, 3057, 8259, 607, 6336, 10017, 263, 2563, 9465, 2777, 15945, 29908, 13, 13, 1678, 5639, 29901, 28379, 29961, 7895, 29962, 353, 6213, 13, 1678, 4480, 29918, 15619, 29901, 938, 13, 1678, 1404, 29901, 4911, 13, 13, 1678, 822, 731, 3373, 29898, 1311, 1125, 13, 4706, 2428, 2141, 842, 3373, 580, 13, 4706, 396, 282, 2904, 524, 29901, 11262, 29922, 20965, 29899, 978, 13, 4706, 1583, 29889, 3317, 26023, 353, 6213, 13, 4706, 1583, 29889, 10685, 29918, 15619, 353, 29871, 29953, 29900, 13, 4706, 1583, 29889, 9465, 353, 1583, 3032, 657, 29918, 9465, 580, 13, 4706, 1583, 29889, 9465, 29889, 27525, 675, 29918, 7165, 580, 13, 4706, 1583, 29889, 9465, 29889, 6574, 4019, 368, 29918, 10685, 29898, 29941, 29900, 29897, 13, 4706, 1583, 29889, 10685, 353, 2563, 12376, 15716, 29898, 1311, 29889, 9465, 29892, 1583, 29889, 10685, 29918, 15619, 29897, 13, 4706, 1583, 29889, 21707, 353, 679, 29918, 21707, 580, 13, 4706, 1583, 29889, 1792, 353, 1653, 29918, 1688, 29918, 6406, 29918, 1792, 580, 13, 4706, 565, 1580, 29879, 3490, 1583, 29889, 657, 29918, 7611, 29918, 5965, 2395, 7295, 13, 9651, 1583, 29889, 7611, 353, 1583, 3032, 2962, 29918, 7611, 29898, 5965, 2395, 29897, 13, 13, 1678, 822, 679, 29918, 7611, 29918, 3027, 29898, 1311, 29892, 2967, 29901, 851, 29897, 1599, 851, 29901, 13, 4706, 9995, 15870, 304, 8206, 10346, 1967, 2729, 373, 6315, 5443, 29892, 6416, 1627, 304, 1667, 565, 451, 1476, 1213, 15945, 13, 4706, 3132, 29901, 20868, 4032, 353, 515, 29918, 6272, 580, 13, 4706, 1967, 353, 285, 29908, 29912, 3188, 6177, 12443, 29899, 3396, 29908, 13, 4706, 1018, 29901, 13, 9651, 5443, 29918, 3027, 353, 285, 29908, 29912, 3188, 6177, 29912, 657, 29918, 14695, 29918, 4039, 580, 5038, 13, 9651, 3132, 29889, 8346, 29889, 26746, 29898, 17519, 29918, 3027, 29897, 13, 9651, 736, 5443, 29918, 3027, 13, 4706, 5174, 20868, 2451, 29901, 13, 9651, 3132, 29889, 8346, 29889, 26746, 29898, 3027, 29897, 13, 4706, 736, 1967, 13, 13, 1678, 822, 903, 2962, 29918, 7611, 29898, 1311, 29892, 1580, 29879, 29901, 9657, 29961, 710, 29892, 3139, 2314, 1599, 21679, 29901, 13, 4706, 3132, 29901, 20868, 4032, 353, 515, 29918, 6272, 580, 13, 4706, 5639, 353, 3132, 29889, 1285, 475, 414, 29889, 3389, 29898, 1068, 5965, 2395, 29897, 13, 4706, 565, 376, 354, 4298, 3198, 29908, 451, 297, 1580, 29879, 29901, 13, 9651, 736, 5639, 13, 4706, 1550, 5852, 29901, 13, 9651, 5639, 29889, 28120, 580, 13, 9651, 4660, 353, 5639, 29889, 5552, 29879, 29889, 657, 703, 2792, 613, 6571, 467, 657, 703, 3868, 4298, 613, 6571, 467, 657, 703, 5709, 1159, 13, 9651, 565, 4660, 1275, 376, 354, 4298, 29891, 1115, 13, 18884, 736, 5639, 13, 9651, 1583, 29889, 21707, 29889, 3888, 703, 7895, 5229, 9045, 3198, 1159, 13, 9651, 8709, 29898, 29896, 29897, 13, 13, 1678, 822, 1962, 29918, 7611, 29918, 20756, 29898, 1311, 29892, 5639, 29901, 28379, 29961, 7895, 29962, 353, 6213, 1125, 13, 4706, 9995, 6466, 278, 5639, 10748, 304, 1749, 6850, 3970, 2692, 15945, 29908, 13, 4706, 903, 7611, 353, 5639, 470, 1583, 29889, 7611, 13, 4706, 1596, 29898, 29888, 29908, 1378, 7611, 10748, 426, 29918, 7611, 29889, 3027, 29889, 11338, 29961, 29900, 12258, 1159, 13, 4706, 363, 1480, 297, 903, 7611, 29889, 20756, 2141, 13808, 2141, 5451, 14182, 29876, 29908, 1125, 13, 9651, 1596, 29898, 1188, 29897, 13, 4706, 1596, 29898, 29888, 29908, 1378, 355, 5639, 10748, 426, 29918, 7611, 29889, 3027, 29889, 11338, 29961, 29900, 12258, 1159, 13, 13, 1678, 822, 679, 29918, 7611, 29918, 5965, 2395, 29898, 1311, 29897, 1599, 28379, 29961, 8977, 29961, 710, 29892, 3139, 5262, 29901, 13, 4706, 9995, 8375, 635, 679, 5639, 1580, 29879, 607, 674, 15241, 373, 6230, 29892, 4480, 363, 278, 5639, 304, 13, 4706, 367, 9045, 29891, 29892, 322, 11132, 1449, 373, 734, 279, 6767, 15945, 29908, 13, 4706, 736, 6213, 13, 13, 1678, 822, 903, 657, 29918, 9465, 29898, 1311, 29897, 1599, 2563, 12376, 29901, 13, 4706, 2302, 353, 29871, 29900, 13, 4706, 1550, 2302, 529, 28081, 3960, 2890, 29901, 13, 9651, 1018, 29901, 13, 18884, 736, 1856, 9465, 29889, 20224, 29898, 13, 462, 1678, 1899, 29918, 4258, 3406, 543, 1124, 597, 7640, 29901, 29946, 29946, 29946, 29946, 29914, 9970, 29914, 29882, 431, 613, 13, 462, 1678, 3987, 29922, 29813, 29889, 1451, 4871, 5856, 3285, 13, 18884, 1723, 13, 9651, 5174, 2563, 12376, 2451, 29901, 13, 18884, 2302, 4619, 29871, 29896, 13, 4706, 12020, 7865, 2392, 29898, 29888, 29908, 3609, 9465, 5229, 1156, 426, 1525, 29911, 3960, 2890, 1836, 1159, 13, 13, 1678, 822, 734, 279, 6767, 29898, 1311, 1125, 13, 4706, 565, 376, 8969, 29918, 29933, 25282, 29908, 297, 12471, 29901, 13, 9651, 2136, 287, 12935, 703, 27373, 29918, 29879, 24546, 29882, 1862, 29914, 613, 1863, 29918, 554, 29922, 5574, 29897, 13, 9651, 17286, 29918, 1445, 353, 285, 29908, 27373, 29918, 29879, 24546, 29882, 1862, 19248, 1311, 17255, 1990, 1649, 17255, 978, 1649, 3227, 2230, 580, 1836, 2732, 29908, 13, 9651, 1583, 29889, 9465, 29889, 7620, 29918, 29879, 24546, 8711, 29898, 29879, 24546, 8711, 29918, 1445, 29897, 13, 9651, 1583, 29889, 21707, 29889, 27392, 703, 29903, 10511, 17286, 613, 934, 29922, 29879, 24546, 8711, 29918, 1445, 29897, 13, 4706, 1583, 29889, 21707, 29889, 8382, 703, 1378, 15965, 10748, 1159, 13, 4706, 363, 1196, 297, 1583, 29889, 9465, 29889, 657, 29918, 1188, 703, 15965, 29908, 1125, 13, 9651, 1583, 29889, 21707, 29889, 8382, 29898, 1220, 3366, 4906, 12436, 2752, 29922, 1220, 3366, 4993, 12436, 3233, 29922, 1220, 3366, 5563, 20068, 13, 4706, 1583, 29889, 21707, 29889, 8382, 703, 1378, 355, 4714, 10748, 1159, 13, 4706, 565, 1583, 29889, 7611, 29901, 13, 9651, 1583, 29889, 4905, 29918, 7611, 29918, 20756, 580, 13, 9651, 1583, 29889, 7611, 29889, 21174, 580, 13, 4706, 1583, 29889, 9465, 29889, 28358, 580, 13, 4706, 2428, 2141, 371, 279, 6767, 580, 13, 13, 1678, 822, 4480, 29918, 1454, 29918, 2271, 29898, 1311, 29892, 7429, 29918, 2271, 1125, 13, 4706, 9995, 15716, 2745, 3988, 338, 421, 2783, 2859, 29918, 2271, 29952, 1213, 15945, 13, 4706, 1583, 29889, 10685, 29889, 29305, 29898, 13, 9651, 14013, 7156, 29901, 7156, 29889, 3784, 29918, 2271, 1275, 7429, 29918, 2271, 29892, 13, 9651, 285, 29908, 4219, 426, 1311, 29889, 9465, 29889, 3784, 29918, 2271, 29913, 1838, 29915, 29873, 1993, 3806, 3988, 426, 2783, 2859, 29918, 2271, 17671, 13, 4706, 1723, 13, 13, 1678, 822, 3142, 29898, 1311, 29892, 1776, 29892, 3579, 19290, 29897, 1599, 851, 29901, 13, 4706, 9995, 24244, 421, 1493, 29952, 411, 421, 1068, 19290, 29952, 964, 2989, 3988, 773, 5735, 29918, 2974, 29918, 2271, 15945, 29908, 13, 4706, 736, 1583, 29889, 9258, 29918, 2974, 29918, 2271, 718, 11837, 29898, 1493, 29892, 9049, 5085, 29922, 19290, 29897, 13, 13, 1678, 822, 565, 29918, 1792, 29918, 2271, 29898, 1311, 29892, 1776, 29897, 1599, 851, 29901, 13, 4706, 9995, 17642, 408, 1583, 29889, 2271, 580, 541, 1510, 3988, 297, 6473, 15945, 29908, 13, 4706, 736, 285, 29908, 29912, 1311, 29889, 9258, 29918, 2974, 29918, 2271, 6822, 361, 29914, 1792, 8484, 29912, 1493, 5038, 13, 13, 1678, 822, 679, 29918, 17505, 29918, 4632, 29898, 1311, 29892, 11764, 29901, 851, 29892, 5639, 29901, 28379, 29961, 3609, 2642, 29962, 353, 6213, 29897, 1599, 2563, 2642, 29901, 13, 4706, 9995, 2577, 15504, 3876, 1543, 29915, 29879, 6426, 15504, 10303, 15945, 29908, 13, 4706, 565, 451, 5639, 29901, 13, 9651, 5639, 353, 1583, 29889, 9465, 13, 4706, 15504, 29918, 4632, 353, 5639, 29889, 2886, 29918, 5029, 29898, 2059, 29889, 19407, 29918, 6404, 1955, 29892, 11764, 29897, 13, 4706, 1543, 353, 1583, 29889, 9465, 29889, 7978, 29918, 2154, 703, 2457, 6273, 29961, 29900, 1822, 17505, 10303, 613, 15504, 29918, 4632, 29897, 13, 4706, 736, 1543, 13, 13, 1678, 822, 6464, 29898, 1311, 1125, 13, 4706, 9995, 6132, 4152, 6464, 4972, 322, 1423, 1404, 12335, 15945, 29908, 13, 4706, 4972, 29918, 4258, 3406, 353, 1583, 29889, 657, 29918, 17505, 29918, 4632, 703, 557, 29899, 1731, 29899, 4258, 3406, 1159, 13, 4706, 29769, 29918, 19190, 353, 1583, 29889, 657, 29918, 17505, 29918, 4632, 703, 557, 29899, 19190, 29899, 1693, 2450, 613, 4972, 29918, 4258, 3406, 29897, 13, 13, 4706, 29769, 29918, 19190, 29889, 2886, 29918, 5029, 29898, 2059, 29889, 19407, 29918, 6404, 1955, 29892, 376, 2080, 29961, 978, 29922, 5416, 3073, 29962, 2564, 3808, 580, 13, 4706, 29769, 29918, 19190, 29889, 2886, 29918, 5029, 29898, 2059, 29889, 19407, 29918, 6404, 1955, 29892, 376, 2080, 29961, 978, 29922, 5416, 3073, 29962, 2564, 6717, 29918, 8149, 29898, 13, 9651, 1583, 29889, 1792, 29889, 6786, 13, 4706, 1723, 13, 4706, 29769, 29918, 19190, 29889, 2886, 29918, 5029, 29898, 2059, 29889, 19407, 29918, 6404, 1955, 29892, 376, 2080, 29961, 978, 29922, 5416, 3073, 29962, 2564, 6717, 29918, 8149, 29898, 13, 9651, 4813, 952, 29889, 3919, 1001, 13, 4706, 1723, 13, 13, 4706, 4972, 29918, 4258, 3406, 353, 1583, 29889, 657, 29918, 17505, 29918, 4632, 703, 557, 29899, 1731, 29899, 4258, 3406, 1159, 13, 4706, 4800, 29918, 19190, 353, 1583, 29889, 657, 29918, 17505, 29918, 4632, 703, 557, 29899, 19190, 29899, 5630, 613, 4972, 29918, 4258, 3406, 29897, 13, 4706, 4800, 29918, 19190, 29889, 2886, 29918, 5029, 29898, 2059, 29889, 19407, 29918, 6404, 1955, 29892, 376, 2080, 29961, 978, 29922, 5630, 29962, 2564, 6717, 29918, 8149, 29898, 13, 9651, 1583, 29889, 1792, 29889, 6786, 13, 4706, 1723, 13, 4706, 4800, 29918, 19190, 29889, 2886, 29918, 5029, 29898, 2059, 29889, 19407, 29918, 6404, 1955, 29892, 376, 2080, 29961, 978, 29922, 5630, 29962, 2564, 6717, 29918, 8149, 29898, 15506, 29889, 3919, 1001, 29897, 13, 4706, 8709, 29898, 29896, 29897, 13, 13, 1678, 822, 4974, 29918, 1792, 29898, 1311, 29892, 3806, 29918, 1792, 29901, 4911, 1125, 13, 4706, 9995, 5596, 4160, 29914, 1004, 3450, 322, 4974, 372, 7087, 3806, 29918, 1792, 15945, 29908, 13, 4706, 1583, 29889, 9465, 29889, 657, 29898, 1311, 29889, 2271, 703, 5150, 296, 638, 29918, 2754, 29901, 1792, 29899, 1004, 1159, 718, 376, 29973, 4830, 29922, 3126, 1159, 13, 4706, 1404, 29918, 3126, 353, 1583, 29889, 9465, 29889, 2886, 29918, 5029, 29898, 2059, 29889, 19407, 29918, 6404, 1955, 29892, 376, 1457, 2564, 726, 13, 4706, 1404, 353, 4911, 17679, 29898, 1272, 29922, 3126, 29889, 18132, 29898, 1792, 29918, 3126, 29897, 3366, 1792, 20068, 13, 4706, 1404, 29889, 275, 29918, 3084, 580, 13, 4706, 1583, 29889, 9294, 9843, 29898, 1792, 3366, 6786, 16862, 1767, 29892, 3806, 29918, 1792, 29889, 6786, 29897, 13, 4706, 1583, 29889, 9294, 9843, 29898, 1792, 3366, 978, 16862, 1767, 29892, 3806, 29918, 1792, 29889, 978, 29897, 13, 4706, 1583, 29889, 9294, 9843, 29898, 1792, 3366, 5269, 16862, 1767, 29892, 3806, 29918, 1792, 29889, 5269, 29897, 13, 13, 13, 29992, 29880, 582, 29918, 8173, 13, 1753, 679, 29918, 12657, 7295, 13, 1678, 9995, 1349, 262, 14476, 304, 425, 29920, 2354, 679, 263, 341, 16783, 4309, 1664, 29892, 871, 746, 372, 29915, 29879, 4312, 13, 1678, 322, 871, 2748, 15945, 29908, 13, 1678, 736, 341, 16783, 10036, 29898, 9965, 29897, 13, 13, 13, 1753, 3394, 29918, 29885, 16783, 29898, 932, 29918, 978, 29901, 851, 29892, 20332, 29918, 978, 29901, 851, 1125, 13, 1678, 9995, 1123, 29899, 7302, 9725, 800, 393, 1653, 3618, 773, 7525, 11980, 1434, 1243, 4251, 15945, 29908, 13, 13, 1678, 822, 14476, 29918, 449, 357, 29898, 9891, 29901, 8251, 519, 1125, 13, 4706, 9995, 8015, 719, 1243, 2999, 3064, 15945, 29908, 13, 13, 4706, 732, 29893, 336, 567, 29898, 9891, 29897, 13, 4706, 822, 14476, 29898, 1311, 29901, 4103, 2467, 3057, 8259, 29892, 334, 5085, 29892, 3579, 19290, 1125, 13, 9651, 20332, 353, 679, 29918, 12657, 2141, 657, 29918, 29885, 16783, 29898, 932, 29918, 978, 29892, 20332, 29918, 978, 29897, 13, 9651, 411, 3957, 29889, 11010, 29918, 15204, 580, 408, 10938, 29918, 15204, 29901, 13, 18884, 363, 5858, 297, 20332, 29889, 3372, 800, 29901, 13, 462, 1678, 565, 451, 338, 8758, 29898, 16453, 29892, 7525, 11980, 1125, 13, 462, 4706, 6773, 13, 462, 1678, 5858, 29889, 401, 29898, 13371, 29892, 10938, 29918, 15204, 29897, 13, 9651, 736, 3653, 29898, 1311, 29892, 334, 5085, 29892, 3579, 19290, 29897, 13, 13, 4706, 736, 14476, 13, 13, 1678, 736, 14476, 29918, 449, 357, 13, 13, 13, 1753, 1203, 29918, 12847, 29898, 9891, 29901, 8251, 519, 1125, 13, 1678, 9995, 6558, 1203, 12847, 1434, 263, 1243, 740, 15945, 29908, 13, 13, 1678, 732, 29893, 336, 567, 29898, 9891, 29897, 13, 1678, 822, 14476, 10456, 5085, 29892, 3579, 19290, 1125, 13, 4706, 9995, 6558, 1203, 12847, 1434, 263, 1243, 740, 15945, 29908, 13, 4706, 4669, 3260, 2141, 3389, 580, 13, 4706, 736, 3653, 10456, 5085, 29892, 3579, 19290, 29897, 13, 13, 1678, 736, 14476, 13, 13, 13, 1753, 337, 2202, 29898, 3317, 29918, 2267, 2658, 29922, 1525, 29911, 3960, 2890, 29892, 15283, 29922, 8516, 1125, 13, 1678, 9995, 8015, 719, 1243, 2999, 3064, 29889, 13109, 304, 4380, 292, 317, 13462, 5974, 449, 8960, 15945, 29908, 13, 13, 1678, 565, 451, 15283, 29901, 13, 4706, 15283, 353, 518, 3609, 12376, 2451, 29892, 5974, 449, 2451, 29892, 1939, 29903, 987, 2642, 2451, 29962, 13, 13, 1678, 17927, 353, 679, 29918, 21707, 580, 13, 13, 1678, 822, 337, 2202, 29918, 19304, 29898, 9891, 29901, 8251, 519, 1125, 13, 4706, 9995, 8015, 719, 1243, 2999, 3064, 15945, 29908, 13, 4706, 2302, 353, 29871, 29896, 13, 13, 4706, 732, 29893, 336, 567, 29898, 9891, 29897, 13, 4706, 822, 14476, 29898, 1311, 29901, 4103, 2467, 3057, 8259, 29892, 334, 5085, 29892, 3579, 19290, 1125, 13, 9651, 9995, 6558, 1243, 1449, 565, 591, 29915, 276, 2400, 4236, 29918, 2267, 2722, 29892, 3704, 734, 279, 6767, 322, 13, 9651, 731, 3373, 29889, 13466, 12020, 278, 1059, 15945, 29908, 13, 9651, 1661, 2997, 2302, 13, 9651, 1018, 29901, 13, 18884, 736, 3653, 29898, 1311, 29892, 334, 5085, 29892, 3579, 19290, 29897, 13, 9651, 396, 282, 2904, 524, 29901, 11262, 29922, 12510, 292, 29899, 5464, 29899, 11739, 13, 9651, 5174, 18761, 29898, 11739, 29879, 29897, 408, 5566, 29901, 13, 18884, 2302, 4619, 29871, 29896, 13, 18884, 565, 2302, 1405, 4236, 29918, 2267, 2658, 29901, 13, 462, 1678, 17927, 29889, 8382, 703, 1252, 3947, 287, 337, 2202, 2302, 613, 5566, 29922, 735, 29883, 29892, 1243, 29922, 1311, 29897, 13, 462, 1678, 396, 282, 2904, 524, 29901, 11262, 29922, 336, 5921, 29899, 5464, 29899, 11739, 13, 462, 1678, 12020, 5566, 13, 18884, 17927, 29889, 8382, 703, 8015, 719, 292, 373, 1059, 613, 5566, 29922, 735, 29883, 29892, 1243, 29922, 1311, 29897, 13, 18884, 1583, 29889, 371, 279, 6767, 580, 13, 18884, 1583, 3032, 2490, 29918, 371, 538, 776, 580, 29871, 396, 694, 25621, 13, 18884, 1583, 29889, 842, 3373, 580, 13, 18884, 736, 14476, 29898, 1311, 29892, 334, 5085, 29892, 3579, 19290, 29897, 13, 13, 4706, 736, 14476, 13, 13, 1678, 736, 337, 2202, 29918, 19304, 13, 2 ]
utils/visualize_tree.py
moyiming1/Retrosynthesis-pathway-ranking
10
10766
<gh_stars>1-10 import os, sys project_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.append(project_path) import pickle def construct_tree_for_visual(tree, node_info_key, depth=0): tree_for_visual = {'smiles': 'http://askcos.mit.edu/draw/smiles/' + str(tree['smiles']).replace('#', '%23'), 'depth': depth, 'children': []} if node_info_key in tree.keys(): if type(tree[node_info_key]) is not str: tree_for_visual['score'] = '{:.3f}'.format(tree[node_info_key]) else: tree_for_visual['score'] = tree[node_info_key] else: tree_for_visual['score'] = '' if tree['child']: # tree_for_visual['children'] = [] for child in tree['child']: tree_for_visual['children'].append(construct_tree_for_visual(child, node_info_key, depth+1)) return tree_for_visual def construct_tree_for_d3_visualization(tree, depth, new_tree={}, max_children=0): # if 'is_chemical' in tree.keys(): new_tree['smiles'] = 'http://askcos.mit.edu/draw/smiles/' + str(tree['smiles']).replace('#', '%23') if 'score' in tree.keys(): new_tree['score'] = str(tree['score']) else: new_tree['score'] = '' # new_tree['smiles'] = str(new_tree['smiles']) new_tree['children'] = [] if tree['child']: # print(len(tree['child'])) if max_children < len(tree['child']): max_children = len(tree['child']) for child in tree['child']: new_tree['children'].append({}) _, max_children = construct_tree_for_d3_visualization(child, depth + 1, new_tree['children'][-1], max_children) return new_tree, max_children def count_tree_depth_children(tree, count): count[tree['depth']] += 1 if tree['children']: for child in tree['children']: count = count_tree_depth_children(child, count) return count def create_tree_html(trees, file_name, tree_info=None, node_info_key='score', width_factor=1, max_depth=10): try: outfile = file_name except Exception as e: print(e) print('Need to specify file name to write results to') trees_for_visualization = {'name': 'dummy_root', 'children': []} max_children = 1 for i, tree in enumerate(trees): output = construct_tree_for_visual(tree, node_info_key) trees_for_visualization['children'].append(output) # print() current_children = max(count_tree_depth_children(output, count=[0]*20)) if current_children > max_children: max_children = current_children if tree_info: # print(tree_info[i]) trees_for_visualization['children'][-1]['_id'] = tree_info[i] else: trees_for_visualization['children'][-1]['_id'] = ('T%d' % i) # print(max_children) max_children = max(max_children, 3) height = 300 * len(trees) * max_children / 3 * width_factor page_width = max_depth * 300 fid_out = open(outfile + '.html', 'w') fid_out.write('<!DOCTYPE html>\n') fid_out.write(' <head>\n') fid_out.write(' <meta charset="utf-8">\n') fid_out.write(' <title>{}</title>\n'.format(outfile)) fid_out.write(' <style>\n') fid_out.write(' .node circle {\n') fid_out.write(' fill: #fff;\n') fid_out.write(' stroke: steelblue;\n') fid_out.write(' stroke-width: 3px;\n') fid_out.write(' }\n') fid_out.write(' .node rect {\n') fid_out.write(' fill: #fff;\n') fid_out.write(' stroke: steelblue;\n') fid_out.write(' stroke_width: 3px;\n') fid_out.write(' }\n') fid_out.write(' .node text { font: 12px sans-serif; }\n') fid_out.write(' .link {\n') fid_out.write(' fill: none;\n') fid_out.write(' stroke: #ccc;\n') fid_out.write(' stroke-width: 2px;\n') fid_out.write(' }\n') fid_out.write(' </style>\n') fid_out.write(' </head>\n') fid_out.write(' <body>\n') fid_out.write('<!-- load the d3.js library --> \n') fid_out.write('<script src="http://d3js.org/d3.v3.min.js"></script>\n') fid_out.write('<script>\n') fid_out.write('var treeData = [\n') fid_out.write('{}\n'.format(trees_for_visualization)) fid_out.write('];\n') fid_out.write('var margin = {top: 20, right: 120, bottom: 20, left: 0},\n') fid_out.write(' width = {} - margin.right - margin.left,\n'.format(page_width)) fid_out.write(' height = {} - margin.top - margin.bottom;\n'.format(height)) fid_out.write('var i = 0;\n') fid_out.write('var tree = d3.layout.tree()\n') fid_out.write(' .size([height, width]);\n') fid_out.write('var diagonal = d3.svg.diagonal()\n') fid_out.write(' .projection(function(d) { return [d.y, d.x]; });\n') fid_out.write('var svg = d3.select("body").append("svg")\n') fid_out.write(' .attr("width", width + margin.right + margin.left)\n') fid_out.write(' .attr("height", height + margin.top + margin.bottom)\n') fid_out.write(' .append("g")\n') fid_out.write(' .attr("transform", \n') fid_out.write(' "translate(" + margin.left + "," + margin.top + ")");\n') fid_out.write('root = treeData[0];\n') fid_out.write('update(root);\n') fid_out.write('function update(source) {\n') fid_out.write(' // Compute the new tree layout.\n') fid_out.write(' var nodes = tree.nodes(root).reverse(),\n') fid_out.write(' links = tree.links(nodes);\n') fid_out.write(' // Normalize for fixed-depth.\n') fid_out.write(' nodes.forEach(function(d) { d.y = d.depth * 250; });\n') fid_out.write(' // Declare the nodes…\n') fid_out.write(' var node = svg.selectAll("g.node")\n') fid_out.write(' .data(nodes, function(d) { return d.id || (d.id = ++i); });\n') fid_out.write(' // Enter the nodes.\n') fid_out.write(' var nodeEnter = node.enter().append("g")\n') fid_out.write(' .attr("class", "node")\n') fid_out.write(' .attr("transform", function(d) { \n') fid_out.write(' return "translate(" + d.y + "," + d.x + ")"; });\n') fid_out.write(' nodeEnter.append("image")\n') fid_out.write(' .attr("xlink:href", function(d) { return d.smiles; })\n') fid_out.write(' .attr("x", "-60px")\n') fid_out.write(' .attr("y", "-60px")\n') fid_out.write(' .attr("width", "120px")\n') fid_out.write(' .attr("height", "120px");\n') fid_out.write(' nodeEnter.append("path")\n') fid_out.write(' .style("stroke", "black")\n') fid_out.write(' .style("fill", function(d) { if (d.freq==1) { return "white"; }\n') fid_out.write(' else if (d.freq==2) { return "yellow";}\n') fid_out.write(' else if (d.freq==3) { return "orange"; }\n') fid_out.write(' else if (d.freq>=4) { return "red"; }\n') fid_out.write(' else {return "white";}\n') fid_out.write(' })\n') fid_out.write(' .attr("d", d3.svg.symbol()\n') fid_out.write(' .size(0)\n') fid_out.write(' .type(function(d) {if\n') fid_out.write(' (d.rc_type == "chemical") {return "circle";} else if\n') fid_out.write(' (d.rc_type == "reaction") {return "cross";}\n') fid_out.write(' }));\n') fid_out.write(' nodeEnter.append("text")\n') fid_out.write(' .attr("x", 0)\n') fid_out.write(' .attr("y", 35)\n') fid_out.write(' .attr("text-anchor", function(d) { \n') fid_out.write(' return d.children || d._children ? "end" : "start"; })\n') fid_out.write(' .text(function(d) { return d.names; })\n') fid_out.write(' .style("fill-opacity", 1);\n') fid_out.write(' nodeEnter.append("text")\n') fid_out.write(' .attr("x", 200)\n') fid_out.write(' .attr("y", 120)\n') fid_out.write(' .attr("text-anchor", function(d) { \n') fid_out.write(' return d.children || d._children ? "end" : "start"; })\n') fid_out.write(' .text(function(d) { return d._id; })\n') fid_out.write(' .style("fill-opacity", 1);\n') fid_out.write(' nodeEnter.append("text")\n') fid_out.write(' .attr("x", 0)\n') fid_out.write(' .attr("y", -30)\n') fid_out.write(' .attr("text-anchor", function(d) { \n') fid_out.write(' return d.children || d._children ? "end" : "start"; })\n') fid_out.write(' .text(function(d) { return d.score; })\n') fid_out.write(' .style("fill-opacity", 1);\n') fid_out.write(' // Declare the links…\n') fid_out.write(' var link = svg.selectAll("path.link")\n') fid_out.write(' .data(links, function(d) { return d.target.id; });\n') fid_out.write(' // Enter the links.\n') fid_out.write(' link.enter().insert("path", "g")\n') fid_out.write(' .attr("class", "link")\n') fid_out.write(' .style("stroke", function(d) { return d.target.level; })\n') fid_out.write(' .attr("d", diagonal);\n') fid_out.write(' // remove the first level, leaving the targets as the first level\n') fid_out.write(' node.each(function(d){\n') fid_out.write(' if (d.name == "dummy_root")\n') fid_out.write(' d3.select(this).remove();});\n') fid_out.write(' link.each(function(d){\n') fid_out.write(' if (d.source.name == "dummy_root") \n') fid_out.write(' d3.select(this).remove();});\n') fid_out.write('}\n') fid_out.write('</script>\n') fid_out.write(' </body>\n') fid_out.write('</html>\n') fid_out.close() if __name__ == "__main__": file_name = project_path + '/data/pathway_train_example.pkl' with open(file_name, 'rb') as f: data = pickle.load(f) trees_to_plot = [d['tree'] for d in data['generated_paths'][0:10]] create_tree_html(trees_to_plot, 'plotted_trees')
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 5215, 2897, 29892, 10876, 13, 13, 4836, 29918, 2084, 353, 2897, 29889, 2084, 29889, 25721, 29898, 359, 29889, 2084, 29889, 25721, 29898, 359, 29889, 2084, 29889, 370, 1028, 493, 22168, 1445, 1649, 4961, 13, 9675, 29889, 2084, 29889, 4397, 29898, 4836, 29918, 2084, 29897, 13, 5215, 5839, 280, 13, 13, 1753, 3386, 29918, 8336, 29918, 1454, 29918, 20119, 29898, 8336, 29892, 2943, 29918, 3888, 29918, 1989, 29892, 10809, 29922, 29900, 1125, 13, 1678, 5447, 29918, 1454, 29918, 20119, 353, 11117, 3844, 5475, 2396, 525, 1124, 597, 1278, 3944, 29889, 2415, 29889, 6085, 29914, 4012, 29914, 3844, 5475, 22208, 718, 851, 29898, 8336, 1839, 3844, 5475, 2033, 467, 6506, 14237, 742, 14210, 29906, 29941, 5477, 13, 462, 539, 525, 19488, 2396, 10809, 29892, 13, 462, 539, 525, 11991, 2396, 5159, 29913, 13, 13, 1678, 565, 2943, 29918, 3888, 29918, 1989, 297, 5447, 29889, 8149, 7295, 13, 4706, 565, 1134, 29898, 8336, 29961, 3177, 29918, 3888, 29918, 1989, 2314, 338, 451, 851, 29901, 13, 9651, 5447, 29918, 1454, 29918, 20119, 1839, 13628, 2033, 353, 22372, 29901, 29889, 29941, 29888, 29913, 4286, 4830, 29898, 8336, 29961, 3177, 29918, 3888, 29918, 1989, 2314, 13, 4706, 1683, 29901, 13, 9651, 5447, 29918, 1454, 29918, 20119, 1839, 13628, 2033, 353, 5447, 29961, 3177, 29918, 3888, 29918, 1989, 29962, 13, 1678, 1683, 29901, 13, 4706, 5447, 29918, 1454, 29918, 20119, 1839, 13628, 2033, 353, 6629, 13, 13, 1678, 565, 5447, 1839, 5145, 2033, 29901, 13, 4706, 396, 5447, 29918, 1454, 29918, 20119, 1839, 11991, 2033, 353, 5159, 13, 4706, 363, 2278, 297, 5447, 1839, 5145, 2033, 29901, 13, 9651, 5447, 29918, 1454, 29918, 20119, 1839, 11991, 13359, 4397, 29898, 11433, 29918, 8336, 29918, 1454, 29918, 20119, 29898, 5145, 29892, 2943, 29918, 3888, 29918, 1989, 29892, 10809, 29974, 29896, 876, 13, 1678, 736, 5447, 29918, 1454, 29918, 20119, 13, 13, 13, 1753, 3386, 29918, 8336, 29918, 1454, 29918, 29881, 29941, 29918, 20119, 2133, 29898, 8336, 29892, 10809, 29892, 716, 29918, 8336, 3790, 1118, 4236, 29918, 11991, 29922, 29900, 1125, 13, 1678, 396, 565, 525, 275, 29918, 14969, 936, 29915, 297, 5447, 29889, 8149, 7295, 13, 13, 1678, 716, 29918, 8336, 1839, 3844, 5475, 2033, 353, 525, 1124, 597, 1278, 3944, 29889, 2415, 29889, 6085, 29914, 4012, 29914, 3844, 5475, 22208, 718, 851, 29898, 8336, 1839, 3844, 5475, 2033, 467, 6506, 14237, 742, 14210, 29906, 29941, 1495, 13, 1678, 565, 525, 13628, 29915, 297, 5447, 29889, 8149, 7295, 13, 4706, 716, 29918, 8336, 1839, 13628, 2033, 353, 851, 29898, 8336, 1839, 13628, 11287, 13, 1678, 1683, 29901, 13, 4706, 716, 29918, 8336, 1839, 13628, 2033, 353, 6629, 13, 1678, 396, 716, 29918, 8336, 1839, 3844, 5475, 2033, 353, 851, 29898, 1482, 29918, 8336, 1839, 3844, 5475, 11287, 13, 13, 1678, 716, 29918, 8336, 1839, 11991, 2033, 353, 5159, 13, 1678, 565, 5447, 1839, 5145, 2033, 29901, 13, 4706, 396, 1596, 29898, 2435, 29898, 8336, 1839, 5145, 25901, 13, 4706, 565, 4236, 29918, 11991, 529, 7431, 29898, 8336, 1839, 5145, 2033, 1125, 13, 9651, 4236, 29918, 11991, 353, 7431, 29898, 8336, 1839, 5145, 11287, 13, 4706, 363, 2278, 297, 5447, 1839, 5145, 2033, 29901, 13, 9651, 716, 29918, 8336, 1839, 11991, 13359, 4397, 3319, 1800, 13, 9651, 17117, 4236, 29918, 11991, 353, 3386, 29918, 8336, 29918, 1454, 29918, 29881, 29941, 29918, 20119, 2133, 29898, 5145, 29892, 10809, 718, 29871, 29896, 29892, 716, 29918, 8336, 1839, 11991, 2033, 14352, 29896, 1402, 4236, 29918, 11991, 29897, 13, 1678, 736, 716, 29918, 8336, 29892, 4236, 29918, 11991, 13, 13, 1753, 2302, 29918, 8336, 29918, 19488, 29918, 11991, 29898, 8336, 29892, 2302, 1125, 13, 1678, 2302, 29961, 8336, 1839, 19488, 2033, 29962, 4619, 29871, 29896, 13, 1678, 565, 5447, 1839, 11991, 2033, 29901, 13, 4706, 363, 2278, 297, 5447, 1839, 11991, 2033, 29901, 13, 9651, 2302, 353, 2302, 29918, 8336, 29918, 19488, 29918, 11991, 29898, 5145, 29892, 2302, 29897, 13, 1678, 736, 2302, 13, 13, 1753, 1653, 29918, 8336, 29918, 1420, 29898, 28737, 29892, 934, 29918, 978, 29892, 5447, 29918, 3888, 29922, 8516, 29892, 2943, 29918, 3888, 29918, 1989, 2433, 13628, 742, 13, 462, 268, 2920, 29918, 19790, 29922, 29896, 29892, 4236, 29918, 19488, 29922, 29896, 29900, 1125, 13, 1678, 1018, 29901, 13, 4706, 714, 1445, 353, 934, 29918, 978, 13, 13, 1678, 5174, 8960, 408, 321, 29901, 13, 4706, 1596, 29898, 29872, 29897, 13, 4706, 1596, 877, 8139, 287, 304, 6084, 934, 1024, 304, 2436, 2582, 304, 1495, 13, 13, 1678, 10697, 29918, 1454, 29918, 20119, 2133, 353, 11117, 978, 2396, 525, 29881, 11770, 29918, 4632, 742, 525, 11991, 2396, 5159, 29913, 13, 1678, 4236, 29918, 11991, 353, 29871, 29896, 13, 1678, 363, 474, 29892, 5447, 297, 26985, 29898, 28737, 1125, 13, 4706, 1962, 353, 3386, 29918, 8336, 29918, 1454, 29918, 20119, 29898, 8336, 29892, 2943, 29918, 3888, 29918, 1989, 29897, 13, 4706, 10697, 29918, 1454, 29918, 20119, 2133, 1839, 11991, 13359, 4397, 29898, 4905, 29897, 13, 4706, 396, 1596, 580, 13, 4706, 1857, 29918, 11991, 353, 4236, 29898, 2798, 29918, 8336, 29918, 19488, 29918, 11991, 29898, 4905, 29892, 2302, 11759, 29900, 14178, 29906, 29900, 876, 13, 4706, 565, 1857, 29918, 11991, 1405, 4236, 29918, 11991, 29901, 13, 9651, 4236, 29918, 11991, 353, 1857, 29918, 11991, 13, 4706, 565, 5447, 29918, 3888, 29901, 13, 9651, 396, 1596, 29898, 8336, 29918, 3888, 29961, 29875, 2314, 13, 9651, 10697, 29918, 1454, 29918, 20119, 2133, 1839, 11991, 2033, 14352, 29896, 22322, 29918, 333, 2033, 353, 5447, 29918, 3888, 29961, 29875, 29962, 13, 4706, 1683, 29901, 13, 9651, 10697, 29918, 1454, 29918, 20119, 2133, 1839, 11991, 2033, 14352, 29896, 22322, 29918, 333, 2033, 353, 6702, 29911, 29995, 29881, 29915, 1273, 474, 29897, 13, 1678, 396, 1596, 29898, 3317, 29918, 11991, 29897, 13, 1678, 4236, 29918, 11991, 353, 4236, 29898, 3317, 29918, 11991, 29892, 29871, 29941, 29897, 13, 1678, 3171, 353, 29871, 29941, 29900, 29900, 334, 7431, 29898, 28737, 29897, 334, 4236, 29918, 11991, 847, 29871, 29941, 334, 2920, 29918, 19790, 13, 1678, 1813, 29918, 2103, 353, 4236, 29918, 19488, 334, 29871, 29941, 29900, 29900, 13, 13, 1678, 25947, 29918, 449, 353, 1722, 29898, 449, 1445, 718, 15300, 1420, 742, 525, 29893, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 29966, 29991, 21300, 3472, 14247, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 29871, 529, 2813, 14247, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 1678, 529, 7299, 17425, 543, 9420, 29899, 29947, 1013, 29905, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 1678, 529, 3257, 29958, 8875, 829, 3257, 14247, 29876, 4286, 4830, 29898, 449, 1445, 876, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 1678, 529, 3293, 14247, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 869, 3177, 8607, 2802, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 259, 5445, 29901, 396, 18725, 10436, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 259, 19782, 29901, 22973, 9539, 10436, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 259, 19782, 29899, 2103, 29901, 29871, 29941, 1756, 10436, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 17704, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 869, 3177, 7705, 2802, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 268, 5445, 29901, 396, 18725, 10436, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 268, 19782, 29901, 22973, 9539, 10436, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 268, 19782, 29918, 2103, 29901, 29871, 29941, 1756, 10436, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 17704, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 869, 3177, 1426, 426, 4079, 29901, 29871, 29896, 29906, 1756, 7209, 29899, 643, 361, 29936, 17704, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 869, 2324, 2802, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 259, 5445, 29901, 5642, 10436, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 259, 19782, 29901, 396, 26854, 10436, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 259, 19782, 29899, 2103, 29901, 29871, 29906, 1756, 10436, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 17704, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 1678, 1533, 3293, 14247, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 29871, 1533, 2813, 14247, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 29871, 529, 2587, 14247, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 14136, 2254, 278, 270, 29941, 29889, 1315, 3489, 6660, 29871, 320, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 29966, 2154, 4765, 543, 1124, 597, 29881, 29941, 1315, 29889, 990, 29914, 29881, 29941, 29889, 29894, 29941, 29889, 1195, 29889, 1315, 5319, 2154, 14247, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 29966, 2154, 14247, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 1707, 5447, 1469, 353, 12452, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 29912, 1012, 29876, 4286, 4830, 29898, 28737, 29918, 1454, 29918, 20119, 2133, 876, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 1385, 29905, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 1707, 5906, 353, 426, 3332, 29901, 29871, 29906, 29900, 29892, 1492, 29901, 29871, 29896, 29906, 29900, 29892, 5970, 29901, 29871, 29906, 29900, 29892, 2175, 29901, 29871, 29900, 7570, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 2920, 353, 6571, 448, 5906, 29889, 1266, 448, 5906, 29889, 1563, 2053, 29876, 4286, 4830, 29898, 3488, 29918, 2103, 876, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 3171, 353, 6571, 448, 5906, 29889, 3332, 448, 5906, 29889, 8968, 10436, 29876, 4286, 4830, 29898, 3545, 876, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 1707, 474, 353, 29871, 29900, 10436, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 1707, 5447, 353, 270, 29941, 29889, 2680, 29889, 8336, 580, 29905, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 869, 2311, 4197, 3545, 29892, 2920, 5691, 29905, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 1707, 19640, 353, 270, 29941, 29889, 15120, 29889, 6051, 351, 7177, 580, 29905, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 869, 771, 6929, 29898, 2220, 29898, 29881, 29897, 426, 736, 518, 29881, 29889, 29891, 29892, 270, 29889, 29916, 1385, 2604, 29905, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 1707, 25773, 353, 270, 29941, 29889, 2622, 703, 2587, 2564, 4397, 703, 15120, 1159, 29905, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 869, 5552, 703, 2103, 613, 2920, 718, 5906, 29889, 1266, 718, 5906, 29889, 1563, 2144, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 869, 5552, 703, 3545, 613, 3171, 718, 5906, 29889, 3332, 718, 5906, 29889, 8968, 2144, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 29871, 869, 4397, 703, 29887, 1159, 29905, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 869, 5552, 703, 9067, 613, 320, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 539, 376, 21652, 703, 718, 5906, 29889, 1563, 718, 28796, 718, 5906, 29889, 3332, 718, 16521, 1496, 29905, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 4632, 353, 5447, 1469, 29961, 29900, 1385, 29905, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 5504, 29898, 4632, 416, 29905, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 2220, 2767, 29898, 4993, 29897, 2802, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 29871, 849, 11796, 29872, 278, 716, 5447, 5912, 7790, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 29871, 722, 7573, 353, 5447, 29889, 18010, 29898, 4632, 467, 24244, 3285, 29905, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 259, 2988, 353, 5447, 29889, 4965, 29898, 18010, 416, 29905, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 29871, 849, 21981, 675, 363, 4343, 29899, 19488, 7790, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 29871, 7573, 29889, 14142, 29898, 2220, 29898, 29881, 29897, 426, 270, 29889, 29891, 353, 270, 29889, 19488, 334, 29871, 29906, 29945, 29900, 29936, 2604, 29905, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 29871, 849, 3826, 8663, 278, 7573, 30098, 29905, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 29871, 722, 2943, 353, 25773, 29889, 2622, 3596, 703, 29887, 29889, 3177, 1159, 29905, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 259, 869, 1272, 29898, 18010, 29892, 740, 29898, 29881, 29897, 426, 736, 270, 29889, 333, 3830, 313, 29881, 29889, 333, 353, 8445, 29875, 416, 2604, 29905, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 29871, 849, 9041, 278, 7573, 7790, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 29871, 722, 2943, 10399, 353, 2943, 29889, 5893, 2141, 4397, 703, 29887, 1159, 29905, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 259, 869, 5552, 703, 1990, 613, 376, 3177, 1159, 29905, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 259, 869, 5552, 703, 9067, 613, 740, 29898, 29881, 29897, 426, 320, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 539, 736, 376, 21652, 703, 718, 270, 29889, 29891, 718, 28796, 718, 270, 29889, 29916, 718, 16521, 1769, 2604, 29905, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 29871, 2943, 10399, 29889, 4397, 703, 3027, 1159, 29905, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 418, 869, 5552, 703, 29916, 2324, 29901, 12653, 613, 740, 29898, 29881, 29897, 426, 736, 270, 29889, 3844, 5475, 29936, 500, 2144, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 418, 869, 5552, 703, 29916, 613, 11663, 29953, 29900, 1756, 1159, 29905, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 418, 869, 5552, 703, 29891, 613, 11663, 29953, 29900, 1756, 1159, 29905, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 418, 869, 5552, 703, 2103, 613, 376, 29896, 29906, 29900, 1756, 1159, 29905, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 418, 869, 5552, 703, 3545, 613, 376, 29896, 29906, 29900, 1756, 1496, 29905, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 29871, 2943, 10399, 29889, 4397, 703, 2084, 1159, 29905, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 539, 869, 3293, 703, 25893, 613, 376, 8517, 1159, 29905, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 539, 869, 3293, 703, 5589, 613, 740, 29898, 29881, 29897, 426, 565, 313, 29881, 29889, 29888, 7971, 1360, 29896, 29897, 426, 736, 376, 10921, 1769, 17704, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 462, 462, 268, 1683, 565, 313, 29881, 29889, 29888, 7971, 1360, 29906, 29897, 426, 736, 376, 29136, 1769, 1012, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 462, 462, 268, 1683, 565, 313, 29881, 29889, 29888, 7971, 1360, 29941, 29897, 426, 736, 376, 272, 927, 1769, 17704, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 462, 462, 268, 1683, 565, 313, 29881, 29889, 29888, 7971, 18572, 29946, 29897, 426, 736, 376, 1127, 1769, 17704, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 462, 462, 268, 1683, 426, 2457, 376, 10921, 1769, 1012, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 462, 462, 268, 500, 2144, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 539, 869, 5552, 703, 29881, 613, 270, 29941, 29889, 15120, 29889, 18098, 580, 29905, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 462, 268, 869, 2311, 29898, 29900, 2144, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 462, 268, 869, 1853, 29898, 2220, 29898, 29881, 29897, 426, 361, 29905, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 462, 308, 313, 29881, 29889, 2214, 29918, 1853, 1275, 376, 14969, 936, 1159, 426, 2457, 376, 16622, 1769, 29913, 1683, 565, 29905, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 462, 308, 313, 29881, 29889, 2214, 29918, 1853, 1275, 376, 276, 2467, 1159, 426, 2457, 376, 19128, 1769, 1012, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 462, 268, 500, 2483, 29905, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 29871, 2943, 10399, 29889, 4397, 703, 726, 1159, 29905, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 259, 869, 5552, 703, 29916, 613, 29871, 29900, 2144, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 259, 869, 5552, 703, 29891, 613, 29871, 29941, 29945, 2144, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 259, 869, 5552, 703, 726, 29899, 25367, 613, 740, 29898, 29881, 29897, 426, 320, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 539, 736, 270, 29889, 11991, 3830, 270, 3032, 11991, 1577, 376, 355, 29908, 584, 376, 2962, 1769, 500, 2144, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 259, 869, 726, 29898, 2220, 29898, 29881, 29897, 426, 736, 270, 29889, 7039, 29936, 500, 2144, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 259, 869, 3293, 703, 5589, 29899, 28193, 613, 29871, 29896, 416, 29905, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 29871, 2943, 10399, 29889, 4397, 703, 726, 1159, 29905, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 259, 869, 5552, 703, 29916, 613, 29871, 29906, 29900, 29900, 2144, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 259, 869, 5552, 703, 29891, 613, 29871, 29896, 29906, 29900, 2144, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 259, 869, 5552, 703, 726, 29899, 25367, 613, 740, 29898, 29881, 29897, 426, 320, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 539, 736, 270, 29889, 11991, 3830, 270, 3032, 11991, 1577, 376, 355, 29908, 584, 376, 2962, 1769, 500, 2144, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 259, 869, 726, 29898, 2220, 29898, 29881, 29897, 426, 736, 270, 3032, 333, 29936, 500, 2144, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 259, 869, 3293, 703, 5589, 29899, 28193, 613, 29871, 29896, 416, 29905, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 29871, 2943, 10399, 29889, 4397, 703, 726, 1159, 29905, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 259, 869, 5552, 703, 29916, 613, 29871, 29900, 2144, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 259, 869, 5552, 703, 29891, 613, 448, 29941, 29900, 2144, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 259, 869, 5552, 703, 726, 29899, 25367, 613, 740, 29898, 29881, 29897, 426, 320, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 539, 736, 270, 29889, 11991, 3830, 270, 3032, 11991, 1577, 376, 355, 29908, 584, 376, 2962, 1769, 500, 2144, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 259, 869, 726, 29898, 2220, 29898, 29881, 29897, 426, 736, 270, 29889, 13628, 29936, 500, 2144, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 259, 869, 3293, 703, 5589, 29899, 28193, 613, 29871, 29896, 416, 29905, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 29871, 849, 3826, 8663, 278, 2988, 30098, 29905, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 29871, 722, 1544, 353, 25773, 29889, 2622, 3596, 703, 2084, 29889, 2324, 1159, 29905, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 259, 869, 1272, 29898, 4965, 29892, 740, 29898, 29881, 29897, 426, 736, 270, 29889, 5182, 29889, 333, 29936, 2604, 29905, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 29871, 849, 9041, 278, 2988, 7790, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 29871, 1544, 29889, 5893, 2141, 7851, 703, 2084, 613, 376, 29887, 1159, 29905, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 259, 869, 5552, 703, 1990, 613, 376, 2324, 1159, 29905, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 259, 869, 3293, 703, 25893, 613, 740, 29898, 29881, 29897, 426, 736, 270, 29889, 5182, 29889, 5563, 29936, 500, 2144, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 259, 869, 5552, 703, 29881, 613, 19640, 416, 29905, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 29871, 849, 3349, 278, 937, 3233, 29892, 10124, 278, 22525, 408, 278, 937, 3233, 29905, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 29871, 2943, 29889, 4204, 29898, 2220, 29898, 29881, 21964, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 565, 313, 29881, 29889, 978, 1275, 376, 29881, 11770, 29918, 4632, 1159, 29905, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 268, 270, 29941, 29889, 2622, 29898, 1366, 467, 5992, 890, 3680, 29905, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 1544, 29889, 4204, 29898, 2220, 29898, 29881, 21964, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 565, 313, 29881, 29889, 4993, 29889, 978, 1275, 376, 29881, 11770, 29918, 4632, 1159, 320, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 268, 270, 29941, 29889, 2622, 29898, 1366, 467, 5992, 890, 3680, 29905, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 1012, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 829, 2154, 14247, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 29871, 1533, 2587, 14247, 29876, 1495, 13, 1678, 25947, 29918, 449, 29889, 3539, 877, 829, 1420, 14247, 29876, 1495, 13, 13, 1678, 25947, 29918, 449, 29889, 5358, 580, 13, 13, 13, 361, 4770, 978, 1649, 1275, 376, 1649, 3396, 1649, 1115, 13, 1678, 934, 29918, 978, 353, 2060, 29918, 2084, 718, 8207, 1272, 29914, 2084, 1582, 29918, 14968, 29918, 4773, 29889, 29886, 6321, 29915, 13, 1678, 411, 1722, 29898, 1445, 29918, 978, 29892, 525, 6050, 1495, 408, 285, 29901, 13, 4706, 848, 353, 5839, 280, 29889, 1359, 29898, 29888, 29897, 13, 1678, 10697, 29918, 517, 29918, 5317, 353, 518, 29881, 1839, 8336, 2033, 363, 270, 297, 848, 1839, 13525, 29918, 24772, 2033, 29961, 29900, 29901, 29896, 29900, 5262, 13, 1678, 1653, 29918, 8336, 29918, 1420, 29898, 28737, 29918, 517, 29918, 5317, 29892, 525, 572, 15048, 29918, 28737, 1495, 13, 2 ]
cgnal/core/data/model/__init__.py
CGnal/cgnal-core
9
108719
""" Data model module. In this module the data types used in CGnal framework are defined. """
[ 1, 9995, 13, 1469, 1904, 3883, 29889, 13, 13, 797, 445, 3883, 278, 848, 4072, 1304, 297, 8446, 20809, 6890, 526, 3342, 29889, 13, 15945, 29908, 13, 2 ]
setup.py
eddo888/perdy
0
11972
#!/usr/bin/env python import codecs from os import path from setuptools import setup pwd = path.abspath(path.dirname(__file__)) with codecs.open(path.join(pwd, 'README.md'), 'r', encoding='utf8') as input: long_description = input.read() version='1.7' setup( name='Perdy', version=version, license='MIT', long_description=long_description, long_description_content_type="text/markdown", url='https://github.com/eddo888/perdy', download_url='https://github.com/eddo888/perdy/archive/%s.tar.gz'%version, author='<NAME>', author_email='<EMAIL>', packages=[ 'Perdy', ], install_requires=[ 'pytz', 'arrow', 'xmltodict', 'PyYAML', 'jsonpath', 'argcomplete', 'Baubles', ], scripts=[ 'bin/parser.py', 'bin/pyson.py', 'bin/colourize.py', ], )
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 13, 5215, 775, 2395, 13, 3166, 2897, 1053, 2224, 13, 3166, 731, 21245, 8789, 1053, 6230, 13, 13, 29886, 9970, 353, 2224, 29889, 370, 1028, 493, 29898, 2084, 29889, 25721, 22168, 1445, 1649, 876, 13, 2541, 775, 2395, 29889, 3150, 29898, 2084, 29889, 7122, 29898, 29886, 9970, 29892, 525, 16310, 2303, 29889, 3487, 5477, 525, 29878, 742, 8025, 2433, 9420, 29947, 1495, 408, 1881, 29901, 13, 1678, 1472, 29918, 8216, 353, 1881, 29889, 949, 580, 13, 13, 3259, 2433, 29896, 29889, 29955, 29915, 13, 12, 13, 14669, 29898, 13, 12, 978, 2433, 29925, 2018, 29891, 742, 13, 12, 3259, 29922, 3259, 29892, 13, 12, 506, 1947, 2433, 26349, 742, 13, 1678, 1472, 29918, 8216, 29922, 5426, 29918, 8216, 29892, 13, 12, 5426, 29918, 8216, 29918, 3051, 29918, 1853, 543, 726, 29914, 3502, 3204, 613, 13, 12, 2271, 2433, 991, 597, 3292, 29889, 510, 29914, 287, 1867, 29947, 29947, 29947, 29914, 546, 4518, 742, 13, 12, 10382, 29918, 2271, 2433, 991, 597, 3292, 29889, 510, 29914, 287, 1867, 29947, 29947, 29947, 29914, 546, 4518, 29914, 10867, 22584, 29879, 29889, 12637, 29889, 18828, 29915, 29995, 3259, 29892, 13, 12, 8921, 2433, 29966, 5813, 29958, 742, 13, 12, 8921, 29918, 5269, 2433, 29966, 26862, 6227, 29958, 742, 13, 12, 8318, 11759, 13, 12, 12, 29915, 29925, 2018, 29891, 742, 13, 12, 1402, 13, 12, 6252, 29918, 276, 339, 2658, 11759, 13, 12, 12, 29915, 2272, 17559, 742, 13, 12, 12, 29915, 2936, 742, 13, 12, 12, 29915, 3134, 20034, 919, 742, 13, 12, 12, 29915, 19737, 29979, 23956, 742, 13, 12, 12, 29915, 3126, 2084, 742, 13, 4706, 525, 1191, 8835, 742, 13, 12, 12, 29915, 29933, 29874, 431, 793, 742, 13, 12, 1402, 13, 12, 16713, 11759, 13, 12, 12, 29915, 2109, 29914, 16680, 29889, 2272, 742, 13, 12, 12, 29915, 2109, 29914, 29886, 952, 265, 29889, 2272, 742, 13, 12, 12, 29915, 2109, 29914, 1054, 15508, 911, 29889, 2272, 742, 13, 12, 1402, 13, 29897, 13, 13, 2 ]
aslam_offline_calibration/kalibr/python/kalibr_imu_camera_calibration/IccSensors.py
xxiao-1/timeShift
0
65194
<reponame>xxiao-1/timeShift import sm import aslam_cv as acv import aslam_cameras_april as acv_april import aslam_splines as asp import aslam_backend as aopt import bsplines import kalibr_common as kc import kalibr_errorterms as ket import IccCalibrator as ic import cv2 import sys import math import numpy as np import pylab as pl import scipy.optimize def initCameraBagDataset(bagfile, topic, from_to=None, perform_synchronization=False): print "Initializing camera rosbag dataset reader:" print "\tDataset: {0}".format(bagfile) print "\tTopic: {0}".format(topic) reader = kc.BagImageDatasetReader(bagfile, topic, bag_from_to=from_to, \ perform_synchronization=perform_synchronization) print "\tNumber of images: {0}".format(len(reader.index)) return reader def initImuBagDataset(bagfile, topic, from_to=None, perform_synchronization=False): print "Initializing imu rosbag dataset reader:" print "\tDataset: {0}".format(bagfile) print "\tTopic: {0}".format(topic) reader = kc.BagImuDatasetReader(bagfile, topic, bag_from_to=from_to, \ perform_synchronization=perform_synchronization) print "\tNumber of messages: {0}".format(len(reader.index)) return reader #mono camera class IccCamera(): def __init__(self, camConfig, targetConfig, dataset, reprojectionSigma=1.0, showCorners=True, \ showReproj=True, showOneStep=False): #store the configuration self.dataset = dataset self.camConfig = camConfig self.targetConfig = targetConfig # Corner uncertainty self.cornerUncertainty = reprojectionSigma #set the extrinsic prior to default self.T_extrinsic = sm.Transformation() #initialize timeshift prior to zero self.timeshiftCamToImuPrior = 0.0 #initialize the camera data self.camera = kc.AslamCamera.fromParameters( camConfig ) #extract corners self.setupCalibrationTarget( targetConfig, showExtraction=showCorners, showReproj=showReproj, imageStepping=showOneStep ) multithreading = not (showCorners or showReproj or showOneStep) self.targetObservations = kc.extractCornersFromDataset(self.dataset, self.detector, multithreading=multithreading) #an estimate of the gravity in the world coordinate frame self.gravity_w = np.array([9.80655, 0., 0.]) def setupCalibrationTarget(self, targetConfig, showExtraction=False, showReproj=False, imageStepping=False): #load the calibration target configuration targetParams = targetConfig.getTargetParams() targetType = targetConfig.getTargetType() if targetType == 'checkerboard': options = acv.CheckerboardOptions() options.filterQuads = True options.normalizeImage = True options.useAdaptiveThreshold = True options.performFastCheck = False options.windowWidth = 5 options.showExtractionVideo = showExtraction grid = acv.GridCalibrationTargetCheckerboard(targetParams['targetRows'], targetParams['targetCols'], targetParams['rowSpacingMeters'], targetParams['colSpacingMeters'], options) elif targetType == 'circlegrid': options = acv.CirclegridOptions() options.showExtractionVideo = showExtraction options.useAsymmetricCirclegrid = targetParams['asymmetricGrid'] grid = acv.GridCalibrationTargetCirclegrid(targetParams['targetRows'], targetParams['targetCols'], targetParams['spacingMeters'], options) elif targetType == 'aprilgrid': options = acv_april.AprilgridOptions() options.showExtractionVideo = showExtraction options.minTagsForValidObs = int( np.max( [targetParams['tagRows'], targetParams['tagCols']] ) + 1 ) grid = acv_april.GridCalibrationTargetAprilgrid(targetParams['tagRows'], targetParams['tagCols'], targetParams['tagSize'], targetParams['tagSpacing'], options) else: raise RuntimeError( "Unknown calibration target." ) options = acv.GridDetectorOptions() options.imageStepping = imageStepping options.plotCornerReprojection = showReproj options.filterCornerOutliers = True #options.filterCornerSigmaThreshold = 2.0 #options.filterCornerMinReprojError = 0.2 self.detector = acv.GridDetector(self.camera.geometry, grid, options) def findOrientationPriorCameraToImu(self, imu): print print "Estimating imu-camera rotation prior" # build the problem problem = aopt.OptimizationProblem() # Add the rotation as design variable q_i_c_Dv = aopt.RotationQuaternionDv( self.T_extrinsic.q() ) q_i_c_Dv.setActive( True ) problem.addDesignVariable(q_i_c_Dv) # Add the gyro bias as design variable gyroBiasDv = aopt.EuclideanPointDv( np.zeros(3) ) gyroBiasDv.setActive( True ) problem.addDesignVariable(gyroBiasDv) #initialize a pose spline using the camera poses poseSpline = self.initPoseSplineFromCamera( timeOffsetPadding=0.0 ) for im in imu.imuData: tk = im.stamp.toSec() if tk > poseSpline.t_min() and tk < poseSpline.t_max(): #DV expressions R_i_c = q_i_c_Dv.toExpression() bias = gyroBiasDv.toExpression() #get the vision predicted omega and measured omega (IMU) omega_predicted = R_i_c * aopt.EuclideanExpression( np.matrix( poseSpline.angularVelocityBodyFrame( tk ) ).transpose() ) omega_measured = im.omega #error term gerr = ket.GyroscopeError(omega_measured, im.omegaInvR, omega_predicted, bias) problem.addErrorTerm(gerr) if problem.numErrorTerms() == 0: sm.logFatal("Failed to obtain orientation prior. "\ "Please make sure that your sensors are synchronized correctly.") sys.exit(-1) #define the optimization options = aopt.Optimizer2Options() options.verbose = False options.linearSolver = aopt.BlockCholeskyLinearSystemSolver() options.nThreads = 2 options.convergenceDeltaX = 1e-4 options.convergenceDeltaJ = 1 options.maxIterations = 50 #run the optimization optimizer = aopt.Optimizer2(options) optimizer.setProblem(problem) #get the prior try: optimizer.optimize() except: sm.logFatal("Failed to obtain orientation prior!") sys.exit(-1) #overwrite the external rotation prior (keep the external translation prior) R_i_c = q_i_c_Dv.toRotationMatrix().transpose() self.T_extrinsic = sm.Transformation( sm.rt2Transform( R_i_c, self.T_extrinsic.t() ) ) #estimate gravity in the world coordinate frame as the mean specific force a_w = [] for im in imu.imuData: tk = im.stamp.toSec() if tk > poseSpline.t_min() and tk < poseSpline.t_max(): a_w.append(np.dot(poseSpline.orientation(tk), np.dot(R_i_c, - im.alpha))) mean_a_w = np.mean(np.asarray(a_w).T, axis=1) self.gravity_w = mean_a_w / np.linalg.norm(mean_a_w) * 9.80655 print "Gravity was intialized to", self.gravity_w, "[m/s^2]" #set the gyro bias prior (if we have more than 1 cameras use recursive average) b_gyro = bias.toEuclidean() imu.GyroBiasPriorCount += 1 imu.GyroBiasPrior = (imu.GyroBiasPriorCount-1.0)/imu.GyroBiasPriorCount * imu.GyroBiasPrior + 1.0/imu.GyroBiasPriorCount*b_gyro #print result print " Orientation prior camera-imu found as: (T_i_c)" print R_i_c print " Gyro bias prior found as: (b_gyro)" print b_gyro #return an etimate of gravity in the world coordinate frame as perceived by this camera def getEstimatedGravity(self): return self.gravity_w #estimates the timeshift between the camearas and the imu using a crosscorrelation approach # #approach: angular rates are constant on a fixed body independent of location # using only the norm of the gyro outputs and assuming that the biases are small # we can estimate the timeshift between the cameras and the imu by calculating # the angular rates of the cameras by fitting a spline and evaluating the derivatives # then computing the cross correlating between the "predicted" angular rates (camera) # and imu, the maximum corresponds to the timeshift... # in a next step we can use the time shift to estimate the rotation between camera and imu def findTimeshiftCameraImuPrior(self, imu, verbose=False): print "Estimating time shift camera to imu:" #fit a spline to the camera observations poseSpline = self.initPoseSplineFromCamera( timeOffsetPadding=0.0 ) #predict time shift prior t=[] omega_measured_norm = [] omega_predicted_norm = [] for im in imu.imuData: tk = im.stamp.toSec() if tk > poseSpline.t_min() and tk < poseSpline.t_max(): #get imu measurements and spline from camera omega_measured = im.omega omega_predicted = aopt.EuclideanExpression( np.matrix( poseSpline.angularVelocityBodyFrame( tk ) ).transpose() ) #calc norm t = np.hstack( (t, tk) ) omega_measured_norm = np.hstack( (omega_measured_norm, np.linalg.norm( omega_measured ) )) omega_predicted_norm = np.hstack( (omega_predicted_norm, np.linalg.norm( omega_predicted.toEuclidean() )) ) if len(omega_predicted_norm) == 0 or len(omega_measured_norm) == 0: sm.logFatal("The time ranges of the camera and IMU do not overlap. "\ "Please make sure that your sensors are synchronized correctly.") sys.exit(-1) #get the time shift corr = np.correlate(omega_predicted_norm, omega_measured_norm, "full") discrete_shift = corr.argmax() - (np.size(omega_measured_norm) - 1) #get cont. time shift times = [im.stamp.toSec() for im in imu.imuData] dT = np.mean(np.diff( times )) shift = -discrete_shift*dT #Create plots if verbose: pl.plot(t, omega_measured_norm, label="measured_raw") pl.plot(t, omega_predicted_norm, label="predicted") pl.plot(t-shift, omega_measured_norm, label="measured_corrected") pl.legend() pl.title("Time shift prior camera-imu estimation") pl.figure() pl.plot(corr) pl.title("Cross-correlation ||omega_predicted||, ||omega_measured||") pl.show() sm.logDebug("discrete time shift: {0}".format(discrete_shift)) sm.logDebug("cont. time shift: {0}".format(shift)) sm.logDebug("dT: {0}".format(dT)) #store the timeshift (t_imu = t_cam + timeshiftCamToImuPrior) self.timeshiftCamToImuPrior = shift print " Time shift camera to imu (t_imu = t_cam + shift):" print self.timeshiftCamToImuPrior #initialize a pose spline using camera poses (pose spline = T_wb) def initPoseSplineFromCamera(self, splineOrder=6, poseKnotsPerSecond=100, timeOffsetPadding=0.02): T_c_b = self.T_extrinsic.T() pose = bsplines.BSplinePose(splineOrder, sm.RotationVector() ) # Get the checkerboard times. times = np.array([obs.time().toSec()+self.timeshiftCamToImuPrior for obs in self.targetObservations ]) curve = np.matrix([ pose.transformationToCurveValue( np.dot(obs.T_t_c().T(), T_c_b) ) for obs in self.targetObservations]).T if np.isnan(curve).any(): raise RuntimeError("Nans in curve values") sys.exit(0) # Add 2 seconds on either end to allow the spline to slide during optimization times = np.hstack((times[0] - (timeOffsetPadding * 2.0), times, times[-1] + (timeOffsetPadding * 2.0))) curve = np.hstack((curve[:,0], curve, curve[:,-1])) # Make sure the rotation vector doesn't flip for i in range(1,curve.shape[1]): previousRotationVector = curve[3:6,i-1] r = curve[3:6,i] angle = np.linalg.norm(r) axis = r/angle best_r = r best_dist = np.linalg.norm( best_r - previousRotationVector) for s in range(-3,4): aa = axis * (angle + math.pi * 2.0 * s) dist = np.linalg.norm( aa - previousRotationVector ) if dist < best_dist: best_r = aa best_dist = dist curve[3:6,i] = best_r seconds = times[-1] - times[0] knots = int(round(seconds * poseKnotsPerSecond)) print print "Initializing a pose spline with %d knots (%f knots per second over %f seconds)" % ( knots, poseKnotsPerSecond, seconds) pose.initPoseSplineSparse(times, curve, knots, 1e-4) return pose def addDesignVariables(self, problem, noExtrinsics=True, noTimeCalibration=True, baselinedv_group_id=ic.HELPER_GROUP_ID): # Add the calibration design variables. active = not noExtrinsics self.T_c_b_Dv = aopt.TransformationDv(self.T_extrinsic, rotationActive=active, translationActive=active) for i in range(0, self.T_c_b_Dv.numDesignVariables()): problem.addDesignVariable(self.T_c_b_Dv.getDesignVariable(i), baselinedv_group_id) # Add the time delay design variable. self.cameraTimeToImuTimeDv = aopt.Scalar(0.0) self.cameraTimeToImuTimeDv.setActive( not noTimeCalibration ) problem.addDesignVariable(self.cameraTimeToImuTimeDv, ic.CALIBRATION_GROUP_ID) def addCameraErrorTerms(self, problem, poseSplineDv, T_cN_b, blakeZissermanDf=0.0, timeOffsetPadding=0.0): print print "Adding camera error terms ({0})".format(self.dataset.topic) #progress bar iProgress = sm.Progress2( len(self.targetObservations) ) iProgress.sample() allReprojectionErrors = list() error_t = self.camera.reprojectionErrorType for obs in self.targetObservations: # Build a transformation expression for the time. frameTime = self.cameraTimeToImuTimeDv.toExpression() + obs.time().toSec() + self.timeshiftCamToImuPrior frameTimeScalar = frameTime.toScalar() #as we are applying an initial time shift outside the optimization so #we need to make sure that we dont add data outside the spline definition if frameTimeScalar <= poseSplineDv.spline().t_min() or frameTimeScalar >= poseSplineDv.spline().t_max(): continue T_w_b = poseSplineDv.transformationAtTime(frameTime, timeOffsetPadding, timeOffsetPadding) T_b_w = T_w_b.inverse() #calibration target coords to camera N coords #T_b_w: from world to imu coords #T_cN_b: from imu to camera N coords T_c_w = T_cN_b * T_b_w #get the image and target points corresponding to the frame imageCornerPoints = np.array( obs.getCornersImageFrame() ).T targetCornerPoints = np.array( obs.getCornersTargetFrame() ).T #setup an aslam frame (handles the distortion) frame = self.camera.frameType() frame.setGeometry(self.camera.geometry) #corner uncertainty R = np.eye(2) * self.cornerUncertainty * self.cornerUncertainty invR = np.linalg.inv(R) for pidx in range(0,imageCornerPoints.shape[1]): #add all image points k = self.camera.keypointType() k.setMeasurement( imageCornerPoints[:,pidx] ) k.setInverseMeasurementCovariance(invR) frame.addKeypoint(k) reprojectionErrors=list() for pidx in range(0,imageCornerPoints.shape[1]): #add all target points targetPoint = np.insert( targetCornerPoints.transpose()[pidx], 3, 1) p = T_c_w * aopt.HomogeneousExpression( targetPoint ) #build and append the error term rerr = error_t(frame, pidx, p) #add blake-zisserman m-estimator if blakeZissermanDf>0.0: mest = aopt.BlakeZissermanMEstimator( blakeZissermanDf ) rerr.setMEstimatorPolicy(mest) problem.addErrorTerm(rerr) reprojectionErrors.append(rerr) allReprojectionErrors.append(reprojectionErrors) #update progress bar iProgress.sample() print "\r Added {0} camera error terms ".format( len(self.targetObservations) ) self.allReprojectionErrors = allReprojectionErrors #pair of cameras with overlapping field of view (perfectly synced cams required!!) # # Sensor "chain" R_C1C0 source: *fixed as input from stereo calib # *optimized using stereo error terms # R_C1C0(R,t) C1 R_C2C1(R,t) C2 Cn # C0 o------------------o------------------o ... o # | # | R_C0I (R,t) # | # o (IMU) # #imu is need to initialize an orientation prior between imu and camera chain class IccCameraChain(): def __init__(self, chainConfig, targetConfig, parsed): #create all camera in the chain self.camList = [] for camNr in range(0, chainConfig.numCameras()): camConfig = chainConfig.getCameraParameters(camNr) dataset = initCameraBagDataset(parsed.bagfile[0], camConfig.getRosTopic(), \ parsed.bag_from_to, parsed.perform_synchronization) #create the camera self.camList.append( IccCamera( camConfig, targetConfig, dataset, #Ultimately, this should come from the camera yaml. reprojectionSigma=parsed.reprojection_sigma, showCorners=parsed.showextraction, showReproj=parsed.showextraction, showOneStep=parsed.extractionstepping) ) self.chainConfig = chainConfig #find and store time between first and last image over all cameras self.findCameraTimespan() #use stereo calibration guess if no baselines are provided self.initializeBaselines() def initializeBaselines(self): #estimate baseline prior if no external guess is provided for camNr in range(1, len(self.camList)): self.camList[camNr].T_extrinsic = self.chainConfig.getExtrinsicsLastCamToHere(camNr) print "Baseline between cam{0} and cam{1} set to:".format(camNr-1,camNr) print "T= ", self.camList[camNr].T_extrinsic.T() print "Baseline: ", np.linalg.norm(self.camList[camNr].T_extrinsic.t()), " [m]" #initialize a pose spline for the chain def initializePoseSplineFromCameraChain(self, splineOrder=6, poseKnotsPerSecond=100, timeOffsetPadding=0.02): #use the main camera for the spline to initialize the poses return self.camList[0].initPoseSplineFromCamera(splineOrder, poseKnotsPerSecond, timeOffsetPadding) #find the timestamp for the first and last image considering all cameras in the chain def findCameraTimespan(self): tStart = acv.Time( 0.0 ) tEnd = acv.Time( 0.0 ) for cam in self.camList: if len(cam.targetObservations)>0: tStartCam = cam.targetObservations[0].time() tEndCam = cam.targetObservations[-1].time() if tStart.toSec() > tStartCam.toSec(): tStart = tStartCam if tEndCam.toSec() > tEnd.toSec(): tEnd = tEndCam self.timeStart = tStart self.timeStart = tEnd #find/set orientation prior between first camera in chain and main IMU (imu0) def findOrientationPriorCameraChainToImu(self, imu): self.camList[0].findOrientationPriorCameraToImu( imu ) #get an initial estimate of gravity in the world coordinate frame def getEstimatedGravity(self): return self.camList[0].getEstimatedGravity() #return the baseline transformation from camA to camB def getResultBaseline(self, fromCamANr, toCamBNr): #transformation from cam a to b is always stored in the higer ID cam idx = np.max([fromCamANr, toCamBNr]) #get the transform from camNrmin to camNrmax T_cB_cA = sm.Transformation( self.camList[idx].T_c_b_Dv.T() ) #get the transformation direction right if fromCamANr > toCamBNr: T_cB_cA = T_cB_cA.inverse() #calculate the metric baseline baseline = np.linalg.norm( T_cB_cA.t() ) return T_cB_cA, baseline def getResultTrafoImuToCam(self, camNr): #trafo from imu to cam0 in the chain T_c0_i = sm.Transformation( self.camList[0].T_c_b_Dv.T() ) #add all the baselines along the chain up to our camera N T_cN_imu = T_c0_i #now add all baselines starting from the second camera up to the desired one for cam in self.camList[1:camNr+1]: T_cNplus1_cN = sm.Transformation( cam.T_c_b_Dv.T() ) T_cN_imu = T_cNplus1_cN*T_cN_imu return T_cN_imu def getResultTimeShift(self, camNr): return self.camList[camNr].cameraTimeToImuTimeDv.toScalar() + self.camList[camNr].timeshiftCamToImuPrior def addDesignVariables(self, problem, noTimeCalibration = True, noChainExtrinsics = True): #add the design variables (T(R,t) & time) for all induvidual cameras for camNr, cam in enumerate( self.camList ): #the first "baseline" dv is between the imu and cam0 if camNr == 0: noExtrinsics = False baselinedv_group_id = ic.CALIBRATION_GROUP_ID else: noExtrinsics = noChainExtrinsics baselinedv_group_id = ic.HELPER_GROUP_ID cam.addDesignVariables(problem, noExtrinsics, noTimeCalibration, baselinedv_group_id=baselinedv_group_id) #add the reprojection error terms for all cameras in the chain def addCameraChainErrorTerms(self, problem, poseSplineDv, blakeZissermanDf=-1, timeOffsetPadding=0.0): #add the induviduak error terms for all cameras for camNr, cam in enumerate(self.camList): #add error terms for the first chain element if camNr == 0: #initialize the chain with first camerea ( imu to cam0) T_chain = cam.T_c_b_Dv.toExpression() else: T_chain = cam.T_c_b_Dv.toExpression() * T_chain #from imu coords to camerea N coords (as DVs) T_cN_b = T_chain #add the error terms cam.addCameraErrorTerms( problem, poseSplineDv, T_cN_b, blakeZissermanDf, timeOffsetPadding ) #IMU class IccImu(object): class ImuParameters(kc.ImuParameters): def __init__(self, imuConfig): kc.ImuParameters.__init__(self, '', True) self.data = imuConfig.data self.data["model"] = "calibrated" def setImuPose(self, T_i_b): self.data["T_i_b"] = T_i_b.tolist() def setTimeOffset(self, time_offset): self.data["time_offset"] = time_offset def formatIndented(self, indent, np_array): return indent + str(np.array_str(np_array)).replace('\n',"\n"+indent) def printDetails(self, dest=sys.stdout): print >> dest, " Model: {0}".format(self.data["model"]) kc.ImuParameters.printDetails(self, dest) print >> dest, " T_i_b" print >> dest, self.formatIndented(" ", np.array(self.data["T_i_b"])) print >> dest, " time offset with respect to IMU0: {0} [s]".format(self.data["time_offset"]) def getImuConfig(self): self.updateImuConfig() return self.imuConfig def updateImuConfig(self): self.imuConfig.setImuPose(sm.Transformation(sm.r2quat(self.q_i_b_Dv.toRotationMatrix()), \ self.r_b_Dv.toEuclidean()).T()) self.imuConfig.setTimeOffset(self.timeOffset) def __init__(self, imuConfig, parsed, isReferenceImu=True, estimateTimedelay=True): #determine whether IMU coincides with body frame (for multi-IMU setups) self.isReferenceImu = isReferenceImu self.estimateTimedelay = estimateTimedelay #store input self.imuConfig = self.ImuParameters(imuConfig) #load dataset self.dataset = initImuBagDataset(parsed.bagfile[0], imuConfig.getRosTopic(), \ parsed.bag_from_to, parsed.perform_synchronization) #statistics self.accelUncertaintyDiscrete, self.accelRandomWalk, self.accelUncertainty = self.imuConfig.getAccelerometerStatistics() self.gyroUncertaintyDiscrete, self.gyroRandomWalk, self.gyroUncertainty = self.imuConfig.getGyroStatistics() #init GyroBiasPrior (+ count for recursive averaging if we have more than 1 measurement = >1 cameras) self.GyroBiasPrior = np.array([0,0,0]) self.GyroBiasPriorCount = 0 #load the imu dataset self.loadImuData() #initial estimates for multi IMU calibration self.q_i_b_prior = np.array([0., 0., 0., 1.]) self.timeOffset = 0.0 class ImuMeasurement(object): def __init__(self, stamp, omega, alpha, Rgyro, Raccel): self.omega = omega self.alpha = alpha self.omegaR = Rgyro self.omegaInvR = np.linalg.inv(Rgyro) self.alphaR = Raccel self.alphaInvR = np.linalg.inv(Raccel) self.stamp = stamp def loadImuData(self): print "Reading IMU data ({0})".format(self.dataset.topic) # print(self.dataset) # prepare progess bar iProgress = sm.Progress2( self.dataset.numMessages() ) iProgress.sample() Rgyro = np.eye(3) * self.gyroUncertaintyDiscrete * self.gyroUncertaintyDiscrete Raccel = np.eye(3) * self.accelUncertaintyDiscrete * self.accelUncertaintyDiscrete # Now read the imu measurements. imu = [] for timestamp, omega, alpha in self.dataset: timestamp = acv.Time( timestamp.toSec() ) imu.append( self.ImuMeasurement(timestamp, omega, alpha, Rgyro, Raccel) ) iProgress.sample() self.imuData = imu if len(self.imuData)>1: print "\r Read %d imu readings over %.1f seconds " \ % (len(imu), imu[-1].stamp.toSec() - imu[0].stamp.toSec()) else: sm.logFatal("Could not find any IMU messages. Please check the dataset.") sys.exit(-1) def addDesignVariables(self, problem): #create design variables self.gyroBiasDv = asp.EuclideanBSplineDesignVariable( self.gyroBias ) self.accelBiasDv = asp.EuclideanBSplineDesignVariable( self.accelBias ) ic.addSplineDesignVariables(problem, self.gyroBiasDv, setActive=True, \ group_id=ic.HELPER_GROUP_ID) ic.addSplineDesignVariables(problem, self.accelBiasDv, setActive=True, \ group_id=ic.HELPER_GROUP_ID) self.q_i_b_Dv = aopt.RotationQuaternionDv(self.q_i_b_prior) problem.addDesignVariable(self.q_i_b_Dv, ic.HELPER_GROUP_ID) self.q_i_b_Dv.setActive(False) self.r_b_Dv = aopt.EuclideanPointDv(np.array([0., 0., 0.])) problem.addDesignVariable(self.r_b_Dv, ic.HELPER_GROUP_ID) self.r_b_Dv.setActive(False) if not self.isReferenceImu: self.q_i_b_Dv.setActive(True) self.r_b_Dv.setActive(True) def addAccelerometerErrorTerms(self, problem, poseSplineDv, g_w, mSigma=0.0, \ accelNoiseScale=1.0): print print "Adding accelerometer error terms ({0})".format(self.dataset.topic) #progress bar iProgress = sm.Progress2( len(self.imuData) ) iProgress.sample() # AccelerometerError(measurement, invR, C_b_w, acceleration_w, bias, g_w) weight = 1.0/accelNoiseScale accelErrors = [] num_skipped = 0 if mSigma > 0.0: mest = aopt.HuberMEstimator(mSigma) else: mest = aopt.NoMEstimator() for im in self.imuData: tk = im.stamp.toSec() + self.timeOffset if tk > poseSplineDv.spline().t_min() and tk < poseSplineDv.spline().t_max(): C_b_w = poseSplineDv.orientation(tk).inverse() a_w = poseSplineDv.linearAcceleration(tk) b_i = self.accelBiasDv.toEuclideanExpression(tk,0) w_b = poseSplineDv.angularVelocityBodyFrame(tk) w_dot_b = poseSplineDv.angularAccelerationBodyFrame(tk) C_i_b = self.q_i_b_Dv.toExpression() r_b = self.r_b_Dv.toExpression() a = C_i_b * (C_b_w * (a_w - g_w) + \ w_dot_b.cross(r_b) + w_b.cross(w_b.cross(r_b))) aerr = ket.EuclideanError(im.alpha, im.alphaInvR * weight, a + b_i) aerr.setMEstimatorPolicy(mest) accelErrors.append(aerr) problem.addErrorTerm(aerr) else: num_skipped = num_skipped + 1 #update progress bar iProgress.sample() print "\r Added {0} of {1} accelerometer error terms (skipped {2} out-of-bounds measurements)".format( len(self.imuData)-num_skipped, len(self.imuData), num_skipped ) self.accelErrors = accelErrors def addGyroscopeErrorTerms(self, problem, poseSplineDv, mSigma=0.0, gyroNoiseScale=1.0, \ g_w=None): print print "Adding gyroscope error terms ({0})".format(self.dataset.topic) #progress bar iProgress = sm.Progress2( len(self.imuData) ) iProgress.sample() num_skipped = 0 gyroErrors = [] weight = 1.0/gyroNoiseScale if mSigma > 0.0: mest = aopt.HuberMEstimator(mSigma) else: mest = aopt.NoMEstimator() for im in self.imuData: tk = im.stamp.toSec() + self.timeOffset if tk > poseSplineDv.spline().t_min() and tk < poseSplineDv.spline().t_max(): # GyroscopeError(measurement, invR, angularVelocity, bias) w_b = poseSplineDv.angularVelocityBodyFrame(tk) b_i = self.gyroBiasDv.toEuclideanExpression(tk,0) C_i_b = self.q_i_b_Dv.toExpression() w = C_i_b * w_b gerr = ket.EuclideanError(im.omega, im.omegaInvR * weight, w + b_i) gerr.setMEstimatorPolicy(mest) gyroErrors.append(gerr) problem.addErrorTerm(gerr) else: num_skipped = num_skipped + 1 #update progress bar iProgress.sample() print "\r Added {0} of {1} gyroscope error terms (skipped {2} out-of-bounds measurements)".format( len(self.imuData)-num_skipped, len(self.imuData), num_skipped ) self.gyroErrors = gyroErrors def initBiasSplines(self, poseSpline, splineOrder, biasKnotsPerSecond): start = poseSpline.t_min(); end = poseSpline.t_max(); seconds = end - start; knots = int(round(seconds * biasKnotsPerSecond)) print print "Initializing the bias splines with %d knots" % (knots) #initialize the bias splines self.gyroBias = bsplines.BSpline(splineOrder) self.gyroBias.initConstantSpline(start,end,knots, self.GyroBiasPrior ) self.accelBias = bsplines.BSpline(splineOrder) self.accelBias.initConstantSpline(start,end,knots, np.zeros(3)) def addBiasMotionTerms(self, problem): Wgyro = np.eye(3) / (self.gyroRandomWalk * self.gyroRandomWalk) Waccel = np.eye(3) / (self.accelRandomWalk * self.accelRandomWalk) gyroBiasMotionErr = asp.BSplineEuclideanMotionError(self.gyroBiasDv, Wgyro, 1) problem.addErrorTerm(gyroBiasMotionErr) accelBiasMotionErr = asp.BSplineEuclideanMotionError(self.accelBiasDv, Waccel, 1) problem.addErrorTerm(accelBiasMotionErr) def getTransformationFromBodyToImu(self): if self.isReferenceImu: return sm.Transformation() return sm.Transformation(sm.r2quat(self.q_i_b_Dv.toRotationMatrix()) , \ np.dot(self.q_i_b_Dv.toRotationMatrix(), \ self.r_b_Dv.toEuclidean())) def findOrientationPrior(self, referenceImu): print print "Estimating imu-imu rotation initial guess." # build the problem problem = aopt.OptimizationProblem() # Add the rotation as design variable q_i_b_Dv = aopt.RotationQuaternionDv( np.array([0.0, 0.0, 0.0, 1.0]) ) q_i_b_Dv.setActive(True) problem.addDesignVariable(q_i_b_Dv) # Add spline representing rotational velocity of in body frame startTime = self.imuData[0].stamp.toSec() endTime = self.imuData[-1].stamp.toSec() knotsPerSecond = 50 knots = int( round( (endTime - startTime) * knotsPerSecond) ) angularVelocity = bsplines.BSpline(3) angularVelocity.initConstantSpline(startTime, endTime, knots, np.array([0., 0., 0.]) ) angularVelocityDv = asp.EuclideanBSplineDesignVariable(angularVelocity) for i in range(0,angularVelocityDv.numDesignVariables()): dv = angularVelocityDv.designVariable(i) dv.setActive(True) problem.addDesignVariable(dv) # Add constant reference gyro bias as design variable referenceGyroBiasDv = aopt.EuclideanPointDv( np.zeros(3) ) referenceGyroBiasDv.setActive(True) problem.addDesignVariable(referenceGyroBiasDv) for im in referenceImu.imuData: tk = im.stamp.toSec() if tk > angularVelocity.t_min() and tk < angularVelocity.t_max(): #DV expressions bias = referenceGyroBiasDv.toExpression() omega_predicted = angularVelocityDv.toEuclideanExpression(tk, 0) omega_measured = im.omega #error term gerr = ket.GyroscopeError(im.omega, im.omegaInvR, omega_predicted, bias) problem.addErrorTerm(gerr) #define the optimization options = aopt.Optimizer2Options() options.verbose = False options.linearSolver = aopt.BlockCholeskyLinearSystemSolver() options.nThreads = 2 options.convergenceDeltaX = 1e-4 options.convergenceDeltaJ = 1 options.maxIterations = 50 #run the optimization optimizer = aopt.Optimizer2(options) optimizer.setProblem(problem) try: optimizer.optimize() except: sm.logFatal("Failed to obtain initial guess for the relative orientation!") sys.exit(-1) referenceAbsoluteOmega = lambda dt = np.array([0.]): \ np.asarray([np.linalg.norm(angularVelocityDv.toEuclidean(im.stamp.toSec() + dt[0], 0)) \ for im in self.imuData \ if (im.stamp.toSec() + dt[0] > angularVelocity.t_min() \ and im.stamp.toSec() + dt[0] < angularVelocity.t_max())]) absoluteOmega = lambda dt = np.array([0.]): \ np.asarray([np.linalg.norm(im.omega) for im in self.imuData \ if (im.stamp.toSec() + dt[0] > angularVelocity.t_min() \ and im.stamp.toSec() + dt[0] < angularVelocity.t_max())]) if len(referenceAbsoluteOmega()) == 0 or len(absoluteOmega()) == 0: sm.logFatal("The time ranges of the IMUs published as topics {0} and {1} do not overlap. "\ "Please make sure that the sensors are synchronized correctly." \ .format(referenceImu.imuConfig.getRosTopic(), self.imuConfig.getRosTopic())) sys.exit(-1) #get the time shift corr = np.correlate(referenceAbsoluteOmega(), absoluteOmega(), "full") discrete_shift = corr.argmax() - (np.size(absoluteOmega()) - 1) #get cont. time shift times = [im.stamp.toSec() for im in self.imuData] dT = np.mean(np.diff( times )) shift = discrete_shift*dT if self.estimateTimedelay and not self.isReferenceImu: #refine temporal offset only when used. objectiveFunction = lambda dt: np.linalg.norm(referenceAbsoluteOmega(dt) - absoluteOmega(dt))**2 refined_shift = scipy.optimize.fmin(objectiveFunction, np.array([shift]), maxiter=100)[0] self.timeOffset = float(refined_shift) print "Temporal correction with respect to reference IMU " print self.timeOffset, "[s]", ("" if self.estimateTimedelay else \ " (this offset is not accounted for in the calibration)") # Add constant gyro bias as design variable gyroBiasDv = aopt.EuclideanPointDv( np.zeros(3) ) gyroBiasDv.setActive(True) problem.addDesignVariable(gyroBiasDv) for im in self.imuData: tk = im.stamp.toSec() + self.timeOffset if tk > angularVelocity.t_min() and tk < angularVelocity.t_max(): #DV expressions C_i_b = q_i_b_Dv.toExpression() bias = gyroBiasDv.toExpression() omega_predicted = C_i_b * angularVelocityDv.toEuclideanExpression(tk, 0) omega_measured = im.omega #error term gerr = ket.GyroscopeError(im.omega, im.omegaInvR, omega_predicted, bias) problem.addErrorTerm(gerr) #get the prior try: optimizer.optimize() except: sm.logFatal("Failed to obtain initial guess for the relative orientation!") sys.exit(-1) print "Estimated imu to reference imu Rotation: " print q_i_b_Dv.toRotationMatrix() self.q_i_b_prior = sm.r2quat(q_i_b_Dv.toRotationMatrix()) #Lidar class IccLidar(object): def __init__(self): self.loadLidarData() self.targetObservations = [] self.timeshiftLidarToImuPrior = 0.0 class LidarMeasurement(object): def __init__(self, stamp, vec): self.vec = vec self.stamp = stamp def loadLidarData(self): # print "Reading Lidar data ({0})".format(self.dataset.topic) Lidar = [] with open("/home/xxiao/kalibr/poseLidar.txt", "r") as f: for line in f.readlines(): line = line.strip('\n') line = line.split(' ') v=np.array([float(line[1]),float(line[2]),float(line[3]),float(line[4]),float(line[5]),float(line[6])]) # print(v) Lidar.append(self.LidarMeasurement(line[0], v) ) self.LidarData = Lidar if len(self.LidarData)>1: print "\r Read %d Lidar readings over %.1f seconds " \ % (len(Lidar), float(Lidar[-1].stamp) - float(Lidar[0].stamp)) else: sm.logFatal("Could not find any Lidar messages. Please check the dataset.") sys.exit(-1) #estimates the timeshift between the camearas and the imu using a crosscorrelation approach # #approach: angular rates are constant on a fixed body independent of location # using only the norm of the gyro outputs and assuming that the biases are small # we can estimate the timeshift between the cameras and the imu by calculating # the angular rates of the cameras by fitting a spline and evaluating the derivatives # then computing the cross correlating between the "predicted" angular rates (camera) # and imu, the maximum corresponds to the timeshift... # in a next step we can use the time shift to estimate the rotation between camera and imu def findTimeshiftCameraImuPrior(self, imu, verbose=False): print "Estimating time shift lidar to imu:" #fit a spline to the camera observations poseSpline = self.initPoseSplineFromLidar( timeOffsetPadding=0.0 ) #predict time shift prior t=[] omega_measured_norm = [] omega_predicted_norm = [] for im in imu.imuData: tk = im.stamp.toSec() if tk > poseSpline.t_min() and tk < poseSpline.t_max(): #get imu measurements and spline from camera omega_measured = im.omega # lidar omega_predicted = aopt.EuclideanExpression( np.matrix( poseSpline.angularVelocityBodyFrame( tk ) ).transpose() ) #calc norm t = np.hstack( (t, tk) ) omega_measured_norm = np.hstack( (omega_measured_norm, np.linalg.norm( omega_measured ) )) omega_predicted_norm = np.hstack( (omega_predicted_norm, np.linalg.norm( omega_predicted.toEuclidean() )) ) print(len(omega_predicted_norm)) print(len(omega_measured_norm)) if len(omega_predicted_norm) == 0 or len(omega_measured_norm) == 0: sm.logFatal("The time ranges of the Lidar and IMU do not overlap. "\ "Please make sure that your sensors are synchronized correctly.") sys.exit(-1) #get the time shift corr = np.correlate(omega_predicted_norm, omega_measured_norm, "full") discrete_shift = corr.argmax() - (np.size(omega_measured_norm) - 1) #get cont. time shift times = [im.stamp.toSec() for im in imu.imuData] dT = np.mean(np.diff( times )) shift = -discrete_shift*dT #Create plots Isplot = True if Isplot: pl.plot(t, omega_measured_norm, label="measured_raw") pl.plot(t, omega_predicted_norm, label="predicted") pl.plot(t-shift, omega_measured_norm, label="measured_corrected") pl.legend() pl.title("Time shift prior camera-imu estimation") pl.figure() pl.plot(corr) pl.title("Cross-correlation ||omega_predicted||, ||omega_measured||") pl.show() sm.logDebug("discrete time shift: {0}".format(discrete_shift)) sm.logDebug("cont. time shift: {0}".format(shift)) sm.logDebug("dT: {0}".format(dT)) #store the timeshift (t_imu = t_cam + timeshiftLidarToImuPrior) self.timeshiftLidarToImuPrior = shift print " Time shift Lidar to imu (t_imu = t_lidar + shift):" print self.timeshiftLidarToImuPrior #initialize a pose spline using camera poses (pose spline = T_wb) def initPoseSplineFromLidar(self, splineOrder=6, poseKnotsPerSecond=100, timeOffsetPadding=0.02): # T_c_b = self.T_extrinsic.T() pose = bsplines.BSplinePose(splineOrder, sm.RotationVector()) self.targetObservations = self.LidarData # Get the checkerboard times. times = np.array([float(obs.stamp)+self.timeshiftLidarToImuPrior for obs in self.targetObservations ]) # ??? whether use t_c_b # curve = np.matrix([ pose.timeshiftLidarToImuPrior( np.dot(obs[1], T_c_b) ) for obs in self.targetObservations]).T curve = np.matrix([ obs.vec for obs in self.targetObservations]).T if np.isnan(curve).any(): raise RuntimeError("Nans in curve values") sys.exit(0) # Add 2 seconds on either end to allow the spline to slide during optimization times = np.hstack((times[0] - (timeOffsetPadding * 2.0), times, times[-1] + (timeOffsetPadding * 2.0))) curve = np.hstack((curve[:,0], curve, curve[:,-1])) # print(curve) # Make sure the rotation vector doesn't flip for i in range(2,curve.shape[1]): # print(i) previousRotationVector = curve[3:6,i-1] r = curve[3:6,i] angle = np.linalg.norm(r) # print(r) # print(angle) axis = r/angle best_r = r best_dist = np.linalg.norm( best_r - previousRotationVector) for s in range(-3,4): aa = axis * (angle + math.pi * 2.0 * s) dist = np.linalg.norm( aa - previousRotationVector ) if dist < best_dist: best_r = aa best_dist = dist curve[3:6,i] = best_r seconds = times[-1] - times[0] knots = int(round(seconds * poseKnotsPerSecond)) print print "Initializing a pose spline with %d knots (%f knots per second over %f seconds)" % ( knots, poseKnotsPerSecond, seconds) pose.initPoseSplineSparse(times, curve, knots, 1e-4) return pose class IccScaledMisalignedImu(IccImu): class ImuParameters(IccImu.ImuParameters): def __init__(self, imuConfig): IccImu.ImuParameters.__init__(self, imuConfig) self.data = imuConfig.data self.data["model"] = "scale-misalignment" def printDetails(self, dest=sys.stdout): IccImu.ImuParameters.printDetails(self, dest) print >> dest, " Gyroscope: " print >> dest, " M:" print >> dest, self.formatIndented(" ", np.array(self.data["gyroscopes"]["M"])) print >> dest, " A [(rad/s)/(m/s^2)]:" print >> dest, self.formatIndented(" ", np.array(self.data["gyroscopes"]["A"])) print >> dest, " C_gyro_i:" print >> dest, self.formatIndented(" ", np.array(self.data["gyroscopes"]["C_gyro_i"])) print >> dest, " Accelerometer: " print >> dest, " M:" print >> dest, self.formatIndented(" ", np.array(self.data["accelerometers"]["M"])) def setIntrisicsMatrices(self, M_accel, C_gyro_i, M_gyro, Ma_gyro): self.data["accelerometers"] = dict() self.data["accelerometers"]["M"] = M_accel.tolist() self.data["gyroscopes"] = dict() self.data["gyroscopes"]["M"] = M_gyro.tolist() self.data["gyroscopes"]["A"] = Ma_gyro.tolist() self.data["gyroscopes"]["C_gyro_i"] = C_gyro_i.tolist() def updateImuConfig(self): IccImu.updateImuConfig(self) self.imuConfig.setIntrisicsMatrices(self.M_accel_Dv.toMatrix3x3(), \ self.q_gyro_i_Dv.toRotationMatrix(), \ self.M_gyro_Dv.toMatrix3x3(), \ self.M_accel_gyro_Dv.toMatrix3x3()) def addDesignVariables(self, problem): IccImu.addDesignVariables(self, problem) self.q_gyro_i_Dv = aopt.RotationQuaternionDv(np.array([0., 0., 0., 1.])) problem.addDesignVariable(self.q_gyro_i_Dv, ic.HELPER_GROUP_ID) self.q_gyro_i_Dv.setActive(True) self.M_accel_Dv = aopt.MatrixBasicDv(np.eye(3), np.array([[1, 0, 0],[1, 1, 0],[1, 1, 1]], \ dtype=int)) problem.addDesignVariable(self.M_accel_Dv, ic.HELPER_GROUP_ID) self.M_accel_Dv.setActive(True) self.M_gyro_Dv = aopt.MatrixBasicDv(np.eye(3), np.array([[1, 0, 0],[1, 1, 0],[1, 1, 1]], \ dtype=int)) problem.addDesignVariable(self.M_gyro_Dv, ic.HELPER_GROUP_ID) self.M_gyro_Dv.setActive(True) self.M_accel_gyro_Dv = aopt.MatrixBasicDv(np.zeros((3,3)),np.ones((3,3),dtype=int)) problem.addDesignVariable(self.M_accel_gyro_Dv, ic.HELPER_GROUP_ID) self.M_accel_gyro_Dv.setActive(True) def addAccelerometerErrorTerms(self, problem, poseSplineDv, g_w, mSigma=0.0, \ accelNoiseScale=1.0): print print "Adding accelerometer error terms ({0})".format(self.dataset.topic) #progress bar iProgress = sm.Progress2( len(self.imuData) ) iProgress.sample() # AccelerometerError(measurement, invR, C_b_w, acceleration_w, bias, g_w) weight = 1.0/accelNoiseScale accelErrors = [] num_skipped = 0 if mSigma > 0.0: mest = aopt.HuberMEstimator(mSigma) else: mest = aopt.NoMEstimator() for im in self.imuData: tk = im.stamp.toSec() + self.timeOffset if tk > poseSplineDv.spline().t_min() and tk < poseSplineDv.spline().t_max(): C_b_w = poseSplineDv.orientation(tk).inverse() a_w = poseSplineDv.linearAcceleration(tk) b_i = self.accelBiasDv.toEuclideanExpression(tk,0) M = self.M_accel_Dv.toExpression() w_b = poseSplineDv.angularVelocityBodyFrame(tk) w_dot_b = poseSplineDv.angularAccelerationBodyFrame(tk) C_i_b = self.q_i_b_Dv.toExpression() r_b = self.r_b_Dv.toExpression() a = M * (C_i_b * (C_b_w * (a_w - g_w) + \ w_dot_b.cross(r_b) + w_b.cross(w_b.cross(r_b)))) aerr = ket.EuclideanError(im.alpha, im.alphaInvR * weight, a + b_i) aerr.setMEstimatorPolicy(mest) accelErrors.append(aerr) problem.addErrorTerm(aerr) else: num_skipped = num_skipped + 1 #update progress bar iProgress.sample() print "\r Added {0} of {1} accelerometer error terms (skipped {2} out-of-bounds measurements)".format( len(self.imuData)-num_skipped, len(self.imuData), num_skipped ) self.accelErrors = accelErrors def addGyroscopeErrorTerms(self, problem, poseSplineDv, mSigma=0.0, gyroNoiseScale=1.0, g_w=None): print print "Adding gyroscope error terms ({0})".format(self.dataset.topic) #progress bar iProgress = sm.Progress2( len(self.imuData) ) iProgress.sample() num_skipped = 0 gyroErrors = [] weight = 1.0/gyroNoiseScale if mSigma > 0.0: mest = aopt.HuberMEstimator(mSigma) else: mest = aopt.NoMEstimator() for im in self.imuData: tk = im.stamp.toSec() + self.timeOffset if tk > poseSplineDv.spline().t_min() and tk < poseSplineDv.spline().t_max(): # GyroscopeError(measurement, invR, angularVelocity, bias) w_b = poseSplineDv.angularVelocityBodyFrame(tk) w_dot_b = poseSplineDv.angularAccelerationBodyFrame(tk) b_i = self.gyroBiasDv.toEuclideanExpression(tk,0) C_b_w = poseSplineDv.orientation(tk).inverse() a_w = poseSplineDv.linearAcceleration(tk) r_b = self.r_b_Dv.toExpression() a_b = C_b_w * (a_w - g_w) + w_dot_b.cross(r_b) + w_b.cross(w_b.cross(r_b)) C_i_b = self.q_i_b_Dv.toExpression() C_gyro_i = self.q_gyro_i_Dv.toExpression() C_gyro_b = C_gyro_i * C_i_b M = self.M_gyro_Dv.toExpression() Ma = self.M_accel_gyro_Dv.toExpression() w = M * (C_gyro_b * w_b) + Ma * (C_gyro_b * a_b) gerr = ket.EuclideanError(im.omega, im.omegaInvR * weight, w + b_i) gerr.setMEstimatorPolicy(mest) gyroErrors.append(gerr) problem.addErrorTerm(gerr) else: num_skipped = num_skipped + 1 #update progress bar iProgress.sample() print "\r Added {0} of {1} gyroscope error terms (skipped {2} out-of-bounds measurements)".format( len(self.imuData)-num_skipped, len(self.imuData), num_skipped ) self.gyroErrors = gyroErrors class IccScaledMisalignedSizeEffectImu(IccScaledMisalignedImu): class ImuParameters(IccScaledMisalignedImu.ImuParameters): def __init__(self, imuConfig): IccScaledMisalignedImu.ImuParameters.__init__(self, imuConfig) self.data = imuConfig.data self.data["model"] = "scale-misalignment-size-effect" def printDetails(self, dest=sys.stdout): IccScaledMisalignedImu.ImuParameters.printDetails(self, dest) print >> dest, " rx_i [m]:" print >> dest, self.formatIndented(" ", \ np.array(self.data["accelerometers"]["rx_i"])) print >> dest, " ry_i [m]:" print >> dest, self.formatIndented(" ", \ np.array(self.data["accelerometers"]["ry_i"])) print >> dest, " rz_i [m]:" print >> dest, self.formatIndented(" ", \ np.array(self.data["accelerometers"]["rz_i"])) def setAccelerometerLeverArms(self, rx_i, ry_i, rz_i): self.data["accelerometers"]["rx_i"] = rx_i.tolist() self.data["accelerometers"]["ry_i"] = ry_i.tolist() self.data["accelerometers"]["rz_i"] = rz_i.tolist() def updateImuConfig(self): IccScaledMisalignedImu.updateImuConfig(self) self.imuConfig.setAccelerometerLeverArms(self.rx_i_Dv.toEuclidean(), \ self.ry_i_Dv.toEuclidean(), \ self.rz_i_Dv.toEuclidean()) def addDesignVariables(self, problem): IccScaledMisalignedImu.addDesignVariables(self, problem) self.rx_i_Dv = aopt.EuclideanPointDv(np.array([0., 0., 0.])) problem.addDesignVariable(self.rx_i_Dv, ic.HELPER_GROUP_ID) self.rx_i_Dv.setActive(False) self.ry_i_Dv = aopt.EuclideanPointDv(np.array([0., 0., 0.])) problem.addDesignVariable(self.ry_i_Dv, ic.HELPER_GROUP_ID) self.ry_i_Dv.setActive(True) self.rz_i_Dv = aopt.EuclideanPointDv(np.array([0., 0., 0.])) problem.addDesignVariable(self.rz_i_Dv, ic.HELPER_GROUP_ID) self.rz_i_Dv.setActive(True) self.Ix_Dv = aopt.MatrixBasicDv(np.diag([1.,0.,0.]), np.zeros((3,3),dtype=int)) problem.addDesignVariable(self.Ix_Dv, ic.HELPER_GROUP_ID) self.Ix_Dv.setActive(False) self.Iy_Dv = aopt.MatrixBasicDv(np.diag([0.,1.,0.]), np.zeros((3,3),dtype=int)) problem.addDesignVariable(self.Iy_Dv, ic.HELPER_GROUP_ID) self.Iy_Dv.setActive(False) self.Iz_Dv = aopt.MatrixBasicDv(np.diag([0.,0.,1.]), np.zeros((3,3),dtype=int)) problem.addDesignVariable(self.Iz_Dv, ic.HELPER_GROUP_ID) self.Iz_Dv.setActive(False) def addAccelerometerErrorTerms(self, problem, poseSplineDv, g_w, mSigma=0.0, \ accelNoiseScale=1.0): print print "Adding accelerometer error terms ({0})".format(self.dataset.topic) #progress bar iProgress = sm.Progress2( len(self.imuData) ) iProgress.sample() # AccelerometerError(measurement, invR, C_b_w, acceleration_w, bias, g_w) weight = 1.0/accelNoiseScale accelErrors = [] num_skipped = 0 if mSigma > 0.0: mest = aopt.HuberMEstimator(mSigma) else: mest = aopt.NoMEstimator() for im in self.imuData: tk = im.stamp.toSec() + self.timeOffset if tk > poseSplineDv.spline().t_min() and tk < poseSplineDv.spline().t_max(): C_b_w = poseSplineDv.orientation(tk).inverse() a_w = poseSplineDv.linearAcceleration(tk) b_i = self.accelBiasDv.toEuclideanExpression(tk,0) M = self.M_accel_Dv.toExpression() w_b = poseSplineDv.angularVelocityBodyFrame(tk) w_dot_b = poseSplineDv.angularAccelerationBodyFrame(tk) C_i_b = self.q_i_b_Dv.toExpression() rx_b = self.r_b_Dv.toExpression() + C_i_b.inverse() * self.rx_i_Dv.toExpression() ry_b = self.r_b_Dv.toExpression() + C_i_b.inverse() * self.ry_i_Dv.toExpression() rz_b = self.r_b_Dv.toExpression() + C_i_b.inverse() * self.rz_i_Dv.toExpression() Ix = self.Ix_Dv.toExpression() Iy = self.Iy_Dv.toExpression() Iz = self.Iz_Dv.toExpression() a = M * (C_i_b * (C_b_w * (a_w - g_w)) + \ Ix * (C_i_b * (w_dot_b.cross(rx_b) + w_b.cross(w_b.cross(rx_b)))) + \ Iy * (C_i_b * (w_dot_b.cross(ry_b) + w_b.cross(w_b.cross(ry_b)))) + \ Iz * (C_i_b * (w_dot_b.cross(rz_b) + w_b.cross(w_b.cross(rz_b)))) ) aerr = ket.EuclideanError(im.alpha, im.alphaInvR * weight, a + b_i) aerr.setMEstimatorPolicy(mest) accelErrors.append(aerr) problem.addErrorTerm(aerr) else: num_skipped = num_skipped + 1 #update progress bar iProgress.sample() print "\r Added {0} of {1} accelerometer error terms (skipped {2} out-of-bounds measurements)".format( len(self.imuData)-num_skipped, len(self.imuData), num_skipped ) self.accelErrors = accelErrors
[ 1, 529, 276, 1112, 420, 29958, 4419, 29653, 29899, 29896, 29914, 2230, 29657, 13, 5215, 1560, 13, 5215, 408, 5288, 29918, 11023, 408, 1274, 29894, 13, 5215, 408, 5288, 29918, 29883, 4183, 294, 29918, 481, 4115, 408, 1274, 29894, 29918, 481, 4115, 13, 5215, 408, 5288, 29918, 23579, 1475, 408, 7051, 13, 5215, 408, 5288, 29918, 27852, 408, 263, 3670, 13, 5215, 289, 23579, 1475, 13, 5215, 25364, 4626, 29918, 9435, 408, 413, 29883, 13, 5215, 25364, 4626, 29918, 2704, 357, 1516, 408, 413, 300, 13, 5215, 306, 617, 7856, 4626, 1061, 408, 16077, 13, 13, 5215, 13850, 29906, 13, 5215, 10876, 13, 5215, 5844, 13, 5215, 12655, 408, 7442, 13, 5215, 282, 2904, 370, 408, 715, 13, 5215, 4560, 2272, 29889, 20640, 675, 13, 13, 13, 1753, 2069, 20717, 23544, 16390, 24541, 29898, 23156, 1445, 29892, 11261, 29892, 515, 29918, 517, 29922, 8516, 29892, 2189, 29918, 29879, 9524, 2133, 29922, 8824, 1125, 13, 1678, 1596, 376, 15514, 5281, 10656, 14652, 23156, 8783, 9591, 6160, 13, 1678, 1596, 6634, 29873, 16390, 24541, 29901, 3986, 426, 29900, 29913, 1642, 4830, 29898, 23156, 1445, 29897, 13, 1678, 1596, 6634, 29873, 7031, 293, 29901, 9651, 426, 29900, 29913, 1642, 4830, 29898, 13010, 29897, 13, 1678, 9591, 353, 413, 29883, 29889, 23544, 2940, 16390, 24541, 6982, 29898, 23156, 1445, 29892, 11261, 29892, 19548, 29918, 3166, 29918, 517, 29922, 3166, 29918, 517, 29892, 320, 13, 462, 462, 418, 2189, 29918, 29879, 9524, 2133, 29922, 19826, 29918, 29879, 9524, 2133, 29897, 13, 1678, 1596, 6634, 29873, 4557, 310, 4558, 29901, 426, 29900, 29913, 1642, 4830, 29898, 2435, 29898, 16950, 29889, 2248, 876, 13, 1678, 736, 9591, 13, 13, 1753, 2069, 1888, 29884, 23544, 16390, 24541, 29898, 23156, 1445, 29892, 11261, 29892, 515, 29918, 517, 29922, 8516, 29892, 2189, 29918, 29879, 9524, 2133, 29922, 8824, 1125, 13, 1678, 1596, 376, 15514, 5281, 527, 29884, 14652, 23156, 8783, 9591, 6160, 13, 1678, 1596, 6634, 29873, 16390, 24541, 29901, 3986, 426, 29900, 29913, 1642, 4830, 29898, 23156, 1445, 29897, 13, 1678, 1596, 6634, 29873, 7031, 293, 29901, 9651, 426, 29900, 29913, 1642, 4830, 29898, 13010, 29897, 13, 1678, 9591, 353, 413, 29883, 29889, 23544, 1888, 29884, 16390, 24541, 6982, 29898, 23156, 1445, 29892, 11261, 29892, 19548, 29918, 3166, 29918, 517, 29922, 3166, 29918, 517, 29892, 320, 13, 462, 462, 418, 2189, 29918, 29879, 9524, 2133, 29922, 19826, 29918, 29879, 9524, 2133, 29897, 13, 1678, 1596, 6634, 29873, 4557, 310, 7191, 29901, 426, 29900, 29913, 1642, 4830, 29898, 2435, 29898, 16950, 29889, 2248, 876, 13, 1678, 736, 9591, 13, 13, 13, 29937, 29885, 3231, 10656, 13, 1990, 306, 617, 20717, 7295, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 3949, 3991, 29892, 3646, 3991, 29892, 8783, 29892, 28094, 6929, 10142, 29922, 29896, 29889, 29900, 29892, 1510, 29907, 1398, 414, 29922, 5574, 29892, 320, 13, 462, 1510, 1123, 20865, 29922, 5574, 29892, 1510, 6716, 14448, 29922, 8824, 1125, 13, 308, 13, 4706, 396, 8899, 278, 5285, 13, 4706, 1583, 29889, 24713, 353, 8783, 13, 4706, 1583, 29889, 11108, 3991, 353, 3949, 3991, 13, 4706, 1583, 29889, 5182, 3991, 353, 3646, 3991, 13, 308, 13, 4706, 396, 2994, 1089, 25812, 13, 4706, 1583, 29889, 2616, 1089, 2525, 14082, 1017, 353, 28094, 6929, 10142, 13, 13, 4706, 396, 842, 278, 17541, 28594, 7536, 304, 2322, 13, 4706, 1583, 29889, 29911, 29918, 1062, 29878, 28594, 353, 1560, 29889, 4300, 5404, 580, 13, 3986, 13, 4706, 396, 24926, 3064, 29882, 2027, 7536, 304, 5225, 13, 4706, 1583, 29889, 3706, 29882, 2027, 14353, 1762, 1888, 29884, 29925, 13479, 353, 29871, 29900, 29889, 29900, 13, 308, 13, 4706, 396, 24926, 278, 10656, 848, 13, 4706, 1583, 29889, 26065, 353, 413, 29883, 29889, 29909, 2536, 314, 20717, 29889, 3166, 11507, 29898, 3949, 3991, 1723, 13, 308, 13, 4706, 396, 21111, 26995, 13, 4706, 1583, 29889, 14669, 7856, 26218, 8667, 29898, 3646, 3991, 29892, 1510, 5647, 13857, 29922, 4294, 29907, 1398, 414, 29892, 1510, 1123, 20865, 29922, 4294, 1123, 20865, 29892, 1967, 7789, 3262, 29922, 4294, 6716, 14448, 1723, 13, 4706, 1773, 389, 19715, 353, 451, 313, 4294, 29907, 1398, 414, 470, 1510, 1123, 20865, 470, 1510, 6716, 14448, 29897, 13, 4706, 1583, 29889, 5182, 6039, 2140, 800, 353, 413, 29883, 29889, 21111, 29907, 1398, 414, 4591, 16390, 24541, 29898, 1311, 29889, 24713, 29892, 1583, 29889, 4801, 3019, 29892, 1773, 389, 19715, 29922, 4713, 389, 19715, 29897, 13, 308, 13, 4706, 396, 273, 12678, 310, 278, 20953, 297, 278, 3186, 14821, 3515, 259, 13, 4706, 1583, 29889, 23439, 29918, 29893, 353, 7442, 29889, 2378, 4197, 29929, 29889, 29947, 29900, 29953, 29945, 29945, 29892, 29871, 29900, 1696, 29871, 29900, 29889, 2314, 13, 308, 13, 1678, 822, 6230, 7856, 26218, 8667, 29898, 1311, 29892, 3646, 3991, 29892, 1510, 5647, 13857, 29922, 8824, 29892, 1510, 1123, 20865, 29922, 8824, 29892, 1967, 7789, 3262, 29922, 8824, 1125, 13, 308, 13, 4706, 396, 1359, 278, 1208, 26218, 3646, 5285, 13, 4706, 3646, 9629, 353, 3646, 3991, 29889, 657, 8667, 9629, 580, 13, 4706, 3646, 1542, 353, 3646, 3991, 29889, 657, 8667, 1542, 580, 13, 268, 13, 4706, 565, 3646, 1542, 1275, 525, 3198, 261, 3377, 2396, 13, 9651, 3987, 353, 1274, 29894, 29889, 5596, 261, 3377, 5856, 580, 29871, 13, 9651, 3987, 29889, 4572, 2182, 7925, 353, 5852, 13, 9651, 3987, 29889, 8945, 675, 2940, 353, 5852, 13, 9651, 3987, 29889, 1509, 29909, 1388, 415, 573, 1349, 12268, 353, 5852, 308, 13, 9651, 3987, 29889, 19826, 29943, 579, 5596, 353, 7700, 13, 9651, 3987, 29889, 7165, 6110, 353, 29871, 29945, 13, 9651, 3987, 29889, 4294, 5647, 13857, 15167, 353, 1510, 5647, 13857, 13, 9651, 6856, 353, 1274, 29894, 29889, 5756, 7856, 26218, 8667, 5596, 261, 3377, 29898, 5182, 9629, 1839, 5182, 10661, 7464, 29871, 13, 462, 462, 462, 9651, 3646, 9629, 1839, 5182, 1625, 29879, 7464, 29871, 13, 462, 462, 462, 9651, 3646, 9629, 1839, 798, 5592, 9390, 29924, 2699, 7464, 29871, 13, 462, 462, 462, 9651, 3646, 9629, 1839, 1054, 5592, 9390, 29924, 2699, 7464, 13, 462, 462, 462, 9651, 3987, 29897, 13, 4706, 25342, 3646, 1542, 1275, 525, 16622, 7720, 2396, 13, 9651, 3987, 353, 1274, 29894, 29889, 23495, 280, 7720, 5856, 580, 13, 9651, 3987, 29889, 4294, 5647, 13857, 15167, 353, 1510, 5647, 13857, 13, 9651, 3987, 29889, 1509, 2887, 962, 16414, 23495, 280, 7720, 353, 3646, 9629, 1839, 294, 962, 16414, 5756, 2033, 13, 9651, 6856, 353, 1274, 29894, 29889, 5756, 7856, 26218, 8667, 23495, 280, 7720, 29898, 5182, 9629, 1839, 5182, 10661, 7464, 13, 462, 462, 462, 3986, 3646, 9629, 1839, 5182, 1625, 29879, 7464, 29871, 13, 462, 462, 462, 3986, 3646, 9629, 1839, 1028, 9390, 29924, 2699, 7464, 29871, 13, 462, 462, 462, 3986, 3987, 29897, 13, 4706, 25342, 3646, 1542, 1275, 525, 481, 4115, 7720, 2396, 13, 9651, 3987, 353, 1274, 29894, 29918, 481, 4115, 29889, 29909, 3193, 7720, 5856, 580, 29871, 13, 9651, 3987, 29889, 4294, 5647, 13857, 15167, 353, 1510, 5647, 13857, 13, 9651, 3987, 29889, 1195, 28089, 2831, 7211, 29949, 5824, 353, 938, 29898, 7442, 29889, 3317, 29898, 518, 5182, 9629, 1839, 4039, 10661, 7464, 3646, 9629, 1839, 4039, 1625, 29879, 2033, 29962, 1723, 718, 29871, 29896, 1723, 13, 632, 13, 9651, 6856, 353, 1274, 29894, 29918, 481, 4115, 29889, 5756, 7856, 26218, 8667, 29909, 3193, 7720, 29898, 5182, 9629, 1839, 4039, 10661, 7464, 13, 462, 462, 462, 9651, 3646, 9629, 1839, 4039, 1625, 29879, 7464, 29871, 13, 462, 462, 462, 9651, 3646, 9629, 1839, 4039, 3505, 7464, 29871, 13, 462, 462, 462, 9651, 3646, 9629, 1839, 4039, 5592, 9390, 7464, 29871, 13, 462, 462, 462, 9651, 3987, 29897, 13, 4706, 1683, 29901, 13, 9651, 12020, 24875, 2392, 29898, 376, 14148, 1208, 26218, 3646, 1213, 1723, 13, 462, 965, 13, 4706, 3987, 353, 1274, 29894, 29889, 5756, 6362, 3019, 5856, 580, 29871, 13, 4706, 3987, 29889, 3027, 7789, 3262, 353, 1967, 7789, 3262, 13, 4706, 3987, 29889, 5317, 12521, 1089, 1123, 771, 6929, 353, 1510, 1123, 20865, 13, 4706, 3987, 29889, 4572, 12521, 1089, 3744, 27801, 353, 5852, 13, 4706, 396, 6768, 29889, 4572, 12521, 1089, 10142, 1349, 12268, 353, 29871, 29906, 29889, 29900, 13, 4706, 396, 6768, 29889, 4572, 12521, 1089, 8140, 1123, 20865, 2392, 353, 29871, 29900, 29889, 29906, 13, 4706, 1583, 29889, 4801, 3019, 353, 1274, 29894, 29889, 5756, 6362, 3019, 29898, 1311, 29889, 26065, 29889, 19156, 29892, 6856, 29892, 3987, 29897, 308, 13, 13, 1678, 822, 1284, 25231, 29925, 13479, 20717, 1762, 1888, 29884, 29898, 1311, 29892, 527, 29884, 1125, 13, 4706, 1596, 13, 4706, 1596, 376, 12787, 326, 1218, 527, 29884, 29899, 26065, 13733, 7536, 29908, 13, 308, 13, 4706, 396, 2048, 278, 1108, 13, 4706, 1108, 353, 263, 3670, 29889, 20624, 326, 2133, 26604, 580, 13, 13, 4706, 396, 3462, 278, 13733, 408, 2874, 2286, 13, 4706, 3855, 29918, 29875, 29918, 29883, 29918, 29928, 29894, 353, 263, 3670, 29889, 21281, 362, 2182, 25744, 291, 29928, 29894, 29898, 29871, 1583, 29889, 29911, 29918, 1062, 29878, 28594, 29889, 29939, 580, 1723, 13, 4706, 3855, 29918, 29875, 29918, 29883, 29918, 29928, 29894, 29889, 842, 9966, 29898, 5852, 1723, 13, 4706, 1108, 29889, 1202, 4002, 647, 16174, 29898, 29939, 29918, 29875, 29918, 29883, 29918, 29928, 29894, 29897, 13, 13, 4706, 396, 3462, 278, 10966, 307, 24003, 408, 2874, 2286, 13, 4706, 10966, 307, 29933, 3173, 29928, 29894, 353, 263, 3670, 29889, 29923, 27511, 5228, 29928, 29894, 29898, 7442, 29889, 3298, 359, 29898, 29941, 29897, 1723, 13, 4706, 10966, 307, 29933, 3173, 29928, 29894, 29889, 842, 9966, 29898, 5852, 1723, 13, 4706, 1108, 29889, 1202, 4002, 647, 16174, 29898, 1927, 307, 29933, 3173, 29928, 29894, 29897, 13, 308, 13, 4706, 396, 24926, 263, 18593, 8536, 457, 773, 278, 10656, 926, 267, 13, 4706, 18593, 29903, 572, 457, 353, 1583, 29889, 2344, 29925, 852, 29903, 572, 457, 4591, 20717, 29898, 931, 10302, 29925, 4676, 29922, 29900, 29889, 29900, 1723, 13, 308, 13, 4706, 363, 527, 297, 527, 29884, 29889, 326, 29884, 1469, 29901, 13, 9651, 18883, 353, 527, 29889, 303, 1160, 29889, 517, 7898, 580, 13, 9651, 565, 18883, 1405, 18593, 29903, 572, 457, 29889, 29873, 29918, 1195, 580, 322, 18883, 529, 18593, 29903, 572, 457, 29889, 29873, 29918, 3317, 7295, 308, 13, 18884, 396, 29928, 29963, 12241, 13, 18884, 390, 29918, 29875, 29918, 29883, 353, 3855, 29918, 29875, 29918, 29883, 29918, 29928, 29894, 29889, 517, 10960, 580, 13, 18884, 24003, 353, 10966, 307, 29933, 3173, 29928, 29894, 29889, 517, 10960, 580, 1678, 13, 462, 13, 18884, 396, 657, 278, 18551, 25383, 2703, 2442, 322, 17005, 2703, 2442, 313, 7833, 29965, 29897, 13, 18884, 2703, 2442, 29918, 11965, 18186, 353, 390, 29918, 29875, 29918, 29883, 334, 263, 3670, 29889, 29923, 27511, 10960, 29898, 7442, 29889, 5344, 29898, 18593, 29903, 572, 457, 29889, 6825, 29963, 295, 25245, 8434, 4308, 29898, 18883, 1723, 13742, 3286, 4220, 580, 1723, 13, 18884, 2703, 2442, 29918, 1004, 294, 2955, 353, 527, 29889, 4787, 13, 462, 13, 18884, 396, 2704, 1840, 13, 18884, 330, 3127, 353, 413, 300, 29889, 29954, 29891, 1883, 4338, 2392, 29898, 4787, 29918, 1004, 294, 2955, 29892, 527, 29889, 4787, 12165, 29934, 29892, 2703, 2442, 29918, 11965, 18186, 29892, 24003, 29897, 13, 18884, 1108, 29889, 1202, 2392, 14343, 29898, 914, 29878, 29897, 13, 308, 13, 4706, 565, 1108, 29889, 1949, 2392, 14343, 29879, 580, 1275, 29871, 29900, 29901, 13, 9651, 1560, 29889, 1188, 29943, 2075, 703, 17776, 304, 4017, 19843, 7536, 29889, 6634, 13, 462, 4706, 376, 12148, 1207, 1854, 393, 596, 4771, 943, 526, 12231, 1891, 5149, 23157, 13, 9651, 10876, 29889, 13322, 6278, 29896, 29897, 13, 13, 308, 13, 4706, 396, 7922, 278, 13883, 29871, 13, 4706, 3987, 353, 263, 3670, 29889, 20624, 326, 3950, 29906, 5856, 580, 13, 4706, 3987, 29889, 369, 15828, 353, 7700, 13, 4706, 3987, 29889, 10660, 13296, 369, 353, 263, 3670, 29889, 7445, 1451, 6544, 3459, 12697, 3924, 13296, 369, 580, 13, 4706, 3987, 29889, 29876, 4899, 29879, 353, 29871, 29906, 13, 4706, 3987, 29889, 535, 369, 10238, 5268, 29990, 353, 29871, 29896, 29872, 29899, 29946, 13, 4706, 3987, 29889, 535, 369, 10238, 5268, 29967, 353, 29871, 29896, 13, 4706, 3987, 29889, 3317, 13463, 800, 353, 29871, 29945, 29900, 13, 13, 4706, 396, 3389, 278, 13883, 13, 4706, 5994, 3950, 353, 263, 3670, 29889, 20624, 326, 3950, 29906, 29898, 6768, 29897, 13, 4706, 5994, 3950, 29889, 842, 26604, 29898, 17199, 29897, 13, 308, 13, 4706, 396, 657, 278, 7536, 13, 4706, 1018, 29901, 13, 9651, 5994, 3950, 29889, 20640, 675, 580, 13, 4706, 5174, 29901, 13, 9651, 1560, 29889, 1188, 29943, 2075, 703, 17776, 304, 4017, 19843, 7536, 29991, 1159, 13, 9651, 10876, 29889, 13322, 6278, 29896, 29897, 13, 13, 4706, 396, 957, 3539, 278, 7029, 13733, 7536, 313, 17462, 278, 7029, 13962, 7536, 29897, 13, 4706, 390, 29918, 29875, 29918, 29883, 353, 3855, 29918, 29875, 29918, 29883, 29918, 29928, 29894, 29889, 517, 21281, 362, 14609, 2141, 3286, 4220, 580, 13, 4706, 1583, 29889, 29911, 29918, 1062, 29878, 28594, 353, 1560, 29889, 4300, 5404, 29898, 1560, 29889, 2273, 29906, 13372, 29898, 390, 29918, 29875, 29918, 29883, 29892, 1583, 29889, 29911, 29918, 1062, 29878, 28594, 29889, 29873, 580, 1723, 1723, 13, 13, 4706, 396, 342, 6490, 20953, 297, 278, 3186, 14821, 3515, 408, 278, 2099, 2702, 4889, 13, 4706, 263, 29918, 29893, 353, 5159, 13, 4706, 363, 527, 297, 527, 29884, 29889, 326, 29884, 1469, 29901, 13, 9651, 18883, 353, 527, 29889, 303, 1160, 29889, 517, 7898, 580, 13, 9651, 565, 18883, 1405, 18593, 29903, 572, 457, 29889, 29873, 29918, 1195, 580, 322, 18883, 529, 18593, 29903, 572, 457, 29889, 29873, 29918, 3317, 7295, 13, 18884, 263, 29918, 29893, 29889, 4397, 29898, 9302, 29889, 6333, 29898, 4220, 29903, 572, 457, 29889, 20659, 29898, 11178, 511, 7442, 29889, 6333, 29898, 29934, 29918, 29875, 29918, 29883, 29892, 448, 527, 29889, 2312, 4961, 13, 4706, 2099, 29918, 29874, 29918, 29893, 353, 7442, 29889, 12676, 29898, 9302, 29889, 294, 2378, 29898, 29874, 29918, 29893, 467, 29911, 29892, 9685, 29922, 29896, 29897, 13, 4706, 1583, 29889, 23439, 29918, 29893, 353, 2099, 29918, 29874, 29918, 29893, 847, 7442, 29889, 29880, 979, 29887, 29889, 12324, 29898, 12676, 29918, 29874, 29918, 29893, 29897, 334, 29871, 29929, 29889, 29947, 29900, 29953, 29945, 29945, 13, 4706, 1596, 376, 29954, 5705, 537, 471, 938, 616, 1891, 304, 613, 1583, 29889, 23439, 29918, 29893, 29892, 14704, 29885, 29914, 29879, 29985, 29906, 18017, 29871, 13, 13, 4706, 396, 842, 278, 10966, 307, 24003, 7536, 313, 361, 591, 505, 901, 1135, 29871, 29896, 3949, 18464, 671, 16732, 6588, 29897, 13, 4706, 289, 29918, 1927, 307, 353, 24003, 29889, 517, 29923, 27511, 580, 29871, 13, 4706, 527, 29884, 29889, 29954, 29891, 307, 29933, 3173, 29925, 13479, 3981, 4619, 29871, 29896, 13, 4706, 527, 29884, 29889, 29954, 29891, 307, 29933, 3173, 29925, 13479, 353, 313, 326, 29884, 29889, 29954, 29891, 307, 29933, 3173, 29925, 13479, 3981, 29899, 29896, 29889, 29900, 6802, 326, 29884, 29889, 29954, 29891, 307, 29933, 3173, 29925, 13479, 3981, 334, 527, 29884, 29889, 29954, 29891, 307, 29933, 3173, 29925, 13479, 718, 29871, 29896, 29889, 29900, 29914, 326, 29884, 29889, 29954, 29891, 307, 29933, 3173, 29925, 13479, 3981, 29930, 29890, 29918, 1927, 307, 13, 13, 4706, 396, 2158, 1121, 13, 4706, 1596, 376, 29871, 11678, 9233, 7536, 10656, 29899, 326, 29884, 1476, 408, 29901, 313, 29911, 29918, 29875, 29918, 29883, 5513, 13, 4706, 1596, 390, 29918, 29875, 29918, 29883, 13, 4706, 1596, 376, 29871, 12842, 307, 24003, 7536, 1476, 408, 29901, 313, 29890, 29918, 1927, 307, 5513, 13, 4706, 1596, 289, 29918, 1927, 307, 13, 268, 13, 1678, 396, 2457, 385, 634, 6490, 310, 20953, 297, 278, 3186, 14821, 3515, 408, 17189, 2347, 491, 445, 10656, 13, 1678, 822, 679, 12787, 326, 630, 29954, 5705, 537, 29898, 1311, 1125, 13, 4706, 736, 1583, 29889, 23439, 29918, 29893, 13, 308, 13, 1678, 396, 342, 326, 1078, 278, 3064, 29882, 2027, 1546, 278, 2996, 279, 294, 322, 278, 527, 29884, 773, 263, 4891, 2616, 23445, 2948, 13, 1678, 396, 13, 1678, 396, 9961, 496, 29901, 6401, 19257, 526, 4868, 373, 263, 4343, 3573, 7417, 310, 4423, 13, 1678, 396, 3986, 773, 871, 278, 6056, 310, 278, 10966, 307, 14391, 322, 10241, 393, 278, 4768, 2129, 526, 2319, 13, 1678, 396, 3986, 591, 508, 12678, 278, 3064, 29882, 2027, 1546, 278, 3949, 18464, 322, 278, 527, 29884, 491, 25202, 13, 1678, 396, 3986, 278, 6401, 19257, 310, 278, 3949, 18464, 491, 28221, 263, 8536, 457, 322, 6161, 1218, 278, 25748, 13, 1678, 396, 3986, 769, 20602, 278, 4891, 8855, 1218, 1546, 278, 376, 11965, 18186, 29908, 6401, 19257, 313, 26065, 29897, 13, 1678, 396, 3986, 322, 527, 29884, 29892, 278, 7472, 16161, 304, 278, 3064, 29882, 2027, 856, 13, 1678, 396, 3986, 297, 263, 2446, 4331, 591, 508, 671, 278, 931, 9500, 304, 12678, 278, 13733, 1546, 10656, 322, 527, 29884, 13, 1678, 822, 1284, 29164, 29882, 2027, 20717, 1888, 29884, 29925, 13479, 29898, 1311, 29892, 527, 29884, 29892, 26952, 29922, 8824, 1125, 13, 4706, 1596, 376, 12787, 326, 1218, 931, 9500, 10656, 304, 527, 29884, 6160, 13, 308, 13, 4706, 396, 9202, 263, 8536, 457, 304, 278, 10656, 13917, 13, 4706, 18593, 29903, 572, 457, 353, 1583, 29889, 2344, 29925, 852, 29903, 572, 457, 4591, 20717, 29898, 931, 10302, 29925, 4676, 29922, 29900, 29889, 29900, 1723, 13, 308, 13, 4706, 396, 27711, 931, 9500, 7536, 29871, 13, 4706, 260, 29922, 2636, 13, 4706, 2703, 2442, 29918, 1004, 294, 2955, 29918, 12324, 353, 5159, 13, 4706, 2703, 2442, 29918, 11965, 18186, 29918, 12324, 353, 5159, 13, 308, 13, 4706, 363, 527, 297, 527, 29884, 29889, 326, 29884, 1469, 29901, 13, 9651, 18883, 353, 527, 29889, 303, 1160, 29889, 517, 7898, 580, 13, 9651, 565, 18883, 1405, 18593, 29903, 572, 457, 29889, 29873, 29918, 1195, 580, 322, 18883, 529, 18593, 29903, 572, 457, 29889, 29873, 29918, 3317, 7295, 13, 462, 13, 18884, 396, 657, 527, 29884, 20398, 322, 8536, 457, 515, 10656, 13, 18884, 2703, 2442, 29918, 1004, 294, 2955, 353, 527, 29889, 4787, 13, 18884, 2703, 2442, 29918, 11965, 18186, 353, 263, 3670, 29889, 29923, 27511, 10960, 29898, 7442, 29889, 5344, 29898, 18593, 29903, 572, 457, 29889, 6825, 29963, 295, 25245, 8434, 4308, 29898, 18883, 1723, 13742, 3286, 4220, 580, 1723, 13, 13, 18884, 396, 28667, 6056, 13, 18884, 260, 353, 7442, 29889, 29882, 1429, 29898, 313, 29873, 29892, 18883, 29897, 1723, 13, 18884, 2703, 2442, 29918, 1004, 294, 2955, 29918, 12324, 353, 7442, 29889, 29882, 1429, 29898, 313, 4787, 29918, 1004, 294, 2955, 29918, 12324, 29892, 7442, 29889, 29880, 979, 29887, 29889, 12324, 29898, 2703, 2442, 29918, 1004, 294, 2955, 1723, 29871, 876, 13, 18884, 2703, 2442, 29918, 11965, 18186, 29918, 12324, 353, 7442, 29889, 29882, 1429, 29898, 313, 4787, 29918, 11965, 18186, 29918, 12324, 29892, 7442, 29889, 29880, 979, 29887, 29889, 12324, 29898, 2703, 2442, 29918, 11965, 18186, 29889, 517, 29923, 27511, 580, 29871, 876, 1723, 13, 308, 13, 4706, 565, 7431, 29898, 4787, 29918, 11965, 18186, 29918, 12324, 29897, 1275, 29871, 29900, 470, 7431, 29898, 4787, 29918, 1004, 294, 2955, 29918, 12324, 29897, 1275, 29871, 29900, 29901, 13, 9651, 1560, 29889, 1188, 29943, 2075, 703, 1576, 931, 20238, 310, 278, 10656, 322, 22313, 29965, 437, 451, 25457, 29889, 6634, 13, 462, 4706, 376, 12148, 1207, 1854, 393, 596, 4771, 943, 526, 12231, 1891, 5149, 23157, 13, 9651, 10876, 29889, 13322, 6278, 29896, 29897, 13, 308, 13, 4706, 396, 657, 278, 931, 9500, 13, 4706, 27760, 353, 7442, 29889, 2616, 2674, 403, 29898, 4787, 29918, 11965, 18186, 29918, 12324, 29892, 2703, 2442, 29918, 1004, 294, 2955, 29918, 12324, 29892, 376, 8159, 1159, 13, 4706, 19554, 29918, 10889, 353, 27760, 29889, 1191, 3317, 580, 448, 313, 9302, 29889, 2311, 29898, 4787, 29918, 1004, 294, 2955, 29918, 12324, 29897, 448, 29871, 29896, 29897, 13, 308, 13, 4706, 396, 657, 640, 29889, 931, 9500, 13, 4706, 3064, 353, 518, 326, 29889, 303, 1160, 29889, 517, 7898, 580, 363, 527, 297, 527, 29884, 29889, 326, 29884, 1469, 29962, 13, 4706, 270, 29911, 353, 7442, 29889, 12676, 29898, 9302, 29889, 12765, 29898, 3064, 29871, 876, 13, 4706, 9500, 353, 448, 2218, 9084, 29918, 10889, 29930, 29881, 29911, 13, 308, 13, 4706, 396, 4391, 24580, 13, 4706, 565, 26952, 29901, 13, 9651, 715, 29889, 5317, 29898, 29873, 29892, 2703, 2442, 29918, 1004, 294, 2955, 29918, 12324, 29892, 3858, 543, 1004, 294, 2955, 29918, 1610, 1159, 13, 9651, 715, 29889, 5317, 29898, 29873, 29892, 2703, 2442, 29918, 11965, 18186, 29918, 12324, 29892, 3858, 543, 11965, 18186, 1159, 13, 9651, 715, 29889, 5317, 29898, 29873, 29899, 10889, 29892, 2703, 2442, 29918, 1004, 294, 2955, 29918, 12324, 29892, 3858, 543, 1004, 294, 2955, 29918, 15728, 287, 1159, 13, 9651, 715, 29889, 26172, 580, 13, 9651, 715, 29889, 3257, 703, 2481, 9500, 7536, 10656, 29899, 326, 29884, 23248, 1159, 13, 9651, 715, 29889, 4532, 580, 13, 9651, 715, 29889, 5317, 29898, 29725, 29897, 13, 9651, 715, 29889, 3257, 703, 29907, 2124, 29899, 2616, 23445, 3830, 4787, 29918, 11965, 18186, 8876, 29892, 3830, 4787, 29918, 1004, 294, 2955, 8876, 1159, 13, 9651, 715, 29889, 4294, 580, 13, 9651, 1560, 29889, 1188, 11862, 703, 2218, 9084, 931, 9500, 29901, 426, 29900, 29913, 1642, 4830, 29898, 2218, 9084, 29918, 10889, 876, 13, 9651, 1560, 29889, 1188, 11862, 703, 1285, 29889, 931, 9500, 29901, 426, 29900, 29913, 1642, 4830, 29898, 10889, 876, 13, 9651, 1560, 29889, 1188, 11862, 703, 29881, 29911, 29901, 426, 29900, 29913, 1642, 4830, 29898, 29881, 29911, 876, 13, 308, 13, 4706, 396, 8899, 278, 3064, 29882, 2027, 313, 29873, 29918, 326, 29884, 353, 260, 29918, 11108, 718, 3064, 29882, 2027, 14353, 1762, 1888, 29884, 29925, 13479, 29897, 13, 4706, 1583, 29889, 3706, 29882, 2027, 14353, 1762, 1888, 29884, 29925, 13479, 353, 9500, 13, 308, 13, 4706, 1596, 376, 29871, 5974, 9500, 10656, 304, 527, 29884, 313, 29873, 29918, 326, 29884, 353, 260, 29918, 11108, 718, 9500, 1125, 29908, 13, 4706, 1596, 1583, 29889, 3706, 29882, 2027, 14353, 1762, 1888, 29884, 29925, 13479, 13, 308, 13, 1678, 396, 24926, 263, 18593, 8536, 457, 773, 10656, 926, 267, 313, 4220, 8536, 457, 353, 323, 29918, 29893, 29890, 29897, 13, 13, 1678, 822, 2069, 29925, 852, 29903, 572, 457, 4591, 20717, 29898, 1311, 29892, 8536, 457, 7514, 29922, 29953, 29892, 18593, 29968, 1333, 29879, 5894, 11863, 29922, 29896, 29900, 29900, 29892, 931, 10302, 29925, 4676, 29922, 29900, 29889, 29900, 29906, 1125, 13, 4706, 323, 29918, 29883, 29918, 29890, 353, 1583, 29889, 29911, 29918, 1062, 29878, 28594, 29889, 29911, 580, 308, 13, 4706, 18593, 353, 289, 23579, 1475, 29889, 9851, 572, 457, 29925, 852, 29898, 23579, 457, 7514, 29892, 1560, 29889, 21281, 362, 12877, 580, 1723, 13, 462, 13, 4706, 396, 3617, 278, 1423, 261, 3377, 3064, 29889, 29871, 13, 4706, 3064, 353, 7442, 29889, 2378, 4197, 26290, 29889, 2230, 2141, 517, 7898, 580, 29974, 1311, 29889, 3706, 29882, 2027, 14353, 1762, 1888, 29884, 29925, 13479, 363, 20881, 297, 1583, 29889, 5182, 6039, 2140, 800, 29871, 2314, 259, 13, 3986, 13, 4706, 11672, 353, 7442, 29889, 5344, 4197, 18593, 29889, 3286, 5404, 1762, 23902, 345, 1917, 29898, 7442, 29889, 6333, 29898, 26290, 29889, 29911, 29918, 29873, 29918, 29883, 2141, 29911, 3285, 323, 29918, 29883, 29918, 29890, 29897, 1723, 363, 20881, 297, 1583, 29889, 5182, 6039, 2140, 800, 14664, 29911, 13, 308, 13, 4706, 565, 7442, 29889, 275, 13707, 29898, 2764, 345, 467, 1384, 7295, 13, 9651, 12020, 24875, 2392, 703, 29940, 550, 297, 11672, 1819, 1159, 13, 9651, 10876, 29889, 13322, 29898, 29900, 29897, 13, 308, 13, 4706, 396, 3462, 29871, 29906, 6923, 373, 2845, 1095, 304, 2758, 278, 8536, 457, 304, 20343, 2645, 13883, 13, 4706, 3064, 353, 7442, 29889, 29882, 1429, 3552, 3706, 29961, 29900, 29962, 448, 313, 2230, 10302, 29925, 4676, 334, 29871, 29906, 29889, 29900, 511, 3064, 29892, 3064, 14352, 29896, 29962, 718, 313, 2230, 10302, 29925, 4676, 334, 29871, 29906, 29889, 29900, 4961, 13, 4706, 11672, 353, 7442, 29889, 29882, 1429, 3552, 2764, 345, 7503, 29892, 29900, 1402, 11672, 29892, 11672, 7503, 6653, 29896, 12622, 13, 308, 13, 4706, 396, 8561, 1854, 278, 13733, 4608, 1838, 29915, 29873, 285, 3466, 13, 4706, 363, 474, 297, 3464, 29898, 29896, 29892, 2764, 345, 29889, 12181, 29961, 29896, 29962, 1125, 13, 9651, 3517, 21281, 362, 12877, 353, 11672, 29961, 29941, 29901, 29953, 29892, 29875, 29899, 29896, 29962, 13, 9651, 364, 353, 11672, 29961, 29941, 29901, 29953, 29892, 29875, 29962, 13, 9651, 10696, 353, 7442, 29889, 29880, 979, 29887, 29889, 12324, 29898, 29878, 29897, 13, 9651, 9685, 353, 364, 29914, 2521, 13, 9651, 1900, 29918, 29878, 353, 364, 13, 9651, 1900, 29918, 5721, 353, 7442, 29889, 29880, 979, 29887, 29889, 12324, 29898, 1900, 29918, 29878, 448, 3517, 21281, 362, 12877, 29897, 13, 632, 13, 9651, 363, 269, 297, 3464, 6278, 29941, 29892, 29946, 1125, 13, 18884, 29099, 353, 9685, 334, 313, 2521, 718, 5844, 29889, 1631, 334, 29871, 29906, 29889, 29900, 334, 269, 29897, 13, 18884, 1320, 353, 7442, 29889, 29880, 979, 29887, 29889, 12324, 29898, 29099, 448, 3517, 21281, 362, 12877, 1723, 13, 18884, 565, 1320, 529, 1900, 29918, 5721, 29901, 13, 462, 1678, 1900, 29918, 29878, 353, 29099, 13, 462, 1678, 1900, 29918, 5721, 353, 1320, 13, 9651, 11672, 29961, 29941, 29901, 29953, 29892, 29875, 29962, 353, 1900, 29918, 29878, 13, 632, 13, 4706, 6923, 353, 3064, 14352, 29896, 29962, 448, 3064, 29961, 29900, 29962, 13, 4706, 889, 1862, 353, 938, 29898, 14486, 29898, 23128, 334, 18593, 29968, 1333, 29879, 5894, 11863, 876, 13, 308, 13, 4706, 1596, 13, 4706, 1596, 376, 15514, 5281, 263, 18593, 8536, 457, 411, 1273, 29881, 889, 1862, 313, 29995, 29888, 889, 1862, 639, 1473, 975, 1273, 29888, 6923, 5513, 1273, 313, 889, 1862, 29892, 18593, 29968, 1333, 29879, 5894, 11863, 29892, 6923, 29897, 13, 4706, 18593, 29889, 2344, 29925, 852, 29903, 572, 457, 29903, 5510, 29898, 3706, 29892, 11672, 29892, 889, 1862, 29892, 29871, 29896, 29872, 29899, 29946, 29897, 13, 4706, 736, 18593, 13, 268, 13, 1678, 822, 788, 4002, 647, 10444, 1849, 29898, 1311, 29892, 1108, 29892, 694, 5647, 29878, 1144, 1199, 29922, 5574, 29892, 694, 2481, 7856, 26218, 29922, 5574, 29892, 2362, 295, 1312, 29894, 29918, 2972, 29918, 333, 29922, 293, 29889, 29950, 6670, 13171, 29918, 26284, 29918, 1367, 1125, 13, 4706, 396, 3462, 278, 1208, 26218, 2874, 3651, 29889, 13, 4706, 6136, 353, 451, 694, 5647, 29878, 1144, 1199, 13, 4706, 1583, 29889, 29911, 29918, 29883, 29918, 29890, 29918, 29928, 29894, 353, 263, 3670, 29889, 4300, 5404, 29928, 29894, 29898, 1311, 29889, 29911, 29918, 1062, 29878, 28594, 29892, 13733, 9966, 29922, 4925, 29892, 13962, 9966, 29922, 4925, 29897, 13, 4706, 363, 474, 297, 3464, 29898, 29900, 29892, 1583, 29889, 29911, 29918, 29883, 29918, 29890, 29918, 29928, 29894, 29889, 1949, 4002, 647, 10444, 1849, 580, 1125, 13, 9651, 1108, 29889, 1202, 4002, 647, 16174, 29898, 1311, 29889, 29911, 29918, 29883, 29918, 29890, 29918, 29928, 29894, 29889, 657, 4002, 647, 16174, 29898, 29875, 511, 2362, 295, 1312, 29894, 29918, 2972, 29918, 333, 29897, 13, 308, 13, 4706, 396, 3462, 278, 931, 9055, 2874, 2286, 29889, 13, 4706, 1583, 29889, 26065, 2481, 1762, 1888, 29884, 2481, 29928, 29894, 353, 263, 3670, 29889, 29636, 279, 29898, 29900, 29889, 29900, 29897, 13, 4706, 1583, 29889, 26065, 2481, 1762, 1888, 29884, 2481, 29928, 29894, 29889, 842, 9966, 29898, 451, 694, 2481, 7856, 26218, 1723, 13, 4706, 1108, 29889, 1202, 4002, 647, 16174, 29898, 1311, 29889, 26065, 2481, 1762, 1888, 29884, 2481, 29928, 29894, 29892, 16077, 29889, 29907, 1964, 8979, 29934, 8098, 29918, 26284, 29918, 1367, 29897, 13, 308, 13, 1678, 822, 788, 20717, 2392, 14343, 29879, 29898, 1311, 29892, 1108, 29892, 18593, 29903, 572, 457, 29928, 29894, 29892, 323, 29918, 29883, 29940, 29918, 29890, 29892, 12995, 446, 29999, 29415, 1171, 29928, 29888, 29922, 29900, 29889, 29900, 29892, 931, 10302, 29925, 4676, 29922, 29900, 29889, 29900, 1125, 13, 4706, 1596, 13, 4706, 1596, 376, 2528, 292, 10656, 1059, 4958, 21313, 29900, 1800, 1642, 4830, 29898, 1311, 29889, 24713, 29889, 13010, 29897, 13, 308, 13, 4706, 396, 18035, 2594, 13, 4706, 474, 14470, 353, 1560, 29889, 14470, 29906, 29898, 7431, 29898, 1311, 29889, 5182, 6039, 2140, 800, 29897, 1723, 13, 4706, 474, 14470, 29889, 11249, 580, 13, 13, 4706, 599, 1123, 771, 6929, 22463, 353, 1051, 580, 13, 4706, 1059, 29918, 29873, 353, 1583, 29889, 26065, 29889, 276, 771, 6929, 2392, 1542, 13, 308, 13, 4706, 363, 20881, 297, 1583, 29889, 5182, 6039, 2140, 800, 29901, 13, 9651, 396, 8878, 263, 13852, 4603, 363, 278, 931, 29889, 13, 9651, 3515, 2481, 353, 1583, 29889, 26065, 2481, 1762, 1888, 29884, 2481, 29928, 29894, 29889, 517, 10960, 580, 718, 20881, 29889, 2230, 2141, 517, 7898, 580, 718, 1583, 29889, 3706, 29882, 2027, 14353, 1762, 1888, 29884, 29925, 13479, 13, 9651, 3515, 2481, 29636, 279, 353, 3515, 2481, 29889, 517, 29636, 279, 580, 13, 632, 13, 9651, 396, 294, 591, 526, 15399, 385, 2847, 931, 9500, 5377, 278, 13883, 577, 29871, 13, 9651, 396, 705, 817, 304, 1207, 1854, 393, 591, 4555, 788, 848, 5377, 278, 8536, 457, 5023, 13, 9651, 565, 3515, 2481, 29636, 279, 5277, 18593, 29903, 572, 457, 29928, 29894, 29889, 23579, 457, 2141, 29873, 29918, 1195, 580, 470, 3515, 2481, 29636, 279, 6736, 18593, 29903, 572, 457, 29928, 29894, 29889, 23579, 457, 2141, 29873, 29918, 3317, 7295, 13, 18884, 6773, 13, 632, 13, 9651, 323, 29918, 29893, 29918, 29890, 353, 18593, 29903, 572, 457, 29928, 29894, 29889, 3286, 5404, 4178, 2481, 29898, 2557, 2481, 29892, 931, 10302, 29925, 4676, 29892, 931, 10302, 29925, 4676, 29897, 13, 9651, 323, 29918, 29890, 29918, 29893, 353, 323, 29918, 29893, 29918, 29890, 29889, 262, 3901, 580, 13, 13, 9651, 396, 1052, 26218, 3646, 1302, 4339, 304, 10656, 405, 1302, 4339, 13, 9651, 396, 29911, 29918, 29890, 29918, 29893, 29901, 515, 3186, 304, 527, 29884, 1302, 4339, 13, 9651, 396, 29911, 29918, 29883, 29940, 29918, 29890, 29901, 515, 527, 29884, 304, 10656, 405, 1302, 4339, 13, 9651, 323, 29918, 29883, 29918, 29893, 353, 323, 29918, 29883, 29940, 29918, 29890, 29871, 334, 323, 29918, 29890, 29918, 29893, 13, 632, 13, 9651, 396, 657, 278, 1967, 322, 3646, 3291, 6590, 304, 278, 3515, 13, 9651, 1967, 12521, 1089, 20325, 353, 29871, 7442, 29889, 2378, 29898, 20881, 29889, 657, 29907, 1398, 414, 2940, 4308, 580, 13742, 29911, 13, 9651, 3646, 12521, 1089, 20325, 353, 7442, 29889, 2378, 29898, 20881, 29889, 657, 29907, 1398, 414, 8667, 4308, 580, 13742, 29911, 13, 632, 13, 9651, 396, 14669, 385, 408, 5288, 3515, 313, 3179, 793, 278, 1320, 441, 291, 29897, 13, 9651, 3515, 353, 1583, 29889, 26065, 29889, 2557, 1542, 580, 13, 9651, 3515, 29889, 842, 7999, 7843, 29898, 1311, 29889, 26065, 29889, 19156, 29897, 13, 632, 13, 9651, 396, 2616, 1089, 25812, 13, 9651, 390, 353, 7442, 29889, 1032, 29872, 29898, 29906, 29897, 334, 1583, 29889, 2616, 1089, 2525, 14082, 1017, 334, 1583, 29889, 2616, 1089, 2525, 14082, 1017, 13, 9651, 2437, 29934, 353, 7442, 29889, 29880, 979, 29887, 29889, 11569, 29898, 29934, 29897, 13, 632, 13, 9651, 363, 282, 13140, 297, 3464, 29898, 29900, 29892, 3027, 12521, 1089, 20325, 29889, 12181, 29961, 29896, 29962, 1125, 13, 18884, 396, 1202, 599, 1967, 3291, 13, 18884, 413, 353, 1583, 29889, 26065, 29889, 1989, 3149, 1542, 580, 13, 18884, 413, 29889, 842, 6816, 3745, 358, 29898, 1967, 12521, 1089, 20325, 7503, 29892, 5935, 29916, 29962, 1723, 13, 18884, 413, 29889, 842, 797, 3901, 6816, 3745, 358, 29907, 586, 279, 8837, 29898, 11569, 29934, 29897, 13, 18884, 3515, 29889, 1202, 2558, 3149, 29898, 29895, 29897, 13, 632, 13, 9651, 28094, 6929, 22463, 29922, 1761, 580, 13, 9651, 363, 282, 13140, 297, 3464, 29898, 29900, 29892, 3027, 12521, 1089, 20325, 29889, 12181, 29961, 29896, 29962, 1125, 13, 18884, 396, 1202, 599, 3646, 3291, 13, 18884, 3646, 5228, 353, 7442, 29889, 7851, 29898, 3646, 12521, 1089, 20325, 29889, 3286, 4220, 580, 29961, 5935, 29916, 1402, 29871, 29941, 29892, 29871, 29896, 29897, 13, 18884, 282, 353, 323, 29918, 29883, 29918, 29893, 334, 29871, 263, 3670, 29889, 24259, 23724, 10960, 29898, 3646, 5228, 1723, 13, 795, 13, 18884, 396, 4282, 322, 9773, 278, 1059, 1840, 13, 18884, 364, 3127, 353, 1059, 29918, 29873, 29898, 2557, 29892, 282, 13140, 29892, 282, 29897, 13, 462, 13, 18884, 396, 1202, 12995, 446, 29899, 29920, 29415, 1171, 286, 29899, 342, 326, 1061, 13, 18884, 565, 12995, 446, 29999, 29415, 1171, 29928, 29888, 29958, 29900, 29889, 29900, 29901, 13, 462, 1678, 22243, 353, 263, 3670, 29889, 29933, 433, 446, 29999, 29415, 1171, 2303, 303, 326, 1061, 29898, 12995, 446, 29999, 29415, 1171, 29928, 29888, 1723, 13, 462, 1678, 364, 3127, 29889, 842, 2303, 303, 326, 1061, 15644, 29898, 29885, 342, 29897, 13, 462, 13, 18884, 1108, 29889, 1202, 2392, 14343, 29898, 2872, 29878, 29897, 259, 13, 18884, 28094, 6929, 22463, 29889, 4397, 29898, 2872, 29878, 29897, 13, 632, 13, 9651, 599, 1123, 771, 6929, 22463, 29889, 4397, 29898, 276, 771, 6929, 22463, 29897, 13, 462, 308, 13, 9651, 396, 5504, 6728, 2594, 13, 9651, 474, 14470, 29889, 11249, 580, 13, 632, 13, 4706, 1596, 6634, 29878, 29871, 25601, 426, 29900, 29913, 10656, 1059, 4958, 462, 418, 11393, 4830, 29898, 7431, 29898, 1311, 29889, 5182, 6039, 2140, 800, 29897, 1723, 9651, 13, 4706, 1583, 29889, 497, 1123, 771, 6929, 22463, 353, 599, 1123, 771, 6929, 22463, 13, 13, 29937, 18784, 310, 3949, 18464, 411, 975, 433, 3262, 1746, 310, 1776, 313, 546, 3647, 368, 5222, 1133, 274, 2232, 3734, 6824, 29897, 13, 29937, 13, 29937, 268, 317, 6073, 376, 14153, 29908, 462, 1678, 390, 29918, 29907, 29896, 29907, 29900, 2752, 29901, 334, 20227, 408, 1881, 515, 269, 12358, 29877, 1208, 747, 13, 29937, 462, 462, 462, 418, 334, 20640, 1891, 773, 269, 12358, 29877, 1059, 4958, 13, 29937, 308, 390, 29918, 29907, 29896, 29907, 29900, 29898, 29934, 29892, 29873, 29897, 259, 315, 29896, 259, 390, 29918, 29907, 29906, 29907, 29896, 29898, 29934, 29892, 29873, 29897, 1678, 315, 29906, 308, 315, 29876, 13, 29937, 315, 29900, 29871, 288, 2683, 489, 29877, 2683, 489, 29877, 1678, 2023, 1678, 288, 29871, 13, 29937, 268, 891, 13, 29937, 268, 891, 390, 29918, 29907, 29900, 29902, 313, 29934, 29892, 29873, 29897, 13, 29937, 268, 891, 13, 29937, 268, 288, 313, 7833, 29965, 29897, 13, 29937, 13, 29937, 326, 29884, 338, 817, 304, 11905, 385, 19843, 7536, 1546, 527, 29884, 322, 10656, 9704, 13, 1990, 306, 617, 20717, 14688, 7295, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 9704, 3991, 29892, 3646, 3991, 29892, 21213, 1125, 13, 13, 4706, 396, 3258, 599, 10656, 297, 278, 9704, 13, 4706, 1583, 29889, 11108, 1293, 353, 5159, 13, 4706, 363, 3949, 29940, 29878, 297, 3464, 29898, 29900, 29892, 9704, 3991, 29889, 1949, 29907, 4183, 294, 580, 1125, 13, 9651, 3949, 3991, 353, 9704, 3991, 29889, 657, 20717, 11507, 29898, 11108, 29940, 29878, 29897, 13, 9651, 8783, 353, 2069, 20717, 23544, 16390, 24541, 29898, 862, 8485, 29889, 23156, 1445, 29961, 29900, 1402, 3949, 3991, 29889, 657, 29934, 359, 7031, 293, 3285, 320, 13, 462, 462, 965, 21213, 29889, 23156, 29918, 3166, 29918, 517, 29892, 21213, 29889, 19826, 29918, 29879, 9524, 2133, 29897, 13, 632, 13, 9651, 396, 3258, 278, 10656, 13, 9651, 1583, 29889, 11108, 1293, 29889, 4397, 29898, 306, 617, 20717, 29898, 3949, 3991, 29892, 29871, 13, 462, 462, 9651, 3646, 3991, 29892, 29871, 13, 462, 462, 9651, 8783, 29892, 29871, 13, 462, 462, 9651, 396, 29965, 1896, 15084, 29892, 445, 881, 2041, 515, 278, 10656, 343, 8807, 29889, 13, 462, 462, 9651, 28094, 6929, 10142, 29922, 862, 8485, 29889, 276, 771, 6929, 29918, 3754, 29892, 29871, 13, 462, 462, 9651, 1510, 29907, 1398, 414, 29922, 862, 8485, 29889, 4294, 1062, 13857, 29892, 13, 462, 462, 9651, 1510, 1123, 20865, 29922, 862, 8485, 29889, 4294, 1062, 13857, 29892, 29871, 13, 462, 462, 9651, 1510, 6716, 14448, 29922, 862, 8485, 29889, 1062, 13857, 1655, 3262, 29897, 1723, 259, 13, 462, 13, 4706, 1583, 29889, 14153, 3991, 353, 9704, 3991, 13, 308, 13, 4706, 396, 2886, 322, 3787, 931, 1546, 937, 322, 1833, 1967, 975, 599, 3949, 18464, 13, 4706, 1583, 29889, 2886, 20717, 29164, 8357, 580, 13, 308, 13, 4706, 396, 1509, 269, 12358, 29877, 1208, 26218, 4140, 565, 694, 2362, 24210, 526, 4944, 13, 4706, 1583, 29889, 24926, 9496, 24210, 580, 13, 308, 13, 13, 1678, 822, 11905, 9496, 24210, 29898, 1311, 1125, 13, 4706, 396, 342, 6490, 2362, 5570, 7536, 565, 694, 7029, 4140, 338, 4944, 9651, 13, 4706, 363, 3949, 29940, 29878, 297, 3464, 29898, 29896, 29892, 7431, 29898, 1311, 29889, 11108, 1293, 22164, 13, 9651, 1583, 29889, 11108, 1293, 29961, 11108, 29940, 29878, 1822, 29911, 29918, 1062, 29878, 28594, 353, 1583, 29889, 14153, 3991, 29889, 657, 5647, 29878, 1144, 1199, 8897, 14353, 1762, 10605, 29898, 11108, 29940, 29878, 29897, 13, 13, 9651, 1596, 376, 9496, 5570, 1546, 3949, 29912, 29900, 29913, 322, 3949, 29912, 29896, 29913, 731, 304, 29901, 1642, 4830, 29898, 11108, 29940, 29878, 29899, 29896, 29892, 11108, 29940, 29878, 29897, 13, 9651, 1596, 376, 29911, 29922, 9162, 1583, 29889, 11108, 1293, 29961, 11108, 29940, 29878, 1822, 29911, 29918, 1062, 29878, 28594, 29889, 29911, 580, 13, 9651, 1596, 376, 9496, 5570, 29901, 9162, 7442, 29889, 29880, 979, 29887, 29889, 12324, 29898, 1311, 29889, 11108, 1293, 29961, 11108, 29940, 29878, 1822, 29911, 29918, 1062, 29878, 28594, 29889, 29873, 25739, 376, 518, 29885, 18017, 13, 1678, 13, 1678, 396, 24926, 263, 18593, 8536, 457, 363, 278, 9704, 13, 1678, 822, 11905, 29925, 852, 29903, 572, 457, 4591, 20717, 14688, 29898, 1311, 29892, 8536, 457, 7514, 29922, 29953, 29892, 18593, 29968, 1333, 29879, 5894, 11863, 29922, 29896, 29900, 29900, 29892, 931, 10302, 29925, 4676, 29922, 29900, 29889, 29900, 29906, 1125, 13, 4706, 396, 1509, 278, 1667, 10656, 363, 278, 8536, 457, 304, 11905, 278, 926, 267, 13, 4706, 736, 1583, 29889, 11108, 1293, 29961, 29900, 1822, 2344, 29925, 852, 29903, 572, 457, 4591, 20717, 29898, 23579, 457, 7514, 29892, 18593, 29968, 1333, 29879, 5894, 11863, 29892, 931, 10302, 29925, 4676, 29897, 13, 13, 1678, 396, 2886, 278, 14334, 363, 278, 937, 322, 1833, 1967, 13858, 599, 3949, 18464, 297, 278, 9704, 13, 1678, 822, 1284, 20717, 29164, 8357, 29898, 1311, 1125, 13, 4706, 260, 4763, 353, 1274, 29894, 29889, 2481, 29898, 29871, 29900, 29889, 29900, 1723, 13, 4706, 260, 5044, 353, 1274, 29894, 29889, 2481, 29898, 29871, 29900, 29889, 29900, 1723, 13, 308, 13, 4706, 363, 3949, 297, 1583, 29889, 11108, 1293, 29901, 13, 9651, 565, 7431, 29898, 11108, 29889, 5182, 6039, 2140, 800, 15410, 29900, 29901, 13, 18884, 260, 4763, 14353, 353, 3949, 29889, 5182, 6039, 2140, 800, 29961, 29900, 1822, 2230, 580, 13, 18884, 260, 5044, 14353, 259, 353, 3949, 29889, 5182, 6039, 2140, 800, 14352, 29896, 1822, 2230, 580, 13, 462, 13, 18884, 565, 260, 4763, 29889, 517, 7898, 580, 1405, 260, 4763, 14353, 29889, 517, 7898, 7295, 13, 462, 1678, 260, 4763, 353, 260, 4763, 14353, 13, 462, 268, 13, 18884, 565, 260, 5044, 14353, 29889, 517, 7898, 580, 1405, 260, 5044, 29889, 517, 7898, 7295, 13, 462, 1678, 260, 5044, 353, 260, 5044, 14353, 13, 308, 13, 4706, 1583, 29889, 2230, 4763, 353, 260, 4763, 13, 4706, 1583, 29889, 2230, 4763, 353, 260, 5044, 13, 3986, 13, 1678, 396, 2886, 29914, 842, 19843, 7536, 1546, 937, 10656, 297, 9704, 322, 1667, 22313, 29965, 313, 326, 29884, 29900, 29897, 29871, 13, 1678, 822, 1284, 25231, 29925, 13479, 20717, 14688, 1762, 1888, 29884, 29898, 1311, 29892, 527, 29884, 1125, 13, 4706, 1583, 29889, 11108, 1293, 29961, 29900, 1822, 2886, 25231, 29925, 13479, 20717, 1762, 1888, 29884, 29898, 527, 29884, 1723, 13, 13, 1678, 396, 657, 385, 2847, 12678, 310, 20953, 297, 278, 3186, 14821, 3515, 29871, 13, 1678, 822, 679, 12787, 326, 630, 29954, 5705, 537, 29898, 1311, 1125, 13, 4706, 736, 1583, 29889, 11108, 1293, 29961, 29900, 1822, 657, 12787, 326, 630, 29954, 5705, 537, 580, 13, 13, 1678, 396, 2457, 278, 2362, 5570, 13852, 515, 3949, 29909, 304, 3949, 29933, 13, 1678, 822, 679, 3591, 9496, 5570, 29898, 1311, 29892, 515, 14353, 2190, 29878, 29892, 304, 14353, 29933, 29940, 29878, 1125, 13, 4706, 396, 3286, 5404, 515, 3949, 263, 304, 289, 338, 2337, 6087, 297, 278, 298, 4087, 3553, 3949, 13, 4706, 22645, 353, 7442, 29889, 3317, 4197, 3166, 14353, 2190, 29878, 29892, 304, 14353, 29933, 29940, 29878, 2314, 13, 308, 13, 4706, 396, 657, 278, 4327, 515, 3949, 29940, 29878, 1195, 304, 3949, 29940, 29878, 3317, 13, 4706, 323, 29918, 29883, 29933, 29918, 29883, 29909, 353, 1560, 29889, 4300, 5404, 29898, 1583, 29889, 11108, 1293, 29961, 13140, 1822, 29911, 29918, 29883, 29918, 29890, 29918, 29928, 29894, 29889, 29911, 580, 1723, 13, 308, 13, 4706, 396, 657, 278, 13852, 5305, 1492, 13, 4706, 565, 515, 14353, 2190, 29878, 1405, 304, 14353, 29933, 29940, 29878, 29901, 13, 9651, 323, 29918, 29883, 29933, 29918, 29883, 29909, 353, 323, 29918, 29883, 29933, 29918, 29883, 29909, 29889, 262, 3901, 580, 13, 308, 13, 4706, 396, 15807, 403, 278, 12714, 2362, 5570, 13, 4706, 2362, 5570, 353, 7442, 29889, 29880, 979, 29887, 29889, 12324, 29898, 323, 29918, 29883, 29933, 29918, 29883, 29909, 29889, 29873, 580, 1723, 13, 268, 13, 4706, 736, 323, 29918, 29883, 29933, 29918, 29883, 29909, 29892, 2362, 5570, 13, 268, 13, 1678, 822, 679, 3591, 5323, 1181, 1888, 29884, 1762, 14353, 29898, 1311, 29892, 3949, 29940, 29878, 1125, 13, 4706, 396, 3018, 1181, 515, 527, 29884, 304, 3949, 29900, 297, 278, 9704, 13, 4706, 323, 29918, 29883, 29900, 29918, 29875, 353, 1560, 29889, 4300, 5404, 29898, 1583, 29889, 11108, 1293, 29961, 29900, 1822, 29911, 29918, 29883, 29918, 29890, 29918, 29928, 29894, 29889, 29911, 580, 1723, 13, 308, 13, 4706, 396, 1202, 599, 278, 2362, 24210, 3412, 278, 9704, 701, 304, 1749, 10656, 405, 13, 4706, 323, 29918, 29883, 29940, 29918, 326, 29884, 353, 323, 29918, 29883, 29900, 29918, 29875, 13, 308, 13, 4706, 396, 3707, 788, 599, 2362, 24210, 6257, 515, 278, 1473, 10656, 701, 304, 278, 7429, 697, 13, 4706, 363, 3949, 297, 1583, 29889, 11108, 1293, 29961, 29896, 29901, 11108, 29940, 29878, 29974, 29896, 5387, 13, 9651, 323, 29918, 29883, 29940, 11242, 29896, 29918, 29883, 29940, 353, 1560, 29889, 4300, 5404, 29898, 3949, 29889, 29911, 29918, 29883, 29918, 29890, 29918, 29928, 29894, 29889, 29911, 580, 1723, 13, 9651, 323, 29918, 29883, 29940, 29918, 326, 29884, 353, 323, 29918, 29883, 29940, 11242, 29896, 29918, 29883, 29940, 29930, 29911, 29918, 29883, 29940, 29918, 326, 29884, 13, 13, 4706, 736, 323, 29918, 29883, 29940, 29918, 326, 29884, 13, 268, 13, 1678, 822, 679, 3591, 2481, 29657, 29898, 1311, 29892, 3949, 29940, 29878, 1125, 13, 4706, 736, 1583, 29889, 11108, 1293, 29961, 11108, 29940, 29878, 1822, 26065, 2481, 1762, 1888, 29884, 2481, 29928, 29894, 29889, 517, 29636, 279, 580, 718, 1583, 29889, 11108, 1293, 29961, 11108, 29940, 29878, 1822, 3706, 29882, 2027, 14353, 1762, 1888, 29884, 29925, 13479, 29871, 13, 268, 13, 268, 13, 1678, 822, 788, 4002, 647, 10444, 1849, 29898, 1311, 29892, 1108, 29892, 694, 2481, 7856, 26218, 353, 5852, 29892, 694, 14688, 5647, 29878, 1144, 1199, 353, 5852, 1125, 13, 4706, 396, 1202, 278, 2874, 3651, 313, 29911, 29898, 29934, 29892, 29873, 29897, 669, 931, 29897, 29871, 363, 599, 9013, 8590, 950, 3949, 18464, 13, 4706, 363, 3949, 29940, 29878, 29892, 3949, 297, 26985, 29898, 1583, 29889, 11108, 1293, 29871, 1125, 13, 9651, 396, 1552, 937, 376, 6500, 5570, 29908, 14897, 338, 1546, 278, 527, 29884, 322, 3949, 29900, 13, 9651, 565, 3949, 29940, 29878, 1275, 29871, 29900, 29901, 13, 18884, 694, 5647, 29878, 1144, 1199, 353, 7700, 13, 18884, 2362, 295, 1312, 29894, 29918, 2972, 29918, 333, 353, 16077, 29889, 29907, 1964, 8979, 29934, 8098, 29918, 26284, 29918, 1367, 13, 9651, 1683, 29901, 13, 18884, 694, 5647, 29878, 1144, 1199, 353, 694, 14688, 5647, 29878, 1144, 1199, 13, 18884, 2362, 295, 1312, 29894, 29918, 2972, 29918, 333, 353, 16077, 29889, 29950, 6670, 13171, 29918, 26284, 29918, 1367, 13, 9651, 3949, 29889, 1202, 4002, 647, 10444, 1849, 29898, 17199, 29892, 694, 5647, 29878, 1144, 1199, 29892, 694, 2481, 7856, 26218, 29892, 2362, 295, 1312, 29894, 29918, 2972, 29918, 333, 29922, 6500, 295, 1312, 29894, 29918, 2972, 29918, 333, 29897, 13, 268, 13, 1678, 396, 1202, 278, 28094, 6929, 1059, 4958, 363, 599, 3949, 18464, 297, 278, 9704, 13, 1678, 822, 788, 20717, 14688, 2392, 14343, 29879, 29898, 1311, 29892, 1108, 29892, 18593, 29903, 572, 457, 29928, 29894, 29892, 12995, 446, 29999, 29415, 1171, 29928, 29888, 10457, 29896, 29892, 931, 10302, 29925, 4676, 29922, 29900, 29889, 29900, 1125, 13, 308, 13, 4706, 396, 1202, 278, 9013, 8590, 29884, 557, 1059, 4958, 363, 599, 3949, 18464, 13, 4706, 363, 3949, 29940, 29878, 29892, 3949, 297, 26985, 29898, 1311, 29889, 11108, 1293, 1125, 13, 9651, 396, 1202, 1059, 4958, 363, 278, 937, 9704, 1543, 13, 9651, 565, 3949, 29940, 29878, 1275, 29871, 29900, 29901, 13, 18884, 396, 24926, 278, 9704, 411, 937, 3949, 25261, 313, 527, 29884, 304, 3949, 29900, 29897, 13, 18884, 323, 29918, 14153, 353, 3949, 29889, 29911, 29918, 29883, 29918, 29890, 29918, 29928, 29894, 29889, 517, 10960, 580, 13, 9651, 1683, 29901, 13, 18884, 323, 29918, 14153, 353, 3949, 29889, 29911, 29918, 29883, 29918, 29890, 29918, 29928, 29894, 29889, 517, 10960, 580, 334, 323, 29918, 14153, 13, 632, 13, 9651, 396, 3166, 527, 29884, 1302, 4339, 304, 3949, 25261, 405, 1302, 4339, 313, 294, 360, 29963, 29879, 29897, 13, 9651, 323, 29918, 29883, 29940, 29918, 29890, 353, 323, 29918, 14153, 13, 632, 13, 9651, 396, 1202, 278, 1059, 4958, 13, 9651, 3949, 29889, 1202, 20717, 2392, 14343, 29879, 29898, 1108, 29892, 18593, 29903, 572, 457, 29928, 29894, 29892, 323, 29918, 29883, 29940, 29918, 29890, 29892, 12995, 446, 29999, 29415, 1171, 29928, 29888, 29892, 931, 10302, 29925, 4676, 1723, 13, 13, 29937, 7833, 29965, 13, 1990, 306, 617, 1888, 29884, 29898, 3318, 1125, 13, 268, 13, 1678, 770, 1954, 29884, 11507, 29898, 12192, 29889, 1888, 29884, 11507, 1125, 13, 4706, 822, 4770, 2344, 12035, 1311, 29892, 527, 29884, 3991, 1125, 13, 9651, 413, 29883, 29889, 1888, 29884, 11507, 17255, 2344, 12035, 1311, 29892, 15516, 5852, 29897, 13, 9651, 1583, 29889, 1272, 353, 527, 29884, 3991, 29889, 1272, 13, 9651, 1583, 29889, 1272, 3366, 4299, 3108, 353, 376, 1052, 4626, 630, 29908, 13, 13, 4706, 822, 731, 1888, 29884, 29925, 852, 29898, 1311, 29892, 323, 29918, 29875, 29918, 29890, 1125, 13, 9651, 1583, 29889, 1272, 3366, 29911, 29918, 29875, 29918, 29890, 3108, 353, 323, 29918, 29875, 29918, 29890, 29889, 25027, 391, 580, 13, 13, 4706, 822, 731, 2481, 10302, 29898, 1311, 29892, 931, 29918, 10289, 1125, 13, 9651, 1583, 29889, 1272, 3366, 2230, 29918, 10289, 3108, 353, 931, 29918, 10289, 13, 13, 4706, 822, 3402, 2568, 14927, 29898, 1311, 29892, 29536, 29892, 7442, 29918, 2378, 1125, 13, 9651, 736, 29536, 718, 851, 29898, 9302, 29889, 2378, 29918, 710, 29898, 9302, 29918, 2378, 8106, 6506, 28909, 29876, 742, 26732, 29876, 17969, 12860, 29897, 13, 13, 4706, 822, 1596, 10602, 29898, 1311, 29892, 2731, 29922, 9675, 29889, 25393, 1125, 13, 9651, 1596, 5099, 2731, 29892, 376, 29871, 8125, 29901, 426, 29900, 29913, 1642, 4830, 29898, 1311, 29889, 1272, 3366, 4299, 20068, 13, 9651, 413, 29883, 29889, 1888, 29884, 11507, 29889, 2158, 10602, 29898, 1311, 29892, 2731, 29897, 13, 9651, 1596, 5099, 2731, 29892, 376, 29871, 323, 29918, 29875, 29918, 29890, 29908, 13, 9651, 1596, 5099, 2731, 29892, 1583, 29889, 4830, 2568, 14927, 703, 1678, 9162, 7442, 29889, 2378, 29898, 1311, 29889, 1272, 3366, 29911, 29918, 29875, 29918, 29890, 3108, 876, 13, 9651, 1596, 5099, 2731, 29892, 376, 29871, 931, 9210, 411, 3390, 304, 22313, 29965, 29900, 29901, 426, 29900, 29913, 518, 29879, 29962, 1642, 4830, 29898, 1311, 29889, 1272, 3366, 2230, 29918, 10289, 20068, 13, 13, 1678, 822, 679, 1888, 29884, 3991, 29898, 1311, 1125, 13, 4706, 1583, 29889, 5504, 1888, 29884, 3991, 580, 13, 4706, 736, 1583, 29889, 326, 29884, 3991, 13, 13, 1678, 822, 2767, 1888, 29884, 3991, 29898, 1311, 1125, 13, 4706, 1583, 29889, 326, 29884, 3991, 29889, 842, 1888, 29884, 29925, 852, 29898, 3844, 29889, 4300, 5404, 29898, 3844, 29889, 29878, 29906, 339, 271, 29898, 1311, 29889, 29939, 29918, 29875, 29918, 29890, 29918, 29928, 29894, 29889, 517, 21281, 362, 14609, 25739, 320, 13, 462, 462, 462, 1678, 1583, 29889, 29878, 29918, 29890, 29918, 29928, 29894, 29889, 517, 29923, 27511, 16655, 29911, 3101, 13, 4706, 1583, 29889, 326, 29884, 3991, 29889, 842, 2481, 10302, 29898, 1311, 29889, 2230, 10302, 29897, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 527, 29884, 3991, 29892, 21213, 29892, 338, 7422, 1888, 29884, 29922, 5574, 29892, 12678, 13711, 287, 295, 388, 29922, 5574, 1125, 13, 13, 4706, 396, 4801, 837, 457, 3692, 22313, 29965, 22819, 2247, 411, 3573, 3515, 313, 1454, 2473, 29899, 7833, 29965, 731, 14340, 29897, 13, 4706, 1583, 29889, 275, 7422, 1888, 29884, 353, 338, 7422, 1888, 29884, 13, 4706, 1583, 29889, 342, 6490, 13711, 287, 295, 388, 353, 12678, 13711, 287, 295, 388, 13, 13, 4706, 396, 8899, 1881, 13, 4706, 1583, 29889, 326, 29884, 3991, 353, 1583, 29889, 1888, 29884, 11507, 29898, 326, 29884, 3991, 29897, 13, 13, 4706, 396, 1359, 8783, 13, 4706, 1583, 29889, 24713, 353, 2069, 1888, 29884, 23544, 16390, 24541, 29898, 862, 8485, 29889, 23156, 1445, 29961, 29900, 1402, 527, 29884, 3991, 29889, 657, 29934, 359, 7031, 293, 3285, 320, 13, 462, 462, 308, 21213, 29889, 23156, 29918, 3166, 29918, 517, 29892, 21213, 29889, 19826, 29918, 29879, 9524, 2133, 29897, 13, 308, 13, 4706, 396, 6112, 6765, 13, 4706, 1583, 29889, 562, 2242, 2525, 14082, 1017, 4205, 9084, 29892, 1583, 29889, 562, 2242, 17875, 29956, 2235, 29892, 1583, 29889, 562, 2242, 2525, 14082, 1017, 353, 1583, 29889, 326, 29884, 3991, 29889, 657, 7504, 7367, 8328, 9513, 6765, 580, 13, 4706, 1583, 29889, 1927, 307, 2525, 14082, 1017, 4205, 9084, 29892, 1583, 29889, 1927, 307, 17875, 29956, 2235, 29892, 1583, 29889, 1927, 307, 2525, 14082, 1017, 353, 1583, 29889, 326, 29884, 3991, 29889, 657, 29954, 29891, 307, 9513, 6765, 580, 13, 308, 13, 4706, 396, 2344, 12842, 307, 29933, 3173, 29925, 13479, 20532, 2302, 363, 16732, 4759, 6751, 565, 591, 505, 901, 1135, 29871, 29896, 20039, 353, 1405, 29896, 3949, 18464, 29897, 13, 4706, 1583, 29889, 29954, 29891, 307, 29933, 3173, 29925, 13479, 353, 7442, 29889, 2378, 4197, 29900, 29892, 29900, 29892, 29900, 2314, 13, 4706, 1583, 29889, 29954, 29891, 307, 29933, 3173, 29925, 13479, 3981, 353, 29871, 29900, 13, 308, 13, 4706, 396, 1359, 278, 527, 29884, 8783, 13, 4706, 1583, 29889, 1359, 1888, 29884, 1469, 580, 13, 13, 4706, 396, 11228, 21875, 363, 2473, 22313, 29965, 1208, 26218, 13, 4706, 1583, 29889, 29939, 29918, 29875, 29918, 29890, 29918, 29886, 13479, 353, 7442, 29889, 2378, 4197, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29896, 29889, 2314, 29871, 13, 4706, 1583, 29889, 2230, 10302, 353, 29871, 29900, 29889, 29900, 13, 308, 13, 1678, 770, 1954, 29884, 6816, 3745, 358, 29898, 3318, 1125, 13, 4706, 822, 4770, 2344, 12035, 1311, 29892, 25214, 29892, 2703, 2442, 29892, 15595, 29892, 390, 1927, 307, 29892, 390, 562, 2242, 1125, 13, 9651, 1583, 29889, 4787, 353, 2703, 2442, 13, 9651, 1583, 29889, 2312, 353, 15595, 13, 9651, 1583, 29889, 4787, 29934, 353, 390, 1927, 307, 13, 9651, 1583, 29889, 4787, 12165, 29934, 353, 7442, 29889, 29880, 979, 29887, 29889, 11569, 29898, 29934, 1927, 307, 29897, 13, 9651, 1583, 29889, 2312, 29934, 353, 390, 562, 2242, 13, 9651, 1583, 29889, 2312, 12165, 29934, 353, 7442, 29889, 29880, 979, 29887, 29889, 11569, 29898, 29934, 562, 2242, 29897, 13, 9651, 1583, 29889, 303, 1160, 353, 25214, 13, 308, 13, 1678, 822, 2254, 1888, 29884, 1469, 29898, 1311, 1125, 13, 4706, 1596, 376, 6359, 292, 22313, 29965, 848, 21313, 29900, 1800, 1642, 4830, 29898, 1311, 29889, 24713, 29889, 13010, 29897, 13, 4706, 396, 1596, 29898, 1311, 29889, 24713, 29897, 13, 4706, 396, 19012, 410, 29887, 404, 2594, 13, 4706, 474, 14470, 353, 1560, 29889, 14470, 29906, 29898, 1583, 29889, 24713, 29889, 1949, 25510, 580, 1723, 13, 4706, 474, 14470, 29889, 11249, 580, 13, 308, 13, 4706, 390, 1927, 307, 353, 7442, 29889, 1032, 29872, 29898, 29941, 29897, 334, 1583, 29889, 1927, 307, 2525, 14082, 1017, 4205, 9084, 334, 1583, 29889, 1927, 307, 2525, 14082, 1017, 4205, 9084, 13, 4706, 390, 562, 2242, 353, 7442, 29889, 1032, 29872, 29898, 29941, 29897, 334, 1583, 29889, 562, 2242, 2525, 14082, 1017, 4205, 9084, 334, 1583, 29889, 562, 2242, 2525, 14082, 1017, 4205, 9084, 13, 308, 13, 4706, 396, 2567, 1303, 278, 527, 29884, 20398, 29889, 13, 4706, 527, 29884, 353, 5159, 13, 4706, 363, 14334, 29892, 2703, 2442, 29892, 15595, 297, 1583, 29889, 24713, 29901, 13, 9651, 14334, 353, 1274, 29894, 29889, 2481, 29898, 14334, 29889, 517, 7898, 580, 1723, 29871, 13, 9651, 527, 29884, 29889, 4397, 29898, 1583, 29889, 1888, 29884, 6816, 3745, 358, 29898, 16394, 29892, 2703, 2442, 29892, 15595, 29892, 390, 1927, 307, 29892, 390, 562, 2242, 29897, 1723, 13, 9651, 474, 14470, 29889, 11249, 580, 13, 308, 13, 4706, 1583, 29889, 326, 29884, 1469, 353, 527, 29884, 13, 308, 13, 4706, 565, 7431, 29898, 1311, 29889, 326, 29884, 1469, 15410, 29896, 29901, 13, 9651, 1596, 6634, 29878, 29871, 7523, 1273, 29881, 527, 29884, 1303, 886, 975, 18695, 29896, 29888, 6923, 462, 259, 376, 320, 13, 462, 1678, 1273, 313, 2435, 29898, 326, 29884, 511, 527, 29884, 14352, 29896, 1822, 303, 1160, 29889, 517, 7898, 580, 448, 527, 29884, 29961, 29900, 1822, 303, 1160, 29889, 517, 7898, 3101, 13, 4706, 1683, 29901, 13, 9651, 1560, 29889, 1188, 29943, 2075, 703, 23323, 451, 1284, 738, 22313, 29965, 7191, 29889, 3529, 1423, 278, 8783, 23157, 13, 9651, 10876, 29889, 13322, 6278, 29896, 29897, 13, 632, 13, 632, 13, 1678, 822, 788, 4002, 647, 10444, 1849, 29898, 1311, 29892, 1108, 1125, 13, 4706, 396, 3258, 2874, 3651, 13, 4706, 1583, 29889, 1927, 307, 29933, 3173, 29928, 29894, 353, 7051, 29889, 29923, 27511, 9851, 572, 457, 4002, 647, 16174, 29898, 1583, 29889, 1927, 307, 29933, 3173, 1723, 13, 4706, 1583, 29889, 562, 2242, 29933, 3173, 29928, 29894, 353, 7051, 29889, 29923, 27511, 9851, 572, 457, 4002, 647, 16174, 29898, 1583, 29889, 562, 2242, 29933, 3173, 1723, 13, 308, 13, 4706, 16077, 29889, 1202, 29903, 572, 457, 4002, 647, 10444, 1849, 29898, 17199, 29892, 1583, 29889, 1927, 307, 29933, 3173, 29928, 29894, 29892, 731, 9966, 29922, 5574, 29892, 320, 13, 462, 462, 1678, 2318, 29918, 333, 29922, 293, 29889, 29950, 6670, 13171, 29918, 26284, 29918, 1367, 29897, 13, 4706, 16077, 29889, 1202, 29903, 572, 457, 4002, 647, 10444, 1849, 29898, 17199, 29892, 1583, 29889, 562, 2242, 29933, 3173, 29928, 29894, 29892, 731, 9966, 29922, 5574, 29892, 320, 13, 462, 462, 1678, 2318, 29918, 333, 29922, 293, 29889, 29950, 6670, 13171, 29918, 26284, 29918, 1367, 29897, 13, 13, 4706, 1583, 29889, 29939, 29918, 29875, 29918, 29890, 29918, 29928, 29894, 353, 263, 3670, 29889, 21281, 362, 2182, 25744, 291, 29928, 29894, 29898, 1311, 29889, 29939, 29918, 29875, 29918, 29890, 29918, 29886, 13479, 29897, 13, 4706, 1108, 29889, 1202, 4002, 647, 16174, 29898, 1311, 29889, 29939, 29918, 29875, 29918, 29890, 29918, 29928, 29894, 29892, 16077, 29889, 29950, 6670, 13171, 29918, 26284, 29918, 1367, 29897, 13, 4706, 1583, 29889, 29939, 29918, 29875, 29918, 29890, 29918, 29928, 29894, 29889, 842, 9966, 29898, 8824, 29897, 13, 4706, 1583, 29889, 29878, 29918, 29890, 29918, 29928, 29894, 353, 263, 3670, 29889, 29923, 27511, 5228, 29928, 29894, 29898, 9302, 29889, 2378, 4197, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 5586, 876, 13, 4706, 1108, 29889, 1202, 4002, 647, 16174, 29898, 1311, 29889, 29878, 29918, 29890, 29918, 29928, 29894, 29892, 16077, 29889, 29950, 6670, 13171, 29918, 26284, 29918, 1367, 29897, 13, 4706, 1583, 29889, 29878, 29918, 29890, 29918, 29928, 29894, 29889, 842, 9966, 29898, 8824, 29897, 13, 13, 4706, 565, 451, 1583, 29889, 275, 7422, 1888, 29884, 29901, 13, 9651, 1583, 29889, 29939, 29918, 29875, 29918, 29890, 29918, 29928, 29894, 29889, 842, 9966, 29898, 5574, 29897, 13, 9651, 1583, 29889, 29878, 29918, 29890, 29918, 29928, 29894, 29889, 842, 9966, 29898, 5574, 29897, 13, 13, 1678, 822, 788, 7504, 7367, 8328, 2392, 14343, 29879, 29898, 1311, 29892, 1108, 29892, 18593, 29903, 572, 457, 29928, 29894, 29892, 330, 29918, 29893, 29892, 286, 10142, 29922, 29900, 29889, 29900, 29892, 320, 13, 462, 462, 259, 1035, 295, 3782, 895, 17185, 29922, 29896, 29889, 29900, 1125, 13, 4706, 1596, 13, 4706, 1596, 376, 2528, 292, 15592, 8328, 1059, 4958, 21313, 29900, 1800, 1642, 4830, 29898, 1311, 29889, 24713, 29889, 13010, 29897, 13, 308, 13, 4706, 396, 18035, 2594, 13, 4706, 474, 14470, 353, 1560, 29889, 14470, 29906, 29898, 7431, 29898, 1311, 29889, 326, 29884, 1469, 29897, 1723, 13, 4706, 474, 14470, 29889, 11249, 580, 13, 308, 13, 4706, 396, 4831, 7367, 8328, 2392, 29898, 26658, 358, 29892, 29871, 2437, 29934, 29892, 29871, 315, 29918, 29890, 29918, 29893, 29892, 29871, 28178, 29918, 29893, 29892, 29871, 24003, 29892, 29871, 330, 29918, 29893, 29897, 13, 4706, 7688, 353, 29871, 29896, 29889, 29900, 29914, 562, 2242, 3782, 895, 17185, 13, 4706, 1035, 295, 22463, 353, 5159, 13, 4706, 954, 29918, 2574, 2986, 353, 29871, 29900, 13, 308, 13, 4706, 565, 286, 10142, 1405, 29871, 29900, 29889, 29900, 29901, 13, 9651, 22243, 353, 263, 3670, 29889, 29950, 11234, 2303, 303, 326, 1061, 29898, 29885, 10142, 29897, 13, 4706, 1683, 29901, 13, 9651, 22243, 353, 263, 3670, 29889, 3782, 2303, 303, 326, 1061, 580, 13, 632, 13, 4706, 363, 527, 297, 1583, 29889, 326, 29884, 1469, 29901, 13, 9651, 18883, 353, 527, 29889, 303, 1160, 29889, 517, 7898, 580, 718, 1583, 29889, 2230, 10302, 13, 9651, 565, 18883, 1405, 18593, 29903, 572, 457, 29928, 29894, 29889, 23579, 457, 2141, 29873, 29918, 1195, 580, 322, 18883, 529, 18593, 29903, 572, 457, 29928, 29894, 29889, 23579, 457, 2141, 29873, 29918, 3317, 7295, 13, 18884, 315, 29918, 29890, 29918, 29893, 353, 18593, 29903, 572, 457, 29928, 29894, 29889, 20659, 29898, 11178, 467, 262, 3901, 580, 13, 18884, 263, 29918, 29893, 353, 18593, 29903, 572, 457, 29928, 29894, 29889, 10660, 7504, 7367, 362, 29898, 11178, 29897, 13, 18884, 289, 29918, 29875, 353, 1583, 29889, 562, 2242, 29933, 3173, 29928, 29894, 29889, 517, 29923, 27511, 10960, 29898, 11178, 29892, 29900, 29897, 13, 18884, 281, 29918, 29890, 353, 18593, 29903, 572, 457, 29928, 29894, 29889, 6825, 29963, 295, 25245, 8434, 4308, 29898, 11178, 29897, 13, 18884, 281, 29918, 6333, 29918, 29890, 353, 18593, 29903, 572, 457, 29928, 29894, 29889, 6825, 7504, 7367, 362, 8434, 4308, 29898, 11178, 29897, 13, 18884, 315, 29918, 29875, 29918, 29890, 353, 1583, 29889, 29939, 29918, 29875, 29918, 29890, 29918, 29928, 29894, 29889, 517, 10960, 580, 13, 18884, 364, 29918, 29890, 353, 1583, 29889, 29878, 29918, 29890, 29918, 29928, 29894, 29889, 517, 10960, 580, 13, 18884, 263, 353, 315, 29918, 29875, 29918, 29890, 334, 313, 29907, 29918, 29890, 29918, 29893, 334, 313, 29874, 29918, 29893, 448, 330, 29918, 29893, 29897, 718, 320, 13, 462, 632, 281, 29918, 6333, 29918, 29890, 29889, 19128, 29898, 29878, 29918, 29890, 29897, 718, 281, 29918, 29890, 29889, 19128, 29898, 29893, 29918, 29890, 29889, 19128, 29898, 29878, 29918, 29890, 4961, 13, 18884, 263, 3127, 353, 413, 300, 29889, 29923, 27511, 2392, 29898, 326, 29889, 2312, 29892, 527, 29889, 2312, 12165, 29934, 334, 7688, 29892, 263, 718, 289, 29918, 29875, 29897, 13, 18884, 263, 3127, 29889, 842, 2303, 303, 326, 1061, 15644, 29898, 29885, 342, 29897, 13, 18884, 1035, 295, 22463, 29889, 4397, 29898, 29874, 3127, 29897, 13, 18884, 1108, 29889, 1202, 2392, 14343, 29898, 29874, 3127, 29897, 13, 9651, 1683, 29901, 13, 18884, 954, 29918, 2574, 2986, 353, 954, 29918, 2574, 2986, 718, 29871, 29896, 13, 13, 9651, 396, 5504, 6728, 2594, 13, 9651, 474, 14470, 29889, 11249, 580, 13, 13, 4706, 1596, 6634, 29878, 29871, 25601, 426, 29900, 29913, 310, 426, 29896, 29913, 15592, 8328, 1059, 4958, 313, 2574, 2986, 426, 29906, 29913, 714, 29899, 974, 29899, 23687, 20398, 29897, 1642, 4830, 29898, 7431, 29898, 1311, 29889, 326, 29884, 1469, 6817, 1949, 29918, 2574, 2986, 29892, 7431, 29898, 1311, 29889, 326, 29884, 1469, 511, 954, 29918, 2574, 2986, 1723, 13, 4706, 1583, 29889, 562, 2242, 22463, 353, 1035, 295, 22463, 13, 13, 1678, 822, 788, 29954, 29891, 1883, 4338, 2392, 14343, 29879, 29898, 1311, 29892, 1108, 29892, 18593, 29903, 572, 457, 29928, 29894, 29892, 286, 10142, 29922, 29900, 29889, 29900, 29892, 10966, 307, 3782, 895, 17185, 29922, 29896, 29889, 29900, 29892, 320, 13, 462, 1669, 330, 29918, 29893, 29922, 8516, 1125, 13, 4706, 1596, 13, 4706, 1596, 376, 2528, 292, 10966, 1883, 4338, 1059, 4958, 21313, 29900, 1800, 1642, 4830, 29898, 1311, 29889, 24713, 29889, 13010, 29897, 13, 308, 13, 4706, 396, 18035, 2594, 13, 4706, 474, 14470, 353, 1560, 29889, 14470, 29906, 29898, 7431, 29898, 1311, 29889, 326, 29884, 1469, 29897, 1723, 13, 4706, 474, 14470, 29889, 11249, 580, 13, 13, 4706, 954, 29918, 2574, 2986, 353, 29871, 29900, 13, 4706, 10966, 307, 22463, 353, 5159, 13, 4706, 7688, 353, 29871, 29896, 29889, 29900, 29914, 1927, 307, 3782, 895, 17185, 13, 4706, 565, 286, 10142, 1405, 29871, 29900, 29889, 29900, 29901, 13, 9651, 22243, 353, 263, 3670, 29889, 29950, 11234, 2303, 303, 326, 1061, 29898, 29885, 10142, 29897, 13, 4706, 1683, 29901, 13, 9651, 22243, 353, 263, 3670, 29889, 3782, 2303, 303, 326, 1061, 580, 13, 632, 13, 4706, 363, 527, 297, 1583, 29889, 326, 29884, 1469, 29901, 13, 9651, 18883, 353, 527, 29889, 303, 1160, 29889, 517, 7898, 580, 718, 1583, 29889, 2230, 10302, 13, 9651, 565, 18883, 1405, 18593, 29903, 572, 457, 29928, 29894, 29889, 23579, 457, 2141, 29873, 29918, 1195, 580, 322, 18883, 529, 18593, 29903, 572, 457, 29928, 29894, 29889, 23579, 457, 2141, 29873, 29918, 3317, 7295, 13, 18884, 396, 12842, 1883, 4338, 2392, 29898, 26658, 358, 29892, 2437, 29934, 29892, 6401, 29963, 295, 25245, 29892, 24003, 29897, 13, 18884, 281, 29918, 29890, 353, 18593, 29903, 572, 457, 29928, 29894, 29889, 6825, 29963, 295, 25245, 8434, 4308, 29898, 11178, 29897, 13, 18884, 289, 29918, 29875, 353, 1583, 29889, 1927, 307, 29933, 3173, 29928, 29894, 29889, 517, 29923, 27511, 10960, 29898, 11178, 29892, 29900, 29897, 13, 18884, 315, 29918, 29875, 29918, 29890, 353, 1583, 29889, 29939, 29918, 29875, 29918, 29890, 29918, 29928, 29894, 29889, 517, 10960, 580, 13, 18884, 281, 353, 315, 29918, 29875, 29918, 29890, 334, 281, 29918, 29890, 13, 18884, 330, 3127, 353, 413, 300, 29889, 29923, 27511, 2392, 29898, 326, 29889, 4787, 29892, 527, 29889, 4787, 12165, 29934, 334, 7688, 29892, 281, 718, 289, 29918, 29875, 29897, 13, 18884, 330, 3127, 29889, 842, 2303, 303, 326, 1061, 15644, 29898, 29885, 342, 29897, 13, 18884, 10966, 307, 22463, 29889, 4397, 29898, 914, 29878, 29897, 13, 18884, 1108, 29889, 1202, 2392, 14343, 29898, 914, 29878, 29897, 13, 9651, 1683, 29901, 13, 18884, 954, 29918, 2574, 2986, 353, 954, 29918, 2574, 2986, 718, 29871, 29896, 13, 13, 9651, 396, 5504, 6728, 2594, 13, 9651, 474, 14470, 29889, 11249, 580, 13, 13, 4706, 1596, 6634, 29878, 29871, 25601, 426, 29900, 29913, 310, 426, 29896, 29913, 10966, 1883, 4338, 1059, 4958, 313, 2574, 2986, 426, 29906, 29913, 714, 29899, 974, 29899, 23687, 20398, 29897, 1642, 4830, 29898, 7431, 29898, 1311, 29889, 326, 29884, 1469, 6817, 1949, 29918, 2574, 2986, 29892, 7431, 29898, 1311, 29889, 326, 29884, 1469, 511, 954, 29918, 2574, 2986, 1723, 9651, 13, 4706, 1583, 29889, 1927, 307, 22463, 353, 10966, 307, 22463, 13, 13, 1678, 822, 2069, 29933, 3173, 29903, 572, 1475, 29898, 1311, 29892, 18593, 29903, 572, 457, 29892, 8536, 457, 7514, 29892, 24003, 29968, 1333, 29879, 5894, 11863, 1125, 13, 4706, 1369, 353, 18593, 29903, 572, 457, 29889, 29873, 29918, 1195, 890, 13, 4706, 1095, 353, 18593, 29903, 572, 457, 29889, 29873, 29918, 3317, 890, 13, 4706, 6923, 353, 1095, 448, 1369, 29936, 13, 4706, 889, 1862, 353, 938, 29898, 14486, 29898, 23128, 334, 24003, 29968, 1333, 29879, 5894, 11863, 876, 13, 308, 13, 4706, 1596, 13, 4706, 1596, 376, 15514, 5281, 278, 24003, 8536, 1475, 411, 1273, 29881, 889, 1862, 29908, 1273, 313, 29895, 1333, 29879, 29897, 13, 308, 13, 4706, 396, 24926, 278, 24003, 8536, 1475, 13, 4706, 1583, 29889, 1927, 307, 29933, 3173, 353, 289, 23579, 1475, 29889, 9851, 572, 457, 29898, 23579, 457, 7514, 29897, 13, 4706, 1583, 29889, 1927, 307, 29933, 3173, 29889, 2344, 12075, 424, 29903, 572, 457, 29898, 2962, 29892, 355, 29892, 29895, 1333, 29879, 29892, 1583, 29889, 29954, 29891, 307, 29933, 3173, 29925, 13479, 1723, 13, 308, 13, 4706, 1583, 29889, 562, 2242, 29933, 3173, 353, 289, 23579, 1475, 29889, 9851, 572, 457, 29898, 23579, 457, 7514, 29897, 13, 4706, 1583, 29889, 562, 2242, 29933, 3173, 29889, 2344, 12075, 424, 29903, 572, 457, 29898, 2962, 29892, 355, 29892, 29895, 1333, 29879, 29892, 7442, 29889, 3298, 359, 29898, 29941, 876, 13, 308, 13, 1678, 822, 788, 29933, 3173, 29924, 8194, 14343, 29879, 29898, 1311, 29892, 1108, 1125, 13, 4706, 399, 1927, 307, 353, 7442, 29889, 1032, 29872, 29898, 29941, 29897, 847, 313, 1311, 29889, 1927, 307, 17875, 29956, 2235, 334, 1583, 29889, 1927, 307, 17875, 29956, 2235, 29897, 13, 4706, 399, 562, 2242, 353, 29871, 7442, 29889, 1032, 29872, 29898, 29941, 29897, 847, 313, 1311, 29889, 562, 2242, 17875, 29956, 2235, 334, 1583, 29889, 562, 2242, 17875, 29956, 2235, 29897, 13, 4706, 10966, 307, 29933, 3173, 29924, 8194, 19212, 353, 7051, 29889, 9851, 572, 457, 29923, 27511, 29924, 8194, 2392, 29898, 1311, 29889, 1927, 307, 29933, 3173, 29928, 29894, 29892, 399, 1927, 307, 29892, 29871, 29896, 29897, 13, 4706, 1108, 29889, 1202, 2392, 14343, 29898, 1927, 307, 29933, 3173, 29924, 8194, 19212, 29897, 13, 4706, 1035, 295, 29933, 3173, 29924, 8194, 19212, 353, 7051, 29889, 9851, 572, 457, 29923, 27511, 29924, 8194, 2392, 29898, 1311, 29889, 562, 2242, 29933, 3173, 29928, 29894, 29892, 399, 562, 2242, 29892, 29871, 29896, 29897, 13, 4706, 1108, 29889, 1202, 2392, 14343, 29898, 562, 2242, 29933, 3173, 29924, 8194, 19212, 29897, 13, 308, 13, 1678, 822, 679, 4300, 5404, 4591, 8434, 1762, 1888, 29884, 29898, 1311, 1125, 13, 4706, 565, 1583, 29889, 275, 7422, 1888, 29884, 29901, 13, 9651, 736, 1560, 29889, 4300, 5404, 580, 13, 4706, 736, 1560, 29889, 4300, 5404, 29898, 3844, 29889, 29878, 29906, 339, 271, 29898, 1311, 29889, 29939, 29918, 29875, 29918, 29890, 29918, 29928, 29894, 29889, 517, 21281, 362, 14609, 3101, 1919, 320, 13, 462, 462, 7442, 29889, 6333, 29898, 1311, 29889, 29939, 29918, 29875, 29918, 29890, 29918, 29928, 29894, 29889, 517, 21281, 362, 14609, 3285, 320, 13, 462, 462, 4706, 1583, 29889, 29878, 29918, 29890, 29918, 29928, 29894, 29889, 517, 29923, 27511, 22130, 13, 13, 1678, 822, 1284, 25231, 29925, 13479, 29898, 1311, 29892, 3407, 1888, 29884, 1125, 13, 4706, 1596, 13, 4706, 1596, 376, 12787, 326, 1218, 527, 29884, 29899, 326, 29884, 13733, 2847, 4140, 1213, 13, 308, 13, 4706, 396, 2048, 278, 1108, 13, 4706, 1108, 353, 263, 3670, 29889, 20624, 326, 2133, 26604, 580, 13, 13, 4706, 396, 3462, 278, 13733, 408, 2874, 2286, 13, 4706, 3855, 29918, 29875, 29918, 29890, 29918, 29928, 29894, 353, 263, 3670, 29889, 21281, 362, 2182, 25744, 291, 29928, 29894, 29898, 7442, 29889, 2378, 4197, 29900, 29889, 29900, 29892, 29871, 29900, 29889, 29900, 29892, 29871, 29900, 29889, 29900, 29892, 29871, 29896, 29889, 29900, 2314, 1723, 13, 4706, 3855, 29918, 29875, 29918, 29890, 29918, 29928, 29894, 29889, 842, 9966, 29898, 5574, 29897, 13, 4706, 1108, 29889, 1202, 4002, 647, 16174, 29898, 29939, 29918, 29875, 29918, 29890, 29918, 29928, 29894, 29897, 13, 13, 4706, 396, 3462, 8536, 457, 15783, 5731, 1288, 12885, 310, 297, 3573, 3515, 13, 4706, 1369, 2481, 353, 1583, 29889, 326, 29884, 1469, 29961, 29900, 1822, 303, 1160, 29889, 517, 7898, 580, 13, 4706, 1095, 2481, 353, 1583, 29889, 326, 29884, 1469, 14352, 29896, 1822, 303, 1160, 29889, 517, 7898, 580, 13, 4706, 889, 1862, 5894, 11863, 353, 29871, 29945, 29900, 13, 4706, 889, 1862, 353, 938, 29898, 4513, 29898, 313, 355, 2481, 448, 1369, 2481, 29897, 334, 889, 1862, 5894, 11863, 29897, 1723, 13, 13, 4706, 6401, 29963, 295, 25245, 353, 289, 23579, 1475, 29889, 9851, 572, 457, 29898, 29941, 29897, 13, 4706, 6401, 29963, 295, 25245, 29889, 2344, 12075, 424, 29903, 572, 457, 29898, 2962, 2481, 29892, 1095, 2481, 29892, 889, 1862, 29892, 7442, 29889, 2378, 4197, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 29889, 2314, 1723, 13, 4706, 6401, 29963, 295, 25245, 29928, 29894, 353, 7051, 29889, 29923, 27511, 9851, 572, 457, 4002, 647, 16174, 29898, 6825, 29963, 295, 25245, 29897, 13, 13, 4706, 363, 474, 297, 3464, 29898, 29900, 29892, 6825, 29963, 295, 25245, 29928, 29894, 29889, 1949, 4002, 647, 10444, 1849, 580, 1125, 13, 9651, 14897, 353, 6401, 29963, 295, 25245, 29928, 29894, 29889, 13892, 16174, 29898, 29875, 29897, 13, 9651, 14897, 29889, 842, 9966, 29898, 5574, 29897, 13, 9651, 1108, 29889, 1202, 4002, 647, 16174, 29898, 29881, 29894, 29897, 13, 13, 4706, 396, 3462, 4868, 3407, 10966, 307, 24003, 408, 2874, 2286, 13, 4706, 3407, 29954, 29891, 307, 29933, 3173, 29928, 29894, 353, 263, 3670, 29889, 29923, 27511, 5228, 29928, 29894, 29898, 7442, 29889, 3298, 359, 29898, 29941, 29897, 1723, 13, 4706, 3407, 29954, 29891, 307, 29933, 3173, 29928, 29894, 29889, 842, 9966, 29898, 5574, 29897, 13, 4706, 1108, 29889, 1202, 4002, 647, 16174, 29898, 5679, 29954, 29891, 307, 29933, 3173, 29928, 29894, 29897, 13, 13, 4706, 363, 527, 297, 3407, 1888, 29884, 29889, 326, 29884, 1469, 29901, 13, 9651, 18883, 353, 527, 29889, 303, 1160, 29889, 517, 7898, 580, 13, 9651, 565, 18883, 1405, 6401, 29963, 295, 25245, 29889, 29873, 29918, 1195, 580, 322, 18883, 529, 6401, 29963, 295, 25245, 29889, 29873, 29918, 3317, 7295, 308, 13, 18884, 396, 29928, 29963, 12241, 13, 18884, 24003, 353, 3407, 29954, 29891, 307, 29933, 3173, 29928, 29894, 29889, 517, 10960, 580, 1678, 13, 462, 13, 18884, 2703, 2442, 29918, 11965, 18186, 353, 6401, 29963, 295, 25245, 29928, 29894, 29889, 517, 29923, 27511, 10960, 29898, 11178, 29892, 29871, 29900, 29897, 13, 18884, 2703, 2442, 29918, 1004, 294, 2955, 353, 527, 29889, 4787, 13, 462, 13, 18884, 396, 2704, 1840, 13, 18884, 330, 3127, 353, 413, 300, 29889, 29954, 29891, 1883, 4338, 2392, 29898, 326, 29889, 4787, 29892, 527, 29889, 4787, 12165, 29934, 29892, 2703, 2442, 29918, 11965, 18186, 29892, 24003, 29897, 13, 18884, 1108, 29889, 1202, 2392, 14343, 29898, 914, 29878, 29897, 13, 632, 13, 4706, 396, 7922, 278, 13883, 29871, 13, 4706, 3987, 353, 263, 3670, 29889, 20624, 326, 3950, 29906, 5856, 580, 13, 4706, 3987, 29889, 369, 15828, 353, 7700, 13, 4706, 3987, 29889, 10660, 13296, 369, 353, 263, 3670, 29889, 7445, 1451, 6544, 3459, 12697, 3924, 13296, 369, 580, 13, 4706, 3987, 29889, 29876, 4899, 29879, 353, 29871, 29906, 13, 4706, 3987, 29889, 535, 369, 10238, 5268, 29990, 353, 29871, 29896, 29872, 29899, 29946, 13, 4706, 3987, 29889, 535, 369, 10238, 5268, 29967, 353, 29871, 29896, 13, 4706, 3987, 29889, 3317, 13463, 800, 353, 29871, 29945, 29900, 13, 13, 4706, 396, 3389, 278, 13883, 13, 4706, 5994, 3950, 353, 263, 3670, 29889, 20624, 326, 3950, 29906, 29898, 6768, 29897, 13, 4706, 5994, 3950, 29889, 842, 26604, 29898, 17199, 29897, 13, 308, 13, 4706, 1018, 29901, 13, 9651, 5994, 3950, 29889, 20640, 675, 580, 13, 4706, 5174, 29901, 13, 9651, 1560, 29889, 1188, 29943, 2075, 703, 17776, 304, 4017, 2847, 4140, 363, 278, 6198, 19843, 29991, 1159, 13, 9651, 10876, 29889, 13322, 6278, 29896, 29897, 13, 308, 13, 4706, 3407, 4920, 14977, 5981, 353, 14013, 11636, 353, 7442, 29889, 2378, 4197, 29900, 5586, 1125, 320, 13, 18884, 7442, 29889, 294, 2378, 4197, 9302, 29889, 29880, 979, 29887, 29889, 12324, 29898, 6825, 29963, 295, 25245, 29928, 29894, 29889, 517, 29923, 27511, 29898, 326, 29889, 303, 1160, 29889, 517, 7898, 580, 718, 11636, 29961, 29900, 1402, 29871, 29900, 876, 320, 13, 462, 9651, 363, 527, 297, 1583, 29889, 326, 29884, 1469, 320, 13, 462, 9651, 565, 313, 326, 29889, 303, 1160, 29889, 517, 7898, 580, 718, 11636, 29961, 29900, 29962, 1405, 6401, 29963, 295, 25245, 29889, 29873, 29918, 1195, 580, 320, 13, 462, 18884, 322, 527, 29889, 303, 1160, 29889, 517, 7898, 580, 718, 11636, 29961, 29900, 29962, 529, 6401, 29963, 295, 25245, 29889, 29873, 29918, 3317, 3101, 2314, 13, 4706, 13, 4706, 8380, 5981, 353, 14013, 11636, 353, 7442, 29889, 2378, 4197, 29900, 5586, 1125, 320, 13, 18884, 7442, 29889, 294, 2378, 4197, 9302, 29889, 29880, 979, 29887, 29889, 12324, 29898, 326, 29889, 4787, 29897, 363, 527, 297, 1583, 29889, 326, 29884, 1469, 320, 13, 462, 9651, 565, 313, 326, 29889, 303, 1160, 29889, 517, 7898, 580, 718, 11636, 29961, 29900, 29962, 1405, 6401, 29963, 295, 25245, 29889, 29873, 29918, 1195, 580, 320, 13, 462, 18884, 322, 527, 29889, 303, 1160, 29889, 517, 7898, 580, 718, 11636, 29961, 29900, 29962, 529, 6401, 29963, 295, 25245, 29889, 29873, 29918, 3317, 3101, 2314, 13, 13, 4706, 565, 7431, 29898, 5679, 4920, 14977, 5981, 3101, 1275, 29871, 29900, 470, 7431, 29898, 23552, 5981, 3101, 1275, 29871, 29900, 29901, 13, 9651, 1560, 29889, 1188, 29943, 2075, 703, 1576, 931, 20238, 310, 278, 22313, 15922, 6369, 408, 23820, 426, 29900, 29913, 322, 426, 29896, 29913, 437, 451, 25457, 29889, 6634, 13, 462, 4706, 376, 12148, 1207, 1854, 393, 278, 4771, 943, 526, 12231, 1891, 5149, 1213, 320, 13, 462, 4706, 869, 4830, 29898, 5679, 1888, 29884, 29889, 326, 29884, 3991, 29889, 657, 29934, 359, 7031, 293, 3285, 1583, 29889, 326, 29884, 3991, 29889, 657, 29934, 359, 7031, 293, 22130, 13, 9651, 10876, 29889, 13322, 6278, 29896, 29897, 13, 3986, 13, 4706, 396, 657, 278, 931, 9500, 13, 4706, 27760, 353, 7442, 29889, 2616, 2674, 403, 29898, 5679, 4920, 14977, 5981, 3285, 8380, 5981, 3285, 376, 8159, 1159, 13, 4706, 19554, 29918, 10889, 353, 27760, 29889, 1191, 3317, 580, 448, 313, 9302, 29889, 2311, 29898, 23552, 5981, 3101, 448, 29871, 29896, 29897, 13, 4706, 396, 657, 640, 29889, 931, 9500, 13, 4706, 3064, 353, 518, 326, 29889, 303, 1160, 29889, 517, 7898, 580, 363, 527, 297, 1583, 29889, 326, 29884, 1469, 29962, 13, 4706, 270, 29911, 353, 7442, 29889, 12676, 29898, 9302, 29889, 12765, 29898, 3064, 29871, 876, 13, 4706, 9500, 353, 19554, 29918, 10889, 29930, 29881, 29911, 13, 308, 13, 4706, 565, 1583, 29889, 342, 6490, 13711, 287, 295, 388, 322, 451, 1583, 29889, 275, 7422, 1888, 29884, 29901, 13, 9651, 396, 999, 457, 25406, 9210, 871, 746, 1304, 29889, 13, 9651, 12091, 6678, 353, 14013, 11636, 29901, 7442, 29889, 29880, 979, 29887, 29889, 12324, 29898, 5679, 4920, 14977, 5981, 29898, 6008, 29897, 448, 8380, 5981, 29898, 6008, 876, 1068, 29906, 13, 9651, 2143, 1312, 29918, 10889, 353, 4560, 2272, 29889, 20640, 675, 29889, 29888, 1195, 29898, 3318, 573, 6678, 29892, 7442, 29889, 2378, 4197, 10889, 11724, 4236, 1524, 29922, 29896, 29900, 29900, 9601, 29900, 29962, 13, 9651, 1583, 29889, 2230, 10302, 353, 5785, 29898, 999, 1312, 29918, 10889, 29897, 13, 13, 4706, 1596, 376, 5776, 1971, 284, 26385, 411, 3390, 304, 3407, 22313, 29965, 376, 13, 4706, 1596, 1583, 29889, 2230, 10302, 29892, 14704, 29879, 29962, 613, 4852, 29908, 565, 1583, 29889, 342, 6490, 13711, 287, 295, 388, 1683, 320, 13, 462, 462, 539, 376, 313, 1366, 9210, 338, 451, 3633, 287, 363, 297, 278, 1208, 26218, 25760, 13, 13, 4706, 396, 3462, 4868, 10966, 307, 24003, 408, 2874, 2286, 13, 4706, 10966, 307, 29933, 3173, 29928, 29894, 353, 263, 3670, 29889, 29923, 27511, 5228, 29928, 29894, 29898, 7442, 29889, 3298, 359, 29898, 29941, 29897, 1723, 13, 4706, 10966, 307, 29933, 3173, 29928, 29894, 29889, 842, 9966, 29898, 5574, 29897, 13, 4706, 1108, 29889, 1202, 4002, 647, 16174, 29898, 1927, 307, 29933, 3173, 29928, 29894, 29897, 13, 13, 4706, 363, 527, 297, 1583, 29889, 326, 29884, 1469, 29901, 13, 9651, 18883, 353, 527, 29889, 303, 1160, 29889, 517, 7898, 580, 718, 1583, 29889, 2230, 10302, 13, 9651, 565, 18883, 1405, 6401, 29963, 295, 25245, 29889, 29873, 29918, 1195, 580, 322, 18883, 529, 6401, 29963, 295, 25245, 29889, 29873, 29918, 3317, 7295, 308, 13, 18884, 396, 29928, 29963, 12241, 13, 18884, 315, 29918, 29875, 29918, 29890, 353, 3855, 29918, 29875, 29918, 29890, 29918, 29928, 29894, 29889, 517, 10960, 580, 13, 18884, 24003, 353, 10966, 307, 29933, 3173, 29928, 29894, 29889, 517, 10960, 580, 1678, 13, 462, 13, 18884, 2703, 2442, 29918, 11965, 18186, 353, 315, 29918, 29875, 29918, 29890, 334, 6401, 29963, 295, 25245, 29928, 29894, 29889, 517, 29923, 27511, 10960, 29898, 11178, 29892, 29871, 29900, 29897, 13, 18884, 2703, 2442, 29918, 1004, 294, 2955, 353, 527, 29889, 4787, 13, 462, 13, 18884, 396, 2704, 1840, 13, 18884, 330, 3127, 353, 413, 300, 29889, 29954, 29891, 1883, 4338, 2392, 29898, 326, 29889, 4787, 29892, 527, 29889, 4787, 12165, 29934, 29892, 2703, 2442, 29918, 11965, 18186, 29892, 24003, 29897, 13, 18884, 1108, 29889, 1202, 2392, 14343, 29898, 914, 29878, 29897, 13, 13, 4706, 396, 657, 278, 7536, 13, 4706, 1018, 29901, 13, 9651, 5994, 3950, 29889, 20640, 675, 580, 13, 4706, 5174, 29901, 13, 9651, 1560, 29889, 1188, 29943, 2075, 703, 17776, 304, 4017, 2847, 4140, 363, 278, 6198, 19843, 29991, 1159, 13, 9651, 10876, 29889, 13322, 6278, 29896, 29897, 13, 13, 4706, 1596, 376, 12787, 326, 630, 527, 29884, 304, 3407, 527, 29884, 9664, 362, 29901, 376, 13, 4706, 1596, 3855, 29918, 29875, 29918, 29890, 29918, 29928, 29894, 29889, 517, 21281, 362, 14609, 580, 13, 13, 4706, 1583, 29889, 29939, 29918, 29875, 29918, 29890, 29918, 29886, 13479, 353, 1560, 29889, 29878, 29906, 339, 271, 29898, 29939, 29918, 29875, 29918, 29890, 29918, 29928, 29894, 29889, 517, 21281, 362, 14609, 3101, 13, 13, 29937, 29931, 333, 279, 13, 1990, 306, 617, 29931, 333, 279, 29898, 3318, 1125, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 1125, 13, 418, 13, 4706, 1583, 29889, 1359, 29931, 333, 279, 1469, 580, 13, 4706, 1583, 29889, 5182, 6039, 2140, 800, 353, 5159, 13, 4706, 1583, 29889, 3706, 29882, 2027, 29931, 333, 279, 1762, 1888, 29884, 29925, 13479, 353, 29871, 29900, 29889, 29900, 13, 308, 13, 1678, 770, 365, 333, 279, 6816, 3745, 358, 29898, 3318, 1125, 13, 4706, 822, 4770, 2344, 12035, 1311, 29892, 25214, 29892, 9649, 1125, 13, 9651, 1583, 29889, 2003, 353, 9649, 13, 9651, 1583, 29889, 303, 1160, 353, 25214, 13, 308, 13, 1678, 822, 2254, 29931, 333, 279, 1469, 29898, 1311, 1125, 13, 4706, 396, 1596, 376, 6359, 292, 365, 333, 279, 848, 21313, 29900, 1800, 1642, 4830, 29898, 1311, 29889, 24713, 29889, 13010, 29897, 13, 4706, 365, 333, 279, 353, 5159, 13, 4706, 411, 1722, 11974, 5184, 29914, 4419, 29653, 29914, 11311, 4626, 29914, 4220, 29931, 333, 279, 29889, 3945, 613, 376, 29878, 1159, 408, 285, 29901, 13, 9651, 363, 1196, 297, 285, 29889, 949, 9012, 7295, 259, 13, 18884, 1196, 353, 1196, 29889, 17010, 28909, 29876, 1495, 13, 18884, 1196, 353, 1196, 29889, 5451, 877, 25710, 13, 18884, 325, 29922, 9302, 29889, 2378, 4197, 7411, 29898, 1220, 29961, 29896, 11724, 7411, 29898, 1220, 29961, 29906, 11724, 7411, 29898, 1220, 29961, 29941, 11724, 7411, 29898, 1220, 29961, 29946, 11724, 7411, 29898, 1220, 29961, 29945, 11724, 7411, 29898, 1220, 29961, 29953, 2314, 2314, 13, 18884, 396, 1596, 29898, 29894, 29897, 13, 18884, 365, 333, 279, 29889, 4397, 29898, 1311, 29889, 29931, 333, 279, 6816, 3745, 358, 29898, 1220, 29961, 29900, 1402, 325, 29897, 1723, 13, 13, 4706, 1583, 29889, 29931, 333, 279, 1469, 353, 365, 333, 279, 13, 308, 13, 4706, 565, 7431, 29898, 1311, 29889, 29931, 333, 279, 1469, 15410, 29896, 29901, 13, 9651, 1596, 6634, 29878, 29871, 7523, 1273, 29881, 365, 333, 279, 1303, 886, 975, 18695, 29896, 29888, 6923, 462, 259, 376, 320, 13, 462, 1678, 1273, 313, 2435, 29898, 29931, 333, 279, 511, 5785, 29898, 29931, 333, 279, 14352, 29896, 1822, 303, 1160, 29897, 448, 5785, 29898, 29931, 333, 279, 29961, 29900, 1822, 303, 1160, 876, 13, 4706, 1683, 29901, 13, 9651, 1560, 29889, 1188, 29943, 2075, 703, 23323, 451, 1284, 738, 365, 333, 279, 7191, 29889, 3529, 1423, 278, 8783, 23157, 13, 9651, 10876, 29889, 13322, 6278, 29896, 29897, 13, 632, 13, 4706, 396, 342, 326, 1078, 278, 3064, 29882, 2027, 1546, 278, 2996, 279, 294, 322, 278, 527, 29884, 773, 263, 4891, 2616, 23445, 2948, 13, 1678, 396, 13, 1678, 396, 9961, 496, 29901, 6401, 19257, 526, 4868, 373, 263, 4343, 3573, 7417, 310, 4423, 13, 1678, 396, 3986, 773, 871, 278, 6056, 310, 278, 10966, 307, 14391, 322, 10241, 393, 278, 4768, 2129, 526, 2319, 13, 1678, 396, 3986, 591, 508, 12678, 278, 3064, 29882, 2027, 1546, 278, 3949, 18464, 322, 278, 527, 29884, 491, 25202, 13, 1678, 396, 3986, 278, 6401, 19257, 310, 278, 3949, 18464, 491, 28221, 263, 8536, 457, 322, 6161, 1218, 278, 25748, 13, 1678, 396, 3986, 769, 20602, 278, 4891, 8855, 1218, 1546, 278, 376, 11965, 18186, 29908, 6401, 19257, 313, 26065, 29897, 13, 1678, 396, 3986, 322, 527, 29884, 29892, 278, 7472, 16161, 304, 278, 3064, 29882, 2027, 856, 13, 1678, 396, 3986, 297, 263, 2446, 4331, 591, 508, 671, 278, 931, 9500, 304, 12678, 278, 13733, 1546, 10656, 322, 527, 29884, 13, 1678, 822, 1284, 29164, 29882, 2027, 20717, 1888, 29884, 29925, 13479, 29898, 1311, 29892, 527, 29884, 29892, 26952, 29922, 8824, 1125, 13, 4706, 1596, 376, 12787, 326, 1218, 931, 9500, 17343, 279, 304, 527, 29884, 6160, 13, 308, 13, 4706, 396, 9202, 263, 8536, 457, 304, 278, 10656, 13917, 13, 4706, 18593, 29903, 572, 457, 353, 1583, 29889, 2344, 29925, 852, 29903, 572, 457, 4591, 29931, 333, 279, 29898, 931, 10302, 29925, 4676, 29922, 29900, 29889, 29900, 1723, 13, 308, 13, 4706, 396, 27711, 931, 9500, 7536, 29871, 13, 4706, 260, 29922, 2636, 13, 4706, 2703, 2442, 29918, 1004, 294, 2955, 29918, 12324, 353, 5159, 13, 4706, 2703, 2442, 29918, 11965, 18186, 29918, 12324, 353, 5159, 13, 13, 4706, 363, 527, 297, 527, 29884, 29889, 326, 29884, 1469, 29901, 13, 9651, 18883, 353, 527, 29889, 303, 1160, 29889, 517, 7898, 580, 13, 9651, 565, 18883, 1405, 18593, 29903, 572, 457, 29889, 29873, 29918, 1195, 580, 322, 18883, 529, 18593, 29903, 572, 457, 29889, 29873, 29918, 3317, 7295, 13, 18884, 396, 657, 527, 29884, 20398, 322, 8536, 457, 515, 10656, 13, 18884, 2703, 2442, 29918, 1004, 294, 2955, 353, 527, 29889, 4787, 13, 18884, 396, 17343, 279, 13, 18884, 2703, 2442, 29918, 11965, 18186, 353, 263, 3670, 29889, 29923, 27511, 10960, 29898, 7442, 29889, 5344, 29898, 18593, 29903, 572, 457, 29889, 6825, 29963, 295, 25245, 8434, 4308, 29898, 18883, 1723, 13742, 3286, 4220, 580, 1723, 13, 13, 18884, 396, 28667, 6056, 13, 18884, 260, 353, 7442, 29889, 29882, 1429, 29898, 313, 29873, 29892, 18883, 29897, 1723, 13, 18884, 2703, 2442, 29918, 1004, 294, 2955, 29918, 12324, 353, 7442, 29889, 29882, 1429, 29898, 313, 4787, 29918, 1004, 294, 2955, 29918, 12324, 29892, 7442, 29889, 29880, 979, 29887, 29889, 12324, 29898, 2703, 2442, 29918, 1004, 294, 2955, 1723, 29871, 876, 13, 18884, 2703, 2442, 29918, 11965, 18186, 29918, 12324, 353, 7442, 29889, 29882, 1429, 29898, 313, 4787, 29918, 11965, 18186, 29918, 12324, 29892, 7442, 29889, 29880, 979, 29887, 29889, 12324, 29898, 2703, 2442, 29918, 11965, 18186, 29889, 517, 29923, 27511, 580, 29871, 876, 1723, 13, 4706, 1596, 29898, 2435, 29898, 4787, 29918, 11965, 18186, 29918, 12324, 876, 13, 4706, 1596, 29898, 2435, 29898, 4787, 29918, 1004, 294, 2955, 29918, 12324, 876, 13, 4706, 565, 7431, 29898, 4787, 29918, 11965, 18186, 29918, 12324, 29897, 1275, 29871, 29900, 470, 7431, 29898, 4787, 29918, 1004, 294, 2955, 29918, 12324, 29897, 1275, 29871, 29900, 29901, 13, 9651, 1560, 29889, 1188, 29943, 2075, 703, 1576, 931, 20238, 310, 278, 365, 333, 279, 322, 22313, 29965, 437, 451, 25457, 29889, 6634, 13, 462, 4706, 376, 12148, 1207, 1854, 393, 596, 4771, 943, 526, 12231, 1891, 5149, 23157, 13, 9651, 10876, 29889, 13322, 6278, 29896, 29897, 13, 308, 13, 4706, 396, 657, 278, 931, 9500, 13, 4706, 27760, 353, 7442, 29889, 2616, 2674, 403, 29898, 4787, 29918, 11965, 18186, 29918, 12324, 29892, 2703, 2442, 29918, 1004, 294, 2955, 29918, 12324, 29892, 376, 8159, 1159, 13, 4706, 19554, 29918, 10889, 353, 27760, 29889, 1191, 3317, 580, 448, 313, 9302, 29889, 2311, 29898, 4787, 29918, 1004, 294, 2955, 29918, 12324, 29897, 448, 29871, 29896, 29897, 13, 308, 13, 4706, 396, 657, 640, 29889, 931, 9500, 13, 4706, 3064, 353, 518, 326, 29889, 303, 1160, 29889, 517, 7898, 580, 363, 527, 297, 527, 29884, 29889, 326, 29884, 1469, 29962, 13, 4706, 270, 29911, 353, 7442, 29889, 12676, 29898, 9302, 29889, 12765, 29898, 3064, 29871, 876, 13, 4706, 9500, 353, 448, 2218, 9084, 29918, 10889, 29930, 29881, 29911, 13, 308, 13, 4706, 396, 4391, 24580, 13, 4706, 1317, 5317, 353, 5852, 13, 4706, 565, 1317, 5317, 29901, 13, 9651, 715, 29889, 5317, 29898, 29873, 29892, 2703, 2442, 29918, 1004, 294, 2955, 29918, 12324, 29892, 3858, 543, 1004, 294, 2955, 29918, 1610, 1159, 13, 9651, 715, 29889, 5317, 29898, 29873, 29892, 2703, 2442, 29918, 11965, 18186, 29918, 12324, 29892, 3858, 543, 11965, 18186, 1159, 13, 9651, 715, 29889, 5317, 29898, 29873, 29899, 10889, 29892, 2703, 2442, 29918, 1004, 294, 2955, 29918, 12324, 29892, 3858, 543, 1004, 294, 2955, 29918, 15728, 287, 1159, 13, 9651, 715, 29889, 26172, 580, 13, 9651, 715, 29889, 3257, 703, 2481, 9500, 7536, 10656, 29899, 326, 29884, 23248, 1159, 13, 9651, 715, 29889, 4532, 580, 13, 9651, 715, 29889, 5317, 29898, 29725, 29897, 13, 9651, 715, 29889, 3257, 703, 29907, 2124, 29899, 2616, 23445, 3830, 4787, 29918, 11965, 18186, 8876, 29892, 3830, 4787, 29918, 1004, 294, 2955, 8876, 1159, 13, 9651, 715, 29889, 4294, 580, 13, 9651, 1560, 29889, 1188, 11862, 703, 2218, 9084, 931, 9500, 29901, 426, 29900, 29913, 1642, 4830, 29898, 2218, 9084, 29918, 10889, 876, 13, 9651, 1560, 29889, 1188, 11862, 703, 1285, 29889, 931, 9500, 29901, 426, 29900, 29913, 1642, 4830, 29898, 10889, 876, 13, 9651, 1560, 29889, 1188, 11862, 703, 29881, 29911, 29901, 426, 29900, 29913, 1642, 4830, 29898, 29881, 29911, 876, 13, 308, 13, 4706, 396, 8899, 278, 3064, 29882, 2027, 313, 29873, 29918, 326, 29884, 353, 260, 29918, 11108, 718, 3064, 29882, 2027, 29931, 333, 279, 1762, 1888, 29884, 29925, 13479, 29897, 13, 4706, 1583, 29889, 3706, 29882, 2027, 29931, 333, 279, 1762, 1888, 29884, 29925, 13479, 353, 9500, 13, 308, 13, 4706, 1596, 376, 29871, 5974, 9500, 365, 333, 279, 304, 527, 29884, 313, 29873, 29918, 326, 29884, 353, 260, 29918, 29880, 333, 279, 718, 9500, 1125, 29908, 13, 4706, 1596, 1583, 29889, 3706, 29882, 2027, 29931, 333, 279, 1762, 1888, 29884, 29925, 13479, 13, 268, 13, 1678, 396, 24926, 263, 18593, 8536, 457, 773, 10656, 926, 267, 313, 4220, 8536, 457, 353, 323, 29918, 29893, 29890, 29897, 13, 268, 13, 1678, 822, 2069, 29925, 852, 29903, 572, 457, 4591, 29931, 333, 279, 29898, 1311, 29892, 8536, 457, 7514, 29922, 29953, 29892, 18593, 29968, 1333, 29879, 5894, 11863, 29922, 29896, 29900, 29900, 29892, 931, 10302, 29925, 4676, 29922, 29900, 29889, 29900, 29906, 1125, 13, 4706, 396, 323, 29918, 29883, 29918, 29890, 353, 1583, 29889, 29911, 29918, 1062, 29878, 28594, 29889, 29911, 580, 4706, 13, 4706, 18593, 353, 289, 23579, 1475, 29889, 9851, 572, 457, 29925, 852, 29898, 23579, 457, 7514, 29892, 1560, 29889, 21281, 362, 12877, 3101, 13, 4706, 1583, 29889, 5182, 6039, 2140, 800, 353, 1583, 29889, 29931, 333, 279, 1469, 13, 4706, 396, 3617, 278, 1423, 261, 3377, 3064, 29889, 13, 4706, 3064, 353, 7442, 29889, 2378, 4197, 7411, 29898, 26290, 29889, 303, 1160, 7240, 1311, 29889, 3706, 29882, 2027, 29931, 333, 279, 1762, 1888, 29884, 29925, 13479, 363, 20881, 297, 1583, 29889, 5182, 6039, 2140, 800, 29871, 2314, 259, 13, 4706, 396, 1577, 8773, 3692, 671, 260, 29918, 29883, 29918, 29890, 13, 4706, 396, 11672, 353, 7442, 29889, 5344, 4197, 18593, 29889, 3706, 29882, 2027, 29931, 333, 279, 1762, 1888, 29884, 29925, 13479, 29898, 7442, 29889, 6333, 29898, 26290, 29961, 29896, 1402, 323, 29918, 29883, 29918, 29890, 29897, 1723, 363, 20881, 297, 1583, 29889, 5182, 6039, 2140, 800, 14664, 29911, 13, 4706, 11672, 353, 7442, 29889, 5344, 4197, 20881, 29889, 2003, 363, 20881, 297, 1583, 29889, 5182, 6039, 2140, 800, 14664, 29911, 13, 13, 4706, 565, 7442, 29889, 275, 13707, 29898, 2764, 345, 467, 1384, 7295, 13, 9651, 12020, 24875, 2392, 703, 29940, 550, 297, 11672, 1819, 1159, 13, 9651, 10876, 29889, 13322, 29898, 29900, 29897, 13, 308, 13, 4706, 396, 3462, 29871, 29906, 6923, 373, 2845, 1095, 304, 2758, 278, 8536, 457, 304, 20343, 2645, 13883, 13, 4706, 3064, 353, 7442, 29889, 29882, 1429, 3552, 3706, 29961, 29900, 29962, 448, 313, 2230, 10302, 29925, 4676, 334, 29871, 29906, 29889, 29900, 511, 3064, 29892, 3064, 14352, 29896, 29962, 718, 313, 2230, 10302, 29925, 4676, 334, 29871, 29906, 29889, 29900, 4961, 13, 4706, 11672, 353, 7442, 29889, 29882, 1429, 3552, 2764, 345, 7503, 29892, 29900, 1402, 11672, 29892, 11672, 7503, 6653, 29896, 12622, 13, 4706, 396, 1596, 29898, 2764, 345, 29897, 13, 308, 13, 4706, 396, 8561, 1854, 278, 13733, 4608, 1838, 29915, 29873, 285, 3466, 13, 4706, 363, 474, 297, 3464, 29898, 29906, 29892, 2764, 345, 29889, 12181, 29961, 29896, 29962, 1125, 13, 9651, 396, 1596, 29898, 29875, 29897, 13, 9651, 3517, 21281, 362, 12877, 353, 11672, 29961, 29941, 29901, 29953, 29892, 29875, 29899, 29896, 29962, 13, 9651, 364, 353, 11672, 29961, 29941, 29901, 29953, 29892, 29875, 29962, 13, 9651, 10696, 353, 7442, 29889, 29880, 979, 29887, 29889, 12324, 29898, 29878, 29897, 13, 9651, 396, 1596, 29898, 29878, 29897, 13, 9651, 396, 1596, 29898, 2521, 29897, 13, 9651, 9685, 353, 364, 29914, 2521, 13, 9651, 1900, 29918, 29878, 353, 364, 13, 9651, 1900, 29918, 5721, 353, 7442, 29889, 29880, 979, 29887, 29889, 12324, 29898, 1900, 29918, 29878, 448, 3517, 21281, 362, 12877, 29897, 13, 632, 13, 9651, 363, 269, 297, 3464, 6278, 29941, 29892, 29946, 1125, 13, 18884, 29099, 353, 9685, 334, 313, 2521, 718, 5844, 29889, 1631, 334, 29871, 29906, 29889, 29900, 334, 269, 29897, 13, 18884, 1320, 353, 7442, 29889, 29880, 979, 29887, 29889, 12324, 29898, 29099, 448, 3517, 21281, 362, 12877, 1723, 13, 18884, 565, 1320, 529, 1900, 29918, 5721, 29901, 13, 462, 1678, 1900, 29918, 29878, 353, 29099, 13, 462, 1678, 1900, 29918, 5721, 353, 1320, 13, 9651, 11672, 29961, 29941, 29901, 29953, 29892, 29875, 29962, 353, 1900, 29918, 29878, 13, 632, 13, 4706, 6923, 353, 3064, 14352, 29896, 29962, 448, 3064, 29961, 29900, 29962, 13, 4706, 889, 1862, 353, 938, 29898, 14486, 29898, 23128, 334, 18593, 29968, 1333, 29879, 5894, 11863, 876, 13, 308, 13, 4706, 1596, 13, 4706, 1596, 376, 15514, 5281, 263, 18593, 8536, 457, 411, 1273, 29881, 889, 1862, 313, 29995, 29888, 889, 1862, 639, 1473, 975, 1273, 29888, 6923, 5513, 1273, 313, 889, 1862, 29892, 18593, 29968, 1333, 29879, 5894, 11863, 29892, 6923, 29897, 13, 4706, 18593, 29889, 2344, 29925, 852, 29903, 572, 457, 29903, 5510, 29898, 3706, 29892, 11672, 29892, 889, 1862, 29892, 29871, 29896, 29872, 29899, 29946, 29897, 13, 4706, 736, 18593, 13, 268, 13, 268, 13, 308, 13, 1990, 306, 617, 4421, 7943, 29924, 275, 13671, 1888, 29884, 29898, 29902, 617, 1888, 29884, 1125, 13, 13, 1678, 770, 1954, 29884, 11507, 29898, 29902, 617, 1888, 29884, 29889, 1888, 29884, 11507, 1125, 13, 4706, 822, 4770, 2344, 12035, 1311, 29892, 527, 29884, 3991, 1125, 13, 9651, 306, 617, 1888, 29884, 29889, 1888, 29884, 11507, 17255, 2344, 12035, 1311, 29892, 527, 29884, 3991, 29897, 13, 9651, 1583, 29889, 1272, 353, 527, 29884, 3991, 29889, 1272, 13, 9651, 1583, 29889, 1272, 3366, 4299, 3108, 353, 376, 7052, 29899, 26737, 2520, 358, 29908, 13, 13, 4706, 822, 1596, 10602, 29898, 1311, 29892, 2731, 29922, 9675, 29889, 25393, 1125, 13, 9651, 306, 617, 1888, 29884, 29889, 1888, 29884, 11507, 29889, 2158, 10602, 29898, 1311, 29892, 2731, 29897, 13, 9651, 1596, 5099, 2731, 29892, 376, 29871, 12842, 1883, 4338, 29901, 376, 13, 9651, 1596, 5099, 2731, 29892, 376, 1678, 341, 6160, 13, 9651, 1596, 5099, 2731, 29892, 1583, 29889, 4830, 2568, 14927, 703, 418, 9162, 7442, 29889, 2378, 29898, 1311, 29889, 1272, 3366, 1927, 307, 21785, 267, 3108, 3366, 29924, 3108, 876, 13, 9651, 1596, 5099, 2731, 29892, 376, 1678, 319, 17288, 3665, 29914, 29879, 6802, 29898, 29885, 29914, 29879, 29985, 29906, 4638, 6160, 13, 9651, 1596, 5099, 2731, 29892, 1583, 29889, 4830, 2568, 14927, 703, 418, 9162, 7442, 29889, 2378, 29898, 1311, 29889, 1272, 3366, 1927, 307, 21785, 267, 3108, 3366, 29909, 3108, 876, 13, 9651, 1596, 5099, 2731, 29892, 376, 1678, 315, 29918, 1927, 307, 29918, 29875, 6160, 13, 9651, 1596, 5099, 2731, 29892, 1583, 29889, 4830, 2568, 14927, 703, 418, 9162, 7442, 29889, 2378, 29898, 1311, 29889, 1272, 3366, 1927, 307, 21785, 267, 3108, 3366, 29907, 29918, 1927, 307, 29918, 29875, 3108, 876, 13, 9651, 1596, 5099, 2731, 29892, 376, 29871, 4831, 7367, 8328, 29901, 376, 13, 9651, 1596, 5099, 2731, 29892, 376, 1678, 341, 6160, 13, 9651, 1596, 5099, 2731, 29892, 1583, 29889, 4830, 2568, 14927, 703, 418, 9162, 7442, 29889, 2378, 29898, 1311, 29889, 1272, 3366, 562, 2242, 261, 290, 2699, 3108, 3366, 29924, 3108, 876, 13, 13, 4706, 822, 731, 797, 509, 275, 1199, 29924, 8141, 1575, 29898, 1311, 29892, 341, 29918, 562, 2242, 29892, 315, 29918, 1927, 307, 29918, 29875, 29892, 341, 29918, 1927, 307, 29892, 3219, 29918, 1927, 307, 1125, 13, 9651, 1583, 29889, 1272, 3366, 562, 2242, 261, 290, 2699, 3108, 353, 9657, 580, 13, 9651, 1583, 29889, 1272, 3366, 562, 2242, 261, 290, 2699, 3108, 3366, 29924, 3108, 353, 341, 29918, 562, 2242, 29889, 25027, 391, 580, 13, 9651, 1583, 29889, 1272, 3366, 1927, 307, 21785, 267, 3108, 353, 9657, 580, 13, 9651, 1583, 29889, 1272, 3366, 1927, 307, 21785, 267, 3108, 3366, 29924, 3108, 353, 341, 29918, 1927, 307, 29889, 25027, 391, 580, 13, 9651, 1583, 29889, 1272, 3366, 1927, 307, 21785, 267, 3108, 3366, 29909, 3108, 353, 3219, 29918, 1927, 307, 29889, 25027, 391, 580, 13, 9651, 1583, 29889, 1272, 3366, 1927, 307, 21785, 267, 3108, 3366, 29907, 29918, 1927, 307, 29918, 29875, 3108, 353, 315, 29918, 1927, 307, 29918, 29875, 29889, 25027, 391, 580, 13, 13, 1678, 822, 2767, 1888, 29884, 3991, 29898, 1311, 1125, 13, 4706, 306, 617, 1888, 29884, 29889, 5504, 1888, 29884, 3991, 29898, 1311, 29897, 13, 4706, 1583, 29889, 326, 29884, 3991, 29889, 842, 797, 509, 275, 1199, 29924, 8141, 1575, 29898, 1311, 29889, 29924, 29918, 562, 2242, 29918, 29928, 29894, 29889, 517, 14609, 29941, 29916, 29941, 3285, 320, 13, 462, 462, 9651, 1583, 29889, 29939, 29918, 1927, 307, 29918, 29875, 29918, 29928, 29894, 29889, 517, 21281, 362, 14609, 3285, 320, 13, 462, 462, 9651, 1583, 29889, 29924, 29918, 1927, 307, 29918, 29928, 29894, 29889, 517, 14609, 29941, 29916, 29941, 3285, 320, 13, 462, 462, 9651, 1583, 29889, 29924, 29918, 562, 2242, 29918, 1927, 307, 29918, 29928, 29894, 29889, 517, 14609, 29941, 29916, 29941, 3101, 13, 308, 13, 1678, 822, 788, 4002, 647, 10444, 1849, 29898, 1311, 29892, 1108, 1125, 13, 4706, 306, 617, 1888, 29884, 29889, 1202, 4002, 647, 10444, 1849, 29898, 1311, 29892, 1108, 29897, 13, 13, 4706, 1583, 29889, 29939, 29918, 1927, 307, 29918, 29875, 29918, 29928, 29894, 353, 263, 3670, 29889, 21281, 362, 2182, 25744, 291, 29928, 29894, 29898, 9302, 29889, 2378, 4197, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29896, 5586, 876, 13, 4706, 1108, 29889, 1202, 4002, 647, 16174, 29898, 1311, 29889, 29939, 29918, 1927, 307, 29918, 29875, 29918, 29928, 29894, 29892, 16077, 29889, 29950, 6670, 13171, 29918, 26284, 29918, 1367, 29897, 13, 4706, 1583, 29889, 29939, 29918, 1927, 307, 29918, 29875, 29918, 29928, 29894, 29889, 842, 9966, 29898, 5574, 29897, 13, 13, 4706, 1583, 29889, 29924, 29918, 562, 2242, 29918, 29928, 29894, 353, 263, 3670, 29889, 14609, 16616, 29928, 29894, 29898, 9302, 29889, 1032, 29872, 29898, 29941, 511, 7442, 29889, 2378, 4197, 29961, 29896, 29892, 29871, 29900, 29892, 29871, 29900, 16272, 29896, 29892, 29871, 29896, 29892, 29871, 29900, 16272, 29896, 29892, 29871, 29896, 29892, 29871, 29896, 20526, 320, 13, 462, 462, 462, 462, 26688, 29922, 524, 876, 13, 4706, 1108, 29889, 1202, 4002, 647, 16174, 29898, 1311, 29889, 29924, 29918, 562, 2242, 29918, 29928, 29894, 29892, 16077, 29889, 29950, 6670, 13171, 29918, 26284, 29918, 1367, 29897, 13, 4706, 1583, 29889, 29924, 29918, 562, 2242, 29918, 29928, 29894, 29889, 842, 9966, 29898, 5574, 29897, 13, 308, 13, 4706, 1583, 29889, 29924, 29918, 1927, 307, 29918, 29928, 29894, 353, 263, 3670, 29889, 14609, 16616, 29928, 29894, 29898, 9302, 29889, 1032, 29872, 29898, 29941, 511, 7442, 29889, 2378, 4197, 29961, 29896, 29892, 29871, 29900, 29892, 29871, 29900, 16272, 29896, 29892, 29871, 29896, 29892, 29871, 29900, 16272, 29896, 29892, 29871, 29896, 29892, 29871, 29896, 20526, 320, 13, 462, 462, 462, 18884, 26688, 29922, 524, 876, 13, 4706, 1108, 29889, 1202, 4002, 647, 16174, 29898, 1311, 29889, 29924, 29918, 1927, 307, 29918, 29928, 29894, 29892, 16077, 29889, 29950, 6670, 13171, 29918, 26284, 29918, 1367, 29897, 13, 4706, 1583, 29889, 29924, 29918, 1927, 307, 29918, 29928, 29894, 29889, 842, 9966, 29898, 5574, 29897, 13, 308, 13, 4706, 1583, 29889, 29924, 29918, 562, 2242, 29918, 1927, 307, 29918, 29928, 29894, 353, 263, 3670, 29889, 14609, 16616, 29928, 29894, 29898, 9302, 29889, 3298, 359, 3552, 29941, 29892, 29941, 8243, 9302, 29889, 2873, 3552, 29941, 29892, 29941, 511, 29881, 1853, 29922, 524, 876, 13, 4706, 1108, 29889, 1202, 4002, 647, 16174, 29898, 1311, 29889, 29924, 29918, 562, 2242, 29918, 1927, 307, 29918, 29928, 29894, 29892, 16077, 29889, 29950, 6670, 13171, 29918, 26284, 29918, 1367, 29897, 13, 4706, 1583, 29889, 29924, 29918, 562, 2242, 29918, 1927, 307, 29918, 29928, 29894, 29889, 842, 9966, 29898, 5574, 29897, 13, 13, 1678, 822, 788, 7504, 7367, 8328, 2392, 14343, 29879, 29898, 1311, 29892, 1108, 29892, 18593, 29903, 572, 457, 29928, 29894, 29892, 330, 29918, 29893, 29892, 286, 10142, 29922, 29900, 29889, 29900, 29892, 320, 13, 462, 462, 259, 1035, 295, 3782, 895, 17185, 29922, 29896, 29889, 29900, 1125, 13, 4706, 1596, 13, 4706, 1596, 376, 2528, 292, 15592, 8328, 1059, 4958, 21313, 29900, 1800, 1642, 4830, 29898, 1311, 29889, 24713, 29889, 13010, 29897, 13, 308, 13, 4706, 396, 18035, 2594, 13, 4706, 474, 14470, 353, 1560, 29889, 14470, 29906, 29898, 7431, 29898, 1311, 29889, 326, 29884, 1469, 29897, 1723, 13, 4706, 474, 14470, 29889, 11249, 580, 13, 308, 13, 4706, 396, 4831, 7367, 8328, 2392, 29898, 26658, 358, 29892, 29871, 2437, 29934, 29892, 29871, 315, 29918, 29890, 29918, 29893, 29892, 29871, 28178, 29918, 29893, 29892, 29871, 24003, 29892, 29871, 330, 29918, 29893, 29897, 13, 4706, 7688, 353, 29871, 29896, 29889, 29900, 29914, 562, 2242, 3782, 895, 17185, 13, 4706, 1035, 295, 22463, 353, 5159, 13, 4706, 954, 29918, 2574, 2986, 353, 29871, 29900, 13, 308, 13, 4706, 565, 286, 10142, 1405, 29871, 29900, 29889, 29900, 29901, 13, 9651, 22243, 353, 263, 3670, 29889, 29950, 11234, 2303, 303, 326, 1061, 29898, 29885, 10142, 29897, 13, 4706, 1683, 29901, 13, 9651, 22243, 353, 263, 3670, 29889, 3782, 2303, 303, 326, 1061, 580, 13, 632, 13, 4706, 363, 527, 297, 1583, 29889, 326, 29884, 1469, 29901, 13, 9651, 18883, 353, 527, 29889, 303, 1160, 29889, 517, 7898, 580, 718, 1583, 29889, 2230, 10302, 13, 9651, 565, 18883, 1405, 18593, 29903, 572, 457, 29928, 29894, 29889, 23579, 457, 2141, 29873, 29918, 1195, 580, 322, 18883, 529, 18593, 29903, 572, 457, 29928, 29894, 29889, 23579, 457, 2141, 29873, 29918, 3317, 7295, 13, 18884, 315, 29918, 29890, 29918, 29893, 353, 18593, 29903, 572, 457, 29928, 29894, 29889, 20659, 29898, 11178, 467, 262, 3901, 580, 13, 18884, 263, 29918, 29893, 353, 18593, 29903, 572, 457, 29928, 29894, 29889, 10660, 7504, 7367, 362, 29898, 11178, 29897, 13, 18884, 289, 29918, 29875, 353, 1583, 29889, 562, 2242, 29933, 3173, 29928, 29894, 29889, 517, 29923, 27511, 10960, 29898, 11178, 29892, 29900, 29897, 13, 18884, 341, 353, 1583, 29889, 29924, 29918, 562, 2242, 29918, 29928, 29894, 29889, 517, 10960, 580, 13, 18884, 281, 29918, 29890, 353, 18593, 29903, 572, 457, 29928, 29894, 29889, 6825, 29963, 295, 25245, 8434, 4308, 29898, 11178, 29897, 13, 18884, 281, 29918, 6333, 29918, 29890, 353, 18593, 29903, 572, 457, 29928, 29894, 29889, 6825, 7504, 7367, 362, 8434, 4308, 29898, 11178, 29897, 13, 18884, 315, 29918, 29875, 29918, 29890, 353, 1583, 29889, 29939, 29918, 29875, 29918, 29890, 29918, 29928, 29894, 29889, 517, 10960, 580, 13, 18884, 364, 29918, 29890, 353, 1583, 29889, 29878, 29918, 29890, 29918, 29928, 29894, 29889, 517, 10960, 580, 13, 18884, 263, 353, 341, 334, 313, 29907, 29918, 29875, 29918, 29890, 334, 313, 29907, 29918, 29890, 29918, 29893, 334, 313, 29874, 29918, 29893, 448, 330, 29918, 29893, 29897, 718, 320, 13, 462, 462, 29871, 281, 29918, 6333, 29918, 29890, 29889, 19128, 29898, 29878, 29918, 29890, 29897, 718, 281, 29918, 29890, 29889, 19128, 29898, 29893, 29918, 29890, 29889, 19128, 29898, 29878, 29918, 29890, 13697, 13, 13, 18884, 263, 3127, 353, 413, 300, 29889, 29923, 27511, 2392, 29898, 326, 29889, 2312, 29892, 527, 29889, 2312, 12165, 29934, 334, 7688, 29892, 263, 718, 289, 29918, 29875, 29897, 13, 18884, 263, 3127, 29889, 842, 2303, 303, 326, 1061, 15644, 29898, 29885, 342, 29897, 13, 18884, 1035, 295, 22463, 29889, 4397, 29898, 29874, 3127, 29897, 13, 18884, 1108, 29889, 1202, 2392, 14343, 29898, 29874, 3127, 29897, 13, 9651, 1683, 29901, 13, 18884, 954, 29918, 2574, 2986, 353, 954, 29918, 2574, 2986, 718, 29871, 29896, 13, 13, 9651, 396, 5504, 6728, 2594, 13, 9651, 474, 14470, 29889, 11249, 580, 13, 13, 4706, 1596, 6634, 29878, 29871, 25601, 426, 29900, 29913, 310, 426, 29896, 29913, 15592, 8328, 1059, 4958, 313, 2574, 2986, 426, 29906, 29913, 714, 29899, 974, 29899, 23687, 20398, 29897, 1642, 4830, 29898, 7431, 29898, 1311, 29889, 326, 29884, 1469, 6817, 1949, 29918, 2574, 2986, 29892, 7431, 29898, 1311, 29889, 326, 29884, 1469, 511, 954, 29918, 2574, 2986, 1723, 13, 4706, 1583, 29889, 562, 2242, 22463, 353, 1035, 295, 22463, 13, 13, 1678, 822, 788, 29954, 29891, 1883, 4338, 2392, 14343, 29879, 29898, 1311, 29892, 1108, 29892, 18593, 29903, 572, 457, 29928, 29894, 29892, 286, 10142, 29922, 29900, 29889, 29900, 29892, 10966, 307, 3782, 895, 17185, 29922, 29896, 29889, 29900, 29892, 330, 29918, 29893, 29922, 8516, 1125, 13, 4706, 1596, 13, 4706, 1596, 376, 2528, 292, 10966, 1883, 4338, 1059, 4958, 21313, 29900, 1800, 1642, 4830, 29898, 1311, 29889, 24713, 29889, 13010, 29897, 13, 308, 13, 4706, 396, 18035, 2594, 13, 4706, 474, 14470, 353, 1560, 29889, 14470, 29906, 29898, 7431, 29898, 1311, 29889, 326, 29884, 1469, 29897, 1723, 13, 4706, 474, 14470, 29889, 11249, 580, 13, 13, 4706, 954, 29918, 2574, 2986, 353, 29871, 29900, 13, 4706, 10966, 307, 22463, 353, 5159, 13, 4706, 7688, 353, 29871, 29896, 29889, 29900, 29914, 1927, 307, 3782, 895, 17185, 13, 4706, 565, 286, 10142, 1405, 29871, 29900, 29889, 29900, 29901, 13, 9651, 22243, 353, 263, 3670, 29889, 29950, 11234, 2303, 303, 326, 1061, 29898, 29885, 10142, 29897, 13, 4706, 1683, 29901, 13, 9651, 22243, 353, 263, 3670, 29889, 3782, 2303, 303, 326, 1061, 580, 13, 632, 13, 4706, 363, 527, 297, 1583, 29889, 326, 29884, 1469, 29901, 13, 9651, 18883, 353, 527, 29889, 303, 1160, 29889, 517, 7898, 580, 718, 1583, 29889, 2230, 10302, 13, 9651, 565, 18883, 1405, 18593, 29903, 572, 457, 29928, 29894, 29889, 23579, 457, 2141, 29873, 29918, 1195, 580, 322, 18883, 529, 18593, 29903, 572, 457, 29928, 29894, 29889, 23579, 457, 2141, 29873, 29918, 3317, 7295, 13, 18884, 396, 12842, 1883, 4338, 2392, 29898, 26658, 358, 29892, 2437, 29934, 29892, 6401, 29963, 295, 25245, 29892, 24003, 29897, 13, 18884, 281, 29918, 29890, 353, 18593, 29903, 572, 457, 29928, 29894, 29889, 6825, 29963, 295, 25245, 8434, 4308, 29898, 11178, 29897, 13, 18884, 281, 29918, 6333, 29918, 29890, 353, 18593, 29903, 572, 457, 29928, 29894, 29889, 6825, 7504, 7367, 362, 8434, 4308, 29898, 11178, 29897, 13, 18884, 289, 29918, 29875, 353, 1583, 29889, 1927, 307, 29933, 3173, 29928, 29894, 29889, 517, 29923, 27511, 10960, 29898, 11178, 29892, 29900, 29897, 13, 18884, 315, 29918, 29890, 29918, 29893, 353, 18593, 29903, 572, 457, 29928, 29894, 29889, 20659, 29898, 11178, 467, 262, 3901, 580, 13, 18884, 263, 29918, 29893, 353, 18593, 29903, 572, 457, 29928, 29894, 29889, 10660, 7504, 7367, 362, 29898, 11178, 29897, 13, 18884, 364, 29918, 29890, 353, 1583, 29889, 29878, 29918, 29890, 29918, 29928, 29894, 29889, 517, 10960, 580, 13, 18884, 263, 29918, 29890, 353, 315, 29918, 29890, 29918, 29893, 334, 313, 29874, 29918, 29893, 448, 330, 29918, 29893, 29897, 718, 281, 29918, 6333, 29918, 29890, 29889, 19128, 29898, 29878, 29918, 29890, 29897, 718, 281, 29918, 29890, 29889, 19128, 29898, 29893, 29918, 29890, 29889, 19128, 29898, 29878, 29918, 29890, 876, 13, 13, 18884, 315, 29918, 29875, 29918, 29890, 353, 1583, 29889, 29939, 29918, 29875, 29918, 29890, 29918, 29928, 29894, 29889, 517, 10960, 580, 13, 18884, 315, 29918, 1927, 307, 29918, 29875, 353, 1583, 29889, 29939, 29918, 1927, 307, 29918, 29875, 29918, 29928, 29894, 29889, 517, 10960, 580, 13, 18884, 315, 29918, 1927, 307, 29918, 29890, 353, 315, 29918, 1927, 307, 29918, 29875, 334, 315, 29918, 29875, 29918, 29890, 13, 18884, 341, 353, 1583, 29889, 29924, 29918, 1927, 307, 29918, 29928, 29894, 29889, 517, 10960, 580, 13, 18884, 3219, 353, 1583, 29889, 29924, 29918, 562, 2242, 29918, 1927, 307, 29918, 29928, 29894, 29889, 517, 10960, 580, 13, 13, 18884, 281, 353, 341, 334, 313, 29907, 29918, 1927, 307, 29918, 29890, 334, 281, 29918, 29890, 29897, 718, 3219, 334, 313, 29907, 29918, 1927, 307, 29918, 29890, 334, 263, 29918, 29890, 29897, 13, 13, 18884, 330, 3127, 353, 413, 300, 29889, 29923, 27511, 2392, 29898, 326, 29889, 4787, 29892, 527, 29889, 4787, 12165, 29934, 334, 7688, 29892, 281, 718, 289, 29918, 29875, 29897, 13, 18884, 330, 3127, 29889, 842, 2303, 303, 326, 1061, 15644, 29898, 29885, 342, 29897, 13, 18884, 10966, 307, 22463, 29889, 4397, 29898, 914, 29878, 29897, 13, 18884, 1108, 29889, 1202, 2392, 14343, 29898, 914, 29878, 29897, 13, 9651, 1683, 29901, 13, 18884, 954, 29918, 2574, 2986, 353, 954, 29918, 2574, 2986, 718, 29871, 29896, 13, 13, 9651, 396, 5504, 6728, 2594, 13, 9651, 474, 14470, 29889, 11249, 580, 13, 13, 4706, 1596, 6634, 29878, 29871, 25601, 426, 29900, 29913, 310, 426, 29896, 29913, 10966, 1883, 4338, 1059, 4958, 313, 2574, 2986, 426, 29906, 29913, 714, 29899, 974, 29899, 23687, 20398, 29897, 1642, 4830, 29898, 7431, 29898, 1311, 29889, 326, 29884, 1469, 6817, 1949, 29918, 2574, 2986, 29892, 7431, 29898, 1311, 29889, 326, 29884, 1469, 511, 954, 29918, 2574, 2986, 1723, 9651, 13, 4706, 1583, 29889, 1927, 307, 22463, 353, 10966, 307, 22463, 13, 13, 1990, 306, 617, 4421, 7943, 29924, 275, 13671, 3505, 13971, 1888, 29884, 29898, 29902, 617, 4421, 7943, 29924, 275, 13671, 1888, 29884, 1125, 13, 13, 1678, 770, 1954, 29884, 11507, 29898, 29902, 617, 4421, 7943, 29924, 275, 13671, 1888, 29884, 29889, 1888, 29884, 11507, 1125, 13, 4706, 822, 4770, 2344, 12035, 1311, 29892, 527, 29884, 3991, 1125, 13, 9651, 306, 617, 4421, 7943, 29924, 275, 13671, 1888, 29884, 29889, 1888, 29884, 11507, 17255, 2344, 12035, 1311, 29892, 527, 29884, 3991, 29897, 13, 9651, 1583, 29889, 1272, 353, 527, 29884, 3991, 29889, 1272, 13, 9651, 1583, 29889, 1272, 3366, 4299, 3108, 353, 376, 7052, 29899, 26737, 2520, 358, 29899, 2311, 29899, 15987, 29908, 13, 13, 4706, 822, 1596, 10602, 29898, 1311, 29892, 2731, 29922, 9675, 29889, 25393, 1125, 13, 9651, 306, 617, 4421, 7943, 29924, 275, 13671, 1888, 29884, 29889, 1888, 29884, 11507, 29889, 2158, 10602, 29898, 1311, 29892, 2731, 29897, 13, 9651, 1596, 5099, 2731, 29892, 376, 1678, 364, 29916, 29918, 29875, 518, 29885, 5387, 29908, 13, 9651, 1596, 5099, 2731, 29892, 1583, 29889, 4830, 2568, 14927, 703, 418, 9162, 320, 13, 462, 462, 1669, 7442, 29889, 2378, 29898, 1311, 29889, 1272, 3366, 562, 2242, 261, 290, 2699, 3108, 3366, 17697, 29918, 29875, 3108, 876, 13, 9651, 1596, 5099, 2731, 29892, 376, 1678, 24721, 29918, 29875, 518, 29885, 5387, 29908, 13, 9651, 1596, 5099, 2731, 29892, 1583, 29889, 4830, 2568, 14927, 703, 418, 9162, 320, 13, 462, 462, 1669, 7442, 29889, 2378, 29898, 1311, 29889, 1272, 3366, 562, 2242, 261, 290, 2699, 3108, 3366, 719, 29918, 29875, 3108, 876, 13, 9651, 1596, 5099, 2731, 29892, 376, 1678, 364, 29920, 29918, 29875, 518, 29885, 5387, 29908, 13, 9651, 1596, 5099, 2731, 29892, 1583, 29889, 4830, 2568, 14927, 703, 418, 9162, 320, 13, 462, 462, 1669, 7442, 29889, 2378, 29898, 1311, 29889, 1272, 3366, 562, 2242, 261, 290, 2699, 3108, 3366, 11987, 29918, 29875, 3108, 876, 13, 13, 4706, 822, 731, 7504, 7367, 8328, 29931, 1310, 1433, 1516, 29898, 1311, 29892, 364, 29916, 29918, 29875, 29892, 24721, 29918, 29875, 29892, 364, 29920, 29918, 29875, 1125, 13, 9651, 1583, 29889, 1272, 3366, 562, 2242, 261, 290, 2699, 3108, 3366, 17697, 29918, 29875, 3108, 353, 364, 29916, 29918, 29875, 29889, 25027, 391, 580, 13, 9651, 1583, 29889, 1272, 3366, 562, 2242, 261, 290, 2699, 3108, 3366, 719, 29918, 29875, 3108, 353, 24721, 29918, 29875, 29889, 25027, 391, 580, 13, 9651, 1583, 29889, 1272, 3366, 562, 2242, 261, 290, 2699, 3108, 3366, 11987, 29918, 29875, 3108, 353, 364, 29920, 29918, 29875, 29889, 25027, 391, 580, 13, 13, 1678, 822, 2767, 1888, 29884, 3991, 29898, 1311, 1125, 13, 4706, 306, 617, 4421, 7943, 29924, 275, 13671, 1888, 29884, 29889, 5504, 1888, 29884, 3991, 29898, 1311, 29897, 13, 4706, 1583, 29889, 326, 29884, 3991, 29889, 842, 7504, 7367, 8328, 29931, 1310, 1433, 1516, 29898, 1311, 29889, 17697, 29918, 29875, 29918, 29928, 29894, 29889, 517, 29923, 27511, 3285, 320, 13, 462, 462, 462, 1583, 29889, 719, 29918, 29875, 29918, 29928, 29894, 29889, 517, 29923, 27511, 3285, 320, 13, 462, 462, 462, 1583, 29889, 11987, 29918, 29875, 29918, 29928, 29894, 29889, 517, 29923, 27511, 3101, 13, 13, 1678, 822, 788, 4002, 647, 10444, 1849, 29898, 1311, 29892, 1108, 1125, 13, 4706, 306, 617, 4421, 7943, 29924, 275, 13671, 1888, 29884, 29889, 1202, 4002, 647, 10444, 1849, 29898, 1311, 29892, 1108, 29897, 13, 13, 4706, 1583, 29889, 17697, 29918, 29875, 29918, 29928, 29894, 353, 263, 3670, 29889, 29923, 27511, 5228, 29928, 29894, 29898, 9302, 29889, 2378, 4197, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 5586, 876, 13, 4706, 1108, 29889, 1202, 4002, 647, 16174, 29898, 1311, 29889, 17697, 29918, 29875, 29918, 29928, 29894, 29892, 16077, 29889, 29950, 6670, 13171, 29918, 26284, 29918, 1367, 29897, 13, 4706, 1583, 29889, 17697, 29918, 29875, 29918, 29928, 29894, 29889, 842, 9966, 29898, 8824, 29897, 13, 308, 13, 4706, 1583, 29889, 719, 29918, 29875, 29918, 29928, 29894, 353, 263, 3670, 29889, 29923, 27511, 5228, 29928, 29894, 29898, 9302, 29889, 2378, 4197, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 5586, 876, 13, 4706, 1108, 29889, 1202, 4002, 647, 16174, 29898, 1311, 29889, 719, 29918, 29875, 29918, 29928, 29894, 29892, 16077, 29889, 29950, 6670, 13171, 29918, 26284, 29918, 1367, 29897, 13, 4706, 1583, 29889, 719, 29918, 29875, 29918, 29928, 29894, 29889, 842, 9966, 29898, 5574, 29897, 13, 13, 4706, 1583, 29889, 11987, 29918, 29875, 29918, 29928, 29894, 353, 263, 3670, 29889, 29923, 27511, 5228, 29928, 29894, 29898, 9302, 29889, 2378, 4197, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 5586, 876, 13, 4706, 1108, 29889, 1202, 4002, 647, 16174, 29898, 1311, 29889, 11987, 29918, 29875, 29918, 29928, 29894, 29892, 16077, 29889, 29950, 6670, 13171, 29918, 26284, 29918, 1367, 29897, 13, 4706, 1583, 29889, 11987, 29918, 29875, 29918, 29928, 29894, 29889, 842, 9966, 29898, 5574, 29897, 13, 13, 4706, 1583, 29889, 29902, 29916, 29918, 29928, 29894, 353, 263, 3670, 29889, 14609, 16616, 29928, 29894, 29898, 9302, 29889, 6051, 351, 4197, 29896, 1696, 29900, 1696, 29900, 5586, 511, 7442, 29889, 3298, 359, 3552, 29941, 29892, 29941, 511, 29881, 1853, 29922, 524, 876, 13, 4706, 1108, 29889, 1202, 4002, 647, 16174, 29898, 1311, 29889, 29902, 29916, 29918, 29928, 29894, 29892, 16077, 29889, 29950, 6670, 13171, 29918, 26284, 29918, 1367, 29897, 13, 4706, 1583, 29889, 29902, 29916, 29918, 29928, 29894, 29889, 842, 9966, 29898, 8824, 29897, 13, 4706, 1583, 29889, 29902, 29891, 29918, 29928, 29894, 353, 263, 3670, 29889, 14609, 16616, 29928, 29894, 29898, 9302, 29889, 6051, 351, 4197, 29900, 1696, 29896, 1696, 29900, 5586, 511, 7442, 29889, 3298, 359, 3552, 29941, 29892, 29941, 511, 29881, 1853, 29922, 524, 876, 13, 4706, 1108, 29889, 1202, 4002, 647, 16174, 29898, 1311, 29889, 29902, 29891, 29918, 29928, 29894, 29892, 16077, 29889, 29950, 6670, 13171, 29918, 26284, 29918, 1367, 29897, 13, 4706, 1583, 29889, 29902, 29891, 29918, 29928, 29894, 29889, 842, 9966, 29898, 8824, 29897, 13, 4706, 1583, 29889, 29902, 29920, 29918, 29928, 29894, 353, 263, 3670, 29889, 14609, 16616, 29928, 29894, 29898, 9302, 29889, 6051, 351, 4197, 29900, 1696, 29900, 1696, 29896, 5586, 511, 7442, 29889, 3298, 359, 3552, 29941, 29892, 29941, 511, 29881, 1853, 29922, 524, 876, 13, 4706, 1108, 29889, 1202, 4002, 647, 16174, 29898, 1311, 29889, 29902, 29920, 29918, 29928, 29894, 29892, 16077, 29889, 29950, 6670, 13171, 29918, 26284, 29918, 1367, 29897, 13, 4706, 1583, 29889, 29902, 29920, 29918, 29928, 29894, 29889, 842, 9966, 29898, 8824, 29897, 13, 13, 1678, 822, 788, 7504, 7367, 8328, 2392, 14343, 29879, 29898, 1311, 29892, 1108, 29892, 18593, 29903, 572, 457, 29928, 29894, 29892, 330, 29918, 29893, 29892, 286, 10142, 29922, 29900, 29889, 29900, 29892, 320, 13, 462, 462, 259, 1035, 295, 3782, 895, 17185, 29922, 29896, 29889, 29900, 1125, 13, 4706, 1596, 13, 4706, 1596, 376, 2528, 292, 15592, 8328, 1059, 4958, 21313, 29900, 1800, 1642, 4830, 29898, 1311, 29889, 24713, 29889, 13010, 29897, 13, 308, 13, 4706, 396, 18035, 2594, 13, 4706, 474, 14470, 353, 1560, 29889, 14470, 29906, 29898, 7431, 29898, 1311, 29889, 326, 29884, 1469, 29897, 1723, 13, 4706, 474, 14470, 29889, 11249, 580, 13, 308, 13, 4706, 396, 4831, 7367, 8328, 2392, 29898, 26658, 358, 29892, 29871, 2437, 29934, 29892, 29871, 315, 29918, 29890, 29918, 29893, 29892, 29871, 28178, 29918, 29893, 29892, 29871, 24003, 29892, 29871, 330, 29918, 29893, 29897, 13, 4706, 7688, 353, 29871, 29896, 29889, 29900, 29914, 562, 2242, 3782, 895, 17185, 13, 4706, 1035, 295, 22463, 353, 5159, 13, 4706, 954, 29918, 2574, 2986, 353, 29871, 29900, 13, 308, 13, 4706, 565, 286, 10142, 1405, 29871, 29900, 29889, 29900, 29901, 13, 9651, 22243, 353, 263, 3670, 29889, 29950, 11234, 2303, 303, 326, 1061, 29898, 29885, 10142, 29897, 13, 4706, 1683, 29901, 13, 9651, 22243, 353, 263, 3670, 29889, 3782, 2303, 303, 326, 1061, 580, 13, 632, 13, 4706, 363, 527, 297, 1583, 29889, 326, 29884, 1469, 29901, 13, 9651, 18883, 353, 527, 29889, 303, 1160, 29889, 517, 7898, 580, 718, 1583, 29889, 2230, 10302, 13, 9651, 565, 18883, 1405, 18593, 29903, 572, 457, 29928, 29894, 29889, 23579, 457, 2141, 29873, 29918, 1195, 580, 322, 18883, 529, 18593, 29903, 572, 457, 29928, 29894, 29889, 23579, 457, 2141, 29873, 29918, 3317, 7295, 13, 18884, 315, 29918, 29890, 29918, 29893, 353, 18593, 29903, 572, 457, 29928, 29894, 29889, 20659, 29898, 11178, 467, 262, 3901, 580, 13, 18884, 263, 29918, 29893, 353, 18593, 29903, 572, 457, 29928, 29894, 29889, 10660, 7504, 7367, 362, 29898, 11178, 29897, 13, 18884, 289, 29918, 29875, 353, 1583, 29889, 562, 2242, 29933, 3173, 29928, 29894, 29889, 517, 29923, 27511, 10960, 29898, 11178, 29892, 29900, 29897, 13, 18884, 341, 353, 1583, 29889, 29924, 29918, 562, 2242, 29918, 29928, 29894, 29889, 517, 10960, 580, 13, 18884, 281, 29918, 29890, 353, 18593, 29903, 572, 457, 29928, 29894, 29889, 6825, 29963, 295, 25245, 8434, 4308, 29898, 11178, 29897, 13, 18884, 281, 29918, 6333, 29918, 29890, 353, 18593, 29903, 572, 457, 29928, 29894, 29889, 6825, 7504, 7367, 362, 8434, 4308, 29898, 11178, 29897, 13, 18884, 315, 29918, 29875, 29918, 29890, 353, 1583, 29889, 29939, 29918, 29875, 29918, 29890, 29918, 29928, 29894, 29889, 517, 10960, 580, 13, 18884, 364, 29916, 29918, 29890, 353, 1583, 29889, 29878, 29918, 29890, 29918, 29928, 29894, 29889, 517, 10960, 580, 718, 315, 29918, 29875, 29918, 29890, 29889, 262, 3901, 580, 334, 1583, 29889, 17697, 29918, 29875, 29918, 29928, 29894, 29889, 517, 10960, 580, 13, 18884, 24721, 29918, 29890, 353, 1583, 29889, 29878, 29918, 29890, 29918, 29928, 29894, 29889, 517, 10960, 580, 718, 315, 29918, 29875, 29918, 29890, 29889, 262, 3901, 580, 334, 1583, 29889, 719, 29918, 29875, 29918, 29928, 29894, 29889, 517, 10960, 580, 13, 18884, 364, 29920, 29918, 29890, 353, 1583, 29889, 29878, 29918, 29890, 29918, 29928, 29894, 29889, 517, 10960, 580, 718, 315, 29918, 29875, 29918, 29890, 29889, 262, 3901, 580, 334, 1583, 29889, 11987, 29918, 29875, 29918, 29928, 29894, 29889, 517, 10960, 580, 13, 18884, 306, 29916, 353, 1583, 29889, 29902, 29916, 29918, 29928, 29894, 29889, 517, 10960, 580, 13, 18884, 306, 29891, 353, 1583, 29889, 29902, 29891, 29918, 29928, 29894, 29889, 517, 10960, 580, 13, 18884, 15674, 353, 1583, 29889, 29902, 29920, 29918, 29928, 29894, 29889, 517, 10960, 580, 13, 462, 13, 18884, 263, 353, 341, 334, 313, 29907, 29918, 29875, 29918, 29890, 334, 313, 29907, 29918, 29890, 29918, 29893, 334, 313, 29874, 29918, 29893, 448, 330, 29918, 29893, 876, 718, 320, 13, 462, 308, 306, 29916, 334, 313, 29907, 29918, 29875, 29918, 29890, 334, 313, 29893, 29918, 6333, 29918, 29890, 29889, 19128, 29898, 17697, 29918, 29890, 29897, 718, 281, 29918, 29890, 29889, 19128, 29898, 29893, 29918, 29890, 29889, 19128, 29898, 17697, 29918, 29890, 13697, 718, 320, 13, 462, 308, 306, 29891, 334, 313, 29907, 29918, 29875, 29918, 29890, 334, 313, 29893, 29918, 6333, 29918, 29890, 29889, 19128, 29898, 719, 29918, 29890, 29897, 718, 281, 29918, 29890, 29889, 19128, 29898, 29893, 29918, 29890, 29889, 19128, 29898, 719, 29918, 29890, 13697, 718, 320, 13, 462, 308, 15674, 334, 313, 29907, 29918, 29875, 29918, 29890, 334, 313, 29893, 29918, 6333, 29918, 29890, 29889, 19128, 29898, 11987, 29918, 29890, 29897, 718, 281, 29918, 29890, 29889, 19128, 29898, 29893, 29918, 29890, 29889, 19128, 29898, 11987, 29918, 29890, 13697, 1723, 13, 13, 18884, 263, 3127, 353, 413, 300, 29889, 29923, 27511, 2392, 29898, 326, 29889, 2312, 29892, 527, 29889, 2312, 12165, 29934, 334, 7688, 29892, 263, 718, 289, 29918, 29875, 29897, 13, 18884, 263, 3127, 29889, 842, 2303, 303, 326, 1061, 15644, 29898, 29885, 342, 29897, 13, 18884, 1035, 295, 22463, 29889, 4397, 29898, 29874, 3127, 29897, 13, 18884, 1108, 29889, 1202, 2392, 14343, 29898, 29874, 3127, 29897, 13, 9651, 1683, 29901, 13, 18884, 954, 29918, 2574, 2986, 353, 954, 29918, 2574, 2986, 718, 29871, 29896, 13, 13, 9651, 396, 5504, 6728, 2594, 13, 9651, 474, 14470, 29889, 11249, 580, 13, 13, 4706, 1596, 6634, 29878, 29871, 25601, 426, 29900, 29913, 310, 426, 29896, 29913, 15592, 8328, 1059, 4958, 313, 2574, 2986, 426, 29906, 29913, 714, 29899, 974, 29899, 23687, 20398, 29897, 1642, 4830, 29898, 7431, 29898, 1311, 29889, 326, 29884, 1469, 6817, 1949, 29918, 2574, 2986, 29892, 7431, 29898, 1311, 29889, 326, 29884, 1469, 511, 954, 29918, 2574, 2986, 1723, 13, 4706, 1583, 29889, 562, 2242, 22463, 353, 1035, 295, 22463, 2 ]
module3/itcc_test.py
jdahhan/Stem-Away-group-5
1
146337
import unittest from itcc import ITCC import pandas as pd class TestITCC(unittest.TestCase): def test_itcc_ingest(self): i = ITCC() df = i.get_path_matrix() self.assertEqual(type(df), pd.DataFrame) print(df.describe()) print("=" * 80) def test_getCXY(self): i = ITCC() df = i.getCXY() print(df.head()) print(f"Shape: {df.shape}") print("=" * 80) def test_generate_artifact(self): i = ITCC() druggene_mappings = pd.read_csv( "/Users/mtaruno/Documents/DevZone/Stem-Away-group-5/data/artifacts/druggene_mappings.csv", index_col=0, ) path_mappings = pd.read_csv( "/Users/mtaruno/Documents/DevZone/Stem-Away-group-5/data/artifacts/path_mappings.csv", index_col=0, ) df = i.generate_artifact( druggene_mappings=druggene_mappings, path_mappings=path_mappings ) print(df.head()) df.to_csv( "/Users/mtaruno/Documents/DevZone/Stem-Away-group-5/data/artifacts/ebc_artifact.csv" ) print("=" * 80) unittest.main()
[ 1, 1053, 443, 27958, 13, 3166, 372, 617, 1053, 13315, 4174, 13, 5215, 11701, 408, 10518, 13, 13, 13, 1990, 4321, 1806, 4174, 29898, 348, 27958, 29889, 3057, 8259, 1125, 13, 1678, 822, 1243, 29918, 277, 617, 29918, 292, 342, 29898, 1311, 1125, 13, 4706, 474, 353, 13315, 4174, 580, 13, 4706, 4489, 353, 474, 29889, 657, 29918, 2084, 29918, 5344, 580, 13, 4706, 1583, 29889, 9294, 9843, 29898, 1853, 29898, 2176, 511, 10518, 29889, 17271, 29897, 13, 4706, 1596, 29898, 2176, 29889, 2783, 29581, 3101, 13, 4706, 1596, 703, 543, 334, 29871, 29947, 29900, 29897, 13, 13, 1678, 822, 1243, 29918, 657, 29907, 18454, 29898, 1311, 1125, 13, 4706, 474, 353, 13315, 4174, 580, 13, 4706, 4489, 353, 474, 29889, 657, 29907, 18454, 580, 13, 4706, 1596, 29898, 2176, 29889, 2813, 3101, 13, 4706, 1596, 29898, 29888, 29908, 24111, 29901, 426, 2176, 29889, 12181, 27195, 13, 4706, 1596, 703, 543, 334, 29871, 29947, 29900, 29897, 13, 13, 1678, 822, 1243, 29918, 17158, 29918, 8813, 29898, 1311, 1125, 13, 4706, 474, 353, 13315, 4174, 580, 13, 4706, 5883, 1505, 1600, 29918, 655, 27775, 353, 10518, 29889, 949, 29918, 7638, 29898, 13, 9651, 5591, 5959, 29914, 4378, 279, 9447, 29914, 20128, 29914, 16618, 18482, 29914, 855, 331, 29899, 29909, 1582, 29899, 2972, 29899, 29945, 29914, 1272, 29914, 8813, 29879, 29914, 26179, 1505, 1600, 29918, 655, 27775, 29889, 7638, 613, 13, 9651, 2380, 29918, 1054, 29922, 29900, 29892, 13, 4706, 1723, 13, 4706, 2224, 29918, 655, 27775, 353, 10518, 29889, 949, 29918, 7638, 29898, 13, 9651, 5591, 5959, 29914, 4378, 279, 9447, 29914, 20128, 29914, 16618, 18482, 29914, 855, 331, 29899, 29909, 1582, 29899, 2972, 29899, 29945, 29914, 1272, 29914, 8813, 29879, 29914, 2084, 29918, 655, 27775, 29889, 7638, 613, 13, 9651, 2380, 29918, 1054, 29922, 29900, 29892, 13, 4706, 1723, 13, 13, 4706, 4489, 353, 474, 29889, 17158, 29918, 8813, 29898, 13, 9651, 5883, 1505, 1600, 29918, 655, 27775, 29922, 26179, 1505, 1600, 29918, 655, 27775, 29892, 2224, 29918, 655, 27775, 29922, 2084, 29918, 655, 27775, 13, 4706, 1723, 13, 4706, 1596, 29898, 2176, 29889, 2813, 3101, 13, 13, 4706, 4489, 29889, 517, 29918, 7638, 29898, 13, 9651, 5591, 5959, 29914, 4378, 279, 9447, 29914, 20128, 29914, 16618, 18482, 29914, 855, 331, 29899, 29909, 1582, 29899, 2972, 29899, 29945, 29914, 1272, 29914, 8813, 29879, 29914, 774, 29883, 29918, 8813, 29889, 7638, 29908, 13, 4706, 1723, 13, 4706, 1596, 703, 543, 334, 29871, 29947, 29900, 29897, 13, 13, 13, 348, 27958, 29889, 3396, 580, 13, 2 ]
mechlib/amech_io/parser/models.py
kevinmooreiii/mechdriver
1
71824
""" Parses the `models.dat` input file for MechDriver that specifies all of the parameters used to construct the partition functions and master equations for the calculation of rate constants and thermochemistry. """ import automol import ioformat from mechanalyzer.inf import thy as tinfo from mechlib.amech_io.parser._keywrd import defaults_with_dcts # DCTS MODKIN_REQ_LST = ('pressures', 'rate_temps', 'thermo_temps') MODKIN_VAL_DCT = { 'pressures': ((tuple,), (), None), 'rate_temps': ((tuple,), (), None), 'thermo_temps': ((tuple,), (), None), 'temp_unit': ((str,), (), 'K'), 'pressure_unit': ((str,), (), 'atm'), 'rate_fit': { 'fit_method': ((str,), ('arrhenius', 'chebyshev'), 'arrhenius'), 'pdep_temps': (((tuple,),), (), (500, 100)), 'pdep_tol': ((float,), (), 20.0), 'pdep_pval': ((float,), (), 1.0), 'pdep_low': ((float,), (), None), 'pdep_high': ((float,), (), None), 'arrfit_dbltol': ((float,), (), 15.0), 'arrfit_dblcheck': ((str,), ('max', 'avg'), 'max'), 'troefit_params': ((tuple,), (), ('ts1', 'ts2', 'ts3', 'alpha')), 'chebfit_tdeg': (int, (), 6), 'chebfit_pdeg': (int, (), 4), 'chebfit_tol': ((float,), (), 20.0) }, 'thermo_fit': { 'ref_scheme': ((str,), ('basic', 'cbh0'), 'basic'), 'ref_enes': ((str,), ('ANL0',), 'ANL0') }, 'glob_etransfer': { 'lj': (None, (), 'estimate'), 'edown': (None, (), 'estimate'), 'mass': ((tuple,), (), None) } } MODPF_REQ_LST = ('pressures', 'rate_temps', 'thermo_temps') MODPF_VAL_DCT = { 'ene': { 'lvl1': ((tuple,), (), None), 'lvl2': ((tuple,), (), None) }, 'rot': { 'mod': ((str,), ('rigid', 'vpt2'), 'rigid'), 'vpt2lvl': ((str,), (), None) }, 'vib': { 'mod': ((str,), ('harm', 'vpt2', 'tau'), 'harm'), 'geolvl': ((str,), (), None), 'vpt2lvl': ((str,), (), None), }, 'tors': { 'mod': ( (str,), ('rigid', '1dhr', '1dhrf', '1dhrfa', 'mdhr', 'mdhrv', 'tau'), 'rigid'), 'enelvl': ((str,), (), None), 'geolvl': ((str,), (), None), }, 'symm': { 'mod': ((str,), ('none', 'sampling', '1dhr'), 'none'), 'geolvl': ((str,), (), None), }, 'rpath': { 'enelvl': ((str,), (), None), 'geolvl': ((str,), (), None), }, 'ts': { 'nobar': ((str,), ('pst', 'rpvtst', 'vrctst'), 'pst'), 'sadpt': ((str,), ('fixed', 'pst', 'rpvtst', 'vrctst'), 'fixed'), 'rwells': ((str,), ('fake', 'find', 'none'), 'fake'), 'pwells': ((str,), ('fake', 'find', 'none'), 'fake'), 'tunnel': ((str,), ('none', 'eckart', 'sct'), 'eckart'), 'etrans': ((str,), ('none', 'estimate', 'read'), 'estimate') } } # Build Basic Objects def models_dictionary(mod_str, thy_dct): """ Parse the models.dat file string and construct the corresponding model dictionaries that are used by other parts of the code. :param mod_str: models.dat input file string :type mod_str: str :param thy_dct: :type: dict[str:dict[str:str/float]] """ # Format the models input to the kin and spc model dcts kin_blocks = ioformat.ptt.named_end_blocks( mod_str, 'kin', footer='kin') spc_blocks = ioformat.ptt.named_end_blocks( mod_str, 'spc', footer='spc') kin_mod_dct = automol.util.dict_.merge_subdct( ioformat.ptt.keyword_dcts_from_blocks(kin_blocks), keep_subdct=True) spc_mod_dct = automol.util.dict_.merge_subdct( ioformat.ptt.keyword_dcts_from_blocks(spc_blocks), keep_subdct=True) # Add defaults, check key-vals, and format each model dicts for mod, dct in kin_mod_dct.items(): if dct: # if statement for empty global dcts from above fxn kin_mod_dct[mod] = _kin_model_build(dct) for mod, dct in spc_mod_dct.items(): if dct: # if statement for empty global dcts from above fxn spc_mod_dct[mod] = _spc_model_build(dct, thy_dct) return kin_mod_dct, spc_mod_dct # Convert objects def _spc_model_build(spc_model_dct_i, thy_dct): """ Set the PF model list based on the input Combine with es {'vib': {'model': '', 'geolvl_info': (), ...}} Take all of the spc model dcts or just one? """ # Expand the wells keyword if it has been set if 'wells' in spc_model_dct_i['ts']: spc_model_dct_i['ts']['rwells'] = spc_model_dct_i['ts']['wells'] spc_model_dct_i['ts']['pwells'] = spc_model_dct_i['ts']['wells'] spc_model_dct_i['ts'].pop('wells') # Set the defaults for the dct new_dct = automol.util.dict_.right_update( defaults_with_dcts(MODPF_VAL_DCT), spc_model_dct_i) # Have to check the dictionary to see if levels # in mod are in thy dct or it breaks # Format the keys that are thy levels into info objects for later use def _format_lvl(lvl_val): """ format weird energy calls """ if isinstance(lvl_val, str): val_inf = (1.00, tinfo.from_dct(thy_dct.get(lvl_val))) else: val_inf = (lvl_val[0], tinfo.from_dct(thy_dct.get(lvl_val))) return val_inf new_dct2 = {} for key1, val1 in new_dct.items(): _new_dct = {} for key2, val2 in val1.items(): if 'lvl' in key2 and val2 is not None: thy_info = _format_lvl(val2) _new_dct[key2] = (val2, thy_info) else: _new_dct[key2] = val2 new_dct2[key1] = _new_dct return new_dct2 def _kin_model_build(kin_mod_dct_i): """ set kin """ # Set defaults new_kin_dct = automol.util.dict_.right_update( defaults_with_dcts(MODKIN_VAL_DCT), kin_mod_dct_i) # Check for correct input # Repartition ratefit key word into dcts for `ratefit` code old_ratefit = new_kin_dct['rate_fit'] new_ratefit = {} for key, val in old_ratefit.items(): if not any(x in key for x in ('pdep', 'arr', 'cheb', 'troe')): new_ratefit[key] = val new_ratefit.update({ 'pdep_fit': {key.replace('pdep_', ''): val for key, val in old_ratefit.items() if 'pdep' in key}, 'arrfit_fit': {key.replace('arrfit_', ''): val for key, val in old_ratefit.items() if 'arrfit' in key}, 'chebfit_fit': {key.replace('chebfit_', ''): val for key, val in old_ratefit.items() if 'chebfit' in key}, 'troefit_fit': {key.replace('troefit_', ''): val for key, val in old_ratefit.items() if 'troefit' in key} }) new_kin_dct.update({'rate_fit': new_ratefit}) return new_kin_dct # Handle model tasks def extract_models(tsk): """ pull modesl from tasks """ key_dct = tsk[-1] pes_mod = key_dct['kin_model'] spc_mods = tuple(key_dct[key] for key in key_dct.keys() if 'spc_mod' in key) return spc_mods, pes_mod def split_model(mod): """ Take a model given by a set of operations and split it into a set of models and operators model = 3*pf1-pf2 -> model = (models, coefs, operators) model = ((pf1, pf2), (3, 1), (multiple, subtract)) """ # Dictionary to map symbols to strings used later in the code op_dct = {'*': 'multiply', '+': 'add', '/': 'divide', '-': 'substract'} # Break the down the model string into # constituent models, coefficients, and operators coeffs, operators, models = [], [], [] coeff, model = '', '' for char in mod: if char == '.' or char.isdigit(): coeff += char elif char.isalpha(): model += char elif char in op_dct: operators.append(op_dct[char]) if coeff: coeffs.append(float(coeff)) else: coeffs.append(1.0) models.append(model) coeff = '' model = '' if coeff: coeffs.append(float(coeff)) else: coeffs.append(1.0) models.append(model) return (tuple(models), tuple(coeffs), tuple(operators)) # def get_model(comp, spc_mod_dct_i): # """ get model for spc dct compoenent # """ # return spc_mod_dct_i[comp]['mod'] # def thy_method_name(mod_lvl): # """ get the electronic strucure method # """ # return mod_lvl[0] # ? # def thy_info_coeff(mod_lvl): # """ get the coefficient from the model # """ # return mod_lvl[1][0] # def thy_info_obj(mod_lvl): # """ get the name of the mod lvl # """ # return mod_lvl[1][1]
[ 1, 9995, 1459, 29879, 267, 278, 421, 9794, 29889, 4130, 29952, 1881, 934, 363, 2191, 305, 12376, 393, 1580, 11057, 599, 13, 1678, 310, 278, 4128, 1304, 304, 3386, 278, 8877, 3168, 322, 13, 1678, 5835, 10693, 363, 278, 13944, 310, 6554, 17727, 322, 14563, 2878, 331, 6020, 29889, 13, 13, 15945, 29908, 13, 13, 5215, 3345, 324, 13, 5215, 12013, 4830, 13, 3166, 7208, 14997, 3298, 29889, 7192, 1053, 13874, 408, 260, 3888, 13, 3166, 592, 305, 1982, 29889, 420, 305, 29918, 601, 29889, 16680, 3032, 1989, 29893, 5499, 1053, 21274, 29918, 2541, 29918, 29881, 312, 29879, 13, 13, 13, 29937, 360, 1783, 29903, 13, 6720, 17359, 1177, 29918, 1525, 29984, 29918, 29931, 1254, 353, 6702, 2139, 1973, 742, 525, 10492, 29918, 27761, 742, 525, 721, 4346, 29918, 27761, 1495, 13, 6720, 17359, 1177, 29918, 8932, 29918, 29928, 1783, 353, 426, 13, 1678, 525, 2139, 1973, 2396, 5135, 23583, 29892, 511, 313, 511, 6213, 511, 13, 1678, 525, 10492, 29918, 27761, 2396, 5135, 23583, 29892, 511, 313, 511, 6213, 511, 13, 1678, 525, 721, 4346, 29918, 27761, 2396, 5135, 23583, 29892, 511, 313, 511, 6213, 511, 13, 1678, 525, 7382, 29918, 5441, 2396, 5135, 710, 29892, 511, 313, 511, 525, 29968, 5477, 13, 1678, 525, 2139, 545, 29918, 5441, 2396, 5135, 710, 29892, 511, 313, 511, 525, 271, 29885, 5477, 13, 1678, 525, 10492, 29918, 9202, 2396, 426, 13, 4706, 525, 9202, 29918, 5696, 2396, 5135, 710, 29892, 511, 6702, 2749, 3169, 2482, 742, 525, 305, 774, 952, 354, 29894, 5477, 525, 2749, 3169, 2482, 5477, 13, 4706, 525, 29886, 2716, 29918, 27761, 2396, 313, 3552, 23583, 29892, 511, 511, 313, 511, 313, 29945, 29900, 29900, 29892, 29871, 29896, 29900, 29900, 8243, 13, 4706, 525, 29886, 2716, 29918, 25027, 2396, 5135, 7411, 29892, 511, 313, 511, 29871, 29906, 29900, 29889, 29900, 511, 13, 4706, 525, 29886, 2716, 29918, 29886, 791, 2396, 5135, 7411, 29892, 511, 313, 511, 29871, 29896, 29889, 29900, 511, 13, 4706, 525, 29886, 2716, 29918, 677, 2396, 5135, 7411, 29892, 511, 313, 511, 6213, 511, 13, 4706, 525, 29886, 2716, 29918, 9812, 2396, 5135, 7411, 29892, 511, 313, 511, 6213, 511, 13, 4706, 525, 2749, 9202, 29918, 2585, 1896, 324, 2396, 5135, 7411, 29892, 511, 313, 511, 29871, 29896, 29945, 29889, 29900, 511, 13, 4706, 525, 2749, 9202, 29918, 29881, 2204, 3198, 2396, 5135, 710, 29892, 511, 6702, 3317, 742, 525, 485, 29887, 5477, 525, 3317, 5477, 13, 4706, 525, 29873, 307, 1389, 277, 29918, 7529, 2396, 5135, 23583, 29892, 511, 313, 511, 6702, 1372, 29896, 742, 525, 1372, 29906, 742, 525, 1372, 29941, 742, 525, 2312, 1495, 511, 13, 4706, 525, 305, 774, 9202, 29918, 29873, 12163, 2396, 313, 524, 29892, 313, 511, 29871, 29953, 511, 13, 4706, 525, 305, 774, 9202, 29918, 29886, 12163, 2396, 313, 524, 29892, 313, 511, 29871, 29946, 511, 13, 4706, 525, 305, 774, 9202, 29918, 25027, 2396, 5135, 7411, 29892, 511, 313, 511, 29871, 29906, 29900, 29889, 29900, 29897, 13, 1678, 2981, 13, 1678, 525, 721, 4346, 29918, 9202, 2396, 426, 13, 4706, 525, 999, 29918, 816, 2004, 2396, 5135, 710, 29892, 511, 6702, 16121, 742, 525, 10702, 29882, 29900, 5477, 525, 16121, 5477, 13, 4706, 525, 999, 29918, 25487, 2396, 5135, 710, 29892, 511, 6702, 2190, 29931, 29900, 742, 511, 525, 2190, 29931, 29900, 1495, 13, 1678, 2981, 13, 1678, 525, 23705, 29918, 18184, 550, 571, 2396, 426, 13, 4706, 525, 14042, 2396, 313, 8516, 29892, 313, 511, 525, 342, 6490, 5477, 13, 4706, 525, 287, 776, 2396, 313, 8516, 29892, 313, 511, 525, 342, 6490, 5477, 13, 4706, 525, 25379, 2396, 5135, 23583, 29892, 511, 313, 511, 6213, 29897, 13, 1678, 500, 13, 29913, 13, 13, 6720, 11191, 29943, 29918, 1525, 29984, 29918, 29931, 1254, 353, 6702, 2139, 1973, 742, 525, 10492, 29918, 27761, 742, 525, 721, 4346, 29918, 27761, 1495, 13, 6720, 11191, 29943, 29918, 8932, 29918, 29928, 1783, 353, 426, 13, 1678, 525, 1600, 2396, 426, 13, 4706, 525, 29880, 20901, 29896, 2396, 5135, 23583, 29892, 511, 313, 511, 6213, 511, 13, 4706, 525, 29880, 20901, 29906, 2396, 5135, 23583, 29892, 511, 313, 511, 6213, 29897, 13, 1678, 2981, 13, 1678, 525, 5450, 2396, 426, 13, 4706, 525, 1545, 2396, 5135, 710, 29892, 511, 6702, 8966, 333, 742, 525, 29894, 415, 29906, 5477, 525, 8966, 333, 5477, 13, 4706, 525, 29894, 415, 29906, 29880, 20901, 2396, 5135, 710, 29892, 511, 313, 511, 6213, 29897, 13, 1678, 2981, 13, 1678, 525, 29894, 747, 2396, 426, 13, 4706, 525, 1545, 2396, 5135, 710, 29892, 511, 6702, 23024, 742, 525, 29894, 415, 29906, 742, 525, 4722, 5477, 525, 23024, 5477, 13, 4706, 525, 479, 324, 20901, 2396, 5135, 710, 29892, 511, 313, 511, 6213, 511, 13, 4706, 525, 29894, 415, 29906, 29880, 20901, 2396, 5135, 710, 29892, 511, 313, 511, 6213, 511, 13, 1678, 2981, 13, 1678, 525, 29873, 943, 2396, 426, 13, 4706, 525, 1545, 2396, 313, 13, 9651, 313, 710, 29892, 511, 13, 9651, 6702, 8966, 333, 742, 525, 29896, 29881, 1092, 742, 525, 29896, 29881, 1092, 29888, 742, 525, 29896, 29881, 1092, 5444, 742, 525, 3487, 1092, 742, 525, 3487, 1092, 29894, 742, 525, 4722, 5477, 13, 9651, 525, 8966, 333, 5477, 13, 4706, 525, 264, 295, 20901, 2396, 5135, 710, 29892, 511, 313, 511, 6213, 511, 13, 4706, 525, 479, 324, 20901, 2396, 5135, 710, 29892, 511, 313, 511, 6213, 511, 13, 1678, 2981, 13, 1678, 525, 11967, 29885, 2396, 426, 13, 4706, 525, 1545, 2396, 5135, 710, 29892, 511, 6702, 9290, 742, 525, 13445, 10335, 742, 525, 29896, 29881, 1092, 5477, 525, 9290, 5477, 13, 4706, 525, 479, 324, 20901, 2396, 5135, 710, 29892, 511, 313, 511, 6213, 511, 13, 1678, 2981, 13, 1678, 525, 29878, 2084, 2396, 426, 13, 4706, 525, 264, 295, 20901, 2396, 5135, 710, 29892, 511, 313, 511, 6213, 511, 13, 4706, 525, 479, 324, 20901, 2396, 5135, 710, 29892, 511, 313, 511, 6213, 511, 13, 1678, 2981, 13, 1678, 525, 1372, 2396, 426, 13, 4706, 525, 29876, 22872, 2396, 5135, 710, 29892, 511, 6702, 29886, 303, 742, 525, 19080, 21908, 303, 742, 525, 13416, 312, 303, 5477, 525, 29886, 303, 5477, 13, 4706, 525, 29879, 328, 415, 2396, 5135, 710, 29892, 511, 6702, 20227, 742, 525, 29886, 303, 742, 525, 19080, 21908, 303, 742, 525, 13416, 312, 303, 5477, 525, 20227, 5477, 13, 4706, 525, 29878, 5872, 29879, 2396, 5135, 710, 29892, 511, 6702, 29888, 1296, 742, 525, 2886, 742, 525, 9290, 5477, 525, 29888, 1296, 5477, 13, 4706, 525, 29886, 5872, 29879, 2396, 5135, 710, 29892, 511, 6702, 29888, 1296, 742, 525, 2886, 742, 525, 9290, 5477, 525, 29888, 1296, 5477, 13, 4706, 525, 29873, 16163, 2396, 5135, 710, 29892, 511, 6702, 9290, 742, 525, 29872, 384, 442, 742, 525, 29879, 312, 5477, 525, 29872, 384, 442, 5477, 13, 4706, 525, 18184, 550, 2396, 5135, 710, 29892, 511, 6702, 9290, 742, 525, 342, 6490, 742, 525, 949, 5477, 525, 342, 6490, 1495, 13, 1678, 500, 13, 29913, 13, 13, 13, 29937, 8878, 19219, 4669, 29879, 13, 1753, 4733, 29918, 27126, 29898, 1545, 29918, 710, 29892, 13874, 29918, 29881, 312, 1125, 13, 1678, 9995, 20969, 278, 4733, 29889, 4130, 934, 1347, 322, 3386, 278, 6590, 13, 4706, 1904, 21503, 4314, 393, 526, 1304, 491, 916, 5633, 310, 278, 775, 29889, 13, 13, 4706, 584, 3207, 878, 29918, 710, 29901, 4733, 29889, 4130, 1881, 934, 1347, 13, 4706, 584, 1853, 878, 29918, 710, 29901, 851, 13, 4706, 584, 3207, 13874, 29918, 29881, 312, 29901, 13, 4706, 584, 1853, 29901, 9657, 29961, 710, 29901, 8977, 29961, 710, 29901, 710, 29914, 7411, 5262, 13, 1678, 9995, 13, 13, 1678, 396, 19191, 278, 4733, 1881, 304, 278, 19015, 322, 805, 29883, 1904, 270, 312, 29879, 13, 1678, 19015, 29918, 1271, 29879, 353, 12013, 4830, 29889, 415, 29873, 29889, 17514, 29918, 355, 29918, 1271, 29879, 29898, 13, 4706, 878, 29918, 710, 29892, 525, 9089, 742, 24166, 2433, 9089, 1495, 13, 1678, 805, 29883, 29918, 1271, 29879, 353, 12013, 4830, 29889, 415, 29873, 29889, 17514, 29918, 355, 29918, 1271, 29879, 29898, 13, 4706, 878, 29918, 710, 29892, 525, 1028, 29883, 742, 24166, 2433, 1028, 29883, 1495, 13, 13, 1678, 19015, 29918, 1545, 29918, 29881, 312, 353, 3345, 324, 29889, 4422, 29889, 8977, 5396, 14634, 29918, 1491, 29881, 312, 29898, 13, 4706, 12013, 4830, 29889, 415, 29873, 29889, 26766, 29918, 29881, 312, 29879, 29918, 3166, 29918, 1271, 29879, 29898, 9089, 29918, 1271, 29879, 511, 3013, 29918, 1491, 29881, 312, 29922, 5574, 29897, 13, 1678, 805, 29883, 29918, 1545, 29918, 29881, 312, 353, 3345, 324, 29889, 4422, 29889, 8977, 5396, 14634, 29918, 1491, 29881, 312, 29898, 13, 4706, 12013, 4830, 29889, 415, 29873, 29889, 26766, 29918, 29881, 312, 29879, 29918, 3166, 29918, 1271, 29879, 29898, 1028, 29883, 29918, 1271, 29879, 511, 3013, 29918, 1491, 29881, 312, 29922, 5574, 29897, 13, 13, 1678, 396, 3462, 21274, 29892, 1423, 1820, 29899, 791, 29879, 29892, 322, 3402, 1269, 1904, 9657, 29879, 13, 1678, 363, 878, 29892, 270, 312, 297, 19015, 29918, 1545, 29918, 29881, 312, 29889, 7076, 7295, 13, 4706, 565, 270, 312, 29901, 29871, 396, 565, 3229, 363, 4069, 5534, 270, 312, 29879, 515, 2038, 285, 29916, 29876, 13, 9651, 19015, 29918, 1545, 29918, 29881, 312, 29961, 1545, 29962, 353, 903, 9089, 29918, 4299, 29918, 4282, 29898, 29881, 312, 29897, 13, 13, 1678, 363, 878, 29892, 270, 312, 297, 805, 29883, 29918, 1545, 29918, 29881, 312, 29889, 7076, 7295, 13, 4706, 565, 270, 312, 29901, 29871, 396, 565, 3229, 363, 4069, 5534, 270, 312, 29879, 515, 2038, 285, 29916, 29876, 13, 9651, 805, 29883, 29918, 1545, 29918, 29881, 312, 29961, 1545, 29962, 353, 903, 1028, 29883, 29918, 4299, 29918, 4282, 29898, 29881, 312, 29892, 13874, 29918, 29881, 312, 29897, 13, 13, 1678, 736, 19015, 29918, 1545, 29918, 29881, 312, 29892, 805, 29883, 29918, 1545, 29918, 29881, 312, 13, 13, 13, 29937, 14806, 3618, 13, 1753, 903, 1028, 29883, 29918, 4299, 29918, 4282, 29898, 1028, 29883, 29918, 4299, 29918, 29881, 312, 29918, 29875, 29892, 13874, 29918, 29881, 312, 1125, 13, 1678, 9995, 3789, 278, 349, 29943, 1904, 1051, 2729, 373, 278, 1881, 13, 4706, 422, 26062, 411, 831, 13, 13, 4706, 11117, 29894, 747, 2396, 11117, 4299, 2396, 15516, 525, 479, 324, 20901, 29918, 3888, 2396, 313, 511, 2023, 930, 13, 13, 4706, 11190, 599, 310, 278, 805, 29883, 1904, 270, 312, 29879, 470, 925, 697, 29973, 13, 1678, 9995, 13, 13, 1678, 396, 12027, 392, 278, 1532, 29879, 13553, 565, 372, 756, 1063, 731, 13, 1678, 565, 525, 5872, 29879, 29915, 297, 805, 29883, 29918, 4299, 29918, 29881, 312, 29918, 29875, 1839, 1372, 2033, 29901, 13, 4706, 805, 29883, 29918, 4299, 29918, 29881, 312, 29918, 29875, 1839, 1372, 16215, 29878, 5872, 29879, 2033, 353, 805, 29883, 29918, 4299, 29918, 29881, 312, 29918, 29875, 1839, 1372, 16215, 5872, 29879, 2033, 13, 4706, 805, 29883, 29918, 4299, 29918, 29881, 312, 29918, 29875, 1839, 1372, 16215, 29886, 5872, 29879, 2033, 353, 805, 29883, 29918, 4299, 29918, 29881, 312, 29918, 29875, 1839, 1372, 16215, 5872, 29879, 2033, 13, 4706, 805, 29883, 29918, 4299, 29918, 29881, 312, 29918, 29875, 1839, 1372, 13359, 7323, 877, 5872, 29879, 1495, 13, 13, 1678, 396, 3789, 278, 21274, 363, 278, 270, 312, 13, 1678, 716, 29918, 29881, 312, 353, 3345, 324, 29889, 4422, 29889, 8977, 5396, 1266, 29918, 5504, 29898, 13, 418, 21274, 29918, 2541, 29918, 29881, 312, 29879, 29898, 6720, 11191, 29943, 29918, 8932, 29918, 29928, 1783, 511, 805, 29883, 29918, 4299, 29918, 29881, 312, 29918, 29875, 29897, 13, 13, 1678, 396, 6975, 304, 1423, 278, 8600, 304, 1074, 565, 11174, 13, 1678, 396, 297, 878, 526, 297, 13874, 270, 312, 470, 372, 16706, 13, 13, 1678, 396, 19191, 278, 6611, 393, 526, 13874, 11174, 964, 5235, 3618, 363, 2678, 671, 13, 1678, 822, 903, 4830, 29918, 29880, 20901, 29898, 29880, 20901, 29918, 791, 1125, 13, 4706, 9995, 3402, 13543, 5864, 5717, 13, 4706, 9995, 13, 4706, 565, 338, 8758, 29898, 29880, 20901, 29918, 791, 29892, 851, 1125, 13, 9651, 659, 29918, 7192, 353, 313, 29896, 29889, 29900, 29900, 29892, 260, 3888, 29889, 3166, 29918, 29881, 312, 29898, 21155, 29918, 29881, 312, 29889, 657, 29898, 29880, 20901, 29918, 791, 4961, 13, 4706, 1683, 29901, 13, 9651, 659, 29918, 7192, 353, 313, 29880, 20901, 29918, 791, 29961, 29900, 1402, 260, 3888, 29889, 3166, 29918, 29881, 312, 29898, 21155, 29918, 29881, 312, 29889, 657, 29898, 29880, 20901, 29918, 791, 4961, 13, 13, 4706, 736, 659, 29918, 7192, 13, 13, 1678, 716, 29918, 29881, 312, 29906, 353, 6571, 13, 1678, 363, 1820, 29896, 29892, 659, 29896, 297, 716, 29918, 29881, 312, 29889, 7076, 7295, 13, 4706, 903, 1482, 29918, 29881, 312, 353, 6571, 13, 4706, 363, 1820, 29906, 29892, 659, 29906, 297, 659, 29896, 29889, 7076, 7295, 13, 9651, 565, 525, 29880, 20901, 29915, 297, 1820, 29906, 322, 659, 29906, 338, 451, 6213, 29901, 13, 18884, 13874, 29918, 3888, 353, 903, 4830, 29918, 29880, 20901, 29898, 791, 29906, 29897, 13, 18884, 903, 1482, 29918, 29881, 312, 29961, 1989, 29906, 29962, 353, 313, 791, 29906, 29892, 13874, 29918, 3888, 29897, 13, 9651, 1683, 29901, 13, 18884, 903, 1482, 29918, 29881, 312, 29961, 1989, 29906, 29962, 353, 659, 29906, 13, 13, 4706, 716, 29918, 29881, 312, 29906, 29961, 1989, 29896, 29962, 353, 903, 1482, 29918, 29881, 312, 13, 13, 1678, 736, 716, 29918, 29881, 312, 29906, 13, 13, 13, 1753, 903, 9089, 29918, 4299, 29918, 4282, 29898, 9089, 29918, 1545, 29918, 29881, 312, 29918, 29875, 1125, 13, 1678, 9995, 731, 19015, 13, 1678, 9995, 13, 13, 1678, 396, 3789, 21274, 13, 1678, 716, 29918, 9089, 29918, 29881, 312, 353, 3345, 324, 29889, 4422, 29889, 8977, 5396, 1266, 29918, 5504, 29898, 13, 4706, 21274, 29918, 2541, 29918, 29881, 312, 29879, 29898, 6720, 17359, 1177, 29918, 8932, 29918, 29928, 1783, 511, 19015, 29918, 1545, 29918, 29881, 312, 29918, 29875, 29897, 13, 13, 1678, 396, 5399, 363, 1959, 1881, 13, 13, 1678, 396, 830, 16707, 6554, 9202, 1820, 1734, 964, 270, 312, 29879, 363, 421, 10492, 9202, 29952, 775, 13, 1678, 2030, 29918, 10492, 9202, 353, 716, 29918, 9089, 29918, 29881, 312, 1839, 10492, 29918, 9202, 2033, 13, 1678, 716, 29918, 10492, 9202, 353, 6571, 13, 1678, 363, 1820, 29892, 659, 297, 2030, 29918, 10492, 9202, 29889, 7076, 7295, 13, 4706, 565, 451, 738, 29898, 29916, 297, 1820, 363, 921, 297, 6702, 29886, 2716, 742, 525, 2749, 742, 525, 305, 774, 742, 525, 29873, 26968, 8785, 29901, 13, 9651, 716, 29918, 10492, 9202, 29961, 1989, 29962, 353, 659, 13, 13, 1678, 716, 29918, 10492, 9202, 29889, 5504, 3319, 13, 4706, 525, 29886, 2716, 29918, 9202, 2396, 426, 1989, 29889, 6506, 877, 29886, 2716, 29918, 742, 6629, 1125, 659, 13, 462, 268, 363, 1820, 29892, 659, 297, 2030, 29918, 10492, 9202, 29889, 7076, 580, 13, 462, 268, 565, 525, 29886, 2716, 29915, 297, 1820, 1118, 13, 4706, 525, 2749, 9202, 29918, 9202, 2396, 426, 1989, 29889, 6506, 877, 2749, 9202, 29918, 742, 6629, 1125, 659, 13, 462, 539, 363, 1820, 29892, 659, 297, 2030, 29918, 10492, 9202, 29889, 7076, 580, 13, 462, 539, 565, 525, 2749, 9202, 29915, 297, 1820, 1118, 13, 4706, 525, 305, 774, 9202, 29918, 9202, 2396, 426, 1989, 29889, 6506, 877, 305, 774, 9202, 29918, 742, 6629, 1125, 659, 13, 462, 4706, 363, 1820, 29892, 659, 297, 2030, 29918, 10492, 9202, 29889, 7076, 580, 13, 462, 4706, 565, 525, 305, 774, 9202, 29915, 297, 1820, 1118, 13, 4706, 525, 29873, 307, 1389, 277, 29918, 9202, 2396, 426, 1989, 29889, 6506, 877, 29873, 307, 1389, 277, 29918, 742, 6629, 1125, 659, 13, 462, 4706, 363, 1820, 29892, 659, 297, 2030, 29918, 10492, 9202, 29889, 7076, 580, 13, 462, 4706, 565, 525, 29873, 307, 1389, 277, 29915, 297, 1820, 29913, 13, 1678, 5615, 13, 13, 1678, 716, 29918, 9089, 29918, 29881, 312, 29889, 5504, 3319, 29915, 10492, 29918, 9202, 2396, 716, 29918, 10492, 9202, 1800, 13, 13, 1678, 736, 716, 29918, 9089, 29918, 29881, 312, 13, 13, 13, 29937, 29273, 1904, 9595, 13, 1753, 6597, 29918, 9794, 29898, 29873, 808, 1125, 13, 1678, 9995, 8206, 18893, 29880, 515, 9595, 13, 1678, 9995, 13, 13, 1678, 1820, 29918, 29881, 312, 353, 260, 808, 14352, 29896, 29962, 13, 1678, 8928, 29918, 1545, 353, 1820, 29918, 29881, 312, 1839, 9089, 29918, 4299, 2033, 13, 1678, 805, 29883, 29918, 1545, 29879, 353, 18761, 29898, 1989, 29918, 29881, 312, 29961, 1989, 29962, 363, 1820, 297, 1820, 29918, 29881, 312, 29889, 8149, 580, 13, 462, 268, 565, 525, 1028, 29883, 29918, 1545, 29915, 297, 1820, 29897, 13, 13, 1678, 736, 805, 29883, 29918, 1545, 29879, 29892, 8928, 29918, 1545, 13, 13, 13, 1753, 6219, 29918, 4299, 29898, 1545, 1125, 13, 1678, 9995, 11190, 263, 1904, 2183, 491, 263, 731, 310, 6931, 322, 6219, 372, 964, 263, 731, 310, 4733, 13, 4706, 322, 12768, 13, 13, 4706, 1904, 353, 29871, 29941, 29930, 7810, 29896, 29899, 7810, 29906, 1599, 13, 9651, 1904, 353, 313, 9794, 29892, 1302, 1389, 29879, 29892, 12768, 29897, 13, 9651, 1904, 353, 5135, 7810, 29896, 29892, 282, 29888, 29906, 511, 313, 29941, 29892, 29871, 29896, 511, 313, 20787, 29892, 23197, 876, 13, 1678, 9995, 13, 13, 1678, 396, 13343, 304, 2910, 15072, 304, 6031, 1304, 2678, 297, 278, 775, 13, 1678, 1015, 29918, 29881, 312, 353, 11117, 29930, 2396, 525, 18056, 368, 742, 525, 29974, 2396, 525, 1202, 742, 8207, 2396, 525, 4563, 680, 742, 17411, 2396, 525, 1491, 4440, 10827, 13, 13, 1678, 396, 28301, 278, 1623, 278, 1904, 1347, 964, 13, 1678, 396, 10719, 296, 4733, 29892, 16127, 29892, 322, 12768, 13, 1678, 1302, 12352, 29879, 29892, 12768, 29892, 4733, 353, 19997, 19997, 5159, 13, 1678, 1302, 12352, 29892, 1904, 353, 15516, 6629, 13, 1678, 363, 1373, 297, 878, 29901, 13, 4706, 565, 1373, 1275, 525, 6169, 470, 1373, 29889, 275, 26204, 7295, 13, 9651, 1302, 12352, 4619, 1373, 13, 4706, 25342, 1373, 29889, 275, 2312, 7295, 13, 9651, 1904, 4619, 1373, 13, 4706, 25342, 1373, 297, 1015, 29918, 29881, 312, 29901, 13, 9651, 12768, 29889, 4397, 29898, 459, 29918, 29881, 312, 29961, 3090, 2314, 13, 9651, 565, 1302, 12352, 29901, 13, 18884, 1302, 12352, 29879, 29889, 4397, 29898, 7411, 29898, 1111, 12352, 876, 13, 9651, 1683, 29901, 13, 18884, 1302, 12352, 29879, 29889, 4397, 29898, 29896, 29889, 29900, 29897, 13, 9651, 4733, 29889, 4397, 29898, 4299, 29897, 13, 9651, 1302, 12352, 353, 6629, 13, 9651, 1904, 353, 6629, 13, 1678, 565, 1302, 12352, 29901, 13, 4706, 1302, 12352, 29879, 29889, 4397, 29898, 7411, 29898, 1111, 12352, 876, 13, 1678, 1683, 29901, 13, 4706, 1302, 12352, 29879, 29889, 4397, 29898, 29896, 29889, 29900, 29897, 13, 1678, 4733, 29889, 4397, 29898, 4299, 29897, 13, 13, 1678, 736, 313, 23583, 29898, 9794, 511, 18761, 29898, 1111, 12352, 29879, 511, 18761, 29898, 3372, 4097, 876, 13, 13, 13, 29937, 822, 679, 29918, 4299, 29898, 2388, 29892, 805, 29883, 29918, 1545, 29918, 29881, 312, 29918, 29875, 1125, 13, 29937, 268, 9995, 679, 1904, 363, 805, 29883, 270, 312, 752, 29877, 264, 296, 13, 29937, 268, 9995, 13, 29937, 268, 736, 805, 29883, 29918, 1545, 29918, 29881, 312, 29918, 29875, 29961, 2388, 22322, 1545, 2033, 13, 29937, 822, 13874, 29918, 5696, 29918, 978, 29898, 1545, 29918, 29880, 20901, 1125, 13, 29937, 268, 9995, 679, 278, 27758, 6220, 29883, 545, 1158, 13, 29937, 268, 9995, 13, 29937, 268, 736, 878, 29918, 29880, 20901, 29961, 29900, 29962, 29871, 396, 1577, 13, 29937, 822, 13874, 29918, 3888, 29918, 1111, 12352, 29898, 1545, 29918, 29880, 20901, 1125, 13, 29937, 268, 9995, 679, 278, 10825, 515, 278, 1904, 13, 29937, 268, 9995, 13, 29937, 268, 736, 878, 29918, 29880, 20901, 29961, 29896, 3816, 29900, 29962, 13, 29937, 822, 13874, 29918, 3888, 29918, 5415, 29898, 1545, 29918, 29880, 20901, 1125, 13, 29937, 268, 9995, 679, 278, 1024, 310, 278, 878, 301, 20901, 13, 29937, 268, 9995, 13, 29937, 268, 736, 878, 29918, 29880, 20901, 29961, 29896, 3816, 29896, 29962, 13, 2 ]
utils/csv_response_.py
baixuexue123/djmo
1
107926
<filename>utils/csv_response_.py<gh_stars>1-10 # -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import import csv import codecs import cStringIO from django.http import StreamingHttpResponse from django.views.generic import View """ 流式响应StreamingHttpResponse可以快速,节省内存地产生一个大型文件 """ class Echo(object): """An object that implements just the write method of the file-like interface.""" def write(self, value): """Write the value by returning it, instead of storing in a buffer.""" return value class UnicodeWriter(object): """ A CSV writer which will write rows to CSV file "f", which is encoded in the given encoding. """ def __init__(self, f, dialect=csv.excel, encoding='utf-8', **kwargs): # Redirect output to a queue self.queue = cStringIO.StringIO() self.writer = csv.writer(self.queue, dialect=dialect, **kwargs) self.stream = f self.encoder = codecs.getincrementalencoder(encoding)() def writerow(self, row): self.writer.writerow([handle_column(s) for s in row]) # Fetch UTF-8 output from the queue ... data = self.queue.getvalue() data = data.decode("utf-8") # ... and reencode it into the target encoding data = self.encoder.encode(data) # write to the target stream value = self.stream.write(data) # empty queue self.queue.truncate(0) return value def writerows(self, rows): for row in rows: self.writerow(row) class ExampleView(View): headers = ('一些', '表头') def get(self, request): result = ( ('第一行', '数据1'), ('第二行', '数据2') ) echoer = Echo() writer = UnicodeWriter(echoer) def csv_iterator(): yield codecs.BOM_UTF8 yield writer.writerow(self.headers) for column in result: yield writer.writerow(column) response = StreamingHttpResponse( (row for row in csv_iterator()), content_type="text/csv;charset=utf-8" ) response['Content-Disposition'] = 'attachment;filename="example.csv"' return response
[ 1, 529, 9507, 29958, 13239, 29914, 7638, 29918, 5327, 5396, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 3166, 4770, 29888, 9130, 1649, 1053, 29104, 29918, 20889, 1338, 29892, 8380, 29918, 5215, 13, 5215, 11799, 13, 5215, 775, 2395, 13, 5215, 274, 1231, 5971, 13, 13, 3166, 9557, 29889, 1124, 1053, 13763, 292, 5506, 5103, 13, 3166, 9557, 29889, 7406, 29889, 19206, 1053, 4533, 13, 13, 13, 15945, 29908, 13, 31151, 30607, 232, 150, 144, 31370, 3835, 292, 5506, 5103, 30682, 30651, 232, 194, 174, 31859, 29892, 31669, 31600, 30728, 30946, 30533, 231, 189, 170, 30486, 30287, 30502, 30257, 30883, 30333, 30631, 13, 15945, 29908, 13, 13, 13, 1990, 382, 1859, 29898, 3318, 1125, 13, 1678, 9995, 2744, 1203, 393, 10703, 925, 278, 2436, 1158, 310, 278, 934, 29899, 4561, 5067, 1213, 15945, 13, 1678, 822, 2436, 29898, 1311, 29892, 995, 1125, 13, 4706, 9995, 6113, 278, 995, 491, 7863, 372, 29892, 2012, 310, 15446, 297, 263, 6835, 1213, 15945, 13, 4706, 736, 995, 13, 13, 13, 1990, 23862, 10507, 29898, 3318, 1125, 13, 13, 1678, 9995, 13, 1678, 319, 16874, 9227, 607, 674, 2436, 4206, 304, 16874, 934, 376, 29888, 613, 13, 1678, 607, 338, 18511, 297, 278, 2183, 8025, 29889, 13, 1678, 9995, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 285, 29892, 23725, 29922, 7638, 29889, 24633, 29892, 8025, 2433, 9420, 29899, 29947, 742, 3579, 19290, 1125, 13, 4706, 396, 4367, 1088, 1962, 304, 263, 9521, 13, 4706, 1583, 29889, 9990, 353, 274, 1231, 5971, 29889, 1231, 5971, 580, 13, 4706, 1583, 29889, 13236, 353, 11799, 29889, 13236, 29898, 1311, 29889, 9990, 29892, 23725, 29922, 15321, 781, 29892, 3579, 19290, 29897, 13, 4706, 1583, 29889, 5461, 353, 285, 13, 4706, 1583, 29889, 3977, 6119, 353, 775, 2395, 29889, 657, 25629, 284, 3977, 6119, 29898, 22331, 29897, 580, 13, 13, 1678, 822, 9227, 340, 29898, 1311, 29892, 1948, 1125, 13, 4706, 1583, 29889, 13236, 29889, 13236, 340, 4197, 8411, 29918, 4914, 29898, 29879, 29897, 363, 269, 297, 1948, 2314, 13, 4706, 396, 383, 3486, 18351, 29899, 29947, 1962, 515, 278, 9521, 2023, 13, 4706, 848, 353, 1583, 29889, 9990, 29889, 657, 1767, 580, 13, 4706, 848, 353, 848, 29889, 13808, 703, 9420, 29899, 29947, 1159, 13, 4706, 396, 2023, 322, 337, 12508, 372, 964, 278, 3646, 8025, 13, 4706, 848, 353, 1583, 29889, 3977, 6119, 29889, 12508, 29898, 1272, 29897, 13, 4706, 396, 2436, 304, 278, 3646, 4840, 13, 4706, 995, 353, 1583, 29889, 5461, 29889, 3539, 29898, 1272, 29897, 13, 4706, 396, 4069, 9521, 13, 4706, 1583, 29889, 9990, 29889, 509, 4661, 403, 29898, 29900, 29897, 13, 4706, 736, 995, 13, 13, 1678, 822, 9227, 1242, 29898, 1311, 29892, 4206, 1125, 13, 4706, 363, 1948, 297, 4206, 29901, 13, 9651, 1583, 29889, 13236, 340, 29898, 798, 29897, 13, 13, 13, 1990, 8741, 1043, 29898, 1043, 1125, 13, 13, 1678, 9066, 353, 6702, 30287, 31959, 742, 525, 30746, 31584, 1495, 13, 13, 1678, 822, 679, 29898, 1311, 29892, 2009, 1125, 13, 4706, 1121, 353, 313, 13, 9651, 6702, 30622, 30287, 30448, 742, 525, 30354, 30763, 29896, 5477, 13, 9651, 6702, 30622, 30685, 30448, 742, 525, 30354, 30763, 29906, 1495, 13, 4706, 1723, 13, 4706, 2916, 261, 353, 382, 1859, 580, 13, 4706, 9227, 353, 23862, 10507, 29898, 8057, 261, 29897, 13, 13, 4706, 822, 11799, 29918, 17609, 7295, 13, 18884, 7709, 775, 2395, 29889, 29933, 6488, 29918, 10496, 29947, 13, 18884, 7709, 9227, 29889, 13236, 340, 29898, 1311, 29889, 13662, 29897, 13, 18884, 363, 1897, 297, 1121, 29901, 13, 462, 1678, 7709, 9227, 29889, 13236, 340, 29898, 4914, 29897, 13, 13, 4706, 2933, 353, 13763, 292, 5506, 5103, 29898, 13, 18884, 313, 798, 363, 1948, 297, 11799, 29918, 17609, 25739, 13, 18884, 2793, 29918, 1853, 543, 726, 29914, 7638, 29936, 3090, 842, 29922, 9420, 29899, 29947, 29908, 13, 4706, 1723, 13, 4706, 2933, 1839, 3916, 29899, 4205, 3283, 2033, 353, 525, 14930, 358, 29936, 9507, 543, 4773, 29889, 7638, 29908, 29915, 13, 4706, 736, 2933, 13, 2 ]
Scripts/TypeRig GUI/Panel/Metrics.py
twardoch/TypeRig
1
67479
<reponame>twardoch/TypeRig<gh_stars>1-10 #FLM: Glyph: Metrics # ---------------------------------------- # (C) <NAME>, 2018 (http://www.kateliev.com) # (C) Karandash Type Foundry (http://www.karandash.eu) #----------------------------------------- # No warranties. By using this you agree # that you use it at your own risk! # - Init global pLayers global pMode pLayers = None pMode = 0 app_name, app_version = 'TypeRig | Metrics', '0.22' # - Dependencies ----------------- import fontlab as fl6 import fontgate as fgt from PythonQt import QtCore from typerig import QtGui from typerig.glyph import eGlyph from typerig.gui import getProcessGlyphs # - Sub widgets ------------------------ class MLineEdit(QtGui.QLineEdit): # - Custom QLine Edit extending the contextual menu with FL6 metric expressions def __init__(self, *args, **kwargs): super(MLineEdit, self).__init__(*args, **kwargs) self.setContextMenuPolicy(QtCore.Qt.CustomContextMenu) self.customContextMenuRequested.connect(self.__contextMenu) def __contextMenu(self): self._normalMenu = self.createStandardContextMenu() self._addCustomMenuItems(self._normalMenu) self._normalMenu.exec_(QtGui.QCursor.pos()) def _addCustomMenuItems(self, menu): menu.addSeparator() menu.addAction(u'EQ', lambda: self.setText('=%s' %self.text)) menu.addAction(u'LSB', lambda: self.setText('=lsb("%s")' %self.text)) menu.addAction(u'RSB', lambda: self.setText('=rsb("%s")' %self.text)) menu.addAction(u'ADV', lambda: self.setText('=width("%s")' %self.text)) menu.addAction(u'L', lambda: self.setText('=l("%s")' %self.text)) menu.addAction(u'R', lambda: self.setText('=r("%s")' %self.text)) menu.addAction(u'W', lambda: self.setText('=w("%s")' %self.text)) menu.addAction(u'G', lambda: self.setText('=g("%s")' %self.text)) class metrics_adjust(QtGui.QGridLayout): # - Copy Metric properties from other glyph def __init__(self): super(metrics_adjust, self).__init__() # - Spin Boxes self.spb_lsb_percent = QtGui.QSpinBox() self.spb_adv_percent = QtGui.QSpinBox() self.spb_rsb_percent = QtGui.QSpinBox() self.spb_lsb_units = QtGui.QSpinBox() self.spb_adv_units = QtGui.QSpinBox() self.spb_rsb_units = QtGui.QSpinBox() self.spb_lsb_percent.setMaximum(200) self.spb_adv_percent.setMaximum(200) self.spb_rsb_percent.setMaximum(200) self.spb_lsb_units.setMaximum(200) self.spb_adv_units.setMaximum(200) self.spb_rsb_units.setMaximum(200) self.spb_lsb_units.setMinimum(-200) self.spb_adv_units.setMinimum(-200) self.spb_rsb_units.setMinimum(-200) self.spb_lsb_percent.setSuffix('%') self.spb_adv_percent.setSuffix('%') self.spb_rsb_percent.setSuffix('%') self.spb_lsb_units.setSuffix(' u') self.spb_adv_units.setSuffix(' u') self.spb_rsb_units.setSuffix(' u') self.resetSpinBox() # - Buttons self.btn_adjMetrics = QtGui.QPushButton('&Adjust Metrics') self.btn_resetSpinBox = QtGui.QPushButton('&Reset') self.btn_adjMetrics.clicked.connect(self.adjMetrics) self.btn_resetSpinBox.clicked.connect(self.resetSpinBox) self.addWidget(QtGui.QLabel('LSB adjust:'), 0, 0, 1, 1) self.addWidget(QtGui.QLabel('RSB adjust:'), 0, 1, 1, 1) self.addWidget(QtGui.QLabel('ADV adjust:'), 0, 2, 1, 1) self.addWidget(self.spb_lsb_percent, 1, 0, 1, 1) self.addWidget(self.spb_rsb_percent, 1, 1, 1, 1) self.addWidget(self.spb_adv_percent, 1, 2, 1, 1) self.addWidget(self.spb_lsb_units, 2, 0, 1, 1) self.addWidget(self.spb_rsb_units, 2, 1, 1, 1) self.addWidget(self.spb_adv_units, 2, 2, 1, 1) self.addWidget(self.btn_resetSpinBox, 3, 0, 1, 1) self.addWidget(self.btn_adjMetrics, 3, 1, 1, 2) def resetSpinBox(self): # - Reset spin-box values self.spb_lsb_percent.setValue(100) self.spb_adv_percent.setValue(100) self.spb_rsb_percent.setValue(100) self.spb_lsb_units.setValue(0) self.spb_adv_units.setValue(0) self.spb_rsb_units.setValue(0) def adjMetrics(self): process_glyphs = getProcessGlyphs(pMode) for glyph in process_glyphs: wLayers = glyph._prepareLayers(pLayers) copyOrder = [False]*3 srcGlyphs = [glyph.name]*3 adjPercents = (self.spb_lsb_percent.value, self.spb_rsb_percent.value, self.spb_adv_percent.value) adjUnits = (self.spb_lsb_units.value, self.spb_rsb_units.value, self.spb_adv_units.value) for layer in wLayers: glyph.setLSB(glyph.getLSB(layer)*adjPercents[0]/100 + adjUnits[0], layer) glyph.setRSB(glyph.getRSB(layer)*adjPercents[1]/100 + adjUnits[1], layer) glyph.setAdvance(glyph.getAdvance(layer)*adjPercents[2]/100 + adjUnits[2], layer) glyph.updateObject(glyph.fl, 'Adjust Metrics @ %s | %s' %('; '.join(wLayers), zip(('LSB','RSB','ADV'), adjPercents, adjUnits))) glyph.update() class metrics_copy(QtGui.QGridLayout): # - Copy Metric properties from other glyph def __init__(self): super(metrics_copy, self).__init__() # - Edit Fields self.edt_lsb = QtGui.QLineEdit() self.edt_adv = QtGui.QLineEdit() self.edt_rsb = QtGui.QLineEdit() self.edt_lsb.setPlaceholderText('Glyph Name') self.edt_adv.setPlaceholderText('Glyph Name') self.edt_rsb.setPlaceholderText('Glyph Name') # - Spin Box self.spb_lsb_percent = QtGui.QSpinBox() self.spb_adv_percent = QtGui.QSpinBox() self.spb_rsb_percent = QtGui.QSpinBox() self.spb_lsb_units = QtGui.QSpinBox() self.spb_adv_units = QtGui.QSpinBox() self.spb_rsb_units = QtGui.QSpinBox() self.spb_lsb_percent.setMaximum(200) self.spb_adv_percent.setMaximum(200) self.spb_rsb_percent.setMaximum(200) self.spb_lsb_units.setMaximum(200) self.spb_adv_units.setMaximum(200) self.spb_rsb_units.setMaximum(200) self.spb_lsb_units.setMinimum(-200) self.spb_adv_units.setMinimum(-200) self.spb_rsb_units.setMinimum(-200) self.spb_lsb_percent.setSuffix('%') self.spb_adv_percent.setSuffix('%') self.spb_rsb_percent.setSuffix('%') self.spb_lsb_units.setSuffix(' u') self.spb_adv_units.setSuffix(' u') self.spb_rsb_units.setSuffix(' u') self.spb_lsb_percent.setMaximumWidth(50) self.spb_adv_percent.setMaximumWidth(50) self.spb_rsb_percent.setMaximumWidth(50) self.spb_lsb_units.setMaximumWidth(50) self.spb_adv_units.setMaximumWidth(50) self.spb_rsb_units.setMaximumWidth(50) self.reset_fileds() # - Buttons self.btn_copyMetrics = QtGui.QPushButton('&Copy Metrics') self.btn_copyMetrics.clicked.connect(self.copyMetrics) # - Build self.addWidget(QtGui.QLabel('LSB:'), 0, 0, 1, 1) self.addWidget(self.edt_lsb, 0, 1, 1, 3) self.addWidget(QtGui.QLabel('@'), 0, 4, 1, 1) self.addWidget(self.spb_lsb_percent, 0, 5, 1, 1) self.addWidget(QtGui.QLabel('+'), 0, 6, 1, 1) self.addWidget(self.spb_lsb_units, 0, 7, 1, 1) self.addWidget(QtGui.QLabel('RSB:'), 1, 0, 1, 1) self.addWidget(self.edt_rsb, 1, 1, 1, 3) self.addWidget(QtGui.QLabel('@'), 1, 4, 1, 1) self.addWidget(self.spb_rsb_percent, 1, 5, 1, 1) self.addWidget(QtGui.QLabel('+'), 1, 6, 1, 1) self.addWidget(self.spb_rsb_units, 1, 7, 1, 1) self.addWidget(QtGui.QLabel('ADV:'), 2, 0, 1, 1) self.addWidget(self.edt_adv, 2, 1, 1, 3) self.addWidget(QtGui.QLabel('@'), 2, 4, 1, 1) self.addWidget(self.spb_adv_percent, 2, 5, 1, 1) self.addWidget(QtGui.QLabel('+'), 2, 6, 1, 1) self.addWidget(self.spb_adv_units, 2, 7, 1, 1) self.addWidget(self.btn_copyMetrics, 3, 1, 1, 8) def reset_fileds(self): # - Reset text fields self.edt_lsb.setText('') self.edt_adv.setText('') self.edt_rsb.setText('') # - Reset spin-box self.spb_lsb_percent.setValue(100) self.spb_adv_percent.setValue(100) self.spb_rsb_percent.setValue(100) self.spb_lsb_units.setValue(0) self.spb_adv_units.setValue(0) self.spb_rsb_units.setValue(0) def copyMetrics(self): process_glyphs = getProcessGlyphs(pMode) for glyph in process_glyphs: copyOrder = ['--' in name for name in (self.edt_lsb.text, self.edt_rsb.text, self.edt_adv.text)] srcGlyphs = [str(name).replace('--', '') if len(name) else None for name in (self.edt_lsb.text, self.edt_rsb.text, self.edt_adv.text)] adjPercents = (self.spb_lsb_percent.value, self.spb_rsb_percent.value, self.spb_adv_percent.value) adjUnits = (self.spb_lsb_units.value, self.spb_rsb_units.value, self.spb_adv_units.value) glyph.copyMetricsbyName(srcGlyphs, pLayers, copyOrder, adjPercents, adjUnits) glyph.updateObject(glyph.fl, 'Copy Metrics | LSB: %s; RSB: %s; ADV:%s.' %(srcGlyphs[0], srcGlyphs[1], srcGlyphs[2])) glyph.update() self.reset_fileds() class metrics_expr(QtGui.QGridLayout): # - Copy Metric properties from other glyph def __init__(self): super(metrics_expr, self).__init__() self.edt_lsb = MLineEdit() self.edt_adv = MLineEdit() self.edt_rsb = MLineEdit() self.edt_lsb.setPlaceholderText('Metric expression') self.edt_adv.setPlaceholderText('Metric expression') self.edt_rsb.setPlaceholderText('Metric expression') self.btn_setMetrics = QtGui.QPushButton('&Set expressions') self.btn_getShapeParent = QtGui.QPushButton('&Get reference') self.btn_delMetrics = QtGui.QPushButton('&Unlink') self.btn_autoBind = QtGui.QPushButton('&Auto bind Metric expressions') self.btn_autoBind.setToolTip('Automatically bind metric expressions from available element references.') self.btn_setMetrics.clicked.connect(lambda: self.setMetricEquations(False)) self.btn_delMetrics.clicked.connect(lambda: self.setMetricEquations(True)) self.btn_getShapeParent.clicked.connect(self.bindShapeParent) self.btn_autoBind.clicked.connect(self.autoMetricEquations) self.spb_shapeIndex = QtGui.QSpinBox() self.addWidget(QtGui.QLabel('LSB:'), 0, 0, 1, 1) self.addWidget(self.edt_lsb, 0, 1, 1, 5) self.addWidget(QtGui.QLabel('RSB:'), 1, 0, 1, 1) self.addWidget(self.edt_rsb, 1, 1, 1, 5) self.addWidget(QtGui.QLabel('ADV:'), 2, 0, 1, 1) self.addWidget(self.edt_adv, 2, 1, 1, 5) self.addWidget(self.btn_setMetrics, 3, 1, 1, 3) self.addWidget(self.btn_delMetrics, 3, 4, 1, 2) self.addWidget(QtGui.QLabel('E:'), 4, 0, 1, 1) self.addWidget(self.btn_getShapeParent, 4, 1, 1, 3) self.addWidget(self.spb_shapeIndex, 4, 4, 1, 2) self.addWidget(QtGui.QLabel('Composite Glyph: Metric expressions'), 5, 0, 1, 5) self.addWidget(self.btn_autoBind, 6, 0, 1, 6) self.setColumnStretch(0, 0) self.setColumnStretch(1, 5) def reset_fileds(self): self.edt_lsb.clear() self.edt_adv.clear() self.edt_rsb.clear() def bindShapeParent(self): glyph = eGlyph() layer = None # Static! Make it smart, so it detects on all layers, dough unnecessary shapeIndex = self.spb_shapeIndex.value # Static! Make it smart, so it detects... namedShapes = [shape for shape in glyph.shapes() + glyph.components() if len(shape.shapeData.name)] try: wShape = namedShapes[shapeIndex] transform = wShape.transform if len(wShape.shapeData.name): if transform.m11() > 0: self.edt_lsb.setText('=%s' %wShape.shapeData.name) self.edt_rsb.setText('=%s' %wShape.shapeData.name) else: self.edt_lsb.setText('=rsb("%s")' %wShape.shapeData.name) self.edt_rsb.setText('=lsb("%s")' %wShape.shapeData.name) except IndexError: print 'ERROR: Glyph /%s - No NAMED SHAPE with INDEX [%s] found!' %(glyph.name, shapeIndex) def setMetricEquations(self, clear=False): process_glyphs = getProcessGlyphs(pMode) for glyph in process_glyphs: wLayers = glyph._prepareLayers(pLayers) for layer in wLayers: if not clear: if len(self.edt_lsb.text): glyph.setLSBeq(self.edt_lsb.text, layer) if len(self.edt_rsb.text): glyph.setRSBeq(self.edt_rsb.text, layer) if len(self.edt_adv.text): glyph.setADVeq(self.edt_adv.text, layer) else: glyph.setLSBeq('', layer) glyph.setRSBeq('', layer) glyph.setADVeq('', layer) glyph.update() glyph.updateObject(glyph.fl, 'Set Metrics Equations @ %s.' %'; '.join(wLayers)) self.reset_fileds() def autoMetricEquations(self): process_glyphs = getProcessGlyphs(pMode) for glyph in process_glyphs: wLayers = glyph._prepareLayers(pLayers) glyph_stat = [] for layer in wLayers: status = glyph.bindCompMetrics(layer) glyph_stat.append(status) glyph.update() glyph.updateObject(glyph.fl, 'Glyph: %s;\tAuto Metrics Equations @ %s.' %(glyph.name, '; '.join('%s: %s' %item for item in zip(wLayers, glyph_stat)))) class metrics_font(QtGui.QGridLayout): # - Copy Metric properties from other glyph def __init__(self): super(metrics_font, self).__init__() self.btn_setAscender = QtGui.QPushButton('Asc.') self.btn_setCapsHeight = QtGui.QPushButton('Caps') self.btn_setDescender = QtGui.QPushButton('Desc.') self.btn_setXHeight = QtGui.QPushButton('X Hgt.') self.btn_togSelection = QtGui.QPushButton('Selection') self.btn_togBBOX = QtGui.QPushButton('Glyph BBOX') self.btn_togSelection.setCheckable(True) self.btn_togBBOX.setCheckable(True) #self.btn_togBBOX.setEnabled(False) self.btn_setAscender.setToolTip('Set Ascender height ') self.btn_setCapsHeight.setToolTip('Set Caps Height') self.btn_setDescender.setToolTip('Set Descender height') self.btn_setXHeight.setToolTip('Set X Height') self.btn_togSelection.setToolTip('Set Font metrics using the selected node') self.btn_togBBOX.setToolTip('Set Font metrics using the active glyph bounding box') self.btn_setAscender.setMinimumWidth(40) self.btn_setCapsHeight.setMinimumWidth(40) self.btn_setDescender.setMinimumWidth(40) self.btn_setXHeight.setMinimumWidth(40) self.btn_setAscender.clicked.connect(lambda: self.setFontMetrics('ascender')) self.btn_setCapsHeight.clicked.connect(lambda: self.setFontMetrics('capsHeight')) self.btn_setDescender .clicked.connect(lambda: self.setFontMetrics('descender')) self.btn_setXHeight.clicked.connect(lambda: self.setFontMetrics('xHeight')) self.addWidget(self.btn_togSelection, 0,0,1,2) self.addWidget(self.btn_togBBOX, 0,2,1,2) self.addWidget(self.btn_setAscender, 1,0,1,1) self.addWidget(self.btn_setCapsHeight, 1,1,1,1) self.addWidget(self.btn_setDescender, 1,2,1,1) self.addWidget(self.btn_setXHeight, 1,3,1,1) def setFontMetrics(self, metricName): glyph = eGlyph() wLayers = glyph._prepareLayers(pLayers) for layer in wLayers: if self.btn_togSelection.isChecked(): selection = glyph.selectedNodes(layer) if len(selection): glyph.package.setMaster(layer) exec('glyph.package.%s_value = selection[0].y' %metricName) if self.btn_togBBOX.isChecked(): glyph.package.setMaster(layer) bbox_layer = glyph.layer(layer).boundingBox if metricName in ['ascender', 'capsHeight', 'xHeight']: exec('glyph.package.%s_value = int(bbox_layer.y() + bbox_layer.height())' %metricName) elif metricName == 'descender': glyph.package.descender_value = int(bbox_layer.y()) self.btn_togSelection.setChecked(False) self.btn_togBBOX.setChecked(False) glyph.update() glyph.updateObject(glyph.package, 'Set Font Metrics: %s @ %s.' %(metricName, '; '.join(wLayers))) # - Tabs ------------------------------- class tool_tab(QtGui.QWidget): def __init__(self): super(tool_tab, self).__init__() # - Init layoutV = QtGui.QVBoxLayout() # - Build #layoutV.addWidget(QtGui.QLabel('Glyph: Adjust Metric data')) layoutV.addLayout(metrics_adjust()) layoutV.addSpacing(10) layoutV.addWidget(QtGui.QLabel('Glyph: Copy Metric data')) layoutV.addLayout(metrics_copy()) layoutV.addSpacing(10) layoutV.addWidget(QtGui.QLabel('Glyph: Set metric expressions')) layoutV.addLayout(metrics_expr()) layoutV.addSpacing(10) layoutV.addWidget(QtGui.QLabel('\nFont: Set Font Metrics')) layoutV.addLayout(metrics_font()) # - Build --------------------------- layoutV.addStretch() self.setLayout(layoutV) # - Test ---------------------- if __name__ == '__main__': test = tool_tab() test.setWindowTitle('%s %s' %(app_name, app_version)) test.setGeometry(300, 300, 280, 400) test.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint) # Always on top!! test.show()
[ 1, 529, 276, 1112, 420, 29958, 29873, 1328, 2878, 29914, 1542, 29934, 335, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 29937, 10536, 29924, 29901, 402, 27026, 29901, 4737, 10817, 13, 29937, 448, 2683, 2683, 26589, 13, 29937, 313, 29907, 29897, 529, 5813, 10202, 29871, 29906, 29900, 29896, 29947, 313, 1124, 597, 1636, 29889, 29895, 14830, 10384, 29889, 510, 29897, 13, 29937, 313, 29907, 29897, 3467, 392, 1161, 5167, 7460, 719, 313, 1124, 597, 1636, 29889, 5689, 392, 1161, 29889, 12932, 29897, 13, 29937, 2683, 2683, 1378, 29899, 13, 13, 29937, 1939, 1370, 21867, 583, 29889, 2648, 773, 445, 366, 8661, 13, 29937, 393, 366, 671, 372, 472, 596, 1914, 12045, 29991, 13, 13, 29937, 448, 10886, 13, 10945, 282, 29931, 388, 414, 13, 10945, 282, 6818, 13, 29886, 29931, 388, 414, 353, 6213, 13, 29886, 6818, 353, 29871, 29900, 13, 932, 29918, 978, 29892, 623, 29918, 3259, 353, 525, 1542, 29934, 335, 891, 4737, 10817, 742, 525, 29900, 29889, 29906, 29906, 29915, 13, 13, 29937, 448, 10034, 7158, 448, 2683, 13, 5215, 4079, 8205, 408, 1652, 29953, 13, 5215, 4079, 17062, 408, 285, 4141, 13, 3166, 5132, 17303, 1053, 14705, 9203, 13, 3166, 7911, 546, 335, 1053, 14705, 28707, 13, 3166, 7911, 546, 335, 29889, 16808, 561, 1053, 321, 29954, 27026, 13, 3166, 7911, 546, 335, 29889, 23569, 1053, 679, 7032, 29954, 27026, 29879, 13, 13, 29937, 448, 3323, 11109, 29879, 448, 2683, 26589, 13, 1990, 341, 3542, 6103, 29898, 17303, 28707, 29889, 2239, 457, 6103, 1125, 13, 12, 29937, 448, 8701, 660, 3542, 7641, 23771, 278, 3030, 950, 6143, 411, 383, 29931, 29953, 12714, 12241, 13, 12, 1753, 4770, 2344, 12035, 1311, 29892, 334, 5085, 29892, 3579, 19290, 1125, 13, 12, 12, 9136, 29898, 1988, 457, 6103, 29892, 1583, 467, 1649, 2344, 1649, 10456, 5085, 29892, 3579, 19290, 29897, 13, 12, 12, 1311, 29889, 842, 2677, 6823, 15644, 29898, 17303, 9203, 29889, 17303, 29889, 7281, 2677, 6823, 29897, 13, 12, 12, 1311, 29889, 6341, 2677, 6823, 3089, 287, 29889, 6915, 29898, 1311, 17255, 4703, 6823, 29897, 13, 13, 12, 1753, 4770, 4703, 6823, 29898, 1311, 1125, 13, 12, 12, 1311, 3032, 8945, 6823, 353, 1583, 29889, 3258, 15449, 2677, 6823, 580, 13, 12, 12, 1311, 3032, 1202, 7281, 6823, 6913, 29898, 1311, 3032, 8945, 6823, 29897, 13, 12, 12, 1311, 3032, 8945, 6823, 29889, 4258, 23538, 17303, 28707, 29889, 29984, 19890, 29889, 1066, 3101, 13, 13, 12, 1753, 903, 1202, 7281, 6823, 6913, 29898, 1311, 29892, 6143, 1125, 13, 12, 12, 6510, 29889, 1202, 2008, 17954, 580, 13, 12, 12, 6510, 29889, 1202, 4276, 29898, 29884, 29915, 28879, 742, 14013, 29901, 1583, 29889, 12038, 877, 16328, 29879, 29915, 1273, 1311, 29889, 726, 876, 13, 12, 12, 6510, 29889, 1202, 4276, 29898, 29884, 29915, 29931, 1744, 742, 14013, 29901, 1583, 29889, 12038, 877, 29922, 3137, 29890, 11702, 29879, 1159, 29915, 1273, 1311, 29889, 726, 876, 13, 12, 12, 6510, 29889, 1202, 4276, 29898, 29884, 29915, 29934, 1744, 742, 14013, 29901, 1583, 29889, 12038, 877, 29922, 2288, 29890, 11702, 29879, 1159, 29915, 1273, 1311, 29889, 726, 876, 13, 12, 12, 6510, 29889, 1202, 4276, 29898, 29884, 29915, 3035, 29963, 742, 14013, 29901, 1583, 29889, 12038, 877, 29922, 2103, 11702, 29879, 1159, 29915, 1273, 1311, 29889, 726, 876, 13, 12, 12, 6510, 29889, 1202, 4276, 29898, 29884, 29915, 29931, 742, 14013, 29901, 1583, 29889, 12038, 877, 29922, 29880, 11702, 29879, 1159, 29915, 1273, 1311, 29889, 726, 876, 13, 12, 12, 6510, 29889, 1202, 4276, 29898, 29884, 29915, 29934, 742, 14013, 29901, 1583, 29889, 12038, 877, 29922, 29878, 11702, 29879, 1159, 29915, 1273, 1311, 29889, 726, 876, 13, 12, 12, 6510, 29889, 1202, 4276, 29898, 29884, 29915, 29956, 742, 14013, 29901, 1583, 29889, 12038, 877, 29922, 29893, 11702, 29879, 1159, 29915, 1273, 1311, 29889, 726, 876, 13, 12, 12, 6510, 29889, 1202, 4276, 29898, 29884, 29915, 29954, 742, 14013, 29901, 1583, 29889, 12038, 877, 29922, 29887, 11702, 29879, 1159, 29915, 1273, 1311, 29889, 726, 876, 12, 13, 12, 12, 13, 1990, 21556, 29918, 328, 5143, 29898, 17303, 28707, 29889, 29984, 5756, 3453, 1125, 13, 12, 29937, 448, 14187, 4737, 2200, 4426, 515, 916, 330, 27026, 13, 12, 1753, 4770, 2344, 12035, 1311, 1125, 13, 12, 12, 9136, 29898, 2527, 10817, 29918, 328, 5143, 29892, 1583, 467, 1649, 2344, 1649, 580, 13, 12, 12, 29937, 448, 1706, 262, 1952, 9100, 13, 12, 12, 1311, 29889, 1028, 29890, 29918, 3137, 29890, 29918, 25376, 353, 29871, 14705, 28707, 29889, 29984, 5592, 262, 3313, 580, 13, 12, 12, 1311, 29889, 1028, 29890, 29918, 17263, 29918, 25376, 353, 14705, 28707, 29889, 29984, 5592, 262, 3313, 580, 13, 12, 12, 1311, 29889, 1028, 29890, 29918, 2288, 29890, 29918, 25376, 353, 14705, 28707, 29889, 29984, 5592, 262, 3313, 580, 13, 12, 12, 1311, 29889, 1028, 29890, 29918, 3137, 29890, 29918, 348, 1169, 353, 29871, 14705, 28707, 29889, 29984, 5592, 262, 3313, 580, 13, 12, 12, 1311, 29889, 1028, 29890, 29918, 17263, 29918, 348, 1169, 353, 14705, 28707, 29889, 29984, 5592, 262, 3313, 580, 13, 12, 12, 1311, 29889, 1028, 29890, 29918, 2288, 29890, 29918, 348, 1169, 353, 14705, 28707, 29889, 29984, 5592, 262, 3313, 580, 13, 13, 12, 12, 1311, 29889, 1028, 29890, 29918, 3137, 29890, 29918, 25376, 29889, 842, 7976, 12539, 29898, 29906, 29900, 29900, 29897, 13, 12, 12, 1311, 29889, 1028, 29890, 29918, 17263, 29918, 25376, 29889, 842, 7976, 12539, 29898, 29906, 29900, 29900, 29897, 13, 12, 12, 1311, 29889, 1028, 29890, 29918, 2288, 29890, 29918, 25376, 29889, 842, 7976, 12539, 29898, 29906, 29900, 29900, 29897, 13, 12, 12, 1311, 29889, 1028, 29890, 29918, 3137, 29890, 29918, 348, 1169, 29889, 842, 7976, 12539, 29898, 29906, 29900, 29900, 29897, 13, 12, 12, 1311, 29889, 1028, 29890, 29918, 17263, 29918, 348, 1169, 29889, 842, 7976, 12539, 29898, 29906, 29900, 29900, 29897, 13, 12, 12, 1311, 29889, 1028, 29890, 29918, 2288, 29890, 29918, 348, 1169, 29889, 842, 7976, 12539, 29898, 29906, 29900, 29900, 29897, 13, 12, 12, 1311, 29889, 1028, 29890, 29918, 3137, 29890, 29918, 348, 1169, 29889, 842, 8140, 12539, 6278, 29906, 29900, 29900, 29897, 13, 12, 12, 1311, 29889, 1028, 29890, 29918, 17263, 29918, 348, 1169, 29889, 842, 8140, 12539, 6278, 29906, 29900, 29900, 29897, 13, 12, 12, 1311, 29889, 1028, 29890, 29918, 2288, 29890, 29918, 348, 1169, 29889, 842, 8140, 12539, 6278, 29906, 29900, 29900, 29897, 13, 13, 12, 12, 1311, 29889, 1028, 29890, 29918, 3137, 29890, 29918, 25376, 29889, 842, 29903, 3096, 861, 877, 29995, 1495, 13, 12, 12, 1311, 29889, 1028, 29890, 29918, 17263, 29918, 25376, 29889, 842, 29903, 3096, 861, 877, 29995, 1495, 13, 12, 12, 1311, 29889, 1028, 29890, 29918, 2288, 29890, 29918, 25376, 29889, 842, 29903, 3096, 861, 877, 29995, 1495, 13, 12, 12, 1311, 29889, 1028, 29890, 29918, 3137, 29890, 29918, 348, 1169, 29889, 842, 29903, 3096, 861, 877, 318, 1495, 13, 12, 12, 1311, 29889, 1028, 29890, 29918, 17263, 29918, 348, 1169, 29889, 842, 29903, 3096, 861, 877, 318, 1495, 13, 12, 12, 1311, 29889, 1028, 29890, 29918, 2288, 29890, 29918, 348, 1169, 29889, 842, 29903, 3096, 861, 877, 318, 1495, 13, 13, 12, 12, 1311, 29889, 12071, 5592, 262, 3313, 580, 13, 13, 12, 12, 29937, 448, 1205, 7453, 13, 12, 12, 1311, 29889, 7290, 29918, 26859, 10095, 10817, 353, 14705, 28707, 29889, 29984, 27031, 3125, 877, 29987, 3253, 5143, 4737, 10817, 1495, 13, 12, 12, 1311, 29889, 7290, 29918, 12071, 5592, 262, 3313, 353, 14705, 28707, 29889, 29984, 27031, 3125, 877, 29987, 27175, 1495, 13, 12, 12, 1311, 29889, 7290, 29918, 26859, 10095, 10817, 29889, 3808, 287, 29889, 6915, 29898, 1311, 29889, 26859, 10095, 10817, 29897, 13, 12, 12, 1311, 29889, 7290, 29918, 12071, 5592, 262, 3313, 29889, 3808, 287, 29889, 6915, 29898, 1311, 29889, 12071, 5592, 262, 3313, 29897, 13, 13, 12, 12, 1311, 29889, 1202, 8801, 29898, 17303, 28707, 29889, 2239, 1107, 877, 29931, 1744, 10365, 29901, 5477, 29871, 12, 29900, 29892, 29871, 29900, 29892, 29871, 29896, 29892, 29871, 29896, 29897, 13, 12, 12, 1311, 29889, 1202, 8801, 29898, 17303, 28707, 29889, 2239, 1107, 877, 29934, 1744, 10365, 29901, 5477, 29871, 12, 29900, 29892, 29871, 29896, 29892, 29871, 29896, 29892, 29871, 29896, 29897, 13, 12, 12, 1311, 29889, 1202, 8801, 29898, 17303, 28707, 29889, 2239, 1107, 877, 3035, 29963, 10365, 29901, 5477, 29871, 12, 29900, 29892, 29871, 29906, 29892, 29871, 29896, 29892, 29871, 29896, 29897, 13, 12, 12, 1311, 29889, 1202, 8801, 29898, 1311, 29889, 1028, 29890, 29918, 3137, 29890, 29918, 25376, 29892, 29871, 12, 29896, 29892, 29871, 29900, 29892, 29871, 29896, 29892, 29871, 29896, 29897, 13, 12, 12, 1311, 29889, 1202, 8801, 29898, 1311, 29889, 1028, 29890, 29918, 2288, 29890, 29918, 25376, 29892, 29871, 12, 29896, 29892, 29871, 29896, 29892, 29871, 29896, 29892, 29871, 29896, 29897, 13, 12, 12, 1311, 29889, 1202, 8801, 29898, 1311, 29889, 1028, 29890, 29918, 17263, 29918, 25376, 29892, 29871, 12, 29896, 29892, 29871, 29906, 29892, 29871, 29896, 29892, 29871, 29896, 29897, 13, 13, 12, 12, 1311, 29889, 1202, 8801, 29898, 1311, 29889, 1028, 29890, 29918, 3137, 29890, 29918, 348, 1169, 29892, 29871, 12, 12, 29906, 29892, 29871, 29900, 29892, 29871, 29896, 29892, 29871, 29896, 29897, 13, 12, 12, 1311, 29889, 1202, 8801, 29898, 1311, 29889, 1028, 29890, 29918, 2288, 29890, 29918, 348, 1169, 29892, 29871, 12, 12, 29906, 29892, 29871, 29896, 29892, 29871, 29896, 29892, 29871, 29896, 29897, 13, 12, 12, 1311, 29889, 1202, 8801, 29898, 1311, 29889, 1028, 29890, 29918, 17263, 29918, 348, 1169, 29892, 29871, 12, 12, 29906, 29892, 29871, 29906, 29892, 29871, 29896, 29892, 29871, 29896, 29897, 13, 13, 12, 12, 1311, 29889, 1202, 8801, 29898, 1311, 29889, 7290, 29918, 12071, 5592, 262, 3313, 29892, 29871, 12, 29941, 29892, 29871, 29900, 29892, 29871, 29896, 29892, 29871, 29896, 29897, 13, 12, 12, 1311, 29889, 1202, 8801, 29898, 1311, 29889, 7290, 29918, 26859, 10095, 10817, 29892, 29871, 12, 29941, 29892, 29871, 29896, 29892, 29871, 29896, 29892, 29871, 29906, 29897, 13, 13, 12, 1753, 10092, 5592, 262, 3313, 29898, 1311, 1125, 13, 12, 12, 29937, 448, 2538, 300, 10917, 29899, 1884, 1819, 13, 12, 12, 1311, 29889, 1028, 29890, 29918, 3137, 29890, 29918, 25376, 29889, 842, 1917, 29898, 29896, 29900, 29900, 29897, 13, 12, 12, 1311, 29889, 1028, 29890, 29918, 17263, 29918, 25376, 29889, 842, 1917, 29898, 29896, 29900, 29900, 29897, 13, 12, 12, 1311, 29889, 1028, 29890, 29918, 2288, 29890, 29918, 25376, 29889, 842, 1917, 29898, 29896, 29900, 29900, 29897, 13, 12, 12, 1311, 29889, 1028, 29890, 29918, 3137, 29890, 29918, 348, 1169, 29889, 842, 1917, 29898, 29900, 29897, 13, 12, 12, 1311, 29889, 1028, 29890, 29918, 17263, 29918, 348, 1169, 29889, 842, 1917, 29898, 29900, 29897, 13, 12, 12, 1311, 29889, 1028, 29890, 29918, 2288, 29890, 29918, 348, 1169, 29889, 842, 1917, 29898, 29900, 29897, 13, 13, 12, 1753, 12109, 10095, 10817, 29898, 1311, 1125, 13, 12, 12, 5014, 29918, 16808, 561, 29879, 353, 679, 7032, 29954, 27026, 29879, 29898, 29886, 6818, 29897, 13, 13, 12, 12, 1454, 330, 27026, 297, 1889, 29918, 16808, 561, 29879, 29901, 12, 13, 12, 12, 12, 29893, 29931, 388, 414, 353, 330, 27026, 3032, 19125, 29931, 388, 414, 29898, 29886, 29931, 388, 414, 29897, 13, 12, 12, 12, 13, 12, 12, 12, 8552, 7514, 353, 518, 8824, 14178, 29941, 13, 12, 12, 12, 4351, 29954, 27026, 29879, 353, 518, 16808, 561, 29889, 978, 14178, 29941, 13, 12, 12, 12, 12, 12, 13, 12, 12, 12, 26859, 5894, 29883, 1237, 353, 313, 1311, 29889, 1028, 29890, 29918, 3137, 29890, 29918, 25376, 29889, 1767, 29892, 1583, 29889, 1028, 29890, 29918, 2288, 29890, 29918, 25376, 29889, 1767, 29892, 1583, 29889, 1028, 29890, 29918, 17263, 29918, 25376, 29889, 1767, 29897, 13, 12, 12, 12, 26859, 2525, 1169, 353, 313, 1311, 29889, 1028, 29890, 29918, 3137, 29890, 29918, 348, 1169, 29889, 1767, 29892, 1583, 29889, 1028, 29890, 29918, 2288, 29890, 29918, 348, 1169, 29889, 1767, 29892, 1583, 29889, 1028, 29890, 29918, 17263, 29918, 348, 1169, 29889, 1767, 29897, 13, 12, 12, 12, 13, 12, 12, 12, 1454, 7546, 297, 281, 29931, 388, 414, 29901, 13, 12, 12, 12, 12, 16808, 561, 29889, 842, 29931, 1744, 29898, 16808, 561, 29889, 657, 29931, 1744, 29898, 13148, 11877, 26859, 5894, 29883, 1237, 29961, 29900, 16261, 29896, 29900, 29900, 718, 12109, 2525, 1169, 29961, 29900, 1402, 7546, 29897, 13, 12, 12, 12, 12, 16808, 561, 29889, 842, 29934, 1744, 29898, 16808, 561, 29889, 657, 29934, 1744, 29898, 13148, 11877, 26859, 5894, 29883, 1237, 29961, 29896, 16261, 29896, 29900, 29900, 718, 12109, 2525, 1169, 29961, 29896, 1402, 7546, 29897, 13, 12, 12, 12, 12, 16808, 561, 29889, 842, 3253, 29894, 749, 29898, 16808, 561, 29889, 657, 3253, 29894, 749, 29898, 13148, 11877, 26859, 5894, 29883, 1237, 29961, 29906, 16261, 29896, 29900, 29900, 718, 12109, 2525, 1169, 29961, 29906, 1402, 7546, 29897, 13, 13, 12, 12, 12, 16808, 561, 29889, 5504, 2061, 29898, 16808, 561, 29889, 1579, 29892, 525, 3253, 5143, 4737, 10817, 732, 1273, 29879, 891, 1273, 29879, 29915, 1273, 877, 29936, 15300, 7122, 29898, 29893, 29931, 388, 414, 511, 14319, 29898, 877, 29931, 1744, 3788, 29934, 1744, 3788, 3035, 29963, 5477, 12109, 5894, 29883, 1237, 29892, 12109, 2525, 1169, 4961, 13, 12, 12, 12, 16808, 561, 29889, 5504, 580, 13, 13, 1990, 21556, 29918, 8552, 29898, 17303, 28707, 29889, 29984, 5756, 3453, 1125, 13, 12, 29937, 448, 14187, 4737, 2200, 4426, 515, 916, 330, 27026, 13, 12, 1753, 4770, 2344, 12035, 1311, 1125, 13, 12, 12, 9136, 29898, 2527, 10817, 29918, 8552, 29892, 1583, 467, 1649, 2344, 1649, 580, 13, 13, 12, 12, 29937, 448, 7641, 8989, 29879, 13, 12, 12, 1311, 29889, 287, 29873, 29918, 3137, 29890, 353, 29871, 14705, 28707, 29889, 2239, 457, 6103, 580, 13, 12, 12, 1311, 29889, 287, 29873, 29918, 17263, 353, 14705, 28707, 29889, 2239, 457, 6103, 580, 13, 12, 12, 1311, 29889, 287, 29873, 29918, 2288, 29890, 353, 259, 14705, 28707, 29889, 2239, 457, 6103, 580, 13, 13, 12, 12, 1311, 29889, 287, 29873, 29918, 3137, 29890, 29889, 842, 22150, 7694, 1626, 877, 29954, 27026, 4408, 1495, 13, 12, 12, 1311, 29889, 287, 29873, 29918, 17263, 29889, 842, 22150, 7694, 1626, 877, 29954, 27026, 4408, 1495, 13, 12, 12, 1311, 29889, 287, 29873, 29918, 2288, 29890, 29889, 842, 22150, 7694, 1626, 877, 29954, 27026, 4408, 1495, 13, 13, 12, 12, 29937, 448, 1706, 262, 11773, 13, 12, 12, 1311, 29889, 1028, 29890, 29918, 3137, 29890, 29918, 25376, 353, 29871, 14705, 28707, 29889, 29984, 5592, 262, 3313, 580, 13, 12, 12, 1311, 29889, 1028, 29890, 29918, 17263, 29918, 25376, 353, 14705, 28707, 29889, 29984, 5592, 262, 3313, 580, 13, 12, 12, 1311, 29889, 1028, 29890, 29918, 2288, 29890, 29918, 25376, 353, 14705, 28707, 29889, 29984, 5592, 262, 3313, 580, 13, 12, 12, 1311, 29889, 1028, 29890, 29918, 3137, 29890, 29918, 348, 1169, 353, 29871, 14705, 28707, 29889, 29984, 5592, 262, 3313, 580, 13, 12, 12, 1311, 29889, 1028, 29890, 29918, 17263, 29918, 348, 1169, 353, 14705, 28707, 29889, 29984, 5592, 262, 3313, 580, 13, 12, 12, 1311, 29889, 1028, 29890, 29918, 2288, 29890, 29918, 348, 1169, 353, 14705, 28707, 29889, 29984, 5592, 262, 3313, 580, 13, 13, 12, 12, 1311, 29889, 1028, 29890, 29918, 3137, 29890, 29918, 25376, 29889, 842, 7976, 12539, 29898, 29906, 29900, 29900, 29897, 13, 12, 12, 1311, 29889, 1028, 29890, 29918, 17263, 29918, 25376, 29889, 842, 7976, 12539, 29898, 29906, 29900, 29900, 29897, 13, 12, 12, 1311, 29889, 1028, 29890, 29918, 2288, 29890, 29918, 25376, 29889, 842, 7976, 12539, 29898, 29906, 29900, 29900, 29897, 13, 12, 12, 1311, 29889, 1028, 29890, 29918, 3137, 29890, 29918, 348, 1169, 29889, 842, 7976, 12539, 29898, 29906, 29900, 29900, 29897, 13, 12, 12, 1311, 29889, 1028, 29890, 29918, 17263, 29918, 348, 1169, 29889, 842, 7976, 12539, 29898, 29906, 29900, 29900, 29897, 13, 12, 12, 1311, 29889, 1028, 29890, 29918, 2288, 29890, 29918, 348, 1169, 29889, 842, 7976, 12539, 29898, 29906, 29900, 29900, 29897, 13, 12, 12, 1311, 29889, 1028, 29890, 29918, 3137, 29890, 29918, 348, 1169, 29889, 842, 8140, 12539, 6278, 29906, 29900, 29900, 29897, 13, 12, 12, 1311, 29889, 1028, 29890, 29918, 17263, 29918, 348, 1169, 29889, 842, 8140, 12539, 6278, 29906, 29900, 29900, 29897, 13, 12, 12, 1311, 29889, 1028, 29890, 29918, 2288, 29890, 29918, 348, 1169, 29889, 842, 8140, 12539, 6278, 29906, 29900, 29900, 29897, 13, 13, 12, 12, 1311, 29889, 1028, 29890, 29918, 3137, 29890, 29918, 25376, 29889, 842, 29903, 3096, 861, 877, 29995, 1495, 13, 12, 12, 1311, 29889, 1028, 29890, 29918, 17263, 29918, 25376, 29889, 842, 29903, 3096, 861, 877, 29995, 1495, 13, 12, 12, 1311, 29889, 1028, 29890, 29918, 2288, 29890, 29918, 25376, 29889, 842, 29903, 3096, 861, 877, 29995, 1495, 13, 12, 12, 1311, 29889, 1028, 29890, 29918, 3137, 29890, 29918, 348, 1169, 29889, 842, 29903, 3096, 861, 877, 318, 1495, 13, 12, 12, 1311, 29889, 1028, 29890, 29918, 17263, 29918, 348, 1169, 29889, 842, 29903, 3096, 861, 877, 318, 1495, 13, 12, 12, 1311, 29889, 1028, 29890, 29918, 2288, 29890, 29918, 348, 1169, 29889, 842, 29903, 3096, 861, 877, 318, 1495, 13, 13, 12, 12, 1311, 29889, 1028, 29890, 29918, 3137, 29890, 29918, 25376, 29889, 842, 7976, 12539, 6110, 29898, 29945, 29900, 29897, 13, 12, 12, 1311, 29889, 1028, 29890, 29918, 17263, 29918, 25376, 29889, 842, 7976, 12539, 6110, 29898, 29945, 29900, 29897, 13, 12, 12, 1311, 29889, 1028, 29890, 29918, 2288, 29890, 29918, 25376, 29889, 842, 7976, 12539, 6110, 29898, 29945, 29900, 29897, 13, 12, 12, 1311, 29889, 1028, 29890, 29918, 3137, 29890, 29918, 348, 1169, 29889, 842, 7976, 12539, 6110, 29898, 29945, 29900, 29897, 13, 12, 12, 1311, 29889, 1028, 29890, 29918, 17263, 29918, 348, 1169, 29889, 842, 7976, 12539, 6110, 29898, 29945, 29900, 29897, 13, 12, 12, 1311, 29889, 1028, 29890, 29918, 2288, 29890, 29918, 348, 1169, 29889, 842, 7976, 12539, 6110, 29898, 29945, 29900, 29897, 13, 13, 12, 12, 1311, 29889, 12071, 29918, 1445, 6289, 580, 13, 13, 12, 12, 29937, 448, 1205, 7453, 13, 12, 12, 1311, 29889, 7290, 29918, 8552, 10095, 10817, 353, 14705, 28707, 29889, 29984, 27031, 3125, 877, 29987, 11882, 4737, 10817, 1495, 13, 12, 12, 1311, 29889, 7290, 29918, 8552, 10095, 10817, 29889, 3808, 287, 29889, 6915, 29898, 1311, 29889, 8552, 10095, 10817, 29897, 13, 13, 12, 12, 29937, 448, 8878, 13, 13, 12, 12, 1311, 29889, 1202, 8801, 29898, 17303, 28707, 29889, 2239, 1107, 877, 29931, 1744, 29901, 5477, 29871, 29900, 29892, 29871, 29900, 29892, 29871, 29896, 29892, 29871, 29896, 29897, 13, 12, 12, 1311, 29889, 1202, 8801, 29898, 1311, 29889, 287, 29873, 29918, 3137, 29890, 29892, 29871, 29900, 29892, 29871, 29896, 29892, 29871, 29896, 29892, 29871, 29941, 29897, 13, 12, 12, 1311, 29889, 1202, 8801, 29898, 17303, 28707, 29889, 2239, 1107, 877, 29992, 5477, 29871, 29900, 29892, 29871, 29946, 29892, 29871, 29896, 29892, 29871, 29896, 29897, 13, 12, 12, 1311, 29889, 1202, 8801, 29898, 1311, 29889, 1028, 29890, 29918, 3137, 29890, 29918, 25376, 29892, 29871, 29900, 29892, 29871, 29945, 29892, 29871, 29896, 29892, 29871, 29896, 29897, 13, 12, 12, 1311, 29889, 1202, 8801, 29898, 17303, 28707, 29889, 2239, 1107, 877, 29974, 5477, 29871, 29900, 29892, 29871, 29953, 29892, 29871, 29896, 29892, 29871, 29896, 29897, 13, 12, 12, 1311, 29889, 1202, 8801, 29898, 1311, 29889, 1028, 29890, 29918, 3137, 29890, 29918, 348, 1169, 29892, 29871, 29900, 29892, 29871, 29955, 29892, 29871, 29896, 29892, 29871, 29896, 29897, 13, 13, 12, 12, 1311, 29889, 1202, 8801, 29898, 17303, 28707, 29889, 2239, 1107, 877, 29934, 1744, 29901, 5477, 29871, 29896, 29892, 29871, 29900, 29892, 29871, 29896, 29892, 29871, 29896, 29897, 13, 12, 12, 1311, 29889, 1202, 8801, 29898, 1311, 29889, 287, 29873, 29918, 2288, 29890, 29892, 29871, 29896, 29892, 29871, 29896, 29892, 29871, 29896, 29892, 29871, 29941, 29897, 13, 12, 12, 1311, 29889, 1202, 8801, 29898, 17303, 28707, 29889, 2239, 1107, 877, 29992, 5477, 29871, 29896, 29892, 29871, 29946, 29892, 29871, 29896, 29892, 29871, 29896, 29897, 13, 12, 12, 1311, 29889, 1202, 8801, 29898, 1311, 29889, 1028, 29890, 29918, 2288, 29890, 29918, 25376, 29892, 29871, 29896, 29892, 29871, 29945, 29892, 29871, 29896, 29892, 29871, 29896, 29897, 13, 12, 12, 1311, 29889, 1202, 8801, 29898, 17303, 28707, 29889, 2239, 1107, 877, 29974, 5477, 29871, 29896, 29892, 29871, 29953, 29892, 29871, 29896, 29892, 29871, 29896, 29897, 13, 12, 12, 1311, 29889, 1202, 8801, 29898, 1311, 29889, 1028, 29890, 29918, 2288, 29890, 29918, 348, 1169, 29892, 29871, 29896, 29892, 29871, 29955, 29892, 29871, 29896, 29892, 29871, 29896, 29897, 13, 13, 12, 12, 1311, 29889, 1202, 8801, 29898, 17303, 28707, 29889, 2239, 1107, 877, 3035, 29963, 29901, 5477, 29871, 29906, 29892, 29871, 29900, 29892, 29871, 29896, 29892, 29871, 29896, 29897, 13, 12, 12, 1311, 29889, 1202, 8801, 29898, 1311, 29889, 287, 29873, 29918, 17263, 29892, 29871, 29906, 29892, 29871, 29896, 29892, 29871, 29896, 29892, 29871, 29941, 29897, 13, 12, 12, 1311, 29889, 1202, 8801, 29898, 17303, 28707, 29889, 2239, 1107, 877, 29992, 5477, 29871, 29906, 29892, 29871, 29946, 29892, 29871, 29896, 29892, 29871, 29896, 29897, 13, 12, 12, 1311, 29889, 1202, 8801, 29898, 1311, 29889, 1028, 29890, 29918, 17263, 29918, 25376, 29892, 29871, 29906, 29892, 29871, 29945, 29892, 29871, 29896, 29892, 29871, 29896, 29897, 13, 12, 12, 1311, 29889, 1202, 8801, 29898, 17303, 28707, 29889, 2239, 1107, 877, 29974, 5477, 29871, 29906, 29892, 29871, 29953, 29892, 29871, 29896, 29892, 29871, 29896, 29897, 13, 12, 12, 1311, 29889, 1202, 8801, 29898, 1311, 29889, 1028, 29890, 29918, 17263, 29918, 348, 1169, 29892, 29871, 29906, 29892, 29871, 29955, 29892, 29871, 29896, 29892, 29871, 29896, 29897, 13, 13, 12, 12, 1311, 29889, 1202, 8801, 29898, 1311, 29889, 7290, 29918, 8552, 10095, 10817, 29892, 29871, 29941, 29892, 29871, 29896, 29892, 29871, 29896, 29892, 29871, 29947, 29897, 13, 13, 12, 1753, 10092, 29918, 1445, 6289, 29898, 1311, 1125, 13, 12, 12, 29937, 448, 2538, 300, 1426, 4235, 13, 12, 12, 1311, 29889, 287, 29873, 29918, 3137, 29890, 29889, 12038, 877, 1495, 13, 12, 12, 1311, 29889, 287, 29873, 29918, 17263, 29889, 12038, 877, 1495, 13, 12, 12, 1311, 29889, 287, 29873, 29918, 2288, 29890, 29889, 12038, 877, 1495, 13, 12, 12, 13, 12, 12, 29937, 448, 2538, 300, 10917, 29899, 1884, 13, 12, 12, 1311, 29889, 1028, 29890, 29918, 3137, 29890, 29918, 25376, 29889, 842, 1917, 29898, 29896, 29900, 29900, 29897, 13, 12, 12, 1311, 29889, 1028, 29890, 29918, 17263, 29918, 25376, 29889, 842, 1917, 29898, 29896, 29900, 29900, 29897, 13, 12, 12, 1311, 29889, 1028, 29890, 29918, 2288, 29890, 29918, 25376, 29889, 842, 1917, 29898, 29896, 29900, 29900, 29897, 13, 12, 12, 1311, 29889, 1028, 29890, 29918, 3137, 29890, 29918, 348, 1169, 29889, 842, 1917, 29898, 29900, 29897, 13, 12, 12, 1311, 29889, 1028, 29890, 29918, 17263, 29918, 348, 1169, 29889, 842, 1917, 29898, 29900, 29897, 13, 12, 12, 1311, 29889, 1028, 29890, 29918, 2288, 29890, 29918, 348, 1169, 29889, 842, 1917, 29898, 29900, 29897, 13, 13, 12, 1753, 3509, 10095, 10817, 29898, 1311, 1125, 13, 12, 12, 5014, 29918, 16808, 561, 29879, 353, 679, 7032, 29954, 27026, 29879, 29898, 29886, 6818, 29897, 13, 13, 12, 12, 1454, 330, 27026, 297, 1889, 29918, 16808, 561, 29879, 29901, 12, 12, 12, 13, 12, 12, 12, 8552, 7514, 353, 6024, 489, 29915, 297, 1024, 363, 1024, 297, 313, 1311, 29889, 287, 29873, 29918, 3137, 29890, 29889, 726, 29892, 1583, 29889, 287, 29873, 29918, 2288, 29890, 29889, 726, 29892, 1583, 29889, 287, 29873, 29918, 17263, 29889, 726, 4638, 13, 12, 12, 12, 4351, 29954, 27026, 29879, 353, 518, 710, 29898, 978, 467, 6506, 877, 489, 742, 27255, 565, 7431, 29898, 978, 29897, 1683, 6213, 363, 1024, 297, 313, 1311, 29889, 287, 29873, 29918, 3137, 29890, 29889, 726, 29892, 1583, 29889, 287, 29873, 29918, 2288, 29890, 29889, 726, 29892, 1583, 29889, 287, 29873, 29918, 17263, 29889, 726, 4638, 13, 12, 12, 12, 13, 12, 12, 12, 26859, 5894, 29883, 1237, 353, 313, 1311, 29889, 1028, 29890, 29918, 3137, 29890, 29918, 25376, 29889, 1767, 29892, 1583, 29889, 1028, 29890, 29918, 2288, 29890, 29918, 25376, 29889, 1767, 29892, 1583, 29889, 1028, 29890, 29918, 17263, 29918, 25376, 29889, 1767, 29897, 13, 12, 12, 12, 26859, 2525, 1169, 353, 313, 1311, 29889, 1028, 29890, 29918, 3137, 29890, 29918, 348, 1169, 29889, 1767, 29892, 1583, 29889, 1028, 29890, 29918, 2288, 29890, 29918, 348, 1169, 29889, 1767, 29892, 1583, 29889, 1028, 29890, 29918, 17263, 29918, 348, 1169, 29889, 1767, 29897, 13, 12, 12, 12, 13, 12, 12, 12, 16808, 561, 29889, 8552, 10095, 10817, 1609, 1170, 29898, 4351, 29954, 27026, 29879, 29892, 282, 29931, 388, 414, 29892, 3509, 7514, 29892, 12109, 5894, 29883, 1237, 29892, 12109, 2525, 1169, 29897, 13, 13, 12, 12, 12, 16808, 561, 29889, 5504, 2061, 29898, 16808, 561, 29889, 1579, 29892, 525, 11882, 4737, 10817, 891, 365, 1744, 29901, 1273, 29879, 29936, 390, 1744, 29901, 1273, 29879, 29936, 11033, 29963, 16664, 29879, 6169, 1273, 29898, 4351, 29954, 27026, 29879, 29961, 29900, 1402, 4765, 29954, 27026, 29879, 29961, 29896, 1402, 4765, 29954, 27026, 29879, 29961, 29906, 12622, 13, 12, 12, 12, 16808, 561, 29889, 5504, 580, 13, 12, 12, 13, 12, 12, 1311, 29889, 12071, 29918, 1445, 6289, 580, 13, 13, 1990, 21556, 29918, 13338, 29898, 17303, 28707, 29889, 29984, 5756, 3453, 1125, 13, 12, 29937, 448, 14187, 4737, 2200, 4426, 515, 916, 330, 27026, 13, 12, 1753, 4770, 2344, 12035, 1311, 1125, 13, 12, 12, 9136, 29898, 2527, 10817, 29918, 13338, 29892, 1583, 467, 1649, 2344, 1649, 580, 13, 13, 12, 12, 1311, 29889, 287, 29873, 29918, 3137, 29890, 353, 341, 3542, 6103, 580, 13, 12, 12, 1311, 29889, 287, 29873, 29918, 17263, 353, 341, 3542, 6103, 580, 13, 12, 12, 1311, 29889, 287, 29873, 29918, 2288, 29890, 353, 341, 3542, 6103, 580, 13, 13, 12, 12, 1311, 29889, 287, 29873, 29918, 3137, 29890, 29889, 842, 22150, 7694, 1626, 877, 10095, 2200, 4603, 1495, 13, 12, 12, 1311, 29889, 287, 29873, 29918, 17263, 29889, 842, 22150, 7694, 1626, 877, 10095, 2200, 4603, 1495, 13, 12, 12, 1311, 29889, 287, 29873, 29918, 2288, 29890, 29889, 842, 22150, 7694, 1626, 877, 10095, 2200, 4603, 1495, 13, 13, 12, 12, 1311, 29889, 7290, 29918, 842, 10095, 10817, 353, 14705, 28707, 29889, 29984, 27031, 3125, 877, 29987, 2697, 12241, 1495, 13, 12, 12, 1311, 29889, 7290, 29918, 657, 24111, 9780, 353, 14705, 28707, 29889, 29984, 27031, 3125, 877, 29987, 2577, 3407, 1495, 13, 12, 12, 1311, 29889, 7290, 29918, 6144, 10095, 10817, 353, 14705, 28707, 29889, 29984, 27031, 3125, 877, 29987, 2525, 2324, 1495, 13, 12, 12, 1311, 29889, 7290, 29918, 6921, 15708, 353, 14705, 28707, 29889, 29984, 27031, 3125, 877, 29987, 12300, 7868, 4737, 2200, 12241, 1495, 13, 12, 12, 1311, 29889, 7290, 29918, 6921, 15708, 29889, 842, 12229, 29911, 666, 877, 28451, 19574, 7868, 12714, 12241, 515, 3625, 1543, 9282, 29889, 1495, 13, 13, 12, 12, 1311, 29889, 7290, 29918, 842, 10095, 10817, 29889, 3808, 287, 29889, 6915, 29898, 2892, 29901, 1583, 29889, 842, 10095, 2200, 6108, 800, 29898, 8824, 876, 13, 12, 12, 1311, 29889, 7290, 29918, 6144, 10095, 10817, 29889, 3808, 287, 29889, 6915, 29898, 2892, 29901, 1583, 29889, 842, 10095, 2200, 6108, 800, 29898, 5574, 876, 13, 12, 12, 1311, 29889, 7290, 29918, 657, 24111, 9780, 29889, 3808, 287, 29889, 6915, 29898, 1311, 29889, 5355, 24111, 9780, 29897, 13, 12, 12, 1311, 29889, 7290, 29918, 6921, 15708, 29889, 3808, 287, 29889, 6915, 29898, 1311, 29889, 6921, 10095, 2200, 6108, 800, 29897, 13, 13, 12, 12, 1311, 29889, 1028, 29890, 29918, 12181, 3220, 353, 14705, 28707, 29889, 29984, 5592, 262, 3313, 580, 13, 13, 12, 12, 1311, 29889, 1202, 8801, 29898, 17303, 28707, 29889, 2239, 1107, 877, 29931, 1744, 29901, 5477, 29871, 12, 29900, 29892, 29871, 29900, 29892, 29871, 29896, 29892, 29871, 29896, 29897, 13, 12, 12, 1311, 29889, 1202, 8801, 29898, 1311, 29889, 287, 29873, 29918, 3137, 29890, 29892, 29871, 12, 12, 12, 29900, 29892, 29871, 29896, 29892, 29871, 29896, 29892, 29871, 29945, 29897, 13, 12, 12, 1311, 29889, 1202, 8801, 29898, 17303, 28707, 29889, 2239, 1107, 877, 29934, 1744, 29901, 5477, 29871, 12, 29896, 29892, 29871, 29900, 29892, 29871, 29896, 29892, 29871, 29896, 29897, 13, 12, 12, 1311, 29889, 1202, 8801, 29898, 1311, 29889, 287, 29873, 29918, 2288, 29890, 29892, 29871, 12, 12, 12, 29896, 29892, 29871, 29896, 29892, 29871, 29896, 29892, 29871, 29945, 29897, 13, 12, 12, 1311, 29889, 1202, 8801, 29898, 17303, 28707, 29889, 2239, 1107, 877, 3035, 29963, 29901, 5477, 29871, 12, 29906, 29892, 29871, 29900, 29892, 29871, 29896, 29892, 29871, 29896, 29897, 13, 12, 12, 1311, 29889, 1202, 8801, 29898, 1311, 29889, 287, 29873, 29918, 17263, 29892, 29871, 12, 12, 12, 29906, 29892, 29871, 29896, 29892, 29871, 29896, 29892, 29871, 29945, 29897, 13, 12, 12, 1311, 29889, 1202, 8801, 29898, 1311, 29889, 7290, 29918, 842, 10095, 10817, 29892, 29871, 12, 29941, 29892, 29871, 29896, 29892, 29871, 29896, 29892, 29871, 29941, 29897, 13, 12, 12, 1311, 29889, 1202, 8801, 29898, 1311, 29889, 7290, 29918, 6144, 10095, 10817, 29892, 29871, 12, 29941, 29892, 29871, 29946, 29892, 29871, 29896, 29892, 29871, 29906, 29897, 13, 12, 12, 1311, 29889, 1202, 8801, 29898, 17303, 28707, 29889, 2239, 1107, 877, 29923, 29901, 5477, 29871, 12, 12, 29946, 29892, 29871, 29900, 29892, 29871, 29896, 29892, 29871, 29896, 29897, 13, 12, 12, 1311, 29889, 1202, 8801, 29898, 1311, 29889, 7290, 29918, 657, 24111, 9780, 29892, 29871, 29946, 29892, 29871, 29896, 29892, 29871, 29896, 29892, 29871, 29941, 29897, 13, 12, 12, 1311, 29889, 1202, 8801, 29898, 1311, 29889, 1028, 29890, 29918, 12181, 3220, 29892, 29871, 12, 29946, 29892, 29871, 29946, 29892, 29871, 29896, 29892, 29871, 29906, 29897, 13, 12, 12, 1311, 29889, 1202, 8801, 29898, 17303, 28707, 29889, 2239, 1107, 877, 1523, 1066, 568, 402, 27026, 29901, 4737, 2200, 12241, 5477, 29871, 12, 29945, 29892, 29871, 29900, 29892, 29871, 29896, 29892, 29871, 29945, 29897, 13, 12, 12, 1311, 29889, 1202, 8801, 29898, 1311, 29889, 7290, 29918, 6921, 15708, 29892, 29871, 12, 12, 29953, 29892, 29871, 29900, 29892, 29871, 29896, 29892, 29871, 29953, 29897, 13, 13, 12, 12, 1311, 29889, 842, 4409, 855, 10301, 29898, 29900, 29892, 29871, 29900, 29897, 13, 12, 12, 1311, 29889, 842, 4409, 855, 10301, 29898, 29896, 29892, 29871, 29945, 29897, 13, 13, 12, 1753, 10092, 29918, 1445, 6289, 29898, 1311, 1125, 13, 12, 12, 1311, 29889, 287, 29873, 29918, 3137, 29890, 29889, 8551, 580, 13, 12, 12, 1311, 29889, 287, 29873, 29918, 17263, 29889, 8551, 580, 13, 12, 12, 1311, 29889, 287, 29873, 29918, 2288, 29890, 29889, 8551, 580, 13, 13, 12, 1753, 7868, 24111, 9780, 29898, 1311, 1125, 13, 12, 12, 16808, 561, 353, 321, 29954, 27026, 580, 13, 12, 12, 13148, 353, 6213, 29871, 12, 29937, 624, 2454, 29991, 8561, 372, 15040, 29892, 577, 372, 6459, 29879, 373, 599, 15359, 29892, 270, 820, 19039, 13, 12, 12, 12181, 3220, 353, 1583, 29889, 1028, 29890, 29918, 12181, 3220, 29889, 1767, 29871, 12, 29937, 624, 2454, 29991, 8561, 372, 15040, 29892, 577, 372, 6459, 29879, 856, 13, 12, 12, 17514, 2713, 11603, 353, 518, 12181, 363, 8267, 297, 330, 27026, 29889, 845, 11603, 580, 718, 330, 27026, 29889, 14036, 580, 565, 7431, 29898, 12181, 29889, 12181, 1469, 29889, 978, 4638, 29871, 13, 12, 12, 13, 12, 12, 2202, 29901, 13, 12, 12, 12, 29893, 24111, 353, 4257, 2713, 11603, 29961, 12181, 3220, 29962, 13, 12, 12, 12, 9067, 353, 281, 24111, 29889, 9067, 13, 12, 12, 12, 13, 12, 12, 12, 361, 7431, 29898, 29893, 24111, 29889, 12181, 1469, 29889, 978, 1125, 13, 12, 12, 12, 12, 361, 4327, 29889, 29885, 29896, 29896, 580, 1405, 29871, 29900, 29901, 13, 12, 12, 12, 12, 12, 1311, 29889, 287, 29873, 29918, 3137, 29890, 29889, 12038, 877, 16328, 29879, 29915, 1273, 29893, 24111, 29889, 12181, 1469, 29889, 978, 29897, 13, 12, 12, 12, 12, 12, 1311, 29889, 287, 29873, 29918, 2288, 29890, 29889, 12038, 877, 16328, 29879, 29915, 1273, 29893, 24111, 29889, 12181, 1469, 29889, 978, 29897, 13, 12, 12, 12, 12, 2870, 29901, 13, 12, 12, 12, 12, 12, 1311, 29889, 287, 29873, 29918, 3137, 29890, 29889, 12038, 877, 29922, 2288, 29890, 11702, 29879, 1159, 29915, 1273, 29893, 24111, 29889, 12181, 1469, 29889, 978, 29897, 13, 12, 12, 12, 12, 12, 1311, 29889, 287, 29873, 29918, 2288, 29890, 29889, 12038, 877, 29922, 3137, 29890, 11702, 29879, 1159, 29915, 1273, 29893, 24111, 29889, 12181, 1469, 29889, 978, 29897, 13, 13, 12, 12, 19499, 11374, 2392, 29901, 13, 12, 12, 12, 2158, 525, 11432, 29901, 402, 27026, 847, 29995, 29879, 448, 1939, 27085, 29928, 24972, 3301, 29923, 411, 2672, 19577, 518, 29995, 29879, 29962, 1476, 20714, 1273, 29898, 16808, 561, 29889, 978, 29892, 8267, 3220, 29897, 13, 13, 12, 1753, 731, 10095, 2200, 6108, 800, 29898, 1311, 29892, 2821, 29922, 8824, 1125, 13, 12, 12, 5014, 29918, 16808, 561, 29879, 353, 679, 7032, 29954, 27026, 29879, 29898, 29886, 6818, 29897, 13, 13, 12, 12, 1454, 330, 27026, 297, 1889, 29918, 16808, 561, 29879, 29901, 13, 12, 12, 12, 29893, 29931, 388, 414, 353, 330, 27026, 3032, 19125, 29931, 388, 414, 29898, 29886, 29931, 388, 414, 29897, 13, 13, 12, 12, 12, 1454, 7546, 297, 281, 29931, 388, 414, 29901, 13, 12, 12, 12, 12, 361, 451, 2821, 29901, 13, 12, 12, 12, 12, 12, 361, 7431, 29898, 1311, 29889, 287, 29873, 29918, 3137, 29890, 29889, 726, 1125, 330, 27026, 29889, 842, 29931, 1744, 1837, 29898, 1311, 29889, 287, 29873, 29918, 3137, 29890, 29889, 726, 29892, 7546, 29897, 13, 12, 12, 12, 12, 12, 361, 7431, 29898, 1311, 29889, 287, 29873, 29918, 2288, 29890, 29889, 726, 1125, 330, 27026, 29889, 842, 29934, 1744, 1837, 29898, 1311, 29889, 287, 29873, 29918, 2288, 29890, 29889, 726, 29892, 7546, 29897, 13, 12, 12, 12, 12, 12, 361, 7431, 29898, 1311, 29889, 287, 29873, 29918, 17263, 29889, 726, 1125, 330, 27026, 29889, 842, 3035, 29963, 1837, 29898, 1311, 29889, 287, 29873, 29918, 17263, 29889, 726, 29892, 7546, 29897, 13, 12, 12, 12, 12, 2870, 29901, 13, 12, 12, 12, 12, 12, 16808, 561, 29889, 842, 29931, 1744, 1837, 877, 742, 7546, 29897, 13, 12, 12, 12, 12, 12, 16808, 561, 29889, 842, 29934, 1744, 1837, 877, 742, 7546, 29897, 13, 12, 12, 12, 12, 12, 16808, 561, 29889, 842, 3035, 29963, 1837, 877, 742, 7546, 29897, 13, 13, 12, 12, 12, 16808, 561, 29889, 5504, 580, 13, 12, 12, 12, 16808, 561, 29889, 5504, 2061, 29898, 16808, 561, 29889, 1579, 29892, 525, 2697, 4737, 10817, 11243, 800, 732, 1273, 29879, 6169, 1273, 2670, 15300, 7122, 29898, 29893, 29931, 388, 414, 876, 13, 12, 12, 13, 12, 12, 1311, 29889, 12071, 29918, 1445, 6289, 580, 13, 13, 12, 1753, 4469, 10095, 2200, 6108, 800, 29898, 1311, 1125, 13, 12, 12, 5014, 29918, 16808, 561, 29879, 353, 679, 7032, 29954, 27026, 29879, 29898, 29886, 6818, 29897, 13, 13, 12, 12, 1454, 330, 27026, 297, 1889, 29918, 16808, 561, 29879, 29901, 13, 12, 12, 12, 29893, 29931, 388, 414, 353, 330, 27026, 3032, 19125, 29931, 388, 414, 29898, 29886, 29931, 388, 414, 29897, 13, 12, 12, 12, 16808, 561, 29918, 6112, 353, 5159, 13, 13, 12, 12, 12, 1454, 7546, 297, 281, 29931, 388, 414, 29901, 13, 12, 12, 12, 12, 4882, 353, 330, 27026, 29889, 5355, 6843, 10095, 10817, 29898, 13148, 29897, 13, 12, 12, 12, 12, 16808, 561, 29918, 6112, 29889, 4397, 29898, 4882, 29897, 13, 13, 12, 12, 12, 16808, 561, 29889, 5504, 580, 13, 12, 12, 12, 16808, 561, 29889, 5504, 2061, 29898, 16808, 561, 29889, 1579, 29892, 525, 29954, 27026, 29901, 1273, 29879, 10436, 29873, 12300, 4737, 10817, 11243, 800, 732, 1273, 29879, 6169, 1273, 29898, 16808, 561, 29889, 978, 29892, 21921, 15300, 7122, 877, 29995, 29879, 29901, 1273, 29879, 29915, 1273, 667, 363, 2944, 297, 14319, 29898, 29893, 29931, 388, 414, 29892, 330, 27026, 29918, 6112, 13697, 13, 13, 13, 1990, 21556, 29918, 5657, 29898, 17303, 28707, 29889, 29984, 5756, 3453, 1125, 13, 12, 29937, 448, 14187, 4737, 2200, 4426, 515, 916, 330, 27026, 13, 12, 1753, 4770, 2344, 12035, 1311, 1125, 13, 12, 12, 9136, 29898, 2527, 10817, 29918, 5657, 29892, 1583, 467, 1649, 2344, 1649, 580, 13, 13, 12, 12, 1311, 29889, 7290, 29918, 842, 29909, 1557, 1581, 353, 14705, 28707, 29889, 29984, 27031, 3125, 877, 29909, 1557, 29889, 1495, 13, 12, 12, 1311, 29889, 7290, 29918, 842, 29907, 2547, 7011, 353, 14705, 28707, 29889, 29984, 27031, 3125, 877, 29907, 2547, 1495, 13, 12, 12, 1311, 29889, 7290, 29918, 842, 19617, 1581, 353, 14705, 28707, 29889, 29984, 27031, 3125, 877, 19617, 29889, 1495, 13, 12, 12, 1311, 29889, 7290, 29918, 842, 29990, 7011, 353, 14705, 28707, 29889, 29984, 27031, 3125, 877, 29990, 379, 4141, 29889, 1495, 13, 13, 12, 12, 1311, 29889, 7290, 29918, 29873, 468, 15097, 353, 14705, 28707, 29889, 29984, 27031, 3125, 877, 15097, 1495, 13, 12, 12, 1311, 29889, 7290, 29918, 29873, 468, 29933, 8456, 29990, 353, 14705, 28707, 29889, 29984, 27031, 3125, 877, 29954, 27026, 350, 8456, 29990, 1495, 13, 13, 12, 12, 1311, 29889, 7290, 29918, 29873, 468, 15097, 29889, 842, 5596, 519, 29898, 5574, 29897, 13, 12, 12, 1311, 29889, 7290, 29918, 29873, 468, 29933, 8456, 29990, 29889, 842, 5596, 519, 29898, 5574, 29897, 13, 12, 12, 29937, 1311, 29889, 7290, 29918, 29873, 468, 29933, 8456, 29990, 29889, 842, 10861, 29898, 8824, 29897, 13, 12, 12, 13, 12, 12, 1311, 29889, 7290, 29918, 842, 29909, 1557, 1581, 29889, 842, 12229, 29911, 666, 877, 2697, 1094, 29883, 1581, 3171, 25710, 13, 12, 12, 1311, 29889, 7290, 29918, 842, 29907, 2547, 7011, 29889, 842, 12229, 29911, 666, 877, 2697, 315, 2547, 22907, 1495, 13, 12, 12, 1311, 29889, 7290, 29918, 842, 19617, 1581, 29889, 842, 12229, 29911, 666, 877, 2697, 2726, 29883, 1581, 3171, 1495, 13, 12, 12, 1311, 29889, 7290, 29918, 842, 29990, 7011, 29889, 842, 12229, 29911, 666, 877, 2697, 1060, 22907, 1495, 13, 13, 12, 12, 1311, 29889, 7290, 29918, 29873, 468, 15097, 29889, 842, 12229, 29911, 666, 877, 2697, 10928, 21556, 773, 278, 4629, 2943, 1495, 13, 12, 12, 1311, 29889, 7290, 29918, 29873, 468, 29933, 8456, 29990, 29889, 842, 12229, 29911, 666, 877, 2697, 10928, 21556, 773, 278, 6136, 330, 27026, 3216, 292, 3800, 1495, 13, 13, 12, 12, 1311, 29889, 7290, 29918, 842, 29909, 1557, 1581, 29889, 842, 8140, 12539, 6110, 29898, 29946, 29900, 29897, 13, 12, 12, 1311, 29889, 7290, 29918, 842, 29907, 2547, 7011, 29889, 842, 8140, 12539, 6110, 29898, 29946, 29900, 29897, 13, 12, 12, 1311, 29889, 7290, 29918, 842, 19617, 1581, 29889, 842, 8140, 12539, 6110, 29898, 29946, 29900, 29897, 13, 12, 12, 1311, 29889, 7290, 29918, 842, 29990, 7011, 29889, 842, 8140, 12539, 6110, 29898, 29946, 29900, 29897, 13, 13, 12, 12, 1311, 29889, 7290, 29918, 842, 29909, 1557, 1581, 29889, 3808, 287, 29889, 6915, 29898, 2892, 29901, 1583, 29889, 842, 9824, 10095, 10817, 877, 6151, 1581, 8785, 13, 12, 12, 1311, 29889, 7290, 29918, 842, 29907, 2547, 7011, 29889, 3808, 287, 29889, 6915, 29898, 2892, 29901, 1583, 29889, 842, 9824, 10095, 10817, 877, 29883, 2547, 7011, 8785, 13, 12, 12, 1311, 29889, 7290, 29918, 842, 19617, 1581, 869, 3808, 287, 29889, 6915, 29898, 2892, 29901, 1583, 29889, 842, 9824, 10095, 10817, 877, 14273, 1581, 8785, 13, 12, 12, 1311, 29889, 7290, 29918, 842, 29990, 7011, 29889, 3808, 287, 29889, 6915, 29898, 2892, 29901, 1583, 29889, 842, 9824, 10095, 10817, 877, 29916, 7011, 8785, 13, 13, 12, 12, 1311, 29889, 1202, 8801, 29898, 1311, 29889, 7290, 29918, 29873, 468, 15097, 29892, 12, 29900, 29892, 29900, 29892, 29896, 29892, 29906, 29897, 13, 12, 12, 1311, 29889, 1202, 8801, 29898, 1311, 29889, 7290, 29918, 29873, 468, 29933, 8456, 29990, 29892, 12, 12, 29900, 29892, 29906, 29892, 29896, 29892, 29906, 29897, 13, 12, 12, 1311, 29889, 1202, 8801, 29898, 1311, 29889, 7290, 29918, 842, 29909, 1557, 1581, 29892, 12, 29896, 29892, 29900, 29892, 29896, 29892, 29896, 29897, 13, 12, 12, 1311, 29889, 1202, 8801, 29898, 1311, 29889, 7290, 29918, 842, 29907, 2547, 7011, 29892, 12, 29896, 29892, 29896, 29892, 29896, 29892, 29896, 29897, 13, 12, 12, 1311, 29889, 1202, 8801, 29898, 1311, 29889, 7290, 29918, 842, 19617, 1581, 29892, 12, 29896, 29892, 29906, 29892, 29896, 29892, 29896, 29897, 13, 12, 12, 1311, 29889, 1202, 8801, 29898, 1311, 29889, 7290, 29918, 842, 29990, 7011, 29892, 12, 12, 29896, 29892, 29941, 29892, 29896, 29892, 29896, 29897, 13, 13, 12, 1753, 731, 9824, 10095, 10817, 29898, 1311, 29892, 12714, 1170, 1125, 13, 12, 12, 16808, 561, 353, 321, 29954, 27026, 580, 13, 12, 12, 29893, 29931, 388, 414, 353, 330, 27026, 3032, 19125, 29931, 388, 414, 29898, 29886, 29931, 388, 414, 29897, 13, 13, 12, 12, 1454, 7546, 297, 281, 29931, 388, 414, 29901, 13, 12, 12, 12, 361, 1583, 29889, 7290, 29918, 29873, 468, 15097, 29889, 275, 17817, 7295, 13, 12, 12, 12, 12, 21731, 353, 330, 27026, 29889, 8391, 20284, 29898, 13148, 29897, 13, 13, 12, 12, 12, 12, 361, 7431, 29898, 21731, 1125, 13, 12, 12, 12, 12, 12, 16808, 561, 29889, 5113, 29889, 842, 19203, 29898, 13148, 29897, 13, 12, 12, 12, 12, 12, 4258, 877, 16808, 561, 29889, 5113, 29889, 29995, 29879, 29918, 1767, 353, 9262, 29961, 29900, 1822, 29891, 29915, 1273, 16414, 1170, 29897, 13, 13, 12, 12, 12, 361, 1583, 29889, 7290, 29918, 29873, 468, 29933, 8456, 29990, 29889, 275, 17817, 7295, 13, 12, 12, 12, 12, 16808, 561, 29889, 5113, 29889, 842, 19203, 29898, 13148, 29897, 13, 12, 12, 12, 12, 29890, 1884, 29918, 13148, 353, 330, 27026, 29889, 13148, 29898, 13148, 467, 9917, 292, 3313, 13, 12, 12, 12, 12, 12, 12, 12, 12, 13, 12, 12, 12, 12, 361, 12714, 1170, 297, 6024, 6151, 1581, 742, 525, 29883, 2547, 7011, 742, 525, 29916, 7011, 2033, 29901, 13, 12, 12, 12, 12, 12, 4258, 877, 16808, 561, 29889, 5113, 29889, 29995, 29879, 29918, 1767, 353, 938, 29898, 29890, 1884, 29918, 13148, 29889, 29891, 580, 718, 289, 1884, 29918, 13148, 29889, 3545, 3101, 29915, 1273, 16414, 1170, 29897, 13, 13, 12, 12, 12, 12, 23681, 12714, 1170, 1275, 525, 14273, 1581, 2396, 13, 12, 12, 12, 12, 12, 16808, 561, 29889, 5113, 29889, 14273, 1581, 29918, 1767, 353, 938, 29898, 29890, 1884, 29918, 13148, 29889, 29891, 3101, 13, 12, 12, 13, 12, 12, 1311, 29889, 7290, 29918, 29873, 468, 15097, 29889, 842, 17817, 29898, 8824, 29897, 13, 12, 12, 1311, 29889, 7290, 29918, 29873, 468, 29933, 8456, 29990, 29889, 842, 17817, 29898, 8824, 29897, 13, 13, 12, 12, 16808, 561, 29889, 5504, 580, 13, 12, 12, 16808, 561, 29889, 5504, 2061, 29898, 16808, 561, 29889, 5113, 29892, 525, 2697, 10928, 4737, 10817, 29901, 1273, 29879, 732, 1273, 29879, 6169, 1273, 29898, 16414, 1170, 29892, 21921, 15300, 7122, 29898, 29893, 29931, 388, 414, 4961, 13, 13, 13, 29937, 448, 323, 6897, 448, 2683, 9072, 489, 13, 1990, 5780, 29918, 3891, 29898, 17303, 28707, 29889, 29984, 8801, 1125, 13, 12, 1753, 4770, 2344, 12035, 1311, 1125, 13, 12, 12, 9136, 29898, 10154, 29918, 3891, 29892, 1583, 467, 1649, 2344, 1649, 580, 13, 13, 12, 12, 29937, 448, 10886, 13, 12, 12, 2680, 29963, 353, 14705, 28707, 29889, 29984, 29963, 3313, 3453, 580, 13, 12, 12, 12, 13, 12, 12, 29937, 448, 8878, 29871, 13, 12, 12, 29937, 2680, 29963, 29889, 1202, 8801, 29898, 17303, 28707, 29889, 2239, 1107, 877, 29954, 27026, 29901, 2087, 5143, 4737, 2200, 848, 8785, 13, 12, 12, 2680, 29963, 29889, 1202, 3453, 29898, 2527, 10817, 29918, 328, 5143, 3101, 13, 12, 12, 2680, 29963, 29889, 1202, 5592, 9390, 29898, 29896, 29900, 29897, 13, 12, 12, 2680, 29963, 29889, 1202, 8801, 29898, 17303, 28707, 29889, 2239, 1107, 877, 29954, 27026, 29901, 14187, 4737, 2200, 848, 8785, 13, 12, 12, 2680, 29963, 29889, 1202, 3453, 29898, 2527, 10817, 29918, 8552, 3101, 13, 12, 12, 2680, 29963, 29889, 1202, 5592, 9390, 29898, 29896, 29900, 29897, 13, 12, 12, 2680, 29963, 29889, 1202, 8801, 29898, 17303, 28707, 29889, 2239, 1107, 877, 29954, 27026, 29901, 3789, 12714, 12241, 8785, 13, 12, 12, 2680, 29963, 29889, 1202, 3453, 29898, 2527, 10817, 29918, 13338, 3101, 13, 12, 12, 2680, 29963, 29889, 1202, 5592, 9390, 29898, 29896, 29900, 29897, 13, 12, 12, 2680, 29963, 29889, 1202, 8801, 29898, 17303, 28707, 29889, 2239, 1107, 28909, 29876, 9824, 29901, 3789, 10928, 4737, 10817, 8785, 13, 12, 12, 2680, 29963, 29889, 1202, 3453, 29898, 2527, 10817, 29918, 5657, 3101, 13, 13, 12, 12, 396, 448, 8878, 448, 2683, 28400, 13, 12, 12, 2680, 29963, 29889, 1202, 855, 10301, 580, 13, 12, 12, 1311, 29889, 842, 3453, 29898, 2680, 29963, 29897, 13, 13, 29937, 448, 4321, 448, 2683, 23648, 13, 361, 4770, 978, 1649, 1275, 525, 1649, 3396, 1649, 2396, 13, 29871, 1243, 353, 5780, 29918, 3891, 580, 13, 29871, 1243, 29889, 842, 5907, 7030, 877, 29995, 29879, 1273, 29879, 29915, 1273, 29898, 932, 29918, 978, 29892, 623, 29918, 3259, 876, 13, 29871, 1243, 29889, 842, 7999, 7843, 29898, 29941, 29900, 29900, 29892, 29871, 29941, 29900, 29900, 29892, 29871, 29906, 29947, 29900, 29892, 29871, 29946, 29900, 29900, 29897, 13, 29871, 1243, 29889, 842, 5907, 15675, 29898, 17303, 9203, 29889, 17303, 29889, 5907, 855, 1036, 2951, 7031, 28016, 29897, 396, 29849, 373, 2246, 6824, 13, 259, 13, 29871, 1243, 29889, 4294, 580, 2 ]
application/create-application.py
superdiana/nexmo-python-code-snippets
0
95870
<filename>application/create-application.py #!/usr/bin/env python3 import nexmo from pprint import pprint client = nexmo.Client( key=NEXMO_API_KEY, secret=NEXMO_API_SECRET ) response = client.application_v2.create_application({ "name": "Code Example App", "capabilities": { "messages": { "webhooks": { "inbound_url": { "address": "https://example.com/webhooks/inbound", "http_method": "POST" }, "status_url": { "address": "https://example.com/webhooks/status", "http_method": "POST" } } } } }) pprint(response)
[ 1, 529, 9507, 29958, 6214, 29914, 3258, 29899, 6214, 29889, 2272, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 5215, 452, 29916, 4346, 13, 3166, 282, 2158, 1053, 282, 2158, 13, 13, 4645, 353, 452, 29916, 4346, 29889, 4032, 29898, 13, 1678, 1820, 29922, 29940, 5746, 6720, 29918, 8787, 29918, 10818, 29892, 13, 1678, 7035, 29922, 29940, 5746, 6720, 29918, 8787, 29918, 1660, 22245, 29911, 13, 29897, 13, 13, 5327, 353, 3132, 29889, 6214, 29918, 29894, 29906, 29889, 3258, 29918, 6214, 3319, 13, 1678, 376, 978, 1115, 376, 3399, 8741, 2401, 613, 13, 1678, 376, 5030, 11614, 1115, 426, 13, 4706, 376, 19158, 1115, 426, 13, 9651, 376, 2676, 1251, 12117, 1115, 426, 13, 18884, 376, 262, 9917, 29918, 2271, 1115, 426, 13, 462, 1678, 376, 7328, 1115, 376, 991, 597, 4773, 29889, 510, 29914, 2676, 1251, 12117, 29914, 262, 9917, 613, 13, 462, 1678, 376, 1124, 29918, 5696, 1115, 376, 5438, 29908, 13, 18884, 2981, 13, 18884, 376, 4882, 29918, 2271, 1115, 426, 13, 462, 1678, 376, 7328, 1115, 376, 991, 597, 4773, 29889, 510, 29914, 2676, 1251, 12117, 29914, 4882, 613, 13, 462, 1678, 376, 1124, 29918, 5696, 1115, 376, 5438, 29908, 13, 18884, 500, 13, 9651, 500, 13, 4706, 500, 13, 1678, 500, 13, 1800, 13, 13, 407, 29878, 524, 29898, 5327, 29897, 13, 2 ]
python/ql/src/Classes/ConflictingAttributesInBaseClasses_Fixed.py
vadi2/codeql
4,036
172010
#Fixed by overriding. This does not change behavior, but makes it explicit and comprehensible. class ThreadingTCPServerOverriding(ThreadingMixIn, TCPServer): def process_request(self, request, client_address): #process_request forwards to do_work, so it is OK to call ThreadingMixIn.process_request directly ThreadingMixIn.process_request(self, request, client_address) #Fixed by separating threading functionality from request handling. class ThreadingMixIn: """Mix-in class to help with threads.""" def do_job_in_thread(self, job, args): """Start a new thread to do the job""" t = threading.Thread(target = job, args = args) t.start() class ThreadingTCPServerChangedHierarchy(ThreadingMixIn, TCPServer): def process_request(self, request, client_address): """Start a new thread to process the request.""" self.do_job_in_thread(self.do_work, (request, client_address))
[ 1, 268, 13, 29937, 26262, 491, 20831, 292, 29889, 910, 947, 451, 1735, 6030, 29892, 541, 3732, 372, 6261, 322, 15171, 575, 1821, 29889, 13, 1990, 10480, 292, 29911, 6271, 6004, 3563, 2429, 292, 29898, 4899, 292, 29924, 861, 797, 29892, 19374, 6004, 1125, 13, 268, 13, 1678, 822, 1889, 29918, 3827, 29898, 1311, 29892, 2009, 29892, 3132, 29918, 7328, 1125, 13, 4706, 396, 5014, 29918, 3827, 363, 2935, 304, 437, 29918, 1287, 29892, 577, 372, 338, 9280, 304, 1246, 10480, 292, 29924, 861, 797, 29889, 5014, 29918, 3827, 4153, 13, 4706, 10480, 292, 29924, 861, 797, 29889, 5014, 29918, 3827, 29898, 1311, 29892, 2009, 29892, 3132, 29918, 7328, 29897, 13, 308, 13, 13, 29937, 26262, 491, 2903, 1218, 3244, 292, 9863, 515, 2009, 11415, 29889, 13, 1990, 10480, 292, 29924, 861, 797, 29901, 13, 1678, 9995, 29924, 861, 29899, 262, 770, 304, 1371, 411, 9717, 1213, 15945, 13, 13, 1678, 822, 437, 29918, 9057, 29918, 262, 29918, 7097, 29898, 1311, 29892, 4982, 29892, 6389, 1125, 13, 4706, 9995, 4763, 263, 716, 3244, 304, 437, 278, 4982, 15945, 29908, 13, 4706, 260, 353, 3244, 292, 29889, 4899, 29898, 5182, 353, 4982, 29892, 6389, 353, 6389, 29897, 13, 4706, 260, 29889, 2962, 580, 13, 13, 1990, 10480, 292, 29911, 6271, 6004, 7590, 29950, 631, 12040, 29898, 4899, 292, 29924, 861, 797, 29892, 19374, 6004, 1125, 13, 268, 13, 1678, 822, 1889, 29918, 3827, 29898, 1311, 29892, 2009, 29892, 3132, 29918, 7328, 1125, 13, 4706, 9995, 4763, 263, 716, 3244, 304, 1889, 278, 2009, 1213, 15945, 13, 4706, 1583, 29889, 1867, 29918, 9057, 29918, 262, 29918, 7097, 29898, 1311, 29889, 1867, 29918, 1287, 29892, 29871, 313, 3827, 29892, 3132, 29918, 7328, 876, 13, 268, 13, 2 ]
cogandmem/text.py
aemacdermid/cogandmem
0
44270
""" Functions for displaying text to the screen. Text rendering in pygame does not allow for line breaks. This can lead to issues when attempting to render text, particularly if one is unsure of the width and height of a to-be-rendered string in a given font. The functions here handle these difficulties. This module includes the following functions (see the docstrings for more information): tallest_letter: returns the height in pixels of the tallest letter when rendered in a given font. text_to_sentences: convert a string into a list of sentences. screen_dimensions: returns the dimensions of the active display surface. longest_string_to_render: return the string in a list that will take up the most horizontal space in pixels (this will usually, but not necessarily, be the string with the most characters). height_of_strings: return the height of a list of strings when rendered in a given font. wrap_text: break a string into lines on a screen. string_to_screens_and_lines: break a string into screens and lines. render_string: get pygame.Surface and pygame.Rect objects for a string. render_lines: return pygame.Surface and pygame.Rect objects for a list of strings. string_to_surface_and_rect: return pygame.Surface and pygame.Rect objects for a string, given constraints on the pixel dimensions of the screen. display_text_until_keypress: present text to the screen until the user presses a specific key (or any specific key from a list). ask_question: display a question to the screen and return the response. """ from __future__ import division import sys import pygame from pygame.locals import * from cogandmem import experiment from cogandmem import generic LETTERS = ( K_a, K_b, K_c, K_d, K_e, K_f, K_g, K_h, K_i, K_j, K_k, K_l, K_m, K_n, K_o, K_p, K_q, K_r, K_s, K_t, K_u, K_v, K_w, K_x, K_y, K_z ) ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" NUMBERS = ( K_0, K_1, K_2, K_3, K_4, K_5, K_6, K_7, K_8, K_9 ) PUNCTUATION = ( K_PERIOD, K_COMMA, K_QUESTION, K_QUOTE, K_EXCLAIM, K_COLON, K_SEMICOLON ) def tallest_letter(font): """ Get the height, in pixels, of the tallest letter in the alphabet when rendered with a given font. """ return font.size(ALPHABET)[1] def text_to_sentences(text, terminators = (".", "?", "!", '."', '?"', '!"'), exclude = ("Mr.", "Ms.", "Mrs.", "Dr.", "e.g.", "i.e.")): """ Break text into a list of sentences. This is a highly imperfect function that takes a passage of text and breaks it into a list of sentences. The main stumbling block for the function is that there are numerous words that could indicate either the end of a sentence or the end of an abbreviation. I do not know of an effective solution to this problem. NB: The assumption is made that line breaks always denote the end of a sentence, regardless of the preceding character. Parameters: text: the passage to break into sentences. Keyword Parameters: terminators: strings that denote the end of a sentence. exclude: exceptions to the terminators. Returns: sentences: a list of sentences in text. """ sentences = [] text_as_paragraphs = text.split("\n") paragraphs_as_words = [] for paragraph in text_as_paragraphs: paragraph = paragraph.strip() if not paragraph: # This is a blank line. paragraphs_as_words.append([]) # Go to the next paragraph: continue words = paragraph.split(" ") paragraphs_as_words.append(words) for paragraph in paragraphs_as_words: if not paragraph: # This is a blank line. sentences.append("") continue sentence = "" for word in paragraph: # Add word to sentence, along with a leading space if necessary: if sentence: sentence = sentence+" "+word else: sentence = word # Check whether word ends with a terminator: try: ends_with_terminator = word.endswith(terminators) except TypeError: # terminators is probably a list rather than a tuple. # str.endswith() requires a tuple. terminators = tuple(terminators) ends_with_terminator = word.endswith(terminators) if ends_with_terminator and word not in exclude: # This ends the sentence. sentences.append(sentence) sentence = "" # Check for a dangling sentence: if sentence: sentences.append(sentence) return sentences def screen_dimensions(): """ Get the width and height of the active display surface. If no display surface has been set, get the first element in pygame.display.list_modes(). """ screen_surface = pygame.display.get_surface() try: w, h = screen_surface.get_size() except AttributeError: w, h = pygame.display.list_modes()[0] return w, h def longest_string_to_render(strings, f): """ Get the longest string to render from a list. Parameters: strings: a list or tuple of strings. f: the pygame.font.Font object used for rendering. Returns: s: the longest string to render with f; if there is a tie, s is set to the string occurring earlier in the strings list. n: the number of pixel columns needed to render s. """ s = "" n = 0 for string in strings: # Get the width of string: w = f.size(string)[0] if w > n: n = w s = string return s, n def height_of_strings(strings, f, line_size): """ Compute the height of a list of strings when rendered with a given font, taking into account the line size (i.e., the number of pixel rows interpolated between the bottom of one line of text and the top of the next). Parameters: strings: the list of strings whose height is measured; assumes that each string is a separate line. f: the pygame.font.Font object in which text is to be rendered. line_size: the number of pixel rows between lines; must be positive. Returns: h: the height of strings when rendered. """ h = 0 # Ignore line_size gaps to start: for string in strings: # Get current height: line_height = f.size(string)[1] h = h+line_height # Line gaps are added now. h = h+line_size*(len(strings)-1) return h def wrap_text(new_text, width, f, old_text = [], start_new_line = False, return_height = False, line_height = None): """ Break a string into lines on a screen. Parameters: new_text: words to convert to lines; if list or tuple, each element is a list of words from a paragraph, with line breaks automatically following an element; if str, split() is used to make into paragraphs and then individual words; if new_text evaluates to False in a Boolean context, a blank line is returned width: maximum pixels per line (width > 0). f: the font object to use. Keyword Parameters: return_height: whether the height of the rendered lines is returned; defaults to False. old_text: optional list of lines to which new_text is added; each element in old_text is assumed to be a single line; its legality given width is not checked; defaults to an empty list. start_new_line: only applies if old_text evaluates to True in a Boolean context; indicates whether a new line should start (i.e., whether new_text should begin a new line); defaults to False. line_size: only applies if return_height is True; enotes the pixels interpolated between lines of text; if not set but line_size is needed, it is obtained from f. Returns: lines: old_text with new_text added. optionally: height: the height of lines when rendered with f. """ # Branch depending on whether additional text or a blank line is being # added: if new_text: # If new_text is a string, it needs to be converted to a list. try: # Get paragraphs: new_text_as_paragraphs = new_text.split("\n") # Overwrite new_text: new_text = [] for paragraph in new_text_as_paragraphs: paragraph_list = paragraph.split(" ") new_text.append(paragraph_list) except AttributeError: # new_text is already a list. pass new_lines = list(old_text) # Check if a last line from old_text is needed: if old_text and not start_new_line: line = old_text[-1] # Delete line from new_lines: del new_lines[-1] else: line = "" # Set line width: line_width = f.size(line)[0] # Fill new_lines paragraph by paragraph: for paragraph in new_text: # Fill each line word by word: for word in paragraph: # Unless line is currently empty, a leading space is needed # when calculating word's width. if line: word_width = f.size(" "+word)[0] else: word_width = f.size(word)[0] line_width = line_width+word_width if line_width < width: # word fits on this line. if line: line = line+" "+word else: line = word elif line_width == width: # word fits, but no more words will. line = line+" "+word new_lines.append(line) line= "" line_width = 0 else: # word doesn't fit. new_lines.append(line) line = word word_width = f.size(word)[0] line_width = word_width # Some part of a line might be left. if line: new_lines.append(line) line = "" line_width = 0 else: # A blank line is being added to old_text. new_lines = list(old_text) new_lines.append("") # Check if height is calculated: if return_height: # Check if line_height needs to be set: if not line_height: line_height = f.get_linesize() height = height_of_strings(new_lines, f, line_height) return new_lines, height return new_lines def string_to_screens_and_lines(source, allowed_width, allowed_height, f, pixels_between_lines = None, end_screens_with = (), do_not_include = ()): """ Convert a string to screens and lines. Pygame does not allow line breaks ("\n") when rendering text. The purpose of this function is to break a string into lines and screens given a font and screen dimensions. The following two assumptions are made: 1. Line breaks ("\n") in source denote the start of a new paragraph. Therefore, to have an actual blank line (i.e., an empty string) appear in the returned array, add another "\n" immediately following the first. 2. Spaces denote the end of a word. Parameters: source: the string to divide into screens and lines. allowed_width: the width, in pixels, permitted for lines; can be a number of pixels or a proportion of the active screen's width. allowed_height: same as allowed_width but for the height of a single screen. f: the font with which source is measured. Keyword Parameters: pixels_between_lines: blank pixel rows between lines of text; defaults to None, in which case it is obtained from f. end_screens_with: a restricted set of characters that may end a screen; defaults to an empty tuple, in which case any character ending a word can end a screen. do_not_include: words that are exceptions to the end_screens_with words (e.g., "Mrs." ends in a period but should not end a screen) Returns: screens: a multidimensional list of screens and lines. """ # Check if allowed_height and allowed_width need to be set: if 0 < allowed_width <= 1 and 0 < allowed_height <= 1: allowed_width, allowed_height = screen_dimensions() elif 0 < allowed_width <= 1 or 0 < allowed_height <= 1: raise ValueError("Both or neither of allowed_width and \ allowed_height can be between 0 and 1.") # Check if pixels_between_lines needs to be set: if not pixels_between_lines: pixels_between_lines = f.get_linesize() else: assert pixels_between_lines > 0, "pixels_between_lines must be \ positive." # Make sure that allowed_height can accommodate the tallest word in # source: assert f.size(source)[1] <= allowed_height, "allowed_height cannot \ accommodate source." screens = [] # Break source into paragraphs and paragraphs into single words: paragraphs = source.split("\n") single_words = [] for paragraph in paragraphs: individual_words = paragraph.split(" ") # While here, verify that the longest word fits: widest_word, pixels = longest_string_to_render(individual_words, f) assert pixels < allowed_width, "{:s} in source is too long for \ allowed_width.".format(widest_word) single_words.append(individual_words) # The function branches next, depending on whether restrictions have been # placed on where screen breaks can occur. if not end_screens_with: # Screen breaks can occur following any word. # Break single_words into lines without regard to screens: lines_of_text, total_height = wrap_text( single_words, allowed_width, f, return_height = True, line_height = pixels_between_lines ) if total_height <= allowed_height: # Everything fits on one screen. screens.append(lines_of_text) else: # There will be at least two screens. # Initialize the first screen and a height counter: screen = [] screen_height = 0 for line in lines_of_text: line_height = f.size(line)[1] screen_height = screen_height+line_height+pixels_between_lines if screen_height < allowed_height: # line fits on the current screen. screen.append(line) elif screen_height == allowed_height or screen_height-pixels_between_lines < allowed_height: # line fits, but no more will. screen.append(line) screens.append(screen) screen = [] screen_height = 0 else: # line doesn't fit. screens.append(screen) screen = [line] screen_height = line_height+pixels_between_lines # Check for a remaining screen: if screen: screens.append(screen)\ else: # Screens can only end following specific strings. # These strings do not need to be end-of-sentence characters, but it # is difficult to imagine what else they would be. Therefore, I refer # to the resulting strings as sentences, acknowledging that this may # be incorrect terminology. # Break paragraphs into sentences: sentences = [] for paragraph in paragraphs: if sentences: # This is not the first line, so start the paragraph on a new # line: sentences.append("") if paragraph: # paragraph is not a blank line. # Break it into sentences: paragraph_as_sentences = text_to_sentences( paragraph, terminators = end_screens_with, exclude = do_not_include ) sentences = sentences+paragraph_as_sentences else: # paragraph is a blank line. sentences.append("") # Initialize the first screen: screen = [] for sentence in sentences: # Determine whether sentence starts on a new line or continues # from the current line: if screen: # If the last line in screen is blank, then sentence starts on # a new line. last_line = screen[-1] if last_line: next_line = False else: next_line = True else: # This screen is blank. # Arbitrarily set next_line to False: next_line = False # Try adding sentence to the current screen: possible_screen, screen_height = wrap_text( sentence, allowed_width, f, old_text = screen, start_new_line = next_line, return_height = True, line_height = pixels_between_lines ) if screen_height <= allowed_height: # Update the current screen: screen = possible_screen else: # This sentence does not fit. # If screen is currently blank, it means that sentence needs # to be broken across screens (i.e., it will not fit on a # single screen). if screen: # This is not an issue. # Save screen: screens.append(screen) # Initialize the next screen with sentence: screen, current_height = wrap_text( sentence, allowed_width, f, return_height = True, line_height = pixels_between_lines ) if current_height > allowed_height: # sentence needs to be broken across screens. # This can be accomplished by calling the present # function without restrictions on screen endings. # However, the text currently on screen is needed too. text_to_add = "" for line in screen: text_to_add = text_to_add+line+"" text_to_add = text_to_add+sentence multiple_screens = string_to_screens_and_lines( text_to_add, allowed_width, allowed_height, f, pixels_between_lines = pixels_between_lines ) for s in multiple_screens: screens.append(s) else: # screen is empty, but sentence will not fit. # Call the present function to get this sentence's # screens: multiple_screens = string_to_screens_and_lines( sentence, allowed_width, allowed_height, f, pixels_between_lines = pixels_between_lines ) for s in multiple_screens: screens.append(s) # Check if a final screen needs to be added: if screen: screens.append(screen) return screens def render_string(s, f, colour, background, antialiasing = True): """ Create pygame.Surface and pygame.Rect objects for a string, using a given font (f) and colour. Parameters: s: the string to render. f: the font in which to render s. colour: the colour of text to use, expressed as an RGB list or tuple. background: the background colour. Keyword Parameters: antialiasing: indicates whether text is rendered with antialiasing; defaults to True. Returns: s: the pygame.Surface object. r: the pygame.Rect object. """ s = f.render(s, antialiasing, colour, background) r = s.get_rect() return s, r def render_lines(lines, f, text_colour, background_colour, line_size = None, use_antialiasing = True): """ Create pygame.Surface and pygame.Rect objects for a list of strings. Parameters: lines: the lines to render; "" is treated as a blank line. f: the font in which to render text. text_colour: an RGB list or tuple for the colour of the text. background_colour: RGB for background. Keyword Parameters: line_size: the number of pixel rows between lines; defaults to None, in which case it is set from f. use_antialiasing: indicates whether lines are rendered with antialiasing; defaults to True. Returns: surf: the pygame.Surface object. rect: the pygame.Rect object. """ height = 0 surfaces = [] rects = [] for line in lines: s, r = render_string( line, f, text_colour, background_colour, antialiasing = use_antialiasing ) surfaces.append(s) rects.append(r) height = height+r.height try: height = height+line_size*(len(surfaces)-1) except TypeError: line_size = f.get_linesize() height = height+line_size*(len(surfaces)-1) # height will be the height of the returned surface and rect. # The width will be equal to the widest rect in rects. width = rects[0].width for rect in rects[1:]: if rect.width > width: width = rect.width # Initialize the returned surface: surf = pygame.Surface((width, height)) surf.fill(background_colour) # Keep track of the pixel row at which to blit each surface in surfaces: top = 0 for i in range(len(surfaces)): s = surfaces[i] r = rects[i] r.topleft = (0, top) surf.blit(s, r) top = top+r.height+line_size rect = surf.get_rect() return surf, rect def string_to_surface_and_rect(s, f, colour, background, max_width, max_height, max_screens = 1, line_size = None, antialiasing = True): """ Create a surface and rect from a string given a maximum pixel width for each line and a maximum pixel height for each screen. Parameters: s: the string. f: the font to use. colour: RGB for the text colour. background: RGB for the background colour. max_width: the maximum pixel width for each line. max_height: the maximum pixel height for each screen. Keyword Parameters: line_size: pixels between lines of text; defaults to None, in which case it is obtained from f. antialiasing: Boolean indicating whether antialiasing is used. Returns: surfaces: list of the pygame.Surface objects. rects: the list of pygame.Rect objects. """ surfaces = [] rects = [] lines = string_to_screens_and_lines( s, max_width, max_height, f, line_size ) assert len(lines) <= max_screens, "s is too long." for screen in lines: surf, rect = render_lines( screen, f, colour, background, line_size = line_size, use_antialiasing = antialiasing ) surfaces.append(surf) rects.append(rect) return surfaces, rects def display_text_until_keypress(main_text, main_font, text_colour, background, antialias = True, proportion_width = 0.95, proportion_height = 0.95, main_line = None, break_sentences = False, sentence_terminators = (".", "!", "?"), terminator_exceptions = (), gap = 1, bottom_message = "Press the space bar to continue.", bottom_font = None, bottom_line = None, advance_keys = (K_SPACE,), reverse_keys = (K_LEFT, K_BACKSPACE,), quit_keys = (K_ESCAPE,), ticker = None, frame_rate = 30, files = ()): """ Display text to the screen and wait for the user to advance. If the text exceeds a single screen, users can move back and forth between the screens. Parameters: main_text: the text to be displayed, excluding the advance message. main_font: the font used for main_text. text_colour: RGB list/tuple for the colour of text. background: RGB list/tuple for main_text's background. Keyword Parameters: antialias: Boolean indicating whether antialiasing is used in text rendering; defaults to True. proportion_width: proportion of the main display surface's width used for text rendering (default = 0.95). proportion_height: proportion of the main display surface's height used for text rendering (default = 0.95). main_line: pixel rows between lines of text; taken from main_font if not set. break_sentences: Boolean indicating whether sentences can be broken across screens; defaults to False. NB: Sentences may be broken across screens even if False if they cannot fit on a single screen. sentence_terminators: strings that end a sentence. terminator_exceptions: exceptions to the strings in sentence_terminators. gap: the number of line breaks between the bottom of the main text and the top of bottom_message (default = 1). bottom_message: text at the end of each screen; defaults to "Press the space bar to continue.", but should be changed if advance_keys does not include K_SPACE. bottom_font: font to use for bottom_message; if left as None, main_font is used. bottom_line: same as main_line for bottom_line; taken from bottom_font if not set. advance_keys: keys to move through the screens; defaults to (K_SPACE,). reverse_keys: keys to move backward through the screens; defaults to (K_LEFT, K_BACKSPACE); to disable the user's ability to move backward, pass an empty tuple. quit_keys: keys to exit the program; set as an empty tuple to disable. ticker: a pygame.time.Clock object for controlling frame rate; one is created if one is not passed. frame_rate: the maximum frames per second; defaults to 30. files: an optional list/tuple of open files to close in case the user quits. """ if not main_line: main_line = main_font.get_linesize() if not bottom_font: bottom_font = main_font if not bottom_line: bottom_line = bottom_font.get_linesize() window_surface = pygame.display.get_surface() try: window_rect = window_surface.get_rect() except AttributeError: window_surface = pygame.display.set_mode(pygame.display.list_modes()[0]) window_rect = window_surface.get_rect() window_surface.fill(background) window_width, window_height = window_surface.get_size() pixel_columns = int(proportion_width*window_width) pixel_rows = int(proportion_height*window_height) # Initialize lists to hold the generated surfaces and rects: surfaces = [] rects = [] # Get a surface and rect for bottom_message: bottom_lines = string_to_screens_and_lines( bottom_message, pixel_columns, pixel_rows, f = bottom_font, pixels_between_lines = bottom_line ) assert len(bottom_lines) == 1, "The bottom_message parameter cannot \ exceed a single screen." bottom_lines = bottom_lines[0] bottom_surface, bottom_rect = render_lines( bottom_lines, bottom_font, text_colour, background, line_size = bottom_line, use_antialiasing = antialias ) # Get the height for main_text: main_height = pixel_rows-bottom_rect.height-gap*main_line if break_sentences: main_lines = string_to_screens_and_lines( main_text, pixel_columns, main_height, main_font, pixels_between_lines = main_line, end_screens_with = sentence_terminators, do_not_include = terminator_exceptions ) else: main_lines = string_to_screens_and_lines( main_text, pixel_columns, main_height, main_font, pixels_between_lines = main_line ) for screen in main_lines: main_surface, main_rect = render_lines( screen, main_font, text_colour, background, line_size = main_line, use_antialiasing = antialias ) bottom_rect_copy = pygame.Rect(bottom_rect) # Create a surface to hold both main_surface and bottom_surface: surfaces_combined = pygame.Surface((pixel_columns, pixel_rows)) rects_combined = surfaces_combined.get_rect() surfaces_combined.fill(background) # Centre text with reference to the longer of the main_rect and # bottom_rect: if main_rect.width >= bottom_rect.width: left_coordinate = (pixel_columns-main_rect.width)//2 else: left_coordinate = (pixel_columns-bottom_rect.width)//2 main_rect.topleft = (left_coordinate, 0) bottom_rect_copy.topleft = (left_coordinate, main_rect.bottom+gap*main_line) surfaces_combined.blit(main_surface, main_rect) surfaces_combined.blit(bottom_surface, bottom_rect_copy) rects_combined.center = window_rect.center surfaces.append(surfaces_combined) rects.append(rects_combined) i = 0 surface_i = surfaces[i] rect_i = rects[i] window_surface.blit(surface_i, rect_i) keep_looping = True pygame.display.update() while keep_looping: for event in pygame.event.get(): if (event.type == KEYUP and event.key in quit_keys) or event.type == QUIT: generic.terminate(files) elif event.type == KEYUP and event.key in reverse_keys and i > 0: # Move back a screen: i = i-1 surface_i = surfaces[i] rect_i = rects[i] window_surface.blit(surface_i, rect_i) pygame.display.update(rect_i) elif event.type == KEYUP and event.key in advance_keys and i < len(surfaces)-1: # Moving forward a screen. i = i+1 surface_i = surfaces[i] rect_i = rects[i] window_surface.blit(surface_i, rect_i) pygame.display.update(rect_i) elif event.type == KEYUP and event.key in advance_keys and i == len(surfaces)-1: keep_looping= False else: pass try: ticker.tick(frame_rate) except AttributeError: ticker = pygame.time.Clock() ticker.tick(frame_rate) def ask_question(question, f, text_colour, background, antialiasing = True, w = 0.95, h = 0.95, line_size = None, gap = 1, continue_message = "Press the down arrow key to advance.", continue_font = None, continue_line_size = None, min_response = 1, max_response = None, allowed_keys = LETTERS+NUMBERS+PUNCTUATION+(K_SPACE,), move_ahead = (K_DOWN,), move_back = (K_UP,), finished = (K_RETURN,), quit_keys = (K_ESCAPE,), allow_changes = True, ticker = None, frame_rate = 30, files = ()): """ Display a question and return the user's typed response. Parameters: question: the question to which the user responds. f: the font used. text_colour: RGB list/tuple for text. background: RGB list/tuple for background. Keyword Parameters: antialiasing: Boolean indicating whether antialiasing is used in text rendering; defaults to True. w: the proportion of the active display surface's width allowed for text rendering (default = 0.95). h: the proportion of the active display surface's height allowed for text rendering (default = 0.95). line_size: pixel rows between lines of text; if not set, obtained from f. gap: line breaks between question and continue_message or the user's response (default = 1). continue_message: applies only if question exceeds a single screen; the message prompting the user to press a key to advance (default = "Press the down arrow key to advance.") continue_font: font used instead of f for continue_message; f used if not set. continue_line_size: same as line_size but for continue_message. min_response: the minimum length of the user's response (default = 1). max_response: the maximum length of the user's response; (default = None). allowed_keys: keys that can be used for responding. move_ahead: keys that move to the next screen; only applicable if question takes up more than one screen. move_back: keys that move to the previous screen. finished: keys to press when the response is finished; defaults to return, but can be empty if min_response and max_response are equal. quit_keys: keys for closing the program. allow_changes: Boolean guiding whether input can be deleted once typed; defaults to True. ticker: pygame.time.Clock object; one is created if none is passed. frame_rate: the maximum frames per second (default = 30). files: files to close if terminate() is called. Returns: r: the user's response. """ if not line_size: line_size = f.get_linesize() r = "" window_surface = pygame.display.get_surface() try: window_rect = window_surface.get_rect() except AttributeError: window_surface = pygame.display.set_mode(pygame.display.list_modes()[0]) window_surface.fill(background) window_width, window_height = window_rect.size # Set pixel columns and rows allowed: pixel_columns = int(w*window_width) pixel_rows = int(h*window_height) surfaces = [] rects = [] # Get pixel rows available for question after accounting for the user's # response and gap: question_height = pixel_rows-(gap+1)*line_size # Break question into screens and lines: question_screens = string_to_screens_and_lines( question, pixel_columns, question_height, f, pixels_between_lines = line_size ) if len(question_screens) == 1: # question fits on one screen. # Extract question_screens from its outter list: question_screens = question_screens[0] question_surface, question_rect = render_lines( question_screens, f, text_colour, background, line_size = line_size, use_antialiasing = antialiasing ) # Initialize the surface for question: main_surface = pygame.Surface((pixel_columns, pixel_rows)) main_rect = main_surface.get_rect() # Centre question_rect within a pixel_columns by question_height # rectangle with a top-left coordinate of (0, 0): question_rect.center = (pixel_columns//2, question_height//2) # Get the response position: response_position = ( question_rect.left+(window_width-pixel_columns)//2, question_rect.bottom+gap*line_size+(window_height-pixel_rows)//2 ) main_surface.fill(background) main_surface.blit(question_surface, question_rect) # Centre main_rect with respect to window_surface: main_rect.center = window_rect.center surfaces.append(main_surface) rects.append(main_rect) else: # question doesn't fit on one screen, so continue_message needs to be # created. if not continue_font: continue_font = f if not continue_line_size: continue_line_size = continue_font.get_linesize() continue_lines = string_to_screens_and_lines( continue_message, pixel_columns, pixel_rows, continue_font, pixels_between_lines = continue_line_size ) assert len(continue_lines) == 1, "continue_message is too long; it \ takes up multiple screens." continue_lines = continue_lines[0] continue_surface, continue_rect = render_lines( continue_lines, continue_font, text_colour, background, line_size = continue_line_size, use_antialiasing = antialiasing ) # Unless continue_message takes up the same number of pixel rows as # given for the user's typed response, question_text will need to be # reconverted to question_screens. if continue_rect.height != line_size: # It is possible that continue_message is so much smaller than # line_size that question_text now fits on a single screen. # This causes problems because of the different keypresses # accepted on the last screen. # Prevent it: for i in range(question_height, 0, -1): question_screens = string_to_screens_and_lines( question, pixel_columns, i, f, pixels_between_lines = line_size ) if len(question_screens) > 1: break last_screen = question_screens[-1] last_screen_height = height_of_strings(last_screen, f, line_size) # Because last_screen was just fit with continue_message, ensure # that it fits with line_size. # If it doesn't, it's split into two screens. if last_screen_height+(gap+1)*line_size > pixel_rows: final_line = last_screen[-1] del last_screen[-1] new_last_screen = [final_line] question_screens.append(new_last_screen) for i in range(len(question_screens)): question_screen = question_screens[i] question_surface, question_rect = render_lines( question_screen, f, text_colour, background, line_size = line_size, use_antialiasing = antialiasing ) current_surface = pygame.Surface((pixel_columns, pixel_rows)) current_surface.fill(background) current_rect = current_surface.get_rect() if i == len(question_screens)-1: # continue_message is not on this screen. question_rect.topleft = ((pixel_columns-question_rect.width)//2, 0) response_position = ( question_rect.left+(window_width-pixel_columns), question_rect.bottom+gap*line_size+(window_height-pixel_rows)//2 ) current_surface.blit(question_surface, question_rect) else: # continue_message appears on this screen. # The left coordinate depends on which is wider. if question_rect.width >= continue_rect.width: left_coordinate = (pixel_columns-question_rect.width)//2 else: left_coordinate = (pixel_columns-continue_rect.width)//2 question_rect.topleft = (left_coordinate, 0) continue_rect.topleft = ( left_coordinate, question_rect.bottom+gap*line_size ) current_surface.blit(question_surface, question_rect) current_surface.blit(continue_surface, continue_rect) current_rect.center = window_rect.center surfaces.append(current_surface) rects.append(current_rect) # Create a screen tracker and show the first screen: i = 0 surface_i = surfaces[i] rect_i = rects[i] window_surface.blit(surface_i, rect_i) answer_obtained = False pygame.display.update() while not answer_obtained: for event in pygame.event.get(): if event.type == QUIT or (event.type == KEYUP and event.key in quit_keys): generic.terminate(files) elif i < len(surfaces)-1 and event.type == KEYUP and event.key in move_ahead: # The user is moving to the next screen. i = i+1 window_surface.fill(background, rect_i) surface_i = surfaces[i] rect_i = rects[i] window_surface.blit(surface_i, rect_i) pygame.display.update(rect_i) elif i > 0 and event.type == KEYUP and event.key in move_back: # The user is moving back one screen. i = i-1 window_surface.fill(background, rect_i) surface_i = surfaces[i] rect_i = rects[i] window_surface.blit(surface_i, rect_i) pygame.display.update(rect_i) elif event.type == KEYUP and event.key in allowed_keys and (len(r) < max_response or not max_response): # A character has been added to r. character = pygame.key.name(event.key) r = r+character if not finished and len(r) == max_response: answer_obtained = True else: surface_r, rect_r = render_string( r, f, text_colour, background, antialiasing ) rect_r.topleft = response_position window_surface.fill(background, rect_r) window_surface.blit(surface_r, rect_r) pygame.display.update(rect_r) elif event.type == KEYUP and event.key == K_BACKSPACE and allow_changes and r and i == len(surfaces)-1: # The last character has been deleted. r = r[:len(r)-1] update_rect = rect_r surface_r, rect_r = render_string( r, f, text_colour, background, antialiasing ) rect_r.topleft = response_position window_surface.fill(background, update_rect) window_surface.blit(surface_r, rect_r) pygame.display.update(update_rect) elif event.type == KEYUP and event.key in finished and i == len(surfaces)-1 and len(r) >= min_response: # The user has finished r. answer_obtained = True else: pass try: ticker.tick(frame_rate) except AttributeError: # No clock was passed to the function. ticker = pygame.time.Clock() ticker.tick(frame_rate) return r
[ 1, 9995, 13, 6678, 29879, 363, 16384, 1426, 304, 278, 4315, 29889, 13, 13, 1626, 15061, 297, 22028, 947, 451, 2758, 363, 1196, 16706, 29889, 910, 508, 3275, 304, 13, 12175, 746, 15661, 304, 4050, 1426, 29892, 10734, 565, 697, 338, 9644, 545, 310, 278, 13, 2103, 322, 3171, 310, 263, 304, 29899, 915, 29899, 9482, 287, 1347, 297, 263, 2183, 4079, 29889, 450, 3168, 13, 4150, 4386, 1438, 23553, 29889, 13, 13, 4013, 3883, 7805, 278, 1494, 3168, 313, 4149, 278, 1574, 19651, 363, 901, 13, 19678, 1125, 13, 1678, 15655, 342, 29918, 15670, 29901, 3639, 278, 3171, 297, 17036, 310, 278, 15655, 342, 5497, 746, 13, 9482, 287, 297, 263, 2183, 4079, 29889, 13, 1678, 1426, 29918, 517, 29918, 18616, 2063, 29901, 3588, 263, 1347, 964, 263, 1051, 310, 25260, 29889, 13, 1678, 4315, 29918, 6229, 5580, 29901, 3639, 278, 13391, 310, 278, 6136, 2479, 7101, 29889, 13, 1678, 27217, 29918, 1807, 29918, 517, 29918, 9482, 29901, 736, 278, 1347, 297, 263, 1051, 393, 674, 2125, 701, 13, 1552, 1556, 14698, 2913, 297, 17036, 313, 1366, 674, 5491, 29892, 541, 451, 12695, 29892, 13, 915, 278, 1347, 411, 278, 1556, 4890, 467, 13, 1678, 3171, 29918, 974, 29918, 19651, 29901, 736, 278, 3171, 310, 263, 1051, 310, 6031, 746, 13751, 297, 13, 29874, 2183, 4079, 29889, 13, 1678, 12244, 29918, 726, 29901, 2867, 263, 1347, 964, 3454, 373, 263, 4315, 29889, 13, 1678, 1347, 29918, 517, 29918, 29879, 24546, 29918, 392, 29918, 9012, 29901, 2867, 263, 1347, 964, 11844, 322, 3454, 29889, 13, 1678, 4050, 29918, 1807, 29901, 679, 22028, 29889, 18498, 2161, 322, 22028, 29889, 7364, 3618, 363, 263, 1347, 29889, 13, 1678, 4050, 29918, 9012, 29901, 736, 22028, 29889, 18498, 2161, 322, 22028, 29889, 7364, 3618, 363, 263, 1051, 310, 13, 19651, 29889, 13, 1678, 1347, 29918, 517, 29918, 7610, 2161, 29918, 392, 29918, 1621, 29901, 736, 22028, 29889, 18498, 2161, 322, 22028, 29889, 7364, 3618, 13, 1454, 263, 1347, 29892, 2183, 11938, 373, 278, 15526, 13391, 310, 278, 4315, 29889, 13, 1678, 2479, 29918, 726, 29918, 29305, 29918, 1989, 2139, 29901, 2198, 1426, 304, 278, 4315, 2745, 278, 1404, 13, 2139, 267, 263, 2702, 1820, 313, 272, 738, 2702, 1820, 515, 263, 1051, 467, 13, 1678, 2244, 29918, 12470, 29901, 2479, 263, 1139, 304, 278, 4315, 322, 736, 278, 2933, 29889, 13, 15945, 29908, 13, 13, 3166, 4770, 29888, 9130, 1649, 1053, 8542, 13, 13, 5215, 10876, 13, 13, 5215, 22028, 13, 3166, 22028, 29889, 2997, 29879, 1053, 334, 13, 13, 3166, 274, 468, 392, 6954, 1053, 7639, 13, 3166, 274, 468, 392, 6954, 1053, 10035, 13, 13, 1307, 29911, 4945, 29903, 353, 313, 13, 1678, 476, 29918, 29874, 29892, 476, 29918, 29890, 29892, 476, 29918, 29883, 29892, 476, 29918, 29881, 29892, 476, 29918, 29872, 29892, 476, 29918, 29888, 29892, 476, 29918, 29887, 29892, 476, 29918, 29882, 29892, 476, 29918, 29875, 29892, 476, 29918, 29926, 29892, 476, 29918, 29895, 29892, 476, 29918, 29880, 29892, 476, 29918, 29885, 29892, 13, 1678, 476, 29918, 29876, 29892, 476, 29918, 29877, 29892, 476, 29918, 29886, 29892, 476, 29918, 29939, 29892, 476, 29918, 29878, 29892, 476, 29918, 29879, 29892, 476, 29918, 29873, 29892, 476, 29918, 29884, 29892, 476, 29918, 29894, 29892, 476, 29918, 29893, 29892, 476, 29918, 29916, 29892, 476, 29918, 29891, 29892, 476, 29918, 29920, 13, 29897, 13, 1964, 19689, 2882, 2544, 353, 376, 19658, 24405, 29954, 17628, 29967, 29968, 26369, 29940, 4590, 29984, 29934, 1254, 29965, 29963, 29956, 18454, 29999, 10736, 1753, 12443, 823, 6321, 23521, 459, 29939, 29878, 303, 4090, 29893, 20230, 29908, 13, 23207, 29903, 353, 313, 13, 1678, 476, 29918, 29900, 29892, 476, 29918, 29896, 29892, 476, 29918, 29906, 29892, 476, 29918, 29941, 29892, 476, 29918, 29946, 29892, 476, 29918, 29945, 29892, 476, 29918, 29953, 29892, 476, 29918, 29955, 29892, 476, 29918, 29947, 29892, 476, 29918, 29929, 13, 29897, 13, 29925, 3904, 1783, 29965, 8098, 353, 313, 13, 1678, 476, 29918, 13171, 5971, 29928, 29892, 476, 29918, 19795, 1529, 29892, 476, 29918, 14130, 2725, 29892, 476, 29918, 13356, 2891, 29923, 29892, 476, 29918, 5746, 13875, 7833, 29892, 476, 29918, 15032, 1164, 29892, 476, 29918, 1660, 29924, 2965, 5607, 1164, 13, 29897, 13, 13, 13, 1753, 15655, 342, 29918, 15670, 29898, 5657, 1125, 13, 1678, 9995, 13, 1678, 3617, 278, 3171, 29892, 297, 17036, 29892, 310, 278, 15655, 342, 5497, 297, 278, 22968, 746, 13, 1678, 13751, 411, 263, 2183, 4079, 29889, 13, 1678, 9995, 13, 1678, 736, 4079, 29889, 2311, 29898, 1964, 19689, 2882, 2544, 9601, 29896, 29962, 13, 13, 13, 1753, 1426, 29918, 517, 29918, 18616, 2063, 29898, 726, 29892, 6624, 4097, 353, 313, 1642, 613, 376, 29973, 613, 376, 29991, 613, 525, 1213, 742, 525, 3026, 742, 525, 3850, 5477, 19060, 353, 4852, 20335, 19602, 376, 29924, 29879, 19602, 376, 29924, 2288, 19602, 376, 25639, 19602, 376, 29872, 29889, 29887, 19602, 376, 29875, 29889, 29872, 1213, 22164, 13, 1678, 9995, 13, 1678, 28301, 1426, 964, 263, 1051, 310, 25260, 29889, 13, 268, 13, 1678, 910, 338, 263, 10712, 10112, 3647, 740, 393, 4893, 263, 13382, 310, 1426, 322, 13, 1678, 16706, 372, 964, 263, 1051, 310, 25260, 29889, 450, 1667, 380, 3774, 1847, 2908, 363, 278, 13, 1678, 740, 338, 393, 727, 526, 12727, 3838, 393, 1033, 12266, 2845, 278, 13, 1678, 1095, 310, 263, 10541, 470, 278, 1095, 310, 385, 29759, 14641, 29889, 306, 437, 451, 1073, 310, 385, 13, 1678, 11828, 1650, 304, 445, 1108, 29889, 13, 268, 13, 1678, 405, 29933, 29901, 450, 11833, 338, 1754, 393, 1196, 16706, 2337, 13530, 278, 1095, 310, 263, 13, 1678, 10541, 29892, 17126, 310, 278, 26328, 2931, 29889, 13, 268, 13, 1678, 12662, 2699, 29901, 13, 4706, 1426, 29901, 278, 13382, 304, 2867, 964, 25260, 29889, 13, 268, 13, 1678, 7670, 1742, 12662, 2699, 29901, 13, 4706, 6624, 4097, 29901, 6031, 393, 13530, 278, 1095, 310, 263, 10541, 29889, 13, 4706, 19060, 29901, 15283, 304, 278, 6624, 4097, 29889, 13, 268, 13, 1678, 16969, 29901, 13, 4706, 25260, 29901, 263, 1051, 310, 25260, 297, 1426, 29889, 13, 1678, 9995, 13, 1678, 25260, 353, 5159, 13, 1678, 1426, 29918, 294, 29918, 26956, 29879, 353, 1426, 29889, 5451, 14182, 29876, 1159, 13, 1678, 14880, 29879, 29918, 294, 29918, 9303, 353, 5159, 13, 1678, 363, 14880, 297, 1426, 29918, 294, 29918, 26956, 29879, 29901, 13, 4706, 14880, 353, 14880, 29889, 17010, 580, 13, 4706, 565, 451, 14880, 29901, 13, 9651, 396, 910, 338, 263, 9654, 1196, 29889, 13, 9651, 14880, 29879, 29918, 294, 29918, 9303, 29889, 4397, 4197, 2314, 13, 9651, 396, 2921, 304, 278, 2446, 14880, 29901, 13, 9651, 6773, 13, 4706, 3838, 353, 14880, 29889, 5451, 703, 16521, 13, 4706, 14880, 29879, 29918, 294, 29918, 9303, 29889, 4397, 29898, 9303, 29897, 13, 308, 13, 1678, 363, 14880, 297, 14880, 29879, 29918, 294, 29918, 9303, 29901, 13, 4706, 565, 451, 14880, 29901, 13, 9651, 396, 910, 338, 263, 9654, 1196, 29889, 13, 9651, 25260, 29889, 4397, 703, 1159, 13, 9651, 6773, 13, 4706, 10541, 353, 5124, 13, 4706, 363, 1734, 297, 14880, 29901, 13, 9651, 396, 3462, 1734, 304, 10541, 29892, 3412, 411, 263, 8236, 2913, 565, 5181, 29901, 13, 9651, 565, 10541, 29901, 13, 18884, 10541, 353, 10541, 13578, 15691, 1742, 13, 9651, 1683, 29901, 13, 18884, 10541, 353, 1734, 13, 9651, 396, 5399, 3692, 1734, 10614, 411, 263, 6624, 1061, 29901, 13, 9651, 1018, 29901, 13, 18884, 10614, 29918, 2541, 29918, 18821, 1061, 353, 1734, 29889, 1975, 2541, 29898, 18821, 4097, 29897, 13, 9651, 5174, 20948, 29901, 13, 18884, 396, 6624, 4097, 338, 3117, 263, 1051, 3265, 1135, 263, 18761, 29889, 13, 18884, 396, 851, 29889, 1975, 2541, 580, 6858, 263, 18761, 29889, 13, 18884, 6624, 4097, 353, 18761, 29898, 18821, 4097, 29897, 13, 18884, 10614, 29918, 2541, 29918, 18821, 1061, 353, 1734, 29889, 1975, 2541, 29898, 18821, 4097, 29897, 13, 9651, 565, 10614, 29918, 2541, 29918, 18821, 1061, 322, 1734, 451, 297, 19060, 29901, 13, 18884, 396, 910, 10614, 278, 10541, 29889, 13, 18884, 25260, 29889, 4397, 29898, 18616, 663, 29897, 13, 18884, 10541, 353, 5124, 13, 4706, 396, 5399, 363, 263, 270, 574, 1847, 10541, 29901, 13, 4706, 565, 10541, 29901, 13, 9651, 25260, 29889, 4397, 29898, 18616, 663, 29897, 13, 1678, 736, 25260, 13, 13, 13, 1753, 4315, 29918, 6229, 5580, 7295, 13, 1678, 9995, 13, 1678, 3617, 278, 2920, 322, 3171, 310, 278, 6136, 2479, 7101, 29889, 960, 694, 2479, 13, 1678, 7101, 756, 1063, 731, 29892, 679, 278, 937, 1543, 297, 22028, 29889, 4990, 29889, 1761, 29918, 1545, 267, 2141, 13, 1678, 9995, 13, 1678, 4315, 29918, 7610, 2161, 353, 22028, 29889, 4990, 29889, 657, 29918, 7610, 2161, 580, 13, 1678, 1018, 29901, 13, 4706, 281, 29892, 298, 353, 4315, 29918, 7610, 2161, 29889, 657, 29918, 2311, 580, 13, 1678, 5174, 23833, 2392, 29901, 13, 4706, 281, 29892, 298, 353, 22028, 29889, 4990, 29889, 1761, 29918, 1545, 267, 580, 29961, 29900, 29962, 13, 1678, 736, 281, 29892, 298, 13, 13, 13, 1753, 27217, 29918, 1807, 29918, 517, 29918, 9482, 29898, 19651, 29892, 285, 1125, 13, 1678, 9995, 13, 1678, 3617, 278, 27217, 1347, 304, 4050, 515, 263, 1051, 29889, 13, 268, 13, 1678, 12662, 2699, 29901, 13, 4706, 6031, 29901, 263, 1051, 470, 18761, 310, 6031, 29889, 13, 4706, 285, 29901, 278, 22028, 29889, 5657, 29889, 9824, 1203, 1304, 363, 15061, 29889, 13, 268, 13, 1678, 16969, 29901, 13, 4706, 269, 29901, 278, 27217, 1347, 304, 4050, 411, 285, 29936, 565, 727, 338, 263, 22134, 29892, 269, 338, 731, 304, 13, 9651, 278, 1347, 13920, 292, 8859, 297, 278, 6031, 1051, 29889, 13, 4706, 302, 29901, 278, 1353, 310, 15526, 4341, 4312, 304, 4050, 269, 29889, 13, 1678, 9995, 13, 1678, 269, 353, 5124, 13, 1678, 302, 353, 29871, 29900, 13, 1678, 363, 1347, 297, 6031, 29901, 13, 4706, 396, 3617, 278, 2920, 310, 1347, 29901, 13, 4706, 281, 353, 285, 29889, 2311, 29898, 1807, 9601, 29900, 29962, 13, 4706, 565, 281, 1405, 302, 29901, 13, 9651, 302, 353, 281, 13, 9651, 269, 353, 1347, 13, 1678, 736, 269, 29892, 302, 13, 13, 13, 1753, 3171, 29918, 974, 29918, 19651, 29898, 19651, 29892, 285, 29892, 1196, 29918, 2311, 1125, 13, 1678, 9995, 13, 1678, 11796, 29872, 278, 3171, 310, 263, 1051, 310, 6031, 746, 13751, 411, 263, 2183, 4079, 29892, 13, 1678, 5622, 964, 3633, 278, 1196, 2159, 313, 29875, 29889, 29872, 1696, 278, 1353, 310, 15526, 4206, 13, 1678, 20064, 630, 1546, 278, 5970, 310, 697, 1196, 310, 1426, 322, 278, 2246, 310, 278, 13, 1678, 2446, 467, 13, 268, 13, 1678, 12662, 2699, 29901, 13, 4706, 6031, 29901, 278, 1051, 310, 6031, 5069, 3171, 338, 17005, 29936, 15894, 393, 13, 9651, 1269, 1347, 338, 263, 5004, 1196, 29889, 13, 4706, 285, 29901, 278, 22028, 29889, 5657, 29889, 9824, 1203, 297, 607, 1426, 338, 304, 367, 13751, 29889, 13, 4706, 1196, 29918, 2311, 29901, 278, 1353, 310, 15526, 4206, 1546, 3454, 29936, 1818, 367, 6374, 29889, 13, 268, 13, 1678, 16969, 29901, 13, 4706, 298, 29901, 278, 3171, 310, 6031, 746, 13751, 29889, 13, 1678, 9995, 13, 1678, 298, 353, 29871, 29900, 13, 1678, 396, 18076, 487, 1196, 29918, 2311, 330, 2547, 304, 1369, 29901, 13, 1678, 363, 1347, 297, 6031, 29901, 13, 4706, 396, 3617, 1857, 3171, 29901, 13, 4706, 1196, 29918, 3545, 353, 285, 29889, 2311, 29898, 1807, 9601, 29896, 29962, 13, 4706, 298, 353, 298, 29974, 1220, 29918, 3545, 13, 1678, 396, 7407, 330, 2547, 526, 2715, 1286, 29889, 13, 1678, 298, 353, 298, 29974, 1220, 29918, 2311, 16395, 2435, 29898, 19651, 6817, 29896, 29897, 13, 1678, 736, 298, 13, 13, 13, 1753, 12244, 29918, 726, 29898, 1482, 29918, 726, 29892, 2920, 29892, 285, 29892, 2030, 29918, 726, 353, 19997, 1369, 29918, 1482, 29918, 1220, 353, 7700, 29892, 736, 29918, 3545, 353, 7700, 29892, 1196, 29918, 3545, 353, 6213, 1125, 13, 1678, 9995, 13, 1678, 28301, 263, 1347, 964, 3454, 373, 263, 4315, 29889, 13, 268, 13, 1678, 12662, 2699, 29901, 13, 4706, 716, 29918, 726, 29901, 3838, 304, 3588, 304, 3454, 29936, 565, 1051, 470, 18761, 29892, 1269, 1543, 338, 13, 9651, 263, 1051, 310, 3838, 515, 263, 14880, 29892, 411, 1196, 16706, 6336, 13, 9651, 1494, 385, 1543, 29936, 565, 851, 29892, 6219, 580, 338, 1304, 304, 1207, 964, 13, 9651, 14880, 29879, 322, 769, 5375, 3838, 29936, 565, 716, 29918, 726, 6161, 1078, 304, 13, 9651, 7700, 297, 263, 11185, 3030, 29892, 263, 9654, 1196, 338, 4133, 13, 4706, 2920, 29901, 7472, 17036, 639, 1196, 313, 2103, 1405, 29871, 29900, 467, 13, 4706, 285, 29901, 278, 4079, 1203, 304, 671, 29889, 13, 268, 13, 1678, 7670, 1742, 12662, 2699, 29901, 13, 308, 736, 29918, 3545, 29901, 3692, 278, 3171, 310, 278, 13751, 3454, 338, 4133, 29936, 13, 9651, 21274, 304, 7700, 29889, 13, 4706, 2030, 29918, 726, 29901, 13136, 1051, 310, 3454, 304, 607, 716, 29918, 726, 338, 2715, 29936, 1269, 13, 9651, 1543, 297, 2030, 29918, 726, 338, 12023, 304, 367, 263, 2323, 1196, 29936, 967, 2814, 2877, 13, 9651, 2183, 2920, 338, 451, 7120, 29936, 21274, 304, 385, 4069, 1051, 29889, 13, 4706, 1369, 29918, 1482, 29918, 1220, 29901, 871, 16058, 565, 2030, 29918, 726, 6161, 1078, 304, 5852, 297, 263, 13, 9651, 11185, 3030, 29936, 14088, 3692, 263, 716, 1196, 881, 1369, 313, 29875, 29889, 29872, 1696, 13, 9651, 3692, 716, 29918, 726, 881, 3380, 263, 716, 1196, 416, 21274, 304, 7700, 29889, 13, 4706, 1196, 29918, 2311, 29901, 871, 16058, 565, 736, 29918, 3545, 338, 5852, 29936, 427, 4769, 278, 17036, 13, 9651, 20064, 630, 1546, 3454, 310, 1426, 29936, 565, 451, 731, 541, 1196, 29918, 2311, 338, 13, 9651, 4312, 29892, 372, 338, 7625, 515, 285, 29889, 13, 268, 13, 1678, 16969, 29901, 13, 4706, 3454, 29901, 2030, 29918, 726, 411, 716, 29918, 726, 2715, 29889, 13, 4706, 2984, 635, 29901, 13, 9651, 3171, 29901, 278, 3171, 310, 3454, 746, 13751, 411, 285, 29889, 13, 1678, 9995, 13, 1678, 396, 25889, 8679, 373, 3692, 5684, 1426, 470, 263, 9654, 1196, 338, 1641, 13, 1678, 396, 2715, 29901, 13, 1678, 565, 716, 29918, 726, 29901, 13, 4706, 396, 960, 716, 29918, 726, 338, 263, 1347, 29892, 372, 4225, 304, 367, 11543, 304, 263, 1051, 29889, 13, 4706, 1018, 29901, 13, 9651, 396, 3617, 14880, 29879, 29901, 13, 9651, 716, 29918, 726, 29918, 294, 29918, 26956, 29879, 353, 716, 29918, 726, 29889, 5451, 14182, 29876, 1159, 13, 9651, 396, 6811, 3539, 716, 29918, 726, 29901, 13, 9651, 716, 29918, 726, 353, 5159, 13, 9651, 363, 14880, 297, 716, 29918, 726, 29918, 294, 29918, 26956, 29879, 29901, 13, 18884, 14880, 29918, 1761, 353, 14880, 29889, 5451, 703, 16521, 13, 18884, 716, 29918, 726, 29889, 4397, 29898, 26956, 29918, 1761, 29897, 13, 4706, 5174, 23833, 2392, 29901, 13, 9651, 396, 716, 29918, 726, 338, 2307, 263, 1051, 29889, 13, 9651, 1209, 13, 632, 13, 4706, 716, 29918, 9012, 353, 1051, 29898, 1025, 29918, 726, 29897, 13, 4706, 396, 5399, 565, 263, 1833, 1196, 515, 2030, 29918, 726, 338, 4312, 29901, 13, 4706, 565, 2030, 29918, 726, 322, 451, 1369, 29918, 1482, 29918, 1220, 29901, 13, 9651, 1196, 353, 2030, 29918, 726, 14352, 29896, 29962, 13, 9651, 396, 21267, 1196, 515, 716, 29918, 9012, 29901, 13, 9651, 628, 716, 29918, 9012, 14352, 29896, 29962, 13, 4706, 1683, 29901, 13, 9651, 1196, 353, 5124, 13, 632, 13, 4706, 396, 3789, 1196, 2920, 29901, 13, 4706, 1196, 29918, 2103, 353, 285, 29889, 2311, 29898, 1220, 9601, 29900, 29962, 13, 4706, 396, 383, 453, 716, 29918, 9012, 14880, 491, 14880, 29901, 13, 4706, 363, 14880, 297, 716, 29918, 726, 29901, 13, 9651, 396, 383, 453, 1269, 1196, 1734, 491, 1734, 29901, 13, 9651, 363, 1734, 297, 14880, 29901, 13, 18884, 396, 25870, 1196, 338, 5279, 4069, 29892, 263, 8236, 2913, 338, 4312, 13, 18884, 396, 746, 25202, 1734, 29915, 29879, 2920, 29889, 13, 18884, 565, 1196, 29901, 13, 462, 1678, 1734, 29918, 2103, 353, 285, 29889, 2311, 703, 15691, 1742, 9601, 29900, 29962, 13, 18884, 1683, 29901, 13, 462, 1678, 1734, 29918, 2103, 353, 285, 29889, 2311, 29898, 1742, 9601, 29900, 29962, 13, 18884, 1196, 29918, 2103, 353, 1196, 29918, 2103, 29974, 1742, 29918, 2103, 13, 18884, 565, 1196, 29918, 2103, 529, 2920, 29901, 13, 462, 1678, 396, 1734, 23994, 373, 445, 1196, 29889, 13, 462, 1678, 565, 1196, 29901, 13, 462, 4706, 1196, 353, 1196, 13578, 15691, 1742, 13, 462, 1678, 1683, 29901, 13, 462, 4706, 1196, 353, 1734, 13, 18884, 25342, 1196, 29918, 2103, 1275, 2920, 29901, 13, 462, 1678, 396, 1734, 23994, 29892, 541, 694, 901, 3838, 674, 29889, 13, 462, 1678, 1196, 353, 1196, 13578, 15691, 1742, 13, 462, 1678, 716, 29918, 9012, 29889, 4397, 29898, 1220, 29897, 13, 462, 1678, 1196, 29922, 5124, 13, 462, 1678, 1196, 29918, 2103, 353, 29871, 29900, 13, 18884, 1683, 29901, 13, 462, 1678, 396, 1734, 1838, 29915, 29873, 6216, 29889, 13, 462, 1678, 716, 29918, 9012, 29889, 4397, 29898, 1220, 29897, 13, 462, 1678, 1196, 353, 1734, 13, 462, 1678, 1734, 29918, 2103, 353, 285, 29889, 2311, 29898, 1742, 9601, 29900, 29962, 13, 462, 1678, 1196, 29918, 2103, 353, 1734, 29918, 2103, 13, 9651, 396, 3834, 760, 310, 263, 1196, 1795, 367, 2175, 29889, 13, 9651, 565, 1196, 29901, 13, 18884, 716, 29918, 9012, 29889, 4397, 29898, 1220, 29897, 13, 18884, 1196, 353, 5124, 13, 18884, 1196, 29918, 2103, 353, 29871, 29900, 13, 462, 13, 1678, 1683, 29901, 13, 4706, 396, 319, 9654, 1196, 338, 1641, 2715, 304, 2030, 29918, 726, 29889, 13, 4706, 716, 29918, 9012, 353, 1051, 29898, 1025, 29918, 726, 29897, 13, 4706, 716, 29918, 9012, 29889, 4397, 703, 1159, 13, 308, 13, 1678, 396, 5399, 565, 3171, 338, 12833, 29901, 13, 1678, 565, 736, 29918, 3545, 29901, 13, 4706, 396, 5399, 565, 1196, 29918, 3545, 4225, 304, 367, 731, 29901, 13, 4706, 565, 451, 1196, 29918, 3545, 29901, 13, 9651, 1196, 29918, 3545, 353, 285, 29889, 657, 29918, 9012, 675, 580, 13, 4706, 3171, 353, 3171, 29918, 974, 29918, 19651, 29898, 1482, 29918, 9012, 29892, 285, 29892, 1196, 29918, 3545, 29897, 13, 4706, 736, 716, 29918, 9012, 29892, 3171, 13, 1678, 736, 716, 29918, 9012, 13, 13, 13, 1753, 1347, 29918, 517, 29918, 29879, 24546, 29918, 392, 29918, 9012, 29898, 4993, 29892, 6068, 29918, 2103, 29892, 6068, 29918, 3545, 29892, 285, 29892, 17036, 29918, 14811, 29918, 9012, 353, 6213, 29892, 1095, 29918, 29879, 24546, 29918, 2541, 353, 313, 511, 437, 29918, 1333, 29918, 2856, 353, 313, 22164, 13, 1678, 9995, 13, 1678, 14806, 263, 1347, 304, 11844, 322, 3454, 29889, 13, 268, 13, 1678, 349, 4790, 420, 947, 451, 2758, 1196, 16706, 4852, 29905, 29876, 1159, 746, 15061, 1426, 29889, 450, 6437, 13, 1678, 310, 445, 740, 338, 304, 2867, 263, 1347, 964, 3454, 322, 11844, 2183, 263, 4079, 13, 1678, 322, 4315, 13391, 29889, 13, 268, 13, 1678, 450, 1494, 1023, 20813, 526, 1754, 29901, 13, 308, 29896, 29889, 7407, 16706, 4852, 29905, 29876, 1159, 297, 2752, 13530, 278, 1369, 310, 263, 716, 14880, 29889, 13, 9651, 7857, 29892, 304, 505, 385, 3935, 9654, 1196, 313, 29875, 29889, 29872, 1696, 385, 4069, 1347, 29897, 13, 9651, 2615, 297, 278, 4133, 1409, 29892, 788, 1790, 6634, 29876, 29908, 7389, 13, 9651, 1494, 278, 937, 29889, 13, 308, 29906, 29889, 1706, 3302, 13530, 278, 1095, 310, 263, 1734, 29889, 13, 268, 13, 1678, 12662, 2699, 29901, 13, 4706, 2752, 29901, 278, 1347, 304, 16429, 964, 11844, 322, 3454, 29889, 13, 4706, 6068, 29918, 2103, 29901, 278, 2920, 29892, 297, 17036, 29892, 21905, 363, 3454, 29936, 508, 367, 263, 13, 9651, 1353, 310, 17036, 470, 263, 18618, 310, 278, 6136, 4315, 29915, 29879, 2920, 29889, 13, 4706, 6068, 29918, 3545, 29901, 1021, 408, 6068, 29918, 2103, 541, 363, 278, 3171, 310, 263, 2323, 13, 9651, 4315, 29889, 13, 4706, 285, 29901, 278, 4079, 411, 607, 2752, 338, 17005, 29889, 13, 268, 13, 1678, 7670, 1742, 12662, 2699, 29901, 13, 4706, 17036, 29918, 14811, 29918, 9012, 29901, 9654, 15526, 4206, 1546, 3454, 310, 1426, 29936, 21274, 13, 9651, 304, 6213, 29892, 297, 607, 1206, 372, 338, 7625, 515, 285, 29889, 13, 4706, 1095, 29918, 29879, 24546, 29918, 2541, 29901, 263, 22078, 731, 310, 4890, 393, 1122, 1095, 263, 13, 9651, 4315, 29936, 21274, 304, 385, 4069, 18761, 29892, 297, 607, 1206, 738, 2931, 13, 9651, 17140, 263, 1734, 508, 1095, 263, 4315, 29889, 13, 4706, 437, 29918, 1333, 29918, 2856, 29901, 3838, 393, 526, 15283, 304, 278, 1095, 29918, 29879, 24546, 29918, 2541, 13, 9651, 3838, 313, 29872, 29889, 29887, 1696, 376, 29924, 2288, 1213, 10614, 297, 263, 3785, 541, 881, 451, 1095, 263, 4315, 29897, 13, 268, 13, 1678, 16969, 29901, 13, 4706, 11844, 29901, 263, 1773, 333, 326, 8180, 1051, 310, 11844, 322, 3454, 29889, 13, 1678, 9995, 13, 1678, 396, 5399, 565, 6068, 29918, 3545, 322, 6068, 29918, 2103, 817, 304, 367, 731, 29901, 13, 1678, 565, 29871, 29900, 529, 6068, 29918, 2103, 5277, 29871, 29896, 322, 29871, 29900, 529, 6068, 29918, 3545, 5277, 29871, 29896, 29901, 13, 4706, 6068, 29918, 2103, 29892, 6068, 29918, 3545, 353, 4315, 29918, 6229, 5580, 580, 13, 1678, 25342, 29871, 29900, 529, 6068, 29918, 2103, 5277, 29871, 29896, 470, 29871, 29900, 529, 6068, 29918, 3545, 5277, 29871, 29896, 29901, 13, 4706, 12020, 7865, 2392, 703, 29933, 720, 470, 9561, 310, 6068, 29918, 2103, 322, 320, 13, 24622, 29918, 3545, 508, 367, 1546, 29871, 29900, 322, 29871, 29896, 23157, 13, 268, 13, 1678, 396, 5399, 565, 17036, 29918, 14811, 29918, 9012, 4225, 304, 367, 731, 29901, 13, 1678, 565, 451, 17036, 29918, 14811, 29918, 9012, 29901, 13, 4706, 17036, 29918, 14811, 29918, 9012, 353, 285, 29889, 657, 29918, 9012, 675, 580, 13, 1678, 1683, 29901, 13, 4706, 4974, 17036, 29918, 14811, 29918, 9012, 1405, 29871, 29900, 29892, 376, 29886, 861, 1379, 29918, 14811, 29918, 9012, 1818, 367, 320, 13, 1066, 3321, 1213, 13, 268, 13, 1678, 396, 8561, 1854, 393, 6068, 29918, 3545, 508, 24803, 403, 278, 15655, 342, 1734, 297, 13, 1678, 396, 2752, 29901, 13, 1678, 4974, 285, 29889, 2311, 29898, 4993, 9601, 29896, 29962, 5277, 6068, 29918, 3545, 29892, 376, 24622, 29918, 3545, 2609, 320, 13, 562, 510, 1545, 403, 2752, 1213, 13, 268, 13, 1678, 11844, 353, 5159, 13, 1678, 396, 28301, 2752, 964, 14880, 29879, 322, 14880, 29879, 964, 2323, 3838, 29901, 13, 1678, 14880, 29879, 353, 2752, 29889, 5451, 14182, 29876, 1159, 13, 1678, 2323, 29918, 9303, 353, 5159, 13, 1678, 363, 14880, 297, 14880, 29879, 29901, 13, 4706, 5375, 29918, 9303, 353, 14880, 29889, 5451, 703, 16521, 13, 4706, 396, 5806, 1244, 29892, 11539, 393, 278, 27217, 1734, 23994, 29901, 13, 4706, 9449, 342, 29918, 1742, 29892, 17036, 353, 27217, 29918, 1807, 29918, 517, 29918, 9482, 29898, 513, 23352, 29918, 9303, 29892, 285, 29897, 13, 4706, 4974, 17036, 529, 6068, 29918, 2103, 29892, 376, 25641, 29879, 29913, 297, 2752, 338, 2086, 1472, 363, 320, 13, 24622, 29918, 2103, 1213, 29889, 4830, 29898, 9163, 342, 29918, 1742, 29897, 13, 4706, 2323, 29918, 9303, 29889, 4397, 29898, 513, 23352, 29918, 9303, 29897, 13, 268, 13, 1678, 396, 450, 740, 14202, 2446, 29892, 8679, 373, 3692, 25091, 505, 1063, 13, 1678, 396, 7180, 373, 988, 4315, 16706, 508, 6403, 29889, 13, 1678, 565, 451, 1095, 29918, 29879, 24546, 29918, 2541, 29901, 13, 4706, 396, 22666, 16706, 508, 6403, 1494, 738, 1734, 29889, 13, 4706, 396, 28301, 2323, 29918, 9303, 964, 3454, 1728, 4880, 304, 11844, 29901, 13, 4706, 3454, 29918, 974, 29918, 726, 29892, 3001, 29918, 3545, 353, 12244, 29918, 726, 29898, 13, 9651, 2323, 29918, 9303, 29892, 13, 9651, 6068, 29918, 2103, 29892, 13, 9651, 285, 29892, 13, 9651, 736, 29918, 3545, 353, 5852, 29892, 13, 9651, 1196, 29918, 3545, 353, 17036, 29918, 14811, 29918, 9012, 13, 4706, 1723, 13, 4706, 565, 3001, 29918, 3545, 5277, 6068, 29918, 3545, 29901, 13, 9651, 396, 17296, 23994, 373, 697, 4315, 29889, 13, 9651, 11844, 29889, 4397, 29898, 9012, 29918, 974, 29918, 726, 29897, 13, 4706, 1683, 29901, 13, 9651, 396, 1670, 674, 367, 472, 3203, 1023, 11844, 29889, 13, 9651, 396, 25455, 278, 937, 4315, 322, 263, 3171, 6795, 29901, 13, 9651, 4315, 353, 5159, 13, 9651, 4315, 29918, 3545, 353, 29871, 29900, 13, 9651, 363, 1196, 297, 3454, 29918, 974, 29918, 726, 29901, 13, 18884, 1196, 29918, 3545, 353, 285, 29889, 2311, 29898, 1220, 9601, 29896, 29962, 13, 18884, 4315, 29918, 3545, 353, 4315, 29918, 3545, 29974, 1220, 29918, 3545, 29974, 29886, 861, 1379, 29918, 14811, 29918, 9012, 13, 18884, 565, 4315, 29918, 3545, 529, 6068, 29918, 3545, 29901, 13, 462, 1678, 396, 1196, 23994, 373, 278, 1857, 4315, 29889, 13, 462, 1678, 4315, 29889, 4397, 29898, 1220, 29897, 13, 18884, 25342, 4315, 29918, 3545, 1275, 6068, 29918, 3545, 470, 4315, 29918, 3545, 29899, 29886, 861, 1379, 29918, 14811, 29918, 9012, 529, 6068, 29918, 3545, 29901, 13, 462, 1678, 396, 1196, 23994, 29892, 541, 694, 901, 674, 29889, 13, 462, 1678, 4315, 29889, 4397, 29898, 1220, 29897, 13, 462, 1678, 11844, 29889, 4397, 29898, 10525, 29897, 13, 462, 1678, 4315, 353, 5159, 13, 462, 1678, 4315, 29918, 3545, 353, 29871, 29900, 13, 18884, 1683, 29901, 13, 462, 1678, 396, 1196, 1838, 29915, 29873, 6216, 29889, 13, 462, 1678, 11844, 29889, 4397, 29898, 10525, 29897, 13, 462, 1678, 4315, 353, 518, 1220, 29962, 13, 462, 1678, 4315, 29918, 3545, 353, 1196, 29918, 3545, 29974, 29886, 861, 1379, 29918, 14811, 29918, 9012, 13, 9651, 396, 5399, 363, 263, 9886, 4315, 29901, 13, 9651, 565, 4315, 29901, 13, 18884, 11844, 29889, 4397, 29898, 10525, 2144, 13, 462, 13, 1678, 1683, 29901, 13, 4706, 396, 317, 24546, 508, 871, 1095, 1494, 2702, 6031, 29889, 13, 4706, 396, 4525, 6031, 437, 451, 817, 304, 367, 1095, 29899, 974, 29899, 18616, 663, 4890, 29892, 541, 372, 13, 4706, 396, 338, 5189, 304, 14034, 825, 1683, 896, 723, 367, 29889, 7857, 29892, 306, 2737, 13, 4706, 396, 304, 278, 9819, 6031, 408, 25260, 29892, 24084, 3460, 393, 445, 1122, 13, 4706, 396, 367, 10240, 6624, 3002, 29889, 13, 4706, 396, 28301, 14880, 29879, 964, 25260, 29901, 13, 4706, 25260, 353, 5159, 13, 4706, 363, 14880, 297, 14880, 29879, 29901, 13, 9651, 565, 25260, 29901, 13, 18884, 396, 910, 338, 451, 278, 937, 1196, 29892, 577, 1369, 278, 14880, 373, 263, 716, 13, 18884, 396, 1196, 29901, 13, 18884, 25260, 29889, 4397, 703, 1159, 13, 9651, 565, 14880, 29901, 13, 18884, 396, 14880, 338, 451, 263, 9654, 1196, 29889, 13, 18884, 396, 28301, 372, 964, 25260, 29901, 13, 18884, 14880, 29918, 294, 29918, 18616, 2063, 353, 1426, 29918, 517, 29918, 18616, 2063, 29898, 13, 462, 1678, 14880, 29892, 13, 462, 1678, 6624, 4097, 353, 1095, 29918, 29879, 24546, 29918, 2541, 29892, 13, 462, 1678, 19060, 353, 437, 29918, 1333, 29918, 2856, 13, 18884, 1723, 13, 18884, 25260, 353, 25260, 29974, 26956, 29918, 294, 29918, 18616, 2063, 13, 9651, 1683, 29901, 13, 18884, 396, 14880, 338, 263, 9654, 1196, 29889, 13, 18884, 25260, 29889, 4397, 703, 1159, 13, 462, 13, 4706, 396, 25455, 278, 937, 4315, 29901, 13, 4706, 4315, 353, 5159, 13, 4706, 363, 10541, 297, 25260, 29901, 13, 9651, 396, 5953, 837, 457, 3692, 10541, 8665, 373, 263, 716, 1196, 470, 18172, 13, 9651, 396, 515, 278, 1857, 1196, 29901, 13, 9651, 565, 4315, 29901, 13, 18884, 396, 960, 278, 1833, 1196, 297, 4315, 338, 9654, 29892, 769, 10541, 8665, 373, 13, 18884, 396, 263, 716, 1196, 29889, 13, 18884, 1833, 29918, 1220, 353, 4315, 14352, 29896, 29962, 13, 18884, 565, 1833, 29918, 1220, 29901, 13, 462, 1678, 2446, 29918, 1220, 353, 7700, 13, 18884, 1683, 29901, 13, 462, 1678, 2446, 29918, 1220, 353, 5852, 13, 9651, 1683, 29901, 13, 18884, 396, 910, 4315, 338, 9654, 29889, 13, 18884, 396, 826, 8844, 6275, 731, 2446, 29918, 1220, 304, 7700, 29901, 13, 18884, 2446, 29918, 1220, 353, 7700, 13, 9651, 396, 3967, 4417, 10541, 304, 278, 1857, 4315, 29901, 13, 9651, 1950, 29918, 10525, 29892, 4315, 29918, 3545, 353, 12244, 29918, 726, 29898, 13, 18884, 10541, 29892, 13, 18884, 6068, 29918, 2103, 29892, 13, 18884, 285, 29892, 13, 18884, 2030, 29918, 726, 353, 4315, 29892, 13, 18884, 1369, 29918, 1482, 29918, 1220, 353, 2446, 29918, 1220, 29892, 13, 18884, 736, 29918, 3545, 353, 5852, 29892, 13, 18884, 1196, 29918, 3545, 353, 17036, 29918, 14811, 29918, 9012, 13, 9651, 1723, 13, 9651, 565, 4315, 29918, 3545, 5277, 6068, 29918, 3545, 29901, 13, 18884, 396, 10318, 278, 1857, 4315, 29901, 13, 18884, 4315, 353, 1950, 29918, 10525, 13, 9651, 1683, 29901, 13, 18884, 396, 910, 10541, 947, 451, 6216, 29889, 13, 18884, 396, 960, 4315, 338, 5279, 9654, 29892, 372, 2794, 393, 10541, 4225, 13, 18884, 396, 304, 367, 9391, 4822, 11844, 313, 29875, 29889, 29872, 1696, 372, 674, 451, 6216, 373, 263, 13, 18884, 396, 2323, 4315, 467, 13, 18884, 565, 4315, 29901, 13, 462, 1678, 396, 910, 338, 451, 385, 2228, 29889, 13, 462, 1678, 396, 16913, 4315, 29901, 13, 462, 1678, 11844, 29889, 4397, 29898, 10525, 29897, 13, 462, 1678, 396, 25455, 278, 2446, 4315, 411, 10541, 29901, 13, 462, 1678, 4315, 29892, 1857, 29918, 3545, 353, 12244, 29918, 726, 29898, 13, 462, 4706, 10541, 29892, 13, 462, 4706, 6068, 29918, 2103, 29892, 13, 462, 4706, 285, 29892, 13, 462, 4706, 736, 29918, 3545, 353, 5852, 29892, 13, 462, 4706, 1196, 29918, 3545, 353, 17036, 29918, 14811, 29918, 9012, 13, 462, 1678, 1723, 13, 462, 1678, 565, 1857, 29918, 3545, 1405, 6068, 29918, 3545, 29901, 13, 462, 4706, 396, 10541, 4225, 304, 367, 9391, 4822, 11844, 29889, 13, 462, 4706, 396, 910, 508, 367, 24799, 491, 5432, 278, 2198, 13, 462, 4706, 396, 740, 1728, 25091, 373, 4315, 1095, 886, 29889, 13, 462, 4706, 396, 2398, 29892, 278, 1426, 5279, 373, 4315, 338, 4312, 2086, 29889, 13, 462, 4706, 1426, 29918, 517, 29918, 1202, 353, 5124, 13, 462, 4706, 363, 1196, 297, 4315, 29901, 13, 462, 9651, 1426, 29918, 517, 29918, 1202, 353, 1426, 29918, 517, 29918, 1202, 29974, 1220, 13578, 29908, 13, 462, 4706, 1426, 29918, 517, 29918, 1202, 353, 1426, 29918, 517, 29918, 1202, 29974, 18616, 663, 13, 462, 4706, 2999, 29918, 29879, 24546, 353, 1347, 29918, 517, 29918, 29879, 24546, 29918, 392, 29918, 9012, 29898, 13, 462, 9651, 1426, 29918, 517, 29918, 1202, 29892, 13, 462, 9651, 6068, 29918, 2103, 29892, 13, 462, 9651, 6068, 29918, 3545, 29892, 13, 462, 9651, 285, 29892, 13, 462, 9651, 17036, 29918, 14811, 29918, 9012, 353, 17036, 29918, 14811, 29918, 9012, 13, 462, 4706, 1723, 13, 462, 4706, 363, 269, 297, 2999, 29918, 29879, 24546, 29901, 13, 462, 9651, 11844, 29889, 4397, 29898, 29879, 29897, 13, 18884, 1683, 29901, 13, 462, 1678, 396, 4315, 338, 4069, 29892, 541, 10541, 674, 451, 6216, 29889, 13, 462, 1678, 396, 8251, 278, 2198, 740, 304, 679, 445, 10541, 29915, 29879, 13, 462, 1678, 396, 11844, 29901, 13, 462, 1678, 2999, 29918, 29879, 24546, 353, 1347, 29918, 517, 29918, 29879, 24546, 29918, 392, 29918, 9012, 29898, 13, 462, 4706, 10541, 29892, 13, 462, 4706, 6068, 29918, 2103, 29892, 13, 462, 4706, 6068, 29918, 3545, 29892, 13, 462, 4706, 285, 29892, 13, 462, 4706, 17036, 29918, 14811, 29918, 9012, 353, 17036, 29918, 14811, 29918, 9012, 13, 462, 1678, 1723, 13, 462, 1678, 363, 269, 297, 2999, 29918, 29879, 24546, 29901, 13, 462, 4706, 11844, 29889, 4397, 29898, 29879, 29897, 13, 462, 308, 13, 4706, 396, 5399, 565, 263, 2186, 4315, 4225, 304, 367, 2715, 29901, 13, 4706, 565, 4315, 29901, 13, 9651, 11844, 29889, 4397, 29898, 10525, 29897, 13, 1678, 736, 11844, 13, 13, 13, 1753, 4050, 29918, 1807, 29898, 29879, 29892, 285, 29892, 12384, 29892, 3239, 29892, 3677, 616, 3173, 292, 353, 5852, 1125, 13, 1678, 9995, 13, 1678, 6204, 22028, 29889, 18498, 2161, 322, 22028, 29889, 7364, 3618, 363, 263, 1347, 29892, 773, 263, 13, 1678, 2183, 4079, 313, 29888, 29897, 322, 12384, 29889, 13, 268, 13, 1678, 12662, 2699, 29901, 13, 4706, 269, 29901, 278, 1347, 304, 4050, 29889, 13, 4706, 285, 29901, 278, 4079, 297, 607, 304, 4050, 269, 29889, 13, 4706, 12384, 29901, 278, 12384, 310, 1426, 304, 671, 29892, 13384, 408, 385, 390, 7210, 1051, 470, 18761, 29889, 13, 4706, 3239, 29901, 278, 3239, 12384, 29889, 13, 268, 13, 1678, 7670, 1742, 12662, 2699, 29901, 13, 4706, 3677, 616, 3173, 292, 29901, 14088, 3692, 1426, 338, 13751, 411, 3677, 616, 3173, 292, 29936, 13, 9651, 21274, 304, 5852, 29889, 13, 268, 13, 1678, 16969, 29901, 13, 4706, 269, 29901, 278, 22028, 29889, 18498, 2161, 1203, 29889, 13, 4706, 364, 29901, 278, 22028, 29889, 7364, 1203, 29889, 13, 1678, 9995, 13, 1678, 269, 353, 285, 29889, 9482, 29898, 29879, 29892, 3677, 616, 3173, 292, 29892, 12384, 29892, 3239, 29897, 13, 1678, 364, 353, 269, 29889, 657, 29918, 1621, 580, 13, 1678, 736, 269, 29892, 364, 13, 13, 13, 1753, 4050, 29918, 9012, 29898, 9012, 29892, 285, 29892, 1426, 29918, 1054, 473, 29892, 3239, 29918, 1054, 473, 29892, 1196, 29918, 2311, 353, 6213, 29892, 671, 29918, 424, 616, 3173, 292, 353, 5852, 1125, 13, 1678, 9995, 13, 1678, 6204, 22028, 29889, 18498, 2161, 322, 22028, 29889, 7364, 3618, 363, 263, 1051, 310, 6031, 29889, 13, 268, 13, 1678, 12662, 2699, 29901, 13, 4706, 3454, 29901, 278, 3454, 304, 4050, 29936, 5124, 338, 14914, 408, 263, 9654, 1196, 29889, 13, 4706, 285, 29901, 278, 4079, 297, 607, 304, 4050, 1426, 29889, 13, 4706, 1426, 29918, 1054, 473, 29901, 385, 390, 7210, 1051, 470, 18761, 363, 278, 12384, 310, 278, 1426, 29889, 13, 4706, 3239, 29918, 1054, 473, 29901, 390, 7210, 363, 3239, 29889, 13, 268, 13, 1678, 7670, 1742, 12662, 2699, 29901, 13, 4706, 1196, 29918, 2311, 29901, 278, 1353, 310, 15526, 4206, 1546, 3454, 29936, 21274, 304, 6213, 29892, 13, 9651, 297, 607, 1206, 372, 338, 731, 515, 285, 29889, 13, 4706, 671, 29918, 424, 616, 3173, 292, 29901, 14088, 3692, 3454, 526, 13751, 411, 13, 9651, 3677, 616, 3173, 292, 29936, 21274, 304, 5852, 29889, 13, 268, 13, 1678, 16969, 29901, 13, 4706, 1190, 29888, 29901, 278, 22028, 29889, 18498, 2161, 1203, 29889, 13, 4706, 7705, 29901, 278, 22028, 29889, 7364, 1203, 29889, 13, 1678, 9995, 13, 1678, 3171, 353, 29871, 29900, 13, 1678, 28001, 353, 5159, 13, 1678, 7705, 29879, 353, 5159, 13, 1678, 363, 1196, 297, 3454, 29901, 13, 4706, 269, 29892, 364, 353, 4050, 29918, 1807, 29898, 13, 9651, 1196, 29892, 285, 29892, 1426, 29918, 1054, 473, 29892, 3239, 29918, 1054, 473, 29892, 13, 9651, 3677, 616, 3173, 292, 353, 671, 29918, 424, 616, 3173, 292, 13, 4706, 1723, 13, 4706, 28001, 29889, 4397, 29898, 29879, 29897, 13, 4706, 7705, 29879, 29889, 4397, 29898, 29878, 29897, 13, 4706, 3171, 353, 3171, 29974, 29878, 29889, 3545, 13, 1678, 1018, 29901, 13, 4706, 3171, 353, 3171, 29974, 1220, 29918, 2311, 16395, 2435, 29898, 7610, 8726, 6817, 29896, 29897, 13, 1678, 5174, 20948, 29901, 13, 4706, 1196, 29918, 2311, 353, 285, 29889, 657, 29918, 9012, 675, 580, 13, 4706, 3171, 353, 3171, 29974, 1220, 29918, 2311, 16395, 2435, 29898, 7610, 8726, 6817, 29896, 29897, 13, 1678, 396, 3171, 674, 367, 278, 3171, 310, 278, 4133, 7101, 322, 7705, 29889, 13, 1678, 396, 450, 2920, 674, 367, 5186, 304, 278, 9449, 342, 7705, 297, 7705, 29879, 29889, 13, 1678, 2920, 353, 7705, 29879, 29961, 29900, 1822, 2103, 13, 1678, 363, 7705, 297, 7705, 29879, 29961, 29896, 29901, 5387, 13, 4706, 565, 7705, 29889, 2103, 1405, 2920, 29901, 13, 9651, 2920, 353, 7705, 29889, 2103, 13, 1678, 396, 25455, 278, 4133, 7101, 29901, 13, 1678, 1190, 29888, 353, 22028, 29889, 18498, 2161, 3552, 2103, 29892, 3171, 876, 13, 1678, 1190, 29888, 29889, 5589, 29898, 7042, 29918, 1054, 473, 29897, 13, 1678, 396, 19152, 5702, 310, 278, 15526, 1948, 472, 607, 304, 1999, 277, 1269, 7101, 297, 28001, 29901, 13, 1678, 2246, 353, 29871, 29900, 13, 1678, 363, 474, 297, 3464, 29898, 2435, 29898, 7610, 8726, 22164, 13, 4706, 269, 353, 28001, 29961, 29875, 29962, 13, 4706, 364, 353, 7705, 29879, 29961, 29875, 29962, 13, 4706, 364, 29889, 3332, 1563, 353, 313, 29900, 29892, 2246, 29897, 13, 4706, 1190, 29888, 29889, 2204, 277, 29898, 29879, 29892, 364, 29897, 13, 4706, 2246, 353, 2246, 29974, 29878, 29889, 3545, 29974, 1220, 29918, 2311, 13, 1678, 7705, 353, 1190, 29888, 29889, 657, 29918, 1621, 580, 13, 1678, 736, 1190, 29888, 29892, 7705, 13, 13, 13, 1753, 1347, 29918, 517, 29918, 7610, 2161, 29918, 392, 29918, 1621, 29898, 29879, 29892, 285, 29892, 12384, 29892, 3239, 29892, 4236, 29918, 2103, 29892, 4236, 29918, 3545, 29892, 4236, 29918, 29879, 24546, 353, 29871, 29896, 29892, 1196, 29918, 2311, 353, 6213, 29892, 3677, 616, 3173, 292, 353, 5852, 1125, 13, 1678, 9995, 13, 1678, 6204, 263, 7101, 322, 7705, 515, 263, 1347, 2183, 263, 7472, 15526, 2920, 363, 13, 1678, 1269, 1196, 322, 263, 7472, 15526, 3171, 363, 1269, 4315, 29889, 13, 268, 13, 1678, 12662, 2699, 29901, 13, 4706, 269, 29901, 278, 1347, 29889, 13, 4706, 285, 29901, 278, 4079, 304, 671, 29889, 13, 4706, 12384, 29901, 390, 7210, 363, 278, 1426, 12384, 29889, 13, 4706, 3239, 29901, 390, 7210, 363, 278, 3239, 12384, 29889, 13, 4706, 4236, 29918, 2103, 29901, 278, 7472, 15526, 2920, 363, 1269, 1196, 29889, 13, 4706, 4236, 29918, 3545, 29901, 278, 7472, 15526, 3171, 363, 1269, 4315, 29889, 13, 268, 13, 1678, 7670, 1742, 12662, 2699, 29901, 13, 4706, 1196, 29918, 2311, 29901, 17036, 1546, 3454, 310, 1426, 29936, 21274, 304, 6213, 29892, 297, 607, 13, 9651, 1206, 372, 338, 7625, 515, 285, 29889, 13, 4706, 3677, 616, 3173, 292, 29901, 11185, 23941, 3692, 3677, 616, 3173, 292, 338, 1304, 29889, 13, 268, 13, 1678, 16969, 29901, 13, 4706, 28001, 29901, 1051, 310, 278, 22028, 29889, 18498, 2161, 3618, 29889, 13, 4706, 7705, 29879, 29901, 278, 1051, 310, 22028, 29889, 7364, 3618, 29889, 13, 1678, 9995, 13, 1678, 28001, 353, 5159, 13, 1678, 7705, 29879, 353, 5159, 13, 1678, 3454, 353, 1347, 29918, 517, 29918, 29879, 24546, 29918, 392, 29918, 9012, 29898, 13, 4706, 269, 29892, 4236, 29918, 2103, 29892, 4236, 29918, 3545, 29892, 285, 29892, 1196, 29918, 2311, 13, 1678, 1723, 13, 1678, 4974, 7431, 29898, 9012, 29897, 5277, 4236, 29918, 29879, 24546, 29892, 376, 29879, 338, 2086, 1472, 1213, 13, 1678, 363, 4315, 297, 3454, 29901, 13, 4706, 1190, 29888, 29892, 7705, 353, 4050, 29918, 9012, 29898, 13, 9651, 4315, 29892, 285, 29892, 12384, 29892, 3239, 29892, 1196, 29918, 2311, 353, 1196, 29918, 2311, 29892, 13, 9651, 671, 29918, 424, 616, 3173, 292, 353, 3677, 616, 3173, 292, 13, 4706, 1723, 13, 4706, 28001, 29889, 4397, 29898, 7610, 29888, 29897, 13, 4706, 7705, 29879, 29889, 4397, 29898, 1621, 29897, 13, 1678, 736, 28001, 29892, 7705, 29879, 13, 13, 13, 1753, 2479, 29918, 726, 29918, 29305, 29918, 1989, 2139, 29898, 3396, 29918, 726, 29892, 1667, 29918, 5657, 29892, 1426, 29918, 1054, 473, 29892, 3239, 29892, 3677, 616, 3173, 353, 5852, 29892, 18618, 29918, 2103, 353, 29871, 29900, 29889, 29929, 29945, 29892, 18618, 29918, 3545, 353, 29871, 29900, 29889, 29929, 29945, 29892, 1667, 29918, 1220, 353, 6213, 29892, 2867, 29918, 18616, 2063, 353, 7700, 29892, 10541, 29918, 18821, 4097, 353, 313, 1642, 613, 376, 29991, 613, 376, 3026, 511, 6624, 1061, 29918, 11739, 29879, 353, 313, 511, 17261, 353, 29871, 29896, 29892, 5970, 29918, 4906, 353, 376, 10923, 278, 2913, 2594, 304, 6773, 19602, 5970, 29918, 5657, 353, 6213, 29892, 5970, 29918, 1220, 353, 6213, 29892, 6564, 29918, 8149, 353, 313, 29968, 29918, 5550, 11538, 29892, 511, 11837, 29918, 8149, 353, 313, 29968, 29918, 28024, 29892, 476, 29918, 29933, 11375, 5550, 11538, 29892, 511, 23283, 29918, 8149, 353, 313, 29968, 29918, 2890, 29907, 3301, 29923, 29892, 511, 260, 6541, 353, 6213, 29892, 3515, 29918, 10492, 353, 29871, 29941, 29900, 29892, 2066, 353, 313, 22164, 13, 1678, 9995, 13, 1678, 17440, 1426, 304, 278, 4315, 322, 4480, 363, 278, 1404, 304, 6564, 29889, 960, 278, 1426, 13, 1678, 13461, 29879, 263, 2323, 4315, 29892, 4160, 508, 4337, 1250, 322, 11483, 1546, 278, 13, 1678, 11844, 29889, 13, 268, 13, 1678, 12662, 2699, 29901, 13, 4706, 1667, 29918, 726, 29901, 278, 1426, 304, 367, 8833, 29892, 429, 22368, 278, 6564, 2643, 29889, 13, 4706, 1667, 29918, 5657, 29901, 278, 4079, 1304, 363, 1667, 29918, 726, 29889, 13, 4706, 1426, 29918, 1054, 473, 29901, 390, 7210, 1051, 29914, 23583, 363, 278, 12384, 310, 1426, 29889, 13, 4706, 3239, 29901, 390, 7210, 1051, 29914, 23583, 363, 1667, 29918, 726, 29915, 29879, 3239, 29889, 13, 268, 13, 1678, 7670, 1742, 12662, 2699, 29901, 13, 4706, 3677, 616, 3173, 29901, 11185, 23941, 3692, 3677, 616, 3173, 292, 338, 1304, 297, 1426, 13, 9651, 15061, 29936, 21274, 304, 5852, 29889, 13, 4706, 18618, 29918, 2103, 29901, 18618, 310, 278, 1667, 2479, 7101, 29915, 29879, 2920, 1304, 13, 9651, 363, 1426, 15061, 313, 4381, 353, 29871, 29900, 29889, 29929, 29945, 467, 13, 4706, 18618, 29918, 3545, 29901, 18618, 310, 278, 1667, 2479, 7101, 29915, 29879, 3171, 13, 9651, 1304, 363, 1426, 15061, 313, 4381, 353, 29871, 29900, 29889, 29929, 29945, 467, 13, 4706, 1667, 29918, 1220, 29901, 15526, 4206, 1546, 3454, 310, 1426, 29936, 4586, 515, 1667, 29918, 5657, 565, 13, 9651, 451, 731, 29889, 13, 4706, 2867, 29918, 18616, 2063, 29901, 11185, 23941, 3692, 25260, 508, 367, 9391, 13, 9651, 4822, 11844, 29936, 21274, 304, 7700, 29889, 13, 9651, 405, 29933, 29901, 28048, 2063, 1122, 367, 9391, 4822, 11844, 1584, 565, 13, 18884, 7700, 565, 896, 2609, 6216, 373, 263, 2323, 4315, 29889, 13, 4706, 10541, 29918, 18821, 4097, 29901, 6031, 393, 1095, 263, 10541, 29889, 13, 9651, 6624, 1061, 29918, 11739, 29879, 29901, 15283, 304, 278, 6031, 297, 13, 9651, 10541, 29918, 18821, 4097, 29889, 13, 4706, 17261, 29901, 278, 1353, 310, 1196, 16706, 1546, 278, 5970, 310, 278, 1667, 1426, 322, 13, 9651, 278, 2246, 310, 5970, 29918, 4906, 313, 4381, 353, 29871, 29896, 467, 13, 4706, 5970, 29918, 4906, 29901, 1426, 472, 278, 1095, 310, 1269, 4315, 29936, 21274, 304, 376, 10923, 278, 13, 9651, 2913, 2594, 304, 6773, 19602, 541, 881, 367, 3939, 565, 6564, 29918, 8149, 13, 9651, 947, 451, 3160, 476, 29918, 5550, 11538, 29889, 13, 4706, 5970, 29918, 5657, 29901, 4079, 304, 671, 363, 5970, 29918, 4906, 29936, 565, 2175, 408, 6213, 29892, 13, 9651, 1667, 29918, 5657, 338, 1304, 29889, 13, 4706, 5970, 29918, 1220, 29901, 1021, 408, 1667, 29918, 1220, 363, 5970, 29918, 1220, 29936, 4586, 515, 5970, 29918, 5657, 13, 9651, 565, 451, 731, 29889, 13, 4706, 6564, 29918, 8149, 29901, 6611, 304, 4337, 1549, 278, 11844, 29936, 21274, 304, 13, 9651, 313, 29968, 29918, 5550, 11538, 29892, 467, 13, 4706, 11837, 29918, 8149, 29901, 6611, 304, 4337, 1250, 1328, 1549, 278, 11844, 29936, 21274, 304, 13, 9651, 313, 29968, 29918, 28024, 29892, 476, 29918, 29933, 11375, 5550, 11538, 416, 304, 11262, 278, 1404, 29915, 29879, 11509, 304, 4337, 13, 9651, 1250, 1328, 29892, 1209, 385, 4069, 18761, 29889, 13, 4706, 23283, 29918, 8149, 29901, 6611, 304, 6876, 278, 1824, 29936, 731, 408, 385, 4069, 18761, 304, 11262, 29889, 13, 4706, 260, 6541, 29901, 263, 22028, 29889, 2230, 29889, 29907, 908, 1203, 363, 640, 22155, 3515, 6554, 29936, 697, 338, 13, 9651, 2825, 565, 697, 338, 451, 4502, 29889, 13, 4706, 3515, 29918, 10492, 29901, 278, 7472, 16608, 639, 1473, 29936, 21274, 304, 29871, 29941, 29900, 29889, 13, 4706, 2066, 29901, 385, 13136, 1051, 29914, 23583, 310, 1722, 2066, 304, 3802, 297, 1206, 278, 1404, 13, 9651, 439, 1169, 29889, 13, 1678, 9995, 13, 1678, 565, 451, 1667, 29918, 1220, 29901, 13, 4706, 1667, 29918, 1220, 353, 1667, 29918, 5657, 29889, 657, 29918, 9012, 675, 580, 13, 1678, 565, 451, 5970, 29918, 5657, 29901, 13, 4706, 5970, 29918, 5657, 353, 1667, 29918, 5657, 13, 1678, 565, 451, 5970, 29918, 1220, 29901, 13, 4706, 5970, 29918, 1220, 353, 5970, 29918, 5657, 29889, 657, 29918, 9012, 675, 580, 13, 1678, 3474, 29918, 7610, 2161, 353, 22028, 29889, 4990, 29889, 657, 29918, 7610, 2161, 580, 13, 1678, 1018, 29901, 13, 4706, 3474, 29918, 1621, 353, 3474, 29918, 7610, 2161, 29889, 657, 29918, 1621, 580, 13, 1678, 5174, 23833, 2392, 29901, 13, 4706, 3474, 29918, 7610, 2161, 353, 22028, 29889, 4990, 29889, 842, 29918, 8513, 29898, 2272, 11802, 29889, 4990, 29889, 1761, 29918, 1545, 267, 580, 29961, 29900, 2314, 13, 4706, 3474, 29918, 1621, 353, 3474, 29918, 7610, 2161, 29889, 657, 29918, 1621, 580, 13, 1678, 3474, 29918, 7610, 2161, 29889, 5589, 29898, 7042, 29897, 13, 1678, 3474, 29918, 2103, 29892, 3474, 29918, 3545, 353, 3474, 29918, 7610, 2161, 29889, 657, 29918, 2311, 580, 13, 1678, 15526, 29918, 13099, 353, 938, 29898, 771, 637, 291, 29918, 2103, 29930, 7165, 29918, 2103, 29897, 13, 1678, 15526, 29918, 5727, 353, 938, 29898, 771, 637, 291, 29918, 3545, 29930, 7165, 29918, 3545, 29897, 13, 268, 13, 1678, 396, 25455, 8857, 304, 4808, 278, 5759, 28001, 322, 7705, 29879, 29901, 13, 1678, 28001, 353, 5159, 13, 1678, 7705, 29879, 353, 5159, 13, 268, 13, 1678, 396, 3617, 263, 7101, 322, 7705, 363, 5970, 29918, 4906, 29901, 13, 1678, 5970, 29918, 9012, 353, 1347, 29918, 517, 29918, 29879, 24546, 29918, 392, 29918, 9012, 29898, 13, 4706, 5970, 29918, 4906, 29892, 15526, 29918, 13099, 29892, 15526, 29918, 5727, 29892, 285, 353, 5970, 29918, 5657, 29892, 13, 4706, 17036, 29918, 14811, 29918, 9012, 353, 5970, 29918, 1220, 13, 1678, 1723, 13, 1678, 4974, 7431, 29898, 8968, 29918, 9012, 29897, 1275, 29871, 29896, 29892, 376, 1576, 5970, 29918, 4906, 3443, 2609, 320, 13, 735, 3947, 263, 2323, 4315, 1213, 13, 1678, 5970, 29918, 9012, 353, 5970, 29918, 9012, 29961, 29900, 29962, 13, 1678, 5970, 29918, 7610, 2161, 29892, 5970, 29918, 1621, 353, 4050, 29918, 9012, 29898, 13, 4706, 5970, 29918, 9012, 29892, 5970, 29918, 5657, 29892, 1426, 29918, 1054, 473, 29892, 3239, 29892, 13, 4706, 1196, 29918, 2311, 353, 5970, 29918, 1220, 29892, 671, 29918, 424, 616, 3173, 292, 353, 3677, 616, 3173, 13, 1678, 1723, 13, 268, 13, 1678, 396, 3617, 278, 3171, 363, 1667, 29918, 726, 29901, 13, 1678, 1667, 29918, 3545, 353, 15526, 29918, 5727, 29899, 8968, 29918, 1621, 29889, 3545, 29899, 29887, 481, 29930, 3396, 29918, 1220, 13, 1678, 565, 2867, 29918, 18616, 2063, 29901, 13, 4706, 1667, 29918, 9012, 353, 1347, 29918, 517, 29918, 29879, 24546, 29918, 392, 29918, 9012, 29898, 13, 9651, 1667, 29918, 726, 29892, 15526, 29918, 13099, 29892, 1667, 29918, 3545, 29892, 1667, 29918, 5657, 29892, 13, 9651, 17036, 29918, 14811, 29918, 9012, 353, 1667, 29918, 1220, 29892, 13, 9651, 1095, 29918, 29879, 24546, 29918, 2541, 353, 10541, 29918, 18821, 4097, 29892, 13, 9651, 437, 29918, 1333, 29918, 2856, 353, 6624, 1061, 29918, 11739, 29879, 13, 4706, 1723, 13, 1678, 1683, 29901, 13, 4706, 1667, 29918, 9012, 353, 1347, 29918, 517, 29918, 29879, 24546, 29918, 392, 29918, 9012, 29898, 13, 9651, 1667, 29918, 726, 29892, 15526, 29918, 13099, 29892, 1667, 29918, 3545, 29892, 1667, 29918, 5657, 29892, 13, 9651, 17036, 29918, 14811, 29918, 9012, 353, 1667, 29918, 1220, 13, 4706, 1723, 13, 1678, 363, 4315, 297, 1667, 29918, 9012, 29901, 13, 4706, 1667, 29918, 7610, 2161, 29892, 1667, 29918, 1621, 353, 4050, 29918, 9012, 29898, 13, 9651, 4315, 29892, 1667, 29918, 5657, 29892, 1426, 29918, 1054, 473, 29892, 3239, 29892, 1196, 29918, 2311, 353, 1667, 29918, 1220, 29892, 13, 9651, 671, 29918, 424, 616, 3173, 292, 353, 3677, 616, 3173, 13, 4706, 1723, 13, 4706, 5970, 29918, 1621, 29918, 8552, 353, 22028, 29889, 7364, 29898, 8968, 29918, 1621, 29897, 13, 4706, 396, 6204, 263, 7101, 304, 4808, 1716, 1667, 29918, 7610, 2161, 322, 5970, 29918, 7610, 2161, 29901, 13, 4706, 28001, 29918, 17743, 1312, 353, 22028, 29889, 18498, 2161, 3552, 29886, 15711, 29918, 13099, 29892, 15526, 29918, 5727, 876, 13, 4706, 7705, 29879, 29918, 17743, 1312, 353, 28001, 29918, 17743, 1312, 29889, 657, 29918, 1621, 580, 13, 4706, 28001, 29918, 17743, 1312, 29889, 5589, 29898, 7042, 29897, 13, 4706, 396, 11319, 1426, 411, 3407, 304, 278, 5520, 310, 278, 1667, 29918, 1621, 322, 13, 4706, 396, 5970, 29918, 1621, 29901, 13, 4706, 565, 1667, 29918, 1621, 29889, 2103, 6736, 5970, 29918, 1621, 29889, 2103, 29901, 13, 9651, 2175, 29918, 29302, 353, 313, 29886, 15711, 29918, 13099, 29899, 3396, 29918, 1621, 29889, 2103, 29897, 458, 29906, 13, 4706, 1683, 29901, 13, 9651, 2175, 29918, 29302, 353, 313, 29886, 15711, 29918, 13099, 29899, 8968, 29918, 1621, 29889, 2103, 29897, 458, 29906, 13, 4706, 1667, 29918, 1621, 29889, 3332, 1563, 353, 313, 1563, 29918, 29302, 29892, 29871, 29900, 29897, 13, 4706, 5970, 29918, 1621, 29918, 8552, 29889, 3332, 1563, 353, 313, 1563, 29918, 29302, 29892, 1667, 29918, 1621, 29889, 8968, 29974, 29887, 481, 29930, 3396, 29918, 1220, 29897, 13, 4706, 28001, 29918, 17743, 1312, 29889, 2204, 277, 29898, 3396, 29918, 7610, 2161, 29892, 1667, 29918, 1621, 29897, 13, 4706, 28001, 29918, 17743, 1312, 29889, 2204, 277, 29898, 8968, 29918, 7610, 2161, 29892, 5970, 29918, 1621, 29918, 8552, 29897, 13, 4706, 7705, 29879, 29918, 17743, 1312, 29889, 5064, 353, 3474, 29918, 1621, 29889, 5064, 13, 4706, 28001, 29889, 4397, 29898, 7610, 8726, 29918, 17743, 1312, 29897, 13, 4706, 7705, 29879, 29889, 4397, 29898, 1621, 29879, 29918, 17743, 1312, 29897, 13, 308, 13, 1678, 474, 353, 29871, 29900, 13, 1678, 7101, 29918, 29875, 353, 28001, 29961, 29875, 29962, 13, 1678, 7705, 29918, 29875, 353, 7705, 29879, 29961, 29875, 29962, 13, 1678, 3474, 29918, 7610, 2161, 29889, 2204, 277, 29898, 7610, 2161, 29918, 29875, 29892, 7705, 29918, 29875, 29897, 13, 1678, 3013, 29918, 7888, 292, 353, 5852, 13, 1678, 22028, 29889, 4990, 29889, 5504, 580, 13, 1678, 1550, 3013, 29918, 7888, 292, 29901, 13, 4706, 363, 1741, 297, 22028, 29889, 3696, 29889, 657, 7295, 13, 9651, 565, 313, 3696, 29889, 1853, 1275, 14636, 4897, 322, 1741, 29889, 1989, 297, 23283, 29918, 8149, 29897, 470, 1741, 29889, 1853, 1275, 660, 29965, 1806, 29901, 13, 18884, 10035, 29889, 18821, 403, 29898, 5325, 29897, 13, 9651, 25342, 1741, 29889, 1853, 1275, 14636, 4897, 322, 1741, 29889, 1989, 297, 11837, 29918, 8149, 322, 474, 1405, 29871, 29900, 29901, 13, 18884, 396, 25249, 1250, 263, 4315, 29901, 13, 18884, 474, 353, 474, 29899, 29896, 13, 18884, 7101, 29918, 29875, 353, 28001, 29961, 29875, 29962, 13, 18884, 7705, 29918, 29875, 353, 7705, 29879, 29961, 29875, 29962, 13, 18884, 3474, 29918, 7610, 2161, 29889, 2204, 277, 29898, 7610, 2161, 29918, 29875, 29892, 7705, 29918, 29875, 29897, 13, 18884, 22028, 29889, 4990, 29889, 5504, 29898, 1621, 29918, 29875, 29897, 13, 9651, 25342, 1741, 29889, 1853, 1275, 14636, 4897, 322, 1741, 29889, 1989, 297, 6564, 29918, 8149, 322, 474, 529, 7431, 29898, 7610, 8726, 6817, 29896, 29901, 13, 18884, 396, 14104, 292, 6375, 263, 4315, 29889, 13, 18884, 474, 353, 474, 29974, 29896, 13, 18884, 7101, 29918, 29875, 353, 28001, 29961, 29875, 29962, 13, 18884, 7705, 29918, 29875, 353, 7705, 29879, 29961, 29875, 29962, 13, 18884, 3474, 29918, 7610, 2161, 29889, 2204, 277, 29898, 7610, 2161, 29918, 29875, 29892, 7705, 29918, 29875, 29897, 13, 18884, 22028, 29889, 4990, 29889, 5504, 29898, 1621, 29918, 29875, 29897, 13, 9651, 25342, 1741, 29889, 1853, 1275, 14636, 4897, 322, 1741, 29889, 1989, 297, 6564, 29918, 8149, 322, 474, 1275, 7431, 29898, 7610, 8726, 6817, 29896, 29901, 13, 18884, 3013, 29918, 7888, 292, 29922, 7700, 13, 9651, 1683, 29901, 13, 18884, 1209, 13, 4706, 1018, 29901, 13, 9651, 260, 6541, 29889, 24667, 29898, 2557, 29918, 10492, 29897, 13, 4706, 5174, 23833, 2392, 29901, 13, 9651, 260, 6541, 353, 22028, 29889, 2230, 29889, 29907, 908, 580, 13, 9651, 260, 6541, 29889, 24667, 29898, 2557, 29918, 10492, 29897, 13, 13, 13, 1753, 2244, 29918, 12470, 29898, 12470, 29892, 285, 29892, 1426, 29918, 1054, 473, 29892, 3239, 29892, 3677, 616, 3173, 292, 353, 5852, 29892, 281, 353, 29871, 29900, 29889, 29929, 29945, 29892, 298, 353, 29871, 29900, 29889, 29929, 29945, 29892, 1196, 29918, 2311, 353, 6213, 29892, 17261, 353, 29871, 29896, 29892, 6773, 29918, 4906, 353, 376, 10923, 278, 1623, 16578, 1820, 304, 6564, 19602, 6773, 29918, 5657, 353, 6213, 29892, 6773, 29918, 1220, 29918, 2311, 353, 6213, 29892, 1375, 29918, 5327, 353, 29871, 29896, 29892, 4236, 29918, 5327, 353, 6213, 29892, 6068, 29918, 8149, 353, 365, 2544, 4945, 29903, 29974, 23207, 29903, 29974, 29925, 3904, 1783, 29965, 8098, 17108, 29968, 29918, 5550, 11538, 29892, 511, 4337, 29918, 29874, 2813, 353, 313, 29968, 29918, 3970, 16048, 29892, 511, 4337, 29918, 1627, 353, 313, 29968, 29918, 4897, 29892, 511, 7743, 353, 313, 29968, 29918, 1525, 29911, 24015, 29892, 511, 23283, 29918, 8149, 353, 313, 29968, 29918, 2890, 29907, 3301, 29923, 29892, 511, 2758, 29918, 25990, 353, 5852, 29892, 260, 6541, 353, 6213, 29892, 3515, 29918, 10492, 353, 29871, 29941, 29900, 29892, 2066, 353, 313, 22164, 13, 1678, 9995, 13, 1678, 17440, 263, 1139, 322, 736, 278, 1404, 29915, 29879, 13033, 2933, 29889, 13, 268, 13, 1678, 12662, 2699, 29901, 13, 4706, 1139, 29901, 278, 1139, 304, 607, 278, 1404, 10049, 29879, 29889, 13, 4706, 285, 29901, 278, 4079, 1304, 29889, 13, 4706, 1426, 29918, 1054, 473, 29901, 390, 7210, 1051, 29914, 23583, 363, 1426, 29889, 13, 4706, 3239, 29901, 390, 7210, 1051, 29914, 23583, 363, 3239, 29889, 13, 268, 13, 1678, 7670, 1742, 12662, 2699, 29901, 13, 4706, 3677, 616, 3173, 292, 29901, 11185, 23941, 3692, 3677, 616, 3173, 292, 338, 1304, 297, 1426, 13, 9651, 15061, 29936, 21274, 304, 5852, 29889, 13, 4706, 281, 29901, 278, 18618, 310, 278, 6136, 2479, 7101, 29915, 29879, 2920, 6068, 363, 13, 9651, 1426, 15061, 313, 4381, 353, 29871, 29900, 29889, 29929, 29945, 467, 13, 4706, 298, 29901, 278, 18618, 310, 278, 6136, 2479, 7101, 29915, 29879, 3171, 6068, 363, 13, 9651, 1426, 15061, 313, 4381, 353, 29871, 29900, 29889, 29929, 29945, 467, 13, 4706, 1196, 29918, 2311, 29901, 15526, 4206, 1546, 3454, 310, 1426, 29936, 565, 451, 731, 29892, 7625, 515, 13, 9651, 285, 29889, 13, 4706, 17261, 29901, 1196, 16706, 1546, 1139, 322, 6773, 29918, 4906, 470, 278, 1404, 29915, 29879, 13, 9651, 2933, 313, 4381, 353, 29871, 29896, 467, 13, 4706, 6773, 29918, 4906, 29901, 16058, 871, 565, 1139, 13461, 29879, 263, 2323, 4315, 29936, 13, 9651, 278, 2643, 9508, 292, 278, 1404, 304, 3965, 263, 1820, 304, 6564, 313, 4381, 13, 9651, 353, 376, 10923, 278, 1623, 16578, 1820, 304, 6564, 23157, 13, 4706, 6773, 29918, 5657, 29901, 4079, 1304, 2012, 310, 285, 363, 6773, 29918, 4906, 29936, 285, 1304, 565, 13, 9651, 451, 731, 29889, 13, 4706, 6773, 29918, 1220, 29918, 2311, 29901, 1021, 408, 1196, 29918, 2311, 541, 363, 6773, 29918, 4906, 29889, 13, 4706, 1375, 29918, 5327, 29901, 278, 9212, 3309, 310, 278, 1404, 29915, 29879, 2933, 313, 4381, 353, 29871, 29896, 467, 13, 4706, 4236, 29918, 5327, 29901, 278, 7472, 3309, 310, 278, 1404, 29915, 29879, 2933, 29936, 313, 4381, 353, 13, 9651, 6213, 467, 13, 4706, 6068, 29918, 8149, 29901, 6611, 393, 508, 367, 1304, 363, 10049, 292, 29889, 13, 4706, 4337, 29918, 29874, 2813, 29901, 6611, 393, 4337, 304, 278, 2446, 4315, 29936, 871, 22903, 565, 13, 9651, 1139, 4893, 701, 901, 1135, 697, 4315, 29889, 13, 4706, 4337, 29918, 1627, 29901, 6611, 393, 4337, 304, 278, 3517, 4315, 29889, 13, 4706, 7743, 29901, 6611, 304, 3965, 746, 278, 2933, 338, 7743, 29936, 21274, 304, 13, 9651, 736, 29892, 541, 508, 367, 4069, 565, 1375, 29918, 5327, 322, 4236, 29918, 5327, 526, 13, 9651, 5186, 29889, 13, 4706, 23283, 29918, 8149, 29901, 6611, 363, 14382, 278, 1824, 29889, 13, 4706, 2758, 29918, 25990, 29901, 11185, 1410, 4821, 3692, 1881, 508, 367, 11132, 2748, 13, 9651, 13033, 29936, 21274, 304, 5852, 29889, 13, 4706, 260, 6541, 29901, 22028, 29889, 2230, 29889, 29907, 908, 1203, 29936, 697, 338, 2825, 565, 5642, 338, 4502, 29889, 13, 4706, 3515, 29918, 10492, 29901, 278, 7472, 16608, 639, 1473, 313, 4381, 353, 29871, 29941, 29900, 467, 13, 4706, 2066, 29901, 2066, 304, 3802, 565, 29504, 580, 338, 2000, 29889, 13, 268, 13, 1678, 16969, 29901, 13, 4706, 364, 29901, 278, 1404, 29915, 29879, 2933, 29889, 13, 1678, 9995, 13, 1678, 565, 451, 1196, 29918, 2311, 29901, 13, 4706, 1196, 29918, 2311, 353, 285, 29889, 657, 29918, 9012, 675, 580, 13, 1678, 364, 353, 5124, 13, 1678, 3474, 29918, 7610, 2161, 353, 22028, 29889, 4990, 29889, 657, 29918, 7610, 2161, 580, 13, 1678, 1018, 29901, 13, 4706, 3474, 29918, 1621, 353, 3474, 29918, 7610, 2161, 29889, 657, 29918, 1621, 580, 13, 1678, 5174, 23833, 2392, 29901, 13, 4706, 3474, 29918, 7610, 2161, 353, 22028, 29889, 4990, 29889, 842, 29918, 8513, 29898, 2272, 11802, 29889, 4990, 29889, 1761, 29918, 1545, 267, 580, 29961, 29900, 2314, 13, 1678, 3474, 29918, 7610, 2161, 29889, 5589, 29898, 7042, 29897, 13, 1678, 3474, 29918, 2103, 29892, 3474, 29918, 3545, 353, 3474, 29918, 1621, 29889, 2311, 13, 1678, 396, 3789, 15526, 4341, 322, 4206, 6068, 29901, 13, 1678, 15526, 29918, 13099, 353, 938, 29898, 29893, 29930, 7165, 29918, 2103, 29897, 13, 1678, 15526, 29918, 5727, 353, 938, 29898, 29882, 29930, 7165, 29918, 3545, 29897, 13, 1678, 28001, 353, 5159, 13, 1678, 7705, 29879, 353, 5159, 13, 1678, 396, 3617, 15526, 4206, 3625, 363, 1139, 1156, 3633, 292, 363, 278, 1404, 29915, 29879, 13, 1678, 396, 2933, 322, 17261, 29901, 13, 1678, 1139, 29918, 3545, 353, 15526, 29918, 5727, 17722, 29887, 481, 29974, 29896, 11877, 1220, 29918, 2311, 13, 1678, 396, 28301, 1139, 964, 11844, 322, 3454, 29901, 13, 1678, 1139, 29918, 29879, 24546, 353, 1347, 29918, 517, 29918, 29879, 24546, 29918, 392, 29918, 9012, 29898, 13, 4706, 1139, 29892, 15526, 29918, 13099, 29892, 1139, 29918, 3545, 29892, 285, 29892, 13, 4706, 17036, 29918, 14811, 29918, 9012, 353, 1196, 29918, 2311, 13, 1678, 1723, 13, 1678, 565, 7431, 29898, 12470, 29918, 29879, 24546, 29897, 1275, 29871, 29896, 29901, 13, 4706, 396, 1139, 23994, 373, 697, 4315, 29889, 13, 4706, 396, 7338, 1461, 1139, 29918, 29879, 24546, 515, 967, 714, 357, 1051, 29901, 13, 4706, 1139, 29918, 29879, 24546, 353, 1139, 29918, 29879, 24546, 29961, 29900, 29962, 13, 4706, 1139, 29918, 7610, 2161, 29892, 1139, 29918, 1621, 353, 4050, 29918, 9012, 29898, 13, 9651, 1139, 29918, 29879, 24546, 29892, 285, 29892, 1426, 29918, 1054, 473, 29892, 3239, 29892, 13, 9651, 1196, 29918, 2311, 353, 1196, 29918, 2311, 29892, 671, 29918, 424, 616, 3173, 292, 353, 3677, 616, 3173, 292, 13, 4706, 1723, 13, 4706, 396, 25455, 278, 7101, 363, 1139, 29901, 13, 4706, 1667, 29918, 7610, 2161, 353, 22028, 29889, 18498, 2161, 3552, 29886, 15711, 29918, 13099, 29892, 15526, 29918, 5727, 876, 13, 4706, 1667, 29918, 1621, 353, 1667, 29918, 7610, 2161, 29889, 657, 29918, 1621, 580, 13, 4706, 396, 11319, 1139, 29918, 1621, 2629, 263, 15526, 29918, 13099, 491, 1139, 29918, 3545, 13, 4706, 396, 16701, 411, 263, 2246, 29899, 1563, 14821, 310, 313, 29900, 29892, 29871, 29900, 1125, 13, 4706, 1139, 29918, 1621, 29889, 5064, 353, 313, 29886, 15711, 29918, 13099, 458, 29906, 29892, 1139, 29918, 3545, 458, 29906, 29897, 13, 4706, 396, 3617, 278, 2933, 2602, 29901, 13, 4706, 2933, 29918, 3283, 353, 313, 13, 9651, 1139, 29918, 1621, 29889, 1563, 17108, 7165, 29918, 2103, 29899, 29886, 15711, 29918, 13099, 29897, 458, 29906, 29892, 13, 9651, 1139, 29918, 1621, 29889, 8968, 29974, 29887, 481, 29930, 1220, 29918, 2311, 17108, 7165, 29918, 3545, 29899, 29886, 15711, 29918, 5727, 29897, 458, 29906, 13, 4706, 1723, 13, 4706, 1667, 29918, 7610, 2161, 29889, 5589, 29898, 7042, 29897, 13, 4706, 1667, 29918, 7610, 2161, 29889, 2204, 277, 29898, 12470, 29918, 7610, 2161, 29892, 1139, 29918, 1621, 29897, 13, 4706, 396, 11319, 1667, 29918, 1621, 411, 3390, 304, 3474, 29918, 7610, 2161, 29901, 13, 4706, 1667, 29918, 1621, 29889, 5064, 353, 3474, 29918, 1621, 29889, 5064, 13, 4706, 28001, 29889, 4397, 29898, 3396, 29918, 7610, 2161, 29897, 13, 4706, 7705, 29879, 29889, 4397, 29898, 3396, 29918, 1621, 29897, 13, 1678, 1683, 29901, 13, 4706, 396, 1139, 1838, 29915, 29873, 6216, 373, 697, 4315, 29892, 577, 6773, 29918, 4906, 4225, 304, 367, 13, 4706, 396, 2825, 29889, 13, 4706, 565, 451, 6773, 29918, 5657, 29901, 13, 9651, 6773, 29918, 5657, 353, 285, 13, 4706, 565, 451, 6773, 29918, 1220, 29918, 2311, 29901, 13, 9651, 6773, 29918, 1220, 29918, 2311, 353, 6773, 29918, 5657, 29889, 657, 29918, 9012, 675, 580, 13, 4706, 6773, 29918, 9012, 353, 1347, 29918, 517, 29918, 29879, 24546, 29918, 392, 29918, 9012, 29898, 13, 9651, 6773, 29918, 4906, 29892, 15526, 29918, 13099, 29892, 15526, 29918, 5727, 29892, 6773, 29918, 5657, 29892, 13, 9651, 17036, 29918, 14811, 29918, 9012, 353, 6773, 29918, 1220, 29918, 2311, 13, 4706, 1723, 13, 4706, 4974, 7431, 29898, 19878, 29918, 9012, 29897, 1275, 29871, 29896, 29892, 376, 19878, 29918, 4906, 338, 2086, 1472, 29936, 372, 320, 13, 29873, 6926, 701, 2999, 11844, 1213, 13, 4706, 6773, 29918, 9012, 353, 6773, 29918, 9012, 29961, 29900, 29962, 13, 4706, 6773, 29918, 7610, 2161, 29892, 6773, 29918, 1621, 353, 4050, 29918, 9012, 29898, 13, 9651, 6773, 29918, 9012, 29892, 6773, 29918, 5657, 29892, 1426, 29918, 1054, 473, 29892, 3239, 29892, 13, 9651, 1196, 29918, 2311, 353, 6773, 29918, 1220, 29918, 2311, 29892, 671, 29918, 424, 616, 3173, 292, 353, 3677, 616, 3173, 292, 13, 4706, 1723, 13, 4706, 396, 25870, 6773, 29918, 4906, 4893, 701, 278, 1021, 1353, 310, 15526, 4206, 408, 13, 4706, 396, 2183, 363, 278, 1404, 29915, 29879, 13033, 2933, 29892, 1139, 29918, 726, 674, 817, 304, 367, 13, 4706, 396, 8265, 1765, 287, 304, 1139, 29918, 29879, 24546, 29889, 13, 4706, 565, 6773, 29918, 1621, 29889, 3545, 2804, 1196, 29918, 2311, 29901, 13, 9651, 396, 739, 338, 1950, 393, 6773, 29918, 4906, 338, 577, 1568, 7968, 1135, 13, 9651, 396, 1196, 29918, 2311, 393, 1139, 29918, 726, 1286, 23994, 373, 263, 2323, 4315, 29889, 13, 9651, 396, 910, 9946, 4828, 1363, 310, 278, 1422, 1820, 2139, 267, 13, 9651, 396, 9259, 373, 278, 1833, 4315, 29889, 13, 9651, 396, 4721, 794, 372, 29901, 13, 9651, 363, 474, 297, 3464, 29898, 12470, 29918, 3545, 29892, 29871, 29900, 29892, 448, 29896, 1125, 13, 18884, 1139, 29918, 29879, 24546, 353, 1347, 29918, 517, 29918, 29879, 24546, 29918, 392, 29918, 9012, 29898, 13, 462, 1678, 1139, 29892, 15526, 29918, 13099, 29892, 474, 29892, 285, 29892, 13, 462, 1678, 17036, 29918, 14811, 29918, 9012, 353, 1196, 29918, 2311, 13, 18884, 1723, 13, 18884, 565, 7431, 29898, 12470, 29918, 29879, 24546, 29897, 1405, 29871, 29896, 29901, 13, 462, 1678, 2867, 13, 9651, 1833, 29918, 10525, 353, 1139, 29918, 29879, 24546, 14352, 29896, 29962, 13, 9651, 1833, 29918, 10525, 29918, 3545, 353, 3171, 29918, 974, 29918, 19651, 29898, 4230, 29918, 10525, 29892, 285, 29892, 1196, 29918, 2311, 29897, 13, 9651, 396, 7311, 1833, 29918, 10525, 471, 925, 6216, 411, 6773, 29918, 4906, 29892, 9801, 13, 9651, 396, 393, 372, 23994, 411, 1196, 29918, 2311, 29889, 13, 9651, 396, 960, 372, 1838, 29915, 29873, 29892, 372, 29915, 29879, 6219, 964, 1023, 11844, 29889, 13, 9651, 565, 1833, 29918, 10525, 29918, 3545, 17108, 29887, 481, 29974, 29896, 11877, 1220, 29918, 2311, 1405, 15526, 29918, 5727, 29901, 13, 18884, 2186, 29918, 1220, 353, 1833, 29918, 10525, 14352, 29896, 29962, 13, 18884, 628, 1833, 29918, 10525, 14352, 29896, 29962, 13, 18884, 716, 29918, 4230, 29918, 10525, 353, 518, 8394, 29918, 1220, 29962, 13, 18884, 1139, 29918, 29879, 24546, 29889, 4397, 29898, 1482, 29918, 4230, 29918, 10525, 29897, 13, 4706, 363, 474, 297, 3464, 29898, 2435, 29898, 12470, 29918, 29879, 24546, 22164, 13, 9651, 1139, 29918, 10525, 353, 1139, 29918, 29879, 24546, 29961, 29875, 29962, 13, 9651, 1139, 29918, 7610, 2161, 29892, 1139, 29918, 1621, 353, 4050, 29918, 9012, 29898, 13, 18884, 1139, 29918, 10525, 29892, 285, 29892, 1426, 29918, 1054, 473, 29892, 3239, 29892, 13, 18884, 1196, 29918, 2311, 353, 1196, 29918, 2311, 29892, 671, 29918, 424, 616, 3173, 292, 353, 3677, 616, 3173, 292, 13, 9651, 1723, 13, 9651, 1857, 29918, 7610, 2161, 353, 22028, 29889, 18498, 2161, 3552, 29886, 15711, 29918, 13099, 29892, 15526, 29918, 5727, 876, 13, 9651, 1857, 29918, 7610, 2161, 29889, 5589, 29898, 7042, 29897, 13, 9651, 1857, 29918, 1621, 353, 1857, 29918, 7610, 2161, 29889, 657, 29918, 1621, 580, 13, 9651, 565, 474, 1275, 7431, 29898, 12470, 29918, 29879, 24546, 6817, 29896, 29901, 13, 18884, 396, 6773, 29918, 4906, 338, 451, 373, 445, 4315, 29889, 13, 18884, 1139, 29918, 1621, 29889, 3332, 1563, 353, 5135, 29886, 15711, 29918, 13099, 29899, 12470, 29918, 1621, 29889, 2103, 29897, 458, 29906, 29892, 29871, 29900, 29897, 13, 18884, 2933, 29918, 3283, 353, 313, 13, 462, 1678, 1139, 29918, 1621, 29889, 1563, 17108, 7165, 29918, 2103, 29899, 29886, 15711, 29918, 13099, 511, 13, 462, 1678, 1139, 29918, 1621, 29889, 8968, 29974, 29887, 481, 29930, 1220, 29918, 2311, 17108, 7165, 29918, 3545, 29899, 29886, 15711, 29918, 5727, 29897, 458, 29906, 13, 18884, 1723, 13, 18884, 1857, 29918, 7610, 2161, 29889, 2204, 277, 29898, 12470, 29918, 7610, 2161, 29892, 1139, 29918, 1621, 29897, 13, 9651, 1683, 29901, 13, 18884, 396, 6773, 29918, 4906, 5692, 373, 445, 4315, 29889, 13, 18884, 396, 450, 2175, 14821, 7111, 373, 607, 338, 25734, 29889, 13, 18884, 565, 1139, 29918, 1621, 29889, 2103, 6736, 6773, 29918, 1621, 29889, 2103, 29901, 13, 462, 1678, 2175, 29918, 29302, 353, 313, 29886, 15711, 29918, 13099, 29899, 12470, 29918, 1621, 29889, 2103, 29897, 458, 29906, 13, 18884, 1683, 29901, 13, 462, 1678, 2175, 29918, 29302, 353, 313, 29886, 15711, 29918, 13099, 29899, 19878, 29918, 1621, 29889, 2103, 29897, 458, 29906, 13, 18884, 1139, 29918, 1621, 29889, 3332, 1563, 353, 313, 1563, 29918, 29302, 29892, 29871, 29900, 29897, 13, 18884, 6773, 29918, 1621, 29889, 3332, 1563, 353, 313, 13, 462, 1678, 2175, 29918, 29302, 29892, 1139, 29918, 1621, 29889, 8968, 29974, 29887, 481, 29930, 1220, 29918, 2311, 13, 18884, 1723, 13, 18884, 1857, 29918, 7610, 2161, 29889, 2204, 277, 29898, 12470, 29918, 7610, 2161, 29892, 1139, 29918, 1621, 29897, 13, 18884, 1857, 29918, 7610, 2161, 29889, 2204, 277, 29898, 19878, 29918, 7610, 2161, 29892, 6773, 29918, 1621, 29897, 13, 9651, 1857, 29918, 1621, 29889, 5064, 353, 3474, 29918, 1621, 29889, 5064, 13, 9651, 28001, 29889, 4397, 29898, 3784, 29918, 7610, 2161, 29897, 13, 9651, 7705, 29879, 29889, 4397, 29898, 3784, 29918, 1621, 29897, 13, 632, 13, 1678, 396, 6204, 263, 4315, 1020, 4937, 322, 1510, 278, 937, 4315, 29901, 13, 1678, 474, 353, 29871, 29900, 13, 1678, 7101, 29918, 29875, 353, 28001, 29961, 29875, 29962, 13, 1678, 7705, 29918, 29875, 353, 7705, 29879, 29961, 29875, 29962, 13, 1678, 3474, 29918, 7610, 2161, 29889, 2204, 277, 29898, 7610, 2161, 29918, 29875, 29892, 7705, 29918, 29875, 29897, 13, 1678, 1234, 29918, 711, 2408, 287, 353, 7700, 13, 1678, 22028, 29889, 4990, 29889, 5504, 580, 13, 1678, 1550, 451, 1234, 29918, 711, 2408, 287, 29901, 13, 4706, 363, 1741, 297, 22028, 29889, 3696, 29889, 657, 7295, 13, 9651, 565, 1741, 29889, 1853, 1275, 660, 29965, 1806, 470, 313, 3696, 29889, 1853, 1275, 14636, 4897, 322, 1741, 29889, 1989, 297, 23283, 29918, 8149, 1125, 13, 18884, 10035, 29889, 18821, 403, 29898, 5325, 29897, 13, 9651, 25342, 474, 529, 7431, 29898, 7610, 8726, 6817, 29896, 322, 1741, 29889, 1853, 1275, 14636, 4897, 322, 1741, 29889, 1989, 297, 4337, 29918, 29874, 2813, 29901, 13, 18884, 396, 450, 1404, 338, 8401, 304, 278, 2446, 4315, 29889, 13, 18884, 474, 353, 474, 29974, 29896, 13, 18884, 3474, 29918, 7610, 2161, 29889, 5589, 29898, 7042, 29892, 7705, 29918, 29875, 29897, 13, 18884, 7101, 29918, 29875, 353, 28001, 29961, 29875, 29962, 13, 18884, 7705, 29918, 29875, 353, 7705, 29879, 29961, 29875, 29962, 13, 18884, 3474, 29918, 7610, 2161, 29889, 2204, 277, 29898, 7610, 2161, 29918, 29875, 29892, 7705, 29918, 29875, 29897, 13, 18884, 22028, 29889, 4990, 29889, 5504, 29898, 1621, 29918, 29875, 29897, 13, 9651, 25342, 474, 1405, 29871, 29900, 322, 1741, 29889, 1853, 1275, 14636, 4897, 322, 1741, 29889, 1989, 297, 4337, 29918, 1627, 29901, 13, 18884, 396, 450, 1404, 338, 8401, 1250, 697, 4315, 29889, 13, 18884, 474, 353, 474, 29899, 29896, 13, 18884, 3474, 29918, 7610, 2161, 29889, 5589, 29898, 7042, 29892, 7705, 29918, 29875, 29897, 13, 18884, 7101, 29918, 29875, 353, 28001, 29961, 29875, 29962, 13, 18884, 7705, 29918, 29875, 353, 7705, 29879, 29961, 29875, 29962, 13, 18884, 3474, 29918, 7610, 2161, 29889, 2204, 277, 29898, 7610, 2161, 29918, 29875, 29892, 7705, 29918, 29875, 29897, 13, 18884, 22028, 29889, 4990, 29889, 5504, 29898, 1621, 29918, 29875, 29897, 13, 9651, 25342, 1741, 29889, 1853, 1275, 14636, 4897, 322, 1741, 29889, 1989, 297, 6068, 29918, 8149, 322, 313, 2435, 29898, 29878, 29897, 529, 4236, 29918, 5327, 470, 451, 4236, 29918, 5327, 1125, 13, 18884, 396, 319, 2931, 756, 1063, 2715, 304, 364, 29889, 13, 18884, 2931, 353, 22028, 29889, 1989, 29889, 978, 29898, 3696, 29889, 1989, 29897, 13, 18884, 364, 353, 364, 29974, 18609, 13, 18884, 565, 451, 7743, 322, 7431, 29898, 29878, 29897, 1275, 4236, 29918, 5327, 29901, 13, 462, 1678, 1234, 29918, 711, 2408, 287, 353, 5852, 13, 18884, 1683, 29901, 13, 462, 1678, 7101, 29918, 29878, 29892, 7705, 29918, 29878, 353, 4050, 29918, 1807, 29898, 13, 462, 4706, 364, 29892, 285, 29892, 1426, 29918, 1054, 473, 29892, 3239, 29892, 3677, 616, 3173, 292, 13, 462, 1678, 1723, 13, 462, 1678, 7705, 29918, 29878, 29889, 3332, 1563, 353, 2933, 29918, 3283, 13, 462, 1678, 3474, 29918, 7610, 2161, 29889, 5589, 29898, 7042, 29892, 7705, 29918, 29878, 29897, 13, 462, 1678, 3474, 29918, 7610, 2161, 29889, 2204, 277, 29898, 7610, 2161, 29918, 29878, 29892, 7705, 29918, 29878, 29897, 13, 462, 1678, 22028, 29889, 4990, 29889, 5504, 29898, 1621, 29918, 29878, 29897, 13, 9651, 25342, 1741, 29889, 1853, 1275, 14636, 4897, 322, 1741, 29889, 1989, 1275, 476, 29918, 29933, 11375, 5550, 11538, 322, 2758, 29918, 25990, 322, 364, 322, 474, 1275, 7431, 29898, 7610, 8726, 6817, 29896, 29901, 13, 18884, 396, 450, 1833, 2931, 756, 1063, 11132, 29889, 13, 18884, 364, 353, 364, 7503, 2435, 29898, 29878, 6817, 29896, 29962, 13, 18884, 2767, 29918, 1621, 353, 7705, 29918, 29878, 13, 18884, 7101, 29918, 29878, 29892, 7705, 29918, 29878, 353, 4050, 29918, 1807, 29898, 13, 462, 1678, 364, 29892, 285, 29892, 1426, 29918, 1054, 473, 29892, 3239, 29892, 3677, 616, 3173, 292, 13, 18884, 1723, 13, 18884, 7705, 29918, 29878, 29889, 3332, 1563, 353, 2933, 29918, 3283, 13, 18884, 3474, 29918, 7610, 2161, 29889, 5589, 29898, 7042, 29892, 2767, 29918, 1621, 29897, 13, 18884, 3474, 29918, 7610, 2161, 29889, 2204, 277, 29898, 7610, 2161, 29918, 29878, 29892, 7705, 29918, 29878, 29897, 13, 18884, 22028, 29889, 4990, 29889, 5504, 29898, 5504, 29918, 1621, 29897, 13, 9651, 25342, 1741, 29889, 1853, 1275, 14636, 4897, 322, 1741, 29889, 1989, 297, 7743, 322, 474, 1275, 7431, 29898, 7610, 8726, 6817, 29896, 322, 7431, 29898, 29878, 29897, 6736, 1375, 29918, 5327, 29901, 13, 18884, 396, 450, 1404, 756, 7743, 364, 29889, 13, 18884, 1234, 29918, 711, 2408, 287, 353, 5852, 13, 9651, 1683, 29901, 13, 18884, 1209, 13, 4706, 1018, 29901, 13, 9651, 260, 6541, 29889, 24667, 29898, 2557, 29918, 10492, 29897, 13, 4706, 5174, 23833, 2392, 29901, 13, 9651, 396, 1939, 12006, 471, 4502, 304, 278, 740, 29889, 13, 9651, 260, 6541, 353, 22028, 29889, 2230, 29889, 29907, 908, 580, 13, 9651, 260, 6541, 29889, 24667, 29898, 2557, 29918, 10492, 29897, 13, 1678, 736, 364, 13, 2 ]
src/python/shared/BAData.py
dsyme/ADBench
58
98601
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. from dataclasses import dataclass, field import numpy as np from shared.BASparseMat import BASparseMat from shared.output_utils import save_errors_to_file, objective_file_name,\ save_sparse_j_to_file, jacobian_file_name @dataclass class BAInput: cams: np.ndarray = field(default = np.empty(0, dtype = np.float64)) x: np.ndarray = field(default = np.empty(0, dtype = np.float64)) w: np.ndarray = field(default = np.empty(0, dtype = np.float64)) obs: np.ndarray = field(default = np.empty(0, dtype = np.int32)) feats: np.ndarray = field(default = np.empty(0, dtype = np.float64)) @dataclass class BAOutput: reproj_err: np.ndarray = field(default = np.empty(0, dtype = np.float64)) w_err: np.ndarray = field(default = np.empty(0, dtype = np.float64)) J: BASparseMat = field(default = BASparseMat()) def save_output_to_file( self, output_prefix, input_basename, module_basename ): save_errors_to_file( objective_file_name(output_prefix, input_basename, module_basename), self.reproj_err, self.w_err ) save_sparse_j_to_file( jacobian_file_name(output_prefix, input_basename, module_basename), self.J )
[ 1, 396, 14187, 1266, 313, 29883, 29897, 7783, 15025, 29889, 13, 29937, 10413, 21144, 1090, 278, 341, 1806, 19405, 29889, 13, 13, 3166, 848, 13203, 1053, 848, 1990, 29892, 1746, 13, 5215, 12655, 408, 7442, 13, 13, 3166, 7258, 29889, 29933, 3289, 5510, 9782, 1053, 350, 3289, 5510, 9782, 13, 3166, 7258, 29889, 4905, 29918, 13239, 1053, 4078, 29918, 12523, 29918, 517, 29918, 1445, 29892, 12091, 29918, 1445, 29918, 978, 2053, 13, 462, 9651, 4078, 29918, 29879, 5510, 29918, 29926, 29918, 517, 29918, 1445, 29892, 432, 562, 711, 713, 29918, 1445, 29918, 978, 13, 13, 13, 13, 29992, 1272, 1990, 13, 1990, 350, 29909, 4290, 29901, 13, 1678, 274, 2232, 29901, 539, 7442, 29889, 299, 2378, 353, 1746, 29898, 4381, 353, 7442, 29889, 6310, 29898, 29900, 29892, 26688, 353, 7442, 29889, 7411, 29953, 29946, 876, 13, 1678, 921, 29901, 3986, 7442, 29889, 299, 2378, 353, 1746, 29898, 4381, 353, 7442, 29889, 6310, 29898, 29900, 29892, 26688, 353, 7442, 29889, 7411, 29953, 29946, 876, 13, 1678, 281, 29901, 3986, 7442, 29889, 299, 2378, 353, 1746, 29898, 4381, 353, 7442, 29889, 6310, 29898, 29900, 29892, 26688, 353, 7442, 29889, 7411, 29953, 29946, 876, 13, 1678, 20881, 29901, 4706, 7442, 29889, 299, 2378, 353, 1746, 29898, 4381, 353, 7442, 29889, 6310, 29898, 29900, 29892, 26688, 353, 7442, 29889, 524, 29941, 29906, 876, 13, 1678, 1238, 1446, 29901, 418, 7442, 29889, 299, 2378, 353, 1746, 29898, 4381, 353, 7442, 29889, 6310, 29898, 29900, 29892, 26688, 353, 7442, 29889, 7411, 29953, 29946, 876, 13, 13, 29992, 1272, 1990, 13, 1990, 350, 29909, 6466, 29901, 13, 1678, 337, 20865, 29918, 3127, 29901, 7442, 29889, 299, 2378, 353, 1746, 29898, 4381, 353, 7442, 29889, 6310, 29898, 29900, 29892, 26688, 353, 7442, 29889, 7411, 29953, 29946, 876, 13, 1678, 281, 29918, 3127, 29901, 418, 7442, 29889, 299, 2378, 353, 1746, 29898, 4381, 353, 7442, 29889, 6310, 29898, 29900, 29892, 26688, 353, 7442, 29889, 7411, 29953, 29946, 876, 13, 1678, 435, 29901, 3986, 350, 3289, 5510, 9782, 353, 1746, 29898, 4381, 353, 350, 3289, 5510, 9782, 3101, 13, 13, 1678, 822, 4078, 29918, 4905, 29918, 517, 29918, 1445, 29898, 13, 4706, 1583, 29892, 13, 4706, 1962, 29918, 13506, 29892, 13, 4706, 1881, 29918, 6500, 3871, 29892, 13, 4706, 3883, 29918, 6500, 3871, 13, 268, 1125, 13, 4706, 4078, 29918, 12523, 29918, 517, 29918, 1445, 29898, 13, 9651, 12091, 29918, 1445, 29918, 978, 29898, 4905, 29918, 13506, 29892, 1881, 29918, 6500, 3871, 29892, 3883, 29918, 6500, 3871, 511, 13, 9651, 1583, 29889, 276, 20865, 29918, 3127, 29892, 13, 9651, 1583, 29889, 29893, 29918, 3127, 13, 4706, 1723, 13, 13, 4706, 4078, 29918, 29879, 5510, 29918, 29926, 29918, 517, 29918, 1445, 29898, 13, 9651, 432, 562, 711, 713, 29918, 1445, 29918, 978, 29898, 4905, 29918, 13506, 29892, 1881, 29918, 6500, 3871, 29892, 3883, 29918, 6500, 3871, 511, 13, 9651, 1583, 29889, 29967, 13, 4706, 1723, 2 ]
api/server/swagger_server/code_templates/serve_kubernetes.TEMPLATE.py
krishnakumar27/mlx
98
162275
# Copyright 2021 The MLX Contributors # # SPDX-License-Identifier: Apache-2.0 from kfp import dsl from kfp_tekton.compiler import TektonCompiler from kfp_tekton import TektonClient from os import path from tempfile import gettempdir ############################################################ # Define the pipeline method ############################################################ @dsl.pipeline( name='Model Deployment pipeline', description='A pipeline for ML/DL model deployment on Kubernetes.' ) def model_pipeline(model_id='${model_identifier}'): """A pipeline for ML/DL model deployment.""" from kfp import dsl from ai_pipeline_params import use_ai_pipeline_params secret_name = 'e2e-creds' model_config = dsl.ContainerOp( name='model_config', image='aipipeline/model-config', command=['python'], arguments=[ '-u', 'model-config.py', '--secret_name', secret_name, '--model_id', model_id ], file_outputs={ 'model-serving-image': '/tmp/model_serving_image', 'deployment-name': '/tmp/deployment_name' } ) model_deployment = dsl.ContainerOp( name='k8s_model_deployment', image='aipipeline/deployment-k8s-remote', command=['python'], arguments=[ '-u', 'kube_deployment.py', '--model_serving_image', model_config.outputs['model-serving-image'], '--deployment_name', model_config.outputs['deployment-name'] ], file_outputs={ 'output': '/tmp/log.txt' } ) model_deployment.apply(use_ai_pipeline_params(secret_name)) ############################################################ # Compile the pipeline ############################################################ pipeline_function = model_pipeline pipeline_filename = path.join(gettempdir(), pipeline_function.__name__ + '.tar.gz') TektonCompiler().compile(pipeline_function, pipeline_filename) ############################################################ # Run the pipeline ############################################################ client = TektonClient(${pipeline_server}) # Get or create an experiment and submit a pipeline run experiment = client.create_experiment('MODEL_RUNS') # Submit the experiment to run in a pipeline run_name = '${run_name}' run_result = client.run_pipeline(experiment.id, run_name, pipeline_filename)
[ 1, 396, 14187, 1266, 29871, 29906, 29900, 29906, 29896, 450, 23158, 29990, 2866, 1091, 29560, 13, 29937, 29871, 13, 29937, 10937, 29928, 29990, 29899, 29931, 293, 1947, 29899, 12889, 29901, 13380, 29899, 29906, 29889, 29900, 29871, 13, 13, 3166, 413, 18091, 1053, 270, 2536, 13, 3166, 413, 18091, 29918, 12681, 880, 29889, 21789, 1053, 323, 1416, 880, 25333, 13, 3166, 413, 18091, 29918, 12681, 880, 1053, 323, 1416, 880, 4032, 13, 3166, 2897, 1053, 2224, 13, 3166, 5694, 1445, 1053, 679, 7382, 3972, 13, 13, 13, 13383, 13383, 13383, 7346, 4136, 13, 29937, 795, 22402, 278, 16439, 1158, 13, 13383, 13383, 13383, 7346, 4136, 13, 13, 29992, 29881, 2536, 29889, 13096, 5570, 29898, 13, 1678, 1024, 2433, 3195, 10034, 22812, 16439, 742, 13, 1678, 6139, 2433, 29909, 16439, 363, 23158, 29914, 19558, 1904, 18209, 373, 476, 17547, 6169, 13, 29897, 13, 1753, 1904, 29918, 13096, 5570, 29898, 4299, 29918, 333, 2433, 5303, 4299, 29918, 25378, 10162, 1125, 13, 1678, 9995, 29909, 16439, 363, 23158, 29914, 19558, 1904, 18209, 1213, 15945, 13, 13, 1678, 515, 413, 18091, 1053, 270, 2536, 13, 1678, 515, 7468, 29918, 13096, 5570, 29918, 7529, 1053, 671, 29918, 1794, 29918, 13096, 5570, 29918, 7529, 13, 13, 1678, 7035, 29918, 978, 353, 525, 29872, 29906, 29872, 29899, 1037, 6289, 29915, 13, 13, 1678, 1904, 29918, 2917, 353, 270, 2536, 29889, 7895, 11746, 29898, 13, 4706, 1024, 2433, 4299, 29918, 2917, 742, 13, 4706, 1967, 2433, 29874, 666, 23828, 29914, 4299, 29899, 2917, 742, 13, 4706, 1899, 29922, 1839, 4691, 7464, 13, 4706, 6273, 11759, 13, 9651, 17411, 29884, 742, 525, 4299, 29899, 2917, 29889, 2272, 742, 13, 9651, 525, 489, 19024, 29918, 978, 742, 7035, 29918, 978, 29892, 13, 9651, 525, 489, 4299, 29918, 333, 742, 1904, 29918, 333, 13, 4706, 21251, 13, 4706, 934, 29918, 4905, 29879, 3790, 13, 9651, 525, 4299, 29899, 643, 1747, 29899, 3027, 2396, 8207, 7050, 29914, 4299, 29918, 643, 1747, 29918, 3027, 742, 13, 9651, 525, 16519, 358, 29899, 978, 2396, 8207, 7050, 29914, 16519, 358, 29918, 978, 29915, 13, 4706, 500, 13, 1678, 1723, 13, 13, 1678, 1904, 29918, 16519, 358, 353, 270, 2536, 29889, 7895, 11746, 29898, 13, 4706, 1024, 2433, 29895, 29947, 29879, 29918, 4299, 29918, 16519, 358, 742, 13, 4706, 1967, 2433, 29874, 666, 23828, 29914, 16519, 358, 29899, 29895, 29947, 29879, 29899, 16674, 742, 13, 4706, 1899, 29922, 1839, 4691, 7464, 13, 4706, 6273, 11759, 13, 9651, 17411, 29884, 742, 525, 29895, 4003, 29918, 16519, 358, 29889, 2272, 742, 13, 9651, 525, 489, 4299, 29918, 643, 1747, 29918, 3027, 742, 1904, 29918, 2917, 29889, 4905, 29879, 1839, 4299, 29899, 643, 1747, 29899, 3027, 7464, 13, 9651, 525, 489, 16519, 358, 29918, 978, 742, 1904, 29918, 2917, 29889, 4905, 29879, 1839, 16519, 358, 29899, 978, 2033, 13, 4706, 21251, 13, 4706, 934, 29918, 4905, 29879, 3790, 13, 9651, 525, 4905, 2396, 8207, 7050, 29914, 1188, 29889, 3945, 29915, 13, 4706, 500, 13, 1678, 1723, 13, 13, 1678, 1904, 29918, 16519, 358, 29889, 7302, 29898, 1509, 29918, 1794, 29918, 13096, 5570, 29918, 7529, 29898, 19024, 29918, 978, 876, 13, 13, 13, 13383, 13383, 13383, 7346, 4136, 13, 29937, 795, 3831, 488, 278, 16439, 13, 13383, 13383, 13383, 7346, 4136, 13, 13, 13096, 5570, 29918, 2220, 353, 1904, 29918, 13096, 5570, 13, 13096, 5570, 29918, 9507, 353, 2224, 29889, 7122, 29898, 657, 7382, 3972, 3285, 13, 462, 795, 16439, 29918, 2220, 17255, 978, 1649, 718, 15300, 12637, 29889, 18828, 1495, 13, 13, 29911, 1416, 880, 25333, 2141, 12198, 29898, 13096, 5570, 29918, 2220, 29892, 16439, 29918, 9507, 29897, 13, 13, 13383, 13383, 13383, 7346, 4136, 13, 29937, 795, 7525, 278, 16439, 13, 13383, 13383, 13383, 7346, 4136, 13, 13, 4645, 353, 323, 1416, 880, 4032, 1566, 29912, 13096, 5570, 29918, 2974, 1800, 13, 13, 29937, 3617, 470, 1653, 385, 7639, 322, 9752, 263, 16439, 1065, 13, 735, 15362, 353, 3132, 29889, 3258, 29918, 735, 15362, 877, 20387, 29931, 29918, 28283, 3059, 1495, 13, 13, 29937, 3323, 2415, 278, 7639, 304, 1065, 297, 263, 16439, 13, 3389, 29918, 978, 353, 525, 5303, 3389, 29918, 978, 10162, 13, 3389, 29918, 2914, 353, 3132, 29889, 3389, 29918, 13096, 5570, 29898, 735, 15362, 29889, 333, 29892, 1065, 29918, 978, 29892, 16439, 29918, 9507, 29897, 13, 2 ]
is_core/config.py
cedel1/django-is-core
0
195925
from django.conf import settings as django_settings def _get_auth_login_view(): if ('auth_token' in django_settings.INSTALLED_APPS and getattr(django_settings, 'AUTH_TOKEN_TWO_FACTOR_ENABLED', False)): return 'auth_token.contrib.is_core_auth.views.TwoFactorLoginView' elif 'auth_token' in django_settings.INSTALLED_APPS: return 'auth_token.contrib.is_core_auth.views.LoginView' else: return 'is_core.views.auth.LoginView' DEFAULTS = { 'AUTH_LOGIN_CODE_VERIFICATION_VIEW': ( 'auth_token.contrib.is_core_auth.views.LoginCodeVerificationView' if ('auth_token' in django_settings.INSTALLED_APPS and getattr(django_settings, 'AUTH_TOKEN_TWO_FACTOR_ENABLED', False)) else None ), 'AUTH_FORM_CLASS': ( 'auth_token.contrib.is_core_auth.forms.TokenAuthenticationSmartForm' if 'auth_token' in django_settings.INSTALLED_APPS else 'django.contrib.auth.forms.AuthenticationForm' ), 'AUTH_RESOURCE_CLASS': None, 'AUTH_LOGIN_VIEW': _get_auth_login_view(), 'AUTH_LOGOUT_VIEW': ( 'auth_token.contrib.is_core_auth.views.LogoutView' if 'auth_token' in django_settings.INSTALLED_APPS else 'is_core.views.auth.LogoutView' ), 'CODE_VERIFICATION_URL': '/login/login-code-verification/', 'HOME_CORE': 'is_core.main.HomeUiCore', 'HOME_VIEW': 'is_core.generic_views.base.HomeView', 'MENU_GENERATOR': 'is_core.menu.MenuGenerator', 'USERNAME': 'username', 'PASSWORD': 'password', 'LOGIN_URL': '/login/', 'LOGOUT_URL': '/logout/', 'LOGIN_API_URL': lambda s: '/api{}'.format(s.LOGIN_URL), 'EXPORT_TYPES': '', 'FOREIGN_KEY_MAX_SELECTBOX_ENTRIES': 500, 'LIST_PER_PAGE': 20, 'REST_PAGINATOR_MAX_TOTAL': 10000, 'RESPONSE_EXCEPTION_FACTORY': 'is_core.exceptions.response.ui_rest_response_exception_factory', 'DEFAULT_FIELDSET_TEMPLATE': 'is_core/forms/default_fieldset.html', 'HEADER_IMAGE': None, 'ENVIRONMENT': None, 'BACKGROUND_EXPORT_TASK_TIME_LIMIT': 60*60, 'BACKGROUND_EXPORT_TASK_SOFT_TIME_LIMIT': (60*60) - 5, 'BACKGROUND_EXPORT_TASK_UPDATE_REQUEST_FUNCTION': None, 'BACKGROUND_EXPORT_TASK_QUEUE': None, 'BACKGROUND_EXPORT_SERIALIZATION_LIMIT': 2000, 'BACKGROUND_EXPORT_STORAGE_CLASS': 'django.core.files.storage.DefaultStorage', 'BACKGROUND_EXPORT_EXPIRATION_DAYS': 30, } class Settings: def __getattr__(self, attr): if attr not in DEFAULTS: raise AttributeError('Invalid IS_CORE setting: "{}"'.format(attr)) default = DEFAULTS[attr] return getattr(django_settings, 'IS_CORE_{}'.format(attr), default(self) if callable(default) else default) settings = Settings()
[ 1, 515, 9557, 29889, 5527, 1053, 6055, 408, 9557, 29918, 11027, 13, 13, 13, 1753, 903, 657, 29918, 5150, 29918, 7507, 29918, 1493, 7295, 13, 1678, 565, 6702, 5150, 29918, 6979, 29915, 297, 9557, 29918, 11027, 29889, 25580, 1964, 20566, 29918, 3301, 7024, 13, 9651, 322, 679, 5552, 29898, 14095, 29918, 11027, 29892, 525, 20656, 29950, 29918, 4986, 29968, 1430, 29918, 16240, 29949, 29918, 4519, 1783, 1955, 29918, 1430, 6181, 29928, 742, 7700, 22164, 13, 4706, 736, 525, 5150, 29918, 6979, 29889, 21570, 29889, 275, 29918, 3221, 29918, 5150, 29889, 7406, 29889, 13985, 29943, 7168, 11049, 1043, 29915, 13, 1678, 25342, 525, 5150, 29918, 6979, 29915, 297, 9557, 29918, 11027, 29889, 25580, 1964, 20566, 29918, 3301, 7024, 29901, 13, 4706, 736, 525, 5150, 29918, 6979, 29889, 21570, 29889, 275, 29918, 3221, 29918, 5150, 29889, 7406, 29889, 11049, 1043, 29915, 13, 1678, 1683, 29901, 13, 4706, 736, 525, 275, 29918, 3221, 29889, 7406, 29889, 5150, 29889, 11049, 1043, 29915, 13, 13, 13, 23397, 29903, 353, 426, 13, 1678, 525, 20656, 29950, 29918, 14480, 1177, 29918, 16524, 29918, 5348, 6545, 28541, 29918, 29963, 8673, 29956, 2396, 313, 13, 4706, 525, 5150, 29918, 6979, 29889, 21570, 29889, 275, 29918, 3221, 29918, 5150, 29889, 7406, 29889, 11049, 3399, 6565, 2450, 1043, 29915, 13, 4706, 565, 6702, 5150, 29918, 6979, 29915, 297, 9557, 29918, 11027, 29889, 25580, 1964, 20566, 29918, 3301, 7024, 13, 9651, 322, 679, 5552, 29898, 14095, 29918, 11027, 29892, 525, 20656, 29950, 29918, 4986, 29968, 1430, 29918, 16240, 29949, 29918, 4519, 1783, 1955, 29918, 1430, 6181, 29928, 742, 7700, 876, 13, 4706, 1683, 6213, 13, 1678, 10353, 13, 1678, 525, 20656, 29950, 29918, 19094, 29918, 13875, 1799, 2396, 313, 13, 4706, 525, 5150, 29918, 6979, 29889, 21570, 29889, 275, 29918, 3221, 29918, 5150, 29889, 9514, 29889, 6066, 16746, 12636, 442, 2500, 29915, 13, 4706, 565, 525, 5150, 29918, 6979, 29915, 297, 9557, 29918, 11027, 29889, 25580, 1964, 20566, 29918, 3301, 7024, 13, 4706, 1683, 525, 14095, 29889, 21570, 29889, 5150, 29889, 9514, 29889, 16746, 2500, 29915, 13, 1678, 10353, 13, 1678, 525, 20656, 29950, 29918, 1525, 27839, 4741, 29918, 13875, 1799, 2396, 6213, 29892, 13, 1678, 525, 20656, 29950, 29918, 14480, 1177, 29918, 29963, 8673, 29956, 2396, 903, 657, 29918, 5150, 29918, 7507, 29918, 1493, 3285, 13, 1678, 525, 20656, 29950, 29918, 14480, 12015, 29918, 29963, 8673, 29956, 2396, 313, 13, 4706, 525, 5150, 29918, 6979, 29889, 21570, 29889, 275, 29918, 3221, 29918, 5150, 29889, 7406, 29889, 3403, 449, 1043, 29915, 565, 525, 5150, 29918, 6979, 29915, 297, 9557, 29918, 11027, 29889, 25580, 1964, 20566, 29918, 3301, 7024, 13, 4706, 1683, 525, 275, 29918, 3221, 29889, 7406, 29889, 5150, 29889, 3403, 449, 1043, 29915, 13, 1678, 10353, 13, 1678, 525, 16524, 29918, 5348, 6545, 28541, 29918, 4219, 2396, 8207, 7507, 29914, 7507, 29899, 401, 29899, 369, 2450, 29914, 742, 13, 1678, 525, 17353, 29918, 3217, 1525, 2396, 525, 275, 29918, 3221, 29889, 3396, 29889, 11184, 29965, 29875, 9203, 742, 13, 1678, 525, 17353, 29918, 29963, 8673, 29956, 2396, 525, 275, 29918, 3221, 29889, 19206, 29918, 7406, 29889, 3188, 29889, 11184, 1043, 742, 13, 1678, 525, 29924, 1430, 29965, 29918, 24647, 1001, 1299, 1955, 2396, 525, 275, 29918, 3221, 29889, 6510, 29889, 6823, 21575, 742, 13, 1678, 525, 11889, 5813, 2396, 525, 6786, 742, 13, 1678, 525, 25711, 17013, 2396, 525, 5630, 742, 13, 1678, 525, 14480, 1177, 29918, 4219, 2396, 8207, 7507, 29914, 742, 13, 1678, 525, 14480, 12015, 29918, 4219, 2396, 8207, 1188, 449, 29914, 742, 13, 1678, 525, 14480, 1177, 29918, 8787, 29918, 4219, 2396, 14013, 269, 29901, 8207, 2754, 8875, 4286, 4830, 29898, 29879, 29889, 14480, 1177, 29918, 4219, 511, 13, 1678, 525, 5746, 15082, 29918, 15631, 29925, 2890, 2396, 15516, 13, 1678, 525, 5800, 1525, 17298, 29918, 10818, 29918, 12648, 29918, 6404, 8456, 29990, 29918, 3919, 3960, 2890, 2396, 29871, 29945, 29900, 29900, 29892, 13, 1678, 525, 24360, 29918, 13171, 29918, 7228, 1692, 2396, 29871, 29906, 29900, 29892, 13, 1678, 525, 1525, 1254, 29918, 7228, 29954, 1177, 1299, 1955, 29918, 12648, 29918, 29911, 2891, 1964, 2396, 29871, 29896, 29900, 29900, 29900, 29900, 29892, 13, 1678, 525, 1525, 5550, 1164, 1660, 29918, 5746, 4741, 7982, 2725, 29918, 4519, 1783, 18929, 2396, 525, 275, 29918, 3221, 29889, 11739, 29879, 29889, 5327, 29889, 1481, 29918, 5060, 29918, 5327, 29918, 11739, 29918, 14399, 742, 13, 1678, 525, 23397, 29918, 3738, 27286, 10490, 29918, 4330, 3580, 29931, 3040, 2396, 525, 275, 29918, 3221, 29914, 9514, 29914, 4381, 29918, 2671, 842, 29889, 1420, 742, 13, 1678, 525, 23252, 1001, 29918, 2382, 2396, 6213, 29892, 13, 1678, 525, 25838, 8193, 1164, 13780, 2396, 6213, 29892, 13, 1678, 525, 29933, 11375, 29954, 1672, 18783, 29918, 5746, 15082, 29918, 29911, 3289, 29968, 29918, 15307, 29918, 5265, 26349, 2396, 29871, 29953, 29900, 29930, 29953, 29900, 29892, 13, 1678, 525, 29933, 11375, 29954, 1672, 18783, 29918, 5746, 15082, 29918, 29911, 3289, 29968, 29918, 6156, 7818, 29918, 15307, 29918, 5265, 26349, 2396, 313, 29953, 29900, 29930, 29953, 29900, 29897, 448, 29871, 29945, 29892, 13, 1678, 525, 29933, 11375, 29954, 1672, 18783, 29918, 5746, 15082, 29918, 29911, 3289, 29968, 29918, 14474, 29918, 16244, 29918, 29943, 28700, 2396, 6213, 29892, 13, 1678, 525, 29933, 11375, 29954, 1672, 18783, 29918, 5746, 15082, 29918, 29911, 3289, 29968, 29918, 11144, 4462, 2396, 6213, 29892, 13, 1678, 525, 29933, 11375, 29954, 1672, 18783, 29918, 5746, 15082, 29918, 6304, 25758, 26664, 8098, 29918, 5265, 26349, 2396, 29871, 29906, 29900, 29900, 29900, 29892, 13, 1678, 525, 29933, 11375, 29954, 1672, 18783, 29918, 5746, 15082, 29918, 1254, 1955, 10461, 29918, 13875, 1799, 2396, 525, 14095, 29889, 3221, 29889, 5325, 29889, 12925, 29889, 4592, 10486, 742, 13, 1678, 525, 29933, 11375, 29954, 1672, 18783, 29918, 5746, 15082, 29918, 5746, 2227, 29934, 8098, 29918, 7698, 21554, 2396, 29871, 29941, 29900, 29892, 13, 29913, 13, 13, 13, 1990, 19215, 29901, 13, 13, 1678, 822, 4770, 657, 5552, 12035, 1311, 29892, 12421, 1125, 13, 4706, 565, 12421, 451, 297, 22236, 29903, 29901, 13, 9651, 12020, 23833, 2392, 877, 13919, 8519, 29918, 3217, 1525, 4444, 29901, 29850, 5038, 4286, 4830, 29898, 5552, 876, 13, 13, 4706, 2322, 353, 22236, 29903, 29961, 5552, 29962, 13, 4706, 736, 679, 5552, 29898, 14095, 29918, 11027, 29892, 525, 3235, 29918, 3217, 1525, 648, 29913, 4286, 4830, 29898, 5552, 511, 2322, 29898, 1311, 29897, 565, 1246, 519, 29898, 4381, 29897, 1683, 2322, 29897, 13, 13, 13, 11027, 353, 19215, 580, 13, 2 ]
contrib/grok-to-regex.py
bossjones/docker-compose-prometheus
0
151375
<reponame>bossjones/docker-compose-prometheus<filename>contrib/grok-to-regex.py<gh_stars>0 #!/usr/bin/env python import argparse import re from os import walk from os.path import join def get_patterns(patterns_dir): patterns = {} for (dirpath, _, filenames) in walk(patterns_dir): for name in filenames: with open(join(dirpath, name)) as f: for line in f.readlines(): if not line.startswith('#') and not line.strip() == "": k, v = line.split(' ', 1) patterns[k] = v.rstrip('\n') return patterns def convert(expression, patterns): groks = re.compile('%{[^}]*}') failed_matches = set() matches_prev_len = 0 while True: matches = groks.findall(expression) matches_cur_len = len(matches) if matches_cur_len == 0 or matches_cur_len == matches_prev_len: break for m in matches: inner = m.strip('%{}') if ':' in inner: patt, name = inner.split(':') replacement = '(?<{}>{{}})'.format(name) else: patt = inner replacement = '{}' if not patt in list(patterns.keys()): failed_matches.add(patt) continue expression = expression.replace(m, replacement.format(patterns[patt])) matches_prev_len = matches_cur_len print(expression) if failed_matches: global args print('\nWarning! Unable to match the following expressions:') print(' {}'.format(', '.join(failed_matches))) print('This could be a typo or a missing grok pattern file. Double check your grok patterns directory: {}'.format( args.patterns_dir )) if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('expression', metavar='expr', help='A grok expression.') parser.add_argument('-d', '--patterns-dir', dest='patterns_dir', default='patterns', help='Directory to find grok patterns.') args = parser.parse_args() patterns = get_patterns(args.patterns_dir) convert(args.expression, patterns)
[ 1, 529, 276, 1112, 420, 29958, 29890, 2209, 29926, 2873, 29914, 14695, 29899, 19438, 29899, 14032, 23043, 375, 29966, 9507, 29958, 21570, 29914, 29887, 16475, 29899, 517, 29899, 13087, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 13, 13, 5215, 1852, 5510, 13, 5215, 337, 13, 3166, 2897, 1053, 6686, 13, 3166, 2897, 29889, 2084, 1053, 5988, 13, 13, 13, 1753, 679, 29918, 11037, 29879, 29898, 11037, 29879, 29918, 3972, 1125, 13, 1678, 15038, 353, 6571, 13, 1678, 363, 313, 3972, 2084, 29892, 17117, 977, 264, 1280, 29897, 297, 6686, 29898, 11037, 29879, 29918, 3972, 1125, 13, 4706, 363, 1024, 297, 977, 264, 1280, 29901, 13, 9651, 411, 1722, 29898, 7122, 29898, 3972, 2084, 29892, 1024, 876, 408, 285, 29901, 13, 18884, 363, 1196, 297, 285, 29889, 949, 9012, 7295, 13, 462, 1678, 565, 451, 1196, 29889, 27382, 2541, 14237, 1495, 322, 451, 1196, 29889, 17010, 580, 1275, 376, 1115, 13, 462, 4706, 413, 29892, 325, 353, 1196, 29889, 5451, 877, 13420, 29871, 29896, 29897, 13, 462, 4706, 15038, 29961, 29895, 29962, 353, 325, 29889, 29878, 17010, 28909, 29876, 1495, 13, 1678, 736, 15038, 13, 13, 13, 1753, 3588, 29898, 17471, 29892, 15038, 1125, 13, 1678, 4071, 2039, 353, 337, 29889, 12198, 877, 29995, 13970, 29985, 6525, 4044, 1495, 13, 13, 1678, 5229, 29918, 20317, 353, 731, 580, 13, 1678, 7087, 29918, 16304, 29918, 2435, 353, 29871, 29900, 13, 13, 1678, 1550, 5852, 29901, 13, 4706, 7087, 353, 4071, 2039, 29889, 2886, 497, 29898, 17471, 29897, 13, 4706, 7087, 29918, 2764, 29918, 2435, 353, 7431, 29898, 20317, 29897, 13, 4706, 565, 7087, 29918, 2764, 29918, 2435, 1275, 29871, 29900, 470, 7087, 29918, 2764, 29918, 2435, 1275, 7087, 29918, 16304, 29918, 2435, 29901, 13, 9651, 2867, 13, 4706, 363, 286, 297, 7087, 29901, 13, 9651, 6426, 353, 286, 29889, 17010, 877, 29995, 8875, 1495, 13, 9651, 565, 525, 11283, 297, 6426, 29901, 13, 18884, 282, 1131, 29892, 1024, 353, 6426, 29889, 5451, 877, 29901, 1495, 13, 18884, 16920, 353, 525, 10780, 29966, 8875, 29958, 6224, 24289, 4286, 4830, 29898, 978, 29897, 13, 9651, 1683, 29901, 13, 18884, 282, 1131, 353, 6426, 13, 18884, 16920, 353, 525, 8875, 29915, 13, 13, 9651, 565, 451, 282, 1131, 297, 1051, 29898, 11037, 29879, 29889, 8149, 580, 1125, 13, 18884, 5229, 29918, 20317, 29889, 1202, 29898, 29886, 1131, 29897, 13, 18884, 6773, 13, 13, 9651, 4603, 353, 4603, 29889, 6506, 29898, 29885, 29892, 16920, 29889, 4830, 29898, 11037, 29879, 29961, 29886, 1131, 12622, 13, 4706, 7087, 29918, 16304, 29918, 2435, 353, 7087, 29918, 2764, 29918, 2435, 13, 13, 1678, 1596, 29898, 17471, 29897, 13, 1678, 565, 5229, 29918, 20317, 29901, 13, 4706, 5534, 6389, 13, 4706, 1596, 28909, 29876, 22709, 29991, 20065, 304, 1993, 278, 1494, 12241, 29901, 1495, 13, 4706, 1596, 877, 29871, 6571, 4286, 4830, 29317, 15300, 7122, 29898, 26061, 29918, 20317, 4961, 13, 4706, 1596, 877, 4013, 1033, 367, 263, 20482, 470, 263, 4567, 4071, 29895, 4766, 934, 29889, 11599, 1423, 596, 4071, 29895, 15038, 3884, 29901, 6571, 4286, 4830, 29898, 13, 9651, 6389, 29889, 11037, 29879, 29918, 3972, 13, 308, 876, 13, 13, 13, 361, 4770, 978, 1649, 1275, 525, 1649, 3396, 1649, 2396, 13, 1678, 13812, 353, 1852, 5510, 29889, 15730, 11726, 580, 13, 1678, 13812, 29889, 1202, 29918, 23516, 877, 17471, 742, 1539, 485, 279, 2433, 13338, 742, 1371, 2433, 29909, 4071, 29895, 4603, 29889, 1495, 13, 1678, 13812, 29889, 1202, 29918, 23516, 877, 29899, 29881, 742, 525, 489, 11037, 29879, 29899, 3972, 742, 2731, 2433, 11037, 29879, 29918, 3972, 742, 2322, 2433, 11037, 29879, 742, 13, 462, 4706, 1371, 2433, 9882, 304, 1284, 4071, 29895, 15038, 29889, 1495, 13, 1678, 6389, 353, 13812, 29889, 5510, 29918, 5085, 580, 13, 1678, 15038, 353, 679, 29918, 11037, 29879, 29898, 5085, 29889, 11037, 29879, 29918, 3972, 29897, 13, 1678, 3588, 29898, 5085, 29889, 17471, 29892, 15038, 29897, 2 ]
gap/src/util/data_iterator.py
cosmozhang/autoencoding_parsing
0
13396
<gh_stars>0 from collections import OrderedDict, defaultdict import numpy as np ''' generate a id to length dic ''' def gen_sid_len(sentences): sid2len = OrderedDict() for i, sent in enumerate(sentences): sid2len[i] = len(sent) return sid2len def batch_slice(data, batch_size): # data is a list of sentences of the same length batch_num = int(np.ceil(len(data) / float(batch_size))) for i in xrange(batch_num): cur_batch_size = batch_size if i < batch_num - 1 else len(data) - batch_size * i # cur_batch_size is the end-point of the batch sents = data[i * batch_size: i * batch_size + cur_batch_size] yield sents def data_iter(sents_id2length_dic, batch_size, shuffle=True): """ randomly permute data, then sort by source length, and partition into batches ensure that the length of source sentences in each batch is decreasing """ buckets = defaultdict(list) for (sent_id, sent_len) in sents_id2length_dic.iteritems(): buckets[sent_len].append(sent_id) batched_data = [] for (sent_len, sent_ids_smlen) in buckets.iteritems(): # sent_ids_smlen is a list of sentences of the same length if shuffle: np.random.shuffle(sent_ids_smlen) # pdb.set_trace() ''' 'extend' expecting a iterable finishes the iteration ''' batched_data.extend(list(batch_slice(sent_ids_smlen, batch_size))) if shuffle: np.random.shuffle(batched_data) for batch in batched_data: """ sent_ids in the same batch are of the same length """ yield batch
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 16250, 1053, 8170, 287, 21533, 29892, 2322, 8977, 13, 5215, 12655, 408, 7442, 13, 13, 12008, 13, 17158, 263, 1178, 304, 3309, 12124, 13, 12008, 13, 1753, 2531, 29918, 29879, 333, 29918, 2435, 29898, 18616, 2063, 1125, 13, 1678, 25349, 29906, 2435, 353, 8170, 287, 21533, 580, 13, 1678, 363, 474, 29892, 2665, 297, 26985, 29898, 18616, 2063, 1125, 13, 4706, 25349, 29906, 2435, 29961, 29875, 29962, 353, 7431, 29898, 18616, 29897, 13, 13, 1678, 736, 25349, 29906, 2435, 13, 13, 1753, 9853, 29918, 18337, 29898, 1272, 29892, 9853, 29918, 2311, 1125, 13, 1678, 396, 29871, 848, 338, 263, 1051, 310, 25260, 310, 278, 1021, 3309, 13, 1678, 9853, 29918, 1949, 353, 938, 29898, 9302, 29889, 27696, 29898, 2435, 29898, 1272, 29897, 847, 5785, 29898, 16175, 29918, 2311, 4961, 13, 1678, 363, 474, 297, 921, 3881, 29898, 16175, 29918, 1949, 1125, 13, 4706, 3151, 29918, 16175, 29918, 2311, 353, 9853, 29918, 2311, 565, 474, 529, 9853, 29918, 1949, 448, 29871, 29896, 1683, 7431, 29898, 1272, 29897, 448, 9853, 29918, 2311, 334, 474, 13, 4706, 396, 3151, 29918, 16175, 29918, 2311, 338, 278, 1095, 29899, 3149, 310, 278, 9853, 13, 4706, 269, 1237, 353, 848, 29961, 29875, 334, 9853, 29918, 2311, 29901, 474, 334, 9853, 29918, 2311, 718, 3151, 29918, 16175, 29918, 2311, 29962, 13, 13, 4706, 7709, 269, 1237, 13, 13, 1753, 848, 29918, 1524, 29898, 29879, 1237, 29918, 333, 29906, 2848, 29918, 27774, 29892, 9853, 29918, 2311, 29892, 528, 21897, 29922, 5574, 1125, 13, 1678, 9995, 13, 1678, 20459, 3635, 1082, 848, 29892, 769, 2656, 491, 2752, 3309, 29892, 322, 8877, 964, 9853, 267, 13, 1678, 9801, 393, 278, 3309, 310, 2752, 25260, 297, 1269, 9853, 338, 9263, 5832, 13, 1678, 9995, 13, 13, 1678, 1321, 9737, 353, 2322, 8977, 29898, 1761, 29897, 13, 1678, 363, 313, 18616, 29918, 333, 29892, 2665, 29918, 2435, 29897, 297, 269, 1237, 29918, 333, 29906, 2848, 29918, 27774, 29889, 1524, 7076, 7295, 13, 4706, 1321, 9737, 29961, 18616, 29918, 2435, 1822, 4397, 29898, 18616, 29918, 333, 29897, 13, 13, 1678, 9853, 287, 29918, 1272, 353, 5159, 13, 1678, 363, 313, 18616, 29918, 2435, 29892, 2665, 29918, 4841, 29918, 29879, 828, 264, 29897, 297, 1321, 9737, 29889, 1524, 7076, 7295, 13, 4706, 396, 2665, 29918, 4841, 29918, 29879, 828, 264, 338, 263, 1051, 310, 25260, 310, 278, 1021, 3309, 13, 4706, 565, 528, 21897, 29901, 13, 9651, 7442, 29889, 8172, 29889, 845, 21897, 29898, 18616, 29918, 4841, 29918, 29879, 828, 264, 29897, 13, 4706, 396, 282, 2585, 29889, 842, 29918, 15003, 580, 13, 4706, 14550, 13, 4706, 525, 21843, 29915, 16120, 263, 4256, 519, 8341, 267, 278, 12541, 13, 4706, 14550, 13, 4706, 9853, 287, 29918, 1272, 29889, 21843, 29898, 1761, 29898, 16175, 29918, 18337, 29898, 18616, 29918, 4841, 29918, 29879, 828, 264, 29892, 9853, 29918, 2311, 4961, 13, 13, 1678, 565, 528, 21897, 29901, 13, 4706, 7442, 29889, 8172, 29889, 845, 21897, 29898, 16175, 287, 29918, 1272, 29897, 13, 1678, 363, 9853, 297, 9853, 287, 29918, 1272, 29901, 13, 4706, 9995, 13, 4706, 2665, 29918, 4841, 297, 278, 1021, 9853, 526, 310, 278, 1021, 3309, 13, 4706, 9995, 13, 4706, 7709, 9853, 13, 2 ]
tensorflow_decision_forests/keras/test_runner.py
Saduf2019/decision-forests
1
171322
<filename>tensorflow_decision_forests/keras/test_runner.py # Copyright 2021 Google LLC. # # 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 # # https://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. """Loads and runs a SavedModel generated by :keras_test on the Adult dataset. This binary tests the model in a clean tensorflow instance (without pre-loaded functions and resources) and does not require non-canonical tf ops. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import enum from typing import Dict from absl import app from absl import flags from absl import logging import numpy as np import pandas as pd import tensorflow as tf flags.DEFINE_string("model_path", "", "Path to the SavedModel model to load.") flags.DEFINE_string("dataset_path", "", "Path to adult dataset.") FLAGS = flags.FLAGS def main(argv): del argv logging.info("Load model") model = tf.keras.models.load_model(FLAGS.model_path) logging.info("Load dataset") pd_dataset = load_dataset() tf_dataset = dataframe_to_tf_dataset(pd_dataset, "income") logging.info("Evaluate model") evaluation = model.evaluate(tf_dataset) logging.info("evaluation: %s", evaluation) logging.info("Done (unload model)") # The following code is similar to the simple_ml_keras_test. class Semantic(enum.Enum): NUMERICAL = 1 CATEGORICAL = 2 def dataframe_to_tf_dataset(dataframe: pd.DataFrame, label: str) -> tf.data.Dataset: dataset = tf.data.Dataset.from_tensor_slices( (dict(dataframe.drop(label, 1)), dataframe[label].values)) return dataset.batch(64) def load_dataset() -> pd.DataFrame: """Loads the dataset in a pandas dataframe.""" dataset = pd.read_csv(flags.FLAGS.dataset_path) label = "income" def clean(ds): ds[label] = np.where(ds[label] == ">50K", 1, 0) return ds dataset = clean(dataset) return auto_dataset(dataset, label) def infer_semantic_from_dataframe(dataset: pd.DataFrame) -> Dict[str, Semantic]: """Infers the semantic of the columns in a pandas dataframe.""" semantics = {} for col in dataset.columns: dtype = dataset[col].dtype if dtype in [float, np.float, np.int16, np.int32, np.int64, int]: semantics[col] = Semantic.NUMERICAL elif dtype in [str, object]: semantics[col] = Semantic.CATEGORICAL else: raise Exception( "Cannot infer semantic for column \"{}\" with dtype={}".format( col, dtype)) return semantics def auto_dataset(dataset, label) -> pd.DataFrame: """Prepares a dataset object.""" semantics = infer_semantic_from_dataframe(dataset) def extract_by_semantic(semantic): return [k for k, s in semantics.items() if s == semantic and k != label] categorical_features = extract_by_semantic(Semantic.CATEGORICAL) numerical_features = extract_by_semantic(Semantic.NUMERICAL) def clean(dataset): for key in categorical_features: dataset[key] = dataset[key].fillna("") return dataset[categorical_features + numerical_features + [label]] return clean(dataset) if __name__ == "__main__": app.run(main)
[ 1, 529, 9507, 29958, 29056, 29918, 7099, 2459, 29918, 1454, 9197, 29914, 3946, 294, 29914, 1688, 29918, 27492, 29889, 2272, 13, 29937, 14187, 1266, 29871, 29906, 29900, 29906, 29896, 5087, 365, 12182, 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, 2045, 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, 5896, 29879, 322, 6057, 263, 9583, 287, 3195, 5759, 491, 584, 3946, 294, 29918, 1688, 373, 278, 2087, 499, 8783, 29889, 13, 13, 4013, 7581, 6987, 278, 1904, 297, 263, 5941, 26110, 2777, 313, 14037, 758, 29899, 15638, 13, 12171, 322, 7788, 29897, 322, 947, 451, 1996, 1661, 29899, 3068, 265, 936, 15886, 288, 567, 29889, 13, 15945, 29908, 13, 3166, 4770, 29888, 9130, 1649, 1053, 8380, 29918, 5215, 13, 3166, 4770, 29888, 9130, 1649, 1053, 8542, 13, 3166, 4770, 29888, 9130, 1649, 1053, 1596, 29918, 2220, 13, 13, 5215, 14115, 13, 3166, 19229, 1053, 360, 919, 13, 13, 3166, 633, 2536, 1053, 623, 13, 3166, 633, 2536, 1053, 13449, 13, 3166, 633, 2536, 1053, 12183, 13, 5215, 12655, 408, 7442, 13, 5215, 11701, 408, 10518, 13, 5215, 26110, 408, 15886, 13, 13, 15764, 29889, 24405, 8895, 29918, 1807, 703, 4299, 29918, 2084, 613, 12633, 376, 2605, 304, 278, 9583, 287, 3195, 1904, 304, 2254, 23157, 13, 13, 15764, 29889, 24405, 8895, 29918, 1807, 703, 24713, 29918, 2084, 613, 12633, 376, 2605, 304, 16157, 8783, 23157, 13, 13, 18823, 10749, 353, 13449, 29889, 18823, 10749, 13, 13, 13, 1753, 1667, 29898, 19218, 1125, 13, 29871, 628, 1852, 29894, 13, 13, 29871, 12183, 29889, 3888, 703, 5896, 1904, 1159, 13, 29871, 1904, 353, 15886, 29889, 3946, 294, 29889, 9794, 29889, 1359, 29918, 4299, 29898, 18823, 10749, 29889, 4299, 29918, 2084, 29897, 13, 13, 29871, 12183, 29889, 3888, 703, 5896, 8783, 1159, 13, 29871, 10518, 29918, 24713, 353, 2254, 29918, 24713, 580, 13, 29871, 15886, 29918, 24713, 353, 12205, 29918, 517, 29918, 13264, 29918, 24713, 29898, 15926, 29918, 24713, 29892, 376, 262, 2763, 1159, 13, 13, 29871, 12183, 29889, 3888, 703, 29923, 4387, 403, 1904, 1159, 13, 29871, 17983, 353, 1904, 29889, 24219, 403, 29898, 13264, 29918, 24713, 29897, 13, 29871, 12183, 29889, 3888, 703, 24219, 362, 29901, 1273, 29879, 613, 17983, 29897, 13, 13, 29871, 12183, 29889, 3888, 703, 25632, 313, 348, 1359, 1904, 25760, 13, 13, 13, 29937, 450, 1494, 775, 338, 2788, 304, 278, 2560, 29918, 828, 29918, 3946, 294, 29918, 1688, 29889, 13, 13, 13, 1990, 9444, 7716, 29898, 18605, 29889, 16854, 1125, 13, 29871, 28019, 1001, 2965, 1964, 353, 29871, 29896, 13, 29871, 315, 3040, 29954, 1955, 2965, 1964, 353, 29871, 29906, 13, 13, 13, 1753, 12205, 29918, 517, 29918, 13264, 29918, 24713, 29898, 1272, 2557, 29901, 10518, 29889, 17271, 29892, 13, 462, 9651, 3858, 29901, 851, 29897, 1599, 15886, 29889, 1272, 29889, 16390, 24541, 29901, 13, 13, 29871, 8783, 353, 15886, 29889, 1272, 29889, 16390, 24541, 29889, 3166, 29918, 20158, 29918, 29879, 29399, 29898, 13, 418, 313, 8977, 29898, 1272, 2557, 29889, 8865, 29898, 1643, 29892, 29871, 29896, 8243, 12205, 29961, 1643, 1822, 5975, 876, 13, 29871, 736, 8783, 29889, 16175, 29898, 29953, 29946, 29897, 13, 13, 13, 1753, 2254, 29918, 24713, 580, 1599, 10518, 29889, 17271, 29901, 13, 29871, 9995, 5896, 29879, 278, 8783, 297, 263, 11701, 12205, 1213, 15945, 13, 13, 29871, 8783, 353, 10518, 29889, 949, 29918, 7638, 29898, 15764, 29889, 18823, 10749, 29889, 24713, 29918, 2084, 29897, 13, 29871, 3858, 353, 376, 262, 2763, 29908, 13, 13, 29871, 822, 5941, 29898, 6289, 1125, 13, 1678, 18031, 29961, 1643, 29962, 353, 7442, 29889, 3062, 29898, 6289, 29961, 1643, 29962, 1275, 376, 29958, 29945, 29900, 29968, 613, 29871, 29896, 29892, 29871, 29900, 29897, 13, 1678, 736, 18031, 13, 13, 29871, 8783, 353, 5941, 29898, 24713, 29897, 13, 29871, 736, 4469, 29918, 24713, 29898, 24713, 29892, 3858, 29897, 13, 13, 13, 1753, 10115, 29918, 12846, 7716, 29918, 3166, 29918, 1272, 2557, 29898, 24713, 29901, 10518, 29889, 17271, 29897, 1599, 360, 919, 29961, 710, 29892, 9444, 7716, 5387, 13, 29871, 9995, 25433, 414, 278, 28837, 310, 278, 4341, 297, 263, 11701, 12205, 1213, 15945, 13, 13, 29871, 29505, 353, 6571, 13, 29871, 363, 784, 297, 8783, 29889, 13099, 29901, 13, 1678, 26688, 353, 8783, 29961, 1054, 1822, 29881, 1853, 13, 1678, 565, 26688, 297, 518, 7411, 29892, 7442, 29889, 7411, 29892, 7442, 29889, 524, 29896, 29953, 29892, 7442, 29889, 524, 29941, 29906, 29892, 7442, 29889, 524, 29953, 29946, 29892, 938, 5387, 13, 418, 29505, 29961, 1054, 29962, 353, 9444, 7716, 29889, 13967, 1001, 2965, 1964, 13, 1678, 25342, 26688, 297, 518, 710, 29892, 1203, 5387, 13, 418, 29505, 29961, 1054, 29962, 353, 9444, 7716, 29889, 29907, 3040, 29954, 1955, 2965, 1964, 13, 1678, 1683, 29901, 13, 418, 12020, 8960, 29898, 13, 3986, 376, 29089, 10115, 28837, 363, 1897, 13218, 29912, 1012, 29908, 411, 26688, 3790, 29913, 1642, 4830, 29898, 13, 795, 784, 29892, 26688, 876, 13, 13, 29871, 736, 29505, 13, 13, 13, 1753, 4469, 29918, 24713, 29898, 24713, 29892, 3858, 29897, 1599, 10518, 29889, 17271, 29901, 13, 29871, 9995, 6572, 862, 267, 263, 8783, 1203, 1213, 15945, 13, 13, 29871, 29505, 353, 10115, 29918, 12846, 7716, 29918, 3166, 29918, 1272, 2557, 29898, 24713, 29897, 13, 13, 29871, 822, 6597, 29918, 1609, 29918, 12846, 7716, 29898, 12846, 7716, 1125, 13, 1678, 736, 518, 29895, 363, 413, 29892, 269, 297, 29505, 29889, 7076, 580, 565, 269, 1275, 28837, 322, 413, 2804, 3858, 29962, 13, 13, 29871, 11608, 936, 29918, 22100, 353, 6597, 29918, 1609, 29918, 12846, 7716, 29898, 28516, 7716, 29889, 29907, 3040, 29954, 1955, 2965, 1964, 29897, 13, 29871, 16259, 29918, 22100, 353, 6597, 29918, 1609, 29918, 12846, 7716, 29898, 28516, 7716, 29889, 13967, 1001, 2965, 1964, 29897, 13, 13, 29871, 822, 5941, 29898, 24713, 1125, 13, 1678, 363, 1820, 297, 11608, 936, 29918, 22100, 29901, 13, 418, 8783, 29961, 1989, 29962, 353, 8783, 29961, 1989, 1822, 5589, 1056, 703, 1159, 13, 1678, 736, 8783, 29961, 29883, 20440, 936, 29918, 22100, 718, 16259, 29918, 22100, 718, 518, 1643, 5262, 13, 13, 29871, 736, 5941, 29898, 24713, 29897, 13, 13, 13, 361, 4770, 978, 1649, 1275, 376, 1649, 3396, 1649, 1115, 13, 29871, 623, 29889, 3389, 29898, 3396, 29897, 13, 2 ]
pypika/tests/dialects/test_mssql.py
uhrm/pypika
0
10045
<gh_stars>0 import unittest from pypika import Table from pypika.analytics import Count from pypika.dialects import MSSQLQuery from pypika.utils import QueryException class SelectTests(unittest.TestCase): def test_normal_select(self): q = MSSQLQuery.from_("abc").select("def") self.assertEqual('SELECT "def" FROM "abc"', str(q)) def test_distinct_select(self): q = MSSQLQuery.from_("abc").select("def").distinct() self.assertEqual('SELECT DISTINCT "def" FROM "abc"', str(q)) def test_top_distinct_select(self): q = MSSQLQuery.from_("abc").select("def").top(10).distinct() self.assertEqual('SELECT DISTINCT TOP (10) "def" FROM "abc"', str(q)) def test_top_select(self): q = MSSQLQuery.from_("abc").select("def").top(10) self.assertEqual('SELECT TOP (10) "def" FROM "abc"', str(q)) def test_top_select_non_int(self): with self.assertRaisesRegex(QueryException, "TOP value must be an integer"): MSSQLQuery.from_("abc").select("def").top("a") def test_limit(self): q = MSSQLQuery.from_("abc").select("def").orderby("def").limit(10) self.assertEqual('SELECT "def" FROM "abc" ORDER BY "def" OFFSET 0 ROWS FETCH NEXT 10 ROWS ONLY', str(q)) def test_fetch_next(self): q = MSSQLQuery.from_("abc").select("def").orderby("def").fetch_next(10) self.assertEqual('SELECT "def" FROM "abc" ORDER BY "def" OFFSET 0 ROWS FETCH NEXT 10 ROWS ONLY', str(q)) def test_offset(self): q = MSSQLQuery.from_("abc").select("def").orderby("def").offset(10) self.assertEqual('SELECT "def" FROM "abc" ORDER BY "def" OFFSET 10 ROWS', str(q)) def test_fetch_next_with_offset(self): q = MSSQLQuery.from_("abc").select("def").orderby("def").fetch_next(10).offset(10) self.assertEqual('SELECT "def" FROM "abc" ORDER BY "def" OFFSET 10 ROWS FETCH NEXT 10 ROWS ONLY', str(q)) def test_groupby_alias_False_does_not_group_by_alias_with_standard_query(self): t = Table('table1') col = t.abc.as_('a') q = MSSQLQuery.from_(t).select(col, Count('*')).groupby(col) self.assertEqual('SELECT "abc" "a",COUNT(\'*\') FROM "table1" GROUP BY "abc"', str(q)) def test_groupby_alias_False_does_not_group_by_alias_when_subqueries_are_present(self): t = Table('table1') subquery = MSSQLQuery.from_(t).select(t.abc) col = subquery.abc.as_('a') q = MSSQLQuery.from_(subquery).select(col, Count('*')).groupby(col) self.assertEqual( 'SELECT "sq0"."abc" "a",COUNT(\'*\') FROM (SELECT "abc" FROM "table1") "sq0" GROUP BY "sq0"."abc"', str(q) )
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 5215, 443, 27958, 13, 13, 3166, 282, 1478, 4106, 1053, 6137, 13, 3166, 282, 1478, 4106, 29889, 7054, 22026, 1053, 3917, 13, 3166, 282, 1478, 4106, 29889, 15321, 781, 29879, 1053, 341, 1799, 2239, 3010, 13, 3166, 282, 1478, 4106, 29889, 13239, 1053, 13641, 2451, 13, 13, 13, 1990, 7605, 24376, 29898, 348, 27958, 29889, 3057, 8259, 1125, 13, 1678, 822, 1243, 29918, 8945, 29918, 2622, 29898, 1311, 1125, 13, 4706, 3855, 353, 341, 1799, 2239, 3010, 29889, 3166, 29918, 703, 10736, 2564, 2622, 703, 1753, 1159, 13, 13, 4706, 1583, 29889, 9294, 9843, 877, 6404, 376, 1753, 29908, 3895, 376, 10736, 29908, 742, 851, 29898, 29939, 876, 13, 13, 1678, 822, 1243, 29918, 5721, 5562, 29918, 2622, 29898, 1311, 1125, 13, 4706, 3855, 353, 341, 1799, 2239, 3010, 29889, 3166, 29918, 703, 10736, 2564, 2622, 703, 1753, 2564, 5721, 5562, 580, 13, 13, 4706, 1583, 29889, 9294, 9843, 877, 6404, 360, 9047, 28852, 376, 1753, 29908, 3895, 376, 10736, 29908, 742, 851, 29898, 29939, 876, 13, 13, 1678, 822, 1243, 29918, 3332, 29918, 5721, 5562, 29918, 2622, 29898, 1311, 1125, 13, 4706, 3855, 353, 341, 1799, 2239, 3010, 29889, 3166, 29918, 703, 10736, 2564, 2622, 703, 1753, 2564, 3332, 29898, 29896, 29900, 467, 5721, 5562, 580, 13, 13, 4706, 1583, 29889, 9294, 9843, 877, 6404, 360, 9047, 28852, 323, 4590, 313, 29896, 29900, 29897, 376, 1753, 29908, 3895, 376, 10736, 29908, 742, 851, 29898, 29939, 876, 13, 13, 1678, 822, 1243, 29918, 3332, 29918, 2622, 29898, 1311, 1125, 13, 4706, 3855, 353, 341, 1799, 2239, 3010, 29889, 3166, 29918, 703, 10736, 2564, 2622, 703, 1753, 2564, 3332, 29898, 29896, 29900, 29897, 13, 13, 4706, 1583, 29889, 9294, 9843, 877, 6404, 323, 4590, 313, 29896, 29900, 29897, 376, 1753, 29908, 3895, 376, 10736, 29908, 742, 851, 29898, 29939, 876, 13, 13, 1678, 822, 1243, 29918, 3332, 29918, 2622, 29918, 5464, 29918, 524, 29898, 1311, 1125, 13, 4706, 411, 1583, 29889, 9294, 29934, 1759, 267, 4597, 735, 29898, 3010, 2451, 29892, 376, 29911, 4590, 995, 1818, 367, 385, 6043, 29908, 1125, 13, 9651, 341, 1799, 2239, 3010, 29889, 3166, 29918, 703, 10736, 2564, 2622, 703, 1753, 2564, 3332, 703, 29874, 1159, 13, 13, 1678, 822, 1243, 29918, 13400, 29898, 1311, 1125, 13, 4706, 3855, 353, 341, 1799, 2239, 3010, 29889, 3166, 29918, 703, 10736, 2564, 2622, 703, 1753, 2564, 2098, 1609, 703, 1753, 2564, 13400, 29898, 29896, 29900, 29897, 13, 13, 4706, 1583, 29889, 9294, 9843, 877, 6404, 376, 1753, 29908, 3895, 376, 10736, 29908, 15606, 6770, 376, 1753, 29908, 438, 4198, 10490, 29871, 29900, 16641, 7811, 383, 2544, 3210, 405, 12194, 29871, 29896, 29900, 16641, 7811, 6732, 16786, 742, 851, 29898, 29939, 876, 13, 13, 1678, 822, 1243, 29918, 9155, 29918, 4622, 29898, 1311, 1125, 13, 4706, 3855, 353, 341, 1799, 2239, 3010, 29889, 3166, 29918, 703, 10736, 2564, 2622, 703, 1753, 2564, 2098, 1609, 703, 1753, 2564, 9155, 29918, 4622, 29898, 29896, 29900, 29897, 13, 13, 4706, 1583, 29889, 9294, 9843, 877, 6404, 376, 1753, 29908, 3895, 376, 10736, 29908, 15606, 6770, 376, 1753, 29908, 438, 4198, 10490, 29871, 29900, 16641, 7811, 383, 2544, 3210, 405, 12194, 29871, 29896, 29900, 16641, 7811, 6732, 16786, 742, 851, 29898, 29939, 876, 13, 13, 1678, 822, 1243, 29918, 10289, 29898, 1311, 1125, 13, 4706, 3855, 353, 341, 1799, 2239, 3010, 29889, 3166, 29918, 703, 10736, 2564, 2622, 703, 1753, 2564, 2098, 1609, 703, 1753, 2564, 10289, 29898, 29896, 29900, 29897, 13, 13, 4706, 1583, 29889, 9294, 9843, 877, 6404, 376, 1753, 29908, 3895, 376, 10736, 29908, 15606, 6770, 376, 1753, 29908, 438, 4198, 10490, 29871, 29896, 29900, 16641, 7811, 742, 851, 29898, 29939, 876, 13, 13, 1678, 822, 1243, 29918, 9155, 29918, 4622, 29918, 2541, 29918, 10289, 29898, 1311, 1125, 13, 4706, 3855, 353, 341, 1799, 2239, 3010, 29889, 3166, 29918, 703, 10736, 2564, 2622, 703, 1753, 2564, 2098, 1609, 703, 1753, 2564, 9155, 29918, 4622, 29898, 29896, 29900, 467, 10289, 29898, 29896, 29900, 29897, 13, 13, 4706, 1583, 29889, 9294, 9843, 877, 6404, 376, 1753, 29908, 3895, 376, 10736, 29908, 15606, 6770, 376, 1753, 29908, 438, 4198, 10490, 29871, 29896, 29900, 16641, 7811, 383, 2544, 3210, 405, 12194, 29871, 29896, 29900, 16641, 7811, 6732, 16786, 742, 851, 29898, 29939, 876, 13, 13, 1678, 822, 1243, 29918, 27789, 29918, 19973, 29918, 8824, 29918, 13221, 29918, 1333, 29918, 2972, 29918, 1609, 29918, 19973, 29918, 2541, 29918, 15770, 29918, 1972, 29898, 1311, 1125, 13, 4706, 260, 353, 6137, 877, 2371, 29896, 1495, 13, 4706, 784, 353, 260, 29889, 10736, 29889, 294, 29918, 877, 29874, 1495, 13, 4706, 3855, 353, 341, 1799, 2239, 3010, 29889, 3166, 23538, 29873, 467, 2622, 29898, 1054, 29892, 3917, 877, 29930, 1495, 467, 27789, 29898, 1054, 29897, 13, 13, 4706, 1583, 29889, 9294, 9843, 877, 6404, 376, 10736, 29908, 376, 29874, 613, 18736, 1194, 29915, 17710, 1495, 3895, 376, 2371, 29896, 29908, 15345, 6770, 376, 10736, 29908, 742, 851, 29898, 29939, 876, 13, 13, 1678, 822, 1243, 29918, 27789, 29918, 19973, 29918, 8824, 29918, 13221, 29918, 1333, 29918, 2972, 29918, 1609, 29918, 19973, 29918, 8256, 29918, 1491, 339, 6358, 29918, 598, 29918, 6338, 29898, 1311, 1125, 13, 4706, 260, 353, 6137, 877, 2371, 29896, 1495, 13, 4706, 1014, 1972, 353, 341, 1799, 2239, 3010, 29889, 3166, 23538, 29873, 467, 2622, 29898, 29873, 29889, 10736, 29897, 13, 4706, 784, 353, 1014, 1972, 29889, 10736, 29889, 294, 29918, 877, 29874, 1495, 13, 4706, 3855, 353, 341, 1799, 2239, 3010, 29889, 3166, 23538, 1491, 1972, 467, 2622, 29898, 1054, 29892, 3917, 877, 29930, 1495, 467, 27789, 29898, 1054, 29897, 13, 13, 4706, 1583, 29889, 9294, 9843, 29898, 13, 9651, 525, 6404, 376, 3044, 29900, 29908, 1213, 10736, 29908, 376, 29874, 613, 18736, 1194, 29915, 17710, 1495, 3895, 313, 6404, 376, 10736, 29908, 3895, 376, 2371, 29896, 1159, 376, 3044, 29900, 29908, 15345, 6770, 376, 3044, 29900, 29908, 1213, 10736, 29908, 742, 851, 29898, 29939, 29897, 13, 4706, 1723, 13, 2 ]
src/main.py
Quin-Darcy/Crawler
0
38249
<reponame>Quin-Darcy/Crawler import crawler import os def main(): root = crawler.Crawler() root.set_start() root.burrow() root.show() os.system('killall firefox') if __name__ == '__main__': main()
[ 1, 529, 276, 1112, 420, 29958, 2182, 262, 29899, 29928, 279, 1270, 29914, 29907, 1610, 1358, 13, 5215, 29349, 1358, 13, 5215, 2897, 13, 13, 13, 1753, 1667, 7295, 13, 1678, 3876, 353, 29349, 1358, 29889, 29907, 1610, 1358, 580, 13, 1678, 3876, 29889, 842, 29918, 2962, 580, 13, 1678, 3876, 29889, 8399, 798, 580, 13, 1678, 3876, 29889, 4294, 580, 13, 1678, 2897, 29889, 5205, 877, 21174, 497, 26590, 1495, 13, 13, 13, 361, 4770, 978, 1649, 1275, 525, 1649, 3396, 1649, 2396, 13, 1678, 1667, 580, 13, 2 ]
Exercicios em Python/ex080.py
Raphael-Azevedo/Exercicios_Python
0
12412
<gh_stars>0 n = [] i = 0 for c in range(0, 5): n1 = int(input('Digite um valor: ')) if c == 0 or n1 > n[-1]: n.append(n1) print(f'Adicionado na posição {c} da lista...') else: pos = 0 while pos < len(n): if n1 <= n[pos]: n.insert(pos, n1) print(f'Adicionado na posição {pos} da lista...') break pos += 1 print(f'Os valores digitados em ordem foram {n}')
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 29876, 353, 5159, 13, 29875, 353, 29871, 29900, 13, 1454, 274, 297, 3464, 29898, 29900, 29892, 29871, 29945, 1125, 13, 1678, 302, 29896, 353, 938, 29898, 2080, 877, 14991, 568, 1922, 16497, 29901, 525, 876, 13, 1678, 565, 274, 1275, 29871, 29900, 470, 302, 29896, 1405, 302, 14352, 29896, 5387, 13, 4706, 302, 29889, 4397, 29898, 29876, 29896, 29897, 13, 4706, 1596, 29898, 29888, 29915, 3253, 15353, 912, 1055, 926, 12556, 426, 29883, 29913, 1146, 15023, 856, 1495, 13, 1678, 1683, 29901, 13, 4706, 926, 353, 29871, 29900, 13, 4706, 1550, 926, 529, 7431, 29898, 29876, 1125, 13, 9651, 565, 302, 29896, 5277, 302, 29961, 1066, 5387, 13, 18884, 302, 29889, 7851, 29898, 1066, 29892, 302, 29896, 29897, 13, 18884, 1596, 29898, 29888, 29915, 3253, 15353, 912, 1055, 926, 12556, 426, 1066, 29913, 1146, 15023, 856, 1495, 13, 18884, 2867, 13, 9651, 926, 4619, 29871, 29896, 13, 13, 2158, 29898, 29888, 29915, 24768, 659, 2361, 13615, 2255, 953, 470, 2310, 15305, 426, 29876, 29913, 1495, 13, 2 ]
dataplotting.py
Shivams9/pythoncodecamp
6
186281
import matplotlib.pyplot as plt x = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] y = [7, 8, 11, 1.3, 16, 15, -1, -.2, 0, 3.3] # plt.figure(figsize=(0,1000)) # plt.xlim(0,100) # plt.ylim(-10,100) # fig=plt.figure() plt.scatter(x, y, color='green', marker='o') plt.plot(x, y, color='yellow', linewidth=10, alpha=0.5) plt.xlabel("Time ") plt.ylabel("Income") # plt.bar(x,y,color='green') plt.title("Time Vs Income") plt.show()
[ 1, 1053, 22889, 29889, 2272, 5317, 408, 14770, 13, 13, 29916, 353, 518, 29896, 29892, 29871, 29906, 29892, 29871, 29941, 29892, 29871, 29946, 29892, 29871, 29945, 29892, 29871, 29953, 29892, 29871, 29955, 29892, 29871, 29947, 29892, 29871, 29929, 29892, 29871, 29896, 29900, 29962, 13, 29891, 353, 518, 29955, 29892, 29871, 29947, 29892, 29871, 29896, 29896, 29892, 29871, 29896, 29889, 29941, 29892, 29871, 29896, 29953, 29892, 29871, 29896, 29945, 29892, 448, 29896, 29892, 448, 29889, 29906, 29892, 29871, 29900, 29892, 29871, 29941, 29889, 29941, 29962, 13, 29937, 14770, 29889, 4532, 29898, 1003, 2311, 7607, 29900, 29892, 29896, 29900, 29900, 29900, 876, 13, 29937, 14770, 29889, 29916, 2576, 29898, 29900, 29892, 29896, 29900, 29900, 29897, 13, 29937, 14770, 29889, 29891, 2576, 6278, 29896, 29900, 29892, 29896, 29900, 29900, 29897, 13, 29937, 2537, 29922, 572, 29873, 29889, 4532, 580, 13, 13, 572, 29873, 29889, 1557, 2620, 29898, 29916, 29892, 343, 29892, 2927, 2433, 12692, 742, 17456, 2433, 29877, 1495, 13, 572, 29873, 29889, 5317, 29898, 29916, 29892, 343, 29892, 2927, 2433, 29136, 742, 1196, 2103, 29922, 29896, 29900, 29892, 15595, 29922, 29900, 29889, 29945, 29897, 13, 572, 29873, 29889, 29916, 1643, 703, 2481, 16521, 13, 572, 29873, 29889, 29891, 1643, 703, 797, 2763, 1159, 13, 29937, 14770, 29889, 1646, 29898, 29916, 29892, 29891, 29892, 2780, 2433, 12692, 1495, 13, 572, 29873, 29889, 3257, 703, 2481, 478, 29879, 512, 2763, 1159, 13, 572, 29873, 29889, 4294, 580, 13, 2 ]
Project-Euler-Solutions/020.py
KartikKannapur/HackerRank
0
167319
<reponame>KartikKannapur/HackerRank #Problem 20: #n! means n × (n − 1) × ... × 3 × 2 × 1 #For example, 10! = 10 × 9 × ... × 3 × 2 × 1 = 3628800, #and the sum of the digits in the number 10! is 3 + 6 + 2 + 8 + 8 + 0 + 0 = 27. #Find the sum of the digits in the number 100! import sympy as sp def main(num): val = sp.factorial(num) summa = 0 val_list = list(str(val)) for i in val_list: summa += int(i) print summa main(100)
[ 1, 529, 276, 1112, 420, 29958, 29968, 442, 638, 29968, 812, 481, 332, 29914, 29950, 28940, 29934, 804, 13, 29937, 26604, 29871, 29906, 29900, 29901, 13, 29937, 29876, 29991, 2794, 302, 13105, 313, 29876, 13935, 29871, 29896, 29897, 13105, 2023, 13105, 29871, 29941, 13105, 29871, 29906, 13105, 29871, 29896, 13, 29937, 2831, 1342, 29892, 29871, 29896, 29900, 29991, 353, 29871, 29896, 29900, 13105, 29871, 29929, 13105, 2023, 13105, 29871, 29941, 13105, 29871, 29906, 13105, 29871, 29896, 353, 29871, 29941, 29953, 29906, 29947, 29947, 29900, 29900, 29892, 13, 29937, 392, 278, 2533, 310, 278, 13340, 297, 278, 1353, 29871, 29896, 29900, 29991, 338, 29871, 29941, 718, 29871, 29953, 718, 29871, 29906, 718, 29871, 29947, 718, 29871, 29947, 718, 29871, 29900, 718, 29871, 29900, 353, 29871, 29906, 29955, 29889, 13, 29937, 12542, 278, 2533, 310, 278, 13340, 297, 278, 1353, 29871, 29896, 29900, 29900, 29991, 13, 13, 13, 5215, 5016, 2272, 408, 805, 13, 1753, 1667, 29898, 1949, 1125, 13, 1678, 659, 353, 805, 29889, 19790, 616, 29898, 1949, 29897, 13, 1678, 2533, 655, 353, 29871, 29900, 13, 1678, 659, 29918, 1761, 353, 1051, 29898, 710, 29898, 791, 876, 13, 268, 13, 1678, 363, 474, 297, 659, 29918, 1761, 29901, 13, 4706, 2533, 655, 4619, 938, 29898, 29875, 29897, 13, 1678, 1596, 2533, 655, 13, 268, 13, 3396, 29898, 29896, 29900, 29900, 29897, 13, 2 ]
backend/user/permissions.py
HarsimratBhundar/gym-buddy
0
155292
<filename>backend/user/permissions.py from rest_framework import permissions from django.contrib.auth.models import User from rest_framework.authtoken.models import Token class UserAccessPermission(permissions.BasePermission): message = 'Invalid permission' def has_permission(self, request, view): if (request.path == '/user'): token_recieved = request.headers.get('Authorization') username = request.headers.get('username') if token_recieved and username: if (request.method == 'GET' or request.method == 'POST'): user = User.objects.get(username=username) token, _ = Token.objects.get_or_create(user=user) if (token_recieved.split(' ')[1] == token.key): return True return False
[ 1, 529, 9507, 29958, 27852, 29914, 1792, 29914, 17858, 6847, 29889, 2272, 13, 3166, 1791, 29918, 4468, 1053, 11239, 13, 3166, 9557, 29889, 21570, 29889, 5150, 29889, 9794, 1053, 4911, 13, 3166, 1791, 29918, 4468, 29889, 1300, 400, 4476, 29889, 9794, 1053, 25159, 13, 13, 1990, 4911, 6638, 27293, 29898, 17858, 6847, 29889, 5160, 27293, 1125, 13, 1678, 2643, 353, 525, 13919, 10751, 29915, 13, 13, 1678, 822, 756, 29918, 16074, 29898, 1311, 29892, 2009, 29892, 1776, 1125, 13, 4706, 565, 313, 3827, 29889, 2084, 1275, 8207, 1792, 29374, 13, 9651, 5993, 29918, 3757, 6402, 353, 2009, 29889, 13662, 29889, 657, 877, 25471, 1495, 13, 9651, 8952, 353, 2009, 29889, 13662, 29889, 657, 877, 6786, 1495, 13, 9651, 565, 5993, 29918, 3757, 6402, 322, 8952, 29901, 13, 18884, 565, 313, 3827, 29889, 5696, 1275, 525, 7194, 29915, 470, 2009, 29889, 5696, 1275, 525, 5438, 29374, 13, 462, 4706, 1404, 353, 4911, 29889, 12650, 29889, 657, 29898, 6786, 29922, 6786, 29897, 13, 462, 4706, 5993, 29892, 903, 353, 25159, 29889, 12650, 29889, 657, 29918, 272, 29918, 3258, 29898, 1792, 29922, 1792, 29897, 13, 462, 4706, 565, 313, 6979, 29918, 3757, 6402, 29889, 5451, 877, 525, 9601, 29896, 29962, 1275, 5993, 29889, 1989, 1125, 13, 462, 9651, 736, 5852, 13, 4706, 736, 7700, 13, 2 ]
apns_proxy_client/core.py
hagino3000/apns-proxy-client-py
0
7442
<reponame>hagino3000/apns-proxy-client-py # -*- coding: utf-8 -*- """ APNS Proxy Serverのクライアント """ import time import zmq import simplejson as json READ_TIMEOUT = 1500 # msec FLUSH_TIMEOUT = 5000 # msec COMMAND_ASK_ADDRESS = b'\1' COMMAND_SEND = b'\2' COMMAND_FEEDBACK = b'\3' DEVICE_TOKEN_LENGTH = 64 JSON_ALERT_KEY_SET = set(['body', 'action_loc_key', 'loc_key', 'loc_args', 'launch_image']) class APNSProxyClient(object): def __init__(self, host, port, application_id): """ ZMQコンテキストとソケットの初期化 """ if host is None or not isinstance(host, str): raise ValueError("host must be string") if port is None or not isinstance(port, int): raise ValueError("host must be int type") self.host = host self.port = port self.context = zmq.Context() self.context.setsockopt(zmq.LINGER, FLUSH_TIMEOUT) self.communicator = self.context.socket(zmq.REQ) self.publisher = self.context.socket(zmq.PUSH) self.connected = False if not isinstance(application_id, str): raise ValueError("application_id must be string type") self.application_id = application_id def __enter__(self): self.connect() def connect(self): """リモートサーバーへ接続""" if self.connected is False: self.communicator.connect(self.build_address(self.port)) push_port = self.get_push_port() self.publisher.connect(self.build_address(push_port)) self.connected = True def build_address(self, port): return "tcp://%s:%s" % (self.host, port) def get_push_port(self): """ PUSH-PULL接続用のポートを取得する """ self.communicator.send(COMMAND_ASK_ADDRESS) poller = zmq.Poller() poller.register(self.communicator, zmq.POLLIN) if poller.poll(READ_TIMEOUT): return self.communicator.recv() else: self.close() raise IOError("Cannot connect to APNs Proxy Server. Timeout!!") def send(self, token, alert, sound='default', badge=None, content_available=False, custom=None, expiry=None, priority=None, test=False): """ デバイストークンの送信 """ self._check_token(token) self._check_alert(alert) self._check_custom(custom) self.publisher.send(self._serialize( COMMAND_SEND, token, alert, sound, badge, content_available, custom, expiry, priority, test )) def get_feedback(self): data = { 'appid': self.application_id, } command = COMMAND_FEEDBACK + json.dumps(data, ensure_ascii=True) self.communicator.send(command) return json.loads(self.communicator.recv()) @staticmethod def _check_token(token): if len(token) != DEVICE_TOKEN_LENGTH: raise ValueError('Invalid token length %s' % token) @staticmethod def _check_alert(alert): if (alert is None or isinstance(alert, basestring)): return elif isinstance(alert, dict): if len(set(alert.keys()) - JSON_ALERT_KEY_SET) > 0: raise ValueError('JSON Alert allows only' 'body, action_loc_key, loc_key, loc_args, launch_image') else: raise ValueError('alert must be string, unicode or dict type') @staticmethod def _check_custom(custom): if custom is None or isinstance(custom, dict): return raise ValueError('custom must be dict type') def _serialize(self, command, token, alert, sound, badge, content_available, custom, expiry, priority, test): """ 送信データのフォーマット """ aps = {} if alert is not None: aps['alert'] = alert if sound is not None: aps['sound'] = sound if badge is not None: aps['badge'] = badge if content_available is True: aps['content_available'] = True if custom is not None: aps['custom'] = custom data = { 'appid': self.application_id, 'token': token, 'aps': aps, 'test': test } if expiry is not None: data['expiry'] = expiry if priority is not None: data['priority'] = priority return command + json.dumps(data, ensure_ascii=True) def __exit__(self, exc_type, exc_value, traceback): if exc_type: self._close() return False self.close() def close(self): start_time = time.time() self._close() end_time = time.time() if (end_time - start_time) > (FLUSH_TIMEOUT - 20)/1000.0: raise IOError('Timeout close operation. Some messages may not reached to server.') return True def _close(self): self.publisher.close() self.communicator.close() self.context.term()
[ 1, 529, 276, 1112, 420, 29958, 29882, 351, 1789, 29941, 29900, 29900, 29900, 29914, 481, 1983, 29899, 14701, 29899, 4645, 29899, 2272, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 15945, 29908, 13, 3301, 3059, 1019, 3594, 5656, 30199, 30305, 30281, 30260, 30310, 30203, 30279, 13, 15945, 29908, 13, 13, 5215, 931, 13, 13, 5215, 12162, 29939, 13, 5215, 2560, 3126, 408, 4390, 13, 13, 13, 16310, 29918, 15307, 12015, 353, 29871, 29896, 29945, 29900, 29900, 29871, 396, 286, 3471, 13, 10536, 3308, 29950, 29918, 15307, 12015, 353, 29871, 29945, 29900, 29900, 29900, 29871, 396, 286, 3471, 13, 13, 19795, 1529, 2797, 29918, 3289, 29968, 29918, 17744, 26785, 353, 289, 12764, 29896, 29915, 13, 19795, 1529, 2797, 29918, 29903, 11794, 353, 289, 12764, 29906, 29915, 13, 19795, 1529, 2797, 29918, 16359, 3352, 29933, 11375, 353, 289, 12764, 29941, 29915, 13, 13, 2287, 19059, 29918, 4986, 29968, 1430, 29918, 19433, 353, 29871, 29953, 29946, 13, 7249, 29918, 1964, 20161, 29918, 10818, 29918, 10490, 353, 731, 18959, 2587, 742, 525, 2467, 29918, 2029, 29918, 1989, 742, 525, 2029, 29918, 1989, 742, 525, 2029, 29918, 5085, 742, 525, 15343, 29918, 3027, 11287, 13, 13, 13, 1990, 12279, 3059, 14048, 4032, 29898, 3318, 1125, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 3495, 29892, 2011, 29892, 2280, 29918, 333, 1125, 13, 4706, 9995, 13, 4706, 796, 25566, 30459, 30203, 30572, 30454, 30255, 30279, 30364, 31051, 30978, 30317, 30279, 30199, 31120, 31117, 30705, 13, 4706, 9995, 13, 4706, 565, 3495, 338, 6213, 470, 451, 338, 8758, 29898, 3069, 29892, 851, 1125, 13, 9651, 12020, 7865, 2392, 703, 3069, 1818, 367, 1347, 1159, 13, 4706, 565, 2011, 338, 6213, 470, 451, 338, 8758, 29898, 637, 29892, 938, 1125, 13, 9651, 12020, 7865, 2392, 703, 3069, 1818, 367, 938, 1134, 1159, 13, 4706, 1583, 29889, 3069, 353, 3495, 13, 4706, 1583, 29889, 637, 353, 2011, 13, 13, 4706, 1583, 29889, 4703, 353, 12162, 29939, 29889, 2677, 580, 13, 4706, 1583, 29889, 4703, 29889, 842, 21852, 3670, 29898, 14018, 29939, 29889, 29931, 4214, 1001, 29892, 383, 29931, 3308, 29950, 29918, 15307, 12015, 29897, 13, 13, 4706, 1583, 29889, 27820, 1061, 353, 1583, 29889, 4703, 29889, 11514, 29898, 14018, 29939, 29889, 1525, 29984, 29897, 13, 4706, 1583, 29889, 23679, 261, 353, 1583, 29889, 4703, 29889, 11514, 29898, 14018, 29939, 29889, 29925, 3308, 29950, 29897, 13, 4706, 1583, 29889, 18045, 353, 7700, 13, 13, 4706, 565, 451, 338, 8758, 29898, 6214, 29918, 333, 29892, 851, 1125, 13, 9651, 12020, 7865, 2392, 703, 6214, 29918, 333, 1818, 367, 1347, 1134, 1159, 13, 4706, 1583, 29889, 6214, 29918, 333, 353, 2280, 29918, 333, 13, 13, 1678, 822, 4770, 5893, 12035, 1311, 1125, 13, 4706, 1583, 29889, 6915, 580, 13, 13, 1678, 822, 4511, 29898, 1311, 1125, 13, 4706, 9995, 30303, 30761, 30185, 30279, 30615, 30185, 30517, 30185, 31388, 31092, 234, 185, 157, 15945, 29908, 13, 4706, 565, 1583, 29889, 18045, 338, 7700, 29901, 13, 9651, 1583, 29889, 27820, 1061, 29889, 6915, 29898, 1311, 29889, 4282, 29918, 7328, 29898, 1311, 29889, 637, 876, 13, 9651, 5503, 29918, 637, 353, 1583, 29889, 657, 29918, 5910, 29918, 637, 580, 13, 9651, 1583, 29889, 23679, 261, 29889, 6915, 29898, 1311, 29889, 4282, 29918, 7328, 29898, 5910, 29918, 637, 876, 13, 9651, 1583, 29889, 18045, 353, 5852, 13, 13, 1678, 822, 2048, 29918, 7328, 29898, 1311, 29892, 2011, 1125, 13, 4706, 736, 376, 23981, 597, 29995, 29879, 16664, 29879, 29908, 1273, 313, 1311, 29889, 3069, 29892, 2011, 29897, 13, 13, 1678, 822, 679, 29918, 5910, 29918, 637, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 349, 3308, 29950, 29899, 29925, 3299, 31092, 234, 185, 157, 30406, 30199, 31205, 30185, 30279, 30396, 30683, 31050, 30427, 30332, 13, 4706, 9995, 13, 4706, 1583, 29889, 27820, 1061, 29889, 6717, 29898, 19795, 1529, 2797, 29918, 3289, 29968, 29918, 17744, 26785, 29897, 13, 4706, 1248, 1358, 353, 12162, 29939, 29889, 7713, 1358, 580, 13, 4706, 1248, 1358, 29889, 9573, 29898, 1311, 29889, 27820, 1061, 29892, 12162, 29939, 29889, 13152, 2208, 1177, 29897, 13, 4706, 565, 1248, 1358, 29889, 29886, 3028, 29898, 16310, 29918, 15307, 12015, 1125, 13, 9651, 736, 1583, 29889, 27820, 1061, 29889, 3757, 29894, 580, 13, 4706, 1683, 29901, 13, 9651, 1583, 29889, 5358, 580, 13, 9651, 12020, 10663, 2392, 703, 29089, 4511, 304, 12279, 29940, 29879, 1019, 3594, 5656, 29889, 5974, 449, 6824, 1159, 13, 13, 1678, 822, 3638, 29898, 1311, 29892, 5993, 29892, 6655, 29892, 6047, 2433, 4381, 742, 4319, 479, 29922, 8516, 29892, 2793, 29918, 16515, 29922, 8824, 29892, 13, 632, 2888, 29922, 8516, 29892, 1518, 16129, 29922, 8516, 29892, 20136, 29922, 8516, 29892, 1243, 29922, 8824, 1125, 13, 4706, 9995, 13, 308, 30597, 30517, 30260, 30255, 30279, 30185, 30305, 30203, 30199, 31545, 30689, 13, 4706, 9995, 13, 4706, 1583, 3032, 3198, 29918, 6979, 29898, 6979, 29897, 13, 4706, 1583, 3032, 3198, 29918, 12888, 29898, 12888, 29897, 13, 4706, 1583, 3032, 3198, 29918, 6341, 29898, 6341, 29897, 13, 4706, 1583, 29889, 23679, 261, 29889, 6717, 29898, 1311, 3032, 643, 6646, 29898, 13, 9651, 23353, 1529, 2797, 29918, 29903, 11794, 29892, 5993, 29892, 6655, 29892, 6047, 29892, 4319, 479, 29892, 2793, 29918, 16515, 29892, 2888, 29892, 13, 9651, 1518, 16129, 29892, 20136, 29892, 1243, 13, 308, 876, 13, 13, 1678, 822, 679, 29918, 18798, 1627, 29898, 1311, 1125, 13, 4706, 848, 353, 426, 13, 9651, 525, 932, 333, 2396, 1583, 29889, 6214, 29918, 333, 29892, 13, 4706, 500, 13, 4706, 1899, 353, 23353, 1529, 2797, 29918, 16359, 3352, 29933, 11375, 718, 4390, 29889, 29881, 17204, 29898, 1272, 29892, 9801, 29918, 294, 18869, 29922, 5574, 29897, 13, 13, 4706, 1583, 29889, 27820, 1061, 29889, 6717, 29898, 6519, 29897, 13, 4706, 736, 4390, 29889, 18132, 29898, 1311, 29889, 27820, 1061, 29889, 3757, 29894, 3101, 13, 13, 1678, 732, 7959, 5696, 13, 1678, 822, 903, 3198, 29918, 6979, 29898, 6979, 1125, 13, 4706, 565, 7431, 29898, 6979, 29897, 2804, 5012, 19059, 29918, 4986, 29968, 1430, 29918, 19433, 29901, 13, 9651, 12020, 7865, 2392, 877, 13919, 5993, 3309, 1273, 29879, 29915, 1273, 5993, 29897, 13, 13, 1678, 732, 7959, 5696, 13, 1678, 822, 903, 3198, 29918, 12888, 29898, 12888, 1125, 13, 4706, 565, 313, 12888, 338, 6213, 470, 338, 8758, 29898, 12888, 29892, 2362, 342, 5393, 22164, 13, 9651, 736, 13, 4706, 25342, 338, 8758, 29898, 12888, 29892, 9657, 1125, 13, 9651, 565, 7431, 29898, 842, 29898, 12888, 29889, 8149, 3101, 448, 4663, 29918, 1964, 20161, 29918, 10818, 29918, 10490, 29897, 1405, 29871, 29900, 29901, 13, 18884, 12020, 7865, 2392, 877, 7249, 28861, 6511, 871, 29915, 13, 462, 462, 525, 2587, 29892, 3158, 29918, 2029, 29918, 1989, 29892, 1180, 29918, 1989, 29892, 1180, 29918, 5085, 29892, 6826, 29918, 3027, 1495, 13, 4706, 1683, 29901, 13, 9651, 12020, 7865, 2392, 877, 12888, 1818, 367, 1347, 29892, 29104, 470, 9657, 1134, 1495, 13, 13, 1678, 732, 7959, 5696, 13, 1678, 822, 903, 3198, 29918, 6341, 29898, 6341, 1125, 13, 4706, 565, 2888, 338, 6213, 470, 338, 8758, 29898, 6341, 29892, 9657, 1125, 13, 9651, 736, 13, 4706, 12020, 7865, 2392, 877, 6341, 1818, 367, 9657, 1134, 1495, 13, 13, 1678, 822, 903, 643, 6646, 29898, 1311, 29892, 1899, 29892, 5993, 29892, 6655, 29892, 6047, 29892, 4319, 479, 29892, 2793, 29918, 16515, 29892, 2888, 29892, 13, 462, 259, 1518, 16129, 29892, 20136, 29892, 1243, 1125, 13, 4706, 9995, 13, 308, 31545, 30689, 30597, 30185, 30369, 30199, 30423, 31402, 30185, 30388, 30317, 30279, 13, 4706, 9995, 13, 4706, 263, 567, 353, 6571, 13, 4706, 565, 6655, 338, 451, 6213, 29901, 13, 9651, 263, 567, 1839, 12888, 2033, 353, 6655, 13, 4706, 565, 6047, 338, 451, 6213, 29901, 13, 9651, 263, 567, 1839, 29802, 2033, 353, 6047, 13, 4706, 565, 4319, 479, 338, 451, 6213, 29901, 13, 9651, 263, 567, 1839, 12313, 479, 2033, 353, 4319, 479, 13, 4706, 565, 2793, 29918, 16515, 338, 5852, 29901, 13, 9651, 263, 567, 1839, 3051, 29918, 16515, 2033, 353, 5852, 13, 4706, 565, 2888, 338, 451, 6213, 29901, 13, 9651, 263, 567, 1839, 6341, 2033, 353, 2888, 13, 13, 4706, 848, 353, 426, 13, 9651, 525, 932, 333, 2396, 1583, 29889, 6214, 29918, 333, 29892, 13, 9651, 525, 6979, 2396, 5993, 29892, 13, 9651, 525, 2547, 2396, 263, 567, 29892, 13, 9651, 525, 1688, 2396, 1243, 13, 4706, 500, 13, 4706, 565, 1518, 16129, 338, 451, 6213, 29901, 13, 9651, 848, 1839, 4548, 16129, 2033, 353, 1518, 16129, 13, 4706, 565, 20136, 338, 451, 6213, 29901, 13, 9651, 848, 1839, 29886, 21766, 2033, 353, 20136, 13, 4706, 736, 1899, 718, 4390, 29889, 29881, 17204, 29898, 1272, 29892, 9801, 29918, 294, 18869, 29922, 5574, 29897, 13, 13, 1678, 822, 4770, 13322, 12035, 1311, 29892, 5566, 29918, 1853, 29892, 5566, 29918, 1767, 29892, 9637, 1627, 1125, 13, 4706, 565, 5566, 29918, 1853, 29901, 13, 9651, 1583, 3032, 5358, 580, 13, 9651, 736, 7700, 13, 4706, 1583, 29889, 5358, 580, 13, 13, 1678, 822, 3802, 29898, 1311, 1125, 13, 4706, 1369, 29918, 2230, 353, 931, 29889, 2230, 580, 13, 4706, 1583, 3032, 5358, 580, 13, 4706, 1095, 29918, 2230, 353, 931, 29889, 2230, 580, 13, 4706, 565, 313, 355, 29918, 2230, 448, 1369, 29918, 2230, 29897, 1405, 313, 10536, 3308, 29950, 29918, 15307, 12015, 448, 29871, 29906, 29900, 6802, 29896, 29900, 29900, 29900, 29889, 29900, 29901, 13, 9651, 12020, 10663, 2392, 877, 10851, 3802, 5858, 29889, 3834, 7191, 1122, 451, 7450, 304, 1923, 29889, 1495, 13, 4706, 736, 5852, 13, 13, 1678, 822, 903, 5358, 29898, 1311, 1125, 13, 4706, 1583, 29889, 23679, 261, 29889, 5358, 580, 13, 4706, 1583, 29889, 27820, 1061, 29889, 5358, 580, 13, 4706, 1583, 29889, 4703, 29889, 8489, 580, 13, 2 ]
deep_ner/udpipe_data.py
bond005/elmo_ner
80
57974
<reponame>bond005/elmo_ner import re from typing import Set import spacy_udpipe from spacy_udpipe import UDPipeLanguage UNIVERSAL_POS_TAGS = ['ADJ', 'ADP', 'ADV', 'AUX', 'CCONJ', 'CONJ', 'DET', 'INTJ', 'NOUN', 'NUM', 'PART', 'PRON', 'PROPN', 'PUNCT', 'SCONJ', 'SYM', 'VERB', 'X'] UNIVERSAL_DEPENDENCIES = ['acl', 'advcl', 'advmod', 'amod', 'appos', 'aux', 'auxpass', 'case', 'cc', 'ccomp', 'compound', 'conj', 'cop', 'csubj', 'csubjpass', 'dep', 'det', 'discourse', 'dislocated', 'dobj', 'expl', 'fixed', 'flat', 'foreign', 'goeswith', 'gov', 'iobj', 'list', 'mark', 'mwe', 'name', 'neg', 'nmod', 'nsubj', 'nsubjpass', 'nummod', 'obj', 'obl', 'orphan', 'parataxis', 'pass', 'punct', 'relcl', 'remnant', 'reparandum', 'root', 'vocative', 'xcomp'] def create_udpipe_pipeline(lang: str) -> UDPipeLanguage: try: pipeline = spacy_udpipe.load(lang) except: spacy_udpipe.download(lang) pipeline = spacy_udpipe.load(lang) if pipeline is None: del pipeline raise ValueError('The `{0}` language cannot be loaded for the UDPipe!') return pipeline def prepare_dependency_tag(source_tag: str) -> Set[str]: re_for_splitting = re.compile('[:\-]+') tags = {source_tag.lower().replace(':', '').replace('-', '')} for cur in filter(lambda it2: len(it2) > 0, map(lambda it1: it1.strip().lower(), re_for_splitting.split(source_tag))): tags.add(cur) return tags
[ 1, 529, 276, 1112, 420, 29958, 29890, 898, 29900, 29900, 29945, 29914, 295, 4346, 29918, 1089, 13, 5215, 337, 13, 3166, 19229, 1053, 3789, 13, 13, 5215, 805, 4135, 29918, 566, 17760, 13, 3166, 805, 4135, 29918, 566, 17760, 1053, 501, 11191, 15705, 21233, 13, 13, 13, 3904, 29902, 5348, 29903, 1964, 29918, 24815, 29918, 6040, 10749, 353, 6024, 3035, 29967, 742, 525, 3035, 29925, 742, 525, 3035, 29963, 742, 525, 25951, 29990, 742, 525, 4174, 1164, 29967, 742, 525, 6007, 29967, 742, 525, 2287, 29911, 742, 525, 10192, 29967, 742, 525, 6632, 3904, 742, 525, 13967, 742, 525, 26092, 742, 525, 10593, 1164, 742, 13, 462, 418, 525, 8618, 15695, 742, 525, 29925, 3904, 1783, 742, 525, 29903, 6007, 29967, 742, 525, 14816, 29924, 742, 525, 5348, 29933, 742, 525, 29990, 2033, 13, 3904, 29902, 5348, 29903, 1964, 29918, 2287, 29925, 11794, 1430, 8426, 2890, 353, 6024, 562, 29880, 742, 525, 17263, 695, 742, 525, 17263, 1545, 742, 525, 314, 397, 742, 525, 932, 359, 742, 525, 2993, 742, 525, 2993, 3364, 742, 525, 4878, 742, 525, 617, 742, 525, 29883, 2388, 742, 13, 462, 3986, 525, 2388, 618, 742, 525, 535, 29926, 742, 525, 9708, 742, 525, 29883, 1491, 29926, 742, 525, 29883, 1491, 29926, 3364, 742, 525, 2716, 742, 525, 4801, 742, 525, 2218, 15775, 742, 525, 2218, 28809, 742, 13, 462, 3986, 525, 29881, 5415, 742, 525, 24516, 742, 525, 20227, 742, 525, 20620, 742, 525, 1079, 647, 742, 525, 1484, 267, 2541, 742, 525, 13513, 742, 525, 601, 29890, 29926, 742, 525, 1761, 742, 525, 3502, 742, 525, 29885, 705, 742, 13, 462, 3986, 525, 978, 742, 525, 10052, 742, 525, 29876, 1545, 742, 525, 29876, 1491, 29926, 742, 525, 29876, 1491, 29926, 3364, 742, 525, 1949, 1545, 742, 525, 5415, 742, 525, 711, 29880, 742, 525, 5676, 273, 742, 525, 862, 532, 11497, 742, 13, 462, 3986, 525, 3364, 742, 525, 29886, 18049, 742, 525, 2674, 695, 742, 525, 1745, 21941, 742, 525, 276, 862, 392, 398, 742, 525, 4632, 742, 525, 29894, 542, 1230, 742, 525, 29916, 2388, 2033, 13, 13, 13, 1753, 1653, 29918, 566, 17760, 29918, 13096, 5570, 29898, 3893, 29901, 851, 29897, 1599, 501, 11191, 15705, 21233, 29901, 13, 1678, 1018, 29901, 13, 4706, 16439, 353, 805, 4135, 29918, 566, 17760, 29889, 1359, 29898, 3893, 29897, 13, 1678, 5174, 29901, 13, 4706, 805, 4135, 29918, 566, 17760, 29889, 10382, 29898, 3893, 29897, 13, 4706, 16439, 353, 805, 4135, 29918, 566, 17760, 29889, 1359, 29898, 3893, 29897, 13, 1678, 565, 16439, 338, 6213, 29901, 13, 4706, 628, 16439, 13, 4706, 12020, 7865, 2392, 877, 1576, 23230, 29900, 10114, 4086, 2609, 367, 7500, 363, 278, 501, 11191, 15705, 29991, 1495, 13, 1678, 736, 16439, 13, 13, 13, 1753, 19012, 29918, 10836, 29918, 4039, 29898, 4993, 29918, 4039, 29901, 851, 29897, 1599, 3789, 29961, 710, 5387, 13, 1678, 337, 29918, 1454, 29918, 23579, 5367, 353, 337, 29889, 12198, 877, 29961, 3583, 29899, 10062, 1495, 13, 1678, 8282, 353, 426, 4993, 29918, 4039, 29889, 13609, 2141, 6506, 877, 29901, 742, 525, 2824, 6506, 877, 29899, 742, 27255, 29913, 13, 1678, 363, 3151, 297, 4175, 29898, 2892, 372, 29906, 29901, 7431, 29898, 277, 29906, 29897, 1405, 29871, 29900, 29892, 2910, 29898, 2892, 372, 29896, 29901, 372, 29896, 29889, 17010, 2141, 13609, 3285, 13, 462, 462, 462, 1678, 337, 29918, 1454, 29918, 23579, 5367, 29889, 5451, 29898, 4993, 29918, 4039, 876, 1125, 13, 4706, 8282, 29889, 1202, 29898, 2764, 29897, 13, 1678, 736, 8282, 13, 2 ]
telegram_bot/bot.py
HikkaV/Neural-conversational-bot
1
93084
from model.seq2seq import Seq2Seq from model.decoding_techniques import BeamSearchDecoder, GreedyDecoder, NucleusDecoder from utils.model_utils import predict_beam, predict_greedy, predict_nucleus, process_sentence import telebot from telebot import types import logging logger = telebot.logger telebot.logger.setLevel(logging.DEBUG) class TelegramBot: BOT = telebot.TeleBot("1716865383:AAGR9GxP_cOefogxRgqN-b1NbXAQcgt-GDE") def __init__(self, model: Seq2Seq, token_mapping: dict, start_token: int, end_token: int, max_len: int = 10 ): self.decoder = model.decoder self.encoder = model.encoder self.token_mapping = token_mapping self.inverse_token_mapping = dict((v, k) for k, v in token_mapping.items()) self.max_len = max_len self.greedy_decoder = GreedyDecoder(self.encoder, self.decoder, start_token, end_token, max_len) self.beam_decoder = BeamSearchDecoder(self.encoder, self.decoder, start_token, end_token, max_len) self.nucleus_decoder = NucleusDecoder(self.encoder, self.decoder, start_token, end_token, max_len) self.keys_decoding = self.set_keys_decoding() self.predict = predict_greedy self.decoding_strategy = self.greedy_decoder self.dict_params = {"beam": {"beam_size": 7}, "nucleus": {"top_p": 0.95, "temperature": 1}, } self.setting_message = False self.setting_to_change = None self.decoding_type = "greedy" @self.BOT.callback_query_handler(func=lambda call: True) def callback_worker(call): if call.data in ['beam', 'nucleus', 'greedy']: if call.data == 'beam': self.predict = predict_beam self.decoding_strategy = self.beam_decoder elif call.data == 'nucleus': self.predict = predict_nucleus self.decoding_strategy = self.nucleus_decoder elif call.data == 'greedy': self.predict = predict_greedy self.decoding_strategy = self.greedy_decoder self.decoding_type = call.data else: self.setting_to_change = call.data @self.BOT.message_handler(content_types=['text'], ) def reply(message): if message.text == "/help": self.BOT.send_message(message.from_user.id, "Hello. In order to start the bot please write /start.") elif message.text == "/start" or message.text == "/choose": self.BOT.send_message(message.from_user.id, "Please choose type of decoding and then start the conversation.", reply_markup=self.keys_decoding) elif message.text == "/show_default": if self.decoding_type != 'greedy': self.BOT.send_message(message.from_user.id, "Default settings for used decoding strategy ({0}) are the following : {1}" \ .format(self.decoding_type, self.dict_params[self.decoding_type])) else: self.BOT.send_message(message.from_user.id, "No settings for greedy decoding") elif message.text == '/change_default': if self.decoding_type != 'greedy': keyboard = self.set_keys_options() self.BOT.send_message(message.from_user.id, "Please choose the parameter to change and write the new value.", reply_markup=keyboard) self.setting_message = True else: self.BOT.send_message(message.from_user.id, "No settings for greedy decoding.") elif self.setting_message: try: param = float(message.text) except Exception as e: param = None if param: initial_param = param param = max(param, 0) if self.decoding_type == 'nucleus': param = min(param, 1.0) param = max(param, 0.1) else: param = max(int(param), 2) self.dict_params[self.decoding_type][self.setting_to_change] = param if initial_param != param: self.BOT.send_message(message.from_user.id, "Successfully set value of {0} " "for param {1}. " "Initial param passed by user ({1}={2}) " "was changed to fir constraints. ".format(param, self.setting_to_change, initial_param)) else: self.BOT.send_message(message.from_user.id, "Successfully set value of {0} " "for param {1}".format(param, self.setting_to_change)) else: self.BOT.send_message(message.from_user.id, "The error occurred, please try again with " "command /change_default. ") self.setting_message = False else: processed_sentence = process_sentence(message.text, self.token_mapping, max_len=self.max_len) if self.decoding_type == 'beam': result = self.predict(self.decoding_strategy, processed_sentence, self.inverse_token_mapping, beam_size=self.dict_params[self.decoding_type]['beam_size']) elif self.decoding_type == 'nucleus': result = self.predict(self.decoding_strategy, processed_sentence, self.inverse_token_mapping, top_p=self.dict_params[self.decoding_type]['top_p'], temperature=self.dict_params[self.decoding_type]['temperature']) else: result = self.predict(self.decoding_strategy, processed_sentence, self.inverse_token_mapping) self.BOT.send_message(message.from_user.id, result) def set_keys_decoding(self): keyboard = types.InlineKeyboardMarkup() key_beam = types.InlineKeyboardButton(text='Beam search decoder', callback_data='beam') keyboard.add(key_beam) key_nucleus = types.InlineKeyboardButton(text='Nucleus decoder', callback_data='nucleus') keyboard.add(key_nucleus) key_greedy = types.InlineKeyboardButton(text='Greedy decoder', callback_data='greedy') keyboard.add(key_greedy) return keyboard def set_keys_options(self): keyboard = types.InlineKeyboardMarkup() possible_keys = self.dict_params[self.decoding_type] for key in possible_keys.keys(): keyboard.add(types.InlineKeyboardButton(text=key, callback_data=key)) return keyboard def start(self): self.BOT.polling(none_stop=True, interval=0)
[ 1, 515, 1904, 29889, 11762, 29906, 11762, 1053, 25981, 29906, 23718, 13, 3166, 1904, 29889, 7099, 3689, 29918, 371, 6387, 1912, 1053, 1522, 314, 7974, 6185, 6119, 29892, 4122, 7584, 6185, 6119, 29892, 405, 1682, 280, 375, 6185, 6119, 13, 3166, 3667, 29879, 29889, 4299, 29918, 13239, 1053, 8500, 29918, 915, 314, 29892, 8500, 29918, 7979, 7584, 29892, 8500, 29918, 29876, 1682, 280, 375, 29892, 1889, 29918, 18616, 663, 13, 5215, 4382, 7451, 13, 3166, 4382, 7451, 1053, 4072, 13, 5215, 12183, 13, 13, 21707, 353, 4382, 7451, 29889, 21707, 13, 15494, 7451, 29889, 21707, 29889, 842, 10108, 29898, 21027, 29889, 18525, 29897, 13, 13, 13, 1990, 9699, 1393, 29933, 327, 29901, 13, 1678, 350, 2891, 353, 4382, 7451, 29889, 29911, 6146, 29933, 327, 703, 29896, 29955, 29896, 29953, 29947, 29953, 29945, 29941, 29947, 29941, 29901, 6344, 14345, 29929, 29954, 29916, 29925, 29918, 29883, 29949, 1389, 468, 29916, 29934, 29887, 29939, 29940, 29899, 29890, 29896, 29940, 29890, 29990, 29909, 29984, 29883, 4141, 29899, 29954, 2287, 1159, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 1904, 29901, 25981, 29906, 23718, 29892, 13, 462, 5993, 29918, 20698, 29901, 9657, 29892, 13, 462, 1369, 29918, 6979, 29901, 938, 29892, 13, 462, 1095, 29918, 6979, 29901, 938, 29892, 13, 462, 4236, 29918, 2435, 29901, 938, 353, 29871, 29896, 29900, 13, 462, 29871, 1125, 13, 13, 4706, 1583, 29889, 7099, 6119, 353, 1904, 29889, 7099, 6119, 13, 4706, 1583, 29889, 3977, 6119, 353, 1904, 29889, 3977, 6119, 13, 4706, 1583, 29889, 6979, 29918, 20698, 353, 5993, 29918, 20698, 13, 4706, 1583, 29889, 262, 3901, 29918, 6979, 29918, 20698, 353, 9657, 3552, 29894, 29892, 413, 29897, 363, 413, 29892, 325, 297, 5993, 29918, 20698, 29889, 7076, 3101, 13, 4706, 1583, 29889, 3317, 29918, 2435, 353, 4236, 29918, 2435, 13, 4706, 1583, 29889, 7979, 7584, 29918, 7099, 6119, 353, 4122, 7584, 6185, 6119, 29898, 1311, 29889, 3977, 6119, 29892, 13, 462, 462, 9651, 1583, 29889, 7099, 6119, 29892, 13, 462, 462, 9651, 1369, 29918, 6979, 29892, 13, 462, 462, 9651, 1095, 29918, 6979, 29892, 13, 462, 462, 9651, 4236, 29918, 2435, 29897, 13, 13, 4706, 1583, 29889, 915, 314, 29918, 7099, 6119, 353, 1522, 314, 7974, 6185, 6119, 29898, 1311, 29889, 3977, 6119, 29892, 13, 462, 462, 795, 1583, 29889, 7099, 6119, 29892, 13, 462, 462, 795, 1369, 29918, 6979, 29892, 13, 462, 462, 795, 1095, 29918, 6979, 29892, 13, 462, 462, 795, 4236, 29918, 2435, 29897, 13, 13, 4706, 1583, 29889, 29876, 1682, 280, 375, 29918, 7099, 6119, 353, 405, 1682, 280, 375, 6185, 6119, 29898, 1311, 29889, 3977, 6119, 29892, 13, 462, 462, 795, 1583, 29889, 7099, 6119, 29892, 13, 462, 462, 795, 1369, 29918, 6979, 29892, 13, 462, 462, 795, 1095, 29918, 6979, 29892, 13, 462, 462, 795, 4236, 29918, 2435, 29897, 13, 13, 4706, 1583, 29889, 8149, 29918, 7099, 3689, 353, 1583, 29889, 842, 29918, 8149, 29918, 7099, 3689, 580, 13, 4706, 1583, 29889, 27711, 353, 8500, 29918, 7979, 7584, 13, 4706, 1583, 29889, 7099, 3689, 29918, 710, 8963, 353, 1583, 29889, 7979, 7584, 29918, 7099, 6119, 13, 4706, 1583, 29889, 8977, 29918, 7529, 353, 8853, 915, 314, 1115, 8853, 915, 314, 29918, 2311, 1115, 29871, 29955, 1118, 13, 462, 9651, 376, 29876, 1682, 280, 375, 1115, 8853, 3332, 29918, 29886, 1115, 29871, 29900, 29889, 29929, 29945, 29892, 376, 12863, 1535, 1115, 29871, 29896, 1118, 13, 462, 9651, 500, 13, 4706, 1583, 29889, 26740, 29918, 4906, 353, 7700, 13, 4706, 1583, 29889, 26740, 29918, 517, 29918, 3167, 353, 6213, 13, 4706, 1583, 29889, 7099, 3689, 29918, 1853, 353, 376, 7979, 7584, 29908, 13, 13, 4706, 732, 1311, 29889, 29933, 2891, 29889, 14035, 29918, 1972, 29918, 13789, 29898, 9891, 29922, 2892, 1246, 29901, 5852, 29897, 13, 4706, 822, 6939, 29918, 24602, 29898, 4804, 1125, 13, 9651, 565, 1246, 29889, 1272, 297, 6024, 915, 314, 742, 525, 29876, 1682, 280, 375, 742, 525, 7979, 7584, 2033, 29901, 13, 18884, 565, 1246, 29889, 1272, 1275, 525, 915, 314, 2396, 13, 462, 1678, 1583, 29889, 27711, 353, 8500, 29918, 915, 314, 13, 462, 1678, 1583, 29889, 7099, 3689, 29918, 710, 8963, 353, 1583, 29889, 915, 314, 29918, 7099, 6119, 13, 18884, 25342, 1246, 29889, 1272, 1275, 525, 29876, 1682, 280, 375, 2396, 13, 462, 1678, 1583, 29889, 27711, 353, 8500, 29918, 29876, 1682, 280, 375, 13, 462, 1678, 1583, 29889, 7099, 3689, 29918, 710, 8963, 353, 1583, 29889, 29876, 1682, 280, 375, 29918, 7099, 6119, 13, 18884, 25342, 1246, 29889, 1272, 1275, 525, 7979, 7584, 2396, 13, 462, 1678, 1583, 29889, 27711, 353, 8500, 29918, 7979, 7584, 13, 462, 1678, 1583, 29889, 7099, 3689, 29918, 710, 8963, 353, 1583, 29889, 7979, 7584, 29918, 7099, 6119, 13, 13, 18884, 1583, 29889, 7099, 3689, 29918, 1853, 353, 1246, 29889, 1272, 13, 9651, 1683, 29901, 13, 18884, 1583, 29889, 26740, 29918, 517, 29918, 3167, 353, 1246, 29889, 1272, 13, 13, 4706, 732, 1311, 29889, 29933, 2891, 29889, 4906, 29918, 13789, 29898, 3051, 29918, 8768, 29922, 1839, 726, 7464, 13, 462, 462, 29871, 1723, 13, 4706, 822, 8908, 29898, 4906, 1125, 13, 9651, 565, 2643, 29889, 726, 1275, 5591, 8477, 1115, 13, 18884, 1583, 29889, 29933, 2891, 29889, 6717, 29918, 4906, 29898, 4906, 29889, 3166, 29918, 1792, 29889, 333, 29892, 13, 462, 462, 418, 376, 10994, 29889, 512, 1797, 304, 1369, 278, 9225, 3113, 2436, 847, 2962, 23157, 13, 9651, 25342, 2643, 29889, 726, 1275, 5591, 2962, 29908, 470, 2643, 29889, 726, 1275, 5591, 21803, 1115, 13, 18884, 1583, 29889, 29933, 2891, 29889, 6717, 29918, 4906, 29898, 4906, 29889, 3166, 29918, 1792, 29889, 333, 29892, 13, 462, 462, 418, 376, 12148, 6755, 1134, 310, 1602, 3689, 322, 769, 1369, 278, 14983, 19602, 13, 462, 462, 418, 8908, 29918, 3502, 786, 29922, 1311, 29889, 8149, 29918, 7099, 3689, 29897, 13, 9651, 25342, 2643, 29889, 726, 1275, 5591, 4294, 29918, 4381, 1115, 13, 18884, 565, 1583, 29889, 7099, 3689, 29918, 1853, 2804, 525, 7979, 7584, 2396, 13, 462, 1678, 1583, 29889, 29933, 2891, 29889, 6717, 29918, 4906, 29898, 4906, 29889, 3166, 29918, 1792, 29889, 333, 29892, 13, 462, 462, 3986, 376, 4592, 6055, 363, 1304, 1602, 3689, 13705, 21313, 29900, 1800, 526, 278, 1494, 584, 426, 29896, 5038, 320, 13, 462, 462, 3986, 869, 4830, 29898, 1311, 29889, 7099, 3689, 29918, 1853, 29892, 1583, 29889, 8977, 29918, 7529, 29961, 1311, 29889, 7099, 3689, 29918, 1853, 12622, 13, 18884, 1683, 29901, 13, 462, 1678, 1583, 29889, 29933, 2891, 29889, 6717, 29918, 4906, 29898, 4906, 29889, 3166, 29918, 1792, 29889, 333, 29892, 376, 3782, 6055, 363, 1395, 7584, 1602, 3689, 1159, 13, 9651, 25342, 2643, 29889, 726, 1275, 8207, 3167, 29918, 4381, 2396, 13, 18884, 565, 1583, 29889, 7099, 3689, 29918, 1853, 2804, 525, 7979, 7584, 2396, 13, 462, 1678, 12247, 353, 1583, 29889, 842, 29918, 8149, 29918, 6768, 580, 13, 462, 1678, 1583, 29889, 29933, 2891, 29889, 6717, 29918, 4906, 29898, 4906, 29889, 3166, 29918, 1792, 29889, 333, 29892, 13, 462, 462, 3986, 376, 12148, 6755, 278, 3443, 304, 1735, 322, 2436, 278, 716, 995, 19602, 13, 462, 462, 3986, 8908, 29918, 3502, 786, 29922, 1989, 3377, 29897, 13, 462, 1678, 1583, 29889, 26740, 29918, 4906, 353, 5852, 13, 18884, 1683, 29901, 13, 462, 1678, 1583, 29889, 29933, 2891, 29889, 6717, 29918, 4906, 29898, 4906, 29889, 3166, 29918, 1792, 29889, 333, 29892, 376, 3782, 6055, 363, 1395, 7584, 1602, 3689, 23157, 13, 13, 9651, 25342, 1583, 29889, 26740, 29918, 4906, 29901, 13, 18884, 1018, 29901, 13, 462, 1678, 1828, 353, 5785, 29898, 4906, 29889, 726, 29897, 13, 18884, 5174, 8960, 408, 321, 29901, 13, 462, 1678, 1828, 353, 6213, 13, 13, 18884, 565, 1828, 29901, 13, 462, 1678, 2847, 29918, 3207, 353, 1828, 13, 462, 1678, 1828, 353, 4236, 29898, 3207, 29892, 29871, 29900, 29897, 13, 462, 1678, 565, 1583, 29889, 7099, 3689, 29918, 1853, 1275, 525, 29876, 1682, 280, 375, 2396, 13, 462, 4706, 1828, 353, 1375, 29898, 3207, 29892, 29871, 29896, 29889, 29900, 29897, 13, 462, 4706, 1828, 353, 4236, 29898, 3207, 29892, 29871, 29900, 29889, 29896, 29897, 13, 462, 1678, 1683, 29901, 13, 462, 4706, 1828, 353, 4236, 29898, 524, 29898, 3207, 511, 29871, 29906, 29897, 13, 462, 1678, 1583, 29889, 8977, 29918, 7529, 29961, 1311, 29889, 7099, 3689, 29918, 1853, 3816, 1311, 29889, 26740, 29918, 517, 29918, 3167, 29962, 353, 1828, 13, 462, 1678, 565, 2847, 29918, 3207, 2804, 1828, 29901, 13, 462, 4706, 1583, 29889, 29933, 2891, 29889, 6717, 29918, 4906, 29898, 4906, 29889, 3166, 29918, 1792, 29889, 333, 29892, 376, 14191, 3730, 731, 995, 310, 426, 29900, 29913, 376, 13, 462, 462, 462, 462, 1678, 376, 1454, 1828, 426, 29896, 1836, 376, 13, 462, 462, 462, 462, 1678, 376, 15514, 1828, 4502, 491, 1404, 21313, 29896, 29913, 3790, 29906, 1800, 376, 13, 462, 462, 462, 462, 1678, 376, 11102, 3939, 304, 13734, 11938, 29889, 11393, 4830, 29898, 3207, 29892, 13, 462, 462, 462, 462, 462, 462, 795, 1583, 29889, 26740, 29918, 517, 29918, 3167, 29892, 13, 462, 462, 462, 462, 462, 462, 795, 2847, 29918, 3207, 876, 13, 462, 1678, 1683, 29901, 13, 462, 4706, 1583, 29889, 29933, 2891, 29889, 6717, 29918, 4906, 29898, 4906, 29889, 3166, 29918, 1792, 29889, 333, 29892, 376, 14191, 3730, 731, 995, 310, 426, 29900, 29913, 376, 13, 462, 462, 462, 462, 1678, 376, 1454, 1828, 426, 29896, 29913, 1642, 4830, 29898, 3207, 29892, 13, 462, 462, 462, 462, 462, 965, 1583, 29889, 26740, 29918, 517, 29918, 3167, 876, 13, 18884, 1683, 29901, 13, 462, 1678, 1583, 29889, 29933, 2891, 29889, 6717, 29918, 4906, 29898, 4906, 29889, 3166, 29918, 1792, 29889, 333, 29892, 376, 1576, 1059, 10761, 29892, 3113, 1018, 1449, 411, 376, 13, 462, 462, 462, 18884, 376, 6519, 847, 3167, 29918, 4381, 29889, 16521, 13, 13, 18884, 1583, 29889, 26740, 29918, 4906, 353, 7700, 13, 9651, 1683, 29901, 13, 18884, 19356, 29918, 18616, 663, 353, 1889, 29918, 18616, 663, 29898, 4906, 29889, 726, 29892, 1583, 29889, 6979, 29918, 20698, 29892, 13, 462, 462, 462, 418, 4236, 29918, 2435, 29922, 1311, 29889, 3317, 29918, 2435, 29897, 13, 18884, 565, 1583, 29889, 7099, 3689, 29918, 1853, 1275, 525, 915, 314, 2396, 13, 462, 1678, 1121, 353, 1583, 29889, 27711, 29898, 1311, 29889, 7099, 3689, 29918, 710, 8963, 29892, 19356, 29918, 18616, 663, 29892, 13, 462, 462, 3986, 1583, 29889, 262, 3901, 29918, 6979, 29918, 20698, 29892, 13, 462, 462, 3986, 22913, 29918, 2311, 29922, 1311, 29889, 8977, 29918, 7529, 29961, 1311, 29889, 7099, 3689, 29918, 1853, 22322, 915, 314, 29918, 2311, 11287, 13, 18884, 25342, 1583, 29889, 7099, 3689, 29918, 1853, 1275, 525, 29876, 1682, 280, 375, 2396, 13, 462, 1678, 1121, 353, 1583, 29889, 27711, 29898, 1311, 29889, 7099, 3689, 29918, 710, 8963, 29892, 19356, 29918, 18616, 663, 29892, 13, 462, 462, 3986, 1583, 29889, 262, 3901, 29918, 6979, 29918, 20698, 29892, 13, 462, 462, 3986, 2246, 29918, 29886, 29922, 1311, 29889, 8977, 29918, 7529, 29961, 1311, 29889, 7099, 3689, 29918, 1853, 22322, 3332, 29918, 29886, 7464, 13, 462, 462, 3986, 10430, 29922, 1311, 29889, 8977, 29918, 7529, 29961, 1311, 29889, 7099, 3689, 29918, 1853, 22322, 12863, 1535, 11287, 13, 18884, 1683, 29901, 13, 462, 1678, 1121, 353, 1583, 29889, 27711, 29898, 1311, 29889, 7099, 3689, 29918, 710, 8963, 29892, 19356, 29918, 18616, 663, 29892, 13, 462, 462, 3986, 1583, 29889, 262, 3901, 29918, 6979, 29918, 20698, 29897, 13, 13, 18884, 1583, 29889, 29933, 2891, 29889, 6717, 29918, 4906, 29898, 4906, 29889, 3166, 29918, 1792, 29889, 333, 29892, 1121, 29897, 13, 13, 1678, 822, 731, 29918, 8149, 29918, 7099, 3689, 29898, 1311, 1125, 13, 4706, 12247, 353, 4072, 29889, 797, 1220, 2558, 3377, 9802, 786, 580, 13, 13, 4706, 1820, 29918, 915, 314, 353, 4072, 29889, 797, 1220, 2558, 3377, 3125, 29898, 726, 2433, 3629, 314, 2740, 1602, 6119, 742, 13, 462, 462, 795, 6939, 29918, 1272, 2433, 915, 314, 1495, 13, 13, 4706, 12247, 29889, 1202, 29898, 1989, 29918, 915, 314, 29897, 13, 13, 4706, 1820, 29918, 29876, 1682, 280, 375, 353, 4072, 29889, 797, 1220, 2558, 3377, 3125, 29898, 726, 2433, 29940, 1682, 280, 375, 1602, 6119, 742, 13, 462, 462, 462, 6939, 29918, 1272, 2433, 29876, 1682, 280, 375, 1495, 13, 13, 4706, 12247, 29889, 1202, 29898, 1989, 29918, 29876, 1682, 280, 375, 29897, 13, 13, 4706, 1820, 29918, 7979, 7584, 353, 4072, 29889, 797, 1220, 2558, 3377, 3125, 29898, 726, 2433, 25120, 7584, 1602, 6119, 742, 13, 462, 462, 18884, 6939, 29918, 1272, 2433, 7979, 7584, 1495, 13, 4706, 12247, 29889, 1202, 29898, 1989, 29918, 7979, 7584, 29897, 13, 13, 4706, 736, 12247, 13, 13, 1678, 822, 731, 29918, 8149, 29918, 6768, 29898, 1311, 1125, 13, 4706, 12247, 353, 4072, 29889, 797, 1220, 2558, 3377, 9802, 786, 580, 13, 4706, 1950, 29918, 8149, 353, 1583, 29889, 8977, 29918, 7529, 29961, 1311, 29889, 7099, 3689, 29918, 1853, 29962, 13, 4706, 363, 1820, 297, 1950, 29918, 8149, 29889, 8149, 7295, 13, 9651, 12247, 29889, 1202, 29898, 8768, 29889, 797, 1220, 2558, 3377, 3125, 29898, 726, 29922, 1989, 29892, 13, 462, 462, 462, 1678, 6939, 29918, 1272, 29922, 1989, 876, 13, 4706, 736, 12247, 13, 13, 1678, 822, 1369, 29898, 1311, 1125, 13, 4706, 1583, 29889, 29933, 2891, 29889, 3733, 1847, 29898, 9290, 29918, 9847, 29922, 5574, 29892, 7292, 29922, 29900, 29897, 13, 2 ]
01_aat-ebook-full-source-code-20160430/chapter4/bayes-binomial-mcmc.py
UpSea/midProjects
1
101134
import matplotlib.pyplot as plt import numpy as np import pymc3 import scipy.stats as stats plt.style.use("ggplot") # Parameter values for prior and analytic posterior n = 50 z = 10 alpha = 12 beta = 12 alpha_post = 22 beta_post = 52 # How many samples to carry out for MCMC iterations = 100000 # Use PyMC3 to construct a model context basic_model = pymc3.Model() with basic_model: # Define our prior belief about the fairness # of the coin using a Beta distribution theta = pymc3.Beta("theta", alpha=alpha, beta=beta) # Define the Bernoulli likelihood function y = pymc3.Binomial("y", n=n, p=theta, observed=z) # Carry out the MCMC analysis using the Metropolis algorithm # Use Maximum A Posteriori (MAP) optimisation as initial value for MCMC start = pymc3.find_MAP() # Use the Metropolis algorithm (as opposed to NUTS or HMC, etc.) step = pymc3.Metropolis() # Calculate the trace trace = pymc3.sample(iterations, step, start, random_seed=1, progressbar=True) # Plot the posterior histogram from MCMC analysis bins=50 plt.hist( trace["theta"], bins, histtype="step", normed=True, label="Posterior (MCMC)", color="red" ) # Plot the analytic prior and posterior beta distributions x = np.linspace(0, 1, 100) plt.plot( x, stats.beta.pdf(x, alpha, beta), "--", label="Prior", color="blue" ) plt.plot( x, stats.beta.pdf(x, alpha_post, beta_post), label='Posterior (Analytic)', color="green" ) # Update the graph labels plt.legend(title="Parameters", loc="best") plt.xlabel("$\\theta$, Fairness") plt.ylabel("Density") plt.show() # Show the trace plot pymc3.traceplot(trace) plt.show()
[ 1, 1053, 22889, 29889, 2272, 5317, 408, 14770, 13, 5215, 12655, 408, 7442, 13, 5215, 282, 962, 29883, 29941, 13, 5215, 4560, 2272, 29889, 16202, 408, 22663, 13, 13, 572, 29873, 29889, 3293, 29889, 1509, 703, 1505, 5317, 1159, 13, 13, 29937, 24953, 1819, 363, 7536, 322, 16114, 293, 13446, 13, 29876, 353, 29871, 29945, 29900, 13, 29920, 353, 29871, 29896, 29900, 13, 2312, 353, 29871, 29896, 29906, 13, 3571, 353, 29871, 29896, 29906, 13, 2312, 29918, 2490, 353, 29871, 29906, 29906, 13, 3571, 29918, 2490, 353, 29871, 29945, 29906, 13, 13, 29937, 1128, 1784, 11916, 304, 8677, 714, 363, 21271, 12513, 13, 1524, 800, 353, 29871, 29896, 29900, 29900, 29900, 29900, 29900, 13, 13, 29937, 4803, 10772, 12513, 29941, 304, 3386, 263, 1904, 3030, 13, 16121, 29918, 4299, 353, 282, 962, 29883, 29941, 29889, 3195, 580, 13, 2541, 6996, 29918, 4299, 29901, 13, 1678, 396, 22402, 1749, 7536, 17750, 1048, 278, 6534, 2264, 13, 1678, 396, 310, 278, 19480, 773, 263, 350, 1187, 4978, 13, 1678, 278, 941, 353, 282, 962, 29883, 29941, 29889, 29933, 1187, 703, 3416, 613, 15595, 29922, 2312, 29892, 21762, 29922, 3571, 29897, 13, 13, 1678, 396, 22402, 278, 6209, 5059, 492, 4188, 22342, 740, 13, 1678, 343, 353, 282, 962, 29883, 29941, 29889, 29933, 262, 7615, 703, 29891, 613, 302, 29922, 29876, 29892, 282, 29922, 3416, 29892, 8900, 29922, 29920, 29897, 13, 13, 1678, 396, 1704, 719, 714, 278, 21271, 12513, 7418, 773, 278, 19110, 275, 5687, 13, 1678, 396, 4803, 5918, 12539, 319, 4918, 261, 1611, 29875, 313, 23827, 29897, 5994, 4371, 408, 2847, 995, 363, 21271, 12513, 13, 1678, 1369, 353, 282, 962, 29883, 29941, 29889, 2886, 29918, 23827, 580, 29871, 13, 13, 1678, 396, 4803, 278, 19110, 275, 5687, 313, 294, 15869, 304, 405, 2692, 29903, 470, 379, 12513, 29892, 2992, 1846, 13, 1678, 4331, 353, 282, 962, 29883, 29941, 29889, 10095, 10759, 275, 580, 13, 13, 1678, 396, 20535, 403, 278, 9637, 13, 1678, 9637, 353, 282, 962, 29883, 29941, 29889, 11249, 29898, 1524, 800, 29892, 4331, 29892, 1369, 29892, 4036, 29918, 26776, 29922, 29896, 29892, 6728, 1646, 29922, 5574, 29897, 13, 13, 29937, 18399, 278, 13446, 9825, 13342, 515, 21271, 12513, 7418, 13, 29890, 1144, 29922, 29945, 29900, 13, 572, 29873, 29889, 29882, 391, 29898, 13, 1678, 9637, 3366, 3416, 12436, 289, 1144, 29892, 29871, 13, 1678, 9825, 1853, 543, 10568, 613, 6056, 287, 29922, 5574, 29892, 29871, 13, 1678, 3858, 543, 6747, 261, 1611, 313, 12513, 12513, 19123, 2927, 543, 1127, 29908, 13, 29897, 13, 13, 29937, 18399, 278, 16114, 293, 7536, 322, 13446, 21762, 18822, 13, 29916, 353, 7442, 29889, 1915, 3493, 29898, 29900, 29892, 29871, 29896, 29892, 29871, 29896, 29900, 29900, 29897, 13, 572, 29873, 29889, 5317, 29898, 13, 1678, 921, 29892, 22663, 29889, 3571, 29889, 5140, 29898, 29916, 29892, 15595, 29892, 21762, 511, 29871, 13, 1678, 376, 489, 613, 3858, 543, 29925, 13479, 613, 2927, 543, 9539, 29908, 13, 29897, 13, 572, 29873, 29889, 5317, 29898, 13, 1678, 921, 29892, 22663, 29889, 3571, 29889, 5140, 29898, 29916, 29892, 15595, 29918, 2490, 29892, 21762, 29918, 2490, 511, 29871, 13, 1678, 3858, 2433, 6747, 261, 1611, 313, 21067, 3637, 293, 29897, 742, 2927, 543, 12692, 29908, 13, 29897, 13, 13, 29937, 10318, 278, 3983, 11073, 13, 572, 29873, 29889, 26172, 29898, 3257, 543, 11507, 613, 1180, 543, 13318, 1159, 13, 572, 29873, 29889, 29916, 1643, 703, 29938, 1966, 3416, 1628, 13822, 2264, 1159, 13, 572, 29873, 29889, 29891, 1643, 703, 29928, 575, 537, 1159, 13, 572, 29873, 29889, 4294, 580, 13, 13, 29937, 7704, 278, 9637, 6492, 13, 29886, 962, 29883, 29941, 29889, 15003, 5317, 29898, 15003, 29897, 13, 572, 29873, 29889, 4294, 580, 13, 2 ]
utils/files.py
sno2/Payment-Processor
80
171124
<filename>utils/files.py import csv import json def read_csv(*, file): """ Read CSV file as list of dictionaries """ results = [] with open(file) as f: f_csv = csv.DictReader(f) for row in f_csv: results.append(row) return results def write_json(*, file, data): """ Write JSON file """ with open(file, 'w') as f: json.dump(data, f, indent=2)
[ 1, 529, 9507, 29958, 13239, 29914, 5325, 29889, 2272, 13, 5215, 11799, 13, 5215, 4390, 13, 13, 13, 1753, 1303, 29918, 7638, 10456, 29892, 934, 1125, 13, 1678, 9995, 13, 1678, 7523, 16874, 934, 408, 1051, 310, 21503, 4314, 13, 1678, 9995, 13, 13, 1678, 2582, 353, 5159, 13, 1678, 411, 1722, 29898, 1445, 29897, 408, 285, 29901, 13, 4706, 285, 29918, 7638, 353, 11799, 29889, 21533, 6982, 29898, 29888, 29897, 13, 4706, 363, 1948, 297, 285, 29918, 7638, 29901, 13, 9651, 2582, 29889, 4397, 29898, 798, 29897, 13, 1678, 736, 2582, 13, 13, 13, 1753, 2436, 29918, 3126, 10456, 29892, 934, 29892, 848, 1125, 13, 1678, 9995, 13, 1678, 14350, 4663, 934, 13, 1678, 9995, 13, 13, 1678, 411, 1722, 29898, 1445, 29892, 525, 29893, 1495, 408, 285, 29901, 13, 4706, 4390, 29889, 15070, 29898, 1272, 29892, 285, 29892, 29536, 29922, 29906, 29897, 13, 2 ]
src/rogerthat/utils/base65.py
goubertbrent/oca-backend
0
78559
# -*- coding: utf-8 -*- # Copyright 2020 Green Valley Belgium NV # # 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. # # @@license_version:1.7@@ # Outcome of this encoding is url-friendly and does not have to be url-encoded # resulting in shorter urls in sms messages from mcfw.rpc import arguments, returns try: from cStringIO import StringIO except ImportError: from StringIO import StringIO _BASE65_MAPPING = "-.1032547698ACBEDGFIHKJMLONQPSRUTWVYXZ_acbedgfihkjmlonqpsrutwvyxz" def _init_reverse_mapping(): rm = [None for _ in xrange(256)] i = 0 for c in _BASE65_MAPPING: rm[ord(c)] = i i += 1 return rm _BASE65_REVERSE_MAPPING = _init_reverse_mapping() del _init_reverse_mapping @returns(str) @arguments(val=int) def encode_int(val): res = StringIO() while val > 0: res.write(_BASE65_MAPPING[val % 65]) val /= 65 return res.getvalue() @returns(int) @arguments(val=str) def decode_int(val): res = 0 val = list(val) val.reverse() for c in val: res = _BASE65_REVERSE_MAPPING[ord(c)] + res * 65 return res
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 29937, 14187, 1266, 29871, 29906, 29900, 29906, 29900, 7646, 13939, 9923, 1974, 405, 29963, 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, 29937, 13, 29937, 732, 29992, 506, 1947, 29918, 3259, 29901, 29896, 29889, 29955, 25380, 13, 13, 29937, 4451, 2763, 310, 445, 8025, 338, 3142, 29899, 18326, 368, 322, 947, 451, 505, 304, 367, 3142, 29899, 26716, 13, 29937, 9819, 297, 20511, 23942, 297, 269, 1516, 7191, 13, 13, 3166, 286, 6854, 29893, 29889, 29878, 6739, 1053, 6273, 29892, 3639, 13, 13, 13, 2202, 29901, 13, 1678, 515, 274, 1231, 5971, 1053, 1714, 5971, 13, 19499, 16032, 2392, 29901, 13, 1678, 515, 1714, 5971, 1053, 1714, 5971, 13, 13, 29918, 25416, 29953, 29945, 29918, 1529, 18009, 4214, 353, 11663, 29889, 29896, 29900, 29941, 29906, 29945, 29946, 29955, 29953, 29929, 29947, 2477, 29933, 3352, 29954, 3738, 29950, 29968, 29967, 1988, 1164, 29984, 7024, 29934, 2692, 29956, 29963, 29979, 29990, 29999, 29918, 562, 2580, 29887, 29888, 4861, 29895, 29926, 828, 265, 29939, 567, 23798, 29893, 13308, 29916, 29920, 29908, 13, 1753, 903, 2344, 29918, 24244, 29918, 20698, 7295, 13, 1678, 20241, 353, 518, 8516, 363, 903, 297, 921, 3881, 29898, 29906, 29945, 29953, 4638, 13, 1678, 474, 353, 29871, 29900, 13, 1678, 363, 274, 297, 903, 25416, 29953, 29945, 29918, 1529, 18009, 4214, 29901, 13, 4706, 20241, 29961, 536, 29898, 29883, 4638, 353, 474, 13, 4706, 474, 4619, 29871, 29896, 13, 1678, 736, 20241, 13, 29918, 25416, 29953, 29945, 29918, 1525, 5348, 1660, 29918, 1529, 18009, 4214, 353, 903, 2344, 29918, 24244, 29918, 20698, 580, 13, 6144, 903, 2344, 29918, 24244, 29918, 20698, 13, 13, 29992, 18280, 29898, 710, 29897, 13, 29992, 25699, 29898, 791, 29922, 524, 29897, 13, 1753, 19750, 29918, 524, 29898, 791, 1125, 13, 1678, 620, 353, 1714, 5971, 580, 13, 1678, 1550, 659, 1405, 29871, 29900, 29901, 13, 4706, 620, 29889, 3539, 7373, 25416, 29953, 29945, 29918, 1529, 18009, 4214, 29961, 791, 1273, 29871, 29953, 29945, 2314, 13, 4706, 659, 847, 29922, 29871, 29953, 29945, 13, 1678, 736, 620, 29889, 657, 1767, 580, 13, 13, 29992, 18280, 29898, 524, 29897, 13, 29992, 25699, 29898, 791, 29922, 710, 29897, 13, 1753, 21822, 29918, 524, 29898, 791, 1125, 13, 1678, 620, 353, 29871, 29900, 13, 1678, 659, 353, 1051, 29898, 791, 29897, 13, 1678, 659, 29889, 24244, 580, 13, 1678, 363, 274, 297, 659, 29901, 13, 4706, 620, 353, 903, 25416, 29953, 29945, 29918, 1525, 5348, 1660, 29918, 1529, 18009, 4214, 29961, 536, 29898, 29883, 4638, 718, 620, 334, 29871, 29953, 29945, 13, 1678, 736, 620, 13, 2 ]
slaid/classifiers/__init__.py
mdrio/slaid
0
94829
from slaid.classifiers.base import *
[ 1, 515, 8370, 333, 29889, 1990, 14903, 29889, 3188, 1053, 334, 13, 2 ]
ArtGAN/data/ingest_stl10.py
rh01/caffe-model-for-category-artgan
304
29815
from configargparse import ArgParser from PIL import Image import logging import numpy as np import os def transform_and_save(img_arr, output_filename): """ Takes an image and optionally transforms it and then writes it out to output_filename """ img = Image.fromarray(img_arr) img.save(output_filename) class Ingest(object): def __init__(self, input_dir, out_dir, target_size=96, skipimg=False): np.random.seed(0) self.skipimg = skipimg self.out_dir = out_dir self.input_dir = input_dir self.manifests = dict() for setn in ('train', 'val'): self.manifests[setn] = os.path.join(self.out_dir, '{}-index.csv'.format(setn)) self.target_size = target_size self.trainpairlist = {} self.valpairlist = {} self.labels = range(10) if not os.path.exists(self.out_dir): os.mkdir(self.out_dir) self.outimgdir = os.path.join(self.out_dir, 'images') if not os.path.exists(self.outimgdir): os.mkdir(self.outimgdir) os.mkdir(os.path.join(self.outimgdir, 'train')) os.mkdir(os.path.join(self.outimgdir, 'val')) self.outlabeldir = os.path.join(self.out_dir, 'labels') if not os.path.exists(self.outlabeldir): os.mkdir(self.outlabeldir) def collectdata(self,): print 'Start Collect Data...' train_x_path = os.path.join(self.input_dir, 'train_X.bin') train_y_path = os.path.join(self.input_dir, 'train_y.bin') test_x_path = os.path.join(self.input_dir, 'test_X.bin') test_y_path = os.path.join(self.input_dir, 'test_y.bin') train_xf = open(train_x_path, 'rb') train_x = np.fromfile(train_xf, dtype=np.uint8) train_x = np.reshape(train_x, (-1, 3, 96, 96)) train_x = np.transpose(train_x, (0, 3, 2, 1)) train_yf = open(train_y_path, 'rb') train_y = np.fromfile(train_yf, dtype=np.uint8) test_xf = open(test_x_path, 'rb') test_x = np.fromfile(test_xf, dtype=np.uint8) test_x = np.reshape(test_x, (-1, 3, 96, 96)) test_x = np.transpose(test_x, (0, 3, 2, 1)) test_yf = open(test_y_path, 'rb') test_y = np.fromfile(test_yf, dtype=np.uint8) idx = np.zeros(10, dtype=np.int) for i in xrange(train_x.shape[0]): outdir = os.path.join(self.outimgdir, 'train', str(train_y[i]-1)) if not os.path.exists(outdir): os.mkdir(outdir) if not self.skipimg: transform_and_save(img_arr=train_x[i], output_filename=os.path.join(outdir, str(idx[train_y[i]-1]) + '.jpg')) self.trainpairlist[os.path.join('images', 'train', str(train_y[i]-1), str(idx[train_y[i]-1]) + '.jpg')] = \ os.path.join('labels', str(train_y[i] - 1) + '.txt') idx[train_y[i]-1] += 1 idx = np.zeros(10, dtype=np.int) for i in xrange(test_x.shape[0]): outdir = os.path.join(self.outimgdir, 'val', str(test_y[i]-1)) if not os.path.exists(outdir): os.mkdir(outdir) if not self.skipimg: transform_and_save(img_arr=test_x[i], output_filename=os.path.join(outdir, str(idx[test_y[i]-1]) + '.jpg')) self.valpairlist[os.path.join('images', 'val', str(test_y[i]-1), str(idx[test_y[i]-1]) + '.jpg')] = \ os.path.join('labels', str(test_y[i] - 1) + '.txt') idx[test_y[i]-1] += 1 print 'Finished Collect Data...' def write_label(self, ): for i, l in enumerate(self.labels): sdir = os.path.join(self.outlabeldir, str(i) + '.txt') np.savetxt(sdir, [l], '%d') def run(self): """ resize images then write manifest files to disk. """ self.write_label() self.collectdata() records = [(fname, tgt) for fname, tgt in self.trainpairlist.items()] np.savetxt(self.manifests['train'], records, fmt='%s,%s') records = [(fname, tgt) for fname, tgt in self.valpairlist.items()] np.savetxt(self.manifests['val'], records, fmt='%s,%s') class IngestUnlabeled(object): def __init__(self, input_dir, out_dir, target_size=96, skipimg=False): np.random.seed(0) self.skipimg = skipimg self.out_dir = out_dir self.input_dir = input_dir self.manifests = dict() self.manifests = os.path.join(self.out_dir, 'unlabeled-index.csv') self.target_size = target_size self.trainpairlist = {} if not os.path.exists(self.out_dir): os.mkdir(self.out_dir) self.outimgdir = os.path.join(self.out_dir, 'images') if not os.path.exists(self.outimgdir): os.mkdir(self.outimgdir) self.unlabeldir = os.path.join(self.outimgdir, 'unlabeled') if not os.path.exists(self.unlabeldir): os.mkdir(self.unlabeldir) def collectdata(self,): print 'Start Collect Data...' train_x_path = os.path.join(self.input_dir, 'unlabeled_X.bin') train_xf = open(train_x_path, 'rb') train_x = np.fromfile(train_xf, dtype=np.uint8) train_x = np.reshape(train_x, (-1, 3, 96, 96)) train_x = np.transpose(train_x, (0, 3, 2, 1)) idx = 0 for i in xrange(train_x.shape[0]): if not self.skipimg: transform_and_save(img_arr=train_x[i], output_filename=os.path.join(self.unlabeldir, str(idx) + '.jpg')) self.trainpairlist[os.path.join('images', 'unlabeled', str(idx) + '.jpg')] = 'labels/11.txt' idx += 1 print 'Finished Collect Data...' def write_label(self, ): sdir = os.path.join(self.out_dir, 'labels', '11.txt') np.savetxt(sdir, [11], '%d') def run(self): """ resize images then write manifest files to disk. """ self.write_label() self.collectdata() records = [(fname, tgt) for fname, tgt in self.trainpairlist.items()] np.savetxt(self.manifests, records, fmt='%s,%s') if __name__ == "__main__": parser = ArgParser() parser.add_argument('--input_dir', help='Directory to find input', default='/hdd/Dataset/STL10') parser.add_argument('--out_dir', help='Directory to write ingested files', default='/home/william/PyProjects/TFcodes/dataset/stl10') parser.add_argument('--target_size', type=int, default=96, help='Size in pixels to scale shortest side DOWN to (0 means no scaling)') parser.add_argument('--skipImg', type=bool, default=False, help='True to skip processing and copying images') args = parser.parse_args() logger = logging.getLogger(__name__) bw = Ingest(input_dir=args.input_dir, out_dir=args.out_dir, target_size=args.target_size, skipimg=args.skipImg) # bw = IngestUnlabeled(input_dir=args.input_dir, out_dir=args.out_dir, target_size=args.target_size, skipimg=args.skipImg) bw.run()
[ 1, 515, 2295, 1191, 5510, 1053, 11842, 11726, 13, 3166, 349, 6227, 1053, 7084, 13, 5215, 12183, 13, 5215, 12655, 408, 7442, 13, 5215, 2897, 13, 13, 13, 1753, 4327, 29918, 392, 29918, 7620, 29898, 2492, 29918, 2749, 29892, 1962, 29918, 9507, 1125, 13, 1678, 9995, 13, 1678, 323, 6926, 385, 1967, 322, 2984, 635, 4327, 29879, 372, 322, 769, 15873, 372, 714, 304, 1962, 29918, 9507, 13, 1678, 9995, 13, 1678, 10153, 353, 7084, 29889, 3166, 2378, 29898, 2492, 29918, 2749, 29897, 13, 1678, 10153, 29889, 7620, 29898, 4905, 29918, 9507, 29897, 13, 13, 13, 1990, 512, 7118, 29898, 3318, 1125, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 1881, 29918, 3972, 29892, 714, 29918, 3972, 29892, 3646, 29918, 2311, 29922, 29929, 29953, 29892, 14383, 2492, 29922, 8824, 1125, 13, 4706, 7442, 29889, 8172, 29889, 26776, 29898, 29900, 29897, 13, 4706, 1583, 29889, 11014, 2492, 353, 14383, 2492, 13, 4706, 1583, 29889, 449, 29918, 3972, 353, 714, 29918, 3972, 13, 4706, 1583, 29889, 2080, 29918, 3972, 353, 1881, 29918, 3972, 13, 13, 4706, 1583, 29889, 29135, 29879, 353, 9657, 580, 13, 4706, 363, 731, 29876, 297, 6702, 14968, 742, 525, 791, 29374, 13, 9651, 1583, 29889, 29135, 29879, 29961, 842, 29876, 29962, 353, 2897, 29889, 2084, 29889, 7122, 29898, 1311, 29889, 449, 29918, 3972, 29892, 22372, 7402, 2248, 29889, 7638, 4286, 4830, 29898, 842, 29876, 876, 13, 13, 4706, 1583, 29889, 5182, 29918, 2311, 353, 3646, 29918, 2311, 13, 4706, 1583, 29889, 14968, 18784, 1761, 353, 6571, 13, 4706, 1583, 29889, 791, 18784, 1761, 353, 6571, 13, 4706, 1583, 29889, 21134, 353, 3464, 29898, 29896, 29900, 29897, 13, 13, 4706, 565, 451, 2897, 29889, 2084, 29889, 9933, 29898, 1311, 29889, 449, 29918, 3972, 1125, 13, 9651, 2897, 29889, 11256, 3972, 29898, 1311, 29889, 449, 29918, 3972, 29897, 13, 4706, 1583, 29889, 449, 2492, 3972, 353, 2897, 29889, 2084, 29889, 7122, 29898, 1311, 29889, 449, 29918, 3972, 29892, 525, 8346, 1495, 13, 4706, 565, 451, 2897, 29889, 2084, 29889, 9933, 29898, 1311, 29889, 449, 2492, 3972, 1125, 13, 9651, 2897, 29889, 11256, 3972, 29898, 1311, 29889, 449, 2492, 3972, 29897, 13, 9651, 2897, 29889, 11256, 3972, 29898, 359, 29889, 2084, 29889, 7122, 29898, 1311, 29889, 449, 2492, 3972, 29892, 525, 14968, 8785, 13, 9651, 2897, 29889, 11256, 3972, 29898, 359, 29889, 2084, 29889, 7122, 29898, 1311, 29889, 449, 2492, 3972, 29892, 525, 791, 8785, 13, 4706, 1583, 29889, 449, 1643, 3972, 353, 2897, 29889, 2084, 29889, 7122, 29898, 1311, 29889, 449, 29918, 3972, 29892, 525, 21134, 1495, 13, 4706, 565, 451, 2897, 29889, 2084, 29889, 9933, 29898, 1311, 29889, 449, 1643, 3972, 1125, 13, 9651, 2897, 29889, 11256, 3972, 29898, 1311, 29889, 449, 1643, 3972, 29897, 13, 13, 1678, 822, 6314, 1272, 29898, 1311, 29892, 1125, 13, 4706, 1596, 525, 4763, 24930, 3630, 856, 29915, 13, 13, 4706, 7945, 29918, 29916, 29918, 2084, 353, 2897, 29889, 2084, 29889, 7122, 29898, 1311, 29889, 2080, 29918, 3972, 29892, 525, 14968, 29918, 29990, 29889, 2109, 1495, 13, 4706, 7945, 29918, 29891, 29918, 2084, 353, 2897, 29889, 2084, 29889, 7122, 29898, 1311, 29889, 2080, 29918, 3972, 29892, 525, 14968, 29918, 29891, 29889, 2109, 1495, 13, 4706, 1243, 29918, 29916, 29918, 2084, 353, 2897, 29889, 2084, 29889, 7122, 29898, 1311, 29889, 2080, 29918, 3972, 29892, 525, 1688, 29918, 29990, 29889, 2109, 1495, 13, 4706, 1243, 29918, 29891, 29918, 2084, 353, 2897, 29889, 2084, 29889, 7122, 29898, 1311, 29889, 2080, 29918, 3972, 29892, 525, 1688, 29918, 29891, 29889, 2109, 1495, 13, 13, 4706, 7945, 29918, 24660, 353, 1722, 29898, 14968, 29918, 29916, 29918, 2084, 29892, 525, 6050, 1495, 13, 4706, 7945, 29918, 29916, 353, 7442, 29889, 3166, 1445, 29898, 14968, 29918, 24660, 29892, 26688, 29922, 9302, 29889, 13470, 29947, 29897, 13, 4706, 7945, 29918, 29916, 353, 7442, 29889, 690, 14443, 29898, 14968, 29918, 29916, 29892, 8521, 29896, 29892, 29871, 29941, 29892, 29871, 29929, 29953, 29892, 29871, 29929, 29953, 876, 13, 4706, 7945, 29918, 29916, 353, 7442, 29889, 3286, 4220, 29898, 14968, 29918, 29916, 29892, 313, 29900, 29892, 29871, 29941, 29892, 29871, 29906, 29892, 29871, 29896, 876, 13, 4706, 7945, 29918, 29891, 29888, 353, 1722, 29898, 14968, 29918, 29891, 29918, 2084, 29892, 525, 6050, 1495, 13, 4706, 7945, 29918, 29891, 353, 7442, 29889, 3166, 1445, 29898, 14968, 29918, 29891, 29888, 29892, 26688, 29922, 9302, 29889, 13470, 29947, 29897, 13, 13, 4706, 1243, 29918, 24660, 353, 1722, 29898, 1688, 29918, 29916, 29918, 2084, 29892, 525, 6050, 1495, 13, 4706, 1243, 29918, 29916, 353, 7442, 29889, 3166, 1445, 29898, 1688, 29918, 24660, 29892, 26688, 29922, 9302, 29889, 13470, 29947, 29897, 13, 4706, 1243, 29918, 29916, 353, 7442, 29889, 690, 14443, 29898, 1688, 29918, 29916, 29892, 8521, 29896, 29892, 29871, 29941, 29892, 29871, 29929, 29953, 29892, 29871, 29929, 29953, 876, 13, 4706, 1243, 29918, 29916, 353, 7442, 29889, 3286, 4220, 29898, 1688, 29918, 29916, 29892, 313, 29900, 29892, 29871, 29941, 29892, 29871, 29906, 29892, 29871, 29896, 876, 13, 4706, 1243, 29918, 29891, 29888, 353, 1722, 29898, 1688, 29918, 29891, 29918, 2084, 29892, 525, 6050, 1495, 13, 4706, 1243, 29918, 29891, 353, 7442, 29889, 3166, 1445, 29898, 1688, 29918, 29891, 29888, 29892, 26688, 29922, 9302, 29889, 13470, 29947, 29897, 13, 13, 4706, 22645, 353, 7442, 29889, 3298, 359, 29898, 29896, 29900, 29892, 26688, 29922, 9302, 29889, 524, 29897, 13, 4706, 363, 474, 297, 921, 3881, 29898, 14968, 29918, 29916, 29889, 12181, 29961, 29900, 29962, 1125, 13, 9651, 714, 3972, 353, 2897, 29889, 2084, 29889, 7122, 29898, 1311, 29889, 449, 2492, 3972, 29892, 525, 14968, 742, 851, 29898, 14968, 29918, 29891, 29961, 29875, 29962, 29899, 29896, 876, 13, 9651, 565, 451, 2897, 29889, 2084, 29889, 9933, 29898, 449, 3972, 1125, 13, 18884, 2897, 29889, 11256, 3972, 29898, 449, 3972, 29897, 13, 13, 9651, 565, 451, 1583, 29889, 11014, 2492, 29901, 13, 18884, 4327, 29918, 392, 29918, 7620, 29898, 2492, 29918, 2749, 29922, 14968, 29918, 29916, 29961, 29875, 1402, 1962, 29918, 9507, 29922, 359, 29889, 2084, 29889, 7122, 29898, 449, 3972, 29892, 851, 29898, 13140, 29961, 14968, 29918, 29891, 29961, 29875, 29962, 29899, 29896, 2314, 718, 15300, 6173, 8785, 13, 9651, 1583, 29889, 14968, 18784, 1761, 29961, 359, 29889, 2084, 29889, 7122, 877, 8346, 742, 525, 14968, 742, 851, 29898, 14968, 29918, 29891, 29961, 29875, 29962, 29899, 29896, 511, 851, 29898, 13140, 29961, 14968, 29918, 29891, 29961, 29875, 29962, 29899, 29896, 2314, 718, 15300, 6173, 1495, 29962, 353, 320, 13, 18884, 2897, 29889, 2084, 29889, 7122, 877, 21134, 742, 851, 29898, 14968, 29918, 29891, 29961, 29875, 29962, 448, 29871, 29896, 29897, 718, 15300, 3945, 1495, 13, 9651, 22645, 29961, 14968, 29918, 29891, 29961, 29875, 29962, 29899, 29896, 29962, 4619, 29871, 29896, 13, 13, 4706, 22645, 353, 7442, 29889, 3298, 359, 29898, 29896, 29900, 29892, 26688, 29922, 9302, 29889, 524, 29897, 13, 4706, 363, 474, 297, 921, 3881, 29898, 1688, 29918, 29916, 29889, 12181, 29961, 29900, 29962, 1125, 13, 9651, 714, 3972, 353, 2897, 29889, 2084, 29889, 7122, 29898, 1311, 29889, 449, 2492, 3972, 29892, 525, 791, 742, 851, 29898, 1688, 29918, 29891, 29961, 29875, 29962, 29899, 29896, 876, 13, 9651, 565, 451, 2897, 29889, 2084, 29889, 9933, 29898, 449, 3972, 1125, 13, 18884, 2897, 29889, 11256, 3972, 29898, 449, 3972, 29897, 13, 13, 9651, 565, 451, 1583, 29889, 11014, 2492, 29901, 13, 18884, 4327, 29918, 392, 29918, 7620, 29898, 2492, 29918, 2749, 29922, 1688, 29918, 29916, 29961, 29875, 1402, 13, 462, 462, 259, 1962, 29918, 9507, 29922, 359, 29889, 2084, 29889, 7122, 29898, 449, 3972, 29892, 851, 29898, 13140, 29961, 1688, 29918, 29891, 29961, 29875, 29962, 29899, 29896, 2314, 718, 15300, 6173, 8785, 13, 9651, 1583, 29889, 791, 18784, 1761, 29961, 359, 29889, 2084, 29889, 7122, 877, 8346, 742, 525, 791, 742, 851, 29898, 1688, 29918, 29891, 29961, 29875, 29962, 29899, 29896, 511, 851, 29898, 13140, 29961, 1688, 29918, 29891, 29961, 29875, 29962, 29899, 29896, 2314, 718, 15300, 6173, 1495, 29962, 353, 320, 13, 18884, 2897, 29889, 2084, 29889, 7122, 877, 21134, 742, 851, 29898, 1688, 29918, 29891, 29961, 29875, 29962, 448, 29871, 29896, 29897, 718, 15300, 3945, 1495, 13, 9651, 22645, 29961, 1688, 29918, 29891, 29961, 29875, 29962, 29899, 29896, 29962, 4619, 29871, 29896, 13, 13, 4706, 1596, 525, 12881, 3276, 24930, 3630, 856, 29915, 13, 13, 1678, 822, 2436, 29918, 1643, 29898, 1311, 29892, 29871, 1125, 13, 4706, 363, 474, 29892, 301, 297, 26985, 29898, 1311, 29889, 21134, 1125, 13, 9651, 269, 3972, 353, 2897, 29889, 2084, 29889, 7122, 29898, 1311, 29889, 449, 1643, 3972, 29892, 851, 29898, 29875, 29897, 718, 15300, 3945, 1495, 13, 9651, 7442, 29889, 29879, 485, 300, 486, 29898, 29879, 3972, 29892, 518, 29880, 1402, 14210, 29881, 1495, 13, 13, 1678, 822, 1065, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 19490, 4558, 769, 2436, 10419, 2066, 304, 8086, 29889, 13, 4706, 9995, 13, 4706, 1583, 29889, 3539, 29918, 1643, 580, 13, 4706, 1583, 29889, 15914, 1272, 580, 13, 13, 4706, 6475, 353, 17288, 29888, 978, 29892, 260, 4141, 29897, 13, 462, 259, 363, 285, 978, 29892, 260, 4141, 297, 1583, 29889, 14968, 18784, 1761, 29889, 7076, 580, 29962, 13, 4706, 7442, 29889, 29879, 485, 300, 486, 29898, 1311, 29889, 29135, 29879, 1839, 14968, 7464, 6475, 29892, 19200, 2433, 29995, 29879, 24163, 29879, 1495, 13, 13, 4706, 6475, 353, 17288, 29888, 978, 29892, 260, 4141, 29897, 13, 462, 259, 363, 285, 978, 29892, 260, 4141, 297, 1583, 29889, 791, 18784, 1761, 29889, 7076, 580, 29962, 13, 4706, 7442, 29889, 29879, 485, 300, 486, 29898, 1311, 29889, 29135, 29879, 1839, 791, 7464, 6475, 29892, 19200, 2433, 29995, 29879, 24163, 29879, 1495, 13, 13, 13, 1990, 512, 7118, 2525, 29880, 24025, 29898, 3318, 1125, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 1881, 29918, 3972, 29892, 714, 29918, 3972, 29892, 3646, 29918, 2311, 29922, 29929, 29953, 29892, 14383, 2492, 29922, 8824, 1125, 13, 4706, 7442, 29889, 8172, 29889, 26776, 29898, 29900, 29897, 13, 4706, 1583, 29889, 11014, 2492, 353, 14383, 2492, 13, 4706, 1583, 29889, 449, 29918, 3972, 353, 714, 29918, 3972, 13, 4706, 1583, 29889, 2080, 29918, 3972, 353, 1881, 29918, 3972, 13, 13, 4706, 1583, 29889, 29135, 29879, 353, 9657, 580, 13, 4706, 1583, 29889, 29135, 29879, 353, 2897, 29889, 2084, 29889, 7122, 29898, 1311, 29889, 449, 29918, 3972, 29892, 525, 348, 29880, 24025, 29899, 2248, 29889, 7638, 1495, 13, 13, 4706, 1583, 29889, 5182, 29918, 2311, 353, 3646, 29918, 2311, 13, 4706, 1583, 29889, 14968, 18784, 1761, 353, 6571, 13, 13, 4706, 565, 451, 2897, 29889, 2084, 29889, 9933, 29898, 1311, 29889, 449, 29918, 3972, 1125, 13, 9651, 2897, 29889, 11256, 3972, 29898, 1311, 29889, 449, 29918, 3972, 29897, 13, 4706, 1583, 29889, 449, 2492, 3972, 353, 2897, 29889, 2084, 29889, 7122, 29898, 1311, 29889, 449, 29918, 3972, 29892, 525, 8346, 1495, 13, 4706, 565, 451, 2897, 29889, 2084, 29889, 9933, 29898, 1311, 29889, 449, 2492, 3972, 1125, 13, 9651, 2897, 29889, 11256, 3972, 29898, 1311, 29889, 449, 2492, 3972, 29897, 13, 4706, 1583, 29889, 348, 1643, 3972, 353, 2897, 29889, 2084, 29889, 7122, 29898, 1311, 29889, 449, 2492, 3972, 29892, 525, 348, 29880, 24025, 1495, 13, 4706, 565, 451, 2897, 29889, 2084, 29889, 9933, 29898, 1311, 29889, 348, 1643, 3972, 1125, 13, 9651, 2897, 29889, 11256, 3972, 29898, 1311, 29889, 348, 1643, 3972, 29897, 13, 13, 1678, 822, 6314, 1272, 29898, 1311, 29892, 1125, 13, 4706, 1596, 525, 4763, 24930, 3630, 856, 29915, 13, 13, 4706, 7945, 29918, 29916, 29918, 2084, 353, 2897, 29889, 2084, 29889, 7122, 29898, 1311, 29889, 2080, 29918, 3972, 29892, 525, 348, 29880, 24025, 29918, 29990, 29889, 2109, 1495, 13, 13, 4706, 7945, 29918, 24660, 353, 1722, 29898, 14968, 29918, 29916, 29918, 2084, 29892, 525, 6050, 1495, 13, 4706, 7945, 29918, 29916, 353, 7442, 29889, 3166, 1445, 29898, 14968, 29918, 24660, 29892, 26688, 29922, 9302, 29889, 13470, 29947, 29897, 13, 4706, 7945, 29918, 29916, 353, 7442, 29889, 690, 14443, 29898, 14968, 29918, 29916, 29892, 8521, 29896, 29892, 29871, 29941, 29892, 29871, 29929, 29953, 29892, 29871, 29929, 29953, 876, 13, 4706, 7945, 29918, 29916, 353, 7442, 29889, 3286, 4220, 29898, 14968, 29918, 29916, 29892, 313, 29900, 29892, 29871, 29941, 29892, 29871, 29906, 29892, 29871, 29896, 876, 13, 13, 4706, 22645, 353, 29871, 29900, 13, 4706, 363, 474, 297, 921, 3881, 29898, 14968, 29918, 29916, 29889, 12181, 29961, 29900, 29962, 1125, 13, 9651, 565, 451, 1583, 29889, 11014, 2492, 29901, 13, 18884, 4327, 29918, 392, 29918, 7620, 29898, 2492, 29918, 2749, 29922, 14968, 29918, 29916, 29961, 29875, 1402, 1962, 29918, 9507, 29922, 359, 29889, 2084, 29889, 7122, 29898, 1311, 29889, 348, 1643, 3972, 29892, 851, 29898, 13140, 29897, 718, 15300, 6173, 8785, 13, 9651, 1583, 29889, 14968, 18784, 1761, 29961, 359, 29889, 2084, 29889, 7122, 877, 8346, 742, 525, 348, 29880, 24025, 742, 851, 29898, 13140, 29897, 718, 15300, 6173, 1495, 29962, 353, 525, 21134, 29914, 29896, 29896, 29889, 3945, 29915, 13, 9651, 22645, 4619, 29871, 29896, 13, 13, 4706, 1596, 525, 12881, 3276, 24930, 3630, 856, 29915, 13, 13, 1678, 822, 2436, 29918, 1643, 29898, 1311, 29892, 29871, 1125, 13, 4706, 269, 3972, 353, 2897, 29889, 2084, 29889, 7122, 29898, 1311, 29889, 449, 29918, 3972, 29892, 525, 21134, 742, 525, 29896, 29896, 29889, 3945, 1495, 13, 4706, 7442, 29889, 29879, 485, 300, 486, 29898, 29879, 3972, 29892, 518, 29896, 29896, 1402, 14210, 29881, 1495, 13, 13, 1678, 822, 1065, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 19490, 4558, 769, 2436, 10419, 2066, 304, 8086, 29889, 13, 4706, 9995, 13, 4706, 1583, 29889, 3539, 29918, 1643, 580, 13, 4706, 1583, 29889, 15914, 1272, 580, 13, 13, 4706, 6475, 353, 17288, 29888, 978, 29892, 260, 4141, 29897, 13, 462, 259, 363, 285, 978, 29892, 260, 4141, 297, 1583, 29889, 14968, 18784, 1761, 29889, 7076, 580, 29962, 13, 4706, 7442, 29889, 29879, 485, 300, 486, 29898, 1311, 29889, 29135, 29879, 29892, 6475, 29892, 19200, 2433, 29995, 29879, 24163, 29879, 1495, 13, 13, 13, 361, 4770, 978, 1649, 1275, 376, 1649, 3396, 1649, 1115, 13, 1678, 13812, 353, 11842, 11726, 580, 13, 1678, 13812, 29889, 1202, 29918, 23516, 877, 489, 2080, 29918, 3972, 742, 1371, 2433, 9882, 304, 1284, 1881, 742, 13, 462, 4706, 2322, 2433, 29914, 29882, 1289, 29914, 16390, 24541, 29914, 1254, 29931, 29896, 29900, 1495, 13, 1678, 13812, 29889, 1202, 29918, 23516, 877, 489, 449, 29918, 3972, 742, 1371, 2433, 9882, 304, 2436, 2348, 2868, 2066, 742, 13, 462, 4706, 2322, 2433, 29914, 5184, 29914, 14043, 2829, 29914, 19737, 25119, 29914, 8969, 18137, 29914, 24713, 29914, 303, 29880, 29896, 29900, 1495, 13, 1678, 13812, 29889, 1202, 29918, 23516, 877, 489, 5182, 29918, 2311, 742, 1134, 29922, 524, 29892, 2322, 29922, 29929, 29953, 29892, 13, 462, 4706, 1371, 2433, 3505, 297, 17036, 304, 6287, 3273, 342, 2625, 360, 9806, 29940, 304, 313, 29900, 2794, 694, 21640, 29897, 1495, 13, 1678, 13812, 29889, 1202, 29918, 23516, 877, 489, 11014, 25518, 742, 1134, 29922, 11227, 29892, 2322, 29922, 8824, 29892, 13, 462, 4706, 1371, 2433, 5574, 304, 14383, 9068, 322, 17596, 4558, 1495, 13, 1678, 6389, 353, 13812, 29889, 5510, 29918, 5085, 580, 13, 1678, 17927, 353, 12183, 29889, 657, 16363, 22168, 978, 1649, 29897, 13, 1678, 289, 29893, 353, 512, 7118, 29898, 2080, 29918, 3972, 29922, 5085, 29889, 2080, 29918, 3972, 29892, 714, 29918, 3972, 29922, 5085, 29889, 449, 29918, 3972, 29892, 3646, 29918, 2311, 29922, 5085, 29889, 5182, 29918, 2311, 29892, 14383, 2492, 29922, 5085, 29889, 11014, 25518, 29897, 13, 1678, 396, 289, 29893, 353, 512, 7118, 2525, 29880, 24025, 29898, 2080, 29918, 3972, 29922, 5085, 29889, 2080, 29918, 3972, 29892, 714, 29918, 3972, 29922, 5085, 29889, 449, 29918, 3972, 29892, 3646, 29918, 2311, 29922, 5085, 29889, 5182, 29918, 2311, 29892, 14383, 2492, 29922, 5085, 29889, 11014, 25518, 29897, 13, 1678, 289, 29893, 29889, 3389, 580, 13, 2 ]
stripe/version.py
jameshageman-stripe/stripe-python
7
163348
VERSION = '2.17.0'
[ 1, 478, 1001, 13381, 353, 525, 29906, 29889, 29896, 29955, 29889, 29900, 29915, 13, 2 ]
video/management/commands/loadvideos.py
chandojo/climbbeta
1
148267
<reponame>chandojo/climbbeta<filename>video/management/commands/loadvideos.py from django.core import management from django.core.management.base import BaseCommand, CommandError from django.core.management.commands import loaddata from datetime import date class Command(BaseCommand): help = "Uploads video fixtures to database" def handle(self, *args, **options): today = str(date.today()) return management.call_command('loaddata', today + '.json')
[ 1, 529, 276, 1112, 420, 29958, 305, 1743, 2212, 29914, 695, 326, 1327, 1187, 29966, 9507, 29958, 9641, 29914, 21895, 29914, 26381, 29914, 1359, 29894, 7958, 29889, 2272, 13, 3166, 9557, 29889, 3221, 1053, 10643, 13, 3166, 9557, 29889, 3221, 29889, 21895, 29889, 3188, 1053, 7399, 6255, 29892, 10516, 2392, 13, 3166, 9557, 29889, 3221, 29889, 21895, 29889, 26381, 1053, 658, 1202, 532, 13, 3166, 12865, 1053, 2635, 13, 13, 1990, 10516, 29898, 5160, 6255, 1125, 13, 1678, 1371, 353, 376, 17553, 29879, 4863, 5713, 486, 1973, 304, 2566, 29908, 13, 13, 1678, 822, 4386, 29898, 1311, 29892, 334, 5085, 29892, 3579, 6768, 1125, 13, 4706, 9826, 353, 851, 29898, 1256, 29889, 27765, 3101, 13, 4706, 736, 10643, 29889, 4804, 29918, 6519, 877, 417, 1202, 532, 742, 9826, 718, 15300, 3126, 1495, 13, 2 ]
density-based/train.py
ramonpeter/UnbinnedMeasurements
0
13154
import tensorflow as tf import pandas as pd import numpy as np import sys import time from cflow import ConditionalFlow from MoINN.modules.subnetworks import DenseSubNet from utils import train_density_estimation, plot_loss, plot_tau_ratio # import data tau1_gen = np.reshape(np.load("../data/tau1s_Pythia_gen.npy"), (-1,1)) tau2_gen = np.reshape(np.load("../data/tau2s_Pythia_gen.npy"), (-1,1)) tau1_sim = np.reshape(np.load("../data/tau1s_Pythia_sim.npy"), (-1,1)) tau2_sim = np.reshape(np.load("../data/tau2s_Pythia_sim.npy"), (-1,1)) data_gen = tf.convert_to_tensor(np.concatenate([tau1_gen,tau2_gen], axis=-1), dtype=tf.float32) data_sim = tf.convert_to_tensor(np.concatenate([tau1_sim,tau2_sim], axis=-1), dtype=tf.float32) train_gen, test_gen = np.split(data_gen, 2) train_sim, test_sim = np.split(data_sim, 2) # Get the flow meta = { "units": 16, "layers": 4, "initializer": "glorot_uniform", "activation": "leakyrelu", } cflow = ConditionalFlow(dims_in=[2], dims_c=[[2]], n_blocks=12, subnet_meta=meta, subnet_constructor=DenseSubNet) # train the network EPOCHS = 50 BATCH_SIZE = 1000 LR = 5e-3 DECAY_RATE=0.1 ITERS = len(train_gen)//BATCH_SIZE DECAY_STEP=ITERS #Prepare the tf.dataset train_dataset = tf.data.Dataset.from_tensor_slices((train_gen, train_sim)) train_dataset = train_dataset.shuffle(buffer_size=500000).batch(BATCH_SIZE).prefetch(tf.data.AUTOTUNE) lr_schedule = tf.keras.optimizers.schedules.InverseTimeDecay(LR, DECAY_STEP, DECAY_RATE) opt = tf.keras.optimizers.Adam(lr_schedule) train_losses = [] #train_all = np.concatenate([train_gen, train_sim], axis=-1) start_time = time.time() for e in range(EPOCHS): batch_train_losses = [] # Iterate over the batches of the dataset. for step, (batch_gen, batch_sim) in enumerate(train_dataset): batch_loss = train_density_estimation(cflow, opt, batch_gen, [batch_sim]) batch_train_losses.append(batch_loss) train_loss = tf.reduce_mean(batch_train_losses) train_losses.append(train_loss) if (e + 1) % 1 == 0: # Print metrics print( "Epoch #{}: Loss: {}, Learning_Rate: {}".format( e + 1, train_losses[-1], opt._decayed_lr(tf.float32) ) ) end_time = time.time() print("--- Run time: %s hour ---" % ((end_time - start_time)/60/60)) print("--- Run time: %s mins ---" % ((end_time - start_time)/60)) print("--- Run time: %s secs ---" % ((end_time - start_time))) # Make plots and sample plot_loss(train_losses, name="Log-likelihood", log_axis=False) detector = tf.constant(test_sim, dtype=tf.float32) unfold_gen = cflow.sample(int(5e5),[detector]) plot_tau_ratio(test_gen, unfold_gen, detector, name="tau_ratio") unfold_gen = {} for i in range(10): unfold_gen[i] = cflow.sample(int(5e5),[detector]) unfold_pythia = np.stack([unfold_gen[i] for i in range(10)]) np.save("inn_pythia",unfold_pythia)
[ 1, 1053, 26110, 408, 15886, 13, 5215, 11701, 408, 10518, 13, 5215, 12655, 408, 7442, 13, 5215, 10876, 13, 5215, 931, 13, 13, 3166, 274, 1731, 1053, 11790, 3245, 17907, 13, 3166, 4546, 1177, 29940, 29889, 7576, 29889, 1491, 11618, 29879, 1053, 360, 1947, 4035, 6779, 13, 13, 3166, 3667, 29879, 1053, 7945, 29918, 21518, 537, 29918, 342, 7715, 29892, 6492, 29918, 6758, 29892, 6492, 29918, 4722, 29918, 3605, 601, 13, 13, 29937, 1053, 848, 13, 4722, 29896, 29918, 1885, 353, 7442, 29889, 690, 14443, 29898, 9302, 29889, 1359, 703, 6995, 1272, 29914, 4722, 29896, 29879, 29918, 29925, 1541, 423, 29918, 1885, 29889, 29876, 2272, 4968, 8521, 29896, 29892, 29896, 876, 13, 4722, 29906, 29918, 1885, 353, 7442, 29889, 690, 14443, 29898, 9302, 29889, 1359, 703, 6995, 1272, 29914, 4722, 29906, 29879, 29918, 29925, 1541, 423, 29918, 1885, 29889, 29876, 2272, 4968, 8521, 29896, 29892, 29896, 876, 13, 13, 4722, 29896, 29918, 3601, 353, 7442, 29889, 690, 14443, 29898, 9302, 29889, 1359, 703, 6995, 1272, 29914, 4722, 29896, 29879, 29918, 29925, 1541, 423, 29918, 3601, 29889, 29876, 2272, 4968, 8521, 29896, 29892, 29896, 876, 13, 4722, 29906, 29918, 3601, 353, 7442, 29889, 690, 14443, 29898, 9302, 29889, 1359, 703, 6995, 1272, 29914, 4722, 29906, 29879, 29918, 29925, 1541, 423, 29918, 3601, 29889, 29876, 2272, 4968, 8521, 29896, 29892, 29896, 876, 13, 13, 1272, 29918, 1885, 353, 15886, 29889, 13441, 29918, 517, 29918, 20158, 29898, 9302, 29889, 535, 29883, 2579, 403, 4197, 4722, 29896, 29918, 1885, 29892, 4722, 29906, 29918, 1885, 1402, 9685, 10457, 29896, 511, 26688, 29922, 13264, 29889, 7411, 29941, 29906, 29897, 13, 1272, 29918, 3601, 353, 15886, 29889, 13441, 29918, 517, 29918, 20158, 29898, 9302, 29889, 535, 29883, 2579, 403, 4197, 4722, 29896, 29918, 3601, 29892, 4722, 29906, 29918, 3601, 1402, 9685, 10457, 29896, 511, 26688, 29922, 13264, 29889, 7411, 29941, 29906, 29897, 13, 13, 14968, 29918, 1885, 29892, 1243, 29918, 1885, 353, 7442, 29889, 5451, 29898, 1272, 29918, 1885, 29892, 29871, 29906, 29897, 13, 14968, 29918, 3601, 29892, 1243, 29918, 3601, 353, 7442, 29889, 5451, 29898, 1272, 29918, 3601, 29892, 29871, 29906, 29897, 13, 13, 29937, 3617, 278, 4972, 13, 7299, 353, 426, 13, 4706, 376, 348, 1169, 1115, 29871, 29896, 29953, 29892, 13, 4706, 376, 29277, 1115, 29871, 29946, 29892, 13, 4706, 376, 11228, 3950, 1115, 376, 3820, 272, 327, 29918, 29590, 613, 13, 4706, 376, 11236, 362, 1115, 376, 280, 557, 29891, 2674, 29884, 613, 13, 4706, 500, 13, 13, 29883, 1731, 353, 11790, 3245, 17907, 29898, 6229, 29879, 29918, 262, 11759, 29906, 1402, 3964, 29879, 29918, 29883, 29922, 8999, 29906, 20526, 302, 29918, 1271, 29879, 29922, 29896, 29906, 29892, 1014, 1212, 29918, 7299, 29922, 7299, 29892, 1014, 1212, 29918, 27821, 29922, 29928, 1947, 4035, 6779, 29897, 13, 13, 13, 29937, 7945, 278, 3564, 13, 29923, 13152, 3210, 29903, 353, 29871, 29945, 29900, 13, 29933, 14789, 29918, 14226, 353, 29871, 29896, 29900, 29900, 29900, 13, 29519, 353, 29871, 29945, 29872, 29899, 29941, 13, 2287, 5454, 29979, 29918, 29934, 3040, 29922, 29900, 29889, 29896, 13, 1806, 23598, 353, 7431, 29898, 14968, 29918, 1885, 29897, 458, 29933, 14789, 29918, 14226, 13, 2287, 5454, 29979, 29918, 1254, 15488, 29922, 1806, 23598, 13, 13, 29937, 29925, 3445, 598, 278, 15886, 29889, 24713, 13, 14968, 29918, 24713, 353, 15886, 29889, 1272, 29889, 16390, 24541, 29889, 3166, 29918, 20158, 29918, 29879, 29399, 3552, 14968, 29918, 1885, 29892, 7945, 29918, 3601, 876, 13, 14968, 29918, 24713, 353, 7945, 29918, 24713, 29889, 845, 21897, 29898, 9040, 29918, 2311, 29922, 29945, 29900, 29900, 29900, 29900, 29900, 467, 16175, 29898, 29933, 14789, 29918, 14226, 467, 29886, 999, 3486, 29898, 13264, 29889, 1272, 29889, 20656, 2891, 3904, 29923, 29897, 13, 13, 29212, 29918, 816, 11272, 353, 15886, 29889, 3946, 294, 29889, 20640, 19427, 29889, 816, 287, 2540, 29889, 797, 3901, 2481, 6185, 388, 29898, 29519, 29892, 5012, 5454, 29979, 29918, 1254, 15488, 29892, 5012, 5454, 29979, 29918, 29934, 3040, 29897, 13, 3670, 353, 15886, 29889, 3946, 294, 29889, 20640, 19427, 29889, 3253, 314, 29898, 29212, 29918, 816, 11272, 29897, 13, 13, 14968, 29918, 6758, 267, 353, 5159, 13, 29937, 14968, 29918, 497, 353, 7442, 29889, 535, 29883, 2579, 403, 4197, 14968, 29918, 1885, 29892, 7945, 29918, 3601, 1402, 9685, 10457, 29896, 29897, 13, 2962, 29918, 2230, 353, 931, 29889, 2230, 580, 13, 1454, 321, 297, 3464, 29898, 29923, 13152, 3210, 29903, 1125, 13, 268, 13, 1678, 9853, 29918, 14968, 29918, 6758, 267, 353, 5159, 13, 1678, 396, 20504, 403, 975, 278, 9853, 267, 310, 278, 8783, 29889, 13, 1678, 363, 4331, 29892, 313, 16175, 29918, 1885, 29892, 9853, 29918, 3601, 29897, 297, 26985, 29898, 14968, 29918, 24713, 1125, 13, 4706, 9853, 29918, 6758, 353, 7945, 29918, 21518, 537, 29918, 342, 7715, 29898, 29883, 1731, 29892, 3523, 29892, 9853, 29918, 1885, 29892, 518, 16175, 29918, 3601, 2314, 13, 4706, 9853, 29918, 14968, 29918, 6758, 267, 29889, 4397, 29898, 16175, 29918, 6758, 29897, 13, 13, 1678, 7945, 29918, 6758, 353, 15886, 29889, 17469, 29918, 12676, 29898, 16175, 29918, 14968, 29918, 6758, 267, 29897, 13, 1678, 7945, 29918, 6758, 267, 29889, 4397, 29898, 14968, 29918, 6758, 29897, 13, 13, 1678, 565, 313, 29872, 718, 29871, 29896, 29897, 1273, 29871, 29896, 1275, 29871, 29900, 29901, 13, 4706, 396, 13905, 21556, 13, 4706, 1596, 29898, 13, 9651, 376, 29923, 1129, 305, 24037, 6177, 365, 2209, 29901, 24335, 29257, 29918, 19907, 29901, 6571, 1642, 4830, 29898, 13, 18884, 321, 718, 29871, 29896, 29892, 7945, 29918, 6758, 267, 14352, 29896, 1402, 3523, 3032, 7099, 388, 287, 29918, 29212, 29898, 13264, 29889, 7411, 29941, 29906, 29897, 13, 9651, 1723, 13, 4706, 1723, 13, 355, 29918, 2230, 353, 931, 29889, 2230, 580, 13, 2158, 703, 5634, 7525, 931, 29901, 1273, 29879, 7234, 11474, 29908, 1273, 5135, 355, 29918, 2230, 448, 1369, 29918, 2230, 6802, 29953, 29900, 29914, 29953, 29900, 876, 13, 2158, 703, 5634, 7525, 931, 29901, 1273, 29879, 286, 1144, 11474, 29908, 1273, 5135, 355, 29918, 2230, 448, 1369, 29918, 2230, 6802, 29953, 29900, 876, 13, 2158, 703, 5634, 7525, 931, 29901, 1273, 29879, 409, 2395, 11474, 29908, 1273, 5135, 355, 29918, 2230, 448, 1369, 29918, 2230, 4961, 13, 13, 13, 29937, 8561, 24580, 322, 4559, 13, 5317, 29918, 6758, 29898, 14968, 29918, 6758, 267, 29892, 1024, 543, 3403, 29899, 5081, 22342, 613, 1480, 29918, 8990, 29922, 8824, 29897, 13, 13, 4801, 3019, 353, 15886, 29889, 23362, 29898, 1688, 29918, 3601, 29892, 26688, 29922, 13264, 29889, 7411, 29941, 29906, 29897, 13, 348, 8771, 29918, 1885, 353, 274, 1731, 29889, 11249, 29898, 524, 29898, 29945, 29872, 29945, 511, 29961, 4801, 3019, 2314, 13, 5317, 29918, 4722, 29918, 3605, 601, 29898, 1688, 29918, 1885, 29892, 20220, 29918, 1885, 29892, 1439, 3019, 29892, 1024, 543, 4722, 29918, 3605, 601, 1159, 13, 13, 348, 8771, 29918, 1885, 353, 6571, 13, 1454, 474, 297, 3464, 29898, 29896, 29900, 1125, 13, 1678, 20220, 29918, 1885, 29961, 29875, 29962, 353, 274, 1731, 29889, 11249, 29898, 524, 29898, 29945, 29872, 29945, 511, 29961, 4801, 3019, 2314, 13, 348, 8771, 29918, 29886, 1541, 423, 353, 7442, 29889, 1429, 4197, 348, 8771, 29918, 1885, 29961, 29875, 29962, 363, 474, 297, 3464, 29898, 29896, 29900, 29897, 2314, 13, 13, 9302, 29889, 7620, 703, 2559, 29918, 29886, 1541, 423, 613, 348, 8771, 29918, 29886, 1541, 423, 29897, 2 ]
lesson_7/Pro.py
windn19/Python_Developer
1
112778
<reponame>windn19/Python_Developer from docx.shared import Cm # импорт из библиотеки класса для обработки изображений from docxtpl import DocxTemplate, InlineImage # импорт из библиотеки классов генерации doc документов из шаблонов и включения в них изображений import csv # подключение библиотеки для работы с csv import json # подключение библиотеки для работы с json from time import time # импорт метода для работы со временем def get_context(result): """ возвращает словарь значений, которые будут отправлены в шаблон result: данные для отправки в документ """ return { 'dates': result } def from_template(result, template, signature, outfile): """ Создание документа и включение в него рисунка result_sku_list: данные для передачи в документ template: файл шаблона doc-документа signature: файл рисунка для документа outfile: файл для сохранения готового документа """ template = DocxTemplate(template) # создание шаблона документа context = get_context(result) # получение данных в виде словаря img_size = Cm(8) # преобразование изображения к нужному размеру acc = InlineImage(template, signature, img_size) # создания объекта класса для вставки в документ context['acc'] = acc # добавление объекта с рисунком в словарь данных template.render(context) # создание шаблона на основе словаря данных template.save(outfile) # сохранение его в файле. def generate_report(result, outfile): """ Создание doc-документа для данных result: данные для передачи в документ outfile: файл для сохранения готового документа """ template = 'repor1.docx' # шаблон документа signature = 'IiGd2vv6-Cc.jpg' # изображение для вставки в шаблон from_template(result, template, signature, outfile) # вызов метода для генератора документа def create_csv(data, file): """ Создание csv файла data: данные, которые нужно записать file: файл, куда нужно записать данные """ t = time() # запоминание момента начала работы метода with open(file, mode='w') as f: # открытие файла для записи writer = csv.writer(f, delimiter=';') # создание объекта для записи данных с разделителем ";" writer.writerows(data) # запись данных в файл print(f'Writing complete from {round((time() - t) * 100, 2)} миллисекунд') # вывод времени работы метода в миллисекундах def create_json(csv_file, json_file): """ создание json файла из cvs файла csv_file: файл источник данных json_file: файл получатель данных """ t = time() # запоминание момента начала работы метода with open(csv_file, mode='r') as f: # открытие файла для чтения data = csv.DictReader(f, delimiter=';') # объявление объекта для чтения файла как словарь с разделителем ";" data = list(data) # превращение прочитанных данных в словарь. with open('example.json', mode='w') as f: # открытия файла для чтения json.dump(data, f) # загрузка данных в открытый файл print(f'Json done! {round((time() - t) * 100, 2)} миллисекунд') def gen_report(file, outfile): t = time() with open(file, mode='r') as f: data = json.load(f) generate_report(data, outfile) print(f'Report generated from {round((time() - t) * 100, 2)} милисекунд') # вывод времени работы метода в миллисекундах car_data = [['brand', 'sup', 'year', 'price'], # исходные данные ['Volvo', 1.5, 2017, 2345], ['Lada', 0.5, 2018, 5675], ['Audi', 2.0, 2018, 9877]] infile = 'example.csv' # файл для сохранения csv out_file = 'example.json' # файл для сохранения json create_csv(car_data, infile) # вызов метода для создания csv create_json(infile, out_file) # вызов метода для создания json gen_report(out_file, 'rep12.docx') # создание doc документа
[ 1, 529, 276, 1112, 420, 29958, 14800, 29876, 29896, 29929, 29914, 11980, 29918, 21956, 261, 13, 3166, 1574, 29916, 29889, 12366, 1053, 315, 29885, 29871, 396, 8933, 1268, 8113, 1866, 5660, 5116, 20390, 717, 9955, 13637, 3807, 9111, 1782, 13921, 1866, 15124, 25612, 13, 3166, 1574, 486, 572, 1053, 28197, 29916, 6733, 29892, 512, 1220, 2940, 13, 29937, 8933, 1268, 8113, 1866, 5660, 5116, 20390, 717, 9955, 29935, 7044, 13014, 494, 3540, 1574, 24196, 2387, 4820, 1866, 16844, 29975, 843, 2835, 606, 13482, 12395, 490, 15904, 1866, 15124, 25612, 13, 5215, 11799, 29871, 396, 3693, 8776, 12854, 5660, 5116, 20390, 717, 3807, 24534, 531, 11799, 13, 5215, 4390, 29871, 396, 3693, 8776, 12854, 5660, 5116, 20390, 717, 3807, 24534, 531, 4390, 13, 3166, 931, 1053, 931, 29871, 396, 8933, 1268, 8113, 20148, 840, 3807, 24534, 1778, 5599, 2387, 3098, 13, 13, 13, 1753, 679, 29918, 4703, 29898, 2914, 1125, 13, 1678, 9995, 13, 1678, 6849, 18524, 4826, 1257, 16919, 7474, 6253, 1093, 2332, 29892, 15261, 22770, 29932, 1685, 6842, 24827, 490, 16844, 29975, 25851, 13, 1678, 1121, 29901, 11650, 3029, 3807, 1685, 6842, 717, 490, 24196, 12275, 13, 1678, 9995, 13, 1678, 736, 426, 13, 4706, 525, 15190, 2396, 1121, 13, 1678, 500, 13, 13, 13, 1753, 515, 29918, 6886, 29898, 2914, 29892, 4472, 29892, 12608, 29892, 714, 1445, 1125, 13, 1678, 9995, 13, 259, 5579, 8728, 1755, 24196, 19900, 606, 13482, 12854, 490, 20507, 12591, 2937, 29921, 642, 13, 259, 1121, 29918, 18181, 29918, 1761, 29901, 11650, 3029, 3807, 21719, 1499, 490, 24196, 12275, 13, 259, 4472, 29901, 6725, 29977, 29944, 16844, 29975, 843, 477, 1574, 29899, 1802, 1382, 19900, 13, 259, 12608, 29901, 6725, 29977, 29944, 12591, 2937, 29921, 642, 3807, 24196, 19900, 13, 259, 714, 1445, 29901, 6725, 29977, 29944, 3807, 27618, 15530, 1084, 29932, 11913, 24196, 19900, 13, 259, 9995, 13, 1678, 4472, 353, 28197, 29916, 6733, 29898, 6886, 29897, 29871, 396, 14507, 1755, 16844, 29975, 843, 477, 24196, 19900, 13, 1678, 3030, 353, 679, 29918, 4703, 29898, 2914, 29897, 29871, 396, 6961, 12854, 11650, 2430, 490, 21986, 16919, 2359, 13, 13, 1678, 10153, 29918, 2311, 353, 315, 29885, 29898, 29947, 29897, 29871, 396, 2102, 23944, 1263, 1755, 1866, 15124, 11268, 1186, 26367, 29998, 8103, 3212, 5508, 29960, 13, 1678, 1035, 353, 512, 1220, 2940, 29898, 6886, 29892, 12608, 29892, 10153, 29918, 2311, 29897, 29871, 396, 14507, 1587, 29599, 676, 9955, 13637, 3807, 490, 3843, 717, 490, 24196, 12275, 13, 13, 1678, 3030, 1839, 5753, 2033, 353, 1035, 29871, 396, 1447, 3102, 29942, 6195, 29599, 676, 531, 12591, 2937, 29921, 4751, 490, 16919, 7474, 11650, 2430, 13, 1678, 4472, 29889, 9482, 29898, 4703, 29897, 29871, 396, 14507, 1755, 16844, 29975, 843, 477, 665, 8838, 29919, 16919, 2359, 11650, 2430, 13, 13, 1678, 4472, 29889, 7620, 29898, 449, 1445, 29897, 29871, 396, 27618, 16990, 5686, 490, 6725, 29977, 753, 29889, 13, 13, 13, 1753, 5706, 29918, 12276, 29898, 2914, 29892, 714, 1445, 1125, 13, 1678, 9995, 13, 1678, 5579, 8728, 1755, 1574, 29899, 1802, 1382, 19900, 3807, 11650, 2430, 13, 1678, 1121, 29901, 11650, 3029, 3807, 21719, 1499, 490, 24196, 12275, 13, 1678, 714, 1445, 29901, 6725, 29977, 29944, 3807, 27618, 15530, 1084, 29932, 11913, 24196, 19900, 13, 1678, 9995, 13, 1678, 4472, 353, 525, 276, 1971, 29896, 29889, 1514, 29916, 29915, 29871, 396, 16844, 29975, 25851, 24196, 19900, 13, 1678, 12608, 353, 525, 29902, 29875, 29954, 29881, 29906, 29894, 29894, 29953, 29899, 29907, 29883, 29889, 6173, 29915, 29871, 396, 1866, 15124, 11567, 3807, 490, 3843, 717, 490, 16844, 29975, 25851, 13, 1678, 515, 29918, 6886, 29898, 2914, 29892, 4472, 29892, 12608, 29892, 714, 1445, 29897, 29871, 396, 2771, 11337, 20148, 840, 3807, 13014, 494, 9011, 24196, 19900, 13, 13, 13, 1753, 1653, 29918, 7638, 29898, 1272, 29892, 934, 1125, 13, 1678, 9995, 13, 1678, 5579, 8728, 1755, 11799, 6725, 29977, 684, 13, 1678, 848, 29901, 11650, 3029, 29892, 15261, 26367, 9907, 1077, 7832, 1413, 13, 1678, 934, 29901, 6725, 29977, 29944, 29892, 6226, 840, 26367, 9907, 1077, 7832, 1413, 11650, 3029, 13, 1678, 9995, 13, 1678, 260, 353, 931, 580, 29871, 396, 1077, 1268, 12189, 1755, 2569, 19900, 7140, 684, 24534, 20148, 840, 13, 1678, 411, 1722, 29898, 1445, 29892, 4464, 2433, 29893, 1495, 408, 285, 29901, 29871, 396, 17282, 18380, 6725, 29977, 684, 3807, 1077, 17307, 13, 4706, 9227, 353, 11799, 29889, 13236, 29898, 29888, 29892, 28552, 2433, 29936, 1495, 29871, 396, 14507, 1755, 29599, 676, 3807, 1077, 17307, 11650, 2430, 531, 3212, 23890, 17584, 12159, 29908, 13, 4706, 9227, 29889, 13236, 1242, 29898, 1272, 29897, 29871, 396, 1077, 1668, 1210, 11650, 2430, 490, 6725, 29977, 29944, 13, 1678, 1596, 29898, 29888, 29915, 29956, 768, 292, 4866, 515, 426, 14486, 3552, 2230, 580, 448, 260, 29897, 334, 29871, 29896, 29900, 29900, 29892, 29871, 29906, 2915, 4157, 15216, 1502, 1382, 14651, 1495, 13, 1678, 396, 2771, 8160, 22951, 24534, 20148, 840, 490, 4157, 15216, 1502, 1382, 29921, 27920, 13, 13, 13, 1753, 1653, 29918, 3126, 29898, 7638, 29918, 1445, 29892, 4390, 29918, 1445, 1125, 13, 1678, 9995, 13, 1678, 14507, 1755, 4390, 6725, 29977, 684, 1866, 274, 4270, 6725, 29977, 684, 13, 1678, 11799, 29918, 1445, 29901, 6725, 29977, 29944, 7874, 27944, 11650, 2430, 13, 1678, 4390, 29918, 1445, 29901, 6725, 29977, 29944, 6961, 1282, 2584, 11650, 2430, 13, 1678, 9995, 13, 1678, 260, 353, 931, 580, 396, 1077, 1268, 12189, 1755, 2569, 19900, 7140, 684, 24534, 20148, 840, 13, 1678, 411, 1722, 29898, 7638, 29918, 1445, 29892, 4464, 2433, 29878, 1495, 408, 285, 29901, 29871, 396, 17282, 18380, 6725, 29977, 684, 3807, 2493, 730, 1587, 13, 4706, 848, 353, 11799, 29889, 21533, 6982, 29898, 29888, 29892, 28552, 2433, 29936, 1495, 29871, 396, 11779, 15432, 6195, 29599, 676, 3807, 2493, 730, 1587, 6725, 29977, 684, 5413, 16919, 7474, 531, 3212, 23890, 17584, 12159, 29908, 13, 4706, 848, 353, 1051, 29898, 1272, 29897, 29871, 396, 2102, 18524, 24849, 1471, 1499, 7951, 2430, 11650, 2430, 490, 16919, 7474, 29889, 13, 13, 1678, 411, 1722, 877, 4773, 29889, 3126, 742, 4464, 2433, 29893, 1495, 408, 285, 29901, 29871, 396, 17282, 8883, 6725, 29977, 684, 3807, 2493, 730, 1587, 13, 4706, 4390, 29889, 15070, 29898, 1272, 29892, 285, 29897, 29871, 396, 1077, 29969, 1086, 29972, 642, 11650, 2430, 490, 17282, 27393, 6725, 29977, 29944, 13, 1678, 1596, 29898, 29888, 29915, 8148, 2309, 29991, 426, 14486, 3552, 2230, 580, 448, 260, 29897, 334, 29871, 29896, 29900, 29900, 29892, 29871, 29906, 2915, 4157, 15216, 1502, 1382, 14651, 1495, 13, 13, 13, 1753, 2531, 29918, 12276, 29898, 1445, 29892, 714, 1445, 1125, 13, 1678, 260, 353, 931, 580, 13, 1678, 411, 1722, 29898, 1445, 29892, 4464, 2433, 29878, 1495, 408, 285, 29901, 13, 4706, 848, 353, 4390, 29889, 1359, 29898, 29888, 29897, 13, 1678, 5706, 29918, 12276, 29898, 1272, 29892, 714, 1445, 29897, 13, 1678, 1596, 29898, 29888, 29915, 13020, 5759, 515, 426, 14486, 3552, 2230, 580, 448, 260, 29897, 334, 29871, 29896, 29900, 29900, 29892, 29871, 29906, 2915, 4157, 644, 1502, 1382, 14651, 1495, 13, 1678, 396, 2771, 8160, 22951, 24534, 20148, 840, 490, 4157, 15216, 1502, 1382, 29921, 27920, 13, 13, 13, 4287, 29918, 1272, 353, 518, 1839, 16472, 742, 525, 12587, 742, 525, 6360, 742, 525, 9175, 7464, 29871, 396, 9971, 11011, 3029, 11650, 3029, 13, 9651, 6024, 13072, 1365, 742, 29871, 29896, 29889, 29945, 29892, 29871, 29906, 29900, 29896, 29955, 29892, 29871, 29906, 29941, 29946, 29945, 1402, 13, 9651, 6024, 29931, 1114, 742, 29871, 29900, 29889, 29945, 29892, 29871, 29906, 29900, 29896, 29947, 29892, 29871, 29945, 29953, 29955, 29945, 1402, 13, 9651, 6024, 29909, 4749, 742, 29871, 29906, 29889, 29900, 29892, 29871, 29906, 29900, 29896, 29947, 29892, 29871, 29929, 29947, 29955, 29955, 5262, 13, 262, 1445, 353, 525, 4773, 29889, 7638, 29915, 29871, 396, 6725, 29977, 29944, 3807, 27618, 15530, 11799, 13, 449, 29918, 1445, 353, 525, 4773, 29889, 3126, 29915, 29871, 396, 6725, 29977, 29944, 3807, 27618, 15530, 4390, 13, 13, 3258, 29918, 7638, 29898, 4287, 29918, 1272, 29892, 297, 1445, 29897, 29871, 396, 2771, 11337, 20148, 840, 3807, 14507, 1587, 11799, 13, 3258, 29918, 3126, 29898, 262, 1445, 29892, 714, 29918, 1445, 29897, 29871, 396, 2771, 11337, 20148, 840, 3807, 14507, 1587, 4390, 13, 1885, 29918, 12276, 29898, 449, 29918, 1445, 29892, 525, 3445, 29896, 29906, 29889, 1514, 29916, 1495, 29871, 396, 14507, 1755, 1574, 24196, 19900, 13, 2 ]
project_underhill/core/security.py
ErikSeguinte/project_underhill
0
67651
from passlib.context import CryptContext import secrets pwd_context = CryptContext(schemes=["argon2"], deprecated="auto") def get_random_string(): return secrets.token_urlsafe(5)
[ 1, 515, 1209, 1982, 29889, 4703, 1053, 315, 4641, 2677, 13, 5215, 22183, 1372, 13, 13, 29886, 9970, 29918, 4703, 353, 315, 4641, 2677, 29898, 816, 13826, 29922, 3366, 1191, 265, 29906, 12436, 18164, 543, 6921, 1159, 13, 13, 13, 1753, 679, 29918, 8172, 29918, 1807, 7295, 13, 1678, 736, 22183, 1372, 29889, 6979, 29918, 2271, 11177, 29898, 29945, 29897, 13, 2 ]
EDScoutCore/JournalInterface.py
bal6765/ed-scout
0
5394
<gh_stars>0 from inspect import signature import json import time import os import glob import logging from pathlib import Path from watchdog.observers import Observer from watchdog.observers.polling import PollingObserver from watchdog.events import PatternMatchingEventHandler from EDScoutCore.FileSystemUpdatePrompter import FileSystemUpdatePrompter default_journal_path = os.path.join(str(Path.home()), "Saved Games\\Frontier Developments\\Elite Dangerous") journal_file_pattern = "journal.*.log" logger = logging.getLogger('JournalInterface') class JournalChangeIdentifier: def __init__(self, journal_path=default_journal_path): pass self.journals = {} self.journal_path = journal_path logger.debug(f"watching for journal changes in {self.journal_path}") self._init_journal_lists() self._new_journal_entry_callback = None self.latest_journal = self.identify_latest_journal() # Prompter is required to force the file system to do updates on some systems so we get regular updates from the # journal watcher. self.prompter = FileSystemUpdatePrompter(self.latest_journal) def identify_latest_journal(self): if len(self.journals.keys()) == 0: return None keys = sorted(self.journals.keys()) return keys[-1] def process_journal_change(self, changed_file): if changed_file != self.latest_journal: self.latest_journal = changed_file self.prompter.set_watch_file(self.latest_journal) new_size = os.stat(changed_file).st_size new_data = None # If the game was loaded after the scout it will start a new journal which we need to treat as unscanned. if changed_file not in self.journals: self.journals[changed_file] = 0 logger.debug(f'{changed_file} - Size change: {self.journals[changed_file]} to {new_size}') if new_size > 0: # Don't try and read it if this is the first notification (we seem to get two; one from the file being cleared). # Check how much it has grown and read the excess size_diff = new_size - self.journals[changed_file] if size_diff > 0: with open(changed_file, 'rb') as f: f.seek(-size_diff, os.SEEK_END) # Note minus sign new_data = f.read() entries = [] if new_data: new_journal_lines = JournalChangeIdentifier.binary_file_data_to_lines(new_data) try: for line in new_journal_lines: logger.debug(f'New journal entry detected: {line}') entry = json.loads(line) entry['type'] = "JournalEntry" # Add an identifier that's common to everything we shove down the outgoing pipe so the receiver can distiguish. entries.append(entry) logger.debug(f'Found {len(entries)} new entries') for entry in entries: yield entry self.journals[changed_file] = new_size except json.decoder.JSONDecodeError as e: logger.exception(e) @staticmethod def binary_file_data_to_lines(binary_data): as_ascii = binary_data.decode('UTF-8') all_lines = as_ascii.split("\r\n") all_lines.pop() # Drop the last empty line return all_lines def _init_journal_lists(self): journal_files = glob.glob(os.path.join(self.journal_path, journal_file_pattern)) for journal_file in journal_files: self.journals[journal_file] = os.stat(journal_file).st_size class JournalWatcher: def __init__(self, path=default_journal_path, force_polling=False): self.path = path self.force_polling = force_polling self._configure_watchers() def set_callback(self, on_journal_change): self.event_handler.set_callback(on_journal_change) def stop(self): self.observer.stop() self.observer.join() class _EntriesChangeHandler(PatternMatchingEventHandler): def __init__(self): super(JournalWatcher._EntriesChangeHandler, self).__init__( patterns=['*Journal*.log'], ignore_patterns=[], ignore_directories=True) self.on_journal_change = None def set_callback(self, on_new_journal_entry): self.on_journal_change = on_new_journal_entry def on_modified(self, event): changed_file = str(event.src_path) logger.debug("Journal change: " + changed_file) self.on_journal_change(changed_file) def on_created(self, event): file = str(event.src_path) logger.debug("Journal created: " + file) def on_deleted(self, event): file = str(event.src_path) logger.debug("Journal deleted: " + file) def on_moved(self, event): file = str(event.src_path) logger.debug("Journal moved: " + file) def _configure_watchers(self): self.event_handler = JournalWatcher._EntriesChangeHandler() if self.force_polling: self.observer = PollingObserver(0.25) # Poll every quarter of a second else: self.observer = Observer() self.observer.schedule(self.event_handler, self.path, recursive=False) self.observer.start() if __name__ == '__main__': def ReportJournalChange(journal_hange): print('New route detected:' + str(journal_hange)) journalWatcher = JournalWatcher() journalWatcher.set_callback(ReportJournalChange) print('running') try: while True: time.sleep(1) except KeyboardInterrupt: print('done') journalWatcher.stop()
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 16096, 1053, 12608, 30004, 13, 5215, 4390, 30004, 13, 5215, 931, 30004, 13, 5215, 2897, 30004, 13, 5215, 13149, 30004, 13, 5215, 12183, 30004, 13, 30004, 13, 3166, 2224, 1982, 1053, 10802, 30004, 13, 3166, 6505, 26169, 29889, 711, 643, 874, 1053, 4250, 2974, 30004, 13, 3166, 6505, 26169, 29889, 711, 643, 874, 29889, 3733, 1847, 1053, 2043, 1847, 28066, 30004, 13, 3166, 6505, 26169, 29889, 13604, 1053, 25860, 9652, 292, 2624, 4598, 30004, 13, 3166, 9408, 4421, 449, 9203, 29889, 2283, 3924, 6422, 18571, 29886, 357, 1053, 3497, 3924, 6422, 18571, 29886, 357, 30004, 13, 30004, 13, 4381, 29918, 29926, 4659, 29918, 2084, 353, 2897, 29889, 2084, 29889, 7122, 29898, 710, 29898, 2605, 29889, 5184, 25739, 376, 29903, 10511, 12482, 1966, 29348, 631, 10682, 1860, 1966, 6489, 568, 360, 4600, 681, 1159, 30004, 13, 29926, 4659, 29918, 1445, 29918, 11037, 353, 376, 29926, 4659, 5575, 29889, 1188, 19451, 13, 30004, 13, 21707, 353, 12183, 29889, 657, 16363, 877, 29967, 4659, 10448, 1495, 30004, 13, 30004, 13, 30004, 13, 1990, 8237, 7277, 12889, 29901, 30004, 13, 30004, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 8955, 29918, 2084, 29922, 4381, 29918, 29926, 4659, 29918, 2084, 1125, 30004, 13, 4706, 1209, 30004, 13, 4706, 1583, 29889, 29926, 2905, 1338, 353, 6571, 30004, 13, 4706, 1583, 29889, 29926, 4659, 29918, 2084, 353, 8955, 29918, 2084, 30004, 13, 30004, 13, 4706, 17927, 29889, 8382, 29898, 29888, 29908, 12344, 292, 363, 8955, 3620, 297, 426, 1311, 29889, 29926, 4659, 29918, 2084, 27195, 30004, 13, 30004, 13, 4706, 1583, 3032, 2344, 29918, 29926, 4659, 29918, 21513, 26471, 13, 4706, 1583, 3032, 1482, 29918, 29926, 4659, 29918, 8269, 29918, 14035, 353, 6213, 30004, 13, 30004, 13, 4706, 1583, 29889, 12333, 29918, 29926, 4659, 353, 1583, 29889, 1693, 1598, 29918, 12333, 29918, 29926, 4659, 26471, 13, 30004, 13, 4706, 396, 9705, 29886, 357, 338, 3734, 304, 4889, 278, 934, 1788, 304, 437, 11217, 373, 777, 6757, 577, 591, 679, 4943, 11217, 515, 278, 30004, 13, 4706, 396, 8955, 6505, 261, 22993, 13, 4706, 1583, 29889, 14032, 29886, 357, 353, 3497, 3924, 6422, 18571, 29886, 357, 29898, 1311, 29889, 12333, 29918, 29926, 4659, 8443, 13, 30004, 13, 1678, 822, 12439, 29918, 12333, 29918, 29926, 4659, 29898, 1311, 1125, 30004, 13, 4706, 565, 7431, 29898, 1311, 29889, 29926, 2905, 1338, 29889, 8149, 3101, 1275, 29871, 29900, 29901, 30004, 13, 9651, 736, 6213, 30004, 13, 30004, 13, 4706, 6611, 353, 12705, 29898, 1311, 29889, 29926, 2905, 1338, 29889, 8149, 3101, 30004, 13, 4706, 736, 6611, 14352, 29896, 29962, 30004, 13, 30004, 13, 1678, 822, 1889, 29918, 29926, 4659, 29918, 3167, 29898, 1311, 29892, 3939, 29918, 1445, 1125, 30004, 13, 4706, 565, 3939, 29918, 1445, 2804, 1583, 29889, 12333, 29918, 29926, 4659, 29901, 30004, 13, 9651, 1583, 29889, 12333, 29918, 29926, 4659, 353, 3939, 29918, 1445, 30004, 13, 9651, 1583, 29889, 14032, 29886, 357, 29889, 842, 29918, 12344, 29918, 1445, 29898, 1311, 29889, 12333, 29918, 29926, 4659, 8443, 13, 30004, 13, 4706, 716, 29918, 2311, 353, 2897, 29889, 6112, 29898, 15033, 29918, 1445, 467, 303, 29918, 2311, 30004, 13, 4706, 716, 29918, 1272, 353, 6213, 30004, 13, 30004, 13, 4706, 396, 960, 278, 3748, 471, 7500, 1156, 278, 885, 449, 372, 674, 1369, 263, 716, 8955, 607, 591, 817, 304, 7539, 408, 443, 1557, 11310, 22993, 13, 4706, 565, 3939, 29918, 1445, 451, 297, 1583, 29889, 29926, 2905, 1338, 29901, 30004, 13, 9651, 1583, 29889, 29926, 2905, 1338, 29961, 15033, 29918, 1445, 29962, 353, 29871, 29900, 30004, 13, 30004, 13, 4706, 17927, 29889, 8382, 29898, 29888, 29915, 29912, 15033, 29918, 1445, 29913, 448, 21179, 1735, 29901, 426, 1311, 29889, 29926, 2905, 1338, 29961, 15033, 29918, 1445, 12258, 304, 426, 1482, 29918, 2311, 29913, 1495, 30004, 13, 4706, 565, 716, 29918, 2311, 1405, 29871, 29900, 29901, 29871, 396, 3872, 29915, 29873, 29871, 1018, 322, 1303, 372, 565, 445, 338, 278, 937, 12519, 313, 705, 2833, 304, 679, 1023, 29936, 697, 515, 278, 934, 1641, 24639, 467, 30004, 13, 9651, 396, 5399, 920, 1568, 372, 756, 21633, 322, 1303, 278, 19163, 30004, 13, 9651, 2159, 29918, 12765, 353, 716, 29918, 2311, 448, 1583, 29889, 29926, 2905, 1338, 29961, 15033, 29918, 1445, 29962, 30004, 13, 9651, 565, 2159, 29918, 12765, 1405, 29871, 29900, 29901, 30004, 13, 18884, 411, 1722, 29898, 15033, 29918, 1445, 29892, 525, 6050, 1495, 408, 285, 29901, 30004, 13, 462, 1678, 285, 29889, 344, 1416, 6278, 2311, 29918, 12765, 29892, 2897, 29889, 22048, 29968, 29918, 11794, 29897, 29871, 396, 3940, 26134, 1804, 30004, 13, 462, 1678, 716, 29918, 1272, 353, 285, 29889, 949, 26471, 13, 30004, 13, 4706, 9976, 353, 5159, 30004, 13, 30004, 13, 4706, 565, 716, 29918, 1272, 29901, 30004, 13, 9651, 716, 29918, 29926, 4659, 29918, 9012, 353, 8237, 7277, 12889, 29889, 19541, 29918, 1445, 29918, 1272, 29918, 517, 29918, 9012, 29898, 1482, 29918, 1272, 8443, 13, 30004, 13, 9651, 1018, 29901, 30004, 13, 18884, 363, 1196, 297, 716, 29918, 29926, 4659, 29918, 9012, 29901, 30004, 13, 462, 1678, 17927, 29889, 8382, 29898, 29888, 29915, 4373, 8955, 6251, 17809, 29901, 426, 1220, 29913, 1495, 30004, 13, 30004, 13, 462, 1678, 6251, 353, 4390, 29889, 18132, 29898, 1220, 8443, 13, 30004, 13, 462, 1678, 6251, 1839, 1853, 2033, 353, 376, 29967, 4659, 9634, 29908, 29871, 396, 3462, 385, 15882, 393, 29915, 29879, 3619, 304, 4129, 591, 528, 994, 1623, 278, 714, 17696, 14282, 577, 278, 19870, 508, 1320, 5526, 728, 22993, 13, 462, 1678, 9976, 29889, 4397, 29898, 8269, 8443, 13, 30004, 13, 18884, 17927, 29889, 8382, 29898, 29888, 29915, 9692, 426, 2435, 29898, 26586, 2915, 716, 9976, 1495, 30004, 13, 30004, 13, 18884, 363, 6251, 297, 9976, 29901, 30004, 13, 462, 1678, 7709, 6251, 30004, 13, 18884, 1583, 29889, 29926, 2905, 1338, 29961, 15033, 29918, 1445, 29962, 353, 716, 29918, 2311, 30004, 13, 30004, 13, 9651, 5174, 4390, 29889, 7099, 6119, 29889, 7249, 2772, 401, 2392, 408, 321, 29901, 30004, 13, 18884, 17927, 29889, 11739, 29898, 29872, 8443, 13, 30004, 13, 1678, 732, 7959, 5696, 30004, 13, 1678, 822, 7581, 29918, 1445, 29918, 1272, 29918, 517, 29918, 9012, 29898, 19541, 29918, 1272, 1125, 30004, 13, 4706, 408, 29918, 294, 18869, 353, 7581, 29918, 1272, 29889, 13808, 877, 10496, 29899, 29947, 1495, 30004, 13, 4706, 599, 29918, 9012, 353, 408, 29918, 294, 18869, 29889, 5451, 14182, 29878, 29905, 29876, 1159, 30004, 13, 4706, 599, 29918, 9012, 29889, 7323, 580, 29871, 396, 20724, 278, 1833, 4069, 1196, 30004, 13, 4706, 736, 599, 29918, 9012, 30004, 13, 30004, 13, 1678, 822, 903, 2344, 29918, 29926, 4659, 29918, 21513, 29898, 1311, 1125, 30004, 13, 4706, 8955, 29918, 5325, 353, 13149, 29889, 23705, 29898, 359, 29889, 2084, 29889, 7122, 29898, 1311, 29889, 29926, 4659, 29918, 2084, 29892, 8955, 29918, 1445, 29918, 11037, 876, 30004, 13, 4706, 363, 8955, 29918, 1445, 297, 8955, 29918, 5325, 29901, 30004, 13, 9651, 1583, 29889, 29926, 2905, 1338, 29961, 29926, 4659, 29918, 1445, 29962, 353, 2897, 29889, 6112, 29898, 29926, 4659, 29918, 1445, 467, 303, 29918, 2311, 30004, 13, 30004, 13, 30004, 13, 1990, 8237, 24709, 261, 29901, 30004, 13, 30004, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 2224, 29922, 4381, 29918, 29926, 4659, 29918, 2084, 29892, 4889, 29918, 3733, 1847, 29922, 8824, 1125, 30004, 13, 4706, 1583, 29889, 2084, 353, 2224, 30004, 13, 4706, 1583, 29889, 10118, 29918, 3733, 1847, 353, 4889, 29918, 3733, 1847, 30004, 13, 4706, 1583, 3032, 17591, 29918, 12344, 414, 26471, 13, 30004, 13, 1678, 822, 731, 29918, 14035, 29898, 1311, 29892, 373, 29918, 29926, 4659, 29918, 3167, 1125, 30004, 13, 4706, 1583, 29889, 3696, 29918, 13789, 29889, 842, 29918, 14035, 29898, 265, 29918, 29926, 4659, 29918, 3167, 8443, 13, 30004, 13, 1678, 822, 5040, 29898, 1311, 1125, 30004, 13, 4706, 1583, 29889, 711, 2974, 29889, 9847, 26471, 13, 4706, 1583, 29889, 711, 2974, 29889, 7122, 26471, 13, 30004, 13, 1678, 770, 903, 5292, 2722, 7277, 4598, 29898, 17144, 9652, 292, 2624, 4598, 1125, 30004, 13, 30004, 13, 4706, 822, 4770, 2344, 12035, 1311, 1125, 30004, 13, 9651, 2428, 29898, 29967, 4659, 24709, 261, 3032, 5292, 2722, 7277, 4598, 29892, 1583, 467, 1649, 2344, 12035, 30004, 13, 18884, 15038, 29922, 1839, 29930, 29967, 4659, 10521, 1188, 7464, 30004, 13, 18884, 11455, 29918, 11037, 29879, 11759, 1402, 30004, 13, 18884, 11455, 29918, 11851, 3842, 29922, 5574, 8443, 13, 30004, 13, 9651, 1583, 29889, 265, 29918, 29926, 4659, 29918, 3167, 353, 6213, 30004, 13, 30004, 13, 4706, 822, 731, 29918, 14035, 29898, 1311, 29892, 373, 29918, 1482, 29918, 29926, 4659, 29918, 8269, 1125, 30004, 13, 9651, 1583, 29889, 265, 29918, 29926, 4659, 29918, 3167, 353, 373, 29918, 1482, 29918, 29926, 4659, 29918, 8269, 30004, 13, 30004, 13, 4706, 822, 373, 29918, 1545, 2164, 29898, 1311, 29892, 1741, 1125, 30004, 13, 9651, 3939, 29918, 1445, 353, 851, 29898, 3696, 29889, 4351, 29918, 2084, 8443, 13, 9651, 17927, 29889, 8382, 703, 29967, 4659, 1735, 29901, 376, 718, 3939, 29918, 1445, 8443, 13, 9651, 1583, 29889, 265, 29918, 29926, 4659, 29918, 3167, 29898, 15033, 29918, 1445, 8443, 13, 30004, 13, 4706, 822, 373, 29918, 11600, 29898, 1311, 29892, 1741, 1125, 30004, 13, 9651, 934, 353, 851, 29898, 3696, 29889, 4351, 29918, 2084, 8443, 13, 9651, 17927, 29889, 8382, 703, 29967, 4659, 2825, 29901, 376, 718, 934, 8443, 13, 30004, 13, 4706, 822, 373, 29918, 311, 22742, 29898, 1311, 29892, 1741, 1125, 30004, 13, 9651, 934, 353, 851, 29898, 3696, 29889, 4351, 29918, 2084, 8443, 13, 9651, 17927, 29889, 8382, 703, 29967, 4659, 11132, 29901, 376, 718, 934, 8443, 13, 30004, 13, 4706, 822, 373, 29918, 29885, 8238, 29898, 1311, 29892, 1741, 1125, 30004, 13, 9651, 934, 353, 851, 29898, 3696, 29889, 4351, 29918, 2084, 8443, 13, 9651, 17927, 29889, 8382, 703, 29967, 4659, 6153, 29901, 376, 718, 934, 8443, 13, 30004, 13, 1678, 822, 903, 17591, 29918, 12344, 414, 29898, 1311, 1125, 30004, 13, 4706, 1583, 29889, 3696, 29918, 13789, 353, 8237, 24709, 261, 3032, 5292, 2722, 7277, 4598, 26471, 13, 30004, 13, 4706, 565, 1583, 29889, 10118, 29918, 3733, 1847, 29901, 30004, 13, 9651, 1583, 29889, 711, 2974, 353, 2043, 1847, 28066, 29898, 29900, 29889, 29906, 29945, 29897, 29871, 396, 2043, 29880, 1432, 12616, 310, 263, 1473, 30004, 13, 4706, 1683, 29901, 30004, 13, 9651, 1583, 29889, 711, 2974, 353, 4250, 2974, 26471, 13, 4706, 1583, 29889, 711, 2974, 29889, 816, 11272, 29898, 1311, 29889, 3696, 29918, 13789, 29892, 1583, 29889, 2084, 29892, 16732, 29922, 8824, 8443, 13, 4706, 1583, 29889, 711, 2974, 29889, 2962, 26471, 13, 30004, 13, 30004, 13, 361, 4770, 978, 1649, 1275, 525, 1649, 3396, 1649, 2396, 30004, 13, 30004, 13, 1678, 822, 13969, 29967, 4659, 7277, 29898, 29926, 4659, 29918, 29882, 927, 1125, 30004, 13, 4706, 1596, 877, 4373, 5782, 17809, 11283, 718, 851, 29898, 29926, 4659, 29918, 29882, 927, 876, 30004, 13, 30004, 13, 1678, 8955, 24709, 261, 353, 8237, 24709, 261, 26471, 13, 1678, 8955, 24709, 261, 29889, 842, 29918, 14035, 29898, 13020, 29967, 4659, 7277, 8443, 13, 30004, 13, 1678, 1596, 877, 21094, 1495, 30004, 13, 30004, 13, 1678, 1018, 29901, 30004, 13, 4706, 1550, 5852, 29901, 30004, 13, 9651, 931, 29889, 17059, 29898, 29896, 8443, 13, 1678, 5174, 7670, 3377, 4074, 6685, 29901, 30004, 13, 4706, 1596, 877, 15091, 1495, 30004, 13, 30004, 13, 1678, 8955, 24709, 261, 29889, 9847, 26471, 13, 2 ]
wisdem/test/test_optimization_drivers/test_dakota_driver.py
johnjasa/WISDEM
81
10791
import unittest import numpy as np from openmdao.utils.assert_utils import assert_near_equal from wisdem.optimization_drivers.dakota_driver import DakotaOptimizer try: import dakota except ImportError: dakota = None @unittest.skipIf(dakota is None, "only run if Dakota is installed.") class TestDakotaOptimization(unittest.TestCase): def test_2D_opt_max_iterations(self): bounds = {"x": np.array([[0.0, 1.0], [0.0, 1.0]])} desvars = {"x": np.array([0.0, 0.25])} outputs = ["y"] template_dir = "template_dir/" model_string = "from weis.multifidelity.models.testbed_components import simple_2D_high_model as model" output_scalers = [1.0] options = {"method": "coliny_cobyla", "max_function_evaluations": 3} opt = DakotaOptimizer(template_dir) results = opt.optimize(desvars, outputs, bounds, model_string, output_scalers, options) assert_near_equal(np.min(np.array(results["y"])), -9.5) def test_2D_opt_EGO(self): bounds = {"x": np.array([[0.0, 1.0], [0.0, 1.0]])} desvars = {"x": np.array([0.0, 0.25])} outputs = ["y"] template_dir = "template_dir/" model_string = "from weis.multifidelity.models.testbed_components import simple_2D_high_model as model" output_scalers = [1.0] options = {"initial_samples": 5, "method": "efficient_global", "seed": 123456} opt = DakotaOptimizer(template_dir) results = opt.optimize(desvars, outputs, bounds, model_string, output_scalers, options) assert_near_equal(np.min(np.array(results["y"])), -9.999996864) def test_two_variables(self): bounds = {"x": np.array([[0.0, 1.0], [0.0, 1.0]]), "z": [1.0, 2.0]} desvars = {"x": np.array([0.0, 0.25]), "z": 1.5} outputs = ["y"] template_dir = "template_dir/" model_string = "from weis.multifidelity.models.testbed_components import simple_two_variable as model" output_scalers = [1.0] options = {"method": "coliny_cobyla", "max_function_evaluations": 3} opt = DakotaOptimizer(template_dir) results = opt.optimize(desvars, outputs, bounds, model_string, output_scalers, options) assert_near_equal(np.min(np.array(results["y"])), 1.0) def test_constraint(self): bounds = {"x": np.array([[0.0, 1.0], [0.0, 1.0]])} desvars = {"x": np.array([0.0, 0.25])} outputs = ["y", "con"] template_dir = "template_dir/" model_string = "from weis.multifidelity.models.testbed_components import simple_2D_low_model as model" output_scalers = [1.0, 1.0] options = {"method": "coliny_cobyla", "max_function_evaluations": 3} opt = DakotaOptimizer(template_dir) results = opt.optimize(desvars, outputs, bounds, model_string, output_scalers, options) assert_near_equal(np.min(np.array(results["y"])), 0.5) assert_near_equal(np.min(np.array(results["con"])), 0.0) if __name__ == "__main__": unittest.main()
[ 1, 1053, 443, 27958, 30004, 13, 30004, 13, 5215, 12655, 408, 7442, 30004, 13, 30004, 13, 3166, 1722, 29885, 1388, 29877, 29889, 13239, 29889, 9294, 29918, 13239, 1053, 4974, 29918, 28502, 29918, 11745, 30004, 13, 3166, 22573, 2310, 29889, 20640, 2133, 29918, 24477, 874, 29889, 29881, 557, 4616, 29918, 9465, 1053, 22679, 4616, 20624, 326, 3950, 30004, 13, 30004, 13, 2202, 29901, 30004, 13, 1678, 1053, 270, 557, 4616, 30004, 13, 19499, 16032, 2392, 29901, 30004, 13, 1678, 270, 557, 4616, 353, 6213, 30004, 13, 30004, 13, 30004, 13, 29992, 348, 27958, 29889, 11014, 3644, 29898, 29881, 557, 4616, 338, 6213, 29892, 376, 6194, 1065, 565, 22679, 4616, 338, 5130, 23157, 30004, 13, 1990, 4321, 29928, 557, 4616, 20624, 326, 2133, 29898, 348, 27958, 29889, 3057, 8259, 1125, 30004, 13, 1678, 822, 1243, 29918, 29906, 29928, 29918, 3670, 29918, 3317, 29918, 1524, 800, 29898, 1311, 1125, 30004, 13, 4706, 13451, 353, 8853, 29916, 1115, 7442, 29889, 2378, 4197, 29961, 29900, 29889, 29900, 29892, 29871, 29896, 29889, 29900, 1402, 518, 29900, 29889, 29900, 29892, 29871, 29896, 29889, 29900, 24960, 8117, 13, 4706, 553, 16908, 353, 8853, 29916, 1115, 7442, 29889, 2378, 4197, 29900, 29889, 29900, 29892, 29871, 29900, 29889, 29906, 29945, 2314, 8117, 13, 4706, 14391, 353, 6796, 29891, 3108, 30004, 13, 4706, 4472, 29918, 3972, 353, 376, 6886, 29918, 3972, 12975, 30004, 13, 4706, 1904, 29918, 1807, 353, 376, 3166, 591, 275, 29889, 4713, 361, 10652, 537, 29889, 9794, 29889, 1688, 2580, 29918, 14036, 1053, 2560, 29918, 29906, 29928, 29918, 9812, 29918, 4299, 408, 1904, 19451, 13, 4706, 1962, 29918, 19529, 414, 353, 518, 29896, 29889, 29900, 29962, 30004, 13, 4706, 3987, 353, 8853, 5696, 1115, 376, 1054, 4901, 29918, 29883, 18711, 433, 613, 376, 3317, 29918, 2220, 29918, 24219, 800, 1115, 29871, 29941, 8117, 13, 30004, 13, 4706, 3523, 353, 22679, 4616, 20624, 326, 3950, 29898, 6886, 29918, 3972, 8443, 13, 4706, 2582, 353, 3523, 29889, 20640, 675, 29898, 2783, 16908, 29892, 14391, 29892, 13451, 29892, 1904, 29918, 1807, 29892, 1962, 29918, 19529, 414, 29892, 3987, 8443, 13, 30004, 13, 4706, 4974, 29918, 28502, 29918, 11745, 29898, 9302, 29889, 1195, 29898, 9302, 29889, 2378, 29898, 9902, 3366, 29891, 20068, 511, 448, 29929, 29889, 29945, 8443, 13, 30004, 13, 1678, 822, 1243, 29918, 29906, 29928, 29918, 3670, 29918, 11787, 29949, 29898, 1311, 1125, 30004, 13, 4706, 13451, 353, 8853, 29916, 1115, 7442, 29889, 2378, 4197, 29961, 29900, 29889, 29900, 29892, 29871, 29896, 29889, 29900, 1402, 518, 29900, 29889, 29900, 29892, 29871, 29896, 29889, 29900, 24960, 8117, 13, 4706, 553, 16908, 353, 8853, 29916, 1115, 7442, 29889, 2378, 4197, 29900, 29889, 29900, 29892, 29871, 29900, 29889, 29906, 29945, 2314, 8117, 13, 4706, 14391, 353, 6796, 29891, 3108, 30004, 13, 4706, 4472, 29918, 3972, 353, 376, 6886, 29918, 3972, 12975, 30004, 13, 4706, 1904, 29918, 1807, 353, 376, 3166, 591, 275, 29889, 4713, 361, 10652, 537, 29889, 9794, 29889, 1688, 2580, 29918, 14036, 1053, 2560, 29918, 29906, 29928, 29918, 9812, 29918, 4299, 408, 1904, 19451, 13, 4706, 1962, 29918, 19529, 414, 353, 518, 29896, 29889, 29900, 29962, 30004, 13, 4706, 3987, 353, 8853, 11228, 29918, 27736, 1115, 29871, 29945, 29892, 376, 5696, 1115, 376, 8462, 29918, 10945, 613, 376, 26776, 1115, 29871, 29896, 29906, 29941, 29946, 29945, 29953, 8117, 13, 30004, 13, 4706, 3523, 353, 22679, 4616, 20624, 326, 3950, 29898, 6886, 29918, 3972, 8443, 13, 4706, 2582, 353, 3523, 29889, 20640, 675, 29898, 2783, 16908, 29892, 14391, 29892, 13451, 29892, 1904, 29918, 1807, 29892, 1962, 29918, 19529, 414, 29892, 3987, 8443, 13, 30004, 13, 4706, 4974, 29918, 28502, 29918, 11745, 29898, 9302, 29889, 1195, 29898, 9302, 29889, 2378, 29898, 9902, 3366, 29891, 20068, 511, 448, 29929, 29889, 29929, 29929, 29929, 29929, 29929, 29953, 29947, 29953, 29946, 8443, 13, 30004, 13, 1678, 822, 1243, 29918, 10184, 29918, 20897, 29898, 1311, 1125, 30004, 13, 4706, 13451, 353, 8853, 29916, 1115, 7442, 29889, 2378, 4197, 29961, 29900, 29889, 29900, 29892, 29871, 29896, 29889, 29900, 1402, 518, 29900, 29889, 29900, 29892, 29871, 29896, 29889, 29900, 5262, 511, 376, 29920, 1115, 518, 29896, 29889, 29900, 29892, 29871, 29906, 29889, 29900, 29962, 8117, 13, 4706, 553, 16908, 353, 8853, 29916, 1115, 7442, 29889, 2378, 4197, 29900, 29889, 29900, 29892, 29871, 29900, 29889, 29906, 29945, 11724, 376, 29920, 1115, 29871, 29896, 29889, 29945, 8117, 13, 4706, 14391, 353, 6796, 29891, 3108, 30004, 13, 4706, 4472, 29918, 3972, 353, 376, 6886, 29918, 3972, 12975, 30004, 13, 4706, 1904, 29918, 1807, 353, 376, 3166, 591, 275, 29889, 4713, 361, 10652, 537, 29889, 9794, 29889, 1688, 2580, 29918, 14036, 1053, 2560, 29918, 10184, 29918, 11918, 408, 1904, 19451, 13, 4706, 1962, 29918, 19529, 414, 353, 518, 29896, 29889, 29900, 29962, 30004, 13, 4706, 3987, 353, 8853, 5696, 1115, 376, 1054, 4901, 29918, 29883, 18711, 433, 613, 376, 3317, 29918, 2220, 29918, 24219, 800, 1115, 29871, 29941, 8117, 13, 30004, 13, 4706, 3523, 353, 22679, 4616, 20624, 326, 3950, 29898, 6886, 29918, 3972, 8443, 13, 4706, 2582, 353, 3523, 29889, 20640, 675, 29898, 2783, 16908, 29892, 14391, 29892, 13451, 29892, 1904, 29918, 1807, 29892, 1962, 29918, 19529, 414, 29892, 3987, 8443, 13, 30004, 13, 4706, 4974, 29918, 28502, 29918, 11745, 29898, 9302, 29889, 1195, 29898, 9302, 29889, 2378, 29898, 9902, 3366, 29891, 20068, 511, 29871, 29896, 29889, 29900, 8443, 13, 30004, 13, 1678, 822, 1243, 29918, 13646, 29898, 1311, 1125, 30004, 13, 4706, 13451, 353, 8853, 29916, 1115, 7442, 29889, 2378, 4197, 29961, 29900, 29889, 29900, 29892, 29871, 29896, 29889, 29900, 1402, 518, 29900, 29889, 29900, 29892, 29871, 29896, 29889, 29900, 24960, 8117, 13, 4706, 553, 16908, 353, 8853, 29916, 1115, 7442, 29889, 2378, 4197, 29900, 29889, 29900, 29892, 29871, 29900, 29889, 29906, 29945, 2314, 8117, 13, 4706, 14391, 353, 6796, 29891, 613, 376, 535, 3108, 30004, 13, 4706, 4472, 29918, 3972, 353, 376, 6886, 29918, 3972, 12975, 30004, 13, 4706, 1904, 29918, 1807, 353, 376, 3166, 591, 275, 29889, 4713, 361, 10652, 537, 29889, 9794, 29889, 1688, 2580, 29918, 14036, 1053, 2560, 29918, 29906, 29928, 29918, 677, 29918, 4299, 408, 1904, 19451, 13, 4706, 1962, 29918, 19529, 414, 353, 518, 29896, 29889, 29900, 29892, 29871, 29896, 29889, 29900, 29962, 30004, 13, 4706, 3987, 353, 8853, 5696, 1115, 376, 1054, 4901, 29918, 29883, 18711, 433, 613, 376, 3317, 29918, 2220, 29918, 24219, 800, 1115, 29871, 29941, 8117, 13, 30004, 13, 4706, 3523, 353, 22679, 4616, 20624, 326, 3950, 29898, 6886, 29918, 3972, 8443, 13, 4706, 2582, 353, 3523, 29889, 20640, 675, 29898, 2783, 16908, 29892, 14391, 29892, 13451, 29892, 1904, 29918, 1807, 29892, 1962, 29918, 19529, 414, 29892, 3987, 8443, 13, 30004, 13, 4706, 4974, 29918, 28502, 29918, 11745, 29898, 9302, 29889, 1195, 29898, 9302, 29889, 2378, 29898, 9902, 3366, 29891, 20068, 511, 29871, 29900, 29889, 29945, 8443, 13, 4706, 4974, 29918, 28502, 29918, 11745, 29898, 9302, 29889, 1195, 29898, 9302, 29889, 2378, 29898, 9902, 3366, 535, 20068, 511, 29871, 29900, 29889, 29900, 8443, 13, 30004, 13, 30004, 13, 361, 4770, 978, 1649, 1275, 376, 1649, 3396, 1649, 1115, 30004, 13, 1678, 443, 27958, 29889, 3396, 26471, 13, 2 ]
main.py
jonodrew/matchex
0
458
from __future__ import division from timeit import default_timer as timer import csv import numpy as np import itertools from munkres import Munkres, print_matrix, make_cost_matrix import sys from classes import * from functions import * from math import sqrt import Tkinter as tk import tkFileDialog as filedialog root = tk.Tk() root.withdraw() p_file = filedialog.askopenfilename(title='Please select the posting file') c_file = filedialog.askopenfilename(title='Please select the candidate file') """for use with /users/java_jonathan/postings_lge.csv and /Users/java_jonathan/candidates_lge.csv""" # p_file = raw_input("Please enter the path for the postings file: ") # p_file = p_file.strip() # c_file = raw_input("Please enter the path for the candidate file: ") # c_file = c_file.strip() start = timer() with open(p_file,'r') as f: #with open('/Users/Jonathan/Google Drive/CPD/Python/postings.csv','r') as f: reader = csv.reader(f) postingsAll = list(reader) with open(c_file,'r') as f: reader = csv.reader(f) candidatesAll = list(reader) """create empty lists to fill with lists of lists output by iterating function below""" names = [] totalMatrix = [] for list in candidatesAll: candidate = Candidate(*list) names.append(candidate.name) n = 0 for list in postingsAll: posting = Posting(*list) totalMatrix.append(matchDept(posting,candidate) + matchAnchor(posting,candidate) +matchLocation(posting,candidate) + matchCompetency(posting,candidate) + matchSkill(posting,candidate)+matchCohort(posting,candidate)) n += 1 l = len(names) names.extend([0] * (n-l)) totalMatrix.extend([0] * (n**2 - len(totalMatrix))) totalMatrix = np.asarray(totalMatrix) totalMatrix = np.reshape(totalMatrix,(n,-1)) #at this point the matrix is structured as candidates down and jobs across totalMatrix = np.transpose(totalMatrix) #now it's switched! totalMatrix = np.subtract(np.amax(totalMatrix),totalMatrix) totalMatrix = np.array(totalMatrix) minSuitability = 18 check = [] result = [] m = Munkres() indexes = m.compute(totalMatrix) #print_matrix(totalMatrix, msg='Lowest cost through this matrix:') total = 0.0 unhappy_candidates = 0 medium_candidates = 0 tenpc_candidates = 0 qs_candidates = 0 vs_candidates = 0 f = open('output.txt', 'w') for row, column in indexes: if column < l: value = totalMatrix[row][column] if value > minSuitability*0.9: tenpc_candidates += 1 elif value > minSuitability*0.75: medium_candidates += 1 elif value > minSuitability/2: unhappy_candidates += 1 elif value > minSuitability*0.25: qs_candidates += 1 elif value > minSuitability*0.1: vs_candidates += 1 total += value check.append(column+1) result.append((row,column)) f.write('For candidate %s: \nOptimal position: %d (score %s)\n' % (names[column], column+1, value)) else: pass globalSatisfaction = 100*(1-(total/(l*minSuitability))) print('Global satisfaction: %.2f%%' % globalSatisfaction) print('Candidates who are more than 90%% suitable: %d' % vs_candidates) print('Candidates who are more than 75%% suitable: %d' % qs_candidates) print('Candidates who are more than 50%% suitable: %d' % (l-unhappy_candidates)) print('Candidates who are more than 75%% unsuitable: %d' % medium_candidates) print('Candidates who are more than 90%% unsuitable: %d' % tenpc_candidates) #output from excel: correct = [1,3,5,9,10,2,4,8,6,7] #this function tests output above against Excel: #test(correct,check) topMatrix = topFive(names,totalMatrix) #print(topMatrix) np.savetxt('/Users/java_jonathan/test.csv',topMatrix, fmt='%s', delimiter=',', newline='\n', header='', footer='', comments='# ') np.savetxt('/Users/java_jonathan/test2.csv',totalMatrix, fmt='%s', delimiter=',', newline='\n', header='', footer='', comments='# ') end = timer() print(end-start) """ #posting = [Posting(*postingsAll)] #print(posting[0].anchor) #print(posting) #print(candidatesAll) #print(postingsAll) #print(postingsAll[0].name) #print(preferences) #print(postings) #split up files into relative blocks postCode = [lists[0] for lists in postings] postDept = [lists[1] for lists in postings] postAnchor = [lists[2] for lists in postings] postSkills = [lists[3:5] for lists in postings] postLocation = [lists[5] for lists in postings] postCompetencies = [lists[7:10] for lists in postings] postSecurity = [lists[10] for lists in postings] #with open('/Users/Jonathan/Google Drive/CPD/Python/candidates.csv','r') as f: #gives first column ie candidate a a=totalMatrix[:,[0]] #b = totalMatrix[:,[0]] #print(a) #converts 1D matrix to list for ease a = np.array(a).tolist() #print(a) #creates list called output containing rank of score output = [0] * len(a) for i, x in enumerate(sorted(range(len(a)), key=lambda y: a[y])): output[x] = i print(output) #creates tuples of rank, job and appends to list jobRank = [] # for rank, b in zip(output, postCode): # jobScore = (rank,b) # list(jobScore) # jobRank.append(jobScore) # print(jobRank) output = [0] * len(a) for i, x in enumerate(sorted(range(len(a)), key=lambda y: a[y])): output[x] = i print(output) # #print(a) # jobRank = sorted(jobRank, reverse=False) # print(jobRank) # print('For candidate a, the best position is %s') % (jobRank[0][1]) # print(candidate[0].skills) """
[ 1, 515, 4770, 29888, 9130, 1649, 1053, 8542, 13, 3166, 931, 277, 1053, 2322, 29918, 20404, 408, 12237, 13, 5215, 11799, 13, 5215, 12655, 408, 7442, 13, 5215, 4256, 8504, 13, 3166, 286, 2960, 690, 1053, 341, 2960, 690, 29892, 1596, 29918, 5344, 29892, 1207, 29918, 18253, 29918, 5344, 13, 5215, 10876, 13, 3166, 4413, 1053, 334, 13, 3166, 3168, 1053, 334, 13, 3166, 5844, 1053, 18074, 2273, 13, 5215, 323, 29895, 1639, 408, 18883, 13, 5215, 18883, 2283, 7647, 408, 934, 15901, 13, 13, 4632, 353, 18883, 29889, 29911, 29895, 580, 13, 4632, 29889, 2541, 4012, 580, 13, 29886, 29918, 1445, 353, 934, 15901, 29889, 1278, 3150, 9507, 29898, 3257, 2433, 12148, 1831, 278, 16742, 934, 1495, 13, 29883, 29918, 1445, 353, 934, 15901, 29889, 1278, 3150, 9507, 29898, 3257, 2433, 12148, 1831, 278, 14020, 934, 1495, 13, 13, 13, 15945, 29908, 1454, 671, 411, 847, 7193, 29914, 1645, 29918, 13022, 11385, 29914, 2490, 886, 29918, 29880, 479, 29889, 7638, 322, 13, 29914, 5959, 29914, 1645, 29918, 13022, 11385, 29914, 29883, 5380, 1078, 29918, 29880, 479, 29889, 7638, 15945, 29908, 13, 13, 29937, 282, 29918, 1445, 353, 10650, 29918, 2080, 703, 12148, 3896, 278, 2224, 363, 278, 1400, 886, 934, 29901, 16521, 13, 29937, 282, 29918, 1445, 353, 282, 29918, 1445, 29889, 17010, 580, 13, 29937, 274, 29918, 1445, 353, 10650, 29918, 2080, 703, 12148, 3896, 278, 2224, 363, 278, 14020, 934, 29901, 16521, 13, 29937, 274, 29918, 1445, 353, 274, 29918, 1445, 29889, 17010, 580, 13, 2962, 353, 12237, 580, 13, 2541, 1722, 29898, 29886, 29918, 1445, 5501, 29878, 1495, 408, 285, 29901, 13, 29937, 2541, 1722, 11219, 5959, 29914, 29967, 265, 11385, 29914, 14207, 22850, 29914, 6271, 29928, 29914, 11980, 29914, 2490, 886, 29889, 7638, 3788, 29878, 1495, 408, 285, 29901, 13, 1678, 9591, 353, 11799, 29889, 16950, 29898, 29888, 29897, 13, 1678, 1400, 886, 3596, 353, 1051, 29898, 16950, 29897, 13, 13, 2541, 1722, 29898, 29883, 29918, 1445, 5501, 29878, 1495, 408, 285, 29901, 13, 1678, 9591, 353, 11799, 29889, 16950, 29898, 29888, 29897, 13, 1678, 21669, 3596, 353, 1051, 29898, 16950, 29897, 13, 13, 13, 15945, 29908, 3258, 4069, 8857, 304, 5445, 411, 8857, 310, 8857, 1962, 491, 4256, 1218, 740, 13, 22503, 15945, 29908, 13, 7039, 353, 5159, 13, 7827, 14609, 353, 5159, 13, 1454, 1051, 297, 21669, 3596, 29901, 13, 1678, 14020, 353, 315, 5380, 403, 10456, 1761, 29897, 13, 1678, 2983, 29889, 4397, 29898, 29883, 5380, 403, 29889, 978, 29897, 13, 1678, 302, 353, 29871, 29900, 13, 1678, 363, 1051, 297, 1400, 886, 3596, 29901, 13, 4706, 16742, 353, 4918, 292, 10456, 1761, 29897, 13, 4706, 3001, 14609, 29889, 4397, 29898, 4352, 2772, 415, 29898, 2490, 292, 29892, 29883, 5380, 403, 29897, 718, 1993, 24458, 29898, 2490, 292, 29892, 29883, 5380, 403, 29897, 13, 4706, 718, 4352, 6508, 29898, 2490, 292, 29892, 29883, 5380, 403, 29897, 718, 1993, 6843, 300, 3819, 29898, 2490, 292, 29892, 29883, 5380, 403, 29897, 718, 13, 4706, 1993, 15797, 453, 29898, 2490, 292, 29892, 29883, 5380, 403, 7240, 4352, 29907, 1148, 441, 29898, 2490, 292, 29892, 29883, 5380, 403, 876, 13, 4706, 302, 4619, 29871, 29896, 13, 29880, 353, 7431, 29898, 7039, 29897, 13, 7039, 29889, 21843, 4197, 29900, 29962, 334, 313, 29876, 29899, 29880, 876, 13, 13, 7827, 14609, 29889, 21843, 4197, 29900, 29962, 334, 313, 29876, 1068, 29906, 448, 7431, 29898, 7827, 14609, 4961, 13, 7827, 14609, 353, 7442, 29889, 294, 2378, 29898, 7827, 14609, 29897, 13, 13, 7827, 14609, 353, 7442, 29889, 690, 14443, 29898, 7827, 14609, 22657, 29876, 6653, 29896, 876, 13, 29937, 271, 445, 1298, 278, 4636, 338, 2281, 2955, 408, 21669, 1623, 322, 17643, 4822, 13, 7827, 14609, 353, 7442, 29889, 3286, 4220, 29898, 7827, 14609, 29897, 13, 29937, 3707, 372, 29915, 29879, 26263, 29991, 13, 7827, 14609, 353, 7442, 29889, 1491, 29873, 1461, 29898, 9302, 29889, 314, 1165, 29898, 7827, 14609, 511, 7827, 14609, 29897, 13, 7827, 14609, 353, 7442, 29889, 2378, 29898, 7827, 14609, 29897, 13, 1195, 29903, 3121, 3097, 353, 29871, 29896, 29947, 13, 3198, 353, 5159, 13, 2914, 353, 5159, 13, 29885, 353, 341, 2960, 690, 580, 13, 2248, 267, 353, 286, 29889, 26017, 29898, 7827, 14609, 29897, 13, 29937, 2158, 29918, 5344, 29898, 7827, 14609, 29892, 10191, 2433, 29931, 340, 342, 3438, 1549, 445, 4636, 29901, 1495, 13, 7827, 353, 29871, 29900, 29889, 29900, 13, 348, 29882, 14862, 29918, 29883, 5380, 1078, 353, 29871, 29900, 13, 27891, 29918, 29883, 5380, 1078, 353, 29871, 29900, 13, 841, 6739, 29918, 29883, 5380, 1078, 353, 29871, 29900, 13, 29939, 29879, 29918, 29883, 5380, 1078, 353, 29871, 29900, 13, 4270, 29918, 29883, 5380, 1078, 353, 29871, 29900, 13, 29888, 353, 1722, 877, 4905, 29889, 3945, 742, 525, 29893, 1495, 13, 1454, 1948, 29892, 1897, 297, 18111, 29901, 13, 1678, 565, 1897, 529, 301, 29901, 13, 4706, 995, 353, 3001, 14609, 29961, 798, 3816, 4914, 29962, 13, 4706, 565, 995, 1405, 1375, 29903, 3121, 3097, 29930, 29900, 29889, 29929, 29901, 13, 9651, 3006, 6739, 29918, 29883, 5380, 1078, 4619, 29871, 29896, 13, 4706, 25342, 995, 1405, 1375, 29903, 3121, 3097, 29930, 29900, 29889, 29955, 29945, 29901, 13, 18884, 18350, 29918, 29883, 5380, 1078, 4619, 29871, 29896, 13, 4706, 25342, 995, 1405, 1375, 29903, 3121, 3097, 29914, 29906, 29901, 13, 9651, 28859, 14862, 29918, 29883, 5380, 1078, 4619, 29871, 29896, 13, 4706, 25342, 995, 1405, 1375, 29903, 3121, 3097, 29930, 29900, 29889, 29906, 29945, 29901, 13, 9651, 3855, 29879, 29918, 29883, 5380, 1078, 4619, 29871, 29896, 13, 4706, 25342, 995, 1405, 1375, 29903, 3121, 3097, 29930, 29900, 29889, 29896, 29901, 13, 9651, 7186, 29918, 29883, 5380, 1078, 4619, 29871, 29896, 13, 4706, 3001, 4619, 995, 13, 4706, 1423, 29889, 4397, 29898, 4914, 29974, 29896, 29897, 13, 4706, 1121, 29889, 4397, 3552, 798, 29892, 4914, 876, 13, 4706, 285, 29889, 3539, 877, 2831, 14020, 1273, 29879, 29901, 320, 29876, 20624, 3039, 2602, 29901, 1273, 29881, 313, 13628, 1273, 29879, 2144, 29876, 29915, 13, 4706, 1273, 313, 7039, 29961, 4914, 1402, 1897, 29974, 29896, 29892, 995, 876, 13, 1678, 1683, 29901, 13, 4706, 1209, 13, 10945, 29903, 27685, 2467, 353, 29871, 29896, 29900, 29900, 16395, 29896, 17722, 7827, 14571, 29880, 29930, 1195, 29903, 3121, 3097, 4961, 13, 2158, 877, 12756, 26470, 29901, 18695, 29906, 29888, 7686, 29915, 1273, 5534, 29903, 27685, 2467, 29897, 13, 2158, 877, 29907, 5380, 1078, 1058, 526, 901, 1135, 29871, 29929, 29900, 7686, 13907, 29901, 1273, 29881, 29915, 1273, 7186, 29918, 29883, 5380, 1078, 29897, 13, 2158, 877, 29907, 5380, 1078, 1058, 526, 901, 1135, 29871, 29955, 29945, 7686, 13907, 29901, 1273, 29881, 29915, 1273, 3855, 29879, 29918, 29883, 5380, 1078, 29897, 13, 2158, 877, 29907, 5380, 1078, 1058, 526, 901, 1135, 29871, 29945, 29900, 7686, 13907, 29901, 1273, 29881, 29915, 1273, 313, 29880, 29899, 348, 29882, 14862, 29918, 29883, 5380, 1078, 876, 13, 2158, 877, 29907, 5380, 1078, 1058, 526, 901, 1135, 29871, 29955, 29945, 7686, 443, 2146, 8270, 29901, 1273, 29881, 29915, 1273, 18350, 29918, 29883, 5380, 1078, 29897, 13, 2158, 877, 29907, 5380, 1078, 1058, 526, 901, 1135, 29871, 29929, 29900, 7686, 443, 2146, 8270, 29901, 1273, 29881, 29915, 1273, 3006, 6739, 29918, 29883, 5380, 1078, 29897, 13, 13, 29937, 4905, 515, 10616, 29901, 13, 15728, 353, 518, 29896, 29892, 29941, 29892, 29945, 29892, 29929, 29892, 29896, 29900, 29892, 29906, 29892, 29946, 29892, 29947, 29892, 29953, 29892, 29955, 29962, 13, 13, 29937, 1366, 740, 6987, 1962, 2038, 2750, 11388, 29901, 13, 29937, 1688, 29898, 15728, 29892, 3198, 29897, 13, 3332, 14609, 353, 2246, 29943, 573, 29898, 7039, 29892, 7827, 14609, 29897, 13, 29937, 2158, 29898, 3332, 14609, 29897, 13, 13, 9302, 29889, 29879, 485, 300, 486, 11219, 5959, 29914, 1645, 29918, 13022, 11385, 29914, 1688, 29889, 7638, 742, 3332, 14609, 29892, 19200, 2433, 29995, 29879, 742, 28552, 29922, 742, 742, 13, 1482, 1220, 2433, 29905, 29876, 742, 4839, 2433, 742, 24166, 2433, 742, 6589, 2433, 29937, 25710, 13, 9302, 29889, 29879, 485, 300, 486, 11219, 5959, 29914, 1645, 29918, 13022, 11385, 29914, 1688, 29906, 29889, 7638, 742, 7827, 14609, 29892, 19200, 2433, 29995, 29879, 742, 28552, 29922, 742, 742, 13, 1482, 1220, 2433, 29905, 29876, 742, 4839, 2433, 742, 24166, 2433, 742, 6589, 2433, 29937, 25710, 13, 355, 353, 12237, 580, 13, 2158, 29898, 355, 29899, 2962, 29897, 13, 13, 15945, 29908, 13, 29937, 2490, 292, 353, 518, 6747, 292, 10456, 2490, 886, 3596, 4638, 13, 29937, 2158, 29898, 2490, 292, 29961, 29900, 1822, 25367, 29897, 13, 29937, 2158, 29898, 2490, 292, 29897, 13, 29937, 2158, 29898, 29883, 5380, 1078, 3596, 29897, 13, 29937, 2158, 29898, 2490, 886, 3596, 29897, 13, 29937, 2158, 29898, 2490, 886, 3596, 29961, 29900, 1822, 978, 29897, 13, 1678, 396, 2158, 29898, 1457, 10662, 29897, 13, 29937, 2158, 29898, 2490, 886, 29897, 13, 29937, 5451, 701, 2066, 964, 6198, 10930, 13, 13, 2490, 3399, 353, 518, 21513, 29961, 29900, 29962, 363, 8857, 297, 1400, 886, 29962, 13, 2490, 2772, 415, 353, 518, 21513, 29961, 29896, 29962, 363, 8857, 297, 1400, 886, 29962, 13, 2490, 24458, 353, 518, 21513, 29961, 29906, 29962, 363, 8857, 297, 1400, 886, 29962, 13, 2490, 15797, 6090, 353, 518, 21513, 29961, 29941, 29901, 29945, 29962, 363, 8857, 297, 1400, 886, 29962, 13, 2490, 6508, 353, 518, 21513, 29961, 29945, 29962, 363, 8857, 297, 1400, 886, 29962, 13, 2490, 6843, 6302, 2478, 353, 518, 21513, 29961, 29955, 29901, 29896, 29900, 29962, 363, 8857, 297, 1400, 886, 29962, 13, 2490, 13228, 353, 518, 21513, 29961, 29896, 29900, 29962, 363, 8857, 297, 1400, 886, 29962, 13, 13, 13, 29937, 2541, 1722, 11219, 5959, 29914, 29967, 265, 11385, 29914, 14207, 22850, 29914, 6271, 29928, 29914, 11980, 29914, 29883, 5380, 1078, 29889, 7638, 3788, 29878, 1495, 408, 285, 29901, 13, 13, 13, 13, 13, 13, 29937, 29887, 3145, 937, 1897, 19282, 14020, 263, 13, 29874, 29922, 7827, 14609, 7503, 17094, 29900, 5262, 13, 29937, 29890, 353, 3001, 14609, 7503, 17094, 29900, 5262, 13, 29937, 2158, 29898, 29874, 29897, 13, 29937, 535, 369, 1372, 29871, 29896, 29928, 4636, 304, 1051, 363, 16326, 13, 29874, 353, 7442, 29889, 2378, 29898, 29874, 467, 25027, 391, 580, 13, 29937, 2158, 29898, 29874, 29897, 13, 29937, 1037, 1078, 1051, 2000, 1962, 6943, 7115, 310, 8158, 13, 4905, 353, 518, 29900, 29962, 334, 7431, 29898, 29874, 29897, 13, 1454, 474, 29892, 921, 297, 26985, 29898, 24582, 29898, 3881, 29898, 2435, 29898, 29874, 8243, 1820, 29922, 2892, 343, 29901, 263, 29961, 29891, 12622, 29901, 13, 1678, 1962, 29961, 29916, 29962, 353, 474, 13, 2158, 29898, 4905, 29897, 13, 29937, 1037, 1078, 5291, 2701, 310, 7115, 29892, 4982, 322, 623, 1975, 304, 1051, 13, 9057, 29934, 804, 353, 5159, 13, 29937, 363, 7115, 29892, 289, 297, 14319, 29898, 4905, 29892, 1400, 3399, 1125, 13, 29937, 268, 4982, 20097, 353, 313, 10003, 29892, 29890, 29897, 13, 29937, 268, 1051, 29898, 9057, 20097, 29897, 13, 29937, 268, 4982, 29934, 804, 29889, 4397, 29898, 9057, 20097, 29897, 13, 29937, 1596, 29898, 9057, 29934, 804, 29897, 13, 13, 13, 4905, 353, 518, 29900, 29962, 334, 7431, 29898, 29874, 29897, 13, 1454, 474, 29892, 921, 297, 26985, 29898, 24582, 29898, 3881, 29898, 2435, 29898, 29874, 8243, 1820, 29922, 2892, 343, 29901, 263, 29961, 29891, 12622, 29901, 13, 1678, 1962, 29961, 29916, 29962, 353, 474, 13, 2158, 29898, 4905, 29897, 13, 13, 29937, 396, 2158, 29898, 29874, 29897, 13, 29937, 4982, 29934, 804, 353, 12705, 29898, 9057, 29934, 804, 29892, 11837, 29922, 8824, 29897, 13, 29937, 1596, 29898, 9057, 29934, 804, 29897, 13, 29937, 1596, 877, 2831, 14020, 263, 29892, 278, 1900, 2602, 338, 1273, 29879, 1495, 1273, 313, 9057, 29934, 804, 29961, 29900, 3816, 29896, 2314, 13, 29937, 1596, 29898, 29883, 5380, 403, 29961, 29900, 1822, 808, 6090, 29897, 13, 15945, 29908, 13, 2 ]
day3/p1.py
pwicks86/adventofcode2015
0
5223
from collections import defaultdict f = open("input.txt") d = f.read() houses = defaultdict(int,{(0,0):1}) cur = [0,0] for c in d: if c == "<": cur[0] -= 1 if c == ">": cur[0] += 1 if c == "v": cur[1] += 1 if c == "^": cur[1] -= 1 houses[tuple(cur)]+=1 print(len(houses.keys()))
[ 1, 515, 16250, 1053, 2322, 8977, 13, 29888, 353, 1722, 703, 2080, 29889, 3945, 1159, 13, 29881, 353, 285, 29889, 949, 580, 13, 29882, 23676, 353, 2322, 8977, 29898, 524, 29892, 8001, 29900, 29892, 29900, 1125, 29896, 1800, 13, 2764, 353, 29871, 518, 29900, 29892, 29900, 29962, 13, 1454, 274, 297, 270, 29901, 13, 1678, 565, 274, 1275, 9872, 1115, 13, 4706, 3151, 29961, 29900, 29962, 22361, 29871, 29896, 13, 1678, 565, 274, 1275, 376, 29958, 1115, 13, 4706, 3151, 29961, 29900, 29962, 4619, 29871, 29896, 13, 1678, 565, 274, 1275, 376, 29894, 1115, 13, 4706, 3151, 29961, 29896, 29962, 4619, 29871, 29896, 13, 1678, 565, 274, 1275, 13898, 1115, 13, 4706, 3151, 29961, 29896, 29962, 22361, 29871, 29896, 13, 1678, 12955, 29961, 23583, 29898, 2764, 4638, 23661, 29896, 13, 13, 2158, 29898, 2435, 29898, 29882, 23676, 29889, 8149, 22130, 13, 2 ]