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
slimano/core/persistence/models/nst.py
ATNoG/5gcontact
1
123562
from persistence.models.models_base import Base from sqlalchemy import Column, Integer, String class Nst(Base): __tablename__ = 'nst' id = Column(String(40), primary_key=True) name = Column(String(16)) template = Column(String(10000))
[ 1, 515, 3736, 11416, 29889, 9794, 29889, 9794, 29918, 3188, 1053, 7399, 13, 3166, 4576, 284, 305, 6764, 1053, 12481, 29892, 8102, 29892, 1714, 13, 13, 13, 1990, 405, 303, 29898, 5160, 1125, 13, 1678, 4770, 3891, 2435, 420, 1649, 353, 525, 29876, 303, 29915, 13, 13, 1678, 1178, 353, 12481, 29898, 1231, 29898, 29946, 29900, 511, 7601, 29918, 1989, 29922, 5574, 29897, 13, 1678, 1024, 353, 12481, 29898, 1231, 29898, 29896, 29953, 876, 13, 1678, 4472, 353, 12481, 29898, 1231, 29898, 29896, 29900, 29900, 29900, 29900, 876, 13, 13, 2 ]
scripts/init.py
LCAS/spqrel_tools
9
80923
#!/usr/bin/env python import qi import argparse import sys import time import os import webinit, postureinit, behaviorinit, manage_BG_behaviors, tmuxinit def main(): parser = argparse.ArgumentParser() parser.add_argument("--pip", type=str, default=os.getenv('PEPPER_IP'), help="Robot IP address. On robot or Local Naoqi: use '127.0.0.1'.") parser.add_argument("--pport", type=int, default=9559, help="Naoqi port number") args = parser.parse_args() pip = args.pip pport = args.pport try: connection_url = "tcp://" + pip + ":" + str(pport) print "Connecting to ", connection_url app = qi.Application(["Init", "--qi-url=" + connection_url ]) except RuntimeError: print ("Can't connect to Naoqi at ip \"" + pip + "\" on port " + str(pport) +".\n" "Please check your script arguments. Run with -h option for help.") sys.exit(1) app.start() session = app.session tts_service = session.service("ALTextToSpeech") tts_service.say("Initialization started.") tts_service.setParameter("speed", 80) time.sleep(1) #webinit.do_init(session) #time.sleep(1) postureinit.do_init(session) time.sleep(3) manage_BG_behaviors.stop_behavior(session, 'boot-config'): time.sleep(3) manage_BG_behaviors.start_behaviors(session,pip,pport) tts_service.say("Initialization completed.") tmuxinit.do_init() tts_service.say("I am ready.") if __name__ == "__main__": print "Waiting 15 seconds before starting ..." time.sleep(15) main()
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 13, 5215, 3855, 29875, 13, 5215, 1852, 5510, 13, 5215, 10876, 13, 5215, 931, 13, 5215, 2897, 13, 13, 5215, 1856, 2344, 29892, 1400, 545, 2344, 29892, 6030, 2344, 29892, 10933, 29918, 29933, 29954, 29918, 915, 8708, 18930, 29892, 27702, 1314, 2344, 13, 13, 1753, 1667, 7295, 13, 1678, 13812, 353, 1852, 5510, 29889, 15730, 11726, 580, 13, 1678, 13812, 29889, 1202, 29918, 23516, 703, 489, 13096, 613, 1134, 29922, 710, 29892, 2322, 29922, 359, 29889, 657, 6272, 877, 4162, 29925, 13171, 29918, 5690, 5477, 13, 462, 4706, 1371, 543, 21860, 327, 5641, 3211, 29889, 1551, 19964, 470, 9959, 4465, 29877, 26461, 29901, 671, 525, 29896, 29906, 29955, 29889, 29900, 29889, 29900, 29889, 29896, 4286, 1159, 13, 1678, 13812, 29889, 1202, 29918, 23516, 703, 489, 3016, 613, 1134, 29922, 524, 29892, 2322, 29922, 29929, 29945, 29945, 29929, 29892, 13, 462, 4706, 1371, 543, 29940, 6241, 26461, 2011, 1353, 1159, 13, 13, 1678, 6389, 353, 13812, 29889, 5510, 29918, 5085, 580, 13, 1678, 8450, 353, 6389, 29889, 13096, 13, 1678, 282, 637, 353, 6389, 29889, 3016, 13, 13, 1678, 1018, 29901, 13, 4706, 3957, 29918, 2271, 353, 376, 23981, 597, 29908, 718, 8450, 718, 376, 6160, 718, 851, 29898, 3016, 29897, 13, 4706, 1596, 376, 17918, 292, 304, 9162, 12, 9965, 29918, 2271, 13, 4706, 623, 353, 3855, 29875, 29889, 4873, 29898, 3366, 6644, 613, 376, 489, 26461, 29899, 2271, 543, 718, 3957, 29918, 2271, 29871, 2314, 13, 1678, 5174, 24875, 2392, 29901, 13, 4706, 1596, 4852, 6028, 29915, 29873, 4511, 304, 4465, 29877, 26461, 472, 10377, 13218, 29908, 718, 8450, 718, 376, 5931, 373, 2011, 376, 718, 851, 29898, 3016, 29897, 718, 1642, 29905, 29876, 29908, 13, 1669, 376, 12148, 1423, 596, 2471, 6273, 29889, 7525, 411, 448, 29882, 2984, 363, 1371, 23157, 13, 4706, 10876, 29889, 13322, 29898, 29896, 29897, 13, 13, 1678, 623, 29889, 2962, 580, 13, 1678, 4867, 353, 623, 29889, 7924, 13, 13, 1678, 260, 1372, 29918, 5509, 353, 4867, 29889, 5509, 703, 1964, 1626, 1762, 10649, 5309, 1159, 13, 1678, 260, 1372, 29918, 5509, 29889, 20834, 703, 15514, 2133, 4687, 23157, 13, 1678, 260, 1372, 29918, 5509, 29889, 842, 9329, 703, 19322, 613, 29871, 29947, 29900, 29897, 13, 13, 1678, 931, 29889, 17059, 29898, 29896, 29897, 13, 1678, 396, 705, 2109, 277, 29889, 1867, 29918, 2344, 29898, 7924, 29897, 13, 1678, 396, 2230, 29889, 17059, 29898, 29896, 29897, 13, 1678, 1400, 545, 2344, 29889, 1867, 29918, 2344, 29898, 7924, 29897, 13, 1678, 931, 29889, 17059, 29898, 29941, 29897, 13, 13, 1678, 10933, 29918, 29933, 29954, 29918, 915, 8708, 18930, 29889, 9847, 29918, 915, 16300, 29898, 7924, 29892, 525, 4777, 29899, 2917, 29374, 13, 13, 1678, 931, 29889, 17059, 29898, 29941, 29897, 13, 13, 1678, 10933, 29918, 29933, 29954, 29918, 915, 8708, 18930, 29889, 2962, 29918, 915, 8708, 18930, 29898, 7924, 29892, 13096, 29892, 3016, 29897, 13, 13, 1678, 260, 1372, 29918, 5509, 29889, 20834, 703, 15514, 2133, 8676, 23157, 13, 13, 1678, 27702, 1314, 2344, 29889, 1867, 29918, 2344, 580, 13, 13, 1678, 260, 1372, 29918, 5509, 29889, 20834, 703, 29902, 626, 7960, 23157, 13, 13, 13, 13, 361, 4770, 978, 1649, 1275, 376, 1649, 3396, 1649, 1115, 13, 1678, 1596, 376, 15716, 292, 29871, 29896, 29945, 6923, 1434, 6257, 2023, 29908, 13, 1678, 931, 29889, 17059, 29898, 29896, 29945, 29897, 13, 1678, 1667, 580, 13, 13, 2 ]
disturbance/migrations/0006_auto_20180618_1556.py
wilsonc86/ledger
0
66528
# -*- coding: utf-8 -*- # Generated by Django 1.10.8 on 2018-06-18 07:56 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('disturbance', '0005_auto_20180618_1123'), ] operations = [ migrations.RemoveField( model_name='proposalapprovergroup', name='activities', ), migrations.RemoveField( model_name='proposalapprovergroup', name='regions', ), migrations.RemoveField( model_name='proposalassessorgroup', name='activities', ), migrations.RemoveField( model_name='proposalassessorgroup', name='regions', ), ]
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 29937, 3251, 630, 491, 15337, 29871, 29896, 29889, 29896, 29900, 29889, 29947, 373, 29871, 29906, 29900, 29896, 29947, 29899, 29900, 29953, 29899, 29896, 29947, 29871, 29900, 29955, 29901, 29945, 29953, 13, 3166, 4770, 29888, 9130, 1649, 1053, 29104, 29918, 20889, 1338, 13, 13, 3166, 9557, 29889, 2585, 1053, 9725, 800, 13, 13, 13, 1990, 341, 16783, 29898, 26983, 800, 29889, 29924, 16783, 1125, 13, 13, 1678, 9962, 353, 518, 13, 4706, 6702, 5721, 9265, 749, 742, 525, 29900, 29900, 29900, 29945, 29918, 6921, 29918, 29906, 29900, 29896, 29947, 29900, 29953, 29896, 29947, 29918, 29896, 29896, 29906, 29941, 5477, 13, 1678, 4514, 13, 13, 1678, 6931, 353, 518, 13, 4706, 9725, 800, 29889, 15941, 3073, 29898, 13, 9651, 1904, 29918, 978, 2433, 771, 1066, 284, 9961, 369, 2972, 742, 13, 9651, 1024, 2433, 11236, 1907, 742, 13, 4706, 10353, 13, 4706, 9725, 800, 29889, 15941, 3073, 29898, 13, 9651, 1904, 29918, 978, 2433, 771, 1066, 284, 9961, 369, 2972, 742, 13, 9651, 1024, 2433, 1727, 1080, 742, 13, 4706, 10353, 13, 4706, 9725, 800, 29889, 15941, 3073, 29898, 13, 9651, 1904, 29918, 978, 2433, 771, 1066, 284, 465, 6329, 2972, 742, 13, 9651, 1024, 2433, 11236, 1907, 742, 13, 4706, 10353, 13, 4706, 9725, 800, 29889, 15941, 3073, 29898, 13, 9651, 1904, 29918, 978, 2433, 771, 1066, 284, 465, 6329, 2972, 742, 13, 9651, 1024, 2433, 1727, 1080, 742, 13, 4706, 10353, 13, 1678, 4514, 13, 2 ]
time_management/main.py
AyushRawal/time-management
1
187021
<gh_stars>1-10 from interface_mode import run_menu_loop_mode from facade import DatabaseFacade import os def main(): print("Welcome to Time Management!\n\n") database = os.path.join(os.path.dirname(__file__), "time_management.db") database_facade = DatabaseFacade(database) run_menu_loop_mode(database_facade) if __name__ == "__main__": main()
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 3166, 5067, 29918, 8513, 1053, 1065, 29918, 6510, 29918, 7888, 29918, 8513, 13, 3166, 4024, 1943, 1053, 5470, 29943, 562, 1943, 13, 5215, 2897, 13, 13, 13, 1753, 1667, 7295, 13, 1678, 1596, 703, 28862, 2763, 304, 5974, 15057, 9903, 29876, 29905, 29876, 1159, 13, 1678, 2566, 353, 2897, 29889, 2084, 29889, 7122, 29898, 359, 29889, 2084, 29889, 25721, 22168, 1445, 1649, 511, 376, 2230, 29918, 21895, 29889, 2585, 1159, 13, 1678, 2566, 29918, 17470, 1943, 353, 5470, 29943, 562, 1943, 29898, 9803, 29897, 13, 1678, 1065, 29918, 6510, 29918, 7888, 29918, 8513, 29898, 9803, 29918, 17470, 1943, 29897, 13, 13, 13, 361, 4770, 978, 1649, 1275, 376, 1649, 3396, 1649, 1115, 13, 1678, 1667, 580, 13, 2 ]
ssplanner/coresetup/models.py
AravinthKannan/Bharathi
0
81921
<reponame>AravinthKannan/Bharathi # -*- coding: utf-8 -*- # python manage.py make migrations your_app_label # python manage.py migrate --fake-initial your_app_label from __future__ import unicode_literals from django.db import models #from django.contrib.auth.models import User from django.contrib.auth.models import ( AbstractUser, BaseUserManager ) from django.utils import timezone from datetime import date, datetime from django.contrib.auth import get_user_model from django.conf import settings # accounts.models.py from django.db import models from django.contrib.auth.models import User # accounts.models.py from django.db import models from django.contrib.auth.models import ( BaseUserManager, AbstractBaseUser ) class ContactManager(BaseUserManager): """Summary """ def create_user(self, mobile_number, password=None): """ Creates and saves a User with the given mobile_number and password. Args: mobile_number (TYPE): Description password (None, optional): Description Returns: TYPE: Description Raises: ValueError: Description """ if not mobile_number: raise ValueError('Users must have an mobile_number address') user = self.model( mobile_number=self.normalize_mobile_number(mobile_number), ) user.set_password(password) user.save(using=self._db) return user def create_staffuser(self, mobile_number, password): """ Creates and saves a staff user with the given mobile_number and password. Args: mobile_number (TYPE): Description password (TYPE): Description Returns: TYPE: Description """ user = self.create_user( mobile_number, password=password, ) user.staff = True user.save(using=self._db) return user def create_superuser(self, mobile_number, password): """ Creates and saves a superuser with the given mobile_number and password. Args: mobile_number (TYPE): Description password (TYPE): Description Returns: TYPE: Description """ user = self.create_user( mobile_number, password=password, ) user.staff = True user.admin = True user.save(using=self._db) return user class Contact(AbstractBaseUser): """Summary Attributes: mobile_number (TYPE): Description objects (TYPE): Description """ objects = ContactManager() mobile_number = models.IntegerField(unique=True) USERNAME_FIELD = 'mobile_number' class Topic(models.Model): """Topic based on share is created Attributes: created_at (TYPE): Description created_by (TYPE): Description split_number (TYPE): Description total_amount (TYPE): Description updated_at (TYPE): Description updated_by (TYPE): Description """ total_amount = models.IntegerField() split_number = models.IntegerField() created_by = models.ForeignKey( settings.AUTH_USER_MODEL, related_name= 'topic_created', on_delete=models.CASCADE ) updated_by = models.ForeignKey( settings.AUTH_USER_MODEL, related_name= 'topic_updated', on_delete=models.CASCADE ) created_at = models.DateTimeField(auto_now_add=True) updated_at = models.DateTimeField(auto_now=True) class SplitAmountLedger(models.Model): """List of splitted amount to each user under same topic Attributes: created_at (TYPE): Description created_by (TYPE): Description splitted_amount (TYPE): Description splitted_user (TYPE): Description updated_at (TYPE): Description updated_by (TYPE): Description """ splitted_user = models.ForeignKey( settings.AUTH_USER_MODEL, related_name= 'sa_ledger_user', on_delete=models.CASCADE ) splitted_amount = models.IntegerField() created_by = models.ForeignKey( settings.AUTH_USER_MODEL, related_name= 'sa_ledger_created', on_delete=models.CASCADE ) updated_by = models.ForeignKey( settings.AUTH_USER_MODEL, related_name= 'sa_ledger_updated', on_delete=models.CASCADE ) created_at = models.DateTimeField(auto_now_add=True) updated_at = models.DateTimeField(auto_now=True)
[ 1, 529, 276, 1112, 420, 29958, 29909, 336, 3845, 386, 29968, 812, 273, 29914, 29933, 8222, 493, 29875, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 29937, 3017, 10933, 29889, 2272, 1207, 9725, 800, 596, 29918, 932, 29918, 1643, 13, 29937, 3017, 10933, 29889, 2272, 9725, 403, 1192, 29888, 1296, 29899, 11228, 596, 29918, 932, 29918, 1643, 13, 13, 3166, 4770, 29888, 9130, 1649, 1053, 29104, 29918, 20889, 1338, 13, 13, 3166, 9557, 29889, 2585, 1053, 4733, 13, 29937, 3166, 9557, 29889, 21570, 29889, 5150, 29889, 9794, 1053, 4911, 13, 3166, 9557, 29889, 21570, 29889, 5150, 29889, 9794, 1053, 313, 13, 1678, 25513, 2659, 29892, 13, 1678, 7399, 2659, 3260, 13, 29897, 13, 3166, 9557, 29889, 13239, 1053, 29431, 13, 3166, 12865, 1053, 2635, 29892, 12865, 13, 3166, 9557, 29889, 21570, 29889, 5150, 1053, 679, 29918, 1792, 29918, 4299, 13, 3166, 9557, 29889, 5527, 1053, 6055, 13, 29937, 15303, 29889, 9794, 29889, 2272, 13, 13, 3166, 9557, 29889, 2585, 1053, 4733, 13, 3166, 9557, 29889, 21570, 29889, 5150, 29889, 9794, 1053, 4911, 13, 13, 29937, 15303, 29889, 9794, 29889, 2272, 13, 13, 3166, 9557, 29889, 2585, 1053, 4733, 13, 3166, 9557, 29889, 21570, 29889, 5150, 29889, 9794, 1053, 313, 13, 1678, 7399, 2659, 3260, 29892, 25513, 5160, 2659, 13, 29897, 13, 13, 1990, 22387, 3260, 29898, 5160, 2659, 3260, 1125, 13, 13, 1678, 9995, 26289, 13, 1678, 9995, 13, 13, 1678, 822, 1653, 29918, 1792, 29898, 1311, 29892, 10426, 29918, 4537, 29892, 4800, 29922, 8516, 1125, 13, 4706, 9995, 13, 4706, 6760, 1078, 322, 27401, 263, 4911, 411, 278, 2183, 10426, 29918, 4537, 322, 4800, 29889, 13, 308, 13, 4706, 826, 3174, 29901, 13, 9651, 10426, 29918, 4537, 313, 11116, 1125, 12953, 13, 9651, 4800, 313, 8516, 29892, 13136, 1125, 12953, 13, 308, 13, 4706, 16969, 29901, 13, 9651, 323, 6959, 29901, 12953, 13, 308, 13, 4706, 390, 1759, 267, 29901, 13, 9651, 7865, 2392, 29901, 12953, 13, 4706, 9995, 13, 4706, 565, 451, 10426, 29918, 4537, 29901, 13, 9651, 12020, 7865, 2392, 877, 5959, 1818, 505, 385, 10426, 29918, 4537, 3211, 1495, 13, 13, 4706, 1404, 353, 1583, 29889, 4299, 29898, 13, 9651, 10426, 29918, 4537, 29922, 1311, 29889, 8945, 675, 29918, 16769, 29918, 4537, 29898, 16769, 29918, 4537, 511, 13, 4706, 1723, 13, 13, 4706, 1404, 29889, 842, 29918, 5630, 29898, 5630, 29897, 13, 4706, 1404, 29889, 7620, 29898, 4746, 29922, 1311, 3032, 2585, 29897, 13, 4706, 736, 1404, 13, 13, 1678, 822, 1653, 29918, 303, 3470, 1792, 29898, 1311, 29892, 10426, 29918, 4537, 29892, 4800, 1125, 13, 4706, 9995, 13, 4706, 6760, 1078, 322, 27401, 263, 13925, 1404, 411, 278, 2183, 10426, 29918, 4537, 322, 4800, 29889, 13, 308, 13, 4706, 826, 3174, 29901, 13, 9651, 10426, 29918, 4537, 313, 11116, 1125, 12953, 13, 9651, 4800, 313, 11116, 1125, 12953, 13, 308, 13, 4706, 16969, 29901, 13, 9651, 323, 6959, 29901, 12953, 13, 4706, 9995, 13, 4706, 1404, 353, 1583, 29889, 3258, 29918, 1792, 29898, 13, 9651, 10426, 29918, 4537, 29892, 13, 9651, 4800, 29922, 5630, 29892, 13, 4706, 1723, 13, 4706, 1404, 29889, 303, 3470, 353, 5852, 13, 4706, 1404, 29889, 7620, 29898, 4746, 29922, 1311, 3032, 2585, 29897, 13, 4706, 736, 1404, 13, 13, 1678, 822, 1653, 29918, 9136, 1792, 29898, 1311, 29892, 10426, 29918, 4537, 29892, 4800, 1125, 13, 4706, 9995, 13, 4706, 6760, 1078, 322, 27401, 263, 2428, 1792, 411, 278, 2183, 10426, 29918, 4537, 322, 4800, 29889, 13, 308, 13, 4706, 826, 3174, 29901, 13, 9651, 10426, 29918, 4537, 313, 11116, 1125, 12953, 13, 9651, 4800, 313, 11116, 1125, 12953, 13, 308, 13, 4706, 16969, 29901, 13, 9651, 323, 6959, 29901, 12953, 13, 4706, 9995, 13, 4706, 1404, 353, 1583, 29889, 3258, 29918, 1792, 29898, 13, 9651, 10426, 29918, 4537, 29892, 13, 9651, 4800, 29922, 5630, 29892, 13, 4706, 1723, 13, 4706, 1404, 29889, 303, 3470, 353, 5852, 13, 4706, 1404, 29889, 6406, 353, 5852, 13, 4706, 1404, 29889, 7620, 29898, 4746, 29922, 1311, 3032, 2585, 29897, 13, 4706, 736, 1404, 13, 13, 1990, 22387, 29898, 9118, 5160, 2659, 1125, 13, 13, 1678, 9995, 26289, 13, 268, 13, 1678, 6212, 5026, 29901, 13, 4706, 10426, 29918, 4537, 313, 11116, 1125, 12953, 13, 4706, 3618, 313, 11116, 1125, 12953, 13, 1678, 9995, 13, 1678, 3618, 353, 22387, 3260, 580, 13, 1678, 10426, 29918, 4537, 29871, 353, 4733, 29889, 7798, 3073, 29898, 13092, 29922, 5574, 29897, 13, 1678, 3148, 1001, 5813, 29918, 3738, 27286, 353, 525, 16769, 29918, 4537, 29915, 13, 13, 1990, 7488, 293, 29898, 9794, 29889, 3195, 1125, 13, 13, 1678, 9995, 7031, 293, 2729, 373, 6232, 338, 2825, 13, 268, 13, 1678, 6212, 5026, 29901, 13, 4706, 2825, 29918, 271, 313, 11116, 1125, 12953, 13, 4706, 2825, 29918, 1609, 313, 11116, 1125, 12953, 13, 4706, 6219, 29918, 4537, 313, 11116, 1125, 12953, 13, 4706, 3001, 29918, 14506, 313, 11116, 1125, 12953, 13, 4706, 4784, 29918, 271, 313, 11116, 1125, 12953, 13, 4706, 4784, 29918, 1609, 313, 11116, 1125, 12953, 13, 1678, 9995, 13, 268, 13, 1678, 3001, 29918, 14506, 353, 4733, 29889, 7798, 3073, 580, 13, 1678, 6219, 29918, 4537, 353, 4733, 29889, 7798, 3073, 580, 13, 1678, 2825, 29918, 1609, 353, 4733, 29889, 27755, 2558, 29898, 13, 462, 9651, 6055, 29889, 20656, 29950, 29918, 11889, 29918, 20387, 29931, 29892, 29871, 13, 462, 9651, 4475, 29918, 978, 29922, 525, 13010, 29918, 11600, 742, 29871, 13, 462, 9651, 373, 29918, 8143, 29922, 9794, 29889, 29907, 3289, 5454, 2287, 13, 462, 4706, 1723, 13, 1678, 4784, 29918, 1609, 353, 4733, 29889, 27755, 2558, 29898, 13, 462, 9651, 6055, 29889, 20656, 29950, 29918, 11889, 29918, 20387, 29931, 29892, 29871, 13, 462, 9651, 4475, 29918, 978, 29922, 525, 13010, 29918, 21402, 742, 13, 462, 9651, 373, 29918, 8143, 29922, 9794, 29889, 29907, 3289, 5454, 2287, 13, 462, 4706, 1723, 13, 1678, 2825, 29918, 271, 353, 4733, 29889, 11384, 3073, 29898, 6921, 29918, 3707, 29918, 1202, 29922, 5574, 29897, 268, 13, 1678, 4784, 29918, 271, 353, 4733, 29889, 11384, 3073, 29898, 6921, 29918, 3707, 29922, 5574, 29897, 13, 13, 1990, 26178, 18087, 29931, 287, 914, 29898, 9794, 29889, 3195, 1125, 13, 13, 1678, 9995, 1293, 310, 8536, 4430, 5253, 304, 1269, 1404, 1090, 1021, 11261, 13, 268, 13, 1678, 6212, 5026, 29901, 13, 4706, 2825, 29918, 271, 313, 11116, 1125, 12953, 13, 4706, 2825, 29918, 1609, 313, 11116, 1125, 12953, 13, 4706, 8536, 4430, 29918, 14506, 313, 11116, 1125, 12953, 13, 4706, 8536, 4430, 29918, 1792, 313, 11116, 1125, 12953, 13, 4706, 4784, 29918, 271, 313, 11116, 1125, 12953, 13, 4706, 4784, 29918, 1609, 313, 11116, 1125, 12953, 13, 1678, 9995, 13, 268, 13, 1678, 8536, 4430, 29918, 1792, 29871, 353, 4733, 29889, 27755, 2558, 29898, 13, 462, 18884, 6055, 29889, 20656, 29950, 29918, 11889, 29918, 20387, 29931, 29892, 29871, 13, 462, 18884, 4475, 29918, 978, 29922, 525, 4977, 29918, 839, 914, 29918, 1792, 742, 29871, 13, 462, 18884, 373, 29918, 8143, 29922, 9794, 29889, 29907, 3289, 5454, 2287, 13, 462, 9651, 1723, 13, 1678, 8536, 4430, 29918, 14506, 353, 4733, 29889, 7798, 3073, 580, 13, 1678, 2825, 29918, 1609, 353, 4733, 29889, 27755, 2558, 29898, 13, 462, 9651, 6055, 29889, 20656, 29950, 29918, 11889, 29918, 20387, 29931, 29892, 29871, 13, 462, 9651, 4475, 29918, 978, 29922, 525, 4977, 29918, 839, 914, 29918, 11600, 742, 29871, 13, 462, 9651, 373, 29918, 8143, 29922, 9794, 29889, 29907, 3289, 5454, 2287, 13, 462, 4706, 1723, 13, 1678, 4784, 29918, 1609, 353, 4733, 29889, 27755, 2558, 29898, 13, 462, 9651, 6055, 29889, 20656, 29950, 29918, 11889, 29918, 20387, 29931, 29892, 29871, 13, 462, 9651, 4475, 29918, 978, 29922, 525, 4977, 29918, 839, 914, 29918, 21402, 742, 13, 462, 9651, 373, 29918, 8143, 29922, 9794, 29889, 29907, 3289, 5454, 2287, 13, 462, 4706, 1723, 13, 1678, 2825, 29918, 271, 353, 4733, 29889, 11384, 3073, 29898, 6921, 29918, 3707, 29918, 1202, 29922, 5574, 29897, 268, 13, 1678, 4784, 29918, 271, 353, 4733, 29889, 11384, 3073, 29898, 6921, 29918, 3707, 29922, 5574, 29897, 13, 2 ]
Packs/Pcysys/Integrations/Pcysys/Pcysys_test.py
diCagri/content
799
158790
import demistomock as demisto import jwt from Pcysys import Client, pentera_run_template_command, pentera_get_task_run_status_command, \ pentera_get_task_run_full_action_report_command, pentera_authentication MOCK_PENTERA_FULL_ACTION_REPORT = 'penterascan-5e4530961deb8eda82b08730.csv' MOCK_CSV = open('TestData/mock_csv_file', 'r').read() MOCK_AUTHENTICATION = { "token": "TOKEN", "tgt": "TGT" } MOCK_AUTHENTICATION_EXP = 1579763364 MOCK_RUN_TEMPLATE = { "taskRuns": [ { "status": "Running", "taskRunId": "5e41923cf24e1f99979b1cb4", "taskRunName": "Test mock task run name", "startTime": 1581348380358.0, "endTime": 1581349123973.0, } ], } MOCK_TASK_RUN_STATS = { "taskRuns": [ { "taskRunId": "5e41923cf24e1f99979b1cb4", "taskRunName": "Test mock task run name", "startTime": 1581348380358.0, "endTime": 1581349123973.0, "status": "Warning" } ] } def test_pentera_get_task_run_full_action_report(mocker, requests_mock): mocker.patch.object(demisto, 'params', return_value={ 'url': 'https://pentera.com', 'port': '8181' }) mocker.patch.object(demisto, 'getIntegrationContext', return_value={ 'base_url': 'https://pentera.com', 'tgt': 'omgNewTGT', 'accessToken': '<PASSWORD>', 'expiry': MOCK_AUTHENTICATION_EXP }) mocker.patch.object(demisto, 'args', return_value={ 'task_run_id': '5e4530961deb8eda82b08730' }) requests_mock.get('https://pentera.com:8181/api/v1/taskRun/5e4530961deb8eda82b08730/fullActionReportCSV', text=MOCK_CSV) client_id = demisto.params().get('clientId') tgt = demisto.params().get('tgt') base_url = demisto.params()['url'].rstrip('/') + ':' + demisto.params()['port'] verify_certificate = not demisto.params().get('insecure', False) proxy = demisto.params().get('proxy', False) args = demisto.args() client = Client( base_url=base_url, tgt=tgt, verify=verify_certificate, client_id=client_id, proxy=proxy, headers={'Accept': 'application/json'}) entries = pentera_get_task_run_full_action_report_command(client, args) raw_csv_file_name = entries[0]['File'] assert raw_csv_file_name == MOCK_PENTERA_FULL_ACTION_REPORT task_run_id = entries[1]['EntryContext']['Pentera.TaskRun(val.ID == obj.ID)']['ID'] assert task_run_id == '5e4530961deb8eda82b08730' operation_type = entries[1]['EntryContext']['Pentera.TaskRun(val.ID == obj.ID)']['FullActionReport'][0][ 'Operation Type'] assert operation_type == 'BlueKeep (CVE-2019-0708) Vulnerability Discovery' def test_pentera_get_task_run_stats(mocker, requests_mock): mocker.patch.object(demisto, 'params', return_value={ 'url': 'https://pentera.com', 'port': '8181' }) mocker.patch.object(demisto, 'getIntegrationContext', return_value={ 'base_url': 'https://pentera.com', 'tgt': 'omgNewTGT', 'accessToken': 'omg<PASSWORD>', 'expiry': MOCK_AUTHENTICATION_EXP }) mocker.patch.object(demisto, 'args', return_value={ 'task_run_id': '5e41923cf24e1f99979b1cb4' }) requests_mock.get('https://pentera.com:8181/api/v1/taskRun/5e41923cf24e1f99979b1cb4', json=MOCK_RUN_TEMPLATE) client_id = demisto.params().get('clientId') tgt = demisto.params().get('tgt') base_url = demisto.params()['url'].rstrip('/') + ':' + demisto.params()['port'] verify_certificate = not demisto.params().get('insecure', False) proxy = demisto.params().get('proxy', False) args = demisto.args() client = Client( base_url=base_url, tgt=tgt, verify=verify_certificate, client_id=client_id, proxy=proxy, headers={'Accept': 'application/json'}) readable, parsed, raw = pentera_get_task_run_status_command(client, args) assert parsed['Pentera.TaskRun(val.ID == obj.ID)']['ID'] == MOCK_TASK_RUN_STATS['taskRuns'][0]['taskRunId'] def test_pentera_run_template(mocker, requests_mock): mocker.patch.object(demisto, 'params', return_value={ 'url': 'https://pentera.com', 'port': '8181' }) mocker.patch.object(demisto, 'getIntegrationContext', return_value={ 'base_url': 'https://pentera.com', 'tgt': 'omgNewTGT', 'accessToken': 'omgNewSecret', 'expiry': MOCK_AUTHENTICATION_EXP }) mocker.patch.object(demisto, 'args', return_value={ 'template_name': 'omgRunThisTemplate' }) requests_mock.post('https://pentera.com:8181/api/v1/template/runBulk', json=MOCK_RUN_TEMPLATE) client_id = demisto.params().get('clientId') tgt = demisto.params().get('tgt') base_url = demisto.params()['url'].rstrip('/') + ':' + demisto.params()['port'] verify_certificate = not demisto.params().get('insecure', False) proxy = demisto.params().get('proxy', False) args = demisto.args() client = Client( base_url=base_url, tgt=tgt, verify=verify_certificate, client_id=client_id, proxy=proxy, headers={'Accept': 'application/json'}) readable, parsed, raw = pentera_run_template_command(client, args) assert parsed['Pentera.TaskRun(val.ID == obj.ID)']['Status'] == MOCK_RUN_TEMPLATE['taskRuns'][0]['status'] def test_pentera_authentication(mocker, requests_mock): mocker.patch.object(demisto, 'params', return_value={ 'clientId': 'mmtzv', 'tgt': 'omgSecretsWow', 'url': 'https://pentera.com', 'port': '8181' }) mocker.patch.object(jwt, 'get_unverified_header', return_value={'alg': 'HS256', 'exp': 1579763364, 'iat': 1579762464}) requests_mock.post('https://pentera.com:8181/auth/token', json=MOCK_AUTHENTICATION) mocker.patch.object(demisto, 'args', return_value={}) mocker.patch.object(demisto, 'setIntegrationContext') client_id = demisto.params().get('clientId') tgt = demisto.params().get('tgt') base_url = demisto.params()['url'].rstrip('/') + ':' + demisto.params()['port'] verify_certificate = not demisto.params().get('insecure', False) proxy = demisto.params().get('proxy', False) client = Client( base_url=base_url, tgt=tgt, verify=verify_certificate, client_id=client_id, proxy=proxy, headers={'Accept': 'application/json'}) pentera_authentication(client) assert demisto.setIntegrationContext.call_count == 1 integration_context = demisto.setIntegrationContext.call_args[0][0] assert isinstance(integration_context, dict) assert integration_context['expiry'] == MOCK_AUTHENTICATION_EXP assert integration_context['accessToken'] == MOCK_AUTHENTICATION['token']
[ 1, 1053, 1261, 391, 290, 1698, 408, 1261, 5137, 13, 5215, 432, 14554, 13, 13, 3166, 349, 29883, 952, 952, 1053, 12477, 29892, 11137, 1572, 29918, 3389, 29918, 6886, 29918, 6519, 29892, 11137, 1572, 29918, 657, 29918, 7662, 29918, 3389, 29918, 4882, 29918, 6519, 29892, 320, 13, 1678, 11137, 1572, 29918, 657, 29918, 7662, 29918, 3389, 29918, 8159, 29918, 2467, 29918, 12276, 29918, 6519, 29892, 11137, 1572, 29918, 23055, 13, 13, 13, 6720, 7077, 29918, 29925, 3919, 1001, 29909, 29918, 29943, 3299, 29918, 24705, 29918, 1525, 15082, 353, 525, 29886, 5893, 294, 3068, 29899, 29945, 29872, 29946, 29945, 29941, 29900, 29929, 29953, 29896, 16529, 29947, 8710, 29947, 29906, 29890, 29900, 29947, 29955, 29941, 29900, 29889, 7638, 29915, 13, 6720, 7077, 29918, 29907, 7597, 353, 1722, 877, 3057, 1469, 29914, 17640, 29918, 7638, 29918, 1445, 742, 525, 29878, 2824, 949, 580, 13, 6720, 7077, 29918, 20656, 29950, 3919, 28541, 353, 426, 13, 1678, 376, 6979, 1115, 376, 4986, 29968, 1430, 613, 13, 1678, 376, 29873, 4141, 1115, 376, 29911, 23799, 29908, 13, 29913, 13, 6720, 7077, 29918, 20656, 29950, 3919, 28541, 29918, 5746, 29925, 353, 29871, 29896, 29945, 29955, 29929, 29955, 29953, 29941, 29941, 29953, 29946, 13, 6720, 7077, 29918, 29934, 3904, 29918, 4330, 3580, 29931, 3040, 353, 426, 13, 1678, 376, 7662, 6558, 29879, 1115, 518, 13, 4706, 426, 13, 9651, 376, 4882, 1115, 376, 27795, 613, 13, 9651, 376, 7662, 6558, 1204, 1115, 376, 29945, 29872, 29946, 29896, 29929, 29906, 29941, 6854, 29906, 29946, 29872, 29896, 29888, 29929, 29929, 29929, 29955, 29929, 29890, 29896, 10702, 29946, 613, 13, 9651, 376, 7662, 6558, 1170, 1115, 376, 3057, 11187, 3414, 1065, 1024, 613, 13, 9651, 376, 2962, 2481, 1115, 29871, 29896, 29945, 29947, 29896, 29941, 29946, 29947, 29941, 29947, 29900, 29941, 29945, 29947, 29889, 29900, 29892, 13, 9651, 376, 355, 2481, 1115, 29871, 29896, 29945, 29947, 29896, 29941, 29946, 29929, 29896, 29906, 29941, 29929, 29955, 29941, 29889, 29900, 29892, 13, 4706, 500, 13, 1678, 21251, 13, 29913, 13, 6720, 7077, 29918, 29911, 3289, 29968, 29918, 29934, 3904, 29918, 17816, 29903, 353, 426, 13, 1678, 376, 7662, 6558, 29879, 1115, 518, 13, 4706, 426, 13, 9651, 376, 7662, 6558, 1204, 1115, 376, 29945, 29872, 29946, 29896, 29929, 29906, 29941, 6854, 29906, 29946, 29872, 29896, 29888, 29929, 29929, 29929, 29955, 29929, 29890, 29896, 10702, 29946, 613, 13, 9651, 376, 7662, 6558, 1170, 1115, 376, 3057, 11187, 3414, 1065, 1024, 613, 13, 9651, 376, 2962, 2481, 1115, 29871, 29896, 29945, 29947, 29896, 29941, 29946, 29947, 29941, 29947, 29900, 29941, 29945, 29947, 29889, 29900, 29892, 13, 9651, 376, 355, 2481, 1115, 29871, 29896, 29945, 29947, 29896, 29941, 29946, 29929, 29896, 29906, 29941, 29929, 29955, 29941, 29889, 29900, 29892, 13, 9651, 376, 4882, 1115, 376, 22709, 29908, 13, 4706, 500, 13, 1678, 4514, 13, 29913, 13, 13, 13, 1753, 1243, 29918, 22825, 1572, 29918, 657, 29918, 7662, 29918, 3389, 29918, 8159, 29918, 2467, 29918, 12276, 29898, 29885, 8658, 29892, 7274, 29918, 17640, 1125, 13, 1678, 286, 8658, 29889, 5041, 29889, 3318, 29898, 2310, 5137, 29892, 525, 7529, 742, 736, 29918, 1767, 3790, 13, 4706, 525, 2271, 2396, 525, 991, 597, 22825, 1572, 29889, 510, 742, 13, 4706, 525, 637, 2396, 525, 29947, 29896, 29947, 29896, 29915, 13, 1678, 5615, 13, 1678, 286, 8658, 29889, 5041, 29889, 3318, 29898, 2310, 5137, 29892, 525, 657, 23573, 362, 2677, 742, 736, 29918, 1767, 3790, 13, 4706, 525, 3188, 29918, 2271, 2396, 525, 991, 597, 22825, 1572, 29889, 510, 742, 13, 4706, 525, 29873, 4141, 2396, 525, 290, 29887, 4373, 29911, 23799, 742, 13, 4706, 525, 5943, 6066, 2396, 12801, 25711, 17013, 29958, 742, 13, 4706, 525, 4548, 16129, 2396, 16999, 7077, 29918, 20656, 29950, 3919, 28541, 29918, 5746, 29925, 13, 1678, 5615, 13, 1678, 286, 8658, 29889, 5041, 29889, 3318, 29898, 2310, 5137, 29892, 525, 5085, 742, 736, 29918, 1767, 3790, 13, 4706, 525, 7662, 29918, 3389, 29918, 333, 2396, 525, 29945, 29872, 29946, 29945, 29941, 29900, 29929, 29953, 29896, 16529, 29947, 8710, 29947, 29906, 29890, 29900, 29947, 29955, 29941, 29900, 29915, 13, 1678, 5615, 13, 1678, 7274, 29918, 17640, 29889, 657, 877, 991, 597, 22825, 1572, 29889, 510, 29901, 29947, 29896, 29947, 29896, 29914, 2754, 29914, 29894, 29896, 29914, 7662, 6558, 29914, 29945, 29872, 29946, 29945, 29941, 29900, 29929, 29953, 29896, 16529, 29947, 8710, 29947, 29906, 29890, 29900, 29947, 29955, 29941, 29900, 29914, 8159, 4276, 13020, 29907, 7597, 742, 13, 462, 418, 1426, 29922, 6720, 7077, 29918, 29907, 7597, 29897, 13, 1678, 3132, 29918, 333, 353, 1261, 5137, 29889, 7529, 2141, 657, 877, 4645, 1204, 1495, 13, 1678, 260, 4141, 353, 1261, 5137, 29889, 7529, 2141, 657, 877, 29873, 4141, 1495, 13, 1678, 2967, 29918, 2271, 353, 1261, 5137, 29889, 7529, 580, 1839, 2271, 13359, 29878, 17010, 11219, 1495, 718, 525, 11283, 718, 1261, 5137, 29889, 7529, 580, 1839, 637, 2033, 13, 1678, 11539, 29918, 6327, 8021, 353, 451, 1261, 5137, 29889, 7529, 2141, 657, 877, 262, 24216, 742, 7700, 29897, 13, 1678, 10166, 353, 1261, 5137, 29889, 7529, 2141, 657, 877, 14701, 742, 7700, 29897, 13, 1678, 6389, 353, 1261, 5137, 29889, 5085, 580, 13, 1678, 3132, 353, 12477, 29898, 13, 4706, 2967, 29918, 2271, 29922, 3188, 29918, 2271, 29892, 13, 4706, 260, 4141, 29922, 29873, 4141, 29892, 13, 4706, 11539, 29922, 27902, 29918, 6327, 8021, 29892, 13, 4706, 3132, 29918, 333, 29922, 4645, 29918, 333, 29892, 13, 4706, 10166, 29922, 14701, 29892, 13, 4706, 9066, 3790, 29915, 23965, 2396, 525, 6214, 29914, 3126, 29915, 1800, 13, 1678, 9976, 353, 11137, 1572, 29918, 657, 29918, 7662, 29918, 3389, 29918, 8159, 29918, 2467, 29918, 12276, 29918, 6519, 29898, 4645, 29892, 6389, 29897, 13, 1678, 10650, 29918, 7638, 29918, 1445, 29918, 978, 353, 9976, 29961, 29900, 22322, 2283, 2033, 13, 1678, 4974, 10650, 29918, 7638, 29918, 1445, 29918, 978, 1275, 16999, 7077, 29918, 29925, 3919, 1001, 29909, 29918, 29943, 3299, 29918, 24705, 29918, 1525, 15082, 13, 1678, 3414, 29918, 3389, 29918, 333, 353, 9976, 29961, 29896, 22322, 9634, 2677, 16215, 29925, 296, 1572, 29889, 5398, 6558, 29898, 791, 29889, 1367, 1275, 5446, 29889, 1367, 29897, 16215, 1367, 2033, 13, 1678, 4974, 3414, 29918, 3389, 29918, 333, 1275, 525, 29945, 29872, 29946, 29945, 29941, 29900, 29929, 29953, 29896, 16529, 29947, 8710, 29947, 29906, 29890, 29900, 29947, 29955, 29941, 29900, 29915, 13, 1678, 5858, 29918, 1853, 353, 9976, 29961, 29896, 22322, 9634, 2677, 16215, 29925, 296, 1572, 29889, 5398, 6558, 29898, 791, 29889, 1367, 1275, 5446, 29889, 1367, 29897, 16215, 13658, 4276, 13020, 2033, 29961, 29900, 3816, 13, 4706, 525, 10925, 5167, 2033, 13, 1678, 4974, 5858, 29918, 1853, 1275, 525, 21319, 9598, 1022, 313, 29907, 12064, 29899, 29906, 29900, 29896, 29929, 29899, 29900, 29955, 29900, 29947, 29897, 478, 352, 1089, 3097, 8565, 22205, 29915, 13, 13, 13, 1753, 1243, 29918, 22825, 1572, 29918, 657, 29918, 7662, 29918, 3389, 29918, 16202, 29898, 29885, 8658, 29892, 7274, 29918, 17640, 1125, 13, 1678, 286, 8658, 29889, 5041, 29889, 3318, 29898, 2310, 5137, 29892, 525, 7529, 742, 736, 29918, 1767, 3790, 13, 4706, 525, 2271, 2396, 525, 991, 597, 22825, 1572, 29889, 510, 742, 13, 4706, 525, 637, 2396, 525, 29947, 29896, 29947, 29896, 29915, 13, 1678, 5615, 13, 1678, 286, 8658, 29889, 5041, 29889, 3318, 29898, 2310, 5137, 29892, 525, 657, 23573, 362, 2677, 742, 736, 29918, 1767, 3790, 13, 4706, 525, 3188, 29918, 2271, 2396, 525, 991, 597, 22825, 1572, 29889, 510, 742, 13, 4706, 525, 29873, 4141, 2396, 525, 290, 29887, 4373, 29911, 23799, 742, 13, 4706, 525, 5943, 6066, 2396, 525, 290, 29887, 29966, 25711, 17013, 29958, 742, 13, 4706, 525, 4548, 16129, 2396, 16999, 7077, 29918, 20656, 29950, 3919, 28541, 29918, 5746, 29925, 13, 1678, 5615, 13, 1678, 286, 8658, 29889, 5041, 29889, 3318, 29898, 2310, 5137, 29892, 525, 5085, 742, 736, 29918, 1767, 3790, 13, 4706, 525, 7662, 29918, 3389, 29918, 333, 2396, 525, 29945, 29872, 29946, 29896, 29929, 29906, 29941, 6854, 29906, 29946, 29872, 29896, 29888, 29929, 29929, 29929, 29955, 29929, 29890, 29896, 10702, 29946, 29915, 13, 1678, 5615, 13, 1678, 7274, 29918, 17640, 29889, 657, 877, 991, 597, 22825, 1572, 29889, 510, 29901, 29947, 29896, 29947, 29896, 29914, 2754, 29914, 29894, 29896, 29914, 7662, 6558, 29914, 29945, 29872, 29946, 29896, 29929, 29906, 29941, 6854, 29906, 29946, 29872, 29896, 29888, 29929, 29929, 29929, 29955, 29929, 29890, 29896, 10702, 29946, 742, 13, 462, 418, 4390, 29922, 6720, 7077, 29918, 29934, 3904, 29918, 4330, 3580, 29931, 3040, 29897, 13, 1678, 3132, 29918, 333, 353, 1261, 5137, 29889, 7529, 2141, 657, 877, 4645, 1204, 1495, 13, 1678, 260, 4141, 353, 1261, 5137, 29889, 7529, 2141, 657, 877, 29873, 4141, 1495, 13, 1678, 2967, 29918, 2271, 353, 1261, 5137, 29889, 7529, 580, 1839, 2271, 13359, 29878, 17010, 11219, 1495, 718, 525, 11283, 718, 1261, 5137, 29889, 7529, 580, 1839, 637, 2033, 13, 1678, 11539, 29918, 6327, 8021, 353, 451, 1261, 5137, 29889, 7529, 2141, 657, 877, 262, 24216, 742, 7700, 29897, 13, 1678, 10166, 353, 1261, 5137, 29889, 7529, 2141, 657, 877, 14701, 742, 7700, 29897, 13, 1678, 6389, 353, 1261, 5137, 29889, 5085, 580, 13, 1678, 3132, 353, 12477, 29898, 13, 4706, 2967, 29918, 2271, 29922, 3188, 29918, 2271, 29892, 13, 4706, 260, 4141, 29922, 29873, 4141, 29892, 13, 4706, 11539, 29922, 27902, 29918, 6327, 8021, 29892, 13, 4706, 3132, 29918, 333, 29922, 4645, 29918, 333, 29892, 13, 4706, 10166, 29922, 14701, 29892, 13, 4706, 9066, 3790, 29915, 23965, 2396, 525, 6214, 29914, 3126, 29915, 1800, 13, 1678, 19909, 29892, 21213, 29892, 10650, 353, 11137, 1572, 29918, 657, 29918, 7662, 29918, 3389, 29918, 4882, 29918, 6519, 29898, 4645, 29892, 6389, 29897, 13, 13, 1678, 4974, 21213, 1839, 29925, 296, 1572, 29889, 5398, 6558, 29898, 791, 29889, 1367, 1275, 5446, 29889, 1367, 29897, 16215, 1367, 2033, 1275, 16999, 7077, 29918, 29911, 3289, 29968, 29918, 29934, 3904, 29918, 17816, 29903, 1839, 7662, 6558, 29879, 2033, 29961, 29900, 22322, 7662, 6558, 1204, 2033, 13, 13, 13, 1753, 1243, 29918, 22825, 1572, 29918, 3389, 29918, 6886, 29898, 29885, 8658, 29892, 7274, 29918, 17640, 1125, 13, 1678, 286, 8658, 29889, 5041, 29889, 3318, 29898, 2310, 5137, 29892, 525, 7529, 742, 736, 29918, 1767, 3790, 13, 4706, 525, 2271, 2396, 525, 991, 597, 22825, 1572, 29889, 510, 742, 13, 4706, 525, 637, 2396, 525, 29947, 29896, 29947, 29896, 29915, 13, 1678, 5615, 13, 1678, 286, 8658, 29889, 5041, 29889, 3318, 29898, 2310, 5137, 29892, 525, 657, 23573, 362, 2677, 742, 736, 29918, 1767, 3790, 13, 4706, 525, 3188, 29918, 2271, 2396, 525, 991, 597, 22825, 1572, 29889, 510, 742, 13, 4706, 525, 29873, 4141, 2396, 525, 290, 29887, 4373, 29911, 23799, 742, 13, 4706, 525, 5943, 6066, 2396, 525, 290, 29887, 4373, 28459, 742, 13, 4706, 525, 4548, 16129, 2396, 16999, 7077, 29918, 20656, 29950, 3919, 28541, 29918, 5746, 29925, 13, 1678, 5615, 13, 1678, 286, 8658, 29889, 5041, 29889, 3318, 29898, 2310, 5137, 29892, 525, 5085, 742, 736, 29918, 1767, 3790, 13, 4706, 525, 6886, 29918, 978, 2396, 525, 290, 29887, 6558, 4013, 6733, 29915, 13, 1678, 5615, 13, 1678, 7274, 29918, 17640, 29889, 2490, 877, 991, 597, 22825, 1572, 29889, 510, 29901, 29947, 29896, 29947, 29896, 29914, 2754, 29914, 29894, 29896, 29914, 6886, 29914, 3389, 29933, 24456, 742, 4390, 29922, 6720, 7077, 29918, 29934, 3904, 29918, 4330, 3580, 29931, 3040, 29897, 13, 1678, 3132, 29918, 333, 353, 1261, 5137, 29889, 7529, 2141, 657, 877, 4645, 1204, 1495, 13, 1678, 260, 4141, 353, 1261, 5137, 29889, 7529, 2141, 657, 877, 29873, 4141, 1495, 13, 1678, 2967, 29918, 2271, 353, 1261, 5137, 29889, 7529, 580, 1839, 2271, 13359, 29878, 17010, 11219, 1495, 718, 525, 11283, 718, 1261, 5137, 29889, 7529, 580, 1839, 637, 2033, 13, 1678, 11539, 29918, 6327, 8021, 353, 451, 1261, 5137, 29889, 7529, 2141, 657, 877, 262, 24216, 742, 7700, 29897, 13, 1678, 10166, 353, 1261, 5137, 29889, 7529, 2141, 657, 877, 14701, 742, 7700, 29897, 13, 1678, 6389, 353, 1261, 5137, 29889, 5085, 580, 13, 1678, 3132, 353, 12477, 29898, 13, 4706, 2967, 29918, 2271, 29922, 3188, 29918, 2271, 29892, 13, 4706, 260, 4141, 29922, 29873, 4141, 29892, 13, 4706, 11539, 29922, 27902, 29918, 6327, 8021, 29892, 13, 4706, 3132, 29918, 333, 29922, 4645, 29918, 333, 29892, 13, 4706, 10166, 29922, 14701, 29892, 13, 4706, 9066, 3790, 29915, 23965, 2396, 525, 6214, 29914, 3126, 29915, 1800, 13, 1678, 19909, 29892, 21213, 29892, 10650, 353, 11137, 1572, 29918, 3389, 29918, 6886, 29918, 6519, 29898, 4645, 29892, 6389, 29897, 13, 1678, 4974, 21213, 1839, 29925, 296, 1572, 29889, 5398, 6558, 29898, 791, 29889, 1367, 1275, 5446, 29889, 1367, 29897, 16215, 5709, 2033, 1275, 16999, 7077, 29918, 29934, 3904, 29918, 4330, 3580, 29931, 3040, 1839, 7662, 6558, 29879, 2033, 29961, 29900, 22322, 4882, 2033, 13, 13, 13, 1753, 1243, 29918, 22825, 1572, 29918, 23055, 29898, 29885, 8658, 29892, 7274, 29918, 17640, 1125, 13, 1678, 286, 8658, 29889, 5041, 29889, 3318, 29898, 2310, 5137, 29892, 525, 7529, 742, 736, 29918, 1767, 3790, 13, 4706, 525, 4645, 1204, 2396, 525, 4317, 17559, 29894, 742, 13, 4706, 525, 29873, 4141, 2396, 525, 290, 29887, 7898, 27487, 29956, 340, 742, 13, 4706, 525, 2271, 2396, 525, 991, 597, 22825, 1572, 29889, 510, 742, 13, 4706, 525, 637, 2396, 525, 29947, 29896, 29947, 29896, 29915, 13, 1678, 5615, 13, 1678, 286, 8658, 29889, 5041, 29889, 3318, 29898, 29926, 14554, 29892, 525, 657, 29918, 348, 369, 2164, 29918, 6672, 742, 13, 462, 4706, 736, 29918, 1767, 3790, 29915, 9564, 2396, 525, 14851, 29906, 29945, 29953, 742, 525, 4548, 2396, 29871, 29896, 29945, 29955, 29929, 29955, 29953, 29941, 29941, 29953, 29946, 29892, 525, 7163, 2396, 29871, 29896, 29945, 29955, 29929, 29955, 29953, 29906, 29946, 29953, 29946, 1800, 13, 13, 1678, 7274, 29918, 17640, 29889, 2490, 877, 991, 597, 22825, 1572, 29889, 510, 29901, 29947, 29896, 29947, 29896, 29914, 5150, 29914, 6979, 742, 4390, 29922, 6720, 7077, 29918, 20656, 29950, 3919, 28541, 29897, 13, 1678, 286, 8658, 29889, 5041, 29889, 3318, 29898, 2310, 5137, 29892, 525, 5085, 742, 736, 29918, 1767, 3790, 1800, 13, 1678, 286, 8658, 29889, 5041, 29889, 3318, 29898, 2310, 5137, 29892, 525, 842, 23573, 362, 2677, 1495, 13, 13, 1678, 3132, 29918, 333, 353, 1261, 5137, 29889, 7529, 2141, 657, 877, 4645, 1204, 1495, 13, 1678, 260, 4141, 353, 1261, 5137, 29889, 7529, 2141, 657, 877, 29873, 4141, 1495, 13, 1678, 2967, 29918, 2271, 353, 1261, 5137, 29889, 7529, 580, 1839, 2271, 13359, 29878, 17010, 11219, 1495, 718, 525, 11283, 718, 1261, 5137, 29889, 7529, 580, 1839, 637, 2033, 13, 1678, 11539, 29918, 6327, 8021, 353, 451, 1261, 5137, 29889, 7529, 2141, 657, 877, 262, 24216, 742, 7700, 29897, 13, 1678, 10166, 353, 1261, 5137, 29889, 7529, 2141, 657, 877, 14701, 742, 7700, 29897, 13, 1678, 3132, 353, 12477, 29898, 13, 4706, 2967, 29918, 2271, 29922, 3188, 29918, 2271, 29892, 13, 4706, 260, 4141, 29922, 29873, 4141, 29892, 13, 4706, 11539, 29922, 27902, 29918, 6327, 8021, 29892, 13, 4706, 3132, 29918, 333, 29922, 4645, 29918, 333, 29892, 13, 4706, 10166, 29922, 14701, 29892, 13, 4706, 9066, 3790, 29915, 23965, 2396, 525, 6214, 29914, 3126, 29915, 1800, 13, 1678, 11137, 1572, 29918, 23055, 29898, 4645, 29897, 13, 13, 1678, 4974, 1261, 5137, 29889, 842, 23573, 362, 2677, 29889, 4804, 29918, 2798, 1275, 29871, 29896, 13, 1678, 13465, 29918, 4703, 353, 1261, 5137, 29889, 842, 23573, 362, 2677, 29889, 4804, 29918, 5085, 29961, 29900, 3816, 29900, 29962, 13, 1678, 4974, 338, 8758, 29898, 27925, 29918, 4703, 29892, 9657, 29897, 13, 1678, 4974, 13465, 29918, 4703, 1839, 4548, 16129, 2033, 1275, 16999, 7077, 29918, 20656, 29950, 3919, 28541, 29918, 5746, 29925, 13, 1678, 4974, 13465, 29918, 4703, 1839, 5943, 6066, 2033, 1275, 16999, 7077, 29918, 20656, 29950, 3919, 28541, 1839, 6979, 2033, 13, 2 ]
src/python/weblyzard_api/client/openrdf/__init__.py
PhilippKuntschik/weblyzard_api
9
94646
<reponame>PhilippKuntschik/weblyzard_api<gh_stars>1-10 #!/usr/bin/python # -*- coding: utf8 -*- ''' Created on 19.12.2013 @author: heinz-peterlang For details: `check Sesame REST API<http://openrdf.callimachus.net/sesame/2.7/docs/system.docbook?view#The_Sesame_REST_HTTP_Protocol>`_ http://www.csee.umbc.edu/courses/graduate/691/spring14/01/examples/sesame/openrdf-sesame-2.6.10/docs/system/ch08.html ''' from __future__ import print_function from __future__ import unicode_literals from future import standard_library standard_library.install_aliases() from builtins import object import ast import httplib2 import json import os import requests import urllib.request, urllib.parse, urllib.error from SPARQLWrapper import SPARQLWrapper, JSON from collections import namedtuple from pprint import pprint try: from urllib.parse import urlencode except ImportError: from urllib import urlencode QUERIES = { 'configured_profiles': ''' PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#> PREFIX re: <http://www.semanticlab.net/prj/recognize/voc/> SELECT ?s ?profile_name ?analyzer WHERE { ?s rdfs:label ?profile_name . ?s re:analyzer ?analyzer . }''', 'all_subjects': ''' select distinct ?s where {?s ?p ?o} ''' } RepositoryDetail = namedtuple('RepositoryDetail', ['id', 'uri', 'title']) class OpenRdfClient(object): DEFAULT_HEADERS = {'Accept': 'application/sparql-results+json'} URL_MAPPING = {'get_repositories': ('/repositories', 'GET'), 'fetch_statements_repository': ('', 'GET')} def __init__(self, server_uri): ''' initializes the client :param server_uri: URL of the server ''' plain_server_uri = server_uri if not 'openrdf-sesame' in server_uri: server_uri = '%s/openrdf-sesame' % server_uri self.server_uri = server_uri self.repository_url_tmplt = self.server_uri + '/repositories/%s' server_update_uri = '%s/openrdf-workbench' % plain_server_uri self.repository_url_update_tmplt = server_update_uri + \ '/repositories/%s/update' def run_query(self, repository_name, query): sparql = SPARQLWrapper(self.repository_url_tmplt % repository_name) sparql.setQuery(query.strip()) sparql.setReturnFormat(JSON) results = sparql.query().convert() for result in results['results']['bindings']: yield result def update_query(self, repository_name, query): sparql = SPARQLWrapper( self.repository_url_update_tmplt % repository_name) sparql.setQuery(query.strip()) sparql.setMethod('POST') sparql.query() def cleanup_config(self): ''' ''' for orphan in self.get_orphaned_analyzers(): self.delete_statements(self.config_repository, subj='_:%s' % orphan, delete=True) def get_orphaned_analyzers(self): profiles = self.get_profiles() configured = [] for profile in profiles.values(): configured.extend(profile['analyzers']) orphaned = [] query = QUERIES['all_subjects'] for result in self.run_query(self.config_repository, query): name = result['s']['value'] if name.startswith('genid'): if name in configured: pass else: orphaned.append(name) return orphaned def get_profiles(self): ''' returns a dictionary (subject_uri, profile_name) for all profiles configured in the config repositoriy ''' self.check_config_repo() query = QUERIES['configured_profiles'] profiles = {} for result in self.run_query(self.config_repository, query): profile = {} profile_name = result['profile_name']['value'] profile['subject_uri'] = result['s']['value'] profile['analyzers'] = [result['analyzer']['value']] if profile_name in profiles: profiles[profile_name]['analyzers'].extend( profile['analyzers']) else: profiles[profile_name] = profile return profiles def remove_profile(self, profile_name): ''' Removes a given profile name ''' subject_uris = [] profiles = self.get_profiles() if profile_name in profiles: profile = profiles[profile_name] if not profile_name.startswith('pr:'): profile_name = 'pr:%s' % profile_name subject_uris.extend( ['<%s>' % analyzer for analyzer in profile['analyzers']]) subject_uris.append('<%s>' % profile['subject_uri']) if len(subject_uris): # if not subject_uri.startswith('pr:'): # subject_uri = 'pr:%s' % subject_uri # if not subject_uri.endswith('>'): # subject_uri = '%s>' % subject_uri for subject_uri in subject_uris: try: self.delete_statements(self.config_repository, subj=subject_uri, delete=True) except Exception as e: print(e) def update_profile(self, profile_name, profile_definition): ''' Updates the given profile on the server ''' profiles = self.get_profiles() if profile_name in profiles: subject_uri = profiles[profile_name]['subject_uri'] if not subject_uri.endswith('>'): subject_uri = '%s>' % subject_uri self.delete_statements(self.config_repository, subj=subject_uri, delete=True) self.upload_statement(content=profile_definition, context='config.weblyzard.com', target_repository=self.config_repository) def check_config_repo(self): repositories = self.get_repositories() if not self.config_repository in repositories: print('warning config repo "{}" does not exist'.format( self.config_repository)) def request(self, function, data=None, params=None, delete=False, content_type='applicatoni/rdf+json', accept='application/sparql-results+json'): ''' executes the requests to the TripleStores :param function: function (path) to request :param data: data to add to the POST request :returns: result of the server :rtype: json encoded dict ''' print('{}/{}'.format(self.server_uri, function)) if data: method = 'POST' headers = {'content-type': content_type} else: if delete: method = 'DELETE' else: method = 'GET' headers = {'Accept': accept} if params: function = '%s?%s' % (function, params) print(method, '%{}/{}'.format(self.server_uri, function)) r = requests.request(method, '%s/%s' % (self.server_uri, function), data=data, headers=headers) text = r.text try: return json.loads(r.text) if r.text else r.text except Exception as e: print(text) return text def get_repo_size(self, repo_id): ''' ''' result = self.request('repositories/%s/size' % repo_id) print('get_repo_size', result) def get_repositories(self): ''' ''' result = self.request('repositories') repositories = {} if 'results' in result and 'bindings' in result['results']: for repo in result['results']['bindings']: repo_id = repo['id']['value'] repositories[repo_id] = RepositoryDetail(repo_id, repo['uri']['value'], repo['title']['value']) return repositories def repository_exists(self, repository_name): return repository_name in self.get_repositories() def get_all_statements(self, repository_name): result = self.request('repositories/%s/statements' % repository_name) pprint(result) def delete_statements(self, repository_name, subj=None, pred=None, obj=None, delete=False): function = 'repositories/%s/statements' % repository_name params = {} if subj: params['subj'] = subj if pred: params['pred'] = pred if obj: params['obj'] = obj if params: params = '&'.join(['%s=%s' % (k, v) for k, v in params.items()]) else: params = None return self.request(function, params=params, delete=delete) def upload_statement(self, content, context, target_repository): ''' ''' print('uploading to {}'.format(target_repository)) params = 'context=%s' % context function = 'repositories/%s/statements' % target_repository self.request(function, content, params, delete=False, content_type='application/x-turtle;charset=UTF-8') def check_exists(self, object, repository): ''' ''' query = 'describe <{}>'.format(object) endpoint = "{}/repositories/{}" .format(self.server_uri, repository) # print("POSTing SPARQL query to {}".format(endpoint)) params = {'query': query} headers = { 'content-type': 'application/x-www-form-urlencoded', # 'accept': 'application/sparql-results+json' } (response, content) = httplib2.Http().request(endpoint, 'POST', urllib.parse.urlencode(params), headers=headers) # print("Response %s" % response.status) return (response, content) def execute_query(self, query, repository): ''' ''' params = {'query': query} headers = { 'content-type': 'application/x-www-form-urlencoded', 'accept': 'application/sparql-results+json' } endpoint = "{}/{}/statements".format(self.server_uri, repository) print(endpoint) (response, content) = httplib2.Http().request(endpoint, 'POST', urlencode(params), headers=headers) return (response, ast.literal_eval(content)) def execute_update(self, query, repository): ''' ''' params = {'update': query} headers = { 'content-type': 'application/x-www-form-urlencoded', 'accept': 'application/sparql-results+json' } repository_url = self.repository_url_tmplt % repository endpoint = "%s/statements" % (repository_url) (response, content) = httplib2.Http().request(endpoint, 'POST', urlencode(params), headers=headers) response = response['status'] return(response) def delete_triples_by_types(self, repository, types): ''' ''' for rdf_type in types: query = 'DELETE ?s WHERE {?s ?p ?o FILTER(?s = <%s>)}' % rdf_type self.execute_update(query, repository) def upload_repo_from_file(self, filename, repository): ''' ''' base_fn = os.path.basename(filename) assert base_fn.endswith('ttl') graph = 'file://%s' % base_fn params = {'context': '<' + graph + '>'} endpoint = "%s/%s/statements?%s" % (self.server_uri, repository, urlencode(params)) print("Loading %s into %s in Sesame" % (filename, endpoint)) data = open(filename, 'r').read() (response, content) = httplib2.Http().request(endpoint, 'PUT', body=data, headers={'content-type': 'application/x-turtle'}) print("Response %s" % response.status) print(content) class RecognizeOpenRdfClient(OpenRdfClient): def __init__(self, server_uri, config_repository='config.weblyzard.com'): OpenRdfClient.__init__(self, server_uri) self.config_repository = config_repository def cleanup_config(self): ''' ''' for orphan in self.get_orphaned_analyzers(): self.delete_statements(self.config_repository, subj='_:%s' % orphan, delete=True) def get_orphaned_analyzers(self): ''' ''' profiles = self.get_profiles() configured = [] for profile in profiles.values(): configured.extend(profile['analyzers']) orphaned = [] query = QUERIES['all_subjects'] for result in self.run_query(self.config_repository, query): name = result['s']['value'] if name.startswith('genid'): if name in configured: pass else: orphaned.append(name) return orphaned def get_profiles(self): ''' returns a dictionary (subject_uri, profile_name) for all profiles configured in the config repositoriy ''' self.check_config_repo() query = QUERIES['configured_profiles'] profiles = {} for result in self.run_query(self.config_repository, query): profile = {} profile_name = result['profile_name']['value'] profile['subject_uri'] = result['s']['value'] profile['analyzers'] = [result['analyzer']['value']] if profile_name in profiles: profiles[profile_name]['analyzers'].extend( profile['analyzers']) else: profiles[profile_name] = profile return profiles def remove_profile(self, profile_name): ''' Removes a given profile name ''' subject_uris = [] profiles = self.get_profiles() if profile_name in profiles: profile = profiles[profile_name] if not profile_name.startswith('pr:'): profile_name = 'pr:%s' % profile_name subject_uris.extend( ['<%s>' % analyzer for analyzer in profile['analyzers']]) subject_uris.append('<%s>' % profile['subject_uri']) if len(subject_uris): # if not subject_uri.startswith('pr:'): # subject_uri = 'pr:%s' % subject_uri # if not subject_uri.endswith('>'): # subject_uri = '%s>' % subject_uri for subject_uri in subject_uris: try: self.delete_statements(self.config_repository, subj=subject_uri, delete=True) except (Exception) as e: print(e) def update_profile(self, profile_name, profile_definition): ''' Updates the given profile on the server ''' profiles = self.get_profiles() if profile_name in profiles: print(profile_name) subject_uri = profiles[profile_name]['subject_uri'] # TODO: check why we need to fix this???? if not subject_uri.endswith('>'): subject_uri = '%s>' % subject_uri self.delete_statements(self.config_repository, subj=subject_uri, delete=True) self.upload_statement(content=profile_definition, context='config.weblyzard.com', target_repository=self.config_repository) def check_config_repo(self): ''' ''' repositories = self.get_repositories() if not self.config_repository in repositories: print('warning config repo "{}" does not exist'.format( self.config_repository) ) def create_template(self, entity, entity_type, language='en'): ''' ''' if entity_type.lower() == 'person': names = entity.split('/')[-1].split('_') surname = names[-1] first_names = names[:len(names) - 1] first_name = ' '.join(first_names) tuples = [ '<{}> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://dbpedia.org/ontology/Person> .'.format( entity), '<{}> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .'.format( entity), '<{}> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://schema.org/Person> .'.format( entity), '<{}> <http://dbpedia.org/property/name> "{}, {}"@{} .'.format( entity, surname, first_name, language), '<{}> <http://xmlns.com/foaf/0.1/givenName> "{}"@{} .'.format( entity, first_name, language), '<{}> <http://xmlns.com/foaf/0.1/surname> "{}"@{} .'.format( entity, surname, language), '<{}> <http://www.w3.org/2000/01/rdf-schema#label> "{} {}"@{} . '.format( entity, first_name, surname, language) ] return '\n'.join(tuples) def add_dbpedia_entity_to_repository(self, repository, label, entity_type, language=None): ''' http://de.dbpedia.org/page/Matthias_Strolz?output=text%2Fplain ''' base_url = 'http://dbpedia.org/page/' # if language and language != 'en': # base_url = 'http://{}.dbpedia.org/page/'.format(language) format_suffix = '?output=text%2Fplain' label = label.replace(' ', '_') entity = ''.join([base_url, label]) # entity = entity.format(entity.replace('page', 'resource')) # content = self.create_template(entity, type, language) (result, content) = self.check_exists(entity, repository) # print(result.status, entity, content) # print(result) if result.status and len(content): print('Skipping: {} already exists in repository {}'.format( entity, repository)) return None # else: # url = ''.join([base_url, label, format_suffix]) # dbpedia_url = 'http://dbpedia.org/sparql?default-graph-uri=http%3A%2F%2Fdbpedia.org&query=DESCRIBE%20%3Chttp%3A%2F%2Fdbpedia.org%2Fresource%2F{}%3E&format=text%2Fx-html-script-turtle'.format( # label) # # context = '' # data = requests.get(dbpedia_url) # content = data.content # if not len(content): content = self.create_template(entity, entity_type, language) print(content)
[ 1, 529, 276, 1112, 420, 29958, 4819, 2638, 407, 29968, 1657, 816, 638, 29914, 2676, 368, 29920, 538, 29918, 2754, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 29937, 14708, 4855, 29914, 2109, 29914, 4691, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29947, 448, 29930, 29899, 13, 12008, 13, 20399, 373, 29871, 29896, 29929, 29889, 29896, 29906, 29889, 29906, 29900, 29896, 29941, 13, 13, 29992, 8921, 29901, 540, 262, 29920, 29899, 29886, 1308, 3893, 13, 13, 2831, 4902, 29901, 421, 3198, 22948, 420, 16759, 3450, 29966, 1124, 597, 3150, 29878, 2176, 29889, 4804, 326, 496, 375, 29889, 1212, 29914, 29879, 267, 420, 29914, 29906, 29889, 29955, 29914, 2640, 29914, 5205, 29889, 1514, 2909, 29973, 1493, 29937, 1576, 29918, 29903, 267, 420, 29918, 1525, 1254, 29918, 10493, 29918, 17830, 13885, 29918, 13, 13, 1124, 597, 1636, 29889, 29883, 4149, 29889, 3774, 29883, 29889, 6085, 29914, 29883, 29781, 29914, 5105, 27240, 29914, 29953, 29929, 29896, 29914, 4278, 29896, 29946, 29914, 29900, 29896, 29914, 19057, 29914, 29879, 267, 420, 29914, 3150, 29878, 2176, 29899, 29879, 267, 420, 29899, 29906, 29889, 29953, 29889, 29896, 29900, 29914, 2640, 29914, 5205, 29914, 305, 29900, 29947, 29889, 1420, 13, 13, 12008, 13, 3166, 4770, 29888, 9130, 1649, 1053, 1596, 29918, 2220, 13, 3166, 4770, 29888, 9130, 1649, 1053, 29104, 29918, 20889, 1338, 13, 3166, 5434, 1053, 3918, 29918, 5258, 13, 15770, 29918, 5258, 29889, 6252, 29918, 2606, 2129, 580, 13, 3166, 4240, 1144, 1053, 1203, 13, 5215, 8717, 13, 5215, 1732, 1982, 29906, 13, 5215, 4390, 13, 5215, 2897, 13, 5215, 7274, 13, 5215, 3142, 1982, 29889, 3827, 29892, 3142, 1982, 29889, 5510, 29892, 3142, 1982, 29889, 2704, 13, 13, 3166, 10937, 1718, 2239, 15646, 1053, 10937, 1718, 2239, 15646, 29892, 4663, 13, 3166, 16250, 1053, 4257, 23583, 13, 3166, 282, 2158, 1053, 282, 2158, 13, 2202, 29901, 13, 1678, 515, 3142, 1982, 29889, 5510, 1053, 3142, 12508, 13, 19499, 16032, 2392, 29901, 13, 1678, 515, 3142, 1982, 1053, 3142, 12508, 13, 13, 13356, 1001, 29059, 353, 426, 13, 1678, 525, 2917, 2955, 29918, 771, 5325, 2396, 14550, 13, 18884, 349, 1525, 25634, 364, 29069, 29901, 29966, 1124, 597, 1636, 29889, 29893, 29941, 29889, 990, 29914, 29906, 29900, 29900, 29900, 29914, 29900, 29896, 29914, 29878, 2176, 29899, 11010, 29937, 29958, 13, 18884, 349, 1525, 25634, 337, 29901, 529, 1124, 597, 1636, 29889, 12846, 7716, 8205, 29889, 1212, 29914, 558, 29926, 29914, 29423, 675, 29914, 29894, 542, 3779, 13, 18884, 5097, 1577, 29879, 1577, 10185, 29918, 978, 1577, 24209, 3298, 13, 18884, 5754, 426, 13, 462, 539, 1577, 29879, 364, 29069, 29901, 1643, 29871, 1577, 10185, 29918, 978, 869, 13, 462, 539, 1577, 29879, 337, 29901, 24209, 3298, 1577, 24209, 3298, 869, 13, 18884, 500, 4907, 742, 13, 1678, 525, 497, 29918, 16009, 29879, 2396, 14550, 13, 9651, 1831, 8359, 1577, 29879, 988, 426, 29973, 29879, 1577, 29886, 1577, 29877, 29913, 13, 4706, 14550, 13, 29913, 13, 13, 11481, 16570, 353, 4257, 23583, 877, 11481, 16570, 742, 6024, 333, 742, 525, 5338, 742, 525, 3257, 11287, 13, 13, 13, 1990, 4673, 29934, 2176, 4032, 29898, 3318, 1125, 13, 13, 1678, 22236, 29918, 23252, 23598, 353, 11117, 23965, 2396, 525, 6214, 29914, 29879, 862, 1519, 29899, 9902, 29974, 3126, 10827, 13, 1678, 3988, 29918, 1529, 18009, 4214, 353, 11117, 657, 29918, 276, 1066, 20106, 2396, 6702, 29914, 276, 1066, 20106, 742, 525, 7194, 5477, 13, 462, 259, 525, 9155, 29918, 6112, 4110, 29918, 19033, 2396, 6702, 742, 525, 7194, 1495, 29913, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 1923, 29918, 5338, 1125, 13, 4706, 14550, 2847, 7093, 278, 3132, 13, 4706, 584, 3207, 1923, 29918, 5338, 29901, 3988, 310, 278, 1923, 13, 4706, 14550, 13, 4706, 8656, 29918, 2974, 29918, 5338, 353, 1923, 29918, 5338, 13, 4706, 565, 451, 525, 3150, 29878, 2176, 29899, 29879, 267, 420, 29915, 297, 1923, 29918, 5338, 29901, 13, 9651, 1923, 29918, 5338, 353, 14210, 29879, 29914, 3150, 29878, 2176, 29899, 29879, 267, 420, 29915, 1273, 1923, 29918, 5338, 13, 13, 4706, 1583, 29889, 2974, 29918, 5338, 353, 1923, 29918, 5338, 13, 4706, 1583, 29889, 19033, 29918, 2271, 29918, 18276, 572, 29873, 353, 1583, 29889, 2974, 29918, 5338, 718, 8207, 276, 1066, 20106, 22584, 29879, 29915, 13, 4706, 1923, 29918, 5504, 29918, 5338, 353, 14210, 29879, 29914, 3150, 29878, 2176, 29899, 1287, 1785, 305, 29915, 1273, 8656, 29918, 2974, 29918, 5338, 13, 4706, 1583, 29889, 19033, 29918, 2271, 29918, 5504, 29918, 18276, 572, 29873, 353, 1923, 29918, 5504, 29918, 5338, 718, 320, 13, 9651, 8207, 276, 1066, 20106, 22584, 29879, 29914, 5504, 29915, 13, 13, 1678, 822, 1065, 29918, 1972, 29898, 1311, 29892, 9810, 29918, 978, 29892, 2346, 1125, 13, 4706, 805, 279, 1519, 353, 10937, 1718, 2239, 15646, 29898, 1311, 29889, 19033, 29918, 2271, 29918, 18276, 572, 29873, 1273, 9810, 29918, 978, 29897, 13, 4706, 805, 279, 1519, 29889, 842, 3010, 29898, 1972, 29889, 17010, 3101, 13, 4706, 805, 279, 1519, 29889, 842, 11609, 5809, 29898, 7249, 29897, 13, 4706, 2582, 353, 805, 279, 1519, 29889, 1972, 2141, 13441, 580, 13, 13, 4706, 363, 1121, 297, 2582, 1839, 9902, 16215, 5355, 886, 2033, 29901, 13, 9651, 7709, 1121, 13, 13, 1678, 822, 2767, 29918, 1972, 29898, 1311, 29892, 9810, 29918, 978, 29892, 2346, 1125, 13, 4706, 805, 279, 1519, 353, 10937, 1718, 2239, 15646, 29898, 13, 9651, 1583, 29889, 19033, 29918, 2271, 29918, 5504, 29918, 18276, 572, 29873, 1273, 9810, 29918, 978, 29897, 13, 4706, 805, 279, 1519, 29889, 842, 3010, 29898, 1972, 29889, 17010, 3101, 13, 4706, 805, 279, 1519, 29889, 842, 4062, 877, 5438, 1495, 13, 4706, 805, 279, 1519, 29889, 1972, 580, 13, 13, 1678, 822, 5941, 786, 29918, 2917, 29898, 1311, 1125, 13, 4706, 14550, 14550, 13, 4706, 363, 470, 16711, 297, 1583, 29889, 657, 29918, 5676, 273, 287, 29918, 7054, 12339, 414, 7295, 13, 9651, 1583, 29889, 8143, 29918, 6112, 4110, 29898, 1311, 29889, 2917, 29918, 19033, 29892, 13, 462, 462, 259, 1014, 29926, 2433, 29918, 16664, 29879, 29915, 1273, 470, 16711, 29892, 13, 462, 462, 259, 5217, 29922, 5574, 29897, 13, 13, 1678, 822, 679, 29918, 5676, 273, 287, 29918, 7054, 12339, 414, 29898, 1311, 1125, 13, 4706, 28723, 353, 1583, 29889, 657, 29918, 771, 5325, 580, 13, 4706, 13252, 353, 5159, 13, 4706, 363, 8722, 297, 28723, 29889, 5975, 7295, 13, 9651, 13252, 29889, 21843, 29898, 10185, 1839, 7054, 12339, 414, 11287, 13, 13, 4706, 470, 16711, 287, 353, 5159, 13, 4706, 2346, 353, 660, 29965, 1001, 29059, 1839, 497, 29918, 16009, 29879, 2033, 13, 4706, 363, 1121, 297, 1583, 29889, 3389, 29918, 1972, 29898, 1311, 29889, 2917, 29918, 19033, 29892, 2346, 1125, 13, 9651, 1024, 353, 1121, 1839, 29879, 16215, 1767, 2033, 13, 9651, 565, 1024, 29889, 27382, 2541, 877, 1885, 333, 29374, 13, 18884, 565, 1024, 297, 13252, 29901, 13, 462, 1678, 1209, 13, 18884, 1683, 29901, 13, 462, 1678, 470, 16711, 287, 29889, 4397, 29898, 978, 29897, 13, 4706, 736, 470, 16711, 287, 13, 13, 1678, 822, 679, 29918, 771, 5325, 29898, 1311, 1125, 13, 4706, 14550, 3639, 263, 8600, 313, 16009, 29918, 5338, 29892, 8722, 29918, 978, 29897, 363, 599, 28723, 13, 4706, 13252, 297, 278, 2295, 17573, 18382, 29891, 13, 4706, 14550, 13, 4706, 1583, 29889, 3198, 29918, 2917, 29918, 20095, 580, 13, 13, 4706, 2346, 353, 660, 29965, 1001, 29059, 1839, 2917, 2955, 29918, 771, 5325, 2033, 13, 4706, 28723, 353, 6571, 13, 13, 4706, 363, 1121, 297, 1583, 29889, 3389, 29918, 1972, 29898, 1311, 29889, 2917, 29918, 19033, 29892, 2346, 1125, 13, 9651, 8722, 353, 6571, 13, 9651, 8722, 29918, 978, 353, 1121, 1839, 10185, 29918, 978, 16215, 1767, 2033, 13, 9651, 8722, 1839, 16009, 29918, 5338, 2033, 353, 1121, 1839, 29879, 16215, 1767, 2033, 13, 9651, 8722, 1839, 7054, 12339, 414, 2033, 353, 518, 2914, 1839, 24209, 3298, 16215, 1767, 2033, 29962, 13, 9651, 565, 8722, 29918, 978, 297, 28723, 29901, 13, 18884, 28723, 29961, 10185, 29918, 978, 22322, 7054, 12339, 414, 13359, 21843, 29898, 13, 462, 1678, 8722, 1839, 7054, 12339, 414, 11287, 13, 9651, 1683, 29901, 13, 18884, 28723, 29961, 10185, 29918, 978, 29962, 353, 8722, 13, 13, 4706, 736, 28723, 13, 13, 1678, 822, 3349, 29918, 10185, 29898, 1311, 29892, 8722, 29918, 978, 1125, 13, 4706, 14550, 5240, 586, 267, 263, 2183, 8722, 1024, 14550, 13, 4706, 4967, 29918, 332, 275, 353, 5159, 13, 4706, 28723, 353, 1583, 29889, 657, 29918, 771, 5325, 580, 13, 4706, 565, 8722, 29918, 978, 297, 28723, 29901, 13, 9651, 8722, 353, 28723, 29961, 10185, 29918, 978, 29962, 13, 9651, 565, 451, 8722, 29918, 978, 29889, 27382, 2541, 877, 558, 11283, 1125, 13, 18884, 8722, 29918, 978, 353, 525, 558, 16664, 29879, 29915, 1273, 8722, 29918, 978, 13, 13, 9651, 4967, 29918, 332, 275, 29889, 21843, 29898, 13, 18884, 6024, 29966, 29995, 29879, 16299, 1273, 16455, 3298, 363, 16455, 3298, 297, 8722, 1839, 7054, 12339, 414, 2033, 2314, 13, 9651, 4967, 29918, 332, 275, 29889, 4397, 877, 29966, 29995, 29879, 16299, 1273, 8722, 1839, 16009, 29918, 5338, 11287, 13, 13, 4706, 565, 7431, 29898, 16009, 29918, 332, 275, 1125, 13, 9651, 396, 632, 565, 451, 4967, 29918, 5338, 29889, 27382, 2541, 877, 558, 11283, 1125, 13, 9651, 396, 462, 4967, 29918, 5338, 353, 525, 558, 16664, 29879, 29915, 1273, 4967, 29918, 5338, 13, 9651, 396, 632, 565, 451, 4967, 29918, 5338, 29889, 1975, 2541, 877, 16299, 1125, 13, 9651, 396, 462, 4967, 29918, 5338, 353, 14210, 29879, 16299, 1273, 4967, 29918, 5338, 13, 9651, 363, 4967, 29918, 5338, 297, 4967, 29918, 332, 275, 29901, 13, 18884, 1018, 29901, 13, 462, 1678, 1583, 29889, 8143, 29918, 6112, 4110, 29898, 1311, 29889, 2917, 29918, 19033, 29892, 13, 462, 462, 965, 1014, 29926, 29922, 16009, 29918, 5338, 29892, 13, 462, 462, 965, 5217, 29922, 5574, 29897, 13, 18884, 5174, 8960, 408, 321, 29901, 13, 462, 1678, 1596, 29898, 29872, 29897, 13, 13, 1678, 822, 2767, 29918, 10185, 29898, 1311, 29892, 8722, 29918, 978, 29892, 8722, 29918, 16553, 1125, 13, 4706, 14550, 5020, 15190, 278, 2183, 8722, 373, 278, 1923, 14550, 13, 13, 4706, 28723, 353, 1583, 29889, 657, 29918, 771, 5325, 580, 13, 13, 4706, 565, 8722, 29918, 978, 297, 28723, 29901, 13, 9651, 4967, 29918, 5338, 353, 28723, 29961, 10185, 29918, 978, 22322, 16009, 29918, 5338, 2033, 13, 13, 9651, 565, 451, 4967, 29918, 5338, 29889, 1975, 2541, 877, 16299, 1125, 13, 18884, 4967, 29918, 5338, 353, 14210, 29879, 16299, 1273, 4967, 29918, 5338, 13, 13, 9651, 1583, 29889, 8143, 29918, 6112, 4110, 29898, 1311, 29889, 2917, 29918, 19033, 29892, 13, 462, 462, 259, 1014, 29926, 29922, 16009, 29918, 5338, 29892, 13, 462, 462, 259, 5217, 29922, 5574, 29897, 13, 4706, 1583, 29889, 9009, 29918, 20788, 29898, 3051, 29922, 10185, 29918, 16553, 29892, 13, 462, 795, 3030, 2433, 2917, 29889, 2676, 368, 29920, 538, 29889, 510, 742, 13, 462, 795, 3646, 29918, 19033, 29922, 1311, 29889, 2917, 29918, 19033, 29897, 13, 13, 1678, 822, 1423, 29918, 2917, 29918, 20095, 29898, 1311, 1125, 13, 4706, 28914, 353, 1583, 29889, 657, 29918, 276, 1066, 20106, 580, 13, 13, 4706, 565, 451, 1583, 29889, 2917, 29918, 19033, 297, 28914, 29901, 13, 9651, 1596, 877, 27392, 2295, 13761, 29850, 5038, 947, 451, 1863, 4286, 4830, 29898, 13, 18884, 1583, 29889, 2917, 29918, 19033, 876, 13, 13, 1678, 822, 2009, 29898, 1311, 29892, 740, 29892, 848, 29922, 8516, 29892, 8636, 29922, 8516, 29892, 5217, 29922, 8824, 29892, 13, 18884, 2793, 29918, 1853, 2433, 932, 506, 271, 5271, 29914, 29878, 2176, 29974, 3126, 742, 13, 18884, 3544, 2433, 6214, 29914, 29879, 862, 1519, 29899, 9902, 29974, 3126, 29374, 13, 4706, 14550, 24138, 278, 7274, 304, 278, 8602, 552, 855, 2361, 13, 4706, 584, 3207, 740, 29901, 740, 313, 2084, 29897, 304, 2009, 13, 4706, 584, 3207, 848, 29901, 848, 304, 788, 304, 278, 11971, 2009, 13, 4706, 584, 18280, 29901, 1121, 310, 278, 1923, 13, 4706, 584, 29878, 1853, 29901, 4390, 18511, 9657, 13, 4706, 14550, 13, 4706, 1596, 877, 29912, 6822, 8875, 4286, 4830, 29898, 1311, 29889, 2974, 29918, 5338, 29892, 740, 876, 13, 13, 4706, 565, 848, 29901, 13, 9651, 1158, 353, 525, 5438, 29915, 13, 9651, 9066, 353, 11117, 3051, 29899, 1853, 2396, 2793, 29918, 1853, 29913, 13, 4706, 1683, 29901, 13, 9651, 565, 5217, 29901, 13, 18884, 1158, 353, 525, 2287, 18476, 29915, 13, 9651, 1683, 29901, 13, 18884, 1158, 353, 525, 7194, 29915, 13, 9651, 9066, 353, 11117, 23965, 2396, 3544, 29913, 13, 13, 9651, 565, 8636, 29901, 13, 18884, 740, 353, 14210, 29879, 29973, 29995, 29879, 29915, 1273, 313, 2220, 29892, 8636, 29897, 13, 13, 4706, 1596, 29898, 5696, 29892, 14210, 29912, 6822, 8875, 4286, 4830, 29898, 1311, 29889, 2974, 29918, 5338, 29892, 740, 876, 13, 13, 4706, 364, 353, 7274, 29889, 3827, 29898, 5696, 29892, 13, 462, 632, 14210, 29879, 22584, 29879, 29915, 1273, 313, 1311, 29889, 2974, 29918, 5338, 29892, 740, 511, 13, 462, 632, 848, 29922, 1272, 29892, 13, 462, 632, 9066, 29922, 13662, 29897, 13, 4706, 1426, 353, 364, 29889, 726, 13, 13, 4706, 1018, 29901, 13, 9651, 736, 4390, 29889, 18132, 29898, 29878, 29889, 726, 29897, 565, 364, 29889, 726, 1683, 364, 29889, 726, 13, 4706, 5174, 8960, 408, 321, 29901, 13, 9651, 1596, 29898, 726, 29897, 13, 9651, 736, 1426, 13, 13, 1678, 822, 679, 29918, 20095, 29918, 2311, 29898, 1311, 29892, 13761, 29918, 333, 1125, 13, 4706, 14550, 14550, 13, 4706, 1121, 353, 1583, 29889, 3827, 877, 276, 1066, 20106, 22584, 29879, 29914, 2311, 29915, 1273, 13761, 29918, 333, 29897, 13, 4706, 1596, 877, 657, 29918, 20095, 29918, 2311, 742, 1121, 29897, 13, 13, 1678, 822, 679, 29918, 276, 1066, 20106, 29898, 1311, 1125, 13, 4706, 14550, 14550, 13, 4706, 1121, 353, 1583, 29889, 3827, 877, 276, 1066, 20106, 1495, 13, 4706, 28914, 353, 6571, 13, 13, 4706, 565, 525, 9902, 29915, 297, 1121, 322, 525, 5355, 886, 29915, 297, 1121, 1839, 9902, 2033, 29901, 13, 9651, 363, 13761, 297, 1121, 1839, 9902, 16215, 5355, 886, 2033, 29901, 13, 18884, 13761, 29918, 333, 353, 13761, 1839, 333, 16215, 1767, 2033, 13, 18884, 28914, 29961, 20095, 29918, 333, 29962, 353, 830, 7036, 16570, 29898, 20095, 29918, 333, 29892, 13, 462, 462, 462, 308, 13761, 1839, 5338, 16215, 1767, 7464, 13, 462, 462, 462, 308, 13761, 1839, 3257, 16215, 1767, 11287, 13, 13, 4706, 736, 28914, 13, 13, 1678, 822, 9810, 29918, 9933, 29898, 1311, 29892, 9810, 29918, 978, 1125, 13, 4706, 736, 9810, 29918, 978, 297, 1583, 29889, 657, 29918, 276, 1066, 20106, 580, 13, 13, 1678, 822, 679, 29918, 497, 29918, 6112, 4110, 29898, 1311, 29892, 9810, 29918, 978, 1125, 13, 4706, 1121, 353, 1583, 29889, 3827, 877, 276, 1066, 20106, 22584, 29879, 29914, 6112, 4110, 29915, 1273, 9810, 29918, 978, 29897, 13, 4706, 282, 2158, 29898, 2914, 29897, 13, 13, 1678, 822, 5217, 29918, 6112, 4110, 29898, 1311, 29892, 9810, 29918, 978, 29892, 1014, 29926, 29922, 8516, 29892, 4450, 29922, 8516, 29892, 5446, 29922, 8516, 29892, 13, 462, 3986, 5217, 29922, 8824, 1125, 13, 4706, 740, 353, 525, 276, 1066, 20106, 22584, 29879, 29914, 6112, 4110, 29915, 1273, 9810, 29918, 978, 13, 13, 4706, 8636, 353, 6571, 13, 4706, 565, 1014, 29926, 29901, 13, 9651, 8636, 1839, 1491, 29926, 2033, 353, 1014, 29926, 13, 4706, 565, 4450, 29901, 13, 9651, 8636, 1839, 11965, 2033, 353, 4450, 13, 4706, 565, 5446, 29901, 13, 9651, 8636, 1839, 5415, 2033, 353, 5446, 13, 4706, 565, 8636, 29901, 13, 9651, 8636, 353, 525, 29987, 4286, 7122, 18959, 29995, 29879, 16328, 29879, 29915, 1273, 313, 29895, 29892, 325, 29897, 13, 462, 1669, 363, 413, 29892, 325, 297, 8636, 29889, 7076, 580, 2314, 13, 4706, 1683, 29901, 13, 9651, 8636, 353, 6213, 13, 13, 4706, 736, 1583, 29889, 3827, 29898, 2220, 29892, 8636, 29922, 7529, 29892, 5217, 29922, 8143, 29897, 13, 13, 1678, 822, 6441, 29918, 20788, 29898, 1311, 29892, 2793, 29892, 3030, 29892, 3646, 29918, 19033, 1125, 13, 4706, 14550, 14550, 13, 4706, 1596, 877, 9009, 292, 304, 6571, 4286, 4830, 29898, 5182, 29918, 19033, 876, 13, 4706, 8636, 353, 525, 4703, 16328, 29879, 29915, 1273, 3030, 13, 4706, 740, 353, 525, 276, 1066, 20106, 22584, 29879, 29914, 6112, 4110, 29915, 1273, 3646, 29918, 19033, 13, 13, 4706, 1583, 29889, 3827, 29898, 2220, 29892, 2793, 29892, 8636, 29892, 5217, 29922, 8824, 29892, 13, 462, 268, 2793, 29918, 1853, 2433, 6214, 29914, 29916, 29899, 29873, 4227, 280, 29936, 3090, 842, 29922, 10496, 29899, 29947, 1495, 13, 13, 1678, 822, 1423, 29918, 9933, 29898, 1311, 29892, 1203, 29892, 9810, 1125, 13, 4706, 14550, 14550, 13, 4706, 2346, 353, 525, 2783, 29581, 529, 8875, 29958, 4286, 4830, 29898, 3318, 29897, 13, 4706, 16248, 353, 29850, 6822, 276, 1066, 20106, 19248, 5038, 869, 4830, 29898, 1311, 29889, 2974, 29918, 5338, 29892, 9810, 29897, 13, 13, 29937, 308, 1596, 703, 5438, 292, 10937, 1718, 2239, 2346, 304, 6571, 1642, 4830, 29898, 29734, 876, 13, 4706, 8636, 353, 11117, 1972, 2396, 2346, 29913, 13, 4706, 9066, 353, 426, 13, 9651, 525, 3051, 29899, 1853, 2396, 525, 6214, 29914, 29916, 29899, 1636, 29899, 689, 29899, 2271, 26716, 742, 13, 9651, 396, 965, 525, 16044, 2396, 525, 6214, 29914, 29879, 862, 1519, 29899, 9902, 29974, 3126, 29915, 13, 4706, 500, 13, 4706, 313, 5327, 29892, 2793, 29897, 353, 1732, 1982, 29906, 29889, 5506, 2141, 3827, 29898, 29734, 29892, 13, 462, 462, 462, 418, 525, 5438, 742, 13, 462, 462, 462, 418, 3142, 1982, 29889, 5510, 29889, 2271, 12508, 29898, 7529, 511, 13, 462, 462, 462, 418, 9066, 29922, 13662, 29897, 13, 13, 29937, 308, 1596, 703, 5103, 1273, 29879, 29908, 1273, 2933, 29889, 4882, 29897, 13, 4706, 736, 313, 5327, 29892, 2793, 29897, 13, 13, 1678, 822, 6222, 29918, 1972, 29898, 1311, 29892, 2346, 29892, 9810, 1125, 13, 4706, 14550, 14550, 13, 4706, 8636, 353, 11117, 1972, 2396, 2346, 29913, 13, 4706, 9066, 353, 426, 13, 9651, 525, 3051, 29899, 1853, 2396, 525, 6214, 29914, 29916, 29899, 1636, 29899, 689, 29899, 2271, 26716, 742, 13, 9651, 525, 16044, 2396, 525, 6214, 29914, 29879, 862, 1519, 29899, 9902, 29974, 3126, 29915, 13, 4706, 500, 13, 4706, 16248, 353, 29850, 6822, 29912, 6822, 6112, 4110, 1642, 4830, 29898, 1311, 29889, 2974, 29918, 5338, 29892, 9810, 29897, 13, 4706, 1596, 29898, 29734, 29897, 13, 4706, 313, 5327, 29892, 2793, 29897, 353, 1732, 1982, 29906, 29889, 5506, 2141, 3827, 29898, 29734, 29892, 525, 5438, 742, 13, 462, 462, 462, 418, 3142, 12508, 29898, 7529, 511, 13, 462, 462, 462, 418, 9066, 29922, 13662, 29897, 13, 4706, 736, 313, 5327, 29892, 8717, 29889, 20889, 284, 29918, 14513, 29898, 3051, 876, 13, 13, 1678, 822, 6222, 29918, 5504, 29898, 1311, 29892, 2346, 29892, 9810, 1125, 13, 4706, 14550, 14550, 13, 4706, 8636, 353, 11117, 5504, 2396, 2346, 29913, 13, 4706, 9066, 353, 426, 13, 9651, 525, 3051, 29899, 1853, 2396, 525, 6214, 29914, 29916, 29899, 1636, 29899, 689, 29899, 2271, 26716, 742, 13, 9651, 525, 16044, 2396, 525, 6214, 29914, 29879, 862, 1519, 29899, 9902, 29974, 3126, 29915, 13, 4706, 500, 13, 4706, 9810, 29918, 2271, 353, 1583, 29889, 19033, 29918, 2271, 29918, 18276, 572, 29873, 1273, 9810, 13, 4706, 16248, 353, 11860, 29879, 29914, 6112, 4110, 29908, 1273, 313, 19033, 29918, 2271, 29897, 13, 4706, 313, 5327, 29892, 2793, 29897, 353, 1732, 1982, 29906, 29889, 5506, 2141, 3827, 29898, 29734, 29892, 525, 5438, 742, 13, 462, 462, 462, 418, 3142, 12508, 29898, 7529, 511, 13, 462, 462, 462, 418, 9066, 29922, 13662, 29897, 13, 4706, 2933, 353, 2933, 1839, 4882, 2033, 13, 4706, 736, 29898, 5327, 29897, 13, 13, 1678, 822, 5217, 29918, 3626, 2701, 29918, 1609, 29918, 8768, 29898, 1311, 29892, 9810, 29892, 4072, 1125, 13, 4706, 14550, 14550, 13, 4706, 363, 364, 2176, 29918, 1853, 297, 4072, 29901, 13, 9651, 2346, 353, 525, 2287, 18476, 1577, 29879, 5754, 426, 29973, 29879, 1577, 29886, 1577, 29877, 383, 6227, 4945, 10780, 29879, 353, 20577, 29879, 29958, 2915, 29915, 1273, 364, 2176, 29918, 1853, 13, 9651, 1583, 29889, 7978, 29918, 5504, 29898, 1972, 29892, 9810, 29897, 13, 13, 1678, 822, 6441, 29918, 20095, 29918, 3166, 29918, 1445, 29898, 1311, 29892, 10422, 29892, 9810, 1125, 13, 4706, 14550, 14550, 13, 4706, 2967, 29918, 9144, 353, 2897, 29889, 2084, 29889, 6500, 3871, 29898, 9507, 29897, 13, 13, 4706, 4974, 2967, 29918, 9144, 29889, 1975, 2541, 877, 698, 29880, 1495, 13, 13, 4706, 3983, 353, 525, 1445, 597, 29995, 29879, 29915, 1273, 2967, 29918, 9144, 13, 4706, 8636, 353, 11117, 4703, 2396, 12801, 29915, 718, 3983, 718, 525, 29958, 10827, 13, 4706, 16248, 353, 11860, 29879, 22584, 29879, 29914, 6112, 4110, 29973, 29995, 29879, 29908, 1273, 313, 1311, 29889, 2974, 29918, 5338, 29892, 9810, 29892, 13, 462, 462, 9651, 3142, 12508, 29898, 7529, 876, 13, 13, 4706, 1596, 703, 23456, 1273, 29879, 964, 1273, 29879, 297, 22948, 420, 29908, 1273, 313, 9507, 29892, 16248, 876, 13, 13, 4706, 848, 353, 1722, 29898, 9507, 29892, 525, 29878, 2824, 949, 580, 13, 4706, 313, 5327, 29892, 2793, 29897, 353, 1732, 1982, 29906, 29889, 5506, 2141, 3827, 29898, 29734, 29892, 525, 12336, 742, 13, 462, 462, 462, 418, 3573, 29922, 1272, 29892, 13, 462, 462, 462, 418, 9066, 3790, 29915, 3051, 29899, 1853, 2396, 525, 6214, 29914, 29916, 29899, 29873, 4227, 280, 29915, 1800, 13, 4706, 1596, 703, 5103, 1273, 29879, 29908, 1273, 2933, 29889, 4882, 29897, 13, 4706, 1596, 29898, 3051, 29897, 13, 13, 13, 1990, 3599, 3811, 675, 6585, 29934, 2176, 4032, 29898, 6585, 29934, 2176, 4032, 1125, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 1923, 29918, 5338, 29892, 2295, 29918, 19033, 2433, 2917, 29889, 2676, 368, 29920, 538, 29889, 510, 29374, 13, 4706, 4673, 29934, 2176, 4032, 17255, 2344, 12035, 1311, 29892, 1923, 29918, 5338, 29897, 13, 4706, 1583, 29889, 2917, 29918, 19033, 353, 2295, 29918, 19033, 13, 13, 1678, 822, 5941, 786, 29918, 2917, 29898, 1311, 1125, 13, 4706, 14550, 14550, 13, 4706, 363, 470, 16711, 297, 1583, 29889, 657, 29918, 5676, 273, 287, 29918, 7054, 12339, 414, 7295, 13, 9651, 1583, 29889, 8143, 29918, 6112, 4110, 29898, 1311, 29889, 2917, 29918, 19033, 29892, 13, 462, 462, 259, 1014, 29926, 2433, 29918, 16664, 29879, 29915, 1273, 470, 16711, 29892, 13, 462, 462, 259, 5217, 29922, 5574, 29897, 13, 13, 1678, 822, 679, 29918, 5676, 273, 287, 29918, 7054, 12339, 414, 29898, 1311, 1125, 13, 4706, 14550, 14550, 13, 4706, 28723, 353, 1583, 29889, 657, 29918, 771, 5325, 580, 13, 4706, 13252, 353, 5159, 13, 4706, 363, 8722, 297, 28723, 29889, 5975, 7295, 13, 9651, 13252, 29889, 21843, 29898, 10185, 1839, 7054, 12339, 414, 11287, 13, 13, 4706, 470, 16711, 287, 353, 5159, 13, 4706, 2346, 353, 660, 29965, 1001, 29059, 1839, 497, 29918, 16009, 29879, 2033, 13, 4706, 363, 1121, 297, 1583, 29889, 3389, 29918, 1972, 29898, 1311, 29889, 2917, 29918, 19033, 29892, 2346, 1125, 13, 9651, 1024, 353, 1121, 1839, 29879, 16215, 1767, 2033, 13, 9651, 565, 1024, 29889, 27382, 2541, 877, 1885, 333, 29374, 13, 18884, 565, 1024, 297, 13252, 29901, 13, 462, 1678, 1209, 13, 18884, 1683, 29901, 13, 462, 1678, 470, 16711, 287, 29889, 4397, 29898, 978, 29897, 13, 4706, 736, 470, 16711, 287, 13, 13, 1678, 822, 679, 29918, 771, 5325, 29898, 1311, 1125, 13, 4706, 14550, 3639, 263, 8600, 313, 16009, 29918, 5338, 29892, 8722, 29918, 978, 29897, 363, 599, 28723, 13, 4706, 13252, 297, 278, 2295, 17573, 18382, 29891, 13, 4706, 14550, 13, 4706, 1583, 29889, 3198, 29918, 2917, 29918, 20095, 580, 13, 13, 4706, 2346, 353, 660, 29965, 1001, 29059, 1839, 2917, 2955, 29918, 771, 5325, 2033, 13, 4706, 28723, 353, 6571, 13, 13, 4706, 363, 1121, 297, 1583, 29889, 3389, 29918, 1972, 29898, 1311, 29889, 2917, 29918, 19033, 29892, 2346, 1125, 13, 9651, 8722, 353, 6571, 13, 9651, 8722, 29918, 978, 353, 1121, 1839, 10185, 29918, 978, 16215, 1767, 2033, 13, 9651, 8722, 1839, 16009, 29918, 5338, 2033, 353, 1121, 1839, 29879, 16215, 1767, 2033, 13, 9651, 8722, 1839, 7054, 12339, 414, 2033, 353, 518, 2914, 1839, 24209, 3298, 16215, 1767, 2033, 29962, 13, 9651, 565, 8722, 29918, 978, 297, 28723, 29901, 13, 18884, 28723, 29961, 10185, 29918, 978, 22322, 7054, 12339, 414, 13359, 21843, 29898, 13, 462, 1678, 8722, 1839, 7054, 12339, 414, 11287, 13, 9651, 1683, 29901, 13, 18884, 28723, 29961, 10185, 29918, 978, 29962, 353, 8722, 13, 13, 4706, 736, 28723, 13, 13, 1678, 822, 3349, 29918, 10185, 29898, 1311, 29892, 8722, 29918, 978, 1125, 13, 4706, 14550, 5240, 586, 267, 263, 2183, 8722, 1024, 14550, 13, 4706, 4967, 29918, 332, 275, 353, 5159, 13, 4706, 28723, 353, 1583, 29889, 657, 29918, 771, 5325, 580, 13, 4706, 565, 8722, 29918, 978, 297, 28723, 29901, 13, 9651, 8722, 353, 28723, 29961, 10185, 29918, 978, 29962, 13, 9651, 565, 451, 8722, 29918, 978, 29889, 27382, 2541, 877, 558, 11283, 1125, 13, 18884, 8722, 29918, 978, 353, 525, 558, 16664, 29879, 29915, 1273, 8722, 29918, 978, 13, 13, 9651, 4967, 29918, 332, 275, 29889, 21843, 29898, 13, 18884, 6024, 29966, 29995, 29879, 16299, 1273, 16455, 3298, 363, 16455, 3298, 297, 8722, 1839, 7054, 12339, 414, 2033, 2314, 13, 9651, 4967, 29918, 332, 275, 29889, 4397, 877, 29966, 29995, 29879, 16299, 1273, 8722, 1839, 16009, 29918, 5338, 11287, 13, 13, 4706, 565, 7431, 29898, 16009, 29918, 332, 275, 1125, 13, 9651, 396, 632, 565, 451, 4967, 29918, 5338, 29889, 27382, 2541, 877, 558, 11283, 1125, 13, 9651, 396, 462, 4967, 29918, 5338, 353, 525, 558, 16664, 29879, 29915, 1273, 4967, 29918, 5338, 13, 9651, 396, 632, 565, 451, 4967, 29918, 5338, 29889, 1975, 2541, 877, 16299, 1125, 13, 9651, 396, 462, 4967, 29918, 5338, 353, 14210, 29879, 16299, 1273, 4967, 29918, 5338, 13, 9651, 363, 4967, 29918, 5338, 297, 4967, 29918, 332, 275, 29901, 13, 18884, 1018, 29901, 13, 462, 1678, 1583, 29889, 8143, 29918, 6112, 4110, 29898, 1311, 29889, 2917, 29918, 19033, 29892, 13, 462, 462, 965, 1014, 29926, 29922, 16009, 29918, 5338, 29892, 13, 462, 462, 965, 5217, 29922, 5574, 29897, 13, 18884, 5174, 313, 2451, 29897, 408, 321, 29901, 13, 462, 1678, 1596, 29898, 29872, 29897, 13, 13, 1678, 822, 2767, 29918, 10185, 29898, 1311, 29892, 8722, 29918, 978, 29892, 8722, 29918, 16553, 1125, 13, 4706, 14550, 5020, 15190, 278, 2183, 8722, 373, 278, 1923, 14550, 13, 13, 4706, 28723, 353, 1583, 29889, 657, 29918, 771, 5325, 580, 13, 13, 4706, 565, 8722, 29918, 978, 297, 28723, 29901, 13, 9651, 1596, 29898, 10185, 29918, 978, 29897, 13, 9651, 4967, 29918, 5338, 353, 28723, 29961, 10185, 29918, 978, 22322, 16009, 29918, 5338, 2033, 13, 13, 9651, 396, 14402, 29901, 1423, 2020, 591, 817, 304, 2329, 445, 8773, 8773, 13, 9651, 565, 451, 4967, 29918, 5338, 29889, 1975, 2541, 877, 16299, 1125, 13, 18884, 4967, 29918, 5338, 353, 14210, 29879, 16299, 1273, 4967, 29918, 5338, 13, 13, 9651, 1583, 29889, 8143, 29918, 6112, 4110, 29898, 1311, 29889, 2917, 29918, 19033, 29892, 13, 462, 462, 259, 1014, 29926, 29922, 16009, 29918, 5338, 29892, 13, 462, 462, 259, 5217, 29922, 5574, 29897, 13, 4706, 1583, 29889, 9009, 29918, 20788, 29898, 3051, 29922, 10185, 29918, 16553, 29892, 13, 462, 795, 3030, 2433, 2917, 29889, 2676, 368, 29920, 538, 29889, 510, 742, 13, 462, 795, 3646, 29918, 19033, 29922, 1311, 29889, 2917, 29918, 19033, 29897, 13, 13, 1678, 822, 1423, 29918, 2917, 29918, 20095, 29898, 1311, 1125, 13, 4706, 14550, 14550, 13, 4706, 28914, 353, 1583, 29889, 657, 29918, 276, 1066, 20106, 580, 13, 13, 4706, 565, 451, 1583, 29889, 2917, 29918, 19033, 297, 28914, 29901, 13, 9651, 1596, 877, 27392, 2295, 13761, 29850, 5038, 947, 451, 1863, 4286, 4830, 29898, 13, 18884, 1583, 29889, 2917, 29918, 19033, 29897, 13, 9651, 1723, 13, 13, 1678, 822, 1653, 29918, 6886, 29898, 1311, 29892, 7855, 29892, 7855, 29918, 1853, 29892, 4086, 2433, 264, 29374, 13, 4706, 14550, 14550, 13, 4706, 565, 7855, 29918, 1853, 29889, 13609, 580, 1275, 525, 10532, 2396, 13, 9651, 2983, 353, 7855, 29889, 5451, 11219, 1495, 14352, 29896, 1822, 5451, 877, 29918, 1495, 13, 9651, 23403, 353, 2983, 14352, 29896, 29962, 13, 9651, 937, 29918, 7039, 353, 2983, 7503, 2435, 29898, 7039, 29897, 448, 29871, 29896, 29962, 13, 9651, 937, 29918, 978, 353, 525, 15300, 7122, 29898, 4102, 29918, 7039, 29897, 13, 9651, 5291, 2701, 353, 518, 13, 18884, 12801, 8875, 29958, 529, 1124, 597, 1636, 29889, 29893, 29941, 29889, 990, 29914, 29896, 29929, 29929, 29929, 29914, 29900, 29906, 29914, 29906, 29906, 29899, 29878, 2176, 29899, 29562, 29899, 1983, 29937, 1853, 29958, 529, 1124, 597, 2585, 29886, 1381, 29889, 990, 29914, 609, 3002, 29914, 7435, 29958, 869, 4286, 4830, 29898, 13, 462, 1678, 7855, 511, 13, 18884, 12801, 8875, 29958, 529, 1124, 597, 1636, 29889, 29893, 29941, 29889, 990, 29914, 29896, 29929, 29929, 29929, 29914, 29900, 29906, 29914, 29906, 29906, 29899, 29878, 2176, 29899, 29562, 29899, 1983, 29937, 1853, 29958, 529, 1124, 597, 18295, 29889, 510, 29914, 1181, 2142, 29914, 29900, 29889, 29896, 29914, 7435, 29958, 869, 4286, 4830, 29898, 13, 462, 1678, 7855, 511, 13, 18884, 12801, 8875, 29958, 529, 1124, 597, 1636, 29889, 29893, 29941, 29889, 990, 29914, 29896, 29929, 29929, 29929, 29914, 29900, 29906, 29914, 29906, 29906, 29899, 29878, 2176, 29899, 29562, 29899, 1983, 29937, 1853, 29958, 529, 1124, 597, 11010, 29889, 990, 29914, 7435, 29958, 869, 4286, 4830, 29898, 13, 462, 1678, 7855, 511, 13, 18884, 12801, 8875, 29958, 529, 1124, 597, 2585, 29886, 1381, 29889, 990, 29914, 6799, 29914, 978, 29958, 29850, 1118, 426, 5038, 29992, 8875, 869, 4286, 4830, 29898, 13, 462, 1678, 7855, 29892, 23403, 29892, 937, 29918, 978, 29892, 4086, 511, 13, 18884, 12801, 8875, 29958, 529, 1124, 597, 18295, 29889, 510, 29914, 1181, 2142, 29914, 29900, 29889, 29896, 29914, 29887, 5428, 1170, 29958, 29850, 5038, 29992, 8875, 869, 4286, 4830, 29898, 13, 462, 1678, 7855, 29892, 937, 29918, 978, 29892, 4086, 511, 13, 18884, 12801, 8875, 29958, 529, 1124, 597, 18295, 29889, 510, 29914, 1181, 2142, 29914, 29900, 29889, 29896, 29914, 29879, 16004, 29958, 29850, 5038, 29992, 8875, 869, 4286, 4830, 29898, 13, 462, 1678, 7855, 29892, 23403, 29892, 4086, 511, 13, 18884, 12801, 8875, 29958, 529, 1124, 597, 1636, 29889, 29893, 29941, 29889, 990, 29914, 29906, 29900, 29900, 29900, 29914, 29900, 29896, 29914, 29878, 2176, 29899, 11010, 29937, 1643, 29958, 376, 8875, 426, 5038, 29992, 8875, 869, 15300, 4830, 29898, 13, 462, 1678, 7855, 29892, 937, 29918, 978, 29892, 23403, 29892, 4086, 29897, 13, 9651, 4514, 13, 9651, 736, 11297, 29876, 4286, 7122, 29898, 9161, 2701, 29897, 13, 13, 1678, 822, 788, 29918, 2585, 29886, 1381, 29918, 10041, 29918, 517, 29918, 19033, 29898, 1311, 29892, 9810, 29892, 3858, 29892, 7855, 29918, 1853, 29892, 13, 462, 462, 308, 4086, 29922, 8516, 1125, 13, 4706, 14550, 13, 4706, 1732, 597, 311, 29889, 2585, 29886, 1381, 29889, 990, 29914, 3488, 29914, 9782, 386, 3173, 29918, 855, 1467, 29920, 29973, 4905, 29922, 726, 29995, 29906, 29943, 24595, 13, 4706, 14550, 13, 13, 4706, 2967, 29918, 2271, 353, 525, 1124, 597, 2585, 29886, 1381, 29889, 990, 29914, 3488, 22208, 13, 29937, 308, 565, 4086, 322, 4086, 2804, 525, 264, 2396, 13, 29937, 632, 2967, 29918, 2271, 353, 525, 1124, 597, 29912, 1836, 2585, 29886, 1381, 29889, 990, 29914, 3488, 29914, 4286, 4830, 29898, 11675, 29897, 13, 4706, 3402, 29918, 2146, 600, 861, 353, 525, 29973, 4905, 29922, 726, 29995, 29906, 29943, 24595, 29915, 13, 13, 4706, 3858, 353, 3858, 29889, 6506, 877, 13420, 22868, 1495, 13, 13, 4706, 7855, 353, 525, 4286, 7122, 4197, 3188, 29918, 2271, 29892, 3858, 2314, 13, 29937, 308, 7855, 353, 7855, 29889, 4830, 29898, 10041, 29889, 6506, 877, 3488, 742, 525, 10314, 8785, 13, 13, 29937, 308, 2793, 353, 1583, 29889, 3258, 29918, 6886, 29898, 10041, 29892, 1134, 29892, 4086, 29897, 13, 13, 4706, 313, 2914, 29892, 2793, 29897, 353, 1583, 29889, 3198, 29918, 9933, 29898, 10041, 29892, 9810, 29897, 13, 29937, 308, 1596, 29898, 2914, 29889, 4882, 29892, 7855, 29892, 2793, 29897, 13, 29937, 308, 1596, 29898, 2914, 29897, 13, 4706, 565, 1121, 29889, 4882, 322, 7431, 29898, 3051, 1125, 13, 9651, 1596, 877, 29903, 1984, 3262, 29901, 6571, 2307, 4864, 297, 9810, 6571, 4286, 4830, 29898, 13, 18884, 7855, 29892, 9810, 876, 13, 9651, 736, 6213, 13, 29937, 308, 1683, 29901, 13, 4706, 396, 632, 3142, 353, 525, 4286, 7122, 4197, 3188, 29918, 2271, 29892, 3858, 29892, 3402, 29918, 2146, 600, 861, 2314, 13, 4706, 396, 632, 4833, 29886, 1381, 29918, 2271, 353, 525, 1124, 597, 2585, 29886, 1381, 29889, 990, 29914, 29879, 862, 1519, 29973, 4381, 29899, 4262, 29899, 5338, 29922, 1124, 29995, 29941, 29909, 29995, 29906, 29943, 29995, 29906, 29943, 2585, 29886, 1381, 29889, 990, 29987, 1972, 29922, 2287, 7187, 3960, 15349, 29995, 29906, 29900, 29995, 29941, 29907, 1124, 29995, 29941, 29909, 29995, 29906, 29943, 29995, 29906, 29943, 2585, 29886, 1381, 29889, 990, 29995, 29906, 29943, 10314, 29995, 29906, 29943, 8875, 29995, 29941, 29923, 29987, 4830, 29922, 726, 29995, 29906, 29943, 29916, 29899, 1420, 29899, 2154, 29899, 29873, 4227, 280, 4286, 4830, 29898, 13, 4706, 396, 462, 3858, 29897, 13, 4706, 396, 13, 4706, 396, 632, 3030, 353, 6629, 13, 4706, 396, 632, 848, 353, 7274, 29889, 657, 29898, 2585, 29886, 1381, 29918, 2271, 29897, 13, 4706, 396, 632, 2793, 353, 848, 29889, 3051, 13, 4706, 396, 632, 565, 451, 7431, 29898, 3051, 1125, 13, 4706, 2793, 353, 1583, 29889, 3258, 29918, 6886, 29898, 10041, 29892, 7855, 29918, 1853, 29892, 4086, 29897, 13, 13, 4706, 1596, 29898, 3051, 29897, 13, 2 ]
homeassistant/components/sensor/verisure.py
beschouten/home-assistant
1
16894
""" Interfaces with Verisure sensors. For more details about this platform, please refer to the documentation at documentation at https://home-assistant.io/components/verisure/ """ import logging from homeassistant.components.verisure import HUB as hub from homeassistant.const import TEMP_CELSIUS from homeassistant.helpers.entity import Entity _LOGGER = logging.getLogger(__name__) def setup_platform(hass, config, add_devices, discovery_info=None): """Setup the Verisure platform.""" sensors = [] if int(hub.config.get('thermometers', '1')): hub.update_climate() sensors.extend([ VerisureThermometer(value.id) for value in hub.climate_status.values() if hasattr(value, 'temperature') and value.temperature ]) if int(hub.config.get('hygrometers', '1')): hub.update_climate() sensors.extend([ VerisureHygrometer(value.id) for value in hub.climate_status.values() if hasattr(value, 'humidity') and value.humidity ]) if int(hub.config.get('mouse', '1')): hub.update_mousedetection() sensors.extend([ VerisureMouseDetection(value.deviceLabel) for value in hub.mouse_status.values() # is this if needed? if hasattr(value, 'amountText') and value.amountText ]) add_devices(sensors) class VerisureThermometer(Entity): """Representation of a Verisure thermometer.""" def __init__(self, device_id): """Initialize the sensor.""" self._id = device_id @property def name(self): """Return the name of the device.""" return '{} {}'.format( hub.climate_status[self._id].location, "Temperature") @property def state(self): """Return the state of the device.""" # Remove ° character return hub.climate_status[self._id].temperature[:-1] @property def available(self): """Return True if entity is available.""" return hub.available @property def unit_of_measurement(self): """Return the unit of measurement of this entity.""" return TEMP_CELSIUS def update(self): """Update the sensor.""" hub.update_climate() class VerisureHygrometer(Entity): """Representation of a Verisure hygrometer.""" def __init__(self, device_id): """Initialize the sensor.""" self._id = device_id @property def name(self): """Return the name of the sensor.""" return '{} {}'.format( hub.climate_status[self._id].location, "Humidity") @property def state(self): """Return the state of the sensor.""" # remove % character return hub.climate_status[self._id].humidity[:-1] @property def available(self): """Return True if entity is available.""" return hub.available @property def unit_of_measurement(self): """Return the unit of measurement of this sensor.""" return "%" def update(self): """Update the sensor.""" hub.update_climate() class VerisureMouseDetection(Entity): """Representation of a Verisure mouse detector.""" def __init__(self, device_id): """Initialize the sensor.""" self._id = device_id @property def name(self): """Return the name of the sensor.""" return '{} {}'.format( hub.mouse_status[self._id].location, "Mouse") @property def state(self): """Return the state of the sensor.""" return hub.mouse_status[self._id].count @property def available(self): """Return True if entity is available.""" return hub.available @property def unit_of_measurement(self): """Return the unit of measurement of this sensor.""" return "Mice" def update(self): """Update the sensor.""" hub.update_mousedetection()
[ 1, 9995, 13, 4074, 8726, 411, 1798, 275, 545, 4771, 943, 29889, 13, 13, 2831, 901, 4902, 1048, 445, 7481, 29892, 3113, 2737, 304, 278, 5106, 472, 13, 12663, 472, 2045, 597, 5184, 29899, 465, 22137, 29889, 601, 29914, 14036, 29914, 369, 275, 545, 29914, 13, 15945, 29908, 13, 5215, 12183, 13, 13, 3166, 3271, 465, 22137, 29889, 14036, 29889, 369, 275, 545, 1053, 379, 7466, 408, 19766, 13, 3166, 3271, 465, 22137, 29889, 3075, 1053, 17067, 3580, 29918, 4741, 29931, 5425, 3308, 13, 3166, 3271, 465, 22137, 29889, 3952, 6774, 29889, 10041, 1053, 14945, 13, 13, 29918, 14480, 17070, 353, 12183, 29889, 657, 16363, 22168, 978, 1649, 29897, 13, 13, 13, 1753, 6230, 29918, 12120, 29898, 29882, 465, 29892, 2295, 29892, 788, 29918, 3359, 1575, 29892, 20699, 29918, 3888, 29922, 8516, 1125, 13, 1678, 9995, 26947, 278, 1798, 275, 545, 7481, 1213, 15945, 13, 1678, 4771, 943, 353, 5159, 13, 13, 1678, 565, 938, 29898, 29882, 431, 29889, 2917, 29889, 657, 877, 721, 29885, 290, 2699, 742, 525, 29896, 8785, 29901, 13, 4706, 19766, 29889, 5504, 29918, 695, 6490, 580, 13, 4706, 4771, 943, 29889, 21843, 4197, 13, 9651, 1798, 275, 545, 1349, 837, 8328, 29898, 1767, 29889, 333, 29897, 13, 9651, 363, 995, 297, 19766, 29889, 695, 6490, 29918, 4882, 29889, 5975, 580, 13, 9651, 565, 756, 5552, 29898, 1767, 29892, 525, 12863, 1535, 1495, 322, 995, 29889, 12863, 1535, 13, 632, 2314, 13, 13, 1678, 565, 938, 29898, 29882, 431, 29889, 2917, 29889, 657, 877, 29882, 4790, 456, 2699, 742, 525, 29896, 8785, 29901, 13, 4706, 19766, 29889, 5504, 29918, 695, 6490, 580, 13, 4706, 4771, 943, 29889, 21843, 4197, 13, 9651, 1798, 275, 545, 29950, 4790, 456, 1308, 29898, 1767, 29889, 333, 29897, 13, 9651, 363, 995, 297, 19766, 29889, 695, 6490, 29918, 4882, 29889, 5975, 580, 13, 9651, 565, 756, 5552, 29898, 1767, 29892, 525, 16063, 333, 537, 1495, 322, 995, 29889, 16063, 333, 537, 13, 632, 2314, 13, 13, 1678, 565, 938, 29898, 29882, 431, 29889, 2917, 29889, 657, 877, 15769, 742, 525, 29896, 8785, 29901, 13, 4706, 19766, 29889, 5504, 29918, 29885, 26165, 2650, 428, 580, 13, 4706, 4771, 943, 29889, 21843, 4197, 13, 9651, 1798, 275, 545, 14346, 29928, 2650, 428, 29898, 1767, 29889, 10141, 4775, 29897, 13, 9651, 363, 995, 297, 19766, 29889, 15769, 29918, 4882, 29889, 5975, 580, 13, 9651, 396, 338, 445, 565, 4312, 29973, 13, 9651, 565, 756, 5552, 29898, 1767, 29892, 525, 14506, 1626, 1495, 322, 995, 29889, 14506, 1626, 13, 632, 2314, 13, 13, 1678, 788, 29918, 3359, 1575, 29898, 23149, 943, 29897, 13, 13, 13, 1990, 1798, 275, 545, 1349, 837, 8328, 29898, 6691, 1125, 13, 1678, 9995, 1123, 26081, 310, 263, 1798, 275, 545, 14563, 8328, 1213, 15945, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 4742, 29918, 333, 1125, 13, 4706, 9995, 6644, 6646, 278, 23530, 1213, 15945, 13, 4706, 1583, 3032, 333, 353, 4742, 29918, 333, 13, 13, 1678, 732, 6799, 13, 1678, 822, 1024, 29898, 1311, 1125, 13, 4706, 9995, 11609, 278, 1024, 310, 278, 4742, 1213, 15945, 13, 4706, 736, 525, 8875, 6571, 4286, 4830, 29898, 13, 9651, 19766, 29889, 695, 6490, 29918, 4882, 29961, 1311, 3032, 333, 1822, 5479, 29892, 13, 9651, 376, 5776, 546, 1535, 1159, 13, 13, 1678, 732, 6799, 13, 1678, 822, 2106, 29898, 1311, 1125, 13, 4706, 9995, 11609, 278, 2106, 310, 278, 4742, 1213, 15945, 13, 4706, 396, 15154, 6719, 2931, 13, 4706, 736, 19766, 29889, 695, 6490, 29918, 4882, 29961, 1311, 3032, 333, 1822, 12863, 1535, 7503, 29899, 29896, 29962, 13, 13, 1678, 732, 6799, 13, 1678, 822, 3625, 29898, 1311, 1125, 13, 4706, 9995, 11609, 5852, 565, 7855, 338, 3625, 1213, 15945, 13, 4706, 736, 19766, 29889, 16515, 13, 13, 1678, 732, 6799, 13, 1678, 822, 5190, 29918, 974, 29918, 26658, 358, 29898, 1311, 1125, 13, 4706, 9995, 11609, 278, 5190, 310, 20039, 310, 445, 7855, 1213, 15945, 13, 4706, 736, 17067, 3580, 29918, 4741, 29931, 5425, 3308, 13, 13, 1678, 822, 2767, 29898, 1311, 1125, 13, 4706, 9995, 6422, 278, 23530, 1213, 15945, 13, 4706, 19766, 29889, 5504, 29918, 695, 6490, 580, 13, 13, 13, 1990, 1798, 275, 545, 29950, 4790, 456, 1308, 29898, 6691, 1125, 13, 1678, 9995, 1123, 26081, 310, 263, 1798, 275, 545, 298, 4790, 456, 1308, 1213, 15945, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 4742, 29918, 333, 1125, 13, 4706, 9995, 6644, 6646, 278, 23530, 1213, 15945, 13, 4706, 1583, 3032, 333, 353, 4742, 29918, 333, 13, 13, 1678, 732, 6799, 13, 1678, 822, 1024, 29898, 1311, 1125, 13, 4706, 9995, 11609, 278, 1024, 310, 278, 23530, 1213, 15945, 13, 4706, 736, 525, 8875, 6571, 4286, 4830, 29898, 13, 9651, 19766, 29889, 695, 6490, 29918, 4882, 29961, 1311, 3032, 333, 1822, 5479, 29892, 13, 9651, 376, 29950, 398, 333, 537, 1159, 13, 13, 1678, 732, 6799, 13, 1678, 822, 2106, 29898, 1311, 1125, 13, 4706, 9995, 11609, 278, 2106, 310, 278, 23530, 1213, 15945, 13, 4706, 396, 3349, 1273, 2931, 13, 4706, 736, 19766, 29889, 695, 6490, 29918, 4882, 29961, 1311, 3032, 333, 1822, 16063, 333, 537, 7503, 29899, 29896, 29962, 13, 13, 1678, 732, 6799, 13, 1678, 822, 3625, 29898, 1311, 1125, 13, 4706, 9995, 11609, 5852, 565, 7855, 338, 3625, 1213, 15945, 13, 4706, 736, 19766, 29889, 16515, 13, 13, 1678, 732, 6799, 13, 1678, 822, 5190, 29918, 974, 29918, 26658, 358, 29898, 1311, 1125, 13, 4706, 9995, 11609, 278, 5190, 310, 20039, 310, 445, 23530, 1213, 15945, 13, 4706, 736, 11860, 29908, 13, 13, 1678, 822, 2767, 29898, 1311, 1125, 13, 4706, 9995, 6422, 278, 23530, 1213, 15945, 13, 4706, 19766, 29889, 5504, 29918, 695, 6490, 580, 13, 13, 13, 1990, 1798, 275, 545, 14346, 29928, 2650, 428, 29898, 6691, 1125, 13, 1678, 9995, 1123, 26081, 310, 263, 1798, 275, 545, 9495, 1439, 3019, 1213, 15945, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 4742, 29918, 333, 1125, 13, 4706, 9995, 6644, 6646, 278, 23530, 1213, 15945, 13, 4706, 1583, 3032, 333, 353, 4742, 29918, 333, 13, 13, 1678, 732, 6799, 13, 1678, 822, 1024, 29898, 1311, 1125, 13, 4706, 9995, 11609, 278, 1024, 310, 278, 23530, 1213, 15945, 13, 4706, 736, 525, 8875, 6571, 4286, 4830, 29898, 13, 9651, 19766, 29889, 15769, 29918, 4882, 29961, 1311, 3032, 333, 1822, 5479, 29892, 13, 9651, 376, 14346, 1159, 13, 13, 1678, 732, 6799, 13, 1678, 822, 2106, 29898, 1311, 1125, 13, 4706, 9995, 11609, 278, 2106, 310, 278, 23530, 1213, 15945, 13, 4706, 736, 19766, 29889, 15769, 29918, 4882, 29961, 1311, 3032, 333, 1822, 2798, 13, 13, 1678, 732, 6799, 13, 1678, 822, 3625, 29898, 1311, 1125, 13, 4706, 9995, 11609, 5852, 565, 7855, 338, 3625, 1213, 15945, 13, 4706, 736, 19766, 29889, 16515, 13, 13, 1678, 732, 6799, 13, 1678, 822, 5190, 29918, 974, 29918, 26658, 358, 29898, 1311, 1125, 13, 4706, 9995, 11609, 278, 5190, 310, 20039, 310, 445, 23530, 1213, 15945, 13, 4706, 736, 376, 29924, 625, 29908, 13, 13, 1678, 822, 2767, 29898, 1311, 1125, 13, 4706, 9995, 6422, 278, 23530, 1213, 15945, 13, 4706, 19766, 29889, 5504, 29918, 29885, 26165, 2650, 428, 580, 13, 2 ]
src/solutions/188.py
bshankar/euler
0
124994
<reponame>bshankar/euler<filename>src/solutions/188.py def hyperpower(n, k): n_ = n for i in range(k-1): n_ = n**n_ % 100 return n_ print hyperpower(1777, 1855)
[ 1, 529, 276, 1112, 420, 29958, 29890, 845, 804, 279, 29914, 29872, 8584, 29966, 9507, 29958, 4351, 29914, 2929, 17925, 29914, 29896, 29947, 29947, 29889, 2272, 13, 1753, 11266, 13519, 29898, 29876, 29892, 413, 1125, 13, 1678, 302, 29918, 353, 302, 13, 1678, 363, 474, 297, 3464, 29898, 29895, 29899, 29896, 1125, 13, 4706, 302, 29918, 353, 302, 1068, 29876, 29918, 1273, 29871, 29896, 29900, 29900, 13, 308, 13, 1678, 736, 302, 29918, 13, 268, 13, 2158, 11266, 13519, 29898, 29896, 29955, 29955, 29955, 29892, 29871, 29896, 29947, 29945, 29945, 29897, 13, 2 ]
source_code/day021/snake.py
Zapdos26-Forks/100daysofcode
0
1608085
<filename>source_code/day021/snake.py from turtle import Turtle import math class Snake: def __init__(self): self.segments = [] self.starting_position = [ (0, 0), (-20, 0), (-40, 0)] self.move_distance = 20 self.directions = {'up': 90, 'down': 270, 'left': 180, 'right': 0} self.create_snake() self._head = self.segments[0] @property def head(self): return self._head def create_snake(self): for position in self.starting_position: self.add_segment(position) def add_segment(self, position): new_segment = Turtle("square") new_segment.penup() new_segment.goto(position) self.segments.append(new_segment) self.update_color() def extend(self): self.add_segment(self.segments[-1].position()) def update_color(self): for i in range(len(self.segments)): self.segments[i].color( int((math.sin((.3 * i) + 0) * 127) + 127.5), int((math.sin((.3 * i) + 2) * 127) + 127.5), int((math.sin((.3 * i) + 4) * 127) + 127.5) ) def move(self): for seg_num in range(len(self.segments) - 1, 0, -1): new_x = self.segments[seg_num - 1].xcor() new_y = self.segments[seg_num - 1].ycor() self.segments[seg_num].goto(new_x, new_y) self._head.forward(self.move_distance) def up(self): if self._head.heading() != self.directions['down']: self._head.setheading(self.directions['up']) def down(self): if self._head.heading() != self.directions['up']: self._head.setheading(self.directions['down']) def left(self): if self._head.heading() != self.directions['right']: self._head.setheading((self.directions['left'])) def right(self): if self._head.heading() != self.directions['left']: self._head.setheading(self.directions['right'])
[ 1, 529, 9507, 29958, 4993, 29918, 401, 29914, 3250, 29900, 29906, 29896, 29914, 29879, 21040, 29889, 2272, 13, 3166, 260, 4227, 280, 1053, 323, 4227, 280, 13, 5215, 5844, 13, 13, 13, 1990, 317, 21040, 29901, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 1125, 13, 4706, 1583, 29889, 10199, 1860, 353, 5159, 13, 4706, 1583, 29889, 2962, 292, 29918, 3283, 353, 518, 13, 9651, 313, 29900, 29892, 29871, 29900, 511, 8521, 29906, 29900, 29892, 29871, 29900, 511, 8521, 29946, 29900, 29892, 29871, 29900, 4638, 13, 4706, 1583, 29889, 11631, 29918, 19244, 353, 29871, 29906, 29900, 13, 4706, 1583, 29889, 20146, 1953, 353, 11117, 786, 2396, 29871, 29929, 29900, 29892, 525, 3204, 2396, 29871, 29906, 29955, 29900, 29892, 525, 1563, 2396, 29871, 29896, 29947, 29900, 29892, 525, 1266, 2396, 29871, 29900, 29913, 13, 4706, 1583, 29889, 3258, 29918, 29879, 21040, 580, 13, 4706, 1583, 3032, 2813, 353, 1583, 29889, 10199, 1860, 29961, 29900, 29962, 13, 13, 1678, 732, 6799, 13, 1678, 822, 2343, 29898, 1311, 1125, 13, 4706, 736, 1583, 3032, 2813, 13, 13, 1678, 822, 1653, 29918, 29879, 21040, 29898, 1311, 1125, 13, 4706, 363, 2602, 297, 1583, 29889, 2962, 292, 29918, 3283, 29901, 13, 9651, 1583, 29889, 1202, 29918, 28192, 29898, 3283, 29897, 13, 13, 1678, 822, 788, 29918, 28192, 29898, 1311, 29892, 2602, 1125, 13, 4706, 716, 29918, 28192, 353, 323, 4227, 280, 703, 17619, 1159, 13, 4706, 716, 29918, 28192, 29889, 2238, 786, 580, 13, 4706, 716, 29918, 28192, 29889, 27102, 29898, 3283, 29897, 13, 4706, 1583, 29889, 10199, 1860, 29889, 4397, 29898, 1482, 29918, 28192, 29897, 13, 4706, 1583, 29889, 5504, 29918, 2780, 580, 13, 13, 1678, 822, 10985, 29898, 1311, 1125, 13, 4706, 1583, 29889, 1202, 29918, 28192, 29898, 1311, 29889, 10199, 1860, 14352, 29896, 1822, 3283, 3101, 13, 13, 1678, 822, 2767, 29918, 2780, 29898, 1311, 1125, 13, 4706, 363, 474, 297, 3464, 29898, 2435, 29898, 1311, 29889, 10199, 1860, 22164, 13, 9651, 1583, 29889, 10199, 1860, 29961, 29875, 1822, 2780, 29898, 13, 18884, 938, 3552, 755, 29889, 5223, 3552, 29889, 29941, 334, 474, 29897, 718, 29871, 29900, 29897, 334, 29871, 29896, 29906, 29955, 29897, 718, 29871, 29896, 29906, 29955, 29889, 29945, 511, 13, 18884, 938, 3552, 755, 29889, 5223, 3552, 29889, 29941, 334, 474, 29897, 718, 29871, 29906, 29897, 334, 29871, 29896, 29906, 29955, 29897, 718, 29871, 29896, 29906, 29955, 29889, 29945, 511, 13, 18884, 938, 3552, 755, 29889, 5223, 3552, 29889, 29941, 334, 474, 29897, 718, 29871, 29946, 29897, 334, 29871, 29896, 29906, 29955, 29897, 718, 29871, 29896, 29906, 29955, 29889, 29945, 29897, 13, 9651, 1723, 13, 13, 1678, 822, 4337, 29898, 1311, 1125, 13, 4706, 363, 2377, 29918, 1949, 297, 3464, 29898, 2435, 29898, 1311, 29889, 10199, 1860, 29897, 448, 29871, 29896, 29892, 29871, 29900, 29892, 448, 29896, 1125, 13, 9651, 716, 29918, 29916, 353, 1583, 29889, 10199, 1860, 29961, 10199, 29918, 1949, 448, 29871, 29896, 1822, 29916, 2616, 580, 13, 9651, 716, 29918, 29891, 353, 1583, 29889, 10199, 1860, 29961, 10199, 29918, 1949, 448, 29871, 29896, 1822, 29891, 2616, 580, 13, 9651, 1583, 29889, 10199, 1860, 29961, 10199, 29918, 1949, 1822, 27102, 29898, 1482, 29918, 29916, 29892, 716, 29918, 29891, 29897, 13, 4706, 1583, 3032, 2813, 29889, 11333, 29898, 1311, 29889, 11631, 29918, 19244, 29897, 13, 13, 1678, 822, 701, 29898, 1311, 1125, 13, 4706, 565, 1583, 3032, 2813, 29889, 2813, 292, 580, 2804, 1583, 29889, 20146, 1953, 1839, 3204, 2033, 29901, 13, 9651, 1583, 3032, 2813, 29889, 842, 2813, 292, 29898, 1311, 29889, 20146, 1953, 1839, 786, 11287, 13, 13, 1678, 822, 1623, 29898, 1311, 1125, 13, 4706, 565, 1583, 3032, 2813, 29889, 2813, 292, 580, 2804, 1583, 29889, 20146, 1953, 1839, 786, 2033, 29901, 13, 9651, 1583, 3032, 2813, 29889, 842, 2813, 292, 29898, 1311, 29889, 20146, 1953, 1839, 3204, 11287, 13, 13, 1678, 822, 2175, 29898, 1311, 1125, 13, 4706, 565, 1583, 3032, 2813, 29889, 2813, 292, 580, 2804, 1583, 29889, 20146, 1953, 1839, 1266, 2033, 29901, 13, 9651, 1583, 3032, 2813, 29889, 842, 2813, 292, 3552, 1311, 29889, 20146, 1953, 1839, 1563, 25901, 13, 13, 1678, 822, 1492, 29898, 1311, 1125, 13, 4706, 565, 1583, 3032, 2813, 29889, 2813, 292, 580, 2804, 1583, 29889, 20146, 1953, 1839, 1563, 2033, 29901, 13, 9651, 1583, 3032, 2813, 29889, 842, 2813, 292, 29898, 1311, 29889, 20146, 1953, 1839, 1266, 11287, 13, 2 ]
src/while_exit.py
Alex9808/py101
25
16150
<reponame>Alex9808/py101<gh_stars>10-100 #!/usr/bin/env python ''' Este programa se repetirá 3 veces o hasta que se ingrese la palabra "despedida" y desplegará sólo el número de intentos fallidos hasta que cualquiera de los eventos ocurentradara. Al ingresar la palabra "termina" el programa se detendrá.''' entrada = "" suma = 0 while suma < 3: entrada = input("Clave:") if entrada == "despedida": break elif entrada == "termina": exit() suma = suma + 1 print("Intento %d. \n " % suma) print("Tuviste %d intentos fallidos." % suma)
[ 1, 529, 276, 1112, 420, 29958, 17406, 29929, 29947, 29900, 29947, 29914, 2272, 29896, 29900, 29896, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29900, 29899, 29896, 29900, 29900, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 30004, 13, 30004, 13, 12008, 12723, 16914, 409, 21159, 381, 29976, 29871, 29941, 24063, 288, 8012, 712, 409, 2348, 690, 29872, 30004, 13, 1678, 425, 27555, 336, 376, 2783, 9795, 1458, 29908, 343, 553, 552, 5397, 29976, 19615, 417, 560, 13831, 316, 7609, 359, 30004, 13, 1678, 6416, 4396, 8012, 712, 8351, 339, 8311, 316, 1232, 1741, 359, 288, 2764, 296, 3665, 2518, 29889, 838, 30004, 13, 1678, 2348, 690, 279, 425, 27555, 336, 376, 8489, 1099, 29908, 560, 16914, 409, 1439, 355, 6135, 29889, 12008, 30004, 13, 30004, 13, 14856, 1114, 353, 5124, 30004, 13, 2083, 29874, 353, 29871, 29900, 30004, 13, 8000, 2533, 29874, 529, 29871, 29941, 29901, 30004, 13, 1678, 9953, 1114, 353, 1881, 703, 29907, 18398, 29901, 1159, 30004, 13, 1678, 565, 9953, 1114, 1275, 376, 2783, 9795, 1458, 1115, 30004, 13, 4706, 2867, 30004, 13, 1678, 25342, 9953, 1114, 1275, 376, 8489, 1099, 1115, 30004, 13, 4706, 6876, 26471, 13, 1678, 2533, 29874, 353, 2533, 29874, 718, 29871, 29896, 30004, 13, 1678, 1596, 703, 2928, 9239, 1273, 29881, 29889, 320, 29876, 376, 1273, 2533, 29874, 8443, 13, 2158, 703, 23215, 1730, 371, 1273, 29881, 7609, 359, 6416, 4396, 1213, 1273, 2533, 29874, 8443, 13, 2 ]
easy-receptive-fields-pytorch/receptivefield/tests/test_pytorch.py
Swinsie/cv-rep-fork
0
29989
<filename>easy-receptive-fields-pytorch/receptivefield/tests/test_pytorch.py import pytest import torch.nn as nn from numpy.testing import assert_allclose from receptivefield.pytorch import PytorchReceptiveField from receptivefield.image import get_default_image from receptivefield.types import ImageShape class Linear(nn.Module): """An identity activation function""" def forward(self, x): return x class SimpleVGG(nn.Module): def __init__(self, disable_activations: bool = False): super(SimpleVGG, self).__init__() self.blocks = self._build_blocks(disable_activations) self.feature_maps = None def forward(self, x): self.feature_maps = [] for block in self.blocks: for layer in block: x = layer(x) self.feature_maps.append(x) return x def _build_blocks(self, disable_activations: bool): activation = lambda: Linear() if disable_activations else nn.ReLU() block1 = [ nn.Conv2d(3, 64, kernel_size=3), activation(), nn.Conv2d(64, 64, kernel_size=3), activation(), nn.AvgPool2d(kernel_size=2, stride=2), ] block2 = [ nn.Conv2d(64, 128, kernel_size=3), activation(), nn.Conv2d(128, 128, kernel_size=3), activation(), nn.AvgPool2d(kernel_size=2, stride=2), ] block3 = [ nn.Conv2d(128, 256, kernel_size=3), activation(), nn.Conv2d(256, 256, kernel_size=3), activation(), nn.AvgPool2d(kernel_size=2, stride=2), ] return [nn.Sequential(*block1), nn.Sequential(*block2), nn.Sequential(*block3)] def model_fn() -> nn.Module: model = SimpleVGG(disable_activations=True) model.eval() return model def get_test_image(shape=(64, 64), tile_factor=0): image = get_default_image(shape=shape, tile_factor=tile_factor) return image def test_example_network(): input_shape = [96, 96, 3] rf = PytorchReceptiveField(model_fn) rf_params = rf.compute(input_shape=ImageShape(*input_shape)) assert_allclose(rf_params[0].rf.size, (6, 6)) assert_allclose(rf_params[0].rf.stride, (2, 2)) rs = 6 + (2 + 2 + 1) * 2 assert_allclose(rf_params[1].rf.size, (rs, rs)) assert_allclose(rf_params[1].rf.stride, (4, 4)) rs = 6 + (2 + 2 + 1) * 2 + (2 + 2 + 1) * 4 assert_allclose(rf_params[2].rf.size, (rs, rs)) assert_allclose(rf_params[2].rf.stride, (8, 8)) if __name__ == "__main__": pytest.main([__file__])
[ 1, 529, 9507, 29958, 29872, 8995, 29899, 276, 1547, 573, 29899, 9621, 29899, 2272, 7345, 305, 29914, 276, 1547, 573, 2671, 29914, 21150, 29914, 1688, 29918, 2272, 7345, 305, 29889, 2272, 13, 5215, 11451, 1688, 13, 5215, 4842, 305, 29889, 15755, 408, 302, 29876, 13, 3166, 12655, 29889, 13424, 1053, 4974, 29918, 497, 5358, 13, 3166, 337, 1547, 573, 2671, 29889, 2272, 7345, 305, 1053, 349, 3637, 25350, 1123, 1547, 573, 3073, 13, 3166, 337, 1547, 573, 2671, 29889, 3027, 1053, 679, 29918, 4381, 29918, 3027, 13, 3166, 337, 1547, 573, 2671, 29889, 8768, 1053, 7084, 24111, 13, 13, 13, 1990, 22985, 29898, 15755, 29889, 7355, 1125, 13, 1678, 9995, 2744, 10110, 26229, 740, 15945, 29908, 13, 13, 1678, 822, 6375, 29898, 1311, 29892, 921, 1125, 13, 4706, 736, 921, 13, 13, 13, 1990, 12545, 29963, 26788, 29898, 15755, 29889, 7355, 1125, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 11262, 29918, 11236, 800, 29901, 6120, 353, 7700, 1125, 13, 4706, 2428, 29898, 15427, 29963, 26788, 29892, 1583, 467, 1649, 2344, 1649, 580, 13, 4706, 1583, 29889, 1271, 29879, 353, 1583, 3032, 4282, 29918, 1271, 29879, 29898, 20472, 29918, 11236, 800, 29897, 13, 4706, 1583, 29889, 14394, 29918, 10339, 353, 6213, 13, 13, 1678, 822, 6375, 29898, 1311, 29892, 921, 1125, 13, 4706, 1583, 29889, 14394, 29918, 10339, 353, 5159, 13, 4706, 363, 2908, 297, 1583, 29889, 1271, 29879, 29901, 13, 9651, 363, 7546, 297, 2908, 29901, 13, 18884, 921, 353, 7546, 29898, 29916, 29897, 13, 9651, 1583, 29889, 14394, 29918, 10339, 29889, 4397, 29898, 29916, 29897, 13, 4706, 736, 921, 13, 13, 1678, 822, 903, 4282, 29918, 1271, 29879, 29898, 1311, 29892, 11262, 29918, 11236, 800, 29901, 6120, 1125, 13, 4706, 26229, 353, 14013, 29901, 22985, 580, 565, 11262, 29918, 11236, 800, 1683, 302, 29876, 29889, 1123, 29931, 29965, 580, 13, 13, 4706, 2908, 29896, 353, 518, 13, 9651, 302, 29876, 29889, 1168, 29894, 29906, 29881, 29898, 29941, 29892, 29871, 29953, 29946, 29892, 8466, 29918, 2311, 29922, 29941, 511, 13, 9651, 26229, 3285, 13, 9651, 302, 29876, 29889, 1168, 29894, 29906, 29881, 29898, 29953, 29946, 29892, 29871, 29953, 29946, 29892, 8466, 29918, 2311, 29922, 29941, 511, 13, 9651, 26229, 3285, 13, 9651, 302, 29876, 29889, 12810, 29887, 11426, 29906, 29881, 29898, 17460, 29918, 2311, 29922, 29906, 29892, 380, 2426, 29922, 29906, 511, 13, 4706, 4514, 13, 4706, 2908, 29906, 353, 518, 13, 9651, 302, 29876, 29889, 1168, 29894, 29906, 29881, 29898, 29953, 29946, 29892, 29871, 29896, 29906, 29947, 29892, 8466, 29918, 2311, 29922, 29941, 511, 13, 9651, 26229, 3285, 13, 9651, 302, 29876, 29889, 1168, 29894, 29906, 29881, 29898, 29896, 29906, 29947, 29892, 29871, 29896, 29906, 29947, 29892, 8466, 29918, 2311, 29922, 29941, 511, 13, 9651, 26229, 3285, 13, 9651, 302, 29876, 29889, 12810, 29887, 11426, 29906, 29881, 29898, 17460, 29918, 2311, 29922, 29906, 29892, 380, 2426, 29922, 29906, 511, 13, 4706, 4514, 13, 4706, 2908, 29941, 353, 518, 13, 9651, 302, 29876, 29889, 1168, 29894, 29906, 29881, 29898, 29896, 29906, 29947, 29892, 29871, 29906, 29945, 29953, 29892, 8466, 29918, 2311, 29922, 29941, 511, 13, 9651, 26229, 3285, 13, 9651, 302, 29876, 29889, 1168, 29894, 29906, 29881, 29898, 29906, 29945, 29953, 29892, 29871, 29906, 29945, 29953, 29892, 8466, 29918, 2311, 29922, 29941, 511, 13, 9651, 26229, 3285, 13, 9651, 302, 29876, 29889, 12810, 29887, 11426, 29906, 29881, 29898, 17460, 29918, 2311, 29922, 29906, 29892, 380, 2426, 29922, 29906, 511, 13, 4706, 4514, 13, 4706, 736, 518, 15755, 29889, 16941, 2556, 10456, 1271, 29896, 511, 302, 29876, 29889, 16941, 2556, 10456, 1271, 29906, 511, 302, 29876, 29889, 16941, 2556, 10456, 1271, 29941, 4638, 13, 13, 13, 1753, 1904, 29918, 9144, 580, 1599, 302, 29876, 29889, 7355, 29901, 13, 1678, 1904, 353, 12545, 29963, 26788, 29898, 20472, 29918, 11236, 800, 29922, 5574, 29897, 13, 1678, 1904, 29889, 14513, 580, 13, 1678, 736, 1904, 13, 13, 13, 1753, 679, 29918, 1688, 29918, 3027, 29898, 12181, 7607, 29953, 29946, 29892, 29871, 29953, 29946, 511, 25900, 29918, 19790, 29922, 29900, 1125, 13, 1678, 1967, 353, 679, 29918, 4381, 29918, 3027, 29898, 12181, 29922, 12181, 29892, 25900, 29918, 19790, 29922, 29873, 488, 29918, 19790, 29897, 13, 1678, 736, 1967, 13, 13, 13, 1753, 1243, 29918, 4773, 29918, 11618, 7295, 13, 1678, 1881, 29918, 12181, 353, 518, 29929, 29953, 29892, 29871, 29929, 29953, 29892, 29871, 29941, 29962, 13, 1678, 364, 29888, 353, 349, 3637, 25350, 1123, 1547, 573, 3073, 29898, 4299, 29918, 9144, 29897, 13, 1678, 364, 29888, 29918, 7529, 353, 364, 29888, 29889, 26017, 29898, 2080, 29918, 12181, 29922, 2940, 24111, 10456, 2080, 29918, 12181, 876, 13, 13, 1678, 4974, 29918, 497, 5358, 29898, 9600, 29918, 7529, 29961, 29900, 1822, 9600, 29889, 2311, 29892, 313, 29953, 29892, 29871, 29953, 876, 13, 1678, 4974, 29918, 497, 5358, 29898, 9600, 29918, 7529, 29961, 29900, 1822, 9600, 29889, 303, 2426, 29892, 313, 29906, 29892, 29871, 29906, 876, 13, 13, 1678, 20371, 353, 29871, 29953, 718, 313, 29906, 718, 29871, 29906, 718, 29871, 29896, 29897, 334, 29871, 29906, 13, 1678, 4974, 29918, 497, 5358, 29898, 9600, 29918, 7529, 29961, 29896, 1822, 9600, 29889, 2311, 29892, 313, 2288, 29892, 20371, 876, 13, 1678, 4974, 29918, 497, 5358, 29898, 9600, 29918, 7529, 29961, 29896, 1822, 9600, 29889, 303, 2426, 29892, 313, 29946, 29892, 29871, 29946, 876, 13, 13, 1678, 20371, 353, 29871, 29953, 718, 313, 29906, 718, 29871, 29906, 718, 29871, 29896, 29897, 334, 29871, 29906, 718, 313, 29906, 718, 29871, 29906, 718, 29871, 29896, 29897, 334, 29871, 29946, 13, 1678, 4974, 29918, 497, 5358, 29898, 9600, 29918, 7529, 29961, 29906, 1822, 9600, 29889, 2311, 29892, 313, 2288, 29892, 20371, 876, 13, 1678, 4974, 29918, 497, 5358, 29898, 9600, 29918, 7529, 29961, 29906, 1822, 9600, 29889, 303, 2426, 29892, 313, 29947, 29892, 29871, 29947, 876, 13, 13, 13, 361, 4770, 978, 1649, 1275, 376, 1649, 3396, 1649, 1115, 13, 1678, 11451, 1688, 29889, 3396, 4197, 1649, 1445, 1649, 2314, 13, 2 ]
setup.py
anthonyvallee/bettejpeg
1
35798
<reponame>anthonyvallee/bettejpeg<gh_stars>1-10 from setuptools import (find_packages, setup) from rap import betterjpeg setup( name=betterjpeg.__pkgname__, description=betterjpeg.__description__, version=betterjpeg.__version__, packages=["rap.betterjpeg"], entry_points=""" [console_scripts] betterjpeg=rap.betterjpeg.betterjpeg:cli """ )
[ 1, 529, 276, 1112, 420, 29958, 9716, 2592, 791, 17179, 29914, 29890, 2353, 26568, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 3166, 731, 21245, 8789, 1053, 313, 2886, 29918, 8318, 29892, 6230, 8443, 13, 30004, 13, 3166, 14937, 1053, 2253, 26568, 30004, 13, 30004, 13, 14669, 29898, 30004, 13, 1678, 1024, 29922, 6878, 357, 26568, 17255, 15865, 978, 1649, 11167, 13, 1678, 6139, 29922, 6878, 357, 26568, 17255, 8216, 1649, 11167, 13, 1678, 1873, 29922, 6878, 357, 26568, 17255, 3259, 1649, 11167, 13, 1678, 9741, 29922, 3366, 2390, 29889, 6878, 357, 26568, 12436, 30004, 13, 1678, 6251, 29918, 9748, 13776, 19451, 13, 4706, 518, 11058, 29918, 16713, 29962, 30004, 13, 4706, 2253, 26568, 29922, 2390, 29889, 6878, 357, 26568, 29889, 6878, 357, 26568, 29901, 11303, 30004, 13, 1678, 9995, 30004, 13, 8443, 13, 2 ]
a10sdk/core/ip/ip_as_path.py
deepfield/a10sdk-python
16
73003
<filename>a10sdk/core/ip/ip_as_path.py from a10sdk.common.A10BaseClass import A10BaseClass class AsPath(A10BaseClass): """Class Description:: Configure an AS-path list for BGP. Class as-path supports CRUD Operations and inherits from `common/A10BaseClass`. This class is the `"PARENT"` class for this module.` :param access_list: {"description": "Specify an access list name (Regular expression access-list name)", "format": "string", "minLength": 1, "optional": false, "maxLength": 128, "type": "string"} :param action: {"optional": false, "enum": ["deny", "permit"], "type": "string", "description": "'deny': Specify packets to reject; 'permit': Specify packets to forward; ", "format": "enum"} :param uuid: {"description": "uuid of the object", "format": "string", "minLength": 1, "modify-not-allowed": 1, "optional": true, "maxLength": 64, "type": "string"} :param value: {"optional": false, "type": "string", "description": "A regular-expression to match the BGP AS paths", "format": "string-rlx"} :param DeviceProxy: The device proxy for REST operations and session handling. Refer to `common/device_proxy.py` URL for this object:: `https://<Hostname|Ip address>//axapi/v3/ip/as-path/{access_list}+{action}+{value}`. """ def __init__(self, **kwargs): self.ERROR_MSG = "" self.required = [ "access_list","action","value"] self.b_key = "as-path" self.a10_url="/axapi/v3/ip/as-path/{access_list}+{action}+{value}" self.DeviceProxy = "" self.access_list = "" self.action = "" self.uuid = "" self.value = "" for keys, value in kwargs.items(): setattr(self,keys, value)
[ 1, 529, 9507, 29958, 29874, 29896, 29900, 15348, 29914, 3221, 29914, 666, 29914, 666, 29918, 294, 29918, 2084, 29889, 2272, 13, 3166, 263, 29896, 29900, 15348, 29889, 9435, 29889, 29909, 29896, 29900, 5160, 2385, 1053, 319, 29896, 29900, 5160, 2385, 13, 13, 13, 1990, 1094, 2605, 29898, 29909, 29896, 29900, 5160, 2385, 1125, 13, 268, 13, 1678, 9995, 2385, 12953, 1057, 13, 1678, 1281, 4532, 385, 3339, 29899, 2084, 1051, 363, 350, 19903, 29889, 13, 13, 1678, 4134, 408, 29899, 2084, 11286, 15600, 15789, 6607, 800, 322, 7846, 1169, 515, 421, 9435, 29914, 29909, 29896, 29900, 5160, 2385, 1412, 13, 1678, 910, 770, 338, 278, 10248, 16320, 3919, 6937, 770, 363, 445, 3883, 17580, 13, 13, 1678, 584, 3207, 2130, 29918, 1761, 29901, 8853, 8216, 1115, 376, 10299, 1598, 385, 2130, 1051, 1024, 313, 4597, 1070, 4603, 2130, 29899, 1761, 1024, 19123, 376, 4830, 1115, 376, 1807, 613, 376, 1195, 6513, 1115, 29871, 29896, 29892, 376, 25253, 1115, 2089, 29892, 376, 3317, 6513, 1115, 29871, 29896, 29906, 29947, 29892, 376, 1853, 1115, 376, 1807, 9092, 13, 1678, 584, 3207, 3158, 29901, 8853, 25253, 1115, 2089, 29892, 376, 18605, 1115, 6796, 1145, 29891, 613, 376, 546, 2415, 12436, 376, 1853, 1115, 376, 1807, 613, 376, 8216, 1115, 13577, 1145, 29891, 2396, 12048, 1598, 23912, 304, 12560, 29936, 525, 546, 2415, 2396, 12048, 1598, 23912, 304, 6375, 29936, 9162, 376, 4830, 1115, 376, 18605, 9092, 13, 1678, 584, 3207, 318, 5416, 29901, 8853, 8216, 1115, 376, 25118, 310, 278, 1203, 613, 376, 4830, 1115, 376, 1807, 613, 376, 1195, 6513, 1115, 29871, 29896, 29892, 376, 1545, 1598, 29899, 1333, 29899, 24622, 1115, 29871, 29896, 29892, 376, 25253, 1115, 1565, 29892, 376, 3317, 6513, 1115, 29871, 29953, 29946, 29892, 376, 1853, 1115, 376, 1807, 9092, 13, 1678, 584, 3207, 995, 29901, 8853, 25253, 1115, 2089, 29892, 376, 1853, 1115, 376, 1807, 613, 376, 8216, 1115, 376, 29909, 4943, 29899, 17471, 304, 1993, 278, 350, 19903, 3339, 10898, 613, 376, 4830, 1115, 376, 1807, 29899, 2096, 29916, 9092, 13, 1678, 584, 3207, 21830, 14048, 29901, 450, 4742, 10166, 363, 16759, 6931, 322, 4867, 11415, 29889, 4118, 304, 421, 9435, 29914, 10141, 29918, 14701, 29889, 2272, 29952, 13, 13, 268, 13, 13, 1678, 3988, 363, 445, 1203, 1057, 13, 1678, 421, 991, 597, 29966, 8514, 978, 29989, 29902, 29886, 3211, 29958, 458, 1165, 2754, 29914, 29894, 29941, 29914, 666, 29914, 294, 29899, 2084, 19248, 5943, 29918, 1761, 7517, 29912, 2467, 7517, 29912, 1767, 29913, 1412, 13, 13, 268, 13, 13, 268, 13, 1678, 9995, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 3579, 19290, 1125, 13, 4706, 1583, 29889, 11432, 29918, 4345, 29954, 353, 5124, 13, 4706, 1583, 29889, 12403, 353, 518, 376, 5943, 29918, 1761, 3284, 2467, 3284, 1767, 3108, 13, 13, 4706, 1583, 29889, 29890, 29918, 1989, 353, 376, 294, 29899, 2084, 29908, 13, 4706, 1583, 29889, 29874, 29896, 29900, 29918, 2271, 13802, 1165, 2754, 29914, 29894, 29941, 29914, 666, 29914, 294, 29899, 2084, 19248, 5943, 29918, 1761, 7517, 29912, 2467, 7517, 29912, 1767, 5038, 13, 4706, 1583, 29889, 11501, 14048, 353, 5124, 13, 4706, 1583, 29889, 5943, 29918, 1761, 353, 5124, 13, 4706, 1583, 29889, 2467, 353, 5124, 13, 4706, 1583, 29889, 25118, 353, 5124, 13, 4706, 1583, 29889, 1767, 353, 5124, 13, 13, 4706, 363, 6611, 29892, 995, 297, 9049, 5085, 29889, 7076, 7295, 13, 9651, 731, 5552, 29898, 1311, 29892, 8149, 29892, 995, 29897, 13, 13, 13, 2 ]
asyncapi/events/backends/gcloud_pubsub.py
dutradda/doodle
34
137471
import asyncio import functools import secrets from concurrent.futures import ThreadPoolExecutor from concurrent.futures import TimeoutError as FutureTimeoutError from logging import Logger, getLogger from typing import TYPE_CHECKING, Any, Dict, Tuple from urllib.parse import urlparse from broadcaster._backends.base import BroadcastBackend from google.cloud import pubsub_v1 from google.cloud.pubsub_v1.types import PullResponse, ReceivedMessage from asyncapi import ( GCloudPubSubConsumerDisconnectError, GCloudPubSubPublishTimeoutError, ) from .. import Event if TYPE_CHECKING: AsyncFutureHint = asyncio.Future[PullResponse] else: AsyncFutureHint = asyncio.Future class GCloudPubSubBackend(BroadcastBackend): def __init__( self, url: str, bindings: Dict[str, str] = {}, logger: Logger = getLogger(__name__), ): url_parsed = urlparse(url, scheme='gcloud-pubsub') self._project = url_parsed.netloc self._consumer_channels: Dict[str, str] = {} self._producer_channels: Dict[str, str] = {} self._channel_index = 0 self._logger = logger self._set_consumer_config(bindings) self._disconnected = True self._executor = ThreadPoolExecutor(self._consumer_max_workers) async def connect(self) -> None: self._producer = pubsub_v1.PublisherClient() self._consumer = pubsub_v1.SubscriberClient() self._disconnected = False async def disconnect(self) -> None: self._disconnected = True self._producer.stop() self._consumer.close() del self._producer del self._consumer async def subscribe(self, channel: str) -> None: pubsub_channel = self._consumer.subscription_path( self._project, channel ) self._consumer_channels[channel] = pubsub_channel async def unsubscribe(self, channel: str) -> None: self._consumer_channels.pop(channel) async def publish( self, channel: str, message: Any, retries_counter: int = 1 ) -> None: producer_channel = self._producer_channels.get(channel) if not producer_channel: producer_channel = self._producer.topic_path( self._project, channel ) self._producer_channels[channel] = producer_channel future = self._producer.publish(producer_channel, message.encode()) try: future.result(timeout=self._publish_timeout) except FutureTimeoutError: if retries_counter >= self._publish_retries: raise GCloudPubSubPublishTimeoutError( f'publish timeout; channel={channel}; ' f'message={message[:100]}...' ) else: await self.publish(channel, message, retries_counter + 1) async def next_published(self) -> Event: ( received_message, channel_id, pubsub_channel, ) = await self._pull_message_from_consumer() event = Event(channel_id, received_message.message.data.decode()) if self._consumer_ack_messages: await self.wait_ack(received_message, pubsub_channel) else: event.context['ack_func'] = functools.partial( self.wait_ack, received_message, pubsub_channel, ) return event async def _pull_message_from_consumer( self, ) -> Tuple[ReceivedMessage, str, str]: channel_index = ( secrets.choice(range(len(self._consumer_channels))) if self._consumer_channels else 0 ) while not self._disconnected: channels = list(self._consumer_channels.items()) if not len(channels): await asyncio.sleep(self._consumer_wait_time) continue if channel_index >= len(channels): channel_index = 0 channel_id, pubsub_channel = channels[channel_index] pull_message_future: AsyncFutureHint pull_message_future = asyncio.get_running_loop().run_in_executor( # type: ignore self._executor, functools.partial( self._consumer.pull, pubsub_channel, max_messages=1, return_immediately=True, ), ) try: response = await asyncio.wait_for( pull_message_future, self._consumer_pull_message_timeout ) except asyncio.TimeoutError: channel_index += 1 await asyncio.sleep(self._consumer_wait_time) continue else: if not response.received_messages: channel_index += 1 await asyncio.sleep(self._consumer_wait_time) continue await asyncio.sleep(self._pull_message_wait_time) return ( response.received_messages[0], channel_id, pubsub_channel, ) raise GCloudPubSubConsumerDisconnectError() async def wait_ack( self, message: ReceivedMessage, pubsub_channel: str, retries_counter: int = 1, ) -> None: future = asyncio.get_running_loop().run_in_executor( self._executor, functools.partial( self._consumer.acknowledge, pubsub_channel, [message.ack_id], ), ) try: await asyncio.wait_for(future, timeout=self._consumer_ack_timeout) except asyncio.TimeoutError: if retries_counter >= self._consumer_ack_retries: self._logger.warning( f'ack timeout {self._consumer_ack_timeout}; ' f'message={message.message.data.decode()[:100]}...' ) else: await self.wait_ack( message, pubsub_channel, retries_counter + 1 ) except asyncio.CancelledError: self._logger.warning( 'ack cancelled; ' f'message={message.message.data.decode()[:100]}...' ) def _set_consumer_config(self, bindings: Dict[str, str]) -> None: consumer_wait_time = 1.0 consumer_ack_messages = False consumer_ack_timeout = 1.0 consumer_ack_retries = 3 consumer_pull_message_timeout = 1.0 consumer_max_workers = 10 publish_timeout = 5.0 publish_retries = 3 pull_message_wait_time = 0.1 for config_name, config_value in bindings.items(): if config_name == 'consumer_wait_time': consumer_wait_time = float(config_value) elif config_name == 'consumer_ack_messages': consumer_ack_messages = config_value in ( '1', 'true', 't', 'True', 'y', 'yes', ) elif config_name == 'consumer_ack_timeout': consumer_ack_timeout = float(config_value) elif config_name == 'consumer_ack_retries': consumer_ack_retries = int(config_value) elif config_name == 'consumer_max_workers': consumer_max_workers = int(config_value) elif config_name == 'consumer_pull_message_timeout': consumer_pull_message_timeout = float(config_value) elif config_name == 'publish_timeout': publish_timeout = float(config_value) elif config_name == 'publish_retries': publish_retries = int(config_value) elif config_name == 'pull_message_wait_time': pull_message_wait_time = float(config_value) self._consumer_wait_time = consumer_wait_time self._consumer_ack_messages = consumer_ack_messages self._consumer_ack_timeout = consumer_ack_timeout self._consumer_ack_retries = consumer_ack_retries self._consumer_pull_message_timeout = consumer_pull_message_timeout self._consumer_max_workers = consumer_max_workers self._publish_timeout = publish_timeout self._publish_retries = publish_retries self._pull_message_wait_time = pull_message_wait_time
[ 1, 1053, 408, 948, 3934, 13, 5215, 2090, 312, 8789, 13, 5215, 22183, 1372, 13, 3166, 21984, 29889, 29888, 329, 1973, 1053, 10480, 11426, 13366, 13, 3166, 21984, 29889, 29888, 329, 1973, 1053, 5974, 449, 2392, 408, 16367, 10851, 2392, 13, 3166, 12183, 1053, 28468, 29892, 679, 16363, 13, 3166, 19229, 1053, 323, 6959, 29918, 3210, 16658, 4214, 29892, 3139, 29892, 360, 919, 29892, 12603, 552, 13, 3166, 3142, 1982, 29889, 5510, 1053, 3142, 5510, 13, 13, 3166, 7300, 29883, 1901, 3032, 1627, 1975, 29889, 3188, 1053, 25484, 5841, 355, 13, 3166, 5386, 29889, 9274, 1053, 2529, 1491, 29918, 29894, 29896, 13, 3166, 5386, 29889, 9274, 29889, 5467, 1491, 29918, 29894, 29896, 29889, 8768, 1053, 349, 913, 5103, 29892, 24328, 2347, 3728, 13, 13, 3166, 7465, 2754, 1053, 313, 13, 1678, 402, 20442, 21076, 4035, 13696, 4680, 4205, 6915, 2392, 29892, 13, 1678, 402, 20442, 21076, 4035, 21076, 1674, 10851, 2392, 29892, 13, 29897, 13, 13, 3166, 6317, 1053, 6864, 13, 13, 13, 361, 323, 6959, 29918, 3210, 16658, 4214, 29901, 13, 1678, 20688, 20154, 28016, 353, 408, 948, 3934, 29889, 20154, 29961, 29925, 913, 5103, 29962, 13, 2870, 29901, 13, 1678, 20688, 20154, 28016, 353, 408, 948, 3934, 29889, 20154, 13, 13, 13, 1990, 402, 20442, 21076, 4035, 5841, 355, 29898, 29933, 9972, 4384, 5841, 355, 1125, 13, 1678, 822, 4770, 2344, 12035, 13, 4706, 1583, 29892, 13, 4706, 3142, 29901, 851, 29892, 13, 4706, 7868, 886, 29901, 360, 919, 29961, 710, 29892, 851, 29962, 353, 24335, 13, 4706, 17927, 29901, 28468, 353, 679, 16363, 22168, 978, 1649, 511, 13, 268, 1125, 13, 4706, 3142, 29918, 862, 8485, 353, 3142, 5510, 29898, 2271, 29892, 11380, 2433, 29887, 9274, 29899, 5467, 1491, 1495, 13, 4706, 1583, 3032, 4836, 353, 3142, 29918, 862, 8485, 29889, 1212, 2029, 13, 4706, 1583, 3032, 25978, 261, 29918, 305, 12629, 29901, 360, 919, 29961, 710, 29892, 851, 29962, 353, 6571, 13, 4706, 1583, 3032, 5498, 2265, 29918, 305, 12629, 29901, 360, 919, 29961, 710, 29892, 851, 29962, 353, 6571, 13, 4706, 1583, 3032, 12719, 29918, 2248, 353, 29871, 29900, 13, 4706, 1583, 3032, 21707, 353, 17927, 13, 4706, 1583, 3032, 842, 29918, 25978, 261, 29918, 2917, 29898, 5355, 886, 29897, 13, 4706, 1583, 3032, 2218, 18045, 353, 5852, 13, 4706, 1583, 3032, 4258, 3406, 353, 10480, 11426, 13366, 29898, 1311, 3032, 25978, 261, 29918, 3317, 29918, 1287, 414, 29897, 13, 13, 1678, 7465, 822, 4511, 29898, 1311, 29897, 1599, 6213, 29901, 13, 4706, 1583, 3032, 5498, 2265, 353, 2529, 1491, 29918, 29894, 29896, 29889, 21076, 1674, 261, 4032, 580, 13, 4706, 1583, 3032, 25978, 261, 353, 2529, 1491, 29918, 29894, 29896, 29889, 4035, 7588, 495, 4032, 580, 13, 4706, 1583, 3032, 2218, 18045, 353, 7700, 13, 13, 1678, 7465, 822, 766, 6915, 29898, 1311, 29897, 1599, 6213, 29901, 13, 4706, 1583, 3032, 2218, 18045, 353, 5852, 13, 4706, 1583, 3032, 5498, 2265, 29889, 9847, 580, 13, 4706, 1583, 3032, 25978, 261, 29889, 5358, 580, 13, 4706, 628, 1583, 3032, 5498, 2265, 13, 4706, 628, 1583, 3032, 25978, 261, 13, 13, 1678, 7465, 822, 1014, 13086, 29898, 1311, 29892, 8242, 29901, 851, 29897, 1599, 6213, 29901, 13, 4706, 2529, 1491, 29918, 12719, 353, 1583, 3032, 25978, 261, 29889, 1491, 22371, 29918, 2084, 29898, 13, 9651, 1583, 3032, 4836, 29892, 8242, 13, 4706, 1723, 13, 4706, 1583, 3032, 25978, 261, 29918, 305, 12629, 29961, 12719, 29962, 353, 2529, 1491, 29918, 12719, 13, 13, 1678, 7465, 822, 443, 19496, 29898, 1311, 29892, 8242, 29901, 851, 29897, 1599, 6213, 29901, 13, 4706, 1583, 3032, 25978, 261, 29918, 305, 12629, 29889, 7323, 29898, 12719, 29897, 13, 13, 1678, 7465, 822, 9805, 29898, 13, 4706, 1583, 29892, 8242, 29901, 851, 29892, 2643, 29901, 3139, 29892, 3240, 2722, 29918, 11808, 29901, 938, 353, 29871, 29896, 13, 1678, 1723, 1599, 6213, 29901, 13, 4706, 14297, 29918, 12719, 353, 1583, 3032, 5498, 2265, 29918, 305, 12629, 29889, 657, 29898, 12719, 29897, 13, 13, 4706, 565, 451, 14297, 29918, 12719, 29901, 13, 9651, 14297, 29918, 12719, 353, 1583, 3032, 5498, 2265, 29889, 13010, 29918, 2084, 29898, 13, 18884, 1583, 3032, 4836, 29892, 8242, 13, 9651, 1723, 13, 9651, 1583, 3032, 5498, 2265, 29918, 305, 12629, 29961, 12719, 29962, 353, 14297, 29918, 12719, 13, 13, 4706, 5434, 353, 1583, 3032, 5498, 2265, 29889, 23679, 29898, 5498, 2265, 29918, 12719, 29892, 2643, 29889, 12508, 3101, 13, 13, 4706, 1018, 29901, 13, 9651, 5434, 29889, 2914, 29898, 15619, 29922, 1311, 3032, 23679, 29918, 15619, 29897, 13, 4706, 5174, 16367, 10851, 2392, 29901, 13, 9651, 565, 3240, 2722, 29918, 11808, 6736, 1583, 3032, 23679, 29918, 2267, 2722, 29901, 13, 18884, 12020, 402, 20442, 21076, 4035, 21076, 1674, 10851, 2392, 29898, 13, 462, 1678, 285, 29915, 23679, 11815, 29936, 8242, 3790, 12719, 3400, 525, 13, 462, 1678, 285, 29915, 4906, 3790, 4906, 7503, 29896, 29900, 29900, 12258, 856, 29915, 13, 18884, 1723, 13, 9651, 1683, 29901, 13, 18884, 7272, 1583, 29889, 23679, 29898, 12719, 29892, 2643, 29892, 3240, 2722, 29918, 11808, 718, 29871, 29896, 29897, 13, 13, 1678, 7465, 822, 2446, 29918, 5467, 3726, 29898, 1311, 29897, 1599, 6864, 29901, 13, 4706, 313, 13, 9651, 4520, 29918, 4906, 29892, 13, 9651, 8242, 29918, 333, 29892, 13, 9651, 2529, 1491, 29918, 12719, 29892, 13, 4706, 1723, 353, 7272, 1583, 3032, 26746, 29918, 4906, 29918, 3166, 29918, 25978, 261, 580, 13, 4706, 1741, 353, 6864, 29898, 12719, 29918, 333, 29892, 4520, 29918, 4906, 29889, 4906, 29889, 1272, 29889, 13808, 3101, 13, 13, 4706, 565, 1583, 3032, 25978, 261, 29918, 547, 29918, 19158, 29901, 13, 9651, 7272, 1583, 29889, 10685, 29918, 547, 29898, 13556, 2347, 29918, 4906, 29892, 2529, 1491, 29918, 12719, 29897, 13, 4706, 1683, 29901, 13, 9651, 1741, 29889, 4703, 1839, 547, 29918, 9891, 2033, 353, 2090, 312, 8789, 29889, 3846, 29898, 13, 18884, 1583, 29889, 10685, 29918, 547, 29892, 4520, 29918, 4906, 29892, 2529, 1491, 29918, 12719, 29892, 13, 9651, 1723, 13, 13, 4706, 736, 1741, 13, 13, 1678, 7465, 822, 903, 26746, 29918, 4906, 29918, 3166, 29918, 25978, 261, 29898, 13, 4706, 1583, 29892, 13, 1678, 1723, 1599, 12603, 552, 29961, 29816, 3728, 29892, 851, 29892, 851, 5387, 13, 4706, 8242, 29918, 2248, 353, 313, 13, 9651, 22183, 1372, 29889, 16957, 29898, 3881, 29898, 2435, 29898, 1311, 3032, 25978, 261, 29918, 305, 12629, 4961, 13, 9651, 565, 1583, 3032, 25978, 261, 29918, 305, 12629, 13, 9651, 1683, 29871, 29900, 13, 4706, 1723, 13, 13, 4706, 1550, 451, 1583, 3032, 2218, 18045, 29901, 13, 9651, 18196, 353, 1051, 29898, 1311, 3032, 25978, 261, 29918, 305, 12629, 29889, 7076, 3101, 13, 13, 9651, 565, 451, 7431, 29898, 305, 12629, 1125, 13, 18884, 7272, 408, 948, 3934, 29889, 17059, 29898, 1311, 3032, 25978, 261, 29918, 10685, 29918, 2230, 29897, 13, 18884, 6773, 13, 13, 9651, 565, 8242, 29918, 2248, 6736, 7431, 29898, 305, 12629, 1125, 13, 18884, 8242, 29918, 2248, 353, 29871, 29900, 13, 13, 9651, 8242, 29918, 333, 29892, 2529, 1491, 29918, 12719, 353, 18196, 29961, 12719, 29918, 2248, 29962, 13, 9651, 8206, 29918, 4906, 29918, 29888, 9130, 29901, 20688, 20154, 28016, 13, 9651, 8206, 29918, 4906, 29918, 29888, 9130, 353, 408, 948, 3934, 29889, 657, 29918, 21094, 29918, 7888, 2141, 3389, 29918, 262, 29918, 4258, 3406, 29898, 29871, 396, 1134, 29901, 11455, 13, 18884, 1583, 3032, 4258, 3406, 29892, 13, 18884, 2090, 312, 8789, 29889, 3846, 29898, 13, 462, 1678, 1583, 3032, 25978, 261, 29889, 26746, 29892, 13, 462, 1678, 2529, 1491, 29918, 12719, 29892, 13, 462, 1678, 4236, 29918, 19158, 29922, 29896, 29892, 13, 462, 1678, 736, 29918, 326, 4210, 2486, 29922, 5574, 29892, 13, 18884, 10353, 13, 9651, 1723, 13, 13, 9651, 1018, 29901, 13, 18884, 2933, 353, 7272, 408, 948, 3934, 29889, 10685, 29918, 1454, 29898, 13, 462, 1678, 8206, 29918, 4906, 29918, 29888, 9130, 29892, 1583, 3032, 25978, 261, 29918, 26746, 29918, 4906, 29918, 15619, 13, 18884, 1723, 13, 13, 9651, 5174, 408, 948, 3934, 29889, 10851, 2392, 29901, 13, 18884, 8242, 29918, 2248, 4619, 29871, 29896, 13, 18884, 7272, 408, 948, 3934, 29889, 17059, 29898, 1311, 3032, 25978, 261, 29918, 10685, 29918, 2230, 29897, 13, 18884, 6773, 13, 13, 9651, 1683, 29901, 13, 18884, 565, 451, 2933, 29889, 13556, 2347, 29918, 19158, 29901, 13, 462, 1678, 8242, 29918, 2248, 4619, 29871, 29896, 13, 462, 1678, 7272, 408, 948, 3934, 29889, 17059, 29898, 1311, 3032, 25978, 261, 29918, 10685, 29918, 2230, 29897, 13, 462, 1678, 6773, 13, 13, 18884, 7272, 408, 948, 3934, 29889, 17059, 29898, 1311, 3032, 26746, 29918, 4906, 29918, 10685, 29918, 2230, 29897, 13, 18884, 736, 313, 13, 462, 1678, 2933, 29889, 13556, 2347, 29918, 19158, 29961, 29900, 1402, 13, 462, 1678, 8242, 29918, 333, 29892, 13, 462, 1678, 2529, 1491, 29918, 12719, 29892, 13, 18884, 1723, 13, 13, 4706, 12020, 402, 20442, 21076, 4035, 13696, 4680, 4205, 6915, 2392, 580, 13, 13, 1678, 7465, 822, 4480, 29918, 547, 29898, 13, 4706, 1583, 29892, 13, 4706, 2643, 29901, 24328, 2347, 3728, 29892, 13, 4706, 2529, 1491, 29918, 12719, 29901, 851, 29892, 13, 4706, 3240, 2722, 29918, 11808, 29901, 938, 353, 29871, 29896, 29892, 13, 1678, 1723, 1599, 6213, 29901, 13, 4706, 5434, 353, 408, 948, 3934, 29889, 657, 29918, 21094, 29918, 7888, 2141, 3389, 29918, 262, 29918, 4258, 3406, 29898, 13, 9651, 1583, 3032, 4258, 3406, 29892, 13, 9651, 2090, 312, 8789, 29889, 3846, 29898, 13, 18884, 1583, 3032, 25978, 261, 29889, 547, 3707, 5485, 29892, 2529, 1491, 29918, 12719, 29892, 518, 4906, 29889, 547, 29918, 333, 1402, 13, 9651, 10353, 13, 4706, 1723, 13, 13, 4706, 1018, 29901, 13, 9651, 7272, 408, 948, 3934, 29889, 10685, 29918, 1454, 29898, 29888, 9130, 29892, 11815, 29922, 1311, 3032, 25978, 261, 29918, 547, 29918, 15619, 29897, 13, 4706, 5174, 408, 948, 3934, 29889, 10851, 2392, 29901, 13, 9651, 565, 3240, 2722, 29918, 11808, 6736, 1583, 3032, 25978, 261, 29918, 547, 29918, 2267, 2722, 29901, 13, 18884, 1583, 3032, 21707, 29889, 27392, 29898, 13, 462, 1678, 285, 29915, 547, 11815, 426, 1311, 3032, 25978, 261, 29918, 547, 29918, 15619, 3400, 525, 13, 462, 1678, 285, 29915, 4906, 3790, 4906, 29889, 4906, 29889, 1272, 29889, 13808, 580, 7503, 29896, 29900, 29900, 12258, 856, 29915, 13, 18884, 1723, 13, 9651, 1683, 29901, 13, 18884, 7272, 1583, 29889, 10685, 29918, 547, 29898, 13, 462, 1678, 2643, 29892, 2529, 1491, 29918, 12719, 29892, 3240, 2722, 29918, 11808, 718, 29871, 29896, 13, 18884, 1723, 13, 4706, 5174, 408, 948, 3934, 29889, 19420, 839, 2392, 29901, 13, 9651, 1583, 3032, 21707, 29889, 27392, 29898, 13, 18884, 525, 547, 12611, 839, 29936, 525, 13, 18884, 285, 29915, 4906, 3790, 4906, 29889, 4906, 29889, 1272, 29889, 13808, 580, 7503, 29896, 29900, 29900, 12258, 856, 29915, 13, 9651, 1723, 13, 13, 1678, 822, 903, 842, 29918, 25978, 261, 29918, 2917, 29898, 1311, 29892, 7868, 886, 29901, 360, 919, 29961, 710, 29892, 851, 2314, 1599, 6213, 29901, 13, 4706, 21691, 29918, 10685, 29918, 2230, 353, 29871, 29896, 29889, 29900, 13, 4706, 21691, 29918, 547, 29918, 19158, 353, 7700, 13, 4706, 21691, 29918, 547, 29918, 15619, 353, 29871, 29896, 29889, 29900, 13, 4706, 21691, 29918, 547, 29918, 2267, 2722, 353, 29871, 29941, 13, 4706, 21691, 29918, 26746, 29918, 4906, 29918, 15619, 353, 29871, 29896, 29889, 29900, 13, 4706, 21691, 29918, 3317, 29918, 1287, 414, 353, 29871, 29896, 29900, 13, 4706, 9805, 29918, 15619, 353, 29871, 29945, 29889, 29900, 13, 4706, 9805, 29918, 2267, 2722, 353, 29871, 29941, 13, 4706, 8206, 29918, 4906, 29918, 10685, 29918, 2230, 353, 29871, 29900, 29889, 29896, 13, 13, 4706, 363, 2295, 29918, 978, 29892, 2295, 29918, 1767, 297, 7868, 886, 29889, 7076, 7295, 13, 9651, 565, 2295, 29918, 978, 1275, 525, 25978, 261, 29918, 10685, 29918, 2230, 2396, 13, 18884, 21691, 29918, 10685, 29918, 2230, 353, 5785, 29898, 2917, 29918, 1767, 29897, 13, 13, 9651, 25342, 2295, 29918, 978, 1275, 525, 25978, 261, 29918, 547, 29918, 19158, 2396, 13, 18884, 21691, 29918, 547, 29918, 19158, 353, 2295, 29918, 1767, 297, 313, 13, 462, 1678, 525, 29896, 742, 13, 462, 1678, 525, 3009, 742, 13, 462, 1678, 525, 29873, 742, 13, 462, 1678, 525, 5574, 742, 13, 462, 1678, 525, 29891, 742, 13, 462, 1678, 525, 3582, 742, 13, 18884, 1723, 13, 13, 9651, 25342, 2295, 29918, 978, 1275, 525, 25978, 261, 29918, 547, 29918, 15619, 2396, 13, 18884, 21691, 29918, 547, 29918, 15619, 353, 5785, 29898, 2917, 29918, 1767, 29897, 13, 13, 9651, 25342, 2295, 29918, 978, 1275, 525, 25978, 261, 29918, 547, 29918, 2267, 2722, 2396, 13, 18884, 21691, 29918, 547, 29918, 2267, 2722, 353, 938, 29898, 2917, 29918, 1767, 29897, 13, 13, 9651, 25342, 2295, 29918, 978, 1275, 525, 25978, 261, 29918, 3317, 29918, 1287, 414, 2396, 13, 18884, 21691, 29918, 3317, 29918, 1287, 414, 353, 938, 29898, 2917, 29918, 1767, 29897, 13, 13, 9651, 25342, 2295, 29918, 978, 1275, 525, 25978, 261, 29918, 26746, 29918, 4906, 29918, 15619, 2396, 13, 18884, 21691, 29918, 26746, 29918, 4906, 29918, 15619, 353, 5785, 29898, 2917, 29918, 1767, 29897, 13, 13, 9651, 25342, 2295, 29918, 978, 1275, 525, 23679, 29918, 15619, 2396, 13, 18884, 9805, 29918, 15619, 353, 5785, 29898, 2917, 29918, 1767, 29897, 13, 13, 9651, 25342, 2295, 29918, 978, 1275, 525, 23679, 29918, 2267, 2722, 2396, 13, 18884, 9805, 29918, 2267, 2722, 353, 938, 29898, 2917, 29918, 1767, 29897, 13, 13, 9651, 25342, 2295, 29918, 978, 1275, 525, 26746, 29918, 4906, 29918, 10685, 29918, 2230, 2396, 13, 18884, 8206, 29918, 4906, 29918, 10685, 29918, 2230, 353, 5785, 29898, 2917, 29918, 1767, 29897, 13, 13, 4706, 1583, 3032, 25978, 261, 29918, 10685, 29918, 2230, 353, 21691, 29918, 10685, 29918, 2230, 13, 4706, 1583, 3032, 25978, 261, 29918, 547, 29918, 19158, 353, 21691, 29918, 547, 29918, 19158, 13, 4706, 1583, 3032, 25978, 261, 29918, 547, 29918, 15619, 353, 21691, 29918, 547, 29918, 15619, 13, 4706, 1583, 3032, 25978, 261, 29918, 547, 29918, 2267, 2722, 353, 21691, 29918, 547, 29918, 2267, 2722, 13, 4706, 1583, 3032, 25978, 261, 29918, 26746, 29918, 4906, 29918, 15619, 353, 21691, 29918, 26746, 29918, 4906, 29918, 15619, 13, 4706, 1583, 3032, 25978, 261, 29918, 3317, 29918, 1287, 414, 353, 21691, 29918, 3317, 29918, 1287, 414, 13, 4706, 1583, 3032, 23679, 29918, 15619, 353, 9805, 29918, 15619, 13, 4706, 1583, 3032, 23679, 29918, 2267, 2722, 353, 9805, 29918, 2267, 2722, 13, 4706, 1583, 3032, 26746, 29918, 4906, 29918, 10685, 29918, 2230, 353, 8206, 29918, 4906, 29918, 10685, 29918, 2230, 13, 2 ]
Yellow_Pages_Lithuania/unit_tests.py
Jay4C/Web-Scraping
1
70
<gh_stars>1-10 import time from bs4 import BeautifulSoup import requests import pymysql.cursors import unittest class UnitTestsDataMinerYellowPagesLithuania(unittest.TestCase): def test_extract_one_email(self): url = "https://www.visalietuva.lt/en/company/astorija-hotel-uab" # Request the content of a page from the url html = requests.get(url) # Parse the content of html_doc soup = BeautifulSoup(html.content, 'html.parser') if soup.find('a', {'itemprop': 'email'}) is not None: email = "info@" + soup.find('a', {'itemprop': 'email'}).text.split("@")[1] print('email : ' + email) else: print('no email business') def test_extract_emails_from_all_page_of_results_for_one_activity_and_capital(self): activity = "hotel" city = "vilniuje" url_search = "https://www.visalietuva.lt/en/search/" + activity + "/" + city html_search = requests.get(url_search) soup_search = BeautifulSoup(html_search.content, 'html.parser') number_of_pages = 0 if soup_search.find('div', {'class': 'search_count f_left'}) is not None: number_of_pages_with_coma = int(soup_search .find('div', {'class': 'search_count f_left'}) .find('span').text )/20 if int(str(number_of_pages_with_coma).split(".")[1][:1]) < 5: number_of_pages += round(number_of_pages_with_coma) + 1 print('number_of_pages : ' + str(number_of_pages)) elif int(str(number_of_pages_with_coma).split(".")[1][:1]) >= 5: number_of_pages += round(number_of_pages_with_coma) print('number_of_pages : ' + str(number_of_pages)) i_1 = 0 if soup_search.find('div', {'class': 'company_list'}) is not None: print(url_search) for result_item in soup_search \ .find('div', {'class': 'company_list'}) \ .find_all('div', {'class': 'item'}): i_1 += 1 url_result = result_item.find('a', {'class': 'company-item-title'}).get('href') time.sleep(2) # Request the content of a page from the url html_result = requests.get(url_result) # Parse the content of html_doc soup_result = BeautifulSoup(html_result.content, 'html.parser') if soup_result.find('a', {'itemprop': 'email'}) is not None: email = "info@" + soup_result.find('a', {'itemprop': 'email'}).text.split("@")[1] print(str(i_1) + ' email : ' + email) else: print(str(i_1) + ' no email business') else: print('sorry there is nothing') if number_of_pages > 1: for i in range(2, number_of_pages+1): url_of_one_page_of_results = url_search + "/" + str(i) print(url_of_one_page_of_results) time.sleep(2) html_of_one_page_of_results = requests.get(url_of_one_page_of_results) soup_of_one_page_of_results = BeautifulSoup(html_of_one_page_of_results.content, 'html.parser') if soup_of_one_page_of_results.find('div', {'class': 'company_list'}) is not None: for result_item in soup_of_one_page_of_results\ .find('div', {'class': 'company_list'})\ .find_all('div', {'class': 'item'}): i_1 += 1 url_result = result_item.find('a', {'class': 'company-item-title'}).get('href') # Request the content of a page from the url html_result = requests.get(url_result) # Parse the content of html_doc soup_result = BeautifulSoup(html_result.content, 'html.parser') if soup_result.find('a', {'itemprop': 'email'}) is not None: email = "info@" + soup_result.find('a', {'itemprop': 'email'}).text.split("@")[1] print(str(i_1) + ' email : ' + email) else: print(str(i_1) + ' no email business') else: print('sorry there is nothing') def test_extract_emails_from_all_page_of_results_for_all_activities_and_capitals(self): activites = [ # {'id': '1', 'url': 'labour'} #{'id': '2', 'url': 'real+estate'}, #{'id': '3', 'url': 'recruitment'}, #{'id': '4', 'url': 'software'}, #{'id': '5', 'url': 'hotel'}, #{'id': '6', 'url': 'landlord'}, #{'id': '7', 'url': 'cleaning'}, #{'id': '8', 'url': 'association'}, #{'id': '9', 'url': 'financial'}, #{'id': '10', 'url': 'restaurant'}, #{'id': '11', 'url': 'building'}, #{'id': '12', 'url': 'hairdresser'}, #{'id': '13', 'url': 'florist'}, #{'id': '14', 'url': 'locksmith'}, #{'id': '15', 'url': 'bakery'}, #{'id': '16', 'url': 'insurance'}, #{'id': '17', 'url': 'pharmacy'}, #{'id': '18', 'url': 'moving'}, #{'id': '19', 'url': 'electricity'}, #{'id': '20', 'url': 'plumbing'}, #{'id': '21', 'url': 'security'}, #{'id': '22', 'url': 'lawyer'}, #{'id': '23', 'url': 'bank'}, #{'id': '24', 'url': 'garage'}, #{'id': '25', 'url': 'dentist'}, #{'id': '26', 'url': 'doctor'}, #{'id': '27', 'url': 'accounting'}, #{'id': '28', 'url': 'store'}, #{'id': '29', 'url': 'notary'}, #{'id': '30', 'url': 'jeweller'}, #{'id': '31', 'url': 'tailor'}, #{'id': '32', 'url': 'meat'}, #{'id': '33', 'url': 'library'}, #{'id': '34', 'url': 'architect'} ] capitales_du_monde = [ {'id': '183', 'nom': 'akmeneje'},#Akmenė {'id': '184', 'nom': 'alytuje'},#Alytus {'id': '185', 'nom': 'anyksciuose'},#Anykščiai {'id': '186', 'nom': 'birstone'},#Birštonas {'id': '187', 'nom': 'birzuose'},#Biržai {'id': '188', 'nom': 'druskininkuose'},#Druskininkai {'id': '189', 'nom': 'elektrenuose'},#Elektrėnai {'id': '190', 'nom': 'ignalinoje'},#Ignalina {'id': '191', 'nom': 'jonavoje'},#Jonava {'id': '192', 'nom': 'joniskyje'},#Joniškis {'id': '193', 'nom': 'jurbarke'},#Jurbarkas {'id': '194', 'nom': 'kaisiadoryse'},#Kaišiadorys {'id': '195', 'nom': 'kalvarijoje'},#Kalvarija {'id': '196', 'nom': 'kaune'},#Kaunas {'id': '197', 'nom': 'kazlu-rudoje'},#Kazlų Rūda {'id': '198', 'nom': 'kedainiuose'},#Kėdainiai {'id': '199', 'nom': 'kelmeje'},#Kelmė {'id': '200', 'nom': 'klaipedoje'},#Klaipėda {'id': '201', 'nom': 'kretingoje'},#Kretinga {'id': '202', 'nom': 'kupiskyje'},#Kupiškis {'id': '203', 'nom': 'lazdijuose'},#Lazdijai {'id': '204', 'nom': 'marijampoleje'},#Marijampolė {'id': '205', 'nom': 'mazeikiuose'},#Mažeikiai {'id': '206', 'nom': 'moletuose'},#Molėtai {'id': '207', 'nom': 'neringoje'},#Neringa {'id': '208', 'nom': 'pagegiuose'},#Pagėgiai {'id': '209', 'nom': 'pakruojyje'},#Pakruojis {'id': '210', 'nom': 'palangoje'},#Palanga {'id': '211', 'nom': 'panevezyje'},#Panevėžys {'id': '212', 'nom': 'pasvalyje'},#Pasvalys {'id': '213', 'nom': 'plungeje'},#Plungė {'id': '214', 'nom': 'prienuose'},#Prienai {'id': '215', 'nom': 'radviliskyje'},#Radviliškis {'id': '216', 'nom': 'raseiniuose'},#Raseiniai {'id': '217', 'nom': 'rietave'},#Rietavas {'id': '218', 'nom': 'rokiskyje'},#Rokiškis {'id': '219', 'nom': 'sakiuose'},#Šakiai {'id': '220', 'nom': 'salcininkuose'},#Šalčininkai {'id': '221', 'nom': 'siauliuose'},#Šiauliai {'id': '222', 'nom': 'silaleje'},#Šilalė {'id': '223', 'nom': 'siluteje'},#Šilutė {'id': '224', 'nom': 'sirvintose'},#Širvintos {'id': '225', 'nom': 'skuode'},#Skuodas {'id': '226', 'nom': 'svencionyse'},#Švenčionys {'id': '227', 'nom': 'taurageje'},#Tauragė {'id': '228', 'nom': 'telsiuose'},#Telšiai {'id': '229', 'nom': 'trakuose'},#Trakai {'id': '230', 'nom': 'ukmergeje'},#Ukmergė {'id': '231', 'nom': 'utenoje'},#Utena {'id': '232', 'nom': 'varenoje'},#Varėna {'id': '233', 'nom': 'vilkaviskyje'},#Vilkaviškis {'id': '234', 'nom': 'vilniuje'},#Vilnius {'id': '235', 'nom': 'visagine'},#Visaginas {'id': '236', 'nom': 'zarasuose'}#Zarasai ] try: for capitale in capitales_du_monde: for activite in activites: try: activity = activite.get("url") city = capitale.get("nom") url_search = "https://www.visalietuva.lt/en/search/" + activity + "/" + city html_search = requests.get(url_search) soup_search = BeautifulSoup(html_search.content, 'html.parser') number_of_pages = 0 if soup_search.find('div', {'class': 'search_count f_left'}) is not None: number_of_pages_with_coma = int(soup_search .find('div', {'class': 'search_count f_left'}) .find('span').text ) / 20 if int(str(number_of_pages_with_coma).split(".")[1][:1]) < 5: number_of_pages += round(number_of_pages_with_coma) + 1 print('number_of_pages : ' + str(number_of_pages)) elif int(str(number_of_pages_with_coma).split(".")[1][:1]) >= 5: number_of_pages += round(number_of_pages_with_coma) print('number_of_pages : ' + str(number_of_pages)) i_1 = 0 if soup_search.find('div', {'class': 'company_list'}) is not None: print(url_search) for result_item in soup_search \ .find('div', {'class': 'company_list'}) \ .find_all('div', {'class': 'item'}): i_1 += 1 url_result = result_item.find('a', {'class': 'company-item-title'}).get('href') time.sleep(2) # Request the content of a page from the url html_result = requests.get(url_result) # Parse the content of html_doc soup_result = BeautifulSoup(html_result.content, 'html.parser') if soup_result.find('a', {'itemprop': 'email'}) is not None: email = "info@" + soup_result.find('a', {'itemprop': 'email'}).text.split("@")[1] try: connection = pymysql.connect( host='localhost', port=3306, user='', password='', db='contacts_professionnels', charset='utf8mb4', cursorclass=pymysql.cursors.DictCursor ) with connection.cursor() as cursor: try: sql = "INSERT INTO `emails` (" \ "`id_activite`, " \ "`id_capitale_du_monde`, " \ "`email`) VALUE (%s, %s, %s)" cursor.execute(sql, ( activite.get('id'), capitale.get('id'), email)) connection.commit() print(str(i_1) + " The record is stored : " + email) connection.close() except: print(str(i_1) + " The record already exists : " + email) connection.close() except Exception as e: print(str(i_1) + " An error with the email : " + email + " " + str(e)) else: print(str(i_1) + ' no email business') else: print('sorry there is nothing') if number_of_pages > 1: for i in range(2, number_of_pages + 1): url_of_one_page_of_results = url_search + "/" + str(i) print(url_of_one_page_of_results) time.sleep(2) html_of_one_page_of_results = requests.get(url_of_one_page_of_results) soup_of_one_page_of_results = BeautifulSoup(html_of_one_page_of_results.content, 'html.parser') if soup_of_one_page_of_results.find('div', {'class': 'company_list'}) is not None: for result_item in soup_of_one_page_of_results \ .find('div', {'class': 'company_list'}) \ .find_all('div', {'class': 'item'}): i_1 += 1 url_result = result_item.find('a', {'class': 'company-item-title'}).get('href') # Request the content of a page from the url html_result = requests.get(url_result) # Parse the content of html_doc soup_result = BeautifulSoup(html_result.content, 'html.parser') if soup_result.find('a', {'itemprop': 'email'}) is not None: email = "info@" + \ soup_result.find('a', {'itemprop': 'email'}).text.split("@")[1] try: connection = pymysql.connect( host='localhost', port=3306, user='', password='', db='contacts_professionnels', charset='utf8mb4', cursorclass=pymysql.cursors.DictCursor ) with connection.cursor() as cursor: try: sql = "INSERT INTO `emails` (" \ "`id_activite`, " \ "`id_capitale_du_monde`, " \ "`email`) VALUE (%s, %s, %s)" cursor.execute(sql, ( activite.get('id'), capitale.get('id'), email)) connection.commit() print(str(i_1) + " The record is stored : " + email) connection.close() except: print(str(i_1) + " The record already exists : " + email) connection.close() except Exception as e: print(str(i_1) + " An error with the email : " + email + " " + str(e)) else: print(str(i_1) + ' no email business') else: print('sorry there is nothing') except Exception as e: print("There is an error connection at url : " + str(e)) finally: print('done') if __name__ == '__main__': unittest.main()
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 5215, 931, 13, 3166, 24512, 29946, 1053, 25685, 29903, 1132, 13, 5215, 7274, 13, 5215, 282, 962, 952, 1519, 29889, 29883, 1295, 943, 13, 5215, 443, 27958, 13, 13, 13, 1990, 13223, 24376, 1469, 29924, 4983, 29979, 4743, 27514, 29931, 389, 29884, 4807, 29898, 348, 27958, 29889, 3057, 8259, 1125, 13, 1678, 822, 1243, 29918, 21111, 29918, 650, 29918, 5269, 29898, 1311, 1125, 13, 4706, 3142, 353, 376, 991, 597, 1636, 29889, 1730, 284, 2035, 29884, 1564, 29889, 1896, 29914, 264, 29914, 14518, 29914, 579, 272, 8044, 29899, 8711, 295, 29899, 29884, 370, 29908, 13, 13, 4706, 396, 10729, 278, 2793, 310, 263, 1813, 515, 278, 3142, 13, 4706, 3472, 353, 7274, 29889, 657, 29898, 2271, 29897, 13, 13, 4706, 396, 20969, 278, 2793, 310, 3472, 29918, 1514, 13, 4706, 22300, 353, 25685, 29903, 1132, 29898, 1420, 29889, 3051, 29892, 525, 1420, 29889, 16680, 1495, 13, 13, 4706, 565, 22300, 29889, 2886, 877, 29874, 742, 11117, 667, 7728, 2396, 525, 5269, 29915, 1800, 338, 451, 6213, 29901, 13, 9651, 4876, 353, 376, 3888, 5507, 718, 22300, 29889, 2886, 877, 29874, 742, 11117, 667, 7728, 2396, 525, 5269, 29915, 7690, 726, 29889, 5451, 29475, 1159, 29961, 29896, 29962, 13, 9651, 1596, 877, 5269, 584, 525, 718, 4876, 29897, 13, 4706, 1683, 29901, 13, 9651, 1596, 877, 1217, 4876, 5381, 1495, 13, 13, 1678, 822, 1243, 29918, 21111, 29918, 331, 2234, 29918, 3166, 29918, 497, 29918, 3488, 29918, 974, 29918, 9902, 29918, 1454, 29918, 650, 29918, 10072, 29918, 392, 29918, 5030, 2410, 29898, 1311, 1125, 13, 4706, 6354, 353, 376, 8711, 295, 29908, 13, 4706, 4272, 353, 376, 17191, 1240, 7994, 29908, 13, 4706, 3142, 29918, 4478, 353, 376, 991, 597, 1636, 29889, 1730, 284, 2035, 29884, 1564, 29889, 1896, 29914, 264, 29914, 4478, 12975, 718, 6354, 718, 5591, 29908, 718, 4272, 13, 4706, 3472, 29918, 4478, 353, 7274, 29889, 657, 29898, 2271, 29918, 4478, 29897, 13, 4706, 22300, 29918, 4478, 353, 25685, 29903, 1132, 29898, 1420, 29918, 4478, 29889, 3051, 29892, 525, 1420, 29889, 16680, 1495, 13, 4706, 1353, 29918, 974, 29918, 12292, 353, 29871, 29900, 13, 13, 4706, 565, 22300, 29918, 4478, 29889, 2886, 877, 4563, 742, 11117, 1990, 2396, 525, 4478, 29918, 2798, 285, 29918, 1563, 29915, 1800, 338, 451, 6213, 29901, 13, 9651, 1353, 29918, 974, 29918, 12292, 29918, 2541, 29918, 510, 29874, 353, 938, 29898, 29879, 1132, 29918, 4478, 13, 462, 462, 9651, 869, 2886, 877, 4563, 742, 11117, 1990, 2396, 525, 4478, 29918, 2798, 285, 29918, 1563, 29915, 1800, 13, 462, 462, 9651, 869, 2886, 877, 9653, 2824, 726, 13, 462, 462, 9651, 1723, 29914, 29906, 29900, 13, 13, 9651, 565, 938, 29898, 710, 29898, 4537, 29918, 974, 29918, 12292, 29918, 2541, 29918, 510, 29874, 467, 5451, 17350, 1159, 29961, 29896, 3816, 29901, 29896, 2314, 529, 29871, 29945, 29901, 13, 18884, 1353, 29918, 974, 29918, 12292, 4619, 4513, 29898, 4537, 29918, 974, 29918, 12292, 29918, 2541, 29918, 510, 29874, 29897, 718, 29871, 29896, 13, 18884, 1596, 877, 4537, 29918, 974, 29918, 12292, 584, 525, 718, 851, 29898, 4537, 29918, 974, 29918, 12292, 876, 13, 13, 9651, 25342, 938, 29898, 710, 29898, 4537, 29918, 974, 29918, 12292, 29918, 2541, 29918, 510, 29874, 467, 5451, 17350, 1159, 29961, 29896, 3816, 29901, 29896, 2314, 6736, 29871, 29945, 29901, 13, 18884, 1353, 29918, 974, 29918, 12292, 4619, 4513, 29898, 4537, 29918, 974, 29918, 12292, 29918, 2541, 29918, 510, 29874, 29897, 13, 18884, 1596, 877, 4537, 29918, 974, 29918, 12292, 584, 525, 718, 851, 29898, 4537, 29918, 974, 29918, 12292, 876, 13, 13, 4706, 474, 29918, 29896, 353, 29871, 29900, 13, 13, 4706, 565, 22300, 29918, 4478, 29889, 2886, 877, 4563, 742, 11117, 1990, 2396, 525, 14518, 29918, 1761, 29915, 1800, 338, 451, 6213, 29901, 13, 9651, 1596, 29898, 2271, 29918, 4478, 29897, 13, 9651, 363, 1121, 29918, 667, 297, 22300, 29918, 4478, 320, 13, 462, 1678, 869, 2886, 877, 4563, 742, 11117, 1990, 2396, 525, 14518, 29918, 1761, 29915, 1800, 320, 13, 462, 1678, 869, 2886, 29918, 497, 877, 4563, 742, 11117, 1990, 2396, 525, 667, 10827, 1125, 13, 18884, 474, 29918, 29896, 4619, 29871, 29896, 13, 13, 18884, 3142, 29918, 2914, 353, 1121, 29918, 667, 29889, 2886, 877, 29874, 742, 11117, 1990, 2396, 525, 14518, 29899, 667, 29899, 3257, 29915, 7690, 657, 877, 12653, 1495, 13, 13, 18884, 931, 29889, 17059, 29898, 29906, 29897, 13, 13, 18884, 396, 10729, 278, 2793, 310, 263, 1813, 515, 278, 3142, 13, 18884, 3472, 29918, 2914, 353, 7274, 29889, 657, 29898, 2271, 29918, 2914, 29897, 13, 13, 18884, 396, 20969, 278, 2793, 310, 3472, 29918, 1514, 13, 18884, 22300, 29918, 2914, 353, 25685, 29903, 1132, 29898, 1420, 29918, 2914, 29889, 3051, 29892, 525, 1420, 29889, 16680, 1495, 13, 13, 18884, 565, 22300, 29918, 2914, 29889, 2886, 877, 29874, 742, 11117, 667, 7728, 2396, 525, 5269, 29915, 1800, 338, 451, 6213, 29901, 13, 462, 1678, 4876, 353, 376, 3888, 5507, 718, 22300, 29918, 2914, 29889, 2886, 877, 29874, 742, 11117, 667, 7728, 2396, 525, 5269, 29915, 7690, 726, 29889, 5451, 29475, 1159, 29961, 29896, 29962, 13, 462, 1678, 1596, 29898, 710, 29898, 29875, 29918, 29896, 29897, 718, 525, 4876, 584, 525, 718, 4876, 29897, 13, 18884, 1683, 29901, 13, 462, 1678, 1596, 29898, 710, 29898, 29875, 29918, 29896, 29897, 718, 525, 694, 4876, 5381, 1495, 13, 4706, 1683, 29901, 13, 9651, 1596, 877, 29879, 3818, 727, 338, 3078, 1495, 13, 13, 4706, 565, 1353, 29918, 974, 29918, 12292, 1405, 29871, 29896, 29901, 13, 9651, 363, 474, 297, 3464, 29898, 29906, 29892, 1353, 29918, 974, 29918, 12292, 29974, 29896, 1125, 13, 18884, 3142, 29918, 974, 29918, 650, 29918, 3488, 29918, 974, 29918, 9902, 353, 3142, 29918, 4478, 718, 5591, 29908, 718, 851, 29898, 29875, 29897, 13, 18884, 1596, 29898, 2271, 29918, 974, 29918, 650, 29918, 3488, 29918, 974, 29918, 9902, 29897, 13, 18884, 931, 29889, 17059, 29898, 29906, 29897, 13, 18884, 3472, 29918, 974, 29918, 650, 29918, 3488, 29918, 974, 29918, 9902, 353, 7274, 29889, 657, 29898, 2271, 29918, 974, 29918, 650, 29918, 3488, 29918, 974, 29918, 9902, 29897, 13, 18884, 22300, 29918, 974, 29918, 650, 29918, 3488, 29918, 974, 29918, 9902, 353, 25685, 29903, 1132, 29898, 1420, 29918, 974, 29918, 650, 29918, 3488, 29918, 974, 29918, 9902, 29889, 3051, 29892, 525, 1420, 29889, 16680, 1495, 13, 13, 18884, 565, 22300, 29918, 974, 29918, 650, 29918, 3488, 29918, 974, 29918, 9902, 29889, 2886, 877, 4563, 742, 11117, 1990, 2396, 525, 14518, 29918, 1761, 29915, 1800, 338, 451, 6213, 29901, 13, 462, 1678, 363, 1121, 29918, 667, 297, 22300, 29918, 974, 29918, 650, 29918, 3488, 29918, 974, 29918, 9902, 29905, 13, 462, 9651, 869, 2886, 877, 4563, 742, 11117, 1990, 2396, 525, 14518, 29918, 1761, 29915, 11606, 13, 462, 9651, 869, 2886, 29918, 497, 877, 4563, 742, 11117, 1990, 2396, 525, 667, 10827, 1125, 13, 462, 4706, 474, 29918, 29896, 4619, 29871, 29896, 13, 13, 462, 4706, 3142, 29918, 2914, 353, 1121, 29918, 667, 29889, 2886, 877, 29874, 742, 11117, 1990, 2396, 525, 14518, 29899, 667, 29899, 3257, 29915, 7690, 657, 877, 12653, 1495, 13, 13, 462, 4706, 396, 10729, 278, 2793, 310, 263, 1813, 515, 278, 3142, 13, 462, 4706, 3472, 29918, 2914, 353, 7274, 29889, 657, 29898, 2271, 29918, 2914, 29897, 13, 13, 462, 4706, 396, 20969, 278, 2793, 310, 3472, 29918, 1514, 13, 462, 4706, 22300, 29918, 2914, 353, 25685, 29903, 1132, 29898, 1420, 29918, 2914, 29889, 3051, 29892, 525, 1420, 29889, 16680, 1495, 13, 13, 462, 4706, 565, 22300, 29918, 2914, 29889, 2886, 877, 29874, 742, 11117, 667, 7728, 2396, 525, 5269, 29915, 1800, 338, 451, 6213, 29901, 13, 462, 9651, 4876, 353, 376, 3888, 5507, 718, 22300, 29918, 2914, 29889, 2886, 877, 29874, 742, 11117, 667, 7728, 2396, 525, 5269, 29915, 7690, 726, 29889, 5451, 29475, 1159, 29961, 29896, 29962, 13, 462, 9651, 1596, 29898, 710, 29898, 29875, 29918, 29896, 29897, 718, 525, 4876, 584, 525, 718, 4876, 29897, 13, 462, 4706, 1683, 29901, 13, 462, 9651, 1596, 29898, 710, 29898, 29875, 29918, 29896, 29897, 718, 525, 694, 4876, 5381, 1495, 13, 18884, 1683, 29901, 13, 462, 1678, 1596, 877, 29879, 3818, 727, 338, 3078, 1495, 13, 13, 1678, 822, 1243, 29918, 21111, 29918, 331, 2234, 29918, 3166, 29918, 497, 29918, 3488, 29918, 974, 29918, 9902, 29918, 1454, 29918, 497, 29918, 11236, 1907, 29918, 392, 29918, 5030, 277, 1338, 29898, 1311, 1125, 13, 4706, 5039, 3246, 353, 518, 13, 9651, 396, 11117, 333, 2396, 525, 29896, 742, 525, 2271, 2396, 525, 8205, 473, 10827, 13, 9651, 396, 10998, 333, 2396, 525, 29906, 742, 525, 2271, 2396, 525, 6370, 29974, 342, 403, 16675, 13, 9651, 396, 10998, 333, 2396, 525, 29941, 742, 525, 2271, 2396, 525, 3757, 9216, 358, 16675, 13, 9651, 396, 10998, 333, 2396, 525, 29946, 742, 525, 2271, 2396, 525, 20415, 16675, 13, 9651, 396, 10998, 333, 2396, 525, 29945, 742, 525, 2271, 2396, 525, 8711, 295, 16675, 13, 9651, 396, 10998, 333, 2396, 525, 29953, 742, 525, 2271, 2396, 525, 1049, 29880, 536, 16675, 13, 9651, 396, 10998, 333, 2396, 525, 29955, 742, 525, 2271, 2396, 525, 14941, 292, 16675, 13, 9651, 396, 10998, 333, 2396, 525, 29947, 742, 525, 2271, 2396, 525, 21264, 362, 16675, 13, 9651, 396, 10998, 333, 2396, 525, 29929, 742, 525, 2271, 2396, 525, 4951, 273, 1455, 16675, 13, 9651, 396, 10998, 333, 2396, 525, 29896, 29900, 742, 525, 2271, 2396, 525, 29878, 22837, 424, 16675, 13, 9651, 396, 10998, 333, 2396, 525, 29896, 29896, 742, 525, 2271, 2396, 525, 25237, 16675, 13, 9651, 396, 10998, 333, 2396, 525, 29896, 29906, 742, 525, 2271, 2396, 525, 29882, 1466, 29881, 1253, 261, 16675, 13, 9651, 396, 10998, 333, 2396, 525, 29896, 29941, 742, 525, 2271, 2396, 525, 1579, 272, 391, 16675, 13, 9651, 396, 10998, 333, 2396, 525, 29896, 29946, 742, 525, 2271, 2396, 525, 908, 3844, 389, 16675, 13, 9651, 396, 10998, 333, 2396, 525, 29896, 29945, 742, 525, 2271, 2396, 525, 29890, 557, 708, 16675, 13, 9651, 396, 10998, 333, 2396, 525, 29896, 29953, 742, 525, 2271, 2396, 525, 1144, 18541, 16675, 13, 9651, 396, 10998, 333, 2396, 525, 29896, 29955, 742, 525, 2271, 2396, 525, 561, 2817, 4135, 16675, 13, 9651, 396, 10998, 333, 2396, 525, 29896, 29947, 742, 525, 2271, 2396, 525, 13529, 292, 16675, 13, 9651, 396, 10998, 333, 2396, 525, 29896, 29929, 742, 525, 2271, 2396, 525, 15436, 2200, 537, 16675, 13, 9651, 396, 10998, 333, 2396, 525, 29906, 29900, 742, 525, 2271, 2396, 525, 572, 3774, 292, 16675, 13, 9651, 396, 10998, 333, 2396, 525, 29906, 29896, 742, 525, 2271, 2396, 525, 8926, 16675, 13, 9651, 396, 10998, 333, 2396, 525, 29906, 29906, 742, 525, 2271, 2396, 525, 10653, 7598, 16675, 13, 9651, 396, 10998, 333, 2396, 525, 29906, 29941, 742, 525, 2271, 2396, 525, 9157, 16675, 13, 9651, 396, 10998, 333, 2396, 525, 29906, 29946, 742, 525, 2271, 2396, 525, 5397, 482, 16675, 13, 9651, 396, 10998, 333, 2396, 525, 29906, 29945, 742, 525, 2271, 2396, 525, 25873, 391, 16675, 13, 9651, 396, 10998, 333, 2396, 525, 29906, 29953, 742, 525, 2271, 2396, 525, 1867, 2801, 16675, 13, 9651, 396, 10998, 333, 2396, 525, 29906, 29955, 742, 525, 2271, 2396, 525, 10149, 292, 16675, 13, 9651, 396, 10998, 333, 2396, 525, 29906, 29947, 742, 525, 2271, 2396, 525, 8899, 16675, 13, 9651, 396, 10998, 333, 2396, 525, 29906, 29929, 742, 525, 2271, 2396, 525, 1333, 653, 16675, 13, 9651, 396, 10998, 333, 2396, 525, 29941, 29900, 742, 525, 2271, 2396, 525, 29926, 809, 4539, 16675, 13, 9651, 396, 10998, 333, 2396, 525, 29941, 29896, 742, 525, 2271, 2396, 525, 18237, 272, 16675, 13, 9651, 396, 10998, 333, 2396, 525, 29941, 29906, 742, 525, 2271, 2396, 525, 1004, 271, 16675, 13, 9651, 396, 10998, 333, 2396, 525, 29941, 29941, 742, 525, 2271, 2396, 525, 5258, 16675, 13, 9651, 396, 10998, 333, 2396, 525, 29941, 29946, 742, 525, 2271, 2396, 525, 1279, 4496, 10827, 13, 4706, 4514, 13, 13, 4706, 11934, 2122, 29918, 700, 29918, 3712, 311, 353, 518, 13, 9651, 11117, 333, 2396, 525, 29896, 29947, 29941, 742, 525, 11522, 2396, 525, 557, 1527, 29872, 1324, 16675, 29937, 29909, 29895, 1527, 30239, 13, 9651, 11117, 333, 2396, 525, 29896, 29947, 29946, 742, 525, 11522, 2396, 525, 284, 3637, 7994, 16675, 29937, 29909, 368, 29873, 375, 13, 9651, 11117, 333, 2396, 525, 29896, 29947, 29945, 742, 525, 11522, 2396, 525, 1384, 2039, 26906, 852, 16675, 29937, 10773, 29895, 24832, 18754, 13, 9651, 11117, 333, 2396, 525, 29896, 29947, 29953, 742, 525, 11522, 2396, 525, 29890, 765, 650, 16675, 29937, 29933, 381, 30039, 880, 294, 13, 9651, 11117, 333, 2396, 525, 29896, 29947, 29955, 742, 525, 11522, 2396, 525, 20397, 6951, 852, 16675, 29937, 29933, 381, 30044, 1794, 13, 9651, 11117, 333, 2396, 525, 29896, 29947, 29947, 742, 525, 11522, 2396, 525, 7707, 375, 9089, 682, 29884, 852, 16675, 29937, 29928, 15816, 9089, 682, 1794, 13, 9651, 11117, 333, 2396, 525, 29896, 29947, 29929, 742, 525, 11522, 2396, 525, 6146, 12947, 4814, 852, 16675, 29937, 29923, 280, 12947, 30239, 1056, 29875, 13, 9651, 11117, 333, 2396, 525, 29896, 29929, 29900, 742, 525, 11522, 2396, 525, 647, 284, 1789, 1324, 16675, 29937, 17273, 284, 1099, 13, 9651, 11117, 333, 2396, 525, 29896, 29929, 29896, 742, 525, 11522, 2396, 525, 13022, 27082, 1324, 16675, 29937, 29967, 265, 879, 13, 9651, 11117, 333, 2396, 525, 29896, 29929, 29906, 742, 525, 11522, 2396, 525, 13022, 275, 3459, 1324, 16675, 29937, 29967, 5271, 30039, 29895, 275, 13, 9651, 11117, 333, 2396, 525, 29896, 29929, 29941, 742, 525, 11522, 2396, 525, 29926, 332, 1646, 446, 16675, 29937, 29967, 9265, 935, 294, 13, 9651, 11117, 333, 2396, 525, 29896, 29929, 29946, 742, 525, 11522, 2396, 525, 1335, 10770, 328, 706, 344, 16675, 29937, 29968, 1794, 29625, 328, 706, 29879, 13, 9651, 11117, 333, 2396, 525, 29896, 29929, 29945, 742, 525, 11522, 2396, 525, 11311, 1707, 19550, 1324, 16675, 29937, 29968, 284, 1707, 8044, 13, 9651, 11117, 333, 2396, 525, 29896, 29929, 29953, 742, 525, 11522, 2396, 525, 1335, 1540, 16675, 29937, 29968, 29874, 17496, 13, 9651, 11117, 333, 2396, 525, 29896, 29929, 29955, 742, 525, 11522, 2396, 525, 8637, 6092, 29899, 29878, 5333, 1324, 16675, 29937, 29968, 834, 29880, 30440, 390, 30132, 1388, 13, 9651, 11117, 333, 2396, 525, 29896, 29929, 29947, 742, 525, 11522, 2396, 525, 17713, 475, 5871, 852, 16675, 29937, 29968, 30239, 29881, 475, 18754, 13, 9651, 11117, 333, 2396, 525, 29896, 29929, 29929, 742, 525, 11522, 2396, 525, 10265, 1004, 1324, 16675, 29937, 29968, 16422, 30239, 13, 9651, 11117, 333, 2396, 525, 29906, 29900, 29900, 742, 525, 11522, 2396, 525, 29895, 433, 666, 23162, 1324, 16675, 29937, 29968, 433, 666, 30239, 1388, 13, 9651, 11117, 333, 2396, 525, 29906, 29900, 29896, 742, 525, 11522, 2396, 525, 4109, 1259, 29877, 1324, 16675, 29937, 29968, 276, 1259, 29874, 13, 9651, 11117, 333, 2396, 525, 29906, 29900, 29906, 742, 525, 11522, 2396, 525, 22947, 275, 3459, 1324, 16675, 29937, 29968, 786, 21365, 29895, 275, 13, 9651, 11117, 333, 2396, 525, 29906, 29900, 29941, 742, 525, 11522, 2396, 525, 433, 8849, 26323, 852, 16675, 29937, 29931, 834, 29881, 823, 1794, 13, 9651, 11117, 333, 2396, 525, 29906, 29900, 29946, 742, 525, 11522, 2396, 525, 3034, 823, 314, 15831, 1324, 16675, 29937, 7083, 823, 1160, 324, 30239, 13, 9651, 11117, 333, 2396, 525, 29906, 29900, 29945, 742, 525, 11522, 2396, 525, 655, 911, 638, 5871, 852, 16675, 29937, 21870, 11590, 638, 18754, 13, 9651, 11117, 333, 2396, 525, 29906, 29900, 29953, 742, 525, 11522, 2396, 525, 4346, 1026, 29884, 852, 16675, 29937, 29924, 324, 30239, 941, 29875, 13, 9651, 11117, 333, 2396, 525, 29906, 29900, 29955, 742, 525, 11522, 2396, 525, 1089, 20191, 1324, 16675, 29937, 29940, 3241, 29874, 13, 9651, 11117, 333, 2396, 525, 29906, 29900, 29947, 742, 525, 11522, 2396, 525, 13573, 387, 5871, 852, 16675, 29937, 29925, 351, 30239, 13723, 29875, 13, 9651, 11117, 333, 2396, 525, 29906, 29900, 29929, 742, 525, 11522, 2396, 525, 29886, 557, 582, 3848, 29891, 1324, 16675, 29937, 29925, 557, 582, 3848, 275, 13, 9651, 11117, 333, 2396, 525, 29906, 29896, 29900, 742, 525, 11522, 2396, 525, 7830, 4524, 1324, 16675, 29937, 18210, 12686, 13, 9651, 11117, 333, 2396, 525, 29906, 29896, 29896, 742, 525, 11522, 2396, 525, 29886, 1662, 345, 1537, 1324, 16675, 29937, 13683, 29894, 30239, 30044, 952, 13, 9651, 11117, 333, 2396, 525, 29906, 29896, 29906, 742, 525, 11522, 2396, 525, 18182, 791, 29891, 1324, 16675, 29937, 29925, 294, 791, 952, 13, 9651, 11117, 333, 2396, 525, 29906, 29896, 29941, 742, 525, 11522, 2396, 525, 572, 19440, 1324, 16675, 29937, 3247, 686, 30239, 13, 9651, 11117, 333, 2396, 525, 29906, 29896, 29946, 742, 525, 11522, 2396, 525, 29886, 374, 4814, 852, 16675, 29937, 29925, 19112, 1794, 13, 9651, 11117, 333, 2396, 525, 29906, 29896, 29945, 742, 525, 11522, 2396, 525, 3665, 17191, 275, 3459, 1324, 16675, 29937, 9908, 29894, 2638, 30039, 29895, 275, 13, 9651, 11117, 333, 2396, 525, 29906, 29896, 29953, 742, 525, 11522, 2396, 525, 29878, 559, 2172, 29884, 852, 16675, 29937, 29934, 559, 262, 18754, 13, 9651, 11117, 333, 2396, 525, 29906, 29896, 29955, 742, 525, 11522, 2396, 525, 374, 1187, 345, 16675, 29937, 29934, 2035, 2449, 13, 9651, 11117, 333, 2396, 525, 29906, 29896, 29947, 742, 525, 11522, 2396, 525, 16475, 275, 3459, 1324, 16675, 29937, 29934, 21025, 30039, 29895, 275, 13, 9651, 11117, 333, 2396, 525, 29906, 29896, 29929, 742, 525, 11522, 2396, 525, 27909, 5871, 852, 16675, 29937, 30115, 557, 18754, 13, 9651, 11117, 333, 2396, 525, 29906, 29906, 29900, 742, 525, 11522, 2396, 525, 19585, 16381, 682, 29884, 852, 16675, 29937, 30115, 284, 30026, 262, 682, 1794, 13, 9651, 11117, 333, 2396, 525, 29906, 29906, 29896, 742, 525, 11522, 2396, 525, 29879, 423, 352, 5871, 852, 16675, 29937, 30115, 423, 352, 18754, 13, 9651, 11117, 333, 2396, 525, 29906, 29906, 29906, 742, 525, 11522, 2396, 525, 25590, 744, 1324, 16675, 29937, 30115, 309, 284, 30239, 13, 9651, 11117, 333, 2396, 525, 29906, 29906, 29941, 742, 525, 11522, 2396, 525, 25590, 1082, 1324, 16675, 29937, 30115, 309, 329, 30239, 13, 9651, 11117, 333, 2396, 525, 29906, 29906, 29946, 742, 525, 11522, 2396, 525, 29879, 381, 3845, 517, 344, 16675, 29937, 30115, 381, 29894, 524, 359, 13, 9651, 11117, 333, 2396, 525, 29906, 29906, 29945, 742, 525, 11522, 2396, 525, 18181, 356, 16675, 29937, 29903, 2120, 397, 294, 13, 9651, 11117, 333, 2396, 525, 29906, 29906, 29953, 742, 525, 11522, 2396, 525, 29879, 854, 12401, 29891, 344, 16675, 29937, 30115, 854, 30026, 291, 952, 13, 9651, 11117, 333, 2396, 525, 29906, 29906, 29955, 742, 525, 11522, 2396, 525, 941, 332, 482, 1324, 16675, 29937, 29911, 6698, 351, 30239, 13, 9651, 11117, 333, 2396, 525, 29906, 29906, 29947, 742, 525, 11522, 2396, 525, 28497, 1039, 29884, 852, 16675, 29937, 29911, 295, 30039, 18754, 13, 9651, 11117, 333, 2396, 525, 29906, 29906, 29929, 742, 525, 11522, 2396, 525, 3018, 2120, 852, 16675, 29937, 5323, 1335, 29875, 13, 9651, 11117, 333, 2396, 525, 29906, 29941, 29900, 742, 525, 11522, 2396, 525, 2679, 14634, 1324, 16675, 29937, 29965, 29895, 1050, 29887, 30239, 13, 9651, 11117, 333, 2396, 525, 29906, 29941, 29896, 742, 525, 11522, 2396, 525, 6935, 29877, 1324, 16675, 29937, 29965, 841, 29874, 13, 9651, 11117, 333, 2396, 525, 29906, 29941, 29906, 742, 525, 11522, 2396, 525, 1707, 8154, 1324, 16675, 29937, 9037, 30239, 1056, 13, 9651, 11117, 333, 2396, 525, 29906, 29941, 29941, 742, 525, 11522, 2396, 525, 17191, 29895, 485, 275, 3459, 1324, 16675, 29937, 29963, 309, 29895, 17345, 30039, 29895, 275, 13, 9651, 11117, 333, 2396, 525, 29906, 29941, 29946, 742, 525, 11522, 2396, 525, 17191, 1240, 7994, 16675, 29937, 29963, 309, 21613, 13, 9651, 11117, 333, 2396, 525, 29906, 29941, 29945, 742, 525, 11522, 2396, 525, 1730, 22094, 16675, 29937, 6116, 351, 10189, 13, 9651, 11117, 333, 2396, 525, 29906, 29941, 29953, 742, 525, 11522, 2396, 525, 26687, 294, 29884, 852, 10827, 29937, 29999, 279, 294, 1794, 13, 4706, 4514, 13, 13, 4706, 1018, 29901, 13, 9651, 363, 27073, 297, 11934, 2122, 29918, 700, 29918, 3712, 311, 29901, 13, 18884, 363, 5039, 568, 297, 5039, 3246, 29901, 13, 462, 1678, 1018, 29901, 13, 462, 4706, 6354, 353, 5039, 568, 29889, 657, 703, 2271, 1159, 13, 462, 4706, 4272, 353, 27073, 29889, 657, 703, 11522, 1159, 13, 462, 4706, 3142, 29918, 4478, 353, 376, 991, 597, 1636, 29889, 1730, 284, 2035, 29884, 1564, 29889, 1896, 29914, 264, 29914, 4478, 12975, 718, 6354, 718, 5591, 29908, 718, 4272, 13, 462, 4706, 3472, 29918, 4478, 353, 7274, 29889, 657, 29898, 2271, 29918, 4478, 29897, 13, 462, 4706, 22300, 29918, 4478, 353, 25685, 29903, 1132, 29898, 1420, 29918, 4478, 29889, 3051, 29892, 525, 1420, 29889, 16680, 1495, 13, 462, 4706, 1353, 29918, 974, 29918, 12292, 353, 29871, 29900, 13, 13, 462, 4706, 565, 22300, 29918, 4478, 29889, 2886, 877, 4563, 742, 11117, 1990, 2396, 525, 4478, 29918, 2798, 285, 29918, 1563, 29915, 1800, 338, 451, 6213, 29901, 13, 462, 9651, 1353, 29918, 974, 29918, 12292, 29918, 2541, 29918, 510, 29874, 353, 938, 29898, 29879, 1132, 29918, 4478, 13, 462, 462, 462, 9651, 869, 2886, 877, 4563, 742, 11117, 1990, 2396, 525, 4478, 29918, 2798, 285, 29918, 1563, 29915, 1800, 13, 462, 462, 462, 9651, 869, 2886, 877, 9653, 2824, 726, 13, 462, 462, 462, 9651, 1723, 847, 29871, 29906, 29900, 13, 13, 462, 9651, 565, 938, 29898, 710, 29898, 4537, 29918, 974, 29918, 12292, 29918, 2541, 29918, 510, 29874, 467, 5451, 17350, 1159, 29961, 29896, 3816, 29901, 29896, 2314, 529, 29871, 29945, 29901, 13, 462, 18884, 1353, 29918, 974, 29918, 12292, 4619, 4513, 29898, 4537, 29918, 974, 29918, 12292, 29918, 2541, 29918, 510, 29874, 29897, 718, 29871, 29896, 13, 462, 18884, 1596, 877, 4537, 29918, 974, 29918, 12292, 584, 525, 718, 851, 29898, 4537, 29918, 974, 29918, 12292, 876, 13, 13, 462, 9651, 25342, 938, 29898, 710, 29898, 4537, 29918, 974, 29918, 12292, 29918, 2541, 29918, 510, 29874, 467, 5451, 17350, 1159, 29961, 29896, 3816, 29901, 29896, 2314, 6736, 29871, 29945, 29901, 13, 462, 18884, 1353, 29918, 974, 29918, 12292, 4619, 4513, 29898, 4537, 29918, 974, 29918, 12292, 29918, 2541, 29918, 510, 29874, 29897, 13, 462, 18884, 1596, 877, 4537, 29918, 974, 29918, 12292, 584, 525, 718, 851, 29898, 4537, 29918, 974, 29918, 12292, 876, 13, 13, 462, 4706, 474, 29918, 29896, 353, 29871, 29900, 13, 13, 462, 4706, 565, 22300, 29918, 4478, 29889, 2886, 877, 4563, 742, 11117, 1990, 2396, 525, 14518, 29918, 1761, 29915, 1800, 338, 451, 6213, 29901, 13, 462, 9651, 1596, 29898, 2271, 29918, 4478, 29897, 13, 462, 9651, 363, 1121, 29918, 667, 297, 22300, 29918, 4478, 320, 13, 462, 462, 1678, 869, 2886, 877, 4563, 742, 11117, 1990, 2396, 525, 14518, 29918, 1761, 29915, 1800, 320, 13, 462, 462, 1678, 869, 2886, 29918, 497, 877, 4563, 742, 11117, 1990, 2396, 525, 667, 10827, 1125, 13, 462, 18884, 474, 29918, 29896, 4619, 29871, 29896, 13, 13, 462, 18884, 3142, 29918, 2914, 353, 1121, 29918, 667, 29889, 2886, 877, 29874, 742, 11117, 1990, 2396, 525, 14518, 29899, 667, 29899, 3257, 29915, 7690, 657, 877, 12653, 1495, 13, 13, 462, 18884, 931, 29889, 17059, 29898, 29906, 29897, 13, 13, 462, 18884, 396, 10729, 278, 2793, 310, 263, 1813, 515, 278, 3142, 13, 462, 18884, 3472, 29918, 2914, 353, 7274, 29889, 657, 29898, 2271, 29918, 2914, 29897, 13, 13, 462, 18884, 396, 20969, 278, 2793, 310, 3472, 29918, 1514, 13, 462, 18884, 22300, 29918, 2914, 353, 25685, 29903, 1132, 29898, 1420, 29918, 2914, 29889, 3051, 29892, 525, 1420, 29889, 16680, 1495, 13, 13, 462, 18884, 565, 22300, 29918, 2914, 29889, 2886, 877, 29874, 742, 11117, 667, 7728, 2396, 525, 5269, 29915, 1800, 338, 451, 6213, 29901, 13, 462, 462, 1678, 4876, 353, 376, 3888, 5507, 718, 22300, 29918, 2914, 29889, 2886, 877, 29874, 742, 11117, 667, 7728, 2396, 525, 5269, 29915, 7690, 726, 29889, 5451, 29475, 1159, 29961, 29896, 29962, 13, 13, 462, 462, 1678, 1018, 29901, 13, 462, 462, 4706, 3957, 353, 282, 962, 952, 1519, 29889, 6915, 29898, 13, 462, 462, 9651, 3495, 2433, 7640, 742, 13, 462, 462, 9651, 2011, 29922, 29941, 29941, 29900, 29953, 29892, 13, 462, 462, 9651, 1404, 2433, 742, 13, 462, 462, 9651, 4800, 2433, 742, 13, 462, 462, 9651, 4833, 2433, 12346, 29879, 29918, 23221, 1211, 29876, 1379, 742, 13, 462, 462, 9651, 17425, 2433, 9420, 29947, 8337, 29946, 742, 13, 462, 462, 9651, 10677, 1990, 29922, 29886, 962, 952, 1519, 29889, 29883, 1295, 943, 29889, 21533, 19890, 13, 462, 462, 4706, 1723, 13, 13, 462, 462, 4706, 411, 3957, 29889, 18127, 580, 408, 10677, 29901, 13, 462, 462, 9651, 1018, 29901, 13, 462, 462, 18884, 4576, 353, 376, 19460, 11646, 421, 331, 2234, 29952, 4852, 320, 13, 462, 462, 462, 418, 29724, 333, 29918, 11236, 568, 1673, 376, 320, 13, 462, 462, 462, 418, 29724, 333, 29918, 5030, 277, 744, 29918, 700, 29918, 3712, 311, 1673, 376, 320, 13, 462, 462, 462, 418, 29724, 5269, 6348, 12599, 4462, 313, 29995, 29879, 29892, 1273, 29879, 29892, 1273, 29879, 5513, 13, 462, 462, 18884, 10677, 29889, 7978, 29898, 2850, 29892, 313, 13, 462, 462, 462, 1678, 5039, 568, 29889, 657, 877, 333, 5477, 13, 462, 462, 462, 1678, 27073, 29889, 657, 877, 333, 5477, 13, 462, 462, 462, 1678, 4876, 876, 13, 462, 462, 18884, 3957, 29889, 15060, 580, 13, 462, 462, 18884, 1596, 29898, 710, 29898, 29875, 29918, 29896, 29897, 718, 376, 450, 2407, 338, 6087, 584, 376, 718, 4876, 29897, 13, 462, 462, 18884, 3957, 29889, 5358, 580, 13, 462, 462, 9651, 5174, 29901, 13, 462, 462, 18884, 1596, 29898, 710, 29898, 29875, 29918, 29896, 29897, 718, 376, 450, 2407, 2307, 4864, 584, 376, 718, 4876, 29897, 13, 462, 462, 18884, 3957, 29889, 5358, 580, 13, 462, 462, 1678, 5174, 8960, 408, 321, 29901, 13, 462, 462, 4706, 1596, 29898, 710, 29898, 29875, 29918, 29896, 29897, 718, 376, 530, 1059, 411, 278, 4876, 584, 376, 718, 4876, 718, 376, 376, 718, 851, 29898, 29872, 876, 13, 462, 18884, 1683, 29901, 13, 462, 462, 1678, 1596, 29898, 710, 29898, 29875, 29918, 29896, 29897, 718, 525, 694, 4876, 5381, 1495, 13, 462, 4706, 1683, 29901, 13, 462, 9651, 1596, 877, 29879, 3818, 727, 338, 3078, 1495, 13, 13, 462, 4706, 565, 1353, 29918, 974, 29918, 12292, 1405, 29871, 29896, 29901, 13, 462, 9651, 363, 474, 297, 3464, 29898, 29906, 29892, 1353, 29918, 974, 29918, 12292, 718, 29871, 29896, 1125, 13, 462, 18884, 3142, 29918, 974, 29918, 650, 29918, 3488, 29918, 974, 29918, 9902, 353, 3142, 29918, 4478, 718, 5591, 29908, 718, 851, 29898, 29875, 29897, 13, 462, 18884, 1596, 29898, 2271, 29918, 974, 29918, 650, 29918, 3488, 29918, 974, 29918, 9902, 29897, 13, 462, 18884, 931, 29889, 17059, 29898, 29906, 29897, 13, 462, 18884, 3472, 29918, 974, 29918, 650, 29918, 3488, 29918, 974, 29918, 9902, 353, 7274, 29889, 657, 29898, 2271, 29918, 974, 29918, 650, 29918, 3488, 29918, 974, 29918, 9902, 29897, 13, 462, 18884, 22300, 29918, 974, 29918, 650, 29918, 3488, 29918, 974, 29918, 9902, 353, 25685, 29903, 1132, 29898, 1420, 29918, 974, 29918, 650, 29918, 3488, 29918, 974, 29918, 9902, 29889, 3051, 29892, 13, 462, 462, 462, 462, 9651, 525, 1420, 29889, 16680, 1495, 13, 13, 462, 18884, 565, 22300, 29918, 974, 29918, 650, 29918, 3488, 29918, 974, 29918, 9902, 29889, 2886, 877, 4563, 742, 11117, 1990, 2396, 525, 14518, 29918, 1761, 29915, 1800, 338, 451, 6213, 29901, 13, 462, 462, 1678, 363, 1121, 29918, 667, 297, 22300, 29918, 974, 29918, 650, 29918, 3488, 29918, 974, 29918, 9902, 320, 13, 462, 462, 9651, 869, 2886, 877, 4563, 742, 11117, 1990, 2396, 525, 14518, 29918, 1761, 29915, 1800, 320, 13, 462, 462, 9651, 869, 2886, 29918, 497, 877, 4563, 742, 11117, 1990, 2396, 525, 667, 10827, 1125, 13, 462, 462, 4706, 474, 29918, 29896, 4619, 29871, 29896, 13, 13, 462, 462, 4706, 3142, 29918, 2914, 353, 1121, 29918, 667, 29889, 2886, 877, 29874, 742, 11117, 1990, 2396, 525, 14518, 29899, 667, 29899, 3257, 29915, 7690, 657, 877, 12653, 1495, 13, 13, 462, 462, 4706, 396, 10729, 278, 2793, 310, 263, 1813, 515, 278, 3142, 13, 462, 462, 4706, 3472, 29918, 2914, 353, 7274, 29889, 657, 29898, 2271, 29918, 2914, 29897, 13, 13, 462, 462, 4706, 396, 20969, 278, 2793, 310, 3472, 29918, 1514, 13, 462, 462, 4706, 22300, 29918, 2914, 353, 25685, 29903, 1132, 29898, 1420, 29918, 2914, 29889, 3051, 29892, 525, 1420, 29889, 16680, 1495, 13, 13, 462, 462, 4706, 565, 22300, 29918, 2914, 29889, 2886, 877, 29874, 742, 11117, 667, 7728, 2396, 525, 5269, 29915, 1800, 338, 451, 6213, 29901, 13, 462, 462, 9651, 4876, 353, 376, 3888, 5507, 718, 320, 13, 462, 462, 462, 1678, 22300, 29918, 2914, 29889, 2886, 877, 29874, 742, 11117, 667, 7728, 2396, 525, 5269, 29915, 7690, 726, 29889, 5451, 29475, 1159, 29961, 29896, 29962, 13, 13, 462, 462, 9651, 1018, 29901, 13, 462, 462, 18884, 3957, 353, 282, 962, 952, 1519, 29889, 6915, 29898, 13, 462, 462, 462, 1678, 3495, 2433, 7640, 742, 13, 462, 462, 462, 1678, 2011, 29922, 29941, 29941, 29900, 29953, 29892, 13, 462, 462, 462, 1678, 1404, 2433, 742, 13, 462, 462, 462, 1678, 4800, 2433, 742, 13, 462, 462, 462, 1678, 4833, 2433, 12346, 29879, 29918, 23221, 1211, 29876, 1379, 742, 13, 462, 462, 462, 1678, 17425, 2433, 9420, 29947, 8337, 29946, 742, 13, 462, 462, 462, 1678, 10677, 1990, 29922, 29886, 962, 952, 1519, 29889, 29883, 1295, 943, 29889, 21533, 19890, 13, 462, 462, 18884, 1723, 13, 13, 462, 462, 18884, 411, 3957, 29889, 18127, 580, 408, 10677, 29901, 13, 462, 462, 462, 1678, 1018, 29901, 13, 462, 462, 462, 4706, 4576, 353, 376, 19460, 11646, 421, 331, 2234, 29952, 4852, 320, 13, 462, 462, 462, 795, 29724, 333, 29918, 11236, 568, 1673, 376, 320, 13, 462, 462, 462, 795, 29724, 333, 29918, 5030, 277, 744, 29918, 700, 29918, 3712, 311, 1673, 376, 320, 13, 462, 462, 462, 795, 29724, 5269, 6348, 12599, 4462, 313, 29995, 29879, 29892, 1273, 29879, 29892, 1273, 29879, 5513, 13, 462, 462, 462, 4706, 10677, 29889, 7978, 29898, 2850, 29892, 313, 13, 462, 462, 462, 9651, 5039, 568, 29889, 657, 877, 333, 5477, 13, 462, 462, 462, 9651, 27073, 29889, 657, 877, 333, 5477, 13, 462, 462, 462, 9651, 4876, 876, 13, 462, 462, 462, 4706, 3957, 29889, 15060, 580, 13, 462, 462, 462, 4706, 1596, 29898, 710, 29898, 29875, 29918, 29896, 29897, 718, 376, 450, 2407, 338, 6087, 584, 376, 718, 4876, 29897, 13, 462, 462, 462, 4706, 3957, 29889, 5358, 580, 13, 462, 462, 462, 1678, 5174, 29901, 13, 462, 462, 462, 4706, 1596, 29898, 710, 29898, 29875, 29918, 29896, 29897, 718, 376, 450, 2407, 2307, 4864, 584, 376, 718, 4876, 29897, 13, 462, 462, 462, 4706, 3957, 29889, 5358, 580, 13, 462, 462, 9651, 5174, 8960, 408, 321, 29901, 13, 462, 462, 18884, 1596, 29898, 710, 29898, 29875, 29918, 29896, 29897, 718, 376, 530, 1059, 411, 278, 4876, 584, 376, 718, 4876, 718, 376, 376, 718, 851, 29898, 29872, 876, 13, 462, 462, 4706, 1683, 29901, 13, 462, 462, 9651, 1596, 29898, 710, 29898, 29875, 29918, 29896, 29897, 718, 525, 694, 4876, 5381, 1495, 13, 462, 18884, 1683, 29901, 13, 462, 462, 1678, 1596, 877, 29879, 3818, 727, 338, 3078, 1495, 13, 462, 1678, 5174, 8960, 408, 321, 29901, 13, 462, 4706, 1596, 703, 8439, 338, 385, 1059, 3957, 472, 3142, 584, 376, 718, 851, 29898, 29872, 876, 13, 4706, 7146, 29901, 13, 9651, 1596, 877, 15091, 1495, 13, 13, 13, 361, 4770, 978, 1649, 1275, 525, 1649, 3396, 1649, 2396, 13, 1678, 443, 27958, 29889, 3396, 580, 13, 2 ]
beancount_gmail/debug_handling.py
kubauk/beancount-import-gmail
1
184069
<reponame>kubauk/beancount-import-gmail import datetime from os import PathLike from typing import Union, AnyStr, Callable, IO, Optional import jsonpickle import os from mailbox import Message from beancount_gmail.email_parser_protocol import EmailParser from beancount_gmail.receipt import Receipt DEBUGGING_DATA_DIR: str = "debugging" EXCLUDED_DATA_DIR: str = "excluded" WRITE_DEBUG: bool = False def write_email_to_file(reason: Optional[str], extension: str, message_date: datetime, message: Message, file_dir: Union[AnyStr, PathLike]) -> None: def data_handler(out): if isinstance(message, Message): out.write(message.as_string()) else: out.write(message) write_data_to_file(reason, extension, message_date, data_handler, file_dir) def write_receipts_to_file(receipts: list[Receipt], message_date: datetime) -> None: def data_handler(out): encode = jsonpickle.encode(receipts, unpicklable=True, indent=2) out.write(encode) write_data_to_file(None, "json", message_date, data_handler, DEBUGGING_DATA_DIR) def write_data_to_file(reason: Optional[str], extension: str, message_date: datetime, data_handler: Callable[[IO], None], file_dir: Union[AnyStr, PathLike]) -> None: if not os.path.exists(file_dir): os.mkdir(file_dir) file = os.path.join(file_dir, "%s.%s.%s" % (message_date, reason, extension)) with open(file, "w") as out: data_handler(out) def maybe_write_debugging(fn: Callable[[EmailParser, datetime, Message], list[Receipt]], extension: str, parser: EmailParser, message_date: datetime.datetime, message: Message) -> list[Receipt]: if WRITE_DEBUG: write_email_to_file(None, extension, message_date, message, os.path.join(os.getcwd(), DEBUGGING_DATA_DIR)) receipts = write_email_file_on_exception(fn, extension, parser, message_date, message) if WRITE_DEBUG: write_receipts_to_file(receipts, message_date) return receipts def write_email_file_on_exception(fn: Callable[[EmailParser, datetime, Message], list[Receipt]], extension: str, parser: EmailParser, message_date: datetime.datetime, message: Message) -> list[Receipt]: try: return fn(parser, message_date, message) except Exception as e: write_email_to_file(e.__class__.__name__, extension, message_date, message, os.path.join(os.getcwd(), EXCLUDED_DATA_DIR)) raise e
[ 1, 529, 276, 1112, 420, 29958, 29895, 431, 585, 29895, 29914, 14471, 2798, 29899, 5215, 29899, 21980, 13, 5215, 12865, 13, 3166, 2897, 1053, 10802, 27552, 13, 3166, 19229, 1053, 7761, 29892, 3139, 5015, 29892, 8251, 519, 29892, 10663, 29892, 28379, 13, 13, 5215, 4390, 23945, 280, 13, 5215, 2897, 13, 3166, 10524, 1884, 1053, 7777, 13, 13, 3166, 17796, 2798, 29918, 21980, 29889, 5269, 29918, 16680, 29918, 20464, 1053, 22608, 11726, 13, 3166, 17796, 2798, 29918, 21980, 29889, 13556, 21278, 1053, 24328, 21278, 13, 13, 18525, 29954, 4214, 29918, 14573, 29918, 9464, 29901, 851, 353, 376, 8382, 3460, 29908, 13, 13, 5746, 6154, 29965, 2287, 29928, 29918, 14573, 29918, 9464, 29901, 851, 353, 376, 735, 13347, 29908, 13, 13, 16365, 29918, 18525, 29901, 6120, 353, 7700, 13, 13, 13, 1753, 2436, 29918, 5269, 29918, 517, 29918, 1445, 29898, 23147, 29901, 28379, 29961, 710, 1402, 6081, 29901, 851, 29892, 2643, 29918, 1256, 29901, 12865, 29892, 13, 462, 4706, 2643, 29901, 7777, 29892, 934, 29918, 3972, 29901, 7761, 29961, 10773, 5015, 29892, 10802, 27552, 2314, 1599, 6213, 29901, 13, 1678, 822, 848, 29918, 13789, 29898, 449, 1125, 13, 4706, 565, 338, 8758, 29898, 4906, 29892, 7777, 1125, 13, 9651, 714, 29889, 3539, 29898, 4906, 29889, 294, 29918, 1807, 3101, 13, 4706, 1683, 29901, 13, 9651, 714, 29889, 3539, 29898, 4906, 29897, 13, 13, 1678, 2436, 29918, 1272, 29918, 517, 29918, 1445, 29898, 23147, 29892, 6081, 29892, 2643, 29918, 1256, 29892, 848, 29918, 13789, 29892, 934, 29918, 3972, 29897, 13, 13, 13, 1753, 2436, 29918, 13556, 29875, 16485, 29918, 517, 29918, 1445, 29898, 13556, 29875, 16485, 29901, 1051, 29961, 10380, 21278, 1402, 2643, 29918, 1256, 29901, 12865, 29897, 1599, 6213, 29901, 13, 1678, 822, 848, 29918, 13789, 29898, 449, 1125, 13, 4706, 19750, 353, 4390, 23945, 280, 29889, 12508, 29898, 13556, 29875, 16485, 29892, 443, 23945, 29880, 519, 29922, 5574, 29892, 29536, 29922, 29906, 29897, 13, 4706, 714, 29889, 3539, 29898, 12508, 29897, 13, 13, 1678, 2436, 29918, 1272, 29918, 517, 29918, 1445, 29898, 8516, 29892, 376, 3126, 613, 2643, 29918, 1256, 29892, 848, 29918, 13789, 29892, 21681, 29954, 4214, 29918, 14573, 29918, 9464, 29897, 13, 13, 13, 1753, 2436, 29918, 1272, 29918, 517, 29918, 1445, 29898, 23147, 29901, 28379, 29961, 710, 1402, 6081, 29901, 851, 29892, 2643, 29918, 1256, 29901, 12865, 29892, 13, 462, 539, 848, 29918, 13789, 29901, 8251, 519, 8999, 5971, 1402, 6213, 1402, 934, 29918, 3972, 29901, 7761, 29961, 10773, 5015, 29892, 10802, 27552, 2314, 1599, 6213, 29901, 13, 1678, 565, 451, 2897, 29889, 2084, 29889, 9933, 29898, 1445, 29918, 3972, 1125, 13, 4706, 2897, 29889, 11256, 3972, 29898, 1445, 29918, 3972, 29897, 13, 13, 1678, 934, 353, 2897, 29889, 2084, 29889, 7122, 29898, 1445, 29918, 3972, 29892, 11860, 29879, 29889, 29995, 29879, 29889, 29995, 29879, 29908, 1273, 313, 4906, 29918, 1256, 29892, 2769, 29892, 6081, 876, 13, 1678, 411, 1722, 29898, 1445, 29892, 376, 29893, 1159, 408, 714, 29901, 13, 4706, 848, 29918, 13789, 29898, 449, 29897, 13, 13, 13, 1753, 5505, 29918, 3539, 29918, 8382, 3460, 29898, 9144, 29901, 8251, 519, 8999, 9823, 11726, 29892, 12865, 29892, 7777, 1402, 1051, 29961, 10380, 21278, 20526, 13, 462, 3986, 6081, 29901, 851, 29892, 13812, 29901, 22608, 11726, 29892, 13, 462, 3986, 2643, 29918, 1256, 29901, 12865, 29889, 12673, 29892, 2643, 29901, 7777, 29897, 1599, 1051, 29961, 10380, 21278, 5387, 13, 1678, 565, 399, 29934, 9094, 29918, 18525, 29901, 13, 4706, 2436, 29918, 5269, 29918, 517, 29918, 1445, 29898, 8516, 29892, 6081, 29892, 2643, 29918, 1256, 29892, 2643, 29892, 2897, 29889, 2084, 29889, 7122, 29898, 359, 29889, 657, 29883, 9970, 3285, 21681, 29954, 4214, 29918, 14573, 29918, 9464, 876, 13, 13, 1678, 2414, 29875, 16485, 353, 2436, 29918, 5269, 29918, 1445, 29918, 265, 29918, 11739, 29898, 9144, 29892, 6081, 29892, 13812, 29892, 2643, 29918, 1256, 29892, 2643, 29897, 13, 13, 1678, 565, 399, 29934, 9094, 29918, 18525, 29901, 13, 4706, 2436, 29918, 13556, 29875, 16485, 29918, 517, 29918, 1445, 29898, 13556, 29875, 16485, 29892, 2643, 29918, 1256, 29897, 13, 13, 1678, 736, 2414, 29875, 16485, 13, 13, 13, 1753, 2436, 29918, 5269, 29918, 1445, 29918, 265, 29918, 11739, 29898, 9144, 29901, 8251, 519, 8999, 9823, 11726, 29892, 12865, 29892, 7777, 1402, 1051, 29961, 10380, 21278, 20526, 13, 462, 462, 29871, 6081, 29901, 851, 29892, 13812, 29901, 22608, 11726, 29892, 13, 462, 462, 29871, 2643, 29918, 1256, 29901, 12865, 29889, 12673, 29892, 2643, 29901, 7777, 29897, 1599, 1051, 29961, 10380, 21278, 5387, 13, 1678, 1018, 29901, 13, 4706, 736, 7876, 29898, 16680, 29892, 2643, 29918, 1256, 29892, 2643, 29897, 13, 1678, 5174, 8960, 408, 321, 29901, 13, 4706, 2436, 29918, 5269, 29918, 517, 29918, 1445, 29898, 29872, 17255, 1990, 1649, 17255, 978, 1649, 29892, 6081, 29892, 2643, 29918, 1256, 29892, 2643, 29892, 13, 462, 9651, 2897, 29889, 2084, 29889, 7122, 29898, 359, 29889, 657, 29883, 9970, 3285, 8528, 6154, 29965, 2287, 29928, 29918, 14573, 29918, 9464, 876, 13, 4706, 12020, 321, 13, 2 ]
Slide21/calculadora_python.py
yuutognr/MiniCursoPython2020
2
31118
a = 2 ** 50 b = 2 ** 50 * 3 c = 2 ** 50 * 3 - 1000 d = 400 / 2 ** 50 + 50 print(a,b,c,d)
[ 1, 263, 353, 29871, 29906, 3579, 29871, 29945, 29900, 13, 29890, 353, 29871, 29906, 3579, 29871, 29945, 29900, 334, 29871, 29941, 13, 29883, 353, 29871, 29906, 3579, 29871, 29945, 29900, 334, 29871, 29941, 448, 29871, 29896, 29900, 29900, 29900, 13, 29881, 353, 29871, 29946, 29900, 29900, 847, 29871, 29906, 3579, 29871, 29945, 29900, 718, 29871, 29945, 29900, 13, 13, 2158, 29898, 29874, 29892, 29890, 29892, 29883, 29892, 29881, 29897, 2 ]
4_vrf_verification/main.py
gve-sw/gve_devnet_dnac_automation_workshop
0
87213
<gh_stars>0 """ Copyright (c) 2022 Cisco and/or its affiliates. This software is licensed to you under the terms of the Cisco Sample Code License, Version 1.1 (the "License"). You may obtain a copy of the License at https://developer.cisco.com/docs/licenses All use of the material herein must be in accordance with the terms of the License. All rights not expressly granted by the License are reserved. Unless required by applicable law or agreed to separately 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. __author__ = "<NAME> <<EMAIL>>" __copyright__ = "Copyright (c) 2022 Cisco and/or its affiliates." __license__ = "Cisco Sample Code License, Version 1.1" """ # Import Section from dotenv import load_dotenv import os import requests from requests.auth import HTTPBasicAuth import urllib3 from urllib3.exceptions import InsecureRequestWarning import json import time from pyats_genie_command_parse import GenieCommandParse from tabulate import tabulate # Disable warnings urllib3.disable_warnings(InsecureRequestWarning) # load all environment variables load_dotenv() DNAC_BASE_URL = os.getenv('DNAC_BASE_URL') DNAC_USERNAME = os.getenv("DNAC_USERNAME") DNAC_PASSWORD = os.getenv("DNAC_PASSWORD") # Helper functions def get_auth_token(): """ Create the authorization token required to access DNAC Call to DNAC - /api/system/v1/auth/login Documentation: https://developer.cisco.com/docs/dna-center/#!authentication-api :return: DNAC Authentication token """ url = f'{DNAC_BASE_URL}/dna/system/api/v1/auth/token' headers = { 'Content-Type': 'application/json' } response = requests.post( url=url, auth=HTTPBasicAuth(DNAC_USERNAME, DNAC_PASSWORD), headers=headers, verify=False) token = response.json()['Token'] return token def get_device_list(dnac_token, params={}): """ API call to get a list of network devices based on filter criteria such as management IP address, mac address, hostname, etc. Documentation: https://developer.cisco.com/docs/dna-center/#!get-device-list-1 :param dnac_token: String with DNAC Authentication token :param params: A dictionary where you can specify search parameters :return: List of JSON objects with device details """ url = f'{DNAC_BASE_URL}/dna/intent/api/v1/network-device' headers = { 'Content-Type': 'application/json', 'Accept': 'application/json', 'x-auth-token': dnac_token } response = requests.get( url=url, headers=headers, params=params, verify=False ) response.raise_for_status() return response.json()['response'] def post_command_runner_request(dnac_token, payload): """ API call to post read only commands on devices to get their real time configuration. A payload neds to be sent in the post request with the commands that the user would like to execute on the CLI of the device. Call to DNAC - /dna/intent/api/v1/network-device-poller/cli/read-request Documentation: https://developer.cisco.com/docs/dna-center/#!run-read-only-commands-on-devices-to-get-their-real-time-configuration :param dnac_token: String with DNAC Authentication token :param payload: A dictionary with a list of commands, the device UUIDs and a timeout :return: A string with the task ID """ url = f'{DNAC_BASE_URL}/dna/intent/api/v1/network-device-poller/cli/read-request' headers = { 'Content-Type': 'application/json', 'Accept': 'application/json', 'x-auth-token': dnac_token } response = requests.post( url=url, data=json.dumps(payload), headers=headers, verify=False ) print(response.text) response.raise_for_status() task_id = response.json()['response']['taskId'] return task_id def get_file_id(dnac_token, task_id): """ API call to return a task by specified id. Call to DNAC - /dna/intent/api/v1/task/{taskId} Documentation: https://developer.cisco.com/docs/dna-center/#!get-task-by-id :param dnac_token: String with DNAC Authentication token :param task_id: String with the task ID that was returned by the command runner API :return: String with the file_id """ url = f'{DNAC_BASE_URL}/dna/intent/api/v1/task/{task_id}' headers = { 'Content-Type': 'application/json', 'Accept': 'application/json', 'x-auth-token': dnac_token } response = requests.get( url=url, headers=headers, verify=False ) response.raise_for_status() print("get_file_id response:") print(json.dumps(response.json(), indent=2)) progress_json = json.loads(response.json()['response']['progress']) file_id = progress_json['fileId'] return file_id def get_file(dnac_token, file_id): """ API call to download a file specified by fileId Call to DNAC - /dna/intent/api/v1/file/{fileId} Documentation: https://developer.cisco.com/docs/dna-center/#!download-a-file-by-file-id :param dnac_token: String with DNAC Authentication token :param file_id: String with the file ID that was returned by the task API :return: String with the file """ url = f'{DNAC_BASE_URL}/dna/intent/api/v1/file/{file_id}' headers = { 'Content-Type': 'application/json', 'Accept': 'application/json', 'x-auth-token': dnac_token } response = requests.get( url=url, headers=headers, verify=False ) response.raise_for_status() return response.json() if __name__ == "__main__": # # Step 1: Uncomment the following code block # # Obtain DNA Center authentication token # token = get_auth_token() # print("You DNAC token: ", token) # # Step 2: Uncomment the following code block # # Get a filtered list of devices # params_filter_devices = {"family": "Switches and Hubs"} # devices = get_device_list(token, params_filter_devices) # print(json.dumps(devices, indent=2)) # # Step 3: Uncomment the following code block # # Extract the device IDs of each device # device_ids = [] # for device in devices: # device_ids.append(device["id"]) # print(device_ids) # # Step 4: Uncomment the following code block # # Send a number of commands to the command runner API # commands = [ # "show vrf" # ] # payload = { # "commands": commands, # "deviceUuids": device_ids, # "timeout": 0 # } # task_id = post_command_runner_request(token, payload) # print(task_id) # # # Let's wait 30 seconds after executing the commands # time.sleep(30) # # Step 5: Uncomment the following code block # # We use the task_id to obtain a file_id # file_id = get_file_id(token, task_id) # # Obtain a file using the file_id # file = get_file(token, file_id) # print(file) # # Step 6: Uncomment the following code block # results = [] # for device in file: # device_uuid = device['deviceUuid'] # for command in commands: # if device['commandResponses']['SUCCESS']: # # Print the raw output # command_output = device['commandResponses']['SUCCESS'][command] # print(command_output) # print(' ') # # Parse the raw output # parser = GenieCommandParse(nos='ios') # parsed_output = parser.parse_string(show_command=command, show_output_data=command_output) # # Print the parsed output # print(json.dumps(parsed_output, indent=2)) # print(' ') # if command == "show vrf": # ##################### # ## Golden Config ## # ##################### # # Insert golden config of show vrf # # Below is just an example # golden_config_show_vrf = { # "vrf": { # "Mgmt-vrf": { # "protocols": [ # "ipv4", # "ipv6" # ], # "interfaces": [ # "GigabitEthernet0/0" # ] # } # } # } # ##################### # # Verify if the vrf config is correct, by default false # correct_vrf_config = False # if golden_config_show_vrf == parsed_output: # correct_vrf_config = True # # Add the result to the list of results # results.append([device_uuid, correct_vrf_config]) # print(' ') # print('The results of the VRF verification:') # print(' ') # # Print a table of the output # print(tabulate(results, headers=['Device UUIDs', 'Correct VRF Config']))
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 15945, 29908, 14187, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29906, 29906, 315, 275, 1111, 322, 29914, 272, 967, 23736, 1078, 29889, 13, 4013, 7047, 338, 7794, 21144, 304, 366, 1090, 278, 4958, 310, 278, 315, 275, 1111, 21029, 13, 3399, 19245, 29892, 10079, 29871, 29896, 29889, 29896, 313, 1552, 376, 29931, 293, 1947, 2564, 887, 1122, 4017, 263, 3509, 310, 278, 13, 29931, 293, 1947, 472, 13, 965, 2045, 597, 6734, 29889, 3476, 1111, 29889, 510, 29914, 2640, 29914, 506, 11259, 13, 3596, 671, 310, 278, 5518, 1244, 262, 1818, 367, 297, 15017, 749, 411, 278, 4958, 310, 13, 1552, 19245, 29889, 2178, 10462, 451, 4653, 368, 16896, 491, 278, 19245, 526, 13, 690, 9841, 29889, 25870, 3734, 491, 22903, 4307, 470, 15502, 304, 16949, 297, 13, 16554, 29892, 7047, 13235, 1090, 278, 19245, 338, 13235, 373, 385, 376, 3289, 13, 3235, 29908, 350, 3289, 3235, 29892, 399, 1806, 8187, 2692, 399, 1718, 29934, 13566, 29059, 6323, 8707, 29928, 22122, 29903, 8079, 13764, 29979, 476, 22255, 29892, 2845, 4653, 13, 272, 2411, 2957, 29889, 13, 13, 1649, 8921, 1649, 353, 9872, 5813, 29958, 3532, 26862, 6227, 6778, 29908, 13, 1649, 8552, 1266, 1649, 353, 376, 11882, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29906, 29906, 315, 275, 1111, 322, 29914, 272, 967, 23736, 1078, 1213, 13, 1649, 506, 1947, 1649, 353, 376, 29907, 275, 1111, 21029, 5920, 19245, 29892, 10079, 29871, 29896, 29889, 29896, 29908, 13, 15945, 29908, 13, 13, 29937, 16032, 9779, 13, 3166, 8329, 6272, 1053, 2254, 29918, 6333, 6272, 13, 5215, 2897, 13, 5215, 7274, 13, 3166, 7274, 29889, 5150, 1053, 7331, 16616, 6444, 13, 5215, 3142, 1982, 29941, 13, 3166, 3142, 1982, 29941, 29889, 11739, 29879, 1053, 512, 24216, 3089, 22709, 13, 5215, 4390, 13, 5215, 931, 13, 3166, 11451, 1446, 29918, 1885, 347, 29918, 6519, 29918, 5510, 1053, 5739, 347, 6255, 12914, 13, 3166, 4434, 5987, 1053, 4434, 5987, 13, 13, 29937, 3295, 519, 18116, 13, 2271, 1982, 29941, 29889, 20472, 29918, 25442, 886, 29898, 797, 24216, 3089, 22709, 29897, 13, 13, 29937, 2254, 599, 5177, 3651, 13, 1359, 29918, 6333, 6272, 580, 13, 13, 28307, 2477, 29918, 25416, 29918, 4219, 353, 2897, 29889, 657, 6272, 877, 28307, 2477, 29918, 25416, 29918, 4219, 1495, 13, 28307, 2477, 29918, 11889, 5813, 353, 2897, 29889, 657, 6272, 703, 28307, 2477, 29918, 11889, 5813, 1159, 13, 28307, 2477, 29918, 25711, 17013, 353, 2897, 29889, 657, 6272, 703, 28307, 2477, 29918, 25711, 17013, 1159, 13, 13, 29937, 6162, 546, 3168, 13, 1753, 679, 29918, 5150, 29918, 6979, 7295, 13, 1678, 9995, 13, 1678, 6204, 278, 28733, 5993, 3734, 304, 2130, 360, 29940, 2477, 13, 1678, 8251, 304, 360, 29940, 2477, 448, 847, 2754, 29914, 5205, 29914, 29894, 29896, 29914, 5150, 29914, 7507, 13, 1678, 10854, 362, 29901, 2045, 597, 6734, 29889, 3476, 1111, 29889, 510, 29914, 2640, 29914, 29881, 1056, 29899, 5064, 8484, 29991, 23055, 29899, 2754, 13, 1678, 584, 2457, 29901, 360, 29940, 2477, 27241, 5993, 13, 1678, 9995, 13, 1678, 3142, 353, 285, 29915, 29912, 28307, 2477, 29918, 25416, 29918, 4219, 6822, 29881, 1056, 29914, 5205, 29914, 2754, 29914, 29894, 29896, 29914, 5150, 29914, 6979, 29915, 13, 1678, 9066, 353, 426, 13, 4706, 525, 3916, 29899, 1542, 2396, 525, 6214, 29914, 3126, 29915, 13, 1678, 500, 13, 1678, 2933, 353, 7274, 29889, 2490, 29898, 13, 4706, 3142, 29922, 2271, 29892, 29871, 13, 4706, 4817, 29922, 10493, 16616, 6444, 29898, 28307, 2477, 29918, 11889, 5813, 29892, 360, 29940, 2477, 29918, 25711, 17013, 511, 29871, 13, 4706, 9066, 29922, 13662, 29892, 13, 4706, 11539, 29922, 8824, 29897, 13, 1678, 5993, 353, 2933, 29889, 3126, 580, 1839, 6066, 2033, 13, 1678, 736, 5993, 13, 13, 1753, 679, 29918, 10141, 29918, 1761, 29898, 5200, 562, 29918, 6979, 29892, 8636, 3790, 29913, 1125, 13, 1678, 9995, 13, 1678, 3450, 1246, 304, 679, 263, 1051, 310, 3564, 9224, 2729, 373, 4175, 16614, 1316, 408, 10643, 5641, 3211, 29892, 5825, 3211, 29892, 3495, 978, 29892, 2992, 29889, 29871, 13, 1678, 10854, 362, 29901, 2045, 597, 6734, 29889, 3476, 1111, 29889, 510, 29914, 2640, 29914, 29881, 1056, 29899, 5064, 8484, 29991, 657, 29899, 10141, 29899, 1761, 29899, 29896, 13, 1678, 584, 3207, 270, 29876, 562, 29918, 6979, 29901, 1714, 411, 360, 29940, 2477, 27241, 5993, 29871, 13, 1678, 584, 3207, 8636, 29901, 319, 8600, 988, 366, 508, 6084, 2740, 4128, 13, 1678, 584, 2457, 29901, 2391, 310, 4663, 3618, 411, 4742, 4902, 13, 1678, 9995, 13, 1678, 3142, 353, 285, 29915, 29912, 28307, 2477, 29918, 25416, 29918, 4219, 6822, 29881, 1056, 29914, 14029, 29914, 2754, 29914, 29894, 29896, 29914, 11618, 29899, 10141, 29915, 13, 1678, 9066, 353, 426, 13, 4706, 525, 3916, 29899, 1542, 2396, 525, 6214, 29914, 3126, 742, 13, 4706, 525, 23965, 2396, 525, 6214, 29914, 3126, 742, 13, 4706, 525, 29916, 29899, 5150, 29899, 6979, 2396, 270, 29876, 562, 29918, 6979, 13, 1678, 500, 13, 1678, 2933, 353, 7274, 29889, 657, 29898, 13, 4706, 3142, 29922, 2271, 29892, 29871, 13, 4706, 9066, 29922, 13662, 29892, 13, 4706, 8636, 29922, 7529, 29892, 13, 4706, 11539, 29922, 8824, 13, 1678, 1723, 13, 1678, 2933, 29889, 22692, 29918, 1454, 29918, 4882, 580, 13, 1678, 736, 2933, 29889, 3126, 580, 1839, 5327, 2033, 13, 13, 1753, 1400, 29918, 6519, 29918, 27492, 29918, 3827, 29898, 5200, 562, 29918, 6979, 29892, 20092, 1125, 13, 1678, 9995, 13, 1678, 3450, 1246, 304, 1400, 1303, 871, 8260, 373, 9224, 304, 679, 1009, 1855, 931, 5285, 29889, 319, 20092, 302, 5779, 304, 367, 2665, 297, 278, 1400, 2009, 411, 29871, 13, 1678, 278, 8260, 393, 278, 1404, 723, 763, 304, 6222, 373, 278, 24492, 310, 278, 4742, 29889, 29871, 13, 1678, 8251, 304, 360, 29940, 2477, 448, 847, 29881, 1056, 29914, 14029, 29914, 2754, 29914, 29894, 29896, 29914, 11618, 29899, 10141, 29899, 3733, 1358, 29914, 11303, 29914, 949, 29899, 3827, 13, 1678, 10854, 362, 29901, 2045, 597, 6734, 29889, 3476, 1111, 29889, 510, 29914, 2640, 29914, 29881, 1056, 29899, 5064, 8484, 29991, 3389, 29899, 949, 29899, 6194, 29899, 26381, 29899, 265, 29899, 3359, 1575, 29899, 517, 29899, 657, 29899, 1552, 381, 29899, 6370, 29899, 2230, 29899, 13305, 13, 1678, 584, 3207, 270, 29876, 562, 29918, 6979, 29901, 1714, 411, 360, 29940, 2477, 27241, 5993, 29871, 13, 1678, 584, 3207, 20092, 29901, 319, 8600, 411, 263, 1051, 310, 8260, 29892, 278, 4742, 501, 11150, 29879, 322, 263, 11815, 13, 1678, 584, 2457, 29901, 319, 1347, 411, 278, 3414, 3553, 13, 1678, 9995, 13, 1678, 3142, 353, 285, 29915, 29912, 28307, 2477, 29918, 25416, 29918, 4219, 6822, 29881, 1056, 29914, 14029, 29914, 2754, 29914, 29894, 29896, 29914, 11618, 29899, 10141, 29899, 3733, 1358, 29914, 11303, 29914, 949, 29899, 3827, 29915, 13, 1678, 9066, 353, 426, 13, 4706, 525, 3916, 29899, 1542, 2396, 525, 6214, 29914, 3126, 742, 13, 4706, 525, 23965, 2396, 525, 6214, 29914, 3126, 742, 13, 4706, 525, 29916, 29899, 5150, 29899, 6979, 2396, 270, 29876, 562, 29918, 6979, 13, 1678, 500, 13, 1678, 2933, 353, 7274, 29889, 2490, 29898, 13, 4706, 3142, 29922, 2271, 29892, 29871, 13, 4706, 848, 29922, 3126, 29889, 29881, 17204, 29898, 23813, 511, 29871, 13, 4706, 9066, 29922, 13662, 29892, 29871, 13, 4706, 11539, 29922, 8824, 13, 4706, 1723, 13, 1678, 1596, 29898, 5327, 29889, 726, 29897, 13, 1678, 2933, 29889, 22692, 29918, 1454, 29918, 4882, 580, 13, 1678, 3414, 29918, 333, 353, 2933, 29889, 3126, 580, 1839, 5327, 16215, 7662, 1204, 2033, 13, 1678, 736, 3414, 29918, 333, 13, 13, 1753, 679, 29918, 1445, 29918, 333, 29898, 5200, 562, 29918, 6979, 29892, 3414, 29918, 333, 1125, 13, 1678, 9995, 13, 1678, 3450, 1246, 304, 736, 263, 3414, 491, 6790, 1178, 29889, 29871, 13, 1678, 8251, 304, 360, 29940, 2477, 448, 847, 29881, 1056, 29914, 14029, 29914, 2754, 29914, 29894, 29896, 29914, 7662, 19248, 7662, 1204, 29913, 13, 1678, 10854, 362, 29901, 2045, 597, 6734, 29889, 3476, 1111, 29889, 510, 29914, 2640, 29914, 29881, 1056, 29899, 5064, 8484, 29991, 657, 29899, 7662, 29899, 1609, 29899, 333, 13, 1678, 584, 3207, 270, 29876, 562, 29918, 6979, 29901, 1714, 411, 360, 29940, 2477, 27241, 5993, 29871, 13, 1678, 584, 3207, 3414, 29918, 333, 29901, 1714, 411, 278, 3414, 3553, 393, 471, 4133, 491, 278, 1899, 28877, 3450, 13, 1678, 584, 2457, 29901, 1714, 411, 278, 934, 29918, 333, 13, 1678, 9995, 13, 1678, 3142, 353, 285, 29915, 29912, 28307, 2477, 29918, 25416, 29918, 4219, 6822, 29881, 1056, 29914, 14029, 29914, 2754, 29914, 29894, 29896, 29914, 7662, 19248, 7662, 29918, 333, 10162, 13, 1678, 9066, 353, 426, 13, 4706, 525, 3916, 29899, 1542, 2396, 525, 6214, 29914, 3126, 742, 13, 4706, 525, 23965, 2396, 525, 6214, 29914, 3126, 742, 13, 4706, 525, 29916, 29899, 5150, 29899, 6979, 2396, 270, 29876, 562, 29918, 6979, 13, 1678, 500, 13, 1678, 2933, 353, 7274, 29889, 657, 29898, 13, 4706, 3142, 29922, 2271, 29892, 29871, 13, 4706, 9066, 29922, 13662, 29892, 29871, 13, 4706, 11539, 29922, 8824, 13, 1678, 1723, 13, 1678, 2933, 29889, 22692, 29918, 1454, 29918, 4882, 580, 13, 1678, 1596, 703, 657, 29918, 1445, 29918, 333, 2933, 29901, 1159, 13, 1678, 1596, 29898, 3126, 29889, 29881, 17204, 29898, 5327, 29889, 3126, 3285, 29536, 29922, 29906, 876, 13, 1678, 6728, 29918, 3126, 353, 4390, 29889, 18132, 29898, 5327, 29889, 3126, 580, 1839, 5327, 16215, 18035, 11287, 13, 1678, 934, 29918, 333, 353, 6728, 29918, 3126, 1839, 1445, 1204, 2033, 13, 1678, 736, 934, 29918, 333, 13, 13, 1753, 679, 29918, 1445, 29898, 5200, 562, 29918, 6979, 29892, 934, 29918, 333, 1125, 13, 1678, 9995, 13, 1678, 3450, 1246, 304, 5142, 263, 934, 6790, 491, 934, 1204, 29871, 13, 1678, 8251, 304, 360, 29940, 2477, 448, 847, 29881, 1056, 29914, 14029, 29914, 2754, 29914, 29894, 29896, 29914, 1445, 19248, 1445, 1204, 29913, 13, 1678, 10854, 362, 29901, 2045, 597, 6734, 29889, 3476, 1111, 29889, 510, 29914, 2640, 29914, 29881, 1056, 29899, 5064, 8484, 29991, 10382, 29899, 29874, 29899, 1445, 29899, 1609, 29899, 1445, 29899, 333, 13, 1678, 584, 3207, 270, 29876, 562, 29918, 6979, 29901, 1714, 411, 360, 29940, 2477, 27241, 5993, 29871, 13, 1678, 584, 3207, 934, 29918, 333, 29901, 1714, 411, 278, 934, 3553, 393, 471, 4133, 491, 278, 3414, 3450, 13, 1678, 584, 2457, 29901, 1714, 411, 278, 934, 13, 1678, 9995, 13, 1678, 3142, 353, 285, 29915, 29912, 28307, 2477, 29918, 25416, 29918, 4219, 6822, 29881, 1056, 29914, 14029, 29914, 2754, 29914, 29894, 29896, 29914, 1445, 19248, 1445, 29918, 333, 10162, 13, 1678, 9066, 353, 426, 13, 4706, 525, 3916, 29899, 1542, 2396, 525, 6214, 29914, 3126, 742, 13, 4706, 525, 23965, 2396, 525, 6214, 29914, 3126, 742, 13, 4706, 525, 29916, 29899, 5150, 29899, 6979, 2396, 270, 29876, 562, 29918, 6979, 13, 1678, 500, 13, 1678, 2933, 353, 7274, 29889, 657, 29898, 13, 4706, 3142, 29922, 2271, 29892, 29871, 13, 4706, 9066, 29922, 13662, 29892, 29871, 13, 4706, 11539, 29922, 8824, 13, 1678, 1723, 13, 1678, 2933, 29889, 22692, 29918, 1454, 29918, 4882, 580, 13, 1678, 736, 2933, 29889, 3126, 580, 13, 13, 361, 4770, 978, 1649, 1275, 376, 1649, 3396, 1649, 1115, 13, 1678, 396, 396, 16696, 29871, 29896, 29901, 853, 9342, 278, 1494, 775, 2908, 13, 1678, 396, 396, 4250, 2408, 25348, 7817, 10760, 5993, 13, 1678, 396, 5993, 353, 679, 29918, 5150, 29918, 6979, 580, 13, 1678, 396, 1596, 703, 3492, 360, 29940, 2477, 5993, 29901, 9162, 5993, 29897, 13, 13, 1678, 396, 396, 16696, 29871, 29906, 29901, 853, 9342, 278, 1494, 775, 2908, 13, 1678, 396, 396, 3617, 263, 22289, 1051, 310, 9224, 13, 1678, 396, 8636, 29918, 4572, 29918, 3359, 1575, 353, 8853, 11922, 1115, 376, 24995, 267, 322, 14533, 29879, 9092, 13, 1678, 396, 9224, 353, 679, 29918, 10141, 29918, 1761, 29898, 6979, 29892, 8636, 29918, 4572, 29918, 3359, 1575, 29897, 13, 1678, 396, 1596, 29898, 3126, 29889, 29881, 17204, 29898, 3359, 1575, 29892, 29536, 29922, 29906, 876, 13, 13, 1678, 396, 396, 16696, 29871, 29941, 29901, 853, 9342, 278, 1494, 775, 2908, 13, 1678, 396, 396, 7338, 1461, 278, 4742, 23481, 310, 1269, 4742, 13, 1678, 396, 4742, 29918, 4841, 353, 5159, 13, 1678, 396, 363, 4742, 297, 9224, 29901, 13, 1678, 396, 268, 4742, 29918, 4841, 29889, 4397, 29898, 10141, 3366, 333, 20068, 13, 1678, 396, 1596, 29898, 10141, 29918, 4841, 29897, 13, 13, 1678, 396, 396, 16696, 29871, 29946, 29901, 853, 9342, 278, 1494, 775, 2908, 13, 1678, 396, 396, 15076, 263, 1353, 310, 8260, 304, 278, 1899, 28877, 3450, 13, 1678, 396, 8260, 353, 518, 13, 1678, 396, 308, 376, 4294, 325, 9600, 29908, 13, 1678, 396, 268, 4514, 13, 1678, 396, 20092, 353, 426, 13, 1678, 396, 268, 376, 26381, 1115, 8260, 29892, 13, 1678, 396, 268, 376, 10141, 29965, 29884, 4841, 1115, 4742, 29918, 4841, 29892, 13, 1678, 396, 268, 376, 15619, 1115, 29871, 29900, 13, 1678, 396, 500, 13, 1678, 396, 3414, 29918, 333, 353, 1400, 29918, 6519, 29918, 27492, 29918, 3827, 29898, 6979, 29892, 20092, 29897, 13, 1678, 396, 1596, 29898, 7662, 29918, 333, 29897, 13, 1678, 396, 29871, 13, 1678, 396, 396, 2803, 29915, 29879, 4480, 29871, 29941, 29900, 6923, 1156, 14012, 278, 8260, 13, 1678, 396, 931, 29889, 17059, 29898, 29941, 29900, 29897, 13, 13, 1678, 396, 396, 16696, 29871, 29945, 29901, 853, 9342, 278, 1494, 775, 2908, 13, 1678, 396, 396, 1334, 671, 278, 3414, 29918, 333, 304, 4017, 263, 934, 29918, 333, 13, 1678, 396, 934, 29918, 333, 353, 679, 29918, 1445, 29918, 333, 29898, 6979, 29892, 3414, 29918, 333, 29897, 13, 13, 1678, 396, 396, 4250, 2408, 263, 934, 773, 278, 934, 29918, 333, 13, 1678, 396, 934, 353, 679, 29918, 1445, 29898, 6979, 29892, 934, 29918, 333, 29897, 13, 1678, 396, 1596, 29898, 1445, 29897, 13, 13, 1678, 396, 396, 16696, 29871, 29953, 29901, 853, 9342, 278, 1494, 775, 2908, 13, 1678, 396, 2582, 353, 5159, 13, 1678, 396, 363, 4742, 297, 934, 29901, 13, 1678, 396, 268, 4742, 29918, 25118, 353, 4742, 1839, 10141, 29965, 5416, 2033, 13, 1678, 396, 268, 363, 1899, 297, 8260, 29901, 13, 1678, 396, 308, 565, 4742, 1839, 6519, 1666, 29886, 787, 267, 16215, 14605, 26925, 2033, 29901, 13, 1678, 396, 632, 396, 13905, 278, 10650, 1962, 13, 1678, 396, 632, 1899, 29918, 4905, 353, 4742, 1839, 6519, 1666, 29886, 787, 267, 16215, 14605, 26925, 2033, 29961, 6519, 29962, 13, 1678, 396, 632, 1596, 29898, 6519, 29918, 4905, 29897, 13, 1678, 396, 632, 1596, 877, 25710, 13, 13, 1678, 396, 632, 396, 20969, 278, 10650, 1962, 13, 1678, 396, 632, 13812, 353, 5739, 347, 6255, 12914, 29898, 17639, 2433, 2363, 1495, 13, 1678, 396, 632, 21213, 29918, 4905, 353, 13812, 29889, 5510, 29918, 1807, 29898, 4294, 29918, 6519, 29922, 6519, 29892, 1510, 29918, 4905, 29918, 1272, 29922, 6519, 29918, 4905, 29897, 13, 13, 1678, 396, 632, 396, 13905, 278, 21213, 1962, 13, 1678, 396, 632, 1596, 29898, 3126, 29889, 29881, 17204, 29898, 862, 8485, 29918, 4905, 29892, 29536, 29922, 29906, 876, 13, 1678, 396, 632, 1596, 877, 25710, 13, 13, 1678, 396, 632, 565, 1899, 1275, 376, 4294, 325, 9600, 1115, 13, 13, 1678, 396, 462, 835, 13383, 2277, 13, 1678, 396, 462, 444, 29871, 16108, 12782, 29871, 444, 13, 1678, 396, 462, 835, 13383, 2277, 13, 13, 1678, 396, 462, 396, 24505, 22843, 2295, 310, 1510, 325, 9600, 13, 1678, 396, 462, 396, 13866, 338, 925, 385, 1342, 13, 1678, 396, 462, 22843, 29918, 2917, 29918, 4294, 29918, 29894, 9600, 353, 426, 13, 1678, 396, 462, 268, 376, 29894, 9600, 1115, 426, 13, 1678, 396, 462, 308, 376, 29924, 29887, 4378, 29899, 29894, 9600, 1115, 426, 13, 1678, 396, 462, 308, 376, 20464, 29879, 1115, 518, 13, 1678, 396, 462, 632, 376, 666, 29894, 29946, 613, 13, 1678, 396, 462, 632, 376, 666, 29894, 29953, 29908, 13, 1678, 396, 462, 308, 21251, 13, 1678, 396, 462, 308, 376, 1639, 8726, 1115, 518, 13, 1678, 396, 462, 632, 376, 29954, 335, 370, 277, 29923, 721, 1212, 29900, 29914, 29900, 29908, 13, 1678, 396, 462, 308, 4514, 13, 1678, 396, 462, 308, 500, 13, 1678, 396, 462, 268, 500, 13, 1678, 396, 462, 500, 13, 13, 1678, 396, 462, 835, 13383, 2277, 13, 13, 1678, 396, 462, 396, 1798, 1598, 565, 278, 325, 9600, 2295, 338, 1959, 29892, 491, 2322, 2089, 13, 1678, 396, 462, 1959, 29918, 29894, 9600, 29918, 2917, 353, 7700, 13, 1678, 396, 462, 565, 22843, 29918, 2917, 29918, 4294, 29918, 29894, 9600, 1275, 21213, 29918, 4905, 29901, 13, 1678, 396, 462, 268, 1959, 29918, 29894, 9600, 29918, 2917, 353, 5852, 13, 462, 268, 13, 1678, 396, 462, 396, 3462, 278, 1121, 304, 278, 1051, 310, 2582, 13, 1678, 396, 462, 2582, 29889, 4397, 4197, 10141, 29918, 25118, 29892, 1959, 29918, 29894, 9600, 29918, 2917, 2314, 13, 13, 1678, 396, 1596, 877, 25710, 13, 1678, 396, 1596, 877, 1576, 2582, 310, 278, 478, 29934, 29943, 1147, 2450, 29901, 1495, 13, 1678, 396, 1596, 877, 25710, 13, 1678, 396, 396, 13905, 263, 1591, 310, 278, 1962, 13, 1678, 396, 1596, 29898, 3891, 5987, 29898, 9902, 29892, 9066, 29922, 1839, 11501, 501, 11150, 29879, 742, 525, 12521, 1621, 478, 29934, 29943, 12782, 25901, 13, 462, 268, 13, 462, 13, 2 ]
src/test_ptmod.py
LuDubies/Differender
4
147508
<filename>src/test_ptmod.py<gh_stars>1-10 import torch from torch.autograd import gradcheck from torchvtk.datasets import TorchDataset import matplotlib.pyplot as plt from transfer_functions import get_tf from pytorch_module import Raycaster from torchvision.utils import save_image tf = torch.from_numpy(get_tf('tf1', 128)).permute(1, 0).float().contiguous() vol_ds = TorchDataset('/run/media/dome/Data/data/torchvtk/CQ500_128') vol = vol_ds[0]['vol'].float() look_from = torch.tensor([0.0, 1.0, -2.5]) r = Raycaster((128, 128, 128), (240, 240), 128, jitter=False) print(f'{vol.shape=}, {vol.min()=}, {vol.max()=}') print(f'{tf.shape=}, {tf.min()=}, {tf.max()=}') if __name__ == '__main__': # vol += torch.randn_like(vol) * 0.1 vol = vol.to('cuda').float().requires_grad_(True) tf = tf.to('cuda').float().requires_grad_(True) look_from = look_from.to('cuda').float().requires_grad_(False) target = torch.load('target.pt').float().to('cuda') # test = gradcheck(r, [vol, tf, look_from], eps=1e-3, atol=1e-3, check_forward_ad=False, fast_mode=True, raise_exception=True, nondet_tol=1e-2) # print(test) res_single = r(vol, tf, look_from) print(f'{res_single.shape=}') res_batched = r(torch.stack([vol] * 2), torch.stack([tf] * 2), torch.stack([look_from, look_from + 1.0])) print(f'{res_batched.shape=}') print(f'Equal?{(res_single == res_batched.squeeze(0)).all()}') # save_image(res_single, 'res_single.png') # save_image(res_batched[0], 'res_batched0.png') # save_image(res_batched[1],'res_batched1.png') opt = torch.optim.Adam([vol, tf]) opt.zero_grad() res = r(vol, tf, look_from) loss = torch.nn.functional.mse_loss(res, target) loss.backward() print(f'SINGLE ----------------------------------') print(f'{loss=}') print(f'{vol.grad.shape=}, {vol.grad.abs().max()=}') print(f'{tf.grad.shape=}, {tf.grad.abs().max()=}') vol_grad = vol.grad.clone() tf_grad = tf.grad.clone() opt.zero_grad() res = r(torch.stack([vol] * 4), torch.stack([tf] * 4), torch.stack([look_from] * 4)) loss = torch.nn.functional.mse_loss(res, torch.stack([target] * 4)) loss.backward() print(f'BATCHED ----------------------------------') print(f'{loss=}') print(f'{vol.grad.shape=}, {vol.grad.abs().max()=}') print(f'{tf.grad.shape=}, {tf.grad.abs().max()=}') print(f'COMPARE ----------------------------------') print(f'Vol Gradients equal? {torch.allclose(vol.grad, vol_grad, atol=1e-5, rtol=1e-3)}') print(f'TF Gradients equal? {torch.allclose(tf.grad, tf_grad, atol=1e-5, rtol=1e-3)}') # opt = torch.optim.Adam([vol, tf]) # for i in range(100): # opt.zero_grad() # res = r(vol, tf, look_from) # loss = torch.nn.functional.mse_loss(res, target) # loss.backward() # save_image(res, f'test/render_{i:03d}.png') # print(f'Step {i:03d} ----------------------------------') # print(f'{loss=}') # print(f'{vol.grad.abs().max()=}') # print(f'{tf.grad.abs().max()=}') # opt.step()
[ 1, 529, 9507, 29958, 4351, 29914, 1688, 29918, 415, 1545, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 5215, 4842, 305, 13, 3166, 4842, 305, 29889, 1300, 468, 3665, 1053, 4656, 3198, 13, 3166, 4842, 305, 29894, 11178, 29889, 14538, 1691, 1053, 4794, 305, 16390, 24541, 13, 5215, 22889, 29889, 2272, 5317, 408, 14770, 13, 13, 3166, 6782, 29918, 12171, 1053, 679, 29918, 13264, 13, 3166, 282, 3637, 25350, 29918, 5453, 1053, 9596, 29883, 1901, 13, 13, 3166, 4842, 305, 4924, 29889, 13239, 1053, 4078, 29918, 3027, 13, 13, 13264, 353, 4842, 305, 29889, 3166, 29918, 23749, 29898, 657, 29918, 13264, 877, 13264, 29896, 742, 29871, 29896, 29906, 29947, 8106, 17858, 1082, 29898, 29896, 29892, 29871, 29900, 467, 7411, 2141, 1285, 5526, 681, 580, 13, 1555, 29918, 6289, 353, 4794, 305, 16390, 24541, 11219, 3389, 29914, 9799, 29914, 29881, 608, 29914, 1469, 29914, 1272, 29914, 7345, 305, 29894, 11178, 29914, 29907, 29984, 29945, 29900, 29900, 29918, 29896, 29906, 29947, 1495, 13, 1555, 353, 1700, 29918, 6289, 29961, 29900, 22322, 1555, 13359, 7411, 580, 13, 6914, 29918, 3166, 353, 4842, 305, 29889, 20158, 4197, 29900, 29889, 29900, 29892, 29871, 29896, 29889, 29900, 29892, 448, 29906, 29889, 29945, 2314, 13, 13, 29878, 353, 9596, 29883, 1901, 3552, 29896, 29906, 29947, 29892, 29871, 29896, 29906, 29947, 29892, 29871, 29896, 29906, 29947, 511, 313, 29906, 29946, 29900, 29892, 29871, 29906, 29946, 29900, 511, 29871, 29896, 29906, 29947, 29892, 432, 5171, 29922, 8824, 29897, 13, 13, 2158, 29898, 29888, 29915, 29912, 1555, 29889, 12181, 29922, 1118, 426, 1555, 29889, 1195, 580, 29922, 1118, 426, 1555, 29889, 3317, 580, 29922, 29913, 1495, 13, 2158, 29898, 29888, 29915, 29912, 13264, 29889, 12181, 29922, 1118, 426, 13264, 29889, 1195, 580, 29922, 1118, 426, 13264, 29889, 3317, 580, 29922, 29913, 1495, 13, 13, 361, 4770, 978, 1649, 1275, 525, 1649, 3396, 1649, 2396, 13, 1678, 396, 1700, 4619, 4842, 305, 29889, 9502, 29876, 29918, 4561, 29898, 1555, 29897, 334, 29871, 29900, 29889, 29896, 13, 1678, 1700, 353, 1700, 29889, 517, 877, 29883, 6191, 2824, 7411, 2141, 276, 339, 2658, 29918, 5105, 23538, 5574, 29897, 13, 1678, 15886, 353, 15886, 29889, 517, 877, 29883, 6191, 2824, 7411, 2141, 276, 339, 2658, 29918, 5105, 23538, 5574, 29897, 13, 1678, 1106, 29918, 3166, 353, 1106, 29918, 3166, 29889, 517, 877, 29883, 6191, 2824, 7411, 2141, 276, 339, 2658, 29918, 5105, 23538, 8824, 29897, 13, 1678, 3646, 353, 4842, 305, 29889, 1359, 877, 5182, 29889, 415, 2824, 7411, 2141, 517, 877, 29883, 6191, 1495, 13, 1678, 396, 1243, 353, 4656, 3198, 29898, 29878, 29892, 518, 1555, 29892, 15886, 29892, 1106, 29918, 3166, 1402, 321, 567, 29922, 29896, 29872, 29899, 29941, 29892, 472, 324, 29922, 29896, 29872, 29899, 29941, 29892, 1423, 29918, 11333, 29918, 328, 29922, 8824, 29892, 5172, 29918, 8513, 29922, 5574, 29892, 12020, 29918, 11739, 29922, 5574, 29892, 302, 898, 300, 29918, 25027, 29922, 29896, 29872, 29899, 29906, 29897, 13, 1678, 396, 1596, 29898, 1688, 29897, 13, 1678, 620, 29918, 14369, 353, 364, 29898, 1555, 29892, 15886, 29892, 1106, 29918, 3166, 29897, 13, 1678, 1596, 29898, 29888, 29915, 29912, 690, 29918, 14369, 29889, 12181, 29922, 29913, 1495, 13, 1678, 620, 29918, 16175, 287, 353, 364, 29898, 7345, 305, 29889, 1429, 4197, 1555, 29962, 334, 29871, 29906, 511, 4842, 305, 29889, 1429, 4197, 13264, 29962, 334, 29871, 29906, 511, 4842, 305, 29889, 1429, 4197, 6914, 29918, 3166, 29892, 1106, 29918, 3166, 718, 29871, 29896, 29889, 29900, 12622, 13, 1678, 1596, 29898, 29888, 29915, 29912, 690, 29918, 16175, 287, 29889, 12181, 29922, 29913, 1495, 13, 1678, 1596, 29898, 29888, 29915, 9843, 29973, 8001, 690, 29918, 14369, 1275, 620, 29918, 16175, 287, 29889, 29879, 802, 29872, 911, 29898, 29900, 8106, 497, 28296, 1495, 13, 1678, 396, 4078, 29918, 3027, 29898, 690, 29918, 14369, 29892, 525, 690, 29918, 14369, 29889, 2732, 1495, 13, 1678, 396, 4078, 29918, 3027, 29898, 690, 29918, 16175, 287, 29961, 29900, 1402, 525, 690, 29918, 16175, 287, 29900, 29889, 2732, 1495, 13, 1678, 396, 4078, 29918, 3027, 29898, 690, 29918, 16175, 287, 29961, 29896, 1402, 29915, 690, 29918, 16175, 287, 29896, 29889, 2732, 1495, 13, 13, 1678, 3523, 353, 4842, 305, 29889, 20640, 29889, 3253, 314, 4197, 1555, 29892, 15886, 2314, 13, 1678, 3523, 29889, 9171, 29918, 5105, 580, 13, 1678, 620, 353, 364, 29898, 1555, 29892, 15886, 29892, 1106, 29918, 3166, 29897, 13, 1678, 6410, 353, 4842, 305, 29889, 15755, 29889, 2220, 284, 29889, 29885, 344, 29918, 6758, 29898, 690, 29892, 3646, 29897, 13, 1678, 6410, 29889, 1627, 1328, 580, 13, 1678, 1596, 29898, 29888, 29915, 29903, 4214, 1307, 448, 2683, 2683, 29899, 1495, 13, 1678, 1596, 29898, 29888, 29915, 29912, 6758, 29922, 29913, 1495, 13, 1678, 1596, 29898, 29888, 29915, 29912, 1555, 29889, 5105, 29889, 12181, 29922, 1118, 29871, 426, 1555, 29889, 5105, 29889, 6897, 2141, 3317, 580, 29922, 29913, 1495, 13, 1678, 1596, 29898, 29888, 29915, 29912, 13264, 29889, 5105, 29889, 12181, 29922, 1118, 29871, 426, 13264, 29889, 5105, 29889, 6897, 2141, 3317, 580, 29922, 29913, 1495, 13, 1678, 1700, 29918, 5105, 353, 1700, 29889, 5105, 29889, 16513, 580, 13, 1678, 15886, 29918, 5105, 353, 15886, 29889, 5105, 29889, 16513, 580, 13, 13, 1678, 3523, 29889, 9171, 29918, 5105, 580, 13, 1678, 620, 353, 364, 29898, 7345, 305, 29889, 1429, 4197, 1555, 29962, 334, 29871, 29946, 511, 4842, 305, 29889, 1429, 4197, 13264, 29962, 334, 29871, 29946, 511, 4842, 305, 29889, 1429, 4197, 6914, 29918, 3166, 29962, 334, 29871, 29946, 876, 13, 1678, 6410, 353, 4842, 305, 29889, 15755, 29889, 2220, 284, 29889, 29885, 344, 29918, 6758, 29898, 690, 29892, 4842, 305, 29889, 1429, 4197, 5182, 29962, 334, 29871, 29946, 876, 13, 1678, 6410, 29889, 1627, 1328, 580, 13, 1678, 1596, 29898, 29888, 29915, 29933, 14789, 3352, 448, 2683, 2683, 29899, 1495, 13, 1678, 1596, 29898, 29888, 29915, 29912, 6758, 29922, 29913, 1495, 13, 1678, 1596, 29898, 29888, 29915, 29912, 1555, 29889, 5105, 29889, 12181, 29922, 1118, 29871, 426, 1555, 29889, 5105, 29889, 6897, 2141, 3317, 580, 29922, 29913, 1495, 13, 1678, 1596, 29898, 29888, 29915, 29912, 13264, 29889, 5105, 29889, 12181, 29922, 1118, 29871, 426, 13264, 29889, 5105, 29889, 6897, 2141, 3317, 580, 29922, 29913, 1495, 13, 13, 1678, 1596, 29898, 29888, 29915, 21514, 29909, 1525, 448, 2683, 2683, 29899, 1495, 13, 1678, 1596, 29898, 29888, 29915, 13072, 19295, 10070, 5186, 29973, 426, 7345, 305, 29889, 497, 5358, 29898, 1555, 29889, 5105, 29892, 1700, 29918, 5105, 29892, 472, 324, 29922, 29896, 29872, 29899, 29945, 29892, 364, 25027, 29922, 29896, 29872, 29899, 29941, 2915, 1495, 13, 1678, 1596, 29898, 29888, 29915, 8969, 19295, 10070, 5186, 29973, 426, 7345, 305, 29889, 497, 5358, 29898, 13264, 29889, 5105, 29892, 15886, 29918, 5105, 29892, 472, 324, 29922, 29896, 29872, 29899, 29945, 29892, 364, 25027, 29922, 29896, 29872, 29899, 29941, 2915, 1495, 13, 1678, 396, 3523, 353, 4842, 305, 29889, 20640, 29889, 3253, 314, 4197, 1555, 29892, 15886, 2314, 13, 1678, 396, 363, 474, 297, 3464, 29898, 29896, 29900, 29900, 1125, 13, 1678, 396, 268, 3523, 29889, 9171, 29918, 5105, 580, 13, 1678, 396, 268, 620, 353, 364, 29898, 1555, 29892, 15886, 29892, 1106, 29918, 3166, 29897, 13, 1678, 396, 268, 6410, 353, 4842, 305, 29889, 15755, 29889, 2220, 284, 29889, 29885, 344, 29918, 6758, 29898, 690, 29892, 3646, 29897, 13, 1678, 396, 268, 6410, 29889, 1627, 1328, 580, 13, 1678, 396, 268, 4078, 29918, 3027, 29898, 690, 29892, 285, 29915, 1688, 29914, 9482, 648, 29875, 29901, 29900, 29941, 29881, 1836, 2732, 1495, 13, 1678, 396, 268, 1596, 29898, 29888, 29915, 14448, 426, 29875, 29901, 29900, 29941, 29881, 29913, 448, 2683, 2683, 29899, 1495, 13, 1678, 396, 268, 1596, 29898, 29888, 29915, 29912, 6758, 29922, 29913, 1495, 13, 1678, 396, 268, 1596, 29898, 29888, 29915, 29912, 1555, 29889, 5105, 29889, 6897, 2141, 3317, 580, 29922, 29913, 1495, 13, 1678, 396, 268, 1596, 29898, 29888, 29915, 29912, 13264, 29889, 5105, 29889, 6897, 2141, 3317, 580, 29922, 29913, 1495, 13, 1678, 396, 268, 3523, 29889, 10568, 580, 13, 2 ]
eots/serializers.py
lextoumbourou/eyeofthestorm
0
93132
<reponame>lextoumbourou/eyeofthestorm<filename>eots/serializers.py """ Eventually we'll probably want to add some decent serialization support. For now - this is a pass through. Patches accepted :) """ class Serializer(object): def serialize(cls, obj): return obj def is_valid(self): return True
[ 1, 529, 276, 1112, 420, 29958, 280, 486, 283, 29885, 6526, 283, 29914, 1032, 29872, 974, 386, 342, 555, 29966, 9507, 29958, 29872, 1862, 29914, 15550, 19427, 29889, 2272, 13, 15945, 29908, 13, 2624, 1474, 591, 29915, 645, 3117, 864, 304, 788, 777, 27189, 7797, 2133, 2304, 29889, 13, 13, 2831, 1286, 448, 445, 338, 263, 1209, 1549, 29889, 349, 905, 267, 9259, 4248, 13, 15945, 29908, 13, 13, 1990, 18896, 3950, 29898, 3318, 1125, 13, 1678, 822, 28755, 29898, 25932, 29892, 5446, 1125, 13, 4706, 736, 5446, 13, 13, 1678, 822, 338, 29918, 3084, 29898, 1311, 1125, 13, 4706, 736, 5852, 13, 2 ]
StatM/__init__.py
Blaizzy/Boring_weekends
3
107040
from StatM import Bisection, Regula_Falsi, Secant
[ 1, 515, 6666, 29924, 1053, 350, 895, 428, 29892, 2169, 2497, 29918, 29943, 284, 1039, 29892, 5356, 424, 13, 2 ]
util.py
mobarski/smash
0
176152
import re def flag(value): "convert value to integer bool type" s = str(value).strip().lower() is_true = s in "yes y true t on 1".split(' ') return int(is_true) def join(lst,dlm='',fmt="{0}",strip=True): if strip: lst = [x.strip() if hasattr(x,"strip") else x for x in lst] return dlm.join([fmt.format(x) for x in lst]) # TODO pipetools clone NEW SANDBOX class pipe(object): def __pipe__(self,*args,**kwargs): print("__pipe__",args,kwargs) def __call__(self,*args,**kwargs): print("__call__",args,kwargs) ### def _sub(x,fmt): a = re.subn('[$][$]','_#D0LaR#_',fmt)[0] b = re.subn('[$]',x,a)[0] c = re.subn('_#D0LaR#_','$',b)[0] return c def get(name,split=None,join=None,fmt=None): raw = "1 2 \r\n 3 4" # TODO if split == None: after_split = raw elif callable(split): after_split = split(raw) elif type(split) == str: after_split = re.split(split, raw) else: raise if fmt == None: after_fmt = after_split else: after_fmt = [_sub(x,fmt) for x in after_split] if join == None: after_join = after_fmt else: after_join = join.join(after_fmt) return after_join if __name__=="__main__": #print(get('x','\s+','\n,','string(s.$) as new_$')) #print(flag('off')) pass
[ 1, 1053, 337, 13, 13, 1753, 7353, 29898, 1767, 1125, 13, 12, 29908, 13441, 995, 304, 6043, 6120, 1134, 29908, 13, 12, 29879, 353, 851, 29898, 1767, 467, 17010, 2141, 13609, 580, 13, 12, 275, 29918, 3009, 353, 269, 297, 376, 3582, 343, 1565, 260, 373, 29871, 29896, 1642, 5451, 877, 25710, 13, 12, 2457, 938, 29898, 275, 29918, 3009, 29897, 13, 13, 1753, 5988, 29898, 20155, 29892, 11671, 29885, 2433, 742, 23479, 10724, 29900, 17671, 17010, 29922, 5574, 1125, 13, 12, 361, 17820, 29901, 13, 12, 12, 20155, 353, 518, 29916, 29889, 17010, 580, 565, 756, 5552, 29898, 29916, 1699, 17010, 1159, 1683, 921, 363, 921, 297, 24471, 29962, 13, 12, 2457, 270, 21457, 29889, 7122, 4197, 23479, 29889, 4830, 29898, 29916, 29897, 363, 921, 297, 24471, 2314, 13, 13, 29937, 14402, 8450, 300, 8789, 17432, 29091, 317, 2190, 4051, 29949, 29990, 13, 1990, 14282, 29898, 3318, 1125, 13, 12, 1753, 4770, 17760, 12035, 1311, 29892, 29930, 5085, 29892, 1068, 19290, 1125, 13, 12, 12, 2158, 703, 1649, 17760, 1649, 613, 5085, 29892, 19290, 29897, 13, 12, 1753, 4770, 4804, 12035, 1311, 29892, 29930, 5085, 29892, 1068, 19290, 1125, 13, 12, 12, 2158, 703, 1649, 4804, 1649, 613, 5085, 29892, 19290, 29897, 13, 2277, 29937, 13, 13, 1753, 903, 1491, 29898, 29916, 29892, 23479, 1125, 13, 12, 29874, 353, 337, 29889, 1491, 29876, 877, 8308, 3816, 29938, 29962, 3788, 29918, 29937, 29928, 29900, 5661, 29934, 29937, 29918, 742, 23479, 9601, 29900, 29962, 13, 12, 29890, 353, 337, 29889, 1491, 29876, 877, 8308, 29962, 742, 29916, 29892, 29874, 9601, 29900, 29962, 13, 12, 29883, 353, 337, 29889, 1491, 29876, 877, 29918, 29937, 29928, 29900, 5661, 29934, 29937, 29918, 3788, 29938, 742, 29890, 9601, 29900, 29962, 13, 12, 2457, 274, 13, 13, 1753, 679, 29898, 978, 29892, 5451, 29922, 8516, 29892, 7122, 29922, 8516, 29892, 23479, 29922, 8516, 1125, 13, 12, 1610, 353, 376, 29896, 259, 29906, 259, 320, 29878, 29905, 29876, 29871, 29941, 29871, 29946, 29908, 396, 14402, 13, 12, 361, 6219, 1275, 6213, 29901, 13, 12, 12, 7045, 29918, 5451, 353, 10650, 13, 12, 23681, 1246, 519, 29898, 5451, 1125, 13, 12, 12, 7045, 29918, 5451, 353, 6219, 29898, 1610, 29897, 13, 12, 23681, 1134, 29898, 5451, 29897, 1275, 851, 29901, 13, 12, 12, 7045, 29918, 5451, 353, 337, 29889, 5451, 29898, 5451, 29892, 10650, 29897, 13, 12, 2870, 29901, 13, 12, 12, 22692, 13, 12, 361, 19200, 1275, 6213, 29901, 13, 12, 12, 7045, 29918, 23479, 353, 1156, 29918, 5451, 13, 12, 2870, 29901, 13, 12, 12, 7045, 29918, 23479, 353, 23160, 1491, 29898, 29916, 29892, 23479, 29897, 363, 921, 297, 1156, 29918, 5451, 29962, 13, 12, 361, 5988, 1275, 6213, 29901, 13, 12, 12, 7045, 29918, 7122, 353, 1156, 29918, 23479, 13, 12, 2870, 29901, 13, 12, 12, 7045, 29918, 7122, 353, 5988, 29889, 7122, 29898, 7045, 29918, 23479, 29897, 13, 12, 2457, 1156, 29918, 7122, 13, 13, 361, 4770, 978, 1649, 26359, 1649, 3396, 1649, 1115, 13, 12, 29937, 2158, 29898, 657, 877, 29916, 3788, 29905, 29879, 29974, 3788, 29905, 29876, 29892, 3788, 1807, 29898, 29879, 7449, 29897, 408, 716, 29918, 29938, 8785, 13, 12, 29937, 2158, 29898, 15581, 877, 2696, 8785, 13, 12, 3364, 13, 2 ]
lib/datamanager/samplerbase.py
chenyanghungry/person-reid-lib
81
62305
<reponame>chenyanghungry/person-reid-lib<gh_stars>10-100 from torch.utils.data.sampler import Sampler import numpy as np class SamplerBase(Sampler): def __init__(self, data_info, instance_num, sample_num, sample_len, npr): super().__init__(data_info) self.npr = npr self.data_info = data_info.copy() self.person_num = np.unique(self.data_info[:, 0]).size self.frames_len_min = np.min(self.data_info[:, 4]) self.frames_len_max = np.max(self.data_info[:, 4]) self.instance_num = instance_num self.sample_num = sample_num self.sample_len = sample_len if self.frames_len_max == 1 and self.frames_len_min == 1: self._process_raw_data = self._process_raw_image_data else: self._process_raw_data = self._process_raw_video_data self.init() def init(self): raise NotImplementedError def _process_raw_image_data(self, tracklet): output = [] for track_i in tracklet: track_info = [track_i[0], track_i[1], track_i[2]] # person id, cam_id, img_idx output.append(track_info) return output def _process_raw_video_data(self, tracklet): output = [] for track_i in tracklet: track_info = [track_i[0], track_i[1]] # person id, cam_id track_i_begin = track_i[2] track_i_raw_len = track_i[4] track_i_sample_len = min(track_i_raw_len, self.sample_len) track_i_start_id = self.npr.random_integers(0, track_i_raw_len - track_i_sample_len) track_i_sample_begin = track_i_begin + track_i_start_id track_i_sample_end = track_i_begin + track_i_start_id + track_i_sample_len track_info.extend(list(range(track_i_sample_begin, track_i_sample_end))) output.append(track_info) return output def __len__(self): return self._len
[ 1, 529, 276, 1112, 420, 29958, 2724, 29891, 574, 29882, 348, 14793, 29914, 10532, 29899, 276, 333, 29899, 1982, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29900, 29899, 29896, 29900, 29900, 13, 3166, 4842, 305, 29889, 13239, 29889, 1272, 29889, 13445, 20069, 1053, 3685, 20069, 13, 5215, 12655, 408, 7442, 13, 13, 13, 1990, 3685, 20069, 5160, 29898, 22966, 20069, 1125, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 848, 29918, 3888, 29892, 2777, 29918, 1949, 29892, 4559, 29918, 1949, 29892, 4559, 29918, 2435, 29892, 302, 558, 1125, 13, 4706, 2428, 2141, 1649, 2344, 12035, 1272, 29918, 3888, 29897, 13, 4706, 1583, 29889, 29876, 558, 353, 302, 558, 13, 13, 4706, 1583, 29889, 1272, 29918, 3888, 353, 848, 29918, 3888, 29889, 8552, 580, 13, 4706, 1583, 29889, 10532, 29918, 1949, 353, 7442, 29889, 13092, 29898, 1311, 29889, 1272, 29918, 3888, 7503, 29892, 29871, 29900, 14664, 2311, 13, 4706, 1583, 29889, 19935, 29918, 2435, 29918, 1195, 353, 7442, 29889, 1195, 29898, 1311, 29889, 1272, 29918, 3888, 7503, 29892, 29871, 29946, 2314, 13, 4706, 1583, 29889, 19935, 29918, 2435, 29918, 3317, 353, 7442, 29889, 3317, 29898, 1311, 29889, 1272, 29918, 3888, 7503, 29892, 29871, 29946, 2314, 13, 13, 4706, 1583, 29889, 8758, 29918, 1949, 353, 2777, 29918, 1949, 13, 4706, 1583, 29889, 11249, 29918, 1949, 353, 4559, 29918, 1949, 13, 4706, 1583, 29889, 11249, 29918, 2435, 353, 4559, 29918, 2435, 13, 13, 4706, 565, 1583, 29889, 19935, 29918, 2435, 29918, 3317, 1275, 29871, 29896, 322, 1583, 29889, 19935, 29918, 2435, 29918, 1195, 1275, 29871, 29896, 29901, 13, 9651, 1583, 3032, 5014, 29918, 1610, 29918, 1272, 353, 1583, 3032, 5014, 29918, 1610, 29918, 3027, 29918, 1272, 13, 4706, 1683, 29901, 13, 9651, 1583, 3032, 5014, 29918, 1610, 29918, 1272, 353, 1583, 3032, 5014, 29918, 1610, 29918, 9641, 29918, 1272, 13, 13, 4706, 1583, 29889, 2344, 580, 13, 13, 1678, 822, 2069, 29898, 1311, 1125, 13, 4706, 12020, 2216, 1888, 2037, 287, 2392, 13, 13, 1678, 822, 903, 5014, 29918, 1610, 29918, 3027, 29918, 1272, 29898, 1311, 29892, 5702, 1026, 1125, 13, 4706, 1962, 353, 5159, 13, 4706, 363, 5702, 29918, 29875, 297, 5702, 1026, 29901, 13, 9651, 5702, 29918, 3888, 353, 518, 11294, 29918, 29875, 29961, 29900, 1402, 5702, 29918, 29875, 29961, 29896, 1402, 5702, 29918, 29875, 29961, 29906, 5262, 29871, 396, 2022, 1178, 29892, 3949, 29918, 333, 29892, 10153, 29918, 13140, 13, 9651, 1962, 29889, 4397, 29898, 11294, 29918, 3888, 29897, 13, 4706, 736, 1962, 13, 13, 1678, 822, 903, 5014, 29918, 1610, 29918, 9641, 29918, 1272, 29898, 1311, 29892, 5702, 1026, 1125, 13, 4706, 1962, 353, 5159, 13, 4706, 363, 5702, 29918, 29875, 297, 5702, 1026, 29901, 13, 9651, 5702, 29918, 3888, 353, 518, 11294, 29918, 29875, 29961, 29900, 1402, 5702, 29918, 29875, 29961, 29896, 5262, 29871, 396, 2022, 1178, 29892, 3949, 29918, 333, 13, 13, 9651, 5702, 29918, 29875, 29918, 463, 353, 5702, 29918, 29875, 29961, 29906, 29962, 13, 9651, 5702, 29918, 29875, 29918, 1610, 29918, 2435, 353, 5702, 29918, 29875, 29961, 29946, 29962, 13, 9651, 5702, 29918, 29875, 29918, 11249, 29918, 2435, 353, 1375, 29898, 11294, 29918, 29875, 29918, 1610, 29918, 2435, 29892, 1583, 29889, 11249, 29918, 2435, 29897, 13, 9651, 5702, 29918, 29875, 29918, 2962, 29918, 333, 353, 1583, 29889, 29876, 558, 29889, 8172, 29918, 6693, 5743, 29898, 29900, 29892, 5702, 29918, 29875, 29918, 1610, 29918, 2435, 448, 5702, 29918, 29875, 29918, 11249, 29918, 2435, 29897, 13, 9651, 5702, 29918, 29875, 29918, 11249, 29918, 463, 353, 5702, 29918, 29875, 29918, 463, 718, 5702, 29918, 29875, 29918, 2962, 29918, 333, 13, 9651, 5702, 29918, 29875, 29918, 11249, 29918, 355, 353, 5702, 29918, 29875, 29918, 463, 718, 5702, 29918, 29875, 29918, 2962, 29918, 333, 718, 5702, 29918, 29875, 29918, 11249, 29918, 2435, 13, 9651, 5702, 29918, 3888, 29889, 21843, 29898, 1761, 29898, 3881, 29898, 11294, 29918, 29875, 29918, 11249, 29918, 463, 29892, 5702, 29918, 29875, 29918, 11249, 29918, 355, 4961, 13, 9651, 1962, 29889, 4397, 29898, 11294, 29918, 3888, 29897, 13, 4706, 736, 1962, 13, 13, 1678, 822, 4770, 2435, 12035, 1311, 1125, 13, 4706, 736, 1583, 3032, 2435, 13, 13, 13, 13, 2 ]
components/shelly/sensor.py
tefinger/hass
0
191331
""" Shelly platform for the sensor component. For more details about this platform, please refer to the documentation https://home-assistant.io/components/shelly/ """ import logging from homeassistant.const import (DEVICE_CLASS_HUMIDITY, DEVICE_CLASS_TEMPERATURE, TEMP_CELSIUS, POWER_WATT) from homeassistant.helpers.entity import Entity from . import (CONF_OBJECT_ID_PREFIX, SHELLY_CONFIG, ShellyDevice, get_device_from_hass, ShellyBlock, get_block_from_hass) _LOGGER = logging.getLogger(__name__) SENSOR_TYPE_TEMPERATURE = 'temp' SENSOR_TYPE_HUMIDITY = 'humidity' SENSOR_TYPE_POWER = 'watt' SENSOR_TYPE_RSSI = 'rssi' SENSOR_TYPE_UPTIME = 'uptime' SENSOR_TYPE_BATTERY = 'battery' SENSOR_TYPES = { SENSOR_TYPE_TEMPERATURE: ['Temperature', TEMP_CELSIUS, None, DEVICE_CLASS_TEMPERATURE], SENSOR_TYPE_HUMIDITY: ['Humidity', '%', None, DEVICE_CLASS_HUMIDITY], SENSOR_TYPE_POWER: ['Power', POWER_WATT, None, None], SENSOR_TYPE_RSSI: ['RSSI', 'dB', 'mdi:wifi', None], SENSOR_TYPE_UPTIME: ['Uptime', 's', 'mdi:timer', None], SENSOR_TYPE_BATTERY: ['Battery', '%', 'mdi:battery-50', None] } def setup_platform(hass, _config, add_devices, discovery_info=None): """Setup the Shelly Sensor platform.""" if 'version' in discovery_info: add_devices([ShellyVersion(hass, discovery_info.get('version'), discovery_info.get('pyShellyVersion'))]) return if 'rssi' in discovery_info: block = get_block_from_hass(hass, discovery_info) add_devices([ ShellyInfoSensor(block, hass, SENSOR_TYPE_RSSI, 'rssi') ]) return if 'uptime' in discovery_info: block = get_block_from_hass(hass, discovery_info) add_devices([ ShellyInfoSensor(block, hass, SENSOR_TYPE_UPTIME, 'uptime') ]) return dev = get_device_from_hass(hass, discovery_info) if dev.device_type == "POWERMETER": add_devices([ ShellySensor(dev, hass, SENSOR_TYPE_POWER, 'watt'), ]) elif dev.device_type == "SENSOR": add_devices([ ShellySensor(dev, hass, SENSOR_TYPE_TEMPERATURE, 'temperature'), ShellySensor(dev, hass, SENSOR_TYPE_HUMIDITY, 'humidity'), ShellySensor(dev, hass, SENSOR_TYPE_BATTERY, 'battery') ]) class ShellySensor(ShellyDevice, Entity): """Representation of a Shelly Sensor.""" def __init__(self, dev, hass, sensor_type, sensor_name): """Initialize an ShellySwitch.""" ShellyDevice.__init__(self, dev, hass) self._unique_id += "_" + sensor_name self.entity_id += "_" + sensor_name self._sensor_type = sensor_type self._sensor_name = sensor_name self._battery = None self._state = None self.update() @property def state(self): """Return the state of the sensor.""" return self._state @property def quantity_name(self): """Name of quantity.""" return SENSOR_TYPES[self._sensor_type][0] \ if self._sensor_type in SENSOR_TYPES else None @property def unit_of_measurement(self): """Return the unit of measurement.""" return SENSOR_TYPES[self._sensor_type][1] \ if self._sensor_type in SENSOR_TYPES else None @property def icon(self): """Return the icon.""" return SENSOR_TYPES[self._sensor_type][2] \ if self._sensor_type in SENSOR_TYPES else None @property def device_class(self): """Return the device class.""" return SENSOR_TYPES[self._sensor_type][3] \ if self._sensor_type in SENSOR_TYPES else None def update(self): """Fetch new state data for this sensor.""" if self._dev.sensor_values is not None: self._state = self._dev.sensor_values.get(self._sensor_name, None) self._battery = self._dev.sensor_values.get('battery', None) @property def device_state_attributes(self): attr = super(ShellySensor, self).device_state_attributes if self._battery is not None: attr["battery"] = str(self._battery) + '%' return attr class ShellyInfoSensor(ShellyBlock, Entity): """Representation of a Shelly Info Sensor.""" def __init__(self, block, hass, sensor_type, sensor_name): ShellyBlock.__init__(self, block, hass, "_" + sensor_name) self.entity_id = "sensor" + self.entity_id self._sensor_name = sensor_name self._sensor_type = sensor_type self._state = None self.update() def update(self): """Fetch new state data for this sensor.""" if self._block.info_values is not None: self._state = self._block.info_values.get(self._sensor_name, None) #if self._block.sensor_values is not None: # self._battery = self._block.sensor_values.get('battery', None) @property def state(self): """Return the state of the sensor.""" return self._state def quantity_name(self): """Name of quantity.""" return SENSOR_TYPES[self._sensor_type][0] \ if self._sensor_type in SENSOR_TYPES else None @property def unit_of_measurement(self): """Return the unit of measurement.""" return SENSOR_TYPES[self._sensor_type][1] \ if self._sensor_type in SENSOR_TYPES else None @property def icon(self): """Return the icon.""" return SENSOR_TYPES[self._sensor_type][2] \ if self._sensor_type in SENSOR_TYPES else None @property def device_state_attributes(self): return None class ShellyVersion(Entity): """Representation of a Shelly version sensor.""" def __init__(self, hass, version, py_shelly_version): """Initialize the Version sensor.""" conf = hass.data[SHELLY_CONFIG] id_prefix = conf.get(CONF_OBJECT_ID_PREFIX) self._version = version self._py_shelly_version = py_shelly_version self.entity_id = "sensor." + id_prefix + "_version" self._name = "Shelly version" @property def name(self): """Return the name of the sensor.""" return 'Shelly version' @property def state(self): """Return the state of the sensor.""" return self._version + "/" + self._py_shelly_version @property def device_state_attributes(self): """Return attributes for the sensor.""" return {'shelly': self._version, 'pyShelly': self._py_shelly_version} @property def icon(self): """Return the icon to use in the frontend, if any.""" return None
[ 1, 9995, 30004, 13, 2713, 14112, 7481, 363, 278, 23530, 4163, 22993, 13, 30004, 13, 2831, 901, 4902, 1048, 445, 7481, 29892, 3113, 2737, 304, 278, 5106, 30004, 13, 991, 597, 5184, 29899, 465, 22137, 29889, 601, 29914, 14036, 29914, 845, 14112, 29914, 30004, 13, 15945, 19451, 13, 30004, 13, 5215, 12183, 30004, 13, 30004, 13, 3166, 3271, 465, 22137, 29889, 3075, 1053, 313, 2287, 19059, 29918, 13875, 1799, 29918, 29950, 5005, 1367, 11937, 11167, 13, 462, 462, 5012, 19059, 29918, 13875, 1799, 29918, 4330, 3580, 1001, 1299, 11499, 11167, 13, 462, 462, 17067, 3580, 29918, 4741, 29931, 5425, 3308, 29892, 349, 9806, 1001, 29918, 29956, 1299, 29911, 8443, 13, 3166, 3271, 465, 22137, 29889, 3952, 6774, 29889, 10041, 1053, 14945, 30004, 13, 30004, 13, 3166, 869, 1053, 313, 6007, 29943, 29918, 14824, 17637, 29918, 1367, 29918, 15094, 25634, 29892, 317, 9606, 2208, 29979, 29918, 25903, 11167, 13, 1669, 1383, 14112, 11501, 29892, 679, 29918, 10141, 29918, 3166, 29918, 29882, 465, 11167, 13, 1669, 1383, 14112, 7445, 29892, 679, 29918, 1271, 29918, 3166, 29918, 29882, 465, 8443, 13, 30004, 13, 29918, 14480, 17070, 353, 12183, 29889, 657, 16363, 22168, 978, 1649, 8443, 13, 30004, 13, 29903, 1430, 29903, 1955, 29918, 11116, 29918, 4330, 3580, 1001, 1299, 11499, 353, 525, 7382, 29915, 30004, 13, 29903, 1430, 29903, 1955, 29918, 11116, 29918, 29950, 5005, 1367, 11937, 353, 525, 16063, 333, 537, 29915, 30004, 13, 29903, 1430, 29903, 1955, 29918, 11116, 29918, 29925, 9806, 1001, 353, 525, 29893, 1131, 29915, 30004, 13, 29903, 1430, 29903, 1955, 29918, 11116, 29918, 29934, 1799, 29902, 353, 525, 29878, 893, 29875, 29915, 30004, 13, 29903, 1430, 29903, 1955, 29918, 11116, 29918, 4897, 15307, 353, 525, 21245, 603, 29915, 30004, 13, 29903, 1430, 29903, 1955, 29918, 11116, 29918, 29933, 1299, 4945, 29979, 353, 525, 29890, 2620, 29891, 29915, 30004, 13, 30004, 13, 29903, 1430, 29903, 1955, 29918, 15631, 29925, 2890, 353, 3336, 13, 1678, 317, 1430, 29903, 1955, 29918, 11116, 29918, 4330, 3580, 1001, 1299, 11499, 29901, 30004, 13, 4706, 6024, 5776, 546, 1535, 742, 17067, 3580, 29918, 4741, 29931, 5425, 3308, 29892, 6213, 29892, 5012, 19059, 29918, 13875, 1799, 29918, 4330, 3580, 1001, 1299, 11499, 1402, 30004, 13, 1678, 317, 1430, 29903, 1955, 29918, 11116, 29918, 29950, 5005, 1367, 11937, 29901, 30004, 13, 4706, 6024, 29950, 398, 333, 537, 742, 14210, 742, 6213, 29892, 5012, 19059, 29918, 13875, 1799, 29918, 29950, 5005, 1367, 11937, 1402, 30004, 13, 1678, 317, 1430, 29903, 1955, 29918, 11116, 29918, 29925, 9806, 1001, 29901, 30004, 13, 4706, 6024, 21472, 742, 349, 9806, 1001, 29918, 29956, 1299, 29911, 29892, 6213, 29892, 6213, 1402, 30004, 13, 1678, 317, 1430, 29903, 1955, 29918, 11116, 29918, 29934, 1799, 29902, 29901, 30004, 13, 4706, 6024, 29934, 1799, 29902, 742, 525, 29881, 29933, 742, 525, 3487, 29875, 29901, 29893, 6832, 742, 6213, 1402, 30004, 13, 1678, 317, 1430, 29903, 1955, 29918, 11116, 29918, 4897, 15307, 29901, 30004, 13, 4706, 6024, 29965, 415, 603, 742, 525, 29879, 742, 525, 3487, 29875, 29901, 20404, 742, 6213, 1402, 30004, 13, 1678, 317, 1430, 29903, 1955, 29918, 11116, 29918, 29933, 1299, 4945, 29979, 29901, 30004, 13, 4706, 6024, 29933, 2620, 29891, 742, 14210, 742, 525, 3487, 29875, 29901, 29890, 2620, 29891, 29899, 29945, 29900, 742, 6213, 29962, 30004, 13, 8117, 13, 30004, 13, 1753, 6230, 29918, 12120, 29898, 29882, 465, 29892, 903, 2917, 29892, 788, 29918, 3359, 1575, 29892, 20699, 29918, 3888, 29922, 8516, 1125, 30004, 13, 1678, 9995, 26947, 278, 1383, 14112, 317, 6073, 7481, 1213, 15945, 30004, 13, 1678, 565, 525, 3259, 29915, 297, 20699, 29918, 3888, 29901, 30004, 13, 4706, 788, 29918, 3359, 1575, 4197, 2713, 14112, 6594, 29898, 29882, 465, 29892, 20699, 29918, 3888, 29889, 657, 877, 3259, 5477, 30004, 13, 462, 462, 259, 20699, 29918, 3888, 29889, 657, 877, 2272, 2713, 14112, 6594, 8785, 2314, 30004, 13, 4706, 736, 30004, 13, 30004, 13, 1678, 565, 525, 29878, 893, 29875, 29915, 297, 20699, 29918, 3888, 29901, 30004, 13, 4706, 2908, 353, 679, 29918, 1271, 29918, 3166, 29918, 29882, 465, 29898, 29882, 465, 29892, 20699, 29918, 3888, 8443, 13, 4706, 788, 29918, 3359, 1575, 4197, 30004, 13, 9651, 1383, 14112, 3401, 29903, 6073, 29898, 1271, 29892, 298, 465, 29892, 317, 1430, 29903, 1955, 29918, 11116, 29918, 29934, 1799, 29902, 29892, 525, 29878, 893, 29875, 1495, 30004, 13, 308, 2314, 30004, 13, 4706, 736, 30004, 13, 30004, 13, 1678, 565, 525, 21245, 603, 29915, 297, 20699, 29918, 3888, 29901, 30004, 13, 4706, 2908, 353, 679, 29918, 1271, 29918, 3166, 29918, 29882, 465, 29898, 29882, 465, 29892, 20699, 29918, 3888, 8443, 13, 4706, 788, 29918, 3359, 1575, 4197, 30004, 13, 9651, 1383, 14112, 3401, 29903, 6073, 29898, 1271, 29892, 298, 465, 29892, 317, 1430, 29903, 1955, 29918, 11116, 29918, 4897, 15307, 29892, 525, 21245, 603, 1495, 30004, 13, 308, 2314, 30004, 13, 4706, 736, 30004, 13, 30004, 13, 1678, 2906, 353, 679, 29918, 10141, 29918, 3166, 29918, 29882, 465, 29898, 29882, 465, 29892, 20699, 29918, 3888, 8443, 13, 30004, 13, 1678, 565, 2906, 29889, 10141, 29918, 1853, 1275, 376, 29925, 9806, 1001, 2303, 4945, 1115, 30004, 13, 4706, 788, 29918, 3359, 1575, 4197, 30004, 13, 9651, 1383, 14112, 29903, 6073, 29898, 3359, 29892, 298, 465, 29892, 317, 1430, 29903, 1955, 29918, 11116, 29918, 29925, 9806, 1001, 29892, 525, 29893, 1131, 5477, 30004, 13, 308, 2314, 30004, 13, 1678, 25342, 2906, 29889, 10141, 29918, 1853, 1275, 376, 29903, 1430, 29903, 1955, 1115, 30004, 13, 4706, 788, 29918, 3359, 1575, 4197, 30004, 13, 9651, 1383, 14112, 29903, 6073, 29898, 3359, 29892, 298, 465, 29892, 317, 1430, 29903, 1955, 29918, 11116, 29918, 4330, 3580, 1001, 1299, 11499, 29892, 525, 12863, 1535, 5477, 30004, 13, 9651, 1383, 14112, 29903, 6073, 29898, 3359, 29892, 298, 465, 29892, 317, 1430, 29903, 1955, 29918, 11116, 29918, 29950, 5005, 1367, 11937, 29892, 525, 16063, 333, 537, 5477, 30004, 13, 9651, 1383, 14112, 29903, 6073, 29898, 3359, 29892, 298, 465, 29892, 317, 1430, 29903, 1955, 29918, 11116, 29918, 29933, 1299, 4945, 29979, 29892, 525, 29890, 2620, 29891, 1495, 30004, 13, 308, 2314, 30004, 13, 30004, 13, 1990, 1383, 14112, 29903, 6073, 29898, 2713, 14112, 11501, 29892, 14945, 1125, 30004, 13, 1678, 9995, 1123, 26081, 310, 263, 1383, 14112, 317, 6073, 1213, 15945, 30004, 13, 30004, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 2906, 29892, 298, 465, 29892, 23530, 29918, 1853, 29892, 23530, 29918, 978, 1125, 30004, 13, 4706, 9995, 6644, 6646, 385, 1383, 14112, 24995, 1213, 15945, 30004, 13, 4706, 1383, 14112, 11501, 17255, 2344, 12035, 1311, 29892, 2906, 29892, 298, 465, 8443, 13, 4706, 1583, 3032, 13092, 29918, 333, 4619, 11119, 29908, 718, 23530, 29918, 978, 30004, 13, 4706, 1583, 29889, 10041, 29918, 333, 4619, 11119, 29908, 718, 23530, 29918, 978, 30004, 13, 4706, 1583, 3032, 29879, 6073, 29918, 1853, 353, 23530, 29918, 1853, 30004, 13, 4706, 1583, 3032, 29879, 6073, 29918, 978, 353, 23530, 29918, 978, 30004, 13, 4706, 1583, 3032, 29890, 2620, 29891, 353, 6213, 30004, 13, 30004, 13, 4706, 1583, 3032, 3859, 353, 6213, 30004, 13, 4706, 1583, 29889, 5504, 26471, 13, 30004, 13, 1678, 732, 6799, 30004, 13, 1678, 822, 2106, 29898, 1311, 1125, 30004, 13, 4706, 9995, 11609, 278, 2106, 310, 278, 23530, 1213, 15945, 30004, 13, 4706, 736, 1583, 3032, 3859, 30004, 13, 30004, 13, 1678, 732, 6799, 30004, 13, 1678, 822, 14728, 29918, 978, 29898, 1311, 1125, 30004, 13, 4706, 9995, 1170, 310, 14728, 1213, 15945, 30004, 13, 4706, 736, 317, 1430, 29903, 1955, 29918, 15631, 29925, 2890, 29961, 1311, 3032, 29879, 6073, 29918, 1853, 3816, 29900, 29962, 320, 30004, 13, 9651, 565, 1583, 3032, 29879, 6073, 29918, 1853, 297, 317, 1430, 29903, 1955, 29918, 15631, 29925, 2890, 1683, 6213, 30004, 13, 30004, 13, 1678, 732, 6799, 30004, 13, 1678, 822, 5190, 29918, 974, 29918, 26658, 358, 29898, 1311, 1125, 30004, 13, 4706, 9995, 11609, 278, 5190, 310, 20039, 1213, 15945, 30004, 13, 4706, 736, 317, 1430, 29903, 1955, 29918, 15631, 29925, 2890, 29961, 1311, 3032, 29879, 6073, 29918, 1853, 3816, 29896, 29962, 320, 30004, 13, 9651, 565, 1583, 3032, 29879, 6073, 29918, 1853, 297, 317, 1430, 29903, 1955, 29918, 15631, 29925, 2890, 1683, 6213, 30004, 13, 30004, 13, 1678, 732, 6799, 30004, 13, 1678, 822, 9849, 29898, 1311, 1125, 30004, 13, 4706, 9995, 11609, 278, 9849, 1213, 15945, 30004, 13, 4706, 736, 317, 1430, 29903, 1955, 29918, 15631, 29925, 2890, 29961, 1311, 3032, 29879, 6073, 29918, 1853, 3816, 29906, 29962, 320, 30004, 13, 9651, 565, 1583, 3032, 29879, 6073, 29918, 1853, 297, 317, 1430, 29903, 1955, 29918, 15631, 29925, 2890, 1683, 6213, 30004, 13, 30004, 13, 1678, 732, 6799, 30004, 13, 1678, 822, 4742, 29918, 1990, 29898, 1311, 1125, 30004, 13, 4706, 9995, 11609, 278, 4742, 770, 1213, 15945, 30004, 13, 4706, 736, 317, 1430, 29903, 1955, 29918, 15631, 29925, 2890, 29961, 1311, 3032, 29879, 6073, 29918, 1853, 3816, 29941, 29962, 320, 30004, 13, 9651, 565, 1583, 3032, 29879, 6073, 29918, 1853, 297, 317, 1430, 29903, 1955, 29918, 15631, 29925, 2890, 1683, 6213, 30004, 13, 30004, 13, 1678, 822, 2767, 29898, 1311, 1125, 30004, 13, 4706, 9995, 20927, 716, 2106, 848, 363, 445, 23530, 1213, 15945, 30004, 13, 4706, 565, 1583, 3032, 3359, 29889, 29879, 6073, 29918, 5975, 338, 451, 6213, 29901, 30004, 13, 9651, 1583, 3032, 3859, 353, 1583, 3032, 3359, 29889, 29879, 6073, 29918, 5975, 29889, 657, 29898, 1311, 3032, 29879, 6073, 29918, 978, 29892, 6213, 8443, 13, 9651, 1583, 3032, 29890, 2620, 29891, 353, 1583, 3032, 3359, 29889, 29879, 6073, 29918, 5975, 29889, 657, 877, 29890, 2620, 29891, 742, 6213, 8443, 13, 30004, 13, 1678, 732, 6799, 30004, 13, 1678, 822, 4742, 29918, 3859, 29918, 15697, 29898, 1311, 1125, 30004, 13, 4706, 12421, 353, 2428, 29898, 2713, 14112, 29903, 6073, 29892, 1583, 467, 10141, 29918, 3859, 29918, 15697, 30004, 13, 4706, 565, 1583, 3032, 29890, 2620, 29891, 338, 451, 6213, 29901, 30004, 13, 9651, 12421, 3366, 29890, 2620, 29891, 3108, 353, 851, 29898, 1311, 3032, 29890, 2620, 29891, 29897, 718, 14210, 29915, 30004, 13, 4706, 736, 12421, 30004, 13, 30004, 13, 30004, 13, 1990, 1383, 14112, 3401, 29903, 6073, 29898, 2713, 14112, 7445, 29892, 14945, 1125, 30004, 13, 1678, 9995, 1123, 26081, 310, 263, 1383, 14112, 22140, 317, 6073, 1213, 15945, 30004, 13, 30004, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 2908, 29892, 298, 465, 29892, 23530, 29918, 1853, 29892, 23530, 29918, 978, 1125, 30004, 13, 4706, 1383, 14112, 7445, 17255, 2344, 12035, 1311, 29892, 2908, 29892, 298, 465, 29892, 11119, 29908, 718, 23530, 29918, 978, 8443, 13, 4706, 1583, 29889, 10041, 29918, 333, 353, 376, 29879, 6073, 29908, 718, 1583, 29889, 10041, 29918, 333, 30004, 13, 4706, 1583, 3032, 29879, 6073, 29918, 978, 353, 23530, 29918, 978, 30004, 13, 4706, 1583, 3032, 29879, 6073, 29918, 1853, 353, 23530, 29918, 1853, 30004, 13, 4706, 1583, 3032, 3859, 353, 6213, 30004, 13, 4706, 1583, 29889, 5504, 26471, 13, 30004, 13, 1678, 822, 2767, 29898, 1311, 1125, 30004, 13, 4706, 9995, 20927, 716, 2106, 848, 363, 445, 23530, 1213, 15945, 30004, 13, 4706, 565, 1583, 3032, 1271, 29889, 3888, 29918, 5975, 338, 451, 6213, 29901, 30004, 13, 9651, 1583, 3032, 3859, 353, 1583, 3032, 1271, 29889, 3888, 29918, 5975, 29889, 657, 29898, 1311, 3032, 29879, 6073, 29918, 978, 29892, 6213, 8443, 13, 4706, 396, 361, 1583, 3032, 1271, 29889, 29879, 6073, 29918, 5975, 338, 451, 6213, 29901, 30004, 13, 4706, 396, 1678, 1583, 3032, 29890, 2620, 29891, 353, 1583, 3032, 1271, 29889, 29879, 6073, 29918, 5975, 29889, 657, 877, 29890, 2620, 29891, 742, 6213, 8443, 13, 30004, 13, 1678, 732, 6799, 30004, 13, 1678, 822, 2106, 29898, 1311, 1125, 30004, 13, 4706, 9995, 11609, 278, 2106, 310, 278, 23530, 1213, 15945, 30004, 13, 4706, 736, 1583, 3032, 3859, 30004, 13, 4706, 6756, 13, 1678, 822, 14728, 29918, 978, 29898, 1311, 1125, 30004, 13, 4706, 9995, 1170, 310, 14728, 1213, 15945, 30004, 13, 4706, 736, 317, 1430, 29903, 1955, 29918, 15631, 29925, 2890, 29961, 1311, 3032, 29879, 6073, 29918, 1853, 3816, 29900, 29962, 320, 30004, 13, 9651, 565, 1583, 3032, 29879, 6073, 29918, 1853, 297, 317, 1430, 29903, 1955, 29918, 15631, 29925, 2890, 1683, 6213, 30004, 13, 30004, 13, 1678, 732, 6799, 30004, 13, 1678, 822, 5190, 29918, 974, 29918, 26658, 358, 29898, 1311, 1125, 30004, 13, 4706, 9995, 11609, 278, 5190, 310, 20039, 1213, 15945, 30004, 13, 4706, 736, 317, 1430, 29903, 1955, 29918, 15631, 29925, 2890, 29961, 1311, 3032, 29879, 6073, 29918, 1853, 3816, 29896, 29962, 320, 30004, 13, 9651, 565, 1583, 3032, 29879, 6073, 29918, 1853, 297, 317, 1430, 29903, 1955, 29918, 15631, 29925, 2890, 1683, 6213, 30004, 13, 30004, 13, 1678, 732, 6799, 30004, 13, 1678, 822, 9849, 29898, 1311, 1125, 30004, 13, 4706, 9995, 11609, 278, 9849, 1213, 15945, 30004, 13, 4706, 736, 317, 1430, 29903, 1955, 29918, 15631, 29925, 2890, 29961, 1311, 3032, 29879, 6073, 29918, 1853, 3816, 29906, 29962, 320, 30004, 13, 9651, 565, 1583, 3032, 29879, 6073, 29918, 1853, 297, 317, 1430, 29903, 1955, 29918, 15631, 29925, 2890, 1683, 6213, 30004, 13, 30004, 13, 1678, 732, 6799, 30004, 13, 1678, 822, 4742, 29918, 3859, 29918, 15697, 29898, 1311, 1125, 30004, 13, 4706, 736, 6213, 30004, 13, 30004, 13, 30004, 13, 1990, 1383, 14112, 6594, 29898, 6691, 1125, 30004, 13, 1678, 9995, 1123, 26081, 310, 263, 1383, 14112, 1873, 23530, 1213, 15945, 30004, 13, 30004, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 298, 465, 29892, 1873, 29892, 11451, 29918, 845, 14112, 29918, 3259, 1125, 30004, 13, 4706, 9995, 6644, 6646, 278, 10079, 23530, 1213, 15945, 30004, 13, 4706, 1970, 353, 298, 465, 29889, 1272, 29961, 7068, 29923, 2208, 29979, 29918, 25903, 29962, 30004, 13, 4706, 1178, 29918, 13506, 353, 1970, 29889, 657, 29898, 6007, 29943, 29918, 14824, 17637, 29918, 1367, 29918, 15094, 25634, 8443, 13, 4706, 1583, 3032, 3259, 353, 1873, 30004, 13, 4706, 1583, 3032, 2272, 29918, 845, 14112, 29918, 3259, 353, 11451, 29918, 845, 14112, 29918, 3259, 30004, 13, 4706, 1583, 29889, 10041, 29918, 333, 353, 376, 29879, 6073, 1213, 718, 1178, 29918, 13506, 718, 11119, 3259, 19451, 13, 4706, 1583, 3032, 978, 353, 376, 2713, 14112, 1873, 19451, 13, 30004, 13, 1678, 732, 6799, 30004, 13, 1678, 822, 1024, 29898, 1311, 1125, 30004, 13, 4706, 9995, 11609, 278, 1024, 310, 278, 23530, 1213, 15945, 30004, 13, 4706, 736, 525, 2713, 14112, 1873, 29915, 30004, 13, 30004, 13, 1678, 732, 6799, 30004, 13, 1678, 822, 2106, 29898, 1311, 1125, 30004, 13, 4706, 9995, 11609, 278, 2106, 310, 278, 23530, 1213, 15945, 30004, 13, 4706, 736, 1583, 3032, 3259, 718, 5591, 29908, 718, 1583, 3032, 2272, 29918, 845, 14112, 29918, 3259, 30004, 13, 30004, 13, 1678, 732, 6799, 30004, 13, 1678, 822, 4742, 29918, 3859, 29918, 15697, 29898, 1311, 1125, 30004, 13, 4706, 9995, 11609, 8393, 363, 278, 23530, 1213, 15945, 30004, 13, 4706, 736, 11117, 845, 14112, 2396, 1583, 3032, 3259, 29892, 525, 2272, 2713, 14112, 2396, 1583, 3032, 2272, 29918, 845, 14112, 29918, 3259, 8117, 13, 30004, 13, 1678, 732, 6799, 30004, 13, 1678, 822, 9849, 29898, 1311, 1125, 30004, 13, 4706, 9995, 11609, 278, 9849, 304, 671, 297, 278, 4565, 355, 29892, 565, 738, 1213, 15945, 30004, 13, 4706, 736, 6213, 30004, 13, 2 ]
evolversFiles/cameraEngine.py
coding-lines/evolvers
0
154408
#cameraCoords syntax: [x1 (oben links),y1,x2 (unten rechts),y2,zoomLevel] def moveCamera(cameraCoords, move,worldSize): if cameraCoords[0]+move[0] <= 1 and move[0] < 0: cameraCoords[0] -= cameraCoords[0]%1 cameraCoords[2] -= cameraCoords[2]%1 while cameraCoords[0] > 1: cameraCoords[0] -= 1 #Wenn Kamera x-Koordinaten unter 0 gesetzt werden, werden die Koordinaten proportional angeglichen cameraCoords[2] -= 1 elif cameraCoords[2]+move[0]+1 >= worldSize[0]: return cameraCoords else: cameraCoords[0] += move[0] cameraCoords[2] += move[0]#Bewegen (x) if cameraCoords[1]+move[1] <= 1 and move[1] < 0: cameraCoords[1] -= cameraCoords[1]%1 cameraCoords[3] -= cameraCoords[3]%1 while cameraCoords[1] > 1: cameraCoords[1] -= 1#Wenn Kamera y-Koordinaten unter 0 gesetzt werden, werden die Koordinaten proportional angeglichen cameraCoords[3] -= 1 elif cameraCoords[3]+move[1]+1 >= worldSize[1]: return cameraCoords else: cameraCoords[1] += move[1] cameraCoords[3] += move[1]#Bewegen (y) return cameraCoords
[ 1, 396, 26065, 7967, 4339, 5877, 29901, 518, 29916, 29896, 313, 29217, 2988, 511, 29891, 29896, 29892, 29916, 29906, 313, 348, 841, 337, 10333, 511, 29891, 29906, 29892, 2502, 290, 10108, 29962, 30004, 13, 30004, 13, 1753, 4337, 20717, 29898, 26065, 7967, 4339, 29892, 4337, 29892, 11526, 3505, 1125, 30004, 13, 1678, 565, 10656, 7967, 4339, 29961, 29900, 10062, 11631, 29961, 29900, 29962, 5277, 29871, 29896, 322, 4337, 29961, 29900, 29962, 529, 29871, 29900, 29901, 30004, 13, 4706, 10656, 7967, 4339, 29961, 29900, 29962, 22361, 10656, 7967, 4339, 29961, 29900, 29962, 29995, 29896, 30004, 13, 4706, 10656, 7967, 4339, 29961, 29906, 29962, 22361, 10656, 7967, 4339, 29961, 29906, 29962, 29995, 29896, 30004, 13, 4706, 1550, 10656, 7967, 4339, 29961, 29900, 29962, 1405, 29871, 29896, 29901, 30004, 13, 9651, 10656, 7967, 4339, 29961, 29900, 29962, 22361, 29871, 29896, 396, 29956, 2108, 12986, 1572, 921, 29899, 29968, 29877, 4194, 2579, 3662, 29871, 29900, 6300, 7401, 3678, 29892, 3678, 762, 8224, 4194, 2579, 29839, 2614, 387, 4057, 30004, 13, 9651, 10656, 7967, 4339, 29961, 29906, 29962, 22361, 29871, 29896, 30004, 13, 1678, 25342, 10656, 7967, 4339, 29961, 29906, 10062, 11631, 29961, 29900, 10062, 29896, 6736, 3186, 3505, 29961, 29900, 5387, 30004, 13, 4706, 736, 10656, 7967, 4339, 30004, 13, 1678, 1683, 29901, 30004, 13, 4706, 10656, 7967, 4339, 29961, 29900, 29962, 4619, 4337, 29961, 29900, 29962, 30004, 13, 4706, 10656, 7967, 4339, 29961, 29906, 29962, 4619, 4337, 29961, 29900, 29962, 29937, 29933, 809, 3442, 313, 29916, 8443, 13, 30004, 13, 1678, 565, 10656, 7967, 4339, 29961, 29896, 10062, 11631, 29961, 29896, 29962, 5277, 29871, 29896, 322, 4337, 29961, 29896, 29962, 529, 29871, 29900, 29901, 30004, 13, 4706, 10656, 7967, 4339, 29961, 29896, 29962, 22361, 10656, 7967, 4339, 29961, 29896, 29962, 29995, 29896, 30004, 13, 4706, 10656, 7967, 4339, 29961, 29941, 29962, 22361, 10656, 7967, 4339, 29961, 29941, 29962, 29995, 29896, 30004, 13, 4706, 1550, 10656, 7967, 4339, 29961, 29896, 29962, 1405, 29871, 29896, 29901, 30004, 13, 9651, 10656, 7967, 4339, 29961, 29896, 29962, 22361, 29871, 29896, 29937, 29956, 2108, 12986, 1572, 343, 29899, 29968, 29877, 4194, 2579, 3662, 29871, 29900, 6300, 7401, 3678, 29892, 3678, 762, 8224, 4194, 2579, 29839, 2614, 387, 4057, 30004, 13, 9651, 10656, 7967, 4339, 29961, 29941, 29962, 22361, 29871, 29896, 30004, 13, 1678, 25342, 10656, 7967, 4339, 29961, 29941, 10062, 11631, 29961, 29896, 10062, 29896, 6736, 3186, 3505, 29961, 29896, 5387, 30004, 13, 4706, 736, 10656, 7967, 4339, 30004, 13, 1678, 1683, 29901, 30004, 13, 4706, 10656, 7967, 4339, 29961, 29896, 29962, 4619, 4337, 29961, 29896, 29962, 30004, 13, 4706, 10656, 7967, 4339, 29961, 29941, 29962, 4619, 4337, 29961, 29896, 29962, 29937, 29933, 809, 3442, 313, 29891, 8443, 13, 30004, 13, 1678, 736, 10656, 7967, 4339, 30004, 13, 2 ]
bot/plugins/keyboard/__init__.py
grahamtito/TelegramFiletoCloud
0
17911
#!/usr/bin/env python3 # This is bot coded by <NAME> and used for educational purposes only # https://github.com/AbhijithNT # Copyright <NAME> # Thank you https://github.com/pyrogram/pyrogram from pyrogram.types import ( InlineKeyboardMarkup, InlineKeyboardButton ) def server_select(): upload_selection = [ [ InlineKeyboardButton( "transfer.sh", callback_data="transfersh" ), InlineKeyboardButton( "File.io", callback_data="File.io" ) ], [ InlineKeyboardButton( "gofile.io", callback_data="gofileio" ), InlineKeyboardButton( "anonymfiles.com", callback_data="anonymfiles" ) ], [ InlineKeyboardButton( "aparat", callback_data="aparat" ), InlineKeyboardButton( "splus", callback_data="splus" ) ] ] return InlineKeyboardMarkup(upload_selection) def completedKeyboard(dl): replayMarkup = InlineKeyboardMarkup( [[ InlineKeyboardButton( "DOWNLOAD URL", url=f"{dl}" ) ], [ InlineKeyboardButton( "🗂 SOURCE", url="https://github.com/AbhijithNT/" ) ]]) return replayMarkup
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 29937, 910, 338, 9225, 274, 6797, 491, 529, 5813, 29958, 322, 1304, 363, 28976, 11976, 871, 13, 29937, 2045, 597, 3292, 29889, 510, 29914, 4920, 29882, 823, 389, 20321, 13, 29937, 14187, 1266, 529, 5813, 29958, 13, 29937, 3374, 366, 2045, 597, 3292, 29889, 510, 29914, 2272, 307, 1393, 29914, 2272, 307, 1393, 13, 13, 3166, 11451, 307, 1393, 29889, 8768, 1053, 313, 13, 1678, 512, 1220, 2558, 3377, 9802, 786, 29892, 13, 1678, 512, 1220, 2558, 3377, 3125, 13, 29897, 13, 13, 13, 1753, 1923, 29918, 2622, 7295, 13, 1678, 6441, 29918, 21731, 353, 518, 13, 4706, 518, 13, 9651, 512, 1220, 2558, 3377, 3125, 29898, 13, 18884, 376, 3286, 571, 29889, 845, 613, 13, 18884, 6939, 29918, 1272, 543, 3286, 25534, 29882, 29908, 13, 9651, 10353, 13, 9651, 512, 1220, 2558, 3377, 3125, 29898, 13, 18884, 376, 2283, 29889, 601, 613, 13, 18884, 6939, 29918, 1272, 543, 2283, 29889, 601, 29908, 13, 9651, 1723, 13, 4706, 21251, 13, 4706, 518, 13, 9651, 512, 1220, 2558, 3377, 3125, 29898, 13, 18884, 376, 29887, 974, 488, 29889, 601, 613, 13, 18884, 6939, 29918, 1272, 543, 29887, 974, 488, 601, 29908, 13, 9651, 10353, 13, 9651, 512, 1220, 2558, 3377, 3125, 29898, 13, 18884, 376, 273, 4735, 5325, 29889, 510, 613, 13, 18884, 6939, 29918, 1272, 543, 273, 4735, 5325, 29908, 13, 9651, 1723, 13, 4706, 21251, 13, 4706, 518, 13, 9651, 512, 1220, 2558, 3377, 3125, 29898, 13, 18884, 376, 481, 279, 271, 613, 13, 18884, 6939, 29918, 1272, 543, 481, 279, 271, 29908, 13, 9651, 10353, 13, 9651, 512, 1220, 2558, 3377, 3125, 29898, 13, 18884, 376, 29879, 11242, 613, 13, 18884, 6939, 29918, 1272, 543, 29879, 11242, 29908, 13, 9651, 1723, 13, 4706, 4514, 13, 1678, 4514, 13, 1678, 736, 512, 1220, 2558, 3377, 9802, 786, 29898, 9009, 29918, 21731, 29897, 13, 13, 13, 1753, 8676, 2558, 3377, 29898, 11671, 1125, 13, 1678, 337, 1456, 9802, 786, 353, 512, 1220, 2558, 3377, 9802, 786, 29898, 13, 4706, 5519, 13, 9651, 512, 1220, 2558, 3377, 3125, 29898, 13, 18884, 376, 3970, 16048, 29428, 3988, 613, 13, 18884, 3142, 29922, 29888, 29908, 29912, 11671, 5038, 13, 9651, 1723, 13, 4706, 21251, 13, 9651, 518, 13, 9651, 512, 1220, 2558, 3377, 3125, 29898, 13, 18884, 376, 243, 162, 154, 133, 7791, 4574, 4741, 613, 13, 18884, 3142, 543, 991, 597, 3292, 29889, 510, 29914, 4920, 29882, 823, 389, 20321, 12975, 13, 9651, 1723, 13, 4706, 4514, 2314, 13, 13, 1678, 736, 337, 1456, 9802, 786, 13, 2 ]
tests/test_posterior.py
joergdietrich/CredibleIntervals
0
1600703
<reponame>joergdietrich/CredibleIntervals import numpy as np from numpy.testing import assert_almost_equal from credible_interval import Posterior def test_posterior(): np.random.seed(20180131) x = np.random.normal(10, 5, 10000) posterior = Posterior(x) assert_almost_equal(9.9243057716556589, posterior.mean) assert_almost_equal(9.761182264312712, posterior.mode) assert_almost_equal(5.0345710789483089, posterior.std)
[ 1, 529, 276, 1112, 420, 29958, 2212, 15064, 29881, 2035, 4018, 29914, 15507, 1821, 12506, 29879, 13, 5215, 12655, 408, 7442, 13, 3166, 12655, 29889, 13424, 1053, 4974, 29918, 284, 3242, 29918, 11745, 13, 13, 3166, 6625, 1821, 29918, 19207, 1053, 4918, 261, 1611, 13, 13, 13, 1753, 1243, 29918, 2490, 261, 1611, 7295, 13, 1678, 7442, 29889, 8172, 29889, 26776, 29898, 29906, 29900, 29896, 29947, 29900, 29896, 29941, 29896, 29897, 13, 1678, 921, 353, 7442, 29889, 8172, 29889, 8945, 29898, 29896, 29900, 29892, 29871, 29945, 29892, 29871, 29896, 29900, 29900, 29900, 29900, 29897, 13, 1678, 13446, 353, 4918, 261, 1611, 29898, 29916, 29897, 13, 1678, 4974, 29918, 284, 3242, 29918, 11745, 29898, 29929, 29889, 29929, 29906, 29946, 29941, 29900, 29945, 29955, 29955, 29896, 29953, 29945, 29945, 29953, 29945, 29947, 29929, 29892, 13446, 29889, 12676, 29897, 13, 1678, 4974, 29918, 284, 3242, 29918, 11745, 29898, 29929, 29889, 29955, 29953, 29896, 29896, 29947, 29906, 29906, 29953, 29946, 29941, 29896, 29906, 29955, 29896, 29906, 29892, 13446, 29889, 8513, 29897, 13, 1678, 4974, 29918, 284, 3242, 29918, 11745, 29898, 29945, 29889, 29900, 29941, 29946, 29945, 29955, 29896, 29900, 29955, 29947, 29929, 29946, 29947, 29941, 29900, 29947, 29929, 29892, 13446, 29889, 4172, 29897, 13, 2 ]
dice roll project 1.py
anuraag392/How-to-make-a-simple-dice-roll-program
0
95393
<reponame>anuraag392/How-to-make-a-simple-dice-roll-program<filename>dice roll project 1.py<gh_stars>0 from tkinter import * import random root=Tk() root.title("Dice roll") root.geometry("500x400") label=Label(root,font=('helvetica',250,'bold'),text='') label.pack() def rolldice(): dice=['\u2680','\u2681','\u2682','\u2683','\u2684','\u2685'] label.configure(text=f'{random.choice(dice)}') label.pack() button=Button(root,font=('helvetica',15,'bold'),text='roll dice',command=rolldice) button.pack() root.mainloop()
[ 1, 529, 276, 1112, 420, 29958, 273, 2002, 351, 29941, 29929, 29906, 29914, 5328, 29899, 517, 29899, 5675, 29899, 29874, 29899, 12857, 29899, 29881, 625, 29899, 1245, 29899, 8860, 29966, 9507, 29958, 29881, 625, 9679, 2060, 29871, 29896, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 18883, 1639, 1053, 334, 30004, 13, 5215, 4036, 30004, 13, 4632, 29922, 29911, 29895, 26471, 13, 4632, 29889, 3257, 703, 29928, 625, 9679, 1159, 30004, 13, 4632, 29889, 19156, 703, 29945, 29900, 29900, 29916, 29946, 29900, 29900, 1159, 30004, 13, 1643, 29922, 4775, 29898, 4632, 29892, 5657, 29922, 877, 3952, 5990, 983, 742, 29906, 29945, 29900, 5501, 8934, 5477, 726, 2433, 1495, 30004, 13, 1643, 29889, 4058, 26471, 13, 1753, 14467, 430, 625, 7295, 30004, 13, 1678, 17629, 29922, 1839, 29905, 29884, 29906, 29953, 29947, 29900, 3788, 29905, 29884, 29906, 29953, 29947, 29896, 3788, 29905, 29884, 29906, 29953, 29947, 29906, 3788, 29905, 29884, 29906, 29953, 29947, 29941, 3788, 29905, 29884, 29906, 29953, 29947, 29946, 3788, 29905, 29884, 29906, 29953, 29947, 29945, 2033, 30004, 13, 1678, 3858, 29889, 17591, 29898, 726, 29922, 29888, 29915, 29912, 8172, 29889, 16957, 29898, 29881, 625, 2915, 1495, 30004, 13, 1678, 3858, 29889, 4058, 26471, 13, 3092, 29922, 3125, 29898, 4632, 29892, 5657, 29922, 877, 3952, 5990, 983, 742, 29896, 29945, 5501, 8934, 5477, 726, 2433, 1245, 17629, 742, 6519, 29922, 1467, 430, 625, 8443, 13, 3092, 29889, 4058, 26471, 13, 4632, 29889, 3396, 7888, 26471, 13, 2 ]
TweetUpdateThread.py
mrtazz/twsh
1
1601740
# thread class for updating tweets in the background import time import threading class TweetUpdateThread(threading.Thread): ''' thread class to fetch tweets in the background ''' def __init__(self, cli_object, function, waittime): ''' At initialization some local variables are set: waittime = the time to wait between tweet fetches cli = the cli object from which the update cmd is called function = the update function to call from the cli object endme = boolean value to determine whether to stop the thread counter = counting the sleeps until the next update ''' threading.Thread.__init__(self) self.waittime = waittime self.cli = cli_object self.function = function self.endme = False self.counter = 0 def stop(self): ''' stop the thread ''' threading.Thread.__stop(self) def run(self): ''' The thread is run here until the endme variable is set to true. While running the thread executes the passed cli function in intervals of waittime. Time may differ if this thread is run a long time because of command execution delays. Has to be tested. The construct with checking the endme variable every second secures that the user doesn't have to wait another waittime interval (worst case) until the thread is ended ''' while self.endme == False: if self.counter == self.waittime: self.counter = 0 self.cli.do_hello("") else: self.counter = self.counter + 1 time.sleep(1) def setend(self): ''' Interface to set the end of the thread ''' self.endme = True
[ 1, 396, 3244, 770, 363, 13271, 7780, 1691, 297, 278, 3239, 4706, 13, 13, 5215, 931, 13, 5215, 3244, 292, 13, 29871, 13, 1990, 323, 16668, 6422, 4899, 29898, 7097, 292, 29889, 4899, 1125, 13, 4706, 14550, 3244, 770, 304, 6699, 7780, 1691, 297, 278, 3239, 14550, 13, 4706, 822, 4770, 2344, 12035, 1311, 29892, 9335, 29918, 3318, 29892, 740, 29892, 11324, 986, 603, 1125, 13, 9651, 14550, 2180, 17865, 777, 1887, 3651, 526, 731, 29901, 13, 18884, 11324, 986, 603, 353, 278, 931, 304, 4480, 1546, 7780, 300, 6699, 267, 13, 18884, 9335, 353, 278, 9335, 1203, 515, 607, 278, 2767, 9920, 338, 2000, 13, 18884, 740, 353, 278, 2767, 740, 304, 1246, 515, 278, 9335, 1203, 13, 18884, 1095, 1004, 353, 7223, 995, 304, 8161, 3692, 304, 5040, 278, 3244, 13, 18884, 6795, 353, 21248, 278, 12844, 8961, 2745, 278, 2446, 2767, 13, 9651, 14550, 13, 9651, 3244, 292, 29889, 4899, 17255, 2344, 12035, 1311, 29897, 13, 9651, 1583, 29889, 2766, 986, 603, 353, 11324, 986, 603, 13, 9651, 1583, 29889, 11303, 353, 9335, 29918, 3318, 13, 9651, 1583, 29889, 2220, 353, 740, 13, 9651, 1583, 29889, 355, 1004, 353, 7700, 13, 9651, 1583, 29889, 11808, 353, 29871, 29900, 13, 632, 13, 4706, 822, 5040, 29898, 1311, 1125, 13, 9651, 14550, 5040, 278, 3244, 14550, 13, 9651, 3244, 292, 29889, 4899, 17255, 9847, 29898, 1311, 29897, 13, 632, 13, 4706, 822, 1065, 29898, 1311, 1125, 13, 9651, 14550, 450, 3244, 338, 1065, 1244, 2745, 278, 1095, 1004, 2286, 338, 731, 13, 18884, 304, 1565, 29889, 5806, 2734, 278, 3244, 24138, 278, 4502, 29871, 13, 18884, 9335, 740, 297, 18747, 310, 11324, 986, 603, 29889, 5974, 1122, 1163, 565, 13, 18884, 445, 3244, 338, 1065, 263, 1472, 931, 1363, 310, 1899, 8225, 13, 18884, 628, 1036, 29889, 11699, 304, 367, 9528, 29889, 450, 3386, 411, 8454, 278, 13, 18884, 1095, 1004, 2286, 1432, 1473, 5226, 1973, 393, 278, 1404, 1838, 29915, 29873, 13, 18884, 505, 304, 4480, 1790, 11324, 986, 603, 7292, 313, 13762, 303, 1206, 29897, 2745, 13, 18884, 278, 3244, 338, 9698, 13, 9651, 14550, 13, 9651, 1550, 1583, 29889, 355, 1004, 1275, 7700, 29901, 13, 18884, 565, 1583, 29889, 11808, 1275, 1583, 29889, 2766, 986, 603, 29901, 13, 462, 1678, 1583, 29889, 11808, 353, 29871, 29900, 13, 462, 1678, 1583, 29889, 11303, 29889, 1867, 29918, 12199, 703, 1159, 13, 18884, 1683, 29901, 13, 462, 1678, 1583, 29889, 11808, 353, 1583, 29889, 11808, 718, 29871, 29896, 13, 462, 1678, 931, 29889, 17059, 29898, 29896, 29897, 13, 462, 13, 4706, 822, 731, 355, 29898, 1311, 1125, 13, 9651, 14550, 25796, 304, 731, 278, 1095, 310, 278, 3244, 14550, 13, 9651, 1583, 29889, 355, 1004, 353, 5852, 2 ]
pdfmajor/interpreter/commands/state/PDFGraphicState/PDFColor.py
asosnovsky/pdfmajor
23
36885
<filename>pdfmajor/interpreter/commands/state/PDFGraphicState/PDFColor.py from typing import Tuple, Optional from .PDFColorSpace import PDFColorSpace class PDFColor: def __init__(self, color_space: Optional[PDFColorSpace], *values: float): self.color_space: Optional[PDFColorSpace] = color_space self.values: Tuple[float, ...] = values def copy(self): return self.__class__( self.color_space, *self.values ) def __repr__(self): return f"""<PDFColor space="{ None if self.color_space is None else self.color_space.name }" values={self.values}/>"""
[ 1, 529, 9507, 29958, 5140, 21355, 29914, 1639, 1457, 357, 29914, 26381, 29914, 3859, 29914, 8493, 9527, 293, 2792, 29914, 8493, 3306, 29889, 2272, 13, 3166, 19229, 1053, 12603, 552, 29892, 28379, 13, 3166, 869, 8493, 3306, 14936, 1053, 11328, 3306, 14936, 13, 13, 1990, 11328, 3306, 29901, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 2927, 29918, 3493, 29901, 28379, 29961, 8493, 3306, 14936, 1402, 334, 5975, 29901, 5785, 1125, 13, 4706, 1583, 29889, 2780, 29918, 3493, 29901, 28379, 29961, 8493, 3306, 14936, 29962, 353, 2927, 29918, 3493, 13, 4706, 1583, 29889, 5975, 29901, 12603, 552, 29961, 7411, 29892, 2023, 29962, 353, 1819, 13, 13, 1678, 822, 3509, 29898, 1311, 1125, 13, 4706, 736, 1583, 17255, 1990, 12035, 13, 9651, 1583, 29889, 2780, 29918, 3493, 29892, 13, 9651, 334, 1311, 29889, 5975, 13, 4706, 1723, 13, 268, 13, 1678, 822, 4770, 276, 558, 12035, 1311, 1125, 13, 4706, 736, 285, 15945, 29908, 29966, 8493, 3306, 2913, 10724, 13, 9651, 6213, 565, 1583, 29889, 2780, 29918, 3493, 338, 6213, 1683, 1583, 29889, 2780, 29918, 3493, 29889, 978, 13, 4706, 500, 29908, 1819, 3790, 1311, 29889, 5975, 29913, 3779, 15945, 29908, 13, 2 ]
old/am2320.py
eggplant60/airalarm
0
133614
#!/usr/bin/python # -*- coding: utf-8 -*- import smbus import time import datetime import threading import crc16 ADDRESS = 0x5c # 7bit address (will be left shifted to add the read write bit) READ_INT = 10 # [sec], each reading interval is to be grater than 2 sec LOG_INT = 600 # [sec] DEBUG_MODE = True #W_ADDR = ADDRESS << 1 + 0x00 # ADDRESS(7bit) + R/W bit(1bit) #R_ADDR = ADDRESS << 1 + 0x01 # ADDRESS(7bit) + R/W bit(1bit) # Print a given message with the date def printDateMsg(msg): d = datetime.datetime.today() print d.strftime('%Y/%m/%d %H:%M:%S') + ' [TRMO] ' + msg # am2320 class Thermo(): def __init__(self): self.__i2c_bus = smbus.SMBus(1) self.__hum = 0.0 self.__tmp = 0.0 self.tu = threading.Thread(target=self.__updateValue) self.tu.setDaemon(True) self.tu.start() self.tl = threading.Thread(target=self.__logValue) self.tl.setDaemon(True) self.tl.start() def __updateValue(self): while True: try: self.__i2c_bus.write_i2c_block_data(ADDRESS, 0x00, []) # センサsleep解除 except: pass # センサはACK が帰ってくるとは限らない仕様 time.sleep(0.001) # Min: 800us try: self.__i2c_bus.write_i2c_block_data(ADDRESS,0x03,[0x00,0x04]) # 読み取り命令 except: if DEBUG_MODE: printDateMsg("[Error] am2320(1) ") self.__hum = 0.0 # 読み取り失敗時は0.0 self.__tmp = 0.0 time.sleep(READ_INT) continue time.sleep(0.002) # Min: 1.5ms try: block = self.__i2c_bus.read_i2c_block_data(ADDRESS,0,8) # データ受取 except: if DEBUG_MODE: printDateMsg("[Error] am2320(2) ") self.__hum = 0.0 # 読み取り失敗時は0.0 self.__tmp = 0.0 time.sleep(READ_INT) continue # # CRC Chech # #block[0] = 0x03 # print(block) # crc = crc16.crc16(block[0:6]) # print(crc & 0xFF, crc >> 8) self.__hum = (block[2] << 8 | block[3])/10.0 self.__tmp = (block[4] << 8 | block[5])/10.0 time.sleep(READ_INT) def __logValue(self): while True: time.sleep(LOG_INT) printDateMsg(self.stringValue()) def getHum(self): return self.__hum def getTmp(self): return self.__tmp def stringValue(self): return "Humidity: " + str(self.getHum()) + "%, " \ + "Temparature: " + str(self.getTmp()) + "℃" def displayValue(self): print self.stringValue() def main_loop(): while True: thermo.displayValue() time.sleep(1) if __name__ == '__main__': thermo = Thermo() try: main_loop() except KeyboardInterrupt: print "Keyboard Interrupt" # finally: # thermo.stop() # ============= EOF ======================
[ 1, 18787, 4855, 29914, 2109, 29914, 4691, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 13, 5215, 1560, 8262, 13, 5215, 931, 13, 5215, 12865, 13, 5215, 3244, 292, 13, 5215, 2181, 29883, 29896, 29953, 13, 13, 17744, 26785, 353, 29871, 29900, 29916, 29945, 29883, 396, 29871, 29955, 2966, 3211, 29871, 313, 14043, 367, 2175, 9500, 287, 304, 788, 278, 1303, 2436, 2586, 29897, 13, 16310, 29918, 10192, 353, 29871, 29896, 29900, 259, 396, 518, 3471, 1402, 1269, 5183, 7292, 338, 304, 367, 867, 1008, 1135, 29871, 29906, 5226, 13, 14480, 29918, 10192, 353, 29871, 29953, 29900, 29900, 29871, 396, 518, 3471, 29962, 13, 18525, 29918, 20387, 353, 5852, 13, 13, 29937, 29956, 29918, 3035, 8353, 353, 27827, 26785, 3532, 29871, 29896, 718, 29871, 29900, 29916, 29900, 29900, 396, 27827, 26785, 29898, 29955, 2966, 29897, 718, 390, 29914, 29956, 2586, 29898, 29896, 2966, 29897, 13, 29937, 29934, 29918, 3035, 8353, 353, 27827, 26785, 3532, 29871, 29896, 718, 29871, 29900, 29916, 29900, 29896, 396, 27827, 26785, 29898, 29955, 2966, 29897, 718, 390, 29914, 29956, 2586, 29898, 29896, 2966, 29897, 13, 13, 29937, 13905, 263, 2183, 2643, 411, 278, 2635, 13, 1753, 1596, 2539, 16190, 29898, 7645, 1125, 13, 1678, 270, 353, 12865, 29889, 12673, 29889, 27765, 580, 13, 1678, 1596, 29871, 270, 29889, 710, 615, 603, 877, 29995, 29979, 22584, 29885, 22584, 29881, 1273, 29950, 16664, 29924, 16664, 29903, 1495, 718, 525, 518, 5659, 6720, 29962, 525, 718, 10191, 13, 13, 13, 29937, 626, 29906, 29941, 29906, 29900, 13, 1990, 498, 20772, 7295, 13, 1678, 822, 4770, 2344, 12035, 1311, 1125, 13, 4706, 1583, 17255, 29875, 29906, 29883, 29918, 8262, 353, 1560, 8262, 29889, 29903, 9486, 375, 29898, 29896, 29897, 13, 4706, 1583, 17255, 16063, 353, 29871, 29900, 29889, 29900, 13, 4706, 1583, 17255, 7050, 353, 29871, 29900, 29889, 29900, 13, 13, 4706, 1583, 29889, 9161, 353, 3244, 292, 29889, 4899, 29898, 5182, 29922, 1311, 17255, 5504, 1917, 29897, 13, 4706, 1583, 29889, 9161, 29889, 842, 27838, 9857, 29898, 5574, 29897, 13, 4706, 1583, 29889, 9161, 29889, 2962, 580, 13, 13, 4706, 1583, 29889, 15206, 353, 3244, 292, 29889, 4899, 29898, 5182, 29922, 1311, 17255, 1188, 1917, 29897, 13, 4706, 1583, 29889, 15206, 29889, 842, 27838, 9857, 29898, 5574, 29897, 13, 4706, 1583, 29889, 15206, 29889, 2962, 580, 13, 13, 13, 1678, 822, 4770, 5504, 1917, 29898, 1311, 1125, 13, 4706, 1550, 5852, 29901, 13, 9651, 1018, 29901, 13, 18884, 1583, 17255, 29875, 29906, 29883, 29918, 8262, 29889, 3539, 29918, 29875, 29906, 29883, 29918, 1271, 29918, 1272, 29898, 17744, 26785, 29892, 29871, 29900, 29916, 29900, 29900, 29892, 518, 2314, 1678, 396, 29871, 30885, 30203, 30615, 17059, 31201, 31152, 13, 9651, 5174, 29901, 13, 18884, 1209, 29871, 396, 29871, 30885, 30203, 30615, 30449, 11375, 29871, 30458, 232, 187, 179, 30665, 30466, 30568, 30332, 30364, 30449, 31175, 30513, 30371, 30298, 231, 190, 152, 233, 170, 155, 13, 9651, 931, 29889, 17059, 29898, 29900, 29889, 29900, 29900, 29896, 29897, 396, 3080, 29901, 29871, 29947, 29900, 29900, 375, 13, 13, 9651, 1018, 29901, 13, 18884, 1583, 17255, 29875, 29906, 29883, 29918, 8262, 29889, 3539, 29918, 29875, 29906, 29883, 29918, 1271, 29918, 1272, 29898, 17744, 26785, 29892, 29900, 29916, 29900, 29941, 17094, 29900, 29916, 29900, 29900, 29892, 29900, 29916, 29900, 29946, 2314, 1678, 396, 29871, 235, 173, 176, 30735, 30683, 30453, 31237, 31650, 13, 9651, 5174, 29901, 13, 18884, 565, 21681, 29918, 20387, 29901, 1596, 2539, 16190, 703, 29961, 2392, 29962, 626, 29906, 29941, 29906, 29900, 29898, 29896, 29897, 16521, 13, 18884, 1583, 17255, 16063, 353, 29871, 29900, 29889, 29900, 12, 12, 29937, 29871, 235, 173, 176, 30735, 30683, 30453, 31369, 233, 152, 154, 30974, 30449, 29900, 29889, 29900, 13, 18884, 1583, 17255, 7050, 353, 29871, 29900, 29889, 29900, 13, 18884, 931, 29889, 17059, 29898, 16310, 29918, 10192, 29897, 13, 18884, 6773, 13, 9651, 931, 29889, 17059, 29898, 29900, 29889, 29900, 29900, 29906, 29897, 396, 3080, 29901, 29871, 29896, 29889, 29945, 1516, 13, 13, 9651, 1018, 29901, 13, 18884, 2908, 353, 1583, 17255, 29875, 29906, 29883, 29918, 8262, 29889, 949, 29918, 29875, 29906, 29883, 29918, 1271, 29918, 1272, 29898, 17744, 26785, 29892, 29900, 29892, 29947, 29897, 1678, 396, 29871, 30597, 30185, 30369, 232, 146, 154, 30683, 13, 9651, 5174, 29901, 13, 18884, 565, 21681, 29918, 20387, 29901, 1596, 2539, 16190, 703, 29961, 2392, 29962, 626, 29906, 29941, 29906, 29900, 29898, 29906, 29897, 16521, 13, 18884, 1583, 17255, 16063, 353, 29871, 29900, 29889, 29900, 4706, 396, 29871, 235, 173, 176, 30735, 30683, 30453, 31369, 233, 152, 154, 30974, 30449, 29900, 29889, 29900, 13, 18884, 1583, 17255, 7050, 353, 29871, 29900, 29889, 29900, 13, 18884, 931, 29889, 17059, 29898, 16310, 29918, 10192, 29897, 13, 18884, 6773, 13, 13, 9651, 396, 396, 315, 10363, 6561, 305, 13, 9651, 396, 396, 1271, 29961, 29900, 29962, 353, 29871, 29900, 29916, 29900, 29941, 13, 9651, 396, 1596, 29898, 1271, 29897, 13, 9651, 396, 2181, 29883, 353, 2181, 29883, 29896, 29953, 29889, 29883, 2214, 29896, 29953, 29898, 1271, 29961, 29900, 29901, 29953, 2314, 13, 9651, 396, 1596, 29898, 29883, 2214, 669, 29871, 29900, 29916, 4198, 29892, 2181, 29883, 5099, 29871, 29947, 29897, 13, 13, 9651, 1583, 17255, 16063, 353, 313, 1271, 29961, 29906, 29962, 3532, 29871, 29947, 891, 2908, 29961, 29941, 2314, 29914, 29896, 29900, 29889, 29900, 13, 9651, 1583, 17255, 7050, 353, 313, 1271, 29961, 29946, 29962, 3532, 29871, 29947, 891, 2908, 29961, 29945, 2314, 29914, 29896, 29900, 29889, 29900, 13, 9651, 931, 29889, 17059, 29898, 16310, 29918, 10192, 29897, 13, 13, 13, 1678, 822, 4770, 1188, 1917, 29898, 1311, 1125, 13, 4706, 1550, 5852, 29901, 13, 9651, 931, 29889, 17059, 29898, 14480, 29918, 10192, 29897, 13, 9651, 1596, 2539, 16190, 29898, 1311, 29889, 1807, 1917, 3101, 13, 13, 13, 1678, 822, 679, 29950, 398, 29898, 1311, 1125, 13, 4706, 736, 1583, 17255, 16063, 13, 13, 13, 1678, 822, 679, 29911, 1526, 29898, 1311, 1125, 13, 4706, 736, 1583, 17255, 7050, 13, 13, 13, 1678, 822, 1347, 1917, 29898, 1311, 1125, 13, 4706, 736, 29871, 376, 29950, 398, 333, 537, 29901, 376, 718, 851, 29898, 1311, 29889, 657, 29950, 398, 3101, 718, 376, 242, 191, 136, 29892, 376, 320, 13, 9651, 718, 376, 5776, 862, 1535, 29901, 376, 718, 851, 29898, 1311, 29889, 657, 29911, 1526, 3101, 718, 376, 229, 135, 134, 29908, 13, 13, 13, 1678, 822, 2479, 1917, 29898, 1311, 1125, 13, 4706, 1596, 1583, 29889, 1807, 1917, 580, 13, 13, 13, 13, 1753, 1667, 29918, 7888, 7295, 13, 1678, 1550, 5852, 29901, 13, 4706, 14563, 29877, 29889, 4990, 1917, 580, 13, 4706, 931, 29889, 17059, 29898, 29896, 29897, 13, 13, 13, 361, 4770, 978, 1649, 1275, 525, 1649, 3396, 1649, 2396, 13, 1678, 14563, 29877, 353, 498, 20772, 580, 13, 13, 1678, 1018, 29901, 13, 4706, 1667, 29918, 7888, 580, 13, 1678, 5174, 7670, 3377, 4074, 6685, 29901, 13, 4706, 1596, 376, 2558, 3377, 4124, 6685, 29908, 13, 1678, 396, 7146, 29901, 13, 1678, 396, 268, 14563, 29877, 29889, 9847, 580, 13, 29937, 1275, 4936, 25512, 382, 9800, 1275, 9166, 2751, 13, 2 ]
CoffeeMachine/Config/Services.py
kerusey/FES
7
169385
from getpass import getpass import subprocess from os import system import pathlib import string vncAutostartScript = """ [Desktop Entry] Type=Application Name=TightVNC Exec=vncserver :1 StartupNotify=false """ def vncautostart(): system("sudo mkdir /home/" + GLOBALUSERNAME + "") def getLan(): # OK import netifaces interfaces = netifaces.interfaces() for i in interfaces: if i == 'lo': continue iface = netifaces.ifaddresses(i).get(netifaces.AF_INET) if iface != None: for j in iface: return str(j['addr']) def initSshServer(): # OK print("Creating a new user...") print("Enter new login: ", end="") userName = str(input()) password = str(<PASSWORD>()) system("sudo /usr/sbin/useradd --groups sudo -m " + userName + " -p " + password) print("New user has been successfully added.") ''' # Experemental convertation ! print("Converting data between accounts...") sourcePath = "/home/pi/" destinationPath = "/home/" + userName source = listdir(sourcePath) for item in source: try: move(sourcePath + item, destinationPath) except: print("exception") subprocess.call(["sudo", "deluser", "--remove", "pi"]) ''' print("Establishing SSH server...") system("sudo passwd " + userName) system("sshpass -p " + password + " ssh " + userName + "@" + getLan()) system("sudo systemctl enable ssh") system("sudo systemctl start ssh") return userName def initVncServer(userName): # OK print("Enabling VNC protocol...") password = str(<PASSWORD>()) system("sudo vncserver -p " + password) autostartPath = "/home/" + userName + "/.config/autostart/" pathlib.Path(autostartPath).mkdir(parents=True, exist_ok=True) with open(autostartPath + "tightvnc.desktop", "w") as vncStart: # adding to the autostart vncStart.write(vncAutostartScript) with open("autostart.sh", 'a') as vncStart: vncStart.write("vncserver -p " + password) system("sudo cp autostart.sh /etc/init.d/autostart.sh") system("sudo update-rc.d autostart.sh defaults") system("sudo chmod +x /etc/init.d/autostart.sh") system("rm autostart.sh") def initFtpServer(): # OK print("Establish FTP...") system("sudo groupadd ftpgroup") system("sudo useradd ftpuser -g ftpgroup -s /sbin/nologin -d /dev/null") system("sudo pure-pw useradd upload -u ftpuser -g ftpgroup -d /home/pi -m") system("sudo pure-pw mkdb") system("sudo service pure-ftpd restart")
[ 1, 515, 679, 3364, 1053, 679, 3364, 13, 5215, 1014, 5014, 13, 3166, 2897, 1053, 1788, 13, 5215, 2224, 1982, 13, 5215, 1347, 13, 13, 29894, 17608, 6147, 520, 442, 4081, 353, 9995, 13, 29961, 17600, 28236, 29962, 13, 1542, 29922, 4873, 13, 1170, 29922, 29911, 523, 29963, 15868, 13, 5379, 29922, 29894, 17608, 2974, 584, 29896, 13, 4763, 786, 3664, 1598, 29922, 4541, 13, 15945, 29908, 13, 13, 1753, 325, 29876, 1113, 329, 520, 442, 7295, 13, 12, 5205, 703, 15360, 29356, 847, 5184, 12975, 718, 402, 28902, 1964, 11889, 5813, 718, 20569, 13, 13, 1753, 679, 29931, 273, 7295, 396, 9280, 13, 12, 5215, 7787, 361, 3302, 13, 12, 1639, 8726, 353, 7787, 361, 3302, 29889, 1639, 8726, 580, 13, 12, 1454, 474, 297, 19510, 29901, 13, 12, 12, 361, 474, 1275, 525, 417, 2396, 13, 12, 12, 12, 19878, 13, 12, 12, 361, 815, 353, 7787, 361, 3302, 29889, 361, 7328, 267, 29898, 29875, 467, 657, 29898, 1212, 361, 3302, 29889, 5098, 29918, 1177, 2544, 29897, 13, 12, 12, 361, 565, 815, 2804, 6213, 29901, 13, 12, 12, 12, 1454, 432, 297, 565, 815, 29901, 13, 12, 12, 12, 12, 2457, 851, 29898, 29926, 1839, 10030, 11287, 13, 13, 1753, 2069, 29903, 845, 6004, 7295, 396, 9280, 13, 12, 2158, 703, 9832, 1218, 263, 716, 1404, 856, 1159, 13, 12, 2158, 703, 10399, 716, 6464, 29901, 9162, 1095, 543, 1159, 13, 12, 1792, 1170, 353, 851, 29898, 2080, 3101, 13, 12, 5630, 353, 851, 29898, 29966, 25711, 17013, 29958, 3101, 13, 12, 5205, 703, 15360, 847, 4855, 29914, 29879, 2109, 29914, 1792, 1202, 1192, 13155, 9196, 448, 29885, 376, 718, 1404, 1170, 718, 376, 448, 29886, 376, 718, 4800, 29897, 13, 12, 2158, 703, 4373, 1404, 756, 1063, 8472, 2715, 23157, 13, 12, 12008, 396, 28224, 882, 284, 3588, 362, 1738, 13, 12, 2158, 703, 1168, 369, 1259, 848, 1546, 15303, 856, 1159, 13, 12, 4993, 2605, 353, 5591, 5184, 29914, 1631, 12975, 13, 12, 23848, 2605, 353, 5591, 5184, 12975, 718, 1404, 1170, 13, 12, 4993, 353, 1051, 3972, 29898, 4993, 2605, 29897, 13, 12, 1454, 2944, 297, 2752, 29901, 13, 12, 12, 2202, 29901, 13, 12, 12, 12, 11631, 29898, 4993, 2605, 718, 2944, 29892, 12551, 2605, 29897, 13, 12, 12, 19499, 29901, 13, 12, 12, 12, 2158, 703, 11739, 1159, 13, 13, 12, 1491, 5014, 29889, 4804, 29898, 3366, 15360, 613, 376, 6144, 1792, 613, 376, 489, 5992, 613, 376, 1631, 20068, 13, 12, 12008, 13, 12, 2158, 703, 12787, 370, 1674, 292, 22343, 1923, 856, 1159, 13, 12, 5205, 703, 15360, 1209, 9970, 376, 718, 1404, 1170, 29897, 13, 12, 5205, 703, 15269, 3364, 448, 29886, 376, 718, 4800, 718, 376, 13927, 376, 718, 1404, 1170, 718, 376, 5507, 718, 679, 29931, 273, 3101, 13, 12, 5205, 703, 15360, 1788, 16948, 9025, 13927, 1159, 13, 12, 5205, 703, 15360, 1788, 16948, 1369, 13927, 1159, 13, 12, 2457, 1404, 1170, 13, 13, 1753, 2069, 29963, 17608, 6004, 29898, 1792, 1170, 1125, 396, 9280, 13, 12, 2158, 703, 2369, 17961, 478, 15868, 9608, 856, 1159, 13, 12, 5630, 353, 851, 29898, 29966, 25711, 17013, 29958, 3101, 13, 12, 5205, 703, 15360, 325, 17608, 2974, 448, 29886, 376, 718, 4800, 29897, 13, 12, 1300, 520, 442, 2605, 353, 5591, 5184, 12975, 718, 1404, 1170, 718, 5591, 29889, 2917, 29914, 1300, 520, 442, 12975, 13, 13, 12, 2084, 1982, 29889, 2605, 29898, 1300, 520, 442, 2605, 467, 11256, 3972, 29898, 862, 1237, 29922, 5574, 29892, 1863, 29918, 554, 29922, 5574, 29897, 13, 12, 2541, 1722, 29898, 1300, 520, 442, 2605, 718, 376, 29873, 523, 29894, 17608, 29889, 20858, 613, 376, 29893, 1159, 408, 325, 17608, 4763, 29901, 396, 4417, 304, 278, 1120, 520, 442, 13, 12, 12, 29894, 17608, 4763, 29889, 3539, 29898, 29894, 17608, 6147, 520, 442, 4081, 29897, 13, 12, 2541, 1722, 703, 1300, 520, 442, 29889, 845, 613, 525, 29874, 1495, 408, 325, 17608, 4763, 29901, 13, 12, 12, 29894, 17608, 4763, 29889, 3539, 703, 29894, 17608, 2974, 448, 29886, 376, 718, 4800, 29897, 13, 13, 12, 5205, 703, 15360, 21447, 1120, 520, 442, 29889, 845, 847, 7070, 29914, 2344, 29889, 29881, 29914, 1300, 520, 442, 29889, 845, 1159, 13, 12, 5205, 703, 15360, 2767, 29899, 2214, 29889, 29881, 1120, 520, 442, 29889, 845, 21274, 1159, 13, 12, 5205, 703, 15360, 521, 1545, 718, 29916, 847, 7070, 29914, 2344, 29889, 29881, 29914, 1300, 520, 442, 29889, 845, 1159, 13, 12, 5205, 703, 1758, 1120, 520, 442, 29889, 845, 1159, 13, 13, 1753, 2069, 29943, 9392, 6004, 7295, 396, 9280, 13, 12, 2158, 703, 12787, 370, 1674, 383, 3557, 856, 1159, 13, 12, 5205, 703, 15360, 2318, 1202, 285, 9392, 2972, 1159, 13, 12, 5205, 703, 15360, 1404, 1202, 285, 9392, 1792, 448, 29887, 285, 9392, 2972, 448, 29879, 847, 29879, 2109, 29914, 29876, 1189, 262, 448, 29881, 847, 3359, 29914, 4304, 1159, 13, 12, 5205, 703, 15360, 8296, 29899, 29886, 29893, 1404, 1202, 6441, 448, 29884, 285, 9392, 1792, 448, 29887, 285, 9392, 2972, 448, 29881, 847, 5184, 29914, 1631, 448, 29885, 1159, 13, 12, 5205, 703, 15360, 8296, 29899, 29886, 29893, 14690, 2585, 1159, 13, 12, 5205, 703, 15360, 2669, 8296, 29899, 615, 15926, 10715, 1159, 13, 2 ]
venv/Lib/site-packages/zmq/tests/test_draft.py
ajayiagbebaku/NFL-Model
603
4103
# -*- coding: utf8 -*- # Copyright (C) PyZMQ Developers # Distributed under the terms of the Modified BSD License. import os import platform import time import pytest import zmq from zmq.tests import BaseZMQTestCase, skip_pypy class TestDraftSockets(BaseZMQTestCase): def setUp(self): if not zmq.DRAFT_API: raise pytest.skip("draft api unavailable") super(TestDraftSockets, self).setUp() def test_client_server(self): client, server = self.create_bound_pair(zmq.CLIENT, zmq.SERVER) client.send(b'request') msg = self.recv(server, copy=False) assert msg.routing_id is not None server.send(b'reply', routing_id=msg.routing_id) reply = self.recv(client) assert reply == b'reply' def test_radio_dish(self): dish, radio = self.create_bound_pair(zmq.DISH, zmq.RADIO) dish.rcvtimeo = 250 group = 'mygroup' dish.join(group) received_count = 0 received = set() sent = set() for i in range(10): msg = str(i).encode('ascii') sent.add(msg) radio.send(msg, group=group) try: recvd = dish.recv() except zmq.Again: time.sleep(0.1) else: received.add(recvd) received_count += 1 # assert that we got *something* assert len(received.intersection(sent)) >= 5
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29947, 448, 29930, 29899, 13, 29937, 14187, 1266, 313, 29907, 29897, 10772, 29999, 25566, 10682, 414, 13, 29937, 6652, 7541, 1090, 278, 4958, 310, 278, 3382, 2164, 350, 7230, 19245, 29889, 13, 13, 5215, 2897, 13, 5215, 7481, 13, 5215, 931, 13, 13, 5215, 11451, 1688, 13, 5215, 12162, 29939, 13, 3166, 12162, 29939, 29889, 21150, 1053, 7399, 29999, 25566, 3057, 8259, 29892, 14383, 29918, 29886, 1478, 29891, 13, 13, 13, 1990, 4321, 29928, 4154, 29903, 1698, 1691, 29898, 5160, 29999, 25566, 3057, 8259, 1125, 13, 1678, 822, 731, 3373, 29898, 1311, 1125, 13, 4706, 565, 451, 12162, 29939, 29889, 29928, 4717, 7818, 29918, 8787, 29901, 13, 9651, 12020, 11451, 1688, 29889, 11014, 703, 29881, 4154, 7882, 443, 16515, 1159, 13, 4706, 2428, 29898, 3057, 29928, 4154, 29903, 1698, 1691, 29892, 1583, 467, 842, 3373, 580, 13, 13, 1678, 822, 1243, 29918, 4645, 29918, 2974, 29898, 1311, 1125, 13, 4706, 3132, 29892, 1923, 353, 1583, 29889, 3258, 29918, 9917, 29918, 18784, 29898, 14018, 29939, 29889, 27205, 3919, 29892, 12162, 29939, 29889, 18603, 29897, 13, 4706, 3132, 29889, 6717, 29898, 29890, 29915, 3827, 1495, 13, 4706, 10191, 353, 1583, 29889, 3757, 29894, 29898, 2974, 29892, 3509, 29922, 8824, 29897, 13, 4706, 4974, 10191, 29889, 14608, 292, 29918, 333, 338, 451, 6213, 13, 4706, 1923, 29889, 6717, 29898, 29890, 29915, 3445, 368, 742, 21398, 29918, 333, 29922, 7645, 29889, 14608, 292, 29918, 333, 29897, 13, 4706, 8908, 353, 1583, 29889, 3757, 29894, 29898, 4645, 29897, 13, 4706, 4974, 8908, 1275, 289, 29915, 3445, 368, 29915, 13, 13, 1678, 822, 1243, 29918, 13399, 29918, 29881, 728, 29898, 1311, 1125, 13, 4706, 270, 728, 29892, 7155, 353, 1583, 29889, 3258, 29918, 9917, 29918, 18784, 29898, 14018, 29939, 29889, 23711, 29950, 29892, 12162, 29939, 29889, 29934, 3035, 5971, 29897, 13, 4706, 270, 728, 29889, 2214, 29894, 2230, 29877, 353, 29871, 29906, 29945, 29900, 13, 4706, 2318, 353, 525, 1357, 2972, 29915, 13, 4706, 270, 728, 29889, 7122, 29898, 2972, 29897, 13, 4706, 4520, 29918, 2798, 353, 29871, 29900, 13, 4706, 4520, 353, 731, 580, 13, 4706, 2665, 353, 731, 580, 13, 4706, 363, 474, 297, 3464, 29898, 29896, 29900, 1125, 13, 9651, 10191, 353, 851, 29898, 29875, 467, 12508, 877, 294, 18869, 1495, 13, 9651, 2665, 29889, 1202, 29898, 7645, 29897, 13, 9651, 7155, 29889, 6717, 29898, 7645, 29892, 2318, 29922, 2972, 29897, 13, 9651, 1018, 29901, 13, 18884, 1162, 27491, 353, 270, 728, 29889, 3757, 29894, 580, 13, 9651, 5174, 12162, 29939, 29889, 14769, 475, 29901, 13, 18884, 931, 29889, 17059, 29898, 29900, 29889, 29896, 29897, 13, 9651, 1683, 29901, 13, 18884, 4520, 29889, 1202, 29898, 3757, 27491, 29897, 13, 18884, 4520, 29918, 2798, 4619, 29871, 29896, 13, 4706, 396, 4974, 393, 591, 2355, 334, 14481, 29930, 13, 4706, 4974, 7431, 29898, 13556, 2347, 29889, 1639, 2042, 29898, 18616, 876, 6736, 29871, 29945, 13, 2 ]
report-conf/generate_report.py
sdinot/pytest-executable
0
84558
#! /usr/bin/env python # Copyright 2020 CS Systemes d'Information, http://www.c-s.fr # # This file is part of pytest-executable # https://www.github.com/CS-SI/pytest-executable # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """This module generates the test report. It shall be called from the test output root directory where the tests report database file is (tests_report_db.yaml). Under the output root directory, it will create a: - the index.rst file from the index_template.rst, - the directory named report that contains the generated report. In the template index, the summary table and the table of content are inserted. A line of the summary table contains a case: - path relative to the output root directory, - test status (passed, failed, error) - test messages when the status is not passed The table of content contains the path to the description.rst files relative to the output root directory. This module requires the packages tabulate and sphinx, these could be installed with the command: conda install tabluate sphinx """ import subprocess import textwrap from pathlib import Path from typing import List, Tuple import yaml from tabulate import tabulate # indentation used in the toc tree of the index template TOCTREE_INDENTATION = " " # name of the directory under the test output directory that will contain the # generated report REPORT_OUTPUT_DIRNAME = "report" # description file name in each test case output directory DESCRIPTION_FILENAME = "description.rst" # the directory that contains the current module DOC_GENERATOR_DIRPATH = Path(__file__).parent # sphinx documentation builder type DOC_BUILDER = "html" # name of the test report database REPORT_DB_FILENAME = "tests_report_db.yaml" # template file for creating the index.rst INDEX_TEMPLATE_RST = "index_template.rst" def create_summary_table(output_root: Path) -> str: """Create the summary table in rst. The summary table is sorted alphabetically. Args: output_root: Path to the test results output directory. Returns: The summary table string in rst format. """ with (output_root / REPORT_DB_FILENAME).open() as stream: report_db = yaml.safe_load(stream) report_data: List[Tuple[str]] = [] for case, data in report_db.items(): messages = "\n".join(data.get("messages", [])) report_data += [(case, data["status"], messages)] return tabulate( sorted(report_data), headers=["Case", "Status", "Messages"], tablefmt="rst" ) def create_index_rst(output_root: Path) -> None: """Create the index.rst. Args: output_root: Path to the test results output directory. """ # check that the output directory exists output_root = Path(output_root).resolve(True) # find the paths to the description rst files relatively to the output_root description_paths: List[Path] = [] for path in output_root.glob(f"**/{DESCRIPTION_FILENAME}"): description_paths += [path.relative_to(output_root)] summary_table = create_summary_table(output_root) # the toc tree is sorted alphabetically like the summary table toctree_cases = textwrap.indent( "\n".join(map(str, sorted(description_paths))), TOCTREE_INDENTATION ) # read the index template index_template_path = DOC_GENERATOR_DIRPATH / INDEX_TEMPLATE_RST with index_template_path.open() as stream: index_rst_template = stream.read() # replace the placeholders in the template index_rst = index_rst_template.format( summary_table=summary_table, toctree_cases=toctree_cases ) # write the final index.rst index_path = output_root / "index.rst" with index_path.open("w") as stream: stream.write(index_rst) if __name__ == "__main__": # common working directory shall be the test output root directory output_root = Path.cwd() # create the report index.rst create_index_rst(output_root) # command line to build the report cmd = ( f"sphinx-build -b {DOC_BUILDER} -c {DOC_GENERATOR_DIRPATH} " f"{output_root} {output_root}/{REPORT_OUTPUT_DIRNAME}" ) # build the report subprocess.run(cmd.split(), check=True)
[ 1, 396, 29991, 847, 4855, 29914, 2109, 29914, 6272, 3017, 13, 13, 29937, 14187, 1266, 29871, 29906, 29900, 29906, 29900, 21107, 2184, 267, 270, 29915, 20350, 29892, 1732, 597, 1636, 29889, 29883, 29899, 29879, 29889, 1341, 13, 29937, 13, 29937, 910, 934, 338, 760, 310, 11451, 1688, 29899, 4258, 9246, 13, 29937, 268, 2045, 597, 1636, 29889, 3292, 29889, 510, 29914, 9295, 29899, 5425, 29914, 2272, 1688, 29899, 4258, 9246, 13, 29937, 13, 29937, 10413, 21144, 1090, 278, 13380, 19245, 29892, 10079, 29871, 29906, 29889, 29900, 313, 1552, 376, 29931, 293, 1947, 1496, 13, 29937, 366, 1122, 451, 671, 445, 934, 5174, 297, 752, 13036, 411, 278, 19245, 29889, 13, 29937, 887, 1122, 4017, 263, 3509, 310, 278, 19245, 472, 13, 29937, 13, 29937, 268, 1732, 597, 1636, 29889, 4288, 29889, 990, 29914, 506, 11259, 29914, 27888, 1430, 1660, 29899, 29906, 29889, 29900, 13, 29937, 13, 29937, 25870, 3734, 491, 22903, 4307, 470, 15502, 304, 297, 5007, 29892, 7047, 13, 29937, 13235, 1090, 278, 19245, 338, 13235, 373, 385, 376, 3289, 8519, 29908, 350, 3289, 3235, 29892, 13, 29937, 399, 1806, 8187, 2692, 399, 1718, 29934, 13566, 29059, 6323, 8707, 29928, 22122, 29903, 8079, 13764, 29979, 476, 22255, 29892, 2845, 4653, 470, 2411, 2957, 29889, 13, 29937, 2823, 278, 19245, 363, 278, 2702, 4086, 14765, 1076, 11239, 322, 13, 29937, 27028, 1090, 278, 19245, 29889, 13, 13, 15945, 29908, 4013, 3883, 16785, 278, 1243, 3461, 29889, 13, 13, 3112, 4091, 367, 2000, 515, 278, 1243, 1962, 3876, 3884, 988, 278, 6987, 3461, 13, 9803, 934, 338, 313, 21150, 29918, 12276, 29918, 2585, 29889, 25162, 467, 7634, 278, 1962, 3876, 3884, 29892, 372, 13, 14043, 1653, 263, 29901, 13, 29899, 278, 2380, 29889, 29878, 303, 934, 515, 278, 2380, 29918, 6886, 29889, 29878, 303, 29892, 13, 29899, 278, 3884, 4257, 3461, 393, 3743, 278, 5759, 3461, 29889, 13, 13, 797, 278, 4472, 2380, 29892, 278, 15837, 1591, 322, 278, 1591, 310, 2793, 526, 15478, 29889, 13, 29909, 1196, 310, 278, 15837, 1591, 3743, 263, 1206, 29901, 13, 29899, 2224, 6198, 304, 278, 1962, 3876, 3884, 29892, 13, 29899, 1243, 4660, 313, 3364, 287, 29892, 5229, 29892, 1059, 29897, 13, 29899, 1243, 7191, 746, 278, 4660, 338, 451, 4502, 13, 1576, 1591, 310, 2793, 3743, 278, 2224, 304, 278, 6139, 29889, 29878, 303, 2066, 6198, 304, 13, 1552, 1962, 3876, 3884, 29889, 13, 13, 4013, 3883, 6858, 278, 9741, 4434, 5987, 322, 269, 561, 14668, 29892, 1438, 1033, 367, 5130, 13, 2541, 278, 1899, 29901, 378, 1388, 2601, 4434, 6092, 403, 269, 561, 14668, 13, 15945, 29908, 13, 13, 5215, 1014, 5014, 13, 5215, 1426, 6312, 13, 3166, 2224, 1982, 1053, 10802, 13, 3166, 19229, 1053, 2391, 29892, 12603, 552, 13, 13, 5215, 343, 8807, 13, 13, 3166, 4434, 5987, 1053, 4434, 5987, 13, 13, 29937, 1399, 9233, 1304, 297, 278, 304, 29883, 5447, 310, 278, 2380, 4472, 13, 4986, 1783, 21661, 29918, 22255, 3919, 8098, 353, 376, 259, 376, 13, 29937, 1024, 310, 278, 3884, 1090, 278, 1243, 1962, 3884, 393, 674, 1712, 278, 13, 29937, 5759, 3461, 13, 1525, 15082, 29918, 12015, 12336, 29918, 9464, 5813, 353, 376, 12276, 29908, 13, 29937, 6139, 934, 1024, 297, 1269, 1243, 1206, 1962, 3884, 13, 2287, 7187, 24290, 2725, 29918, 7724, 5813, 353, 376, 8216, 29889, 29878, 303, 29908, 13, 29937, 278, 3884, 393, 3743, 278, 1857, 3883, 13, 28665, 29918, 24647, 1001, 1299, 1955, 29918, 9464, 10145, 353, 10802, 22168, 1445, 1649, 467, 3560, 13, 29937, 269, 561, 14668, 5106, 12856, 1134, 13, 28665, 29918, 29933, 3120, 29931, 8032, 353, 376, 1420, 29908, 13, 29937, 1024, 310, 278, 1243, 3461, 2566, 13, 1525, 15082, 29918, 4051, 29918, 7724, 5813, 353, 376, 21150, 29918, 12276, 29918, 2585, 29889, 25162, 29908, 13, 29937, 4472, 934, 363, 4969, 278, 2380, 29889, 29878, 303, 13, 27992, 29918, 4330, 3580, 29931, 3040, 29918, 29934, 1254, 353, 376, 2248, 29918, 6886, 29889, 29878, 303, 29908, 13, 13, 13, 1753, 1653, 29918, 7727, 29918, 2371, 29898, 4905, 29918, 4632, 29901, 10802, 29897, 1599, 851, 29901, 13, 1678, 9995, 4391, 278, 15837, 1591, 297, 364, 303, 29889, 13, 13, 1678, 450, 15837, 1591, 338, 12705, 22968, 1711, 29889, 13, 13, 1678, 826, 3174, 29901, 13, 4706, 1962, 29918, 4632, 29901, 10802, 304, 278, 1243, 2582, 1962, 3884, 29889, 13, 13, 1678, 16969, 29901, 13, 4706, 450, 15837, 1591, 1347, 297, 364, 303, 3402, 29889, 13, 1678, 9995, 13, 1678, 411, 313, 4905, 29918, 4632, 847, 5195, 15082, 29918, 4051, 29918, 7724, 5813, 467, 3150, 580, 408, 4840, 29901, 13, 4706, 3461, 29918, 2585, 353, 343, 8807, 29889, 11177, 29918, 1359, 29898, 5461, 29897, 13, 13, 1678, 3461, 29918, 1272, 29901, 2391, 29961, 23215, 552, 29961, 710, 5262, 353, 5159, 13, 1678, 363, 1206, 29892, 848, 297, 3461, 29918, 2585, 29889, 7076, 7295, 13, 4706, 7191, 353, 6634, 29876, 1642, 7122, 29898, 1272, 29889, 657, 703, 19158, 613, 5159, 876, 13, 4706, 3461, 29918, 1272, 4619, 17288, 4878, 29892, 848, 3366, 4882, 12436, 7191, 4638, 13, 13, 1678, 736, 4434, 5987, 29898, 13, 4706, 12705, 29898, 12276, 29918, 1272, 511, 9066, 29922, 3366, 8259, 613, 376, 5709, 613, 376, 25510, 12436, 1591, 23479, 543, 29878, 303, 29908, 13, 1678, 1723, 13, 13, 13, 1753, 1653, 29918, 2248, 29918, 29878, 303, 29898, 4905, 29918, 4632, 29901, 10802, 29897, 1599, 6213, 29901, 13, 1678, 9995, 4391, 278, 2380, 29889, 29878, 303, 29889, 13, 13, 1678, 826, 3174, 29901, 13, 4706, 1962, 29918, 4632, 29901, 10802, 304, 278, 1243, 2582, 1962, 3884, 29889, 13, 1678, 9995, 13, 1678, 396, 1423, 393, 278, 1962, 3884, 4864, 13, 1678, 1962, 29918, 4632, 353, 10802, 29898, 4905, 29918, 4632, 467, 17863, 29898, 5574, 29897, 13, 13, 1678, 396, 1284, 278, 10898, 304, 278, 6139, 364, 303, 2066, 13774, 304, 278, 1962, 29918, 4632, 13, 1678, 6139, 29918, 24772, 29901, 2391, 29961, 2605, 29962, 353, 5159, 13, 1678, 363, 2224, 297, 1962, 29918, 4632, 29889, 23705, 29898, 29888, 29908, 1068, 19248, 2287, 7187, 24290, 2725, 29918, 7724, 5813, 5038, 1125, 13, 4706, 6139, 29918, 24772, 4619, 518, 2084, 29889, 22925, 29918, 517, 29898, 4905, 29918, 4632, 4638, 13, 13, 1678, 15837, 29918, 2371, 353, 1653, 29918, 7727, 29918, 2371, 29898, 4905, 29918, 4632, 29897, 13, 13, 1678, 396, 278, 304, 29883, 5447, 338, 12705, 22968, 1711, 763, 278, 15837, 1591, 13, 1678, 304, 312, 929, 29918, 11436, 353, 1426, 6312, 29889, 12860, 29898, 13, 4706, 6634, 29876, 1642, 7122, 29898, 1958, 29898, 710, 29892, 12705, 29898, 8216, 29918, 24772, 876, 511, 7495, 1783, 21661, 29918, 22255, 3919, 8098, 13, 1678, 1723, 13, 13, 1678, 396, 1303, 278, 2380, 4472, 13, 1678, 2380, 29918, 6886, 29918, 2084, 353, 11662, 29907, 29918, 24647, 1001, 1299, 1955, 29918, 9464, 10145, 847, 2672, 19577, 29918, 4330, 3580, 29931, 3040, 29918, 29934, 1254, 13, 1678, 411, 2380, 29918, 6886, 29918, 2084, 29889, 3150, 580, 408, 4840, 29901, 13, 4706, 2380, 29918, 29878, 303, 29918, 6886, 353, 4840, 29889, 949, 580, 13, 13, 1678, 396, 5191, 278, 2058, 8948, 414, 297, 278, 4472, 13, 1678, 2380, 29918, 29878, 303, 353, 2380, 29918, 29878, 303, 29918, 6886, 29889, 4830, 29898, 13, 4706, 15837, 29918, 2371, 29922, 7727, 29918, 2371, 29892, 304, 312, 929, 29918, 11436, 29922, 517, 312, 929, 29918, 11436, 13, 1678, 1723, 13, 13, 1678, 396, 2436, 278, 2186, 2380, 29889, 29878, 303, 13, 1678, 2380, 29918, 2084, 353, 1962, 29918, 4632, 847, 376, 2248, 29889, 29878, 303, 29908, 13, 1678, 411, 2380, 29918, 2084, 29889, 3150, 703, 29893, 1159, 408, 4840, 29901, 13, 4706, 4840, 29889, 3539, 29898, 2248, 29918, 29878, 303, 29897, 13, 13, 13, 361, 4770, 978, 1649, 1275, 376, 1649, 3396, 1649, 1115, 13, 1678, 396, 3619, 1985, 3884, 4091, 367, 278, 1243, 1962, 3876, 3884, 13, 1678, 1962, 29918, 4632, 353, 10802, 29889, 29883, 9970, 580, 13, 13, 1678, 396, 1653, 278, 3461, 2380, 29889, 29878, 303, 13, 1678, 1653, 29918, 2248, 29918, 29878, 303, 29898, 4905, 29918, 4632, 29897, 13, 13, 1678, 396, 1899, 1196, 304, 2048, 278, 3461, 13, 1678, 9920, 353, 313, 13, 4706, 285, 29908, 29879, 561, 14668, 29899, 4282, 448, 29890, 426, 28665, 29918, 29933, 3120, 29931, 8032, 29913, 448, 29883, 426, 28665, 29918, 24647, 1001, 1299, 1955, 29918, 9464, 10145, 29913, 376, 13, 4706, 285, 29908, 29912, 4905, 29918, 4632, 29913, 426, 4905, 29918, 4632, 6822, 29912, 1525, 15082, 29918, 12015, 12336, 29918, 9464, 5813, 5038, 13, 1678, 1723, 13, 13, 1678, 396, 2048, 278, 3461, 13, 1678, 1014, 5014, 29889, 3389, 29898, 9006, 29889, 5451, 3285, 1423, 29922, 5574, 29897, 13, 2 ]
python/data_sutram/scraper/perform__.py
SayanGhoshBDA/code-backup
16
122263
<filename>python/data_sutram/scraper/perform__.py<gh_stars>10-100 import json from selenium import webdriver from selenium.webdriver.common.desired_capabilities import DesiredCapabilities options = webdriver.ChromeOptions() #options.binary_location = "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" chrome_driver_binary = "../chromedriver" driver = webdriver.Chrome(chrome_driver_binary, chrome_options=options) """ caps = DesiredCapabilities.CHROME caps['loggingPrefs'] = {'performance': 'ALL'} driver = webdriver.Chrome(desired_capabilities=caps) """ driver.get('https://stackoverflow.com/questions/52633697/selenium-python-how-to-capture-network-traffics-response') def process_browser_log_entry(entry): response = json.loads(entry['message'])['message'] return response browser_log = driver.get_log('performance') events = [process_browser_log_entry(entry) for entry in browser_log] events = [event for event in events if 'Network.response' in event['method']] print(events)
[ 1, 529, 9507, 29958, 4691, 29914, 1272, 29918, 29879, 329, 2572, 29914, 1557, 336, 546, 29914, 19826, 26914, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29900, 29899, 29896, 29900, 29900, 13, 5215, 4390, 13, 3166, 18866, 1053, 1856, 9465, 13, 3166, 18866, 29889, 29813, 29889, 9435, 29889, 2783, 2859, 29918, 5030, 11614, 1053, 2726, 2859, 12415, 11614, 13, 13, 6768, 353, 1856, 9465, 29889, 1451, 4871, 5856, 580, 13, 29937, 6768, 29889, 19541, 29918, 5479, 353, 5591, 2052, 5795, 29914, 14207, 10228, 29889, 932, 29914, 21002, 29914, 15735, 3267, 29914, 14207, 10228, 29908, 13, 18114, 29918, 9465, 29918, 19541, 353, 376, 6995, 27433, 287, 3511, 29908, 13, 9465, 353, 1856, 9465, 29889, 1451, 4871, 29898, 18114, 29918, 9465, 29918, 19541, 29892, 16735, 29918, 6768, 29922, 6768, 29897, 13, 15945, 29908, 13, 29883, 2547, 353, 2726, 2859, 12415, 11614, 29889, 3210, 1672, 2303, 13, 29883, 2547, 1839, 21027, 29925, 24539, 2033, 353, 11117, 546, 13390, 2396, 525, 9818, 10827, 13, 9465, 353, 1856, 9465, 29889, 1451, 4871, 29898, 2783, 2859, 29918, 5030, 11614, 29922, 29883, 2547, 29897, 13, 15945, 29908, 13, 9465, 29889, 657, 877, 991, 597, 2417, 29889, 510, 29914, 2619, 29914, 29945, 29906, 29953, 29941, 29941, 29953, 29929, 29955, 29914, 27373, 29899, 4691, 29899, 3525, 29899, 517, 29899, 17885, 545, 29899, 11618, 29899, 3018, 600, 1199, 29899, 5327, 1495, 13, 13, 1753, 1889, 29918, 15965, 29918, 1188, 29918, 8269, 29898, 8269, 1125, 13, 1678, 2933, 353, 4390, 29889, 18132, 29898, 8269, 1839, 4906, 11287, 1839, 4906, 2033, 13, 1678, 736, 2933, 13, 13, 15965, 29918, 1188, 353, 7156, 29889, 657, 29918, 1188, 877, 546, 13390, 1495, 29871, 13, 13604, 353, 518, 5014, 29918, 15965, 29918, 1188, 29918, 8269, 29898, 8269, 29897, 363, 6251, 297, 4714, 29918, 1188, 29962, 13, 13604, 353, 518, 3696, 363, 1741, 297, 4959, 565, 525, 13724, 29889, 5327, 29915, 297, 1741, 1839, 5696, 2033, 29962, 13, 2158, 29898, 13604, 29897, 2 ]
buildchain/buildchain/versions.py
zarumaru/metalk8s
0
73060
<filename>buildchain/buildchain/versions.py<gh_stars>0 # coding: utf-8 """Authoritative listing of image and package versions used in the project. This module MUST be kept valid in a standalone context, since it is intended for use in tests and documentation as well. """ import operator from collections import namedtuple from pathlib import Path from typing import cast, Dict, Optional, Tuple Image = namedtuple('Image', ('name', 'version', 'digest')) # Project-wide versions {{{ CALICO_VERSION : str = '3.8.2' K8S_VERSION : str = '1.15.12' SALT_VERSION : str = '3000.3' def load_version_information() -> None: """Load version information from `VERSION`.""" to_update = { 'VERSION_MAJOR', 'VERSION_MINOR', 'VERSION_PATCH', 'VERSION_SUFFIX' } with VERSION_FILE.open('r', encoding='utf-8') as fp: for line in fp: name, _, value = line.strip().partition('=') # Don't overwrite random variables by trusting an external file. var = name.strip() if var in to_update: globals()[var] = value.strip() VERSION_FILE = (Path(__file__)/'../../../VERSION').resolve() # Metalk8s version. # (Those declarations are not mandatory, but they help pylint and mypy). VERSION_MAJOR : str VERSION_MINOR : str VERSION_PATCH : str VERSION_SUFFIX : str load_version_information() SHORT_VERSION : str = '{}.{}'.format(VERSION_MAJOR, VERSION_MINOR) VERSION : str = '{}.{}{}'.format(SHORT_VERSION, VERSION_PATCH, VERSION_SUFFIX) # }}} # Container images {{{ CENTOS_BASE_IMAGE : str = 'docker.io/centos' CENTOS_BASE_IMAGE_SHA256 : str = \ '6ae4cddb2b37f889afd576a17a5286b311dcbf10a904409670827f6f9b50065e' GRAFANA_IMAGE_VERSION : str = '6.7.4' NGINX_IMAGE_VERSION : str = '1.15.8' NODEJS_IMAGE_VERSION : str = '10.16.0' # Current build IDs, to be augmented whenever we rebuild the corresponding # image, e.g. because the `Dockerfile` is changed, or one of the dependencies # installed in the image needs to be updated. # This should be reset to 1 when the service exposed by the container changes # version. SALT_MASTER_BUILD_ID = 1 def _version_prefix(version: str, prefix: str = 'v') -> str: return "{}{}".format(prefix, version) # Digests are quite a mouthful, so: # pylint:disable=line-too-long CONTAINER_IMAGES : Tuple[Image, ...] = ( # Remote images Image( name='alertmanager', version='v0.19.0', digest='sha256:7dbf4949a317a056d11ed8f379826b04d0665fad5b9334e1d69b23e946056cd3', ), Image( name='calico-node', version=_version_prefix(CALICO_VERSION), digest='sha256:6679ccc9f19dba3eb084db991c788dc9661ad3b5d5bafaa3379644229dca6b05', ), Image( name='calico-kube-controllers', version=_version_prefix(CALICO_VERSION), digest='sha256:cf461efd25ee74d1855e1ee26db98fe87de00293f7d039212adb03c91fececcd', ), Image( name='configmap-reload', version='v0.0.1', digest='sha256:e2fd60ff0ae4500a75b80ebaa30e0e7deba9ad107833e8ca53f0047c42c5a057', ), Image( name='coredns', version='1.3.1', digest='sha256:02382353821b12c21b062c59184e227e001079bb13ebd01f9d3270ba0fcbf1e4', ), Image( name='etcd', version='3.3.10', digest='sha256:17da501f5d2a675be46040422a27b7cc21b8a43895ac998b171db1c346f361f7', ), Image( name='k8s-sidecar', version='0.1.20', digest='sha256:af151f677a63cdfcdfc18a4e3043520ec506d5e116692e5190f6f765dca42a52', ), Image( name='kube-apiserver', version=_version_prefix(K8S_VERSION), digest='sha256:2168be2ce87258d71beacf2f774ec157dfc28bef991b406e3694077cfc5b9302', ), Image( name='kube-controller-manager', version=_version_prefix(K8S_VERSION), digest='sha256:1c37052f9efb91d4947f2805d32b81d522f5b8b11a05a5550f9b4dc65c91db7f', ), Image( name='kube-proxy', version=_version_prefix(K8S_VERSION), digest='sha256:937cc513f162062f8b2642de08ce6e3877cae5cf58e5276830796749e29cab42', ), Image( name='kube-scheduler', version=_version_prefix(K8S_VERSION), digest='sha256:e2ceb7321239a9587bbb7f3de43743a4b60249c7ed3a953d115217d5dcbbe762', ), Image( name='kube-state-metrics', version='v1.8.0', digest='sha256:f75c3e5c5c7f65846ddd6883d6187b38f77721a3938f241c9e5d0ebe7beb8e19', ), Image( name='nginx', version=NGINX_IMAGE_VERSION, digest='sha256:f09fe80eb0e75e97b04b9dfb065ac3fda37a8fac0161f42fca1e6fe4d0977c80', ), Image( name='nginx-ingress-controller', version='0.26.1', digest='sha256:464db4880861bd9d1e74e67a4a9c975a6e74c1e9968776d8d4cc73492a56dfa5', ), Image( name='nginx-ingress-defaultbackend-amd64', version='1.5', digest='sha256:4dc5e07c8ca4e23bddb3153737d7b8c556e5fb2f29c4558b7cd6e6df99c512c7', ), Image( name='node-exporter', version='v0.18.1', digest='sha256:a2f29256e53cc3e0b64d7a472512600b2e9410347d53cdc85b49f659c17e02ee', ), Image( name='pause', version='3.1', digest='sha256:da86e6ba6ca197bf6bc5e9d900febd906b133eaa4750e6bed647b0fbe50ed43e', ), Image( name='prometheus', version='v2.13.1', digest='sha256:0a8caa2e9f19907608915db6e62a67383fe44b9876a467b297ee6f64e51dd58a', ), Image( name='k8s-prometheus-adapter-amd64', version='v0.5.0', digest='sha256:acf4c4dc6aaa51e3004eebdc410b509db45d1a6ebd255457c5745f0b4671678f', ), Image( name='prometheus-config-reloader', version='v0.34.0', digest='sha256:459bc1b1fc51420cd244b082fe14444f6d8596997c2e40f52c08d1f5a09ab860', ), Image( name='prometheus-operator', version='v0.34.0', digest='sha256:c0bcb231fe67cd11fd26f7adf5ac1080dfac189ac94705538bd4ab7dd99a98a9', ), # Local images Image( name='grafana', version=GRAFANA_IMAGE_VERSION, digest=None, ), Image( name='metalk8s-ui', version=VERSION, digest=None, ), Image( name='metalk8s-utils', version=VERSION, digest=None, ), Image( name='salt-master', version='{version}-{build_id}'.format( version=SALT_VERSION, build_id=SALT_MASTER_BUILD_ID ), digest=None, ), Image( name='storage-operator', version='latest', digest=None, ), ) CONTAINER_IMAGES_MAP = {image.name: image for image in CONTAINER_IMAGES} # }}} # Packages {{{ class PackageVersion: """A package's authoritative version data. This class contains version information for a named package, and provides helper methods for formatting version/release data as well as version-enriched package name, for all supported OS families. """ def __init__( self, name: str, version: Optional[str] = None, release: Optional[str] = None, override: Optional[str] = None ): """Initializes a package version. Arguments: name: the name of the package version: the version of the package release: the release of the package """ self._name = name self._version = version self._release = release self._override = override name = property(operator.attrgetter('_name')) version = property(operator.attrgetter('_version')) release = property(operator.attrgetter('_release')) override = property(operator.attrgetter('_override')) @property def full_version(self) -> Optional[str]: """The full package version string.""" full_version = None if self.version: full_version = self.version if self.release: full_version = '{}-{}'.format(self.version, self.release) return full_version @property def rpm_full_name(self) -> str: """The package's full name in RPM conventions.""" if self.full_version: return '{}-{}'.format(self.name, self.full_version) return cast(str, self.name) @property def deb_full_name(self) -> str: """The package's full name in DEB conventions.""" if self.full_version: return '{}={}'.format(self.name, self.full_version) return cast(str, self.name) # The authoritative list of packages required. # # Common packages are packages for which we need not care about OS-specific # divergences. # # In this case, either: # * the _latest_ version is good enough, and will be the one # selected by the package managers (so far: apt and yum). # * we have strict version requirements that span OS families, and the # version schemes _and_ package names do not diverge # # Strict version requirements are notably: # * kubelet and kubectl which _make_ the K8s version of the cluster # * salt-minion which _makes_ the Salt version of the cluster # # These common packages may be overridden by OS-specific packages if package # names or version conventions diverge. # # Packages that we build ourselves require a version and release as part of # their build process. PACKAGES: Dict[str, Tuple[PackageVersion, ...]] = { 'common': ( # Pinned packages PackageVersion(name='kubectl', version=K8S_VERSION), PackageVersion(name='kubelet', version=K8S_VERSION), # Latest packages PackageVersion(name='containerd'), PackageVersion(name='coreutils'), PackageVersion(name='cri-tools'), PackageVersion(name='e2fsprogs'), PackageVersion(name='ebtables'), PackageVersion(name='ethtool'), PackageVersion(name='genisoimage'), PackageVersion(name='iproute'), PackageVersion(name='iptables'), PackageVersion(name='kubernetes-cni'), PackageVersion(name='m2crypto'), PackageVersion(name='runc'), PackageVersion(name='salt-minion', version=SALT_VERSION), PackageVersion(name='socat'), PackageVersion(name='sos'), # TODO download built package dependencies PackageVersion(name='util-linux'), PackageVersion(name='xfsprogs'), ), 'redhat': ( PackageVersion( name='calico-cni-plugin', version=CALICO_VERSION, release='1.el7' ), PackageVersion(name='container-selinux'), # TODO #1710 PackageVersion( name='metalk8s-sosreport', version=SHORT_VERSION, release='1.el7' ), PackageVersion(name='yum-plugin-versionlock'), PackageVersion(name='yum-utils'), ), 'debian': ( PackageVersion( name='calico-cni-plugin', version=CALICO_VERSION, release='1' ), PackageVersion(name='iproute2', override='iproute'), PackageVersion( name='metalk8s-sosreport', version=SHORT_VERSION, release='1' ), PackageVersion(name='python-m2crypto', override='m2crypto'), PackageVersion(name='sosreport', override='sos'), ), } def _list_pkgs_for_os_family(os_family: str) -> Tuple[PackageVersion, ...]: """List downloaded packages for a given OS family. Arguments: os_family: OS_family for which to list packages """ common_pkgs = PACKAGES['common'] os_family_pkgs = PACKAGES.get(os_family) if os_family_pkgs is None: raise Exception('No packages for OS family: {}'.format(os_family)) os_override_names = [ pkg.override for pkg in os_family_pkgs if pkg.override is not None ] overridden = filter( lambda item: item.name not in os_override_names, common_pkgs ) return tuple(overridden) + os_family_pkgs RPM_PACKAGES = _list_pkgs_for_os_family('redhat') RPM_PACKAGES_MAP = {pkg.name: pkg for pkg in RPM_PACKAGES} DEB_PACKAGES = _list_pkgs_for_os_family('debian') DEB_PACKAGES_MAP = {pkg.name: pkg for pkg in DEB_PACKAGES} # }}}
[ 1, 529, 9507, 29958, 4282, 14153, 29914, 4282, 14153, 29914, 26100, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 14137, 29901, 23616, 29899, 29947, 13, 13, 13, 15945, 29908, 13720, 23378, 18028, 310, 1967, 322, 3577, 6910, 1304, 297, 278, 2060, 29889, 13, 13, 4013, 3883, 341, 17321, 367, 8126, 2854, 297, 263, 2317, 18785, 3030, 29892, 1951, 372, 338, 9146, 13, 1454, 671, 297, 6987, 322, 5106, 408, 1532, 29889, 13, 15945, 29908, 13, 5215, 5455, 13, 13, 3166, 16250, 1053, 4257, 23583, 13, 3166, 2224, 1982, 1053, 10802, 13, 3166, 19229, 1053, 4320, 29892, 360, 919, 29892, 28379, 29892, 12603, 552, 13, 13, 13, 2940, 353, 4257, 23583, 877, 2940, 742, 6702, 978, 742, 525, 3259, 742, 525, 7501, 342, 8785, 13, 13, 29937, 8010, 29899, 8157, 6910, 426, 6224, 13, 13, 29907, 1964, 2965, 29949, 29918, 16358, 268, 584, 851, 353, 525, 29941, 29889, 29947, 29889, 29906, 29915, 13, 29968, 29947, 29903, 29918, 16358, 4706, 584, 851, 353, 525, 29896, 29889, 29896, 29945, 29889, 29896, 29906, 29915, 13, 29903, 1964, 29911, 29918, 16358, 539, 584, 851, 353, 525, 29941, 29900, 29900, 29900, 29889, 29941, 29915, 13, 13, 1753, 2254, 29918, 3259, 29918, 19678, 580, 1599, 6213, 29901, 13, 1678, 9995, 5896, 1873, 2472, 515, 421, 16358, 29952, 1213, 15945, 13, 1678, 304, 29918, 5504, 353, 426, 13, 4706, 525, 16358, 29918, 1529, 29967, 1955, 742, 525, 16358, 29918, 16173, 1955, 742, 525, 16358, 29918, 29925, 14789, 742, 525, 16358, 29918, 14605, 29943, 25634, 29915, 13, 1678, 500, 13, 1678, 411, 478, 1001, 13381, 29918, 7724, 29889, 3150, 877, 29878, 742, 8025, 2433, 9420, 29899, 29947, 1495, 408, 285, 29886, 29901, 13, 4706, 363, 1196, 297, 285, 29886, 29901, 13, 9651, 1024, 29892, 17117, 995, 353, 1196, 29889, 17010, 2141, 16707, 877, 29922, 1495, 13, 9651, 396, 3872, 29915, 29873, 26556, 4036, 3651, 491, 9311, 292, 385, 7029, 934, 29889, 13, 9651, 722, 353, 1024, 29889, 17010, 580, 13, 9651, 565, 722, 297, 304, 29918, 5504, 29901, 13, 18884, 13149, 1338, 580, 29961, 1707, 29962, 353, 995, 29889, 17010, 580, 13, 13, 13, 16358, 29918, 7724, 353, 313, 2605, 22168, 1445, 1649, 6802, 29915, 21546, 6995, 16358, 2824, 17863, 580, 13, 13, 29937, 4737, 2235, 29947, 29879, 1873, 29889, 13, 29937, 313, 1349, 852, 28721, 526, 451, 9619, 7606, 29892, 541, 896, 1371, 282, 2904, 524, 322, 590, 2272, 467, 13, 16358, 29918, 1529, 29967, 1955, 29871, 584, 851, 13, 16358, 29918, 16173, 1955, 29871, 584, 851, 13, 16358, 29918, 29925, 14789, 29871, 584, 851, 13, 16358, 29918, 14605, 29943, 25634, 584, 851, 13, 13, 1359, 29918, 3259, 29918, 19678, 580, 13, 13, 7068, 8476, 29918, 16358, 584, 851, 353, 22372, 1836, 8875, 4286, 4830, 29898, 16358, 29918, 1529, 29967, 1955, 29892, 478, 1001, 13381, 29918, 16173, 1955, 29897, 13, 16358, 584, 851, 353, 22372, 1836, 29912, 1157, 29913, 4286, 4830, 29898, 7068, 8476, 29918, 16358, 29892, 478, 1001, 13381, 29918, 29925, 14789, 29892, 478, 1001, 13381, 29918, 14605, 29943, 25634, 29897, 13, 13, 13, 29937, 500, 930, 13, 29937, 21679, 4558, 426, 6224, 13, 13, 29907, 3919, 3267, 29918, 25416, 29918, 2382, 584, 851, 353, 525, 14695, 29889, 601, 29914, 1760, 359, 29915, 13, 29907, 3919, 3267, 29918, 25416, 29918, 2382, 29918, 23498, 29906, 29945, 29953, 584, 851, 353, 320, 13, 1678, 525, 29953, 3660, 29946, 29883, 1289, 29890, 29906, 29890, 29941, 29955, 29888, 29947, 29947, 29929, 2142, 29881, 29945, 29955, 29953, 29874, 29896, 29955, 29874, 29945, 29906, 29947, 29953, 29890, 29941, 29896, 29896, 13891, 1635, 29896, 29900, 29874, 29929, 29900, 29946, 29946, 29900, 29929, 29953, 29955, 29900, 29947, 29906, 29955, 29888, 29953, 29888, 29929, 29890, 29945, 29900, 29900, 29953, 29945, 29872, 29915, 13, 13, 29954, 4717, 29943, 2190, 29909, 29918, 2382, 29918, 16358, 584, 851, 353, 525, 29953, 29889, 29955, 29889, 29946, 29915, 13, 9312, 1177, 29990, 29918, 2382, 29918, 16358, 259, 584, 851, 353, 525, 29896, 29889, 29896, 29945, 29889, 29947, 29915, 13, 6632, 2287, 8700, 29918, 2382, 29918, 16358, 29871, 584, 851, 353, 525, 29896, 29900, 29889, 29896, 29953, 29889, 29900, 29915, 13, 13, 29937, 9626, 2048, 23481, 29892, 304, 367, 18765, 287, 10940, 591, 337, 4282, 278, 6590, 13, 29937, 1967, 29892, 321, 29889, 29887, 29889, 1363, 278, 421, 29928, 8658, 1445, 29952, 338, 3939, 29892, 470, 697, 310, 278, 9962, 13, 29937, 5130, 297, 278, 1967, 4225, 304, 367, 4784, 29889, 13, 29937, 910, 881, 367, 10092, 304, 29871, 29896, 746, 278, 2669, 19884, 491, 278, 5639, 3620, 13, 29937, 1873, 29889, 13, 29903, 1964, 29911, 29918, 1529, 1254, 1001, 29918, 29933, 25282, 29918, 1367, 353, 29871, 29896, 13, 13, 13, 1753, 903, 3259, 29918, 13506, 29898, 3259, 29901, 851, 29892, 10944, 29901, 851, 353, 525, 29894, 1495, 1599, 851, 29901, 13, 1678, 736, 29850, 1157, 29913, 1642, 4830, 29898, 13506, 29892, 1873, 29897, 13, 13, 13, 29937, 10951, 9197, 526, 3755, 263, 13394, 1319, 29892, 577, 29901, 13, 29937, 282, 2904, 524, 29901, 20472, 29922, 1220, 29899, 517, 29877, 29899, 5426, 13, 6007, 6040, 1177, 1001, 29918, 2382, 29903, 584, 12603, 552, 29961, 2940, 29892, 2023, 29962, 353, 313, 13, 1678, 396, 5240, 866, 4558, 13, 1678, 7084, 29898, 13, 4706, 1024, 2433, 12888, 12847, 742, 13, 4706, 1873, 2433, 29894, 29900, 29889, 29896, 29929, 29889, 29900, 742, 13, 4706, 4697, 342, 2433, 17051, 29906, 29945, 29953, 29901, 29955, 29881, 1635, 29946, 29929, 29946, 29929, 29874, 29941, 29896, 29955, 29874, 29900, 29945, 29953, 29881, 29896, 29896, 287, 29947, 29888, 29941, 29955, 29929, 29947, 29906, 29953, 29890, 29900, 29946, 29881, 29900, 29953, 29953, 29945, 29888, 328, 29945, 29890, 29929, 29941, 29941, 29946, 29872, 29896, 29881, 29953, 29929, 29890, 29906, 29941, 29872, 29929, 29946, 29953, 29900, 29945, 29953, 2252, 29941, 742, 13, 1678, 10353, 13, 1678, 7084, 29898, 13, 4706, 1024, 2433, 1052, 1417, 29899, 3177, 742, 13, 4706, 1873, 29922, 29918, 3259, 29918, 13506, 29898, 29907, 1964, 2965, 29949, 29918, 16358, 511, 13, 4706, 4697, 342, 2433, 17051, 29906, 29945, 29953, 29901, 29953, 29953, 29955, 29929, 26854, 29929, 29888, 29896, 29929, 29881, 2291, 29941, 774, 29900, 29947, 29946, 2585, 29929, 29929, 29896, 29883, 29955, 29947, 29947, 13891, 29929, 29953, 29953, 29896, 328, 29941, 29890, 29945, 29881, 29945, 29890, 2142, 7340, 29941, 29941, 29955, 29929, 29953, 29946, 29946, 29906, 29906, 29929, 29881, 1113, 29953, 29890, 29900, 29945, 742, 13, 1678, 10353, 13, 1678, 7084, 29898, 13, 4706, 1024, 2433, 1052, 1417, 29899, 29895, 4003, 29899, 1285, 11897, 742, 13, 4706, 1873, 29922, 29918, 3259, 29918, 13506, 29898, 29907, 1964, 2965, 29949, 29918, 16358, 511, 13, 4706, 4697, 342, 2433, 17051, 29906, 29945, 29953, 29901, 6854, 29946, 29953, 29896, 1389, 29881, 29906, 29945, 3905, 29955, 29946, 29881, 29896, 29947, 29945, 29945, 29872, 29896, 3905, 29906, 29953, 2585, 29929, 29947, 1725, 29947, 29955, 311, 29900, 29900, 29906, 29929, 29941, 29888, 29955, 29881, 29900, 29941, 29929, 29906, 29896, 29906, 328, 29890, 29900, 29941, 29883, 29929, 29896, 1725, 346, 617, 29881, 742, 13, 1678, 10353, 13, 1678, 7084, 29898, 13, 4706, 1024, 2433, 2917, 1958, 29899, 28120, 742, 13, 4706, 1873, 2433, 29894, 29900, 29889, 29900, 29889, 29896, 742, 13, 4706, 4697, 342, 2433, 17051, 29906, 29945, 29953, 29901, 29872, 29906, 11512, 29953, 29900, 600, 29900, 3660, 29946, 29945, 29900, 29900, 29874, 29955, 29945, 29890, 29947, 29900, 774, 7340, 29941, 29900, 29872, 29900, 29872, 29955, 311, 2291, 29929, 328, 29896, 29900, 29955, 29947, 29941, 29941, 29872, 29947, 1113, 29945, 29941, 29888, 29900, 29900, 29946, 29955, 29883, 29946, 29906, 29883, 29945, 29874, 29900, 29945, 29955, 742, 13, 1678, 10353, 13, 1678, 7084, 29898, 13, 4706, 1024, 2433, 2616, 287, 1983, 742, 13, 4706, 1873, 2433, 29896, 29889, 29941, 29889, 29896, 742, 13, 4706, 4697, 342, 2433, 17051, 29906, 29945, 29953, 29901, 29900, 29906, 29941, 29947, 29906, 29941, 29945, 29941, 29947, 29906, 29896, 29890, 29896, 29906, 29883, 29906, 29896, 29890, 29900, 29953, 29906, 29883, 29945, 29929, 29896, 29947, 29946, 29872, 29906, 29906, 29955, 29872, 29900, 29900, 29896, 29900, 29955, 29929, 1327, 29896, 29941, 774, 29881, 29900, 29896, 29888, 29929, 29881, 29941, 29906, 29955, 29900, 2291, 29900, 13801, 1635, 29896, 29872, 29946, 742, 13, 1678, 10353, 13, 1678, 7084, 29898, 13, 4706, 1024, 2433, 300, 2252, 742, 13, 4706, 1873, 2433, 29941, 29889, 29941, 29889, 29896, 29900, 742, 13, 4706, 4697, 342, 2433, 17051, 29906, 29945, 29953, 29901, 29896, 29955, 1388, 29945, 29900, 29896, 29888, 29945, 29881, 29906, 29874, 29953, 29955, 29945, 915, 29946, 29953, 29900, 29946, 29900, 29946, 29906, 29906, 29874, 29906, 29955, 29890, 29955, 617, 29906, 29896, 29890, 29947, 29874, 29946, 29941, 29947, 29929, 29945, 562, 29929, 29929, 29947, 29890, 29896, 29955, 29896, 2585, 29896, 29883, 29941, 29946, 29953, 29888, 29941, 29953, 29896, 29888, 29955, 742, 13, 1678, 10353, 13, 1678, 7084, 29898, 13, 4706, 1024, 2433, 29895, 29947, 29879, 29899, 2975, 4287, 742, 13, 4706, 1873, 2433, 29900, 29889, 29896, 29889, 29906, 29900, 742, 13, 4706, 4697, 342, 2433, 17051, 29906, 29945, 29953, 29901, 2142, 29896, 29945, 29896, 29888, 29953, 29955, 29955, 29874, 29953, 29941, 29883, 2176, 29883, 2176, 29883, 29896, 29947, 29874, 29946, 29872, 29941, 29900, 29946, 29941, 29945, 29906, 29900, 687, 29945, 29900, 29953, 29881, 29945, 29872, 29896, 29896, 29953, 29953, 29929, 29906, 29872, 29945, 29896, 29929, 29900, 29888, 29953, 29888, 29955, 29953, 29945, 29881, 1113, 29946, 29906, 29874, 29945, 29906, 742, 13, 1678, 10353, 13, 1678, 7084, 29898, 13, 4706, 1024, 2433, 29895, 4003, 29899, 481, 7608, 369, 742, 13, 4706, 1873, 29922, 29918, 3259, 29918, 13506, 29898, 29968, 29947, 29903, 29918, 16358, 511, 13, 4706, 4697, 342, 2433, 17051, 29906, 29945, 29953, 29901, 29906, 29896, 29953, 29947, 915, 29906, 346, 29947, 29955, 29906, 29945, 29947, 29881, 29955, 29896, 915, 562, 29888, 29906, 29888, 29955, 29955, 29946, 687, 29896, 29945, 29955, 2176, 29883, 29906, 29947, 915, 29888, 29929, 29929, 29896, 29890, 29946, 29900, 29953, 29872, 29941, 29953, 29929, 29946, 29900, 29955, 29955, 6854, 29883, 29945, 29890, 29929, 29941, 29900, 29906, 742, 13, 1678, 10353, 13, 1678, 7084, 29898, 13, 4706, 1024, 2433, 29895, 4003, 29899, 8299, 29899, 12847, 742, 13, 4706, 1873, 29922, 29918, 3259, 29918, 13506, 29898, 29968, 29947, 29903, 29918, 16358, 511, 13, 4706, 4697, 342, 2433, 17051, 29906, 29945, 29953, 29901, 29896, 29883, 29941, 29955, 29900, 29945, 29906, 29888, 29929, 1389, 29890, 29929, 29896, 29881, 29946, 29929, 29946, 29955, 29888, 29906, 29947, 29900, 29945, 29881, 29941, 29906, 29890, 29947, 29896, 29881, 29945, 29906, 29906, 29888, 29945, 29890, 29947, 29890, 29896, 29896, 29874, 29900, 29945, 29874, 29945, 29945, 29945, 29900, 29888, 29929, 29890, 29946, 13891, 29953, 29945, 29883, 29929, 29896, 2585, 29955, 29888, 742, 13, 1678, 10353, 13, 1678, 7084, 29898, 13, 4706, 1024, 2433, 29895, 4003, 29899, 14701, 742, 13, 4706, 1873, 29922, 29918, 3259, 29918, 13506, 29898, 29968, 29947, 29903, 29918, 16358, 511, 13, 4706, 4697, 342, 2433, 17051, 29906, 29945, 29953, 29901, 29929, 29941, 29955, 617, 29945, 29896, 29941, 29888, 29896, 29953, 29906, 29900, 29953, 29906, 29888, 29947, 29890, 29906, 29953, 29946, 29906, 311, 29900, 29947, 346, 29953, 29872, 29941, 29947, 29955, 29955, 1113, 29872, 29945, 6854, 29945, 29947, 29872, 29945, 29906, 29955, 29953, 29947, 29941, 29900, 29955, 29929, 29953, 29955, 29946, 29929, 29872, 29906, 29929, 29883, 370, 29946, 29906, 742, 13, 1678, 10353, 13, 1678, 7084, 29898, 13, 4706, 1024, 2433, 29895, 4003, 29899, 816, 14952, 742, 13, 4706, 1873, 29922, 29918, 3259, 29918, 13506, 29898, 29968, 29947, 29903, 29918, 16358, 511, 13, 4706, 4697, 342, 2433, 17051, 29906, 29945, 29953, 29901, 29872, 29906, 346, 29890, 29955, 29941, 29906, 29896, 29906, 29941, 29929, 29874, 29929, 29945, 29947, 29955, 1327, 29890, 29955, 29888, 29941, 311, 29946, 29941, 29955, 29946, 29941, 29874, 29946, 29890, 29953, 29900, 29906, 29946, 29929, 29883, 29955, 287, 29941, 29874, 29929, 29945, 29941, 29881, 29896, 29896, 29945, 29906, 29896, 29955, 29881, 29945, 13891, 9967, 29955, 29953, 29906, 742, 13, 1678, 10353, 13, 1678, 7084, 29898, 13, 4706, 1024, 2433, 29895, 4003, 29899, 3859, 29899, 2527, 10817, 742, 13, 4706, 1873, 2433, 29894, 29896, 29889, 29947, 29889, 29900, 742, 13, 4706, 4697, 342, 2433, 17051, 29906, 29945, 29953, 29901, 29888, 29955, 29945, 29883, 29941, 29872, 29945, 29883, 29945, 29883, 29955, 29888, 29953, 29945, 29947, 29946, 29953, 1289, 29881, 29953, 29947, 29947, 29941, 29881, 29953, 29896, 29947, 29955, 29890, 29941, 29947, 29888, 29955, 29955, 29955, 29906, 29896, 29874, 29941, 29929, 29941, 29947, 29888, 29906, 29946, 29896, 29883, 29929, 29872, 29945, 29881, 29900, 774, 29872, 29955, 29890, 774, 29947, 29872, 29896, 29929, 742, 13, 1678, 10353, 13, 1678, 7084, 29898, 13, 4706, 1024, 2433, 23257, 742, 13, 4706, 1873, 29922, 9312, 1177, 29990, 29918, 2382, 29918, 16358, 29892, 13, 4706, 4697, 342, 2433, 17051, 29906, 29945, 29953, 29901, 29888, 29900, 29929, 1725, 29947, 29900, 774, 29900, 29872, 29955, 29945, 29872, 29929, 29955, 29890, 29900, 29946, 29890, 29929, 2176, 29890, 29900, 29953, 29945, 562, 29941, 29888, 1388, 29941, 29955, 29874, 29947, 17470, 29900, 29896, 29953, 29896, 29888, 29946, 29906, 29888, 1113, 29896, 29872, 29953, 1725, 29946, 29881, 29900, 29929, 29955, 29955, 29883, 29947, 29900, 742, 13, 1678, 10353, 13, 1678, 7084, 29898, 13, 4706, 1024, 2433, 23257, 29899, 292, 1253, 29899, 8299, 742, 13, 4706, 1873, 2433, 29900, 29889, 29906, 29953, 29889, 29896, 742, 13, 4706, 4697, 342, 2433, 17051, 29906, 29945, 29953, 29901, 29946, 29953, 29946, 2585, 29946, 29947, 29947, 29900, 29947, 29953, 29896, 6448, 29929, 29881, 29896, 29872, 29955, 29946, 29872, 29953, 29955, 29874, 29946, 29874, 29929, 29883, 29929, 29955, 29945, 29874, 29953, 29872, 29955, 29946, 29883, 29896, 29872, 29929, 29929, 29953, 29947, 29955, 29955, 29953, 29881, 29947, 29881, 29946, 617, 29955, 29941, 29946, 29929, 29906, 29874, 29945, 29953, 2176, 29874, 29945, 742, 13, 1678, 10353, 13, 1678, 7084, 29898, 13, 4706, 1024, 2433, 23257, 29899, 292, 1253, 29899, 4381, 27852, 29899, 22490, 29953, 29946, 742, 13, 4706, 1873, 2433, 29896, 29889, 29945, 742, 13, 4706, 4697, 342, 2433, 17051, 29906, 29945, 29953, 29901, 29946, 13891, 29945, 29872, 29900, 29955, 29883, 29947, 1113, 29946, 29872, 29906, 29941, 29890, 1289, 29890, 29941, 29896, 29945, 29941, 29955, 29941, 29955, 29881, 29955, 29890, 29947, 29883, 29945, 29945, 29953, 29872, 29945, 14943, 29906, 29888, 29906, 29929, 29883, 29946, 29945, 29945, 29947, 29890, 29955, 2252, 29953, 29872, 29953, 2176, 29929, 29929, 29883, 29945, 29896, 29906, 29883, 29955, 742, 13, 1678, 10353, 13, 1678, 7084, 29898, 13, 4706, 1024, 2433, 3177, 29899, 735, 18505, 742, 13, 4706, 1873, 2433, 29894, 29900, 29889, 29896, 29947, 29889, 29896, 742, 13, 4706, 4697, 342, 2433, 17051, 29906, 29945, 29953, 29901, 29874, 29906, 29888, 29906, 29929, 29906, 29945, 29953, 29872, 29945, 29941, 617, 29941, 29872, 29900, 29890, 29953, 29946, 29881, 29955, 29874, 29946, 29955, 29906, 29945, 29896, 29906, 29953, 29900, 29900, 29890, 29906, 29872, 29929, 29946, 29896, 29900, 29941, 29946, 29955, 29881, 29945, 29941, 2252, 29883, 29947, 29945, 29890, 29946, 29929, 29888, 29953, 29945, 29929, 29883, 29896, 29955, 29872, 29900, 29906, 3905, 742, 13, 1678, 10353, 13, 1678, 7084, 29898, 13, 4706, 1024, 2433, 29886, 1071, 742, 13, 4706, 1873, 2433, 29941, 29889, 29896, 742, 13, 4706, 4697, 342, 2433, 17051, 29906, 29945, 29953, 29901, 1388, 29947, 29953, 29872, 29953, 2291, 29953, 1113, 29896, 29929, 29955, 1635, 29953, 12328, 29945, 29872, 29929, 29881, 29929, 29900, 29900, 29888, 774, 29881, 29929, 29900, 29953, 29890, 29896, 29941, 29941, 29872, 7340, 29946, 29955, 29945, 29900, 29872, 29953, 2580, 29953, 29946, 29955, 29890, 29900, 29888, 915, 29945, 29900, 287, 29946, 29941, 29872, 742, 13, 1678, 10353, 13, 1678, 7084, 29898, 13, 4706, 1024, 2433, 14032, 23043, 375, 742, 13, 4706, 1873, 2433, 29894, 29906, 29889, 29896, 29941, 29889, 29896, 742, 13, 4706, 4697, 342, 2433, 17051, 29906, 29945, 29953, 29901, 29900, 29874, 29947, 1113, 29874, 29906, 29872, 29929, 29888, 29896, 29929, 29929, 29900, 29955, 29953, 29900, 29947, 29929, 29896, 29945, 2585, 29953, 29872, 29953, 29906, 29874, 29953, 29955, 29941, 29947, 29941, 1725, 29946, 29946, 29890, 29929, 29947, 29955, 29953, 29874, 29946, 29953, 29955, 29890, 29906, 29929, 29955, 3905, 29953, 29888, 29953, 29946, 29872, 29945, 29896, 1289, 29945, 29947, 29874, 742, 13, 1678, 10353, 13, 1678, 7084, 29898, 13, 4706, 1024, 2433, 29895, 29947, 29879, 29899, 14032, 23043, 375, 29899, 21412, 29899, 22490, 29953, 29946, 742, 13, 4706, 1873, 2433, 29894, 29900, 29889, 29945, 29889, 29900, 742, 13, 4706, 4697, 342, 2433, 17051, 29906, 29945, 29953, 29901, 562, 29888, 29946, 29883, 29946, 13891, 29953, 7340, 29874, 29945, 29896, 29872, 29941, 29900, 29900, 29946, 29872, 774, 13891, 29946, 29896, 29900, 29890, 29945, 29900, 29929, 2585, 29946, 29945, 29881, 29896, 29874, 29953, 774, 29881, 29906, 29945, 29945, 29946, 29945, 29955, 29883, 29945, 29955, 29946, 29945, 29888, 29900, 29890, 29946, 29953, 29955, 29896, 29953, 29955, 29947, 29888, 742, 13, 1678, 10353, 13, 1678, 7084, 29898, 13, 4706, 1024, 2433, 14032, 23043, 375, 29899, 2917, 29899, 276, 12657, 742, 13, 4706, 1873, 2433, 29894, 29900, 29889, 29941, 29946, 29889, 29900, 742, 13, 4706, 4697, 342, 2433, 17051, 29906, 29945, 29953, 29901, 29946, 29945, 29929, 12328, 29896, 29890, 29896, 13801, 29945, 29896, 29946, 29906, 29900, 2252, 29906, 29946, 29946, 29890, 29900, 29947, 29906, 1725, 29896, 29946, 29946, 29946, 29946, 29888, 29953, 29881, 29947, 29945, 29929, 29953, 29929, 29929, 29955, 29883, 29906, 29872, 29946, 29900, 29888, 29945, 29906, 29883, 29900, 29947, 29881, 29896, 29888, 29945, 29874, 29900, 29929, 370, 29947, 29953, 29900, 742, 13, 1678, 10353, 13, 1678, 7084, 29898, 13, 4706, 1024, 2433, 14032, 23043, 375, 29899, 6891, 742, 13, 4706, 1873, 2433, 29894, 29900, 29889, 29941, 29946, 29889, 29900, 742, 13, 4706, 4697, 342, 2433, 17051, 29906, 29945, 29953, 29901, 29883, 29900, 29890, 10702, 29906, 29941, 29896, 1725, 29953, 29955, 2252, 29896, 29896, 11512, 29906, 29953, 29888, 29955, 328, 29888, 29945, 562, 29896, 29900, 29947, 29900, 2176, 562, 29896, 29947, 29929, 562, 29929, 29946, 29955, 29900, 29945, 29945, 29941, 29947, 6448, 29946, 370, 29955, 1289, 29929, 29929, 29874, 29929, 29947, 29874, 29929, 742, 13, 1678, 10353, 13, 1678, 396, 9959, 4558, 13, 1678, 7084, 29898, 13, 4706, 1024, 2433, 29887, 1929, 1648, 742, 13, 4706, 1873, 29922, 29954, 4717, 29943, 2190, 29909, 29918, 2382, 29918, 16358, 29892, 13, 4706, 4697, 342, 29922, 8516, 29892, 13, 1678, 10353, 13, 1678, 7084, 29898, 13, 4706, 1024, 2433, 2527, 2235, 29947, 29879, 29899, 1481, 742, 13, 4706, 1873, 29922, 16358, 29892, 13, 4706, 4697, 342, 29922, 8516, 29892, 13, 1678, 10353, 13, 1678, 7084, 29898, 13, 4706, 1024, 2433, 2527, 2235, 29947, 29879, 29899, 13239, 742, 13, 4706, 1873, 29922, 16358, 29892, 13, 4706, 4697, 342, 29922, 8516, 29892, 13, 1678, 10353, 13, 1678, 7084, 29898, 13, 4706, 1024, 2433, 29879, 1997, 29899, 6207, 742, 13, 4706, 1873, 2433, 29912, 3259, 7402, 29912, 4282, 29918, 333, 29913, 4286, 4830, 29898, 13, 9651, 1873, 29922, 29903, 1964, 29911, 29918, 16358, 29892, 2048, 29918, 333, 29922, 29903, 1964, 29911, 29918, 1529, 1254, 1001, 29918, 29933, 25282, 29918, 1367, 13, 4706, 10353, 13, 4706, 4697, 342, 29922, 8516, 29892, 13, 1678, 10353, 13, 1678, 7084, 29898, 13, 4706, 1024, 2433, 12925, 29899, 6891, 742, 13, 4706, 1873, 2433, 12333, 742, 13, 4706, 4697, 342, 29922, 8516, 29892, 13, 1678, 10353, 13, 29897, 13, 13, 6007, 6040, 1177, 1001, 29918, 2382, 29903, 29918, 23827, 353, 426, 3027, 29889, 978, 29901, 1967, 363, 1967, 297, 8707, 6040, 1177, 1001, 29918, 2382, 29903, 29913, 13, 13, 29937, 500, 930, 13, 13, 29937, 18744, 1179, 426, 6224, 13, 13, 1990, 22029, 6594, 29901, 13, 1678, 9995, 29909, 3577, 29915, 29879, 4148, 23378, 1873, 848, 29889, 13, 13, 1678, 910, 770, 3743, 1873, 2472, 363, 263, 4257, 3577, 29892, 322, 13, 1678, 8128, 16876, 3519, 363, 15998, 1873, 29914, 14096, 848, 408, 1532, 13, 1678, 408, 1873, 29899, 264, 4018, 287, 3577, 1024, 29892, 363, 599, 6969, 6570, 13175, 29889, 13, 1678, 9995, 13, 13, 1678, 822, 4770, 2344, 12035, 13, 4706, 1583, 29892, 13, 4706, 1024, 29901, 851, 29892, 13, 4706, 1873, 29901, 28379, 29961, 710, 29962, 353, 6213, 29892, 13, 4706, 6507, 29901, 28379, 29961, 710, 29962, 353, 6213, 29892, 13, 4706, 5712, 29901, 28379, 29961, 710, 29962, 353, 6213, 13, 268, 1125, 13, 4706, 9995, 15514, 7093, 263, 3577, 1873, 29889, 13, 13, 4706, 11842, 9331, 29901, 13, 9651, 1024, 29901, 278, 1024, 310, 278, 3577, 13, 9651, 1873, 29901, 278, 1873, 310, 278, 3577, 13, 9651, 6507, 29901, 278, 6507, 310, 278, 3577, 13, 4706, 9995, 13, 4706, 1583, 3032, 978, 268, 353, 1024, 13, 4706, 1583, 3032, 3259, 29871, 353, 1873, 13, 4706, 1583, 3032, 14096, 29871, 353, 6507, 13, 4706, 1583, 3032, 15752, 353, 5712, 13, 13, 1678, 1024, 353, 2875, 29898, 6891, 29889, 5552, 657, 357, 877, 29918, 978, 8785, 13, 1678, 1873, 353, 2875, 29898, 6891, 29889, 5552, 657, 357, 877, 29918, 3259, 8785, 13, 1678, 6507, 353, 2875, 29898, 6891, 29889, 5552, 657, 357, 877, 29918, 14096, 8785, 13, 1678, 5712, 353, 2875, 29898, 6891, 29889, 5552, 657, 357, 877, 29918, 15752, 8785, 13, 13, 1678, 732, 6799, 13, 1678, 822, 2989, 29918, 3259, 29898, 1311, 29897, 1599, 28379, 29961, 710, 5387, 13, 4706, 9995, 1576, 2989, 3577, 1873, 1347, 1213, 15945, 13, 4706, 2989, 29918, 3259, 353, 6213, 13, 4706, 565, 1583, 29889, 3259, 29901, 13, 9651, 2989, 29918, 3259, 353, 1583, 29889, 3259, 13, 9651, 565, 1583, 29889, 14096, 29901, 13, 18884, 2989, 29918, 3259, 353, 22372, 7402, 8875, 4286, 4830, 29898, 1311, 29889, 3259, 29892, 1583, 29889, 14096, 29897, 13, 4706, 736, 2989, 29918, 3259, 13, 13, 1678, 732, 6799, 13, 1678, 822, 364, 3358, 29918, 8159, 29918, 978, 29898, 1311, 29897, 1599, 851, 29901, 13, 4706, 9995, 1576, 3577, 29915, 29879, 2989, 1024, 297, 390, 13427, 13064, 1080, 1213, 15945, 13, 4706, 565, 1583, 29889, 8159, 29918, 3259, 29901, 13, 9651, 736, 22372, 7402, 8875, 4286, 4830, 29898, 1311, 29889, 978, 29892, 1583, 29889, 8159, 29918, 3259, 29897, 13, 4706, 736, 4320, 29898, 710, 29892, 1583, 29889, 978, 29897, 13, 13, 1678, 732, 6799, 13, 1678, 822, 2553, 29918, 8159, 29918, 978, 29898, 1311, 29897, 1599, 851, 29901, 13, 4706, 9995, 1576, 3577, 29915, 29879, 2989, 1024, 297, 5012, 29933, 13064, 1080, 1213, 15945, 13, 4706, 565, 1583, 29889, 8159, 29918, 3259, 29901, 13, 9651, 736, 525, 8875, 3790, 29913, 4286, 4830, 29898, 1311, 29889, 978, 29892, 1583, 29889, 8159, 29918, 3259, 29897, 13, 4706, 736, 4320, 29898, 710, 29892, 1583, 29889, 978, 29897, 13, 13, 13, 29937, 450, 4148, 23378, 1051, 310, 9741, 3734, 29889, 13, 29937, 13, 29937, 13103, 9741, 526, 9741, 363, 607, 591, 817, 451, 2562, 1048, 6570, 29899, 14940, 13, 29937, 17089, 1885, 778, 29889, 13, 29937, 13, 29937, 512, 445, 1206, 29892, 2845, 29901, 13, 29937, 259, 334, 278, 903, 12333, 29918, 1873, 338, 1781, 3307, 29892, 322, 674, 367, 278, 697, 13, 29937, 268, 4629, 491, 278, 3577, 767, 18150, 313, 578, 2215, 29901, 10882, 322, 343, 398, 467, 13, 29937, 259, 334, 591, 505, 9406, 1873, 11780, 393, 10638, 6570, 13175, 29892, 322, 278, 13, 29937, 268, 1873, 27715, 903, 392, 29918, 3577, 2983, 437, 451, 17089, 479, 13, 29937, 13, 29937, 3767, 919, 1873, 11780, 526, 451, 2197, 29901, 13, 29937, 259, 334, 413, 4003, 1026, 322, 413, 431, 522, 29880, 607, 903, 5675, 29918, 278, 476, 29947, 29879, 1873, 310, 278, 9867, 13, 29937, 259, 334, 15795, 29899, 1195, 291, 607, 903, 29885, 6926, 29918, 278, 27903, 1873, 310, 278, 9867, 13, 29937, 13, 29937, 4525, 3619, 9741, 1122, 367, 20831, 1145, 491, 6570, 29899, 14940, 9741, 565, 3577, 13, 29937, 2983, 470, 1873, 13064, 1080, 17089, 479, 29889, 13, 29937, 13, 29937, 18744, 1179, 393, 591, 2048, 20278, 1996, 263, 1873, 322, 6507, 408, 760, 310, 13, 29937, 1009, 2048, 1889, 29889, 13, 29925, 11375, 10461, 29903, 29901, 360, 919, 29961, 710, 29892, 12603, 552, 29961, 14459, 6594, 29892, 2023, 5262, 353, 426, 13, 1678, 525, 9435, 2396, 313, 13, 4706, 396, 349, 27464, 9741, 13, 4706, 22029, 6594, 29898, 978, 2433, 29895, 431, 522, 29880, 742, 1873, 29922, 29968, 29947, 29903, 29918, 16358, 511, 13, 4706, 22029, 6594, 29898, 978, 2433, 29895, 4003, 1026, 742, 1873, 29922, 29968, 29947, 29903, 29918, 16358, 511, 13, 4706, 396, 7053, 342, 9741, 13, 4706, 22029, 6594, 29898, 978, 2433, 1285, 475, 2018, 5477, 13, 4706, 22029, 6594, 29898, 978, 2433, 3221, 13239, 5477, 13, 4706, 22029, 6594, 29898, 978, 2433, 699, 29899, 8504, 5477, 13, 4706, 22029, 6594, 29898, 978, 2433, 29872, 29906, 5847, 771, 3174, 5477, 13, 4706, 22029, 6594, 29898, 978, 2433, 774, 24051, 5477, 13, 4706, 22029, 6594, 29898, 978, 2433, 300, 400, 1507, 5477, 13, 4706, 22029, 6594, 29898, 978, 2433, 1885, 10718, 3027, 5477, 13, 4706, 22029, 6594, 29898, 978, 2433, 29875, 558, 2663, 5477, 13, 4706, 22029, 6594, 29898, 978, 2433, 21278, 1849, 5477, 13, 4706, 22029, 6594, 29898, 978, 2433, 29895, 17547, 29899, 29883, 1240, 5477, 13, 4706, 22029, 6594, 29898, 978, 2433, 29885, 29906, 29883, 17929, 5477, 13, 4706, 22029, 6594, 29898, 978, 2433, 3389, 29883, 5477, 13, 4706, 22029, 6594, 29898, 978, 2433, 29879, 1997, 29899, 1195, 291, 742, 1873, 29922, 29903, 1964, 29911, 29918, 16358, 511, 13, 4706, 22029, 6594, 29898, 978, 2433, 29879, 542, 271, 5477, 13, 4706, 22029, 6594, 29898, 978, 2433, 29879, 359, 5477, 29871, 396, 14402, 5142, 4240, 3577, 9962, 13, 4706, 22029, 6594, 29898, 978, 2433, 4422, 29899, 9389, 5477, 13, 4706, 22029, 6594, 29898, 978, 2433, 29916, 5847, 771, 3174, 5477, 13, 1678, 10353, 13, 1678, 525, 1127, 2455, 2396, 313, 13, 4706, 22029, 6594, 29898, 13, 9651, 1024, 2433, 1052, 1417, 29899, 29883, 1240, 29899, 8582, 742, 13, 9651, 1873, 29922, 29907, 1964, 2965, 29949, 29918, 16358, 29892, 13, 9651, 6507, 2433, 29896, 29889, 295, 29955, 29915, 13, 4706, 10353, 13, 4706, 22029, 6594, 29898, 978, 2433, 7611, 29899, 2838, 262, 1314, 5477, 29871, 396, 14402, 396, 29896, 29955, 29896, 29900, 13, 4706, 22029, 6594, 29898, 13, 9651, 1024, 2433, 2527, 2235, 29947, 29879, 29899, 29879, 359, 12276, 742, 13, 9651, 1873, 29922, 7068, 8476, 29918, 16358, 29892, 13, 9651, 6507, 2433, 29896, 29889, 295, 29955, 29915, 13, 4706, 10353, 13, 4706, 22029, 6594, 29898, 978, 2433, 29891, 398, 29899, 8582, 29899, 3259, 908, 5477, 13, 4706, 22029, 6594, 29898, 978, 2433, 29891, 398, 29899, 13239, 5477, 13, 1678, 10353, 13, 1678, 525, 16529, 713, 2396, 313, 13, 4706, 22029, 6594, 29898, 13, 9651, 1024, 2433, 1052, 1417, 29899, 29883, 1240, 29899, 8582, 742, 13, 9651, 1873, 29922, 29907, 1964, 2965, 29949, 29918, 16358, 29892, 13, 9651, 6507, 2433, 29896, 29915, 13, 4706, 10353, 13, 4706, 22029, 6594, 29898, 978, 2433, 29875, 558, 2663, 29906, 742, 5712, 2433, 29875, 558, 2663, 5477, 13, 4706, 22029, 6594, 29898, 13, 9651, 1024, 2433, 2527, 2235, 29947, 29879, 29899, 29879, 359, 12276, 742, 13, 9651, 1873, 29922, 7068, 8476, 29918, 16358, 29892, 13, 9651, 6507, 2433, 29896, 29915, 13, 4706, 10353, 13, 4706, 22029, 6594, 29898, 978, 2433, 4691, 29899, 29885, 29906, 29883, 17929, 742, 5712, 2433, 29885, 29906, 29883, 17929, 5477, 13, 4706, 22029, 6594, 29898, 978, 2433, 29879, 359, 12276, 742, 5712, 2433, 29879, 359, 5477, 13, 1678, 10353, 13, 29913, 13, 13, 13, 1753, 903, 1761, 29918, 20571, 3174, 29918, 1454, 29918, 359, 29918, 11922, 29898, 359, 29918, 11922, 29901, 851, 29897, 1599, 12603, 552, 29961, 14459, 6594, 29892, 2023, 5387, 13, 1678, 9995, 1293, 16532, 9741, 363, 263, 2183, 6570, 3942, 29889, 13, 13, 1678, 11842, 9331, 29901, 13, 4706, 2897, 29918, 11922, 29901, 6570, 29918, 11922, 363, 607, 304, 1051, 9741, 13, 1678, 9995, 13, 1678, 3619, 29918, 20571, 3174, 353, 349, 11375, 10461, 29903, 1839, 9435, 2033, 13, 1678, 2897, 29918, 11922, 29918, 20571, 3174, 353, 349, 11375, 10461, 29903, 29889, 657, 29898, 359, 29918, 11922, 29897, 13, 13, 1678, 565, 2897, 29918, 11922, 29918, 20571, 3174, 338, 6213, 29901, 13, 4706, 12020, 8960, 877, 3782, 9741, 363, 6570, 3942, 29901, 6571, 4286, 4830, 29898, 359, 29918, 11922, 876, 13, 13, 1678, 2897, 29918, 15752, 29918, 7039, 353, 518, 13, 4706, 282, 9415, 29889, 15752, 363, 282, 9415, 297, 2897, 29918, 11922, 29918, 20571, 3174, 13, 4706, 565, 282, 9415, 29889, 15752, 338, 451, 6213, 13, 1678, 4514, 13, 13, 1678, 20831, 1145, 353, 4175, 29898, 13, 4706, 14013, 2944, 29901, 2944, 29889, 978, 451, 297, 2897, 29918, 15752, 29918, 7039, 29892, 13, 4706, 3619, 29918, 20571, 3174, 13, 1678, 1723, 13, 13, 1678, 736, 18761, 29898, 957, 2429, 1145, 29897, 718, 2897, 29918, 11922, 29918, 20571, 3174, 13, 13, 13, 29934, 13427, 29918, 29925, 11375, 10461, 29903, 353, 903, 1761, 29918, 20571, 3174, 29918, 1454, 29918, 359, 29918, 11922, 877, 1127, 2455, 1495, 13, 13, 29934, 13427, 29918, 29925, 11375, 10461, 29903, 29918, 23827, 353, 426, 15865, 29889, 978, 29901, 282, 9415, 363, 282, 9415, 297, 390, 13427, 29918, 29925, 11375, 10461, 29903, 29913, 13, 13, 2287, 29933, 29918, 29925, 11375, 10461, 29903, 353, 903, 1761, 29918, 20571, 3174, 29918, 1454, 29918, 359, 29918, 11922, 877, 16529, 713, 1495, 13, 13, 2287, 29933, 29918, 29925, 11375, 10461, 29903, 29918, 23827, 353, 426, 15865, 29889, 978, 29901, 282, 9415, 363, 282, 9415, 297, 5012, 29933, 29918, 29925, 11375, 10461, 29903, 29913, 13, 13, 29937, 500, 930, 13, 2 ]
pconf/store/env.py
sthagen/pconf
20
107715
<reponame>sthagen/pconf import os import re from ast import literal_eval from warnings import warn class Env(object): def __init__( self, separator=None, match=None, whitelist=None, parse_values=False, to_lower=False, convert_underscores=False, docker_secrets=None, ): self.separator = separator self.match = match self.whitelist = whitelist self.parse_values = parse_values self.to_lower = to_lower self.convert_underscores = convert_underscores self.docker_secrets = docker_secrets if self.match is not None: self.re = re.compile(self.match) self.__gather_vars() if self.to_lower: self.vars = self.__change_keys(self.vars, self.__to_lower) if self.convert_underscores: self.vars = self.__change_keys(self.vars, self.__convert_underscores) def get(self): return self.vars def __valid_key(self, key): if self.match is not None and self.whitelist is not None: return key in self.whitelist or self.re.search(key) is not None elif self.match is not None: return self.re.search(key) is not None elif self.whitelist is not None: return key in self.whitelist else: return True def __split_vars(self, env_vars): keys_to_delete = [] dict_to_add = {} for key in env_vars.keys(): splits = key.split(self.separator) splits = list(filter(None, splits)) if len(splits) != 1: split = self.__split_var(splits, env_vars[key]) keys_to_delete.append(key) self.__merge_split(split, dict_to_add) for key in keys_to_delete: del env_vars[key] env_vars.update(dict_to_add) def __split_var(self, keys, value): if len(keys) == 1: return {keys[0]: value} else: key = keys[0] del keys[0] return {key: self.__split_var(keys, value)} def __merge_split(self, split, env_vars): key = list(split.keys())[0] value = list(split.values())[0] if key not in env_vars: env_vars[key] = value return elif type(value) == dict: self.__merge_split(value, env_vars[key]) else: return def __try_parse(self, env_vars): for key, value in env_vars.items(): try: if value.lower() == "true": env_vars[key] = True elif value.lower() == "false": env_vars[key] = False else: env_vars[key] = literal_eval(value) except (ValueError, SyntaxError): pass def __handle_docker_secret(self, key, value): postfix = "_FILE" if key.endswith(postfix): try: with open(value, "r") as f: self.vars[key[0 : -len(postfix)]] = f.read().strip() # noqa: E203 except IOError: warn("IOError when opening {}".format(value), UserWarning) def __gather_vars(self): self.vars = {} env_vars = os.environ for key in env_vars.keys(): if self.__valid_key(key): if self.docker_secrets is not None and key in self.docker_secrets: self.__handle_docker_secret(key, env_vars[key]) else: self.vars[key] = env_vars[key] if self.parse_values: self.__try_parse(self.vars) if self.separator is not None: self.__split_vars(self.vars) def __to_lower(self, key): return key.lower() def __convert_underscores(self, key): return key.replace("_", "-") def __change_keys(self, env_vars, operation): new_dict = {} for key, value in env_vars.items(): if type(value) == dict: new_dict[operation(key)] = self.__change_keys(value, operation) else: new_dict[operation(key)] = env_vars[key] return new_dict
[ 1, 529, 276, 1112, 420, 29958, 303, 25771, 29914, 29886, 5527, 13, 5215, 2897, 13, 5215, 337, 13, 3166, 8717, 1053, 16333, 29918, 14513, 13, 3166, 18116, 1053, 29383, 13, 13, 13, 1990, 1174, 29894, 29898, 3318, 1125, 13, 1678, 822, 4770, 2344, 12035, 13, 4706, 1583, 29892, 13, 4706, 28128, 29922, 8516, 29892, 13, 4706, 1993, 29922, 8516, 29892, 13, 4706, 377, 7454, 391, 29922, 8516, 29892, 13, 4706, 6088, 29918, 5975, 29922, 8824, 29892, 13, 4706, 304, 29918, 13609, 29922, 8824, 29892, 13, 4706, 3588, 29918, 870, 414, 29883, 2361, 29922, 8824, 29892, 13, 4706, 10346, 29918, 344, 1037, 1372, 29922, 8516, 29892, 13, 268, 1125, 13, 4706, 1583, 29889, 344, 17954, 353, 28128, 13, 4706, 1583, 29889, 4352, 353, 1993, 13, 4706, 1583, 29889, 1332, 7454, 391, 353, 377, 7454, 391, 13, 4706, 1583, 29889, 5510, 29918, 5975, 353, 6088, 29918, 5975, 13, 4706, 1583, 29889, 517, 29918, 13609, 353, 304, 29918, 13609, 13, 4706, 1583, 29889, 13441, 29918, 870, 414, 29883, 2361, 353, 3588, 29918, 870, 414, 29883, 2361, 13, 4706, 1583, 29889, 14695, 29918, 344, 1037, 1372, 353, 10346, 29918, 344, 1037, 1372, 13, 13, 4706, 565, 1583, 29889, 4352, 338, 451, 6213, 29901, 13, 9651, 1583, 29889, 276, 353, 337, 29889, 12198, 29898, 1311, 29889, 4352, 29897, 13, 13, 4706, 1583, 17255, 29887, 1624, 29918, 16908, 580, 13, 13, 4706, 565, 1583, 29889, 517, 29918, 13609, 29901, 13, 9651, 1583, 29889, 16908, 353, 1583, 17255, 3167, 29918, 8149, 29898, 1311, 29889, 16908, 29892, 1583, 17255, 517, 29918, 13609, 29897, 13, 13, 4706, 565, 1583, 29889, 13441, 29918, 870, 414, 29883, 2361, 29901, 13, 9651, 1583, 29889, 16908, 353, 1583, 17255, 3167, 29918, 8149, 29898, 1311, 29889, 16908, 29892, 1583, 17255, 13441, 29918, 870, 414, 29883, 2361, 29897, 13, 13, 1678, 822, 679, 29898, 1311, 1125, 13, 4706, 736, 1583, 29889, 16908, 13, 13, 1678, 822, 4770, 3084, 29918, 1989, 29898, 1311, 29892, 1820, 1125, 13, 4706, 565, 1583, 29889, 4352, 338, 451, 6213, 322, 1583, 29889, 1332, 7454, 391, 338, 451, 6213, 29901, 13, 9651, 736, 1820, 297, 1583, 29889, 1332, 7454, 391, 470, 1583, 29889, 276, 29889, 4478, 29898, 1989, 29897, 338, 451, 6213, 13, 4706, 25342, 1583, 29889, 4352, 338, 451, 6213, 29901, 13, 9651, 736, 1583, 29889, 276, 29889, 4478, 29898, 1989, 29897, 338, 451, 6213, 13, 4706, 25342, 1583, 29889, 1332, 7454, 391, 338, 451, 6213, 29901, 13, 9651, 736, 1820, 297, 1583, 29889, 1332, 7454, 391, 13, 4706, 1683, 29901, 13, 9651, 736, 5852, 13, 13, 1678, 822, 4770, 5451, 29918, 16908, 29898, 1311, 29892, 8829, 29918, 16908, 1125, 13, 4706, 6611, 29918, 517, 29918, 8143, 353, 5159, 13, 4706, 9657, 29918, 517, 29918, 1202, 353, 6571, 13, 4706, 363, 1820, 297, 8829, 29918, 16908, 29889, 8149, 7295, 13, 9651, 8536, 1169, 353, 1820, 29889, 5451, 29898, 1311, 29889, 344, 17954, 29897, 13, 9651, 8536, 1169, 353, 1051, 29898, 4572, 29898, 8516, 29892, 8536, 1169, 876, 13, 13, 9651, 565, 7431, 29898, 23579, 1169, 29897, 2804, 29871, 29896, 29901, 13, 18884, 6219, 353, 1583, 17255, 5451, 29918, 1707, 29898, 23579, 1169, 29892, 8829, 29918, 16908, 29961, 1989, 2314, 13, 18884, 6611, 29918, 517, 29918, 8143, 29889, 4397, 29898, 1989, 29897, 13, 18884, 1583, 17255, 14634, 29918, 5451, 29898, 5451, 29892, 9657, 29918, 517, 29918, 1202, 29897, 13, 13, 4706, 363, 1820, 297, 6611, 29918, 517, 29918, 8143, 29901, 13, 9651, 628, 8829, 29918, 16908, 29961, 1989, 29962, 13, 4706, 8829, 29918, 16908, 29889, 5504, 29898, 8977, 29918, 517, 29918, 1202, 29897, 13, 13, 1678, 822, 4770, 5451, 29918, 1707, 29898, 1311, 29892, 6611, 29892, 995, 1125, 13, 4706, 565, 7431, 29898, 8149, 29897, 1275, 29871, 29896, 29901, 13, 9651, 736, 426, 8149, 29961, 29900, 5387, 995, 29913, 13, 4706, 1683, 29901, 13, 9651, 1820, 353, 6611, 29961, 29900, 29962, 13, 9651, 628, 6611, 29961, 29900, 29962, 13, 9651, 736, 426, 1989, 29901, 1583, 17255, 5451, 29918, 1707, 29898, 8149, 29892, 995, 2915, 13, 13, 1678, 822, 4770, 14634, 29918, 5451, 29898, 1311, 29892, 6219, 29892, 8829, 29918, 16908, 1125, 13, 4706, 1820, 353, 1051, 29898, 5451, 29889, 8149, 3101, 29961, 29900, 29962, 13, 4706, 995, 353, 1051, 29898, 5451, 29889, 5975, 3101, 29961, 29900, 29962, 13, 4706, 565, 1820, 451, 297, 8829, 29918, 16908, 29901, 13, 9651, 8829, 29918, 16908, 29961, 1989, 29962, 353, 995, 13, 9651, 736, 13, 4706, 25342, 1134, 29898, 1767, 29897, 1275, 9657, 29901, 13, 9651, 1583, 17255, 14634, 29918, 5451, 29898, 1767, 29892, 8829, 29918, 16908, 29961, 1989, 2314, 13, 4706, 1683, 29901, 13, 9651, 736, 13, 13, 1678, 822, 4770, 2202, 29918, 5510, 29898, 1311, 29892, 8829, 29918, 16908, 1125, 13, 4706, 363, 1820, 29892, 995, 297, 8829, 29918, 16908, 29889, 7076, 7295, 13, 9651, 1018, 29901, 13, 18884, 565, 995, 29889, 13609, 580, 1275, 376, 3009, 1115, 13, 462, 1678, 8829, 29918, 16908, 29961, 1989, 29962, 353, 5852, 13, 18884, 25342, 995, 29889, 13609, 580, 1275, 376, 4541, 1115, 13, 462, 1678, 8829, 29918, 16908, 29961, 1989, 29962, 353, 7700, 13, 18884, 1683, 29901, 13, 462, 1678, 8829, 29918, 16908, 29961, 1989, 29962, 353, 16333, 29918, 14513, 29898, 1767, 29897, 13, 9651, 5174, 313, 1917, 2392, 29892, 21306, 2392, 1125, 13, 18884, 1209, 13, 13, 1678, 822, 4770, 8411, 29918, 14695, 29918, 19024, 29898, 1311, 29892, 1820, 29892, 995, 1125, 13, 4706, 1400, 5878, 353, 11119, 7724, 29908, 13, 4706, 565, 1820, 29889, 1975, 2541, 29898, 2490, 5878, 1125, 13, 9651, 1018, 29901, 13, 18884, 411, 1722, 29898, 1767, 29892, 376, 29878, 1159, 408, 285, 29901, 13, 462, 1678, 1583, 29889, 16908, 29961, 1989, 29961, 29900, 584, 448, 2435, 29898, 2490, 5878, 4638, 29962, 353, 285, 29889, 949, 2141, 17010, 580, 29871, 396, 694, 25621, 29901, 382, 29906, 29900, 29941, 13, 9651, 5174, 10663, 2392, 29901, 13, 18884, 29383, 703, 5971, 2392, 746, 8718, 6571, 1642, 4830, 29898, 1767, 511, 4911, 22709, 29897, 13, 13, 1678, 822, 4770, 29887, 1624, 29918, 16908, 29898, 1311, 1125, 13, 4706, 1583, 29889, 16908, 353, 6571, 13, 4706, 8829, 29918, 16908, 353, 2897, 29889, 21813, 13, 13, 4706, 363, 1820, 297, 8829, 29918, 16908, 29889, 8149, 7295, 13, 9651, 565, 1583, 17255, 3084, 29918, 1989, 29898, 1989, 1125, 13, 18884, 565, 1583, 29889, 14695, 29918, 344, 1037, 1372, 338, 451, 6213, 322, 1820, 297, 1583, 29889, 14695, 29918, 344, 1037, 1372, 29901, 13, 462, 1678, 1583, 17255, 8411, 29918, 14695, 29918, 19024, 29898, 1989, 29892, 8829, 29918, 16908, 29961, 1989, 2314, 13, 18884, 1683, 29901, 13, 462, 1678, 1583, 29889, 16908, 29961, 1989, 29962, 353, 8829, 29918, 16908, 29961, 1989, 29962, 13, 13, 4706, 565, 1583, 29889, 5510, 29918, 5975, 29901, 13, 9651, 1583, 17255, 2202, 29918, 5510, 29898, 1311, 29889, 16908, 29897, 13, 13, 4706, 565, 1583, 29889, 344, 17954, 338, 451, 6213, 29901, 13, 9651, 1583, 17255, 5451, 29918, 16908, 29898, 1311, 29889, 16908, 29897, 13, 13, 1678, 822, 4770, 517, 29918, 13609, 29898, 1311, 29892, 1820, 1125, 13, 4706, 736, 1820, 29889, 13609, 580, 13, 13, 1678, 822, 4770, 13441, 29918, 870, 414, 29883, 2361, 29898, 1311, 29892, 1820, 1125, 13, 4706, 736, 1820, 29889, 6506, 703, 29918, 613, 11663, 1159, 13, 13, 1678, 822, 4770, 3167, 29918, 8149, 29898, 1311, 29892, 8829, 29918, 16908, 29892, 5858, 1125, 13, 4706, 716, 29918, 8977, 353, 6571, 13, 4706, 363, 1820, 29892, 995, 297, 8829, 29918, 16908, 29889, 7076, 7295, 13, 9651, 565, 1134, 29898, 1767, 29897, 1275, 9657, 29901, 13, 18884, 716, 29918, 8977, 29961, 16453, 29898, 1989, 4638, 353, 1583, 17255, 3167, 29918, 8149, 29898, 1767, 29892, 5858, 29897, 13, 9651, 1683, 29901, 13, 18884, 716, 29918, 8977, 29961, 16453, 29898, 1989, 4638, 353, 8829, 29918, 16908, 29961, 1989, 29962, 13, 4706, 736, 716, 29918, 8977, 13, 2 ]
setup.py
breaks-software/OSCAAR
0
57386
# -*- coding: utf-8 -*- """Made by <NAME> (UL/TUD), with tweaks by <NAME> (NASA GSFC/UMD)""" import os import sys import shutil import subprocess import atexit import urllib2 def internet_on(): refURL = 'http://74.125.228.100' ## One Google IP address (bypass DNS lookup) try: response=urllib2.urlopen(refURL,timeout=1) return True except urllib2.URLError as err: pass return False # Checking for all required packages and if these are recent enough minimum_numpy_version = "1.6" minimum_matplotlib_version = "1.0" minimum_pyfits_version = "3.1.0" # lower versions may work (not tested) minimum_scipy_version = "0.10" # lower versions may work (not tested) minimum_wxpython_version = "2.0" # lower versions may work (not tested) sysplatform = sys.platform if not hasattr(sys, 'real_prefix'): # Currently only Python 2.7.x is supported if sys.version_info[:2] != (2, 7): raise RuntimeError("must use python 2.7.x") if not internet_on(): raise RuntimeError("Must be connected to the internet to complete "\ "install. Please connect to the internet and start "\ "the install again.") # Check if the package dependancies/requirements are fulfilled try: from setuptools import setup except: raise RuntimeError("Setuptools not found, setup cannot continue without it") try: import numpy as np except: raise RuntimeError("Numpy not found") if np.__version__ < minimum_numpy_version: print("*Error*: NumPy version is lower than needed: %s < %s" % (np.__version__, minimum_numpy_version)) sys.exit(1) try: import scipy except: raise RuntimeError("Scipy not found") if scipy.__version__ < minimum_scipy_version: print("*Error*: Scipy version is lower than needed: %s < %s" % (scipy.__version__, minimum_scipy_version)) sys.exit(1) try: import matplotlib except: raise RuntimeError("matplotlib not found") if matplotlib.__version__ < minimum_matplotlib_version: print("*Error*: matplotlib version is lower than needed: %s < %s" % (matplotlib.__version__, minimum_matplotlib_version)) sys.exit(1) try: import pyfits except: raise RuntimeError("PyFITS not found") if pyfits.__version__ < minimum_pyfits_version: print("*Error*: PyFITS version is lower than needed: %s < %s" % (pyfits.__version__, minimum_pyfits_version)) sys.exit(1) try: if sysplatform == 'darwin' or 'linux2': import wx else: """ (assuming in this case that sysplatform == 'win32' """ import wxPython except: raise RuntimeError("wxPython not found") if wx.__version__ < minimum_wxpython_version: print("*Error*: wxPython version is lower than needed: %s < %s" % (wx.__version__, minimum_wxpython_version)) sys.exit(1) else: from setuptools import setup # Walk through the subdirs and add all non-python scripts to MANIFEST.in def create_manifest(): print 'creating manifest.in' matches = [] for root, dirnames, filenames in os.walk('oscaar'): if ('.git' in str(root)) == False: for filename in filenames: if filename.endswith(('.py', '.pyc')) == False: matches.append(os.path.join(root, filename)) for root, dirnames, filenames in os.walk('docs'): if ('.git' in str(root)) == False: for filename in filenames: if filename.endswith(('.py', '.pyc')) == False: matches.append(os.path.join(root, filename)) # Manually add extra files from the top-level directory matches.append(os.path.join(os.path.dirname(__file__),'post_setup.py')) matches.append(os.path.join(os.path.dirname(__file__),'INSTALL.txt')) matches.append(os.path.join(os.path.dirname(__file__),'LICENSE.txt')) with open('MANIFEST.in', 'w') as f: f.writelines(("include %s\n" % l.replace(' ','?') for l in matches)) # To remove the manifest file after installation def delete_manifest(): if os.path.exists('MANIFEST.in'): os.remove('MANIFEST.in') # Create list for Python scripts directories to include def get_packages(): print 'searching for packages' matches = [] for root, dirnames, filenames in os.walk('oscaar'): if ('.git' in str(root)) == False: for filename in filenames: if filename.endswith(('.py', '.pyc')) == True: matches.append(root) matches = list(set(matches)) return matches def del_dir(dirname): if os.path.exists(dirname): shutil.rmtree(dirname) # The setup configuration for installing OSCAAR def setup_package(): create_manifest() list = ['Numpy>=1.6','Scipy>=0.1','pyfits>=3.1','pyephem>=3.7',\ 'matplotlib>=1.2.1'] setup( name = "OSCAAR", version = "2.0beta", author = "Core Developer: <NAME>. Contributors: "+\ "<NAME>, <NAME>, <NAME>", author_email = "<EMAIL>", description = ("oscaar is an open source project aimed at "+\ "helping you begin to study transiting extrasolar "+\ "planets with differential photometry."), license = 'LICENSE.txt', keywords = "oscaar transit astronomy photometry exoplanets", url = "https://github.com/OSCAAR/OSCAAR/wiki", packages=get_packages(), include_package_data = True, zip_safe = False, long_description=open(os.path.join(os.path.dirname(\ os.path.abspath(__file__)),'README')).read(), download_url='https://github.com/OSCAAR/OSCAAR/archive/master.zip', install_requires=list, dependency_links = ['https://downloads.sourceforge.net/project/'+\ 'matplotlib/matplotlib/matplotlib-1.2.1/'+\ 'matplotlib-1.2.1.tar.gz'], classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Science/Research', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python :: 2.7', 'Programming Language :: C', 'Topic :: Scientific/Engineering :: Astronomy', 'Topic :: Scientific/Engineering :: Physics' ], ) # At exit delete temporary files, and run post setup script if # argument is 'install' def to_do_at_exit(): delete_manifest() #del_dir('build') #del_dir('OSCAAR.egg-info') if 'install' in sys.argv: del_dir('dist') 'Installation finished. Starting DS9 downloader and compile C\n' subprocess.check_call(['python', 'post_setup.py',sys.argv[-1]]) #Set function to be executed at exit of code (when script is finished) atexit.register(to_do_at_exit) if __name__ == '__main__': setup_package()
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 13, 15945, 29908, 29924, 1943, 491, 529, 5813, 29958, 313, 13309, 29914, 29911, 15789, 511, 411, 7780, 10327, 491, 529, 5813, 29958, 313, 29940, 3289, 29909, 402, 29903, 8610, 29914, 5005, 29928, 5513, 15945, 13, 268, 13, 5215, 2897, 13, 5215, 10876, 13, 5215, 528, 4422, 13, 5215, 1014, 5014, 13, 5215, 263, 4776, 277, 13, 5215, 3142, 1982, 29906, 13, 13, 1753, 8986, 29918, 265, 7295, 13, 1678, 2143, 4219, 353, 525, 1124, 597, 29955, 29946, 29889, 29896, 29906, 29945, 29889, 29906, 29906, 29947, 29889, 29896, 29900, 29900, 29915, 444, 3118, 5087, 5641, 3211, 313, 29890, 1478, 465, 16332, 16280, 29897, 13, 1678, 1018, 29901, 13, 4706, 2933, 29922, 2271, 1982, 29906, 29889, 332, 417, 2238, 29898, 999, 4219, 29892, 15619, 29922, 29896, 29897, 13, 4706, 736, 5852, 13, 1678, 5174, 3142, 1982, 29906, 29889, 4574, 1307, 24616, 408, 4589, 29901, 1209, 13, 1678, 736, 7700, 13, 13, 29937, 5399, 292, 363, 599, 3734, 9741, 322, 565, 1438, 526, 7786, 3307, 13, 1195, 12539, 29918, 23749, 29918, 3259, 353, 376, 29896, 29889, 29953, 29908, 13, 1195, 12539, 29918, 2922, 17357, 29918, 3259, 353, 376, 29896, 29889, 29900, 29908, 13, 1195, 12539, 29918, 2272, 29888, 1169, 29918, 3259, 353, 376, 29941, 29889, 29896, 29889, 29900, 29908, 396, 5224, 6910, 1122, 664, 313, 1333, 9528, 29897, 13, 1195, 12539, 29918, 26167, 2272, 29918, 3259, 353, 376, 29900, 29889, 29896, 29900, 29908, 396, 5224, 6910, 1122, 664, 313, 1333, 9528, 29897, 13, 1195, 12539, 29918, 23310, 4691, 29918, 3259, 353, 376, 29906, 29889, 29900, 29908, 396, 5224, 6910, 1122, 664, 313, 1333, 9528, 29897, 13, 9675, 12120, 353, 10876, 29889, 12120, 13, 13, 361, 451, 756, 5552, 29898, 9675, 29892, 525, 6370, 29918, 13506, 29374, 13, 1678, 396, 15447, 871, 5132, 29871, 29906, 29889, 29955, 29889, 29916, 338, 6969, 13, 1678, 565, 10876, 29889, 3259, 29918, 3888, 7503, 29906, 29962, 2804, 313, 29906, 29892, 29871, 29955, 1125, 13, 4706, 12020, 24875, 2392, 703, 21969, 671, 3017, 29871, 29906, 29889, 29955, 29889, 29916, 1159, 13, 268, 13, 1678, 565, 451, 8986, 29918, 265, 7295, 13, 4706, 12020, 24875, 2392, 703, 29924, 504, 367, 6631, 304, 278, 8986, 304, 4866, 6634, 13, 462, 4706, 376, 6252, 29889, 3529, 4511, 304, 278, 8986, 322, 1369, 6634, 13, 462, 4706, 376, 1552, 2601, 1449, 23157, 13, 268, 13, 1678, 396, 5399, 565, 278, 3577, 8839, 273, 2478, 29914, 12277, 1860, 526, 6095, 26940, 13, 1678, 1018, 29901, 13, 4706, 515, 731, 21245, 8789, 1053, 6230, 13, 1678, 5174, 29901, 13, 4706, 12020, 24875, 2392, 703, 2697, 21245, 8789, 451, 1476, 29892, 6230, 2609, 6773, 1728, 372, 1159, 13, 308, 13, 1678, 1018, 29901, 13, 4706, 1053, 12655, 408, 7442, 13, 1678, 5174, 29901, 13, 4706, 12020, 24875, 2392, 703, 8009, 2272, 451, 1476, 1159, 13, 1678, 565, 7442, 17255, 3259, 1649, 529, 9212, 29918, 23749, 29918, 3259, 29901, 13, 4706, 1596, 703, 29930, 2392, 29930, 29901, 11848, 19737, 1873, 338, 5224, 1135, 4312, 29901, 1273, 29879, 529, 1273, 29879, 29908, 1273, 13, 795, 313, 9302, 17255, 3259, 1649, 29892, 9212, 29918, 23749, 29918, 3259, 876, 13, 4706, 10876, 29889, 13322, 29898, 29896, 29897, 13, 268, 13, 1678, 1018, 29901, 13, 4706, 1053, 4560, 2272, 13, 1678, 5174, 29901, 13, 4706, 12020, 24875, 2392, 703, 29903, 455, 2272, 451, 1476, 1159, 13, 1678, 565, 4560, 2272, 17255, 3259, 1649, 529, 9212, 29918, 26167, 2272, 29918, 3259, 29901, 13, 4706, 1596, 703, 29930, 2392, 29930, 29901, 5636, 2272, 1873, 338, 5224, 1135, 4312, 29901, 1273, 29879, 529, 1273, 29879, 29908, 1273, 13, 795, 313, 26167, 2272, 17255, 3259, 1649, 29892, 9212, 29918, 26167, 2272, 29918, 3259, 876, 13, 4706, 10876, 29889, 13322, 29898, 29896, 29897, 259, 13, 308, 13, 1678, 1018, 29901, 13, 4706, 1053, 22889, 13, 1678, 5174, 29901, 13, 4706, 12020, 24875, 2392, 703, 2922, 17357, 451, 1476, 1159, 13, 1678, 565, 22889, 17255, 3259, 1649, 529, 9212, 29918, 2922, 17357, 29918, 3259, 29901, 13, 4706, 1596, 703, 29930, 2392, 29930, 29901, 22889, 1873, 338, 5224, 1135, 4312, 29901, 1273, 29879, 529, 1273, 29879, 29908, 1273, 13, 795, 313, 2922, 17357, 17255, 3259, 1649, 29892, 9212, 29918, 2922, 17357, 29918, 3259, 876, 13, 4706, 10876, 29889, 13322, 29898, 29896, 29897, 13, 308, 13, 1678, 1018, 29901, 13, 4706, 1053, 11451, 29888, 1169, 13, 1678, 5174, 29901, 13, 4706, 12020, 24875, 2392, 703, 19737, 29943, 1806, 29903, 451, 1476, 1159, 13, 1678, 565, 11451, 29888, 1169, 17255, 3259, 1649, 529, 9212, 29918, 2272, 29888, 1169, 29918, 3259, 29901, 13, 4706, 1596, 703, 29930, 2392, 29930, 29901, 10772, 29943, 1806, 29903, 1873, 338, 5224, 1135, 4312, 29901, 1273, 29879, 529, 1273, 29879, 29908, 1273, 13, 795, 313, 2272, 29888, 1169, 17255, 3259, 1649, 29892, 9212, 29918, 2272, 29888, 1169, 29918, 3259, 876, 13, 4706, 10876, 29889, 13322, 29898, 29896, 29897, 259, 13, 308, 13, 1678, 1018, 29901, 13, 4706, 565, 10876, 12120, 1275, 525, 16702, 5080, 29915, 470, 525, 9389, 29906, 2396, 13, 632, 1053, 26437, 13, 4706, 1683, 29901, 13, 632, 9995, 313, 465, 9929, 297, 445, 1206, 393, 10876, 12120, 1275, 525, 5080, 29941, 29906, 29915, 9995, 13, 632, 1053, 26437, 11980, 13, 1678, 5174, 29901, 13, 4706, 12020, 24875, 2392, 703, 23310, 11980, 451, 1476, 1159, 13, 1678, 565, 26437, 17255, 3259, 1649, 529, 9212, 29918, 23310, 4691, 29918, 3259, 29901, 13, 4706, 1596, 703, 29930, 2392, 29930, 29901, 26437, 11980, 1873, 338, 5224, 1135, 4312, 29901, 1273, 29879, 529, 1273, 29879, 29908, 1273, 13, 795, 313, 23310, 17255, 3259, 1649, 29892, 9212, 29918, 23310, 4691, 29918, 3259, 876, 13, 4706, 10876, 29889, 13322, 29898, 29896, 29897, 259, 13, 2870, 29901, 29871, 13, 1678, 515, 731, 21245, 8789, 1053, 6230, 13, 13, 29937, 12878, 1549, 278, 1014, 3972, 29879, 322, 788, 599, 1661, 29899, 4691, 12078, 304, 341, 2190, 6545, 29923, 1254, 29889, 262, 13, 1753, 1653, 29918, 29135, 7295, 268, 13, 1678, 1596, 525, 1037, 1218, 10419, 29889, 262, 29915, 13, 1678, 7087, 353, 5159, 13, 1678, 363, 3876, 29892, 4516, 7039, 29892, 977, 264, 1280, 297, 2897, 29889, 20919, 877, 359, 1113, 279, 29374, 13, 4706, 565, 313, 4286, 5559, 29915, 297, 851, 29898, 4632, 876, 1275, 7700, 29901, 13, 9651, 363, 10422, 297, 977, 264, 1280, 29901, 13, 18884, 565, 10422, 29889, 1975, 2541, 29898, 12839, 2272, 742, 15300, 2272, 29883, 8785, 1275, 7700, 29901, 13, 462, 29871, 7087, 29889, 4397, 29898, 359, 29889, 2084, 29889, 7122, 29898, 4632, 29892, 10422, 876, 13, 1678, 363, 3876, 29892, 4516, 7039, 29892, 977, 264, 1280, 297, 2897, 29889, 20919, 877, 2640, 29374, 13, 4706, 565, 313, 4286, 5559, 29915, 297, 851, 29898, 4632, 876, 1275, 7700, 29901, 13, 9651, 363, 10422, 297, 977, 264, 1280, 29901, 13, 18884, 565, 10422, 29889, 1975, 2541, 29898, 12839, 2272, 742, 15300, 2272, 29883, 8785, 1275, 7700, 29901, 13, 462, 29871, 7087, 29889, 4397, 29898, 359, 29889, 2084, 29889, 7122, 29898, 4632, 29892, 10422, 876, 13, 1678, 396, 2315, 1474, 788, 4805, 2066, 515, 278, 2246, 29899, 5563, 3884, 13, 1678, 7087, 29889, 4397, 29898, 359, 29889, 2084, 29889, 7122, 29898, 359, 29889, 2084, 29889, 25721, 22168, 1445, 1649, 511, 29915, 2490, 29918, 14669, 29889, 2272, 8785, 13, 1678, 7087, 29889, 4397, 29898, 359, 29889, 2084, 29889, 7122, 29898, 359, 29889, 2084, 29889, 25721, 22168, 1445, 1649, 511, 29915, 25580, 9818, 29889, 3945, 8785, 13, 1678, 7087, 29889, 4397, 29898, 359, 29889, 2084, 29889, 7122, 29898, 359, 29889, 2084, 29889, 25721, 22168, 1445, 1649, 511, 29915, 27888, 1430, 1660, 29889, 3945, 8785, 13, 13, 1678, 411, 1722, 877, 27616, 6545, 29923, 1254, 29889, 262, 742, 525, 29893, 1495, 408, 285, 29901, 13, 4706, 285, 29889, 8231, 24210, 29898, 703, 2856, 1273, 29879, 29905, 29876, 29908, 1273, 301, 29889, 6506, 877, 525, 5501, 29973, 1495, 363, 301, 297, 7087, 876, 13, 13, 29937, 1763, 3349, 278, 10419, 934, 1156, 11161, 13, 1753, 5217, 29918, 29135, 7295, 13, 1678, 565, 2897, 29889, 2084, 29889, 9933, 877, 27616, 6545, 29923, 1254, 29889, 262, 29374, 13, 4706, 2897, 29889, 5992, 877, 27616, 6545, 29923, 1254, 29889, 262, 1495, 13, 268, 13, 29937, 6204, 1051, 363, 5132, 12078, 17525, 304, 3160, 13, 1753, 679, 29918, 8318, 7295, 13, 1678, 1596, 525, 4478, 292, 363, 9741, 29915, 13, 1678, 7087, 353, 5159, 13, 1678, 363, 3876, 29892, 4516, 7039, 29892, 977, 264, 1280, 297, 2897, 29889, 20919, 877, 359, 1113, 279, 29374, 13, 4706, 565, 313, 4286, 5559, 29915, 297, 851, 29898, 4632, 876, 1275, 7700, 29901, 13, 9651, 363, 10422, 297, 977, 264, 1280, 29901, 13, 18884, 565, 10422, 29889, 1975, 2541, 29898, 12839, 2272, 742, 15300, 2272, 29883, 8785, 1275, 5852, 29901, 13, 462, 1678, 7087, 29889, 4397, 29898, 4632, 29897, 13, 1678, 7087, 353, 1051, 29898, 842, 29898, 20317, 876, 13, 1678, 736, 7087, 13, 268, 13, 1753, 628, 29918, 3972, 29898, 25721, 1125, 13, 1678, 565, 2897, 29889, 2084, 29889, 9933, 29898, 25721, 1125, 13, 4706, 528, 4422, 29889, 1758, 8336, 29898, 25721, 29897, 13, 268, 13, 29937, 450, 6230, 5285, 363, 15476, 6570, 5454, 1718, 13, 13, 13, 1753, 6230, 29918, 5113, 7295, 13, 1678, 1653, 29918, 29135, 580, 13, 1678, 1051, 353, 6024, 8009, 2272, 18572, 29896, 29889, 29953, 3788, 29903, 455, 2272, 18572, 29900, 29889, 29896, 3788, 2272, 29888, 1169, 18572, 29941, 29889, 29896, 3788, 2272, 29872, 561, 331, 18572, 29941, 29889, 29955, 742, 29905, 13, 308, 525, 2922, 17357, 18572, 29896, 29889, 29906, 29889, 29896, 2033, 13, 1678, 6230, 29898, 13, 4706, 1024, 353, 376, 3267, 5454, 1718, 613, 13, 4706, 1873, 353, 376, 29906, 29889, 29900, 3571, 613, 13, 4706, 4148, 353, 376, 9203, 10682, 261, 29901, 529, 5813, 15513, 2866, 1091, 29560, 29901, 376, 3124, 13, 462, 418, 9872, 5813, 10202, 529, 5813, 10202, 529, 5813, 28341, 13, 4706, 4148, 29918, 5269, 353, 9872, 26862, 6227, 28341, 13, 4706, 6139, 353, 4852, 359, 1113, 279, 338, 385, 1722, 2752, 2060, 12242, 287, 472, 376, 3124, 13, 462, 418, 376, 8477, 292, 366, 3380, 304, 6559, 1301, 11407, 429, 10678, 10170, 376, 3124, 13, 462, 418, 376, 9018, 1691, 411, 16712, 6731, 7843, 1213, 511, 13, 4706, 19405, 353, 525, 27888, 1430, 1660, 29889, 3945, 742, 13, 4706, 29361, 353, 376, 359, 1113, 279, 1301, 277, 20932, 29891, 6731, 7843, 429, 459, 6468, 1691, 613, 13, 4706, 3142, 353, 376, 991, 597, 3292, 29889, 510, 29914, 3267, 5454, 1718, 29914, 3267, 5454, 1718, 29914, 4594, 613, 13, 4706, 9741, 29922, 657, 29918, 8318, 3285, 13, 4706, 3160, 29918, 5113, 29918, 1272, 353, 5852, 29892, 13, 4706, 14319, 29918, 11177, 353, 7700, 29892, 13, 4706, 1472, 29918, 8216, 29922, 3150, 29898, 359, 29889, 2084, 29889, 7122, 29898, 359, 29889, 2084, 29889, 25721, 1194, 13, 462, 418, 2897, 29889, 2084, 29889, 370, 1028, 493, 22168, 1445, 1649, 8243, 29915, 16310, 2303, 1495, 467, 949, 3285, 13, 4706, 5142, 29918, 2271, 2433, 991, 597, 3292, 29889, 510, 29914, 3267, 5454, 1718, 29914, 3267, 5454, 1718, 29914, 10867, 29914, 6207, 29889, 7554, 742, 13, 308, 2601, 29918, 276, 339, 2658, 29922, 1761, 29892, 13, 308, 10609, 29918, 4965, 353, 6024, 991, 597, 10382, 29879, 29889, 28315, 29889, 1212, 29914, 4836, 22208, 3124, 13, 462, 9651, 525, 2922, 17357, 29914, 2922, 17357, 29914, 2922, 17357, 29899, 29896, 29889, 29906, 29889, 29896, 22208, 3124, 13, 462, 9651, 525, 2922, 17357, 29899, 29896, 29889, 29906, 29889, 29896, 29889, 12637, 29889, 18828, 7464, 13, 4706, 770, 14903, 11759, 13, 3986, 525, 21956, 358, 16034, 4761, 29871, 29946, 448, 350, 1187, 742, 13, 3986, 525, 2928, 2760, 319, 4749, 663, 4761, 9327, 29914, 1666, 2842, 742, 13, 3986, 525, 29931, 293, 1947, 4761, 438, 5425, 28268, 1490, 4761, 341, 1806, 19245, 742, 13, 3986, 525, 7094, 1218, 2184, 4761, 6570, 25266, 742, 13, 3986, 525, 9283, 4056, 17088, 4761, 5132, 4761, 29871, 29906, 29889, 29955, 742, 13, 3986, 525, 9283, 4056, 17088, 4761, 315, 742, 13, 3986, 525, 7031, 293, 4761, 23753, 928, 29914, 12412, 3241, 4761, 27348, 29891, 742, 13, 3986, 525, 7031, 293, 4761, 23753, 928, 29914, 12412, 3241, 4761, 29837, 29915, 13, 418, 21251, 13, 1678, 1723, 13, 13, 13, 29937, 2180, 6876, 5217, 13201, 2066, 29892, 322, 1065, 1400, 6230, 2471, 565, 29871, 13, 29937, 2980, 338, 525, 6252, 29915, 13, 1753, 304, 29918, 1867, 29918, 271, 29918, 13322, 7295, 13, 1678, 5217, 29918, 29135, 580, 13, 1678, 396, 6144, 29918, 3972, 877, 4282, 1495, 13, 1678, 396, 6144, 29918, 3972, 877, 3267, 5454, 1718, 29889, 387, 29887, 29899, 3888, 1495, 13, 268, 13, 1678, 565, 525, 6252, 29915, 297, 10876, 29889, 19218, 29901, 29871, 13, 4706, 628, 29918, 3972, 877, 5721, 1495, 13, 308, 13, 4706, 525, 23271, 362, 7743, 29889, 23748, 360, 29903, 29929, 5142, 261, 322, 6633, 315, 29905, 29876, 29915, 13, 4706, 1014, 5014, 29889, 3198, 29918, 4804, 18959, 4691, 742, 525, 2490, 29918, 14669, 29889, 2272, 742, 9675, 29889, 19218, 14352, 29896, 24960, 13, 13, 29937, 2697, 740, 304, 367, 8283, 472, 6876, 310, 775, 313, 8256, 2471, 338, 7743, 29897, 13, 403, 29916, 277, 29889, 9573, 29898, 517, 29918, 1867, 29918, 271, 29918, 13322, 29897, 13, 268, 13, 361, 4770, 978, 1649, 1275, 525, 1649, 3396, 1649, 2396, 13, 1678, 6230, 29918, 5113, 580, 2 ]
users/forms.py
iurykrieger96/alura-django
0
9155
<filename>users/forms.py from django import forms from django.contrib.auth.models import User from django.forms.utils import ErrorList class UserForm(forms.Form): name = forms.CharField(required=True) email = forms.EmailField(required=True) password = forms.CharField(required=True) phone = forms.CharField(required=True) name_company = forms.CharField(required=True) def is_valid(self): valid = True if not super(UserForm, self).is_valid(): self.add_erro('Por favor, verifique os dados informados') valid = False user_exists = User.objects.filter(username=self.data['name']).exists() if user_exists: self.add_erro('Usuario ja existente') valid = False return valid def add_erro(self, message): self._errors.setdefault(forms.forms.NON_FIELD_ERRORS, ErrorList()).append(message)
[ 1, 529, 9507, 29958, 7193, 29914, 9514, 29889, 2272, 13, 3166, 9557, 1053, 7190, 13, 3166, 9557, 29889, 21570, 29889, 5150, 29889, 9794, 1053, 4911, 13, 3166, 9557, 29889, 9514, 29889, 13239, 1053, 4829, 1293, 13, 13, 13, 1990, 4911, 2500, 29898, 9514, 29889, 2500, 1125, 13, 1678, 1024, 353, 7190, 29889, 27890, 29898, 12403, 29922, 5574, 29897, 13, 1678, 4876, 353, 7190, 29889, 9823, 3073, 29898, 12403, 29922, 5574, 29897, 13, 1678, 4800, 353, 7190, 29889, 27890, 29898, 12403, 29922, 5574, 29897, 13, 1678, 9008, 353, 7190, 29889, 27890, 29898, 12403, 29922, 5574, 29897, 13, 1678, 1024, 29918, 14518, 353, 7190, 29889, 27890, 29898, 12403, 29922, 5574, 29897, 13, 13, 1678, 822, 338, 29918, 3084, 29898, 1311, 1125, 13, 4706, 2854, 353, 5852, 13, 4706, 565, 451, 2428, 29898, 2659, 2500, 29892, 1583, 467, 275, 29918, 3084, 7295, 13, 9651, 1583, 29889, 1202, 29918, 261, 307, 877, 29925, 272, 7853, 29892, 1147, 22781, 2897, 270, 2255, 1871, 2255, 1495, 13, 9651, 2854, 353, 7700, 13, 4706, 1404, 29918, 9933, 353, 4911, 29889, 12650, 29889, 4572, 29898, 6786, 29922, 1311, 29889, 1272, 1839, 978, 2033, 467, 9933, 580, 13, 4706, 565, 1404, 29918, 9933, 29901, 13, 9651, 1583, 29889, 1202, 29918, 261, 307, 877, 29965, 2146, 2628, 12337, 1863, 2016, 1495, 13, 9651, 2854, 353, 7700, 13, 13, 4706, 736, 2854, 13, 13, 1678, 822, 788, 29918, 261, 307, 29898, 1311, 29892, 2643, 1125, 13, 4706, 1583, 3032, 12523, 29889, 842, 4381, 29898, 9514, 29889, 9514, 29889, 29940, 1164, 29918, 3738, 27286, 29918, 11432, 29903, 29892, 4829, 1293, 16655, 4397, 29898, 4906, 29897, 13, 2 ]
beansdbadmin/core/client.py
ariesdevil/beansdbadmin
11
400
<filename>beansdbadmin/core/client.py #!/usr/bin/python # encoding: utf-8 '''a rich client 1. for one server (instead of multi like in libmc.Client) 2. encapsulate @, ?, gc ... use is instead of libmc.Client ''' import telnetlib import logging import libmc import string import urllib import itertools import warnings from collections import defaultdict from beansdbadmin.core.hint import parse_new_hint_body from beansdbadmin.core.data import parse_records from beansdbadmin.core.hash import get_khash64 def get_url_content(url): return urllib.urlopen(url).read() def check_bucket(bucket): assert 0 <= bucket < 16 def dir_to_dict(dir_str): d = dict() if dir_str: for line in [x for x in dir_str.split('\n') if x]: key_or_bucket, _hash, ver_or_count = line.split(' ') d[key_or_bucket] = int(_hash) & 0xffff, int(ver_or_count) return d def get_bucket_keys_count(store, bucket, depth=1): cmd = "@" sub = bucket if depth == 2: cmd = "@%x" % (bucket/16) sub = bucket % 16 result = store.get(cmd) if result: lines = result.split('\n') for line in lines: if len(line) == 0: continue d, _, c = line.split() if d.endswith('/'): bucket_ = int(d[0], 16) if bucket_ == sub: return int(c) raise Exception('get %s from %s, reply = [%s], bucket %x not found' % (cmd, store, result, bucket)) def get_buckets_keys_count(store): """ return dict: buckets -> count """ st = {} try: for line in (store.get('@') or '').split('\n'): if line: d, _, c = line.split(' ') if not d.endswith('/'): continue st[int(d[0], 16)] = int(c) return st except IOError: raise Exception("cannot get @ from %s" % (store)) def get_primary_buckets(store): """ return possible primary buckets, might be wrong on temporary nodes, result is list of buckets in integer """ ss = get_buckets_keys_count(store) bucket_list = ss.items() bucket_list = [x for x in bucket_list if x[1] > 0] if not bucket_list: return None bucket_list.sort(lambda a, b: cmp(a[1], b[1]), reverse=True) result = [bucket_list[0]] for i in bucket_list[1:]: if result[-1][1] / i[1] >= 2: break result.append(i) return [x[0] for x in result] def get_key_info_disk(store, key): '''return ver, vhash, flag, vsz, ts, fid, pos''' info = store.get('??' + key) if info: return [int(x) for x in info.split()] def is_gc_running(ip, port): s = get_gc_status(ip, port) if s and s.find('running') >= 0: return True return False def get_gc_status(ip, port): t = telnetlib.Telnet(ip, port) t.write('optimize_stat\r\n') out = t.read_until('\n') t.write('quit\r\n') t.close() return out.strip("\r\n") def connect(server, **kwargs): comp_threshold = kwargs.pop('comp_threshold', 0) prefix = kwargs.pop('prefix', None) if prefix is not None: warnings.warn('"prefix" is deprecated. ' 'use douban.wrapper.Prefix instead.') c = libmc.Client([server], do_split=0, comp_threshold=comp_threshold, prefix=prefix) c.config(libmc.MC_CONNECT_TIMEOUT, 300) # 0.3s c.config(libmc.MC_POLL_TIMEOUT, 3000) # 3s c.config(libmc.MC_RETRY_TIMEOUT, 5) # 5s return c class MCStore(object): IGNORED_LIBMC_RET = frozenset([ libmc.MC_RETURN_OK, libmc.MC_RETURN_INVALID_KEY_ERR ]) def __init__(self, addr): self.addr = addr self.host, port = addr.split(":") self.port = int(port) self.mc = connect(addr) def __repr__(self): return '<MCStore(addr=%s)>' % repr(self.addr) def __str__(self): return self.addr def set(self, key, data, rev=0): return bool(self.mc.set(key, data, rev)) def set_raw(self, key, data, rev=0, flag=0): if rev < 0: raise Exception(str(rev)) return self.mc.set_raw(key, data, rev, flag) def set_multi(self, values, return_failure=False): return self.mc.set_multi(values, return_failure=return_failure) def _check_last_error(self): last_err = self.mc.get_last_error() if last_err not in self.IGNORED_LIBMC_RET: raise IOError(last_err, self.mc.get_last_strerror()) def get(self, key): try: r = self.mc.get(key) if r is None: self._check_last_error() return r except ValueError: self.mc.delete(key) def get_raw(self, key): r, flag = self.mc.get_raw(key) if r is None: self._check_last_error() return r, flag def get_multi(self, keys): r = self.mc.get_multi(keys) self._check_last_error() return r def delete(self, key): return bool(self.mc.delete(key)) def delete_multi(self, keys, return_failure=False): return self.mc.delete_multi(keys, return_failure=return_failure) def exists(self, key): return bool(self.mc.get('?' + key)) def incr(self, key, value): return self.mc.incr(key, int(value)) class DBClient(MCStore): def __init__(self, addr): MCStore.__init__(self, addr) self._is_old = None def stats(self): stats = self.mc.stats() return stats.values()[0] if stats else None def is_old(self): if self._is_old is None: ver = self.get_server_version() self._is_old = (ver.strip().split(".")[0] == "0") return self._is_old def get_collision_summary(self, bucket): check_bucket(bucket) raw = self.get("@collision_%x" % bucket) if raw is None: return None count, hcount, khash, data_size = raw.split() return (int(count), int(hcount), int(khash, 16), int(data_size)) def get_collision(self, bucket): check_bucket(bucket) collisions = defaultdict(dict) hint_data = self.get("@collision_all_%x" % bucket) if hint_data is None: return dict() for key, meta, _ in parse_new_hint_body(hint_data): khash_str, _, ver, vhash = meta collisions[khash_str][key] = (vhash, ver) return dict(collisions) def get_records_by_khash_raw(self, khash): if self.is_old(): return [] if not isinstance(khash, str): khash = "%016x" % khash return self.get("@@" + khash) def get_records_by_khash(self, khash_str): raw = self.get_records_by_khash_raw(khash_str) if raw: return parse_records(raw, False) else: return [] def start_gc(self, bucket='', start_fid=0, end_fid=None): """ bucket must be in 0 or 00 string """ if bucket: assert isinstance(bucket, basestring) and len(bucket) <= 2 t = telnetlib.Telnet(self.host, self.port) tree = '@%s' % bucket if end_fid is None: gc_cmd = 'gc {} {}\n'.format(tree, start_fid) else: gc_cmd = 'gc {} {} {}\n'.format(tree, start_fid, end_fid) t.write(gc_cmd) out = t.read_until('\n').strip('\r\n') assert out == 'OK' t.write('quit\n') t.close() def start_gc_all_buckets(self, db_depth): hex_digits = string.digits + 'abcdef' buckets_iter = itertools.product(*[hex_digits for _ in range(db_depth)]) buckets = [''.join(i) for i in buckets_iter] self.start_gc_buckets(buckets) def start_gc_buckets(self, buckets): for b in buckets: self.start_gc(bucket=b) while True: status = self.get_gc_status() if status.find('running') >= 0: continue elif status == 'success': print "bucket %s gc done" % b break elif status == 'fail': return self.fail("optimize_stat = fail") else: self.fail(status) def get_gc_status(self): return get_gc_status(self.host, self.port) def get_version(self, key): meta = self.get("?" + key) if meta: return int(meta.split()[0]) def item_count(self): s = self.stats() if s is None: return None return int(s['total_items']) def get_key_info_mem(self, key, khash64=None): ''' return (vhash, ver) or None''' if khash64 is None: khash64 = get_khash64(key) khash32_str = "@%08x" % (khash64 >> 32) _dir = self.get_dir(khash32_str) if self.is_old(): return _dir.get(key, None) else: return _dir.get("%016x" % khash64, None) def get_khash_info_mem(self, khash): ''' return [(key, (vhash, ver))], key is "" for v2.''' khash32 = "@%08x" % (khash >> 32) _dir = self.get_dir(khash32) ret = [] if self.is_old(): for k, (vhash, ver) in _dir.iteritems(): if get_khash64(k) == khash: ret.append((k, (vhash, ver))) else: for k, (vhash, ver) in _dir.iteritems(): if int(k, 16) == khash: return [("", (int(vhash), ver))] return ret def get_server_version(self): try: st = self.stats() if st: return st["version"] except IOError: logging.error("fail to get version %s", self) except KeyError: logging.error("fail to get version %s %s", self, st) def get_dir(self, path): ''' return dict case1: map dir(0-f) to (hash, count), like {'0/': (1471, 27784005), ... }, case2: map key(or khash) to (vhash, version), like {'3000000377e9c2ad': (22212, 1), ... }''' try: content = self.get(path) except IOError: content = '' return dir_to_dict(content) def list_dir(self, d): # FIXME: d should not need prefix @? '''list all KEY in the dir! not use it if dir is large!''' for path, (vhash, ver) in sorted(self.get_dir(d).items()): if path.endswith('/') and len(path) == 2: for v in self.list_dir(d + path[:-1]): yield v else: yield path, int(vhash), int(ver) def get_bucket_keys_count(self, bucket, depth=1): return get_bucket_keys_count(self, bucket, depth) def get_key_info_disk(self, key): '''return ver, vhash, flag, vsz, ts, fid, pos''' return get_key_info_disk(self, key) def prepare(self, data): return libmc.encode_value(data, self.mc.comp_threshold) def close(self): pass def test_new(addr, bucket): b = bucket c = DBClient(addr) print "stats:", c.stats() print 'version:', c.get_server_version() print "isold:", c.is_old() print "dir root:", c.get_dir("@") print "bucket key count:", c.get_bucket_keys_count(int(b)) print "item_count:", c.item_count() print "primary_buckets", get_primary_buckets(c) leaf = c.get_dir("@" + b + "000000") print "a dir leaf:", leaf khash_str = list(leaf)[0] print "a khash_str", khash_str r = c.get_records_by_khash(khash_str)[0] k = r[0] print "key, len(value), (flag, tstamp, ver):", k, r[1], r[3:] print "key info mem:", c.get_key_info_mem(k) print "key info disk(ver, vhash, flag, vsz, ts, fid, pos):", \ c.get_key_info_disk(k) print "key version:", c.get_version(k) print "collision_summary", c.get_collision_summary(int(b)) print "gc status:", c.get_gc_status() if __name__ == '__main__': test_new("rosa3a:7900", '3')
[ 1, 529, 9507, 29958, 11700, 2585, 6406, 29914, 3221, 29914, 4645, 29889, 2272, 13, 29937, 14708, 4855, 29914, 2109, 29914, 4691, 13, 29937, 8025, 29901, 23616, 29899, 29947, 13, 12008, 29874, 8261, 3132, 13, 268, 29896, 29889, 363, 697, 1923, 313, 2611, 1479, 310, 2473, 763, 297, 4303, 14047, 29889, 4032, 29897, 13, 268, 29906, 29889, 2094, 2547, 5987, 732, 29892, 1577, 29892, 330, 29883, 2023, 13, 13, 1509, 338, 2012, 310, 4303, 14047, 29889, 4032, 13, 12008, 13, 13, 5215, 13547, 1212, 1982, 13, 5215, 12183, 13, 5215, 4303, 14047, 13, 5215, 1347, 13, 5215, 3142, 1982, 13, 5215, 4256, 8504, 13, 5215, 18116, 13, 3166, 16250, 1053, 2322, 8977, 13, 3166, 367, 550, 2585, 6406, 29889, 3221, 29889, 29882, 524, 1053, 6088, 29918, 1482, 29918, 29882, 524, 29918, 2587, 13, 3166, 367, 550, 2585, 6406, 29889, 3221, 29889, 1272, 1053, 6088, 29918, 3757, 4339, 13, 3166, 367, 550, 2585, 6406, 29889, 3221, 29889, 8568, 1053, 679, 29918, 29895, 8568, 29953, 29946, 13, 13, 13, 1753, 679, 29918, 2271, 29918, 3051, 29898, 2271, 1125, 13, 1678, 736, 3142, 1982, 29889, 332, 417, 2238, 29898, 2271, 467, 949, 580, 13, 13, 13, 1753, 1423, 29918, 21454, 29898, 21454, 1125, 13, 1678, 4974, 29871, 29900, 5277, 20968, 529, 29871, 29896, 29953, 13, 13, 13, 1753, 4516, 29918, 517, 29918, 8977, 29898, 3972, 29918, 710, 1125, 13, 1678, 270, 353, 9657, 580, 13, 1678, 565, 4516, 29918, 710, 29901, 13, 4706, 363, 1196, 297, 518, 29916, 363, 921, 297, 4516, 29918, 710, 29889, 5451, 28909, 29876, 1495, 565, 921, 5387, 13, 9651, 1820, 29918, 272, 29918, 21454, 29892, 903, 8568, 29892, 1147, 29918, 272, 29918, 2798, 353, 1196, 29889, 5451, 877, 25710, 13, 9651, 270, 29961, 1989, 29918, 272, 29918, 21454, 29962, 353, 938, 7373, 8568, 29897, 669, 29871, 29900, 29916, 17156, 29892, 938, 29898, 369, 29918, 272, 29918, 2798, 29897, 13, 1678, 736, 270, 13, 13, 13, 1753, 679, 29918, 21454, 29918, 8149, 29918, 2798, 29898, 8899, 29892, 20968, 29892, 10809, 29922, 29896, 1125, 13, 1678, 9920, 353, 376, 5507, 13, 1678, 1014, 353, 20968, 13, 1678, 565, 10809, 1275, 29871, 29906, 29901, 13, 4706, 9920, 353, 17962, 29995, 29916, 29908, 1273, 313, 21454, 29914, 29896, 29953, 29897, 13, 4706, 1014, 353, 20968, 1273, 29871, 29896, 29953, 13, 1678, 1121, 353, 3787, 29889, 657, 29898, 9006, 29897, 13, 1678, 565, 1121, 29901, 13, 4706, 3454, 353, 1121, 29889, 5451, 28909, 29876, 1495, 13, 4706, 363, 1196, 297, 3454, 29901, 13, 9651, 565, 7431, 29898, 1220, 29897, 1275, 29871, 29900, 29901, 13, 18884, 6773, 13, 9651, 270, 29892, 17117, 274, 353, 1196, 29889, 5451, 580, 13, 9651, 565, 270, 29889, 1975, 2541, 11219, 29374, 13, 18884, 20968, 29918, 353, 938, 29898, 29881, 29961, 29900, 1402, 29871, 29896, 29953, 29897, 13, 18884, 565, 20968, 29918, 1275, 1014, 29901, 13, 462, 1678, 736, 938, 29898, 29883, 29897, 13, 1678, 12020, 8960, 877, 657, 1273, 29879, 515, 1273, 29879, 29892, 8908, 353, 518, 29995, 29879, 1402, 20968, 1273, 29916, 451, 1476, 29915, 1273, 313, 9006, 29892, 3787, 29892, 1121, 29892, 20968, 876, 13, 13, 13, 1753, 679, 29918, 2423, 9737, 29918, 8149, 29918, 2798, 29898, 8899, 1125, 13, 1678, 9995, 736, 9657, 29901, 1321, 9737, 1599, 2302, 9995, 13, 1678, 380, 353, 6571, 13, 1678, 1018, 29901, 13, 4706, 363, 1196, 297, 313, 8899, 29889, 657, 877, 29992, 1495, 470, 525, 2824, 5451, 28909, 29876, 29374, 13, 9651, 565, 1196, 29901, 13, 18884, 270, 29892, 17117, 274, 353, 1196, 29889, 5451, 877, 25710, 13, 18884, 565, 451, 270, 29889, 1975, 2541, 11219, 29374, 13, 462, 1678, 6773, 13, 18884, 380, 29961, 524, 29898, 29881, 29961, 29900, 1402, 29871, 29896, 29953, 4638, 353, 938, 29898, 29883, 29897, 13, 4706, 736, 380, 13, 1678, 5174, 10663, 2392, 29901, 13, 4706, 12020, 8960, 703, 29883, 6735, 679, 732, 515, 1273, 29879, 29908, 1273, 313, 8899, 876, 13, 13, 13, 1753, 679, 29918, 16072, 29918, 2423, 9737, 29898, 8899, 1125, 13, 1678, 9995, 736, 1950, 7601, 1321, 9737, 29892, 1795, 367, 2743, 373, 13201, 7573, 29892, 13, 4706, 1121, 338, 1051, 310, 1321, 9737, 297, 6043, 13, 1678, 9995, 13, 1678, 17971, 353, 679, 29918, 2423, 9737, 29918, 8149, 29918, 2798, 29898, 8899, 29897, 13, 1678, 20968, 29918, 1761, 353, 17971, 29889, 7076, 580, 13, 1678, 20968, 29918, 1761, 353, 518, 29916, 363, 921, 297, 20968, 29918, 1761, 565, 921, 29961, 29896, 29962, 1405, 29871, 29900, 29962, 13, 1678, 565, 451, 20968, 29918, 1761, 29901, 13, 4706, 736, 6213, 13, 1678, 20968, 29918, 1761, 29889, 6605, 29898, 2892, 263, 29892, 289, 29901, 274, 1526, 29898, 29874, 29961, 29896, 1402, 289, 29961, 29896, 11724, 11837, 29922, 5574, 29897, 13, 1678, 1121, 353, 518, 21454, 29918, 1761, 29961, 29900, 5262, 13, 1678, 363, 474, 297, 20968, 29918, 1761, 29961, 29896, 29901, 5387, 13, 4706, 565, 1121, 14352, 29896, 3816, 29896, 29962, 847, 474, 29961, 29896, 29962, 6736, 29871, 29906, 29901, 13, 9651, 2867, 13, 4706, 1121, 29889, 4397, 29898, 29875, 29897, 13, 1678, 736, 518, 29916, 29961, 29900, 29962, 363, 921, 297, 1121, 29962, 13, 13, 13, 1753, 679, 29918, 1989, 29918, 3888, 29918, 20960, 29898, 8899, 29892, 1820, 1125, 13, 1678, 14550, 2457, 1147, 29892, 325, 8568, 29892, 7353, 29892, 325, 3616, 29892, 18696, 29892, 25947, 29892, 926, 12008, 13, 1678, 5235, 353, 3787, 29889, 657, 877, 8773, 29915, 718, 1820, 29897, 13, 1678, 565, 5235, 29901, 13, 4706, 736, 518, 524, 29898, 29916, 29897, 363, 921, 297, 5235, 29889, 5451, 580, 29962, 13, 13, 13, 1753, 338, 29918, 27354, 29918, 21094, 29898, 666, 29892, 2011, 1125, 13, 1678, 269, 353, 679, 29918, 27354, 29918, 4882, 29898, 666, 29892, 2011, 29897, 13, 1678, 565, 269, 322, 269, 29889, 2886, 877, 21094, 1495, 6736, 29871, 29900, 29901, 13, 4706, 736, 5852, 13, 1678, 736, 7700, 13, 13, 13, 1753, 679, 29918, 27354, 29918, 4882, 29898, 666, 29892, 2011, 1125, 13, 1678, 260, 353, 13547, 1212, 1982, 29889, 29911, 295, 1212, 29898, 666, 29892, 2011, 29897, 13, 1678, 260, 29889, 3539, 877, 20640, 675, 29918, 6112, 29905, 29878, 29905, 29876, 1495, 13, 1678, 714, 353, 260, 29889, 949, 29918, 29305, 28909, 29876, 1495, 13, 1678, 260, 29889, 3539, 877, 28358, 29905, 29878, 29905, 29876, 1495, 13, 1678, 260, 29889, 5358, 580, 13, 1678, 736, 714, 29889, 17010, 14182, 29878, 29905, 29876, 1159, 13, 13, 13, 1753, 4511, 29898, 2974, 29892, 3579, 19290, 1125, 13, 1678, 752, 29918, 386, 12268, 353, 9049, 5085, 29889, 7323, 877, 2388, 29918, 386, 12268, 742, 29871, 29900, 29897, 13, 1678, 10944, 353, 9049, 5085, 29889, 7323, 877, 13506, 742, 6213, 29897, 13, 1678, 565, 10944, 338, 451, 6213, 29901, 13, 4706, 18116, 29889, 25442, 877, 29908, 13506, 29908, 338, 18164, 29889, 525, 13, 462, 418, 525, 1509, 4662, 2571, 29889, 17699, 29889, 23095, 2012, 29889, 1495, 13, 13, 1678, 274, 353, 4303, 14047, 29889, 4032, 4197, 2974, 1402, 13, 462, 268, 437, 29918, 5451, 29922, 29900, 29892, 13, 462, 268, 752, 29918, 386, 12268, 29922, 2388, 29918, 386, 12268, 29892, 13, 462, 268, 10944, 29922, 13506, 29897, 13, 1678, 274, 29889, 2917, 29898, 1982, 14047, 29889, 12513, 29918, 6007, 8186, 1783, 29918, 15307, 12015, 29892, 29871, 29941, 29900, 29900, 29897, 29871, 396, 29871, 29900, 29889, 29941, 29879, 13, 1678, 274, 29889, 2917, 29898, 1982, 14047, 29889, 12513, 29918, 13152, 2208, 29918, 15307, 12015, 29892, 29871, 29941, 29900, 29900, 29900, 29897, 29871, 396, 29871, 29941, 29879, 13, 1678, 274, 29889, 2917, 29898, 1982, 14047, 29889, 12513, 29918, 1525, 5659, 29979, 29918, 15307, 12015, 29892, 29871, 29945, 29897, 29871, 396, 29871, 29945, 29879, 13, 1678, 736, 274, 13, 13, 13, 1990, 21271, 9044, 29898, 3318, 1125, 13, 1678, 306, 29954, 6632, 19386, 29918, 5265, 29933, 12513, 29918, 1525, 29911, 353, 14671, 29920, 575, 300, 4197, 13, 4706, 4303, 14047, 29889, 12513, 29918, 1525, 29911, 24015, 29918, 8949, 29892, 13, 4706, 4303, 14047, 29889, 12513, 29918, 1525, 29911, 24015, 29918, 1177, 26707, 29918, 10818, 29918, 21662, 13, 268, 2314, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 28915, 1125, 13, 4706, 1583, 29889, 10030, 353, 28915, 13, 4706, 1583, 29889, 3069, 29892, 2011, 353, 28915, 29889, 5451, 703, 29901, 1159, 13, 4706, 1583, 29889, 637, 353, 938, 29898, 637, 29897, 13, 4706, 1583, 29889, 14047, 353, 4511, 29898, 10030, 29897, 13, 13, 1678, 822, 4770, 276, 558, 12035, 1311, 1125, 13, 4706, 736, 12801, 12513, 9044, 29898, 10030, 16328, 29879, 15410, 29915, 1273, 2062, 29898, 1311, 29889, 10030, 29897, 13, 13, 1678, 822, 4770, 710, 12035, 1311, 1125, 13, 4706, 736, 1583, 29889, 10030, 13, 13, 1678, 822, 731, 29898, 1311, 29892, 1820, 29892, 848, 29892, 6664, 29922, 29900, 1125, 13, 4706, 736, 6120, 29898, 1311, 29889, 14047, 29889, 842, 29898, 1989, 29892, 848, 29892, 6664, 876, 13, 13, 1678, 822, 731, 29918, 1610, 29898, 1311, 29892, 1820, 29892, 848, 29892, 6664, 29922, 29900, 29892, 7353, 29922, 29900, 1125, 13, 4706, 565, 6664, 529, 29871, 29900, 29901, 13, 9651, 12020, 8960, 29898, 710, 29898, 13478, 876, 13, 4706, 736, 1583, 29889, 14047, 29889, 842, 29918, 1610, 29898, 1989, 29892, 848, 29892, 6664, 29892, 7353, 29897, 13, 13, 1678, 822, 731, 29918, 9910, 29898, 1311, 29892, 1819, 29892, 736, 29918, 14057, 545, 29922, 8824, 1125, 13, 4706, 736, 1583, 29889, 14047, 29889, 842, 29918, 9910, 29898, 5975, 29892, 736, 29918, 14057, 545, 29922, 2457, 29918, 14057, 545, 29897, 13, 13, 1678, 822, 903, 3198, 29918, 4230, 29918, 2704, 29898, 1311, 1125, 13, 4706, 1833, 29918, 3127, 353, 1583, 29889, 14047, 29889, 657, 29918, 4230, 29918, 2704, 580, 13, 4706, 565, 1833, 29918, 3127, 451, 297, 1583, 29889, 6259, 6632, 19386, 29918, 5265, 29933, 12513, 29918, 1525, 29911, 29901, 13, 9651, 12020, 10663, 2392, 29898, 4230, 29918, 3127, 29892, 1583, 29889, 14047, 29889, 657, 29918, 4230, 29918, 710, 2704, 3101, 13, 13, 1678, 822, 679, 29898, 1311, 29892, 1820, 1125, 13, 4706, 1018, 29901, 13, 9651, 364, 353, 1583, 29889, 14047, 29889, 657, 29898, 1989, 29897, 13, 9651, 565, 364, 338, 6213, 29901, 13, 18884, 1583, 3032, 3198, 29918, 4230, 29918, 2704, 580, 13, 9651, 736, 364, 13, 4706, 5174, 7865, 2392, 29901, 13, 9651, 1583, 29889, 14047, 29889, 8143, 29898, 1989, 29897, 13, 13, 1678, 822, 679, 29918, 1610, 29898, 1311, 29892, 1820, 1125, 13, 4706, 364, 29892, 7353, 353, 1583, 29889, 14047, 29889, 657, 29918, 1610, 29898, 1989, 29897, 13, 4706, 565, 364, 338, 6213, 29901, 13, 9651, 1583, 3032, 3198, 29918, 4230, 29918, 2704, 580, 13, 4706, 736, 364, 29892, 7353, 13, 13, 1678, 822, 679, 29918, 9910, 29898, 1311, 29892, 6611, 1125, 13, 4706, 364, 353, 1583, 29889, 14047, 29889, 657, 29918, 9910, 29898, 8149, 29897, 13, 4706, 1583, 3032, 3198, 29918, 4230, 29918, 2704, 580, 13, 4706, 736, 364, 13, 13, 1678, 822, 5217, 29898, 1311, 29892, 1820, 1125, 13, 4706, 736, 6120, 29898, 1311, 29889, 14047, 29889, 8143, 29898, 1989, 876, 13, 13, 1678, 822, 5217, 29918, 9910, 29898, 1311, 29892, 6611, 29892, 736, 29918, 14057, 545, 29922, 8824, 1125, 13, 4706, 736, 1583, 29889, 14047, 29889, 8143, 29918, 9910, 29898, 8149, 29892, 736, 29918, 14057, 545, 29922, 2457, 29918, 14057, 545, 29897, 13, 13, 1678, 822, 4864, 29898, 1311, 29892, 1820, 1125, 13, 4706, 736, 6120, 29898, 1311, 29889, 14047, 29889, 657, 877, 17901, 718, 1820, 876, 13, 13, 1678, 822, 5528, 29878, 29898, 1311, 29892, 1820, 29892, 995, 1125, 13, 4706, 736, 1583, 29889, 14047, 29889, 3742, 29878, 29898, 1989, 29892, 938, 29898, 1767, 876, 13, 13, 13, 1990, 6535, 4032, 29898, 12513, 9044, 1125, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 28915, 1125, 13, 4706, 21271, 9044, 17255, 2344, 12035, 1311, 29892, 28915, 29897, 13, 4706, 1583, 3032, 275, 29918, 1025, 353, 6213, 13, 13, 1678, 822, 22663, 29898, 1311, 1125, 13, 4706, 22663, 353, 1583, 29889, 14047, 29889, 16202, 580, 13, 4706, 736, 22663, 29889, 5975, 580, 29961, 29900, 29962, 565, 22663, 1683, 6213, 13, 13, 1678, 822, 338, 29918, 1025, 29898, 1311, 1125, 13, 4706, 565, 1583, 3032, 275, 29918, 1025, 338, 6213, 29901, 13, 9651, 1147, 353, 1583, 29889, 657, 29918, 2974, 29918, 3259, 580, 13, 9651, 1583, 3032, 275, 29918, 1025, 353, 313, 369, 29889, 17010, 2141, 5451, 17350, 1159, 29961, 29900, 29962, 1275, 376, 29900, 1159, 13, 4706, 736, 1583, 3032, 275, 29918, 1025, 13, 13, 1678, 822, 679, 29918, 22017, 2459, 29918, 7727, 29898, 1311, 29892, 20968, 1125, 13, 4706, 1423, 29918, 21454, 29898, 21454, 29897, 13, 4706, 10650, 353, 1583, 29889, 657, 29475, 22017, 2459, 29918, 29995, 29916, 29908, 1273, 20968, 29897, 13, 4706, 565, 10650, 338, 6213, 29901, 13, 9651, 736, 6213, 13, 4706, 2302, 29892, 298, 2798, 29892, 413, 8568, 29892, 848, 29918, 2311, 353, 10650, 29889, 5451, 580, 13, 4706, 736, 313, 524, 29898, 2798, 511, 938, 29898, 29882, 2798, 511, 938, 29898, 29895, 8568, 29892, 29871, 29896, 29953, 511, 938, 29898, 1272, 29918, 2311, 876, 13, 13, 1678, 822, 679, 29918, 22017, 2459, 29898, 1311, 29892, 20968, 1125, 13, 4706, 1423, 29918, 21454, 29898, 21454, 29897, 13, 4706, 5321, 12112, 353, 2322, 8977, 29898, 8977, 29897, 13, 4706, 13182, 29918, 1272, 353, 1583, 29889, 657, 29475, 22017, 2459, 29918, 497, 29918, 29995, 29916, 29908, 1273, 20968, 29897, 13, 4706, 565, 13182, 29918, 1272, 338, 6213, 29901, 13, 9651, 736, 9657, 580, 13, 4706, 363, 1820, 29892, 12700, 29892, 903, 297, 6088, 29918, 1482, 29918, 29882, 524, 29918, 2587, 29898, 29882, 524, 29918, 1272, 1125, 13, 9651, 413, 8568, 29918, 710, 29892, 17117, 1147, 29892, 325, 8568, 353, 12700, 13, 9651, 5321, 12112, 29961, 29895, 8568, 29918, 710, 3816, 1989, 29962, 353, 313, 29894, 8568, 29892, 1147, 29897, 13, 4706, 736, 9657, 29898, 22017, 12112, 29897, 13, 13, 1678, 822, 679, 29918, 3757, 4339, 29918, 1609, 29918, 29895, 8568, 29918, 1610, 29898, 1311, 29892, 413, 8568, 1125, 13, 4706, 565, 1583, 29889, 275, 29918, 1025, 7295, 13, 9651, 736, 5159, 13, 4706, 565, 451, 338, 8758, 29898, 29895, 8568, 29892, 851, 1125, 13, 9651, 413, 8568, 353, 11860, 29900, 29896, 29953, 29916, 29908, 1273, 413, 8568, 13, 4706, 736, 1583, 29889, 657, 29475, 5507, 718, 413, 8568, 29897, 13, 13, 1678, 822, 679, 29918, 3757, 4339, 29918, 1609, 29918, 29895, 8568, 29898, 1311, 29892, 413, 8568, 29918, 710, 1125, 13, 4706, 10650, 353, 1583, 29889, 657, 29918, 3757, 4339, 29918, 1609, 29918, 29895, 8568, 29918, 1610, 29898, 29895, 8568, 29918, 710, 29897, 13, 4706, 565, 10650, 29901, 13, 9651, 736, 6088, 29918, 3757, 4339, 29898, 1610, 29892, 7700, 29897, 13, 4706, 1683, 29901, 13, 9651, 736, 5159, 13, 13, 1678, 822, 1369, 29918, 27354, 29898, 1311, 29892, 20968, 2433, 742, 1369, 29918, 29888, 333, 29922, 29900, 29892, 1095, 29918, 29888, 333, 29922, 8516, 1125, 13, 4706, 9995, 20968, 1818, 367, 297, 29871, 29900, 470, 29871, 29900, 29900, 1347, 9995, 13, 4706, 565, 20968, 29901, 13, 9651, 4974, 338, 8758, 29898, 21454, 29892, 2362, 342, 5393, 29897, 322, 7431, 29898, 21454, 29897, 5277, 29871, 29906, 13, 4706, 260, 353, 13547, 1212, 1982, 29889, 29911, 295, 1212, 29898, 1311, 29889, 3069, 29892, 1583, 29889, 637, 29897, 13, 4706, 5447, 353, 18803, 29995, 29879, 29915, 1273, 20968, 13, 4706, 565, 1095, 29918, 29888, 333, 338, 6213, 29901, 13, 9651, 330, 29883, 29918, 9006, 353, 525, 27354, 6571, 426, 1012, 29876, 4286, 4830, 29898, 8336, 29892, 1369, 29918, 29888, 333, 29897, 13, 4706, 1683, 29901, 13, 9651, 330, 29883, 29918, 9006, 353, 525, 27354, 6571, 6571, 426, 1012, 29876, 4286, 4830, 29898, 8336, 29892, 1369, 29918, 29888, 333, 29892, 1095, 29918, 29888, 333, 29897, 13, 4706, 260, 29889, 3539, 29898, 27354, 29918, 9006, 29897, 13, 4706, 714, 353, 260, 29889, 949, 29918, 29305, 28909, 29876, 2824, 17010, 28909, 29878, 29905, 29876, 1495, 13, 4706, 4974, 714, 1275, 525, 8949, 29915, 13, 4706, 260, 29889, 3539, 877, 28358, 29905, 29876, 1495, 13, 4706, 260, 29889, 5358, 580, 13, 13, 1678, 822, 1369, 29918, 27354, 29918, 497, 29918, 2423, 9737, 29898, 1311, 29892, 4833, 29918, 19488, 1125, 13, 4706, 15090, 29918, 7501, 1169, 353, 1347, 29889, 7501, 1169, 718, 525, 10736, 1753, 29915, 13, 4706, 1321, 9737, 29918, 1524, 353, 4256, 8504, 29889, 4704, 10456, 29961, 20970, 29918, 7501, 1169, 363, 903, 297, 3464, 29898, 2585, 29918, 19488, 29897, 2314, 13, 4706, 1321, 9737, 353, 6024, 4286, 7122, 29898, 29875, 29897, 363, 474, 297, 1321, 9737, 29918, 1524, 29962, 13, 4706, 1583, 29889, 2962, 29918, 27354, 29918, 2423, 9737, 29898, 2423, 9737, 29897, 13, 13, 1678, 822, 1369, 29918, 27354, 29918, 2423, 9737, 29898, 1311, 29892, 1321, 9737, 1125, 13, 4706, 363, 289, 297, 1321, 9737, 29901, 13, 9651, 1583, 29889, 2962, 29918, 27354, 29898, 21454, 29922, 29890, 29897, 13, 9651, 1550, 5852, 29901, 13, 18884, 4660, 353, 1583, 29889, 657, 29918, 27354, 29918, 4882, 580, 13, 18884, 565, 4660, 29889, 2886, 877, 21094, 1495, 6736, 29871, 29900, 29901, 13, 462, 1678, 6773, 13, 18884, 25342, 4660, 1275, 525, 8698, 2396, 13, 462, 1678, 1596, 376, 21454, 1273, 29879, 330, 29883, 2309, 29908, 1273, 289, 13, 462, 1678, 2867, 13, 18884, 25342, 4660, 1275, 525, 14057, 2396, 13, 462, 1678, 736, 1583, 29889, 14057, 703, 20640, 675, 29918, 6112, 353, 4418, 1159, 13, 18884, 1683, 29901, 13, 462, 1678, 1583, 29889, 14057, 29898, 4882, 29897, 13, 13, 1678, 822, 679, 29918, 27354, 29918, 4882, 29898, 1311, 1125, 13, 4706, 736, 679, 29918, 27354, 29918, 4882, 29898, 1311, 29889, 3069, 29892, 1583, 29889, 637, 29897, 13, 13, 1678, 822, 679, 29918, 3259, 29898, 1311, 29892, 1820, 1125, 13, 4706, 12700, 353, 1583, 29889, 657, 703, 3026, 718, 1820, 29897, 13, 4706, 565, 12700, 29901, 13, 9651, 736, 938, 29898, 7299, 29889, 5451, 580, 29961, 29900, 2314, 13, 13, 1678, 822, 2944, 29918, 2798, 29898, 1311, 1125, 13, 4706, 269, 353, 1583, 29889, 16202, 580, 13, 4706, 565, 269, 338, 6213, 29901, 13, 9651, 736, 6213, 13, 4706, 736, 938, 29898, 29879, 1839, 7827, 29918, 7076, 11287, 13, 13, 1678, 822, 679, 29918, 1989, 29918, 3888, 29918, 6954, 29898, 1311, 29892, 1820, 29892, 413, 8568, 29953, 29946, 29922, 8516, 1125, 13, 4706, 14550, 736, 313, 29894, 8568, 29892, 1147, 29897, 470, 6213, 12008, 13, 4706, 565, 413, 8568, 29953, 29946, 338, 6213, 29901, 13, 9651, 413, 8568, 29953, 29946, 353, 679, 29918, 29895, 8568, 29953, 29946, 29898, 1989, 29897, 13, 4706, 413, 8568, 29941, 29906, 29918, 710, 353, 17962, 29995, 29900, 29947, 29916, 29908, 1273, 313, 29895, 8568, 29953, 29946, 5099, 29871, 29941, 29906, 29897, 13, 4706, 903, 3972, 353, 1583, 29889, 657, 29918, 3972, 29898, 29895, 8568, 29941, 29906, 29918, 710, 29897, 13, 4706, 565, 1583, 29889, 275, 29918, 1025, 7295, 13, 9651, 736, 903, 3972, 29889, 657, 29898, 1989, 29892, 6213, 29897, 13, 4706, 1683, 29901, 13, 9651, 736, 903, 3972, 29889, 657, 11702, 29900, 29896, 29953, 29916, 29908, 1273, 413, 8568, 29953, 29946, 29892, 6213, 29897, 13, 13, 1678, 822, 679, 29918, 29895, 8568, 29918, 3888, 29918, 6954, 29898, 1311, 29892, 413, 8568, 1125, 13, 4706, 14550, 736, 17288, 1989, 29892, 313, 29894, 8568, 29892, 1147, 876, 1402, 1820, 338, 5124, 363, 325, 29906, 29889, 12008, 13, 4706, 413, 8568, 29941, 29906, 353, 17962, 29995, 29900, 29947, 29916, 29908, 1273, 313, 29895, 8568, 5099, 29871, 29941, 29906, 29897, 13, 4706, 903, 3972, 353, 1583, 29889, 657, 29918, 3972, 29898, 29895, 8568, 29941, 29906, 29897, 13, 4706, 3240, 353, 5159, 13, 4706, 565, 1583, 29889, 275, 29918, 1025, 7295, 13, 9651, 363, 413, 29892, 313, 29894, 8568, 29892, 1147, 29897, 297, 903, 3972, 29889, 1524, 7076, 7295, 13, 18884, 565, 679, 29918, 29895, 8568, 29953, 29946, 29898, 29895, 29897, 1275, 413, 8568, 29901, 13, 462, 1678, 3240, 29889, 4397, 3552, 29895, 29892, 313, 29894, 8568, 29892, 1147, 4961, 13, 4706, 1683, 29901, 13, 9651, 363, 413, 29892, 313, 29894, 8568, 29892, 1147, 29897, 297, 903, 3972, 29889, 1524, 7076, 7295, 13, 18884, 565, 938, 29898, 29895, 29892, 29871, 29896, 29953, 29897, 1275, 413, 8568, 29901, 13, 462, 1678, 736, 518, 703, 613, 313, 524, 29898, 29894, 8568, 511, 1147, 28166, 13, 4706, 736, 3240, 13, 13, 1678, 822, 679, 29918, 2974, 29918, 3259, 29898, 1311, 1125, 13, 4706, 1018, 29901, 13, 9651, 380, 353, 1583, 29889, 16202, 580, 13, 9651, 565, 380, 29901, 13, 18884, 736, 380, 3366, 3259, 3108, 13, 4706, 5174, 10663, 2392, 29901, 13, 9651, 12183, 29889, 2704, 703, 14057, 304, 679, 1873, 1273, 29879, 613, 1583, 29897, 13, 4706, 5174, 7670, 2392, 29901, 13, 9651, 12183, 29889, 2704, 703, 14057, 304, 679, 1873, 1273, 29879, 1273, 29879, 613, 1583, 29892, 380, 29897, 13, 13, 1678, 822, 679, 29918, 3972, 29898, 1311, 29892, 2224, 1125, 13, 4706, 14550, 736, 9657, 13, 9651, 1206, 29896, 29901, 2910, 4516, 29898, 29900, 29899, 29888, 29897, 304, 313, 8568, 29892, 2302, 511, 13, 462, 259, 763, 11117, 29900, 29914, 2396, 313, 29896, 29946, 29955, 29896, 29892, 29871, 29906, 29955, 29955, 29947, 29946, 29900, 29900, 29945, 511, 2023, 2981, 13, 9651, 1206, 29906, 29901, 2910, 1820, 29898, 272, 413, 8568, 29897, 304, 313, 29894, 8568, 29892, 1873, 511, 13, 462, 259, 763, 11117, 29941, 29900, 29900, 29900, 29900, 29900, 29900, 29941, 29955, 29955, 29872, 29929, 29883, 29906, 328, 2396, 313, 29906, 29906, 29906, 29896, 29906, 29892, 29871, 29896, 511, 2023, 500, 12008, 13, 4706, 1018, 29901, 13, 9651, 2793, 353, 1583, 29889, 657, 29898, 2084, 29897, 13, 4706, 5174, 10663, 2392, 29901, 13, 9651, 2793, 353, 6629, 13, 4706, 736, 4516, 29918, 517, 29918, 8977, 29898, 3051, 29897, 13, 13, 1678, 822, 1051, 29918, 3972, 29898, 1311, 29892, 270, 1125, 29871, 396, 383, 6415, 2303, 29901, 270, 881, 451, 817, 10944, 732, 29973, 13, 4706, 14550, 1761, 599, 14636, 297, 278, 4516, 29991, 13, 4706, 451, 671, 372, 565, 4516, 338, 2919, 29991, 12008, 13, 4706, 363, 2224, 29892, 313, 29894, 8568, 29892, 1147, 29897, 297, 12705, 29898, 1311, 29889, 657, 29918, 3972, 29898, 29881, 467, 7076, 580, 1125, 13, 9651, 565, 2224, 29889, 1975, 2541, 11219, 1495, 322, 7431, 29898, 2084, 29897, 1275, 29871, 29906, 29901, 13, 18884, 363, 325, 297, 1583, 29889, 1761, 29918, 3972, 29898, 29881, 718, 2224, 7503, 29899, 29896, 29962, 1125, 13, 462, 1678, 7709, 325, 13, 9651, 1683, 29901, 13, 18884, 7709, 2224, 29892, 938, 29898, 29894, 8568, 511, 938, 29898, 369, 29897, 13, 13, 1678, 822, 679, 29918, 21454, 29918, 8149, 29918, 2798, 29898, 1311, 29892, 20968, 29892, 10809, 29922, 29896, 1125, 13, 4706, 736, 679, 29918, 21454, 29918, 8149, 29918, 2798, 29898, 1311, 29892, 20968, 29892, 10809, 29897, 13, 13, 1678, 822, 679, 29918, 1989, 29918, 3888, 29918, 20960, 29898, 1311, 29892, 1820, 1125, 13, 4706, 14550, 2457, 1147, 29892, 325, 8568, 29892, 7353, 29892, 325, 3616, 29892, 18696, 29892, 25947, 29892, 926, 12008, 13, 4706, 736, 679, 29918, 1989, 29918, 3888, 29918, 20960, 29898, 1311, 29892, 1820, 29897, 13, 13, 1678, 822, 19012, 29898, 1311, 29892, 848, 1125, 13, 4706, 736, 4303, 14047, 29889, 12508, 29918, 1767, 29898, 1272, 29892, 1583, 29889, 14047, 29889, 2388, 29918, 386, 12268, 29897, 13, 13, 1678, 822, 3802, 29898, 1311, 1125, 13, 4706, 1209, 13, 13, 13, 1753, 1243, 29918, 1482, 29898, 10030, 29892, 20968, 1125, 13, 1678, 289, 353, 20968, 13, 1678, 274, 353, 6535, 4032, 29898, 10030, 29897, 13, 1678, 1596, 376, 16202, 29901, 613, 274, 29889, 16202, 580, 13, 1678, 1596, 525, 3259, 29901, 742, 274, 29889, 657, 29918, 2974, 29918, 3259, 580, 13, 1678, 1596, 376, 275, 1025, 29901, 613, 274, 29889, 275, 29918, 1025, 580, 13, 1678, 1596, 376, 3972, 3876, 29901, 613, 274, 29889, 657, 29918, 3972, 29475, 1159, 13, 1678, 1596, 376, 21454, 1820, 2302, 29901, 613, 274, 29889, 657, 29918, 21454, 29918, 8149, 29918, 2798, 29898, 524, 29898, 29890, 876, 13, 1678, 1596, 376, 667, 29918, 2798, 29901, 613, 274, 29889, 667, 29918, 2798, 580, 13, 1678, 1596, 376, 16072, 29918, 2423, 9737, 613, 679, 29918, 16072, 29918, 2423, 9737, 29898, 29883, 29897, 13, 13, 1678, 20447, 353, 274, 29889, 657, 29918, 3972, 703, 5507, 718, 289, 718, 376, 29900, 29900, 29900, 29900, 29900, 29900, 1159, 13, 1678, 1596, 376, 29874, 4516, 20447, 29901, 613, 20447, 13, 1678, 413, 8568, 29918, 710, 353, 1051, 29898, 29500, 9601, 29900, 29962, 13, 1678, 1596, 376, 29874, 413, 8568, 29918, 710, 613, 413, 8568, 29918, 710, 13, 1678, 364, 353, 274, 29889, 657, 29918, 3757, 4339, 29918, 1609, 29918, 29895, 8568, 29898, 29895, 8568, 29918, 710, 9601, 29900, 29962, 13, 1678, 413, 353, 364, 29961, 29900, 29962, 13, 1678, 1596, 376, 1989, 29892, 7431, 29898, 1767, 511, 313, 15581, 29892, 260, 303, 1160, 29892, 1147, 1125, 613, 413, 29892, 364, 29961, 29896, 1402, 364, 29961, 29941, 17531, 13, 1678, 1596, 376, 1989, 5235, 2626, 29901, 613, 274, 29889, 657, 29918, 1989, 29918, 3888, 29918, 6954, 29898, 29895, 29897, 13, 1678, 1596, 376, 1989, 5235, 8086, 29898, 369, 29892, 325, 8568, 29892, 7353, 29892, 325, 3616, 29892, 18696, 29892, 25947, 29892, 926, 1125, 613, 320, 13, 3986, 274, 29889, 657, 29918, 1989, 29918, 3888, 29918, 20960, 29898, 29895, 29897, 13, 1678, 1596, 376, 1989, 1873, 29901, 613, 274, 29889, 657, 29918, 3259, 29898, 29895, 29897, 13, 1678, 1596, 376, 22017, 2459, 29918, 7727, 613, 274, 29889, 657, 29918, 22017, 2459, 29918, 7727, 29898, 524, 29898, 29890, 876, 13, 1678, 1596, 376, 27354, 4660, 29901, 613, 274, 29889, 657, 29918, 27354, 29918, 4882, 580, 13, 13, 361, 4770, 978, 1649, 1275, 525, 1649, 3396, 1649, 2396, 13, 1678, 1243, 29918, 1482, 703, 1883, 29874, 29941, 29874, 29901, 29955, 29929, 29900, 29900, 613, 525, 29941, 1495, 13, 2 ]
get_pos.py
zhuchong79/cok
0
169136
import cv2 import aircv as ac import os from cok_tool import click,snap,back # print circle_center_pos def draw_circle(img, pos, circle_radius, color, line_width): cv2.circle(img, pos, circle_radius, color, line_width) cv2.imshow('objDetect', imsrc) cv2.waitKey(0) cv2.destroyAllWindows() def hero(pic='',devices=''): if pic == '': src_pic=snap(device,0) else : src_pic=pic imsrc = ac.imread(src_pic) imobj = ac.imread('base.jpg') # find the match position pos = ac.find_template(imsrc, imobj) print pos['result'] click(pos['result'][0],pos['result'][1],0,devices) click(530,1550,0,devices) #start fight click(865,1810,8,devices) #fighting back(devices) #os.system("del %s"%src_pic) def getbox(pic='',device=''): if pic == '': src_pic=snap(device,0) else : src_pic=pic imsrc = ac.imread(src_pic) imobj = ac.imread('box.jpg') # find the match position pos = ac.find_template(imsrc, imobj) print pos['result'] click(pos['result'][0],pos['result'][1],2,device) click(530,1515,2,device) if __name__ == "__main__": mi6='1f33ee18' #getbox("127.0.0.1:62028") pic=snap("127.0.0.1:62028",0) hero(pic,"127.0.0.1:62028") getbox(pic,"127.0.0.1:62028") exit(0) for i in xrange(3): hero("127.0.0.1:62028") #exit(0) # circle_center_pos = pos['result'] # circle_radius = 50 # color = (0, 255, 0) # line_width = 10 # draw circle # draw_circle(imsrc, circle_center_pos, circle_radius, color, line_width)
[ 1, 1053, 13850, 29906, 13, 5215, 263, 2076, 29894, 408, 1274, 13, 5215, 2897, 13, 3166, 274, 554, 29918, 10154, 1053, 2828, 29892, 29879, 8971, 29892, 1627, 13, 29937, 1596, 8607, 29918, 5064, 29918, 1066, 13, 1753, 4216, 29918, 16622, 29898, 2492, 29892, 926, 29892, 8607, 29918, 13471, 29892, 2927, 29892, 1196, 29918, 2103, 1125, 13, 1678, 13850, 29906, 29889, 16622, 29898, 2492, 29892, 926, 29892, 8607, 29918, 13471, 29892, 2927, 29892, 1196, 29918, 2103, 29897, 13, 1678, 13850, 29906, 29889, 326, 4294, 877, 5415, 6362, 522, 742, 527, 4351, 29897, 29871, 13, 1678, 13850, 29906, 29889, 10685, 2558, 29898, 29900, 29897, 13, 1678, 13850, 29906, 29889, 20524, 3596, 7685, 580, 13, 13, 1753, 13444, 29898, 16447, 2433, 742, 3359, 1575, 2433, 29374, 13, 1678, 565, 11942, 1275, 525, 2396, 13, 4706, 4765, 29918, 16447, 29922, 29879, 8971, 29898, 10141, 29892, 29900, 29897, 13, 1678, 1683, 584, 13, 4706, 4765, 29918, 16447, 29922, 16447, 13, 1678, 527, 4351, 353, 1274, 29889, 326, 949, 29898, 4351, 29918, 16447, 29897, 13, 1678, 527, 5415, 353, 1274, 29889, 326, 949, 877, 3188, 29889, 6173, 1495, 13, 13, 1678, 396, 1284, 278, 1993, 2602, 13, 268, 13, 1678, 926, 353, 1274, 29889, 2886, 29918, 6886, 29898, 326, 4351, 29892, 527, 5415, 29897, 13, 1678, 1596, 926, 1839, 2914, 2033, 13, 1678, 2828, 29898, 1066, 1839, 2914, 2033, 29961, 29900, 1402, 1066, 1839, 2914, 2033, 29961, 29896, 1402, 29900, 29892, 3359, 1575, 29897, 13, 1678, 2828, 29898, 29945, 29941, 29900, 29892, 29896, 29945, 29945, 29900, 29892, 29900, 29892, 3359, 1575, 29897, 396, 2962, 8589, 13, 1678, 2828, 29898, 29947, 29953, 29945, 29892, 29896, 29947, 29896, 29900, 29892, 29947, 29892, 3359, 1575, 29897, 29871, 396, 29888, 523, 292, 13, 1678, 1250, 29898, 3359, 1575, 29897, 13, 1678, 396, 359, 29889, 5205, 703, 6144, 1273, 29879, 29908, 29995, 4351, 29918, 16447, 29897, 13, 1753, 679, 1884, 29898, 16447, 2433, 742, 10141, 2433, 29374, 13, 1678, 565, 11942, 1275, 525, 2396, 13, 4706, 4765, 29918, 16447, 29922, 29879, 8971, 29898, 10141, 29892, 29900, 29897, 13, 1678, 1683, 584, 13, 4706, 4765, 29918, 16447, 29922, 16447, 13, 1678, 527, 4351, 353, 1274, 29889, 326, 949, 29898, 4351, 29918, 16447, 29897, 13, 1678, 527, 5415, 353, 1274, 29889, 326, 949, 877, 1884, 29889, 6173, 1495, 13, 13, 1678, 396, 1284, 278, 1993, 2602, 13, 268, 13, 1678, 926, 353, 1274, 29889, 2886, 29918, 6886, 29898, 326, 4351, 29892, 527, 5415, 29897, 13, 1678, 1596, 926, 1839, 2914, 2033, 13, 1678, 2828, 29898, 1066, 1839, 2914, 2033, 29961, 29900, 1402, 1066, 1839, 2914, 2033, 29961, 29896, 1402, 29906, 29892, 10141, 29897, 13, 1678, 2828, 29898, 29945, 29941, 29900, 29892, 29896, 29945, 29896, 29945, 29892, 29906, 29892, 10141, 29897, 13, 361, 4770, 978, 1649, 1275, 376, 1649, 3396, 1649, 1115, 13, 1678, 3737, 29953, 2433, 29896, 29888, 29941, 29941, 3905, 29896, 29947, 29915, 13, 13, 1678, 396, 657, 1884, 703, 29896, 29906, 29955, 29889, 29900, 29889, 29900, 29889, 29896, 29901, 29953, 29906, 29900, 29906, 29947, 1159, 13, 1678, 11942, 29922, 29879, 8971, 703, 29896, 29906, 29955, 29889, 29900, 29889, 29900, 29889, 29896, 29901, 29953, 29906, 29900, 29906, 29947, 613, 29900, 29897, 13, 1678, 13444, 29898, 16447, 1699, 29896, 29906, 29955, 29889, 29900, 29889, 29900, 29889, 29896, 29901, 29953, 29906, 29900, 29906, 29947, 1159, 13, 1678, 679, 1884, 29898, 16447, 1699, 29896, 29906, 29955, 29889, 29900, 29889, 29900, 29889, 29896, 29901, 29953, 29906, 29900, 29906, 29947, 1159, 13, 13, 1678, 6876, 29898, 29900, 29897, 13, 1678, 363, 474, 297, 921, 3881, 29898, 29941, 1125, 13, 4706, 13444, 703, 29896, 29906, 29955, 29889, 29900, 29889, 29900, 29889, 29896, 29901, 29953, 29906, 29900, 29906, 29947, 1159, 13, 1678, 396, 13322, 29898, 29900, 29897, 13, 1678, 396, 8607, 29918, 5064, 29918, 1066, 353, 926, 1839, 2914, 2033, 13, 1678, 396, 8607, 29918, 13471, 353, 29871, 29945, 29900, 13, 1678, 396, 2927, 353, 313, 29900, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29900, 29897, 13, 1678, 396, 1196, 29918, 2103, 353, 29871, 29896, 29900, 13, 13, 1678, 396, 4216, 8607, 13, 1678, 396, 4216, 29918, 16622, 29898, 326, 4351, 29892, 8607, 29918, 5064, 29918, 1066, 29892, 8607, 29918, 13471, 29892, 2927, 29892, 1196, 29918, 2103, 29897, 2 ]
judge/submission/migrations/0001_initial.py
22shubh22/online-judge
0
159627
# Generated by Django 3.1.1 on 2021-12-26 10:44 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('question', '0005_auto_20211226_1036'), ] operations = [ migrations.CreateModel( name='Submission', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('code_file', models.FilePathField(path='code')), ('created_at', models.DateTimeField(auto_now_add=True, null=True)), ('status', models.CharField(choices=[('TLE', 'TLE'), ('WA', 'WA'), ('AC', 'AC'), ('procesing', 'processing'), ('queue', 'queue')], max_length=20)), ('question', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='submission', to='question.question')), ], options={ 'verbose_name': 'Submission', 'verbose_name_plural': 'Submissions', }, ), migrations.CreateModel( name='SubmissionTest', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('output_file', models.FilePathField(path='submission_test', unique=True)), ('submission', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='submission_test', to='submission.submission')), ('test', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='submission_test', to='question.test')), ], options={ 'verbose_name': 'Submission Test', 'verbose_name_plural': 'Submission Tests', }, ), ]
[ 1, 396, 3251, 630, 491, 15337, 29871, 29941, 29889, 29896, 29889, 29896, 373, 29871, 29906, 29900, 29906, 29896, 29899, 29896, 29906, 29899, 29906, 29953, 29871, 29896, 29900, 29901, 29946, 29946, 13, 13, 3166, 9557, 29889, 2585, 1053, 9725, 800, 29892, 4733, 13, 5215, 9557, 29889, 2585, 29889, 9794, 29889, 311, 1026, 291, 13, 13, 13, 1990, 341, 16783, 29898, 26983, 800, 29889, 29924, 16783, 1125, 13, 13, 1678, 2847, 353, 5852, 13, 13, 1678, 9962, 353, 518, 13, 4706, 6702, 12470, 742, 525, 29900, 29900, 29900, 29945, 29918, 6921, 29918, 29906, 29900, 29906, 29896, 29896, 29906, 29906, 29953, 29918, 29896, 29900, 29941, 29953, 5477, 13, 1678, 4514, 13, 13, 1678, 6931, 353, 518, 13, 4706, 9725, 800, 29889, 4391, 3195, 29898, 13, 9651, 1024, 2433, 4035, 6737, 742, 13, 9651, 4235, 11759, 13, 18884, 6702, 333, 742, 4733, 29889, 12300, 3073, 29898, 6921, 29918, 11600, 29922, 5574, 29892, 7601, 29918, 1989, 29922, 5574, 29892, 28755, 29922, 8824, 29892, 26952, 29918, 978, 2433, 1367, 1495, 511, 13, 18884, 6702, 401, 29918, 1445, 742, 4733, 29889, 2283, 2605, 3073, 29898, 2084, 2433, 401, 1495, 511, 13, 18884, 6702, 11600, 29918, 271, 742, 4733, 29889, 11384, 3073, 29898, 6921, 29918, 3707, 29918, 1202, 29922, 5574, 29892, 1870, 29922, 5574, 8243, 13, 18884, 6702, 4882, 742, 4733, 29889, 27890, 29898, 1859, 1575, 11759, 877, 29911, 1307, 742, 525, 29911, 1307, 5477, 6702, 12982, 742, 525, 12982, 5477, 6702, 2477, 742, 525, 2477, 5477, 6702, 771, 778, 292, 742, 525, 19170, 5477, 6702, 9990, 742, 525, 9990, 1495, 1402, 4236, 29918, 2848, 29922, 29906, 29900, 8243, 13, 18884, 6702, 12470, 742, 4733, 29889, 27755, 2558, 29898, 265, 29918, 8143, 29922, 14095, 29889, 2585, 29889, 9794, 29889, 311, 1026, 291, 29889, 29907, 3289, 5454, 2287, 29892, 4475, 29918, 978, 2433, 1491, 6737, 742, 304, 2433, 12470, 29889, 12470, 1495, 511, 13, 9651, 21251, 13, 9651, 3987, 3790, 13, 18884, 525, 369, 15828, 29918, 978, 2396, 525, 4035, 6737, 742, 13, 18884, 525, 369, 15828, 29918, 978, 29918, 572, 3631, 2396, 525, 4035, 29885, 6847, 742, 13, 9651, 2981, 13, 4706, 10353, 13, 4706, 9725, 800, 29889, 4391, 3195, 29898, 13, 9651, 1024, 2433, 4035, 6737, 3057, 742, 13, 9651, 4235, 11759, 13, 18884, 6702, 333, 742, 4733, 29889, 12300, 3073, 29898, 6921, 29918, 11600, 29922, 5574, 29892, 7601, 29918, 1989, 29922, 5574, 29892, 28755, 29922, 8824, 29892, 26952, 29918, 978, 2433, 1367, 1495, 511, 13, 18884, 6702, 4905, 29918, 1445, 742, 4733, 29889, 2283, 2605, 3073, 29898, 2084, 2433, 1491, 6737, 29918, 1688, 742, 5412, 29922, 5574, 8243, 13, 18884, 6702, 1491, 6737, 742, 4733, 29889, 27755, 2558, 29898, 265, 29918, 8143, 29922, 14095, 29889, 2585, 29889, 9794, 29889, 311, 1026, 291, 29889, 29907, 3289, 5454, 2287, 29892, 4475, 29918, 978, 2433, 1491, 6737, 29918, 1688, 742, 304, 2433, 1491, 6737, 29889, 1491, 6737, 1495, 511, 13, 18884, 6702, 1688, 742, 4733, 29889, 27755, 2558, 29898, 265, 29918, 8143, 29922, 14095, 29889, 2585, 29889, 9794, 29889, 311, 1026, 291, 29889, 29907, 3289, 5454, 2287, 29892, 4475, 29918, 978, 2433, 1491, 6737, 29918, 1688, 742, 304, 2433, 12470, 29889, 1688, 1495, 511, 13, 9651, 21251, 13, 9651, 3987, 3790, 13, 18884, 525, 369, 15828, 29918, 978, 2396, 525, 4035, 6737, 4321, 742, 13, 18884, 525, 369, 15828, 29918, 978, 29918, 572, 3631, 2396, 525, 4035, 6737, 4321, 29879, 742, 13, 9651, 2981, 13, 4706, 10353, 13, 1678, 4514, 13, 2 ]
bioplotlib/collections.py
darcyabjones/bioplotlib
0
53782
<reponame>darcyabjones/bioplotlib """ Extension of matplotlib collections. Classes for the efficient drawing of large collections of objects that share most properties, e.g., a large number of line segments or polygons. The classes are not meant to be as flexible as their single element counterparts (e.g., you may not be able to select all line styles) but they are meant to be fast for common use cases (e.g., a large set of solid line segemnts) """ ############################ Import all modules ############################## from __future__ import (absolute_import, division, print_function, unicode_literals) from copy import copy from collections import defaultdict import numpy as np import matplotlib.transforms as transforms from matplotlib.path import Path from matplotlib.patches import PathPatch from matplotlib.patches import Patch from matplotlib.collections import Collection import bioplotlib.feature_shapes from bioplotlib.feature_shapes import Triangle from bioplotlib.feature_shapes import OpenTriangle __contributors = [ "<NAME> <<EMAIL>>" ] def new_shape(c, **kwargs): """ . """ def callable(*a, **k): kwargs.update(k) return c(*a, **kwargs) return callable ################################## Classes ################################### class Feature(Collection): """ Groups shapes into features so that they stay together in stacked tracks. """ def __init__( self, blocks, shape=new_shape(Triangle), between_shape=None, strand=None, offset=0, by_axis=None, name=None, **kwargs ): if type(shape) in (tuple, list): self._shape = shape else: self._shape = [shape] if type(between_shape) in (tuple, list, type(None)): self._between_shape = between_shape else: self._between_shape = [between_shape] self._blocks = blocks self._strand = strand self._offset = offset self._by_axis = by_axis self._name = name self._paths = None self._patches = None Collection.__init__(self, **kwargs) self._draw_patches() return @property def blocks(self): return self._blocks @blocks.setter def blocks(self, blocks): self._blocks = blocks @property def strand(self): return self._strand @strand.setter def strand(self, strand): self._strand = strand for patch in self.patches: if patch.strand is not None: patch.strand = strand @property def offset(self): return self._offset @offset.setter def offset(self, offset): self._offset = offset if offset != 0: for patch in self.patches: patch.offset += offset @property def by_axis(self): return self._by_axis @by_axis.setter def by_axis(self, by_axis): self._by_axis = by_axis if by_axis is not None: for patch in self.patches: if patch.by_axis is not None: patch.by_axis = by_axis @property def shape(self): return self._shape @shape.setter def shape(self, shape): self._shape = shape self._draw_patches() @property def between_shape(self): return self._between_shape @between_shape.setter def between_shape(self, shape): self._between_shape = shape self._draw_patches() @property def patches(self): return self._patches @patches.setter def patches(self, patches): self._patches = patches self._set_paths() self._set_props() return @property def paths(self): return self._paths @paths.setter def paths(self, paths): self._paths = paths return def get_paths(self): """ alias for paths property """ return self.paths def set_paths(self, paths): """ alias for paths.setter """ self.paths = paths return def _set_paths(self): self.paths = [ p.get_transform().transform_path(p.get_path()) for p in self.patches ] return def _set_props(self): def determine_facecolor(patch): if patch.get_fill(): return patch.get_facecolor() return [0, 0, 0, 0] props = defaultdict(list) valid = { "facecolors": (self.set_facecolor, determine_facecolor), "edgecolors": (self.set_edgecolor, Patch.get_edgecolor), "linewidths": (self.set_linewidth, Patch.get_linewidth), "linestyles": (self.set_linestyle, Patch.get_linestyle), "antialiaseds": (self.set_antialiased, Patch.get_antialiased), } for p in self.patches: for key, (set_, get) in valid.items(): props[key].append(get(p)) for key, (set_, get) in valid.items(): set_(props[key]) return def _draw_patches(self): start = 0 end = None patches = list() length_blocks = len(self.blocks) # Draw the between shapes first between_shape_pos = 0 between_blocks = [] if self.between_shape is not None: between_blocks = list(zip( range(0, length_blocks - 1), range(1, length_blocks) )) length_between_blocks = len(between_blocks) # Note that if between shape is none there is nothing to iterate over. for h, (i, j) in enumerate(between_blocks): first = self.blocks[i] second = self.blocks[j] min_dist = min([(0, 0), (0, 1), (1, 0), (1, 1)], key=lambda t: abs(second[t[0]] - first[t[1]]) ) start = first[min_dist[1]] end = second[min_dist[0]] strand_first = None strand_second = None try: strand_first = first[2] strand_second = second[2] except: pass if strand_first == strand_second: strand = strand_first else: strand = None if len(self.between_shape) > 1 and h + 1 == length_between_blocks: between_shape_pos = -1 patches.append(self.between_shape[between_shape_pos]( start=start, end=end, strand=None )) if len(self.between_shape) > 2: between_shape_pos = 1 # Now do the blocks shape_pos = 0 for i, block in enumerate(self.blocks): if len(self.shape) > 1 and i + 1 == length_blocks: shape_pos = -1 start = block[0] end = block[1] strand = None try: strand = block[2] except: pass patches.append(self.shape[shape_pos]( start=start, end=end, strand=strand )) if len(self.shape) > 2: shape_pos = 1 if self.offset != 0: for patch in patches: patch.offset += self.offset self._patches = patches self._set_paths() self._set_props() return class FeatureGroup(Collection): """ Generic collection for genomic tracks. Methods ------- stack Determines how to stack features in a track """ def __init__( self, features, width=1, offset=0, stack=None, by_axis=None, name=None, **kwargs ): """ . """ self._features = features self._width = width self._stack = stack self._by_axis = by_axis self._offset = offset self.name = name self._patches = None self._paths = None Collection.__init__(self, **kwargs) self._draw_patches() return @property def features(self): return self._features @features.setter def features(self, features): """ . """ self._features = features self._draw_patches() return @property def offset(self): return self._offset @offset.setter def offset(self, offset): self._offset = offset self._draw_patches() return @property def by_axis(self): return self._by_axis @by_axis.setter def by_axis(self, by_axis): self._by_axis = by_axis if by_axis is not None: for patch in self.patches: if patch.by_axis is not None: patch.by_axis = by_axis return @property def paths(self): return self._paths @paths.setter def paths(self, paths): self._paths = paths return def get_paths(self): """ alias for paths property """ return self.paths def set_paths(self, paths): """ alias for paths.setter """ self.paths = paths return def _set_paths(self): self.paths = [ p.get_transform().transform_path(p.get_path()) for p in self._patches ] return def _set_props(self): def determine_facecolor(patch): if patch.get_fill(): return patch.get_facecolor() return [0, 0, 0, 0] props = defaultdict(list) valid = { "facecolors": (self.set_facecolor, determine_facecolor), "edgecolors": (self.set_edgecolor, Patch.get_edgecolor), "linewidths": (self.set_linewidth, Patch.get_linewidth), "linestyles": (self.set_linestyle, Patch.get_linestyle), "antialiaseds": (self.set_antialiased, Patch.get_antialiased), } for p in self._patches: for key, (set_, get) in valid.items(): props[key].append(get(p)) for key, (set_, get) in valid.items(): set_(props[key]) return def _draw_patches(self): """ . """ patches = list() for feature in self.features: if self._offset != 0: feature.offset = self._offset if isinstance(feature, Patch): patches.append(feature) elif isinstance(feature, Feature): patches.extend(feature.patches) elif isinstance(feature, FeatureGroup): patches.extend(feature.patches) else: pass self._patches = patches return class LinkCollection(object): """ . """ def __init__( self, obj, links=list(), add_to_fig=False, by=None ): """ . """ self.links = list() self.links.extend(links) self.obj = obj self.add_to_fig = add_to_fig self.by = by lobj = obj() self.figure = lobj.figure return def add(self, blocks, by=None, **kwargs): """ Keyword arguments: blocks -- a 2, 3, or 4 dimensional array 2 dimensions: [[ax1_x1, ax1_x2], [ax2_x1, ax1_x2]] # single record 3 dimensions: [ [[ax1_x1, ax1_x2], [ax2_x1, ax2_x2]], [[ax1_x1, ax1_x2], [ax2_x1, ax2_x2]], ... ] 4 dimensions: [ [ [[ax1_x1, ax1_x2], [ax1_y1, ax1_y2]], [[ax2_x1, ax2_x2], [ax2_y1, ax2_y2]], ], [ [[ax1_x1, ax1_x2], [ax1_y1, ax1_y2]], [[ax2_x1, ax2_x2], [ax2_y1, ax2_y2]], ], ... ] """ by = self.by if by is None else by obj = self.obj if len(blocks) == 0: return list() blocks = np.array(blocks) if len(blocks.shape) == 2: if by == 'x' or self.by is None: pblocks = np.array([ [[ax_xrange, None] for ax_xrange in blocks] ]) elif by == 'y': pblocks = np.array([ [[None, ax_yrange] for ax_yrange in blocks] ]) elif len(blocks.shape) == 3: if by == 'x' or self.by is None: pblocks = np.array([ [[ax1_xrange, None], [ax2_xrange, None]] for ax1_xrange, ax2_xrange in blocks ]) elif by == 'y': pblocks = np.array([ [[None, ax1_yrange], [None, ax2_yrange]] for ax1_yrange, ax2_yrange in blocks ]) else: pblocks = blocks new_links = list() for block in pblocks: ((ax1_xrange, ax1_yrange), (ax2_xrange, ax2_yrange)) = block params = dict() #copy(kwargs) params['by'] = by params['ax1_xrange'] = ax1_xrange params['ax1_yrange'] = ax1_yrange params['ax2_xrange'] = ax2_xrange params['ax2_yrange'] = ax2_yrange params = {k:v for k, v in params.items() if v is not None} lobj = obj() lobj.__dict__.update(params) lobj.properties.update(kwargs) self.links.append(lobj) new_links.append(lobj) return new_links def __call__(self): return self.draw() def draw(self): """ . """ patches = list() for link in self.links: if not link.in_limits(): continue path = link.draw() link_patch = PathPatch( path, transform=self.figure.transFigure, **link.properties ) rax = link.ax1 qax = link.ax2 patches.append(link_patch) if self.add_to_fig: self.figure.patches.extend(patches) return patches ################################# Functions ##################################
[ 1, 529, 276, 1112, 420, 29958, 16702, 1270, 370, 29926, 2873, 29914, 5365, 459, 8276, 1982, 13, 15945, 29908, 7338, 2673, 310, 22889, 16250, 29889, 13, 13, 27403, 363, 278, 8543, 11580, 310, 2919, 16250, 310, 3618, 393, 13, 13653, 1556, 4426, 29892, 321, 29889, 29887, 1696, 263, 2919, 1353, 310, 1196, 24611, 470, 13, 3733, 4790, 787, 29889, 13, 13, 1576, 4413, 526, 451, 6839, 304, 367, 408, 25706, 408, 1009, 2323, 1543, 13, 11808, 20895, 313, 29872, 29889, 29887, 1696, 366, 1122, 451, 367, 2221, 304, 1831, 599, 1196, 11949, 29897, 541, 13, 19562, 526, 6839, 304, 367, 5172, 363, 3619, 671, 4251, 313, 29872, 29889, 29887, 1696, 263, 2919, 731, 310, 7773, 13, 1220, 2377, 331, 593, 29879, 29897, 13, 15945, 29908, 13, 13, 13383, 7346, 4136, 16032, 599, 10585, 835, 13383, 7346, 2277, 29937, 13, 13, 3166, 4770, 29888, 9130, 1649, 1053, 313, 23552, 29918, 5215, 29892, 8542, 29892, 1596, 29918, 2220, 29892, 13, 462, 4706, 29104, 29918, 20889, 1338, 29897, 13, 13, 3166, 3509, 1053, 3509, 13, 3166, 16250, 1053, 2322, 8977, 13, 13, 5215, 12655, 408, 7442, 13, 5215, 22889, 29889, 9067, 29879, 408, 4327, 29879, 13, 3166, 22889, 29889, 2084, 1053, 10802, 13, 3166, 22889, 29889, 5041, 267, 1053, 10802, 29925, 905, 13, 3166, 22889, 29889, 5041, 267, 1053, 349, 905, 13, 13, 3166, 22889, 29889, 29027, 1053, 14348, 13, 13, 5215, 4768, 459, 8276, 1982, 29889, 14394, 29918, 845, 11603, 13, 3166, 4768, 459, 8276, 1982, 29889, 14394, 29918, 845, 11603, 1053, 8602, 2521, 13, 3166, 4768, 459, 8276, 1982, 29889, 14394, 29918, 845, 11603, 1053, 4673, 29565, 2521, 13, 13, 13, 1649, 21570, 29560, 353, 518, 13, 1678, 9872, 5813, 29958, 3532, 26862, 6227, 6778, 29908, 13, 1678, 4514, 13, 13, 1753, 716, 29918, 12181, 29898, 29883, 29892, 3579, 19290, 1125, 13, 268, 9995, 869, 9995, 13, 268, 822, 1246, 519, 10456, 29874, 29892, 3579, 29895, 1125, 13, 308, 9049, 5085, 29889, 5504, 29898, 29895, 29897, 13, 308, 736, 274, 10456, 29874, 29892, 3579, 19290, 29897, 13, 268, 736, 1246, 519, 13, 13, 13383, 13383, 2277, 4134, 267, 835, 13383, 13383, 13, 13, 1990, 5169, 1535, 29898, 7196, 1125, 13, 13, 1678, 9995, 1632, 4410, 25834, 964, 5680, 577, 393, 896, 7952, 4208, 13, 1678, 297, 5096, 287, 16257, 29889, 9995, 13, 13, 1678, 822, 4770, 2344, 12035, 13, 9651, 1583, 29892, 13, 9651, 10930, 29892, 13, 9651, 8267, 29922, 1482, 29918, 12181, 29898, 29565, 2521, 511, 13, 9651, 1546, 29918, 12181, 29922, 8516, 29892, 13, 9651, 851, 392, 29922, 8516, 29892, 13, 9651, 9210, 29922, 29900, 29892, 13, 9651, 491, 29918, 8990, 29922, 8516, 29892, 13, 9651, 1024, 29922, 8516, 29892, 13, 9651, 3579, 19290, 13, 632, 1125, 13, 4706, 565, 1134, 29898, 12181, 29897, 297, 313, 23583, 29892, 1051, 1125, 13, 9651, 1583, 3032, 12181, 353, 8267, 13, 4706, 1683, 29901, 13, 9651, 1583, 3032, 12181, 353, 518, 12181, 29962, 13, 13, 4706, 565, 1134, 29898, 14811, 29918, 12181, 29897, 297, 313, 23583, 29892, 1051, 29892, 1134, 29898, 8516, 22164, 13, 9651, 1583, 3032, 14811, 29918, 12181, 353, 1546, 29918, 12181, 13, 4706, 1683, 29901, 13, 9651, 1583, 3032, 14811, 29918, 12181, 353, 518, 14811, 29918, 12181, 29962, 13, 13, 4706, 1583, 3032, 1271, 29879, 353, 10930, 13, 4706, 1583, 3032, 710, 392, 353, 851, 392, 13, 4706, 1583, 3032, 10289, 353, 9210, 13, 4706, 1583, 3032, 1609, 29918, 8990, 353, 491, 29918, 8990, 13, 4706, 1583, 3032, 978, 353, 1024, 13, 13, 4706, 1583, 3032, 24772, 353, 6213, 13, 4706, 1583, 3032, 5041, 267, 353, 6213, 13, 13, 4706, 14348, 17255, 2344, 12035, 1311, 29892, 3579, 19290, 29897, 13, 4706, 1583, 3032, 4012, 29918, 5041, 267, 580, 13, 4706, 736, 13, 13, 1678, 732, 6799, 13, 1678, 822, 10930, 29898, 1311, 1125, 13, 4706, 736, 1583, 3032, 1271, 29879, 13, 13, 1678, 732, 1271, 29879, 29889, 842, 357, 13, 1678, 822, 10930, 29898, 1311, 29892, 10930, 1125, 13, 4706, 1583, 3032, 1271, 29879, 353, 10930, 13, 13, 1678, 732, 6799, 13, 1678, 822, 851, 392, 29898, 1311, 1125, 13, 4706, 736, 1583, 3032, 710, 392, 13, 13, 1678, 732, 710, 392, 29889, 842, 357, 13, 1678, 822, 851, 392, 29898, 1311, 29892, 851, 392, 1125, 13, 4706, 1583, 3032, 710, 392, 353, 851, 392, 13, 4706, 363, 13261, 297, 1583, 29889, 5041, 267, 29901, 13, 9651, 565, 13261, 29889, 710, 392, 338, 451, 6213, 29901, 13, 18884, 13261, 29889, 710, 392, 353, 851, 392, 13, 13, 1678, 732, 6799, 13, 1678, 822, 9210, 29898, 1311, 1125, 13, 4706, 736, 1583, 3032, 10289, 13, 13, 1678, 732, 10289, 29889, 842, 357, 13, 1678, 822, 9210, 29898, 1311, 29892, 9210, 1125, 13, 4706, 1583, 3032, 10289, 353, 9210, 13, 4706, 565, 9210, 2804, 29871, 29900, 29901, 13, 9651, 363, 13261, 297, 1583, 29889, 5041, 267, 29901, 13, 18884, 13261, 29889, 10289, 4619, 9210, 13, 13, 1678, 732, 6799, 13, 1678, 822, 491, 29918, 8990, 29898, 1311, 1125, 13, 4706, 736, 1583, 3032, 1609, 29918, 8990, 13, 13, 1678, 732, 1609, 29918, 8990, 29889, 842, 357, 13, 1678, 822, 491, 29918, 8990, 29898, 1311, 29892, 491, 29918, 8990, 1125, 13, 4706, 1583, 3032, 1609, 29918, 8990, 353, 491, 29918, 8990, 13, 4706, 565, 491, 29918, 8990, 338, 451, 6213, 29901, 13, 9651, 363, 13261, 297, 1583, 29889, 5041, 267, 29901, 13, 18884, 565, 13261, 29889, 1609, 29918, 8990, 338, 451, 6213, 29901, 13, 462, 1678, 13261, 29889, 1609, 29918, 8990, 353, 491, 29918, 8990, 13, 13, 1678, 732, 6799, 13, 1678, 822, 8267, 29898, 1311, 1125, 13, 4706, 736, 1583, 3032, 12181, 13, 13, 1678, 732, 12181, 29889, 842, 357, 13, 1678, 822, 8267, 29898, 1311, 29892, 8267, 1125, 13, 4706, 1583, 3032, 12181, 353, 8267, 13, 4706, 1583, 3032, 4012, 29918, 5041, 267, 580, 13, 13, 1678, 732, 6799, 13, 1678, 822, 1546, 29918, 12181, 29898, 1311, 1125, 13, 4706, 736, 1583, 3032, 14811, 29918, 12181, 13, 13, 1678, 732, 14811, 29918, 12181, 29889, 842, 357, 13, 1678, 822, 1546, 29918, 12181, 29898, 1311, 29892, 8267, 1125, 13, 4706, 1583, 3032, 14811, 29918, 12181, 353, 8267, 13, 4706, 1583, 3032, 4012, 29918, 5041, 267, 580, 13, 13, 1678, 732, 6799, 13, 1678, 822, 13261, 267, 29898, 1311, 1125, 13, 4706, 736, 1583, 3032, 5041, 267, 13, 13, 1678, 732, 5041, 267, 29889, 842, 357, 13, 1678, 822, 13261, 267, 29898, 1311, 29892, 13261, 267, 1125, 13, 4706, 1583, 3032, 5041, 267, 353, 13261, 267, 13, 4706, 1583, 3032, 842, 29918, 24772, 580, 13, 4706, 1583, 3032, 842, 29918, 11030, 580, 13, 4706, 736, 13, 13, 1678, 732, 6799, 13, 1678, 822, 10898, 29898, 1311, 1125, 13, 4706, 736, 1583, 3032, 24772, 13, 13, 1678, 732, 24772, 29889, 842, 357, 13, 1678, 822, 10898, 29898, 1311, 29892, 10898, 1125, 13, 4706, 1583, 3032, 24772, 353, 10898, 13, 4706, 736, 13, 13, 1678, 822, 679, 29918, 24772, 29898, 1311, 1125, 13, 4706, 9995, 13995, 363, 10898, 2875, 9995, 13, 4706, 736, 1583, 29889, 24772, 13, 13, 1678, 822, 731, 29918, 24772, 29898, 1311, 29892, 10898, 1125, 13, 4706, 9995, 13995, 363, 10898, 29889, 842, 357, 9995, 13, 4706, 1583, 29889, 24772, 353, 10898, 13, 4706, 736, 13, 13, 1678, 822, 903, 842, 29918, 24772, 29898, 1311, 1125, 13, 4706, 1583, 29889, 24772, 353, 518, 13, 9651, 282, 29889, 657, 29918, 9067, 2141, 9067, 29918, 2084, 29898, 29886, 29889, 657, 29918, 2084, 3101, 13, 9651, 363, 282, 297, 1583, 29889, 5041, 267, 13, 9651, 4514, 13, 4706, 736, 13, 13, 1678, 822, 903, 842, 29918, 11030, 29898, 1311, 1125, 13, 13, 4706, 822, 8161, 29918, 2161, 2780, 29898, 5041, 1125, 13, 9651, 565, 13261, 29889, 657, 29918, 5589, 7295, 13, 18884, 736, 13261, 29889, 657, 29918, 2161, 2780, 580, 13, 9651, 736, 518, 29900, 29892, 29871, 29900, 29892, 29871, 29900, 29892, 29871, 29900, 29962, 13, 13, 4706, 17761, 353, 2322, 8977, 29898, 1761, 29897, 13, 4706, 2854, 353, 426, 13, 9651, 376, 2161, 27703, 1115, 313, 1311, 29889, 842, 29918, 2161, 2780, 29892, 8161, 29918, 2161, 2780, 511, 13, 9651, 376, 12864, 27703, 1115, 313, 1311, 29889, 842, 29918, 12864, 2780, 29892, 349, 905, 29889, 657, 29918, 12864, 2780, 511, 13, 9651, 376, 16292, 29879, 1115, 313, 1311, 29889, 842, 29918, 16292, 29892, 349, 905, 29889, 657, 29918, 16292, 511, 13, 9651, 376, 1915, 342, 5577, 1115, 313, 1311, 29889, 842, 29918, 1915, 342, 1508, 29892, 349, 905, 29889, 657, 29918, 1915, 342, 1508, 511, 13, 9651, 376, 424, 24341, 1463, 29879, 1115, 313, 1311, 29889, 842, 29918, 424, 24341, 1463, 29892, 349, 905, 29889, 657, 29918, 424, 24341, 1463, 511, 13, 9651, 500, 13, 13, 4706, 363, 282, 297, 1583, 29889, 5041, 267, 29901, 13, 9651, 363, 1820, 29892, 313, 842, 3383, 679, 29897, 297, 2854, 29889, 7076, 7295, 13, 18884, 17761, 29961, 1989, 1822, 4397, 29898, 657, 29898, 29886, 876, 13, 13, 4706, 363, 1820, 29892, 313, 842, 3383, 679, 29897, 297, 2854, 29889, 7076, 7295, 13, 9651, 731, 23538, 11030, 29961, 1989, 2314, 13, 4706, 736, 13, 13, 1678, 822, 903, 4012, 29918, 5041, 267, 29898, 1311, 1125, 13, 4706, 1369, 353, 29871, 29900, 13, 4706, 1095, 353, 6213, 13, 13, 4706, 13261, 267, 353, 1051, 580, 13, 13, 4706, 3309, 29918, 1271, 29879, 353, 7431, 29898, 1311, 29889, 1271, 29879, 29897, 13, 13, 4706, 396, 18492, 278, 1546, 25834, 937, 13, 4706, 1546, 29918, 12181, 29918, 1066, 353, 29871, 29900, 13, 4706, 1546, 29918, 1271, 29879, 353, 5159, 13, 4706, 565, 1583, 29889, 14811, 29918, 12181, 338, 451, 6213, 29901, 13, 9651, 1546, 29918, 1271, 29879, 353, 1051, 29898, 7554, 29898, 13, 18884, 3464, 29898, 29900, 29892, 3309, 29918, 1271, 29879, 448, 29871, 29896, 511, 13, 18884, 3464, 29898, 29896, 29892, 3309, 29918, 1271, 29879, 29897, 13, 462, 876, 13, 4706, 3309, 29918, 14811, 29918, 1271, 29879, 353, 7431, 29898, 14811, 29918, 1271, 29879, 29897, 13, 13, 4706, 396, 3940, 393, 565, 1546, 8267, 338, 5642, 727, 338, 3078, 304, 13649, 975, 29889, 13, 4706, 363, 298, 29892, 313, 29875, 29892, 432, 29897, 297, 26985, 29898, 14811, 29918, 1271, 29879, 1125, 13, 9651, 937, 353, 1583, 29889, 1271, 29879, 29961, 29875, 29962, 13, 9651, 1473, 353, 1583, 29889, 1271, 29879, 29961, 29926, 29962, 13, 9651, 1375, 29918, 5721, 353, 1375, 4197, 29898, 29900, 29892, 29871, 29900, 511, 313, 29900, 29892, 29871, 29896, 511, 313, 29896, 29892, 29871, 29900, 511, 313, 29896, 29892, 29871, 29896, 29897, 1402, 13, 18884, 1820, 29922, 2892, 260, 29901, 6425, 29898, 7496, 29961, 29873, 29961, 29900, 5262, 448, 937, 29961, 29873, 29961, 29896, 24960, 13, 18884, 1723, 13, 9651, 1369, 353, 937, 29961, 1195, 29918, 5721, 29961, 29896, 5262, 13, 9651, 1095, 353, 1473, 29961, 1195, 29918, 5721, 29961, 29900, 5262, 13, 13, 9651, 851, 392, 29918, 4102, 353, 6213, 13, 9651, 851, 392, 29918, 7496, 353, 6213, 13, 9651, 1018, 29901, 13, 18884, 851, 392, 29918, 4102, 353, 937, 29961, 29906, 29962, 13, 18884, 851, 392, 29918, 7496, 353, 1473, 29961, 29906, 29962, 13, 9651, 5174, 29901, 13, 18884, 1209, 13, 13, 9651, 565, 851, 392, 29918, 4102, 1275, 851, 392, 29918, 7496, 29901, 13, 18884, 851, 392, 353, 851, 392, 29918, 4102, 13, 9651, 1683, 29901, 13, 18884, 851, 392, 353, 6213, 13, 13, 9651, 565, 7431, 29898, 1311, 29889, 14811, 29918, 12181, 29897, 1405, 29871, 29896, 322, 298, 718, 29871, 29896, 1275, 3309, 29918, 14811, 29918, 1271, 29879, 29901, 13, 18884, 1546, 29918, 12181, 29918, 1066, 353, 448, 29896, 13, 13, 9651, 13261, 267, 29889, 4397, 29898, 1311, 29889, 14811, 29918, 12181, 29961, 14811, 29918, 12181, 29918, 1066, 850, 13, 18884, 1369, 29922, 2962, 29892, 13, 18884, 1095, 29922, 355, 29892, 13, 18884, 851, 392, 29922, 8516, 13, 462, 876, 13, 13, 9651, 565, 7431, 29898, 1311, 29889, 14811, 29918, 12181, 29897, 1405, 29871, 29906, 29901, 13, 18884, 1546, 29918, 12181, 29918, 1066, 353, 29871, 29896, 13, 13, 4706, 396, 2567, 437, 278, 10930, 13, 4706, 8267, 29918, 1066, 353, 29871, 29900, 13, 13, 4706, 363, 474, 29892, 2908, 297, 26985, 29898, 1311, 29889, 1271, 29879, 1125, 13, 9651, 565, 7431, 29898, 1311, 29889, 12181, 29897, 1405, 29871, 29896, 322, 474, 718, 29871, 29896, 1275, 3309, 29918, 1271, 29879, 29901, 13, 18884, 8267, 29918, 1066, 353, 448, 29896, 13, 13, 9651, 1369, 353, 2908, 29961, 29900, 29962, 13, 9651, 1095, 353, 2908, 29961, 29896, 29962, 13, 13, 9651, 851, 392, 353, 6213, 13, 9651, 1018, 29901, 13, 18884, 851, 392, 353, 2908, 29961, 29906, 29962, 13, 9651, 5174, 29901, 13, 18884, 1209, 13, 13, 9651, 13261, 267, 29889, 4397, 29898, 1311, 29889, 12181, 29961, 12181, 29918, 1066, 850, 13, 18884, 1369, 29922, 2962, 29892, 13, 18884, 1095, 29922, 355, 29892, 13, 18884, 851, 392, 29922, 710, 392, 13, 462, 876, 13, 13, 9651, 565, 7431, 29898, 1311, 29889, 12181, 29897, 1405, 29871, 29906, 29901, 13, 18884, 8267, 29918, 1066, 353, 29871, 29896, 13, 13, 4706, 565, 1583, 29889, 10289, 2804, 29871, 29900, 29901, 13, 9651, 363, 13261, 297, 13261, 267, 29901, 13, 18884, 13261, 29889, 10289, 4619, 1583, 29889, 10289, 13, 13, 4706, 1583, 3032, 5041, 267, 353, 13261, 267, 13, 4706, 1583, 3032, 842, 29918, 24772, 580, 13, 4706, 1583, 3032, 842, 29918, 11030, 580, 13, 4706, 736, 13, 13, 13, 1990, 5169, 1535, 4782, 29898, 7196, 1125, 13, 13, 1678, 9995, 3251, 293, 4333, 363, 20853, 293, 16257, 29889, 13, 13, 1678, 8108, 29879, 13, 1678, 448, 22158, 13, 1678, 5096, 13, 4706, 5953, 837, 1475, 920, 304, 5096, 5680, 297, 263, 5702, 13, 1678, 9995, 13, 13, 1678, 822, 4770, 2344, 12035, 13, 9651, 1583, 29892, 13, 9651, 5680, 29892, 13, 9651, 2920, 29922, 29896, 29892, 13, 9651, 9210, 29922, 29900, 29892, 13, 9651, 5096, 29922, 8516, 29892, 13, 9651, 491, 29918, 8990, 29922, 8516, 29892, 13, 9651, 1024, 29922, 8516, 29892, 13, 9651, 3579, 19290, 13, 632, 1125, 13, 4706, 9995, 869, 9995, 13, 4706, 1583, 3032, 22100, 353, 5680, 13, 4706, 1583, 3032, 2103, 353, 2920, 13, 4706, 1583, 3032, 1429, 353, 5096, 13, 4706, 1583, 3032, 1609, 29918, 8990, 353, 491, 29918, 8990, 13, 4706, 1583, 3032, 10289, 353, 9210, 13, 4706, 1583, 29889, 978, 353, 1024, 13, 13, 4706, 1583, 3032, 5041, 267, 353, 6213, 13, 4706, 1583, 3032, 24772, 353, 6213, 13, 13, 13, 4706, 14348, 17255, 2344, 12035, 1311, 29892, 3579, 19290, 29897, 13, 4706, 1583, 3032, 4012, 29918, 5041, 267, 580, 13, 4706, 736, 13, 13, 1678, 732, 6799, 13, 1678, 822, 5680, 29898, 1311, 1125, 13, 4706, 736, 1583, 3032, 22100, 13, 13, 1678, 732, 22100, 29889, 842, 357, 13, 1678, 822, 5680, 29898, 1311, 29892, 5680, 1125, 13, 4706, 9995, 869, 9995, 13, 4706, 1583, 3032, 22100, 353, 5680, 13, 4706, 1583, 3032, 4012, 29918, 5041, 267, 580, 13, 4706, 736, 13, 13, 1678, 732, 6799, 13, 1678, 822, 9210, 29898, 1311, 1125, 13, 4706, 736, 1583, 3032, 10289, 13, 13, 1678, 732, 10289, 29889, 842, 357, 13, 1678, 822, 9210, 29898, 1311, 29892, 9210, 1125, 13, 4706, 1583, 3032, 10289, 353, 9210, 13, 4706, 1583, 3032, 4012, 29918, 5041, 267, 580, 13, 4706, 736, 13, 13, 1678, 732, 6799, 13, 1678, 822, 491, 29918, 8990, 29898, 1311, 1125, 13, 4706, 736, 1583, 3032, 1609, 29918, 8990, 13, 13, 1678, 732, 1609, 29918, 8990, 29889, 842, 357, 13, 1678, 822, 491, 29918, 8990, 29898, 1311, 29892, 491, 29918, 8990, 1125, 13, 4706, 1583, 3032, 1609, 29918, 8990, 353, 491, 29918, 8990, 13, 4706, 565, 491, 29918, 8990, 338, 451, 6213, 29901, 13, 9651, 363, 13261, 297, 1583, 29889, 5041, 267, 29901, 13, 18884, 565, 13261, 29889, 1609, 29918, 8990, 338, 451, 6213, 29901, 13, 462, 1678, 13261, 29889, 1609, 29918, 8990, 353, 491, 29918, 8990, 13, 4706, 736, 13, 13, 1678, 732, 6799, 13, 1678, 822, 10898, 29898, 1311, 1125, 13, 4706, 736, 1583, 3032, 24772, 13, 13, 1678, 732, 24772, 29889, 842, 357, 13, 1678, 822, 10898, 29898, 1311, 29892, 10898, 1125, 13, 4706, 1583, 3032, 24772, 353, 10898, 13, 4706, 736, 13, 13, 1678, 822, 679, 29918, 24772, 29898, 1311, 1125, 13, 4706, 9995, 13995, 363, 10898, 2875, 9995, 13, 4706, 736, 1583, 29889, 24772, 13, 13, 1678, 822, 731, 29918, 24772, 29898, 1311, 29892, 10898, 1125, 13, 4706, 9995, 13995, 363, 10898, 29889, 842, 357, 9995, 13, 4706, 1583, 29889, 24772, 353, 10898, 13, 4706, 736, 13, 13, 1678, 822, 903, 842, 29918, 24772, 29898, 1311, 1125, 13, 4706, 1583, 29889, 24772, 353, 518, 13, 9651, 282, 29889, 657, 29918, 9067, 2141, 9067, 29918, 2084, 29898, 29886, 29889, 657, 29918, 2084, 3101, 13, 9651, 363, 282, 297, 1583, 3032, 5041, 267, 13, 9651, 4514, 13, 4706, 736, 13, 13, 1678, 822, 903, 842, 29918, 11030, 29898, 1311, 1125, 13, 13, 4706, 822, 8161, 29918, 2161, 2780, 29898, 5041, 1125, 13, 9651, 565, 13261, 29889, 657, 29918, 5589, 7295, 13, 18884, 736, 13261, 29889, 657, 29918, 2161, 2780, 580, 13, 9651, 736, 518, 29900, 29892, 29871, 29900, 29892, 29871, 29900, 29892, 29871, 29900, 29962, 13, 13, 4706, 17761, 353, 2322, 8977, 29898, 1761, 29897, 13, 4706, 2854, 353, 426, 13, 9651, 376, 2161, 27703, 1115, 313, 1311, 29889, 842, 29918, 2161, 2780, 29892, 8161, 29918, 2161, 2780, 511, 13, 9651, 376, 12864, 27703, 1115, 313, 1311, 29889, 842, 29918, 12864, 2780, 29892, 349, 905, 29889, 657, 29918, 12864, 2780, 511, 13, 9651, 376, 16292, 29879, 1115, 313, 1311, 29889, 842, 29918, 16292, 29892, 349, 905, 29889, 657, 29918, 16292, 511, 13, 9651, 376, 1915, 342, 5577, 1115, 313, 1311, 29889, 842, 29918, 1915, 342, 1508, 29892, 349, 905, 29889, 657, 29918, 1915, 342, 1508, 511, 13, 9651, 376, 424, 24341, 1463, 29879, 1115, 313, 1311, 29889, 842, 29918, 424, 24341, 1463, 29892, 349, 905, 29889, 657, 29918, 424, 24341, 1463, 511, 13, 9651, 500, 13, 13, 4706, 363, 282, 297, 1583, 3032, 5041, 267, 29901, 13, 9651, 363, 1820, 29892, 313, 842, 3383, 679, 29897, 297, 2854, 29889, 7076, 7295, 13, 18884, 17761, 29961, 1989, 1822, 4397, 29898, 657, 29898, 29886, 876, 13, 13, 4706, 363, 1820, 29892, 313, 842, 3383, 679, 29897, 297, 2854, 29889, 7076, 7295, 13, 9651, 731, 23538, 11030, 29961, 1989, 2314, 13, 4706, 736, 13, 13, 1678, 822, 903, 4012, 29918, 5041, 267, 29898, 1311, 1125, 13, 4706, 9995, 869, 9995, 13, 4706, 13261, 267, 353, 1051, 580, 13, 4706, 363, 4682, 297, 1583, 29889, 22100, 29901, 13, 9651, 565, 1583, 3032, 10289, 2804, 29871, 29900, 29901, 13, 18884, 4682, 29889, 10289, 353, 1583, 3032, 10289, 13, 9651, 565, 338, 8758, 29898, 14394, 29892, 349, 905, 1125, 13, 18884, 13261, 267, 29889, 4397, 29898, 14394, 29897, 13, 9651, 25342, 338, 8758, 29898, 14394, 29892, 5169, 1535, 1125, 13, 18884, 13261, 267, 29889, 21843, 29898, 14394, 29889, 5041, 267, 29897, 13, 9651, 25342, 338, 8758, 29898, 14394, 29892, 5169, 1535, 4782, 1125, 13, 18884, 13261, 267, 29889, 21843, 29898, 14394, 29889, 5041, 267, 29897, 13, 9651, 1683, 29901, 13, 18884, 1209, 13, 13, 4706, 1583, 3032, 5041, 267, 353, 13261, 267, 13, 4706, 736, 13, 13, 13, 1990, 6645, 7196, 29898, 3318, 1125, 13, 13, 1678, 9995, 869, 9995, 13, 13, 1678, 822, 4770, 2344, 12035, 13, 9651, 1583, 29892, 13, 9651, 5446, 29892, 13, 9651, 2988, 29922, 1761, 3285, 13, 9651, 788, 29918, 517, 29918, 1003, 29922, 8824, 29892, 13, 9651, 491, 29922, 8516, 13, 632, 1125, 13, 4706, 9995, 869, 9995, 13, 4706, 1583, 29889, 4965, 353, 1051, 580, 13, 4706, 1583, 29889, 4965, 29889, 21843, 29898, 4965, 29897, 13, 4706, 1583, 29889, 5415, 353, 5446, 13, 4706, 1583, 29889, 1202, 29918, 517, 29918, 1003, 353, 788, 29918, 517, 29918, 1003, 13, 4706, 1583, 29889, 1609, 353, 491, 13, 4706, 658, 29890, 29926, 353, 5446, 580, 13, 4706, 1583, 29889, 4532, 353, 658, 29890, 29926, 29889, 4532, 13, 13, 4706, 736, 13, 13, 1678, 822, 788, 29898, 1311, 29892, 10930, 29892, 491, 29922, 8516, 29892, 3579, 19290, 1125, 13, 4706, 9995, 13, 4706, 7670, 1742, 6273, 29901, 13, 4706, 10930, 1192, 263, 29871, 29906, 29892, 29871, 29941, 29892, 470, 29871, 29946, 22112, 1409, 13, 632, 29906, 13391, 29901, 5519, 1165, 29896, 29918, 29916, 29896, 29892, 4853, 29896, 29918, 29916, 29906, 1402, 518, 1165, 29906, 29918, 29916, 29896, 29892, 4853, 29896, 29918, 29916, 29906, 5262, 396, 2323, 2407, 13, 632, 29941, 13391, 29901, 13, 18884, 518, 13, 18884, 5519, 1165, 29896, 29918, 29916, 29896, 29892, 4853, 29896, 29918, 29916, 29906, 1402, 518, 1165, 29906, 29918, 29916, 29896, 29892, 4853, 29906, 29918, 29916, 29906, 20526, 13, 18884, 5519, 1165, 29896, 29918, 29916, 29896, 29892, 4853, 29896, 29918, 29916, 29906, 1402, 518, 1165, 29906, 29918, 29916, 29896, 29892, 4853, 29906, 29918, 29916, 29906, 20526, 13, 18884, 2023, 13, 18884, 4514, 13, 632, 29946, 13391, 29901, 13, 18884, 518, 13, 462, 1678, 518, 13, 462, 1678, 5519, 1165, 29896, 29918, 29916, 29896, 29892, 4853, 29896, 29918, 29916, 29906, 1402, 518, 1165, 29896, 29918, 29891, 29896, 29892, 4853, 29896, 29918, 29891, 29906, 20526, 13, 462, 1678, 5519, 1165, 29906, 29918, 29916, 29896, 29892, 4853, 29906, 29918, 29916, 29906, 1402, 518, 1165, 29906, 29918, 29891, 29896, 29892, 4853, 29906, 29918, 29891, 29906, 20526, 13, 462, 1678, 21251, 13, 462, 1678, 518, 13, 462, 1678, 5519, 1165, 29896, 29918, 29916, 29896, 29892, 4853, 29896, 29918, 29916, 29906, 1402, 518, 1165, 29896, 29918, 29891, 29896, 29892, 4853, 29896, 29918, 29891, 29906, 20526, 13, 462, 1678, 5519, 1165, 29906, 29918, 29916, 29896, 29892, 4853, 29906, 29918, 29916, 29906, 1402, 518, 1165, 29906, 29918, 29891, 29896, 29892, 4853, 29906, 29918, 29891, 29906, 20526, 13, 462, 1678, 21251, 13, 462, 1678, 2023, 13, 18884, 4514, 13, 4706, 9995, 13, 4706, 491, 353, 1583, 29889, 1609, 565, 491, 338, 6213, 1683, 491, 13, 4706, 5446, 353, 1583, 29889, 5415, 13, 13, 4706, 565, 7431, 29898, 1271, 29879, 29897, 1275, 29871, 29900, 29901, 13, 9651, 736, 1051, 580, 13, 13, 4706, 10930, 353, 7442, 29889, 2378, 29898, 1271, 29879, 29897, 13, 4706, 565, 7431, 29898, 1271, 29879, 29889, 12181, 29897, 1275, 29871, 29906, 29901, 13, 9651, 565, 491, 1275, 525, 29916, 29915, 470, 1583, 29889, 1609, 338, 6213, 29901, 13, 18884, 282, 1271, 29879, 353, 7442, 29889, 2378, 4197, 13, 462, 1678, 5519, 1165, 29918, 29916, 3881, 29892, 6213, 29962, 363, 4853, 29918, 29916, 3881, 297, 10930, 29962, 13, 462, 268, 2314, 13, 9651, 25342, 491, 1275, 525, 29891, 2396, 13, 18884, 282, 1271, 29879, 353, 7442, 29889, 2378, 4197, 13, 462, 1678, 5519, 8516, 29892, 4853, 29918, 29891, 3881, 29962, 363, 4853, 29918, 29891, 3881, 297, 10930, 29962, 13, 462, 268, 2314, 13, 4706, 25342, 7431, 29898, 1271, 29879, 29889, 12181, 29897, 1275, 29871, 29941, 29901, 13, 9651, 565, 491, 1275, 525, 29916, 29915, 470, 1583, 29889, 1609, 338, 6213, 29901, 13, 18884, 282, 1271, 29879, 353, 7442, 29889, 2378, 4197, 13, 462, 1678, 5519, 1165, 29896, 29918, 29916, 3881, 29892, 6213, 1402, 13, 462, 268, 518, 1165, 29906, 29918, 29916, 3881, 29892, 6213, 5262, 13, 462, 1678, 363, 4853, 29896, 29918, 29916, 3881, 29892, 4853, 29906, 29918, 29916, 3881, 297, 10930, 13, 462, 268, 2314, 13, 9651, 25342, 491, 1275, 525, 29891, 2396, 13, 18884, 282, 1271, 29879, 353, 7442, 29889, 2378, 4197, 13, 462, 1678, 5519, 8516, 29892, 4853, 29896, 29918, 29891, 3881, 1402, 13, 462, 268, 518, 8516, 29892, 4853, 29906, 29918, 29891, 3881, 5262, 13, 462, 1678, 363, 4853, 29896, 29918, 29891, 3881, 29892, 4853, 29906, 29918, 29891, 3881, 297, 10930, 13, 462, 268, 2314, 13, 4706, 1683, 29901, 13, 9651, 282, 1271, 29879, 353, 10930, 13, 13, 4706, 716, 29918, 4965, 353, 1051, 580, 13, 4706, 363, 2908, 297, 282, 1271, 29879, 29901, 13, 9651, 5135, 1165, 29896, 29918, 29916, 3881, 29892, 4853, 29896, 29918, 29891, 3881, 511, 313, 1165, 29906, 29918, 29916, 3881, 29892, 4853, 29906, 29918, 29891, 3881, 876, 353, 2908, 13, 9651, 8636, 353, 9657, 580, 396, 8552, 29898, 19290, 29897, 13, 9651, 8636, 1839, 1609, 2033, 353, 491, 13, 9651, 8636, 1839, 1165, 29896, 29918, 29916, 3881, 2033, 353, 4853, 29896, 29918, 29916, 3881, 13, 9651, 8636, 1839, 1165, 29896, 29918, 29891, 3881, 2033, 353, 4853, 29896, 29918, 29891, 3881, 13, 9651, 8636, 1839, 1165, 29906, 29918, 29916, 3881, 2033, 353, 4853, 29906, 29918, 29916, 3881, 13, 9651, 8636, 1839, 1165, 29906, 29918, 29891, 3881, 2033, 353, 4853, 29906, 29918, 29891, 3881, 13, 9651, 8636, 353, 426, 29895, 29901, 29894, 363, 413, 29892, 325, 297, 8636, 29889, 7076, 580, 565, 325, 338, 451, 6213, 29913, 13, 9651, 658, 29890, 29926, 353, 5446, 580, 13, 9651, 658, 29890, 29926, 17255, 8977, 26914, 5504, 29898, 7529, 29897, 13, 9651, 658, 29890, 29926, 29889, 11330, 29889, 5504, 29898, 19290, 29897, 13, 9651, 1583, 29889, 4965, 29889, 4397, 29898, 2127, 29926, 29897, 13, 9651, 716, 29918, 4965, 29889, 4397, 29898, 2127, 29926, 29897, 13, 13, 4706, 736, 716, 29918, 4965, 13, 13, 1678, 822, 4770, 4804, 12035, 1311, 1125, 13, 4706, 736, 1583, 29889, 4012, 580, 13, 13, 1678, 822, 4216, 29898, 1311, 1125, 13, 4706, 9995, 869, 9995, 13, 4706, 13261, 267, 353, 1051, 580, 13, 4706, 363, 1544, 297, 1583, 29889, 4965, 29901, 13, 9651, 565, 451, 1544, 29889, 262, 29918, 12514, 7295, 13, 18884, 6773, 13, 13, 9651, 2224, 353, 1544, 29889, 4012, 580, 13, 9651, 1544, 29918, 5041, 353, 10802, 29925, 905, 29898, 13, 18884, 2224, 29892, 13, 18884, 4327, 29922, 1311, 29889, 4532, 29889, 3286, 13080, 545, 29892, 13, 18884, 3579, 2324, 29889, 11330, 13, 18884, 1723, 13, 9651, 1153, 29916, 353, 1544, 29889, 1165, 29896, 13, 9651, 3855, 1165, 353, 1544, 29889, 1165, 29906, 13, 13, 9651, 13261, 267, 29889, 4397, 29898, 2324, 29918, 5041, 29897, 13, 4706, 565, 1583, 29889, 1202, 29918, 517, 29918, 1003, 29901, 13, 9651, 1583, 29889, 4532, 29889, 5041, 267, 29889, 21843, 29898, 5041, 267, 29897, 13, 4706, 736, 13261, 267, 13, 13, 13, 13, 13383, 13383, 29937, 6680, 29879, 835, 13383, 7346, 4136, 2277, 29937, 13, 2 ]
tests/functional_pyecore/test_processors_pyecore.py
aranega/textX
4
162359
""" Testing model and object processors. """ import pytest # noqa import sys pytestmark = pytest.mark.skipif(sys.version_info[0] < 3, reason="pyecore is not Python 2 compatible") # noqa pyecore = pytest.importorskip("pyecore") # noqa import textx from textx import metamodel_from_str @pytest.fixture(scope="module") def enable_pyecore_support(): textx.enable_pyecore_support() yield textx.enable_pyecore_support(enable=False) pytestmark = pytest.mark.usefixtures("enable_pyecore_support") grammar = """ First: 'first' seconds+=Second ('A' a+=INT)? ('B' b=BOOL)? ('C' c=STRING)? ; Second: sec = INT ; """ model_processor_called = False def test_model_processor(): """ Test that model processors are called after model parsing. """ global model_processor_called model_str = 'first 34 45 7 A 45 65 B true C "dfdf"' metamodel = metamodel_from_str(grammar) metamodel.register_model_processor(model_processor) metamodel.model_from_str(model_str) assert model_processor_called def model_processor(model, metamodel): """ Model processor is called when the model is successfully parsed. """ global model_processor_called model_processor_called = True assert model.__class__.__name__ == "First" assert model.seconds[0].sec == 34 def test_object_processors(): """ Test that object processors are called. They should be called after each model object construction. """ call_order = [] def first_obj_processor(first): first._first_called = True call_order.append(1) def second_obj_processor(second): second._second_called = True call_order.append(2) # test that parent is fully initialised. # b should be True assert second.parent.b obj_processors = { 'First': first_obj_processor, 'Second': second_obj_processor, } metamodel = metamodel_from_str(grammar) metamodel.register_obj_processors(obj_processors) model_str = 'first 34 45 7 A 45 65 B true C "dfdf"' first = metamodel.model_from_str(model_str) assert hasattr(first, '_first_called') for s in first.seconds: assert hasattr(s, '_second_called') assert call_order == [2, 2, 2, 1]
[ 1, 9995, 13, 3057, 292, 1904, 322, 1203, 1889, 943, 29889, 13, 15945, 29908, 13, 5215, 11451, 1688, 29871, 396, 694, 25621, 13, 5215, 10876, 13, 2272, 1688, 3502, 353, 11451, 1688, 29889, 3502, 29889, 11014, 361, 29898, 9675, 29889, 3259, 29918, 3888, 29961, 29900, 29962, 529, 29871, 29941, 29892, 13, 462, 18884, 2769, 543, 2272, 687, 487, 338, 451, 5132, 29871, 29906, 15878, 1159, 29871, 396, 694, 25621, 13, 2272, 687, 487, 353, 11451, 1688, 29889, 5215, 272, 11014, 703, 2272, 687, 487, 1159, 29871, 396, 694, 25621, 13, 5215, 1426, 29916, 13, 3166, 1426, 29916, 1053, 1539, 314, 27224, 29918, 3166, 29918, 710, 13, 13, 13, 29992, 2272, 1688, 29889, 7241, 15546, 29898, 6078, 543, 5453, 1159, 13, 1753, 9025, 29918, 2272, 687, 487, 29918, 5924, 7295, 13, 1678, 1426, 29916, 29889, 12007, 29918, 2272, 687, 487, 29918, 5924, 580, 13, 1678, 7709, 13, 1678, 1426, 29916, 29889, 12007, 29918, 2272, 687, 487, 29918, 5924, 29898, 12007, 29922, 8824, 29897, 13, 13, 13, 2272, 1688, 3502, 353, 11451, 1688, 29889, 3502, 29889, 1509, 7241, 486, 1973, 703, 12007, 29918, 2272, 687, 487, 29918, 5924, 1159, 13, 13, 13, 1393, 3034, 353, 9995, 13, 6730, 29901, 13, 1678, 525, 4102, 29915, 6923, 23661, 11863, 13, 1678, 6702, 29909, 29915, 263, 23661, 10192, 6877, 13, 1678, 6702, 29933, 29915, 289, 29922, 28443, 6877, 13, 1678, 6702, 29907, 29915, 274, 29922, 20785, 6877, 13, 29936, 13, 13, 11863, 29901, 13, 1678, 5226, 353, 19578, 13, 29936, 13, 13, 15945, 29908, 13, 13, 4299, 29918, 26482, 29918, 13998, 353, 7700, 13, 13, 13, 1753, 1243, 29918, 4299, 29918, 26482, 7295, 13, 1678, 9995, 13, 1678, 4321, 393, 1904, 1889, 943, 526, 2000, 1156, 1904, 13755, 29889, 13, 1678, 9995, 13, 1678, 5534, 1904, 29918, 26482, 29918, 13998, 13, 13, 1678, 1904, 29918, 710, 353, 525, 4102, 29871, 29941, 29946, 29871, 29946, 29945, 29871, 29955, 319, 29871, 29946, 29945, 29871, 29953, 29945, 350, 1565, 315, 376, 2176, 2176, 29908, 29915, 13, 13, 1678, 1539, 314, 27224, 353, 1539, 314, 27224, 29918, 3166, 29918, 710, 29898, 1393, 3034, 29897, 13, 1678, 1539, 314, 27224, 29889, 9573, 29918, 4299, 29918, 26482, 29898, 4299, 29918, 26482, 29897, 13, 13, 1678, 1539, 314, 27224, 29889, 4299, 29918, 3166, 29918, 710, 29898, 4299, 29918, 710, 29897, 13, 13, 1678, 4974, 1904, 29918, 26482, 29918, 13998, 13, 13, 13, 1753, 1904, 29918, 26482, 29898, 4299, 29892, 1539, 314, 27224, 1125, 13, 1678, 9995, 13, 1678, 8125, 21433, 338, 2000, 746, 278, 1904, 338, 8472, 21213, 29889, 13, 1678, 9995, 13, 1678, 5534, 1904, 29918, 26482, 29918, 13998, 13, 1678, 1904, 29918, 26482, 29918, 13998, 353, 5852, 13, 13, 1678, 4974, 1904, 17255, 1990, 1649, 17255, 978, 1649, 1275, 376, 6730, 29908, 13, 1678, 4974, 1904, 29889, 23128, 29961, 29900, 1822, 3471, 1275, 29871, 29941, 29946, 13, 13, 13, 1753, 1243, 29918, 3318, 29918, 5014, 943, 7295, 13, 1678, 9995, 13, 1678, 4321, 393, 1203, 1889, 943, 526, 2000, 29889, 13, 1678, 2688, 881, 367, 2000, 1156, 1269, 1904, 1203, 7632, 29889, 13, 1678, 9995, 13, 13, 1678, 1246, 29918, 2098, 353, 5159, 13, 13, 1678, 822, 937, 29918, 5415, 29918, 26482, 29898, 4102, 1125, 13, 4706, 937, 3032, 4102, 29918, 13998, 353, 5852, 13, 4706, 1246, 29918, 2098, 29889, 4397, 29898, 29896, 29897, 13, 13, 1678, 822, 1473, 29918, 5415, 29918, 26482, 29898, 7496, 1125, 13, 4706, 1473, 3032, 7496, 29918, 13998, 353, 5852, 13, 4706, 1246, 29918, 2098, 29889, 4397, 29898, 29906, 29897, 13, 13, 4706, 396, 1243, 393, 3847, 338, 8072, 2847, 3368, 29889, 13, 4706, 396, 289, 881, 367, 5852, 13, 4706, 4974, 1473, 29889, 3560, 29889, 29890, 13, 13, 1678, 5446, 29918, 5014, 943, 353, 426, 13, 4706, 525, 6730, 2396, 937, 29918, 5415, 29918, 26482, 29892, 13, 4706, 525, 11863, 2396, 1473, 29918, 5415, 29918, 26482, 29892, 13, 4706, 500, 13, 13, 1678, 1539, 314, 27224, 353, 1539, 314, 27224, 29918, 3166, 29918, 710, 29898, 1393, 3034, 29897, 13, 1678, 1539, 314, 27224, 29889, 9573, 29918, 5415, 29918, 5014, 943, 29898, 5415, 29918, 5014, 943, 29897, 13, 13, 1678, 1904, 29918, 710, 353, 525, 4102, 29871, 29941, 29946, 29871, 29946, 29945, 29871, 29955, 319, 29871, 29946, 29945, 29871, 29953, 29945, 350, 1565, 315, 376, 2176, 2176, 29908, 29915, 13, 1678, 937, 353, 1539, 314, 27224, 29889, 4299, 29918, 3166, 29918, 710, 29898, 4299, 29918, 710, 29897, 13, 13, 1678, 4974, 756, 5552, 29898, 4102, 29892, 22868, 4102, 29918, 13998, 1495, 13, 1678, 363, 269, 297, 937, 29889, 23128, 29901, 13, 4706, 4974, 756, 5552, 29898, 29879, 29892, 22868, 7496, 29918, 13998, 1495, 13, 1678, 4974, 1246, 29918, 2098, 1275, 518, 29906, 29892, 29871, 29906, 29892, 29871, 29906, 29892, 29871, 29896, 29962, 13, 2 ]
leetcode/hard/145. Binary Tree Postorder Traversal.py
Jeongseo21/Algorithm-1
7
63047
# problem : https://leetcode.com/problems/binary-tree-postorder-traversal/ # time complexity : O(N) # data structure : stack # Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution: def postorderTraversal(self, root: TreeNode) -> List[int]: ans = [] s = [(root, 0)] while len(s) > 0: node, appearCnt = s.pop() if node is None: continue if appearCnt == 0: s.append((node, 1)) s.append((node.right, 0)) s.append((node.left, 0)) else: ans.append(node.val) return ans
[ 1, 396, 1108, 584, 2045, 597, 280, 300, 401, 29889, 510, 29914, 17199, 29879, 29914, 19541, 29899, 8336, 29899, 2490, 2098, 29899, 3018, 874, 284, 29914, 13, 29937, 931, 13644, 584, 438, 29898, 29940, 29897, 13, 29937, 848, 3829, 584, 5096, 13, 13, 29937, 21940, 363, 263, 7581, 5447, 2943, 29889, 13, 29937, 770, 15472, 4247, 29901, 13, 29937, 268, 822, 4770, 2344, 12035, 1311, 29892, 921, 1125, 13, 29937, 308, 1583, 29889, 791, 353, 921, 13, 29937, 308, 1583, 29889, 1563, 353, 6213, 13, 29937, 308, 1583, 29889, 1266, 353, 6213, 13, 13, 1990, 24380, 29901, 13, 1678, 822, 1400, 2098, 5323, 874, 284, 29898, 1311, 29892, 3876, 29901, 15472, 4247, 29897, 1599, 2391, 29961, 524, 5387, 13, 13, 4706, 6063, 353, 5159, 13, 4706, 269, 353, 17288, 4632, 29892, 29871, 29900, 4638, 13, 4706, 1550, 7431, 29898, 29879, 29897, 1405, 29871, 29900, 29901, 13, 9651, 2943, 29892, 2615, 29907, 593, 353, 269, 29889, 7323, 580, 13, 13, 9651, 565, 2943, 338, 6213, 29901, 13, 18884, 6773, 13, 13, 9651, 565, 2615, 29907, 593, 1275, 29871, 29900, 29901, 13, 18884, 269, 29889, 4397, 3552, 3177, 29892, 29871, 29896, 876, 13, 18884, 269, 29889, 4397, 3552, 3177, 29889, 1266, 29892, 29871, 29900, 876, 13, 18884, 269, 29889, 4397, 3552, 3177, 29889, 1563, 29892, 29871, 29900, 876, 13, 9651, 1683, 29901, 13, 18884, 6063, 29889, 4397, 29898, 3177, 29889, 791, 29897, 13, 4706, 736, 6063, 13, 2 ]
plugins/modules/network_device.py
steinzi/ansible-ise
0
71213
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2021, Cisco Systems # GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt) DOCUMENTATION = r""" --- module: network_device short_description: Resource module for Network Device description: - Manage operations create, update and delete of the resource Network Device. version_added: '1.0.0' author: <NAME> (@racampos) options: NetworkDeviceGroupList: description: List of Network Device Group names for this node. elements: str type: list NetworkDeviceIPList: description: List of IP Subnets for this node. suboptions: getIpaddressExclude: description: It can be either single IP address or IP range address. type: str ipaddress: description: Network Device's ipaddress. type: str mask: description: Network Device's mask. type: int type: list authenticationSettings: description: Network Device's authenticationSettings. suboptions: dtlsRequired: description: This value enforces use of dtls. type: bool enableKeyWrap: description: EnableKeyWrap flag. type: bool enableMultiSecret: description: EnableMultiSecret flag. type: bool enabled: description: Enabled flag. type: bool keyEncryptionKey: description: Network Device's keyEncryptionKey. type: str keyInputFormat: description: Allowed values - ASCII, - HEXADECIMAL. type: str messageAuthenticatorCodeKey: description: Network Device's messageAuthenticatorCodeKey. type: str networkProtocol: description: Allowed values - RADIUS, - TACACS_PLUS. type: str radiusSharedSecret: description: Network Device's radiusSharedSecret. type: str secondRadiusSharedSecret: description: Network Device's secondRadiusSharedSecret. type: str type: dict coaPort: description: Network Device's coaPort. type: int description: description: Network Device's description. type: str dtlsDnsName: description: This value is used to verify the client identity contained in the X.509 RADIUS/DTLS client certificate. type: str id: description: Network Device's id. type: str modelName: description: Network Device's modelName. type: str name: description: Network Device's name. type: str profileName: description: Network Device's profileName. type: str snmpsettings: description: Network Device's snmpsettings. suboptions: linkTrapQuery: description: LinkTrapQuery flag. type: bool macTrapQuery: description: MacTrapQuery flag. type: bool originatingPolicyServicesNode: description: Network Device's originatingPolicyServicesNode. type: str pollingInterval: description: Network Device's pollingInterval. type: int roCommunity: description: Network Device's roCommunity. type: str version: description: Network Device's version. type: str type: dict softwareVersion: description: Network Device's softwareVersion. type: str tacacsSettings: description: Network Device's tacacsSettings. suboptions: connectModeOptions: description: Allowed values - OFF, - ON_LEGACY, - ON_DRAFT_COMPLIANT. type: str sharedSecret: description: Network Device's sharedSecret. type: str type: dict trustsecsettings: description: Network Device's trustsecsettings. suboptions: deviceAuthenticationSettings: description: Network Device's deviceAuthenticationSettings. suboptions: sgaDeviceId: description: Network Device's sgaDeviceId. type: str sgaDevicePassword: description: Network Device's sgaDevicePassword. type: str type: dict deviceConfigurationDeployment: description: Network Device's deviceConfigurationDeployment. suboptions: enableModePassword: description: Network Device's enableModePassword. type: str execModePassword: description: Network Device's execModePassword. type: str execModeUsername: description: Network Device's execModeUsername. type: str includeWhenDeployingSGTUpdates: description: IncludeWhenDeployingSGTUpdates flag. type: bool type: dict pushIdSupport: description: PushIdSupport flag. type: bool sgaNotificationAndUpdates: description: Network Device's sgaNotificationAndUpdates. suboptions: coaSourceHost: description: Network Device's coaSourceHost. type: str downlaodEnvironmentDataEveryXSeconds: description: Network Device's downlaodEnvironmentDataEveryXSeconds. type: int downlaodPeerAuthorizationPolicyEveryXSeconds: description: Network Device's downlaodPeerAuthorizationPolicyEveryXSeconds. type: int downloadSGACLListsEveryXSeconds: description: Network Device's downloadSGACLListsEveryXSeconds. type: int otherSGADevicesToTrustThisDevice: description: OtherSGADevicesToTrustThisDevice flag. type: bool reAuthenticationEveryXSeconds: description: Network Device's reAuthenticationEveryXSeconds. type: int sendConfigurationToDevice: description: SendConfigurationToDevice flag. type: bool sendConfigurationToDeviceUsing: description: Allowed values - ENABLE_USING_COA, - ENABLE_USING_CLI, - DISABLE_ALL. type: str type: dict type: dict requirements: - ciscoisesdk seealso: # Reference by Internet resource - name: Network Device reference description: Complete reference of the Network Device object model. link: https://ciscoisesdk.readthedocs.io/en/latest/api/api.html#v3-0-0-summary """ EXAMPLES = r""" - name: Update by name cisco.ise.network_device: ise_hostname: "{{ise_hostname}}" ise_username: "{{ise_username}}" ise_password: "{{<PASSWORD>}}" ise_verify: "{{ise_verify}}" state: present NetworkDeviceGroupList: - string NetworkDeviceIPList: - getIpaddressExclude: string ipaddress: string mask: 0 authenticationSettings: dtlsRequired: true enableKeyWrap: true enableMultiSecret: true enabled: true keyEncryptionKey: string keyInputFormat: string messageAuthenticatorCodeKey: string networkProtocol: string radiusSharedSecret: string secondRadiusSharedSecret: string coaPort: 0 description: string dtlsDnsName: string id: string modelName: string name: string profileName: string snmpsettings: linkTrapQuery: true macTrapQuery: true originatingPolicyServicesNode: string pollingInterval: 0 roCommunity: string version: string softwareVersion: string tacacsSettings: connectModeOptions: string sharedSecret: string trustsecsettings: deviceAuthenticationSettings: sgaDeviceId: string sgaDevicePassword: string deviceConfigurationDeployment: enableModePassword: string execModePassword: string execModeUsername: string includeWhenDeployingSGTUpdates: true pushIdSupport: true sgaNotificationAndUpdates: coaSourceHost: string downlaodEnvironmentDataEveryXSeconds: 0 downlaodPeerAuthorizationPolicyEveryXSeconds: 0 downloadSGACLListsEveryXSeconds: 0 otherSGADevicesToTrustThisDevice: true reAuthenticationEveryXSeconds: 0 sendConfigurationToDevice: true sendConfigurationToDeviceUsing: string - name: Delete by name cisco.ise.network_device: ise_hostname: "{{ise_hostname}}" ise_username: "{{ise_username}}" ise_password: "{{<PASSWORD>}}" ise_verify: "{{ise_verify}}" state: absent name: string - name: Update by id cisco.ise.network_device: ise_hostname: "{{ise_hostname}}" ise_username: "{{ise_username}}" ise_password: "{{<PASSWORD>}}" ise_verify: "{{ise_verify}}" state: present NetworkDeviceGroupList: - string NetworkDeviceIPList: - getIpaddressExclude: string ipaddress: string mask: 0 authenticationSettings: dtlsRequired: true enableKeyWrap: true enableMultiSecret: true enabled: true keyEncryptionKey: string keyInputFormat: string messageAuthenticatorCodeKey: string networkProtocol: string radiusSharedSecret: string secondRadiusSharedSecret: string coaPort: 0 description: string dtlsDnsName: string id: string modelName: string name: string profileName: string snmpsettings: linkTrapQuery: true macTrapQuery: true originatingPolicyServicesNode: string pollingInterval: 0 roCommunity: string version: string softwareVersion: string tacacsSettings: connectModeOptions: string sharedSecret: string trustsecsettings: deviceAuthenticationSettings: sgaDeviceId: string sgaDevicePassword: string deviceConfigurationDeployment: enableModePassword: string execModePassword: string execModeUsername: string includeWhenDeployingSGTUpdates: true pushIdSupport: true sgaNotificationAndUpdates: coaSourceHost: string downlaodEnvironmentDataEveryXSeconds: 0 downlaodPeerAuthorizationPolicyEveryXSeconds: 0 downloadSGACLListsEveryXSeconds: 0 otherSGADevicesToTrustThisDevice: true reAuthenticationEveryXSeconds: 0 sendConfigurationToDevice: true sendConfigurationToDeviceUsing: string - name: Delete by id cisco.ise.network_device: ise_hostname: "{{ise_hostname}}" ise_username: "{{ise_username}}" ise_password: "{{<PASSWORD>}}" ise_verify: "{{ise_verify}}" state: absent id: string - name: Create cisco.ise.network_device: ise_hostname: "{{ise_hostname}}" ise_username: "{{ise_username}}" ise_password: "{{<PASSWORD>}}" ise_verify: "{{ise_verify}}" state: present NetworkDeviceGroupList: - string NetworkDeviceIPList: - getIpaddressExclude: string ipaddress: string mask: 0 authenticationSettings: dtlsRequired: true enableKeyWrap: true enableMultiSecret: true enabled: true keyEncryptionKey: string keyInputFormat: string messageAuthenticatorCodeKey: string networkProtocol: string radiusSharedSecret: string secondRadiusSharedSecret: string coaPort: 0 description: string dtlsDnsName: string modelName: string name: string profileName: string snmpsettings: linkTrapQuery: true macTrapQuery: true originatingPolicyServicesNode: string pollingInterval: 0 roCommunity: string version: string softwareVersion: string tacacsSettings: connectModeOptions: string sharedSecret: string trustsecsettings: deviceAuthenticationSettings: sgaDeviceId: string sgaDevicePassword: string deviceConfigurationDeployment: enableModePassword: string execModePassword: string execModeUsername: string includeWhenDeployingSGTUpdates: true pushIdSupport: true sgaNotificationAndUpdates: coaSourceHost: string downlaodEnvironmentDataEveryXSeconds: 0 downlaodPeerAuthorizationPolicyEveryXSeconds: 0 downloadSGACLListsEveryXSeconds: 0 otherSGADevicesToTrustThisDevice: true reAuthenticationEveryXSeconds: 0 sendConfigurationToDevice: true sendConfigurationToDeviceUsing: string """ RETURN = r""" ise_response: description: A dictionary or list with the response returned by the Cisco ISE Python SDK returned: always type: dict sample: > { "UpdatedFieldsList": { "updatedField": { "field": "string", "oldValue": "string", "newValue": "string" }, "field": "string", "oldValue": "string", "newValue": "string" } } """
[ 1, 18787, 4855, 29914, 2109, 29914, 4691, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 13, 29937, 14187, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29906, 29896, 29892, 315, 275, 1111, 23985, 13, 29937, 15143, 4593, 5236, 19245, 325, 29941, 29889, 29900, 29974, 313, 4149, 365, 2965, 1430, 1660, 470, 2045, 597, 1636, 29889, 18713, 29889, 990, 29914, 506, 11259, 29914, 29887, 572, 29899, 29941, 29889, 29900, 29889, 3945, 29897, 13, 13, 28665, 5005, 3919, 8098, 353, 364, 15945, 29908, 13, 5634, 13, 5453, 29901, 3564, 29918, 10141, 13, 12759, 29918, 8216, 29901, 18981, 3883, 363, 8527, 21830, 13, 8216, 29901, 13, 29899, 2315, 482, 6931, 1653, 29892, 2767, 322, 5217, 310, 278, 6503, 8527, 21830, 29889, 13, 3259, 29918, 23959, 29901, 525, 29896, 29889, 29900, 29889, 29900, 29915, 13, 8921, 29901, 529, 5813, 29958, 20164, 945, 314, 1066, 29897, 13, 6768, 29901, 13, 29871, 8527, 11501, 4782, 1293, 29901, 13, 1678, 6139, 29901, 2391, 310, 8527, 21830, 6431, 2983, 363, 445, 2943, 29889, 13, 1678, 3161, 29901, 851, 13, 1678, 1134, 29901, 1051, 13, 29871, 8527, 11501, 5690, 1293, 29901, 13, 1678, 6139, 29901, 2391, 310, 5641, 3323, 1212, 29879, 363, 445, 2943, 29889, 13, 1678, 1014, 6768, 29901, 13, 418, 679, 29902, 29886, 7328, 1252, 2325, 29901, 13, 4706, 6139, 29901, 739, 508, 367, 2845, 2323, 5641, 3211, 470, 5641, 3464, 3211, 29889, 13, 4706, 1134, 29901, 851, 13, 418, 10377, 7328, 29901, 13, 4706, 6139, 29901, 8527, 21830, 29915, 29879, 10377, 7328, 29889, 13, 4706, 1134, 29901, 851, 13, 418, 11105, 29901, 13, 4706, 6139, 29901, 8527, 21830, 29915, 29879, 11105, 29889, 13, 4706, 1134, 29901, 938, 13, 1678, 1134, 29901, 1051, 13, 29871, 10760, 9585, 29901, 13, 1678, 6139, 29901, 8527, 21830, 29915, 29879, 10760, 9585, 29889, 13, 1678, 1014, 6768, 29901, 13, 418, 11636, 3137, 19347, 29901, 13, 4706, 6139, 29901, 910, 995, 24555, 778, 671, 310, 11636, 3137, 29889, 13, 4706, 1134, 29901, 6120, 13, 418, 9025, 2558, 29956, 2390, 29901, 13, 4706, 6139, 29901, 1174, 519, 2558, 29956, 2390, 7353, 29889, 13, 4706, 1134, 29901, 6120, 13, 418, 9025, 15329, 28459, 29901, 13, 4706, 6139, 29901, 1174, 519, 15329, 28459, 7353, 29889, 13, 4706, 1134, 29901, 6120, 13, 418, 9615, 29901, 13, 4706, 6139, 29901, 1174, 3606, 7353, 29889, 13, 4706, 1134, 29901, 6120, 13, 418, 1820, 8566, 14272, 2558, 29901, 13, 4706, 6139, 29901, 8527, 21830, 29915, 29879, 1820, 8566, 14272, 2558, 29889, 13, 4706, 1134, 29901, 851, 13, 418, 1820, 4290, 5809, 29901, 13, 4706, 6139, 29901, 2178, 20937, 1819, 448, 27196, 29892, 448, 379, 5746, 29909, 2287, 29907, 2260, 29931, 29889, 13, 4706, 1134, 29901, 851, 13, 418, 2643, 6444, 4173, 1061, 3399, 2558, 29901, 13, 4706, 6139, 29901, 8527, 21830, 29915, 29879, 2643, 6444, 4173, 1061, 3399, 2558, 29889, 13, 4706, 1134, 29901, 851, 13, 418, 3564, 17830, 29901, 13, 4706, 6139, 29901, 2178, 20937, 1819, 448, 390, 3035, 29902, 3308, 29892, 448, 323, 2477, 2477, 29903, 29918, 7390, 3308, 29889, 13, 4706, 1134, 29901, 851, 13, 418, 11855, 21741, 28459, 29901, 13, 4706, 6139, 29901, 8527, 21830, 29915, 29879, 11855, 21741, 28459, 29889, 13, 4706, 1134, 29901, 851, 13, 418, 1473, 20494, 21741, 28459, 29901, 13, 4706, 6139, 29901, 8527, 21830, 29915, 29879, 1473, 20494, 21741, 28459, 29889, 13, 4706, 1134, 29901, 851, 13, 1678, 1134, 29901, 9657, 13, 29871, 1302, 29874, 2290, 29901, 13, 1678, 6139, 29901, 8527, 21830, 29915, 29879, 1302, 29874, 2290, 29889, 13, 1678, 1134, 29901, 938, 13, 29871, 6139, 29901, 13, 1678, 6139, 29901, 8527, 21830, 29915, 29879, 6139, 29889, 13, 1678, 1134, 29901, 851, 13, 29871, 11636, 3137, 29928, 1983, 1170, 29901, 13, 1678, 6139, 29901, 910, 995, 338, 1304, 304, 11539, 278, 3132, 10110, 11122, 297, 278, 1060, 29889, 29945, 29900, 29929, 13, 418, 390, 3035, 29902, 3308, 29914, 12972, 8547, 3132, 12289, 29889, 13, 1678, 1134, 29901, 851, 13, 29871, 1178, 29901, 13, 1678, 6139, 29901, 8527, 21830, 29915, 29879, 1178, 29889, 13, 1678, 1134, 29901, 851, 13, 29871, 1904, 1170, 29901, 13, 1678, 6139, 29901, 8527, 21830, 29915, 29879, 1904, 1170, 29889, 13, 1678, 1134, 29901, 851, 13, 29871, 1024, 29901, 13, 1678, 6139, 29901, 8527, 21830, 29915, 29879, 1024, 29889, 13, 1678, 1134, 29901, 851, 13, 29871, 8722, 1170, 29901, 13, 1678, 6139, 29901, 8527, 21830, 29915, 29879, 8722, 1170, 29889, 13, 1678, 1134, 29901, 851, 13, 29871, 5807, 29885, 567, 7409, 29901, 13, 1678, 6139, 29901, 8527, 21830, 29915, 29879, 5807, 29885, 567, 7409, 29889, 13, 1678, 1014, 6768, 29901, 13, 418, 1544, 29911, 2390, 3010, 29901, 13, 4706, 6139, 29901, 6645, 29911, 2390, 3010, 7353, 29889, 13, 4706, 1134, 29901, 6120, 13, 418, 5825, 29911, 2390, 3010, 29901, 13, 4706, 6139, 29901, 4326, 29911, 2390, 3010, 7353, 29889, 13, 4706, 1134, 29901, 6120, 13, 418, 3978, 1218, 15644, 13779, 4247, 29901, 13, 4706, 6139, 29901, 8527, 21830, 29915, 29879, 3978, 1218, 15644, 13779, 4247, 29889, 13, 4706, 1134, 29901, 851, 13, 418, 1248, 1847, 12506, 29901, 13, 4706, 6139, 29901, 8527, 21830, 29915, 29879, 1248, 1847, 12506, 29889, 13, 4706, 1134, 29901, 938, 13, 418, 696, 5261, 6997, 29901, 13, 4706, 6139, 29901, 8527, 21830, 29915, 29879, 696, 5261, 6997, 29889, 13, 4706, 1134, 29901, 851, 13, 418, 1873, 29901, 13, 4706, 6139, 29901, 8527, 21830, 29915, 29879, 1873, 29889, 13, 4706, 1134, 29901, 851, 13, 1678, 1134, 29901, 9657, 13, 29871, 7047, 6594, 29901, 13, 1678, 6139, 29901, 8527, 21830, 29915, 29879, 7047, 6594, 29889, 13, 1678, 1134, 29901, 851, 13, 29871, 260, 562, 16815, 9585, 29901, 13, 1678, 6139, 29901, 8527, 21830, 29915, 29879, 260, 562, 16815, 9585, 29889, 13, 1678, 1014, 6768, 29901, 13, 418, 4511, 6818, 5856, 29901, 13, 4706, 6139, 29901, 2178, 20937, 1819, 448, 438, 4198, 29892, 448, 6732, 29918, 1307, 29954, 2477, 29979, 29892, 448, 6732, 29918, 29928, 4717, 7818, 29918, 21514, 5265, 13566, 29889, 13, 4706, 1134, 29901, 851, 13, 418, 7258, 28459, 29901, 13, 4706, 6139, 29901, 8527, 21830, 29915, 29879, 7258, 28459, 29889, 13, 4706, 1134, 29901, 851, 13, 1678, 1134, 29901, 9657, 13, 29871, 9311, 3471, 11027, 29901, 13, 1678, 6139, 29901, 8527, 21830, 29915, 29879, 9311, 3471, 11027, 29889, 13, 1678, 1014, 6768, 29901, 13, 418, 4742, 16746, 9585, 29901, 13, 4706, 6139, 29901, 8527, 21830, 29915, 29879, 4742, 16746, 9585, 29889, 13, 4706, 1014, 6768, 29901, 13, 3986, 269, 3249, 11501, 1204, 29901, 13, 9651, 6139, 29901, 8527, 21830, 29915, 29879, 269, 3249, 11501, 1204, 29889, 13, 9651, 1134, 29901, 851, 13, 3986, 269, 3249, 11501, 10048, 29901, 13, 9651, 6139, 29901, 8527, 21830, 29915, 29879, 269, 3249, 11501, 10048, 29889, 13, 9651, 1134, 29901, 851, 13, 4706, 1134, 29901, 9657, 13, 418, 4742, 8614, 8498, 22812, 29901, 13, 4706, 6139, 29901, 8527, 21830, 29915, 29879, 4742, 8614, 8498, 22812, 29889, 13, 4706, 1014, 6768, 29901, 13, 3986, 9025, 6818, 10048, 29901, 13, 9651, 6139, 29901, 8527, 21830, 29915, 29879, 9025, 6818, 10048, 29889, 13, 9651, 1134, 29901, 851, 13, 3986, 2279, 6818, 10048, 29901, 13, 9651, 6139, 29901, 8527, 21830, 29915, 29879, 2279, 6818, 10048, 29889, 13, 9651, 1134, 29901, 851, 13, 3986, 2279, 6818, 20249, 29901, 13, 9651, 6139, 29901, 8527, 21830, 29915, 29879, 2279, 6818, 20249, 29889, 13, 9651, 1134, 29901, 851, 13, 3986, 3160, 10401, 8498, 2376, 292, 29903, 23799, 3373, 15190, 29901, 13, 9651, 6139, 29901, 512, 2325, 10401, 8498, 2376, 292, 29903, 23799, 3373, 15190, 7353, 29889, 13, 9651, 1134, 29901, 6120, 13, 4706, 1134, 29901, 9657, 13, 418, 5503, 1204, 14039, 29901, 13, 4706, 6139, 29901, 349, 1878, 1204, 14039, 7353, 29889, 13, 4706, 1134, 29901, 6120, 13, 418, 269, 3249, 12958, 2855, 3373, 15190, 29901, 13, 4706, 6139, 29901, 8527, 21830, 29915, 29879, 269, 3249, 12958, 2855, 3373, 15190, 29889, 13, 4706, 1014, 6768, 29901, 13, 3986, 1302, 29874, 4435, 8514, 29901, 13, 9651, 6139, 29901, 8527, 21830, 29915, 29879, 1302, 29874, 4435, 8514, 29889, 13, 9651, 1134, 29901, 851, 13, 3986, 1623, 433, 397, 18649, 1469, 26526, 29990, 27535, 29901, 13, 9651, 6139, 29901, 8527, 21830, 29915, 29879, 1623, 433, 397, 18649, 1469, 26526, 29990, 27535, 29889, 13, 9651, 1134, 29901, 938, 13, 3986, 1623, 433, 397, 15666, 261, 25471, 15644, 26526, 29990, 27535, 29901, 13, 9651, 6139, 29901, 8527, 21830, 29915, 29879, 1623, 433, 397, 15666, 261, 25471, 15644, 26526, 29990, 27535, 29889, 13, 9651, 1134, 29901, 938, 13, 3986, 5142, 26016, 2477, 29931, 1293, 29879, 26526, 29990, 27535, 29901, 13, 9651, 6139, 29901, 8527, 21830, 29915, 29879, 5142, 26016, 2477, 29931, 1293, 29879, 26526, 29990, 27535, 29889, 13, 9651, 1134, 29901, 938, 13, 3986, 916, 29903, 12739, 16618, 1575, 1762, 2308, 504, 4013, 11501, 29901, 13, 9651, 6139, 29901, 5901, 29903, 12739, 16618, 1575, 1762, 2308, 504, 4013, 11501, 7353, 29889, 13, 9651, 1134, 29901, 6120, 13, 3986, 337, 16746, 26526, 29990, 27535, 29901, 13, 9651, 6139, 29901, 8527, 21830, 29915, 29879, 337, 16746, 26526, 29990, 27535, 29889, 13, 9651, 1134, 29901, 938, 13, 3986, 3638, 8614, 1762, 11501, 29901, 13, 9651, 6139, 29901, 15076, 8614, 1762, 11501, 7353, 29889, 13, 9651, 1134, 29901, 6120, 13, 3986, 3638, 8614, 1762, 11501, 15156, 29901, 13, 9651, 6139, 29901, 2178, 20937, 1819, 448, 12524, 6181, 29918, 3308, 4214, 29918, 3217, 29909, 29892, 448, 12524, 6181, 29918, 3308, 4214, 29918, 27205, 29892, 448, 28657, 6181, 29918, 9818, 29889, 13, 9651, 1134, 29901, 851, 13, 4706, 1134, 29901, 9657, 13, 1678, 1134, 29901, 9657, 13, 12277, 1860, 29901, 13, 29899, 274, 275, 1111, 4637, 8181, 13, 4149, 15189, 29901, 13, 29937, 12105, 491, 4685, 6503, 13, 29899, 1024, 29901, 8527, 21830, 3407, 13, 29871, 6139, 29901, 25034, 3407, 310, 278, 8527, 21830, 1203, 1904, 29889, 13, 29871, 1544, 29901, 2045, 597, 3476, 1111, 4637, 8181, 29889, 949, 386, 287, 12332, 29889, 601, 29914, 264, 29914, 12333, 29914, 2754, 29914, 2754, 29889, 1420, 29937, 29894, 29941, 29899, 29900, 29899, 29900, 29899, 7727, 13, 15945, 29908, 13, 13, 5746, 19297, 17101, 353, 364, 15945, 29908, 13, 29899, 1024, 29901, 10318, 491, 1024, 13, 29871, 274, 275, 1111, 29889, 895, 29889, 11618, 29918, 10141, 29901, 13, 1678, 338, 29872, 29918, 28988, 29901, 376, 6224, 895, 29918, 28988, 930, 29908, 13, 1678, 338, 29872, 29918, 6786, 29901, 376, 6224, 895, 29918, 6786, 930, 29908, 13, 1678, 338, 29872, 29918, 5630, 29901, 376, 6224, 29966, 25711, 17013, 29958, 930, 29908, 13, 1678, 338, 29872, 29918, 27902, 29901, 376, 6224, 895, 29918, 27902, 930, 29908, 13, 1678, 2106, 29901, 2198, 13, 1678, 8527, 11501, 4782, 1293, 29901, 13, 1678, 448, 1347, 13, 1678, 8527, 11501, 5690, 1293, 29901, 13, 1678, 448, 679, 29902, 29886, 7328, 1252, 2325, 29901, 1347, 13, 418, 10377, 7328, 29901, 1347, 13, 418, 11105, 29901, 29871, 29900, 13, 1678, 10760, 9585, 29901, 13, 418, 11636, 3137, 19347, 29901, 1565, 13, 418, 9025, 2558, 29956, 2390, 29901, 1565, 13, 418, 9025, 15329, 28459, 29901, 1565, 13, 418, 9615, 29901, 1565, 13, 418, 1820, 8566, 14272, 2558, 29901, 1347, 13, 418, 1820, 4290, 5809, 29901, 1347, 13, 418, 2643, 6444, 4173, 1061, 3399, 2558, 29901, 1347, 13, 418, 3564, 17830, 29901, 1347, 13, 418, 11855, 21741, 28459, 29901, 1347, 13, 418, 1473, 20494, 21741, 28459, 29901, 1347, 13, 1678, 1302, 29874, 2290, 29901, 29871, 29900, 13, 1678, 6139, 29901, 1347, 13, 1678, 11636, 3137, 29928, 1983, 1170, 29901, 1347, 13, 1678, 1178, 29901, 1347, 13, 1678, 1904, 1170, 29901, 1347, 13, 1678, 1024, 29901, 1347, 13, 1678, 8722, 1170, 29901, 1347, 13, 1678, 5807, 29885, 567, 7409, 29901, 13, 418, 1544, 29911, 2390, 3010, 29901, 1565, 13, 418, 5825, 29911, 2390, 3010, 29901, 1565, 13, 418, 3978, 1218, 15644, 13779, 4247, 29901, 1347, 13, 418, 1248, 1847, 12506, 29901, 29871, 29900, 13, 418, 696, 5261, 6997, 29901, 1347, 13, 418, 1873, 29901, 1347, 13, 1678, 7047, 6594, 29901, 1347, 13, 1678, 260, 562, 16815, 9585, 29901, 13, 418, 4511, 6818, 5856, 29901, 1347, 13, 418, 7258, 28459, 29901, 1347, 13, 1678, 9311, 3471, 11027, 29901, 13, 418, 4742, 16746, 9585, 29901, 13, 4706, 269, 3249, 11501, 1204, 29901, 1347, 13, 4706, 269, 3249, 11501, 10048, 29901, 1347, 13, 418, 4742, 8614, 8498, 22812, 29901, 13, 4706, 9025, 6818, 10048, 29901, 1347, 13, 4706, 2279, 6818, 10048, 29901, 1347, 13, 4706, 2279, 6818, 20249, 29901, 1347, 13, 4706, 3160, 10401, 8498, 2376, 292, 29903, 23799, 3373, 15190, 29901, 1565, 13, 418, 5503, 1204, 14039, 29901, 1565, 13, 418, 269, 3249, 12958, 2855, 3373, 15190, 29901, 13, 4706, 1302, 29874, 4435, 8514, 29901, 1347, 13, 4706, 1623, 433, 397, 18649, 1469, 26526, 29990, 27535, 29901, 29871, 29900, 13, 4706, 1623, 433, 397, 15666, 261, 25471, 15644, 26526, 29990, 27535, 29901, 29871, 29900, 13, 4706, 5142, 26016, 2477, 29931, 1293, 29879, 26526, 29990, 27535, 29901, 29871, 29900, 13, 4706, 916, 29903, 12739, 16618, 1575, 1762, 2308, 504, 4013, 11501, 29901, 1565, 13, 4706, 337, 16746, 26526, 29990, 27535, 29901, 29871, 29900, 13, 4706, 3638, 8614, 1762, 11501, 29901, 1565, 13, 4706, 3638, 8614, 1762, 11501, 15156, 29901, 1347, 13, 13, 29899, 1024, 29901, 21267, 491, 1024, 13, 29871, 274, 275, 1111, 29889, 895, 29889, 11618, 29918, 10141, 29901, 13, 1678, 338, 29872, 29918, 28988, 29901, 376, 6224, 895, 29918, 28988, 930, 29908, 13, 1678, 338, 29872, 29918, 6786, 29901, 376, 6224, 895, 29918, 6786, 930, 29908, 13, 1678, 338, 29872, 29918, 5630, 29901, 376, 6224, 29966, 25711, 17013, 29958, 930, 29908, 13, 1678, 338, 29872, 29918, 27902, 29901, 376, 6224, 895, 29918, 27902, 930, 29908, 13, 1678, 2106, 29901, 29207, 13, 1678, 1024, 29901, 1347, 13, 13, 29899, 1024, 29901, 10318, 491, 1178, 13, 29871, 274, 275, 1111, 29889, 895, 29889, 11618, 29918, 10141, 29901, 13, 1678, 338, 29872, 29918, 28988, 29901, 376, 6224, 895, 29918, 28988, 930, 29908, 13, 1678, 338, 29872, 29918, 6786, 29901, 376, 6224, 895, 29918, 6786, 930, 29908, 13, 1678, 338, 29872, 29918, 5630, 29901, 376, 6224, 29966, 25711, 17013, 29958, 930, 29908, 13, 1678, 338, 29872, 29918, 27902, 29901, 376, 6224, 895, 29918, 27902, 930, 29908, 13, 1678, 2106, 29901, 2198, 13, 1678, 8527, 11501, 4782, 1293, 29901, 13, 1678, 448, 1347, 13, 1678, 8527, 11501, 5690, 1293, 29901, 13, 1678, 448, 679, 29902, 29886, 7328, 1252, 2325, 29901, 1347, 13, 418, 10377, 7328, 29901, 1347, 13, 418, 11105, 29901, 29871, 29900, 13, 1678, 10760, 9585, 29901, 13, 418, 11636, 3137, 19347, 29901, 1565, 13, 418, 9025, 2558, 29956, 2390, 29901, 1565, 13, 418, 9025, 15329, 28459, 29901, 1565, 13, 418, 9615, 29901, 1565, 13, 418, 1820, 8566, 14272, 2558, 29901, 1347, 13, 418, 1820, 4290, 5809, 29901, 1347, 13, 418, 2643, 6444, 4173, 1061, 3399, 2558, 29901, 1347, 13, 418, 3564, 17830, 29901, 1347, 13, 418, 11855, 21741, 28459, 29901, 1347, 13, 418, 1473, 20494, 21741, 28459, 29901, 1347, 13, 1678, 1302, 29874, 2290, 29901, 29871, 29900, 13, 1678, 6139, 29901, 1347, 13, 1678, 11636, 3137, 29928, 1983, 1170, 29901, 1347, 13, 1678, 1178, 29901, 1347, 13, 1678, 1904, 1170, 29901, 1347, 13, 1678, 1024, 29901, 1347, 13, 1678, 8722, 1170, 29901, 1347, 13, 1678, 5807, 29885, 567, 7409, 29901, 13, 418, 1544, 29911, 2390, 3010, 29901, 1565, 13, 418, 5825, 29911, 2390, 3010, 29901, 1565, 13, 418, 3978, 1218, 15644, 13779, 4247, 29901, 1347, 13, 418, 1248, 1847, 12506, 29901, 29871, 29900, 13, 418, 696, 5261, 6997, 29901, 1347, 13, 418, 1873, 29901, 1347, 13, 1678, 7047, 6594, 29901, 1347, 13, 1678, 260, 562, 16815, 9585, 29901, 13, 418, 4511, 6818, 5856, 29901, 1347, 13, 418, 7258, 28459, 29901, 1347, 13, 1678, 9311, 3471, 11027, 29901, 13, 418, 4742, 16746, 9585, 29901, 13, 4706, 269, 3249, 11501, 1204, 29901, 1347, 13, 4706, 269, 3249, 11501, 10048, 29901, 1347, 13, 418, 4742, 8614, 8498, 22812, 29901, 13, 4706, 9025, 6818, 10048, 29901, 1347, 13, 4706, 2279, 6818, 10048, 29901, 1347, 13, 4706, 2279, 6818, 20249, 29901, 1347, 13, 4706, 3160, 10401, 8498, 2376, 292, 29903, 23799, 3373, 15190, 29901, 1565, 13, 418, 5503, 1204, 14039, 29901, 1565, 13, 418, 269, 3249, 12958, 2855, 3373, 15190, 29901, 13, 4706, 1302, 29874, 4435, 8514, 29901, 1347, 13, 4706, 1623, 433, 397, 18649, 1469, 26526, 29990, 27535, 29901, 29871, 29900, 13, 4706, 1623, 433, 397, 15666, 261, 25471, 15644, 26526, 29990, 27535, 29901, 29871, 29900, 13, 4706, 5142, 26016, 2477, 29931, 1293, 29879, 26526, 29990, 27535, 29901, 29871, 29900, 13, 4706, 916, 29903, 12739, 16618, 1575, 1762, 2308, 504, 4013, 11501, 29901, 1565, 13, 4706, 337, 16746, 26526, 29990, 27535, 29901, 29871, 29900, 13, 4706, 3638, 8614, 1762, 11501, 29901, 1565, 13, 4706, 3638, 8614, 1762, 11501, 15156, 29901, 1347, 13, 13, 29899, 1024, 29901, 21267, 491, 1178, 13, 29871, 274, 275, 1111, 29889, 895, 29889, 11618, 29918, 10141, 29901, 13, 1678, 338, 29872, 29918, 28988, 29901, 376, 6224, 895, 29918, 28988, 930, 29908, 13, 1678, 338, 29872, 29918, 6786, 29901, 376, 6224, 895, 29918, 6786, 930, 29908, 13, 1678, 338, 29872, 29918, 5630, 29901, 376, 6224, 29966, 25711, 17013, 29958, 930, 29908, 13, 1678, 338, 29872, 29918, 27902, 29901, 376, 6224, 895, 29918, 27902, 930, 29908, 13, 1678, 2106, 29901, 29207, 13, 1678, 1178, 29901, 1347, 13, 13, 29899, 1024, 29901, 6204, 13, 29871, 274, 275, 1111, 29889, 895, 29889, 11618, 29918, 10141, 29901, 13, 1678, 338, 29872, 29918, 28988, 29901, 376, 6224, 895, 29918, 28988, 930, 29908, 13, 1678, 338, 29872, 29918, 6786, 29901, 376, 6224, 895, 29918, 6786, 930, 29908, 13, 1678, 338, 29872, 29918, 5630, 29901, 376, 6224, 29966, 25711, 17013, 29958, 930, 29908, 13, 1678, 338, 29872, 29918, 27902, 29901, 376, 6224, 895, 29918, 27902, 930, 29908, 13, 1678, 2106, 29901, 2198, 13, 1678, 8527, 11501, 4782, 1293, 29901, 13, 1678, 448, 1347, 13, 1678, 8527, 11501, 5690, 1293, 29901, 13, 1678, 448, 679, 29902, 29886, 7328, 1252, 2325, 29901, 1347, 13, 418, 10377, 7328, 29901, 1347, 13, 418, 11105, 29901, 29871, 29900, 13, 1678, 10760, 9585, 29901, 13, 418, 11636, 3137, 19347, 29901, 1565, 13, 418, 9025, 2558, 29956, 2390, 29901, 1565, 13, 418, 9025, 15329, 28459, 29901, 1565, 13, 418, 9615, 29901, 1565, 13, 418, 1820, 8566, 14272, 2558, 29901, 1347, 13, 418, 1820, 4290, 5809, 29901, 1347, 13, 418, 2643, 6444, 4173, 1061, 3399, 2558, 29901, 1347, 13, 418, 3564, 17830, 29901, 1347, 13, 418, 11855, 21741, 28459, 29901, 1347, 13, 418, 1473, 20494, 21741, 28459, 29901, 1347, 13, 1678, 1302, 29874, 2290, 29901, 29871, 29900, 13, 1678, 6139, 29901, 1347, 13, 1678, 11636, 3137, 29928, 1983, 1170, 29901, 1347, 13, 1678, 1904, 1170, 29901, 1347, 13, 1678, 1024, 29901, 1347, 13, 1678, 8722, 1170, 29901, 1347, 13, 1678, 5807, 29885, 567, 7409, 29901, 13, 418, 1544, 29911, 2390, 3010, 29901, 1565, 13, 418, 5825, 29911, 2390, 3010, 29901, 1565, 13, 418, 3978, 1218, 15644, 13779, 4247, 29901, 1347, 13, 418, 1248, 1847, 12506, 29901, 29871, 29900, 13, 418, 696, 5261, 6997, 29901, 1347, 13, 418, 1873, 29901, 1347, 13, 1678, 7047, 6594, 29901, 1347, 13, 1678, 260, 562, 16815, 9585, 29901, 13, 418, 4511, 6818, 5856, 29901, 1347, 13, 418, 7258, 28459, 29901, 1347, 13, 1678, 9311, 3471, 11027, 29901, 13, 418, 4742, 16746, 9585, 29901, 13, 4706, 269, 3249, 11501, 1204, 29901, 1347, 13, 4706, 269, 3249, 11501, 10048, 29901, 1347, 13, 418, 4742, 8614, 8498, 22812, 29901, 13, 4706, 9025, 6818, 10048, 29901, 1347, 13, 4706, 2279, 6818, 10048, 29901, 1347, 13, 4706, 2279, 6818, 20249, 29901, 1347, 13, 4706, 3160, 10401, 8498, 2376, 292, 29903, 23799, 3373, 15190, 29901, 1565, 13, 418, 5503, 1204, 14039, 29901, 1565, 13, 418, 269, 3249, 12958, 2855, 3373, 15190, 29901, 13, 4706, 1302, 29874, 4435, 8514, 29901, 1347, 13, 4706, 1623, 433, 397, 18649, 1469, 26526, 29990, 27535, 29901, 29871, 29900, 13, 4706, 1623, 433, 397, 15666, 261, 25471, 15644, 26526, 29990, 27535, 29901, 29871, 29900, 13, 4706, 5142, 26016, 2477, 29931, 1293, 29879, 26526, 29990, 27535, 29901, 29871, 29900, 13, 4706, 916, 29903, 12739, 16618, 1575, 1762, 2308, 504, 4013, 11501, 29901, 1565, 13, 4706, 337, 16746, 26526, 29990, 27535, 29901, 29871, 29900, 13, 4706, 3638, 8614, 1762, 11501, 29901, 1565, 13, 4706, 3638, 8614, 1762, 11501, 15156, 29901, 1347, 13, 13, 15945, 29908, 13, 13, 1525, 29911, 24015, 353, 364, 15945, 29908, 13, 895, 29918, 5327, 29901, 13, 29871, 6139, 29901, 319, 8600, 470, 1051, 411, 278, 2933, 4133, 491, 278, 315, 275, 1111, 306, 1660, 5132, 12967, 13, 29871, 4133, 29901, 2337, 13, 29871, 1134, 29901, 9657, 13, 29871, 4559, 29901, 1405, 13, 1678, 426, 13, 418, 376, 29248, 14256, 1293, 1115, 426, 13, 4706, 376, 21402, 3073, 1115, 426, 13, 3986, 376, 2671, 1115, 376, 1807, 613, 13, 3986, 376, 1025, 1917, 1115, 376, 1807, 613, 13, 3986, 376, 1482, 1917, 1115, 376, 1807, 29908, 13, 4706, 2981, 13, 4706, 376, 2671, 1115, 376, 1807, 613, 13, 4706, 376, 1025, 1917, 1115, 376, 1807, 613, 13, 4706, 376, 1482, 1917, 1115, 376, 1807, 29908, 13, 418, 500, 13, 1678, 500, 13, 15945, 29908, 13, 2 ]
Tools/HTML/LIMEHTMLBuilder.py
bio-hpc/sibila
1
122094
<reponame>bio-hpc/sibila #!/usr/bin/env python # -*- coding: utf-8 -*- """ LIMEHTMLBuilder.py: Build a single HTML file with all the LIME plots. """ __author__ = "<NAME>" __version__ = "1.0" __maintainer__ = "Antonio" __email__ = "<EMAIL>" __status__ = "Production" import bs4 import html class LIMEHTMLBuilder(): def __init__(self): self.html = '<html>\n<meta http-equiv="content-type" content="text/html; charset=utf-8">\n' self.header_exists = False self.body_exists = False self.parser = None def append(self, html, sample_id=None): self.parser = bs4.BeautifulSoup(html, 'html.parser') if not self.header_exists: self.add_code('<head>' + self.get_content('head') + '</head>') self.header_exists = True if not self.body_exists: self.html += '<body>' self.body_exists = True if sample_id is not None: self.add_code('Sample #{}'.format(sample_id)) self.add_code(self.get_content('body')) def add_code(self, html): self.html += '\n' + html def close(self): if self.body_exists: self.html += '\n</body>' self.html += '\n</html>' def get(self): return self.html def get_content(self, tag): return '\n'.join(list(map(str, self.parser.find(tag).contents)))
[ 1, 529, 276, 1112, 420, 29958, 24840, 29899, 29882, 6739, 29914, 29879, 747, 4233, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 15945, 29908, 13, 1678, 365, 8890, 7020, 5627, 29889, 2272, 29901, 13, 1678, 8878, 263, 2323, 4544, 934, 411, 599, 278, 365, 8890, 24580, 29889, 13, 15945, 29908, 13, 1649, 8921, 1649, 353, 9872, 5813, 11903, 13, 1649, 3259, 1649, 353, 376, 29896, 29889, 29900, 29908, 13, 1649, 29885, 2365, 4008, 1649, 353, 376, 13448, 14642, 29908, 13, 1649, 5269, 1649, 353, 9872, 26862, 6227, 11903, 13, 1649, 4882, 1649, 353, 376, 23665, 428, 29908, 13, 13, 5215, 24512, 29946, 13, 5215, 3472, 13, 13, 1990, 365, 8890, 7020, 5627, 7295, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 1125, 13, 4706, 1583, 29889, 1420, 353, 12801, 1420, 14247, 29876, 29966, 7299, 1732, 29899, 9402, 543, 3051, 29899, 1853, 29908, 2793, 543, 726, 29914, 1420, 29936, 17425, 29922, 9420, 29899, 29947, 1013, 29905, 29876, 29915, 13, 4706, 1583, 29889, 6672, 29918, 9933, 353, 7700, 13, 4706, 1583, 29889, 2587, 29918, 9933, 353, 7700, 13, 4706, 1583, 29889, 16680, 353, 6213, 13, 13, 1678, 822, 9773, 29898, 1311, 29892, 3472, 29892, 4559, 29918, 333, 29922, 8516, 1125, 13, 4706, 1583, 29889, 16680, 353, 24512, 29946, 29889, 3629, 1300, 6845, 29903, 1132, 29898, 1420, 29892, 525, 1420, 29889, 16680, 1495, 13, 4706, 565, 451, 1583, 29889, 6672, 29918, 9933, 29901, 13, 9651, 1583, 29889, 1202, 29918, 401, 877, 29966, 2813, 16299, 718, 1583, 29889, 657, 29918, 3051, 877, 2813, 1495, 718, 525, 829, 2813, 29958, 1495, 13, 9651, 1583, 29889, 6672, 29918, 9933, 353, 5852, 13, 13, 4706, 565, 451, 1583, 29889, 2587, 29918, 9933, 29901, 13, 9651, 1583, 29889, 1420, 4619, 12801, 2587, 16299, 13, 9651, 1583, 29889, 2587, 29918, 9933, 353, 5852, 13, 13, 4706, 565, 4559, 29918, 333, 338, 451, 6213, 29901, 13, 9651, 1583, 29889, 1202, 29918, 401, 877, 17708, 396, 8875, 4286, 4830, 29898, 11249, 29918, 333, 876, 13, 13, 4706, 1583, 29889, 1202, 29918, 401, 29898, 1311, 29889, 657, 29918, 3051, 877, 2587, 8785, 13, 13, 1678, 822, 788, 29918, 401, 29898, 1311, 29892, 3472, 1125, 13, 4706, 1583, 29889, 1420, 4619, 11297, 29876, 29915, 718, 3472, 13, 13, 1678, 822, 3802, 29898, 1311, 1125, 13, 4706, 565, 1583, 29889, 2587, 29918, 9933, 29901, 13, 9651, 1583, 29889, 1420, 4619, 11297, 29876, 829, 2587, 16299, 13, 4706, 1583, 29889, 1420, 4619, 11297, 29876, 829, 1420, 16299, 13, 13, 1678, 822, 679, 29898, 1311, 1125, 13, 4706, 736, 1583, 29889, 1420, 13, 13, 1678, 822, 679, 29918, 3051, 29898, 1311, 29892, 4055, 1125, 13, 4706, 736, 11297, 29876, 4286, 7122, 29898, 1761, 29898, 1958, 29898, 710, 29892, 1583, 29889, 16680, 29889, 2886, 29898, 4039, 467, 10853, 4961, 13, 2 ]
validated/migrations/0004_auto_20191118_1323.py
andrewbird2/validated
0
1605045
<reponame>andrewbird2/validated # Generated by Django 2.2.7 on 2019-11-18 19:23 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('validated', '0003_auto_20191118_1245'), ] operations = [ migrations.AlterField( model_name='testresult', name='message', field=models.CharField(max_length=500), ), migrations.AlterField( model_name='testresult', name='test_method', field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='test_results', to='validated.TestMethod'), ), ]
[ 1, 529, 276, 1112, 420, 29958, 392, 3973, 18513, 29906, 29914, 3084, 630, 13, 29937, 3251, 630, 491, 15337, 29871, 29906, 29889, 29906, 29889, 29955, 373, 29871, 29906, 29900, 29896, 29929, 29899, 29896, 29896, 29899, 29896, 29947, 29871, 29896, 29929, 29901, 29906, 29941, 13, 13, 3166, 9557, 29889, 2585, 1053, 9725, 800, 29892, 4733, 13, 5215, 9557, 29889, 2585, 29889, 9794, 29889, 311, 1026, 291, 13, 13, 13, 1990, 341, 16783, 29898, 26983, 800, 29889, 29924, 16783, 1125, 13, 13, 1678, 9962, 353, 518, 13, 4706, 6702, 3084, 630, 742, 525, 29900, 29900, 29900, 29941, 29918, 6921, 29918, 29906, 29900, 29896, 29929, 29896, 29896, 29896, 29947, 29918, 29896, 29906, 29946, 29945, 5477, 13, 1678, 4514, 13, 13, 1678, 6931, 353, 518, 13, 4706, 9725, 800, 29889, 2499, 357, 3073, 29898, 13, 9651, 1904, 29918, 978, 2433, 1688, 2914, 742, 13, 9651, 1024, 2433, 4906, 742, 13, 9651, 1746, 29922, 9794, 29889, 27890, 29898, 3317, 29918, 2848, 29922, 29945, 29900, 29900, 511, 13, 4706, 10353, 13, 4706, 9725, 800, 29889, 2499, 357, 3073, 29898, 13, 9651, 1904, 29918, 978, 2433, 1688, 2914, 742, 13, 9651, 1024, 2433, 1688, 29918, 5696, 742, 13, 9651, 1746, 29922, 9794, 29889, 27755, 2558, 29898, 265, 29918, 8143, 29922, 14095, 29889, 2585, 29889, 9794, 29889, 311, 1026, 291, 29889, 29907, 3289, 5454, 2287, 29892, 4475, 29918, 978, 2433, 1688, 29918, 9902, 742, 304, 2433, 3084, 630, 29889, 3057, 4062, 5477, 13, 4706, 10353, 13, 1678, 4514, 13, 2 ]
utility_fun.py
Avijit20/Deep-Learning-Flower-Image-Classification-Using-PyTorch
0
194200
import numpy as np import pandas as pd import torch import torchvision import torch.nn.functional as F from torchvision import datasets,transforms,models import matplotlib.pyplot as plt #from train import get_pretrained_model from torch import nn,optim from PIL import Image #%matplotlib inline def load_dataset(data_direc): data_dir = data_direc train_dir = data_dir + '/train' valid_dir = data_dir + '/valid' test_dir = data_dir + '/test' train_transforms = transforms.Compose([transforms.RandomRotation(30), transforms.RandomResizedCrop(224), transforms.RandomHorizontalFlip(), transforms.ToTensor(), transforms.Normalize([0.485, 0.456, 0.406], [0.229, 0.224, 0.225])]) valid_transforms=transforms.Compose([transforms.Resize(255), transforms.CenterCrop(224), transforms.ToTensor(), transforms.Normalize([0.485,0.456,0.406], [0.229,0.224,0.225])]) test_transforms = transforms.Compose([transforms.Resize(255), transforms.CenterCrop(224), transforms.ToTensor(), transforms.Normalize([0.485, 0.456, 0.406], [0.229, 0.224, 0.225])]) train_data=datasets.ImageFolder(train_dir,transform=train_transforms) valid_data=datasets.ImageFolder(valid_dir,transform=valid_transforms) test_data=datasets.ImageFolder(test_dir,transform=test_transforms) trainloader =torch.utils.data.DataLoader(train_data,batch_size=64,shuffle=True) validloader =torch.utils.data.DataLoader(valid_data,batch_size=64) testloader =torch.utils.data.DataLoader(test_data,batch_size=64) return testloader,validloader,testloader,train_data def load_checkpoint(filepath,device): # Checkpoint for when using GPU if torch.cuda.is_available(): map_location=lambda storage, loc: storage.cuda() else: map_location='cpu' pretrained_model= 'vgg16' #get_pretrained_model() checkpoint = torch.load(filepath, map_location=map_location) model = getattr(models,pretrained_model)(pretrained=True) model.classifier=checkpoint['classifier'] model.class_to_idx=checkpoint['class_to_idx'] model.load_state_dict(checkpoint['state_dict']) #device=torch.device("cuda" if torch.cuda.is_available() else "cpu") model.to(device) return model def process_image(image): ''' Scales, crops, and normalizes a PIL image for a PyTorch model, returns an Numpy array ''' # TODO: Process a PIL image for use in a PyTorch model im=Image.open(image) transform = transforms.Compose([transforms.Resize(256), transforms.CenterCrop(224), transforms.ToTensor(), transforms.Normalize([0.485, 0.456, 0.406], [0.229, 0.224, 0.225])]) ## Transforming image for use with network trans_im = transform(im) # Converting to Numpy array array_im_tfd = np.array(trans_im) return array_im_tfd def imshow(image, ax=None, title=None): """Imshow for Tensor.""" if ax is None: fig, ax = plt.subplots() # PyTorch tensors assume the color channel is the first dimension # but matplotlib assumes is the third dimension #image = image.numpy().transpose((1, 2, 0)) image=image.transpose((1,2,0)) # Undo preprocessing mean = np.array([0.485, 0.456, 0.406]) std = np.array([0.229, 0.224, 0.225]) image = std * image + mean # Image needs to be clipped between 0 and 1 or it looks like noise when displayed image = np.clip(image, 0, 1) ax.imshow(image) return ax def predict_im(image_path, model, topk): ''' Predict the class (or classes) of an image using a trained deep learning model. ''' # TODO: Implement the code to predict the class from an image file k=topk test_img=process_image(image_path) test_img=torch.from_numpy(test_img) batch_img=torch.unsqueeze(test_img,0) outputs=model(batch_img) top_ps,top_indices = torch.topk(outputs,k) top_ps=torch.exp(top_ps) class_to_idx_inv={k:v for v,k in model.class_to_idx.items()} top_ps=top_ps.view(k).tolist() top_indices=top_indices.view(k).tolist() final_indices=[class_to_idx_inv[x] for x in top_indices] return top_ps,final_indices
[ 1, 1053, 12655, 408, 7442, 13, 5215, 11701, 408, 10518, 13, 5215, 4842, 305, 13, 5215, 4842, 305, 4924, 13, 5215, 4842, 305, 29889, 15755, 29889, 2220, 284, 408, 383, 13, 3166, 4842, 305, 4924, 1053, 20035, 29892, 9067, 29879, 29892, 9794, 13, 5215, 22889, 29889, 2272, 5317, 408, 14770, 13, 29937, 3166, 7945, 1053, 679, 29918, 1457, 3018, 1312, 29918, 4299, 13, 3166, 4842, 305, 1053, 302, 29876, 29892, 20640, 13, 3166, 349, 6227, 1053, 7084, 13, 29937, 29995, 2922, 17357, 10583, 13, 13, 1753, 2254, 29918, 24713, 29898, 1272, 29918, 20146, 29883, 1125, 13, 1678, 848, 29918, 3972, 353, 848, 29918, 20146, 29883, 13, 1678, 7945, 29918, 3972, 353, 848, 29918, 3972, 718, 8207, 14968, 29915, 13, 1678, 2854, 29918, 3972, 353, 848, 29918, 3972, 718, 8207, 3084, 29915, 13, 1678, 1243, 29918, 3972, 353, 848, 29918, 3972, 718, 8207, 1688, 29915, 13, 268, 13, 1678, 7945, 29918, 9067, 29879, 353, 4327, 29879, 29889, 1523, 4220, 4197, 9067, 29879, 29889, 17875, 21281, 362, 29898, 29941, 29900, 511, 13, 462, 462, 539, 4327, 29879, 29889, 17875, 1666, 1891, 29907, 1336, 29898, 29906, 29906, 29946, 511, 13, 462, 462, 539, 4327, 29879, 29889, 17875, 24932, 29943, 3466, 3285, 13, 462, 462, 539, 4327, 29879, 29889, 1762, 29911, 6073, 3285, 13, 462, 462, 539, 4327, 29879, 29889, 19077, 675, 4197, 29900, 29889, 29946, 29947, 29945, 29892, 29871, 29900, 29889, 29946, 29945, 29953, 29892, 29871, 29900, 29889, 29946, 29900, 29953, 1402, 13, 462, 462, 462, 9651, 518, 29900, 29889, 29906, 29906, 29929, 29892, 29871, 29900, 29889, 29906, 29906, 29946, 29892, 29871, 29900, 29889, 29906, 29906, 29945, 2314, 2314, 13, 13, 1678, 2854, 29918, 9067, 29879, 29922, 9067, 29879, 29889, 1523, 4220, 4197, 9067, 29879, 29889, 1666, 675, 29898, 29906, 29945, 29945, 511, 13, 462, 462, 268, 4327, 29879, 29889, 13409, 29907, 1336, 29898, 29906, 29906, 29946, 511, 13, 462, 462, 268, 4327, 29879, 29889, 1762, 29911, 6073, 3285, 13, 462, 462, 268, 4327, 29879, 29889, 19077, 675, 4197, 29900, 29889, 29946, 29947, 29945, 29892, 29900, 29889, 29946, 29945, 29953, 29892, 29900, 29889, 29946, 29900, 29953, 1402, 13, 462, 462, 462, 965, 518, 29900, 29889, 29906, 29906, 29929, 29892, 29900, 29889, 29906, 29906, 29946, 29892, 29900, 29889, 29906, 29906, 29945, 2314, 2314, 13, 13, 1678, 1243, 29918, 9067, 29879, 353, 4327, 29879, 29889, 1523, 4220, 4197, 9067, 29879, 29889, 1666, 675, 29898, 29906, 29945, 29945, 511, 13, 462, 462, 418, 4327, 29879, 29889, 13409, 29907, 1336, 29898, 29906, 29906, 29946, 511, 13, 462, 462, 418, 4327, 29879, 29889, 1762, 29911, 6073, 3285, 13, 462, 462, 418, 4327, 29879, 29889, 19077, 675, 4197, 29900, 29889, 29946, 29947, 29945, 29892, 29871, 29900, 29889, 29946, 29945, 29953, 29892, 29871, 29900, 29889, 29946, 29900, 29953, 1402, 13, 462, 462, 462, 965, 518, 29900, 29889, 29906, 29906, 29929, 29892, 29871, 29900, 29889, 29906, 29906, 29946, 29892, 29871, 29900, 29889, 29906, 29906, 29945, 2314, 2314, 13, 13, 1678, 7945, 29918, 1272, 29922, 14538, 1691, 29889, 2940, 12924, 29898, 14968, 29918, 3972, 29892, 9067, 29922, 14968, 29918, 9067, 29879, 29897, 13, 1678, 2854, 29918, 1272, 29922, 14538, 1691, 29889, 2940, 12924, 29898, 3084, 29918, 3972, 29892, 9067, 29922, 3084, 29918, 9067, 29879, 29897, 13, 1678, 1243, 29918, 1272, 29922, 14538, 1691, 29889, 2940, 12924, 29898, 1688, 29918, 3972, 29892, 9067, 29922, 1688, 29918, 9067, 29879, 29897, 13, 13, 13, 1678, 7945, 12657, 353, 7345, 305, 29889, 13239, 29889, 1272, 29889, 1469, 10036, 29898, 14968, 29918, 1272, 29892, 16175, 29918, 2311, 29922, 29953, 29946, 29892, 845, 21897, 29922, 5574, 29897, 13, 1678, 2854, 12657, 353, 7345, 305, 29889, 13239, 29889, 1272, 29889, 1469, 10036, 29898, 3084, 29918, 1272, 29892, 16175, 29918, 2311, 29922, 29953, 29946, 29897, 13, 1678, 1243, 12657, 353, 7345, 305, 29889, 13239, 29889, 1272, 29889, 1469, 10036, 29898, 1688, 29918, 1272, 29892, 16175, 29918, 2311, 29922, 29953, 29946, 29897, 13, 268, 13, 1678, 736, 1243, 12657, 29892, 3084, 12657, 29892, 1688, 12657, 29892, 14968, 29918, 1272, 13, 13, 1753, 2254, 29918, 3198, 3149, 29898, 1445, 2084, 29892, 10141, 1125, 13, 259, 396, 5399, 3149, 363, 746, 773, 22796, 13, 1678, 565, 4842, 305, 29889, 29883, 6191, 29889, 275, 29918, 16515, 7295, 13, 4706, 2910, 29918, 5479, 29922, 2892, 8635, 29892, 1180, 29901, 8635, 29889, 29883, 6191, 580, 13, 1678, 1683, 29901, 13, 4706, 2910, 29918, 5479, 2433, 21970, 29915, 13, 1678, 758, 3018, 1312, 29918, 4299, 29922, 525, 29894, 1505, 29896, 29953, 29915, 396, 657, 29918, 1457, 3018, 1312, 29918, 4299, 580, 13, 1678, 1423, 3149, 353, 4842, 305, 29889, 1359, 29898, 1445, 2084, 29892, 2910, 29918, 5479, 29922, 1958, 29918, 5479, 29897, 13, 1678, 1904, 353, 679, 5552, 29898, 9794, 29892, 1457, 3018, 1312, 29918, 4299, 5033, 1457, 3018, 1312, 29922, 5574, 29897, 13, 1678, 1904, 29889, 1990, 3709, 29922, 3198, 3149, 1839, 1990, 3709, 2033, 13, 1678, 1904, 29889, 1990, 29918, 517, 29918, 13140, 29922, 3198, 3149, 1839, 1990, 29918, 517, 29918, 13140, 2033, 13, 1678, 1904, 29889, 1359, 29918, 3859, 29918, 8977, 29898, 3198, 3149, 1839, 3859, 29918, 8977, 11287, 13, 1678, 396, 10141, 29922, 7345, 305, 29889, 10141, 703, 29883, 6191, 29908, 565, 4842, 305, 29889, 29883, 6191, 29889, 275, 29918, 16515, 580, 1683, 376, 21970, 1159, 13, 1678, 1904, 29889, 517, 29898, 10141, 29897, 13, 1678, 736, 1904, 13, 13, 1753, 1889, 29918, 3027, 29898, 3027, 1125, 13, 1678, 14550, 317, 1052, 267, 29892, 8182, 567, 29892, 322, 4226, 7093, 263, 349, 6227, 1967, 363, 263, 10772, 29911, 25350, 1904, 29892, 13, 4706, 3639, 385, 11848, 2272, 1409, 13, 1678, 14550, 13, 268, 13, 1678, 396, 14402, 29901, 10554, 263, 349, 6227, 1967, 363, 671, 297, 263, 10772, 29911, 25350, 1904, 13, 1678, 527, 29922, 2940, 29889, 3150, 29898, 3027, 29897, 13, 268, 13, 1678, 4327, 353, 4327, 29879, 29889, 1523, 4220, 4197, 9067, 29879, 29889, 1666, 675, 29898, 29906, 29945, 29953, 511, 13, 462, 462, 1678, 4327, 29879, 29889, 13409, 29907, 1336, 29898, 29906, 29906, 29946, 511, 13, 462, 462, 1678, 4327, 29879, 29889, 1762, 29911, 6073, 3285, 13, 462, 462, 1678, 4327, 29879, 29889, 19077, 675, 4197, 29900, 29889, 29946, 29947, 29945, 29892, 29871, 29900, 29889, 29946, 29945, 29953, 29892, 29871, 29900, 29889, 29946, 29900, 29953, 1402, 29871, 13, 462, 462, 462, 308, 518, 29900, 29889, 29906, 29906, 29929, 29892, 29871, 29900, 29889, 29906, 29906, 29946, 29892, 29871, 29900, 29889, 29906, 29906, 29945, 2314, 2314, 29871, 13, 268, 13, 1678, 444, 4103, 689, 292, 1967, 363, 671, 411, 3564, 13, 1678, 1301, 29918, 326, 353, 4327, 29898, 326, 29897, 13, 268, 13, 1678, 396, 1281, 369, 1259, 304, 11848, 2272, 1409, 29871, 13, 1678, 1409, 29918, 326, 29918, 29873, 11512, 353, 7442, 29889, 2378, 29898, 3286, 29918, 326, 29897, 13, 268, 13, 1678, 736, 1409, 29918, 326, 29918, 29873, 11512, 13, 13, 1753, 527, 4294, 29898, 3027, 29892, 4853, 29922, 8516, 29892, 3611, 29922, 8516, 1125, 13, 1678, 9995, 1888, 4294, 363, 323, 6073, 1213, 15945, 13, 1678, 565, 4853, 338, 6213, 29901, 13, 4706, 2537, 29892, 4853, 353, 14770, 29889, 1491, 26762, 580, 13, 268, 13, 1678, 396, 10772, 29911, 25350, 25187, 943, 5251, 278, 2927, 8242, 338, 278, 937, 9927, 13, 1678, 396, 541, 22889, 15894, 338, 278, 4654, 9927, 13, 1678, 396, 3027, 353, 1967, 29889, 23749, 2141, 3286, 4220, 3552, 29896, 29892, 29871, 29906, 29892, 29871, 29900, 876, 13, 1678, 1967, 29922, 3027, 29889, 3286, 4220, 3552, 29896, 29892, 29906, 29892, 29900, 876, 13, 268, 13, 1678, 396, 14211, 29877, 758, 19170, 13, 1678, 2099, 353, 7442, 29889, 2378, 4197, 29900, 29889, 29946, 29947, 29945, 29892, 29871, 29900, 29889, 29946, 29945, 29953, 29892, 29871, 29900, 29889, 29946, 29900, 29953, 2314, 13, 1678, 3659, 353, 7442, 29889, 2378, 4197, 29900, 29889, 29906, 29906, 29929, 29892, 29871, 29900, 29889, 29906, 29906, 29946, 29892, 29871, 29900, 29889, 29906, 29906, 29945, 2314, 13, 1678, 1967, 353, 3659, 334, 1967, 718, 2099, 13, 268, 13, 1678, 396, 7084, 4225, 304, 367, 9335, 2986, 1546, 29871, 29900, 322, 29871, 29896, 470, 372, 3430, 763, 11462, 746, 8833, 13, 1678, 1967, 353, 7442, 29889, 24049, 29898, 3027, 29892, 29871, 29900, 29892, 29871, 29896, 29897, 13, 268, 13, 1678, 4853, 29889, 326, 4294, 29898, 3027, 29897, 13, 268, 13, 1678, 736, 4853, 13, 13, 1753, 8500, 29918, 326, 29898, 3027, 29918, 2084, 29892, 1904, 29892, 2246, 29895, 1125, 13, 1678, 14550, 21099, 919, 278, 770, 313, 272, 4413, 29897, 310, 385, 1967, 773, 263, 16370, 6483, 6509, 1904, 29889, 13, 1678, 14550, 13, 268, 13, 1678, 396, 14402, 29901, 1954, 2037, 278, 775, 304, 8500, 278, 770, 515, 385, 1967, 934, 13, 1678, 413, 29922, 3332, 29895, 13, 1678, 1243, 29918, 2492, 29922, 5014, 29918, 3027, 29898, 3027, 29918, 2084, 29897, 13, 1678, 1243, 29918, 2492, 29922, 7345, 305, 29889, 3166, 29918, 23749, 29898, 1688, 29918, 2492, 29897, 13, 1678, 9853, 29918, 2492, 29922, 7345, 305, 29889, 6948, 802, 29872, 911, 29898, 1688, 29918, 2492, 29892, 29900, 29897, 13, 1678, 14391, 29922, 4299, 29898, 16175, 29918, 2492, 29897, 13, 1678, 2246, 29918, 567, 29892, 3332, 29918, 513, 1575, 353, 4842, 305, 29889, 3332, 29895, 29898, 4905, 29879, 29892, 29895, 29897, 13, 1678, 2246, 29918, 567, 29922, 7345, 305, 29889, 4548, 29898, 3332, 29918, 567, 29897, 13, 1678, 770, 29918, 517, 29918, 13140, 29918, 11569, 3790, 29895, 29901, 29894, 363, 325, 29892, 29895, 297, 1904, 29889, 1990, 29918, 517, 29918, 13140, 29889, 7076, 28296, 13, 1678, 2246, 29918, 567, 29922, 3332, 29918, 567, 29889, 1493, 29898, 29895, 467, 25027, 391, 580, 13, 1678, 2246, 29918, 513, 1575, 29922, 3332, 29918, 513, 1575, 29889, 1493, 29898, 29895, 467, 25027, 391, 580, 13, 1678, 2186, 29918, 513, 1575, 11759, 1990, 29918, 517, 29918, 13140, 29918, 11569, 29961, 29916, 29962, 363, 921, 297, 2246, 29918, 513, 1575, 29962, 13, 1678, 736, 2246, 29918, 567, 29892, 8394, 29918, 513, 1575, 13, 13, 13, 268, 13, 259, 13, 13, 2 ]
src/linesegm.py
abhey1618/Text_Recognition
0
173811
import cv2 import os import numpy as np from sys import argv from lib import sauvola, linelocalization, pathfinder from WordSegmentation import wordSegmentation, prepareImg from time import time as timer from SamplePreprocessor import preprocess from DataLoader import Batch from Model import Model def draw_line(im, path): for p in path: im[p[0], p[1]] = 0 def draw_box(im, path, prev): curr=(path[0][1], path[0][0]) cv2.rectangle(im, prev, curr,0,3) def draw_map(im, mapy): for m in mapy: im[m[0], m[1]] = 255 def print_path(path): print('\t# path: ' + str(path[::-1])) def save(filename, imbw, immap): imbw_filename = str.replace(filename, '.', '_bw.') #imbw_filename = str.replace(imbw_filename, 'data', 'data/bw') print('Saving image "' + imbw_filename + '"..\n') cv2.imwrite(imbw_filename, imbw) immap_filename = str.replace(imbw_filename, '_bw', '_map') cv2.imwrite(immap_filename, immap) def infer(model, fnImg): "recognize text in image provided by file path" img = preprocess(cv2.imread(fnImg, cv2.IMREAD_GRAYSCALE), Model.imgSize) batch = Batch(None, [img]) (recognized, probability) = model.inferBatch(batch, True) #print('Recognized:', '"' + recognized[0] + '"') #print('Probability:', probability[0]) return (recognized[0], probability[0]) ###################### # ------ MAIN ------ # ###################### def identify_words(filepath, filenames, model): begin = timer() out_dict={} out_path='../data/out/' print('############################') print('#Line and Word Segmentation#') print('############################') for filename in filenames: fullpath=os.path.join(filepath,filename) f=filename.split('.')[0] ext=filename.split('.')[1] if ext=='pdf': continue out_dict[f] = [] print('Reading image "' + filename + '"..') im = cv2.imread(fullpath, 0) print('- Thresholding image..') #imbw = sauvola.binarize(im, [20, 20], 128, 0.3) pxmin = np.min(im) pxmax = np.max(im) im = (im - pxmin) / (pxmax - pxmin) * 255 im = im.astype('uint8') #binarize _ , imbw = cv2.threshold(im, 0, 255, cv2.THRESH_BINARY+cv2.THRESH_OTSU) #cv2.imshow('tempb', imbw) # increase line width kernel = np.ones((3, 3), np.uint8) imbw = cv2.erode(imbw, kernel, iterations = 1) print('- Localizing lines..') lines = linelocalization.localize(imbw) lines.append(imbw.shape[0]) print(' => ' + str(len(lines)) + ' lines detected.') print('- Path planning with ') immap = np.zeros((imbw.shape), dtype=np.int32) # for i in range(0, 1): prev=(0,0) n_line=1 for line in lines: # line = lines[i] rline = imbw[int(prev[1]):int(line),:] img = prepareImg(rline, 50) # execute segmentation with given parameters # -kernelSize: size of filter kernel (odd integer) # -sigma: standard deviation of Gaussian function used for filter kernel # -theta: approximated width/height ratio of words, filter function is distorted by this factor # - minArea: ignore word candidates smaller than specified area res = wordSegmentation(img, kernelSize=25, sigma=11, theta=7, minArea=100, increase_dim=10) # write output to 'out/inputFileName' directory if not os.path.exists(out_path+'%s'%f): os.mkdir(out_path+'%s'%f) # iterate over all segmented words #print('Segmented into %d words'%len(res)) for (j, w) in enumerate(res): (wordBox, wordImg) = w (x, y, w, h) = wordBox imgloc=out_path+'%s/%d.png'%(f, j) # increase contrast cv2.imwrite(imgloc, wordImg) # save word #FilePaths.fnInfer = 'out/%s/%d.png'%(f,j) try: result, prob = infer(model, imgloc) except: print("Couldn't infer: image%d"%j) result="" #updating output dictionary out_dict[f].append(result) #deleting intermediate file ##os.remove(imgloc) cv2.rectangle(img,(x,y),(x+w,y+h),0,1) # draw bounding box in summary image # output summary image with bounding boxes around words cv2.imwrite(out_path+'%s/summary%d.png'%(f,n_line), img) #path, mapy = pathfinder.search(imbw, 'A', line) #path = [[int(line),0]] path = [[int(line),rline.shape[1]]] #print(rline.shape[1]) #print('path[0][0]: ',path[0][0], ' path[0][1]: ', path[0][1]) draw_box(im, path, prev) #draw_map(immap, mapy) prev=(0, path[0][0]) n_line+=1 # print_path(path) #save(filename, imbw, immap) cv2.imwrite(out_path+'%s/summary.png'%f, im) return out_dict print(' - Elapsed time: ' + str((timer() - begin)) + ' s')
[ 1, 1053, 13850, 29906, 13, 5215, 2897, 13, 5215, 12655, 408, 7442, 13, 3166, 10876, 1053, 1852, 29894, 13, 3166, 4303, 1053, 12507, 1555, 29874, 29892, 6276, 295, 18642, 2133, 29892, 2224, 2886, 261, 13, 3166, 10803, 17669, 358, 362, 1053, 1734, 17669, 358, 362, 29892, 19012, 25518, 13, 3166, 931, 1053, 931, 408, 12237, 13, 3166, 21029, 6572, 26482, 1053, 758, 5014, 13, 3166, 3630, 10036, 1053, 350, 905, 13, 3166, 8125, 1053, 8125, 13, 13, 13, 1753, 4216, 29918, 1220, 29898, 326, 29892, 2224, 1125, 13, 12, 1454, 282, 297, 2224, 29901, 13, 12, 12, 326, 29961, 29886, 29961, 29900, 1402, 282, 29961, 29896, 5262, 353, 29871, 29900, 13, 13, 1753, 4216, 29918, 1884, 29898, 326, 29892, 2224, 29892, 12379, 1125, 13, 12, 21962, 7607, 2084, 29961, 29900, 3816, 29896, 1402, 2224, 29961, 29900, 3816, 29900, 2314, 13, 12, 11023, 29906, 29889, 1621, 2521, 29898, 326, 29892, 12379, 29892, 16256, 29892, 29900, 29892, 29941, 29897, 13, 13, 13, 1753, 4216, 29918, 1958, 29898, 326, 29892, 2910, 29891, 1125, 13, 12, 1454, 286, 297, 2910, 29891, 29901, 13, 12, 12, 326, 29961, 29885, 29961, 29900, 1402, 286, 29961, 29896, 5262, 353, 29871, 29906, 29945, 29945, 13, 13, 13, 1753, 1596, 29918, 2084, 29898, 2084, 1125, 13, 12, 2158, 28909, 29873, 29937, 2224, 29901, 525, 718, 851, 29898, 2084, 29961, 1057, 29899, 29896, 12622, 13, 13, 13, 1753, 4078, 29898, 9507, 29892, 527, 29890, 29893, 29892, 527, 1958, 1125, 13, 12, 19977, 29893, 29918, 9507, 353, 851, 29889, 6506, 29898, 9507, 29892, 15300, 742, 22868, 29890, 29893, 29889, 1495, 13, 12, 29937, 19977, 29893, 29918, 9507, 353, 851, 29889, 6506, 29898, 19977, 29893, 29918, 9507, 29892, 525, 1272, 742, 525, 1272, 29914, 29890, 29893, 1495, 13, 12, 2158, 877, 29903, 5555, 1967, 13577, 718, 527, 29890, 29893, 29918, 9507, 718, 18793, 636, 29905, 29876, 1495, 13, 12, 11023, 29906, 29889, 326, 3539, 29898, 19977, 29893, 29918, 9507, 29892, 527, 29890, 29893, 29897, 13, 12, 326, 1958, 29918, 9507, 353, 851, 29889, 6506, 29898, 19977, 29893, 29918, 9507, 29892, 22868, 29890, 29893, 742, 22868, 1958, 1495, 13, 12, 11023, 29906, 29889, 326, 3539, 29898, 326, 1958, 29918, 9507, 29892, 527, 1958, 29897, 13, 13, 1753, 10115, 29898, 4299, 29892, 7876, 25518, 1125, 13, 12, 29908, 29423, 675, 1426, 297, 1967, 4944, 491, 934, 2224, 29908, 13, 12, 2492, 353, 758, 5014, 29898, 11023, 29906, 29889, 326, 949, 29898, 9144, 25518, 29892, 13850, 29906, 29889, 7833, 16310, 29918, 29954, 4717, 21554, 5454, 1307, 511, 8125, 29889, 2492, 3505, 29897, 13, 12, 16175, 353, 350, 905, 29898, 8516, 29892, 518, 2492, 2314, 13, 12, 29898, 29423, 1891, 29892, 6976, 29897, 353, 1904, 29889, 262, 571, 23145, 29898, 16175, 29892, 5852, 29897, 13, 12, 29937, 2158, 877, 23122, 1891, 29901, 742, 18793, 29915, 718, 14831, 29961, 29900, 29962, 718, 18793, 1495, 13, 12, 29937, 2158, 877, 1184, 29890, 3097, 29901, 742, 6976, 29961, 29900, 2314, 13, 12, 2457, 313, 29423, 1891, 29961, 29900, 1402, 6976, 29961, 29900, 2314, 13, 13, 13383, 4136, 2277, 13, 29937, 448, 23648, 14861, 1177, 448, 23648, 396, 13, 13383, 4136, 2277, 13, 13, 1753, 12439, 29918, 9303, 29898, 1445, 2084, 29892, 977, 264, 1280, 29892, 1904, 1125, 13, 12, 463, 353, 12237, 580, 13, 12, 449, 29918, 8977, 3790, 29913, 13, 12, 449, 29918, 2084, 2433, 6995, 1272, 29914, 449, 22208, 13, 12, 13, 13, 12, 2158, 877, 13383, 7346, 4136, 1495, 13, 12, 2158, 14237, 3542, 322, 10803, 6667, 358, 362, 29937, 1495, 13, 12, 2158, 877, 13383, 7346, 4136, 1495, 13, 13, 12, 1454, 10422, 297, 977, 264, 1280, 29901, 13, 12, 12, 8159, 2084, 29922, 359, 29889, 2084, 29889, 7122, 29898, 1445, 2084, 29892, 9507, 29897, 13, 12, 12, 29888, 29922, 9507, 29889, 5451, 12839, 29861, 29900, 29962, 13, 12, 12, 1062, 29922, 9507, 29889, 5451, 12839, 29861, 29896, 29962, 13, 12, 12, 361, 1294, 1360, 29915, 5140, 2396, 13, 12, 12, 12, 19878, 13, 12, 12, 449, 29918, 8977, 29961, 29888, 29962, 353, 5159, 13, 12, 12, 2158, 877, 6359, 292, 1967, 13577, 718, 10422, 718, 18793, 636, 1495, 13, 12, 12, 326, 353, 13850, 29906, 29889, 326, 949, 29898, 8159, 2084, 29892, 29871, 29900, 29897, 13, 13, 12, 12, 2158, 877, 29899, 498, 12268, 292, 1967, 636, 1495, 13, 12, 12, 29937, 19977, 29893, 353, 12507, 1555, 29874, 29889, 2109, 279, 675, 29898, 326, 29892, 518, 29906, 29900, 29892, 29871, 29906, 29900, 1402, 29871, 29896, 29906, 29947, 29892, 29871, 29900, 29889, 29941, 29897, 13, 12, 12, 1756, 1195, 353, 7442, 29889, 1195, 29898, 326, 29897, 13, 12, 12, 1756, 3317, 353, 7442, 29889, 3317, 29898, 326, 29897, 13, 12, 12, 326, 353, 313, 326, 448, 282, 29916, 1195, 29897, 847, 313, 1756, 3317, 448, 282, 29916, 1195, 29897, 334, 29871, 29906, 29945, 29945, 13, 12, 12, 326, 353, 527, 29889, 579, 668, 877, 13470, 29947, 1495, 13, 12, 12, 29937, 2109, 279, 675, 13, 12, 12, 29918, 1919, 527, 29890, 29893, 353, 13850, 29906, 29889, 386, 12268, 29898, 326, 29892, 29871, 29900, 29892, 29871, 29906, 29945, 29945, 29892, 13850, 29906, 29889, 4690, 1525, 7068, 29918, 29933, 1177, 19926, 29974, 11023, 29906, 29889, 4690, 1525, 7068, 29918, 2891, 14605, 29897, 13, 12, 12, 29937, 11023, 29906, 29889, 326, 4294, 877, 7382, 29890, 742, 527, 29890, 29893, 29897, 13, 13, 12, 12, 29937, 7910, 1196, 2920, 13, 12, 12, 17460, 353, 7442, 29889, 2873, 3552, 29941, 29892, 29871, 29941, 511, 7442, 29889, 13470, 29947, 29897, 13, 12, 12, 19977, 29893, 353, 13850, 29906, 29889, 261, 356, 29898, 19977, 29893, 29892, 8466, 29892, 24372, 353, 29871, 29896, 29897, 13, 13, 12, 12, 2158, 877, 29899, 9959, 5281, 3454, 636, 1495, 13, 12, 12, 9012, 353, 6276, 295, 18642, 2133, 29889, 2997, 675, 29898, 19977, 29893, 29897, 13, 12, 12, 9012, 29889, 4397, 29898, 19977, 29893, 29889, 12181, 29961, 29900, 2314, 13, 12, 12, 2158, 877, 1149, 525, 718, 851, 29898, 2435, 29898, 9012, 876, 718, 525, 3454, 17809, 29889, 1495, 13, 13, 12, 12, 2158, 877, 29899, 10802, 18987, 411, 25710, 13, 13, 12, 12, 326, 1958, 353, 7442, 29889, 3298, 359, 3552, 19977, 29893, 29889, 12181, 511, 26688, 29922, 9302, 29889, 524, 29941, 29906, 29897, 13, 12, 12, 29937, 363, 474, 297, 3464, 29898, 29900, 29892, 29871, 29896, 1125, 13, 12, 12, 16304, 7607, 29900, 29892, 29900, 29897, 13, 12, 12, 29876, 29918, 1220, 29922, 29896, 13, 12, 12, 1454, 1196, 297, 3454, 29901, 13, 12, 12, 12, 29937, 1196, 353, 3454, 29961, 29875, 29962, 13, 12, 12, 12, 29878, 1220, 353, 527, 29890, 29893, 29961, 524, 29898, 16304, 29961, 29896, 29962, 1125, 524, 29898, 1220, 511, 17531, 13, 12, 12, 12, 2492, 353, 19012, 25518, 29898, 29878, 1220, 29892, 29871, 29945, 29900, 29897, 13, 12, 12, 12, 29937, 6222, 10768, 362, 411, 2183, 4128, 13, 12, 12, 12, 29937, 448, 17460, 3505, 29901, 2159, 310, 4175, 8466, 313, 22861, 6043, 29897, 13, 12, 12, 12, 29937, 448, 3754, 29901, 3918, 29522, 310, 22477, 740, 1304, 363, 4175, 8466, 13, 12, 12, 12, 29937, 448, 3416, 29901, 6881, 630, 2920, 29914, 3545, 11959, 310, 3838, 29892, 4175, 740, 338, 1320, 18054, 491, 445, 7329, 13, 12, 12, 12, 29937, 448, 1375, 13799, 29901, 11455, 1734, 21669, 7968, 1135, 6790, 4038, 13, 12, 12, 12, 690, 353, 1734, 17669, 358, 362, 29898, 2492, 29892, 8466, 3505, 29922, 29906, 29945, 29892, 269, 2934, 29922, 29896, 29896, 29892, 278, 941, 29922, 29955, 29892, 1375, 13799, 29922, 29896, 29900, 29900, 29892, 7910, 29918, 6229, 29922, 29896, 29900, 29897, 13, 12, 12, 12, 13, 12, 12, 12, 29937, 2436, 1962, 304, 525, 449, 29914, 2080, 17020, 29915, 3884, 13, 12, 12, 12, 361, 451, 2897, 29889, 2084, 29889, 9933, 29898, 449, 29918, 2084, 23097, 29995, 29879, 29915, 29995, 29888, 1125, 13, 12, 12, 12, 12, 359, 29889, 11256, 3972, 29898, 449, 29918, 2084, 23097, 29995, 29879, 29915, 29995, 29888, 29897, 13, 12, 12, 12, 13, 12, 12, 12, 29937, 13649, 975, 599, 10768, 287, 3838, 13, 12, 12, 12, 29937, 2158, 877, 17669, 358, 287, 964, 1273, 29881, 3838, 29915, 29995, 2435, 29898, 690, 876, 13, 12, 12, 12, 1454, 313, 29926, 29892, 281, 29897, 297, 26985, 29898, 690, 1125, 13, 12, 12, 12, 12, 29898, 1742, 3313, 29892, 1734, 25518, 29897, 353, 281, 13, 12, 12, 12, 12, 29898, 29916, 29892, 343, 29892, 281, 29892, 298, 29897, 353, 1734, 3313, 13, 12, 12, 12, 12, 2492, 2029, 29922, 449, 29918, 2084, 23097, 29995, 29879, 22584, 29881, 29889, 2732, 29915, 29995, 29898, 29888, 29892, 432, 29897, 13, 12, 12, 12, 12, 29937, 7910, 12814, 13, 12, 12, 12, 12, 11023, 29906, 29889, 326, 3539, 29898, 2492, 2029, 29892, 1734, 25518, 29897, 396, 4078, 1734, 13, 12, 12, 12, 12, 29937, 2283, 2605, 29879, 29889, 9144, 797, 571, 353, 525, 449, 22584, 29879, 22584, 29881, 29889, 2732, 29915, 29995, 29898, 29888, 29892, 29926, 29897, 13, 12, 12, 12, 12, 2202, 29901, 13, 12, 12, 12, 12, 12, 2914, 29892, 2070, 353, 10115, 29898, 4299, 29892, 10153, 2029, 29897, 13, 12, 12, 12, 12, 19499, 29901, 13, 12, 12, 12, 12, 12, 2158, 703, 23323, 29876, 29915, 29873, 10115, 29901, 1967, 29995, 29881, 29908, 29995, 29926, 29897, 13, 12, 12, 12, 12, 12, 2914, 13776, 13, 12, 12, 12, 12, 29937, 786, 26747, 1962, 8600, 13, 12, 12, 12, 12, 449, 29918, 8977, 29961, 29888, 1822, 4397, 29898, 2914, 29897, 13, 12, 12, 12, 12, 29937, 311, 1026, 292, 19697, 934, 13, 12, 12, 12, 12, 2277, 359, 29889, 5992, 29898, 2492, 2029, 29897, 13, 12, 12, 12, 12, 11023, 29906, 29889, 1621, 2521, 29898, 2492, 22657, 29916, 29892, 29891, 21336, 29916, 29974, 29893, 29892, 29891, 29974, 29882, 511, 29900, 29892, 29896, 29897, 396, 4216, 3216, 292, 3800, 297, 15837, 1967, 13, 12, 12, 12, 13, 12, 12, 12, 29937, 1962, 15837, 1967, 411, 3216, 292, 16273, 2820, 3838, 13, 12, 12, 12, 11023, 29906, 29889, 326, 3539, 29898, 449, 29918, 2084, 23097, 29995, 29879, 29914, 7727, 29995, 29881, 29889, 2732, 29915, 29995, 29898, 29888, 29892, 29876, 29918, 1220, 511, 10153, 29897, 13, 13, 12, 12, 12, 29937, 2084, 29892, 2910, 29891, 353, 2224, 2886, 261, 29889, 4478, 29898, 19977, 29893, 29892, 525, 29909, 742, 1196, 29897, 13, 12, 12, 12, 29937, 2084, 353, 5519, 524, 29898, 1220, 511, 29900, 5262, 13, 12, 12, 12, 2084, 353, 5519, 524, 29898, 1220, 511, 29878, 1220, 29889, 12181, 29961, 29896, 5262, 29962, 13, 12, 12, 12, 29937, 2158, 29898, 29878, 1220, 29889, 12181, 29961, 29896, 2314, 13, 12, 12, 12, 29937, 2158, 877, 2084, 29961, 29900, 3816, 29900, 5387, 13420, 2084, 29961, 29900, 3816, 29900, 1402, 525, 2224, 29961, 29900, 3816, 29896, 5387, 13420, 2224, 29961, 29900, 3816, 29896, 2314, 13, 12, 12, 12, 4012, 29918, 1884, 29898, 326, 29892, 2224, 29892, 12379, 29897, 13, 12, 12, 12, 29937, 4012, 29918, 1958, 29898, 326, 1958, 29892, 2910, 29891, 29897, 13, 12, 12, 12, 16304, 7607, 29900, 29892, 2224, 29961, 29900, 3816, 29900, 2314, 13, 12, 12, 12, 29876, 29918, 1220, 23661, 29896, 13, 12, 12, 12, 29937, 1596, 29918, 2084, 29898, 2084, 29897, 13, 13, 12, 12, 29937, 7620, 29898, 9507, 29892, 527, 29890, 29893, 29892, 527, 1958, 29897, 13, 12, 12, 11023, 29906, 29889, 326, 3539, 29898, 449, 29918, 2084, 23097, 29995, 29879, 29914, 7727, 29889, 2732, 29915, 29995, 29888, 29892, 527, 29897, 13, 12, 2457, 714, 29918, 8977, 13, 13, 12, 2158, 877, 448, 382, 23384, 931, 29901, 525, 718, 851, 3552, 20404, 580, 448, 3380, 876, 718, 525, 269, 1495, 2 ]
beaverdet/tests/test_tube.py
SoftwareDevEngResearch/BeaverDet
0
113006
<reponame>SoftwareDevEngResearch/BeaverDet # -*- coding: utf-8 -*- """ PURPOSE: Unit tests for tools.py CREATED BY: <NAME> Oregon State University CIRE and Propulsion Lab <EMAIL> """ from math import sqrt import pytest import pint import os import cantera as ct import numpy as np import pandas as pd from mock import patch from .. import tube from .. import thermochem ureg = pint.UnitRegistry() quant = ureg.Quantity def compare(manual, tested): for key, value in manual.items(): try: test_value = tested[key].to(value.units.format_babel()).magnitude value = value.magnitude except AttributeError: test_value = tested[key] assert abs(test_value - value) / value < 1e-4 # noinspection PyProtectedMember class TestBolt: thread_size = '1/4-28' thread_class = '2' plate_max_tensile = quant(30, 'ksi') engagement_length = quant(0.5, 'in') bolt_max_tensile = quant(80, 'ksi') def test_calculate_stress_areas_over_100ksi(self): # test bolt > 100ksi bolt_max_tensile = quant(120, 'ksi') hand_calc = { 'screw area': quant(0.034934049, 'in^2'), 'plate area': quant(0.308744082, 'in^2'), 'minimum engagement': quant(0.452595544, 'in') } test_areas = tube.Bolt.calculate_stress_areas( self.thread_size, self.thread_class, bolt_max_tensile, self.plate_max_tensile, self.engagement_length, ureg ) compare(hand_calc, test_areas) def test_calculate_stress_areas_under_100ksi(self): # test bolt < 100ksi bolt_max_tensile = quant(80, 'ksi') hand_calc = { 'screw area': quant(0.036374073, 'in^2'), 'minimum engagement': quant(0.314168053, 'in') } test_areas = tube.Bolt.calculate_stress_areas( self.thread_size, self.thread_class, bolt_max_tensile, self.plate_max_tensile, self.engagement_length, ureg ) compare(hand_calc, test_areas) def test_calculate_stress_areas_length_too_short(self): # ensure warning when engagement length < minimum engagement_length = quant(0.05, 'in') with pytest.warns( Warning, match='Screws fail in shear, not tension.' + ' Plate may be damaged.' + ' Consider increasing bolt engagement length' ): tube.Bolt.calculate_stress_areas( self.thread_size, self.thread_class, self.bolt_max_tensile, self.plate_max_tensile, engagement_length, ureg ) @staticmethod def test_import_thread_specs(): # good input test_size = '0-80' test_type = ['external', 'internal'] test_property = 'pitch diameter max' test_classes = [['2A', '3A'], ['2B', '3B']] good_result = [[0.0514, 0.0519], [0.0542, 0.0536]] specifications = tube.Bolt._import_thread_specs() for thread, classes, expected in zip(test_type, test_classes, good_result): # check for correct output current_frame = specifications[thread] for thread_class, result in zip(classes, expected): test_result = current_frame[test_property][test_size][ thread_class] assert abs(test_result - result) < 1e-7 @staticmethod def test_get_thread_property(): # good input good_args = [ [ 'pitch diameter max', '1/4-20', '2B', ureg ], [ 'pitch diameter max', '1/4-20', '2A', ureg ] ] good_results = [ 0.2248, 0.2164 ] for args, result in zip(good_args, good_results): test_result = tube.Bolt.get_thread_property(*args) assert abs(test_result.magnitude - result) < 1e-7 @staticmethod def test_get_thread_property_not_in_dataframe(): dataframes = tube.Bolt._import_thread_specs() # property not in dataframe bad_property = 'jello' bad_message = ( 'Thread property \'' + bad_property + '\' not found. Available specs: ' + "'" + "', '".join(dataframes['internal'].keys()) + "'" ) with pytest.raises( KeyError, match=bad_message ): tube.Bolt.get_thread_property( bad_property, '1/4-20', '2B', ureg ) @staticmethod def test_get_thread_property_invalid_class(): bad_args = [ [ 'pitch diameter max', '1/4-20', '2F', ureg ], [ 'pitch diameter max', '1/4-20', '6A', ureg ] ] for args in bad_args: with pytest.raises( ValueError, match='bad thread class' ): tube.Bolt.get_thread_property(*args) @staticmethod def test_get_thread_property_invalid_size(): bad_size = '1290-33' bad_message = ( 'Thread size \'' + bad_size + '\' not found' ) with pytest.raises( KeyError, match=bad_message ): tube.Bolt.get_thread_property( 'pitch diameter max', bad_size, '2B', ureg ) class TestDDT: diameter = quant(5.76, ureg.inch) # use a unit diameter to match diameter-specific values from plot tube_diameter = quant(1, 'meter') # define gas mixture and relevant pint quantities mechanism = 'gri30.cti' gas = ct.Solution(mechanism) gas.TP = 300, 101325 initial_temperature = quant(gas.T, 'K') initial_pressure = quant(gas.P, 'Pa') gas.set_equivalence_ratio(1, 'CH4', {'O2': 1, 'N2': 3.76}) species_dict = gas.mole_fraction_dict() def test_calculate_spiral_diameter(self): # define a blockage ratio test_blockage_ratio = 0.44 # define expected result and actual result expected_spiral_diameter = ( self.diameter / 2 * (1 - sqrt(1 - test_blockage_ratio)) ) result = tube.DDT.calculate_spiral_diameter( self.diameter, test_blockage_ratio ) # ensure good output assert expected_spiral_diameter == result.to(ureg.inch) def test_calculate_spiral_diameter_non_numeric_br(self): # ensure proper handling with non-numeric blockage ratio with pytest.raises( ValueError, match='Non-numeric blockage ratio.' ): # noinspection PyTypeChecker tube.DDT.calculate_spiral_diameter( self.diameter, 'doompity doo' ) def test_calculate_spiral_diameter_bad_br(self): # ensure proper handling with blockage ratio outside allowable limits bad_blockage_ratios = [-35.124, 0, 1, 120.34] for ratio in bad_blockage_ratios: with pytest.raises( ValueError, match='Blockage ratio outside of 0<BR<1' ): tube.DDT.calculate_spiral_diameter( self.diameter, ratio ) @staticmethod def test_calculate_blockage_ratio(): hand_calc_blockage_ratio = 0.444242326717679 # check for expected result with good input test_result = tube.DDT.calculate_blockage_ratio( quant(3.438, ureg.inch), quant(7. / 16., ureg.inch) ) assert (test_result - hand_calc_blockage_ratio) < 1e-8 @staticmethod def test_calculate_blockage_ratio_0_tube_diameter(): with pytest.raises( ValueError, match='tube ID cannot be 0' ): tube.DDT.calculate_blockage_ratio( quant(0, ureg.inch), quant(7. / 16., ureg.inch) ) def test_calculate_blockage_ratio_blockage_gt_tube(self): # check for correct handling when blockage diameter >= tube diameter with pytest.raises( ValueError, match='blockage diameter >= tube diameter' ): tube.DDT.calculate_blockage_ratio( quant(1, ureg.inch), quant(3, ureg.inch) ) def test_calculate_ddt_run_up_bad_blockage_ratio(self): bad_blockages = [-4., 0, 1] for blockage_ratio in bad_blockages: with pytest.raises( ValueError, match='Blockage ratio outside of correlation range' ): tube.DDT.calculate_run_up( blockage_ratio, self.tube_diameter, self.initial_temperature, self.initial_pressure, self.species_dict, self.mechanism, ureg ) def test_calculate_ddt_run_up(self): # define good blockage ratios and expected result from each good_blockages = [0.1, 0.2, 0.3, 0.75] good_results = [ 48.51385390428211, 29.24433249370277, 18.136020151133494, 4.76070528967254 ] # test with good inputs for blockage_ratio, result in zip(good_blockages, good_results): test_runup = tube.DDT.calculate_run_up( blockage_ratio, self.tube_diameter, self.initial_temperature, self.initial_pressure, self.species_dict, self.mechanism, ureg, phase_specification='gri30_mix' ) assert 0.5 * result <= test_runup.magnitude <= 1.5 * result class TestWindow: width = quant(50, ureg.mm).to(ureg.inch) length = quant(20, ureg.mm).to(ureg.mile) pressure = quant(1, ureg.atm).to(ureg.torr) thickness = quant(1.2, ureg.mm).to(ureg.furlong) rupture_modulus = quant(5300, ureg.psi).to(ureg.mmHg) def test_safety_factor(self): desired_safety_factor = 4 test_sf = tube.Window.safety_factor( self.length, self.width, self.thickness, self.pressure, self.rupture_modulus ) assert abs(test_sf - desired_safety_factor) / test_sf < 0.01 def test_minimum_thickness_sf_less_than_1(self): # safety factor < 1 safety_factor = [0.25, -7] for factor in safety_factor: with pytest.raises( ValueError, match='Window safety factor < 1' ): tube.Window.minimum_thickness( self.length, self.width, factor, self.pressure, self.rupture_modulus, ureg ) def test_minimum_thickness_sf_non_numeric(self): safety_factor = 'BruceCampbell' with pytest.raises( TypeError, match='Non-numeric window safety factor' ): # noinspection PyTypeChecker tube.Window.minimum_thickness( self.length, self.width, safety_factor, self.pressure, self.rupture_modulus, ureg ) def test_minimum_thickness(self): safety_factor = 4 test_thickness = tube.Window.minimum_thickness( self.length, self.width, safety_factor, self.pressure, self.rupture_modulus, ureg ) test_thickness = test_thickness.to(self.thickness.units).magnitude desired_thickness = self.thickness.magnitude assert abs(test_thickness - desired_thickness) / test_thickness < 0.01 @staticmethod def test_solver_wrong_number_args(): args = [ { 'length': 5, 'width': 4, 'thickness': 2, 'pressure': 2 }, { 'length': 5, 'width': 4, 'thickness': 2, 'pressure': 2, 'rupture_modulus': 10, 'safety_factor': 4 } ] for argument_dict in args: with pytest.raises( ValueError, match='Incorrect number of arguments sent to solver' ): tube.Window.solver(**argument_dict) @staticmethod def test_solver_bad_kwarg(): kwargs = { 'length': 5, 'width': 4, 'thickness': 2, 'pressure': 2, 'pulled_pork': 9 } with pytest.raises( ValueError, match='Bad keyword argument:\npulled_pork' ): tube.Window.solver(**kwargs) @staticmethod def test_solver_imaginary_result(): kwargs = { 'length': 20, 'width': 50, 'safety_factor': 4, 'pressure': -139, 'rupture_modulus': 5300 } with pytest.warns( Warning, match='Window inputs resulted in imaginary solution.' ): test_nan = tube.Window.solver(**kwargs) assert test_nan is np.nan @staticmethod def test_solver(): args = [ { 'length': 20, 'width': 50, 'safety_factor': 4, 'pressure': 14.7, 'rupture_modulus': 5300 }, { 'length': 20, 'width': 50, 'thickness': 1.2, 'pressure': 14.7, 'rupture_modulus': 5300 } ] good_solutions = [1.2, 4.] for index in range(len(args)): test_output = tube.Window.solver(**args[index]) assert abs(test_output - good_solutions[index]) < 0.1 @staticmethod def test_calculate_window_bolt_sf(): max_pressure = quant(1631.7, 'psi') window_area = quant(5.75 * 2.5, 'in^2') num_bolts = 20 thread_size = '1/4-28' thread_class = '2' bolt_max_tensile = quant(120, 'ksi') plate_max_tensile = quant(30, 'ksi') engagement_length = quant(0.5, 'in') hand_calc = { 'bolt': 3.606968028, 'plate': 7.969517321, } test_values = tube.Window.calculate_bolt_sfs( max_pressure, window_area, num_bolts, thread_size, thread_class, bolt_max_tensile, plate_max_tensile, engagement_length, ureg ) compare(hand_calc, test_values) # noinspection PyProtectedMember @pytest.mark.tube class TestTube: material = '316L' schedule = '80' nominal_size = '6' welded = False safety_factor = 4 fake_material_groups = {'thing0': 'group0', 'thing1': 'group1'} fake_materials = pd.DataFrame(columns=['Group', 'Grade']) class FakeOpen: """ fake open() """ def __init__(self, *_): """ dummy init statement """ def __enter__(self, *_): """ enter statement that returns a FakeFile """ return self.FakeFile() def __exit__(self, *_): """ dummy exit statement """ return None class FakeFile: """ fake file used for FakeOpen """ @staticmethod def readline(*_): """ fake file for use with FakeOpen() """ return 'ASDF,thing0,thing1\n' def test__dimensions_lookup_bad_schedule(self): test_tube = tube.Tube() test_tube._set_property('schedule', 'garbage') with pytest.raises( ValueError, match='\nPipe schedule not found' ): test_tube._dimensions_lookup() def test__dimensions_lookup_bad_size(self): test_tube = tube.Tube() test_tube._set_property('nominal_size', '2.222') with pytest.raises( ValueError, match='\nNominal size not found for given pipe schedule' ): test_tube._dimensions_lookup() def test_prop_autocalc_initial_set_get(self): inputs = [True, False, 0, 1] expected = [bool(item) for item in inputs] test_tube = tube.Tube() results = [] for value, correct in zip(inputs, expected): test_tube.autocalc_initial = value results.append(value == correct) assert all(results) def test_prop_show_warnings_set_get(self): inputs = [True, False, 0, 1] expected = [bool(item) for item in inputs] test_tube = tube.Tube() results = [] for value, correct in zip(inputs, expected): test_tube.show_warnings = value results.append(value == correct) assert all(results) def test_prop_available_pipe_sizes_set(self): test_tube = tube.Tube() with pytest.raises( PermissionError, match='\nPipe sizes can not be set manually.' ): test_tube.available_pipe_sizes = 7 def test_prop_available_pipe_sizes_get(self): test_tube = tube.Tube() assert isinstance(test_tube.available_pipe_sizes, list) def test_prop_available_pipe_schedules_set(self): test_tube = tube.Tube() with pytest.raises( PermissionError, match='\nPipe schedules can not be set manually.' ): test_tube.available_pipe_schedules = 'big as hell' def test_prop_available_pipe_schedules_get(self): test_tube = tube.Tube() assert isinstance(test_tube.available_pipe_schedules, list) def test_prop_available_tube_materials_set(self): test_tube = tube.Tube() with pytest.raises( PermissionError, match='\nAvailable tube materials can not be set manually.' ): test_tube.available_tube_materials = 'Aluminum Foil' def test_prop_available_tube_materials_get(self): test_tube = tube.Tube() assert isinstance(test_tube.available_tube_materials, list) def test_prop_nominal_size_set_get(self): test_tube = tube.Tube() inputs = [(1), 6, '1 1/2'] expected = [str(item) for item in inputs] results = [] for value, correct in zip(inputs, expected): test_tube.nominal_size = value result = test_tube.nominal_size results.append(result == correct) assert all(results) def test_prop_nominal_size_set_bad_size(self): bad_size = 'really big' match_string = '\n{0} is not a valid pipe size. '.format(bad_size) + \ 'For a list of available sizes, try \n' + \ '`mytube.available_pipe_sizes`' with pytest.raises( ValueError, match=match_string ): test_tube = tube.Tube() test_tube.nominal_size = bad_size def test_prop_schedule_set_get(self): test_tube = tube.Tube() inputs = [40, 'XXH'] expected = [str(item) for item in inputs] results = [] for value, correct in zip(inputs, expected): test_tube.schedule = value result = test_tube.schedule results.append(result == correct) assert all(results) def test_prop_schedule_set_bad_schedule(self): bad_schedule = 'Kropotkin' match_string = '\n{0} is not a valid pipe schedule for this nominal' \ ' size. '.format(bad_schedule) + \ 'For a list of available schedules, try \n' + \ '`mytube.available_pipe_schedules`' with pytest.raises( ValueError, match=match_string ): test_tube = tube.Tube() test_tube.schedule = bad_schedule def test_prop_dimensions_set(self): test_tube = tube.Tube() match_string = '\nTube dimensions are looked up based on nominal' \ ' pipe size and schedule, not set. Try ' \ '`mytube.schedule()` or `mytube.nominal_size()` instead.' with pytest.raises(PermissionError) as err: test_tube.dimensions = [0, 2, 3] assert str(err.value) == match_string def test_prop_dimensions_get(self): test_tube = tube.Tube( nominal_size=self.nominal_size, schedule=self.schedule ) # Note: _get_dimensions is called during __init__ outer_diameter = test_tube.dimensions.outer_diameter inner_diameter = test_tube.dimensions.inner_diameter wall_thickness = test_tube.dimensions.wall_thickness assert outer_diameter.units.format_babel() == 'inch' assert inner_diameter.units.format_babel() == 'inch' assert wall_thickness.units.format_babel() == 'inch' assert outer_diameter.magnitude - 6.625 < 1e-7 assert inner_diameter.magnitude - 5.761 < 1e-7 assert wall_thickness.magnitude - 0.432 < 1e-7 def test_prop_material_set_bad_material(self): test_tube = tube.Tube() match_string = '\nPipe material not found. For a list of ' + \ 'available materials try:\n' + \ '`mytube.available_tube_materials`' with pytest.raises( ValueError, match=match_string ): test_tube.material = 'unobtainium' def test_prop_welded(self): welded_args = [0, 1, True, False] welded_results = [False, True, True, False] test_tube = tube.Tube() tests = [] for welded_in, good_result in zip(welded_args, welded_results): test_tube.welded = welded_in tests.append(test_tube.welded == good_result) assert all(tests) def test_check_materials_list(self): test_tube = tube.Tube( material=self.material, schedule=self.schedule, nominal_size=self.nominal_size, welded=self.welded, safety_factor=self.safety_factor ) assert test_tube._check_materials_list() def test_check_materials_list_no_files_found(self): test_tube = tube.Tube( material=self.material, schedule=self.schedule, nominal_size=self.nominal_size, welded=self.welded, safety_factor=self.safety_factor ) def fake_listdir(*_): # returns an empty list to test for files-not-found condition return [] with pytest.raises( FileNotFoundError, match='no files containing "flange" or "stress" found' ): with patch('os.listdir', new=fake_listdir): test_tube._check_materials_list() def test_check_materials_list_group_lookup_fails(self): test_tube = tube.Tube() # there is no group0 in any of the flange rating groups, and trying to # look it up should generate a material group not found portion of the # error string. This test sets the materials dataframe to an empty one # with only Group and Grade columns, then adds a material group # 'group0' to generate the desired error. Grade is set to 316L to # avoid a grade-related error. try: test_tube._materials = self.fake_materials.copy() test_tube._materials['Group'] = ['group0'] test_tube._materials['Grade'] = ['316L'] test_tube._check_materials_list() except ValueError as err: message = '\nmaterial group group0 not found\n' assert message == str(err) def test_check_materials_list_no_welded_or_seamless(self): test_tube = tube.Tube() def fake_listdir(*_): # causes welded/seamless warning return ['asdfflangegroup0sfh', 'asdfflangegroup1asd', 'asdfstresswdasdg'] test_tube._material_groups = self.fake_material_groups test_tube._materials = self.fake_materials with patch('builtins.open', new=self.FakeOpen): with patch('os.listdir', new=fake_listdir): error_string = 'asdfstresswdasdg' + \ 'does not indicate whether it is welded' + \ ' or seamless' with pytest.warns(UserWarning, match=error_string): test_tube._check_materials_list() def test_check_materials_list_missing_material(self): test_tube = tube.Tube() file_directory = os.path.join( 'beaverdet', 'lookup_data' ) def fake_listdir(*_): """ listdir function that should work 100% """ return ['asdfflangegroup0sfh', 'asdfflangegroup1asd', 'asdfstressweldedasdg'] test_tube._material_groups = self.fake_material_groups test_tube._materials = pd.DataFrame( columns=['Grade', 'Group'], data=list(map(list, zip( self.fake_material_groups.keys(), self.fake_material_groups.values() ))) ) with patch('builtins.open', new=self.FakeOpen): with patch('os.listdir', new=fake_listdir): class NewFakeFile: """ FakeFile class that should fail material lookup """ @staticmethod def readline(*_): """ readline function that should fail material lookup for thing1 """ return 'ASDF,thing0\n' setattr(self.FakeOpen, 'FakeFile', NewFakeFile) error_string = '\nMaterial thing1 not found in ' + \ os.path.join( file_directory, 'asdfstressweldedasdg' ) + '\n' try: test_tube._check_materials_list() except ValueError as err: assert str(err) == error_string def test_get_material_groups(self): # ensure correctness by comparing to a pandas dataframe reading the # same file test_tube = tube.Tube( material=self.material, schedule=self.schedule, nominal_size=self.nominal_size, welded=self.welded, safety_factor=self.safety_factor ) # file information file_directory = os.path.join( os.path.dirname( os.path.relpath(__file__) ), '..', 'lookup_data' ) file_name = 'materials_list.csv' file_location = os.path.join(file_directory, file_name) # load data into a test dataframe test_dataframe = pd.read_csv(file_location) # load data into a dictionary using get_material_groups() test_output = test_tube._material_groups # collect keys and values from dataframe that should correspond to # those of the dictionary keys_from_dataframe = test_dataframe.Grade.values.astype(str) values_from_dataframe = test_dataframe.Group.values.astype(str) for index, key in enumerate(keys_from_dataframe): # make sure each set of values are approximately equal dict_value = test_output[key] dataframe_value = values_from_dataframe[index] assert dict_value == dataframe_value def test_collect_tube_materials(self): test_tube = tube.Tube() columns = ['Grade', 'Group', 'ElasticModulus', 'Density', 'Poisson'] data = [ ['304', 2.1, 200, 7.8, 0.28], ['304H', 2.1, 200, 7.8, 0.28], ['316', 2.2, 200, 7.9, 0.28], ['316H', 2.2, 200, 7.9, 0.28], ['317', 2.2, 200, 7.9, 0.28], ['304L', 2.3, 200, 7.8, 0.28], ['316L', 2.3, 200, 7.9, 0.28] ] good_dataframe = pd.DataFrame( data=data, index=None, columns=columns ) good_dataframe['ElasticModulus'] = [ test_tube._units.quant(item, 'GPa') for item in good_dataframe['ElasticModulus'] ] good_dataframe['Density'] = [ test_tube._units.quant(item, 'g/cm^3') for item in good_dataframe['Density'] ] assert test_tube._materials.equals(good_dataframe) def test_collect_tube_materials_nonexistent_file(self): def fake_exists(*_): return False with patch( 'os.path.exists', new=fake_exists ): with pytest.raises( ValueError, match='materials_list.csv does not exist' ): tube.Tube() def test_collect_tube_materials_empty_file(self): # noinspection PyUnresolvedReferences def fake_csv_import(*_): raise pd.errors.EmptyDataError with patch( 'pandas.read_csv', new=fake_csv_import ): # check for proper error handling when file is blank with pytest.raises( ValueError, match='materials_list.csv is empty' ): tube.Tube() def test_get_flange_limits_from_csv(self): test_tube = tube.Tube() flange_class = '900' temperature = test_tube._units.quant(400, 'degC') # good pressures manually entered based on values from .csv files good_pressures = { '2.1': 85.3, '2.2': 88.3, '2.3': 72.9 } tests = [] for group, pressure in good_pressures.items(): # read the imported pressure and compare it to the correct pressure test_pressure = test_tube._flange_limits[group] \ .loc[test_tube._flange_limits[group]['Temperature'] == temperature][flange_class].values[0] good_pressure = test_tube._units.quant(pressure, 'bar') tests.append(test_pressure == good_pressure) assert all(tests) def test_get_flange_limits_from_csv_bad_group(self): test_tube = tube.Tube() file_name = 'ASME_B16_5_flange_ratings_group_2_1.csv' file_directory = os.path.join( os.path.dirname(os.path.relpath(tube.__file__)), 'lookup_data') file_location = os.path.join( file_directory, file_name ) match_string = '\n' + file_location + 'not found' # bad group is identified by checking the existence of a .csv fil def fake_os_path_exists(*_): return False with patch( 'os.path.exists', new=fake_os_path_exists ): try: test_tube._get_flange_limits_from_csv() except FileNotFoundError as err: err = str(err) assert match_string == err def test_get_flange_limits_from_csv_bad_pressure(self): test_tube = tube.Tube() match_string = '\nPressure less than zero.' # an error should be thrown when a non-temperature column has a # negative value def fake_read_csv(*_): return pd.DataFrame(columns=['Temperature', '900'], data=[[10, -10]]) with patch( 'pandas.read_csv', new=fake_read_csv ): with pytest.raises( ValueError, match=match_string ): test_tube._get_flange_limits_from_csv() def test_get_flange_limits_from_csv_zeroed_non_numeric(self): test_tube = tube.Tube() # create test dataframe and a dataframe of what the output should # look like after the test dataframe is imported test_temperatures = [9, 's', 'd'] good_temperatures = [9., 0., 0.] test_pressures = ['a', 3, 'f'] good_pressures = [0., 3., 0.] test_dataframe = pd.DataFrame({'Temperature': test_temperatures, 'Pressure': test_pressures}) good_dataframe = pd.DataFrame({'Temperature': good_temperatures, 'Pressure': good_pressures}) # convince the tube to load the test dataframe without having to # write a .csv to disk def fake_read_csv(*_): return test_dataframe with patch( 'pandas.read_csv', new=fake_read_csv ): test_tube._get_flange_limits_from_csv() tests = [] for group in set(test_tube._material_groups.values()): # pull the dataframe of flange limits for each material group # and use applymap to remove units from all pint quantities. # This is done to circumvent an error caused by using # np.allclose for an array of pint quantities. Comparison to # good_dataframe.values is done to avoid having to care about # how the values are distributed by pandas. df = test_tube._flange_limits[group] test_values = df.applymap(lambda x: x.magnitude) test = np.allclose(test_values, good_dataframe.values) tests.append(test) assert all(tests) def test_get_pipe_stress_limits_welded(self): test_tube = tube.Tube( material='304', welded=True ) # known values for 304 welded_values = np.array( [16, 16, 13.3, 12, 11, 10.5, 9.7, 9.5, 9.4, 9.2, 9, 8.8, 8.7, 8.5, 8.3, 8.1, 7.6, 6.5, 5.4]) test_limits = test_tube._get_pipe_stress_limits() test_limits = np.array(test_limits['stress'][1]) assert np.allclose(welded_values, test_limits) def test_get_pipe_stress_limits_seamless(self): test_tube = tube.Tube( material='304', welded=False ) # known values for 304 seamless_values = np.array( [18.8, 18.8, 15.7, 14.1, 13, 12.2, 11.4, 11.3, 11.1, 10.8, 10.6, 10.4, 10.2, 10, 9.8, 9.5, 8.9, 7.7, 6.1]) test_limits = test_tube._get_pipe_stress_limits() test_limits = np.array(test_limits['stress'][1]) assert np.allclose(seamless_values, test_limits) def test_get_pipe_dlf(self): """ Tests get_pipe_dlf Conditions tested: - good input * load factor is 1 * load factor is 2 * load factor is 4 - plus_or_minus outside of (0, 1) - pipe material not in materials list """ test_tube = tube.Tube( material=self.material, schedule=self.schedule, nominal_size=self.nominal_size, welded=self.welded, safety_factor=self.safety_factor ) # from hand calcs, critical velocity is 1457.44 m/s, giving upper and # lower bounds of 1603.188 and 1311.700 m/s cj_speeds = [ test_tube._units.quant(1200, 'm/s'), # DLF 1 test_tube._units.quant(1311, 'm/s'), # DLF 1 test_tube._units.quant(1312, 'm/s'), # DLF 4 test_tube._units.quant(1400, 'm/s'), # DLF 4 test_tube._units.quant(1603, 'm/s'), # DLF 4 test_tube._units.quant(1604, 'm/s'), # DLF 2 test_tube._units.quant(2000, 'm/s') # DLF 2 ] expected_dlf = [1, 1, 4, 4, 4, 2, 2] test_dlf = [] for cj_speed in cj_speeds: test_dlf.append( test_tube._get_pipe_dlf(plus_or_minus=0.1, cj_vel=cj_speed) ) assert all( dlf == good_dlf for dlf, good_dlf in zip(test_dlf, expected_dlf) ) def test_get_pipe_dlf_bad_plus_minus_value(self): test_tube = tube.Tube( material=self.material, schedule=self.schedule, nominal_size=self.nominal_size, welded=self.welded, safety_factor=self.safety_factor ) # plus_or_minus outside of (0, 1) bad_plus_minus = [-1, 0, 1, 2] for plus_minus in bad_plus_minus: with pytest.raises( ValueError, match='plus_or_minus factor not between 0 and 1' ): test_tube._get_pipe_dlf( plus_or_minus=plus_minus, cj_vel=test_tube._units.quant(2, 'm/s') ) def test_calculate_max_stress_seamless(self): test_tube = tube.Tube( material='316L', schedule=self.schedule, nominal_size=self.nominal_size, welded=False, safety_factor=self.safety_factor ) initial_temperatures = [ test_tube._units.quant(100, 'degF'), test_tube._units.quant(200, 'degF'), test_tube._units.quant(150, 'degF') ] # in ksi good_stresses = [ 15.7, 13.3, 14.5 ] for temperature, stress in zip(initial_temperatures, good_stresses): test_tube.initial_temperature = temperature assert np.allclose( test_tube.calculate_max_stress().to('ksi').magnitude, stress ) def test_calculate_max_stress_welded(self): test_tube = tube.Tube( material='304', schedule=self.schedule, nominal_size=self.nominal_size, welded=True, safety_factor=self.safety_factor ) initial_temperatures = [ test_tube._units.quant(650, 'degF'), test_tube._units.quant(700, 'degF'), test_tube._units.quant(675, 'degF') ] # in ksi good_stresses = [ 9.5, 9.4, 9.45 ] for temperature, stress in zip(initial_temperatures, good_stresses): test_tube.initial_temperature = temperature assert np.allclose( test_tube.calculate_max_stress().to('ksi').magnitude, stress ) def test_calculate_max_stress_non_monotonic(self): test_tube = tube.Tube() temp = test_tube._units.quant(100, 'degF') def make_non_monotonic(*_): return { 'temperature': ('degF', [0, 1, -1]), 'stress': ('ksi', [0, 0, 0]) } with patch( 'beaverdet.tube.Tube._get_pipe_stress_limits', new=make_non_monotonic ): with pytest.raises( ValueError, match='Stress limits require temperatures to be ' + 'monotonically increasing' ): test_tube.initial_temperature = temp @staticmethod def test_calculate_max_pressure(): safety_factor = 4 test_tube = tube.Tube( material='304', schedule='80', nominal_size='6', welded=False, safety_factor=safety_factor ) max_stress = test_tube._units.quant(18.8, 'ksi') wall_thickness = test_tube._units.quant(0.432, 'in') outer_diameter = test_tube._units.quant(6.625, 'in') inner_diameter = outer_diameter - 2 * wall_thickness mean_diameter = (inner_diameter + outer_diameter) / 2 asme_fs = 4 good_max_pressure = ( max_stress * (2 * wall_thickness) * asme_fs / (mean_diameter * safety_factor) ).to('Pa').magnitude test_tube.max_stress = max_stress test_max_pressure = test_tube.calculate_max_pressure()\ .to('Pa').magnitude assert np.allclose(test_max_pressure, good_max_pressure) def test_calculate_initial_pressure_no_mp(self): test_tube = tube.Tube( material=self.material, schedule=self.schedule, nominal_size=self.nominal_size, welded=self.welded, safety_factor=self.safety_factor, mechanism='gri30.cti', fuel='H2', oxidizer='O2', equivalence_ratio=1, show_warnings=False, initial_temperature=(300, 'K'), autocalc_initial=True, use_multiprocessing=False ) # the initial pressure should cause the reflected detonation pressure # to be equal to the tube's max pressure, accounting for dynamic load # factor correct_max = test_tube.max_pressure.to('Pa').magnitude test_state = thermochem.calculate_reflected_shock_state( test_tube.initial_temperature, test_tube.initial_pressure, test_tube.reactant_mixture, test_tube.mechanism, test_tube._units.ureg ) error = abs( correct_max - test_state['reflected']['state'].P * test_tube.dynamic_load_factor ) / correct_max assert error <= 0.0005 def test_calculate_initial_pressure_with_mp(self): test_tube = tube.Tube( material=self.material, schedule=self.schedule, nominal_size=self.nominal_size, welded=self.welded, safety_factor=self.safety_factor, mechanism='gri30.cti', fuel='H2', oxidizer='O2', equivalence_ratio=1, show_warnings=False, initial_temperature=(300, 'K'), autocalc_initial=True, use_multiprocessing=True, verbose=True ) # the initial pressure should cause the reflected detonation pressure # to be equal to the tube's max pressure, accounting for dynamic load # factor correct_max = test_tube.max_pressure.to('Pa').magnitude test_state = thermochem.calculate_reflected_shock_state( test_tube.initial_temperature, test_tube.initial_pressure, test_tube.reactant_mixture, test_tube.mechanism, test_tube._units.ureg ) error = abs( correct_max - test_state['reflected']['state'].P * test_tube.dynamic_load_factor ) / correct_max assert error <= 0.0005 def test_lookup_flange_class(self): test_tube = tube.Tube( material=self.material, schedule=self.schedule, nominal_size=self.nominal_size, welded=self.welded, safety_factor=self.safety_factor ) test_tube.max_pressure = test_tube._units.quant(125, 'bar') test_tube.initial_temperature = test_tube._units.quant(350, 'degC') assert test_tube.lookup_flange_class() == 1500 def test_lookup_flange_class_bad_material(self): test_tube = tube.Tube( material=self.material, schedule=self.schedule, nominal_size=self.nominal_size, welded=self.welded, safety_factor=self.safety_factor ) test_tube.max_pressure = test_tube._units.quant(125, 'bar') test_tube.initial_temperature = test_tube._units.quant(350, 'degC') assert test_tube.lookup_flange_class() == 1500 def test_lookup_flange_class_bad_temperature(self): test_tube = tube.Tube( material=self.material, schedule=self.schedule, nominal_size=self.nominal_size, welded=self.welded, safety_factor=self.safety_factor ) test_temperatures = [ test_tube._units.quant(-100, 'degC'), test_tube._units.quant(500, 'degC') ] test_tube.max_pressure = test_tube._units.quant(125, 'bar') for temperature in test_temperatures: # fake out the initial temperature set, because using the property # directly causes flange class to be calculated. Direct calculation # isn't desirable for this test because it is less direct. test_tube._properties['initial_temperature'] = temperature with pytest.raises( ValueError, match='Temperature out of range.' ): test_tube.lookup_flange_class() def test_lookup_flange_class_bad_pressure(self): test_tube = tube.Tube( material=self.material, schedule=self.schedule, nominal_size=self.nominal_size, welded=self.welded, safety_factor=self.safety_factor ) test_tube.initial_temperature = test_tube._units.quant(350, 'degC') test_pressure = test_tube._units.quant(350, ureg.bar) # fake out the initial pressure set, because using the property # directly causes flange class to be calculated. Direct calculation # isn't desirable for this test because it is less direct. test_tube._properties['max_pressure'] = test_pressure with pytest.raises( ValueError, match='Pressure out of range.' ): test_tube.lookup_flange_class()
[ 1, 529, 276, 1112, 420, 29958, 6295, 14093, 16618, 8100, 1666, 2842, 29914, 3629, 12483, 6362, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 15945, 29908, 13, 29925, 4574, 13152, 1660, 29901, 13, 1678, 13223, 6987, 363, 8492, 29889, 2272, 13, 13, 27045, 29928, 6770, 29901, 13, 1678, 529, 5813, 29958, 13, 1678, 25203, 4306, 3014, 13, 1678, 25781, 1525, 322, 18264, 25381, 12016, 13, 1678, 529, 26862, 6227, 29958, 13, 15945, 29908, 13, 13, 13, 3166, 5844, 1053, 18074, 2273, 13, 5215, 11451, 1688, 13, 5215, 16483, 13, 5215, 2897, 13, 5215, 508, 10120, 408, 274, 29873, 13, 5215, 12655, 408, 7442, 13, 5215, 11701, 408, 10518, 13, 3166, 11187, 1053, 13261, 13, 3166, 6317, 1053, 260, 4003, 13, 3166, 6317, 1053, 14563, 2878, 331, 13, 13, 545, 29887, 353, 16483, 29889, 8325, 22579, 580, 13, 12150, 353, 318, 1727, 29889, 22930, 537, 13, 13, 13, 1753, 7252, 29898, 11288, 29892, 9528, 1125, 13, 1678, 363, 1820, 29892, 995, 297, 12219, 29889, 7076, 7295, 13, 4706, 1018, 29901, 13, 9651, 1243, 29918, 1767, 353, 9528, 29961, 1989, 1822, 517, 29898, 1767, 29889, 348, 1169, 29889, 4830, 29918, 28727, 16655, 29885, 4211, 4279, 13, 9651, 995, 353, 995, 29889, 29885, 4211, 4279, 13, 4706, 5174, 23833, 2392, 29901, 13, 9651, 1243, 29918, 1767, 353, 9528, 29961, 1989, 29962, 13, 13, 4706, 4974, 6425, 29898, 1688, 29918, 1767, 448, 995, 29897, 847, 995, 529, 29871, 29896, 29872, 29899, 29946, 13, 13, 13, 29937, 694, 1144, 27988, 10772, 1184, 371, 2954, 13404, 13, 1990, 4321, 29933, 14339, 29901, 13, 1678, 3244, 29918, 2311, 353, 525, 29896, 29914, 29946, 29899, 29906, 29947, 29915, 13, 1678, 3244, 29918, 1990, 353, 525, 29906, 29915, 13, 1678, 15284, 29918, 3317, 29918, 29873, 575, 488, 353, 4323, 29898, 29941, 29900, 29892, 525, 29895, 1039, 1495, 13, 1678, 3033, 5049, 29918, 2848, 353, 4323, 29898, 29900, 29889, 29945, 29892, 525, 262, 1495, 13, 1678, 289, 14339, 29918, 3317, 29918, 29873, 575, 488, 353, 4323, 29898, 29947, 29900, 29892, 525, 29895, 1039, 1495, 13, 13, 1678, 822, 1243, 29918, 15807, 403, 29918, 710, 404, 29918, 598, 294, 29918, 957, 29918, 29896, 29900, 29900, 29895, 1039, 29898, 1311, 1125, 13, 4706, 396, 1243, 289, 14339, 1405, 29871, 29896, 29900, 29900, 29895, 1039, 13, 4706, 289, 14339, 29918, 3317, 29918, 29873, 575, 488, 353, 4323, 29898, 29896, 29906, 29900, 29892, 525, 29895, 1039, 1495, 13, 4706, 1361, 29918, 28667, 353, 426, 13, 9651, 525, 29879, 1037, 29893, 4038, 2396, 4323, 29898, 29900, 29889, 29900, 29941, 29946, 29929, 29941, 29946, 29900, 29946, 29929, 29892, 525, 262, 29985, 29906, 5477, 13, 9651, 525, 2341, 4038, 2396, 4323, 29898, 29900, 29889, 29941, 29900, 29947, 29955, 29946, 29946, 29900, 29947, 29906, 29892, 525, 262, 29985, 29906, 5477, 13, 9651, 525, 1195, 12539, 3033, 5049, 2396, 4323, 29898, 29900, 29889, 29946, 29945, 29906, 29945, 29929, 29945, 29945, 29946, 29946, 29892, 525, 262, 1495, 13, 4706, 500, 13, 4706, 1243, 29918, 598, 294, 353, 260, 4003, 29889, 29933, 14339, 29889, 15807, 403, 29918, 710, 404, 29918, 598, 294, 29898, 13, 9651, 1583, 29889, 7097, 29918, 2311, 29892, 13, 9651, 1583, 29889, 7097, 29918, 1990, 29892, 13, 9651, 289, 14339, 29918, 3317, 29918, 29873, 575, 488, 29892, 13, 9651, 1583, 29889, 2341, 29918, 3317, 29918, 29873, 575, 488, 29892, 13, 9651, 1583, 29889, 996, 5049, 29918, 2848, 29892, 13, 9651, 318, 1727, 13, 4706, 1723, 13, 4706, 7252, 29898, 3179, 29918, 28667, 29892, 1243, 29918, 598, 294, 29897, 13, 13, 1678, 822, 1243, 29918, 15807, 403, 29918, 710, 404, 29918, 598, 294, 29918, 5062, 29918, 29896, 29900, 29900, 29895, 1039, 29898, 1311, 1125, 13, 4706, 396, 1243, 289, 14339, 529, 29871, 29896, 29900, 29900, 29895, 1039, 13, 4706, 289, 14339, 29918, 3317, 29918, 29873, 575, 488, 353, 4323, 29898, 29947, 29900, 29892, 525, 29895, 1039, 1495, 13, 4706, 1361, 29918, 28667, 353, 426, 13, 9651, 525, 29879, 1037, 29893, 4038, 2396, 4323, 29898, 29900, 29889, 29900, 29941, 29953, 29941, 29955, 29946, 29900, 29955, 29941, 29892, 525, 262, 29985, 29906, 5477, 13, 9651, 525, 1195, 12539, 3033, 5049, 2396, 4323, 29898, 29900, 29889, 29941, 29896, 29946, 29896, 29953, 29947, 29900, 29945, 29941, 29892, 525, 262, 1495, 13, 4706, 500, 13, 4706, 1243, 29918, 598, 294, 353, 260, 4003, 29889, 29933, 14339, 29889, 15807, 403, 29918, 710, 404, 29918, 598, 294, 29898, 13, 9651, 1583, 29889, 7097, 29918, 2311, 29892, 13, 9651, 1583, 29889, 7097, 29918, 1990, 29892, 13, 9651, 289, 14339, 29918, 3317, 29918, 29873, 575, 488, 29892, 13, 9651, 1583, 29889, 2341, 29918, 3317, 29918, 29873, 575, 488, 29892, 13, 9651, 1583, 29889, 996, 5049, 29918, 2848, 29892, 13, 9651, 318, 1727, 13, 4706, 1723, 13, 4706, 7252, 29898, 3179, 29918, 28667, 29892, 1243, 29918, 598, 294, 29897, 13, 13, 1678, 822, 1243, 29918, 15807, 403, 29918, 710, 404, 29918, 598, 294, 29918, 2848, 29918, 517, 29877, 29918, 12759, 29898, 1311, 1125, 13, 4706, 396, 9801, 9177, 746, 3033, 5049, 3309, 529, 9212, 13, 4706, 3033, 5049, 29918, 2848, 353, 4323, 29898, 29900, 29889, 29900, 29945, 29892, 525, 262, 1495, 13, 4706, 411, 11451, 1688, 29889, 4495, 1983, 29898, 13, 18884, 24412, 29892, 13, 18884, 1993, 2433, 29903, 1037, 5652, 4418, 297, 1183, 279, 29892, 451, 260, 2673, 6169, 718, 13, 462, 418, 525, 1858, 403, 1122, 367, 5625, 4063, 6169, 718, 13, 462, 418, 525, 10056, 10231, 289, 14339, 3033, 5049, 3309, 29915, 13, 308, 1125, 13, 9651, 260, 4003, 29889, 29933, 14339, 29889, 15807, 403, 29918, 710, 404, 29918, 598, 294, 29898, 13, 18884, 1583, 29889, 7097, 29918, 2311, 29892, 13, 18884, 1583, 29889, 7097, 29918, 1990, 29892, 13, 18884, 1583, 29889, 2095, 29873, 29918, 3317, 29918, 29873, 575, 488, 29892, 13, 18884, 1583, 29889, 2341, 29918, 3317, 29918, 29873, 575, 488, 29892, 13, 18884, 3033, 5049, 29918, 2848, 29892, 13, 18884, 318, 1727, 13, 9651, 1723, 13, 13, 1678, 732, 7959, 5696, 13, 1678, 822, 1243, 29918, 5215, 29918, 7097, 29918, 5965, 2395, 7295, 13, 4706, 396, 1781, 1881, 13, 4706, 1243, 29918, 2311, 353, 525, 29900, 29899, 29947, 29900, 29915, 13, 4706, 1243, 29918, 1853, 353, 6024, 23176, 742, 525, 7564, 2033, 13, 4706, 1243, 29918, 6799, 353, 525, 29886, 2335, 24235, 4236, 29915, 13, 4706, 1243, 29918, 13203, 353, 518, 1839, 29906, 29909, 742, 525, 29941, 29909, 7464, 6024, 29906, 29933, 742, 525, 29941, 29933, 2033, 29962, 13, 4706, 1781, 29918, 2914, 353, 5519, 29900, 29889, 29900, 29945, 29896, 29946, 29892, 29871, 29900, 29889, 29900, 29945, 29896, 29929, 1402, 518, 29900, 29889, 29900, 29945, 29946, 29906, 29892, 29871, 29900, 29889, 29900, 29945, 29941, 29953, 5262, 13, 4706, 2702, 800, 353, 260, 4003, 29889, 29933, 14339, 3032, 5215, 29918, 7097, 29918, 5965, 2395, 580, 13, 4706, 363, 3244, 29892, 4413, 29892, 3806, 297, 14319, 29898, 1688, 29918, 1853, 29892, 1243, 29918, 13203, 29892, 13, 462, 462, 632, 1781, 29918, 2914, 1125, 13, 9651, 396, 1423, 363, 1959, 1962, 13, 9651, 1857, 29918, 2557, 353, 2702, 800, 29961, 7097, 29962, 13, 9651, 363, 3244, 29918, 1990, 29892, 1121, 297, 14319, 29898, 13203, 29892, 3806, 1125, 13, 18884, 1243, 29918, 2914, 353, 1857, 29918, 2557, 29961, 1688, 29918, 6799, 3816, 1688, 29918, 2311, 3816, 13, 462, 1678, 3244, 29918, 1990, 29962, 13, 18884, 4974, 6425, 29898, 1688, 29918, 2914, 448, 1121, 29897, 529, 29871, 29896, 29872, 29899, 29955, 13, 13, 1678, 732, 7959, 5696, 13, 1678, 822, 1243, 29918, 657, 29918, 7097, 29918, 6799, 7295, 13, 4706, 396, 1781, 1881, 13, 4706, 1781, 29918, 5085, 353, 518, 13, 9651, 518, 13, 18884, 525, 29886, 2335, 24235, 4236, 742, 13, 18884, 525, 29896, 29914, 29946, 29899, 29906, 29900, 742, 13, 18884, 525, 29906, 29933, 742, 13, 18884, 318, 1727, 13, 9651, 21251, 13, 9651, 518, 13, 18884, 525, 29886, 2335, 24235, 4236, 742, 13, 18884, 525, 29896, 29914, 29946, 29899, 29906, 29900, 742, 13, 18884, 525, 29906, 29909, 742, 13, 18884, 318, 1727, 13, 9651, 4514, 13, 4706, 4514, 13, 4706, 1781, 29918, 9902, 353, 518, 13, 632, 29900, 29889, 29906, 29906, 29946, 29947, 29892, 13, 632, 29900, 29889, 29906, 29896, 29953, 29946, 13, 4706, 4514, 13, 4706, 363, 6389, 29892, 1121, 297, 14319, 29898, 16773, 29918, 5085, 29892, 1781, 29918, 9902, 1125, 13, 9651, 1243, 29918, 2914, 353, 260, 4003, 29889, 29933, 14339, 29889, 657, 29918, 7097, 29918, 6799, 10456, 5085, 29897, 13, 13, 9651, 4974, 6425, 29898, 1688, 29918, 2914, 29889, 29885, 4211, 4279, 448, 1121, 29897, 529, 29871, 29896, 29872, 29899, 29955, 13, 13, 1678, 732, 7959, 5696, 13, 1678, 822, 1243, 29918, 657, 29918, 7097, 29918, 6799, 29918, 1333, 29918, 262, 29918, 1272, 2557, 7295, 13, 4706, 848, 19935, 353, 260, 4003, 29889, 29933, 14339, 3032, 5215, 29918, 7097, 29918, 5965, 2395, 580, 13, 4706, 396, 2875, 451, 297, 12205, 13, 4706, 4319, 29918, 6799, 353, 525, 29926, 3156, 29915, 13, 4706, 4319, 29918, 4906, 353, 313, 13, 18884, 525, 4899, 2875, 320, 4907, 718, 13, 18884, 4319, 29918, 6799, 718, 13, 18884, 11297, 29915, 451, 1476, 29889, 7740, 3106, 1580, 29879, 29901, 525, 718, 13, 18884, 376, 11838, 718, 376, 742, 525, 1642, 7122, 29898, 1272, 19935, 1839, 7564, 13359, 8149, 3101, 718, 376, 11838, 13, 4706, 1723, 13, 4706, 411, 11451, 1688, 29889, 336, 4637, 29898, 13, 18884, 7670, 2392, 29892, 13, 18884, 1993, 29922, 12313, 29918, 4906, 13, 308, 1125, 13, 9651, 260, 4003, 29889, 29933, 14339, 29889, 657, 29918, 7097, 29918, 6799, 29898, 13, 18884, 4319, 29918, 6799, 29892, 13, 18884, 525, 29896, 29914, 29946, 29899, 29906, 29900, 742, 13, 18884, 525, 29906, 29933, 742, 13, 18884, 318, 1727, 13, 9651, 1723, 13, 13, 1678, 732, 7959, 5696, 13, 1678, 822, 1243, 29918, 657, 29918, 7097, 29918, 6799, 29918, 20965, 29918, 1990, 7295, 13, 4706, 4319, 29918, 5085, 353, 518, 13, 9651, 518, 13, 18884, 525, 29886, 2335, 24235, 4236, 742, 13, 18884, 525, 29896, 29914, 29946, 29899, 29906, 29900, 742, 13, 18884, 525, 29906, 29943, 742, 13, 18884, 318, 1727, 13, 9651, 21251, 13, 9651, 518, 13, 18884, 525, 29886, 2335, 24235, 4236, 742, 13, 18884, 525, 29896, 29914, 29946, 29899, 29906, 29900, 742, 13, 18884, 525, 29953, 29909, 742, 13, 18884, 318, 1727, 13, 9651, 4514, 13, 4706, 4514, 13, 4706, 363, 6389, 297, 4319, 29918, 5085, 29901, 13, 9651, 411, 11451, 1688, 29889, 336, 4637, 29898, 13, 18884, 7865, 2392, 29892, 13, 18884, 1993, 2433, 12313, 3244, 770, 29915, 13, 632, 1125, 13, 18884, 260, 4003, 29889, 29933, 14339, 29889, 657, 29918, 7097, 29918, 6799, 10456, 5085, 29897, 13, 13, 1678, 732, 7959, 5696, 13, 1678, 822, 1243, 29918, 657, 29918, 7097, 29918, 6799, 29918, 20965, 29918, 2311, 7295, 13, 4706, 4319, 29918, 2311, 353, 525, 29896, 29906, 29929, 29900, 29899, 29941, 29941, 29915, 13, 4706, 4319, 29918, 4906, 353, 313, 13, 18884, 525, 4899, 2159, 320, 4907, 718, 13, 18884, 4319, 29918, 2311, 718, 13, 18884, 11297, 29915, 451, 1476, 29915, 13, 4706, 1723, 13, 4706, 411, 11451, 1688, 29889, 336, 4637, 29898, 13, 18884, 7670, 2392, 29892, 13, 18884, 1993, 29922, 12313, 29918, 4906, 13, 308, 1125, 13, 9651, 260, 4003, 29889, 29933, 14339, 29889, 657, 29918, 7097, 29918, 6799, 29898, 13, 18884, 525, 29886, 2335, 24235, 4236, 742, 13, 18884, 4319, 29918, 2311, 29892, 13, 18884, 525, 29906, 29933, 742, 13, 18884, 318, 1727, 13, 9651, 1723, 13, 13, 13, 1990, 4321, 7858, 29911, 29901, 13, 1678, 24235, 353, 4323, 29898, 29945, 29889, 29955, 29953, 29892, 318, 1727, 29889, 22466, 29897, 13, 13, 1678, 396, 671, 263, 5190, 24235, 304, 1993, 24235, 29899, 14940, 1819, 515, 6492, 13, 1678, 260, 4003, 29918, 29881, 2829, 1308, 353, 4323, 29898, 29896, 29892, 525, 29391, 1495, 13, 13, 1678, 396, 4529, 10489, 29544, 322, 8018, 16483, 26855, 13, 1678, 13336, 353, 525, 29887, 374, 29941, 29900, 29889, 312, 29875, 29915, 13, 1678, 10489, 353, 274, 29873, 29889, 13296, 918, 29898, 1004, 5083, 1608, 29897, 13, 1678, 10489, 29889, 3557, 353, 29871, 29941, 29900, 29900, 29892, 29871, 29896, 29900, 29896, 29941, 29906, 29945, 13, 1678, 2847, 29918, 12863, 1535, 353, 4323, 29898, 25496, 29889, 29911, 29892, 525, 29968, 1495, 13, 1678, 2847, 29918, 2139, 545, 353, 4323, 29898, 25496, 29889, 29925, 29892, 525, 11868, 1495, 13, 1678, 10489, 29889, 842, 29918, 1686, 2561, 663, 29918, 3605, 601, 29898, 29896, 29892, 525, 3210, 29946, 742, 11117, 29949, 29906, 2396, 29871, 29896, 29892, 525, 29940, 29906, 2396, 29871, 29941, 29889, 29955, 29953, 1800, 13, 1678, 6606, 29918, 8977, 353, 10489, 29889, 29885, 1772, 29918, 29888, 13857, 29918, 8977, 580, 13, 13, 1678, 822, 1243, 29918, 15807, 403, 29918, 1028, 19647, 29918, 29881, 2829, 1308, 29898, 1311, 1125, 13, 4706, 396, 4529, 263, 2908, 482, 11959, 13, 4706, 1243, 29918, 1271, 482, 29918, 3605, 601, 353, 29871, 29900, 29889, 29946, 29946, 13, 13, 4706, 396, 4529, 3806, 1121, 322, 3935, 1121, 13, 4706, 3806, 29918, 1028, 19647, 29918, 29881, 2829, 1308, 353, 313, 13, 18884, 1583, 29889, 29881, 2829, 1308, 847, 29871, 29906, 334, 313, 29896, 448, 18074, 2273, 29898, 29896, 448, 1243, 29918, 1271, 482, 29918, 3605, 601, 876, 13, 4706, 1723, 13, 4706, 1121, 353, 260, 4003, 29889, 7858, 29911, 29889, 15807, 403, 29918, 1028, 19647, 29918, 29881, 2829, 1308, 29898, 13, 9651, 1583, 29889, 29881, 2829, 1308, 29892, 13, 9651, 1243, 29918, 1271, 482, 29918, 3605, 601, 13, 4706, 1723, 13, 13, 4706, 396, 9801, 1781, 1962, 13, 4706, 4974, 3806, 29918, 1028, 19647, 29918, 29881, 2829, 1308, 1275, 1121, 29889, 517, 29898, 545, 29887, 29889, 22466, 29897, 13, 13, 1678, 822, 1243, 29918, 15807, 403, 29918, 1028, 19647, 29918, 29881, 2829, 1308, 29918, 5464, 29918, 21574, 29918, 1182, 29898, 1311, 1125, 13, 4706, 396, 9801, 1571, 11415, 411, 1661, 29899, 21574, 2908, 482, 11959, 13, 4706, 411, 11451, 1688, 29889, 336, 4637, 29898, 13, 18884, 7865, 2392, 29892, 13, 18884, 1993, 2433, 12283, 29899, 21574, 2908, 482, 11959, 6169, 13, 308, 1125, 13, 9651, 396, 694, 1144, 27988, 10772, 1542, 5596, 261, 13, 9651, 260, 4003, 29889, 7858, 29911, 29889, 15807, 403, 29918, 1028, 19647, 29918, 29881, 2829, 1308, 29898, 13, 18884, 1583, 29889, 29881, 2829, 1308, 29892, 13, 18884, 525, 1867, 21744, 537, 437, 29877, 29915, 13, 9651, 1723, 13, 13, 1678, 822, 1243, 29918, 15807, 403, 29918, 1028, 19647, 29918, 29881, 2829, 1308, 29918, 12313, 29918, 1182, 29898, 1311, 1125, 13, 4706, 396, 9801, 1571, 11415, 411, 2908, 482, 11959, 5377, 2758, 519, 13071, 13, 4706, 4319, 29918, 1271, 482, 29918, 29878, 2219, 359, 353, 21069, 29941, 29945, 29889, 29896, 29906, 29946, 29892, 29871, 29900, 29892, 29871, 29896, 29892, 29871, 29896, 29906, 29900, 29889, 29941, 29946, 29962, 13, 4706, 363, 11959, 297, 4319, 29918, 1271, 482, 29918, 29878, 2219, 359, 29901, 13, 9651, 411, 11451, 1688, 29889, 336, 4637, 29898, 13, 462, 1678, 7865, 2392, 29892, 13, 462, 1678, 1993, 2433, 7445, 482, 11959, 5377, 310, 29871, 29900, 29966, 15176, 29966, 29896, 29915, 13, 632, 1125, 13, 18884, 260, 4003, 29889, 7858, 29911, 29889, 15807, 403, 29918, 1028, 19647, 29918, 29881, 2829, 1308, 29898, 13, 462, 1678, 1583, 29889, 29881, 2829, 1308, 29892, 13, 462, 1678, 11959, 13, 18884, 1723, 13, 13, 1678, 732, 7959, 5696, 13, 1678, 822, 1243, 29918, 15807, 403, 29918, 1271, 482, 29918, 3605, 601, 7295, 13, 4706, 1361, 29918, 28667, 29918, 1271, 482, 29918, 3605, 601, 353, 29871, 29900, 29889, 29946, 29946, 29946, 29906, 29946, 29906, 29941, 29906, 29953, 29955, 29896, 29955, 29953, 29955, 29929, 13, 13, 4706, 396, 1423, 363, 3806, 1121, 411, 1781, 1881, 13, 4706, 1243, 29918, 2914, 353, 260, 4003, 29889, 7858, 29911, 29889, 15807, 403, 29918, 1271, 482, 29918, 3605, 601, 29898, 13, 9651, 4323, 29898, 29941, 29889, 29946, 29941, 29947, 29892, 318, 1727, 29889, 22466, 511, 13, 9651, 4323, 29898, 29955, 29889, 847, 29871, 29896, 29953, 1696, 318, 1727, 29889, 22466, 29897, 13, 4706, 1723, 13, 4706, 4974, 313, 1688, 29918, 2914, 448, 1361, 29918, 28667, 29918, 1271, 482, 29918, 3605, 601, 29897, 529, 29871, 29896, 29872, 29899, 29947, 13, 13, 1678, 732, 7959, 5696, 13, 1678, 822, 1243, 29918, 15807, 403, 29918, 1271, 482, 29918, 3605, 601, 29918, 29900, 29918, 29873, 4003, 29918, 29881, 2829, 1308, 7295, 13, 4706, 411, 11451, 1688, 29889, 336, 4637, 29898, 13, 9651, 7865, 2392, 29892, 13, 9651, 1993, 2433, 29873, 4003, 3553, 2609, 367, 29871, 29900, 29915, 13, 308, 1125, 13, 9651, 260, 4003, 29889, 7858, 29911, 29889, 15807, 403, 29918, 1271, 482, 29918, 3605, 601, 29898, 13, 18884, 4323, 29898, 29900, 29892, 318, 1727, 29889, 22466, 511, 13, 18884, 4323, 29898, 29955, 29889, 847, 29871, 29896, 29953, 1696, 318, 1727, 29889, 22466, 29897, 13, 9651, 1723, 13, 13, 1678, 822, 1243, 29918, 15807, 403, 29918, 1271, 482, 29918, 3605, 601, 29918, 1271, 482, 29918, 4141, 29918, 29873, 4003, 29898, 1311, 1125, 13, 4706, 396, 1423, 363, 1959, 11415, 746, 2908, 482, 24235, 6736, 260, 4003, 24235, 13, 4706, 411, 11451, 1688, 29889, 336, 4637, 29898, 13, 18884, 7865, 2392, 29892, 13, 18884, 1993, 2433, 1271, 482, 24235, 6736, 260, 4003, 24235, 29915, 13, 308, 1125, 13, 9651, 260, 4003, 29889, 7858, 29911, 29889, 15807, 403, 29918, 1271, 482, 29918, 3605, 601, 29898, 13, 18884, 4323, 29898, 29896, 29892, 318, 1727, 29889, 22466, 511, 13, 18884, 4323, 29898, 29941, 29892, 318, 1727, 29889, 22466, 29897, 13, 9651, 1723, 13, 13, 1678, 822, 1243, 29918, 15807, 403, 29918, 1289, 29873, 29918, 3389, 29918, 786, 29918, 12313, 29918, 1271, 482, 29918, 3605, 601, 29898, 1311, 1125, 13, 4706, 4319, 29918, 1271, 1179, 353, 21069, 29946, 1696, 29871, 29900, 29892, 29871, 29896, 29962, 13, 4706, 363, 2908, 482, 29918, 3605, 601, 297, 4319, 29918, 1271, 1179, 29901, 13, 9651, 411, 11451, 1688, 29889, 336, 4637, 29898, 13, 462, 1678, 7865, 2392, 29892, 13, 462, 1678, 1993, 2433, 7445, 482, 11959, 5377, 310, 19869, 3464, 29915, 13, 632, 1125, 13, 18884, 260, 4003, 29889, 7858, 29911, 29889, 15807, 403, 29918, 3389, 29918, 786, 29898, 13, 462, 1678, 2908, 482, 29918, 3605, 601, 29892, 13, 462, 1678, 1583, 29889, 29873, 4003, 29918, 29881, 2829, 1308, 29892, 13, 462, 1678, 1583, 29889, 11228, 29918, 12863, 1535, 29892, 13, 462, 1678, 1583, 29889, 11228, 29918, 2139, 545, 29892, 13, 462, 1678, 1583, 29889, 24091, 29918, 8977, 29892, 13, 462, 1678, 1583, 29889, 1004, 5083, 1608, 29892, 13, 462, 1678, 318, 1727, 13, 18884, 1723, 13, 13, 1678, 822, 1243, 29918, 15807, 403, 29918, 1289, 29873, 29918, 3389, 29918, 786, 29898, 1311, 1125, 13, 4706, 396, 4529, 1781, 2908, 482, 364, 2219, 359, 322, 3806, 1121, 515, 1269, 13, 4706, 1781, 29918, 1271, 1179, 353, 518, 29900, 29889, 29896, 29892, 29871, 29900, 29889, 29906, 29892, 29871, 29900, 29889, 29941, 29892, 29871, 29900, 29889, 29955, 29945, 29962, 13, 4706, 1781, 29918, 9902, 353, 518, 13, 632, 29946, 29947, 29889, 29945, 29896, 29941, 29947, 29945, 29941, 29929, 29900, 29946, 29906, 29947, 29906, 29896, 29896, 29892, 13, 632, 29906, 29929, 29889, 29906, 29946, 29946, 29941, 29941, 29906, 29946, 29929, 29941, 29955, 29900, 29906, 29955, 29955, 29892, 13, 632, 29896, 29947, 29889, 29896, 29941, 29953, 29900, 29906, 29900, 29896, 29945, 29896, 29896, 29941, 29941, 29946, 29929, 29946, 29892, 13, 632, 29946, 29889, 29955, 29953, 29900, 29955, 29900, 29945, 29906, 29947, 29929, 29953, 29955, 29906, 29945, 29946, 13, 4706, 4514, 13, 13, 4706, 396, 1243, 411, 1781, 10970, 13, 4706, 363, 2908, 482, 29918, 3605, 601, 29892, 1121, 297, 14319, 29898, 16773, 29918, 1271, 1179, 29892, 1781, 29918, 9902, 1125, 13, 9651, 1243, 29918, 3389, 786, 353, 260, 4003, 29889, 7858, 29911, 29889, 15807, 403, 29918, 3389, 29918, 786, 29898, 13, 18884, 2908, 482, 29918, 3605, 601, 29892, 13, 18884, 1583, 29889, 29873, 4003, 29918, 29881, 2829, 1308, 29892, 13, 18884, 1583, 29889, 11228, 29918, 12863, 1535, 29892, 13, 18884, 1583, 29889, 11228, 29918, 2139, 545, 29892, 13, 18884, 1583, 29889, 24091, 29918, 8977, 29892, 13, 18884, 1583, 29889, 1004, 5083, 1608, 29892, 13, 18884, 318, 1727, 29892, 13, 18884, 8576, 29918, 6550, 2450, 2433, 29887, 374, 29941, 29900, 29918, 28084, 29915, 13, 9651, 1723, 13, 13, 9651, 4974, 29871, 29900, 29889, 29945, 334, 1121, 5277, 1243, 29918, 3389, 786, 29889, 29885, 4211, 4279, 5277, 29871, 29896, 29889, 29945, 334, 1121, 13, 13, 13, 1990, 4321, 5907, 29901, 13, 1678, 2920, 353, 4323, 29898, 29945, 29900, 29892, 318, 1727, 29889, 4317, 467, 517, 29898, 545, 29887, 29889, 22466, 29897, 13, 1678, 3309, 353, 4323, 29898, 29906, 29900, 29892, 318, 1727, 29889, 4317, 467, 517, 29898, 545, 29887, 29889, 26763, 29897, 13, 1678, 12959, 353, 4323, 29898, 29896, 29892, 318, 1727, 29889, 271, 29885, 467, 517, 29898, 545, 29887, 29889, 7345, 29878, 29897, 13, 1678, 12003, 2264, 353, 4323, 29898, 29896, 29889, 29906, 29892, 318, 1727, 29889, 4317, 467, 517, 29898, 545, 29887, 29889, 29888, 2271, 549, 29897, 13, 1678, 5796, 415, 545, 29918, 1545, 14999, 353, 4323, 29898, 29945, 29941, 29900, 29900, 29892, 318, 1727, 29889, 6134, 467, 517, 29898, 545, 29887, 29889, 4317, 29950, 29887, 29897, 13, 13, 1678, 822, 1243, 29918, 29879, 2142, 3305, 29918, 19790, 29898, 1311, 1125, 13, 4706, 7429, 29918, 29879, 2142, 3305, 29918, 19790, 353, 29871, 29946, 13, 13, 4706, 1243, 29918, 4668, 353, 260, 4003, 29889, 5907, 29889, 29879, 2142, 3305, 29918, 19790, 29898, 13, 9651, 1583, 29889, 2848, 29892, 13, 9651, 1583, 29889, 2103, 29892, 13, 9651, 1583, 29889, 27996, 2264, 29892, 13, 9651, 1583, 29889, 2139, 545, 29892, 13, 9651, 1583, 29889, 6685, 545, 29918, 1545, 14999, 13, 4706, 1723, 13, 13, 4706, 4974, 6425, 29898, 1688, 29918, 4668, 448, 7429, 29918, 29879, 2142, 3305, 29918, 19790, 29897, 847, 1243, 29918, 4668, 529, 29871, 29900, 29889, 29900, 29896, 13, 13, 1678, 822, 1243, 29918, 1195, 12539, 29918, 27996, 2264, 29918, 4668, 29918, 2222, 29918, 27603, 29918, 29896, 29898, 1311, 1125, 13, 4706, 396, 15332, 7329, 529, 29871, 29896, 13, 4706, 15332, 29918, 19790, 353, 518, 29900, 29889, 29906, 29945, 29892, 448, 29955, 29962, 13, 4706, 363, 7329, 297, 15332, 29918, 19790, 29901, 13, 9651, 411, 11451, 1688, 29889, 336, 4637, 29898, 13, 462, 1678, 7865, 2392, 29892, 13, 462, 1678, 1993, 2433, 5907, 15332, 7329, 529, 29871, 29896, 29915, 13, 632, 1125, 13, 18884, 260, 4003, 29889, 5907, 29889, 1195, 12539, 29918, 27996, 2264, 29898, 13, 462, 1678, 1583, 29889, 2848, 29892, 13, 462, 1678, 1583, 29889, 2103, 29892, 13, 462, 1678, 7329, 29892, 13, 462, 1678, 1583, 29889, 2139, 545, 29892, 13, 462, 1678, 1583, 29889, 6685, 545, 29918, 1545, 14999, 29892, 13, 462, 1678, 318, 1727, 13, 18884, 1723, 13, 13, 1678, 822, 1243, 29918, 1195, 12539, 29918, 27996, 2264, 29918, 4668, 29918, 5464, 29918, 21574, 29898, 1311, 1125, 13, 4706, 15332, 29918, 19790, 353, 525, 29933, 582, 346, 29907, 1160, 12562, 29915, 13, 4706, 411, 11451, 1688, 29889, 336, 4637, 29898, 13, 18884, 20948, 29892, 13, 18884, 1993, 2433, 12283, 29899, 21574, 3474, 15332, 7329, 29915, 13, 308, 1125, 13, 9651, 396, 694, 1144, 27988, 10772, 1542, 5596, 261, 13, 9651, 260, 4003, 29889, 5907, 29889, 1195, 12539, 29918, 27996, 2264, 29898, 13, 18884, 1583, 29889, 2848, 29892, 13, 18884, 1583, 29889, 2103, 29892, 13, 18884, 15332, 29918, 19790, 29892, 13, 18884, 1583, 29889, 2139, 545, 29892, 13, 18884, 1583, 29889, 6685, 545, 29918, 1545, 14999, 29892, 13, 18884, 318, 1727, 13, 9651, 1723, 13, 13, 1678, 822, 1243, 29918, 1195, 12539, 29918, 27996, 2264, 29898, 1311, 1125, 13, 4706, 15332, 29918, 19790, 353, 29871, 29946, 13, 4706, 1243, 29918, 27996, 2264, 353, 260, 4003, 29889, 5907, 29889, 1195, 12539, 29918, 27996, 2264, 29898, 13, 9651, 1583, 29889, 2848, 29892, 13, 9651, 1583, 29889, 2103, 29892, 13, 9651, 15332, 29918, 19790, 29892, 13, 9651, 1583, 29889, 2139, 545, 29892, 13, 9651, 1583, 29889, 6685, 545, 29918, 1545, 14999, 29892, 13, 9651, 318, 1727, 13, 4706, 1723, 13, 4706, 1243, 29918, 27996, 2264, 353, 1243, 29918, 27996, 2264, 29889, 517, 29898, 1311, 29889, 27996, 2264, 29889, 348, 1169, 467, 29885, 4211, 4279, 13, 4706, 7429, 29918, 27996, 2264, 353, 1583, 29889, 27996, 2264, 29889, 29885, 4211, 4279, 13, 4706, 4974, 6425, 29898, 1688, 29918, 27996, 2264, 448, 7429, 29918, 27996, 2264, 29897, 847, 1243, 29918, 27996, 2264, 529, 29871, 29900, 29889, 29900, 29896, 13, 13, 1678, 732, 7959, 5696, 13, 1678, 822, 1243, 29918, 2929, 369, 29918, 15866, 549, 29918, 4537, 29918, 5085, 7295, 13, 4706, 6389, 353, 518, 13, 9651, 426, 13, 18884, 525, 2848, 2396, 29871, 29945, 29892, 13, 18884, 525, 2103, 2396, 29871, 29946, 29892, 13, 18884, 525, 27996, 2264, 2396, 29871, 29906, 29892, 13, 18884, 525, 2139, 545, 2396, 29871, 29906, 13, 9651, 2981, 13, 9651, 426, 13, 18884, 525, 2848, 2396, 29871, 29945, 29892, 13, 18884, 525, 2103, 2396, 29871, 29946, 29892, 13, 18884, 525, 27996, 2264, 2396, 29871, 29906, 29892, 13, 18884, 525, 2139, 545, 2396, 29871, 29906, 29892, 13, 18884, 525, 6685, 545, 29918, 1545, 14999, 2396, 29871, 29896, 29900, 29892, 13, 18884, 525, 29879, 2142, 3305, 29918, 19790, 2396, 29871, 29946, 13, 9651, 500, 13, 4706, 4514, 13, 4706, 363, 2980, 29918, 8977, 297, 6389, 29901, 13, 9651, 411, 11451, 1688, 29889, 336, 4637, 29898, 13, 462, 1678, 7865, 2392, 29892, 13, 462, 1678, 1993, 2433, 797, 15728, 1353, 310, 6273, 2665, 304, 899, 369, 29915, 13, 632, 1125, 13, 18884, 260, 4003, 29889, 5907, 29889, 2929, 369, 29898, 1068, 23516, 29918, 8977, 29897, 13, 13, 1678, 732, 7959, 5696, 13, 1678, 822, 1243, 29918, 2929, 369, 29918, 12313, 29918, 11022, 1191, 7295, 13, 4706, 9049, 5085, 353, 426, 13, 9651, 525, 2848, 2396, 29871, 29945, 29892, 13, 9651, 525, 2103, 2396, 29871, 29946, 29892, 13, 9651, 525, 27996, 2264, 2396, 29871, 29906, 29892, 13, 9651, 525, 2139, 545, 2396, 29871, 29906, 29892, 13, 9651, 525, 29886, 352, 839, 29918, 29886, 548, 2396, 29871, 29929, 13, 4706, 500, 13, 4706, 411, 11451, 1688, 29889, 336, 4637, 29898, 13, 18884, 7865, 2392, 29892, 13, 18884, 1993, 2433, 22050, 13553, 2980, 3583, 9302, 352, 839, 29918, 29886, 548, 29915, 13, 308, 1125, 13, 9651, 260, 4003, 29889, 5907, 29889, 2929, 369, 29898, 1068, 19290, 29897, 13, 13, 1678, 732, 7959, 5696, 13, 1678, 822, 1243, 29918, 2929, 369, 29918, 326, 351, 3821, 29918, 2914, 7295, 13, 4706, 9049, 5085, 353, 426, 13, 9651, 525, 2848, 2396, 29871, 29906, 29900, 29892, 13, 9651, 525, 2103, 2396, 29871, 29945, 29900, 29892, 13, 9651, 525, 29879, 2142, 3305, 29918, 19790, 2396, 29871, 29946, 29892, 13, 9651, 525, 2139, 545, 2396, 448, 29896, 29941, 29929, 29892, 13, 9651, 525, 6685, 545, 29918, 1545, 14999, 2396, 29871, 29945, 29941, 29900, 29900, 13, 4706, 500, 13, 4706, 411, 11451, 1688, 29889, 4495, 1983, 29898, 13, 18884, 24412, 29892, 13, 18884, 1993, 2433, 5907, 10970, 20601, 297, 6382, 3821, 1650, 6169, 13, 308, 1125, 13, 9651, 1243, 29918, 13707, 353, 260, 4003, 29889, 5907, 29889, 2929, 369, 29898, 1068, 19290, 29897, 13, 13, 4706, 4974, 1243, 29918, 13707, 338, 7442, 29889, 13707, 13, 13, 1678, 732, 7959, 5696, 13, 1678, 822, 1243, 29918, 2929, 369, 7295, 13, 4706, 6389, 353, 518, 13, 9651, 426, 13, 18884, 525, 2848, 2396, 29871, 29906, 29900, 29892, 13, 18884, 525, 2103, 2396, 29871, 29945, 29900, 29892, 13, 18884, 525, 29879, 2142, 3305, 29918, 19790, 2396, 29871, 29946, 29892, 13, 18884, 525, 2139, 545, 2396, 29871, 29896, 29946, 29889, 29955, 29892, 13, 18884, 525, 6685, 545, 29918, 1545, 14999, 2396, 29871, 29945, 29941, 29900, 29900, 13, 9651, 2981, 13, 9651, 426, 13, 18884, 525, 2848, 2396, 29871, 29906, 29900, 29892, 13, 18884, 525, 2103, 2396, 29871, 29945, 29900, 29892, 13, 18884, 525, 27996, 2264, 2396, 29871, 29896, 29889, 29906, 29892, 13, 18884, 525, 2139, 545, 2396, 29871, 29896, 29946, 29889, 29955, 29892, 13, 18884, 525, 6685, 545, 29918, 1545, 14999, 2396, 29871, 29945, 29941, 29900, 29900, 13, 9651, 500, 13, 4706, 4514, 13, 4706, 1781, 29918, 2929, 17925, 353, 518, 29896, 29889, 29906, 29892, 29871, 29946, 5586, 13, 4706, 363, 2380, 297, 3464, 29898, 2435, 29898, 5085, 22164, 13, 9651, 1243, 29918, 4905, 353, 260, 4003, 29889, 5907, 29889, 2929, 369, 29898, 1068, 5085, 29961, 2248, 2314, 13, 9651, 4974, 6425, 29898, 1688, 29918, 4905, 448, 1781, 29918, 2929, 17925, 29961, 2248, 2314, 529, 29871, 29900, 29889, 29896, 13, 13, 1678, 732, 7959, 5696, 13, 1678, 822, 1243, 29918, 15807, 403, 29918, 7165, 29918, 2095, 29873, 29918, 4668, 7295, 13, 4706, 4236, 29918, 2139, 545, 353, 4323, 29898, 29896, 29953, 29941, 29896, 29889, 29955, 29892, 525, 6134, 1495, 13, 4706, 3474, 29918, 6203, 353, 4323, 29898, 29945, 29889, 29955, 29945, 334, 29871, 29906, 29889, 29945, 29892, 525, 262, 29985, 29906, 1495, 13, 4706, 954, 29918, 2095, 1372, 353, 29871, 29906, 29900, 13, 4706, 3244, 29918, 2311, 353, 525, 29896, 29914, 29946, 29899, 29906, 29947, 29915, 13, 4706, 3244, 29918, 1990, 353, 525, 29906, 29915, 13, 4706, 289, 14339, 29918, 3317, 29918, 29873, 575, 488, 353, 4323, 29898, 29896, 29906, 29900, 29892, 525, 29895, 1039, 1495, 13, 4706, 15284, 29918, 3317, 29918, 29873, 575, 488, 353, 4323, 29898, 29941, 29900, 29892, 525, 29895, 1039, 1495, 13, 4706, 3033, 5049, 29918, 2848, 353, 4323, 29898, 29900, 29889, 29945, 29892, 525, 262, 1495, 13, 13, 4706, 1361, 29918, 28667, 353, 426, 13, 9651, 525, 2095, 29873, 2396, 29871, 29941, 29889, 29953, 29900, 29953, 29929, 29953, 29947, 29900, 29906, 29947, 29892, 13, 9651, 525, 2341, 2396, 29871, 29955, 29889, 29929, 29953, 29929, 29945, 29896, 29955, 29941, 29906, 29896, 29892, 13, 4706, 500, 13, 13, 4706, 1243, 29918, 5975, 353, 260, 4003, 29889, 5907, 29889, 15807, 403, 29918, 2095, 29873, 29918, 4668, 29879, 29898, 13, 9651, 4236, 29918, 2139, 545, 29892, 13, 9651, 3474, 29918, 6203, 29892, 13, 9651, 954, 29918, 2095, 1372, 29892, 13, 9651, 3244, 29918, 2311, 29892, 13, 9651, 3244, 29918, 1990, 29892, 13, 9651, 289, 14339, 29918, 3317, 29918, 29873, 575, 488, 29892, 13, 9651, 15284, 29918, 3317, 29918, 29873, 575, 488, 29892, 13, 9651, 3033, 5049, 29918, 2848, 29892, 13, 9651, 318, 1727, 13, 4706, 1723, 13, 13, 4706, 7252, 29898, 3179, 29918, 28667, 29892, 1243, 29918, 5975, 29897, 13, 13, 13, 29937, 694, 1144, 27988, 10772, 1184, 371, 2954, 13404, 13, 29992, 2272, 1688, 29889, 3502, 29889, 29873, 4003, 13, 1990, 4321, 13425, 29901, 13, 1678, 5518, 353, 525, 29941, 29896, 29953, 29931, 29915, 13, 1678, 20410, 353, 525, 29947, 29900, 29915, 13, 1678, 2245, 979, 29918, 2311, 353, 525, 29953, 29915, 13, 1678, 281, 2495, 287, 353, 7700, 13, 1678, 15332, 29918, 19790, 353, 29871, 29946, 13, 1678, 25713, 29918, 15388, 29918, 13155, 353, 11117, 1918, 29900, 2396, 525, 2972, 29900, 742, 525, 1918, 29896, 2396, 525, 2972, 29896, 10827, 13, 1678, 25713, 29918, 15388, 29879, 353, 10518, 29889, 17271, 29898, 13099, 29922, 1839, 4782, 742, 525, 29954, 15464, 11287, 13, 13, 1678, 770, 383, 1296, 6585, 29901, 13, 4706, 9995, 13, 4706, 25713, 1722, 580, 13, 4706, 9995, 13, 4706, 822, 4770, 2344, 12035, 1311, 29892, 334, 29918, 1125, 13, 9651, 9995, 13, 9651, 20254, 2069, 3229, 13, 9651, 9995, 13, 13, 4706, 822, 4770, 5893, 12035, 1311, 29892, 334, 29918, 1125, 13, 9651, 9995, 13, 9651, 3896, 3229, 393, 3639, 263, 383, 1296, 2283, 13, 9651, 9995, 13, 9651, 736, 1583, 29889, 29943, 1296, 2283, 580, 13, 13, 4706, 822, 4770, 13322, 12035, 1311, 29892, 334, 29918, 1125, 13, 9651, 9995, 13, 9651, 20254, 6876, 3229, 13, 9651, 9995, 13, 9651, 736, 6213, 13, 13, 4706, 770, 383, 1296, 2283, 29901, 13, 9651, 9995, 13, 9651, 25713, 934, 1304, 363, 383, 1296, 6585, 13, 9651, 9995, 13, 9651, 732, 7959, 5696, 13, 9651, 822, 1303, 1220, 10456, 29918, 1125, 13, 18884, 9995, 13, 18884, 25713, 934, 363, 671, 411, 383, 1296, 6585, 580, 13, 18884, 9995, 13, 18884, 736, 525, 3289, 4037, 29892, 1918, 29900, 29892, 1918, 29896, 29905, 29876, 29915, 13, 13, 1678, 822, 1243, 1649, 6229, 5580, 29918, 20401, 29918, 12313, 29918, 816, 11272, 29898, 1311, 1125, 13, 4706, 1243, 29918, 29873, 4003, 353, 260, 4003, 29889, 13425, 580, 13, 4706, 1243, 29918, 29873, 4003, 3032, 842, 29918, 6799, 877, 816, 11272, 742, 525, 5397, 17807, 1495, 13, 13, 4706, 411, 11451, 1688, 29889, 336, 4637, 29898, 13, 9651, 7865, 2392, 29892, 13, 9651, 1993, 2433, 29905, 29876, 12197, 412, 20410, 451, 1476, 29915, 13, 308, 1125, 13, 9651, 1243, 29918, 29873, 4003, 3032, 6229, 5580, 29918, 20401, 580, 13, 13, 1678, 822, 1243, 1649, 6229, 5580, 29918, 20401, 29918, 12313, 29918, 2311, 29898, 1311, 1125, 13, 4706, 1243, 29918, 29873, 4003, 353, 260, 4003, 29889, 13425, 580, 13, 4706, 1243, 29918, 29873, 4003, 3032, 842, 29918, 6799, 877, 11522, 979, 29918, 2311, 742, 525, 29906, 29889, 29906, 29906, 29906, 1495, 13, 13, 4706, 411, 11451, 1688, 29889, 336, 4637, 29898, 13, 9651, 7865, 2392, 29892, 13, 9651, 1993, 2433, 29905, 29876, 29940, 290, 979, 2159, 451, 1476, 363, 2183, 14282, 20410, 29915, 13, 308, 1125, 13, 9651, 1243, 29918, 29873, 4003, 3032, 6229, 5580, 29918, 20401, 580, 13, 13, 1678, 822, 1243, 29918, 7728, 29918, 1300, 18642, 29883, 29918, 11228, 29918, 842, 29918, 657, 29898, 1311, 1125, 13, 4706, 10970, 353, 518, 5574, 29892, 7700, 29892, 29871, 29900, 29892, 29871, 29896, 29962, 13, 4706, 3806, 353, 518, 11227, 29898, 667, 29897, 363, 2944, 297, 10970, 29962, 13, 4706, 1243, 29918, 29873, 4003, 353, 260, 4003, 29889, 13425, 580, 13, 4706, 2582, 353, 5159, 13, 4706, 363, 995, 29892, 1959, 297, 14319, 29898, 2080, 29879, 29892, 3806, 1125, 13, 9651, 1243, 29918, 29873, 4003, 29889, 1300, 18642, 29883, 29918, 11228, 353, 995, 13, 9651, 2582, 29889, 4397, 29898, 1767, 1275, 1959, 29897, 13, 13, 4706, 4974, 599, 29898, 9902, 29897, 13, 13, 1678, 822, 1243, 29918, 7728, 29918, 4294, 29918, 25442, 886, 29918, 842, 29918, 657, 29898, 1311, 1125, 13, 4706, 10970, 353, 518, 5574, 29892, 7700, 29892, 29871, 29900, 29892, 29871, 29896, 29962, 13, 4706, 3806, 353, 518, 11227, 29898, 667, 29897, 363, 2944, 297, 10970, 29962, 13, 4706, 1243, 29918, 29873, 4003, 353, 260, 4003, 29889, 13425, 580, 13, 4706, 2582, 353, 5159, 13, 4706, 363, 995, 29892, 1959, 297, 14319, 29898, 2080, 29879, 29892, 3806, 1125, 13, 9651, 1243, 29918, 29873, 4003, 29889, 4294, 29918, 25442, 886, 353, 995, 13, 9651, 2582, 29889, 4397, 29898, 1767, 1275, 1959, 29897, 13, 13, 4706, 4974, 599, 29898, 9902, 29897, 13, 13, 1678, 822, 1243, 29918, 7728, 29918, 16515, 29918, 17760, 29918, 29879, 7093, 29918, 842, 29898, 1311, 1125, 13, 4706, 1243, 29918, 29873, 4003, 353, 260, 4003, 29889, 13425, 580, 13, 13, 4706, 411, 11451, 1688, 29889, 336, 4637, 29898, 13, 9651, 20894, 2333, 2392, 29892, 13, 9651, 1993, 2433, 29905, 29876, 12197, 412, 15786, 508, 451, 367, 731, 7522, 6169, 13, 308, 1125, 13, 9651, 1243, 29918, 29873, 4003, 29889, 16515, 29918, 17760, 29918, 29879, 7093, 353, 29871, 29955, 13, 13, 1678, 822, 1243, 29918, 7728, 29918, 16515, 29918, 17760, 29918, 29879, 7093, 29918, 657, 29898, 1311, 1125, 13, 4706, 1243, 29918, 29873, 4003, 353, 260, 4003, 29889, 13425, 580, 13, 4706, 4974, 338, 8758, 29898, 1688, 29918, 29873, 4003, 29889, 16515, 29918, 17760, 29918, 29879, 7093, 29892, 1051, 29897, 13, 13, 1678, 822, 1243, 29918, 7728, 29918, 16515, 29918, 17760, 29918, 816, 287, 2540, 29918, 842, 29898, 1311, 1125, 13, 4706, 1243, 29918, 29873, 4003, 353, 260, 4003, 29889, 13425, 580, 13, 13, 4706, 411, 11451, 1688, 29889, 336, 4637, 29898, 13, 9651, 20894, 2333, 2392, 29892, 13, 9651, 1993, 2433, 29905, 29876, 12197, 412, 28598, 2540, 508, 451, 367, 731, 7522, 6169, 13, 308, 1125, 13, 9651, 1243, 29918, 29873, 4003, 29889, 16515, 29918, 17760, 29918, 816, 287, 2540, 353, 525, 3752, 408, 23927, 29915, 13, 13, 1678, 822, 1243, 29918, 7728, 29918, 16515, 29918, 17760, 29918, 816, 287, 2540, 29918, 657, 29898, 1311, 1125, 13, 4706, 1243, 29918, 29873, 4003, 353, 260, 4003, 29889, 13425, 580, 13, 4706, 4974, 338, 8758, 29898, 1688, 29918, 29873, 4003, 29889, 16515, 29918, 17760, 29918, 816, 287, 2540, 29892, 1051, 29897, 13, 13, 1678, 822, 1243, 29918, 7728, 29918, 16515, 29918, 29873, 4003, 29918, 15388, 29879, 29918, 842, 29898, 1311, 1125, 13, 4706, 1243, 29918, 29873, 4003, 353, 260, 4003, 29889, 13425, 580, 13, 13, 4706, 411, 11451, 1688, 29889, 336, 4637, 29898, 13, 9651, 20894, 2333, 2392, 29892, 13, 9651, 1993, 2433, 29905, 29876, 27635, 260, 4003, 17279, 508, 451, 367, 731, 7522, 6169, 13, 308, 1125, 13, 9651, 1243, 29918, 29873, 4003, 29889, 16515, 29918, 29873, 4003, 29918, 15388, 29879, 353, 525, 2499, 9735, 398, 28532, 309, 29915, 13, 13, 1678, 822, 1243, 29918, 7728, 29918, 16515, 29918, 29873, 4003, 29918, 15388, 29879, 29918, 657, 29898, 1311, 1125, 13, 4706, 1243, 29918, 29873, 4003, 353, 260, 4003, 29889, 13425, 580, 13, 4706, 4974, 338, 8758, 29898, 1688, 29918, 29873, 4003, 29889, 16515, 29918, 29873, 4003, 29918, 15388, 29879, 29892, 1051, 29897, 13, 13, 1678, 822, 1243, 29918, 7728, 29918, 11522, 979, 29918, 2311, 29918, 842, 29918, 657, 29898, 1311, 1125, 13, 4706, 1243, 29918, 29873, 4003, 353, 260, 4003, 29889, 13425, 580, 13, 4706, 10970, 353, 17288, 29896, 511, 29871, 29953, 29892, 525, 29896, 29871, 29896, 29914, 29906, 2033, 13, 4706, 3806, 353, 518, 710, 29898, 667, 29897, 363, 2944, 297, 10970, 29962, 13, 4706, 2582, 353, 5159, 13, 4706, 363, 995, 29892, 1959, 297, 14319, 29898, 2080, 29879, 29892, 3806, 1125, 13, 9651, 1243, 29918, 29873, 4003, 29889, 11522, 979, 29918, 2311, 353, 995, 13, 9651, 1121, 353, 1243, 29918, 29873, 4003, 29889, 11522, 979, 29918, 2311, 13, 9651, 2582, 29889, 4397, 29898, 2914, 1275, 1959, 29897, 13, 13, 4706, 4974, 599, 29898, 9902, 29897, 13, 13, 1678, 822, 1243, 29918, 7728, 29918, 11522, 979, 29918, 2311, 29918, 842, 29918, 12313, 29918, 2311, 29898, 1311, 1125, 13, 4706, 4319, 29918, 2311, 353, 525, 276, 635, 4802, 29915, 13, 4706, 1993, 29918, 1807, 353, 11297, 29876, 29912, 29900, 29913, 338, 451, 263, 2854, 14282, 2159, 29889, 15300, 4830, 29898, 12313, 29918, 2311, 29897, 718, 320, 13, 462, 539, 525, 2831, 263, 1051, 310, 3625, 15786, 29892, 1018, 320, 29876, 29915, 718, 320, 13, 462, 539, 525, 29952, 1357, 29873, 4003, 29889, 16515, 29918, 17760, 29918, 29879, 7093, 20497, 13, 4706, 411, 11451, 1688, 29889, 336, 4637, 29898, 13, 18884, 7865, 2392, 29892, 13, 18884, 1993, 29922, 4352, 29918, 1807, 13, 308, 1125, 13, 9651, 1243, 29918, 29873, 4003, 353, 260, 4003, 29889, 13425, 580, 13, 9651, 1243, 29918, 29873, 4003, 29889, 11522, 979, 29918, 2311, 353, 4319, 29918, 2311, 13, 13, 1678, 822, 1243, 29918, 7728, 29918, 816, 11272, 29918, 842, 29918, 657, 29898, 1311, 1125, 13, 4706, 1243, 29918, 29873, 4003, 353, 260, 4003, 29889, 13425, 580, 13, 4706, 10970, 353, 518, 29946, 29900, 29892, 525, 6247, 29950, 2033, 13, 4706, 3806, 353, 518, 710, 29898, 667, 29897, 363, 2944, 297, 10970, 29962, 13, 4706, 2582, 353, 5159, 13, 4706, 363, 995, 29892, 1959, 297, 14319, 29898, 2080, 29879, 29892, 3806, 1125, 13, 9651, 1243, 29918, 29873, 4003, 29889, 816, 11272, 353, 995, 13, 9651, 1121, 353, 1243, 29918, 29873, 4003, 29889, 816, 11272, 13, 9651, 2582, 29889, 4397, 29898, 2914, 1275, 1959, 29897, 13, 13, 4706, 4974, 599, 29898, 9902, 29897, 13, 13, 1678, 822, 1243, 29918, 7728, 29918, 816, 11272, 29918, 842, 29918, 12313, 29918, 816, 11272, 29898, 1311, 1125, 13, 4706, 4319, 29918, 816, 11272, 353, 525, 29968, 1336, 327, 9089, 29915, 13, 4706, 1993, 29918, 1807, 353, 11297, 29876, 29912, 29900, 29913, 338, 451, 263, 2854, 14282, 20410, 363, 445, 2245, 979, 29915, 320, 13, 462, 539, 525, 2159, 29889, 15300, 4830, 29898, 12313, 29918, 816, 11272, 29897, 718, 320, 13, 462, 539, 525, 2831, 263, 1051, 310, 3625, 28598, 2540, 29892, 1018, 320, 29876, 29915, 718, 320, 13, 462, 539, 525, 29952, 1357, 29873, 4003, 29889, 16515, 29918, 17760, 29918, 816, 287, 2540, 20497, 13, 4706, 411, 11451, 1688, 29889, 336, 4637, 29898, 13, 18884, 7865, 2392, 29892, 13, 18884, 1993, 29922, 4352, 29918, 1807, 13, 308, 1125, 13, 9651, 1243, 29918, 29873, 4003, 353, 260, 4003, 29889, 13425, 580, 13, 9651, 1243, 29918, 29873, 4003, 29889, 816, 11272, 353, 4319, 29918, 816, 11272, 13, 13, 1678, 822, 1243, 29918, 7728, 29918, 6229, 5580, 29918, 842, 29898, 1311, 1125, 13, 4706, 1243, 29918, 29873, 4003, 353, 260, 4003, 29889, 13425, 580, 13, 4706, 1993, 29918, 1807, 353, 11297, 29876, 13425, 13391, 526, 5148, 701, 2729, 373, 2245, 979, 29915, 320, 13, 462, 539, 525, 14282, 2159, 322, 20410, 29892, 451, 731, 29889, 3967, 525, 320, 13, 462, 539, 525, 29952, 1357, 29873, 4003, 29889, 816, 11272, 2555, 470, 421, 1357, 29873, 4003, 29889, 11522, 979, 29918, 2311, 2555, 2012, 6169, 13, 13, 4706, 411, 11451, 1688, 29889, 336, 4637, 29898, 27293, 2392, 29897, 408, 4589, 29901, 13, 9651, 1243, 29918, 29873, 4003, 29889, 6229, 5580, 353, 518, 29900, 29892, 29871, 29906, 29892, 29871, 29941, 29962, 13, 13, 4706, 4974, 851, 29898, 3127, 29889, 1767, 29897, 1275, 1993, 29918, 1807, 13, 13, 1678, 822, 1243, 29918, 7728, 29918, 6229, 5580, 29918, 657, 29898, 1311, 1125, 13, 4706, 1243, 29918, 29873, 4003, 353, 260, 4003, 29889, 13425, 29898, 13, 9651, 2245, 979, 29918, 2311, 29922, 1311, 29889, 11522, 979, 29918, 2311, 29892, 13, 9651, 20410, 29922, 1311, 29889, 816, 11272, 13, 4706, 1723, 13, 13, 4706, 396, 3940, 29901, 903, 657, 29918, 6229, 5580, 338, 2000, 2645, 4770, 2344, 1649, 13, 4706, 11420, 29918, 29881, 2829, 1308, 353, 1243, 29918, 29873, 4003, 29889, 6229, 5580, 29889, 5561, 29918, 29881, 2829, 1308, 13, 4706, 6426, 29918, 29881, 2829, 1308, 353, 1243, 29918, 29873, 4003, 29889, 6229, 5580, 29889, 3993, 29918, 29881, 2829, 1308, 13, 4706, 10090, 29918, 27996, 2264, 353, 1243, 29918, 29873, 4003, 29889, 6229, 5580, 29889, 11358, 29918, 27996, 2264, 13, 13, 4706, 4974, 11420, 29918, 29881, 2829, 1308, 29889, 348, 1169, 29889, 4830, 29918, 28727, 580, 1275, 525, 22466, 29915, 13, 4706, 4974, 6426, 29918, 29881, 2829, 1308, 29889, 348, 1169, 29889, 4830, 29918, 28727, 580, 1275, 525, 22466, 29915, 13, 4706, 4974, 10090, 29918, 27996, 2264, 29889, 348, 1169, 29889, 4830, 29918, 28727, 580, 1275, 525, 22466, 29915, 13, 13, 4706, 4974, 11420, 29918, 29881, 2829, 1308, 29889, 29885, 4211, 4279, 448, 29871, 29953, 29889, 29953, 29906, 29945, 529, 29871, 29896, 29872, 29899, 29955, 13, 4706, 4974, 6426, 29918, 29881, 2829, 1308, 29889, 29885, 4211, 4279, 448, 29871, 29945, 29889, 29955, 29953, 29896, 529, 29871, 29896, 29872, 29899, 29955, 13, 4706, 4974, 10090, 29918, 27996, 2264, 29889, 29885, 4211, 4279, 448, 29871, 29900, 29889, 29946, 29941, 29906, 529, 29871, 29896, 29872, 29899, 29955, 13, 13, 1678, 822, 1243, 29918, 7728, 29918, 15388, 29918, 842, 29918, 12313, 29918, 15388, 29898, 1311, 1125, 13, 4706, 1243, 29918, 29873, 4003, 353, 260, 4003, 29889, 13425, 580, 13, 4706, 1993, 29918, 1807, 353, 11297, 29876, 12197, 412, 5518, 451, 1476, 29889, 1152, 263, 1051, 310, 525, 718, 320, 13, 462, 539, 525, 16515, 17279, 1018, 3583, 29876, 29915, 718, 320, 13, 462, 539, 525, 29952, 1357, 29873, 4003, 29889, 16515, 29918, 29873, 4003, 29918, 15388, 29879, 20497, 13, 4706, 411, 11451, 1688, 29889, 336, 4637, 29898, 13, 9651, 7865, 2392, 29892, 13, 9651, 1993, 29922, 4352, 29918, 1807, 13, 308, 1125, 13, 9651, 1243, 29918, 29873, 4003, 29889, 15388, 353, 525, 348, 711, 2408, 1974, 29915, 13, 13, 1678, 822, 1243, 29918, 7728, 29918, 29893, 2495, 287, 29898, 1311, 1125, 13, 4706, 281, 2495, 287, 29918, 5085, 353, 518, 29900, 29892, 29871, 29896, 29892, 5852, 29892, 7700, 29962, 13, 4706, 281, 2495, 287, 29918, 9902, 353, 518, 8824, 29892, 5852, 29892, 5852, 29892, 7700, 29962, 13, 4706, 1243, 29918, 29873, 4003, 353, 260, 4003, 29889, 13425, 580, 13, 13, 4706, 6987, 353, 5159, 13, 4706, 363, 281, 2495, 287, 29918, 262, 29892, 1781, 29918, 2914, 297, 14319, 29898, 29893, 2495, 287, 29918, 5085, 29892, 281, 2495, 287, 29918, 9902, 1125, 13, 9651, 1243, 29918, 29873, 4003, 29889, 29893, 2495, 287, 353, 281, 2495, 287, 29918, 262, 13, 9651, 6987, 29889, 4397, 29898, 1688, 29918, 29873, 4003, 29889, 29893, 2495, 287, 1275, 1781, 29918, 2914, 29897, 13, 13, 4706, 4974, 599, 29898, 21150, 29897, 13, 13, 1678, 822, 1243, 29918, 3198, 29918, 15388, 29879, 29918, 1761, 29898, 1311, 1125, 13, 4706, 1243, 29918, 29873, 4003, 353, 260, 4003, 29889, 13425, 29898, 13, 9651, 5518, 29922, 1311, 29889, 15388, 29892, 13, 9651, 20410, 29922, 1311, 29889, 816, 11272, 29892, 13, 9651, 2245, 979, 29918, 2311, 29922, 1311, 29889, 11522, 979, 29918, 2311, 29892, 13, 9651, 281, 2495, 287, 29922, 1311, 29889, 29893, 2495, 287, 29892, 13, 9651, 15332, 29918, 19790, 29922, 1311, 29889, 29879, 2142, 3305, 29918, 19790, 13, 4706, 1723, 13, 4706, 4974, 1243, 29918, 29873, 4003, 3032, 3198, 29918, 15388, 29879, 29918, 1761, 580, 13, 13, 1678, 822, 1243, 29918, 3198, 29918, 15388, 29879, 29918, 1761, 29918, 1217, 29918, 5325, 29918, 11940, 29898, 1311, 1125, 13, 4706, 1243, 29918, 29873, 4003, 353, 260, 4003, 29889, 13425, 29898, 13, 9651, 5518, 29922, 1311, 29889, 15388, 29892, 13, 9651, 20410, 29922, 1311, 29889, 816, 11272, 29892, 13, 9651, 2245, 979, 29918, 2311, 29922, 1311, 29889, 11522, 979, 29918, 2311, 29892, 13, 9651, 281, 2495, 287, 29922, 1311, 29889, 29893, 2495, 287, 29892, 13, 9651, 15332, 29918, 19790, 29922, 1311, 29889, 29879, 2142, 3305, 29918, 19790, 13, 4706, 1723, 13, 13, 4706, 822, 25713, 29918, 1761, 3972, 10456, 29918, 1125, 13, 9651, 396, 3639, 385, 4069, 1051, 304, 1243, 363, 2066, 29899, 1333, 29899, 11940, 4195, 13, 9651, 736, 5159, 13, 13, 4706, 411, 11451, 1688, 29889, 336, 4637, 29898, 13, 9651, 3497, 17413, 2392, 29892, 13, 9651, 1993, 2433, 1217, 2066, 6943, 376, 1579, 927, 29908, 470, 376, 710, 404, 29908, 1476, 29915, 13, 308, 1125, 13, 9651, 411, 13261, 877, 359, 29889, 1761, 3972, 742, 716, 29922, 29888, 1296, 29918, 1761, 3972, 1125, 13, 18884, 1243, 29918, 29873, 4003, 3032, 3198, 29918, 15388, 29879, 29918, 1761, 580, 13, 13, 1678, 822, 1243, 29918, 3198, 29918, 15388, 29879, 29918, 1761, 29918, 2972, 29918, 20401, 29918, 29888, 2234, 29898, 1311, 1125, 13, 4706, 1243, 29918, 29873, 4003, 353, 260, 4003, 29889, 13425, 580, 13, 13, 4706, 396, 727, 338, 694, 2318, 29900, 297, 738, 310, 278, 1652, 927, 21700, 6471, 29892, 322, 1811, 304, 13, 4706, 396, 1106, 372, 701, 881, 5706, 263, 5518, 2318, 451, 1476, 11910, 310, 278, 13, 4706, 396, 1059, 1347, 29889, 910, 1243, 6166, 278, 17279, 12205, 304, 385, 4069, 697, 13, 4706, 396, 411, 871, 6431, 322, 4989, 311, 4341, 29892, 769, 12778, 263, 5518, 2318, 13, 4706, 396, 525, 2972, 29900, 29915, 304, 5706, 278, 7429, 1059, 29889, 4989, 311, 338, 731, 304, 29871, 29941, 29896, 29953, 29931, 304, 13, 4706, 396, 4772, 263, 19468, 29899, 12817, 1059, 29889, 13, 4706, 1018, 29901, 13, 9651, 1243, 29918, 29873, 4003, 3032, 15388, 29879, 353, 1583, 29889, 29888, 1296, 29918, 15388, 29879, 29889, 8552, 580, 13, 9651, 1243, 29918, 29873, 4003, 3032, 15388, 29879, 1839, 4782, 2033, 353, 6024, 2972, 29900, 2033, 13, 9651, 1243, 29918, 29873, 4003, 3032, 15388, 29879, 1839, 29954, 15464, 2033, 353, 6024, 29941, 29896, 29953, 29931, 2033, 13, 9651, 1243, 29918, 29873, 4003, 3032, 3198, 29918, 15388, 29879, 29918, 1761, 580, 13, 4706, 5174, 7865, 2392, 408, 4589, 29901, 13, 9651, 2643, 353, 11297, 29876, 15388, 2318, 2318, 29900, 451, 1476, 29905, 29876, 29915, 13, 9651, 4974, 2643, 1275, 851, 29898, 3127, 29897, 13, 13, 1678, 822, 1243, 29918, 3198, 29918, 15388, 29879, 29918, 1761, 29918, 1217, 29918, 29893, 2495, 287, 29918, 272, 29918, 344, 314, 2222, 29898, 1311, 1125, 13, 4706, 1243, 29918, 29873, 4003, 353, 260, 4003, 29889, 13425, 580, 13, 13, 4706, 822, 25713, 29918, 1761, 3972, 10456, 29918, 1125, 13, 9651, 396, 9946, 281, 2495, 287, 29914, 344, 314, 2222, 9177, 13, 9651, 736, 6024, 294, 29881, 600, 3893, 4872, 1132, 29900, 4668, 29882, 742, 13, 462, 1678, 525, 294, 29881, 600, 3893, 4872, 1132, 29896, 294, 29881, 742, 13, 462, 1678, 525, 294, 2176, 710, 404, 9970, 294, 20726, 2033, 13, 13, 4706, 1243, 29918, 29873, 4003, 3032, 15388, 29918, 13155, 353, 1583, 29889, 29888, 1296, 29918, 15388, 29918, 13155, 13, 4706, 1243, 29918, 29873, 4003, 3032, 15388, 29879, 353, 1583, 29889, 29888, 1296, 29918, 15388, 29879, 13, 13, 4706, 411, 13261, 877, 16145, 1144, 29889, 3150, 742, 716, 29922, 1311, 29889, 29943, 1296, 6585, 1125, 13, 9651, 411, 13261, 877, 359, 29889, 1761, 3972, 742, 716, 29922, 29888, 1296, 29918, 1761, 3972, 1125, 13, 18884, 1059, 29918, 1807, 353, 525, 294, 2176, 710, 404, 9970, 294, 20726, 29915, 718, 320, 13, 462, 1669, 525, 13221, 451, 12266, 3692, 372, 338, 281, 2495, 287, 29915, 718, 320, 13, 462, 1669, 525, 470, 409, 314, 2222, 29915, 13, 18884, 411, 11451, 1688, 29889, 4495, 1983, 29898, 2659, 22709, 29892, 1993, 29922, 2704, 29918, 1807, 1125, 13, 462, 1678, 1243, 29918, 29873, 4003, 3032, 3198, 29918, 15388, 29879, 29918, 1761, 580, 13, 13, 1678, 822, 1243, 29918, 3198, 29918, 15388, 29879, 29918, 1761, 29918, 27259, 29918, 15388, 29898, 1311, 1125, 13, 4706, 1243, 29918, 29873, 4003, 353, 260, 4003, 29889, 13425, 580, 13, 13, 4706, 934, 29918, 12322, 353, 2897, 29889, 2084, 29889, 7122, 29898, 13, 9651, 525, 915, 12483, 4801, 742, 13, 9651, 525, 20401, 29918, 1272, 29915, 13, 4706, 1723, 13, 13, 4706, 822, 25713, 29918, 1761, 3972, 10456, 29918, 1125, 13, 9651, 9995, 13, 9651, 1051, 3972, 740, 393, 881, 664, 29871, 29896, 29900, 29900, 29995, 13, 9651, 9995, 13, 9651, 736, 6024, 294, 29881, 600, 3893, 4872, 1132, 29900, 4668, 29882, 742, 13, 462, 1678, 525, 294, 29881, 600, 3893, 4872, 1132, 29896, 294, 29881, 742, 13, 462, 1678, 525, 294, 2176, 710, 404, 29893, 2495, 287, 294, 20726, 2033, 13, 13, 4706, 1243, 29918, 29873, 4003, 3032, 15388, 29918, 13155, 353, 1583, 29889, 29888, 1296, 29918, 15388, 29918, 13155, 13, 4706, 1243, 29918, 29873, 4003, 3032, 15388, 29879, 353, 10518, 29889, 17271, 29898, 13, 9651, 4341, 29922, 1839, 29954, 15464, 742, 525, 4782, 7464, 13, 9651, 848, 29922, 1761, 29898, 1958, 29898, 1761, 29892, 14319, 29898, 13, 18884, 1583, 29889, 29888, 1296, 29918, 15388, 29918, 13155, 29889, 8149, 3285, 13, 18884, 1583, 29889, 29888, 1296, 29918, 15388, 29918, 13155, 29889, 5975, 580, 13, 632, 4961, 13, 4706, 1723, 13, 13, 4706, 411, 13261, 877, 16145, 1144, 29889, 3150, 742, 716, 29922, 1311, 29889, 29943, 1296, 6585, 1125, 13, 9651, 411, 13261, 877, 359, 29889, 1761, 3972, 742, 716, 29922, 29888, 1296, 29918, 1761, 3972, 1125, 13, 18884, 770, 1570, 29943, 1296, 2283, 29901, 13, 462, 1678, 9995, 13, 462, 1678, 383, 1296, 2283, 770, 393, 881, 4418, 5518, 16280, 13, 462, 1678, 9995, 13, 13, 462, 1678, 732, 7959, 5696, 13, 462, 1678, 822, 1303, 1220, 10456, 29918, 1125, 13, 462, 4706, 9995, 13, 462, 4706, 1303, 1220, 740, 393, 881, 4418, 5518, 13, 462, 4706, 16280, 363, 2655, 29896, 13, 462, 4706, 9995, 13, 462, 4706, 736, 525, 3289, 4037, 29892, 1918, 29900, 29905, 29876, 29915, 13, 13, 18884, 731, 5552, 29898, 1311, 29889, 29943, 1296, 6585, 29892, 525, 29943, 1296, 2283, 742, 1570, 29943, 1296, 2283, 29897, 13, 18884, 1059, 29918, 1807, 353, 11297, 29876, 24095, 2655, 29896, 451, 1476, 297, 525, 718, 320, 13, 462, 1669, 2897, 29889, 2084, 29889, 7122, 29898, 13, 462, 462, 259, 934, 29918, 12322, 29892, 13, 462, 462, 259, 525, 294, 2176, 710, 404, 29893, 2495, 287, 294, 20726, 29915, 13, 462, 1669, 1723, 718, 11297, 29876, 29915, 13, 18884, 1018, 29901, 13, 462, 1678, 1243, 29918, 29873, 4003, 3032, 3198, 29918, 15388, 29879, 29918, 1761, 580, 13, 18884, 5174, 7865, 2392, 408, 4589, 29901, 13, 462, 1678, 4974, 851, 29898, 3127, 29897, 1275, 1059, 29918, 1807, 13, 13, 1678, 822, 1243, 29918, 657, 29918, 15388, 29918, 13155, 29898, 1311, 1125, 13, 4706, 396, 9801, 1959, 2264, 491, 17420, 304, 263, 11701, 12205, 5183, 278, 13, 4706, 396, 1021, 934, 13, 4706, 1243, 29918, 29873, 4003, 353, 260, 4003, 29889, 13425, 29898, 13, 9651, 5518, 29922, 1311, 29889, 15388, 29892, 13, 9651, 20410, 29922, 1311, 29889, 816, 11272, 29892, 13, 9651, 2245, 979, 29918, 2311, 29922, 1311, 29889, 11522, 979, 29918, 2311, 29892, 13, 9651, 281, 2495, 287, 29922, 1311, 29889, 29893, 2495, 287, 29892, 13, 9651, 15332, 29918, 19790, 29922, 1311, 29889, 29879, 2142, 3305, 29918, 19790, 13, 4706, 1723, 13, 13, 4706, 396, 934, 2472, 13, 4706, 934, 29918, 12322, 353, 2897, 29889, 2084, 29889, 7122, 29898, 13, 9651, 2897, 29889, 2084, 29889, 25721, 29898, 13, 18884, 2897, 29889, 2084, 29889, 2674, 2084, 22168, 1445, 1649, 29897, 13, 9651, 10353, 13, 9651, 525, 636, 742, 13, 9651, 525, 20401, 29918, 1272, 29915, 13, 4706, 1723, 13, 4706, 934, 29918, 978, 353, 525, 15388, 29879, 29918, 1761, 29889, 7638, 29915, 13, 4706, 934, 29918, 5479, 353, 2897, 29889, 2084, 29889, 7122, 29898, 1445, 29918, 12322, 29892, 934, 29918, 978, 29897, 13, 13, 4706, 396, 2254, 848, 964, 263, 1243, 12205, 13, 4706, 1243, 29918, 1272, 2557, 353, 10518, 29889, 949, 29918, 7638, 29898, 1445, 29918, 5479, 29897, 13, 13, 4706, 396, 2254, 848, 964, 263, 8600, 773, 679, 29918, 15388, 29918, 13155, 580, 13, 4706, 1243, 29918, 4905, 353, 1243, 29918, 29873, 4003, 3032, 15388, 29918, 13155, 13, 13, 4706, 396, 6314, 6611, 322, 1819, 515, 12205, 393, 881, 3928, 304, 13, 4706, 396, 1906, 310, 278, 8600, 13, 4706, 6611, 29918, 3166, 29918, 1272, 2557, 353, 1243, 29918, 1272, 2557, 29889, 29954, 15464, 29889, 5975, 29889, 579, 668, 29898, 710, 29897, 13, 4706, 1819, 29918, 3166, 29918, 1272, 2557, 353, 1243, 29918, 1272, 2557, 29889, 4782, 29889, 5975, 29889, 579, 668, 29898, 710, 29897, 13, 13, 4706, 363, 2380, 29892, 1820, 297, 26985, 29898, 8149, 29918, 3166, 29918, 1272, 2557, 1125, 13, 9651, 396, 1207, 1854, 1269, 731, 310, 1819, 526, 14235, 5186, 13, 9651, 9657, 29918, 1767, 353, 1243, 29918, 4905, 29961, 1989, 29962, 13, 9651, 12205, 29918, 1767, 353, 1819, 29918, 3166, 29918, 1272, 2557, 29961, 2248, 29962, 13, 9651, 4974, 9657, 29918, 1767, 1275, 12205, 29918, 1767, 13, 13, 1678, 822, 1243, 29918, 15914, 29918, 29873, 4003, 29918, 15388, 29879, 29898, 1311, 1125, 13, 4706, 1243, 29918, 29873, 4003, 353, 260, 4003, 29889, 13425, 580, 13, 4706, 4341, 353, 6024, 29954, 15464, 742, 525, 4782, 742, 525, 29923, 4230, 293, 2111, 14999, 742, 525, 29928, 575, 537, 742, 525, 9837, 17387, 2033, 13, 4706, 848, 353, 518, 13, 9651, 6024, 29941, 29900, 29946, 742, 29871, 29906, 29889, 29896, 29892, 29871, 29906, 29900, 29900, 29892, 29871, 29955, 29889, 29947, 29892, 29871, 29900, 29889, 29906, 29947, 1402, 13, 9651, 6024, 29941, 29900, 29946, 29950, 742, 29871, 29906, 29889, 29896, 29892, 29871, 29906, 29900, 29900, 29892, 29871, 29955, 29889, 29947, 29892, 29871, 29900, 29889, 29906, 29947, 1402, 13, 9651, 6024, 29941, 29896, 29953, 742, 29871, 29906, 29889, 29906, 29892, 29871, 29906, 29900, 29900, 29892, 29871, 29955, 29889, 29929, 29892, 29871, 29900, 29889, 29906, 29947, 1402, 13, 9651, 6024, 29941, 29896, 29953, 29950, 742, 29871, 29906, 29889, 29906, 29892, 29871, 29906, 29900, 29900, 29892, 29871, 29955, 29889, 29929, 29892, 29871, 29900, 29889, 29906, 29947, 1402, 13, 9651, 6024, 29941, 29896, 29955, 742, 29871, 29906, 29889, 29906, 29892, 29871, 29906, 29900, 29900, 29892, 29871, 29955, 29889, 29929, 29892, 29871, 29900, 29889, 29906, 29947, 1402, 13, 9651, 6024, 29941, 29900, 29946, 29931, 742, 29871, 29906, 29889, 29941, 29892, 29871, 29906, 29900, 29900, 29892, 29871, 29955, 29889, 29947, 29892, 29871, 29900, 29889, 29906, 29947, 1402, 13, 9651, 6024, 29941, 29896, 29953, 29931, 742, 29871, 29906, 29889, 29941, 29892, 29871, 29906, 29900, 29900, 29892, 29871, 29955, 29889, 29929, 29892, 29871, 29900, 29889, 29906, 29947, 29962, 13, 4706, 4514, 13, 4706, 1781, 29918, 1272, 2557, 353, 10518, 29889, 17271, 29898, 13, 9651, 848, 29922, 1272, 29892, 13, 9651, 2380, 29922, 8516, 29892, 13, 9651, 4341, 29922, 13099, 13, 4706, 1723, 13, 4706, 1781, 29918, 1272, 2557, 1839, 29923, 4230, 293, 2111, 14999, 2033, 353, 518, 13, 9651, 1243, 29918, 29873, 4003, 3032, 348, 1169, 29889, 12150, 29898, 667, 29892, 525, 29954, 11868, 1495, 363, 2944, 297, 13, 9651, 1781, 29918, 1272, 2557, 1839, 29923, 4230, 293, 2111, 14999, 2033, 13, 4706, 4514, 13, 4706, 1781, 29918, 1272, 2557, 1839, 29928, 575, 537, 2033, 353, 518, 13, 9651, 1243, 29918, 29873, 4003, 3032, 348, 1169, 29889, 12150, 29898, 667, 29892, 525, 29887, 29914, 4912, 29985, 29941, 1495, 363, 2944, 297, 13, 9651, 1781, 29918, 1272, 2557, 1839, 29928, 575, 537, 2033, 13, 4706, 4514, 13, 13, 4706, 4974, 1243, 29918, 29873, 4003, 3032, 15388, 29879, 29889, 10954, 29898, 16773, 29918, 1272, 2557, 29897, 13, 13, 1678, 822, 1243, 29918, 15914, 29918, 29873, 4003, 29918, 15388, 29879, 29918, 9290, 29916, 9696, 29918, 1445, 29898, 1311, 1125, 13, 4706, 822, 25713, 29918, 9933, 10456, 29918, 1125, 13, 9651, 736, 7700, 13, 13, 4706, 411, 13261, 29898, 13, 9651, 525, 359, 29889, 2084, 29889, 9933, 742, 13, 9651, 716, 29922, 29888, 1296, 29918, 9933, 13, 308, 1125, 13, 9651, 411, 11451, 1688, 29889, 336, 4637, 29898, 13, 462, 1678, 7865, 2392, 29892, 13, 462, 1678, 1993, 2433, 15388, 29879, 29918, 1761, 29889, 7638, 947, 451, 1863, 29915, 13, 632, 1125, 13, 18884, 260, 4003, 29889, 13425, 580, 13, 13, 1678, 822, 1243, 29918, 15914, 29918, 29873, 4003, 29918, 15388, 29879, 29918, 6310, 29918, 1445, 29898, 1311, 1125, 13, 4706, 396, 694, 1144, 27988, 10772, 2525, 9778, 1490, 1123, 10662, 13, 4706, 822, 25713, 29918, 7638, 29918, 5215, 10456, 29918, 1125, 13, 9651, 12020, 10518, 29889, 12523, 29889, 8915, 1469, 2392, 13, 13, 4706, 411, 13261, 29898, 13, 9651, 525, 15112, 29889, 949, 29918, 7638, 742, 13, 9651, 716, 29922, 29888, 1296, 29918, 7638, 29918, 5215, 13, 308, 1125, 13, 9651, 396, 1423, 363, 1571, 1059, 11415, 746, 934, 338, 9654, 13, 9651, 411, 11451, 1688, 29889, 336, 4637, 29898, 13, 462, 1678, 7865, 2392, 29892, 13, 462, 1678, 1993, 2433, 15388, 29879, 29918, 1761, 29889, 7638, 338, 4069, 29915, 13, 632, 1125, 13, 18884, 260, 4003, 29889, 13425, 580, 13, 13, 1678, 822, 1243, 29918, 657, 29918, 1579, 927, 29918, 12514, 29918, 3166, 29918, 7638, 29898, 1311, 1125, 13, 4706, 1243, 29918, 29873, 4003, 353, 260, 4003, 29889, 13425, 580, 13, 4706, 1652, 927, 29918, 1990, 353, 525, 29929, 29900, 29900, 29915, 13, 4706, 10430, 353, 1243, 29918, 29873, 4003, 3032, 348, 1169, 29889, 12150, 29898, 29946, 29900, 29900, 29892, 525, 12163, 29907, 1495, 13, 13, 4706, 396, 1781, 3965, 1973, 7522, 7802, 2729, 373, 1819, 515, 869, 7638, 2066, 13, 4706, 1781, 29918, 2139, 1973, 353, 426, 13, 9651, 525, 29906, 29889, 29896, 2396, 29871, 29947, 29945, 29889, 29941, 29892, 13, 9651, 525, 29906, 29889, 29906, 2396, 29871, 29947, 29947, 29889, 29941, 29892, 13, 9651, 525, 29906, 29889, 29941, 2396, 29871, 29955, 29906, 29889, 29929, 13, 4706, 500, 13, 13, 4706, 6987, 353, 5159, 13, 4706, 363, 2318, 29892, 12959, 297, 1781, 29918, 2139, 1973, 29889, 7076, 7295, 13, 9651, 396, 1303, 278, 19673, 12959, 322, 7252, 372, 304, 278, 1959, 12959, 13, 9651, 1243, 29918, 2139, 545, 353, 1243, 29918, 29873, 4003, 3032, 1579, 927, 29918, 12514, 29961, 2972, 29962, 320, 13, 18884, 869, 2029, 29961, 1688, 29918, 29873, 4003, 3032, 1579, 927, 29918, 12514, 29961, 2972, 22322, 5776, 546, 1535, 2033, 1275, 13, 462, 268, 10430, 3816, 1579, 927, 29918, 1990, 1822, 5975, 29961, 29900, 29962, 13, 9651, 1781, 29918, 2139, 545, 353, 1243, 29918, 29873, 4003, 3032, 348, 1169, 29889, 12150, 29898, 2139, 545, 29892, 525, 1646, 1495, 13, 9651, 6987, 29889, 4397, 29898, 1688, 29918, 2139, 545, 1275, 1781, 29918, 2139, 545, 29897, 13, 13, 4706, 4974, 599, 29898, 21150, 29897, 13, 13, 1678, 822, 1243, 29918, 657, 29918, 1579, 927, 29918, 12514, 29918, 3166, 29918, 7638, 29918, 12313, 29918, 2972, 29898, 1311, 1125, 13, 4706, 1243, 29918, 29873, 4003, 353, 260, 4003, 29889, 13425, 580, 13, 4706, 934, 29918, 978, 353, 525, 3289, 2303, 29918, 29933, 29896, 29953, 29918, 29945, 29918, 1579, 927, 29918, 3605, 886, 29918, 2972, 29918, 29906, 29918, 29896, 29889, 7638, 29915, 13, 4706, 934, 29918, 12322, 353, 2897, 29889, 2084, 29889, 7122, 29898, 13, 18884, 2897, 29889, 2084, 29889, 25721, 29898, 359, 29889, 2084, 29889, 2674, 2084, 29898, 29873, 4003, 17255, 1445, 1649, 8243, 13, 18884, 525, 20401, 29918, 1272, 1495, 13, 4706, 934, 29918, 5479, 353, 2897, 29889, 2084, 29889, 7122, 29898, 13, 9651, 934, 29918, 12322, 29892, 13, 9651, 934, 29918, 978, 13, 4706, 1723, 13, 4706, 1993, 29918, 1807, 353, 11297, 29876, 29915, 718, 934, 29918, 5479, 718, 525, 1333, 1476, 29915, 13, 13, 4706, 396, 4319, 2318, 338, 15659, 491, 8454, 278, 10379, 310, 263, 869, 7638, 977, 13, 4706, 822, 25713, 29918, 359, 29918, 2084, 29918, 9933, 10456, 29918, 1125, 13, 9651, 736, 7700, 13, 13, 4706, 411, 13261, 29898, 13, 9651, 525, 359, 29889, 2084, 29889, 9933, 742, 13, 9651, 716, 29922, 29888, 1296, 29918, 359, 29918, 2084, 29918, 9933, 13, 308, 1125, 13, 9651, 1018, 29901, 13, 18884, 1243, 29918, 29873, 4003, 3032, 657, 29918, 1579, 927, 29918, 12514, 29918, 3166, 29918, 7638, 580, 13, 9651, 5174, 3497, 17413, 2392, 408, 4589, 29901, 13, 18884, 4589, 353, 851, 29898, 3127, 29897, 13, 18884, 4974, 1993, 29918, 1807, 1275, 4589, 13, 13, 1678, 822, 1243, 29918, 657, 29918, 1579, 927, 29918, 12514, 29918, 3166, 29918, 7638, 29918, 12313, 29918, 2139, 545, 29898, 1311, 1125, 13, 4706, 1243, 29918, 29873, 4003, 353, 260, 4003, 29889, 13425, 580, 13, 4706, 1993, 29918, 1807, 353, 11297, 29876, 10923, 545, 3109, 1135, 5225, 6169, 13, 13, 4706, 396, 385, 1059, 881, 367, 12005, 746, 263, 1661, 29899, 12863, 1535, 1897, 756, 263, 13, 4706, 396, 8178, 995, 13, 4706, 822, 25713, 29918, 949, 29918, 7638, 10456, 29918, 1125, 13, 9651, 736, 10518, 29889, 17271, 29898, 13099, 29922, 1839, 5776, 546, 1535, 742, 525, 29929, 29900, 29900, 7464, 13, 462, 18884, 848, 29922, 8999, 29896, 29900, 29892, 448, 29896, 29900, 24960, 13, 13, 4706, 411, 13261, 29898, 13, 18884, 525, 15112, 29889, 949, 29918, 7638, 742, 13, 18884, 716, 29922, 29888, 1296, 29918, 949, 29918, 7638, 13, 308, 1125, 13, 9651, 411, 11451, 1688, 29889, 336, 4637, 29898, 13, 18884, 7865, 2392, 29892, 13, 18884, 1993, 29922, 4352, 29918, 1807, 13, 632, 1125, 13, 18884, 1243, 29918, 29873, 4003, 3032, 657, 29918, 1579, 927, 29918, 12514, 29918, 3166, 29918, 7638, 580, 13, 13, 1678, 822, 1243, 29918, 657, 29918, 1579, 927, 29918, 12514, 29918, 3166, 29918, 7638, 29918, 9171, 287, 29918, 5464, 29918, 21574, 29898, 1311, 1125, 13, 4706, 1243, 29918, 29873, 4003, 353, 260, 4003, 29889, 13425, 580, 13, 13, 4706, 396, 1653, 1243, 12205, 322, 263, 12205, 310, 825, 278, 1962, 881, 13, 4706, 396, 1106, 763, 1156, 278, 1243, 12205, 338, 19673, 13, 4706, 1243, 29918, 12863, 3698, 353, 518, 29929, 29892, 525, 29879, 742, 525, 29881, 2033, 13, 4706, 1781, 29918, 12863, 3698, 353, 518, 29929, 1696, 29871, 29900, 1696, 29871, 29900, 5586, 13, 4706, 1243, 29918, 2139, 1973, 353, 6024, 29874, 742, 29871, 29941, 29892, 525, 29888, 2033, 13, 4706, 1781, 29918, 2139, 1973, 353, 518, 29900, 1696, 29871, 29941, 1696, 29871, 29900, 5586, 13, 4706, 1243, 29918, 1272, 2557, 353, 10518, 29889, 17271, 3319, 29915, 5776, 546, 1535, 2396, 1243, 29918, 12863, 3698, 29892, 13, 462, 462, 539, 525, 10923, 545, 2396, 1243, 29918, 2139, 1973, 1800, 13, 4706, 1781, 29918, 1272, 2557, 353, 10518, 29889, 17271, 3319, 29915, 5776, 546, 1535, 2396, 1781, 29918, 12863, 3698, 29892, 13, 462, 462, 539, 525, 10923, 545, 2396, 1781, 29918, 2139, 1973, 1800, 13, 13, 4706, 396, 7602, 1239, 278, 260, 4003, 304, 2254, 278, 1243, 12205, 1728, 2534, 304, 13, 4706, 396, 2436, 263, 869, 7638, 304, 8086, 13, 4706, 822, 25713, 29918, 949, 29918, 7638, 10456, 29918, 1125, 13, 9651, 736, 1243, 29918, 1272, 2557, 13, 13, 4706, 411, 13261, 29898, 13, 18884, 525, 15112, 29889, 949, 29918, 7638, 742, 13, 18884, 716, 29922, 29888, 1296, 29918, 949, 29918, 7638, 13, 308, 1125, 13, 9651, 1243, 29918, 29873, 4003, 3032, 657, 29918, 1579, 927, 29918, 12514, 29918, 3166, 29918, 7638, 580, 13, 13, 9651, 6987, 353, 5159, 13, 9651, 363, 2318, 297, 731, 29898, 1688, 29918, 29873, 4003, 3032, 15388, 29918, 13155, 29889, 5975, 580, 1125, 13, 18884, 396, 8206, 278, 12205, 310, 1652, 927, 13071, 363, 1269, 5518, 2318, 13, 18884, 396, 322, 671, 3394, 1958, 304, 3349, 10340, 515, 599, 16483, 26855, 29889, 13, 18884, 396, 910, 338, 2309, 304, 9942, 794, 385, 1059, 8581, 491, 773, 13, 18884, 396, 7442, 29889, 497, 5358, 363, 385, 1409, 310, 16483, 26855, 29889, 422, 20941, 304, 13, 18884, 396, 1781, 29918, 1272, 2557, 29889, 5975, 338, 2309, 304, 4772, 2534, 304, 2562, 1048, 13, 18884, 396, 920, 278, 1819, 526, 13235, 491, 11701, 29889, 13, 18884, 4489, 353, 1243, 29918, 29873, 4003, 3032, 1579, 927, 29918, 12514, 29961, 2972, 29962, 13, 18884, 1243, 29918, 5975, 353, 4489, 29889, 7302, 1958, 29898, 2892, 921, 29901, 921, 29889, 29885, 4211, 4279, 29897, 13, 18884, 1243, 353, 7442, 29889, 497, 5358, 29898, 1688, 29918, 5975, 29892, 13, 462, 462, 259, 1781, 29918, 1272, 2557, 29889, 5975, 29897, 13, 18884, 6987, 29889, 4397, 29898, 1688, 29897, 13, 13, 4706, 4974, 599, 29898, 21150, 29897, 13, 13, 1678, 822, 1243, 29918, 657, 29918, 17760, 29918, 710, 404, 29918, 12514, 29918, 29893, 2495, 287, 29898, 1311, 1125, 13, 4706, 1243, 29918, 29873, 4003, 353, 260, 4003, 29889, 13425, 29898, 13, 9651, 5518, 2433, 29941, 29900, 29946, 742, 13, 9651, 281, 2495, 287, 29922, 5574, 13, 4706, 1723, 13, 13, 4706, 396, 2998, 1819, 363, 29871, 29941, 29900, 29946, 13, 4706, 281, 2495, 287, 29918, 5975, 353, 7442, 29889, 2378, 29898, 13, 9651, 518, 29896, 29953, 29892, 29871, 29896, 29953, 29892, 29871, 29896, 29941, 29889, 29941, 29892, 29871, 29896, 29906, 29892, 29871, 29896, 29896, 29892, 29871, 29896, 29900, 29889, 29945, 29892, 29871, 29929, 29889, 29955, 29892, 29871, 29929, 29889, 29945, 29892, 29871, 29929, 29889, 29946, 29892, 29871, 29929, 29889, 29906, 29892, 29871, 29929, 29892, 13, 795, 29947, 29889, 29947, 29892, 29871, 29947, 29889, 29955, 29892, 29871, 29947, 29889, 29945, 29892, 29871, 29947, 29889, 29941, 29892, 29871, 29947, 29889, 29896, 29892, 29871, 29955, 29889, 29953, 29892, 29871, 29953, 29889, 29945, 29892, 29871, 29945, 29889, 29946, 2314, 13, 13, 4706, 1243, 29918, 12514, 353, 1243, 29918, 29873, 4003, 3032, 657, 29918, 17760, 29918, 710, 404, 29918, 12514, 580, 13, 4706, 1243, 29918, 12514, 353, 7442, 29889, 2378, 29898, 1688, 29918, 12514, 1839, 710, 404, 2033, 29961, 29896, 2314, 13, 4706, 4974, 7442, 29889, 497, 5358, 29898, 29893, 2495, 287, 29918, 5975, 29892, 1243, 29918, 12514, 29897, 13, 13, 1678, 822, 1243, 29918, 657, 29918, 17760, 29918, 710, 404, 29918, 12514, 29918, 344, 314, 2222, 29898, 1311, 1125, 13, 4706, 1243, 29918, 29873, 4003, 353, 260, 4003, 29889, 13425, 29898, 13, 9651, 5518, 2433, 29941, 29900, 29946, 742, 13, 9651, 281, 2495, 287, 29922, 8824, 13, 4706, 1723, 13, 13, 4706, 396, 2998, 1819, 363, 29871, 29941, 29900, 29946, 13, 4706, 409, 314, 2222, 29918, 5975, 353, 7442, 29889, 2378, 29898, 13, 9651, 518, 29896, 29947, 29889, 29947, 29892, 29871, 29896, 29947, 29889, 29947, 29892, 29871, 29896, 29945, 29889, 29955, 29892, 29871, 29896, 29946, 29889, 29896, 29892, 29871, 29896, 29941, 29892, 29871, 29896, 29906, 29889, 29906, 29892, 29871, 29896, 29896, 29889, 29946, 29892, 29871, 29896, 29896, 29889, 29941, 29892, 13, 795, 29896, 29896, 29889, 29896, 29892, 29871, 29896, 29900, 29889, 29947, 29892, 29871, 29896, 29900, 29889, 29953, 29892, 29871, 29896, 29900, 29889, 29946, 29892, 29871, 29896, 29900, 29889, 29906, 29892, 29871, 29896, 29900, 29892, 29871, 29929, 29889, 29947, 29892, 29871, 29929, 29889, 29945, 29892, 29871, 29947, 29889, 29929, 29892, 13, 795, 29955, 29889, 29955, 29892, 29871, 29953, 29889, 29896, 2314, 13, 13, 4706, 1243, 29918, 12514, 353, 1243, 29918, 29873, 4003, 3032, 657, 29918, 17760, 29918, 710, 404, 29918, 12514, 580, 13, 4706, 1243, 29918, 12514, 353, 7442, 29889, 2378, 29898, 1688, 29918, 12514, 1839, 710, 404, 2033, 29961, 29896, 2314, 13, 4706, 4974, 7442, 29889, 497, 5358, 29898, 344, 314, 2222, 29918, 5975, 29892, 1243, 29918, 12514, 29897, 13, 13, 1678, 822, 1243, 29918, 657, 29918, 17760, 29918, 11671, 29888, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 4321, 29879, 679, 29918, 17760, 29918, 11671, 29888, 13, 13, 4706, 11790, 2187, 9528, 29901, 13, 9651, 448, 1781, 1881, 13, 18884, 334, 2254, 7329, 338, 29871, 29896, 13, 18884, 334, 2254, 7329, 338, 29871, 29906, 13, 18884, 334, 2254, 7329, 338, 29871, 29946, 13, 9651, 448, 2298, 29918, 272, 29918, 12254, 5377, 310, 313, 29900, 29892, 29871, 29896, 29897, 13, 9651, 448, 14282, 5518, 451, 297, 17279, 1051, 13, 4706, 9995, 13, 4706, 1243, 29918, 29873, 4003, 353, 260, 4003, 29889, 13425, 29898, 13, 9651, 5518, 29922, 1311, 29889, 15388, 29892, 13, 9651, 20410, 29922, 1311, 29889, 816, 11272, 29892, 13, 9651, 2245, 979, 29918, 2311, 29922, 1311, 29889, 11522, 979, 29918, 2311, 29892, 13, 9651, 281, 2495, 287, 29922, 1311, 29889, 29893, 2495, 287, 29892, 13, 9651, 15332, 29918, 19790, 29922, 1311, 29889, 29879, 2142, 3305, 29918, 19790, 13, 4706, 1723, 13, 13, 4706, 396, 515, 1361, 1208, 2395, 29892, 12187, 12885, 338, 29871, 29896, 29946, 29945, 29955, 29889, 29946, 29946, 286, 29914, 29879, 29892, 6820, 7568, 322, 13, 4706, 396, 5224, 13451, 310, 29871, 29896, 29953, 29900, 29941, 29889, 29896, 29947, 29947, 322, 29871, 29896, 29941, 29896, 29896, 29889, 29955, 29900, 29900, 286, 29914, 29879, 13, 4706, 274, 29926, 29918, 5965, 5779, 353, 518, 13, 9651, 1243, 29918, 29873, 4003, 3032, 348, 1169, 29889, 12150, 29898, 29896, 29906, 29900, 29900, 29892, 525, 29885, 29914, 29879, 5477, 29871, 396, 360, 29931, 29943, 29871, 29896, 13, 9651, 1243, 29918, 29873, 4003, 3032, 348, 1169, 29889, 12150, 29898, 29896, 29941, 29896, 29896, 29892, 525, 29885, 29914, 29879, 5477, 29871, 396, 360, 29931, 29943, 29871, 29896, 13, 9651, 1243, 29918, 29873, 4003, 3032, 348, 1169, 29889, 12150, 29898, 29896, 29941, 29896, 29906, 29892, 525, 29885, 29914, 29879, 5477, 29871, 396, 360, 29931, 29943, 29871, 29946, 13, 9651, 1243, 29918, 29873, 4003, 3032, 348, 1169, 29889, 12150, 29898, 29896, 29946, 29900, 29900, 29892, 525, 29885, 29914, 29879, 5477, 29871, 396, 360, 29931, 29943, 29871, 29946, 13, 9651, 1243, 29918, 29873, 4003, 3032, 348, 1169, 29889, 12150, 29898, 29896, 29953, 29900, 29941, 29892, 525, 29885, 29914, 29879, 5477, 29871, 396, 360, 29931, 29943, 29871, 29946, 13, 9651, 1243, 29918, 29873, 4003, 3032, 348, 1169, 29889, 12150, 29898, 29896, 29953, 29900, 29946, 29892, 525, 29885, 29914, 29879, 5477, 29871, 396, 360, 29931, 29943, 29871, 29906, 13, 9651, 1243, 29918, 29873, 4003, 3032, 348, 1169, 29889, 12150, 29898, 29906, 29900, 29900, 29900, 29892, 525, 29885, 29914, 29879, 1495, 259, 396, 360, 29931, 29943, 29871, 29906, 13, 4706, 4514, 13, 4706, 3806, 29918, 11671, 29888, 353, 518, 29896, 29892, 29871, 29896, 29892, 29871, 29946, 29892, 29871, 29946, 29892, 29871, 29946, 29892, 29871, 29906, 29892, 29871, 29906, 29962, 13, 4706, 1243, 29918, 11671, 29888, 353, 5159, 13, 4706, 363, 274, 29926, 29918, 19322, 297, 274, 29926, 29918, 5965, 5779, 29901, 13, 9651, 1243, 29918, 11671, 29888, 29889, 4397, 29898, 13, 18884, 1243, 29918, 29873, 4003, 3032, 657, 29918, 17760, 29918, 11671, 29888, 29898, 11242, 29918, 272, 29918, 12254, 29922, 29900, 29889, 29896, 29892, 274, 29926, 29918, 955, 29922, 29883, 29926, 29918, 19322, 29897, 13, 9651, 1723, 13, 13, 4706, 4974, 599, 29898, 13, 9651, 270, 29880, 29888, 1275, 1781, 29918, 11671, 29888, 363, 270, 29880, 29888, 29892, 1781, 29918, 11671, 29888, 297, 14319, 29898, 1688, 29918, 11671, 29888, 29892, 3806, 29918, 11671, 29888, 29897, 13, 4706, 1723, 13, 13, 1678, 822, 1243, 29918, 657, 29918, 17760, 29918, 11671, 29888, 29918, 12313, 29918, 11242, 29918, 12254, 29918, 1767, 29898, 1311, 1125, 13, 4706, 1243, 29918, 29873, 4003, 353, 260, 4003, 29889, 13425, 29898, 13, 9651, 5518, 29922, 1311, 29889, 15388, 29892, 13, 9651, 20410, 29922, 1311, 29889, 816, 11272, 29892, 13, 9651, 2245, 979, 29918, 2311, 29922, 1311, 29889, 11522, 979, 29918, 2311, 29892, 13, 9651, 281, 2495, 287, 29922, 1311, 29889, 29893, 2495, 287, 29892, 13, 9651, 15332, 29918, 19790, 29922, 1311, 29889, 29879, 2142, 3305, 29918, 19790, 13, 4706, 1723, 13, 13, 4706, 396, 2298, 29918, 272, 29918, 12254, 5377, 310, 313, 29900, 29892, 29871, 29896, 29897, 13, 4706, 4319, 29918, 11242, 29918, 12254, 353, 21069, 29896, 29892, 29871, 29900, 29892, 29871, 29896, 29892, 29871, 29906, 29962, 13, 4706, 363, 2298, 29918, 12254, 297, 4319, 29918, 11242, 29918, 12254, 29901, 13, 9651, 411, 11451, 1688, 29889, 336, 4637, 29898, 13, 18884, 7865, 2392, 29892, 13, 18884, 1993, 2433, 11242, 29918, 272, 29918, 12254, 7329, 451, 1546, 29871, 29900, 322, 29871, 29896, 29915, 13, 632, 1125, 13, 18884, 1243, 29918, 29873, 4003, 3032, 657, 29918, 17760, 29918, 11671, 29888, 29898, 13, 462, 1678, 2298, 29918, 272, 29918, 12254, 29922, 11242, 29918, 12254, 29892, 13, 462, 1678, 274, 29926, 29918, 955, 29922, 1688, 29918, 29873, 4003, 3032, 348, 1169, 29889, 12150, 29898, 29906, 29892, 525, 29885, 29914, 29879, 1495, 13, 18884, 1723, 13, 13, 1678, 822, 1243, 29918, 15807, 403, 29918, 3317, 29918, 710, 404, 29918, 344, 314, 2222, 29898, 1311, 1125, 13, 4706, 1243, 29918, 29873, 4003, 353, 260, 4003, 29889, 13425, 29898, 13, 9651, 5518, 2433, 29941, 29896, 29953, 29931, 742, 13, 9651, 20410, 29922, 1311, 29889, 816, 11272, 29892, 13, 9651, 2245, 979, 29918, 2311, 29922, 1311, 29889, 11522, 979, 29918, 2311, 29892, 13, 9651, 281, 2495, 287, 29922, 8824, 29892, 13, 9651, 15332, 29918, 19790, 29922, 1311, 29889, 29879, 2142, 3305, 29918, 19790, 13, 4706, 1723, 13, 13, 4706, 2847, 29918, 12863, 3698, 353, 518, 13, 9651, 1243, 29918, 29873, 4003, 3032, 348, 1169, 29889, 12150, 29898, 29896, 29900, 29900, 29892, 525, 12163, 29943, 5477, 13, 9651, 1243, 29918, 29873, 4003, 3032, 348, 1169, 29889, 12150, 29898, 29906, 29900, 29900, 29892, 525, 12163, 29943, 5477, 13, 9651, 1243, 29918, 29873, 4003, 3032, 348, 1169, 29889, 12150, 29898, 29896, 29945, 29900, 29892, 525, 12163, 29943, 1495, 13, 4706, 4514, 13, 13, 4706, 396, 297, 23500, 13, 4706, 1781, 29918, 710, 15322, 353, 518, 13, 632, 29896, 29945, 29889, 29955, 29892, 13, 632, 29896, 29941, 29889, 29941, 29892, 13, 632, 29896, 29946, 29889, 29945, 13, 4706, 4514, 13, 4706, 363, 10430, 29892, 22884, 297, 14319, 29898, 11228, 29918, 12863, 3698, 29892, 1781, 29918, 710, 15322, 1125, 13, 9651, 1243, 29918, 29873, 4003, 29889, 11228, 29918, 12863, 1535, 353, 10430, 13, 9651, 4974, 7442, 29889, 497, 5358, 29898, 13, 18884, 1243, 29918, 29873, 4003, 29889, 15807, 403, 29918, 3317, 29918, 710, 404, 2141, 517, 877, 29895, 1039, 2824, 29885, 4211, 4279, 29892, 13, 18884, 22884, 13, 9651, 1723, 13, 13, 1678, 822, 1243, 29918, 15807, 403, 29918, 3317, 29918, 710, 404, 29918, 29893, 2495, 287, 29898, 1311, 1125, 13, 4706, 1243, 29918, 29873, 4003, 353, 260, 4003, 29889, 13425, 29898, 13, 9651, 5518, 2433, 29941, 29900, 29946, 742, 13, 9651, 20410, 29922, 1311, 29889, 816, 11272, 29892, 13, 9651, 2245, 979, 29918, 2311, 29922, 1311, 29889, 11522, 979, 29918, 2311, 29892, 13, 9651, 281, 2495, 287, 29922, 5574, 29892, 13, 9651, 15332, 29918, 19790, 29922, 1311, 29889, 29879, 2142, 3305, 29918, 19790, 13, 4706, 1723, 13, 13, 4706, 2847, 29918, 12863, 3698, 353, 518, 13, 9651, 1243, 29918, 29873, 4003, 3032, 348, 1169, 29889, 12150, 29898, 29953, 29945, 29900, 29892, 525, 12163, 29943, 5477, 13, 9651, 1243, 29918, 29873, 4003, 3032, 348, 1169, 29889, 12150, 29898, 29955, 29900, 29900, 29892, 525, 12163, 29943, 5477, 13, 9651, 1243, 29918, 29873, 4003, 3032, 348, 1169, 29889, 12150, 29898, 29953, 29955, 29945, 29892, 525, 12163, 29943, 1495, 13, 4706, 4514, 13, 13, 4706, 396, 297, 23500, 13, 4706, 1781, 29918, 710, 15322, 353, 518, 13, 632, 29929, 29889, 29945, 29892, 13, 632, 29929, 29889, 29946, 29892, 13, 632, 29929, 29889, 29946, 29945, 13, 4706, 4514, 13, 4706, 363, 10430, 29892, 22884, 297, 14319, 29898, 11228, 29918, 12863, 3698, 29892, 1781, 29918, 710, 15322, 1125, 13, 9651, 1243, 29918, 29873, 4003, 29889, 11228, 29918, 12863, 1535, 353, 10430, 13, 9651, 4974, 7442, 29889, 497, 5358, 29898, 13, 18884, 1243, 29918, 29873, 4003, 29889, 15807, 403, 29918, 3317, 29918, 710, 404, 2141, 517, 877, 29895, 1039, 2824, 29885, 4211, 4279, 29892, 13, 18884, 22884, 13, 9651, 1723, 13, 13, 1678, 822, 1243, 29918, 15807, 403, 29918, 3317, 29918, 710, 404, 29918, 5464, 29918, 3712, 327, 8927, 29898, 1311, 1125, 13, 4706, 1243, 29918, 29873, 4003, 353, 260, 4003, 29889, 13425, 580, 13, 13, 4706, 5694, 353, 1243, 29918, 29873, 4003, 3032, 348, 1169, 29889, 12150, 29898, 29896, 29900, 29900, 29892, 525, 12163, 29943, 1495, 13, 13, 4706, 822, 1207, 29918, 5464, 29918, 3712, 327, 8927, 10456, 29918, 1125, 13, 9651, 736, 426, 13, 18884, 525, 12863, 1535, 2396, 6702, 12163, 29943, 742, 518, 29900, 29892, 29871, 29896, 29892, 448, 29896, 11724, 13, 18884, 525, 710, 404, 2396, 6702, 29895, 1039, 742, 518, 29900, 29892, 29871, 29900, 29892, 29871, 29900, 2314, 13, 9651, 500, 13, 13, 4706, 411, 13261, 29898, 13, 9651, 525, 915, 12483, 4801, 29889, 29873, 4003, 29889, 13425, 3032, 657, 29918, 17760, 29918, 710, 404, 29918, 12514, 742, 13, 9651, 716, 29922, 5675, 29918, 5464, 29918, 3712, 327, 8927, 13, 308, 1125, 13, 9651, 411, 11451, 1688, 29889, 336, 4637, 29898, 13, 18884, 7865, 2392, 29892, 13, 18884, 1993, 2433, 5015, 404, 13071, 1996, 6238, 3698, 304, 367, 525, 718, 13, 462, 418, 525, 3712, 327, 265, 1711, 10231, 29915, 13, 632, 1125, 13, 18884, 1243, 29918, 29873, 4003, 29889, 11228, 29918, 12863, 1535, 353, 5694, 13, 13, 1678, 732, 7959, 5696, 13, 1678, 822, 1243, 29918, 15807, 403, 29918, 3317, 29918, 2139, 545, 7295, 13, 4706, 15332, 29918, 19790, 353, 29871, 29946, 13, 4706, 1243, 29918, 29873, 4003, 353, 260, 4003, 29889, 13425, 29898, 13, 9651, 5518, 2433, 29941, 29900, 29946, 742, 13, 9651, 20410, 2433, 29947, 29900, 742, 13, 9651, 2245, 979, 29918, 2311, 2433, 29953, 742, 13, 9651, 281, 2495, 287, 29922, 8824, 29892, 13, 9651, 15332, 29918, 19790, 29922, 29879, 2142, 3305, 29918, 19790, 13, 4706, 1723, 13, 13, 4706, 4236, 29918, 710, 404, 353, 1243, 29918, 29873, 4003, 3032, 348, 1169, 29889, 12150, 29898, 29896, 29947, 29889, 29947, 29892, 525, 29895, 1039, 1495, 13, 4706, 10090, 29918, 27996, 2264, 353, 1243, 29918, 29873, 4003, 3032, 348, 1169, 29889, 12150, 29898, 29900, 29889, 29946, 29941, 29906, 29892, 525, 262, 1495, 13, 4706, 11420, 29918, 29881, 2829, 1308, 353, 1243, 29918, 29873, 4003, 3032, 348, 1169, 29889, 12150, 29898, 29953, 29889, 29953, 29906, 29945, 29892, 525, 262, 1495, 13, 4706, 6426, 29918, 29881, 2829, 1308, 353, 11420, 29918, 29881, 2829, 1308, 448, 29871, 29906, 334, 10090, 29918, 27996, 2264, 13, 4706, 2099, 29918, 29881, 2829, 1308, 353, 313, 3993, 29918, 29881, 2829, 1308, 718, 11420, 29918, 29881, 2829, 1308, 29897, 847, 29871, 29906, 13, 4706, 408, 1004, 29918, 5847, 353, 29871, 29946, 13, 13, 4706, 1781, 29918, 3317, 29918, 2139, 545, 353, 313, 13, 18884, 4236, 29918, 710, 404, 334, 313, 29906, 334, 10090, 29918, 27996, 2264, 29897, 334, 408, 1004, 29918, 5847, 847, 13, 18884, 313, 12676, 29918, 29881, 2829, 1308, 334, 15332, 29918, 19790, 29897, 13, 462, 632, 13742, 517, 877, 11868, 2824, 29885, 4211, 4279, 13, 13, 4706, 1243, 29918, 29873, 4003, 29889, 3317, 29918, 710, 404, 353, 4236, 29918, 710, 404, 13, 13, 4706, 1243, 29918, 3317, 29918, 2139, 545, 353, 1243, 29918, 29873, 4003, 29889, 15807, 403, 29918, 3317, 29918, 2139, 545, 580, 29905, 13, 9651, 869, 517, 877, 11868, 2824, 29885, 4211, 4279, 13, 13, 4706, 4974, 7442, 29889, 497, 5358, 29898, 1688, 29918, 3317, 29918, 2139, 545, 29892, 1781, 29918, 3317, 29918, 2139, 545, 29897, 13, 13, 1678, 822, 1243, 29918, 15807, 403, 29918, 11228, 29918, 2139, 545, 29918, 1217, 29918, 1526, 29898, 1311, 1125, 13, 4706, 1243, 29918, 29873, 4003, 353, 260, 4003, 29889, 13425, 29898, 13, 9651, 5518, 29922, 1311, 29889, 15388, 29892, 13, 9651, 20410, 29922, 1311, 29889, 816, 11272, 29892, 13, 9651, 2245, 979, 29918, 2311, 29922, 1311, 29889, 11522, 979, 29918, 2311, 29892, 13, 9651, 281, 2495, 287, 29922, 1311, 29889, 29893, 2495, 287, 29892, 13, 9651, 15332, 29918, 19790, 29922, 1311, 29889, 29879, 2142, 3305, 29918, 19790, 29892, 13, 9651, 13336, 2433, 29887, 374, 29941, 29900, 29889, 312, 29875, 742, 13, 9651, 26413, 2433, 29950, 29906, 742, 13, 9651, 19100, 333, 3950, 2433, 29949, 29906, 742, 13, 9651, 24796, 29918, 3605, 601, 29922, 29896, 29892, 13, 9651, 1510, 29918, 25442, 886, 29922, 8824, 29892, 13, 9651, 2847, 29918, 12863, 1535, 7607, 29941, 29900, 29900, 29892, 525, 29968, 5477, 13, 9651, 1120, 18642, 29883, 29918, 11228, 29922, 5574, 29892, 13, 9651, 671, 29918, 18056, 307, 985, 292, 29922, 8824, 13, 4706, 1723, 13, 4706, 396, 278, 2847, 12959, 881, 4556, 278, 25312, 1439, 265, 362, 12959, 13, 4706, 396, 304, 367, 5186, 304, 278, 260, 4003, 29915, 29879, 4236, 12959, 29892, 3633, 292, 363, 7343, 2254, 13, 4706, 396, 7329, 13, 4706, 1959, 29918, 3317, 353, 1243, 29918, 29873, 4003, 29889, 3317, 29918, 2139, 545, 29889, 517, 877, 11868, 2824, 29885, 4211, 4279, 13, 4706, 1243, 29918, 3859, 353, 14563, 2878, 331, 29889, 15807, 403, 29918, 13191, 287, 29918, 845, 1698, 29918, 3859, 29898, 13, 9651, 1243, 29918, 29873, 4003, 29889, 11228, 29918, 12863, 1535, 29892, 13, 9651, 1243, 29918, 29873, 4003, 29889, 11228, 29918, 2139, 545, 29892, 13, 9651, 1243, 29918, 29873, 4003, 29889, 8423, 424, 29918, 2460, 15546, 29892, 13, 9651, 1243, 29918, 29873, 4003, 29889, 1004, 5083, 1608, 29892, 13, 9651, 1243, 29918, 29873, 4003, 3032, 348, 1169, 29889, 545, 29887, 13, 4706, 1723, 13, 13, 4706, 1059, 353, 6425, 29898, 13, 9651, 1959, 29918, 3317, 448, 13, 9651, 1243, 29918, 3859, 1839, 13191, 287, 16215, 3859, 13359, 29925, 334, 1243, 29918, 29873, 4003, 29889, 16626, 29918, 1359, 29918, 19790, 13, 4706, 1723, 847, 1959, 29918, 3317, 13, 13, 4706, 4974, 1059, 5277, 29871, 29900, 29889, 29900, 29900, 29900, 29945, 13, 13, 1678, 822, 1243, 29918, 15807, 403, 29918, 11228, 29918, 2139, 545, 29918, 2541, 29918, 1526, 29898, 1311, 1125, 13, 4706, 1243, 29918, 29873, 4003, 353, 260, 4003, 29889, 13425, 29898, 13, 9651, 5518, 29922, 1311, 29889, 15388, 29892, 13, 9651, 20410, 29922, 1311, 29889, 816, 11272, 29892, 13, 9651, 2245, 979, 29918, 2311, 29922, 1311, 29889, 11522, 979, 29918, 2311, 29892, 13, 9651, 281, 2495, 287, 29922, 1311, 29889, 29893, 2495, 287, 29892, 13, 9651, 15332, 29918, 19790, 29922, 1311, 29889, 29879, 2142, 3305, 29918, 19790, 29892, 13, 9651, 13336, 2433, 29887, 374, 29941, 29900, 29889, 312, 29875, 742, 13, 9651, 26413, 2433, 29950, 29906, 742, 13, 9651, 19100, 333, 3950, 2433, 29949, 29906, 742, 13, 9651, 24796, 29918, 3605, 601, 29922, 29896, 29892, 13, 9651, 1510, 29918, 25442, 886, 29922, 8824, 29892, 13, 9651, 2847, 29918, 12863, 1535, 7607, 29941, 29900, 29900, 29892, 525, 29968, 5477, 13, 9651, 1120, 18642, 29883, 29918, 11228, 29922, 5574, 29892, 13, 9651, 671, 29918, 18056, 307, 985, 292, 29922, 5574, 29892, 13, 9651, 26952, 29922, 5574, 13, 4706, 1723, 13, 4706, 396, 278, 2847, 12959, 881, 4556, 278, 25312, 1439, 265, 362, 12959, 13, 4706, 396, 304, 367, 5186, 304, 278, 260, 4003, 29915, 29879, 4236, 12959, 29892, 3633, 292, 363, 7343, 2254, 13, 4706, 396, 7329, 13, 4706, 1959, 29918, 3317, 353, 1243, 29918, 29873, 4003, 29889, 3317, 29918, 2139, 545, 29889, 517, 877, 11868, 2824, 29885, 4211, 4279, 13, 4706, 1243, 29918, 3859, 353, 14563, 2878, 331, 29889, 15807, 403, 29918, 13191, 287, 29918, 845, 1698, 29918, 3859, 29898, 13, 9651, 1243, 29918, 29873, 4003, 29889, 11228, 29918, 12863, 1535, 29892, 13, 9651, 1243, 29918, 29873, 4003, 29889, 11228, 29918, 2139, 545, 29892, 13, 9651, 1243, 29918, 29873, 4003, 29889, 8423, 424, 29918, 2460, 15546, 29892, 13, 9651, 1243, 29918, 29873, 4003, 29889, 1004, 5083, 1608, 29892, 13, 9651, 1243, 29918, 29873, 4003, 3032, 348, 1169, 29889, 545, 29887, 13, 4706, 1723, 13, 13, 4706, 1059, 353, 6425, 29898, 13, 9651, 1959, 29918, 3317, 448, 13, 9651, 1243, 29918, 3859, 1839, 13191, 287, 16215, 3859, 13359, 29925, 334, 1243, 29918, 29873, 4003, 29889, 16626, 29918, 1359, 29918, 19790, 13, 4706, 1723, 847, 1959, 29918, 3317, 13, 13, 4706, 4974, 1059, 5277, 29871, 29900, 29889, 29900, 29900, 29900, 29945, 13, 13, 1678, 822, 1243, 29918, 20401, 29918, 1579, 927, 29918, 1990, 29898, 1311, 1125, 13, 4706, 1243, 29918, 29873, 4003, 353, 260, 4003, 29889, 13425, 29898, 13, 9651, 5518, 29922, 1311, 29889, 15388, 29892, 13, 9651, 20410, 29922, 1311, 29889, 816, 11272, 29892, 13, 9651, 2245, 979, 29918, 2311, 29922, 1311, 29889, 11522, 979, 29918, 2311, 29892, 13, 9651, 281, 2495, 287, 29922, 1311, 29889, 29893, 2495, 287, 29892, 13, 9651, 15332, 29918, 19790, 29922, 1311, 29889, 29879, 2142, 3305, 29918, 19790, 13, 4706, 1723, 13, 4706, 1243, 29918, 29873, 4003, 29889, 3317, 29918, 2139, 545, 353, 1243, 29918, 29873, 4003, 3032, 348, 1169, 29889, 12150, 29898, 29896, 29906, 29945, 29892, 525, 1646, 1495, 13, 4706, 1243, 29918, 29873, 4003, 29889, 11228, 29918, 12863, 1535, 353, 1243, 29918, 29873, 4003, 3032, 348, 1169, 29889, 12150, 29898, 29941, 29945, 29900, 29892, 525, 12163, 29907, 1495, 13, 4706, 4974, 1243, 29918, 29873, 4003, 29889, 20401, 29918, 1579, 927, 29918, 1990, 580, 1275, 29871, 29896, 29945, 29900, 29900, 13, 13, 1678, 822, 1243, 29918, 20401, 29918, 1579, 927, 29918, 1990, 29918, 12313, 29918, 15388, 29898, 1311, 1125, 13, 4706, 1243, 29918, 29873, 4003, 353, 260, 4003, 29889, 13425, 29898, 13, 9651, 5518, 29922, 1311, 29889, 15388, 29892, 13, 9651, 20410, 29922, 1311, 29889, 816, 11272, 29892, 13, 9651, 2245, 979, 29918, 2311, 29922, 1311, 29889, 11522, 979, 29918, 2311, 29892, 13, 9651, 281, 2495, 287, 29922, 1311, 29889, 29893, 2495, 287, 29892, 13, 9651, 15332, 29918, 19790, 29922, 1311, 29889, 29879, 2142, 3305, 29918, 19790, 13, 4706, 1723, 13, 4706, 1243, 29918, 29873, 4003, 29889, 3317, 29918, 2139, 545, 353, 1243, 29918, 29873, 4003, 3032, 348, 1169, 29889, 12150, 29898, 29896, 29906, 29945, 29892, 525, 1646, 1495, 13, 4706, 1243, 29918, 29873, 4003, 29889, 11228, 29918, 12863, 1535, 353, 1243, 29918, 29873, 4003, 3032, 348, 1169, 29889, 12150, 29898, 29941, 29945, 29900, 29892, 525, 12163, 29907, 1495, 13, 4706, 4974, 1243, 29918, 29873, 4003, 29889, 20401, 29918, 1579, 927, 29918, 1990, 580, 1275, 29871, 29896, 29945, 29900, 29900, 13, 13, 1678, 822, 1243, 29918, 20401, 29918, 1579, 927, 29918, 1990, 29918, 12313, 29918, 12863, 1535, 29898, 1311, 1125, 13, 4706, 1243, 29918, 29873, 4003, 353, 260, 4003, 29889, 13425, 29898, 13, 9651, 5518, 29922, 1311, 29889, 15388, 29892, 13, 9651, 20410, 29922, 1311, 29889, 816, 11272, 29892, 13, 9651, 2245, 979, 29918, 2311, 29922, 1311, 29889, 11522, 979, 29918, 2311, 29892, 13, 9651, 281, 2495, 287, 29922, 1311, 29889, 29893, 2495, 287, 29892, 13, 9651, 15332, 29918, 19790, 29922, 1311, 29889, 29879, 2142, 3305, 29918, 19790, 13, 4706, 1723, 13, 13, 4706, 1243, 29918, 12863, 3698, 353, 518, 13, 9651, 1243, 29918, 29873, 4003, 3032, 348, 1169, 29889, 12150, 6278, 29896, 29900, 29900, 29892, 525, 12163, 29907, 5477, 13, 9651, 1243, 29918, 29873, 4003, 3032, 348, 1169, 29889, 12150, 29898, 29945, 29900, 29900, 29892, 525, 12163, 29907, 1495, 13, 4706, 4514, 13, 13, 4706, 1243, 29918, 29873, 4003, 29889, 3317, 29918, 2139, 545, 353, 1243, 29918, 29873, 4003, 3032, 348, 1169, 29889, 12150, 29898, 29896, 29906, 29945, 29892, 525, 1646, 1495, 13, 13, 4706, 363, 10430, 297, 1243, 29918, 12863, 3698, 29901, 13, 9651, 396, 25713, 714, 278, 2847, 10430, 731, 29892, 1363, 773, 278, 2875, 13, 9651, 396, 4153, 9946, 1652, 927, 770, 304, 367, 12833, 29889, 8797, 13944, 13, 9651, 396, 3508, 29915, 29873, 553, 27797, 363, 445, 1243, 1363, 372, 338, 3109, 1513, 29889, 13, 9651, 1243, 29918, 29873, 4003, 3032, 11330, 1839, 11228, 29918, 12863, 1535, 2033, 353, 10430, 13, 9651, 411, 11451, 1688, 29889, 336, 4637, 29898, 13, 462, 1678, 7865, 2392, 29892, 13, 462, 1678, 1993, 2433, 5776, 546, 1535, 714, 310, 3464, 6169, 13, 632, 1125, 13, 18884, 1243, 29918, 29873, 4003, 29889, 20401, 29918, 1579, 927, 29918, 1990, 580, 13, 13, 1678, 822, 1243, 29918, 20401, 29918, 1579, 927, 29918, 1990, 29918, 12313, 29918, 2139, 545, 29898, 1311, 1125, 13, 4706, 1243, 29918, 29873, 4003, 353, 260, 4003, 29889, 13425, 29898, 13, 9651, 5518, 29922, 1311, 29889, 15388, 29892, 13, 9651, 20410, 29922, 1311, 29889, 816, 11272, 29892, 13, 9651, 2245, 979, 29918, 2311, 29922, 1311, 29889, 11522, 979, 29918, 2311, 29892, 13, 9651, 281, 2495, 287, 29922, 1311, 29889, 29893, 2495, 287, 29892, 13, 9651, 15332, 29918, 19790, 29922, 1311, 29889, 29879, 2142, 3305, 29918, 19790, 13, 4706, 1723, 13, 13, 4706, 1243, 29918, 29873, 4003, 29889, 11228, 29918, 12863, 1535, 353, 1243, 29918, 29873, 4003, 3032, 348, 1169, 29889, 12150, 29898, 29941, 29945, 29900, 29892, 525, 12163, 29907, 1495, 13, 13, 4706, 1243, 29918, 2139, 545, 353, 1243, 29918, 29873, 4003, 3032, 348, 1169, 29889, 12150, 29898, 29941, 29945, 29900, 29892, 318, 1727, 29889, 1646, 29897, 13, 4706, 396, 25713, 714, 278, 2847, 12959, 731, 29892, 1363, 773, 278, 2875, 13, 4706, 396, 4153, 9946, 1652, 927, 770, 304, 367, 12833, 29889, 8797, 13944, 13, 4706, 396, 3508, 29915, 29873, 553, 27797, 363, 445, 1243, 1363, 372, 338, 3109, 1513, 29889, 13, 4706, 1243, 29918, 29873, 4003, 3032, 11330, 1839, 3317, 29918, 2139, 545, 2033, 353, 1243, 29918, 2139, 545, 13, 4706, 411, 11451, 1688, 29889, 336, 4637, 29898, 13, 18884, 7865, 2392, 29892, 13, 18884, 1993, 2433, 10923, 545, 714, 310, 3464, 6169, 13, 308, 1125, 13, 9651, 1243, 29918, 29873, 4003, 29889, 20401, 29918, 1579, 927, 29918, 1990, 580, 13, 2 ]
src/TestDice.py
Yamanama/CodeMonkeyApplication
0
14519
import unittest from Dice import Dice class TestDice(unittest.TestCase): def setUp(self): self.sides = 8 self.dice = Dice(self.sides) def test_roll(self): for i in range(1000): self.assertLessEqual(self.dice.roll(), self.sides) def test_error(self): self.assertRaises(ValueError, Dice, 0) if __name__ == '__main__': # pragma no cover unittest.main()
[ 1, 1053, 443, 27958, 13, 3166, 360, 625, 1053, 360, 625, 13, 13, 13, 1990, 4321, 29928, 625, 29898, 348, 27958, 29889, 3057, 8259, 1125, 13, 13, 1678, 822, 731, 3373, 29898, 1311, 1125, 13, 4706, 1583, 29889, 29879, 2247, 353, 29871, 29947, 13, 4706, 1583, 29889, 29881, 625, 353, 360, 625, 29898, 1311, 29889, 29879, 2247, 29897, 13, 13, 1678, 822, 1243, 29918, 1245, 29898, 1311, 1125, 13, 4706, 363, 474, 297, 3464, 29898, 29896, 29900, 29900, 29900, 1125, 13, 9651, 1583, 29889, 9294, 29931, 404, 9843, 29898, 1311, 29889, 29881, 625, 29889, 1245, 3285, 1583, 29889, 29879, 2247, 29897, 13, 13, 1678, 822, 1243, 29918, 2704, 29898, 1311, 1125, 13, 4706, 1583, 29889, 9294, 29934, 1759, 267, 29898, 1917, 2392, 29892, 360, 625, 29892, 29871, 29900, 29897, 13, 13, 13, 361, 4770, 978, 1649, 1275, 525, 1649, 3396, 1649, 2396, 29871, 396, 282, 23929, 694, 4612, 13, 1678, 443, 27958, 29889, 3396, 580, 13, 2 ]
Interfas Grafica VIII (GUI)/InterfasGraficaVIII.py
BrianMarquez3/Python-Course
20
45487
# Interfas Grafica VIII # Operacion Matematicas from tkinter import * raiz = Tk() miFrame=Frame(raiz) miFrame.pack() operacion ="" resultado=0 #Entry #------------------------------Pantalla--------------------------------- numeroPantalla=StringVar() pantalla=Entry(miFrame, textvariable=numeroPantalla) pantalla.grid(row=1, column=1, padx=10, pady=10, columnspan=4) #Espaciador pantalla.config(background="black",fg="#2EF907", justify="right", width=30) #--------------------------Pulsaciones teclado--------------------------- def numeroPulsado(num): global operacion if operacion!="": numeroPantalla.set(num) operacion="" else: numeroPantalla.set(numeroPantalla.get() + num) #------------------------------Funcion Suma------------------------------ def suma(num): global operacion global resultado resultado=resultado+int(num) operacion="suma" numeroPantalla.set(resultado) #------------------------------Funcion Resultado------------------------------ def el_resultado(): global resultado numeroPantalla.set(resultado+int(numeroPantalla.get())) resultado=0 #-------------------------------1 Fila----------------------------------- buton7=Button(miFrame, text="7", width=7, height=3, command=lambda:numeroPulsado("7")) buton7.grid(row=2, column=1) buton8=Button(miFrame, text="8", width=7, height=3, command=lambda:numeroPulsado("8")) buton8.grid(row=2, column=2) buton9=Button(miFrame, text="9", width=7, height=3, command=lambda:numeroPulsado("9")) buton9.grid(row=2, column=3) botonDiv=Button(miFrame, text="/", width=7, height=3) botonDiv.grid(row=2, column=4) #-------------------------------2 Fila----------------------------------- buton4=Button(miFrame, text="4", width=7, height=3, command=lambda:numeroPulsado("4")) buton4.grid(row=3, column=1) buton5=Button(miFrame, text="5", width=7, height=3, command=lambda:numeroPulsado("5")) buton5.grid(row=3, column=2) buton6=Button(miFrame, text="6", width=7, height=3, command=lambda:numeroPulsado("6")) buton6.grid(row=3, column=3) botonMul=Button(miFrame, text="*", width=7, height=3) botonMul.grid(row=3, column=4) #-------------------------------3 Fila----------------------------------- buton1=Button(miFrame, text="1", width=7, height=3, command=lambda:numeroPulsado("1")) buton1.grid(row=4, column=1) buton2=Button(miFrame, text="2", width=7, height=3, command=lambda:numeroPulsado("2")) buton2.grid(row=4, column=2) buton3=Button(miFrame, text="3", width=7, height=3 , command=lambda:numeroPulsado("3")) buton3.grid(row=4, column=3) botonRes=Button(miFrame, text="-",width=7, height=3) botonRes.grid(row=4, column=4) #-------------------------------4 Fila----------------------------------- buton0=Button(miFrame, text="0", width=7, height=3, command=lambda:numeroPulsado("0")) buton0.grid(row=5, column=1) butonComa=Button(miFrame, text=".", width=7, height=3) butonComa.grid(row=5, column=2) butonIgual=Button(miFrame, text="=", width=7, height=3, command=lambda:el_resultado()) butonIgual.grid(row=5, column=3) botonSuma=Button(miFrame, text="+", width=7, height=3, command=lambda:suma(numeroPantalla.get())) botonSuma.grid(row=5, column=4) raiz.mainloop()
[ 1, 396, 4124, 13629, 13721, 983, 15682, 13, 29937, 6607, 16337, 5345, 19217, 294, 13, 13, 3166, 18883, 1639, 1053, 334, 13, 13, 336, 466, 353, 323, 29895, 580, 13, 13, 2460, 4308, 29922, 4308, 29898, 336, 466, 29897, 13, 2460, 4308, 29889, 4058, 580, 13, 3372, 16337, 353, 15945, 13, 690, 2727, 29922, 29900, 13, 13, 29937, 9634, 13, 29937, 2683, 9072, 489, 29925, 424, 9864, 2683, 2683, 29899, 13, 13, 1949, 1489, 29925, 424, 9864, 29922, 1231, 9037, 580, 13, 13, 29886, 424, 9864, 29922, 9634, 29898, 2460, 4308, 29892, 1426, 11918, 29922, 1949, 1489, 29925, 424, 9864, 29897, 13, 29886, 424, 9864, 29889, 7720, 29898, 798, 29922, 29896, 29892, 1897, 29922, 29896, 29892, 17132, 29916, 29922, 29896, 29900, 29892, 282, 3714, 29922, 29896, 29900, 29892, 1897, 9653, 29922, 29946, 29897, 396, 15784, 18703, 3136, 13, 29886, 424, 9864, 29889, 2917, 29898, 7042, 543, 8517, 613, 16434, 9880, 29906, 29638, 29929, 29900, 29955, 613, 26922, 543, 1266, 613, 2920, 29922, 29941, 29900, 29897, 13, 13, 29937, 2683, 28400, 29925, 7273, 6027, 13784, 29880, 912, 2683, 1378, 5634, 13, 13, 13, 1753, 17910, 29925, 7273, 912, 29898, 1949, 1125, 13, 13, 1678, 5534, 1751, 16337, 13, 1678, 565, 1751, 16337, 29991, 543, 1115, 13, 4706, 17910, 29925, 424, 9864, 29889, 842, 29898, 1949, 29897, 13, 4706, 1751, 16337, 13776, 13, 1678, 1683, 29901, 13, 4706, 17910, 29925, 424, 9864, 29889, 842, 29898, 1949, 1489, 29925, 424, 9864, 29889, 657, 580, 718, 954, 29897, 13, 268, 13, 13, 29937, 2683, 9072, 489, 14400, 291, 6991, 29874, 2683, 9072, 489, 13, 13, 1753, 2533, 29874, 29898, 1949, 1125, 13, 1678, 5534, 1751, 16337, 13, 1678, 5534, 24578, 13, 1678, 24578, 29922, 690, 2727, 29974, 524, 29898, 1949, 29897, 13, 1678, 1751, 16337, 543, 2083, 29874, 29908, 13, 1678, 17910, 29925, 424, 9864, 29889, 842, 29898, 690, 2727, 29897, 13, 13, 29937, 2683, 9072, 489, 14400, 291, 2538, 2727, 2683, 9072, 489, 13, 13, 1753, 560, 29918, 690, 2727, 7295, 13, 13, 1678, 5534, 24578, 13, 1678, 17910, 29925, 424, 9864, 29889, 842, 29898, 690, 2727, 29974, 524, 29898, 1949, 1489, 29925, 424, 9864, 29889, 657, 22130, 13, 1678, 24578, 29922, 29900, 13, 13, 13, 13, 29937, 2683, 9072, 5634, 29896, 2514, 29874, 2683, 2683, 5634, 13, 13, 4187, 265, 29955, 29922, 3125, 29898, 2460, 4308, 29892, 1426, 543, 29955, 613, 2920, 29922, 29955, 29892, 3171, 29922, 29941, 29892, 1899, 29922, 2892, 29901, 1949, 1489, 29925, 7273, 912, 703, 29955, 5783, 29871, 13, 4187, 265, 29955, 29889, 7720, 29898, 798, 29922, 29906, 29892, 1897, 29922, 29896, 29897, 13, 13, 4187, 265, 29947, 29922, 3125, 29898, 2460, 4308, 29892, 1426, 543, 29947, 613, 2920, 29922, 29955, 29892, 3171, 29922, 29941, 29892, 1899, 29922, 2892, 29901, 1949, 1489, 29925, 7273, 912, 703, 29947, 5783, 13, 4187, 265, 29947, 29889, 7720, 29898, 798, 29922, 29906, 29892, 1897, 29922, 29906, 29897, 13, 13, 4187, 265, 29929, 29922, 3125, 29898, 2460, 4308, 29892, 1426, 543, 29929, 613, 2920, 29922, 29955, 29892, 3171, 29922, 29941, 29892, 1899, 29922, 2892, 29901, 1949, 1489, 29925, 7273, 912, 703, 29929, 5783, 13, 4187, 265, 29929, 29889, 7720, 29898, 798, 29922, 29906, 29892, 1897, 29922, 29941, 29897, 13, 13, 7451, 265, 12596, 29922, 3125, 29898, 2460, 4308, 29892, 1426, 13802, 613, 2920, 29922, 29955, 29892, 3171, 29922, 29941, 29897, 13, 7451, 265, 12596, 29889, 7720, 29898, 798, 29922, 29906, 29892, 1897, 29922, 29946, 29897, 13, 13, 29937, 2683, 9072, 5634, 29906, 2514, 29874, 2683, 2683, 5634, 13, 13, 4187, 265, 29946, 29922, 3125, 29898, 2460, 4308, 29892, 1426, 543, 29946, 613, 2920, 29922, 29955, 29892, 3171, 29922, 29941, 29892, 1899, 29922, 2892, 29901, 1949, 1489, 29925, 7273, 912, 703, 29946, 5783, 13, 4187, 265, 29946, 29889, 7720, 29898, 798, 29922, 29941, 29892, 1897, 29922, 29896, 29897, 13, 13, 4187, 265, 29945, 29922, 3125, 29898, 2460, 4308, 29892, 1426, 543, 29945, 613, 2920, 29922, 29955, 29892, 3171, 29922, 29941, 29892, 1899, 29922, 2892, 29901, 1949, 1489, 29925, 7273, 912, 703, 29945, 5783, 13, 4187, 265, 29945, 29889, 7720, 29898, 798, 29922, 29941, 29892, 1897, 29922, 29906, 29897, 13, 13, 4187, 265, 29953, 29922, 3125, 29898, 2460, 4308, 29892, 1426, 543, 29953, 613, 2920, 29922, 29955, 29892, 3171, 29922, 29941, 29892, 1899, 29922, 2892, 29901, 1949, 1489, 29925, 7273, 912, 703, 29953, 5783, 13, 4187, 265, 29953, 29889, 7720, 29898, 798, 29922, 29941, 29892, 1897, 29922, 29941, 29897, 13, 13, 7451, 265, 29924, 352, 29922, 3125, 29898, 2460, 4308, 29892, 1426, 543, 29930, 613, 2920, 29922, 29955, 29892, 3171, 29922, 29941, 29897, 13, 7451, 265, 29924, 352, 29889, 7720, 29898, 798, 29922, 29941, 29892, 1897, 29922, 29946, 29897, 13, 13, 29937, 2683, 9072, 5634, 29941, 2514, 29874, 2683, 2683, 5634, 13, 13, 4187, 265, 29896, 29922, 3125, 29898, 2460, 4308, 29892, 1426, 543, 29896, 613, 2920, 29922, 29955, 29892, 3171, 29922, 29941, 29892, 1899, 29922, 2892, 29901, 1949, 1489, 29925, 7273, 912, 703, 29896, 5783, 29871, 13, 4187, 265, 29896, 29889, 7720, 29898, 798, 29922, 29946, 29892, 1897, 29922, 29896, 29897, 13, 13, 4187, 265, 29906, 29922, 3125, 29898, 2460, 4308, 29892, 1426, 543, 29906, 613, 2920, 29922, 29955, 29892, 3171, 29922, 29941, 29892, 1899, 29922, 2892, 29901, 1949, 1489, 29925, 7273, 912, 703, 29906, 5783, 13, 4187, 265, 29906, 29889, 7720, 29898, 798, 29922, 29946, 29892, 1897, 29922, 29906, 29897, 13, 13, 4187, 265, 29941, 29922, 3125, 29898, 2460, 4308, 29892, 1426, 543, 29941, 613, 2920, 29922, 29955, 29892, 3171, 29922, 29941, 1919, 1899, 29922, 2892, 29901, 1949, 1489, 29925, 7273, 912, 703, 29941, 5783, 13, 4187, 265, 29941, 29889, 7720, 29898, 798, 29922, 29946, 29892, 1897, 29922, 29941, 29897, 13, 13, 7451, 265, 1666, 29922, 3125, 29898, 2460, 4308, 29892, 1426, 543, 29899, 613, 2103, 29922, 29955, 29892, 3171, 29922, 29941, 29897, 13, 7451, 265, 1666, 29889, 7720, 29898, 798, 29922, 29946, 29892, 1897, 29922, 29946, 29897, 13, 13, 13, 29937, 2683, 9072, 5634, 29946, 2514, 29874, 2683, 2683, 5634, 13, 13, 4187, 265, 29900, 29922, 3125, 29898, 2460, 4308, 29892, 1426, 543, 29900, 613, 2920, 29922, 29955, 29892, 3171, 29922, 29941, 29892, 1899, 29922, 2892, 29901, 1949, 1489, 29925, 7273, 912, 703, 29900, 5783, 13, 4187, 265, 29900, 29889, 7720, 29898, 798, 29922, 29945, 29892, 1897, 29922, 29896, 29897, 13, 13, 4187, 265, 1523, 29874, 29922, 3125, 29898, 2460, 4308, 29892, 1426, 543, 19602, 2920, 29922, 29955, 29892, 3171, 29922, 29941, 29897, 13, 4187, 265, 1523, 29874, 29889, 7720, 29898, 798, 29922, 29945, 29892, 1897, 29922, 29906, 29897, 13, 13, 4187, 265, 28600, 950, 29922, 3125, 29898, 2460, 4308, 29892, 1426, 543, 543, 29892, 2920, 29922, 29955, 29892, 3171, 29922, 29941, 29892, 1899, 29922, 2892, 29901, 295, 29918, 690, 2727, 3101, 13, 4187, 265, 28600, 950, 29889, 7720, 29898, 798, 29922, 29945, 29892, 1897, 29922, 29941, 29897, 13, 13, 7451, 265, 29903, 10859, 29922, 3125, 29898, 2460, 4308, 29892, 1426, 543, 29974, 613, 2920, 29922, 29955, 29892, 3171, 29922, 29941, 29892, 1899, 29922, 2892, 29901, 2083, 29874, 29898, 1949, 1489, 29925, 424, 9864, 29889, 657, 22130, 13, 7451, 265, 29903, 10859, 29889, 7720, 29898, 798, 29922, 29945, 29892, 1897, 29922, 29946, 29897, 13, 13, 336, 466, 29889, 3396, 7888, 580, 13, 2 ]
data/objects/sample.py
predictive-analytics-lab/tiny-comparison-framework
0
11491
<filename>data/objects/sample.py from data.objects.data import Data class Sample(Data): """ A way to sample from a dataset for testing purposes. """ def __init__(self, data, num = 100): self.data = data self.dataset_name = data.get_dataset_name() self.class_attr = data.get_class_attribute() self.positive_class_val = data.get_positive_class_val("") # sigh self.sensitive_attrs = data.get_sensitive_attributes() self.privileged_class_names = data.get_privileged_class_names("") # sigh self.categorical_features = data.get_categorical_features() self.features_to_keep = data.get_features_to_keep() self.missing_val_indicators = data.get_missing_val_indicators() self.num_to_sample = num def data_specific_processing(self, dataframe): dataframe = self.data.data_specific_processing(dataframe) return dataframe.sample(n = self.num_to_sample, replace=True)
[ 1, 529, 9507, 29958, 1272, 29914, 12650, 29914, 11249, 29889, 2272, 13, 3166, 848, 29889, 12650, 29889, 1272, 1053, 3630, 13, 13, 1990, 21029, 29898, 1469, 1125, 13, 1678, 9995, 13, 1678, 319, 982, 304, 4559, 515, 263, 8783, 363, 6724, 11976, 29889, 13, 1678, 9995, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 848, 29892, 954, 353, 29871, 29896, 29900, 29900, 1125, 13, 4706, 1583, 29889, 1272, 353, 848, 13, 4706, 1583, 29889, 24713, 29918, 978, 353, 848, 29889, 657, 29918, 24713, 29918, 978, 580, 13, 4706, 1583, 29889, 1990, 29918, 5552, 353, 848, 29889, 657, 29918, 1990, 29918, 12715, 580, 13, 4706, 1583, 29889, 1066, 3321, 29918, 1990, 29918, 791, 353, 848, 29889, 657, 29918, 1066, 3321, 29918, 1990, 29918, 791, 703, 1159, 396, 269, 1141, 13, 4706, 1583, 29889, 23149, 3321, 29918, 5552, 29879, 353, 848, 29889, 657, 29918, 23149, 3321, 29918, 15697, 580, 13, 4706, 1583, 29889, 22534, 488, 3192, 29918, 1990, 29918, 7039, 353, 848, 29889, 657, 29918, 22534, 488, 3192, 29918, 1990, 29918, 7039, 703, 1159, 396, 269, 1141, 13, 4706, 1583, 29889, 29883, 20440, 936, 29918, 22100, 353, 848, 29889, 657, 29918, 29883, 20440, 936, 29918, 22100, 580, 13, 4706, 1583, 29889, 22100, 29918, 517, 29918, 17462, 353, 848, 29889, 657, 29918, 22100, 29918, 517, 29918, 17462, 580, 13, 4706, 1583, 29889, 27259, 29918, 791, 29918, 513, 293, 4097, 353, 848, 29889, 657, 29918, 27259, 29918, 791, 29918, 513, 293, 4097, 580, 13, 4706, 1583, 29889, 1949, 29918, 517, 29918, 11249, 353, 954, 13, 13, 1678, 822, 848, 29918, 14940, 29918, 19170, 29898, 1311, 29892, 12205, 1125, 13, 4706, 12205, 353, 1583, 29889, 1272, 29889, 1272, 29918, 14940, 29918, 19170, 29898, 1272, 2557, 29897, 13, 4706, 736, 12205, 29889, 11249, 29898, 29876, 353, 1583, 29889, 1949, 29918, 517, 29918, 11249, 29892, 5191, 29922, 5574, 29897, 13, 2 ]
Numpy/Numpy Basics.py
Akshat-MS/DataScience-Learning
0
180530
#!/usr/bin/env python # coding: utf-8 # # NumPy # # # In[32]: # NumPy is a library for scientific computations in Python. # Numpy is one of the packages you have to know if you're going to do data science with Python. # It is a Python library that provides support for large, multidimensional arrays along with masked # arrays and matrices, and provides extensive functions for performing array manipulation, including # mathematical, logical, and shape calculations, sorting, selecting, I/O, discrete Fourier transforms, # linear algebra, basic statistical operations, random simulations, and so on. # In[3]: # Importing the Numpy library import numpy as np # In[5]: # Numpy version np.__version__ # # Function - numpy.array() # In[6]: # Function - numpy.array() (Note only most frequently parameters are explain below) # numpy.array(object, dtype=None, *, copy=True, order='K', subok=False, ndmin=0, like=None) # Parameters : # object : array_like # An array, any object exposing the array interface, an object whose __array__ method returns an array, # or any (nested) sequence. If object is a scalar, a 0-dimensional array containing object is returned. # Example - list object [1,2,3] or list of tuple [(1,2,3),(4,5,6)] # dtype : data-type (optional) # The desired data-type for the array. If not given, then the type will be determined as the minimum # type required to hold the objects in the sequence. # Example - dtype - float or str # In[7]: a = np.array([1,2,3]) b = np.array([(1,2,3),(6,7,8)],dtype = float) c = np.array([[(1,2,3),(4,5,6)],[(7,8,9),(10,11,12)]], dtype= str) # In[8]: print(a, " \t" , type(a)) print("\n",b, " \t" , type(b)) print("\n",c, " \t" , type(c)) # # Numpy supports - element-wise operations # In[9]: # When a*2 is used, it performs element-wise operations rather than duplicating the content as with lists. print(a*2) print(b*2) # # Function required for inspecting the Numpy Array # - a.shape # - a.ndim # - a.size # - a.dtype # - a.dtype.name # - a.astype(float) # In[10]: # a.shape - Tuple of array dimensions. ## The shape property is usually used to get the current shape of an array ## Example - (3,) - What is the magnitude of each dimension. c.shape # In[11]: # a.ndim - Dimension of the array (1d,2d or nth array) ## Example - a.ndim - Array of dimension 1 (1d). c.ndim # In[12]: # a.size - Number of elements in the array. ## Equal to np.prod(a.shape), i.e., the product of the array’s dimensions. ## Example c.size - shape of c is (2,2,3) = 2*2*3 = 12 c.size # In[13]: # a.dtype - Data-type of the array’s elements. ## Example a.dtype - dtype('int32') and b.dtype - dtype('float64') b.dtype # In[14]: # a.dtype.name - A bit-width name for this data-type. ## Un-sized flexible data-type objects do not have this attribute. ## Example x = np.dtype(float) x.name is float64 x = np.dtype(float) y = np.dtype([('a', np.int32, 8), ('b', np.float64, 6)]) print(x.name,y.name) # In[15]: # a.astype(float) ## Convert the array's datatype according to the parameter given ## b.astype - When creating the array b, we used float, and then used astype to convert to integer. b.astype(int) # # Different methods to Initialize the numpy array # ## numpy.arange # In[16]: # numpy.arange([start, ]stop, [step, ]dtype=None, *, like=None) ## Return evenly spaced values within a given interval. ## Values are generated within the half-open interval [start, stop) ## (In other words, the interval including start but excluding stop). ## For integer arguments the function is equivalent to the Python built-in range function, ## but returns an ndarray rather than a list. print(np.arange(0,10,2,dtype = int)) print(np.arange(0,10,0.5,dtype=float)) # ## numpy.linspace # In[17]: # numpy.linspace(start, stop, num=50, endpoint=True, retstep=False, dtype=None, axis=0)[source] ## Return evenly spaced numbers over a specified interval. ## Returns num evenly spaced samples, calculated over the interval [start, stop]. ## The endpoint of the interval can optionally be excluded. print(np.linspace(2.0, 3.0, num=5)) print(np.linspace(2.0, 3.0, num=5, endpoint=False)) print(np.linspace(2.0, 3.0, num=5, retstep=True)) # ## Difference between the linspace and arange. # In[18]: # Difference between the linspace and arange. ## arange allow you to define the size of the step. linspace allow you to define the number of steps. ## Example where arange might fail are - print(" Using arange ",np.arange(0, 5, 0.5, dtype=int)) print(" Using arange ",np.arange(-3, 3, 0.5, dtype=int)) print(" Using Linspace ", np.linspace(0, 5, num = 5)) print(" Using Linspace ",np.linspace(-3, 3,num = 5)) # ## Difference between numpy Array and Lists # |Numpy Array|List| # |-----|-------| # |Numpy data structures consume less memory|List take more memory than numpy array| # |Numpy are faster |Lists are slower as compared to numpy array| # |NumPy have optimized functions such as linear algebra operations built in|| # |Element wise operation is possible|| # |Array are by default Homogeneous, which means data inside an array must be of the same Datatype.|A list can store different data types| # ||A list can consist of different nested data size| # |We can create a N-dimensional array in python using numpy.array().|| # ||A list is easier to modify| # |Array can handle mathematical operations|A list cannot directly handle a mathematical operations| # ## numpy.zeros # In[25]: # numpy.zeros(shape, dtype=float, order='C', *, like=None) ## Return (ndarray) a new array of given shape and type, filled with zeros. arr_1d_zeros = np.zeros(5) arr_2d_zeros = np.zeros((2,5),dtype="int64") arr_3d_zeros = np.zeros((2,3,4),dtype = int) # In[31]: print("\n 1D Array\n",arr_1d_zeros) print("\n 2D Array\n", arr_2d_zeros) print("\n 3D Array\n",arr_3d_zeros) # ## numpy.ones # In[32]: # numpy.ones(shape, dtype=None, order='C', *, like=None) ## Return a new array of given shape and type, filled with ones. arr_1d_ones = np.ones(5) arr_2d_ones = np.ones((2,5),dtype="int64") arr_3d_ones = np.ones((2,3,4),dtype = int) # In[33]: print("\n 1D Array\n",arr_1d_ones) print("\n 2D Array\n", arr_2d_ones) print("\n 3D Array\n",arr_3d_ones) # ## numpy.full # In[35]: # numpy.full(shape, fill_value, dtype=None, order='C', *, like=None) ## Return a new array of given shape and type, filled with fill_value. arr_1d_full = np.full(2, np.inf) arr_2d_full = np.full((2, 2), 5) arr_3d_full = np.full((2, 2,2), [1, 2]) # In[36]: print("\n 1D Array\n",arr_1d_full) print("\n 2D Array\n", arr_2d_full) print("\n 3D Array\n",arr_3d_full) # ## numpy.eye # In[37]: # numpy.eye(N, M=None, k=0, dtype=<class 'float'>, order='C', *, like=None) ## Return a 2-D array with ones on the diagonal and zeros elsewhere arr_2d_diag0 = np.eye(2, dtype=int) arr_2d_diag1 = np.eye(3, k=1) # In[39]: print("\n 2D Array\n", arr_2d_diag0) print("\n 2D Array\n", arr_2d_diag1) # ## random.random # In[40]: # random.random(size=None) ## Return random floats in the half-open interval [0.0, 1.0). ## Alias for random_sample to ease forward-porting to the new random API. np.random.random() # # Array Manipulation # # ## numpy.transpose # In[55]: # numpy.transpose(a, axes=None) # Reverse or permute the axes of an array; returns the modified array. # Parameters | aarray_like | Input array. # axes | tuple or list of ints, optional # If specified, it must be a tuple or list which contains a permutation of [0,1,..,N-1] where N is the # number of axes of a. The i’th axis of the returned array will correspond to the axis numbered # axes[i] of the input. If not specified, defaults to range(a.ndim)[::-1], which reverses the order # of the axes. x = np.arange(4).reshape((2,2)) print(x) np.transpose(x) # In[59]: x = np.ones((1, 2, 3)) print("Original Array\n",x) print("\n After Transpose \n",np.transpose(x, (1, 0, 2))) # ## numpy.vstack # In[44]: # numpy.vstack(tup) # Stack arrays in sequence vertically (row wise). # Parameters | tup | sequence of ndarrays # The arrays must have the same shape along all but the first axis. # 1-D arrays must have the same length. # Returns | stacked | ndarray # The array formed by stacking the given arrays, will be at least 2-D. top_stack = np.linspace(0, 3, 4).reshape(2,2) bottom_stack = np.linspace(5, 8, 4).reshape(2,2) vstack = np.vstack((top_stack,bottom_right)) # In[47]: print("Array \n",top_stack) print("\nArray \n",bottom_right) print("\nMerged Array \n",vstack) # ## numpy.hstack # In[48]: # numpy.hstack(tup) # Stack arrays in sequence horizontally (column wise). # Parameters | tup | sequence of ndarrays # The arrays must have the same shape along all but the second axis, #except 1-D arrays which can be any length. # Returns | stacked | ndarray # The array formed by stacking the given arrays. left_stack = np.linspace(0, 3, 4).reshape(2,2) right_stack = np.linspace(5, 8, 4).reshape(2,2) hstack = np.hstack((left_stack,right_stack)) # In[49]: print("Array \n",left_stack) print("\nArray \n",right_stack) print("\nMerged Array \n",hstack) # ## numpy.concatenate # In[51]: # numpy.concatenate((a1, a2, ...), axis=0, out=None, dtype=None, casting="same_kind") # Join a sequence of arrays along an existing axis # Parameters | a1, a2, …sequence of array_like # The arrays must have the same shape, except in the dimension corresponding to axis # (the first, by default). # axis | int, optional # The axis along which the arrays will be joined. If axis is None, arrays are flattened before use. # Default is 0. # Returns | res | ndarray | he concatenated array. a = np.array([[1, 2], [3, 4]]) b = np.array([[5, 6]]) np.concatenate((a, b), axis=0) # In[52]: np.concatenate((a, b.T), axis=1) # In[53]: np.concatenate((a, b), axis=None) # In[ ]:
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 14137, 29901, 23616, 29899, 29947, 13, 13, 29937, 396, 11848, 19737, 13, 29937, 29871, 13, 29937, 29871, 13, 13, 29937, 512, 29961, 29941, 29906, 5387, 13, 13, 13, 29937, 11848, 19737, 338, 263, 3489, 363, 16021, 2912, 800, 297, 5132, 29889, 13, 29937, 11848, 2272, 338, 697, 310, 278, 9741, 366, 505, 304, 1073, 565, 366, 29915, 276, 2675, 304, 437, 848, 10466, 411, 5132, 29889, 13, 13, 29937, 739, 338, 263, 5132, 3489, 393, 8128, 2304, 363, 2919, 29892, 1773, 333, 326, 8180, 7049, 3412, 411, 11105, 287, 29871, 13, 29937, 7049, 322, 13516, 29892, 322, 8128, 20607, 3168, 363, 15859, 1409, 11525, 2785, 29892, 3704, 29871, 13, 29937, 19475, 29892, 16667, 29892, 322, 8267, 17203, 29892, 16548, 29892, 18851, 29892, 306, 29914, 29949, 29892, 19554, 27506, 4327, 29879, 29892, 13, 29937, 5608, 9623, 29892, 6996, 24148, 6931, 29892, 4036, 23876, 29892, 322, 577, 373, 29889, 13, 13, 13, 29937, 512, 29961, 29941, 5387, 13, 13, 13, 29937, 16032, 292, 278, 11848, 2272, 3489, 13, 5215, 12655, 408, 7442, 13, 13, 13, 29937, 512, 29961, 29945, 5387, 13, 13, 13, 29937, 11848, 2272, 1873, 13, 9302, 17255, 3259, 1649, 13, 13, 13, 29937, 396, 6680, 448, 12655, 29889, 2378, 580, 13, 13, 29937, 512, 29961, 29953, 5387, 13, 13, 13, 29937, 6680, 448, 12655, 29889, 2378, 580, 313, 9842, 871, 1556, 13672, 4128, 526, 5649, 2400, 29897, 13, 29937, 12655, 29889, 2378, 29898, 3318, 29892, 26688, 29922, 8516, 29892, 334, 29892, 3509, 29922, 5574, 29892, 1797, 2433, 29968, 742, 1014, 554, 29922, 8824, 29892, 29871, 299, 1195, 29922, 29900, 29892, 763, 29922, 8516, 29897, 13, 13, 29937, 12662, 2699, 584, 29871, 13, 29937, 1203, 584, 1409, 29918, 4561, 13, 29937, 530, 1409, 29892, 738, 1203, 14060, 292, 278, 1409, 5067, 29892, 385, 1203, 5069, 4770, 2378, 1649, 1158, 3639, 385, 1409, 29892, 13, 29937, 470, 738, 313, 27420, 29897, 5665, 29889, 960, 1203, 338, 263, 17336, 29892, 263, 29871, 29900, 29899, 12531, 1409, 6943, 1203, 338, 4133, 29889, 13, 29937, 8741, 448, 1051, 1203, 518, 29896, 29892, 29906, 29892, 29941, 29962, 470, 1051, 310, 18761, 17288, 29896, 29892, 29906, 29892, 29941, 21336, 29946, 29892, 29945, 29892, 29953, 4638, 13, 13, 29937, 26688, 584, 848, 29899, 1853, 313, 25253, 29897, 13, 29937, 450, 7429, 848, 29899, 1853, 363, 278, 1409, 29889, 960, 451, 2183, 29892, 769, 278, 1134, 674, 367, 10087, 408, 278, 9212, 13, 29937, 1134, 3734, 304, 4808, 278, 3618, 297, 278, 5665, 29889, 13, 29937, 8741, 448, 26688, 448, 5785, 470, 851, 13, 13, 13, 29937, 512, 29961, 29955, 5387, 13, 13, 13, 29874, 353, 7442, 29889, 2378, 4197, 29896, 29892, 29906, 29892, 29941, 2314, 13, 29890, 353, 7442, 29889, 2378, 4197, 29898, 29896, 29892, 29906, 29892, 29941, 21336, 29953, 29892, 29955, 29892, 29947, 29897, 1402, 29881, 1853, 353, 5785, 29897, 13, 29883, 353, 7442, 29889, 2378, 4197, 15625, 29896, 29892, 29906, 29892, 29941, 21336, 29946, 29892, 29945, 29892, 29953, 29897, 1402, 15625, 29955, 29892, 29947, 29892, 29929, 21336, 29896, 29900, 29892, 29896, 29896, 29892, 29896, 29906, 4638, 1402, 26688, 29922, 851, 29897, 13, 13, 13, 29937, 512, 29961, 29947, 5387, 13, 13, 13, 2158, 29898, 29874, 29892, 376, 320, 29873, 29908, 1919, 1134, 29898, 29874, 876, 13, 2158, 14182, 29876, 613, 29890, 29892, 376, 320, 29873, 29908, 1919, 1134, 29898, 29890, 876, 13, 2158, 14182, 29876, 613, 29883, 29892, 376, 320, 29873, 29908, 1919, 1134, 29898, 29883, 876, 13, 13, 13, 29937, 396, 11848, 2272, 11286, 448, 29871, 1543, 29899, 3538, 6931, 13, 13, 29937, 512, 29961, 29929, 5387, 13, 13, 13, 29937, 1932, 263, 29930, 29906, 338, 1304, 29892, 372, 23233, 1543, 29899, 3538, 6931, 3265, 1135, 5141, 506, 1218, 278, 2793, 408, 411, 8857, 29889, 13, 2158, 29898, 29874, 29930, 29906, 29897, 13, 2158, 29898, 29890, 29930, 29906, 29897, 13, 13, 13, 29937, 396, 6680, 3734, 363, 16096, 292, 278, 11848, 2272, 4398, 13, 29937, 259, 448, 263, 29889, 12181, 13, 29937, 259, 448, 263, 29889, 299, 326, 13, 29937, 259, 448, 263, 29889, 2311, 13, 29937, 259, 448, 263, 29889, 29881, 1853, 13, 29937, 259, 448, 263, 29889, 29881, 1853, 29889, 978, 13, 29937, 259, 448, 263, 29889, 579, 668, 29898, 7411, 29897, 13, 13, 29937, 512, 29961, 29896, 29900, 5387, 13, 13, 13, 29937, 263, 29889, 12181, 448, 12603, 552, 310, 1409, 13391, 29889, 13, 2277, 450, 8267, 2875, 338, 5491, 1304, 304, 679, 278, 1857, 8267, 310, 385, 1409, 13, 2277, 8741, 448, 313, 29941, 29892, 29897, 448, 1724, 338, 278, 18497, 310, 1269, 9927, 29889, 13, 29883, 29889, 12181, 13, 13, 13, 29937, 512, 29961, 29896, 29896, 5387, 13, 13, 13, 29937, 263, 29889, 299, 326, 448, 4792, 2673, 310, 278, 1409, 313, 29896, 29881, 29892, 29906, 29881, 470, 302, 386, 1409, 29897, 13, 2277, 8741, 448, 263, 29889, 299, 326, 448, 4398, 310, 9927, 29871, 29896, 313, 29896, 29881, 467, 13, 29883, 29889, 299, 326, 13, 13, 13, 29937, 512, 29961, 29896, 29906, 5387, 13, 13, 13, 29937, 263, 29889, 2311, 448, 9681, 310, 3161, 297, 278, 1409, 29889, 13, 2277, 11243, 284, 304, 7442, 29889, 10633, 29898, 29874, 29889, 12181, 511, 474, 29889, 29872, 1696, 278, 3234, 310, 278, 1409, 30010, 29879, 13391, 29889, 13, 2277, 8741, 274, 29889, 2311, 448, 8267, 310, 274, 338, 313, 29906, 29892, 29906, 29892, 29941, 29897, 353, 29871, 29906, 29930, 29906, 29930, 29941, 353, 29871, 29896, 29906, 29871, 13, 29883, 29889, 2311, 13, 13, 13, 29937, 512, 29961, 29896, 29941, 5387, 13, 13, 13, 29937, 263, 29889, 29881, 1853, 448, 3630, 29899, 1853, 310, 278, 1409, 30010, 29879, 3161, 29889, 13, 2277, 8741, 263, 29889, 29881, 1853, 448, 26688, 877, 524, 29941, 29906, 1495, 322, 289, 29889, 29881, 1853, 448, 26688, 877, 7411, 29953, 29946, 1495, 13, 29890, 29889, 29881, 1853, 13, 13, 13, 29937, 512, 29961, 29896, 29946, 5387, 13, 13, 13, 29937, 263, 29889, 29881, 1853, 29889, 978, 448, 319, 2586, 29899, 2103, 1024, 363, 445, 848, 29899, 1853, 29889, 13, 2277, 853, 29899, 29879, 1891, 25706, 848, 29899, 1853, 3618, 437, 451, 505, 445, 5352, 29889, 13, 2277, 8741, 921, 353, 7442, 29889, 29881, 1853, 29898, 7411, 29897, 921, 29889, 978, 338, 5785, 29953, 29946, 13, 29916, 353, 7442, 29889, 29881, 1853, 29898, 7411, 29897, 13, 29891, 353, 7442, 29889, 29881, 1853, 4197, 877, 29874, 742, 7442, 29889, 524, 29941, 29906, 29892, 29871, 29947, 511, 6702, 29890, 742, 7442, 29889, 7411, 29953, 29946, 29892, 29871, 29953, 29897, 2314, 13, 2158, 29898, 29916, 29889, 978, 29892, 29891, 29889, 978, 29897, 13, 13, 13, 29937, 512, 29961, 29896, 29945, 5387, 13, 13, 13, 29937, 263, 29889, 579, 668, 29898, 7411, 29897, 13, 2277, 14806, 278, 1409, 29915, 29879, 1418, 23179, 5034, 304, 278, 3443, 2183, 13, 2277, 289, 29889, 579, 668, 448, 1932, 4969, 278, 1409, 289, 29892, 591, 1304, 5785, 29892, 322, 769, 1304, 8717, 668, 304, 3588, 304, 6043, 29889, 13, 29890, 29889, 579, 668, 29898, 524, 29897, 13, 13, 13, 29937, 396, 360, 15622, 3519, 304, 25455, 278, 12655, 1409, 13, 13, 29937, 444, 12655, 29889, 279, 927, 13, 13, 29937, 512, 29961, 29896, 29953, 5387, 13, 13, 13, 29937, 12655, 29889, 279, 927, 4197, 2962, 29892, 4514, 9847, 29892, 518, 10568, 29892, 4514, 29881, 1853, 29922, 8516, 29892, 334, 29892, 763, 29922, 8516, 29897, 13, 2277, 7106, 1584, 368, 26325, 287, 1819, 2629, 263, 2183, 7292, 29889, 13, 2277, 2630, 1041, 526, 5759, 2629, 278, 4203, 29899, 3150, 7292, 518, 2962, 29892, 5040, 29897, 29871, 13, 2277, 313, 797, 916, 3838, 29892, 278, 7292, 3704, 1369, 541, 429, 22368, 5040, 467, 29871, 13, 2277, 1152, 6043, 6273, 278, 740, 338, 7126, 304, 278, 5132, 4240, 29899, 262, 3464, 740, 29892, 29871, 13, 2277, 541, 3639, 385, 29871, 299, 2378, 3265, 1135, 263, 1051, 29889, 13, 2158, 29898, 9302, 29889, 279, 927, 29898, 29900, 29892, 29896, 29900, 29892, 29906, 29892, 29881, 1853, 353, 938, 876, 13, 2158, 29898, 9302, 29889, 279, 927, 29898, 29900, 29892, 29896, 29900, 29892, 29900, 29889, 29945, 29892, 29881, 1853, 29922, 7411, 876, 13, 13, 13, 29937, 444, 12655, 29889, 1915, 3493, 13, 13, 29937, 512, 29961, 29896, 29955, 5387, 13, 13, 13, 29937, 12655, 29889, 1915, 3493, 29898, 2962, 29892, 5040, 29892, 954, 29922, 29945, 29900, 29892, 16248, 29922, 5574, 29892, 3240, 10568, 29922, 8824, 29892, 26688, 29922, 8516, 29892, 9685, 29922, 29900, 9601, 4993, 29962, 13, 2277, 7106, 1584, 368, 26325, 287, 3694, 975, 263, 6790, 7292, 29889, 13, 2277, 16969, 954, 1584, 368, 26325, 287, 11916, 29892, 12833, 975, 278, 7292, 518, 2962, 29892, 5040, 1822, 13, 2277, 450, 16248, 310, 278, 7292, 508, 2984, 635, 367, 429, 13347, 29889, 13, 2158, 29898, 9302, 29889, 1915, 3493, 29898, 29906, 29889, 29900, 29892, 29871, 29941, 29889, 29900, 29892, 954, 29922, 29945, 876, 13, 2158, 29898, 9302, 29889, 1915, 3493, 29898, 29906, 29889, 29900, 29892, 29871, 29941, 29889, 29900, 29892, 954, 29922, 29945, 29892, 16248, 29922, 8824, 876, 13, 2158, 29898, 9302, 29889, 1915, 3493, 29898, 29906, 29889, 29900, 29892, 29871, 29941, 29889, 29900, 29892, 954, 29922, 29945, 29892, 3240, 10568, 29922, 5574, 876, 13, 13, 13, 29937, 444, 360, 17678, 1546, 278, 6276, 3493, 322, 564, 927, 29889, 13, 13, 29937, 512, 29961, 29896, 29947, 5387, 13, 13, 13, 29937, 360, 17678, 1546, 278, 6276, 3493, 322, 564, 927, 29889, 13, 2277, 564, 927, 2758, 366, 304, 4529, 278, 2159, 310, 278, 4331, 29889, 6276, 3493, 2758, 366, 304, 4529, 278, 1353, 310, 6576, 29889, 13, 2277, 8741, 988, 564, 927, 1795, 4418, 526, 448, 29871, 13, 2158, 703, 5293, 564, 927, 9162, 9302, 29889, 279, 927, 29898, 29900, 29892, 29871, 29945, 29892, 29871, 29900, 29889, 29945, 29892, 26688, 29922, 524, 876, 13, 2158, 703, 5293, 564, 927, 9162, 9302, 29889, 279, 927, 6278, 29941, 29892, 29871, 29941, 29892, 29871, 29900, 29889, 29945, 29892, 26688, 29922, 524, 876, 13, 13, 2158, 703, 5293, 4342, 3493, 9162, 7442, 29889, 1915, 3493, 29898, 29900, 29892, 29871, 29945, 29892, 954, 353, 29871, 29945, 876, 13, 2158, 703, 5293, 4342, 3493, 9162, 9302, 29889, 1915, 3493, 6278, 29941, 29892, 29871, 29941, 29892, 1949, 353, 29871, 29945, 876, 13, 13, 13, 29937, 444, 360, 17678, 1546, 12655, 4398, 322, 2391, 29879, 13, 13, 29937, 891, 8009, 2272, 4398, 29989, 1293, 29989, 29871, 13, 29937, 891, 23648, 29989, 26589, 29989, 13, 29937, 891, 8009, 2272, 848, 12286, 29151, 3109, 3370, 29989, 1293, 2125, 901, 3370, 1135, 12655, 1409, 29989, 29871, 13, 29937, 891, 8009, 2272, 526, 8473, 891, 1293, 29879, 526, 20312, 408, 9401, 304, 12655, 1409, 29989, 13, 29937, 891, 8009, 19737, 505, 27545, 3168, 1316, 408, 5608, 9623, 6931, 4240, 297, 8876, 13, 29937, 891, 2642, 19396, 5858, 338, 1950, 8876, 13, 29937, 891, 2588, 526, 491, 2322, 15089, 23724, 29892, 607, 2794, 848, 2768, 385, 1409, 1818, 367, 310, 278, 1021, 13373, 23179, 29889, 29989, 29909, 1051, 508, 3787, 1422, 848, 4072, 29989, 13, 29937, 3830, 29909, 1051, 508, 5718, 310, 1422, 9322, 848, 2159, 29989, 13, 29937, 891, 4806, 508, 1653, 263, 405, 29899, 12531, 1409, 297, 3017, 773, 12655, 29889, 2378, 2141, 8876, 13, 29937, 3830, 29909, 1051, 338, 6775, 304, 6623, 29989, 13, 29937, 891, 2588, 508, 4386, 19475, 6931, 29989, 29909, 1051, 2609, 4153, 4386, 263, 19475, 6931, 29989, 13, 13, 29937, 444, 12655, 29889, 3298, 359, 13, 13, 29937, 512, 29961, 29906, 29945, 5387, 13, 13, 13, 29937, 12655, 29889, 3298, 359, 29898, 12181, 29892, 26688, 29922, 7411, 29892, 1797, 2433, 29907, 742, 334, 29892, 763, 29922, 8516, 29897, 13, 2277, 7106, 313, 299, 2378, 29897, 263, 716, 1409, 310, 2183, 8267, 322, 1134, 29892, 10423, 411, 24786, 29889, 13, 2749, 29918, 29896, 29881, 29918, 3298, 359, 353, 7442, 29889, 3298, 359, 29898, 29945, 29897, 13, 2749, 29918, 29906, 29881, 29918, 3298, 359, 353, 7442, 29889, 3298, 359, 3552, 29906, 29892, 29945, 511, 29881, 1853, 543, 524, 29953, 29946, 1159, 13, 2749, 29918, 29941, 29881, 29918, 3298, 359, 353, 7442, 29889, 3298, 359, 3552, 29906, 29892, 29941, 29892, 29946, 511, 29881, 1853, 353, 938, 29897, 13, 13, 13, 29937, 512, 29961, 29941, 29896, 5387, 13, 13, 13, 2158, 14182, 29876, 29871, 29896, 29928, 4398, 29905, 29876, 613, 2749, 29918, 29896, 29881, 29918, 3298, 359, 29897, 13, 2158, 14182, 29876, 29871, 29906, 29928, 4398, 29905, 29876, 613, 3948, 29918, 29906, 29881, 29918, 3298, 359, 29897, 13, 2158, 14182, 29876, 29871, 29941, 29928, 4398, 29905, 29876, 613, 2749, 29918, 29941, 29881, 29918, 3298, 359, 29897, 13, 13, 13, 29937, 444, 12655, 29889, 2873, 13, 13, 29937, 512, 29961, 29941, 29906, 5387, 13, 13, 13, 29937, 12655, 29889, 2873, 29898, 12181, 29892, 26688, 29922, 8516, 29892, 1797, 2433, 29907, 742, 334, 29892, 763, 29922, 8516, 29897, 13, 2277, 7106, 263, 716, 1409, 310, 2183, 8267, 322, 1134, 29892, 10423, 411, 6743, 29889, 13, 2749, 29918, 29896, 29881, 29918, 2873, 353, 7442, 29889, 2873, 29898, 29945, 29897, 13, 2749, 29918, 29906, 29881, 29918, 2873, 353, 7442, 29889, 2873, 3552, 29906, 29892, 29945, 511, 29881, 1853, 543, 524, 29953, 29946, 1159, 13, 2749, 29918, 29941, 29881, 29918, 2873, 353, 7442, 29889, 2873, 3552, 29906, 29892, 29941, 29892, 29946, 511, 29881, 1853, 353, 938, 29897, 13, 13, 13, 29937, 512, 29961, 29941, 29941, 5387, 13, 13, 13, 2158, 14182, 29876, 29871, 29896, 29928, 4398, 29905, 29876, 613, 2749, 29918, 29896, 29881, 29918, 2873, 29897, 13, 2158, 14182, 29876, 29871, 29906, 29928, 4398, 29905, 29876, 613, 3948, 29918, 29906, 29881, 29918, 2873, 29897, 13, 2158, 14182, 29876, 29871, 29941, 29928, 4398, 29905, 29876, 613, 2749, 29918, 29941, 29881, 29918, 2873, 29897, 13, 13, 13, 29937, 444, 12655, 29889, 8159, 13, 13, 29937, 512, 29961, 29941, 29945, 5387, 13, 13, 13, 29937, 12655, 29889, 8159, 29898, 12181, 29892, 5445, 29918, 1767, 29892, 26688, 29922, 8516, 29892, 1797, 2433, 29907, 742, 334, 29892, 763, 29922, 8516, 29897, 13, 2277, 7106, 263, 716, 1409, 310, 2183, 8267, 322, 1134, 29892, 10423, 411, 5445, 29918, 1767, 29889, 13, 2749, 29918, 29896, 29881, 29918, 8159, 353, 7442, 29889, 8159, 29898, 29906, 29892, 7442, 29889, 7192, 29897, 13, 2749, 29918, 29906, 29881, 29918, 8159, 353, 7442, 29889, 8159, 3552, 29906, 29892, 29871, 29906, 511, 29871, 29945, 29897, 13, 2749, 29918, 29941, 29881, 29918, 8159, 353, 7442, 29889, 8159, 3552, 29906, 29892, 29871, 29906, 29892, 29906, 511, 518, 29896, 29892, 29871, 29906, 2314, 13, 13, 13, 29937, 512, 29961, 29941, 29953, 5387, 13, 13, 13, 2158, 14182, 29876, 29871, 29896, 29928, 4398, 29905, 29876, 613, 2749, 29918, 29896, 29881, 29918, 8159, 29897, 13, 2158, 14182, 29876, 29871, 29906, 29928, 4398, 29905, 29876, 613, 3948, 29918, 29906, 29881, 29918, 8159, 29897, 13, 2158, 14182, 29876, 29871, 29941, 29928, 4398, 29905, 29876, 613, 2749, 29918, 29941, 29881, 29918, 8159, 29897, 13, 13, 13, 29937, 444, 12655, 29889, 1032, 29872, 13, 13, 29937, 512, 29961, 29941, 29955, 5387, 13, 13, 13, 29937, 12655, 29889, 1032, 29872, 29898, 29940, 29892, 341, 29922, 8516, 29892, 413, 29922, 29900, 29892, 26688, 29922, 29966, 1990, 525, 7411, 29915, 10202, 1797, 2433, 29907, 742, 334, 29892, 763, 29922, 8516, 29897, 13, 2277, 7106, 263, 29871, 29906, 29899, 29928, 1409, 411, 6743, 373, 278, 19640, 322, 24786, 17551, 13, 2749, 29918, 29906, 29881, 29918, 6051, 351, 29900, 353, 7442, 29889, 1032, 29872, 29898, 29906, 29892, 26688, 29922, 524, 29897, 13, 2749, 29918, 29906, 29881, 29918, 6051, 351, 29896, 353, 7442, 29889, 1032, 29872, 29898, 29941, 29892, 413, 29922, 29896, 29897, 13, 13, 13, 29937, 512, 29961, 29941, 29929, 5387, 13, 13, 13, 2158, 14182, 29876, 29871, 29906, 29928, 4398, 29905, 29876, 613, 3948, 29918, 29906, 29881, 29918, 6051, 351, 29900, 29897, 13, 2158, 14182, 29876, 29871, 29906, 29928, 4398, 29905, 29876, 613, 3948, 29918, 29906, 29881, 29918, 6051, 351, 29896, 29897, 13, 13, 13, 29937, 444, 4036, 29889, 8172, 13, 13, 29937, 512, 29961, 29946, 29900, 5387, 13, 13, 13, 29937, 4036, 29889, 8172, 29898, 2311, 29922, 8516, 29897, 13, 2277, 7106, 4036, 5685, 1446, 297, 278, 4203, 29899, 3150, 7292, 518, 29900, 29889, 29900, 29892, 29871, 29896, 29889, 29900, 467, 29871, 13, 2277, 10785, 294, 363, 4036, 29918, 11249, 304, 16326, 6375, 29899, 637, 292, 304, 278, 716, 4036, 3450, 29889, 13, 9302, 29889, 8172, 29889, 8172, 580, 13, 13, 13, 29937, 396, 4398, 2315, 666, 2785, 13, 29937, 29871, 13, 13, 29937, 444, 12655, 29889, 3286, 4220, 13, 13, 29937, 512, 29961, 29945, 29945, 5387, 13, 13, 13, 29937, 12655, 29889, 3286, 4220, 29898, 29874, 29892, 27815, 29922, 8516, 29897, 13, 29937, 830, 3901, 470, 3635, 1082, 278, 27815, 310, 385, 1409, 29936, 3639, 278, 9120, 1409, 29889, 13, 29937, 12662, 2699, 891, 263, 2378, 29918, 4561, 891, 10567, 1409, 29889, 13, 13, 29937, 27815, 891, 18761, 470, 1051, 310, 938, 29879, 29892, 13136, 13, 29937, 960, 6790, 29892, 372, 1818, 367, 263, 18761, 470, 1051, 607, 3743, 263, 20005, 362, 310, 518, 29900, 29892, 29896, 29892, 636, 29892, 29940, 29899, 29896, 29962, 988, 405, 338, 278, 29871, 13, 29937, 1353, 310, 27815, 310, 263, 29889, 450, 474, 30010, 386, 9685, 310, 278, 4133, 1409, 674, 3928, 304, 278, 9685, 1353, 287, 29871, 13, 29937, 27815, 29961, 29875, 29962, 310, 278, 1881, 29889, 960, 451, 6790, 29892, 21274, 304, 3464, 29898, 29874, 29889, 299, 326, 9601, 1057, 29899, 29896, 1402, 607, 18764, 267, 278, 1797, 29871, 13, 29937, 310, 278, 27815, 29889, 13, 29916, 353, 7442, 29889, 279, 927, 29898, 29946, 467, 690, 14443, 3552, 29906, 29892, 29906, 876, 13, 2158, 29898, 29916, 29897, 13, 9302, 29889, 3286, 4220, 29898, 29916, 29897, 13, 13, 13, 29937, 512, 29961, 29945, 29929, 5387, 13, 13, 13, 29916, 353, 7442, 29889, 2873, 3552, 29896, 29892, 29871, 29906, 29892, 29871, 29941, 876, 13, 2158, 703, 26036, 4398, 29905, 29876, 613, 29916, 29897, 13, 2158, 14182, 29876, 2860, 4103, 4220, 320, 29876, 613, 9302, 29889, 3286, 4220, 29898, 29916, 29892, 313, 29896, 29892, 29871, 29900, 29892, 29871, 29906, 4961, 13, 13, 13, 29937, 444, 12655, 29889, 29894, 1429, 13, 13, 29937, 512, 29961, 29946, 29946, 5387, 13, 13, 13, 29937, 12655, 29889, 29894, 1429, 29898, 29873, 786, 29897, 13, 29937, 10292, 7049, 297, 5665, 4837, 1711, 313, 798, 19396, 467, 13, 29937, 12662, 2699, 891, 260, 786, 891, 5665, 310, 29871, 299, 2378, 29879, 13, 29937, 450, 7049, 1818, 505, 278, 1021, 8267, 3412, 599, 541, 278, 937, 9685, 29889, 29871, 13, 29937, 29871, 29896, 29899, 29928, 7049, 1818, 505, 278, 1021, 3309, 29889, 13, 13, 29937, 16969, 891, 5096, 287, 891, 29871, 299, 2378, 13, 29937, 450, 1409, 8429, 491, 5096, 292, 278, 2183, 7049, 29892, 674, 367, 472, 3203, 29871, 29906, 29899, 29928, 29889, 13, 13, 3332, 29918, 1429, 353, 7442, 29889, 1915, 3493, 29898, 29900, 29892, 29871, 29941, 29892, 29871, 29946, 467, 690, 14443, 29898, 29906, 29892, 29906, 29897, 13, 8968, 29918, 1429, 353, 7442, 29889, 1915, 3493, 29898, 29945, 29892, 29871, 29947, 29892, 29871, 29946, 467, 690, 14443, 29898, 29906, 29892, 29906, 29897, 13, 29894, 1429, 353, 7442, 29889, 29894, 1429, 3552, 3332, 29918, 1429, 29892, 8968, 29918, 1266, 876, 13, 13, 13, 29937, 512, 29961, 29946, 29955, 5387, 13, 13, 13, 2158, 703, 2588, 320, 29876, 613, 3332, 29918, 1429, 29897, 13, 2158, 14182, 29876, 2588, 320, 29876, 613, 8968, 29918, 1266, 29897, 13, 2158, 14182, 29876, 15836, 3192, 4398, 320, 29876, 613, 29894, 1429, 29897, 13, 13, 13, 29937, 444, 12655, 29889, 29882, 1429, 13, 13, 29937, 512, 29961, 29946, 29947, 5387, 13, 13, 13, 29937, 12655, 29889, 29882, 1429, 29898, 29873, 786, 29897, 13, 29937, 10292, 7049, 297, 5665, 4029, 6753, 635, 313, 4914, 19396, 467, 13, 29937, 12662, 2699, 891, 260, 786, 891, 5665, 310, 29871, 299, 2378, 29879, 13, 29937, 450, 7049, 1818, 505, 278, 1021, 8267, 3412, 599, 541, 278, 1473, 9685, 29892, 29871, 13, 29937, 19499, 29871, 29896, 29899, 29928, 7049, 607, 508, 367, 738, 3309, 29889, 13, 13, 29937, 16969, 891, 5096, 287, 891, 29871, 299, 2378, 13, 29937, 450, 1409, 8429, 491, 5096, 292, 278, 2183, 7049, 29889, 13, 1563, 29918, 1429, 353, 7442, 29889, 1915, 3493, 29898, 29900, 29892, 29871, 29941, 29892, 29871, 29946, 467, 690, 14443, 29898, 29906, 29892, 29906, 29897, 13, 1266, 29918, 1429, 353, 7442, 29889, 1915, 3493, 29898, 29945, 29892, 29871, 29947, 29892, 29871, 29946, 467, 690, 14443, 29898, 29906, 29892, 29906, 29897, 13, 29882, 1429, 353, 7442, 29889, 29882, 1429, 3552, 1563, 29918, 1429, 29892, 1266, 29918, 1429, 876, 13, 13, 13, 29937, 512, 29961, 29946, 29929, 5387, 13, 13, 13, 2158, 703, 2588, 320, 29876, 613, 1563, 29918, 1429, 29897, 13, 2158, 14182, 29876, 2588, 320, 29876, 613, 1266, 29918, 1429, 29897, 13, 2158, 14182, 29876, 15836, 3192, 4398, 320, 29876, 613, 29882, 1429, 29897, 13, 13, 13, 29937, 444, 12655, 29889, 535, 29883, 2579, 403, 13, 13, 29937, 512, 29961, 29945, 29896, 5387, 13, 13, 13, 29937, 12655, 29889, 535, 29883, 2579, 403, 3552, 29874, 29896, 29892, 263, 29906, 29892, 2023, 511, 9685, 29922, 29900, 29892, 714, 29922, 8516, 29892, 26688, 29922, 8516, 29892, 23013, 543, 17642, 29918, 14380, 1159, 13, 29937, 3650, 262, 263, 5665, 310, 7049, 3412, 385, 5923, 9685, 13, 13, 29937, 12662, 2699, 891, 263, 29896, 29892, 263, 29906, 29892, 16088, 16506, 310, 1409, 29918, 4561, 13, 29937, 450, 7049, 1818, 505, 278, 1021, 8267, 29892, 5174, 297, 278, 9927, 6590, 304, 9685, 29871, 13, 29937, 313, 1552, 937, 29892, 491, 2322, 467, 13, 13, 29937, 9685, 891, 938, 29892, 13136, 13, 29937, 450, 9685, 3412, 607, 278, 7049, 674, 367, 8772, 29889, 960, 9685, 338, 6213, 29892, 7049, 526, 1652, 8606, 287, 1434, 671, 29889, 29871, 13, 29937, 13109, 338, 29871, 29900, 29889, 13, 13, 29937, 16969, 891, 620, 891, 29871, 299, 2378, 891, 540, 16125, 630, 1409, 29889, 13, 13, 29874, 353, 7442, 29889, 2378, 4197, 29961, 29896, 29892, 29871, 29906, 1402, 518, 29941, 29892, 29871, 29946, 24960, 13, 29890, 353, 7442, 29889, 2378, 4197, 29961, 29945, 29892, 29871, 29953, 24960, 13, 9302, 29889, 535, 29883, 2579, 403, 3552, 29874, 29892, 289, 511, 9685, 29922, 29900, 29897, 13, 13, 13, 29937, 512, 29961, 29945, 29906, 5387, 13, 13, 13, 9302, 29889, 535, 29883, 2579, 403, 3552, 29874, 29892, 289, 29889, 29911, 511, 9685, 29922, 29896, 29897, 13, 13, 13, 29937, 512, 29961, 29945, 29941, 5387, 13, 13, 13, 9302, 29889, 535, 29883, 2579, 403, 3552, 29874, 29892, 289, 511, 9685, 29922, 8516, 29897, 13, 13, 13, 29937, 512, 29961, 4514, 29901, 13, 13, 13, 13, 13, 2 ]
src/matchingframework/scores/clusters.py
quoctoanpk2511/matching-framework
0
118801
import abc class Clustering: def add_matcher(self, matcher): """ Add the match object on the Clustering. Args: matcher: matchingframework.match.matchers.Matcher Returns: None """ self.matcher = matcher """The matcher object""" @abc.abstractmethod def analyze(self): """ Analyze data using Cluster Analysis. """ def add_cluster(self): """ Adding cluster results to two matcher's dataset """ cluster_left, cluster_right = self.split_list_records() self.matcher.left_data.df['match_cluster_id'] = cluster_left self.matcher.right_data.df['match_cluster_id'] = cluster_right def split_list_records(self): """ Get the split point. """ part = len(self.matcher.left_data.df['id_left']) return self.matcher.clusters[:part], self.matcher.clusters[part:]
[ 1, 1053, 25638, 13, 13, 13, 1990, 2233, 504, 3241, 29901, 13, 13, 1678, 822, 788, 29918, 4352, 261, 29898, 1311, 29892, 1993, 261, 1125, 13, 4706, 9995, 13, 4706, 3462, 278, 1993, 1203, 373, 278, 2233, 504, 3241, 29889, 13, 13, 4706, 826, 3174, 29901, 13, 9651, 1993, 261, 29901, 9686, 4468, 29889, 4352, 29889, 4352, 414, 29889, 9652, 261, 13, 13, 4706, 16969, 29901, 6213, 13, 13, 4706, 9995, 13, 4706, 1583, 29889, 4352, 261, 353, 1993, 261, 13, 4706, 9995, 1576, 1993, 261, 1203, 15945, 29908, 13, 13, 1678, 732, 10736, 29889, 16595, 5696, 13, 1678, 822, 27599, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 11597, 29891, 911, 848, 773, 2233, 5402, 24352, 29889, 13, 4706, 9995, 13, 13, 1678, 822, 788, 29918, 19594, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 18804, 9867, 2582, 304, 1023, 1993, 261, 29915, 29879, 8783, 13, 4706, 9995, 13, 4706, 9867, 29918, 1563, 29892, 9867, 29918, 1266, 353, 1583, 29889, 5451, 29918, 1761, 29918, 3757, 4339, 580, 13, 4706, 1583, 29889, 4352, 261, 29889, 1563, 29918, 1272, 29889, 2176, 1839, 4352, 29918, 19594, 29918, 333, 2033, 353, 9867, 29918, 1563, 13, 4706, 1583, 29889, 4352, 261, 29889, 1266, 29918, 1272, 29889, 2176, 1839, 4352, 29918, 19594, 29918, 333, 2033, 353, 9867, 29918, 1266, 13, 13, 1678, 822, 6219, 29918, 1761, 29918, 3757, 4339, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 3617, 278, 6219, 1298, 29889, 13, 4706, 9995, 13, 4706, 760, 353, 7431, 29898, 1311, 29889, 4352, 261, 29889, 1563, 29918, 1272, 29889, 2176, 1839, 333, 29918, 1563, 11287, 13, 4706, 736, 1583, 29889, 4352, 261, 29889, 695, 504, 414, 7503, 1595, 1402, 1583, 29889, 4352, 261, 29889, 695, 504, 414, 29961, 1595, 17531, 13, 2 ]
packages/augur-core/tests/trading/test_affiliates.py
joeykrug/augur
0
72876
<filename>packages/augur-core/tests/trading/test_affiliates.py<gh_stars>0 #!/usr/bin/env python from eth_tester.exceptions import TransactionFailed from pytest import raises, fixture, mark from utils import fix, AssertLog, EtherDelta, TokenDelta, BuyWithCash, nullAddress, longTo32Bytes from constants import YES, NO from old_eth_utils import ecsign, sha3, normalize_key, int_to_32bytearray, bytearray_to_bytestr, zpad def test_fingerprint(kitchenSinkFixture, universe, cash, market): affiliates = kitchenSinkFixture.contracts['Affiliates'] affiliateValidator = kitchenSinkFixture.contracts['AffiliateValidator'] shareToken = kitchenSinkFixture.contracts['ShareToken'] accountFingerprint = longTo32Bytes(11) affiliateFingerprint = longTo32Bytes(12) account = kitchenSinkFixture.accounts[0] affiliate = kitchenSinkFixture.accounts[1] affiliates.setFingerprint(accountFingerprint, sender=account) affiliates.setFingerprint(affiliateFingerprint, sender=affiliate) affiliates.setReferrer(affiliate) # Confirm affiliate fees begin at 0 for the referrer assert market.affiliateFeesAttoCash(affiliate) == 0 numSets = 10 cost = numSets * market.getNumTicks() cash.faucet(cost) shareToken.buyCompleteSets(market.address, account, numSets) shareToken.sellCompleteSets(market.address, account, account, numSets, accountFingerprint) expectedAffiliateFees = cost * .0025 expectedAffiliateFees *= .8 assert market.affiliateFeesAttoCash(affiliate) == expectedAffiliateFees # If we pass the affiliate fingerprint we will see that the affiliate fees do not apply and will remain what they were before complete set sale cash.faucet(cost) shareToken.buyCompleteSets(market.address, account, numSets) shareToken.sellCompleteSets(market.address, account, account, numSets, affiliateFingerprint) assert market.affiliateFeesAttoCash(affiliate) == expectedAffiliateFees def test_affiliate_validator(kitchenSinkFixture, universe, cash): affiliates = kitchenSinkFixture.contracts['Affiliates'] affiliateValidator = kitchenSinkFixture.contracts['AffiliateValidator'] shareToken = kitchenSinkFixture.contracts['ShareToken'] market = kitchenSinkFixture.createReasonableYesNoMarket(universe, affiliateValidator = affiliateValidator.address) accountFingerprint = longTo32Bytes(11) affiliateFingerprint = longTo32Bytes(12) account = kitchenSinkFixture.accounts[0] affiliate = kitchenSinkFixture.accounts[1] affiliateValidatorOperator = kitchenSinkFixture.accounts[5] affiliateValidatorOperatorPrivKey = kitchenSinkFixture.privateKeys[5] affiliates.setFingerprint(accountFingerprint, sender=account) affiliates.setFingerprint(affiliateFingerprint, sender=affiliate) affiliates.setReferrer(affiliate) accountKey = longTo32Bytes(21) salt = 0 accountHash = affiliateValidator.getKeyHash(accountKey, salt) # A bad signature will be rejected with raises(TransactionFailed): affiliateValidator.addKey(accountKey, salt, longTo32Bytes(0), longTo32Bytes(0), 8, sender=account) # This includes being signed by a non operator. So the same sig will fail initially but work once the signer is approved as an operator r, s, v = signHash(accountHash, affiliateValidatorOperatorPrivKey) with raises(TransactionFailed): affiliateValidator.addKey(accountKey, salt, r, s, v, sender=account) # Succesfully add the key for the trader account affiliateValidator.addOperator(affiliateValidatorOperator) affiliateValidator.addKey(accountKey, salt, r, s, v, sender=account) # Re-using a salt will not work with raises(TransactionFailed): affiliateValidator.addKey(accountKey, salt, r, s, v, sender=account) affiliateKey = longTo32Bytes(22) salt += 1 affiliateHash = affiliateValidator.getKeyHash(affiliateKey, salt) r, s, v = signHash(affiliateHash, affiliateValidatorOperatorPrivKey) affiliateValidator.addKey(affiliateKey, salt, r, s, v, sender=affiliate) # Confirm affiliate fees begin at 0 for the referrer assert market.affiliateFeesAttoCash(affiliate) == 0 numSets = 10 cost = numSets * market.getNumTicks() cash.faucet(cost) shareToken.buyCompleteSets(market.address, account, numSets) shareToken.sellCompleteSets(market.address, account, account, numSets, accountFingerprint) expectedAffiliateFees = cost * .0025 expectedAffiliateFees *= .8 assert market.affiliateFeesAttoCash(affiliate) == expectedAffiliateFees # If we try to use an account that has registered an affiliate key which is the same as the referrer the affiliate fees do not apply and will remain what they were before complete set sale dupeAccount = kitchenSinkFixture.accounts[2] affiliates.setReferrer(affiliate, sender=dupeAccount) salt += 1 affiliateHash = affiliateValidator.getKeyHash(affiliateKey, salt) r, s, v = signHash(affiliateHash, affiliateValidatorOperatorPrivKey) affiliateValidator.addKey(affiliateKey, salt, r, s, v, sender=dupeAccount) cash.faucet(cost, sender=dupeAccount) shareToken.buyCompleteSets(market.address, dupeAccount, numSets, sender=dupeAccount) shareToken.sellCompleteSets(market.address, dupeAccount, dupeAccount, numSets, accountFingerprint, sender=dupeAccount) assert market.affiliateFeesAttoCash(affiliate) == expectedAffiliateFees # It will also not work if the account or the referrer does not have a key registered with the validator noKeyAccount = kitchenSinkFixture.accounts[3] affiliates.setReferrer(affiliate, sender=noKeyAccount) cash.faucet(cost, sender=noKeyAccount) shareToken.buyCompleteSets(market.address, noKeyAccount, numSets, sender=noKeyAccount) shareToken.sellCompleteSets(market.address, noKeyAccount, noKeyAccount, numSets, accountFingerprint, sender=noKeyAccount) assert market.affiliateFeesAttoCash(affiliate) == expectedAffiliateFees def signHash(hash, private_key): key = normalize_key(private_key.to_hex()) v, r, s = ecsign(sha3("\x19Ethereum Signed Message:\n32".encode('utf-8') + hash), key) return zpad(bytearray_to_bytestr(int_to_32bytearray(r)), 32), zpad(bytearray_to_bytestr(int_to_32bytearray(s)), 32), v
[ 1, 529, 9507, 29958, 8318, 29914, 2987, 332, 29899, 3221, 29914, 21150, 29914, 509, 9382, 29914, 1688, 29918, 3470, 2638, 1078, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 13, 13, 3166, 11314, 29918, 1688, 261, 29889, 11739, 29879, 1053, 4103, 2467, 17776, 13, 3166, 11451, 1688, 1053, 1153, 4637, 29892, 5713, 15546, 29892, 2791, 13, 3166, 3667, 29879, 1053, 2329, 29892, 16499, 3403, 29892, 382, 721, 5268, 29892, 25159, 5268, 29892, 5373, 29891, 3047, 29907, 1161, 29892, 1870, 7061, 29892, 1472, 1762, 29941, 29906, 11207, 13, 3166, 17727, 1053, 22483, 29892, 11698, 13, 3166, 2030, 29918, 621, 29918, 13239, 1053, 321, 2395, 647, 29892, 528, 29874, 29941, 29892, 4226, 675, 29918, 1989, 29892, 938, 29918, 517, 29918, 29941, 29906, 10389, 2378, 29892, 7023, 2378, 29918, 517, 29918, 1609, 1688, 29878, 29892, 503, 8305, 13, 13, 13, 1753, 1243, 29918, 29888, 5621, 2158, 29898, 29895, 23213, 29903, 682, 18800, 15546, 29892, 19859, 29892, 274, 1161, 29892, 9999, 1125, 13, 1678, 23736, 1078, 353, 29181, 29903, 682, 18800, 15546, 29889, 1285, 1461, 29879, 1839, 27867, 2638, 1078, 2033, 13, 1678, 23736, 403, 24204, 353, 29181, 29903, 682, 18800, 15546, 29889, 1285, 1461, 29879, 1839, 27867, 2638, 403, 24204, 2033, 13, 1678, 6232, 6066, 353, 29181, 29903, 682, 18800, 15546, 29889, 1285, 1461, 29879, 1839, 2713, 598, 6066, 2033, 13, 13, 1678, 3633, 29943, 5621, 2158, 353, 1472, 1762, 29941, 29906, 11207, 29898, 29896, 29896, 29897, 13, 1678, 23736, 403, 29943, 5621, 2158, 353, 1472, 1762, 29941, 29906, 11207, 29898, 29896, 29906, 29897, 13, 13, 1678, 3633, 353, 29181, 29903, 682, 18800, 15546, 29889, 10149, 29879, 29961, 29900, 29962, 13, 1678, 23736, 403, 353, 29181, 29903, 682, 18800, 15546, 29889, 10149, 29879, 29961, 29896, 29962, 13, 13, 1678, 23736, 1078, 29889, 842, 29943, 5621, 2158, 29898, 10149, 29943, 5621, 2158, 29892, 10004, 29922, 10149, 29897, 13, 1678, 23736, 1078, 29889, 842, 29943, 5621, 2158, 29898, 3470, 2638, 403, 29943, 5621, 2158, 29892, 10004, 29922, 3470, 2638, 403, 29897, 13, 1678, 23736, 1078, 29889, 842, 1123, 3735, 29898, 3470, 2638, 403, 29897, 13, 13, 1678, 396, 10811, 3568, 23736, 403, 1238, 267, 3380, 472, 29871, 29900, 363, 278, 2737, 2872, 13, 1678, 4974, 9999, 29889, 3470, 2638, 403, 8263, 267, 4178, 517, 29907, 1161, 29898, 3470, 2638, 403, 29897, 1275, 29871, 29900, 13, 13, 1678, 954, 29903, 1691, 353, 29871, 29896, 29900, 13, 1678, 3438, 353, 954, 29903, 1691, 334, 9999, 29889, 657, 8009, 29911, 7358, 580, 13, 1678, 274, 1161, 29889, 29888, 14766, 300, 29898, 18253, 29897, 13, 1678, 6232, 6066, 29889, 2423, 29891, 17813, 29903, 1691, 29898, 28549, 29889, 7328, 29892, 3633, 29892, 954, 29903, 1691, 29897, 13, 1678, 6232, 6066, 29889, 29879, 514, 17813, 29903, 1691, 29898, 28549, 29889, 7328, 29892, 3633, 29892, 3633, 29892, 954, 29903, 1691, 29892, 3633, 29943, 5621, 2158, 29897, 13, 13, 1678, 3806, 27867, 2638, 403, 8263, 267, 353, 3438, 334, 869, 29900, 29900, 29906, 29945, 13, 1678, 3806, 27867, 2638, 403, 8263, 267, 334, 29922, 869, 29947, 13, 13, 1678, 4974, 9999, 29889, 3470, 2638, 403, 8263, 267, 4178, 517, 29907, 1161, 29898, 3470, 2638, 403, 29897, 1275, 3806, 27867, 2638, 403, 8263, 267, 13, 13, 1678, 396, 960, 591, 1209, 278, 23736, 403, 19917, 2158, 591, 674, 1074, 393, 278, 23736, 403, 1238, 267, 437, 451, 3394, 322, 674, 3933, 825, 896, 892, 1434, 4866, 731, 14686, 13, 1678, 274, 1161, 29889, 29888, 14766, 300, 29898, 18253, 29897, 13, 1678, 6232, 6066, 29889, 2423, 29891, 17813, 29903, 1691, 29898, 28549, 29889, 7328, 29892, 3633, 29892, 954, 29903, 1691, 29897, 13, 1678, 6232, 6066, 29889, 29879, 514, 17813, 29903, 1691, 29898, 28549, 29889, 7328, 29892, 3633, 29892, 3633, 29892, 954, 29903, 1691, 29892, 23736, 403, 29943, 5621, 2158, 29897, 13, 13, 1678, 4974, 9999, 29889, 3470, 2638, 403, 8263, 267, 4178, 517, 29907, 1161, 29898, 3470, 2638, 403, 29897, 1275, 3806, 27867, 2638, 403, 8263, 267, 13, 13, 1753, 1243, 29918, 3470, 2638, 403, 29918, 3084, 1061, 29898, 29895, 23213, 29903, 682, 18800, 15546, 29892, 19859, 29892, 274, 1161, 1125, 13, 1678, 23736, 1078, 353, 29181, 29903, 682, 18800, 15546, 29889, 1285, 1461, 29879, 1839, 27867, 2638, 1078, 2033, 13, 1678, 23736, 403, 24204, 353, 29181, 29903, 682, 18800, 15546, 29889, 1285, 1461, 29879, 1839, 27867, 2638, 403, 24204, 2033, 13, 1678, 6232, 6066, 353, 29181, 29903, 682, 18800, 15546, 29889, 1285, 1461, 29879, 1839, 2713, 598, 6066, 2033, 13, 13, 1678, 9999, 353, 29181, 29903, 682, 18800, 15546, 29889, 3258, 1123, 1658, 519, 8241, 3782, 9802, 300, 29898, 348, 12193, 29892, 23736, 403, 24204, 353, 23736, 403, 24204, 29889, 7328, 29897, 13, 13, 1678, 3633, 29943, 5621, 2158, 353, 1472, 1762, 29941, 29906, 11207, 29898, 29896, 29896, 29897, 13, 1678, 23736, 403, 29943, 5621, 2158, 353, 1472, 1762, 29941, 29906, 11207, 29898, 29896, 29906, 29897, 13, 13, 1678, 3633, 353, 29181, 29903, 682, 18800, 15546, 29889, 10149, 29879, 29961, 29900, 29962, 13, 1678, 23736, 403, 353, 29181, 29903, 682, 18800, 15546, 29889, 10149, 29879, 29961, 29896, 29962, 13, 1678, 23736, 403, 24204, 26486, 353, 29181, 29903, 682, 18800, 15546, 29889, 10149, 29879, 29961, 29945, 29962, 13, 1678, 23736, 403, 24204, 26486, 29925, 1150, 2558, 353, 29181, 29903, 682, 18800, 15546, 29889, 9053, 15506, 29961, 29945, 29962, 13, 13, 1678, 23736, 1078, 29889, 842, 29943, 5621, 2158, 29898, 10149, 29943, 5621, 2158, 29892, 10004, 29922, 10149, 29897, 13, 1678, 23736, 1078, 29889, 842, 29943, 5621, 2158, 29898, 3470, 2638, 403, 29943, 5621, 2158, 29892, 10004, 29922, 3470, 2638, 403, 29897, 13, 1678, 23736, 1078, 29889, 842, 1123, 3735, 29898, 3470, 2638, 403, 29897, 13, 13, 1678, 3633, 2558, 353, 1472, 1762, 29941, 29906, 11207, 29898, 29906, 29896, 29897, 13, 1678, 15795, 353, 29871, 29900, 13, 1678, 3633, 10438, 353, 23736, 403, 24204, 29889, 657, 2558, 10438, 29898, 10149, 2558, 29892, 15795, 29897, 13, 13, 1678, 396, 319, 4319, 12608, 674, 367, 22225, 13, 1678, 411, 1153, 4637, 29898, 12460, 17776, 1125, 13, 4706, 23736, 403, 24204, 29889, 1202, 2558, 29898, 10149, 2558, 29892, 15795, 29892, 1472, 1762, 29941, 29906, 11207, 29898, 29900, 511, 1472, 1762, 29941, 29906, 11207, 29898, 29900, 511, 29871, 29947, 29892, 10004, 29922, 10149, 29897, 13, 13, 1678, 396, 910, 7805, 1641, 8794, 491, 263, 1661, 5455, 29889, 1105, 278, 1021, 4365, 674, 4418, 12919, 541, 664, 2748, 278, 1804, 261, 338, 23454, 408, 385, 5455, 13, 1678, 364, 29892, 269, 29892, 325, 353, 1804, 10438, 29898, 10149, 10438, 29892, 23736, 403, 24204, 26486, 29925, 1150, 2558, 29897, 13, 1678, 411, 1153, 4637, 29898, 12460, 17776, 1125, 13, 4706, 23736, 403, 24204, 29889, 1202, 2558, 29898, 10149, 2558, 29892, 15795, 29892, 364, 29892, 269, 29892, 325, 29892, 10004, 29922, 10149, 29897, 13, 13, 1678, 396, 2166, 617, 267, 3730, 788, 278, 1820, 363, 278, 534, 1664, 3633, 13, 1678, 23736, 403, 24204, 29889, 1202, 26486, 29898, 3470, 2638, 403, 24204, 26486, 29897, 13, 1678, 23736, 403, 24204, 29889, 1202, 2558, 29898, 10149, 2558, 29892, 15795, 29892, 364, 29892, 269, 29892, 325, 29892, 10004, 29922, 10149, 29897, 13, 13, 1678, 396, 830, 29899, 4746, 263, 15795, 674, 451, 664, 13, 1678, 411, 1153, 4637, 29898, 12460, 17776, 1125, 13, 4706, 23736, 403, 24204, 29889, 1202, 2558, 29898, 10149, 2558, 29892, 15795, 29892, 364, 29892, 269, 29892, 325, 29892, 10004, 29922, 10149, 29897, 13, 13, 1678, 23736, 403, 2558, 353, 1472, 1762, 29941, 29906, 11207, 29898, 29906, 29906, 29897, 13, 1678, 15795, 4619, 29871, 29896, 13, 1678, 23736, 403, 10438, 353, 23736, 403, 24204, 29889, 657, 2558, 10438, 29898, 3470, 2638, 403, 2558, 29892, 15795, 29897, 13, 1678, 364, 29892, 269, 29892, 325, 353, 1804, 10438, 29898, 3470, 2638, 403, 10438, 29892, 23736, 403, 24204, 26486, 29925, 1150, 2558, 29897, 13, 1678, 23736, 403, 24204, 29889, 1202, 2558, 29898, 3470, 2638, 403, 2558, 29892, 15795, 29892, 364, 29892, 269, 29892, 325, 29892, 10004, 29922, 3470, 2638, 403, 29897, 13, 13, 1678, 396, 10811, 3568, 23736, 403, 1238, 267, 3380, 472, 29871, 29900, 363, 278, 2737, 2872, 13, 1678, 4974, 9999, 29889, 3470, 2638, 403, 8263, 267, 4178, 517, 29907, 1161, 29898, 3470, 2638, 403, 29897, 1275, 29871, 29900, 13, 13, 1678, 954, 29903, 1691, 353, 29871, 29896, 29900, 13, 1678, 3438, 353, 954, 29903, 1691, 334, 9999, 29889, 657, 8009, 29911, 7358, 580, 13, 1678, 274, 1161, 29889, 29888, 14766, 300, 29898, 18253, 29897, 13, 1678, 6232, 6066, 29889, 2423, 29891, 17813, 29903, 1691, 29898, 28549, 29889, 7328, 29892, 3633, 29892, 954, 29903, 1691, 29897, 13, 1678, 6232, 6066, 29889, 29879, 514, 17813, 29903, 1691, 29898, 28549, 29889, 7328, 29892, 3633, 29892, 3633, 29892, 954, 29903, 1691, 29892, 3633, 29943, 5621, 2158, 29897, 13, 13, 1678, 3806, 27867, 2638, 403, 8263, 267, 353, 3438, 334, 869, 29900, 29900, 29906, 29945, 13, 1678, 3806, 27867, 2638, 403, 8263, 267, 334, 29922, 869, 29947, 13, 13, 1678, 4974, 9999, 29889, 3470, 2638, 403, 8263, 267, 4178, 517, 29907, 1161, 29898, 3470, 2638, 403, 29897, 1275, 3806, 27867, 2638, 403, 8263, 267, 13, 13, 1678, 396, 960, 591, 1018, 304, 671, 385, 3633, 393, 756, 15443, 385, 23736, 403, 1820, 607, 338, 278, 1021, 408, 278, 2737, 2872, 278, 23736, 403, 1238, 267, 437, 451, 3394, 322, 674, 3933, 825, 896, 892, 1434, 4866, 731, 14686, 13, 1678, 868, 412, 10601, 353, 29181, 29903, 682, 18800, 15546, 29889, 10149, 29879, 29961, 29906, 29962, 13, 1678, 23736, 1078, 29889, 842, 1123, 3735, 29898, 3470, 2638, 403, 29892, 10004, 29922, 700, 412, 10601, 29897, 13, 1678, 15795, 4619, 29871, 29896, 13, 1678, 23736, 403, 10438, 353, 23736, 403, 24204, 29889, 657, 2558, 10438, 29898, 3470, 2638, 403, 2558, 29892, 15795, 29897, 13, 1678, 364, 29892, 269, 29892, 325, 353, 1804, 10438, 29898, 3470, 2638, 403, 10438, 29892, 23736, 403, 24204, 26486, 29925, 1150, 2558, 29897, 13, 1678, 23736, 403, 24204, 29889, 1202, 2558, 29898, 3470, 2638, 403, 2558, 29892, 15795, 29892, 364, 29892, 269, 29892, 325, 29892, 10004, 29922, 700, 412, 10601, 29897, 13, 268, 13, 1678, 274, 1161, 29889, 29888, 14766, 300, 29898, 18253, 29892, 10004, 29922, 700, 412, 10601, 29897, 13, 1678, 6232, 6066, 29889, 2423, 29891, 17813, 29903, 1691, 29898, 28549, 29889, 7328, 29892, 868, 412, 10601, 29892, 954, 29903, 1691, 29892, 10004, 29922, 700, 412, 10601, 29897, 13, 1678, 6232, 6066, 29889, 29879, 514, 17813, 29903, 1691, 29898, 28549, 29889, 7328, 29892, 868, 412, 10601, 29892, 868, 412, 10601, 29892, 954, 29903, 1691, 29892, 3633, 29943, 5621, 2158, 29892, 10004, 29922, 700, 412, 10601, 29897, 13, 13, 1678, 4974, 9999, 29889, 3470, 2638, 403, 8263, 267, 4178, 517, 29907, 1161, 29898, 3470, 2638, 403, 29897, 1275, 3806, 27867, 2638, 403, 8263, 267, 13, 13, 1678, 396, 739, 674, 884, 451, 664, 565, 278, 3633, 470, 278, 2737, 2872, 947, 451, 505, 263, 1820, 15443, 411, 278, 2854, 1061, 13, 1678, 694, 2558, 10601, 353, 29181, 29903, 682, 18800, 15546, 29889, 10149, 29879, 29961, 29941, 29962, 13, 1678, 23736, 1078, 29889, 842, 1123, 3735, 29898, 3470, 2638, 403, 29892, 10004, 29922, 1217, 2558, 10601, 29897, 13, 268, 13, 1678, 274, 1161, 29889, 29888, 14766, 300, 29898, 18253, 29892, 10004, 29922, 1217, 2558, 10601, 29897, 13, 1678, 6232, 6066, 29889, 2423, 29891, 17813, 29903, 1691, 29898, 28549, 29889, 7328, 29892, 694, 2558, 10601, 29892, 954, 29903, 1691, 29892, 10004, 29922, 1217, 2558, 10601, 29897, 13, 1678, 6232, 6066, 29889, 29879, 514, 17813, 29903, 1691, 29898, 28549, 29889, 7328, 29892, 694, 2558, 10601, 29892, 694, 2558, 10601, 29892, 954, 29903, 1691, 29892, 3633, 29943, 5621, 2158, 29892, 10004, 29922, 1217, 2558, 10601, 29897, 13, 13, 1678, 4974, 9999, 29889, 3470, 2638, 403, 8263, 267, 4178, 517, 29907, 1161, 29898, 3470, 2638, 403, 29897, 1275, 3806, 27867, 2638, 403, 8263, 267, 13, 13, 1753, 1804, 10438, 29898, 8568, 29892, 2024, 29918, 1989, 1125, 13, 1678, 1820, 353, 4226, 675, 29918, 1989, 29898, 9053, 29918, 1989, 29889, 517, 29918, 20970, 3101, 13, 1678, 325, 29892, 364, 29892, 269, 353, 321, 2395, 647, 29898, 17051, 29941, 14182, 29916, 29896, 29929, 29923, 12711, 398, 9954, 287, 7777, 3583, 29876, 29941, 29906, 1642, 12508, 877, 9420, 29899, 29947, 1495, 718, 6608, 511, 1820, 29897, 13, 1678, 736, 503, 8305, 29898, 10389, 2378, 29918, 517, 29918, 1609, 1688, 29878, 29898, 524, 29918, 517, 29918, 29941, 29906, 10389, 2378, 29898, 29878, 8243, 29871, 29941, 29906, 511, 503, 8305, 29898, 10389, 2378, 29918, 517, 29918, 1609, 1688, 29878, 29898, 524, 29918, 517, 29918, 29941, 29906, 10389, 2378, 29898, 29879, 8243, 29871, 29941, 29906, 511, 325, 2 ]
mainnotes/migrations/0001_initial.py
gokulvibe/NoteIt-NoteMaker-Django
1
71073
<filename>mainnotes/migrations/0001_initial.py<gh_stars>1-10 # Generated by Django 3.1.7 on 2021-03-30 08:22 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import encrypted_fields.fields class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( name='Notes', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('title', models.CharField(max_length=300)), ('description', models.TextField()), ('created_date', models.DateTimeField(auto_now_add=True)), ('recently_modified_date', models.DateTimeField(auto_now=True)), ('hidden_note', models.BooleanField(default=False)), ('trashed_note', models.BooleanField(default=False)), ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), ], ), migrations.CreateModel( name='Image', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('image', models.ImageField(upload_to='notesImages/')), ('note', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mainnotes.notes')), ], ), migrations.CreateModel( name='HiddenNotePassword', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('hidden_note_password', encrypted_fields.fields.EncryptedCharField(max_length=50)), ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), ], ), ]
[ 1, 529, 9507, 29958, 3396, 16953, 29914, 26983, 800, 29914, 29900, 29900, 29900, 29896, 29918, 11228, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 29937, 3251, 630, 491, 15337, 29871, 29941, 29889, 29896, 29889, 29955, 373, 29871, 29906, 29900, 29906, 29896, 29899, 29900, 29941, 29899, 29941, 29900, 29871, 29900, 29947, 29901, 29906, 29906, 13, 13, 3166, 9557, 29889, 5527, 1053, 6055, 13, 3166, 9557, 29889, 2585, 1053, 9725, 800, 29892, 4733, 13, 5215, 9557, 29889, 2585, 29889, 9794, 29889, 311, 1026, 291, 13, 5215, 23220, 29918, 9621, 29889, 9621, 13, 13, 13, 1990, 341, 16783, 29898, 26983, 800, 29889, 29924, 16783, 1125, 13, 13, 1678, 2847, 353, 5852, 13, 13, 1678, 9962, 353, 518, 13, 4706, 9725, 800, 29889, 2774, 932, 519, 29918, 10836, 29898, 11027, 29889, 20656, 29950, 29918, 11889, 29918, 20387, 29931, 511, 13, 1678, 4514, 13, 13, 1678, 6931, 353, 518, 13, 4706, 9725, 800, 29889, 4391, 3195, 29898, 13, 9651, 1024, 2433, 3664, 267, 742, 13, 9651, 4235, 11759, 13, 18884, 6702, 333, 742, 4733, 29889, 12300, 3073, 29898, 6921, 29918, 11600, 29922, 5574, 29892, 7601, 29918, 1989, 29922, 5574, 29892, 28755, 29922, 8824, 29892, 26952, 29918, 978, 2433, 1367, 1495, 511, 13, 18884, 6702, 3257, 742, 4733, 29889, 27890, 29898, 3317, 29918, 2848, 29922, 29941, 29900, 29900, 8243, 13, 18884, 6702, 8216, 742, 4733, 29889, 15778, 25739, 13, 18884, 6702, 11600, 29918, 1256, 742, 4733, 29889, 11384, 3073, 29898, 6921, 29918, 3707, 29918, 1202, 29922, 5574, 8243, 13, 18884, 6702, 276, 1760, 368, 29918, 1545, 2164, 29918, 1256, 742, 4733, 29889, 11384, 3073, 29898, 6921, 29918, 3707, 29922, 5574, 8243, 13, 18884, 6702, 10892, 29918, 6812, 742, 4733, 29889, 18146, 3073, 29898, 4381, 29922, 8824, 8243, 13, 18884, 6702, 509, 25936, 29918, 6812, 742, 4733, 29889, 18146, 3073, 29898, 4381, 29922, 8824, 8243, 13, 18884, 6702, 20348, 742, 4733, 29889, 27755, 2558, 29898, 265, 29918, 8143, 29922, 14095, 29889, 2585, 29889, 9794, 29889, 311, 1026, 291, 29889, 29907, 3289, 5454, 2287, 29892, 304, 29922, 11027, 29889, 20656, 29950, 29918, 11889, 29918, 20387, 29931, 8243, 13, 9651, 21251, 13, 4706, 10353, 13, 4706, 9725, 800, 29889, 4391, 3195, 29898, 13, 9651, 1024, 2433, 2940, 742, 13, 9651, 4235, 11759, 13, 18884, 6702, 333, 742, 4733, 29889, 12300, 3073, 29898, 6921, 29918, 11600, 29922, 5574, 29892, 7601, 29918, 1989, 29922, 5574, 29892, 28755, 29922, 8824, 29892, 26952, 29918, 978, 2433, 1367, 1495, 511, 13, 18884, 6702, 3027, 742, 4733, 29889, 2940, 3073, 29898, 9009, 29918, 517, 2433, 16953, 20163, 29914, 1495, 511, 13, 18884, 6702, 6812, 742, 4733, 29889, 27755, 2558, 29898, 265, 29918, 8143, 29922, 14095, 29889, 2585, 29889, 9794, 29889, 311, 1026, 291, 29889, 29907, 3289, 5454, 2287, 29892, 304, 2433, 3396, 16953, 29889, 16953, 1495, 511, 13, 9651, 21251, 13, 4706, 10353, 13, 4706, 9725, 800, 29889, 4391, 3195, 29898, 13, 9651, 1024, 2433, 25108, 9842, 10048, 742, 13, 9651, 4235, 11759, 13, 18884, 6702, 333, 742, 4733, 29889, 12300, 3073, 29898, 6921, 29918, 11600, 29922, 5574, 29892, 7601, 29918, 1989, 29922, 5574, 29892, 28755, 29922, 8824, 29892, 26952, 29918, 978, 2433, 1367, 1495, 511, 13, 18884, 6702, 10892, 29918, 6812, 29918, 5630, 742, 23220, 29918, 9621, 29889, 9621, 29889, 8566, 14740, 27890, 29898, 3317, 29918, 2848, 29922, 29945, 29900, 8243, 13, 18884, 6702, 1792, 742, 4733, 29889, 6716, 1762, 6716, 3073, 29898, 265, 29918, 8143, 29922, 14095, 29889, 2585, 29889, 9794, 29889, 311, 1026, 291, 29889, 29907, 3289, 5454, 2287, 29892, 304, 29922, 11027, 29889, 20656, 29950, 29918, 11889, 29918, 20387, 29931, 8243, 13, 9651, 21251, 13, 4706, 10353, 13, 1678, 4514, 13, 2 ]
elyra/pipeline/component_parser_kfp.py
rachaelhouse/elyra
0
20440
# # Copyright 2018-2021 Elyra Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # from types import SimpleNamespace from typing import Any from typing import Dict from typing import List from typing import Optional import yaml from elyra.pipeline.component import Component from elyra.pipeline.component import ComponentParameter from elyra.pipeline.component import ComponentParser class KfpComponentParser(ComponentParser): _component_platform = "kfp" _file_types = [".yaml"] def parse(self, registry_entry: SimpleNamespace) -> Optional[List[Component]]: # Get YAML object from component definition component_yaml = self._read_component_yaml(registry_entry) if not component_yaml: return None # Assign component_id and description component_id = self.get_component_id(registry_entry.location, component_yaml.get('name', '')) description = "" if component_yaml.get('description'): # Remove whitespace characters and replace with spaces description = ' '.join(component_yaml.get('description').split()) component_properties = self._parse_properties(component_yaml) component = Component(id=component_id, name=component_yaml.get('name'), description=description, runtime=self.component_platform, location_type=registry_entry.location_type, location=registry_entry.location, properties=component_properties, categories=registry_entry.categories) return [component] def _parse_properties(self, component_yaml: Dict[str, Any]) -> List[ComponentParameter]: properties: List[ComponentParameter] = list() # NOTE: Currently no runtime-specific properties are needed # properties.extend(self.get_runtime_specific_properties()) # Then loop through and create custom properties input_params = component_yaml.get('inputs', []) for param in input_params: # KFP components default to being required unless otherwise stated. # Reference: https://www.kubeflow.org/docs/components/pipelines/reference/component-spec/#interface required = True if "optional" in param and param.get('optional') is True: required = False # Assign type, default to string data_type = param.get('type', 'string') # Set description and include parsed type information description = self._format_description(description=param.get('description', ''), data_type=data_type) # Change type to reflect the type of input (inputValue vs inputPath) data_type = self._get_adjusted_parameter_fields(component_body=component_yaml, io_object_name=param.get('name'), io_object_type="input", parameter_type=data_type) data_type, control_id, default_value = self.determine_type_information(data_type) # Get value if provided value = param.get('default', '') ref = param.get('name').lower().replace(' ', '_') properties.append(ComponentParameter(id=ref, name=param.get('name'), data_type=data_type, value=(value or default_value), description=description, control_id=control_id, required=required)) return properties def get_runtime_specific_properties(self) -> List[ComponentParameter]: """ Define properties that are common to the KFP runtime. """ return [ ComponentParameter( id="runtime_image", name="Runtime Image", data_type="string", value="", description="Docker image used as execution environment.", control="readonly", required=True, ) ] def _read_component_yaml(self, registry_entry: SimpleNamespace) -> Optional[Dict[str, Any]]: """ Convert component_definition string to YAML object """ try: return yaml.safe_load(registry_entry.component_definition) except Exception as e: self.log.debug(f"Could not read definition for component at " f"location: '{registry_entry.location}' -> {str(e)}") return None def _get_adjusted_parameter_fields(self, component_body: Dict[str, Any], io_object_name: str, io_object_type: str, parameter_type: str) -> str: """ Change the parameter ref according if it is a KFP path parameter (as opposed to a value parameter) """ adjusted_type = parameter_type if "implementation" in component_body and "container" in component_body['implementation']: if "command" in component_body['implementation']['container']: for command in component_body['implementation']['container']['command']: if isinstance(command, dict) and list(command.values())[0] == io_object_name and \ list(command.keys())[0] == f"{io_object_type}Path": adjusted_type = "file" if "args" in component_body['implementation']['container']: for arg in component_body['implementation']['container']['args']: if isinstance(arg, dict) and list(arg.values())[0] == io_object_name and \ list(arg.keys())[0] == f"{io_object_type}Path": adjusted_type = "file" return adjusted_type
[ 1, 396, 13, 29937, 14187, 1266, 29871, 29906, 29900, 29896, 29947, 29899, 29906, 29900, 29906, 29896, 382, 368, 336, 13189, 943, 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, 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, 3166, 4072, 1053, 12545, 23335, 13, 3166, 19229, 1053, 3139, 13, 3166, 19229, 1053, 360, 919, 13, 3166, 19229, 1053, 2391, 13, 3166, 19229, 1053, 28379, 13, 13, 5215, 343, 8807, 13, 13, 3166, 560, 29891, 336, 29889, 13096, 5570, 29889, 9700, 1053, 15924, 13, 3166, 560, 29891, 336, 29889, 13096, 5570, 29889, 9700, 1053, 15924, 9329, 13, 3166, 560, 29891, 336, 29889, 13096, 5570, 29889, 9700, 1053, 15924, 11726, 13, 13, 13, 1990, 476, 18091, 5308, 11726, 29898, 5308, 11726, 1125, 13, 1678, 903, 9700, 29918, 12120, 353, 376, 29895, 18091, 29908, 13, 1678, 903, 1445, 29918, 8768, 353, 518, 1642, 25162, 3108, 13, 13, 1678, 822, 6088, 29898, 1311, 29892, 21235, 29918, 8269, 29901, 12545, 23335, 29897, 1599, 28379, 29961, 1293, 29961, 5308, 5262, 29901, 13, 4706, 396, 3617, 612, 23956, 1203, 515, 4163, 5023, 13, 4706, 4163, 29918, 25162, 353, 1583, 3032, 949, 29918, 9700, 29918, 25162, 29898, 1727, 6020, 29918, 8269, 29897, 13, 4706, 565, 451, 4163, 29918, 25162, 29901, 13, 9651, 736, 6213, 13, 13, 4706, 396, 4007, 647, 4163, 29918, 333, 322, 6139, 13, 4706, 4163, 29918, 333, 353, 1583, 29889, 657, 29918, 9700, 29918, 333, 29898, 1727, 6020, 29918, 8269, 29889, 5479, 29892, 4163, 29918, 25162, 29889, 657, 877, 978, 742, 6629, 876, 13, 4706, 6139, 353, 5124, 13, 4706, 565, 4163, 29918, 25162, 29889, 657, 877, 8216, 29374, 13, 9651, 396, 15154, 24358, 4890, 322, 5191, 411, 8162, 13, 9651, 6139, 353, 525, 15300, 7122, 29898, 9700, 29918, 25162, 29889, 657, 877, 8216, 2824, 5451, 3101, 13, 13, 4706, 4163, 29918, 11330, 353, 1583, 3032, 5510, 29918, 11330, 29898, 9700, 29918, 25162, 29897, 13, 13, 4706, 4163, 353, 15924, 29898, 333, 29922, 9700, 29918, 333, 29892, 13, 462, 795, 1024, 29922, 9700, 29918, 25162, 29889, 657, 877, 978, 5477, 13, 462, 795, 6139, 29922, 8216, 29892, 13, 462, 795, 10073, 29922, 1311, 29889, 9700, 29918, 12120, 29892, 13, 462, 795, 4423, 29918, 1853, 29922, 1727, 6020, 29918, 8269, 29889, 5479, 29918, 1853, 29892, 13, 462, 795, 4423, 29922, 1727, 6020, 29918, 8269, 29889, 5479, 29892, 13, 462, 795, 4426, 29922, 9700, 29918, 11330, 29892, 13, 462, 795, 13997, 29922, 1727, 6020, 29918, 8269, 29889, 20683, 29897, 13, 13, 4706, 736, 518, 9700, 29962, 13, 13, 1678, 822, 903, 5510, 29918, 11330, 29898, 1311, 29892, 4163, 29918, 25162, 29901, 360, 919, 29961, 710, 29892, 3139, 2314, 1599, 2391, 29961, 5308, 9329, 5387, 13, 4706, 4426, 29901, 2391, 29961, 5308, 9329, 29962, 353, 1051, 580, 13, 13, 4706, 396, 6058, 29923, 29901, 15447, 694, 10073, 29899, 14940, 4426, 526, 4312, 13, 4706, 396, 4426, 29889, 21843, 29898, 1311, 29889, 657, 29918, 15634, 29918, 14940, 29918, 11330, 3101, 13, 13, 4706, 396, 1987, 2425, 1549, 322, 1653, 2888, 4426, 13, 4706, 1881, 29918, 7529, 353, 4163, 29918, 25162, 29889, 657, 877, 2080, 29879, 742, 518, 2314, 13, 4706, 363, 1828, 297, 1881, 29918, 7529, 29901, 13, 9651, 396, 476, 26353, 7117, 2322, 304, 1641, 3734, 6521, 6467, 8703, 29889, 13, 9651, 396, 12105, 29901, 2045, 597, 1636, 29889, 29895, 431, 1389, 677, 29889, 990, 29914, 2640, 29914, 14036, 29914, 13096, 24210, 29914, 5679, 29914, 9700, 29899, 6550, 8484, 13248, 13, 9651, 3734, 353, 5852, 13, 9651, 565, 376, 25253, 29908, 297, 1828, 322, 1828, 29889, 657, 877, 25253, 1495, 338, 5852, 29901, 13, 18884, 3734, 353, 7700, 13, 13, 9651, 396, 4007, 647, 1134, 29892, 2322, 304, 1347, 13, 9651, 848, 29918, 1853, 353, 1828, 29889, 657, 877, 1853, 742, 525, 1807, 1495, 13, 13, 9651, 396, 3789, 6139, 322, 3160, 21213, 1134, 2472, 13, 9651, 6139, 353, 1583, 3032, 4830, 29918, 8216, 29898, 8216, 29922, 3207, 29889, 657, 877, 8216, 742, 525, 5477, 13, 462, 462, 462, 259, 848, 29918, 1853, 29922, 1272, 29918, 1853, 29897, 13, 13, 9651, 396, 10726, 1134, 304, 9432, 278, 1134, 310, 1881, 313, 2080, 1917, 7186, 1881, 2605, 29897, 13, 9651, 848, 29918, 1853, 353, 1583, 3032, 657, 29918, 328, 5143, 287, 29918, 15501, 29918, 9621, 29898, 9700, 29918, 2587, 29922, 9700, 29918, 25162, 29892, 13, 462, 462, 462, 9651, 12013, 29918, 3318, 29918, 978, 29922, 3207, 29889, 657, 877, 978, 5477, 13, 462, 462, 462, 9651, 12013, 29918, 3318, 29918, 1853, 543, 2080, 613, 13, 462, 462, 462, 9651, 3443, 29918, 1853, 29922, 1272, 29918, 1853, 29897, 13, 13, 9651, 848, 29918, 1853, 29892, 2761, 29918, 333, 29892, 2322, 29918, 1767, 353, 1583, 29889, 4801, 837, 457, 29918, 1853, 29918, 19678, 29898, 1272, 29918, 1853, 29897, 13, 13, 9651, 396, 3617, 995, 565, 4944, 13, 9651, 995, 353, 1828, 29889, 657, 877, 4381, 742, 27255, 13, 13, 9651, 2143, 353, 1828, 29889, 657, 877, 978, 2824, 13609, 2141, 6506, 877, 13420, 22868, 1495, 13, 9651, 4426, 29889, 4397, 29898, 5308, 9329, 29898, 333, 29922, 999, 29892, 13, 462, 462, 462, 1024, 29922, 3207, 29889, 657, 877, 978, 5477, 13, 462, 462, 462, 848, 29918, 1853, 29922, 1272, 29918, 1853, 29892, 13, 462, 462, 462, 995, 7607, 1767, 470, 2322, 29918, 1767, 511, 13, 462, 462, 462, 6139, 29922, 8216, 29892, 13, 462, 462, 462, 2761, 29918, 333, 29922, 6451, 29918, 333, 29892, 13, 462, 462, 462, 3734, 29922, 12403, 876, 13, 4706, 736, 4426, 13, 13, 1678, 822, 679, 29918, 15634, 29918, 14940, 29918, 11330, 29898, 1311, 29897, 1599, 2391, 29961, 5308, 9329, 5387, 13, 4706, 9995, 13, 4706, 22402, 4426, 393, 526, 3619, 304, 278, 476, 26353, 10073, 29889, 13, 4706, 9995, 13, 4706, 736, 518, 13, 9651, 15924, 9329, 29898, 13, 18884, 1178, 543, 15634, 29918, 3027, 613, 13, 18884, 1024, 543, 7944, 7084, 613, 13, 18884, 848, 29918, 1853, 543, 1807, 613, 13, 18884, 995, 543, 613, 13, 18884, 6139, 543, 29928, 8658, 1967, 1304, 408, 8225, 5177, 19602, 13, 18884, 2761, 543, 949, 6194, 613, 13, 18884, 3734, 29922, 5574, 29892, 13, 9651, 1723, 13, 4706, 4514, 13, 13, 1678, 822, 903, 949, 29918, 9700, 29918, 25162, 29898, 1311, 29892, 21235, 29918, 8269, 29901, 12545, 23335, 29897, 1599, 28379, 29961, 21533, 29961, 710, 29892, 3139, 5262, 29901, 13, 4706, 9995, 13, 4706, 14806, 4163, 29918, 16553, 1347, 304, 612, 23956, 1203, 13, 4706, 9995, 13, 4706, 1018, 29901, 13, 9651, 736, 343, 8807, 29889, 11177, 29918, 1359, 29898, 1727, 6020, 29918, 8269, 29889, 9700, 29918, 16553, 29897, 13, 4706, 5174, 8960, 408, 321, 29901, 13, 9651, 1583, 29889, 1188, 29889, 8382, 29898, 29888, 29908, 23323, 451, 1303, 5023, 363, 4163, 472, 376, 13, 462, 965, 285, 29908, 5479, 29901, 22372, 1727, 6020, 29918, 8269, 29889, 5479, 10162, 1599, 426, 710, 29898, 29872, 2915, 1159, 13, 9651, 736, 6213, 13, 13, 1678, 822, 903, 657, 29918, 328, 5143, 287, 29918, 15501, 29918, 9621, 29898, 1311, 29892, 13, 462, 462, 539, 4163, 29918, 2587, 29901, 360, 919, 29961, 710, 29892, 3139, 1402, 13, 462, 462, 539, 12013, 29918, 3318, 29918, 978, 29901, 851, 29892, 13, 462, 462, 539, 12013, 29918, 3318, 29918, 1853, 29901, 851, 29892, 13, 462, 462, 539, 3443, 29918, 1853, 29901, 851, 29897, 1599, 851, 29901, 13, 4706, 9995, 13, 4706, 10726, 278, 3443, 2143, 5034, 565, 372, 338, 263, 476, 26353, 2224, 3443, 313, 294, 15869, 304, 263, 995, 3443, 29897, 13, 4706, 9995, 13, 4706, 10365, 287, 29918, 1853, 353, 3443, 29918, 1853, 13, 4706, 565, 376, 21382, 29908, 297, 4163, 29918, 2587, 322, 376, 7611, 29908, 297, 4163, 29918, 2587, 1839, 21382, 2033, 29901, 13, 9651, 565, 376, 6519, 29908, 297, 4163, 29918, 2587, 1839, 21382, 16215, 7611, 2033, 29901, 13, 18884, 363, 1899, 297, 4163, 29918, 2587, 1839, 21382, 16215, 7611, 16215, 6519, 2033, 29901, 13, 462, 1678, 565, 338, 8758, 29898, 6519, 29892, 9657, 29897, 322, 1051, 29898, 6519, 29889, 5975, 3101, 29961, 29900, 29962, 1275, 12013, 29918, 3318, 29918, 978, 322, 320, 13, 462, 9651, 1051, 29898, 6519, 29889, 8149, 3101, 29961, 29900, 29962, 1275, 285, 29908, 29912, 601, 29918, 3318, 29918, 1853, 29913, 2605, 1115, 13, 462, 4706, 10365, 287, 29918, 1853, 353, 376, 1445, 29908, 13, 9651, 565, 376, 5085, 29908, 297, 4163, 29918, 2587, 1839, 21382, 16215, 7611, 2033, 29901, 13, 18884, 363, 1852, 297, 4163, 29918, 2587, 1839, 21382, 16215, 7611, 16215, 5085, 2033, 29901, 13, 462, 1678, 565, 338, 8758, 29898, 1191, 29892, 9657, 29897, 322, 1051, 29898, 1191, 29889, 5975, 3101, 29961, 29900, 29962, 1275, 12013, 29918, 3318, 29918, 978, 322, 320, 13, 462, 9651, 1051, 29898, 1191, 29889, 8149, 3101, 29961, 29900, 29962, 1275, 285, 29908, 29912, 601, 29918, 3318, 29918, 1853, 29913, 2605, 1115, 13, 462, 4706, 10365, 287, 29918, 1853, 353, 376, 1445, 29908, 13, 13, 4706, 736, 10365, 287, 29918, 1853, 13, 2 ]
setup.py
akrito/cursors
1
160573
<filename>setup.py from setuptools import setup import os try: long_desc = open(os.path.join(os.path.dirname(__file__), 'README.md')).read() except (IOError, OSError): long_desc = '' setup( name = "cursors", version = '0.1', url = 'http://github.com/akrito/cursors', author = '<NAME>', author_email = '<EMAIL>', description = 'Cursors takes SQL and gives you a sequence of named tuples.', long_description = long_desc, install_requires = ['psycopg2'], py_modules = ['cursors'], )
[ 1, 529, 9507, 29958, 14669, 29889, 2272, 13, 3166, 731, 21245, 8789, 1053, 6230, 13, 5215, 2897, 13, 13, 2202, 29901, 13, 1678, 1472, 29918, 14273, 353, 1722, 29898, 359, 29889, 2084, 29889, 7122, 29898, 359, 29889, 2084, 29889, 25721, 22168, 1445, 1649, 511, 525, 16310, 2303, 29889, 3487, 1495, 467, 949, 580, 13, 19499, 313, 5971, 2392, 29892, 438, 29173, 1125, 13, 1678, 1472, 29918, 14273, 353, 6629, 13, 13, 14669, 29898, 13, 1678, 1024, 353, 376, 29883, 1295, 943, 613, 13, 1678, 1873, 353, 525, 29900, 29889, 29896, 742, 13, 1678, 3142, 353, 525, 1124, 597, 3292, 29889, 510, 29914, 557, 9296, 29914, 29883, 1295, 943, 742, 13, 1678, 4148, 353, 12801, 5813, 29958, 742, 13, 1678, 4148, 29918, 5269, 353, 12801, 26862, 6227, 29958, 742, 13, 1678, 6139, 353, 525, 29907, 1295, 943, 4893, 3758, 322, 4076, 366, 263, 5665, 310, 4257, 5291, 2701, 29889, 742, 13, 1678, 1472, 29918, 8216, 353, 1472, 29918, 14273, 29892, 13, 1678, 2601, 29918, 276, 339, 2658, 353, 6024, 567, 29891, 9708, 29887, 29906, 7464, 13, 1678, 11451, 29918, 7576, 353, 6024, 29883, 1295, 943, 7464, 13, 29897, 13, 2 ]
source/ui/button.py
HugoPFe/Project-Asteroids
0
171736
import pygame from media.paths import button_font class Button: def __init__(self, **kwargs): """ Creates a new Button istance for UI. Accepted Parameters: screen, x, y, width, height, text, padding, command. """ self.screen = kwargs.get('screen') self.x = kwargs.get('x') self.y = kwargs.get('y') self.width = kwargs.get('width') self.height = kwargs.get('height') self.text = kwargs.get('text') self.padding = kwargs.get('padding') self.command = kwargs.get('command') for k, v in kwargs.items(): if v is not None: self.__dict__[k] = v else: self.__dict__['text'] = 'Text' self.__dict__['padding'] = 1 self.split_text = False if '\n' in self.text: self.split_text = True splitted_text = self.text.split('\n') self.text1 = splitted_text[0] self.text2 = splitted_text[1] self.current_color = pygame.Color('#4948D9') self.clicked = set() # Button Border self.border = pygame.Surface((self.width, self.height)) self.border.fill(self.current_color) self.bd_rect = self.border.get_rect(center=(self.x, self.y)) # Button Background self.background = pygame.Surface((self.width*0.95, self.height*0.9)) self.background.fill((0, 0, 0)) self.rect = self.background.get_rect() # Text self.txt_size = int((self.width+self.height)*0.2)-self.padding self.font = pygame.font.Font(button_font, self.txt_size, bold=True) if self.split_text: text_space = 10 self.screen_text1 = self.font.render(self.text1, True, (255, 255, 255), (0, 0, 0)) self.screen_text2 = self.font.render(self.text2, True, (255, 255, 255), (0, 0, 0)) self.txt_rect1 = self.screen_text1.get_rect(center=(self.rect.centerx, self.rect.centery-10)) self.txt_rect2 = self.screen_text2.get_rect(center=(self.rect.centerx, self.rect.centery+text_space)) else: self.screen_text = self.font.render(self.text, True, (255, 255, 255), (0, 0, 0)) self.txt_rect = self.screen_text.get_rect(center=(self.rect.centerx, self.rect.centery)) def render(self): self.mouse_above() if self.split_text: self.background.blit(self.screen_text1, self.txt_rect1) self.background.blit(self.screen_text2, self.txt_rect2) else: self.background.blit(self.screen_text, self.txt_rect) self.border.blit(self.background, self.rect) self.screen.blit(self.border, self.bd_rect) def mouse_above(self): is_above = self.bd_rect.collidepoint(pygame.mouse.get_pos()) if is_above: self.mouse_click() self.current_color = self.current_color.lerp('#9848D9', 0.5) else: self.clicked.clear() self.current_color = self.current_color.lerp('#4948D9', 0.5) self.border.fill(self.current_color) def mouse_click(self): bt_pressed = pygame.mouse.get_pressed(3) if bt_pressed[0]: self.clicked.add(True) self.background.fill('white') if self.split_text: self.screen_text1 = self.font.render(self.text1, True, (0, 0, 0), (255, 255, 255)) self.screen_text2 = self.font.render(self.text2, True, (0, 0, 0), (255, 255, 255)) else: self.screen_text = self.font.render(self.text, True, (0, 0, 0), (255, 255, 255)) else: self.background.fill('black') if self.split_text: self.screen_text1 = self.font.render(self.text1, True, (255, 255, 255), (0, 0, 0)) self.screen_text2 = self.font.render(self.text2, True, (255, 255, 255), (0, 0, 0)) else: self.screen_text = self.font.render(self.text, True, (255, 255, 255), (0, 0, 0)) if self.clicked == {True}: self.clicked.clear() try: self.command() except TypeError: pass __all__ = ['Button']
[ 1, 1053, 22028, 13, 3166, 5745, 29889, 24772, 1053, 2826, 29918, 5657, 13, 13, 13, 13, 1990, 11025, 29901, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 3579, 19290, 1125, 13, 4706, 9995, 13, 4706, 6760, 1078, 263, 716, 11025, 1752, 749, 363, 3740, 29889, 13, 13, 4706, 29848, 287, 12662, 2699, 29901, 4315, 29892, 921, 29892, 343, 29892, 2920, 29892, 3171, 29892, 1426, 29892, 7164, 29892, 1899, 29889, 13, 4706, 9995, 13, 13, 4706, 1583, 29889, 10525, 353, 9049, 5085, 29889, 657, 877, 10525, 1495, 13, 4706, 1583, 29889, 29916, 353, 9049, 5085, 29889, 657, 877, 29916, 1495, 13, 4706, 1583, 29889, 29891, 353, 9049, 5085, 29889, 657, 877, 29891, 1495, 13, 4706, 1583, 29889, 2103, 353, 9049, 5085, 29889, 657, 877, 2103, 1495, 13, 4706, 1583, 29889, 3545, 353, 9049, 5085, 29889, 657, 877, 3545, 1495, 13, 4706, 1583, 29889, 726, 353, 9049, 5085, 29889, 657, 877, 726, 1495, 13, 4706, 1583, 29889, 12791, 353, 9049, 5085, 29889, 657, 877, 12791, 1495, 13, 4706, 1583, 29889, 6519, 353, 9049, 5085, 29889, 657, 877, 6519, 1495, 13, 13, 4706, 363, 413, 29892, 325, 297, 9049, 5085, 29889, 7076, 7295, 13, 9651, 565, 325, 338, 451, 6213, 29901, 13, 18884, 1583, 17255, 8977, 1649, 29961, 29895, 29962, 353, 325, 13, 9651, 1683, 29901, 13, 18884, 1583, 17255, 8977, 1649, 1839, 726, 2033, 353, 525, 1626, 29915, 13, 18884, 1583, 17255, 8977, 1649, 1839, 12791, 2033, 353, 29871, 29896, 13, 13, 4706, 1583, 29889, 5451, 29918, 726, 353, 7700, 13, 4706, 565, 11297, 29876, 29915, 297, 1583, 29889, 726, 29901, 13, 9651, 1583, 29889, 5451, 29918, 726, 353, 5852, 13, 13, 9651, 8536, 4430, 29918, 726, 353, 1583, 29889, 726, 29889, 5451, 28909, 29876, 1495, 13, 9651, 1583, 29889, 726, 29896, 353, 8536, 4430, 29918, 726, 29961, 29900, 29962, 13, 9651, 1583, 29889, 726, 29906, 353, 8536, 4430, 29918, 726, 29961, 29896, 29962, 13, 13, 4706, 1583, 29889, 3784, 29918, 2780, 353, 22028, 29889, 3306, 14237, 29946, 29929, 29946, 29947, 29928, 29929, 1495, 13, 4706, 1583, 29889, 3808, 287, 353, 731, 580, 13, 13, 4706, 396, 11025, 20830, 13, 4706, 1583, 29889, 11466, 353, 22028, 29889, 18498, 2161, 3552, 1311, 29889, 2103, 29892, 1583, 29889, 3545, 876, 13, 4706, 1583, 29889, 11466, 29889, 5589, 29898, 1311, 29889, 3784, 29918, 2780, 29897, 13, 4706, 1583, 29889, 6448, 29918, 1621, 353, 1583, 29889, 11466, 29889, 657, 29918, 1621, 29898, 5064, 7607, 1311, 29889, 29916, 29892, 1583, 29889, 29891, 876, 13, 13, 4706, 396, 11025, 16585, 13, 4706, 1583, 29889, 7042, 353, 22028, 29889, 18498, 2161, 3552, 1311, 29889, 2103, 29930, 29900, 29889, 29929, 29945, 29892, 1583, 29889, 3545, 29930, 29900, 29889, 29929, 876, 13, 4706, 1583, 29889, 7042, 29889, 5589, 3552, 29900, 29892, 29871, 29900, 29892, 29871, 29900, 876, 13, 4706, 1583, 29889, 1621, 353, 1583, 29889, 7042, 29889, 657, 29918, 1621, 580, 13, 13, 4706, 396, 3992, 13, 4706, 1583, 29889, 3945, 29918, 2311, 353, 938, 3552, 1311, 29889, 2103, 29974, 1311, 29889, 3545, 11877, 29900, 29889, 29906, 6817, 1311, 29889, 12791, 13, 4706, 1583, 29889, 5657, 353, 22028, 29889, 5657, 29889, 9824, 29898, 3092, 29918, 5657, 29892, 1583, 29889, 3945, 29918, 2311, 29892, 14288, 29922, 5574, 29897, 13, 308, 13, 4706, 565, 1583, 29889, 5451, 29918, 726, 29901, 13, 9651, 1426, 29918, 3493, 353, 29871, 29896, 29900, 13, 9651, 1583, 29889, 10525, 29918, 726, 29896, 353, 1583, 29889, 5657, 29889, 9482, 29898, 1311, 29889, 726, 29896, 29892, 5852, 29892, 313, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 511, 313, 29900, 29892, 29871, 29900, 29892, 29871, 29900, 876, 13, 9651, 1583, 29889, 10525, 29918, 726, 29906, 353, 1583, 29889, 5657, 29889, 9482, 29898, 1311, 29889, 726, 29906, 29892, 5852, 29892, 313, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 511, 313, 29900, 29892, 29871, 29900, 29892, 29871, 29900, 876, 13, 9651, 1583, 29889, 3945, 29918, 1621, 29896, 353, 1583, 29889, 10525, 29918, 726, 29896, 29889, 657, 29918, 1621, 29898, 5064, 7607, 1311, 29889, 1621, 29889, 5064, 29916, 29892, 1583, 29889, 1621, 29889, 1760, 708, 29899, 29896, 29900, 876, 13, 9651, 1583, 29889, 3945, 29918, 1621, 29906, 353, 1583, 29889, 10525, 29918, 726, 29906, 29889, 657, 29918, 1621, 29898, 5064, 7607, 1311, 29889, 1621, 29889, 5064, 29916, 29892, 1583, 29889, 1621, 29889, 1760, 708, 29974, 726, 29918, 3493, 876, 13, 4706, 1683, 29901, 13, 9651, 1583, 29889, 10525, 29918, 726, 353, 1583, 29889, 5657, 29889, 9482, 29898, 1311, 29889, 726, 29892, 5852, 29892, 313, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 511, 313, 29900, 29892, 29871, 29900, 29892, 29871, 29900, 876, 13, 9651, 1583, 29889, 3945, 29918, 1621, 353, 1583, 29889, 10525, 29918, 726, 29889, 657, 29918, 1621, 29898, 5064, 7607, 1311, 29889, 1621, 29889, 5064, 29916, 29892, 1583, 29889, 1621, 29889, 1760, 708, 876, 13, 13, 1678, 822, 4050, 29898, 1311, 1125, 13, 4706, 1583, 29889, 15769, 29918, 27215, 580, 13, 13, 4706, 565, 1583, 29889, 5451, 29918, 726, 29901, 13, 9651, 1583, 29889, 7042, 29889, 2204, 277, 29898, 1311, 29889, 10525, 29918, 726, 29896, 29892, 1583, 29889, 3945, 29918, 1621, 29896, 29897, 13, 9651, 1583, 29889, 7042, 29889, 2204, 277, 29898, 1311, 29889, 10525, 29918, 726, 29906, 29892, 1583, 29889, 3945, 29918, 1621, 29906, 29897, 13, 4706, 1683, 29901, 13, 9651, 1583, 29889, 7042, 29889, 2204, 277, 29898, 1311, 29889, 10525, 29918, 726, 29892, 1583, 29889, 3945, 29918, 1621, 29897, 13, 4706, 1583, 29889, 11466, 29889, 2204, 277, 29898, 1311, 29889, 7042, 29892, 1583, 29889, 1621, 29897, 13, 4706, 1583, 29889, 10525, 29889, 2204, 277, 29898, 1311, 29889, 11466, 29892, 1583, 29889, 6448, 29918, 1621, 29897, 13, 13, 1678, 822, 9495, 29918, 27215, 29898, 1311, 1125, 13, 4706, 338, 29918, 27215, 353, 1583, 29889, 6448, 29918, 1621, 29889, 1054, 7459, 3149, 29898, 2272, 11802, 29889, 15769, 29889, 657, 29918, 1066, 3101, 13, 13, 4706, 565, 338, 29918, 27215, 29901, 13, 9651, 1583, 29889, 15769, 29918, 3808, 580, 13, 9651, 1583, 29889, 3784, 29918, 2780, 353, 1583, 29889, 3784, 29918, 2780, 29889, 1358, 29886, 14237, 29929, 29947, 29946, 29947, 29928, 29929, 742, 29871, 29900, 29889, 29945, 29897, 13, 13, 4706, 1683, 29901, 13, 9651, 1583, 29889, 3808, 287, 29889, 8551, 580, 13, 9651, 1583, 29889, 3784, 29918, 2780, 353, 1583, 29889, 3784, 29918, 2780, 29889, 1358, 29886, 14237, 29946, 29929, 29946, 29947, 29928, 29929, 742, 29871, 29900, 29889, 29945, 29897, 13, 13, 4706, 1583, 29889, 11466, 29889, 5589, 29898, 1311, 29889, 3784, 29918, 2780, 29897, 13, 13, 1678, 822, 9495, 29918, 3808, 29898, 1311, 1125, 13, 4706, 289, 29873, 29918, 13120, 353, 22028, 29889, 15769, 29889, 657, 29918, 13120, 29898, 29941, 29897, 13, 13, 4706, 565, 289, 29873, 29918, 13120, 29961, 29900, 5387, 13, 9651, 1583, 29889, 3808, 287, 29889, 1202, 29898, 5574, 29897, 13, 9651, 1583, 29889, 7042, 29889, 5589, 877, 10921, 1495, 13, 13, 9651, 565, 1583, 29889, 5451, 29918, 726, 29901, 13, 18884, 1583, 29889, 10525, 29918, 726, 29896, 353, 1583, 29889, 5657, 29889, 9482, 29898, 1311, 29889, 726, 29896, 29892, 5852, 29892, 313, 29900, 29892, 29871, 29900, 29892, 29871, 29900, 511, 313, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 876, 13, 18884, 1583, 29889, 10525, 29918, 726, 29906, 353, 1583, 29889, 5657, 29889, 9482, 29898, 1311, 29889, 726, 29906, 29892, 5852, 29892, 313, 29900, 29892, 29871, 29900, 29892, 29871, 29900, 511, 313, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 876, 13, 9651, 1683, 29901, 13, 18884, 1583, 29889, 10525, 29918, 726, 353, 1583, 29889, 5657, 29889, 9482, 29898, 1311, 29889, 726, 29892, 5852, 29892, 313, 29900, 29892, 29871, 29900, 29892, 29871, 29900, 511, 313, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 876, 13, 13, 4706, 1683, 29901, 13, 9651, 1583, 29889, 7042, 29889, 5589, 877, 8517, 1495, 13, 13, 9651, 565, 1583, 29889, 5451, 29918, 726, 29901, 13, 18884, 1583, 29889, 10525, 29918, 726, 29896, 353, 1583, 29889, 5657, 29889, 9482, 29898, 1311, 29889, 726, 29896, 29892, 5852, 29892, 313, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 511, 313, 29900, 29892, 29871, 29900, 29892, 29871, 29900, 876, 13, 18884, 1583, 29889, 10525, 29918, 726, 29906, 353, 1583, 29889, 5657, 29889, 9482, 29898, 1311, 29889, 726, 29906, 29892, 5852, 29892, 313, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 511, 313, 29900, 29892, 29871, 29900, 29892, 29871, 29900, 876, 13, 9651, 1683, 29901, 13, 18884, 1583, 29889, 10525, 29918, 726, 353, 1583, 29889, 5657, 29889, 9482, 29898, 1311, 29889, 726, 29892, 5852, 29892, 313, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 511, 313, 29900, 29892, 29871, 29900, 29892, 29871, 29900, 876, 13, 13, 9651, 565, 1583, 29889, 3808, 287, 1275, 426, 5574, 6177, 13, 18884, 1583, 29889, 3808, 287, 29889, 8551, 580, 13, 18884, 1018, 29901, 13, 462, 1678, 1583, 29889, 6519, 580, 13, 18884, 5174, 20948, 29901, 13, 462, 1678, 1209, 13, 13, 13, 1649, 497, 1649, 353, 6024, 3125, 2033, 13, 2 ]
tests/retrieval/helpers.py
sameetsinghsidhu/metrics
0
1613173
<gh_stars>0 # Copyright The PyTorch Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. from functools import partial from typing import Callable, Dict, List, Tuple, Type, Union import numpy as np import pytest import torch from numpy import array from torch import Tensor, tensor from tests.helpers import seed_all from tests.helpers.testers import Metric, MetricTester from tests.retrieval.inputs import _input_retrieval_scores as _irs from tests.retrieval.inputs import _input_retrieval_scores_all_target as _irs_all from tests.retrieval.inputs import _input_retrieval_scores_empty as _irs_empty from tests.retrieval.inputs import _input_retrieval_scores_extra as _irs_extra from tests.retrieval.inputs import _input_retrieval_scores_mismatching_sizes as _irs_mis_sz from tests.retrieval.inputs import _input_retrieval_scores_mismatching_sizes_func as _irs_mis_sz_fn from tests.retrieval.inputs import _input_retrieval_scores_no_target as _irs_no_tgt from tests.retrieval.inputs import _input_retrieval_scores_non_binary_target as _irs_non_binary from tests.retrieval.inputs import _input_retrieval_scores_wrong_targets as _irs_bad_tgt seed_all(42) # a version of get_group_indexes that depends on NumPy is here to avoid this dependency for the full library def get_group_indexes(indexes: Union[Tensor, np.ndarray]) -> List[Union[Tensor, np.ndarray]]: """ Given an integer `torch.Tensor` or `np.ndarray` `indexes`, return a `torch.Tensor` or `np.ndarray` of indexes for each different value in `indexes`. Args: indexes: a `torch.Tensor` or `np.ndarray` of integers Return: A list of integer `torch.Tensor`s or `np.ndarray`s Example: >>> indexes = torch.tensor([0, 0, 0, 1, 1, 1, 1]) >>> get_group_indexes(indexes) [tensor([0, 1, 2]), tensor([3, 4, 5, 6])] """ structure, dtype = (tensor, torch.long) if isinstance(indexes, Tensor) else (np.array, np.int64) res = {} for i, _id in enumerate(indexes): _id = _id.item() if _id in res: res[_id] += [i] else: res[_id] = [i] return [structure(x, dtype=dtype) for x in res.values()] def _compute_sklearn_metric( preds: Union[Tensor, array], target: Union[Tensor, array], indexes: np.ndarray = None, metric: Callable = None, empty_target_action: str = "skip", reverse: bool = False, **kwargs ) -> Tensor: """ Compute metric with multiple iterations over every query predictions set. """ if indexes is None: indexes = np.full_like(preds, fill_value=0, dtype=np.int64) if isinstance(indexes, Tensor): indexes = indexes.cpu().numpy() if isinstance(preds, Tensor): preds = preds.cpu().numpy() if isinstance(target, Tensor): target = target.cpu().numpy() assert isinstance(indexes, np.ndarray) assert isinstance(preds, np.ndarray) assert isinstance(target, np.ndarray) indexes = indexes.flatten() preds = preds.flatten() target = target.flatten() groups = get_group_indexes(indexes) sk_results = [] for group in groups: trg, pds = target[group], preds[group] if ((1 - trg) if reverse else trg).sum() == 0: if empty_target_action == 'skip': pass elif empty_target_action == 'pos': sk_results.append(1.0) else: sk_results.append(0.0) else: res = metric(trg, pds, **kwargs) sk_results.append(res) if len(sk_results) > 0: return np.mean(sk_results) return np.array(0.0) def _concat_tests(*tests: Tuple[Dict]) -> Dict: """Concat tests composed by a string and a list of arguments.""" assert len(tests), "`_concat_tests` expects at least an argument" assert all(tests[0]['argnames'] == x['argnames'] for x in tests[1:]), "the header must be the same for all tests" return dict(argnames=tests[0]['argnames'], argvalues=sum((x['argvalues'] for x in tests), [])) _errors_test_functional_metric_parameters_default = dict( argnames="preds,target,message,metric_args", argvalues=[ # check input shapes are consistent (func) (_irs_mis_sz_fn.preds, _irs_mis_sz_fn.target, "`preds` and `target` must be of the same shape", {}), # check input tensors are not empty (_irs_empty.preds, _irs_empty.target, "`preds` and `target` must be non-empty and non-scalar tensors", {}), # check on input dtypes (_irs.preds.bool(), _irs.target, "`preds` must be a tensor of floats", {}), (_irs.preds, _irs.target.float(), "`target` must be a tensor of booleans or integers", {}), # check targets are between 0 and 1 (_irs_bad_tgt.preds, _irs_bad_tgt.target, "`target` must contain `binary` values", {}), ] ) _errors_test_functional_metric_parameters_k = dict( argnames="preds,target,message,metric_args", argvalues=[ (_irs.preds, _irs.target, "`k` has to be a positive integer or None", dict(k=-10)), (_irs.preds, _irs.target, "`k` has to be a positive integer or None", dict(k=4.0)), ] ) _errors_test_class_metric_parameters_no_pos_target = dict( argnames="indexes,preds,target,message,metric_args", argvalues=[ # check when error when there are no positive targets ( _irs_no_tgt.indexes, _irs_no_tgt.preds, _irs_no_tgt.target, "`compute` method was provided with a query with no positive target.", dict(empty_target_action="error") ), ] ) _errors_test_class_metric_parameters_no_neg_target = dict( argnames="indexes,preds,target,message,metric_args", argvalues=[ # check when error when there are no negative targets ( _irs_all.indexes, _irs_all.preds, _irs_all.target, "`compute` method was provided with a query with no negative target.", dict(empty_target_action="error") ), ] ) _errors_test_class_metric_parameters_default = dict( argnames="indexes,preds,target,message,metric_args", argvalues=[ (None, _irs.preds, _irs.target, "`indexes` cannot be None", dict(empty_target_action="error")), # check when input arguments are invalid ( _irs.indexes, _irs.preds, _irs.target, "`empty_target_action` received a wrong value `casual_argument`.", dict(empty_target_action="casual_argument") ), # check input shapes are consistent ( _irs_mis_sz.indexes, _irs_mis_sz.preds, _irs_mis_sz.target, "`indexes`, `preds` and `target` must be of the same shape", dict(empty_target_action="skip") ), # check input tensors are not empty ( _irs_empty.indexes, _irs_empty.preds, _irs_empty.target, "`indexes`, `preds` and `target` must be non-empty and non-scalar tensors", dict(empty_target_action="skip") ), # check on input dtypes ( _irs.indexes.bool(), _irs.preds, _irs.target, "`indexes` must be a tensor of long integers", dict(empty_target_action="skip") ), ( _irs.indexes, _irs.preds.bool(), _irs.target, "`preds` must be a tensor of floats", dict(empty_target_action="skip") ), ( _irs.indexes, _irs.preds, _irs.target.float(), "`target` must be a tensor of booleans or integers", dict(empty_target_action="skip") ), # check targets are between 0 and 1 ( _irs_bad_tgt.indexes, _irs_bad_tgt.preds, _irs_bad_tgt.target, "`target` must contain `binary` values", dict(empty_target_action="skip") ), ] ) _errors_test_class_metric_parameters_k = dict( argnames="indexes,preds,target,message,metric_args", argvalues=[ (_irs.index, _irs.preds, _irs.target, "`k` has to be a positive integer or None", dict(k=-10)), ] ) _default_metric_class_input_arguments = dict( argnames="indexes,preds,target", argvalues=[ (_irs.indexes, _irs.preds, _irs.target), (_irs_extra.indexes, _irs_extra.preds, _irs_extra.target), (_irs_no_tgt.indexes, _irs_no_tgt.preds, _irs_no_tgt.target), ] ) _default_metric_class_input_arguments_with_non_binary_target = dict( argnames="indexes,preds,target", argvalues=[ (_irs.indexes, _irs.preds, _irs.target), (_irs_extra.indexes, _irs_extra.preds, _irs_extra.target), (_irs_no_tgt.indexes, _irs_no_tgt.preds, _irs_no_tgt.target), (_irs_non_binary.indexes, _irs_non_binary.preds, _irs_non_binary.target), ] ) _default_metric_functional_input_arguments = dict( argnames="preds,target", argvalues=[ (_irs.preds, _irs.target), (_irs_extra.preds, _irs_extra.target), (_irs_no_tgt.preds, _irs_no_tgt.target), ] ) _default_metric_functional_input_arguments_with_non_binary_target = dict( argnames="preds,target", argvalues=[ (_irs.preds, _irs.target), (_irs_extra.preds, _irs_extra.target), (_irs_no_tgt.preds, _irs_no_tgt.target), (_irs_non_binary.preds, _irs_non_binary.target), ] ) def _errors_test_class_metric( indexes: Tensor, preds: Tensor, target: Tensor, metric_class: Metric, message: str = "", metric_args: dict = None, exception_type: Type[Exception] = ValueError, kwargs_update: dict = None, ): """Utility function doing checks about types, parameters and errors. Args: indexes: torch tensor with indexes preds: torch tensor with predictions target: torch tensor with targets metric_class: lightning metric class that should be tested message: message that exception should return metric_args: arguments for class initialization exception_type: callable function that is used for comparison kwargs_update: Additional keyword arguments that will be passed with indexes, preds and target when running update on the metric. """ metric_args = metric_args or {} kwargs_update = kwargs_update or {} with pytest.raises(exception_type, match=message): metric = metric_class(**metric_args) metric(preds, target, indexes=indexes, **kwargs_update) def _errors_test_functional_metric( preds: Tensor, target: Tensor, metric_functional: Metric, message: str = "", exception_type: Type[Exception] = ValueError, kwargs_update: dict = None, ): """Utility function doing checks about types, parameters and errors. Args: preds: torch tensor with predictions target: torch tensor with targets metric_functional: lightning functional metric that should be tested message: message that exception should return exception_type: callable function that is used for comparison kwargs_update: Additional keyword arguments that will be passed with indexes, preds and target when running update on the metric. """ kwargs_update = kwargs_update or {} with pytest.raises(exception_type, match=message): metric_functional(preds, target, **kwargs_update) class RetrievalMetricTester(MetricTester): def run_class_metric_test( self, ddp: bool, indexes: Tensor, preds: Tensor, target: Tensor, metric_class: Metric, sk_metric: Callable, dist_sync_on_step: bool, metric_args: dict, reverse: bool = False, ): _sk_metric_adapted = partial(_compute_sklearn_metric, metric=sk_metric, reverse=reverse, **metric_args) super().run_class_metric_test( ddp=ddp, preds=preds, target=target, metric_class=metric_class, sk_metric=_sk_metric_adapted, dist_sync_on_step=dist_sync_on_step, metric_args=metric_args, fragment_kwargs=True, indexes=indexes, # every additional argument will be passed to metric_class and _sk_metric_adapted ) def run_functional_metric_test( self, preds: Tensor, target: Tensor, metric_functional: Callable, sk_metric: Callable, metric_args: dict, reverse: bool = False, **kwargs, ): _sk_metric_adapted = partial(_compute_sklearn_metric, metric=sk_metric, reverse=reverse, **metric_args) super().run_functional_metric_test( preds=preds, target=target, metric_functional=metric_functional, sk_metric=_sk_metric_adapted, metric_args=metric_args, fragment_kwargs=True, **kwargs, ) def run_precision_test_cpu( self, indexes: Tensor, preds: Tensor, target: Tensor, metric_module: Metric, metric_functional: Callable, ): def metric_functional_ignore_indexes(preds, target, indexes): return metric_functional(preds, target) super().run_precision_test_cpu( preds=preds, target=target, metric_module=metric_module, metric_functional=metric_functional_ignore_indexes, metric_args={'empty_target_action': 'neg'}, indexes=indexes, # every additional argument will be passed to RetrievalMAP and _sk_metric_adapted ) def run_precision_test_gpu( self, indexes: Tensor, preds: Tensor, target: Tensor, metric_module: Metric, metric_functional: Callable, ): if not torch.cuda.is_available(): pytest.skip() def metric_functional_ignore_indexes(preds, target, indexes): return metric_functional(preds, target) super().run_precision_test_gpu( preds=preds, target=target, metric_module=metric_module, metric_functional=metric_functional_ignore_indexes, metric_args={'empty_target_action': 'neg'}, indexes=indexes, # every additional argument will be passed to RetrievalMAP and _sk_metric_adapted ) @staticmethod def run_metric_class_arguments_test( indexes: Tensor, preds: Tensor, target: Tensor, metric_class: Metric, message: str = "", metric_args: dict = None, exception_type: Type[Exception] = ValueError, kwargs_update: dict = None, ): _errors_test_class_metric( indexes=indexes, preds=preds, target=target, metric_class=metric_class, message=message, metric_args=metric_args, exception_type=exception_type, **kwargs_update, ) @staticmethod def run_functional_metric_arguments_test( preds: Tensor, target: Tensor, metric_functional: Callable, message: str = "", exception_type: Type[Exception] = ValueError, kwargs_update: dict = None, ): _errors_test_functional_metric( preds=preds, target=target, metric_functional=metric_functional, message=message, exception_type=exception_type, kwargs_update=kwargs_update, )
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 14187, 1266, 450, 10772, 29911, 25350, 12790, 1076, 3815, 29889, 13, 29937, 13, 29937, 10413, 21144, 1090, 278, 13380, 19245, 29892, 10079, 29871, 29906, 29889, 29900, 313, 1552, 376, 29931, 293, 1947, 1496, 13, 29937, 366, 1122, 451, 671, 445, 934, 5174, 297, 752, 13036, 411, 278, 19245, 29889, 13, 29937, 887, 1122, 4017, 263, 3509, 310, 278, 19245, 472, 13, 29937, 13, 29937, 268, 1732, 597, 1636, 29889, 4288, 29889, 990, 29914, 506, 11259, 29914, 27888, 1430, 1660, 29899, 29906, 29889, 29900, 13, 29937, 13, 29937, 25870, 3734, 491, 22903, 4307, 470, 15502, 304, 297, 5007, 29892, 7047, 13, 29937, 13235, 1090, 278, 19245, 338, 13235, 373, 385, 376, 3289, 8519, 29908, 350, 3289, 3235, 29892, 13, 29937, 399, 1806, 8187, 2692, 399, 1718, 29934, 13566, 29059, 6323, 8707, 29928, 22122, 29903, 8079, 13764, 29979, 476, 22255, 29892, 2845, 4653, 470, 2411, 2957, 29889, 13, 29937, 2823, 278, 19245, 363, 278, 2702, 4086, 14765, 1076, 11239, 322, 13, 29937, 27028, 1090, 278, 19245, 29889, 13, 3166, 2090, 312, 8789, 1053, 7687, 13, 3166, 19229, 1053, 8251, 519, 29892, 360, 919, 29892, 2391, 29892, 12603, 552, 29892, 5167, 29892, 7761, 13, 13, 5215, 12655, 408, 7442, 13, 5215, 11451, 1688, 13, 5215, 4842, 305, 13, 3166, 12655, 1053, 1409, 13, 3166, 4842, 305, 1053, 323, 6073, 29892, 12489, 13, 13, 3166, 6987, 29889, 3952, 6774, 1053, 16717, 29918, 497, 13, 3166, 6987, 29889, 3952, 6774, 29889, 1688, 414, 1053, 4737, 2200, 29892, 4737, 2200, 3057, 261, 13, 3166, 6987, 29889, 276, 509, 16837, 29889, 2080, 29879, 1053, 903, 2080, 29918, 276, 509, 16837, 29918, 1557, 2361, 408, 903, 12935, 13, 3166, 6987, 29889, 276, 509, 16837, 29889, 2080, 29879, 1053, 903, 2080, 29918, 276, 509, 16837, 29918, 1557, 2361, 29918, 497, 29918, 5182, 408, 903, 12935, 29918, 497, 13, 3166, 6987, 29889, 276, 509, 16837, 29889, 2080, 29879, 1053, 903, 2080, 29918, 276, 509, 16837, 29918, 1557, 2361, 29918, 6310, 408, 903, 12935, 29918, 6310, 13, 3166, 6987, 29889, 276, 509, 16837, 29889, 2080, 29879, 1053, 903, 2080, 29918, 276, 509, 16837, 29918, 1557, 2361, 29918, 17833, 408, 903, 12935, 29918, 17833, 13, 3166, 6987, 29889, 276, 509, 16837, 29889, 2080, 29879, 1053, 903, 2080, 29918, 276, 509, 16837, 29918, 1557, 2361, 29918, 29885, 1608, 905, 292, 29918, 29879, 7093, 408, 903, 12935, 29918, 26737, 29918, 3616, 13, 3166, 6987, 29889, 276, 509, 16837, 29889, 2080, 29879, 1053, 903, 2080, 29918, 276, 509, 16837, 29918, 1557, 2361, 29918, 29885, 1608, 905, 292, 29918, 29879, 7093, 29918, 9891, 408, 903, 12935, 29918, 26737, 29918, 3616, 29918, 9144, 13, 3166, 6987, 29889, 276, 509, 16837, 29889, 2080, 29879, 1053, 903, 2080, 29918, 276, 509, 16837, 29918, 1557, 2361, 29918, 1217, 29918, 5182, 408, 903, 12935, 29918, 1217, 29918, 29873, 4141, 13, 3166, 6987, 29889, 276, 509, 16837, 29889, 2080, 29879, 1053, 903, 2080, 29918, 276, 509, 16837, 29918, 1557, 2361, 29918, 5464, 29918, 19541, 29918, 5182, 408, 903, 12935, 29918, 5464, 29918, 19541, 13, 3166, 6987, 29889, 276, 509, 16837, 29889, 2080, 29879, 1053, 903, 2080, 29918, 276, 509, 16837, 29918, 1557, 2361, 29918, 15866, 549, 29918, 5182, 29879, 408, 903, 12935, 29918, 12313, 29918, 29873, 4141, 13, 13, 26776, 29918, 497, 29898, 29946, 29906, 29897, 13, 13, 29937, 263, 1873, 310, 679, 29918, 2972, 29918, 2248, 267, 393, 7111, 373, 11848, 19737, 338, 1244, 304, 4772, 445, 10609, 363, 278, 2989, 3489, 13, 13, 13, 1753, 679, 29918, 2972, 29918, 2248, 267, 29898, 2248, 267, 29901, 7761, 29961, 29911, 6073, 29892, 7442, 29889, 299, 2378, 2314, 1599, 2391, 29961, 19986, 29961, 29911, 6073, 29892, 7442, 29889, 299, 2378, 5262, 29901, 13, 1678, 9995, 13, 1678, 11221, 385, 6043, 421, 7345, 305, 29889, 29911, 6073, 29952, 470, 421, 9302, 29889, 299, 2378, 29952, 421, 2248, 267, 1673, 736, 263, 421, 7345, 305, 29889, 29911, 6073, 29952, 470, 421, 9302, 29889, 299, 2378, 29952, 310, 18111, 363, 13, 1678, 1269, 1422, 995, 297, 421, 2248, 267, 1412, 13, 13, 1678, 826, 3174, 29901, 13, 4706, 18111, 29901, 263, 421, 7345, 305, 29889, 29911, 6073, 29952, 470, 421, 9302, 29889, 299, 2378, 29952, 310, 11920, 13, 13, 1678, 7106, 29901, 13, 4706, 319, 1051, 310, 6043, 421, 7345, 305, 29889, 29911, 6073, 29952, 29879, 470, 421, 9302, 29889, 299, 2378, 29952, 29879, 13, 13, 1678, 8741, 29901, 13, 4706, 8653, 18111, 353, 4842, 305, 29889, 20158, 4197, 29900, 29892, 29871, 29900, 29892, 29871, 29900, 29892, 29871, 29896, 29892, 29871, 29896, 29892, 29871, 29896, 29892, 29871, 29896, 2314, 13, 4706, 8653, 679, 29918, 2972, 29918, 2248, 267, 29898, 2248, 267, 29897, 13, 4706, 518, 20158, 4197, 29900, 29892, 29871, 29896, 29892, 29871, 29906, 11724, 12489, 4197, 29941, 29892, 29871, 29946, 29892, 29871, 29945, 29892, 29871, 29953, 2314, 29962, 13, 1678, 9995, 13, 1678, 3829, 29892, 26688, 353, 313, 20158, 29892, 4842, 305, 29889, 5426, 29897, 565, 338, 8758, 29898, 2248, 267, 29892, 323, 6073, 29897, 1683, 313, 9302, 29889, 2378, 29892, 7442, 29889, 524, 29953, 29946, 29897, 13, 13, 1678, 620, 353, 6571, 13, 1678, 363, 474, 29892, 903, 333, 297, 26985, 29898, 2248, 267, 1125, 13, 4706, 903, 333, 353, 903, 333, 29889, 667, 580, 13, 4706, 565, 903, 333, 297, 620, 29901, 13, 9651, 620, 28513, 333, 29962, 4619, 518, 29875, 29962, 13, 4706, 1683, 29901, 13, 9651, 620, 28513, 333, 29962, 353, 518, 29875, 29962, 13, 13, 1678, 736, 518, 23905, 29898, 29916, 29892, 26688, 29922, 29881, 1853, 29897, 363, 921, 297, 620, 29889, 5975, 580, 29962, 13, 13, 13, 1753, 903, 26017, 29918, 808, 19668, 29918, 16414, 29898, 13, 1678, 4450, 29879, 29901, 7761, 29961, 29911, 6073, 29892, 1409, 1402, 13, 1678, 3646, 29901, 7761, 29961, 29911, 6073, 29892, 1409, 1402, 13, 1678, 18111, 29901, 7442, 29889, 299, 2378, 353, 6213, 29892, 13, 1678, 12714, 29901, 8251, 519, 353, 6213, 29892, 13, 1678, 4069, 29918, 5182, 29918, 2467, 29901, 851, 353, 376, 11014, 613, 13, 1678, 11837, 29901, 6120, 353, 7700, 29892, 13, 1678, 3579, 19290, 13, 29897, 1599, 323, 6073, 29901, 13, 1678, 9995, 11796, 29872, 12714, 411, 2999, 24372, 975, 1432, 2346, 27303, 731, 29889, 9995, 13, 13, 1678, 565, 18111, 338, 6213, 29901, 13, 4706, 18111, 353, 7442, 29889, 8159, 29918, 4561, 29898, 11965, 29879, 29892, 5445, 29918, 1767, 29922, 29900, 29892, 26688, 29922, 9302, 29889, 524, 29953, 29946, 29897, 13, 1678, 565, 338, 8758, 29898, 2248, 267, 29892, 323, 6073, 1125, 13, 4706, 18111, 353, 18111, 29889, 21970, 2141, 23749, 580, 13, 1678, 565, 338, 8758, 29898, 11965, 29879, 29892, 323, 6073, 1125, 13, 4706, 4450, 29879, 353, 4450, 29879, 29889, 21970, 2141, 23749, 580, 13, 1678, 565, 338, 8758, 29898, 5182, 29892, 323, 6073, 1125, 13, 4706, 3646, 353, 3646, 29889, 21970, 2141, 23749, 580, 13, 13, 1678, 4974, 338, 8758, 29898, 2248, 267, 29892, 7442, 29889, 299, 2378, 29897, 13, 1678, 4974, 338, 8758, 29898, 11965, 29879, 29892, 7442, 29889, 299, 2378, 29897, 13, 1678, 4974, 338, 8758, 29898, 5182, 29892, 7442, 29889, 299, 2378, 29897, 13, 13, 1678, 18111, 353, 18111, 29889, 1579, 8606, 580, 13, 1678, 4450, 29879, 353, 4450, 29879, 29889, 1579, 8606, 580, 13, 1678, 3646, 353, 3646, 29889, 1579, 8606, 580, 13, 1678, 6471, 353, 679, 29918, 2972, 29918, 2248, 267, 29898, 2248, 267, 29897, 13, 13, 1678, 2071, 29918, 9902, 353, 5159, 13, 1678, 363, 2318, 297, 6471, 29901, 13, 4706, 534, 29887, 29892, 282, 6289, 353, 3646, 29961, 2972, 1402, 4450, 29879, 29961, 2972, 29962, 13, 13, 4706, 565, 5135, 29896, 448, 534, 29887, 29897, 565, 11837, 1683, 534, 29887, 467, 2083, 580, 1275, 29871, 29900, 29901, 13, 9651, 565, 4069, 29918, 5182, 29918, 2467, 1275, 525, 11014, 2396, 13, 18884, 1209, 13, 9651, 25342, 4069, 29918, 5182, 29918, 2467, 1275, 525, 1066, 2396, 13, 18884, 2071, 29918, 9902, 29889, 4397, 29898, 29896, 29889, 29900, 29897, 13, 9651, 1683, 29901, 13, 18884, 2071, 29918, 9902, 29889, 4397, 29898, 29900, 29889, 29900, 29897, 13, 4706, 1683, 29901, 13, 9651, 620, 353, 12714, 29898, 509, 29887, 29892, 282, 6289, 29892, 3579, 19290, 29897, 13, 9651, 2071, 29918, 9902, 29889, 4397, 29898, 690, 29897, 13, 13, 1678, 565, 7431, 29898, 808, 29918, 9902, 29897, 1405, 29871, 29900, 29901, 13, 4706, 736, 7442, 29889, 12676, 29898, 808, 29918, 9902, 29897, 13, 1678, 736, 7442, 29889, 2378, 29898, 29900, 29889, 29900, 29897, 13, 13, 13, 1753, 903, 17685, 29918, 21150, 10456, 21150, 29901, 12603, 552, 29961, 21533, 2314, 1599, 360, 919, 29901, 13, 1678, 9995, 1168, 4117, 6987, 13725, 491, 263, 1347, 322, 263, 1051, 310, 6273, 1213, 15945, 13, 1678, 4974, 7431, 29898, 21150, 511, 29724, 29918, 17685, 29918, 21150, 29952, 23347, 472, 3203, 385, 2980, 29908, 13, 1678, 4974, 599, 29898, 21150, 29961, 29900, 22322, 1191, 7039, 2033, 1275, 921, 1839, 1191, 7039, 2033, 363, 921, 297, 6987, 29961, 29896, 29901, 11724, 376, 1552, 4839, 1818, 367, 278, 1021, 363, 599, 6987, 29908, 13, 1678, 736, 9657, 29898, 1191, 7039, 29922, 21150, 29961, 29900, 22322, 1191, 7039, 7464, 1852, 5975, 29922, 2083, 3552, 29916, 1839, 1191, 5975, 2033, 363, 921, 297, 6987, 511, 5159, 876, 13, 13, 13, 29918, 12523, 29918, 1688, 29918, 2220, 284, 29918, 16414, 29918, 16744, 29918, 4381, 353, 9657, 29898, 13, 1678, 1852, 7039, 543, 11965, 29879, 29892, 5182, 29892, 4906, 29892, 16414, 29918, 5085, 613, 13, 1678, 1852, 5975, 11759, 13, 4706, 396, 1423, 1881, 25834, 526, 13747, 313, 9891, 29897, 13, 4706, 9423, 12935, 29918, 26737, 29918, 3616, 29918, 9144, 29889, 11965, 29879, 29892, 903, 12935, 29918, 26737, 29918, 3616, 29918, 9144, 29889, 5182, 29892, 29724, 11965, 29879, 29952, 322, 421, 5182, 29952, 1818, 367, 310, 278, 1021, 8267, 613, 6571, 511, 13, 4706, 396, 1423, 1881, 25187, 943, 526, 451, 4069, 13, 4706, 9423, 12935, 29918, 6310, 29889, 11965, 29879, 29892, 903, 12935, 29918, 6310, 29889, 5182, 29892, 29724, 11965, 29879, 29952, 322, 421, 5182, 29952, 1818, 367, 1661, 29899, 6310, 322, 1661, 29899, 19529, 279, 25187, 943, 613, 6571, 511, 13, 4706, 396, 1423, 373, 1881, 270, 8768, 13, 4706, 9423, 12935, 29889, 11965, 29879, 29889, 11227, 3285, 903, 12935, 29889, 5182, 29892, 29724, 11965, 29879, 29952, 1818, 367, 263, 12489, 310, 5685, 1446, 613, 6571, 511, 13, 4706, 9423, 12935, 29889, 11965, 29879, 29892, 903, 12935, 29889, 5182, 29889, 7411, 3285, 29724, 5182, 29952, 1818, 367, 263, 12489, 310, 1045, 1772, 550, 470, 11920, 613, 6571, 511, 13, 4706, 396, 1423, 22525, 526, 1546, 29871, 29900, 322, 29871, 29896, 13, 4706, 9423, 12935, 29918, 12313, 29918, 29873, 4141, 29889, 11965, 29879, 29892, 903, 12935, 29918, 12313, 29918, 29873, 4141, 29889, 5182, 29892, 29724, 5182, 29952, 1818, 1712, 421, 19541, 29952, 1819, 613, 6571, 511, 13, 1678, 4514, 13, 29897, 13, 13, 29918, 12523, 29918, 1688, 29918, 2220, 284, 29918, 16414, 29918, 16744, 29918, 29895, 353, 9657, 29898, 13, 1678, 1852, 7039, 543, 11965, 29879, 29892, 5182, 29892, 4906, 29892, 16414, 29918, 5085, 613, 13, 1678, 1852, 5975, 11759, 13, 4706, 9423, 12935, 29889, 11965, 29879, 29892, 903, 12935, 29889, 5182, 29892, 29724, 29895, 29952, 756, 304, 367, 263, 6374, 6043, 470, 6213, 613, 9657, 29898, 29895, 10457, 29896, 29900, 8243, 13, 4706, 9423, 12935, 29889, 11965, 29879, 29892, 903, 12935, 29889, 5182, 29892, 29724, 29895, 29952, 756, 304, 367, 263, 6374, 6043, 470, 6213, 613, 9657, 29898, 29895, 29922, 29946, 29889, 29900, 8243, 13, 1678, 4514, 13, 29897, 13, 13, 29918, 12523, 29918, 1688, 29918, 1990, 29918, 16414, 29918, 16744, 29918, 1217, 29918, 1066, 29918, 5182, 353, 9657, 29898, 13, 1678, 1852, 7039, 543, 2248, 267, 29892, 11965, 29879, 29892, 5182, 29892, 4906, 29892, 16414, 29918, 5085, 613, 13, 1678, 1852, 5975, 11759, 13, 4706, 396, 1423, 746, 1059, 746, 727, 526, 694, 6374, 22525, 13, 4706, 313, 13, 9651, 903, 12935, 29918, 1217, 29918, 29873, 4141, 29889, 2248, 267, 29892, 903, 12935, 29918, 1217, 29918, 29873, 4141, 29889, 11965, 29879, 29892, 903, 12935, 29918, 1217, 29918, 29873, 4141, 29889, 5182, 29892, 13, 9651, 29724, 26017, 29952, 1158, 471, 4944, 411, 263, 2346, 411, 694, 6374, 3646, 19602, 9657, 29898, 6310, 29918, 5182, 29918, 2467, 543, 2704, 1159, 13, 4706, 10353, 13, 1678, 4514, 13, 29897, 13, 13, 29918, 12523, 29918, 1688, 29918, 1990, 29918, 16414, 29918, 16744, 29918, 1217, 29918, 10052, 29918, 5182, 353, 9657, 29898, 13, 1678, 1852, 7039, 543, 2248, 267, 29892, 11965, 29879, 29892, 5182, 29892, 4906, 29892, 16414, 29918, 5085, 613, 13, 1678, 1852, 5975, 11759, 13, 4706, 396, 1423, 746, 1059, 746, 727, 526, 694, 8178, 22525, 13, 4706, 313, 13, 9651, 903, 12935, 29918, 497, 29889, 2248, 267, 29892, 903, 12935, 29918, 497, 29889, 11965, 29879, 29892, 903, 12935, 29918, 497, 29889, 5182, 29892, 13, 9651, 29724, 26017, 29952, 1158, 471, 4944, 411, 263, 2346, 411, 694, 8178, 3646, 19602, 9657, 29898, 6310, 29918, 5182, 29918, 2467, 543, 2704, 1159, 13, 4706, 10353, 13, 1678, 4514, 13, 29897, 13, 13, 29918, 12523, 29918, 1688, 29918, 1990, 29918, 16414, 29918, 16744, 29918, 4381, 353, 9657, 29898, 13, 1678, 1852, 7039, 543, 2248, 267, 29892, 11965, 29879, 29892, 5182, 29892, 4906, 29892, 16414, 29918, 5085, 613, 13, 1678, 1852, 5975, 11759, 13, 4706, 313, 8516, 29892, 903, 12935, 29889, 11965, 29879, 29892, 903, 12935, 29889, 5182, 29892, 29724, 2248, 267, 29952, 2609, 367, 6213, 613, 9657, 29898, 6310, 29918, 5182, 29918, 2467, 543, 2704, 1159, 511, 13, 4706, 396, 1423, 746, 1881, 6273, 526, 8340, 13, 4706, 313, 13, 9651, 903, 12935, 29889, 2248, 267, 29892, 903, 12935, 29889, 11965, 29879, 29892, 903, 12935, 29889, 5182, 29892, 29724, 6310, 29918, 5182, 29918, 2467, 29952, 4520, 263, 2743, 995, 421, 9398, 950, 29918, 23516, 1412, 613, 13, 9651, 9657, 29898, 6310, 29918, 5182, 29918, 2467, 543, 9398, 950, 29918, 23516, 1159, 13, 4706, 10353, 13, 4706, 396, 1423, 1881, 25834, 526, 13747, 13, 4706, 313, 13, 9651, 903, 12935, 29918, 26737, 29918, 3616, 29889, 2248, 267, 29892, 903, 12935, 29918, 26737, 29918, 3616, 29889, 11965, 29879, 29892, 903, 12935, 29918, 26737, 29918, 3616, 29889, 5182, 29892, 13, 9651, 29724, 2248, 267, 1673, 421, 11965, 29879, 29952, 322, 421, 5182, 29952, 1818, 367, 310, 278, 1021, 8267, 613, 9657, 29898, 6310, 29918, 5182, 29918, 2467, 543, 11014, 1159, 13, 4706, 10353, 13, 4706, 396, 1423, 1881, 25187, 943, 526, 451, 4069, 13, 4706, 313, 13, 9651, 903, 12935, 29918, 6310, 29889, 2248, 267, 29892, 903, 12935, 29918, 6310, 29889, 11965, 29879, 29892, 13, 9651, 903, 12935, 29918, 6310, 29889, 5182, 29892, 29724, 2248, 267, 1673, 421, 11965, 29879, 29952, 322, 421, 5182, 29952, 1818, 367, 1661, 29899, 6310, 322, 1661, 29899, 19529, 279, 25187, 943, 613, 13, 9651, 9657, 29898, 6310, 29918, 5182, 29918, 2467, 543, 11014, 1159, 13, 4706, 10353, 13, 4706, 396, 1423, 373, 1881, 270, 8768, 13, 4706, 313, 13, 9651, 903, 12935, 29889, 2248, 267, 29889, 11227, 3285, 903, 12935, 29889, 11965, 29879, 29892, 903, 12935, 29889, 5182, 29892, 29724, 2248, 267, 29952, 1818, 367, 263, 12489, 310, 1472, 11920, 613, 13, 9651, 9657, 29898, 6310, 29918, 5182, 29918, 2467, 543, 11014, 1159, 13, 4706, 10353, 13, 4706, 313, 13, 9651, 903, 12935, 29889, 2248, 267, 29892, 903, 12935, 29889, 11965, 29879, 29889, 11227, 3285, 903, 12935, 29889, 5182, 29892, 29724, 11965, 29879, 29952, 1818, 367, 263, 12489, 310, 5685, 1446, 613, 13, 9651, 9657, 29898, 6310, 29918, 5182, 29918, 2467, 543, 11014, 1159, 13, 4706, 10353, 13, 4706, 313, 13, 9651, 903, 12935, 29889, 2248, 267, 29892, 903, 12935, 29889, 11965, 29879, 29892, 903, 12935, 29889, 5182, 29889, 7411, 3285, 29724, 5182, 29952, 1818, 367, 263, 12489, 310, 1045, 1772, 550, 470, 11920, 613, 13, 9651, 9657, 29898, 6310, 29918, 5182, 29918, 2467, 543, 11014, 1159, 13, 4706, 10353, 13, 4706, 396, 1423, 22525, 526, 1546, 29871, 29900, 322, 29871, 29896, 13, 4706, 313, 13, 9651, 903, 12935, 29918, 12313, 29918, 29873, 4141, 29889, 2248, 267, 29892, 903, 12935, 29918, 12313, 29918, 29873, 4141, 29889, 11965, 29879, 29892, 903, 12935, 29918, 12313, 29918, 29873, 4141, 29889, 5182, 29892, 29724, 5182, 29952, 1818, 1712, 421, 19541, 29952, 1819, 613, 13, 9651, 9657, 29898, 6310, 29918, 5182, 29918, 2467, 543, 11014, 1159, 13, 4706, 10353, 13, 1678, 4514, 13, 29897, 13, 13, 29918, 12523, 29918, 1688, 29918, 1990, 29918, 16414, 29918, 16744, 29918, 29895, 353, 9657, 29898, 13, 1678, 1852, 7039, 543, 2248, 267, 29892, 11965, 29879, 29892, 5182, 29892, 4906, 29892, 16414, 29918, 5085, 613, 13, 1678, 1852, 5975, 11759, 13, 4706, 9423, 12935, 29889, 2248, 29892, 903, 12935, 29889, 11965, 29879, 29892, 903, 12935, 29889, 5182, 29892, 29724, 29895, 29952, 756, 304, 367, 263, 6374, 6043, 470, 6213, 613, 9657, 29898, 29895, 10457, 29896, 29900, 8243, 13, 1678, 4514, 13, 29897, 13, 13, 29918, 4381, 29918, 16414, 29918, 1990, 29918, 2080, 29918, 25699, 353, 9657, 29898, 13, 1678, 1852, 7039, 543, 2248, 267, 29892, 11965, 29879, 29892, 5182, 613, 13, 1678, 1852, 5975, 11759, 13, 4706, 9423, 12935, 29889, 2248, 267, 29892, 903, 12935, 29889, 11965, 29879, 29892, 903, 12935, 29889, 5182, 511, 13, 4706, 9423, 12935, 29918, 17833, 29889, 2248, 267, 29892, 903, 12935, 29918, 17833, 29889, 11965, 29879, 29892, 903, 12935, 29918, 17833, 29889, 5182, 511, 13, 4706, 9423, 12935, 29918, 1217, 29918, 29873, 4141, 29889, 2248, 267, 29892, 903, 12935, 29918, 1217, 29918, 29873, 4141, 29889, 11965, 29879, 29892, 903, 12935, 29918, 1217, 29918, 29873, 4141, 29889, 5182, 511, 13, 1678, 4514, 13, 29897, 13, 13, 29918, 4381, 29918, 16414, 29918, 1990, 29918, 2080, 29918, 25699, 29918, 2541, 29918, 5464, 29918, 19541, 29918, 5182, 353, 9657, 29898, 13, 1678, 1852, 7039, 543, 2248, 267, 29892, 11965, 29879, 29892, 5182, 613, 13, 1678, 1852, 5975, 11759, 13, 4706, 9423, 12935, 29889, 2248, 267, 29892, 903, 12935, 29889, 11965, 29879, 29892, 903, 12935, 29889, 5182, 511, 13, 4706, 9423, 12935, 29918, 17833, 29889, 2248, 267, 29892, 903, 12935, 29918, 17833, 29889, 11965, 29879, 29892, 903, 12935, 29918, 17833, 29889, 5182, 511, 13, 4706, 9423, 12935, 29918, 1217, 29918, 29873, 4141, 29889, 2248, 267, 29892, 903, 12935, 29918, 1217, 29918, 29873, 4141, 29889, 11965, 29879, 29892, 903, 12935, 29918, 1217, 29918, 29873, 4141, 29889, 5182, 511, 13, 4706, 9423, 12935, 29918, 5464, 29918, 19541, 29889, 2248, 267, 29892, 903, 12935, 29918, 5464, 29918, 19541, 29889, 11965, 29879, 29892, 903, 12935, 29918, 5464, 29918, 19541, 29889, 5182, 511, 13, 1678, 4514, 13, 29897, 13, 13, 29918, 4381, 29918, 16414, 29918, 2220, 284, 29918, 2080, 29918, 25699, 353, 9657, 29898, 13, 1678, 1852, 7039, 543, 11965, 29879, 29892, 5182, 613, 13, 1678, 1852, 5975, 11759, 13, 4706, 9423, 12935, 29889, 11965, 29879, 29892, 903, 12935, 29889, 5182, 511, 13, 4706, 9423, 12935, 29918, 17833, 29889, 11965, 29879, 29892, 903, 12935, 29918, 17833, 29889, 5182, 511, 13, 4706, 9423, 12935, 29918, 1217, 29918, 29873, 4141, 29889, 11965, 29879, 29892, 903, 12935, 29918, 1217, 29918, 29873, 4141, 29889, 5182, 511, 13, 1678, 4514, 13, 29897, 13, 13, 29918, 4381, 29918, 16414, 29918, 2220, 284, 29918, 2080, 29918, 25699, 29918, 2541, 29918, 5464, 29918, 19541, 29918, 5182, 353, 9657, 29898, 13, 1678, 1852, 7039, 543, 11965, 29879, 29892, 5182, 613, 13, 1678, 1852, 5975, 11759, 13, 4706, 9423, 12935, 29889, 11965, 29879, 29892, 903, 12935, 29889, 5182, 511, 13, 4706, 9423, 12935, 29918, 17833, 29889, 11965, 29879, 29892, 903, 12935, 29918, 17833, 29889, 5182, 511, 13, 4706, 9423, 12935, 29918, 1217, 29918, 29873, 4141, 29889, 11965, 29879, 29892, 903, 12935, 29918, 1217, 29918, 29873, 4141, 29889, 5182, 511, 13, 4706, 9423, 12935, 29918, 5464, 29918, 19541, 29889, 11965, 29879, 29892, 903, 12935, 29918, 5464, 29918, 19541, 29889, 5182, 511, 13, 1678, 4514, 13, 29897, 13, 13, 13, 1753, 903, 12523, 29918, 1688, 29918, 1990, 29918, 16414, 29898, 13, 1678, 18111, 29901, 323, 6073, 29892, 13, 1678, 4450, 29879, 29901, 323, 6073, 29892, 13, 1678, 3646, 29901, 323, 6073, 29892, 13, 1678, 12714, 29918, 1990, 29901, 4737, 2200, 29892, 13, 1678, 2643, 29901, 851, 353, 12633, 13, 1678, 12714, 29918, 5085, 29901, 9657, 353, 6213, 29892, 13, 1678, 3682, 29918, 1853, 29901, 5167, 29961, 2451, 29962, 353, 7865, 2392, 29892, 13, 1678, 9049, 5085, 29918, 5504, 29901, 9657, 353, 6213, 29892, 13, 1125, 13, 1678, 9995, 7270, 537, 740, 2599, 12747, 1048, 4072, 29892, 4128, 322, 4436, 29889, 13, 13, 1678, 826, 3174, 29901, 13, 4706, 18111, 29901, 4842, 305, 12489, 411, 18111, 13, 4706, 4450, 29879, 29901, 4842, 305, 12489, 411, 27303, 13, 4706, 3646, 29901, 4842, 305, 12489, 411, 22525, 13, 4706, 12714, 29918, 1990, 29901, 3578, 1076, 12714, 770, 393, 881, 367, 9528, 13, 4706, 2643, 29901, 2643, 393, 3682, 881, 736, 13, 4706, 12714, 29918, 5085, 29901, 6273, 363, 770, 17865, 13, 4706, 3682, 29918, 1853, 29901, 1246, 519, 740, 393, 338, 1304, 363, 10230, 13, 4706, 9049, 5085, 29918, 5504, 29901, 3462, 3245, 13553, 6273, 393, 674, 367, 4502, 411, 18111, 29892, 4450, 29879, 322, 13, 9651, 3646, 746, 2734, 2767, 373, 278, 12714, 29889, 13, 1678, 9995, 13, 1678, 12714, 29918, 5085, 353, 12714, 29918, 5085, 470, 6571, 13, 1678, 9049, 5085, 29918, 5504, 353, 9049, 5085, 29918, 5504, 470, 6571, 13, 1678, 411, 11451, 1688, 29889, 336, 4637, 29898, 11739, 29918, 1853, 29892, 1993, 29922, 4906, 1125, 13, 4706, 12714, 353, 12714, 29918, 1990, 29898, 1068, 16414, 29918, 5085, 29897, 13, 4706, 12714, 29898, 11965, 29879, 29892, 3646, 29892, 18111, 29922, 2248, 267, 29892, 3579, 19290, 29918, 5504, 29897, 13, 13, 13, 1753, 903, 12523, 29918, 1688, 29918, 2220, 284, 29918, 16414, 29898, 13, 1678, 4450, 29879, 29901, 323, 6073, 29892, 13, 1678, 3646, 29901, 323, 6073, 29892, 13, 1678, 12714, 29918, 2220, 284, 29901, 4737, 2200, 29892, 13, 1678, 2643, 29901, 851, 353, 12633, 13, 1678, 3682, 29918, 1853, 29901, 5167, 29961, 2451, 29962, 353, 7865, 2392, 29892, 13, 1678, 9049, 5085, 29918, 5504, 29901, 9657, 353, 6213, 29892, 13, 1125, 13, 1678, 9995, 7270, 537, 740, 2599, 12747, 1048, 4072, 29892, 4128, 322, 4436, 29889, 13, 13, 1678, 826, 3174, 29901, 13, 4706, 4450, 29879, 29901, 4842, 305, 12489, 411, 27303, 13, 4706, 3646, 29901, 4842, 305, 12489, 411, 22525, 13, 4706, 12714, 29918, 2220, 284, 29901, 3578, 1076, 13303, 12714, 393, 881, 367, 9528, 13, 4706, 2643, 29901, 2643, 393, 3682, 881, 736, 13, 4706, 3682, 29918, 1853, 29901, 1246, 519, 740, 393, 338, 1304, 363, 10230, 13, 4706, 9049, 5085, 29918, 5504, 29901, 3462, 3245, 13553, 6273, 393, 674, 367, 4502, 411, 18111, 29892, 4450, 29879, 322, 13, 9651, 3646, 746, 2734, 2767, 373, 278, 12714, 29889, 13, 1678, 9995, 13, 1678, 9049, 5085, 29918, 5504, 353, 9049, 5085, 29918, 5504, 470, 6571, 13, 1678, 411, 11451, 1688, 29889, 336, 4637, 29898, 11739, 29918, 1853, 29892, 1993, 29922, 4906, 1125, 13, 4706, 12714, 29918, 2220, 284, 29898, 11965, 29879, 29892, 3646, 29892, 3579, 19290, 29918, 5504, 29897, 13, 13, 13, 1990, 19338, 791, 10095, 2200, 3057, 261, 29898, 10095, 2200, 3057, 261, 1125, 13, 13, 1678, 822, 1065, 29918, 1990, 29918, 16414, 29918, 1688, 29898, 13, 4706, 1583, 29892, 13, 4706, 270, 6099, 29901, 6120, 29892, 13, 4706, 18111, 29901, 323, 6073, 29892, 13, 4706, 4450, 29879, 29901, 323, 6073, 29892, 13, 4706, 3646, 29901, 323, 6073, 29892, 13, 4706, 12714, 29918, 1990, 29901, 4737, 2200, 29892, 13, 4706, 2071, 29918, 16414, 29901, 8251, 519, 29892, 13, 4706, 1320, 29918, 16593, 29918, 265, 29918, 10568, 29901, 6120, 29892, 13, 4706, 12714, 29918, 5085, 29901, 9657, 29892, 13, 4706, 11837, 29901, 6120, 353, 7700, 29892, 13, 268, 1125, 13, 4706, 903, 808, 29918, 16414, 29918, 1114, 415, 287, 353, 7687, 7373, 26017, 29918, 808, 19668, 29918, 16414, 29892, 12714, 29922, 808, 29918, 16414, 29892, 11837, 29922, 24244, 29892, 3579, 16414, 29918, 5085, 29897, 13, 13, 4706, 2428, 2141, 3389, 29918, 1990, 29918, 16414, 29918, 1688, 29898, 13, 9651, 270, 6099, 29922, 1289, 29886, 29892, 13, 9651, 4450, 29879, 29922, 11965, 29879, 29892, 13, 9651, 3646, 29922, 5182, 29892, 13, 9651, 12714, 29918, 1990, 29922, 16414, 29918, 1990, 29892, 13, 9651, 2071, 29918, 16414, 29922, 29918, 808, 29918, 16414, 29918, 1114, 415, 287, 29892, 13, 9651, 1320, 29918, 16593, 29918, 265, 29918, 10568, 29922, 5721, 29918, 16593, 29918, 265, 29918, 10568, 29892, 13, 9651, 12714, 29918, 5085, 29922, 16414, 29918, 5085, 29892, 13, 9651, 9376, 29918, 19290, 29922, 5574, 29892, 13, 9651, 18111, 29922, 2248, 267, 29892, 29871, 396, 1432, 5684, 2980, 674, 367, 4502, 304, 12714, 29918, 1990, 322, 903, 808, 29918, 16414, 29918, 1114, 415, 287, 13, 4706, 1723, 13, 13, 1678, 822, 1065, 29918, 2220, 284, 29918, 16414, 29918, 1688, 29898, 13, 4706, 1583, 29892, 13, 4706, 4450, 29879, 29901, 323, 6073, 29892, 13, 4706, 3646, 29901, 323, 6073, 29892, 13, 4706, 12714, 29918, 2220, 284, 29901, 8251, 519, 29892, 13, 4706, 2071, 29918, 16414, 29901, 8251, 519, 29892, 13, 4706, 12714, 29918, 5085, 29901, 9657, 29892, 13, 4706, 11837, 29901, 6120, 353, 7700, 29892, 13, 4706, 3579, 19290, 29892, 13, 268, 1125, 13, 4706, 903, 808, 29918, 16414, 29918, 1114, 415, 287, 353, 7687, 7373, 26017, 29918, 808, 19668, 29918, 16414, 29892, 12714, 29922, 808, 29918, 16414, 29892, 11837, 29922, 24244, 29892, 3579, 16414, 29918, 5085, 29897, 13, 13, 4706, 2428, 2141, 3389, 29918, 2220, 284, 29918, 16414, 29918, 1688, 29898, 13, 9651, 4450, 29879, 29922, 11965, 29879, 29892, 13, 9651, 3646, 29922, 5182, 29892, 13, 9651, 12714, 29918, 2220, 284, 29922, 16414, 29918, 2220, 284, 29892, 13, 9651, 2071, 29918, 16414, 29922, 29918, 808, 29918, 16414, 29918, 1114, 415, 287, 29892, 13, 9651, 12714, 29918, 5085, 29922, 16414, 29918, 5085, 29892, 13, 9651, 9376, 29918, 19290, 29922, 5574, 29892, 13, 9651, 3579, 19290, 29892, 13, 4706, 1723, 13, 13, 1678, 822, 1065, 29918, 17990, 2459, 29918, 1688, 29918, 21970, 29898, 13, 4706, 1583, 29892, 13, 4706, 18111, 29901, 323, 6073, 29892, 13, 4706, 4450, 29879, 29901, 323, 6073, 29892, 13, 4706, 3646, 29901, 323, 6073, 29892, 13, 4706, 12714, 29918, 5453, 29901, 4737, 2200, 29892, 13, 4706, 12714, 29918, 2220, 284, 29901, 8251, 519, 29892, 13, 268, 1125, 13, 13, 4706, 822, 12714, 29918, 2220, 284, 29918, 17281, 29918, 2248, 267, 29898, 11965, 29879, 29892, 3646, 29892, 18111, 1125, 13, 9651, 736, 12714, 29918, 2220, 284, 29898, 11965, 29879, 29892, 3646, 29897, 13, 13, 4706, 2428, 2141, 3389, 29918, 17990, 2459, 29918, 1688, 29918, 21970, 29898, 13, 9651, 4450, 29879, 29922, 11965, 29879, 29892, 13, 9651, 3646, 29922, 5182, 29892, 13, 9651, 12714, 29918, 5453, 29922, 16414, 29918, 5453, 29892, 13, 9651, 12714, 29918, 2220, 284, 29922, 16414, 29918, 2220, 284, 29918, 17281, 29918, 2248, 267, 29892, 13, 9651, 12714, 29918, 5085, 3790, 29915, 6310, 29918, 5182, 29918, 2467, 2396, 525, 10052, 16675, 13, 9651, 18111, 29922, 2248, 267, 29892, 29871, 396, 1432, 5684, 2980, 674, 367, 4502, 304, 19338, 791, 23827, 322, 903, 808, 29918, 16414, 29918, 1114, 415, 287, 13, 4706, 1723, 13, 13, 1678, 822, 1065, 29918, 17990, 2459, 29918, 1688, 29918, 29887, 3746, 29898, 13, 4706, 1583, 29892, 13, 4706, 18111, 29901, 323, 6073, 29892, 13, 4706, 4450, 29879, 29901, 323, 6073, 29892, 13, 4706, 3646, 29901, 323, 6073, 29892, 13, 4706, 12714, 29918, 5453, 29901, 4737, 2200, 29892, 13, 4706, 12714, 29918, 2220, 284, 29901, 8251, 519, 29892, 13, 268, 1125, 13, 4706, 565, 451, 4842, 305, 29889, 29883, 6191, 29889, 275, 29918, 16515, 7295, 13, 9651, 11451, 1688, 29889, 11014, 580, 13, 13, 4706, 822, 12714, 29918, 2220, 284, 29918, 17281, 29918, 2248, 267, 29898, 11965, 29879, 29892, 3646, 29892, 18111, 1125, 13, 9651, 736, 12714, 29918, 2220, 284, 29898, 11965, 29879, 29892, 3646, 29897, 13, 13, 4706, 2428, 2141, 3389, 29918, 17990, 2459, 29918, 1688, 29918, 29887, 3746, 29898, 13, 9651, 4450, 29879, 29922, 11965, 29879, 29892, 13, 9651, 3646, 29922, 5182, 29892, 13, 9651, 12714, 29918, 5453, 29922, 16414, 29918, 5453, 29892, 13, 9651, 12714, 29918, 2220, 284, 29922, 16414, 29918, 2220, 284, 29918, 17281, 29918, 2248, 267, 29892, 13, 9651, 12714, 29918, 5085, 3790, 29915, 6310, 29918, 5182, 29918, 2467, 2396, 525, 10052, 16675, 13, 9651, 18111, 29922, 2248, 267, 29892, 29871, 396, 1432, 5684, 2980, 674, 367, 4502, 304, 19338, 791, 23827, 322, 903, 808, 29918, 16414, 29918, 1114, 415, 287, 13, 4706, 1723, 13, 13, 1678, 732, 7959, 5696, 13, 1678, 822, 1065, 29918, 16414, 29918, 1990, 29918, 25699, 29918, 1688, 29898, 13, 4706, 18111, 29901, 323, 6073, 29892, 13, 4706, 4450, 29879, 29901, 323, 6073, 29892, 13, 4706, 3646, 29901, 323, 6073, 29892, 13, 4706, 12714, 29918, 1990, 29901, 4737, 2200, 29892, 13, 4706, 2643, 29901, 851, 353, 12633, 13, 4706, 12714, 29918, 5085, 29901, 9657, 353, 6213, 29892, 13, 4706, 3682, 29918, 1853, 29901, 5167, 29961, 2451, 29962, 353, 7865, 2392, 29892, 13, 4706, 9049, 5085, 29918, 5504, 29901, 9657, 353, 6213, 29892, 13, 268, 1125, 13, 4706, 903, 12523, 29918, 1688, 29918, 1990, 29918, 16414, 29898, 13, 9651, 18111, 29922, 2248, 267, 29892, 13, 9651, 4450, 29879, 29922, 11965, 29879, 29892, 13, 9651, 3646, 29922, 5182, 29892, 13, 9651, 12714, 29918, 1990, 29922, 16414, 29918, 1990, 29892, 13, 9651, 2643, 29922, 4906, 29892, 13, 9651, 12714, 29918, 5085, 29922, 16414, 29918, 5085, 29892, 13, 9651, 3682, 29918, 1853, 29922, 11739, 29918, 1853, 29892, 13, 9651, 3579, 19290, 29918, 5504, 29892, 13, 4706, 1723, 13, 13, 1678, 732, 7959, 5696, 13, 1678, 822, 1065, 29918, 2220, 284, 29918, 16414, 29918, 25699, 29918, 1688, 29898, 13, 4706, 4450, 29879, 29901, 323, 6073, 29892, 13, 4706, 3646, 29901, 323, 6073, 29892, 13, 4706, 12714, 29918, 2220, 284, 29901, 8251, 519, 29892, 13, 4706, 2643, 29901, 851, 353, 12633, 13, 4706, 3682, 29918, 1853, 29901, 5167, 29961, 2451, 29962, 353, 7865, 2392, 29892, 13, 4706, 9049, 5085, 29918, 5504, 29901, 9657, 353, 6213, 29892, 13, 268, 1125, 13, 4706, 903, 12523, 29918, 1688, 29918, 2220, 284, 29918, 16414, 29898, 13, 9651, 4450, 29879, 29922, 11965, 29879, 29892, 13, 9651, 3646, 29922, 5182, 29892, 13, 9651, 12714, 29918, 2220, 284, 29922, 16414, 29918, 2220, 284, 29892, 13, 9651, 2643, 29922, 4906, 29892, 13, 9651, 3682, 29918, 1853, 29922, 11739, 29918, 1853, 29892, 13, 9651, 9049, 5085, 29918, 5504, 29922, 19290, 29918, 5504, 29892, 13, 4706, 1723, 13, 2 ]
mmdet-v2/tools/__tmp__/3.py
li-phone/DetectionCompetition
0
113963
<filename>mmdet-v2/tools/__tmp__/3.py<gh_stars>0 import collections def equ(C1, C2): for k1, v1 in C1.items(): if k1 not in C2 or C1[k1] != C2[k1]: return False return True while True: try: n, m = list(map(int, input().split())) Ai = list(map(int, input().split())) Bi = list(map(int, input().split())) res = [] for a in set(Ai): for b in set(Bi): x = b + m - a Ci = [(_ + x) % m for _ in Ai] C1 = dict(collections.Counter(Ci)) C2 = dict(collections.Counter(Bi)) if equ(C1, C2): res.append(x) print(min(res)) except EOFError: break
[ 1, 529, 9507, 29958, 29885, 3487, 300, 29899, 29894, 29906, 29914, 8504, 29914, 1649, 7050, 1649, 29914, 29941, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 5215, 16250, 13, 13, 13, 1753, 1592, 29898, 29907, 29896, 29892, 315, 29906, 1125, 13, 1678, 363, 413, 29896, 29892, 325, 29896, 297, 315, 29896, 29889, 7076, 7295, 13, 4706, 565, 413, 29896, 451, 297, 315, 29906, 470, 315, 29896, 29961, 29895, 29896, 29962, 2804, 315, 29906, 29961, 29895, 29896, 5387, 13, 9651, 736, 7700, 13, 1678, 736, 5852, 13, 13, 13, 8000, 5852, 29901, 13, 1678, 1018, 29901, 13, 4706, 302, 29892, 286, 353, 1051, 29898, 1958, 29898, 524, 29892, 1881, 2141, 5451, 22130, 13, 4706, 319, 29875, 353, 1051, 29898, 1958, 29898, 524, 29892, 1881, 2141, 5451, 22130, 13, 4706, 3457, 353, 1051, 29898, 1958, 29898, 524, 29892, 1881, 2141, 5451, 22130, 13, 4706, 620, 353, 5159, 13, 4706, 363, 263, 297, 731, 29898, 29909, 29875, 1125, 13, 9651, 363, 289, 297, 731, 29898, 20517, 1125, 13, 18884, 921, 353, 289, 718, 286, 448, 263, 13, 18884, 11402, 353, 518, 7373, 718, 921, 29897, 1273, 286, 363, 903, 297, 319, 29875, 29962, 13, 18884, 315, 29896, 353, 9657, 29898, 29027, 29889, 17779, 29898, 29907, 29875, 876, 13, 18884, 315, 29906, 353, 9657, 29898, 29027, 29889, 17779, 29898, 20517, 876, 13, 18884, 565, 1592, 29898, 29907, 29896, 29892, 315, 29906, 1125, 13, 462, 1678, 620, 29889, 4397, 29898, 29916, 29897, 13, 4706, 1596, 29898, 1195, 29898, 690, 876, 13, 13, 1678, 5174, 382, 9800, 2392, 29901, 13, 4706, 2867, 13, 2 ]
gnuradio-3.7.13.4/gr-wxgui/python/wxgui/stdgui2.py
v1259397/cosmic-gnuradio
1
1614416
# # Copyright 2004 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. # # GNU Radio 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 GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. # '''A simple wx gui for GNU Radio applications''' import ctypes import wx import sys from gnuradio import gr class stdapp (wx.App): def __init__ (self, top_block_maker, title="GNU Radio", nstatus=2, max_noutput_items=None): self.top_block_maker = top_block_maker self.title = title self._nstatus = nstatus self._max_noutput_items = max_noutput_items # If we're on Linux, also enable multi-threading Xlib access if sys.platform.startswith('linux'): try: x11 = ctypes.cdll.LoadLibrary('libX11.so') x11.XInitThreads() except: print "Warning: failed to XInitThreads()" # All our initialization must come before calling wx.App.__init__. # OnInit is called from somewhere in the guts of __init__. wx.App.__init__ (self, redirect=False) def OnInit (self): frame = stdframe (self.top_block_maker, self.title, self._nstatus) frame.Show (True) self.SetTopWindow (frame) if(self._max_noutput_items is not None): frame.top_block().start (self._max_noutput_items) else: frame.top_block().start () return True class stdframe (wx.Frame): def __init__ (self, top_block_maker, title="GNU Radio", nstatus=2): # print "stdframe.__init__" wx.Frame.__init__(self, None, -1, title) self.CreateStatusBar (nstatus) mainmenu = wx.MenuBar () menu = wx.Menu () item = menu.Append (200, 'E&xit', 'Exit') self.Bind (wx.EVT_MENU, self.OnCloseWindow, item) mainmenu.Append (menu, "&File") self.SetMenuBar (mainmenu) self.Bind (wx.EVT_CLOSE, self.OnCloseWindow) self.panel = stdpanel (self, self, top_block_maker) vbox = wx.BoxSizer(wx.VERTICAL) vbox.Add(self.panel, 1, wx.EXPAND) self.SetSizer(vbox) self.SetAutoLayout(True) vbox.Fit(self) def OnCloseWindow (self, event): self.top_block().stop() self.top_block().wait() self.Destroy () def top_block (self): return self.panel.top_block class stdpanel (wx.Panel): def __init__ (self, parent, frame, top_block_maker): # print "stdpanel.__init__" wx.Panel.__init__ (self, parent, -1) self.frame = frame vbox = wx.BoxSizer (wx.VERTICAL) self.top_block = top_block_maker (frame, self, vbox, sys.argv) self.SetSizer (vbox) self.SetAutoLayout (True) vbox.Fit (self) class std_top_block (gr.top_block): def __init__ (self, parent, panel, vbox, argv): # Call the hier_block2 constructor # Top blocks have no inputs and outputs gr.top_block.__init__(self, "std_top_block")
[ 1, 396, 13, 29937, 14187, 1266, 29871, 29906, 29900, 29900, 29946, 12362, 18540, 10606, 29892, 9266, 29889, 13, 29937, 13, 29937, 910, 934, 338, 760, 310, 15143, 9204, 13, 29937, 13, 29937, 15143, 9204, 338, 3889, 7047, 29936, 366, 508, 2654, 391, 2666, 372, 322, 29914, 272, 6623, 13, 29937, 372, 1090, 278, 4958, 310, 278, 15143, 4593, 5236, 19245, 408, 6369, 491, 13, 29937, 278, 12362, 18540, 10606, 29936, 2845, 1873, 29871, 29941, 29892, 470, 313, 271, 596, 2984, 29897, 13, 29937, 738, 2678, 1873, 29889, 13, 29937, 13, 29937, 15143, 9204, 338, 13235, 297, 278, 4966, 393, 372, 674, 367, 5407, 29892, 13, 29937, 541, 399, 1806, 8187, 2692, 13764, 29979, 399, 1718, 29934, 13566, 29979, 29936, 1728, 1584, 278, 2411, 2957, 1370, 21867, 29891, 310, 13, 29937, 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, 15143, 4593, 5236, 19245, 363, 901, 4902, 29889, 13, 29937, 13, 29937, 887, 881, 505, 4520, 263, 3509, 310, 278, 15143, 4593, 5236, 19245, 13, 29937, 3412, 411, 15143, 9204, 29936, 1074, 278, 934, 315, 4590, 29979, 4214, 29889, 29871, 960, 451, 29892, 2436, 304, 13, 29937, 278, 12362, 18540, 10606, 29892, 9266, 1696, 29871, 29945, 29896, 21504, 7103, 29892, 13, 29937, 12115, 29892, 14861, 29871, 29900, 29906, 29896, 29896, 29900, 29899, 29896, 29941, 29900, 29896, 29892, 8278, 29889, 13, 29937, 13, 13, 12008, 29909, 2560, 26437, 1410, 29875, 363, 15143, 9204, 8324, 12008, 13, 13, 5215, 274, 8768, 13, 5215, 26437, 13, 5215, 10876, 13, 3166, 330, 29876, 332, 328, 601, 1053, 867, 13, 13, 13, 1990, 3659, 932, 313, 23310, 29889, 2052, 1125, 13, 1678, 822, 4770, 2344, 1649, 313, 1311, 29892, 2246, 29918, 1271, 29918, 28107, 29892, 3611, 543, 29954, 11601, 9204, 613, 302, 4882, 29922, 29906, 29892, 13, 462, 29871, 4236, 29918, 29876, 4905, 29918, 7076, 29922, 8516, 1125, 13, 4706, 1583, 29889, 3332, 29918, 1271, 29918, 28107, 353, 2246, 29918, 1271, 29918, 28107, 13, 4706, 1583, 29889, 3257, 353, 3611, 13, 4706, 1583, 3032, 29876, 4882, 353, 302, 4882, 13, 4706, 1583, 3032, 3317, 29918, 29876, 4905, 29918, 7076, 353, 4236, 29918, 29876, 4905, 29918, 7076, 13, 4706, 396, 960, 591, 29915, 276, 373, 8074, 29892, 884, 9025, 2473, 29899, 7097, 292, 1060, 1982, 2130, 13, 4706, 565, 10876, 29889, 12120, 29889, 27382, 2541, 877, 9389, 29374, 13, 9651, 1018, 29901, 13, 18884, 921, 29896, 29896, 353, 274, 8768, 29889, 2252, 645, 29889, 5896, 12284, 877, 1982, 29990, 29896, 29896, 29889, 578, 1495, 13, 18884, 921, 29896, 29896, 29889, 29990, 6644, 4899, 29879, 580, 13, 9651, 5174, 29901, 13, 18884, 1596, 376, 22709, 29901, 5229, 304, 1060, 6644, 4899, 29879, 25318, 13, 4706, 396, 2178, 1749, 17865, 1818, 2041, 1434, 5432, 26437, 29889, 2052, 17255, 2344, 26914, 13, 4706, 396, 1551, 6644, 338, 2000, 515, 9051, 297, 278, 330, 8842, 310, 4770, 2344, 26914, 13, 4706, 26437, 29889, 2052, 17255, 2344, 1649, 313, 1311, 29892, 6684, 29922, 8824, 29897, 13, 13, 1678, 822, 1551, 6644, 313, 1311, 1125, 13, 4706, 3515, 353, 3659, 2557, 313, 1311, 29889, 3332, 29918, 1271, 29918, 28107, 29892, 1583, 29889, 3257, 29892, 1583, 3032, 29876, 4882, 29897, 13, 4706, 3515, 29889, 8964, 313, 5574, 29897, 13, 4706, 1583, 29889, 2697, 7031, 5907, 313, 2557, 29897, 13, 13, 4706, 565, 29898, 1311, 3032, 3317, 29918, 29876, 4905, 29918, 7076, 338, 451, 6213, 1125, 13, 9651, 3515, 29889, 3332, 29918, 1271, 2141, 2962, 313, 1311, 3032, 3317, 29918, 29876, 4905, 29918, 7076, 29897, 13, 4706, 1683, 29901, 13, 9651, 3515, 29889, 3332, 29918, 1271, 2141, 2962, 3861, 13, 13, 4706, 736, 5852, 13, 13, 13, 1990, 3659, 2557, 313, 23310, 29889, 4308, 1125, 13, 1678, 822, 4770, 2344, 1649, 313, 1311, 29892, 2246, 29918, 1271, 29918, 28107, 29892, 3611, 543, 29954, 11601, 9204, 613, 302, 4882, 29922, 29906, 1125, 13, 4706, 396, 1596, 376, 4172, 2557, 17255, 2344, 1649, 29908, 13, 4706, 26437, 29889, 4308, 17255, 2344, 12035, 1311, 29892, 6213, 29892, 448, 29896, 29892, 3611, 29897, 13, 13, 4706, 1583, 29889, 4391, 5709, 4297, 313, 29876, 4882, 29897, 13, 4706, 1667, 6510, 353, 26437, 29889, 6823, 4297, 3861, 13, 13, 4706, 6143, 353, 26437, 29889, 6823, 3861, 13, 4706, 2944, 353, 6143, 29889, 18277, 313, 29906, 29900, 29900, 29892, 525, 29923, 29987, 29916, 277, 742, 525, 24365, 1495, 13, 4706, 1583, 29889, 15708, 313, 23310, 29889, 22240, 29911, 29918, 29924, 1430, 29965, 29892, 1583, 29889, 2951, 11123, 5907, 29892, 2944, 29897, 13, 4706, 1667, 6510, 29889, 18277, 313, 6510, 29892, 376, 29987, 2283, 1159, 13, 4706, 1583, 29889, 2697, 6823, 4297, 313, 3396, 6510, 29897, 13, 13, 4706, 1583, 29889, 15708, 313, 23310, 29889, 22240, 29911, 29918, 29907, 3927, 1660, 29892, 1583, 29889, 2951, 11123, 5907, 29897, 13, 4706, 1583, 29889, 15119, 353, 3659, 15119, 313, 1311, 29892, 1583, 29892, 2246, 29918, 1271, 29918, 28107, 29897, 13, 4706, 325, 1884, 353, 26437, 29889, 3313, 29903, 3950, 29898, 23310, 29889, 5348, 29911, 2965, 1964, 29897, 13, 4706, 325, 1884, 29889, 2528, 29898, 1311, 29889, 15119, 29892, 29871, 29896, 29892, 26437, 29889, 5746, 29925, 9468, 29897, 13, 4706, 1583, 29889, 2697, 29903, 3950, 29898, 29894, 1884, 29897, 13, 4706, 1583, 29889, 2697, 12300, 3453, 29898, 5574, 29897, 13, 4706, 325, 1884, 29889, 29943, 277, 29898, 1311, 29897, 13, 13, 1678, 822, 1551, 11123, 5907, 313, 1311, 29892, 1741, 1125, 13, 4706, 1583, 29889, 3332, 29918, 1271, 2141, 9847, 580, 13, 4706, 1583, 29889, 3332, 29918, 1271, 2141, 10685, 580, 13, 4706, 1583, 29889, 14994, 4727, 3861, 13, 13, 1678, 822, 2246, 29918, 1271, 313, 1311, 1125, 13, 4706, 736, 1583, 29889, 15119, 29889, 3332, 29918, 1271, 13, 13, 1990, 3659, 15119, 313, 23310, 29889, 7490, 1125, 13, 1678, 822, 4770, 2344, 1649, 313, 1311, 29892, 3847, 29892, 3515, 29892, 2246, 29918, 1271, 29918, 28107, 1125, 13, 4706, 396, 1596, 376, 4172, 15119, 17255, 2344, 1649, 29908, 13, 4706, 26437, 29889, 7490, 17255, 2344, 1649, 313, 1311, 29892, 3847, 29892, 448, 29896, 29897, 13, 4706, 1583, 29889, 2557, 353, 3515, 13, 13, 4706, 325, 1884, 353, 26437, 29889, 3313, 29903, 3950, 313, 23310, 29889, 5348, 29911, 2965, 1964, 29897, 13, 4706, 1583, 29889, 3332, 29918, 1271, 353, 2246, 29918, 1271, 29918, 28107, 313, 2557, 29892, 1583, 29892, 325, 1884, 29892, 10876, 29889, 19218, 29897, 13, 4706, 1583, 29889, 2697, 29903, 3950, 313, 29894, 1884, 29897, 13, 4706, 1583, 29889, 2697, 12300, 3453, 313, 5574, 29897, 13, 4706, 325, 1884, 29889, 29943, 277, 313, 1311, 29897, 13, 13, 1990, 3659, 29918, 3332, 29918, 1271, 313, 629, 29889, 3332, 29918, 1271, 1125, 13, 1678, 822, 4770, 2344, 1649, 313, 1311, 29892, 3847, 29892, 9451, 29892, 325, 1884, 29892, 1852, 29894, 1125, 13, 4706, 396, 8251, 278, 6128, 29918, 1271, 29906, 5823, 13, 4706, 396, 7488, 10930, 505, 694, 10970, 322, 14391, 13, 4706, 867, 29889, 3332, 29918, 1271, 17255, 2344, 12035, 1311, 29892, 376, 4172, 29918, 3332, 29918, 1271, 1159, 13, 2 ]
ansys/dpf/core/operators/logic/identical_fc.py
TheGoldfish01/pydpf-core
11
40214
<reponame>TheGoldfish01/pydpf-core """ identical_fc ============ """ from ansys.dpf.core.dpf_operator import Operator from ansys.dpf.core.inputs import Input, _Inputs from ansys.dpf.core.outputs import Output, _Outputs, _modify_output_spec_with_one_type from ansys.dpf.core.operators.specification import PinSpecification, Specification """Operators from Ans.Dpf.Native plugin, from "logic" category """ class identical_fc(Operator): """Check if two fields container are identical. available inputs: - fields_containerA (FieldsContainer) - fields_containerB (FieldsContainer) - tolerance (float) - small_value (float) available outputs: - boolean (bool) - message (str) Examples -------- >>> from ansys.dpf import core as dpf >>> # Instantiate operator >>> op = dpf.operators.logic.identical_fc() >>> # Make input connections >>> my_fields_containerA = dpf.FieldsContainer() >>> op.inputs.fields_containerA.connect(my_fields_containerA) >>> my_fields_containerB = dpf.FieldsContainer() >>> op.inputs.fields_containerB.connect(my_fields_containerB) >>> my_tolerance = float() >>> op.inputs.tolerance.connect(my_tolerance) >>> my_small_value = float() >>> op.inputs.small_value.connect(my_small_value) >>> # Instantiate operator and connect inputs in one line >>> op = dpf.operators.logic.identical_fc(fields_containerA=my_fields_containerA,fields_containerB=my_fields_containerB,tolerance=my_tolerance,small_value=my_small_value) >>> # Get output data >>> result_boolean = op.outputs.boolean() >>> result_message = op.outputs.message()""" def __init__(self, fields_containerA=None, fields_containerB=None, tolerance=None, small_value=None, config=None, server=None): super().__init__(name="AreFieldsIdentical_fc", config = config, server = server) self._inputs = InputsIdenticalFc(self) self._outputs = OutputsIdenticalFc(self) if fields_containerA !=None: self.inputs.fields_containerA.connect(fields_containerA) if fields_containerB !=None: self.inputs.fields_containerB.connect(fields_containerB) if tolerance !=None: self.inputs.tolerance.connect(tolerance) if small_value !=None: self.inputs.small_value.connect(small_value) @staticmethod def _spec(): spec = Specification(description="""Check if two fields container are identical.""", map_input_pin_spec={ 0 : PinSpecification(name = "fields_containerA", type_names=["fields_container"], optional=False, document=""""""), 1 : PinSpecification(name = "fields_containerB", type_names=["fields_container"], optional=False, document=""""""), 2 : PinSpecification(name = "tolerance", type_names=["double"], optional=False, document="""Double relative tolerance. Maximum tolerance gap between to compared values: values within relative tolerance are considered identical (v1-v2)/v2 < relativeTol (default is 0.001)."""), 3 : PinSpecification(name = "small_value", type_names=["double"], optional=False, document="""Double positive small value.Smallest value which will be considered during the comparison step : all the abs(values) in field less than this value is considered as null, (default value:1.0e-14).""")}, map_output_pin_spec={ 0 : PinSpecification(name = "boolean", type_names=["bool"], optional=False, document="""bool (true if identical...)"""), 1 : PinSpecification(name = "message", type_names=["string"], optional=False, document="""""")}) return spec @staticmethod def default_config(): return Operator.default_config(name = "AreFieldsIdentical_fc") @property def inputs(self): """Enables to connect inputs to the operator Returns -------- inputs : InputsIdenticalFc """ return super().inputs @property def outputs(self): """Enables to get outputs of the operator by evaluationg it Returns -------- outputs : OutputsIdenticalFc """ return super().outputs #internal name: AreFieldsIdentical_fc #scripting name: identical_fc class InputsIdenticalFc(_Inputs): """Intermediate class used to connect user inputs to identical_fc operator Examples -------- >>> from ansys.dpf import core as dpf >>> op = dpf.operators.logic.identical_fc() >>> my_fields_containerA = dpf.FieldsContainer() >>> op.inputs.fields_containerA.connect(my_fields_containerA) >>> my_fields_containerB = dpf.FieldsContainer() >>> op.inputs.fields_containerB.connect(my_fields_containerB) >>> my_tolerance = float() >>> op.inputs.tolerance.connect(my_tolerance) >>> my_small_value = float() >>> op.inputs.small_value.connect(my_small_value) """ def __init__(self, op: Operator): super().__init__(identical_fc._spec().inputs, op) self._fields_containerA = Input(identical_fc._spec().input_pin(0), 0, op, -1) self._inputs.append(self._fields_containerA) self._fields_containerB = Input(identical_fc._spec().input_pin(1), 1, op, -1) self._inputs.append(self._fields_containerB) self._tolerance = Input(identical_fc._spec().input_pin(2), 2, op, -1) self._inputs.append(self._tolerance) self._small_value = Input(identical_fc._spec().input_pin(3), 3, op, -1) self._inputs.append(self._small_value) @property def fields_containerA(self): """Allows to connect fields_containerA input to the operator Parameters ---------- my_fields_containerA : FieldsContainer, Examples -------- >>> from ansys.dpf import core as dpf >>> op = dpf.operators.logic.identical_fc() >>> op.inputs.fields_containerA.connect(my_fields_containerA) >>> #or >>> op.inputs.fields_containerA(my_fields_containerA) """ return self._fields_containerA @property def fields_containerB(self): """Allows to connect fields_containerB input to the operator Parameters ---------- my_fields_containerB : FieldsContainer, Examples -------- >>> from ansys.dpf import core as dpf >>> op = dpf.operators.logic.identical_fc() >>> op.inputs.fields_containerB.connect(my_fields_containerB) >>> #or >>> op.inputs.fields_containerB(my_fields_containerB) """ return self._fields_containerB @property def tolerance(self): """Allows to connect tolerance input to the operator - pindoc: Double relative tolerance. Maximum tolerance gap between to compared values: values within relative tolerance are considered identical (v1-v2)/v2 < relativeTol (default is 0.001). Parameters ---------- my_tolerance : float, Examples -------- >>> from ansys.dpf import core as dpf >>> op = dpf.operators.logic.identical_fc() >>> op.inputs.tolerance.connect(my_tolerance) >>> #or >>> op.inputs.tolerance(my_tolerance) """ return self._tolerance @property def small_value(self): """Allows to connect small_value input to the operator - pindoc: Double positive small value.Smallest value which will be considered during the comparison step : all the abs(values) in field less than this value is considered as null, (default value:1.0e-14). Parameters ---------- my_small_value : float, Examples -------- >>> from ansys.dpf import core as dpf >>> op = dpf.operators.logic.identical_fc() >>> op.inputs.small_value.connect(my_small_value) >>> #or >>> op.inputs.small_value(my_small_value) """ return self._small_value class OutputsIdenticalFc(_Outputs): """Intermediate class used to get outputs from identical_fc operator Examples -------- >>> from ansys.dpf import core as dpf >>> op = dpf.operators.logic.identical_fc() >>> # Connect inputs : op.inputs. ... >>> result_boolean = op.outputs.boolean() >>> result_message = op.outputs.message() """ def __init__(self, op: Operator): super().__init__(identical_fc._spec().outputs, op) self._boolean = Output(identical_fc._spec().output_pin(0), 0, op) self._outputs.append(self._boolean) self._message = Output(identical_fc._spec().output_pin(1), 1, op) self._outputs.append(self._message) @property def boolean(self): """Allows to get boolean output of the operator - pindoc: bool (true if identical...) Returns ---------- my_boolean : bool, Examples -------- >>> from ansys.dpf import core as dpf >>> op = dpf.operators.logic.identical_fc() >>> # Connect inputs : op.inputs. ... >>> result_boolean = op.outputs.boolean() """ return self._boolean @property def message(self): """Allows to get message output of the operator Returns ---------- my_message : str, Examples -------- >>> from ansys.dpf import core as dpf >>> op = dpf.operators.logic.identical_fc() >>> # Connect inputs : op.inputs. ... >>> result_message = op.outputs.message() """ return self._message
[ 1, 529, 276, 1112, 420, 29958, 1576, 29954, 1025, 15161, 29900, 29896, 29914, 2272, 6099, 29888, 29899, 3221, 13, 15945, 29908, 13, 1693, 936, 29918, 13801, 13, 4936, 2751, 13, 15945, 29908, 13, 3166, 6063, 952, 29889, 6099, 29888, 29889, 3221, 29889, 6099, 29888, 29918, 6891, 1053, 6607, 1061, 13, 3166, 6063, 952, 29889, 6099, 29888, 29889, 3221, 29889, 2080, 29879, 1053, 10567, 29892, 903, 4290, 29879, 13, 3166, 6063, 952, 29889, 6099, 29888, 29889, 3221, 29889, 4905, 29879, 1053, 10604, 29892, 903, 6466, 29879, 29892, 903, 1545, 1598, 29918, 4905, 29918, 6550, 29918, 2541, 29918, 650, 29918, 1853, 13, 3166, 6063, 952, 29889, 6099, 29888, 29889, 3221, 29889, 3372, 4097, 29889, 6550, 2450, 1053, 17434, 10299, 2450, 29892, 12048, 2450, 13, 13, 15945, 29908, 7094, 4097, 515, 21877, 29889, 29928, 7810, 29889, 11024, 7079, 29892, 515, 376, 19227, 29908, 7663, 13, 15945, 29908, 13, 13, 1990, 13557, 29918, 13801, 29898, 26486, 1125, 13, 1678, 9995, 5596, 565, 1023, 4235, 5639, 526, 13557, 29889, 13, 13, 418, 3625, 10970, 29901, 13, 4706, 448, 4235, 29918, 7611, 29909, 313, 14256, 7895, 29897, 13, 4706, 448, 4235, 29918, 7611, 29933, 313, 14256, 7895, 29897, 13, 4706, 448, 20341, 749, 313, 7411, 29897, 13, 4706, 448, 2319, 29918, 1767, 313, 7411, 29897, 13, 13, 418, 3625, 14391, 29901, 13, 4706, 448, 7223, 313, 11227, 29897, 13, 4706, 448, 2643, 313, 710, 29897, 13, 13, 418, 1222, 9422, 13, 418, 448, 26589, 13, 418, 8653, 515, 6063, 952, 29889, 6099, 29888, 1053, 7136, 408, 270, 7810, 13, 13, 418, 8653, 396, 2799, 3656, 403, 5455, 13, 418, 8653, 1015, 353, 270, 7810, 29889, 3372, 4097, 29889, 19227, 29889, 1693, 936, 29918, 13801, 580, 13, 13, 418, 8653, 396, 8561, 1881, 12368, 13, 418, 8653, 590, 29918, 9621, 29918, 7611, 29909, 353, 270, 7810, 29889, 14256, 7895, 580, 13, 418, 8653, 1015, 29889, 2080, 29879, 29889, 9621, 29918, 7611, 29909, 29889, 6915, 29898, 1357, 29918, 9621, 29918, 7611, 29909, 29897, 13, 418, 8653, 590, 29918, 9621, 29918, 7611, 29933, 353, 270, 7810, 29889, 14256, 7895, 580, 13, 418, 8653, 1015, 29889, 2080, 29879, 29889, 9621, 29918, 7611, 29933, 29889, 6915, 29898, 1357, 29918, 9621, 29918, 7611, 29933, 29897, 13, 418, 8653, 590, 29918, 25027, 261, 749, 353, 5785, 580, 13, 418, 8653, 1015, 29889, 2080, 29879, 29889, 25027, 261, 749, 29889, 6915, 29898, 1357, 29918, 25027, 261, 749, 29897, 13, 418, 8653, 590, 29918, 9278, 29918, 1767, 353, 5785, 580, 13, 418, 8653, 1015, 29889, 2080, 29879, 29889, 9278, 29918, 1767, 29889, 6915, 29898, 1357, 29918, 9278, 29918, 1767, 29897, 13, 13, 418, 8653, 396, 2799, 3656, 403, 5455, 322, 4511, 10970, 297, 697, 1196, 13, 418, 8653, 1015, 353, 270, 7810, 29889, 3372, 4097, 29889, 19227, 29889, 1693, 936, 29918, 13801, 29898, 9621, 29918, 7611, 29909, 29922, 1357, 29918, 9621, 29918, 7611, 29909, 29892, 9621, 29918, 7611, 29933, 29922, 1357, 29918, 9621, 29918, 7611, 29933, 29892, 25027, 261, 749, 29922, 1357, 29918, 25027, 261, 749, 29892, 9278, 29918, 1767, 29922, 1357, 29918, 9278, 29918, 1767, 29897, 13, 13, 418, 8653, 396, 3617, 1962, 848, 13, 418, 8653, 1121, 29918, 20054, 353, 1015, 29889, 4905, 29879, 29889, 20054, 580, 13, 418, 8653, 1121, 29918, 4906, 353, 1015, 29889, 4905, 29879, 29889, 4906, 580, 15945, 29908, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 4235, 29918, 7611, 29909, 29922, 8516, 29892, 4235, 29918, 7611, 29933, 29922, 8516, 29892, 20341, 749, 29922, 8516, 29892, 2319, 29918, 1767, 29922, 8516, 29892, 2295, 29922, 8516, 29892, 1923, 29922, 8516, 1125, 13, 4706, 2428, 2141, 1649, 2344, 12035, 978, 543, 17506, 14256, 7648, 936, 29918, 13801, 613, 2295, 353, 2295, 29892, 1923, 353, 1923, 29897, 13, 4706, 1583, 3032, 2080, 29879, 353, 10567, 29879, 7648, 936, 29943, 29883, 29898, 1311, 29897, 13, 4706, 1583, 3032, 4905, 29879, 353, 10604, 29879, 7648, 936, 29943, 29883, 29898, 1311, 29897, 13, 4706, 565, 4235, 29918, 7611, 29909, 2804, 8516, 29901, 13, 9651, 1583, 29889, 2080, 29879, 29889, 9621, 29918, 7611, 29909, 29889, 6915, 29898, 9621, 29918, 7611, 29909, 29897, 13, 4706, 565, 4235, 29918, 7611, 29933, 2804, 8516, 29901, 13, 9651, 1583, 29889, 2080, 29879, 29889, 9621, 29918, 7611, 29933, 29889, 6915, 29898, 9621, 29918, 7611, 29933, 29897, 13, 4706, 565, 20341, 749, 2804, 8516, 29901, 13, 9651, 1583, 29889, 2080, 29879, 29889, 25027, 261, 749, 29889, 6915, 29898, 25027, 261, 749, 29897, 13, 4706, 565, 2319, 29918, 1767, 2804, 8516, 29901, 13, 9651, 1583, 29889, 2080, 29879, 29889, 9278, 29918, 1767, 29889, 6915, 29898, 9278, 29918, 1767, 29897, 13, 13, 1678, 732, 7959, 5696, 13, 1678, 822, 903, 6550, 7295, 13, 4706, 1580, 353, 12048, 2450, 29898, 8216, 13776, 29908, 5596, 565, 1023, 4235, 5639, 526, 13557, 1213, 29908, 613, 13, 462, 632, 2910, 29918, 2080, 29918, 12687, 29918, 6550, 3790, 13, 462, 462, 29871, 29900, 584, 17434, 10299, 2450, 29898, 978, 353, 376, 9621, 29918, 7611, 29909, 613, 1134, 29918, 7039, 29922, 3366, 9621, 29918, 7611, 12436, 13136, 29922, 8824, 29892, 1842, 13776, 15945, 29908, 4968, 29871, 13, 462, 462, 29871, 29896, 584, 17434, 10299, 2450, 29898, 978, 353, 376, 9621, 29918, 7611, 29933, 613, 1134, 29918, 7039, 29922, 3366, 9621, 29918, 7611, 12436, 13136, 29922, 8824, 29892, 1842, 13776, 15945, 29908, 4968, 29871, 13, 462, 462, 29871, 29906, 584, 17434, 10299, 2450, 29898, 978, 353, 376, 25027, 261, 749, 613, 1134, 29918, 7039, 29922, 3366, 8896, 12436, 13136, 29922, 8824, 29892, 1842, 13776, 29908, 11843, 6198, 20341, 749, 29889, 5918, 12539, 20341, 749, 17261, 1546, 304, 9401, 1819, 29901, 1819, 2629, 6198, 20341, 749, 526, 5545, 13557, 313, 29894, 29896, 29899, 29894, 29906, 6802, 29894, 29906, 529, 6198, 29911, 324, 313, 4381, 338, 29871, 29900, 29889, 29900, 29900, 29896, 467, 15945, 4968, 29871, 13, 462, 462, 29871, 29941, 584, 17434, 10299, 2450, 29898, 978, 353, 376, 9278, 29918, 1767, 613, 1134, 29918, 7039, 29922, 3366, 8896, 12436, 13136, 29922, 8824, 29892, 1842, 13776, 29908, 11843, 6374, 2319, 995, 29889, 12636, 497, 342, 995, 607, 674, 367, 5545, 2645, 278, 10230, 4331, 584, 599, 278, 6425, 29898, 5975, 29897, 297, 1746, 3109, 1135, 445, 995, 338, 5545, 408, 1870, 29892, 313, 4381, 995, 29901, 29896, 29889, 29900, 29872, 29899, 29896, 29946, 467, 15945, 1159, 1118, 13, 462, 632, 2910, 29918, 4905, 29918, 12687, 29918, 6550, 3790, 13, 462, 462, 29871, 29900, 584, 17434, 10299, 2450, 29898, 978, 353, 376, 20054, 613, 1134, 29918, 7039, 29922, 3366, 11227, 12436, 13136, 29922, 8824, 29892, 1842, 13776, 29908, 11227, 313, 3009, 565, 13557, 856, 5513, 29908, 4968, 29871, 13, 462, 462, 29871, 29896, 584, 17434, 10299, 2450, 29898, 978, 353, 376, 4906, 613, 1134, 29918, 7039, 29922, 3366, 1807, 12436, 13136, 29922, 8824, 29892, 1842, 13776, 15945, 29908, 1159, 1800, 13, 4706, 736, 1580, 13, 13, 13, 1678, 732, 7959, 5696, 13, 1678, 822, 2322, 29918, 2917, 7295, 13, 4706, 736, 6607, 1061, 29889, 4381, 29918, 2917, 29898, 978, 353, 376, 17506, 14256, 7648, 936, 29918, 13801, 1159, 13, 13, 1678, 732, 6799, 13, 1678, 822, 10970, 29898, 1311, 1125, 13, 4706, 9995, 2369, 1849, 304, 4511, 10970, 304, 278, 5455, 13, 13, 4706, 16969, 13, 4706, 448, 26589, 13, 4706, 10970, 584, 10567, 29879, 7648, 936, 29943, 29883, 29871, 13, 4706, 9995, 13, 4706, 736, 2428, 2141, 2080, 29879, 13, 13, 13, 1678, 732, 6799, 13, 1678, 822, 14391, 29898, 1311, 1125, 13, 4706, 9995, 2369, 1849, 304, 679, 14391, 310, 278, 5455, 491, 17983, 29887, 372, 13, 13, 4706, 16969, 13, 4706, 448, 26589, 13, 4706, 14391, 584, 10604, 29879, 7648, 936, 29943, 29883, 29871, 13, 4706, 9995, 13, 4706, 736, 2428, 2141, 4905, 29879, 13, 13, 13, 29937, 7564, 1024, 29901, 4683, 14256, 7648, 936, 29918, 13801, 13, 29937, 2154, 292, 1024, 29901, 13557, 29918, 13801, 13, 1990, 10567, 29879, 7648, 936, 29943, 29883, 7373, 4290, 29879, 1125, 13, 1678, 9995, 4074, 13847, 770, 1304, 304, 4511, 1404, 10970, 304, 13557, 29918, 13801, 5455, 13, 13, 418, 1222, 9422, 13, 418, 448, 26589, 13, 418, 8653, 515, 6063, 952, 29889, 6099, 29888, 1053, 7136, 408, 270, 7810, 13, 13, 418, 8653, 1015, 353, 270, 7810, 29889, 3372, 4097, 29889, 19227, 29889, 1693, 936, 29918, 13801, 580, 13, 418, 8653, 590, 29918, 9621, 29918, 7611, 29909, 353, 270, 7810, 29889, 14256, 7895, 580, 13, 418, 8653, 1015, 29889, 2080, 29879, 29889, 9621, 29918, 7611, 29909, 29889, 6915, 29898, 1357, 29918, 9621, 29918, 7611, 29909, 29897, 13, 418, 8653, 590, 29918, 9621, 29918, 7611, 29933, 353, 270, 7810, 29889, 14256, 7895, 580, 13, 418, 8653, 1015, 29889, 2080, 29879, 29889, 9621, 29918, 7611, 29933, 29889, 6915, 29898, 1357, 29918, 9621, 29918, 7611, 29933, 29897, 13, 418, 8653, 590, 29918, 25027, 261, 749, 353, 5785, 580, 13, 418, 8653, 1015, 29889, 2080, 29879, 29889, 25027, 261, 749, 29889, 6915, 29898, 1357, 29918, 25027, 261, 749, 29897, 13, 418, 8653, 590, 29918, 9278, 29918, 1767, 353, 5785, 580, 13, 418, 8653, 1015, 29889, 2080, 29879, 29889, 9278, 29918, 1767, 29889, 6915, 29898, 1357, 29918, 9278, 29918, 1767, 29897, 13, 1678, 9995, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 1015, 29901, 6607, 1061, 1125, 13, 4706, 2428, 2141, 1649, 2344, 12035, 1693, 936, 29918, 13801, 3032, 6550, 2141, 2080, 29879, 29892, 1015, 29897, 13, 4706, 1583, 3032, 9621, 29918, 7611, 29909, 353, 10567, 29898, 1693, 936, 29918, 13801, 3032, 6550, 2141, 2080, 29918, 12687, 29898, 29900, 511, 29871, 29900, 29892, 1015, 29892, 448, 29896, 29897, 29871, 13, 4706, 1583, 3032, 2080, 29879, 29889, 4397, 29898, 1311, 3032, 9621, 29918, 7611, 29909, 29897, 13, 4706, 1583, 3032, 9621, 29918, 7611, 29933, 353, 10567, 29898, 1693, 936, 29918, 13801, 3032, 6550, 2141, 2080, 29918, 12687, 29898, 29896, 511, 29871, 29896, 29892, 1015, 29892, 448, 29896, 29897, 29871, 13, 4706, 1583, 3032, 2080, 29879, 29889, 4397, 29898, 1311, 3032, 9621, 29918, 7611, 29933, 29897, 13, 4706, 1583, 3032, 25027, 261, 749, 353, 10567, 29898, 1693, 936, 29918, 13801, 3032, 6550, 2141, 2080, 29918, 12687, 29898, 29906, 511, 29871, 29906, 29892, 1015, 29892, 448, 29896, 29897, 29871, 13, 4706, 1583, 3032, 2080, 29879, 29889, 4397, 29898, 1311, 3032, 25027, 261, 749, 29897, 13, 4706, 1583, 3032, 9278, 29918, 1767, 353, 10567, 29898, 1693, 936, 29918, 13801, 3032, 6550, 2141, 2080, 29918, 12687, 29898, 29941, 511, 29871, 29941, 29892, 1015, 29892, 448, 29896, 29897, 29871, 13, 4706, 1583, 3032, 2080, 29879, 29889, 4397, 29898, 1311, 3032, 9278, 29918, 1767, 29897, 13, 13, 1678, 732, 6799, 13, 1678, 822, 4235, 29918, 7611, 29909, 29898, 1311, 1125, 13, 4706, 9995, 3596, 1242, 304, 4511, 4235, 29918, 7611, 29909, 1881, 304, 278, 5455, 13, 13, 4706, 12662, 2699, 13, 4706, 448, 1378, 29899, 13, 4706, 590, 29918, 9621, 29918, 7611, 29909, 584, 8989, 29879, 7895, 29892, 29871, 13, 13, 4706, 1222, 9422, 13, 4706, 448, 26589, 13, 4706, 8653, 515, 6063, 952, 29889, 6099, 29888, 1053, 7136, 408, 270, 7810, 13, 13, 4706, 8653, 1015, 353, 270, 7810, 29889, 3372, 4097, 29889, 19227, 29889, 1693, 936, 29918, 13801, 580, 13, 4706, 8653, 1015, 29889, 2080, 29879, 29889, 9621, 29918, 7611, 29909, 29889, 6915, 29898, 1357, 29918, 9621, 29918, 7611, 29909, 29897, 13, 4706, 8653, 396, 272, 13, 4706, 8653, 1015, 29889, 2080, 29879, 29889, 9621, 29918, 7611, 29909, 29898, 1357, 29918, 9621, 29918, 7611, 29909, 29897, 13, 13, 4706, 9995, 13, 4706, 736, 1583, 3032, 9621, 29918, 7611, 29909, 13, 13, 1678, 732, 6799, 13, 1678, 822, 4235, 29918, 7611, 29933, 29898, 1311, 1125, 13, 4706, 9995, 3596, 1242, 304, 4511, 4235, 29918, 7611, 29933, 1881, 304, 278, 5455, 13, 13, 4706, 12662, 2699, 13, 4706, 448, 1378, 29899, 13, 4706, 590, 29918, 9621, 29918, 7611, 29933, 584, 8989, 29879, 7895, 29892, 29871, 13, 13, 4706, 1222, 9422, 13, 4706, 448, 26589, 13, 4706, 8653, 515, 6063, 952, 29889, 6099, 29888, 1053, 7136, 408, 270, 7810, 13, 13, 4706, 8653, 1015, 353, 270, 7810, 29889, 3372, 4097, 29889, 19227, 29889, 1693, 936, 29918, 13801, 580, 13, 4706, 8653, 1015, 29889, 2080, 29879, 29889, 9621, 29918, 7611, 29933, 29889, 6915, 29898, 1357, 29918, 9621, 29918, 7611, 29933, 29897, 13, 4706, 8653, 396, 272, 13, 4706, 8653, 1015, 29889, 2080, 29879, 29889, 9621, 29918, 7611, 29933, 29898, 1357, 29918, 9621, 29918, 7611, 29933, 29897, 13, 13, 4706, 9995, 13, 4706, 736, 1583, 3032, 9621, 29918, 7611, 29933, 13, 13, 1678, 732, 6799, 13, 1678, 822, 20341, 749, 29898, 1311, 1125, 13, 4706, 9995, 3596, 1242, 304, 4511, 20341, 749, 1881, 304, 278, 5455, 13, 13, 4706, 448, 282, 513, 542, 29901, 11599, 6198, 20341, 749, 29889, 5918, 12539, 20341, 749, 17261, 1546, 304, 9401, 1819, 29901, 1819, 2629, 6198, 20341, 749, 526, 5545, 13557, 313, 29894, 29896, 29899, 29894, 29906, 6802, 29894, 29906, 529, 6198, 29911, 324, 313, 4381, 338, 29871, 29900, 29889, 29900, 29900, 29896, 467, 13, 13, 4706, 12662, 2699, 13, 4706, 448, 1378, 29899, 13, 4706, 590, 29918, 25027, 261, 749, 584, 5785, 29892, 29871, 13, 13, 4706, 1222, 9422, 13, 4706, 448, 26589, 13, 4706, 8653, 515, 6063, 952, 29889, 6099, 29888, 1053, 7136, 408, 270, 7810, 13, 13, 4706, 8653, 1015, 353, 270, 7810, 29889, 3372, 4097, 29889, 19227, 29889, 1693, 936, 29918, 13801, 580, 13, 4706, 8653, 1015, 29889, 2080, 29879, 29889, 25027, 261, 749, 29889, 6915, 29898, 1357, 29918, 25027, 261, 749, 29897, 13, 4706, 8653, 396, 272, 13, 4706, 8653, 1015, 29889, 2080, 29879, 29889, 25027, 261, 749, 29898, 1357, 29918, 25027, 261, 749, 29897, 13, 13, 4706, 9995, 13, 4706, 736, 1583, 3032, 25027, 261, 749, 13, 13, 1678, 732, 6799, 13, 1678, 822, 2319, 29918, 1767, 29898, 1311, 1125, 13, 4706, 9995, 3596, 1242, 304, 4511, 2319, 29918, 1767, 1881, 304, 278, 5455, 13, 13, 4706, 448, 282, 513, 542, 29901, 11599, 6374, 2319, 995, 29889, 12636, 497, 342, 995, 607, 674, 367, 5545, 2645, 278, 10230, 4331, 584, 599, 278, 6425, 29898, 5975, 29897, 297, 1746, 3109, 1135, 445, 995, 338, 5545, 408, 1870, 29892, 313, 4381, 995, 29901, 29896, 29889, 29900, 29872, 29899, 29896, 29946, 467, 13, 13, 4706, 12662, 2699, 13, 4706, 448, 1378, 29899, 13, 4706, 590, 29918, 9278, 29918, 1767, 584, 5785, 29892, 29871, 13, 13, 4706, 1222, 9422, 13, 4706, 448, 26589, 13, 4706, 8653, 515, 6063, 952, 29889, 6099, 29888, 1053, 7136, 408, 270, 7810, 13, 13, 4706, 8653, 1015, 353, 270, 7810, 29889, 3372, 4097, 29889, 19227, 29889, 1693, 936, 29918, 13801, 580, 13, 4706, 8653, 1015, 29889, 2080, 29879, 29889, 9278, 29918, 1767, 29889, 6915, 29898, 1357, 29918, 9278, 29918, 1767, 29897, 13, 4706, 8653, 396, 272, 13, 4706, 8653, 1015, 29889, 2080, 29879, 29889, 9278, 29918, 1767, 29898, 1357, 29918, 9278, 29918, 1767, 29897, 13, 13, 4706, 9995, 13, 4706, 736, 1583, 3032, 9278, 29918, 1767, 13, 13, 1990, 10604, 29879, 7648, 936, 29943, 29883, 7373, 6466, 29879, 1125, 13, 1678, 9995, 4074, 13847, 770, 1304, 304, 679, 14391, 515, 13557, 29918, 13801, 5455, 13, 418, 1222, 9422, 13, 418, 448, 26589, 13, 418, 8653, 515, 6063, 952, 29889, 6099, 29888, 1053, 7136, 408, 270, 7810, 13, 13, 418, 8653, 1015, 353, 270, 7810, 29889, 3372, 4097, 29889, 19227, 29889, 1693, 936, 29918, 13801, 580, 13, 418, 8653, 396, 14971, 10970, 584, 1015, 29889, 2080, 29879, 29889, 2023, 13, 418, 8653, 1121, 29918, 20054, 353, 1015, 29889, 4905, 29879, 29889, 20054, 580, 13, 418, 8653, 1121, 29918, 4906, 353, 1015, 29889, 4905, 29879, 29889, 4906, 580, 13, 1678, 9995, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 1015, 29901, 6607, 1061, 1125, 13, 4706, 2428, 2141, 1649, 2344, 12035, 1693, 936, 29918, 13801, 3032, 6550, 2141, 4905, 29879, 29892, 1015, 29897, 13, 4706, 1583, 3032, 20054, 353, 10604, 29898, 1693, 936, 29918, 13801, 3032, 6550, 2141, 4905, 29918, 12687, 29898, 29900, 511, 29871, 29900, 29892, 1015, 29897, 29871, 13, 4706, 1583, 3032, 4905, 29879, 29889, 4397, 29898, 1311, 3032, 20054, 29897, 13, 4706, 1583, 3032, 4906, 353, 10604, 29898, 1693, 936, 29918, 13801, 3032, 6550, 2141, 4905, 29918, 12687, 29898, 29896, 511, 29871, 29896, 29892, 1015, 29897, 29871, 13, 4706, 1583, 3032, 4905, 29879, 29889, 4397, 29898, 1311, 3032, 4906, 29897, 13, 13, 1678, 732, 6799, 13, 1678, 822, 7223, 29898, 1311, 1125, 13, 4706, 9995, 3596, 1242, 304, 679, 7223, 1962, 310, 278, 5455, 13, 13, 13, 4706, 448, 282, 513, 542, 29901, 6120, 313, 3009, 565, 13557, 11410, 13, 13, 4706, 16969, 13, 4706, 448, 1378, 29899, 13, 4706, 590, 29918, 20054, 584, 6120, 29892, 29871, 13, 13, 4706, 1222, 9422, 13, 4706, 448, 26589, 13, 4706, 8653, 515, 6063, 952, 29889, 6099, 29888, 1053, 7136, 408, 270, 7810, 13, 13, 4706, 8653, 1015, 353, 270, 7810, 29889, 3372, 4097, 29889, 19227, 29889, 1693, 936, 29918, 13801, 580, 13, 4706, 8653, 396, 14971, 10970, 584, 1015, 29889, 2080, 29879, 29889, 2023, 13, 4706, 8653, 1121, 29918, 20054, 353, 1015, 29889, 4905, 29879, 29889, 20054, 580, 29871, 13, 4706, 9995, 13, 4706, 736, 1583, 3032, 20054, 13, 13, 1678, 732, 6799, 13, 1678, 822, 2643, 29898, 1311, 1125, 13, 4706, 9995, 3596, 1242, 304, 679, 2643, 1962, 310, 278, 5455, 13, 13, 13, 4706, 16969, 13, 4706, 448, 1378, 29899, 13, 4706, 590, 29918, 4906, 584, 851, 29892, 29871, 13, 13, 4706, 1222, 9422, 13, 4706, 448, 26589, 13, 4706, 8653, 515, 6063, 952, 29889, 6099, 29888, 1053, 7136, 408, 270, 7810, 13, 13, 4706, 8653, 1015, 353, 270, 7810, 29889, 3372, 4097, 29889, 19227, 29889, 1693, 936, 29918, 13801, 580, 13, 4706, 8653, 396, 14971, 10970, 584, 1015, 29889, 2080, 29879, 29889, 2023, 13, 4706, 8653, 1121, 29918, 4906, 353, 1015, 29889, 4905, 29879, 29889, 4906, 580, 29871, 13, 4706, 9995, 13, 4706, 736, 1583, 3032, 4906, 13, 13, 2 ]
maps/urls.py
lueho/BRIT
0
1612756
<reponame>lueho/BRIT from django.urls import include, path from .views import ( AttributeListView, AttributeCreateView, AttributeModalCreateView, AttributeDetailView, AttributeModalDetailView, AttributeUpdateView, AttributeModalUpdateView, AttributeModalDeleteView, RegionAttributeValueListView, RegionAttributeValueCreateView, RegionAttributeValueModalCreateView, RegionAttributeValueDetailView, RegionAttributeValueModalDetailView, RegionAttributeValueUpdateView, RegionAttributeValueModalUpdateView, RegionAttributeValueModalDeleteView, CatchmentAutocompleteView, CatchmentBrowseView, CatchmentCreateView, CatchmentGeometryAPI, CatchmentOptionGeometryAPI, CatchmentUpdateView, CatchmentDeleteView, CatchmentRegionGeometryAPI, CatchmentRegionSummaryAPIView, MapsListView, RegionGeometryAPI, NutsRegionMapView, NutsRegionAPIView, NutsRegionSummaryAPIView, NutsRegionPedigreeAPI, LauRegionOptionsAPI, NutsAndLauCatchmentPedigreeAPI ) urlpatterns = [ path('list/', MapsListView.as_view(), name='maps_list'), path('attributes/', AttributeListView.as_view(), name='attribute-list'), path('attributes/create/', AttributeCreateView.as_view(), name='attribute-create'), path('attributes/create/modal/', AttributeModalCreateView.as_view(), name='attribute-create-modal'), path('attributes/<int:pk>/', AttributeDetailView.as_view(), name='attribute-detail'), path('attributes/<int:pk>/modal/', AttributeModalDetailView.as_view(), name='attribute-detail-modal'), path('attributes/<int:pk>/update/', AttributeUpdateView.as_view(), name='attribute-update'), path('attributes/<int:pk>/update/modal/', AttributeModalUpdateView.as_view(), name='attribute-update-modal'), path('attributes/<int:pk>/delete/modal', AttributeModalDeleteView.as_view(), name='attribute-delete-modal'), path('attribute_values/', RegionAttributeValueListView.as_view(), name='regionattributevalue-list'), path('attribute_values/create/', RegionAttributeValueCreateView.as_view(), name='regionattributevalue-create'), path('attribute_values/create/modal/', RegionAttributeValueModalCreateView.as_view(), name='regionattributevalue-create-modal'), path('attribute_values/<int:pk>/', RegionAttributeValueDetailView.as_view(), name='regionattributevalue-detail'), path('attribute_values/<int:pk>/modal/', RegionAttributeValueModalDetailView.as_view(), name='regionattributevalue-detail-modal'), path('attribute_values/<int:pk>/update/', RegionAttributeValueUpdateView.as_view(), name='regionattributevalue-update'), path('attribute_values/<int:pk>/update/modal/', RegionAttributeValueModalUpdateView.as_view(), name='regionattributevalue-update-modal'), path('attribute_values/<int:pk>/delete/modal', RegionAttributeValueModalDeleteView.as_view(), name='regionattributevalue-delete-modal'), path('catchments/', CatchmentBrowseView.as_view(), name='catchment_list'), path('catchment/create/', CatchmentCreateView.as_view(), name='catchment_definition'), path('catchment/create/modal/', CatchmentCreateView.as_view(), name='catchment-create-modal'), path('catchments/<int:pk>/update/', CatchmentUpdateView.as_view(), name='catchment_update'), path('catchments/<int:pk>/delete/', CatchmentDeleteView.as_view(), name='catchment_delete'), path('catchments/data/', RegionGeometryAPI.as_view(), name='data.catchments'), path('catchments/autocomplete/', CatchmentAutocompleteView.as_view(), name='catchment-autocomplete'), path('catchment_options/data/', CatchmentOptionGeometryAPI.as_view(), name='data.catchment-options'), path('nutsregions/map/', NutsRegionMapView.as_view(), name='NutsRegion'), path('nutsregions/data/', NutsRegionAPIView.as_view(), name='data.nutsregion'), path('nutsregions/summary/', NutsRegionSummaryAPIView.as_view(), name='data.nutsregion-summary'), path('nutsregions/options/data/', NutsRegionPedigreeAPI.as_view(), name='data.nuts_region_options'), path('lau_options/data/', LauRegionOptionsAPI.as_view(), name='data.lau_region_options'), path('nuts_lau_catchment_options/data/', NutsAndLauCatchmentPedigreeAPI.as_view(), name='data.nuts_lau_catchment_options'), path('region_geometries/', RegionGeometryAPI.as_view(), name='ajax_region_geometries'), path('catchment_region_geometries/', CatchmentRegionGeometryAPI.as_view(), name='data.catchment_region_geometries'), path('catchment_regions_summaries/', CatchmentRegionSummaryAPIView.as_view(), name='data.catchment_region_summaries'), path('catchment_geometries/', CatchmentGeometryAPI.as_view(), name='ajax_catchment_geometries'), # TODO: Can case study urls be detected and added automatically? path('nantes/', include('case_studies.flexibi_nantes.urls')), path('hamburg/', include('case_studies.flexibi_hamburg.urls')), ]
[ 1, 529, 276, 1112, 420, 29958, 29880, 434, 1251, 29914, 15176, 1806, 13, 3166, 9557, 29889, 26045, 1053, 3160, 29892, 2224, 13, 13, 3166, 869, 7406, 1053, 313, 13, 1678, 23833, 15660, 29892, 13, 1678, 23833, 4391, 1043, 29892, 13, 1678, 23833, 19751, 4391, 1043, 29892, 13, 1678, 23833, 16570, 1043, 29892, 13, 1678, 23833, 19751, 16570, 1043, 29892, 13, 1678, 23833, 6422, 1043, 29892, 13, 1678, 23833, 19751, 6422, 1043, 29892, 13, 1678, 23833, 19751, 12498, 1043, 29892, 13, 1678, 11069, 6708, 1917, 15660, 29892, 13, 1678, 11069, 6708, 1917, 4391, 1043, 29892, 13, 1678, 11069, 6708, 1917, 19751, 4391, 1043, 29892, 13, 1678, 11069, 6708, 1917, 16570, 1043, 29892, 13, 1678, 11069, 6708, 1917, 19751, 16570, 1043, 29892, 13, 1678, 11069, 6708, 1917, 6422, 1043, 29892, 13, 1678, 11069, 6708, 1917, 19751, 6422, 1043, 29892, 13, 1678, 11069, 6708, 1917, 19751, 12498, 1043, 29892, 13, 1678, 315, 905, 358, 12300, 8835, 1043, 29892, 13, 1678, 315, 905, 358, 29933, 798, 344, 1043, 29892, 13, 1678, 315, 905, 358, 4391, 1043, 29892, 13, 1678, 315, 905, 358, 7999, 7843, 8787, 29892, 13, 1678, 315, 905, 358, 8375, 7999, 7843, 8787, 29892, 13, 1678, 315, 905, 358, 6422, 1043, 29892, 13, 1678, 315, 905, 358, 12498, 1043, 29892, 13, 1678, 315, 905, 358, 18457, 7999, 7843, 8787, 29892, 13, 1678, 315, 905, 358, 18457, 26289, 8787, 1043, 29892, 13, 1678, 25846, 15660, 29892, 13, 1678, 11069, 7999, 7843, 8787, 29892, 13, 1678, 405, 8842, 18457, 3388, 1043, 29892, 13, 1678, 405, 8842, 18457, 8787, 1043, 29892, 13, 1678, 405, 8842, 18457, 26289, 8787, 1043, 29892, 13, 1678, 405, 8842, 18457, 29925, 287, 335, 929, 8787, 29892, 13, 1678, 25092, 18457, 5856, 8787, 29892, 13, 1678, 405, 8842, 2855, 29931, 585, 29907, 905, 358, 29925, 287, 335, 929, 8787, 13, 29897, 13, 13, 2271, 11037, 29879, 353, 518, 13, 1678, 2224, 877, 1761, 29914, 742, 25846, 15660, 29889, 294, 29918, 1493, 3285, 1024, 2433, 10339, 29918, 1761, 5477, 13, 1678, 2224, 877, 15697, 29914, 742, 23833, 15660, 29889, 294, 29918, 1493, 3285, 1024, 2433, 12715, 29899, 1761, 5477, 13, 1678, 2224, 877, 15697, 29914, 3258, 29914, 742, 23833, 4391, 1043, 29889, 294, 29918, 1493, 3285, 1024, 2433, 12715, 29899, 3258, 5477, 13, 1678, 2224, 877, 15697, 29914, 3258, 29914, 15601, 29914, 742, 23833, 19751, 4391, 1043, 29889, 294, 29918, 1493, 3285, 1024, 2433, 12715, 29899, 3258, 29899, 15601, 5477, 13, 1678, 2224, 877, 15697, 29914, 29966, 524, 29901, 20571, 20690, 742, 23833, 16570, 1043, 29889, 294, 29918, 1493, 3285, 1024, 2433, 12715, 29899, 16432, 5477, 13, 1678, 2224, 877, 15697, 29914, 29966, 524, 29901, 20571, 20690, 15601, 29914, 742, 23833, 19751, 16570, 1043, 29889, 294, 29918, 1493, 3285, 1024, 2433, 12715, 29899, 16432, 29899, 15601, 5477, 13, 1678, 2224, 877, 15697, 29914, 29966, 524, 29901, 20571, 20690, 5504, 29914, 742, 23833, 6422, 1043, 29889, 294, 29918, 1493, 3285, 1024, 2433, 12715, 29899, 5504, 5477, 13, 1678, 2224, 877, 15697, 29914, 29966, 524, 29901, 20571, 20690, 5504, 29914, 15601, 29914, 742, 23833, 19751, 6422, 1043, 29889, 294, 29918, 1493, 3285, 1024, 2433, 12715, 29899, 5504, 29899, 15601, 5477, 13, 1678, 2224, 877, 15697, 29914, 29966, 524, 29901, 20571, 20690, 8143, 29914, 15601, 742, 23833, 19751, 12498, 1043, 29889, 294, 29918, 1493, 3285, 1024, 2433, 12715, 29899, 8143, 29899, 15601, 5477, 13, 1678, 2224, 877, 12715, 29918, 5975, 29914, 742, 11069, 6708, 1917, 15660, 29889, 294, 29918, 1493, 3285, 1024, 2433, 12803, 12715, 1767, 29899, 1761, 5477, 13, 1678, 2224, 877, 12715, 29918, 5975, 29914, 3258, 29914, 742, 11069, 6708, 1917, 4391, 1043, 29889, 294, 29918, 1493, 3285, 1024, 2433, 12803, 12715, 1767, 29899, 3258, 5477, 13, 1678, 2224, 877, 12715, 29918, 5975, 29914, 3258, 29914, 15601, 29914, 742, 11069, 6708, 1917, 19751, 4391, 1043, 29889, 294, 29918, 1493, 3285, 1024, 2433, 12803, 12715, 1767, 29899, 3258, 29899, 15601, 5477, 13, 1678, 2224, 877, 12715, 29918, 5975, 29914, 29966, 524, 29901, 20571, 20690, 742, 11069, 6708, 1917, 16570, 1043, 29889, 294, 29918, 1493, 3285, 1024, 2433, 12803, 12715, 1767, 29899, 16432, 5477, 13, 1678, 2224, 877, 12715, 29918, 5975, 29914, 29966, 524, 29901, 20571, 20690, 15601, 29914, 742, 11069, 6708, 1917, 19751, 16570, 1043, 29889, 294, 29918, 1493, 3285, 1024, 2433, 12803, 12715, 1767, 29899, 16432, 29899, 15601, 5477, 13, 1678, 2224, 877, 12715, 29918, 5975, 29914, 29966, 524, 29901, 20571, 20690, 5504, 29914, 742, 11069, 6708, 1917, 6422, 1043, 29889, 294, 29918, 1493, 3285, 1024, 2433, 12803, 12715, 1767, 29899, 5504, 5477, 13, 1678, 2224, 877, 12715, 29918, 5975, 29914, 29966, 524, 29901, 20571, 20690, 5504, 29914, 15601, 29914, 742, 11069, 6708, 1917, 19751, 6422, 1043, 29889, 294, 29918, 1493, 3285, 1024, 2433, 12803, 12715, 1767, 29899, 5504, 29899, 15601, 5477, 13, 1678, 2224, 877, 12715, 29918, 5975, 29914, 29966, 524, 29901, 20571, 20690, 8143, 29914, 15601, 742, 11069, 6708, 1917, 19751, 12498, 1043, 29889, 294, 29918, 1493, 3285, 1024, 2433, 12803, 12715, 1767, 29899, 8143, 29899, 15601, 5477, 13, 1678, 2224, 877, 12510, 1860, 29914, 742, 315, 905, 358, 29933, 798, 344, 1043, 29889, 294, 29918, 1493, 3285, 1024, 2433, 12510, 358, 29918, 1761, 5477, 13, 1678, 2224, 877, 12510, 358, 29914, 3258, 29914, 742, 315, 905, 358, 4391, 1043, 29889, 294, 29918, 1493, 3285, 1024, 2433, 12510, 358, 29918, 16553, 5477, 13, 1678, 2224, 877, 12510, 358, 29914, 3258, 29914, 15601, 29914, 742, 315, 905, 358, 4391, 1043, 29889, 294, 29918, 1493, 3285, 1024, 2433, 12510, 358, 29899, 3258, 29899, 15601, 5477, 13, 1678, 2224, 877, 12510, 1860, 29914, 29966, 524, 29901, 20571, 20690, 5504, 29914, 742, 315, 905, 358, 6422, 1043, 29889, 294, 29918, 1493, 3285, 1024, 2433, 12510, 358, 29918, 5504, 5477, 13, 1678, 2224, 877, 12510, 1860, 29914, 29966, 524, 29901, 20571, 20690, 8143, 29914, 742, 315, 905, 358, 12498, 1043, 29889, 294, 29918, 1493, 3285, 1024, 2433, 12510, 358, 29918, 8143, 5477, 13, 1678, 2224, 877, 12510, 1860, 29914, 1272, 29914, 742, 11069, 7999, 7843, 8787, 29889, 294, 29918, 1493, 3285, 1024, 2433, 1272, 29889, 12510, 1860, 5477, 13, 1678, 2224, 877, 12510, 1860, 29914, 6921, 8835, 29914, 742, 315, 905, 358, 12300, 8835, 1043, 29889, 294, 29918, 1493, 3285, 1024, 2433, 12510, 358, 29899, 6921, 8835, 5477, 13, 1678, 2224, 877, 12510, 358, 29918, 6768, 29914, 1272, 29914, 742, 315, 905, 358, 8375, 7999, 7843, 8787, 29889, 294, 29918, 1493, 3285, 1024, 2433, 1272, 29889, 12510, 358, 29899, 6768, 5477, 13, 1678, 2224, 877, 29876, 8842, 1727, 1080, 29914, 1958, 29914, 742, 405, 8842, 18457, 3388, 1043, 29889, 294, 29918, 1493, 3285, 1024, 2433, 29940, 8842, 18457, 5477, 13, 1678, 2224, 877, 29876, 8842, 1727, 1080, 29914, 1272, 29914, 742, 405, 8842, 18457, 8787, 1043, 29889, 294, 29918, 1493, 3285, 1024, 2433, 1272, 29889, 29876, 8842, 12803, 5477, 13, 1678, 2224, 877, 29876, 8842, 1727, 1080, 29914, 7727, 29914, 742, 405, 8842, 18457, 26289, 8787, 1043, 29889, 294, 29918, 1493, 3285, 1024, 2433, 1272, 29889, 29876, 8842, 12803, 29899, 7727, 5477, 13, 1678, 2224, 877, 29876, 8842, 1727, 1080, 29914, 6768, 29914, 1272, 29914, 742, 405, 8842, 18457, 29925, 287, 335, 929, 8787, 29889, 294, 29918, 1493, 3285, 1024, 2433, 1272, 29889, 29876, 8842, 29918, 12803, 29918, 6768, 5477, 13, 1678, 2224, 877, 25855, 29918, 6768, 29914, 1272, 29914, 742, 25092, 18457, 5856, 8787, 29889, 294, 29918, 1493, 3285, 1024, 2433, 1272, 29889, 25855, 29918, 12803, 29918, 6768, 5477, 13, 1678, 2224, 877, 29876, 8842, 29918, 25855, 29918, 12510, 358, 29918, 6768, 29914, 1272, 29914, 742, 405, 8842, 2855, 29931, 585, 29907, 905, 358, 29925, 287, 335, 929, 8787, 29889, 294, 29918, 1493, 3285, 13, 308, 1024, 2433, 1272, 29889, 29876, 8842, 29918, 25855, 29918, 12510, 358, 29918, 6768, 5477, 13, 1678, 2224, 877, 12803, 29918, 479, 3297, 2722, 29914, 742, 11069, 7999, 7843, 8787, 29889, 294, 29918, 1493, 3285, 1024, 2433, 6538, 29918, 12803, 29918, 479, 3297, 2722, 5477, 13, 1678, 2224, 877, 12510, 358, 29918, 12803, 29918, 479, 3297, 2722, 29914, 742, 315, 905, 358, 18457, 7999, 7843, 8787, 29889, 294, 29918, 1493, 3285, 1024, 2433, 1272, 29889, 12510, 358, 29918, 12803, 29918, 479, 3297, 2722, 5477, 13, 1678, 2224, 877, 12510, 358, 29918, 1727, 1080, 29918, 2083, 3034, 583, 29914, 742, 315, 905, 358, 18457, 26289, 8787, 1043, 29889, 294, 29918, 1493, 3285, 1024, 2433, 1272, 29889, 12510, 358, 29918, 12803, 29918, 2083, 3034, 583, 5477, 13, 1678, 2224, 877, 12510, 358, 29918, 479, 3297, 2722, 29914, 742, 315, 905, 358, 7999, 7843, 8787, 29889, 294, 29918, 1493, 3285, 1024, 2433, 6538, 29918, 12510, 358, 29918, 479, 3297, 2722, 5477, 13, 1678, 396, 14402, 29901, 1815, 1206, 6559, 23942, 367, 17809, 322, 2715, 6336, 29973, 13, 1678, 2224, 877, 29876, 3794, 29914, 742, 3160, 877, 4878, 29918, 18082, 583, 29889, 16041, 747, 29875, 29918, 29876, 3794, 29889, 26045, 1495, 511, 13, 1678, 2224, 877, 29882, 1117, 2007, 29914, 742, 3160, 877, 4878, 29918, 18082, 583, 29889, 16041, 747, 29875, 29918, 29882, 1117, 2007, 29889, 26045, 1495, 511, 13, 29962, 13, 2 ]
tahoe_scorm/exceptions.py
appsembler/tahoe-scorm
0
119394
<filename>tahoe_scorm/exceptions.py<gh_stars>0 class ScormException(Exception): pass
[ 1, 529, 9507, 29958, 29873, 801, 7297, 29918, 1557, 555, 29914, 11739, 29879, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 1990, 2522, 555, 2451, 29898, 2451, 1125, 13, 1678, 1209, 13, 2 ]
src/baselines/a2c/a2c.py
Officium/RL-Experiments
54
190393
import os import time from collections import deque import torch import torch.distributions import torch.nn as nn from torch.optim.lr_scheduler import LambdaLR from common.util import scale_ob, Trajectories def learn(logger, device, env, nenv, number_timesteps, network, optimizer, save_path, save_interval, ob_scale, gamma, grad_norm, timesteps_per_batch, ent_coef, vf_coef): """ Paper: <NAME>, <NAME>, <NAME>, et al. Asynchronous methods for deep reinforcement learning[C]// International Conference on Machine Learning. 2016: 1928-1937. Parameters: ---------- gram_norm (float | None): grad norm timesteps_per_batch (int): number of steps per update ent_coef (float): policy entropy coefficient in the objective vf_coef (float): value function loss coefficient in the objective """ policy = network.to(device) number_timesteps = number_timesteps // nenv generator = _generate( device, env, policy, ob_scale, number_timesteps, gamma, timesteps_per_batch ) max_iter = number_timesteps // timesteps_per_batch scheduler = LambdaLR(optimizer, lambda i_iter: 1 - i_iter / max_iter) total_timesteps = 0 infos = {k: deque(maxlen=100) for k in ['eplenmean', 'eprewmean', 'pgloss', 'v', 'entropy']} start_ts = time.time() for n_iter in range(1, max_iter + 1): scheduler.step() batch = generator.__next__() b_o, b_a, b_r, b_v_old, info = batch for d in info: infos['eplenmean'].append(d['l']) infos['eprewmean'].append(d['r']) total_timesteps += b_o.size(0) # calculate advantange b_logits, b_v = policy(b_o) b_v = b_v[:, 0] dist = torch.distributions.Categorical(logits=b_logits) entropy = dist.entropy().mean() b_logp = dist.log_prob(b_a) adv = b_r - b_v_old # update policy vloss = (b_v - b_r).pow(2).mean() pgloss = -(adv * b_logp).mean() loss = pgloss + vf_coef * vloss - ent_coef * entropy optimizer.zero_grad() loss.backward() if grad_norm is not None: nn.utils.clip_grad_norm_(policy.parameters(), grad_norm) optimizer.step() # record logs infos['pgloss'].append(pgloss.item()) infos['v'].append(vloss.item()) infos['entropy'].append(entropy.item()) logger.info('{} Iter {} {}'.format('=' * 10, n_iter, '=' * 10)) fps = int(total_timesteps / (time.time() - start_ts)) logger.info('Total timesteps {} FPS {}'.format(total_timesteps, fps)) for k, v in infos.items(): v = (sum(v) / len(v)) if v else float('nan') logger.info('{}: {:.6f}'.format(k, v)) if save_interval and n_iter % save_interval == 0: torch.save([policy.state_dict(), optimizer.state_dict()], os.path.join(save_path, '{}.checkpoint'.format(n_iter))) def _generate(device, env, policy, ob_scale, number_timesteps, gamma, timesteps_per_batch): """ Generate trajectories """ record = ['o', 'a', 'r', 'done', 'vpred'] export = ['o', 'a', 'r', 'vpred'] trajectories = Trajectories(record, export, device, gamma, ob_scale) o = env.reset() infos = [] for n in range(1, number_timesteps + 1): # sample action with torch.no_grad(): logits, v = policy(scale_ob(o, device, ob_scale)) dist = torch.distributions.Categorical(logits=logits) a = dist.sample().cpu().numpy() v = v.cpu().numpy()[:, 0] # take action in env o_, r, done, info = env.step(a) for d in info: if d.get('episode'): infos.append(d['episode']) # store batch data and update observation trajectories.append(o, a, r, done, v) if n % timesteps_per_batch == 0: with torch.no_grad(): ob = scale_ob(o_, device, ob_scale) v_ = policy(ob)[1].cpu().numpy()[:, 0] * (1 - done) yield trajectories.export(v_) + (infos, ) infos.clear() o = o_
[ 1, 1053, 2897, 13, 5215, 931, 13, 3166, 16250, 1053, 316, 802, 13, 13, 5215, 4842, 305, 13, 5215, 4842, 305, 29889, 27691, 29879, 13, 5215, 4842, 305, 29889, 15755, 408, 302, 29876, 13, 3166, 4842, 305, 29889, 20640, 29889, 29212, 29918, 816, 14952, 1053, 365, 2269, 29519, 13, 13, 3166, 3619, 29889, 4422, 1053, 6287, 29918, 711, 29892, 3201, 622, 3842, 13, 13, 13, 1753, 5110, 29898, 21707, 29892, 13, 3986, 4742, 29892, 13, 3986, 8829, 29892, 302, 6272, 29892, 13, 3986, 1353, 29918, 9346, 4196, 567, 29892, 13, 3986, 3564, 29892, 5994, 3950, 29892, 13, 3986, 4078, 29918, 2084, 29892, 4078, 29918, 19207, 29892, 704, 29918, 7052, 29892, 13, 3986, 330, 2735, 29892, 4656, 29918, 12324, 29892, 5335, 4196, 567, 29918, 546, 29918, 16175, 29892, 875, 29918, 1111, 1389, 29892, 325, 29888, 29918, 1111, 1389, 1125, 13, 1678, 9995, 13, 1678, 349, 7202, 29901, 13, 1678, 529, 5813, 10202, 529, 5813, 10202, 529, 5813, 10202, 634, 394, 29889, 1094, 15374, 3519, 363, 6483, 13, 1678, 15561, 1454, 13561, 6509, 29961, 29907, 29962, 458, 4623, 16377, 373, 6189, 29257, 29889, 13, 268, 29906, 29900, 29896, 29953, 29901, 29871, 29896, 29929, 29906, 29947, 29899, 29896, 29929, 29941, 29955, 29889, 13, 13, 1678, 12662, 2699, 29901, 13, 1678, 448, 1378, 29899, 13, 1678, 14961, 29918, 12324, 313, 7411, 891, 6213, 1125, 4656, 6056, 13, 1678, 5335, 4196, 567, 29918, 546, 29918, 16175, 313, 524, 1125, 1353, 310, 6576, 639, 2767, 13, 1678, 875, 29918, 1111, 1389, 313, 7411, 1125, 8898, 24687, 10825, 297, 278, 12091, 13, 1678, 325, 29888, 29918, 1111, 1389, 313, 7411, 1125, 995, 740, 6410, 10825, 297, 278, 12091, 13, 13, 1678, 9995, 13, 1678, 8898, 353, 3564, 29889, 517, 29898, 10141, 29897, 13, 1678, 1353, 29918, 9346, 4196, 567, 353, 1353, 29918, 9346, 4196, 567, 849, 302, 6272, 13, 1678, 15299, 353, 903, 17158, 29898, 13, 4706, 4742, 29892, 8829, 29892, 8898, 29892, 704, 29918, 7052, 29892, 13, 4706, 1353, 29918, 9346, 4196, 567, 29892, 330, 2735, 29892, 5335, 4196, 567, 29918, 546, 29918, 16175, 13, 1678, 1723, 13, 1678, 4236, 29918, 1524, 353, 1353, 29918, 9346, 4196, 567, 849, 5335, 4196, 567, 29918, 546, 29918, 16175, 13, 1678, 1364, 14952, 353, 365, 2269, 29519, 29898, 20640, 3950, 29892, 14013, 474, 29918, 1524, 29901, 29871, 29896, 448, 474, 29918, 1524, 847, 4236, 29918, 1524, 29897, 13, 13, 1678, 3001, 29918, 9346, 4196, 567, 353, 29871, 29900, 13, 1678, 3041, 359, 353, 426, 29895, 29901, 316, 802, 29898, 3317, 2435, 29922, 29896, 29900, 29900, 29897, 13, 632, 363, 413, 297, 6024, 29872, 572, 264, 12676, 742, 525, 1022, 3973, 12676, 742, 525, 29886, 3820, 2209, 742, 525, 29894, 742, 525, 296, 14441, 2033, 29913, 13, 1678, 1369, 29918, 1372, 353, 931, 29889, 2230, 580, 13, 1678, 363, 302, 29918, 1524, 297, 3464, 29898, 29896, 29892, 4236, 29918, 1524, 718, 29871, 29896, 1125, 13, 4706, 1364, 14952, 29889, 10568, 580, 13, 13, 4706, 9853, 353, 15299, 17255, 4622, 1649, 580, 13, 4706, 289, 29918, 29877, 29892, 289, 29918, 29874, 29892, 289, 29918, 29878, 29892, 289, 29918, 29894, 29918, 1025, 29892, 5235, 353, 9853, 13, 4706, 363, 270, 297, 5235, 29901, 13, 9651, 3041, 359, 1839, 29872, 572, 264, 12676, 13359, 4397, 29898, 29881, 1839, 29880, 11287, 13, 9651, 3041, 359, 1839, 1022, 3973, 12676, 13359, 4397, 29898, 29881, 1839, 29878, 11287, 13, 4706, 3001, 29918, 9346, 4196, 567, 4619, 289, 29918, 29877, 29889, 2311, 29898, 29900, 29897, 13, 13, 4706, 396, 8147, 3061, 424, 927, 13, 4706, 289, 29918, 1188, 1169, 29892, 289, 29918, 29894, 353, 8898, 29898, 29890, 29918, 29877, 29897, 13, 4706, 289, 29918, 29894, 353, 289, 29918, 29894, 7503, 29892, 29871, 29900, 29962, 13, 4706, 1320, 353, 4842, 305, 29889, 27691, 29879, 29889, 29907, 20440, 936, 29898, 1188, 1169, 29922, 29890, 29918, 1188, 1169, 29897, 13, 4706, 24687, 353, 1320, 29889, 296, 14441, 2141, 12676, 580, 13, 4706, 289, 29918, 1188, 29886, 353, 1320, 29889, 1188, 29918, 22795, 29898, 29890, 29918, 29874, 29897, 13, 4706, 3061, 353, 289, 29918, 29878, 448, 289, 29918, 29894, 29918, 1025, 13, 13, 4706, 396, 2767, 8898, 13, 4706, 325, 6758, 353, 313, 29890, 29918, 29894, 448, 289, 29918, 29878, 467, 12248, 29898, 29906, 467, 12676, 580, 13, 4706, 282, 3820, 2209, 353, 19691, 17263, 334, 289, 29918, 1188, 29886, 467, 12676, 580, 13, 4706, 6410, 353, 282, 3820, 2209, 718, 325, 29888, 29918, 1111, 1389, 334, 325, 6758, 448, 875, 29918, 1111, 1389, 334, 24687, 13, 4706, 5994, 3950, 29889, 9171, 29918, 5105, 580, 13, 4706, 6410, 29889, 1627, 1328, 580, 13, 4706, 565, 4656, 29918, 12324, 338, 451, 6213, 29901, 13, 9651, 302, 29876, 29889, 13239, 29889, 24049, 29918, 5105, 29918, 12324, 23538, 22197, 29889, 16744, 3285, 4656, 29918, 12324, 29897, 13, 4706, 5994, 3950, 29889, 10568, 580, 13, 13, 4706, 396, 2407, 10748, 13, 4706, 3041, 359, 1839, 29886, 3820, 2209, 13359, 4397, 29898, 29886, 3820, 2209, 29889, 667, 3101, 13, 4706, 3041, 359, 1839, 29894, 13359, 4397, 29898, 29894, 6758, 29889, 667, 3101, 13, 4706, 3041, 359, 1839, 296, 14441, 13359, 4397, 29898, 296, 14441, 29889, 667, 3101, 13, 4706, 17927, 29889, 3888, 877, 8875, 20504, 6571, 6571, 4286, 4830, 877, 2433, 334, 29871, 29896, 29900, 29892, 302, 29918, 1524, 29892, 525, 2433, 334, 29871, 29896, 29900, 876, 13, 4706, 285, 567, 353, 938, 29898, 7827, 29918, 9346, 4196, 567, 847, 313, 2230, 29889, 2230, 580, 448, 1369, 29918, 1372, 876, 13, 4706, 17927, 29889, 3888, 877, 11536, 5335, 4196, 567, 6571, 383, 7024, 6571, 4286, 4830, 29898, 7827, 29918, 9346, 4196, 567, 29892, 285, 567, 876, 13, 4706, 363, 413, 29892, 325, 297, 3041, 359, 29889, 7076, 7295, 13, 9651, 325, 353, 313, 2083, 29898, 29894, 29897, 847, 7431, 29898, 29894, 876, 565, 325, 1683, 5785, 877, 13707, 1495, 13, 9651, 17927, 29889, 3888, 877, 29912, 6177, 12365, 29889, 29953, 29888, 29913, 4286, 4830, 29898, 29895, 29892, 325, 876, 13, 4706, 565, 4078, 29918, 19207, 322, 302, 29918, 1524, 1273, 4078, 29918, 19207, 1275, 29871, 29900, 29901, 13, 9651, 4842, 305, 29889, 7620, 4197, 22197, 29889, 3859, 29918, 8977, 3285, 5994, 3950, 29889, 3859, 29918, 8977, 580, 1402, 13, 462, 539, 2897, 29889, 2084, 29889, 7122, 29898, 7620, 29918, 2084, 29892, 22372, 1836, 3198, 3149, 4286, 4830, 29898, 29876, 29918, 1524, 4961, 13, 13, 13, 1753, 903, 17158, 29898, 10141, 29892, 8829, 29892, 8898, 29892, 704, 29918, 7052, 29892, 13, 795, 1353, 29918, 9346, 4196, 567, 29892, 330, 2735, 29892, 5335, 4196, 567, 29918, 546, 29918, 16175, 1125, 13, 1678, 9995, 3251, 403, 23324, 3842, 9995, 13, 1678, 2407, 353, 6024, 29877, 742, 525, 29874, 742, 525, 29878, 742, 525, 15091, 742, 525, 29894, 11965, 2033, 13, 1678, 5609, 353, 6024, 29877, 742, 525, 29874, 742, 525, 29878, 742, 525, 29894, 11965, 2033, 13, 1678, 23324, 3842, 353, 3201, 622, 3842, 29898, 11651, 29892, 5609, 29892, 4742, 29892, 330, 2735, 29892, 704, 29918, 7052, 29897, 13, 13, 1678, 288, 353, 8829, 29889, 12071, 580, 13, 1678, 3041, 359, 353, 5159, 13, 1678, 363, 302, 297, 3464, 29898, 29896, 29892, 1353, 29918, 9346, 4196, 567, 718, 29871, 29896, 1125, 13, 4706, 396, 4559, 3158, 13, 4706, 411, 4842, 305, 29889, 1217, 29918, 5105, 7295, 13, 9651, 1480, 1169, 29892, 325, 353, 8898, 29898, 7052, 29918, 711, 29898, 29877, 29892, 4742, 29892, 704, 29918, 7052, 876, 13, 9651, 1320, 353, 4842, 305, 29889, 27691, 29879, 29889, 29907, 20440, 936, 29898, 1188, 1169, 29922, 1188, 1169, 29897, 13, 9651, 263, 353, 1320, 29889, 11249, 2141, 21970, 2141, 23749, 580, 13, 9651, 325, 353, 325, 29889, 21970, 2141, 23749, 580, 7503, 29892, 29871, 29900, 29962, 13, 13, 4706, 396, 2125, 3158, 297, 8829, 13, 4706, 288, 3383, 364, 29892, 2309, 29892, 5235, 353, 8829, 29889, 10568, 29898, 29874, 29897, 13, 4706, 363, 270, 297, 5235, 29901, 13, 9651, 565, 270, 29889, 657, 877, 1022, 275, 356, 29374, 13, 18884, 3041, 359, 29889, 4397, 29898, 29881, 1839, 1022, 275, 356, 11287, 13, 13, 4706, 396, 3787, 9853, 848, 322, 2767, 15500, 13, 4706, 23324, 3842, 29889, 4397, 29898, 29877, 29892, 263, 29892, 364, 29892, 2309, 29892, 325, 29897, 13, 4706, 565, 302, 1273, 5335, 4196, 567, 29918, 546, 29918, 16175, 1275, 29871, 29900, 29901, 13, 9651, 411, 4842, 305, 29889, 1217, 29918, 5105, 7295, 13, 18884, 704, 353, 6287, 29918, 711, 29898, 29877, 3383, 4742, 29892, 704, 29918, 7052, 29897, 13, 18884, 325, 29918, 353, 8898, 29898, 711, 9601, 29896, 1822, 21970, 2141, 23749, 580, 7503, 29892, 29871, 29900, 29962, 334, 313, 29896, 448, 2309, 29897, 13, 9651, 7709, 23324, 3842, 29889, 15843, 29898, 29894, 19925, 718, 313, 7192, 359, 29892, 1723, 13, 9651, 3041, 359, 29889, 8551, 580, 13, 4706, 288, 353, 288, 29918, 13, 2 ]
src/test/marker_array_test.py
fftn/rviz
0
139469
#!/usr/bin/env python from visualization_msgs.msg import Marker from visualization_msgs.msg import MarkerArray import rospy import math topic = "visualization_marker_array" publisher = rospy.Publisher(topic, MarkerArray) rospy.init_node("register") markerArray = MarkerArray() count = 0 MARKERS_MAX = 100 while not rospy.is_shutdown(): marker = Marker() marker.header.frame_id = "base_link" marker.type = marker.SPHERE marker.action = marker.ADD marker.scale.x = 0.2 marker.scale.y = 0.2 marker.scale.z = 0.2 marker.color.a = 1.0 marker.color.r = 1.0 marker.color.g = 1.0 marker.color.b = 0.0 marker.pose.orientation.w = 1.0 marker.pose.position.x = math.cos(count / 50.0) marker.pose.position.y = math.cos(count / 40.0) marker.pose.position.z = math.cos(count / 30.0) # We add the new marker to the MarkerArray, removing the oldest marker from it when necessary if count > MARKERS_MAX: markerArray.markers.pop(0) markerArray.markers.append(marker) # Renumber the marker IDs id = 0 for m in markerArray.markers: m.id = id id += 1 # Publish the MarkerArray publisher.publish(markerArray) count += 1 rospy.sleep(0.01)
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 13, 3166, 7604, 2133, 29918, 1516, 3174, 29889, 7645, 1053, 4485, 261, 13, 3166, 7604, 2133, 29918, 1516, 3174, 29889, 7645, 1053, 4485, 261, 2588, 13, 5215, 696, 1028, 29891, 13, 5215, 5844, 13, 13, 13010, 353, 376, 20119, 2133, 29918, 22976, 29918, 2378, 29908, 13, 23679, 261, 353, 696, 1028, 29891, 29889, 21076, 1674, 261, 29898, 13010, 29892, 4485, 261, 2588, 29897, 13, 13, 307, 1028, 29891, 29889, 2344, 29918, 3177, 703, 9573, 1159, 13, 13, 22976, 2588, 353, 4485, 261, 2588, 580, 13, 13, 2798, 353, 29871, 29900, 13, 1529, 29934, 29968, 23598, 29918, 12648, 353, 29871, 29896, 29900, 29900, 13, 13, 8000, 451, 696, 1028, 29891, 29889, 275, 29918, 845, 329, 3204, 7295, 13, 13, 1678, 17456, 353, 4485, 261, 580, 13, 1678, 17456, 29889, 6672, 29889, 2557, 29918, 333, 353, 376, 3188, 29918, 2324, 29908, 13, 1678, 17456, 29889, 1853, 353, 17456, 29889, 5550, 5006, 13, 1678, 17456, 29889, 2467, 353, 17456, 29889, 17744, 13, 1678, 17456, 29889, 7052, 29889, 29916, 353, 29871, 29900, 29889, 29906, 13, 1678, 17456, 29889, 7052, 29889, 29891, 353, 29871, 29900, 29889, 29906, 13, 1678, 17456, 29889, 7052, 29889, 29920, 353, 29871, 29900, 29889, 29906, 13, 1678, 17456, 29889, 2780, 29889, 29874, 353, 29871, 29896, 29889, 29900, 13, 1678, 17456, 29889, 2780, 29889, 29878, 353, 29871, 29896, 29889, 29900, 13, 1678, 17456, 29889, 2780, 29889, 29887, 353, 29871, 29896, 29889, 29900, 13, 1678, 17456, 29889, 2780, 29889, 29890, 353, 29871, 29900, 29889, 29900, 13, 1678, 17456, 29889, 4220, 29889, 20659, 29889, 29893, 353, 29871, 29896, 29889, 29900, 13, 1678, 17456, 29889, 4220, 29889, 3283, 29889, 29916, 353, 5844, 29889, 3944, 29898, 2798, 847, 29871, 29945, 29900, 29889, 29900, 29897, 13, 1678, 17456, 29889, 4220, 29889, 3283, 29889, 29891, 353, 5844, 29889, 3944, 29898, 2798, 847, 29871, 29946, 29900, 29889, 29900, 29897, 13, 1678, 17456, 29889, 4220, 29889, 3283, 29889, 29920, 353, 5844, 29889, 3944, 29898, 2798, 847, 29871, 29941, 29900, 29889, 29900, 29897, 13, 13, 1678, 396, 1334, 788, 278, 716, 17456, 304, 278, 4485, 261, 2588, 29892, 11077, 278, 23947, 17456, 515, 372, 746, 5181, 13, 1678, 565, 2302, 1405, 23851, 29968, 23598, 29918, 12648, 29901, 13, 4706, 17456, 2588, 29889, 3502, 414, 29889, 7323, 29898, 29900, 29897, 13, 13, 1678, 17456, 2588, 29889, 3502, 414, 29889, 4397, 29898, 22976, 29897, 13, 13, 1678, 396, 7493, 2807, 278, 17456, 23481, 13, 1678, 1178, 353, 29871, 29900, 13, 1678, 363, 286, 297, 17456, 2588, 29889, 3502, 414, 29901, 13, 4706, 286, 29889, 333, 353, 1178, 13, 4706, 1178, 4619, 29871, 29896, 13, 13, 1678, 396, 12904, 278, 4485, 261, 2588, 13, 1678, 9805, 261, 29889, 23679, 29898, 22976, 2588, 29897, 13, 13, 1678, 2302, 4619, 29871, 29896, 13, 13, 1678, 696, 1028, 29891, 29889, 17059, 29898, 29900, 29889, 29900, 29896, 29897, 13, 2 ]
qa/rpc-tests/cryptoconditions_faucet.py
wallnutkraken/komodo
1
72566
<gh_stars>1-10 #!/usr/bin/env python2 # Copyright (c) 2018 SuperNET developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.test_framework import CryptoconditionsTestFramework from test_framework.authproxy import JSONRPCException from test_framework.util import assert_equal, assert_greater_than, \ initialize_chain_clean, initialize_chain, start_nodes, start_node, connect_nodes_bi, \ stop_nodes, sync_blocks, sync_mempools, wait_bitcoinds, rpc_port, assert_raises from cryptoconditions import assert_success, assert_error, generate_random_string class CryptoconditionsFaucetTest(CryptoconditionsTestFramework): def run_faucet_tests(self): rpc = self.rpc rpc1 = self.rpc1 # basic sanity tests result = rpc.getwalletinfo() assert_greater_than(result['txcount'], 100) assert_greater_than(result['balance'], 0.0) balance = result['balance'] faucet = rpc.faucetaddress() assert_equal(faucet['result'], 'success') # verify all keys look like valid AC addrs, could be better for x in ['myCCaddress', 'FaucetCCaddress', 'Faucetmarker', 'myaddress']: assert_equal(faucet[x][0], 'R') result = rpc.faucetaddress(self.pubkey) assert_success(result) # test that additional CCaddress key is returned for x in ['myCCaddress', 'FaucetCCaddress', 'Faucetmarker', 'myaddress', 'CCaddress']: assert_equal(result[x][0], 'R') # no funds in the faucet yet result = rpc.faucetget() assert_error(result) result = rpc.faucetinfo() assert_success(result) result = rpc.faucetfund("0") assert_error(result) result = rpc.faucetfund("-1") assert_error(result) # we need at least 1 + txfee to get result = rpc.faucetfund("2") assert_success(result) assert result['hex'], "hex key found" # broadcast the xtn result = rpc.sendrawtransaction(result['hex']) txid = result[0] assert txid, "found txid" # we need the tx above to be confirmed in the next block rpc.generate(1) self.sync_all() result = rpc.getwalletinfo() # minus one block reward balance2 = result['balance'] - 100000 # make sure our balance is less now assert_greater_than(balance, balance2) result = rpc.faucetinfo() assert_success(result) assert_greater_than( result['funding'], 0 ) # claiming faucet on second node faucetgethex = rpc1.faucetget() assert_success(faucetgethex) assert faucetgethex['hex'], "hex key found" balance1 = rpc1.getwalletinfo()['balance'] # try to broadcast the faucetget transaction result = self.send_and_mine(faucetgethex['hex'], rpc1) assert txid, "transaction broadcasted" balance2 = rpc1.getwalletinfo()['balance'] assert_greater_than(balance2, balance1) self.sync_all() def run_test(self): print("Mining blocks...") rpc = self.nodes[0] rpc1 = self.nodes[1] # utxos from block 1 become mature in block 101 rpc.generate(101) self.sync_all() rpc.getinfo() rpc1.getinfo() # this corresponds to -pubkey above print("Importing privkeys") rpc.importprivkey(self.privkey) rpc1.importprivkey(self.privkey1) self.run_faucet_tests() if __name__ == '__main__': CryptoconditionsFaucetTest ().main()
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 29906, 13, 29937, 14187, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29896, 29947, 5670, 6006, 18777, 13, 29937, 6652, 7541, 1090, 278, 341, 1806, 7047, 19405, 29892, 1074, 278, 10259, 1384, 292, 13, 29937, 934, 315, 4590, 29979, 4214, 470, 1732, 597, 1636, 29889, 22156, 1167, 29889, 990, 29914, 506, 11259, 29914, 2415, 29899, 506, 1947, 29889, 1961, 29889, 13, 13, 13, 3166, 1243, 29918, 4468, 29889, 1688, 29918, 4468, 1053, 315, 17929, 1116, 2187, 3057, 16660, 13, 3166, 1243, 29918, 4468, 29889, 5150, 14701, 1053, 4663, 29934, 9026, 2451, 13, 3166, 1243, 29918, 4468, 29889, 4422, 1053, 4974, 29918, 11745, 29892, 4974, 29918, 7979, 1008, 29918, 27603, 29892, 320, 13, 1678, 11905, 29918, 14153, 29918, 14941, 29892, 11905, 29918, 14153, 29892, 1369, 29918, 18010, 29892, 1369, 29918, 3177, 29892, 4511, 29918, 18010, 29918, 5365, 29892, 320, 13, 1678, 5040, 29918, 18010, 29892, 16523, 29918, 1271, 29879, 29892, 16523, 29918, 6954, 1129, 3775, 29892, 4480, 29918, 2966, 1111, 12772, 29892, 364, 6739, 29918, 637, 29892, 4974, 29918, 336, 4637, 13, 3166, 274, 17929, 1116, 2187, 1053, 4974, 29918, 8698, 29892, 4974, 29918, 2704, 29892, 5706, 29918, 8172, 29918, 1807, 13, 13, 13, 1990, 315, 17929, 1116, 2187, 29943, 14766, 300, 3057, 29898, 29907, 17929, 1116, 2187, 3057, 16660, 1125, 13, 13, 1678, 822, 1065, 29918, 29888, 14766, 300, 29918, 21150, 29898, 1311, 1125, 13, 4706, 364, 6739, 353, 1583, 29889, 29878, 6739, 13, 4706, 364, 6739, 29896, 353, 1583, 29889, 29878, 6739, 29896, 13, 13, 4706, 396, 6996, 9753, 537, 6987, 13, 4706, 1121, 353, 364, 6739, 29889, 657, 14625, 1026, 3888, 580, 13, 4706, 4974, 29918, 7979, 1008, 29918, 27603, 29898, 2914, 1839, 7508, 2798, 7464, 29871, 29896, 29900, 29900, 29897, 13, 4706, 4974, 29918, 7979, 1008, 29918, 27603, 29898, 2914, 1839, 5521, 749, 7464, 29871, 29900, 29889, 29900, 29897, 13, 4706, 17346, 353, 1121, 1839, 5521, 749, 2033, 13, 13, 4706, 285, 14766, 300, 29871, 353, 364, 6739, 29889, 29888, 14766, 300, 7328, 580, 13, 4706, 4974, 29918, 11745, 29898, 29888, 14766, 300, 1839, 2914, 7464, 525, 8698, 1495, 13, 4706, 396, 11539, 599, 6611, 1106, 763, 2854, 14614, 788, 2288, 29892, 1033, 367, 2253, 13, 4706, 363, 921, 297, 6024, 1357, 4174, 7328, 742, 525, 29943, 14766, 300, 4174, 7328, 742, 525, 29943, 14766, 300, 22976, 742, 525, 1357, 7328, 2033, 29901, 13, 9651, 4974, 29918, 11745, 29898, 29888, 14766, 300, 29961, 29916, 3816, 29900, 1402, 525, 29934, 1495, 13, 13, 4706, 1121, 29871, 353, 364, 6739, 29889, 29888, 14766, 300, 7328, 29898, 1311, 29889, 5467, 1989, 29897, 13, 4706, 4974, 29918, 8698, 29898, 2914, 29897, 13, 4706, 396, 1243, 393, 5684, 19178, 7328, 1820, 338, 4133, 13, 4706, 363, 921, 297, 6024, 1357, 4174, 7328, 742, 525, 29943, 14766, 300, 4174, 7328, 742, 525, 29943, 14766, 300, 22976, 742, 525, 1357, 7328, 742, 525, 4174, 7328, 2033, 29901, 13, 9651, 4974, 29918, 11745, 29898, 2914, 29961, 29916, 3816, 29900, 1402, 525, 29934, 1495, 13, 13, 4706, 396, 694, 29199, 297, 278, 285, 14766, 300, 3447, 13, 4706, 1121, 353, 364, 6739, 29889, 29888, 14766, 300, 657, 580, 13, 4706, 4974, 29918, 2704, 29898, 2914, 29897, 13, 13, 4706, 1121, 353, 364, 6739, 29889, 29888, 14766, 300, 3888, 580, 13, 4706, 4974, 29918, 8698, 29898, 2914, 29897, 13, 13, 4706, 1121, 353, 364, 6739, 29889, 29888, 14766, 300, 27159, 703, 29900, 1159, 13, 4706, 4974, 29918, 2704, 29898, 2914, 29897, 13, 13, 4706, 1121, 353, 364, 6739, 29889, 29888, 14766, 300, 27159, 703, 29899, 29896, 1159, 13, 4706, 4974, 29918, 2704, 29898, 2914, 29897, 13, 13, 4706, 396, 591, 817, 472, 3203, 29871, 29896, 718, 25568, 1725, 29872, 304, 679, 13, 4706, 1121, 353, 364, 6739, 29889, 29888, 14766, 300, 27159, 703, 29906, 1159, 13, 4706, 4974, 29918, 8698, 29898, 2914, 29897, 13, 4706, 4974, 1121, 1839, 20970, 7464, 376, 20970, 1820, 1476, 29908, 13, 13, 4706, 396, 12672, 278, 29871, 486, 29876, 13, 4706, 1121, 353, 364, 6739, 29889, 6717, 1610, 20736, 29898, 2914, 1839, 20970, 11287, 13, 4706, 25568, 333, 259, 353, 1121, 29961, 29900, 29962, 13, 4706, 4974, 25568, 333, 29892, 376, 11940, 25568, 333, 29908, 13, 13, 4706, 396, 591, 817, 278, 25568, 2038, 304, 367, 16725, 297, 278, 2446, 2908, 13, 4706, 364, 6739, 29889, 17158, 29898, 29896, 29897, 13, 4706, 1583, 29889, 16593, 29918, 497, 580, 13, 13, 4706, 1121, 259, 353, 364, 6739, 29889, 657, 14625, 1026, 3888, 580, 13, 4706, 396, 26134, 697, 2908, 20751, 13, 4706, 17346, 29906, 353, 29871, 1121, 1839, 5521, 749, 2033, 448, 29871, 29896, 29900, 29900, 29900, 29900, 29900, 13, 4706, 396, 1207, 1854, 1749, 17346, 338, 3109, 1286, 13, 4706, 4974, 29918, 7979, 1008, 29918, 27603, 29898, 5521, 749, 29892, 17346, 29906, 29897, 13, 13, 4706, 1121, 353, 364, 6739, 29889, 29888, 14766, 300, 3888, 580, 13, 4706, 4974, 29918, 8698, 29898, 2914, 29897, 13, 4706, 4974, 29918, 7979, 1008, 29918, 27603, 29898, 1121, 1839, 27159, 292, 7464, 29871, 29900, 1723, 13, 13, 4706, 396, 5995, 292, 285, 14766, 300, 373, 1473, 2943, 13, 4706, 285, 14766, 300, 657, 20970, 353, 364, 6739, 29896, 29889, 29888, 14766, 300, 657, 580, 13, 4706, 4974, 29918, 8698, 29898, 29888, 14766, 300, 657, 20970, 29897, 13, 4706, 4974, 285, 14766, 300, 657, 20970, 1839, 20970, 7464, 376, 20970, 1820, 1476, 29908, 13, 13, 4706, 17346, 29896, 353, 364, 6739, 29896, 29889, 657, 14625, 1026, 3888, 580, 1839, 5521, 749, 2033, 13, 13, 4706, 396, 1018, 304, 12672, 278, 285, 14766, 300, 657, 10804, 13, 4706, 1121, 353, 1583, 29889, 6717, 29918, 392, 29918, 24669, 29898, 29888, 14766, 300, 657, 20970, 1839, 20970, 7464, 364, 6739, 29896, 29897, 13, 4706, 4974, 25568, 333, 29892, 376, 20736, 12672, 287, 29908, 13, 13, 4706, 17346, 29906, 353, 364, 6739, 29896, 29889, 657, 14625, 1026, 3888, 580, 1839, 5521, 749, 2033, 13, 4706, 4974, 29918, 7979, 1008, 29918, 27603, 29898, 5521, 749, 29906, 29892, 17346, 29896, 29897, 13, 13, 4706, 1583, 29889, 16593, 29918, 497, 580, 13, 13, 1678, 822, 1065, 29918, 1688, 29898, 1311, 1125, 13, 4706, 1596, 703, 29924, 2827, 10930, 856, 1159, 13, 4706, 364, 6739, 353, 1583, 29889, 18010, 29961, 29900, 29962, 13, 4706, 364, 6739, 29896, 353, 1583, 29889, 18010, 29961, 29896, 29962, 13, 4706, 396, 3477, 29916, 359, 515, 2908, 29871, 29896, 4953, 286, 1535, 297, 2908, 29871, 29896, 29900, 29896, 13, 4706, 364, 6739, 29889, 17158, 29898, 29896, 29900, 29896, 29897, 13, 4706, 1583, 29889, 16593, 29918, 497, 580, 13, 4706, 364, 6739, 29889, 657, 3888, 580, 13, 4706, 364, 6739, 29896, 29889, 657, 3888, 580, 13, 4706, 396, 445, 16161, 304, 448, 5467, 1989, 2038, 13, 4706, 1596, 703, 17518, 292, 5999, 8149, 1159, 13, 4706, 364, 6739, 29889, 5215, 22534, 1989, 29898, 1311, 29889, 22534, 1989, 29897, 13, 4706, 364, 6739, 29896, 29889, 5215, 22534, 1989, 29898, 1311, 29889, 22534, 1989, 29896, 29897, 13, 4706, 1583, 29889, 3389, 29918, 29888, 14766, 300, 29918, 21150, 580, 13, 13, 13, 361, 4770, 978, 1649, 1275, 525, 1649, 3396, 1649, 2396, 13, 1678, 315, 17929, 1116, 2187, 29943, 14766, 300, 3057, 313, 467, 3396, 580, 13, 2 ]
models/points_rcnn/__init__.py
periakiva/finding_berries
11
97351
<reponame>periakiva/finding_berries from .faster_rcnn import * from .mask_rcnn import * from .keypoint_rcnn import *
[ 1, 529, 276, 1112, 420, 29958, 546, 24061, 4244, 29914, 2886, 292, 29918, 495, 2722, 13, 3166, 869, 29888, 1901, 29918, 2214, 15755, 1053, 334, 13, 3166, 869, 13168, 29918, 2214, 15755, 1053, 334, 13, 3166, 869, 1989, 3149, 29918, 2214, 15755, 1053, 334, 2 ]
skins.py
shycoldii/agario
0
101524
<reponame>shycoldii/agario import pygame import pygame.gfxdraw import os import random from vector import vector default_skin = "skin1" class Skins: all_skins = None PATH = "./data" @classmethod def init(cls): cls.all_skins = {} all_skins = cls.loadskins() #грузим все скины из папки for name in all_skins.keys(): img = all_skins[name] circle = cls.Image_to_circle(img) cls.all_skins[name] = (circle) @classmethod def loadskins(cls): """Загрузка скинов из папки""" all_img = {} flag = 0 full_names = os.listdir(cls.PATH + "/skins") if "pi19" in full_names: full_names = os.listdir(cls.PATH + "/skins/pi19") flag = 1 for file in full_names: file_name = file.split('.') if True: extension = file_name[-1] #расширение del file_name[-1] file_name = ''.join(file_name) if extension in ("png", "jpg"): if flag: img = pygame.image.load(cls.PATH + "/skins/pi19/" + file_name + '.' + extension).convert() else: img = pygame.image.load(cls.PATH + "/skins/" + file_name + '.' +extension).convert() all_img[file_name] = (img) return all_img @classmethod def get_player_skin(cls): #player_skin = pygame.image.load(cls.PATH + "/skins/skin1.png").convert() #circle = cls.Image_to_circle(player_skin) player_skin = [] if "pi19" in os.listdir(cls.PATH + "/skins"): player_skin.append("g5") player_skin.append("g7") return cls.all_skins[random.choice(player_skin)] else: return cls.all_skins[list(cls.all_skins.keys())[random.randrange(len(list(cls.all_skins.keys())))]] @classmethod def get_rand_skin(cls): skin = list(cls.all_skins.keys())[random.randrange(len(list(cls.all_skins.keys())))] return cls.all_skins[skin] @classmethod def Image_to_circle(cls, img): """Конвертирует картинку в круг""" width = img.get_width() height = img.get_height() if width == height: size = width else: raise ValueError("Одна из картинок имеет неквадратный формат") surface = pygame.Surface((size+1, size+1), pygame.SRCALPHA) center = vector(size / 2, size / 2) radius = int(size/2) for x in range(size): for y in range(size): pos = vector(x, y) if vector.distant(pos, center) < radius**2: color = img.get_at((x, y)) if color[3] != 255: color[3] = 255 #если есть прозрачность if color == (99, 28, 11): color[0] += 1 else: color = (255, 255, 255, 0) # Вне круга будет прозрачный цвет pygame.gfxdraw.pixel(surface, x, y, color) pygame.gfxdraw.aacircle(surface, int(size/2), int(size/2), radius, (0, 0, 0)) surface.set_colorkey((99, 28, 11)) surface = surface.convert_alpha() return surface
[ 1, 529, 276, 1112, 420, 29958, 845, 11078, 1025, 2236, 29914, 351, 2628, 13, 5215, 22028, 13, 5215, 22028, 29889, 29887, 11093, 4012, 13, 5215, 2897, 13, 5215, 4036, 13, 13, 3166, 4608, 1053, 4608, 13, 13, 4381, 29918, 808, 262, 353, 376, 808, 262, 29896, 29908, 13, 13, 1990, 4971, 1144, 29901, 13, 1678, 599, 29918, 808, 1144, 353, 6213, 13, 1678, 23611, 353, 376, 6904, 1272, 29908, 13, 1678, 732, 1990, 5696, 13, 1678, 822, 2069, 29898, 25932, 1125, 13, 4706, 1067, 29879, 29889, 497, 29918, 808, 1144, 353, 6571, 13, 4706, 599, 29918, 808, 1144, 353, 1067, 29879, 29889, 1359, 808, 1144, 580, 396, 29969, 1086, 1916, 29959, 6495, 531, 717, 933, 1866, 4554, 29964, 717, 13, 4706, 363, 1024, 297, 599, 29918, 808, 1144, 29889, 8149, 7295, 13, 9651, 10153, 353, 599, 29918, 808, 1144, 29961, 978, 29962, 13, 9651, 8607, 353, 1067, 29879, 29889, 2940, 29918, 517, 29918, 16622, 29898, 2492, 29897, 13, 9651, 1067, 29879, 29889, 497, 29918, 808, 1144, 29961, 978, 29962, 353, 313, 16622, 29897, 13, 13, 1678, 732, 1990, 5696, 13, 1678, 822, 2254, 808, 1144, 29898, 25932, 1125, 13, 4706, 9995, 15578, 29969, 1086, 29972, 642, 531, 717, 2835, 1866, 4554, 29964, 717, 15945, 29908, 13, 4706, 599, 29918, 2492, 353, 6571, 13, 4706, 7353, 353, 29871, 29900, 13, 4706, 2989, 29918, 7039, 353, 2897, 29889, 1761, 3972, 29898, 25932, 29889, 10145, 718, 5591, 808, 1144, 1159, 13, 4706, 565, 376, 1631, 29896, 29929, 29908, 297, 2989, 29918, 7039, 29901, 13, 9651, 2989, 29918, 7039, 353, 2897, 29889, 1761, 3972, 29898, 25932, 29889, 10145, 718, 5591, 808, 1144, 29914, 1631, 29896, 29929, 1159, 13, 9651, 7353, 353, 29871, 29896, 13, 4706, 363, 934, 297, 2989, 29918, 7039, 29901, 13, 9651, 934, 29918, 978, 353, 934, 29889, 5451, 12839, 1495, 13, 9651, 565, 5852, 29901, 13, 18884, 6081, 353, 934, 29918, 978, 14352, 29896, 29962, 396, 494, 29935, 1911, 587, 1755, 13, 18884, 628, 934, 29918, 978, 14352, 29896, 29962, 13, 18884, 934, 29918, 978, 353, 525, 4286, 7122, 29898, 1445, 29918, 978, 29897, 13, 18884, 565, 6081, 297, 4852, 2732, 613, 376, 6173, 29908, 1125, 13, 462, 1678, 565, 7353, 29901, 13, 462, 4706, 10153, 353, 22028, 29889, 3027, 29889, 1359, 29898, 25932, 29889, 10145, 718, 5591, 808, 1144, 29914, 1631, 29896, 29929, 12975, 718, 934, 29918, 978, 718, 525, 6169, 718, 6081, 467, 13441, 580, 13, 462, 1678, 1683, 29901, 13, 462, 4706, 10153, 353, 22028, 29889, 3027, 29889, 1359, 29898, 25932, 29889, 10145, 718, 5591, 808, 1144, 12975, 718, 934, 29918, 978, 718, 525, 6169, 718, 17588, 467, 13441, 580, 13, 462, 1678, 599, 29918, 2492, 29961, 1445, 29918, 978, 29962, 353, 313, 2492, 29897, 13, 4706, 736, 599, 29918, 2492, 13, 13, 1678, 732, 1990, 5696, 13, 1678, 822, 679, 29918, 9106, 29918, 808, 262, 29898, 25932, 1125, 13, 13, 4706, 396, 9106, 29918, 808, 262, 353, 22028, 29889, 3027, 29889, 1359, 29898, 25932, 29889, 10145, 718, 5591, 808, 1144, 29914, 808, 262, 29896, 29889, 2732, 2564, 13441, 580, 13, 4706, 396, 16622, 353, 1067, 29879, 29889, 2940, 29918, 517, 29918, 16622, 29898, 9106, 29918, 808, 262, 29897, 13, 4706, 4847, 29918, 808, 262, 353, 5159, 13, 4706, 565, 376, 1631, 29896, 29929, 29908, 297, 2897, 29889, 1761, 3972, 29898, 25932, 29889, 10145, 718, 5591, 808, 1144, 29908, 1125, 13, 9651, 4847, 29918, 808, 262, 29889, 4397, 703, 29887, 29945, 1159, 13, 9651, 4847, 29918, 808, 262, 29889, 4397, 703, 29887, 29955, 1159, 13, 9651, 736, 1067, 29879, 29889, 497, 29918, 808, 1144, 29961, 8172, 29889, 16957, 29898, 9106, 29918, 808, 262, 4638, 13, 4706, 1683, 29901, 13, 9651, 736, 1067, 29879, 29889, 497, 29918, 808, 1144, 29961, 1761, 29898, 25932, 29889, 497, 29918, 808, 1144, 29889, 8149, 3101, 29961, 8172, 29889, 9502, 3881, 29898, 2435, 29898, 1761, 29898, 25932, 29889, 497, 29918, 808, 1144, 29889, 8149, 22130, 4638, 29962, 13, 13, 1678, 732, 1990, 5696, 13, 1678, 822, 679, 29918, 9502, 29918, 808, 262, 29898, 25932, 1125, 13, 4706, 19309, 353, 1051, 29898, 25932, 29889, 497, 29918, 808, 1144, 29889, 8149, 3101, 29961, 8172, 29889, 9502, 3881, 29898, 2435, 29898, 1761, 29898, 25932, 29889, 497, 29918, 808, 1144, 29889, 8149, 22130, 4638, 13, 4706, 736, 1067, 29879, 29889, 497, 29918, 808, 1144, 29961, 808, 262, 29962, 13, 13, 1678, 732, 1990, 5696, 13, 1678, 822, 7084, 29918, 517, 29918, 16622, 29898, 25932, 29892, 10153, 1125, 13, 4706, 9995, 30014, 2031, 3531, 811, 1086, 1257, 10766, 7894, 1382, 490, 1186, 21506, 15945, 29908, 13, 4706, 2920, 353, 10153, 29889, 657, 29918, 2103, 580, 13, 4706, 3171, 353, 10153, 29889, 657, 29918, 3545, 580, 13, 4706, 565, 2920, 1275, 3171, 29901, 13, 9651, 2159, 353, 2920, 13, 4706, 1683, 29901, 13, 9651, 12020, 7865, 2392, 703, 30038, 8987, 1866, 10766, 811, 13738, 26780, 1538, 11691, 17955, 24885, 9116, 18992, 1159, 13, 13, 4706, 7101, 353, 22028, 29889, 18498, 2161, 3552, 2311, 29974, 29896, 29892, 2159, 29974, 29896, 511, 22028, 29889, 29903, 10363, 1964, 29925, 15715, 29897, 13, 4706, 4818, 353, 4608, 29898, 2311, 847, 29871, 29906, 29892, 2159, 847, 29871, 29906, 29897, 13, 4706, 11855, 353, 938, 29898, 2311, 29914, 29906, 29897, 13, 13, 4706, 363, 921, 297, 3464, 29898, 2311, 1125, 13, 9651, 363, 343, 297, 3464, 29898, 2311, 1125, 13, 18884, 926, 353, 4608, 29898, 29916, 29892, 343, 29897, 13, 18884, 565, 4608, 29889, 5721, 424, 29898, 1066, 29892, 4818, 29897, 529, 11855, 1068, 29906, 29901, 13, 462, 1678, 2927, 353, 10153, 29889, 657, 29918, 271, 3552, 29916, 29892, 343, 876, 13, 462, 1678, 565, 2927, 29961, 29941, 29962, 2804, 29871, 29906, 29945, 29945, 29901, 13, 462, 4706, 2927, 29961, 29941, 29962, 353, 29871, 29906, 29945, 29945, 13, 462, 4706, 396, 4449, 644, 12795, 1471, 29972, 494, 4913, 2321, 13, 462, 1678, 565, 2927, 1275, 313, 29929, 29929, 29892, 29871, 29906, 29947, 29892, 29871, 29896, 29896, 1125, 13, 462, 4706, 2927, 29961, 29900, 29962, 4619, 29871, 29896, 13, 18884, 1683, 29901, 13, 462, 1678, 2927, 353, 313, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29900, 29897, 13, 462, 1678, 396, 939, 821, 1186, 1086, 1779, 23618, 29932, 1471, 29972, 494, 19705, 3716, 7616, 13, 18884, 22028, 29889, 29887, 11093, 4012, 29889, 29886, 15711, 29898, 7610, 2161, 29892, 921, 29892, 343, 29892, 2927, 29897, 13, 13, 4706, 22028, 29889, 29887, 11093, 4012, 29889, 29874, 562, 2076, 280, 29898, 7610, 2161, 29892, 938, 29898, 2311, 29914, 29906, 511, 938, 29898, 2311, 29914, 29906, 511, 11855, 29892, 313, 29900, 29892, 29871, 29900, 29892, 29871, 29900, 876, 13, 4706, 7101, 29889, 842, 29918, 2780, 1989, 3552, 29929, 29929, 29892, 29871, 29906, 29947, 29892, 29871, 29896, 29896, 876, 13, 4706, 7101, 353, 7101, 29889, 13441, 29918, 2312, 580, 13, 4706, 736, 7101, 13, 13, 13, 13, 2 ]
treadmill_pipeline/treadmill.py
ttngu207/project-treadmill
0
22134
import numpy as np import datajoint as dj from treadmill_pipeline import project_database_prefix from ephys.utilities import ingestion, time_sync from ephys import get_schema_name schema = dj.schema(project_database_prefix + 'treadmill_pipeline') reference = dj.create_virtual_module('reference', get_schema_name('reference')) acquisition = dj.create_virtual_module('acquisition', get_schema_name('acquisition')) behavior = dj.create_virtual_module('behavior', get_schema_name('behavior')) @schema class TreadmillTracking(dj.Imported): definition = """ # session-level tracking data from the treadmill_pipeline(s) employed in the experiment -> acquisition.Session treadmill_tracking_time: datetime # start time of this treadmill_pipeline speed recording --- treadmill_tracking_name: varchar(40) # user-assign name of this treadmill_pipeline tracking (e.g. 27032019laserSess1) treadmill_timestamps: blob@ephys_store # (s) timestamps of the treadmill_pipeline speed samples """ class TreadmillSync(dj.Part): definition = """ -> master --- sync_master_clock: varchar(128) # name of the sync-master track_sync_data=null: blob@ephys_store # sync data (binary) track_time_zero=null: float # (s) the first time point of this tracking track_sync_timestamps=null: blob@ephys_store # (s) timestamps of sync data in tracking clock track_sync_master_timestamps=null: blob@ephys_store # (s) timestamps of sync data in master clock """ class Speed(dj.Part): definition = """ -> master treadmill_name: varchar(32) --- treadmill_speed: blob@ephys_store # (s) treadmill_pipeline speed at each timestamp """ key_source = acquisition.Session & acquisition.Recording # wait for recording to be ingested first before tracking def make(self, key): input_dir = ingestion.find_input_directory(key) if not input_dir: print(f'{input_dir} not found in this machine, skipping...') return rec_type, recordings = ingestion.get_recordings(input_dir) if rec_type in ('neuropixels', 'neurologger'): # if 'neuropixels' recording, check for OptiTrack's `motive` or `.csv` opti_list = ingestion.get_optitrack(input_dir) if not opti_list: raise FileNotFoundError('No OptiTrack "matmot.mtv" or ".csv" found') for opti in opti_list: if 'Format Version' not in opti.meta: raise NotImplementedError('Treadmill data ingest from type other than "optitrack.csv" not implemented') secondary_data = opti.secondary_data if 'Treadmill' not in secondary_data: raise KeyError('No "Treadmill" found in the secondary data of optitrack.csv') treadmill_key = dict(key, treadmill_tracking_time=opti.recording_time) self.insert1(dict(treadmill_key, treadmill_tracking_name=opti.tracking_name, # name of the session folder treadmill_timestamps=secondary_data['t'])) if hasattr(opti, 'sync_data'): self.TreadmillSync.insert1(dict(treadmill_key, sync_master_clock=opti.sync_data['master_name'], track_time_zero=secondary_data['t'][0], track_sync_timestamps=opti.sync_data['slave'], track_sync_master_timestamps=opti.sync_data['master'])) else: # data presynced with tracking-recording pair, # still need for a linear shift from session start to the recording this tracking is synced to self.TrackingSync.insert1(time_sync.create_tracking_sync_data( treadmill_key, np.array([secondary_data['t'][0], secondary_data['t'][-1]]))) self.Speed.insert1([dict(treadmill_key, treadmill_name=k, treadmill_speed=v['speed']) for k, v in secondary_data['Treadmill'].items()]) print(f'Insert {len(opti_list)} treadmill_pipeline tracking(s): {input_dir.stem}') else: raise NotImplementedError(f'Treadmill Tracking ingestion for recording type {rec_type} not implemented')
[ 1, 1053, 12655, 408, 7442, 13, 5215, 848, 12090, 408, 270, 29926, 13, 13, 3166, 260, 949, 19958, 29918, 13096, 5570, 1053, 2060, 29918, 9803, 29918, 13506, 13, 3166, 321, 14017, 29889, 4422, 1907, 1053, 2348, 602, 29892, 931, 29918, 16593, 13, 3166, 321, 14017, 1053, 679, 29918, 11010, 29918, 978, 13, 13, 13, 11010, 353, 270, 29926, 29889, 11010, 29898, 4836, 29918, 9803, 29918, 13506, 718, 525, 29873, 949, 19958, 29918, 13096, 5570, 1495, 13, 13, 5679, 353, 270, 29926, 29889, 3258, 29918, 18714, 29918, 5453, 877, 5679, 742, 679, 29918, 11010, 29918, 978, 877, 5679, 8785, 13, 562, 23493, 353, 270, 29926, 29889, 3258, 29918, 18714, 29918, 5453, 877, 562, 23493, 742, 679, 29918, 11010, 29918, 978, 877, 562, 23493, 8785, 13, 915, 16300, 353, 270, 29926, 29889, 3258, 29918, 18714, 29918, 5453, 877, 915, 16300, 742, 679, 29918, 11010, 29918, 978, 877, 915, 16300, 8785, 13, 13, 13, 29992, 11010, 13, 1990, 323, 949, 19958, 17936, 292, 29898, 19776, 29889, 17518, 287, 1125, 13, 1678, 5023, 353, 9995, 29871, 396, 4867, 29899, 5563, 23110, 848, 515, 278, 260, 949, 19958, 29918, 13096, 5570, 29898, 29879, 29897, 15723, 297, 278, 7639, 13, 1678, 1599, 1274, 23493, 29889, 7317, 13, 1678, 260, 949, 19958, 29918, 11294, 292, 29918, 2230, 29901, 3986, 12865, 4706, 396, 1369, 931, 310, 445, 260, 949, 19958, 29918, 13096, 5570, 6210, 16867, 13, 1678, 11474, 13, 1678, 260, 949, 19958, 29918, 11294, 292, 29918, 978, 29901, 29871, 15236, 29898, 29946, 29900, 29897, 308, 396, 1404, 29899, 16645, 1024, 310, 445, 260, 949, 19958, 29918, 13096, 5570, 23110, 313, 29872, 29889, 29887, 29889, 29871, 29906, 29955, 29900, 29941, 29906, 29900, 29896, 29929, 3333, 261, 29903, 404, 29896, 29897, 13, 1678, 260, 949, 19958, 29918, 9346, 342, 15092, 29901, 1678, 23755, 29992, 29872, 14017, 29918, 8899, 1678, 396, 313, 29879, 29897, 5335, 342, 15092, 310, 278, 260, 949, 19958, 29918, 13096, 5570, 6210, 11916, 13, 1678, 9995, 13, 13, 1678, 770, 323, 949, 19958, 21077, 29898, 19776, 29889, 7439, 1125, 13, 4706, 5023, 353, 9995, 13, 4706, 1599, 5835, 13, 4706, 11474, 13, 4706, 16523, 29918, 6207, 29918, 13058, 29901, 462, 29871, 15236, 29898, 29896, 29906, 29947, 29897, 4706, 396, 1024, 310, 278, 16523, 29899, 6207, 29871, 13, 4706, 5702, 29918, 16593, 29918, 1272, 29922, 4304, 29901, 1669, 23755, 29992, 29872, 14017, 29918, 8899, 1678, 396, 16523, 848, 313, 19541, 29897, 13, 4706, 5702, 29918, 2230, 29918, 9171, 29922, 4304, 29901, 1669, 5785, 1669, 396, 313, 29879, 29897, 278, 937, 931, 1298, 310, 445, 23110, 13, 4706, 5702, 29918, 16593, 29918, 9346, 342, 15092, 29922, 4304, 29901, 308, 23755, 29992, 29872, 14017, 29918, 8899, 1678, 396, 313, 29879, 29897, 5335, 342, 15092, 310, 16523, 848, 297, 23110, 12006, 13, 4706, 5702, 29918, 16593, 29918, 6207, 29918, 9346, 342, 15092, 29922, 4304, 29901, 29871, 23755, 29992, 29872, 14017, 29918, 8899, 1678, 396, 313, 29879, 29897, 5335, 342, 15092, 310, 16523, 848, 297, 5835, 12006, 13, 4706, 9995, 13, 13, 1678, 770, 24839, 29898, 19776, 29889, 7439, 1125, 13, 4706, 5023, 353, 9995, 13, 4706, 1599, 5835, 13, 4706, 260, 949, 19958, 29918, 978, 29901, 15236, 29898, 29941, 29906, 29897, 13, 4706, 11474, 13, 4706, 260, 949, 19958, 29918, 19322, 29901, 23755, 29992, 29872, 14017, 29918, 8899, 1678, 396, 313, 29879, 29897, 260, 949, 19958, 29918, 13096, 5570, 6210, 472, 1269, 14334, 13, 4706, 9995, 13, 13, 1678, 1820, 29918, 4993, 353, 1274, 23493, 29889, 7317, 669, 1274, 23493, 29889, 4789, 3278, 29871, 396, 4480, 363, 16867, 304, 367, 2348, 2868, 937, 1434, 23110, 13, 13, 1678, 822, 1207, 29898, 1311, 29892, 1820, 1125, 13, 4706, 1881, 29918, 3972, 353, 2348, 602, 29889, 2886, 29918, 2080, 29918, 12322, 29898, 1989, 29897, 13, 4706, 565, 451, 1881, 29918, 3972, 29901, 13, 9651, 1596, 29898, 29888, 29915, 29912, 2080, 29918, 3972, 29913, 451, 1476, 297, 445, 4933, 29892, 14993, 3262, 856, 1495, 13, 9651, 736, 13, 13, 4706, 1162, 29918, 1853, 29892, 2407, 886, 353, 2348, 602, 29889, 657, 29918, 11651, 886, 29898, 2080, 29918, 3972, 29897, 13, 13, 4706, 565, 1162, 29918, 1853, 297, 6702, 484, 4131, 861, 1379, 742, 525, 484, 2192, 21707, 29374, 29871, 396, 565, 525, 484, 4131, 861, 1379, 29915, 16867, 29892, 1423, 363, 20693, 29875, 17936, 29915, 29879, 421, 14817, 573, 29952, 470, 5050, 7638, 29952, 13, 9651, 3523, 29875, 29918, 1761, 353, 2348, 602, 29889, 657, 29918, 3670, 277, 22282, 29898, 2080, 29918, 3972, 29897, 13, 9651, 565, 451, 3523, 29875, 29918, 1761, 29901, 13, 18884, 12020, 3497, 17413, 2392, 877, 3782, 20693, 29875, 17936, 376, 2922, 14817, 29889, 4378, 29894, 29908, 470, 29871, 11393, 7638, 29908, 1476, 1495, 13, 13, 9651, 363, 3523, 29875, 297, 3523, 29875, 29918, 1761, 29901, 13, 18884, 565, 525, 5809, 10079, 29915, 451, 297, 3523, 29875, 29889, 7299, 29901, 13, 462, 1678, 12020, 2216, 1888, 2037, 287, 2392, 877, 29911, 949, 19958, 848, 2348, 342, 515, 1134, 916, 1135, 376, 3670, 277, 22282, 29889, 7638, 29908, 451, 8762, 1495, 13, 13, 18884, 16723, 29918, 1272, 353, 3523, 29875, 29889, 7496, 653, 29918, 1272, 13, 18884, 565, 525, 29911, 949, 19958, 29915, 451, 297, 16723, 29918, 1272, 29901, 13, 462, 1678, 12020, 7670, 2392, 877, 3782, 376, 29911, 949, 19958, 29908, 1476, 297, 278, 16723, 848, 310, 3523, 277, 22282, 29889, 7638, 1495, 13, 13, 18884, 260, 949, 19958, 29918, 1989, 353, 9657, 29898, 1989, 29892, 260, 949, 19958, 29918, 11294, 292, 29918, 2230, 29922, 3670, 29875, 29889, 3757, 3278, 29918, 2230, 29897, 13, 18884, 1583, 29889, 7851, 29896, 29898, 8977, 29898, 29873, 949, 19958, 29918, 1989, 29892, 13, 462, 462, 29871, 260, 949, 19958, 29918, 11294, 292, 29918, 978, 29922, 3670, 29875, 29889, 11294, 292, 29918, 978, 29892, 29871, 396, 1024, 310, 278, 4867, 4138, 13, 462, 462, 29871, 260, 949, 19958, 29918, 9346, 342, 15092, 29922, 7496, 653, 29918, 1272, 1839, 29873, 25901, 13, 13, 18884, 565, 756, 5552, 29898, 3670, 29875, 29892, 525, 16593, 29918, 1272, 29374, 13, 462, 1678, 1583, 29889, 29911, 949, 19958, 21077, 29889, 7851, 29896, 29898, 8977, 29898, 29873, 949, 19958, 29918, 1989, 29892, 13, 462, 462, 462, 1678, 16523, 29918, 6207, 29918, 13058, 29922, 3670, 29875, 29889, 16593, 29918, 1272, 1839, 6207, 29918, 978, 7464, 13, 462, 462, 462, 1678, 5702, 29918, 2230, 29918, 9171, 29922, 7496, 653, 29918, 1272, 1839, 29873, 2033, 29961, 29900, 1402, 13, 462, 462, 462, 1678, 5702, 29918, 16593, 29918, 9346, 342, 15092, 29922, 3670, 29875, 29889, 16593, 29918, 1272, 1839, 29879, 18398, 7464, 13, 462, 462, 462, 1678, 5702, 29918, 16593, 29918, 6207, 29918, 9346, 342, 15092, 29922, 3670, 29875, 29889, 16593, 29918, 1272, 1839, 6207, 25901, 13, 18884, 1683, 29901, 29871, 396, 848, 2225, 948, 1133, 411, 23110, 29899, 3757, 3278, 5101, 29892, 13, 462, 539, 396, 1603, 817, 363, 263, 5608, 9500, 515, 4867, 1369, 304, 278, 16867, 445, 23110, 338, 5222, 1133, 304, 13, 462, 1678, 1583, 29889, 17936, 292, 21077, 29889, 7851, 29896, 29898, 2230, 29918, 16593, 29889, 3258, 29918, 11294, 292, 29918, 16593, 29918, 1272, 29898, 13, 462, 4706, 260, 949, 19958, 29918, 1989, 29892, 7442, 29889, 2378, 4197, 7496, 653, 29918, 1272, 1839, 29873, 2033, 29961, 29900, 1402, 16723, 29918, 1272, 1839, 29873, 2033, 14352, 29896, 5262, 4961, 13, 13, 18884, 1583, 29889, 26539, 29889, 7851, 29896, 4197, 8977, 29898, 29873, 949, 19958, 29918, 1989, 29892, 260, 949, 19958, 29918, 978, 29922, 29895, 29892, 260, 949, 19958, 29918, 19322, 29922, 29894, 1839, 19322, 11287, 13, 462, 462, 1678, 363, 413, 29892, 325, 297, 16723, 29918, 1272, 1839, 29911, 949, 19958, 13359, 7076, 580, 2314, 13, 13, 9651, 1596, 29898, 29888, 29915, 17491, 426, 2435, 29898, 3670, 29875, 29918, 1761, 2915, 260, 949, 19958, 29918, 13096, 5570, 23110, 29898, 29879, 1125, 426, 2080, 29918, 3972, 29889, 303, 331, 29913, 1495, 13, 13, 4706, 1683, 29901, 13, 9651, 12020, 2216, 1888, 2037, 287, 2392, 29898, 29888, 29915, 29911, 949, 19958, 17026, 292, 2348, 602, 363, 16867, 1134, 426, 3757, 29918, 1853, 29913, 451, 8762, 1495, 13, 2 ]
bookapp/views.py
RafaCucurull/Bookiernes
0
139445
from django.http import HttpResponseRedirect, HttpResponse from django.shortcuts import render, redirect from bookapp import models from bookapp.forms import AfegirLlibreForm, SolicitarImatgesForm, SolicitarMaquetacioForm, PujarMaquetacio, pujarImatge, \ SolicitarPublicacioForm, EnviarMissatgeForm, SolicitarTraduccioForm from bookapp.models import Llibre, TematiquesLlibre, Comentari, Notificacio, Tematica, Imatge, Missatge from users.forms import ConfiguracioForm from users.models import CustomUser from django.core.files.storage import FileSystemStorage from datetime import datetime import PyPDF2 from translate import Translator from fpdf import FPDF from django.urls import reverse from django.core.files.base import File def homePage(request): return render(request, "home.html") def Escriptori(request): global llibres usuari = CustomUser.objects.get(email=request.user) if not usuari.is_Treballador: return render(request, "home.html") if usuari.is_Editor: llibres = Llibre.objects.filter(editor=usuari) if usuari.is_Escriptor: llibres = Llibre.objects.filter(escriptor=usuari) if usuari.is_Dissenyador: llibres = Llibre.objects.filter(dissenyador=usuari) if usuari.is_Maquetacio: llibres = Llibre.objects.filter(maquetador=usuari) if usuari.is_IT: llibres = Llibre.objects.filter(it=usuari) tematiques = list() for llibre in llibres: tematiques.append(TematiquesLlibre.objects.filter(llibre=llibre)) mylist = zip(llibres, tematiques) llibreshtml = { "object_list": llibres, "mylist": mylist } if usuari.is_Escriptor: return render(request, "escriptori_escriptor.html", llibreshtml) if usuari.is_Editor: return render(request, "escriptori_editor.html", llibreshtml) if usuari.is_Dissenyador: return render(request, "escriptori_maquetador_dissenyador.html", llibreshtml) if usuari.is_Maquetacio: return render(request, "escriptori_maquetador_dissenyador.html", llibreshtml) if usuari.is_IT: return render(request, "escriptori_it.html", llibreshtml) def afegirLlibre(request): if request.method == 'POST': form = AfegirLlibreForm(request.POST, request.FILES) if form.is_valid(): obj = form.save() afegirDocuments(obj) seleccionar_editor(obj) obj.escriptor = request.user obj.save() return redirect('/escriptori') else: form = AfegirLlibreForm() return render(request, "afegirllibre.html", {'form': form}) def afegirDocuments(llibre): with open('text.txt') as f: llibre.textPla.save('text', File(f)) with open('text.txt') as f: llibre.pdf_retall.save('retall', File(f)) with open('text.txt') as esdoc: llibre.es.save('es', File(esdoc)) with open('text.txt') as g: llibre.es_retall.save('esRetall', File(g)) with open('text.txt') as g: llibre.en.save('en', File(g)) with open('text.txt') as h: llibre.en_retall.save('enRetall', File(h)) with open('text.txt') as g: llibre.pt.save('pt', File(g)) with open('text.txt') as h: llibre.pt_retall.save('ptRetall', File(h)) with open('text.txt') as g: llibre.zh.save('zh', File(g)) with open('text.txt') as h: llibre.zh_retall.save('zhRetall', File(h)) def seleccionar_editor(llibre): editors_lliures = CustomUser.objects.filter(is_Editor=True, lliure=True) editoraux = editors_lliures[0] llibre.editor = editoraux editor = CustomUser.objects.get(email=editoraux) # editor.lliure = False editor.save() notificacio = Notificacio() notificacio.missatge = "Tens un nou llibre assignat" notificacio.usuari = editoraux data = datetime.now() notificacio.data = data notificacio.llibre = llibre notificacio.save() def areaedicio(request, pk): llibre = Llibre.objects.get(pk=pk) context = { "llibre": llibre } return render(request, 'area_edicio.html', context) def enviarmissatge(request): if request.method == 'POST': form = EnviarMissatgeForm(request.POST) if form.is_valid(): obj = form.save() obj.autor = request.user obj.save() return redirect(request.path_info) else: form = EnviarMissatgeForm() context = { 'form': form } return render(request, "missatge.html", context) def areaescriptor(request, pk): llibre = Llibre.objects.get(pk=pk) context = { "llibre": llibre } return render(request, 'area_escriptor.html', context) def areait(request, pk): llibre = Llibre.objects.get(pk=pk) context = { "llibre": llibre } return render(request, 'area_escriptor.html', context) def enviarnovaversio(request, pk): llibre = Llibre.objects.get(pk=pk) context = { "llibrehtml": llibre } if request.method == "POST" and request.FILES['pdf']: pdf = request.FILES['pdf'] print(pdf) fs = FileSystemStorage() filename = fs.save(pdf.name, pdf) llibre.pdf = fs.url(filename) print(llibre.pdf) llibre.save() return redirect(reverse('areaescriptor', kwargs={'pk': pk})) return render(request, 'enviar_nova_versio.html', context) def commentseditor(request, pk): llibre = Llibre.objects.get(pk=pk) usuari = CustomUser.objects.get(email=request.user) comentaris = Comentari.objects.filter(usuari=usuari, llibre=llibre) context = { "llibre": llibre, "usuari": usuari, "comentaris": comentaris } if request.method == "POST": titol = request.POST.get('titol') descripcio = request.POST.get('descripcio') nou_comentari = Comentari() nou_comentari.usuari = request.user nou_comentari.titol = titol nou_comentari.descripcio = descripcio nou_comentari.llibre = Llibre.objects.get(pk=pk) nou_comentari.save() notificarEscriptorComentari(Llibre.objects.get(pk=pk)) return render(request, 'comments_editor.html', context) def dirbateriaimatges(request, pk): llibre = Llibre.objects.get(pk=pk) context = { "llibre": llibre, } return render(request, 'directori_imatges.html', context) def dirmaquetacions(request, pk): llibre = Llibre.objects.get(pk=pk) context = { "llibre": llibre, } return render(request, 'directori_maquetacions.html', context) def notificarEscriptorComentari(llibre): notificacio = Notificacio() notificacio.missatge = "Tens un comentari pendent de revisar" notificacio.usuari = llibre.escriptor notificacio.llibre = llibre data = datetime.now() notificacio.data = data notificacio.save() def canviardocument(request, pk): llibre = Llibre.objects.get(pk=pk) context = { "llibre": llibre } if request.method == "POST" and request.FILES['pdf']: pdf = request.FILES['pdf'] print(pdf) fs = FileSystemStorage() filename = fs.save(pdf.name, pdf) llibre.pdf = fs.url(filename) print(llibre.pdf) llibre.save() return redirect(reverse('areaedicio', kwargs={'pk': pk})) return render(request, 'canviar_document.html', context) def notificacions(request): notificacions = Notificacio.objects.filter(usuari=request.user) context = { "object_list": notificacions } return render(request, "notificacions.html", context) def veuremissatge(request): missatges = Missatge.objects.filter(destinatari=request.user) context = { "object_list": missatges } return render(request, "veuremissatge.html", context) def comments(request, pk): llibre = Llibre.objects.get(pk=pk) comentaris = Comentari.objects.filter(llibre=llibre) context = { "llibre": llibre, "comentaris": comentaris } return render(request, 'comments.html', context) def cataleg(request): qs = filtrar(request) print(qs) for llibre in qs: print(llibre.nom_llibre) context = { 'queryset': qs, 'tematiques': Tematica.objects.all() } return render(request, "cataleg.html", context) def filtrar(request): queryset = Llibre.objects.all() tematiques = Tematica.objects.all() escriptor = CustomUser.objects.filter(is_Escriptor=True) titol = request.GET.get('titol') autor = request.GET.get('autor') colleccio = request.GET.get('collecio') min_pagines = request.GET.get('pagines_min') max_pagines = request.GET.get('pagines_max') tematica = request.GET.get('tematica') if is_valid(titol): queryset = queryset.filter(nom_llibre__icontains=titol) if is_valid(autor): queryset = queryset.filter(escriptor__nom__icontains=autor) if is_valid(colleccio): queryset = queryset.filter(coleccio__icontains=colleccio) if is_valid(min_pagines): queryset = queryset.filter(num_pagines__gte=min_pagines) if is_valid(max_pagines): queryset = queryset.filter(num_pagines__lt=max_pagines) if is_valid(tematica) and tematica != 'Tria...': queryset = queryset.filter(tematiques__nom_tematica=tematica) return queryset def is_valid(param): return param != '' and param is not None def publicarllibre(request, pk): llibre = Llibre.objects.get(pk=pk) llibreshtml = { "llibre": llibre, } if request.method == "POST": llibre.publicat = True llibre.save() notificarEditorPublicat(llibre) notificarITPublicat(llibre) return redirect('/escriptori') return render(request, "publicarllibre.html", llibreshtml) def notificarEditorPublicat(llibre): editor = llibre.editor notificacio = Notificacio() notificacio.missatge = "El llibre que has estat editant ja ha estat publicat a la Web" notificacio.usuari = editor data = datetime.now() notificacio.data = data notificacio.llibre = llibre notificacio.save() def notificarITPublicat(llibre): it = llibre.it notificacio = Notificacio() notificacio.missatge = "El llibre que tenies assignat ja ha estat publicat a la Web" notificacio.usuari = it data = datetime.now() notificacio.data = data notificacio.llibre = llibre notificacio.save() def galeriaImatges(request, pk): llibre = Llibre.objects.get(pk=pk) context = { 'imatges': llibre.imatges.all(), 'llibre': llibre, } return render(request, "galeria_imatges.html", context) def solicitudImatges(request, pk): llibre = Llibre.objects.get(pk=pk) if request.method == 'POST': form = SolicitarImatgesForm(request.POST) if form.is_valid(): obj = form.save() obj.llibre = llibre obj.editor = request.user seleccionar_dissenyador(obj, llibre) obj.save() return redirect(reverse('areaedicio', kwargs={'pk': pk})) else: form = SolicitarImatgesForm() context = { 'llibre': llibre, 'form': form } return render(request, "solicitud_imatges.html", context) def seleccionar_dissenyador(solicitud, llibre): dissenyadors_lliures = CustomUser.objects.filter(is_Dissenyador=True, lliure=True) dissenyadoraux = dissenyadors_lliures[0] llibre.dissenyador = dissenyadoraux llibre.save() solicitud.dissenyador = dissenyadoraux dissenyador = CustomUser.objects.get(email=dissenyadoraux) # dissenyador.lliure = False dissenyador.save() notificacio = Notificacio() notificacio.missatge = "Tens un nova sol·licitud d'imatges assignada" notificacio.usuari = dissenyadoraux data = datetime.now() notificacio.data = data notificacio.llibre = llibre notificacio.save() def galeriaMaquetacions(request, pk): llibre = Llibre.objects.get(pk=pk) maquetacio = llibre.maquetacio context = { "llibre": llibre, "maquetacio": maquetacio } return render(request, "galeria_maquetacions.html", context) def solicitudmaquetacio(request, pk): llibre = Llibre.objects.get(pk=pk) if request.method == 'POST': form = SolicitarMaquetacioForm(request.POST) if form.is_valid(): obj = form.save() obj.llibre = llibre obj.editor = request.user seleccionar_maquetador(obj, llibre) obj.save() return redirect(reverse('areaedicio', kwargs={'pk': pk})) else: form = SolicitarMaquetacioForm() return render(request, "enviar_llibre_maquetar.html", {'form': form}) def seleccionar_maquetador(solicitud, llibre): maquetador_lliures = CustomUser.objects.filter(is_Maquetacio=True, lliure=True) maquetadoraux = maquetador_lliures[0] llibre.maquetador = maquetadoraux llibre.save() solicitud.maquetador = maquetadoraux maquetador = CustomUser.objects.get(email=maquetadoraux) # maquetador.lliure = False maquetador.save() notificacio = Notificacio() notificacio.missatge = "Tens un nova sol·licitud de maquetació assignada" notificacio.usuari = maquetadoraux data = datetime.now() notificacio.data = data notificacio.llibre = llibre notificacio.save() def areaDisssenyiMaquetacio(request, pk): llibre = Llibre.objects.get(pk=pk) context = { "llibre": llibre } return render(request, 'area_disseny_i_maquetacio.html', context) def veuresolicitudsImatge(request, pk): llibre = Llibre.objects.get(pk=pk) solicituds_disseny = models.solicitudImatges.objects.filter(llibre=llibre) context = { 'llista_solicituds': solicituds_disseny, 'llibre': llibre } return render(request, 'solicituds_imatges_disseny.html', context) def enviarbat(request, pk, pksol): llibre = Llibre.objects.get(pk=pk) solicitud = models.solicitudImatges.objects.filter(pk=pksol) if request.method == 'POST': form = pujarImatge(request.POST, request.FILES) if form.is_valid(): obj = form.save() obj.save() llibre.imatges.add(obj) llibre.save() solicitud.delete() notificarEditorImatges(llibre) return redirect(reverse('areadismaq', kwargs={'pk': pk})) else: form = pujarImatge() return render(request, 'enviar_imatges.html', {'form': form, 'llibre': llibre}) def notificarEditorImatges(llibre): editor = llibre.editor notificacio = Notificacio() notificacio.missatge = "Tens disponible la bateria d'imatges que vas sol·licitar per l'obra" notificacio.usuari = editor data = datetime.now() notificacio.data = data notificacio.llibre = llibre notificacio.save() def notificarEditorMaquetacio(llibre): editor = llibre.editor notificacio = Notificacio() notificacio.missatge = "Tens disponible el llibre maquetat que vas sol·licitar" notificacio.usuari = editor data = datetime.now() notificacio.data = data notificacio.llibre = llibre notificacio.save() def veuresolicitudsMaquetacio(request, pk): llibre = Llibre.objects.get(pk=pk) solicituds_maquetacio = models.solicitudMaquetacio.objects.filter(llibre=llibre) context = { 'llista_solicituds': solicituds_maquetacio, 'llibre': llibre } return render(request, 'solicituds_maquetacio_disseny.html', context) def enviarMaquetacio(request, pk, pksol): llibre = Llibre.objects.get(pk=pk) solicitud = models.solicitudMaquetacio.objects.filter(pk=pksol) if request.method == 'POST': form = PujarMaquetacio(request.POST, request.FILES) if form.is_valid(): obj = form.save() obj.save() llibre.maquetacio = obj llibre.save() solicitud.delete() notificarEditorMaquetacio(llibre) return redirect(reverse('areadismaq', kwargs={'pk': pk})) else: form = PujarMaquetacio() return render(request, 'enviar_maquetat.html', {'form': form, 'llibre': llibre}) def eliminarimatge(request, pk, pkimatge): llibre = Llibre.objects.get(pk=pk) imatge = Imatge.objects.get(pk=pkimatge) llibre.imatges.remove(imatge) llibre.save() return HttpResponseRedirect(request.META.get('HTTP_REFERER', '/')) def download_image(request, pk, pkimatge): image = Imatge.objects.get(pk=pkimatge) filename = image.image.file.name.split('/')[-1] response = HttpResponse(image.image.file, content_type='text/plain') response['Content-Disposition'] = 'attachment; filename=%s' % filename return response def eliminarnotificacio(request, pknotificacio): Notificacio.objects.filter(pk=pknotificacio).delete() return HttpResponseRedirect(request.META.get('HTTP_REFERER', '/')) def eliminarmissatge(request, pkmissatge): Missatge.objects.filter(pk=pkmissatge).delete() return HttpResponseRedirect(request.META.get('HTTP_REFERER', '/')) def solicitudpublicacio(request, pk): llibre = Llibre.objects.get(pk=pk) if request.method == 'POST': form = SolicitarPublicacioForm(request.POST) if form.is_valid(): anotacions = request.POST.get('anotacions') obj = form.save() obj.llibre = llibre obj.editor = request.user llibre.comentari_it = anotacions seleccionar_it(obj, llibre) llibre.save() obj.save() return redirect(reverse('areaedicio', kwargs={'pk': pk})) else: form = SolicitarMaquetacioForm() retallarobra(llibre) return render(request, "enviar_llibre_publicar.html", {'form': form}) def seleccionar_it(solicitud, llibre): it_lliures = CustomUser.objects.filter(is_IT=True, lliure=True) it_aux = it_lliures[0] llibre.it = it_aux llibre.save() solicitud.it = it_aux it = CustomUser.objects.get(email=it_aux) # it.lliure = False it.save() notificacio = Notificacio() notificacio.missatge = "Tens un nova sol·licitud de publicació assignada" notificacio.usuari = it_aux data = datetime.now() notificacio.data = data notificacio.llibre = llibre notificacio.save() def solicitudTraduccio(request, pk): llibre = Llibre.objects.get(pk=pk) if request.method == 'POST': form = SolicitarTraduccioForm(request.POST) if form.is_valid(): obj = form.save() obj.llibre = llibre obj.editor = request.user idioma = obj.idioma obj.save() traduirLlibre(llibre, idioma) # notificarEditorTraduccio(llibre) return redirect(request.path_info) else: form = SolicitarTraduccioForm() return render(request, 'solicitud_traduccio.html', {'form': form, 'llibre': llibre}) def galeriaTraduccions(request, pk): llibre = Llibre.objects.get(pk=pk) context = { 'llibre': llibre, } return render(request, "galeria_traduccions.html", context) def traduirLlibre(llibre, idioma): pdf = llibre.pdf.path txt = llibre.textPla.path if (idioma == 'es'): traduccio = llibre.es.path if (idioma == 'en'): traduccio = llibre.en.path elif (idioma == 'pt'): traduccio = llibre.pt.path elif (idioma == 'zh'): traduccio = llibre.zh.path with open(pdf, 'rb') as pdf_file, open(txt, 'w') as txt_file: read_pdf = PyPDF2.PdfFileReader(pdf_file) number_of_pages = read_pdf.getNumPages() for page_number in range(number_of_pages): page = read_pdf.getPage(page_number) page_content = page.extractText() txt_file.write(page_content) translator = Translator(to_lang=idioma) with open(txt, 'r') as textOriginal: data = textOriginal.read() to_translate = data[:500] translation = translator.translate(to_translate) pdf = FPDF() pdf.add_page() pdf.set_font('arial', size=12) pdf.multi_cell(190, 12, txt=translation) pdf.output(traduccio + ".pdf") # with open(llibre.traduccio, "wb") as llibreTraduccioStream: # translation.write(llibreTraduccioStream) def dirtraduccions(request, pk): llibre = Llibre.objects.get(pk=pk) context = { "llibre": llibre, } return render(request, 'directori_traduccions.html', context) def retallarobra(llibre): # PDF retallPDF = FPDF() retallPDF.add_page() retallPDF.set_font("Arial", size=15) f = open(llibre.textPla.path, "r") for x in f: retallPDF.multi_cell(190, 10, txt=x, border=0, align='J', fill=False) retallPDF.cell(190, 10, txt="HEU ARRIBAT AL FINAL DEL FRAGMENT DE MOSTRA", ln=1, align='C') retallPDF.cell(190, 10, txt="Per continuar gaudint del contigut del llibre, subscriviu-vos a Bookiernes", ln=2, align='C') retallPDF.output(llibre.pdf_retall.path + ".pdf") # ES retallES = FPDF() retallES.add_page() retallES.set_font("Arial", size=15) es = open(llibre.es.path, "r") for x in es: retallES.multi_cell(200, 10, txt=x, border=0, align='J', fill=False) retallES.cell(200, 10, txt="HEU ARRIBAT AL FINAL DEL FRAGMENT DE MOSTRA\nHAS LLEGADO AL FINAL DEL FRAGMENTO DE MUESTRA ", ln=1, align='C') retallES.cell(200, 10, txt="Per continuar gaudint del contingut del llibre, subscriviu-vos a Bookiernes\nPara continuar disfrutando del contenido del libro, suscríbase a Bookiernes ", ln=2, align='C') retallES.output(llibre.es_retall.path + ".pdf") print(llibre.es_retall.path) # EN retallEN = FPDF() retallEN.add_page() retallEN.set_font("Arial", size=15) en = open(llibre.en.path, "r") for x in en: retallEN.multi_cell(200, 10, txt=x, border=0, align='J', fill=False) retallEN.cell(200, 10, txt="HEU ARRIBAT AL FINAL DEL FRAGMENT DE MOSTRA ", ln=1, align='C') retallEN.cell(200, 10, txt="YOU HAVE REACHED THE END OF THE SAMPLE FRAGMENT ", ln=1, align='C') retallEN.cell(200, 10, txt="Per continuar gaudint del contingut del llibre, subscriviu-vos a Bookiernes ", ln=2, align='C') retallEN.cell(200, 10, txt="To continue enjoying the contents of the book, subscribe to Bookiernes ", ln=2, align='C') retallEN.output(llibre.en_retall.path + ".pdf") # PT retallPT = FPDF() retallPT.add_page() retallPT.set_font("Arial", size=15) pt = open(llibre.pt.path, "r") for x in pt: retallPT.multi_cell(200, 10, txt=x, border=0, align='J', fill=False) retallPT.cell(200, 10, txt="HEU ARRIBAT AL FINAL DEL FRAGMENT DE MOSTRA ", ln=1, align='C') retallPT.cell(200, 10, txt="VOCÊ ALCANÇOU O FIM DO FRAGMENTO DE AMOSTRA ", ln=1, align='C') retallPT.cell(200, 10, txt="Per continuar gaudint del contingut del llibre, subscriviu-vos a Bookiernes", ln=2, align='C') retallPT.cell(200, 10, txt="Para continuar aproveitando o conteúdo do livro, assine Bookiernes", ln=2, align='C') retallPT.output(llibre.pt_retall.path + ".pdf") # ZH retallZH = FPDF() retallZH.add_page() retallZH.set_font("Arial", size=15) zh = open(llibre.zh.path, "r") for x in zh: retallZH.multi_cell(200, 10, txt=x, border=0, align='J', fill=False) retallZH.cell(200, 10, txt="HEU ARRIBAT AL FINAL DEL FRAGMENT DE MOSTRA", ln=1, align='C') retallZH.cell(200, 10, txt="Per continuar gaudint del contingut del llibre, subscriviu-vos a Bookiernes", ln=2, align='C') retallZH.output(llibre.zh_retall.path + ".pdf") llibre.save() def perfil(request, pkperfil): usuari = CustomUser.objects.get(email=request.user) llistallibres = list() if usuari.is_Editor: llistallibres = Llibre.objects.filter(editor=usuari) if usuari.is_Escriptor: llistallibres = Llibre.objects.filter(escriptor=usuari) if usuari.is_Dissenyador: llistallibres = Llibre.objects.filter(dissenyador=usuari) if usuari.is_Maquetacio: llistallibres = Llibre.objects.filter(maquetador=usuari) if usuari.is_IT: llistallibres = Llibre.objects.filter(it=usuari) context = { 'llibres': llistallibres } return render(request, 'profile.html', context) def configuracio(request, pkperfil): usuari = CustomUser.objects.get(pk=pkperfil) if request.method == 'POST': form = ConfiguracioForm(request.POST) if form.is_valid(): usuari.nom = form.cleaned_data.get('nom') usuari.edat = form.cleaned_data.get('edat') usuari.sexe = form.cleaned_data.get('sexe') usuari.save() return redirect(reverse('perfil', kwargs={'pkperfil': pkperfil})) else: form = ConfiguracioForm() return render(request, 'configuracio_perfil.html', {'form': form}) def idiomes(request, pk): llibre = Llibre.objects.get(pk=pk) comentaris = Comentari.objects.filter(llibre=llibre) context = { "llibre": llibre, "comentaris": comentaris } return render(request, 'idioma.html', context)
[ 1, 515, 9557, 29889, 1124, 1053, 9056, 5103, 24735, 29892, 9056, 5103, 13, 3166, 9557, 29889, 12759, 7582, 29879, 1053, 4050, 29892, 6684, 13, 3166, 3143, 932, 1053, 4733, 13, 3166, 3143, 932, 29889, 9514, 1053, 10393, 387, 381, 29931, 492, 1030, 2500, 29892, 4956, 293, 3673, 1888, 271, 2710, 2500, 29892, 4956, 293, 3673, 29924, 18463, 1187, 3934, 2500, 29892, 12129, 4758, 29924, 18463, 1187, 3934, 29892, 2653, 4758, 1888, 26775, 29892, 320, 13, 1678, 4956, 293, 3673, 19858, 29874, 3934, 2500, 29892, 1174, 1403, 279, 18552, 26775, 2500, 29892, 4956, 293, 3673, 2308, 328, 1682, 3934, 2500, 13, 3166, 3143, 932, 29889, 9794, 1053, 365, 492, 1030, 29892, 6789, 19669, 29931, 492, 1030, 29892, 422, 296, 1306, 29892, 2216, 15039, 3934, 29892, 323, 4579, 983, 29892, 1954, 26775, 29892, 4750, 26775, 13, 3166, 4160, 29889, 9514, 1053, 12782, 2002, 3934, 2500, 13, 3166, 4160, 29889, 9794, 1053, 8701, 2659, 13, 3166, 9557, 29889, 3221, 29889, 5325, 29889, 12925, 1053, 3497, 3924, 10486, 13, 3166, 12865, 1053, 12865, 13, 5215, 10772, 8493, 29906, 13, 3166, 14240, 1053, 4103, 29880, 1061, 13, 3166, 285, 5140, 1053, 383, 8493, 13, 3166, 9557, 29889, 26045, 1053, 11837, 13, 3166, 9557, 29889, 3221, 29889, 5325, 29889, 3188, 1053, 3497, 13, 13, 13, 1753, 3271, 5074, 29898, 3827, 1125, 13, 1678, 736, 4050, 29898, 3827, 29892, 376, 5184, 29889, 1420, 1159, 13, 13, 13, 1753, 382, 2154, 4170, 29898, 3827, 1125, 13, 1678, 5534, 301, 1982, 690, 13, 1678, 502, 29884, 1306, 353, 8701, 2659, 29889, 12650, 29889, 657, 29898, 5269, 29922, 3827, 29889, 1792, 29897, 13, 1678, 565, 451, 502, 29884, 1306, 29889, 275, 29918, 29911, 276, 2135, 3136, 29901, 13, 4706, 736, 4050, 29898, 3827, 29892, 376, 5184, 29889, 1420, 1159, 13, 1678, 565, 502, 29884, 1306, 29889, 275, 29918, 15280, 29901, 13, 4706, 301, 1982, 690, 353, 365, 492, 1030, 29889, 12650, 29889, 4572, 29898, 15204, 29922, 375, 29884, 1306, 29897, 13, 1678, 565, 502, 29884, 1306, 29889, 275, 29918, 29923, 2154, 272, 29901, 13, 4706, 301, 1982, 690, 353, 365, 492, 1030, 29889, 12650, 29889, 4572, 29898, 267, 11709, 29922, 375, 29884, 1306, 29897, 13, 1678, 565, 502, 29884, 1306, 29889, 275, 29918, 29928, 13119, 29891, 3136, 29901, 13, 4706, 301, 1982, 690, 353, 365, 492, 1030, 29889, 12650, 29889, 4572, 29898, 29881, 13119, 29891, 3136, 29922, 375, 29884, 1306, 29897, 13, 1678, 565, 502, 29884, 1306, 29889, 275, 29918, 29924, 18463, 1187, 3934, 29901, 13, 4706, 301, 1982, 690, 353, 365, 492, 1030, 29889, 12650, 29889, 4572, 29898, 655, 12621, 3136, 29922, 375, 29884, 1306, 29897, 13, 1678, 565, 502, 29884, 1306, 29889, 275, 29918, 1806, 29901, 13, 4706, 301, 1982, 690, 353, 365, 492, 1030, 29889, 12650, 29889, 4572, 29898, 277, 29922, 375, 29884, 1306, 29897, 13, 1678, 1350, 19669, 353, 1051, 580, 13, 1678, 363, 301, 492, 1030, 297, 301, 1982, 690, 29901, 13, 4706, 1350, 19669, 29889, 4397, 29898, 5776, 19669, 29931, 492, 1030, 29889, 12650, 29889, 4572, 29898, 29880, 492, 1030, 29922, 29880, 492, 1030, 876, 13, 1678, 590, 1761, 353, 14319, 29898, 29880, 1982, 690, 29892, 1350, 19669, 29897, 13, 1678, 301, 1982, 690, 1420, 353, 426, 13, 4706, 376, 3318, 29918, 1761, 1115, 301, 1982, 690, 29892, 13, 4706, 376, 1357, 1761, 1115, 590, 1761, 13, 1678, 500, 13, 1678, 565, 502, 29884, 1306, 29889, 275, 29918, 29923, 2154, 272, 29901, 13, 4706, 736, 4050, 29898, 3827, 29892, 376, 267, 924, 4170, 29918, 267, 11709, 29889, 1420, 613, 301, 1982, 690, 1420, 29897, 13, 1678, 565, 502, 29884, 1306, 29889, 275, 29918, 15280, 29901, 13, 4706, 736, 4050, 29898, 3827, 29892, 376, 267, 924, 4170, 29918, 15204, 29889, 1420, 613, 301, 1982, 690, 1420, 29897, 13, 1678, 565, 502, 29884, 1306, 29889, 275, 29918, 29928, 13119, 29891, 3136, 29901, 13, 4706, 736, 4050, 29898, 3827, 29892, 376, 267, 924, 4170, 29918, 655, 12621, 3136, 29918, 29881, 13119, 29891, 3136, 29889, 1420, 613, 301, 1982, 690, 1420, 29897, 13, 1678, 565, 502, 29884, 1306, 29889, 275, 29918, 29924, 18463, 1187, 3934, 29901, 13, 4706, 736, 4050, 29898, 3827, 29892, 376, 267, 924, 4170, 29918, 655, 12621, 3136, 29918, 29881, 13119, 29891, 3136, 29889, 1420, 613, 301, 1982, 690, 1420, 29897, 13, 1678, 565, 502, 29884, 1306, 29889, 275, 29918, 1806, 29901, 13, 4706, 736, 4050, 29898, 3827, 29892, 376, 267, 924, 4170, 29918, 277, 29889, 1420, 613, 301, 1982, 690, 1420, 29897, 13, 13, 13, 1753, 2511, 387, 381, 29931, 492, 1030, 29898, 3827, 1125, 13, 1678, 565, 2009, 29889, 5696, 1275, 525, 5438, 2396, 13, 4706, 883, 353, 10393, 387, 381, 29931, 492, 1030, 2500, 29898, 3827, 29889, 5438, 29892, 2009, 29889, 24483, 29897, 13, 4706, 565, 883, 29889, 275, 29918, 3084, 7295, 13, 9651, 5446, 353, 883, 29889, 7620, 580, 13, 9651, 2511, 387, 381, 20128, 29898, 5415, 29897, 13, 9651, 16954, 22643, 279, 29918, 15204, 29898, 5415, 29897, 13, 9651, 5446, 29889, 267, 11709, 353, 2009, 29889, 1792, 13, 9651, 5446, 29889, 7620, 580, 13, 9651, 736, 6684, 11219, 267, 924, 4170, 1495, 13, 1678, 1683, 29901, 13, 4706, 883, 353, 10393, 387, 381, 29931, 492, 1030, 2500, 580, 13, 13, 1678, 736, 4050, 29898, 3827, 29892, 376, 2142, 387, 5168, 492, 1030, 29889, 1420, 613, 11117, 689, 2396, 883, 1800, 13, 13, 13, 1753, 2511, 387, 381, 20128, 29898, 29880, 492, 1030, 1125, 13, 1678, 411, 1722, 877, 726, 29889, 3945, 1495, 408, 285, 29901, 13, 4706, 301, 492, 1030, 29889, 726, 29925, 433, 29889, 7620, 877, 726, 742, 3497, 29898, 29888, 876, 13, 1678, 411, 1722, 877, 726, 29889, 3945, 1495, 408, 285, 29901, 13, 4706, 301, 492, 1030, 29889, 5140, 29918, 2267, 497, 29889, 7620, 877, 2267, 497, 742, 3497, 29898, 29888, 876, 13, 13, 1678, 411, 1722, 877, 726, 29889, 3945, 1495, 408, 831, 1514, 29901, 13, 4706, 301, 492, 1030, 29889, 267, 29889, 7620, 877, 267, 742, 3497, 29898, 267, 1514, 876, 13, 1678, 411, 1722, 877, 726, 29889, 3945, 1495, 408, 330, 29901, 13, 4706, 301, 492, 1030, 29889, 267, 29918, 2267, 497, 29889, 7620, 877, 267, 8015, 497, 742, 3497, 29898, 29887, 876, 13, 13, 1678, 411, 1722, 877, 726, 29889, 3945, 1495, 408, 330, 29901, 13, 4706, 301, 492, 1030, 29889, 264, 29889, 7620, 877, 264, 742, 3497, 29898, 29887, 876, 13, 1678, 411, 1722, 877, 726, 29889, 3945, 1495, 408, 298, 29901, 13, 4706, 301, 492, 1030, 29889, 264, 29918, 2267, 497, 29889, 7620, 877, 264, 8015, 497, 742, 3497, 29898, 29882, 876, 13, 13, 1678, 411, 1722, 877, 726, 29889, 3945, 1495, 408, 330, 29901, 13, 4706, 301, 492, 1030, 29889, 415, 29889, 7620, 877, 415, 742, 3497, 29898, 29887, 876, 13, 1678, 411, 1722, 877, 726, 29889, 3945, 1495, 408, 298, 29901, 13, 4706, 301, 492, 1030, 29889, 415, 29918, 2267, 497, 29889, 7620, 877, 415, 8015, 497, 742, 3497, 29898, 29882, 876, 13, 13, 1678, 411, 1722, 877, 726, 29889, 3945, 1495, 408, 330, 29901, 13, 4706, 301, 492, 1030, 29889, 17599, 29889, 7620, 877, 17599, 742, 3497, 29898, 29887, 876, 13, 1678, 411, 1722, 877, 726, 29889, 3945, 1495, 408, 298, 29901, 13, 4706, 301, 492, 1030, 29889, 17599, 29918, 2267, 497, 29889, 7620, 877, 17599, 8015, 497, 742, 3497, 29898, 29882, 876, 13, 13, 13, 1753, 16954, 22643, 279, 29918, 15204, 29898, 29880, 492, 1030, 1125, 13, 1678, 3863, 943, 29918, 29880, 492, 1973, 353, 8701, 2659, 29889, 12650, 29889, 4572, 29898, 275, 29918, 15280, 29922, 5574, 29892, 301, 492, 545, 29922, 5574, 29897, 13, 1678, 6920, 2993, 353, 3863, 943, 29918, 29880, 492, 1973, 29961, 29900, 29962, 13, 1678, 301, 492, 1030, 29889, 15204, 353, 6920, 2993, 13, 1678, 6920, 353, 8701, 2659, 29889, 12650, 29889, 657, 29898, 5269, 29922, 15204, 2993, 29897, 13, 1678, 396, 6920, 29889, 29880, 492, 545, 353, 7700, 13, 1678, 6920, 29889, 7620, 580, 13, 1678, 451, 15039, 3934, 353, 2216, 15039, 3934, 580, 13, 1678, 451, 15039, 3934, 29889, 9894, 26775, 353, 376, 29911, 575, 443, 28313, 301, 492, 1030, 3566, 271, 29908, 13, 1678, 451, 15039, 3934, 29889, 375, 29884, 1306, 353, 6920, 2993, 13, 1678, 848, 353, 12865, 29889, 3707, 580, 13, 1678, 451, 15039, 3934, 29889, 1272, 353, 848, 13, 1678, 451, 15039, 3934, 29889, 29880, 492, 1030, 353, 301, 492, 1030, 13, 1678, 451, 15039, 3934, 29889, 7620, 580, 13, 13, 13, 1753, 4038, 7486, 601, 29898, 3827, 29892, 282, 29895, 1125, 13, 1678, 301, 492, 1030, 353, 365, 492, 1030, 29889, 12650, 29889, 657, 29898, 20571, 29922, 20571, 29897, 13, 1678, 3030, 353, 426, 13, 4706, 376, 29880, 492, 1030, 1115, 301, 492, 1030, 13, 1678, 500, 13, 1678, 736, 4050, 29898, 3827, 29892, 525, 6203, 29918, 7486, 601, 29889, 1420, 742, 3030, 29897, 13, 13, 13, 1753, 21061, 2817, 790, 26775, 29898, 3827, 1125, 13, 1678, 565, 2009, 29889, 5696, 1275, 525, 5438, 2396, 13, 4706, 883, 353, 1174, 1403, 279, 18552, 26775, 2500, 29898, 3827, 29889, 5438, 29897, 13, 4706, 565, 883, 29889, 275, 29918, 3084, 7295, 13, 9651, 5446, 353, 883, 29889, 7620, 580, 13, 9651, 5446, 29889, 8309, 353, 2009, 29889, 1792, 13, 9651, 5446, 29889, 7620, 580, 13, 9651, 736, 6684, 29898, 3827, 29889, 2084, 29918, 3888, 29897, 13, 1678, 1683, 29901, 13, 4706, 883, 353, 1174, 1403, 279, 18552, 26775, 2500, 580, 13, 1678, 3030, 353, 426, 13, 4706, 525, 689, 2396, 883, 13, 1678, 500, 13, 1678, 736, 4050, 29898, 3827, 29892, 376, 9894, 26775, 29889, 1420, 613, 3030, 29897, 13, 13, 13, 1753, 4038, 267, 11709, 29898, 3827, 29892, 282, 29895, 1125, 13, 1678, 301, 492, 1030, 353, 365, 492, 1030, 29889, 12650, 29889, 657, 29898, 20571, 29922, 20571, 29897, 13, 1678, 3030, 353, 426, 13, 4706, 376, 29880, 492, 1030, 1115, 301, 492, 1030, 13, 1678, 500, 13, 1678, 736, 4050, 29898, 3827, 29892, 525, 6203, 29918, 267, 11709, 29889, 1420, 742, 3030, 29897, 13, 13, 13, 1753, 526, 1249, 29898, 3827, 29892, 282, 29895, 1125, 13, 1678, 301, 492, 1030, 353, 365, 492, 1030, 29889, 12650, 29889, 657, 29898, 20571, 29922, 20571, 29897, 13, 1678, 3030, 353, 426, 13, 4706, 376, 29880, 492, 1030, 1115, 301, 492, 1030, 13, 1678, 500, 13, 1678, 736, 4050, 29898, 3827, 29892, 525, 6203, 29918, 267, 11709, 29889, 1420, 742, 3030, 29897, 13, 13, 13, 1753, 21061, 2753, 4273, 874, 601, 29898, 3827, 29892, 282, 29895, 1125, 13, 1678, 301, 492, 1030, 353, 365, 492, 1030, 29889, 12650, 29889, 657, 29898, 20571, 29922, 20571, 29897, 13, 13, 1678, 3030, 353, 426, 13, 4706, 376, 29880, 492, 1030, 1420, 1115, 301, 492, 1030, 13, 1678, 500, 13, 1678, 565, 2009, 29889, 5696, 1275, 376, 5438, 29908, 322, 2009, 29889, 24483, 1839, 5140, 2033, 29901, 13, 4706, 13552, 353, 2009, 29889, 24483, 1839, 5140, 2033, 13, 4706, 1596, 29898, 5140, 29897, 13, 4706, 18920, 353, 3497, 3924, 10486, 580, 13, 4706, 10422, 353, 18920, 29889, 7620, 29898, 5140, 29889, 978, 29892, 13552, 29897, 13, 13, 4706, 301, 492, 1030, 29889, 5140, 353, 18920, 29889, 2271, 29898, 9507, 29897, 13, 4706, 1596, 29898, 29880, 492, 1030, 29889, 5140, 29897, 13, 4706, 301, 492, 1030, 29889, 7620, 580, 13, 4706, 736, 6684, 29898, 24244, 877, 6203, 267, 11709, 742, 9049, 5085, 3790, 29915, 20571, 2396, 282, 29895, 20073, 13, 13, 1678, 736, 4050, 29898, 3827, 29892, 525, 264, 1403, 279, 29918, 29876, 4273, 29918, 874, 601, 29889, 1420, 742, 3030, 29897, 13, 13, 13, 1753, 6589, 15204, 29898, 3827, 29892, 282, 29895, 1125, 13, 1678, 301, 492, 1030, 353, 365, 492, 1030, 29889, 12650, 29889, 657, 29898, 20571, 29922, 20571, 29897, 13, 1678, 502, 29884, 1306, 353, 8701, 2659, 29889, 12650, 29889, 657, 29898, 5269, 29922, 3827, 29889, 1792, 29897, 13, 1678, 419, 296, 12260, 353, 422, 296, 1306, 29889, 12650, 29889, 4572, 29898, 375, 29884, 1306, 29922, 375, 29884, 1306, 29892, 301, 492, 1030, 29922, 29880, 492, 1030, 29897, 13, 1678, 3030, 353, 426, 13, 4706, 376, 29880, 492, 1030, 1115, 301, 492, 1030, 29892, 13, 4706, 376, 375, 29884, 1306, 1115, 502, 29884, 1306, 29892, 13, 4706, 376, 510, 296, 12260, 1115, 419, 296, 12260, 13, 1678, 500, 13, 1678, 565, 2009, 29889, 5696, 1275, 376, 5438, 1115, 13, 4706, 4329, 324, 353, 2009, 29889, 5438, 29889, 657, 877, 23545, 324, 1495, 13, 13, 4706, 2342, 29886, 3934, 353, 2009, 29889, 5438, 29889, 657, 877, 2783, 699, 29886, 3934, 1495, 13, 13, 4706, 28313, 29918, 510, 296, 1306, 353, 422, 296, 1306, 580, 13, 4706, 28313, 29918, 510, 296, 1306, 29889, 375, 29884, 1306, 353, 2009, 29889, 1792, 13, 4706, 28313, 29918, 510, 296, 1306, 29889, 23545, 324, 353, 4329, 324, 13, 4706, 28313, 29918, 510, 296, 1306, 29889, 2783, 699, 29886, 3934, 353, 2342, 29886, 3934, 13, 4706, 28313, 29918, 510, 296, 1306, 29889, 29880, 492, 1030, 353, 365, 492, 1030, 29889, 12650, 29889, 657, 29898, 20571, 29922, 20571, 29897, 13, 4706, 28313, 29918, 510, 296, 1306, 29889, 7620, 580, 13, 4706, 451, 928, 279, 29923, 2154, 272, 1523, 296, 1306, 29898, 29931, 492, 1030, 29889, 12650, 29889, 657, 29898, 20571, 29922, 20571, 876, 13, 1678, 736, 4050, 29898, 3827, 29892, 525, 21032, 29918, 15204, 29889, 1420, 742, 3030, 29897, 13, 13, 13, 1753, 4516, 29890, 1008, 423, 15840, 2710, 29898, 3827, 29892, 282, 29895, 1125, 13, 1678, 301, 492, 1030, 353, 365, 492, 1030, 29889, 12650, 29889, 657, 29898, 20571, 29922, 20571, 29897, 13, 1678, 3030, 353, 426, 13, 4706, 376, 29880, 492, 1030, 1115, 301, 492, 1030, 29892, 13, 1678, 500, 13, 1678, 736, 4050, 29898, 3827, 29892, 525, 11851, 4170, 29918, 15840, 2710, 29889, 1420, 742, 3030, 29897, 13, 13, 13, 1753, 4516, 655, 12621, 17249, 29898, 3827, 29892, 282, 29895, 1125, 13, 1678, 301, 492, 1030, 353, 365, 492, 1030, 29889, 12650, 29889, 657, 29898, 20571, 29922, 20571, 29897, 13, 1678, 3030, 353, 426, 13, 4706, 376, 29880, 492, 1030, 1115, 301, 492, 1030, 29892, 13, 1678, 500, 13, 1678, 736, 4050, 29898, 3827, 29892, 525, 11851, 4170, 29918, 655, 12621, 17249, 29889, 1420, 742, 3030, 29897, 13, 13, 13, 1753, 451, 928, 279, 29923, 2154, 272, 1523, 296, 1306, 29898, 29880, 492, 1030, 1125, 13, 1678, 451, 15039, 3934, 353, 2216, 15039, 3934, 580, 13, 1678, 451, 15039, 3934, 29889, 9894, 26775, 353, 376, 29911, 575, 443, 419, 296, 1306, 282, 3906, 316, 23484, 279, 29908, 13, 1678, 451, 15039, 3934, 29889, 375, 29884, 1306, 353, 301, 492, 1030, 29889, 267, 11709, 13, 1678, 451, 15039, 3934, 29889, 29880, 492, 1030, 353, 301, 492, 1030, 13, 1678, 848, 353, 12865, 29889, 3707, 580, 13, 1678, 451, 15039, 3934, 29889, 1272, 353, 848, 13, 1678, 451, 15039, 3934, 29889, 7620, 580, 13, 13, 13, 1753, 508, 1403, 538, 4463, 29898, 3827, 29892, 282, 29895, 1125, 13, 1678, 301, 492, 1030, 353, 365, 492, 1030, 29889, 12650, 29889, 657, 29898, 20571, 29922, 20571, 29897, 13, 13, 1678, 3030, 353, 426, 13, 4706, 376, 29880, 492, 1030, 1115, 301, 492, 1030, 13, 1678, 500, 13, 1678, 565, 2009, 29889, 5696, 1275, 376, 5438, 29908, 322, 2009, 29889, 24483, 1839, 5140, 2033, 29901, 13, 4706, 13552, 353, 2009, 29889, 24483, 1839, 5140, 2033, 13, 4706, 1596, 29898, 5140, 29897, 13, 4706, 18920, 353, 3497, 3924, 10486, 580, 13, 4706, 10422, 353, 18920, 29889, 7620, 29898, 5140, 29889, 978, 29892, 13552, 29897, 13, 13, 4706, 301, 492, 1030, 29889, 5140, 353, 18920, 29889, 2271, 29898, 9507, 29897, 13, 4706, 1596, 29898, 29880, 492, 1030, 29889, 5140, 29897, 13, 4706, 301, 492, 1030, 29889, 7620, 580, 13, 4706, 736, 6684, 29898, 24244, 877, 6203, 7486, 601, 742, 9049, 5085, 3790, 29915, 20571, 2396, 282, 29895, 20073, 13, 13, 1678, 736, 4050, 29898, 3827, 29892, 525, 3068, 1403, 279, 29918, 3225, 29889, 1420, 742, 3030, 29897, 13, 13, 13, 1753, 451, 928, 17249, 29898, 3827, 1125, 13, 1678, 451, 928, 17249, 353, 2216, 15039, 3934, 29889, 12650, 29889, 4572, 29898, 375, 29884, 1306, 29922, 3827, 29889, 1792, 29897, 13, 1678, 3030, 353, 426, 13, 4706, 376, 3318, 29918, 1761, 1115, 451, 928, 17249, 13, 1678, 500, 13, 1678, 736, 4050, 29898, 3827, 29892, 376, 1333, 928, 17249, 29889, 1420, 613, 3030, 29897, 13, 13, 13, 1753, 2453, 545, 9894, 26775, 29898, 3827, 1125, 13, 1678, 3052, 271, 2710, 353, 4750, 26775, 29889, 12650, 29889, 4572, 29898, 7854, 262, 271, 1306, 29922, 3827, 29889, 1792, 29897, 13, 1678, 3030, 353, 426, 13, 4706, 376, 3318, 29918, 1761, 1115, 3052, 271, 2710, 13, 1678, 500, 13, 1678, 736, 4050, 29898, 3827, 29892, 376, 345, 545, 9894, 26775, 29889, 1420, 613, 3030, 29897, 13, 13, 13, 1753, 6589, 29898, 3827, 29892, 282, 29895, 1125, 13, 1678, 301, 492, 1030, 353, 365, 492, 1030, 29889, 12650, 29889, 657, 29898, 20571, 29922, 20571, 29897, 13, 1678, 419, 296, 12260, 353, 422, 296, 1306, 29889, 12650, 29889, 4572, 29898, 29880, 492, 1030, 29922, 29880, 492, 1030, 29897, 13, 1678, 3030, 353, 426, 13, 4706, 376, 29880, 492, 1030, 1115, 301, 492, 1030, 29892, 13, 4706, 376, 510, 296, 12260, 1115, 419, 296, 12260, 13, 1678, 500, 13, 1678, 736, 4050, 29898, 3827, 29892, 525, 21032, 29889, 1420, 742, 3030, 29897, 13, 13, 13, 1753, 274, 532, 1397, 29898, 3827, 1125, 13, 1678, 3855, 29879, 353, 977, 509, 279, 29898, 3827, 29897, 13, 1678, 1596, 29898, 29939, 29879, 29897, 13, 1678, 363, 301, 492, 1030, 297, 3855, 29879, 29901, 13, 4706, 1596, 29898, 29880, 492, 1030, 29889, 11522, 29918, 29880, 492, 1030, 29897, 13, 1678, 3030, 353, 426, 13, 4706, 525, 1972, 842, 2396, 3855, 29879, 29892, 13, 4706, 525, 1356, 19669, 2396, 323, 4579, 983, 29889, 12650, 29889, 497, 580, 13, 1678, 500, 13, 1678, 736, 4050, 29898, 3827, 29892, 376, 29883, 532, 1397, 29889, 1420, 613, 3030, 29897, 13, 13, 13, 1753, 977, 509, 279, 29898, 3827, 1125, 13, 1678, 2346, 842, 353, 365, 492, 1030, 29889, 12650, 29889, 497, 580, 13, 1678, 1350, 19669, 353, 323, 4579, 983, 29889, 12650, 29889, 497, 580, 13, 1678, 831, 11709, 353, 8701, 2659, 29889, 12650, 29889, 4572, 29898, 275, 29918, 29923, 2154, 272, 29922, 5574, 29897, 13, 1678, 4329, 324, 353, 2009, 29889, 7194, 29889, 657, 877, 23545, 324, 1495, 13, 1678, 8478, 353, 2009, 29889, 7194, 29889, 657, 877, 8309, 1495, 13, 1678, 23056, 29883, 3934, 353, 2009, 29889, 7194, 29889, 657, 877, 1054, 280, 3934, 1495, 13, 1678, 1375, 29918, 13573, 1475, 353, 2009, 29889, 7194, 29889, 657, 877, 13573, 1475, 29918, 1195, 1495, 13, 1678, 4236, 29918, 13573, 1475, 353, 2009, 29889, 7194, 29889, 657, 877, 13573, 1475, 29918, 3317, 1495, 13, 1678, 1350, 29288, 353, 2009, 29889, 7194, 29889, 657, 877, 1356, 29288, 1495, 13, 13, 1678, 565, 338, 29918, 3084, 29898, 23545, 324, 1125, 13, 4706, 2346, 842, 353, 2346, 842, 29889, 4572, 29898, 11522, 29918, 29880, 492, 1030, 1649, 293, 609, 2708, 29922, 23545, 324, 29897, 13, 1678, 565, 338, 29918, 3084, 29898, 8309, 1125, 13, 4706, 2346, 842, 353, 2346, 842, 29889, 4572, 29898, 267, 11709, 1649, 11522, 1649, 293, 609, 2708, 29922, 8309, 29897, 13, 1678, 565, 338, 29918, 3084, 29898, 1054, 280, 29883, 3934, 1125, 13, 4706, 2346, 842, 353, 2346, 842, 29889, 4572, 29898, 10936, 29883, 3934, 1649, 293, 609, 2708, 29922, 1054, 280, 29883, 3934, 29897, 13, 1678, 565, 338, 29918, 3084, 29898, 1195, 29918, 13573, 1475, 1125, 13, 4706, 2346, 842, 353, 2346, 842, 29889, 4572, 29898, 1949, 29918, 13573, 1475, 1649, 29887, 371, 29922, 1195, 29918, 13573, 1475, 29897, 13, 1678, 565, 338, 29918, 3084, 29898, 3317, 29918, 13573, 1475, 1125, 13, 4706, 2346, 842, 353, 2346, 842, 29889, 4572, 29898, 1949, 29918, 13573, 1475, 1649, 1896, 29922, 3317, 29918, 13573, 1475, 29897, 13, 1678, 565, 338, 29918, 3084, 29898, 1356, 29288, 29897, 322, 1350, 29288, 2804, 525, 29911, 2849, 856, 2396, 13, 4706, 2346, 842, 353, 2346, 842, 29889, 4572, 29898, 1356, 19669, 1649, 11522, 29918, 1356, 29288, 29922, 1356, 29288, 29897, 13, 13, 1678, 736, 2346, 842, 13, 13, 13, 1753, 338, 29918, 3084, 29898, 3207, 1125, 13, 1678, 736, 1828, 2804, 6629, 322, 1828, 338, 451, 6213, 13, 13, 13, 1753, 970, 279, 29880, 492, 1030, 29898, 3827, 29892, 282, 29895, 1125, 13, 1678, 301, 492, 1030, 353, 365, 492, 1030, 29889, 12650, 29889, 657, 29898, 20571, 29922, 20571, 29897, 13, 1678, 301, 1982, 690, 1420, 353, 426, 13, 4706, 376, 29880, 492, 1030, 1115, 301, 492, 1030, 29892, 13, 1678, 500, 13, 1678, 565, 2009, 29889, 5696, 1275, 376, 5438, 1115, 13, 4706, 301, 492, 1030, 29889, 3597, 271, 353, 5852, 13, 4706, 301, 492, 1030, 29889, 7620, 580, 13, 4706, 451, 928, 279, 15280, 19858, 271, 29898, 29880, 492, 1030, 29897, 13, 4706, 451, 928, 279, 1806, 19858, 271, 29898, 29880, 492, 1030, 29897, 13, 4706, 736, 6684, 11219, 267, 924, 4170, 1495, 13, 13, 1678, 736, 4050, 29898, 3827, 29892, 376, 3597, 279, 29880, 492, 1030, 29889, 1420, 613, 301, 1982, 690, 1420, 29897, 13, 13, 13, 1753, 451, 928, 279, 15280, 19858, 271, 29898, 29880, 492, 1030, 1125, 13, 1678, 6920, 353, 301, 492, 1030, 29889, 15204, 13, 1678, 451, 15039, 3934, 353, 2216, 15039, 3934, 580, 13, 1678, 451, 15039, 3934, 29889, 9894, 26775, 353, 376, 6489, 301, 492, 1030, 712, 756, 21565, 3863, 424, 12337, 447, 21565, 970, 271, 263, 425, 2563, 29908, 13, 1678, 451, 15039, 3934, 29889, 375, 29884, 1306, 353, 6920, 13, 1678, 848, 353, 12865, 29889, 3707, 580, 13, 1678, 451, 15039, 3934, 29889, 1272, 353, 848, 13, 1678, 451, 15039, 3934, 29889, 29880, 492, 1030, 353, 301, 492, 1030, 13, 1678, 451, 15039, 3934, 29889, 7620, 580, 13, 13, 13, 1753, 451, 928, 279, 1806, 19858, 271, 29898, 29880, 492, 1030, 1125, 13, 1678, 372, 353, 301, 492, 1030, 29889, 277, 13, 1678, 451, 15039, 3934, 353, 2216, 15039, 3934, 580, 13, 1678, 451, 15039, 3934, 29889, 9894, 26775, 353, 376, 6489, 301, 492, 1030, 712, 3006, 583, 3566, 271, 12337, 447, 21565, 970, 271, 263, 425, 2563, 29908, 13, 1678, 451, 15039, 3934, 29889, 375, 29884, 1306, 353, 372, 13, 1678, 848, 353, 12865, 29889, 3707, 580, 13, 1678, 451, 15039, 3934, 29889, 1272, 353, 848, 13, 1678, 451, 15039, 3934, 29889, 29880, 492, 1030, 353, 301, 492, 1030, 13, 1678, 451, 15039, 3934, 29889, 7620, 580, 13, 13, 13, 1753, 6898, 8749, 1888, 271, 2710, 29898, 3827, 29892, 282, 29895, 1125, 13, 1678, 301, 492, 1030, 353, 365, 492, 1030, 29889, 12650, 29889, 657, 29898, 20571, 29922, 20571, 29897, 13, 1678, 3030, 353, 426, 13, 4706, 525, 15840, 2710, 2396, 301, 492, 1030, 29889, 15840, 2710, 29889, 497, 3285, 13, 4706, 525, 29880, 492, 1030, 2396, 301, 492, 1030, 29892, 13, 1678, 500, 13, 1678, 736, 4050, 29898, 3827, 29892, 376, 23014, 8749, 29918, 15840, 2710, 29889, 1420, 613, 3030, 29897, 13, 13, 13, 1753, 26978, 11267, 1888, 271, 2710, 29898, 3827, 29892, 282, 29895, 1125, 13, 1678, 301, 492, 1030, 353, 365, 492, 1030, 29889, 12650, 29889, 657, 29898, 20571, 29922, 20571, 29897, 13, 1678, 565, 2009, 29889, 5696, 1275, 525, 5438, 2396, 13, 4706, 883, 353, 4956, 293, 3673, 1888, 271, 2710, 2500, 29898, 3827, 29889, 5438, 29897, 13, 4706, 565, 883, 29889, 275, 29918, 3084, 7295, 13, 9651, 5446, 353, 883, 29889, 7620, 580, 13, 9651, 5446, 29889, 29880, 492, 1030, 353, 301, 492, 1030, 13, 9651, 5446, 29889, 15204, 353, 2009, 29889, 1792, 13, 9651, 16954, 22643, 279, 29918, 29881, 13119, 29891, 3136, 29898, 5415, 29892, 301, 492, 1030, 29897, 13, 9651, 5446, 29889, 7620, 580, 13, 9651, 736, 6684, 29898, 24244, 877, 6203, 7486, 601, 742, 9049, 5085, 3790, 29915, 20571, 2396, 282, 29895, 20073, 13, 1678, 1683, 29901, 13, 4706, 883, 353, 4956, 293, 3673, 1888, 271, 2710, 2500, 580, 13, 1678, 3030, 353, 426, 13, 4706, 525, 29880, 492, 1030, 2396, 301, 492, 1030, 29892, 13, 4706, 525, 689, 2396, 883, 13, 1678, 500, 13, 1678, 736, 4050, 29898, 3827, 29892, 376, 2929, 293, 11267, 29918, 15840, 2710, 29889, 1420, 613, 3030, 29897, 13, 13, 13, 1753, 16954, 22643, 279, 29918, 29881, 13119, 29891, 3136, 29898, 2929, 293, 11267, 29892, 301, 492, 1030, 1125, 13, 1678, 766, 4881, 29891, 24549, 29918, 29880, 492, 1973, 353, 8701, 2659, 29889, 12650, 29889, 4572, 29898, 275, 29918, 29928, 13119, 29891, 3136, 29922, 5574, 29892, 301, 492, 545, 29922, 5574, 29897, 13, 1678, 766, 4881, 29891, 3136, 2993, 353, 766, 4881, 29891, 24549, 29918, 29880, 492, 1973, 29961, 29900, 29962, 13, 1678, 301, 492, 1030, 29889, 29881, 13119, 29891, 3136, 353, 766, 4881, 29891, 3136, 2993, 13, 1678, 301, 492, 1030, 29889, 7620, 580, 13, 1678, 26978, 11267, 29889, 29881, 13119, 29891, 3136, 353, 766, 4881, 29891, 3136, 2993, 13, 1678, 766, 4881, 29891, 3136, 353, 8701, 2659, 29889, 12650, 29889, 657, 29898, 5269, 29922, 29881, 13119, 29891, 3136, 2993, 29897, 13, 1678, 396, 766, 4881, 29891, 3136, 29889, 29880, 492, 545, 353, 7700, 13, 1678, 766, 4881, 29891, 3136, 29889, 7620, 580, 13, 1678, 451, 15039, 3934, 353, 2216, 15039, 3934, 580, 13, 1678, 451, 15039, 3934, 29889, 9894, 26775, 353, 376, 29911, 575, 443, 26121, 899, 30064, 4019, 566, 270, 29915, 15840, 2710, 3566, 1114, 29908, 13, 1678, 451, 15039, 3934, 29889, 375, 29884, 1306, 353, 766, 4881, 29891, 3136, 2993, 13, 1678, 848, 353, 12865, 29889, 3707, 580, 13, 1678, 451, 15039, 3934, 29889, 1272, 353, 848, 13, 1678, 451, 15039, 3934, 29889, 29880, 492, 1030, 353, 301, 492, 1030, 13, 1678, 451, 15039, 3934, 29889, 7620, 580, 13, 13, 13, 1753, 6898, 8749, 21870, 12621, 17249, 29898, 3827, 29892, 282, 29895, 1125, 13, 1678, 301, 492, 1030, 353, 365, 492, 1030, 29889, 12650, 29889, 657, 29898, 20571, 29922, 20571, 29897, 13, 1678, 611, 339, 1187, 3934, 353, 301, 492, 1030, 29889, 655, 339, 1187, 3934, 13, 1678, 3030, 353, 426, 13, 4706, 376, 29880, 492, 1030, 1115, 301, 492, 1030, 29892, 13, 4706, 376, 655, 339, 1187, 3934, 1115, 611, 339, 1187, 3934, 13, 1678, 500, 13, 1678, 736, 4050, 29898, 3827, 29892, 376, 23014, 8749, 29918, 655, 12621, 17249, 29889, 1420, 613, 3030, 29897, 13, 13, 13, 1753, 26978, 11267, 655, 339, 1187, 3934, 29898, 3827, 29892, 282, 29895, 1125, 13, 1678, 301, 492, 1030, 353, 365, 492, 1030, 29889, 12650, 29889, 657, 29898, 20571, 29922, 20571, 29897, 13, 1678, 565, 2009, 29889, 5696, 1275, 525, 5438, 2396, 13, 4706, 883, 353, 4956, 293, 3673, 29924, 18463, 1187, 3934, 2500, 29898, 3827, 29889, 5438, 29897, 13, 4706, 565, 883, 29889, 275, 29918, 3084, 7295, 13, 9651, 5446, 353, 883, 29889, 7620, 580, 13, 9651, 5446, 29889, 29880, 492, 1030, 353, 301, 492, 1030, 13, 9651, 5446, 29889, 15204, 353, 2009, 29889, 1792, 13, 9651, 16954, 22643, 279, 29918, 655, 12621, 3136, 29898, 5415, 29892, 301, 492, 1030, 29897, 13, 9651, 5446, 29889, 7620, 580, 13, 9651, 736, 6684, 29898, 24244, 877, 6203, 7486, 601, 742, 9049, 5085, 3790, 29915, 20571, 2396, 282, 29895, 20073, 13, 1678, 1683, 29901, 13, 4706, 883, 353, 4956, 293, 3673, 29924, 18463, 1187, 3934, 2500, 580, 13, 1678, 736, 4050, 29898, 3827, 29892, 376, 264, 1403, 279, 29918, 29880, 492, 1030, 29918, 655, 12621, 279, 29889, 1420, 613, 11117, 689, 2396, 883, 1800, 13, 13, 13, 1753, 16954, 22643, 279, 29918, 655, 12621, 3136, 29898, 2929, 293, 11267, 29892, 301, 492, 1030, 1125, 13, 1678, 611, 12621, 3136, 29918, 29880, 492, 1973, 353, 8701, 2659, 29889, 12650, 29889, 4572, 29898, 275, 29918, 29924, 18463, 1187, 3934, 29922, 5574, 29892, 301, 492, 545, 29922, 5574, 29897, 13, 1678, 611, 12621, 3136, 2993, 353, 611, 12621, 3136, 29918, 29880, 492, 1973, 29961, 29900, 29962, 13, 1678, 301, 492, 1030, 29889, 655, 12621, 3136, 353, 611, 12621, 3136, 2993, 13, 1678, 301, 492, 1030, 29889, 7620, 580, 13, 1678, 26978, 11267, 29889, 655, 12621, 3136, 353, 611, 12621, 3136, 2993, 13, 1678, 611, 12621, 3136, 353, 8701, 2659, 29889, 12650, 29889, 657, 29898, 5269, 29922, 655, 12621, 3136, 2993, 29897, 13, 1678, 396, 611, 12621, 3136, 29889, 29880, 492, 545, 353, 7700, 13, 1678, 611, 12621, 3136, 29889, 7620, 580, 13, 1678, 451, 15039, 3934, 353, 2216, 15039, 3934, 580, 13, 1678, 451, 15039, 3934, 29889, 9894, 26775, 353, 376, 29911, 575, 443, 26121, 899, 30064, 4019, 566, 316, 611, 339, 1187, 2617, 3566, 1114, 29908, 13, 1678, 451, 15039, 3934, 29889, 375, 29884, 1306, 353, 611, 12621, 3136, 2993, 13, 1678, 848, 353, 12865, 29889, 3707, 580, 13, 1678, 451, 15039, 3934, 29889, 1272, 353, 848, 13, 1678, 451, 15039, 3934, 29889, 29880, 492, 1030, 353, 301, 492, 1030, 13, 1678, 451, 15039, 3934, 29889, 7620, 580, 13, 13, 13, 1753, 4038, 29928, 790, 4881, 25675, 29924, 18463, 1187, 3934, 29898, 3827, 29892, 282, 29895, 1125, 13, 1678, 301, 492, 1030, 353, 365, 492, 1030, 29889, 12650, 29889, 657, 29898, 20571, 29922, 20571, 29897, 13, 1678, 3030, 353, 426, 13, 4706, 376, 29880, 492, 1030, 1115, 301, 492, 1030, 13, 1678, 500, 13, 1678, 736, 4050, 29898, 3827, 29892, 525, 6203, 29918, 29881, 13119, 29891, 29918, 29875, 29918, 655, 339, 1187, 3934, 29889, 1420, 742, 3030, 29897, 13, 13, 13, 1753, 2453, 1973, 324, 293, 11267, 29879, 1888, 26775, 29898, 3827, 29892, 282, 29895, 1125, 13, 1678, 301, 492, 1030, 353, 365, 492, 1030, 29889, 12650, 29889, 657, 29898, 20571, 29922, 20571, 29897, 13, 1678, 26978, 11267, 29879, 29918, 29881, 13119, 29891, 353, 4733, 29889, 2929, 293, 11267, 1888, 271, 2710, 29889, 12650, 29889, 4572, 29898, 29880, 492, 1030, 29922, 29880, 492, 1030, 29897, 13, 1678, 3030, 353, 426, 13, 4706, 525, 645, 2079, 29918, 2929, 293, 11267, 29879, 2396, 26978, 11267, 29879, 29918, 29881, 13119, 29891, 29892, 13, 4706, 525, 29880, 492, 1030, 2396, 301, 492, 1030, 13, 1678, 500, 13, 1678, 736, 4050, 29898, 3827, 29892, 525, 2929, 293, 11267, 29879, 29918, 15840, 2710, 29918, 29881, 13119, 29891, 29889, 1420, 742, 3030, 29897, 13, 13, 13, 1753, 21061, 279, 10222, 29898, 3827, 29892, 282, 29895, 29892, 282, 2039, 324, 1125, 13, 1678, 301, 492, 1030, 353, 365, 492, 1030, 29889, 12650, 29889, 657, 29898, 20571, 29922, 20571, 29897, 13, 1678, 26978, 11267, 353, 4733, 29889, 2929, 293, 11267, 1888, 271, 2710, 29889, 12650, 29889, 4572, 29898, 20571, 29922, 29886, 2039, 324, 29897, 13, 1678, 565, 2009, 29889, 5696, 1275, 525, 5438, 2396, 13, 4706, 883, 353, 2653, 4758, 1888, 26775, 29898, 3827, 29889, 5438, 29892, 2009, 29889, 24483, 29897, 13, 4706, 565, 883, 29889, 275, 29918, 3084, 7295, 13, 9651, 5446, 353, 883, 29889, 7620, 580, 13, 9651, 5446, 29889, 7620, 580, 13, 9651, 301, 492, 1030, 29889, 15840, 2710, 29889, 1202, 29898, 5415, 29897, 13, 9651, 301, 492, 1030, 29889, 7620, 580, 13, 9651, 26978, 11267, 29889, 8143, 580, 13, 9651, 451, 928, 279, 15280, 1888, 271, 2710, 29898, 29880, 492, 1030, 29897, 13, 9651, 736, 6684, 29898, 24244, 877, 598, 328, 275, 655, 29939, 742, 9049, 5085, 3790, 29915, 20571, 2396, 282, 29895, 20073, 13, 1678, 1683, 29901, 13, 4706, 883, 353, 2653, 4758, 1888, 26775, 580, 13, 1678, 736, 4050, 29898, 3827, 29892, 525, 264, 1403, 279, 29918, 15840, 2710, 29889, 1420, 742, 11117, 689, 2396, 883, 29892, 525, 29880, 492, 1030, 2396, 301, 492, 1030, 1800, 13, 13, 13, 1753, 451, 928, 279, 15280, 1888, 271, 2710, 29898, 29880, 492, 1030, 1125, 13, 1678, 6920, 353, 301, 492, 1030, 29889, 15204, 13, 1678, 451, 15039, 3934, 353, 2216, 15039, 3934, 580, 13, 1678, 451, 15039, 3934, 29889, 9894, 26775, 353, 376, 29911, 575, 26318, 425, 289, 1008, 423, 270, 29915, 15840, 2710, 712, 19723, 899, 30064, 506, 3673, 639, 301, 29915, 711, 336, 29908, 13, 1678, 451, 15039, 3934, 29889, 375, 29884, 1306, 353, 6920, 13, 1678, 848, 353, 12865, 29889, 3707, 580, 13, 1678, 451, 15039, 3934, 29889, 1272, 353, 848, 13, 1678, 451, 15039, 3934, 29889, 29880, 492, 1030, 353, 301, 492, 1030, 13, 1678, 451, 15039, 3934, 29889, 7620, 580, 13, 13, 13, 1753, 451, 928, 279, 15280, 29924, 18463, 1187, 3934, 29898, 29880, 492, 1030, 1125, 13, 1678, 6920, 353, 301, 492, 1030, 29889, 15204, 13, 1678, 451, 15039, 3934, 353, 2216, 15039, 3934, 580, 13, 1678, 451, 15039, 3934, 29889, 9894, 26775, 353, 376, 29911, 575, 26318, 560, 301, 492, 1030, 611, 12621, 271, 712, 19723, 899, 30064, 506, 3673, 29908, 13, 1678, 451, 15039, 3934, 29889, 375, 29884, 1306, 353, 6920, 13, 1678, 848, 353, 12865, 29889, 3707, 580, 13, 1678, 451, 15039, 3934, 29889, 1272, 353, 848, 13, 1678, 451, 15039, 3934, 29889, 29880, 492, 1030, 353, 301, 492, 1030, 13, 1678, 451, 15039, 3934, 29889, 7620, 580, 13, 13, 13, 1753, 2453, 1973, 324, 293, 11267, 29879, 29924, 18463, 1187, 3934, 29898, 3827, 29892, 282, 29895, 1125, 13, 1678, 301, 492, 1030, 353, 365, 492, 1030, 29889, 12650, 29889, 657, 29898, 20571, 29922, 20571, 29897, 13, 1678, 26978, 11267, 29879, 29918, 655, 339, 1187, 3934, 353, 4733, 29889, 2929, 293, 11267, 29924, 18463, 1187, 3934, 29889, 12650, 29889, 4572, 29898, 29880, 492, 1030, 29922, 29880, 492, 1030, 29897, 13, 1678, 3030, 353, 426, 13, 4706, 525, 645, 2079, 29918, 2929, 293, 11267, 29879, 2396, 26978, 11267, 29879, 29918, 655, 339, 1187, 3934, 29892, 13, 4706, 525, 29880, 492, 1030, 2396, 301, 492, 1030, 13, 1678, 500, 13, 1678, 736, 4050, 29898, 3827, 29892, 525, 2929, 293, 11267, 29879, 29918, 655, 339, 1187, 3934, 29918, 29881, 13119, 29891, 29889, 1420, 742, 3030, 29897, 13, 13, 13, 1753, 21061, 279, 29924, 18463, 1187, 3934, 29898, 3827, 29892, 282, 29895, 29892, 282, 2039, 324, 1125, 13, 1678, 301, 492, 1030, 353, 365, 492, 1030, 29889, 12650, 29889, 657, 29898, 20571, 29922, 20571, 29897, 13, 1678, 26978, 11267, 353, 4733, 29889, 2929, 293, 11267, 29924, 18463, 1187, 3934, 29889, 12650, 29889, 4572, 29898, 20571, 29922, 29886, 2039, 324, 29897, 13, 1678, 565, 2009, 29889, 5696, 1275, 525, 5438, 2396, 13, 4706, 883, 353, 12129, 4758, 29924, 18463, 1187, 3934, 29898, 3827, 29889, 5438, 29892, 2009, 29889, 24483, 29897, 13, 4706, 565, 883, 29889, 275, 29918, 3084, 7295, 13, 9651, 5446, 353, 883, 29889, 7620, 580, 13, 9651, 5446, 29889, 7620, 580, 13, 9651, 301, 492, 1030, 29889, 655, 339, 1187, 3934, 353, 5446, 13, 9651, 301, 492, 1030, 29889, 7620, 580, 13, 9651, 26978, 11267, 29889, 8143, 580, 13, 9651, 451, 928, 279, 15280, 29924, 18463, 1187, 3934, 29898, 29880, 492, 1030, 29897, 13, 9651, 736, 6684, 29898, 24244, 877, 598, 328, 275, 655, 29939, 742, 9049, 5085, 3790, 29915, 20571, 2396, 282, 29895, 20073, 13, 1678, 1683, 29901, 13, 4706, 883, 353, 12129, 4758, 29924, 18463, 1187, 3934, 580, 13, 1678, 736, 4050, 29898, 3827, 29892, 525, 264, 1403, 279, 29918, 655, 12621, 271, 29889, 1420, 742, 11117, 689, 2396, 883, 29892, 525, 29880, 492, 1030, 2396, 301, 492, 1030, 1800, 13, 13, 13, 1753, 10397, 279, 15840, 479, 29898, 3827, 29892, 282, 29895, 29892, 282, 29895, 15840, 479, 1125, 13, 1678, 301, 492, 1030, 353, 365, 492, 1030, 29889, 12650, 29889, 657, 29898, 20571, 29922, 20571, 29897, 13, 1678, 527, 26775, 353, 1954, 26775, 29889, 12650, 29889, 657, 29898, 20571, 29922, 20571, 15840, 479, 29897, 13, 1678, 301, 492, 1030, 29889, 15840, 2710, 29889, 5992, 29898, 15840, 479, 29897, 13, 1678, 301, 492, 1030, 29889, 7620, 580, 13, 1678, 736, 9056, 5103, 24735, 29898, 3827, 29889, 2303, 6040, 29889, 657, 877, 10493, 29918, 25866, 1001, 1001, 742, 8207, 8785, 13, 13, 13, 1753, 5142, 29918, 3027, 29898, 3827, 29892, 282, 29895, 29892, 282, 29895, 15840, 479, 1125, 13, 1678, 1967, 353, 1954, 26775, 29889, 12650, 29889, 657, 29898, 20571, 29922, 20571, 15840, 479, 29897, 13, 1678, 10422, 353, 1967, 29889, 3027, 29889, 1445, 29889, 978, 29889, 5451, 11219, 1495, 14352, 29896, 29962, 13, 1678, 2933, 353, 9056, 5103, 29898, 3027, 29889, 3027, 29889, 1445, 29892, 2793, 29918, 1853, 2433, 726, 29914, 24595, 1495, 13, 1678, 2933, 1839, 3916, 29899, 4205, 3283, 2033, 353, 525, 14930, 358, 29936, 10422, 16328, 29879, 29915, 1273, 10422, 13, 13, 1678, 736, 2933, 13, 13, 13, 1753, 10397, 279, 1333, 15039, 3934, 29898, 3827, 29892, 282, 29895, 1333, 15039, 3934, 1125, 13, 1678, 2216, 15039, 3934, 29889, 12650, 29889, 4572, 29898, 20571, 29922, 20571, 1333, 15039, 3934, 467, 8143, 580, 13, 1678, 736, 9056, 5103, 24735, 29898, 3827, 29889, 2303, 6040, 29889, 657, 877, 10493, 29918, 25866, 1001, 1001, 742, 8207, 8785, 13, 13, 13, 1753, 10397, 2817, 790, 26775, 29898, 3827, 29892, 282, 8848, 790, 26775, 1125, 13, 1678, 4750, 26775, 29889, 12650, 29889, 4572, 29898, 20571, 29922, 29886, 8848, 790, 26775, 467, 8143, 580, 13, 1678, 736, 9056, 5103, 24735, 29898, 3827, 29889, 2303, 6040, 29889, 657, 877, 10493, 29918, 25866, 1001, 1001, 742, 8207, 8785, 13, 13, 13, 1753, 26978, 11267, 3597, 29874, 3934, 29898, 3827, 29892, 282, 29895, 1125, 13, 1678, 301, 492, 1030, 353, 365, 492, 1030, 29889, 12650, 29889, 657, 29898, 20571, 29922, 20571, 29897, 13, 1678, 565, 2009, 29889, 5696, 1275, 525, 5438, 2396, 13, 4706, 883, 353, 4956, 293, 3673, 19858, 29874, 3934, 2500, 29898, 3827, 29889, 5438, 29897, 13, 4706, 565, 883, 29889, 275, 29918, 3084, 7295, 13, 9651, 385, 327, 17249, 353, 2009, 29889, 5438, 29889, 657, 877, 273, 327, 17249, 1495, 13, 9651, 5446, 353, 883, 29889, 7620, 580, 13, 9651, 5446, 29889, 29880, 492, 1030, 353, 301, 492, 1030, 13, 9651, 5446, 29889, 15204, 353, 2009, 29889, 1792, 13, 9651, 301, 492, 1030, 29889, 510, 296, 1306, 29918, 277, 353, 385, 327, 17249, 13, 9651, 16954, 22643, 279, 29918, 277, 29898, 5415, 29892, 301, 492, 1030, 29897, 13, 9651, 301, 492, 1030, 29889, 7620, 580, 13, 9651, 5446, 29889, 7620, 580, 13, 9651, 736, 6684, 29898, 24244, 877, 6203, 7486, 601, 742, 9049, 5085, 3790, 29915, 20571, 2396, 282, 29895, 20073, 13, 1678, 1683, 29901, 13, 4706, 883, 353, 4956, 293, 3673, 29924, 18463, 1187, 3934, 2500, 580, 13, 1678, 3240, 497, 279, 711, 336, 29898, 29880, 492, 1030, 29897, 13, 1678, 736, 4050, 29898, 3827, 29892, 376, 264, 1403, 279, 29918, 29880, 492, 1030, 29918, 3597, 279, 29889, 1420, 613, 11117, 689, 2396, 883, 1800, 13, 13, 13, 1753, 16954, 22643, 279, 29918, 277, 29898, 2929, 293, 11267, 29892, 301, 492, 1030, 1125, 13, 1678, 372, 29918, 29880, 492, 1973, 353, 8701, 2659, 29889, 12650, 29889, 4572, 29898, 275, 29918, 1806, 29922, 5574, 29892, 301, 492, 545, 29922, 5574, 29897, 13, 1678, 372, 29918, 2993, 353, 372, 29918, 29880, 492, 1973, 29961, 29900, 29962, 13, 1678, 301, 492, 1030, 29889, 277, 353, 372, 29918, 2993, 13, 1678, 301, 492, 1030, 29889, 7620, 580, 13, 1678, 26978, 11267, 29889, 277, 353, 372, 29918, 2993, 13, 1678, 372, 353, 8701, 2659, 29889, 12650, 29889, 657, 29898, 5269, 29922, 277, 29918, 2993, 29897, 13, 1678, 396, 372, 29889, 29880, 492, 545, 353, 7700, 13, 1678, 372, 29889, 7620, 580, 13, 1678, 451, 15039, 3934, 353, 2216, 15039, 3934, 580, 13, 1678, 451, 15039, 3934, 29889, 9894, 26775, 353, 376, 29911, 575, 443, 26121, 899, 30064, 4019, 566, 316, 970, 12076, 3566, 1114, 29908, 13, 1678, 451, 15039, 3934, 29889, 375, 29884, 1306, 353, 372, 29918, 2993, 13, 1678, 848, 353, 12865, 29889, 3707, 580, 13, 1678, 451, 15039, 3934, 29889, 1272, 353, 848, 13, 1678, 451, 15039, 3934, 29889, 29880, 492, 1030, 353, 301, 492, 1030, 13, 1678, 451, 15039, 3934, 29889, 7620, 580, 13, 13, 13, 1753, 26978, 11267, 2308, 328, 1682, 3934, 29898, 3827, 29892, 282, 29895, 1125, 13, 1678, 301, 492, 1030, 353, 365, 492, 1030, 29889, 12650, 29889, 657, 29898, 20571, 29922, 20571, 29897, 13, 1678, 565, 2009, 29889, 5696, 1275, 525, 5438, 2396, 13, 4706, 883, 353, 4956, 293, 3673, 2308, 328, 1682, 3934, 2500, 29898, 3827, 29889, 5438, 29897, 13, 4706, 565, 883, 29889, 275, 29918, 3084, 7295, 13, 9651, 5446, 353, 883, 29889, 7620, 580, 13, 9651, 5446, 29889, 29880, 492, 1030, 353, 301, 492, 1030, 13, 9651, 5446, 29889, 15204, 353, 2009, 29889, 1792, 13, 9651, 1178, 29875, 4125, 353, 5446, 29889, 8819, 4125, 13, 9651, 5446, 29889, 7620, 580, 13, 9651, 27219, 381, 29931, 492, 1030, 29898, 29880, 492, 1030, 29892, 1178, 29875, 4125, 29897, 13, 9651, 396, 451, 928, 279, 15280, 2308, 328, 1682, 3934, 29898, 29880, 492, 1030, 29897, 13, 9651, 736, 6684, 29898, 3827, 29889, 2084, 29918, 3888, 29897, 13, 1678, 1683, 29901, 13, 4706, 883, 353, 4956, 293, 3673, 2308, 328, 1682, 3934, 2500, 580, 13, 1678, 736, 4050, 29898, 3827, 29892, 525, 2929, 293, 11267, 29918, 29576, 1682, 3934, 29889, 1420, 742, 11117, 689, 2396, 883, 29892, 525, 29880, 492, 1030, 2396, 301, 492, 1030, 1800, 13, 13, 13, 1753, 6898, 8749, 2308, 13467, 617, 1080, 29898, 3827, 29892, 282, 29895, 1125, 13, 1678, 301, 492, 1030, 353, 365, 492, 1030, 29889, 12650, 29889, 657, 29898, 20571, 29922, 20571, 29897, 13, 1678, 3030, 353, 426, 13, 4706, 525, 29880, 492, 1030, 2396, 301, 492, 1030, 29892, 13, 1678, 500, 13, 1678, 736, 4050, 29898, 3827, 29892, 376, 23014, 8749, 29918, 509, 13467, 617, 1080, 29889, 1420, 613, 3030, 29897, 13, 13, 13, 1753, 27219, 381, 29931, 492, 1030, 29898, 29880, 492, 1030, 29892, 1178, 29875, 4125, 1125, 13, 1678, 13552, 353, 301, 492, 1030, 29889, 5140, 29889, 2084, 13, 1678, 13872, 353, 301, 492, 1030, 29889, 726, 29925, 433, 29889, 2084, 13, 13, 1678, 565, 313, 8819, 4125, 1275, 525, 267, 29374, 13, 4706, 25314, 3934, 353, 301, 492, 1030, 29889, 267, 29889, 2084, 13, 13, 1678, 565, 313, 8819, 4125, 1275, 525, 264, 29374, 13, 4706, 25314, 3934, 353, 301, 492, 1030, 29889, 264, 29889, 2084, 13, 13, 1678, 25342, 313, 8819, 4125, 1275, 525, 415, 29374, 13, 4706, 25314, 3934, 353, 301, 492, 1030, 29889, 415, 29889, 2084, 13, 13, 1678, 25342, 313, 8819, 4125, 1275, 525, 17599, 29374, 13, 4706, 25314, 3934, 353, 301, 492, 1030, 29889, 17599, 29889, 2084, 13, 13, 1678, 411, 1722, 29898, 5140, 29892, 525, 6050, 1495, 408, 13552, 29918, 1445, 29892, 1722, 29898, 3945, 29892, 525, 29893, 1495, 408, 13872, 29918, 1445, 29901, 13, 4706, 1303, 29918, 5140, 353, 10772, 8493, 29906, 29889, 29925, 2176, 2283, 6982, 29898, 5140, 29918, 1445, 29897, 13, 4706, 1353, 29918, 974, 29918, 12292, 353, 1303, 29918, 5140, 29889, 657, 8009, 27514, 580, 13, 4706, 363, 1813, 29918, 4537, 297, 3464, 29898, 4537, 29918, 974, 29918, 12292, 1125, 13, 9651, 1813, 353, 1303, 29918, 5140, 29889, 657, 5074, 29898, 3488, 29918, 4537, 29897, 13, 9651, 1813, 29918, 3051, 353, 1813, 29889, 21111, 1626, 580, 13, 9651, 13872, 29918, 1445, 29889, 3539, 29898, 3488, 29918, 3051, 29897, 13, 13, 1678, 5578, 1061, 353, 4103, 29880, 1061, 29898, 517, 29918, 3893, 29922, 8819, 4125, 29897, 13, 13, 1678, 411, 1722, 29898, 3945, 29892, 525, 29878, 1495, 408, 1426, 26036, 29901, 13, 4706, 848, 353, 1426, 26036, 29889, 949, 580, 13, 1678, 304, 29918, 21652, 353, 848, 7503, 29945, 29900, 29900, 29962, 13, 1678, 13962, 353, 5578, 1061, 29889, 21652, 29898, 517, 29918, 21652, 29897, 13, 13, 1678, 13552, 353, 383, 8493, 580, 13, 1678, 13552, 29889, 1202, 29918, 3488, 580, 13, 1678, 13552, 29889, 842, 29918, 5657, 877, 27521, 742, 2159, 29922, 29896, 29906, 29897, 13, 1678, 13552, 29889, 9910, 29918, 3729, 29898, 29896, 29929, 29900, 29892, 29871, 29896, 29906, 29892, 13872, 29922, 3286, 18411, 29897, 13, 1678, 13552, 29889, 4905, 29898, 29576, 1682, 3934, 718, 11393, 5140, 1159, 13, 13, 1678, 396, 411, 1722, 29898, 29880, 492, 1030, 29889, 29576, 1682, 3934, 29892, 376, 29893, 29890, 1159, 408, 301, 492, 1030, 2308, 328, 1682, 3934, 3835, 29901, 13, 1678, 396, 1678, 13962, 29889, 3539, 29898, 29880, 492, 1030, 2308, 328, 1682, 3934, 3835, 29897, 13, 13, 13, 1753, 4516, 509, 13467, 617, 1080, 29898, 3827, 29892, 282, 29895, 1125, 13, 1678, 301, 492, 1030, 353, 365, 492, 1030, 29889, 12650, 29889, 657, 29898, 20571, 29922, 20571, 29897, 13, 1678, 3030, 353, 426, 13, 4706, 376, 29880, 492, 1030, 1115, 301, 492, 1030, 29892, 13, 1678, 500, 13, 1678, 736, 4050, 29898, 3827, 29892, 525, 11851, 4170, 29918, 509, 13467, 617, 1080, 29889, 1420, 742, 3030, 29897, 13, 13, 13, 1753, 3240, 497, 279, 711, 336, 29898, 29880, 492, 1030, 1125, 13, 1678, 396, 11328, 13, 13, 1678, 3240, 497, 8493, 353, 383, 8493, 580, 13, 1678, 3240, 497, 8493, 29889, 1202, 29918, 3488, 580, 13, 1678, 3240, 497, 8493, 29889, 842, 29918, 5657, 703, 29909, 9315, 613, 2159, 29922, 29896, 29945, 29897, 13, 1678, 285, 353, 1722, 29898, 29880, 492, 1030, 29889, 726, 29925, 433, 29889, 2084, 29892, 376, 29878, 1159, 13, 1678, 363, 921, 297, 285, 29901, 13, 4706, 3240, 497, 8493, 29889, 9910, 29918, 3729, 29898, 29896, 29929, 29900, 29892, 29871, 29896, 29900, 29892, 13872, 29922, 29916, 29892, 5139, 29922, 29900, 29892, 7595, 2433, 29967, 742, 5445, 29922, 8824, 29897, 13, 1678, 3240, 497, 8493, 29889, 3729, 29898, 29896, 29929, 29900, 29892, 29871, 29896, 29900, 29892, 13872, 543, 9606, 29965, 9033, 3960, 29933, 1299, 14445, 383, 1177, 1964, 5012, 29931, 383, 4717, 29954, 13780, 5012, 341, 3718, 4717, 613, 13, 462, 259, 301, 29876, 29922, 29896, 29892, 7595, 2433, 29907, 1495, 13, 1678, 3240, 497, 8493, 29889, 3729, 29898, 29896, 29929, 29900, 29892, 29871, 29896, 29900, 29892, 13872, 543, 5894, 3133, 279, 10364, 566, 524, 628, 640, 335, 329, 628, 301, 492, 1030, 29892, 21696, 1403, 29884, 29899, 23517, 263, 6726, 631, 4515, 613, 13, 462, 259, 301, 29876, 29922, 29906, 29892, 7595, 2433, 29907, 1495, 13, 1678, 3240, 497, 8493, 29889, 4905, 29898, 29880, 492, 1030, 29889, 5140, 29918, 2267, 497, 29889, 2084, 718, 11393, 5140, 1159, 13, 13, 1678, 396, 17956, 13, 13, 1678, 3240, 497, 2890, 353, 383, 8493, 580, 13, 1678, 3240, 497, 2890, 29889, 1202, 29918, 3488, 580, 13, 1678, 3240, 497, 2890, 29889, 842, 29918, 5657, 703, 29909, 9315, 613, 2159, 29922, 29896, 29945, 29897, 13, 13, 1678, 831, 353, 1722, 29898, 29880, 492, 1030, 29889, 267, 29889, 2084, 29892, 376, 29878, 1159, 13, 13, 1678, 363, 921, 297, 831, 29901, 13, 4706, 3240, 497, 2890, 29889, 9910, 29918, 3729, 29898, 29906, 29900, 29900, 29892, 29871, 29896, 29900, 29892, 13872, 29922, 29916, 29892, 5139, 29922, 29900, 29892, 7595, 2433, 29967, 742, 5445, 29922, 8824, 29897, 13, 1678, 3240, 497, 2890, 29889, 3729, 29898, 29906, 29900, 29900, 29892, 29871, 29896, 29900, 29892, 13, 462, 29871, 13872, 543, 9606, 29965, 9033, 3960, 29933, 1299, 14445, 383, 1177, 1964, 5012, 29931, 383, 4717, 29954, 13780, 5012, 341, 3718, 4717, 29905, 29876, 29950, 3289, 365, 1307, 29954, 3035, 29949, 14445, 383, 1177, 1964, 5012, 29931, 383, 4717, 29954, 13780, 29949, 5012, 341, 4462, 1254, 4717, 9162, 13, 462, 29871, 301, 29876, 29922, 29896, 29892, 7595, 2433, 29907, 1495, 13, 1678, 3240, 497, 2890, 29889, 3729, 29898, 29906, 29900, 29900, 29892, 29871, 29896, 29900, 29892, 13, 462, 29871, 13872, 543, 5894, 3133, 279, 10364, 566, 524, 628, 640, 292, 329, 628, 301, 492, 1030, 29892, 21696, 1403, 29884, 29899, 23517, 263, 6726, 631, 4515, 29905, 29876, 2177, 29874, 3133, 279, 766, 1341, 329, 1743, 628, 16962, 1941, 628, 19366, 29892, 2858, 7283, 29983, 3188, 263, 6726, 631, 4515, 9162, 13, 462, 29871, 301, 29876, 29922, 29906, 29892, 7595, 2433, 29907, 1495, 13, 1678, 3240, 497, 2890, 29889, 4905, 29898, 29880, 492, 1030, 29889, 267, 29918, 2267, 497, 29889, 2084, 718, 11393, 5140, 1159, 13, 1678, 1596, 29898, 29880, 492, 1030, 29889, 267, 29918, 2267, 497, 29889, 2084, 29897, 13, 13, 1678, 396, 12524, 13, 13, 1678, 3240, 497, 1430, 353, 383, 8493, 580, 13, 1678, 3240, 497, 1430, 29889, 1202, 29918, 3488, 580, 13, 1678, 3240, 497, 1430, 29889, 842, 29918, 5657, 703, 29909, 9315, 613, 2159, 29922, 29896, 29945, 29897, 13, 1678, 427, 353, 1722, 29898, 29880, 492, 1030, 29889, 264, 29889, 2084, 29892, 376, 29878, 1159, 13, 1678, 363, 921, 297, 427, 29901, 13, 4706, 3240, 497, 1430, 29889, 9910, 29918, 3729, 29898, 29906, 29900, 29900, 29892, 29871, 29896, 29900, 29892, 13872, 29922, 29916, 29892, 5139, 29922, 29900, 29892, 7595, 2433, 29967, 742, 5445, 29922, 8824, 29897, 13, 1678, 3240, 497, 1430, 29889, 3729, 29898, 29906, 29900, 29900, 29892, 29871, 29896, 29900, 29892, 13872, 543, 9606, 29965, 9033, 3960, 29933, 1299, 14445, 383, 1177, 1964, 5012, 29931, 383, 4717, 29954, 13780, 5012, 341, 3718, 4717, 9162, 13, 462, 29871, 301, 29876, 29922, 29896, 29892, 7595, 2433, 29907, 1495, 13, 1678, 3240, 497, 1430, 29889, 3729, 29898, 29906, 29900, 29900, 29892, 29871, 29896, 29900, 29892, 13872, 543, 29979, 27269, 379, 7520, 29923, 5195, 2477, 29950, 3352, 6093, 11056, 8079, 6093, 16698, 3580, 1307, 383, 4717, 29954, 13780, 9162, 13, 462, 29871, 301, 29876, 29922, 29896, 29892, 7595, 2433, 29907, 1495, 13, 1678, 3240, 497, 1430, 29889, 3729, 29898, 29906, 29900, 29900, 29892, 29871, 29896, 29900, 29892, 13872, 543, 5894, 3133, 279, 10364, 566, 524, 628, 640, 292, 329, 628, 301, 492, 1030, 29892, 21696, 1403, 29884, 29899, 23517, 263, 6726, 631, 4515, 9162, 13, 462, 29871, 301, 29876, 29922, 29906, 29892, 7595, 2433, 29907, 1495, 13, 1678, 3240, 497, 1430, 29889, 3729, 29898, 29906, 29900, 29900, 29892, 29871, 29896, 29900, 29892, 13872, 543, 1762, 6773, 11418, 5414, 278, 8118, 310, 278, 3143, 29892, 1014, 13086, 304, 6726, 631, 4515, 9162, 13, 462, 29871, 301, 29876, 29922, 29906, 29892, 7595, 2433, 29907, 1495, 13, 1678, 3240, 497, 1430, 29889, 4905, 29898, 29880, 492, 1030, 29889, 264, 29918, 2267, 497, 29889, 2084, 718, 11393, 5140, 1159, 13, 13, 1678, 396, 349, 29911, 13, 13, 1678, 3240, 497, 7982, 353, 383, 8493, 580, 13, 1678, 3240, 497, 7982, 29889, 1202, 29918, 3488, 580, 13, 1678, 3240, 497, 7982, 29889, 842, 29918, 5657, 703, 29909, 9315, 613, 2159, 29922, 29896, 29945, 29897, 13, 1678, 19592, 353, 1722, 29898, 29880, 492, 1030, 29889, 415, 29889, 2084, 29892, 376, 29878, 1159, 13, 1678, 363, 921, 297, 19592, 29901, 13, 4706, 3240, 497, 7982, 29889, 9910, 29918, 3729, 29898, 29906, 29900, 29900, 29892, 29871, 29896, 29900, 29892, 13872, 29922, 29916, 29892, 5139, 29922, 29900, 29892, 7595, 2433, 29967, 742, 5445, 29922, 8824, 29897, 13, 1678, 3240, 497, 7982, 29889, 3729, 29898, 29906, 29900, 29900, 29892, 29871, 29896, 29900, 29892, 13872, 543, 9606, 29965, 9033, 3960, 29933, 1299, 14445, 383, 1177, 1964, 5012, 29931, 383, 4717, 29954, 13780, 5012, 341, 3718, 4717, 9162, 13, 462, 29871, 301, 29876, 29922, 29896, 29892, 7595, 2433, 29907, 1495, 13, 1678, 3240, 497, 7982, 29889, 3729, 29898, 29906, 29900, 29900, 29892, 29871, 29896, 29900, 29892, 13872, 543, 29963, 20166, 30403, 319, 12182, 2190, 30219, 27269, 438, 383, 7833, 11662, 383, 4717, 29954, 13780, 29949, 5012, 13862, 3718, 4717, 9162, 13, 462, 29871, 301, 29876, 29922, 29896, 29892, 7595, 2433, 29907, 1495, 13, 1678, 3240, 497, 7982, 29889, 3729, 29898, 29906, 29900, 29900, 29892, 29871, 29896, 29900, 29892, 13872, 543, 5894, 3133, 279, 10364, 566, 524, 628, 640, 292, 329, 628, 301, 492, 1030, 29892, 21696, 1403, 29884, 29899, 23517, 263, 6726, 631, 4515, 613, 13, 462, 29871, 301, 29876, 29922, 29906, 29892, 7595, 2433, 29907, 1495, 13, 1678, 3240, 497, 7982, 29889, 3729, 29898, 29906, 29900, 29900, 29892, 29871, 29896, 29900, 29892, 13872, 543, 2177, 29874, 3133, 279, 11712, 345, 277, 1743, 288, 21030, 30030, 1867, 437, 7294, 307, 29892, 1223, 457, 6726, 631, 4515, 613, 13, 462, 29871, 301, 29876, 29922, 29906, 29892, 7595, 2433, 29907, 1495, 13, 1678, 3240, 497, 7982, 29889, 4905, 29898, 29880, 492, 1030, 29889, 415, 29918, 2267, 497, 29889, 2084, 718, 11393, 5140, 1159, 13, 13, 1678, 396, 796, 29950, 13, 13, 1678, 3240, 497, 29999, 29950, 353, 383, 8493, 580, 13, 1678, 3240, 497, 29999, 29950, 29889, 1202, 29918, 3488, 580, 13, 1678, 3240, 497, 29999, 29950, 29889, 842, 29918, 5657, 703, 29909, 9315, 613, 2159, 29922, 29896, 29945, 29897, 13, 1678, 503, 29882, 353, 1722, 29898, 29880, 492, 1030, 29889, 17599, 29889, 2084, 29892, 376, 29878, 1159, 13, 1678, 363, 921, 297, 503, 29882, 29901, 13, 4706, 3240, 497, 29999, 29950, 29889, 9910, 29918, 3729, 29898, 29906, 29900, 29900, 29892, 29871, 29896, 29900, 29892, 13872, 29922, 29916, 29892, 5139, 29922, 29900, 29892, 7595, 2433, 29967, 742, 5445, 29922, 8824, 29897, 13, 1678, 3240, 497, 29999, 29950, 29889, 3729, 29898, 29906, 29900, 29900, 29892, 29871, 29896, 29900, 29892, 13872, 543, 9606, 29965, 9033, 3960, 29933, 1299, 14445, 383, 1177, 1964, 5012, 29931, 383, 4717, 29954, 13780, 5012, 341, 3718, 4717, 613, 13, 462, 29871, 301, 29876, 29922, 29896, 29892, 7595, 2433, 29907, 1495, 13, 1678, 3240, 497, 29999, 29950, 29889, 3729, 29898, 29906, 29900, 29900, 29892, 29871, 29896, 29900, 29892, 13872, 543, 5894, 3133, 279, 10364, 566, 524, 628, 640, 292, 329, 628, 301, 492, 1030, 29892, 21696, 1403, 29884, 29899, 23517, 263, 6726, 631, 4515, 613, 13, 462, 29871, 301, 29876, 29922, 29906, 29892, 7595, 2433, 29907, 1495, 13, 1678, 3240, 497, 29999, 29950, 29889, 4905, 29898, 29880, 492, 1030, 29889, 17599, 29918, 2267, 497, 29889, 2084, 718, 11393, 5140, 1159, 13, 13, 1678, 301, 492, 1030, 29889, 7620, 580, 13, 13, 13, 1753, 639, 1777, 29898, 3827, 29892, 282, 29895, 546, 1777, 1125, 13, 1678, 502, 29884, 1306, 353, 8701, 2659, 29889, 12650, 29889, 657, 29898, 5269, 29922, 3827, 29889, 1792, 29897, 13, 1678, 301, 1761, 284, 1982, 690, 353, 1051, 580, 13, 1678, 565, 502, 29884, 1306, 29889, 275, 29918, 15280, 29901, 13, 4706, 301, 1761, 284, 1982, 690, 353, 365, 492, 1030, 29889, 12650, 29889, 4572, 29898, 15204, 29922, 375, 29884, 1306, 29897, 13, 1678, 565, 502, 29884, 1306, 29889, 275, 29918, 29923, 2154, 272, 29901, 13, 4706, 301, 1761, 284, 1982, 690, 353, 365, 492, 1030, 29889, 12650, 29889, 4572, 29898, 267, 11709, 29922, 375, 29884, 1306, 29897, 13, 1678, 565, 502, 29884, 1306, 29889, 275, 29918, 29928, 13119, 29891, 3136, 29901, 13, 4706, 301, 1761, 284, 1982, 690, 353, 365, 492, 1030, 29889, 12650, 29889, 4572, 29898, 29881, 13119, 29891, 3136, 29922, 375, 29884, 1306, 29897, 13, 1678, 565, 502, 29884, 1306, 29889, 275, 29918, 29924, 18463, 1187, 3934, 29901, 13, 4706, 301, 1761, 284, 1982, 690, 353, 365, 492, 1030, 29889, 12650, 29889, 4572, 29898, 655, 12621, 3136, 29922, 375, 29884, 1306, 29897, 13, 1678, 565, 502, 29884, 1306, 29889, 275, 29918, 1806, 29901, 13, 4706, 301, 1761, 284, 1982, 690, 353, 365, 492, 1030, 29889, 12650, 29889, 4572, 29898, 277, 29922, 375, 29884, 1306, 29897, 13, 1678, 3030, 353, 426, 13, 4706, 525, 29880, 1982, 690, 2396, 301, 1761, 284, 1982, 690, 13, 1678, 500, 13, 1678, 736, 4050, 29898, 3827, 29892, 525, 10185, 29889, 1420, 742, 3030, 29897, 13, 13, 13, 1753, 2295, 2002, 3934, 29898, 3827, 29892, 282, 29895, 546, 1777, 1125, 13, 1678, 502, 29884, 1306, 353, 8701, 2659, 29889, 12650, 29889, 657, 29898, 20571, 29922, 20571, 546, 1777, 29897, 13, 1678, 565, 2009, 29889, 5696, 1275, 525, 5438, 2396, 13, 4706, 883, 353, 12782, 2002, 3934, 2500, 29898, 3827, 29889, 5438, 29897, 13, 4706, 565, 883, 29889, 275, 29918, 3084, 7295, 13, 9651, 502, 29884, 1306, 29889, 11522, 353, 883, 29889, 14941, 287, 29918, 1272, 29889, 657, 877, 11522, 1495, 13, 9651, 502, 29884, 1306, 29889, 287, 271, 353, 883, 29889, 14941, 287, 29918, 1272, 29889, 657, 877, 287, 271, 1495, 13, 9651, 502, 29884, 1306, 29889, 14167, 29872, 353, 883, 29889, 14941, 287, 29918, 1272, 29889, 657, 877, 14167, 29872, 1495, 13, 9651, 502, 29884, 1306, 29889, 7620, 580, 13, 9651, 736, 6684, 29898, 24244, 877, 546, 1777, 742, 9049, 5085, 3790, 29915, 20571, 546, 1777, 2396, 282, 29895, 546, 1777, 20073, 13, 1678, 1683, 29901, 13, 4706, 883, 353, 12782, 2002, 3934, 2500, 580, 13, 1678, 736, 4050, 29898, 3827, 29892, 525, 2917, 2002, 3934, 29918, 546, 1777, 29889, 1420, 742, 11117, 689, 2396, 883, 1800, 13, 13, 13, 1753, 1178, 14910, 267, 29898, 3827, 29892, 282, 29895, 1125, 13, 1678, 301, 492, 1030, 353, 365, 492, 1030, 29889, 12650, 29889, 657, 29898, 20571, 29922, 20571, 29897, 13, 1678, 419, 296, 12260, 353, 422, 296, 1306, 29889, 12650, 29889, 4572, 29898, 29880, 492, 1030, 29922, 29880, 492, 1030, 29897, 13, 1678, 3030, 353, 426, 13, 4706, 376, 29880, 492, 1030, 1115, 301, 492, 1030, 29892, 13, 4706, 376, 510, 296, 12260, 1115, 419, 296, 12260, 13, 1678, 500, 13, 1678, 736, 4050, 29898, 3827, 29892, 525, 8819, 4125, 29889, 1420, 742, 3030, 29897, 13, 2 ]
test/pyroapi/test_pyroapi.py
MarcoGorelli/numpyro
1
91191
<reponame>MarcoGorelli/numpyro<filename>test/pyroapi/test_pyroapi.py # Copyright Contributors to the Pyro project. # SPDX-License-Identifier: Apache-2.0 from pyroapi import pyro_backend from pyroapi.tests import * # noqa F401 import pytest pytestmark = pytest.mark.filterwarnings( "ignore::numpyro.compat.util.UnsupportedAPIWarning", "ignore:Currently, SVI does not support models with discrete", ) @pytest.fixture def backend(): with pyro_backend("numpy"): yield
[ 1, 529, 276, 1112, 420, 29958, 7083, 1111, 29954, 272, 5481, 29914, 23749, 307, 29966, 9507, 29958, 1688, 29914, 2272, 307, 2754, 29914, 1688, 29918, 2272, 307, 2754, 29889, 2272, 13, 29937, 14187, 1266, 2866, 1091, 29560, 304, 278, 10772, 307, 2060, 29889, 13, 29937, 10937, 29928, 29990, 29899, 29931, 293, 1947, 29899, 12889, 29901, 13380, 29899, 29906, 29889, 29900, 13, 13, 3166, 11451, 307, 2754, 1053, 11451, 307, 29918, 27852, 13, 3166, 11451, 307, 2754, 29889, 21150, 1053, 334, 29871, 396, 694, 25621, 383, 29946, 29900, 29896, 13, 5215, 11451, 1688, 13, 13, 2272, 1688, 3502, 353, 11451, 1688, 29889, 3502, 29889, 4572, 25442, 886, 29898, 13, 1678, 376, 17281, 1057, 23749, 307, 29889, 12667, 29889, 4422, 29889, 25807, 29884, 3016, 287, 8787, 22709, 613, 13, 1678, 376, 17281, 29901, 7583, 368, 29892, 13955, 29902, 947, 451, 2304, 4733, 411, 19554, 613, 13, 29897, 13, 13, 13, 29992, 2272, 1688, 29889, 7241, 15546, 13, 1753, 14998, 7295, 13, 1678, 411, 11451, 307, 29918, 27852, 703, 23749, 29908, 1125, 13, 4706, 7709, 13, 2 ]
knox/settings.py
liradb2000/django-rest-knox
0
77872
<filename>knox/settings.py from datetime import timedelta from django.conf import settings from django.test.signals import setting_changed from rest_framework.settings import APISettings, api_settings, import_from_string, perform_import, REMOVED_SETTINGS USER_SETTINGS = getattr(settings, 'REST_KNOX', None) DEFAULTS = { 'SECURE_HASH_ALGORITHM': 'cryptography.hazmat.primitives.hashes.SHA512', 'AUTH_TOKEN_CHARACTER_LENGTH': 64, 'TOKEN_TTL': timedelta(hours=10), 'USER_SERIALIZER': None, 'TOKEN_LIMIT_PER_USER': None, 'AUTO_REFRESH': False, 'MIN_REFRESH_INTERVAL': 60, 'AUTH_HEADER_PREFIX': 'Token', 'EXPIRY_DATETIME_FORMAT': api_settings.DATETIME_FORMAT, 'USE_COOKIE': False, 'COOKIE_SETTINGS': { 'NAME': 'partial_token', 'PATH': '/', 'DOMAIN': None, 'SECURE': False, 'HTTP_ONLY': True, 'SAMESITE': None } } IMPORT_STRINGS = { 'SECURE_HASH_ALGORITHM', 'USER_SERIALIZER', } class knox_APISettings(APISettings): def __init__(self, user_settings=None, defaults=None, import_strings=None): self.defaults = defaults or DEFAULTS if user_settings: self._user_settings = self.__check_user_settings(user_settings) self.import_strings = import_strings or IMPORT_STRINGS self._cached_attrs = set() def __getattr__(self, attr): if attr not in self.defaults: raise AttributeError("Invalid API setting: '%s'" % attr) try: # Check if present in user settings val = self.user_settings[attr] except KeyError: # Fall back to defaults val = self.defaults[attr] # Coerce import strings into classes if attr in self.import_strings: val = perform_import(val, attr) # Cache the result self._cached_attrs.add(attr) setattr(self, attr, val) return val def __check_user_settings(self, user_settings): SETTINGS_DOC = "https://www.django-rest-framework.org/api-guide/settings/" for attr, val in user_settings.items(): if isinstance(val, dict): user_settings[attr]=dict(self.defaults.get(attr,{}), **val) for setting in REMOVED_SETTINGS: if setting in user_settings: raise RuntimeError("The '%s' setting has been removed. Please refer to '%s' for available settings." % (setting, SETTINGS_DOC)) return user_settings knox_settings = knox_APISettings(USER_SETTINGS, DEFAULTS, IMPORT_STRINGS) def reload_api_settings(*args, **kwargs): global knox_settings setting, value = kwargs['setting'], kwargs['value'] if setting == 'REST_KNOX': knox_settings = knox_APISettings(value, DEFAULTS, IMPORT_STRINGS) setting_changed.connect(reload_api_settings) class CONSTANTS: ''' Constants cannot be changed at runtime ''' TOKEN_KEY_LENGTH = 8 DIGEST_LENGTH = 128 def __setattr__(self, *args, **kwargs): raise Exception(''' Constant values must NEVER be changed at runtime, as they are integral to the structure of database tables ''') CONSTANTS = CONSTANTS()
[ 1, 529, 9507, 29958, 29895, 1217, 29916, 29914, 11027, 29889, 2272, 13, 3166, 12865, 1053, 5335, 287, 2554, 13, 13, 3166, 9557, 29889, 5527, 1053, 6055, 13, 3166, 9557, 29889, 1688, 29889, 4530, 1338, 1053, 4444, 29918, 15033, 13, 3166, 1791, 29918, 4468, 29889, 11027, 1053, 3450, 9585, 29892, 7882, 29918, 11027, 29892, 1053, 29918, 3166, 29918, 1807, 29892, 2189, 29918, 5215, 29892, 5195, 6720, 29963, 3352, 29918, 10490, 29911, 4214, 29903, 13, 13, 11889, 29918, 10490, 29911, 4214, 29903, 353, 679, 5552, 29898, 11027, 29892, 525, 1525, 1254, 29918, 29968, 6632, 29990, 742, 6213, 29897, 13, 13, 23397, 29903, 353, 426, 13, 1678, 525, 1660, 29907, 11499, 29918, 29950, 24943, 29918, 1964, 29954, 1955, 13054, 29924, 2396, 525, 29883, 4641, 5275, 29889, 29882, 834, 2922, 29889, 9469, 277, 3145, 29889, 8568, 267, 29889, 23498, 29945, 29896, 29906, 742, 13, 1678, 525, 20656, 29950, 29918, 4986, 29968, 1430, 29918, 11282, 17923, 1001, 29918, 19433, 2396, 29871, 29953, 29946, 29892, 13, 1678, 525, 4986, 29968, 1430, 29918, 29911, 14632, 2396, 5335, 287, 2554, 29898, 29882, 2470, 29922, 29896, 29900, 511, 13, 1678, 525, 11889, 29918, 6304, 25758, 26664, 1001, 2396, 6213, 29892, 13, 1678, 525, 4986, 29968, 1430, 29918, 5265, 26349, 29918, 13171, 29918, 11889, 2396, 6213, 29892, 13, 1678, 525, 20656, 29949, 29918, 25866, 1525, 7068, 2396, 7700, 29892, 13, 1678, 525, 16173, 29918, 25866, 1525, 7068, 29918, 23845, 8932, 2396, 29871, 29953, 29900, 29892, 13, 1678, 525, 20656, 29950, 29918, 23252, 1001, 29918, 15094, 25634, 2396, 525, 6066, 742, 13, 1678, 525, 5746, 2227, 13207, 29918, 25832, 2544, 8890, 29918, 19094, 1299, 2396, 7882, 29918, 11027, 29889, 25832, 2544, 8890, 29918, 19094, 1299, 29892, 13, 1678, 525, 17171, 29918, 3217, 8949, 8673, 2396, 7700, 29892, 13, 1678, 525, 3217, 8949, 8673, 29918, 10490, 29911, 4214, 29903, 2396, 426, 13, 4706, 525, 5813, 2396, 525, 3846, 29918, 6979, 742, 13, 4706, 525, 10145, 2396, 8207, 742, 13, 4706, 525, 3970, 29032, 2396, 6213, 29892, 13, 4706, 525, 1660, 29907, 11499, 2396, 7700, 29892, 13, 4706, 525, 10493, 29918, 1164, 16786, 2396, 5852, 29892, 13, 4706, 525, 8132, 2303, 29903, 9094, 2396, 6213, 13, 1678, 500, 13, 29913, 13, 13, 29902, 3580, 8476, 29918, 20785, 29903, 353, 426, 13, 1678, 525, 1660, 29907, 11499, 29918, 29950, 24943, 29918, 1964, 29954, 1955, 13054, 29924, 742, 13, 1678, 525, 11889, 29918, 6304, 25758, 26664, 1001, 742, 13, 29913, 13, 13, 1990, 889, 2251, 29918, 8787, 9585, 29898, 8787, 9585, 1125, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 1404, 29918, 11027, 29922, 8516, 29892, 21274, 29922, 8516, 29892, 1053, 29918, 19651, 29922, 8516, 1125, 13, 4706, 1583, 29889, 4381, 29879, 353, 21274, 470, 22236, 29903, 13, 4706, 565, 1404, 29918, 11027, 29901, 13, 9651, 1583, 3032, 1792, 29918, 11027, 353, 1583, 17255, 3198, 29918, 1792, 29918, 11027, 29898, 1792, 29918, 11027, 29897, 13, 4706, 1583, 29889, 5215, 29918, 19651, 353, 1053, 29918, 19651, 470, 306, 3580, 8476, 29918, 20785, 29903, 13, 4706, 1583, 3032, 29883, 3791, 29918, 5552, 29879, 353, 731, 580, 13, 13, 1678, 822, 4770, 657, 5552, 12035, 1311, 29892, 12421, 1125, 13, 4706, 565, 12421, 451, 297, 1583, 29889, 4381, 29879, 29901, 13, 9651, 12020, 23833, 2392, 703, 13919, 3450, 4444, 29901, 14210, 29879, 11838, 1273, 12421, 29897, 13, 13, 4706, 1018, 29901, 13, 9651, 396, 5399, 565, 2198, 297, 1404, 6055, 13, 9651, 659, 353, 1583, 29889, 1792, 29918, 11027, 29961, 5552, 29962, 13, 4706, 5174, 7670, 2392, 29901, 13, 9651, 396, 14053, 1250, 304, 21274, 13, 9651, 659, 353, 1583, 29889, 4381, 29879, 29961, 5552, 29962, 13, 13, 4706, 396, 3189, 261, 346, 1053, 6031, 964, 4413, 13, 4706, 565, 12421, 297, 1583, 29889, 5215, 29918, 19651, 29901, 13, 9651, 659, 353, 2189, 29918, 5215, 29898, 791, 29892, 12421, 29897, 13, 13, 4706, 396, 28540, 278, 1121, 13, 4706, 1583, 3032, 29883, 3791, 29918, 5552, 29879, 29889, 1202, 29898, 5552, 29897, 13, 4706, 731, 5552, 29898, 1311, 29892, 12421, 29892, 659, 29897, 13, 4706, 736, 659, 13, 13, 1678, 822, 4770, 3198, 29918, 1792, 29918, 11027, 29898, 1311, 29892, 1404, 29918, 11027, 1125, 13, 4706, 11368, 29911, 4214, 29903, 29918, 28665, 353, 376, 991, 597, 1636, 29889, 14095, 29899, 5060, 29899, 4468, 29889, 990, 29914, 2754, 29899, 13075, 29914, 11027, 12975, 13, 4706, 363, 12421, 29892, 659, 297, 1404, 29918, 11027, 29889, 7076, 7295, 13, 9651, 565, 338, 8758, 29898, 791, 29892, 9657, 1125, 13, 18884, 1404, 29918, 11027, 29961, 5552, 13192, 8977, 29898, 1311, 29889, 4381, 29879, 29889, 657, 29898, 5552, 29892, 8875, 511, 3579, 791, 29897, 13, 4706, 363, 4444, 297, 5195, 6720, 29963, 3352, 29918, 10490, 29911, 4214, 29903, 29901, 13, 9651, 565, 4444, 297, 1404, 29918, 11027, 29901, 13, 18884, 12020, 24875, 2392, 703, 1576, 14210, 29879, 29915, 4444, 756, 1063, 6206, 29889, 3529, 2737, 304, 14210, 29879, 29915, 363, 3625, 6055, 1213, 1273, 313, 26740, 29892, 11368, 29911, 4214, 29903, 29918, 28665, 876, 13, 4706, 736, 1404, 29918, 11027, 13, 13, 29895, 1217, 29916, 29918, 11027, 353, 889, 2251, 29918, 8787, 9585, 29898, 11889, 29918, 10490, 29911, 4214, 29903, 29892, 22236, 29903, 29892, 306, 3580, 8476, 29918, 20785, 29903, 29897, 13, 13, 13, 1753, 19763, 29918, 2754, 29918, 11027, 10456, 5085, 29892, 3579, 19290, 1125, 13, 1678, 5534, 889, 2251, 29918, 11027, 13, 1678, 4444, 29892, 995, 353, 9049, 5085, 1839, 26740, 7464, 9049, 5085, 1839, 1767, 2033, 13, 1678, 565, 4444, 1275, 525, 1525, 1254, 29918, 29968, 6632, 29990, 2396, 13, 4706, 889, 2251, 29918, 11027, 353, 889, 2251, 29918, 8787, 9585, 29898, 1767, 29892, 22236, 29903, 29892, 306, 3580, 8476, 29918, 20785, 29903, 29897, 13, 13, 13, 26740, 29918, 15033, 29889, 6915, 29898, 28120, 29918, 2754, 29918, 11027, 29897, 13, 13, 13, 1990, 8707, 1254, 2190, 9375, 29901, 13, 1678, 14550, 13, 1678, 5798, 1934, 2609, 367, 3939, 472, 10073, 13, 1678, 14550, 13, 1678, 7495, 29968, 1430, 29918, 10818, 29918, 19433, 353, 29871, 29947, 13, 1678, 22471, 1692, 1254, 29918, 19433, 353, 29871, 29896, 29906, 29947, 13, 13, 1678, 822, 4770, 842, 5552, 12035, 1311, 29892, 334, 5085, 29892, 3579, 19290, 1125, 13, 4706, 12020, 8960, 877, 4907, 13, 9651, 28601, 1819, 1818, 14693, 5348, 367, 3939, 472, 10073, 29892, 408, 896, 526, 13, 9651, 10160, 304, 278, 3829, 310, 2566, 6131, 13, 9651, 6629, 1495, 13, 13, 13, 6007, 1254, 2190, 9375, 353, 8707, 1254, 2190, 9375, 580, 13, 2 ]
misc/utils.py
citharus/AzuryModerator
2
1605456
from typing import Type import motor.motor_asyncio as motor from discord.ext import commands __all__: list[str] = ["add_cogs", "replace_placeholders"] def add_cogs(db: motor.AsyncIOMotorDatabase, bot: commands.Bot, cogs: list[Type[commands.Cog]]) -> None: for cog in cogs: bot.add_cog(cog(bot, db)) def replace_placeholders(string: str, replacements: dict) -> str: for original, replacement in replacements.items(): string = string.replace(original, replacement) return string
[ 1, 515, 19229, 1053, 5167, 13, 13, 5215, 10992, 29889, 14817, 272, 29918, 294, 948, 3934, 408, 10992, 13, 3166, 2313, 536, 29889, 1062, 1053, 8260, 13, 13, 1649, 497, 1649, 29901, 1051, 29961, 710, 29962, 353, 6796, 1202, 29918, 29883, 12099, 613, 376, 6506, 29918, 6689, 8948, 414, 3108, 13, 13, 13, 1753, 788, 29918, 29883, 12099, 29898, 2585, 29901, 10992, 29889, 8123, 5971, 29924, 327, 272, 9112, 29892, 9225, 29901, 8260, 29889, 29933, 327, 29892, 274, 12099, 29901, 1051, 29961, 1542, 29961, 26381, 29889, 29907, 468, 24960, 1599, 6213, 29901, 13, 1678, 363, 274, 468, 297, 274, 12099, 29901, 13, 4706, 9225, 29889, 1202, 29918, 29883, 468, 29898, 29883, 468, 29898, 7451, 29892, 4833, 876, 13, 13, 13, 1753, 5191, 29918, 6689, 8948, 414, 29898, 1807, 29901, 851, 29892, 1634, 4620, 4110, 29901, 9657, 29897, 1599, 851, 29901, 13, 1678, 363, 2441, 29892, 16920, 297, 1634, 4620, 4110, 29889, 7076, 7295, 13, 4706, 1347, 353, 1347, 29889, 6506, 29898, 13492, 29892, 16920, 29897, 13, 13, 1678, 736, 1347, 13, 2 ]
src/scripts/flann.py
PenTesting/mlsvm
0
84112
<gh_stars>0 ''' Created on Feb 3, 2016 Version 1: March 8, 2016 The script reads 2 parameters from command line which are path and filename It calculates the Flann and save the result, in the same path with similar file names Drawback: convert from csr to ndarray and vise versa @author: <NAME> @note: read the data and calculate the flann @input: PetscBinary format @output: PetscBinary format ''' import timeit # import pickle # import numpy as np from sys import argv,exit,path from os import environ import scipy.sparse from pyflann import * from numpy import * from numpy.random import * dirs = environ['PETSC_DIR'] sys.path.insert(0, dirs+'/bin/') #sys.path.insert(0, '/home/esfp/tools/libraries/petsc/bin/') import PetscBinaryIO def run_flann(file_path, file_name, num_NN, dist_type): # read input in PetscBinary format try: start = timeit.default_timer() print('Start reading input: '+file_path + file_name) # mfile = open(outputfile,'r') io = PetscBinaryIO.PetscBinaryIO() #"scipy.sparse" is tested and works fine except, I need to convert it to numpy.ndarray and vise verse for flann and writing to petsc binary in the end sparse_data= io.readBinaryFile(file_path + file_name, mattype='scipy.sparse') # sparse_data= io.readBinaryFile(file_path + file_name, mattype='sparse') # not useful #convert the "scipy.sparse.csr.csr_matrix" to "numpy.ndarray" data = sparse_data[0].toarray() print("data shape before transpose:"+ str(data.shape)) #data_T = transpose(data) #print("data_T shape after transpose:"+ str(data_T.shape)) stop = timeit.default_timer() print("Data is read from PETSc binary format: %.1f seconds" % (stop - start)) except e: print("\n\nException in reading the input file:%s"% (file_path + file_name)) exit(1) # print("data is:") # print(data) # print("data[0] is:") # print(data[0]) try: start = timeit.default_timer() flann = FLANN() if(dist_type == 3): set_distance_type(3,100) #this is for flann Minkowski else: set_distance_type(int(dist_type)) m_result,m_dists = flann.nn(data, data, int(num_NN),algorithm="kdtree",branching=32, iterations=3, trees=1, checks=64); stop = timeit.default_timer() print("Flann calculation takes: %.1f seconds" % (stop - start)) except: print("\n\nException in running Flann, error: %s" % sys.exc_info()[0]) exit(1) #convert the "numpy.ndarray" to "scipy.sparse.csr.csr_matrix" start = timeit.default_timer() m_result_sparse= scipy.sparse.csr.csr_matrix(m_result); m_dists_sparse= scipy.sparse.csr.csr_matrix(m_dists); stop = timeit.default_timer() print("Convert the ndarray to sparse takes: %.1f seconds" % (stop - start)) # save the result try: #no_suffix_name = file_name.split(".")[0] start = timeit.default_timer() #result_outputfile = file_path+''+ no_suffix_name+'_indices.dat' result_outputfile = file_path+''+ file_name.split('.')[0]+'_indices.dat' print('Outputing Data: '+result_outputfile) result_file = open(result_outputfile,'w') PetscBinaryIO.PetscBinaryIO().writeMatSciPy(result_file, m_result_sparse) stop = timeit.default_timer() print("result saved in PETSc format: %.1f seconds" % (stop - start)) except: print("\n\nException in saving the result, error: %s"% sys.exc_info()[0]) exit(1) try: start = timeit.default_timer() #dists_outputfile = file_path+''+ no_suffix_name+'_dists.dat' dists_outputfile = file_path+''+ file_name.split('.')[0] +'_dists.dat' print('Outputing Data: '+dists_outputfile) dists_file = open(dists_outputfile,'w') PetscBinaryIO.PetscBinaryIO().writeMatSciPy(dists_file, m_dists_sparse) stop = timeit.default_timer() print("dists saved in PETSc format: %.1f seconds" % (stop - start)) except: print("\n\nException in saving the dists, error: %s" % sys.exc_info()[0]) exit(1) if __name__ == '__main__': debug = 0 file_path="" file_name="" if debug: # ----------------------- get parameters for debug ------------------------------- file_path = './' file_name = 'kfold_min_train.dat' else: # ----------------------- get parameters for production ------------------------------- if (len(argv)) < 4: print ("please enter path and file_name") print("Example: /data/ twonorm_min_data.dat int_num_NN int_dist_type \nExit due to lack of parameters!") exit(1) else: try: last_slash = argv[1].rfind('/') file_path = argv[1][0:last_slash+1] file_name = argv[1][last_slash+1:] num_NN = argv[2] dist_type = argv[3] # 1: squared euclidean distance except: print("\n\nException on input path and file name, try again!") exit(1) # --------------------- After reading parameters, run the script ------------------------ print("Input filename is: "+file_path+ file_name) run_flann(file_path, file_name, num_NN, dist_type) #serial 3
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 12008, 13, 20399, 373, 26319, 29871, 29941, 29892, 29871, 29906, 29900, 29896, 29953, 13, 6594, 29871, 29896, 29901, 4779, 29871, 29947, 29892, 29871, 29906, 29900, 29896, 29953, 13, 1678, 450, 2471, 13623, 29871, 29906, 4128, 515, 1899, 1196, 607, 526, 2224, 322, 10422, 13, 1678, 739, 3408, 1078, 278, 2379, 812, 322, 4078, 278, 1121, 29892, 297, 278, 1021, 2224, 411, 2788, 934, 2983, 13, 1678, 18492, 1627, 29901, 3588, 515, 5939, 29878, 304, 29871, 299, 2378, 322, 325, 895, 1224, 29874, 29871, 13, 29992, 8921, 29901, 529, 5813, 29958, 13, 29992, 6812, 29901, 1303, 278, 848, 322, 8147, 278, 1652, 812, 13, 29992, 2080, 29901, 5879, 1557, 25196, 3402, 13, 29992, 4905, 29901, 5879, 1557, 25196, 3402, 13, 12008, 13, 13, 5215, 931, 277, 13, 29937, 1053, 5839, 280, 13, 29937, 1053, 12655, 408, 7442, 13, 3166, 10876, 1053, 1852, 29894, 29892, 13322, 29892, 2084, 13, 3166, 2897, 1053, 12471, 13, 5215, 4560, 2272, 29889, 29879, 5510, 13, 3166, 11451, 1579, 812, 1053, 334, 13, 3166, 12655, 1053, 334, 13, 3166, 12655, 29889, 8172, 1053, 334, 13, 13, 13, 13, 3972, 29879, 353, 12471, 1839, 29925, 2544, 7187, 29918, 9464, 2033, 13, 9675, 29889, 2084, 29889, 7851, 29898, 29900, 29892, 4516, 29879, 23097, 29914, 2109, 29914, 1495, 13, 29937, 9675, 29889, 2084, 29889, 7851, 29898, 29900, 29892, 8207, 5184, 29914, 267, 18091, 29914, 8504, 29914, 492, 8464, 29914, 10963, 1557, 29914, 2109, 29914, 1495, 13, 5215, 5879, 1557, 25196, 5971, 13, 13, 13, 13, 1753, 1065, 29918, 1579, 812, 29898, 1445, 29918, 2084, 29892, 934, 29918, 978, 29892, 954, 29918, 10262, 29892, 1320, 29918, 1853, 1125, 13, 13, 1678, 396, 1303, 1881, 297, 5879, 1557, 25196, 3402, 13, 1678, 1018, 29901, 13, 4706, 1369, 353, 931, 277, 29889, 4381, 29918, 20404, 580, 13, 4706, 1596, 877, 4763, 5183, 1881, 29901, 525, 29974, 1445, 29918, 2084, 29871, 718, 934, 29918, 978, 29897, 13, 4706, 396, 286, 1445, 353, 1722, 29898, 4905, 1445, 5501, 29878, 1495, 13, 4706, 12013, 353, 5879, 1557, 25196, 5971, 29889, 29925, 300, 1557, 25196, 5971, 580, 13, 4706, 396, 29908, 26167, 2272, 29889, 29879, 5510, 29908, 338, 9528, 322, 1736, 2691, 5174, 29892, 306, 817, 304, 3588, 372, 304, 12655, 29889, 299, 2378, 322, 325, 895, 23281, 363, 1652, 812, 322, 5007, 304, 5697, 1557, 7581, 297, 278, 1095, 13, 4706, 29234, 29918, 1272, 29922, 12013, 29889, 949, 25196, 2283, 29898, 1445, 29918, 2084, 718, 934, 29918, 978, 29892, 286, 1131, 668, 2433, 26167, 2272, 29889, 29879, 5510, 1495, 13, 4706, 396, 29234, 29918, 1272, 29922, 12013, 29889, 949, 25196, 2283, 29898, 1445, 29918, 2084, 718, 934, 29918, 978, 29892, 286, 1131, 668, 2433, 29879, 5510, 1495, 259, 396, 451, 5407, 13, 4706, 396, 13441, 278, 376, 26167, 2272, 29889, 29879, 5510, 29889, 2395, 29878, 29889, 2395, 29878, 29918, 5344, 29908, 304, 376, 23749, 29889, 299, 2378, 29908, 13, 4706, 848, 353, 29234, 29918, 1272, 29961, 29900, 1822, 517, 2378, 580, 13, 4706, 1596, 703, 1272, 8267, 1434, 1301, 4220, 6160, 29974, 851, 29898, 1272, 29889, 12181, 876, 13, 4706, 396, 1272, 29918, 29911, 353, 1301, 4220, 29898, 1272, 29897, 13, 4706, 396, 2158, 703, 1272, 29918, 29911, 8267, 1156, 1301, 4220, 6160, 29974, 851, 29898, 1272, 29918, 29911, 29889, 12181, 876, 13, 4706, 5040, 353, 931, 277, 29889, 4381, 29918, 20404, 580, 13, 4706, 1596, 703, 1469, 338, 1303, 515, 349, 2544, 4421, 7581, 3402, 29901, 18695, 29896, 29888, 6923, 29908, 1273, 313, 9847, 448, 1369, 876, 13, 1678, 5174, 321, 29901, 13, 4706, 1596, 14182, 29876, 29905, 29876, 2451, 297, 5183, 278, 1881, 934, 16664, 29879, 29908, 29995, 313, 1445, 29918, 2084, 718, 934, 29918, 978, 876, 13, 4706, 6876, 29898, 29896, 29897, 13, 1678, 396, 1596, 703, 1272, 338, 29901, 1159, 13, 1678, 396, 1596, 29898, 1272, 29897, 13, 1678, 396, 1596, 703, 1272, 29961, 29900, 29962, 338, 29901, 1159, 13, 1678, 396, 1596, 29898, 1272, 29961, 29900, 2314, 13, 13, 13, 1678, 1018, 29901, 13, 4706, 1369, 353, 931, 277, 29889, 4381, 29918, 20404, 580, 13, 4706, 1652, 812, 353, 383, 29931, 2190, 29940, 580, 13, 13, 4706, 565, 29898, 5721, 29918, 1853, 1275, 29871, 29941, 1125, 13, 9651, 731, 29918, 19244, 29918, 1853, 29898, 29941, 29892, 29896, 29900, 29900, 29897, 12, 29937, 1366, 338, 363, 1652, 812, 341, 682, 11716, 13, 4706, 1683, 29901, 13, 9651, 731, 29918, 19244, 29918, 1853, 29898, 524, 29898, 5721, 29918, 1853, 876, 13, 13, 4706, 286, 29918, 2914, 29892, 29885, 29918, 29881, 2879, 353, 1652, 812, 29889, 15755, 29898, 1272, 29892, 848, 29892, 938, 29898, 1949, 29918, 10262, 511, 20567, 543, 29895, 6008, 929, 613, 17519, 292, 29922, 29941, 29906, 29892, 24372, 29922, 29941, 29892, 10697, 29922, 29896, 29892, 12747, 29922, 29953, 29946, 416, 13, 308, 13, 4706, 5040, 353, 931, 277, 29889, 4381, 29918, 20404, 580, 13, 4706, 1596, 703, 8754, 812, 13944, 4893, 29901, 18695, 29896, 29888, 6923, 29908, 1273, 313, 9847, 448, 1369, 876, 13, 1678, 5174, 29901, 13, 4706, 1596, 14182, 29876, 29905, 29876, 2451, 297, 2734, 2379, 812, 29892, 1059, 29901, 1273, 29879, 29908, 1273, 10876, 29889, 735, 29883, 29918, 3888, 580, 29961, 29900, 2314, 13, 4706, 6876, 29898, 29896, 29897, 13, 13, 1678, 396, 13441, 278, 376, 23749, 29889, 299, 2378, 29908, 304, 376, 26167, 2272, 29889, 29879, 5510, 29889, 2395, 29878, 29889, 2395, 29878, 29918, 5344, 29908, 13, 1678, 1369, 353, 931, 277, 29889, 4381, 29918, 20404, 580, 13, 1678, 286, 29918, 2914, 29918, 29879, 5510, 29922, 29871, 4560, 2272, 29889, 29879, 5510, 29889, 2395, 29878, 29889, 2395, 29878, 29918, 5344, 29898, 29885, 29918, 2914, 416, 13, 1678, 286, 29918, 29881, 2879, 29918, 29879, 5510, 29922, 29871, 4560, 2272, 29889, 29879, 5510, 29889, 2395, 29878, 29889, 2395, 29878, 29918, 5344, 29898, 29885, 29918, 29881, 2879, 416, 13, 1678, 5040, 353, 931, 277, 29889, 4381, 29918, 20404, 580, 13, 1678, 1596, 703, 18455, 278, 29871, 299, 2378, 304, 29234, 4893, 29901, 18695, 29896, 29888, 6923, 29908, 1273, 313, 9847, 448, 1369, 876, 13, 13, 13, 1678, 396, 4078, 278, 1121, 13, 1678, 1018, 29901, 13, 4706, 396, 1217, 29918, 2146, 600, 861, 29918, 978, 353, 934, 29918, 978, 29889, 5451, 17350, 1159, 29961, 29900, 29962, 13, 4706, 1369, 353, 931, 277, 29889, 4381, 29918, 20404, 580, 13, 4706, 396, 2914, 29918, 4905, 1445, 353, 934, 29918, 2084, 29974, 4907, 29974, 694, 29918, 2146, 600, 861, 29918, 978, 29974, 15972, 513, 1575, 29889, 4130, 29915, 13, 4706, 1121, 29918, 4905, 1445, 353, 934, 29918, 2084, 29974, 4907, 29974, 934, 29918, 978, 29889, 5451, 12839, 29861, 29900, 10062, 15972, 513, 1575, 29889, 4130, 29915, 13, 4706, 1596, 877, 6466, 292, 3630, 29901, 525, 29974, 2914, 29918, 4905, 1445, 29897, 13, 4706, 1121, 29918, 1445, 353, 1722, 29898, 2914, 29918, 4905, 1445, 5501, 29893, 1495, 13, 4706, 5879, 1557, 25196, 5971, 29889, 29925, 300, 1557, 25196, 5971, 2141, 3539, 9782, 29903, 455, 19737, 29898, 2914, 29918, 1445, 29892, 286, 29918, 2914, 29918, 29879, 5510, 29897, 13, 4706, 5040, 353, 931, 277, 29889, 4381, 29918, 20404, 580, 13, 4706, 1596, 703, 2914, 7160, 297, 349, 2544, 4421, 3402, 29901, 18695, 29896, 29888, 6923, 29908, 1273, 313, 9847, 448, 1369, 876, 13, 1678, 5174, 29901, 13, 4706, 1596, 14182, 29876, 29905, 29876, 2451, 297, 14238, 278, 1121, 29892, 1059, 29901, 1273, 29879, 29908, 29995, 10876, 29889, 735, 29883, 29918, 3888, 580, 29961, 29900, 2314, 13, 4706, 6876, 29898, 29896, 29897, 13, 13, 1678, 1018, 29901, 13, 4706, 1369, 353, 931, 277, 29889, 4381, 29918, 20404, 580, 13, 4706, 396, 29881, 2879, 29918, 4905, 1445, 353, 934, 29918, 2084, 29974, 4907, 29974, 694, 29918, 2146, 600, 861, 29918, 978, 29974, 15972, 29881, 2879, 29889, 4130, 29915, 13, 4706, 1320, 29879, 29918, 4905, 1445, 353, 934, 29918, 2084, 29974, 4907, 29974, 934, 29918, 978, 29889, 5451, 12839, 29861, 29900, 29962, 718, 15972, 29881, 2879, 29889, 4130, 29915, 13, 4706, 1596, 877, 6466, 292, 3630, 29901, 525, 29974, 29881, 2879, 29918, 4905, 1445, 29897, 13, 4706, 1320, 29879, 29918, 1445, 353, 1722, 29898, 29881, 2879, 29918, 4905, 1445, 5501, 29893, 1495, 13, 4706, 5879, 1557, 25196, 5971, 29889, 29925, 300, 1557, 25196, 5971, 2141, 3539, 9782, 29903, 455, 19737, 29898, 29881, 2879, 29918, 1445, 29892, 286, 29918, 29881, 2879, 29918, 29879, 5510, 29897, 13, 4706, 5040, 353, 931, 277, 29889, 4381, 29918, 20404, 580, 13, 4706, 1596, 703, 29881, 2879, 7160, 297, 349, 2544, 4421, 3402, 29901, 18695, 29896, 29888, 6923, 29908, 1273, 313, 9847, 448, 1369, 876, 13, 1678, 5174, 29901, 13, 4706, 1596, 14182, 29876, 29905, 29876, 2451, 297, 14238, 278, 1320, 29879, 29892, 1059, 29901, 1273, 29879, 29908, 1273, 10876, 29889, 735, 29883, 29918, 3888, 580, 29961, 29900, 2314, 13, 4706, 6876, 29898, 29896, 29897, 13, 13, 361, 4770, 978, 1649, 1275, 525, 1649, 3396, 1649, 2396, 13, 1678, 4744, 353, 29871, 29900, 13, 1678, 934, 29918, 2084, 13776, 13, 1678, 934, 29918, 978, 13776, 13, 13, 1678, 565, 4744, 29901, 539, 396, 448, 2683, 22158, 679, 4128, 363, 4744, 448, 2683, 9072, 489, 13, 4706, 934, 29918, 2084, 353, 19283, 29915, 13, 4706, 934, 29918, 978, 353, 525, 29895, 8771, 29918, 1195, 29918, 14968, 29889, 4130, 29915, 13, 1678, 1683, 29901, 965, 396, 448, 2683, 22158, 679, 4128, 363, 5802, 448, 2683, 9072, 489, 13, 4706, 565, 313, 2435, 29898, 19218, 876, 529, 29871, 29946, 29901, 13, 9651, 1596, 4852, 552, 559, 3896, 2224, 322, 934, 29918, 978, 1159, 13, 9651, 1596, 703, 14023, 29901, 847, 1272, 29914, 3252, 265, 555, 29918, 1195, 29918, 1272, 29889, 4130, 938, 29918, 1949, 29918, 10262, 938, 29918, 5721, 29918, 1853, 29871, 320, 29876, 24365, 2861, 304, 10225, 310, 4128, 29991, 1159, 13, 9651, 6876, 29898, 29896, 29897, 13, 4706, 1683, 29901, 13, 9651, 1018, 29901, 13, 18884, 1833, 29918, 17057, 353, 1852, 29894, 29961, 29896, 1822, 29878, 2886, 11219, 1495, 13, 18884, 934, 29918, 2084, 353, 1852, 29894, 29961, 29896, 3816, 29900, 29901, 4230, 29918, 17057, 29974, 29896, 29962, 13, 18884, 934, 29918, 978, 353, 1852, 29894, 29961, 29896, 3816, 4230, 29918, 17057, 29974, 29896, 17531, 13, 18884, 954, 29918, 10262, 353, 1852, 29894, 29961, 29906, 29962, 13, 18884, 1320, 29918, 1853, 353, 1852, 29894, 29961, 29941, 29962, 12, 12, 29937, 29871, 29896, 29901, 10674, 1965, 321, 27511, 5418, 13, 9651, 5174, 29901, 13, 18884, 1596, 14182, 29876, 29905, 29876, 2451, 373, 1881, 2224, 322, 934, 1024, 29892, 1018, 1449, 29991, 1159, 13, 18884, 6876, 29898, 29896, 29897, 13, 13, 1678, 396, 448, 2683, 807, 2860, 5183, 4128, 29892, 1065, 278, 2471, 29871, 448, 2683, 26589, 13, 1678, 1596, 703, 4290, 10422, 338, 29901, 15691, 1445, 29918, 2084, 29974, 934, 29918, 978, 29897, 13, 1678, 1065, 29918, 1579, 812, 29898, 1445, 29918, 2084, 29892, 934, 29918, 978, 29892, 954, 29918, 10262, 29892, 1320, 29918, 1853, 29897, 13, 13, 13, 13, 29937, 15550, 29871, 29941, 13, 2 ]
infapy/v3/agentService.py
infapy/infapy
0
8345
# Copyright (c) 2021-Present (<NAME>) # 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 requests as re import infapy from infapy.exceptions import InvalidDetailsProvided class AgentService(): def __init__(self,v3,v3BaseURL,v3SessionID): self._v3 = v3 self._v3BaseURL = v3BaseURL self._v3SessionID = v3SessionID def updateAgentService(self,serviceName, serviceAction, agentId): url=self._v3BaseURL + "/public/core/v3/agent/service" headers = {'Content-Type': "application/json", 'Accept': "application/json","INFA-SESSION-ID":self._v3SessionID} body = { 'serviceName':serviceName, 'serviceAction':serviceAction, 'agentId':agentId} infapy.log.info("agentService API URL - " + url) infapy.log.info("API Headers: " + str(headers)) infapy.log.info("Body: " + str(body)) try: response = re.post(url=url, json=body, headers=headers) data = response.json() infapy.log.debug(str(data)) try: if ("error" in data): infapy.log.error("Please validate the details passed") infapy.log.error(str(data)) raise InvalidDetailsProvided except Exception as e: infapy.log.exception(e) raise except Exception as e: infapy.log.exception(e) raise infapy.log.info(data["message"]) return data
[ 1, 396, 14187, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29906, 29896, 29899, 13504, 296, 313, 29966, 5813, 12948, 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, 13, 29937, 268, 1732, 597, 1636, 29889, 4288, 29889, 990, 29914, 506, 11259, 29914, 27888, 1430, 1660, 29899, 29906, 29889, 29900, 13, 13, 29937, 25870, 3734, 491, 22903, 4307, 470, 15502, 304, 297, 5007, 29892, 7047, 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, 13, 5215, 7274, 408, 337, 13, 5215, 3041, 27580, 13, 3166, 3041, 27580, 29889, 11739, 29879, 1053, 21403, 10602, 1184, 29894, 2618, 13, 13, 1990, 28330, 3170, 7295, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 29894, 29941, 29892, 29894, 29941, 5160, 4219, 29892, 29894, 29941, 7317, 1367, 1125, 13, 4706, 1583, 3032, 29894, 29941, 353, 325, 29941, 13, 4706, 1583, 3032, 29894, 29941, 5160, 4219, 353, 325, 29941, 5160, 4219, 13, 4706, 1583, 3032, 29894, 29941, 7317, 1367, 353, 325, 29941, 7317, 1367, 13, 268, 13, 1678, 822, 2767, 19661, 3170, 29898, 1311, 29892, 5509, 1170, 29892, 2669, 4276, 29892, 10823, 1204, 1125, 13, 4706, 3142, 29922, 1311, 3032, 29894, 29941, 5160, 4219, 718, 5591, 3597, 29914, 3221, 29914, 29894, 29941, 29914, 14748, 29914, 5509, 29908, 13, 4706, 9066, 353, 11117, 3916, 29899, 1542, 2396, 376, 6214, 29914, 3126, 613, 525, 23965, 2396, 376, 6214, 29914, 3126, 3284, 1177, 4519, 29899, 17493, 29899, 1367, 1115, 1311, 3032, 29894, 29941, 7317, 1367, 29913, 13, 4706, 3573, 353, 426, 13, 9651, 525, 5509, 1170, 2396, 5509, 1170, 29892, 13, 9651, 525, 5509, 4276, 2396, 5509, 4276, 29892, 13, 9651, 525, 14748, 1204, 2396, 14748, 1204, 29913, 13, 13, 4706, 3041, 27580, 29889, 1188, 29889, 3888, 703, 14748, 3170, 3450, 3988, 448, 376, 718, 3142, 29897, 13, 4706, 3041, 27580, 29889, 1188, 29889, 3888, 703, 8787, 12252, 414, 29901, 376, 718, 851, 29898, 13662, 876, 13, 4706, 3041, 27580, 29889, 1188, 29889, 3888, 703, 8434, 29901, 376, 718, 851, 29898, 2587, 876, 13, 13, 4706, 1018, 29901, 13, 9651, 2933, 353, 337, 29889, 2490, 29898, 2271, 29922, 2271, 29892, 4390, 29922, 2587, 29892, 9066, 29922, 13662, 29897, 13, 9651, 848, 353, 2933, 29889, 3126, 580, 13, 9651, 3041, 27580, 29889, 1188, 29889, 8382, 29898, 710, 29898, 1272, 876, 13, 9651, 1018, 29901, 13, 18884, 565, 4852, 2704, 29908, 297, 848, 1125, 13, 462, 1678, 3041, 27580, 29889, 1188, 29889, 2704, 703, 12148, 12725, 278, 4902, 4502, 1159, 13, 462, 1678, 3041, 27580, 29889, 1188, 29889, 2704, 29898, 710, 29898, 1272, 876, 13, 462, 1678, 12020, 21403, 10602, 1184, 29894, 2618, 13, 9651, 5174, 8960, 408, 321, 29901, 13, 18884, 3041, 27580, 29889, 1188, 29889, 11739, 29898, 29872, 29897, 13, 18884, 12020, 13, 4706, 5174, 8960, 408, 321, 29901, 13, 9651, 3041, 27580, 29889, 1188, 29889, 11739, 29898, 29872, 29897, 13, 9651, 12020, 13, 4706, 3041, 27580, 29889, 1188, 29889, 3888, 29898, 1272, 3366, 4906, 20068, 268, 13, 4706, 736, 848, 2 ]
src/components/examples/python-sample/pysample.py
ghsecuritylab/comanche
19
100786
<reponame>ghsecuritylab/comanche<filename>src/components/examples/python-sample/pysample.py # python class import sys class Sample: def __init__(self): print("Python Sample component instantiated.") def say_hello(self): print("Say hello from Python my friend! :" + str(sys.version))
[ 1, 529, 276, 1112, 420, 29958, 12443, 8926, 8205, 29914, 510, 20372, 29966, 9507, 29958, 4351, 29914, 14036, 29914, 19057, 29914, 4691, 29899, 11249, 29914, 29886, 952, 981, 29889, 2272, 13, 29937, 3017, 770, 13, 5215, 10876, 13, 13, 1990, 21029, 29901, 13, 1678, 822, 4770, 2344, 12035, 1311, 1125, 13, 4706, 1596, 703, 11980, 21029, 4163, 13213, 630, 23157, 13, 13, 1678, 822, 1827, 29918, 12199, 29898, 1311, 1125, 13, 4706, 1596, 703, 29903, 388, 22172, 515, 5132, 590, 5121, 29991, 584, 29908, 718, 851, 29898, 9675, 29889, 3259, 876, 13, 13, 13, 2 ]
tests/parallel/conftest.py
dtpryce/MLServer
0
164959
<reponame>dtpryce/MLServer import asyncio import pytest from multiprocessing import Queue from mlserver.settings import ModelSettings from mlserver.types import InferenceRequest from mlserver.utils import generate_uuid from mlserver.model import MLModel from mlserver.parallel.pool import InferencePool from mlserver.parallel.worker import Worker from mlserver.parallel.utils import cancel_task from mlserver.parallel.messages import ( ModelUpdateMessage, ModelUpdateType, InferenceRequestMessage, ) @pytest.fixture async def inference_pool( inference_pool: InferencePool, sum_model: MLModel ) -> InferencePool: await inference_pool.load_model(sum_model) yield inference_pool await inference_pool.unload_model(sum_model) @pytest.fixture async def requests() -> Queue: q = Queue() yield q q.close() @pytest.fixture async def responses() -> Queue: q = Queue() yield q q.close() @pytest.fixture async def worker( event_loop, requests: Queue, responses: Queue, load_message: ModelUpdateMessage, ) -> Worker: worker = Worker(requests, responses) # Simulate the worker running on a different process, but keep it to a # thread to simplify debugging. # Note that we call `worker.coro_run` instead of `worker.run` to avoid also # triggering the other set up methods of `worker.run`. worker_task = event_loop.run_in_executor( None, lambda: asyncio.run(worker.coro_run()) ) await worker.send_update(load_message) yield worker await worker.stop() await cancel_task(worker_task) @pytest.fixture def load_message(sum_model_settings: ModelSettings) -> ModelUpdateMessage: return ModelUpdateMessage( update_type=ModelUpdateType.Load, model_settings=sum_model_settings ) @pytest.fixture def unload_message(sum_model_settings: ModelSettings) -> ModelUpdateMessage: return ModelUpdateMessage( update_type=ModelUpdateType.Unload, model_settings=sum_model_settings ) @pytest.fixture def inference_request_message( sum_model_settings: ModelSettings, inference_request: InferenceRequest ) -> InferenceRequestMessage: return InferenceRequestMessage( id=generate_uuid(), model_name=sum_model_settings.name, model_version=sum_model_settings.parameters.version, inference_request=inference_request, )
[ 1, 529, 276, 1112, 420, 29958, 6008, 558, 29891, 346, 29914, 1988, 6004, 13, 5215, 408, 948, 3934, 13, 5215, 11451, 1688, 13, 13, 3166, 6674, 307, 985, 292, 1053, 5462, 434, 13, 13, 3166, 286, 29880, 2974, 29889, 11027, 1053, 8125, 9585, 13, 3166, 286, 29880, 2974, 29889, 8768, 1053, 512, 1659, 3089, 13, 3166, 286, 29880, 2974, 29889, 13239, 1053, 5706, 29918, 25118, 13, 3166, 286, 29880, 2974, 29889, 4299, 1053, 23158, 3195, 13, 3166, 286, 29880, 2974, 29889, 23482, 29889, 10109, 1053, 512, 1659, 11426, 13, 3166, 286, 29880, 2974, 29889, 23482, 29889, 24602, 1053, 5244, 261, 13, 3166, 286, 29880, 2974, 29889, 23482, 29889, 13239, 1053, 12611, 29918, 7662, 13, 3166, 286, 29880, 2974, 29889, 23482, 29889, 19158, 1053, 313, 13, 1678, 8125, 6422, 3728, 29892, 13, 1678, 8125, 6422, 1542, 29892, 13, 1678, 512, 1659, 3089, 3728, 29892, 13, 29897, 13, 13, 13, 29992, 2272, 1688, 29889, 7241, 15546, 13, 12674, 822, 27262, 29918, 10109, 29898, 13, 1678, 27262, 29918, 10109, 29901, 512, 1659, 11426, 29892, 2533, 29918, 4299, 29901, 23158, 3195, 13, 29897, 1599, 512, 1659, 11426, 29901, 13, 1678, 7272, 27262, 29918, 10109, 29889, 1359, 29918, 4299, 29898, 2083, 29918, 4299, 29897, 13, 13, 1678, 7709, 27262, 29918, 10109, 13, 13, 1678, 7272, 27262, 29918, 10109, 29889, 348, 1359, 29918, 4299, 29898, 2083, 29918, 4299, 29897, 13, 13, 13, 29992, 2272, 1688, 29889, 7241, 15546, 13, 12674, 822, 7274, 580, 1599, 5462, 434, 29901, 13, 1678, 3855, 353, 5462, 434, 580, 13, 1678, 7709, 3855, 13, 13, 1678, 3855, 29889, 5358, 580, 13, 13, 13, 29992, 2272, 1688, 29889, 7241, 15546, 13, 12674, 822, 20890, 580, 1599, 5462, 434, 29901, 13, 1678, 3855, 353, 5462, 434, 580, 13, 1678, 7709, 3855, 13, 13, 1678, 3855, 29889, 5358, 580, 13, 13, 13, 29992, 2272, 1688, 29889, 7241, 15546, 13, 12674, 822, 15645, 29898, 13, 1678, 1741, 29918, 7888, 29892, 13, 1678, 7274, 29901, 5462, 434, 29892, 13, 1678, 20890, 29901, 5462, 434, 29892, 13, 1678, 2254, 29918, 4906, 29901, 8125, 6422, 3728, 29892, 13, 29897, 1599, 5244, 261, 29901, 13, 1678, 15645, 353, 5244, 261, 29898, 24830, 29892, 20890, 29897, 13, 13, 1678, 396, 3439, 5987, 278, 15645, 2734, 373, 263, 1422, 1889, 29892, 541, 3013, 372, 304, 263, 13, 1678, 396, 3244, 304, 21092, 13490, 29889, 13, 1678, 396, 3940, 393, 591, 1246, 421, 24602, 29889, 2616, 29877, 29918, 3389, 29952, 2012, 310, 421, 24602, 29889, 3389, 29952, 304, 4772, 884, 13, 1678, 396, 7135, 292, 278, 916, 731, 701, 3519, 310, 421, 24602, 29889, 3389, 1412, 13, 1678, 15645, 29918, 7662, 353, 1741, 29918, 7888, 29889, 3389, 29918, 262, 29918, 4258, 3406, 29898, 13, 4706, 6213, 29892, 14013, 29901, 408, 948, 3934, 29889, 3389, 29898, 24602, 29889, 2616, 29877, 29918, 3389, 3101, 13, 1678, 1723, 13, 13, 1678, 7272, 15645, 29889, 6717, 29918, 5504, 29898, 1359, 29918, 4906, 29897, 13, 13, 1678, 7709, 15645, 13, 13, 1678, 7272, 15645, 29889, 9847, 580, 13, 1678, 7272, 12611, 29918, 7662, 29898, 24602, 29918, 7662, 29897, 13, 13, 13, 29992, 2272, 1688, 29889, 7241, 15546, 13, 1753, 2254, 29918, 4906, 29898, 2083, 29918, 4299, 29918, 11027, 29901, 8125, 9585, 29897, 1599, 8125, 6422, 3728, 29901, 13, 1678, 736, 8125, 6422, 3728, 29898, 13, 4706, 2767, 29918, 1853, 29922, 3195, 6422, 1542, 29889, 5896, 29892, 1904, 29918, 11027, 29922, 2083, 29918, 4299, 29918, 11027, 13, 1678, 1723, 13, 13, 13, 29992, 2272, 1688, 29889, 7241, 15546, 13, 1753, 443, 1359, 29918, 4906, 29898, 2083, 29918, 4299, 29918, 11027, 29901, 8125, 9585, 29897, 1599, 8125, 6422, 3728, 29901, 13, 1678, 736, 8125, 6422, 3728, 29898, 13, 4706, 2767, 29918, 1853, 29922, 3195, 6422, 1542, 29889, 2525, 1359, 29892, 1904, 29918, 11027, 29922, 2083, 29918, 4299, 29918, 11027, 13, 1678, 1723, 13, 13, 13, 29992, 2272, 1688, 29889, 7241, 15546, 13, 1753, 27262, 29918, 3827, 29918, 4906, 29898, 13, 1678, 2533, 29918, 4299, 29918, 11027, 29901, 8125, 9585, 29892, 27262, 29918, 3827, 29901, 512, 1659, 3089, 13, 29897, 1599, 512, 1659, 3089, 3728, 29901, 13, 1678, 736, 512, 1659, 3089, 3728, 29898, 13, 4706, 1178, 29922, 17158, 29918, 25118, 3285, 13, 4706, 1904, 29918, 978, 29922, 2083, 29918, 4299, 29918, 11027, 29889, 978, 29892, 13, 4706, 1904, 29918, 3259, 29922, 2083, 29918, 4299, 29918, 11027, 29889, 16744, 29889, 3259, 29892, 13, 4706, 27262, 29918, 3827, 29922, 262, 1659, 29918, 3827, 29892, 13, 1678, 1723, 13, 2 ]
src/seak/cct.py
HealthML/seak
2
72824
""" Functions related to STAAR """ import numpy as np from scipy.stats import cauchy c = cauchy() def cct(pvals, weights=None): """ Python port of the CCT function as defined in the STAAR R-package (https://github.com/xihaoli/STAAR/blob/2f67fafec591a45e81a54eca24564b09ce90e252/R/CCT.R) An analytical p-value combination method using the Cauchy distribution. takes in a numeric vector of p-values, a numeric vector of non-negative weights, and return the aggregated p-value using Cauchy method. :param np.ndarray pval: Numpy array containing the p-values :param np.ndarray weights: Numpy array containing the weights :return: The aggregated p-value :rtype: float <NAME>., & <NAME>. (2020). Cauchy combination test: a powerful test with analytic p-value calculation under arbitrary dependency structures. <NAME>., et al. (2019). Acat: A fast and powerful p value combination method for rare-variant analysis in sequencing studies. """ # check for NA assert not np.isnan(pvals).any(), 'Error: Cannot have nan in the p-values!' # check range assert not (((pvals < 0).sum() + (pvals > 1).sum()) > 0), "Error: All p-values must be between 0 and 1" # check for p-values that are either exactly 0 or 1 is_zero = (pvals == 0.).any() is_one = (pvals == 1.).any() assert not (is_zero & is_one), 'Error: Cannot have both 0 and 1 p-values' if is_zero: return 0 if is_one: print('Warning: there are p-values that are exactly 1!') return 1. # check the validity of weights if weights is None: weights = np.ones_like(pvals) / len(pvals) else: assert len(weights) == len(pvals), 'Error: length of weights should be the same as that of the p-values!' assert not ((weights < 0).any()), 'Error: all weights must be positive!' weights /= weights.sum() # check if there are very small non-zero p-values is_small = pvals < 1e-16 if not is_small.any(): cct_stat = (weights * np.tan((0.5 - pvals) * np.pi)).sum() else: cct_stat = (weights[is_small] / pvals[is_small] / np.pi).sum() cct_stat += (weights[~is_small] * np.tan((0.5 - pvals[~is_small]) * np.pi)).sum() # check if the test statistic is very large if (cct_stat > 1e15): pval = (1. / cct_stat) / np.pi else: pval = c.sf(cct_stat) return pval
[ 1, 29871, 13, 15945, 29908, 13, 13, 6678, 29879, 4475, 304, 317, 6040, 1718, 13, 13, 15945, 29908, 13, 13, 5215, 12655, 408, 7442, 13, 3166, 4560, 2272, 29889, 16202, 1053, 274, 13989, 29891, 13, 13, 29883, 353, 274, 13989, 29891, 580, 13, 13, 13, 1753, 274, 312, 29898, 29886, 791, 29879, 29892, 18177, 29922, 8516, 1125, 13, 1678, 9995, 13, 1678, 5132, 2011, 310, 278, 315, 1783, 740, 408, 3342, 297, 278, 317, 6040, 1718, 390, 29899, 5113, 313, 991, 597, 3292, 29889, 510, 29914, 5389, 2350, 5079, 29914, 1254, 29909, 1718, 29914, 10054, 29914, 29906, 29888, 29953, 29955, 29888, 2142, 687, 29945, 29929, 29896, 29874, 29946, 29945, 29872, 29947, 29896, 29874, 29945, 29946, 13273, 29906, 29946, 29945, 29953, 29946, 29890, 29900, 29929, 346, 29929, 29900, 29872, 29906, 29945, 29906, 29914, 29934, 29914, 29907, 1783, 29889, 29934, 29897, 13, 13, 1678, 530, 16114, 936, 282, 29899, 1767, 10296, 1158, 773, 278, 315, 13989, 29891, 4978, 29889, 13, 13, 1678, 4893, 297, 263, 16985, 4608, 310, 282, 29899, 5975, 29892, 263, 16985, 4608, 310, 1661, 29899, 22198, 18177, 29892, 322, 736, 278, 11404, 630, 282, 29899, 1767, 773, 315, 13989, 29891, 1158, 29889, 13, 13, 1678, 584, 3207, 7442, 29889, 299, 2378, 282, 791, 29901, 11848, 2272, 1409, 6943, 278, 282, 29899, 5975, 13, 1678, 584, 3207, 7442, 29889, 299, 2378, 18177, 29901, 11848, 2272, 1409, 6943, 278, 18177, 13, 13, 1678, 584, 2457, 29901, 450, 11404, 630, 282, 29899, 1767, 13, 1678, 584, 29878, 1853, 29901, 5785, 13, 13, 1678, 529, 5813, 29958, 1696, 669, 529, 5813, 15513, 313, 29906, 29900, 29906, 29900, 467, 315, 13989, 29891, 10296, 1243, 29901, 263, 13988, 1243, 411, 16114, 293, 282, 29899, 1767, 13944, 1090, 11472, 10609, 12286, 29889, 13, 1678, 529, 5813, 29958, 1696, 634, 394, 29889, 313, 29906, 29900, 29896, 29929, 467, 319, 4117, 29901, 319, 5172, 322, 13988, 282, 995, 10296, 1158, 363, 10812, 29899, 19365, 7418, 297, 8617, 16750, 11898, 29889, 13, 1678, 9995, 13, 13, 1678, 396, 1423, 363, 8598, 13, 1678, 4974, 451, 7442, 29889, 275, 13707, 29898, 29886, 791, 29879, 467, 1384, 3285, 525, 2392, 29901, 15808, 505, 23432, 297, 278, 282, 29899, 5975, 20714, 13, 1678, 396, 1423, 3464, 13, 1678, 4974, 451, 313, 3552, 29886, 791, 29879, 529, 29871, 29900, 467, 2083, 580, 718, 313, 29886, 791, 29879, 1405, 29871, 29896, 467, 2083, 3101, 1405, 29871, 29900, 511, 376, 2392, 29901, 2178, 282, 29899, 5975, 1818, 367, 1546, 29871, 29900, 322, 29871, 29896, 29908, 13, 13, 1678, 396, 1423, 363, 282, 29899, 5975, 393, 526, 2845, 3721, 29871, 29900, 470, 29871, 29896, 13, 1678, 338, 29918, 9171, 353, 313, 29886, 791, 29879, 1275, 29871, 29900, 6250, 1384, 580, 13, 1678, 338, 29918, 650, 353, 313, 29886, 791, 29879, 1275, 29871, 29896, 6250, 1384, 580, 13, 13, 1678, 4974, 451, 313, 275, 29918, 9171, 669, 338, 29918, 650, 511, 525, 2392, 29901, 15808, 505, 1716, 29871, 29900, 322, 29871, 29896, 282, 29899, 5975, 29915, 13, 13, 1678, 565, 338, 29918, 9171, 29901, 13, 4706, 736, 29871, 29900, 13, 1678, 565, 338, 29918, 650, 29901, 13, 4706, 1596, 877, 22709, 29901, 727, 526, 282, 29899, 5975, 393, 526, 3721, 29871, 29896, 29991, 1495, 13, 4706, 736, 29871, 29896, 29889, 13, 13, 1678, 396, 1423, 278, 2854, 537, 310, 18177, 13, 1678, 565, 18177, 338, 6213, 29901, 13, 4706, 18177, 353, 7442, 29889, 2873, 29918, 4561, 29898, 29886, 791, 29879, 29897, 847, 7431, 29898, 29886, 791, 29879, 29897, 13, 1678, 1683, 29901, 13, 4706, 4974, 7431, 29898, 705, 5861, 29897, 1275, 7431, 29898, 29886, 791, 29879, 511, 525, 2392, 29901, 3309, 310, 18177, 881, 367, 278, 1021, 408, 393, 310, 278, 282, 29899, 5975, 20714, 13, 4706, 4974, 451, 5135, 705, 5861, 529, 29871, 29900, 467, 1384, 25739, 525, 2392, 29901, 599, 18177, 1818, 367, 6374, 20714, 13, 4706, 18177, 847, 29922, 18177, 29889, 2083, 580, 13, 13, 1678, 396, 1423, 565, 727, 526, 1407, 2319, 1661, 29899, 9171, 282, 29899, 5975, 13, 1678, 338, 29918, 9278, 353, 282, 791, 29879, 529, 29871, 29896, 29872, 29899, 29896, 29953, 13, 1678, 565, 451, 338, 29918, 9278, 29889, 1384, 7295, 13, 4706, 274, 312, 29918, 6112, 353, 313, 705, 5861, 334, 7442, 29889, 13161, 3552, 29900, 29889, 29945, 448, 282, 791, 29879, 29897, 334, 7442, 29889, 1631, 8106, 2083, 580, 13, 1678, 1683, 29901, 13, 4706, 274, 312, 29918, 6112, 353, 313, 705, 5861, 29961, 275, 29918, 9278, 29962, 847, 282, 791, 29879, 29961, 275, 29918, 9278, 29962, 847, 7442, 29889, 1631, 467, 2083, 580, 13, 4706, 274, 312, 29918, 6112, 4619, 313, 705, 5861, 29961, 30022, 275, 29918, 9278, 29962, 334, 7442, 29889, 13161, 3552, 29900, 29889, 29945, 448, 282, 791, 29879, 29961, 30022, 275, 29918, 9278, 2314, 334, 7442, 29889, 1631, 8106, 2083, 580, 13, 13, 1678, 396, 1423, 565, 278, 1243, 1002, 4695, 338, 1407, 2919, 13, 1678, 565, 313, 29883, 312, 29918, 6112, 1405, 29871, 29896, 29872, 29896, 29945, 1125, 13, 4706, 282, 791, 353, 313, 29896, 29889, 847, 274, 312, 29918, 6112, 29897, 847, 7442, 29889, 1631, 13, 1678, 1683, 29901, 13, 4706, 282, 791, 353, 274, 29889, 4668, 29898, 29883, 312, 29918, 6112, 29897, 13, 13, 1678, 736, 282, 791, 13, 2 ]
mease_elabftw/tests/test_metadata.py
ssciwr/mease-elabftw
0
78273
import pytest import mease_elabftw import test_ids def test_get_metadata(): data = mease_elabftw.get_metadata(test_ids.valid_experiment) assert len(data.keys()) == 9 start_time = data.get("ElectrodeGroup name") assert start_time["value"] == "ElectrodeGroup" description = data.get("Ecephys Device name") assert description["value"] == "Device_ecephys" def test_get_metadata_no_token(monkeypatch): monkeypatch.delenv("ELABFTW_TOKEN") with pytest.raises(Exception) as exception_info: data = mease_elabftw.get_metadata(test_ids.valid_experiment) assert exception_info.type == RuntimeError assert ( str(exception_info.value) == "The ELABFTW_TOKEN environment variable needs to be set to your eLabFTW access token." ) def test_get_metadata_invalid_token(monkeypatch): monkeypatch.setenv("ELABFTW_TOKEN", "<PASSWORD>") with pytest.raises(Exception) as exception_info: data = mease_elabftw.get_metadata(test_ids.valid_experiment) assert exception_info.type == RuntimeError assert ( str(exception_info.value) == "Could not connect to https://elabftw.uni-heidelberg.de - do you have a valid token?" ) def test_get_metadata_invalid_id(monkeypatch): with pytest.raises(Exception) as exception_info: data = mease_elabftw.get_metadata(test_ids.invalid_experiment) assert exception_info.type == RuntimeError assert ( str(exception_info.value) == f"Experiment with id {test_ids.invalid_experiment} not found - do you have the correct id?" ) def test_get_metadata_no_metadata(): with pytest.raises(Exception) as exception_info: data = mease_elabftw.get_metadata(test_ids.valid_experiment_no_metadata) assert exception_info.type == RuntimeError assert ( str(exception_info.value) == f"Experiment with id {test_ids.valid_experiment_no_metadata} doesn't contain any metadata." )
[ 1, 1053, 11451, 1688, 13, 5215, 592, 559, 29918, 295, 370, 615, 29893, 13, 5215, 1243, 29918, 4841, 13, 13, 13, 1753, 1243, 29918, 657, 29918, 19635, 7295, 13, 1678, 848, 353, 592, 559, 29918, 295, 370, 615, 29893, 29889, 657, 29918, 19635, 29898, 1688, 29918, 4841, 29889, 3084, 29918, 735, 15362, 29897, 13, 1678, 4974, 7431, 29898, 1272, 29889, 8149, 3101, 1275, 29871, 29929, 13, 1678, 1369, 29918, 2230, 353, 848, 29889, 657, 703, 29923, 781, 307, 311, 4782, 1024, 1159, 13, 1678, 4974, 1369, 29918, 2230, 3366, 1767, 3108, 1275, 376, 29923, 781, 307, 311, 4782, 29908, 13, 1678, 6139, 353, 848, 29889, 657, 703, 29923, 346, 14017, 21830, 1024, 1159, 13, 1678, 4974, 6139, 3366, 1767, 3108, 1275, 376, 11501, 29918, 29872, 346, 14017, 29908, 13, 13, 13, 1753, 1243, 29918, 657, 29918, 19635, 29918, 1217, 29918, 6979, 29898, 3712, 446, 1478, 905, 1125, 13, 1678, 1601, 446, 1478, 905, 29889, 29881, 4498, 29894, 703, 6670, 2882, 7818, 29956, 29918, 4986, 29968, 1430, 1159, 13, 1678, 411, 11451, 1688, 29889, 336, 4637, 29898, 2451, 29897, 408, 3682, 29918, 3888, 29901, 13, 4706, 848, 353, 592, 559, 29918, 295, 370, 615, 29893, 29889, 657, 29918, 19635, 29898, 1688, 29918, 4841, 29889, 3084, 29918, 735, 15362, 29897, 13, 1678, 4974, 3682, 29918, 3888, 29889, 1853, 1275, 24875, 2392, 13, 1678, 4974, 313, 13, 4706, 851, 29898, 11739, 29918, 3888, 29889, 1767, 29897, 13, 4706, 1275, 376, 1576, 14845, 2882, 7818, 29956, 29918, 4986, 29968, 1430, 5177, 2286, 4225, 304, 367, 731, 304, 596, 321, 28632, 7818, 29956, 2130, 5993, 1213, 13, 1678, 1723, 13, 13, 13, 1753, 1243, 29918, 657, 29918, 19635, 29918, 20965, 29918, 6979, 29898, 3712, 446, 1478, 905, 1125, 13, 1678, 1601, 446, 1478, 905, 29889, 842, 6272, 703, 6670, 2882, 7818, 29956, 29918, 4986, 29968, 1430, 613, 9872, 25711, 17013, 29958, 1159, 13, 1678, 411, 11451, 1688, 29889, 336, 4637, 29898, 2451, 29897, 408, 3682, 29918, 3888, 29901, 13, 4706, 848, 353, 592, 559, 29918, 295, 370, 615, 29893, 29889, 657, 29918, 19635, 29898, 1688, 29918, 4841, 29889, 3084, 29918, 735, 15362, 29897, 13, 1678, 4974, 3682, 29918, 3888, 29889, 1853, 1275, 24875, 2392, 13, 1678, 4974, 313, 13, 4706, 851, 29898, 11739, 29918, 3888, 29889, 1767, 29897, 13, 4706, 1275, 376, 23323, 451, 4511, 304, 2045, 597, 295, 370, 615, 29893, 29889, 3909, 29899, 9722, 295, 2552, 29889, 311, 448, 437, 366, 505, 263, 2854, 5993, 3026, 13, 1678, 1723, 13, 13, 13, 1753, 1243, 29918, 657, 29918, 19635, 29918, 20965, 29918, 333, 29898, 3712, 446, 1478, 905, 1125, 13, 1678, 411, 11451, 1688, 29889, 336, 4637, 29898, 2451, 29897, 408, 3682, 29918, 3888, 29901, 13, 4706, 848, 353, 592, 559, 29918, 295, 370, 615, 29893, 29889, 657, 29918, 19635, 29898, 1688, 29918, 4841, 29889, 20965, 29918, 735, 15362, 29897, 13, 1678, 4974, 3682, 29918, 3888, 29889, 1853, 1275, 24875, 2392, 13, 1678, 4974, 313, 13, 4706, 851, 29898, 11739, 29918, 3888, 29889, 1767, 29897, 13, 4706, 1275, 285, 29908, 1252, 15362, 411, 1178, 426, 1688, 29918, 4841, 29889, 20965, 29918, 735, 15362, 29913, 451, 1476, 448, 437, 366, 505, 278, 1959, 1178, 3026, 13, 1678, 1723, 13, 13, 13, 1753, 1243, 29918, 657, 29918, 19635, 29918, 1217, 29918, 19635, 7295, 13, 1678, 411, 11451, 1688, 29889, 336, 4637, 29898, 2451, 29897, 408, 3682, 29918, 3888, 29901, 13, 4706, 848, 353, 592, 559, 29918, 295, 370, 615, 29893, 29889, 657, 29918, 19635, 29898, 1688, 29918, 4841, 29889, 3084, 29918, 735, 15362, 29918, 1217, 29918, 19635, 29897, 13, 1678, 4974, 3682, 29918, 3888, 29889, 1853, 1275, 24875, 2392, 13, 1678, 4974, 313, 13, 4706, 851, 29898, 11739, 29918, 3888, 29889, 1767, 29897, 13, 4706, 1275, 285, 29908, 1252, 15362, 411, 1178, 426, 1688, 29918, 4841, 29889, 3084, 29918, 735, 15362, 29918, 1217, 29918, 19635, 29913, 1838, 29915, 29873, 1712, 738, 15562, 1213, 13, 1678, 1723, 13, 2 ]
src/oracle/handlers/handlers.py
orisi/orisi
70
57721
<filename>src/oracle/handlers/handlers.py from timelock_contract.timelock_create_handler import TimelockCreateHandler from bounty_contract.bounty_create_handler import BountyCreateHandler from bounty_contract.bounty_redeem_handler import GuessPasswordHandler from transactionsigner import TransactionSigner from safe_timelock_contract.timelock_mark_release_handler import TimelockMarkReleaseHandler from safe_timelock_contract.safe_timelock_create_handler import SafeTimelockCreateHandler op_handlers = { 'sign': TransactionSigner, 'timelock_create': TimelockCreateHandler, 'bounty_create': BountyCreateHandler, 'bounty_redeem': GuessPasswordHandler, 'safe_timelock_create': SafeTimelockCreateHandler, 'timelock_mark_release': TimelockMarkReleaseHandler, } OPERATION_REQUIRED_FIELDS = { 'timelock_create': ['message_id', 'sum_satoshi', 'prevtxs', 'outputs', 'miners_fee_satoshi', 'return_address', 'locktime', 'pubkey_list', 'req_sigs'], 'bounty_create': ['prevtx', 'locktime', 'message_id', 'sum_amount', 'miners_fee', 'oracle_fees', 'pubkey_list', 'req_sigs', 'password_hash', 'return_address'], 'bounty_redeem': ['pwtxid', 'passwords'], 'timelock_mark_release': [], 'safe_timelock_create': ['message_id', 'oracle_fees', 'miners_fee_satoshi','return_address', 'locktime', 'pubkey_list', 'req_sigs'], } PROTOCOL_VERSION = '0.12'
[ 1, 529, 9507, 29958, 4351, 29914, 11347, 29914, 3179, 9306, 29914, 3179, 9306, 29889, 2272, 13, 3166, 5335, 295, 1698, 29918, 1285, 1461, 29889, 9346, 295, 1698, 29918, 3258, 29918, 13789, 1053, 7870, 295, 1698, 4391, 4598, 13, 3166, 289, 792, 29891, 29918, 1285, 1461, 29889, 29890, 792, 29891, 29918, 3258, 29918, 13789, 1053, 350, 792, 29891, 4391, 4598, 13, 3166, 289, 792, 29891, 29918, 1285, 1461, 29889, 29890, 792, 29891, 29918, 276, 311, 331, 29918, 13789, 1053, 2088, 404, 10048, 4598, 13, 3166, 22160, 21216, 1053, 4103, 2467, 10140, 261, 13, 3166, 9109, 29918, 9346, 295, 1698, 29918, 1285, 1461, 29889, 9346, 295, 1698, 29918, 3502, 29918, 14096, 29918, 13789, 1053, 7870, 295, 1698, 9802, 19729, 4598, 13, 3166, 9109, 29918, 9346, 295, 1698, 29918, 1285, 1461, 29889, 11177, 29918, 9346, 295, 1698, 29918, 3258, 29918, 13789, 1053, 5701, 1725, 13711, 295, 1698, 4391, 4598, 13, 13, 13, 459, 29918, 3179, 9306, 353, 426, 13, 12, 29915, 4530, 2396, 4103, 2467, 10140, 261, 29892, 13, 1678, 525, 9346, 295, 1698, 29918, 3258, 2396, 7870, 295, 1698, 4391, 4598, 29892, 13, 1678, 525, 29890, 792, 29891, 29918, 3258, 2396, 350, 792, 29891, 4391, 4598, 29892, 13, 1678, 525, 29890, 792, 29891, 29918, 276, 311, 331, 2396, 2088, 404, 10048, 4598, 29892, 13, 1678, 525, 11177, 29918, 9346, 295, 1698, 29918, 3258, 2396, 5701, 1725, 13711, 295, 1698, 4391, 4598, 29892, 13, 1678, 525, 9346, 295, 1698, 29918, 3502, 29918, 14096, 2396, 7870, 295, 1698, 9802, 19729, 4598, 29892, 13, 29913, 13, 13, 4590, 1001, 8098, 29918, 1525, 29984, 3120, 19386, 29918, 3738, 6670, 8452, 353, 426, 13, 1678, 525, 9346, 295, 1698, 29918, 3258, 2396, 6024, 4906, 29918, 333, 742, 525, 2083, 29918, 29879, 4507, 2918, 742, 525, 16304, 7508, 29879, 742, 525, 4905, 29879, 742, 525, 1195, 414, 29918, 1725, 29872, 29918, 29879, 4507, 2918, 742, 525, 2457, 29918, 7328, 742, 525, 908, 2230, 742, 525, 5467, 1989, 29918, 1761, 742, 525, 7971, 29918, 18816, 29879, 7464, 13, 1678, 525, 29890, 792, 29891, 29918, 3258, 2396, 6024, 16304, 7508, 742, 525, 908, 2230, 742, 525, 4906, 29918, 333, 742, 525, 2083, 29918, 14506, 742, 525, 1195, 414, 29918, 1725, 29872, 742, 525, 11347, 29918, 1725, 267, 742, 525, 5467, 1989, 29918, 1761, 742, 525, 7971, 29918, 18816, 29879, 742, 525, 5630, 29918, 8568, 742, 525, 2457, 29918, 7328, 7464, 13, 1678, 525, 29890, 792, 29891, 29918, 276, 311, 331, 2396, 6024, 29886, 29893, 7508, 333, 742, 525, 5630, 29879, 7464, 13, 1678, 525, 9346, 295, 1698, 29918, 3502, 29918, 14096, 2396, 19997, 13, 1678, 525, 11177, 29918, 9346, 295, 1698, 29918, 3258, 2396, 6024, 4906, 29918, 333, 742, 525, 11347, 29918, 1725, 267, 742, 525, 1195, 414, 29918, 1725, 29872, 29918, 29879, 4507, 2918, 3788, 2457, 29918, 7328, 742, 525, 908, 2230, 742, 525, 5467, 1989, 29918, 1761, 742, 525, 7971, 29918, 18816, 29879, 7464, 13, 29913, 13, 13, 8618, 4986, 15032, 29918, 16358, 353, 525, 29900, 29889, 29896, 29906, 29915, 13, 13, 2 ]
plot_robeson.py
jsunn-y/gasseparationML
0
104839
<gh_stars>0 import matplotlib.pyplot as plt import pandas as pd import numpy as np import seaborn as sns ''' Script to visualize permeability data in the O2/N2, CO2/CH4, CO2/N2, and H2/CO2 Robeson spaces. Data must be a csv file with 6 columns in the order of ['He','H2','O2','N2','CO2','CH4'] permeabilities. Update the filelist list with paths to each of the .csv files that are desired. Works with the .csv outputs of screen.py and train.py. ''' #change the paths to the files that are desired to be plotted filelist= ['models/DNN_BLR_fing/Y_pred_datasetBX_fing.csv', 'models/DNN_BLR_fing/Y_pred_datasetCX_fing_0.csv', 'models/DNN_BLR_fing2/Y_pred_datasetDX_fing.csv', 'models/RF_BLR_fing/Y_train.csv'] sns.set_palette("colorblind") #plot permeability values on a Robeson plot fig = plt.figure(figsize=(12,8)) for i, dataset in enumerate(filelist[:-1]): #read in the permeability data for each dataset Y_pred = pd.read_csv(dataset, header=None) Y_pred = np.array(Y_pred) #O2/N2 separations plt.subplot(2,2,1) permeability = Y_pred[:,-4] selectivity = Y_pred[:,-4] - Y_pred[:,-3] plt.plot(permeability, selectivity, '.', alpha = 0.2) #CO2/CH4 separations plt.subplot(2,2,2) permeability = Y_pred[:,-2] selectivity = Y_pred[:,-2] - Y_pred[:,-1] plt.plot(permeability, selectivity, '.', alpha=0.2) #CO2/N2 separations plt.subplot(2,2,3) permeability = Y_pred[:,-2] selectivity = Y_pred[:,-2] - Y_pred[:,-3] plt.plot(permeability, selectivity, '.', alpha=0.2) #H2/CO2 separations plt.subplot(2,2,4) permeability = Y_pred[:,-5] selectivity = Y_pred[:,-5] - Y_pred[:,-2] plt.plot(permeability, selectivity, '.', alpha=0.2) #read in the permeability data for each dataset Y_pred = pd.read_csv(filelist[-1], header=None) Y_pred = np.array(Y_pred) #O2/N2 separations plt.subplot(2,2,1) permeability = Y_pred[:,-4] selectivity = Y_pred[:,-4] - Y_pred[:,-3] plt.plot(permeability, selectivity, '.', markersize=3, color='k') #CO2/CH4 separations plt.subplot(2,2,2) permeability = Y_pred[:,-2] selectivity = Y_pred[:,-2] - Y_pred[:,-1] plt.plot(permeability, selectivity, '.', markersize=3, color='k') #CO2/N2 separations plt.subplot(2,2,3) permeability = Y_pred[:,-2] selectivity = Y_pred[:,-2] - Y_pred[:,-3] plt.plot(permeability, selectivity, '.', markersize=3, color='k') #H2/CO2 separations plt.subplot(2,2,4) permeability = Y_pred[:,-5] selectivity = Y_pred[:,-5] - Y_pred[:,-2] plt.plot(permeability, selectivity, '.', markersize=3, color='k') #format the plot and add Robeson upper bounds plt.subplot(2,2,1) xmin = -4 xmax = 7 plt.xlim([xmin, xmax]) plt.ylim([-1, 2]) plt.plot([xmin, xmax], [np.log10(9.2008)-0.1724*xmin, np.log10(9.2008)-0.1724*xmax], '-k') #1991 upper bound plt.plot([xmin, xmax], [np.log10(12.148)-0.1765*xmin, np.log10(12.148)-0.1765*xmax], '--k') #2008 upper bound plt.plot([xmin, xmax], [np.log10(18.50)-0.1754*xmin, np.log10(18.50)-0.1754*xmax], ':k') #2015 upper bound plt.title("O2/N2 Separations") #plt.legend(filelist) plt.subplot(2,2,2) xmin = -2 xmax =7 plt.xlim([xmin, xmax]) plt.ylim([-2, 4]) plt.plot([xmin, xmax], [np.log10(197.81)-0.3807*xmin, np.log10(197.81)-0.3807*xmax], '-k') #1991 upper bound plt.plot([xmin, xmax], [np.log10(357.33)-0.3794*xmin, np.log10(357.33)-0.3794*xmax], '--k') #2008 upper bound plt.plot([xmin, xmax], [np.log10(1155.60)-0.4165*xmin, np.log10(1155.60)-0.4165*xmax], ':k') #2019 upper bound plt.title('CO2/CH4 Separations') plt.subplot(2,2,3) xmin = -2 xmax =7 plt.xlim([xmin, xmax]) plt.ylim([-1, 3]) plt.plot([xmin, xmax], -1/2.888*np.array([-np.log10(30967000)+xmin, -np.log10(30967000)+xmax]), '--k') #2008 upper bound plt.plot([xmin, xmax], -1/3.409*np.array([-np.log10(755.58e6)+xmin, -np.log10(755.58e6)+xmax]), ':k') #2019 upper bound plt.title('CO2/N2 Separations') plt.subplot(2,2,4) xmin = -2 xmax =7 plt.xlim([xmin, xmax]) plt.ylim([-1.5, 2]) plt.plot([xmin, xmax], -1/1.9363*np.array([-np.log10(1200)+xmin, -np.log10(1200)+xmax]), '-k') #1991 upper bound plt.plot([xmin, xmax], -1/2.302*np.array([-np.log10(4515)+xmin, -np.log10(4515)+xmax]), '--k') #2008 upper bound plt.title('H2/CO2 Separations') plt.show()
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 5215, 22889, 29889, 2272, 5317, 408, 14770, 30004, 13, 5215, 11701, 408, 10518, 30004, 13, 5215, 12655, 408, 7442, 30004, 13, 5215, 409, 370, 1398, 408, 269, 1983, 30004, 13, 30004, 13, 12008, 30004, 13, 4081, 304, 7604, 675, 639, 1004, 3097, 848, 297, 278, 438, 29906, 29914, 29940, 29906, 29892, 4810, 29906, 29914, 3210, 29946, 29892, 4810, 29906, 29914, 29940, 29906, 29892, 322, 379, 29906, 29914, 3217, 29906, 6417, 267, 265, 8162, 22993, 13, 1469, 1818, 367, 263, 11799, 934, 411, 29871, 29953, 4341, 297, 278, 1797, 310, 6024, 3868, 3788, 29950, 29906, 3788, 29949, 29906, 3788, 29940, 29906, 3788, 3217, 29906, 3788, 3210, 29946, 2033, 639, 1004, 11614, 22993, 13, 6422, 278, 934, 1761, 1051, 411, 10898, 304, 1269, 310, 278, 869, 7638, 2066, 393, 526, 7429, 22993, 13, 5531, 29879, 411, 278, 869, 7638, 14391, 310, 4315, 29889, 2272, 322, 7945, 29889, 2272, 22993, 13, 12008, 30004, 13, 30004, 13, 29937, 3167, 278, 10898, 304, 278, 2066, 393, 526, 7429, 304, 367, 715, 15048, 30004, 13, 1445, 1761, 29922, 6024, 9794, 29914, 29928, 10262, 29918, 13367, 29934, 29918, 29888, 292, 29914, 29979, 29918, 11965, 29918, 24713, 29933, 29990, 29918, 29888, 292, 29889, 7638, 742, 525, 9794, 29914, 29928, 10262, 29918, 13367, 29934, 29918, 29888, 292, 29914, 29979, 29918, 11965, 29918, 24713, 29907, 29990, 29918, 29888, 292, 29918, 29900, 29889, 7638, 742, 525, 9794, 29914, 29928, 10262, 29918, 13367, 29934, 29918, 29888, 292, 29906, 29914, 29979, 29918, 11965, 29918, 24713, 29928, 29990, 29918, 29888, 292, 29889, 7638, 742, 525, 9794, 29914, 29934, 29943, 29918, 13367, 29934, 29918, 29888, 292, 29914, 29979, 29918, 14968, 29889, 7638, 2033, 30004, 13, 30004, 13, 29879, 1983, 29889, 842, 29918, 29886, 26456, 703, 2780, 2204, 513, 1159, 30004, 13, 30004, 13, 29937, 5317, 639, 1004, 3097, 1819, 373, 263, 6417, 267, 265, 6492, 30004, 13, 1003, 353, 14770, 29889, 4532, 29898, 1003, 2311, 7607, 29896, 29906, 29892, 29947, 876, 30004, 13, 30004, 13, 1454, 474, 29892, 8783, 297, 26985, 29898, 1445, 1761, 7503, 29899, 29896, 29962, 1125, 30004, 13, 1678, 396, 949, 297, 278, 639, 1004, 3097, 848, 363, 1269, 8783, 30004, 13, 1678, 612, 29918, 11965, 353, 10518, 29889, 949, 29918, 7638, 29898, 24713, 29892, 4839, 29922, 8516, 8443, 13, 1678, 612, 29918, 11965, 353, 7442, 29889, 2378, 29898, 29979, 29918, 11965, 8443, 13, 30004, 13, 1678, 396, 29949, 29906, 29914, 29940, 29906, 2903, 800, 30004, 13, 1678, 14770, 29889, 1491, 5317, 29898, 29906, 29892, 29906, 29892, 29896, 8443, 13, 1678, 639, 1004, 3097, 353, 612, 29918, 11965, 7503, 6653, 29946, 29962, 30004, 13, 1678, 1831, 2068, 353, 612, 29918, 11965, 7503, 6653, 29946, 29962, 448, 612, 29918, 11965, 7503, 6653, 29941, 29962, 30004, 13, 1678, 14770, 29889, 5317, 29898, 546, 1004, 3097, 29892, 1831, 2068, 29892, 15300, 742, 15595, 353, 29871, 29900, 29889, 29906, 8443, 13, 30004, 13, 1678, 396, 3217, 29906, 29914, 3210, 29946, 2903, 800, 30004, 13, 1678, 14770, 29889, 1491, 5317, 29898, 29906, 29892, 29906, 29892, 29906, 8443, 13, 1678, 639, 1004, 3097, 353, 612, 29918, 11965, 7503, 6653, 29906, 29962, 30004, 13, 1678, 1831, 2068, 353, 612, 29918, 11965, 7503, 6653, 29906, 29962, 448, 612, 29918, 11965, 7503, 6653, 29896, 29962, 30004, 13, 1678, 14770, 29889, 5317, 29898, 546, 1004, 3097, 29892, 1831, 2068, 29892, 15300, 742, 15595, 29922, 29900, 29889, 29906, 8443, 13, 30004, 13, 1678, 396, 3217, 29906, 29914, 29940, 29906, 2903, 800, 30004, 13, 1678, 14770, 29889, 1491, 5317, 29898, 29906, 29892, 29906, 29892, 29941, 8443, 13, 1678, 639, 1004, 3097, 353, 612, 29918, 11965, 7503, 6653, 29906, 29962, 30004, 13, 1678, 1831, 2068, 353, 612, 29918, 11965, 7503, 6653, 29906, 29962, 448, 612, 29918, 11965, 7503, 6653, 29941, 29962, 30004, 13, 1678, 14770, 29889, 5317, 29898, 546, 1004, 3097, 29892, 1831, 2068, 29892, 15300, 742, 15595, 29922, 29900, 29889, 29906, 8443, 13, 30004, 13, 1678, 396, 29950, 29906, 29914, 3217, 29906, 2903, 800, 30004, 13, 1678, 14770, 29889, 1491, 5317, 29898, 29906, 29892, 29906, 29892, 29946, 8443, 13, 1678, 639, 1004, 3097, 353, 612, 29918, 11965, 7503, 6653, 29945, 29962, 30004, 13, 1678, 1831, 2068, 353, 612, 29918, 11965, 7503, 6653, 29945, 29962, 448, 612, 29918, 11965, 7503, 6653, 29906, 29962, 30004, 13, 1678, 14770, 29889, 5317, 29898, 546, 1004, 3097, 29892, 1831, 2068, 29892, 15300, 742, 15595, 29922, 29900, 29889, 29906, 8443, 13, 30004, 13, 29937, 949, 297, 278, 639, 1004, 3097, 848, 363, 1269, 8783, 30004, 13, 29979, 29918, 11965, 353, 10518, 29889, 949, 29918, 7638, 29898, 1445, 1761, 14352, 29896, 1402, 4839, 29922, 8516, 8443, 13, 29979, 29918, 11965, 353, 7442, 29889, 2378, 29898, 29979, 29918, 11965, 8443, 13, 30004, 13, 29937, 29949, 29906, 29914, 29940, 29906, 2903, 800, 30004, 13, 572, 29873, 29889, 1491, 5317, 29898, 29906, 29892, 29906, 29892, 29896, 8443, 13, 546, 1004, 3097, 353, 612, 29918, 11965, 7503, 6653, 29946, 29962, 30004, 13, 2622, 2068, 353, 612, 29918, 11965, 7503, 6653, 29946, 29962, 448, 612, 29918, 11965, 7503, 6653, 29941, 29962, 30004, 13, 572, 29873, 29889, 5317, 29898, 546, 1004, 3097, 29892, 1831, 2068, 29892, 15300, 742, 29320, 675, 29922, 29941, 29892, 2927, 2433, 29895, 1495, 30004, 13, 30004, 13, 29937, 3217, 29906, 29914, 3210, 29946, 2903, 800, 30004, 13, 572, 29873, 29889, 1491, 5317, 29898, 29906, 29892, 29906, 29892, 29906, 8443, 13, 546, 1004, 3097, 353, 612, 29918, 11965, 7503, 6653, 29906, 29962, 30004, 13, 2622, 2068, 353, 612, 29918, 11965, 7503, 6653, 29906, 29962, 448, 612, 29918, 11965, 7503, 6653, 29896, 29962, 30004, 13, 572, 29873, 29889, 5317, 29898, 546, 1004, 3097, 29892, 1831, 2068, 29892, 15300, 742, 29320, 675, 29922, 29941, 29892, 2927, 2433, 29895, 1495, 30004, 13, 30004, 13, 29937, 3217, 29906, 29914, 29940, 29906, 2903, 800, 30004, 13, 572, 29873, 29889, 1491, 5317, 29898, 29906, 29892, 29906, 29892, 29941, 8443, 13, 546, 1004, 3097, 353, 612, 29918, 11965, 7503, 6653, 29906, 29962, 30004, 13, 2622, 2068, 353, 612, 29918, 11965, 7503, 6653, 29906, 29962, 448, 612, 29918, 11965, 7503, 6653, 29941, 29962, 30004, 13, 572, 29873, 29889, 5317, 29898, 546, 1004, 3097, 29892, 1831, 2068, 29892, 15300, 742, 29320, 675, 29922, 29941, 29892, 2927, 2433, 29895, 1495, 30004, 13, 30004, 13, 29937, 29950, 29906, 29914, 3217, 29906, 2903, 800, 30004, 13, 572, 29873, 29889, 1491, 5317, 29898, 29906, 29892, 29906, 29892, 29946, 8443, 13, 546, 1004, 3097, 353, 612, 29918, 11965, 7503, 6653, 29945, 29962, 30004, 13, 2622, 2068, 353, 612, 29918, 11965, 7503, 6653, 29945, 29962, 448, 612, 29918, 11965, 7503, 6653, 29906, 29962, 30004, 13, 572, 29873, 29889, 5317, 29898, 546, 1004, 3097, 29892, 1831, 2068, 29892, 15300, 742, 29320, 675, 29922, 29941, 29892, 2927, 2433, 29895, 1495, 30004, 13, 1678, 6756, 13, 29937, 4830, 278, 6492, 322, 788, 6417, 267, 265, 7568, 13451, 30004, 13, 572, 29873, 29889, 1491, 5317, 29898, 29906, 29892, 29906, 29892, 29896, 8443, 13, 29916, 1195, 353, 448, 29946, 30004, 13, 29916, 3317, 353, 29871, 29955, 30004, 13, 572, 29873, 29889, 29916, 2576, 4197, 29916, 1195, 29892, 921, 3317, 2314, 30004, 13, 572, 29873, 29889, 29891, 2576, 4197, 29899, 29896, 29892, 29871, 29906, 2314, 30004, 13, 572, 29873, 29889, 5317, 4197, 29916, 1195, 29892, 921, 3317, 1402, 518, 9302, 29889, 1188, 29896, 29900, 29898, 29929, 29889, 29906, 29900, 29900, 29947, 6817, 29900, 29889, 29896, 29955, 29906, 29946, 29930, 29916, 1195, 29892, 7442, 29889, 1188, 29896, 29900, 29898, 29929, 29889, 29906, 29900, 29900, 29947, 6817, 29900, 29889, 29896, 29955, 29906, 29946, 29930, 29916, 3317, 1402, 17411, 29895, 1495, 396, 29896, 29929, 29929, 29896, 7568, 3216, 30004, 13, 572, 29873, 29889, 5317, 4197, 29916, 1195, 29892, 921, 3317, 1402, 518, 9302, 29889, 1188, 29896, 29900, 29898, 29896, 29906, 29889, 29896, 29946, 29947, 6817, 29900, 29889, 29896, 29955, 29953, 29945, 29930, 29916, 1195, 29892, 7442, 29889, 1188, 29896, 29900, 29898, 29896, 29906, 29889, 29896, 29946, 29947, 6817, 29900, 29889, 29896, 29955, 29953, 29945, 29930, 29916, 3317, 1402, 525, 489, 29895, 1495, 396, 29906, 29900, 29900, 29947, 7568, 3216, 30004, 13, 572, 29873, 29889, 5317, 4197, 29916, 1195, 29892, 921, 3317, 1402, 518, 9302, 29889, 1188, 29896, 29900, 29898, 29896, 29947, 29889, 29945, 29900, 6817, 29900, 29889, 29896, 29955, 29945, 29946, 29930, 29916, 1195, 29892, 7442, 29889, 1188, 29896, 29900, 29898, 29896, 29947, 29889, 29945, 29900, 6817, 29900, 29889, 29896, 29955, 29945, 29946, 29930, 29916, 3317, 1402, 525, 29901, 29895, 1495, 396, 29906, 29900, 29896, 29945, 7568, 3216, 30004, 13, 572, 29873, 29889, 3257, 703, 29949, 29906, 29914, 29940, 29906, 922, 862, 800, 1159, 30004, 13, 29937, 572, 29873, 29889, 26172, 29898, 1445, 1761, 8443, 13, 30004, 13, 572, 29873, 29889, 1491, 5317, 29898, 29906, 29892, 29906, 29892, 29906, 8443, 13, 29916, 1195, 353, 448, 29906, 30004, 13, 29916, 3317, 353, 29955, 30004, 13, 572, 29873, 29889, 29916, 2576, 4197, 29916, 1195, 29892, 921, 3317, 2314, 30004, 13, 572, 29873, 29889, 29891, 2576, 4197, 29899, 29906, 29892, 29871, 29946, 2314, 30004, 13, 572, 29873, 29889, 5317, 4197, 29916, 1195, 29892, 921, 3317, 1402, 518, 9302, 29889, 1188, 29896, 29900, 29898, 29896, 29929, 29955, 29889, 29947, 29896, 6817, 29900, 29889, 29941, 29947, 29900, 29955, 29930, 29916, 1195, 29892, 7442, 29889, 1188, 29896, 29900, 29898, 29896, 29929, 29955, 29889, 29947, 29896, 6817, 29900, 29889, 29941, 29947, 29900, 29955, 29930, 29916, 3317, 1402, 17411, 29895, 1495, 396, 29896, 29929, 29929, 29896, 7568, 3216, 30004, 13, 572, 29873, 29889, 5317, 4197, 29916, 1195, 29892, 921, 3317, 1402, 518, 9302, 29889, 1188, 29896, 29900, 29898, 29941, 29945, 29955, 29889, 29941, 29941, 6817, 29900, 29889, 29941, 29955, 29929, 29946, 29930, 29916, 1195, 29892, 7442, 29889, 1188, 29896, 29900, 29898, 29941, 29945, 29955, 29889, 29941, 29941, 6817, 29900, 29889, 29941, 29955, 29929, 29946, 29930, 29916, 3317, 1402, 525, 489, 29895, 1495, 396, 29906, 29900, 29900, 29947, 7568, 3216, 30004, 13, 572, 29873, 29889, 5317, 4197, 29916, 1195, 29892, 921, 3317, 1402, 518, 9302, 29889, 1188, 29896, 29900, 29898, 29896, 29896, 29945, 29945, 29889, 29953, 29900, 6817, 29900, 29889, 29946, 29896, 29953, 29945, 29930, 29916, 1195, 29892, 7442, 29889, 1188, 29896, 29900, 29898, 29896, 29896, 29945, 29945, 29889, 29953, 29900, 6817, 29900, 29889, 29946, 29896, 29953, 29945, 29930, 29916, 3317, 1402, 525, 29901, 29895, 1495, 396, 29906, 29900, 29896, 29929, 7568, 3216, 30004, 13, 572, 29873, 29889, 3257, 877, 3217, 29906, 29914, 3210, 29946, 922, 862, 800, 1495, 30004, 13, 30004, 13, 572, 29873, 29889, 1491, 5317, 29898, 29906, 29892, 29906, 29892, 29941, 8443, 13, 29916, 1195, 353, 448, 29906, 30004, 13, 29916, 3317, 353, 29955, 30004, 13, 572, 29873, 29889, 29916, 2576, 4197, 29916, 1195, 29892, 921, 3317, 2314, 30004, 13, 572, 29873, 29889, 29891, 2576, 4197, 29899, 29896, 29892, 29871, 29941, 2314, 30004, 13, 572, 29873, 29889, 5317, 4197, 29916, 1195, 29892, 921, 3317, 1402, 448, 29896, 29914, 29906, 29889, 29947, 29947, 29947, 29930, 9302, 29889, 2378, 4197, 29899, 9302, 29889, 1188, 29896, 29900, 29898, 29941, 29900, 29929, 29953, 29955, 29900, 29900, 29900, 7240, 29916, 1195, 29892, 448, 9302, 29889, 1188, 29896, 29900, 29898, 29941, 29900, 29929, 29953, 29955, 29900, 29900, 29900, 7240, 29916, 3317, 11724, 525, 489, 29895, 1495, 396, 29906, 29900, 29900, 29947, 7568, 3216, 30004, 13, 572, 29873, 29889, 5317, 4197, 29916, 1195, 29892, 921, 3317, 1402, 448, 29896, 29914, 29941, 29889, 29946, 29900, 29929, 29930, 9302, 29889, 2378, 4197, 29899, 9302, 29889, 1188, 29896, 29900, 29898, 29955, 29945, 29945, 29889, 29945, 29947, 29872, 29953, 7240, 29916, 1195, 29892, 448, 9302, 29889, 1188, 29896, 29900, 29898, 29955, 29945, 29945, 29889, 29945, 29947, 29872, 29953, 7240, 29916, 3317, 11724, 525, 29901, 29895, 1495, 396, 29906, 29900, 29896, 29929, 7568, 3216, 30004, 13, 572, 29873, 29889, 3257, 877, 3217, 29906, 29914, 29940, 29906, 922, 862, 800, 1495, 30004, 13, 30004, 13, 572, 29873, 29889, 1491, 5317, 29898, 29906, 29892, 29906, 29892, 29946, 8443, 13, 29916, 1195, 353, 448, 29906, 30004, 13, 29916, 3317, 353, 29955, 30004, 13, 572, 29873, 29889, 29916, 2576, 4197, 29916, 1195, 29892, 921, 3317, 2314, 30004, 13, 572, 29873, 29889, 29891, 2576, 4197, 29899, 29896, 29889, 29945, 29892, 29871, 29906, 2314, 30004, 13, 572, 29873, 29889, 5317, 4197, 29916, 1195, 29892, 921, 3317, 1402, 448, 29896, 29914, 29896, 29889, 29929, 29941, 29953, 29941, 29930, 9302, 29889, 2378, 4197, 29899, 9302, 29889, 1188, 29896, 29900, 29898, 29896, 29906, 29900, 29900, 7240, 29916, 1195, 29892, 448, 9302, 29889, 1188, 29896, 29900, 29898, 29896, 29906, 29900, 29900, 7240, 29916, 3317, 11724, 17411, 29895, 1495, 396, 29896, 29929, 29929, 29896, 7568, 3216, 30004, 13, 572, 29873, 29889, 5317, 4197, 29916, 1195, 29892, 921, 3317, 1402, 448, 29896, 29914, 29906, 29889, 29941, 29900, 29906, 29930, 9302, 29889, 2378, 4197, 29899, 9302, 29889, 1188, 29896, 29900, 29898, 29946, 29945, 29896, 29945, 7240, 29916, 1195, 29892, 448, 9302, 29889, 1188, 29896, 29900, 29898, 29946, 29945, 29896, 29945, 7240, 29916, 3317, 11724, 525, 489, 29895, 1495, 396, 29906, 29900, 29900, 29947, 7568, 3216, 30004, 13, 572, 29873, 29889, 3257, 877, 29950, 29906, 29914, 3217, 29906, 922, 862, 800, 1495, 30004, 13, 30004, 13, 572, 29873, 29889, 4294, 26471, 13, 2 ]
Generalisation/utils.py
act65/Experiments
0
100141
from __future__ import print_function import tensorflow as tf import tensorflow.contrib.slim as slim from sklearn.utils import shuffle def wide_net(x): with slim.arg_scope([slim.fully_connected], activation_fn=tf.nn.relu, weights_initializer=tf.orthogonal_initializer(), biases_initializer=tf.constant_initializer(0.0)): h = slim.fully_connected(x, 1000) return slim.fully_connected(h, 10, activation_fn=None) def deep_net(x): with slim.arg_scope([slim.fully_connected], activation_fn=tf.nn.relu, weights_initializer=tf.orthogonal_initializer(), biases_initializer=tf.constant_initializer(0.0)): h = slim.stack(x, slim.fully_connected, [200] * 17) return slim.fully_connected(h, 10, activation_fn=None) ################################################################################ def batch(ims, labels, batchsize): ims, labels = shuffle(ims, labels) shape = ims.shape for i in range(len(labels)//batchsize): yield (i, ims[i*batchsize:(i+1)*batchsize, ...], labels[i*batchsize:(i+1)*batchsize, ...]) def validate(sess, writer, step, x, T, valid_ims, valid_labels, batchsize, name=''): ### Validate classifier metrics = tf.get_collection('METRICS') updates = tf.get_collection('METRIC_UPDATES') variables = tf.get_collection('LOCAL_VARIABLES', scope='metrics') sess.run(tf.variables_initializer(variables)) # eval and aggregate for _, batch_ims, batch_labels in batch(valid_ims, valid_labels, batchsize): sess.run(updates, {x: batch_ims, T: batch_labels}) values = sess.run(metrics, {x: batch_ims, T: batch_labels}) # write summary for k, v in zip(metrics, values): add_summary(writer, step, 'valid/'+name, float(v)) def add_summary(writer, step, name, val): summ = tf.Summary(value=[tf.Summary.Value(tag=name, simple_value=val)]) writer.add_summary(summ, step) def get_loss_fn(name, logits): return
[ 1, 515, 4770, 29888, 9130, 1649, 1053, 1596, 29918, 2220, 13, 13, 5215, 26110, 408, 15886, 13, 5215, 26110, 29889, 21570, 29889, 2536, 326, 408, 2243, 326, 13, 13, 3166, 2071, 19668, 29889, 13239, 1053, 528, 21897, 13, 13, 1753, 9377, 29918, 1212, 29898, 29916, 1125, 13, 1678, 411, 2243, 326, 29889, 1191, 29918, 6078, 4197, 2536, 326, 29889, 3730, 29918, 18045, 1402, 13, 462, 4706, 26229, 29918, 9144, 29922, 13264, 29889, 15755, 29889, 2674, 29884, 29892, 13, 462, 4706, 18177, 29918, 11228, 3950, 29922, 13264, 29889, 2072, 23419, 29918, 11228, 3950, 3285, 13, 462, 4706, 4768, 2129, 29918, 11228, 3950, 29922, 13264, 29889, 23362, 29918, 11228, 3950, 29898, 29900, 29889, 29900, 22164, 13, 4706, 298, 353, 2243, 326, 29889, 3730, 29918, 18045, 29898, 29916, 29892, 29871, 29896, 29900, 29900, 29900, 29897, 13, 1678, 736, 2243, 326, 29889, 3730, 29918, 18045, 29898, 29882, 29892, 29871, 29896, 29900, 29892, 26229, 29918, 9144, 29922, 8516, 29897, 13, 13, 13, 1753, 6483, 29918, 1212, 29898, 29916, 1125, 13, 1678, 411, 2243, 326, 29889, 1191, 29918, 6078, 4197, 2536, 326, 29889, 3730, 29918, 18045, 1402, 13, 462, 4706, 26229, 29918, 9144, 29922, 13264, 29889, 15755, 29889, 2674, 29884, 29892, 13, 462, 4706, 18177, 29918, 11228, 3950, 29922, 13264, 29889, 2072, 23419, 29918, 11228, 3950, 3285, 13, 462, 4706, 4768, 2129, 29918, 11228, 3950, 29922, 13264, 29889, 23362, 29918, 11228, 3950, 29898, 29900, 29889, 29900, 22164, 13, 4706, 298, 353, 2243, 326, 29889, 1429, 29898, 29916, 29892, 2243, 326, 29889, 3730, 29918, 18045, 29892, 518, 29906, 29900, 29900, 29962, 334, 29871, 29896, 29955, 29897, 13, 1678, 736, 2243, 326, 29889, 3730, 29918, 18045, 29898, 29882, 29892, 29871, 29896, 29900, 29892, 26229, 29918, 9144, 29922, 8516, 29897, 13, 13, 13383, 13383, 13383, 13383, 13383, 13, 13, 1753, 9853, 29898, 9893, 29892, 11073, 29892, 9853, 2311, 1125, 13, 1678, 527, 29879, 29892, 11073, 353, 528, 21897, 29898, 9893, 29892, 11073, 29897, 13, 1678, 8267, 353, 527, 29879, 29889, 12181, 13, 1678, 363, 474, 297, 3464, 29898, 2435, 29898, 21134, 29897, 458, 16175, 2311, 1125, 13, 4706, 7709, 313, 29875, 29892, 527, 29879, 29961, 29875, 29930, 16175, 2311, 5919, 29875, 29974, 29896, 11877, 16175, 2311, 29892, 2023, 1402, 13, 462, 29871, 11073, 29961, 29875, 29930, 16175, 2311, 5919, 29875, 29974, 29896, 11877, 16175, 2311, 29892, 2023, 2314, 13, 13, 13, 1753, 12725, 29898, 29879, 404, 29892, 9227, 29892, 4331, 29892, 921, 29892, 323, 29892, 2854, 29918, 9893, 29892, 2854, 29918, 21134, 29892, 9853, 2311, 29892, 1024, 2433, 29374, 13, 1678, 835, 15758, 403, 770, 3709, 13, 1678, 21556, 353, 15886, 29889, 657, 29918, 10855, 877, 2303, 5659, 2965, 29903, 1495, 13, 1678, 11217, 353, 15886, 29889, 657, 29918, 10855, 877, 2303, 5659, 2965, 29918, 4897, 25832, 2890, 1495, 13, 1678, 3651, 353, 15886, 29889, 657, 29918, 10855, 877, 16652, 1964, 29918, 26865, 29902, 6181, 29903, 742, 6874, 2433, 2527, 10817, 1495, 13, 1678, 27937, 29889, 3389, 29898, 13264, 29889, 20897, 29918, 11228, 3950, 29898, 20897, 876, 13, 13, 1678, 396, 19745, 322, 20431, 13, 1678, 363, 17117, 9853, 29918, 9893, 29892, 9853, 29918, 21134, 297, 9853, 29898, 3084, 29918, 9893, 29892, 2854, 29918, 21134, 29892, 9853, 2311, 1125, 13, 4706, 27937, 29889, 3389, 29898, 786, 15190, 29892, 426, 29916, 29901, 9853, 29918, 9893, 29892, 323, 29901, 9853, 29918, 21134, 1800, 13, 1678, 1819, 353, 27937, 29889, 3389, 29898, 2527, 10817, 29892, 426, 29916, 29901, 9853, 29918, 9893, 29892, 323, 29901, 9853, 29918, 21134, 1800, 13, 13, 1678, 396, 2436, 15837, 13, 1678, 363, 413, 29892, 325, 297, 14319, 29898, 2527, 10817, 29892, 1819, 1125, 13, 4706, 788, 29918, 7727, 29898, 13236, 29892, 4331, 29892, 525, 3084, 29914, 18717, 978, 29892, 5785, 29898, 29894, 876, 13, 13, 1753, 788, 29918, 7727, 29898, 13236, 29892, 4331, 29892, 1024, 29892, 659, 1125, 13, 1678, 22792, 353, 15886, 29889, 26289, 29898, 1767, 11759, 13264, 29889, 26289, 29889, 1917, 29898, 4039, 29922, 978, 29892, 2560, 29918, 1767, 29922, 791, 29897, 2314, 13, 1678, 9227, 29889, 1202, 29918, 7727, 29898, 2083, 29885, 29892, 4331, 29897, 13, 13, 1753, 679, 29918, 6758, 29918, 9144, 29898, 978, 29892, 1480, 1169, 1125, 13, 1678, 736, 13, 2 ]
cbackup.py
andytaylor823/discord-draft-assist
0
197905
import functions as f import defs as d import discord import error_messages as em import numpy as np # look for bad input with the error functions defined here def check_bad_input(ctx, rd, pokemon, tier): testfns = [check_no_primary_yet, check_backup_equals_primary] e = '' i = 0 while e == '' and i < len(testfns): e = testfns[i](ctx, rd, pokemon, tier) i += 1 return(e) # check if the user has not already selected a primary # if they have, they can't select a backup def check_no_primary_yet(ctx, rd, pokemon, tier): rd = int(rd) user = ctx.author if d.lists[user][rd-1] == 'None': return(em.no_primary_yet) return('') # the user can't select the same backup as their primary def check_backup_equals_primary(ctx, rd, pokemon, tier): user = ctx.author rd = int(rd) user_primary = d.lists[user][rd-1] if user_primary == pokemon: return(em.backup_equals_primary) return('') # if the command has been entered correctly, apply the backup def apply_backup(ctx, rd, pokemon, tier): author = ctx.author msg = 'Done! I have registered your Round {} backup as {} (Tier {})!\n' msg = msg.format(str(rd), pokemon, str(tier)) msg += 'Remember, you can use the command "!list" at any time to see the list of the picks you have made and the ones you have planned!' d.backups[author][int(rd)-1] = pokemon return(msg)
[ 1, 1053, 3168, 408, 285, 13, 5215, 822, 29879, 408, 270, 13, 5215, 2313, 536, 13, 5215, 1059, 29918, 19158, 408, 953, 13, 5215, 12655, 408, 7442, 13, 13, 29937, 1106, 363, 4319, 1881, 411, 278, 1059, 3168, 3342, 1244, 13, 1753, 1423, 29918, 12313, 29918, 2080, 29898, 13073, 29892, 364, 29881, 29892, 11293, 9857, 29892, 26485, 1125, 13, 13, 12, 1688, 29888, 1983, 353, 518, 3198, 29918, 1217, 29918, 16072, 29918, 29891, 300, 29892, 1423, 29918, 1627, 786, 29918, 10954, 29918, 16072, 29962, 13, 12, 29872, 353, 6629, 13, 12, 29875, 353, 29871, 29900, 13, 12, 8000, 321, 1275, 6629, 322, 474, 529, 7431, 29898, 1688, 29888, 1983, 1125, 13, 12, 12, 29872, 353, 1243, 29888, 1983, 29961, 29875, 850, 13073, 29892, 364, 29881, 29892, 11293, 9857, 29892, 26485, 29897, 13, 12, 12, 29875, 4619, 29871, 29896, 13, 12, 2457, 29898, 29872, 29897, 13, 13, 29937, 1423, 565, 278, 1404, 756, 451, 2307, 4629, 263, 7601, 13, 29937, 565, 896, 505, 29892, 896, 508, 29915, 29873, 1831, 263, 16199, 13, 1753, 1423, 29918, 1217, 29918, 16072, 29918, 29891, 300, 29898, 13073, 29892, 364, 29881, 29892, 11293, 9857, 29892, 26485, 1125, 13, 13, 12, 5499, 353, 938, 29898, 5499, 29897, 13, 12, 1792, 353, 12893, 29889, 8921, 13, 12, 361, 270, 29889, 21513, 29961, 1792, 3816, 5499, 29899, 29896, 29962, 1275, 525, 8516, 2396, 13, 12, 12, 2457, 29898, 331, 29889, 1217, 29918, 16072, 29918, 29891, 300, 29897, 13, 12, 2457, 877, 1495, 13, 13, 29937, 278, 1404, 508, 29915, 29873, 1831, 278, 1021, 16199, 408, 1009, 7601, 13, 1753, 1423, 29918, 1627, 786, 29918, 10954, 29918, 16072, 29898, 13073, 29892, 364, 29881, 29892, 11293, 9857, 29892, 26485, 1125, 13, 13, 12, 1792, 353, 12893, 29889, 8921, 13, 12, 5499, 353, 938, 29898, 5499, 29897, 13, 12, 1792, 29918, 16072, 353, 270, 29889, 21513, 29961, 1792, 3816, 5499, 29899, 29896, 29962, 13, 12, 13, 12, 361, 1404, 29918, 16072, 1275, 11293, 9857, 29901, 13, 12, 12, 2457, 29898, 331, 29889, 1627, 786, 29918, 10954, 29918, 16072, 29897, 13, 12, 2457, 877, 1495, 13, 13, 29937, 565, 278, 1899, 756, 1063, 7802, 5149, 29892, 3394, 278, 16199, 13, 1753, 3394, 29918, 1627, 786, 29898, 13073, 29892, 364, 29881, 29892, 11293, 9857, 29892, 26485, 1125, 13, 13, 12, 8921, 353, 12893, 29889, 8921, 13, 12, 7645, 353, 525, 25632, 29991, 306, 505, 15443, 596, 21595, 6571, 16199, 408, 6571, 313, 29911, 631, 426, 1800, 9903, 29876, 29915, 13, 12, 7645, 353, 10191, 29889, 4830, 29898, 710, 29898, 5499, 511, 11293, 9857, 29892, 851, 29898, 29873, 631, 876, 13, 12, 7645, 4619, 525, 7301, 1096, 29892, 366, 508, 671, 278, 1899, 376, 29991, 1761, 29908, 472, 738, 931, 304, 1074, 278, 1051, 310, 278, 5839, 29879, 366, 505, 1754, 322, 278, 6743, 366, 505, 20458, 20714, 13, 12, 29881, 29889, 1627, 14340, 29961, 8921, 3816, 524, 29898, 5499, 6817, 29896, 29962, 353, 11293, 9857, 13, 12, 2457, 29898, 7645, 29897, 13, 2 ]
build_vocab/build_vocab.py
zaidalyafeai/pytorch-G2P
22
197361
"""Standalone script to generate word vocabularies from monolingual corpus.""" import argparse import data_utils def main(): parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument( "--model_dir", default="../prepared_data/", help="Data for training") parser.add_argument( "--train_file", default="../naive_data/train", help="Data for training") parser.add_argument( "--valid_file", default="", help="Data for validation") parser.add_argument( "--test_file", default="", help="Data for test") args = parser.parse_args() data_utils.prepare_g2p_from_naive_data(args.model_dir,args.train_file, args.valid_file,args.test_file) if __name__ == "__main__": main()
[ 1, 9995, 11042, 18785, 2471, 304, 5706, 1734, 7931, 370, 1070, 583, 515, 1601, 324, 292, 950, 1034, 13364, 1213, 15945, 13, 13, 5215, 1852, 5510, 13, 13, 5215, 848, 29918, 13239, 13, 13, 13, 1753, 1667, 7295, 13, 29871, 13812, 353, 1852, 5510, 29889, 15730, 11726, 29898, 689, 2620, 29918, 1990, 29922, 1191, 5510, 29889, 15730, 24863, 29648, 18522, 29897, 13, 29871, 13812, 29889, 1202, 29918, 23516, 29898, 13, 418, 376, 489, 4299, 29918, 3972, 613, 2322, 543, 6995, 15287, 1965, 29918, 1272, 29914, 613, 1371, 543, 1469, 363, 6694, 1159, 13, 29871, 13812, 29889, 1202, 29918, 23516, 29898, 13, 418, 376, 489, 14968, 29918, 1445, 613, 2322, 543, 6995, 1056, 573, 29918, 1272, 29914, 14968, 613, 1371, 543, 1469, 363, 6694, 1159, 13, 29871, 13812, 29889, 1202, 29918, 23516, 29898, 13, 418, 376, 489, 3084, 29918, 1445, 613, 2322, 543, 613, 1371, 543, 1469, 363, 8845, 1159, 13, 29871, 13812, 29889, 1202, 29918, 23516, 29898, 13, 418, 376, 489, 1688, 29918, 1445, 613, 2322, 543, 613, 1371, 543, 1469, 363, 1243, 1159, 13, 13, 29871, 6389, 353, 13812, 29889, 5510, 29918, 5085, 580, 13, 13, 29871, 848, 29918, 13239, 29889, 19125, 29918, 29887, 29906, 29886, 29918, 3166, 29918, 1056, 573, 29918, 1272, 29898, 5085, 29889, 4299, 29918, 3972, 29892, 5085, 29889, 14968, 29918, 1445, 29892, 6389, 29889, 3084, 29918, 1445, 29892, 5085, 29889, 1688, 29918, 1445, 29897, 13, 13, 361, 4770, 978, 1649, 1275, 376, 1649, 3396, 1649, 1115, 13, 29871, 1667, 580, 13, 2 ]
irlb/irlb.py
WeazelDev/ML_Project
0
124002
import numpy as np import scipy.sparse as sp import warnings #import pdb # Matrix-vector product wrapper # A is a numpy 2d array or matrix, or a scipy matrix or sparse matrix. # x is a numpy vector only. # Compute A.dot(x) if t is False, # A.transpose().dot(x) otherwise. def mult(A, x, t=False): if sp.issparse(A): m = A.shape[0] n = A.shape[1] if(t): return sp.csr_matrix(x).dot(A).transpose().todense().A[:,0] return A.dot(sp.csr_matrix(x).transpose()).todense().A[:,0] if t: return x.dot(A) return A.dot(x) def orthog(Y,X): """Orthogonalize a vector or matrix Y against the columns of the matrix X. This function requires that the column dimension of Y is less than X and that Y and X have the same number of rows. """ dotY = mult(X,Y,t=True) return Y - mult(X,dotY) # Simple utility function used to check linear dependencies during computation: def invcheck(x): eps2 = 2*np.finfo(np.float).eps if(x>eps2): x = 1/x else: x = 0 warnings.warn("Ill-conditioning encountered, result accuracy may be poor") return(x) def tsvd(A,n,tol=0.0001,maxit=50): """Estimate a few of the largest singular values and corresponding singular vectors of matrix using the implicitly restarted Lanczos bidiagonalization method of Baglama and Reichel, see: Augmented Implicitly Restarted Lanczos Bidiagonalization Methods, <NAME> and <NAME>, SIAM J. Sci. Comput. 2005 Keyword arguments: tol -- An estimation tolerance. Smaller means more accurate estimates. maxit -- Maximum number of Lanczos iterations allowed. Given an input matrix A of dimension j * k, and an input desired number of singular values n, the function returns a tuple X with five entries: X[0] A j * nu matrix of estimated left singular vectors. X[1] A vector of length nu of estimated singular values. X[2] A k * nu matrix of estimated right singular vectors. X[3] The number of Lanczos iterations run. X[4] The number of matrix-vector products run. The algorithm estimates the truncated singular value decomposition: A.dot(X[2]) = X[0]*X[1]. """ nu = n m = A.shape[0] n = A.shape[1] if(min(m,n)<2): raise Exception("The input matrix must be at least 2x2.") m_b = min((nu+20, 3*nu, n)) # Working dimension size mprod = 0 it = 0 j = 0 k = nu smax = 1 sparse = sp.issparse(A) V = np.zeros((n,m_b)) W = np.zeros((m,m_b)) F = np.zeros((n,1)) B = np.zeros((m_b,m_b)) V[:,0] = np.random.randn(n) # Initial vector V[:,0] = V[:,0]/np.linalg.norm(V) while(it < maxit): print("Iteration:", it) if(it>0): j=k W[:,j] = mult(A,V[:,j]) mprod+=1 if(it>0): W[:,j] = orthog(W[:,j],W[:,0:j]) # NB W[:,0:j] selects columns 0,1,...,j-1 s = np.linalg.norm(W[:,j]) sinv = invcheck(s) W[:,j] = sinv*W[:,j] # Lanczos process while(j<m_b): F = mult(A,W[:,j],t=True) mprod+=1 F = F - s*V[:,j] F = orthog(F,V[:,0:j+1]) fn = np.linalg.norm(F) fninv= invcheck(fn) F = fninv * F if(j<m_b-1): V[:,j+1] = F B[j,j] = s B[j,j+1] = fn W[:,j+1] = mult(A,V[:,j+1]) mprod+=1 # One step of classical Gram-Schmidt... W[:,j+1] = W[:,j+1] - fn*W[:,j] # ...with full reorthogonalization W[:,j+1] = orthog(W[:,j+1],W[:,0:(j+1)]) s = np.linalg.norm(W[:,j+1]) sinv = invcheck(s) W[:,j+1] = sinv * W[:,j+1] else: B[j,j] = s j+=1 # End of Lanczos process S = np.linalg.svd(B) R = fn * S[0][m_b-1,:] # Residuals if it<1: smax = S[1][0] # Largest Ritz value else: smax = max((S[1][0],smax)) conv = sum(np.abs(R[0:nu]) < tol*smax) if(conv < nu): # Not coverged yet k = max(conv+nu,k) k = min(k,m_b-3) else: break # Update the Ritz vectors V[:,0:k] = V[:,0:m_b].dot(S[2].transpose()[:,0:k]) V[:,k] = F B = np.diag(S[1]) B[0:k,k] = R[0:k] # Update the left approximate singular vectors W[:,0:k] = W[:,0:m_b].dot(S[0][:,0:k]) it+=1 U = W[:,0:m_b].dot(S[0][:,0:nu]) V = V[:,0:m_b].dot(S[2].transpose()[:,0:nu]) return (U,S[1][0:nu],V,it,mprod)
[ 1, 1053, 12655, 408, 7442, 13, 5215, 4560, 2272, 29889, 29879, 5510, 408, 805, 13, 5215, 18116, 13, 29937, 5215, 282, 2585, 13, 13, 13, 29937, 22513, 29899, 8111, 3234, 14476, 13, 29937, 319, 338, 263, 12655, 29871, 29906, 29881, 1409, 470, 4636, 29892, 470, 263, 4560, 2272, 4636, 470, 29234, 4636, 29889, 13, 29937, 921, 338, 263, 12655, 4608, 871, 29889, 13, 29937, 11796, 29872, 319, 29889, 6333, 29898, 29916, 29897, 565, 260, 338, 7700, 29892, 13, 29937, 308, 319, 29889, 3286, 4220, 2141, 6333, 29898, 29916, 29897, 29871, 6467, 29889, 13, 1753, 1773, 29898, 29909, 29892, 921, 29892, 260, 29922, 8824, 1125, 13, 12, 361, 805, 29889, 790, 5510, 29898, 29909, 1125, 13, 12, 12, 29885, 353, 319, 29889, 12181, 29961, 29900, 29962, 13, 12, 12, 29876, 353, 319, 29889, 12181, 29961, 29896, 29962, 13, 12, 12, 361, 29898, 29873, 1125, 13, 12, 12, 12, 2457, 805, 29889, 2395, 29878, 29918, 5344, 29898, 29916, 467, 6333, 29898, 29909, 467, 3286, 4220, 2141, 20034, 1947, 2141, 29909, 7503, 29892, 29900, 29962, 13, 12, 12, 2457, 319, 29889, 6333, 29898, 1028, 29889, 2395, 29878, 29918, 5344, 29898, 29916, 467, 3286, 4220, 16655, 20034, 1947, 2141, 29909, 7503, 29892, 29900, 29962, 13, 12, 361, 260, 29901, 13, 12, 12, 2457, 921, 29889, 6333, 29898, 29909, 29897, 13, 12, 2457, 319, 29889, 6333, 29898, 29916, 29897, 13, 13, 13, 1753, 14219, 468, 29898, 29979, 29892, 29990, 1125, 13, 12, 15945, 29908, 2816, 386, 23419, 675, 263, 4608, 470, 4636, 612, 2750, 278, 4341, 310, 278, 4636, 1060, 29889, 13, 12, 4013, 740, 6858, 393, 278, 1897, 9927, 310, 612, 338, 3109, 1135, 1060, 322, 13, 12, 5747, 612, 322, 1060, 505, 278, 1021, 1353, 310, 4206, 29889, 13, 12, 15945, 29908, 13, 12, 6333, 29979, 353, 1773, 29898, 29990, 29892, 29979, 29892, 29873, 29922, 5574, 29897, 13, 12, 2457, 612, 448, 1773, 29898, 29990, 29892, 6333, 29979, 29897, 13, 13, 29937, 12545, 19725, 740, 1304, 304, 1423, 5608, 9962, 2645, 16287, 29901, 13, 1753, 2437, 3198, 29898, 29916, 1125, 13, 12, 8961, 29906, 29871, 353, 29871, 29906, 29930, 9302, 29889, 29888, 3888, 29898, 9302, 29889, 7411, 467, 8961, 13, 12, 361, 29898, 29916, 29958, 8961, 29906, 1125, 13, 12, 12, 29916, 353, 29871, 29896, 29914, 29916, 13, 12, 2870, 29901, 13, 12, 12, 29916, 353, 29871, 29900, 13, 12, 25442, 886, 29889, 25442, 703, 10002, 29899, 16122, 292, 18169, 29892, 1121, 13600, 1122, 367, 6460, 1159, 13, 12, 2457, 29898, 29916, 29897, 13, 13, 1753, 260, 4501, 29881, 29898, 29909, 29892, 29876, 29892, 25027, 29922, 29900, 29889, 29900, 29900, 29900, 29896, 29892, 3317, 277, 29922, 29945, 29900, 1125, 13, 12, 15945, 29908, 12787, 6490, 263, 2846, 310, 278, 10150, 13512, 1819, 322, 6590, 13512, 13, 12, 345, 14359, 310, 4636, 773, 278, 27063, 10715, 287, 18273, 2067, 359, 289, 8819, 351, 7177, 2133, 13, 12, 5696, 310, 18341, 29880, 3304, 322, 9320, 295, 29892, 1074, 29901, 13, 12, 29909, 688, 358, 287, 14305, 4019, 368, 11654, 442, 287, 18273, 2067, 359, 350, 8819, 351, 7177, 2133, 8108, 29879, 29892, 13, 12, 29966, 5813, 29958, 322, 529, 5813, 10202, 22717, 5194, 435, 29889, 5636, 29889, 11796, 29889, 29871, 29906, 29900, 29900, 29945, 13, 12, 2558, 1742, 6273, 29901, 13, 12, 25027, 259, 1192, 530, 23248, 20341, 749, 29889, 4116, 12572, 2794, 901, 16232, 21875, 29889, 13, 12, 3317, 277, 1192, 5918, 12539, 1353, 310, 18273, 2067, 359, 24372, 6068, 29889, 13, 12, 29954, 5428, 385, 1881, 4636, 319, 310, 9927, 432, 334, 413, 29892, 322, 385, 1881, 7429, 1353, 13, 12, 974, 13512, 1819, 302, 29892, 278, 740, 3639, 263, 18761, 1060, 411, 5320, 9976, 29901, 13, 12, 29990, 29961, 29900, 29962, 319, 432, 334, 4948, 4636, 310, 15899, 2175, 13512, 12047, 29889, 13, 12, 29990, 29961, 29896, 29962, 319, 4608, 310, 3309, 4948, 310, 15899, 13512, 1819, 29889, 13, 12, 29990, 29961, 29906, 29962, 319, 413, 334, 4948, 4636, 310, 15899, 1492, 13512, 12047, 29889, 13, 12, 29990, 29961, 29941, 29962, 450, 1353, 310, 18273, 2067, 359, 24372, 1065, 29889, 13, 12, 29990, 29961, 29946, 29962, 450, 1353, 310, 4636, 29899, 8111, 9316, 1065, 29889, 13, 12, 1576, 5687, 21875, 278, 21022, 630, 13512, 995, 26227, 29901, 13, 12, 29909, 29889, 6333, 29898, 29990, 29961, 29906, 2314, 353, 1060, 29961, 29900, 14178, 29990, 29961, 29896, 1822, 13, 12, 15945, 29908, 13, 12, 3433, 268, 353, 302, 13, 12, 29885, 418, 353, 319, 29889, 12181, 29961, 29900, 29962, 13, 12, 29876, 418, 353, 319, 29889, 12181, 29961, 29896, 29962, 13, 12, 361, 29898, 1195, 29898, 29885, 29892, 29876, 29897, 29966, 29906, 1125, 13, 12, 12, 22692, 8960, 703, 1576, 1881, 4636, 1818, 367, 472, 3203, 29871, 29906, 29916, 29906, 23157, 13, 12, 29885, 29918, 29890, 1678, 353, 1375, 3552, 3433, 29974, 29906, 29900, 29892, 29871, 29941, 29930, 3433, 29892, 302, 876, 29871, 396, 24176, 9927, 2159, 13, 12, 29885, 10633, 29871, 353, 29871, 29900, 13, 12, 277, 268, 353, 29871, 29900, 13, 12, 29926, 418, 353, 29871, 29900, 13, 12, 29895, 418, 353, 4948, 13, 12, 29879, 3317, 259, 353, 29871, 29896, 13, 12, 29879, 5510, 353, 805, 29889, 790, 5510, 29898, 29909, 29897, 13, 13, 12, 29963, 29871, 353, 7442, 29889, 3298, 359, 3552, 29876, 29892, 29885, 29918, 29890, 876, 13, 12, 29956, 29871, 353, 7442, 29889, 3298, 359, 3552, 29885, 29892, 29885, 29918, 29890, 876, 13, 12, 29943, 29871, 353, 7442, 29889, 3298, 359, 3552, 29876, 29892, 29896, 876, 13, 12, 29933, 29871, 353, 7442, 29889, 3298, 359, 3552, 29885, 29918, 29890, 29892, 29885, 29918, 29890, 876, 13, 13, 12, 29963, 7503, 29892, 29900, 29962, 29871, 353, 7442, 29889, 8172, 29889, 9502, 29876, 29898, 29876, 29897, 396, 17250, 4608, 13, 12, 29963, 7503, 29892, 29900, 29962, 29871, 353, 478, 7503, 29892, 29900, 16261, 9302, 29889, 29880, 979, 29887, 29889, 12324, 29898, 29963, 29897, 13, 13, 12, 8000, 29898, 277, 529, 4236, 277, 1125, 13, 12, 12, 2158, 703, 13463, 362, 29901, 613, 372, 29897, 13, 12, 12, 361, 29898, 277, 29958, 29900, 1125, 432, 29922, 29895, 13, 12, 12, 29956, 7503, 29892, 29926, 29962, 353, 1773, 29898, 29909, 29892, 29963, 7503, 29892, 29926, 2314, 13, 12, 12, 29885, 10633, 23661, 29896, 13, 12, 12, 361, 29898, 277, 29958, 29900, 1125, 13, 12, 12, 12, 29956, 7503, 29892, 29926, 29962, 353, 14219, 468, 29898, 29956, 7503, 29892, 29926, 1402, 29956, 7503, 29892, 29900, 29901, 29926, 2314, 396, 405, 29933, 399, 7503, 29892, 29900, 29901, 29926, 29962, 27778, 4341, 29871, 29900, 29892, 29896, 27062, 29926, 29899, 29896, 13, 12, 12, 29879, 353, 7442, 29889, 29880, 979, 29887, 29889, 12324, 29898, 29956, 7503, 29892, 29926, 2314, 13, 12, 12, 5223, 29894, 353, 2437, 3198, 29898, 29879, 29897, 13, 12, 12, 29956, 7503, 29892, 29926, 29962, 353, 4457, 29894, 29930, 29956, 7503, 29892, 29926, 29962, 13, 12, 12, 29937, 18273, 2067, 359, 1889, 13, 12, 12, 8000, 29898, 29926, 29966, 29885, 29918, 29890, 1125, 13, 12, 12, 12, 29943, 353, 1773, 29898, 29909, 29892, 29956, 7503, 29892, 29926, 1402, 29873, 29922, 5574, 29897, 13, 12, 12, 12, 29885, 10633, 23661, 29896, 13, 12, 12, 12, 29943, 353, 383, 448, 269, 29930, 29963, 7503, 29892, 29926, 29962, 13, 12, 12, 12, 29943, 353, 14219, 468, 29898, 29943, 29892, 29963, 7503, 29892, 29900, 29901, 29926, 29974, 29896, 2314, 13, 12, 12, 12, 9144, 353, 7442, 29889, 29880, 979, 29887, 29889, 12324, 29898, 29943, 29897, 13, 12, 12, 12, 9144, 11569, 29922, 2437, 3198, 29898, 9144, 29897, 13, 12, 12, 12, 29943, 29871, 353, 7876, 11569, 334, 383, 13, 12, 12, 12, 361, 29898, 29926, 29966, 29885, 29918, 29890, 29899, 29896, 1125, 13, 12, 12, 12, 12, 29963, 7503, 29892, 29926, 29974, 29896, 29962, 353, 383, 13, 12, 12, 12, 12, 29933, 29961, 29926, 29892, 29926, 29962, 353, 269, 13, 12, 12, 12, 12, 29933, 29961, 29926, 29892, 29926, 29974, 29896, 29962, 353, 7876, 13, 12, 12, 12, 12, 29956, 7503, 29892, 29926, 29974, 29896, 29962, 353, 1773, 29898, 29909, 29892, 29963, 7503, 29892, 29926, 29974, 29896, 2314, 13, 12, 12, 12, 12, 29885, 10633, 23661, 29896, 13, 12, 12, 12, 12, 29937, 3118, 4331, 310, 14499, 16878, 29899, 4504, 19720, 856, 13, 12, 12, 12, 12, 29956, 7503, 29892, 29926, 29974, 29896, 29962, 353, 399, 7503, 29892, 29926, 29974, 29896, 29962, 448, 7876, 29930, 29956, 7503, 29892, 29926, 29962, 13, 12, 12, 12, 12, 29937, 2023, 2541, 2989, 337, 2072, 23419, 2133, 13, 12, 12, 12, 12, 29956, 7503, 29892, 29926, 29974, 29896, 29962, 353, 14219, 468, 29898, 29956, 7503, 29892, 29926, 29974, 29896, 1402, 29956, 7503, 29892, 29900, 5919, 29926, 29974, 29896, 29897, 2314, 13, 12, 12, 12, 12, 29879, 353, 7442, 29889, 29880, 979, 29887, 29889, 12324, 29898, 29956, 7503, 29892, 29926, 29974, 29896, 2314, 13, 12, 12, 12, 12, 5223, 29894, 353, 2437, 3198, 29898, 29879, 29897, 13, 12, 12, 12, 12, 29956, 7503, 29892, 29926, 29974, 29896, 29962, 353, 4457, 29894, 334, 399, 7503, 29892, 29926, 29974, 29896, 29962, 13, 12, 12, 12, 2870, 29901, 13, 12, 12, 12, 12, 29933, 29961, 29926, 29892, 29926, 29962, 353, 269, 13, 12, 12, 12, 29926, 23661, 29896, 13, 12, 12, 29937, 2796, 310, 18273, 2067, 359, 1889, 13, 12, 12, 29903, 353, 7442, 29889, 29880, 979, 29887, 29889, 4501, 29881, 29898, 29933, 29897, 13, 12, 12, 29934, 353, 7876, 334, 317, 29961, 29900, 3816, 29885, 29918, 29890, 29899, 29896, 29892, 17531, 396, 2538, 333, 27101, 13, 12, 12, 361, 372, 29966, 29896, 29901, 13, 12, 12, 12, 29879, 3317, 353, 317, 29961, 29896, 3816, 29900, 29962, 29871, 396, 365, 1191, 342, 390, 2784, 995, 13, 12, 12, 2870, 29901, 13, 12, 12, 12, 29879, 3317, 353, 4236, 3552, 29903, 29961, 29896, 3816, 29900, 1402, 29879, 3317, 876, 13, 13, 12, 12, 20580, 353, 2533, 29898, 9302, 29889, 6897, 29898, 29934, 29961, 29900, 29901, 3433, 2314, 529, 304, 29880, 29930, 29879, 3317, 29897, 13, 12, 12, 361, 29898, 20580, 529, 4948, 1125, 29871, 396, 2216, 4612, 3192, 3447, 13, 12, 12, 12, 29895, 353, 4236, 29898, 20580, 29974, 3433, 29892, 29895, 29897, 13, 12, 12, 12, 29895, 353, 1375, 29898, 29895, 29892, 29885, 29918, 29890, 29899, 29941, 29897, 13, 12, 12, 2870, 29901, 13, 12, 12, 12, 8690, 13, 12, 12, 29937, 10318, 278, 390, 2784, 12047, 13, 12, 12, 29963, 7503, 29892, 29900, 29901, 29895, 29962, 353, 478, 7503, 29892, 29900, 29901, 29885, 29918, 29890, 1822, 6333, 29898, 29903, 29961, 29906, 1822, 3286, 4220, 580, 7503, 29892, 29900, 29901, 29895, 2314, 13, 12, 12, 29963, 7503, 29892, 29895, 29962, 353, 383, 13, 12, 12, 29933, 353, 7442, 29889, 6051, 351, 29898, 29903, 29961, 29896, 2314, 13, 12, 12, 29933, 29961, 29900, 29901, 29895, 29892, 29895, 29962, 353, 390, 29961, 29900, 29901, 29895, 29962, 13, 12, 12, 29937, 10318, 278, 2175, 26368, 13512, 12047, 13, 12, 12, 29956, 7503, 29892, 29900, 29901, 29895, 29962, 353, 399, 7503, 29892, 29900, 29901, 29885, 29918, 29890, 1822, 6333, 29898, 29903, 29961, 29900, 3816, 29901, 29892, 29900, 29901, 29895, 2314, 13, 12, 12, 277, 23661, 29896, 13, 13, 12, 29965, 353, 399, 7503, 29892, 29900, 29901, 29885, 29918, 29890, 1822, 6333, 29898, 29903, 29961, 29900, 3816, 29901, 29892, 29900, 29901, 3433, 2314, 13, 12, 29963, 353, 478, 7503, 29892, 29900, 29901, 29885, 29918, 29890, 1822, 6333, 29898, 29903, 29961, 29906, 1822, 3286, 4220, 580, 7503, 29892, 29900, 29901, 3433, 2314, 13, 12, 2457, 313, 29965, 29892, 29903, 29961, 29896, 3816, 29900, 29901, 3433, 1402, 29963, 29892, 277, 29892, 29885, 10633, 29897, 2 ]
messaging/kombu_brighter/kombu_messaging.py
iancooper/RpcIsEvil
0
24270
"""" File : kombu_messaging.py Author : ian Created : 09-28-2016 Last Modified By : ian Last Modified On : 09-28-2016 *********************************************************************** The MIT License (MIT) Copyright © 2016 <NAME> <<EMAIL>> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **********************************************************************i* """ from kombu.message import Message as Message from core.messaging import BrightsideMessage, BrightsideMessageHeader, BrightsideMessageBody, BrightsideMessageType from core.exceptions import MessagingException from uuid import UUID, uuid4 from typing import Dict import re import codecs message_type_header = "MessageType" message_id_header = "MessageId" message_correlation_id_header = "CorrelationId" message_topic_name_header = "Topic" message_handled_count_header = "HandledCount" message_delay_milliseconds_header = "x-delay" message_delayed_milliseconds_header = "x-delay" message_original_message_id_header = "x-original-message-id" message_delivery_tag_header = "DeliveryTag" # See http://stackoverflow.com/questions/4020539/process-escape-sequences-in-a-string-in-python ESCAPE_SEQUENCE_RE = re.compile(r''' ( \\U........ # 8-digit hex escapes | \\u.... # 4-digit hex escapes | \\x.. # 2-digit hex escapes | \\[0-7]{1,3} # Octal escapes | \\N\{[^}]+\} # Unicode characters by name | \\[\\'"abfnrtv] # Single-character escapes )''', re.UNICODE | re.VERBOSE) def decode_escapes(s): def decode_match(match): return codecs.decode(match.group(0), 'unicode-escape') return ESCAPE_SEQUENCE_RE.sub(decode_match, s) class ReadError: def __init__(self, error_message: str) -> None: self.error_message = error_message def __str__(self) -> str: return self.error_message class BrightsideMessageFactory: """ The message factory turn an 'on-the-wire' message into our internal representation. We try to be as tolerant as possible (following Postel's Law: https://en.wikipedia.org/wiki/Robustness_principle) Be conservative in what you do, be liberal in what you accept """ def __init__(self): self._has_read_errors = False def create_message(self, message: Message) -> BrightsideMessage: self._has_read_errors = False def _get_correlation_id() -> UUID: header, err = self._read_header(message_correlation_id_header, message) if err is None: return UUID(header) else: self._has_read_errors = True return "" def _get_message_id() -> UUID: header, err = self._read_header(message_id_header, message) if err is None: return UUID(header) else: self._has_read_errors = True return uuid4() def _get_message_type() -> BrightsideMessageType: header, err = self._read_header(message_type_header, message) if err is None: return BrightsideMessageType(header) else: self._has_read_errors = True return BrightsideMessageType.unacceptable def _get_payload() -> str: body, err = self._read_payload(message) if err is None: return body else: self._has_read_errors = True return "" def _get_payload_type() -> str: payload_type, err = self._read_payload_type(message) if err is None: return payload_type else: self._has_read_errors = True return "" def _get_topic() -> str: header, err = self._read_header(message_topic_name_header, message) if err is None: return header else: self._has_read_errors = True return "" message_id = _get_message_id() topic = _get_topic() message_type = _get_message_type() if not message.errors or self._has_read_errors else BrightsideMessageType.unacceptable correlation_id = _get_correlation_id() payload = _get_payload() payload_type = _get_payload_type() message_header = BrightsideMessageHeader(identity=message_id, topic=topic, message_type=message_type, correlation_id=correlation_id, content_type="json") message_body = BrightsideMessageBody(body=payload, body_type=payload_type) return BrightsideMessage(message_header, message_body) # All of these methods are warned as static, implies they should be helper classes that take state in constructor def _read_header(self, header_key: str, message: Message) -> (str, ReadError): if header_key not in message.headers.keys(): return "", ReadError("Could not read header with key: {}".format(header_key)) else: return message.headers.get(header_key), None def _read_payload(self, message: Message) -> (str, ReadError): if not message.errors: body_text = decode_escapes(message.body) return body_text[1:-1], None else: errors = ", ".join(message.errors) return "", ReadError("Could not parse message. Errors: {}".format(errors)) def _read_payload_type(self, message: Message) -> (str, ReadError): if not message.errors: return message.content_type, None else: errors = ", ".join(message.errors) return "", ReadError("Could not read payload type. Errors: {}".format(errors)) class KombuMessageFactory(): def __init__(self, message: BrightsideMessage) -> None: self._message = message def create_message_header(self) -> Dict: def _add_correlation_id(brightstide_message_header: Dict, correlation_id: UUID) -> None: if correlation_id is not None: brightstide_message_header[message_correlation_id_header] = correlation_id def _add_message_id(brightside_message_header: Dict, identity: UUID) -> None: if identity is None: raise MessagingException("Missing id on message, this is a required field") brightside_message_header[message_id_header] = identity def _add_message_type(brightside_message_header: Dict, brightside_message_type: BrightsideMessageType) -> None: if brightside_message_type is None: raise MessagingException("Missing type on message, this is a required field") brightside_message_header[message_type_header] = brightside_message_type header = {} _add_message_id(header, str(self._message.header.id)) _add_message_type(header, self._message.header.message_type.value) _add_correlation_id(header, str(self._message.header.correlation_id)) return header
[ 1, 9995, 29908, 13, 2283, 308, 584, 4677, 2423, 29918, 12062, 6751, 29889, 2272, 13, 13720, 965, 584, 474, 273, 13, 20399, 3986, 584, 29871, 29900, 29929, 29899, 29906, 29947, 29899, 29906, 29900, 29896, 29953, 13, 8897, 3382, 2164, 2648, 584, 474, 273, 13, 8897, 3382, 2164, 1551, 584, 29871, 29900, 29929, 29899, 29906, 29947, 29899, 29906, 29900, 29896, 29953, 13, 7775, 7775, 7775, 7775, 2328, 17435, 13, 1576, 341, 1806, 19245, 313, 26349, 29897, 13, 11882, 1266, 29871, 30211, 29871, 29906, 29900, 29896, 29953, 529, 5813, 29958, 3532, 26862, 6227, 6778, 13, 27293, 338, 1244, 1609, 16896, 29892, 3889, 310, 8323, 29892, 304, 738, 2022, 4017, 292, 263, 3509, 13, 974, 445, 7047, 322, 6942, 5106, 2066, 313, 1552, 1346, 6295, 14093, 30024, 511, 304, 5376, 13, 262, 278, 18540, 1728, 24345, 29892, 3704, 1728, 29485, 278, 10462, 13, 517, 671, 29892, 3509, 29892, 6623, 29892, 10366, 29892, 9805, 29892, 1320, 2666, 29892, 269, 803, 1947, 29892, 322, 29914, 272, 19417, 13, 9708, 583, 310, 278, 18540, 29892, 322, 304, 14257, 12407, 304, 6029, 278, 18540, 338, 13, 29888, 595, 3276, 304, 437, 577, 29892, 4967, 304, 278, 1494, 5855, 29901, 13, 13, 1576, 2038, 3509, 1266, 8369, 322, 445, 10751, 8369, 4091, 367, 5134, 297, 13, 497, 14591, 470, 23228, 2011, 1080, 310, 278, 18540, 29889, 13, 13, 28350, 7791, 7818, 12982, 1525, 8519, 13756, 13044, 3352, 1346, 3289, 8519, 9363, 399, 1806, 8187, 2692, 399, 1718, 29934, 13566, 29979, 8079, 13764, 29979, 476, 22255, 29892, 8528, 15094, 1799, 6323, 13, 29902, 3580, 5265, 3352, 29892, 2672, 6154, 15789, 4214, 350, 2692, 6058, 27848, 3352, 7495, 6093, 399, 1718, 29934, 13566, 29059, 8079, 341, 1001, 3210, 13566, 2882, 6227, 11937, 29892, 13, 29943, 1806, 8186, 1799, 15842, 319, 349, 8322, 2965, 13309, 1718, 349, 4574, 13152, 1660, 5300, 405, 1164, 1177, 15860, 1177, 1692, 13780, 29889, 2672, 11698, 382, 29963, 3919, 24972, 9818, 6093, 13, 20656, 29950, 24125, 6323, 315, 4590, 29979, 22789, 3912, 379, 5607, 8032, 29903, 20700, 17705, 6181, 15842, 13764, 29979, 315, 4375, 7833, 29892, 21330, 1529, 1692, 29903, 6323, 438, 29911, 4448, 13, 5265, 2882, 6227, 11937, 29892, 12317, 2544, 4448, 2672, 13764, 319, 9838, 8079, 8707, 29911, 4717, 1783, 29892, 323, 8476, 6323, 438, 29911, 4448, 22119, 1660, 29892, 9033, 3235, 4214, 3895, 29892, 13, 12015, 8079, 6323, 2672, 8707, 8186, 9838, 22659, 6093, 7791, 7818, 12982, 1525, 6323, 6093, 501, 1660, 6323, 438, 29911, 4448, 5012, 1964, 4214, 29903, 2672, 13, 28350, 7791, 7818, 12982, 1525, 29889, 13, 7775, 7775, 7775, 7775, 2328, 1068, 29875, 29930, 13, 15945, 29908, 13, 3166, 4677, 2423, 29889, 4906, 1053, 7777, 408, 7777, 13, 3166, 7136, 29889, 12062, 6751, 1053, 29258, 2975, 3728, 29892, 29258, 2975, 3728, 7850, 29892, 29258, 2975, 3728, 8434, 29892, 29258, 2975, 3728, 1542, 13, 3166, 7136, 29889, 11739, 29879, 1053, 11946, 6751, 2451, 13, 3166, 318, 5416, 1053, 501, 11150, 29892, 318, 5416, 29946, 13, 3166, 19229, 1053, 360, 919, 13, 5215, 337, 13, 5215, 775, 2395, 13, 13, 4906, 29918, 1853, 29918, 6672, 353, 376, 3728, 1542, 29908, 13, 4906, 29918, 333, 29918, 6672, 353, 376, 3728, 1204, 29908, 13, 4906, 29918, 2616, 23445, 29918, 333, 29918, 6672, 353, 376, 12521, 23445, 1204, 29908, 13, 4906, 29918, 13010, 29918, 978, 29918, 6672, 353, 376, 7031, 293, 29908, 13, 4906, 29918, 3179, 839, 29918, 2798, 29918, 6672, 353, 376, 3481, 839, 3981, 29908, 13, 4906, 29918, 18829, 29918, 19958, 21462, 29918, 6672, 353, 376, 29916, 29899, 18829, 29908, 13, 4906, 29918, 18829, 287, 29918, 19958, 21462, 29918, 6672, 353, 376, 29916, 29899, 18829, 29908, 13, 4906, 29918, 13492, 29918, 4906, 29918, 333, 29918, 6672, 353, 376, 29916, 29899, 13492, 29899, 4906, 29899, 333, 29908, 13, 4906, 29918, 29881, 27657, 29918, 4039, 29918, 6672, 353, 376, 29928, 27657, 8176, 29908, 13, 13, 29937, 2823, 1732, 597, 2417, 29889, 510, 29914, 2619, 29914, 29946, 29900, 29906, 29900, 29945, 29941, 29929, 29914, 5014, 29899, 21587, 29899, 6831, 2063, 29899, 262, 29899, 29874, 29899, 1807, 29899, 262, 29899, 4691, 13, 2890, 29907, 3301, 29923, 29918, 1660, 13356, 1430, 4741, 29918, 1525, 353, 337, 29889, 12198, 29898, 29878, 12008, 13, 1678, 313, 2474, 29965, 11296, 418, 396, 29871, 29947, 29899, 26204, 15090, 3966, 11603, 13, 1678, 891, 2474, 29884, 3045, 3986, 396, 29871, 29946, 29899, 26204, 15090, 3966, 11603, 13, 1678, 891, 2474, 29916, 636, 9651, 396, 29871, 29906, 29899, 26204, 15090, 3966, 11603, 13, 1678, 891, 2474, 29961, 29900, 29899, 29955, 3199, 29896, 29892, 29941, 29913, 268, 396, 4756, 284, 3966, 11603, 13, 1678, 891, 2474, 29940, 10045, 22896, 6525, 3124, 29913, 268, 396, 23862, 4890, 491, 1024, 13, 1678, 891, 2474, 29961, 1966, 11838, 370, 9144, 2273, 29894, 29962, 29871, 396, 16740, 29899, 18609, 3966, 11603, 13, 1678, 1723, 4907, 742, 337, 29889, 3904, 2965, 29949, 2287, 891, 337, 29889, 5348, 8456, 1660, 29897, 13, 13, 13, 1753, 21822, 29918, 267, 5030, 267, 29898, 29879, 1125, 13, 1678, 822, 21822, 29918, 4352, 29898, 4352, 1125, 13, 4706, 736, 775, 2395, 29889, 13808, 29898, 4352, 29889, 2972, 29898, 29900, 511, 525, 2523, 356, 29899, 21587, 1495, 13, 13, 1678, 736, 382, 7187, 3301, 29923, 29918, 1660, 13356, 1430, 4741, 29918, 1525, 29889, 1491, 29898, 13808, 29918, 4352, 29892, 269, 29897, 13, 13, 13, 1990, 7523, 2392, 29901, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 1059, 29918, 4906, 29901, 851, 29897, 1599, 6213, 29901, 13, 4706, 1583, 29889, 2704, 29918, 4906, 353, 1059, 29918, 4906, 13, 13, 1678, 822, 4770, 710, 12035, 1311, 29897, 1599, 851, 29901, 13, 4706, 736, 1583, 29889, 2704, 29918, 4906, 13, 13, 13, 1990, 29258, 2975, 3728, 5126, 29901, 13, 1678, 9995, 13, 1678, 450, 2643, 12529, 2507, 385, 525, 265, 29899, 1552, 29899, 22376, 29915, 2643, 964, 1749, 7463, 8954, 29889, 1334, 1018, 304, 367, 408, 13, 1678, 20341, 424, 408, 1950, 313, 23031, 292, 4918, 295, 29915, 29879, 7927, 29901, 2045, 597, 264, 29889, 6011, 29889, 990, 29914, 4594, 29914, 21860, 504, 2264, 29918, 558, 2173, 552, 29897, 1522, 8976, 1230, 13, 1678, 297, 825, 366, 437, 29892, 367, 26054, 297, 825, 366, 3544, 13, 1678, 9995, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 1125, 13, 4706, 1583, 3032, 5349, 29918, 949, 29918, 12523, 353, 7700, 13, 13, 1678, 822, 1653, 29918, 4906, 29898, 1311, 29892, 2643, 29901, 7777, 29897, 1599, 29258, 2975, 3728, 29901, 13, 13, 4706, 1583, 3032, 5349, 29918, 949, 29918, 12523, 353, 7700, 13, 13, 4706, 822, 903, 657, 29918, 2616, 23445, 29918, 333, 580, 1599, 501, 11150, 29901, 13, 9651, 4839, 29892, 4589, 353, 1583, 3032, 949, 29918, 6672, 29898, 4906, 29918, 2616, 23445, 29918, 333, 29918, 6672, 29892, 2643, 29897, 13, 9651, 565, 4589, 338, 6213, 29901, 13, 18884, 736, 501, 11150, 29898, 6672, 29897, 13, 9651, 1683, 29901, 13, 18884, 1583, 3032, 5349, 29918, 949, 29918, 12523, 353, 5852, 13, 18884, 736, 5124, 13, 13, 4706, 822, 903, 657, 29918, 4906, 29918, 333, 580, 1599, 501, 11150, 29901, 13, 9651, 4839, 29892, 4589, 353, 1583, 3032, 949, 29918, 6672, 29898, 4906, 29918, 333, 29918, 6672, 29892, 2643, 29897, 13, 9651, 565, 4589, 338, 6213, 29901, 13, 18884, 736, 501, 11150, 29898, 6672, 29897, 13, 9651, 1683, 29901, 13, 18884, 1583, 3032, 5349, 29918, 949, 29918, 12523, 353, 5852, 13, 18884, 736, 318, 5416, 29946, 580, 13, 13, 4706, 822, 903, 657, 29918, 4906, 29918, 1853, 580, 1599, 29258, 2975, 3728, 1542, 29901, 13, 9651, 4839, 29892, 4589, 353, 1583, 3032, 949, 29918, 6672, 29898, 4906, 29918, 1853, 29918, 6672, 29892, 2643, 29897, 13, 9651, 565, 4589, 338, 6213, 29901, 13, 18884, 736, 29258, 2975, 3728, 1542, 29898, 6672, 29897, 13, 9651, 1683, 29901, 13, 18884, 1583, 3032, 5349, 29918, 949, 29918, 12523, 353, 5852, 13, 18884, 736, 29258, 2975, 3728, 1542, 29889, 348, 16044, 519, 13, 13, 4706, 822, 903, 657, 29918, 23813, 580, 1599, 851, 29901, 13, 9651, 3573, 29892, 4589, 353, 1583, 3032, 949, 29918, 23813, 29898, 4906, 29897, 13, 9651, 565, 4589, 338, 6213, 29901, 13, 18884, 736, 3573, 13, 9651, 1683, 29901, 13, 18884, 1583, 3032, 5349, 29918, 949, 29918, 12523, 353, 5852, 13, 18884, 736, 5124, 13, 13, 4706, 822, 903, 657, 29918, 23813, 29918, 1853, 580, 1599, 851, 29901, 13, 9651, 20092, 29918, 1853, 29892, 4589, 353, 1583, 3032, 949, 29918, 23813, 29918, 1853, 29898, 4906, 29897, 13, 9651, 565, 4589, 338, 6213, 29901, 13, 18884, 736, 20092, 29918, 1853, 13, 9651, 1683, 29901, 13, 18884, 1583, 3032, 5349, 29918, 949, 29918, 12523, 353, 5852, 13, 18884, 736, 5124, 13, 13, 4706, 822, 903, 657, 29918, 13010, 580, 1599, 851, 29901, 13, 9651, 4839, 29892, 4589, 353, 1583, 3032, 949, 29918, 6672, 29898, 4906, 29918, 13010, 29918, 978, 29918, 6672, 29892, 2643, 29897, 13, 9651, 565, 4589, 338, 6213, 29901, 13, 18884, 736, 4839, 13, 9651, 1683, 29901, 13, 18884, 1583, 3032, 5349, 29918, 949, 29918, 12523, 353, 5852, 13, 18884, 736, 5124, 13, 13, 4706, 2643, 29918, 333, 353, 903, 657, 29918, 4906, 29918, 333, 580, 13, 4706, 11261, 353, 903, 657, 29918, 13010, 580, 13, 4706, 2643, 29918, 1853, 353, 903, 657, 29918, 4906, 29918, 1853, 580, 565, 451, 2643, 29889, 12523, 470, 1583, 3032, 5349, 29918, 949, 29918, 12523, 1683, 29258, 2975, 3728, 1542, 29889, 348, 16044, 519, 13, 4706, 19869, 29918, 333, 353, 903, 657, 29918, 2616, 23445, 29918, 333, 580, 13, 4706, 20092, 353, 903, 657, 29918, 23813, 580, 13, 4706, 20092, 29918, 1853, 353, 903, 657, 29918, 23813, 29918, 1853, 580, 13, 13, 4706, 2643, 29918, 6672, 353, 29258, 2975, 3728, 7850, 29898, 22350, 29922, 4906, 29918, 333, 29892, 11261, 29922, 13010, 29892, 2643, 29918, 1853, 29922, 4906, 29918, 1853, 29892, 13, 462, 462, 462, 19869, 29918, 333, 29922, 2616, 23445, 29918, 333, 29892, 2793, 29918, 1853, 543, 3126, 1159, 13, 13, 4706, 2643, 29918, 2587, 353, 29258, 2975, 3728, 8434, 29898, 2587, 29922, 23813, 29892, 3573, 29918, 1853, 29922, 23813, 29918, 1853, 29897, 13, 13, 4706, 736, 29258, 2975, 3728, 29898, 4906, 29918, 6672, 29892, 2643, 29918, 2587, 29897, 13, 13, 1678, 396, 2178, 310, 1438, 3519, 526, 1370, 9571, 408, 2294, 29892, 10469, 896, 881, 367, 16876, 4413, 393, 2125, 2106, 297, 5823, 13, 13, 1678, 822, 903, 949, 29918, 6672, 29898, 1311, 29892, 4839, 29918, 1989, 29901, 851, 29892, 2643, 29901, 7777, 29897, 1599, 313, 710, 29892, 7523, 2392, 1125, 13, 4706, 565, 4839, 29918, 1989, 451, 297, 2643, 29889, 13662, 29889, 8149, 7295, 13, 9651, 736, 12633, 7523, 2392, 703, 23323, 451, 1303, 4839, 411, 1820, 29901, 6571, 1642, 4830, 29898, 6672, 29918, 1989, 876, 13, 4706, 1683, 29901, 13, 9651, 736, 2643, 29889, 13662, 29889, 657, 29898, 6672, 29918, 1989, 511, 6213, 13, 13, 1678, 822, 903, 949, 29918, 23813, 29898, 1311, 29892, 2643, 29901, 7777, 29897, 1599, 313, 710, 29892, 7523, 2392, 1125, 13, 4706, 565, 451, 2643, 29889, 12523, 29901, 13, 9651, 3573, 29918, 726, 353, 21822, 29918, 267, 5030, 267, 29898, 4906, 29889, 2587, 29897, 13, 9651, 736, 3573, 29918, 726, 29961, 29896, 13018, 29896, 1402, 6213, 13, 4706, 1683, 29901, 13, 9651, 4436, 353, 9162, 11393, 7122, 29898, 4906, 29889, 12523, 29897, 13, 9651, 736, 12633, 7523, 2392, 703, 23323, 451, 6088, 2643, 29889, 4829, 29879, 29901, 6571, 1642, 4830, 29898, 12523, 876, 13, 13, 1678, 822, 903, 949, 29918, 23813, 29918, 1853, 29898, 1311, 29892, 2643, 29901, 7777, 29897, 1599, 313, 710, 29892, 7523, 2392, 1125, 13, 4706, 565, 451, 2643, 29889, 12523, 29901, 13, 9651, 736, 2643, 29889, 3051, 29918, 1853, 29892, 6213, 13, 4706, 1683, 29901, 13, 9651, 4436, 353, 9162, 11393, 7122, 29898, 4906, 29889, 12523, 29897, 13, 9651, 736, 12633, 7523, 2392, 703, 23323, 451, 1303, 20092, 1134, 29889, 4829, 29879, 29901, 6571, 1642, 4830, 29898, 12523, 876, 13, 13, 13, 1990, 7107, 2423, 3728, 5126, 7295, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 2643, 29901, 29258, 2975, 3728, 29897, 1599, 6213, 29901, 13, 4706, 1583, 3032, 4906, 353, 2643, 13, 13, 1678, 822, 1653, 29918, 4906, 29918, 6672, 29898, 1311, 29897, 1599, 360, 919, 29901, 13, 13, 4706, 822, 903, 1202, 29918, 2616, 23445, 29918, 333, 29898, 1182, 523, 303, 680, 29918, 4906, 29918, 6672, 29901, 360, 919, 29892, 19869, 29918, 333, 29901, 501, 11150, 29897, 1599, 6213, 29901, 13, 9651, 565, 19869, 29918, 333, 338, 451, 6213, 29901, 13, 18884, 11785, 303, 680, 29918, 4906, 29918, 6672, 29961, 4906, 29918, 2616, 23445, 29918, 333, 29918, 6672, 29962, 353, 19869, 29918, 333, 13, 13, 4706, 822, 903, 1202, 29918, 4906, 29918, 333, 29898, 1182, 523, 2975, 29918, 4906, 29918, 6672, 29901, 360, 919, 29892, 10110, 29901, 501, 11150, 29897, 1599, 6213, 29901, 13, 9651, 565, 10110, 338, 6213, 29901, 13, 18884, 12020, 11946, 6751, 2451, 703, 18552, 292, 1178, 373, 2643, 29892, 445, 338, 263, 3734, 1746, 1159, 13, 9651, 11785, 2975, 29918, 4906, 29918, 6672, 29961, 4906, 29918, 333, 29918, 6672, 29962, 353, 10110, 13, 13, 4706, 822, 903, 1202, 29918, 4906, 29918, 1853, 29898, 1182, 523, 2975, 29918, 4906, 29918, 6672, 29901, 360, 919, 29892, 11785, 2975, 29918, 4906, 29918, 1853, 29901, 29258, 2975, 3728, 1542, 29897, 1599, 6213, 29901, 13, 9651, 565, 11785, 2975, 29918, 4906, 29918, 1853, 338, 6213, 29901, 13, 18884, 12020, 11946, 6751, 2451, 703, 18552, 292, 1134, 373, 2643, 29892, 445, 338, 263, 3734, 1746, 1159, 13, 9651, 11785, 2975, 29918, 4906, 29918, 6672, 29961, 4906, 29918, 1853, 29918, 6672, 29962, 353, 11785, 2975, 29918, 4906, 29918, 1853, 13, 13, 4706, 4839, 353, 6571, 13, 4706, 903, 1202, 29918, 4906, 29918, 333, 29898, 6672, 29892, 851, 29898, 1311, 3032, 4906, 29889, 6672, 29889, 333, 876, 13, 4706, 903, 1202, 29918, 4906, 29918, 1853, 29898, 6672, 29892, 1583, 3032, 4906, 29889, 6672, 29889, 4906, 29918, 1853, 29889, 1767, 29897, 13, 4706, 903, 1202, 29918, 2616, 23445, 29918, 333, 29898, 6672, 29892, 851, 29898, 1311, 3032, 4906, 29889, 6672, 29889, 2616, 23445, 29918, 333, 876, 13, 13, 4706, 736, 4839, 13, 2 ]
apps/materialPlanning/models.py
yhkl-dev/JAutoOps
0
76466
from django.db import models from django.contrib.auth import get_user_model from material.models import MaterialModel, MaterialGroup, Plant, ImportanceLevelModel, TechnologyCode, PurchaseTypeModel, ImportanceLevelModel, GICategoryModel from workflow.models import WorkFlowEntityModel, WorkFlowModel User = get_user_model() class PlanningStatusRuleModel(models.Model): status_name = models.CharField('status name', max_length=100, null=True, default=None, help_text='status name') next_status_name = models.CharField('next status name', max_length=100, null=True, default=None, help_text='next status name') comment = models.DateTimeField('comment', auto_now_add=True, help_text='create time') def __str__(self): return f"Rule: {self.status_name}:{self.next_status_name}" class Meta: ordering = ['id'] db_table = 't_material_planning_status' class MaterialPlanningModel(models.Model): STATUS_CHOICE = ( (1, 'Start'), (2, 'Waiting'), (3, 'MRHConfirming'), (4, 'Pending'), (5, 'MRHConfirmed'), (6, 'STRConfirming'), (7, 'STRConfirmed'), (8, 'STRBalanced'), # pass -> STRFinished / reject STRConfirmed (9, 'STRFinished'), (10, 'OTBCollection'), (11, 'PRProcessing'), (12, 'OrderCreating'), (13, 'OrderConfirming'), (14, 'OrderConfirmed'), (15, 'Producing'), (16, 'Delivery'), (17, 'GoodsReady'), (18, 'GoodsReceived'), (19, 'Invoice'), (20, "Cancel") ) material_number = models.ForeignKey(MaterialModel, on_delete=models.CASCADE, null=False, verbose_name='material_basic_info', related_name='material_basic_info', help_text='零件号') plant = models.ForeignKey(Plant, on_delete=models.CASCADE, null=False, verbose_name='plant_info', related_name='plant_info', help_text='工厂代码') material_group_name = models.ForeignKey(MaterialGroup, on_delete=models.CASCADE, null=False, verbose_name='material_group_name', related_name='material_group_name', help_text='Material Group') engineer_user = models.ForeignKey(User, on_delete=models.CASCADE, null=False, verbose_name='EngineerUser', related_name='EngineerUser', help_text='维修计划负责人') plant_tech_code = models.ForeignKey(TechnologyCode, on_delete=models.CASCADE, null=False, verbose_name='plant_tech_code_info', related_name='plant_tech_code_info', help_text='Technology Code') purchase_type = models.ForeignKey(PurchaseTypeModel, on_delete=models.CASCADE, null=False, verbose_name='purchase_type_info', related_name='purchase_type_info', help_text='采购类型') importance_level = models.ForeignKey(ImportanceLevelModel, on_delete=models.CASCADE, null=False, verbose_name='importance_level', related_name='importance_level', help_text='采购类型') gi_category = models.ForeignKey(GICategoryModel, on_delete=models.CASCADE, null=False, verbose_name='gi_category', related_name='gi_category', help_text='GI类别') workflow_template = models.ForeignKey(WorkFlowModel, on_delete=models.CASCADE, null=False, verbose_name='workflow template', related_name='workflow_template', help_text='workflow template') workflow_entity = models.ForeignKey(WorkFlowEntityModel, on_delete=models.CASCADE, null=False, verbose_name='workflow entity', related_name='workflow_entity', help_text='workflow entity') planning_status = models.CharField("current status",choices=STATUS_CHOICE, max_length=100, null=False, default="Start", help_text="Planning status") storage_location = models.CharField('存储库位', max_length=100, null=True, default=None, help_text='Storage Location') part_description_zh = models.CharField('零件描述(中文)', max_length=100, null=True, default=None, help_text='Part Description Zh') part_description_en = models.CharField('零件描述(英文)', max_length=100, null=True, default=None, help_text='Part Description EN') dimension = models.CharField('技术数据', max_length=100, null=True, default=None, help_text='Dimension') min_stock = models.CharField('安全库存', max_length=100, null=True, default=None, help_text='Min Stock') max_stock = models.CharField('最大库存量', max_length=100, null=True, default=None, help_text='Max Stock') handover_stock = models.CharField('初始移交库存', max_length=100, null=True, default=None, help_text='Handover Stock') unit = models.CharField('计量单位', max_length=100, null=True, default=None, help_text='Unit') manufacturer_name = models.CharField('制造商名称', max_length=100, null=True, default=None, help_text='Manufacturer Name') manufacturer_model = models.CharField('制造商的规格型号', max_length=100, null=True, default=None, help_text='Manufacturer Model') manufacturer_part_number = models.CharField('制造商的订货号', max_length=100, null=True, default=None, help_text='Manufacturer Part Number') supplier_code = models.CharField('供应商编码', max_length=100, null=True, default=None, help_text='Supplier Code') supplier_name = models.CharField('供应商名称', max_length=100, null=True, default=None, help_text='Supplier Name') supplier_model = models.CharField('供应商的规格型号', max_length=100, null=True, default=None, help_text='Supplier Model') supplier_part_number = models.CharField('供应商的订货号', max_length=100, null=True, default=None, help_text='Supplier Part Number') supplier_contact_person = models.CharField('供应商联系人', max_length=100, null=True, default=None, help_text='Supplier Contact Person') supplier_contact_phone = models.CharField('供应商联系电话', max_length=100, null=True, default=None, help_text='Supplier Contact Phone') supplier_email = models.CharField('供应商邮箱', max_length=100, null=True, default=None, help_text='Supplier Email') fc_no = models.CharField('框架协议号码', max_length=100, null=True, default=None, help_text='FCNo') unit_price = models.CharField('单价', max_length=100, null=True, default=None, help_text='Unit Price') currency = models.CharField('货币', max_length=100, null=True, default=None, help_text='Currency') equipment_name = models.CharField('设备名称', max_length=100, null=True, default=None, help_text='Equipment Name') repairable = models.CharField('可修理的零件', max_length=100, null=True, default=None, help_text='Repairable') calibration = models.CharField('校准件', max_length=100, null=True, default=None, help_text='Calibration') drawing = models.CharField('图纸号', max_length=100, null=True, default=None, help_text='Drawing') installation_quantity = models.CharField('安装数量', max_length=100, null=True, default=None, help_text='Installation Quantity') part_special_treatment = models.CharField('零件特殊处理', max_length=100, null=True, default=None, help_text='PartSpecial Treatment') surplus_stock = models.CharField('剩余库存', max_length=100, null=True, default=None, help_text='Surplus Stock') create_at = models.DateTimeField('create time', auto_now_add=True, null=True, help_text='create time') update_at = models.DateTimeField('update time', auto_now=True, help_text='update time') def __str__(self): return self.part_description_zh class Meta: ordering = ['id'] db_table = 't_material_planning'
[ 1, 515, 9557, 29889, 2585, 1053, 4733, 13, 3166, 9557, 29889, 21570, 29889, 5150, 1053, 679, 29918, 1792, 29918, 4299, 13, 3166, 5518, 29889, 9794, 1053, 17582, 3195, 29892, 17582, 4782, 29892, 18058, 29892, 16032, 749, 10108, 3195, 29892, 17968, 3399, 29892, 349, 27574, 1542, 3195, 29892, 16032, 749, 10108, 3195, 29892, 402, 2965, 3326, 3195, 13, 3166, 27321, 29889, 9794, 1053, 5244, 17907, 6691, 3195, 29892, 5244, 17907, 3195, 13, 13, 13, 2659, 353, 679, 29918, 1792, 29918, 4299, 580, 13, 13, 13, 1990, 1858, 9450, 5709, 10740, 3195, 29898, 9794, 29889, 3195, 1125, 13, 1678, 4660, 29918, 978, 353, 4733, 29889, 27890, 877, 4882, 1024, 742, 4236, 29918, 2848, 29922, 29896, 29900, 29900, 29892, 1870, 29922, 5574, 29892, 2322, 29922, 8516, 29892, 1371, 29918, 726, 2433, 4882, 1024, 1495, 13, 1678, 2446, 29918, 4882, 29918, 978, 353, 4733, 29889, 27890, 877, 4622, 4660, 1024, 742, 4236, 29918, 2848, 29922, 29896, 29900, 29900, 29892, 1870, 29922, 5574, 29892, 2322, 29922, 8516, 29892, 1371, 29918, 726, 2433, 4622, 4660, 1024, 1495, 13, 1678, 3440, 353, 4733, 29889, 11384, 3073, 877, 9342, 742, 4469, 29918, 3707, 29918, 1202, 29922, 5574, 29892, 1371, 29918, 726, 2433, 3258, 931, 1495, 13, 13, 1678, 822, 4770, 710, 12035, 1311, 1125, 13, 4706, 736, 285, 29908, 10740, 29901, 426, 1311, 29889, 4882, 29918, 978, 6177, 29912, 1311, 29889, 4622, 29918, 4882, 29918, 978, 5038, 13, 13, 1678, 770, 20553, 29901, 13, 4706, 20520, 353, 6024, 333, 2033, 13, 4706, 4833, 29918, 2371, 353, 525, 29873, 29918, 15388, 29918, 572, 9450, 29918, 4882, 29915, 13, 13, 13, 1990, 17582, 3247, 9450, 3195, 29898, 9794, 29889, 3195, 1125, 13, 1678, 6850, 1299, 3308, 29918, 3210, 29949, 12107, 353, 313, 13, 4706, 313, 29896, 29892, 525, 4763, 5477, 13, 4706, 313, 29906, 29892, 525, 15716, 292, 5477, 13, 4706, 313, 29941, 29892, 525, 21055, 29950, 16376, 3568, 292, 5477, 13, 4706, 313, 29946, 29892, 525, 29925, 2548, 5477, 13, 4706, 313, 29945, 29892, 525, 21055, 29950, 16376, 381, 2168, 5477, 13, 4706, 313, 29953, 29892, 525, 10810, 16376, 3568, 292, 5477, 13, 4706, 313, 29955, 29892, 525, 10810, 16376, 381, 2168, 5477, 13, 4706, 313, 29947, 29892, 525, 10810, 22031, 8362, 5477, 29871, 396, 1209, 1599, 29486, 12881, 3276, 847, 12560, 29486, 16376, 381, 2168, 13, 4706, 313, 29929, 29892, 525, 10810, 12881, 3276, 5477, 13, 4706, 313, 29896, 29900, 29892, 525, 2891, 29933, 7196, 5477, 13, 4706, 313, 29896, 29896, 29892, 525, 10593, 7032, 292, 5477, 13, 4706, 313, 29896, 29906, 29892, 525, 7514, 9832, 1218, 5477, 13, 4706, 313, 29896, 29941, 29892, 525, 7514, 16376, 3568, 292, 5477, 13, 4706, 313, 29896, 29946, 29892, 525, 7514, 16376, 381, 2168, 5477, 13, 4706, 313, 29896, 29945, 29892, 525, 23665, 3277, 5477, 13, 4706, 313, 29896, 29953, 29892, 525, 29928, 27657, 5477, 13, 4706, 313, 29896, 29955, 29892, 525, 18420, 29879, 28181, 5477, 13, 4706, 313, 29896, 29947, 29892, 525, 18420, 29879, 29816, 5477, 13, 4706, 313, 29896, 29929, 29892, 525, 797, 14917, 5477, 13, 4706, 313, 29906, 29900, 29892, 376, 19420, 1159, 13, 1678, 1723, 13, 1678, 5518, 29918, 4537, 353, 4733, 29889, 27755, 2558, 29898, 24095, 3195, 29892, 373, 29918, 8143, 29922, 9794, 29889, 29907, 3289, 5454, 2287, 29892, 1870, 29922, 8824, 29892, 13, 462, 462, 9651, 26952, 29918, 978, 2433, 15388, 29918, 16121, 29918, 3888, 742, 13, 462, 462, 9651, 4475, 29918, 978, 2433, 15388, 29918, 16121, 29918, 3888, 742, 1371, 29918, 726, 2433, 236, 158, 185, 30631, 30850, 1495, 13, 1678, 8024, 353, 4733, 29889, 27755, 2558, 29898, 3247, 424, 29892, 373, 29918, 8143, 29922, 9794, 29889, 29907, 3289, 5454, 2287, 29892, 1870, 29922, 8824, 29892, 13, 462, 462, 9651, 26952, 29918, 978, 2433, 24389, 29918, 3888, 742, 13, 462, 462, 9651, 4475, 29918, 978, 2433, 24389, 29918, 3888, 742, 1371, 29918, 726, 2433, 31041, 232, 145, 133, 30690, 31183, 1495, 13, 1678, 5518, 29918, 2972, 29918, 978, 353, 4733, 29889, 27755, 2558, 29898, 24095, 4782, 29892, 373, 29918, 8143, 29922, 9794, 29889, 29907, 3289, 5454, 2287, 29892, 1870, 29922, 8824, 29892, 26952, 29918, 978, 2433, 15388, 29918, 2972, 29918, 978, 742, 13, 462, 462, 268, 4475, 29918, 978, 2433, 15388, 29918, 2972, 29918, 978, 742, 1371, 29918, 726, 2433, 24095, 6431, 1495, 13, 13, 1678, 22055, 29918, 1792, 353, 4733, 29889, 27755, 2558, 29898, 2659, 29892, 373, 29918, 8143, 29922, 9794, 29889, 29907, 3289, 5454, 2287, 29892, 1870, 29922, 8824, 29892, 26952, 29918, 978, 2433, 12412, 261, 2659, 742, 13, 462, 462, 1678, 4475, 29918, 978, 2433, 12412, 261, 2659, 742, 1371, 29918, 726, 2433, 234, 190, 183, 31273, 31466, 232, 139, 149, 235, 183, 162, 235, 183, 166, 30313, 1495, 13, 13, 1678, 8024, 29918, 11345, 29918, 401, 353, 4733, 29889, 27755, 2558, 29898, 7141, 3049, 3002, 3399, 29892, 373, 29918, 8143, 29922, 9794, 29889, 29907, 3289, 5454, 2287, 29892, 1870, 29922, 8824, 29892, 26952, 29918, 978, 2433, 24389, 29918, 11345, 29918, 401, 29918, 3888, 742, 13, 462, 462, 418, 4475, 29918, 978, 2433, 24389, 29918, 11345, 29918, 401, 29918, 3888, 742, 1371, 29918, 726, 2433, 7141, 3049, 3002, 5920, 1495, 13, 13, 1678, 20590, 29918, 1853, 353, 4733, 29889, 27755, 2558, 29898, 29925, 27574, 1542, 3195, 29892, 373, 29918, 8143, 29922, 9794, 29889, 29907, 3289, 5454, 2287, 29892, 1870, 29922, 8824, 29892, 26952, 29918, 978, 2433, 29886, 27574, 29918, 1853, 29918, 3888, 742, 13, 462, 462, 418, 4475, 29918, 978, 2433, 29886, 27574, 29918, 1853, 29918, 3888, 742, 1371, 29918, 726, 2433, 236, 138, 138, 235, 183, 176, 30832, 30883, 1495, 13, 13, 1678, 13500, 29918, 5563, 353, 4733, 29889, 27755, 2558, 29898, 17518, 749, 10108, 3195, 29892, 373, 29918, 8143, 29922, 9794, 29889, 29907, 3289, 5454, 2287, 29892, 1870, 29922, 8824, 29892, 26952, 29918, 978, 2433, 5215, 749, 29918, 5563, 742, 13, 462, 462, 268, 4475, 29918, 978, 2433, 5215, 749, 29918, 5563, 742, 1371, 29918, 726, 2433, 236, 138, 138, 235, 183, 176, 30832, 30883, 1495, 13, 13, 1678, 4005, 29918, 7320, 353, 4733, 29889, 27755, 2558, 29898, 29954, 2965, 3326, 3195, 29892, 373, 29918, 8143, 29922, 9794, 29889, 29907, 3289, 5454, 2287, 29892, 1870, 29922, 8824, 29892, 26952, 29918, 978, 2433, 3146, 29918, 7320, 742, 13, 462, 462, 268, 4475, 29918, 978, 2433, 3146, 29918, 7320, 742, 1371, 29918, 726, 2433, 29954, 29902, 30832, 232, 139, 174, 1495, 13, 13, 1678, 27321, 29918, 6886, 353, 4733, 29889, 27755, 2558, 29898, 5531, 17907, 3195, 29892, 373, 29918, 8143, 29922, 9794, 29889, 29907, 3289, 5454, 2287, 29892, 1870, 29922, 8824, 29892, 26952, 29918, 978, 2433, 1287, 1731, 4472, 742, 13, 462, 462, 268, 4475, 29918, 978, 2433, 1287, 1731, 29918, 6886, 742, 1371, 29918, 726, 2433, 1287, 1731, 4472, 1495, 13, 13, 1678, 27321, 29918, 10041, 353, 4733, 29889, 27755, 2558, 29898, 5531, 17907, 6691, 3195, 29892, 373, 29918, 8143, 29922, 9794, 29889, 29907, 3289, 5454, 2287, 29892, 1870, 29922, 8824, 29892, 26952, 29918, 978, 2433, 1287, 1731, 7855, 742, 13, 462, 462, 268, 4475, 29918, 978, 2433, 1287, 1731, 29918, 10041, 742, 1371, 29918, 726, 2433, 1287, 1731, 7855, 1495, 13, 13, 1678, 18987, 29918, 4882, 353, 4733, 29889, 27890, 703, 3784, 4660, 613, 1859, 1575, 29922, 27047, 29918, 3210, 29949, 12107, 29892, 4236, 29918, 2848, 29922, 29896, 29900, 29900, 29892, 1870, 29922, 8824, 29892, 2322, 543, 4763, 613, 1371, 29918, 726, 543, 3247, 9450, 4660, 1159, 13, 13, 1678, 8635, 29918, 5479, 353, 4733, 29889, 27890, 877, 30946, 232, 133, 171, 31700, 30956, 742, 4236, 29918, 2848, 29922, 29896, 29900, 29900, 29892, 1870, 29922, 5574, 29892, 2322, 29922, 8516, 29892, 1371, 29918, 726, 2433, 10486, 17015, 1495, 13, 1678, 760, 29918, 8216, 29918, 17599, 353, 4733, 29889, 27890, 877, 236, 158, 185, 30631, 233, 146, 146, 235, 194, 179, 29898, 30275, 30333, 29897, 742, 4236, 29918, 2848, 29922, 29896, 29900, 29900, 29892, 1870, 29922, 5574, 29892, 2322, 29922, 8516, 29892, 1371, 29918, 726, 2433, 7439, 12953, 27134, 1495, 13, 1678, 760, 29918, 8216, 29918, 264, 353, 4733, 29889, 27890, 877, 236, 158, 185, 30631, 233, 146, 146, 235, 194, 179, 29898, 31144, 30333, 29897, 742, 4236, 29918, 2848, 29922, 29896, 29900, 29900, 29892, 1870, 29922, 5574, 29892, 2322, 29922, 8516, 29892, 1371, 29918, 726, 2433, 7439, 12953, 12524, 1495, 13, 1678, 9927, 353, 4733, 29889, 27890, 877, 31615, 233, 159, 178, 30354, 30763, 742, 4236, 29918, 2848, 29922, 29896, 29900, 29900, 29892, 1870, 29922, 5574, 29892, 2322, 29922, 8516, 29892, 1371, 29918, 726, 2433, 16142, 2673, 1495, 13, 1678, 1375, 29918, 17712, 353, 4733, 29889, 27890, 877, 30670, 30753, 31700, 30946, 742, 4236, 29918, 2848, 29922, 29896, 29900, 29900, 29892, 1870, 29922, 5574, 29892, 2322, 29922, 8516, 29892, 1371, 29918, 726, 2433, 8140, 10224, 1495, 13, 1678, 4236, 29918, 17712, 353, 4733, 29889, 27890, 877, 30878, 30257, 31700, 30946, 31180, 742, 4236, 29918, 2848, 29922, 29896, 29900, 29900, 29892, 1870, 29922, 5574, 29892, 2322, 29922, 8516, 29892, 1371, 29918, 726, 2433, 7976, 10224, 1495, 13, 1678, 1361, 957, 29918, 17712, 353, 4733, 29889, 27890, 877, 31120, 31020, 31618, 31398, 31700, 30946, 742, 4236, 29918, 2848, 29922, 29896, 29900, 29900, 29892, 1870, 29922, 5574, 29892, 2322, 29922, 8516, 29892, 1371, 29918, 726, 2433, 3481, 957, 10224, 1495, 13, 1678, 5190, 353, 4733, 29889, 27890, 877, 31466, 31180, 31166, 30956, 742, 4236, 29918, 2848, 29922, 29896, 29900, 29900, 29892, 1870, 29922, 5574, 29892, 2322, 29922, 8516, 29892, 1371, 29918, 726, 2433, 8325, 1495, 13, 1678, 12012, 9945, 29918, 978, 353, 4733, 29889, 27890, 877, 31072, 31420, 31427, 30548, 31685, 742, 4236, 29918, 2848, 29922, 29896, 29900, 29900, 29892, 1870, 29922, 5574, 29892, 2322, 29922, 8516, 29892, 1371, 29918, 726, 2433, 2517, 9765, 9945, 4408, 1495, 13, 1678, 12012, 9945, 29918, 4299, 353, 4733, 29889, 27890, 877, 31072, 31420, 31427, 30210, 235, 170, 135, 31168, 30883, 30850, 742, 4236, 29918, 2848, 29922, 29896, 29900, 29900, 29892, 1870, 29922, 5574, 29892, 2322, 29922, 8516, 29892, 1371, 29918, 726, 2433, 2517, 9765, 9945, 8125, 1495, 13, 1678, 12012, 9945, 29918, 1595, 29918, 4537, 353, 4733, 29889, 27890, 877, 31072, 31420, 31427, 30210, 235, 177, 165, 235, 183, 170, 30850, 742, 4236, 29918, 2848, 29922, 29896, 29900, 29900, 29892, 1870, 29922, 5574, 29892, 2322, 29922, 8516, 29892, 1371, 29918, 726, 2433, 2517, 9765, 9945, 3455, 9681, 1495, 13, 1678, 1462, 4926, 29918, 401, 353, 4733, 29889, 27890, 877, 231, 193, 158, 31370, 31427, 31795, 31183, 742, 4236, 29918, 2848, 29922, 29896, 29900, 29900, 29892, 1870, 29922, 5574, 29892, 2322, 29922, 8516, 29892, 1371, 29918, 726, 2433, 20182, 4926, 5920, 1495, 13, 1678, 1462, 4926, 29918, 978, 353, 4733, 29889, 27890, 877, 231, 193, 158, 31370, 31427, 30548, 31685, 742, 4236, 29918, 2848, 29922, 29896, 29900, 29900, 29892, 1870, 29922, 5574, 29892, 2322, 29922, 8516, 29892, 1371, 29918, 726, 2433, 20182, 4926, 4408, 1495, 13, 1678, 1462, 4926, 29918, 4299, 353, 4733, 29889, 27890, 877, 231, 193, 158, 31370, 31427, 30210, 235, 170, 135, 31168, 30883, 30850, 742, 4236, 29918, 2848, 29922, 29896, 29900, 29900, 29892, 1870, 29922, 5574, 29892, 2322, 29922, 8516, 29892, 1371, 29918, 726, 2433, 20182, 4926, 8125, 1495, 13, 1678, 1462, 4926, 29918, 1595, 29918, 4537, 353, 4733, 29889, 27890, 877, 231, 193, 158, 31370, 31427, 30210, 235, 177, 165, 235, 183, 170, 30850, 742, 4236, 29918, 2848, 29922, 29896, 29900, 29900, 29892, 1870, 29922, 5574, 29892, 2322, 29922, 8516, 29892, 1371, 29918, 726, 2433, 20182, 4926, 3455, 9681, 1495, 13, 1678, 1462, 4926, 29918, 12346, 29918, 10532, 353, 4733, 29889, 27890, 877, 231, 193, 158, 31370, 31427, 31986, 31185, 30313, 742, 4236, 29918, 2848, 29922, 29896, 29900, 29900, 29892, 1870, 29922, 5574, 29892, 2322, 29922, 8516, 29892, 1371, 29918, 726, 2433, 20182, 4926, 22387, 5196, 1495, 13, 1678, 1462, 4926, 29918, 12346, 29918, 6710, 353, 4733, 29889, 27890, 877, 231, 193, 158, 31370, 31427, 31986, 31185, 31679, 31852, 742, 4236, 29918, 2848, 29922, 29896, 29900, 29900, 29892, 1870, 29922, 5574, 29892, 2322, 29922, 8516, 29892, 1371, 29918, 726, 2433, 20182, 4926, 22387, 24323, 1495, 13, 1678, 1462, 4926, 29918, 5269, 353, 4733, 29889, 27890, 877, 231, 193, 158, 31370, 31427, 236, 133, 177, 234, 177, 180, 742, 4236, 29918, 2848, 29922, 29896, 29900, 29900, 29892, 1870, 29922, 5574, 29892, 2322, 29922, 8516, 29892, 1371, 29918, 726, 2433, 20182, 4926, 22608, 1495, 13, 1678, 285, 29883, 29918, 1217, 353, 4733, 29889, 27890, 877, 233, 164, 137, 233, 161, 185, 232, 144, 146, 235, 177, 177, 30850, 31183, 742, 4236, 29918, 2848, 29922, 29896, 29900, 29900, 29892, 1870, 29922, 5574, 29892, 2322, 29922, 8516, 29892, 1371, 29918, 726, 2433, 8610, 3782, 1495, 13, 1678, 5190, 29918, 9175, 353, 4733, 29889, 27890, 877, 31166, 231, 190, 186, 742, 4236, 29918, 2848, 29922, 29896, 29900, 29900, 29892, 1870, 29922, 5574, 29892, 2322, 29922, 8516, 29892, 1371, 29918, 726, 2433, 8325, 20743, 1495, 13, 1678, 27550, 353, 4733, 29889, 27890, 877, 235, 183, 170, 232, 187, 132, 742, 4236, 29918, 2848, 29922, 29896, 29900, 29900, 29892, 1870, 29922, 5574, 29892, 2322, 29922, 8516, 29892, 1371, 29918, 726, 2433, 29907, 10880, 1495, 13, 1678, 21083, 29918, 978, 353, 4733, 29889, 27890, 877, 30872, 232, 167, 138, 30548, 31685, 742, 4236, 29918, 2848, 29922, 29896, 29900, 29900, 29892, 1870, 29922, 5574, 29892, 2322, 29922, 8516, 29892, 1371, 29918, 726, 2433, 6108, 666, 358, 4408, 1495, 13, 1678, 1634, 1794, 18104, 353, 4733, 29889, 27890, 877, 30682, 31273, 30687, 30210, 236, 158, 185, 30631, 742, 4236, 29918, 2848, 29922, 29896, 29900, 29900, 29892, 1870, 29922, 5574, 29892, 2322, 29922, 8516, 29892, 1371, 29918, 726, 2433, 5612, 1794, 18104, 1495, 13, 1678, 1208, 26218, 353, 4733, 29889, 27890, 877, 31071, 232, 138, 137, 30631, 742, 4236, 29918, 2848, 29922, 29896, 29900, 29900, 29892, 1870, 29922, 5574, 29892, 2322, 29922, 8516, 29892, 1371, 29918, 726, 2433, 7856, 26218, 1495, 13, 1678, 11580, 353, 4733, 29889, 27890, 877, 30861, 234, 189, 187, 30850, 742, 4236, 29918, 2848, 29922, 29896, 29900, 29900, 29892, 1870, 29922, 5574, 29892, 2322, 29922, 8516, 29892, 1371, 29918, 726, 2433, 16327, 1495, 13, 1678, 11161, 29918, 22640, 353, 4733, 29889, 27890, 877, 30670, 31905, 30354, 31180, 742, 4236, 29918, 2848, 29922, 29896, 29900, 29900, 29892, 1870, 29922, 5574, 29892, 2322, 29922, 8516, 29892, 1371, 29918, 726, 2433, 23271, 362, 22746, 537, 1495, 13, 1678, 760, 29918, 18732, 29918, 2484, 271, 358, 353, 4733, 29889, 27890, 877, 236, 158, 185, 30631, 31141, 233, 177, 141, 31548, 30687, 742, 4236, 29918, 2848, 29922, 29896, 29900, 29900, 29892, 1870, 29922, 5574, 29892, 2322, 29922, 8516, 29892, 1371, 29918, 726, 2433, 7439, 24780, 6479, 271, 358, 1495, 13, 1678, 1190, 11242, 29918, 17712, 353, 4733, 29889, 27890, 877, 232, 140, 172, 231, 192, 156, 31700, 30946, 742, 4236, 29918, 2848, 29922, 29896, 29900, 29900, 29892, 1870, 29922, 5574, 29892, 2322, 29922, 8516, 29892, 1371, 29918, 726, 2433, 18498, 11242, 10224, 1495, 13, 1678, 1653, 29918, 271, 353, 4733, 29889, 11384, 3073, 877, 3258, 931, 742, 4469, 29918, 3707, 29918, 1202, 29922, 5574, 29892, 1870, 29922, 5574, 29892, 1371, 29918, 726, 2433, 3258, 931, 1495, 13, 1678, 2767, 29918, 271, 353, 4733, 29889, 11384, 3073, 877, 5504, 931, 742, 4469, 29918, 3707, 29922, 5574, 29892, 1371, 29918, 726, 2433, 5504, 931, 1495, 13, 13, 1678, 822, 4770, 710, 12035, 1311, 1125, 13, 4706, 736, 1583, 29889, 1595, 29918, 8216, 29918, 17599, 13, 13, 1678, 770, 20553, 29901, 13, 4706, 20520, 353, 6024, 333, 2033, 13, 4706, 4833, 29918, 2371, 353, 525, 29873, 29918, 15388, 29918, 572, 9450, 29915, 13, 13, 13, 2 ]
week07/code09.py
byeongal/KMUCP
0
110671
<filename>week07/code09.py import turtle t = turtle.Turtle() color_list = ["black", "red", "green", "blue", "cyan", "yellow", "magenta"] for i in range(7): radius = (i + 1) * 10 t.color(color_list[i]) t.circle(radius) turtle.mainloop()
[ 1, 529, 9507, 29958, 18448, 29900, 29955, 29914, 401, 29900, 29929, 29889, 2272, 13, 5215, 260, 4227, 280, 13, 29873, 353, 260, 4227, 280, 29889, 29911, 4227, 280, 580, 13, 2780, 29918, 1761, 353, 6796, 8517, 613, 376, 1127, 613, 376, 12692, 613, 376, 9539, 613, 376, 1270, 273, 613, 376, 29136, 613, 376, 11082, 6381, 3108, 13, 1454, 474, 297, 3464, 29898, 29955, 1125, 13, 1678, 11855, 353, 313, 29875, 718, 29871, 29896, 29897, 334, 29871, 29896, 29900, 13, 1678, 260, 29889, 2780, 29898, 2780, 29918, 1761, 29961, 29875, 2314, 13, 1678, 260, 29889, 16622, 29898, 13471, 29897, 13, 29873, 4227, 280, 29889, 3396, 7888, 580, 2 ]
pyPLANES/pw/pw_classes.py
matael/pyPLANES
0
11129
#! /usr/bin/env python # -*- coding:utf8 -*- # # pw_classes.py # # This file is part of pyplanes, a software distributed under the MIT license. # For any question, please contact one of the authors cited below. # # Copyright (c) 2020 # <NAME> <<EMAIL>> # <NAME> <<EMAIL>> # <NAME> <<EMAIL>> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # import numpy as np import numpy.linalg as LA import matplotlib.pyplot as plt from mediapack import from_yaml from mediapack import Air, PEM, EqFluidJCA from pyPLANES.utils.io import initialisation_out_files_plain from pyPLANES.core.calculus import PwCalculus from pyPLANES.core.multilayer import MultiLayer from pyPLANES.pw.pw_layers import FluidLayer from pyPLANES.pw.pw_interfaces import FluidFluidInterface, RigidBacking Air = Air() # def initialise_PW_solver(L, b): # nb_PW = 0 # dofs = [] # for _layer in L: # if _layer.medium.MODEL == "fluid": # dofs.append(nb_PW+np.arange(2)) # nb_PW += 2 # elif _layer.medium.MODEL == "pem": # dofs.append(nb_PW+np.arange(6)) # nb_PW += 6 # elif _layer.medium.MODEL == "elastic": # dofs.append(nb_PW+np.arange(4)) # nb_PW += 4 # interface = [] # for i_l, _layer in enumerate(L[:-1]): # interface.append((L[i_l].medium.MODEL, L[i_l+1].medium.MODEL)) # return nb_PW, interface, dofs class PwProblem(PwCalculus, MultiLayer): """ Plane Wave Problem """ def __init__(self, **kwargs): PwCalculus.__init__(self, **kwargs) termination = kwargs.get("termination","rigid") self.method = kwargs.get("termination","global") MultiLayer.__init__(self, **kwargs) self.kx, self.ky, self.k = None, None, None self.shift_plot = kwargs.get("shift_pw", 0.) self.plot = kwargs.get("plot_results", [False]*6) self.result = {} self.outfiles_directory = False if self.method == "global": self.layers.insert(0,FluidLayer(Air,1.e-2)) if self.layers[1].medium.MEDIUM_TYPE == "fluid": self.interfaces.append(FluidFluidInterface(self.layers[0],self.layers[1])) self.nb_PW = 0 for _layer in self.layers: if _layer.medium.MODEL == "fluid": _layer.dofs = self.nb_PW+np.arange(2) self.nb_PW += 2 elif _layer.medium.MODEL == "pem": _layer.dofs = self.nb_PW+np.arange(6) self.nb_PW += 6 elif _layer.medium.MODEL == "elastic": _layer.dofs = self.nb_PW+np.arange(4) self.nb_PW += 4 def update_frequency(self, f): PwCalculus.update_frequency(self, f) MultiLayer.update_frequency(self, f, self.k, self.kx) def create_linear_system(self, f): self.A = np.zeros((self.nb_PW-1, self.nb_PW), dtype=complex) i_eq = 0 # Loop on the interfaces for _int in self.interfaces: if self.method == "global": i_eq = _int.update_M_global(self.A, i_eq) # for i_inter, _inter in enumerate(self.interfaces): # if _inter[0] == "fluid": # if _inter[1] == "fluid": # i_eq = self.interface_fluid_fluid(i_eq, i_inter, Layers, dofs, M) # if _inter[1] == "pem": # i_eq = self.interface_fluid_pem(i_eq, i_inter, Layers, dofs, M) # if _inter[1] == "elastic": # i_eq = self.interface_fluid_elastic(i_eq, i_inter, Layers, dofs, M) # elif _inter[0] == "pem": # if _inter[1] == "fluid": # i_eq = self.interface_pem_fluid(i_eq, i_inter, Layers, dofs, M) # if _inter[1] == "pem": # i_eq = self.interface_pem_pem(i_eq, i_inter, Layers, dofs, M) # if _inter[1] == "elastic": # i_eq = self.interface_pem_elastic(i_eq, i_inter, Layers, dofs, M) # elif _inter[0] == "elastic": # if _inter[1] == "fluid": # i_eq = self.interface_elastic_fluid(i_eq, i_inter, Layers, dofs, M) # if _inter[1] == "pem": # i_eq = self.interface_elastic_pem(i_eq, i_inter, Layers, dofs, M) # if _inter[1] == "elastic": # i_eq = self.interface_elastic_elastic(i_eq, i_inter, Layers, dofs, M) # if self.backing == backing.rigid: # if Layers[-1].medium.MODEL == "fluid": # i_eq = self.interface_fluid_rigid(M, i_eq, Layers[-1], dofs[-1] ) # elif Layers[-1].medium.MODEL == "pem": # i_eq = self.interface_pem_rigid(M, i_eq, Layers[-1], dofs[-1]) # elif Layers[-1].medium.MODEL == "elastic": # i_eq = self.interface_elastic_rigid(M, i_eq, Layers[-1], dofs[-1]) # elif self.backing == "transmission": # i_eq = self.semi_infinite_medium(M, i_eq, Layers[-1], dofs[-1] ) self.F = -self.A[:, 0]*np.exp(1j*self.ky*self.layers[0].d) # - is for transposition, exponential term is for the phase shift self.A = np.delete(self.A, 0, axis=1) # print(self.A) X = LA.solve(self.A, self.F) # print(X) # R_pyPLANES_PW = X[0] # if self.backing == "transmission": # T_pyPLANES_PW = X[-2] # else: # T_pyPLANES_PW = 0. # X = np.delete(X, 0) # del(dofs[0]) # for i, _ld in enumerate(dofs): # dofs[i] -= 2 # if self.plot: # self.plot_sol_PW(X, dofs) # out["R"] = R_pyPLANES_PW # out["T"] = T_pyPLANES_PW # return out # class Solver_PW(PwCalculus): # def __init__(self, **kwargs): # PwCalculus.__init__(self, **kwargs) # ml = kwargs.get("ml") # termination = kwargs.get("termination") # self.layers = [] # for _l in ml: # if _l[0] == "Air": # mat = Air # else: # mat = from_yaml(_l[0]+".yaml") # d = _l[1] # self.layers.append(Layer(mat,d)) # if termination in ["trans", "transmission","Transmission"]: # self.backing = "Transmission" # else: # self.backing = backing.rigid # self.kx, self.ky, self.k = None, None, None # self.shift_plot = kwargs.get("shift_pw", 0.) # self.plot = kwargs.get("plot_results", [False]*6) # self.result = {} # self.outfiles_directory = False # initialisation_out_files_plain(self) # def write_out_files(self, out): # self.out_file.write("{:.12e}\t".format(self.current_frequency)) # abs = 1-np.abs(out["R"])**2 # self.out_file.write("{:.12e}\t".format(abs)) # self.out_file.write("\n") # def interface_fluid_fluid(self, ieq, iinter, L, d, M): # SV_1, k_y_1 = fluid_SV(self.kx, self.k, L[iinter].medium.K) # SV_2, k_y_2 = fluid_SV(self.kx, self.k, L[iinter+1].medium.K) # M[ieq, d[iinter+0][0]] = SV_1[0, 0]*np.exp(-1j*k_y_1*L[iinter].thickness) # M[ieq, d[iinter+0][1]] = SV_1[0, 1] # M[ieq, d[iinter+1][0]] = -SV_2[0, 0] # M[ieq, d[iinter+1][1]] = -SV_2[0, 1]*np.exp(-1j*k_y_2*L[iinter+1].thickness) # ieq += 1 # M[ieq, d[iinter+0][0]] = SV_1[1, 0]*np.exp(-1j*k_y_1*L[iinter].thickness) # M[ieq, d[iinter+0][1]] = SV_1[1, 1] # M[ieq, d[iinter+1][0]] = -SV_2[1, 0] # M[ieq, d[iinter+1][1]] = -SV_2[1, 1]*np.exp(-1j*k_y_2*L[iinter+1].thickness) # ieq += 1 # return ieq # def interface_fluid_rigid(self, M, ieq, L, d): # SV, k_y = fluid_SV(self.kx, self.k, L.medium.K) # M[ieq, d[0]] = SV[0, 0]*np.exp(-1j*k_y*L.thickness) # M[ieq, d[1]] = SV[0, 1] # ieq += 1 # return ieq # def semi_infinite_medium(self, M, ieq, L, d): # M[ieq, d[1]] = 1. # ieq += 1 # return ieq # def interface_pem_pem(self, ieq, iinter, L, d, M): # SV_1, k_y_1 = PEM_SV(L[iinter].medium, self.kx) # SV_2, k_y_2 = PEM_SV(L[iinter+1].medium, self.kx) # for _i in range(6): # M[ieq, d[iinter+0][0]] = SV_1[_i, 0]*np.exp(-1j*k_y_1[0]*L[iinter].thickness) # M[ieq, d[iinter+0][1]] = SV_1[_i, 1]*np.exp(-1j*k_y_1[1]*L[iinter].thickness) # M[ieq, d[iinter+0][2]] = SV_1[_i, 2]*np.exp(-1j*k_y_1[2]*L[iinter].thickness) # M[ieq, d[iinter+0][3]] = SV_1[_i, 3] # M[ieq, d[iinter+0][4]] = SV_1[_i, 4] # M[ieq, d[iinter+0][5]] = SV_1[_i, 5] # M[ieq, d[iinter+1][0]] = -SV_2[_i, 0] # M[ieq, d[iinter+1][1]] = -SV_2[_i, 1] # M[ieq, d[iinter+1][2]] = -SV_2[_i, 2] # M[ieq, d[iinter+1][3]] = -SV_2[_i, 3]*np.exp(-1j*k_y_2[0]*L[iinter+1].thickness) # M[ieq, d[iinter+1][4]] = -SV_2[_i, 4]*np.exp(-1j*k_y_2[1]*L[iinter+1].thickness) # M[ieq, d[iinter+1][5]] = -SV_2[_i, 5]*np.exp(-1j*k_y_2[2]*L[iinter+1].thickness) # ieq += 1 # return ieq # def interface_fluid_pem(self, ieq, iinter, L, d, M): # SV_1, k_y_1 = fluid_SV(self.kx, self.k, L[iinter].medium.K) # SV_2, k_y_2 = PEM_SV(L[iinter+1].medium,self.kx) # # print(k_y_2) # M[ieq, d[iinter+0][0]] = SV_1[0, 0]*np.exp(-1j*k_y_1*L[iinter].thickness) # M[ieq, d[iinter+0][1]] = SV_1[0, 1] # M[ieq, d[iinter+1][0]] = -SV_2[2, 0] # M[ieq, d[iinter+1][1]] = -SV_2[2, 1] # M[ieq, d[iinter+1][2]] = -SV_2[2, 2] # M[ieq, d[iinter+1][3]] = -SV_2[2, 3]*np.exp(-1j*k_y_2[0]*L[iinter+1].thickness) # M[ieq, d[iinter+1][4]] = -SV_2[2, 4]*np.exp(-1j*k_y_2[1]*L[iinter+1].thickness) # M[ieq, d[iinter+1][5]] = -SV_2[2, 5]*np.exp(-1j*k_y_2[2]*L[iinter+1].thickness) # ieq += 1 # M[ieq, d[iinter+0][0]] = SV_1[1, 0]*np.exp(-1j*k_y_1*L[iinter].thickness) # M[ieq, d[iinter+0][1]] = SV_1[1, 1] # M[ieq, d[iinter+1][0]] = -SV_2[4, 0] # M[ieq, d[iinter+1][1]] = -SV_2[4, 1] # M[ieq, d[iinter+1][2]] = -SV_2[4, 2] # M[ieq, d[iinter+1][3]] = -SV_2[4, 3]*np.exp(-1j*k_y_2[0]*L[iinter+1].thickness) # M[ieq, d[iinter+1][4]] = -SV_2[4, 4]*np.exp(-1j*k_y_2[1]*L[iinter+1].thickness) # M[ieq, d[iinter+1][5]] = -SV_2[4, 5]*np.exp(-1j*k_y_2[2]*L[iinter+1].thickness) # ieq += 1 # M[ieq, d[iinter+1][0]] = SV_2[0, 0] # M[ieq, d[iinter+1][1]] = SV_2[0, 1] # M[ieq, d[iinter+1][2]] = SV_2[0, 2] # M[ieq, d[iinter+1][3]] = SV_2[0, 3]*np.exp(-1j*k_y_2[0]*L[iinter+1].thickness) # M[ieq, d[iinter+1][4]] = SV_2[0, 4]*np.exp(-1j*k_y_2[1]*L[iinter+1].thickness) # M[ieq, d[iinter+1][5]] = SV_2[0, 5]*np.exp(-1j*k_y_2[2]*L[iinter+1].thickness) # ieq += 1 # M[ieq, d[iinter+1][0]] = SV_2[3, 0] # M[ieq, d[iinter+1][1]] = SV_2[3, 1] # M[ieq, d[iinter+1][2]] = SV_2[3, 2] # M[ieq, d[iinter+1][3]] = SV_2[3, 3]*np.exp(-1j*k_y_2[0]*L[iinter+1].thickness) # M[ieq, d[iinter+1][4]] = SV_2[3, 4]*np.exp(-1j*k_y_2[1]*L[iinter+1].thickness) # M[ieq, d[iinter+1][5]] = SV_2[3, 5]*np.exp(-1j*k_y_2[2]*L[iinter+1].thickness) # ieq += 1 # return ieq # def interface_elastic_pem(self, ieq, iinter, L, d, M): # SV_1, k_y_1 = elastic_SV(L[iinter].medium,self.kx, self.omega) # SV_2, k_y_2 = PEM_SV(L[iinter+1].medium,self.kx) # # print(k_y_2) # M[ieq, d[iinter+0][0]] = -SV_1[0, 0]*np.exp(-1j*k_y_1[0]*L[iinter].thickness) # M[ieq, d[iinter+0][1]] = -SV_1[0, 1]*np.exp(-1j*k_y_1[1]*L[iinter].thickness) # M[ieq, d[iinter+0][2]] = -SV_1[0, 2] # M[ieq, d[iinter+0][3]] = -SV_1[0, 3] # M[ieq, d[iinter+1][0]] = SV_2[0, 0] # M[ieq, d[iinter+1][1]] = SV_2[0, 1] # M[ieq, d[iinter+1][2]] = SV_2[0, 2] # M[ieq, d[iinter+1][3]] = SV_2[0, 3]*np.exp(-1j*k_y_2[0]*L[iinter+1].thickness) # M[ieq, d[iinter+1][4]] = SV_2[0, 4]*np.exp(-1j*k_y_2[1]*L[iinter+1].thickness) # M[ieq, d[iinter+1][5]] = SV_2[0, 5]*np.exp(-1j*k_y_2[2]*L[iinter+1].thickness) # ieq += 1 # M[ieq, d[iinter+0][0]] = -SV_1[1, 0]*np.exp(-1j*k_y_1[0]*L[iinter].thickness) # M[ieq, d[iinter+0][1]] = -SV_1[1, 1]*np.exp(-1j*k_y_1[1]*L[iinter].thickness) # M[ieq, d[iinter+0][2]] = -SV_1[1, 2] # M[ieq, d[iinter+0][3]] = -SV_1[1, 3] # M[ieq, d[iinter+1][0]] = SV_2[1, 0] # M[ieq, d[iinter+1][1]] = SV_2[1, 1] # M[ieq, d[iinter+1][2]] = SV_2[1, 2] # M[ieq, d[iinter+1][3]] = SV_2[1, 3]*np.exp(-1j*k_y_2[0]*L[iinter+1].thickness) # M[ieq, d[iinter+1][4]] = SV_2[1, 4]*np.exp(-1j*k_y_2[1]*L[iinter+1].thickness) # M[ieq, d[iinter+1][5]] = SV_2[1, 5]*np.exp(-1j*k_y_2[2]*L[iinter+1].thickness) # ieq += 1 # M[ieq, d[iinter+0][0]] = -SV_1[1, 0]*np.exp(-1j*k_y_1[0]*L[iinter].thickness) # M[ieq, d[iinter+0][1]] = -SV_1[1, 1]*np.exp(-1j*k_y_1[1]*L[iinter].thickness) # M[ieq, d[iinter+0][2]] = -SV_1[1, 2] # M[ieq, d[iinter+0][3]] = -SV_1[1, 3] # M[ieq, d[iinter+1][0]] = SV_2[2, 0] # M[ieq, d[iinter+1][1]] = SV_2[2, 1] # M[ieq, d[iinter+1][2]] = SV_2[2, 2] # M[ieq, d[iinter+1][3]] = SV_2[2, 3]*np.exp(-1j*k_y_2[0]*L[iinter+1].thickness) # M[ieq, d[iinter+1][4]] = SV_2[2, 4]*np.exp(-1j*k_y_2[1]*L[iinter+1].thickness) # M[ieq, d[iinter+1][5]] = SV_2[2, 5]*np.exp(-1j*k_y_2[2]*L[iinter+1].thickness) # ieq += 1 # M[ieq, d[iinter+0][0]] = -SV_1[2, 0]*np.exp(-1j*k_y_1[0]*L[iinter].thickness) # M[ieq, d[iinter+0][1]] = -SV_1[2, 1]*np.exp(-1j*k_y_1[1]*L[iinter].thickness) # M[ieq, d[iinter+0][2]] = -SV_1[2, 2] # M[ieq, d[iinter+0][3]] = -SV_1[2, 3] # M[ieq, d[iinter+1][0]] = (SV_2[3, 0]-SV_2[4, 0]) # M[ieq, d[iinter+1][1]] = (SV_2[3, 1]-SV_2[4, 1]) # M[ieq, d[iinter+1][2]] = (SV_2[3, 2]-SV_2[4, 2]) # M[ieq, d[iinter+1][3]] = (SV_2[3, 3]-SV_2[4, 3])*np.exp(-1j*k_y_2[0]*L[iinter+1].thickness) # M[ieq, d[iinter+1][4]] = (SV_2[3, 4]-SV_2[4, 4])*np.exp(-1j*k_y_2[1]*L[iinter+1].thickness) # M[ieq, d[iinter+1][5]] = (SV_2[3, 5]-SV_2[4, 5])*np.exp(-1j*k_y_2[2]*L[iinter+1].thickness) # ieq += 1 # M[ieq, d[iinter+0][0]] = -SV_1[3, 0]*np.exp(-1j*k_y_1[0]*L[iinter].thickness) # M[ieq, d[iinter+0][1]] = -SV_1[3, 1]*np.exp(-1j*k_y_1[1]*L[iinter].thickness) # M[ieq, d[iinter+0][2]] = -SV_1[3, 2] # M[ieq, d[iinter+0][3]] = -SV_1[3, 3] # M[ieq, d[iinter+1][0]] = SV_2[5, 0] # M[ieq, d[iinter+1][1]] = SV_2[5, 1] # M[ieq, d[iinter+1][2]] = SV_2[5, 2] # M[ieq, d[iinter+1][3]] = SV_2[5, 3]*np.exp(-1j*k_y_2[0]*L[iinter+1].thickness) # M[ieq, d[iinter+1][4]] = SV_2[5, 4]*np.exp(-1j*k_y_2[1]*L[iinter+1].thickness) # M[ieq, d[iinter+1][5]] = SV_2[5, 5]*np.exp(-1j*k_y_2[2]*L[iinter+1].thickness) # ieq += 1 # return ieq # def interface_pem_elastic(self, ieq, iinter, L, d, M): # SV_1, k_y_1 = PEM_SV(L[iinter].medium,self.kx) # SV_2, k_y_2 = elastic_SV(L[iinter+1].medium,self.kx, self.omega) # # print(k_y_2) # M[ieq, d[iinter+0][0]] = SV_1[0, 0]*np.exp(-1j*k_y_1[0]*L[iinter].thickness) # M[ieq, d[iinter+0][1]] = SV_1[0, 1]*np.exp(-1j*k_y_1[1]*L[iinter].thickness) # M[ieq, d[iinter+0][2]] = SV_1[0, 2]*np.exp(-1j*k_y_1[2]*L[iinter].thickness) # M[ieq, d[iinter+0][3]] = SV_1[0, 3] # M[ieq, d[iinter+0][4]] = SV_1[0, 4] # M[ieq, d[iinter+0][5]] = SV_1[0, 5] # M[ieq, d[iinter+1][0]] = -SV_2[0, 0] # M[ieq, d[iinter+1][1]] = -SV_2[0, 1] # M[ieq, d[iinter+1][2]] = -SV_2[0, 2]*np.exp(-1j*k_y_2[0]*L[iinter+1].thickness) # M[ieq, d[iinter+1][3]] = -SV_2[0, 3]*np.exp(-1j*k_y_2[1]*L[iinter+1].thickness) # ieq += 1 # M[ieq, d[iinter+0][0]] = SV_1[1, 0]*np.exp(-1j*k_y_1[0]*L[iinter].thickness) # M[ieq, d[iinter+0][1]] = SV_1[1, 1]*np.exp(-1j*k_y_1[1]*L[iinter].thickness) # M[ieq, d[iinter+0][2]] = SV_1[1, 2]*np.exp(-1j*k_y_1[2]*L[iinter].thickness) # M[ieq, d[iinter+0][3]] = SV_1[1, 3] # M[ieq, d[iinter+0][4]] = SV_1[1, 4] # M[ieq, d[iinter+0][5]] = SV_1[1, 5] # M[ieq, d[iinter+1][0]] = -SV_2[1, 0] # M[ieq, d[iinter+1][1]] = -SV_2[1, 1] # M[ieq, d[iinter+1][2]] = -SV_2[1, 2]*np.exp(-1j*k_y_2[0]*L[iinter+1].thickness) # M[ieq, d[iinter+1][3]] = -SV_2[1, 3]*np.exp(-1j*k_y_2[1]*L[iinter+1].thickness) # ieq += 1 # M[ieq, d[iinter+0][0]] = SV_1[2, 0]*np.exp(-1j*k_y_1[0]*L[iinter].thickness) # M[ieq, d[iinter+0][1]] = SV_1[2, 1]*np.exp(-1j*k_y_1[1]*L[iinter].thickness) # M[ieq, d[iinter+0][2]] = SV_1[2, 2]*np.exp(-1j*k_y_1[2]*L[iinter].thickness) # M[ieq, d[iinter+0][3]] = SV_1[2, 3] # M[ieq, d[iinter+0][4]] = SV_1[2, 4] # M[ieq, d[iinter+0][5]] = SV_1[2, 5] # M[ieq, d[iinter+1][0]] = -SV_2[1, 0] # M[ieq, d[iinter+1][1]] = -SV_2[1, 1] # M[ieq, d[iinter+1][2]] = -SV_2[1, 2]*np.exp(-1j*k_y_2[0]*L[iinter+1].thickness) # M[ieq, d[iinter+1][3]] = -SV_2[1, 3]*np.exp(-1j*k_y_2[1]*L[iinter+1].thickness) # ieq += 1 # M[ieq, d[iinter+0][0]] = (SV_1[3, 0]-SV_1[4, 0])*np.exp(-1j*k_y_1[0]*L[iinter].thickness) # M[ieq, d[iinter+0][1]] = (SV_1[3, 1]-SV_1[4, 1])*np.exp(-1j*k_y_1[1]*L[iinter].thickness) # M[ieq, d[iinter+0][2]] = (SV_1[3, 2]-SV_1[4, 2])*np.exp(-1j*k_y_1[2]*L[iinter].thickness) # M[ieq, d[iinter+0][3]] = (SV_1[3, 3]-SV_1[4, 3]) # M[ieq, d[iinter+0][4]] = (SV_1[3, 4]-SV_1[4, 4]) # M[ieq, d[iinter+0][5]] = (SV_1[3, 5]-SV_1[4, 5]) # M[ieq, d[iinter+1][0]] = -SV_2[2, 0] # M[ieq, d[iinter+1][1]] = -SV_2[2, 1] # M[ieq, d[iinter+1][2]] = -SV_2[2, 2]*np.exp(-1j*k_y_2[0]*L[iinter+1].thickness) # M[ieq, d[iinter+1][3]] = -SV_2[2, 3]*np.exp(-1j*k_y_2[1]*L[iinter+1].thickness) # ieq += 1 # M[ieq, d[iinter+0][0]] = SV_1[5, 0]*np.exp(-1j*k_y_1[0]*L[iinter].thickness) # M[ieq, d[iinter+0][1]] = SV_1[5, 1]*np.exp(-1j*k_y_1[1]*L[iinter].thickness) # M[ieq, d[iinter+0][2]] = SV_1[5, 2]*np.exp(-1j*k_y_1[2]*L[iinter].thickness) # M[ieq, d[iinter+0][3]] = SV_1[5, 3] # M[ieq, d[iinter+0][4]] = SV_1[5, 4] # M[ieq, d[iinter+0][5]] = SV_1[5, 5] # M[ieq, d[iinter+1][0]] = -SV_2[3, 0] # M[ieq, d[iinter+1][1]] = -SV_2[3, 1] # M[ieq, d[iinter+1][2]] = -SV_2[3, 2]*np.exp(-1j*k_y_2[0]*L[iinter+1].thickness) # M[ieq, d[iinter+1][3]] = -SV_2[3, 3]*np.exp(-1j*k_y_2[1]*L[iinter+1].thickness) # ieq += 1 # return ieq # def interface_elastic_elastic(self, ieq, iinter, L, d, M): # SV_1, k_y_1 = elastic_SV(L[iinter].medium,self.kx, self.omega) # SV_2, k_y_2 = elastic_SV(L[iinter+1].medium,self.kx, self.omega) # for _i in range(4): # M[ieq, d[iinter+0][0]] = SV_1[_i, 0]*np.exp(-1j*k_y_1[0]*L[iinter].thickness) # M[ieq, d[iinter+0][1]] = SV_1[_i, 1]*np.exp(-1j*k_y_1[1]*L[iinter].thickness) # M[ieq, d[iinter+0][2]] = SV_1[_i, 2] # M[ieq, d[iinter+0][3]] = SV_1[_i, 3] # M[ieq, d[iinter+1][0]] = -SV_2[_i, 0] # M[ieq, d[iinter+1][1]] = -SV_2[_i, 1] # M[ieq, d[iinter+1][2]] = -SV_2[_i, 2]*np.exp(-1j*k_y_2[0]*L[iinter+1].thickness) # M[ieq, d[iinter+1][3]] = -SV_2[_i, 3]*np.exp(-1j*k_y_2[1]*L[iinter+1].thickness) # ieq += 1 # return ieq # def interface_fluid_elastic(self, ieq, iinter, L, d, M): # SV_1, k_y_1 = fluid_SV(self.kx, self.k, L[iinter].medium.K) # SV_2, k_y_2 = elastic_SV(L[iinter+1].medium, self.kx, self.omega) # # Continuity of u_y # M[ieq, d[iinter+0][0]] = SV_1[0, 0]*np.exp(-1j*k_y_1*L[iinter].thickness) # M[ieq, d[iinter+0][1]] = SV_1[0, 1] # M[ieq, d[iinter+1][0]] = -SV_2[1, 0] # M[ieq, d[iinter+1][1]] = -SV_2[1, 1] # M[ieq, d[iinter+1][2]] = -SV_2[1, 2]*np.exp(-1j*k_y_2[0]*L[iinter+1].thickness) # M[ieq, d[iinter+1][3]] = -SV_2[1, 3]*np.exp(-1j*k_y_2[1]*L[iinter+1].thickness) # ieq += 1 # # sigma_yy = -p # M[ieq, d[iinter+0][0]] = SV_1[1, 0]*np.exp(-1j*k_y_1*L[iinter].thickness) # M[ieq, d[iinter+0][1]] = SV_1[1, 1] # M[ieq, d[iinter+1][0]] = SV_2[2, 0] # M[ieq, d[iinter+1][1]] = SV_2[2, 1] # M[ieq, d[iinter+1][2]] = SV_2[2, 2]*np.exp(-1j*k_y_2[0]*L[iinter+1].thickness) # M[ieq, d[iinter+1][3]] = SV_2[2, 3]*np.exp(-1j*k_y_2[1]*L[iinter+1].thickness) # ieq += 1 # # sigma_xy = 0 # M[ieq, d[iinter+1][0]] = SV_2[0, 0] # M[ieq, d[iinter+1][1]] = SV_2[0, 1] # M[ieq, d[iinter+1][2]] = SV_2[0, 2]*np.exp(-1j*k_y_2[0]*L[iinter+1].thickness) # M[ieq, d[iinter+1][3]] = SV_2[0, 3]*np.exp(-1j*k_y_2[1]*L[iinter+1].thickness) # ieq += 1 # return ieq # def interface_pem_fluid(self, ieq, iinter, L, d, M): # SV_1, k_y_1 = PEM_SV(L[iinter].medium, self.kx) # SV_2, k_y_2 = fluid_SV(self.kx, self.k, L[iinter+1].medium.K) # # print(k_y_2) # M[ieq, d[iinter+0][0]] = -SV_1[2, 0]*np.exp(-1j*k_y_1[0]*L[iinter].thickness) # M[ieq, d[iinter+0][1]] = -SV_1[2, 1]*np.exp(-1j*k_y_1[1]*L[iinter].thickness) # M[ieq, d[iinter+0][2]] = -SV_1[2, 2]*np.exp(-1j*k_y_1[2]*L[iinter].thickness) # M[ieq, d[iinter+0][3]] = -SV_1[2, 3] # M[ieq, d[iinter+0][4]] = -SV_1[2, 4] # M[ieq, d[iinter+0][5]] = -SV_1[2, 5] # M[ieq, d[iinter+1][0]] = SV_2[0, 0] # M[ieq, d[iinter+1][1]] = SV_2[0, 1]*np.exp(-1j*k_y_2*L[iinter+1].thickness) # ieq += 1 # M[ieq, d[iinter+0][0]] = -SV_1[4, 0]*np.exp(-1j*k_y_1[0]*L[iinter].thickness) # M[ieq, d[iinter+0][1]] = -SV_1[4, 1]*np.exp(-1j*k_y_1[1]*L[iinter].thickness) # M[ieq, d[iinter+0][2]] = -SV_1[4, 2]*np.exp(-1j*k_y_1[2]*L[iinter].thickness) # M[ieq, d[iinter+0][3]] = -SV_1[4, 3] # M[ieq, d[iinter+0][4]] = -SV_1[4, 4] # M[ieq, d[iinter+0][5]] = -SV_1[4, 5] # M[ieq, d[iinter+1][0]] = SV_2[1, 0] # M[ieq, d[iinter+1][1]] = SV_2[1, 1]*np.exp(-1j*k_y_2*L[iinter+1].thickness) # ieq += 1 # M[ieq, d[iinter+0][0]] = SV_1[0, 0]*np.exp(-1j*k_y_1[0]*L[iinter].thickness) # M[ieq, d[iinter+0][1]] = SV_1[0, 1]*np.exp(-1j*k_y_1[1]*L[iinter].thickness) # M[ieq, d[iinter+0][2]] = SV_1[0, 2]*np.exp(-1j*k_y_1[2]*L[iinter].thickness) # M[ieq, d[iinter+0][3]] = SV_1[0, 3] # M[ieq, d[iinter+0][4]] = SV_1[0, 4] # M[ieq, d[iinter+0][5]] = SV_1[0, 5] # ieq += 1 # M[ieq, d[iinter+0][0]] = SV_1[3, 0]*np.exp(-1j*k_y_1[0]*L[iinter].thickness) # M[ieq, d[iinter+0][1]] = SV_1[3, 1]*np.exp(-1j*k_y_1[1]*L[iinter].thickness) # M[ieq, d[iinter+0][2]] = SV_1[3, 2]*np.exp(-1j*k_y_1[2]*L[iinter].thickness) # M[ieq, d[iinter+0][3]] = SV_1[3, 3] # M[ieq, d[iinter+0][4]] = SV_1[3, 4] # M[ieq, d[iinter+0][5]] = SV_1[3, 5] # ieq += 1 # return ieq # def interface_elastic_fluid(self, ieq, iinter, L, d, M): # SV_1, k_y_1 = elastic_SV(L[iinter].medium, self.kx, self.omega) # SV_2, k_y_2 = fluid_SV(self.kx, self.k, L[iinter+1].medium.K) # # Continuity of u_y # M[ieq, d[iinter+0][0]] = -SV_1[1, 0]*np.exp(-1j*k_y_1[0]*L[iinter].thickness) # M[ieq, d[iinter+0][1]] = -SV_1[1, 1]*np.exp(-1j*k_y_1[1]*L[iinter].thickness) # M[ieq, d[iinter+0][2]] = -SV_1[1, 2] # M[ieq, d[iinter+0][3]] = -SV_1[1, 3] # M[ieq, d[iinter+1][0]] = SV_2[0, 0] # M[ieq, d[iinter+1][1]] = SV_2[0, 1]*np.exp(-1j*k_y_2*L[iinter+1].thickness) # ieq += 1 # # sigma_yy = -p # M[ieq, d[iinter+0][0]] = SV_1[2, 0]*np.exp(-1j*k_y_1[0]*L[iinter].thickness) # M[ieq, d[iinter+0][1]] = SV_1[2, 1]*np.exp(-1j*k_y_1[1]*L[iinter].thickness) # M[ieq, d[iinter+0][2]] = SV_1[2, 2] # M[ieq, d[iinter+0][3]] = SV_1[2, 3] # M[ieq, d[iinter+1][0]] = SV_2[1, 0] # M[ieq, d[iinter+1][1]] = SV_2[1, 1]*np.exp(-1j*k_y_2*L[iinter+1].thickness) # ieq += 1 # # sigma_xy = 0 # M[ieq, d[iinter+0][0]] = SV_1[0, 0]*np.exp(-1j*k_y_1[0]*L[iinter].thickness) # M[ieq, d[iinter+0][1]] = SV_1[0, 1]*np.exp(-1j*k_y_1[1]*L[iinter].thickness) # M[ieq, d[iinter+0][2]] = SV_1[0, 2] # M[ieq, d[iinter+0][3]] = SV_1[0, 3] # ieq += 1 # return ieq # def interface_elastic_rigid(self, M, ieq, L, d): # SV, k_y = elastic_SV(L.medium,self.kx, self.omega) # M[ieq, d[0]] = SV[1, 0]*np.exp(-1j*k_y[0]*L.thickness) # M[ieq, d[1]] = SV[1, 1]*np.exp(-1j*k_y[1]*L.thickness) # M[ieq, d[2]] = SV[1, 2] # M[ieq, d[3]] = SV[1, 3] # ieq += 1 # M[ieq, d[0]] = SV[3, 0]*np.exp(-1j*k_y[0]*L.thickness) # M[ieq, d[1]] = SV[3, 1]*np.exp(-1j*k_y[1]*L.thickness) # M[ieq, d[2]] = SV[3, 2] # M[ieq, d[3]] = SV[3, 3] # ieq += 1 # return ieq # def interface_pem_rigid(self, M, ieq, L, d): # SV, k_y = PEM_SV(L.medium, self.kx) # M[ieq, d[0]] = SV[1, 0]*np.exp(-1j*k_y[0]*L.thickness) # M[ieq, d[1]] = SV[1, 1]*np.exp(-1j*k_y[1]*L.thickness) # M[ieq, d[2]] = SV[1, 2]*np.exp(-1j*k_y[2]*L.thickness) # M[ieq, d[3]] = SV[1, 3] # M[ieq, d[4]] = SV[1, 4] # M[ieq, d[5]] = SV[1, 5] # ieq += 1 # M[ieq, d[0]] = SV[2, 0]*np.exp(-1j*k_y[0]*L.thickness) # M[ieq, d[1]] = SV[2, 1]*np.exp(-1j*k_y[1]*L.thickness) # M[ieq, d[2]] = SV[2, 2]*np.exp(-1j*k_y[2]*L.thickness) # M[ieq, d[3]] = SV[2, 3] # M[ieq, d[4]] = SV[2, 4] # M[ieq, d[5]] = SV[2, 5] # ieq += 1 # M[ieq, d[0]] = SV[5, 0]*np.exp(-1j*k_y[0]*L.thickness) # M[ieq, d[1]] = SV[5, 1]*np.exp(-1j*k_y[1]*L.thickness) # M[ieq, d[2]] = SV[5, 2]*np.exp(-1j*k_y[2]*L.thickness) # M[ieq, d[3]] = SV[5, 3] # M[ieq, d[4]] = SV[5, 4] # M[ieq, d[5]] = SV[5, 5] # ieq += 1 # return ieq # def plot_sol_PW(self, X, dofs): # x_start = self.shift_plot # for _l, _layer in enumerate(self.layers): # x_f = np.linspace(0, _layer.thickness,200) # x_b = x_f-_layer.thickness # if _layer.medium.MODEL == "fluid": # SV, k_y = fluid_SV(self.kx, self.k, _layer.medium.K) # pr = SV[1, 0]*np.exp(-1j*k_y*x_f)*X[dofs[_l][0]] # pr += SV[1, 1]*np.exp( 1j*k_y*x_b)*X[dofs[_l][1]] # ut = SV[0, 0]*np.exp(-1j*k_y*x_f)*X[dofs[_l][0]] # ut += SV[0, 1]*np.exp( 1j*k_y*x_b)*X[dofs[_l][1]] # if self.plot[2]: # plt.figure(2) # plt.plot(x_start+x_f, np.abs(pr), 'r') # plt.plot(x_start+x_f, np.imag(pr), 'm') # plt.title("Pressure") # # plt.figure(5) # # plt.plot(x_start+x_f,np.abs(ut),'b') # # plt.plot(x_start+x_f,np.imag(ut),'k') # if _layer.medium.MODEL == "pem": # SV, k_y = PEM_SV(_layer.medium, self.kx) # ux, uy, pr, ut = 0*1j*x_f, 0*1j*x_f, 0*1j*x_f, 0*1j*x_f # for i_dim in range(3): # ux += SV[1, i_dim ]*np.exp(-1j*k_y[i_dim]*x_f)*X[dofs[_l][i_dim]] # ux += SV[1, i_dim+3]*np.exp( 1j*k_y[i_dim]*x_b)*X[dofs[_l][i_dim+3]] # uy += SV[5, i_dim ]*np.exp(-1j*k_y[i_dim]*x_f)*X[dofs[_l][i_dim]] # uy += SV[5, i_dim+3]*np.exp( 1j*k_y[i_dim]*x_b)*X[dofs[_l][i_dim+3]] # pr += SV[4, i_dim ]*np.exp(-1j*k_y[i_dim]*x_f)*X[dofs[_l][i_dim]] # pr += SV[4, i_dim+3]*np.exp( 1j*k_y[i_dim]*x_b)*X[dofs[_l][i_dim+3]] # ut += SV[2, i_dim ]*np.exp(-1j*k_y[i_dim]*x_f)*X[dofs[_l][i_dim]] # ut += SV[2, i_dim+3]*np.exp( 1j*k_y[i_dim]*x_b)*X[dofs[_l][i_dim+3]] # if self.plot[0]: # plt.figure(0) # plt.plot(x_start+x_f, np.abs(uy), 'r') # plt.plot(x_start+x_f, np.imag(uy), 'm') # plt.title("Solid displacement along x") # if self.plot[1]: # plt.figure(1) # plt.plot(x_start+x_f, np.abs(ux), 'r') # plt.plot(x_start+x_f, np.imag(ux), 'm') # plt.title("Solid displacement along y") # if self.plot[2]: # plt.figure(2) # plt.plot(x_start+x_f, np.abs(pr), 'r') # plt.plot(x_start+x_f, np.imag(pr), 'm') # plt.title("Pressure") # if _layer.medium.MODEL == "elastic": # SV, k_y = elastic_SV(_layer.medium, self.kx, self.omega) # ux, uy, pr, sig = 0*1j*x_f, 0*1j*x_f, 0*1j*x_f, 0*1j*x_f # for i_dim in range(2): # ux += SV[1, i_dim ]*np.exp(-1j*k_y[i_dim]*x_f)*X[dofs[_l][i_dim]] # ux += SV[1, i_dim+2]*np.exp( 1j*k_y[i_dim]*x_b)*X[dofs[_l][i_dim+2]] # uy += SV[3, i_dim ]*np.exp(-1j*k_y[i_dim]*x_f)*X[dofs[_l][i_dim]] # uy += SV[3, i_dim+2]*np.exp( 1j*k_y[i_dim]*x_b)*X[dofs[_l][i_dim+2]] # pr -= SV[2, i_dim ]*np.exp(-1j*k_y[i_dim]*x_f)*X[dofs[_l][i_dim]] # pr -= SV[2, i_dim+2]*np.exp( 1j*k_y[i_dim]*x_b)*X[dofs[_l][i_dim+2]] # sig -= SV[0, i_dim ]*np.exp(-1j*k_y[i_dim]*x_f)*X[dofs[_l][i_dim]] # sig -= SV[0, i_dim+2]*np.exp( 1j*k_y[i_dim]*x_b)*X[dofs[_l][i_dim+2]] # if self.plot[0]: # plt.figure(0) # plt.plot(x_start+x_f, np.abs(uy), 'r') # plt.plot(x_start+x_f, np.imag(uy), 'm') # plt.title("Solid displacement along x") # if self.plot[1]: # plt.figure(1) # plt.plot(x_start+x_f, np.abs(ux), 'r') # plt.plot(x_start+x_f, np.imag(ux), 'm') # plt.title("Solid displacement along y") # # if self.plot[2]: # # plt.figure(2) # # plt.plot(x_start+x_f, np.abs(pr), 'r') # # plt.plot(x_start+x_f, np.imag(pr), 'm') # # plt.title("Sigma_yy") # # if self.plot[2]: # # plt.figure(3) # # plt.plot(x_start+x_f, np.abs(sig), 'r') # # plt.plot(x_start+x_f, np.imag(sig), 'm') # # plt.title("Sigma_xy") # x_start += _layer.thickness # def PEM_SV(mat,ky): # ''' S={0:\hat{\sigma}_{xy}, 1:u_y^s, 2:u_y^t, 3:\hat{\sigma}_{yy}, 4:p, 5:u_x^s}''' # kx_1 = np.sqrt(mat.delta_1**2-ky**2) # kx_2 = np.sqrt(mat.delta_2**2-ky**2) # kx_3 = np.sqrt(mat.delta_3**2-ky**2) # kx = np.array([kx_1, kx_2, kx_3]) # delta = np.array([mat.delta_1, mat.delta_2, mat.delta_3]) # alpha_1 = -1j*mat.A_hat*mat.delta_1**2-1j*2*mat.N*kx[0]**2 # alpha_2 = -1j*mat.A_hat*mat.delta_2**2-1j*2*mat.N*kx[1]**2 # alpha_3 = -2*1j*mat.N*kx[2]*ky # SV = np.zeros((6,6), dtype=complex) # SV[0:6, 0] = np.array([-2*1j*mat.N*kx[0]*ky, kx[0], mat.mu_1*kx[0], alpha_1, 1j*delta[0]**2*mat.K_eq_til*mat.mu_1, ky]) # SV[0:6, 3] = np.array([ 2*1j*mat.N*kx[0]*ky,-kx[0],-mat.mu_1*kx[0], alpha_1, 1j*delta[0]**2*mat.K_eq_til*mat.mu_1, ky]) # SV[0:6, 1] = np.array([-2*1j*mat.N*kx[1]*ky, kx[1], mat.mu_2*kx[1],alpha_2, 1j*delta[1]**2*mat.K_eq_til*mat.mu_2, ky]) # SV[0:6, 4] = np.array([ 2*1j*mat.N*kx[1]*ky,-kx[1],-mat.mu_2*kx[1],alpha_2, 1j*delta[1]**2*mat.K_eq_til*mat.mu_2, ky]) # SV[0:6, 2] = np.array([1j*mat.N*(kx[2]**2-ky**2), ky, mat.mu_3*ky, alpha_3, 0., -kx[2]]) # SV[0:6, 5] = np.array([1j*mat.N*(kx[2]**2-ky**2), ky, mat.mu_3*ky, -alpha_3, 0., kx[2]]) # return SV, kx # def elastic_SV(mat,ky, omega): # ''' S={0:\sigma_{xy}, 1: u_y, 2 \sigma_{yy}, 3 u_x}''' # P_mat = mat.lambda_ + 2.*mat.mu # delta_p = omega*np.sqrt(mat.rho/P_mat) # delta_s = omega*np.sqrt(mat.rho/mat.mu) # kx_p = np.sqrt(delta_p**2-ky**2) # kx_s = np.sqrt(delta_s**2-ky**2) # kx = np.array([kx_p, kx_s]) # alpha_p = -1j*mat.lambda_*delta_p**2 - 2j*mat.mu*kx[0]**2 # alpha_s = 2j*mat.mu*kx[1]*ky # SV = np.zeros((4, 4), dtype=np.complex) # SV[0:4, 0] = np.array([-2.*1j*mat.mu*kx[0]*ky, kx[0], alpha_p, ky]) # SV[0:4, 2] = np.array([ 2.*1j*mat.mu*kx[0]*ky, -kx[0], alpha_p, ky]) # SV[0:4, 1] = np.array([1j*mat.mu*(kx[1]**2-ky**2), ky,-alpha_s, -kx[1]]) # SV[0:4, 3] = np.array([1j*mat.mu*(kx[1]**2-ky**2), ky, alpha_s, kx[1]]) # return SV, kx # def fluid_SV(kx, k, K): # ''' S={0:u_y , 1:p}''' # ky = np.sqrt(k**2-kx**2) # SV = np.zeros((2, 2), dtype=complex) # SV[0, 0:2] = np.array([ky/(1j*K*k**2), -ky/(1j*K*k**2)]) # SV[1, 0:2] = np.array([1, 1]) # return SV, ky # def resolution_PW_imposed_displacement(S, p): # # print("k={}".format(p.k)) # Layers = S.layers.copy() # n, interfaces, dofs = initialise_PW_solver(Layers, S.backing) # M = np.zeros((n, n), dtype=complex) # i_eq = 0 # # Loop on the layers # for i_inter, _inter in enumerate(interfaces): # if _inter[0] == "fluid": # if _inter[1] == "fluid": # i_eq = interface_fluid_fluid(i_eq, i_inter, Layers, dofs, M, p) # if _inter[1] == "pem": # i_eq = interface_fluid_pem(i_eq, i_inter, Layers, dofs, M, p) # elif _inter[0] == "pem": # if _inter[1] == "fluid": # i_eq = interface_pem_fluid(i_eq, i_inter, Layers, dofs, M, p) # if _inter[1] == "pem": # i_eq = interface_pem_pem(i_eq, i_inter, Layers, dofs, M, p) # if S.backing == backing.rigid: # if Layers[-1].medium.MODEL == "fluid": # i_eq = interface_fluid_rigid(M, i_eq, Layers[-1], dofs[-1], p) # elif Layers[-1].medium.MODEL == "pem": # i_eq = interface_pem_rigid(M, i_eq, Layers[-1], dofs[-1], p) # if Layers[0].medium.MODEL == "fluid": # F = np.zeros(n, dtype=complex) # SV, k_y = fluid_SV(p.kx, p.k, Layers[0].medium.K) # M[i_eq, dofs[0][0]] = SV[0, 0] # M[i_eq, dofs[0][1]] = SV[0, 1]*np.exp(-1j*k_y*Layers[0].thickness) # F[i_eq] = 1. # elif Layers[0].medium.MODEL == "pem": # SV, k_y = PEM_SV(Layers[0].medium, p.kx) # M[i_eq, dofs[0][0]] = SV[2, 0] # M[i_eq, dofs[0][1]] = SV[2, 1] # M[i_eq, dofs[0][2]] = SV[2, 2] # M[i_eq, dofs[0][3]] = SV[2, 3]*np.exp(-1j*k_y[0]*Layers[0].thickness) # M[i_eq, dofs[0][4]] = SV[2, 4]*np.exp(-1j*k_y[1]*Layers[0].thickness) # M[i_eq, dofs[0][5]] = SV[2, 5]*np.exp(-1j*k_y[2]*Layers[0].thickness) # F = np.zeros(n, dtype=complex) # F[i_eq] = 1. # i_eq +=1 # M[i_eq, dofs[0][0]] = SV[0, 0] # M[i_eq, dofs[0][1]] = SV[0, 1] # M[i_eq, dofs[0][2]] = SV[0, 2] # M[i_eq, dofs[0][3]] = SV[0, 3]*np.exp(-1j*k_y[0]*Layers[0].thickness) # M[i_eq, dofs[0][4]] = SV[0, 4]*np.exp(-1j*k_y[1]*Layers[0].thickness) # M[i_eq, dofs[0][5]] = SV[0, 5]*np.exp(-1j*k_y[2]*Layers[0].thickness) # i_eq += 1 # M[i_eq, dofs[0][0]] = SV[3, 0] # M[i_eq, dofs[0][1]] = SV[3, 1] # M[i_eq, dofs[0][2]] = SV[3, 2] # M[i_eq, dofs[0][3]] = SV[3, 3]*np.exp(-1j*k_y[0]*Layers[0].thickness) # M[i_eq, dofs[0][4]] = SV[3, 4]*np.exp(-1j*k_y[1]*Layers[0].thickness) # M[i_eq, dofs[0][5]] = SV[3, 5]*np.exp(-1j*k_y[2]*Layers[0].thickness) # X = LA.solve(M, F) # # print("|R pyPLANES_PW| = {}".format(np.abs(X[0]))) # print("R pyPLANES_PW = {}".format(X[0])) # plot_sol_PW(S, X, dofs, p)
[ 1, 396, 29991, 847, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 448, 29930, 29899, 14137, 29901, 9420, 29947, 448, 29930, 29899, 13, 29937, 13, 29937, 282, 29893, 29918, 13203, 29889, 2272, 13, 29937, 13, 29937, 910, 934, 338, 760, 310, 11451, 9018, 267, 29892, 263, 7047, 13235, 1090, 278, 341, 1806, 19405, 29889, 13, 29937, 1152, 738, 1139, 29892, 3113, 6958, 697, 310, 278, 15717, 274, 1573, 2400, 29889, 13, 29937, 13, 29937, 14187, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29906, 29900, 13, 29937, 29871, 12, 29966, 5813, 29958, 3532, 26862, 6227, 6778, 13, 29937, 29871, 12, 29966, 5813, 29958, 3532, 26862, 6227, 6778, 13, 29937, 29871, 12, 29966, 5813, 29958, 3532, 26862, 6227, 6778, 13, 29937, 13, 29937, 20894, 2333, 338, 1244, 1609, 16896, 29892, 3889, 310, 8323, 29892, 304, 738, 2022, 4017, 292, 263, 3509, 13, 29937, 310, 445, 7047, 322, 6942, 5106, 2066, 313, 1552, 376, 6295, 14093, 4968, 304, 5376, 13, 29937, 297, 278, 18540, 1728, 24345, 29892, 3704, 1728, 29485, 278, 10462, 13, 29937, 304, 671, 29892, 3509, 29892, 6623, 29892, 10366, 29892, 9805, 29892, 1320, 2666, 29892, 269, 803, 1947, 29892, 322, 29914, 272, 19417, 13, 29937, 14591, 310, 278, 18540, 29892, 322, 304, 14257, 12407, 304, 6029, 278, 18540, 338, 13, 29937, 15252, 3276, 304, 437, 577, 29892, 4967, 304, 278, 1494, 5855, 29901, 13, 29937, 13, 29937, 450, 2038, 3509, 1266, 8369, 322, 445, 10751, 8369, 4091, 367, 5134, 297, 599, 13, 29937, 14591, 470, 23228, 2011, 1080, 310, 278, 18540, 29889, 13, 29937, 13, 13, 5215, 12655, 408, 7442, 13, 5215, 12655, 29889, 29880, 979, 29887, 408, 17900, 13, 5215, 22889, 29889, 2272, 5317, 408, 14770, 13, 13, 3166, 5745, 4058, 1053, 515, 29918, 25162, 13, 3166, 5745, 4058, 1053, 5593, 29892, 349, 12665, 29892, 12345, 8754, 5416, 29967, 5454, 13, 13, 3166, 11451, 7390, 2190, 2890, 29889, 13239, 29889, 601, 1053, 2847, 4371, 29918, 449, 29918, 5325, 29918, 24595, 13, 3166, 11451, 7390, 2190, 2890, 29889, 3221, 29889, 15807, 375, 1053, 349, 29893, 27065, 375, 13, 3166, 11451, 7390, 2190, 2890, 29889, 3221, 29889, 4713, 309, 2747, 1053, 14974, 14420, 13, 13, 3166, 11451, 7390, 2190, 2890, 29889, 29886, 29893, 29889, 29886, 29893, 29918, 29277, 1053, 2379, 5416, 14420, 13, 3166, 11451, 7390, 2190, 2890, 29889, 29886, 29893, 29889, 29886, 29893, 29918, 1639, 8726, 1053, 2379, 5416, 8754, 5416, 10448, 29892, 390, 335, 333, 5841, 292, 13, 13, 29909, 381, 353, 5593, 580, 13, 13, 29937, 822, 2847, 895, 29918, 29925, 29956, 29918, 2929, 369, 29898, 29931, 29892, 289, 1125, 13, 29937, 268, 302, 29890, 29918, 29925, 29956, 353, 29871, 29900, 13, 29937, 268, 437, 5847, 353, 5159, 13, 29937, 268, 363, 903, 13148, 297, 365, 29901, 13, 29937, 308, 565, 903, 13148, 29889, 27891, 29889, 20387, 29931, 1275, 376, 1579, 5416, 1115, 13, 29937, 632, 437, 5847, 29889, 4397, 29898, 9877, 29918, 29925, 29956, 29974, 9302, 29889, 279, 927, 29898, 29906, 876, 13, 29937, 632, 302, 29890, 29918, 29925, 29956, 4619, 29871, 29906, 13, 29937, 308, 25342, 903, 13148, 29889, 27891, 29889, 20387, 29931, 1275, 376, 29886, 331, 1115, 13, 29937, 632, 437, 5847, 29889, 4397, 29898, 9877, 29918, 29925, 29956, 29974, 9302, 29889, 279, 927, 29898, 29953, 876, 13, 29937, 632, 302, 29890, 29918, 29925, 29956, 4619, 29871, 29953, 13, 29937, 308, 25342, 903, 13148, 29889, 27891, 29889, 20387, 29931, 1275, 376, 295, 6288, 1115, 13, 29937, 632, 437, 5847, 29889, 4397, 29898, 9877, 29918, 29925, 29956, 29974, 9302, 29889, 279, 927, 29898, 29946, 876, 13, 29937, 632, 302, 29890, 29918, 29925, 29956, 4619, 29871, 29946, 13, 29937, 268, 5067, 353, 5159, 13, 29937, 268, 363, 474, 29918, 29880, 29892, 903, 13148, 297, 26985, 29898, 29931, 7503, 29899, 29896, 29962, 1125, 13, 29937, 308, 5067, 29889, 4397, 3552, 29931, 29961, 29875, 29918, 29880, 1822, 27891, 29889, 20387, 29931, 29892, 365, 29961, 29875, 29918, 29880, 29974, 29896, 1822, 27891, 29889, 20387, 29931, 876, 13, 29937, 268, 736, 302, 29890, 29918, 29925, 29956, 29892, 5067, 29892, 437, 5847, 13, 13, 13, 1990, 349, 29893, 26604, 29898, 29925, 29893, 27065, 375, 29892, 14974, 14420, 1125, 13, 1678, 9995, 13, 4706, 1858, 1662, 399, 1351, 11583, 29871, 13, 1678, 9995, 29871, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 3579, 19290, 1125, 13, 4706, 349, 29893, 27065, 375, 17255, 2344, 12035, 1311, 29892, 3579, 19290, 29897, 13, 4706, 1840, 3381, 353, 9049, 5085, 29889, 657, 703, 18821, 362, 3284, 8966, 333, 1159, 13, 4706, 1583, 29889, 5696, 353, 9049, 5085, 29889, 657, 703, 18821, 362, 3284, 10945, 1159, 13, 13, 4706, 14974, 14420, 17255, 2344, 12035, 1311, 29892, 3579, 19290, 29897, 13, 13, 4706, 1583, 29889, 29895, 29916, 29892, 1583, 29889, 3459, 29892, 1583, 29889, 29895, 353, 6213, 29892, 6213, 29892, 6213, 13, 4706, 1583, 29889, 10889, 29918, 5317, 353, 9049, 5085, 29889, 657, 703, 10889, 29918, 29886, 29893, 613, 29871, 29900, 1846, 13, 4706, 1583, 29889, 5317, 353, 9049, 5085, 29889, 657, 703, 5317, 29918, 9902, 613, 518, 8824, 14178, 29953, 29897, 13, 4706, 1583, 29889, 2914, 353, 6571, 13, 4706, 1583, 29889, 449, 5325, 29918, 12322, 353, 7700, 13, 13, 4706, 565, 1583, 29889, 5696, 1275, 376, 10945, 1115, 13, 9651, 1583, 29889, 29277, 29889, 7851, 29898, 29900, 29892, 8754, 5416, 14420, 29898, 29909, 381, 29892, 29896, 29889, 29872, 29899, 29906, 876, 13, 9651, 565, 1583, 29889, 29277, 29961, 29896, 1822, 27891, 29889, 2303, 4571, 5005, 29918, 11116, 1275, 376, 1579, 5416, 1115, 13, 18884, 1583, 29889, 1639, 8726, 29889, 4397, 29898, 8754, 5416, 8754, 5416, 10448, 29898, 1311, 29889, 29277, 29961, 29900, 1402, 1311, 29889, 29277, 29961, 29896, 12622, 13, 9651, 1583, 29889, 9877, 29918, 29925, 29956, 353, 29871, 29900, 13, 9651, 363, 903, 13148, 297, 1583, 29889, 29277, 29901, 13, 18884, 565, 903, 13148, 29889, 27891, 29889, 20387, 29931, 1275, 376, 1579, 5416, 1115, 13, 462, 1678, 903, 13148, 29889, 29881, 974, 29879, 353, 1583, 29889, 9877, 29918, 29925, 29956, 29974, 9302, 29889, 279, 927, 29898, 29906, 29897, 13, 462, 1678, 1583, 29889, 9877, 29918, 29925, 29956, 4619, 29871, 29906, 13, 18884, 25342, 903, 13148, 29889, 27891, 29889, 20387, 29931, 1275, 376, 29886, 331, 1115, 13, 462, 1678, 903, 13148, 29889, 29881, 974, 29879, 353, 1583, 29889, 9877, 29918, 29925, 29956, 29974, 9302, 29889, 279, 927, 29898, 29953, 29897, 13, 462, 1678, 1583, 29889, 9877, 29918, 29925, 29956, 4619, 29871, 29953, 13, 18884, 25342, 903, 13148, 29889, 27891, 29889, 20387, 29931, 1275, 376, 295, 6288, 1115, 13, 462, 1678, 903, 13148, 29889, 29881, 974, 29879, 353, 1583, 29889, 9877, 29918, 29925, 29956, 29974, 9302, 29889, 279, 927, 29898, 29946, 29897, 13, 462, 1678, 1583, 29889, 9877, 29918, 29925, 29956, 4619, 29871, 29946, 13, 13, 13, 1678, 822, 2767, 29918, 10745, 23860, 29898, 1311, 29892, 285, 1125, 13, 4706, 349, 29893, 27065, 375, 29889, 5504, 29918, 10745, 23860, 29898, 1311, 29892, 285, 29897, 13, 4706, 14974, 14420, 29889, 5504, 29918, 10745, 23860, 29898, 1311, 29892, 285, 29892, 1583, 29889, 29895, 29892, 1583, 29889, 29895, 29916, 29897, 13, 13, 13, 1678, 822, 1653, 29918, 10660, 29918, 5205, 29898, 1311, 29892, 285, 1125, 13, 4706, 1583, 29889, 29909, 353, 7442, 29889, 3298, 359, 3552, 1311, 29889, 9877, 29918, 29925, 29956, 29899, 29896, 29892, 1583, 29889, 9877, 29918, 29925, 29956, 511, 26688, 29922, 19676, 29897, 13, 4706, 474, 29918, 1837, 353, 29871, 29900, 13, 4706, 396, 21493, 373, 278, 19510, 13, 4706, 363, 903, 524, 297, 1583, 29889, 1639, 8726, 29901, 13, 9651, 565, 1583, 29889, 5696, 1275, 376, 10945, 1115, 13, 18884, 474, 29918, 1837, 353, 903, 524, 29889, 5504, 29918, 29924, 29918, 10945, 29898, 1311, 29889, 29909, 29892, 474, 29918, 1837, 29897, 13, 308, 13, 13, 13, 13, 4706, 396, 363, 474, 29918, 1639, 29892, 903, 1639, 297, 26985, 29898, 1311, 29889, 1639, 8726, 1125, 13, 4706, 396, 268, 565, 903, 1639, 29961, 29900, 29962, 1275, 376, 1579, 5416, 1115, 13, 4706, 396, 308, 565, 903, 1639, 29961, 29896, 29962, 1275, 376, 1579, 5416, 1115, 13, 4706, 396, 632, 474, 29918, 1837, 353, 1583, 29889, 13248, 29918, 1579, 5416, 29918, 1579, 5416, 29898, 29875, 29918, 1837, 29892, 474, 29918, 1639, 29892, 365, 388, 414, 29892, 437, 5847, 29892, 341, 29897, 13, 4706, 396, 308, 565, 903, 1639, 29961, 29896, 29962, 1275, 376, 29886, 331, 1115, 13, 4706, 396, 632, 474, 29918, 1837, 353, 1583, 29889, 13248, 29918, 1579, 5416, 29918, 29886, 331, 29898, 29875, 29918, 1837, 29892, 474, 29918, 1639, 29892, 365, 388, 414, 29892, 437, 5847, 29892, 341, 29897, 13, 4706, 396, 308, 565, 903, 1639, 29961, 29896, 29962, 1275, 376, 295, 6288, 1115, 13, 4706, 396, 632, 474, 29918, 1837, 353, 1583, 29889, 13248, 29918, 1579, 5416, 29918, 295, 6288, 29898, 29875, 29918, 1837, 29892, 474, 29918, 1639, 29892, 365, 388, 414, 29892, 437, 5847, 29892, 341, 29897, 13, 4706, 396, 268, 25342, 903, 1639, 29961, 29900, 29962, 1275, 376, 29886, 331, 1115, 13, 4706, 396, 308, 565, 903, 1639, 29961, 29896, 29962, 1275, 376, 1579, 5416, 1115, 13, 4706, 396, 632, 474, 29918, 1837, 353, 1583, 29889, 13248, 29918, 29886, 331, 29918, 1579, 5416, 29898, 29875, 29918, 1837, 29892, 474, 29918, 1639, 29892, 365, 388, 414, 29892, 437, 5847, 29892, 341, 29897, 13, 4706, 396, 308, 565, 903, 1639, 29961, 29896, 29962, 1275, 376, 29886, 331, 1115, 13, 4706, 396, 632, 474, 29918, 1837, 353, 1583, 29889, 13248, 29918, 29886, 331, 29918, 29886, 331, 29898, 29875, 29918, 1837, 29892, 474, 29918, 1639, 29892, 365, 388, 414, 29892, 437, 5847, 29892, 341, 29897, 13, 4706, 396, 308, 565, 903, 1639, 29961, 29896, 29962, 1275, 376, 295, 6288, 1115, 13, 4706, 396, 632, 474, 29918, 1837, 353, 1583, 29889, 13248, 29918, 29886, 331, 29918, 295, 6288, 29898, 29875, 29918, 1837, 29892, 474, 29918, 1639, 29892, 365, 388, 414, 29892, 437, 5847, 29892, 341, 29897, 13, 4706, 396, 268, 25342, 903, 1639, 29961, 29900, 29962, 1275, 376, 295, 6288, 1115, 13, 4706, 396, 308, 565, 903, 1639, 29961, 29896, 29962, 1275, 376, 1579, 5416, 1115, 13, 4706, 396, 632, 474, 29918, 1837, 353, 1583, 29889, 13248, 29918, 295, 6288, 29918, 1579, 5416, 29898, 29875, 29918, 1837, 29892, 474, 29918, 1639, 29892, 365, 388, 414, 29892, 437, 5847, 29892, 341, 29897, 13, 4706, 396, 308, 565, 903, 1639, 29961, 29896, 29962, 1275, 376, 29886, 331, 1115, 13, 4706, 396, 632, 474, 29918, 1837, 353, 1583, 29889, 13248, 29918, 295, 6288, 29918, 29886, 331, 29898, 29875, 29918, 1837, 29892, 474, 29918, 1639, 29892, 365, 388, 414, 29892, 437, 5847, 29892, 341, 29897, 13, 4706, 396, 308, 565, 903, 1639, 29961, 29896, 29962, 1275, 376, 295, 6288, 1115, 13, 4706, 396, 632, 474, 29918, 1837, 353, 1583, 29889, 13248, 29918, 295, 6288, 29918, 295, 6288, 29898, 29875, 29918, 1837, 29892, 474, 29918, 1639, 29892, 365, 388, 414, 29892, 437, 5847, 29892, 341, 29897, 13, 4706, 396, 565, 1583, 29889, 1627, 292, 1275, 27436, 29889, 8966, 333, 29901, 13, 4706, 396, 268, 565, 365, 388, 414, 14352, 29896, 1822, 27891, 29889, 20387, 29931, 1275, 376, 1579, 5416, 1115, 13, 4706, 396, 308, 474, 29918, 1837, 353, 1583, 29889, 13248, 29918, 1579, 5416, 29918, 8966, 333, 29898, 29924, 29892, 474, 29918, 1837, 29892, 365, 388, 414, 14352, 29896, 1402, 437, 5847, 14352, 29896, 29962, 1723, 13, 4706, 396, 268, 25342, 365, 388, 414, 14352, 29896, 1822, 27891, 29889, 20387, 29931, 1275, 376, 29886, 331, 1115, 13, 4706, 396, 308, 474, 29918, 1837, 353, 1583, 29889, 13248, 29918, 29886, 331, 29918, 8966, 333, 29898, 29924, 29892, 474, 29918, 1837, 29892, 365, 388, 414, 14352, 29896, 1402, 437, 5847, 14352, 29896, 2314, 13, 4706, 396, 268, 25342, 365, 388, 414, 14352, 29896, 1822, 27891, 29889, 20387, 29931, 1275, 376, 295, 6288, 1115, 13, 4706, 396, 308, 474, 29918, 1837, 353, 1583, 29889, 13248, 29918, 295, 6288, 29918, 8966, 333, 29898, 29924, 29892, 474, 29918, 1837, 29892, 365, 388, 414, 14352, 29896, 1402, 437, 5847, 14352, 29896, 2314, 13, 4706, 396, 25342, 1583, 29889, 1627, 292, 1275, 376, 3286, 6737, 1115, 13, 4706, 396, 268, 474, 29918, 1837, 353, 1583, 29889, 12846, 29875, 29918, 262, 18925, 29918, 27891, 29898, 29924, 29892, 474, 29918, 1837, 29892, 365, 388, 414, 14352, 29896, 1402, 437, 5847, 14352, 29896, 29962, 1723, 13, 13, 4706, 1583, 29889, 29943, 353, 448, 1311, 29889, 29909, 7503, 29892, 29871, 29900, 14178, 9302, 29889, 4548, 29898, 29896, 29926, 29930, 1311, 29889, 3459, 29930, 1311, 29889, 29277, 29961, 29900, 1822, 29881, 29897, 396, 448, 338, 363, 1301, 3283, 29892, 25658, 1840, 338, 363, 278, 8576, 9500, 13, 4706, 1583, 29889, 29909, 353, 7442, 29889, 8143, 29898, 1311, 29889, 29909, 29892, 29871, 29900, 29892, 9685, 29922, 29896, 29897, 13, 4706, 396, 1596, 29898, 1311, 29889, 29909, 29897, 13, 4706, 1060, 353, 17900, 29889, 2929, 345, 29898, 1311, 29889, 29909, 29892, 1583, 29889, 29943, 29897, 13, 4706, 396, 1596, 29898, 29990, 29897, 13, 4706, 396, 390, 29918, 2272, 7390, 2190, 2890, 29918, 29925, 29956, 353, 1060, 29961, 29900, 29962, 13, 4706, 396, 565, 1583, 29889, 1627, 292, 1275, 376, 3286, 6737, 1115, 13, 4706, 396, 268, 323, 29918, 2272, 7390, 2190, 2890, 29918, 29925, 29956, 353, 1060, 14352, 29906, 29962, 13, 4706, 396, 1683, 29901, 13, 4706, 396, 268, 323, 29918, 2272, 7390, 2190, 2890, 29918, 29925, 29956, 353, 29871, 29900, 29889, 13, 4706, 396, 1060, 353, 7442, 29889, 8143, 29898, 29990, 29892, 29871, 29900, 29897, 13, 4706, 396, 628, 29898, 29881, 974, 29879, 29961, 29900, 2314, 13, 4706, 396, 363, 474, 29892, 903, 430, 297, 26985, 29898, 29881, 974, 29879, 1125, 13, 4706, 396, 268, 437, 5847, 29961, 29875, 29962, 22361, 29871, 29906, 13, 4706, 396, 565, 1583, 29889, 5317, 29901, 13, 4706, 396, 268, 1583, 29889, 5317, 29918, 2929, 29918, 29925, 29956, 29898, 29990, 29892, 437, 5847, 29897, 13, 4706, 396, 714, 3366, 29934, 3108, 353, 390, 29918, 2272, 7390, 2190, 2890, 29918, 29925, 29956, 13, 4706, 396, 714, 3366, 29911, 3108, 353, 323, 29918, 2272, 7390, 2190, 2890, 29918, 29925, 29956, 13, 4706, 396, 736, 714, 13, 13, 13, 13, 13, 13, 29937, 770, 4956, 369, 29918, 29925, 29956, 29898, 29925, 29893, 27065, 375, 1125, 13, 29937, 268, 822, 4770, 2344, 12035, 1311, 29892, 3579, 19290, 1125, 13, 29937, 308, 349, 29893, 27065, 375, 17255, 2344, 12035, 1311, 29892, 3579, 19290, 29897, 13, 29937, 308, 286, 29880, 353, 9049, 5085, 29889, 657, 703, 828, 1159, 13, 29937, 308, 1840, 3381, 353, 9049, 5085, 29889, 657, 703, 18821, 362, 1159, 13, 29937, 308, 1583, 29889, 29277, 353, 5159, 13, 29937, 308, 363, 903, 29880, 297, 286, 29880, 29901, 13, 29937, 632, 565, 903, 29880, 29961, 29900, 29962, 1275, 376, 29909, 381, 1115, 13, 29937, 462, 1775, 353, 5593, 13, 29937, 632, 1683, 29901, 13, 29937, 462, 1775, 353, 515, 29918, 25162, 7373, 29880, 29961, 29900, 10062, 1642, 25162, 1159, 13, 29937, 632, 270, 353, 903, 29880, 29961, 29896, 29962, 13, 29937, 632, 1583, 29889, 29277, 29889, 4397, 29898, 14420, 29898, 2922, 29892, 29881, 876, 13, 29937, 308, 565, 1840, 3381, 297, 6796, 3286, 613, 376, 3286, 6737, 3284, 4300, 6737, 3108, 29901, 13, 29937, 632, 1583, 29889, 1627, 292, 353, 376, 4300, 6737, 29908, 13, 29937, 308, 1683, 29901, 13, 29937, 632, 1583, 29889, 1627, 292, 353, 27436, 29889, 8966, 333, 13, 13, 29937, 308, 1583, 29889, 29895, 29916, 29892, 1583, 29889, 3459, 29892, 1583, 29889, 29895, 353, 6213, 29892, 6213, 29892, 6213, 13, 29937, 308, 1583, 29889, 10889, 29918, 5317, 353, 9049, 5085, 29889, 657, 703, 10889, 29918, 29886, 29893, 613, 29871, 29900, 1846, 13, 29937, 308, 1583, 29889, 5317, 353, 9049, 5085, 29889, 657, 703, 5317, 29918, 9902, 613, 518, 8824, 14178, 29953, 29897, 13, 29937, 308, 1583, 29889, 2914, 353, 6571, 13, 29937, 308, 1583, 29889, 449, 5325, 29918, 12322, 353, 7700, 13, 29937, 308, 2847, 4371, 29918, 449, 29918, 5325, 29918, 24595, 29898, 1311, 29897, 13, 13, 29937, 268, 822, 2436, 29918, 449, 29918, 5325, 29898, 1311, 29892, 714, 1125, 13, 13, 29937, 308, 1583, 29889, 449, 29918, 1445, 29889, 3539, 703, 25641, 29889, 29896, 29906, 29872, 1012, 29873, 1642, 4830, 29898, 1311, 29889, 3784, 29918, 10745, 23860, 876, 13, 29937, 308, 6425, 353, 29871, 29896, 29899, 9302, 29889, 6897, 29898, 449, 3366, 29934, 20068, 1068, 29906, 13, 29937, 308, 1583, 29889, 449, 29918, 1445, 29889, 3539, 703, 25641, 29889, 29896, 29906, 29872, 1012, 29873, 1642, 4830, 29898, 6897, 876, 13, 29937, 308, 1583, 29889, 449, 29918, 1445, 29889, 3539, 14182, 29876, 1159, 13, 13, 13, 13, 13, 29937, 268, 822, 5067, 29918, 1579, 5416, 29918, 1579, 5416, 29898, 1311, 29892, 19282, 29939, 29892, 474, 1639, 29892, 365, 29892, 270, 29892, 341, 1125, 13, 29937, 308, 13955, 29918, 29896, 29892, 413, 29918, 29891, 29918, 29896, 353, 22576, 29918, 7597, 29898, 1311, 29889, 29895, 29916, 29892, 1583, 29889, 29895, 29892, 365, 29961, 29875, 1639, 1822, 27891, 29889, 29968, 29897, 13, 29937, 308, 13955, 29918, 29906, 29892, 413, 29918, 29891, 29918, 29906, 353, 22576, 29918, 7597, 29898, 1311, 29889, 29895, 29916, 29892, 1583, 29889, 29895, 29892, 365, 29961, 29875, 1639, 29974, 29896, 1822, 27891, 29889, 29968, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29900, 5262, 353, 13955, 29918, 29896, 29961, 29900, 29892, 29871, 29900, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29896, 29930, 29931, 29961, 29875, 1639, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29896, 5262, 353, 13955, 29918, 29896, 29961, 29900, 29892, 29871, 29896, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29900, 5262, 353, 448, 7597, 29918, 29906, 29961, 29900, 29892, 29871, 29900, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29896, 5262, 353, 448, 7597, 29918, 29906, 29961, 29900, 29892, 29871, 29896, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29906, 29930, 29931, 29961, 29875, 1639, 29974, 29896, 1822, 27996, 2264, 29897, 13, 29937, 308, 19282, 29939, 4619, 29871, 29896, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29900, 5262, 353, 13955, 29918, 29896, 29961, 29896, 29892, 29871, 29900, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29896, 29930, 29931, 29961, 29875, 1639, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29896, 5262, 353, 13955, 29918, 29896, 29961, 29896, 29892, 29871, 29896, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29900, 5262, 353, 448, 7597, 29918, 29906, 29961, 29896, 29892, 29871, 29900, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29896, 5262, 353, 448, 7597, 29918, 29906, 29961, 29896, 29892, 29871, 29896, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29906, 29930, 29931, 29961, 29875, 1639, 29974, 29896, 1822, 27996, 2264, 29897, 13, 29937, 308, 19282, 29939, 4619, 29871, 29896, 13, 29937, 308, 736, 19282, 29939, 13, 13, 29937, 268, 822, 5067, 29918, 1579, 5416, 29918, 8966, 333, 29898, 1311, 29892, 341, 29892, 19282, 29939, 29892, 365, 29892, 270, 1125, 13, 29937, 308, 13955, 29892, 413, 29918, 29891, 353, 22576, 29918, 7597, 29898, 1311, 29889, 29895, 29916, 29892, 1583, 29889, 29895, 29892, 365, 29889, 27891, 29889, 29968, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29900, 5262, 353, 13955, 29961, 29900, 29892, 29871, 29900, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29930, 29931, 29889, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29896, 5262, 353, 13955, 29961, 29900, 29892, 29871, 29896, 29962, 13, 29937, 308, 19282, 29939, 4619, 29871, 29896, 13, 29937, 308, 736, 19282, 29939, 13, 13, 29937, 268, 822, 12647, 29918, 262, 18925, 29918, 27891, 29898, 1311, 29892, 341, 29892, 19282, 29939, 29892, 365, 29892, 270, 1125, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29896, 5262, 353, 29871, 29896, 29889, 13, 29937, 308, 19282, 29939, 4619, 29871, 29896, 13, 29937, 308, 736, 19282, 29939, 13, 13, 29937, 268, 822, 5067, 29918, 29886, 331, 29918, 29886, 331, 29898, 1311, 29892, 19282, 29939, 29892, 474, 1639, 29892, 365, 29892, 270, 29892, 341, 1125, 13, 29937, 308, 13955, 29918, 29896, 29892, 413, 29918, 29891, 29918, 29896, 353, 349, 12665, 29918, 7597, 29898, 29931, 29961, 29875, 1639, 1822, 27891, 29892, 1583, 29889, 29895, 29916, 29897, 13, 29937, 308, 13955, 29918, 29906, 29892, 413, 29918, 29891, 29918, 29906, 353, 349, 12665, 29918, 7597, 29898, 29931, 29961, 29875, 1639, 29974, 29896, 1822, 27891, 29892, 1583, 29889, 29895, 29916, 29897, 13, 29937, 308, 363, 903, 29875, 297, 3464, 29898, 29953, 1125, 13, 29937, 632, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29900, 5262, 353, 29871, 13955, 29918, 29896, 28513, 29875, 29892, 29871, 29900, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29896, 29961, 29900, 14178, 29931, 29961, 29875, 1639, 1822, 27996, 2264, 29897, 13, 29937, 632, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29896, 5262, 353, 29871, 13955, 29918, 29896, 28513, 29875, 29892, 29871, 29896, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29896, 29961, 29896, 14178, 29931, 29961, 29875, 1639, 1822, 27996, 2264, 29897, 13, 29937, 632, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29906, 5262, 353, 29871, 13955, 29918, 29896, 28513, 29875, 29892, 29871, 29906, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29896, 29961, 29906, 14178, 29931, 29961, 29875, 1639, 1822, 27996, 2264, 29897, 13, 29937, 632, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29941, 5262, 353, 29871, 13955, 29918, 29896, 28513, 29875, 29892, 29871, 29941, 29962, 13, 29937, 632, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29946, 5262, 353, 29871, 13955, 29918, 29896, 28513, 29875, 29892, 29871, 29946, 29962, 13, 29937, 632, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29945, 5262, 353, 29871, 13955, 29918, 29896, 28513, 29875, 29892, 29871, 29945, 29962, 13, 29937, 632, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29900, 5262, 353, 448, 7597, 29918, 29906, 28513, 29875, 29892, 29871, 29900, 29962, 13, 29937, 632, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29896, 5262, 353, 448, 7597, 29918, 29906, 28513, 29875, 29892, 29871, 29896, 29962, 13, 29937, 632, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29906, 5262, 353, 448, 7597, 29918, 29906, 28513, 29875, 29892, 29871, 29906, 29962, 13, 29937, 632, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29941, 5262, 353, 448, 7597, 29918, 29906, 28513, 29875, 29892, 29871, 29941, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29906, 29961, 29900, 14178, 29931, 29961, 29875, 1639, 29974, 29896, 1822, 27996, 2264, 29897, 13, 29937, 632, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29946, 5262, 353, 448, 7597, 29918, 29906, 28513, 29875, 29892, 29871, 29946, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29906, 29961, 29896, 14178, 29931, 29961, 29875, 1639, 29974, 29896, 1822, 27996, 2264, 29897, 13, 29937, 632, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29945, 5262, 353, 448, 7597, 29918, 29906, 28513, 29875, 29892, 29871, 29945, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29906, 29961, 29906, 14178, 29931, 29961, 29875, 1639, 29974, 29896, 1822, 27996, 2264, 29897, 13, 29937, 632, 19282, 29939, 4619, 29871, 29896, 13, 29937, 308, 736, 19282, 29939, 13, 13, 29937, 268, 822, 5067, 29918, 1579, 5416, 29918, 29886, 331, 29898, 1311, 29892, 19282, 29939, 29892, 474, 1639, 29892, 365, 29892, 270, 29892, 341, 1125, 13, 29937, 308, 13955, 29918, 29896, 29892, 413, 29918, 29891, 29918, 29896, 353, 22576, 29918, 7597, 29898, 1311, 29889, 29895, 29916, 29892, 1583, 29889, 29895, 29892, 365, 29961, 29875, 1639, 1822, 27891, 29889, 29968, 29897, 13, 29937, 308, 13955, 29918, 29906, 29892, 413, 29918, 29891, 29918, 29906, 353, 349, 12665, 29918, 7597, 29898, 29931, 29961, 29875, 1639, 29974, 29896, 1822, 27891, 29892, 1311, 29889, 29895, 29916, 29897, 13, 29937, 308, 396, 1596, 29898, 29895, 29918, 29891, 29918, 29906, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29900, 5262, 353, 13955, 29918, 29896, 29961, 29900, 29892, 29871, 29900, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29896, 29930, 29931, 29961, 29875, 1639, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29896, 5262, 353, 13955, 29918, 29896, 29961, 29900, 29892, 29871, 29896, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29900, 5262, 353, 448, 7597, 29918, 29906, 29961, 29906, 29892, 29871, 29900, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29896, 5262, 353, 448, 7597, 29918, 29906, 29961, 29906, 29892, 29871, 29896, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29906, 5262, 353, 448, 7597, 29918, 29906, 29961, 29906, 29892, 29871, 29906, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29941, 5262, 353, 448, 7597, 29918, 29906, 29961, 29906, 29892, 29871, 29941, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29906, 29961, 29900, 14178, 29931, 29961, 29875, 1639, 29974, 29896, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29946, 5262, 353, 448, 7597, 29918, 29906, 29961, 29906, 29892, 29871, 29946, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29906, 29961, 29896, 14178, 29931, 29961, 29875, 1639, 29974, 29896, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29945, 5262, 353, 448, 7597, 29918, 29906, 29961, 29906, 29892, 29871, 29945, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29906, 29961, 29906, 14178, 29931, 29961, 29875, 1639, 29974, 29896, 1822, 27996, 2264, 29897, 13, 29937, 308, 19282, 29939, 4619, 29871, 29896, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29900, 5262, 353, 13955, 29918, 29896, 29961, 29896, 29892, 29871, 29900, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29896, 29930, 29931, 29961, 29875, 1639, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29896, 5262, 353, 13955, 29918, 29896, 29961, 29896, 29892, 29871, 29896, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29900, 5262, 353, 448, 7597, 29918, 29906, 29961, 29946, 29892, 29871, 29900, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29896, 5262, 353, 448, 7597, 29918, 29906, 29961, 29946, 29892, 29871, 29896, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29906, 5262, 353, 448, 7597, 29918, 29906, 29961, 29946, 29892, 29871, 29906, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29941, 5262, 353, 448, 7597, 29918, 29906, 29961, 29946, 29892, 29871, 29941, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29906, 29961, 29900, 14178, 29931, 29961, 29875, 1639, 29974, 29896, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29946, 5262, 353, 448, 7597, 29918, 29906, 29961, 29946, 29892, 29871, 29946, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29906, 29961, 29896, 14178, 29931, 29961, 29875, 1639, 29974, 29896, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29945, 5262, 353, 448, 7597, 29918, 29906, 29961, 29946, 29892, 29871, 29945, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29906, 29961, 29906, 14178, 29931, 29961, 29875, 1639, 29974, 29896, 1822, 27996, 2264, 29897, 13, 29937, 308, 19282, 29939, 4619, 29871, 29896, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29900, 5262, 353, 13955, 29918, 29906, 29961, 29900, 29892, 29871, 29900, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29896, 5262, 353, 13955, 29918, 29906, 29961, 29900, 29892, 29871, 29896, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29906, 5262, 353, 13955, 29918, 29906, 29961, 29900, 29892, 29871, 29906, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29941, 5262, 353, 13955, 29918, 29906, 29961, 29900, 29892, 29871, 29941, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29906, 29961, 29900, 14178, 29931, 29961, 29875, 1639, 29974, 29896, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29946, 5262, 353, 13955, 29918, 29906, 29961, 29900, 29892, 29871, 29946, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29906, 29961, 29896, 14178, 29931, 29961, 29875, 1639, 29974, 29896, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29945, 5262, 353, 13955, 29918, 29906, 29961, 29900, 29892, 29871, 29945, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29906, 29961, 29906, 14178, 29931, 29961, 29875, 1639, 29974, 29896, 1822, 27996, 2264, 29897, 13, 29937, 308, 19282, 29939, 4619, 29871, 29896, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29900, 5262, 353, 13955, 29918, 29906, 29961, 29941, 29892, 29871, 29900, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29896, 5262, 353, 13955, 29918, 29906, 29961, 29941, 29892, 29871, 29896, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29906, 5262, 353, 13955, 29918, 29906, 29961, 29941, 29892, 29871, 29906, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29941, 5262, 353, 13955, 29918, 29906, 29961, 29941, 29892, 29871, 29941, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29906, 29961, 29900, 14178, 29931, 29961, 29875, 1639, 29974, 29896, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29946, 5262, 353, 13955, 29918, 29906, 29961, 29941, 29892, 29871, 29946, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29906, 29961, 29896, 14178, 29931, 29961, 29875, 1639, 29974, 29896, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29945, 5262, 353, 13955, 29918, 29906, 29961, 29941, 29892, 29871, 29945, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29906, 29961, 29906, 14178, 29931, 29961, 29875, 1639, 29974, 29896, 1822, 27996, 2264, 29897, 13, 29937, 308, 19282, 29939, 4619, 29871, 29896, 13, 29937, 308, 736, 19282, 29939, 13, 13, 29937, 268, 822, 5067, 29918, 295, 6288, 29918, 29886, 331, 29898, 1311, 29892, 19282, 29939, 29892, 474, 1639, 29892, 365, 29892, 270, 29892, 341, 1125, 13, 29937, 308, 13955, 29918, 29896, 29892, 413, 29918, 29891, 29918, 29896, 353, 560, 6288, 29918, 7597, 29898, 29931, 29961, 29875, 1639, 1822, 27891, 29892, 1311, 29889, 29895, 29916, 29892, 1583, 29889, 4787, 29897, 13, 29937, 308, 13955, 29918, 29906, 29892, 413, 29918, 29891, 29918, 29906, 353, 349, 12665, 29918, 7597, 29898, 29931, 29961, 29875, 1639, 29974, 29896, 1822, 27891, 29892, 1311, 29889, 29895, 29916, 29897, 13, 29937, 308, 396, 1596, 29898, 29895, 29918, 29891, 29918, 29906, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29900, 5262, 353, 448, 7597, 29918, 29896, 29961, 29900, 29892, 29871, 29900, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29896, 29961, 29900, 14178, 29931, 29961, 29875, 1639, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29896, 5262, 353, 448, 7597, 29918, 29896, 29961, 29900, 29892, 29871, 29896, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29896, 29961, 29896, 14178, 29931, 29961, 29875, 1639, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29906, 5262, 353, 448, 7597, 29918, 29896, 29961, 29900, 29892, 29871, 29906, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29941, 5262, 353, 448, 7597, 29918, 29896, 29961, 29900, 29892, 29871, 29941, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29900, 5262, 353, 13955, 29918, 29906, 29961, 29900, 29892, 29871, 29900, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29896, 5262, 353, 13955, 29918, 29906, 29961, 29900, 29892, 29871, 29896, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29906, 5262, 353, 13955, 29918, 29906, 29961, 29900, 29892, 29871, 29906, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29941, 5262, 353, 13955, 29918, 29906, 29961, 29900, 29892, 29871, 29941, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29906, 29961, 29900, 14178, 29931, 29961, 29875, 1639, 29974, 29896, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29946, 5262, 353, 13955, 29918, 29906, 29961, 29900, 29892, 29871, 29946, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29906, 29961, 29896, 14178, 29931, 29961, 29875, 1639, 29974, 29896, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29945, 5262, 353, 13955, 29918, 29906, 29961, 29900, 29892, 29871, 29945, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29906, 29961, 29906, 14178, 29931, 29961, 29875, 1639, 29974, 29896, 1822, 27996, 2264, 29897, 13, 29937, 308, 19282, 29939, 4619, 29871, 29896, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29900, 5262, 353, 448, 7597, 29918, 29896, 29961, 29896, 29892, 29871, 29900, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29896, 29961, 29900, 14178, 29931, 29961, 29875, 1639, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29896, 5262, 353, 448, 7597, 29918, 29896, 29961, 29896, 29892, 29871, 29896, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29896, 29961, 29896, 14178, 29931, 29961, 29875, 1639, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29906, 5262, 353, 448, 7597, 29918, 29896, 29961, 29896, 29892, 29871, 29906, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29941, 5262, 353, 448, 7597, 29918, 29896, 29961, 29896, 29892, 29871, 29941, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29900, 5262, 353, 13955, 29918, 29906, 29961, 29896, 29892, 29871, 29900, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29896, 5262, 353, 13955, 29918, 29906, 29961, 29896, 29892, 29871, 29896, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29906, 5262, 353, 13955, 29918, 29906, 29961, 29896, 29892, 29871, 29906, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29941, 5262, 353, 13955, 29918, 29906, 29961, 29896, 29892, 29871, 29941, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29906, 29961, 29900, 14178, 29931, 29961, 29875, 1639, 29974, 29896, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29946, 5262, 353, 13955, 29918, 29906, 29961, 29896, 29892, 29871, 29946, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29906, 29961, 29896, 14178, 29931, 29961, 29875, 1639, 29974, 29896, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29945, 5262, 353, 13955, 29918, 29906, 29961, 29896, 29892, 29871, 29945, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29906, 29961, 29906, 14178, 29931, 29961, 29875, 1639, 29974, 29896, 1822, 27996, 2264, 29897, 13, 29937, 308, 19282, 29939, 4619, 29871, 29896, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29900, 5262, 353, 448, 7597, 29918, 29896, 29961, 29896, 29892, 29871, 29900, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29896, 29961, 29900, 14178, 29931, 29961, 29875, 1639, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29896, 5262, 353, 448, 7597, 29918, 29896, 29961, 29896, 29892, 29871, 29896, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29896, 29961, 29896, 14178, 29931, 29961, 29875, 1639, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29906, 5262, 353, 448, 7597, 29918, 29896, 29961, 29896, 29892, 29871, 29906, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29941, 5262, 353, 448, 7597, 29918, 29896, 29961, 29896, 29892, 29871, 29941, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29900, 5262, 353, 13955, 29918, 29906, 29961, 29906, 29892, 29871, 29900, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29896, 5262, 353, 13955, 29918, 29906, 29961, 29906, 29892, 29871, 29896, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29906, 5262, 353, 13955, 29918, 29906, 29961, 29906, 29892, 29871, 29906, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29941, 5262, 353, 13955, 29918, 29906, 29961, 29906, 29892, 29871, 29941, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29906, 29961, 29900, 14178, 29931, 29961, 29875, 1639, 29974, 29896, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29946, 5262, 353, 13955, 29918, 29906, 29961, 29906, 29892, 29871, 29946, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29906, 29961, 29896, 14178, 29931, 29961, 29875, 1639, 29974, 29896, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29945, 5262, 353, 13955, 29918, 29906, 29961, 29906, 29892, 29871, 29945, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29906, 29961, 29906, 14178, 29931, 29961, 29875, 1639, 29974, 29896, 1822, 27996, 2264, 29897, 13, 29937, 308, 19282, 29939, 4619, 29871, 29896, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29900, 5262, 353, 448, 7597, 29918, 29896, 29961, 29906, 29892, 29871, 29900, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29896, 29961, 29900, 14178, 29931, 29961, 29875, 1639, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29896, 5262, 353, 448, 7597, 29918, 29896, 29961, 29906, 29892, 29871, 29896, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29896, 29961, 29896, 14178, 29931, 29961, 29875, 1639, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29906, 5262, 353, 448, 7597, 29918, 29896, 29961, 29906, 29892, 29871, 29906, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29941, 5262, 353, 448, 7597, 29918, 29896, 29961, 29906, 29892, 29871, 29941, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29900, 5262, 353, 313, 7597, 29918, 29906, 29961, 29941, 29892, 29871, 29900, 29962, 29899, 7597, 29918, 29906, 29961, 29946, 29892, 29871, 29900, 2314, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29896, 5262, 353, 313, 7597, 29918, 29906, 29961, 29941, 29892, 29871, 29896, 29962, 29899, 7597, 29918, 29906, 29961, 29946, 29892, 29871, 29896, 2314, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29906, 5262, 353, 313, 7597, 29918, 29906, 29961, 29941, 29892, 29871, 29906, 29962, 29899, 7597, 29918, 29906, 29961, 29946, 29892, 29871, 29906, 2314, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29941, 5262, 353, 313, 7597, 29918, 29906, 29961, 29941, 29892, 29871, 29941, 29962, 29899, 7597, 29918, 29906, 29961, 29946, 29892, 29871, 29941, 2314, 29930, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29906, 29961, 29900, 14178, 29931, 29961, 29875, 1639, 29974, 29896, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29946, 5262, 353, 313, 7597, 29918, 29906, 29961, 29941, 29892, 29871, 29946, 29962, 29899, 7597, 29918, 29906, 29961, 29946, 29892, 29871, 29946, 2314, 29930, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29906, 29961, 29896, 14178, 29931, 29961, 29875, 1639, 29974, 29896, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29945, 5262, 353, 313, 7597, 29918, 29906, 29961, 29941, 29892, 29871, 29945, 29962, 29899, 7597, 29918, 29906, 29961, 29946, 29892, 29871, 29945, 2314, 29930, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29906, 29961, 29906, 14178, 29931, 29961, 29875, 1639, 29974, 29896, 1822, 27996, 2264, 29897, 13, 29937, 308, 19282, 29939, 4619, 29871, 29896, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29900, 5262, 353, 448, 7597, 29918, 29896, 29961, 29941, 29892, 29871, 29900, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29896, 29961, 29900, 14178, 29931, 29961, 29875, 1639, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29896, 5262, 353, 448, 7597, 29918, 29896, 29961, 29941, 29892, 29871, 29896, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29896, 29961, 29896, 14178, 29931, 29961, 29875, 1639, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29906, 5262, 353, 448, 7597, 29918, 29896, 29961, 29941, 29892, 29871, 29906, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29941, 5262, 353, 448, 7597, 29918, 29896, 29961, 29941, 29892, 29871, 29941, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29900, 5262, 353, 13955, 29918, 29906, 29961, 29945, 29892, 29871, 29900, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29896, 5262, 353, 13955, 29918, 29906, 29961, 29945, 29892, 29871, 29896, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29906, 5262, 353, 13955, 29918, 29906, 29961, 29945, 29892, 29871, 29906, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29941, 5262, 353, 13955, 29918, 29906, 29961, 29945, 29892, 29871, 29941, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29906, 29961, 29900, 14178, 29931, 29961, 29875, 1639, 29974, 29896, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29946, 5262, 353, 13955, 29918, 29906, 29961, 29945, 29892, 29871, 29946, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29906, 29961, 29896, 14178, 29931, 29961, 29875, 1639, 29974, 29896, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29945, 5262, 353, 13955, 29918, 29906, 29961, 29945, 29892, 29871, 29945, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29906, 29961, 29906, 14178, 29931, 29961, 29875, 1639, 29974, 29896, 1822, 27996, 2264, 29897, 13, 29937, 308, 19282, 29939, 4619, 29871, 29896, 13, 29937, 308, 736, 19282, 29939, 13, 13, 29937, 268, 822, 5067, 29918, 29886, 331, 29918, 295, 6288, 29898, 1311, 29892, 19282, 29939, 29892, 474, 1639, 29892, 365, 29892, 270, 29892, 341, 1125, 13, 29937, 308, 13955, 29918, 29896, 29892, 413, 29918, 29891, 29918, 29896, 353, 349, 12665, 29918, 7597, 29898, 29931, 29961, 29875, 1639, 1822, 27891, 29892, 1311, 29889, 29895, 29916, 29897, 13, 29937, 308, 13955, 29918, 29906, 29892, 413, 29918, 29891, 29918, 29906, 353, 560, 6288, 29918, 7597, 29898, 29931, 29961, 29875, 1639, 29974, 29896, 1822, 27891, 29892, 1311, 29889, 29895, 29916, 29892, 1583, 29889, 4787, 29897, 13, 29937, 308, 396, 1596, 29898, 29895, 29918, 29891, 29918, 29906, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29900, 5262, 353, 13955, 29918, 29896, 29961, 29900, 29892, 29871, 29900, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29896, 29961, 29900, 14178, 29931, 29961, 29875, 1639, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29896, 5262, 353, 13955, 29918, 29896, 29961, 29900, 29892, 29871, 29896, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29896, 29961, 29896, 14178, 29931, 29961, 29875, 1639, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29906, 5262, 353, 13955, 29918, 29896, 29961, 29900, 29892, 29871, 29906, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29896, 29961, 29906, 14178, 29931, 29961, 29875, 1639, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29941, 5262, 353, 13955, 29918, 29896, 29961, 29900, 29892, 29871, 29941, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29946, 5262, 353, 13955, 29918, 29896, 29961, 29900, 29892, 29871, 29946, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29945, 5262, 353, 13955, 29918, 29896, 29961, 29900, 29892, 29871, 29945, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29900, 5262, 353, 448, 7597, 29918, 29906, 29961, 29900, 29892, 29871, 29900, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29896, 5262, 353, 448, 7597, 29918, 29906, 29961, 29900, 29892, 29871, 29896, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29906, 5262, 353, 448, 7597, 29918, 29906, 29961, 29900, 29892, 29871, 29906, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29906, 29961, 29900, 14178, 29931, 29961, 29875, 1639, 29974, 29896, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29941, 5262, 353, 448, 7597, 29918, 29906, 29961, 29900, 29892, 29871, 29941, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29906, 29961, 29896, 14178, 29931, 29961, 29875, 1639, 29974, 29896, 1822, 27996, 2264, 29897, 13, 13, 29937, 308, 19282, 29939, 4619, 29871, 29896, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29900, 5262, 353, 13955, 29918, 29896, 29961, 29896, 29892, 29871, 29900, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29896, 29961, 29900, 14178, 29931, 29961, 29875, 1639, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29896, 5262, 353, 13955, 29918, 29896, 29961, 29896, 29892, 29871, 29896, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29896, 29961, 29896, 14178, 29931, 29961, 29875, 1639, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29906, 5262, 353, 13955, 29918, 29896, 29961, 29896, 29892, 29871, 29906, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29896, 29961, 29906, 14178, 29931, 29961, 29875, 1639, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29941, 5262, 353, 13955, 29918, 29896, 29961, 29896, 29892, 29871, 29941, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29946, 5262, 353, 13955, 29918, 29896, 29961, 29896, 29892, 29871, 29946, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29945, 5262, 353, 13955, 29918, 29896, 29961, 29896, 29892, 29871, 29945, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29900, 5262, 353, 448, 7597, 29918, 29906, 29961, 29896, 29892, 29871, 29900, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29896, 5262, 353, 448, 7597, 29918, 29906, 29961, 29896, 29892, 29871, 29896, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29906, 5262, 353, 448, 7597, 29918, 29906, 29961, 29896, 29892, 29871, 29906, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29906, 29961, 29900, 14178, 29931, 29961, 29875, 1639, 29974, 29896, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29941, 5262, 353, 448, 7597, 29918, 29906, 29961, 29896, 29892, 29871, 29941, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29906, 29961, 29896, 14178, 29931, 29961, 29875, 1639, 29974, 29896, 1822, 27996, 2264, 29897, 13, 13, 29937, 308, 19282, 29939, 4619, 29871, 29896, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29900, 5262, 353, 13955, 29918, 29896, 29961, 29906, 29892, 29871, 29900, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29896, 29961, 29900, 14178, 29931, 29961, 29875, 1639, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29896, 5262, 353, 13955, 29918, 29896, 29961, 29906, 29892, 29871, 29896, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29896, 29961, 29896, 14178, 29931, 29961, 29875, 1639, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29906, 5262, 353, 13955, 29918, 29896, 29961, 29906, 29892, 29871, 29906, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29896, 29961, 29906, 14178, 29931, 29961, 29875, 1639, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29941, 5262, 353, 13955, 29918, 29896, 29961, 29906, 29892, 29871, 29941, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29946, 5262, 353, 13955, 29918, 29896, 29961, 29906, 29892, 29871, 29946, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29945, 5262, 353, 13955, 29918, 29896, 29961, 29906, 29892, 29871, 29945, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29900, 5262, 353, 448, 7597, 29918, 29906, 29961, 29896, 29892, 29871, 29900, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29896, 5262, 353, 448, 7597, 29918, 29906, 29961, 29896, 29892, 29871, 29896, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29906, 5262, 353, 448, 7597, 29918, 29906, 29961, 29896, 29892, 29871, 29906, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29906, 29961, 29900, 14178, 29931, 29961, 29875, 1639, 29974, 29896, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29941, 5262, 353, 448, 7597, 29918, 29906, 29961, 29896, 29892, 29871, 29941, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29906, 29961, 29896, 14178, 29931, 29961, 29875, 1639, 29974, 29896, 1822, 27996, 2264, 29897, 13, 13, 29937, 308, 19282, 29939, 4619, 29871, 29896, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29900, 5262, 353, 313, 7597, 29918, 29896, 29961, 29941, 29892, 29871, 29900, 29962, 29899, 7597, 29918, 29896, 29961, 29946, 29892, 29871, 29900, 2314, 29930, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29896, 29961, 29900, 14178, 29931, 29961, 29875, 1639, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29896, 5262, 353, 313, 7597, 29918, 29896, 29961, 29941, 29892, 29871, 29896, 29962, 29899, 7597, 29918, 29896, 29961, 29946, 29892, 29871, 29896, 2314, 29930, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29896, 29961, 29896, 14178, 29931, 29961, 29875, 1639, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29906, 5262, 353, 313, 7597, 29918, 29896, 29961, 29941, 29892, 29871, 29906, 29962, 29899, 7597, 29918, 29896, 29961, 29946, 29892, 29871, 29906, 2314, 29930, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29896, 29961, 29906, 14178, 29931, 29961, 29875, 1639, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29941, 5262, 353, 313, 7597, 29918, 29896, 29961, 29941, 29892, 29871, 29941, 29962, 29899, 7597, 29918, 29896, 29961, 29946, 29892, 29871, 29941, 2314, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29946, 5262, 353, 313, 7597, 29918, 29896, 29961, 29941, 29892, 29871, 29946, 29962, 29899, 7597, 29918, 29896, 29961, 29946, 29892, 29871, 29946, 2314, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29945, 5262, 353, 313, 7597, 29918, 29896, 29961, 29941, 29892, 29871, 29945, 29962, 29899, 7597, 29918, 29896, 29961, 29946, 29892, 29871, 29945, 2314, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29900, 5262, 353, 448, 7597, 29918, 29906, 29961, 29906, 29892, 29871, 29900, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29896, 5262, 353, 448, 7597, 29918, 29906, 29961, 29906, 29892, 29871, 29896, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29906, 5262, 353, 448, 7597, 29918, 29906, 29961, 29906, 29892, 29871, 29906, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29906, 29961, 29900, 14178, 29931, 29961, 29875, 1639, 29974, 29896, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29941, 5262, 353, 448, 7597, 29918, 29906, 29961, 29906, 29892, 29871, 29941, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29906, 29961, 29896, 14178, 29931, 29961, 29875, 1639, 29974, 29896, 1822, 27996, 2264, 29897, 13, 13, 29937, 308, 19282, 29939, 4619, 29871, 29896, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29900, 5262, 353, 13955, 29918, 29896, 29961, 29945, 29892, 29871, 29900, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29896, 29961, 29900, 14178, 29931, 29961, 29875, 1639, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29896, 5262, 353, 13955, 29918, 29896, 29961, 29945, 29892, 29871, 29896, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29896, 29961, 29896, 14178, 29931, 29961, 29875, 1639, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29906, 5262, 353, 13955, 29918, 29896, 29961, 29945, 29892, 29871, 29906, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29896, 29961, 29906, 14178, 29931, 29961, 29875, 1639, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29941, 5262, 353, 13955, 29918, 29896, 29961, 29945, 29892, 29871, 29941, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29946, 5262, 353, 13955, 29918, 29896, 29961, 29945, 29892, 29871, 29946, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29945, 5262, 353, 13955, 29918, 29896, 29961, 29945, 29892, 29871, 29945, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29900, 5262, 353, 448, 7597, 29918, 29906, 29961, 29941, 29892, 29871, 29900, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29896, 5262, 353, 448, 7597, 29918, 29906, 29961, 29941, 29892, 29871, 29896, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29906, 5262, 353, 448, 7597, 29918, 29906, 29961, 29941, 29892, 29871, 29906, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29906, 29961, 29900, 14178, 29931, 29961, 29875, 1639, 29974, 29896, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29941, 5262, 353, 448, 7597, 29918, 29906, 29961, 29941, 29892, 29871, 29941, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29906, 29961, 29896, 14178, 29931, 29961, 29875, 1639, 29974, 29896, 1822, 27996, 2264, 29897, 13, 29937, 308, 19282, 29939, 4619, 29871, 29896, 13, 29937, 308, 736, 19282, 29939, 13, 13, 29937, 268, 822, 5067, 29918, 295, 6288, 29918, 295, 6288, 29898, 1311, 29892, 19282, 29939, 29892, 474, 1639, 29892, 365, 29892, 270, 29892, 341, 1125, 13, 29937, 308, 13955, 29918, 29896, 29892, 413, 29918, 29891, 29918, 29896, 353, 560, 6288, 29918, 7597, 29898, 29931, 29961, 29875, 1639, 1822, 27891, 29892, 1311, 29889, 29895, 29916, 29892, 1583, 29889, 4787, 29897, 13, 29937, 308, 13955, 29918, 29906, 29892, 413, 29918, 29891, 29918, 29906, 353, 560, 6288, 29918, 7597, 29898, 29931, 29961, 29875, 1639, 29974, 29896, 1822, 27891, 29892, 1311, 29889, 29895, 29916, 29892, 1583, 29889, 4787, 29897, 13, 29937, 308, 363, 903, 29875, 297, 3464, 29898, 29946, 1125, 13, 29937, 632, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29900, 5262, 353, 29871, 13955, 29918, 29896, 28513, 29875, 29892, 29871, 29900, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29896, 29961, 29900, 14178, 29931, 29961, 29875, 1639, 1822, 27996, 2264, 29897, 13, 29937, 632, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29896, 5262, 353, 29871, 13955, 29918, 29896, 28513, 29875, 29892, 29871, 29896, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29896, 29961, 29896, 14178, 29931, 29961, 29875, 1639, 1822, 27996, 2264, 29897, 13, 29937, 632, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29906, 5262, 353, 29871, 13955, 29918, 29896, 28513, 29875, 29892, 29871, 29906, 29962, 13, 29937, 632, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29941, 5262, 353, 29871, 13955, 29918, 29896, 28513, 29875, 29892, 29871, 29941, 29962, 13, 29937, 632, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29900, 5262, 353, 448, 7597, 29918, 29906, 28513, 29875, 29892, 29871, 29900, 29962, 13, 29937, 632, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29896, 5262, 353, 448, 7597, 29918, 29906, 28513, 29875, 29892, 29871, 29896, 29962, 13, 29937, 632, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29906, 5262, 353, 448, 7597, 29918, 29906, 28513, 29875, 29892, 29871, 29906, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29906, 29961, 29900, 14178, 29931, 29961, 29875, 1639, 29974, 29896, 1822, 27996, 2264, 29897, 13, 29937, 632, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29941, 5262, 353, 448, 7597, 29918, 29906, 28513, 29875, 29892, 29871, 29941, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29906, 29961, 29896, 14178, 29931, 29961, 29875, 1639, 29974, 29896, 1822, 27996, 2264, 29897, 13, 29937, 632, 19282, 29939, 4619, 29871, 29896, 13, 29937, 308, 736, 19282, 29939, 13, 13, 29937, 268, 822, 5067, 29918, 1579, 5416, 29918, 295, 6288, 29898, 1311, 29892, 19282, 29939, 29892, 474, 1639, 29892, 365, 29892, 270, 29892, 341, 1125, 13, 29937, 308, 13955, 29918, 29896, 29892, 413, 29918, 29891, 29918, 29896, 353, 22576, 29918, 7597, 29898, 1311, 29889, 29895, 29916, 29892, 1583, 29889, 29895, 29892, 365, 29961, 29875, 1639, 1822, 27891, 29889, 29968, 29897, 13, 29937, 308, 13955, 29918, 29906, 29892, 413, 29918, 29891, 29918, 29906, 353, 560, 6288, 29918, 7597, 29898, 29931, 29961, 29875, 1639, 29974, 29896, 1822, 27891, 29892, 1583, 29889, 29895, 29916, 29892, 1583, 29889, 4787, 29897, 13, 29937, 308, 396, 2866, 8675, 537, 310, 318, 29918, 29891, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29900, 5262, 353, 29871, 13955, 29918, 29896, 29961, 29900, 29892, 29871, 29900, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29896, 29930, 29931, 29961, 29875, 1639, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29896, 5262, 353, 29871, 13955, 29918, 29896, 29961, 29900, 29892, 29871, 29896, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29900, 5262, 353, 448, 7597, 29918, 29906, 29961, 29896, 29892, 29871, 29900, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29896, 5262, 353, 448, 7597, 29918, 29906, 29961, 29896, 29892, 29871, 29896, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29906, 5262, 353, 448, 7597, 29918, 29906, 29961, 29896, 29892, 29871, 29906, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29906, 29961, 29900, 14178, 29931, 29961, 29875, 1639, 29974, 29896, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29941, 5262, 353, 448, 7597, 29918, 29906, 29961, 29896, 29892, 29871, 29941, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29906, 29961, 29896, 14178, 29931, 29961, 29875, 1639, 29974, 29896, 1822, 27996, 2264, 29897, 13, 29937, 308, 19282, 29939, 4619, 29871, 29896, 13, 29937, 308, 396, 269, 2934, 29918, 8071, 353, 448, 29886, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29900, 5262, 353, 13955, 29918, 29896, 29961, 29896, 29892, 29871, 29900, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29896, 29930, 29931, 29961, 29875, 1639, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29896, 5262, 353, 13955, 29918, 29896, 29961, 29896, 29892, 29871, 29896, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29900, 5262, 353, 13955, 29918, 29906, 29961, 29906, 29892, 29871, 29900, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29896, 5262, 353, 13955, 29918, 29906, 29961, 29906, 29892, 29871, 29896, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29906, 5262, 353, 13955, 29918, 29906, 29961, 29906, 29892, 29871, 29906, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29906, 29961, 29900, 14178, 29931, 29961, 29875, 1639, 29974, 29896, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29941, 5262, 353, 13955, 29918, 29906, 29961, 29906, 29892, 29871, 29941, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29906, 29961, 29896, 14178, 29931, 29961, 29875, 1639, 29974, 29896, 1822, 27996, 2264, 29897, 13, 29937, 308, 19282, 29939, 4619, 29871, 29896, 13, 29937, 308, 396, 269, 2934, 29918, 3594, 353, 29871, 29900, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29900, 5262, 353, 13955, 29918, 29906, 29961, 29900, 29892, 29871, 29900, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29896, 5262, 353, 13955, 29918, 29906, 29961, 29900, 29892, 29871, 29896, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29906, 5262, 353, 13955, 29918, 29906, 29961, 29900, 29892, 29871, 29906, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29906, 29961, 29900, 14178, 29931, 29961, 29875, 1639, 29974, 29896, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29941, 5262, 353, 13955, 29918, 29906, 29961, 29900, 29892, 29871, 29941, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29906, 29961, 29896, 14178, 29931, 29961, 29875, 1639, 29974, 29896, 1822, 27996, 2264, 29897, 13, 29937, 308, 19282, 29939, 4619, 29871, 29896, 13, 29937, 308, 736, 19282, 29939, 13, 13, 29937, 268, 822, 5067, 29918, 29886, 331, 29918, 1579, 5416, 29898, 1311, 29892, 19282, 29939, 29892, 474, 1639, 29892, 365, 29892, 270, 29892, 341, 1125, 13, 29937, 308, 13955, 29918, 29896, 29892, 413, 29918, 29891, 29918, 29896, 353, 349, 12665, 29918, 7597, 29898, 29931, 29961, 29875, 1639, 1822, 27891, 29892, 1583, 29889, 29895, 29916, 29897, 13, 29937, 308, 13955, 29918, 29906, 29892, 413, 29918, 29891, 29918, 29906, 353, 22576, 29918, 7597, 29898, 1311, 29889, 29895, 29916, 29892, 1583, 29889, 29895, 29892, 365, 29961, 29875, 1639, 29974, 29896, 1822, 27891, 29889, 29968, 29897, 13, 29937, 308, 396, 1596, 29898, 29895, 29918, 29891, 29918, 29906, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29900, 5262, 353, 448, 7597, 29918, 29896, 29961, 29906, 29892, 29871, 29900, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29896, 29961, 29900, 14178, 29931, 29961, 29875, 1639, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29896, 5262, 353, 448, 7597, 29918, 29896, 29961, 29906, 29892, 29871, 29896, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29896, 29961, 29896, 14178, 29931, 29961, 29875, 1639, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29906, 5262, 353, 448, 7597, 29918, 29896, 29961, 29906, 29892, 29871, 29906, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29896, 29961, 29906, 14178, 29931, 29961, 29875, 1639, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29941, 5262, 353, 448, 7597, 29918, 29896, 29961, 29906, 29892, 29871, 29941, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29946, 5262, 353, 448, 7597, 29918, 29896, 29961, 29906, 29892, 29871, 29946, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29945, 5262, 353, 448, 7597, 29918, 29896, 29961, 29906, 29892, 29871, 29945, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29900, 5262, 353, 13955, 29918, 29906, 29961, 29900, 29892, 29871, 29900, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29896, 5262, 353, 13955, 29918, 29906, 29961, 29900, 29892, 29871, 29896, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29906, 29930, 29931, 29961, 29875, 1639, 29974, 29896, 1822, 27996, 2264, 29897, 13, 29937, 308, 19282, 29939, 4619, 29871, 29896, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29900, 5262, 353, 448, 7597, 29918, 29896, 29961, 29946, 29892, 29871, 29900, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29896, 29961, 29900, 14178, 29931, 29961, 29875, 1639, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29896, 5262, 353, 448, 7597, 29918, 29896, 29961, 29946, 29892, 29871, 29896, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29896, 29961, 29896, 14178, 29931, 29961, 29875, 1639, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29906, 5262, 353, 448, 7597, 29918, 29896, 29961, 29946, 29892, 29871, 29906, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29896, 29961, 29906, 14178, 29931, 29961, 29875, 1639, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29941, 5262, 353, 448, 7597, 29918, 29896, 29961, 29946, 29892, 29871, 29941, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29946, 5262, 353, 448, 7597, 29918, 29896, 29961, 29946, 29892, 29871, 29946, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29945, 5262, 353, 448, 7597, 29918, 29896, 29961, 29946, 29892, 29871, 29945, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29900, 5262, 353, 13955, 29918, 29906, 29961, 29896, 29892, 29871, 29900, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29896, 5262, 353, 13955, 29918, 29906, 29961, 29896, 29892, 29871, 29896, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29906, 29930, 29931, 29961, 29875, 1639, 29974, 29896, 1822, 27996, 2264, 29897, 13, 29937, 308, 19282, 29939, 4619, 29871, 29896, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29900, 5262, 353, 13955, 29918, 29896, 29961, 29900, 29892, 29871, 29900, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29896, 29961, 29900, 14178, 29931, 29961, 29875, 1639, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29896, 5262, 353, 13955, 29918, 29896, 29961, 29900, 29892, 29871, 29896, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29896, 29961, 29896, 14178, 29931, 29961, 29875, 1639, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29906, 5262, 353, 13955, 29918, 29896, 29961, 29900, 29892, 29871, 29906, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29896, 29961, 29906, 14178, 29931, 29961, 29875, 1639, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29941, 5262, 353, 13955, 29918, 29896, 29961, 29900, 29892, 29871, 29941, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29946, 5262, 353, 13955, 29918, 29896, 29961, 29900, 29892, 29871, 29946, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29945, 5262, 353, 13955, 29918, 29896, 29961, 29900, 29892, 29871, 29945, 29962, 13, 29937, 308, 19282, 29939, 4619, 29871, 29896, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29900, 5262, 353, 13955, 29918, 29896, 29961, 29941, 29892, 29871, 29900, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29896, 29961, 29900, 14178, 29931, 29961, 29875, 1639, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29896, 5262, 353, 13955, 29918, 29896, 29961, 29941, 29892, 29871, 29896, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29896, 29961, 29896, 14178, 29931, 29961, 29875, 1639, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29906, 5262, 353, 13955, 29918, 29896, 29961, 29941, 29892, 29871, 29906, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29896, 29961, 29906, 14178, 29931, 29961, 29875, 1639, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29941, 5262, 353, 13955, 29918, 29896, 29961, 29941, 29892, 29871, 29941, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29946, 5262, 353, 13955, 29918, 29896, 29961, 29941, 29892, 29871, 29946, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29945, 5262, 353, 13955, 29918, 29896, 29961, 29941, 29892, 29871, 29945, 29962, 13, 29937, 308, 19282, 29939, 4619, 29871, 29896, 13, 29937, 308, 736, 19282, 29939, 13, 13, 29937, 268, 822, 5067, 29918, 295, 6288, 29918, 1579, 5416, 29898, 1311, 29892, 19282, 29939, 29892, 474, 1639, 29892, 365, 29892, 270, 29892, 341, 1125, 13, 29937, 308, 13955, 29918, 29896, 29892, 413, 29918, 29891, 29918, 29896, 353, 560, 6288, 29918, 7597, 29898, 29931, 29961, 29875, 1639, 1822, 27891, 29892, 1583, 29889, 29895, 29916, 29892, 1583, 29889, 4787, 29897, 13, 29937, 308, 13955, 29918, 29906, 29892, 413, 29918, 29891, 29918, 29906, 353, 22576, 29918, 7597, 29898, 1311, 29889, 29895, 29916, 29892, 1583, 29889, 29895, 29892, 365, 29961, 29875, 1639, 29974, 29896, 1822, 27891, 29889, 29968, 29897, 13, 29937, 308, 396, 2866, 8675, 537, 310, 318, 29918, 29891, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29900, 5262, 353, 448, 7597, 29918, 29896, 29961, 29896, 29892, 29871, 29900, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29896, 29961, 29900, 14178, 29931, 29961, 29875, 1639, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29896, 5262, 353, 448, 7597, 29918, 29896, 29961, 29896, 29892, 29871, 29896, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29896, 29961, 29896, 14178, 29931, 29961, 29875, 1639, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29906, 5262, 353, 448, 7597, 29918, 29896, 29961, 29896, 29892, 29871, 29906, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29941, 5262, 353, 448, 7597, 29918, 29896, 29961, 29896, 29892, 29871, 29941, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29900, 5262, 353, 13955, 29918, 29906, 29961, 29900, 29892, 29871, 29900, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29896, 5262, 353, 13955, 29918, 29906, 29961, 29900, 29892, 29871, 29896, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29906, 29930, 29931, 29961, 29875, 1639, 29974, 29896, 1822, 27996, 2264, 29897, 13, 29937, 308, 19282, 29939, 4619, 29871, 29896, 13, 29937, 308, 396, 269, 2934, 29918, 8071, 353, 448, 29886, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29900, 5262, 353, 13955, 29918, 29896, 29961, 29906, 29892, 29871, 29900, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29896, 29961, 29900, 14178, 29931, 29961, 29875, 1639, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29896, 5262, 353, 13955, 29918, 29896, 29961, 29906, 29892, 29871, 29896, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29896, 29961, 29896, 14178, 29931, 29961, 29875, 1639, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29906, 5262, 353, 13955, 29918, 29896, 29961, 29906, 29892, 29871, 29906, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29941, 5262, 353, 13955, 29918, 29896, 29961, 29906, 29892, 29871, 29941, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29900, 5262, 353, 13955, 29918, 29906, 29961, 29896, 29892, 29871, 29900, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29896, 3816, 29896, 5262, 353, 13955, 29918, 29906, 29961, 29896, 29892, 29871, 29896, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29906, 29930, 29931, 29961, 29875, 1639, 29974, 29896, 1822, 27996, 2264, 29897, 13, 29937, 308, 19282, 29939, 4619, 29871, 29896, 13, 29937, 308, 396, 269, 2934, 29918, 3594, 353, 29871, 29900, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29900, 5262, 353, 13955, 29918, 29896, 29961, 29900, 29892, 29871, 29900, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29896, 29961, 29900, 14178, 29931, 29961, 29875, 1639, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29896, 5262, 353, 13955, 29918, 29896, 29961, 29900, 29892, 29871, 29896, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29918, 29896, 29961, 29896, 14178, 29931, 29961, 29875, 1639, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29906, 5262, 353, 13955, 29918, 29896, 29961, 29900, 29892, 29871, 29906, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29875, 1639, 29974, 29900, 3816, 29941, 5262, 353, 13955, 29918, 29896, 29961, 29900, 29892, 29871, 29941, 29962, 13, 29937, 308, 19282, 29939, 4619, 29871, 29896, 13, 29937, 308, 736, 19282, 29939, 13, 13, 29937, 268, 822, 5067, 29918, 295, 6288, 29918, 8966, 333, 29898, 1311, 29892, 341, 29892, 19282, 29939, 29892, 365, 29892, 270, 1125, 13, 29937, 308, 13955, 29892, 413, 29918, 29891, 353, 560, 6288, 29918, 7597, 29898, 29931, 29889, 27891, 29892, 1311, 29889, 29895, 29916, 29892, 1583, 29889, 4787, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29900, 5262, 353, 13955, 29961, 29896, 29892, 29871, 29900, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29961, 29900, 14178, 29931, 29889, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29896, 5262, 353, 13955, 29961, 29896, 29892, 29871, 29896, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29961, 29896, 14178, 29931, 29889, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29906, 5262, 353, 13955, 29961, 29896, 29892, 29871, 29906, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29941, 5262, 353, 13955, 29961, 29896, 29892, 29871, 29941, 29962, 13, 29937, 308, 19282, 29939, 4619, 29871, 29896, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29900, 5262, 353, 13955, 29961, 29941, 29892, 29871, 29900, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29961, 29900, 14178, 29931, 29889, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29896, 5262, 353, 13955, 29961, 29941, 29892, 29871, 29896, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29961, 29896, 14178, 29931, 29889, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29906, 5262, 353, 13955, 29961, 29941, 29892, 29871, 29906, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29941, 5262, 353, 13955, 29961, 29941, 29892, 29871, 29941, 29962, 13, 29937, 308, 19282, 29939, 4619, 29871, 29896, 13, 29937, 308, 736, 19282, 29939, 13, 13, 29937, 268, 822, 5067, 29918, 29886, 331, 29918, 8966, 333, 29898, 1311, 29892, 341, 29892, 19282, 29939, 29892, 365, 29892, 270, 1125, 13, 29937, 308, 13955, 29892, 413, 29918, 29891, 353, 349, 12665, 29918, 7597, 29898, 29931, 29889, 27891, 29892, 1583, 29889, 29895, 29916, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29900, 5262, 353, 13955, 29961, 29896, 29892, 29871, 29900, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29961, 29900, 14178, 29931, 29889, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29896, 5262, 353, 13955, 29961, 29896, 29892, 29871, 29896, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29961, 29896, 14178, 29931, 29889, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29906, 5262, 353, 13955, 29961, 29896, 29892, 29871, 29906, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29961, 29906, 14178, 29931, 29889, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29941, 5262, 353, 13955, 29961, 29896, 29892, 29871, 29941, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29946, 5262, 353, 13955, 29961, 29896, 29892, 29871, 29946, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29945, 5262, 353, 13955, 29961, 29896, 29892, 29871, 29945, 29962, 13, 29937, 308, 19282, 29939, 4619, 29871, 29896, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29900, 5262, 353, 13955, 29961, 29906, 29892, 29871, 29900, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29961, 29900, 14178, 29931, 29889, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29896, 5262, 353, 13955, 29961, 29906, 29892, 29871, 29896, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29961, 29896, 14178, 29931, 29889, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29906, 5262, 353, 13955, 29961, 29906, 29892, 29871, 29906, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29961, 29906, 14178, 29931, 29889, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29941, 5262, 353, 13955, 29961, 29906, 29892, 29871, 29941, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29946, 5262, 353, 13955, 29961, 29906, 29892, 29871, 29946, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29945, 5262, 353, 13955, 29961, 29906, 29892, 29871, 29945, 29962, 13, 29937, 308, 19282, 29939, 4619, 29871, 29896, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29900, 5262, 353, 13955, 29961, 29945, 29892, 29871, 29900, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29961, 29900, 14178, 29931, 29889, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29896, 5262, 353, 13955, 29961, 29945, 29892, 29871, 29896, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29961, 29896, 14178, 29931, 29889, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29906, 5262, 353, 13955, 29961, 29945, 29892, 29871, 29906, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29961, 29906, 14178, 29931, 29889, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29941, 5262, 353, 13955, 29961, 29945, 29892, 29871, 29941, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29946, 5262, 353, 13955, 29961, 29945, 29892, 29871, 29946, 29962, 13, 29937, 308, 341, 29961, 347, 29939, 29892, 270, 29961, 29945, 5262, 353, 13955, 29961, 29945, 29892, 29871, 29945, 29962, 13, 29937, 308, 19282, 29939, 4619, 29871, 29896, 13, 29937, 308, 736, 19282, 29939, 13, 13, 29937, 268, 822, 6492, 29918, 2929, 29918, 29925, 29956, 29898, 1311, 29892, 1060, 29892, 437, 5847, 1125, 13, 29937, 308, 921, 29918, 2962, 353, 1583, 29889, 10889, 29918, 5317, 13, 29937, 308, 363, 903, 29880, 29892, 903, 13148, 297, 26985, 29898, 1311, 29889, 29277, 1125, 13, 29937, 632, 921, 29918, 29888, 353, 7442, 29889, 1915, 3493, 29898, 29900, 29892, 903, 13148, 29889, 27996, 2264, 29892, 29906, 29900, 29900, 29897, 13, 29937, 632, 921, 29918, 29890, 353, 921, 29918, 29888, 29899, 29918, 13148, 29889, 27996, 2264, 13, 29937, 632, 565, 903, 13148, 29889, 27891, 29889, 20387, 29931, 1275, 376, 1579, 5416, 1115, 13, 29937, 462, 13955, 29892, 413, 29918, 29891, 353, 22576, 29918, 7597, 29898, 1311, 29889, 29895, 29916, 29892, 1583, 29889, 29895, 29892, 903, 13148, 29889, 27891, 29889, 29968, 29897, 13, 29937, 462, 544, 353, 13955, 29961, 29896, 29892, 29871, 29900, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29930, 29916, 29918, 29888, 11877, 29990, 29961, 29881, 974, 29879, 28513, 29880, 3816, 29900, 5262, 13, 29937, 462, 544, 4619, 13955, 29961, 29896, 29892, 29871, 29896, 14178, 9302, 29889, 4548, 29898, 29871, 29896, 29926, 29930, 29895, 29918, 29891, 29930, 29916, 29918, 29890, 11877, 29990, 29961, 29881, 974, 29879, 28513, 29880, 3816, 29896, 5262, 13, 29937, 462, 3477, 353, 13955, 29961, 29900, 29892, 29871, 29900, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29930, 29916, 29918, 29888, 11877, 29990, 29961, 29881, 974, 29879, 28513, 29880, 3816, 29900, 5262, 13, 29937, 462, 3477, 4619, 13955, 29961, 29900, 29892, 29871, 29896, 14178, 9302, 29889, 4548, 29898, 29871, 29896, 29926, 29930, 29895, 29918, 29891, 29930, 29916, 29918, 29890, 11877, 29990, 29961, 29881, 974, 29879, 28513, 29880, 3816, 29896, 5262, 13, 29937, 462, 565, 1583, 29889, 5317, 29961, 29906, 5387, 13, 29937, 462, 268, 14770, 29889, 4532, 29898, 29906, 29897, 13, 29937, 462, 268, 14770, 29889, 5317, 29898, 29916, 29918, 2962, 29974, 29916, 29918, 29888, 29892, 7442, 29889, 6897, 29898, 558, 511, 525, 29878, 1495, 13, 29937, 462, 268, 14770, 29889, 5317, 29898, 29916, 29918, 2962, 29974, 29916, 29918, 29888, 29892, 7442, 29889, 326, 351, 29898, 558, 511, 525, 29885, 1495, 13, 29937, 462, 268, 14770, 29889, 3257, 703, 10923, 545, 1159, 13, 29937, 462, 396, 14770, 29889, 4532, 29898, 29945, 29897, 13, 29937, 462, 396, 14770, 29889, 5317, 29898, 29916, 29918, 2962, 29974, 29916, 29918, 29888, 29892, 9302, 29889, 6897, 29898, 329, 511, 29915, 29890, 1495, 13, 29937, 462, 396, 14770, 29889, 5317, 29898, 29916, 29918, 2962, 29974, 29916, 29918, 29888, 29892, 9302, 29889, 326, 351, 29898, 329, 511, 29915, 29895, 1495, 13, 29937, 632, 565, 903, 13148, 29889, 27891, 29889, 20387, 29931, 1275, 376, 29886, 331, 1115, 13, 29937, 462, 13955, 29892, 413, 29918, 29891, 353, 349, 12665, 29918, 7597, 7373, 13148, 29889, 27891, 29892, 1583, 29889, 29895, 29916, 29897, 13, 29937, 462, 318, 29916, 29892, 318, 29891, 29892, 544, 29892, 3477, 353, 29871, 29900, 29930, 29896, 29926, 29930, 29916, 29918, 29888, 29892, 29871, 29900, 29930, 29896, 29926, 29930, 29916, 29918, 29888, 29892, 29871, 29900, 29930, 29896, 29926, 29930, 29916, 29918, 29888, 29892, 29871, 29900, 29930, 29896, 29926, 29930, 29916, 29918, 29888, 13, 29937, 462, 363, 474, 29918, 6229, 297, 3464, 29898, 29941, 1125, 13, 29937, 462, 268, 318, 29916, 4619, 13955, 29961, 29896, 29892, 474, 29918, 6229, 29871, 4514, 29930, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29961, 29875, 29918, 6229, 14178, 29916, 29918, 29888, 11877, 29990, 29961, 29881, 974, 29879, 28513, 29880, 3816, 29875, 29918, 6229, 5262, 13, 29937, 462, 268, 318, 29916, 4619, 13955, 29961, 29896, 29892, 474, 29918, 6229, 29974, 29941, 14178, 9302, 29889, 4548, 29898, 29871, 29896, 29926, 29930, 29895, 29918, 29891, 29961, 29875, 29918, 6229, 14178, 29916, 29918, 29890, 11877, 29990, 29961, 29881, 974, 29879, 28513, 29880, 3816, 29875, 29918, 6229, 29974, 29941, 5262, 13, 29937, 462, 268, 318, 29891, 4619, 13955, 29961, 29945, 29892, 474, 29918, 6229, 29871, 4514, 29930, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29961, 29875, 29918, 6229, 14178, 29916, 29918, 29888, 11877, 29990, 29961, 29881, 974, 29879, 28513, 29880, 3816, 29875, 29918, 6229, 5262, 13, 29937, 462, 268, 318, 29891, 4619, 13955, 29961, 29945, 29892, 474, 29918, 6229, 29974, 29941, 14178, 9302, 29889, 4548, 29898, 29871, 29896, 29926, 29930, 29895, 29918, 29891, 29961, 29875, 29918, 6229, 14178, 29916, 29918, 29890, 11877, 29990, 29961, 29881, 974, 29879, 28513, 29880, 3816, 29875, 29918, 6229, 29974, 29941, 5262, 13, 29937, 462, 268, 544, 4619, 13955, 29961, 29946, 29892, 474, 29918, 6229, 29871, 4514, 29930, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29961, 29875, 29918, 6229, 14178, 29916, 29918, 29888, 11877, 29990, 29961, 29881, 974, 29879, 28513, 29880, 3816, 29875, 29918, 6229, 5262, 13, 29937, 462, 268, 544, 4619, 13955, 29961, 29946, 29892, 474, 29918, 6229, 29974, 29941, 14178, 9302, 29889, 4548, 29898, 29871, 29896, 29926, 29930, 29895, 29918, 29891, 29961, 29875, 29918, 6229, 14178, 29916, 29918, 29890, 11877, 29990, 29961, 29881, 974, 29879, 28513, 29880, 3816, 29875, 29918, 6229, 29974, 29941, 5262, 13, 29937, 462, 268, 3477, 4619, 13955, 29961, 29906, 29892, 474, 29918, 6229, 29871, 4514, 29930, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29961, 29875, 29918, 6229, 14178, 29916, 29918, 29888, 11877, 29990, 29961, 29881, 974, 29879, 28513, 29880, 3816, 29875, 29918, 6229, 5262, 13, 29937, 462, 268, 3477, 4619, 13955, 29961, 29906, 29892, 474, 29918, 6229, 29974, 29941, 14178, 9302, 29889, 4548, 29898, 29871, 29896, 29926, 29930, 29895, 29918, 29891, 29961, 29875, 29918, 6229, 14178, 29916, 29918, 29890, 11877, 29990, 29961, 29881, 974, 29879, 28513, 29880, 3816, 29875, 29918, 6229, 29974, 29941, 5262, 13, 29937, 462, 565, 1583, 29889, 5317, 29961, 29900, 5387, 13, 29937, 462, 268, 14770, 29889, 4532, 29898, 29900, 29897, 13, 29937, 462, 268, 14770, 29889, 5317, 29898, 29916, 29918, 2962, 29974, 29916, 29918, 29888, 29892, 7442, 29889, 6897, 29898, 8631, 511, 525, 29878, 1495, 13, 29937, 462, 268, 14770, 29889, 5317, 29898, 29916, 29918, 2962, 29974, 29916, 29918, 29888, 29892, 7442, 29889, 326, 351, 29898, 8631, 511, 525, 29885, 1495, 13, 29937, 462, 268, 14770, 29889, 3257, 703, 13296, 333, 12272, 9552, 3412, 921, 1159, 13, 29937, 462, 565, 1583, 29889, 5317, 29961, 29896, 5387, 13, 29937, 462, 268, 14770, 29889, 4532, 29898, 29896, 29897, 13, 29937, 462, 268, 14770, 29889, 5317, 29898, 29916, 29918, 2962, 29974, 29916, 29918, 29888, 29892, 7442, 29889, 6897, 29898, 1314, 511, 525, 29878, 1495, 13, 29937, 462, 268, 14770, 29889, 5317, 29898, 29916, 29918, 2962, 29974, 29916, 29918, 29888, 29892, 7442, 29889, 326, 351, 29898, 1314, 511, 525, 29885, 1495, 13, 29937, 462, 268, 14770, 29889, 3257, 703, 13296, 333, 12272, 9552, 3412, 343, 1159, 13, 29937, 462, 565, 1583, 29889, 5317, 29961, 29906, 5387, 13, 29937, 462, 268, 14770, 29889, 4532, 29898, 29906, 29897, 13, 29937, 462, 268, 14770, 29889, 5317, 29898, 29916, 29918, 2962, 29974, 29916, 29918, 29888, 29892, 7442, 29889, 6897, 29898, 558, 511, 525, 29878, 1495, 13, 29937, 462, 268, 14770, 29889, 5317, 29898, 29916, 29918, 2962, 29974, 29916, 29918, 29888, 29892, 7442, 29889, 326, 351, 29898, 558, 511, 525, 29885, 1495, 13, 29937, 462, 268, 14770, 29889, 3257, 703, 10923, 545, 1159, 13, 29937, 632, 565, 903, 13148, 29889, 27891, 29889, 20387, 29931, 1275, 376, 295, 6288, 1115, 13, 29937, 462, 13955, 29892, 413, 29918, 29891, 353, 560, 6288, 29918, 7597, 7373, 13148, 29889, 27891, 29892, 1583, 29889, 29895, 29916, 29892, 1583, 29889, 4787, 29897, 13, 29937, 462, 318, 29916, 29892, 318, 29891, 29892, 544, 29892, 4365, 353, 29871, 29900, 29930, 29896, 29926, 29930, 29916, 29918, 29888, 29892, 29871, 29900, 29930, 29896, 29926, 29930, 29916, 29918, 29888, 29892, 29871, 29900, 29930, 29896, 29926, 29930, 29916, 29918, 29888, 29892, 29871, 29900, 29930, 29896, 29926, 29930, 29916, 29918, 29888, 13, 29937, 462, 363, 474, 29918, 6229, 297, 3464, 29898, 29906, 1125, 13, 29937, 462, 268, 318, 29916, 4619, 13955, 29961, 29896, 29892, 474, 29918, 6229, 29871, 4514, 29930, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29961, 29875, 29918, 6229, 14178, 29916, 29918, 29888, 11877, 29990, 29961, 29881, 974, 29879, 28513, 29880, 3816, 29875, 29918, 6229, 5262, 13, 29937, 462, 268, 318, 29916, 4619, 13955, 29961, 29896, 29892, 474, 29918, 6229, 29974, 29906, 14178, 9302, 29889, 4548, 29898, 29871, 29896, 29926, 29930, 29895, 29918, 29891, 29961, 29875, 29918, 6229, 14178, 29916, 29918, 29890, 11877, 29990, 29961, 29881, 974, 29879, 28513, 29880, 3816, 29875, 29918, 6229, 29974, 29906, 5262, 13, 29937, 462, 268, 318, 29891, 4619, 13955, 29961, 29941, 29892, 474, 29918, 6229, 29871, 4514, 29930, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29961, 29875, 29918, 6229, 14178, 29916, 29918, 29888, 11877, 29990, 29961, 29881, 974, 29879, 28513, 29880, 3816, 29875, 29918, 6229, 5262, 13, 29937, 462, 268, 318, 29891, 4619, 13955, 29961, 29941, 29892, 474, 29918, 6229, 29974, 29906, 14178, 9302, 29889, 4548, 29898, 29871, 29896, 29926, 29930, 29895, 29918, 29891, 29961, 29875, 29918, 6229, 14178, 29916, 29918, 29890, 11877, 29990, 29961, 29881, 974, 29879, 28513, 29880, 3816, 29875, 29918, 6229, 29974, 29906, 5262, 13, 29937, 462, 268, 544, 22361, 13955, 29961, 29906, 29892, 474, 29918, 6229, 29871, 4514, 29930, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29961, 29875, 29918, 6229, 14178, 29916, 29918, 29888, 11877, 29990, 29961, 29881, 974, 29879, 28513, 29880, 3816, 29875, 29918, 6229, 5262, 13, 29937, 462, 268, 544, 22361, 13955, 29961, 29906, 29892, 474, 29918, 6229, 29974, 29906, 14178, 9302, 29889, 4548, 29898, 29871, 29896, 29926, 29930, 29895, 29918, 29891, 29961, 29875, 29918, 6229, 14178, 29916, 29918, 29890, 11877, 29990, 29961, 29881, 974, 29879, 28513, 29880, 3816, 29875, 29918, 6229, 29974, 29906, 5262, 13, 29937, 462, 268, 4365, 22361, 13955, 29961, 29900, 29892, 474, 29918, 6229, 29871, 4514, 29930, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29961, 29875, 29918, 6229, 14178, 29916, 29918, 29888, 11877, 29990, 29961, 29881, 974, 29879, 28513, 29880, 3816, 29875, 29918, 6229, 5262, 13, 29937, 462, 268, 4365, 22361, 13955, 29961, 29900, 29892, 474, 29918, 6229, 29974, 29906, 14178, 9302, 29889, 4548, 29898, 29871, 29896, 29926, 29930, 29895, 29918, 29891, 29961, 29875, 29918, 6229, 14178, 29916, 29918, 29890, 11877, 29990, 29961, 29881, 974, 29879, 28513, 29880, 3816, 29875, 29918, 6229, 29974, 29906, 5262, 13, 29937, 462, 565, 1583, 29889, 5317, 29961, 29900, 5387, 13, 29937, 462, 268, 14770, 29889, 4532, 29898, 29900, 29897, 13, 29937, 462, 268, 14770, 29889, 5317, 29898, 29916, 29918, 2962, 29974, 29916, 29918, 29888, 29892, 7442, 29889, 6897, 29898, 8631, 511, 525, 29878, 1495, 13, 29937, 462, 268, 14770, 29889, 5317, 29898, 29916, 29918, 2962, 29974, 29916, 29918, 29888, 29892, 7442, 29889, 326, 351, 29898, 8631, 511, 525, 29885, 1495, 13, 29937, 462, 268, 14770, 29889, 3257, 703, 13296, 333, 12272, 9552, 3412, 921, 1159, 13, 29937, 462, 565, 1583, 29889, 5317, 29961, 29896, 5387, 13, 29937, 462, 268, 14770, 29889, 4532, 29898, 29896, 29897, 13, 29937, 462, 268, 14770, 29889, 5317, 29898, 29916, 29918, 2962, 29974, 29916, 29918, 29888, 29892, 7442, 29889, 6897, 29898, 1314, 511, 525, 29878, 1495, 13, 29937, 462, 268, 14770, 29889, 5317, 29898, 29916, 29918, 2962, 29974, 29916, 29918, 29888, 29892, 7442, 29889, 326, 351, 29898, 1314, 511, 525, 29885, 1495, 13, 29937, 462, 268, 14770, 29889, 3257, 703, 13296, 333, 12272, 9552, 3412, 343, 1159, 13, 29937, 462, 396, 565, 1583, 29889, 5317, 29961, 29906, 5387, 13, 29937, 462, 396, 268, 14770, 29889, 4532, 29898, 29906, 29897, 13, 29937, 462, 396, 268, 14770, 29889, 5317, 29898, 29916, 29918, 2962, 29974, 29916, 29918, 29888, 29892, 7442, 29889, 6897, 29898, 558, 511, 525, 29878, 1495, 13, 29937, 462, 396, 268, 14770, 29889, 5317, 29898, 29916, 29918, 2962, 29974, 29916, 29918, 29888, 29892, 7442, 29889, 326, 351, 29898, 558, 511, 525, 29885, 1495, 13, 29937, 462, 396, 268, 14770, 29889, 3257, 703, 10142, 29918, 8071, 1159, 13, 29937, 462, 396, 565, 1583, 29889, 5317, 29961, 29906, 5387, 13, 29937, 462, 396, 268, 14770, 29889, 4532, 29898, 29941, 29897, 13, 29937, 462, 396, 268, 14770, 29889, 5317, 29898, 29916, 29918, 2962, 29974, 29916, 29918, 29888, 29892, 7442, 29889, 6897, 29898, 18816, 511, 525, 29878, 1495, 13, 29937, 462, 396, 268, 14770, 29889, 5317, 29898, 29916, 29918, 2962, 29974, 29916, 29918, 29888, 29892, 7442, 29889, 326, 351, 29898, 18816, 511, 525, 29885, 1495, 13, 29937, 462, 396, 268, 14770, 29889, 3257, 703, 10142, 29918, 3594, 1159, 13, 13, 13, 13, 13, 29937, 632, 921, 29918, 2962, 4619, 903, 13148, 29889, 27996, 2264, 13, 13, 29937, 822, 349, 12665, 29918, 7597, 29898, 2922, 29892, 3459, 1125, 13, 29937, 268, 14550, 317, 3790, 29900, 3583, 2455, 741, 3754, 3227, 3594, 1118, 29871, 29896, 29901, 29884, 29918, 29891, 29985, 29879, 29892, 29871, 29906, 29901, 29884, 29918, 29891, 29985, 29873, 29892, 29871, 29941, 3583, 2455, 741, 3754, 3227, 8071, 1118, 29871, 29946, 29901, 29886, 29892, 29871, 29945, 29901, 29884, 29918, 29916, 29985, 29879, 29913, 12008, 13, 29937, 268, 413, 29916, 29918, 29896, 353, 7442, 29889, 3676, 29898, 2922, 29889, 4181, 29918, 29896, 1068, 29906, 29899, 3459, 1068, 29906, 29897, 13, 29937, 268, 413, 29916, 29918, 29906, 353, 7442, 29889, 3676, 29898, 2922, 29889, 4181, 29918, 29906, 1068, 29906, 29899, 3459, 1068, 29906, 29897, 13, 29937, 268, 413, 29916, 29918, 29941, 353, 7442, 29889, 3676, 29898, 2922, 29889, 4181, 29918, 29941, 1068, 29906, 29899, 3459, 1068, 29906, 29897, 13, 13, 29937, 268, 413, 29916, 353, 7442, 29889, 2378, 4197, 29895, 29916, 29918, 29896, 29892, 413, 29916, 29918, 29906, 29892, 413, 29916, 29918, 29941, 2314, 13, 29937, 268, 19471, 353, 7442, 29889, 2378, 4197, 2922, 29889, 4181, 29918, 29896, 29892, 1775, 29889, 4181, 29918, 29906, 29892, 1775, 29889, 4181, 29918, 29941, 2314, 13, 13, 29937, 268, 15595, 29918, 29896, 353, 448, 29896, 29926, 29930, 2922, 29889, 29909, 29918, 2455, 29930, 2922, 29889, 4181, 29918, 29896, 1068, 29906, 29899, 29896, 29926, 29930, 29906, 29930, 2922, 29889, 29940, 29930, 29895, 29916, 29961, 29900, 29962, 1068, 29906, 13, 29937, 268, 15595, 29918, 29906, 353, 448, 29896, 29926, 29930, 2922, 29889, 29909, 29918, 2455, 29930, 2922, 29889, 4181, 29918, 29906, 1068, 29906, 29899, 29896, 29926, 29930, 29906, 29930, 2922, 29889, 29940, 29930, 29895, 29916, 29961, 29896, 29962, 1068, 29906, 13, 29937, 268, 15595, 29918, 29941, 353, 448, 29906, 29930, 29896, 29926, 29930, 2922, 29889, 29940, 29930, 29895, 29916, 29961, 29906, 14178, 3459, 13, 13, 29937, 268, 13955, 353, 7442, 29889, 3298, 359, 3552, 29953, 29892, 29953, 511, 26688, 29922, 19676, 29897, 13, 29937, 268, 13955, 29961, 29900, 29901, 29953, 29892, 29871, 29900, 29962, 353, 7442, 29889, 2378, 4197, 29899, 29906, 29930, 29896, 29926, 29930, 2922, 29889, 29940, 29930, 29895, 29916, 29961, 29900, 14178, 3459, 29892, 413, 29916, 29961, 29900, 1402, 1775, 29889, 2589, 29918, 29896, 29930, 29895, 29916, 29961, 29900, 1402, 15595, 29918, 29896, 29892, 29871, 29896, 29926, 29930, 4181, 29961, 29900, 29962, 1068, 29906, 29930, 2922, 29889, 29968, 29918, 1837, 29918, 1376, 29930, 2922, 29889, 2589, 29918, 29896, 29892, 413, 29891, 2314, 13, 29937, 268, 13955, 29961, 29900, 29901, 29953, 29892, 29871, 29941, 29962, 353, 7442, 29889, 2378, 4197, 29871, 29906, 29930, 29896, 29926, 29930, 2922, 29889, 29940, 29930, 29895, 29916, 29961, 29900, 14178, 3459, 6653, 29895, 29916, 29961, 29900, 1402, 29899, 2922, 29889, 2589, 29918, 29896, 29930, 29895, 29916, 29961, 29900, 1402, 15595, 29918, 29896, 29892, 29871, 29896, 29926, 29930, 4181, 29961, 29900, 29962, 1068, 29906, 29930, 2922, 29889, 29968, 29918, 1837, 29918, 1376, 29930, 2922, 29889, 2589, 29918, 29896, 29892, 413, 29891, 2314, 13, 13, 29937, 268, 13955, 29961, 29900, 29901, 29953, 29892, 29871, 29896, 29962, 353, 7442, 29889, 2378, 4197, 29899, 29906, 29930, 29896, 29926, 29930, 2922, 29889, 29940, 29930, 29895, 29916, 29961, 29896, 14178, 3459, 29892, 413, 29916, 29961, 29896, 1402, 1775, 29889, 2589, 29918, 29906, 29930, 29895, 29916, 29961, 29896, 1402, 2312, 29918, 29906, 29892, 29871, 29896, 29926, 29930, 4181, 29961, 29896, 29962, 1068, 29906, 29930, 2922, 29889, 29968, 29918, 1837, 29918, 1376, 29930, 2922, 29889, 2589, 29918, 29906, 29892, 413, 29891, 2314, 13, 29937, 268, 13955, 29961, 29900, 29901, 29953, 29892, 29871, 29946, 29962, 353, 7442, 29889, 2378, 4197, 29871, 29906, 29930, 29896, 29926, 29930, 2922, 29889, 29940, 29930, 29895, 29916, 29961, 29896, 14178, 3459, 6653, 29895, 29916, 29961, 29896, 1402, 29899, 2922, 29889, 2589, 29918, 29906, 29930, 29895, 29916, 29961, 29896, 1402, 2312, 29918, 29906, 29892, 29871, 29896, 29926, 29930, 4181, 29961, 29896, 29962, 1068, 29906, 29930, 2922, 29889, 29968, 29918, 1837, 29918, 1376, 29930, 2922, 29889, 2589, 29918, 29906, 29892, 413, 29891, 2314, 13, 13, 29937, 268, 13955, 29961, 29900, 29901, 29953, 29892, 29871, 29906, 29962, 353, 7442, 29889, 2378, 4197, 29896, 29926, 29930, 2922, 29889, 29940, 16395, 29895, 29916, 29961, 29906, 29962, 1068, 29906, 29899, 3459, 1068, 29906, 511, 413, 29891, 29892, 1775, 29889, 2589, 29918, 29941, 29930, 3459, 29892, 15595, 29918, 29941, 29892, 29871, 29900, 1696, 448, 29895, 29916, 29961, 29906, 24960, 13, 29937, 268, 13955, 29961, 29900, 29901, 29953, 29892, 29871, 29945, 29962, 353, 7442, 29889, 2378, 4197, 29896, 29926, 29930, 2922, 29889, 29940, 16395, 29895, 29916, 29961, 29906, 29962, 1068, 29906, 29899, 3459, 1068, 29906, 511, 413, 29891, 29892, 1775, 29889, 2589, 29918, 29941, 29930, 3459, 29892, 448, 2312, 29918, 29941, 29892, 29871, 29900, 1696, 413, 29916, 29961, 29906, 24960, 13, 29937, 268, 736, 13955, 29892, 413, 29916, 13, 13, 29937, 822, 560, 6288, 29918, 7597, 29898, 2922, 29892, 3459, 29892, 2703, 2442, 1125, 13, 29937, 268, 14550, 317, 3790, 29900, 3583, 3754, 648, 3594, 1118, 29871, 29896, 29901, 318, 29918, 29891, 29892, 29871, 29906, 320, 3754, 648, 8071, 1118, 29871, 29941, 318, 29918, 29916, 29913, 12008, 13, 13, 29937, 268, 349, 29918, 2922, 353, 1775, 29889, 2892, 29918, 718, 29871, 29906, 5575, 2922, 29889, 2589, 13, 29937, 268, 19471, 29918, 29886, 353, 2703, 2442, 29930, 9302, 29889, 3676, 29898, 2922, 29889, 4650, 29914, 29925, 29918, 2922, 29897, 13, 29937, 268, 19471, 29918, 29879, 353, 2703, 2442, 29930, 9302, 29889, 3676, 29898, 2922, 29889, 4650, 29914, 2922, 29889, 2589, 29897, 13, 13, 29937, 268, 413, 29916, 29918, 29886, 353, 7442, 29889, 3676, 29898, 4181, 29918, 29886, 1068, 29906, 29899, 3459, 1068, 29906, 29897, 13, 29937, 268, 413, 29916, 29918, 29879, 353, 7442, 29889, 3676, 29898, 4181, 29918, 29879, 1068, 29906, 29899, 3459, 1068, 29906, 29897, 13, 13, 29937, 268, 413, 29916, 353, 7442, 29889, 2378, 4197, 29895, 29916, 29918, 29886, 29892, 413, 29916, 29918, 29879, 2314, 13, 13, 29937, 268, 15595, 29918, 29886, 353, 448, 29896, 29926, 29930, 2922, 29889, 2892, 24563, 4181, 29918, 29886, 1068, 29906, 448, 29871, 29906, 29926, 29930, 2922, 29889, 2589, 29930, 29895, 29916, 29961, 29900, 29962, 1068, 29906, 13, 29937, 268, 15595, 29918, 29879, 353, 29871, 29906, 29926, 29930, 2922, 29889, 2589, 29930, 29895, 29916, 29961, 29896, 14178, 3459, 13, 13, 29937, 268, 13955, 353, 7442, 29889, 3298, 359, 3552, 29946, 29892, 29871, 29946, 511, 26688, 29922, 9302, 29889, 19676, 29897, 13, 29937, 268, 13955, 29961, 29900, 29901, 29946, 29892, 29871, 29900, 29962, 353, 7442, 29889, 2378, 4197, 29899, 29906, 5575, 29896, 29926, 29930, 2922, 29889, 2589, 29930, 29895, 29916, 29961, 29900, 14178, 3459, 29892, 29871, 413, 29916, 29961, 29900, 1402, 15595, 29918, 29886, 29892, 413, 29891, 2314, 13, 29937, 268, 13955, 29961, 29900, 29901, 29946, 29892, 29871, 29906, 29962, 353, 7442, 29889, 2378, 4197, 29871, 29906, 5575, 29896, 29926, 29930, 2922, 29889, 2589, 29930, 29895, 29916, 29961, 29900, 14178, 3459, 29892, 448, 29895, 29916, 29961, 29900, 1402, 15595, 29918, 29886, 29892, 413, 29891, 2314, 13, 13, 29937, 268, 13955, 29961, 29900, 29901, 29946, 29892, 29871, 29896, 29962, 353, 7442, 29889, 2378, 4197, 29896, 29926, 29930, 2922, 29889, 2589, 16395, 29895, 29916, 29961, 29896, 29962, 1068, 29906, 29899, 3459, 1068, 29906, 511, 413, 29891, 6653, 2312, 29918, 29879, 29892, 448, 29895, 29916, 29961, 29896, 24960, 13, 29937, 268, 13955, 29961, 29900, 29901, 29946, 29892, 29871, 29941, 29962, 353, 7442, 29889, 2378, 4197, 29896, 29926, 29930, 2922, 29889, 2589, 16395, 29895, 29916, 29961, 29896, 29962, 1068, 29906, 29899, 3459, 1068, 29906, 511, 413, 29891, 29892, 15595, 29918, 29879, 29892, 413, 29916, 29961, 29896, 24960, 13, 13, 29937, 268, 736, 13955, 29892, 413, 29916, 13, 13, 29937, 822, 22576, 29918, 7597, 29898, 29895, 29916, 29892, 413, 29892, 476, 1125, 13, 29937, 268, 14550, 317, 3790, 29900, 29901, 29884, 29918, 29891, 1919, 29871, 29896, 29901, 29886, 29913, 12008, 13, 29937, 268, 413, 29891, 353, 7442, 29889, 3676, 29898, 29895, 1068, 29906, 29899, 29895, 29916, 1068, 29906, 29897, 13, 29937, 268, 13955, 353, 7442, 29889, 3298, 359, 3552, 29906, 29892, 29871, 29906, 511, 26688, 29922, 19676, 29897, 13, 29937, 268, 13955, 29961, 29900, 29892, 29871, 29900, 29901, 29906, 29962, 353, 7442, 29889, 2378, 4197, 3459, 14571, 29896, 29926, 29930, 29968, 29930, 29895, 1068, 29906, 511, 448, 3459, 14571, 29896, 29926, 29930, 29968, 29930, 29895, 1068, 29906, 29897, 2314, 13, 29937, 268, 13955, 29961, 29896, 29892, 29871, 29900, 29901, 29906, 29962, 353, 7442, 29889, 2378, 4197, 29896, 29892, 29871, 29896, 2314, 13, 29937, 268, 736, 13955, 29892, 413, 29891, 13, 13, 29937, 822, 10104, 29918, 29925, 29956, 29918, 326, 4752, 29918, 2218, 29886, 9552, 29898, 29903, 29892, 282, 1125, 13, 29937, 268, 396, 1596, 703, 29895, 3790, 29913, 1642, 4830, 29898, 29886, 29889, 29895, 876, 13, 29937, 268, 365, 388, 414, 353, 317, 29889, 29277, 29889, 8552, 580, 13, 29937, 268, 302, 29892, 19510, 29892, 437, 5847, 353, 2847, 895, 29918, 29925, 29956, 29918, 2929, 369, 29898, 29931, 388, 414, 29892, 317, 29889, 1627, 292, 29897, 13, 29937, 268, 341, 353, 7442, 29889, 3298, 359, 3552, 29876, 29892, 302, 511, 26688, 29922, 19676, 29897, 13, 29937, 268, 474, 29918, 1837, 353, 29871, 29900, 13, 29937, 268, 396, 21493, 373, 278, 15359, 13, 29937, 268, 363, 474, 29918, 1639, 29892, 903, 1639, 297, 26985, 29898, 1639, 8726, 1125, 13, 29937, 308, 565, 903, 1639, 29961, 29900, 29962, 1275, 376, 1579, 5416, 1115, 13, 29937, 632, 565, 903, 1639, 29961, 29896, 29962, 1275, 376, 1579, 5416, 1115, 13, 29937, 462, 474, 29918, 1837, 353, 5067, 29918, 1579, 5416, 29918, 1579, 5416, 29898, 29875, 29918, 1837, 29892, 474, 29918, 1639, 29892, 365, 388, 414, 29892, 437, 5847, 29892, 341, 29892, 282, 29897, 13, 29937, 632, 565, 903, 1639, 29961, 29896, 29962, 1275, 376, 29886, 331, 1115, 13, 29937, 462, 474, 29918, 1837, 353, 5067, 29918, 1579, 5416, 29918, 29886, 331, 29898, 29875, 29918, 1837, 29892, 474, 29918, 1639, 29892, 365, 388, 414, 29892, 437, 5847, 29892, 341, 29892, 282, 29897, 13, 29937, 308, 25342, 903, 1639, 29961, 29900, 29962, 1275, 376, 29886, 331, 1115, 13, 29937, 632, 565, 903, 1639, 29961, 29896, 29962, 1275, 376, 1579, 5416, 1115, 13, 29937, 462, 474, 29918, 1837, 353, 5067, 29918, 29886, 331, 29918, 1579, 5416, 29898, 29875, 29918, 1837, 29892, 474, 29918, 1639, 29892, 365, 388, 414, 29892, 437, 5847, 29892, 341, 29892, 282, 29897, 13, 29937, 632, 565, 903, 1639, 29961, 29896, 29962, 1275, 376, 29886, 331, 1115, 13, 29937, 462, 474, 29918, 1837, 353, 5067, 29918, 29886, 331, 29918, 29886, 331, 29898, 29875, 29918, 1837, 29892, 474, 29918, 1639, 29892, 365, 388, 414, 29892, 437, 5847, 29892, 341, 29892, 282, 29897, 13, 29937, 268, 565, 317, 29889, 1627, 292, 1275, 27436, 29889, 8966, 333, 29901, 13, 29937, 308, 565, 365, 388, 414, 14352, 29896, 1822, 27891, 29889, 20387, 29931, 1275, 376, 1579, 5416, 1115, 13, 29937, 632, 474, 29918, 1837, 353, 5067, 29918, 1579, 5416, 29918, 8966, 333, 29898, 29924, 29892, 474, 29918, 1837, 29892, 365, 388, 414, 14352, 29896, 1402, 437, 5847, 14352, 29896, 1402, 282, 29897, 13, 29937, 308, 25342, 365, 388, 414, 14352, 29896, 1822, 27891, 29889, 20387, 29931, 1275, 376, 29886, 331, 1115, 13, 29937, 632, 474, 29918, 1837, 353, 5067, 29918, 29886, 331, 29918, 8966, 333, 29898, 29924, 29892, 474, 29918, 1837, 29892, 365, 388, 414, 14352, 29896, 1402, 437, 5847, 14352, 29896, 1402, 282, 29897, 13, 13, 29937, 268, 565, 365, 388, 414, 29961, 29900, 1822, 27891, 29889, 20387, 29931, 1275, 376, 1579, 5416, 1115, 13, 29937, 308, 383, 353, 7442, 29889, 3298, 359, 29898, 29876, 29892, 26688, 29922, 19676, 29897, 13, 29937, 308, 13955, 29892, 413, 29918, 29891, 353, 22576, 29918, 7597, 29898, 29886, 29889, 29895, 29916, 29892, 282, 29889, 29895, 29892, 365, 388, 414, 29961, 29900, 1822, 27891, 29889, 29968, 29897, 13, 29937, 308, 341, 29961, 29875, 29918, 1837, 29892, 437, 5847, 29961, 29900, 3816, 29900, 5262, 353, 13955, 29961, 29900, 29892, 29871, 29900, 29962, 13, 29937, 308, 341, 29961, 29875, 29918, 1837, 29892, 437, 5847, 29961, 29900, 3816, 29896, 5262, 353, 13955, 29961, 29900, 29892, 29871, 29896, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29930, 29931, 388, 414, 29961, 29900, 1822, 27996, 2264, 29897, 13, 29937, 308, 383, 29961, 29875, 29918, 1837, 29962, 353, 29871, 29896, 29889, 13, 29937, 268, 25342, 365, 388, 414, 29961, 29900, 1822, 27891, 29889, 20387, 29931, 1275, 376, 29886, 331, 1115, 13, 29937, 308, 13955, 29892, 413, 29918, 29891, 353, 349, 12665, 29918, 7597, 29898, 29931, 388, 414, 29961, 29900, 1822, 27891, 29892, 282, 29889, 29895, 29916, 29897, 13, 29937, 308, 341, 29961, 29875, 29918, 1837, 29892, 437, 5847, 29961, 29900, 3816, 29900, 5262, 353, 13955, 29961, 29906, 29892, 29871, 29900, 29962, 13, 29937, 308, 341, 29961, 29875, 29918, 1837, 29892, 437, 5847, 29961, 29900, 3816, 29896, 5262, 353, 13955, 29961, 29906, 29892, 29871, 29896, 29962, 13, 29937, 308, 341, 29961, 29875, 29918, 1837, 29892, 437, 5847, 29961, 29900, 3816, 29906, 5262, 353, 13955, 29961, 29906, 29892, 29871, 29906, 29962, 13, 29937, 308, 341, 29961, 29875, 29918, 1837, 29892, 437, 5847, 29961, 29900, 3816, 29941, 5262, 353, 13955, 29961, 29906, 29892, 29871, 29941, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29961, 29900, 14178, 29931, 388, 414, 29961, 29900, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 29875, 29918, 1837, 29892, 437, 5847, 29961, 29900, 3816, 29946, 5262, 353, 13955, 29961, 29906, 29892, 29871, 29946, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29961, 29896, 14178, 29931, 388, 414, 29961, 29900, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 29875, 29918, 1837, 29892, 437, 5847, 29961, 29900, 3816, 29945, 5262, 353, 13955, 29961, 29906, 29892, 29871, 29945, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29961, 29906, 14178, 29931, 388, 414, 29961, 29900, 1822, 27996, 2264, 29897, 13, 29937, 308, 383, 353, 7442, 29889, 3298, 359, 29898, 29876, 29892, 26688, 29922, 19676, 29897, 13, 29937, 308, 383, 29961, 29875, 29918, 1837, 29962, 353, 29871, 29896, 29889, 13, 29937, 308, 474, 29918, 1837, 4619, 29896, 13, 29937, 308, 341, 29961, 29875, 29918, 1837, 29892, 437, 5847, 29961, 29900, 3816, 29900, 5262, 353, 13955, 29961, 29900, 29892, 29871, 29900, 29962, 13, 29937, 308, 341, 29961, 29875, 29918, 1837, 29892, 437, 5847, 29961, 29900, 3816, 29896, 5262, 353, 13955, 29961, 29900, 29892, 29871, 29896, 29962, 13, 29937, 308, 341, 29961, 29875, 29918, 1837, 29892, 437, 5847, 29961, 29900, 3816, 29906, 5262, 353, 13955, 29961, 29900, 29892, 29871, 29906, 29962, 13, 29937, 308, 341, 29961, 29875, 29918, 1837, 29892, 437, 5847, 29961, 29900, 3816, 29941, 5262, 353, 13955, 29961, 29900, 29892, 29871, 29941, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29961, 29900, 14178, 29931, 388, 414, 29961, 29900, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 29875, 29918, 1837, 29892, 437, 5847, 29961, 29900, 3816, 29946, 5262, 353, 13955, 29961, 29900, 29892, 29871, 29946, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29961, 29896, 14178, 29931, 388, 414, 29961, 29900, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 29875, 29918, 1837, 29892, 437, 5847, 29961, 29900, 3816, 29945, 5262, 353, 13955, 29961, 29900, 29892, 29871, 29945, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29961, 29906, 14178, 29931, 388, 414, 29961, 29900, 1822, 27996, 2264, 29897, 13, 29937, 308, 474, 29918, 1837, 4619, 29871, 29896, 13, 29937, 308, 341, 29961, 29875, 29918, 1837, 29892, 437, 5847, 29961, 29900, 3816, 29900, 5262, 353, 13955, 29961, 29941, 29892, 29871, 29900, 29962, 13, 29937, 308, 341, 29961, 29875, 29918, 1837, 29892, 437, 5847, 29961, 29900, 3816, 29896, 5262, 353, 13955, 29961, 29941, 29892, 29871, 29896, 29962, 13, 29937, 308, 341, 29961, 29875, 29918, 1837, 29892, 437, 5847, 29961, 29900, 3816, 29906, 5262, 353, 13955, 29961, 29941, 29892, 29871, 29906, 29962, 13, 29937, 308, 341, 29961, 29875, 29918, 1837, 29892, 437, 5847, 29961, 29900, 3816, 29941, 5262, 353, 13955, 29961, 29941, 29892, 29871, 29941, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29961, 29900, 14178, 29931, 388, 414, 29961, 29900, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 29875, 29918, 1837, 29892, 437, 5847, 29961, 29900, 3816, 29946, 5262, 353, 13955, 29961, 29941, 29892, 29871, 29946, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29961, 29896, 14178, 29931, 388, 414, 29961, 29900, 1822, 27996, 2264, 29897, 13, 29937, 308, 341, 29961, 29875, 29918, 1837, 29892, 437, 5847, 29961, 29900, 3816, 29945, 5262, 353, 13955, 29961, 29941, 29892, 29871, 29945, 14178, 9302, 29889, 4548, 6278, 29896, 29926, 29930, 29895, 29918, 29891, 29961, 29906, 14178, 29931, 388, 414, 29961, 29900, 1822, 27996, 2264, 29897, 13, 13, 13, 29937, 268, 1060, 353, 17900, 29889, 2929, 345, 29898, 29924, 29892, 383, 29897, 13, 29937, 268, 396, 1596, 703, 29989, 29934, 11451, 7390, 2190, 2890, 29918, 29925, 29956, 29989, 353, 6571, 1642, 4830, 29898, 9302, 29889, 6897, 29898, 29990, 29961, 29900, 29962, 4961, 13, 29937, 268, 1596, 703, 29934, 11451, 7390, 2190, 2890, 29918, 29925, 29956, 965, 353, 6571, 1642, 4830, 29898, 29990, 29961, 29900, 12622, 13, 13, 29937, 268, 6492, 29918, 2929, 29918, 29925, 29956, 29898, 29903, 29892, 1060, 29892, 437, 5847, 29892, 282, 29897, 13, 13, 2 ]
losses.py
EIHW/Logit_Separation
4
1604638
""" Computes the Batch Cross-Entropy loss, as appears in: "Fast Single-Class Classification and the Principle of Logit Separation", <NAME>, <NAME> and <NAME>. (https://arxiv.org/abs/1705.10246) Args: logits: The logits for the batch, of shape `[batch_size, num_classes]` labels: The labels for the batch, of shape `[batch_size]` containing class indices, or `[batch_size, num_classes]` for one hot encoding. Returns: The batch cross-entropy loss """ def batch_ce(logits, labels): epsilon = 1e-6 batch_size = tf.shape(logits)[0] n_classes = logits.shape[1].value # Convert labels to one hot encoding if len(labels.shape) == 1: labels = tf.one_hot(labels, n_classes) # The model output distribution Q Q = tf.nn.softmax(tf.reshape(logits, [-1])) # Mask for true logits true_mask = tf.cast(labels, tf.bool) # The target distribution P P = tf.where(true_mask, tf.ones_like(logits, tf.float32) / tf.to_float(batch_size), tf.zeros_like(logits, tf.float32)) P = tf.reshape(P, [-1]) # The batch cross-entropy loss is the KL divergence between P and Q # Epsilon is added for numerical stability KL = tf.reduce_sum(tf.log(P / (Q + epsilon) + epsilon) * P) return KL """ Computes the Batch Cross-Entropy loss, as appears in: "Fast Single-Class Classification and the Principle of Logit Separation", <NAME>, <NAME> and <NAME>. (https://arxiv.org/abs/1705.10246) Args: logits: The logits for the batch, of shape `[batch_size, num_classes]` labels: The labels for the batch, of shape `[batch_size]` containing class indices, or `[batch_size, num_classes]` for one hot encoding. Returns: The batch max-margin loss """ def batch_max_margin_final(logits, labels): batch_size = tf.shape(logits)[0] n_classes = logits.shape[1].value # Convert labels to one hot encoding if len(labels.shape) == 1: labels = tf.one_hot(labels, n_classes) # Mask for true logits true_mask = tf.cast(labels, tf.bool) # True and false logits true_logits = tf.boolean_mask(logits, true_mask) false_logits = tf.boolean_mask(logits, tf.logical_not(true_mask)) false_logits = tf.reshape(false_logits, [batch_size, n_classes-1]) # Max false logit per example false_logits_example_max = tf.reduce_max(false_logits, axis=1) # Max of false logits and Min of correct logits true_logits_min = tf.reduce_min(true_logits) false_logits_max = tf.reduce_max(false_logits) # True to false logits difference, per example and per batch example_diff = true_logits - false_logits_example_max batch_diff = true_logits_min - false_logits_max # The batch max-margin loss return tf.reduce_mean(tf.maximum(0.0, FLAGS.gamma - example_diff)) + \ tf.maximum(0.0, FLAGS.gamma - batch_diff) * (1.0 / tf.to_float(batch_size))
[ 1, 9995, 13, 29871, 11796, 267, 278, 350, 905, 11189, 29899, 5292, 14441, 6410, 29892, 408, 5692, 297, 29901, 13, 29871, 376, 29943, 579, 16740, 29899, 2385, 23236, 322, 278, 14771, 552, 310, 4522, 277, 922, 862, 362, 613, 13, 29871, 529, 5813, 10202, 529, 5813, 29958, 322, 529, 5813, 15513, 13, 29871, 313, 991, 597, 279, 26560, 29889, 990, 29914, 6897, 29914, 29896, 29955, 29900, 29945, 29889, 29896, 29900, 29906, 29946, 29953, 29897, 13, 13, 13, 29871, 826, 3174, 29901, 13, 1678, 1480, 1169, 29901, 450, 1480, 1169, 363, 278, 9853, 29892, 310, 8267, 10338, 16175, 29918, 2311, 29892, 954, 29918, 13203, 7961, 13, 1678, 11073, 29901, 450, 11073, 363, 278, 9853, 29892, 310, 8267, 10338, 16175, 29918, 2311, 7961, 6943, 770, 16285, 29892, 29871, 13, 9651, 470, 10338, 16175, 29918, 2311, 29892, 954, 29918, 13203, 7961, 363, 697, 7375, 8025, 29889, 13, 13, 29871, 16969, 29901, 13, 1678, 450, 9853, 4891, 29899, 296, 14441, 6410, 13, 15945, 29908, 13, 1753, 9853, 29918, 346, 29898, 1188, 1169, 29892, 11073, 1125, 13, 29871, 321, 3232, 353, 29871, 29896, 29872, 29899, 29953, 13, 29871, 9853, 29918, 2311, 353, 15886, 29889, 12181, 29898, 1188, 1169, 9601, 29900, 29962, 13, 29871, 302, 29918, 13203, 353, 1480, 1169, 29889, 12181, 29961, 29896, 1822, 1767, 13, 259, 13, 29871, 396, 14806, 11073, 304, 697, 7375, 8025, 13, 29871, 565, 7431, 29898, 21134, 29889, 12181, 29897, 1275, 29871, 29896, 29901, 13, 1678, 11073, 353, 15886, 29889, 650, 29918, 8711, 29898, 21134, 29892, 302, 29918, 13203, 29897, 13, 259, 13, 29871, 396, 450, 1904, 1962, 4978, 660, 13, 29871, 660, 353, 15886, 29889, 15755, 29889, 2695, 3317, 29898, 13264, 29889, 690, 14443, 29898, 1188, 1169, 29892, 21069, 29896, 12622, 13, 259, 13, 29871, 396, 341, 1278, 363, 1565, 1480, 1169, 13, 29871, 1565, 29918, 13168, 353, 15886, 29889, 4384, 29898, 21134, 29892, 29871, 13, 462, 418, 15886, 29889, 11227, 29897, 13, 259, 13, 29871, 396, 450, 3646, 4978, 349, 13, 29871, 349, 353, 15886, 29889, 3062, 29898, 3009, 29918, 13168, 29892, 29871, 13, 795, 15886, 29889, 2873, 29918, 4561, 29898, 1188, 1169, 29892, 15886, 29889, 7411, 29941, 29906, 29897, 847, 15886, 29889, 517, 29918, 7411, 29898, 16175, 29918, 2311, 511, 29871, 13, 795, 15886, 29889, 3298, 359, 29918, 4561, 29898, 1188, 1169, 29892, 15886, 29889, 7411, 29941, 29906, 876, 13, 29871, 349, 353, 15886, 29889, 690, 14443, 29898, 29925, 29892, 21069, 29896, 2314, 13, 259, 13, 29871, 396, 450, 9853, 4891, 29899, 296, 14441, 6410, 338, 278, 476, 29931, 17089, 10238, 1546, 349, 322, 660, 13, 29871, 396, 382, 3232, 338, 2715, 363, 16259, 25806, 13, 29871, 476, 29931, 353, 15886, 29889, 17469, 29918, 2083, 29898, 13264, 29889, 1188, 29898, 29925, 847, 313, 29984, 718, 321, 3232, 29897, 718, 321, 3232, 29897, 334, 349, 29897, 13, 29871, 736, 476, 29931, 13, 13, 13, 15945, 29908, 13, 29871, 11796, 267, 278, 350, 905, 11189, 29899, 5292, 14441, 6410, 29892, 408, 5692, 297, 29901, 13, 29871, 376, 29943, 579, 16740, 29899, 2385, 23236, 322, 278, 14771, 552, 310, 4522, 277, 922, 862, 362, 613, 13, 29871, 529, 5813, 10202, 529, 5813, 29958, 322, 529, 5813, 15513, 13, 29871, 313, 991, 597, 279, 26560, 29889, 990, 29914, 6897, 29914, 29896, 29955, 29900, 29945, 29889, 29896, 29900, 29906, 29946, 29953, 29897, 13, 13, 29871, 826, 3174, 29901, 13, 1678, 1480, 1169, 29901, 450, 1480, 1169, 363, 278, 9853, 29892, 310, 8267, 10338, 16175, 29918, 2311, 29892, 954, 29918, 13203, 7961, 13, 1678, 11073, 29901, 450, 11073, 363, 278, 9853, 29892, 310, 8267, 10338, 16175, 29918, 2311, 7961, 6943, 770, 16285, 29892, 29871, 13, 9651, 470, 10338, 16175, 29918, 2311, 29892, 954, 29918, 13203, 7961, 363, 697, 7375, 8025, 29889, 13, 13, 29871, 16969, 29901, 13, 1678, 450, 9853, 4236, 29899, 9264, 6410, 13, 15945, 29908, 13, 1753, 9853, 29918, 3317, 29918, 9264, 29918, 8394, 29898, 1188, 1169, 29892, 11073, 1125, 13, 29871, 9853, 29918, 2311, 353, 15886, 29889, 12181, 29898, 1188, 1169, 9601, 29900, 29962, 13, 29871, 302, 29918, 13203, 353, 1480, 1169, 29889, 12181, 29961, 29896, 1822, 1767, 13, 259, 13, 29871, 396, 14806, 11073, 304, 697, 7375, 8025, 13, 29871, 565, 7431, 29898, 21134, 29889, 12181, 29897, 1275, 29871, 29896, 29901, 13, 1678, 11073, 353, 15886, 29889, 650, 29918, 8711, 29898, 21134, 29892, 302, 29918, 13203, 29897, 13, 259, 13, 29871, 396, 341, 1278, 363, 1565, 1480, 1169, 13, 29871, 1565, 29918, 13168, 353, 15886, 29889, 4384, 29898, 21134, 29892, 29871, 13, 462, 418, 15886, 29889, 11227, 29897, 13, 259, 13, 29871, 396, 5852, 322, 2089, 1480, 1169, 29871, 13, 29871, 1565, 29918, 1188, 1169, 353, 15886, 29889, 20054, 29918, 13168, 29898, 1188, 1169, 29892, 1565, 29918, 13168, 29897, 13, 29871, 2089, 29918, 1188, 1169, 353, 15886, 29889, 20054, 29918, 13168, 29898, 1188, 1169, 29892, 15886, 29889, 1188, 936, 29918, 1333, 29898, 3009, 29918, 13168, 876, 13, 29871, 2089, 29918, 1188, 1169, 353, 15886, 29889, 690, 14443, 29898, 4541, 29918, 1188, 1169, 29892, 518, 16175, 29918, 2311, 29892, 302, 29918, 13203, 29899, 29896, 2314, 13, 259, 13, 29871, 396, 5918, 2089, 1480, 277, 639, 1342, 13, 29871, 2089, 29918, 1188, 1169, 29918, 4773, 29918, 3317, 353, 15886, 29889, 17469, 29918, 3317, 29898, 4541, 29918, 1188, 1169, 29892, 9685, 29922, 29896, 29897, 13, 259, 13, 29871, 396, 5918, 310, 2089, 1480, 1169, 322, 3080, 310, 1959, 1480, 1169, 13, 29871, 1565, 29918, 1188, 1169, 29918, 1195, 353, 15886, 29889, 17469, 29918, 1195, 29898, 3009, 29918, 1188, 1169, 29897, 13, 29871, 2089, 29918, 1188, 1169, 29918, 3317, 353, 15886, 29889, 17469, 29918, 3317, 29898, 4541, 29918, 1188, 1169, 29897, 13, 259, 13, 29871, 396, 5852, 304, 2089, 1480, 1169, 4328, 29892, 639, 1342, 322, 639, 9853, 13, 29871, 1342, 29918, 12765, 353, 1565, 29918, 1188, 1169, 448, 2089, 29918, 1188, 1169, 29918, 4773, 29918, 3317, 13, 29871, 9853, 29918, 12765, 353, 1565, 29918, 1188, 1169, 29918, 1195, 448, 2089, 29918, 1188, 1169, 29918, 3317, 13, 259, 13, 29871, 396, 450, 9853, 4236, 29899, 9264, 6410, 13, 29871, 736, 15886, 29889, 17469, 29918, 12676, 29898, 13264, 29889, 27525, 398, 29898, 29900, 29889, 29900, 29892, 383, 4375, 10749, 29889, 4283, 448, 1342, 29918, 12765, 876, 718, 320, 13, 308, 15886, 29889, 27525, 398, 29898, 29900, 29889, 29900, 29892, 383, 4375, 10749, 29889, 4283, 448, 9853, 29918, 12765, 29897, 334, 313, 29896, 29889, 29900, 847, 15886, 29889, 517, 29918, 7411, 29898, 16175, 29918, 2311, 876, 13, 13, 2 ]
CrazyFliePythonServer/lib/cflib/crazyflie/log.py
shreks7/crazyflie-android-no-otg
1
141309
#!/usr/bin/env python # -*- coding: utf-8 -*- # # || ____ _ __ # +------+ / __ )(_) /_______________ _____ ___ # | 0xBC | / __ / / __/ ___/ ___/ __ `/_ / / _ \ # +------+ / /_/ / / /_/ /__/ / / /_/ / / /_/ __/ # || || /_____/_/\__/\___/_/ \__,_/ /___/\___/ # # Copyright (C) 2011-2013 Bitcraze AB # # Crazyflie Nano Quadcopter Client # # 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. """ Enableds logging of variables from the Crazyflie. When a Crazyflie is connected it's possible to download a TableOfContent of all the variables that can be logged. Using this it's possible to add logging configurations where selected variables are sent to the client at a specified period. """ __author__ = 'Bitcraze AB' __all__ = ['Log', 'LogTocElement'] import struct from cflib.crtp.crtpstack import CRTPPacket, CRTPPort from cflib.utils.callbacks import Caller from .toc import Toc, TocFetcher # Channels used for the logging port CHAN_TOC = 0 CHAN_SETTINGS = 1 CHAN_LOGDATA = 2 # Commands used when accessing the Table of Contents CMD_TOC_ELEMENT = 0 CMD_TOC_INFO = 1 # Commands used when accessing the Log configurations CMD_CREATE_BLOCK = 0 CMD_APPEND_BLOCK = 1 CMD_DELETE_BLOCK = 2 CMD_START_LOGGING = 3 CMD_STOP_LOGGING = 4 CMD_RESET_LOGGING = 5 # Possible states when receiving TOC IDLE = "IDLE" GET_TOC_INF = "GET_TOC_INFO" GET_TOC_ELEMENT = "GET_TOC_ELEMENT" # The max size of a CRTP packet payload MAX_LOG_DATA_PACKET_SIZE = 30 import logging logger = logging.getLogger(__name__) class LogEntry: """Representation of one log configuration that enables logging from the Crazyflie""" block_idCounter = 1 def __init__(self, crazyflie, logconf): """Initialize the entry""" self.data_received = Caller() self.error = Caller() self.logconf = logconf self.block_id = LogEntry.block_idCounter LogEntry.block_idCounter += 1 self.cf = crazyflie self.period = logconf.getPeriod() / 10 self.block_created = False def start(self): """Start the logging for this entry""" if (self.cf.link is not None): if (self.block_created is False): logger.debug("First time block is started, add block") self.block_created = True pk = CRTPPacket() pk.set_header(5, CHAN_SETTINGS) pk.data = (CMD_CREATE_BLOCK, self.block_id) for var in self.logconf.getVariables(): if (var.isTocVariable() is False): # Memory location logger.debug("Logging to raw memory %d, 0x%04X", var.getStoredFetchAs(), var.getAddress()) pk.data += struct.pack('<B', var.getStoredFetchAs()) pk.data += struct.pack('<I', var.getAddress()) else: # Item in TOC logger.debug("Adding %s with id=%d and type=0x%02X", var.getName(), self.cf.log.toc.get_element_id( var.getName()), var.getStoredFetchAs()) pk.data += struct.pack('<B', var.getStoredFetchAs()) pk.data += struct.pack('<B', self.cf.log.toc. get_element_id(var.getName())) logger.debug("Adding log block id {}".format(self.block_id)) self.cf.send_packet(pk) else: logger.debug("Block already registered, starting logging" " for %d", self.block_id) pk = CRTPPacket() pk.set_header(5, CHAN_SETTINGS) pk.data = (CMD_START_LOGGING, self.block_id, self.period) self.cf.send_packet(pk) def stop(self): """Stop the logging for this entry""" if (self.cf.link is not None): if (self.block_id is None): logger.warning("Stopping block, but no block registered") else: logger.debug("Sending stop logging for block %d", self.block_id) pk = CRTPPacket() pk.set_header(5, CHAN_SETTINGS) pk.data = (CMD_STOP_LOGGING, self.block_id) self.cf.send_packet(pk) def close(self): """Delete this entry in the Crazyflie""" if (self.cf.link is not None): if (self.block_id is None): logger.warning("Delete block, but no block registered") else: logger.debug("LogEntry: Sending delete logging for block %d" % self.block_id) pk = CRTPPacket() pk.set_header(5, CHAN_SETTINGS) pk.data = (CMD_DELETE_BLOCK, self.block_id) self.cf.send_packet(pk) self.block_id = None # Wait until we get confirmation of delete def unpack_log_data(self, log_data): """Unpack received logging data so it represent real values according to the configuration in the entry""" ret_data = {} data_index = 0 for var in self.logconf.getVariables(): size = LogTocElement.get_size_from_id(var.getFetchAs()) name = var.getName() unpackstring = LogTocElement.get_unpack_string_from_id( var.getFetchAs()) value = struct.unpack(unpackstring, log_data[data_index:data_index + size])[0] data_index += size ret_data[name] = value self.data_received.call(ret_data) class LogTocElement: """An element in the Log TOC.""" types = {0x01: ("uint8_t", '<B', 1), 0x02: ("uint16_t", '<H', 2), 0x03: ("uint32_t", '<L', 4), 0x04: ("int8_t", '<b', 1), 0x05: ("int16_t", '<h', 2), 0x06: ("int32_t", '<i', 4), 0x08: ("FP16", '<h', 2), 0x07: ("float", '<f', 4)} @staticmethod def get_id_from_cstring(name): """Return variable type id given the C-storage name""" for key in LogTocElement.types.keys(): if (LogTocElement.types[key][0] == name): return key raise KeyError("Type [%s] not found in LogTocElement.types!" % name) @staticmethod def get_cstring_from_id(ident): """Return the C-storage name given the variable type id""" try: return LogTocElement.types[ident][0] except KeyError: raise KeyError("Type [%d] not found in LogTocElement.types" "!" % ident) @staticmethod def get_size_from_id(ident): """Return the size in bytes given the variable type id""" try: return LogTocElement.types[ident][2] except KeyError: raise KeyError("Type [%d] not found in LogTocElement.types" "!" % ident) @staticmethod def get_unpack_string_from_id(ident): """Return the Python unpack string given the variable type id""" try: return LogTocElement.types[ident][1] except KeyError: raise KeyError("Type [%d] not found in LogTocElement.types" "!" % ident) def __init__(self, data=None): """TocElement creator. Data is the binary payload of the element.""" if (data): strs = struct.unpack("s" * len(data[2:]), data[2:]) strs = ("{}" * len(strs)).format(*strs).split("\0") self.group = strs[0] self.name = strs[1] self.ident = ord(data[0]) self.ctype = LogTocElement.get_cstring_from_id(ord(data[1])) self.pytype = LogTocElement.get_unpack_string_from_id(ord(data[1])) self.access = ord(data[1]) & 0x10 class Log(): """Create log configuration""" def __init__(self, crazyflie=None): self.log_blocks = [] self.cf = crazyflie self.toc = None self.cf.add_port_callback(CRTPPort.LOGGING, self._new_packet_cb) self.toc_updatedd = Caller() self.state = IDLE self.fake_toc_crc = 0xDEADBEEF def create_log_packet(self, logconf): """Create a new log configuration""" size = 0 period = logconf.getPeriod() / 10 for var in logconf.getVariables(): size += LogTocElement.get_size_from_id(var.getFetchAs()) # Check that we are able to find the variable in the TOC so # we can return error already now and not when the config is sent if (var.isTocVariable()): if (self.toc.get_element_by_complete_name( var.getName()) is None): logger.warning("Log: %s not in TOC, this block cannot be" " used!", var.getName()) return None if (size <= MAX_LOG_DATA_PACKET_SIZE and period > 0 and period < 0xFF): block = LogEntry(self.cf, logconf) self.log_blocks.append(block) return block else: return None def refresh_toc(self, refresh_done_callback, toc_cache): """Start refreshing the table of loggale variables""" self.toc = Toc() toc_fetcher = TocFetcher(self.cf, LogTocElement, CRTPPort.LOGGING, self.toc, refresh_done_callback, toc_cache) toc_fetcher.start() def _new_packet_cb(self, packet): """Callback for newly arrived packets with TOC information""" chan = packet.channel cmd = packet.datal[0] payload = struct.pack("B" * (len(packet.datal) - 1), *packet.datal[1:]) if (chan == CHAN_SETTINGS): new_block_id = ord(payload[0]) error_status = ord(payload[1]) if (cmd == CMD_CREATE_BLOCK): block = None for blocks in self.log_blocks: if (blocks.block_id == new_block_id): block = blocks if (block is not None): if (error_status == 0): # No error logger.debug("Have successfully added block_id=%d", new_block_id) pk = CRTPPacket() pk.set_header(5, CHAN_SETTINGS) pk.data = (CMD_START_LOGGING, new_block_id, block.period) self.cf.send_packet(pk) else: logger.warning("Error when adding block_id=%d, should" " tell listenders...", new_block_id) else: logger.warning("No LogEntry to assign block to !!!") if (cmd == CMD_START_LOGGING): if (error_status == 0x00): logger.info("Have successfully logging for block=%d", new_block_id) else: logger.warning("Error=%d when starting logging for " "block=%d", error_status, new_block_id) if (chan == CHAN_LOGDATA): chan = packet.channel block_id = ord(packet.data[0]) # timestamp = packet.data[0:4] # Not currently used logdata = packet.data[4:] block = None for blocks in self.log_blocks: if (blocks.block_id == block_id): block = blocks if (block is not None): block.unpack_log_data(logdata) else: logger.warning("Error no LogEntry to handle block=%d", block_id)
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 29937, 13, 29937, 268, 3830, 3986, 903, 22359, 29871, 903, 4770, 13, 29937, 29871, 718, 25809, 418, 847, 4770, 1723, 7373, 29897, 847, 14365, 7652, 22359, 903, 7652, 29871, 903, 1649, 13, 29937, 29871, 891, 29871, 29900, 29916, 5371, 891, 268, 847, 4770, 29871, 847, 847, 4770, 29914, 903, 1649, 29914, 903, 1649, 29914, 4770, 7034, 29918, 29871, 847, 847, 903, 320, 13, 29937, 29871, 718, 25809, 1678, 847, 847, 29918, 29914, 847, 847, 847, 29918, 29914, 847, 1649, 29914, 847, 29871, 847, 847, 29918, 29914, 847, 847, 847, 29918, 29914, 29871, 4770, 29914, 13, 29937, 259, 3830, 29871, 3830, 1678, 847, 7652, 29918, 19891, 7998, 1649, 7998, 22359, 19891, 29914, 259, 320, 1649, 29892, 29918, 29914, 847, 22359, 7998, 22359, 29914, 13, 29937, 13, 29937, 29871, 14187, 1266, 313, 29907, 29897, 29871, 29906, 29900, 29896, 29896, 29899, 29906, 29900, 29896, 29941, 18531, 26844, 911, 17571, 13, 29937, 13, 29937, 29871, 14279, 1537, 1579, 347, 405, 1562, 751, 328, 9708, 357, 12477, 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, 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, 13, 29937, 29871, 10606, 29892, 9266, 1696, 29871, 29945, 29896, 21504, 7103, 29892, 29008, 386, 383, 10102, 29892, 12115, 29892, 13, 29937, 29871, 14861, 259, 29900, 29906, 29896, 29896, 29900, 29899, 29896, 29941, 29900, 29896, 29892, 8278, 29889, 13, 13, 15945, 29908, 13, 10861, 29879, 12183, 310, 3651, 515, 278, 14279, 1537, 1579, 347, 29889, 13, 13, 10401, 263, 14279, 1537, 1579, 347, 338, 6631, 372, 29915, 29879, 1950, 304, 5142, 263, 6137, 2776, 3916, 310, 599, 13, 1552, 3651, 393, 508, 367, 13817, 29889, 5293, 445, 372, 29915, 29879, 1950, 304, 788, 12183, 13, 2917, 332, 800, 988, 4629, 3651, 526, 2665, 304, 278, 3132, 472, 263, 13, 6550, 2164, 3785, 29889, 13, 13, 15945, 29908, 13, 13, 1649, 8921, 1649, 353, 525, 21591, 26844, 911, 17571, 29915, 13, 1649, 497, 1649, 353, 6024, 3403, 742, 525, 3403, 29911, 542, 2642, 2033, 13, 13, 5215, 2281, 13, 3166, 274, 29888, 1982, 29889, 29883, 2273, 29886, 29889, 29883, 2273, 29886, 1429, 1053, 15600, 3557, 16638, 300, 29892, 15600, 3557, 2290, 13, 3166, 274, 29888, 1982, 29889, 13239, 29889, 14035, 29879, 1053, 8251, 261, 13, 3166, 869, 517, 29883, 1053, 323, 542, 29892, 323, 542, 20927, 261, 13, 13, 29937, 678, 12629, 1304, 363, 278, 12183, 2011, 13, 3210, 2190, 29918, 4986, 29907, 353, 29871, 29900, 13, 3210, 2190, 29918, 10490, 29911, 4214, 29903, 353, 29871, 29896, 13, 3210, 2190, 29918, 14480, 14573, 353, 29871, 29906, 13, 13, 29937, 1876, 4167, 1304, 746, 17378, 278, 6137, 310, 2866, 1237, 13, 29907, 5773, 29918, 4986, 29907, 29918, 29923, 1307, 13780, 353, 29871, 29900, 13, 29907, 5773, 29918, 4986, 29907, 29918, 11690, 353, 29871, 29896, 13, 13, 29937, 1876, 4167, 1304, 746, 17378, 278, 4522, 22920, 13, 29907, 5773, 29918, 27045, 29918, 29933, 21339, 353, 29871, 29900, 13, 29907, 5773, 29918, 20576, 11794, 29918, 29933, 21339, 353, 29871, 29896, 13, 29907, 5773, 29918, 2287, 18476, 29918, 29933, 21339, 353, 29871, 29906, 13, 29907, 5773, 29918, 25826, 29918, 14480, 29954, 4214, 353, 29871, 29941, 13, 29907, 5773, 29918, 1254, 4590, 29918, 14480, 29954, 4214, 353, 29871, 29946, 13, 29907, 5773, 29918, 1525, 10490, 29918, 14480, 29954, 4214, 353, 29871, 29945, 13, 13, 29937, 20049, 5922, 746, 13442, 7495, 29907, 13, 1367, 1307, 353, 376, 1367, 1307, 29908, 13, 7194, 29918, 4986, 29907, 29918, 24065, 353, 376, 7194, 29918, 4986, 29907, 29918, 11690, 29908, 13, 7194, 29918, 4986, 29907, 29918, 29923, 1307, 13780, 353, 376, 7194, 29918, 4986, 29907, 29918, 29923, 1307, 13780, 29908, 13, 13, 29937, 450, 4236, 2159, 310, 263, 15600, 3557, 18203, 20092, 13, 12648, 29918, 14480, 29918, 14573, 29918, 29925, 11375, 2544, 29918, 14226, 353, 29871, 29941, 29900, 13, 13, 5215, 12183, 13, 21707, 353, 12183, 29889, 657, 16363, 22168, 978, 1649, 29897, 13, 13, 13, 1990, 4522, 9634, 29901, 13, 1678, 9995, 1123, 26081, 310, 697, 1480, 5285, 393, 28936, 12183, 13, 1678, 515, 278, 14279, 1537, 1579, 347, 15945, 29908, 13, 1678, 2908, 29918, 333, 17779, 353, 29871, 29896, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 12220, 1537, 1579, 347, 29892, 1480, 5527, 1125, 13, 4706, 9995, 6644, 6646, 278, 6251, 15945, 29908, 13, 4706, 1583, 29889, 1272, 29918, 13556, 2347, 353, 8251, 261, 580, 13, 4706, 1583, 29889, 2704, 353, 8251, 261, 580, 13, 13, 4706, 1583, 29889, 1188, 5527, 353, 1480, 5527, 13, 4706, 1583, 29889, 1271, 29918, 333, 353, 4522, 9634, 29889, 1271, 29918, 333, 17779, 13, 4706, 4522, 9634, 29889, 1271, 29918, 333, 17779, 4619, 29871, 29896, 13, 4706, 1583, 29889, 6854, 353, 12220, 1537, 1579, 347, 13, 4706, 1583, 29889, 19145, 353, 1480, 5527, 29889, 657, 29853, 580, 847, 29871, 29896, 29900, 13, 4706, 1583, 29889, 1271, 29918, 11600, 353, 7700, 13, 13, 1678, 822, 1369, 29898, 1311, 1125, 13, 4706, 9995, 4763, 278, 12183, 363, 445, 6251, 15945, 29908, 13, 4706, 565, 313, 1311, 29889, 6854, 29889, 2324, 338, 451, 6213, 1125, 13, 9651, 565, 313, 1311, 29889, 1271, 29918, 11600, 338, 7700, 1125, 13, 18884, 17927, 29889, 8382, 703, 6730, 931, 2908, 338, 4687, 29892, 788, 2908, 1159, 13, 18884, 1583, 29889, 1271, 29918, 11600, 353, 5852, 13, 18884, 282, 29895, 353, 15600, 3557, 16638, 300, 580, 13, 18884, 282, 29895, 29889, 842, 29918, 6672, 29898, 29945, 29892, 5868, 2190, 29918, 10490, 29911, 4214, 29903, 29897, 13, 18884, 282, 29895, 29889, 1272, 353, 313, 29907, 5773, 29918, 27045, 29918, 29933, 21339, 29892, 1583, 29889, 1271, 29918, 333, 29897, 13, 18884, 363, 722, 297, 1583, 29889, 1188, 5527, 29889, 657, 10444, 1849, 7295, 13, 462, 1678, 565, 313, 1707, 29889, 275, 29911, 542, 16174, 580, 338, 7700, 1125, 29871, 396, 18914, 4423, 13, 462, 4706, 17927, 29889, 8382, 703, 3403, 3460, 304, 10650, 3370, 1273, 29881, 29892, 29871, 29900, 29916, 29995, 29900, 29946, 29990, 613, 13, 462, 462, 268, 722, 29889, 657, 855, 4395, 20927, 2887, 3285, 722, 29889, 657, 7061, 3101, 13, 462, 4706, 282, 29895, 29889, 1272, 4619, 2281, 29889, 4058, 877, 29966, 29933, 742, 722, 29889, 657, 855, 4395, 20927, 2887, 3101, 13, 462, 4706, 282, 29895, 29889, 1272, 4619, 2281, 29889, 4058, 877, 29966, 29902, 742, 722, 29889, 657, 7061, 3101, 13, 462, 1678, 1683, 29901, 29871, 396, 10976, 297, 7495, 29907, 13, 462, 4706, 17927, 29889, 8382, 703, 2528, 292, 1273, 29879, 411, 1178, 16328, 29881, 322, 1134, 29922, 29900, 29916, 29995, 29900, 29906, 29990, 613, 13, 462, 462, 268, 722, 29889, 19629, 3285, 13, 462, 462, 268, 1583, 29889, 6854, 29889, 1188, 29889, 517, 29883, 29889, 657, 29918, 5029, 29918, 333, 29898, 13, 462, 462, 268, 722, 29889, 19629, 25739, 722, 29889, 657, 855, 4395, 20927, 2887, 3101, 13, 462, 4706, 282, 29895, 29889, 1272, 4619, 2281, 29889, 4058, 877, 29966, 29933, 742, 722, 29889, 657, 855, 4395, 20927, 2887, 3101, 13, 462, 4706, 282, 29895, 29889, 1272, 4619, 2281, 29889, 4058, 877, 29966, 29933, 742, 1583, 29889, 6854, 29889, 1188, 29889, 517, 29883, 29889, 13, 462, 462, 1669, 679, 29918, 5029, 29918, 333, 29898, 1707, 29889, 19629, 22130, 13, 18884, 17927, 29889, 8382, 703, 2528, 292, 1480, 2908, 1178, 6571, 1642, 4830, 29898, 1311, 29889, 1271, 29918, 333, 876, 13, 18884, 1583, 29889, 6854, 29889, 6717, 29918, 4058, 300, 29898, 20571, 29897, 13, 13, 9651, 1683, 29901, 13, 18884, 17927, 29889, 8382, 703, 7445, 2307, 15443, 29892, 6257, 12183, 29908, 13, 462, 632, 376, 363, 1273, 29881, 613, 1583, 29889, 1271, 29918, 333, 29897, 13, 18884, 282, 29895, 353, 15600, 3557, 16638, 300, 580, 13, 18884, 282, 29895, 29889, 842, 29918, 6672, 29898, 29945, 29892, 5868, 2190, 29918, 10490, 29911, 4214, 29903, 29897, 13, 18884, 282, 29895, 29889, 1272, 353, 313, 29907, 5773, 29918, 25826, 29918, 14480, 29954, 4214, 29892, 1583, 29889, 1271, 29918, 333, 29892, 1583, 29889, 19145, 29897, 13, 18884, 1583, 29889, 6854, 29889, 6717, 29918, 4058, 300, 29898, 20571, 29897, 13, 13, 1678, 822, 5040, 29898, 1311, 1125, 13, 4706, 9995, 16329, 278, 12183, 363, 445, 6251, 15945, 29908, 13, 4706, 565, 313, 1311, 29889, 6854, 29889, 2324, 338, 451, 6213, 1125, 13, 9651, 565, 313, 1311, 29889, 1271, 29918, 333, 338, 6213, 1125, 13, 18884, 17927, 29889, 27392, 703, 20754, 3262, 2908, 29892, 541, 694, 2908, 15443, 1159, 13, 9651, 1683, 29901, 13, 18884, 17927, 29889, 8382, 703, 29903, 2548, 5040, 12183, 363, 2908, 1273, 29881, 613, 1583, 29889, 1271, 29918, 333, 29897, 13, 18884, 282, 29895, 353, 15600, 3557, 16638, 300, 580, 13, 18884, 282, 29895, 29889, 842, 29918, 6672, 29898, 29945, 29892, 5868, 2190, 29918, 10490, 29911, 4214, 29903, 29897, 13, 18884, 282, 29895, 29889, 1272, 353, 313, 29907, 5773, 29918, 1254, 4590, 29918, 14480, 29954, 4214, 29892, 1583, 29889, 1271, 29918, 333, 29897, 13, 18884, 1583, 29889, 6854, 29889, 6717, 29918, 4058, 300, 29898, 20571, 29897, 13, 13, 1678, 822, 3802, 29898, 1311, 1125, 13, 4706, 9995, 12498, 445, 6251, 297, 278, 14279, 1537, 1579, 347, 15945, 29908, 13, 4706, 565, 313, 1311, 29889, 6854, 29889, 2324, 338, 451, 6213, 1125, 13, 9651, 565, 313, 1311, 29889, 1271, 29918, 333, 338, 6213, 1125, 13, 18884, 17927, 29889, 27392, 703, 12498, 2908, 29892, 541, 694, 2908, 15443, 1159, 13, 9651, 1683, 29901, 13, 18884, 17927, 29889, 8382, 703, 3403, 9634, 29901, 317, 2548, 5217, 12183, 363, 2908, 1273, 29881, 29908, 13, 462, 632, 1273, 1583, 29889, 1271, 29918, 333, 29897, 13, 18884, 282, 29895, 353, 15600, 3557, 16638, 300, 580, 13, 18884, 282, 29895, 29889, 842, 29918, 6672, 29898, 29945, 29892, 5868, 2190, 29918, 10490, 29911, 4214, 29903, 29897, 13, 18884, 282, 29895, 29889, 1272, 353, 313, 29907, 5773, 29918, 2287, 18476, 29918, 29933, 21339, 29892, 1583, 29889, 1271, 29918, 333, 29897, 13, 18884, 1583, 29889, 6854, 29889, 6717, 29918, 4058, 300, 29898, 20571, 29897, 13, 18884, 1583, 29889, 1271, 29918, 333, 353, 6213, 29871, 396, 20340, 2745, 591, 679, 9659, 362, 310, 5217, 13, 13, 1678, 822, 443, 4058, 29918, 1188, 29918, 1272, 29898, 1311, 29892, 1480, 29918, 1272, 1125, 13, 4706, 9995, 2525, 4058, 4520, 12183, 848, 577, 372, 2755, 1855, 1819, 5034, 13, 4706, 304, 278, 5285, 297, 278, 6251, 15945, 29908, 13, 4706, 3240, 29918, 1272, 353, 6571, 13, 4706, 848, 29918, 2248, 353, 29871, 29900, 13, 4706, 363, 722, 297, 1583, 29889, 1188, 5527, 29889, 657, 10444, 1849, 7295, 13, 9651, 2159, 353, 4522, 29911, 542, 2642, 29889, 657, 29918, 2311, 29918, 3166, 29918, 333, 29898, 1707, 29889, 657, 20927, 2887, 3101, 13, 9651, 1024, 353, 722, 29889, 19629, 580, 13, 9651, 443, 4058, 1807, 353, 4522, 29911, 542, 2642, 29889, 657, 29918, 348, 4058, 29918, 1807, 29918, 3166, 29918, 333, 29898, 13, 18884, 722, 29889, 657, 20927, 2887, 3101, 13, 9651, 995, 353, 2281, 29889, 348, 4058, 29898, 348, 4058, 1807, 29892, 13, 462, 462, 29871, 1480, 29918, 1272, 29961, 1272, 29918, 2248, 29901, 1272, 29918, 2248, 718, 2159, 2314, 29961, 29900, 29962, 13, 9651, 848, 29918, 2248, 4619, 2159, 13, 9651, 3240, 29918, 1272, 29961, 978, 29962, 353, 995, 13, 4706, 1583, 29889, 1272, 29918, 13556, 2347, 29889, 4804, 29898, 2267, 29918, 1272, 29897, 13, 13, 13, 1990, 4522, 29911, 542, 2642, 29901, 13, 1678, 9995, 2744, 1543, 297, 278, 4522, 7495, 29907, 1213, 15945, 13, 1678, 4072, 353, 426, 29900, 29916, 29900, 29896, 29901, 4852, 13470, 29947, 29918, 29873, 613, 29871, 12801, 29933, 742, 29871, 29896, 511, 13, 795, 29900, 29916, 29900, 29906, 29901, 4852, 13470, 29896, 29953, 29918, 29873, 613, 12801, 29950, 742, 29871, 29906, 511, 13, 795, 29900, 29916, 29900, 29941, 29901, 4852, 13470, 29941, 29906, 29918, 29873, 613, 12801, 29931, 742, 29871, 29946, 511, 13, 795, 29900, 29916, 29900, 29946, 29901, 4852, 524, 29947, 29918, 29873, 613, 259, 12801, 29890, 742, 29871, 29896, 511, 13, 795, 29900, 29916, 29900, 29945, 29901, 4852, 524, 29896, 29953, 29918, 29873, 613, 29871, 12801, 29882, 742, 29871, 29906, 511, 13, 795, 29900, 29916, 29900, 29953, 29901, 4852, 524, 29941, 29906, 29918, 29873, 613, 29871, 12801, 29875, 742, 29871, 29946, 511, 13, 795, 29900, 29916, 29900, 29947, 29901, 4852, 26353, 29896, 29953, 613, 268, 12801, 29882, 742, 29871, 29906, 511, 13, 795, 29900, 29916, 29900, 29955, 29901, 4852, 7411, 613, 1678, 12801, 29888, 742, 29871, 29946, 2915, 13, 13, 1678, 732, 7959, 5696, 13, 1678, 822, 679, 29918, 333, 29918, 3166, 29918, 29883, 1807, 29898, 978, 1125, 13, 4706, 9995, 11609, 2286, 1134, 1178, 2183, 278, 315, 29899, 12925, 1024, 15945, 29908, 13, 4706, 363, 1820, 297, 4522, 29911, 542, 2642, 29889, 8768, 29889, 8149, 7295, 13, 9651, 565, 313, 3403, 29911, 542, 2642, 29889, 8768, 29961, 1989, 3816, 29900, 29962, 1275, 1024, 1125, 13, 18884, 736, 1820, 13, 4706, 12020, 7670, 2392, 703, 1542, 518, 29995, 29879, 29962, 451, 1476, 297, 4522, 29911, 542, 2642, 29889, 8768, 3850, 1273, 1024, 29897, 13, 13, 1678, 732, 7959, 5696, 13, 1678, 822, 679, 29918, 29883, 1807, 29918, 3166, 29918, 333, 29898, 1693, 1125, 13, 4706, 9995, 11609, 278, 315, 29899, 12925, 1024, 2183, 278, 2286, 1134, 1178, 15945, 29908, 13, 4706, 1018, 29901, 13, 9651, 736, 4522, 29911, 542, 2642, 29889, 8768, 29961, 1693, 3816, 29900, 29962, 13, 4706, 5174, 7670, 2392, 29901, 13, 9651, 12020, 7670, 2392, 703, 1542, 518, 29995, 29881, 29962, 451, 1476, 297, 4522, 29911, 542, 2642, 29889, 8768, 29908, 13, 462, 965, 376, 3850, 1273, 2893, 29897, 13, 13, 1678, 732, 7959, 5696, 13, 1678, 822, 679, 29918, 2311, 29918, 3166, 29918, 333, 29898, 1693, 1125, 13, 4706, 9995, 11609, 278, 2159, 297, 6262, 2183, 278, 2286, 1134, 1178, 15945, 29908, 13, 4706, 1018, 29901, 13, 9651, 736, 4522, 29911, 542, 2642, 29889, 8768, 29961, 1693, 3816, 29906, 29962, 13, 4706, 5174, 7670, 2392, 29901, 13, 9651, 12020, 7670, 2392, 703, 1542, 518, 29995, 29881, 29962, 451, 1476, 297, 4522, 29911, 542, 2642, 29889, 8768, 29908, 13, 462, 965, 376, 3850, 1273, 2893, 29897, 13, 13, 1678, 732, 7959, 5696, 13, 1678, 822, 679, 29918, 348, 4058, 29918, 1807, 29918, 3166, 29918, 333, 29898, 1693, 1125, 13, 4706, 9995, 11609, 278, 5132, 443, 4058, 1347, 2183, 278, 2286, 1134, 1178, 15945, 29908, 13, 4706, 1018, 29901, 13, 9651, 736, 4522, 29911, 542, 2642, 29889, 8768, 29961, 1693, 3816, 29896, 29962, 13, 4706, 5174, 7670, 2392, 29901, 13, 9651, 12020, 7670, 2392, 703, 1542, 518, 29995, 29881, 29962, 451, 1476, 297, 4522, 29911, 542, 2642, 29889, 8768, 29908, 13, 462, 965, 376, 3850, 1273, 2893, 29897, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 848, 29922, 8516, 1125, 13, 4706, 9995, 29911, 542, 2642, 907, 1061, 29889, 3630, 338, 278, 7581, 20092, 310, 278, 1543, 1213, 15945, 13, 13, 4706, 565, 313, 1272, 1125, 13, 9651, 851, 29879, 353, 2281, 29889, 348, 4058, 703, 29879, 29908, 334, 7431, 29898, 1272, 29961, 29906, 29901, 11724, 848, 29961, 29906, 29901, 2314, 13, 9651, 851, 29879, 353, 4852, 29912, 5038, 334, 7431, 29898, 710, 29879, 8106, 4830, 10456, 710, 29879, 467, 5451, 14182, 29900, 1159, 13, 9651, 1583, 29889, 2972, 353, 851, 29879, 29961, 29900, 29962, 13, 9651, 1583, 29889, 978, 353, 851, 29879, 29961, 29896, 29962, 13, 13, 9651, 1583, 29889, 1693, 353, 4356, 29898, 1272, 29961, 29900, 2314, 13, 13, 9651, 1583, 29889, 312, 668, 353, 4522, 29911, 542, 2642, 29889, 657, 29918, 29883, 1807, 29918, 3166, 29918, 333, 29898, 536, 29898, 1272, 29961, 29896, 12622, 13, 9651, 1583, 29889, 2272, 1853, 353, 4522, 29911, 542, 2642, 29889, 657, 29918, 348, 4058, 29918, 1807, 29918, 3166, 29918, 333, 29898, 536, 29898, 1272, 29961, 29896, 12622, 13, 13, 9651, 1583, 29889, 5943, 353, 4356, 29898, 1272, 29961, 29896, 2314, 669, 29871, 29900, 29916, 29896, 29900, 13, 13, 13, 1990, 4522, 7295, 13, 1678, 9995, 4391, 1480, 5285, 15945, 29908, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 12220, 1537, 1579, 347, 29922, 8516, 1125, 13, 4706, 1583, 29889, 1188, 29918, 1271, 29879, 353, 5159, 13, 13, 4706, 1583, 29889, 6854, 353, 12220, 1537, 1579, 347, 13, 4706, 1583, 29889, 517, 29883, 353, 6213, 13, 4706, 1583, 29889, 6854, 29889, 1202, 29918, 637, 29918, 14035, 29898, 11341, 3557, 2290, 29889, 14480, 29954, 4214, 29892, 1583, 3032, 1482, 29918, 4058, 300, 29918, 10702, 29897, 13, 13, 4706, 1583, 29889, 517, 29883, 29918, 21402, 29881, 353, 8251, 261, 580, 13, 4706, 1583, 29889, 3859, 353, 3553, 1307, 13, 4706, 1583, 29889, 29888, 1296, 29918, 517, 29883, 29918, 29883, 2214, 353, 29871, 29900, 29916, 2287, 3035, 15349, 29638, 13, 13, 1678, 822, 1653, 29918, 1188, 29918, 4058, 300, 29898, 1311, 29892, 1480, 5527, 1125, 13, 4706, 9995, 4391, 263, 716, 1480, 5285, 15945, 29908, 13, 4706, 2159, 353, 29871, 29900, 13, 4706, 3785, 353, 1480, 5527, 29889, 657, 29853, 580, 847, 29871, 29896, 29900, 13, 4706, 363, 722, 297, 1480, 5527, 29889, 657, 10444, 1849, 7295, 13, 9651, 2159, 4619, 4522, 29911, 542, 2642, 29889, 657, 29918, 2311, 29918, 3166, 29918, 333, 29898, 1707, 29889, 657, 20927, 2887, 3101, 13, 9651, 396, 5399, 393, 591, 526, 2221, 304, 1284, 278, 2286, 297, 278, 7495, 29907, 577, 13, 9651, 396, 591, 508, 736, 1059, 2307, 1286, 322, 451, 746, 278, 2295, 338, 2665, 13, 9651, 565, 313, 1707, 29889, 275, 29911, 542, 16174, 580, 1125, 13, 18884, 565, 313, 1311, 29889, 517, 29883, 29889, 657, 29918, 5029, 29918, 1609, 29918, 8835, 29918, 978, 29898, 13, 462, 4706, 722, 29889, 19629, 3101, 338, 6213, 1125, 13, 462, 1678, 17927, 29889, 27392, 703, 3403, 29901, 1273, 29879, 451, 297, 7495, 29907, 29892, 445, 2908, 2609, 367, 29908, 13, 462, 462, 259, 376, 1304, 29991, 613, 722, 29889, 19629, 3101, 13, 462, 1678, 736, 6213, 13, 4706, 565, 313, 2311, 5277, 18134, 29918, 14480, 29918, 14573, 29918, 29925, 11375, 2544, 29918, 14226, 322, 3785, 1405, 29871, 29900, 322, 3785, 529, 29871, 29900, 29916, 4198, 1125, 13, 9651, 2908, 353, 4522, 9634, 29898, 1311, 29889, 6854, 29892, 1480, 5527, 29897, 13, 9651, 1583, 29889, 1188, 29918, 1271, 29879, 29889, 4397, 29898, 1271, 29897, 13, 9651, 736, 2908, 13, 4706, 1683, 29901, 13, 9651, 736, 6213, 13, 13, 1678, 822, 11086, 29918, 517, 29883, 29898, 1311, 29892, 11086, 29918, 15091, 29918, 14035, 29892, 304, 29883, 29918, 8173, 1125, 13, 4706, 9995, 4763, 2143, 690, 2790, 278, 1591, 310, 1480, 29887, 744, 3651, 15945, 29908, 13, 4706, 1583, 29889, 517, 29883, 353, 323, 542, 580, 13, 4706, 304, 29883, 29918, 9155, 261, 353, 323, 542, 20927, 261, 29898, 1311, 29889, 6854, 29892, 4522, 29911, 542, 2642, 29892, 15600, 3557, 2290, 29889, 14480, 29954, 4214, 29892, 13, 462, 18884, 1583, 29889, 517, 29883, 29892, 11086, 29918, 15091, 29918, 14035, 29892, 304, 29883, 29918, 8173, 29897, 13, 4706, 304, 29883, 29918, 9155, 261, 29889, 2962, 580, 13, 13, 1678, 822, 903, 1482, 29918, 4058, 300, 29918, 10702, 29898, 1311, 29892, 18203, 1125, 13, 4706, 9995, 10717, 363, 15141, 11977, 23912, 411, 7495, 29907, 2472, 15945, 29908, 13, 4706, 521, 273, 353, 18203, 29889, 12719, 13, 4706, 9920, 353, 18203, 29889, 29881, 2075, 29961, 29900, 29962, 13, 4706, 20092, 353, 2281, 29889, 4058, 703, 29933, 29908, 334, 313, 2435, 29898, 4058, 300, 29889, 29881, 2075, 29897, 448, 29871, 29896, 511, 334, 4058, 300, 29889, 29881, 2075, 29961, 29896, 29901, 2314, 13, 13, 4706, 565, 313, 5083, 1275, 5868, 2190, 29918, 10490, 29911, 4214, 29903, 1125, 13, 9651, 716, 29918, 1271, 29918, 333, 353, 4356, 29898, 23813, 29961, 29900, 2314, 13, 9651, 1059, 29918, 4882, 353, 4356, 29898, 23813, 29961, 29896, 2314, 13, 9651, 565, 313, 9006, 1275, 315, 5773, 29918, 27045, 29918, 29933, 21339, 1125, 13, 18884, 2908, 353, 6213, 13, 18884, 363, 10930, 297, 1583, 29889, 1188, 29918, 1271, 29879, 29901, 13, 462, 1678, 565, 313, 1271, 29879, 29889, 1271, 29918, 333, 1275, 716, 29918, 1271, 29918, 333, 1125, 13, 462, 4706, 2908, 353, 10930, 13, 18884, 565, 313, 1271, 338, 451, 6213, 1125, 13, 462, 1678, 565, 313, 2704, 29918, 4882, 1275, 29871, 29900, 1125, 29871, 396, 1939, 1059, 13, 462, 4706, 17927, 29889, 8382, 703, 25559, 8472, 2715, 2908, 29918, 333, 16328, 29881, 613, 13, 462, 462, 268, 716, 29918, 1271, 29918, 333, 29897, 13, 13, 462, 4706, 282, 29895, 353, 15600, 3557, 16638, 300, 580, 13, 462, 4706, 282, 29895, 29889, 842, 29918, 6672, 29898, 29945, 29892, 5868, 2190, 29918, 10490, 29911, 4214, 29903, 29897, 13, 462, 4706, 282, 29895, 29889, 1272, 353, 313, 29907, 5773, 29918, 25826, 29918, 14480, 29954, 4214, 29892, 716, 29918, 1271, 29918, 333, 29892, 13, 462, 462, 259, 2908, 29889, 19145, 29897, 13, 462, 4706, 1583, 29889, 6854, 29889, 6717, 29918, 4058, 300, 29898, 20571, 29897, 13, 462, 1678, 1683, 29901, 13, 462, 4706, 17927, 29889, 27392, 703, 2392, 746, 4417, 2908, 29918, 333, 16328, 29881, 29892, 881, 29908, 13, 462, 462, 539, 376, 2649, 1051, 21043, 856, 613, 716, 29918, 1271, 29918, 333, 29897, 13, 13, 18884, 1683, 29901, 13, 462, 1678, 17927, 29889, 27392, 703, 3782, 4522, 9634, 304, 3566, 2908, 304, 1738, 6824, 1159, 13, 9651, 565, 313, 9006, 1275, 315, 5773, 29918, 25826, 29918, 14480, 29954, 4214, 1125, 13, 18884, 565, 313, 2704, 29918, 4882, 1275, 29871, 29900, 29916, 29900, 29900, 1125, 13, 462, 1678, 17927, 29889, 3888, 703, 25559, 8472, 12183, 363, 2908, 16328, 29881, 613, 13, 462, 18884, 716, 29918, 1271, 29918, 333, 29897, 13, 18884, 1683, 29901, 13, 462, 1678, 17927, 29889, 27392, 703, 2392, 16328, 29881, 746, 6257, 12183, 363, 376, 13, 462, 462, 259, 376, 1271, 16328, 29881, 613, 1059, 29918, 4882, 29892, 716, 29918, 1271, 29918, 333, 29897, 13, 4706, 565, 313, 5083, 1275, 5868, 2190, 29918, 14480, 14573, 1125, 13, 9651, 521, 273, 353, 18203, 29889, 12719, 13, 9651, 2908, 29918, 333, 353, 4356, 29898, 4058, 300, 29889, 1272, 29961, 29900, 2314, 13, 9651, 396, 14334, 353, 18203, 29889, 1272, 29961, 29900, 29901, 29946, 29962, 396, 2216, 5279, 1304, 13, 9651, 1480, 1272, 353, 18203, 29889, 1272, 29961, 29946, 17531, 13, 9651, 2908, 353, 6213, 13, 9651, 363, 10930, 297, 1583, 29889, 1188, 29918, 1271, 29879, 29901, 13, 18884, 565, 313, 1271, 29879, 29889, 1271, 29918, 333, 1275, 2908, 29918, 333, 1125, 13, 462, 1678, 2908, 353, 10930, 13, 9651, 565, 313, 1271, 338, 451, 6213, 1125, 13, 18884, 2908, 29889, 348, 4058, 29918, 1188, 29918, 1272, 29898, 1188, 1272, 29897, 13, 9651, 1683, 29901, 13, 18884, 17927, 29889, 27392, 703, 2392, 694, 4522, 9634, 304, 4386, 2908, 16328, 29881, 613, 2908, 29918, 333, 29897, 13, 2 ]
day_1/if_2.py
YugoNishio/python_study
0
183763
<reponame>YugoNishio/python_study #条件について if int(input("整数を入力してください")): #整数が入力されれば条件がTrue print("整数が入力されました") else: #整数が入力されなかったら? print("整数が入力されませんでした") #残念ながら整数以外を入力するとエラーが起きてしまいました。 #どうすれば良かったのでしょうか...(error_1.pyに続く…)
[ 1, 529, 276, 1112, 420, 29958, 29979, 15490, 29940, 728, 601, 29914, 4691, 29918, 18082, 29891, 13, 29937, 31217, 30631, 30353, 30773, 30298, 30466, 13, 13, 361, 938, 29898, 2080, 703, 233, 152, 183, 30354, 30396, 30752, 31074, 30326, 30466, 30568, 30955, 30566, 30298, 5783, 29901, 396, 233, 152, 183, 30354, 30458, 30752, 31074, 30566, 30553, 30553, 31254, 31217, 30631, 30458, 5574, 13, 1678, 1596, 703, 233, 152, 183, 30354, 30458, 30752, 31074, 30566, 30553, 30441, 30326, 30366, 1159, 13, 2870, 29901, 396, 233, 152, 183, 30354, 30458, 30752, 31074, 30566, 30553, 30371, 30412, 30665, 30366, 30513, 29973, 13, 1678, 1596, 703, 233, 152, 183, 30354, 30458, 30752, 31074, 30566, 30553, 30441, 31095, 30389, 30499, 30326, 30366, 1159, 13, 13, 29937, 233, 177, 142, 232, 194, 184, 30371, 30458, 30513, 233, 152, 183, 30354, 30651, 31066, 30396, 30752, 31074, 30427, 30332, 30364, 30600, 30281, 30185, 30458, 31558, 30538, 30466, 30326, 30441, 30298, 30441, 30326, 30366, 30267, 13, 29937, 31250, 30465, 30427, 30553, 31254, 31400, 30412, 30665, 30366, 30199, 30499, 30326, 31414, 30465, 30412, 856, 29898, 2704, 29918, 29896, 29889, 2272, 30353, 234, 185, 157, 30568, 30098, 29897, 13, 2 ]
scripts/call_logs.py
asad-saleem-confiz/general-congress-hotline
44
175274
import csv import operator import os from collections import defaultdict from datetime import datetime from twilio.rest import TwilioRestClient FAILED_STATUSES = set(['busy', 'no-answer', 'ringing', 'failed', 'canceled']) account_sid = os.environ['TWILIO_ACCOUNT_SID'] auth_token = os.environ['TWILIO_AUTH_TOKEN'] client = TwilioRestClient(account_sid, auth_token) inbound_calls = [] outbound_calls = [] durations = [] nonzero_durations = [] failed_calls = [] to = [] total = 0 c = 0 calls = client.calls.iter() with open('logs_844usa.csv', 'w') as csvfile: fieldnames = ['from', 'to', 'status', 'duration', 'direction', 'time'] writer = csv.DictWriter(csvfile, fieldnames=fieldnames) writer.writeheader() for call in calls: duration = 0 if call.duration is None else int(call.duration) if call.direction == 'inbound': inbound_calls.append(call) if call.direction == 'outbound-dial': outbound_calls.append(call) durations.append(duration) if duration > 0: nonzero_durations.append(duration) to.append(call.to_formatted) if call.status in FAILED_STATUSES: failed_calls.append(call) writer.writerow({ 'from': call.from_formatted, 'to': call.to_formatted, 'status': call.status, 'duration': duration, 'direction': call.direction, 'time': call.date_created.isoformat(), }) total += 1 c += 1 if c > 100: print total, '...' c = 0 print('busy/failed', len(failed_calls)) print('inbound', len(inbound_calls)) print('outbound', len(outbound_calls)) print('in/out ratio', round(float(len(outbound_calls))/(float(len(inbound_calls)))),3)[0] print('total duration', sum(durations)) print('average duration', float(sum(durations))/max(1, len(durations))) print('total nonzero duration', sum(nonzero_durations)) print('average nonzero duration', float(sum(nonzero_durations))/max(1, len(nonzero_durations))) print('num reps', len(set(to))) freq = defaultdict(int) for phone in to: freq[phone] += 1 print('frequencies') print(sorted(freq.items(), key=operator.itemgetter(1)))
[ 1, 1053, 11799, 30004, 13, 5215, 5455, 30004, 13, 5215, 2897, 30004, 13, 30004, 13, 3166, 16250, 1053, 2322, 8977, 30004, 13, 3166, 12865, 1053, 12865, 30004, 13, 30004, 13, 3166, 3252, 14876, 29889, 5060, 1053, 8168, 14876, 15078, 4032, 30004, 13, 30004, 13, 4519, 29902, 20566, 29918, 17816, 17171, 29903, 353, 731, 18959, 8262, 29891, 742, 525, 1217, 29899, 12011, 742, 525, 5393, 292, 742, 525, 26061, 742, 525, 29883, 749, 839, 2033, 8443, 13, 30004, 13, 10149, 29918, 29879, 333, 353, 2897, 29889, 21813, 1839, 16240, 29902, 5265, 29949, 29918, 2477, 18736, 29918, 29903, 1367, 2033, 30004, 13, 5150, 29918, 6979, 353, 2897, 29889, 21813, 1839, 16240, 29902, 5265, 29949, 29918, 20656, 29950, 29918, 4986, 29968, 1430, 2033, 30004, 13, 4645, 353, 8168, 14876, 15078, 4032, 29898, 10149, 29918, 29879, 333, 29892, 4817, 29918, 6979, 8443, 13, 30004, 13, 262, 9917, 29918, 29883, 4293, 353, 5159, 30004, 13, 449, 9917, 29918, 29883, 4293, 353, 5159, 30004, 13, 29881, 332, 800, 353, 5159, 30004, 13, 5464, 9171, 29918, 29881, 332, 800, 353, 5159, 30004, 13, 26061, 29918, 29883, 4293, 353, 5159, 30004, 13, 517, 353, 5159, 30004, 13, 30004, 13, 7827, 353, 29871, 29900, 30004, 13, 29883, 353, 29871, 29900, 30004, 13, 29883, 4293, 353, 3132, 29889, 29883, 4293, 29889, 1524, 26471, 13, 30004, 13, 2541, 1722, 877, 20756, 29918, 29947, 29946, 29946, 11326, 29889, 7638, 742, 525, 29893, 1495, 408, 11799, 1445, 29901, 30004, 13, 1678, 1746, 7039, 353, 6024, 3166, 742, 525, 517, 742, 525, 4882, 742, 525, 19708, 742, 525, 20845, 742, 525, 2230, 2033, 30004, 13, 1678, 9227, 353, 11799, 29889, 21533, 10507, 29898, 7638, 1445, 29892, 1746, 7039, 29922, 2671, 7039, 8443, 13, 1678, 9227, 29889, 3539, 6672, 26471, 13, 30004, 13, 1678, 363, 1246, 297, 5717, 29901, 30004, 13, 4706, 14385, 353, 29871, 29900, 565, 1246, 29889, 19708, 338, 6213, 1683, 938, 29898, 4804, 29889, 19708, 8443, 13, 4706, 565, 1246, 29889, 20845, 1275, 525, 262, 9917, 2396, 30004, 13, 9651, 297, 9917, 29918, 29883, 4293, 29889, 4397, 29898, 4804, 8443, 13, 4706, 565, 1246, 29889, 20845, 1275, 525, 449, 9917, 29899, 29881, 616, 2396, 30004, 13, 9651, 714, 9917, 29918, 29883, 4293, 29889, 4397, 29898, 4804, 8443, 13, 9651, 1411, 800, 29889, 4397, 29898, 19708, 8443, 13, 9651, 565, 14385, 1405, 29871, 29900, 29901, 30004, 13, 18884, 1661, 9171, 29918, 29881, 332, 800, 29889, 4397, 29898, 19708, 8443, 13, 9651, 304, 29889, 4397, 29898, 4804, 29889, 517, 29918, 689, 19667, 8443, 13, 30004, 13, 9651, 565, 1246, 29889, 4882, 297, 13515, 29902, 20566, 29918, 17816, 17171, 29903, 29901, 30004, 13, 18884, 5229, 29918, 29883, 4293, 29889, 4397, 29898, 4804, 8443, 13, 30004, 13, 4706, 9227, 29889, 13236, 340, 3319, 30004, 13, 9651, 525, 3166, 2396, 1246, 29889, 3166, 29918, 689, 19667, 11167, 13, 9651, 525, 517, 2396, 1246, 29889, 517, 29918, 689, 19667, 11167, 13, 9651, 525, 4882, 2396, 1246, 29889, 4882, 11167, 13, 9651, 525, 19708, 2396, 14385, 11167, 13, 9651, 525, 20845, 2396, 1246, 29889, 20845, 11167, 13, 9651, 525, 2230, 2396, 1246, 29889, 1256, 29918, 11600, 29889, 10718, 4830, 3285, 30004, 13, 4706, 5615, 30004, 13, 30004, 13, 4706, 3001, 4619, 29871, 29896, 30004, 13, 4706, 274, 4619, 29871, 29896, 30004, 13, 4706, 565, 274, 1405, 29871, 29896, 29900, 29900, 29901, 30004, 13, 9651, 1596, 3001, 29892, 525, 856, 29915, 30004, 13, 9651, 274, 353, 29871, 29900, 30004, 13, 30004, 13, 2158, 877, 8262, 29891, 29914, 26061, 742, 7431, 29898, 26061, 29918, 29883, 4293, 876, 30004, 13, 2158, 877, 262, 9917, 742, 7431, 29898, 262, 9917, 29918, 29883, 4293, 876, 30004, 13, 2158, 877, 449, 9917, 742, 7431, 29898, 449, 9917, 29918, 29883, 4293, 876, 30004, 13, 2158, 877, 262, 29914, 449, 11959, 742, 4513, 29898, 7411, 29898, 2435, 29898, 449, 9917, 29918, 29883, 4293, 876, 14571, 7411, 29898, 2435, 29898, 262, 9917, 29918, 29883, 4293, 4961, 511, 29941, 9601, 29900, 29962, 30004, 13, 2158, 877, 7827, 14385, 742, 2533, 29898, 29881, 332, 800, 876, 30004, 13, 2158, 877, 12483, 482, 14385, 742, 5785, 29898, 2083, 29898, 29881, 332, 800, 876, 29914, 3317, 29898, 29896, 29892, 7431, 29898, 29881, 332, 800, 4961, 30004, 13, 2158, 877, 7827, 1661, 9171, 14385, 742, 2533, 29898, 5464, 9171, 29918, 29881, 332, 800, 876, 30004, 13, 2158, 877, 12483, 482, 1661, 9171, 14385, 742, 5785, 29898, 2083, 29898, 5464, 9171, 29918, 29881, 332, 800, 876, 29914, 3317, 29898, 29896, 29892, 7431, 29898, 5464, 9171, 29918, 29881, 332, 800, 4961, 30004, 13, 2158, 877, 1949, 337, 567, 742, 7431, 29898, 842, 29898, 517, 4961, 30004, 13, 30004, 13, 29888, 7971, 353, 2322, 8977, 29898, 524, 8443, 13, 1454, 9008, 297, 304, 29901, 30004, 13, 1678, 3005, 29939, 29961, 6710, 29962, 4619, 29871, 29896, 30004, 13, 30004, 13, 2158, 877, 10745, 339, 15942, 1495, 30004, 13, 2158, 29898, 24582, 29898, 29888, 7971, 29889, 7076, 3285, 1820, 29922, 6891, 29889, 667, 657, 357, 29898, 29896, 4961, 30004, 13, 30004, 13, 2 ]
tests/description/match_counter_test.py
centre-for-humanities-computing/danish-foundation-models
8
98261
import pytest import spacy from dfm.description import MatchCounter class TestMatchCounter: @pytest.fixture(scope="class") def texts(self): texts = [ "Der kom en soldat marcherende hen ad landevejen: én, to! én, to! Han havde sit tornyster på ryggen og en sabel ved siden, for han havde været i krigen, og nu skulle han hjem.", "Så mødte han en gammel heks på landevejen; hun var så ækel, hendes underlæbe hang hende lige ned på brystet.", "Hun sagde: God aften, soldat! Hvor du har en pæn sabel og et stort tornyster, du er en rigtig soldat! Nu skal du få så mange penge, du vil eje!", ] return texts @pytest.fixture(scope="class") def regex_patterns(self): return [ {"soldat": [{"LOWER": {"REGEX": "soldat.+"}}]}, {"tokens": [{"LOWER": {"REGEX": ".+"}}]}, ] @pytest.fixture(scope="class") def term_pattern_list(self): return MatchCounter.term_list_to_spacy_match_patterns( term_list=["heks", "soldat"] ) @pytest.fixture(scope="class") def nlp(self): return spacy.blank("da") @pytest.fixture(scope="class") def mc_basic(self, nlp, term_pattern_list): return MatchCounter(match_patterns=term_pattern_list, nlp=nlp) @pytest.fixture(scope="class") def pæn_matcher(self, nlp): pæn_match_patterns = MatchCounter.term_list_to_spacy_match_patterns( term_list=["pæn"] ) return MatchCounter(match_patterns=pæn_match_patterns, nlp=nlp) def test_term_list_pattern_generation(self, term_pattern_list): assert term_pattern_list == [ {"heks": [{"LOWER": "heks"}]}, {"soldat": [{"LOWER": "soldat"}]}, ] def test_matcher_object_generation(self, regex_patterns, mc_basic): matcher_objects = mc_basic.create_matcher_object_from_pattern_list( pattern_container_list=regex_patterns ) assert len(matcher_objects) == 2 def test_token_counts(self, regex_patterns, nlp): mc = MatchCounter(match_patterns=regex_patterns, nlp=nlp) texts = ["Været på Altevatnet kl. "] assert mc.count(texts)["tokens"] == [4] def test_get_counts_from_each_doc(self, texts, mc_basic): """ Gets counts from all docs in texts. For e.g. "heks", the list means that the token occurs: 0 times in doc 1, 1 time on doc 2, 0 times in doc 3 """ counts = mc_basic.count(texts) assert counts == {"heks": [0, 1, 0], "soldat": [1, 0, 2]} def test_multiple_matches_under_same_label(self, nlp): from dfm.description.description_patterns import get_religion_patterns mc = MatchCounter(match_patterns=get_religion_patterns(), nlp=nlp) texts = ["En kristen er en del af de kristne, og kristne tror på kristendommen"] assert mc.count(texts)["rel_christian"] == [4] def test_genders_not_matching_on_prefix(self, nlp): gender_pronoun_patterns = [ {"male_pronoun": [{"LOWER": "han"}]}, {"female_pronoun": [{"LOWER": "hun"}]}, ] mc = MatchCounter(match_patterns=gender_pronoun_patterns, nlp=nlp) texts = ["Handlekraftig, handlekraft, handlekraften"] assert mc.count(texts)["male_pronoun"] == [0] def test_labelled_term_list_generation(self): labelled_term_list = [{"christian": ["christian", "christianity"]}] output = MatchCounter.list_of_labelled_term_lists_to_spacy_match_patterns( list_of_labelled_term_lists=labelled_term_list, lowercase=True ) assert output == [ {"christian": [{"LOWER": "christian"}]}, {"christian": [{"LOWER": "christianity"}]}, ] def test_count_token_multipel_times(self, mc_basic): texts = ["En soldat er en soldat som en soldat er"] counts = mc_basic.count(texts) assert counts == {"heks": [0], "soldat": [3]} def test_lowercasing(self, mc_basic): texts = ["Soldat"] counts = mc_basic.count(texts) assert counts == {"heks": [0], "soldat": [1]} def test_normalisation(self, pæn_matcher): texts = ["pæn", "paen", "pœn"] assert pæn_matcher.count(texts) == {"pæn": [1, 0, 0]} def test_symbols(self, pæn_matcher): texts = ["pæn", "pæn,", "pæn?"] assert pæn_matcher.count(texts) == {"pæn": [1, 1, 1]} def test_newlines(self, pæn_matcher): texts = ["pæn", "p\næn,"] assert pæn_matcher.count(texts) == {"pæn": [1, 0]} def test_lemmatization(self, pæn_matcher): texts = ["pæn", "pænere", "pænest"] assert pæn_matcher.count(texts) == {"pæn": [1, 0, 0]}
[ 1, 1053, 11451, 1688, 13, 5215, 805, 4135, 13, 3166, 4489, 29885, 29889, 8216, 1053, 14514, 17779, 13, 13, 13, 1990, 4321, 9652, 17779, 29901, 13, 1678, 732, 2272, 1688, 29889, 7241, 15546, 29898, 6078, 543, 1990, 1159, 13, 1678, 822, 26442, 29898, 1311, 1125, 13, 4706, 26442, 353, 518, 13, 9651, 376, 15383, 4677, 427, 899, 4130, 8575, 261, 3324, 19061, 594, 301, 4182, 345, 4142, 29901, 904, 29876, 29892, 304, 29991, 904, 29876, 29892, 304, 29991, 7169, 20771, 311, 7845, 10146, 858, 261, 3548, 24721, 1505, 264, 3671, 427, 269, 1107, 11016, 269, 3615, 29892, 363, 5905, 20771, 311, 28340, 2267, 474, 12920, 2101, 29892, 3671, 4948, 29275, 5905, 298, 12701, 19602, 13, 9651, 376, 29903, 30020, 286, 30077, 29881, 371, 5905, 427, 330, 4850, 295, 540, 2039, 3548, 301, 4182, 345, 4142, 29936, 9074, 722, 15548, 29871, 30078, 10265, 29892, 298, 18684, 1090, 29880, 30078, 915, 13958, 298, 3324, 301, 2231, 22165, 3548, 289, 719, 303, 300, 19602, 13, 9651, 376, 29950, 348, 17233, 311, 29901, 4177, 263, 15535, 29892, 899, 4130, 29991, 379, 5267, 868, 4023, 427, 282, 30078, 29876, 269, 1107, 3671, 634, 380, 441, 10146, 858, 261, 29892, 868, 604, 427, 364, 5523, 335, 899, 4130, 29991, 12487, 27873, 868, 28105, 15548, 767, 479, 6584, 479, 29892, 868, 11928, 321, 1324, 29991, 613, 13, 4706, 4514, 13, 13, 4706, 736, 26442, 13, 13, 1678, 732, 2272, 1688, 29889, 7241, 15546, 29898, 6078, 543, 1990, 1159, 13, 1678, 822, 6528, 29918, 11037, 29879, 29898, 1311, 1125, 13, 4706, 736, 518, 13, 9651, 8853, 29879, 1025, 271, 1115, 518, 6377, 27998, 1001, 1115, 8853, 1525, 1692, 29990, 1115, 376, 29879, 1025, 271, 29889, 13578, 930, 29962, 1118, 13, 9651, 8853, 517, 12360, 1115, 518, 6377, 27998, 1001, 1115, 8853, 1525, 1692, 29990, 1115, 11393, 13578, 930, 29962, 1118, 13, 4706, 4514, 13, 13, 1678, 732, 2272, 1688, 29889, 7241, 15546, 29898, 6078, 543, 1990, 1159, 13, 1678, 822, 1840, 29918, 11037, 29918, 1761, 29898, 1311, 1125, 13, 4706, 736, 14514, 17779, 29889, 8489, 29918, 1761, 29918, 517, 29918, 1028, 4135, 29918, 4352, 29918, 11037, 29879, 29898, 13, 9651, 1840, 29918, 1761, 29922, 3366, 354, 2039, 613, 376, 29879, 1025, 271, 3108, 13, 4706, 1723, 13, 13, 1678, 732, 2272, 1688, 29889, 7241, 15546, 29898, 6078, 543, 1990, 1159, 13, 1678, 822, 302, 22833, 29898, 1311, 1125, 13, 4706, 736, 805, 4135, 29889, 19465, 703, 1388, 1159, 13, 13, 1678, 732, 2272, 1688, 29889, 7241, 15546, 29898, 6078, 543, 1990, 1159, 13, 1678, 822, 286, 29883, 29918, 16121, 29898, 1311, 29892, 302, 22833, 29892, 1840, 29918, 11037, 29918, 1761, 1125, 13, 4706, 736, 14514, 17779, 29898, 4352, 29918, 11037, 29879, 29922, 8489, 29918, 11037, 29918, 1761, 29892, 302, 22833, 29922, 12938, 29886, 29897, 13, 13, 1678, 732, 2272, 1688, 29889, 7241, 15546, 29898, 6078, 543, 1990, 1159, 13, 1678, 822, 282, 30078, 29876, 29918, 4352, 261, 29898, 1311, 29892, 302, 22833, 1125, 13, 4706, 282, 30078, 29876, 29918, 4352, 29918, 11037, 29879, 353, 14514, 17779, 29889, 8489, 29918, 1761, 29918, 517, 29918, 1028, 4135, 29918, 4352, 29918, 11037, 29879, 29898, 13, 9651, 1840, 29918, 1761, 29922, 3366, 29886, 30078, 29876, 3108, 13, 4706, 1723, 13, 13, 4706, 736, 14514, 17779, 29898, 4352, 29918, 11037, 29879, 29922, 29886, 30078, 29876, 29918, 4352, 29918, 11037, 29879, 29892, 302, 22833, 29922, 12938, 29886, 29897, 13, 13, 1678, 822, 1243, 29918, 8489, 29918, 1761, 29918, 11037, 29918, 4738, 362, 29898, 1311, 29892, 1840, 29918, 11037, 29918, 1761, 1125, 13, 4706, 4974, 1840, 29918, 11037, 29918, 1761, 1275, 518, 13, 9651, 8853, 354, 2039, 1115, 518, 6377, 27998, 1001, 1115, 376, 354, 2039, 29908, 6525, 1118, 13, 9651, 8853, 29879, 1025, 271, 1115, 518, 6377, 27998, 1001, 1115, 376, 29879, 1025, 271, 29908, 6525, 1118, 13, 4706, 4514, 13, 13, 1678, 822, 1243, 29918, 4352, 261, 29918, 3318, 29918, 4738, 362, 29898, 1311, 29892, 6528, 29918, 11037, 29879, 29892, 286, 29883, 29918, 16121, 1125, 13, 4706, 1993, 261, 29918, 12650, 353, 286, 29883, 29918, 16121, 29889, 3258, 29918, 4352, 261, 29918, 3318, 29918, 3166, 29918, 11037, 29918, 1761, 29898, 13, 9651, 4766, 29918, 7611, 29918, 1761, 29922, 13087, 29918, 11037, 29879, 13, 4706, 1723, 13, 13, 4706, 4974, 7431, 29898, 4352, 261, 29918, 12650, 29897, 1275, 29871, 29906, 13, 13, 1678, 822, 1243, 29918, 6979, 29918, 2798, 29879, 29898, 1311, 29892, 6528, 29918, 11037, 29879, 29892, 302, 22833, 1125, 13, 4706, 286, 29883, 353, 14514, 17779, 29898, 4352, 29918, 11037, 29879, 29922, 13087, 29918, 11037, 29879, 29892, 302, 22833, 29922, 12938, 29886, 29897, 13, 13, 4706, 26442, 353, 6796, 29963, 30078, 2267, 3548, 838, 371, 9046, 1212, 9489, 29889, 376, 29962, 13, 13, 4706, 4974, 286, 29883, 29889, 2798, 29898, 726, 29879, 29897, 3366, 517, 12360, 3108, 1275, 518, 29946, 29962, 13, 13, 1678, 822, 1243, 29918, 657, 29918, 2798, 29879, 29918, 3166, 29918, 4204, 29918, 1514, 29898, 1311, 29892, 26442, 29892, 286, 29883, 29918, 16121, 1125, 13, 4706, 9995, 13, 4706, 402, 1691, 18139, 515, 599, 10561, 297, 26442, 29889, 1152, 321, 29889, 29887, 29889, 376, 354, 2039, 613, 278, 1051, 2794, 393, 278, 5993, 10008, 29901, 13, 632, 29900, 3064, 297, 1574, 29871, 29896, 29892, 13, 632, 29896, 931, 373, 1574, 29871, 29906, 29892, 13, 632, 29900, 3064, 297, 1574, 29871, 29941, 13, 4706, 9995, 13, 13, 4706, 18139, 353, 286, 29883, 29918, 16121, 29889, 2798, 29898, 726, 29879, 29897, 13, 13, 4706, 4974, 18139, 1275, 8853, 354, 2039, 1115, 518, 29900, 29892, 29871, 29896, 29892, 29871, 29900, 1402, 376, 29879, 1025, 271, 1115, 518, 29896, 29892, 29871, 29900, 29892, 29871, 29906, 12258, 13, 13, 1678, 822, 1243, 29918, 20787, 29918, 20317, 29918, 5062, 29918, 17642, 29918, 1643, 29898, 1311, 29892, 302, 22833, 1125, 13, 4706, 515, 4489, 29885, 29889, 8216, 29889, 8216, 29918, 11037, 29879, 1053, 679, 29918, 2674, 335, 291, 29918, 11037, 29879, 13, 13, 4706, 286, 29883, 353, 14514, 17779, 29898, 4352, 29918, 11037, 29879, 29922, 657, 29918, 2674, 335, 291, 29918, 11037, 29879, 3285, 302, 22833, 29922, 12938, 29886, 29897, 13, 13, 4706, 26442, 353, 6796, 2369, 413, 2021, 264, 604, 427, 628, 2511, 316, 413, 2021, 484, 29892, 3671, 413, 2021, 484, 534, 272, 3548, 413, 2021, 355, 9944, 3108, 13, 13, 4706, 4974, 286, 29883, 29889, 2798, 29898, 726, 29879, 29897, 3366, 2674, 29918, 305, 2021, 713, 3108, 1275, 518, 29946, 29962, 13, 13, 1678, 822, 1243, 29918, 29887, 21043, 29918, 1333, 29918, 4352, 292, 29918, 265, 29918, 13506, 29898, 1311, 29892, 302, 22833, 1125, 13, 4706, 23346, 29918, 558, 265, 1309, 29918, 11037, 29879, 353, 518, 13, 9651, 8853, 19202, 29918, 558, 265, 1309, 1115, 518, 6377, 27998, 1001, 1115, 376, 5403, 29908, 6525, 1118, 13, 9651, 8853, 29888, 331, 744, 29918, 558, 265, 1309, 1115, 518, 6377, 27998, 1001, 1115, 376, 29882, 348, 29908, 6525, 1118, 13, 4706, 4514, 13, 13, 4706, 286, 29883, 353, 14514, 17779, 29898, 4352, 29918, 11037, 29879, 29922, 26098, 29918, 558, 265, 1309, 29918, 11037, 29879, 29892, 302, 22833, 29922, 12938, 29886, 29897, 13, 13, 4706, 26442, 353, 6796, 13554, 29895, 4154, 335, 29892, 4386, 29895, 4154, 29892, 4386, 29895, 4154, 264, 3108, 13, 13, 4706, 4974, 286, 29883, 29889, 2798, 29898, 726, 29879, 29897, 3366, 19202, 29918, 558, 265, 1309, 3108, 1275, 518, 29900, 29962, 13, 13, 1678, 822, 1243, 29918, 1643, 839, 29918, 8489, 29918, 1761, 29918, 4738, 362, 29898, 1311, 1125, 13, 4706, 3858, 839, 29918, 8489, 29918, 1761, 353, 518, 6377, 305, 2021, 713, 1115, 6796, 305, 2021, 713, 613, 376, 305, 2021, 713, 537, 3108, 6525, 13, 13, 4706, 1962, 353, 14514, 17779, 29889, 1761, 29918, 974, 29918, 1643, 839, 29918, 8489, 29918, 21513, 29918, 517, 29918, 1028, 4135, 29918, 4352, 29918, 11037, 29879, 29898, 13, 9651, 1051, 29918, 974, 29918, 1643, 839, 29918, 8489, 29918, 21513, 29922, 1643, 839, 29918, 8489, 29918, 1761, 29892, 5224, 4878, 29922, 5574, 13, 4706, 1723, 13, 13, 4706, 4974, 1962, 1275, 518, 13, 9651, 8853, 305, 2021, 713, 1115, 518, 6377, 27998, 1001, 1115, 376, 305, 2021, 713, 29908, 6525, 1118, 13, 9651, 8853, 305, 2021, 713, 1115, 518, 6377, 27998, 1001, 1115, 376, 305, 2021, 713, 537, 29908, 6525, 1118, 13, 4706, 4514, 13, 13, 1678, 822, 1243, 29918, 2798, 29918, 6979, 29918, 18056, 295, 29918, 3706, 29898, 1311, 29892, 286, 29883, 29918, 16121, 1125, 13, 4706, 26442, 353, 6796, 2369, 899, 4130, 604, 427, 899, 4130, 1047, 427, 899, 4130, 604, 3108, 13, 4706, 18139, 353, 286, 29883, 29918, 16121, 29889, 2798, 29898, 726, 29879, 29897, 13, 13, 4706, 4974, 18139, 1275, 8853, 354, 2039, 1115, 518, 29900, 1402, 376, 29879, 1025, 271, 1115, 518, 29941, 12258, 13, 13, 1678, 822, 1243, 29918, 677, 6269, 5832, 29898, 1311, 29892, 286, 29883, 29918, 16121, 1125, 13, 4706, 26442, 353, 6796, 29903, 1025, 271, 3108, 13, 4706, 18139, 353, 286, 29883, 29918, 16121, 29889, 2798, 29898, 726, 29879, 29897, 13, 13, 4706, 4974, 18139, 1275, 8853, 354, 2039, 1115, 518, 29900, 1402, 376, 29879, 1025, 271, 1115, 518, 29896, 12258, 13, 13, 1678, 822, 1243, 29918, 8945, 4371, 29898, 1311, 29892, 282, 30078, 29876, 29918, 4352, 261, 1125, 13, 4706, 26442, 353, 6796, 29886, 30078, 29876, 613, 376, 3274, 264, 613, 376, 29886, 30106, 29876, 3108, 13, 13, 4706, 4974, 282, 30078, 29876, 29918, 4352, 261, 29889, 2798, 29898, 726, 29879, 29897, 1275, 8853, 29886, 30078, 29876, 1115, 518, 29896, 29892, 29871, 29900, 29892, 29871, 29900, 12258, 13, 13, 1678, 822, 1243, 29918, 18098, 29879, 29898, 1311, 29892, 282, 30078, 29876, 29918, 4352, 261, 1125, 13, 4706, 26442, 353, 6796, 29886, 30078, 29876, 613, 376, 29886, 30078, 29876, 29892, 613, 376, 29886, 30078, 29876, 3026, 29962, 13, 13, 4706, 4974, 282, 30078, 29876, 29918, 4352, 261, 29889, 2798, 29898, 726, 29879, 29897, 1275, 8853, 29886, 30078, 29876, 1115, 518, 29896, 29892, 29871, 29896, 29892, 29871, 29896, 12258, 13, 13, 1678, 822, 1243, 29918, 1482, 9012, 29898, 1311, 29892, 282, 30078, 29876, 29918, 4352, 261, 1125, 13, 4706, 26442, 353, 6796, 29886, 30078, 29876, 613, 376, 29886, 29905, 29876, 30078, 29876, 1699, 29962, 13, 13, 4706, 4974, 282, 30078, 29876, 29918, 4352, 261, 29889, 2798, 29898, 726, 29879, 29897, 1275, 8853, 29886, 30078, 29876, 1115, 518, 29896, 29892, 29871, 29900, 12258, 13, 13, 1678, 822, 1243, 29918, 2409, 2922, 2133, 29898, 1311, 29892, 282, 30078, 29876, 29918, 4352, 261, 1125, 13, 4706, 26442, 353, 6796, 29886, 30078, 29876, 613, 376, 29886, 30078, 29876, 406, 613, 376, 29886, 30078, 17510, 3108, 13, 13, 4706, 4974, 282, 30078, 29876, 29918, 4352, 261, 29889, 2798, 29898, 726, 29879, 29897, 1275, 8853, 29886, 30078, 29876, 1115, 518, 29896, 29892, 29871, 29900, 29892, 29871, 29900, 12258, 13, 2 ]
understand_morris.py
bhmueller/thesis
0
195117
<reponame>bhmueller/thesis from multiprocessing import Pool from multiprocessing import cpu_count from joblib import Parallel, delayed import numpy as np import pandas as pd from python.auxiliary import rust_model_morris from econsa.morris import elementary_effects from econsa.morris import _get_uniform_base_draws from econsa.morris import _uniform_to_standard_normal from econsa.morris import _dependent_draws from econsa.morris import _shift_sample from econsa.morris import _shift_cov from econsa.morris import _calculate_indices from econsa.morris import _calculate_cumulative_indices use_eoq = True def eoq_model_morris(x, r=0.1): """EOQ Model that handles data as presented by elementary_effects.""" m = x["value"][0] c = x["value"][1] s = x["value"][2] # m_below_zero = 0 if m < 0: m = 0 # print('m < 0') elif c < 0: raise ValueError elif s < 0: s = 0 # print('s < 0') else: pass return np.sqrt((24 * m * s) / (r * c)) # if (24 * m * s) / (r * c) <= 0: # return 0 # elif (24 * m * s) / (r * c) > 0: # return np.sqrt((24 * m * s) / (r * c)) # else: # raise ValueError def model_func(params): return 5 # Choose model. if use_eoq is True: func = eoq_model_morris elif use_eoq is False: func = model_func else: raise ValueError params = pd.DataFrame(data=[5.345, 0.0135, 2.15], columns=["value"]) cov = pd.DataFrame(data=np.diag([1, 0.000001, 0.01])) n_draws = 100 n_cores = cpu_count() sampling_scheme = "sobol" u_a, u_b = _get_uniform_base_draws(n_draws, len(params), sampling_scheme) z_a = _uniform_to_standard_normal(u_a) z_b = _uniform_to_standard_normal(u_b) mean_np = params["value"].to_numpy() cov_np = cov.to_numpy() dep_samples_ind_x, a_sample_ind_x = _dependent_draws( z_a, z_b, mean_np, cov_np, "ind", ) dep_samples_corr_x, _ = _dependent_draws(z_a, z_b, mean_np, cov_np, "corr") # Dive into _evaluate_model sample = dep_samples_ind_x # def _evaluate_model(func, params, sample, n_cores): # n_draws, n_params, _ = sample.shape # evals = np.zeros((n_draws, n_params)) # inputs = [] # for d in range(n_draws): # for p in range(n_params): # par = params.copy() # par["value"] = sample[d, p] # inputs.append(par) # # TypeError joblib; cannot unpack non-it fct. object. # inputs = np.asarray(inputs) # p = Pool(processes=n_cores) # # The below line causes malfunction. # # evals_flat = p.map(func, inputs) # # Alternative: use map only. No multiprocessing. # # evals_flat = map(func, inputs) # # evals_flat = np.asarray(list(evals_flat)) # # This was in the original script as well, but commented out. # evals_flat = Parallel(n_jobs=n_cores)(delayed(func)(inp) for inp in inputs) # evals = np.array(evals_flat).reshape(n_draws, n_params) # return evals def _evaluate_model(func, params, sample, n_cores): """Do all model evaluations needed for the EE indices. Args: func (function): Maps params to quantity of interest. params (pd.DataFrame): Model parameters. The "value" column will be replaced with values from the morris samples. sample (np.ndarray): Array of shape (n_draws, n_params, n_params). Morris samples in the multivariate normal space. Returns: evals (np.ndarray): Array of shape (n_draws, n_params) with model evaluations """ n_draws, n_params, _ = sample.shape evals = np.zeros((n_draws, n_params)) inputs = [] for d in range(n_draws): for p in range(n_params): par = params.copy() par["value"] = sample[d, p] inputs.append(par) p = Pool(processes=n_cores) # evals_flat = p.map(func, inputs) evals_flat = Parallel(n_jobs=n_cores)(delayed(func)(inp) for inp in inputs) evals = np.array(evals_flat).reshape(n_draws, n_params) return evals evals_ind = _evaluate_model(func, params, dep_samples_ind_x, n_cores) evals_base_ind = _evaluate_model(func, params, a_sample_ind_x, n_cores) evals_corr = _evaluate_model(func, params, dep_samples_corr_x, n_cores) evals_base_corr = _shift_sample(evals_base_ind, -1) deltas = u_b - u_a mu_ind, sigma_ind = _calculate_indices( evals_ind, evals_base_ind, deltas, params.index, ) mu_corr, sigma_corr = _calculate_indices( evals_corr, evals_base_corr, deltas, params.index, ) mu_ind_cum, sigma_ind_cum = _calculate_cumulative_indices( evals_ind, evals_base_ind, deltas, params.index, ) mu_corr_cum, sigma_corr_cum = _calculate_cumulative_indices( evals_corr, evals_base_corr, deltas, params.index, ) res = { "mu_ind": mu_ind, "mu_corr": mu_corr, "sigma_ind": sigma_ind, "sigma_corr": sigma_corr, "mu_ind_cum": mu_ind_cum, "mu_corr_cum": mu_corr_cum, "sigma_ind_cum": sigma_ind_cum, "sigma_corr_cum": sigma_corr_cum, }
[ 1, 529, 276, 1112, 420, 29958, 29890, 29882, 2589, 4539, 29914, 26533, 13, 3166, 6674, 307, 985, 292, 1053, 28625, 13, 3166, 6674, 307, 985, 292, 1053, 26403, 29918, 2798, 13, 3166, 4982, 1982, 1053, 1459, 6553, 29892, 29801, 13, 5215, 12655, 408, 7442, 13, 5215, 11701, 408, 10518, 13, 3166, 3017, 29889, 2993, 2638, 653, 1053, 21580, 29918, 4299, 29918, 12257, 3780, 13, 3166, 321, 3200, 29874, 29889, 12257, 3780, 1053, 22470, 29918, 15987, 29879, 13, 3166, 321, 3200, 29874, 29889, 12257, 3780, 1053, 903, 657, 29918, 29590, 29918, 3188, 29918, 4012, 29879, 13, 3166, 321, 3200, 29874, 29889, 12257, 3780, 1053, 903, 29590, 29918, 517, 29918, 15770, 29918, 8945, 13, 3166, 321, 3200, 29874, 29889, 12257, 3780, 1053, 903, 18980, 29918, 4012, 29879, 13, 3166, 321, 3200, 29874, 29889, 12257, 3780, 1053, 903, 10889, 29918, 11249, 13, 3166, 321, 3200, 29874, 29889, 12257, 3780, 1053, 903, 10889, 29918, 24542, 13, 3166, 321, 3200, 29874, 29889, 12257, 3780, 1053, 903, 15807, 403, 29918, 513, 1575, 13, 3166, 321, 3200, 29874, 29889, 12257, 3780, 1053, 903, 15807, 403, 29918, 29883, 398, 28524, 29918, 513, 1575, 13, 13, 1509, 29918, 29872, 29877, 29939, 353, 5852, 13, 13, 13, 1753, 321, 29877, 29939, 29918, 4299, 29918, 12257, 3780, 29898, 29916, 29892, 364, 29922, 29900, 29889, 29896, 1125, 13, 1678, 9995, 29923, 29949, 29984, 8125, 393, 17766, 848, 408, 9132, 491, 22470, 29918, 15987, 29879, 1213, 15945, 13, 1678, 286, 353, 921, 3366, 1767, 3108, 29961, 29900, 29962, 13, 1678, 274, 353, 921, 3366, 1767, 3108, 29961, 29896, 29962, 13, 1678, 269, 353, 921, 3366, 1767, 3108, 29961, 29906, 29962, 13, 1678, 396, 286, 29918, 22503, 29918, 9171, 353, 29871, 29900, 13, 1678, 565, 286, 529, 29871, 29900, 29901, 13, 4706, 286, 353, 29871, 29900, 13, 4706, 396, 1596, 877, 29885, 529, 29871, 29900, 1495, 13, 1678, 25342, 274, 529, 29871, 29900, 29901, 13, 4706, 12020, 7865, 2392, 13, 1678, 25342, 269, 529, 29871, 29900, 29901, 13, 4706, 269, 353, 29871, 29900, 13, 4706, 396, 1596, 877, 29879, 529, 29871, 29900, 1495, 13, 1678, 1683, 29901, 13, 4706, 1209, 13, 13, 1678, 736, 7442, 29889, 3676, 3552, 29906, 29946, 334, 286, 334, 269, 29897, 847, 313, 29878, 334, 274, 876, 13, 1678, 396, 565, 313, 29906, 29946, 334, 286, 334, 269, 29897, 847, 313, 29878, 334, 274, 29897, 5277, 29871, 29900, 29901, 13, 1678, 396, 268, 736, 29871, 29900, 13, 1678, 396, 25342, 313, 29906, 29946, 334, 286, 334, 269, 29897, 847, 313, 29878, 334, 274, 29897, 1405, 29871, 29900, 29901, 13, 1678, 396, 268, 736, 7442, 29889, 3676, 3552, 29906, 29946, 334, 286, 334, 269, 29897, 847, 313, 29878, 334, 274, 876, 13, 1678, 396, 1683, 29901, 13, 1678, 396, 268, 12020, 7865, 2392, 13, 13, 13, 1753, 1904, 29918, 9891, 29898, 7529, 1125, 13, 1678, 736, 29871, 29945, 13, 13, 13, 29937, 14542, 852, 1904, 29889, 13, 361, 671, 29918, 29872, 29877, 29939, 338, 5852, 29901, 13, 1678, 3653, 353, 321, 29877, 29939, 29918, 4299, 29918, 12257, 3780, 13, 23681, 671, 29918, 29872, 29877, 29939, 338, 7700, 29901, 13, 1678, 3653, 353, 1904, 29918, 9891, 13, 2870, 29901, 13, 1678, 12020, 7865, 2392, 13, 13, 7529, 353, 10518, 29889, 17271, 29898, 1272, 11759, 29945, 29889, 29941, 29946, 29945, 29892, 29871, 29900, 29889, 29900, 29896, 29941, 29945, 29892, 29871, 29906, 29889, 29896, 29945, 1402, 4341, 29922, 3366, 1767, 20068, 13, 24542, 353, 10518, 29889, 17271, 29898, 1272, 29922, 9302, 29889, 6051, 351, 4197, 29896, 29892, 29871, 29900, 29889, 29900, 29900, 29900, 29900, 29900, 29896, 29892, 29871, 29900, 29889, 29900, 29896, 12622, 13, 13, 29876, 29918, 4012, 29879, 353, 29871, 29896, 29900, 29900, 13, 29876, 29918, 29883, 2361, 353, 26403, 29918, 2798, 580, 13, 13445, 10335, 29918, 816, 2004, 353, 376, 578, 2095, 29908, 13, 13, 29884, 29918, 29874, 29892, 318, 29918, 29890, 353, 903, 657, 29918, 29590, 29918, 3188, 29918, 4012, 29879, 29898, 29876, 29918, 4012, 29879, 29892, 7431, 29898, 7529, 511, 23460, 29918, 816, 2004, 29897, 13, 29920, 29918, 29874, 353, 903, 29590, 29918, 517, 29918, 15770, 29918, 8945, 29898, 29884, 29918, 29874, 29897, 13, 29920, 29918, 29890, 353, 903, 29590, 29918, 517, 29918, 15770, 29918, 8945, 29898, 29884, 29918, 29890, 29897, 13, 12676, 29918, 9302, 353, 8636, 3366, 1767, 16862, 517, 29918, 23749, 580, 13, 24542, 29918, 9302, 353, 18838, 29889, 517, 29918, 23749, 580, 13, 13, 2716, 29918, 27736, 29918, 513, 29918, 29916, 29892, 263, 29918, 11249, 29918, 513, 29918, 29916, 353, 903, 18980, 29918, 4012, 29879, 29898, 13, 1678, 503, 29918, 29874, 29892, 13, 1678, 503, 29918, 29890, 29892, 13, 1678, 2099, 29918, 9302, 29892, 13, 1678, 18838, 29918, 9302, 29892, 13, 1678, 376, 513, 613, 13, 29897, 13, 13, 13, 2716, 29918, 27736, 29918, 29725, 29918, 29916, 29892, 903, 353, 903, 18980, 29918, 4012, 29879, 29898, 29920, 29918, 29874, 29892, 503, 29918, 29890, 29892, 2099, 29918, 9302, 29892, 18838, 29918, 9302, 29892, 376, 29725, 1159, 13, 13, 13, 29937, 360, 573, 964, 903, 24219, 403, 29918, 4299, 13, 11249, 353, 1401, 29918, 27736, 29918, 513, 29918, 29916, 13, 29937, 822, 903, 24219, 403, 29918, 4299, 29898, 9891, 29892, 8636, 29892, 4559, 29892, 302, 29918, 29883, 2361, 1125, 13, 29937, 268, 302, 29918, 4012, 29879, 29892, 302, 29918, 7529, 29892, 903, 353, 4559, 29889, 12181, 13, 29937, 268, 19745, 29879, 353, 7442, 29889, 3298, 359, 3552, 29876, 29918, 4012, 29879, 29892, 302, 29918, 7529, 876, 13, 13, 13, 29937, 268, 10970, 353, 5159, 13, 29937, 268, 363, 270, 297, 3464, 29898, 29876, 29918, 4012, 29879, 1125, 13, 29937, 308, 363, 282, 297, 3464, 29898, 29876, 29918, 7529, 1125, 13, 29937, 632, 610, 353, 8636, 29889, 8552, 580, 13, 29937, 632, 610, 3366, 1767, 3108, 353, 4559, 29961, 29881, 29892, 282, 29962, 13, 29937, 632, 10970, 29889, 4397, 29898, 862, 29897, 13, 13, 29937, 268, 396, 20948, 4982, 1982, 29936, 2609, 443, 4058, 1661, 29899, 277, 285, 312, 29889, 1203, 29889, 13, 29937, 268, 10970, 353, 7442, 29889, 294, 2378, 29898, 2080, 29879, 29897, 13, 13, 29937, 268, 282, 353, 28625, 29898, 5014, 267, 29922, 29876, 29918, 29883, 2361, 29897, 13, 13, 29937, 268, 396, 450, 2400, 1196, 9946, 4439, 2220, 29889, 13, 29937, 268, 396, 19745, 29879, 29918, 20620, 353, 282, 29889, 1958, 29898, 9891, 29892, 10970, 29897, 13, 13, 29937, 268, 396, 12440, 1230, 29901, 671, 2910, 871, 29889, 1939, 6674, 307, 985, 292, 29889, 13, 29937, 268, 396, 19745, 29879, 29918, 20620, 353, 2910, 29898, 9891, 29892, 10970, 29897, 13, 29937, 268, 396, 19745, 29879, 29918, 20620, 353, 7442, 29889, 294, 2378, 29898, 1761, 29898, 14513, 29879, 29918, 20620, 876, 13, 13, 29937, 268, 396, 910, 471, 297, 278, 2441, 2471, 408, 1532, 29892, 541, 19952, 714, 29889, 13, 29937, 268, 19745, 29879, 29918, 20620, 353, 1459, 6553, 29898, 29876, 29918, 9057, 29879, 29922, 29876, 29918, 29883, 2361, 5033, 18829, 287, 29898, 9891, 5033, 262, 29886, 29897, 363, 297, 29886, 297, 10970, 29897, 13, 13, 29937, 268, 19745, 29879, 353, 7442, 29889, 2378, 29898, 14513, 29879, 29918, 20620, 467, 690, 14443, 29898, 29876, 29918, 4012, 29879, 29892, 302, 29918, 7529, 29897, 13, 13, 29937, 268, 736, 19745, 29879, 13, 13, 13, 1753, 903, 24219, 403, 29918, 4299, 29898, 9891, 29892, 8636, 29892, 4559, 29892, 302, 29918, 29883, 2361, 1125, 13, 1678, 9995, 6132, 599, 1904, 6161, 800, 4312, 363, 278, 382, 29923, 16285, 29889, 13, 1678, 826, 3174, 29901, 13, 4706, 3653, 313, 2220, 1125, 25846, 8636, 304, 14728, 310, 4066, 29889, 13, 4706, 8636, 313, 15926, 29889, 17271, 1125, 8125, 4128, 29889, 450, 376, 1767, 29908, 1897, 674, 367, 8611, 13, 9651, 411, 1819, 515, 278, 3036, 3780, 11916, 29889, 13, 4706, 4559, 313, 9302, 29889, 299, 2378, 1125, 4398, 310, 8267, 313, 29876, 29918, 4012, 29879, 29892, 302, 29918, 7529, 29892, 302, 29918, 7529, 467, 13, 9651, 23112, 11916, 297, 278, 1773, 27432, 403, 4226, 2913, 29889, 13, 1678, 16969, 29901, 13, 4706, 19745, 29879, 313, 9302, 29889, 299, 2378, 1125, 4398, 310, 8267, 313, 29876, 29918, 4012, 29879, 29892, 302, 29918, 7529, 29897, 411, 1904, 6161, 800, 13, 1678, 9995, 13, 1678, 302, 29918, 4012, 29879, 29892, 302, 29918, 7529, 29892, 903, 353, 4559, 29889, 12181, 13, 1678, 19745, 29879, 353, 7442, 29889, 3298, 359, 3552, 29876, 29918, 4012, 29879, 29892, 302, 29918, 7529, 876, 13, 13, 1678, 10970, 353, 5159, 13, 1678, 363, 270, 297, 3464, 29898, 29876, 29918, 4012, 29879, 1125, 13, 4706, 363, 282, 297, 3464, 29898, 29876, 29918, 7529, 1125, 13, 9651, 610, 353, 8636, 29889, 8552, 580, 13, 9651, 610, 3366, 1767, 3108, 353, 4559, 29961, 29881, 29892, 282, 29962, 13, 9651, 10970, 29889, 4397, 29898, 862, 29897, 13, 13, 1678, 282, 353, 28625, 29898, 5014, 267, 29922, 29876, 29918, 29883, 2361, 29897, 13, 1678, 396, 19745, 29879, 29918, 20620, 353, 282, 29889, 1958, 29898, 9891, 29892, 10970, 29897, 13, 13, 1678, 19745, 29879, 29918, 20620, 353, 1459, 6553, 29898, 29876, 29918, 9057, 29879, 29922, 29876, 29918, 29883, 2361, 5033, 18829, 287, 29898, 9891, 5033, 262, 29886, 29897, 363, 297, 29886, 297, 10970, 29897, 13, 13, 1678, 19745, 29879, 353, 7442, 29889, 2378, 29898, 14513, 29879, 29918, 20620, 467, 690, 14443, 29898, 29876, 29918, 4012, 29879, 29892, 302, 29918, 7529, 29897, 13, 13, 1678, 736, 19745, 29879, 13, 13, 13, 14513, 29879, 29918, 513, 353, 903, 24219, 403, 29918, 4299, 29898, 9891, 29892, 8636, 29892, 1401, 29918, 27736, 29918, 513, 29918, 29916, 29892, 302, 29918, 29883, 2361, 29897, 13, 13, 14513, 29879, 29918, 3188, 29918, 513, 353, 903, 24219, 403, 29918, 4299, 29898, 9891, 29892, 8636, 29892, 263, 29918, 11249, 29918, 513, 29918, 29916, 29892, 302, 29918, 29883, 2361, 29897, 13, 13, 14513, 29879, 29918, 29725, 353, 903, 24219, 403, 29918, 4299, 29898, 9891, 29892, 8636, 29892, 1401, 29918, 27736, 29918, 29725, 29918, 29916, 29892, 302, 29918, 29883, 2361, 29897, 13, 13, 14513, 29879, 29918, 3188, 29918, 29725, 353, 903, 10889, 29918, 11249, 29898, 14513, 29879, 29918, 3188, 29918, 513, 29892, 448, 29896, 29897, 13, 13, 29881, 2152, 294, 353, 318, 29918, 29890, 448, 318, 29918, 29874, 13, 13, 2589, 29918, 513, 29892, 269, 2934, 29918, 513, 353, 903, 15807, 403, 29918, 513, 1575, 29898, 13, 1678, 19745, 29879, 29918, 513, 29892, 13, 1678, 19745, 29879, 29918, 3188, 29918, 513, 29892, 13, 1678, 628, 29873, 294, 29892, 13, 1678, 8636, 29889, 2248, 29892, 13, 29897, 13, 13, 2589, 29918, 29725, 29892, 269, 2934, 29918, 29725, 353, 903, 15807, 403, 29918, 513, 1575, 29898, 13, 1678, 19745, 29879, 29918, 29725, 29892, 13, 1678, 19745, 29879, 29918, 3188, 29918, 29725, 29892, 13, 1678, 628, 29873, 294, 29892, 13, 1678, 8636, 29889, 2248, 29892, 13, 29897, 13, 13, 2589, 29918, 513, 29918, 29883, 398, 29892, 269, 2934, 29918, 513, 29918, 29883, 398, 353, 903, 15807, 403, 29918, 29883, 398, 28524, 29918, 513, 1575, 29898, 13, 1678, 19745, 29879, 29918, 513, 29892, 13, 1678, 19745, 29879, 29918, 3188, 29918, 513, 29892, 13, 1678, 628, 29873, 294, 29892, 13, 1678, 8636, 29889, 2248, 29892, 13, 29897, 13, 2589, 29918, 29725, 29918, 29883, 398, 29892, 269, 2934, 29918, 29725, 29918, 29883, 398, 353, 903, 15807, 403, 29918, 29883, 398, 28524, 29918, 513, 1575, 29898, 13, 1678, 19745, 29879, 29918, 29725, 29892, 13, 1678, 19745, 29879, 29918, 3188, 29918, 29725, 29892, 13, 1678, 628, 29873, 294, 29892, 13, 1678, 8636, 29889, 2248, 29892, 13, 29897, 13, 13, 690, 353, 426, 13, 1678, 376, 2589, 29918, 513, 1115, 3887, 29918, 513, 29892, 13, 1678, 376, 2589, 29918, 29725, 1115, 3887, 29918, 29725, 29892, 13, 1678, 376, 3754, 29918, 513, 1115, 269, 2934, 29918, 513, 29892, 13, 1678, 376, 3754, 29918, 29725, 1115, 269, 2934, 29918, 29725, 29892, 13, 1678, 376, 2589, 29918, 513, 29918, 29883, 398, 1115, 3887, 29918, 513, 29918, 29883, 398, 29892, 13, 1678, 376, 2589, 29918, 29725, 29918, 29883, 398, 1115, 3887, 29918, 29725, 29918, 29883, 398, 29892, 13, 1678, 376, 3754, 29918, 513, 29918, 29883, 398, 1115, 269, 2934, 29918, 513, 29918, 29883, 398, 29892, 13, 1678, 376, 3754, 29918, 29725, 29918, 29883, 398, 1115, 269, 2934, 29918, 29725, 29918, 29883, 398, 29892, 13, 29913, 13, 2 ]