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
elemenpy/sm/boson.py
roadnarrows-robotics/elemenpy
0
61820
""" Bosons. Package: RoadNarrows elemenpy package. File: boson.py Link: https://github.com/roadnarrows-robotics/ Copyright: (c) 2019. RoadNarrows LLC http://www.roadnarrows.com All Rights Reserved License: MIT """ from copy import copy from enum import Enum from elemenpy.core.common import (isderivedclass) from elemenpy.core.format import (Format, default_encoder) from elemenpy.core.prettyprint import (print2cols) from elemenpy.sm.standardmodel import (StandardModel as sm, SubatomicParticle) from elemenpy.sm.spin import (SpinQuantumNumber) from elemenpy.sm.electriccharge import (ElectricCharge) from elemenpy.sm.colorcharge import (ColorCharge) # ----------------------------------------------------------------------------- # Boson Base Class # ----------------------------------------------------------------------------- class Boson(SubatomicParticle): """ Boson base class. """ class BosonSubfamily(Enum): """ Boson subfamily enumeration. """ UNKNOWN = 0 SCALAR = 1 # scalar VECTOR = 2 # vector Classification = sm.Classification.BOSON Family = sm.Family.BOSON Statistics = sm.Statistics.BOSONIC Name = 'boson' Symbol = 'boson' Subfamily = BosonSubfamily.UNKNOWN # registered boson subclasses by the @Boson.subclass decorator Subclasses = {} # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # Class Methods # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @classmethod def subclass(klass): """ Boson subclass decorator to add a subclass to an internal list. """ def wrap(D): """ Store derived subclass. Parameters: D Prospective derived class. """ if isderivedclass(D, klass): klass.Subclasses[D.__name__] = D return D return wrap @classmethod def finalize_boson_family(klass): """ Finalize all registered boson subclass attributes. Bosons are interdependent. """ for qname, qklass in klass.Subclasses.items(): qklass.finalize_boson() @classmethod def boson_family(klass): """ Get the dictionary of all registered boson subclasses. Returns: {qname: qclass, ...} """ return klass.Subclasses @classmethod def boson_class(klass, qname): """ Get the boson subclass. Parameters: qname Boson subclass name. Returns: qclass """ return klass.Subclasses[qname] @classmethod def subfamily(klass): """ Return boson subfamily. """ return klass.Subfamily @classmethod def print_boson_properties(klass, indent=0, **print_kwargs): """ Print fixed meson particle properties to output stream. Parameters: indent Line indentation. print_kwargs Print control keyword arguments. """ klass.print_subatomic_properties(indent=indent, **print_kwargs) #print(f"{'':<{indent+2}}Boson", **print_kwargs) print2cols([ ('Subfamily', klass.Subfamily.name),], c1width=16, indent=indent, **print_kwargs) # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # Class Instance Methods # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . def __init__(self): """ Boson initializer. """ SubatomicParticle.__init__(self) def __repr__(self): return f"{self.__module__}.{self.__class__.__name__}"\ f"()" def __str__(self): return self.name @property def subfamily(self): """ Return boson subfamily. """ return self.Subfamily def print_state(self, indent=0, **print_kwargs): """ Print boson state to output stream using default encoder. Parameters: indent Line indentation. print_kwargs Print control keyword arguments. """ SubatomicParticle.print_state(self, indent=indent, **print_kwargs) # ----------------------------------------------------------------------------- # Photon Class # ----------------------------------------------------------------------------- @Boson.subclass() class Photon(Boson): """ Photon class. """ # # Class Fixed Properties # Pid = sm.ParticleId.PHOTON Name = "photon" Symbol = default_encoder('$sm(gamma)') RestMass = 0.0 ElecCharge = ElectricCharge(0) QSpin = SpinQuantumNumber(1) # intrinsic spin number Subfamily = Boson.BosonSubfamily.VECTOR # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # Class Methods # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @classmethod def finalize_boson(klass): """ Finalize boson's class attibutes. Finalization can only proceed when all boson classes have been defined due to interdependencies. """ klass.AntiParticle = klass.boson_class('Photon') @classmethod def print_properties(klass, indent=0, **print_kwargs): klass.print_boson_properties(indent=indent, **print_kwargs) # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # Class Instance Methods # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . def __init__(self): """ Photon initializer. """ Boson.__init__(self) def __repr__(self): return f"{self.__module__}.{self.__class__.__name__}"\ f"()" def __str__(self): return self.Name def print_state(self, indent=0, **print_kwargs): """ Print photon state to output stream using default encoder. Parameters: indent Line indentation. print_kwargs Print control keyword arguments. """ Boson.print_state(self, indent=indent, **print_kwargs) # ----------------------------------------------------------------------------- # WBosonN Class # ----------------------------------------------------------------------------- @Boson.subclass() class WBosonN(Boson): """ WBosonN class. """ # # Class Fixed Properties # Pid = sm.ParticleId.W_BOSON_N Name = "W-boson-" Symbol = default_encoder('$sm(W-)') RestMass = 80.385e3 ElecCharge = ElectricCharge(-1) QSpin = SpinQuantumNumber(1) # intrinsic spin number Subfamily = Boson.BosonSubfamily.VECTOR # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # Class Methods # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @classmethod def finalize_boson(klass): """ Finalize boson's class attibutes. Finalization can only proceed when all boson classes have been defined due to interdependencies. """ klass.AntiParticle = klass.boson_class('WBosonP') @classmethod def print_properties(klass, indent=0, **print_kwargs): klass.print_boson_properties(indent=indent, **print_kwargs) # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # Class Instance Methods # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . def __init__(self): """ W- boson initializer. """ Boson.__init__(self) def __repr__(self): return f"{self.__module__}.{self.__class__.__name__}"\ f"()" def __str__(self): return self.Name def print_state(self, indent=0, **print_kwargs): """ Print W- boson state to output stream using default encoder. Parameters: indent Line indentation. print_kwargs Print control keyword arguments. """ Boson.print_state(self, indent=indent, **print_kwargs) # ----------------------------------------------------------------------------- # WBosonP Class # ----------------------------------------------------------------------------- @Boson.subclass() class WBosonP(Boson): """ WBosonP class. """ # # Class Fixed Properties # Pid = sm.ParticleId.W_BOSON_P Name = "W-boson+" Symbol = default_encoder('$sm(W+)') RestMass = 80.385e3 ElecCharge = ElectricCharge(1) QSpin = SpinQuantumNumber(1) # intrinsic spin number Subfamily = Boson.BosonSubfamily.VECTOR # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # Class Methods # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @classmethod def finalize_boson(klass): """ Finalize boson's class attibutes. Finalization can only proceed when all boson classes have been defined due to interdependencies. """ klass.AntiParticle = klass.boson_class('WBosonN') @classmethod def print_properties(klass, indent=0, **print_kwargs): klass.print_boson_properties(indent=indent, **print_kwargs) # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # Class Instance Methods # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . def __init__(self): """ W+ boson initializer. """ Boson.__init__(self) def __repr__(self): return f"{self.__module__}.{self.__class__.__name__}"\ f"()" def __str__(self): return self.Name def print_state(self, indent=0, **print_kwargs): """ Print W+ boson state to output stream using default encoder. Parameters: indent Line indentation. print_kwargs Print control keyword arguments. """ Boson.print_state(self, indent=indent, **print_kwargs) # ----------------------------------------------------------------------------- # ZBoson Class # ----------------------------------------------------------------------------- @Boson.subclass() class ZBoson(Boson): """ ZBoson class. """ # # Class Fixed Properties # Pid = sm.ParticleId.Z_BOSON Name = "Z-boson" Symbol = default_encoder('$sm(Z)') RestMass = 91.1875e3 ElecCharge = ElectricCharge(0) QSpin = SpinQuantumNumber(1) # intrinsic spin number Subfamily = Boson.BosonSubfamily.VECTOR # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # Class Methods # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @classmethod def finalize_boson(klass): """ Finalize boson's class attibutes. Finalization can only proceed when all boson classes have been defined due to interdependencies. """ klass.AntiParticle = klass.boson_class('ZBoson') @classmethod def print_properties(klass, indent=0, **print_kwargs): klass.print_boson_properties(indent=indent, **print_kwargs) # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # Class Instance Methods # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . def __init__(self): """ Z boson initializer. """ Boson.__init__(self) def __repr__(self): return f"{self.__module__}.{self.__class__.__name__}"\ f"()" def __str__(self): return self.Name def print_state(self, indent=0, **print_kwargs): """ Print Z boson state to output stream using default encoder. Parameters: indent Line indentation. print_kwargs Print control keyword arguments. """ Boson.print_state(self, indent=indent, **print_kwargs) # ----------------------------------------------------------------------------- # Gluon Class # ----------------------------------------------------------------------------- @Boson.subclass() class Gluon(Boson): """ Gluon class. """ # # Class Fixed Properties # Pid = sm.ParticleId.GLUON Name = "gluon" Symbol = default_encoder('$sm(g)') RestMass = 0.0 ElecCharge = ElectricCharge(0) QSpin = SpinQuantumNumber(1) # intrinsic spin number Subfamily = Boson.BosonSubfamily.VECTOR # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # Class Methods # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @classmethod def finalize_boson(klass): """ Finalize boson's class attibutes. Finalization can only proceed when all boson classes have been defined due to interdependencies. """ klass.AntiParticle = klass.boson_class('Gluon') @classmethod def print_properties(klass, indent=0, **print_kwargs): klass.print_boson_properties(indent=indent, **print_kwargs) # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # Class Instance Methods # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . def __init__(self, color, anticolor): """ Gluon initializer. Parameters: color Primary color charge. anticolor Anticolor charge. """ Boson.__init__(self) self._color_charge = ColorCharge(color) self._anticolor_charge = ColorCharge(anticolor) if not self.color_charge.is_primary_color(): raise ValueError( f"{self.name} '{self.color_charge.name}' is not a primary color") if not self.anticolor_charge.is_anticolor(): raise ValueError( f"{self.name} '{self.anticolor_charge.name}' is not an anticolor") if self.color_charge == self.anticolor_charge.complement: raise ValueError(f"{self.name} " + f"'{self.color_charge.name}-{self.anticolor_charge.name}' " + "defines a meson") def __repr__(self): return f"{self.__module__}.{self.__class__.__name__}"\ f"{self.color_charge!r}, {self.anticolor_charge!r})" def __str__(self): return self.fqname def __eq__(self, gluon): """ Equal to. self == gluon. Two gluons are considered equal if they are of the same kind. That is, gluons with the same color charges. """ return self.color_charge == gluon.color_charge and \ self.anticolor_charge == gluon.anticolor_charge def __ne__(self, gluon): """ Not equal to. self != gluon. Two gluons are considered not equal if they are not of the same kind. That is, gluons that do not have the same color charges. """ return self.color_charge != gluon.color_charge or \ self.anticolor_charge != gluon.anticolor_charge @property def fqname(self): return f"{self.color_charge.name}-{self.anticolor_charge.name} {self.name}" @property def color_charge(self): """ Return primary color charge. """ return self._color_charge @property def anticolor_charge(self): """ Return anticolor charge. """ return self._anticolor_charge def print_state(self, indent=0, **print_kwargs): """ Print gluon state to output stream using default encoder. Parameters: indent Line indentation. print_kwargs Print control keyword arguments. """ Boson.print_state(self, indent=indent, **print_kwargs) print2cols([ ('FQ Name', self.fqname), ('Color Charge', f"{self.color_charge.symbol} {self.color_charge.name}"), ('Anticolor Charge', f"{self.anticolor_charge.symbol} {self.anticolor_charge.name}"),], indent=indent, **print_kwargs) # ----------------------------------------------------------------------------- # HiggsBoson Class # ----------------------------------------------------------------------------- @Boson.subclass() class HiggsBoson(Boson): """ HiggsBoson class. """ # # Class Fixed Properties # Pid = sm.ParticleId.HIGGS_BOSON Name = "higgs-boson" Symbol = default_encoder('$sm(H0)') RestMass = 125.09e3 ElecCharge = ElectricCharge(0) QSpin = SpinQuantumNumber(0) Subfamily = Boson.BosonSubfamily.SCALAR # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # Class Methods # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @classmethod def finalize_boson(klass): """ Finalize boson's class attibutes. Finalization can only proceed when all boson classes have been defined due to interdependencies. """ klass.AntiParticle = klass.boson_class('HiggsBoson') @classmethod def print_properties(klass, indent=0, **print_kwargs): klass.print_boson_properties(indent=indent, **print_kwargs) # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # Class Instance Methods # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . def __init__(self): """ Higgs boson initializer. """ Boson.__init__(self) def __repr__(self): return f"{self.__module__}.{self.__class__.__name__}"\ f"()" def __str__(self): return self.Name def print_state(self, indent=0, **print_kwargs): """ Print Higgs boson state to output stream using default encoder. Parameters: indent Line indentation. print_kwargs Print control keyword arguments. """ Boson.print_state(self, indent=indent, **print_kwargs) # ----------------------------------------------------------------------------- # On module load execution # ----------------------------------------------------------------------------- Boson.finalize_boson_family() # ----------------------------------------------------------------------------- # Unit tests # ----------------------------------------------------------------------------- if __name__ == "__main__": import sys import tests.utboson as ut sys.exit(ut.utmain())
[ 1, 9995, 13, 29933, 359, 787, 29889, 13, 13, 14459, 29901, 13, 29871, 9321, 29940, 2936, 29879, 4552, 1527, 2272, 3577, 29889, 13, 13, 2283, 29901, 13, 29871, 13601, 265, 29889, 2272, 13, 13, 6595, 29901, 13, 29871, 2045, 597, 3292, 29889, 510, 29914, 9972, 29876, 2936, 29879, 29899, 307, 7451, 1199, 29914, 13, 13, 11882, 1266, 29901, 13, 29871, 313, 29883, 29897, 29871, 29906, 29900, 29896, 29929, 29889, 9321, 29940, 2936, 29879, 365, 12182, 13, 29871, 1732, 597, 1636, 29889, 9972, 29876, 2936, 29879, 29889, 510, 13, 29871, 2178, 26863, 2538, 9841, 13, 13, 29931, 293, 1947, 29901, 13, 29871, 341, 1806, 13, 15945, 29908, 13, 3166, 3509, 1053, 3509, 13, 3166, 14115, 1053, 1174, 398, 13, 13, 3166, 4552, 1527, 2272, 29889, 3221, 29889, 9435, 1053, 313, 275, 672, 2347, 1990, 29897, 13, 3166, 4552, 1527, 2272, 29889, 3221, 29889, 4830, 1053, 313, 5809, 29892, 2322, 29918, 3977, 6119, 29897, 13, 3166, 4552, 1527, 2272, 29889, 3221, 29889, 1457, 4349, 2158, 1053, 313, 2158, 29906, 22724, 29897, 13, 13, 3166, 4552, 1527, 2272, 29889, 3844, 29889, 15770, 4299, 1053, 313, 15449, 3195, 408, 1560, 29892, 3323, 21641, 7439, 2512, 29897, 13, 3166, 4552, 1527, 2272, 29889, 3844, 29889, 1028, 262, 1053, 313, 5592, 262, 22930, 398, 4557, 29897, 13, 3166, 4552, 1527, 2272, 29889, 3844, 29889, 15436, 2200, 23367, 1053, 313, 29923, 781, 2200, 5914, 479, 29897, 13, 3166, 4552, 1527, 2272, 29889, 3844, 29889, 2780, 23367, 1053, 313, 3306, 5914, 479, 29897, 13, 13, 29937, 448, 2683, 2683, 2683, 2683, 9072, 13, 29937, 10211, 265, 7399, 4134, 13, 29937, 448, 2683, 2683, 2683, 2683, 9072, 13, 1990, 10211, 265, 29898, 4035, 21641, 7439, 2512, 1125, 13, 29871, 9995, 10211, 265, 2967, 770, 29889, 9995, 13, 29871, 770, 10211, 265, 4035, 11922, 29898, 16854, 1125, 13, 1678, 9995, 10211, 265, 1014, 11922, 22447, 362, 29889, 9995, 13, 1678, 8291, 29968, 6632, 16048, 353, 29871, 29900, 13, 1678, 12314, 1964, 1718, 29871, 353, 29871, 29896, 396, 17336, 13, 1678, 478, 13845, 1955, 29871, 353, 29871, 29906, 396, 4608, 13, 13, 29871, 23236, 29871, 353, 1560, 29889, 2385, 2450, 29889, 8456, 3094, 13, 29871, 14662, 3986, 353, 1560, 29889, 27104, 29889, 8456, 3094, 13, 29871, 27098, 418, 353, 1560, 29889, 9513, 6765, 29889, 8456, 3094, 2965, 13, 29871, 4408, 9651, 353, 525, 27737, 265, 29915, 13, 29871, 23858, 3986, 353, 525, 27737, 265, 29915, 13, 13, 29871, 3323, 11922, 539, 353, 10211, 265, 4035, 11922, 29889, 3904, 29968, 6632, 16048, 13, 13, 29871, 396, 15443, 13601, 265, 1014, 13203, 491, 278, 732, 29933, 359, 265, 29889, 1491, 1990, 10200, 1061, 13, 29871, 3323, 13203, 353, 6571, 29871, 13, 13, 29871, 396, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 13, 29871, 396, 4134, 8108, 29879, 13, 29871, 396, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 13, 259, 13, 29871, 732, 1990, 5696, 13, 29871, 822, 19481, 29898, 29895, 605, 1125, 13, 1678, 9995, 13, 1678, 10211, 265, 19481, 10200, 1061, 304, 788, 263, 19481, 304, 385, 7463, 1051, 29889, 13, 1678, 9995, 13, 1678, 822, 12244, 29898, 29928, 1125, 13, 418, 9995, 13, 418, 14491, 10723, 19481, 29889, 13, 13, 418, 12662, 2699, 29901, 13, 4706, 360, 259, 1019, 29879, 12645, 10723, 770, 29889, 13, 418, 9995, 13, 418, 565, 338, 672, 2347, 1990, 29898, 29928, 29892, 22902, 1125, 13, 4706, 22902, 29889, 4035, 13203, 29961, 29928, 17255, 978, 1649, 29962, 353, 360, 13, 418, 736, 360, 13, 1678, 736, 12244, 13, 13, 29871, 732, 1990, 5696, 13, 29871, 822, 2186, 675, 29918, 27737, 265, 29918, 11922, 29898, 29895, 605, 1125, 13, 1678, 9995, 13, 1678, 9550, 675, 599, 15443, 13601, 265, 19481, 8393, 29889, 13, 13, 1678, 10211, 787, 526, 1006, 18980, 29889, 13, 1678, 9995, 13, 1678, 363, 3855, 978, 29892, 3855, 29895, 605, 297, 22902, 29889, 4035, 13203, 29889, 7076, 7295, 13, 418, 3855, 29895, 605, 29889, 8394, 675, 29918, 27737, 265, 580, 13, 13, 29871, 732, 1990, 5696, 13, 29871, 822, 13601, 265, 29918, 11922, 29898, 29895, 605, 1125, 13, 1678, 9995, 13, 1678, 3617, 278, 8600, 310, 599, 15443, 13601, 265, 1014, 13203, 29889, 13, 13, 1678, 16969, 29901, 13, 418, 426, 29939, 978, 29901, 3855, 1990, 29892, 2023, 29913, 13, 1678, 9995, 13, 1678, 736, 22902, 29889, 4035, 13203, 13, 13, 29871, 732, 1990, 5696, 13, 29871, 822, 13601, 265, 29918, 1990, 29898, 29895, 605, 29892, 3855, 978, 1125, 13, 1678, 9995, 13, 1678, 3617, 278, 13601, 265, 19481, 29889, 13, 13, 1678, 12662, 2699, 29901, 13, 418, 3855, 978, 1678, 10211, 265, 19481, 1024, 29889, 13, 13, 1678, 16969, 29901, 13, 418, 3855, 1990, 13, 1678, 9995, 13, 1678, 736, 22902, 29889, 4035, 13203, 29961, 29939, 978, 29962, 13, 13, 29871, 732, 1990, 5696, 13, 29871, 822, 1014, 11922, 29898, 29895, 605, 1125, 13, 1678, 9995, 7106, 13601, 265, 1014, 11922, 29889, 9995, 13, 1678, 736, 22902, 29889, 4035, 11922, 13, 13, 29871, 732, 1990, 5696, 13, 29871, 822, 1596, 29918, 27737, 265, 29918, 11330, 29898, 29895, 605, 29892, 29536, 29922, 29900, 29892, 3579, 2158, 29918, 19290, 1125, 13, 1678, 9995, 13, 1678, 13905, 4343, 4883, 265, 16445, 4426, 304, 1962, 4840, 29889, 13, 13, 1678, 12662, 2699, 29901, 13, 418, 29536, 4706, 7407, 1399, 9233, 29889, 13, 418, 1596, 29918, 19290, 29871, 13905, 2761, 13553, 6273, 29889, 13, 1678, 9995, 13, 1678, 22902, 29889, 2158, 29918, 1491, 21641, 29918, 11330, 29898, 12860, 29922, 12860, 29892, 3579, 2158, 29918, 19290, 29897, 13, 13, 1678, 396, 2158, 29898, 29888, 29908, 10998, 2396, 29966, 29912, 12860, 29974, 29906, 930, 29933, 359, 265, 613, 3579, 2158, 29918, 19290, 29897, 13, 1678, 1596, 29906, 22724, 4197, 13, 418, 6702, 4035, 11922, 742, 22902, 29889, 4035, 11922, 29889, 978, 511, 1402, 13, 3986, 274, 29896, 2103, 29922, 29896, 29953, 29892, 29536, 29922, 12860, 29892, 3579, 2158, 29918, 19290, 29897, 13, 13, 29871, 396, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 13, 29871, 396, 4134, 2799, 749, 8108, 29879, 13, 29871, 396, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 13, 259, 13, 29871, 822, 4770, 2344, 12035, 1311, 1125, 13, 1678, 9995, 10211, 265, 2847, 3950, 29889, 9995, 13, 1678, 3323, 21641, 7439, 2512, 17255, 2344, 12035, 1311, 29897, 13, 13, 29871, 822, 4770, 276, 558, 12035, 1311, 1125, 13, 1678, 736, 29871, 285, 29908, 29912, 1311, 17255, 5453, 1649, 1836, 29912, 1311, 17255, 1990, 1649, 17255, 978, 1649, 5038, 29905, 13, 9651, 285, 29908, 25318, 13, 13, 29871, 822, 4770, 710, 12035, 1311, 1125, 13, 1678, 736, 1583, 29889, 978, 13, 13, 29871, 732, 6799, 13, 29871, 822, 1014, 11922, 29898, 1311, 1125, 13, 1678, 9995, 7106, 13601, 265, 1014, 11922, 29889, 9995, 13, 1678, 736, 1583, 29889, 4035, 11922, 13, 13, 29871, 822, 1596, 29918, 3859, 29898, 1311, 29892, 29536, 29922, 29900, 29892, 3579, 2158, 29918, 19290, 1125, 13, 1678, 9995, 13, 1678, 13905, 13601, 265, 2106, 304, 1962, 4840, 773, 2322, 2094, 6119, 29889, 13, 13, 1678, 12662, 2699, 29901, 13, 418, 29536, 4706, 7407, 1399, 9233, 29889, 13, 418, 1596, 29918, 19290, 29871, 13905, 2761, 13553, 6273, 29889, 13, 1678, 9995, 13, 1678, 3323, 21641, 7439, 2512, 29889, 2158, 29918, 3859, 29898, 1311, 29892, 29536, 29922, 12860, 29892, 3579, 2158, 29918, 19290, 29897, 13, 13, 29937, 448, 2683, 2683, 2683, 2683, 9072, 13, 29937, 19040, 265, 4134, 13, 29937, 448, 2683, 2683, 2683, 2683, 9072, 13, 29992, 29933, 359, 265, 29889, 1491, 1990, 580, 13, 1990, 19040, 265, 29898, 29933, 359, 265, 1125, 13, 29871, 9995, 19040, 265, 770, 29889, 9995, 13, 29871, 396, 13, 29871, 396, 4134, 383, 11925, 21582, 13, 29871, 396, 13, 29871, 349, 333, 308, 353, 1560, 29889, 7439, 2512, 1204, 29889, 19689, 2891, 1164, 13, 29871, 4408, 4706, 353, 376, 561, 327, 265, 29908, 13, 29871, 23858, 418, 353, 2322, 29918, 3977, 6119, 877, 29938, 3844, 29898, 4283, 29897, 1495, 13, 29871, 11654, 29924, 465, 1678, 353, 29871, 29900, 29889, 29900, 13, 29871, 8317, 29883, 5914, 479, 29871, 353, 26953, 5914, 479, 29898, 29900, 29897, 13, 29871, 660, 5592, 262, 539, 353, 1706, 262, 22930, 398, 4557, 29898, 29896, 29897, 1678, 396, 11158, 28594, 10917, 1353, 13, 13, 29871, 3323, 11922, 259, 353, 10211, 265, 29889, 29933, 359, 265, 4035, 11922, 29889, 12064, 1783, 1955, 13, 13, 29871, 396, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 13, 29871, 396, 4134, 8108, 29879, 13, 29871, 396, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 13, 259, 13, 29871, 732, 1990, 5696, 13, 29871, 822, 2186, 675, 29918, 27737, 265, 29898, 29895, 605, 1125, 13, 1678, 9995, 13, 1678, 9550, 675, 13601, 265, 29915, 29879, 770, 1098, 747, 2667, 29889, 13, 13, 1678, 9550, 2133, 508, 871, 8469, 746, 599, 13601, 265, 4413, 505, 1063, 13, 1678, 3342, 2861, 304, 1006, 22594, 29889, 29871, 13, 1678, 9995, 13, 1678, 22902, 29889, 13448, 29875, 7439, 2512, 353, 22902, 29889, 27737, 265, 29918, 1990, 877, 4819, 327, 265, 1495, 13, 13, 29871, 732, 1990, 5696, 13, 29871, 822, 1596, 29918, 11330, 29898, 29895, 605, 29892, 29536, 29922, 29900, 29892, 3579, 2158, 29918, 19290, 1125, 13, 1678, 22902, 29889, 2158, 29918, 27737, 265, 29918, 11330, 29898, 12860, 29922, 12860, 29892, 3579, 2158, 29918, 19290, 29897, 13, 13, 29871, 396, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 13, 29871, 396, 4134, 2799, 749, 8108, 29879, 13, 29871, 396, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 13, 259, 13, 29871, 822, 4770, 2344, 12035, 1311, 1125, 13, 1678, 9995, 19040, 265, 2847, 3950, 29889, 9995, 13, 1678, 10211, 265, 17255, 2344, 12035, 1311, 29897, 13, 13, 29871, 822, 4770, 276, 558, 12035, 1311, 1125, 13, 1678, 736, 29871, 285, 29908, 29912, 1311, 17255, 5453, 1649, 1836, 29912, 1311, 17255, 1990, 1649, 17255, 978, 1649, 5038, 29905, 13, 9651, 285, 29908, 25318, 13, 13, 29871, 822, 4770, 710, 12035, 1311, 1125, 13, 1678, 736, 1583, 29889, 1170, 13, 13, 29871, 822, 1596, 29918, 3859, 29898, 1311, 29892, 29536, 29922, 29900, 29892, 3579, 2158, 29918, 19290, 1125, 13, 1678, 9995, 13, 1678, 13905, 6731, 265, 2106, 304, 1962, 4840, 773, 2322, 2094, 6119, 29889, 13, 13, 1678, 12662, 2699, 29901, 13, 418, 29536, 4706, 7407, 1399, 9233, 29889, 13, 418, 1596, 29918, 19290, 29871, 13905, 2761, 13553, 6273, 29889, 13, 1678, 9995, 13, 1678, 10211, 265, 29889, 2158, 29918, 3859, 29898, 1311, 29892, 29536, 29922, 12860, 29892, 3579, 2158, 29918, 19290, 29897, 13, 13, 13, 29937, 448, 2683, 2683, 2683, 2683, 9072, 13, 29937, 399, 29933, 359, 265, 29940, 4134, 13, 29937, 448, 2683, 2683, 2683, 2683, 9072, 13, 29992, 29933, 359, 265, 29889, 1491, 1990, 580, 13, 1990, 399, 29933, 359, 265, 29940, 29898, 29933, 359, 265, 1125, 13, 29871, 9995, 399, 29933, 359, 265, 29940, 770, 29889, 9995, 13, 29871, 396, 13, 29871, 396, 4134, 383, 11925, 21582, 13, 29871, 396, 13, 29871, 349, 333, 308, 353, 1560, 29889, 7439, 2512, 1204, 29889, 29956, 29918, 8456, 3094, 29918, 29940, 13, 29871, 4408, 4706, 353, 376, 29956, 29899, 27737, 265, 29899, 29908, 13, 29871, 23858, 418, 353, 2322, 29918, 3977, 6119, 877, 29938, 3844, 29898, 29956, 15805, 1495, 13, 29871, 11654, 29924, 465, 1678, 353, 29871, 29947, 29900, 29889, 29941, 29947, 29945, 29872, 29941, 13, 29871, 8317, 29883, 5914, 479, 29871, 353, 26953, 5914, 479, 6278, 29896, 29897, 13, 29871, 660, 5592, 262, 539, 353, 1706, 262, 22930, 398, 4557, 29898, 29896, 29897, 1678, 396, 11158, 28594, 10917, 1353, 13, 13, 29871, 3323, 11922, 259, 353, 10211, 265, 29889, 29933, 359, 265, 4035, 11922, 29889, 12064, 1783, 1955, 13, 13, 29871, 396, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 13, 29871, 396, 4134, 8108, 29879, 13, 29871, 396, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 13, 259, 13, 29871, 732, 1990, 5696, 13, 29871, 822, 2186, 675, 29918, 27737, 265, 29898, 29895, 605, 1125, 13, 1678, 9995, 13, 1678, 9550, 675, 13601, 265, 29915, 29879, 770, 1098, 747, 2667, 29889, 13, 13, 1678, 9550, 2133, 508, 871, 8469, 746, 599, 13601, 265, 4413, 505, 1063, 13, 1678, 3342, 2861, 304, 1006, 22594, 29889, 29871, 13, 1678, 9995, 13, 1678, 22902, 29889, 13448, 29875, 7439, 2512, 353, 22902, 29889, 27737, 265, 29918, 1990, 877, 29956, 29933, 359, 265, 29925, 1495, 13, 13, 29871, 732, 1990, 5696, 13, 29871, 822, 1596, 29918, 11330, 29898, 29895, 605, 29892, 29536, 29922, 29900, 29892, 3579, 2158, 29918, 19290, 1125, 13, 1678, 22902, 29889, 2158, 29918, 27737, 265, 29918, 11330, 29898, 12860, 29922, 12860, 29892, 3579, 2158, 29918, 19290, 29897, 13, 13, 29871, 396, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 13, 29871, 396, 4134, 2799, 749, 8108, 29879, 13, 29871, 396, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 13, 259, 13, 29871, 822, 4770, 2344, 12035, 1311, 1125, 13, 1678, 9995, 399, 29899, 13601, 265, 2847, 3950, 29889, 9995, 13, 1678, 10211, 265, 17255, 2344, 12035, 1311, 29897, 13, 13, 29871, 822, 4770, 276, 558, 12035, 1311, 1125, 13, 1678, 736, 29871, 285, 29908, 29912, 1311, 17255, 5453, 1649, 1836, 29912, 1311, 17255, 1990, 1649, 17255, 978, 1649, 5038, 29905, 13, 9651, 285, 29908, 25318, 13, 13, 29871, 822, 4770, 710, 12035, 1311, 1125, 13, 1678, 736, 1583, 29889, 1170, 13, 13, 29871, 822, 1596, 29918, 3859, 29898, 1311, 29892, 29536, 29922, 29900, 29892, 3579, 2158, 29918, 19290, 1125, 13, 1678, 9995, 13, 1678, 13905, 399, 29899, 13601, 265, 2106, 304, 1962, 4840, 773, 2322, 2094, 6119, 29889, 13, 13, 1678, 12662, 2699, 29901, 13, 418, 29536, 4706, 7407, 1399, 9233, 29889, 13, 418, 1596, 29918, 19290, 29871, 13905, 2761, 13553, 6273, 29889, 13, 1678, 9995, 13, 1678, 10211, 265, 29889, 2158, 29918, 3859, 29898, 1311, 29892, 29536, 29922, 12860, 29892, 3579, 2158, 29918, 19290, 29897, 13, 13, 29937, 448, 2683, 2683, 2683, 2683, 9072, 13, 29937, 399, 29933, 359, 265, 29925, 4134, 13, 29937, 448, 2683, 2683, 2683, 2683, 9072, 13, 29992, 29933, 359, 265, 29889, 1491, 1990, 580, 13, 1990, 399, 29933, 359, 265, 29925, 29898, 29933, 359, 265, 1125, 13, 29871, 9995, 399, 29933, 359, 265, 29925, 770, 29889, 9995, 13, 29871, 396, 13, 29871, 396, 4134, 383, 11925, 21582, 13, 29871, 396, 13, 29871, 349, 333, 308, 353, 1560, 29889, 7439, 2512, 1204, 29889, 29956, 29918, 8456, 3094, 29918, 29925, 13, 29871, 4408, 4706, 353, 376, 29956, 29899, 27737, 265, 13578, 13, 29871, 23858, 418, 353, 2322, 29918, 3977, 6119, 877, 29938, 3844, 29898, 29956, 28135, 1495, 13, 29871, 11654, 29924, 465, 1678, 353, 29871, 29947, 29900, 29889, 29941, 29947, 29945, 29872, 29941, 13, 29871, 8317, 29883, 5914, 479, 29871, 353, 26953, 5914, 479, 29898, 29896, 29897, 13, 29871, 660, 5592, 262, 539, 353, 1706, 262, 22930, 398, 4557, 29898, 29896, 29897, 1678, 396, 11158, 28594, 10917, 1353, 13, 13, 29871, 3323, 11922, 259, 353, 10211, 265, 29889, 29933, 359, 265, 4035, 11922, 29889, 12064, 1783, 1955, 13, 13, 29871, 396, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 13, 29871, 396, 4134, 8108, 29879, 13, 29871, 396, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 13, 259, 13, 29871, 732, 1990, 5696, 13, 29871, 822, 2186, 675, 29918, 27737, 265, 29898, 29895, 605, 1125, 13, 1678, 9995, 13, 1678, 9550, 675, 13601, 265, 29915, 29879, 770, 1098, 747, 2667, 29889, 13, 13, 1678, 9550, 2133, 508, 871, 8469, 746, 599, 13601, 265, 4413, 505, 1063, 13, 1678, 3342, 2861, 304, 1006, 22594, 29889, 29871, 13, 1678, 9995, 13, 1678, 22902, 29889, 13448, 29875, 7439, 2512, 353, 22902, 29889, 27737, 265, 29918, 1990, 877, 29956, 29933, 359, 265, 29940, 1495, 13, 13, 29871, 732, 1990, 5696, 13, 29871, 822, 1596, 29918, 11330, 29898, 29895, 605, 29892, 29536, 29922, 29900, 29892, 3579, 2158, 29918, 19290, 1125, 13, 1678, 22902, 29889, 2158, 29918, 27737, 265, 29918, 11330, 29898, 12860, 29922, 12860, 29892, 3579, 2158, 29918, 19290, 29897, 13, 13, 29871, 396, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 13, 29871, 396, 4134, 2799, 749, 8108, 29879, 13, 29871, 396, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 13, 259, 13, 29871, 822, 4770, 2344, 12035, 1311, 1125, 13, 1678, 9995, 399, 29974, 13601, 265, 2847, 3950, 29889, 9995, 13, 1678, 10211, 265, 17255, 2344, 12035, 1311, 29897, 13, 13, 29871, 822, 4770, 276, 558, 12035, 1311, 1125, 13, 1678, 736, 29871, 285, 29908, 29912, 1311, 17255, 5453, 1649, 1836, 29912, 1311, 17255, 1990, 1649, 17255, 978, 1649, 5038, 29905, 13, 9651, 285, 29908, 25318, 13, 13, 29871, 822, 4770, 710, 12035, 1311, 1125, 13, 1678, 736, 1583, 29889, 1170, 13, 13, 29871, 822, 1596, 29918, 3859, 29898, 1311, 29892, 29536, 29922, 29900, 29892, 3579, 2158, 29918, 19290, 1125, 13, 1678, 9995, 13, 1678, 13905, 399, 29974, 13601, 265, 2106, 304, 1962, 4840, 773, 2322, 2094, 6119, 29889, 13, 13, 1678, 12662, 2699, 29901, 13, 418, 29536, 4706, 7407, 1399, 9233, 29889, 13, 418, 1596, 29918, 19290, 29871, 13905, 2761, 13553, 6273, 29889, 13, 1678, 9995, 13, 1678, 10211, 265, 29889, 2158, 29918, 3859, 29898, 1311, 29892, 29536, 29922, 12860, 29892, 3579, 2158, 29918, 19290, 29897, 13, 13, 29937, 448, 2683, 2683, 2683, 2683, 9072, 13, 29937, 796, 29933, 359, 265, 4134, 13, 29937, 448, 2683, 2683, 2683, 2683, 9072, 13, 29992, 29933, 359, 265, 29889, 1491, 1990, 580, 13, 1990, 796, 29933, 359, 265, 29898, 29933, 359, 265, 1125, 13, 29871, 9995, 796, 29933, 359, 265, 770, 29889, 9995, 13, 29871, 396, 13, 29871, 396, 4134, 383, 11925, 21582, 13, 29871, 396, 13, 29871, 349, 333, 308, 353, 1560, 29889, 7439, 2512, 1204, 29889, 29999, 29918, 8456, 3094, 13, 29871, 4408, 4706, 353, 376, 29999, 29899, 27737, 265, 29908, 13, 29871, 23858, 418, 353, 2322, 29918, 3977, 6119, 877, 29938, 3844, 29898, 29999, 29897, 1495, 13, 29871, 11654, 29924, 465, 1678, 353, 29871, 29929, 29896, 29889, 29896, 29947, 29955, 29945, 29872, 29941, 13, 29871, 8317, 29883, 5914, 479, 29871, 353, 26953, 5914, 479, 29898, 29900, 29897, 13, 29871, 660, 5592, 262, 539, 353, 1706, 262, 22930, 398, 4557, 29898, 29896, 29897, 1678, 396, 11158, 28594, 10917, 1353, 13, 13, 29871, 3323, 11922, 259, 353, 10211, 265, 29889, 29933, 359, 265, 4035, 11922, 29889, 12064, 1783, 1955, 13, 13, 29871, 396, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 13, 29871, 396, 4134, 8108, 29879, 13, 29871, 396, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 13, 259, 13, 29871, 732, 1990, 5696, 13, 29871, 822, 2186, 675, 29918, 27737, 265, 29898, 29895, 605, 1125, 13, 1678, 9995, 13, 1678, 9550, 675, 13601, 265, 29915, 29879, 770, 1098, 747, 2667, 29889, 13, 13, 1678, 9550, 2133, 508, 871, 8469, 746, 599, 13601, 265, 4413, 505, 1063, 13, 1678, 3342, 2861, 304, 1006, 22594, 29889, 29871, 13, 1678, 9995, 13, 1678, 22902, 29889, 13448, 29875, 7439, 2512, 353, 22902, 29889, 27737, 265, 29918, 1990, 877, 29999, 29933, 359, 265, 1495, 13, 13, 29871, 732, 1990, 5696, 13, 29871, 822, 1596, 29918, 11330, 29898, 29895, 605, 29892, 29536, 29922, 29900, 29892, 3579, 2158, 29918, 19290, 1125, 13, 1678, 22902, 29889, 2158, 29918, 27737, 265, 29918, 11330, 29898, 12860, 29922, 12860, 29892, 3579, 2158, 29918, 19290, 29897, 13, 13, 29871, 396, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 13, 29871, 396, 4134, 2799, 749, 8108, 29879, 13, 29871, 396, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 13, 259, 13, 29871, 822, 4770, 2344, 12035, 1311, 1125, 13, 1678, 9995, 796, 13601, 265, 2847, 3950, 29889, 9995, 13, 1678, 10211, 265, 17255, 2344, 12035, 1311, 29897, 13, 13, 29871, 822, 4770, 276, 558, 12035, 1311, 1125, 13, 1678, 736, 29871, 285, 29908, 29912, 1311, 17255, 5453, 1649, 1836, 29912, 1311, 17255, 1990, 1649, 17255, 978, 1649, 5038, 29905, 13, 9651, 285, 29908, 25318, 13, 13, 29871, 822, 4770, 710, 12035, 1311, 1125, 13, 1678, 736, 1583, 29889, 1170, 13, 13, 29871, 822, 1596, 29918, 3859, 29898, 1311, 29892, 29536, 29922, 29900, 29892, 3579, 2158, 29918, 19290, 1125, 13, 1678, 9995, 13, 1678, 13905, 796, 13601, 265, 2106, 304, 1962, 4840, 773, 2322, 2094, 6119, 29889, 13, 13, 1678, 12662, 2699, 29901, 13, 418, 29536, 4706, 7407, 1399, 9233, 29889, 13, 418, 1596, 29918, 19290, 29871, 13905, 2761, 13553, 6273, 29889, 13, 1678, 9995, 13, 1678, 10211, 265, 29889, 2158, 29918, 3859, 29898, 1311, 29892, 29536, 29922, 12860, 29892, 3579, 2158, 29918, 19290, 29897, 13, 13, 29937, 448, 2683, 2683, 2683, 2683, 9072, 13, 29937, 402, 6092, 265, 4134, 13, 29937, 448, 2683, 2683, 2683, 2683, 9072, 13, 29992, 29933, 359, 265, 29889, 1491, 1990, 580, 13, 1990, 402, 6092, 265, 29898, 29933, 359, 265, 1125, 13, 29871, 9995, 402, 6092, 265, 770, 29889, 9995, 13, 29871, 396, 13, 29871, 396, 4134, 383, 11925, 21582, 13, 29871, 396, 13, 29871, 349, 333, 308, 353, 1560, 29889, 7439, 2512, 1204, 29889, 7239, 29965, 1164, 13, 29871, 4408, 4706, 353, 376, 3820, 29884, 265, 29908, 13, 29871, 23858, 418, 353, 2322, 29918, 3977, 6119, 877, 29938, 3844, 29898, 29887, 29897, 1495, 13, 29871, 11654, 29924, 465, 1678, 353, 29871, 29900, 29889, 29900, 13, 29871, 8317, 29883, 5914, 479, 29871, 353, 26953, 5914, 479, 29898, 29900, 29897, 13, 29871, 660, 5592, 262, 539, 353, 1706, 262, 22930, 398, 4557, 29898, 29896, 29897, 1678, 396, 11158, 28594, 10917, 1353, 13, 13, 29871, 3323, 11922, 259, 353, 10211, 265, 29889, 29933, 359, 265, 4035, 11922, 29889, 12064, 1783, 1955, 13, 13, 29871, 396, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 13, 29871, 396, 4134, 8108, 29879, 13, 29871, 396, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 13, 259, 13, 29871, 732, 1990, 5696, 13, 29871, 822, 2186, 675, 29918, 27737, 265, 29898, 29895, 605, 1125, 13, 1678, 9995, 13, 1678, 9550, 675, 13601, 265, 29915, 29879, 770, 1098, 747, 2667, 29889, 13, 13, 1678, 9550, 2133, 508, 871, 8469, 746, 599, 13601, 265, 4413, 505, 1063, 13, 1678, 3342, 2861, 304, 1006, 22594, 29889, 29871, 13, 1678, 9995, 13, 1678, 22902, 29889, 13448, 29875, 7439, 2512, 353, 22902, 29889, 27737, 265, 29918, 1990, 877, 29954, 6092, 265, 1495, 13, 13, 29871, 732, 1990, 5696, 13, 29871, 822, 1596, 29918, 11330, 29898, 29895, 605, 29892, 29536, 29922, 29900, 29892, 3579, 2158, 29918, 19290, 1125, 13, 1678, 22902, 29889, 2158, 29918, 27737, 265, 29918, 11330, 29898, 12860, 29922, 12860, 29892, 3579, 2158, 29918, 19290, 29897, 13, 13, 29871, 396, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 13, 29871, 396, 4134, 2799, 749, 8108, 29879, 13, 29871, 396, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 13, 259, 13, 29871, 822, 4770, 2344, 12035, 1311, 29892, 2927, 29892, 3677, 5283, 272, 1125, 13, 1678, 9995, 13, 1678, 402, 6092, 265, 2847, 3950, 29889, 13, 13, 1678, 12662, 2699, 29901, 13, 418, 2927, 539, 28267, 2927, 8323, 29889, 13, 418, 3677, 5283, 272, 259, 5459, 5283, 272, 8323, 29889, 13, 1678, 9995, 13, 1678, 10211, 265, 17255, 2344, 12035, 1311, 29897, 13, 13, 1678, 1583, 3032, 2780, 29918, 23367, 268, 353, 9159, 5914, 479, 29898, 2780, 29897, 13, 1678, 1583, 3032, 424, 5283, 272, 29918, 23367, 353, 9159, 5914, 479, 29898, 424, 5283, 272, 29897, 13, 13, 1678, 565, 451, 1583, 29889, 2780, 29918, 23367, 29889, 275, 29918, 16072, 29918, 2780, 7295, 13, 418, 12020, 7865, 2392, 29898, 13, 3986, 285, 29908, 29912, 1311, 29889, 978, 29913, 22372, 1311, 29889, 2780, 29918, 23367, 29889, 978, 10162, 338, 451, 263, 7601, 2927, 1159, 13, 13, 1678, 565, 451, 1583, 29889, 424, 5283, 272, 29918, 23367, 29889, 275, 29918, 424, 5283, 272, 7295, 13, 418, 12020, 7865, 2392, 29898, 13, 3986, 285, 29908, 29912, 1311, 29889, 978, 29913, 22372, 1311, 29889, 424, 5283, 272, 29918, 23367, 29889, 978, 10162, 338, 451, 385, 3677, 5283, 272, 1159, 13, 13, 1678, 565, 1583, 29889, 2780, 29918, 23367, 1275, 1583, 29889, 424, 5283, 272, 29918, 23367, 29889, 510, 2037, 29901, 13, 418, 12020, 7865, 2392, 29898, 29888, 29908, 29912, 1311, 29889, 978, 29913, 376, 718, 13, 4706, 285, 29908, 29915, 29912, 1311, 29889, 2780, 29918, 23367, 29889, 978, 7402, 29912, 1311, 29889, 424, 5283, 272, 29918, 23367, 29889, 978, 10162, 376, 718, 13, 4706, 376, 1753, 1475, 263, 4883, 265, 1159, 13, 13, 29871, 822, 4770, 276, 558, 12035, 1311, 1125, 13, 1678, 736, 29871, 285, 29908, 29912, 1311, 17255, 5453, 1649, 1836, 29912, 1311, 17255, 1990, 1649, 17255, 978, 1649, 5038, 29905, 13, 9651, 285, 29908, 29912, 1311, 29889, 2780, 29918, 23367, 29991, 29878, 1118, 426, 1311, 29889, 424, 5283, 272, 29918, 23367, 29991, 29878, 1800, 29908, 13, 13, 29871, 822, 4770, 710, 12035, 1311, 1125, 13, 1678, 736, 1583, 29889, 29888, 29939, 978, 13, 13, 29871, 822, 4770, 1837, 12035, 1311, 29892, 3144, 29884, 265, 1125, 13, 1678, 9995, 13, 1678, 11243, 284, 304, 29889, 1583, 1275, 3144, 29884, 265, 29889, 13, 13, 1678, 7803, 3144, 29884, 787, 526, 5545, 5186, 565, 896, 526, 310, 278, 1021, 2924, 29889, 13, 1678, 2193, 338, 29892, 3144, 29884, 787, 411, 278, 1021, 2927, 21090, 29889, 13, 1678, 9995, 13, 1678, 736, 29871, 1583, 29889, 2780, 29918, 23367, 1275, 3144, 29884, 265, 29889, 2780, 29918, 23367, 322, 320, 13, 9651, 1583, 29889, 424, 5283, 272, 29918, 23367, 1275, 3144, 29884, 265, 29889, 424, 5283, 272, 29918, 23367, 13, 13, 29871, 822, 4770, 484, 12035, 1311, 29892, 3144, 29884, 265, 1125, 13, 1678, 9995, 13, 1678, 2216, 5186, 304, 29889, 1583, 2804, 3144, 29884, 265, 29889, 13, 13, 1678, 7803, 3144, 29884, 787, 526, 5545, 451, 5186, 565, 896, 526, 451, 310, 278, 1021, 2924, 29889, 13, 1678, 2193, 338, 29892, 3144, 29884, 787, 393, 437, 451, 505, 278, 1021, 2927, 21090, 29889, 13, 1678, 9995, 13, 1678, 736, 29871, 1583, 29889, 2780, 29918, 23367, 2804, 3144, 29884, 265, 29889, 2780, 29918, 23367, 470, 320, 13, 9651, 1583, 29889, 424, 5283, 272, 29918, 23367, 2804, 3144, 29884, 265, 29889, 424, 5283, 272, 29918, 23367, 13, 13, 29871, 732, 6799, 13, 29871, 822, 285, 29939, 978, 29898, 1311, 1125, 13, 1678, 736, 285, 29908, 29912, 1311, 29889, 2780, 29918, 23367, 29889, 978, 7402, 29912, 1311, 29889, 424, 5283, 272, 29918, 23367, 29889, 978, 29913, 426, 1311, 29889, 978, 5038, 13, 13, 29871, 732, 6799, 13, 29871, 822, 2927, 29918, 23367, 29898, 1311, 1125, 13, 1678, 9995, 7106, 7601, 2927, 8323, 29889, 9995, 13, 1678, 736, 1583, 3032, 2780, 29918, 23367, 13, 13, 29871, 732, 6799, 13, 29871, 822, 3677, 5283, 272, 29918, 23367, 29898, 1311, 1125, 13, 1678, 9995, 7106, 3677, 5283, 272, 8323, 29889, 9995, 13, 1678, 736, 1583, 3032, 424, 5283, 272, 29918, 23367, 13, 13, 29871, 822, 1596, 29918, 3859, 29898, 1311, 29892, 29536, 29922, 29900, 29892, 3579, 2158, 29918, 19290, 1125, 13, 1678, 9995, 13, 1678, 13905, 3144, 29884, 265, 2106, 304, 1962, 4840, 773, 2322, 2094, 6119, 29889, 13, 13, 1678, 12662, 2699, 29901, 13, 418, 29536, 4706, 7407, 1399, 9233, 29889, 13, 418, 1596, 29918, 19290, 29871, 13905, 2761, 13553, 6273, 29889, 13, 1678, 9995, 13, 1678, 10211, 265, 29889, 2158, 29918, 3859, 29898, 1311, 29892, 29536, 29922, 12860, 29892, 3579, 2158, 29918, 19290, 29897, 13, 13, 1678, 1596, 29906, 22724, 4197, 13, 418, 6702, 29943, 29984, 4408, 742, 1583, 29889, 29888, 29939, 978, 511, 13, 418, 6702, 3306, 2896, 479, 742, 29871, 13, 9651, 285, 29908, 29912, 1311, 29889, 2780, 29918, 23367, 29889, 18098, 29913, 426, 1311, 29889, 2780, 29918, 23367, 29889, 978, 29913, 4968, 13, 418, 6702, 13448, 5283, 272, 2896, 479, 742, 29871, 13, 9651, 285, 29908, 29912, 1311, 29889, 424, 5283, 272, 29918, 23367, 29889, 18098, 29913, 426, 1311, 29889, 424, 5283, 272, 29918, 23367, 29889, 978, 29913, 4968, 1402, 13, 3986, 29536, 29922, 12860, 29892, 3579, 2158, 29918, 19290, 29897, 13, 13, 29937, 448, 2683, 2683, 2683, 2683, 9072, 13, 29937, 379, 335, 3174, 29933, 359, 265, 4134, 13, 29937, 448, 2683, 2683, 2683, 2683, 9072, 13, 29992, 29933, 359, 265, 29889, 1491, 1990, 580, 13, 1990, 379, 335, 3174, 29933, 359, 265, 29898, 29933, 359, 265, 1125, 13, 29871, 9995, 379, 335, 3174, 29933, 359, 265, 770, 29889, 9995, 13, 29871, 396, 13, 29871, 396, 4134, 383, 11925, 21582, 13, 29871, 396, 13, 29871, 349, 333, 308, 353, 1560, 29889, 7439, 2512, 1204, 29889, 29950, 6259, 10749, 29918, 8456, 3094, 13, 29871, 4408, 4706, 353, 376, 29882, 335, 3174, 29899, 27737, 265, 29908, 13, 29871, 23858, 418, 353, 2322, 29918, 3977, 6119, 877, 29938, 3844, 29898, 29950, 29900, 29897, 1495, 13, 29871, 11654, 29924, 465, 1678, 353, 29871, 29896, 29906, 29945, 29889, 29900, 29929, 29872, 29941, 13, 29871, 8317, 29883, 5914, 479, 29871, 353, 26953, 5914, 479, 29898, 29900, 29897, 13, 29871, 660, 5592, 262, 539, 353, 1706, 262, 22930, 398, 4557, 29898, 29900, 29897, 13, 13, 29871, 3323, 11922, 259, 353, 10211, 265, 29889, 29933, 359, 265, 4035, 11922, 29889, 7187, 1964, 1718, 13, 13, 29871, 396, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 13, 29871, 396, 4134, 8108, 29879, 13, 29871, 396, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 13, 259, 13, 29871, 732, 1990, 5696, 13, 29871, 822, 2186, 675, 29918, 27737, 265, 29898, 29895, 605, 1125, 13, 1678, 9995, 13, 1678, 9550, 675, 13601, 265, 29915, 29879, 770, 1098, 747, 2667, 29889, 13, 13, 1678, 9550, 2133, 508, 871, 8469, 746, 599, 13601, 265, 4413, 505, 1063, 13, 1678, 3342, 2861, 304, 1006, 22594, 29889, 29871, 13, 1678, 9995, 13, 1678, 22902, 29889, 13448, 29875, 7439, 2512, 353, 22902, 29889, 27737, 265, 29918, 1990, 877, 29950, 335, 3174, 29933, 359, 265, 1495, 13, 13, 29871, 732, 1990, 5696, 13, 29871, 822, 1596, 29918, 11330, 29898, 29895, 605, 29892, 29536, 29922, 29900, 29892, 3579, 2158, 29918, 19290, 1125, 13, 1678, 22902, 29889, 2158, 29918, 27737, 265, 29918, 11330, 29898, 12860, 29922, 12860, 29892, 3579, 2158, 29918, 19290, 29897, 13, 13, 29871, 396, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 13, 29871, 396, 4134, 2799, 749, 8108, 29879, 13, 29871, 396, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 13, 259, 13, 29871, 822, 4770, 2344, 12035, 1311, 1125, 13, 1678, 9995, 379, 335, 3174, 13601, 265, 2847, 3950, 29889, 9995, 13, 1678, 10211, 265, 17255, 2344, 12035, 1311, 29897, 13, 13, 29871, 822, 4770, 276, 558, 12035, 1311, 1125, 13, 1678, 736, 29871, 285, 29908, 29912, 1311, 17255, 5453, 1649, 1836, 29912, 1311, 17255, 1990, 1649, 17255, 978, 1649, 5038, 29905, 13, 9651, 285, 29908, 25318, 13, 13, 29871, 822, 4770, 710, 12035, 1311, 1125, 13, 1678, 736, 1583, 29889, 1170, 13, 13, 29871, 822, 1596, 29918, 3859, 29898, 1311, 29892, 29536, 29922, 29900, 29892, 3579, 2158, 29918, 19290, 1125, 13, 1678, 9995, 13, 1678, 13905, 379, 335, 3174, 13601, 265, 2106, 304, 1962, 4840, 773, 2322, 2094, 6119, 29889, 13, 13, 1678, 12662, 2699, 29901, 13, 418, 29536, 4706, 7407, 1399, 9233, 29889, 13, 418, 1596, 29918, 19290, 29871, 13905, 2761, 13553, 6273, 29889, 13, 1678, 9995, 13, 1678, 10211, 265, 29889, 2158, 29918, 3859, 29898, 1311, 29892, 29536, 29922, 12860, 29892, 3579, 2158, 29918, 19290, 29897, 13, 13, 29937, 448, 2683, 2683, 2683, 2683, 9072, 13, 29937, 1551, 3883, 2254, 8225, 13, 29937, 448, 2683, 2683, 2683, 2683, 9072, 13, 29933, 359, 265, 29889, 8394, 675, 29918, 27737, 265, 29918, 11922, 580, 13, 13, 29937, 448, 2683, 2683, 2683, 2683, 9072, 13, 29937, 13223, 6987, 13, 29937, 448, 2683, 2683, 2683, 2683, 9072, 13, 361, 4770, 978, 1649, 1275, 376, 1649, 3396, 1649, 1115, 13, 29871, 1053, 10876, 13, 29871, 1053, 6987, 29889, 329, 27737, 265, 408, 3477, 13, 13, 29871, 10876, 29889, 13322, 29898, 329, 29889, 329, 3396, 3101, 13, 2 ]
setup.py
jlapolla/scriptutils
0
130152
<filename>setup.py<gh_stars>0 # For general information, refer to: # https://docs.python.org/3.6/distutils/index.html # https://docs.python.org/3.6/distributing/index.html#distributing-index # https://setuptools.readthedocs.io/en/latest/index.html # # For arguments to setup(), refer to: # https://docs.python.org/3.6/distutils/apiref.html#distutils.core.setup # https://setuptools.readthedocs.io/en/latest/setuptools.html#new-and-changed-setup-keywords from setuptools import setup, find_packages setup( name='jlapolla-scriptutils', version='0.1.0.dev1', packages=find_packages('src'), package_dir={'': 'src'}, )
[ 1, 529, 9507, 29958, 14669, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 1152, 2498, 2472, 29892, 2737, 304, 29901, 13, 29937, 2045, 597, 2640, 29889, 4691, 29889, 990, 29914, 29941, 29889, 29953, 29914, 5721, 13239, 29914, 2248, 29889, 1420, 13, 29937, 2045, 597, 2640, 29889, 4691, 29889, 990, 29914, 29941, 29889, 29953, 29914, 5721, 1091, 17068, 29914, 2248, 29889, 1420, 29937, 5721, 1091, 17068, 29899, 2248, 13, 29937, 2045, 597, 842, 21245, 8789, 29889, 949, 386, 287, 12332, 29889, 601, 29914, 264, 29914, 12333, 29914, 2248, 29889, 1420, 13, 29937, 13, 29937, 1152, 6273, 304, 6230, 3285, 2737, 304, 29901, 13, 29937, 2045, 597, 2640, 29889, 4691, 29889, 990, 29914, 29941, 29889, 29953, 29914, 5721, 13239, 29914, 481, 533, 29888, 29889, 1420, 29937, 5721, 13239, 29889, 3221, 29889, 14669, 13, 29937, 2045, 597, 842, 21245, 8789, 29889, 949, 386, 287, 12332, 29889, 601, 29914, 264, 29914, 12333, 29914, 842, 21245, 8789, 29889, 1420, 29937, 1482, 29899, 392, 29899, 15033, 29899, 14669, 29899, 1989, 9303, 13, 13, 13, 3166, 731, 21245, 8789, 1053, 6230, 29892, 1284, 29918, 8318, 13, 13, 13, 14669, 29898, 13, 1678, 1024, 2433, 29926, 433, 3733, 433, 29899, 2154, 13239, 742, 13, 1678, 1873, 2433, 29900, 29889, 29896, 29889, 29900, 29889, 3359, 29896, 742, 13, 1678, 9741, 29922, 2886, 29918, 8318, 877, 4351, 5477, 13, 1678, 3577, 29918, 3972, 3790, 29915, 2396, 525, 4351, 16675, 13, 29897, 13, 2 ]
web/utils.py
otoyo/satisfactory-mobile
0
168160
class CSVDumper: @classmethod def dump(self, matrix, encoding='sjis'): rows = [] for row in matrix: fields = [] for field in row: if field is None: fields.append('') elif str(field).isdigit(): fields.append(str(field)) else: fields.append('"{0}"'.format(str(field).replace('"', '""'))) rows.append(','.join(fields)) return '\n'.join(rows).encode(encoding, 'ignore')
[ 1, 770, 16874, 29928, 398, 546, 29901, 13, 13, 1678, 732, 1990, 5696, 13, 1678, 822, 16766, 29898, 1311, 29892, 4636, 29892, 8025, 2433, 29879, 29926, 275, 29374, 13, 4706, 4206, 353, 5159, 13, 4706, 363, 1948, 297, 4636, 29901, 13, 9651, 4235, 353, 5159, 13, 9651, 363, 1746, 297, 1948, 29901, 13, 18884, 565, 1746, 338, 6213, 29901, 13, 462, 1678, 4235, 29889, 4397, 877, 1495, 13, 18884, 25342, 851, 29898, 2671, 467, 275, 26204, 7295, 13, 462, 1678, 4235, 29889, 4397, 29898, 710, 29898, 2671, 876, 13, 18884, 1683, 29901, 13, 462, 1678, 4235, 29889, 4397, 877, 29908, 29912, 29900, 5038, 4286, 4830, 29898, 710, 29898, 2671, 467, 6506, 877, 29908, 742, 525, 15945, 29915, 4961, 13, 9651, 4206, 29889, 4397, 29898, 3788, 29889, 7122, 29898, 9621, 876, 13, 4706, 736, 11297, 29876, 4286, 7122, 29898, 5727, 467, 12508, 29898, 22331, 29892, 525, 17281, 1495, 13, 2 ]
hargreaves/session/__init__.py
dastra/hargreaves-sdk-python
0
40654
<reponame>dastra/hargreaves-sdk-python import logging from requests_tracker.session import WebSessionFactory from requests_tracker.storage import ICookieStorage from ..config.models import ApiConfiguration from ..utils.cookies import HLCookieHelper from ..session.shared import LoggedInSession logging.getLogger(__name__).addHandler(logging.NullHandler()) def create_session( cookies_storage: ICookieStorage, config: ApiConfiguration, retry_count: int = 1, timeout: float = 15.00): """ Creates a WebSession that will automatically handle login redirects :param timeout: :param retry_count: :param cookies_storage: :param config: :return: """ web_session = WebSessionFactory.create( cookies_storage, default_referer='https://online.hl.co.uk/', sensitive_values=[config.username, config.password, config.secure_number, config.date_of_birth], sensitive_params=['secure-number['], retry_count=retry_count, timeout=timeout ) HLCookieHelper.set_default_cookies(web_session.cookies) return LoggedInSession( web_session=web_session, config=config)
[ 1, 529, 276, 1112, 420, 29958, 29881, 579, 336, 29914, 29882, 1191, 276, 5989, 29899, 15348, 29899, 4691, 13, 5215, 12183, 13, 13, 3166, 7274, 29918, 3018, 4937, 29889, 7924, 1053, 2563, 7317, 5126, 13, 3166, 7274, 29918, 3018, 4937, 29889, 12925, 1053, 18340, 2550, 347, 10486, 13, 13, 3166, 6317, 2917, 29889, 9794, 1053, 29749, 8614, 13, 3166, 6317, 13239, 29889, 15108, 583, 1053, 379, 12182, 2550, 347, 10739, 13, 3166, 6317, 7924, 29889, 12366, 1053, 4522, 3192, 797, 7317, 13, 13, 21027, 29889, 657, 16363, 22168, 978, 1649, 467, 1202, 4598, 29898, 21027, 29889, 7327, 4598, 3101, 13, 13, 13, 1753, 1653, 29918, 7924, 29898, 13, 4706, 21046, 29918, 12925, 29901, 18340, 2550, 347, 10486, 29892, 13, 4706, 2295, 29901, 29749, 8614, 29892, 13, 4706, 337, 2202, 29918, 2798, 29901, 938, 353, 29871, 29896, 29892, 13, 4706, 11815, 29901, 5785, 353, 29871, 29896, 29945, 29889, 29900, 29900, 1125, 13, 1678, 9995, 13, 1678, 6760, 1078, 263, 2563, 7317, 393, 674, 6336, 4386, 6464, 28937, 13, 1678, 584, 3207, 11815, 29901, 13, 1678, 584, 3207, 337, 2202, 29918, 2798, 29901, 13, 1678, 584, 3207, 21046, 29918, 12925, 29901, 13, 1678, 584, 3207, 2295, 29901, 13, 1678, 584, 2457, 29901, 13, 1678, 9995, 13, 1678, 1856, 29918, 7924, 353, 2563, 7317, 5126, 29889, 3258, 29898, 13, 4706, 21046, 29918, 12925, 29892, 13, 4706, 2322, 29918, 20275, 261, 2433, 991, 597, 14627, 29889, 4415, 29889, 1111, 29889, 2679, 29914, 742, 13, 4706, 20502, 29918, 5975, 11759, 2917, 29889, 6786, 29892, 2295, 29889, 5630, 29892, 13, 462, 3986, 2295, 29889, 24216, 29918, 4537, 29892, 2295, 29889, 1256, 29918, 974, 29918, 29890, 7515, 1402, 13, 4706, 20502, 29918, 7529, 29922, 1839, 24216, 29899, 4537, 1839, 1402, 13, 4706, 337, 2202, 29918, 2798, 29922, 276, 2202, 29918, 2798, 29892, 13, 4706, 11815, 29922, 15619, 13, 1678, 1723, 13, 1678, 379, 12182, 2550, 347, 10739, 29889, 842, 29918, 4381, 29918, 15108, 583, 29898, 2676, 29918, 7924, 29889, 15108, 583, 29897, 13, 1678, 736, 4522, 3192, 797, 7317, 29898, 13, 4706, 1856, 29918, 7924, 29922, 2676, 29918, 7924, 29892, 13, 4706, 2295, 29922, 2917, 29897, 13, 2 ]
lists_mutation/remove_keyword.py
magicalcarpet/the_complete_python_course
0
124285
nintendo_games = ['Zelda', 'Mario', 'Donkey Kong', 'Zelda'] nintendo_games.remove('Zelda') print(nintendo_games) if 'Wario' in nintendo_games: nintendo_games.remove('Wario')
[ 1, 302, 28481, 29918, 29887, 1280, 353, 6024, 29999, 295, 1388, 742, 525, 29924, 2628, 742, 525, 10310, 1989, 12026, 742, 525, 29999, 295, 1388, 2033, 13, 13, 29876, 28481, 29918, 29887, 1280, 29889, 5992, 877, 29999, 295, 1388, 1495, 13, 2158, 29898, 29876, 28481, 29918, 29887, 1280, 29897, 13, 13, 361, 525, 29956, 2628, 29915, 297, 302, 28481, 29918, 29887, 1280, 29901, 13, 1678, 302, 28481, 29918, 29887, 1280, 29889, 5992, 877, 29956, 2628, 1495, 13, 13, 2 ]
rplugin/python3/denite/ui/default.py
timgates42/denite.nvim
0
4
<gh_stars>0 # ============================================================================ # FILE: default.py # AUTHOR: <NAME> <<EMAIL> at g<EMAIL>> # License: MIT license # ============================================================================ import re import typing from denite.util import echo, error, clearmatch, regex_convert_py_vim from denite.util import Nvim, UserContext, Candidates, Candidate from denite.parent import SyncParent class Default(object): @property def is_async(self) -> bool: return self._is_async def __init__(self, vim: Nvim) -> None: self._vim = vim self._denite: typing.Optional[SyncParent] = None self._selected_candidates: typing.List[int] = [] self._candidates: Candidates = [] self._cursor = 0 self._entire_len = 0 self._result: typing.List[typing.Any] = [] self._context: UserContext = {} self._bufnr = -1 self._winid = -1 self._winrestcmd = '' self._initialized = False self._winheight = 0 self._winwidth = 0 self._winminheight = -1 self._is_multi = False self._is_async = False self._matched_pattern = '' self._displayed_texts: typing.List[str] = [] self._statusline_sources = '' self._titlestring = '' self._ruler = False self._prev_action = '' self._prev_status: typing.Dict[str, typing.Any] = {} self._prev_curpos: typing.List[typing.Any] = [] self._save_window_options: typing.Dict[str, typing.Any] = {} self._sources_history: typing.List[typing.Any] = [] self._previous_text = '' self._floating = False self._filter_floating = False self._updated = False self._timers: typing.Dict[str, int] = {} self._matched_range_id = -1 self._matched_char_id = -1 self._check_matchdelete = bool(self._vim.call( 'denite#util#check_matchdelete')) def start(self, sources: typing.List[typing.Any], context: UserContext) -> typing.List[typing.Any]: if not self._denite: # if hasattr(self._vim, 'run_coroutine'): # self._denite = ASyncParent(self._vim) # else: self._denite = SyncParent(self._vim) self._result = [] context['sources_queue'] = [sources] self._start_sources_queue(context) return self._result def do_action(self, action_name: str, command: str = '', is_manual: bool = False) -> None: if is_manual: candidates = self._get_selected_candidates() elif self._get_cursor_candidate(): candidates = [self._get_cursor_candidate()] else: candidates = [] if not self._denite or not candidates or not action_name: return self._prev_action = action_name action = self._denite.get_action( self._context, action_name, candidates) if not action: return post_action = self._context['post_action'] is_quit = action['is_quit'] or post_action == 'quit' if is_quit: self.quit() self._denite.do_action(self._context, action_name, candidates) self._result = candidates if command != '': self._vim.command(command) if is_quit and post_action == 'open': # Re-open denite buffer prev_cursor = self._cursor cursor_candidate = self._get_cursor_candidate() self._init_buffer() self.redraw(False) if cursor_candidate == self._get_candidate(prev_cursor): # Restore the cursor self._move_to_pos(prev_cursor) # Disable quit flag is_quit = False if not is_quit and is_manual: self._selected_candidates = [] self.redraw(action['is_redraw']) if is_manual and self._context['sources_queue']: self._context['input'] = '' self._context['quick_move'] = '' self._start_sources_queue(self._context) return def redraw(self, is_force: bool = True) -> None: self._context['is_redraw'] = is_force if is_force: self._gather_candidates() if self._update_candidates(): self._update_buffer() else: self._update_status() self._context['is_redraw'] = False def quit(self) -> None: if self._denite: self._denite.on_close(self._context) self._quit_buffer() self._result = [] return def _restart(self) -> None: self._context['input'] = '' self._quit_buffer() self._init_denite() self._gather_candidates() self._init_buffer() self._update_candidates() self._update_buffer() def _start_sources_queue(self, context: UserContext) -> None: if not context['sources_queue']: return self._sources_history.append({ 'sources': context['sources_queue'][0], 'path': context['path'], }) self._start(context['sources_queue'][0], context) if context['sources_queue']: context['sources_queue'].pop(0) context['path'] = self._context['path'] def _start(self, sources: typing.List[typing.Any], context: UserContext) -> None: from denite.ui.map import do_map self._vim.command('silent! autocmd! denite') if re.search(r'\[Command Line\]$', self._vim.current.buffer.name): # Ignore command line window. return resume = self._initialized and context['resume'] if resume: # Skip the initialization update = ('immediately', 'immediately_1', 'cursor_pos', 'prev_winid', 'start_filter', 'quick_move') for key in update: self._context[key] = context[key] self._check_move_option() if self._check_do_option(): return self._init_buffer() if context['refresh']: self.redraw() self._move_to_pos(self._cursor) else: if self._context != context: self._context.clear() self._context.update(context) self._context['sources'] = sources self._context['is_redraw'] = False self._is_multi = len(sources) > 1 if not sources: # Ignore empty sources. error(self._vim, 'Empty sources') return self._init_denite() self._gather_candidates() self._update_candidates() self._init_cursor() self._check_move_option() if self._check_do_option(): return self._init_buffer() self._update_displayed_texts() self._update_buffer() self._move_to_pos(self._cursor) if self._context['quick_move'] and do_map(self, 'quick_move', []): return if self._context['start_filter']: do_map(self, 'open_filter_buffer', []) def _init_buffer(self) -> None: self._prev_status = dict() self._displayed_texts = [] self._prev_bufnr = self._vim.current.buffer.number self._prev_curpos = self._vim.call('getcurpos') self._prev_wininfo = self._get_wininfo() self._prev_winid = self._context['prev_winid'] self._winrestcmd = self._vim.call('winrestcmd') self._ruler = self._vim.options['ruler'] self._switch_buffer() self._bufnr = self._vim.current.buffer.number self._winid = self._vim.call('win_getid') self._resize_buffer(True) self._winheight = self._vim.current.window.height self._winwidth = self._vim.current.window.width self._bufvars = self._vim.current.buffer.vars self._bufvars['denite'] = { 'buffer_name': self._context['buffer_name'], } self._bufvars['denite_statusline'] = {} self._vim.vars['denite#_previewed_buffers'] = {} self._save_window_options = {} window_options = { 'colorcolumn', 'concealcursor', 'conceallevel', 'cursorcolumn', 'cursorline', 'foldcolumn', 'foldenable', 'list', 'number', 'relativenumber', 'signcolumn', 'spell', 'winfixheight', 'wrap', } for k in window_options: self._save_window_options[k] = self._vim.current.window.options[k] # Note: Have to use setlocal instead of "current.window.options" # "current.window.options" changes global value instead of local in # neovim. self._vim.command('setlocal colorcolumn=') self._vim.command('setlocal conceallevel=3') self._vim.command('setlocal concealcursor=inv') self._vim.command('setlocal nocursorcolumn') self._vim.command('setlocal nofoldenable') self._vim.command('setlocal foldcolumn=0') self._vim.command('setlocal nolist') self._vim.command('setlocal nonumber') self._vim.command('setlocal norelativenumber') self._vim.command('setlocal nospell') self._vim.command('setlocal winfixheight') self._vim.command('setlocal nowrap') if self._context['prompt']: self._vim.command('setlocal signcolumn=yes') else: self._vim.command('setlocal signcolumn=auto') if self._context['cursorline']: self._vim.command('setlocal cursorline') options = self._vim.current.buffer.options if self._floating: # Disable ruler self._vim.options['ruler'] = False options['buftype'] = 'nofile' options['bufhidden'] = 'delete' options['swapfile'] = False options['buflisted'] = False options['modeline'] = False options['modifiable'] = False options['filetype'] = 'denite' if self._vim.call('exists', '#WinEnter'): self._vim.command('doautocmd WinEnter') if self._vim.call('exists', '#BufWinEnter'): self._vim.command('doautocmd BufWinEnter') if not self._vim.call('has', 'nvim'): # In Vim8, FileType autocmd is not fired after set filetype option. self._vim.command('silent doautocmd FileType denite') if self._context['auto_action']: self._vim.command('autocmd denite ' 'CursorMoved <buffer> ' 'call denite#call_map("auto_action")') self._init_syntax() def _switch_buffer(self) -> None: split = self._context['split'] if (split != 'no' and self._winid > 0 and self._vim.call('win_gotoid', self._winid)): if split != 'vertical' and not self._floating: # Move the window to bottom self._vim.command('wincmd J') self._winrestcmd = '' return self._floating = split in [ 'floating', 'floating_relative_cursor', 'floating_relative_window', ] self._filter_floating = False if self._vim.current.buffer.options['filetype'] != 'denite': self._titlestring = self._vim.options['titlestring'] command = 'edit' if split == 'tab': self._vim.command('tabnew') elif self._floating: self._split_floating(split) elif self._context['filter_split_direction'] == 'floating': self._filter_floating = True elif split != 'no': command = self._get_direction() command += ' vsplit' if split == 'vertical' else ' split' bufname = '[denite]-' + self._context['buffer_name'] if self._vim.call('exists', '*bufadd'): bufnr = self._vim.call('bufadd', bufname) vertical = 'vertical' if split == 'vertical' else '' command = ( 'buffer' if split in ['no', 'tab', 'floating', 'floating_relative_window', 'floating_relative_cursor'] else 'sbuffer') self._vim.command( 'silent keepalt %s %s %s %s' % ( self._get_direction(), vertical, command, bufnr, ) ) else: self._vim.call( 'denite#util#execute_path', f'silent keepalt {command}', bufname) def _get_direction(self) -> str: direction = str(self._context['direction']) if direction == 'dynamictop' or direction == 'dynamicbottom': self._update_displayed_texts() winwidth = self._vim.call('winwidth', 0) is_fit = not [x for x in self._displayed_texts if self._vim.call('strwidth', x) > winwidth] if direction == 'dynamictop': direction = 'aboveleft' if is_fit else 'topleft' else: direction = 'belowright' if is_fit else 'botright' return direction def _get_wininfo(self) -> typing.List[typing.Any]: return [ self._vim.options['columns'], self._vim.options['lines'], self._vim.call('win_getid'), self._vim.call('tabpagebuflist') ] def _switch_prev_buffer(self) -> None: if (self._prev_bufnr == self._bufnr or self._vim.buffers[self._prev_bufnr].name == ''): self._vim.command('enew') else: self._vim.command('buffer ' + str(self._prev_bufnr)) def _init_syntax(self) -> None: self._vim.command('syntax case ignore') self._vim.command('highlight default link deniteInput ModeMsg') self._vim.command('highlight link deniteMatchedRange ' + self._context['highlight_matched_range']) self._vim.command('highlight link deniteMatchedChar ' + self._context['highlight_matched_char']) self._vim.command('highlight default link ' + 'deniteStatusLinePath Comment') self._vim.command('highlight default link ' + 'deniteStatusLineNumber LineNR') self._vim.command('highlight default link ' + 'deniteSelectedLine Statement') if self._floating: self._vim.current.window.options['winhighlight'] = ( 'Normal:' + self._context['highlight_window_background'] ) self._vim.command(('syntax match deniteSelectedLine /^[%s].*/' + ' contains=deniteConcealedMark') % ( self._context['selected_icon'])) self._vim.command(('syntax match deniteConcealedMark /^[ %s]/' + ' conceal contained') % ( self._context['selected_icon'])) if self._denite: self._denite.init_syntax(self._context, self._is_multi) def _update_candidates(self) -> bool: if not self._denite: return False [self._is_async, pattern, statuses, self._entire_len, self._candidates] = self._denite.filter_candidates(self._context) prev_displayed_texts = self._displayed_texts self._update_displayed_texts() prev_matched_pattern = self._matched_pattern self._matched_pattern = pattern prev_statusline_sources = self._statusline_sources self._statusline_sources = ' '.join(statuses) if self._is_async: self._start_timer('update_candidates') else: self._stop_timer('update_candidates') updated = (self._displayed_texts != prev_displayed_texts or self._matched_pattern != prev_matched_pattern or self._statusline_sources != prev_statusline_sources) if updated: self._updated = True self._start_timer('update_buffer') if self._context['search'] and self._context['input']: self._vim.call('setreg', '/', self._context['input']) return self._updated def _update_displayed_texts(self) -> None: candidates_len = len(self._candidates) if not self._is_async and self._context['auto_resize']: winminheight = self._context['winminheight'] max_height = min(self._context['winheight'], self._get_max_height()) if (winminheight != -1 and candidates_len < winminheight): self._winheight = winminheight elif candidates_len > max_height: self._winheight = max_height elif candidates_len != self._winheight: self._winheight = candidates_len max_source_name_len = 0 if self._candidates: max_source_name_len = max([ len(self._get_display_source_name(x['source_name'])) for x in self._candidates]) self._context['max_source_name_len'] = max_source_name_len self._context['max_source_name_format'] = ( '{:<' + str(self._context['max_source_name_len']) + '}') self._displayed_texts = [ self._get_candidate_display_text(i) for i in range(0, candidates_len) ] def _update_buffer(self) -> None: is_current_buffer = self._bufnr == self._vim.current.buffer.number self._update_status() if self._check_matchdelete and self._context['match_highlight']: matches = [x['id'] for x in self._vim.call('getmatches', self._winid)] if self._matched_range_id in matches: self._vim.call('matchdelete', self._matched_range_id, self._winid) self._matched_range_id = -1 if self._matched_char_id in matches: self._vim.call('matchdelete', self._matched_char_id, self._winid) self._matched_char_id = -1 if self._matched_pattern != '': self._matched_range_id = self._vim.call( 'matchadd', 'deniteMatchedRange', r'\c' + regex_convert_py_vim(self._matched_pattern), 10, -1, {'window': self._winid}) matched_char_pattern = '[{}]'.format(re.sub( r'([\[\]\\^-])', r'\\\1', self._context['input'].replace(' ', '') )) self._matched_char_id = self._vim.call( 'matchadd', 'deniteMatchedChar', matched_char_pattern, 10, -1, {'window': self._winid}) prev_linenr = self._vim.call('line', '.') prev_candidate = self._get_cursor_candidate() buffer = self._vim.buffers[self._bufnr] buffer.options['modifiable'] = True self._vim.vars['denite#_candidates'] = [ x['word'] for x in self._candidates] buffer[:] = self._displayed_texts buffer.options['modifiable'] = False self._previous_text = self._context['input'] self._resize_buffer(is_current_buffer) is_changed = (self._context['reversed'] or (is_current_buffer and self._previous_text != self._context['input'])) if self._updated and is_changed: if not is_current_buffer: save_winid = self._vim.call('win_getid') self._vim.call('win_gotoid', self._winid) self._init_cursor() self._move_to_pos(self._cursor) if not is_current_buffer: self._vim.call('win_gotoid', save_winid) elif is_current_buffer: self._vim.call('cursor', [prev_linenr, 0]) if is_current_buffer: if (self._context['auto_action'] and prev_candidate != self._get_cursor_candidate()): self.do_action(self._context['auto_action']) self._updated = False self._stop_timer('update_buffer') def _update_status(self) -> None: inpt = '' if self._context['input']: inpt = self._context['input'] + ' ' if self._context['error_messages']: inpt = '[ERROR] ' + inpt path = '[' + self._context['path'] + ']' status = { 'input': inpt, 'sources': self._statusline_sources, 'path': path, # Extra 'buffer_name': self._context['buffer_name'], 'line_total': len(self._candidates), } if status == self._prev_status: return self._bufvars['denite_statusline'] = status self._prev_status = status linenr = "printf('%'.(len(line('$'))+2).'d/%d',line('.'),line('$'))" if self._context['statusline']: if self._floating or self._filter_floating: self._vim.options['titlestring'] = ( "%{denite#get_status('input')}%* " + "%{denite#get_status('sources')} " + " %{denite#get_status('path')}%*" + "%{" + linenr + "}%*") else: winnr = self._vim.call('win_id2win', self._winid) self._vim.call('setwinvar', winnr, '&statusline', ( "%#deniteInput#%{denite#get_status('input')}%* " + "%{denite#get_status('sources')} %=" + "%#deniteStatusLinePath# %{denite#get_status('path')}%*" + "%#deniteStatusLineNumber#%{" + linenr + "}%*")) def _get_display_source_name(self, name: str) -> str: source_names = self._context['source_names'] if not self._is_multi or source_names == 'hide': source_name = '' else: short_name = (re.sub(r'([a-zA-Z])[a-zA-Z]+', r'\1', name) if re.search(r'[^a-zA-Z]', name) else name[:2]) source_name = short_name if source_names == 'short' else name return source_name def _get_candidate_display_text(self, index: int) -> str: source_names = self._context['source_names'] candidate = self._candidates[index] terms = [] if self._is_multi and source_names != 'hide': terms.append(self._context['max_source_name_format'].format( self._get_display_source_name(candidate['source_name']))) encoding = self._context['encoding'] abbr = candidate.get('abbr', candidate['word']).encode( encoding, errors='replace').decode(encoding, errors='replace') terms.append(abbr[:int(self._context['max_candidate_width'])]) return (str(self._context['selected_icon']) if index in self._selected_candidates else ' ') + ' '.join(terms).replace('\n', '') def _get_max_height(self) -> int: return int(self._vim.options['lines']) if not self._floating else ( int(self._vim.options['lines']) - int(self._context['winrow']) - int(self._vim.options['cmdheight'])) def _resize_buffer(self, is_current_buffer: bool) -> None: split = self._context['split'] if (split == 'no' or split == 'tab' or self._vim.call('winnr', '$') == 1): return winheight = max(self._winheight, 1) winwidth = max(self._winwidth, 1) is_vertical = split == 'vertical' if not is_current_buffer: restore = self._vim.call('win_getid') self._vim.call('win_gotoid', self._winid) if not is_vertical and self._vim.current.window.height != winheight: if self._floating: wincol = self._context['winrow'] row = wincol if split == 'floating': if self._context['auto_resize'] and row > 1: row += self._context['winheight'] row -= self._winheight self._vim.call('nvim_win_set_config', self._winid, { 'relative': 'editor', 'row': row, 'col': self._context['wincol'], 'width': winwidth, 'height': winheight, }) filter_row = 0 if wincol == 1 else row + winheight filter_col = self._context['wincol'] else: init_pos = self._vim.call('nvim_win_get_config', self._winid) self._vim.call('nvim_win_set_config', self._winid, { 'relative': 'win', 'win': init_pos['win'], 'row': init_pos['row'], 'col': init_pos['col'], 'width': winwidth, 'height': winheight, }) filter_col = init_pos['col'] if init_pos['anchor'] == 'NW': winpos = self._vim.call('nvim_win_get_position', self._winid) filter_row = winpos[0] + winheight filter_winid = self._vim.vars['denite#_filter_winid'] self._context['filter_winrow'] = row if self._vim.call('win_id2win', filter_winid) > 0: self._vim.call('nvim_win_set_config', filter_winid, { 'relative': 'editor', 'row': filter_row, 'col': filter_col, }) self._vim.command('resize ' + str(winheight)) if self._context['reversed']: self._vim.command('normal! zb') elif is_vertical and self._vim.current.window.width != winwidth: self._vim.command('vertical resize ' + str(winwidth)) if not is_current_buffer: self._vim.call('win_gotoid', restore) def _check_do_option(self) -> bool: if self._context['do'] != '': self._do_command(self._context['do']) return True elif (self._candidates and self._context['immediately'] or len(self._candidates) == 1 and self._context['immediately_1']): self._do_immediately() return True return not (self._context['empty'] or self._is_async or self._candidates) def _check_move_option(self) -> None: if self._context['cursor_pos'].isnumeric(): self._cursor = int(self._context['cursor_pos']) + 1 elif re.match(r'\+\d+', self._context['cursor_pos']): for _ in range(int(self._context['cursor_pos'][1:])): self._move_to_next_line() elif re.match(r'-\d+', self._context['cursor_pos']): for _ in range(int(self._context['cursor_pos'][1:])): self._move_to_prev_line() elif self._context['cursor_pos'] == '$': self._move_to_last_line() def _do_immediately(self) -> None: goto = self._winid > 0 and self._vim.call( 'win_gotoid', self._winid) if goto: # Jump to denite window self._init_buffer() self.do_action('default') candidate = self._get_cursor_candidate() if not candidate: return echo(self._vim, 'Normal', '[{}/{}] {}'.format( self._cursor, len(self._candidates), candidate.get('abbr', candidate['word']))) if goto: # Move to the previous window self._vim.command('wincmd p') def _do_command(self, command: str) -> None: self._init_cursor() cursor = 1 while cursor < len(self._candidates): self.do_action('default', command) self._move_to_next_line() self._quit_buffer() def _cleanup(self) -> None: self._stop_timer('update_candidates') self._stop_timer('update_buffer') if self._vim.current.buffer.number == self._bufnr: self._cursor = self._vim.call('line', '.') # Note: Close filter window before preview window self._vim.call('denite#filter#_close_filter_window') if not self._context['has_preview_window']: self._vim.command('pclose!') # Clear previewed buffers for bufnr in self._vim.vars['denite#_previewed_buffers'].keys(): if not self._vim.call('win_findbuf', bufnr): self._vim.command('silent bdelete ' + str(bufnr)) self._vim.vars['denite#_previewed_buffers'] = {} self._vim.command('highlight! link CursorLine CursorLine') if self._floating or self._filter_floating: self._vim.options['titlestring'] = self._titlestring self._vim.options['ruler'] = self._ruler def _close_current_window(self) -> None: if self._vim.call('winnr', '$') == 1: self._vim.command('buffer #') else: self._vim.command('close!') def _quit_buffer(self) -> None: self._cleanup() if self._vim.call('bufwinnr', self._bufnr) < 0: # Denite buffer is already closed return winids = self._vim.call('win_findbuf', self._vim.vars['denite#_filter_bufnr']) if winids: # Quit filter buffer self._vim.call('win_gotoid', winids[0]) self._close_current_window() # Move to denite window self._vim.call('win_gotoid', self._winid) # Restore the window if self._context['split'] == 'no': self._switch_prev_buffer() for k, v in self._save_window_options.items(): self._vim.current.window.options[k] = v else: if self._context['split'] == 'tab': self._vim.command('tabclose!') if self._context['split'] != 'tab': self._close_current_window() self._vim.call('win_gotoid', self._prev_winid) # Restore the position self._vim.call('setpos', '.', self._prev_curpos) if self._get_wininfo() and self._get_wininfo() == self._prev_wininfo: # Note: execute restcmd twice to restore layout properly self._vim.command(self._winrestcmd) self._vim.command(self._winrestcmd) clearmatch(self._vim) def _get_cursor_candidate(self) -> Candidate: return self._get_candidate(self._cursor) def _get_candidate(self, pos: int) -> Candidate: if not self._candidates or pos > len(self._candidates): return {} return self._candidates[pos - 1] def _get_selected_candidates(self) -> Candidates: if not self._selected_candidates: return [self._get_cursor_candidate() ] if self._get_cursor_candidate() else [] return [self._candidates[x] for x in self._selected_candidates] def _init_denite(self) -> None: if self._denite: self._denite.start(self._context) self._denite.on_init(self._context) self._initialized = True self._winheight = self._context['winheight'] self._winwidth = self._context['winwidth'] def _gather_candidates(self) -> None: self._selected_candidates = [] if self._denite: self._denite.gather_candidates(self._context) def _init_cursor(self) -> None: if self._context['reversed']: self._move_to_last_line() else: self._move_to_first_line() def _move_to_pos(self, pos: int) -> None: self._vim.call('cursor', pos, 0) self._cursor = pos if self._context['reversed']: self._vim.command('normal! zb') def _move_to_next_line(self) -> None: if self._cursor < len(self._candidates): self._cursor += 1 def _move_to_prev_line(self) -> None: if self._cursor >= 1: self._cursor -= 1 def _move_to_first_line(self) -> None: self._cursor = 1 def _move_to_last_line(self) -> None: self._cursor = len(self._candidates) def _start_timer(self, key: str) -> None: if key in self._timers: return if key == 'update_candidates': self._timers[key] = self._vim.call( 'denite#helper#_start_update_candidates_timer', self._bufnr) elif key == 'update_buffer': self._timers[key] = self._vim.call( 'denite#helper#_start_update_buffer_timer', self._bufnr) def _stop_timer(self, key: str) -> None: if key not in self._timers: return self._vim.call('timer_stop', self._timers[key]) # Note: After timer_stop is called, self._timers may be removed if key in self._timers: self._timers.pop(key) def _split_floating(self, split: str) -> None: # Use floating window if split == 'floating': self._vim.call( 'nvim_open_win', self._vim.call('bufnr', '%'), True, { 'relative': 'editor', 'row': self._context['winrow'], 'col': self._context['wincol'], 'width': self._context['winwidth'], 'height': self._context['winheight'], }) elif split == 'floating_relative_cursor': opened_pos = (self._vim.call('nvim_win_get_position', 0)[0] + self._vim.call('winline') - 1) if self._context['auto_resize']: height = max(self._winheight, 1) width = max(self._winwidth, 1) else: width = self._context['winwidth'] height = self._context['winheight'] if opened_pos + height + 3 > self._vim.options['lines']: anchor = 'SW' row = 0 self._context['filter_winrow'] = row + opened_pos else: anchor = 'NW' row = 1 self._context['filter_winrow'] = row + height + opened_pos self._vim.call( 'nvim_open_win', self._vim.call('bufnr', '%'), True, { 'relative': 'cursor', 'row': row, 'col': 0, 'width': width, 'height': height, 'anchor': anchor, }) elif split == 'floating_relative_window': self._vim.call( 'nvim_open_win', self._vim.call('bufnr', '%'), True, { 'relative': 'win', 'row': self._context['winrow'], 'col': self._context['wincol'], 'width': self._context['winwidth'], 'height': self._context['winheight'], })
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 1275, 9166, 9166, 9166, 9166, 4936, 1360, 13, 29937, 24080, 29901, 2322, 29889, 2272, 13, 29937, 26524, 29950, 1955, 29901, 529, 5813, 29958, 3532, 26862, 6227, 29958, 472, 330, 29966, 26862, 6227, 6778, 13, 29937, 19245, 29901, 341, 1806, 19405, 13, 29937, 1275, 9166, 9166, 9166, 9166, 4936, 1360, 13, 13, 5215, 337, 13, 5215, 19229, 13, 13, 3166, 972, 568, 29889, 4422, 1053, 2916, 29892, 1059, 29892, 2821, 4352, 29892, 6528, 29918, 13441, 29918, 2272, 29918, 26770, 13, 3166, 972, 568, 29889, 4422, 1053, 405, 26770, 29892, 4911, 2677, 29892, 315, 5380, 1078, 29892, 315, 5380, 403, 13, 3166, 972, 568, 29889, 3560, 1053, 317, 2720, 9780, 13, 13, 13, 1990, 13109, 29898, 3318, 1125, 13, 1678, 732, 6799, 13, 1678, 822, 338, 29918, 12674, 29898, 1311, 29897, 1599, 6120, 29901, 13, 4706, 736, 1583, 3032, 275, 29918, 12674, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 325, 326, 29901, 405, 26770, 29897, 1599, 6213, 29901, 13, 4706, 1583, 3032, 26770, 353, 325, 326, 13, 4706, 1583, 3032, 1145, 568, 29901, 19229, 29889, 27636, 29961, 21077, 9780, 29962, 353, 6213, 13, 4706, 1583, 3032, 8391, 29918, 29883, 5380, 1078, 29901, 19229, 29889, 1293, 29961, 524, 29962, 353, 5159, 13, 4706, 1583, 3032, 29883, 5380, 1078, 29901, 315, 5380, 1078, 353, 5159, 13, 4706, 1583, 3032, 18127, 353, 29871, 29900, 13, 4706, 1583, 3032, 296, 533, 29918, 2435, 353, 29871, 29900, 13, 4706, 1583, 3032, 2914, 29901, 19229, 29889, 1293, 29961, 1017, 15702, 29889, 10773, 29962, 353, 5159, 13, 4706, 1583, 3032, 4703, 29901, 4911, 2677, 353, 6571, 13, 4706, 1583, 3032, 9721, 22230, 353, 448, 29896, 13, 4706, 1583, 3032, 5080, 333, 353, 448, 29896, 13, 4706, 1583, 3032, 5080, 5060, 9006, 353, 6629, 13, 4706, 1583, 3032, 11228, 1891, 353, 7700, 13, 4706, 1583, 3032, 5080, 3545, 353, 29871, 29900, 13, 4706, 1583, 3032, 5080, 2103, 353, 29871, 29900, 13, 4706, 1583, 3032, 5080, 1195, 3545, 353, 448, 29896, 13, 4706, 1583, 3032, 275, 29918, 9910, 353, 7700, 13, 4706, 1583, 3032, 275, 29918, 12674, 353, 7700, 13, 4706, 1583, 3032, 4352, 287, 29918, 11037, 353, 6629, 13, 4706, 1583, 3032, 4990, 287, 29918, 726, 29879, 29901, 19229, 29889, 1293, 29961, 710, 29962, 353, 5159, 13, 4706, 1583, 3032, 4882, 1220, 29918, 29879, 2863, 353, 6629, 13, 4706, 1583, 3032, 23545, 29880, 342, 5393, 353, 6629, 13, 4706, 1583, 3032, 29878, 8584, 353, 7700, 13, 4706, 1583, 3032, 16304, 29918, 2467, 353, 6629, 13, 4706, 1583, 3032, 16304, 29918, 4882, 29901, 19229, 29889, 21533, 29961, 710, 29892, 19229, 29889, 10773, 29962, 353, 6571, 13, 4706, 1583, 3032, 16304, 29918, 2764, 1066, 29901, 19229, 29889, 1293, 29961, 1017, 15702, 29889, 10773, 29962, 353, 5159, 13, 4706, 1583, 3032, 7620, 29918, 7165, 29918, 6768, 29901, 19229, 29889, 21533, 29961, 710, 29892, 19229, 29889, 10773, 29962, 353, 6571, 13, 4706, 1583, 3032, 29879, 2863, 29918, 18434, 29901, 19229, 29889, 1293, 29961, 1017, 15702, 29889, 10773, 29962, 353, 5159, 13, 4706, 1583, 3032, 24957, 29918, 726, 353, 6629, 13, 4706, 1583, 3032, 29888, 417, 1218, 353, 7700, 13, 4706, 1583, 3032, 4572, 29918, 29888, 417, 1218, 353, 7700, 13, 4706, 1583, 3032, 21402, 353, 7700, 13, 4706, 1583, 3032, 9346, 414, 29901, 19229, 29889, 21533, 29961, 710, 29892, 938, 29962, 353, 6571, 13, 4706, 1583, 3032, 4352, 287, 29918, 3881, 29918, 333, 353, 448, 29896, 13, 4706, 1583, 3032, 4352, 287, 29918, 3090, 29918, 333, 353, 448, 29896, 13, 4706, 1583, 3032, 3198, 29918, 4352, 8143, 353, 6120, 29898, 1311, 3032, 26770, 29889, 4804, 29898, 13, 9651, 525, 1145, 568, 29937, 4422, 29937, 3198, 29918, 4352, 8143, 8785, 13, 13, 1678, 822, 1369, 29898, 1311, 29892, 8974, 29901, 19229, 29889, 1293, 29961, 1017, 15702, 29889, 10773, 1402, 13, 795, 3030, 29901, 4911, 2677, 29897, 1599, 19229, 29889, 1293, 29961, 1017, 15702, 29889, 10773, 5387, 13, 4706, 565, 451, 1583, 3032, 1145, 568, 29901, 13, 9651, 396, 565, 756, 5552, 29898, 1311, 3032, 26770, 29892, 525, 3389, 29918, 2616, 449, 457, 29374, 13, 9651, 396, 268, 1583, 3032, 1145, 568, 353, 3339, 2720, 9780, 29898, 1311, 3032, 26770, 29897, 13, 9651, 396, 1683, 29901, 13, 9651, 1583, 3032, 1145, 568, 353, 317, 2720, 9780, 29898, 1311, 3032, 26770, 29897, 13, 13, 4706, 1583, 3032, 2914, 353, 5159, 13, 4706, 3030, 1839, 29879, 2863, 29918, 9990, 2033, 353, 518, 29879, 2863, 29962, 13, 13, 4706, 1583, 3032, 2962, 29918, 29879, 2863, 29918, 9990, 29898, 4703, 29897, 13, 13, 4706, 736, 1583, 3032, 2914, 13, 13, 1678, 822, 437, 29918, 2467, 29898, 1311, 29892, 3158, 29918, 978, 29901, 851, 29892, 13, 462, 29871, 1899, 29901, 851, 353, 15516, 338, 29918, 11288, 29901, 6120, 353, 7700, 29897, 1599, 6213, 29901, 13, 4706, 565, 338, 29918, 11288, 29901, 13, 9651, 21669, 353, 1583, 3032, 657, 29918, 8391, 29918, 29883, 5380, 1078, 580, 13, 4706, 25342, 1583, 3032, 657, 29918, 18127, 29918, 29883, 5380, 403, 7295, 13, 9651, 21669, 353, 518, 1311, 3032, 657, 29918, 18127, 29918, 29883, 5380, 403, 580, 29962, 13, 4706, 1683, 29901, 13, 9651, 21669, 353, 5159, 13, 13, 4706, 565, 451, 1583, 3032, 1145, 568, 470, 451, 21669, 470, 451, 3158, 29918, 978, 29901, 13, 9651, 736, 13, 13, 4706, 1583, 3032, 16304, 29918, 2467, 353, 3158, 29918, 978, 13, 4706, 3158, 353, 1583, 3032, 1145, 568, 29889, 657, 29918, 2467, 29898, 13, 9651, 1583, 3032, 4703, 29892, 3158, 29918, 978, 29892, 21669, 29897, 13, 4706, 565, 451, 3158, 29901, 13, 9651, 736, 13, 13, 4706, 1400, 29918, 2467, 353, 1583, 3032, 4703, 1839, 2490, 29918, 2467, 2033, 13, 13, 4706, 338, 29918, 28358, 353, 3158, 1839, 275, 29918, 28358, 2033, 470, 1400, 29918, 2467, 1275, 525, 28358, 29915, 13, 4706, 565, 338, 29918, 28358, 29901, 13, 9651, 1583, 29889, 28358, 580, 13, 13, 4706, 1583, 3032, 1145, 568, 29889, 1867, 29918, 2467, 29898, 1311, 3032, 4703, 29892, 3158, 29918, 978, 29892, 21669, 29897, 13, 4706, 1583, 3032, 2914, 353, 21669, 13, 4706, 565, 1899, 2804, 525, 2396, 13, 9651, 1583, 3032, 26770, 29889, 6519, 29898, 6519, 29897, 13, 13, 4706, 565, 338, 29918, 28358, 322, 1400, 29918, 2467, 1275, 525, 3150, 2396, 13, 9651, 396, 830, 29899, 3150, 972, 568, 6835, 13, 13, 9651, 12379, 29918, 18127, 353, 1583, 3032, 18127, 13, 9651, 10677, 29918, 29883, 5380, 403, 353, 1583, 3032, 657, 29918, 18127, 29918, 29883, 5380, 403, 580, 13, 13, 9651, 1583, 3032, 2344, 29918, 9040, 580, 13, 13, 9651, 1583, 29889, 1127, 1610, 29898, 8824, 29897, 13, 13, 9651, 565, 10677, 29918, 29883, 5380, 403, 1275, 1583, 3032, 657, 29918, 29883, 5380, 403, 29898, 16304, 29918, 18127, 1125, 13, 18884, 396, 11654, 487, 278, 10677, 13, 18884, 1583, 3032, 11631, 29918, 517, 29918, 1066, 29898, 16304, 29918, 18127, 29897, 13, 13, 9651, 396, 3295, 519, 23283, 7353, 13, 9651, 338, 29918, 28358, 353, 7700, 13, 13, 4706, 565, 451, 338, 29918, 28358, 322, 338, 29918, 11288, 29901, 13, 9651, 1583, 3032, 8391, 29918, 29883, 5380, 1078, 353, 5159, 13, 9651, 1583, 29889, 1127, 1610, 29898, 2467, 1839, 275, 29918, 1127, 1610, 11287, 13, 13, 4706, 565, 338, 29918, 11288, 322, 1583, 3032, 4703, 1839, 29879, 2863, 29918, 9990, 2033, 29901, 13, 9651, 1583, 3032, 4703, 1839, 2080, 2033, 353, 6629, 13, 9651, 1583, 3032, 4703, 1839, 24561, 29918, 11631, 2033, 353, 6629, 13, 9651, 1583, 3032, 2962, 29918, 29879, 2863, 29918, 9990, 29898, 1311, 3032, 4703, 29897, 13, 13, 4706, 736, 13, 13, 1678, 822, 2654, 1610, 29898, 1311, 29892, 338, 29918, 10118, 29901, 6120, 353, 5852, 29897, 1599, 6213, 29901, 13, 4706, 1583, 3032, 4703, 1839, 275, 29918, 1127, 1610, 2033, 353, 338, 29918, 10118, 13, 4706, 565, 338, 29918, 10118, 29901, 13, 9651, 1583, 3032, 29887, 1624, 29918, 29883, 5380, 1078, 580, 13, 4706, 565, 1583, 3032, 5504, 29918, 29883, 5380, 1078, 7295, 13, 9651, 1583, 3032, 5504, 29918, 9040, 580, 13, 4706, 1683, 29901, 13, 9651, 1583, 3032, 5504, 29918, 4882, 580, 13, 4706, 1583, 3032, 4703, 1839, 275, 29918, 1127, 1610, 2033, 353, 7700, 13, 13, 1678, 822, 23283, 29898, 1311, 29897, 1599, 6213, 29901, 13, 4706, 565, 1583, 3032, 1145, 568, 29901, 13, 9651, 1583, 3032, 1145, 568, 29889, 265, 29918, 5358, 29898, 1311, 3032, 4703, 29897, 13, 4706, 1583, 3032, 28358, 29918, 9040, 580, 13, 4706, 1583, 3032, 2914, 353, 5159, 13, 4706, 736, 13, 13, 1678, 822, 903, 5060, 442, 29898, 1311, 29897, 1599, 6213, 29901, 13, 4706, 1583, 3032, 4703, 1839, 2080, 2033, 353, 6629, 13, 4706, 1583, 3032, 28358, 29918, 9040, 580, 13, 4706, 1583, 3032, 2344, 29918, 1145, 568, 580, 13, 4706, 1583, 3032, 29887, 1624, 29918, 29883, 5380, 1078, 580, 13, 4706, 1583, 3032, 2344, 29918, 9040, 580, 13, 4706, 1583, 3032, 5504, 29918, 29883, 5380, 1078, 580, 13, 4706, 1583, 3032, 5504, 29918, 9040, 580, 13, 13, 1678, 822, 903, 2962, 29918, 29879, 2863, 29918, 9990, 29898, 1311, 29892, 3030, 29901, 4911, 2677, 29897, 1599, 6213, 29901, 13, 4706, 565, 451, 3030, 1839, 29879, 2863, 29918, 9990, 2033, 29901, 13, 9651, 736, 13, 13, 4706, 1583, 3032, 29879, 2863, 29918, 18434, 29889, 4397, 3319, 13, 9651, 525, 29879, 2863, 2396, 3030, 1839, 29879, 2863, 29918, 9990, 2033, 29961, 29900, 1402, 13, 9651, 525, 2084, 2396, 3030, 1839, 2084, 7464, 13, 4706, 5615, 13, 13, 4706, 1583, 3032, 2962, 29898, 4703, 1839, 29879, 2863, 29918, 9990, 2033, 29961, 29900, 1402, 3030, 29897, 13, 13, 4706, 565, 3030, 1839, 29879, 2863, 29918, 9990, 2033, 29901, 13, 9651, 3030, 1839, 29879, 2863, 29918, 9990, 13359, 7323, 29898, 29900, 29897, 13, 4706, 3030, 1839, 2084, 2033, 353, 1583, 3032, 4703, 1839, 2084, 2033, 13, 13, 1678, 822, 903, 2962, 29898, 1311, 29892, 8974, 29901, 19229, 29889, 1293, 29961, 1017, 15702, 29889, 10773, 1402, 13, 1669, 3030, 29901, 4911, 2677, 29897, 1599, 6213, 29901, 13, 4706, 515, 972, 568, 29889, 1481, 29889, 1958, 1053, 437, 29918, 1958, 13, 13, 4706, 1583, 3032, 26770, 29889, 6519, 877, 25590, 296, 29991, 1120, 542, 3487, 29991, 972, 568, 1495, 13, 13, 4706, 565, 337, 29889, 4478, 29898, 29878, 12764, 29961, 6255, 7407, 29905, 9341, 742, 1583, 3032, 26770, 29889, 3784, 29889, 9040, 29889, 978, 1125, 13, 9651, 396, 18076, 487, 1899, 1196, 3474, 29889, 13, 9651, 736, 13, 13, 4706, 620, 2017, 353, 1583, 3032, 11228, 1891, 322, 3030, 1839, 690, 2017, 2033, 13, 4706, 565, 620, 2017, 29901, 13, 9651, 396, 4971, 666, 278, 17865, 13, 13, 9651, 2767, 353, 6702, 326, 4210, 2486, 742, 525, 326, 4210, 2486, 29918, 29896, 742, 13, 462, 418, 525, 18127, 29918, 1066, 742, 525, 16304, 29918, 5080, 333, 742, 13, 462, 418, 525, 2962, 29918, 4572, 742, 525, 24561, 29918, 11631, 1495, 13, 9651, 363, 1820, 297, 2767, 29901, 13, 18884, 1583, 3032, 4703, 29961, 1989, 29962, 353, 3030, 29961, 1989, 29962, 13, 13, 9651, 1583, 3032, 3198, 29918, 11631, 29918, 3385, 580, 13, 9651, 565, 1583, 3032, 3198, 29918, 1867, 29918, 3385, 7295, 13, 18884, 736, 13, 13, 9651, 1583, 3032, 2344, 29918, 9040, 580, 13, 9651, 565, 3030, 1839, 22379, 2033, 29901, 13, 18884, 1583, 29889, 1127, 1610, 580, 13, 9651, 1583, 3032, 11631, 29918, 517, 29918, 1066, 29898, 1311, 3032, 18127, 29897, 13, 4706, 1683, 29901, 13, 9651, 565, 1583, 3032, 4703, 2804, 3030, 29901, 13, 18884, 1583, 3032, 4703, 29889, 8551, 580, 13, 18884, 1583, 3032, 4703, 29889, 5504, 29898, 4703, 29897, 13, 9651, 1583, 3032, 4703, 1839, 29879, 2863, 2033, 353, 8974, 13, 9651, 1583, 3032, 4703, 1839, 275, 29918, 1127, 1610, 2033, 353, 7700, 13, 9651, 1583, 3032, 275, 29918, 9910, 353, 7431, 29898, 29879, 2863, 29897, 1405, 29871, 29896, 13, 13, 9651, 565, 451, 8974, 29901, 13, 18884, 396, 18076, 487, 4069, 8974, 29889, 13, 18884, 1059, 29898, 1311, 3032, 26770, 29892, 525, 8915, 8974, 1495, 13, 18884, 736, 13, 13, 9651, 1583, 3032, 2344, 29918, 1145, 568, 580, 13, 9651, 1583, 3032, 29887, 1624, 29918, 29883, 5380, 1078, 580, 13, 9651, 1583, 3032, 5504, 29918, 29883, 5380, 1078, 580, 13, 13, 9651, 1583, 3032, 2344, 29918, 18127, 580, 13, 9651, 1583, 3032, 3198, 29918, 11631, 29918, 3385, 580, 13, 9651, 565, 1583, 3032, 3198, 29918, 1867, 29918, 3385, 7295, 13, 18884, 736, 13, 13, 9651, 1583, 3032, 2344, 29918, 9040, 580, 13, 13, 4706, 1583, 3032, 5504, 29918, 4990, 287, 29918, 726, 29879, 580, 13, 4706, 1583, 3032, 5504, 29918, 9040, 580, 13, 4706, 1583, 3032, 11631, 29918, 517, 29918, 1066, 29898, 1311, 3032, 18127, 29897, 13, 13, 4706, 565, 1583, 3032, 4703, 1839, 24561, 29918, 11631, 2033, 322, 437, 29918, 1958, 29898, 1311, 29892, 525, 24561, 29918, 11631, 742, 5159, 1125, 13, 9651, 736, 13, 13, 4706, 565, 1583, 3032, 4703, 1839, 2962, 29918, 4572, 2033, 29901, 13, 9651, 437, 29918, 1958, 29898, 1311, 29892, 525, 3150, 29918, 4572, 29918, 9040, 742, 518, 2314, 13, 13, 1678, 822, 903, 2344, 29918, 9040, 29898, 1311, 29897, 1599, 6213, 29901, 13, 4706, 1583, 3032, 16304, 29918, 4882, 353, 9657, 580, 13, 4706, 1583, 3032, 4990, 287, 29918, 726, 29879, 353, 5159, 13, 13, 4706, 1583, 3032, 16304, 29918, 9721, 22230, 353, 1583, 3032, 26770, 29889, 3784, 29889, 9040, 29889, 4537, 13, 4706, 1583, 3032, 16304, 29918, 2764, 1066, 353, 1583, 3032, 26770, 29889, 4804, 877, 657, 2764, 1066, 1495, 13, 4706, 1583, 3032, 16304, 29918, 5080, 3888, 353, 1583, 3032, 657, 29918, 5080, 3888, 580, 13, 4706, 1583, 3032, 16304, 29918, 5080, 333, 353, 1583, 3032, 4703, 1839, 16304, 29918, 5080, 333, 2033, 13, 4706, 1583, 3032, 5080, 5060, 9006, 353, 1583, 3032, 26770, 29889, 4804, 877, 5080, 5060, 9006, 1495, 13, 13, 4706, 1583, 3032, 29878, 8584, 353, 1583, 3032, 26770, 29889, 6768, 1839, 29878, 8584, 2033, 13, 13, 4706, 1583, 3032, 15123, 29918, 9040, 580, 13, 4706, 1583, 3032, 9721, 22230, 353, 1583, 3032, 26770, 29889, 3784, 29889, 9040, 29889, 4537, 13, 4706, 1583, 3032, 5080, 333, 353, 1583, 3032, 26770, 29889, 4804, 877, 5080, 29918, 657, 333, 1495, 13, 13, 4706, 1583, 3032, 21476, 29918, 9040, 29898, 5574, 29897, 13, 13, 4706, 1583, 3032, 5080, 3545, 353, 1583, 3032, 26770, 29889, 3784, 29889, 7165, 29889, 3545, 13, 4706, 1583, 3032, 5080, 2103, 353, 1583, 3032, 26770, 29889, 3784, 29889, 7165, 29889, 2103, 13, 13, 4706, 1583, 3032, 9721, 16908, 353, 1583, 3032, 26770, 29889, 3784, 29889, 9040, 29889, 16908, 13, 4706, 1583, 3032, 9721, 16908, 1839, 1145, 568, 2033, 353, 426, 13, 9651, 525, 9040, 29918, 978, 2396, 1583, 3032, 4703, 1839, 9040, 29918, 978, 7464, 13, 4706, 500, 13, 4706, 1583, 3032, 9721, 16908, 1839, 1145, 568, 29918, 4882, 1220, 2033, 353, 6571, 13, 13, 4706, 1583, 3032, 26770, 29889, 16908, 1839, 1145, 568, 29937, 29918, 25347, 287, 29918, 28040, 414, 2033, 353, 6571, 13, 13, 4706, 1583, 3032, 7620, 29918, 7165, 29918, 6768, 353, 6571, 13, 4706, 3474, 29918, 6768, 353, 426, 13, 9651, 525, 2780, 4914, 742, 13, 9651, 525, 535, 346, 284, 18127, 742, 13, 9651, 525, 535, 346, 3498, 955, 742, 13, 9651, 525, 18127, 4914, 742, 13, 9651, 525, 18127, 1220, 742, 13, 9651, 525, 8771, 4914, 742, 13, 9651, 525, 8771, 12007, 742, 13, 9651, 525, 1761, 742, 13, 9651, 525, 4537, 742, 13, 9651, 525, 2674, 1926, 264, 2807, 742, 13, 9651, 525, 4530, 4914, 742, 13, 9651, 525, 1028, 514, 742, 13, 9651, 525, 5080, 5878, 3545, 742, 13, 9651, 525, 6312, 742, 13, 4706, 500, 13, 4706, 363, 413, 297, 3474, 29918, 6768, 29901, 13, 9651, 1583, 3032, 7620, 29918, 7165, 29918, 6768, 29961, 29895, 29962, 353, 1583, 3032, 26770, 29889, 3784, 29889, 7165, 29889, 6768, 29961, 29895, 29962, 13, 13, 4706, 396, 3940, 29901, 6975, 304, 671, 731, 2997, 2012, 310, 376, 3784, 29889, 7165, 29889, 6768, 29908, 13, 4706, 396, 376, 3784, 29889, 7165, 29889, 6768, 29908, 3620, 5534, 995, 2012, 310, 1887, 297, 13, 4706, 396, 452, 586, 326, 29889, 13, 4706, 1583, 3032, 26770, 29889, 6519, 877, 842, 2997, 2927, 4914, 29922, 1495, 13, 4706, 1583, 3032, 26770, 29889, 6519, 877, 842, 2997, 10628, 3498, 955, 29922, 29941, 1495, 13, 4706, 1583, 3032, 26770, 29889, 6519, 877, 842, 2997, 10628, 284, 18127, 29922, 11569, 1495, 13, 4706, 1583, 3032, 26770, 29889, 6519, 877, 842, 2997, 302, 542, 5966, 4914, 1495, 13, 4706, 1583, 3032, 26770, 29889, 6519, 877, 842, 2997, 694, 8771, 12007, 1495, 13, 4706, 1583, 3032, 26770, 29889, 6519, 877, 842, 2997, 900, 29881, 4914, 29922, 29900, 1495, 13, 4706, 1583, 3032, 26770, 29889, 6519, 877, 842, 2997, 302, 324, 391, 1495, 13, 4706, 1583, 3032, 26770, 29889, 6519, 877, 842, 2997, 1661, 2807, 1495, 13, 4706, 1583, 3032, 26770, 29889, 6519, 877, 842, 2997, 3643, 295, 1926, 264, 2807, 1495, 13, 4706, 1583, 3032, 26770, 29889, 6519, 877, 842, 2997, 302, 4705, 514, 1495, 13, 4706, 1583, 3032, 26770, 29889, 6519, 877, 842, 2997, 5401, 5878, 3545, 1495, 13, 4706, 1583, 3032, 26770, 29889, 6519, 877, 842, 2997, 1286, 2390, 1495, 13, 4706, 565, 1583, 3032, 4703, 1839, 14032, 415, 2033, 29901, 13, 9651, 1583, 3032, 26770, 29889, 6519, 877, 842, 2997, 1804, 4914, 29922, 3582, 1495, 13, 4706, 1683, 29901, 13, 9651, 1583, 3032, 26770, 29889, 6519, 877, 842, 2997, 1804, 4914, 29922, 6921, 1495, 13, 4706, 565, 1583, 3032, 4703, 1839, 18127, 1220, 2033, 29901, 13, 9651, 1583, 3032, 26770, 29889, 6519, 877, 842, 2997, 10677, 1220, 1495, 13, 13, 4706, 3987, 353, 1583, 3032, 26770, 29889, 3784, 29889, 9040, 29889, 6768, 13, 4706, 565, 1583, 3032, 29888, 417, 1218, 29901, 13, 9651, 396, 3295, 519, 364, 8584, 13, 9651, 1583, 3032, 26770, 29889, 6768, 1839, 29878, 8584, 2033, 353, 7700, 13, 4706, 3987, 1839, 2423, 615, 668, 2033, 353, 525, 3998, 488, 29915, 13, 4706, 3987, 1839, 9721, 10892, 2033, 353, 525, 8143, 29915, 13, 4706, 3987, 1839, 26276, 1445, 2033, 353, 7700, 13, 4706, 3987, 1839, 9721, 1761, 287, 2033, 353, 7700, 13, 4706, 3987, 1839, 4299, 457, 2033, 353, 7700, 13, 4706, 3987, 1839, 1545, 28677, 2033, 353, 7700, 13, 4706, 3987, 1839, 1445, 1853, 2033, 353, 525, 1145, 568, 29915, 13, 13, 4706, 565, 1583, 3032, 26770, 29889, 4804, 877, 9933, 742, 16321, 17734, 10399, 29374, 13, 9651, 1583, 3032, 26770, 29889, 6519, 877, 1867, 1300, 542, 3487, 8892, 10399, 1495, 13, 13, 4706, 565, 1583, 3032, 26770, 29889, 4804, 877, 9933, 742, 16321, 29933, 1137, 17734, 10399, 29374, 13, 9651, 1583, 3032, 26770, 29889, 6519, 877, 1867, 1300, 542, 3487, 350, 1137, 17734, 10399, 1495, 13, 13, 4706, 565, 451, 1583, 3032, 26770, 29889, 4804, 877, 5349, 742, 525, 29876, 26770, 29374, 13, 9651, 396, 512, 478, 326, 29947, 29892, 3497, 1542, 1120, 542, 3487, 338, 451, 17285, 1156, 731, 934, 1853, 2984, 29889, 13, 9651, 1583, 3032, 26770, 29889, 6519, 877, 25590, 296, 437, 1300, 542, 3487, 3497, 1542, 972, 568, 1495, 13, 13, 4706, 565, 1583, 3032, 4703, 1839, 6921, 29918, 2467, 2033, 29901, 13, 9651, 1583, 3032, 26770, 29889, 6519, 877, 1300, 542, 3487, 972, 568, 525, 13, 462, 795, 525, 19890, 29924, 8238, 529, 9040, 29958, 525, 13, 462, 795, 525, 4804, 972, 568, 29937, 4804, 29918, 1958, 703, 6921, 29918, 2467, 1159, 1495, 13, 13, 4706, 1583, 3032, 2344, 29918, 29562, 580, 13, 13, 1678, 822, 903, 15123, 29918, 9040, 29898, 1311, 29897, 1599, 6213, 29901, 13, 4706, 6219, 353, 1583, 3032, 4703, 1839, 5451, 2033, 13, 4706, 565, 313, 5451, 2804, 525, 1217, 29915, 322, 1583, 3032, 5080, 333, 1405, 29871, 29900, 322, 13, 18884, 1583, 3032, 26770, 29889, 4804, 877, 5080, 29918, 7085, 3398, 742, 1583, 3032, 5080, 333, 22164, 13, 9651, 565, 6219, 2804, 525, 18575, 29915, 322, 451, 1583, 3032, 29888, 417, 1218, 29901, 13, 18884, 396, 25249, 278, 3474, 304, 5970, 13, 18884, 1583, 3032, 26770, 29889, 6519, 877, 29893, 3742, 3487, 435, 1495, 13, 9651, 1583, 3032, 5080, 5060, 9006, 353, 6629, 13, 9651, 736, 13, 13, 4706, 1583, 3032, 29888, 417, 1218, 353, 6219, 297, 518, 13, 9651, 525, 29888, 417, 1218, 742, 13, 9651, 525, 29888, 417, 1218, 29918, 22925, 29918, 18127, 742, 13, 9651, 525, 29888, 417, 1218, 29918, 22925, 29918, 7165, 742, 13, 4706, 4514, 13, 4706, 1583, 3032, 4572, 29918, 29888, 417, 1218, 353, 7700, 13, 13, 4706, 565, 1583, 3032, 26770, 29889, 3784, 29889, 9040, 29889, 6768, 1839, 1445, 1853, 2033, 2804, 525, 1145, 568, 2396, 13, 9651, 1583, 3032, 23545, 29880, 342, 5393, 353, 1583, 3032, 26770, 29889, 6768, 1839, 23545, 29880, 342, 5393, 2033, 13, 13, 4706, 1899, 353, 525, 5628, 29915, 13, 4706, 565, 6219, 1275, 525, 3891, 2396, 13, 9651, 1583, 3032, 26770, 29889, 6519, 877, 3891, 1482, 1495, 13, 4706, 25342, 1583, 3032, 29888, 417, 1218, 29901, 13, 9651, 1583, 3032, 5451, 29918, 29888, 417, 1218, 29898, 5451, 29897, 13, 4706, 25342, 1583, 3032, 4703, 1839, 4572, 29918, 5451, 29918, 20845, 2033, 1275, 525, 29888, 417, 1218, 2396, 13, 9651, 1583, 3032, 4572, 29918, 29888, 417, 1218, 353, 5852, 13, 4706, 25342, 6219, 2804, 525, 1217, 2396, 13, 9651, 1899, 353, 1583, 3032, 657, 29918, 20845, 580, 13, 9651, 1899, 4619, 525, 325, 5451, 29915, 565, 6219, 1275, 525, 18575, 29915, 1683, 525, 6219, 29915, 13, 4706, 18392, 978, 353, 525, 29961, 1145, 568, 29962, 29899, 29915, 718, 1583, 3032, 4703, 1839, 9040, 29918, 978, 2033, 13, 4706, 565, 1583, 3032, 26770, 29889, 4804, 877, 9933, 742, 525, 29930, 9721, 1202, 29374, 13, 9651, 18392, 22230, 353, 1583, 3032, 26770, 29889, 4804, 877, 9721, 1202, 742, 18392, 978, 29897, 13, 9651, 11408, 353, 525, 18575, 29915, 565, 6219, 1275, 525, 18575, 29915, 1683, 6629, 13, 9651, 1899, 353, 313, 13, 795, 525, 9040, 29915, 565, 6219, 13, 795, 297, 6024, 1217, 742, 525, 3891, 742, 525, 29888, 417, 1218, 742, 13, 462, 29871, 525, 29888, 417, 1218, 29918, 22925, 29918, 7165, 742, 13, 462, 29871, 525, 29888, 417, 1218, 29918, 22925, 29918, 18127, 2033, 1683, 525, 29879, 9040, 1495, 13, 9651, 1583, 3032, 26770, 29889, 6519, 29898, 13, 18884, 525, 25590, 296, 3013, 1997, 1273, 29879, 1273, 29879, 1273, 29879, 1273, 29879, 29915, 1273, 313, 13, 462, 1678, 1583, 3032, 657, 29918, 20845, 3285, 13, 462, 1678, 11408, 29892, 13, 462, 1678, 1899, 29892, 13, 462, 1678, 18392, 22230, 29892, 13, 18884, 1723, 13, 9651, 1723, 13, 4706, 1683, 29901, 13, 9651, 1583, 3032, 26770, 29889, 4804, 29898, 13, 18884, 525, 1145, 568, 29937, 4422, 29937, 7978, 29918, 2084, 742, 13, 18884, 285, 29915, 25590, 296, 3013, 1997, 426, 6519, 29913, 742, 18392, 978, 29897, 13, 13, 1678, 822, 903, 657, 29918, 20845, 29898, 1311, 29897, 1599, 851, 29901, 13, 4706, 5305, 353, 851, 29898, 1311, 3032, 4703, 1839, 20845, 11287, 13, 4706, 565, 5305, 1275, 525, 29881, 2926, 919, 459, 29915, 470, 5305, 1275, 525, 16626, 8968, 2396, 13, 9651, 1583, 3032, 5504, 29918, 4990, 287, 29918, 726, 29879, 580, 13, 9651, 5401, 2103, 353, 1583, 3032, 26770, 29889, 4804, 877, 5080, 2103, 742, 29871, 29900, 29897, 13, 9651, 338, 29918, 9202, 353, 451, 518, 29916, 363, 921, 297, 1583, 3032, 4990, 287, 29918, 726, 29879, 13, 462, 3986, 565, 1583, 3032, 26770, 29889, 4804, 877, 710, 2103, 742, 921, 29897, 1405, 5401, 2103, 29962, 13, 9651, 565, 5305, 1275, 525, 29881, 2926, 919, 459, 2396, 13, 18884, 5305, 353, 525, 27215, 1563, 29915, 565, 338, 29918, 9202, 1683, 525, 3332, 1563, 29915, 13, 9651, 1683, 29901, 13, 18884, 5305, 353, 525, 22503, 1266, 29915, 565, 338, 29918, 9202, 1683, 525, 7451, 1266, 29915, 13, 4706, 736, 5305, 13, 13, 1678, 822, 903, 657, 29918, 5080, 3888, 29898, 1311, 29897, 1599, 19229, 29889, 1293, 29961, 1017, 15702, 29889, 10773, 5387, 13, 4706, 736, 518, 13, 9651, 1583, 3032, 26770, 29889, 6768, 1839, 13099, 7464, 1583, 3032, 26770, 29889, 6768, 1839, 9012, 7464, 13, 9651, 1583, 3032, 26770, 29889, 4804, 877, 5080, 29918, 657, 333, 5477, 1583, 3032, 26770, 29889, 4804, 877, 3891, 3488, 9721, 1761, 1495, 13, 4706, 4514, 13, 13, 1678, 822, 903, 15123, 29918, 16304, 29918, 9040, 29898, 1311, 29897, 1599, 6213, 29901, 13, 4706, 565, 313, 1311, 3032, 16304, 29918, 9721, 22230, 1275, 1583, 3032, 9721, 22230, 470, 13, 18884, 1583, 3032, 26770, 29889, 28040, 414, 29961, 1311, 3032, 16304, 29918, 9721, 22230, 1822, 978, 1275, 6629, 1125, 13, 9651, 1583, 3032, 26770, 29889, 6519, 877, 264, 809, 1495, 13, 4706, 1683, 29901, 13, 9651, 1583, 3032, 26770, 29889, 6519, 877, 9040, 525, 718, 851, 29898, 1311, 3032, 16304, 29918, 9721, 22230, 876, 13, 13, 1678, 822, 903, 2344, 29918, 29562, 29898, 1311, 29897, 1599, 6213, 29901, 13, 4706, 1583, 3032, 26770, 29889, 6519, 877, 29562, 1206, 11455, 1495, 13, 4706, 1583, 3032, 26770, 29889, 6519, 877, 28970, 2322, 1544, 972, 568, 4290, 21864, 16190, 1495, 13, 4706, 1583, 3032, 26770, 29889, 6519, 877, 28970, 1544, 972, 568, 9652, 287, 6069, 525, 718, 13, 462, 3986, 1583, 3032, 4703, 1839, 28970, 29918, 4352, 287, 29918, 3881, 11287, 13, 4706, 1583, 3032, 26770, 29889, 6519, 877, 28970, 1544, 972, 568, 9652, 287, 5914, 525, 718, 13, 462, 3986, 1583, 3032, 4703, 1839, 28970, 29918, 4352, 287, 29918, 3090, 11287, 13, 4706, 1583, 3032, 26770, 29889, 6519, 877, 28970, 2322, 1544, 525, 718, 13, 462, 3986, 525, 1145, 568, 5709, 3542, 2605, 461, 1495, 13, 4706, 1583, 3032, 26770, 29889, 6519, 877, 28970, 2322, 1544, 525, 718, 13, 462, 3986, 525, 1145, 568, 5709, 3542, 4557, 7407, 16514, 1495, 13, 4706, 1583, 3032, 26770, 29889, 6519, 877, 28970, 2322, 1544, 525, 718, 13, 462, 3986, 525, 1145, 568, 8592, 3542, 6666, 882, 1495, 13, 13, 4706, 565, 1583, 3032, 29888, 417, 1218, 29901, 13, 9651, 1583, 3032, 26770, 29889, 3784, 29889, 7165, 29889, 6768, 1839, 5080, 28970, 2033, 353, 313, 13, 18884, 525, 19077, 11283, 718, 1583, 3032, 4703, 1839, 28970, 29918, 7165, 29918, 7042, 2033, 13, 9651, 1723, 13, 4706, 1583, 3032, 26770, 29889, 6519, 29898, 877, 29562, 1993, 972, 568, 8592, 3542, 847, 29985, 29961, 29995, 29879, 1822, 3877, 29915, 718, 13, 462, 965, 525, 3743, 29922, 1145, 568, 1168, 346, 7943, 9802, 1495, 1273, 313, 13, 462, 1669, 1583, 3032, 4703, 1839, 8391, 29918, 4144, 25901, 13, 4706, 1583, 3032, 26770, 29889, 6519, 29898, 877, 29562, 1993, 972, 568, 1168, 346, 7943, 9802, 847, 29985, 29961, 1273, 29879, 16261, 29915, 718, 13, 462, 965, 525, 10628, 284, 11122, 1495, 1273, 313, 13, 462, 1669, 1583, 3032, 4703, 1839, 8391, 29918, 4144, 25901, 13, 13, 4706, 565, 1583, 3032, 1145, 568, 29901, 13, 9651, 1583, 3032, 1145, 568, 29889, 2344, 29918, 29562, 29898, 1311, 3032, 4703, 29892, 1583, 3032, 275, 29918, 9910, 29897, 13, 13, 1678, 822, 903, 5504, 29918, 29883, 5380, 1078, 29898, 1311, 29897, 1599, 6120, 29901, 13, 4706, 565, 451, 1583, 3032, 1145, 568, 29901, 13, 9651, 736, 7700, 13, 13, 4706, 518, 1311, 3032, 275, 29918, 12674, 29892, 4766, 29892, 4660, 267, 29892, 1583, 3032, 296, 533, 29918, 2435, 29892, 13, 308, 1583, 3032, 29883, 5380, 1078, 29962, 353, 1583, 3032, 1145, 568, 29889, 4572, 29918, 29883, 5380, 1078, 29898, 1311, 3032, 4703, 29897, 13, 13, 4706, 12379, 29918, 4990, 287, 29918, 726, 29879, 353, 1583, 3032, 4990, 287, 29918, 726, 29879, 13, 4706, 1583, 3032, 5504, 29918, 4990, 287, 29918, 726, 29879, 580, 13, 13, 4706, 12379, 29918, 4352, 287, 29918, 11037, 353, 1583, 3032, 4352, 287, 29918, 11037, 13, 4706, 1583, 3032, 4352, 287, 29918, 11037, 353, 4766, 13, 13, 4706, 12379, 29918, 4882, 1220, 29918, 29879, 2863, 353, 1583, 3032, 4882, 1220, 29918, 29879, 2863, 13, 4706, 1583, 3032, 4882, 1220, 29918, 29879, 2863, 353, 525, 15300, 7122, 29898, 4882, 267, 29897, 13, 13, 4706, 565, 1583, 3032, 275, 29918, 12674, 29901, 13, 9651, 1583, 3032, 2962, 29918, 20404, 877, 5504, 29918, 29883, 5380, 1078, 1495, 13, 4706, 1683, 29901, 13, 9651, 1583, 3032, 9847, 29918, 20404, 877, 5504, 29918, 29883, 5380, 1078, 1495, 13, 13, 4706, 4784, 353, 313, 1311, 3032, 4990, 287, 29918, 726, 29879, 2804, 12379, 29918, 4990, 287, 29918, 726, 29879, 470, 13, 462, 259, 1583, 3032, 4352, 287, 29918, 11037, 2804, 12379, 29918, 4352, 287, 29918, 11037, 470, 13, 462, 259, 1583, 3032, 4882, 1220, 29918, 29879, 2863, 2804, 12379, 29918, 4882, 1220, 29918, 29879, 2863, 29897, 13, 4706, 565, 4784, 29901, 13, 9651, 1583, 3032, 21402, 353, 5852, 13, 9651, 1583, 3032, 2962, 29918, 20404, 877, 5504, 29918, 9040, 1495, 13, 13, 4706, 565, 1583, 3032, 4703, 1839, 4478, 2033, 322, 1583, 3032, 4703, 1839, 2080, 2033, 29901, 13, 9651, 1583, 3032, 26770, 29889, 4804, 877, 842, 1727, 742, 8207, 742, 1583, 3032, 4703, 1839, 2080, 11287, 13, 4706, 736, 1583, 3032, 21402, 13, 13, 1678, 822, 903, 5504, 29918, 4990, 287, 29918, 726, 29879, 29898, 1311, 29897, 1599, 6213, 29901, 13, 4706, 21669, 29918, 2435, 353, 7431, 29898, 1311, 3032, 29883, 5380, 1078, 29897, 13, 4706, 565, 451, 1583, 3032, 275, 29918, 12674, 322, 1583, 3032, 4703, 1839, 6921, 29918, 21476, 2033, 29901, 13, 9651, 5401, 1195, 3545, 353, 1583, 3032, 4703, 1839, 5080, 1195, 3545, 2033, 13, 9651, 4236, 29918, 3545, 353, 1375, 29898, 1311, 3032, 4703, 1839, 5080, 3545, 7464, 13, 462, 632, 1583, 3032, 657, 29918, 3317, 29918, 3545, 3101, 13, 9651, 565, 313, 5080, 1195, 3545, 2804, 448, 29896, 322, 21669, 29918, 2435, 529, 5401, 1195, 3545, 1125, 13, 18884, 1583, 3032, 5080, 3545, 353, 5401, 1195, 3545, 13, 9651, 25342, 21669, 29918, 2435, 1405, 4236, 29918, 3545, 29901, 13, 18884, 1583, 3032, 5080, 3545, 353, 4236, 29918, 3545, 13, 9651, 25342, 21669, 29918, 2435, 2804, 1583, 3032, 5080, 3545, 29901, 13, 18884, 1583, 3032, 5080, 3545, 353, 21669, 29918, 2435, 13, 13, 4706, 4236, 29918, 4993, 29918, 978, 29918, 2435, 353, 29871, 29900, 13, 4706, 565, 1583, 3032, 29883, 5380, 1078, 29901, 13, 9651, 4236, 29918, 4993, 29918, 978, 29918, 2435, 353, 4236, 4197, 13, 18884, 7431, 29898, 1311, 3032, 657, 29918, 4990, 29918, 4993, 29918, 978, 29898, 29916, 1839, 4993, 29918, 978, 25901, 13, 18884, 363, 921, 297, 1583, 3032, 29883, 5380, 1078, 2314, 13, 4706, 1583, 3032, 4703, 1839, 3317, 29918, 4993, 29918, 978, 29918, 2435, 2033, 353, 4236, 29918, 4993, 29918, 978, 29918, 2435, 13, 4706, 1583, 3032, 4703, 1839, 3317, 29918, 4993, 29918, 978, 29918, 4830, 2033, 353, 313, 13, 9651, 22372, 29901, 26717, 718, 851, 29898, 1311, 3032, 4703, 1839, 3317, 29918, 4993, 29918, 978, 29918, 2435, 11287, 718, 525, 29913, 1495, 13, 4706, 1583, 3032, 4990, 287, 29918, 726, 29879, 353, 518, 13, 9651, 1583, 3032, 657, 29918, 29883, 5380, 403, 29918, 4990, 29918, 726, 29898, 29875, 29897, 13, 9651, 363, 474, 297, 3464, 29898, 29900, 29892, 21669, 29918, 2435, 29897, 13, 4706, 4514, 13, 13, 1678, 822, 903, 5504, 29918, 9040, 29898, 1311, 29897, 1599, 6213, 29901, 13, 4706, 338, 29918, 3784, 29918, 9040, 353, 1583, 3032, 9721, 22230, 1275, 1583, 3032, 26770, 29889, 3784, 29889, 9040, 29889, 4537, 13, 13, 4706, 1583, 3032, 5504, 29918, 4882, 580, 13, 13, 4706, 565, 1583, 3032, 3198, 29918, 4352, 8143, 322, 1583, 3032, 4703, 1839, 4352, 29918, 28970, 2033, 29901, 13, 9651, 7087, 353, 518, 29916, 1839, 333, 2033, 363, 921, 297, 13, 462, 539, 1583, 3032, 26770, 29889, 4804, 877, 657, 20317, 742, 1583, 3032, 5080, 333, 4638, 13, 9651, 565, 1583, 3032, 4352, 287, 29918, 3881, 29918, 333, 297, 7087, 29901, 13, 18884, 1583, 3032, 26770, 29889, 4804, 877, 4352, 8143, 742, 13, 462, 1669, 1583, 3032, 4352, 287, 29918, 3881, 29918, 333, 29892, 1583, 3032, 5080, 333, 29897, 13, 18884, 1583, 3032, 4352, 287, 29918, 3881, 29918, 333, 353, 448, 29896, 13, 9651, 565, 1583, 3032, 4352, 287, 29918, 3090, 29918, 333, 297, 7087, 29901, 13, 18884, 1583, 3032, 26770, 29889, 4804, 877, 4352, 8143, 742, 13, 462, 1669, 1583, 3032, 4352, 287, 29918, 3090, 29918, 333, 29892, 1583, 3032, 5080, 333, 29897, 13, 18884, 1583, 3032, 4352, 287, 29918, 3090, 29918, 333, 353, 448, 29896, 13, 13, 9651, 565, 1583, 3032, 4352, 287, 29918, 11037, 2804, 525, 2396, 13, 18884, 1583, 3032, 4352, 287, 29918, 3881, 29918, 333, 353, 1583, 3032, 26770, 29889, 4804, 29898, 13, 462, 1678, 525, 4352, 1202, 742, 525, 1145, 568, 9652, 287, 6069, 742, 13, 462, 1678, 364, 12764, 29883, 29915, 718, 6528, 29918, 13441, 29918, 2272, 29918, 26770, 29898, 1311, 3032, 4352, 287, 29918, 11037, 511, 13, 462, 268, 29896, 29900, 29892, 448, 29896, 29892, 11117, 7165, 2396, 1583, 3032, 5080, 333, 1800, 13, 18884, 19228, 29918, 3090, 29918, 11037, 353, 525, 19660, 6525, 4286, 4830, 29898, 276, 29889, 1491, 29898, 13, 462, 1678, 364, 29915, 4197, 29905, 7110, 29962, 1966, 21583, 2314, 742, 13, 462, 1678, 364, 29915, 1966, 29905, 29896, 742, 13, 462, 1678, 1583, 3032, 4703, 1839, 2080, 13359, 6506, 877, 13420, 27255, 13, 462, 876, 13, 18884, 1583, 3032, 4352, 287, 29918, 3090, 29918, 333, 353, 1583, 3032, 26770, 29889, 4804, 29898, 13, 462, 1678, 525, 4352, 1202, 742, 525, 1145, 568, 9652, 287, 5914, 742, 13, 462, 1678, 19228, 29918, 3090, 29918, 11037, 29892, 13, 462, 268, 29896, 29900, 29892, 448, 29896, 29892, 11117, 7165, 2396, 1583, 3032, 5080, 333, 1800, 13, 13, 4706, 12379, 29918, 1915, 264, 29878, 353, 1583, 3032, 26770, 29889, 4804, 877, 1220, 742, 15300, 1495, 13, 4706, 12379, 29918, 29883, 5380, 403, 353, 1583, 3032, 657, 29918, 18127, 29918, 29883, 5380, 403, 580, 13, 13, 4706, 6835, 353, 1583, 3032, 26770, 29889, 28040, 414, 29961, 1311, 3032, 9721, 22230, 29962, 13, 4706, 6835, 29889, 6768, 1839, 1545, 28677, 2033, 353, 5852, 13, 4706, 1583, 3032, 26770, 29889, 16908, 1839, 1145, 568, 29937, 29918, 29883, 5380, 1078, 2033, 353, 518, 13, 9651, 921, 1839, 1742, 2033, 363, 921, 297, 1583, 3032, 29883, 5380, 1078, 29962, 13, 4706, 6835, 7503, 29962, 353, 1583, 3032, 4990, 287, 29918, 726, 29879, 13, 4706, 6835, 29889, 6768, 1839, 1545, 28677, 2033, 353, 7700, 13, 13, 4706, 1583, 3032, 24957, 29918, 726, 353, 1583, 3032, 4703, 1839, 2080, 2033, 13, 13, 4706, 1583, 3032, 21476, 29918, 9040, 29898, 275, 29918, 3784, 29918, 9040, 29897, 13, 13, 4706, 338, 29918, 15033, 353, 313, 1311, 3032, 4703, 1839, 276, 874, 287, 2033, 470, 13, 462, 418, 313, 275, 29918, 3784, 29918, 9040, 322, 13, 462, 539, 1583, 3032, 24957, 29918, 726, 2804, 1583, 3032, 4703, 1839, 2080, 25901, 13, 4706, 565, 1583, 3032, 21402, 322, 338, 29918, 15033, 29901, 13, 9651, 565, 451, 338, 29918, 3784, 29918, 9040, 29901, 13, 18884, 4078, 29918, 5080, 333, 353, 1583, 3032, 26770, 29889, 4804, 877, 5080, 29918, 657, 333, 1495, 13, 18884, 1583, 3032, 26770, 29889, 4804, 877, 5080, 29918, 7085, 3398, 742, 1583, 3032, 5080, 333, 29897, 13, 9651, 1583, 3032, 2344, 29918, 18127, 580, 13, 9651, 1583, 3032, 11631, 29918, 517, 29918, 1066, 29898, 1311, 3032, 18127, 29897, 13, 9651, 565, 451, 338, 29918, 3784, 29918, 9040, 29901, 13, 18884, 1583, 3032, 26770, 29889, 4804, 877, 5080, 29918, 7085, 3398, 742, 4078, 29918, 5080, 333, 29897, 13, 4706, 25342, 338, 29918, 3784, 29918, 9040, 29901, 13, 9651, 1583, 3032, 26770, 29889, 4804, 877, 18127, 742, 518, 16304, 29918, 1915, 264, 29878, 29892, 29871, 29900, 2314, 13, 13, 4706, 565, 338, 29918, 3784, 29918, 9040, 29901, 13, 9651, 565, 313, 1311, 3032, 4703, 1839, 6921, 29918, 2467, 2033, 322, 13, 462, 1678, 12379, 29918, 29883, 5380, 403, 2804, 1583, 3032, 657, 29918, 18127, 29918, 29883, 5380, 403, 580, 1125, 13, 18884, 1583, 29889, 1867, 29918, 2467, 29898, 1311, 3032, 4703, 1839, 6921, 29918, 2467, 11287, 13, 13, 4706, 1583, 3032, 21402, 353, 7700, 13, 4706, 1583, 3032, 9847, 29918, 20404, 877, 5504, 29918, 9040, 1495, 13, 13, 1678, 822, 903, 5504, 29918, 4882, 29898, 1311, 29897, 1599, 6213, 29901, 13, 4706, 297, 415, 353, 6629, 13, 4706, 565, 1583, 3032, 4703, 1839, 2080, 2033, 29901, 13, 9651, 297, 415, 353, 1583, 3032, 4703, 1839, 2080, 2033, 718, 525, 525, 13, 4706, 565, 1583, 3032, 4703, 1839, 2704, 29918, 19158, 2033, 29901, 13, 9651, 297, 415, 353, 525, 29961, 11432, 29962, 525, 718, 297, 415, 13, 4706, 2224, 353, 525, 1839, 718, 1583, 3032, 4703, 1839, 2084, 2033, 718, 525, 29962, 29915, 13, 13, 4706, 4660, 353, 426, 13, 9651, 525, 2080, 2396, 297, 415, 29892, 13, 9651, 525, 29879, 2863, 2396, 1583, 3032, 4882, 1220, 29918, 29879, 2863, 29892, 13, 9651, 525, 2084, 2396, 2224, 29892, 13, 9651, 396, 7338, 336, 13, 9651, 525, 9040, 29918, 978, 2396, 1583, 3032, 4703, 1839, 9040, 29918, 978, 7464, 13, 9651, 525, 1220, 29918, 7827, 2396, 7431, 29898, 1311, 3032, 29883, 5380, 1078, 511, 13, 4706, 500, 13, 4706, 565, 4660, 1275, 1583, 3032, 16304, 29918, 4882, 29901, 13, 9651, 736, 13, 13, 4706, 1583, 3032, 9721, 16908, 1839, 1145, 568, 29918, 4882, 1220, 2033, 353, 4660, 13, 4706, 1583, 3032, 16304, 29918, 4882, 353, 4660, 13, 13, 4706, 6276, 264, 29878, 353, 376, 8124, 877, 29995, 4286, 29898, 2435, 29898, 1220, 877, 29938, 8785, 29974, 29906, 467, 29915, 29881, 22584, 29881, 742, 1220, 12839, 5477, 1220, 877, 29938, 8785, 29908, 13, 13, 4706, 565, 1583, 3032, 4703, 1839, 4882, 1220, 2033, 29901, 13, 9651, 565, 1583, 3032, 29888, 417, 1218, 470, 1583, 3032, 4572, 29918, 29888, 417, 1218, 29901, 13, 18884, 1583, 3032, 26770, 29889, 6768, 1839, 23545, 29880, 342, 5393, 2033, 353, 313, 13, 462, 1678, 11860, 29912, 1145, 568, 29937, 657, 29918, 4882, 877, 2080, 1495, 10560, 29930, 376, 718, 13, 462, 1678, 11860, 29912, 1145, 568, 29937, 657, 29918, 4882, 877, 29879, 2863, 1495, 29913, 376, 718, 13, 462, 1678, 376, 21191, 1145, 568, 29937, 657, 29918, 4882, 877, 2084, 1495, 10560, 20605, 718, 13, 462, 1678, 11860, 6377, 718, 6276, 264, 29878, 718, 376, 10560, 29930, 1159, 13, 9651, 1683, 29901, 13, 18884, 281, 2559, 29878, 353, 1583, 3032, 26770, 29889, 4804, 877, 5080, 29918, 333, 29906, 5080, 742, 1583, 3032, 5080, 333, 29897, 13, 18884, 1583, 3032, 26770, 29889, 4804, 877, 842, 5080, 1707, 742, 281, 2559, 29878, 29892, 525, 29987, 4882, 1220, 742, 313, 13, 462, 1678, 11860, 29937, 1145, 568, 4290, 29937, 29995, 29912, 1145, 568, 29937, 657, 29918, 4882, 877, 2080, 1495, 10560, 29930, 376, 718, 13, 462, 1678, 11860, 29912, 1145, 568, 29937, 657, 29918, 4882, 877, 29879, 2863, 1495, 29913, 1273, 543, 718, 13, 462, 1678, 11860, 29937, 1145, 568, 5709, 3542, 2605, 29937, 21191, 1145, 568, 29937, 657, 29918, 4882, 877, 2084, 1495, 10560, 20605, 718, 13, 462, 1678, 11860, 29937, 1145, 568, 5709, 3542, 4557, 29937, 29995, 6377, 718, 6276, 264, 29878, 718, 376, 10560, 29930, 5783, 13, 13, 1678, 822, 903, 657, 29918, 4990, 29918, 4993, 29918, 978, 29898, 1311, 29892, 1024, 29901, 851, 29897, 1599, 851, 29901, 13, 4706, 2752, 29918, 7039, 353, 1583, 3032, 4703, 1839, 4993, 29918, 7039, 2033, 13, 4706, 565, 451, 1583, 3032, 275, 29918, 9910, 470, 2752, 29918, 7039, 1275, 525, 11458, 2396, 13, 9651, 2752, 29918, 978, 353, 6629, 13, 4706, 1683, 29901, 13, 9651, 3273, 29918, 978, 353, 313, 276, 29889, 1491, 29898, 29878, 29915, 4197, 29874, 29899, 25265, 29899, 29999, 2314, 29961, 29874, 29899, 25265, 29899, 29999, 10062, 742, 364, 12764, 29896, 742, 1024, 29897, 13, 462, 3986, 565, 337, 29889, 4478, 29898, 29878, 29915, 22896, 29874, 29899, 25265, 29899, 29999, 29962, 742, 1024, 29897, 1683, 1024, 7503, 29906, 2314, 13, 9651, 2752, 29918, 978, 353, 3273, 29918, 978, 565, 2752, 29918, 7039, 1275, 525, 12759, 29915, 1683, 1024, 13, 4706, 736, 2752, 29918, 978, 13, 13, 1678, 822, 903, 657, 29918, 29883, 5380, 403, 29918, 4990, 29918, 726, 29898, 1311, 29892, 2380, 29901, 938, 29897, 1599, 851, 29901, 13, 4706, 2752, 29918, 7039, 353, 1583, 3032, 4703, 1839, 4993, 29918, 7039, 2033, 13, 4706, 14020, 353, 1583, 3032, 29883, 5380, 1078, 29961, 2248, 29962, 13, 4706, 4958, 353, 5159, 13, 4706, 565, 1583, 3032, 275, 29918, 9910, 322, 2752, 29918, 7039, 2804, 525, 11458, 2396, 13, 9651, 4958, 29889, 4397, 29898, 1311, 3032, 4703, 1839, 3317, 29918, 4993, 29918, 978, 29918, 4830, 13359, 4830, 29898, 13, 18884, 1583, 3032, 657, 29918, 4990, 29918, 4993, 29918, 978, 29898, 29883, 5380, 403, 1839, 4993, 29918, 978, 2033, 4961, 13, 4706, 8025, 353, 1583, 3032, 4703, 1839, 22331, 2033, 13, 4706, 633, 1182, 353, 14020, 29889, 657, 877, 370, 1182, 742, 14020, 1839, 1742, 2033, 467, 12508, 29898, 13, 9651, 8025, 29892, 4436, 2433, 6506, 2824, 13808, 29898, 22331, 29892, 4436, 2433, 6506, 1495, 13, 4706, 4958, 29889, 4397, 29898, 370, 1182, 7503, 524, 29898, 1311, 3032, 4703, 1839, 3317, 29918, 29883, 5380, 403, 29918, 2103, 11287, 2314, 13, 4706, 736, 313, 710, 29898, 1311, 3032, 4703, 1839, 8391, 29918, 4144, 11287, 13, 18884, 565, 2380, 297, 1583, 3032, 8391, 29918, 29883, 5380, 1078, 13, 18884, 1683, 525, 25710, 718, 525, 15300, 7122, 29898, 357, 1516, 467, 6506, 28909, 29876, 742, 27255, 13, 13, 1678, 822, 903, 657, 29918, 3317, 29918, 3545, 29898, 1311, 29897, 1599, 938, 29901, 13, 4706, 736, 938, 29898, 1311, 3032, 26770, 29889, 6768, 1839, 9012, 11287, 565, 451, 1583, 3032, 29888, 417, 1218, 1683, 313, 13, 9651, 938, 29898, 1311, 3032, 26770, 29889, 6768, 1839, 9012, 11287, 448, 13, 9651, 938, 29898, 1311, 3032, 4703, 1839, 5080, 798, 11287, 448, 13, 9651, 938, 29898, 1311, 3032, 26770, 29889, 6768, 1839, 9006, 3545, 25901, 13, 13, 1678, 822, 903, 21476, 29918, 9040, 29898, 1311, 29892, 338, 29918, 3784, 29918, 9040, 29901, 6120, 29897, 1599, 6213, 29901, 13, 4706, 6219, 353, 1583, 3032, 4703, 1839, 5451, 2033, 13, 4706, 565, 313, 5451, 1275, 525, 1217, 29915, 470, 6219, 1275, 525, 3891, 29915, 470, 13, 18884, 1583, 3032, 26770, 29889, 4804, 877, 29893, 2559, 29878, 742, 14180, 1495, 1275, 29871, 29896, 1125, 13, 9651, 736, 13, 13, 4706, 5401, 3545, 353, 4236, 29898, 1311, 3032, 5080, 3545, 29892, 29871, 29896, 29897, 13, 4706, 5401, 2103, 353, 4236, 29898, 1311, 3032, 5080, 2103, 29892, 29871, 29896, 29897, 13, 4706, 338, 29918, 18575, 353, 6219, 1275, 525, 18575, 29915, 13, 13, 4706, 565, 451, 338, 29918, 3784, 29918, 9040, 29901, 13, 9651, 17749, 353, 1583, 3032, 26770, 29889, 4804, 877, 5080, 29918, 657, 333, 1495, 13, 9651, 1583, 3032, 26770, 29889, 4804, 877, 5080, 29918, 7085, 3398, 742, 1583, 3032, 5080, 333, 29897, 13, 13, 4706, 565, 451, 338, 29918, 18575, 322, 1583, 3032, 26770, 29889, 3784, 29889, 7165, 29889, 3545, 2804, 5401, 3545, 29901, 13, 9651, 565, 1583, 3032, 29888, 417, 1218, 29901, 13, 18884, 5401, 1054, 353, 1583, 3032, 4703, 1839, 5080, 798, 2033, 13, 18884, 1948, 353, 5401, 1054, 13, 18884, 565, 6219, 1275, 525, 29888, 417, 1218, 2396, 13, 462, 1678, 565, 1583, 3032, 4703, 1839, 6921, 29918, 21476, 2033, 322, 1948, 1405, 29871, 29896, 29901, 13, 462, 4706, 1948, 4619, 1583, 3032, 4703, 1839, 5080, 3545, 2033, 13, 462, 4706, 1948, 22361, 1583, 3032, 5080, 3545, 13, 462, 1678, 1583, 3032, 26770, 29889, 4804, 877, 29876, 26770, 29918, 5080, 29918, 842, 29918, 2917, 742, 1583, 3032, 5080, 333, 29892, 426, 13, 462, 4706, 525, 22925, 2396, 525, 15204, 742, 13, 462, 4706, 525, 798, 2396, 1948, 29892, 13, 462, 4706, 525, 1054, 2396, 1583, 3032, 4703, 1839, 5080, 1054, 7464, 13, 462, 4706, 525, 2103, 2396, 5401, 2103, 29892, 13, 462, 4706, 525, 3545, 2396, 5401, 3545, 29892, 13, 462, 1678, 5615, 13, 462, 1678, 4175, 29918, 798, 353, 29871, 29900, 565, 5401, 1054, 1275, 29871, 29896, 1683, 1948, 718, 5401, 3545, 13, 462, 1678, 4175, 29918, 1054, 353, 1583, 3032, 4703, 1839, 5080, 1054, 2033, 13, 18884, 1683, 29901, 13, 462, 1678, 2069, 29918, 1066, 353, 1583, 3032, 26770, 29889, 4804, 877, 29876, 26770, 29918, 5080, 29918, 657, 29918, 2917, 742, 13, 462, 462, 795, 1583, 3032, 5080, 333, 29897, 13, 462, 1678, 1583, 3032, 26770, 29889, 4804, 877, 29876, 26770, 29918, 5080, 29918, 842, 29918, 2917, 742, 1583, 3032, 5080, 333, 29892, 426, 13, 462, 4706, 525, 22925, 2396, 525, 5080, 742, 13, 462, 4706, 525, 5080, 2396, 2069, 29918, 1066, 1839, 5080, 7464, 13, 462, 4706, 525, 798, 2396, 2069, 29918, 1066, 1839, 798, 7464, 13, 462, 4706, 525, 1054, 2396, 2069, 29918, 1066, 1839, 1054, 7464, 13, 462, 4706, 525, 2103, 2396, 5401, 2103, 29892, 13, 462, 4706, 525, 3545, 2396, 5401, 3545, 29892, 13, 462, 1678, 5615, 13, 462, 1678, 4175, 29918, 1054, 353, 2069, 29918, 1066, 1839, 1054, 2033, 13, 462, 1678, 565, 2069, 29918, 1066, 1839, 25367, 2033, 1275, 525, 29940, 29956, 2396, 13, 462, 4706, 5401, 1066, 353, 1583, 3032, 26770, 29889, 4804, 877, 29876, 26770, 29918, 5080, 29918, 657, 29918, 3283, 742, 13, 462, 462, 18884, 1583, 3032, 5080, 333, 29897, 13, 462, 4706, 4175, 29918, 798, 353, 5401, 1066, 29961, 29900, 29962, 718, 5401, 3545, 13, 13, 18884, 4175, 29918, 5080, 333, 353, 1583, 3032, 26770, 29889, 16908, 1839, 1145, 568, 29937, 29918, 4572, 29918, 5080, 333, 2033, 13, 18884, 1583, 3032, 4703, 1839, 4572, 29918, 5080, 798, 2033, 353, 1948, 13, 18884, 565, 1583, 3032, 26770, 29889, 4804, 877, 5080, 29918, 333, 29906, 5080, 742, 4175, 29918, 5080, 333, 29897, 1405, 29871, 29900, 29901, 13, 462, 1678, 1583, 3032, 26770, 29889, 4804, 877, 29876, 26770, 29918, 5080, 29918, 842, 29918, 2917, 742, 4175, 29918, 5080, 333, 29892, 426, 13, 462, 4706, 525, 22925, 2396, 525, 15204, 742, 13, 462, 4706, 525, 798, 2396, 4175, 29918, 798, 29892, 13, 462, 4706, 525, 1054, 2396, 4175, 29918, 1054, 29892, 13, 462, 1678, 5615, 13, 13, 9651, 1583, 3032, 26770, 29889, 6519, 877, 21476, 525, 718, 851, 29898, 5080, 3545, 876, 13, 9651, 565, 1583, 3032, 4703, 1839, 276, 874, 287, 2033, 29901, 13, 18884, 1583, 3032, 26770, 29889, 6519, 877, 8945, 29991, 22015, 1495, 13, 4706, 25342, 338, 29918, 18575, 322, 1583, 3032, 26770, 29889, 3784, 29889, 7165, 29889, 2103, 2804, 5401, 2103, 29901, 13, 9651, 1583, 3032, 26770, 29889, 6519, 877, 18575, 19490, 525, 718, 851, 29898, 5080, 2103, 876, 13, 13, 4706, 565, 451, 338, 29918, 3784, 29918, 9040, 29901, 13, 9651, 1583, 3032, 26770, 29889, 4804, 877, 5080, 29918, 7085, 3398, 742, 17749, 29897, 13, 13, 1678, 822, 903, 3198, 29918, 1867, 29918, 3385, 29898, 1311, 29897, 1599, 6120, 29901, 13, 4706, 565, 1583, 3032, 4703, 1839, 1867, 2033, 2804, 525, 2396, 13, 9651, 1583, 3032, 1867, 29918, 6519, 29898, 1311, 3032, 4703, 1839, 1867, 11287, 13, 9651, 736, 5852, 13, 4706, 25342, 313, 1311, 3032, 29883, 5380, 1078, 322, 1583, 3032, 4703, 1839, 326, 4210, 2486, 2033, 470, 13, 18884, 7431, 29898, 1311, 3032, 29883, 5380, 1078, 29897, 1275, 29871, 29896, 322, 1583, 3032, 4703, 1839, 326, 4210, 2486, 29918, 29896, 2033, 1125, 13, 9651, 1583, 3032, 1867, 29918, 326, 4210, 2486, 580, 13, 9651, 736, 5852, 13, 4706, 736, 451, 313, 1311, 3032, 4703, 1839, 6310, 2033, 470, 13, 462, 1678, 1583, 3032, 275, 29918, 12674, 470, 1583, 3032, 29883, 5380, 1078, 29897, 13, 13, 1678, 822, 903, 3198, 29918, 11631, 29918, 3385, 29898, 1311, 29897, 1599, 6213, 29901, 13, 4706, 565, 1583, 3032, 4703, 1839, 18127, 29918, 1066, 13359, 275, 21574, 7295, 13, 9651, 1583, 3032, 18127, 353, 938, 29898, 1311, 3032, 4703, 1839, 18127, 29918, 1066, 11287, 718, 29871, 29896, 13, 4706, 25342, 337, 29889, 4352, 29898, 29878, 12764, 3124, 29881, 29974, 742, 1583, 3032, 4703, 1839, 18127, 29918, 1066, 2033, 1125, 13, 9651, 363, 903, 297, 3464, 29898, 524, 29898, 1311, 3032, 4703, 1839, 18127, 29918, 1066, 2033, 29961, 29896, 29901, 12622, 29901, 13, 18884, 1583, 3032, 11631, 29918, 517, 29918, 4622, 29918, 1220, 580, 13, 4706, 25342, 337, 29889, 4352, 29898, 29878, 29915, 2612, 29881, 29974, 742, 1583, 3032, 4703, 1839, 18127, 29918, 1066, 2033, 1125, 13, 9651, 363, 903, 297, 3464, 29898, 524, 29898, 1311, 3032, 4703, 1839, 18127, 29918, 1066, 2033, 29961, 29896, 29901, 12622, 29901, 13, 18884, 1583, 3032, 11631, 29918, 517, 29918, 16304, 29918, 1220, 580, 13, 4706, 25342, 1583, 3032, 4703, 1839, 18127, 29918, 1066, 2033, 1275, 14180, 2396, 13, 9651, 1583, 3032, 11631, 29918, 517, 29918, 4230, 29918, 1220, 580, 13, 13, 1678, 822, 903, 1867, 29918, 326, 4210, 2486, 29898, 1311, 29897, 1599, 6213, 29901, 13, 4706, 2355, 29877, 353, 1583, 3032, 5080, 333, 1405, 29871, 29900, 322, 1583, 3032, 26770, 29889, 4804, 29898, 13, 9651, 525, 5080, 29918, 7085, 3398, 742, 1583, 3032, 5080, 333, 29897, 13, 4706, 565, 2355, 29877, 29901, 13, 9651, 396, 435, 3427, 304, 972, 568, 3474, 13, 9651, 1583, 3032, 2344, 29918, 9040, 580, 13, 4706, 1583, 29889, 1867, 29918, 2467, 877, 4381, 1495, 13, 4706, 14020, 353, 1583, 3032, 657, 29918, 18127, 29918, 29883, 5380, 403, 580, 13, 4706, 565, 451, 14020, 29901, 13, 9651, 736, 13, 4706, 2916, 29898, 1311, 3032, 26770, 29892, 525, 19077, 742, 525, 19660, 6822, 29912, 6525, 6571, 4286, 4830, 29898, 13, 9651, 1583, 3032, 18127, 29892, 7431, 29898, 1311, 3032, 29883, 5380, 1078, 511, 13, 9651, 14020, 29889, 657, 877, 370, 1182, 742, 14020, 1839, 1742, 2033, 4961, 13, 4706, 565, 2355, 29877, 29901, 13, 9651, 396, 25249, 304, 278, 3517, 3474, 13, 9651, 1583, 3032, 26770, 29889, 6519, 877, 29893, 3742, 3487, 282, 1495, 13, 13, 1678, 822, 903, 1867, 29918, 6519, 29898, 1311, 29892, 1899, 29901, 851, 29897, 1599, 6213, 29901, 13, 4706, 1583, 3032, 2344, 29918, 18127, 580, 13, 4706, 10677, 353, 29871, 29896, 13, 4706, 1550, 10677, 529, 7431, 29898, 1311, 3032, 29883, 5380, 1078, 1125, 13, 9651, 1583, 29889, 1867, 29918, 2467, 877, 4381, 742, 1899, 29897, 13, 9651, 1583, 3032, 11631, 29918, 517, 29918, 4622, 29918, 1220, 580, 13, 4706, 1583, 3032, 28358, 29918, 9040, 580, 13, 13, 1678, 822, 903, 14941, 786, 29898, 1311, 29897, 1599, 6213, 29901, 13, 4706, 1583, 3032, 9847, 29918, 20404, 877, 5504, 29918, 29883, 5380, 1078, 1495, 13, 4706, 1583, 3032, 9847, 29918, 20404, 877, 5504, 29918, 9040, 1495, 13, 13, 4706, 565, 1583, 3032, 26770, 29889, 3784, 29889, 9040, 29889, 4537, 1275, 1583, 3032, 9721, 22230, 29901, 13, 9651, 1583, 3032, 18127, 353, 1583, 3032, 26770, 29889, 4804, 877, 1220, 742, 15300, 1495, 13, 13, 4706, 396, 3940, 29901, 23186, 4175, 3474, 1434, 25267, 3474, 13, 4706, 1583, 3032, 26770, 29889, 4804, 877, 1145, 568, 29937, 4572, 29937, 29918, 5358, 29918, 4572, 29918, 7165, 1495, 13, 4706, 565, 451, 1583, 3032, 4703, 1839, 5349, 29918, 25347, 29918, 7165, 2033, 29901, 13, 9651, 1583, 3032, 26770, 29889, 6519, 877, 29886, 5358, 29991, 1495, 13, 4706, 396, 17732, 25267, 287, 20487, 414, 13, 4706, 363, 18392, 22230, 297, 1583, 3032, 26770, 29889, 16908, 1839, 1145, 568, 29937, 29918, 25347, 287, 29918, 28040, 414, 13359, 8149, 7295, 13, 9651, 565, 451, 1583, 3032, 26770, 29889, 4804, 877, 5080, 29918, 2886, 9721, 742, 18392, 22230, 1125, 13, 18884, 1583, 3032, 26770, 29889, 6519, 877, 25590, 296, 289, 8143, 525, 718, 851, 29898, 9721, 22230, 876, 13, 4706, 1583, 3032, 26770, 29889, 16908, 1839, 1145, 568, 29937, 29918, 25347, 287, 29918, 28040, 414, 2033, 353, 6571, 13, 13, 4706, 1583, 3032, 26770, 29889, 6519, 877, 28970, 29991, 1544, 315, 5966, 3542, 315, 5966, 3542, 1495, 13, 4706, 565, 1583, 3032, 29888, 417, 1218, 470, 1583, 3032, 4572, 29918, 29888, 417, 1218, 29901, 13, 9651, 1583, 3032, 26770, 29889, 6768, 1839, 23545, 29880, 342, 5393, 2033, 353, 1583, 3032, 23545, 29880, 342, 5393, 13, 9651, 1583, 3032, 26770, 29889, 6768, 1839, 29878, 8584, 2033, 353, 1583, 3032, 29878, 8584, 13, 13, 1678, 822, 903, 5358, 29918, 3784, 29918, 7165, 29898, 1311, 29897, 1599, 6213, 29901, 13, 4706, 565, 1583, 3032, 26770, 29889, 4804, 877, 29893, 2559, 29878, 742, 14180, 1495, 1275, 29871, 29896, 29901, 13, 9651, 1583, 3032, 26770, 29889, 6519, 877, 9040, 396, 1495, 13, 4706, 1683, 29901, 13, 9651, 1583, 3032, 26770, 29889, 6519, 877, 5358, 29991, 1495, 13, 13, 1678, 822, 903, 28358, 29918, 9040, 29898, 1311, 29897, 1599, 6213, 29901, 13, 4706, 1583, 3032, 14941, 786, 580, 13, 4706, 565, 1583, 3032, 26770, 29889, 4804, 877, 9721, 29893, 2559, 29878, 742, 1583, 3032, 9721, 22230, 29897, 529, 29871, 29900, 29901, 13, 9651, 396, 3384, 568, 6835, 338, 2307, 5764, 13, 9651, 736, 13, 13, 4706, 5401, 4841, 353, 1583, 3032, 26770, 29889, 4804, 877, 5080, 29918, 2886, 9721, 742, 13, 462, 18884, 1583, 3032, 26770, 29889, 16908, 1839, 1145, 568, 29937, 29918, 4572, 29918, 9721, 22230, 11287, 13, 4706, 565, 5401, 4841, 29901, 13, 9651, 396, 751, 277, 4175, 6835, 13, 9651, 1583, 3032, 26770, 29889, 4804, 877, 5080, 29918, 7085, 3398, 742, 5401, 4841, 29961, 29900, 2314, 13, 9651, 1583, 3032, 5358, 29918, 3784, 29918, 7165, 580, 13, 9651, 396, 25249, 304, 972, 568, 3474, 13, 9651, 1583, 3032, 26770, 29889, 4804, 877, 5080, 29918, 7085, 3398, 742, 1583, 3032, 5080, 333, 29897, 13, 13, 4706, 396, 11654, 487, 278, 3474, 13, 4706, 565, 1583, 3032, 4703, 1839, 5451, 2033, 1275, 525, 1217, 2396, 13, 9651, 1583, 3032, 15123, 29918, 16304, 29918, 9040, 580, 13, 9651, 363, 413, 29892, 325, 297, 1583, 3032, 7620, 29918, 7165, 29918, 6768, 29889, 7076, 7295, 13, 18884, 1583, 3032, 26770, 29889, 3784, 29889, 7165, 29889, 6768, 29961, 29895, 29962, 353, 325, 13, 4706, 1683, 29901, 13, 9651, 565, 1583, 3032, 4703, 1839, 5451, 2033, 1275, 525, 3891, 2396, 13, 18884, 1583, 3032, 26770, 29889, 6519, 877, 3891, 5358, 29991, 1495, 13, 13, 9651, 565, 1583, 3032, 4703, 1839, 5451, 2033, 2804, 525, 3891, 2396, 13, 18884, 1583, 3032, 5358, 29918, 3784, 29918, 7165, 580, 13, 13, 9651, 1583, 3032, 26770, 29889, 4804, 877, 5080, 29918, 7085, 3398, 742, 1583, 3032, 16304, 29918, 5080, 333, 29897, 13, 13, 4706, 396, 11654, 487, 278, 2602, 13, 4706, 1583, 3032, 26770, 29889, 4804, 877, 842, 1066, 742, 15300, 742, 1583, 3032, 16304, 29918, 2764, 1066, 29897, 13, 13, 4706, 565, 1583, 3032, 657, 29918, 5080, 3888, 580, 322, 1583, 3032, 657, 29918, 5080, 3888, 580, 1275, 1583, 3032, 16304, 29918, 5080, 3888, 29901, 13, 9651, 396, 3940, 29901, 6222, 1791, 9006, 8951, 304, 17749, 5912, 6284, 13, 9651, 1583, 3032, 26770, 29889, 6519, 29898, 1311, 3032, 5080, 5060, 9006, 29897, 13, 9651, 1583, 3032, 26770, 29889, 6519, 29898, 1311, 3032, 5080, 5060, 9006, 29897, 13, 13, 4706, 2821, 4352, 29898, 1311, 3032, 26770, 29897, 13, 13, 1678, 822, 903, 657, 29918, 18127, 29918, 29883, 5380, 403, 29898, 1311, 29897, 1599, 315, 5380, 403, 29901, 13, 4706, 736, 1583, 3032, 657, 29918, 29883, 5380, 403, 29898, 1311, 3032, 18127, 29897, 13, 13, 1678, 822, 903, 657, 29918, 29883, 5380, 403, 29898, 1311, 29892, 926, 29901, 938, 29897, 1599, 315, 5380, 403, 29901, 13, 4706, 565, 451, 1583, 3032, 29883, 5380, 1078, 470, 926, 1405, 7431, 29898, 1311, 3032, 29883, 5380, 1078, 1125, 13, 9651, 736, 6571, 13, 4706, 736, 1583, 3032, 29883, 5380, 1078, 29961, 1066, 448, 29871, 29896, 29962, 13, 13, 1678, 822, 903, 657, 29918, 8391, 29918, 29883, 5380, 1078, 29898, 1311, 29897, 1599, 315, 5380, 1078, 29901, 13, 4706, 565, 451, 1583, 3032, 8391, 29918, 29883, 5380, 1078, 29901, 13, 9651, 736, 518, 1311, 3032, 657, 29918, 18127, 29918, 29883, 5380, 403, 580, 13, 462, 1678, 4514, 565, 1583, 3032, 657, 29918, 18127, 29918, 29883, 5380, 403, 580, 1683, 5159, 13, 4706, 736, 518, 1311, 3032, 29883, 5380, 1078, 29961, 29916, 29962, 363, 921, 297, 1583, 3032, 8391, 29918, 29883, 5380, 1078, 29962, 13, 13, 1678, 822, 903, 2344, 29918, 1145, 568, 29898, 1311, 29897, 1599, 6213, 29901, 13, 4706, 565, 1583, 3032, 1145, 568, 29901, 13, 9651, 1583, 3032, 1145, 568, 29889, 2962, 29898, 1311, 3032, 4703, 29897, 13, 9651, 1583, 3032, 1145, 568, 29889, 265, 29918, 2344, 29898, 1311, 3032, 4703, 29897, 13, 4706, 1583, 3032, 11228, 1891, 353, 5852, 13, 4706, 1583, 3032, 5080, 3545, 353, 1583, 3032, 4703, 1839, 5080, 3545, 2033, 13, 4706, 1583, 3032, 5080, 2103, 353, 1583, 3032, 4703, 1839, 5080, 2103, 2033, 13, 13, 1678, 822, 903, 29887, 1624, 29918, 29883, 5380, 1078, 29898, 1311, 29897, 1599, 6213, 29901, 13, 4706, 1583, 3032, 8391, 29918, 29883, 5380, 1078, 353, 5159, 13, 4706, 565, 1583, 3032, 1145, 568, 29901, 13, 9651, 1583, 3032, 1145, 568, 29889, 29887, 1624, 29918, 29883, 5380, 1078, 29898, 1311, 3032, 4703, 29897, 13, 13, 1678, 822, 903, 2344, 29918, 18127, 29898, 1311, 29897, 1599, 6213, 29901, 13, 4706, 565, 1583, 3032, 4703, 1839, 276, 874, 287, 2033, 29901, 13, 9651, 1583, 3032, 11631, 29918, 517, 29918, 4230, 29918, 1220, 580, 13, 4706, 1683, 29901, 13, 9651, 1583, 3032, 11631, 29918, 517, 29918, 4102, 29918, 1220, 580, 13, 13, 1678, 822, 903, 11631, 29918, 517, 29918, 1066, 29898, 1311, 29892, 926, 29901, 938, 29897, 1599, 6213, 29901, 13, 4706, 1583, 3032, 26770, 29889, 4804, 877, 18127, 742, 926, 29892, 29871, 29900, 29897, 13, 4706, 1583, 3032, 18127, 353, 926, 13, 13, 4706, 565, 1583, 3032, 4703, 1839, 276, 874, 287, 2033, 29901, 13, 9651, 1583, 3032, 26770, 29889, 6519, 877, 8945, 29991, 22015, 1495, 13, 13, 1678, 822, 903, 11631, 29918, 517, 29918, 4622, 29918, 1220, 29898, 1311, 29897, 1599, 6213, 29901, 13, 4706, 565, 1583, 3032, 18127, 529, 7431, 29898, 1311, 3032, 29883, 5380, 1078, 1125, 13, 9651, 1583, 3032, 18127, 4619, 29871, 29896, 13, 13, 1678, 822, 903, 11631, 29918, 517, 29918, 16304, 29918, 1220, 29898, 1311, 29897, 1599, 6213, 29901, 13, 4706, 565, 1583, 3032, 18127, 6736, 29871, 29896, 29901, 13, 9651, 1583, 3032, 18127, 22361, 29871, 29896, 13, 13, 1678, 822, 903, 11631, 29918, 517, 29918, 4102, 29918, 1220, 29898, 1311, 29897, 1599, 6213, 29901, 13, 4706, 1583, 3032, 18127, 353, 29871, 29896, 13, 13, 1678, 822, 903, 11631, 29918, 517, 29918, 4230, 29918, 1220, 29898, 1311, 29897, 1599, 6213, 29901, 13, 4706, 1583, 3032, 18127, 353, 7431, 29898, 1311, 3032, 29883, 5380, 1078, 29897, 13, 13, 1678, 822, 903, 2962, 29918, 20404, 29898, 1311, 29892, 1820, 29901, 851, 29897, 1599, 6213, 29901, 13, 4706, 565, 1820, 297, 1583, 3032, 9346, 414, 29901, 13, 9651, 736, 13, 13, 4706, 565, 1820, 1275, 525, 5504, 29918, 29883, 5380, 1078, 2396, 13, 9651, 1583, 3032, 9346, 414, 29961, 1989, 29962, 353, 1583, 3032, 26770, 29889, 4804, 29898, 13, 18884, 525, 1145, 568, 29937, 20907, 29937, 29918, 2962, 29918, 5504, 29918, 29883, 5380, 1078, 29918, 20404, 742, 1583, 3032, 9721, 22230, 29897, 13, 4706, 25342, 1820, 1275, 525, 5504, 29918, 9040, 2396, 13, 9651, 1583, 3032, 9346, 414, 29961, 1989, 29962, 353, 1583, 3032, 26770, 29889, 4804, 29898, 13, 18884, 525, 1145, 568, 29937, 20907, 29937, 29918, 2962, 29918, 5504, 29918, 9040, 29918, 20404, 742, 1583, 3032, 9721, 22230, 29897, 13, 13, 1678, 822, 903, 9847, 29918, 20404, 29898, 1311, 29892, 1820, 29901, 851, 29897, 1599, 6213, 29901, 13, 4706, 565, 1820, 451, 297, 1583, 3032, 9346, 414, 29901, 13, 9651, 736, 13, 13, 4706, 1583, 3032, 26770, 29889, 4804, 877, 20404, 29918, 9847, 742, 1583, 3032, 9346, 414, 29961, 1989, 2314, 13, 13, 4706, 396, 3940, 29901, 2860, 12237, 29918, 9847, 338, 2000, 29892, 1583, 3032, 9346, 414, 1122, 367, 6206, 13, 4706, 565, 1820, 297, 1583, 3032, 9346, 414, 29901, 13, 9651, 1583, 3032, 9346, 414, 29889, 7323, 29898, 1989, 29897, 13, 13, 1678, 822, 903, 5451, 29918, 29888, 417, 1218, 29898, 1311, 29892, 6219, 29901, 851, 29897, 1599, 6213, 29901, 13, 4706, 396, 4803, 16526, 3474, 13, 4706, 565, 6219, 1275, 525, 29888, 417, 1218, 2396, 13, 9651, 1583, 3032, 26770, 29889, 4804, 29898, 13, 18884, 525, 29876, 26770, 29918, 3150, 29918, 5080, 742, 13, 18884, 1583, 3032, 26770, 29889, 4804, 877, 9721, 22230, 742, 14210, 5477, 5852, 29892, 426, 13, 462, 1678, 525, 22925, 2396, 525, 15204, 742, 13, 462, 1678, 525, 798, 2396, 1583, 3032, 4703, 1839, 5080, 798, 7464, 13, 462, 1678, 525, 1054, 2396, 1583, 3032, 4703, 1839, 5080, 1054, 7464, 13, 462, 1678, 525, 2103, 2396, 1583, 3032, 4703, 1839, 5080, 2103, 7464, 13, 462, 1678, 525, 3545, 2396, 1583, 3032, 4703, 1839, 5080, 3545, 7464, 13, 18884, 5615, 13, 4706, 25342, 6219, 1275, 525, 29888, 417, 1218, 29918, 22925, 29918, 18127, 2396, 13, 9651, 6496, 29918, 1066, 353, 313, 1311, 3032, 26770, 29889, 4804, 877, 29876, 26770, 29918, 5080, 29918, 657, 29918, 3283, 742, 29871, 29900, 9601, 29900, 29962, 718, 13, 462, 3986, 1583, 3032, 26770, 29889, 4804, 877, 5080, 1220, 1495, 448, 29871, 29896, 29897, 13, 9651, 565, 1583, 3032, 4703, 1839, 6921, 29918, 21476, 2033, 29901, 13, 18884, 3171, 353, 4236, 29898, 1311, 3032, 5080, 3545, 29892, 29871, 29896, 29897, 13, 18884, 2920, 353, 4236, 29898, 1311, 3032, 5080, 2103, 29892, 29871, 29896, 29897, 13, 9651, 1683, 29901, 13, 18884, 2920, 353, 1583, 3032, 4703, 1839, 5080, 2103, 2033, 13, 18884, 3171, 353, 1583, 3032, 4703, 1839, 5080, 3545, 2033, 13, 13, 9651, 565, 6496, 29918, 1066, 718, 3171, 718, 29871, 29941, 1405, 1583, 3032, 26770, 29889, 6768, 1839, 9012, 2033, 29901, 13, 18884, 17360, 353, 525, 23066, 29915, 13, 18884, 1948, 353, 29871, 29900, 13, 18884, 1583, 3032, 4703, 1839, 4572, 29918, 5080, 798, 2033, 353, 1948, 718, 6496, 29918, 1066, 13, 9651, 1683, 29901, 13, 18884, 17360, 353, 525, 29940, 29956, 29915, 13, 18884, 1948, 353, 29871, 29896, 13, 18884, 1583, 3032, 4703, 1839, 4572, 29918, 5080, 798, 2033, 353, 1948, 718, 3171, 718, 6496, 29918, 1066, 13, 9651, 1583, 3032, 26770, 29889, 4804, 29898, 13, 18884, 525, 29876, 26770, 29918, 3150, 29918, 5080, 742, 13, 18884, 1583, 3032, 26770, 29889, 4804, 877, 9721, 22230, 742, 14210, 5477, 5852, 29892, 426, 13, 462, 1678, 525, 22925, 2396, 525, 18127, 742, 13, 462, 1678, 525, 798, 2396, 1948, 29892, 13, 462, 1678, 525, 1054, 2396, 29871, 29900, 29892, 13, 462, 1678, 525, 2103, 2396, 2920, 29892, 13, 462, 1678, 525, 3545, 2396, 3171, 29892, 13, 462, 1678, 525, 25367, 2396, 17360, 29892, 13, 18884, 5615, 13, 4706, 25342, 6219, 1275, 525, 29888, 417, 1218, 29918, 22925, 29918, 7165, 2396, 13, 9651, 1583, 3032, 26770, 29889, 4804, 29898, 13, 18884, 525, 29876, 26770, 29918, 3150, 29918, 5080, 742, 13, 18884, 1583, 3032, 26770, 29889, 4804, 877, 9721, 22230, 742, 14210, 5477, 5852, 29892, 426, 13, 462, 1678, 525, 22925, 2396, 525, 5080, 742, 13, 462, 1678, 525, 798, 2396, 1583, 3032, 4703, 1839, 5080, 798, 7464, 13, 462, 1678, 525, 1054, 2396, 1583, 3032, 4703, 1839, 5080, 1054, 7464, 13, 462, 1678, 525, 2103, 2396, 1583, 3032, 4703, 1839, 5080, 2103, 7464, 13, 462, 1678, 525, 3545, 2396, 1583, 3032, 4703, 1839, 5080, 3545, 7464, 13, 18884, 5615, 13, 2 ]
racecar_gym/envs/scenarios.py
luigiberducci/racecar_gym
16
22518
from dataclasses import dataclass from typing import Dict from racecar_gym.bullet import load_world, load_vehicle from racecar_gym.tasks import Task, get_task from racecar_gym.core import World, Agent from .specs import ScenarioSpec, TaskSpec def task_from_spec(spec: TaskSpec) -> Task: task = get_task(spec.task_name) return task(**spec.params) @dataclass class MultiAgentScenario: world: World agents: Dict[str, Agent] @staticmethod def from_spec(path: str, rendering: bool = None) -> 'MultiAgentScenario': spec = ScenarioSpec() spec.load(path) if rendering: spec.world.rendering = rendering agents = dict([ (s.id, Agent(id=s.id, vehicle=load_vehicle(s.vehicle), task=task_from_spec(s.task))) for s in spec.agents ]) return MultiAgentScenario(world=load_world(spec.world, agents=list(agents.values())), agents=agents) @dataclass class SingleAgentScenario: world: World agent: Agent @staticmethod def from_spec(path: str, rendering: bool = None) -> 'SingleAgentScenario': spec = ScenarioSpec() spec.load(path) if rendering: spec.world.rendering = rendering agent_spec = spec.agents[0] agent = Agent(id=agent_spec.id, vehicle=load_vehicle(agent_spec.vehicle), task=task_from_spec(agent_spec.task)) return SingleAgentScenario(world=load_world(spec.world, agents=[agent]), agent=agent)
[ 1, 515, 848, 13203, 1053, 848, 1990, 13, 3166, 19229, 1053, 360, 919, 13, 13, 3166, 8175, 4287, 29918, 29887, 962, 29889, 18850, 1053, 2254, 29918, 11526, 29892, 2254, 29918, 345, 29882, 2512, 13, 3166, 8175, 4287, 29918, 29887, 962, 29889, 20673, 1053, 9330, 29892, 679, 29918, 7662, 13, 3166, 8175, 4287, 29918, 29887, 962, 29889, 3221, 1053, 2787, 29892, 28330, 13, 3166, 869, 5965, 2395, 1053, 2522, 24893, 10299, 29892, 9330, 10299, 13, 13, 1753, 3414, 29918, 3166, 29918, 6550, 29898, 6550, 29901, 9330, 10299, 29897, 1599, 9330, 29901, 13, 1678, 3414, 353, 679, 29918, 7662, 29898, 6550, 29889, 7662, 29918, 978, 29897, 13, 1678, 736, 3414, 29898, 1068, 6550, 29889, 7529, 29897, 13, 13, 13, 29992, 1272, 1990, 13, 1990, 14974, 19661, 4421, 24893, 29901, 13, 1678, 3186, 29901, 2787, 13, 1678, 19518, 29901, 360, 919, 29961, 710, 29892, 28330, 29962, 13, 13, 1678, 732, 7959, 5696, 13, 1678, 822, 515, 29918, 6550, 29898, 2084, 29901, 851, 29892, 15061, 29901, 6120, 353, 6213, 29897, 1599, 525, 15329, 19661, 4421, 24893, 2396, 13, 4706, 1580, 353, 2522, 24893, 10299, 580, 13, 4706, 1580, 29889, 1359, 29898, 2084, 29897, 13, 4706, 565, 15061, 29901, 13, 9651, 1580, 29889, 11526, 29889, 9482, 292, 353, 15061, 13, 4706, 19518, 353, 9657, 4197, 13, 9651, 313, 29879, 29889, 333, 29892, 28330, 29898, 333, 29922, 29879, 29889, 333, 29892, 19716, 29922, 1359, 29918, 345, 29882, 2512, 29898, 29879, 29889, 345, 29882, 2512, 511, 3414, 29922, 7662, 29918, 3166, 29918, 6550, 29898, 29879, 29889, 7662, 4961, 13, 9651, 363, 269, 297, 1580, 29889, 351, 1237, 13, 308, 2314, 13, 13, 4706, 736, 14974, 19661, 4421, 24893, 29898, 11526, 29922, 1359, 29918, 11526, 29898, 6550, 29889, 11526, 29892, 19518, 29922, 1761, 29898, 351, 1237, 29889, 5975, 3101, 511, 19518, 29922, 351, 1237, 29897, 13, 13, 13, 29992, 1272, 1990, 13, 1990, 16740, 19661, 4421, 24893, 29901, 13, 1678, 3186, 29901, 2787, 13, 1678, 10823, 29901, 28330, 13, 13, 1678, 732, 7959, 5696, 13, 1678, 822, 515, 29918, 6550, 29898, 2084, 29901, 851, 29892, 15061, 29901, 6120, 353, 6213, 29897, 1599, 525, 15771, 19661, 4421, 24893, 2396, 13, 4706, 1580, 353, 2522, 24893, 10299, 580, 13, 4706, 1580, 29889, 1359, 29898, 2084, 29897, 13, 4706, 565, 15061, 29901, 13, 9651, 1580, 29889, 11526, 29889, 9482, 292, 353, 15061, 13, 4706, 10823, 29918, 6550, 353, 1580, 29889, 351, 1237, 29961, 29900, 29962, 13, 4706, 10823, 353, 28330, 29898, 333, 29922, 14748, 29918, 6550, 29889, 333, 29892, 19716, 29922, 1359, 29918, 345, 29882, 2512, 29898, 14748, 29918, 6550, 29889, 345, 29882, 2512, 511, 3414, 29922, 7662, 29918, 3166, 29918, 6550, 29898, 14748, 29918, 6550, 29889, 7662, 876, 13, 13, 4706, 736, 16740, 19661, 4421, 24893, 29898, 11526, 29922, 1359, 29918, 11526, 29898, 6550, 29889, 11526, 29892, 19518, 11759, 14748, 11724, 10823, 29922, 14748, 29897, 13, 2 ]
src/pyrobot/habitat/base.py
cihuang123/pyrobot
2,150
15131
import numpy as np import math import pyrobot.utils.util as prutil import rospy import habitat_sim.agent as habAgent import habitat_sim.utils as habUtils from habitat_sim.agent.controls import ActuationSpec import habitat_sim.errors import quaternion from tf.transformations import euler_from_quaternion, euler_from_matrix class LoCoBotBase(object): """docstring for SimpleBase""" def __init__(self, configs, simulator): self.configs = configs self.sim = simulator.sim self.agent = self.sim.get_agent(self.configs.COMMON.SIMULATOR.DEFAULT_AGENT_ID) self.transform = None self.init_state = self.get_full_state() def execute_action(self, action_name, actuation): # actions = "turn_right" or "turn_left" or "move_forward" # returns a bool showing if collided or not return self._act(action_name, actuation) def get_full_state(self): # Returns habitat_sim.agent.AgentState return self.agent.get_state() def _rot_matrix(self, habitat_quat): quat_list = [habitat_quat.x, habitat_quat.y, habitat_quat.z, habitat_quat.w] return prutil.quat_to_rot_mat(quat_list) def get_state(self, state_type="odom"): # Returns (x, y, yaw) assert state_type == "odom", "Error: Only Odom state is available" cur_state = self.get_full_state() init_rotation = self._rot_matrix(self.init_state.rotation) # true position here refers to the relative position from # where `self.init_state` is treated as origin true_position = cur_state.position - self.init_state.position true_position = np.matmul(init_rotation.transpose(), true_position, dtype=np.float64) cur_rotation = self._rot_matrix(cur_state.rotation) cur_rotation = np.matmul(init_rotation.transpose(), cur_rotation, dtype=np.float64) (r, pitch, yaw) = euler_from_matrix(cur_rotation, axes="sxzy") # Habitat has y perpendicular to map where as ROS has z perpendicular # to the map. Where as x is same. # Here ROS_X = -1 * habitat_z and ROS_Y = -1*habitat_x return (-1 * true_position[2], -1 * true_position[0], yaw) def stop(self): raise NotImplementedError("Veclocity control is not supported in Habitat-Sim!!") def set_vel(self, fwd_speed, turn_speed, exe_time=1): raise NotImplementedError("Veclocity control is not supported in Habitat-Sim!!") def go_to_relative( self, xyt_position, use_map=False, close_loop=False, smooth=False ): """ Moves the robot to the robot to given goal state relative to its initial pose. :param xyt_position: The relative goal state of the form (x,y,t) :param use_map: When set to "True", ensures that controler is using only free space on the map to move the robot. :param close_loop: When set to "True", ensures that controler is operating in open loop by taking account of odometry. :param smooth: When set to "True", ensures that the motion leading to the goal is a smooth one. :type xyt_position: list :type use_map: bool :type close_loop: bool :type smooth: bool :return: True if successful; False otherwise (timeout, etc.) :rtype: bool """ try: if use_map: raise NotImplementedError( "Using map feature is not yet supported for Habitat-Sim" ) if close_loop: raise NotImplementedError( "Closed-loop postion control is not supported in Habitat-Sim!" ) if smooth: raise NotImplementedError( "Smooth position control feature is not yet for Habitat-Sim" ) except Exception as error: print(error) return False (cur_x, cur_y, cur_yaw) = self.get_state() abs_yaw = cur_yaw + xyt_position[2] return self._go_to_relative_pose(xyt_position[0], xyt_position[1], abs_yaw) def go_to_absolute( self, xyt_position, use_map=False, close_loop=False, smooth=False ): """ Moves the robot to the robot to given goal state in the world frame. :param xyt_position: The goal state of the form (x,y,t) in the world (map) frame. :param use_map: When set to "True", ensures that controler is using only free space on the map to move the robot. :param close_loop: When set to "True", ensures that controler is operating in open loop by taking account of odometry. :param smooth: When set to "True", ensures that the motion leading to the goal is a smooth one. :type xyt_position: list :type use_map: bool :type close_loop: bool :type smooth: bool :return: True if successful; False otherwise (timeout, etc.) :rtype: bool """ try: if use_map: raise NotImplementedError( "Using map feature is not yet supported for Habitat-Sim" ) if close_loop: raise NotImplementedError( "Closed-loop postion control is not supported in Habitat-Sim!" ) if smooth: raise NotImplementedError( "Smooth position control feature is not yet for Habitat-Sim" ) except Exception as error: print(error) return False (cur_x, cur_y, cur_yaw) = self.get_state() rel_X = xyt_position[0] - cur_x rel_Y = xyt_position[1] - cur_y abs_yaw = xyt_position[2] # convert rel_X & rel_Y from global frame to current frame R = np.array([[np.cos(cur_yaw), np.sin(cur_yaw)], [-np.sin(cur_yaw), np.cos(cur_yaw)]]) rel_x, rel_y = np.matmul(R, np.array([rel_X, rel_Y]).reshape(-1,1)) return self._go_to_relative_pose(rel_x[0], rel_y[0], abs_yaw) def _act(self, action_name, actuation): """Take the action specified by action_id :param action_id: ID of the action. Retreives the action from `agent_config.action_space <AgentConfiguration.action_space>` :return: Whether or not the action taken resulted in a collision """ did_collide = False act_spec = ActuationSpec(actuation) did_collide = self.agent.controls.action( self.agent.scene_node, action_name, act_spec, apply_filter=True ) return did_collide def _go_to_relative_pose(self, rel_x, rel_y, abs_yaw): # clip relative movements beyond 10 micrometer precision # this is done to improve determinism, as habitat-sim doesn't # seem to precisely move the robot beyond sub milimeter precision anyways if abs(rel_x) < 1e-5: rel_x = 0 if abs(rel_y) < 1e-5: rel_y = 0 if math.sqrt(rel_x ** 2 + rel_y ** 2) > 0.0: # rotate to point to (x, y) point action_name = "turn_left" if rel_y < 0.0: action_name = "turn_right" v1 = np.asarray([1, 0], dtype=np.float64) v2 = np.asarray([rel_x, rel_y], dtype=np.float64) cosine_angle = np.dot(v1, v2) / (np.linalg.norm(v1) * np.linalg.norm(v2)) angle = np.arccos(cosine_angle) did_collide = self._act(action_name, math.degrees(angle)) if did_collide: print("Error: Collision accured while 1st rotating!") return False # move to (x,y) point did_collide = self._act("move_forward", math.sqrt(rel_x ** 2 + rel_y ** 2)) if did_collide: print("Error: Collision accured while moving straight!") return False # rotate to match the final yaw! (cur_x, cur_y, cur_yaw) = self.get_state() rel_yaw = abs_yaw - cur_yaw # clip to micro-degree precision to preserve determinism if abs(rel_yaw) < 1e-4: rel_yaw = 0 action_name = "turn_left" if rel_yaw < 0.0: action_name = "turn_right" rel_yaw *= -1 did_collide = self._act(action_name, math.degrees(rel_yaw)) if did_collide: print("Error: Collision accured while rotating!") return False return True def track_trajectory(self, states, controls, close_loop): """ State trajectory that the robot should track. :param states: sequence of (x,y,t) states that the robot should track. :param controls: optionally specify control sequence as well. :param close_loop: whether to close loop on the computed control sequence or not. :type states: list :type controls: list :type close_loop: bool :return: True if successful; False otherwise (timeout, etc.) :rtype: bool """ raise NotImplementedError
[ 1, 1053, 12655, 408, 7442, 13, 5215, 5844, 13, 5215, 11451, 307, 7451, 29889, 13239, 29889, 4422, 408, 544, 4422, 13, 5215, 696, 1028, 29891, 13, 5215, 17570, 29918, 3601, 29889, 14748, 408, 2299, 19661, 13, 5215, 17570, 29918, 3601, 29889, 13239, 408, 2299, 12177, 13, 3166, 17570, 29918, 3601, 29889, 14748, 29889, 26255, 1053, 3185, 29884, 362, 10299, 13, 5215, 17570, 29918, 3601, 29889, 12523, 13, 13, 5215, 439, 25744, 291, 13, 3166, 15886, 29889, 9067, 800, 1053, 321, 8584, 29918, 3166, 29918, 339, 25744, 291, 29892, 321, 8584, 29918, 3166, 29918, 5344, 13, 13, 13, 1990, 4309, 7967, 29933, 327, 5160, 29898, 3318, 1125, 13, 1678, 9995, 1514, 1807, 363, 12545, 5160, 15945, 29908, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 2295, 29879, 29892, 1027, 9183, 1125, 13, 4706, 1583, 29889, 2917, 29879, 353, 2295, 29879, 13, 4706, 1583, 29889, 3601, 353, 1027, 9183, 29889, 3601, 13, 4706, 1583, 29889, 14748, 353, 1583, 29889, 3601, 29889, 657, 29918, 14748, 29898, 1311, 29889, 2917, 29879, 29889, 3217, 7428, 1164, 29889, 5425, 29924, 13309, 1299, 1955, 29889, 23397, 29918, 10051, 3919, 29918, 1367, 29897, 13, 13, 4706, 1583, 29889, 9067, 353, 6213, 13, 4706, 1583, 29889, 2344, 29918, 3859, 353, 1583, 29889, 657, 29918, 8159, 29918, 3859, 580, 13, 13, 1678, 822, 6222, 29918, 2467, 29898, 1311, 29892, 3158, 29918, 978, 29892, 20331, 362, 1125, 13, 4706, 396, 8820, 353, 376, 685, 29918, 1266, 29908, 470, 376, 685, 29918, 1563, 29908, 470, 376, 11631, 29918, 11333, 29908, 13, 4706, 396, 3639, 263, 6120, 6445, 565, 5321, 2618, 470, 451, 13, 13, 4706, 736, 1583, 3032, 627, 29898, 2467, 29918, 978, 29892, 20331, 362, 29897, 13, 13, 1678, 822, 679, 29918, 8159, 29918, 3859, 29898, 1311, 1125, 13, 4706, 396, 16969, 17570, 29918, 3601, 29889, 14748, 29889, 19661, 2792, 13, 4706, 736, 1583, 29889, 14748, 29889, 657, 29918, 3859, 580, 13, 13, 1678, 822, 903, 5450, 29918, 5344, 29898, 1311, 29892, 17570, 29918, 339, 271, 1125, 13, 4706, 439, 271, 29918, 1761, 353, 518, 7308, 7366, 29918, 339, 271, 29889, 29916, 29892, 17570, 29918, 339, 271, 29889, 29891, 29892, 17570, 29918, 339, 271, 29889, 29920, 29892, 17570, 29918, 339, 271, 29889, 29893, 29962, 13, 4706, 736, 544, 4422, 29889, 339, 271, 29918, 517, 29918, 5450, 29918, 2922, 29898, 339, 271, 29918, 1761, 29897, 13, 13, 1678, 822, 679, 29918, 3859, 29898, 1311, 29892, 2106, 29918, 1853, 543, 397, 290, 29908, 1125, 13, 4706, 396, 16969, 313, 29916, 29892, 343, 29892, 343, 1450, 29897, 13, 4706, 4974, 2106, 29918, 1853, 1275, 376, 397, 290, 613, 376, 2392, 29901, 9333, 438, 3129, 2106, 338, 3625, 29908, 13, 4706, 3151, 29918, 3859, 353, 1583, 29889, 657, 29918, 8159, 29918, 3859, 580, 13, 13, 4706, 2069, 29918, 5450, 362, 353, 1583, 3032, 5450, 29918, 5344, 29898, 1311, 29889, 2344, 29918, 3859, 29889, 5450, 362, 29897, 13, 13, 4706, 396, 1565, 2602, 1244, 14637, 304, 278, 6198, 2602, 515, 13, 4706, 396, 988, 421, 1311, 29889, 2344, 29918, 3859, 29952, 338, 14914, 408, 3978, 13, 4706, 1565, 29918, 3283, 353, 3151, 29918, 3859, 29889, 3283, 448, 1583, 29889, 2344, 29918, 3859, 29889, 3283, 13, 4706, 1565, 29918, 3283, 353, 7442, 29889, 2922, 16109, 29898, 2344, 29918, 5450, 362, 29889, 3286, 4220, 3285, 1565, 29918, 3283, 29892, 26688, 29922, 9302, 29889, 7411, 29953, 29946, 29897, 13, 13, 4706, 3151, 29918, 5450, 362, 353, 1583, 3032, 5450, 29918, 5344, 29898, 2764, 29918, 3859, 29889, 5450, 362, 29897, 13, 4706, 3151, 29918, 5450, 362, 353, 7442, 29889, 2922, 16109, 29898, 2344, 29918, 5450, 362, 29889, 3286, 4220, 3285, 3151, 29918, 5450, 362, 29892, 26688, 29922, 9302, 29889, 7411, 29953, 29946, 29897, 13, 13, 4706, 313, 29878, 29892, 15905, 29892, 343, 1450, 29897, 353, 321, 8584, 29918, 3166, 29918, 5344, 29898, 2764, 29918, 5450, 362, 29892, 27815, 543, 29879, 29916, 1537, 1159, 13, 4706, 396, 15221, 7366, 756, 343, 639, 14081, 16311, 304, 2910, 988, 408, 390, 3267, 756, 503, 639, 14081, 16311, 13, 4706, 396, 304, 278, 2910, 29889, 6804, 408, 921, 338, 1021, 29889, 13, 4706, 396, 2266, 390, 3267, 29918, 29990, 353, 448, 29896, 334, 17570, 29918, 29920, 322, 390, 3267, 29918, 29979, 353, 448, 29896, 29930, 7308, 7366, 29918, 29916, 13, 4706, 736, 8521, 29896, 334, 1565, 29918, 3283, 29961, 29906, 1402, 448, 29896, 334, 1565, 29918, 3283, 29961, 29900, 1402, 343, 1450, 29897, 13, 13, 1678, 822, 5040, 29898, 1311, 1125, 13, 4706, 12020, 2216, 1888, 2037, 287, 2392, 703, 25987, 2029, 537, 2761, 338, 451, 6969, 297, 15221, 7366, 29899, 8942, 6824, 1159, 13, 13, 1678, 822, 731, 29918, 955, 29898, 1311, 29892, 285, 9970, 29918, 19322, 29892, 2507, 29918, 19322, 29892, 429, 29872, 29918, 2230, 29922, 29896, 1125, 13, 4706, 12020, 2216, 1888, 2037, 287, 2392, 703, 25987, 2029, 537, 2761, 338, 451, 6969, 297, 15221, 7366, 29899, 8942, 6824, 1159, 13, 13, 1678, 822, 748, 29918, 517, 29918, 22925, 29898, 13, 4706, 1583, 29892, 921, 3637, 29918, 3283, 29892, 671, 29918, 1958, 29922, 8824, 29892, 3802, 29918, 7888, 29922, 8824, 29892, 10597, 29922, 8824, 13, 268, 1125, 13, 4706, 9995, 13, 12, 12, 29924, 586, 267, 278, 19964, 304, 278, 19964, 304, 2183, 13, 12, 12, 28111, 2106, 6198, 304, 967, 2847, 18593, 29889, 13, 13, 12, 12, 29901, 3207, 921, 3637, 29918, 3283, 29901, 450, 29871, 6198, 7306, 2106, 310, 278, 883, 313, 29916, 29892, 29891, 29892, 29873, 29897, 13, 12, 12, 29901, 3207, 671, 29918, 1958, 29901, 1932, 731, 304, 376, 5574, 613, 5662, 1973, 393, 8239, 1358, 338, 13, 12, 12, 18884, 773, 871, 3889, 2913, 373, 278, 2910, 304, 4337, 278, 19964, 29889, 13, 12, 12, 29901, 3207, 3802, 29918, 7888, 29901, 1932, 731, 304, 376, 5574, 613, 5662, 1973, 393, 8239, 1358, 338, 13, 12, 12, 462, 259, 13598, 297, 1722, 2425, 491, 13, 12, 12, 462, 259, 5622, 3633, 310, 2413, 7843, 29889, 13, 12, 12, 29901, 3207, 10597, 29901, 1932, 731, 304, 376, 5574, 613, 5662, 1973, 393, 278, 10884, 13, 12, 12, 1669, 8236, 304, 278, 7306, 338, 263, 10597, 697, 29889, 13, 13, 12, 12, 29901, 1853, 921, 3637, 29918, 3283, 29901, 1051, 13, 12, 12, 29901, 1853, 671, 29918, 1958, 29901, 6120, 13, 12, 12, 29901, 1853, 3802, 29918, 7888, 29901, 6120, 13, 12, 12, 29901, 1853, 10597, 29901, 6120, 13, 13, 12, 12, 29901, 2457, 29901, 5852, 565, 9150, 29936, 7700, 6467, 313, 15619, 29892, 2992, 1846, 13, 12, 12, 29901, 29878, 1853, 29901, 6120, 13, 12, 12, 15945, 29908, 13, 13, 4706, 1018, 29901, 13, 9651, 565, 671, 29918, 1958, 29901, 13, 18884, 12020, 2216, 1888, 2037, 287, 2392, 29898, 13, 462, 1678, 376, 15156, 2910, 4682, 338, 451, 3447, 6969, 363, 15221, 7366, 29899, 8942, 29908, 13, 18884, 1723, 13, 9651, 565, 3802, 29918, 7888, 29901, 13, 18884, 12020, 2216, 1888, 2037, 287, 2392, 29898, 13, 462, 1678, 376, 6821, 2662, 29899, 7888, 1400, 291, 2761, 338, 451, 6969, 297, 15221, 7366, 29899, 8942, 3850, 13, 18884, 1723, 13, 9651, 565, 10597, 29901, 13, 18884, 12020, 2216, 1888, 2037, 287, 2392, 29898, 13, 462, 1678, 376, 29903, 4346, 720, 2602, 2761, 4682, 338, 451, 3447, 363, 15221, 7366, 29899, 8942, 29908, 13, 18884, 1723, 13, 4706, 5174, 8960, 408, 1059, 29901, 13, 9651, 1596, 29898, 2704, 29897, 13, 9651, 736, 7700, 13, 13, 4706, 313, 2764, 29918, 29916, 29892, 3151, 29918, 29891, 29892, 3151, 29918, 29891, 1450, 29897, 353, 1583, 29889, 657, 29918, 3859, 580, 13, 4706, 6425, 29918, 29891, 1450, 353, 3151, 29918, 29891, 1450, 718, 921, 3637, 29918, 3283, 29961, 29906, 29962, 13, 4706, 736, 1583, 3032, 1484, 29918, 517, 29918, 22925, 29918, 4220, 29898, 3594, 29873, 29918, 3283, 29961, 29900, 1402, 921, 3637, 29918, 3283, 29961, 29896, 1402, 6425, 29918, 29891, 1450, 29897, 13, 13, 1678, 822, 748, 29918, 517, 29918, 23552, 29898, 13, 4706, 1583, 29892, 921, 3637, 29918, 3283, 29892, 671, 29918, 1958, 29922, 8824, 29892, 3802, 29918, 7888, 29922, 8824, 29892, 10597, 29922, 8824, 13, 268, 1125, 13, 4706, 9995, 13, 12, 12, 29924, 586, 267, 278, 19964, 304, 278, 19964, 304, 2183, 7306, 2106, 297, 278, 3186, 3515, 29889, 13, 13, 12, 12, 29901, 3207, 921, 3637, 29918, 3283, 29901, 450, 7306, 2106, 310, 278, 883, 313, 29916, 29892, 29891, 29892, 29873, 29897, 13, 12, 12, 462, 268, 297, 278, 3186, 313, 1958, 29897, 3515, 29889, 13, 12, 12, 29901, 3207, 671, 29918, 1958, 29901, 1932, 731, 304, 376, 5574, 613, 5662, 1973, 393, 8239, 1358, 338, 773, 13, 12, 12, 18884, 871, 3889, 2913, 373, 278, 2910, 304, 4337, 278, 19964, 29889, 13, 12, 12, 29901, 3207, 3802, 29918, 7888, 29901, 1932, 731, 304, 376, 5574, 613, 5662, 1973, 393, 8239, 1358, 338, 13, 12, 12, 462, 259, 13598, 297, 1722, 2425, 491, 13, 12, 12, 462, 259, 5622, 3633, 310, 2413, 7843, 29889, 13, 12, 12, 29901, 3207, 10597, 29901, 1932, 731, 304, 376, 5574, 613, 5662, 1973, 393, 278, 10884, 13, 12, 12, 1669, 8236, 304, 278, 7306, 338, 263, 10597, 697, 29889, 13, 13, 12, 12, 29901, 1853, 921, 3637, 29918, 3283, 29901, 1051, 13, 12, 12, 29901, 1853, 671, 29918, 1958, 29901, 6120, 13, 12, 12, 29901, 1853, 3802, 29918, 7888, 29901, 6120, 13, 12, 12, 29901, 1853, 10597, 29901, 6120, 13, 13, 12, 12, 29901, 2457, 29901, 5852, 565, 9150, 29936, 7700, 6467, 313, 15619, 29892, 2992, 1846, 13, 12, 12, 29901, 29878, 1853, 29901, 6120, 13, 12, 12, 15945, 29908, 13, 13, 4706, 1018, 29901, 13, 9651, 565, 671, 29918, 1958, 29901, 13, 18884, 12020, 2216, 1888, 2037, 287, 2392, 29898, 13, 462, 1678, 376, 15156, 2910, 4682, 338, 451, 3447, 6969, 363, 15221, 7366, 29899, 8942, 29908, 13, 18884, 1723, 13, 9651, 565, 3802, 29918, 7888, 29901, 13, 18884, 12020, 2216, 1888, 2037, 287, 2392, 29898, 13, 462, 1678, 376, 6821, 2662, 29899, 7888, 1400, 291, 2761, 338, 451, 6969, 297, 15221, 7366, 29899, 8942, 3850, 13, 18884, 1723, 13, 9651, 565, 10597, 29901, 13, 18884, 12020, 2216, 1888, 2037, 287, 2392, 29898, 13, 462, 1678, 376, 29903, 4346, 720, 2602, 2761, 4682, 338, 451, 3447, 363, 15221, 7366, 29899, 8942, 29908, 13, 18884, 1723, 13, 4706, 5174, 8960, 408, 1059, 29901, 13, 9651, 1596, 29898, 2704, 29897, 13, 9651, 736, 7700, 13, 13, 4706, 313, 2764, 29918, 29916, 29892, 3151, 29918, 29891, 29892, 3151, 29918, 29891, 1450, 29897, 353, 1583, 29889, 657, 29918, 3859, 580, 13, 4706, 1104, 29918, 29990, 353, 921, 3637, 29918, 3283, 29961, 29900, 29962, 448, 3151, 29918, 29916, 13, 4706, 1104, 29918, 29979, 353, 921, 3637, 29918, 3283, 29961, 29896, 29962, 448, 3151, 29918, 29891, 13, 4706, 6425, 29918, 29891, 1450, 353, 921, 3637, 29918, 3283, 29961, 29906, 29962, 13, 4706, 396, 3588, 1104, 29918, 29990, 669, 1104, 29918, 29979, 515, 5534, 3515, 304, 29871, 1857, 3515, 13, 4706, 390, 353, 7442, 29889, 2378, 4197, 29961, 9302, 29889, 3944, 29898, 2764, 29918, 29891, 1450, 511, 7442, 29889, 5223, 29898, 2764, 29918, 29891, 1450, 29897, 1402, 13, 462, 418, 21069, 9302, 29889, 5223, 29898, 2764, 29918, 29891, 1450, 511, 7442, 29889, 3944, 29898, 2764, 29918, 29891, 1450, 4638, 2314, 13, 4706, 1104, 29918, 29916, 29892, 1104, 29918, 29891, 353, 7442, 29889, 2922, 16109, 29898, 29934, 29892, 7442, 29889, 2378, 4197, 2674, 29918, 29990, 29892, 1104, 29918, 29979, 14664, 690, 14443, 6278, 29896, 29892, 29896, 876, 13, 4706, 736, 1583, 3032, 1484, 29918, 517, 29918, 22925, 29918, 4220, 29898, 2674, 29918, 29916, 29961, 29900, 1402, 1104, 29918, 29891, 29961, 29900, 1402, 6425, 29918, 29891, 1450, 29897, 13, 13, 1678, 822, 903, 627, 29898, 1311, 29892, 3158, 29918, 978, 29892, 20331, 362, 1125, 13, 4706, 9995, 26772, 278, 3158, 6790, 491, 3158, 29918, 333, 13, 13, 12, 12, 29901, 3207, 3158, 29918, 333, 29901, 3553, 310, 278, 3158, 29889, 4649, 276, 3145, 278, 3158, 515, 13, 12, 12, 1678, 421, 14748, 29918, 2917, 29889, 2467, 29918, 3493, 529, 19661, 8614, 29889, 2467, 29918, 3493, 13885, 13, 12, 12, 29901, 2457, 29901, 26460, 470, 451, 278, 3158, 4586, 20601, 297, 263, 22369, 13, 12, 12, 15945, 29908, 13, 4706, 1258, 29918, 1054, 7459, 353, 7700, 13, 4706, 1044, 29918, 6550, 353, 3185, 29884, 362, 10299, 29898, 627, 29884, 362, 29897, 13, 4706, 1258, 29918, 1054, 7459, 353, 1583, 29889, 14748, 29889, 26255, 29889, 2467, 29898, 13, 9651, 1583, 29889, 14748, 29889, 24645, 29918, 3177, 29892, 3158, 29918, 978, 29892, 1044, 29918, 6550, 29892, 3394, 29918, 4572, 29922, 5574, 13, 4706, 1723, 13, 13, 4706, 736, 1258, 29918, 1054, 7459, 13, 13, 1678, 822, 903, 1484, 29918, 517, 29918, 22925, 29918, 4220, 29898, 1311, 29892, 1104, 29918, 29916, 29892, 1104, 29918, 29891, 29892, 6425, 29918, 29891, 1450, 1125, 13, 4706, 396, 20102, 6198, 24147, 8724, 29871, 29896, 29900, 20710, 456, 1308, 16716, 13, 4706, 396, 445, 338, 2309, 304, 11157, 11806, 1608, 29892, 408, 17570, 29899, 3601, 1838, 29915, 29873, 13, 4706, 396, 2833, 304, 17503, 4337, 278, 19964, 8724, 1014, 2316, 14772, 16716, 738, 1994, 13, 4706, 565, 6425, 29898, 2674, 29918, 29916, 29897, 529, 29871, 29896, 29872, 29899, 29945, 29901, 13, 9651, 1104, 29918, 29916, 353, 29871, 29900, 13, 4706, 565, 6425, 29898, 2674, 29918, 29891, 29897, 529, 29871, 29896, 29872, 29899, 29945, 29901, 13, 9651, 1104, 29918, 29891, 353, 29871, 29900, 13, 13, 4706, 565, 5844, 29889, 3676, 29898, 2674, 29918, 29916, 3579, 29871, 29906, 718, 1104, 29918, 29891, 3579, 29871, 29906, 29897, 1405, 29871, 29900, 29889, 29900, 29901, 13, 9651, 396, 16734, 304, 1298, 304, 313, 29916, 29892, 343, 29897, 1298, 13, 9651, 3158, 29918, 978, 353, 376, 685, 29918, 1563, 29908, 13, 9651, 565, 1104, 29918, 29891, 529, 29871, 29900, 29889, 29900, 29901, 13, 18884, 3158, 29918, 978, 353, 376, 685, 29918, 1266, 29908, 13, 13, 9651, 325, 29896, 353, 7442, 29889, 294, 2378, 4197, 29896, 29892, 29871, 29900, 1402, 26688, 29922, 9302, 29889, 7411, 29953, 29946, 29897, 13, 9651, 325, 29906, 353, 7442, 29889, 294, 2378, 4197, 2674, 29918, 29916, 29892, 1104, 29918, 29891, 1402, 26688, 29922, 9302, 29889, 7411, 29953, 29946, 29897, 13, 9651, 6776, 457, 29918, 2521, 353, 7442, 29889, 6333, 29898, 29894, 29896, 29892, 325, 29906, 29897, 847, 313, 9302, 29889, 29880, 979, 29887, 29889, 12324, 29898, 29894, 29896, 29897, 334, 7442, 29889, 29880, 979, 29887, 29889, 12324, 29898, 29894, 29906, 876, 13, 9651, 10696, 353, 7442, 29889, 279, 617, 359, 29898, 3944, 457, 29918, 2521, 29897, 13, 13, 9651, 1258, 29918, 1054, 7459, 353, 1583, 3032, 627, 29898, 2467, 29918, 978, 29892, 5844, 29889, 311, 7979, 267, 29898, 2521, 876, 13, 13, 9651, 565, 1258, 29918, 1054, 7459, 29901, 13, 18884, 1596, 703, 2392, 29901, 13435, 2459, 1035, 2955, 1550, 29871, 29896, 303, 5731, 1218, 29991, 1159, 13, 18884, 736, 7700, 13, 13, 9651, 396, 4337, 304, 313, 29916, 29892, 29891, 29897, 1298, 13, 9651, 1258, 29918, 1054, 7459, 353, 1583, 3032, 627, 703, 11631, 29918, 11333, 613, 5844, 29889, 3676, 29898, 2674, 29918, 29916, 3579, 29871, 29906, 718, 1104, 29918, 29891, 3579, 29871, 29906, 876, 13, 9651, 565, 1258, 29918, 1054, 7459, 29901, 13, 18884, 1596, 703, 2392, 29901, 13435, 2459, 1035, 2955, 1550, 8401, 7812, 29991, 1159, 13, 18884, 736, 7700, 13, 4706, 396, 16734, 304, 1993, 278, 2186, 343, 1450, 29991, 13, 4706, 313, 2764, 29918, 29916, 29892, 3151, 29918, 29891, 29892, 3151, 29918, 29891, 1450, 29897, 353, 1583, 29889, 657, 29918, 3859, 580, 13, 4706, 1104, 29918, 29891, 1450, 353, 6425, 29918, 29891, 1450, 448, 3151, 29918, 29891, 1450, 13, 13, 4706, 396, 20102, 304, 9200, 29899, 12163, 929, 16716, 304, 19905, 11806, 1608, 13, 4706, 565, 6425, 29898, 2674, 29918, 29891, 1450, 29897, 529, 29871, 29896, 29872, 29899, 29946, 29901, 13, 9651, 1104, 29918, 29891, 1450, 353, 29871, 29900, 13, 13, 4706, 3158, 29918, 978, 353, 376, 685, 29918, 1563, 29908, 13, 4706, 565, 1104, 29918, 29891, 1450, 529, 29871, 29900, 29889, 29900, 29901, 13, 9651, 3158, 29918, 978, 353, 376, 685, 29918, 1266, 29908, 13, 9651, 1104, 29918, 29891, 1450, 334, 29922, 448, 29896, 13, 13, 4706, 1258, 29918, 1054, 7459, 353, 1583, 3032, 627, 29898, 2467, 29918, 978, 29892, 5844, 29889, 311, 7979, 267, 29898, 2674, 29918, 29891, 1450, 876, 13, 4706, 565, 1258, 29918, 1054, 7459, 29901, 13, 9651, 1596, 703, 2392, 29901, 13435, 2459, 1035, 2955, 1550, 5731, 1218, 29991, 1159, 13, 9651, 736, 7700, 13, 13, 4706, 736, 5852, 13, 13, 1678, 822, 5702, 29918, 3018, 622, 706, 29898, 1311, 29892, 5922, 29892, 11761, 29892, 3802, 29918, 7888, 1125, 13, 4706, 9995, 13, 12, 12, 2792, 23324, 706, 393, 278, 19964, 881, 5702, 29889, 13, 13, 12, 12, 29901, 3207, 5922, 29901, 5665, 310, 313, 29916, 29892, 29891, 29892, 29873, 29897, 5922, 393, 278, 19964, 881, 5702, 29889, 13, 12, 12, 29901, 3207, 11761, 29901, 2984, 635, 6084, 2761, 5665, 408, 1532, 29889, 13, 12, 12, 29901, 3207, 3802, 29918, 7888, 29901, 3692, 304, 3802, 2425, 373, 278, 13, 12, 12, 462, 259, 15712, 2761, 5665, 470, 451, 29889, 13, 13, 12, 12, 29901, 1853, 5922, 29901, 1051, 13, 12, 12, 29901, 1853, 11761, 29901, 1051, 13, 12, 12, 29901, 1853, 3802, 29918, 7888, 29901, 6120, 13, 13, 12, 12, 29901, 2457, 29901, 5852, 565, 9150, 29936, 7700, 6467, 313, 15619, 29892, 2992, 1846, 13, 12, 12, 29901, 29878, 1853, 29901, 6120, 13, 12, 12, 15945, 29908, 13, 4706, 12020, 2216, 1888, 2037, 287, 2392, 13, 2 ]
chowkidar/graphql/view.py
aswinshenoy/chowkidar-ariadne
1
87042
<gh_stars>1-10 from http.cookies import SimpleCookie from typing import Optional, Callable, Any from channels.db import database_sync_to_async from django.contrib.auth.models import AnonymousUser from django.http import HttpRequest, HttpResponseBadRequest from django.utils.decorators import method_decorator from django.views.decorators.csrf import csrf_exempt from django.contrib.auth import get_user_model from ariadne.asgi import GraphQL from ariadne.contrib.django.views import GraphQLView as AriadneView from ariadne.exceptions import HttpBadRequestError from ariadne.types import ContextValue from ..auth import respond_handling_authentication from ..auth.verify import resolve_user_from_request, resolve_user_from_tokens User = get_user_model() class GraphQLResolverContext: def __init__(self, request, user=None): self.request = request self.user = user if user else AnonymousUser @method_decorator(csrf_exempt, name="dispatch") class GraphQLView(AriadneView): def post( self, request: HttpRequest, *args, **kwargs ): if not self.schema: raise ValueError("GraphQLView was initialized without schema.") try: data = self.extract_data_from_request(request) except HttpBadRequestError as error: return HttpResponseBadRequest(error.message) success, result = self.execute_query(request, data) status_code = 200 if success else 400 return respond_handling_authentication(request=request, result=result, status_code=status_code) @staticmethod def get_context_for_request(request: HttpRequest) -> Optional[ContextValue]: user = resolve_user_from_request(request) return GraphQLResolverContext(request=request, user=user) # This is an ASGI2 compatibility class so that we can use ariadne subscriptions with channels. # Once channels supports ASGI3 this class can go away: # https://github.com/mirumee/ariadne/issues/210 class AuthenticatedChannel(GraphQL): def __call__(self, scope) -> Callable: self.scope = scope async def handle(receive, send): await super(AuthenticatedChannel, self).__call__(scope, receive, send) return handle @database_sync_to_async def resolve_user(self, cookie): return resolve_user_from_tokens( token=cookie['JWT_TOKEN'].value if 'JWT_TOKEN' in cookie else None, refreshToken=cookie['JWT_REFRESH_TOKEN'].value if 'JWT_REFRESH_TOKEN' in cookie else None ) async def get_context_for_request(self, request: Any) -> Any: headers = dict(self.scope['headers']) user = AnonymousUser() if b'cookie' in headers: cookie = SimpleCookie() cookie.load(str(headers[b'cookie'])) user = await self.resolve_user(cookie) if user is None: user = AnonymousUser() return {"request": request, "user": user} __all__ = [ 'GraphQLView', 'AuthenticatedChannel' ]
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 3166, 1732, 29889, 15108, 583, 1053, 12545, 24914, 13, 3166, 19229, 1053, 28379, 29892, 8251, 519, 29892, 3139, 13, 13, 3166, 18196, 29889, 2585, 1053, 2566, 29918, 16593, 29918, 517, 29918, 12674, 13, 3166, 9557, 29889, 21570, 29889, 5150, 29889, 9794, 1053, 530, 11428, 2659, 13, 3166, 9557, 29889, 1124, 1053, 9056, 3089, 29892, 9056, 5103, 22050, 3089, 13, 3166, 9557, 29889, 13239, 29889, 19557, 4097, 1053, 1158, 29918, 19557, 1061, 13, 3166, 9557, 29889, 7406, 29889, 19557, 4097, 29889, 2395, 9600, 1053, 5939, 9600, 29918, 735, 3456, 13, 3166, 9557, 29889, 21570, 29889, 5150, 1053, 679, 29918, 1792, 29918, 4299, 13, 13, 3166, 263, 374, 328, 484, 29889, 294, 3146, 1053, 12367, 2239, 13, 3166, 263, 374, 328, 484, 29889, 21570, 29889, 14095, 29889, 7406, 1053, 12367, 2239, 1043, 408, 25775, 328, 484, 1043, 13, 3166, 263, 374, 328, 484, 29889, 11739, 29879, 1053, 9056, 22050, 3089, 2392, 13, 13, 3166, 263, 374, 328, 484, 29889, 8768, 1053, 15228, 1917, 13, 13, 3166, 6317, 5150, 1053, 10049, 29918, 3179, 1847, 29918, 23055, 13, 3166, 6317, 5150, 29889, 27902, 1053, 8814, 29918, 1792, 29918, 3166, 29918, 3827, 29892, 8814, 29918, 1792, 29918, 3166, 29918, 517, 12360, 13, 13, 2659, 353, 679, 29918, 1792, 29918, 4299, 580, 13, 13, 13, 1990, 12367, 2239, 19648, 2677, 29901, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 2009, 29892, 1404, 29922, 8516, 1125, 13, 4706, 1583, 29889, 3827, 353, 2009, 13, 4706, 1583, 29889, 1792, 353, 1404, 565, 1404, 1683, 530, 11428, 2659, 13, 13, 13, 29992, 5696, 29918, 19557, 1061, 29898, 2395, 9600, 29918, 735, 3456, 29892, 1024, 543, 13369, 1159, 13, 1990, 12367, 2239, 1043, 29898, 29909, 374, 328, 484, 1043, 1125, 13, 13, 1678, 822, 1400, 29898, 13, 9651, 1583, 29892, 2009, 29901, 9056, 3089, 29892, 334, 5085, 29892, 3579, 19290, 13, 268, 1125, 13, 4706, 565, 451, 1583, 29889, 11010, 29901, 13, 9651, 12020, 7865, 2392, 703, 9527, 2239, 1043, 471, 16601, 1728, 10938, 23157, 13, 13, 4706, 1018, 29901, 13, 9651, 848, 353, 1583, 29889, 21111, 29918, 1272, 29918, 3166, 29918, 3827, 29898, 3827, 29897, 13, 4706, 5174, 9056, 22050, 3089, 2392, 408, 1059, 29901, 13, 9651, 736, 9056, 5103, 22050, 3089, 29898, 2704, 29889, 4906, 29897, 13, 13, 4706, 2551, 29892, 1121, 353, 1583, 29889, 7978, 29918, 1972, 29898, 3827, 29892, 848, 29897, 13, 4706, 4660, 29918, 401, 353, 29871, 29906, 29900, 29900, 565, 2551, 1683, 29871, 29946, 29900, 29900, 13, 4706, 736, 10049, 29918, 3179, 1847, 29918, 23055, 29898, 3827, 29922, 3827, 29892, 1121, 29922, 2914, 29892, 4660, 29918, 401, 29922, 4882, 29918, 401, 29897, 13, 13, 1678, 732, 7959, 5696, 13, 1678, 822, 679, 29918, 4703, 29918, 1454, 29918, 3827, 29898, 3827, 29901, 9056, 3089, 29897, 1599, 28379, 29961, 2677, 1917, 5387, 13, 4706, 1404, 353, 8814, 29918, 1792, 29918, 3166, 29918, 3827, 29898, 3827, 29897, 13, 4706, 736, 12367, 2239, 19648, 2677, 29898, 3827, 29922, 3827, 29892, 1404, 29922, 1792, 29897, 13, 13, 13, 29937, 910, 338, 385, 3339, 29954, 29902, 29906, 24521, 770, 577, 393, 591, 508, 671, 263, 374, 328, 484, 21696, 1980, 411, 18196, 29889, 13, 29937, 9038, 18196, 11286, 3339, 29954, 29902, 29941, 445, 770, 508, 748, 3448, 29901, 13, 29937, 2045, 597, 3292, 29889, 510, 29914, 11038, 2017, 29872, 29914, 1306, 328, 484, 29914, 12175, 29914, 29906, 29896, 29900, 13, 1990, 13189, 4173, 630, 13599, 29898, 9527, 2239, 1125, 13, 1678, 822, 4770, 4804, 12035, 1311, 29892, 6874, 29897, 1599, 8251, 519, 29901, 13, 4706, 1583, 29889, 6078, 353, 6874, 13, 13, 4706, 7465, 822, 4386, 29898, 13556, 573, 29892, 3638, 1125, 13, 9651, 7272, 2428, 29898, 6444, 4173, 630, 13599, 29892, 1583, 467, 1649, 4804, 12035, 6078, 29892, 7150, 29892, 3638, 29897, 13, 13, 4706, 736, 4386, 13, 13, 1678, 732, 9803, 29918, 16593, 29918, 517, 29918, 12674, 13, 1678, 822, 8814, 29918, 1792, 29898, 1311, 29892, 15327, 1125, 13, 4706, 736, 8814, 29918, 1792, 29918, 3166, 29918, 517, 12360, 29898, 13, 9651, 5993, 29922, 21509, 1839, 29967, 17755, 29918, 4986, 29968, 1430, 13359, 1767, 565, 525, 29967, 17755, 29918, 4986, 29968, 1430, 29915, 297, 15327, 1683, 6213, 29892, 13, 9651, 11086, 6066, 29922, 21509, 1839, 29967, 17755, 29918, 25866, 1525, 7068, 29918, 4986, 29968, 1430, 13359, 1767, 565, 525, 29967, 17755, 29918, 25866, 1525, 7068, 29918, 4986, 29968, 1430, 29915, 297, 15327, 1683, 6213, 13, 4706, 1723, 13, 13, 1678, 7465, 822, 679, 29918, 4703, 29918, 1454, 29918, 3827, 29898, 1311, 29892, 2009, 29901, 3139, 29897, 1599, 3139, 29901, 13, 4706, 9066, 353, 9657, 29898, 1311, 29889, 6078, 1839, 13662, 11287, 13, 4706, 1404, 353, 530, 11428, 2659, 580, 13, 4706, 565, 289, 29915, 21509, 29915, 297, 9066, 29901, 13, 9651, 15327, 353, 12545, 24914, 580, 13, 9651, 15327, 29889, 1359, 29898, 710, 29898, 13662, 29961, 29890, 29915, 21509, 25901, 13, 9651, 1404, 353, 7272, 1583, 29889, 17863, 29918, 1792, 29898, 21509, 29897, 13, 4706, 565, 1404, 338, 6213, 29901, 13, 9651, 1404, 353, 530, 11428, 2659, 580, 13, 4706, 736, 8853, 3827, 1115, 2009, 29892, 376, 1792, 1115, 1404, 29913, 13, 13, 13, 1649, 497, 1649, 353, 518, 13, 1678, 525, 9527, 2239, 1043, 742, 13, 1678, 525, 6444, 4173, 630, 13599, 29915, 13, 29962, 13, 2 ]
bin/base64_.py
pelavarre/pybashish
4
123466
#!/usr/bin/env python3 # quirks: # doesn't redefine the 'import base64' of https://docs.python.org/3/library/base64.html import sys sys.stderr.write("base64.py: error: not implemented\n") sys.exit(2) # exit 2 from rejecting usage # copied from: git clone https://github.com/pelavarre/pybashish.git
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 13, 29937, 439, 27064, 29901, 13, 29937, 1838, 29915, 29873, 337, 7922, 278, 525, 5215, 2967, 29953, 29946, 29915, 310, 2045, 597, 2640, 29889, 4691, 29889, 990, 29914, 29941, 29914, 5258, 29914, 3188, 29953, 29946, 29889, 1420, 13, 13, 5215, 10876, 13, 13, 9675, 29889, 303, 20405, 29889, 3539, 703, 3188, 29953, 29946, 29889, 2272, 29901, 1059, 29901, 451, 8762, 29905, 29876, 1159, 13, 9675, 29889, 13322, 29898, 29906, 29897, 29871, 396, 6876, 29871, 29906, 515, 12560, 292, 8744, 13, 13, 29937, 13746, 515, 29901, 29871, 6315, 17432, 2045, 597, 3292, 29889, 510, 29914, 13111, 485, 279, 276, 29914, 2272, 13067, 728, 29889, 5559, 13, 2 ]
dist-packages/dtk/ui/paned.py
Jianwei-Wang/python2.7_lib
0
31538
<gh_stars>0 #! /usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2011 ~ 2012 Deepin, Inc. # 2011 ~ 2012 <NAME> # 2011 ~ 2012 <NAME> # # Author: <NAME> <<EMAIL>> # Maintainer: <NAME> <<EMAIL>> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. from draw import draw_pixbuf from utils import is_in_rect, color_hex_to_cairo from constant import PANED_HANDLE_SIZE import gobject import gtk import math from theme import ui_theme # Load customize rc style before any other. gtk.rc_parse_string("style 'my_style' {\n GtkPaned::handle-size = %s\n }\nwidget '*' style 'my_style'" % (PANED_HANDLE_SIZE)) class Paned(gtk.Paned): ''' Paned. @undocumented: do_enter_notify_event @undocumented: do_button_press_event @undocumented: do_size_allocate @undocumented: do_enter_notify_event @undocumented: is_in_button @undocumented: draw_handle @undocumented: do_expose_event gtk.Paned with custom better apperance. ''' def __init__(self, shrink_first, enable_animation=False, always_show_button=False, enable_drag=False, handle_color=ui_theme.get_color("paned_line") ): ''' Initialize Paned class. ''' gtk.Paned.__init__(self) self.shrink_first = shrink_first self.enable_animation = enable_animation self.always_show_button = always_show_button self.enable_drag = enable_drag self.handle_color = handle_color self.bheight = ui_theme.get_pixbuf("paned/paned_up_normal.png").get_pixbuf().get_width() self.saved_position = -1 self.handle_size = PANED_HANDLE_SIZE - 1 self.show_button = False self.init_button("normal") self.animation_delay = 20 # milliseconds self.animation_times = 10 self.animation_position_frames = [] self.press_coordinate = None def init_button(self, status): if self.get_orientation() == gtk.ORIENTATION_HORIZONTAL: if self.shrink_first: self.button_pixbuf = ui_theme.get_pixbuf("paned/paned_left_%s.png" % status).get_pixbuf() else: self.button_pixbuf = ui_theme.get_pixbuf("paned/paned_right_%s.png" % status).get_pixbuf() else: if self.shrink_first: self.button_pixbuf = ui_theme.get_pixbuf("paned/paned_up_%s.png" % status).get_pixbuf() else: self.button_pixbuf = ui_theme.get_pixbuf("paned/paned_down_%s.png" % status).get_pixbuf() def do_expose_event(self, e): ''' To intercept the default expose event and draw custom handle after the **gtk.Container** expose evetn. So the gtk.Paned's expose event callback is ignore. ''' gtk.Container.do_expose_event(self, e) self.draw_handle(e) return False def draw_handle(self, e): ''' Draw the cusom handle apperance. ''' handle = self.get_handle_window() line_width = 1 cr = handle.cairo_create() cr.set_source_rgb(*color_hex_to_cairo(self.handle_color.get_color())) (width, height) = handle.get_size() if self.get_orientation() == gtk.ORIENTATION_HORIZONTAL: if self.shrink_first: if self.get_position() != 0: cr.rectangle(0, 0, line_width, height) cr.fill() if self.always_show_button or self.show_button: if self.get_position() == 0: pixbuf = ui_theme.get_pixbuf("paned/paned_right_normal.png").get_pixbuf() else: pixbuf = ui_theme.get_pixbuf("paned/paned_left_normal.png").get_pixbuf() draw_pixbuf(cr, pixbuf, 0, (height - self.bheight) / 2) else: cr.rectangle(width - line_width, 0, line_width, height) cr.fill() if self.always_show_button or self.show_button: if self.get_position() == 0: pixbuf = ui_theme.get_pixbuf("paned/paned_left_normal.png").get_pixbuf() else: pixbuf = ui_theme.get_pixbuf("paned/paned_right_normal.png").get_pixbuf() draw_pixbuf(cr, pixbuf, 0, (height - self.bheight) / 2) else: if self.shrink_first: cr.rectangle(0, 0, width, line_width) cr.fill() if self.always_show_button or self.show_button: if self.get_position() == 0: pixbuf = ui_theme.get_pixbuf("paned/paned_down_normal.png").get_pixbuf() else: pixbuf = ui_theme.get_pixbuf("paned/paned_up_normal.png").get_pixbuf() draw_pixbuf(cr, pixbuf, (width - self.bheight) / 2, 0) else: cr.rectangle(0, height - line_width, width, line_width) cr.fill() if self.always_show_button or self.show_button: if self.get_position() == 0: pixbuf = ui_theme.get_pixbuf("paned/paned_up_normal.png").get_pixbuf() else: pixbuf = ui_theme.get_pixbuf("paned/paned_down_normal.png").get_pixbuf() draw_pixbuf(cr, pixbuf, (width - self.bheight) / 2, 0) def is_in_button(self, x, y): ''' Detection of wheter the mouse pointer is in the handler's button. ''' handle = self.get_handle_window() (width, height) = handle.get_size() if self.get_orientation() == gtk.ORIENTATION_HORIZONTAL: rect = (0, (height - self.bheight) / 2, width, self.bheight) else: rect = ((width - self.bheight) / 2, 0, self.bheight, height) return is_in_rect((x, y), rect) def do_enter_notify_event(self, e): self.show_button = True self.queue_draw() def do_leave_notify_event(self, e): self.show_button = False self.init_button("normal") self.queue_draw() def do_motion_notify_event(self, e): ''' change the cursor style when move in handler ''' # Reset press coordinate if motion mouse after press event. self.press_coordinate = None handle = self.get_handle_window() (width, height) = handle.get_size() if self.is_in_button(e.x, e.y): handle.set_cursor(gtk.gdk.Cursor(gtk.gdk.HAND1)) self.init_button("hover") else: if self.enable_drag: handle.set_cursor(self.cursor_type) gtk.Paned.do_motion_notify_event(self, e) else: handle.set_cursor(None) self.init_button("normal") def do_button_press_event(self, e): ''' when press the handler's button change the position. ''' handle = self.get_handle_window() if e.window == handle: if self.is_in_button(e.x, e.y): self.init_button("press") self.do_press_actoin() else: (width, height) = handle.get_size() if is_in_rect((e.x, e.y), (0, 0, width, height)): self.press_coordinate = (e.x, e.y) gtk.Paned.do_button_press_event(self, e) else: gtk.Paned.do_button_press_event(self, e) return True def do_button_release_event(self, e): ''' docs ''' gtk.Paned.do_button_release_event(self, e) # Do press event if not in button and finish `click` event. if (not self.is_in_button(e.x, e.y)) and self.press_coordinate == (e.x, e.y): self.do_press_actoin() return True def do_press_actoin(self): ''' docs ''' if self.saved_position == -1: self.saved_position = self.get_position() if self.shrink_first: self.change_position(0) else: if self.get_orientation() == gtk.ORIENTATION_HORIZONTAL: self.change_position(self.allocation.width) else: self.change_position(self.allocation.height) else: self.change_position(self.saved_position) self.saved_position = -1 def change_position(self, new_position): current_position = self.get_position() if self.enable_animation: if new_position != current_position: for i in range(0, self.animation_times + 1): step = int(math.sin(math.pi * i / 2 / self.animation_times) * (new_position - current_position)) self.animation_position_frames.append(current_position + step) if self.animation_position_frames[-1] != new_position: self.animation_position_frames.append(new_position) gtk.timeout_add(self.animation_delay, self.update_position) else: self.set_position(new_position) def update_position(self): self.set_position(self.animation_position_frames.pop(0)) if self.animation_position_frames == []: return False else: return True def do_size_allocate(self, e): gtk.Paned.do_size_allocate(self, e) if self.shrink_first: child = self.get_child2() else: child = self.get_child1() if child == None: return rect = child.allocation offset = self.handle_size if self.get_orientation() == gtk.ORIENTATION_HORIZONTAL: if self.shrink_first: rect.x -= offset rect.width += offset else: rect.width += offset else: if self.shrink_first: rect.y -= offset rect.height += offset else: rect.height += offset child.size_allocate(rect) class HPaned(Paned): def __init__(self, shrink_first=True, enable_animation=False, always_show_button=False, enable_drag=False, handle_color=ui_theme.get_color("paned_line") ): Paned.__init__(self, shrink_first, enable_animation, always_show_button, enable_drag, handle_color) self.set_orientation(gtk.ORIENTATION_HORIZONTAL) self.cursor_type = gtk.gdk.Cursor(gtk.gdk.SB_H_DOUBLE_ARROW) class VPaned(Paned): def __init__(self, shrink_first=True, enable_animation=False, always_show_button=False, enable_drag=False, handle_color=ui_theme.get_color("paned_line") ): Paned.__init__(self, shrink_first, enable_animation, always_show_button, enable_drag, handle_color) self.set_orientation(gtk.ORIENTATION_VERTICAL) self.cursor_type = gtk.gdk.Cursor(gtk.gdk.SB_V_DOUBLE_ARROW) gobject.type_register(Paned) gobject.type_register(HPaned) gobject.type_register(VPaned) if __name__ == '__main__': w = gtk.Window() w.set_size_request(700, 400) #w.modify_bg(gtk.STATE_NORMAL, gtk.gdk.Color('yellow')) box = gtk.VBox() p = VPaned() c1 = gtk.Button("11111111111111111111111") c1.modify_bg(gtk.STATE_NORMAL, gtk.gdk.Color('blue')) c2 = gtk.Button("122222222222222222222222") c1.modify_bg(gtk.STATE_NORMAL, gtk.gdk.Color('red')) p.add1(c1) p.add2(c2) box.pack_start(p) p = HPaned() c1 = gtk.Button("11111111111111111111111") c1.modify_bg(gtk.STATE_NORMAL, gtk.gdk.Color('blue')) c2 = gtk.Button("122222222222222222222222") c1.modify_bg(gtk.STATE_NORMAL, gtk.gdk.Color('red')) p.add1(c1) p.add2(c2) box.pack_start(p) w.add(box) w.connect('destroy', gtk.main_quit) w.show_all() gtk.main()
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 29991, 847, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 13, 29937, 14187, 1266, 313, 29907, 29897, 29871, 29906, 29900, 29896, 29896, 3695, 29871, 29906, 29900, 29896, 29906, 21784, 262, 29892, 9266, 29889, 13, 29937, 18884, 29906, 29900, 29896, 29896, 3695, 29871, 29906, 29900, 29896, 29906, 529, 5813, 29958, 13, 29937, 18884, 29906, 29900, 29896, 29896, 3695, 29871, 29906, 29900, 29896, 29906, 529, 5813, 29958, 13, 29937, 13, 29937, 13361, 29901, 268, 529, 5813, 29958, 3532, 26862, 6227, 6778, 13, 29937, 341, 2365, 4008, 29901, 529, 5813, 29958, 3532, 26862, 6227, 6778, 13, 29937, 13, 29937, 910, 1824, 338, 3889, 7047, 29901, 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, 29892, 2845, 1873, 29871, 29941, 310, 278, 19245, 29892, 470, 13, 29937, 738, 2678, 1873, 29889, 13, 29937, 13, 29937, 910, 1824, 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, 445, 1824, 29889, 29871, 960, 451, 29892, 1074, 529, 1124, 597, 1636, 29889, 18713, 29889, 990, 29914, 506, 11259, 3779, 29889, 13, 13, 3166, 4216, 1053, 4216, 29918, 29886, 861, 9721, 13, 3166, 3667, 29879, 1053, 338, 29918, 262, 29918, 1621, 29892, 2927, 29918, 20970, 29918, 517, 29918, 1113, 3350, 13, 3166, 4868, 1053, 349, 2190, 3352, 29918, 29950, 9468, 1307, 29918, 14226, 13, 5215, 330, 3318, 13, 5215, 330, 11178, 13, 5215, 5844, 13, 3166, 10929, 1053, 14313, 29918, 18193, 13, 13, 29937, 16012, 2888, 675, 364, 29883, 3114, 1434, 738, 916, 29889, 13, 4141, 29895, 29889, 2214, 29918, 5510, 29918, 1807, 703, 3293, 525, 1357, 29918, 3293, 29915, 2802, 29876, 1678, 402, 11178, 23684, 287, 1057, 8411, 29899, 2311, 353, 1273, 29879, 29905, 29876, 17704, 29876, 8030, 525, 29930, 29915, 3114, 525, 1357, 29918, 3293, 11838, 1273, 313, 29925, 2190, 3352, 29918, 29950, 9468, 1307, 29918, 14226, 876, 13, 13, 1990, 6518, 287, 29898, 4141, 29895, 29889, 23684, 287, 1125, 13, 1678, 14550, 13, 1678, 6518, 287, 29889, 13, 13, 1678, 732, 870, 4463, 287, 29901, 437, 29918, 5893, 29918, 25140, 29918, 3696, 13, 1678, 732, 870, 4463, 287, 29901, 437, 29918, 3092, 29918, 2139, 29918, 3696, 13, 1678, 732, 870, 4463, 287, 29901, 437, 29918, 2311, 29918, 15956, 403, 13, 1678, 732, 870, 4463, 287, 29901, 437, 29918, 5893, 29918, 25140, 29918, 3696, 13, 1678, 732, 870, 4463, 287, 29901, 338, 29918, 262, 29918, 3092, 13, 1678, 732, 870, 4463, 287, 29901, 4216, 29918, 8411, 13, 1678, 732, 870, 4463, 287, 29901, 437, 29918, 735, 4220, 29918, 3696, 13, 13, 1678, 330, 11178, 29889, 23684, 287, 411, 2888, 2253, 623, 261, 749, 29889, 13, 1678, 14550, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 13, 462, 14653, 682, 29918, 4102, 29892, 13, 462, 9025, 29918, 18962, 29922, 8824, 29892, 13, 462, 2337, 29918, 4294, 29918, 3092, 29922, 8824, 29892, 13, 462, 9025, 29918, 20515, 29922, 8824, 29892, 13, 462, 4386, 29918, 2780, 29922, 1481, 29918, 18193, 29889, 657, 29918, 2780, 703, 8357, 287, 29918, 1220, 1159, 13, 462, 29871, 1125, 13, 4706, 14550, 13, 4706, 25455, 6518, 287, 770, 29889, 13, 4706, 14550, 13, 4706, 330, 11178, 29889, 23684, 287, 17255, 2344, 12035, 1311, 29897, 13, 4706, 1583, 29889, 845, 29878, 682, 29918, 4102, 353, 14653, 682, 29918, 4102, 13, 4706, 1583, 29889, 12007, 29918, 18962, 353, 9025, 29918, 18962, 13, 4706, 1583, 29889, 21936, 29918, 4294, 29918, 3092, 353, 2337, 29918, 4294, 29918, 3092, 13, 4706, 1583, 29889, 12007, 29918, 20515, 353, 9025, 29918, 20515, 13, 4706, 1583, 29889, 8411, 29918, 2780, 353, 4386, 29918, 2780, 13, 4706, 1583, 29889, 29890, 3545, 353, 14313, 29918, 18193, 29889, 657, 29918, 29886, 861, 9721, 703, 8357, 287, 29914, 8357, 287, 29918, 786, 29918, 8945, 29889, 2732, 2564, 657, 29918, 29886, 861, 9721, 2141, 657, 29918, 2103, 580, 13, 4706, 1583, 29889, 17314, 29918, 3283, 353, 448, 29896, 13, 4706, 1583, 29889, 8411, 29918, 2311, 353, 349, 2190, 3352, 29918, 29950, 9468, 1307, 29918, 14226, 448, 29871, 29896, 13, 4706, 1583, 29889, 4294, 29918, 3092, 353, 7700, 13, 4706, 1583, 29889, 2344, 29918, 3092, 703, 8945, 1159, 13, 4706, 1583, 29889, 18962, 29918, 18829, 353, 29871, 29906, 29900, 396, 3533, 21462, 13, 4706, 1583, 29889, 18962, 29918, 3706, 353, 29871, 29896, 29900, 13, 4706, 1583, 29889, 18962, 29918, 3283, 29918, 19935, 353, 5159, 13, 4706, 1583, 29889, 2139, 29918, 29302, 353, 6213, 13, 13, 1678, 822, 2069, 29918, 3092, 29898, 1311, 29892, 4660, 1125, 13, 4706, 565, 1583, 29889, 657, 29918, 20659, 580, 1275, 330, 11178, 29889, 1955, 29902, 3919, 8098, 29918, 29950, 1955, 26664, 1164, 29911, 1964, 29901, 13, 9651, 565, 1583, 29889, 845, 29878, 682, 29918, 4102, 29901, 13, 18884, 1583, 29889, 3092, 29918, 29886, 861, 9721, 353, 14313, 29918, 18193, 29889, 657, 29918, 29886, 861, 9721, 703, 8357, 287, 29914, 8357, 287, 29918, 1563, 29918, 29995, 29879, 29889, 2732, 29908, 1273, 4660, 467, 657, 29918, 29886, 861, 9721, 580, 13, 9651, 1683, 29901, 13, 18884, 1583, 29889, 3092, 29918, 29886, 861, 9721, 353, 14313, 29918, 18193, 29889, 657, 29918, 29886, 861, 9721, 703, 8357, 287, 29914, 8357, 287, 29918, 1266, 29918, 29995, 29879, 29889, 2732, 29908, 1273, 4660, 467, 657, 29918, 29886, 861, 9721, 580, 13, 4706, 1683, 29901, 13, 9651, 565, 1583, 29889, 845, 29878, 682, 29918, 4102, 29901, 13, 18884, 1583, 29889, 3092, 29918, 29886, 861, 9721, 353, 14313, 29918, 18193, 29889, 657, 29918, 29886, 861, 9721, 703, 8357, 287, 29914, 8357, 287, 29918, 786, 29918, 29995, 29879, 29889, 2732, 29908, 1273, 4660, 467, 657, 29918, 29886, 861, 9721, 580, 13, 9651, 1683, 29901, 13, 18884, 1583, 29889, 3092, 29918, 29886, 861, 9721, 353, 14313, 29918, 18193, 29889, 657, 29918, 29886, 861, 9721, 703, 8357, 287, 29914, 8357, 287, 29918, 3204, 29918, 29995, 29879, 29889, 2732, 29908, 1273, 4660, 467, 657, 29918, 29886, 861, 9721, 580, 13, 13, 1678, 822, 437, 29918, 735, 4220, 29918, 3696, 29898, 1311, 29892, 321, 1125, 13, 4706, 14550, 13, 4706, 1763, 23404, 278, 2322, 24396, 1741, 322, 4216, 2888, 4386, 13, 4706, 1156, 278, 3579, 4141, 29895, 29889, 7895, 1068, 24396, 3415, 300, 29876, 29889, 13, 4706, 1105, 278, 330, 11178, 29889, 23684, 287, 29915, 29879, 24396, 1741, 6939, 338, 11455, 29889, 13, 4706, 14550, 13, 4706, 330, 11178, 29889, 7895, 29889, 1867, 29918, 735, 4220, 29918, 3696, 29898, 1311, 29892, 321, 29897, 13, 4706, 1583, 29889, 4012, 29918, 8411, 29898, 29872, 29897, 13, 13, 4706, 736, 7700, 13, 13, 1678, 822, 4216, 29918, 8411, 29898, 1311, 29892, 321, 1125, 13, 4706, 14550, 13, 4706, 18492, 278, 274, 375, 290, 4386, 623, 261, 749, 29889, 13, 4706, 14550, 13, 4706, 4386, 353, 1583, 29889, 657, 29918, 8411, 29918, 7165, 580, 13, 4706, 1196, 29918, 2103, 353, 29871, 29896, 13, 4706, 2181, 353, 4386, 29889, 1113, 3350, 29918, 3258, 580, 13, 4706, 2181, 29889, 842, 29918, 4993, 29918, 23973, 10456, 2780, 29918, 20970, 29918, 517, 29918, 1113, 3350, 29898, 1311, 29889, 8411, 29918, 2780, 29889, 657, 29918, 2780, 22130, 13, 4706, 313, 2103, 29892, 3171, 29897, 353, 4386, 29889, 657, 29918, 2311, 580, 13, 4706, 565, 1583, 29889, 657, 29918, 20659, 580, 1275, 330, 11178, 29889, 1955, 29902, 3919, 8098, 29918, 29950, 1955, 26664, 1164, 29911, 1964, 29901, 13, 9651, 565, 1583, 29889, 845, 29878, 682, 29918, 4102, 29901, 13, 18884, 565, 1583, 29889, 657, 29918, 3283, 580, 2804, 29871, 29900, 29901, 13, 462, 1678, 2181, 29889, 1621, 2521, 29898, 29900, 29892, 29871, 29900, 29892, 1196, 29918, 2103, 29892, 3171, 29897, 13, 462, 1678, 2181, 29889, 5589, 580, 13, 13, 18884, 565, 1583, 29889, 21936, 29918, 4294, 29918, 3092, 470, 1583, 29889, 4294, 29918, 3092, 29901, 13, 462, 1678, 565, 1583, 29889, 657, 29918, 3283, 580, 1275, 29871, 29900, 29901, 13, 462, 4706, 9277, 9721, 353, 14313, 29918, 18193, 29889, 657, 29918, 29886, 861, 9721, 703, 8357, 287, 29914, 8357, 287, 29918, 1266, 29918, 8945, 29889, 2732, 2564, 657, 29918, 29886, 861, 9721, 580, 13, 462, 1678, 1683, 29901, 13, 462, 4706, 9277, 9721, 353, 14313, 29918, 18193, 29889, 657, 29918, 29886, 861, 9721, 703, 8357, 287, 29914, 8357, 287, 29918, 1563, 29918, 8945, 29889, 2732, 2564, 657, 29918, 29886, 861, 9721, 580, 13, 462, 1678, 4216, 29918, 29886, 861, 9721, 29898, 7283, 29892, 13, 462, 18884, 9277, 9721, 29892, 13, 462, 462, 29900, 29892, 13, 462, 18884, 313, 3545, 448, 1583, 29889, 29890, 3545, 29897, 29871, 847, 29871, 29906, 29897, 13, 9651, 1683, 29901, 13, 18884, 2181, 29889, 1621, 2521, 29898, 2103, 448, 1196, 29918, 2103, 29892, 29871, 29900, 29892, 1196, 29918, 2103, 29892, 3171, 29897, 13, 18884, 2181, 29889, 5589, 580, 13, 13, 18884, 565, 1583, 29889, 21936, 29918, 4294, 29918, 3092, 470, 1583, 29889, 4294, 29918, 3092, 29901, 13, 462, 1678, 565, 1583, 29889, 657, 29918, 3283, 580, 1275, 29871, 29900, 29901, 13, 462, 4706, 9277, 9721, 353, 14313, 29918, 18193, 29889, 657, 29918, 29886, 861, 9721, 703, 8357, 287, 29914, 8357, 287, 29918, 1563, 29918, 8945, 29889, 2732, 2564, 657, 29918, 29886, 861, 9721, 580, 13, 462, 1678, 1683, 29901, 13, 462, 4706, 9277, 9721, 353, 14313, 29918, 18193, 29889, 657, 29918, 29886, 861, 9721, 703, 8357, 287, 29914, 8357, 287, 29918, 1266, 29918, 8945, 29889, 2732, 2564, 657, 29918, 29886, 861, 9721, 580, 13, 462, 1678, 4216, 29918, 29886, 861, 9721, 29898, 7283, 29892, 13, 462, 18884, 9277, 9721, 29892, 13, 462, 462, 29900, 29892, 13, 462, 18884, 313, 3545, 448, 1583, 29889, 29890, 3545, 29897, 29871, 847, 29871, 29906, 29897, 13, 4706, 1683, 29901, 13, 9651, 565, 1583, 29889, 845, 29878, 682, 29918, 4102, 29901, 13, 18884, 2181, 29889, 1621, 2521, 29898, 29900, 29892, 29871, 29900, 29892, 2920, 29892, 1196, 29918, 2103, 29897, 13, 18884, 2181, 29889, 5589, 580, 13, 13, 18884, 565, 1583, 29889, 21936, 29918, 4294, 29918, 3092, 470, 1583, 29889, 4294, 29918, 3092, 29901, 13, 462, 1678, 565, 1583, 29889, 657, 29918, 3283, 580, 1275, 29871, 29900, 29901, 13, 462, 4706, 9277, 9721, 353, 14313, 29918, 18193, 29889, 657, 29918, 29886, 861, 9721, 703, 8357, 287, 29914, 8357, 287, 29918, 3204, 29918, 8945, 29889, 2732, 2564, 657, 29918, 29886, 861, 9721, 580, 13, 462, 1678, 1683, 29901, 13, 462, 4706, 9277, 9721, 353, 14313, 29918, 18193, 29889, 657, 29918, 29886, 861, 9721, 703, 8357, 287, 29914, 8357, 287, 29918, 786, 29918, 8945, 29889, 2732, 2564, 657, 29918, 29886, 861, 9721, 580, 13, 462, 1678, 4216, 29918, 29886, 861, 9721, 29898, 7283, 29892, 13, 462, 18884, 9277, 9721, 29892, 13, 462, 18884, 313, 2103, 448, 1583, 29889, 29890, 3545, 29897, 847, 29871, 29906, 29892, 13, 462, 462, 29900, 29897, 13, 9651, 1683, 29901, 13, 18884, 2181, 29889, 1621, 2521, 29898, 29900, 29892, 3171, 448, 1196, 29918, 2103, 29892, 2920, 29892, 1196, 29918, 2103, 29897, 13, 18884, 2181, 29889, 5589, 580, 13, 13, 18884, 565, 1583, 29889, 21936, 29918, 4294, 29918, 3092, 470, 1583, 29889, 4294, 29918, 3092, 29901, 13, 462, 1678, 565, 1583, 29889, 657, 29918, 3283, 580, 1275, 29871, 29900, 29901, 13, 462, 4706, 9277, 9721, 353, 14313, 29918, 18193, 29889, 657, 29918, 29886, 861, 9721, 703, 8357, 287, 29914, 8357, 287, 29918, 786, 29918, 8945, 29889, 2732, 2564, 657, 29918, 29886, 861, 9721, 580, 13, 462, 1678, 1683, 29901, 13, 462, 4706, 9277, 9721, 353, 14313, 29918, 18193, 29889, 657, 29918, 29886, 861, 9721, 703, 8357, 287, 29914, 8357, 287, 29918, 3204, 29918, 8945, 29889, 2732, 2564, 657, 29918, 29886, 861, 9721, 580, 13, 462, 1678, 4216, 29918, 29886, 861, 9721, 29898, 7283, 29892, 13, 462, 18884, 9277, 9721, 29892, 13, 462, 18884, 313, 2103, 448, 1583, 29889, 29890, 3545, 29897, 847, 29871, 29906, 29892, 13, 462, 462, 29900, 29897, 13, 13, 1678, 822, 338, 29918, 262, 29918, 3092, 29898, 1311, 29892, 921, 29892, 343, 1125, 13, 4706, 14550, 13, 4706, 360, 2650, 428, 310, 377, 1308, 278, 9495, 4879, 338, 297, 278, 7834, 29915, 29879, 2826, 29889, 13, 4706, 14550, 13, 4706, 4386, 353, 1583, 29889, 657, 29918, 8411, 29918, 7165, 580, 13, 4706, 313, 2103, 29892, 3171, 29897, 353, 4386, 29889, 657, 29918, 2311, 580, 13, 4706, 565, 1583, 29889, 657, 29918, 20659, 580, 1275, 330, 11178, 29889, 1955, 29902, 3919, 8098, 29918, 29950, 1955, 26664, 1164, 29911, 1964, 29901, 13, 9651, 7705, 353, 29871, 313, 29900, 29892, 313, 3545, 448, 1583, 29889, 29890, 3545, 29897, 847, 29871, 29906, 29892, 2920, 29892, 1583, 29889, 29890, 3545, 29897, 13, 4706, 1683, 29901, 13, 9651, 7705, 353, 29871, 5135, 2103, 448, 1583, 29889, 29890, 3545, 29897, 847, 29871, 29906, 29892, 29871, 29900, 29892, 1583, 29889, 29890, 3545, 29892, 3171, 29897, 13, 13, 4706, 736, 338, 29918, 262, 29918, 1621, 3552, 29916, 29892, 343, 511, 7705, 29897, 13, 13, 1678, 822, 437, 29918, 5893, 29918, 25140, 29918, 3696, 29898, 1311, 29892, 321, 1125, 13, 4706, 1583, 29889, 4294, 29918, 3092, 353, 5852, 13, 13, 4706, 1583, 29889, 9990, 29918, 4012, 580, 13, 13, 1678, 822, 437, 29918, 280, 1351, 29918, 25140, 29918, 3696, 29898, 1311, 29892, 321, 1125, 13, 4706, 1583, 29889, 4294, 29918, 3092, 353, 7700, 13, 4706, 1583, 29889, 2344, 29918, 3092, 703, 8945, 1159, 13, 13, 4706, 1583, 29889, 9990, 29918, 4012, 580, 13, 13, 1678, 822, 437, 29918, 29885, 8194, 29918, 25140, 29918, 3696, 29898, 1311, 29892, 321, 1125, 13, 4706, 14550, 13, 4706, 1735, 278, 10677, 3114, 29871, 746, 4337, 297, 7834, 13, 4706, 14550, 13, 4706, 396, 2538, 300, 3965, 14821, 565, 10884, 9495, 1156, 3965, 1741, 29889, 13, 4706, 1583, 29889, 2139, 29918, 29302, 353, 6213, 13, 13, 4706, 4386, 353, 1583, 29889, 657, 29918, 8411, 29918, 7165, 580, 13, 4706, 313, 2103, 29892, 3171, 29897, 353, 4386, 29889, 657, 29918, 2311, 580, 13, 4706, 565, 1583, 29889, 275, 29918, 262, 29918, 3092, 29898, 29872, 29889, 29916, 29892, 321, 29889, 29891, 1125, 13, 9651, 4386, 29889, 842, 29918, 18127, 29898, 4141, 29895, 29889, 29887, 8181, 29889, 19890, 29898, 4141, 29895, 29889, 29887, 8181, 29889, 29950, 9468, 29896, 876, 13, 13, 9651, 1583, 29889, 2344, 29918, 3092, 703, 13194, 1159, 13, 4706, 1683, 29901, 13, 9651, 565, 1583, 29889, 12007, 29918, 20515, 29901, 13, 18884, 4386, 29889, 842, 29918, 18127, 29898, 1311, 29889, 18127, 29918, 1853, 29897, 13, 18884, 330, 11178, 29889, 23684, 287, 29889, 1867, 29918, 29885, 8194, 29918, 25140, 29918, 3696, 29898, 1311, 29892, 321, 29897, 13, 9651, 1683, 29901, 13, 18884, 4386, 29889, 842, 29918, 18127, 29898, 8516, 29897, 13, 9651, 1583, 29889, 2344, 29918, 3092, 703, 8945, 1159, 13, 13, 1678, 822, 437, 29918, 3092, 29918, 2139, 29918, 3696, 29898, 1311, 29892, 321, 1125, 13, 4706, 14550, 13, 4706, 746, 3965, 278, 7834, 29915, 29879, 2826, 1735, 278, 2602, 29889, 13, 4706, 14550, 13, 4706, 4386, 353, 1583, 29889, 657, 29918, 8411, 29918, 7165, 580, 13, 4706, 565, 321, 29889, 7165, 1275, 4386, 29901, 13, 9651, 565, 1583, 29889, 275, 29918, 262, 29918, 3092, 29898, 29872, 29889, 29916, 29892, 321, 29889, 29891, 1125, 13, 18884, 1583, 29889, 2344, 29918, 3092, 703, 2139, 1159, 13, 13, 18884, 1583, 29889, 1867, 29918, 2139, 29918, 627, 28230, 580, 13, 9651, 1683, 29901, 13, 18884, 313, 2103, 29892, 3171, 29897, 353, 4386, 29889, 657, 29918, 2311, 580, 13, 18884, 565, 338, 29918, 262, 29918, 1621, 3552, 29872, 29889, 29916, 29892, 321, 29889, 29891, 511, 313, 29900, 29892, 29871, 29900, 29892, 2920, 29892, 3171, 22164, 13, 462, 1678, 1583, 29889, 2139, 29918, 29302, 353, 313, 29872, 29889, 29916, 29892, 321, 29889, 29891, 29897, 13, 13, 18884, 330, 11178, 29889, 23684, 287, 29889, 1867, 29918, 3092, 29918, 2139, 29918, 3696, 29898, 1311, 29892, 321, 29897, 13, 4706, 1683, 29901, 13, 9651, 330, 11178, 29889, 23684, 287, 29889, 1867, 29918, 3092, 29918, 2139, 29918, 3696, 29898, 1311, 29892, 321, 29897, 13, 13, 4706, 736, 5852, 13, 13, 1678, 822, 437, 29918, 3092, 29918, 14096, 29918, 3696, 29898, 1311, 29892, 321, 1125, 13, 4706, 14550, 13, 4706, 10561, 13, 4706, 14550, 13, 4706, 330, 11178, 29889, 23684, 287, 29889, 1867, 29918, 3092, 29918, 14096, 29918, 3696, 29898, 1311, 29892, 321, 29897, 13, 13, 4706, 396, 1938, 3965, 1741, 565, 451, 297, 2826, 322, 8341, 421, 3808, 29952, 1741, 29889, 13, 4706, 565, 313, 1333, 1583, 29889, 275, 29918, 262, 29918, 3092, 29898, 29872, 29889, 29916, 29892, 321, 29889, 29891, 876, 322, 1583, 29889, 2139, 29918, 29302, 1275, 313, 29872, 29889, 29916, 29892, 321, 29889, 29891, 1125, 13, 9651, 1583, 29889, 1867, 29918, 2139, 29918, 627, 28230, 580, 13, 13, 4706, 736, 5852, 13, 13, 1678, 822, 437, 29918, 2139, 29918, 627, 28230, 29898, 1311, 1125, 13, 4706, 14550, 13, 4706, 10561, 13, 4706, 14550, 13, 4706, 565, 1583, 29889, 17314, 29918, 3283, 1275, 448, 29896, 29901, 13, 9651, 1583, 29889, 17314, 29918, 3283, 353, 1583, 29889, 657, 29918, 3283, 580, 13, 9651, 565, 1583, 29889, 845, 29878, 682, 29918, 4102, 29901, 13, 18884, 1583, 29889, 3167, 29918, 3283, 29898, 29900, 29897, 13, 9651, 1683, 29901, 13, 18884, 565, 1583, 29889, 657, 29918, 20659, 580, 1275, 330, 11178, 29889, 1955, 29902, 3919, 8098, 29918, 29950, 1955, 26664, 1164, 29911, 1964, 29901, 13, 462, 1678, 1583, 29889, 3167, 29918, 3283, 29898, 1311, 29889, 284, 5479, 29889, 2103, 29897, 13, 18884, 1683, 29901, 13, 462, 1678, 1583, 29889, 3167, 29918, 3283, 29898, 1311, 29889, 284, 5479, 29889, 3545, 29897, 13, 4706, 1683, 29901, 13, 9651, 1583, 29889, 3167, 29918, 3283, 29898, 1311, 29889, 17314, 29918, 3283, 29897, 13, 9651, 1583, 29889, 17314, 29918, 3283, 353, 448, 29896, 13, 13, 1678, 822, 1735, 29918, 3283, 29898, 1311, 29892, 716, 29918, 3283, 1125, 13, 4706, 1857, 29918, 3283, 353, 1583, 29889, 657, 29918, 3283, 580, 13, 4706, 565, 1583, 29889, 12007, 29918, 18962, 29901, 13, 9651, 565, 716, 29918, 3283, 2804, 1857, 29918, 3283, 29901, 13, 18884, 363, 474, 297, 3464, 29898, 29900, 29892, 1583, 29889, 18962, 29918, 3706, 718, 29871, 29896, 1125, 13, 462, 1678, 4331, 353, 938, 29898, 755, 29889, 5223, 29898, 755, 29889, 1631, 334, 474, 847, 29871, 29906, 847, 1583, 29889, 18962, 29918, 3706, 29897, 334, 313, 1482, 29918, 3283, 448, 1857, 29918, 3283, 876, 13, 462, 1678, 1583, 29889, 18962, 29918, 3283, 29918, 19935, 29889, 4397, 29898, 3784, 29918, 3283, 718, 4331, 29897, 13, 13, 18884, 565, 1583, 29889, 18962, 29918, 3283, 29918, 19935, 14352, 29896, 29962, 2804, 716, 29918, 3283, 29901, 13, 462, 1678, 1583, 29889, 18962, 29918, 3283, 29918, 19935, 29889, 4397, 29898, 1482, 29918, 3283, 29897, 13, 13, 18884, 330, 11178, 29889, 15619, 29918, 1202, 29898, 1311, 29889, 18962, 29918, 18829, 29892, 1583, 29889, 5504, 29918, 3283, 29897, 13, 4706, 1683, 29901, 13, 9651, 1583, 29889, 842, 29918, 3283, 29898, 1482, 29918, 3283, 29897, 13, 13, 1678, 822, 2767, 29918, 3283, 29898, 1311, 1125, 13, 4706, 1583, 29889, 842, 29918, 3283, 29898, 1311, 29889, 18962, 29918, 3283, 29918, 19935, 29889, 7323, 29898, 29900, 876, 13, 13, 4706, 565, 1583, 29889, 18962, 29918, 3283, 29918, 19935, 1275, 5159, 29901, 13, 9651, 736, 7700, 13, 4706, 1683, 29901, 13, 9651, 736, 5852, 13, 13, 1678, 822, 437, 29918, 2311, 29918, 15956, 403, 29898, 1311, 29892, 321, 1125, 13, 4706, 330, 11178, 29889, 23684, 287, 29889, 1867, 29918, 2311, 29918, 15956, 403, 29898, 1311, 29892, 321, 29897, 13, 13, 4706, 565, 1583, 29889, 845, 29878, 682, 29918, 4102, 29901, 13, 9651, 2278, 353, 1583, 29889, 657, 29918, 5145, 29906, 580, 13, 4706, 1683, 29901, 13, 9651, 2278, 353, 1583, 29889, 657, 29918, 5145, 29896, 580, 13, 13, 4706, 565, 2278, 1275, 6213, 29901, 736, 13, 13, 4706, 7705, 353, 2278, 29889, 284, 5479, 13, 13, 4706, 9210, 353, 1583, 29889, 8411, 29918, 2311, 13, 13, 4706, 565, 1583, 29889, 657, 29918, 20659, 580, 1275, 330, 11178, 29889, 1955, 29902, 3919, 8098, 29918, 29950, 1955, 26664, 1164, 29911, 1964, 29901, 13, 9651, 565, 1583, 29889, 845, 29878, 682, 29918, 4102, 29901, 13, 18884, 7705, 29889, 29916, 22361, 9210, 13, 18884, 7705, 29889, 2103, 4619, 9210, 13, 9651, 1683, 29901, 13, 18884, 7705, 29889, 2103, 4619, 9210, 13, 4706, 1683, 29901, 13, 9651, 565, 1583, 29889, 845, 29878, 682, 29918, 4102, 29901, 13, 18884, 7705, 29889, 29891, 22361, 9210, 13, 18884, 7705, 29889, 3545, 4619, 9210, 13, 9651, 1683, 29901, 13, 18884, 7705, 29889, 3545, 4619, 9210, 13, 13, 4706, 2278, 29889, 2311, 29918, 15956, 403, 29898, 1621, 29897, 13, 13, 1990, 379, 23684, 287, 29898, 23684, 287, 1125, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 13, 462, 14653, 682, 29918, 4102, 29922, 5574, 29892, 13, 462, 9025, 29918, 18962, 29922, 8824, 29892, 13, 462, 2337, 29918, 4294, 29918, 3092, 29922, 8824, 29892, 13, 462, 9025, 29918, 20515, 29922, 8824, 29892, 13, 462, 4386, 29918, 2780, 29922, 1481, 29918, 18193, 29889, 657, 29918, 2780, 703, 8357, 287, 29918, 1220, 1159, 13, 462, 29871, 1125, 13, 4706, 6518, 287, 17255, 2344, 12035, 1311, 29892, 14653, 682, 29918, 4102, 29892, 9025, 29918, 18962, 29892, 2337, 29918, 4294, 29918, 3092, 29892, 9025, 29918, 20515, 29892, 4386, 29918, 2780, 29897, 13, 4706, 1583, 29889, 842, 29918, 20659, 29898, 4141, 29895, 29889, 1955, 29902, 3919, 8098, 29918, 29950, 1955, 26664, 1164, 29911, 1964, 29897, 13, 4706, 1583, 29889, 18127, 29918, 1853, 353, 330, 11178, 29889, 29887, 8181, 29889, 19890, 29898, 4141, 29895, 29889, 29887, 8181, 29889, 1744, 29918, 29950, 29918, 3970, 7466, 1307, 29918, 1718, 25180, 29897, 13, 13, 1990, 478, 23684, 287, 29898, 23684, 287, 1125, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 13, 462, 14653, 682, 29918, 4102, 29922, 5574, 29892, 13, 462, 9025, 29918, 18962, 29922, 8824, 29892, 13, 462, 2337, 29918, 4294, 29918, 3092, 29922, 8824, 29892, 13, 462, 9025, 29918, 20515, 29922, 8824, 29892, 13, 462, 4386, 29918, 2780, 29922, 1481, 29918, 18193, 29889, 657, 29918, 2780, 703, 8357, 287, 29918, 1220, 1159, 13, 462, 29871, 1125, 13, 4706, 6518, 287, 17255, 2344, 12035, 1311, 29892, 14653, 682, 29918, 4102, 29892, 9025, 29918, 18962, 29892, 2337, 29918, 4294, 29918, 3092, 29892, 9025, 29918, 20515, 29892, 4386, 29918, 2780, 29897, 13, 4706, 1583, 29889, 842, 29918, 20659, 29898, 4141, 29895, 29889, 1955, 29902, 3919, 8098, 29918, 5348, 29911, 2965, 1964, 29897, 13, 4706, 1583, 29889, 18127, 29918, 1853, 353, 330, 11178, 29889, 29887, 8181, 29889, 19890, 29898, 4141, 29895, 29889, 29887, 8181, 29889, 1744, 29918, 29963, 29918, 3970, 7466, 1307, 29918, 1718, 25180, 29897, 13, 13, 29887, 3318, 29889, 1853, 29918, 9573, 29898, 23684, 287, 29897, 13, 29887, 3318, 29889, 1853, 29918, 9573, 29898, 3954, 273, 287, 29897, 13, 29887, 3318, 29889, 1853, 29918, 9573, 29898, 18510, 273, 287, 29897, 13, 13, 361, 4770, 978, 1649, 1275, 525, 1649, 3396, 1649, 2396, 13, 1678, 281, 353, 330, 11178, 29889, 5907, 580, 13, 1678, 281, 29889, 842, 29918, 2311, 29918, 3827, 29898, 29955, 29900, 29900, 29892, 29871, 29946, 29900, 29900, 29897, 13, 1678, 396, 29893, 29889, 1545, 1598, 29918, 16264, 29898, 4141, 29895, 29889, 19713, 29918, 29940, 1955, 1529, 29931, 29892, 330, 11178, 29889, 29887, 8181, 29889, 3306, 877, 29136, 8785, 13, 1678, 3800, 353, 330, 11178, 29889, 29963, 3313, 580, 13, 13, 1678, 282, 353, 478, 23684, 287, 580, 13, 1678, 274, 29896, 353, 330, 11178, 29889, 3125, 703, 29896, 29896, 29896, 29896, 29896, 29896, 29896, 29896, 29896, 29896, 29896, 29896, 29896, 29896, 29896, 29896, 29896, 29896, 29896, 29896, 29896, 29896, 29896, 1159, 13, 1678, 274, 29896, 29889, 1545, 1598, 29918, 16264, 29898, 4141, 29895, 29889, 19713, 29918, 29940, 1955, 1529, 29931, 29892, 330, 11178, 29889, 29887, 8181, 29889, 3306, 877, 9539, 8785, 13, 1678, 274, 29906, 353, 330, 11178, 29889, 3125, 703, 29896, 29906, 29906, 29906, 29906, 29906, 29906, 29906, 29906, 29906, 29906, 29906, 29906, 29906, 29906, 29906, 29906, 29906, 29906, 29906, 29906, 29906, 29906, 29906, 1159, 13, 1678, 274, 29896, 29889, 1545, 1598, 29918, 16264, 29898, 4141, 29895, 29889, 19713, 29918, 29940, 1955, 1529, 29931, 29892, 330, 11178, 29889, 29887, 8181, 29889, 3306, 877, 1127, 8785, 13, 1678, 282, 29889, 1202, 29896, 29898, 29883, 29896, 29897, 13, 1678, 282, 29889, 1202, 29906, 29898, 29883, 29906, 29897, 13, 1678, 3800, 29889, 4058, 29918, 2962, 29898, 29886, 29897, 13, 13, 1678, 282, 353, 379, 23684, 287, 580, 13, 1678, 274, 29896, 353, 330, 11178, 29889, 3125, 703, 29896, 29896, 29896, 29896, 29896, 29896, 29896, 29896, 29896, 29896, 29896, 29896, 29896, 29896, 29896, 29896, 29896, 29896, 29896, 29896, 29896, 29896, 29896, 1159, 13, 1678, 274, 29896, 29889, 1545, 1598, 29918, 16264, 29898, 4141, 29895, 29889, 19713, 29918, 29940, 1955, 1529, 29931, 29892, 330, 11178, 29889, 29887, 8181, 29889, 3306, 877, 9539, 8785, 13, 1678, 274, 29906, 353, 330, 11178, 29889, 3125, 703, 29896, 29906, 29906, 29906, 29906, 29906, 29906, 29906, 29906, 29906, 29906, 29906, 29906, 29906, 29906, 29906, 29906, 29906, 29906, 29906, 29906, 29906, 29906, 29906, 1159, 13, 1678, 274, 29896, 29889, 1545, 1598, 29918, 16264, 29898, 4141, 29895, 29889, 19713, 29918, 29940, 1955, 1529, 29931, 29892, 330, 11178, 29889, 29887, 8181, 29889, 3306, 877, 1127, 8785, 13, 1678, 282, 29889, 1202, 29896, 29898, 29883, 29896, 29897, 13, 1678, 282, 29889, 1202, 29906, 29898, 29883, 29906, 29897, 13, 1678, 3800, 29889, 4058, 29918, 2962, 29898, 29886, 29897, 13, 13, 1678, 281, 29889, 1202, 29898, 1884, 29897, 13, 1678, 281, 29889, 6915, 877, 20524, 742, 330, 11178, 29889, 3396, 29918, 28358, 29897, 13, 1678, 281, 29889, 4294, 29918, 497, 580, 13, 1678, 330, 11178, 29889, 3396, 580, 13, 2 ]
main.py
Forcide/ApacheParser
0
35204
<reponame>Forcide/ApacheParser from modules import menu, hosts, logMail, status, webpagina, zoekInLog def main(): """" Dit is de start file/functie van het programma, hierin worden alle modules geladen en zo nodig uitgevoerd. Het menu wordt gestart en de keuze wordt verwezen naar een van de modules. Geimporteerde modules: - menu - hosts - logMail - status - webpagina - zoekInLog """ keuze = menu.menu() if keuze == 1: logMail.logMail() elif keuze == 2: webpagina.bezochteWebpagina() elif keuze == 3: hosts.uniekeHosts() elif keuze == 4: status.aantalStatus() elif keuze == 5: zoekInLog.zoekInLog() elif keuze == 6: exit() hoofdmenu = menu.menuAfsluiten() if hoofdmenu == 'J': main() elif hoofdmenu == 'N': exit() main()
[ 1, 529, 276, 1112, 420, 29958, 2831, 8204, 29914, 17396, 1829, 11726, 13, 3166, 10585, 1053, 6143, 29892, 18982, 29892, 1480, 14925, 29892, 4660, 29892, 1856, 13573, 1099, 29892, 8534, 1416, 797, 3403, 13, 13, 1753, 1667, 7295, 13, 1678, 9995, 29908, 13, 1678, 18978, 338, 316, 1369, 934, 29914, 7692, 312, 347, 1109, 1681, 29213, 29892, 6128, 262, 7758, 4788, 10585, 9127, 4858, 427, 8534, 18778, 335, 3649, 479, 1365, 2018, 29889, 13, 1678, 5937, 6143, 9925, 7737, 442, 427, 316, 1589, 29884, 911, 9925, 1147, 705, 2256, 7553, 1739, 1109, 316, 10585, 29889, 13, 1678, 1879, 326, 13732, 11776, 10585, 29901, 13, 1678, 448, 6143, 13, 1678, 448, 18982, 13, 1678, 448, 1480, 14925, 13, 1678, 448, 4660, 13, 1678, 448, 1856, 13573, 1099, 13, 1678, 448, 8534, 1416, 797, 3403, 13, 1678, 9995, 13, 1678, 1589, 29884, 911, 353, 6143, 29889, 6510, 580, 13, 13, 1678, 565, 1589, 29884, 911, 1275, 29871, 29896, 29901, 13, 4706, 1480, 14925, 29889, 1188, 14925, 580, 13, 13, 1678, 25342, 1589, 29884, 911, 1275, 29871, 29906, 29901, 13, 4706, 1856, 13573, 1099, 29889, 915, 2502, 10948, 3609, 13573, 1099, 580, 13, 13, 1678, 25342, 1589, 29884, 911, 1275, 29871, 29941, 29901, 13, 4706, 18982, 29889, 348, 347, 446, 8514, 29879, 580, 13, 13, 1678, 25342, 1589, 29884, 911, 1275, 29871, 29946, 29901, 13, 4706, 4660, 29889, 29874, 17978, 5709, 580, 13, 13, 1678, 25342, 1589, 29884, 911, 1275, 29871, 29945, 29901, 13, 4706, 8534, 1416, 797, 3403, 29889, 2502, 1416, 797, 3403, 580, 13, 13, 1678, 25342, 1589, 29884, 911, 1275, 29871, 29953, 29901, 13, 4706, 6876, 580, 13, 13, 1678, 29621, 6510, 353, 6143, 29889, 6510, 29909, 29888, 2536, 3121, 264, 580, 13, 13, 1678, 565, 29621, 6510, 1275, 525, 29967, 2396, 13, 4706, 1667, 580, 13, 13, 1678, 25342, 29621, 6510, 1275, 525, 29940, 2396, 13, 4706, 6876, 580, 13, 13, 3396, 580, 13, 2 ]
hello-world1.py
lpereira1/pynet-study
0
1604874
print("hello world!") print("The world doesnt actually care.")
[ 1, 1596, 703, 12199, 3186, 29991, 1159, 13, 2158, 703, 1576, 3186, 19403, 2869, 2562, 23157, 13, 2 ]
Programs/Python/pysample_games.py
ShotaroBaba/Coding_practice
0
164547
<gh_stars>0 # Import Modules import os, pygame from pygame.locals import * from pygame.compat import geterror import time from random import randint if not pygame.font: print('Warning, fonts disabled') if not pygame.mixer: print('Warning, sound disabled') # Load data for generating image on the screen. data_dir = "../data/test_game_data" bullet_pos_pad_height = -20 enemy_shoot_interval = 500 enemy_generate_interval = 800 out_of_screen_margin = 80 # Method to load image [1] def load_image(name, colorkey=None): fullname = os.path.join(data_dir, name) try: image = pygame.image.load(fullname) except pygame.error: print('Cannot load image:', fullname) raise SystemExit(str(geterror())) image = image.convert() if colorkey is not None: if colorkey is -1: colorkey = image.get_at((0, 0)) image.set_colorkey(colorkey, RLEACCEL) return image, image.get_rect() # Method to load sound [1] # Will be added later. def load_sound(name): class NoneSound: def play(self): pass if not pygame.mixer or not pygame.mixer.get_init(): return NoneSound() fullname = os.path.join(data_dir, name) try: sound = pygame.mixer.Sound(fullname) except pygame.error: print('Cannot load sound: %s' % fullname) raise SystemExit(str(geterror())) return sound # Bullet class class Bullet(pygame.sprite.Sprite): # Later the move value might be added for # achieving flexibility. def __init__(self, player_rect, pos_pad = (-20, -20), bullet_image = "bullet.png"): pygame.sprite.Sprite.__init__(self) self.image, self.rect = load_image(bullet_image, -1) screen = pygame.display.get_surface() self.mask = pygame.mask.from_surface(self.image) self.area = screen.get_rect() new_pos = self.rect.move((player_rect.right + pos_pad[0], player_rect.top - pos_pad[1])) self.rect = new_pos # Move left every time # TODO: Bullet can track the movement of the player. def update(self, left_or_right): if left_or_right == "right": newpos = self.rect.move((1, 0)) self.rect = newpos if self.rect.right > self.area.right or \ self.rect.left < self.area.left or \ self.rect.bottom > self.area.bottom or \ self.rect.top < self.area.top: self.kill() elif left_or_right == "left": newpos = self.rect.move((-3, 0)) self.rect = newpos if self.rect.right > self.area.right or \ self.rect.left < self.area.left or \ self.rect.bottom > self.area.bottom or \ self.rect.top < self.area.top: self.kill() def hit(self): self.count += 1 # enemy defeated if a certain number of bullet are hit. if(self.count > self.num_count): self.kill() del self class Player(pygame.sprite.Sprite): def __init__(self): pygame.sprite.Sprite.__init__(self) self.image, self.rect = load_image('player.png', -1) screen = pygame.display.get_surface() self.area = screen.get_rect() self.mask = pygame.mask.from_surface(self.image) self.num_count = 10 self.count = 0 # TODO: Implement level up later self.power_up = 0 def move_down(self): if self.rect.bottom < self.area.bottom: newpos = self.rect.move((0, 1)) self.rect = newpos def move_up(self): if self.rect.top > self.area.top: newpos = self.rect.move((0, -1)) self.rect = newpos def move_left(self): if self.rect.left > self.area.left: newpos = self.rect.move((-1, 0)) self.rect = newpos def move_right(self): if self.rect.right < self.area.right: newpos = self.rect.move((1, 0)) self.rect = newpos def hit(self): self.count += 1 # Player is defeated if a certain number of bullet are hit. if(self.count > self.num_count): self.kill() del self # If enemy is normal, then it is counted as 10. class Enemy(pygame.sprite.Sprite): def __init__(self, num_count = 10, rect_random = False): pygame.sprite.Sprite.__init__(self) self.image, self.rect = load_image('enemy.png', -1) screen = pygame.display.get_surface() self.area = screen.get_rect() self.mask = pygame.mask.from_surface(self.image) newpos = self.rect.move((self.area.right - self.rect.right + out_of_screen_margin,0)) self.rect = newpos if rect_random: self.rect.y = randint(0, self.area.bottom - self.area.top - (self.rect.bottom - self.rect.top)) self.count = 0 self.num_count = num_count self.out_of_screen_left = self.area.left - out_of_screen_margin def update(self): newpos = self.rect.move((-1, 0)) self.rect = newpos if self.rect.left < self.out_of_screen_left: newpos = self.rect.move((self.area.right - self.rect.right + out_of_screen_margin,0)) self.rect = newpos self.rect.y = randint(0, self.area.bottom - self.area.top - (self.rect.bottom - self.rect.top)) def hit(self): self.count += 1 # enemy defeated if a certain number of bullet are hit. if(self.count > self.num_count): self.kill() del self def main(): # Background is black. black = (0, 0, 0) # Conduct Initialization pygame.init() screen = pygame.display.set_mode((600, 480)) # Create background background = pygame.Surface(screen.get_size()) background = background.convert() background.fill(black) # Show background screen.blit(background, (0, 0)) pygame.display.flip() # Initialise everything here... clock = pygame.time.Clock() player = Player() enemy = Enemy() screen.blit(player.image, player.rect) player_sprites = pygame.sprite.RenderPlain((player)) enemy_sprites = pygame.sprite.RenderPlain((enemy)) player_bullet_sprites = pygame.sprite.RenderPlain(()) enemy_bullet_sprites = pygame.sprite.RenderPlain(()) pygame.display.flip() # Set user events and timer enemy_shoot_event = USEREVENT + 1 difficulty_up_event = USEREVENT + 2 enemy_added_event = USEREVENT + 3 # Set the timers for these events pygame.time.set_timer(enemy_shoot_event, enemy_shoot_interval) pygame.time.set_timer(enemy_added_event, enemy_generate_interval) going = True count = 0 while going: clock.tick(70) key_state = pygame.key.get_pressed() if key_state[K_ESCAPE]: going = False if key_state[K_UP]: player.move_up() # player.move_down() if key_state[K_DOWN]: player.move_down() # player.move_up() if key_state[K_LEFT]: player.move_left() # player.move_left() if key_state[K_RIGHT]: player.move_right() # player.move_right() if key_state[K_SPACE]: player_bullet_sprites.add(Bullet(player.rect)) # Handling the input events for event in pygame.event.get(): if event.type == QUIT: going = False # Shoot every 0.5 seconds. if event.type == enemy_shoot_event: for ene in enemy_sprites.sprites(): enemy_bullet_sprites.add(Bullet(ene.rect, (-30, -15), "enemy_bullet.png")) if event.type == enemy_added_event: enemy_sprites.add(Enemy(rect_random = True)) # Enemy move for ene in enemy_sprites.sprites(): ene.update() # Check whether the player bullet is hit by the enemy. for i in pygame.sprite.groupcollide(enemy_sprites, player_bullet_sprites, dokilla = False, dokillb = True, collided = pygame.sprite.collide_mask).keys(): i.hit() # If the player is hit by the enemy, then it will disappear pygame.sprite.groupcollide(enemy_sprites, player_sprites, dokilla = True, dokillb = True, collided = pygame.sprite.collide_mask) # Check whether the enemy bullet is hit by the player. if pygame.sprite.spritecollide(player, enemy_bullet_sprites, True, collided = pygame.sprite.collide_mask) != []: player.hit() if len(enemy_sprites.sprites()) == 0: enemy_sprites.add(Enemy(rect_random = True)) # Update locations player_sprites.update() enemy_sprites.update() player_bullet_sprites.update("right") enemy_bullet_sprites.update("left") # Collided with enemy screen.blit(background, (0, 0)) player_sprites.draw(screen) enemy_sprites.draw(screen) player_bullet_sprites.draw(screen) enemy_bullet_sprites.draw(screen) pygame.display.flip() pygame.quit() if __name__ == '__main__': main() # Reference: # Magimel, F., & <NAME>. (2019). chimp.py (Version 1.9.6) [Computer Software]. # Retreived from https://github.com/pygame/pygame/blob/master/examples/chimp.py
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 16032, 3382, 2540, 13, 5215, 2897, 29892, 22028, 13, 3166, 22028, 29889, 2997, 29879, 1053, 334, 13, 3166, 22028, 29889, 12667, 1053, 679, 2704, 13, 5215, 931, 13, 3166, 4036, 1053, 20088, 524, 13, 13, 361, 451, 22028, 29889, 5657, 29901, 1596, 877, 22709, 29892, 23849, 12708, 1495, 13, 361, 451, 22028, 29889, 28084, 261, 29901, 1596, 877, 22709, 29892, 6047, 12708, 1495, 13, 13, 29937, 16012, 848, 363, 14655, 1967, 373, 278, 4315, 29889, 13, 1272, 29918, 3972, 353, 376, 6995, 1272, 29914, 1688, 29918, 11802, 29918, 1272, 29908, 13, 13, 18850, 29918, 1066, 29918, 8305, 29918, 3545, 353, 448, 29906, 29900, 13, 264, 6764, 29918, 845, 3155, 29918, 19207, 353, 29871, 29945, 29900, 29900, 13, 264, 6764, 29918, 17158, 29918, 19207, 353, 29871, 29947, 29900, 29900, 13, 449, 29918, 974, 29918, 10525, 29918, 9264, 353, 29871, 29947, 29900, 13, 13, 13, 29937, 8108, 304, 2254, 1967, 518, 29896, 29962, 13, 1753, 2254, 29918, 3027, 29898, 978, 29892, 2927, 1989, 29922, 8516, 1125, 13, 1678, 2989, 978, 353, 2897, 29889, 2084, 29889, 7122, 29898, 1272, 29918, 3972, 29892, 1024, 29897, 13, 1678, 1018, 29901, 13, 4706, 1967, 353, 22028, 29889, 3027, 29889, 1359, 29898, 8159, 978, 29897, 13, 1678, 5174, 22028, 29889, 2704, 29901, 13, 4706, 1596, 877, 29089, 2254, 1967, 29901, 742, 2989, 978, 29897, 13, 4706, 12020, 2184, 24365, 29898, 710, 29898, 657, 2704, 22130, 13, 1678, 1967, 353, 1967, 29889, 13441, 580, 13, 1678, 565, 2927, 1989, 338, 451, 6213, 29901, 13, 4706, 565, 2927, 1989, 338, 448, 29896, 29901, 13, 9651, 2927, 1989, 353, 1967, 29889, 657, 29918, 271, 3552, 29900, 29892, 29871, 29900, 876, 13, 4706, 1967, 29889, 842, 29918, 2780, 1989, 29898, 2780, 1989, 29892, 390, 1307, 2477, 4741, 29931, 29897, 13, 1678, 736, 1967, 29892, 1967, 29889, 657, 29918, 1621, 580, 13, 13, 29937, 8108, 304, 2254, 6047, 518, 29896, 29962, 13, 29937, 2811, 367, 2715, 2678, 29889, 13, 1753, 2254, 29918, 29802, 29898, 978, 1125, 13, 1678, 770, 6213, 29456, 29901, 13, 4706, 822, 1708, 29898, 1311, 1125, 1209, 13, 1678, 565, 451, 22028, 29889, 28084, 261, 470, 451, 22028, 29889, 28084, 261, 29889, 657, 29918, 2344, 7295, 13, 4706, 736, 6213, 29456, 580, 13, 1678, 2989, 978, 353, 2897, 29889, 2084, 29889, 7122, 29898, 1272, 29918, 3972, 29892, 1024, 29897, 13, 1678, 1018, 29901, 13, 4706, 6047, 353, 22028, 29889, 28084, 261, 29889, 29456, 29898, 8159, 978, 29897, 13, 1678, 5174, 22028, 29889, 2704, 29901, 13, 4706, 1596, 877, 29089, 2254, 6047, 29901, 1273, 29879, 29915, 1273, 2989, 978, 29897, 13, 4706, 12020, 2184, 24365, 29898, 710, 29898, 657, 2704, 22130, 13, 1678, 736, 6047, 13, 13, 29937, 8313, 1026, 770, 13, 1990, 8313, 1026, 29898, 2272, 11802, 29889, 15099, 568, 29889, 29903, 558, 568, 1125, 13, 1678, 396, 12699, 278, 4337, 995, 1795, 367, 2715, 363, 13, 1678, 396, 3657, 15387, 8525, 4127, 29889, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 4847, 29918, 1621, 29892, 926, 29918, 8305, 353, 8521, 29906, 29900, 29892, 448, 29906, 29900, 511, 24334, 29918, 3027, 353, 376, 18850, 29889, 2732, 29908, 1125, 13, 4706, 22028, 29889, 15099, 568, 29889, 29903, 558, 568, 17255, 2344, 12035, 1311, 29897, 13, 4706, 1583, 29889, 3027, 29892, 1583, 29889, 1621, 353, 2254, 29918, 3027, 29898, 18850, 29918, 3027, 29892, 448, 29896, 29897, 13, 4706, 4315, 353, 22028, 29889, 4990, 29889, 657, 29918, 7610, 2161, 580, 13, 4706, 1583, 29889, 13168, 353, 22028, 29889, 13168, 29889, 3166, 29918, 7610, 2161, 29898, 1311, 29889, 3027, 29897, 13, 4706, 1583, 29889, 6203, 353, 4315, 29889, 657, 29918, 1621, 580, 13, 4706, 716, 29918, 1066, 353, 1583, 29889, 1621, 29889, 11631, 3552, 9106, 29918, 1621, 29889, 1266, 718, 926, 29918, 8305, 29961, 29900, 1402, 4847, 29918, 1621, 29889, 3332, 448, 926, 29918, 8305, 29961, 29896, 12622, 13, 4706, 1583, 29889, 1621, 353, 716, 29918, 1066, 13, 13, 1678, 396, 25249, 2175, 1432, 931, 13, 1678, 396, 14402, 29901, 8313, 1026, 508, 5702, 278, 10298, 310, 278, 4847, 29889, 13, 1678, 822, 2767, 29898, 1311, 29892, 2175, 29918, 272, 29918, 1266, 1125, 13, 4706, 565, 2175, 29918, 272, 29918, 1266, 1275, 376, 1266, 1115, 13, 9651, 716, 1066, 353, 1583, 29889, 1621, 29889, 11631, 3552, 29896, 29892, 29871, 29900, 876, 13, 9651, 1583, 29889, 1621, 353, 716, 1066, 13, 9651, 565, 1583, 29889, 1621, 29889, 1266, 1405, 1583, 29889, 6203, 29889, 1266, 470, 320, 13, 9651, 1583, 29889, 1621, 29889, 1563, 529, 1583, 29889, 6203, 29889, 1563, 470, 320, 13, 9651, 1583, 29889, 1621, 29889, 8968, 1405, 1583, 29889, 6203, 29889, 8968, 470, 320, 13, 9651, 1583, 29889, 1621, 29889, 3332, 529, 1583, 29889, 6203, 29889, 3332, 29901, 13, 18884, 1583, 29889, 21174, 580, 13, 4706, 25342, 2175, 29918, 272, 29918, 1266, 1275, 376, 1563, 1115, 13, 9651, 716, 1066, 353, 1583, 29889, 1621, 29889, 11631, 3552, 29899, 29941, 29892, 29871, 29900, 876, 13, 9651, 1583, 29889, 1621, 353, 716, 1066, 13, 9651, 565, 1583, 29889, 1621, 29889, 1266, 1405, 1583, 29889, 6203, 29889, 1266, 470, 320, 13, 9651, 1583, 29889, 1621, 29889, 1563, 529, 1583, 29889, 6203, 29889, 1563, 470, 320, 13, 9651, 1583, 29889, 1621, 29889, 8968, 1405, 1583, 29889, 6203, 29889, 8968, 470, 320, 13, 9651, 1583, 29889, 1621, 29889, 3332, 529, 1583, 29889, 6203, 29889, 3332, 29901, 13, 18884, 1583, 29889, 21174, 580, 13, 13, 1678, 822, 7124, 29898, 1311, 1125, 13, 4706, 1583, 29889, 2798, 4619, 29871, 29896, 13, 4706, 396, 11103, 16235, 565, 263, 3058, 1353, 310, 24334, 526, 7124, 29889, 13, 4706, 565, 29898, 1311, 29889, 2798, 1405, 1583, 29889, 1949, 29918, 2798, 1125, 13, 9651, 1583, 29889, 21174, 580, 13, 9651, 628, 1583, 13, 13, 1990, 14574, 29898, 2272, 11802, 29889, 15099, 568, 29889, 29903, 558, 568, 1125, 13, 1678, 822, 4770, 2344, 12035, 1311, 1125, 13, 4706, 22028, 29889, 15099, 568, 29889, 29903, 558, 568, 17255, 2344, 12035, 1311, 29897, 13, 4706, 1583, 29889, 3027, 29892, 1583, 29889, 1621, 353, 2254, 29918, 3027, 877, 9106, 29889, 2732, 742, 448, 29896, 29897, 13, 4706, 4315, 353, 22028, 29889, 4990, 29889, 657, 29918, 7610, 2161, 580, 13, 4706, 1583, 29889, 6203, 353, 4315, 29889, 657, 29918, 1621, 580, 13, 4706, 1583, 29889, 13168, 353, 22028, 29889, 13168, 29889, 3166, 29918, 7610, 2161, 29898, 1311, 29889, 3027, 29897, 13, 4706, 1583, 29889, 1949, 29918, 2798, 353, 29871, 29896, 29900, 13, 4706, 1583, 29889, 2798, 353, 29871, 29900, 13, 13, 4706, 396, 14402, 29901, 1954, 2037, 3233, 701, 2678, 13, 4706, 1583, 29889, 13519, 29918, 786, 353, 29871, 29900, 13, 13, 1678, 822, 4337, 29918, 3204, 29898, 1311, 1125, 13, 4706, 565, 1583, 29889, 1621, 29889, 8968, 529, 1583, 29889, 6203, 29889, 8968, 29901, 13, 9651, 716, 1066, 353, 1583, 29889, 1621, 29889, 11631, 3552, 29900, 29892, 29871, 29896, 876, 13, 9651, 1583, 29889, 1621, 353, 716, 1066, 13, 268, 13, 1678, 822, 4337, 29918, 786, 29898, 1311, 1125, 13, 4706, 565, 1583, 29889, 1621, 29889, 3332, 1405, 1583, 29889, 6203, 29889, 3332, 29901, 13, 9651, 716, 1066, 353, 1583, 29889, 1621, 29889, 11631, 3552, 29900, 29892, 448, 29896, 876, 13, 9651, 1583, 29889, 1621, 353, 716, 1066, 13, 308, 13, 1678, 822, 4337, 29918, 1563, 29898, 1311, 1125, 13, 4706, 565, 1583, 29889, 1621, 29889, 1563, 1405, 1583, 29889, 6203, 29889, 1563, 29901, 13, 9651, 716, 1066, 353, 1583, 29889, 1621, 29889, 11631, 3552, 29899, 29896, 29892, 29871, 29900, 876, 13, 9651, 1583, 29889, 1621, 353, 716, 1066, 13, 268, 13, 1678, 822, 4337, 29918, 1266, 29898, 1311, 1125, 13, 4706, 565, 1583, 29889, 1621, 29889, 1266, 529, 1583, 29889, 6203, 29889, 1266, 29901, 13, 9651, 716, 1066, 353, 1583, 29889, 1621, 29889, 11631, 3552, 29896, 29892, 29871, 29900, 876, 13, 9651, 1583, 29889, 1621, 353, 716, 1066, 13, 13, 1678, 822, 7124, 29898, 1311, 1125, 13, 4706, 1583, 29889, 2798, 4619, 29871, 29896, 13, 4706, 396, 14574, 338, 16235, 565, 263, 3058, 1353, 310, 24334, 526, 7124, 29889, 13, 4706, 565, 29898, 1311, 29889, 2798, 1405, 1583, 29889, 1949, 29918, 2798, 1125, 13, 9651, 1583, 29889, 21174, 580, 13, 9651, 628, 1583, 13, 13, 29937, 960, 11103, 338, 4226, 29892, 769, 372, 338, 29115, 408, 29871, 29896, 29900, 29889, 13, 1990, 1174, 6764, 29898, 2272, 11802, 29889, 15099, 568, 29889, 29903, 558, 568, 1125, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 954, 29918, 2798, 353, 29871, 29896, 29900, 29892, 7705, 29918, 8172, 353, 7700, 1125, 13, 4706, 22028, 29889, 15099, 568, 29889, 29903, 558, 568, 17255, 2344, 12035, 1311, 29897, 13, 4706, 1583, 29889, 3027, 29892, 1583, 29889, 1621, 353, 2254, 29918, 3027, 877, 264, 6764, 29889, 2732, 742, 448, 29896, 29897, 13, 4706, 4315, 353, 22028, 29889, 4990, 29889, 657, 29918, 7610, 2161, 580, 13, 4706, 1583, 29889, 6203, 353, 4315, 29889, 657, 29918, 1621, 580, 13, 4706, 1583, 29889, 13168, 353, 22028, 29889, 13168, 29889, 3166, 29918, 7610, 2161, 29898, 1311, 29889, 3027, 29897, 13, 4706, 716, 1066, 353, 1583, 29889, 1621, 29889, 11631, 3552, 1311, 29889, 6203, 29889, 1266, 448, 1583, 29889, 1621, 29889, 1266, 718, 714, 29918, 974, 29918, 10525, 29918, 9264, 29892, 29900, 876, 13, 4706, 1583, 29889, 1621, 353, 716, 1066, 13, 4706, 565, 7705, 29918, 8172, 29901, 13, 9651, 1583, 29889, 1621, 29889, 29891, 353, 20088, 524, 29898, 29900, 29892, 1583, 29889, 6203, 29889, 8968, 448, 1583, 29889, 6203, 29889, 3332, 448, 313, 1311, 29889, 1621, 29889, 8968, 448, 1583, 29889, 1621, 29889, 3332, 876, 13, 4706, 1583, 29889, 2798, 353, 29871, 29900, 13, 4706, 1583, 29889, 1949, 29918, 2798, 353, 954, 29918, 2798, 13, 4706, 1583, 29889, 449, 29918, 974, 29918, 10525, 29918, 1563, 353, 1583, 29889, 6203, 29889, 1563, 448, 714, 29918, 974, 29918, 10525, 29918, 9264, 13, 268, 13, 1678, 822, 2767, 29898, 1311, 1125, 13, 4706, 716, 1066, 353, 1583, 29889, 1621, 29889, 11631, 3552, 29899, 29896, 29892, 29871, 29900, 876, 13, 4706, 1583, 29889, 1621, 353, 716, 1066, 13, 4706, 565, 1583, 29889, 1621, 29889, 1563, 529, 1583, 29889, 449, 29918, 974, 29918, 10525, 29918, 1563, 29901, 13, 9651, 716, 1066, 353, 1583, 29889, 1621, 29889, 11631, 3552, 1311, 29889, 6203, 29889, 1266, 448, 1583, 29889, 1621, 29889, 1266, 718, 714, 29918, 974, 29918, 10525, 29918, 9264, 29892, 29900, 876, 13, 9651, 1583, 29889, 1621, 353, 716, 1066, 13, 9651, 1583, 29889, 1621, 29889, 29891, 353, 20088, 524, 29898, 29900, 29892, 1583, 29889, 6203, 29889, 8968, 448, 1583, 29889, 6203, 29889, 3332, 448, 313, 1311, 29889, 1621, 29889, 8968, 448, 1583, 29889, 1621, 29889, 3332, 876, 13, 13, 13, 1678, 822, 7124, 29898, 1311, 1125, 13, 4706, 1583, 29889, 2798, 4619, 29871, 29896, 13, 4706, 396, 11103, 16235, 565, 263, 3058, 1353, 310, 24334, 526, 7124, 29889, 13, 4706, 565, 29898, 1311, 29889, 2798, 1405, 1583, 29889, 1949, 29918, 2798, 1125, 13, 9651, 1583, 29889, 21174, 580, 13, 9651, 628, 1583, 13, 13, 1753, 1667, 7295, 13, 13, 1678, 396, 16585, 338, 4628, 29889, 13, 1678, 4628, 353, 313, 29900, 29892, 29871, 29900, 29892, 29871, 29900, 29897, 13, 13, 1678, 396, 1281, 2199, 17250, 2133, 13, 1678, 22028, 29889, 2344, 580, 13, 1678, 4315, 353, 22028, 29889, 4990, 29889, 842, 29918, 8513, 3552, 29953, 29900, 29900, 29892, 29871, 29946, 29947, 29900, 876, 13, 13, 1678, 396, 6204, 3239, 13, 1678, 3239, 353, 22028, 29889, 18498, 2161, 29898, 10525, 29889, 657, 29918, 2311, 3101, 13, 1678, 3239, 353, 3239, 29889, 13441, 580, 13, 1678, 3239, 29889, 5589, 29898, 8517, 29897, 13, 13, 1678, 396, 7704, 3239, 13, 1678, 4315, 29889, 2204, 277, 29898, 7042, 29892, 313, 29900, 29892, 29871, 29900, 876, 13, 1678, 22028, 29889, 4990, 29889, 29888, 3466, 580, 13, 13, 1678, 396, 17250, 895, 4129, 1244, 856, 13, 1678, 12006, 353, 22028, 29889, 2230, 29889, 29907, 908, 580, 13, 1678, 4847, 353, 14574, 580, 13, 1678, 11103, 353, 1174, 6764, 580, 13, 1678, 4315, 29889, 2204, 277, 29898, 9106, 29889, 3027, 29892, 4847, 29889, 1621, 29897, 13, 1678, 4847, 29918, 15099, 3246, 353, 22028, 29889, 15099, 568, 29889, 10716, 29925, 7420, 3552, 9106, 876, 13, 1678, 11103, 29918, 15099, 3246, 353, 22028, 29889, 15099, 568, 29889, 10716, 29925, 7420, 3552, 264, 6764, 876, 13, 1678, 4847, 29918, 18850, 29918, 15099, 3246, 353, 22028, 29889, 15099, 568, 29889, 10716, 29925, 7420, 29898, 3101, 13, 1678, 11103, 29918, 18850, 29918, 15099, 3246, 353, 22028, 29889, 15099, 568, 29889, 10716, 29925, 7420, 29898, 3101, 13, 1678, 22028, 29889, 4990, 29889, 29888, 3466, 580, 13, 268, 13, 1678, 396, 3789, 1404, 4959, 322, 12237, 13, 1678, 11103, 29918, 845, 3155, 29918, 3696, 353, 3148, 1001, 22240, 3919, 718, 29871, 29896, 13, 1678, 14656, 29918, 786, 29918, 3696, 353, 3148, 1001, 22240, 3919, 718, 29871, 29906, 13, 1678, 11103, 29918, 23959, 29918, 3696, 353, 3148, 1001, 22240, 3919, 718, 29871, 29941, 13, 13, 1678, 396, 3789, 278, 5335, 414, 363, 1438, 4959, 13, 1678, 22028, 29889, 2230, 29889, 842, 29918, 20404, 29898, 264, 6764, 29918, 845, 3155, 29918, 3696, 29892, 11103, 29918, 845, 3155, 29918, 19207, 29897, 13, 1678, 22028, 29889, 2230, 29889, 842, 29918, 20404, 29898, 264, 6764, 29918, 23959, 29918, 3696, 29892, 11103, 29918, 17158, 29918, 19207, 29897, 13, 13, 1678, 2675, 353, 5852, 13, 1678, 2302, 353, 29871, 29900, 13, 1678, 1550, 2675, 29901, 13, 4706, 12006, 29889, 24667, 29898, 29955, 29900, 29897, 13, 13, 4706, 1820, 29918, 3859, 353, 22028, 29889, 1989, 29889, 657, 29918, 13120, 580, 13, 13, 4706, 565, 1820, 29918, 3859, 29961, 29968, 29918, 2890, 29907, 3301, 29923, 5387, 13, 9651, 2675, 353, 7700, 13, 4706, 565, 1820, 29918, 3859, 29961, 29968, 29918, 4897, 5387, 13, 9651, 4847, 29889, 11631, 29918, 786, 580, 13, 9651, 396, 4847, 29889, 11631, 29918, 3204, 580, 13, 4706, 565, 1820, 29918, 3859, 29961, 29968, 29918, 3970, 16048, 5387, 13, 9651, 4847, 29889, 11631, 29918, 3204, 580, 13, 9651, 396, 4847, 29889, 11631, 29918, 786, 580, 13, 4706, 565, 1820, 29918, 3859, 29961, 29968, 29918, 28024, 5387, 13, 9651, 4847, 29889, 11631, 29918, 1563, 580, 13, 9651, 396, 4847, 29889, 11631, 29918, 1563, 580, 13, 4706, 565, 1820, 29918, 3859, 29961, 29968, 29918, 22789, 3912, 5387, 13, 9651, 4847, 29889, 11631, 29918, 1266, 580, 259, 13, 9651, 396, 4847, 29889, 11631, 29918, 1266, 580, 13, 4706, 565, 1820, 29918, 3859, 29961, 29968, 29918, 5550, 11538, 5387, 13, 9651, 4847, 29918, 18850, 29918, 15099, 3246, 29889, 1202, 29898, 29933, 352, 1026, 29898, 9106, 29889, 1621, 876, 13, 308, 13, 4706, 396, 5166, 1847, 278, 1881, 4959, 13, 4706, 363, 1741, 297, 22028, 29889, 3696, 29889, 657, 7295, 13, 9651, 565, 1741, 29889, 1853, 1275, 660, 29965, 1806, 29901, 13, 18884, 2675, 353, 7700, 13, 632, 13, 9651, 396, 17550, 327, 1432, 29871, 29900, 29889, 29945, 6923, 29889, 13, 9651, 565, 1741, 29889, 1853, 1275, 11103, 29918, 845, 3155, 29918, 3696, 29901, 13, 18884, 363, 427, 29872, 297, 11103, 29918, 15099, 3246, 29889, 15099, 3246, 7295, 13, 462, 1678, 11103, 29918, 18850, 29918, 15099, 3246, 29889, 1202, 29898, 29933, 352, 1026, 29898, 1600, 29889, 1621, 29892, 8521, 29941, 29900, 29892, 448, 29896, 29945, 511, 376, 264, 6764, 29918, 18850, 29889, 2732, 5783, 13, 9651, 565, 1741, 29889, 1853, 1275, 11103, 29918, 23959, 29918, 3696, 29901, 13, 18884, 11103, 29918, 15099, 3246, 29889, 1202, 29898, 2369, 6764, 29898, 1621, 29918, 8172, 353, 5852, 876, 13, 13, 4706, 396, 1174, 6764, 4337, 13, 4706, 363, 427, 29872, 297, 11103, 29918, 15099, 3246, 29889, 15099, 3246, 7295, 13, 9651, 427, 29872, 29889, 5504, 580, 13, 13, 4706, 396, 5399, 3692, 278, 4847, 24334, 338, 7124, 491, 278, 11103, 29889, 13, 4706, 363, 474, 297, 22028, 29889, 15099, 568, 29889, 2972, 1054, 7459, 29898, 264, 6764, 29918, 15099, 3246, 29892, 4847, 29918, 18850, 29918, 15099, 3246, 29892, 18004, 2911, 353, 7700, 29892, 18004, 453, 29890, 353, 5852, 29892, 5321, 2618, 353, 22028, 29889, 15099, 568, 29889, 1054, 7459, 29918, 13168, 467, 8149, 7295, 13, 9651, 474, 29889, 27342, 580, 13, 13, 4706, 396, 960, 278, 4847, 338, 7124, 491, 278, 11103, 29892, 769, 372, 674, 25417, 13, 4706, 22028, 29889, 15099, 568, 29889, 2972, 1054, 7459, 29898, 264, 6764, 29918, 15099, 3246, 29892, 4847, 29918, 15099, 3246, 29892, 18004, 2911, 353, 5852, 29892, 18004, 453, 29890, 353, 5852, 29892, 5321, 2618, 353, 22028, 29889, 15099, 568, 29889, 1054, 7459, 29918, 13168, 29897, 13, 308, 13, 4706, 396, 5399, 3692, 278, 11103, 24334, 338, 7124, 491, 278, 4847, 29889, 13, 4706, 565, 22028, 29889, 15099, 568, 29889, 15099, 568, 1054, 7459, 29898, 9106, 29892, 11103, 29918, 18850, 29918, 15099, 3246, 29892, 5852, 29892, 5321, 2618, 353, 22028, 29889, 15099, 568, 29889, 1054, 7459, 29918, 13168, 29897, 2804, 5159, 29901, 13, 9651, 4847, 29889, 27342, 580, 13, 13, 4706, 565, 7431, 29898, 264, 6764, 29918, 15099, 3246, 29889, 15099, 3246, 3101, 1275, 29871, 29900, 29901, 13, 9651, 11103, 29918, 15099, 3246, 29889, 1202, 29898, 2369, 6764, 29898, 1621, 29918, 8172, 353, 5852, 876, 13, 13, 4706, 396, 10318, 14354, 13, 4706, 4847, 29918, 15099, 3246, 29889, 5504, 580, 13, 4706, 11103, 29918, 15099, 3246, 29889, 5504, 580, 13, 4706, 4847, 29918, 18850, 29918, 15099, 3246, 29889, 5504, 703, 1266, 1159, 13, 4706, 11103, 29918, 18850, 29918, 15099, 3246, 29889, 5504, 703, 1563, 1159, 13, 308, 13, 4706, 396, 13435, 2618, 411, 11103, 13, 4706, 4315, 29889, 2204, 277, 29898, 7042, 29892, 313, 29900, 29892, 29871, 29900, 876, 13, 13, 4706, 4847, 29918, 15099, 3246, 29889, 4012, 29898, 10525, 29897, 13, 4706, 11103, 29918, 15099, 3246, 29889, 4012, 29898, 10525, 29897, 13, 4706, 4847, 29918, 18850, 29918, 15099, 3246, 29889, 4012, 29898, 10525, 29897, 13, 4706, 11103, 29918, 18850, 29918, 15099, 3246, 29889, 4012, 29898, 10525, 29897, 13, 4706, 22028, 29889, 4990, 29889, 29888, 3466, 580, 13, 268, 13, 1678, 22028, 29889, 28358, 580, 13, 13, 361, 4770, 978, 1649, 1275, 525, 1649, 3396, 1649, 2396, 13, 1678, 1667, 580, 13, 13, 13, 29937, 12105, 29901, 13, 29937, 3561, 326, 295, 29892, 383, 1696, 669, 529, 5813, 15513, 313, 29906, 29900, 29896, 29929, 467, 521, 6574, 29889, 2272, 313, 6594, 29871, 29896, 29889, 29929, 29889, 29953, 29897, 518, 20606, 261, 18540, 1822, 29871, 13, 29937, 259, 4649, 276, 2347, 515, 2045, 597, 3292, 29889, 510, 29914, 2272, 11802, 29914, 2272, 11802, 29914, 10054, 29914, 6207, 29914, 19057, 29914, 305, 6574, 29889, 2272, 2 ]
collect_face_data.py
consolas-K/Dlib_faceRecognition
1
144149
import cv2 as cv import time import os import config class face_detect(): def __init__(self): self.start_time = 0 # 用于计算帧率 self.fps = 0 # 帧率 self.image = None self.face_img = None self.face_num = 0 # 这一帧的人脸个数 self.last_face_num = 0 # 上一帧的人脸个数 self.face_num_change_flag = False # 当前帧人脸数量变化的标志位,用于后续人脸识别提高帧率 self.quit_flag = False # 退出程序标志位 self.buildNewFolder = False # 按下"n"新建文件夹标志位 self.save_flag = False # 按下“s”保存人脸数据标志位 self.face_flag = False # 人脸检测标志位 self.img_num = 0 # 人脸数据文件夹内的图像个数 self.collect_face_data = True # 是否进行人脸数据的采集,只有为真时才会进行采集 def get_fps(self): now = time.time() time_period = now - self.start_time self.fps = 1.0 / time_period self.start_time = now color = (0,255,0) if self.fps < 15: color = (0,0,255) cv.putText(self.image, str(self.fps.__round__(2)), (20, 50), cv.FONT_HERSHEY_DUPLEX, 1, color) def key_scan(self, key): if self.collect_face_data == True: if self.save_flag == True and self.buildNewFolder == True: if self.face_img.size > 0: cv.imwrite( config.faceData_path + 'person_{}/{}.png'.format(config.num_of_person_in_lib - 1, self.img_num), self.face_img) self.img_num += 1 if key == ord('s'): self.save_flag = not self.save_flag if key == ord('n'): os.makedirs(config.faceData_path + 'person_{}'.format(config.num_of_person_in_lib)) config.num_of_person_in_lib += 1 print("新文件夹建立成功!!") self.buildNewFolder = True if key == ord('q'): self.quit_flag = True def face_detecting(self): face_location = [] all_face_location = [] faces = config.detector(self.image, 0) self.face_num = len(faces) if self.face_num != self.last_face_num: self.face_num_change_flag = True print("脸数改变,由{}张变为{}张".format(self.last_face_num, self.face_num)) self.check_times = 0 self.last_face_num = self.face_num else: self.face_num_change_flag = False if len(faces) != 0: self.face_flag = True for i, face in enumerate(faces): face_location.append(face) w, h = (face.right() - face.left()), (face.bottom() - face.top()) left, right, top, bottom = face.left() - w//4, face.right() + w//4, face.top() - h//2, face.bottom() + h//4 all_face_location.append([left, right, top, bottom]) return face_location, all_face_location else: self.face_flag = False return None def show(self, camera): while camera.isOpened() and not self.quit_flag: val, self.image = camera.read() if val == False: continue key = cv.waitKey(1) res = self.face_detecting() if res is not None: _, all_face_location = res for i in range(self.face_num): [left, right, top, bottom] = all_face_location[i] self.face_img = self.image[top:bottom, left:right] cv.rectangle(self.image, (left, top), (right, bottom), (0, 0, 255)) if self.collect_face_data == True: cv.putText(self.image, "Face", (int((left + right) / 2) - 50, bottom + 20), cv.FONT_HERSHEY_COMPLEX, 1, (255, 255, 255)) self.key_scan(key) self.get_fps() cv.namedWindow('camera', 0) cv.imshow('camera', self.image) camera.release() cv.destroyAllWindows() def main(): try: cam = cv.VideoCapture(0) face_detect().show(cam) finally: cam.release() cv.destroyAllWindows() print("程序退出!!") if __name__ == '__main__': main()
[ 1, 1053, 13850, 29906, 408, 13850, 13, 5215, 931, 13, 5215, 2897, 13, 5215, 2295, 13, 13, 1990, 3700, 29918, 4801, 522, 7295, 13, 1678, 822, 4770, 2344, 12035, 1311, 1125, 13, 4706, 1583, 29889, 2962, 29918, 2230, 353, 29871, 29900, 462, 268, 396, 29871, 30406, 30909, 31466, 31565, 232, 187, 170, 234, 145, 138, 13, 4706, 1583, 29889, 29888, 567, 353, 29871, 29900, 462, 9651, 396, 29871, 232, 187, 170, 234, 145, 138, 13, 13, 4706, 1583, 29889, 3027, 353, 6213, 13, 4706, 1583, 29889, 2161, 29918, 2492, 353, 6213, 13, 13, 4706, 1583, 29889, 2161, 29918, 1949, 353, 29871, 29900, 462, 539, 396, 29871, 30810, 30287, 232, 187, 170, 30210, 30313, 235, 135, 187, 30502, 30354, 13, 4706, 1583, 29889, 4230, 29918, 2161, 29918, 1949, 353, 29871, 29900, 462, 29871, 396, 29871, 30429, 30287, 232, 187, 170, 30210, 30313, 235, 135, 187, 30502, 30354, 13, 13, 4706, 1583, 29889, 2161, 29918, 1949, 29918, 3167, 29918, 15581, 353, 7700, 539, 396, 29871, 30948, 30658, 232, 187, 170, 30313, 235, 135, 187, 30354, 31180, 31462, 30705, 30210, 31062, 31096, 30956, 30214, 30406, 30909, 30822, 234, 190, 176, 30313, 235, 135, 187, 235, 178, 137, 232, 139, 174, 31302, 30528, 232, 187, 170, 234, 145, 138, 13, 4706, 1583, 29889, 28358, 29918, 15581, 353, 7700, 462, 29871, 396, 29871, 236, 131, 131, 30544, 31101, 31463, 31062, 31096, 30956, 13, 4706, 1583, 29889, 4282, 4373, 12924, 353, 7700, 632, 396, 29871, 31590, 30557, 29908, 29876, 29908, 30374, 30886, 30333, 30631, 232, 167, 188, 31062, 31096, 30956, 13, 4706, 1583, 29889, 7620, 29918, 15581, 353, 7700, 462, 29871, 396, 29871, 31590, 30557, 30015, 29879, 30024, 30982, 30946, 30313, 235, 135, 187, 30354, 30763, 31062, 31096, 30956, 13, 4706, 1583, 29889, 2161, 29918, 15581, 353, 7700, 462, 29871, 396, 29871, 30313, 235, 135, 187, 233, 166, 131, 31851, 31062, 31096, 30956, 13, 13, 4706, 1583, 29889, 2492, 29918, 1949, 353, 29871, 29900, 462, 4706, 396, 29871, 30313, 235, 135, 187, 30354, 30763, 30333, 30631, 232, 167, 188, 30728, 30210, 30861, 31551, 30502, 30354, 13, 13, 4706, 1583, 29889, 15914, 29918, 2161, 29918, 1272, 353, 5852, 965, 396, 29871, 30392, 31191, 31174, 30448, 30313, 235, 135, 187, 30354, 30763, 30210, 236, 138, 138, 30893, 30214, 31557, 30417, 30573, 30848, 30594, 31979, 30437, 31174, 30448, 236, 138, 138, 30893, 13, 13, 1678, 822, 679, 29918, 29888, 567, 29898, 1311, 1125, 13, 4706, 1286, 353, 931, 29889, 2230, 580, 13, 4706, 931, 29918, 19145, 353, 1286, 448, 1583, 29889, 2962, 29918, 2230, 13, 4706, 1583, 29889, 29888, 567, 353, 29871, 29896, 29889, 29900, 847, 931, 29918, 19145, 13, 4706, 1583, 29889, 2962, 29918, 2230, 353, 1286, 13, 4706, 2927, 353, 313, 29900, 29892, 29906, 29945, 29945, 29892, 29900, 29897, 13, 4706, 565, 1583, 29889, 29888, 567, 529, 29871, 29896, 29945, 29901, 13, 9651, 2927, 353, 313, 29900, 29892, 29900, 29892, 29906, 29945, 29945, 29897, 13, 4706, 13850, 29889, 649, 1626, 29898, 1311, 29889, 3027, 29892, 851, 29898, 1311, 29889, 29888, 567, 17255, 14486, 12035, 29906, 8243, 313, 29906, 29900, 29892, 29871, 29945, 29900, 511, 13850, 29889, 29943, 1164, 29911, 29918, 4448, 7068, 13282, 29918, 29928, 4897, 1307, 29990, 29892, 29871, 29896, 29892, 2927, 29897, 13, 13, 1678, 822, 1820, 29918, 16192, 29898, 1311, 29892, 1820, 1125, 13, 4706, 565, 1583, 29889, 15914, 29918, 2161, 29918, 1272, 1275, 5852, 29901, 13, 9651, 565, 1583, 29889, 7620, 29918, 15581, 1275, 5852, 322, 1583, 29889, 4282, 4373, 12924, 1275, 5852, 29901, 13, 18884, 565, 1583, 29889, 2161, 29918, 2492, 29889, 2311, 1405, 29871, 29900, 29901, 13, 462, 1678, 13850, 29889, 326, 3539, 29898, 13, 462, 4706, 2295, 29889, 2161, 1469, 29918, 2084, 718, 525, 10532, 648, 6822, 29912, 1836, 2732, 4286, 4830, 29898, 2917, 29889, 1949, 29918, 974, 29918, 10532, 29918, 262, 29918, 1982, 448, 29871, 29896, 29892, 1583, 29889, 2492, 29918, 1949, 511, 13, 462, 4706, 1583, 29889, 2161, 29918, 2492, 29897, 13, 462, 1678, 1583, 29889, 2492, 29918, 1949, 4619, 29871, 29896, 13, 13, 9651, 565, 1820, 1275, 4356, 877, 29879, 29374, 13, 18884, 1583, 29889, 7620, 29918, 15581, 353, 451, 1583, 29889, 7620, 29918, 15581, 13, 13, 9651, 565, 1820, 1275, 4356, 877, 29876, 29374, 13, 18884, 2897, 29889, 29885, 12535, 12935, 29898, 2917, 29889, 2161, 1469, 29918, 2084, 718, 525, 10532, 648, 29913, 4286, 4830, 29898, 2917, 29889, 1949, 29918, 974, 29918, 10532, 29918, 262, 29918, 1982, 876, 13, 18884, 2295, 29889, 1949, 29918, 974, 29918, 10532, 29918, 262, 29918, 1982, 4619, 29871, 29896, 13, 18884, 1596, 703, 30374, 30333, 30631, 232, 167, 188, 30886, 30939, 30494, 31134, 6824, 1159, 13, 18884, 1583, 29889, 4282, 4373, 12924, 353, 5852, 13, 4706, 565, 1820, 1275, 4356, 877, 29939, 29374, 1583, 29889, 28358, 29918, 15581, 353, 5852, 13, 13, 1678, 822, 3700, 29918, 4801, 522, 292, 29898, 1311, 1125, 13, 4706, 3700, 29918, 5479, 353, 5159, 13, 4706, 599, 29918, 2161, 29918, 5479, 353, 5159, 13, 13, 4706, 17240, 353, 2295, 29889, 4801, 3019, 29898, 1311, 29889, 3027, 29892, 29871, 29900, 29897, 13, 4706, 1583, 29889, 2161, 29918, 1949, 353, 7431, 29898, 8726, 29897, 13, 13, 4706, 565, 1583, 29889, 2161, 29918, 1949, 2804, 1583, 29889, 4230, 29918, 2161, 29918, 1949, 29901, 13, 9651, 1583, 29889, 2161, 29918, 1949, 29918, 3167, 29918, 15581, 353, 5852, 13, 9651, 1596, 703, 235, 135, 187, 30354, 31264, 31462, 30214, 31272, 8875, 31328, 31462, 30573, 8875, 31328, 1642, 4830, 29898, 1311, 29889, 4230, 29918, 2161, 29918, 1949, 29892, 1583, 29889, 2161, 29918, 1949, 876, 13, 9651, 1583, 29889, 3198, 29918, 3706, 353, 29871, 29900, 13, 9651, 1583, 29889, 4230, 29918, 2161, 29918, 1949, 353, 1583, 29889, 2161, 29918, 1949, 13, 4706, 1683, 29901, 13, 9651, 1583, 29889, 2161, 29918, 1949, 29918, 3167, 29918, 15581, 353, 7700, 13, 13, 4706, 565, 7431, 29898, 8726, 29897, 2804, 29871, 29900, 29901, 13, 9651, 1583, 29889, 2161, 29918, 15581, 353, 5852, 13, 13, 9651, 363, 474, 29892, 3700, 297, 26985, 29898, 8726, 1125, 13, 18884, 3700, 29918, 5479, 29889, 4397, 29898, 2161, 29897, 13, 18884, 281, 29892, 298, 353, 313, 2161, 29889, 1266, 580, 448, 3700, 29889, 1563, 25739, 313, 2161, 29889, 8968, 580, 448, 3700, 29889, 3332, 3101, 13, 18884, 2175, 29892, 1492, 29892, 2246, 29892, 5970, 353, 3700, 29889, 1563, 580, 448, 281, 458, 29946, 29892, 3700, 29889, 1266, 580, 718, 281, 458, 29946, 29892, 3700, 29889, 3332, 580, 448, 298, 458, 29906, 29892, 3700, 29889, 8968, 580, 718, 298, 458, 29946, 13, 13, 18884, 599, 29918, 2161, 29918, 5479, 29889, 4397, 4197, 1563, 29892, 1492, 29892, 2246, 29892, 5970, 2314, 13, 13, 9651, 736, 3700, 29918, 5479, 29892, 599, 29918, 2161, 29918, 5479, 13, 4706, 1683, 29901, 13, 9651, 1583, 29889, 2161, 29918, 15581, 353, 7700, 13, 13, 4706, 736, 6213, 13, 13, 1678, 822, 1510, 29898, 1311, 29892, 10656, 1125, 13, 4706, 1550, 10656, 29889, 275, 6585, 287, 580, 322, 451, 1583, 29889, 28358, 29918, 15581, 29901, 13, 9651, 659, 29892, 1583, 29889, 3027, 353, 10656, 29889, 949, 580, 13, 9651, 565, 659, 1275, 7700, 29901, 6773, 13, 13, 9651, 1820, 353, 13850, 29889, 10685, 2558, 29898, 29896, 29897, 13, 13, 9651, 620, 353, 1583, 29889, 2161, 29918, 4801, 522, 292, 580, 13, 9651, 565, 620, 338, 451, 6213, 29901, 13, 18884, 17117, 599, 29918, 2161, 29918, 5479, 353, 620, 13, 13, 18884, 363, 474, 297, 3464, 29898, 1311, 29889, 2161, 29918, 1949, 1125, 13, 462, 1678, 518, 1563, 29892, 1492, 29892, 2246, 29892, 5970, 29962, 353, 599, 29918, 2161, 29918, 5479, 29961, 29875, 29962, 13, 462, 1678, 1583, 29889, 2161, 29918, 2492, 353, 1583, 29889, 3027, 29961, 3332, 29901, 8968, 29892, 2175, 29901, 1266, 29962, 13, 462, 1678, 13850, 29889, 1621, 2521, 29898, 1311, 29889, 3027, 29892, 313, 1563, 29892, 2246, 511, 313, 1266, 29892, 5970, 511, 313, 29900, 29892, 29871, 29900, 29892, 29871, 29906, 29945, 29945, 876, 13, 13, 462, 1678, 565, 1583, 29889, 15914, 29918, 2161, 29918, 1272, 1275, 5852, 29901, 13, 462, 4706, 13850, 29889, 649, 1626, 29898, 1311, 29889, 3027, 29892, 376, 23360, 613, 313, 524, 3552, 1563, 718, 1492, 29897, 847, 29871, 29906, 29897, 448, 29871, 29945, 29900, 29892, 5970, 718, 29871, 29906, 29900, 511, 13850, 29889, 29943, 1164, 29911, 29918, 4448, 7068, 13282, 29918, 21514, 1307, 29990, 29892, 29871, 29896, 29892, 13, 462, 462, 259, 313, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 876, 13, 13, 18884, 1583, 29889, 1989, 29918, 16192, 29898, 1989, 29897, 13, 13, 9651, 1583, 29889, 657, 29918, 29888, 567, 580, 13, 13, 9651, 13850, 29889, 17514, 5907, 877, 26065, 742, 29871, 29900, 29897, 13, 9651, 13850, 29889, 326, 4294, 877, 26065, 742, 1583, 29889, 3027, 29897, 13, 13, 4706, 10656, 29889, 14096, 580, 13, 4706, 13850, 29889, 20524, 3596, 7685, 580, 13, 13, 1753, 1667, 7295, 13, 1678, 1018, 29901, 13, 4706, 3949, 353, 13850, 29889, 15167, 21133, 545, 29898, 29900, 29897, 13, 4706, 3700, 29918, 4801, 522, 2141, 4294, 29898, 11108, 29897, 13, 1678, 7146, 29901, 13, 4706, 3949, 29889, 14096, 580, 13, 4706, 13850, 29889, 20524, 3596, 7685, 580, 13, 4706, 1596, 703, 31101, 31463, 236, 131, 131, 30544, 6824, 1159, 13, 13, 361, 4770, 978, 1649, 1275, 525, 1649, 3396, 1649, 2396, 13, 1678, 1667, 580, 2 ]
CloudJudge/info.py
zhuxiyulu/CloudJudge
1
106793
<reponame>zhuxiyulu/CloudJudge # 前台信息编码表 FrontMessageCode = {} # 后台信息编码表 BackMessageCode = {} # 编码、语言 FrontMessageCode['1'] = {"Help": "Username_Empty", "Zh": "用户不能为空"} FrontMessageCode['2'] = {"Help": "Password_Empty", "Zh": "密码不能为空"} FrontMessageCode['3'] = {"Help": "Username_NotEqual_Password", "Zh": "用户名和密码不匹配"} FrontMessageCode['4'] = {"Help": "LogoutFailed", "Zh": "登出失败"} FrontMessageCode['5'] = {"Help": "Captcha_Empty", "Zh": "验证码不能为空"} FrontMessageCode['6'] = {"Help": "Captcha_Wrong", "Zh": "验证码错误"} FrontMessageCode['7'] = {"Help": "User_Exists", "Zh": "该用户名已存在"} for key in FrontMessageCode.keys(): BackMessageCode[FrontMessageCode[key]['Help']] = key def getFrontMessage(): return FrontMessageCode def getBackMessage(): return BackMessageCode
[ 1, 529, 276, 1112, 420, 29958, 17599, 1314, 19881, 21528, 29914, 20442, 29967, 566, 479, 13, 13, 29937, 29871, 30658, 31037, 30689, 31021, 31795, 31183, 30746, 13, 29348, 3728, 3399, 353, 6571, 13, 29937, 29871, 30822, 31037, 30689, 31021, 31795, 31183, 30746, 13, 5841, 3728, 3399, 353, 6571, 13, 13, 13, 29937, 29871, 31795, 31183, 30330, 31505, 31243, 13, 29348, 3728, 3399, 1839, 29896, 2033, 353, 8853, 29648, 1115, 376, 20249, 29918, 8915, 613, 376, 29999, 29882, 1115, 376, 30406, 31229, 30413, 30815, 30573, 30816, 9092, 13, 29348, 3728, 3399, 1839, 29906, 2033, 353, 8853, 29648, 1115, 376, 10048, 29918, 8915, 613, 376, 29999, 29882, 1115, 376, 31461, 31183, 30413, 30815, 30573, 30816, 9092, 13, 29348, 3728, 3399, 1839, 29941, 2033, 353, 8853, 29648, 1115, 376, 20249, 29918, 3664, 9843, 29918, 10048, 613, 376, 29999, 29882, 1115, 376, 30406, 31229, 30548, 30503, 31461, 31183, 30413, 232, 143, 188, 31361, 9092, 13, 29348, 3728, 3399, 1839, 29946, 2033, 353, 8853, 29648, 1115, 376, 3403, 449, 17776, 613, 376, 29999, 29882, 1115, 376, 31451, 30544, 31369, 31955, 9092, 13, 29348, 3728, 3399, 1839, 29945, 2033, 353, 8853, 29648, 1115, 376, 21133, 5815, 29918, 8915, 613, 376, 29999, 29882, 1115, 376, 236, 173, 143, 235, 178, 132, 31183, 30413, 30815, 30573, 30816, 9092, 13, 29348, 3728, 3399, 1839, 29953, 2033, 353, 8853, 29648, 1115, 376, 21133, 5815, 29918, 29956, 29373, 613, 376, 29999, 29882, 1115, 376, 236, 173, 143, 235, 178, 132, 31183, 31745, 235, 178, 178, 9092, 13, 29348, 3728, 3399, 1839, 29955, 2033, 353, 8853, 29648, 1115, 376, 2659, 29918, 24217, 613, 376, 29999, 29882, 1115, 376, 31751, 30406, 31229, 30548, 31290, 30946, 30505, 9092, 13, 13, 13, 1454, 1820, 297, 13960, 3728, 3399, 29889, 8149, 7295, 13, 1678, 7437, 3728, 3399, 29961, 29348, 3728, 3399, 29961, 1989, 22322, 29648, 2033, 29962, 353, 1820, 13, 13, 1753, 679, 29348, 3728, 7295, 13, 1678, 736, 13960, 3728, 3399, 13, 13, 1753, 679, 5841, 3728, 7295, 13, 1678, 736, 7437, 3728, 3399, 2 ]
pyfu/cli/dashboard.py
danbarrese/pyfu
0
102777
<filename>pyfu/cli/dashboard.py import sys import os from sys import exit import yaml from pyfu.ui import ui yaml_path = os.path.expanduser("~") + '/.dashboard/dashboard.yaml' if not os.path.isfile(yaml_path): print("No yaml file: " + yaml_path) exit(1) yaml_contents = '\n'.join([line.rstrip('\n') for line in open(yaml_path)]) if not yaml_contents: print("Your yaml file is empty: " + yaml_path) exit(1) properties = yaml.load(yaml_contents) if len(sys.argv) == 1: dashboards = [] if properties: dashboards = [d['name'] for d in properties['dashboards']] dashboards = sorted(dashboards) print("Which dashboard? " + str(dashboards)) exit(1) name = sys.argv[1] d = [d for d in properties['dashboards'] if d['name'] == name][0] dashboard = ui.Dashboard(d, name) dashboard.run()
[ 1, 529, 9507, 29958, 2272, 21154, 29914, 11303, 29914, 14592, 3377, 29889, 2272, 13, 5215, 10876, 13, 5215, 2897, 13, 3166, 10876, 1053, 6876, 13, 5215, 343, 8807, 13, 13, 3166, 11451, 21154, 29889, 1481, 1053, 14313, 13, 13, 25162, 29918, 2084, 353, 2897, 29889, 2084, 29889, 18837, 1792, 703, 30022, 1159, 718, 525, 6294, 14592, 3377, 29914, 14592, 3377, 29889, 25162, 29915, 13, 361, 451, 2897, 29889, 2084, 29889, 275, 1445, 29898, 25162, 29918, 2084, 1125, 13, 1678, 1596, 703, 3782, 343, 8807, 934, 29901, 376, 718, 343, 8807, 29918, 2084, 29897, 13, 1678, 6876, 29898, 29896, 29897, 13, 25162, 29918, 10853, 353, 11297, 29876, 4286, 7122, 4197, 1220, 29889, 29878, 17010, 28909, 29876, 1495, 363, 1196, 297, 1722, 29898, 25162, 29918, 2084, 29897, 2314, 13, 361, 451, 343, 8807, 29918, 10853, 29901, 13, 1678, 1596, 703, 10858, 343, 8807, 934, 338, 4069, 29901, 376, 718, 343, 8807, 29918, 2084, 29897, 13, 1678, 6876, 29898, 29896, 29897, 13, 11330, 353, 343, 8807, 29889, 1359, 29898, 25162, 29918, 10853, 29897, 13, 13, 361, 7431, 29898, 9675, 29889, 19218, 29897, 1275, 29871, 29896, 29901, 13, 1678, 12569, 24691, 353, 5159, 13, 1678, 565, 4426, 29901, 13, 4706, 12569, 24691, 353, 518, 29881, 1839, 978, 2033, 363, 270, 297, 4426, 1839, 14592, 24691, 2033, 29962, 13, 4706, 12569, 24691, 353, 12705, 29898, 14592, 24691, 29897, 13, 1678, 1596, 703, 8809, 436, 12569, 3377, 29973, 376, 718, 851, 29898, 14592, 24691, 876, 13, 1678, 6876, 29898, 29896, 29897, 13, 13, 978, 353, 10876, 29889, 19218, 29961, 29896, 29962, 13, 29881, 353, 518, 29881, 363, 270, 297, 4426, 1839, 14592, 24691, 2033, 565, 270, 1839, 978, 2033, 1275, 1024, 3816, 29900, 29962, 13, 14592, 3377, 353, 14313, 29889, 29928, 1161, 3377, 29898, 29881, 29892, 1024, 29897, 13, 14592, 3377, 29889, 3389, 580, 13, 2 ]
triplicate/main.py
markjoshua12/game-jam-2020
0
1607851
""" Starting Template Once you have learned how to use classes, you can begin your program with this template. If Python and Arcade are installed, this example can be run from the command line with: python -m arcade.examples.starting_template """ import arcade import random import math from Criteria import * SCREEN_WIDTH = 1280 SCREEN_HEIGHT = 720 SCREEN_TITLE = "Triplicate" DEFAULT_GRAVITY = -3 RESOURCE_PATH = "resources" levels = [] # ON_KEY_RELEASE apply negative vector on key release. ON_KEY_RELEASE = False class ObjectLoader: def __init__(self): pass def load(self, tick): pass class Factory: def create(self): pass class FormFactory(Factory): def __init__(self, color, val): self.color = color self.val = val def create(self): return Form(self.color, self.val) class CarFactory(Factory): def __init__(self, color, val): self.color = color self.val = val def create(self): return SwervingCar1Up(self.color, self.val) class ShipFactory(Factory): def __init__(self, color, val, level): self.color = color self.val = val self.level = level def create(self): return Ship(self.color, self.val, self.level) class PoopFactory(Factory): def __init__(self, color, val): self.color = color self.val = val def create(self): return Poop(self.color, self.val) class FactoryWeight: def __init__(self, factory, r): self.factory = factory self.range = r def GetLaneCenter(j): return (SCREEN_WIDTH / 2) - ((160 * 5)/2) + (j * 160) + 80 class WeightedObjectLaneLoader(ObjectLoader): def __init__(self, tr, factories): super().__init__() self.factories = factories self.tr = tr self.t = 0 def load(self, tick): if tick % self.tr == 0: self.t += 1 x = random.randrange(0, 100) for factory in self.factories: if x in factory.range: o = factory.factory.create() o.center_x = GetLaneCenter(random.randrange(0, 5)) return o return None class WeightedObjectLoader(ObjectLoader): def __init__(self, tr, factories): super().__init__() self.factories = factories self.tr = tr self.t = 0 def load(self, tick): if tick % self.tr == 0: self.t += 1 x = random.randrange(0, 100) for factory in self.factories: if x in factory.range: return factory.factory.create() return None class SequenceFactoryObjectLoader(ObjectLoader): def __init__(self, tr, objects): self.tr = tr self.objects = objects def load(self, tick): if tick % self.tr == 0: self.t += 1 if len(self.objects) > 0: return self.objects.pop().load() return None class SequenceObjectLoader(ObjectLoader): def __init__(self, tr, objects): self.tr = tr self.objects = objects def load(self, tick): if tick % self.tr == 0: self.t += 1 return self.objects.pop() class RBObjectLoader(ObjectLoader): def __init__(self): self.Toggle = True def load(self, tick): if tick % 180 == 0: self.Toggle = not self.Toggle if self.Toggle: return Form((255, 0, 0, 255), "R") else: return Form((0, 0, 255, 255), "B") class RGBObjectLoader(ObjectLoader): def __init__(self): self.t = 0 def load(self, tick): if tick % 180 == 0: self.t += 1 x = self.t % 3 if x == 0: return Form((255, 0, 0, 255), "R") elif x == 1: return Form((0, 255, 0, 255), "G") elif x == 2: return Form((0, 0, 255, 255), "B") class RBPObjectLoader(ObjectLoader): def __init__(self): self.t = 0 def load(self, tick): if tick % 180 == 0: self.t += 1 x = random.randrange(0, 3) if x == 0: return Form((255, 0, 0, 255), "R") elif x == 1: return Poop((0, 255, 0, 255), "G") elif x == 2: return Form((0, 0, 255, 255), "B") class RGBPObjectLoader(ObjectLoader): def __init__(self, tr): self.t = 0 self.tr = tr def load(self, tick): if tick % self.tr == 0: self.t += 1 x = random.randrange(0, 4) if x == 0: return Form((255, 0, 0, 255), "R") elif x == 1: return Form((0, 255, 0, 255), "G") elif x == 2: return Form((0, 0, 255, 255), "B") elif x == 3: return Poop((255, 255, 255, 255), "S") class Level: def __init__(self): # You may want many lists. Lists for coins, monsters, etc. self.bucket_list = None self.object_list = None self.object_loader = None # This holds the background images. If you don't want changing # background images, you can delete this part. self.background = None self.music = None self.tick = 0 self.selected_bucket = None self.score = 0 self.run = True def update(self): if self.run: self.tick += 1 if self.object_loader is not None: ret = self.object_loader.load(self.tick) if ret is not None: self.object_list.append(ret) if self.bucket_list is not None: for bucket in self.bucket_list: bucket.update() if self.object_list is not None: hit_list = bucket.collides_with_list(self.object_list) for obj in hit_list: if bucket.score(obj): self.score += obj.pass_val else: self.score += obj.fail_val self.object_list.remove(obj) if self.object_list is not None: for obj in self.object_list: obj.update() if obj.center_y < 5: self.score += obj.miss_val self.object_list.remove(obj) def draw(self): if self.background is not None: arcade.draw_lrwh_rectangle_textured(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, self.background) if self.bucket_list is not None: self.bucket_list.draw() if self.object_list is not None: self.object_list.draw() if self.selected_bucket is not None: arcade.draw_rectangle_outline(self.bucket_list[self.selected_bucket].center_x, self.bucket_list[self.selected_bucket].center_y, self.bucket_list[self.selected_bucket].height * 1.2, self.bucket_list[self.selected_bucket].width * 1.2, self.bucket_list[self.selected_bucket].color, (self.tick % 12) + 2, 0) arcade.draw_text("Time Left {:d}".format(int((self.length - self.tick) / 60)), (SCREEN_WIDTH / 6) * 4, SCREEN_HEIGHT - (SCREEN_HEIGHT / 10), arcade.color.BLACK, 60) arcade.draw_text("Score: {}".format(self.score), 0, (SCREEN_HEIGHT / 10) * 9, arcade.color.RED, 64) if self.tick > self.length: arcade.draw_text("GAME OVER", (SCREEN_WIDTH / 5) * 1, (SCREEN_HEIGHT / 6) * 3, arcade.color.BLACK, 128) def next_bucket(self): # print(self.selected_bucket) if self.selected_bucket is None and len(self.bucket_list) > 0: self.selected_bucket = 0 else: self.selected_bucket += 1 if self.selected_bucket >= len(self.bucket_list): self.selected_bucket = 0 # print(self.selected_bucket) # Maybe play a sound here? def prev_bucket(self): # print(self.selected_bucket) if self.selected_bucket is None and len(self.bucket_list) > 0: self.selected_bucket = len(self.bucket_list) - 1 else: self.selected_bucket -= 1 if self.selected_bucket < 0: self.selected_bucket = len(self.bucket_list) - 1 def move_bucket(self, x): if self.selected_bucket is not None: self.bucket_list[self.selected_bucket].v_x += x def stop_bucket(self): if self.selected_bucket is not None: self.bucket_list[self.selected_bucket].v_x = 0 def stop_all_buckets(self): for x in self.bucket_list: x.v_x = 0 def on_key_press(self, key, key_modifiers): """ Called whenever a key on the keyboard is pressed. For a full list of keys, see: http://arcade.academy/arcade.key.html """ if key == arcade.key.TAB: if key_modifiers & arcade.key.MOD_SHIFT: self.prev_bucket() else: self.next_bucket() elif key == arcade.key.LEFT or key == arcade.key.A: self.move_bucket(-1) elif key == arcade.key.RIGHT or key == arcade.key.D: self.move_bucket(1) elif key == arcade.key.S: self.stop_all_buckets() elif key == arcade.key.SPACE: self.stop_bucket() elif key == arcade.key.Q: exit(0) def on_key_release(self, key, key_modifiers): """ Called whenever the user lets off a previously pressed key. """ if ON_KEY_RELEASE: if key == arcade.key.LEFT: self.move_bucket(1) elif key == arcade.key.RIGHT: self.move_bucket(-1) class SpaceLevel(Level): def __init__(self): super().__init__() self.bucket_list = arcade.SpriteList() self.bucket_list.append(Bucket((255, 0, 0, 255), [IsFormCriteria(), IsColorCriteria((255, 0, 0))])) self.bucket_list[0].center_x = SCREEN_WIDTH / 4 self.selected_bucket = 0 self.object_list = arcade.SpriteList() self.length = 60 * 120 self.tree_tick = False self.background = arcade.load_texture("resources/Background-4.png") self.object_loader = WeightedObjectLaneLoader(60, [FactoryWeight(ShipFactory((255, 0, 0, 255), "R", self), range(0, 10)), FactoryWeight(ShipFactory((0, 255, 0, 255), "G", self), range(40, 50)), FactoryWeight(ShipFactory((0, 0, 255, 255), "B", self), range(50, 90)), FactoryWeight(PoopFactory((255, 255, 255, 255), "R"), range(95, 100))]) def update(self): super().update() if not self.run: return if (self.tick % 60) == 0: self.tree_tick = not self.tree_tick tree1 = Tree((255,255,255,255),"Tree") tree1.center_x = GetLaneCenter(-1) + (-80 if self.tree_tick else 0) tree1.center_y = SCREEN_HEIGHT + 20 tree2 = Tree((255,255,255,255),"Tree") tree2.center_x = GetLaneCenter(5) + (80 if self.tree_tick else 0) tree2.center_y = SCREEN_HEIGHT + 20 self.object_list.append(tree1) self.object_list.append(tree2) if self.tick > self.length: self.run = False def draw_road(self, cx, cy, sx, sy, offset): # Clear screen and start render process zx = (cx - (sx / 2)) zy = (cy - (sy / 2)) line_height = 64 margin_x = 32 lane_width = (128 + margin_x) arcade.draw_rectangle_filled(cx, cy, sx, sy, arcade.color.BATTLESHIP_GREY) num_lines = (sy / line_height) / 4 num_lanes = (sx / lane_width) - 1 j = 0 while j < num_lanes: j += 1 i = 0 y_pos = offset while i < num_lines: arcade.draw_rectangle_filled(zx + (j * lane_width), zy + offset + (i * line_height * 4), (margin_x / 2), line_height, arcade.color.WHITE_SMOKE) i += 1 def draw(self): self.draw_road((SCREEN_WIDTH / 2), SCREEN_HEIGHT / 2, (160 * 5), SCREEN_HEIGHT+512, -((self.tick*8) % 256)) super().draw() class CarLevel(Level): def __init__(self): super().__init__() self.bucket_list = arcade.SpriteList() self.bucket_list.append(Bucket((255, 0, 0, 255), [IsFormCriteria(), IsColorCriteria((255, 0, 0))])) self.bucket_list[0].center_x = SCREEN_WIDTH / 4 self.selected_bucket = 0 self.object_list = arcade.SpriteList() self.length = 60 * 120 self.tree_tick = False self.object_loader = WeightedObjectLaneLoader(60, [FactoryWeight(CarFactory((255, 0, 0, 255), "R"), range(0, 10)), FactoryWeight(CarFactory((0, 255, 0, 255), "G"), range(40, 50)), FactoryWeight(CarFactory((0, 0, 255, 255), "B"), range(50, 90)), FactoryWeight(PoopFactory((255, 255, 255, 255), "R"), range(95, 100))]) def update(self): super().update() if not self.run: return if (self.tick % 60) == 0: self.tree_tick = not self.tree_tick tree1 = Tree((255,255,255,255),"Tree") tree1.center_x = GetLaneCenter(-1) + (-80 if self.tree_tick else 0) tree1.center_y = SCREEN_HEIGHT + 20 tree2 = Tree((255,255,255,255),"Tree") tree2.center_x = GetLaneCenter(5) + (80 if self.tree_tick else 0) tree2.center_y = SCREEN_HEIGHT + 20 self.object_list.append(tree1) self.object_list.append(tree2) if self.tick > self.length: self.run = False def draw_road(self, cx, cy, sx, sy, offset): # Clear screen and start render process zx = (cx - (sx / 2)) zy = (cy - (sy / 2)) line_height = 64 margin_x = 32 lane_width = (128 + margin_x) arcade.draw_rectangle_filled(cx, cy, sx, sy, arcade.color.BATTLESHIP_GREY) num_lines = (sy / line_height) / 4 num_lanes = (sx / lane_width) - 1 j = 0 while j < num_lanes: j += 1 i = 0 y_pos = offset while i < num_lines: arcade.draw_rectangle_filled(zx + (j * lane_width), zy + offset + (i * line_height * 4), (margin_x / 2), line_height, arcade.color.WHITE_SMOKE) i += 1 def draw(self): self.draw_road((SCREEN_WIDTH / 2), SCREEN_HEIGHT / 2, (160 * 5), SCREEN_HEIGHT+512, -((self.tick*8) % 256)) super().draw() class Level1(Level): def __init__(self): super().__init__() self.bucket_list = arcade.SpriteList() self.bucket_list.append(Bucket((255, 0, 0, 255), [IsFormCriteria(), IsColorCriteria((255, 0, 0))])) self.bucket_list.append(Bucket((0, 255, 0, 255), [IsFormCriteria(), IsColorCriteria((0, 255, 0))])) self.bucket_list.append(Bucket((0, 0, 255, 255), [IsFormCriteria(), IsColorCriteria((0, 0, 255))])) self.bucket_list[0].center_x = SCREEN_WIDTH / 4 self.bucket_list[1].center_x = (SCREEN_WIDTH / 4) * 2 self.bucket_list[2].center_x = (SCREEN_WIDTH / 4) * 3 self.selected_bucket = 1 self.object_loader = RGBObjectLoader() self.object_list = arcade.SpriteList() self.length = 60 * 120 def update(self): super().update() if self.tick > self.length: self.run = False def draw(self): x = 300 y = 300 radius = 200 arcade.draw_circle_filled(x, y, radius, arcade.color.YELLOW) # Draw the right eye x = 370 y = 350 radius = 20 arcade.draw_circle_filled(x, y, radius, arcade.color.BLACK) # Draw the left eye x = 230 y = 350 radius = 20 arcade.draw_circle_filled(x, y, radius, arcade.color.BLACK) # Draw the smile x = 300 y = 280 width = 120 height = 100 start_angle = 190 end_angle = 350 arcade.draw_arc_outline(x, y, width, height, arcade.color.BLACK, start_angle, end_angle, 10) super().draw() class Level2(Level): def __init__(self): super().__init__() self.bucket_list = arcade.SpriteList() self.bucket_list.append(Bucket((255, 0, 255, 255), [IsFormCriteria(), OrCriteria(IsColorCriteria((255, 0, 0)), IsColorCriteria( (0, 0, 255)))])) self.bucket_list[0].center_x = (SCREEN_WIDTH / 4) * 2 self.selected_bucket = 0 self.object_loader = RBPObjectLoader() self.object_list = arcade.SpriteList() self.length = 60 * 120 self.background = arcade.load_texture("resources/remodeling_an_office_bathroom.jpg") def update(self): super().update() if self.tick > self.length: self.run = False def draw(self): super().draw() class Level3(Level): def __init__(self): super().__init__() self.bucket_list = arcade.SpriteList() self.bucket_list.append(Bucket((255, 0, 0, 255), [IsFormCriteria(), IsColorCriteria((255, 0, 0))])) self.bucket_list.append(Bucket((0, 255, 0, 255), [IsFormCriteria(), IsColorCriteria((0, 255, 0))])) self.bucket_list.append(Bucket((0, 0, 255, 255), [IsFormCriteria(), IsColorCriteria((0, 0, 255))])) self.bucket_list[0].center_x = SCREEN_WIDTH / 5 self.bucket_list[1].center_x = (SCREEN_WIDTH / 5) * 4 self.bucket_list[2].center_x = (SCREEN_WIDTH / 5) * 3 self.bucket_list.append(Bucket((255, 0, 255, 255), [IsFormCriteria(), OrCriteria(IsColorCriteria((255, 0, 0)), IsColorCriteria( (0, 0, 255)))])) self.bucket_list[3].center_x = (SCREEN_WIDTH / 5) * 2 self.selected_bucket = 3 self.object_loader = RGBPObjectLoader(60) self.object_list = arcade.SpriteList() self.length = 60 * 90 self.background = arcade.load_texture("resources/OfficeSpacePrinterScene.jpg") def update(self): super().update() if self.tick > self.length: self.run = False def draw(self): super().draw() class Level4(Level): def __init__(self): super().__init__() self.bucket_list = arcade.SpriteList() self.bucket_list.append(Bucket((255, 0, 0, 255), [IsFormCriteria(), IsColorCriteria((255, 0, 0))])) self.bucket_list.append(Bucket((0, 255, 0, 255), [IsFormCriteria(), IsColorCriteria((0, 255, 0))])) self.bucket_list.append(Bucket((0, 0, 255, 255), [IsFormCriteria(), IsColorCriteria((0, 0, 255))])) self.bucket_list.append(Bucket((255, 0, 255, 255), [IsFormCriteria(), OrCriteria(IsColorCriteria((255, 0, 0)), IsColorCriteria( (0, 0, 255)))])) self.bucket_list[0].center_x = SCREEN_WIDTH / 5 self.bucket_list[1].center_x = (SCREEN_WIDTH / 5) * 4 self.bucket_list[2].center_x = (SCREEN_WIDTH / 5) * 3 self.bucket_list[3].center_x = (SCREEN_WIDTH / 5) * 2 self.selected_bucket = 3 self.object_loader = WeightedObjectLoader(60, [FactoryWeight(FormFactory((255, 0, 0, 255), "R"), range(0, 40)), FactoryWeight(FormFactory((0, 255, 0, 255), "G"), range(40, 50)), FactoryWeight(FormFactory((0, 0, 255, 255), "B"), range(50, 90)), FactoryWeight(PoopFactory((255, 255, 255, 255), "R"), range(95, 100))]) self.object_list = arcade.SpriteList() self.length = 60 * 90 self.background = arcade.load_texture("resources/ModernOffice.jpg") def update(self): super().update() if self.tick > self.length: self.run = False def draw(self): super().draw() class Level5(Level): def __init__(self): super().__init__() self.bucket_list = arcade.SpriteList() self.bucket_list.append(Bucket((0, 255, 0, 255), [IsFormCriteria(), IsColorCriteria((0, 255, 0))])) self.bucket_list.append(Bucket((255, 0, 255, 255), [IsFormCriteria(), OrCriteria(IsColorCriteria((255, 0, 0)), IsColorCriteria( (0, 0, 255)))])) self.bucket_list[0].center_x = SCREEN_WIDTH / 5 self.bucket_list[1].center_x = (SCREEN_WIDTH / 5) * 4 self.selected_bucket = 0 self.object_loader = WeightedObjectLoader(180, [FactoryWeight(FormFactory((255, 0, 0, 255), "R"), range(0, 40)), FactoryWeight(FormFactory((0, 255, 0, 255), "G"), range(40, 50)), FactoryWeight(FormFactory((0, 0, 255, 255), "B"), range(50, 90)), FactoryWeight(PoopFactory((200, 50, 100, 255), "S"), range(95, 100))]) self.object_list = arcade.SpriteList() self.length = 60 * 120 self.background = arcade.load_texture("resources/OfficeScene1.jpg") def update(self): super().update() if self.tick > self.length: self.run = False def draw(self): super().draw() class Bucket(arcade.Sprite): """ This class represents the coins on our screen. It is a child class of the arcade library's "Sprite" class. """ # need a 'criteria' def __init__(self, color, criteria): super().__init__("resources/trash.png", 1) self.criteria = criteria self.color = color self.center_y = (self.height / 4) * 2 self.v_x = 0 def score(self, other): for x in self.criteria: if not x.check(other): return False return True def update(self): self.center_x += self.v_x if self.center_x >= SCREEN_WIDTH: self.center_x = SCREEN_WIDTH - 1 self.v_x = 0 if self.center_x <= 0: self.center_x = 1 self.v_x = 0 class FallingObject(arcade.Sprite): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.v_y = DEFAULT_GRAVITY self.pass_val = 100 self.fail_val = -100 self.miss_val = -50 self.type = "FallingObject" self.v_x = 0 self.center_y = random.randrange(SCREEN_HEIGHT + 20, SCREEN_HEIGHT + 100) self.center_x = random.randrange(SCREEN_WIDTH) self.tick = 0 def reset_pos(self): # Reset the coin to a random spot above the screen self.center_y = random.randrange(SCREEN_HEIGHT + 20, SCREEN_HEIGHT + 100) self.center_x = random.randrange(SCREEN_WIDTH) def process_miss(self): self.reset_pos() def update(self): # Move the coin self.tick += 1 self.center_y += self.v_y self.center_x += self.v_x if self.center_x >= SCREEN_WIDTH: self.center_x = SCREEN_WIDTH - 1 self.v_x = 0 if self.center_x <= 0: self.center_x = 1 self.v_x = 0 if self.top < 0: self.process_miss() class Bullet(FallingObject): def __init__(self, color, val): super().__init__("resources/pencil2.png", 1) self.val = val self.color = color self.type = "Bullet" self.v_y = DEFAULT_GRAVITY * 0.5 self.pass_val = 100 self.fail_val = -200 self.miss_val = 10 def shootat(self,target): BULLET_SPEED = random.randrange(2,8) start_x = self.center_x start_y = self.center_y # Get the destination location for the bullet dest_x = target.center_x + random.randrange(-200,200) dest_y = target.center_y + random.randrange(-200,200) # Do math to calculate how to get the bullet to the destination. # Calculation the angle in radians between the start points # and end points. This is the angle the bullet will travel. x_diff = dest_x - start_x y_diff = dest_y - start_y angle = math.atan2(y_diff, x_diff) # Taking into account the angle, calculate our change_x # and change_y. Velocity is how fast the bullet travels. self.v_x = math.cos(angle) * BULLET_SPEED self.v_y = math.sin(angle) * BULLET_SPEED class Ship(FallingObject): def __init__(self, color, val, level): super().__init__("resources/ships/ship_{}.png".format(random.randrange(0,31)), 0.5) self.level = level self.val = val self.color = color self.type = "Ship" self.v_y = DEFAULT_GRAVITY * 0.5 self.pass_val = 100 self.fail_val = -200 self.miss_val = 100 def update(self): super().update() if (self.tick % 60) == 0: if random.randrange(0,2) == 0: b = Bullet((255,255,255,255),self.val) b.shootat(self.level.bucket_list[self.level.selected_bucket]) self.level.object_list.append(b) b.center_x = self.center_x b.center_y = self.center_y class Car1Down(FallingObject): def __init__(self, color, val): super().__init__("resources/car-enemy2.png", 8) self.val = val self.color = color self.type = "Car" self.v_y = DEFAULT_GRAVITY self.pass_val = 100 self.fail_val = -200 self.miss_val = 50 class SwervingCar1Down(FallingObject): def __init__(self, color, val): super().__init__("resources/car-enemy2.png", 8) self.val = val self.color = color self.type = "Car" self.v_y = DEFAULT_GRAVITY * 0.5 self.pass_val = 100 self.fail_val = -200 self.miss_val = 100 def update(self): chance = random.randrange(0,100) if chance < 5: # Start Swerving self.v_x = 1 super().update() class Car1Up(FallingObject): def __init__(self, color, val): super().__init__("resources/car-enemy.png", 8) self.val = val self.color = color self.type = "Car" self.v_y = DEFAULT_GRAVITY self.pass_val = 100 self.fail_val = -200 self.miss_val = 50 class SwervingCar1Up(FallingObject): def __init__(self, color, val): super().__init__("resources/car-enemy.png", 7) self.val = val self.color = color self.type = "Car" self.v_y = DEFAULT_GRAVITY * 2 self.pass_val = 100 self.fail_val = -200 self.miss_val = 100 def update(self): chance = random.randrange(0,100 * 60) if chance == 1: # Start Swerving self.v_x = random.randrange(0,6) super().update() class Car2Up(FallingObject): def __init__(self, color, val): super().__init__("resources/car-player.png", 8) self.val = val self.color = color self.type = "Car" self.v_y = DEFAULT_GRAVITY * 0.25 self.pass_val = 100 self.fail_val = -200 self.miss_val = 50 class SwervingCar2Up(FallingObject): def __init__(self, color, val): super().__init__("resources/car-player.png", 8) self.val = val self.color = color self.type = "Car" self.v_y = DEFAULT_GRAVITY * 0.25 self.pass_val = 100 self.fail_val = -200 self.miss_val = 100 def update(self): chance = random.randrange(0,100 * 60 * 5) if chance == 1: # Start Swerving self.v_x = random.randrange(0,6) super().update() class Tree(FallingObject): def __init__(self, color, val): super().__init__("resources/tree.png", 4) self.val = val self.color = color self.type = "Poop" self.v_y = -8 self.pass_val = 100 self.fail_val = -1500 self.miss_val = 0 class Poop(FallingObject): def __init__(self, color, val): super().__init__("resources/poo.png", 0.05) self.val = val self.color = color self.type = "Poop" self.v_y = DEFAULT_GRAVITY * 0.5 self.pass_val = 100 self.fail_val = -500 self.miss_val = 50 class Form(FallingObject): """ This class represents the coins on our screen. It is a child class of the arcade library's "Sprite" class. """ def __init__(self, color, val): super().__init__("resources/form-icon.png", 0.5) self.val = val self.color = color self.type = "Form" self.v_y = DEFAULT_GRAVITY class MyGame(arcade.Window): """ Main application class. NOTE: Go ahead and delete the methods you don't need. If you do need a method, delete the 'pass' and replace it with your own code. Don't leave 'pass' in this program. """ def __init__(self, width, height, title): super().__init__(width, height, title) arcade.set_background_color(arcade.color.AMAZON) self.level = None # If you have sprite lists, you should create them here, # and set them to None def setup(self): # Create your sprites and sprite lists here # self.level = Level1() pass def on_draw(self): """ Render the screen. """ # This command should happen before we start drawing. It will clear # the screen to the background color, and erase what we drew last frame. arcade.start_render() if self.level is not None: self.level.draw() else: arcade.draw_text( "Triplicate - A Falling Objects Game\nControls:\nA, Left = Move Bucket Left\nD, Right Arrow = Move Bucket Right\nTab = Next Bucket(hold shift for Prev)\nS = Stop all buckets\nSpace - Stop current bucket\n0 - Instructions\n1-7 - Select Level\n1-5 are Normal, 6 is Car, 7 is Space", 0, 0, arcade.color.BLACK, 60) # Finish drawing and display the result # arcade.finish_render() # Call draw() on all your sprite lists below def on_update(self, delta_time): """ All the logic to move, and the game logic goes here. Normally, you'll call update() on the sprite lists that need it. """ if self.level is not None: self.level.update() def on_key_press(self, key, key_modifiers): """ Called whenever a key on the keyboard is pressed. For a full list of keys, see: http://arcade.academy/arcade.key.html """ if key == arcade.key.Q: # and key_modifiers & arcade.key.MOD_CTRL: exit(0) elif key == arcade.key.KEY_0: self.level = None elif key == arcade.key.KEY_1: self.level = Level1() elif key == arcade.key.KEY_2: self.level = Level2() elif key == arcade.key.KEY_3: self.level = Level3() elif key == arcade.key.KEY_4: self.level = Level4() elif key == arcade.key.KEY_5: self.level = Level5() elif key == arcade.key.KEY_6: self.level = CarLevel() elif key == arcade.key.KEY_7: self.level = SpaceLevel() elif self.level is not None: self.level.on_key_press(key, key_modifiers) def on_key_release(self, key, key_modifiers): """ Called whenever the user lets off a previously pressed key. """ if self.level is not None: self.level.on_key_release(key, key_modifiers) def on_mouse_motion(self, x, y, delta_x, delta_y): """ Called whenever the mouse moves. """ pass def on_mouse_press(self, x, y, button, key_modifiers): """ Called when the user presses a mouse button. """ pass def on_mouse_release(self, x, y, button, key_modifiers): """ Called when a user releases a mouse button. """ pass def main(): """ Main method """ game = MyGame(SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_TITLE) game.setup() arcade.run() if __name__ == "__main__": main()
[ 1, 9995, 30004, 13, 4763, 292, 25663, 30004, 13, 30004, 13, 26222, 366, 505, 10972, 920, 304, 671, 4413, 29892, 366, 508, 3380, 596, 1824, 411, 445, 30004, 13, 6886, 22993, 13, 30004, 13, 3644, 5132, 322, 826, 6332, 526, 5130, 29892, 445, 1342, 508, 367, 1065, 515, 278, 1899, 1196, 411, 29901, 30004, 13, 4691, 448, 29885, 564, 6332, 29889, 19057, 29889, 2962, 292, 29918, 6886, 30004, 13, 15945, 19451, 13, 5215, 564, 6332, 30004, 13, 5215, 4036, 30004, 13, 5215, 5844, 30004, 13, 3166, 315, 21977, 1053, 334, 30004, 13, 30004, 13, 7187, 1525, 1430, 29918, 22574, 353, 29871, 29896, 29906, 29947, 29900, 30004, 13, 7187, 1525, 1430, 29918, 9606, 22530, 353, 29871, 29955, 29906, 29900, 30004, 13, 7187, 1525, 1430, 29918, 29911, 1806, 1307, 353, 376, 29911, 6472, 5926, 19451, 13, 23397, 29918, 29954, 4717, 29963, 11937, 353, 448, 29941, 30004, 13, 1525, 27839, 4741, 29918, 10145, 353, 376, 13237, 19451, 13, 5563, 29879, 353, 5159, 30004, 13, 29937, 6732, 29918, 10818, 29918, 14829, 3394, 8178, 4608, 373, 1820, 6507, 22993, 13, 1164, 29918, 10818, 29918, 14829, 353, 7700, 30004, 13, 30004, 13, 30004, 13, 1990, 4669, 10036, 29901, 30004, 13, 1678, 822, 4770, 2344, 12035, 1311, 1125, 30004, 13, 4706, 1209, 30004, 13, 30004, 13, 1678, 822, 2254, 29898, 1311, 29892, 16892, 1125, 30004, 13, 4706, 1209, 30004, 13, 30004, 13, 30004, 13, 1990, 27561, 29901, 30004, 13, 1678, 822, 1653, 29898, 1311, 1125, 30004, 13, 4706, 1209, 30004, 13, 30004, 13, 30004, 13, 1990, 3812, 5126, 29898, 5126, 1125, 30004, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 2927, 29892, 659, 1125, 30004, 13, 4706, 1583, 29889, 2780, 353, 2927, 30004, 13, 4706, 1583, 29889, 791, 353, 659, 30004, 13, 30004, 13, 1678, 822, 1653, 29898, 1311, 1125, 30004, 13, 4706, 736, 3812, 29898, 1311, 29889, 2780, 29892, 1583, 29889, 791, 8443, 13, 30004, 13, 30004, 13, 1990, 1704, 5126, 29898, 5126, 1125, 30004, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 2927, 29892, 659, 1125, 30004, 13, 4706, 1583, 29889, 2780, 353, 2927, 30004, 13, 4706, 1583, 29889, 791, 353, 659, 30004, 13, 30004, 13, 1678, 822, 1653, 29898, 1311, 1125, 30004, 13, 4706, 736, 317, 556, 1747, 8179, 29896, 3373, 29898, 1311, 29889, 2780, 29892, 1583, 29889, 791, 8443, 13, 30004, 13, 30004, 13, 1990, 1383, 666, 5126, 29898, 5126, 1125, 30004, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 2927, 29892, 659, 29892, 3233, 1125, 30004, 13, 4706, 1583, 29889, 2780, 353, 2927, 30004, 13, 4706, 1583, 29889, 791, 353, 659, 30004, 13, 4706, 1583, 29889, 5563, 353, 3233, 30004, 13, 30004, 13, 1678, 822, 1653, 29898, 1311, 1125, 30004, 13, 4706, 736, 1383, 666, 29898, 1311, 29889, 2780, 29892, 1583, 29889, 791, 29892, 1583, 29889, 5563, 8443, 13, 30004, 13, 30004, 13, 1990, 3929, 459, 5126, 29898, 5126, 1125, 30004, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 2927, 29892, 659, 1125, 30004, 13, 4706, 1583, 29889, 2780, 353, 2927, 30004, 13, 4706, 1583, 29889, 791, 353, 659, 30004, 13, 30004, 13, 1678, 822, 1653, 29898, 1311, 1125, 30004, 13, 4706, 736, 3929, 459, 29898, 1311, 29889, 2780, 29892, 1583, 29889, 791, 8443, 13, 30004, 13, 30004, 13, 1990, 27561, 22676, 29901, 30004, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 12529, 29892, 364, 1125, 30004, 13, 4706, 1583, 29889, 14399, 353, 12529, 30004, 13, 4706, 1583, 29889, 3881, 353, 364, 30004, 13, 30004, 13, 1753, 3617, 29931, 1662, 13409, 29898, 29926, 1125, 30004, 13, 1678, 736, 313, 7187, 1525, 1430, 29918, 22574, 847, 29871, 29906, 29897, 448, 5135, 29896, 29953, 29900, 334, 29871, 29945, 6802, 29906, 29897, 718, 313, 29926, 334, 29871, 29896, 29953, 29900, 29897, 718, 29871, 29947, 29900, 30004, 13, 30004, 13, 30004, 13, 1990, 1334, 523, 287, 2061, 29931, 1662, 10036, 29898, 2061, 10036, 1125, 30004, 13, 4706, 822, 4770, 2344, 12035, 1311, 29892, 534, 29892, 2114, 3842, 1125, 30004, 13, 9651, 2428, 2141, 1649, 2344, 1649, 26471, 13, 9651, 1583, 29889, 17028, 3842, 353, 2114, 3842, 30004, 13, 9651, 1583, 29889, 509, 353, 534, 30004, 13, 9651, 1583, 29889, 29873, 353, 29871, 29900, 30004, 13, 30004, 13, 4706, 822, 2254, 29898, 1311, 29892, 16892, 1125, 30004, 13, 9651, 565, 16892, 1273, 1583, 29889, 509, 1275, 29871, 29900, 29901, 30004, 13, 18884, 1583, 29889, 29873, 4619, 29871, 29896, 30004, 13, 18884, 921, 353, 4036, 29889, 9502, 3881, 29898, 29900, 29892, 29871, 29896, 29900, 29900, 8443, 13, 18884, 363, 12529, 297, 1583, 29889, 17028, 3842, 29901, 30004, 13, 462, 1678, 565, 921, 297, 12529, 29889, 3881, 29901, 30004, 13, 462, 4706, 288, 353, 12529, 29889, 14399, 29889, 3258, 26471, 13, 462, 4706, 288, 29889, 5064, 29918, 29916, 353, 3617, 29931, 1662, 13409, 29898, 8172, 29889, 9502, 3881, 29898, 29900, 29892, 29871, 29945, 876, 30004, 13, 462, 4706, 736, 288, 30004, 13, 9651, 736, 6213, 30004, 13, 30004, 13, 30004, 13, 1990, 1334, 523, 287, 2061, 10036, 29898, 2061, 10036, 1125, 30004, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 534, 29892, 2114, 3842, 1125, 30004, 13, 4706, 2428, 2141, 1649, 2344, 1649, 26471, 13, 4706, 1583, 29889, 17028, 3842, 353, 2114, 3842, 30004, 13, 4706, 1583, 29889, 509, 353, 534, 30004, 13, 4706, 1583, 29889, 29873, 353, 29871, 29900, 30004, 13, 30004, 13, 1678, 822, 2254, 29898, 1311, 29892, 16892, 1125, 30004, 13, 4706, 565, 16892, 1273, 1583, 29889, 509, 1275, 29871, 29900, 29901, 30004, 13, 9651, 1583, 29889, 29873, 4619, 29871, 29896, 30004, 13, 9651, 921, 353, 4036, 29889, 9502, 3881, 29898, 29900, 29892, 29871, 29896, 29900, 29900, 8443, 13, 9651, 363, 12529, 297, 1583, 29889, 17028, 3842, 29901, 30004, 13, 18884, 565, 921, 297, 12529, 29889, 3881, 29901, 30004, 13, 462, 1678, 736, 12529, 29889, 14399, 29889, 3258, 26471, 13, 4706, 736, 6213, 30004, 13, 30004, 13, 30004, 13, 1990, 922, 3910, 5126, 2061, 10036, 29898, 2061, 10036, 1125, 30004, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 534, 29892, 3618, 1125, 30004, 13, 4706, 1583, 29889, 509, 353, 534, 30004, 13, 4706, 1583, 29889, 12650, 353, 3618, 30004, 13, 30004, 13, 1678, 822, 2254, 29898, 1311, 29892, 16892, 1125, 30004, 13, 4706, 565, 16892, 1273, 1583, 29889, 509, 1275, 29871, 29900, 29901, 30004, 13, 9651, 1583, 29889, 29873, 4619, 29871, 29896, 30004, 13, 9651, 565, 7431, 29898, 1311, 29889, 12650, 29897, 1405, 29871, 29900, 29901, 30004, 13, 18884, 736, 1583, 29889, 12650, 29889, 7323, 2141, 1359, 26471, 13, 9651, 736, 6213, 30004, 13, 30004, 13, 30004, 13, 1990, 922, 3910, 2061, 10036, 29898, 2061, 10036, 1125, 30004, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 534, 29892, 3618, 1125, 30004, 13, 4706, 1583, 29889, 509, 353, 534, 30004, 13, 4706, 1583, 29889, 12650, 353, 3618, 30004, 13, 30004, 13, 1678, 822, 2254, 29898, 1311, 29892, 16892, 1125, 30004, 13, 4706, 565, 16892, 1273, 1583, 29889, 509, 1275, 29871, 29900, 29901, 30004, 13, 9651, 1583, 29889, 29873, 4619, 29871, 29896, 30004, 13, 9651, 736, 1583, 29889, 12650, 29889, 7323, 26471, 13, 30004, 13, 30004, 13, 1990, 390, 29933, 2061, 10036, 29898, 2061, 10036, 1125, 30004, 13, 1678, 822, 4770, 2344, 12035, 1311, 1125, 30004, 13, 4706, 1583, 29889, 27199, 353, 5852, 30004, 13, 30004, 13, 1678, 822, 2254, 29898, 1311, 29892, 16892, 1125, 30004, 13, 4706, 565, 16892, 1273, 29871, 29896, 29947, 29900, 1275, 29871, 29900, 29901, 30004, 13, 9651, 1583, 29889, 27199, 353, 451, 1583, 29889, 27199, 30004, 13, 9651, 565, 1583, 29889, 27199, 29901, 30004, 13, 18884, 736, 3812, 3552, 29906, 29945, 29945, 29892, 29871, 29900, 29892, 29871, 29900, 29892, 29871, 29906, 29945, 29945, 511, 376, 29934, 1159, 30004, 13, 9651, 1683, 29901, 30004, 13, 18884, 736, 3812, 3552, 29900, 29892, 29871, 29900, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 511, 376, 29933, 1159, 30004, 13, 30004, 13, 30004, 13, 1990, 390, 7210, 2061, 10036, 29898, 2061, 10036, 1125, 30004, 13, 1678, 822, 4770, 2344, 12035, 1311, 1125, 30004, 13, 4706, 1583, 29889, 29873, 353, 29871, 29900, 30004, 13, 30004, 13, 1678, 822, 2254, 29898, 1311, 29892, 16892, 1125, 30004, 13, 4706, 565, 16892, 1273, 29871, 29896, 29947, 29900, 1275, 29871, 29900, 29901, 30004, 13, 9651, 1583, 29889, 29873, 4619, 29871, 29896, 30004, 13, 9651, 921, 353, 1583, 29889, 29873, 1273, 29871, 29941, 30004, 13, 9651, 565, 921, 1275, 29871, 29900, 29901, 30004, 13, 18884, 736, 3812, 3552, 29906, 29945, 29945, 29892, 29871, 29900, 29892, 29871, 29900, 29892, 29871, 29906, 29945, 29945, 511, 376, 29934, 1159, 30004, 13, 9651, 25342, 921, 1275, 29871, 29896, 29901, 30004, 13, 18884, 736, 3812, 3552, 29900, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29900, 29892, 29871, 29906, 29945, 29945, 511, 376, 29954, 1159, 30004, 13, 9651, 25342, 921, 1275, 29871, 29906, 29901, 30004, 13, 18884, 736, 3812, 3552, 29900, 29892, 29871, 29900, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 511, 376, 29933, 1159, 30004, 13, 30004, 13, 30004, 13, 1990, 390, 29933, 29925, 2061, 10036, 29898, 2061, 10036, 1125, 30004, 13, 1678, 822, 4770, 2344, 12035, 1311, 1125, 30004, 13, 4706, 1583, 29889, 29873, 353, 29871, 29900, 30004, 13, 30004, 13, 1678, 822, 2254, 29898, 1311, 29892, 16892, 1125, 30004, 13, 4706, 565, 16892, 1273, 29871, 29896, 29947, 29900, 1275, 29871, 29900, 29901, 30004, 13, 9651, 1583, 29889, 29873, 4619, 29871, 29896, 30004, 13, 9651, 921, 353, 4036, 29889, 9502, 3881, 29898, 29900, 29892, 29871, 29941, 8443, 13, 9651, 565, 921, 1275, 29871, 29900, 29901, 30004, 13, 18884, 736, 3812, 3552, 29906, 29945, 29945, 29892, 29871, 29900, 29892, 29871, 29900, 29892, 29871, 29906, 29945, 29945, 511, 376, 29934, 1159, 30004, 13, 9651, 25342, 921, 1275, 29871, 29896, 29901, 30004, 13, 18884, 736, 3929, 459, 3552, 29900, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29900, 29892, 29871, 29906, 29945, 29945, 511, 376, 29954, 1159, 30004, 13, 9651, 25342, 921, 1275, 29871, 29906, 29901, 30004, 13, 18884, 736, 3812, 3552, 29900, 29892, 29871, 29900, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 511, 376, 29933, 1159, 30004, 13, 30004, 13, 30004, 13, 1990, 390, 7210, 29925, 2061, 10036, 29898, 2061, 10036, 1125, 30004, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 534, 1125, 30004, 13, 4706, 1583, 29889, 29873, 353, 29871, 29900, 30004, 13, 4706, 1583, 29889, 509, 353, 534, 30004, 13, 30004, 13, 1678, 822, 2254, 29898, 1311, 29892, 16892, 1125, 30004, 13, 4706, 565, 16892, 1273, 1583, 29889, 509, 1275, 29871, 29900, 29901, 30004, 13, 9651, 1583, 29889, 29873, 4619, 29871, 29896, 30004, 13, 9651, 921, 353, 4036, 29889, 9502, 3881, 29898, 29900, 29892, 29871, 29946, 8443, 13, 9651, 565, 921, 1275, 29871, 29900, 29901, 30004, 13, 18884, 736, 3812, 3552, 29906, 29945, 29945, 29892, 29871, 29900, 29892, 29871, 29900, 29892, 29871, 29906, 29945, 29945, 511, 376, 29934, 1159, 30004, 13, 9651, 25342, 921, 1275, 29871, 29896, 29901, 30004, 13, 18884, 736, 3812, 3552, 29900, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29900, 29892, 29871, 29906, 29945, 29945, 511, 376, 29954, 1159, 30004, 13, 9651, 25342, 921, 1275, 29871, 29906, 29901, 30004, 13, 18884, 736, 3812, 3552, 29900, 29892, 29871, 29900, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 511, 376, 29933, 1159, 30004, 13, 9651, 25342, 921, 1275, 29871, 29941, 29901, 30004, 13, 18884, 736, 3929, 459, 3552, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 511, 376, 29903, 1159, 30004, 13, 30004, 13, 30004, 13, 1990, 21597, 29901, 30004, 13, 1678, 822, 4770, 2344, 12035, 1311, 1125, 30004, 13, 4706, 396, 887, 1122, 864, 1784, 8857, 29889, 2391, 29879, 363, 1302, 1144, 29892, 1601, 23080, 29892, 2992, 22993, 13, 4706, 1583, 29889, 21454, 29918, 1761, 353, 6213, 30004, 13, 4706, 1583, 29889, 3318, 29918, 1761, 353, 6213, 30004, 13, 4706, 1583, 29889, 3318, 29918, 12657, 353, 6213, 30004, 13, 4706, 396, 910, 8640, 278, 3239, 4558, 29889, 960, 366, 1016, 29915, 29873, 864, 6480, 30004, 13, 4706, 396, 3239, 4558, 29892, 366, 508, 5217, 445, 760, 22993, 13, 4706, 1583, 29889, 7042, 353, 6213, 30004, 13, 4706, 1583, 29889, 23596, 353, 6213, 30004, 13, 4706, 1583, 29889, 24667, 353, 29871, 29900, 30004, 13, 4706, 1583, 29889, 8391, 29918, 21454, 353, 6213, 30004, 13, 4706, 1583, 29889, 13628, 353, 29871, 29900, 30004, 13, 4706, 1583, 29889, 3389, 353, 5852, 30004, 13, 30004, 13, 1678, 822, 2767, 29898, 1311, 1125, 30004, 13, 4706, 565, 1583, 29889, 3389, 29901, 30004, 13, 9651, 1583, 29889, 24667, 4619, 29871, 29896, 30004, 13, 9651, 565, 1583, 29889, 3318, 29918, 12657, 338, 451, 6213, 29901, 30004, 13, 18884, 3240, 353, 1583, 29889, 3318, 29918, 12657, 29889, 1359, 29898, 1311, 29889, 24667, 8443, 13, 18884, 565, 3240, 338, 451, 6213, 29901, 30004, 13, 462, 1678, 1583, 29889, 3318, 29918, 1761, 29889, 4397, 29898, 2267, 8443, 13, 9651, 565, 1583, 29889, 21454, 29918, 1761, 338, 451, 6213, 29901, 30004, 13, 18884, 363, 20968, 297, 1583, 29889, 21454, 29918, 1761, 29901, 30004, 13, 462, 1678, 20968, 29889, 5504, 26471, 13, 462, 1678, 565, 1583, 29889, 3318, 29918, 1761, 338, 451, 6213, 29901, 30004, 13, 462, 4706, 7124, 29918, 1761, 353, 20968, 29889, 22017, 2247, 29918, 2541, 29918, 1761, 29898, 1311, 29889, 3318, 29918, 1761, 8443, 13, 462, 4706, 363, 5446, 297, 7124, 29918, 1761, 29901, 30004, 13, 462, 9651, 565, 20968, 29889, 13628, 29898, 5415, 1125, 30004, 13, 462, 18884, 1583, 29889, 13628, 4619, 5446, 29889, 3364, 29918, 791, 30004, 13, 462, 9651, 1683, 29901, 30004, 13, 462, 18884, 1583, 29889, 13628, 4619, 5446, 29889, 14057, 29918, 791, 30004, 13, 462, 9651, 1583, 29889, 3318, 29918, 1761, 29889, 5992, 29898, 5415, 8443, 13, 9651, 565, 1583, 29889, 3318, 29918, 1761, 338, 451, 6213, 29901, 30004, 13, 18884, 363, 5446, 297, 1583, 29889, 3318, 29918, 1761, 29901, 30004, 13, 462, 1678, 5446, 29889, 5504, 26471, 13, 462, 1678, 565, 5446, 29889, 5064, 29918, 29891, 529, 29871, 29945, 29901, 30004, 13, 462, 4706, 1583, 29889, 13628, 4619, 5446, 29889, 9894, 29918, 791, 30004, 13, 462, 4706, 1583, 29889, 3318, 29918, 1761, 29889, 5992, 29898, 5415, 8443, 13, 30004, 13, 1678, 822, 4216, 29898, 1311, 1125, 30004, 13, 4706, 565, 1583, 29889, 7042, 338, 451, 6213, 29901, 30004, 13, 9651, 564, 6332, 29889, 4012, 29918, 29212, 1332, 29918, 1621, 2521, 29918, 726, 2955, 29898, 29900, 29892, 29871, 29900, 11167, 13, 462, 462, 18884, 12314, 1525, 1430, 29918, 22574, 29892, 12314, 1525, 1430, 29918, 9606, 22530, 11167, 13, 462, 462, 18884, 1583, 29889, 7042, 8443, 13, 4706, 565, 1583, 29889, 21454, 29918, 1761, 338, 451, 6213, 29901, 30004, 13, 9651, 1583, 29889, 21454, 29918, 1761, 29889, 4012, 26471, 13, 4706, 565, 1583, 29889, 3318, 29918, 1761, 338, 451, 6213, 29901, 30004, 13, 9651, 1583, 29889, 3318, 29918, 1761, 29889, 4012, 26471, 13, 4706, 565, 1583, 29889, 8391, 29918, 21454, 338, 451, 6213, 29901, 30004, 13, 9651, 564, 6332, 29889, 4012, 29918, 1621, 2521, 29918, 449, 1220, 29898, 1311, 29889, 21454, 29918, 1761, 29961, 1311, 29889, 8391, 29918, 21454, 1822, 5064, 29918, 29916, 11167, 13, 462, 462, 3986, 1583, 29889, 21454, 29918, 1761, 29961, 1311, 29889, 8391, 29918, 21454, 1822, 5064, 29918, 29891, 11167, 13, 462, 462, 3986, 1583, 29889, 21454, 29918, 1761, 29961, 1311, 29889, 8391, 29918, 21454, 1822, 3545, 334, 29871, 29896, 29889, 29906, 11167, 13, 462, 462, 3986, 1583, 29889, 21454, 29918, 1761, 29961, 1311, 29889, 8391, 29918, 21454, 1822, 2103, 334, 29871, 29896, 29889, 29906, 11167, 13, 462, 462, 3986, 1583, 29889, 21454, 29918, 1761, 29961, 1311, 29889, 8391, 29918, 21454, 1822, 2780, 29892, 313, 1311, 29889, 24667, 1273, 29871, 29896, 29906, 29897, 718, 29871, 29906, 29892, 29871, 29900, 8443, 13, 4706, 564, 6332, 29889, 4012, 29918, 726, 703, 2481, 19941, 12365, 29881, 29913, 1642, 4830, 29898, 524, 3552, 1311, 29889, 2848, 448, 1583, 29889, 24667, 29897, 847, 29871, 29953, 29900, 8243, 313, 7187, 1525, 1430, 29918, 22574, 847, 29871, 29953, 29897, 334, 29871, 29946, 11167, 13, 462, 308, 12314, 1525, 1430, 29918, 9606, 22530, 448, 313, 7187, 1525, 1430, 29918, 9606, 22530, 847, 29871, 29896, 29900, 511, 564, 6332, 29889, 2780, 29889, 13367, 11375, 29892, 29871, 29953, 29900, 8443, 13, 4706, 564, 6332, 29889, 4012, 29918, 726, 703, 20097, 29901, 6571, 1642, 4830, 29898, 1311, 29889, 13628, 511, 29871, 29900, 29892, 313, 7187, 1525, 1430, 29918, 9606, 22530, 847, 29871, 29896, 29900, 29897, 334, 29871, 29929, 11167, 13, 462, 308, 564, 6332, 29889, 2780, 29889, 19386, 29892, 29871, 29953, 29946, 8443, 13, 4706, 565, 1583, 29889, 24667, 1405, 1583, 29889, 2848, 29901, 30004, 13, 9651, 564, 6332, 29889, 4012, 29918, 726, 703, 12739, 2303, 438, 5348, 613, 313, 7187, 1525, 1430, 29918, 22574, 847, 29871, 29945, 29897, 334, 29871, 29896, 29892, 313, 7187, 1525, 1430, 29918, 9606, 22530, 847, 29871, 29953, 29897, 334, 29871, 29941, 29892, 564, 6332, 29889, 2780, 29889, 13367, 11375, 29892, 29871, 29896, 29906, 29947, 8443, 13, 30004, 13, 1678, 822, 2446, 29918, 21454, 29898, 1311, 1125, 30004, 13, 4706, 396, 1596, 29898, 1311, 29889, 8391, 29918, 21454, 8443, 13, 4706, 565, 1583, 29889, 8391, 29918, 21454, 338, 6213, 322, 7431, 29898, 1311, 29889, 21454, 29918, 1761, 29897, 1405, 29871, 29900, 29901, 30004, 13, 9651, 1583, 29889, 8391, 29918, 21454, 353, 29871, 29900, 30004, 13, 4706, 1683, 29901, 30004, 13, 9651, 1583, 29889, 8391, 29918, 21454, 4619, 29871, 29896, 30004, 13, 9651, 565, 1583, 29889, 8391, 29918, 21454, 6736, 7431, 29898, 1311, 29889, 21454, 29918, 1761, 1125, 30004, 13, 18884, 1583, 29889, 8391, 29918, 21454, 353, 29871, 29900, 30004, 13, 4706, 396, 1596, 29898, 1311, 29889, 8391, 29918, 21454, 8443, 13, 4706, 396, 7198, 1708, 263, 6047, 1244, 29973, 30004, 13, 30004, 13, 1678, 822, 12379, 29918, 21454, 29898, 1311, 1125, 30004, 13, 4706, 396, 1596, 29898, 1311, 29889, 8391, 29918, 21454, 8443, 13, 4706, 565, 1583, 29889, 8391, 29918, 21454, 338, 6213, 322, 7431, 29898, 1311, 29889, 21454, 29918, 1761, 29897, 1405, 29871, 29900, 29901, 30004, 13, 9651, 1583, 29889, 8391, 29918, 21454, 353, 7431, 29898, 1311, 29889, 21454, 29918, 1761, 29897, 448, 29871, 29896, 30004, 13, 4706, 1683, 29901, 30004, 13, 9651, 1583, 29889, 8391, 29918, 21454, 22361, 29871, 29896, 30004, 13, 9651, 565, 1583, 29889, 8391, 29918, 21454, 529, 29871, 29900, 29901, 30004, 13, 18884, 1583, 29889, 8391, 29918, 21454, 353, 7431, 29898, 1311, 29889, 21454, 29918, 1761, 29897, 448, 29871, 29896, 30004, 13, 30004, 13, 1678, 822, 4337, 29918, 21454, 29898, 1311, 29892, 921, 1125, 30004, 13, 4706, 565, 1583, 29889, 8391, 29918, 21454, 338, 451, 6213, 29901, 30004, 13, 9651, 1583, 29889, 21454, 29918, 1761, 29961, 1311, 29889, 8391, 29918, 21454, 1822, 29894, 29918, 29916, 4619, 921, 30004, 13, 30004, 13, 1678, 822, 5040, 29918, 21454, 29898, 1311, 1125, 30004, 13, 4706, 565, 1583, 29889, 8391, 29918, 21454, 338, 451, 6213, 29901, 30004, 13, 9651, 1583, 29889, 21454, 29918, 1761, 29961, 1311, 29889, 8391, 29918, 21454, 1822, 29894, 29918, 29916, 353, 29871, 29900, 30004, 13, 30004, 13, 1678, 822, 5040, 29918, 497, 29918, 2423, 9737, 29898, 1311, 1125, 30004, 13, 4706, 363, 921, 297, 1583, 29889, 21454, 29918, 1761, 29901, 30004, 13, 9651, 921, 29889, 29894, 29918, 29916, 353, 29871, 29900, 30004, 13, 30004, 13, 1678, 822, 373, 29918, 1989, 29918, 2139, 29898, 1311, 29892, 1820, 29892, 1820, 29918, 1545, 14903, 1125, 30004, 13, 4706, 9995, 30004, 13, 4706, 3037, 839, 10940, 263, 1820, 373, 278, 12247, 338, 15385, 22993, 13, 30004, 13, 4706, 1152, 263, 2989, 1051, 310, 6611, 29892, 1074, 29901, 30004, 13, 4706, 1732, 597, 279, 6332, 29889, 562, 1943, 1357, 29914, 279, 6332, 29889, 1989, 29889, 1420, 30004, 13, 4706, 9995, 30004, 13, 4706, 565, 1820, 1275, 564, 6332, 29889, 1989, 29889, 29911, 2882, 29901, 30004, 13, 9651, 565, 1820, 29918, 1545, 14903, 669, 564, 6332, 29889, 1989, 29889, 6720, 29928, 29918, 7068, 6545, 29911, 29901, 30004, 13, 18884, 1583, 29889, 16304, 29918, 21454, 26471, 13, 9651, 1683, 29901, 30004, 13, 18884, 1583, 29889, 4622, 29918, 21454, 26471, 13, 4706, 25342, 1820, 1275, 564, 6332, 29889, 1989, 29889, 28024, 470, 1820, 1275, 564, 6332, 29889, 1989, 29889, 29909, 29901, 30004, 13, 9651, 1583, 29889, 11631, 29918, 21454, 6278, 29896, 8443, 13, 4706, 25342, 1820, 1275, 564, 6332, 29889, 1989, 29889, 22789, 3912, 470, 1820, 1275, 564, 6332, 29889, 1989, 29889, 29928, 29901, 30004, 13, 9651, 1583, 29889, 11631, 29918, 21454, 29898, 29896, 8443, 13, 4706, 25342, 1820, 1275, 564, 6332, 29889, 1989, 29889, 29903, 29901, 30004, 13, 9651, 1583, 29889, 9847, 29918, 497, 29918, 2423, 9737, 26471, 13, 4706, 25342, 1820, 1275, 564, 6332, 29889, 1989, 29889, 5550, 11538, 29901, 30004, 13, 9651, 1583, 29889, 9847, 29918, 21454, 26471, 13, 4706, 25342, 1820, 1275, 564, 6332, 29889, 1989, 29889, 29984, 29901, 30004, 13, 9651, 6876, 29898, 29900, 8443, 13, 30004, 13, 1678, 822, 373, 29918, 1989, 29918, 14096, 29898, 1311, 29892, 1820, 29892, 1820, 29918, 1545, 14903, 1125, 30004, 13, 4706, 9995, 30004, 13, 4706, 3037, 839, 10940, 278, 1404, 16869, 1283, 263, 9251, 15385, 1820, 22993, 13, 4706, 9995, 30004, 13, 4706, 565, 6732, 29918, 10818, 29918, 14829, 29901, 30004, 13, 9651, 565, 1820, 1275, 564, 6332, 29889, 1989, 29889, 28024, 29901, 30004, 13, 18884, 1583, 29889, 11631, 29918, 21454, 29898, 29896, 8443, 13, 9651, 25342, 1820, 1275, 564, 6332, 29889, 1989, 29889, 22789, 3912, 29901, 30004, 13, 18884, 1583, 29889, 11631, 29918, 21454, 6278, 29896, 8443, 13, 30004, 13, 30004, 13, 1990, 14121, 10108, 29898, 10108, 1125, 30004, 13, 1678, 822, 4770, 2344, 12035, 1311, 1125, 30004, 13, 4706, 2428, 2141, 1649, 2344, 1649, 26471, 13, 4706, 1583, 29889, 21454, 29918, 1761, 353, 564, 6332, 29889, 29903, 558, 568, 1293, 26471, 13, 4706, 1583, 29889, 21454, 29918, 1761, 29889, 4397, 29898, 29933, 2707, 300, 3552, 29906, 29945, 29945, 29892, 29871, 29900, 29892, 29871, 29900, 29892, 29871, 29906, 29945, 29945, 511, 518, 3624, 2500, 29907, 21977, 3285, 1317, 3306, 29907, 21977, 3552, 29906, 29945, 29945, 29892, 29871, 29900, 29892, 29871, 29900, 876, 12622, 30004, 13, 4706, 1583, 29889, 21454, 29918, 1761, 29961, 29900, 1822, 5064, 29918, 29916, 353, 12314, 1525, 1430, 29918, 22574, 847, 29871, 29946, 30004, 13, 4706, 1583, 29889, 8391, 29918, 21454, 353, 29871, 29900, 30004, 13, 4706, 1583, 29889, 3318, 29918, 1761, 353, 564, 6332, 29889, 29903, 558, 568, 1293, 26471, 13, 4706, 1583, 29889, 2848, 353, 29871, 29953, 29900, 334, 29871, 29896, 29906, 29900, 30004, 13, 4706, 1583, 29889, 8336, 29918, 24667, 353, 7700, 30004, 13, 4706, 1583, 29889, 7042, 353, 564, 6332, 29889, 1359, 29918, 726, 545, 703, 13237, 29914, 10581, 29899, 29946, 29889, 2732, 1159, 30004, 13, 4706, 1583, 29889, 3318, 29918, 12657, 353, 1334, 523, 287, 2061, 29931, 1662, 10036, 29898, 29953, 29900, 29892, 518, 5126, 22676, 29898, 2713, 666, 5126, 3552, 29906, 29945, 29945, 29892, 29871, 29900, 29892, 29871, 29900, 29892, 29871, 29906, 29945, 29945, 511, 376, 29934, 613, 1583, 511, 3464, 29898, 29900, 29892, 29871, 29896, 29900, 8243, 30004, 13, 462, 462, 462, 965, 27561, 22676, 29898, 2713, 666, 5126, 3552, 29900, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29900, 29892, 29871, 29906, 29945, 29945, 511, 376, 29954, 613, 1583, 511, 3464, 29898, 29946, 29900, 29892, 29871, 29945, 29900, 8243, 30004, 13, 462, 462, 462, 965, 27561, 22676, 29898, 2713, 666, 5126, 3552, 29900, 29892, 29871, 29900, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 511, 376, 29933, 613, 1583, 511, 3464, 29898, 29945, 29900, 29892, 29871, 29929, 29900, 8243, 30004, 13, 462, 462, 462, 965, 27561, 22676, 29898, 9837, 459, 5126, 3552, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 511, 376, 29934, 4968, 3464, 29898, 29929, 29945, 29892, 29871, 29896, 29900, 29900, 876, 2314, 30004, 13, 30004, 13, 1678, 822, 2767, 29898, 1311, 1125, 30004, 13, 4706, 2428, 2141, 5504, 26471, 13, 4706, 565, 451, 1583, 29889, 3389, 29901, 30004, 13, 9651, 736, 30004, 13, 4706, 565, 313, 1311, 29889, 24667, 1273, 29871, 29953, 29900, 29897, 1275, 29871, 29900, 29901, 30004, 13, 9651, 1583, 29889, 8336, 29918, 24667, 353, 451, 1583, 29889, 8336, 29918, 24667, 30004, 13, 9651, 5447, 29896, 353, 15472, 3552, 29906, 29945, 29945, 29892, 29906, 29945, 29945, 29892, 29906, 29945, 29945, 29892, 29906, 29945, 29945, 511, 29908, 9643, 1159, 30004, 13, 9651, 5447, 29896, 29889, 5064, 29918, 29916, 353, 3617, 29931, 1662, 13409, 6278, 29896, 29897, 718, 8521, 29947, 29900, 565, 1583, 29889, 8336, 29918, 24667, 1683, 29871, 29900, 8443, 13, 9651, 5447, 29896, 29889, 5064, 29918, 29891, 353, 12314, 1525, 1430, 29918, 9606, 22530, 718, 29871, 29906, 29900, 30004, 13, 9651, 5447, 29906, 353, 15472, 3552, 29906, 29945, 29945, 29892, 29906, 29945, 29945, 29892, 29906, 29945, 29945, 29892, 29906, 29945, 29945, 511, 29908, 9643, 1159, 30004, 13, 9651, 5447, 29906, 29889, 5064, 29918, 29916, 353, 3617, 29931, 1662, 13409, 29898, 29945, 29897, 718, 313, 29947, 29900, 565, 1583, 29889, 8336, 29918, 24667, 1683, 29871, 29900, 8443, 13, 9651, 5447, 29906, 29889, 5064, 29918, 29891, 353, 12314, 1525, 1430, 29918, 9606, 22530, 718, 29871, 29906, 29900, 30004, 13, 9651, 1583, 29889, 3318, 29918, 1761, 29889, 4397, 29898, 8336, 29896, 8443, 13, 9651, 1583, 29889, 3318, 29918, 1761, 29889, 4397, 29898, 8336, 29906, 8443, 13, 4706, 565, 1583, 29889, 24667, 1405, 1583, 29889, 2848, 29901, 30004, 13, 9651, 1583, 29889, 3389, 353, 7700, 30004, 13, 30004, 13, 30004, 13, 1678, 822, 4216, 29918, 9972, 29898, 1311, 29892, 28232, 29892, 5094, 29892, 269, 29916, 29892, 9878, 29892, 9210, 1125, 30004, 13, 4706, 396, 17732, 4315, 322, 1369, 4050, 1889, 30004, 13, 4706, 503, 29916, 353, 313, 18904, 448, 313, 29879, 29916, 847, 29871, 29906, 876, 30004, 13, 4706, 503, 29891, 353, 313, 1270, 448, 313, 29879, 29891, 847, 29871, 29906, 876, 30004, 13, 4706, 1196, 29918, 3545, 353, 29871, 29953, 29946, 30004, 13, 4706, 5906, 29918, 29916, 353, 29871, 29941, 29906, 30004, 13, 4706, 301, 1662, 29918, 2103, 353, 313, 29896, 29906, 29947, 718, 5906, 29918, 29916, 8443, 13, 4706, 564, 6332, 29889, 4012, 29918, 1621, 2521, 29918, 26940, 29898, 18904, 29892, 5094, 29892, 269, 29916, 29892, 9878, 29892, 564, 6332, 29889, 2780, 29889, 29933, 1299, 29911, 1307, 7068, 5690, 29918, 29954, 1525, 29979, 8443, 13, 4706, 954, 29918, 9012, 353, 313, 29879, 29891, 847, 1196, 29918, 3545, 29897, 847, 29871, 29946, 30004, 13, 4706, 954, 29918, 6468, 267, 353, 313, 29879, 29916, 847, 301, 1662, 29918, 2103, 29897, 448, 29871, 29896, 30004, 13, 4706, 432, 353, 29871, 29900, 30004, 13, 4706, 1550, 432, 529, 954, 29918, 6468, 267, 29901, 30004, 13, 9651, 432, 4619, 29871, 29896, 30004, 13, 9651, 474, 353, 29871, 29900, 30004, 13, 9651, 343, 29918, 1066, 353, 9210, 30004, 13, 9651, 1550, 474, 529, 954, 29918, 9012, 29901, 30004, 13, 18884, 564, 6332, 29889, 4012, 29918, 1621, 2521, 29918, 26940, 29898, 29920, 29916, 718, 313, 29926, 334, 301, 1662, 29918, 2103, 511, 503, 29891, 718, 9210, 718, 313, 29875, 334, 1196, 29918, 3545, 334, 29871, 29946, 511, 313, 9264, 29918, 29916, 847, 29871, 29906, 511, 30004, 13, 462, 462, 632, 1196, 29918, 3545, 29892, 564, 6332, 29889, 2780, 29889, 25039, 9094, 29918, 29903, 6720, 6059, 8443, 13, 18884, 474, 4619, 29871, 29896, 30004, 13, 30004, 13, 1678, 822, 4216, 29898, 1311, 1125, 30004, 13, 4706, 1583, 29889, 4012, 29918, 9972, 3552, 7187, 1525, 1430, 29918, 22574, 847, 29871, 29906, 511, 12314, 1525, 1430, 29918, 9606, 22530, 847, 29871, 29906, 29892, 313, 29896, 29953, 29900, 334, 29871, 29945, 511, 12314, 1525, 1430, 29918, 9606, 22530, 29974, 29945, 29896, 29906, 29892, 448, 3552, 1311, 29889, 24667, 29930, 29947, 29897, 1273, 29871, 29906, 29945, 29953, 876, 30004, 13, 4706, 2428, 2141, 4012, 26471, 13, 30004, 13, 30004, 13, 1990, 1704, 10108, 29898, 10108, 1125, 30004, 13, 1678, 822, 4770, 2344, 12035, 1311, 1125, 30004, 13, 4706, 2428, 2141, 1649, 2344, 1649, 26471, 13, 4706, 1583, 29889, 21454, 29918, 1761, 353, 564, 6332, 29889, 29903, 558, 568, 1293, 26471, 13, 4706, 1583, 29889, 21454, 29918, 1761, 29889, 4397, 29898, 29933, 2707, 300, 3552, 29906, 29945, 29945, 29892, 29871, 29900, 29892, 29871, 29900, 29892, 29871, 29906, 29945, 29945, 511, 518, 3624, 2500, 29907, 21977, 3285, 1317, 3306, 29907, 21977, 3552, 29906, 29945, 29945, 29892, 29871, 29900, 29892, 29871, 29900, 876, 12622, 30004, 13, 4706, 1583, 29889, 21454, 29918, 1761, 29961, 29900, 1822, 5064, 29918, 29916, 353, 12314, 1525, 1430, 29918, 22574, 847, 29871, 29946, 30004, 13, 4706, 1583, 29889, 8391, 29918, 21454, 353, 29871, 29900, 30004, 13, 4706, 1583, 29889, 3318, 29918, 1761, 353, 564, 6332, 29889, 29903, 558, 568, 1293, 26471, 13, 4706, 1583, 29889, 2848, 353, 29871, 29953, 29900, 334, 29871, 29896, 29906, 29900, 30004, 13, 4706, 1583, 29889, 8336, 29918, 24667, 353, 7700, 30004, 13, 30004, 13, 4706, 1583, 29889, 3318, 29918, 12657, 353, 1334, 523, 287, 2061, 29931, 1662, 10036, 29898, 29953, 29900, 29892, 518, 5126, 22676, 29898, 8179, 5126, 3552, 29906, 29945, 29945, 29892, 29871, 29900, 29892, 29871, 29900, 29892, 29871, 29906, 29945, 29945, 511, 376, 29934, 4968, 3464, 29898, 29900, 29892, 29871, 29896, 29900, 8243, 30004, 13, 462, 462, 462, 965, 27561, 22676, 29898, 8179, 5126, 3552, 29900, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29900, 29892, 29871, 29906, 29945, 29945, 511, 376, 29954, 4968, 3464, 29898, 29946, 29900, 29892, 29871, 29945, 29900, 8243, 30004, 13, 462, 462, 462, 965, 27561, 22676, 29898, 8179, 5126, 3552, 29900, 29892, 29871, 29900, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 511, 376, 29933, 4968, 3464, 29898, 29945, 29900, 29892, 29871, 29929, 29900, 8243, 30004, 13, 462, 462, 462, 965, 27561, 22676, 29898, 9837, 459, 5126, 3552, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 511, 376, 29934, 4968, 3464, 29898, 29929, 29945, 29892, 29871, 29896, 29900, 29900, 876, 2314, 30004, 13, 30004, 13, 1678, 822, 2767, 29898, 1311, 1125, 30004, 13, 4706, 2428, 2141, 5504, 26471, 13, 4706, 565, 451, 1583, 29889, 3389, 29901, 30004, 13, 9651, 736, 30004, 13, 4706, 565, 313, 1311, 29889, 24667, 1273, 29871, 29953, 29900, 29897, 1275, 29871, 29900, 29901, 30004, 13, 9651, 1583, 29889, 8336, 29918, 24667, 353, 451, 1583, 29889, 8336, 29918, 24667, 30004, 13, 9651, 5447, 29896, 353, 15472, 3552, 29906, 29945, 29945, 29892, 29906, 29945, 29945, 29892, 29906, 29945, 29945, 29892, 29906, 29945, 29945, 511, 29908, 9643, 1159, 30004, 13, 9651, 5447, 29896, 29889, 5064, 29918, 29916, 353, 3617, 29931, 1662, 13409, 6278, 29896, 29897, 718, 8521, 29947, 29900, 565, 1583, 29889, 8336, 29918, 24667, 1683, 29871, 29900, 8443, 13, 9651, 5447, 29896, 29889, 5064, 29918, 29891, 353, 12314, 1525, 1430, 29918, 9606, 22530, 718, 29871, 29906, 29900, 30004, 13, 9651, 5447, 29906, 353, 15472, 3552, 29906, 29945, 29945, 29892, 29906, 29945, 29945, 29892, 29906, 29945, 29945, 29892, 29906, 29945, 29945, 511, 29908, 9643, 1159, 30004, 13, 9651, 5447, 29906, 29889, 5064, 29918, 29916, 353, 3617, 29931, 1662, 13409, 29898, 29945, 29897, 718, 313, 29947, 29900, 565, 1583, 29889, 8336, 29918, 24667, 1683, 29871, 29900, 8443, 13, 9651, 5447, 29906, 29889, 5064, 29918, 29891, 353, 12314, 1525, 1430, 29918, 9606, 22530, 718, 29871, 29906, 29900, 30004, 13, 9651, 1583, 29889, 3318, 29918, 1761, 29889, 4397, 29898, 8336, 29896, 8443, 13, 9651, 1583, 29889, 3318, 29918, 1761, 29889, 4397, 29898, 8336, 29906, 8443, 13, 4706, 565, 1583, 29889, 24667, 1405, 1583, 29889, 2848, 29901, 30004, 13, 9651, 1583, 29889, 3389, 353, 7700, 30004, 13, 30004, 13, 30004, 13, 1678, 822, 4216, 29918, 9972, 29898, 1311, 29892, 28232, 29892, 5094, 29892, 269, 29916, 29892, 9878, 29892, 9210, 1125, 30004, 13, 4706, 396, 17732, 4315, 322, 1369, 4050, 1889, 30004, 13, 4706, 503, 29916, 353, 313, 18904, 448, 313, 29879, 29916, 847, 29871, 29906, 876, 30004, 13, 4706, 503, 29891, 353, 313, 1270, 448, 313, 29879, 29891, 847, 29871, 29906, 876, 30004, 13, 4706, 1196, 29918, 3545, 353, 29871, 29953, 29946, 30004, 13, 4706, 5906, 29918, 29916, 353, 29871, 29941, 29906, 30004, 13, 4706, 301, 1662, 29918, 2103, 353, 313, 29896, 29906, 29947, 718, 5906, 29918, 29916, 8443, 13, 4706, 564, 6332, 29889, 4012, 29918, 1621, 2521, 29918, 26940, 29898, 18904, 29892, 5094, 29892, 269, 29916, 29892, 9878, 29892, 564, 6332, 29889, 2780, 29889, 29933, 1299, 29911, 1307, 7068, 5690, 29918, 29954, 1525, 29979, 8443, 13, 4706, 954, 29918, 9012, 353, 313, 29879, 29891, 847, 1196, 29918, 3545, 29897, 847, 29871, 29946, 30004, 13, 4706, 954, 29918, 6468, 267, 353, 313, 29879, 29916, 847, 301, 1662, 29918, 2103, 29897, 448, 29871, 29896, 30004, 13, 4706, 432, 353, 29871, 29900, 30004, 13, 4706, 1550, 432, 529, 954, 29918, 6468, 267, 29901, 30004, 13, 9651, 432, 4619, 29871, 29896, 30004, 13, 9651, 474, 353, 29871, 29900, 30004, 13, 9651, 343, 29918, 1066, 353, 9210, 30004, 13, 9651, 1550, 474, 529, 954, 29918, 9012, 29901, 30004, 13, 18884, 564, 6332, 29889, 4012, 29918, 1621, 2521, 29918, 26940, 29898, 29920, 29916, 718, 313, 29926, 334, 301, 1662, 29918, 2103, 511, 503, 29891, 718, 9210, 718, 313, 29875, 334, 1196, 29918, 3545, 334, 29871, 29946, 511, 313, 9264, 29918, 29916, 847, 29871, 29906, 511, 30004, 13, 462, 462, 632, 1196, 29918, 3545, 29892, 564, 6332, 29889, 2780, 29889, 25039, 9094, 29918, 29903, 6720, 6059, 8443, 13, 18884, 474, 4619, 29871, 29896, 30004, 13, 30004, 13, 1678, 822, 4216, 29898, 1311, 1125, 30004, 13, 4706, 1583, 29889, 4012, 29918, 9972, 3552, 7187, 1525, 1430, 29918, 22574, 847, 29871, 29906, 511, 12314, 1525, 1430, 29918, 9606, 22530, 847, 29871, 29906, 29892, 313, 29896, 29953, 29900, 334, 29871, 29945, 511, 12314, 1525, 1430, 29918, 9606, 22530, 29974, 29945, 29896, 29906, 29892, 448, 3552, 1311, 29889, 24667, 29930, 29947, 29897, 1273, 29871, 29906, 29945, 29953, 876, 30004, 13, 4706, 2428, 2141, 4012, 26471, 13, 30004, 13, 30004, 13, 1990, 21597, 29896, 29898, 10108, 1125, 30004, 13, 1678, 822, 4770, 2344, 12035, 1311, 1125, 30004, 13, 4706, 2428, 2141, 1649, 2344, 1649, 26471, 13, 4706, 1583, 29889, 21454, 29918, 1761, 353, 564, 6332, 29889, 29903, 558, 568, 1293, 26471, 13, 4706, 1583, 29889, 21454, 29918, 1761, 29889, 4397, 29898, 29933, 2707, 300, 3552, 29906, 29945, 29945, 29892, 29871, 29900, 29892, 29871, 29900, 29892, 29871, 29906, 29945, 29945, 511, 518, 3624, 2500, 29907, 21977, 3285, 1317, 3306, 29907, 21977, 3552, 29906, 29945, 29945, 29892, 29871, 29900, 29892, 29871, 29900, 876, 12622, 30004, 13, 4706, 1583, 29889, 21454, 29918, 1761, 29889, 4397, 29898, 29933, 2707, 300, 3552, 29900, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29900, 29892, 29871, 29906, 29945, 29945, 511, 518, 3624, 2500, 29907, 21977, 3285, 1317, 3306, 29907, 21977, 3552, 29900, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29900, 876, 12622, 30004, 13, 4706, 1583, 29889, 21454, 29918, 1761, 29889, 4397, 29898, 29933, 2707, 300, 3552, 29900, 29892, 29871, 29900, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 511, 518, 3624, 2500, 29907, 21977, 3285, 1317, 3306, 29907, 21977, 3552, 29900, 29892, 29871, 29900, 29892, 29871, 29906, 29945, 29945, 876, 12622, 30004, 13, 4706, 1583, 29889, 21454, 29918, 1761, 29961, 29900, 1822, 5064, 29918, 29916, 353, 12314, 1525, 1430, 29918, 22574, 847, 29871, 29946, 30004, 13, 4706, 1583, 29889, 21454, 29918, 1761, 29961, 29896, 1822, 5064, 29918, 29916, 353, 313, 7187, 1525, 1430, 29918, 22574, 847, 29871, 29946, 29897, 334, 29871, 29906, 30004, 13, 4706, 1583, 29889, 21454, 29918, 1761, 29961, 29906, 1822, 5064, 29918, 29916, 353, 313, 7187, 1525, 1430, 29918, 22574, 847, 29871, 29946, 29897, 334, 29871, 29941, 30004, 13, 4706, 1583, 29889, 8391, 29918, 21454, 353, 29871, 29896, 30004, 13, 4706, 1583, 29889, 3318, 29918, 12657, 353, 390, 7210, 2061, 10036, 26471, 13, 4706, 1583, 29889, 3318, 29918, 1761, 353, 564, 6332, 29889, 29903, 558, 568, 1293, 26471, 13, 4706, 1583, 29889, 2848, 353, 29871, 29953, 29900, 334, 29871, 29896, 29906, 29900, 30004, 13, 30004, 13, 1678, 822, 2767, 29898, 1311, 1125, 30004, 13, 4706, 2428, 2141, 5504, 26471, 13, 4706, 565, 1583, 29889, 24667, 1405, 1583, 29889, 2848, 29901, 30004, 13, 9651, 1583, 29889, 3389, 353, 7700, 30004, 13, 30004, 13, 1678, 822, 4216, 29898, 1311, 1125, 30004, 13, 4706, 921, 353, 29871, 29941, 29900, 29900, 30004, 13, 4706, 343, 353, 29871, 29941, 29900, 29900, 30004, 13, 4706, 11855, 353, 29871, 29906, 29900, 29900, 30004, 13, 4706, 564, 6332, 29889, 4012, 29918, 16622, 29918, 26940, 29898, 29916, 29892, 343, 29892, 11855, 29892, 564, 6332, 29889, 2780, 29889, 29979, 29923, 2208, 9806, 8443, 13, 30004, 13, 4706, 396, 18492, 278, 1492, 10977, 30004, 13, 4706, 921, 353, 29871, 29941, 29955, 29900, 30004, 13, 4706, 343, 353, 29871, 29941, 29945, 29900, 30004, 13, 4706, 11855, 353, 29871, 29906, 29900, 30004, 13, 4706, 564, 6332, 29889, 4012, 29918, 16622, 29918, 26940, 29898, 29916, 29892, 343, 29892, 11855, 29892, 564, 6332, 29889, 2780, 29889, 13367, 11375, 8443, 13, 30004, 13, 4706, 396, 18492, 278, 2175, 10977, 30004, 13, 4706, 921, 353, 29871, 29906, 29941, 29900, 30004, 13, 4706, 343, 353, 29871, 29941, 29945, 29900, 30004, 13, 4706, 11855, 353, 29871, 29906, 29900, 30004, 13, 4706, 564, 6332, 29889, 4012, 29918, 16622, 29918, 26940, 29898, 29916, 29892, 343, 29892, 11855, 29892, 564, 6332, 29889, 2780, 29889, 13367, 11375, 8443, 13, 30004, 13, 4706, 396, 18492, 278, 17819, 30004, 13, 4706, 921, 353, 29871, 29941, 29900, 29900, 30004, 13, 4706, 343, 353, 29871, 29906, 29947, 29900, 30004, 13, 4706, 2920, 353, 29871, 29896, 29906, 29900, 30004, 13, 4706, 3171, 353, 29871, 29896, 29900, 29900, 30004, 13, 4706, 1369, 29918, 2521, 353, 29871, 29896, 29929, 29900, 30004, 13, 4706, 1095, 29918, 2521, 353, 29871, 29941, 29945, 29900, 30004, 13, 4706, 564, 6332, 29889, 4012, 29918, 5666, 29918, 449, 1220, 29898, 29916, 29892, 343, 29892, 2920, 29892, 3171, 29892, 564, 6332, 29889, 2780, 29889, 13367, 11375, 11167, 13, 462, 18884, 1369, 29918, 2521, 29892, 1095, 29918, 2521, 29892, 29871, 29896, 29900, 8443, 13, 4706, 2428, 2141, 4012, 26471, 13, 30004, 13, 30004, 13, 1990, 21597, 29906, 29898, 10108, 1125, 30004, 13, 1678, 822, 4770, 2344, 12035, 1311, 1125, 30004, 13, 4706, 2428, 2141, 1649, 2344, 1649, 26471, 13, 4706, 1583, 29889, 21454, 29918, 1761, 353, 564, 6332, 29889, 29903, 558, 568, 1293, 26471, 13, 4706, 1583, 29889, 21454, 29918, 1761, 29889, 4397, 29898, 29933, 2707, 300, 3552, 29906, 29945, 29945, 29892, 29871, 29900, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 511, 518, 3624, 2500, 29907, 21977, 3285, 1394, 29907, 21977, 29898, 3624, 3306, 29907, 21977, 3552, 29906, 29945, 29945, 29892, 29871, 29900, 29892, 29871, 29900, 8243, 30004, 13, 462, 462, 462, 462, 462, 308, 1317, 3306, 29907, 21977, 29898, 30004, 13, 462, 462, 462, 462, 462, 632, 313, 29900, 29892, 29871, 29900, 29892, 29871, 29906, 29945, 29945, 876, 4638, 876, 30004, 13, 4706, 1583, 29889, 21454, 29918, 1761, 29961, 29900, 1822, 5064, 29918, 29916, 353, 313, 7187, 1525, 1430, 29918, 22574, 847, 29871, 29946, 29897, 334, 29871, 29906, 30004, 13, 4706, 1583, 29889, 8391, 29918, 21454, 353, 29871, 29900, 30004, 13, 30004, 13, 4706, 1583, 29889, 3318, 29918, 12657, 353, 390, 29933, 29925, 2061, 10036, 26471, 13, 4706, 1583, 29889, 3318, 29918, 1761, 353, 564, 6332, 29889, 29903, 558, 568, 1293, 26471, 13, 4706, 1583, 29889, 2848, 353, 29871, 29953, 29900, 334, 29871, 29896, 29906, 29900, 30004, 13, 4706, 1583, 29889, 7042, 353, 564, 6332, 29889, 1359, 29918, 726, 545, 703, 13237, 29914, 276, 4299, 292, 29918, 273, 29918, 20205, 29918, 29890, 493, 8345, 29889, 6173, 1159, 30004, 13, 30004, 13, 1678, 822, 2767, 29898, 1311, 1125, 30004, 13, 4706, 2428, 2141, 5504, 26471, 13, 4706, 565, 1583, 29889, 24667, 1405, 1583, 29889, 2848, 29901, 30004, 13, 9651, 1583, 29889, 3389, 353, 7700, 30004, 13, 30004, 13, 1678, 822, 4216, 29898, 1311, 1125, 30004, 13, 4706, 2428, 2141, 4012, 26471, 13, 30004, 13, 30004, 13, 1990, 21597, 29941, 29898, 10108, 1125, 30004, 13, 1678, 822, 4770, 2344, 12035, 1311, 1125, 30004, 13, 4706, 2428, 2141, 1649, 2344, 1649, 26471, 13, 4706, 1583, 29889, 21454, 29918, 1761, 353, 564, 6332, 29889, 29903, 558, 568, 1293, 26471, 13, 4706, 1583, 29889, 21454, 29918, 1761, 29889, 4397, 29898, 29933, 2707, 300, 3552, 29906, 29945, 29945, 29892, 29871, 29900, 29892, 29871, 29900, 29892, 29871, 29906, 29945, 29945, 511, 518, 3624, 2500, 29907, 21977, 3285, 1317, 3306, 29907, 21977, 3552, 29906, 29945, 29945, 29892, 29871, 29900, 29892, 29871, 29900, 876, 12622, 30004, 13, 4706, 1583, 29889, 21454, 29918, 1761, 29889, 4397, 29898, 29933, 2707, 300, 3552, 29900, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29900, 29892, 29871, 29906, 29945, 29945, 511, 518, 3624, 2500, 29907, 21977, 3285, 1317, 3306, 29907, 21977, 3552, 29900, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29900, 876, 12622, 30004, 13, 4706, 1583, 29889, 21454, 29918, 1761, 29889, 4397, 29898, 29933, 2707, 300, 3552, 29900, 29892, 29871, 29900, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 511, 518, 3624, 2500, 29907, 21977, 3285, 1317, 3306, 29907, 21977, 3552, 29900, 29892, 29871, 29900, 29892, 29871, 29906, 29945, 29945, 876, 12622, 30004, 13, 4706, 1583, 29889, 21454, 29918, 1761, 29961, 29900, 1822, 5064, 29918, 29916, 353, 12314, 1525, 1430, 29918, 22574, 847, 29871, 29945, 30004, 13, 4706, 1583, 29889, 21454, 29918, 1761, 29961, 29896, 1822, 5064, 29918, 29916, 353, 313, 7187, 1525, 1430, 29918, 22574, 847, 29871, 29945, 29897, 334, 29871, 29946, 30004, 13, 4706, 1583, 29889, 21454, 29918, 1761, 29961, 29906, 1822, 5064, 29918, 29916, 353, 313, 7187, 1525, 1430, 29918, 22574, 847, 29871, 29945, 29897, 334, 29871, 29941, 30004, 13, 4706, 1583, 29889, 21454, 29918, 1761, 29889, 4397, 29898, 29933, 2707, 300, 3552, 29906, 29945, 29945, 29892, 29871, 29900, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 511, 518, 3624, 2500, 29907, 21977, 3285, 1394, 29907, 21977, 29898, 3624, 3306, 29907, 21977, 3552, 29906, 29945, 29945, 29892, 29871, 29900, 29892, 29871, 29900, 8243, 30004, 13, 462, 462, 462, 462, 462, 308, 1317, 3306, 29907, 21977, 29898, 30004, 13, 462, 462, 462, 462, 462, 632, 313, 29900, 29892, 29871, 29900, 29892, 29871, 29906, 29945, 29945, 876, 4638, 876, 30004, 13, 4706, 1583, 29889, 21454, 29918, 1761, 29961, 29941, 1822, 5064, 29918, 29916, 353, 313, 7187, 1525, 1430, 29918, 22574, 847, 29871, 29945, 29897, 334, 29871, 29906, 30004, 13, 4706, 1583, 29889, 8391, 29918, 21454, 353, 29871, 29941, 30004, 13, 30004, 13, 4706, 1583, 29889, 3318, 29918, 12657, 353, 390, 7210, 29925, 2061, 10036, 29898, 29953, 29900, 8443, 13, 4706, 1583, 29889, 3318, 29918, 1761, 353, 564, 6332, 29889, 29903, 558, 568, 1293, 26471, 13, 4706, 1583, 29889, 2848, 353, 29871, 29953, 29900, 334, 29871, 29929, 29900, 30004, 13, 4706, 1583, 29889, 7042, 353, 564, 6332, 29889, 1359, 29918, 726, 545, 703, 13237, 29914, 27247, 14936, 4040, 1639, 23472, 29889, 6173, 1159, 30004, 13, 30004, 13, 1678, 822, 2767, 29898, 1311, 1125, 30004, 13, 4706, 2428, 2141, 5504, 26471, 13, 4706, 565, 1583, 29889, 24667, 1405, 1583, 29889, 2848, 29901, 30004, 13, 9651, 1583, 29889, 3389, 353, 7700, 30004, 13, 30004, 13, 1678, 822, 4216, 29898, 1311, 1125, 30004, 13, 4706, 2428, 2141, 4012, 26471, 13, 30004, 13, 30004, 13, 1990, 21597, 29946, 29898, 10108, 1125, 30004, 13, 1678, 822, 4770, 2344, 12035, 1311, 1125, 30004, 13, 4706, 2428, 2141, 1649, 2344, 1649, 26471, 13, 4706, 1583, 29889, 21454, 29918, 1761, 353, 564, 6332, 29889, 29903, 558, 568, 1293, 26471, 13, 4706, 1583, 29889, 21454, 29918, 1761, 29889, 4397, 29898, 29933, 2707, 300, 3552, 29906, 29945, 29945, 29892, 29871, 29900, 29892, 29871, 29900, 29892, 29871, 29906, 29945, 29945, 511, 518, 3624, 2500, 29907, 21977, 3285, 1317, 3306, 29907, 21977, 3552, 29906, 29945, 29945, 29892, 29871, 29900, 29892, 29871, 29900, 876, 12622, 30004, 13, 4706, 1583, 29889, 21454, 29918, 1761, 29889, 4397, 29898, 29933, 2707, 300, 3552, 29900, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29900, 29892, 29871, 29906, 29945, 29945, 511, 518, 3624, 2500, 29907, 21977, 3285, 1317, 3306, 29907, 21977, 3552, 29900, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29900, 876, 12622, 30004, 13, 4706, 1583, 29889, 21454, 29918, 1761, 29889, 4397, 29898, 29933, 2707, 300, 3552, 29900, 29892, 29871, 29900, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 511, 518, 3624, 2500, 29907, 21977, 3285, 1317, 3306, 29907, 21977, 3552, 29900, 29892, 29871, 29900, 29892, 29871, 29906, 29945, 29945, 876, 12622, 30004, 13, 4706, 1583, 29889, 21454, 29918, 1761, 29889, 4397, 29898, 29933, 2707, 300, 3552, 29906, 29945, 29945, 29892, 29871, 29900, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 511, 518, 3624, 2500, 29907, 21977, 3285, 1394, 29907, 21977, 29898, 3624, 3306, 29907, 21977, 3552, 29906, 29945, 29945, 29892, 29871, 29900, 29892, 29871, 29900, 8243, 30004, 13, 462, 462, 462, 462, 462, 308, 1317, 3306, 29907, 21977, 29898, 30004, 13, 462, 462, 462, 462, 462, 632, 313, 29900, 29892, 29871, 29900, 29892, 29871, 29906, 29945, 29945, 876, 4638, 876, 30004, 13, 4706, 1583, 29889, 21454, 29918, 1761, 29961, 29900, 1822, 5064, 29918, 29916, 353, 12314, 1525, 1430, 29918, 22574, 847, 29871, 29945, 30004, 13, 4706, 1583, 29889, 21454, 29918, 1761, 29961, 29896, 1822, 5064, 29918, 29916, 353, 313, 7187, 1525, 1430, 29918, 22574, 847, 29871, 29945, 29897, 334, 29871, 29946, 30004, 13, 4706, 1583, 29889, 21454, 29918, 1761, 29961, 29906, 1822, 5064, 29918, 29916, 353, 313, 7187, 1525, 1430, 29918, 22574, 847, 29871, 29945, 29897, 334, 29871, 29941, 30004, 13, 4706, 1583, 29889, 21454, 29918, 1761, 29961, 29941, 1822, 5064, 29918, 29916, 353, 313, 7187, 1525, 1430, 29918, 22574, 847, 29871, 29945, 29897, 334, 29871, 29906, 30004, 13, 4706, 1583, 29889, 8391, 29918, 21454, 353, 29871, 29941, 30004, 13, 30004, 13, 4706, 1583, 29889, 3318, 29918, 12657, 353, 1334, 523, 287, 2061, 10036, 29898, 29953, 29900, 29892, 518, 5126, 22676, 29898, 2500, 5126, 3552, 29906, 29945, 29945, 29892, 29871, 29900, 29892, 29871, 29900, 29892, 29871, 29906, 29945, 29945, 511, 376, 29934, 4968, 3464, 29898, 29900, 29892, 29871, 29946, 29900, 8243, 30004, 13, 462, 462, 462, 539, 27561, 22676, 29898, 2500, 5126, 3552, 29900, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29900, 29892, 29871, 29906, 29945, 29945, 511, 376, 29954, 4968, 3464, 29898, 29946, 29900, 29892, 29871, 29945, 29900, 8243, 30004, 13, 462, 462, 462, 539, 27561, 22676, 29898, 2500, 5126, 3552, 29900, 29892, 29871, 29900, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 511, 376, 29933, 4968, 3464, 29898, 29945, 29900, 29892, 29871, 29929, 29900, 8243, 30004, 13, 462, 462, 462, 539, 27561, 22676, 29898, 9837, 459, 5126, 3552, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 511, 376, 29934, 4968, 3464, 29898, 29929, 29945, 29892, 29871, 29896, 29900, 29900, 876, 2314, 30004, 13, 4706, 1583, 29889, 3318, 29918, 1761, 353, 564, 6332, 29889, 29903, 558, 568, 1293, 26471, 13, 4706, 1583, 29889, 2848, 353, 29871, 29953, 29900, 334, 29871, 29929, 29900, 30004, 13, 4706, 1583, 29889, 7042, 353, 564, 6332, 29889, 1359, 29918, 726, 545, 703, 13237, 29914, 2111, 824, 27247, 29889, 6173, 1159, 30004, 13, 30004, 13, 1678, 822, 2767, 29898, 1311, 1125, 30004, 13, 4706, 2428, 2141, 5504, 26471, 13, 4706, 565, 1583, 29889, 24667, 1405, 1583, 29889, 2848, 29901, 30004, 13, 9651, 1583, 29889, 3389, 353, 7700, 30004, 13, 30004, 13, 1678, 822, 4216, 29898, 1311, 1125, 30004, 13, 4706, 2428, 2141, 4012, 26471, 13, 30004, 13, 30004, 13, 1990, 21597, 29945, 29898, 10108, 1125, 30004, 13, 1678, 822, 4770, 2344, 12035, 1311, 1125, 30004, 13, 4706, 2428, 2141, 1649, 2344, 1649, 26471, 13, 4706, 1583, 29889, 21454, 29918, 1761, 353, 564, 6332, 29889, 29903, 558, 568, 1293, 26471, 13, 4706, 1583, 29889, 21454, 29918, 1761, 29889, 4397, 29898, 29933, 2707, 300, 3552, 29900, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29900, 29892, 29871, 29906, 29945, 29945, 511, 518, 3624, 2500, 29907, 21977, 3285, 1317, 3306, 29907, 21977, 3552, 29900, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29900, 876, 12622, 30004, 13, 4706, 1583, 29889, 21454, 29918, 1761, 29889, 4397, 29898, 29933, 2707, 300, 3552, 29906, 29945, 29945, 29892, 29871, 29900, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 511, 518, 3624, 2500, 29907, 21977, 3285, 1394, 29907, 21977, 29898, 3624, 3306, 29907, 21977, 3552, 29906, 29945, 29945, 29892, 29871, 29900, 29892, 29871, 29900, 8243, 30004, 13, 462, 462, 462, 462, 462, 308, 1317, 3306, 29907, 21977, 29898, 30004, 13, 462, 462, 462, 462, 462, 632, 313, 29900, 29892, 29871, 29900, 29892, 29871, 29906, 29945, 29945, 876, 4638, 876, 30004, 13, 4706, 1583, 29889, 21454, 29918, 1761, 29961, 29900, 1822, 5064, 29918, 29916, 353, 12314, 1525, 1430, 29918, 22574, 847, 29871, 29945, 30004, 13, 4706, 1583, 29889, 21454, 29918, 1761, 29961, 29896, 1822, 5064, 29918, 29916, 353, 313, 7187, 1525, 1430, 29918, 22574, 847, 29871, 29945, 29897, 334, 29871, 29946, 30004, 13, 4706, 1583, 29889, 8391, 29918, 21454, 353, 29871, 29900, 30004, 13, 4706, 1583, 29889, 3318, 29918, 12657, 353, 1334, 523, 287, 2061, 10036, 29898, 29896, 29947, 29900, 29892, 518, 5126, 22676, 29898, 2500, 5126, 3552, 29906, 29945, 29945, 29892, 29871, 29900, 29892, 29871, 29900, 29892, 29871, 29906, 29945, 29945, 511, 376, 29934, 4968, 3464, 29898, 29900, 29892, 29871, 29946, 29900, 8243, 30004, 13, 462, 462, 462, 4706, 27561, 22676, 29898, 2500, 5126, 3552, 29900, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29900, 29892, 29871, 29906, 29945, 29945, 511, 376, 29954, 4968, 30004, 13, 462, 462, 462, 462, 418, 3464, 29898, 29946, 29900, 29892, 29871, 29945, 29900, 8243, 30004, 13, 462, 462, 462, 4706, 27561, 22676, 29898, 2500, 5126, 3552, 29900, 29892, 29871, 29900, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 511, 376, 29933, 4968, 30004, 13, 462, 462, 462, 462, 418, 3464, 29898, 29945, 29900, 29892, 29871, 29929, 29900, 8243, 30004, 13, 462, 462, 462, 4706, 27561, 22676, 29898, 9837, 459, 5126, 3552, 29906, 29900, 29900, 29892, 29871, 29945, 29900, 29892, 29871, 29896, 29900, 29900, 29892, 29871, 29906, 29945, 29945, 511, 376, 29903, 4968, 30004, 13, 462, 462, 462, 462, 418, 3464, 29898, 29929, 29945, 29892, 29871, 29896, 29900, 29900, 876, 2314, 30004, 13, 4706, 1583, 29889, 3318, 29918, 1761, 353, 564, 6332, 29889, 29903, 558, 568, 1293, 26471, 13, 4706, 1583, 29889, 2848, 353, 29871, 29953, 29900, 334, 29871, 29896, 29906, 29900, 30004, 13, 4706, 1583, 29889, 7042, 353, 564, 6332, 29889, 1359, 29918, 726, 545, 703, 13237, 29914, 27247, 23472, 29896, 29889, 6173, 1159, 30004, 13, 30004, 13, 1678, 822, 2767, 29898, 1311, 1125, 30004, 13, 4706, 2428, 2141, 5504, 26471, 13, 4706, 565, 1583, 29889, 24667, 1405, 1583, 29889, 2848, 29901, 30004, 13, 9651, 1583, 29889, 3389, 353, 7700, 30004, 13, 30004, 13, 1678, 822, 4216, 29898, 1311, 1125, 30004, 13, 4706, 2428, 2141, 4012, 26471, 13, 30004, 13, 30004, 13, 1990, 16281, 300, 29898, 279, 6332, 29889, 29903, 558, 568, 1125, 30004, 13, 1678, 9995, 30004, 13, 1678, 910, 770, 11524, 278, 1302, 1144, 373, 1749, 4315, 29889, 739, 338, 263, 2278, 770, 310, 30004, 13, 1678, 278, 564, 6332, 3489, 29915, 29879, 376, 29903, 558, 568, 29908, 770, 22993, 13, 1678, 9995, 30004, 13, 30004, 13, 1678, 396, 817, 263, 525, 29883, 21977, 29915, 30004, 13, 30004, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 2927, 29892, 16614, 1125, 30004, 13, 4706, 2428, 2141, 1649, 2344, 1649, 703, 13237, 29914, 509, 1161, 29889, 2732, 613, 29871, 29896, 8443, 13, 4706, 1583, 29889, 29883, 21977, 353, 16614, 30004, 13, 4706, 1583, 29889, 2780, 353, 2927, 30004, 13, 4706, 1583, 29889, 5064, 29918, 29891, 353, 313, 1311, 29889, 3545, 847, 29871, 29946, 29897, 334, 29871, 29906, 30004, 13, 4706, 1583, 29889, 29894, 29918, 29916, 353, 29871, 29900, 30004, 13, 30004, 13, 1678, 822, 8158, 29898, 1311, 29892, 916, 1125, 30004, 13, 4706, 363, 921, 297, 1583, 29889, 29883, 21977, 29901, 30004, 13, 9651, 565, 451, 921, 29889, 3198, 29898, 1228, 1125, 30004, 13, 18884, 736, 7700, 30004, 13, 4706, 736, 5852, 30004, 13, 30004, 13, 1678, 822, 2767, 29898, 1311, 1125, 30004, 13, 4706, 1583, 29889, 5064, 29918, 29916, 4619, 1583, 29889, 29894, 29918, 29916, 30004, 13, 4706, 565, 1583, 29889, 5064, 29918, 29916, 6736, 12314, 1525, 1430, 29918, 22574, 29901, 30004, 13, 9651, 1583, 29889, 5064, 29918, 29916, 353, 12314, 1525, 1430, 29918, 22574, 448, 29871, 29896, 30004, 13, 9651, 1583, 29889, 29894, 29918, 29916, 353, 29871, 29900, 30004, 13, 4706, 565, 1583, 29889, 5064, 29918, 29916, 5277, 29871, 29900, 29901, 30004, 13, 9651, 1583, 29889, 5064, 29918, 29916, 353, 29871, 29896, 30004, 13, 9651, 1583, 29889, 29894, 29918, 29916, 353, 29871, 29900, 30004, 13, 30004, 13, 30004, 13, 1990, 14053, 292, 2061, 29898, 279, 6332, 29889, 29903, 558, 568, 1125, 30004, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 334, 5085, 29892, 3579, 19290, 1125, 30004, 13, 4706, 2428, 2141, 1649, 2344, 1649, 10456, 5085, 29892, 3579, 19290, 8443, 13, 4706, 1583, 29889, 29894, 29918, 29891, 353, 22236, 29918, 29954, 4717, 29963, 11937, 30004, 13, 4706, 1583, 29889, 3364, 29918, 791, 353, 29871, 29896, 29900, 29900, 30004, 13, 4706, 1583, 29889, 14057, 29918, 791, 353, 448, 29896, 29900, 29900, 30004, 13, 4706, 1583, 29889, 9894, 29918, 791, 353, 448, 29945, 29900, 30004, 13, 4706, 1583, 29889, 1853, 353, 376, 29943, 27855, 2061, 19451, 13, 4706, 1583, 29889, 29894, 29918, 29916, 353, 29871, 29900, 30004, 13, 4706, 1583, 29889, 5064, 29918, 29891, 353, 4036, 29889, 9502, 3881, 29898, 7187, 1525, 1430, 29918, 9606, 22530, 718, 29871, 29906, 29900, 11167, 13, 462, 462, 308, 12314, 1525, 1430, 29918, 9606, 22530, 718, 29871, 29896, 29900, 29900, 8443, 13, 4706, 1583, 29889, 5064, 29918, 29916, 353, 4036, 29889, 9502, 3881, 29898, 7187, 1525, 1430, 29918, 22574, 8443, 13, 4706, 1583, 29889, 24667, 353, 29871, 29900, 30004, 13, 30004, 13, 1678, 822, 10092, 29918, 1066, 29898, 1311, 1125, 30004, 13, 4706, 396, 2538, 300, 278, 19480, 304, 263, 4036, 9758, 2038, 278, 4315, 30004, 13, 4706, 1583, 29889, 5064, 29918, 29891, 353, 4036, 29889, 9502, 3881, 29898, 7187, 1525, 1430, 29918, 9606, 22530, 718, 29871, 29906, 29900, 11167, 13, 462, 462, 308, 12314, 1525, 1430, 29918, 9606, 22530, 718, 29871, 29896, 29900, 29900, 8443, 13, 4706, 1583, 29889, 5064, 29918, 29916, 353, 4036, 29889, 9502, 3881, 29898, 7187, 1525, 1430, 29918, 22574, 8443, 13, 30004, 13, 1678, 822, 1889, 29918, 9894, 29898, 1311, 1125, 30004, 13, 4706, 1583, 29889, 12071, 29918, 1066, 26471, 13, 30004, 13, 1678, 822, 2767, 29898, 1311, 1125, 30004, 13, 4706, 396, 25249, 278, 19480, 30004, 13, 4706, 1583, 29889, 24667, 4619, 29871, 29896, 30004, 13, 4706, 1583, 29889, 5064, 29918, 29891, 4619, 1583, 29889, 29894, 29918, 29891, 30004, 13, 4706, 1583, 29889, 5064, 29918, 29916, 4619, 1583, 29889, 29894, 29918, 29916, 30004, 13, 4706, 565, 1583, 29889, 5064, 29918, 29916, 6736, 12314, 1525, 1430, 29918, 22574, 29901, 30004, 13, 9651, 1583, 29889, 5064, 29918, 29916, 353, 12314, 1525, 1430, 29918, 22574, 448, 29871, 29896, 30004, 13, 9651, 1583, 29889, 29894, 29918, 29916, 353, 29871, 29900, 30004, 13, 4706, 565, 1583, 29889, 5064, 29918, 29916, 5277, 29871, 29900, 29901, 30004, 13, 9651, 1583, 29889, 5064, 29918, 29916, 353, 29871, 29896, 30004, 13, 9651, 1583, 29889, 29894, 29918, 29916, 353, 29871, 29900, 30004, 13, 4706, 565, 1583, 29889, 3332, 529, 29871, 29900, 29901, 30004, 13, 9651, 1583, 29889, 5014, 29918, 9894, 26471, 13, 30004, 13, 30004, 13, 1990, 8313, 1026, 29898, 29943, 27855, 2061, 1125, 30004, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 2927, 29892, 659, 1125, 30004, 13, 4706, 2428, 2141, 1649, 2344, 1649, 703, 13237, 29914, 2238, 5553, 29906, 29889, 2732, 613, 29871, 29896, 8443, 13, 4706, 1583, 29889, 791, 353, 659, 30004, 13, 4706, 1583, 29889, 2780, 353, 2927, 30004, 13, 4706, 1583, 29889, 1853, 353, 376, 29933, 352, 1026, 19451, 13, 4706, 1583, 29889, 29894, 29918, 29891, 353, 22236, 29918, 29954, 4717, 29963, 11937, 334, 29871, 29900, 29889, 29945, 30004, 13, 4706, 1583, 29889, 3364, 29918, 791, 353, 29871, 29896, 29900, 29900, 30004, 13, 4706, 1583, 29889, 14057, 29918, 791, 353, 448, 29906, 29900, 29900, 30004, 13, 4706, 1583, 29889, 9894, 29918, 791, 353, 29871, 29896, 29900, 30004, 13, 30004, 13, 1678, 822, 15049, 271, 29898, 1311, 29892, 5182, 1125, 30004, 13, 4706, 350, 13309, 1307, 29911, 29918, 29903, 4162, 3352, 353, 4036, 29889, 9502, 3881, 29898, 29906, 29892, 29947, 8443, 13, 4706, 1369, 29918, 29916, 353, 1583, 29889, 5064, 29918, 29916, 30004, 13, 4706, 1369, 29918, 29891, 353, 1583, 29889, 5064, 29918, 29891, 30004, 13, 30004, 13, 4706, 396, 3617, 278, 12551, 4423, 363, 278, 24334, 30004, 13, 4706, 2731, 29918, 29916, 353, 3646, 29889, 5064, 29918, 29916, 718, 4036, 29889, 9502, 3881, 6278, 29906, 29900, 29900, 29892, 29906, 29900, 29900, 8443, 13, 4706, 2731, 29918, 29891, 353, 3646, 29889, 5064, 29918, 29891, 718, 4036, 29889, 9502, 3881, 6278, 29906, 29900, 29900, 29892, 29906, 29900, 29900, 8443, 13, 30004, 13, 4706, 396, 1938, 5844, 304, 8147, 920, 304, 679, 278, 24334, 304, 278, 12551, 22993, 13, 4706, 396, 20535, 362, 278, 10696, 297, 2971, 5834, 1546, 278, 1369, 3291, 30004, 13, 4706, 396, 322, 1095, 3291, 29889, 910, 338, 278, 10696, 278, 24334, 674, 9850, 22993, 13, 4706, 921, 29918, 12765, 353, 2731, 29918, 29916, 448, 1369, 29918, 29916, 30004, 13, 4706, 343, 29918, 12765, 353, 2731, 29918, 29891, 448, 1369, 29918, 29891, 30004, 13, 4706, 10696, 353, 5844, 29889, 23402, 29906, 29898, 29891, 29918, 12765, 29892, 921, 29918, 12765, 8443, 13, 30004, 13, 4706, 396, 323, 5086, 964, 3633, 278, 10696, 29892, 8147, 1749, 1735, 29918, 29916, 30004, 13, 4706, 396, 322, 1735, 29918, 29891, 29889, 12019, 25245, 338, 920, 5172, 278, 24334, 9850, 29879, 22993, 13, 4706, 1583, 29889, 29894, 29918, 29916, 353, 5844, 29889, 3944, 29898, 2521, 29897, 334, 350, 13309, 1307, 29911, 29918, 29903, 4162, 3352, 30004, 13, 4706, 1583, 29889, 29894, 29918, 29891, 353, 5844, 29889, 5223, 29898, 2521, 29897, 334, 350, 13309, 1307, 29911, 29918, 29903, 4162, 3352, 30004, 13, 30004, 13, 30004, 13, 1990, 1383, 666, 29898, 29943, 27855, 2061, 1125, 30004, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 2927, 29892, 659, 29892, 3233, 1125, 30004, 13, 4706, 2428, 2141, 1649, 2344, 1649, 703, 13237, 29914, 9981, 29914, 3527, 648, 1836, 2732, 1642, 4830, 29898, 8172, 29889, 9502, 3881, 29898, 29900, 29892, 29941, 29896, 8243, 29871, 29900, 29889, 29945, 8443, 13, 4706, 1583, 29889, 5563, 353, 3233, 30004, 13, 4706, 1583, 29889, 791, 353, 659, 30004, 13, 4706, 1583, 29889, 2780, 353, 2927, 30004, 13, 4706, 1583, 29889, 1853, 353, 376, 2713, 666, 19451, 13, 4706, 1583, 29889, 29894, 29918, 29891, 353, 22236, 29918, 29954, 4717, 29963, 11937, 334, 29871, 29900, 29889, 29945, 30004, 13, 4706, 1583, 29889, 3364, 29918, 791, 353, 29871, 29896, 29900, 29900, 30004, 13, 4706, 1583, 29889, 14057, 29918, 791, 353, 448, 29906, 29900, 29900, 30004, 13, 4706, 1583, 29889, 9894, 29918, 791, 353, 29871, 29896, 29900, 29900, 30004, 13, 30004, 13, 1678, 822, 2767, 29898, 1311, 1125, 30004, 13, 4706, 2428, 2141, 5504, 26471, 13, 4706, 565, 313, 1311, 29889, 24667, 1273, 29871, 29953, 29900, 29897, 1275, 29871, 29900, 29901, 30004, 13, 9651, 565, 4036, 29889, 9502, 3881, 29898, 29900, 29892, 29906, 29897, 1275, 29871, 29900, 29901, 30004, 13, 18884, 289, 353, 8313, 1026, 3552, 29906, 29945, 29945, 29892, 29906, 29945, 29945, 29892, 29906, 29945, 29945, 29892, 29906, 29945, 29945, 511, 1311, 29889, 791, 8443, 13, 18884, 289, 29889, 845, 3155, 271, 29898, 1311, 29889, 5563, 29889, 21454, 29918, 1761, 29961, 1311, 29889, 5563, 29889, 8391, 29918, 21454, 2314, 30004, 13, 18884, 1583, 29889, 5563, 29889, 3318, 29918, 1761, 29889, 4397, 29898, 29890, 8443, 13, 18884, 289, 29889, 5064, 29918, 29916, 353, 1583, 29889, 5064, 29918, 29916, 30004, 13, 18884, 289, 29889, 5064, 29918, 29891, 353, 1583, 29889, 5064, 29918, 29891, 30004, 13, 30004, 13, 30004, 13, 1990, 1704, 29896, 6767, 29898, 29943, 27855, 2061, 1125, 30004, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 2927, 29892, 659, 1125, 30004, 13, 4706, 2428, 2141, 1649, 2344, 1649, 703, 13237, 29914, 4287, 29899, 264, 6764, 29906, 29889, 2732, 613, 29871, 29947, 8443, 13, 4706, 1583, 29889, 791, 353, 659, 30004, 13, 4706, 1583, 29889, 2780, 353, 2927, 30004, 13, 4706, 1583, 29889, 1853, 353, 376, 8179, 19451, 13, 4706, 1583, 29889, 29894, 29918, 29891, 353, 22236, 29918, 29954, 4717, 29963, 11937, 30004, 13, 4706, 1583, 29889, 3364, 29918, 791, 353, 29871, 29896, 29900, 29900, 30004, 13, 4706, 1583, 29889, 14057, 29918, 791, 353, 448, 29906, 29900, 29900, 30004, 13, 4706, 1583, 29889, 9894, 29918, 791, 353, 29871, 29945, 29900, 30004, 13, 30004, 13, 30004, 13, 1990, 317, 556, 1747, 8179, 29896, 6767, 29898, 29943, 27855, 2061, 1125, 30004, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 2927, 29892, 659, 1125, 30004, 13, 4706, 2428, 2141, 1649, 2344, 1649, 703, 13237, 29914, 4287, 29899, 264, 6764, 29906, 29889, 2732, 613, 29871, 29947, 8443, 13, 4706, 1583, 29889, 791, 353, 659, 30004, 13, 4706, 1583, 29889, 2780, 353, 2927, 30004, 13, 4706, 1583, 29889, 1853, 353, 376, 8179, 19451, 13, 4706, 1583, 29889, 29894, 29918, 29891, 353, 22236, 29918, 29954, 4717, 29963, 11937, 334, 29871, 29900, 29889, 29945, 30004, 13, 4706, 1583, 29889, 3364, 29918, 791, 353, 29871, 29896, 29900, 29900, 30004, 13, 4706, 1583, 29889, 14057, 29918, 791, 353, 448, 29906, 29900, 29900, 30004, 13, 4706, 1583, 29889, 9894, 29918, 791, 353, 29871, 29896, 29900, 29900, 30004, 13, 30004, 13, 1678, 822, 2767, 29898, 1311, 1125, 30004, 13, 4706, 8825, 353, 4036, 29889, 9502, 3881, 29898, 29900, 29892, 29896, 29900, 29900, 8443, 13, 4706, 565, 8825, 529, 29871, 29945, 29901, 30004, 13, 9651, 396, 7370, 317, 556, 1747, 30004, 13, 9651, 1583, 29889, 29894, 29918, 29916, 353, 29871, 29896, 30004, 13, 4706, 2428, 2141, 5504, 26471, 13, 30004, 13, 30004, 13, 1990, 1704, 29896, 3373, 29898, 29943, 27855, 2061, 1125, 30004, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 2927, 29892, 659, 1125, 30004, 13, 4706, 2428, 2141, 1649, 2344, 1649, 703, 13237, 29914, 4287, 29899, 264, 6764, 29889, 2732, 613, 29871, 29947, 8443, 13, 4706, 1583, 29889, 791, 353, 659, 30004, 13, 4706, 1583, 29889, 2780, 353, 2927, 30004, 13, 4706, 1583, 29889, 1853, 353, 376, 8179, 19451, 13, 4706, 1583, 29889, 29894, 29918, 29891, 353, 22236, 29918, 29954, 4717, 29963, 11937, 30004, 13, 4706, 1583, 29889, 3364, 29918, 791, 353, 29871, 29896, 29900, 29900, 30004, 13, 4706, 1583, 29889, 14057, 29918, 791, 353, 448, 29906, 29900, 29900, 30004, 13, 4706, 1583, 29889, 9894, 29918, 791, 353, 29871, 29945, 29900, 30004, 13, 30004, 13, 30004, 13, 1990, 317, 556, 1747, 8179, 29896, 3373, 29898, 29943, 27855, 2061, 1125, 30004, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 2927, 29892, 659, 1125, 30004, 13, 4706, 2428, 2141, 1649, 2344, 1649, 703, 13237, 29914, 4287, 29899, 264, 6764, 29889, 2732, 613, 29871, 29955, 8443, 13, 4706, 1583, 29889, 791, 353, 659, 30004, 13, 4706, 1583, 29889, 2780, 353, 2927, 30004, 13, 4706, 1583, 29889, 1853, 353, 376, 8179, 19451, 13, 4706, 1583, 29889, 29894, 29918, 29891, 353, 22236, 29918, 29954, 4717, 29963, 11937, 334, 29871, 29906, 30004, 13, 4706, 1583, 29889, 3364, 29918, 791, 353, 29871, 29896, 29900, 29900, 30004, 13, 4706, 1583, 29889, 14057, 29918, 791, 353, 448, 29906, 29900, 29900, 30004, 13, 4706, 1583, 29889, 9894, 29918, 791, 353, 29871, 29896, 29900, 29900, 30004, 13, 30004, 13, 1678, 822, 2767, 29898, 1311, 1125, 30004, 13, 4706, 8825, 353, 4036, 29889, 9502, 3881, 29898, 29900, 29892, 29896, 29900, 29900, 334, 29871, 29953, 29900, 8443, 13, 4706, 565, 8825, 1275, 29871, 29896, 29901, 30004, 13, 9651, 396, 7370, 317, 556, 1747, 30004, 13, 9651, 1583, 29889, 29894, 29918, 29916, 353, 4036, 29889, 9502, 3881, 29898, 29900, 29892, 29953, 8443, 13, 4706, 2428, 2141, 5504, 26471, 13, 30004, 13, 30004, 13, 1990, 1704, 29906, 3373, 29898, 29943, 27855, 2061, 1125, 30004, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 2927, 29892, 659, 1125, 30004, 13, 4706, 2428, 2141, 1649, 2344, 1649, 703, 13237, 29914, 4287, 29899, 9106, 29889, 2732, 613, 29871, 29947, 8443, 13, 4706, 1583, 29889, 791, 353, 659, 30004, 13, 4706, 1583, 29889, 2780, 353, 2927, 30004, 13, 4706, 1583, 29889, 1853, 353, 376, 8179, 19451, 13, 4706, 1583, 29889, 29894, 29918, 29891, 353, 22236, 29918, 29954, 4717, 29963, 11937, 334, 29871, 29900, 29889, 29906, 29945, 30004, 13, 4706, 1583, 29889, 3364, 29918, 791, 353, 29871, 29896, 29900, 29900, 30004, 13, 4706, 1583, 29889, 14057, 29918, 791, 353, 448, 29906, 29900, 29900, 30004, 13, 4706, 1583, 29889, 9894, 29918, 791, 353, 29871, 29945, 29900, 30004, 13, 30004, 13, 30004, 13, 1990, 317, 556, 1747, 8179, 29906, 3373, 29898, 29943, 27855, 2061, 1125, 30004, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 2927, 29892, 659, 1125, 30004, 13, 4706, 2428, 2141, 1649, 2344, 1649, 703, 13237, 29914, 4287, 29899, 9106, 29889, 2732, 613, 29871, 29947, 8443, 13, 4706, 1583, 29889, 791, 353, 659, 30004, 13, 4706, 1583, 29889, 2780, 353, 2927, 30004, 13, 4706, 1583, 29889, 1853, 353, 376, 8179, 19451, 13, 4706, 1583, 29889, 29894, 29918, 29891, 353, 22236, 29918, 29954, 4717, 29963, 11937, 334, 29871, 29900, 29889, 29906, 29945, 30004, 13, 4706, 1583, 29889, 3364, 29918, 791, 353, 29871, 29896, 29900, 29900, 30004, 13, 4706, 1583, 29889, 14057, 29918, 791, 353, 448, 29906, 29900, 29900, 30004, 13, 4706, 1583, 29889, 9894, 29918, 791, 353, 29871, 29896, 29900, 29900, 30004, 13, 30004, 13, 1678, 822, 2767, 29898, 1311, 1125, 30004, 13, 4706, 8825, 353, 4036, 29889, 9502, 3881, 29898, 29900, 29892, 29896, 29900, 29900, 334, 29871, 29953, 29900, 334, 29871, 29945, 8443, 13, 4706, 565, 8825, 1275, 29871, 29896, 29901, 30004, 13, 9651, 396, 7370, 317, 556, 1747, 30004, 13, 9651, 1583, 29889, 29894, 29918, 29916, 353, 4036, 29889, 9502, 3881, 29898, 29900, 29892, 29953, 8443, 13, 4706, 2428, 2141, 5504, 26471, 13, 30004, 13, 30004, 13, 1990, 15472, 29898, 29943, 27855, 2061, 1125, 30004, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 2927, 29892, 659, 1125, 30004, 13, 4706, 2428, 2141, 1649, 2344, 1649, 703, 13237, 29914, 8336, 29889, 2732, 613, 29871, 29946, 8443, 13, 4706, 1583, 29889, 791, 353, 659, 30004, 13, 4706, 1583, 29889, 2780, 353, 2927, 30004, 13, 4706, 1583, 29889, 1853, 353, 376, 9837, 459, 19451, 13, 4706, 1583, 29889, 29894, 29918, 29891, 353, 448, 29947, 30004, 13, 4706, 1583, 29889, 3364, 29918, 791, 353, 29871, 29896, 29900, 29900, 30004, 13, 4706, 1583, 29889, 14057, 29918, 791, 353, 448, 29896, 29945, 29900, 29900, 30004, 13, 4706, 1583, 29889, 9894, 29918, 791, 353, 29871, 29900, 30004, 13, 30004, 13, 30004, 13, 1990, 3929, 459, 29898, 29943, 27855, 2061, 1125, 30004, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 2927, 29892, 659, 1125, 30004, 13, 4706, 2428, 2141, 1649, 2344, 1649, 703, 13237, 29914, 1129, 29877, 29889, 2732, 613, 29871, 29900, 29889, 29900, 29945, 8443, 13, 4706, 1583, 29889, 791, 353, 659, 30004, 13, 4706, 1583, 29889, 2780, 353, 2927, 30004, 13, 4706, 1583, 29889, 1853, 353, 376, 9837, 459, 19451, 13, 4706, 1583, 29889, 29894, 29918, 29891, 353, 22236, 29918, 29954, 4717, 29963, 11937, 334, 29871, 29900, 29889, 29945, 30004, 13, 4706, 1583, 29889, 3364, 29918, 791, 353, 29871, 29896, 29900, 29900, 30004, 13, 4706, 1583, 29889, 14057, 29918, 791, 353, 448, 29945, 29900, 29900, 30004, 13, 4706, 1583, 29889, 9894, 29918, 791, 353, 29871, 29945, 29900, 30004, 13, 30004, 13, 30004, 13, 1990, 3812, 29898, 29943, 27855, 2061, 1125, 30004, 13, 1678, 9995, 30004, 13, 1678, 910, 770, 11524, 278, 1302, 1144, 373, 1749, 4315, 29889, 739, 338, 263, 2278, 770, 310, 30004, 13, 1678, 278, 564, 6332, 3489, 29915, 29879, 376, 29903, 558, 568, 29908, 770, 22993, 13, 1678, 9995, 30004, 13, 30004, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 2927, 29892, 659, 1125, 30004, 13, 4706, 2428, 2141, 1649, 2344, 1649, 703, 13237, 29914, 689, 29899, 4144, 29889, 2732, 613, 29871, 29900, 29889, 29945, 8443, 13, 4706, 1583, 29889, 791, 353, 659, 30004, 13, 4706, 1583, 29889, 2780, 353, 2927, 30004, 13, 4706, 1583, 29889, 1853, 353, 376, 2500, 19451, 13, 4706, 1583, 29889, 29894, 29918, 29891, 353, 22236, 29918, 29954, 4717, 29963, 11937, 30004, 13, 30004, 13, 30004, 13, 1990, 1619, 14199, 29898, 279, 6332, 29889, 5907, 1125, 30004, 13, 1678, 9995, 30004, 13, 1678, 4241, 2280, 770, 22993, 13, 30004, 13, 1678, 6058, 29923, 29901, 2921, 14432, 322, 5217, 278, 3519, 366, 1016, 29915, 29873, 817, 22993, 13, 1678, 960, 366, 437, 817, 263, 1158, 29892, 5217, 278, 525, 3364, 29915, 322, 5191, 372, 30004, 13, 1678, 411, 596, 1914, 775, 29889, 3872, 29915, 29873, 5967, 525, 3364, 29915, 297, 445, 1824, 22993, 13, 1678, 9995, 30004, 13, 30004, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 2920, 29892, 3171, 29892, 3611, 1125, 30004, 13, 4706, 2428, 2141, 1649, 2344, 12035, 2103, 29892, 3171, 29892, 3611, 8443, 13, 30004, 13, 4706, 564, 6332, 29889, 842, 29918, 7042, 29918, 2780, 29898, 279, 6332, 29889, 2780, 29889, 29909, 1529, 29999, 1164, 8443, 13, 4706, 1583, 29889, 5563, 353, 6213, 30004, 13, 4706, 396, 960, 366, 505, 29227, 8857, 29892, 366, 881, 1653, 963, 1244, 11167, 13, 4706, 396, 322, 731, 963, 304, 6213, 30004, 13, 30004, 13, 1678, 822, 6230, 29898, 1311, 1125, 30004, 13, 4706, 396, 6204, 596, 7689, 3246, 322, 29227, 8857, 1244, 30004, 13, 4706, 396, 1583, 29889, 5563, 353, 21597, 29896, 26471, 13, 4706, 1209, 30004, 13, 30004, 13, 1678, 822, 373, 29918, 4012, 29898, 1311, 1125, 30004, 13, 4706, 9995, 30004, 13, 4706, 26000, 278, 4315, 22993, 13, 4706, 9995, 30004, 13, 30004, 13, 4706, 396, 910, 1899, 881, 3799, 1434, 591, 1369, 11580, 29889, 739, 674, 2821, 30004, 13, 4706, 396, 278, 4315, 304, 278, 3239, 2927, 29892, 322, 604, 559, 825, 591, 15010, 1833, 3515, 22993, 13, 4706, 564, 6332, 29889, 2962, 29918, 9482, 26471, 13, 30004, 13, 4706, 565, 1583, 29889, 5563, 338, 451, 6213, 29901, 30004, 13, 9651, 1583, 29889, 5563, 29889, 4012, 26471, 13, 4706, 1683, 29901, 30004, 13, 9651, 564, 6332, 29889, 4012, 29918, 726, 29898, 30004, 13, 18884, 376, 29911, 6472, 5926, 448, 319, 14053, 292, 4669, 29879, 8448, 29905, 29876, 17825, 3583, 29876, 29909, 29892, 19941, 353, 25249, 16281, 300, 19941, 29905, 29876, 29928, 29892, 10428, 826, 798, 353, 25249, 16281, 300, 10428, 29905, 29876, 8863, 353, 8084, 16281, 300, 29898, 8948, 9500, 363, 4721, 29894, 2144, 29876, 29903, 353, 22303, 599, 1321, 9737, 29905, 29876, 14936, 448, 22303, 1857, 20968, 29905, 29876, 29900, 448, 2799, 582, 1953, 29905, 29876, 29896, 29899, 29955, 448, 7605, 21597, 29905, 29876, 29896, 29899, 29945, 526, 21981, 29892, 29871, 29953, 338, 1704, 29892, 29871, 29955, 338, 14121, 15231, 13, 462, 29900, 29892, 29871, 29900, 29892, 564, 6332, 29889, 2780, 29889, 13367, 11375, 29892, 29871, 29953, 29900, 8443, 13, 4706, 396, 4231, 728, 11580, 322, 2479, 278, 1121, 30004, 13, 4706, 396, 564, 6332, 29889, 4951, 728, 29918, 9482, 26471, 13, 4706, 396, 8251, 4216, 580, 373, 599, 596, 29227, 8857, 2400, 30004, 13, 30004, 13, 1678, 822, 373, 29918, 5504, 29898, 1311, 29892, 19471, 29918, 2230, 1125, 30004, 13, 4706, 9995, 30004, 13, 4706, 2178, 278, 5900, 304, 4337, 29892, 322, 278, 3748, 5900, 5771, 1244, 22993, 13, 4706, 5655, 635, 29892, 366, 29915, 645, 1246, 2767, 580, 373, 278, 29227, 8857, 393, 30004, 13, 4706, 817, 372, 22993, 13, 4706, 9995, 30004, 13, 4706, 565, 1583, 29889, 5563, 338, 451, 6213, 29901, 30004, 13, 9651, 1583, 29889, 5563, 29889, 5504, 26471, 13, 30004, 13, 1678, 822, 373, 29918, 1989, 29918, 2139, 29898, 1311, 29892, 1820, 29892, 1820, 29918, 1545, 14903, 1125, 30004, 13, 4706, 9995, 30004, 13, 4706, 3037, 839, 10940, 263, 1820, 373, 278, 12247, 338, 15385, 22993, 13, 30004, 13, 4706, 1152, 263, 2989, 1051, 310, 6611, 29892, 1074, 29901, 30004, 13, 4706, 1732, 597, 279, 6332, 29889, 562, 1943, 1357, 29914, 279, 6332, 29889, 1989, 29889, 1420, 30004, 13, 4706, 9995, 30004, 13, 4706, 565, 1820, 1275, 564, 6332, 29889, 1989, 29889, 29984, 29901, 396, 322, 1820, 29918, 1545, 14903, 669, 564, 6332, 29889, 1989, 29889, 6720, 29928, 29918, 1783, 2241, 29901, 30004, 13, 9651, 6876, 29898, 29900, 8443, 13, 4706, 25342, 1820, 1275, 564, 6332, 29889, 1989, 29889, 10818, 29918, 29900, 29901, 30004, 13, 9651, 1583, 29889, 5563, 353, 6213, 30004, 13, 4706, 25342, 1820, 1275, 564, 6332, 29889, 1989, 29889, 10818, 29918, 29896, 29901, 30004, 13, 9651, 1583, 29889, 5563, 353, 21597, 29896, 26471, 13, 4706, 25342, 1820, 1275, 564, 6332, 29889, 1989, 29889, 10818, 29918, 29906, 29901, 30004, 13, 9651, 1583, 29889, 5563, 353, 21597, 29906, 26471, 13, 4706, 25342, 1820, 1275, 564, 6332, 29889, 1989, 29889, 10818, 29918, 29941, 29901, 30004, 13, 9651, 1583, 29889, 5563, 353, 21597, 29941, 26471, 13, 4706, 25342, 1820, 1275, 564, 6332, 29889, 1989, 29889, 10818, 29918, 29946, 29901, 30004, 13, 9651, 1583, 29889, 5563, 353, 21597, 29946, 26471, 13, 4706, 25342, 1820, 1275, 564, 6332, 29889, 1989, 29889, 10818, 29918, 29945, 29901, 30004, 13, 9651, 1583, 29889, 5563, 353, 21597, 29945, 26471, 13, 4706, 25342, 1820, 1275, 564, 6332, 29889, 1989, 29889, 10818, 29918, 29953, 29901, 30004, 13, 9651, 1583, 29889, 5563, 353, 1704, 10108, 26471, 13, 4706, 25342, 1820, 1275, 564, 6332, 29889, 1989, 29889, 10818, 29918, 29955, 29901, 30004, 13, 9651, 1583, 29889, 5563, 353, 14121, 10108, 26471, 13, 4706, 25342, 1583, 29889, 5563, 338, 451, 6213, 29901, 30004, 13, 9651, 1583, 29889, 5563, 29889, 265, 29918, 1989, 29918, 2139, 29898, 1989, 29892, 1820, 29918, 1545, 14903, 8443, 13, 30004, 13, 1678, 822, 373, 29918, 1989, 29918, 14096, 29898, 1311, 29892, 1820, 29892, 1820, 29918, 1545, 14903, 1125, 30004, 13, 4706, 9995, 30004, 13, 4706, 3037, 839, 10940, 278, 1404, 16869, 1283, 263, 9251, 15385, 1820, 22993, 13, 4706, 9995, 30004, 13, 4706, 565, 1583, 29889, 5563, 338, 451, 6213, 29901, 30004, 13, 9651, 1583, 29889, 5563, 29889, 265, 29918, 1989, 29918, 14096, 29898, 1989, 29892, 1820, 29918, 1545, 14903, 8443, 13, 30004, 13, 1678, 822, 373, 29918, 15769, 29918, 29885, 8194, 29898, 1311, 29892, 921, 29892, 343, 29892, 19471, 29918, 29916, 29892, 19471, 29918, 29891, 1125, 30004, 13, 4706, 9995, 30004, 13, 4706, 3037, 839, 10940, 278, 9495, 16229, 22993, 13, 4706, 9995, 30004, 13, 4706, 1209, 30004, 13, 30004, 13, 1678, 822, 373, 29918, 15769, 29918, 2139, 29898, 1311, 29892, 921, 29892, 343, 29892, 2826, 29892, 1820, 29918, 1545, 14903, 1125, 30004, 13, 4706, 9995, 30004, 13, 4706, 3037, 839, 746, 278, 1404, 3965, 267, 263, 9495, 2826, 22993, 13, 4706, 9995, 30004, 13, 4706, 1209, 30004, 13, 30004, 13, 1678, 822, 373, 29918, 15769, 29918, 14096, 29898, 1311, 29892, 921, 29892, 343, 29892, 2826, 29892, 1820, 29918, 1545, 14903, 1125, 30004, 13, 4706, 9995, 30004, 13, 4706, 3037, 839, 746, 263, 1404, 27474, 263, 9495, 2826, 22993, 13, 4706, 9995, 30004, 13, 4706, 1209, 30004, 13, 30004, 13, 30004, 13, 1753, 1667, 7295, 30004, 13, 1678, 9995, 4241, 1158, 9995, 30004, 13, 1678, 3748, 353, 1619, 14199, 29898, 7187, 1525, 1430, 29918, 22574, 29892, 12314, 1525, 1430, 29918, 9606, 22530, 29892, 12314, 1525, 1430, 29918, 29911, 1806, 1307, 8443, 13, 1678, 3748, 29889, 14669, 26471, 13, 1678, 564, 6332, 29889, 3389, 26471, 13, 30004, 13, 30004, 13, 361, 4770, 978, 1649, 1275, 376, 1649, 3396, 1649, 1115, 30004, 13, 1678, 1667, 26471, 13, 2 ]
models/cnn.py
AnanyaAppan/DeblurGANv2
0
104047
from torch.nn import Sequential, Module, ConvTranspose2d class CNN(Module): def __init__(self): super(CNN, self).__init__() self.layers = Sequential( # Conv2d(6, 32, kernel_size=5, stride=1, padding=2), ConvTranspose2d(3, 3, kernel_size=5, stride=1, padding=2), ) # Defining the forward pass # def forward(self, img, prev_img): def forward(self,img, attention_map, downsampled_attention_map): x = self.layers(img) return x
[ 1, 515, 4842, 305, 29889, 15755, 1053, 922, 339, 2556, 29892, 15591, 29892, 1281, 29894, 4300, 4220, 29906, 29881, 13, 13, 13, 1990, 29696, 29898, 7355, 1125, 1678, 13, 1678, 822, 4770, 2344, 12035, 1311, 1125, 13, 4706, 2428, 29898, 29907, 10262, 29892, 1583, 467, 1649, 2344, 1649, 580, 13, 13, 4706, 1583, 29889, 29277, 353, 922, 339, 2556, 29898, 13, 9651, 396, 1281, 29894, 29906, 29881, 29898, 29953, 29892, 29871, 29941, 29906, 29892, 8466, 29918, 2311, 29922, 29945, 29892, 380, 2426, 29922, 29896, 29892, 7164, 29922, 29906, 511, 13, 9651, 1281, 29894, 4300, 4220, 29906, 29881, 29898, 29941, 29892, 29871, 29941, 29892, 8466, 29918, 2311, 29922, 29945, 29892, 380, 2426, 29922, 29896, 29892, 7164, 29922, 29906, 511, 29871, 13, 4706, 1723, 13, 13, 13, 1678, 396, 5282, 2827, 278, 6375, 1209, 268, 13, 1678, 396, 822, 6375, 29898, 1311, 29892, 10153, 29892, 12379, 29918, 2492, 1125, 13, 1678, 822, 6375, 29898, 1311, 29892, 2492, 29892, 8570, 29918, 1958, 29892, 1623, 11249, 29881, 29918, 1131, 2509, 29918, 1958, 1125, 13, 4706, 921, 353, 1583, 29889, 29277, 29898, 2492, 29897, 13, 13, 4706, 736, 921, 13, 13, 13, 2 ]
BeamlineStatusLogger/logger.py
DESY-P02-1/BeamlineStatusLogger
0
40333
<reponame>DESY-P02-1/BeamlineStatusLogger from collections import Iterable def as_iterable(object): if isinstance(object, Iterable): return object else: return [object] class Logger: def __init__(self, source, processors, sink, timer): self.source = source self.processors = as_iterable(processors) self.sink = sink self.timer = timer def run(self): self.timer.reset() success = True while self.timer(success): data = self.source.read() for proc in self.processors: data = proc(data) success = self.sink.write(data) def abort(self): self.timer.abort()
[ 1, 529, 276, 1112, 420, 29958, 2287, 14816, 29899, 29925, 29900, 29906, 29899, 29896, 29914, 3629, 314, 1220, 5709, 16363, 13, 3166, 16250, 1053, 20504, 519, 13, 13, 13, 1753, 408, 29918, 1524, 519, 29898, 3318, 1125, 13, 1678, 565, 338, 8758, 29898, 3318, 29892, 20504, 519, 1125, 13, 4706, 736, 1203, 13, 1678, 1683, 29901, 13, 4706, 736, 518, 3318, 29962, 13, 13, 13, 1990, 28468, 29901, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 2752, 29892, 1889, 943, 29892, 28169, 29892, 12237, 1125, 13, 4706, 1583, 29889, 4993, 353, 2752, 13, 4706, 1583, 29889, 5014, 943, 353, 408, 29918, 1524, 519, 29898, 5014, 943, 29897, 13, 4706, 1583, 29889, 29879, 682, 353, 28169, 13, 4706, 1583, 29889, 20404, 353, 12237, 13, 13, 1678, 822, 1065, 29898, 1311, 1125, 13, 4706, 1583, 29889, 20404, 29889, 12071, 580, 13, 4706, 2551, 353, 5852, 13, 4706, 1550, 1583, 29889, 20404, 29898, 8698, 1125, 13, 9651, 848, 353, 1583, 29889, 4993, 29889, 949, 580, 13, 9651, 363, 9580, 297, 1583, 29889, 5014, 943, 29901, 13, 18884, 848, 353, 9580, 29898, 1272, 29897, 13, 9651, 2551, 353, 1583, 29889, 29879, 682, 29889, 3539, 29898, 1272, 29897, 13, 13, 1678, 822, 27450, 29898, 1311, 1125, 13, 4706, 1583, 29889, 20404, 29889, 370, 441, 580, 13, 2 ]
legacy_code/legacy_2c_main_mortality_rnn.py
mtkier94/Neural-calibration-of-hidden-inhomogeneous-Marko-chains
0
115939
<reponame>mtkier94/Neural-calibration-of-hidden-inhomogeneous-Marko-chains import numpy as np import pandas as pd import os import matplotlib.pyplot as plt from sklearn.utils import shuffle from itertools import product as iter_prod import tensorflow as tf from tensorflow.keras.models import Model, load_model from tensorflow.keras.layers import Dense, Input, GRU, SimpleRNN from global_vars import T_MAX from functions.sub_data_prep import create_trainingdata_baseline from functions.tf_model_base import create_baseline_model_rnn, transfer_weights_dense2simpleRNN from functions.sub_backtesting import check_if_rnn_version #from sub_tf_functions import create_baseline_model_rnn, transfer_weights_dense2simpleRNN from global_vars import T_MAX from global_vars import path_data, path_models_baseline_transfer if __name__ == '__main__': raise ValueError('Content of this script has been moved/ appended to main_baseline.py') baseline_sex = 'female' p_survive = pd.read_csv(os.path.join(path_data,r'DAV2008T{}.csv'.format(baseline_sex)), delimiter = ';', header=None ).loc[:,0].values.reshape((-1,1)) if baseline_sex == 'female': p_other_sex = pd.read_csv(os.path.join(path_data,r'DAV2008T{}.csv'.format('male')), delimiter = ';', header=None ).loc[:,0].values.reshape((-1,1)) tag_other_sex = 'DAVT2008male' elif baseline_sex == 'male': p_other_sex = pd.read_csv(os.path.join(path_data,r'DAV2008T{}.csv'.format('female')), delimiter = ';', header=None ).loc[:,0].values.reshape((-1,1)) tag_other_sex = 'DAVT2008female' else: raise ValueError('Unknown baseline_sex') assert(T_MAX == len(p_survive)-1) freqs = [1,1/2, 1/3, 1/6, 1/12] x, y = create_trainingdata_baseline(frequencies = freqs, surv_probs=p_survive, age_scale=T_MAX) x, y = shuffle(x, y) n_in = x.shape[1] n_out = 2 # RNN inputs: A 3D tensor, with shape [batch, timesteps, feature] model_rnn = create_baseline_model_rnn(input_shape=(None, n_in), n_out= n_out, hidden_layers=[40,40,20]) #model_rnn.summary() if os.path.exists(os.path.join(path_models_baseline_transfer, r'ffn_davT{}.h5'.format(baseline_sex))): model_pretrained = load_model(os.path.join(path_models_baseline_transfer, r'ffn_davT{}.h5'.format(baseline_sex))) model_pretrained.evaluate(x,y, batch_size=64) print('loss-type: ', model_pretrained.loss) transfer_weights_dense2simpleRNN(dense_model= model_pretrained, rnn_model = model_rnn) model_rnn.save(os.path.join(path_models_baseline_transfer, r'rnn_davT{}.h5'.format(baseline_sex))) print('Weights transferred from ffn to rnn!') assert (check_if_rnn_version(model_ffn=model_pretrained, model_rnn=model_rnn)==True).all() else: print('Model cannot be loaded or trained!') exit() pred = model_rnn.predict(x.reshape(1,-1,n_in)) print('shape of predictions: ', pred.shape) plt.plot(x[:,0]*T_MAX, model_pretrained.predict(x)[:,0], 'xg', alpha = .5, label='ffn') plt.plot(x[:,0]*T_MAX, model_rnn.predict(x.reshape(1,-1,n_in))[0,:,0].flatten(), 'ob', alpha = .2, label='rnn') plt.plot(x[:,0]*T_MAX, y[:,0], linestyle = 'None', marker = '_', color = 'red', label='DAV') plt.plot(x[:,0]*T_MAX, model_pretrained.predict(x)[:,1], 'xg', alpha = .5) plt.plot(x[:,0]*T_MAX, model_rnn.predict(x.reshape(1,-1,n_in))[0,:,1].flatten(), 'ob', alpha = .2) plt.plot(x[:,0]*T_MAX, y[:,1], linestyle = 'None', marker = '_', color = 'red',) plt.yscale('log') plt.title('Fit - FFN vs. RNN vs DAVT2008{}'.format(baseline_sex)) plt.legend() #plt.legend(bbox_to_anchor=(1.05, 1)) plt.show()
[ 1, 529, 276, 1112, 420, 29958, 4378, 29895, 631, 29929, 29946, 29914, 8139, 3631, 29899, 1052, 26218, 29899, 974, 29899, 10892, 29899, 262, 9706, 23724, 29899, 9802, 29877, 29899, 305, 2708, 13, 5215, 12655, 408, 7442, 13, 5215, 11701, 408, 10518, 13, 5215, 2897, 13, 5215, 22889, 29889, 2272, 5317, 408, 14770, 13, 3166, 2071, 19668, 29889, 13239, 1053, 528, 21897, 13, 3166, 4256, 8504, 1053, 3234, 408, 4256, 29918, 10633, 13, 13, 5215, 26110, 408, 15886, 13, 3166, 26110, 29889, 3946, 294, 29889, 9794, 1053, 8125, 29892, 2254, 29918, 4299, 13, 3166, 26110, 29889, 3946, 294, 29889, 29277, 1053, 360, 1947, 29892, 10567, 29892, 18016, 29965, 29892, 12545, 29934, 10262, 13, 13, 3166, 5534, 29918, 16908, 1053, 323, 29918, 12648, 13, 3166, 3168, 29889, 1491, 29918, 1272, 29918, 15287, 1053, 1653, 29918, 26495, 1272, 29918, 6500, 5570, 13, 3166, 3168, 29889, 13264, 29918, 4299, 29918, 3188, 1053, 1653, 29918, 6500, 5570, 29918, 4299, 29918, 29878, 15755, 29892, 6782, 29918, 705, 5861, 29918, 1145, 344, 29906, 12857, 29934, 10262, 13, 3166, 3168, 29889, 1491, 29918, 1627, 13424, 1053, 1423, 29918, 361, 29918, 29878, 15755, 29918, 3259, 13, 29937, 3166, 1014, 29918, 13264, 29918, 12171, 1053, 1653, 29918, 6500, 5570, 29918, 4299, 29918, 29878, 15755, 29892, 6782, 29918, 705, 5861, 29918, 1145, 344, 29906, 12857, 29934, 10262, 13, 13, 3166, 5534, 29918, 16908, 1053, 323, 29918, 12648, 13, 3166, 5534, 29918, 16908, 1053, 2224, 29918, 1272, 29892, 2224, 29918, 9794, 29918, 6500, 5570, 29918, 3286, 571, 13, 13, 13, 361, 4770, 978, 1649, 1275, 525, 1649, 3396, 1649, 2396, 13, 13, 1678, 12020, 7865, 2392, 877, 3916, 310, 445, 2471, 756, 1063, 6153, 29914, 623, 2760, 304, 1667, 29918, 6500, 5570, 29889, 2272, 1495, 13, 13, 13, 1678, 2362, 5570, 29918, 14167, 353, 525, 29888, 331, 744, 29915, 13, 1678, 282, 29918, 7610, 29894, 573, 353, 10518, 29889, 949, 29918, 7638, 29898, 359, 29889, 2084, 29889, 7122, 29898, 2084, 29918, 1272, 29892, 29878, 29915, 29928, 7520, 29906, 29900, 29900, 29947, 29911, 29912, 1836, 7638, 4286, 4830, 29898, 6500, 5570, 29918, 14167, 8243, 29871, 28552, 353, 21921, 742, 4839, 29922, 8516, 13742, 2029, 7503, 29892, 29900, 1822, 5975, 29889, 690, 14443, 3552, 29899, 29896, 29892, 29896, 876, 13, 13, 1678, 565, 2362, 5570, 29918, 14167, 1275, 525, 29888, 331, 744, 2396, 13, 4706, 282, 29918, 1228, 29918, 14167, 353, 10518, 29889, 949, 29918, 7638, 29898, 359, 29889, 2084, 29889, 7122, 29898, 2084, 29918, 1272, 29892, 29878, 29915, 29928, 7520, 29906, 29900, 29900, 29947, 29911, 29912, 1836, 7638, 4286, 4830, 877, 19202, 1495, 511, 29871, 28552, 353, 21921, 742, 4839, 29922, 8516, 13742, 2029, 7503, 29892, 29900, 1822, 5975, 29889, 690, 14443, 3552, 29899, 29896, 29892, 29896, 876, 13, 4706, 4055, 29918, 1228, 29918, 14167, 353, 525, 29928, 7520, 29911, 29906, 29900, 29900, 29947, 19202, 29915, 13, 1678, 25342, 2362, 5570, 29918, 14167, 1275, 525, 19202, 2396, 13, 4706, 282, 29918, 1228, 29918, 14167, 353, 10518, 29889, 949, 29918, 7638, 29898, 359, 29889, 2084, 29889, 7122, 29898, 2084, 29918, 1272, 29892, 29878, 29915, 29928, 7520, 29906, 29900, 29900, 29947, 29911, 29912, 1836, 7638, 4286, 4830, 877, 29888, 331, 744, 1495, 511, 29871, 28552, 353, 21921, 742, 4839, 29922, 8516, 13742, 2029, 7503, 29892, 29900, 1822, 5975, 29889, 690, 14443, 3552, 29899, 29896, 29892, 29896, 876, 13, 4706, 4055, 29918, 1228, 29918, 14167, 353, 525, 29928, 7520, 29911, 29906, 29900, 29900, 29947, 29888, 331, 744, 29915, 13, 1678, 1683, 29901, 13, 4706, 12020, 7865, 2392, 877, 14148, 2362, 5570, 29918, 14167, 1495, 13, 13, 1678, 4974, 29898, 29911, 29918, 12648, 1275, 7431, 29898, 29886, 29918, 7610, 29894, 573, 6817, 29896, 29897, 13, 13, 1678, 3005, 29939, 29879, 353, 518, 29896, 29892, 29896, 29914, 29906, 29892, 29871, 29896, 29914, 29941, 29892, 29871, 29896, 29914, 29953, 29892, 29871, 29896, 29914, 29896, 29906, 29962, 13, 1678, 921, 29892, 343, 353, 1653, 29918, 26495, 1272, 29918, 6500, 5570, 29898, 10745, 339, 15942, 353, 3005, 29939, 29879, 29892, 10503, 29918, 771, 5824, 29922, 29886, 29918, 7610, 29894, 573, 29892, 5046, 29918, 7052, 29922, 29911, 29918, 12648, 29897, 13, 1678, 921, 29892, 343, 353, 528, 21897, 29898, 29916, 29892, 343, 29897, 13, 13, 1678, 302, 29918, 262, 353, 921, 29889, 12181, 29961, 29896, 29962, 13, 1678, 302, 29918, 449, 353, 29871, 29906, 13, 13, 1678, 396, 390, 10262, 10970, 29901, 319, 29871, 29941, 29928, 12489, 29892, 411, 8267, 518, 16175, 29892, 5335, 4196, 567, 29892, 4682, 29962, 13, 1678, 1904, 29918, 29878, 15755, 353, 1653, 29918, 6500, 5570, 29918, 4299, 29918, 29878, 15755, 29898, 2080, 29918, 12181, 7607, 8516, 29892, 302, 29918, 262, 511, 302, 29918, 449, 29922, 302, 29918, 449, 29892, 7934, 29918, 29277, 11759, 29946, 29900, 29892, 29946, 29900, 29892, 29906, 29900, 2314, 13, 1678, 396, 4299, 29918, 29878, 15755, 29889, 7727, 580, 13, 13, 268, 13, 1678, 565, 2897, 29889, 2084, 29889, 9933, 29898, 359, 29889, 2084, 29889, 7122, 29898, 2084, 29918, 9794, 29918, 6500, 5570, 29918, 3286, 571, 29892, 29871, 364, 29915, 600, 29876, 29918, 29881, 485, 29911, 29912, 1836, 29882, 29945, 4286, 4830, 29898, 6500, 5570, 29918, 14167, 876, 1125, 13, 4706, 1904, 29918, 1457, 3018, 1312, 353, 2254, 29918, 4299, 29898, 359, 29889, 2084, 29889, 7122, 29898, 2084, 29918, 9794, 29918, 6500, 5570, 29918, 3286, 571, 29892, 29871, 364, 29915, 600, 29876, 29918, 29881, 485, 29911, 29912, 1836, 29882, 29945, 4286, 4830, 29898, 6500, 5570, 29918, 14167, 4961, 13, 4706, 1904, 29918, 1457, 3018, 1312, 29889, 24219, 403, 29898, 29916, 29892, 29891, 29892, 9853, 29918, 2311, 29922, 29953, 29946, 29897, 13, 4706, 1596, 877, 6758, 29899, 1853, 29901, 13420, 1904, 29918, 1457, 3018, 1312, 29889, 6758, 29897, 13, 13, 4706, 6782, 29918, 705, 5861, 29918, 1145, 344, 29906, 12857, 29934, 10262, 29898, 1145, 344, 29918, 4299, 29922, 1904, 29918, 1457, 3018, 1312, 29892, 364, 15755, 29918, 4299, 353, 1904, 29918, 29878, 15755, 29897, 13, 4706, 1904, 29918, 29878, 15755, 29889, 7620, 29898, 359, 29889, 2084, 29889, 7122, 29898, 2084, 29918, 9794, 29918, 6500, 5570, 29918, 3286, 571, 29892, 364, 29915, 29878, 15755, 29918, 29881, 485, 29911, 29912, 1836, 29882, 29945, 4286, 4830, 29898, 6500, 5570, 29918, 14167, 4961, 268, 13, 4706, 1596, 877, 4806, 5861, 18440, 515, 285, 9144, 304, 364, 15755, 29991, 1495, 13, 13, 4706, 4974, 313, 3198, 29918, 361, 29918, 29878, 15755, 29918, 3259, 29898, 4299, 29918, 600, 29876, 29922, 4299, 29918, 1457, 3018, 1312, 29892, 1904, 29918, 29878, 15755, 29922, 4299, 29918, 29878, 15755, 29897, 1360, 5574, 467, 497, 580, 13, 1678, 1683, 29901, 13, 4706, 1596, 877, 3195, 2609, 367, 7500, 470, 16370, 29991, 1495, 13, 4706, 6876, 580, 13, 13, 13, 13, 1678, 4450, 353, 1904, 29918, 29878, 15755, 29889, 27711, 29898, 29916, 29889, 690, 14443, 29898, 29896, 6653, 29896, 29892, 29876, 29918, 262, 876, 13, 1678, 1596, 877, 12181, 310, 27303, 29901, 13420, 4450, 29889, 12181, 29897, 13, 13, 1678, 14770, 29889, 5317, 29898, 29916, 7503, 29892, 29900, 14178, 29911, 29918, 12648, 29892, 1904, 29918, 1457, 3018, 1312, 29889, 27711, 29898, 29916, 29897, 7503, 29892, 29900, 1402, 525, 29916, 29887, 742, 15595, 353, 869, 29945, 29892, 3858, 2433, 600, 29876, 1495, 13, 1678, 14770, 29889, 5317, 29898, 29916, 7503, 29892, 29900, 14178, 29911, 29918, 12648, 29892, 1904, 29918, 29878, 15755, 29889, 27711, 29898, 29916, 29889, 690, 14443, 29898, 29896, 6653, 29896, 29892, 29876, 29918, 262, 876, 29961, 29900, 29892, 29901, 29892, 29900, 1822, 1579, 8606, 3285, 525, 711, 742, 15595, 353, 869, 29906, 29892, 3858, 2433, 29878, 15755, 1495, 13, 268, 13, 1678, 14770, 29889, 5317, 29898, 29916, 7503, 29892, 29900, 14178, 29911, 29918, 12648, 29892, 343, 7503, 29892, 29900, 1402, 6276, 342, 1508, 353, 525, 8516, 742, 17456, 353, 22868, 742, 2927, 353, 525, 1127, 742, 3858, 2433, 29928, 7520, 1495, 13, 1678, 14770, 29889, 5317, 29898, 29916, 7503, 29892, 29900, 14178, 29911, 29918, 12648, 29892, 1904, 29918, 1457, 3018, 1312, 29889, 27711, 29898, 29916, 29897, 7503, 29892, 29896, 1402, 525, 29916, 29887, 742, 15595, 353, 869, 29945, 29897, 13, 1678, 14770, 29889, 5317, 29898, 29916, 7503, 29892, 29900, 14178, 29911, 29918, 12648, 29892, 1904, 29918, 29878, 15755, 29889, 27711, 29898, 29916, 29889, 690, 14443, 29898, 29896, 6653, 29896, 29892, 29876, 29918, 262, 876, 29961, 29900, 29892, 29901, 29892, 29896, 1822, 1579, 8606, 3285, 525, 711, 742, 15595, 353, 869, 29906, 29897, 13, 268, 13, 1678, 14770, 29889, 5317, 29898, 29916, 7503, 29892, 29900, 14178, 29911, 29918, 12648, 29892, 343, 7503, 29892, 29896, 1402, 6276, 342, 1508, 353, 525, 8516, 742, 17456, 353, 22868, 742, 2927, 353, 525, 1127, 742, 29897, 13, 1678, 14770, 29889, 952, 29883, 744, 877, 1188, 1495, 13, 1678, 14770, 29889, 3257, 877, 29943, 277, 448, 21379, 29940, 7186, 29889, 390, 10262, 7186, 360, 7520, 29911, 29906, 29900, 29900, 29947, 8875, 4286, 4830, 29898, 6500, 5570, 29918, 14167, 876, 13, 1678, 14770, 29889, 26172, 580, 13, 1678, 396, 572, 29873, 29889, 26172, 29898, 29890, 1884, 29918, 517, 29918, 25367, 7607, 29896, 29889, 29900, 29945, 29892, 29871, 29896, 876, 13, 1678, 14770, 29889, 4294, 580, 2 ]
petisco/extra/rabbitmq/application/message/formatter/rabbitmq_message_queue_name_formatter.py
alice-biometrics/petisco
19
186219
from petisco.base.domain.message.message import Message class RabbitMqMessageQueueNameFormatter: @staticmethod def format(message: Message, exchange_name: str = None) -> str: message_name = message.name.replace(".", "_") message_type = message.type if message.type != "domain_event" else "event" message_format = f"{message.version}.{message_type}.{message_name}" return f"{exchange_name}.{message_format}" if exchange_name else message_name @staticmethod def format_retry(message: Message, exchange_name: str = None) -> str: queue_name = RabbitMqMessageQueueNameFormatter.format(message, exchange_name) return f"retry.{queue_name}" @staticmethod def format_dead_letter(message: Message, exchange_name: str = None) -> str: queue_name = RabbitMqMessageQueueNameFormatter.format(message, exchange_name) return f"dead_letter.{queue_name}"
[ 1, 515, 5697, 275, 1111, 29889, 3188, 29889, 7247, 29889, 4906, 29889, 4906, 1053, 7777, 13, 13, 13, 1990, 16155, 2966, 29924, 29939, 3728, 10620, 1170, 18522, 29901, 13, 1678, 732, 7959, 5696, 13, 1678, 822, 3402, 29898, 4906, 29901, 7777, 29892, 14523, 29918, 978, 29901, 851, 353, 6213, 29897, 1599, 851, 29901, 13, 4706, 2643, 29918, 978, 353, 2643, 29889, 978, 29889, 6506, 17350, 613, 11119, 1159, 13, 4706, 2643, 29918, 1853, 353, 2643, 29889, 1853, 565, 2643, 29889, 1853, 2804, 376, 7247, 29918, 3696, 29908, 1683, 376, 3696, 29908, 13, 4706, 2643, 29918, 4830, 353, 285, 29908, 29912, 4906, 29889, 3259, 1836, 29912, 4906, 29918, 1853, 1836, 29912, 4906, 29918, 978, 5038, 13, 4706, 736, 285, 29908, 29912, 6543, 29918, 978, 1836, 29912, 4906, 29918, 4830, 5038, 565, 14523, 29918, 978, 1683, 2643, 29918, 978, 13, 13, 1678, 732, 7959, 5696, 13, 1678, 822, 3402, 29918, 276, 2202, 29898, 4906, 29901, 7777, 29892, 14523, 29918, 978, 29901, 851, 353, 6213, 29897, 1599, 851, 29901, 13, 4706, 9521, 29918, 978, 353, 16155, 2966, 29924, 29939, 3728, 10620, 1170, 18522, 29889, 4830, 29898, 4906, 29892, 14523, 29918, 978, 29897, 13, 4706, 736, 285, 29908, 276, 2202, 29889, 29912, 9990, 29918, 978, 5038, 13, 13, 1678, 732, 7959, 5696, 13, 1678, 822, 3402, 29918, 311, 328, 29918, 15670, 29898, 4906, 29901, 7777, 29892, 14523, 29918, 978, 29901, 851, 353, 6213, 29897, 1599, 851, 29901, 13, 4706, 9521, 29918, 978, 353, 16155, 2966, 29924, 29939, 3728, 10620, 1170, 18522, 29889, 4830, 29898, 4906, 29892, 14523, 29918, 978, 29897, 13, 4706, 736, 285, 29908, 311, 328, 29918, 15670, 29889, 29912, 9990, 29918, 978, 5038, 13, 2 ]
dataset.py
IRMVLab/HALFlow
9
64241
''' Provider for dataset ''' import os import os.path import numpy as np import time class SceneflowDataset(): def __init__(self, root='/tmp/FlyingThings3D_subset_processed_35m', npoints=8192, mode = 'train_ft3d'): self.npoints = npoints self.mode = mode self.root = root if self.mode == 'eval_kitti': self.samples = self.make_dataset() self.datapath = root self.file_list = os.listdir(self.datapath) self.npoints = 16384 elif self.mode == 'train_ft3d': self.datapath = os.path.join(self.root, 'train') self.file_list = os.listdir(self.datapath) elif self.mode == 'eval_ft3d': self.datapath = os.path.join(self.root, 'val') self.file_list = os.listdir(self.datapath) def __getitem__(self, index): np.random.seed(0) if self.mode == 'eval_kitti': fn = self.samples[index] else: fn = self.file_list[index] fn = os.path.join(self.datapath, fn) pc1 = os.path.join(fn,'pc1.npy') pc2 = os.path.join(fn,'pc2.npy') with open(pc1, 'rb') as fp: pos1 = np.load(fp) with open(pc2, 'rb') as fp2: pos2 = np.load(fp2) flow = pos2[:, :3] - pos1[:, :3] if self.mode == 'eval_kitti': is_ground = np.logical_or(pos1[:,1] < -1.35, pos2[:,1] < -1.35) not_ground = np.logical_not(is_ground) near_mask = np.logical_and(pos1[:, 2] < 35, pos2[:, 2] < 35) near_mask = np.logical_and(not_ground, near_mask) indices = np.where(near_mask)[0] else: near_mask = np.logical_and(pos1[:, 2] < 35, pos2[:, 2] < 35) indices = np.where(near_mask)[0] if len(indices) >= self.npoints: sample_idx1 = np.random.choice(indices, self.npoints, replace=False) else: sample_idx1 = np.concatenate((indices, np.random.choice(indices, self.npoints - len(indices), replace=True)), axis=-1) if len(indices) >= self.npoints: sample_idx2 = np.random.choice(indices, self.npoints, replace=False) else: sample_idx2 = np.concatenate((indices, np.random.choice(indices, self.npoints - len(indices), replace=True)), axis=-1) pos1 = pos1[sample_idx1, :] pos2 = pos2[sample_idx2, :] flow = flow[sample_idx1, :] if self.mode == 'eval_kitti': return pos1, pos2, flow, fn else: return pos1, pos2, flow def __len__(self): return len(self.file_list) def make_dataset(self): do_mapping = True root = os.path.realpath(os.path.expanduser(self.root)) all_paths = sorted(os.walk(root)) useful_paths = [item[0] for item in all_paths if len(item[1]) == 0] try: assert (len(useful_paths) == 200) except AssertionError: print('assert (len(useful_paths) == 200) failed!', len(useful_paths)) if do_mapping: mapping_path = os.path.join(os.path.dirname(__file__), 'KITTI_mapping.txt') print('mapping_path', mapping_path) with open(mapping_path) as fd: lines = fd.readlines() lines = [line.strip() for line in lines] useful_paths = [path for path in useful_paths if lines[int(os.path.split(path)[-1])] != ''] res_paths = useful_paths return res_paths
[ 1, 14550, 13, 1678, 1019, 5489, 363, 8783, 29871, 13, 12008, 13, 5215, 2897, 13, 5215, 2897, 29889, 2084, 13, 5215, 12655, 408, 7442, 13, 5215, 931, 13, 13, 1990, 2522, 264, 1389, 677, 16390, 24541, 7295, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 3876, 2433, 29914, 7050, 29914, 29943, 5890, 1349, 886, 29941, 29928, 29918, 6484, 29918, 5014, 287, 29918, 29941, 29945, 29885, 742, 302, 9748, 29922, 29947, 29896, 29929, 29906, 29892, 4464, 353, 525, 14968, 29918, 615, 29941, 29881, 29374, 13, 4706, 1583, 29889, 29876, 9748, 353, 302, 9748, 13, 4706, 1583, 29889, 8513, 353, 4464, 13, 4706, 1583, 29889, 4632, 353, 3876, 13, 13, 4706, 565, 1583, 29889, 8513, 1275, 525, 14513, 29918, 29895, 986, 29875, 2396, 13, 13, 9651, 1583, 29889, 27736, 353, 1583, 29889, 5675, 29918, 24713, 580, 13, 9651, 1583, 29889, 4130, 481, 493, 353, 3876, 308, 13, 9651, 1583, 29889, 1445, 29918, 1761, 353, 2897, 29889, 1761, 3972, 29898, 1311, 29889, 4130, 481, 493, 29897, 13, 9651, 1583, 29889, 29876, 9748, 353, 29871, 29896, 29953, 29941, 29947, 29946, 13, 13, 4706, 25342, 1583, 29889, 8513, 1275, 525, 14968, 29918, 615, 29941, 29881, 2396, 13, 9651, 1583, 29889, 4130, 481, 493, 353, 2897, 29889, 2084, 29889, 7122, 29898, 1311, 29889, 4632, 29892, 525, 14968, 1495, 13, 9651, 1583, 29889, 1445, 29918, 1761, 353, 2897, 29889, 1761, 3972, 29898, 1311, 29889, 4130, 481, 493, 29897, 13, 308, 13, 4706, 25342, 1583, 29889, 8513, 1275, 525, 14513, 29918, 615, 29941, 29881, 2396, 13, 9651, 1583, 29889, 4130, 481, 493, 353, 2897, 29889, 2084, 29889, 7122, 29898, 1311, 29889, 4632, 29892, 525, 791, 1495, 13, 9651, 1583, 29889, 1445, 29918, 1761, 353, 2897, 29889, 1761, 3972, 29898, 1311, 29889, 4130, 481, 493, 29897, 13, 308, 13, 13, 13, 1678, 822, 4770, 657, 667, 12035, 1311, 29892, 2380, 1125, 13, 13, 4706, 7442, 29889, 8172, 29889, 26776, 29898, 29900, 29897, 13, 13, 4706, 565, 1583, 29889, 8513, 1275, 525, 14513, 29918, 29895, 986, 29875, 2396, 13, 9651, 7876, 353, 1583, 29889, 27736, 29961, 2248, 29962, 29871, 13, 13, 4706, 1683, 29901, 13, 9651, 7876, 353, 1583, 29889, 1445, 29918, 1761, 29961, 2248, 29962, 13, 9651, 7876, 353, 2897, 29889, 2084, 29889, 7122, 29898, 1311, 29889, 4130, 481, 493, 29892, 7876, 29897, 13, 632, 13, 4706, 22844, 29896, 353, 2897, 29889, 2084, 29889, 7122, 29898, 9144, 5501, 6739, 29896, 29889, 29876, 2272, 1495, 13, 4706, 22844, 29906, 353, 2897, 29889, 2084, 29889, 7122, 29898, 9144, 5501, 6739, 29906, 29889, 29876, 2272, 1495, 13, 13, 4706, 411, 1722, 29898, 6739, 29896, 29892, 525, 6050, 1495, 408, 285, 29886, 29901, 13, 9651, 926, 29896, 353, 7442, 29889, 1359, 29898, 18091, 29897, 13, 13, 4706, 411, 1722, 29898, 6739, 29906, 29892, 525, 6050, 1495, 408, 285, 29886, 29906, 29901, 13, 9651, 926, 29906, 353, 7442, 29889, 1359, 29898, 18091, 29906, 29897, 13, 308, 13, 4706, 4972, 353, 926, 29906, 7503, 29892, 584, 29941, 29962, 448, 926, 29896, 7503, 29892, 584, 29941, 29962, 13, 308, 13, 4706, 565, 1583, 29889, 8513, 1275, 525, 14513, 29918, 29895, 986, 29875, 2396, 13, 13, 9651, 338, 29918, 2057, 353, 7442, 29889, 1188, 936, 29918, 272, 29898, 1066, 29896, 7503, 29892, 29896, 29962, 529, 448, 29896, 29889, 29941, 29945, 29892, 926, 29906, 7503, 29892, 29896, 29962, 529, 448, 29896, 29889, 29941, 29945, 29897, 13, 13, 9651, 451, 29918, 2057, 353, 7442, 29889, 1188, 936, 29918, 1333, 29898, 275, 29918, 2057, 29897, 13, 13, 9651, 2978, 29918, 13168, 353, 7442, 29889, 1188, 936, 29918, 392, 29898, 1066, 29896, 7503, 29892, 29871, 29906, 29962, 529, 29871, 29941, 29945, 29892, 926, 29906, 7503, 29892, 29871, 29906, 29962, 529, 29871, 29941, 29945, 29897, 13, 9651, 2978, 29918, 13168, 353, 7442, 29889, 1188, 936, 29918, 392, 29898, 1333, 29918, 2057, 29892, 2978, 29918, 13168, 29897, 13, 13, 9651, 16285, 353, 7442, 29889, 3062, 29898, 28502, 29918, 13168, 9601, 29900, 29962, 13, 308, 13, 4706, 1683, 29901, 13, 9651, 2978, 29918, 13168, 353, 7442, 29889, 1188, 936, 29918, 392, 29898, 1066, 29896, 7503, 29892, 29871, 29906, 29962, 529, 29871, 29941, 29945, 29892, 926, 29906, 7503, 29892, 29871, 29906, 29962, 529, 29871, 29941, 29945, 29897, 13, 9651, 16285, 353, 7442, 29889, 3062, 29898, 28502, 29918, 13168, 9601, 29900, 29962, 13, 13, 632, 13, 4706, 565, 7431, 29898, 513, 1575, 29897, 6736, 1583, 29889, 29876, 9748, 29901, 13, 9651, 4559, 29918, 13140, 29896, 353, 7442, 29889, 8172, 29889, 16957, 29898, 513, 1575, 29892, 1583, 29889, 29876, 9748, 29892, 5191, 29922, 8824, 29897, 13, 4706, 1683, 29901, 13, 9651, 4559, 29918, 13140, 29896, 353, 7442, 29889, 535, 29883, 2579, 403, 3552, 513, 1575, 29892, 7442, 29889, 8172, 29889, 16957, 29898, 513, 1575, 29892, 1583, 29889, 29876, 9748, 448, 7431, 29898, 513, 1575, 511, 5191, 29922, 5574, 8243, 9685, 10457, 29896, 29897, 13, 308, 13, 4706, 565, 7431, 29898, 513, 1575, 29897, 6736, 1583, 29889, 29876, 9748, 29901, 13, 9651, 4559, 29918, 13140, 29906, 353, 7442, 29889, 8172, 29889, 16957, 29898, 513, 1575, 29892, 1583, 29889, 29876, 9748, 29892, 5191, 29922, 8824, 29897, 13, 4706, 1683, 29901, 13, 9651, 4559, 29918, 13140, 29906, 353, 7442, 29889, 535, 29883, 2579, 403, 3552, 513, 1575, 29892, 7442, 29889, 8172, 29889, 16957, 29898, 513, 1575, 29892, 1583, 29889, 29876, 9748, 448, 7431, 29898, 513, 1575, 511, 5191, 29922, 5574, 8243, 9685, 10457, 29896, 29897, 13, 13, 4706, 926, 29896, 353, 926, 29896, 29961, 11249, 29918, 13140, 29896, 29892, 584, 29962, 13, 4706, 926, 29906, 353, 926, 29906, 29961, 11249, 29918, 13140, 29906, 29892, 584, 29962, 13, 4706, 4972, 353, 4972, 29961, 11249, 29918, 13140, 29896, 29892, 584, 29962, 13, 13, 4706, 565, 1583, 29889, 8513, 1275, 525, 14513, 29918, 29895, 986, 29875, 2396, 13, 9651, 736, 926, 29896, 29892, 926, 29906, 29892, 4972, 29892, 7876, 13, 4706, 1683, 29901, 13, 9651, 736, 926, 29896, 29892, 926, 29906, 29892, 4972, 13, 13, 1678, 822, 4770, 2435, 12035, 1311, 1125, 13, 4706, 736, 7431, 29898, 1311, 29889, 1445, 29918, 1761, 29897, 13, 13, 268, 13, 1678, 822, 1207, 29918, 24713, 29898, 1311, 1125, 13, 308, 13, 4706, 437, 29918, 20698, 353, 5852, 13, 4706, 3876, 353, 2897, 29889, 2084, 29889, 6370, 2084, 29898, 359, 29889, 2084, 29889, 18837, 1792, 29898, 1311, 29889, 4632, 876, 13, 13, 4706, 599, 29918, 24772, 353, 12705, 29898, 359, 29889, 20919, 29898, 4632, 876, 13, 4706, 5407, 29918, 24772, 353, 518, 667, 29961, 29900, 29962, 363, 2944, 297, 599, 29918, 24772, 565, 7431, 29898, 667, 29961, 29896, 2314, 1275, 29871, 29900, 29962, 13, 4706, 1018, 29901, 13, 9651, 4974, 313, 2435, 29898, 1509, 1319, 29918, 24772, 29897, 1275, 29871, 29906, 29900, 29900, 29897, 13, 4706, 5174, 16499, 291, 2392, 29901, 13, 9651, 1596, 877, 9294, 313, 2435, 29898, 1509, 1319, 29918, 24772, 29897, 1275, 29871, 29906, 29900, 29900, 29897, 5229, 29991, 742, 7431, 29898, 1509, 1319, 29918, 24772, 876, 13, 13, 4706, 565, 437, 29918, 20698, 29901, 13, 9651, 10417, 29918, 2084, 353, 2897, 29889, 2084, 29889, 7122, 29898, 359, 29889, 2084, 29889, 25721, 22168, 1445, 1649, 511, 525, 29968, 1806, 24301, 29918, 20698, 29889, 3945, 1495, 13, 9651, 1596, 877, 20698, 29918, 2084, 742, 10417, 29918, 2084, 29897, 13, 13, 9651, 411, 1722, 29898, 20698, 29918, 2084, 29897, 408, 285, 29881, 29901, 13, 18884, 3454, 353, 285, 29881, 29889, 949, 9012, 580, 13, 18884, 3454, 353, 518, 1220, 29889, 17010, 580, 363, 1196, 297, 3454, 29962, 13, 9651, 5407, 29918, 24772, 353, 518, 2084, 363, 2224, 297, 5407, 29918, 24772, 565, 3454, 29961, 524, 29898, 359, 29889, 2084, 29889, 5451, 29898, 2084, 9601, 29899, 29896, 2314, 29962, 2804, 525, 2033, 13, 13, 4706, 620, 29918, 24772, 353, 5407, 29918, 24772, 13, 13, 4706, 736, 620, 29918, 24772, 13, 13, 13, 13, 13, 2 ]
lib_dsp/iir/iir/design/iir.py
PyGears/lib-dsp
3
23343
<gh_stars>1-10 from pygears import gear, Intf from pygears.lib import dreg, decouple, saturate, qround @gear def iir_1dsos(din, *, a, b, gain): # add input gain and init delayed inputs zu0 = din * gain zu1 = zu0 | dreg(init=0) zu2 = zu1 | dreg(init=0) # perform b coefficient sum a1 = (zu1 * b[1]) + (zu2 * b[2]) a2 = a1 + (zu0 * b[0]) # declare output interface and its type y = Intf(a2.dtype) # init delayed outputs zy1 = y | decouple(init=0) zy2 = zy1 | dreg(init=0) # perform a coefficient sum b1 = (zy2 * a[2]) + (zy1 * a[1]) # add both sums and set output y |= (a2 - b1) | qround(fract=a2.dtype.fract) | saturate(t=a2.dtype) return y @gear def iir_2tsos(din, *, a, b, gain): # add input gain x = din * gain # declare output interface and its type y = Intf(din.dtype) # perform first tap multiplication and sum z0 = ((x * b[2]) - (y * a[2])) # delay first sum output z0_delayed = z0 | dreg(init=0) # perform second tap multiplication and sum z1 = ((x * b[1]) + z0_delayed - (y * a[1])) # delay second sum output z1_delayed = z1 | decouple(init=0) # perform final sum and set output y |= ((x * b[0]) + z1_delayed) | qround(fract=din.dtype.fract) | saturate(t=din.dtype) return y @gear def iir_df1dsos(din, *, a, b, gain, ogain): # init temp temp = din # add cascades for all b coefficients for i in range(len(b)): # format every cascaded output as input temp = temp | iir_1dsos(a=a[i], b=b[i], gain=gain[i]) | qround(fract=din.dtype.fract) | saturate(t=din.dtype) # add output gain and format as input dout = (temp * ogain) | qround(fract=din.dtype.fract) | saturate(t=din.dtype) return dout @gear def iir_df2tsos(din, *, a, b, gain, ogain): # init temp temp = din # add cascades for all b coefficients for i in range(len(b)): # format every cascaded output as input temp = temp | iir_2tsos(a=a[i], b=b[i], gain=gain[i]) # add output gain and format as input dout = (temp * ogain) | qround(fract=din.dtype.fract) | saturate(t=din.dtype) return dout
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 3166, 11451, 479, 1503, 1053, 330, 799, 29892, 3159, 29888, 13, 3166, 11451, 479, 1503, 29889, 1982, 1053, 270, 1727, 29892, 1602, 283, 552, 29892, 269, 1337, 403, 29892, 3855, 14486, 13, 13, 13, 29992, 479, 279, 13, 1753, 474, 381, 29918, 29896, 6289, 359, 29898, 24581, 29892, 334, 29892, 263, 29892, 289, 29892, 11581, 1125, 13, 13, 1678, 396, 788, 1881, 11581, 322, 2069, 29801, 10970, 13, 1678, 1729, 29900, 353, 4538, 334, 11581, 13, 1678, 1729, 29896, 353, 1729, 29900, 891, 270, 1727, 29898, 2344, 29922, 29900, 29897, 13, 1678, 1729, 29906, 353, 1729, 29896, 891, 270, 1727, 29898, 2344, 29922, 29900, 29897, 13, 13, 1678, 396, 2189, 289, 10825, 2533, 13, 1678, 263, 29896, 353, 313, 6951, 29896, 334, 289, 29961, 29896, 2314, 718, 313, 6951, 29906, 334, 289, 29961, 29906, 2314, 13, 1678, 263, 29906, 353, 263, 29896, 718, 313, 6951, 29900, 334, 289, 29961, 29900, 2314, 13, 13, 1678, 396, 9607, 1962, 5067, 322, 967, 1134, 13, 1678, 343, 353, 3159, 29888, 29898, 29874, 29906, 29889, 29881, 1853, 29897, 13, 13, 1678, 396, 2069, 29801, 14391, 13, 1678, 503, 29891, 29896, 353, 343, 891, 1602, 283, 552, 29898, 2344, 29922, 29900, 29897, 13, 1678, 503, 29891, 29906, 353, 503, 29891, 29896, 891, 270, 1727, 29898, 2344, 29922, 29900, 29897, 13, 13, 1678, 396, 2189, 263, 10825, 2533, 13, 1678, 289, 29896, 353, 313, 1537, 29906, 334, 263, 29961, 29906, 2314, 718, 313, 1537, 29896, 334, 263, 29961, 29896, 2314, 13, 13, 1678, 396, 788, 1716, 25470, 322, 731, 1962, 13, 1678, 343, 891, 29922, 313, 29874, 29906, 448, 289, 29896, 29897, 891, 3855, 14486, 29898, 29888, 1461, 29922, 29874, 29906, 29889, 29881, 1853, 29889, 29888, 1461, 29897, 891, 269, 1337, 403, 29898, 29873, 29922, 29874, 29906, 29889, 29881, 1853, 29897, 13, 1678, 736, 343, 13, 13, 13, 29992, 479, 279, 13, 1753, 474, 381, 29918, 29906, 1372, 359, 29898, 24581, 29892, 334, 29892, 263, 29892, 289, 29892, 11581, 1125, 13, 13, 1678, 396, 788, 1881, 11581, 13, 1678, 921, 353, 4538, 334, 11581, 13, 13, 1678, 396, 9607, 1962, 5067, 322, 967, 1134, 13, 1678, 343, 353, 3159, 29888, 29898, 24581, 29889, 29881, 1853, 29897, 13, 13, 1678, 396, 2189, 937, 18751, 21666, 322, 2533, 13, 1678, 503, 29900, 353, 5135, 29916, 334, 289, 29961, 29906, 2314, 448, 313, 29891, 334, 263, 29961, 29906, 12622, 13, 13, 1678, 396, 9055, 937, 2533, 1962, 13, 1678, 503, 29900, 29918, 18829, 287, 353, 503, 29900, 891, 270, 1727, 29898, 2344, 29922, 29900, 29897, 13, 13, 1678, 396, 2189, 1473, 18751, 21666, 322, 2533, 13, 1678, 503, 29896, 353, 5135, 29916, 334, 289, 29961, 29896, 2314, 718, 503, 29900, 29918, 18829, 287, 448, 313, 29891, 334, 263, 29961, 29896, 12622, 13, 13, 1678, 396, 9055, 1473, 2533, 1962, 13, 1678, 503, 29896, 29918, 18829, 287, 353, 503, 29896, 891, 1602, 283, 552, 29898, 2344, 29922, 29900, 29897, 13, 13, 1678, 396, 2189, 2186, 2533, 322, 731, 1962, 13, 1678, 343, 891, 29922, 5135, 29916, 334, 289, 29961, 29900, 2314, 718, 503, 29896, 29918, 18829, 287, 29897, 891, 3855, 14486, 29898, 29888, 1461, 29922, 24581, 29889, 29881, 1853, 29889, 29888, 1461, 29897, 891, 269, 1337, 403, 29898, 29873, 29922, 24581, 29889, 29881, 1853, 29897, 13, 1678, 736, 343, 13, 13, 13, 29992, 479, 279, 13, 1753, 474, 381, 29918, 2176, 29896, 6289, 359, 29898, 24581, 29892, 334, 29892, 263, 29892, 289, 29892, 11581, 29892, 3671, 475, 1125, 13, 13, 1678, 396, 2069, 5694, 13, 1678, 5694, 353, 4538, 13, 13, 1678, 396, 788, 3209, 29883, 3076, 363, 599, 289, 16127, 13, 1678, 363, 474, 297, 3464, 29898, 2435, 29898, 29890, 22164, 13, 13, 4706, 396, 3402, 1432, 3209, 29883, 11932, 1962, 408, 1881, 13, 4706, 5694, 353, 5694, 891, 474, 381, 29918, 29896, 6289, 359, 29898, 29874, 29922, 29874, 29961, 29875, 1402, 289, 29922, 29890, 29961, 29875, 1402, 11581, 29922, 29887, 475, 29961, 29875, 2314, 891, 3855, 14486, 29898, 29888, 1461, 29922, 24581, 29889, 29881, 1853, 29889, 29888, 1461, 29897, 891, 269, 1337, 403, 29898, 29873, 29922, 24581, 29889, 29881, 1853, 29897, 13, 13, 1678, 396, 788, 1962, 11581, 322, 3402, 408, 1881, 13, 1678, 270, 449, 353, 313, 7382, 334, 3671, 475, 29897, 891, 3855, 14486, 29898, 29888, 1461, 29922, 24581, 29889, 29881, 1853, 29889, 29888, 1461, 29897, 891, 269, 1337, 403, 29898, 29873, 29922, 24581, 29889, 29881, 1853, 29897, 13, 1678, 736, 270, 449, 13, 13, 13, 29992, 479, 279, 13, 1753, 474, 381, 29918, 2176, 29906, 1372, 359, 29898, 24581, 29892, 334, 29892, 263, 29892, 289, 29892, 11581, 29892, 3671, 475, 1125, 13, 13, 1678, 396, 2069, 5694, 13, 1678, 5694, 353, 4538, 13, 13, 1678, 396, 788, 3209, 29883, 3076, 363, 599, 289, 16127, 13, 1678, 363, 474, 297, 3464, 29898, 2435, 29898, 29890, 22164, 13, 13, 4706, 396, 3402, 1432, 3209, 29883, 11932, 1962, 408, 1881, 13, 4706, 5694, 353, 5694, 891, 474, 381, 29918, 29906, 1372, 359, 29898, 29874, 29922, 29874, 29961, 29875, 1402, 289, 29922, 29890, 29961, 29875, 1402, 11581, 29922, 29887, 475, 29961, 29875, 2314, 13, 13, 1678, 396, 788, 1962, 11581, 322, 3402, 408, 1881, 13, 1678, 270, 449, 353, 313, 7382, 334, 3671, 475, 29897, 891, 3855, 14486, 29898, 29888, 1461, 29922, 24581, 29889, 29881, 1853, 29889, 29888, 1461, 29897, 891, 269, 1337, 403, 29898, 29873, 29922, 24581, 29889, 29881, 1853, 29897, 13, 1678, 736, 270, 449, 13, 2 ]
extract_results.py
goodman1204/birank
0
112614
<gh_stars>0 dataset=["gossipcop_fake" "gossipcop_real" "politifact_fake" "politifact_real" "Aminer"] methods=["proposed" "HITS" "CoHITS" "BGRM" "BiRank"]
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 24713, 29922, 3366, 29887, 2209, 666, 9708, 29918, 29888, 1296, 29908, 376, 29887, 2209, 666, 9708, 29918, 6370, 29908, 376, 20087, 7060, 29918, 29888, 1296, 29908, 376, 20087, 7060, 29918, 6370, 29908, 376, 29909, 1195, 261, 3108, 13, 23515, 29922, 3366, 771, 4752, 29908, 376, 29950, 1806, 29903, 29908, 376, 7967, 29950, 1806, 29903, 29908, 376, 29933, 14345, 29924, 29908, 376, 20517, 29934, 804, 3108, 13, 13, 13, 13, 2 ]
mkvendor.py
AnClark/makevendor.py
0
166017
#!/usr/bin/env python3 import sys, os import re, struct from argparse import ArgumentParser, FileType, Namespace """ ======================== CONSTANTS ======================== """ SUPPORTED_ROM = { "cm": "cm.mk", "lineageos": "lineage.mk", "mokee": "mk___DEVICE__.mk", "omnirom": "omni___DEVICE__.mk" } """ ======================== GLOBAL PARAMETERS ======================== """ ARGS = "" # Parsed argument namespace """ ======================== UTILITIES ======================== """ def LOG(msg): ''' Print debug messages when --verbose is assigned. ''' if ARGS.verbose: sys.stderr.write(msg) def parse_bootimg_for_mkvendor(bootimg): ''' parse C8600-compatible bootimg for mkvendor. Comparing with its original version, this one kept all bootimg data in objects. Modified from bootimg.py written by <NAME> <<EMAIL>>. write kernel to kernel[.gz] write ramdisk to ramdisk[.gz] write second to second[.gz] write dtimg to dt.img write extra to unknown Argument: bootimg: File object of opened bootimg ''' latin = lambda x: x.encode('latin') # Use Namespace to store parsed data result = Namespace ( metadata = "", kernel = b"", ramdisk = b"", second = b"", dtimg = b"", kerneldt = b"", unknown = b"", image_format = {} ) bootimg.seek(0) ( magic, kernel_size, kernel_addr, ramdisk_size, ramdisk_addr, second_size, second_addr, tags_addr, page_size, dt_size, os_version, name, cmdline, id4x8 ) = struct.unpack('<8s10I16s512s32s', bootimg.read(608)) bootimg.seek(page_size - 608, 1) base = kernel_addr - 0x00008000 assert magic.decode('latin') == 'ANDROID!', 'Invalid bootimg' # assert base == ramdisk_addr - 0x01000000, 'invalid bootimg' # assert base == second_addr - 0x00f00000, 'invalid bootimg' # assert base == tags_addr - 0x00000100, 'invalid bootimg' def say(v): b7 = 127 b4 = 15 a = (v >> 25) & b7 b = (v >> 18) & b7 c = (v >> 11) & b7 y = ((v >> 4) & b7) + 2000 m = v & b4 return '%d.%d.%d %s-%s' % (a, b, c, y, m) LOG("================= Bootimg Information =================\n") LOG('* kernel_addr=0x%x\n' % kernel_addr) LOG('* ramdisk_addr=0x%x\n' % ramdisk_addr) LOG('* second_addr=0x%x\n' % second_addr) LOG('* tags_addr=0x%x\n' % tags_addr) # LOG('base=0x%x\n' % base) LOG('* page_size=%d\n' % page_size) LOG('* os_version=0x%08x(%s)\n' % (os_version, say(os_version))) LOG('* name="%s"\n' % name.decode('latin').strip('\x00')) LOG('* cmdline="%s"\n' % cmdline.decode('latin').strip('\x00')) while True: if bootimg.read(page_size) == struct.pack('%ds' % page_size, latin('')): continue bootimg.seek(-page_size, 1) size = bootimg.tell() break padding = lambda x: (~x + 1) & (size - 1) LOG('* padding_size=%d\n' % size) LOG("======================================================\n") # OUT1: Write metadata metadata = { 'kernel_addr': kernel_addr, 'ramdisk_addr': ramdisk_addr, 'second_addr': second_addr, 'tags_addr': tags_addr, 'page_size': page_size, 'name': name.decode('latin').strip('\x00'), 'cmdline': cmdline.decode('latin').strip('\x00'), 'padding_size': size, 'os_version': os_version, } result.metadata = metadata gzname = lambda x: x == struct.pack('3B', 0x1f, 0x8b, 0x08) and '.gz' or '' # OUT2: Kernel image & DT image kernel = bootimg.read(kernel_size) magic = struct.pack('>I', 0xd00dfeed) pos = kernel.find(magic) if pos > 0: result.kernel = kernel[:pos] result.kerneldt = kernel[pos:] else: result.kernel = kernel result.image_format["kernel"] = gzname(kernel[:3]) bootimg.seek(padding(kernel_size), 1) # OUT3: Ramdisk ramdisk = bootimg.read(ramdisk_size) result.ramdisk = ramdisk result.image_format["ramdisk"] = gzname(ramdisk[:3]) bootimg.seek(padding(ramdisk_size), 1) # OUT4: Second image if second_size: second = bootimg.read(second_size) result.second = second result.image_format["second"] = gzname(second[:3]) bootimg.seek(padding(second_size), 1) # OUT5: DTB if dt_size: dtimg = bootimg.read(dt_size) result.dtimg = dtimg bootimg.seek(padding(dt_size), 1) # OUT6: Unknown unknown = bootimg.read() if unknown: result.unknown = unknown bootimg.close() return result def parse_bootimg(): return parse_bootimg_for_mkvendor(ARGS.boot_img) def parse_cmdline(): parser = ArgumentParser( description="Generate device configurations from prebuilt boot/recovery image.", epilog=""" The boot.img argument is the extracted recovery or boot image. It should not be provided for devices that have non standard boot images (ie, Samsung). """ ) parser.add_argument( "--boot-img", "-b", help="Path to boot image", type=FileType("rb"), required=True ) parser.add_argument( "--manufacturer", "-m", help="Device manufacturer name", type=str, required=True ) parser.add_argument( "--device", "-d", help="Device name", type=str, required=True ) parser.add_argument( "--rom", "-r", help="Your Android ROM type. Currently supports: %s" % SUPPORTED_ROM.keys(), choices=SUPPORTED_ROM.keys(), required=True ) parser.add_argument( "--output", "-o", type=str, help="Target directory to put generated device configuration. Default is ./out", default="./out" ) parser.add_argument( "--verbose", "-v", help="Print debug messages", action='count' # Treat as a switch ) return parser.parse_args() """ ======================== WORKFLOWS ======================== """ def analyze_kernel_image(): # TODO: 分析内核映像的处理器类型,来决定BoardConfig.mk中的架构部分该填啥。 pass def make_use_of_ramdisk(): # TODO: 解包Ramdisk,并从中提取有用的文件。 # 包括:init.{ro.hardware}.rc、ueventd.{ro.hardware}.rc、fstab.{ro.hardware}、recovery.fstab。 pass def render_templates(): # TODO: 创建若干个闭包函数,处理具体的模板文件 # TODO: 用assert,在文件不存在时退出 pass def generate_vendorsetup_sh(): pass """ ======================== MAIN ENTRANCE ======================== """ def main(): # Parse command line. # This process can block some illegal inputs. global ARGS ARGS = parse_cmdline() # Parse boot image. LOG("Parsing boot image...\n") BOOTIMG_DATA = parse_bootimg_for_mkvendor(ARGS.boot_img) if __name__ == "__main__": main()
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 13, 5215, 10876, 29892, 2897, 13, 5215, 337, 29892, 2281, 13, 3166, 1852, 5510, 1053, 23125, 11726, 29892, 3497, 1542, 29892, 14706, 3535, 13, 13, 15945, 29908, 13, 9166, 4936, 8707, 1254, 2190, 9375, 1275, 9166, 2751, 1360, 13, 15945, 29908, 13, 13, 29903, 4897, 15082, 3352, 29918, 3491, 353, 426, 13, 1678, 376, 4912, 1115, 376, 4912, 29889, 11256, 613, 13, 1678, 376, 1220, 482, 359, 1115, 376, 1220, 482, 29889, 11256, 613, 13, 1678, 376, 4346, 23137, 1115, 376, 11256, 22359, 2287, 19059, 26914, 11256, 613, 13, 1678, 376, 290, 29876, 381, 290, 1115, 376, 290, 1240, 22359, 2287, 19059, 26914, 11256, 29908, 13, 29913, 13, 13, 15945, 29908, 13, 9166, 4936, 402, 28902, 1964, 349, 1718, 25797, 4945, 29903, 1275, 9166, 2751, 1360, 13, 15945, 29908, 13, 1718, 10749, 353, 5124, 1669, 396, 1459, 8485, 2980, 7397, 13, 13, 13, 15945, 29908, 13, 9166, 4936, 501, 29911, 6227, 1806, 29059, 1275, 9166, 2751, 1360, 13, 15945, 29908, 13, 1753, 25401, 29898, 7645, 1125, 13, 1678, 14550, 29871, 13, 4706, 13905, 4744, 7191, 746, 1192, 369, 15828, 338, 9859, 29889, 13, 1678, 14550, 13, 1678, 565, 9033, 10749, 29889, 369, 15828, 29901, 13, 4706, 10876, 29889, 303, 20405, 29889, 3539, 29898, 7645, 29897, 13, 13, 13, 1753, 6088, 29918, 4777, 2492, 29918, 1454, 29918, 11256, 19167, 29898, 4777, 2492, 1125, 13, 1678, 14550, 29871, 13, 4706, 6088, 315, 29947, 29953, 29900, 29900, 29899, 23712, 6579, 2492, 363, 14690, 19167, 29889, 13, 4706, 28663, 292, 411, 967, 2441, 1873, 29892, 445, 697, 8126, 599, 6579, 2492, 848, 13, 4706, 297, 3618, 29889, 13, 13, 4706, 3382, 2164, 515, 6579, 2492, 29889, 2272, 3971, 491, 529, 5813, 29958, 3532, 26862, 6227, 6778, 29889, 13, 13, 4706, 2436, 8466, 304, 8466, 29961, 29889, 18828, 29962, 13, 4706, 2436, 13472, 20960, 304, 13472, 20960, 29961, 29889, 18828, 29962, 13, 4706, 2436, 1473, 304, 1473, 29961, 29889, 18828, 29962, 13, 4706, 2436, 11636, 2492, 304, 11636, 29889, 2492, 13, 4706, 2436, 4805, 304, 9815, 13, 13, 4706, 23125, 29901, 13, 9651, 6579, 2492, 29901, 3497, 1203, 310, 6496, 6579, 2492, 13, 1678, 14550, 13, 1678, 25677, 353, 14013, 921, 29901, 921, 29889, 12508, 877, 5066, 262, 1495, 13, 13, 1678, 396, 4803, 14706, 3535, 304, 3787, 21213, 848, 13, 1678, 1121, 353, 14706, 3535, 313, 13, 4706, 15562, 353, 12633, 13, 4706, 8466, 353, 289, 29908, 613, 13, 4706, 13472, 20960, 353, 289, 29908, 613, 13, 4706, 1473, 353, 289, 29908, 613, 13, 4706, 11636, 2492, 353, 289, 29908, 613, 13, 4706, 413, 824, 2495, 29873, 353, 289, 29908, 613, 13, 4706, 9815, 353, 289, 29908, 613, 13, 4706, 1967, 29918, 4830, 353, 6571, 13, 1678, 1723, 13, 13, 1678, 6579, 2492, 29889, 344, 1416, 29898, 29900, 29897, 13, 13, 1678, 313, 259, 15709, 29892, 13, 4706, 8466, 29918, 2311, 29892, 8466, 29918, 10030, 29892, 13, 4706, 13472, 20960, 29918, 2311, 29892, 13472, 20960, 29918, 10030, 29892, 13, 4706, 1473, 29918, 2311, 29892, 1473, 29918, 10030, 29892, 13, 4706, 8282, 29918, 10030, 29892, 1813, 29918, 2311, 29892, 11636, 29918, 2311, 29892, 2897, 29918, 3259, 29892, 13, 4706, 1024, 29892, 9920, 1220, 29892, 1178, 29946, 29916, 29947, 13, 1678, 1723, 353, 2281, 29889, 348, 4058, 877, 29966, 29947, 29879, 29896, 29900, 29902, 29896, 29953, 29879, 29945, 29896, 29906, 29879, 29941, 29906, 29879, 742, 6579, 2492, 29889, 949, 29898, 29953, 29900, 29947, 876, 13, 1678, 6579, 2492, 29889, 344, 1416, 29898, 3488, 29918, 2311, 448, 29871, 29953, 29900, 29947, 29892, 29871, 29896, 29897, 13, 13, 1678, 2967, 353, 8466, 29918, 10030, 448, 29871, 29900, 29916, 29900, 29900, 29900, 29900, 29947, 29900, 29900, 29900, 13, 1678, 4974, 15709, 29889, 13808, 877, 5066, 262, 1495, 1275, 525, 9468, 1672, 1367, 29991, 742, 525, 13919, 6579, 2492, 29915, 13, 1678, 396, 4974, 2967, 1275, 13472, 20960, 29918, 10030, 448, 29871, 29900, 29916, 29900, 29896, 29900, 29900, 29900, 29900, 29900, 29900, 29892, 525, 20965, 6579, 2492, 29915, 13, 1678, 396, 4974, 2967, 1275, 1473, 29918, 10030, 448, 29871, 29900, 29916, 29900, 29900, 29888, 29900, 29900, 29900, 29900, 29900, 29892, 525, 20965, 6579, 2492, 29915, 13, 1678, 396, 4974, 2967, 1275, 8282, 29918, 10030, 448, 29871, 29900, 29916, 29900, 29900, 29900, 29900, 29900, 29896, 29900, 29900, 29892, 525, 20965, 6579, 2492, 29915, 13, 13, 1678, 822, 1827, 29898, 29894, 1125, 13, 4706, 289, 29955, 353, 29871, 29896, 29906, 29955, 13, 4706, 289, 29946, 353, 29871, 29896, 29945, 13, 4706, 263, 353, 313, 29894, 5099, 29871, 29906, 29945, 29897, 669, 289, 29955, 13, 4706, 289, 353, 313, 29894, 5099, 29871, 29896, 29947, 29897, 669, 289, 29955, 13, 4706, 274, 353, 313, 29894, 5099, 29871, 29896, 29896, 29897, 669, 289, 29955, 13, 4706, 343, 353, 5135, 29894, 5099, 259, 29946, 29897, 669, 289, 29955, 29897, 718, 29871, 29906, 29900, 29900, 29900, 13, 4706, 286, 353, 325, 669, 289, 29946, 13, 4706, 736, 14210, 29881, 29889, 29995, 29881, 29889, 29995, 29881, 1273, 29879, 19222, 29879, 29915, 1273, 313, 29874, 29892, 289, 29892, 274, 29892, 343, 29892, 286, 29897, 13, 13, 1678, 25401, 703, 9166, 29922, 13760, 2492, 10343, 1275, 4936, 2751, 1360, 2013, 29876, 1159, 13, 1678, 25401, 877, 29930, 8466, 29918, 10030, 29922, 29900, 29916, 29995, 29916, 29905, 29876, 29915, 1273, 8466, 29918, 10030, 29897, 13, 1678, 25401, 877, 29930, 13472, 20960, 29918, 10030, 29922, 29900, 29916, 29995, 29916, 29905, 29876, 29915, 1273, 13472, 20960, 29918, 10030, 29897, 13, 1678, 25401, 877, 29930, 1473, 29918, 10030, 29922, 29900, 29916, 29995, 29916, 29905, 29876, 29915, 1273, 1473, 29918, 10030, 29897, 13, 1678, 25401, 877, 29930, 8282, 29918, 10030, 29922, 29900, 29916, 29995, 29916, 29905, 29876, 29915, 1273, 8282, 29918, 10030, 29897, 13, 1678, 396, 25401, 877, 3188, 29922, 29900, 29916, 29995, 29916, 29905, 29876, 29915, 1273, 2967, 29897, 13, 1678, 25401, 877, 29930, 1813, 29918, 2311, 16328, 29881, 29905, 29876, 29915, 1273, 1813, 29918, 2311, 29897, 13, 1678, 25401, 877, 29930, 2897, 29918, 3259, 29922, 29900, 29916, 29995, 29900, 29947, 29916, 29414, 29879, 2144, 29876, 29915, 1273, 313, 359, 29918, 3259, 29892, 1827, 29898, 359, 29918, 3259, 4961, 13, 1678, 25401, 877, 29930, 1024, 543, 29995, 29879, 26732, 29876, 29915, 1273, 1024, 29889, 13808, 877, 5066, 262, 2824, 17010, 28909, 29916, 29900, 29900, 8785, 13, 1678, 25401, 877, 29930, 9920, 1220, 543, 29995, 29879, 26732, 29876, 29915, 1273, 9920, 1220, 29889, 13808, 877, 5066, 262, 2824, 17010, 28909, 29916, 29900, 29900, 8785, 13, 13, 1678, 1550, 5852, 29901, 13, 4706, 565, 6579, 2492, 29889, 949, 29898, 3488, 29918, 2311, 29897, 1275, 2281, 29889, 4058, 877, 29995, 6289, 29915, 1273, 1813, 29918, 2311, 29892, 25677, 877, 8785, 29901, 13, 9651, 6773, 13, 4706, 6579, 2492, 29889, 344, 1416, 6278, 3488, 29918, 2311, 29892, 29871, 29896, 29897, 13, 4706, 2159, 353, 6579, 2492, 29889, 29873, 514, 580, 13, 4706, 2867, 13, 13, 1678, 7164, 353, 14013, 921, 29901, 313, 30022, 29916, 718, 29871, 29896, 29897, 669, 313, 2311, 448, 29871, 29896, 29897, 13, 1678, 25401, 877, 29930, 7164, 29918, 2311, 16328, 29881, 29905, 29876, 29915, 1273, 2159, 29897, 13, 1678, 25401, 703, 9166, 9166, 9166, 2751, 1360, 29905, 29876, 1159, 13, 13, 1678, 396, 19474, 29896, 29901, 14350, 15562, 13, 1678, 15562, 353, 426, 13, 4706, 525, 17460, 29918, 10030, 2396, 8466, 29918, 10030, 29892, 13, 4706, 525, 2572, 20960, 29918, 10030, 2396, 13472, 20960, 29918, 10030, 29892, 13, 4706, 525, 7496, 29918, 10030, 2396, 1473, 29918, 10030, 29892, 13, 4706, 525, 11338, 29918, 10030, 2396, 8282, 29918, 10030, 29892, 13, 4706, 525, 3488, 29918, 2311, 2396, 1813, 29918, 2311, 29892, 13, 4706, 525, 978, 2396, 1024, 29889, 13808, 877, 5066, 262, 2824, 17010, 28909, 29916, 29900, 29900, 5477, 13, 4706, 525, 9006, 1220, 2396, 9920, 1220, 29889, 13808, 877, 5066, 262, 2824, 17010, 28909, 29916, 29900, 29900, 5477, 13, 4706, 525, 12791, 29918, 2311, 2396, 2159, 29892, 13, 4706, 525, 359, 29918, 3259, 2396, 2897, 29918, 3259, 29892, 13, 1678, 500, 13, 1678, 1121, 29889, 19635, 353, 15562, 13, 268, 13, 1678, 330, 29920, 978, 353, 14013, 921, 29901, 921, 1275, 2281, 29889, 4058, 877, 29941, 29933, 742, 29871, 29900, 29916, 29896, 29888, 29892, 29871, 29900, 29916, 29947, 29890, 29892, 29871, 29900, 29916, 29900, 29947, 29897, 322, 15300, 18828, 29915, 470, 6629, 13, 13, 1678, 396, 19474, 29906, 29901, 476, 5851, 1967, 669, 360, 29911, 1967, 13, 1678, 8466, 353, 6579, 2492, 29889, 949, 29898, 17460, 29918, 2311, 29897, 13, 1678, 15709, 353, 2281, 29889, 4058, 877, 29958, 29902, 742, 29871, 29900, 29916, 29881, 29900, 29900, 29881, 18798, 29897, 13, 1678, 926, 353, 8466, 29889, 2886, 29898, 11082, 293, 29897, 13, 1678, 565, 926, 1405, 29871, 29900, 29901, 13, 4706, 1121, 29889, 17460, 353, 8466, 7503, 1066, 29962, 13, 4706, 1121, 29889, 22178, 2495, 29873, 353, 8466, 29961, 1066, 17531, 13, 1678, 1683, 29901, 13, 4706, 1121, 29889, 17460, 353, 8466, 13, 1678, 1121, 29889, 3027, 29918, 4830, 3366, 17460, 3108, 353, 330, 29920, 978, 29898, 17460, 7503, 29941, 2314, 13, 1678, 6579, 2492, 29889, 344, 1416, 29898, 12791, 29898, 17460, 29918, 2311, 511, 29871, 29896, 29897, 13, 13, 1678, 396, 19474, 29941, 29901, 8292, 20960, 13, 1678, 13472, 20960, 353, 6579, 2492, 29889, 949, 29898, 2572, 20960, 29918, 2311, 29897, 13, 1678, 1121, 29889, 2572, 20960, 353, 13472, 20960, 13, 1678, 1121, 29889, 3027, 29918, 4830, 3366, 2572, 20960, 3108, 353, 330, 29920, 978, 29898, 2572, 20960, 7503, 29941, 2314, 13, 1678, 6579, 2492, 29889, 344, 1416, 29898, 12791, 29898, 2572, 20960, 29918, 2311, 511, 29871, 29896, 29897, 13, 13, 1678, 396, 19474, 29946, 29901, 6440, 1967, 13, 1678, 565, 1473, 29918, 2311, 29901, 13, 4706, 1473, 353, 6579, 2492, 29889, 949, 29898, 7496, 29918, 2311, 29897, 13, 4706, 1121, 29889, 7496, 353, 1473, 13, 4706, 1121, 29889, 3027, 29918, 4830, 3366, 7496, 3108, 353, 330, 29920, 978, 29898, 7496, 7503, 29941, 2314, 13, 4706, 6579, 2492, 29889, 344, 1416, 29898, 12791, 29898, 7496, 29918, 2311, 511, 29871, 29896, 29897, 13, 13, 1678, 396, 19474, 29945, 29901, 360, 24895, 13, 1678, 565, 11636, 29918, 2311, 29901, 13, 4706, 11636, 2492, 353, 6579, 2492, 29889, 949, 29898, 6008, 29918, 2311, 29897, 13, 4706, 1121, 29889, 6008, 2492, 353, 11636, 2492, 13, 4706, 6579, 2492, 29889, 344, 1416, 29898, 12791, 29898, 6008, 29918, 2311, 511, 29871, 29896, 29897, 13, 13, 1678, 396, 19474, 29953, 29901, 853, 5203, 13, 1678, 9815, 353, 6579, 2492, 29889, 949, 580, 13, 1678, 565, 9815, 29901, 13, 4706, 1121, 29889, 26690, 353, 9815, 13, 13, 1678, 6579, 2492, 29889, 5358, 580, 13, 13, 1678, 736, 1121, 13, 13, 13, 1753, 6088, 29918, 4777, 2492, 7295, 13, 1678, 736, 6088, 29918, 4777, 2492, 29918, 1454, 29918, 11256, 19167, 29898, 1718, 10749, 29889, 4777, 29918, 2492, 29897, 13, 13, 13, 1753, 6088, 29918, 9006, 1220, 7295, 13, 1678, 13812, 353, 23125, 11726, 29898, 13, 4706, 6139, 543, 5631, 403, 4742, 22920, 515, 758, 16145, 6579, 29914, 3757, 22205, 1967, 19602, 13, 4706, 9358, 26140, 13776, 29908, 13, 4706, 450, 6579, 29889, 2492, 2980, 338, 278, 23892, 24205, 470, 6579, 1967, 29889, 13, 4706, 739, 881, 451, 367, 4944, 363, 9224, 13, 4706, 393, 505, 1661, 3918, 6579, 4558, 313, 347, 29892, 317, 28935, 467, 13, 4706, 9995, 13, 1678, 1723, 13, 1678, 13812, 29889, 1202, 29918, 23516, 29898, 13, 4706, 376, 489, 4777, 29899, 2492, 613, 13, 4706, 11663, 29890, 613, 13, 4706, 1371, 543, 2605, 304, 6579, 1967, 613, 13, 4706, 1134, 29922, 2283, 1542, 703, 6050, 4968, 13, 4706, 3734, 29922, 5574, 13, 1678, 1723, 13, 1678, 13812, 29889, 1202, 29918, 23516, 29898, 13, 4706, 376, 489, 1171, 9765, 9945, 613, 13, 4706, 11663, 29885, 613, 13, 4706, 1371, 543, 11501, 12012, 9945, 1024, 613, 13, 4706, 1134, 29922, 710, 29892, 13, 4706, 3734, 29922, 5574, 13, 1678, 1723, 13, 1678, 13812, 29889, 1202, 29918, 23516, 29898, 13, 4706, 376, 489, 10141, 613, 13, 4706, 11663, 29881, 613, 13, 4706, 1371, 543, 11501, 1024, 613, 13, 4706, 1134, 29922, 710, 29892, 13, 4706, 3734, 29922, 5574, 13, 1678, 1723, 13, 1678, 13812, 29889, 1202, 29918, 23516, 29898, 13, 4706, 376, 489, 456, 613, 13, 4706, 11663, 29878, 613, 13, 4706, 1371, 543, 10858, 5669, 390, 6488, 1134, 29889, 15447, 11286, 29901, 1273, 29879, 29908, 1273, 317, 4897, 15082, 3352, 29918, 3491, 29889, 8149, 3285, 13, 4706, 19995, 29922, 29903, 4897, 15082, 3352, 29918, 3491, 29889, 8149, 3285, 13, 4706, 3734, 29922, 5574, 13, 1678, 1723, 13, 1678, 13812, 29889, 1202, 29918, 23516, 29898, 13, 4706, 376, 489, 4905, 613, 13, 4706, 11663, 29877, 613, 13, 4706, 1134, 29922, 710, 29892, 13, 4706, 1371, 543, 8667, 3884, 304, 1925, 5759, 4742, 5285, 29889, 13109, 338, 11431, 449, 613, 13, 4706, 2322, 543, 6904, 449, 29908, 13, 1678, 1723, 13, 1678, 13812, 29889, 1202, 29918, 23516, 29898, 13, 4706, 376, 489, 369, 15828, 613, 13, 4706, 11663, 29894, 613, 13, 4706, 1371, 543, 11816, 4744, 7191, 613, 13, 4706, 3158, 2433, 2798, 29915, 3986, 396, 6479, 271, 408, 263, 4607, 13, 1678, 1723, 13, 1678, 736, 13812, 29889, 5510, 29918, 5085, 580, 13, 13, 15945, 29908, 13, 9166, 4936, 399, 1955, 29968, 29943, 3927, 7811, 1275, 9166, 2751, 1360, 13, 15945, 29908, 13, 1753, 27599, 29918, 17460, 29918, 3027, 7295, 13, 1678, 396, 14402, 29901, 29871, 30748, 233, 161, 147, 30728, 233, 163, 187, 233, 155, 163, 31551, 30210, 31548, 30687, 30943, 30832, 30883, 30214, 30805, 232, 137, 182, 30495, 28397, 3991, 29889, 11256, 30275, 30210, 233, 161, 185, 31901, 30636, 30748, 31751, 232, 164, 174, 232, 152, 168, 30267, 13, 1678, 1209, 13, 13, 13, 1753, 1207, 29918, 1509, 29918, 974, 29918, 2572, 20960, 7295, 13, 1678, 396, 14402, 29901, 29871, 31201, 31473, 29934, 314, 20960, 30214, 31666, 31594, 30275, 31302, 30683, 30417, 30406, 30210, 30333, 30631, 30267, 13, 1678, 396, 29871, 31473, 233, 142, 175, 30383, 2344, 29889, 29912, 307, 29889, 6800, 2519, 1836, 2214, 30330, 434, 794, 29881, 29889, 29912, 307, 29889, 6800, 2519, 1836, 2214, 30330, 29888, 29256, 29889, 29912, 307, 29889, 6800, 2519, 29913, 30330, 3757, 22205, 29889, 29888, 29256, 30267, 13, 1678, 1209, 13, 13, 13, 1753, 4050, 29918, 20943, 7295, 13, 1678, 396, 14402, 29901, 29871, 31441, 30886, 31653, 232, 188, 181, 30502, 236, 154, 176, 31473, 31629, 30354, 30214, 31548, 30687, 232, 136, 186, 30988, 30210, 31382, 233, 160, 194, 30333, 30631, 13, 1678, 396, 14402, 29901, 29871, 30406, 9294, 30214, 30505, 30333, 30631, 30413, 30946, 30505, 30594, 236, 131, 131, 30544, 13, 13, 1678, 1209, 13, 13, 13, 1753, 5706, 29918, 19167, 14669, 29918, 845, 7295, 13, 1678, 1209, 13, 13, 15945, 29908, 13, 9166, 4936, 14861, 1177, 12524, 5659, 23219, 1275, 9166, 2751, 1360, 13, 15945, 29908, 13, 1753, 1667, 7295, 13, 1678, 396, 20969, 1899, 1196, 29889, 29871, 13, 1678, 396, 910, 1889, 508, 2908, 777, 27302, 10970, 29889, 13, 1678, 5534, 9033, 10749, 13, 1678, 9033, 10749, 353, 6088, 29918, 9006, 1220, 580, 13, 13, 1678, 396, 20969, 6579, 1967, 29889, 13, 1678, 25401, 703, 29925, 1503, 292, 6579, 1967, 856, 29905, 29876, 1159, 13, 1678, 16437, 2891, 7833, 29954, 29918, 14573, 353, 6088, 29918, 4777, 2492, 29918, 1454, 29918, 11256, 19167, 29898, 1718, 10749, 29889, 4777, 29918, 2492, 29897, 13, 13, 13, 361, 4770, 978, 1649, 1275, 376, 1649, 3396, 1649, 1115, 13, 1678, 1667, 580, 13, 2 ]
randomtesting.py
ManderaGeneral/generalbrowser
0
1606421
from generalbrowser.assets.account.client import AccountClient from generalbrowser.assets.account.clientpage import GeneralSigninPage client = AccountClient(domain="http://127.0.0.1:8000") client.create_page()
[ 1, 29871, 13, 13, 3166, 2498, 15965, 29889, 16596, 29889, 10149, 29889, 4645, 1053, 16535, 4032, 13, 3166, 2498, 15965, 29889, 16596, 29889, 10149, 29889, 4645, 3488, 1053, 4593, 10140, 262, 5074, 13, 13, 13, 4645, 353, 16535, 4032, 29898, 7247, 543, 1124, 597, 29896, 29906, 29955, 29889, 29900, 29889, 29900, 29889, 29896, 29901, 29947, 29900, 29900, 29900, 1159, 13, 4645, 29889, 3258, 29918, 3488, 580, 13, 2 ]
BlurDetection.py
samaritan-security/samaritan-backend
0
13497
<filename>BlurDetection.py import cv2 def variance_of_laplacian(image): return cv2.Laplacian(image, cv2.CV_64F).var() """ checks if an image is blurry returns True if blurry, False otherwise """ def detect_blurry_image(image, threshold): gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) blur = variance_of_laplacian(image) if(blur < threshold): return True return False
[ 1, 529, 9507, 29958, 10358, 332, 29928, 2650, 428, 29889, 2272, 13, 5215, 13850, 29906, 13, 13, 1753, 20162, 29918, 974, 29918, 6984, 433, 28445, 29898, 3027, 1125, 13, 1678, 736, 13850, 29906, 29889, 29931, 481, 433, 28445, 29898, 3027, 29892, 13850, 29906, 29889, 15633, 29918, 29953, 29946, 29943, 467, 1707, 580, 13, 13, 13, 15945, 29908, 13, 3198, 29879, 565, 385, 1967, 338, 1999, 332, 719, 13, 18280, 5852, 565, 1999, 332, 719, 29892, 7700, 6467, 13, 15945, 29908, 13, 1753, 6459, 29918, 2204, 332, 719, 29918, 3027, 29898, 3027, 29892, 16897, 1125, 13, 1678, 16749, 353, 13850, 29906, 29889, 11023, 29873, 3306, 29898, 3027, 29892, 13850, 29906, 29889, 15032, 1955, 29918, 29933, 14345, 29906, 29954, 22800, 29897, 13, 268, 13, 1678, 1999, 332, 353, 20162, 29918, 974, 29918, 6984, 433, 28445, 29898, 3027, 29897, 13, 13, 1678, 565, 29898, 2204, 332, 529, 16897, 1125, 13, 4706, 736, 5852, 13, 13, 1678, 736, 7700, 2 ]
stock/quant/best_perform.py
shenzhongqiang/cnstock_py
2
120699
import numpy as np import pandas as pd from stock.utils.symbol_util import get_stock_symbols, get_archived_trading_dates from stock.marketdata.storefactory import get_store from config import store_type pd.set_option('display.max_rows', None) store = get_store(store_type) def get_equity_value(exsymbols, date): closes = [] for exsymbol in exsymbols: df = store.get(exsymbol) if date in df.index: closes.append(df.loc[date].close) else: close = df.loc[:date].iloc[-1].close closes.append(close) return np.mean(closes) exsymbols = store.get_stock_exsymbols() columns = ["exsymbol", "profit"] df_date = pd.DataFrame(columns=columns) for exsymbol in exsymbols: df = store.get(exsymbol) if len(df) < 400: continue close_min = df.close.iloc[-30:].min() profit = df.iloc[-1].close / close_min - 1 df_date.loc[len(df_date)] = [exsymbol, profit] df_date.dropna(how="any", inplace=True) df_top = df_date.sort_values(["profit"]).tail(10) df_bottom = df_date.sort_values(["profit"]).head(100) print(df_top)
[ 1, 1053, 12655, 408, 7442, 13, 5215, 11701, 408, 10518, 13, 3166, 10961, 29889, 13239, 29889, 18098, 29918, 4422, 1053, 679, 29918, 17712, 29918, 18098, 29879, 29892, 679, 29918, 1279, 2347, 29918, 509, 9382, 29918, 15190, 13, 3166, 10961, 29889, 28549, 1272, 29889, 8899, 14399, 1053, 679, 29918, 8899, 13, 3166, 2295, 1053, 3787, 29918, 1853, 13, 13, 15926, 29889, 842, 29918, 3385, 877, 4990, 29889, 3317, 29918, 5727, 742, 6213, 29897, 13, 8899, 353, 679, 29918, 8899, 29898, 8899, 29918, 1853, 29897, 13, 1753, 679, 29918, 1686, 537, 29918, 1767, 29898, 735, 18098, 29879, 29892, 2635, 1125, 13, 1678, 4694, 267, 353, 5159, 13, 1678, 363, 429, 18098, 297, 429, 18098, 29879, 29901, 13, 4706, 4489, 353, 3787, 29889, 657, 29898, 735, 18098, 29897, 13, 4706, 565, 2635, 297, 4489, 29889, 2248, 29901, 13, 9651, 4694, 267, 29889, 4397, 29898, 2176, 29889, 2029, 29961, 1256, 1822, 5358, 29897, 13, 4706, 1683, 29901, 13, 9651, 3802, 353, 4489, 29889, 2029, 7503, 1256, 1822, 309, 542, 14352, 29896, 1822, 5358, 13, 9651, 4694, 267, 29889, 4397, 29898, 5358, 29897, 13, 1678, 736, 7442, 29889, 12676, 29898, 11291, 267, 29897, 13, 13, 735, 18098, 29879, 353, 3787, 29889, 657, 29918, 17712, 29918, 735, 18098, 29879, 580, 13, 13099, 353, 6796, 735, 18098, 613, 376, 771, 9202, 3108, 13, 2176, 29918, 1256, 353, 10518, 29889, 17271, 29898, 13099, 29922, 13099, 29897, 13, 1454, 429, 18098, 297, 429, 18098, 29879, 29901, 13, 1678, 4489, 353, 3787, 29889, 657, 29898, 735, 18098, 29897, 13, 1678, 565, 7431, 29898, 2176, 29897, 529, 29871, 29946, 29900, 29900, 29901, 13, 4706, 6773, 13, 1678, 3802, 29918, 1195, 353, 4489, 29889, 5358, 29889, 309, 542, 14352, 29941, 29900, 29901, 1822, 1195, 580, 13, 1678, 21665, 353, 4489, 29889, 309, 542, 14352, 29896, 1822, 5358, 847, 3802, 29918, 1195, 448, 29871, 29896, 13, 1678, 4489, 29918, 1256, 29889, 2029, 29961, 2435, 29898, 2176, 29918, 1256, 4638, 353, 518, 735, 18098, 29892, 21665, 29962, 13, 2176, 29918, 1256, 29889, 8865, 1056, 29898, 3525, 543, 1384, 613, 297, 6689, 29922, 5574, 29897, 13, 2176, 29918, 3332, 353, 4489, 29918, 1256, 29889, 6605, 29918, 5975, 29898, 3366, 771, 9202, 3108, 467, 18237, 29898, 29896, 29900, 29897, 13, 2176, 29918, 8968, 353, 4489, 29918, 1256, 29889, 6605, 29918, 5975, 29898, 3366, 771, 9202, 3108, 467, 2813, 29898, 29896, 29900, 29900, 29897, 13, 13, 2158, 29898, 2176, 29918, 3332, 29897, 13, 2 ]
Asap-3.8.4/Projects/NanoparticleMC/misc/plot_coveragevsT.py
auag92/n2dm
1
135827
import os if not os.path.exists('AdsorptionParameters.py'): os.symlink('../AdsorptionParameters.py', 'AdsorptionParameters.py') import matplotlib.pyplot as plt import asap3.nanoparticle_mc.langmuirExpression as le import numpy as np #Test the CO Plot now #Get one coverage for each CN for each temperature at 1mbar x = np.linspace(0.1,800,100) covs = np.zeros((len(x),16)) for i in range(len(x)): covs[i] = le.getCoverages(T=x[i],P=1E2,species="AuCO") CN_4 = [c[4] for c in covs] CN_6 = [c[6] for c in covs] CN_8 = [c[8] for c in covs] CN_9 = [c[9] for c in covs] CN_12 = [c[12] for c in covs] plt.plot(x,CN_4,label="CN 4") plt.plot(x,CN_6,label="CN 6") plt.plot(x,CN_8,label="CN 8") plt.plot(x,CN_9,label="CN 9") plt.plot(x,CN_12,label="CN 12") plt.legend(loc=3) plt.ylim([0,1.1]) plt.xlabel("Temperature[K]",fontsize=20) plt.ylabel("Coverage",fontsize=20) plt.show()
[ 1, 1053, 2897, 13, 361, 451, 2897, 29889, 2084, 29889, 9933, 877, 3253, 29879, 272, 683, 11507, 29889, 2272, 29374, 13, 12, 359, 29889, 29879, 21053, 682, 877, 6995, 3253, 29879, 272, 683, 11507, 29889, 2272, 742, 525, 3253, 29879, 272, 683, 11507, 29889, 2272, 1495, 13, 5215, 22889, 29889, 2272, 5317, 408, 14770, 13, 5215, 408, 481, 29941, 29889, 13707, 459, 7914, 29918, 14047, 29889, 3893, 2589, 381, 10960, 408, 454, 13, 5215, 12655, 408, 7442, 13, 13, 29937, 3057, 278, 4810, 18399, 1286, 13, 13, 13, 29937, 2577, 697, 23746, 363, 1269, 315, 29940, 363, 1269, 10430, 472, 29871, 29896, 29885, 1646, 13, 13, 29916, 353, 7442, 29889, 1915, 3493, 29898, 29900, 29889, 29896, 29892, 29947, 29900, 29900, 29892, 29896, 29900, 29900, 29897, 13, 24542, 29879, 353, 7442, 29889, 3298, 359, 3552, 2435, 29898, 29916, 511, 29896, 29953, 876, 13, 1454, 474, 297, 3464, 29898, 2435, 29898, 29916, 22164, 13, 12, 24542, 29879, 29961, 29875, 29962, 353, 454, 29889, 657, 29907, 957, 1179, 29898, 29911, 29922, 29916, 29961, 29875, 1402, 29925, 29922, 29896, 29923, 29906, 29892, 24091, 543, 29909, 29884, 3217, 1159, 13, 13, 13, 13778, 29918, 29946, 353, 518, 29883, 29961, 29946, 29962, 363, 274, 297, 18838, 29879, 29962, 13, 13778, 29918, 29953, 353, 518, 29883, 29961, 29953, 29962, 363, 274, 297, 18838, 29879, 29962, 13, 13778, 29918, 29947, 353, 518, 29883, 29961, 29947, 29962, 363, 274, 297, 18838, 29879, 29962, 13, 13778, 29918, 29929, 353, 518, 29883, 29961, 29929, 29962, 363, 274, 297, 18838, 29879, 29962, 13, 13778, 29918, 29896, 29906, 353, 518, 29883, 29961, 29896, 29906, 29962, 363, 274, 297, 18838, 29879, 29962, 13, 572, 29873, 29889, 5317, 29898, 29916, 29892, 13778, 29918, 29946, 29892, 1643, 543, 13778, 29871, 29946, 1159, 13, 572, 29873, 29889, 5317, 29898, 29916, 29892, 13778, 29918, 29953, 29892, 1643, 543, 13778, 29871, 29953, 1159, 13, 572, 29873, 29889, 5317, 29898, 29916, 29892, 13778, 29918, 29947, 29892, 1643, 543, 13778, 29871, 29947, 1159, 13, 572, 29873, 29889, 5317, 29898, 29916, 29892, 13778, 29918, 29929, 29892, 1643, 543, 13778, 29871, 29929, 1159, 13, 572, 29873, 29889, 5317, 29898, 29916, 29892, 13778, 29918, 29896, 29906, 29892, 1643, 543, 13778, 29871, 29896, 29906, 1159, 13, 572, 29873, 29889, 26172, 29898, 2029, 29922, 29941, 29897, 13, 572, 29873, 29889, 29891, 2576, 4197, 29900, 29892, 29896, 29889, 29896, 2314, 13, 572, 29873, 29889, 29916, 1643, 703, 5776, 546, 1535, 29961, 29968, 29962, 613, 5657, 2311, 29922, 29906, 29900, 29897, 13, 572, 29873, 29889, 29891, 1643, 703, 29907, 957, 482, 613, 5657, 2311, 29922, 29906, 29900, 29897, 13, 572, 29873, 29889, 4294, 580, 13, 2 ]
testg.py
dcn01/AndroidDropFrameAnalysis
2
14091
# fpsAllFrameRead = open("profileAllFrame.txt", "r") # profileDataReadList =[] # t = [] # for line in fpsAllFrameRead.readlines(): # profileDataReadList.append(line) # # for line in profileDataReadList: # splitByComma = line.split(",") # l = len(splitByComma) # print str(l) a = 34.4/(1000/60) print str(a) # fin = "" # c = 0 # e = len(willBeInsertIntoSqlList) # for tmplist in willBeInsertIntoSqlList: # splitByT = tmplist.split("\t") # if c==0: # fin = fin +"{" # # if c==e -1: # fin = fin+str(c)+":{\"Draw\":"+splitByT[1]+",\"Prepare\":"+splitByT[2]+",\"Process\":"+splitByT[3]+",\"Execute\":"+splitByT[4].strip()+"}}" # else: # fin = fin+str(c)+":{\"Draw\":"+splitByT[1]+",\"Prepare\":"+splitByT[2]+",\"Process\":"+splitByT[3]+",\"Execute\":"+splitByT[4].strip()+"}," # # c = c+1 # fin = "var person_data = "+fin+";\nvar svg_width = 88350;" # dataWrite = open("./output/js/data.js", "w") # dataWrite.write(fin)
[ 1, 396, 285, 567, 3596, 4308, 6359, 353, 1722, 703, 10185, 3596, 4308, 29889, 3945, 613, 376, 29878, 1159, 13, 29937, 8722, 1469, 6359, 1293, 353, 2636, 13, 29937, 260, 353, 5159, 13, 29937, 363, 1196, 297, 285, 567, 3596, 4308, 6359, 29889, 949, 9012, 7295, 13, 29937, 268, 8722, 1469, 6359, 1293, 29889, 4397, 29898, 1220, 29897, 13, 29937, 13, 29937, 363, 1196, 297, 8722, 1469, 6359, 1293, 29901, 13, 29937, 268, 6219, 2059, 1523, 655, 353, 1196, 29889, 5451, 28165, 1159, 13, 29937, 268, 301, 353, 7431, 29898, 5451, 2059, 1523, 655, 29897, 13, 29937, 268, 1596, 851, 29898, 29880, 29897, 13, 13, 29874, 353, 29871, 29941, 29946, 29889, 29946, 14571, 29896, 29900, 29900, 29900, 29914, 29953, 29900, 29897, 13, 2158, 851, 29898, 29874, 29897, 13, 13, 29937, 1436, 353, 5124, 13, 29937, 274, 353, 29871, 29900, 13, 29937, 321, 353, 7431, 29898, 14043, 3629, 17491, 797, 517, 10520, 1293, 29897, 13, 29937, 363, 27702, 572, 391, 297, 674, 3629, 17491, 797, 517, 10520, 1293, 29901, 13, 29937, 268, 6219, 2059, 29911, 353, 29871, 27702, 572, 391, 29889, 5451, 14182, 29873, 1159, 13, 29937, 268, 565, 274, 1360, 29900, 29901, 13, 29937, 308, 1436, 353, 1436, 718, 29908, 6377, 13, 29937, 418, 13, 29937, 268, 565, 274, 1360, 29872, 448, 29896, 29901, 13, 29937, 308, 1436, 353, 1436, 29974, 710, 29898, 29883, 7240, 1115, 741, 29908, 8537, 29905, 4710, 29974, 5451, 2059, 29911, 29961, 29896, 10062, 613, 5931, 29925, 3445, 598, 29905, 4710, 29974, 5451, 2059, 29911, 29961, 29906, 10062, 613, 5931, 7032, 29905, 4710, 29974, 5451, 2059, 29911, 29961, 29941, 10062, 613, 5931, 12296, 29905, 4710, 29974, 5451, 2059, 29911, 29961, 29946, 1822, 17010, 580, 13578, 930, 29908, 13, 29937, 268, 1683, 29901, 13, 29937, 308, 1436, 353, 1436, 29974, 710, 29898, 29883, 7240, 1115, 741, 29908, 8537, 29905, 4710, 29974, 5451, 2059, 29911, 29961, 29896, 10062, 613, 5931, 29925, 3445, 598, 29905, 4710, 29974, 5451, 2059, 29911, 29961, 29906, 10062, 613, 5931, 7032, 29905, 4710, 29974, 5451, 2059, 29911, 29961, 29941, 10062, 613, 5931, 12296, 29905, 4710, 29974, 5451, 2059, 29911, 29961, 29946, 1822, 17010, 580, 29974, 10758, 29908, 13, 29937, 3986, 13, 29937, 268, 274, 353, 274, 29974, 29896, 13, 29937, 1436, 353, 376, 1707, 2022, 29918, 1272, 353, 15691, 4951, 29974, 1769, 29905, 29876, 1707, 25773, 29918, 2103, 353, 29871, 29947, 29947, 29941, 29945, 29900, 15458, 13, 29937, 848, 6113, 353, 1722, 703, 6904, 4905, 29914, 1315, 29914, 1272, 29889, 1315, 613, 376, 29893, 1159, 13, 29937, 848, 6113, 29889, 3539, 29898, 4951, 29897, 13, 2 ]
curso em video/python/mundo 1/ex033.py
KenzoDezotti/cursoemvideo
0
30385
<filename>curso em video/python/mundo 1/ex033.py c = int(input('digite o primeiro numero: ')) b = int(input('digite o segundo numero: ')) a = int(input('digite o terceiro numero: ')) cores= {'vermelho': '\033[0;31m', 'azul' : '\033[1;34m', 'zero': '\033[m' } # qual o maior maior = a if b > c and b > a: maior = b if c > b and c > a: maior = c print('O maior valor foi {}{}{}'.format(cores['azul'],maior,cores['zero'])) # qual o menor menor = c if a < b and a < c: menor = a if b < a and b < c: menor = b print('O menor valor foi {}{}{}'.format(cores['vermelho'],menor,cores['zero']))
[ 1, 529, 9507, 29958, 2764, 578, 953, 4863, 29914, 4691, 29914, 29885, 6201, 29871, 29896, 29914, 735, 29900, 29941, 29941, 29889, 2272, 13, 29883, 353, 938, 29898, 2080, 877, 7501, 568, 288, 19695, 17910, 29901, 525, 876, 13, 29890, 353, 938, 29898, 2080, 877, 7501, 568, 288, 14729, 17910, 29901, 525, 876, 13, 29874, 353, 938, 29898, 2080, 877, 7501, 568, 288, 1935, 346, 3350, 17910, 29901, 525, 876, 13, 29883, 2361, 29922, 11117, 369, 12873, 1251, 2396, 11297, 29900, 29941, 29941, 29961, 29900, 29936, 29941, 29896, 29885, 742, 13, 4706, 525, 834, 352, 29915, 584, 11297, 29900, 29941, 29941, 29961, 29896, 29936, 29941, 29946, 29885, 742, 13, 4706, 525, 9171, 2396, 11297, 29900, 29941, 29941, 29961, 29885, 29915, 500, 13, 29937, 4021, 288, 17136, 13, 655, 1611, 353, 263, 13, 361, 289, 1405, 274, 322, 289, 1405, 263, 29901, 13, 1678, 17136, 353, 289, 13, 361, 274, 1405, 289, 322, 274, 1405, 263, 29901, 13, 1678, 17136, 353, 274, 13, 2158, 877, 29949, 17136, 16497, 4732, 426, 1157, 1157, 29913, 4286, 4830, 29898, 29883, 2361, 1839, 834, 352, 7464, 655, 1611, 29892, 29883, 2361, 1839, 9171, 25901, 13, 13, 29937, 4021, 288, 26764, 13, 1527, 272, 353, 274, 13, 361, 263, 529, 289, 322, 263, 529, 274, 29901, 13, 1678, 26764, 353, 263, 13, 361, 289, 529, 263, 322, 289, 529, 274, 29901, 13, 1678, 26764, 353, 289, 13, 2158, 877, 29949, 26764, 16497, 4732, 426, 1157, 1157, 29913, 4286, 4830, 29898, 29883, 2361, 1839, 369, 12873, 1251, 7464, 1527, 272, 29892, 29883, 2361, 1839, 9171, 25901, 13, 2 ]
cartography/selection/train_dy_filtering.py
dyahadila/ood_cartography
0
196635
""" Filtering and dataset mapping methods based on training dynamics. By default, this module reads training dynamics from a given trained model and computes the metrics---confidence, variability, correctness, as well as baseline metrics of forgetfulness and threshold closeness for each instance in the training data. If specified, data maps can be plotted with respect to confidence and variability. Moreover, datasets can be filtered with respect any of the other metrics. """ import argparse import json import logging import matplotlib.pyplot as plt import numpy as np import os import pandas as pd import seaborn as sns import torch import tqdm import imageio from collections import defaultdict from typing import List from cartography.data_utils import read_data, read_jsonl, copy_dev_test from cartography.selection.selection_utils import read_dynamics # TODO(SS): Named tuple for tasks and filtering methods. logging.basicConfig( format="%(asctime)s - %(levelname)s - %(name)s - %(message)s", level=logging.INFO ) logger = logging.getLogger(__name__) def compute_forgetfulness(correctness_trend: List[float]) -> int: """ Given a epoch-wise trend of train predictions, compute frequency with which an example is forgotten, i.e. predicted incorrectly _after_ being predicted correctly. Based on: https://arxiv.org/abs/1812.05159 """ if not any(correctness_trend): # Example is never predicted correctly, or learnt! return 1000 learnt = False # Predicted correctly in the current epoch. times_forgotten = 0 for is_correct in correctness_trend: if (not learnt and not is_correct) or (learnt and is_correct): # nothing changed. continue elif learnt and not is_correct: # Forgot after learning at some point! learnt = False times_forgotten += 1 elif not learnt and is_correct: # Learnt! learnt = True return times_forgotten def compute_correctness(trend: List[float]) -> float: """ Aggregate #times an example is predicted correctly during all training epochs. """ return sum(trend) def compute_train_dy_metrics_per_epoch(training_dynamics, heuristics, original_id, mode="train"): """ Given the training dynamics (logits for each training instance across epochs), compute metrics based on it, for data map coorodinates. Computed metrics are: confidence, variability, correctness, forgetfulness, threshold_closeness--- the last two being baselines from prior work (Example Forgetting: https://arxiv.org/abs/1812.05159 and Active Bias: https://arxiv.org/abs/1704.07433 respectively). Returns: - DataFrame with these metrics. - DataFrame with more typical training evaluation metrics, such as accuracy / loss. """ confidence_ = {} variability_ = {} threshold_closeness_ = {} correctness_ = {} forgetfulness_ = {} lexical = {} constituent = {} subsequence= {} original_ids = {} ood={} predicted_labels = {} golds_labels = {} # Functions to be applied to the data. variability_func = lambda conf: np.std(conf) # if include_ci: # Based on prior work on active bias (https://arxiv.org/abs/1704.07433) # variability_func = lambda conf: np.sqrt(np.var(conf) + np.var(conf) * np.var(conf) / (len(conf)-1)) threshold_closeness_func = lambda conf: conf * (1 - conf) loss = torch.nn.CrossEntropyLoss() num_tot_epochs = len(list(training_dynamics.values())[0]["logits"]) # if burn_out < num_tot_epochs: # logger.info(f"Computing training dynamics. Burning out at {burn_out} of {num_tot_epochs}. ") # else: logger.info(f"Computing training dynamics across {num_tot_epochs} epochs") logger.info("Metrics computed: confidence, variability, correctness, forgetfulness, threshold_closeness") logits = {i: [] for i in range(num_tot_epochs)} targets = {i: [] for i in range(num_tot_epochs)} training_accuracy = defaultdict(float) for guid in tqdm.tqdm(training_dynamics): correctness_trend = [] true_probs_trend = [] correctness_ep = [] confidence_ep = [] variability_ep = [] prediction_ep = [] record = training_dynamics[guid] for i, epoch_logits in enumerate(record["logits"]): if i >= len(logits.keys()): break probs = torch.nn.functional.softmax(torch.Tensor(epoch_logits), dim=-1) true_class_prob = float(probs[record["gold"]]) true_probs_trend.append(true_class_prob) prediction = np.argmax(epoch_logits) is_correct = (prediction == record["gold"]).item() correctness_trend.append(is_correct) training_accuracy[i] += is_correct logits[i].append(epoch_logits) targets[i].append(record["gold"]) correctness_ep.append(compute_correctness(correctness_trend)) confidence_ep.append(np.mean(true_probs_trend)) variability_ep.append(variability_func(true_probs_trend)) prediction_ep.append(prediction.item()) correctness_[guid] = correctness_ep confidence_[guid] = confidence_ep variability_[guid] = variability_ep # if burn_out < num_tot_epochs: # correctness_trend = correctness_trend[:burn_out] # true_probs_trend = true_probs_trend[:burn_out] # correctness_[guid] = compute_correctness(correctness_trend) # confidence_[guid] = np.mean(true_probs_trend) # variability_[guid] = variability_func(true_probs_trend) # forgetfulness_[guid] = compute_forgetfulness(correctness_trend) # threshold_closeness_[guid] = threshold_closeness_func(confidence_[guid]) lexical[guid] = heuristics[guid]["lexical"] constituent[guid] = heuristics[guid]["constituent"] subsequence[guid] = heuristics[guid]["subsequence"] ood[guid] = heuristics[guid]["ood"] original_ids[guid] = original_id[guid] predicted_labels[guid] = prediction_ep # Should not affect ranking, so ignoring. epsilon_var = np.mean(list(variability_.values())) column_names = ['guid', 'index', # 'threshold_closeness', 'confidence', 'variability', 'correctness', # 'forgetfulness', 'pred_label', 'lexical', 'constituent', 'subsequence', 'original_id'] if mode != "train": column_names.insert(-1, "ood") df = pd.DataFrame([[guid, i, # threshold_closeness_[guid], confidence_[guid], variability_[guid], correctness_[guid], predicted_labels[guid], # forgetfulness_[guid], lexical[guid], constituent[guid], subsequence[guid], ood[guid], original_ids[guid] ] for i, guid in enumerate(correctness_)], columns=column_names) df_train = pd.DataFrame([[i, loss(torch.Tensor(logits[i]), torch.LongTensor(targets[i])).item() / len( training_dynamics), training_accuracy[i] / len(training_dynamics) ] for i in range(num_tot_epochs)], columns=['epoch', 'loss', 'train_acc']) else: df = pd.DataFrame([[guid, i, # threshold_closeness_[guid], confidence_[guid], variability_[guid], correctness_[guid], predicted_labels[guid], # forgetfulness_[guid], lexical[guid], constituent[guid], subsequence[guid], original_ids[guid] ] for i, guid in enumerate(correctness_)], columns=column_names) df_train = pd.DataFrame([[i,loss(torch.Tensor(logits[i]), torch.LongTensor(targets[i])).item() / len(training_dynamics),training_accuracy[i] / len(training_dynamics)] for i in range(num_tot_epochs)], columns=['epoch', 'loss', 'train_acc']) df.to_csv(f"ALL_SAMPLES_{mode}.csv") return df, df_train def consider_ascending_order(filtering_metric: str) -> bool: """ Determine if the metric values' sorting order to get the most `valuable` examples for training. """ if filtering_metric == "variability": return False elif filtering_metric == "confidence": return True elif filtering_metric == "threshold_closeness": return False elif filtering_metric == "forgetfulness": return False elif filtering_metric == "correctness": return True else: raise NotImplementedError(f"Filtering based on {filtering_metric} not implemented!") def write_filtered_data(args, train_dy_metrics): """ Filter data based on the given metric, and write it in TSV format to train GLUE-style classifier. """ # First save the args for filtering, to keep track of which model was used for filtering. argparse_dict = vars(args) with open(os.path.join(args.filtering_output_dir, f"filtering_configs.json"), "w") as outfile: outfile.write(json.dumps(argparse_dict, indent=4, sort_keys=True) + "\n") # Determine whether to sort data in ascending order or not, based on the metric. is_ascending = consider_ascending_order(args.metric) if args.worst: is_ascending = not is_ascending # Sort by selection. sorted_scores = train_dy_metrics.sort_values(by=[args.metric], ascending=is_ascending) original_train_file = os.path.join(os.path.join(args.data_dir, args.task_name), f"train.tsv") train_numeric, header = read_data(original_train_file, task_name=args.task_name, guid_as_int=True) for fraction in [0.01, 0.05, 0.10, 0.1667, 0.25, 0.3319, 0.50, 0.75]: outdir = os.path.join(args.filtering_output_dir, f"cartography_{args.metric}_{fraction:.2f}/{args.task_name}") if not os.path.exists(outdir): os.makedirs(outdir) # Dev and test need not be subsampled. copy_dev_test(args.task_name, from_dir=os.path.join(args.data_dir, args.task_name), to_dir=outdir) num_samples = int(fraction * len(train_numeric)) with open(os.path.join(outdir, f"train.tsv"), "w") as outfile: outfile.write(header + "\n") selected = sorted_scores.head(n=num_samples+1) if args.both_ends: hardest = sorted_scores.head(n=int(num_samples * 0.7)) easiest = sorted_scores.tail(n=num_samples - hardest.shape[0]) selected = pd.concat([hardest, easiest]) fm = args.metric logger.info(f"Selecting both ends: {fm} = " f"({hardest.head(1)[fm].values[0]:3f}: {hardest.tail(1)[fm].values[0]:3f}) " f"& ({easiest.head(1)[fm].values[0]:3f}: {easiest.tail(1)[fm].values[0]:3f})") selection_iterator = tqdm.tqdm(range(len(selected))) for idx in selection_iterator: selection_iterator.set_description( f"{args.metric} = {selected.iloc[idx][args.metric]:.4f}") selected_id = selected.iloc[idx]["guid"] if args.task_name in ["SNLI", "MNLI"]: selected_id = int(selected_id) elif args.task_name == "WINOGRANDE": selected_id = str(int(selected_id)) record = train_numeric[selected_id] outfile.write(record + "\n") logger.info(f"Wrote {num_samples} samples to {outdir}.") def mix_heuristics_label_eval(df): df_lex_supp = df.loc[(df["lexical"] == 1)& (df["constituent"] == 0) &(df["subsequence"] == 0)] df_lex_supp['mix_heurstic_label'] = f"lexical support (ood: " \ f"{df_lex_supp.loc[df_lex_supp['ood']==1].shape[0]} id: {df_lex_supp.loc[df_lex_supp['ood']==0].shape[0]})" df_lex_cont = df.loc[(df["lexical"] == -1) & (df["constituent"] == 0) & (df["subsequence"] == 0)] df_lex_cont['mix_heurstic_label'] = f"lexical contradict (ood: " \ f"{df_lex_cont.loc[df_lex_cont['ood']==1].shape[0]} id: {df_lex_cont.loc[df_lex_cont['ood']==0].shape[0]})" df_const_supp = df.loc[(df["lexical"] == 0) & (df["constituent"] == 1) & (df["subsequence"] == 0)] df_const_supp['mix_heurstic_label'] = f"constituent support (ood: " \ f"{df_const_supp.loc[df_const_supp['ood']==1].shape[0]} id: {df_const_supp.loc[df_const_supp['ood']==0].shape[0]})" df_const_cont = df.loc[(df["lexical"] == 0) & (df["constituent"] == -1) & (df["subsequence"] == 0)] df_const_cont['mix_heurstic_label'] = f"constituent contradict (ood: " \ f"{df_const_cont.loc[df_const_cont['ood']==1].shape[0]} id: {df_const_cont.loc[df_const_cont['ood']==0].shape[0]})" df_sub_supp = df.loc[(df["lexical"] == 0) & (df["constituent"] == 0) & (df["subsequence"] == 1)] df_sub_supp['mix_heurstic_label'] = f"subsequence support (ood: " \ f"{df_sub_supp.loc[df_sub_supp['ood']==1].shape[0]} id: {df_sub_supp.loc[df_sub_supp['ood']==0].shape[0]})" df_sub_cont = df.loc[(df["lexical"] == 0) & (df["constituent"] == 0) & (df["subsequence"] == -1)] df_sub_cont['mix_heurstic_label'] = f"subsequence contradict (ood: " \ f"{df_sub_cont.loc[df_sub_cont['ood']==1].shape[0]} id: {df_sub_cont.loc[df_sub_cont['ood']==0].shape[0]})" df_mix = pd.concat([df_lex_supp, df_lex_cont, df_const_supp, df_const_cont, df_sub_supp, df_sub_cont]) return df_mix def mix_heuristics_label_train(df): df_lex_supp = df.loc[(df["lexical"] == 1)& (df["constituent"] == 0) &(df["subsequence"] == 0)] df_lex_supp['mix_heurstic_label'] = f"lexical support ({df_lex_supp.shape[0]}" df_lex_cont = df.loc[(df["lexical"] == -1) & (df["constituent"] == 0) & (df["subsequence"] == 0)] df_lex_cont['mix_heurstic_label'] = f"lexical contradict ({df_lex_cont.shape[0]}" df_const_supp = df.loc[(df["lexical"] == 0) & (df["constituent"] == 1) & (df["subsequence"] == 0)] df_const_supp['mix_heurstic_label'] = f"constituent support ({df_const_supp.shape[0]}" df_const_cont = df.loc[(df["lexical"] == 0) & (df["constituent"] == -1) & (df["subsequence"] == 0)] df_const_cont['mix_heurstic_label'] = f"constituent contradict ({df_const_cont.shape[0]}" df_sub_supp = df.loc[(df["lexical"] == 0) & (df["constituent"] == 0) & (df["subsequence"] == 1)] df_sub_supp['mix_heurstic_label'] = f"subsequence support ({df_sub_supp.shape[0]}" df_sub_cont = df.loc[(df["lexical"] == 0) & (df["constituent"] == 0) & (df["subsequence"] == -1)] df_sub_cont['mix_heurstic_label'] = f"subsequence contradict ({df_sub_cont.shape[0]}" df_mix = pd.concat([df_lex_supp, df_lex_cont, df_const_supp, df_const_cont, df_sub_supp, df_sub_cont]) return df_mix def get_ambiguous_heuristics_samples(df, model_dir, df_orig=pd.read_csv("/home/jusun/adila001/MNLI/train_heuristic.tsv", sep='\t|\n'), heu='lexical'): df = df.loc[(df[heu] != 0)] df = df.loc[df["variability"] >= 0.3] df_heuristics_ORIG = df_orig.loc[df['original_id'].tolist()] df_heuristics_ORIG= df_heuristics_ORIG.drop(['index', 'promptID', 'pairID'], axis=1) df_heuristics_ORIG['confidence'] = df['confidence'].tolist() df_heuristics_ORIG['variability'] = df['variability'].tolist() csv_dir = os.path.join(model_dir, 'unique_samples_csv') if not os.path.exists(csv_dir): os.makedirs(csv_dir) df_heuristics_ORIG.to_csv(os.path.join(csv_dir, 'ambiguous_samples.csv')) def get_sorted_samples(df, model_dir, df_orig=pd.read_csv('/home/jusun/adila001/MNLI/train_heuristic.tsv', sep='\t|\n'), n_sample=30, decoded_label=["contradiction", "entailment", "neutral"], columns_order = ['index', 'genre', 'sentence1', 'sentence2', 'variability', 'confidence', 'var_ep', 'conf_ep', 'gold_label', 'pred_label'], mode="train"): csv_dir = os.path.join(model_dir, 'ANALYSIS_CLEAN', 'SORTED') if not os.path.exists(csv_dir): os.makedirs(csv_dir) # heuristics = top_heuristic_obj.keys() ep_number = len(df['variability'].tolist()[0]) for ep in range(ep_number): # for heu in heuristics: # df_heuristic = df.loc[df[heu] != 0] df_copy = df.copy() df_copy['var_ep'] = np.asarray(df_copy['variability'].tolist())[:, ep] df_copy['conf_ep'] = np.asarray(df_copy['confidence'].tolist())[:, ep] df_copy['pred_label'] = np.asarray(df_copy['pred_label'].tolist())[:, ep] df_copy['pred_label'] = [decoded_label[pred] for pred in df_copy['pred_label']] # random_sample = df_heuristic.sample(n= top_heuristic_obj[heu]) # top_n_var = df_copy.nlargest(n_sample, 'var_ep') # top_n_conf = df_copy.nsmallest(df_copy.shape[0], 'conf_ep') top_n_conf = df_copy.sort_values(by=['conf_ep']) # top_n_var_ORIG = df_orig.loc[top_n_var['original_id'].tolist()] # # top_n_var_ORIG = top_n_var_ORIG.drop(cols_to_drop, axis=1) # top_n_var_ORIG['variability'] = top_n_var['variability'].tolist() # top_n_var_ORIG['confidence'] = top_n_var['confidence'].tolist() # top_n_var_ORIG['var_ep'] = top_n_var['var_ep'].tolist() # top_n_var_ORIG['conf_ep'] = top_n_var['conf_ep'].tolist() # top_n_var_ORIG['pred_label'] = top_n_var['pred_label'].tolist() top_n_conf_ORIG = df_orig.loc[top_n_conf['original_id'].tolist()] # top_n_conf_ORIG = top_n_conf_ORIG.drop(cols_to_drop, axis=1) top_n_conf_ORIG['variability'] = top_n_conf['variability'].tolist() top_n_conf_ORIG['confidence'] = top_n_conf['confidence'].tolist() top_n_conf_ORIG['var_ep'] = top_n_conf['var_ep'].tolist() top_n_conf_ORIG['conf_ep'] = top_n_conf['conf_ep'].tolist() top_n_conf_ORIG['pred_label'] = top_n_conf['pred_label'].tolist() # top_n_var_ORIG = top_n_var_ORIG[columns_order] top_n_conf_ORIG = top_n_conf_ORIG[columns_order] prefix = mode.upper() # top_n_var_ORIG.to_csv(os.path.join(csv_dir, "{}_SORTED_VAR_ep_{}.csv".format(prefix, ep))) top_n_conf_ORIG.to_csv(os.path.join(csv_dir, "{}_CONF_ep_{}_SORTED.csv".format(prefix, ep))) # return top_n_var_ORIG, top_n_conf_ORIG def get_top_n_heuristics_samples(df, model_dir, df_orig=pd.read_csv('/home/jusun/adila001/MNLI/train_heuristic.tsv', sep='\t|\n'), top_heuristic_obj = {'lexical': 20, 'constituent': 20, 'subsequence': 20}, decoded_label=["contradiction", "entailment", "neutral"], columns_order = ['genre', 'sentence1', 'sentence2', 'variability', 'confidence', 'var_ep', 'conf_ep', 'gold_label', 'pred_label']): csv_dir = os.path.join(model_dir, 'heuristics_only_csv_EVAL') if not os.path.exists(csv_dir): os.makedirs(csv_dir) heuristics = top_heuristic_obj.keys() ep_number = len(df['variability'].tolist()[0]) for ep in range(ep_number): for heu in heuristics: df_heuristic = df.loc[df[heu] != 0] df_heuristic['var_ep'] = np.asarray(df_heuristic['variability'].tolist())[:,ep] df_heuristic['conf_ep'] = np.asarray(df_heuristic['confidence'].tolist())[:, ep] df_heuristic['pred_label'] = np.asarray(df_heuristic['pred_label'].tolist())[:, ep] df_heuristic['pred_label'] = [decoded_label[pred] for pred in df_heuristic['pred_label']] # random_sample = df_heuristic.sample(n= top_heuristic_obj[heu]) top_n_var = df_heuristic.nlargest(top_heuristic_obj[heu],'var_ep') top_n_conf = df_heuristic.nlargest(top_heuristic_obj[heu],'conf_ep') # random_sample_ORIG = df_orig.loc[random_sample['original_id'].tolist()] # random_sample_ORIG = random_sample_ORIG.drop(['index', 'promptID', 'pairID'], axis=1) # random_sample_ORIG['variability'] = random_sample['variability'].tolist() # random_sample_ORIG['confidence'] = random_sample['confidence'].tolist() # random_sample_ORIG['var_ep'] = random_sample['var_ep'].tolist() # random_sample_ORIG['conf_ep'] = random_sample['conf_ep'].tolist() top_n_var_ORIG = df_orig.loc[top_n_var['original_id'].tolist()] # top_n_var_ORIG = top_n_var_ORIG.drop(cols_to_drop, axis=1) top_n_var_ORIG['variability'] = top_n_var['variability'].tolist() top_n_var_ORIG['confidence'] = top_n_var['confidence'].tolist() top_n_var_ORIG['var_ep'] = top_n_var['var_ep'].tolist() top_n_var_ORIG['conf_ep'] = top_n_var['conf_ep'].tolist() top_n_var_ORIG['pred_label'] = top_n_var['pred_label'].tolist() top_n_conf_ORIG = df_orig.loc[top_n_conf['original_id'].tolist()] # top_n_conf_ORIG = top_n_conf_ORIG.drop(cols_to_drop, axis=1) top_n_conf_ORIG['variability'] = top_n_conf['variability'].tolist() top_n_conf_ORIG['confidence'] = top_n_conf['confidence'].tolist() top_n_conf_ORIG['var_ep'] = top_n_conf['var_ep'].tolist() top_n_conf_ORIG['conf_ep'] = top_n_conf['conf_ep'].tolist() top_n_conf_ORIG['pred_label'] = top_n_conf['pred_label'].tolist() top_n_var_ORIG = top_n_var_ORIG[columns_order] top_n_conf_ORIG = top_n_conf_ORIG[columns_order] # print(random_sample_ORIG) # print(f"{heu}_EP_{ep}") # print(top_n_var_ORIG) # print(top_n_conf_ORIG) # top_n_var_ORIG.to_csv(os.path.join(csv_dir, "{}_TOP_VAR_ep_{}.csv".format(heu, ep))) top_n_conf_ORIG.to_csv(os.path.join(csv_dir, "{}_TOP_CONF_ep_{}_LARGEST.csv".format(heu, ep))) # return top_n_var_ORIG, top_n_conf_ORIG # random_sample_ORIG.to_csv(os.path.join(csv_dir,"{}_RANDOM.csv".format(heu)),index=False) # top_n_var_ORIG.to_csv(os.path.join(csv_dir, "{}_TOP_VAR.csv".format(heu)), index=False) # top_n_conf_ORIG.to_csv(os.path.join(csv_dir, "{}_TOP_CONF.csv".format(heu)), index=False) def find_max_var(var_arr): return np.amax(var_arr) def plot_train_epochs(args, training_dynamics, heuristics, original_id, gif =True): total_epochs = len(list(training_dynamics.values())[0]["logits"]) df, _ = compute_train_dy_metrics_per_epoch(training_dynamics, heuristics, original_id) train_dy_filename = os.path.join(args.model_dir, f"td_metrics.jsonl") df.to_json(train_dy_filename, orient='records', lines=True) logger.info(f"Metrics based on Training Dynamics written to {train_dy_filename}") df_heuristics = df.loc[(df["lexical"] != 0) | (df["constituent"] != 0) | (df["subsequence"] != 0)] df_others = df.loc[(df["lexical"] == 0) & (df["constituent"] == 0) & (df["subsequence"] == 0)] max_instances_heuristic = { 'lexical': df_heuristics.loc[df_heuristics['lexical'] != 0].shape[0], 'subsequence': df_heuristics.loc[df_heuristics['subsequence'] != 0].shape[0], 'constituent': df_heuristics.loc[df_heuristics['constituent'] != 0].shape[0] } heuristics = ['lexical', 'constituent', 'subsequence'] max_var = find_max_var(df_heuristics['variability'].tolist()) for heuristic in heuristics: figs = [] max_instances_to_plot = max_instances_heuristic[heuristic] df_current_heuristic = df_heuristics.loc[df_heuristics[heuristic] != 0] # df_others_sampled = df_others.sample(n=max_instances_to_plot-df_current_heuristic.shape[0]) df_others_sampled = df_others.sample(n=df_current_heuristic.shape[0]*2) df_current_heuristic = df_current_heuristic.append(df_others_sampled, ignore_index=True) # ### DEV ### # for ep in range(total_epochs): # ### DEV ### for ep in range(2,total_epochs): df_current_heuristic_epoch = df_current_heuristic.copy() # print(df_current_heuristic_epoch['confidence']) confidence_epoch = np.asarray(df_current_heuristic_epoch['confidence'].tolist())[:,ep].flatten() var_epoch = np.asarray(df_current_heuristic_epoch['variability'].tolist())[:,ep].flatten() correctness_epoch = np.asarray(df_current_heuristic_epoch['correctness'].tolist())[:,ep].flatten() df_current_heuristic_epoch.drop(['confidence', 'variability', 'correctness'], axis=1) df_current_heuristic_epoch['confidence'] = confidence_epoch df_current_heuristic_epoch['variability'] = var_epoch df_current_heuristic_epoch['correctness'] = correctness_epoch fig = plot_heuristics_mix(df_current_heuristic_epoch, os.path.join(args.plots_dir, 'train_plots'), hue_metric=heuristic, title='{}_epoch_{}'.format(heuristic, ep), max_var=max_var) figs.append(convert_fig_to_arr(fig)) if gif: kwargs_write = {'fps': 1.0, 'quantizer': 'nq'} gif_path = os.path.join(args.plots_dir, "train_plots", f'TRAIN_{ep}_epochs.gif') # gif_path = f'{args.plots_dir}/{heuristic}_{ep}_epochs.gif' imageio.mimsave(gif_path, figs, fps=1) logger.info(f"Aminated gif saved to {gif_path}") df_heuristics_mix = mix_heuristics_label_train(df_heuristics) figs = [] # ### DEV ### # for ep in range(total_epochs): # ### DEV ### df_others_sampled = df_others.sample(n=df_heuristics_mix.shape[0] * 2) for ep in range(2,total_epochs): df_heuristic_mix_epoch = df_heuristics_mix.copy() confidence_epoch = np.asarray(df_heuristic_mix_epoch['confidence'].tolist())[:, ep].flatten() var_epoch = np.asarray(df_heuristic_mix_epoch['variability'].tolist())[:, ep].flatten() correctness_epoch = np.asarray(df_heuristic_mix_epoch['correctness'].tolist())[:, ep].flatten() df_heuristic_mix_epoch.drop(['confidence', 'variability', 'correctness'], axis=1) df_heuristic_mix_epoch['confidence'] = confidence_epoch df_heuristic_mix_epoch['variability'] = var_epoch df_heuristic_mix_epoch['correctness'] = correctness_epoch # df_heuristic_mix_epoch = pd.concat([df_others_sampled, df_heuristic_mix_epoch]) fig = plot_heuristics_only(df_heuristic_mix_epoch,os.path.join(args.plots_dir, "train_plots"),title=f'HEURISTICS_ONLY_{ep}', max_var=max_var) figs.append(convert_fig_to_arr(fig)) if gif: kwargs_write = {'fps': 1.0, 'quantizer': 'nq'} gif_path = os.path.join(args.plots_dir, "train_plots", f'TRAIN_{ep}_epochs_ALL.gif') # gif_path = f'{args.plots_dir}/HEURISTICS_ONLY_{ep}_epochs.gif' imageio.mimsave(gif_path, figs, fps=1) logger.info(f"Aminated gif saved to {gif_path}") def plot_eval_epochs(args, id_obj, ood_obj, gif =True): id_dynamics, id_heuristics, id_original_idx, id_pred = id_obj[0], id_obj[1], id_obj[2], id_obj[3] ood_dynamics, ood_heuristics, ood_original_idx, ood_pred = ood_obj[0], ood_obj[1], ood_obj[2], ood_obj[3] total_epochs = len(list(id_dynamics.values())[0]["logits"]) df_id, _ = compute_train_dy_metrics_per_epoch(id_dynamics, id_heuristics, id_original_idx, mode="eval") df_ood, _ = compute_train_dy_metrics_per_epoch(ood_dynamics, ood_heuristics, ood_original_idx, mode="eval") df_ood['ood'] = 1 df_id['ood'] = 0 id_dy_filename = os.path.join(args.model_dir, f"iid_metrics.jsonl") df_id.to_json(id_dy_filename, orient='records', lines=True) ood_dy_filename = os.path.join(args.model_dir, f"ood_metrics.jsonl") df_ood.to_json(ood_dy_filename, orient='records', lines=True) logger.info(f"Metrics based on Eval Dynamics written to {id_dy_filename} and {ood_dy_filename}") df = pd.concat([df_id, df_ood]) max_var = find_max_var(df['variability'].tolist()) df_heuristics = df.loc[(df["lexical"] != 0) | (df["constituent"] != 0) | (df["subsequence"] != 0)] df_ood = df.loc[(df["ood"] != 0)] df_concern = pd.concat([df_heuristics, df_ood]) df_concern = mix_heuristics_label_eval(df_concern) df_others = df.loc[(df["lexical"] == 0) & (df["constituent"] == 0) & (df["subsequence"] == 0) & (df["ood"] == 0)] print(df_others.shape) print(df_ood.shape) df_others_sample = df_others.sample(n= int(np.ceil(df_ood.shape[0])) if df_ood.shape[0] < df_others.shape[0] else df_others.shape[0] ) df = pd.concat([df_concern, df_others_sample]) df = df.fillna("no heuristic") print(df_heuristics.shape[0], df_others_sample.shape[0], df_ood.shape[0]) figs = [] palette=iter(sns.husl_palette(len(np.unique(df["mix_heurstic_label"].tolist()))+1)) # ### DEV ### # for ep in range(total_epochs): # ### DEV ### for ep in range(2, total_epochs): df_heuristic_mix_epoch = df.copy() confidence_epoch = np.asarray(df_heuristic_mix_epoch['confidence'].tolist())[:, ep].flatten() var_epoch = np.asarray(df_heuristic_mix_epoch['variability'].tolist())[:, ep].flatten() correctness_epoch = np.asarray(df_heuristic_mix_epoch['correctness'].tolist())[:, ep].flatten() df_heuristic_mix_epoch.drop(['confidence', 'variability', 'correctness'], axis=1) df_heuristic_mix_epoch['confidence'] = confidence_epoch df_heuristic_mix_epoch['variability'] = var_epoch df_heuristic_mix_epoch['correctness'] = correctness_epoch fig = plot_heuristics_only(df_heuristic_mix_epoch, os.path.join(args.plots_dir, "eval_plots"), title=f'EVAL_{ep}', max_var=max_var, style="ood") figs.append(convert_fig_to_arr(fig)) if gif: kwargs_write = {'fps': 1.0, 'quantizer': 'nq'} gif_path = os.path.join(args.plots_dir, "eval_plots", f'EVAL_{ep}_epochs.gif') imageio.mimsave(gif_path, figs, fps=1) logger.info(f"Aminated gif saved to {gif_path}") def convert_fig_to_arr(fig): fig.canvas.draw() # draw the canvas, cache the renderer image = np.frombuffer(fig.canvas.tostring_rgb(), dtype='uint8') image = image.reshape(fig.canvas.get_width_height()[::-1] + (3,)) return image def compute_train_dy_metrics(training_dynamics, heuristics, original_id, burn_out): confidence_ = {} variability_ = {} threshold_closeness_ = {} correctness_ = {} forgetfulness_ = {} lexical = {} constituent = {} subsequence = {} original_ids = {} # Functions to be applied to the data. variability_func = lambda conf: np.std(conf) threshold_closeness_func = lambda conf: conf * (1 - conf) loss = torch.nn.CrossEntropyLoss() num_tot_epochs = len(list(training_dynamics.values())[0]["logits"]) logger.info(f"Computing training dynamics across {num_tot_epochs} epochs") logger.info("Metrics computed: confidence, variability, correctness, forgetfulness, threshold_closeness") logits = {i: [] for i in range(num_tot_epochs)} targets = {i: [] for i in range(num_tot_epochs)} training_accuracy = defaultdict(float) for guid in tqdm.tqdm(training_dynamics): correctness_trend = [] true_probs_trend = [] record = training_dynamics[guid] for i, epoch_logits in enumerate(record["logits"]): if i >= len(logits.keys()): break probs = torch.nn.functional.softmax(torch.Tensor(epoch_logits), dim=-1) true_class_prob = float(probs[record["gold"]]) true_probs_trend.append(true_class_prob) prediction = np.argmax(epoch_logits) is_correct = (prediction == record["gold"]).item() correctness_trend.append(is_correct) training_accuracy[i] += is_correct logits[i].append(epoch_logits) targets[i].append(record["gold"]) if burn_out < num_tot_epochs: correctness_trend = correctness_trend[:burn_out] true_probs_trend = true_probs_trend[:burn_out] correctness_[guid] = compute_correctness(correctness_trend) confidence_[guid] = np.mean(true_probs_trend) variability_[guid] = variability_func(true_probs_trend) forgetfulness_[guid] = compute_forgetfulness(correctness_trend) threshold_closeness_[guid] = threshold_closeness_func(confidence_[guid]) lexical[guid] = heuristics[guid]["lexical"] constituent[guid] = heuristics[guid]["constituent"] subsequence[guid] = heuristics[guid]["subsequence"] original_ids[guid] = original_id[guid] # Should not affect ranking, so ignoring. epsilon_var = np.mean(list(variability_.values())) column_names = ['guid', 'index', 'threshold_closeness', 'confidence', 'variability', 'correctness', 'forgetfulness', 'lexical', 'constituent', 'subsequence', 'original_id'] df = pd.DataFrame([[guid, i, threshold_closeness_[guid], confidence_[guid], variability_[guid], correctness_[guid], forgetfulness_[guid], lexical[guid], constituent[guid], subsequence[guid], original_ids[guid] ] for i, guid in enumerate(correctness_)], columns=column_names) df_train = pd.DataFrame([[i, loss(torch.Tensor(logits[i]), torch.LongTensor(targets[i])).item() / len( training_dynamics), training_accuracy[i] / len(training_dynamics) ] for i in range(num_tot_epochs)], columns=['epoch', 'loss', 'train_acc']) return df, df_train def plot_heuristics_only( df: pd.DataFrame, plot_dir: os.path, title: str = '', save=True, max_var=0.5, style=None, palette = None): if not os.path.exists(plot_dir): os.makedirs(plot_dir) main_metric = 'variability' other_metric = 'confidence' hue = "mix_heurstic_label" num_hues = len(df[hue].unique().tolist()) fig, ax0 = plt.subplots(1, 1, figsize=(12, 10)) # Choose a palette. pal = sns.diverging_palette(260, 15, n=num_hues, sep=10, center="dark") plot = sns.scatterplot(x=main_metric, y=other_metric, ax=ax0, data=df, hue=hue, # palette=pal, # style=hue, s=30, style=style, marker = 'o' if style is not None else None, # palette="tab10" # palette=['green', 'orange', 'brown', 'dodgerblue', 'red'] palette = palette if palette else "tab10" ) # Annotate Regions. bb = lambda c: dict(boxstyle="round,pad=0.3", ec=c, lw=2, fc="white") func_annotate = lambda text, xyc, bbc: ax0.annotate(text, xy=xyc, xycoords="axes fraction", fontsize=15, color='black', va="center", ha="center", rotation=350, bbox=bb(bbc)) an1 = func_annotate("ambiguous", xyc=(0.9, 0.5), bbc='black') an2 = func_annotate("easy-to-learn", xyc=(0.27, 0.85), bbc='r') an3 = func_annotate("hard-to-learn", xyc=(0.35, 0.25), bbc='b') plot.legend(ncol=1, bbox_to_anchor=[0.175, 0.5], loc='right', fontsize ='small') plot.set_xlabel('variability') plot.set_ylabel('confidence') plot.set_title(title) ax0.set_xlim(0, max_var) ax0.set_ylim(0, 1) fig.tight_layout() filename = f'{plot_dir}/{title}.png' if save: fig.savefig(filename, dpi=300) logger.info(f"Plot saved to {filename}") return fig def plot_heuristics_mix( df: pd.DataFrame, plot_dir: os.path, hue_metric: str = 'lexical', title: str = '', save=True, max_var = 0.5): if not os.path.exists(plot_dir): os.makedirs(plot_dir) # Normalize correctness to a value between 0 and 1. dataframe = df.assign(corr_frac=lambda d: d.correctness / d.correctness.max()) dataframe['correct.'] = [f"{x:.1f}" for x in dataframe['corr_frac']] main_metric = 'variability' other_metric = 'confidence' hue = hue_metric num_hues = len(dataframe[hue].unique().tolist()) style = hue_metric if num_hues < 8 else None fig, ax0 = plt.subplots(1, 1, figsize=(8, 6)) # Make the scatterplot. # Choose a palette. pal = sns.diverging_palette(260, 15, n=num_hues, sep=10, center="dark") plot = sns.scatterplot(x=main_metric, y=other_metric, ax=ax0, data=df, hue=hue, palette=pal, style=style, s=30) # Annotate Regions. bb = lambda c: dict(boxstyle="round,pad=0.3", ec=c, lw=2, fc="white") func_annotate = lambda text, xyc, bbc: ax0.annotate(text, xy=xyc, xycoords="axes fraction", fontsize=15, color='black', va="center", ha="center", rotation=350, bbox=bb(bbc)) an1 = func_annotate("ambiguous", xyc=(0.9, 0.5), bbc='black') an2 = func_annotate("easy-to-learn", xyc=(0.27, 0.85), bbc='r') an3 = func_annotate("hard-to-learn", xyc=(0.35, 0.25), bbc='b') plot.legend(ncol=1, bbox_to_anchor=[0.175, 0.5], loc='right') plot.set_xlabel('variability') plot.set_ylabel('confidence') plot.set_title(title) ax0.set_xlim(0, max_var) ax0.set_ylim(0, 1) fig.tight_layout() filename = f'{plot_dir}/{title}.png' # print('PLOT HIST', filename) if save: fig.savefig(filename, dpi=300) logger.info(f"Plot saved to {filename}") return fig def plot_data_map(dataframe: pd.DataFrame, plot_dir: os.path, hue_metric: str = 'correct.', title: str = '', model: str = 'RoBERTa', show_hist: bool = False, max_instances_to_plot = 55000): # Set style. sns.set(style='whitegrid', font_scale=1.6, font='Georgia', context='paper') logger.info(f"Plotting figure for {title} using the {model} model ...") # Subsample data to plot, so the plot is not too busy. dataframe = dataframe.sample(n=max_instances_to_plot if dataframe.shape[0] > max_instances_to_plot else len(dataframe)) # Normalize correctness to a value between 0 and 1. dataframe = dataframe.assign(corr_frac = lambda d: d.correctness / d.correctness.max()) dataframe['correct.'] = [f"{x:.1f}" for x in dataframe['corr_frac']] main_metric = 'variability' other_metric = 'confidence' hue = hue_metric num_hues = len(dataframe[hue].unique().tolist()) style = hue_metric if num_hues < 8 else None if not show_hist: fig, ax0 = plt.subplots(1, 1, figsize=(8, 6)) else: fig = plt.figure(figsize=(14, 10), ) gs = fig.add_gridspec(3, 2, width_ratios=[5, 1]) ax0 = fig.add_subplot(gs[:, 0]) # Make the scatterplot. # Choose a palette. pal = sns.diverging_palette(260, 15, n=num_hues, sep=10, center="dark") plot = sns.scatterplot(x=main_metric, y=other_metric, ax=ax0, data=dataframe, hue=hue, palette=pal, style=style, s=30) # Annotate Regions. bb = lambda c: dict(boxstyle="round,pad=0.3", ec=c, lw=2, fc="white") func_annotate = lambda text, xyc, bbc : ax0.annotate(text, xy=xyc, xycoords="axes fraction", fontsize=15, color='black', va="center", ha="center", rotation=350, bbox=bb(bbc)) an1 = func_annotate("ambiguous", xyc=(0.9, 0.5), bbc='black') an2 = func_annotate("easy-to-learn", xyc=(0.27, 0.85), bbc='r') an3 = func_annotate("hard-to-learn", xyc=(0.35, 0.25), bbc='b') if not show_hist: plot.legend(ncol=1, bbox_to_anchor=[0.175, 0.5], loc='right') else: plot.legend(fancybox=True, shadow=True, ncol=1) plot.set_xlabel('variability') plot.set_ylabel('confidence') if show_hist: plot.set_title(f"{title}-{model} Data Map", fontsize=17) # Make the histograms. ax1 = fig.add_subplot(gs[0, 1]) ax2 = fig.add_subplot(gs[1, 1]) ax3 = fig.add_subplot(gs[2, 1]) plott0 = dataframe.hist(column=['confidence'], ax=ax1, color='#622a87') plott0[0].set_title('') plott0[0].set_xlabel('confidence') plott0[0].set_ylabel('density') plott1 = dataframe.hist(column=['variability'], ax=ax2, color='teal') plott1[0].set_title('') plott1[0].set_xlabel('variability') plott1[0].set_ylabel('density') plot2 = sns.countplot(x="correct.", data=dataframe, ax=ax3, color='#86bf91') ax3.xaxis.grid(True) # Show the vertical gridlines plot2.set_title('') plot2.set_xlabel('correctness') plot2.set_ylabel('density') fig.tight_layout() filename = f'{plot_dir}/{title}_{model}.pdf' if show_hist else f'figures/compact_{title}_{model}.png' print('PLOT ORIGINAL', filename) fig.savefig(filename, dpi=300) logger.info(f"Plot saved to {filename}") if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("--filter", action="store_true", help="Whether to filter data subsets based on specified `metric`.") parser.add_argument("--plot_train", action="store_true", help="Whether to plot train data maps and save as `png`.") parser.add_argument("--plot_eval", action="store_true", help="Whether to plot eval data maps and save as `png`.") parser.add_argument("--model_dir", "-o", required=True, type=os.path.abspath, help="Directory where model training dynamics stats reside.") parser.add_argument("--data_dir", "-d", default="/Users/swabhas/data/glue/WINOGRANDE/xl/", type=os.path.abspath, help="Directory where data for task resides.") parser.add_argument("--plots_dir", default="./cartography/", type=os.path.abspath, help="Directory where plots are to be saved.") parser.add_argument("--task_name", "-t", default="WINOGRANDE", choices=("SNLI", "MNLI", "QNLI", "WINOGRANDE", "RTE", "WNLI"), help="Which task are we plotting or filtering for.") parser.add_argument('--metric', choices=('threshold_closeness', 'confidence', 'variability', 'correctness', 'forgetfulness'), help="Metric to filter data by.",) parser.add_argument("--include_ci", action="store_true", help="Compute the confidence interval for variability.") parser.add_argument("--filtering_output_dir", "-f", default="./filtered/", type=os.path.abspath, help="Output directory where filtered datasets are to be written.") parser.add_argument("--worst", action="store_true", help="Select from the opposite end of the spectrum acc. to metric," "for baselines") parser.add_argument("--both_ends", action="store_true", help="Select from both ends of the spectrum acc. to metric,") parser.add_argument("--burn_out", type=int, default=100, help="# Epochs for which to compute train dynamics.") parser.add_argument("--model", default="RoBERTa", help="Model for which data map is being plotted") parser.add_argument("--plot_gif", action="store_true", help="Whether to plot gif or not") args = parser.parse_args() # if args.plot_gif: # assert len(os.listdir(args.plots_dir)) > 0 # plot_gif(args.plots_dir) # exit() # total_epochs = len(list(training_dynamics.values())[0]["logits"]) # if args.burn_out > total_epochs: # args.burn_out = total_epochs # logger.info(f"Total epochs found: {args.burn_out}") # train_dy_metrics, _ = compute_train_dy_metrics(training_dynamics, heuristics, original_id, args.burn_out) # # burn_out_str = f"_{args.burn_out}" if args.burn_out > total_epochs else "" # train_dy_filename = os.path.join(args.model_dir, f"td_metrics{burn_out_str}.jsonl") # train_dy_metrics.to_json(train_dy_filename, # orient='records', # lines=True) # logger.info(f"Metrics based on Training Dynamics written to {train_dy_filename}") # if args.filter: # assert args.filtering_output_dir # if not os.path.exists(args.filtering_output_dir): # os.makedirs(args.filtering_output_dir) # assert args.metric # write_filtered_data(args, train_dy_metrics) assert args.plots_dir args.plots_dir = os.path.join(args.model_dir, "plots") if not os.path.exists(args.plots_dir): os.makedirs(args.plots_dir) if args.plot_train: # plot_data_map(train_dy_metrics, args.plots_dir, title=args.task_name, show_hist=True, model=args.model) # plot_heuristics_mix(args, train_dy_metrics, args.plots_dir, title=args.task_name) # plot_heuristics_only(args, train_dy_metrics, args.plots_dir, title=args.task_name) # get_ambiguous_heuristics_samples(train_dy_metrics, args.model_dir) # get_top_n_heuristics_samples(train_dy_metrics, args.model_dir) training_dynamics, heuristics, original_id, pred_labels = read_dynamics(args.model_dir, strip_last=True if args.task_name in [ "QNLI"] else False, burn_out=args.burn_out if args.burn_out < 100 else None) df_train, _ = compute_train_dy_metrics_per_epoch(training_dynamics, heuristics, original_id, mode="eval") # plot_train_epochs(args, training_dynamics, heuristics, original_id, gif=True) get_sorted_samples(df_train, args.model_dir, pd.read_csv('/home/jusun/adila001/RTE/train_heuristic.tsv', sep='\t|\n'), decoded_label=["entailment", "not_entailment"], columns_order=['index', 'sentence1', 'sentence2', 'variability', 'confidence', 'var_ep', 'conf_ep', 'lexical', 'subsequence', 'gold_label', 'pred_label']) # get_top_n_heuristics_samples(df_train, args.model_dir, # pd.read_csv('/home/jusun/adila001/RTE/train_heuristic.tsv', # sep='\t|\n'), # columns_order=['sentence1', 'sentence2', 'variability', # 'confidence', 'var_ep', 'conf_ep', 'lexical', # 'subsequence', # 'gold_label', 'pred_label'], # decoded_label=["entailment", "not_entailment"], # top_heuristic_obj={'lexical': 10}) if args.plot_eval: # get_ambiguous_heuristics_samples(train_dy_metrics, args.model_dir) eval_ID_dynamics, heuristics_ID, original_id_ID, pred_labels_ID = read_dynamics(args.model_dir, strip_last=True if args.task_name in [ "QNLI"] else False, burn_out=args.burn_out if args.burn_out < 100 else None, mode="eval_ID") eval_OOD_dynamics, heuristics_OOD, original_id_OOD, pred_labels_OOD = read_dynamics(args.model_dir, strip_last=True if args.task_name in [ "QNLI"] else False, burn_out=args.burn_out if args.burn_out < 100 else None, mode="eval_OOD") df_id, _ = compute_train_dy_metrics_per_epoch(eval_ID_dynamics, heuristics_ID, original_id_ID, mode="in_dist") df_ood, _ = compute_train_dy_metrics_per_epoch(eval_OOD_dynamics, heuristics_OOD, original_id_OOD, mode="ood") # get_top_n_heuristics_samples(df_id, args.model_dir, # pd.read_csv('/home/jusun/adila001/MNLI/dev_matched_heuristic.tsv', sep='\t|\n'), # # decoded_label=["entailment", "not_entailment"], # columns_order=['sentence1', 'sentence2', 'variability', # 'confidence', 'var_ep', 'conf_ep', 'lexical', 'constituent', # 'subsequence', # 'gold_label', 'pred_label'], # top_heuristic_obj={'lexical': 30}) # # df_ood['ood'] = 1 # get_top_n_heuristics_samples(df_ood, args.model_dir, # pd.read_csv('/home/jusun/adila001/WNLI/train_heuristic.tsv', sep='\t|\n'), # decoded_label=["not_entailment", "entailment"], # columns_order=['sentence1', 'sentence2', 'variability', # 'confidence', 'var_ep', 'conf_ep', 'lexical', 'subsequence', # 'gold_label', 'pred_label'], # top_heuristic_obj={'lexical':30}) get_sorted_samples(df_id, args.model_dir, pd.read_csv('/home/jusun/adila001/RTE/dev_heuristic.tsv', sep='\t|\n'), decoded_label=["entailment", "not_entailment"], columns_order=['index', 'sentence1', 'sentence2', 'variability', 'confidence', 'var_ep', 'conf_ep', 'lexical', 'subsequence', 'gold_label', 'pred_label'], mode='in_dist') df_ood['ood'] = 1 get_sorted_samples(df_ood, args.model_dir, pd.read_csv('/home/jusun/adila001/WNLI/train_heuristic.tsv', sep='\t|\n'), decoded_label=["not_entailment", "entailment"], columns_order=['index', 'sentence1', 'sentence2', 'variability', 'confidence', 'var_ep', 'conf_ep', 'lexical', 'subsequence', 'gold_label', 'pred_label'], mode='ood') # print(id_conf) # print(ood_conf) plot_eval_epochs(args, [eval_ID_dynamics, heuristics_ID, original_id_ID, pred_labels_ID], [eval_OOD_dynamics, heuristics_OOD, original_id_OOD, pred_labels_OOD], gif=True)
[ 1, 9995, 13, 5072, 292, 322, 8783, 10417, 3519, 2729, 373, 6694, 19753, 29889, 13, 2059, 2322, 29892, 445, 3883, 13623, 6694, 19753, 515, 263, 2183, 16370, 1904, 322, 13, 12097, 267, 278, 21556, 5634, 5527, 5084, 29892, 1197, 3097, 29892, 1959, 2264, 29892, 13, 294, 1532, 408, 2362, 5570, 21556, 310, 9566, 1319, 2264, 322, 16897, 4694, 18543, 13, 1454, 1269, 2777, 297, 278, 6694, 848, 29889, 13, 3644, 6790, 29892, 848, 11053, 508, 367, 715, 15048, 411, 3390, 304, 16420, 322, 1197, 3097, 29889, 13, 20761, 957, 29892, 20035, 508, 367, 22289, 411, 3390, 738, 310, 278, 916, 21556, 29889, 13, 15945, 29908, 13, 5215, 1852, 5510, 13, 5215, 4390, 13, 5215, 12183, 13, 5215, 22889, 29889, 2272, 5317, 408, 14770, 13, 5215, 12655, 408, 7442, 13, 5215, 2897, 13, 5215, 11701, 408, 10518, 13, 5215, 409, 370, 1398, 408, 269, 1983, 13, 5215, 4842, 305, 13, 5215, 260, 29939, 18933, 13, 5215, 1967, 601, 13, 13, 3166, 16250, 1053, 2322, 8977, 13, 3166, 19229, 1053, 2391, 13, 13, 3166, 7774, 5275, 29889, 1272, 29918, 13239, 1053, 1303, 29918, 1272, 29892, 1303, 29918, 3126, 29880, 29892, 3509, 29918, 3359, 29918, 1688, 13, 3166, 7774, 5275, 29889, 21731, 29889, 21731, 29918, 13239, 1053, 1303, 29918, 29881, 2926, 1199, 13, 13, 29937, 14402, 29898, 1799, 1125, 405, 2795, 18761, 363, 9595, 322, 21166, 3519, 29889, 13, 13, 21027, 29889, 16121, 3991, 29898, 13, 29871, 3402, 543, 29995, 29898, 294, 312, 603, 29897, 29879, 448, 1273, 29898, 5563, 978, 29897, 29879, 448, 1273, 29898, 978, 29897, 29879, 448, 1273, 29898, 4906, 29897, 29879, 613, 3233, 29922, 21027, 29889, 11690, 13, 29897, 13, 21707, 353, 12183, 29889, 657, 16363, 22168, 978, 1649, 29897, 13, 13, 13, 1753, 10272, 29918, 1454, 657, 1319, 2264, 29898, 15728, 2264, 29918, 509, 355, 29901, 2391, 29961, 7411, 2314, 1599, 938, 29901, 13, 29871, 9995, 13, 29871, 11221, 263, 21502, 305, 29899, 3538, 534, 355, 310, 7945, 27303, 29892, 10272, 10868, 411, 607, 13, 29871, 385, 1342, 338, 20898, 29892, 474, 29889, 29872, 29889, 25383, 29676, 903, 7045, 29918, 1641, 25383, 5149, 29889, 13, 29871, 16564, 373, 29901, 2045, 597, 279, 26560, 29889, 990, 29914, 6897, 29914, 29896, 29947, 29896, 29906, 29889, 29900, 29945, 29896, 29945, 29929, 13, 29871, 9995, 13, 29871, 565, 451, 738, 29898, 15728, 2264, 29918, 509, 355, 1125, 29871, 396, 8741, 338, 2360, 25383, 5149, 29892, 470, 24298, 593, 29991, 13, 418, 736, 29871, 29896, 29900, 29900, 29900, 13, 29871, 24298, 593, 353, 7700, 29871, 396, 21099, 18186, 5149, 297, 278, 1857, 21502, 305, 29889, 13, 29871, 3064, 29918, 29888, 990, 327, 841, 353, 29871, 29900, 13, 29871, 363, 338, 29918, 15728, 297, 1959, 2264, 29918, 509, 355, 29901, 13, 1678, 565, 313, 1333, 24298, 593, 322, 451, 338, 29918, 15728, 29897, 470, 313, 1945, 593, 322, 338, 29918, 15728, 1125, 13, 418, 396, 3078, 3939, 29889, 13, 418, 6773, 13, 1678, 25342, 24298, 593, 322, 451, 338, 29918, 15728, 29901, 13, 418, 396, 383, 990, 327, 1156, 6509, 472, 777, 1298, 29991, 13, 418, 24298, 593, 353, 7700, 13, 418, 3064, 29918, 29888, 990, 327, 841, 4619, 29871, 29896, 13, 1678, 25342, 451, 24298, 593, 322, 338, 29918, 15728, 29901, 13, 418, 396, 19530, 593, 29991, 13, 418, 24298, 593, 353, 5852, 13, 29871, 736, 3064, 29918, 29888, 990, 327, 841, 13, 13, 13, 1753, 10272, 29918, 15728, 2264, 29898, 509, 355, 29901, 2391, 29961, 7411, 2314, 1599, 5785, 29901, 13, 29871, 9995, 13, 29871, 319, 26127, 403, 396, 3706, 385, 1342, 338, 25383, 5149, 2645, 599, 6694, 21502, 12168, 29889, 13, 29871, 9995, 13, 29871, 736, 2533, 29898, 509, 355, 29897, 13, 13, 13, 1753, 10272, 29918, 14968, 29918, 4518, 29918, 2527, 10817, 29918, 546, 29918, 1022, 2878, 29898, 26495, 29918, 29881, 2926, 1199, 29892, 540, 332, 6765, 29892, 2441, 29918, 333, 29892, 4464, 543, 14968, 29908, 1125, 13, 29871, 9995, 13, 29871, 11221, 278, 6694, 19753, 313, 1188, 1169, 363, 1269, 6694, 2777, 4822, 21502, 12168, 511, 10272, 21556, 13, 29871, 2729, 373, 372, 29892, 363, 848, 2910, 1302, 272, 397, 262, 1078, 29889, 13, 29871, 11796, 287, 21556, 526, 29901, 16420, 29892, 1197, 3097, 29892, 1959, 2264, 29892, 9566, 1319, 2264, 29892, 16897, 29918, 695, 7749, 404, 5634, 13, 29871, 278, 1833, 1023, 1641, 2362, 24210, 515, 7536, 664, 13, 29871, 313, 14023, 1152, 29264, 29901, 2045, 597, 279, 26560, 29889, 990, 29914, 6897, 29914, 29896, 29947, 29896, 29906, 29889, 29900, 29945, 29896, 29945, 29929, 322, 13, 259, 10731, 350, 3173, 29901, 2045, 597, 279, 26560, 29889, 990, 29914, 6897, 29914, 29896, 29955, 29900, 29946, 29889, 29900, 29955, 29946, 29941, 29941, 8307, 467, 13, 29871, 16969, 29901, 13, 29871, 448, 3630, 4308, 411, 1438, 21556, 29889, 13, 29871, 448, 3630, 4308, 411, 901, 15662, 6694, 17983, 21556, 29892, 1316, 408, 13600, 847, 6410, 29889, 13, 29871, 9995, 13, 29871, 16420, 29918, 353, 6571, 13, 29871, 1197, 3097, 29918, 353, 6571, 13, 29871, 16897, 29918, 695, 7749, 404, 29918, 353, 6571, 13, 29871, 1959, 2264, 29918, 353, 6571, 13, 29871, 9566, 1319, 2264, 29918, 353, 6571, 13, 29871, 19566, 936, 353, 6571, 13, 29871, 10719, 296, 353, 6571, 13, 29871, 1014, 16506, 29922, 6571, 13, 29871, 2441, 29918, 4841, 353, 6571, 13, 29871, 288, 397, 3790, 29913, 13, 29871, 25383, 29918, 21134, 353, 6571, 13, 29871, 330, 3361, 29918, 21134, 353, 6571, 13, 13, 29871, 396, 6680, 29879, 304, 367, 7436, 304, 278, 848, 29889, 13, 29871, 1197, 3097, 29918, 9891, 353, 14013, 1970, 29901, 7442, 29889, 4172, 29898, 5527, 29897, 13, 29871, 396, 565, 3160, 29918, 455, 29901, 29871, 396, 16564, 373, 7536, 664, 373, 6136, 24003, 313, 991, 597, 279, 26560, 29889, 990, 29914, 6897, 29914, 29896, 29955, 29900, 29946, 29889, 29900, 29955, 29946, 29941, 29941, 29897, 13, 29871, 396, 259, 1197, 3097, 29918, 9891, 353, 14013, 1970, 29901, 7442, 29889, 3676, 29898, 9302, 29889, 1707, 29898, 5527, 29897, 718, 7442, 29889, 1707, 29898, 5527, 29897, 334, 7442, 29889, 1707, 29898, 5527, 29897, 847, 313, 2435, 29898, 5527, 6817, 29896, 876, 13, 29871, 16897, 29918, 695, 7749, 404, 29918, 9891, 353, 14013, 1970, 29901, 1970, 334, 313, 29896, 448, 1970, 29897, 13, 13, 29871, 6410, 353, 4842, 305, 29889, 15755, 29889, 29907, 2124, 5292, 14441, 29931, 2209, 580, 13, 29871, 954, 29918, 4260, 29918, 1022, 2878, 29879, 353, 7431, 29898, 1761, 29898, 26495, 29918, 29881, 2926, 1199, 29889, 5975, 3101, 29961, 29900, 29962, 3366, 1188, 1169, 20068, 13, 29871, 396, 565, 12138, 29918, 449, 529, 954, 29918, 4260, 29918, 1022, 2878, 29879, 29901, 13, 29871, 396, 259, 17927, 29889, 3888, 29898, 29888, 29908, 20606, 292, 6694, 19753, 29889, 16640, 292, 714, 472, 426, 18712, 29918, 449, 29913, 310, 426, 1949, 29918, 4260, 29918, 1022, 2878, 29879, 1836, 16521, 13, 29871, 396, 1683, 29901, 13, 29871, 17927, 29889, 3888, 29898, 29888, 29908, 20606, 292, 6694, 19753, 4822, 426, 1949, 29918, 4260, 29918, 1022, 2878, 29879, 29913, 21502, 12168, 1159, 13, 29871, 17927, 29889, 3888, 703, 10095, 10817, 15712, 29901, 16420, 29892, 1197, 3097, 29892, 1959, 2264, 29892, 9566, 1319, 2264, 29892, 16897, 29918, 695, 7749, 404, 1159, 13, 13, 29871, 1480, 1169, 353, 426, 29875, 29901, 5159, 363, 474, 297, 3464, 29898, 1949, 29918, 4260, 29918, 1022, 2878, 29879, 2915, 13, 29871, 22525, 353, 426, 29875, 29901, 5159, 363, 474, 297, 3464, 29898, 1949, 29918, 4260, 29918, 1022, 2878, 29879, 2915, 13, 29871, 6694, 29918, 562, 2764, 4135, 353, 2322, 8977, 29898, 7411, 29897, 13, 13, 29871, 363, 16605, 297, 260, 29939, 18933, 29889, 29873, 29939, 18933, 29898, 26495, 29918, 29881, 2926, 1199, 1125, 13, 13, 1678, 1959, 2264, 29918, 509, 355, 353, 5159, 13, 1678, 1565, 29918, 771, 5824, 29918, 509, 355, 353, 5159, 13, 1678, 1959, 2264, 29918, 1022, 353, 5159, 13, 1678, 16420, 29918, 1022, 353, 5159, 13, 1678, 1197, 3097, 29918, 1022, 353, 5159, 13, 1678, 18988, 29918, 1022, 353, 5159, 13, 1678, 2407, 353, 6694, 29918, 29881, 2926, 1199, 29961, 2543, 333, 29962, 13, 13, 1678, 363, 474, 29892, 21502, 305, 29918, 1188, 1169, 297, 26985, 29898, 11651, 3366, 1188, 1169, 3108, 1125, 13, 418, 565, 474, 6736, 7431, 29898, 1188, 1169, 29889, 8149, 580, 1125, 13, 3986, 2867, 13, 418, 2070, 29879, 353, 4842, 305, 29889, 15755, 29889, 2220, 284, 29889, 2695, 3317, 29898, 7345, 305, 29889, 29911, 6073, 29898, 1022, 2878, 29918, 1188, 1169, 511, 3964, 10457, 29896, 29897, 13, 418, 1565, 29918, 1990, 29918, 22795, 353, 5785, 29898, 771, 5824, 29961, 11651, 3366, 29887, 1025, 3108, 2314, 13, 418, 1565, 29918, 771, 5824, 29918, 509, 355, 29889, 4397, 29898, 3009, 29918, 1990, 29918, 22795, 29897, 13, 13, 418, 18988, 353, 7442, 29889, 1191, 3317, 29898, 1022, 2878, 29918, 1188, 1169, 29897, 13, 418, 338, 29918, 15728, 353, 313, 11965, 2463, 1275, 2407, 3366, 29887, 1025, 3108, 467, 667, 580, 13, 418, 1959, 2264, 29918, 509, 355, 29889, 4397, 29898, 275, 29918, 15728, 29897, 13, 13, 418, 6694, 29918, 562, 2764, 4135, 29961, 29875, 29962, 4619, 338, 29918, 15728, 13, 418, 1480, 1169, 29961, 29875, 1822, 4397, 29898, 1022, 2878, 29918, 1188, 1169, 29897, 13, 418, 22525, 29961, 29875, 1822, 4397, 29898, 11651, 3366, 29887, 1025, 20068, 13, 13, 418, 1959, 2264, 29918, 1022, 29889, 4397, 29898, 26017, 29918, 15728, 2264, 29898, 15728, 2264, 29918, 509, 355, 876, 13, 418, 16420, 29918, 1022, 29889, 4397, 29898, 9302, 29889, 12676, 29898, 3009, 29918, 771, 5824, 29918, 509, 355, 876, 13, 418, 1197, 3097, 29918, 1022, 29889, 4397, 29898, 5927, 3097, 29918, 9891, 29898, 3009, 29918, 771, 5824, 29918, 509, 355, 876, 13, 418, 18988, 29918, 1022, 29889, 4397, 29898, 11965, 2463, 29889, 667, 3101, 13, 1678, 1959, 2264, 29918, 29961, 2543, 333, 29962, 353, 1959, 2264, 29918, 1022, 13, 1678, 16420, 29918, 29961, 2543, 333, 29962, 353, 16420, 29918, 1022, 13, 1678, 1197, 3097, 29918, 29961, 2543, 333, 29962, 353, 1197, 3097, 29918, 1022, 13, 1678, 396, 565, 12138, 29918, 449, 529, 954, 29918, 4260, 29918, 1022, 2878, 29879, 29901, 13, 1678, 396, 259, 1959, 2264, 29918, 509, 355, 353, 1959, 2264, 29918, 509, 355, 7503, 18712, 29918, 449, 29962, 13, 1678, 396, 259, 1565, 29918, 771, 5824, 29918, 509, 355, 353, 1565, 29918, 771, 5824, 29918, 509, 355, 7503, 18712, 29918, 449, 29962, 13, 13, 1678, 396, 1959, 2264, 29918, 29961, 2543, 333, 29962, 353, 10272, 29918, 15728, 2264, 29898, 15728, 2264, 29918, 509, 355, 29897, 13, 1678, 396, 16420, 29918, 29961, 2543, 333, 29962, 353, 7442, 29889, 12676, 29898, 3009, 29918, 771, 5824, 29918, 509, 355, 29897, 13, 1678, 396, 1197, 3097, 29918, 29961, 2543, 333, 29962, 353, 1197, 3097, 29918, 9891, 29898, 3009, 29918, 771, 5824, 29918, 509, 355, 29897, 13, 13, 1678, 396, 9566, 1319, 2264, 29918, 29961, 2543, 333, 29962, 353, 10272, 29918, 1454, 657, 1319, 2264, 29898, 15728, 2264, 29918, 509, 355, 29897, 13, 1678, 396, 16897, 29918, 695, 7749, 404, 29918, 29961, 2543, 333, 29962, 353, 16897, 29918, 695, 7749, 404, 29918, 9891, 29898, 5527, 5084, 29918, 29961, 2543, 333, 2314, 13, 1678, 19566, 936, 29961, 2543, 333, 29962, 353, 540, 332, 6765, 29961, 2543, 333, 29962, 3366, 2506, 936, 3108, 13, 1678, 10719, 296, 29961, 2543, 333, 29962, 353, 540, 332, 6765, 29961, 2543, 333, 29962, 3366, 3075, 1981, 296, 3108, 13, 1678, 1014, 16506, 29961, 2543, 333, 29962, 353, 540, 332, 6765, 29961, 2543, 333, 29962, 3366, 1491, 16506, 3108, 13, 1678, 288, 397, 29961, 2543, 333, 29962, 353, 540, 332, 6765, 29961, 2543, 333, 29962, 3366, 2092, 3108, 13, 1678, 2441, 29918, 4841, 29961, 2543, 333, 29962, 353, 2441, 29918, 333, 29961, 2543, 333, 29962, 13, 1678, 25383, 29918, 21134, 29961, 2543, 333, 29962, 353, 18988, 29918, 1022, 13, 13, 29871, 396, 10575, 451, 6602, 24034, 29892, 577, 5330, 8253, 29889, 13, 29871, 321, 3232, 29918, 1707, 353, 7442, 29889, 12676, 29898, 1761, 29898, 5927, 3097, 5396, 5975, 22130, 13, 13, 29871, 1897, 29918, 7039, 353, 6024, 2543, 333, 742, 13, 462, 29871, 525, 2248, 742, 13, 462, 29871, 396, 525, 386, 12268, 29918, 695, 7749, 404, 742, 13, 462, 29871, 525, 5527, 5084, 742, 13, 462, 29871, 525, 5927, 3097, 742, 13, 462, 29871, 525, 15728, 2264, 742, 13, 462, 29871, 396, 525, 1454, 657, 1319, 2264, 742, 13, 462, 29871, 525, 11965, 29918, 1643, 742, 13, 462, 29871, 525, 2506, 936, 742, 525, 3075, 1981, 296, 742, 525, 1491, 16506, 742, 525, 13492, 29918, 333, 2033, 13, 29871, 565, 4464, 2804, 376, 14968, 1115, 13, 418, 1897, 29918, 7039, 29889, 7851, 6278, 29896, 29892, 376, 2092, 1159, 13, 418, 4489, 353, 10518, 29889, 17271, 4197, 29961, 2543, 333, 29892, 13, 462, 3986, 474, 29892, 13, 462, 3986, 396, 16897, 29918, 695, 7749, 404, 29918, 29961, 2543, 333, 1402, 13, 462, 3986, 16420, 29918, 29961, 2543, 333, 1402, 13, 462, 3986, 1197, 3097, 29918, 29961, 2543, 333, 1402, 13, 462, 3986, 1959, 2264, 29918, 29961, 2543, 333, 1402, 13, 462, 3986, 25383, 29918, 21134, 29961, 2543, 333, 1402, 13, 462, 3986, 396, 9566, 1319, 2264, 29918, 29961, 2543, 333, 1402, 13, 462, 3986, 19566, 936, 29961, 2543, 333, 1402, 13, 462, 3986, 10719, 296, 29961, 2543, 333, 1402, 13, 462, 3986, 1014, 16506, 29961, 2543, 333, 1402, 13, 462, 3986, 288, 397, 29961, 2543, 333, 1402, 13, 462, 3986, 2441, 29918, 4841, 29961, 2543, 333, 29962, 13, 462, 3986, 4514, 363, 474, 29892, 16605, 297, 26985, 29898, 15728, 2264, 19925, 1402, 4341, 29922, 4914, 29918, 7039, 29897, 13, 418, 4489, 29918, 14968, 353, 10518, 29889, 17271, 4197, 29961, 29875, 29892, 13, 462, 18884, 6410, 29898, 7345, 305, 29889, 29911, 6073, 29898, 1188, 1169, 29961, 29875, 11724, 4842, 305, 29889, 8208, 29911, 6073, 29898, 5182, 29879, 29961, 29875, 2314, 467, 667, 580, 847, 7431, 29898, 13, 462, 462, 1678, 6694, 29918, 29881, 2926, 1199, 511, 13, 462, 18884, 6694, 29918, 562, 2764, 4135, 29961, 29875, 29962, 847, 7431, 29898, 26495, 29918, 29881, 2926, 1199, 29897, 13, 462, 18884, 4514, 363, 474, 297, 3464, 29898, 1949, 29918, 4260, 29918, 1022, 2878, 29879, 29897, 1402, 13, 462, 795, 4341, 29922, 1839, 1022, 2878, 742, 525, 6758, 742, 525, 14968, 29918, 5753, 11287, 13, 29871, 1683, 29901, 13, 418, 4489, 353, 10518, 29889, 17271, 4197, 29961, 2543, 333, 29892, 13, 462, 3986, 474, 29892, 13, 462, 3986, 396, 16897, 29918, 695, 7749, 404, 29918, 29961, 2543, 333, 1402, 13, 462, 3986, 16420, 29918, 29961, 2543, 333, 1402, 13, 462, 3986, 1197, 3097, 29918, 29961, 2543, 333, 1402, 13, 462, 3986, 1959, 2264, 29918, 29961, 2543, 333, 1402, 13, 462, 3986, 25383, 29918, 21134, 29961, 2543, 333, 1402, 13, 462, 3986, 396, 9566, 1319, 2264, 29918, 29961, 2543, 333, 1402, 13, 462, 3986, 19566, 936, 29961, 2543, 333, 1402, 13, 462, 3986, 10719, 296, 29961, 2543, 333, 1402, 13, 462, 3986, 1014, 16506, 29961, 2543, 333, 1402, 13, 462, 3986, 2441, 29918, 4841, 29961, 2543, 333, 29962, 13, 462, 3986, 4514, 363, 474, 29892, 16605, 297, 26985, 29898, 15728, 2264, 19925, 1402, 4341, 29922, 4914, 29918, 7039, 29897, 13, 418, 4489, 29918, 14968, 353, 10518, 29889, 17271, 4197, 29961, 29875, 29892, 6758, 29898, 7345, 305, 29889, 29911, 6073, 29898, 1188, 1169, 29961, 29875, 11724, 4842, 305, 29889, 8208, 29911, 6073, 29898, 5182, 29879, 29961, 29875, 2314, 467, 667, 580, 847, 7431, 29898, 26495, 29918, 29881, 2926, 1199, 511, 26495, 29918, 562, 2764, 4135, 29961, 29875, 29962, 847, 7431, 29898, 26495, 29918, 29881, 2926, 1199, 4638, 363, 474, 297, 3464, 29898, 1949, 29918, 4260, 29918, 1022, 2878, 29879, 29897, 1402, 4341, 29922, 1839, 1022, 2878, 742, 525, 6758, 742, 525, 14968, 29918, 5753, 11287, 13, 29871, 4489, 29889, 517, 29918, 7638, 29898, 29888, 29908, 9818, 29918, 8132, 3580, 17101, 648, 8513, 1836, 7638, 1159, 13, 29871, 736, 4489, 29892, 4489, 29918, 14968, 13, 13, 13, 1753, 2050, 29918, 6151, 2548, 29918, 2098, 29898, 4572, 292, 29918, 16414, 29901, 851, 29897, 1599, 6120, 29901, 13, 29871, 9995, 13, 29871, 5953, 837, 457, 565, 278, 12714, 1819, 29915, 16548, 1797, 304, 679, 278, 1556, 421, 4387, 519, 29952, 6455, 363, 6694, 29889, 13, 29871, 9995, 13, 29871, 565, 21166, 29918, 16414, 1275, 376, 5927, 3097, 1115, 13, 1678, 736, 7700, 13, 29871, 25342, 21166, 29918, 16414, 1275, 376, 5527, 5084, 1115, 13, 1678, 736, 5852, 13, 29871, 25342, 21166, 29918, 16414, 1275, 376, 386, 12268, 29918, 695, 7749, 404, 1115, 13, 1678, 736, 7700, 13, 29871, 25342, 21166, 29918, 16414, 1275, 376, 1454, 657, 1319, 2264, 1115, 13, 1678, 736, 7700, 13, 29871, 25342, 21166, 29918, 16414, 1275, 376, 15728, 2264, 1115, 13, 1678, 736, 5852, 13, 29871, 1683, 29901, 13, 1678, 12020, 2216, 1888, 2037, 287, 2392, 29898, 29888, 29908, 5072, 292, 2729, 373, 426, 4572, 292, 29918, 16414, 29913, 451, 8762, 29991, 1159, 13, 13, 13, 1753, 2436, 29918, 4572, 287, 29918, 1272, 29898, 5085, 29892, 7945, 29918, 4518, 29918, 2527, 10817, 1125, 13, 29871, 9995, 13, 29871, 19916, 848, 2729, 373, 278, 2183, 12714, 29892, 322, 2436, 372, 297, 323, 7597, 3402, 304, 7945, 12729, 4462, 29899, 3293, 770, 3709, 29889, 13, 29871, 9995, 13, 29871, 396, 3824, 4078, 278, 6389, 363, 21166, 29892, 304, 3013, 5702, 310, 607, 1904, 471, 1304, 363, 21166, 29889, 13, 29871, 1852, 5510, 29918, 8977, 353, 24987, 29898, 5085, 29897, 13, 29871, 411, 1722, 29898, 359, 29889, 2084, 29889, 7122, 29898, 5085, 29889, 4572, 292, 29918, 4905, 29918, 3972, 29892, 285, 29908, 4572, 292, 29918, 2917, 29879, 29889, 3126, 4968, 376, 29893, 1159, 408, 714, 1445, 29901, 13, 1678, 714, 1445, 29889, 3539, 29898, 3126, 29889, 29881, 17204, 29898, 1191, 5510, 29918, 8977, 29892, 29536, 29922, 29946, 29892, 2656, 29918, 8149, 29922, 5574, 29897, 718, 6634, 29876, 1159, 13, 13, 29871, 396, 5953, 837, 457, 3692, 304, 2656, 848, 297, 12066, 2548, 1797, 470, 451, 29892, 2729, 373, 278, 12714, 29889, 13, 29871, 338, 29918, 6151, 2548, 353, 2050, 29918, 6151, 2548, 29918, 2098, 29898, 5085, 29889, 16414, 29897, 13, 29871, 565, 6389, 29889, 13762, 303, 29901, 13, 1678, 338, 29918, 6151, 2548, 353, 451, 338, 29918, 6151, 2548, 13, 13, 29871, 396, 20025, 491, 9262, 29889, 13, 29871, 12705, 29918, 1557, 2361, 353, 7945, 29918, 4518, 29918, 2527, 10817, 29889, 6605, 29918, 5975, 29898, 1609, 11759, 5085, 29889, 16414, 1402, 13, 462, 462, 1669, 12066, 2548, 29922, 275, 29918, 6151, 2548, 29897, 13, 13, 29871, 2441, 29918, 14968, 29918, 1445, 353, 2897, 29889, 2084, 29889, 7122, 29898, 359, 29889, 2084, 29889, 7122, 29898, 5085, 29889, 1272, 29918, 3972, 29892, 6389, 29889, 7662, 29918, 978, 511, 285, 29908, 14968, 29889, 1372, 29894, 1159, 13, 29871, 7945, 29918, 21574, 29892, 4839, 353, 1303, 29918, 1272, 29898, 13492, 29918, 14968, 29918, 1445, 29892, 3414, 29918, 978, 29922, 5085, 29889, 7662, 29918, 978, 29892, 16605, 29918, 294, 29918, 524, 29922, 5574, 29897, 13, 13, 29871, 363, 15958, 297, 518, 29900, 29889, 29900, 29896, 29892, 29871, 29900, 29889, 29900, 29945, 29892, 29871, 29900, 29889, 29896, 29900, 29892, 29871, 29900, 29889, 29896, 29953, 29953, 29955, 29892, 29871, 29900, 29889, 29906, 29945, 29892, 29871, 29900, 29889, 29941, 29941, 29896, 29929, 29892, 29871, 29900, 29889, 29945, 29900, 29892, 29871, 29900, 29889, 29955, 29945, 5387, 13, 1678, 714, 3972, 353, 2897, 29889, 2084, 29889, 7122, 29898, 5085, 29889, 4572, 292, 29918, 4905, 29918, 3972, 29892, 13, 462, 3986, 285, 29908, 13823, 5275, 648, 5085, 29889, 16414, 3227, 29888, 13857, 29901, 29889, 29906, 29888, 6822, 29912, 5085, 29889, 7662, 29918, 978, 27195, 13, 1678, 565, 451, 2897, 29889, 2084, 29889, 9933, 29898, 449, 3972, 1125, 13, 418, 2897, 29889, 29885, 12535, 12935, 29898, 449, 3972, 29897, 13, 13, 1678, 396, 9481, 322, 1243, 817, 451, 367, 1014, 11249, 29881, 29889, 13, 1678, 3509, 29918, 3359, 29918, 1688, 29898, 5085, 29889, 7662, 29918, 978, 29892, 13, 462, 29871, 515, 29918, 3972, 29922, 359, 29889, 2084, 29889, 7122, 29898, 5085, 29889, 1272, 29918, 3972, 29892, 6389, 29889, 7662, 29918, 978, 511, 13, 462, 29871, 304, 29918, 3972, 29922, 449, 3972, 29897, 13, 13, 1678, 954, 29918, 27736, 353, 938, 29898, 29888, 13857, 334, 7431, 29898, 14968, 29918, 21574, 876, 13, 1678, 411, 1722, 29898, 359, 29889, 2084, 29889, 7122, 29898, 449, 3972, 29892, 285, 29908, 14968, 29889, 1372, 29894, 4968, 376, 29893, 1159, 408, 714, 1445, 29901, 13, 418, 714, 1445, 29889, 3539, 29898, 6672, 718, 6634, 29876, 1159, 13, 418, 4629, 353, 12705, 29918, 1557, 2361, 29889, 2813, 29898, 29876, 29922, 1949, 29918, 27736, 29974, 29896, 29897, 13, 418, 565, 6389, 29889, 20313, 29918, 1975, 29901, 13, 4706, 2898, 342, 353, 12705, 29918, 1557, 2361, 29889, 2813, 29898, 29876, 29922, 524, 29898, 1949, 29918, 27736, 334, 29871, 29900, 29889, 29955, 876, 13, 4706, 19075, 353, 12705, 29918, 1557, 2361, 29889, 18237, 29898, 29876, 29922, 1949, 29918, 27736, 448, 2898, 342, 29889, 12181, 29961, 29900, 2314, 13, 4706, 4629, 353, 10518, 29889, 17685, 4197, 6800, 342, 29892, 19075, 2314, 13, 4706, 285, 29885, 353, 6389, 29889, 16414, 13, 4706, 17927, 29889, 3888, 29898, 29888, 29908, 3549, 292, 1716, 10614, 29901, 426, 24826, 29913, 353, 376, 13, 462, 1678, 285, 29908, 3319, 6800, 342, 29889, 2813, 29898, 29896, 9601, 24826, 1822, 5975, 29961, 29900, 5387, 29941, 29888, 6177, 426, 6800, 342, 29889, 18237, 29898, 29896, 9601, 24826, 1822, 5975, 29961, 29900, 5387, 29941, 29888, 1800, 376, 13, 462, 1678, 285, 29908, 29987, 21313, 29872, 6840, 342, 29889, 2813, 29898, 29896, 9601, 24826, 1822, 5975, 29961, 29900, 5387, 29941, 29888, 6177, 426, 29872, 6840, 342, 29889, 18237, 29898, 29896, 9601, 24826, 1822, 5975, 29961, 29900, 5387, 29941, 29888, 1800, 1159, 13, 13, 418, 9262, 29918, 17609, 353, 260, 29939, 18933, 29889, 29873, 29939, 18933, 29898, 3881, 29898, 2435, 29898, 8391, 4961, 13, 418, 363, 22645, 297, 9262, 29918, 17609, 29901, 13, 4706, 9262, 29918, 17609, 29889, 842, 29918, 8216, 29898, 13, 3986, 285, 29908, 29912, 5085, 29889, 16414, 29913, 353, 426, 8391, 29889, 309, 542, 29961, 13140, 3816, 5085, 29889, 16414, 5387, 29889, 29946, 29888, 27195, 13, 13, 4706, 4629, 29918, 333, 353, 4629, 29889, 309, 542, 29961, 13140, 29962, 3366, 2543, 333, 3108, 13, 4706, 565, 6389, 29889, 7662, 29918, 978, 297, 6796, 19296, 5265, 613, 376, 29924, 29940, 5265, 3108, 29901, 13, 3986, 4629, 29918, 333, 353, 938, 29898, 8391, 29918, 333, 29897, 13, 4706, 25342, 6389, 29889, 7662, 29918, 978, 1275, 376, 25152, 29949, 14345, 2190, 2287, 1115, 13, 3986, 4629, 29918, 333, 353, 851, 29898, 524, 29898, 8391, 29918, 333, 876, 13, 4706, 2407, 353, 7945, 29918, 21574, 29961, 8391, 29918, 333, 29962, 13, 4706, 714, 1445, 29889, 3539, 29898, 11651, 718, 6634, 29876, 1159, 13, 13, 1678, 17927, 29889, 3888, 29898, 29888, 29908, 29956, 4859, 426, 1949, 29918, 27736, 29913, 11916, 304, 426, 449, 3972, 1836, 1159, 13, 13, 1753, 6837, 29918, 354, 332, 6765, 29918, 1643, 29918, 14513, 29898, 2176, 1125, 13, 1678, 4489, 29918, 2506, 29918, 19303, 353, 4489, 29889, 2029, 15625, 2176, 3366, 2506, 936, 3108, 1275, 29871, 29896, 26927, 313, 2176, 3366, 3075, 1981, 296, 3108, 1275, 29871, 29900, 29897, 669, 29898, 2176, 3366, 1491, 16506, 3108, 1275, 29871, 29900, 4638, 13, 1678, 4489, 29918, 2506, 29918, 19303, 1839, 28084, 29918, 354, 26268, 293, 29918, 1643, 2033, 353, 285, 29908, 2506, 936, 2304, 313, 2092, 29901, 376, 320, 13, 462, 462, 4706, 285, 29908, 29912, 2176, 29918, 2506, 29918, 19303, 29889, 2029, 29961, 2176, 29918, 2506, 29918, 19303, 1839, 2092, 2033, 1360, 29896, 1822, 12181, 29961, 29900, 12258, 1178, 29901, 426, 2176, 29918, 2506, 29918, 19303, 29889, 2029, 29961, 2176, 29918, 2506, 29918, 19303, 1839, 2092, 2033, 1360, 29900, 1822, 12181, 29961, 29900, 29962, 1800, 29908, 13, 1678, 4489, 29918, 2506, 29918, 1285, 353, 4489, 29889, 2029, 15625, 2176, 3366, 2506, 936, 3108, 1275, 448, 29896, 29897, 669, 313, 2176, 3366, 3075, 1981, 296, 3108, 1275, 29871, 29900, 29897, 669, 313, 2176, 3366, 1491, 16506, 3108, 1275, 29871, 29900, 4638, 13, 1678, 4489, 29918, 2506, 29918, 1285, 1839, 28084, 29918, 354, 26268, 293, 29918, 1643, 2033, 353, 285, 29908, 2506, 936, 27877, 313, 2092, 29901, 376, 320, 13, 462, 462, 4706, 285, 29908, 29912, 2176, 29918, 2506, 29918, 1285, 29889, 2029, 29961, 2176, 29918, 2506, 29918, 1285, 1839, 2092, 2033, 1360, 29896, 1822, 12181, 29961, 29900, 12258, 1178, 29901, 426, 2176, 29918, 2506, 29918, 1285, 29889, 2029, 29961, 2176, 29918, 2506, 29918, 1285, 1839, 2092, 2033, 1360, 29900, 1822, 12181, 29961, 29900, 29962, 1800, 29908, 13, 1678, 4489, 29918, 3075, 29918, 19303, 353, 4489, 29889, 2029, 15625, 2176, 3366, 2506, 936, 3108, 1275, 29871, 29900, 29897, 669, 313, 2176, 3366, 3075, 1981, 296, 3108, 1275, 29871, 29896, 29897, 669, 313, 2176, 3366, 1491, 16506, 3108, 1275, 29871, 29900, 4638, 13, 1678, 4489, 29918, 3075, 29918, 19303, 1839, 28084, 29918, 354, 26268, 293, 29918, 1643, 2033, 353, 285, 29908, 3075, 1981, 296, 2304, 313, 2092, 29901, 376, 320, 13, 462, 462, 4706, 285, 29908, 29912, 2176, 29918, 3075, 29918, 19303, 29889, 2029, 29961, 2176, 29918, 3075, 29918, 19303, 1839, 2092, 2033, 1360, 29896, 1822, 12181, 29961, 29900, 12258, 1178, 29901, 426, 2176, 29918, 3075, 29918, 19303, 29889, 2029, 29961, 2176, 29918, 3075, 29918, 19303, 1839, 2092, 2033, 1360, 29900, 1822, 12181, 29961, 29900, 29962, 1800, 29908, 13, 1678, 4489, 29918, 3075, 29918, 1285, 353, 4489, 29889, 2029, 15625, 2176, 3366, 2506, 936, 3108, 1275, 29871, 29900, 29897, 669, 313, 2176, 3366, 3075, 1981, 296, 3108, 1275, 448, 29896, 29897, 669, 313, 2176, 3366, 1491, 16506, 3108, 1275, 29871, 29900, 4638, 13, 1678, 4489, 29918, 3075, 29918, 1285, 1839, 28084, 29918, 354, 26268, 293, 29918, 1643, 2033, 353, 285, 29908, 3075, 1981, 296, 27877, 313, 2092, 29901, 376, 320, 13, 462, 462, 4706, 285, 29908, 29912, 2176, 29918, 3075, 29918, 1285, 29889, 2029, 29961, 2176, 29918, 3075, 29918, 1285, 1839, 2092, 2033, 1360, 29896, 1822, 12181, 29961, 29900, 12258, 1178, 29901, 426, 2176, 29918, 3075, 29918, 1285, 29889, 2029, 29961, 2176, 29918, 3075, 29918, 1285, 1839, 2092, 2033, 1360, 29900, 1822, 12181, 29961, 29900, 29962, 1800, 29908, 13, 1678, 4489, 29918, 1491, 29918, 19303, 353, 4489, 29889, 2029, 15625, 2176, 3366, 2506, 936, 3108, 1275, 29871, 29900, 29897, 669, 313, 2176, 3366, 3075, 1981, 296, 3108, 1275, 29871, 29900, 29897, 669, 313, 2176, 3366, 1491, 16506, 3108, 1275, 29871, 29896, 4638, 13, 1678, 4489, 29918, 1491, 29918, 19303, 1839, 28084, 29918, 354, 26268, 293, 29918, 1643, 2033, 353, 285, 29908, 1491, 16506, 2304, 313, 2092, 29901, 376, 320, 13, 462, 462, 4706, 285, 29908, 29912, 2176, 29918, 1491, 29918, 19303, 29889, 2029, 29961, 2176, 29918, 1491, 29918, 19303, 1839, 2092, 2033, 1360, 29896, 1822, 12181, 29961, 29900, 12258, 1178, 29901, 426, 2176, 29918, 1491, 29918, 19303, 29889, 2029, 29961, 2176, 29918, 1491, 29918, 19303, 1839, 2092, 2033, 1360, 29900, 1822, 12181, 29961, 29900, 29962, 1800, 29908, 13, 1678, 4489, 29918, 1491, 29918, 1285, 353, 4489, 29889, 2029, 15625, 2176, 3366, 2506, 936, 3108, 1275, 29871, 29900, 29897, 669, 313, 2176, 3366, 3075, 1981, 296, 3108, 1275, 29871, 29900, 29897, 669, 313, 2176, 3366, 1491, 16506, 3108, 1275, 448, 29896, 4638, 13, 1678, 4489, 29918, 1491, 29918, 1285, 1839, 28084, 29918, 354, 26268, 293, 29918, 1643, 2033, 353, 285, 29908, 1491, 16506, 27877, 313, 2092, 29901, 376, 320, 13, 462, 462, 4706, 285, 29908, 29912, 2176, 29918, 1491, 29918, 1285, 29889, 2029, 29961, 2176, 29918, 1491, 29918, 1285, 1839, 2092, 2033, 1360, 29896, 1822, 12181, 29961, 29900, 12258, 1178, 29901, 426, 2176, 29918, 1491, 29918, 1285, 29889, 2029, 29961, 2176, 29918, 1491, 29918, 1285, 1839, 2092, 2033, 1360, 29900, 1822, 12181, 29961, 29900, 29962, 1800, 29908, 13, 1678, 4489, 29918, 28084, 353, 10518, 29889, 17685, 4197, 2176, 29918, 2506, 29918, 19303, 29892, 4489, 29918, 2506, 29918, 1285, 29892, 4489, 29918, 3075, 29918, 19303, 29892, 4489, 29918, 3075, 29918, 1285, 29892, 13, 462, 1678, 4489, 29918, 1491, 29918, 19303, 29892, 4489, 29918, 1491, 29918, 1285, 2314, 13, 1678, 736, 4489, 29918, 28084, 13, 13, 1753, 6837, 29918, 354, 332, 6765, 29918, 1643, 29918, 14968, 29898, 2176, 1125, 13, 1678, 4489, 29918, 2506, 29918, 19303, 353, 4489, 29889, 2029, 15625, 2176, 3366, 2506, 936, 3108, 1275, 29871, 29896, 26927, 313, 2176, 3366, 3075, 1981, 296, 3108, 1275, 29871, 29900, 29897, 669, 29898, 2176, 3366, 1491, 16506, 3108, 1275, 29871, 29900, 4638, 13, 1678, 4489, 29918, 2506, 29918, 19303, 1839, 28084, 29918, 354, 26268, 293, 29918, 1643, 2033, 353, 285, 29908, 2506, 936, 2304, 21313, 2176, 29918, 2506, 29918, 19303, 29889, 12181, 29961, 29900, 29962, 5038, 13, 1678, 4489, 29918, 2506, 29918, 1285, 353, 4489, 29889, 2029, 15625, 2176, 3366, 2506, 936, 3108, 1275, 448, 29896, 29897, 669, 313, 2176, 3366, 3075, 1981, 296, 3108, 1275, 29871, 29900, 29897, 669, 313, 2176, 3366, 1491, 16506, 3108, 1275, 29871, 29900, 4638, 13, 1678, 4489, 29918, 2506, 29918, 1285, 1839, 28084, 29918, 354, 26268, 293, 29918, 1643, 2033, 353, 285, 29908, 2506, 936, 27877, 21313, 2176, 29918, 2506, 29918, 1285, 29889, 12181, 29961, 29900, 29962, 5038, 13, 1678, 4489, 29918, 3075, 29918, 19303, 353, 4489, 29889, 2029, 15625, 2176, 3366, 2506, 936, 3108, 1275, 29871, 29900, 29897, 669, 313, 2176, 3366, 3075, 1981, 296, 3108, 1275, 29871, 29896, 29897, 669, 313, 2176, 3366, 1491, 16506, 3108, 1275, 29871, 29900, 4638, 13, 1678, 4489, 29918, 3075, 29918, 19303, 1839, 28084, 29918, 354, 26268, 293, 29918, 1643, 2033, 353, 285, 29908, 3075, 1981, 296, 2304, 21313, 2176, 29918, 3075, 29918, 19303, 29889, 12181, 29961, 29900, 29962, 5038, 13, 1678, 4489, 29918, 3075, 29918, 1285, 353, 4489, 29889, 2029, 15625, 2176, 3366, 2506, 936, 3108, 1275, 29871, 29900, 29897, 669, 313, 2176, 3366, 3075, 1981, 296, 3108, 1275, 448, 29896, 29897, 669, 313, 2176, 3366, 1491, 16506, 3108, 1275, 29871, 29900, 4638, 13, 1678, 4489, 29918, 3075, 29918, 1285, 1839, 28084, 29918, 354, 26268, 293, 29918, 1643, 2033, 353, 285, 29908, 3075, 1981, 296, 27877, 21313, 2176, 29918, 3075, 29918, 1285, 29889, 12181, 29961, 29900, 29962, 5038, 13, 1678, 4489, 29918, 1491, 29918, 19303, 353, 4489, 29889, 2029, 15625, 2176, 3366, 2506, 936, 3108, 1275, 29871, 29900, 29897, 669, 313, 2176, 3366, 3075, 1981, 296, 3108, 1275, 29871, 29900, 29897, 669, 313, 2176, 3366, 1491, 16506, 3108, 1275, 29871, 29896, 4638, 13, 1678, 4489, 29918, 1491, 29918, 19303, 1839, 28084, 29918, 354, 26268, 293, 29918, 1643, 2033, 353, 285, 29908, 1491, 16506, 2304, 21313, 2176, 29918, 1491, 29918, 19303, 29889, 12181, 29961, 29900, 29962, 5038, 13, 1678, 4489, 29918, 1491, 29918, 1285, 353, 4489, 29889, 2029, 15625, 2176, 3366, 2506, 936, 3108, 1275, 29871, 29900, 29897, 669, 313, 2176, 3366, 3075, 1981, 296, 3108, 1275, 29871, 29900, 29897, 669, 313, 2176, 3366, 1491, 16506, 3108, 1275, 448, 29896, 4638, 13, 1678, 4489, 29918, 1491, 29918, 1285, 1839, 28084, 29918, 354, 26268, 293, 29918, 1643, 2033, 353, 285, 29908, 1491, 16506, 27877, 21313, 2176, 29918, 1491, 29918, 1285, 29889, 12181, 29961, 29900, 29962, 5038, 13, 1678, 4489, 29918, 28084, 353, 10518, 29889, 17685, 4197, 2176, 29918, 2506, 29918, 19303, 29892, 4489, 29918, 2506, 29918, 1285, 29892, 4489, 29918, 3075, 29918, 19303, 29892, 4489, 29918, 3075, 29918, 1285, 29892, 13, 462, 1678, 4489, 29918, 1491, 29918, 19303, 29892, 4489, 29918, 1491, 29918, 1285, 2314, 13, 1678, 736, 4489, 29918, 28084, 13, 13, 1753, 679, 29918, 14727, 681, 29918, 354, 332, 6765, 29918, 27736, 29898, 2176, 29892, 1904, 29918, 3972, 29892, 4489, 29918, 12683, 29922, 15926, 29889, 949, 29918, 7638, 11974, 5184, 29914, 18597, 348, 29914, 328, 4233, 29900, 29900, 29896, 29914, 29924, 29940, 5265, 29914, 14968, 29918, 354, 332, 4695, 29889, 1372, 29894, 613, 16345, 2433, 29905, 29873, 4295, 29876, 5477, 13, 462, 462, 268, 540, 29884, 2433, 2506, 936, 29374, 13, 1678, 4489, 353, 4489, 29889, 2029, 15625, 2176, 29961, 354, 29884, 29962, 2804, 29871, 29900, 4638, 13, 13, 13, 1678, 4489, 353, 4489, 29889, 2029, 29961, 2176, 3366, 5927, 3097, 3108, 6736, 29871, 29900, 29889, 29941, 29962, 13, 1678, 4489, 29918, 354, 332, 6765, 29918, 1955, 6259, 353, 4489, 29918, 12683, 29889, 2029, 29961, 2176, 1839, 13492, 29918, 333, 13359, 25027, 391, 580, 29962, 13, 1678, 4489, 29918, 354, 332, 6765, 29918, 1955, 6259, 29922, 4489, 29918, 354, 332, 6765, 29918, 1955, 6259, 29889, 8865, 18959, 2248, 742, 525, 14032, 415, 1367, 742, 525, 18784, 1367, 7464, 9685, 29922, 29896, 29897, 13, 1678, 4489, 29918, 354, 332, 6765, 29918, 1955, 6259, 1839, 5527, 5084, 2033, 353, 4489, 1839, 5527, 5084, 13359, 25027, 391, 580, 13, 1678, 4489, 29918, 354, 332, 6765, 29918, 1955, 6259, 1839, 5927, 3097, 2033, 353, 4489, 1839, 5927, 3097, 13359, 25027, 391, 580, 13, 1678, 11799, 29918, 3972, 353, 2897, 29889, 2084, 29889, 7122, 29898, 4299, 29918, 3972, 29892, 525, 13092, 29918, 27736, 29918, 7638, 1495, 13, 1678, 565, 451, 2897, 29889, 2084, 29889, 9933, 29898, 7638, 29918, 3972, 1125, 13, 4706, 2897, 29889, 29885, 12535, 12935, 29898, 7638, 29918, 3972, 29897, 13, 1678, 4489, 29918, 354, 332, 6765, 29918, 1955, 6259, 29889, 517, 29918, 7638, 29898, 359, 29889, 2084, 29889, 7122, 29898, 7638, 29918, 3972, 29892, 525, 14727, 681, 29918, 27736, 29889, 7638, 8785, 13, 13, 13, 1753, 679, 29918, 24582, 29918, 27736, 29898, 2176, 29892, 1904, 29918, 3972, 29892, 4489, 29918, 12683, 29922, 15926, 29889, 949, 29918, 7638, 11219, 5184, 29914, 18597, 348, 29914, 328, 4233, 29900, 29900, 29896, 29914, 29924, 29940, 5265, 29914, 14968, 29918, 354, 332, 4695, 29889, 1372, 29894, 742, 16345, 2433, 29905, 29873, 4295, 29876, 5477, 13, 462, 462, 302, 29918, 11249, 29922, 29941, 29900, 29892, 13, 462, 462, 1602, 6797, 29918, 1643, 29922, 3366, 9996, 328, 2463, 613, 376, 296, 737, 358, 613, 376, 17821, 1705, 12436, 13, 462, 462, 4341, 29918, 2098, 353, 6024, 2248, 742, 525, 1885, 276, 742, 525, 18616, 663, 29896, 742, 525, 18616, 663, 29906, 742, 525, 5927, 3097, 742, 13, 462, 462, 462, 29871, 525, 5527, 5084, 742, 525, 1707, 29918, 1022, 742, 525, 5527, 29918, 1022, 742, 525, 29887, 1025, 29918, 1643, 742, 525, 11965, 29918, 1643, 7464, 4464, 543, 14968, 29908, 1125, 13, 1678, 11799, 29918, 3972, 353, 2897, 29889, 2084, 29889, 7122, 29898, 4299, 29918, 3972, 29892, 525, 2190, 1964, 21554, 3235, 29918, 29907, 1307, 2190, 742, 525, 29903, 8476, 3352, 1495, 13, 1678, 565, 451, 2897, 29889, 2084, 29889, 9933, 29898, 7638, 29918, 3972, 1125, 13, 4706, 2897, 29889, 29885, 12535, 12935, 29898, 7638, 29918, 3972, 29897, 13, 1678, 396, 540, 332, 6765, 353, 2246, 29918, 354, 332, 4695, 29918, 5415, 29889, 8149, 580, 13, 1678, 9358, 29918, 4537, 353, 7431, 29898, 2176, 1839, 5927, 3097, 13359, 25027, 391, 580, 29961, 29900, 2314, 13, 1678, 363, 9358, 297, 3464, 29898, 1022, 29918, 4537, 1125, 13, 4706, 396, 363, 540, 29884, 297, 540, 332, 6765, 29901, 13, 4706, 396, 268, 4489, 29918, 354, 332, 4695, 353, 4489, 29889, 2029, 29961, 2176, 29961, 354, 29884, 29962, 2804, 29871, 29900, 29962, 13, 4706, 4489, 29918, 8552, 353, 4489, 29889, 8552, 580, 13, 4706, 4489, 29918, 8552, 1839, 1707, 29918, 1022, 2033, 353, 7442, 29889, 294, 2378, 29898, 2176, 29918, 8552, 1839, 5927, 3097, 13359, 25027, 391, 3101, 7503, 29892, 9358, 29962, 13, 4706, 4489, 29918, 8552, 1839, 5527, 29918, 1022, 2033, 353, 7442, 29889, 294, 2378, 29898, 2176, 29918, 8552, 1839, 5527, 5084, 13359, 25027, 391, 3101, 7503, 29892, 9358, 29962, 13, 4706, 4489, 29918, 8552, 1839, 11965, 29918, 1643, 2033, 353, 7442, 29889, 294, 2378, 29898, 2176, 29918, 8552, 1839, 11965, 29918, 1643, 13359, 25027, 391, 3101, 7503, 29892, 9358, 29962, 13, 4706, 4489, 29918, 8552, 1839, 11965, 29918, 1643, 2033, 353, 518, 7099, 6797, 29918, 1643, 29961, 11965, 29962, 363, 4450, 297, 4489, 29918, 8552, 1839, 11965, 29918, 1643, 2033, 29962, 13, 4706, 396, 4036, 29918, 11249, 353, 4489, 29918, 354, 332, 4695, 29889, 11249, 29898, 29876, 29922, 2246, 29918, 354, 332, 4695, 29918, 5415, 29961, 354, 29884, 2314, 13, 4706, 396, 2246, 29918, 29876, 29918, 1707, 353, 4489, 29918, 8552, 29889, 12938, 1191, 342, 29898, 29876, 29918, 11249, 29892, 525, 1707, 29918, 1022, 1495, 13, 4706, 396, 2246, 29918, 29876, 29918, 5527, 353, 4489, 29918, 8552, 29889, 1983, 29885, 497, 342, 29898, 2176, 29918, 8552, 29889, 12181, 29961, 29900, 1402, 525, 5527, 29918, 1022, 1495, 13, 4706, 2246, 29918, 29876, 29918, 5527, 353, 4489, 29918, 8552, 29889, 6605, 29918, 5975, 29898, 1609, 29922, 1839, 5527, 29918, 1022, 11287, 13, 13, 4706, 396, 2246, 29918, 29876, 29918, 1707, 29918, 1955, 6259, 353, 4489, 29918, 12683, 29889, 2029, 29961, 3332, 29918, 29876, 29918, 1707, 1839, 13492, 29918, 333, 13359, 25027, 391, 580, 29962, 13, 4706, 396, 396, 2246, 29918, 29876, 29918, 1707, 29918, 1955, 6259, 353, 2246, 29918, 29876, 29918, 1707, 29918, 1955, 6259, 29889, 8865, 29898, 22724, 29918, 517, 29918, 8865, 29892, 9685, 29922, 29896, 29897, 13, 4706, 396, 2246, 29918, 29876, 29918, 1707, 29918, 1955, 6259, 1839, 5927, 3097, 2033, 353, 2246, 29918, 29876, 29918, 1707, 1839, 5927, 3097, 13359, 25027, 391, 580, 13, 4706, 396, 2246, 29918, 29876, 29918, 1707, 29918, 1955, 6259, 1839, 5527, 5084, 2033, 353, 2246, 29918, 29876, 29918, 1707, 1839, 5527, 5084, 13359, 25027, 391, 580, 13, 4706, 396, 2246, 29918, 29876, 29918, 1707, 29918, 1955, 6259, 1839, 1707, 29918, 1022, 2033, 353, 2246, 29918, 29876, 29918, 1707, 1839, 1707, 29918, 1022, 13359, 25027, 391, 580, 13, 4706, 396, 2246, 29918, 29876, 29918, 1707, 29918, 1955, 6259, 1839, 5527, 29918, 1022, 2033, 353, 2246, 29918, 29876, 29918, 1707, 1839, 5527, 29918, 1022, 13359, 25027, 391, 580, 13, 4706, 396, 2246, 29918, 29876, 29918, 1707, 29918, 1955, 6259, 1839, 11965, 29918, 1643, 2033, 353, 2246, 29918, 29876, 29918, 1707, 1839, 11965, 29918, 1643, 13359, 25027, 391, 580, 13, 13, 4706, 2246, 29918, 29876, 29918, 5527, 29918, 1955, 6259, 353, 4489, 29918, 12683, 29889, 2029, 29961, 3332, 29918, 29876, 29918, 5527, 1839, 13492, 29918, 333, 13359, 25027, 391, 580, 29962, 13, 4706, 396, 2246, 29918, 29876, 29918, 5527, 29918, 1955, 6259, 353, 2246, 29918, 29876, 29918, 5527, 29918, 1955, 6259, 29889, 8865, 29898, 22724, 29918, 517, 29918, 8865, 29892, 9685, 29922, 29896, 29897, 13, 4706, 2246, 29918, 29876, 29918, 5527, 29918, 1955, 6259, 1839, 5927, 3097, 2033, 353, 2246, 29918, 29876, 29918, 5527, 1839, 5927, 3097, 13359, 25027, 391, 580, 13, 4706, 2246, 29918, 29876, 29918, 5527, 29918, 1955, 6259, 1839, 5527, 5084, 2033, 353, 2246, 29918, 29876, 29918, 5527, 1839, 5527, 5084, 13359, 25027, 391, 580, 13, 4706, 2246, 29918, 29876, 29918, 5527, 29918, 1955, 6259, 1839, 1707, 29918, 1022, 2033, 353, 2246, 29918, 29876, 29918, 5527, 1839, 1707, 29918, 1022, 13359, 25027, 391, 580, 13, 4706, 2246, 29918, 29876, 29918, 5527, 29918, 1955, 6259, 1839, 5527, 29918, 1022, 2033, 353, 2246, 29918, 29876, 29918, 5527, 1839, 5527, 29918, 1022, 13359, 25027, 391, 580, 13, 4706, 2246, 29918, 29876, 29918, 5527, 29918, 1955, 6259, 1839, 11965, 29918, 1643, 2033, 353, 2246, 29918, 29876, 29918, 5527, 1839, 11965, 29918, 1643, 13359, 25027, 391, 580, 13, 13, 4706, 396, 2246, 29918, 29876, 29918, 1707, 29918, 1955, 6259, 353, 2246, 29918, 29876, 29918, 1707, 29918, 1955, 6259, 29961, 13099, 29918, 2098, 29962, 13, 4706, 2246, 29918, 29876, 29918, 5527, 29918, 1955, 6259, 353, 2246, 29918, 29876, 29918, 5527, 29918, 1955, 6259, 29961, 13099, 29918, 2098, 29962, 13, 13, 4706, 10944, 353, 4464, 29889, 21064, 580, 13, 4706, 396, 2246, 29918, 29876, 29918, 1707, 29918, 1955, 6259, 29889, 517, 29918, 7638, 29898, 359, 29889, 2084, 29889, 7122, 29898, 7638, 29918, 3972, 29892, 29850, 2403, 29903, 8476, 3352, 29918, 26865, 29918, 1022, 648, 1836, 7638, 1642, 4830, 29898, 13506, 29892, 9358, 4961, 13, 4706, 2246, 29918, 29876, 29918, 5527, 29918, 1955, 6259, 29889, 517, 29918, 7638, 29898, 359, 29889, 2084, 29889, 7122, 29898, 7638, 29918, 3972, 29892, 29850, 2403, 6007, 29943, 29918, 1022, 648, 2403, 29903, 8476, 3352, 29889, 7638, 1642, 4830, 29898, 13506, 29892, 9358, 4961, 13, 13, 1678, 396, 736, 2246, 29918, 29876, 29918, 1707, 29918, 1955, 6259, 29892, 2246, 29918, 29876, 29918, 5527, 29918, 1955, 6259, 13, 13, 1753, 679, 29918, 3332, 29918, 29876, 29918, 354, 332, 6765, 29918, 27736, 29898, 2176, 29892, 1904, 29918, 3972, 29892, 4489, 29918, 12683, 29922, 15926, 29889, 949, 29918, 7638, 11219, 5184, 29914, 18597, 348, 29914, 328, 4233, 29900, 29900, 29896, 29914, 29924, 29940, 5265, 29914, 14968, 29918, 354, 332, 4695, 29889, 1372, 29894, 742, 16345, 2433, 29905, 29873, 4295, 29876, 5477, 13, 462, 462, 2246, 29918, 354, 332, 4695, 29918, 5415, 353, 11117, 2506, 936, 2396, 29871, 29906, 29900, 29892, 525, 3075, 1981, 296, 2396, 29871, 29906, 29900, 29892, 525, 1491, 16506, 2396, 29871, 29906, 29900, 1118, 13, 462, 462, 1602, 6797, 29918, 1643, 29922, 3366, 9996, 328, 2463, 613, 376, 296, 737, 358, 613, 376, 17821, 1705, 12436, 13, 462, 462, 4341, 29918, 2098, 353, 6024, 1885, 276, 742, 525, 18616, 663, 29896, 742, 525, 18616, 663, 29906, 742, 525, 5927, 3097, 742, 13, 462, 462, 462, 29871, 525, 5527, 5084, 742, 525, 1707, 29918, 1022, 742, 525, 5527, 29918, 1022, 742, 525, 29887, 1025, 29918, 1643, 742, 525, 11965, 29918, 1643, 2033, 1125, 13, 1678, 11799, 29918, 3972, 353, 2897, 29889, 2084, 29889, 7122, 29898, 4299, 29918, 3972, 29892, 525, 354, 332, 6765, 29918, 6194, 29918, 7638, 29918, 29923, 8932, 1495, 13, 1678, 565, 451, 2897, 29889, 2084, 29889, 9933, 29898, 7638, 29918, 3972, 1125, 13, 4706, 2897, 29889, 29885, 12535, 12935, 29898, 7638, 29918, 3972, 29897, 13, 1678, 540, 332, 6765, 353, 2246, 29918, 354, 332, 4695, 29918, 5415, 29889, 8149, 580, 13, 1678, 9358, 29918, 4537, 353, 7431, 29898, 2176, 1839, 5927, 3097, 13359, 25027, 391, 580, 29961, 29900, 2314, 13, 1678, 363, 9358, 297, 3464, 29898, 1022, 29918, 4537, 1125, 13, 4706, 363, 540, 29884, 297, 540, 332, 6765, 29901, 13, 9651, 4489, 29918, 354, 332, 4695, 353, 4489, 29889, 2029, 29961, 2176, 29961, 354, 29884, 29962, 2804, 29871, 29900, 29962, 13, 9651, 4489, 29918, 354, 332, 4695, 1839, 1707, 29918, 1022, 2033, 353, 7442, 29889, 294, 2378, 29898, 2176, 29918, 354, 332, 4695, 1839, 5927, 3097, 13359, 25027, 391, 3101, 7503, 29892, 1022, 29962, 13, 9651, 4489, 29918, 354, 332, 4695, 1839, 5527, 29918, 1022, 2033, 353, 7442, 29889, 294, 2378, 29898, 2176, 29918, 354, 332, 4695, 1839, 5527, 5084, 13359, 25027, 391, 3101, 7503, 29892, 9358, 29962, 13, 9651, 4489, 29918, 354, 332, 4695, 1839, 11965, 29918, 1643, 2033, 353, 7442, 29889, 294, 2378, 29898, 2176, 29918, 354, 332, 4695, 1839, 11965, 29918, 1643, 13359, 25027, 391, 3101, 7503, 29892, 9358, 29962, 13, 9651, 4489, 29918, 354, 332, 4695, 1839, 11965, 29918, 1643, 2033, 353, 518, 7099, 6797, 29918, 1643, 29961, 11965, 29962, 363, 4450, 297, 4489, 29918, 354, 332, 4695, 1839, 11965, 29918, 1643, 2033, 29962, 13, 9651, 396, 4036, 29918, 11249, 353, 4489, 29918, 354, 332, 4695, 29889, 11249, 29898, 29876, 29922, 2246, 29918, 354, 332, 4695, 29918, 5415, 29961, 354, 29884, 2314, 13, 9651, 2246, 29918, 29876, 29918, 1707, 353, 4489, 29918, 354, 332, 4695, 29889, 12938, 1191, 342, 29898, 3332, 29918, 354, 332, 4695, 29918, 5415, 29961, 354, 29884, 1402, 29915, 1707, 29918, 1022, 1495, 13, 9651, 2246, 29918, 29876, 29918, 5527, 353, 4489, 29918, 354, 332, 4695, 29889, 12938, 1191, 342, 29898, 3332, 29918, 354, 332, 4695, 29918, 5415, 29961, 354, 29884, 1402, 29915, 5527, 29918, 1022, 1495, 13, 13, 9651, 396, 4036, 29918, 11249, 29918, 1955, 6259, 353, 4489, 29918, 12683, 29889, 2029, 29961, 8172, 29918, 11249, 1839, 13492, 29918, 333, 13359, 25027, 391, 580, 29962, 13, 9651, 396, 4036, 29918, 11249, 29918, 1955, 6259, 353, 4036, 29918, 11249, 29918, 1955, 6259, 29889, 8865, 18959, 2248, 742, 525, 14032, 415, 1367, 742, 525, 18784, 1367, 7464, 9685, 29922, 29896, 29897, 13, 9651, 396, 4036, 29918, 11249, 29918, 1955, 6259, 1839, 5927, 3097, 2033, 353, 4036, 29918, 11249, 1839, 5927, 3097, 13359, 25027, 391, 580, 13, 9651, 396, 4036, 29918, 11249, 29918, 1955, 6259, 1839, 5527, 5084, 2033, 353, 4036, 29918, 11249, 1839, 5527, 5084, 13359, 25027, 391, 580, 13, 9651, 396, 4036, 29918, 11249, 29918, 1955, 6259, 1839, 1707, 29918, 1022, 2033, 353, 4036, 29918, 11249, 1839, 1707, 29918, 1022, 13359, 25027, 391, 580, 13, 9651, 396, 4036, 29918, 11249, 29918, 1955, 6259, 1839, 5527, 29918, 1022, 2033, 353, 4036, 29918, 11249, 1839, 5527, 29918, 1022, 13359, 25027, 391, 580, 13, 13, 9651, 2246, 29918, 29876, 29918, 1707, 29918, 1955, 6259, 353, 4489, 29918, 12683, 29889, 2029, 29961, 3332, 29918, 29876, 29918, 1707, 1839, 13492, 29918, 333, 13359, 25027, 391, 580, 29962, 13, 9651, 396, 2246, 29918, 29876, 29918, 1707, 29918, 1955, 6259, 353, 2246, 29918, 29876, 29918, 1707, 29918, 1955, 6259, 29889, 8865, 29898, 22724, 29918, 517, 29918, 8865, 29892, 9685, 29922, 29896, 29897, 13, 9651, 2246, 29918, 29876, 29918, 1707, 29918, 1955, 6259, 1839, 5927, 3097, 2033, 353, 2246, 29918, 29876, 29918, 1707, 1839, 5927, 3097, 13359, 25027, 391, 580, 13, 9651, 2246, 29918, 29876, 29918, 1707, 29918, 1955, 6259, 1839, 5527, 5084, 2033, 353, 2246, 29918, 29876, 29918, 1707, 1839, 5527, 5084, 13359, 25027, 391, 580, 13, 9651, 2246, 29918, 29876, 29918, 1707, 29918, 1955, 6259, 1839, 1707, 29918, 1022, 2033, 353, 2246, 29918, 29876, 29918, 1707, 1839, 1707, 29918, 1022, 13359, 25027, 391, 580, 13, 9651, 2246, 29918, 29876, 29918, 1707, 29918, 1955, 6259, 1839, 5527, 29918, 1022, 2033, 353, 2246, 29918, 29876, 29918, 1707, 1839, 5527, 29918, 1022, 13359, 25027, 391, 580, 13, 9651, 2246, 29918, 29876, 29918, 1707, 29918, 1955, 6259, 1839, 11965, 29918, 1643, 2033, 353, 2246, 29918, 29876, 29918, 1707, 1839, 11965, 29918, 1643, 13359, 25027, 391, 580, 13, 13, 9651, 2246, 29918, 29876, 29918, 5527, 29918, 1955, 6259, 353, 4489, 29918, 12683, 29889, 2029, 29961, 3332, 29918, 29876, 29918, 5527, 1839, 13492, 29918, 333, 13359, 25027, 391, 580, 29962, 13, 9651, 396, 2246, 29918, 29876, 29918, 5527, 29918, 1955, 6259, 353, 2246, 29918, 29876, 29918, 5527, 29918, 1955, 6259, 29889, 8865, 29898, 22724, 29918, 517, 29918, 8865, 29892, 9685, 29922, 29896, 29897, 13, 9651, 2246, 29918, 29876, 29918, 5527, 29918, 1955, 6259, 1839, 5927, 3097, 2033, 353, 2246, 29918, 29876, 29918, 5527, 1839, 5927, 3097, 13359, 25027, 391, 580, 13, 9651, 2246, 29918, 29876, 29918, 5527, 29918, 1955, 6259, 1839, 5527, 5084, 2033, 353, 2246, 29918, 29876, 29918, 5527, 1839, 5527, 5084, 13359, 25027, 391, 580, 13, 9651, 2246, 29918, 29876, 29918, 5527, 29918, 1955, 6259, 1839, 1707, 29918, 1022, 2033, 353, 2246, 29918, 29876, 29918, 5527, 1839, 1707, 29918, 1022, 13359, 25027, 391, 580, 13, 9651, 2246, 29918, 29876, 29918, 5527, 29918, 1955, 6259, 1839, 5527, 29918, 1022, 2033, 353, 2246, 29918, 29876, 29918, 5527, 1839, 5527, 29918, 1022, 13359, 25027, 391, 580, 13, 9651, 2246, 29918, 29876, 29918, 5527, 29918, 1955, 6259, 1839, 11965, 29918, 1643, 2033, 353, 2246, 29918, 29876, 29918, 5527, 1839, 11965, 29918, 1643, 13359, 25027, 391, 580, 13, 13, 9651, 2246, 29918, 29876, 29918, 1707, 29918, 1955, 6259, 353, 2246, 29918, 29876, 29918, 1707, 29918, 1955, 6259, 29961, 13099, 29918, 2098, 29962, 13, 9651, 2246, 29918, 29876, 29918, 5527, 29918, 1955, 6259, 353, 2246, 29918, 29876, 29918, 5527, 29918, 1955, 6259, 29961, 13099, 29918, 2098, 29962, 13, 9651, 396, 1596, 29898, 8172, 29918, 11249, 29918, 1955, 6259, 29897, 13, 9651, 396, 1596, 29898, 29888, 29908, 29912, 354, 29884, 2403, 15488, 648, 1022, 27195, 13, 9651, 396, 1596, 29898, 3332, 29918, 29876, 29918, 1707, 29918, 1955, 6259, 29897, 13, 9651, 396, 1596, 29898, 3332, 29918, 29876, 29918, 5527, 29918, 1955, 6259, 29897, 13, 13, 9651, 396, 2246, 29918, 29876, 29918, 1707, 29918, 1955, 6259, 29889, 517, 29918, 7638, 29898, 359, 29889, 2084, 29889, 7122, 29898, 7638, 29918, 3972, 29892, 29850, 2403, 29911, 4590, 29918, 26865, 29918, 1022, 648, 1836, 7638, 1642, 4830, 29898, 354, 29884, 29892, 9358, 4961, 13, 9651, 2246, 29918, 29876, 29918, 5527, 29918, 1955, 6259, 29889, 517, 29918, 7638, 29898, 359, 29889, 2084, 29889, 7122, 29898, 7638, 29918, 3972, 29892, 29850, 2403, 29911, 4590, 29918, 6007, 29943, 29918, 1022, 648, 2403, 29931, 1718, 1692, 1254, 29889, 7638, 1642, 4830, 29898, 354, 29884, 29892, 9358, 4961, 13, 13, 4706, 396, 736, 2246, 29918, 29876, 29918, 1707, 29918, 1955, 6259, 29892, 2246, 29918, 29876, 29918, 5527, 29918, 1955, 6259, 13, 4706, 396, 4036, 29918, 11249, 29918, 1955, 6259, 29889, 517, 29918, 7638, 29898, 359, 29889, 2084, 29889, 7122, 29898, 7638, 29918, 3972, 1699, 29912, 2403, 29934, 2190, 22141, 29889, 7638, 1642, 4830, 29898, 354, 29884, 8243, 2248, 29922, 8824, 29897, 13, 4706, 396, 2246, 29918, 29876, 29918, 1707, 29918, 1955, 6259, 29889, 517, 29918, 7638, 29898, 359, 29889, 2084, 29889, 7122, 29898, 7638, 29918, 3972, 29892, 29850, 2403, 29911, 4590, 29918, 26865, 29889, 7638, 1642, 4830, 29898, 354, 29884, 8243, 2380, 29922, 8824, 29897, 13, 4706, 396, 2246, 29918, 29876, 29918, 5527, 29918, 1955, 6259, 29889, 517, 29918, 7638, 29898, 359, 29889, 2084, 29889, 7122, 29898, 7638, 29918, 3972, 29892, 29850, 2403, 29911, 4590, 29918, 6007, 29943, 29889, 7638, 1642, 4830, 29898, 354, 29884, 8243, 2380, 29922, 8824, 29897, 13, 13, 1753, 1284, 29918, 3317, 29918, 1707, 29898, 1707, 29918, 2749, 1125, 13, 1678, 736, 7442, 29889, 314, 1165, 29898, 1707, 29918, 2749, 29897, 13, 13, 1753, 6492, 29918, 14968, 29918, 1022, 2878, 29879, 29898, 5085, 29892, 6694, 29918, 29881, 2926, 1199, 29892, 540, 332, 6765, 29892, 2441, 29918, 333, 29892, 330, 361, 353, 5574, 1125, 13, 1678, 3001, 29918, 1022, 2878, 29879, 353, 7431, 29898, 1761, 29898, 26495, 29918, 29881, 2926, 1199, 29889, 5975, 3101, 29961, 29900, 29962, 3366, 1188, 1169, 20068, 13, 1678, 4489, 29892, 903, 353, 10272, 29918, 14968, 29918, 4518, 29918, 2527, 10817, 29918, 546, 29918, 1022, 2878, 29898, 26495, 29918, 29881, 2926, 1199, 29892, 540, 332, 6765, 29892, 2441, 29918, 333, 29897, 13, 1678, 7945, 29918, 4518, 29918, 9507, 353, 2897, 29889, 2084, 29889, 7122, 29898, 5085, 29889, 4299, 29918, 3972, 29892, 285, 29908, 1594, 29918, 2527, 10817, 29889, 3126, 29880, 1159, 13, 1678, 4489, 29889, 517, 29918, 3126, 29898, 14968, 29918, 4518, 29918, 9507, 29892, 13, 462, 632, 7769, 2433, 3757, 4339, 742, 13, 462, 632, 3454, 29922, 5574, 29897, 13, 1678, 17927, 29889, 3888, 29898, 29888, 29908, 10095, 10817, 2729, 373, 26101, 22554, 1199, 3971, 304, 426, 14968, 29918, 4518, 29918, 9507, 27195, 13, 1678, 4489, 29918, 354, 332, 6765, 353, 4489, 29889, 2029, 15625, 2176, 3366, 2506, 936, 3108, 2804, 29871, 29900, 29897, 891, 313, 2176, 3366, 3075, 1981, 296, 3108, 2804, 29871, 29900, 29897, 891, 313, 2176, 3366, 1491, 16506, 3108, 2804, 29871, 29900, 4638, 13, 1678, 4489, 29918, 720, 414, 353, 4489, 29889, 2029, 15625, 2176, 3366, 2506, 936, 3108, 1275, 29871, 29900, 29897, 669, 313, 2176, 3366, 3075, 1981, 296, 3108, 1275, 29871, 29900, 29897, 669, 313, 2176, 3366, 1491, 16506, 3108, 1275, 29871, 29900, 4638, 13, 1678, 4236, 29918, 2611, 2925, 29918, 354, 332, 4695, 353, 426, 13, 4706, 525, 2506, 936, 2396, 4489, 29918, 354, 332, 6765, 29889, 2029, 29961, 2176, 29918, 354, 332, 6765, 1839, 2506, 936, 2033, 2804, 29871, 29900, 1822, 12181, 29961, 29900, 1402, 13, 4706, 525, 1491, 16506, 2396, 4489, 29918, 354, 332, 6765, 29889, 2029, 29961, 2176, 29918, 354, 332, 6765, 1839, 1491, 16506, 2033, 2804, 29871, 29900, 1822, 12181, 29961, 29900, 1402, 13, 4706, 525, 3075, 1981, 296, 2396, 4489, 29918, 354, 332, 6765, 29889, 2029, 29961, 2176, 29918, 354, 332, 6765, 1839, 3075, 1981, 296, 2033, 2804, 29871, 29900, 1822, 12181, 29961, 29900, 29962, 13, 1678, 500, 13, 1678, 540, 332, 6765, 353, 6024, 2506, 936, 742, 525, 3075, 1981, 296, 742, 525, 1491, 16506, 2033, 13, 13, 1678, 4236, 29918, 1707, 353, 1284, 29918, 3317, 29918, 1707, 29898, 2176, 29918, 354, 332, 6765, 1839, 5927, 3097, 13359, 25027, 391, 3101, 13, 13, 1678, 363, 540, 332, 4695, 297, 540, 332, 6765, 29901, 13, 4706, 2537, 29879, 353, 5159, 13, 4706, 4236, 29918, 2611, 2925, 29918, 517, 29918, 5317, 353, 4236, 29918, 2611, 2925, 29918, 354, 332, 4695, 29961, 354, 332, 4695, 29962, 13, 4706, 4489, 29918, 3784, 29918, 354, 332, 4695, 353, 4489, 29918, 354, 332, 6765, 29889, 2029, 29961, 2176, 29918, 354, 332, 6765, 29961, 354, 332, 4695, 29962, 2804, 29871, 29900, 29962, 13, 4706, 396, 4489, 29918, 720, 414, 29918, 11249, 29881, 353, 4489, 29918, 720, 414, 29889, 11249, 29898, 29876, 29922, 3317, 29918, 2611, 2925, 29918, 517, 29918, 5317, 29899, 2176, 29918, 3784, 29918, 354, 332, 4695, 29889, 12181, 29961, 29900, 2314, 13, 4706, 4489, 29918, 720, 414, 29918, 11249, 29881, 353, 4489, 29918, 720, 414, 29889, 11249, 29898, 29876, 29922, 2176, 29918, 3784, 29918, 354, 332, 4695, 29889, 12181, 29961, 29900, 14178, 29906, 29897, 13, 4706, 4489, 29918, 3784, 29918, 354, 332, 4695, 353, 4489, 29918, 3784, 29918, 354, 332, 4695, 29889, 4397, 29898, 2176, 29918, 720, 414, 29918, 11249, 29881, 29892, 11455, 29918, 2248, 29922, 5574, 29897, 13, 13, 4706, 396, 835, 5012, 29963, 835, 13, 4706, 396, 363, 9358, 297, 3464, 29898, 7827, 29918, 1022, 2878, 29879, 1125, 13, 4706, 396, 835, 5012, 29963, 835, 13, 4706, 363, 9358, 297, 3464, 29898, 29906, 29892, 7827, 29918, 1022, 2878, 29879, 1125, 13, 9651, 4489, 29918, 3784, 29918, 354, 332, 4695, 29918, 1022, 2878, 353, 4489, 29918, 3784, 29918, 354, 332, 4695, 29889, 8552, 580, 13, 9651, 396, 1596, 29898, 2176, 29918, 3784, 29918, 354, 332, 4695, 29918, 1022, 2878, 1839, 5527, 5084, 11287, 13, 9651, 16420, 29918, 1022, 2878, 353, 7442, 29889, 294, 2378, 29898, 2176, 29918, 3784, 29918, 354, 332, 4695, 29918, 1022, 2878, 1839, 5527, 5084, 13359, 25027, 391, 3101, 7503, 29892, 1022, 1822, 1579, 8606, 580, 13, 9651, 722, 29918, 1022, 2878, 353, 7442, 29889, 294, 2378, 29898, 2176, 29918, 3784, 29918, 354, 332, 4695, 29918, 1022, 2878, 1839, 5927, 3097, 13359, 25027, 391, 3101, 7503, 29892, 1022, 1822, 1579, 8606, 580, 13, 9651, 1959, 2264, 29918, 1022, 2878, 353, 7442, 29889, 294, 2378, 29898, 2176, 29918, 3784, 29918, 354, 332, 4695, 29918, 1022, 2878, 1839, 15728, 2264, 13359, 25027, 391, 3101, 7503, 29892, 1022, 1822, 1579, 8606, 580, 13, 9651, 4489, 29918, 3784, 29918, 354, 332, 4695, 29918, 1022, 2878, 29889, 8865, 18959, 5527, 5084, 742, 525, 5927, 3097, 742, 525, 15728, 2264, 7464, 9685, 29922, 29896, 29897, 13, 9651, 4489, 29918, 3784, 29918, 354, 332, 4695, 29918, 1022, 2878, 1839, 5527, 5084, 2033, 353, 16420, 29918, 1022, 2878, 13, 9651, 4489, 29918, 3784, 29918, 354, 332, 4695, 29918, 1022, 2878, 1839, 5927, 3097, 2033, 353, 722, 29918, 1022, 2878, 13, 9651, 4489, 29918, 3784, 29918, 354, 332, 4695, 29918, 1022, 2878, 1839, 15728, 2264, 2033, 353, 1959, 2264, 29918, 1022, 2878, 13, 9651, 2537, 353, 6492, 29918, 354, 332, 6765, 29918, 28084, 29898, 2176, 29918, 3784, 29918, 354, 332, 4695, 29918, 1022, 2878, 29892, 2897, 29889, 2084, 29889, 7122, 29898, 5085, 29889, 26762, 29918, 3972, 29892, 525, 14968, 29918, 26762, 5477, 298, 434, 29918, 16414, 29922, 354, 332, 4695, 29892, 13, 462, 18884, 3611, 2433, 29912, 2403, 1022, 2878, 648, 29913, 4286, 4830, 29898, 354, 332, 4695, 29892, 9358, 511, 4236, 29918, 1707, 29922, 3317, 29918, 1707, 29897, 13, 9651, 2537, 29879, 29889, 4397, 29898, 13441, 29918, 1003, 29918, 517, 29918, 2749, 29898, 1003, 876, 13, 4706, 565, 330, 361, 29901, 13, 9651, 9049, 5085, 29918, 3539, 353, 11117, 29888, 567, 2396, 29871, 29896, 29889, 29900, 29892, 525, 12150, 3950, 2396, 525, 29876, 29939, 10827, 13, 9651, 330, 361, 29918, 2084, 353, 2897, 29889, 2084, 29889, 7122, 29898, 5085, 29889, 26762, 29918, 3972, 29892, 376, 14968, 29918, 26762, 613, 285, 29915, 29911, 4717, 1177, 648, 1022, 2403, 1022, 2878, 29879, 29889, 18660, 1495, 13, 9651, 396, 330, 361, 29918, 2084, 353, 285, 29915, 29912, 5085, 29889, 26762, 29918, 3972, 6822, 29912, 354, 332, 4695, 3227, 1022, 2403, 1022, 2878, 29879, 29889, 18660, 29915, 13, 9651, 1967, 601, 29889, 29885, 326, 7620, 29898, 18660, 29918, 2084, 29892, 2537, 29879, 29892, 285, 567, 29922, 29896, 29897, 13, 9651, 17927, 29889, 3888, 29898, 29888, 29908, 29909, 1195, 630, 330, 361, 7160, 304, 426, 18660, 29918, 2084, 27195, 13, 13, 1678, 4489, 29918, 354, 332, 6765, 29918, 28084, 353, 6837, 29918, 354, 332, 6765, 29918, 1643, 29918, 14968, 29898, 2176, 29918, 354, 332, 6765, 29897, 13, 1678, 2537, 29879, 353, 5159, 13, 1678, 396, 835, 5012, 29963, 835, 13, 1678, 396, 363, 9358, 297, 3464, 29898, 7827, 29918, 1022, 2878, 29879, 1125, 13, 1678, 396, 835, 5012, 29963, 835, 13, 1678, 4489, 29918, 720, 414, 29918, 11249, 29881, 353, 4489, 29918, 720, 414, 29889, 11249, 29898, 29876, 29922, 2176, 29918, 354, 332, 6765, 29918, 28084, 29889, 12181, 29961, 29900, 29962, 334, 29871, 29906, 29897, 13, 1678, 363, 9358, 297, 3464, 29898, 29906, 29892, 7827, 29918, 1022, 2878, 29879, 1125, 13, 4706, 4489, 29918, 354, 332, 4695, 29918, 28084, 29918, 1022, 2878, 353, 4489, 29918, 354, 332, 6765, 29918, 28084, 29889, 8552, 580, 13, 4706, 16420, 29918, 1022, 2878, 353, 7442, 29889, 294, 2378, 29898, 2176, 29918, 354, 332, 4695, 29918, 28084, 29918, 1022, 2878, 1839, 5527, 5084, 13359, 25027, 391, 3101, 7503, 29892, 9358, 1822, 1579, 8606, 580, 13, 4706, 722, 29918, 1022, 2878, 353, 7442, 29889, 294, 2378, 29898, 2176, 29918, 354, 332, 4695, 29918, 28084, 29918, 1022, 2878, 1839, 5927, 3097, 13359, 25027, 391, 3101, 7503, 29892, 9358, 1822, 1579, 8606, 580, 13, 4706, 1959, 2264, 29918, 1022, 2878, 353, 7442, 29889, 294, 2378, 29898, 2176, 29918, 354, 332, 4695, 29918, 28084, 29918, 1022, 2878, 1839, 15728, 2264, 13359, 25027, 391, 3101, 7503, 29892, 9358, 1822, 1579, 8606, 580, 13, 4706, 4489, 29918, 354, 332, 4695, 29918, 28084, 29918, 1022, 2878, 29889, 8865, 18959, 5527, 5084, 742, 525, 5927, 3097, 742, 525, 15728, 2264, 7464, 9685, 29922, 29896, 29897, 13, 4706, 4489, 29918, 354, 332, 4695, 29918, 28084, 29918, 1022, 2878, 1839, 5527, 5084, 2033, 353, 16420, 29918, 1022, 2878, 13, 4706, 4489, 29918, 354, 332, 4695, 29918, 28084, 29918, 1022, 2878, 1839, 5927, 3097, 2033, 353, 722, 29918, 1022, 2878, 13, 4706, 4489, 29918, 354, 332, 4695, 29918, 28084, 29918, 1022, 2878, 1839, 15728, 2264, 2033, 353, 1959, 2264, 29918, 1022, 2878, 13, 4706, 396, 4489, 29918, 354, 332, 4695, 29918, 28084, 29918, 1022, 2878, 353, 10518, 29889, 17685, 4197, 2176, 29918, 720, 414, 29918, 11249, 29881, 29892, 4489, 29918, 354, 332, 4695, 29918, 28084, 29918, 1022, 2878, 2314, 13, 13, 13, 4706, 2537, 353, 6492, 29918, 354, 332, 6765, 29918, 6194, 29898, 2176, 29918, 354, 332, 4695, 29918, 28084, 29918, 1022, 2878, 29892, 359, 29889, 2084, 29889, 7122, 29898, 5085, 29889, 26762, 29918, 3972, 29892, 376, 14968, 29918, 26762, 4968, 3257, 29922, 29888, 29915, 9606, 15551, 1254, 2965, 29903, 29918, 1164, 16786, 648, 1022, 29913, 742, 4236, 29918, 1707, 29922, 3317, 29918, 1707, 29897, 13, 4706, 2537, 29879, 29889, 4397, 29898, 13441, 29918, 1003, 29918, 517, 29918, 2749, 29898, 1003, 876, 13, 1678, 565, 330, 361, 29901, 13, 4706, 9049, 5085, 29918, 3539, 353, 11117, 29888, 567, 2396, 29871, 29896, 29889, 29900, 29892, 525, 12150, 3950, 2396, 525, 29876, 29939, 10827, 13, 4706, 330, 361, 29918, 2084, 353, 2897, 29889, 2084, 29889, 7122, 29898, 5085, 29889, 26762, 29918, 3972, 29892, 376, 14968, 29918, 26762, 613, 285, 29915, 29911, 4717, 1177, 648, 1022, 2403, 1022, 2878, 29879, 29918, 9818, 29889, 18660, 1495, 13, 4706, 396, 330, 361, 29918, 2084, 353, 285, 29915, 29912, 5085, 29889, 26762, 29918, 3972, 6822, 9606, 15551, 1254, 2965, 29903, 29918, 1164, 16786, 648, 1022, 2403, 1022, 2878, 29879, 29889, 18660, 29915, 13, 4706, 1967, 601, 29889, 29885, 326, 7620, 29898, 18660, 29918, 2084, 29892, 2537, 29879, 29892, 285, 567, 29922, 29896, 29897, 13, 4706, 17927, 29889, 3888, 29898, 29888, 29908, 29909, 1195, 630, 330, 361, 7160, 304, 426, 18660, 29918, 2084, 27195, 13, 13, 1753, 6492, 29918, 14513, 29918, 1022, 2878, 29879, 29898, 5085, 29892, 1178, 29918, 5415, 29892, 288, 397, 29918, 5415, 29892, 330, 361, 353, 5574, 1125, 13, 1678, 1178, 29918, 29881, 2926, 1199, 29892, 1178, 29918, 354, 332, 6765, 29892, 1178, 29918, 13492, 29918, 13140, 29892, 1178, 29918, 11965, 353, 1178, 29918, 5415, 29961, 29900, 1402, 1178, 29918, 5415, 29961, 29896, 1402, 1178, 29918, 5415, 29961, 29906, 1402, 1178, 29918, 5415, 29961, 29941, 29962, 13, 1678, 288, 397, 29918, 29881, 2926, 1199, 29892, 288, 397, 29918, 354, 332, 6765, 29892, 288, 397, 29918, 13492, 29918, 13140, 29892, 288, 397, 29918, 11965, 353, 288, 397, 29918, 5415, 29961, 29900, 1402, 288, 397, 29918, 5415, 29961, 29896, 1402, 288, 397, 29918, 5415, 29961, 29906, 1402, 288, 397, 29918, 5415, 29961, 29941, 29962, 13, 1678, 3001, 29918, 1022, 2878, 29879, 353, 7431, 29898, 1761, 29898, 333, 29918, 29881, 2926, 1199, 29889, 5975, 3101, 29961, 29900, 29962, 3366, 1188, 1169, 20068, 13, 1678, 4489, 29918, 333, 29892, 903, 353, 10272, 29918, 14968, 29918, 4518, 29918, 2527, 10817, 29918, 546, 29918, 1022, 2878, 29898, 333, 29918, 29881, 2926, 1199, 29892, 1178, 29918, 354, 332, 6765, 29892, 1178, 29918, 13492, 29918, 13140, 29892, 4464, 543, 14513, 1159, 13, 1678, 4489, 29918, 2092, 29892, 903, 353, 10272, 29918, 14968, 29918, 4518, 29918, 2527, 10817, 29918, 546, 29918, 1022, 2878, 29898, 2092, 29918, 29881, 2926, 1199, 29892, 288, 397, 29918, 354, 332, 6765, 29892, 288, 397, 29918, 13492, 29918, 13140, 29892, 4464, 543, 14513, 1159, 13, 1678, 4489, 29918, 2092, 1839, 2092, 2033, 353, 29871, 29896, 13, 1678, 4489, 29918, 333, 1839, 2092, 2033, 353, 29871, 29900, 13, 1678, 1178, 29918, 4518, 29918, 9507, 353, 2897, 29889, 2084, 29889, 7122, 29898, 5085, 29889, 4299, 29918, 3972, 29892, 285, 29908, 29875, 333, 29918, 2527, 10817, 29889, 3126, 29880, 1159, 13, 1678, 4489, 29918, 333, 29889, 517, 29918, 3126, 29898, 333, 29918, 4518, 29918, 9507, 29892, 13, 1669, 7769, 2433, 3757, 4339, 742, 13, 1669, 3454, 29922, 5574, 29897, 13, 1678, 288, 397, 29918, 4518, 29918, 9507, 353, 2897, 29889, 2084, 29889, 7122, 29898, 5085, 29889, 4299, 29918, 3972, 29892, 285, 29908, 2092, 29918, 2527, 10817, 29889, 3126, 29880, 1159, 13, 1678, 4489, 29918, 2092, 29889, 517, 29918, 3126, 29898, 2092, 29918, 4518, 29918, 9507, 29892, 13, 462, 29871, 7769, 2433, 3757, 4339, 742, 13, 462, 29871, 3454, 29922, 5574, 29897, 13, 1678, 17927, 29889, 3888, 29898, 29888, 29908, 10095, 10817, 2729, 373, 382, 791, 22554, 1199, 3971, 304, 426, 333, 29918, 4518, 29918, 9507, 29913, 322, 426, 2092, 29918, 4518, 29918, 9507, 27195, 13, 13, 1678, 4489, 353, 10518, 29889, 17685, 4197, 2176, 29918, 333, 29892, 4489, 29918, 2092, 2314, 13, 13, 1678, 4236, 29918, 1707, 353, 1284, 29918, 3317, 29918, 1707, 29898, 2176, 1839, 5927, 3097, 13359, 25027, 391, 3101, 13, 1678, 4489, 29918, 354, 332, 6765, 353, 4489, 29889, 2029, 15625, 2176, 3366, 2506, 936, 3108, 2804, 29871, 29900, 29897, 891, 313, 2176, 3366, 3075, 1981, 296, 3108, 2804, 29871, 29900, 29897, 891, 313, 2176, 3366, 1491, 16506, 3108, 2804, 29871, 29900, 4638, 13, 1678, 4489, 29918, 2092, 353, 4489, 29889, 2029, 15625, 2176, 3366, 2092, 3108, 2804, 29871, 29900, 4638, 13, 13, 1678, 4489, 29918, 535, 29883, 824, 353, 10518, 29889, 17685, 4197, 2176, 29918, 354, 332, 6765, 29892, 4489, 29918, 2092, 2314, 13, 1678, 4489, 29918, 535, 29883, 824, 353, 6837, 29918, 354, 332, 6765, 29918, 1643, 29918, 14513, 29898, 2176, 29918, 535, 29883, 824, 29897, 13, 13, 1678, 4489, 29918, 720, 414, 353, 4489, 29889, 2029, 15625, 2176, 3366, 2506, 936, 3108, 1275, 29871, 29900, 29897, 669, 313, 2176, 3366, 3075, 1981, 296, 3108, 1275, 29871, 29900, 29897, 669, 313, 2176, 3366, 1491, 16506, 3108, 1275, 29871, 29900, 29897, 669, 313, 2176, 3366, 2092, 3108, 1275, 29871, 29900, 4638, 13, 1678, 1596, 29898, 2176, 29918, 720, 414, 29889, 12181, 29897, 13, 1678, 1596, 29898, 2176, 29918, 2092, 29889, 12181, 29897, 13, 1678, 4489, 29918, 720, 414, 29918, 11249, 353, 4489, 29918, 720, 414, 29889, 11249, 29898, 29876, 29922, 938, 29898, 9302, 29889, 27696, 29898, 2176, 29918, 2092, 29889, 12181, 29961, 29900, 12622, 565, 4489, 29918, 2092, 29889, 12181, 29961, 29900, 29962, 529, 4489, 29918, 720, 414, 29889, 12181, 29961, 29900, 29962, 1683, 4489, 29918, 720, 414, 29889, 12181, 29961, 29900, 29962, 29871, 1723, 13, 1678, 4489, 353, 10518, 29889, 17685, 4197, 2176, 29918, 535, 29883, 824, 29892, 4489, 29918, 720, 414, 29918, 11249, 2314, 13, 1678, 4489, 353, 4489, 29889, 5589, 1056, 703, 1217, 540, 332, 4695, 1159, 13, 13, 1678, 1596, 29898, 2176, 29918, 354, 332, 6765, 29889, 12181, 29961, 29900, 1402, 4489, 29918, 720, 414, 29918, 11249, 29889, 12181, 29961, 29900, 1402, 4489, 29918, 2092, 29889, 12181, 29961, 29900, 2314, 13, 13, 1678, 2537, 29879, 353, 5159, 13, 1678, 282, 26456, 29922, 1524, 29898, 29879, 1983, 29889, 14116, 29880, 29918, 29886, 26456, 29898, 2435, 29898, 9302, 29889, 13092, 29898, 2176, 3366, 28084, 29918, 354, 26268, 293, 29918, 1643, 16862, 25027, 391, 22130, 29974, 29896, 876, 13, 1678, 396, 835, 5012, 29963, 835, 13, 1678, 396, 363, 9358, 297, 3464, 29898, 7827, 29918, 1022, 2878, 29879, 1125, 13, 1678, 396, 835, 5012, 29963, 835, 13, 1678, 363, 9358, 297, 3464, 29898, 29906, 29892, 3001, 29918, 1022, 2878, 29879, 1125, 13, 4706, 4489, 29918, 354, 332, 4695, 29918, 28084, 29918, 1022, 2878, 353, 4489, 29889, 8552, 580, 13, 4706, 16420, 29918, 1022, 2878, 353, 7442, 29889, 294, 2378, 29898, 2176, 29918, 354, 332, 4695, 29918, 28084, 29918, 1022, 2878, 1839, 5527, 5084, 13359, 25027, 391, 3101, 7503, 29892, 9358, 1822, 1579, 8606, 580, 13, 4706, 722, 29918, 1022, 2878, 353, 7442, 29889, 294, 2378, 29898, 2176, 29918, 354, 332, 4695, 29918, 28084, 29918, 1022, 2878, 1839, 5927, 3097, 13359, 25027, 391, 3101, 7503, 29892, 9358, 1822, 1579, 8606, 580, 13, 4706, 1959, 2264, 29918, 1022, 2878, 353, 7442, 29889, 294, 2378, 29898, 2176, 29918, 354, 332, 4695, 29918, 28084, 29918, 1022, 2878, 1839, 15728, 2264, 13359, 25027, 391, 3101, 7503, 29892, 9358, 1822, 1579, 8606, 580, 13, 4706, 4489, 29918, 354, 332, 4695, 29918, 28084, 29918, 1022, 2878, 29889, 8865, 18959, 5527, 5084, 742, 525, 5927, 3097, 742, 525, 15728, 2264, 7464, 9685, 29922, 29896, 29897, 13, 4706, 4489, 29918, 354, 332, 4695, 29918, 28084, 29918, 1022, 2878, 1839, 5527, 5084, 2033, 353, 16420, 29918, 1022, 2878, 13, 4706, 4489, 29918, 354, 332, 4695, 29918, 28084, 29918, 1022, 2878, 1839, 5927, 3097, 2033, 353, 722, 29918, 1022, 2878, 13, 4706, 4489, 29918, 354, 332, 4695, 29918, 28084, 29918, 1022, 2878, 1839, 15728, 2264, 2033, 353, 1959, 2264, 29918, 1022, 2878, 13, 13, 4706, 2537, 353, 6492, 29918, 354, 332, 6765, 29918, 6194, 29898, 2176, 29918, 354, 332, 4695, 29918, 28084, 29918, 1022, 2878, 29892, 2897, 29889, 2084, 29889, 7122, 29898, 5085, 29889, 26762, 29918, 3972, 29892, 376, 14513, 29918, 26762, 4968, 3611, 29922, 29888, 29915, 29923, 8932, 648, 1022, 29913, 742, 13, 462, 462, 259, 4236, 29918, 1707, 29922, 3317, 29918, 1707, 29892, 3114, 543, 2092, 1159, 13, 4706, 2537, 29879, 29889, 4397, 29898, 13441, 29918, 1003, 29918, 517, 29918, 2749, 29898, 1003, 876, 13, 1678, 565, 330, 361, 29901, 13, 4706, 9049, 5085, 29918, 3539, 353, 11117, 29888, 567, 2396, 29871, 29896, 29889, 29900, 29892, 525, 12150, 3950, 2396, 525, 29876, 29939, 10827, 13, 4706, 330, 361, 29918, 2084, 353, 2897, 29889, 2084, 29889, 7122, 29898, 5085, 29889, 26762, 29918, 3972, 29892, 376, 14513, 29918, 26762, 613, 285, 29915, 29923, 8932, 648, 1022, 2403, 1022, 2878, 29879, 29889, 18660, 1495, 13, 4706, 1967, 601, 29889, 29885, 326, 7620, 29898, 18660, 29918, 2084, 29892, 2537, 29879, 29892, 285, 567, 29922, 29896, 29897, 13, 4706, 17927, 29889, 3888, 29898, 29888, 29908, 29909, 1195, 630, 330, 361, 7160, 304, 426, 18660, 29918, 2084, 27195, 13, 13, 13, 1753, 3588, 29918, 1003, 29918, 517, 29918, 2749, 29898, 1003, 1125, 13, 1678, 2537, 29889, 15257, 29889, 4012, 580, 29871, 396, 4216, 278, 10508, 29892, 7090, 278, 4050, 261, 13, 1678, 1967, 353, 7442, 29889, 3166, 9040, 29898, 1003, 29889, 15257, 29889, 517, 1807, 29918, 23973, 3285, 26688, 2433, 13470, 29947, 1495, 13, 1678, 1967, 353, 1967, 29889, 690, 14443, 29898, 1003, 29889, 15257, 29889, 657, 29918, 2103, 29918, 3545, 580, 29961, 1057, 29899, 29896, 29962, 718, 313, 29941, 29892, 876, 13, 1678, 736, 1967, 13, 13, 1753, 10272, 29918, 14968, 29918, 4518, 29918, 2527, 10817, 29898, 26495, 29918, 29881, 2926, 1199, 29892, 540, 332, 6765, 29892, 2441, 29918, 333, 29892, 12138, 29918, 449, 1125, 13, 1678, 16420, 29918, 353, 6571, 13, 1678, 1197, 3097, 29918, 353, 6571, 13, 1678, 16897, 29918, 695, 7749, 404, 29918, 353, 6571, 13, 1678, 1959, 2264, 29918, 353, 6571, 13, 1678, 9566, 1319, 2264, 29918, 353, 6571, 13, 1678, 19566, 936, 353, 6571, 13, 1678, 10719, 296, 353, 6571, 13, 1678, 1014, 16506, 353, 6571, 13, 1678, 2441, 29918, 4841, 353, 6571, 13, 13, 1678, 396, 6680, 29879, 304, 367, 7436, 304, 278, 848, 29889, 13, 1678, 1197, 3097, 29918, 9891, 353, 14013, 1970, 29901, 7442, 29889, 4172, 29898, 5527, 29897, 13, 1678, 16897, 29918, 695, 7749, 404, 29918, 9891, 353, 14013, 1970, 29901, 1970, 334, 313, 29896, 448, 1970, 29897, 13, 1678, 6410, 353, 4842, 305, 29889, 15755, 29889, 29907, 2124, 5292, 14441, 29931, 2209, 580, 13, 1678, 954, 29918, 4260, 29918, 1022, 2878, 29879, 353, 7431, 29898, 1761, 29898, 26495, 29918, 29881, 2926, 1199, 29889, 5975, 3101, 29961, 29900, 29962, 3366, 1188, 1169, 20068, 13, 13, 1678, 17927, 29889, 3888, 29898, 29888, 29908, 20606, 292, 6694, 19753, 4822, 426, 1949, 29918, 4260, 29918, 1022, 2878, 29879, 29913, 21502, 12168, 1159, 13, 1678, 17927, 29889, 3888, 703, 10095, 10817, 15712, 29901, 16420, 29892, 1197, 3097, 29892, 1959, 2264, 29892, 9566, 1319, 2264, 29892, 16897, 29918, 695, 7749, 404, 1159, 13, 13, 1678, 1480, 1169, 353, 426, 29875, 29901, 5159, 363, 474, 297, 3464, 29898, 1949, 29918, 4260, 29918, 1022, 2878, 29879, 2915, 13, 1678, 22525, 353, 426, 29875, 29901, 5159, 363, 474, 297, 3464, 29898, 1949, 29918, 4260, 29918, 1022, 2878, 29879, 2915, 13, 1678, 6694, 29918, 562, 2764, 4135, 353, 2322, 8977, 29898, 7411, 29897, 13, 13, 1678, 363, 16605, 297, 260, 29939, 18933, 29889, 29873, 29939, 18933, 29898, 26495, 29918, 29881, 2926, 1199, 1125, 13, 4706, 1959, 2264, 29918, 509, 355, 353, 5159, 13, 4706, 1565, 29918, 771, 5824, 29918, 509, 355, 353, 5159, 13, 13, 4706, 2407, 353, 6694, 29918, 29881, 2926, 1199, 29961, 2543, 333, 29962, 13, 4706, 363, 474, 29892, 21502, 305, 29918, 1188, 1169, 297, 26985, 29898, 11651, 3366, 1188, 1169, 3108, 1125, 13, 9651, 565, 474, 6736, 7431, 29898, 1188, 1169, 29889, 8149, 580, 1125, 13, 18884, 2867, 13, 9651, 2070, 29879, 353, 4842, 305, 29889, 15755, 29889, 2220, 284, 29889, 2695, 3317, 29898, 7345, 305, 29889, 29911, 6073, 29898, 1022, 2878, 29918, 1188, 1169, 511, 3964, 10457, 29896, 29897, 13, 9651, 1565, 29918, 1990, 29918, 22795, 353, 5785, 29898, 771, 5824, 29961, 11651, 3366, 29887, 1025, 3108, 2314, 13, 9651, 1565, 29918, 771, 5824, 29918, 509, 355, 29889, 4397, 29898, 3009, 29918, 1990, 29918, 22795, 29897, 13, 13, 9651, 18988, 353, 7442, 29889, 1191, 3317, 29898, 1022, 2878, 29918, 1188, 1169, 29897, 13, 9651, 338, 29918, 15728, 353, 313, 11965, 2463, 1275, 2407, 3366, 29887, 1025, 3108, 467, 667, 580, 13, 9651, 1959, 2264, 29918, 509, 355, 29889, 4397, 29898, 275, 29918, 15728, 29897, 13, 13, 9651, 6694, 29918, 562, 2764, 4135, 29961, 29875, 29962, 4619, 338, 29918, 15728, 13, 9651, 1480, 1169, 29961, 29875, 1822, 4397, 29898, 1022, 2878, 29918, 1188, 1169, 29897, 13, 9651, 22525, 29961, 29875, 1822, 4397, 29898, 11651, 3366, 29887, 1025, 20068, 13, 13, 4706, 565, 12138, 29918, 449, 529, 954, 29918, 4260, 29918, 1022, 2878, 29879, 29901, 13, 9651, 1959, 2264, 29918, 509, 355, 353, 1959, 2264, 29918, 509, 355, 7503, 18712, 29918, 449, 29962, 13, 9651, 1565, 29918, 771, 5824, 29918, 509, 355, 353, 1565, 29918, 771, 5824, 29918, 509, 355, 7503, 18712, 29918, 449, 29962, 13, 13, 4706, 1959, 2264, 29918, 29961, 2543, 333, 29962, 353, 10272, 29918, 15728, 2264, 29898, 15728, 2264, 29918, 509, 355, 29897, 13, 4706, 16420, 29918, 29961, 2543, 333, 29962, 353, 7442, 29889, 12676, 29898, 3009, 29918, 771, 5824, 29918, 509, 355, 29897, 13, 4706, 1197, 3097, 29918, 29961, 2543, 333, 29962, 353, 1197, 3097, 29918, 9891, 29898, 3009, 29918, 771, 5824, 29918, 509, 355, 29897, 13, 13, 4706, 9566, 1319, 2264, 29918, 29961, 2543, 333, 29962, 353, 10272, 29918, 1454, 657, 1319, 2264, 29898, 15728, 2264, 29918, 509, 355, 29897, 13, 4706, 16897, 29918, 695, 7749, 404, 29918, 29961, 2543, 333, 29962, 353, 16897, 29918, 695, 7749, 404, 29918, 9891, 29898, 5527, 5084, 29918, 29961, 2543, 333, 2314, 13, 4706, 19566, 936, 29961, 2543, 333, 29962, 353, 540, 332, 6765, 29961, 2543, 333, 29962, 3366, 2506, 936, 3108, 13, 4706, 10719, 296, 29961, 2543, 333, 29962, 353, 540, 332, 6765, 29961, 2543, 333, 29962, 3366, 3075, 1981, 296, 3108, 13, 4706, 1014, 16506, 29961, 2543, 333, 29962, 353, 540, 332, 6765, 29961, 2543, 333, 29962, 3366, 1491, 16506, 3108, 13, 4706, 2441, 29918, 4841, 29961, 2543, 333, 29962, 353, 2441, 29918, 333, 29961, 2543, 333, 29962, 13, 13, 1678, 396, 10575, 451, 6602, 24034, 29892, 577, 5330, 8253, 29889, 13, 1678, 321, 3232, 29918, 1707, 353, 7442, 29889, 12676, 29898, 1761, 29898, 5927, 3097, 5396, 5975, 22130, 13, 13, 1678, 1897, 29918, 7039, 353, 6024, 2543, 333, 742, 13, 462, 1678, 525, 2248, 742, 13, 462, 1678, 525, 386, 12268, 29918, 695, 7749, 404, 742, 13, 462, 1678, 525, 5527, 5084, 742, 13, 462, 1678, 525, 5927, 3097, 742, 13, 462, 1678, 525, 15728, 2264, 742, 13, 462, 1678, 525, 1454, 657, 1319, 2264, 742, 525, 2506, 936, 742, 525, 3075, 1981, 296, 742, 525, 1491, 16506, 742, 525, 13492, 29918, 333, 2033, 13, 1678, 4489, 353, 10518, 29889, 17271, 4197, 29961, 2543, 333, 29892, 13, 462, 4706, 474, 29892, 13, 462, 4706, 16897, 29918, 695, 7749, 404, 29918, 29961, 2543, 333, 1402, 13, 462, 4706, 16420, 29918, 29961, 2543, 333, 1402, 13, 462, 4706, 1197, 3097, 29918, 29961, 2543, 333, 1402, 13, 462, 4706, 1959, 2264, 29918, 29961, 2543, 333, 1402, 13, 462, 4706, 9566, 1319, 2264, 29918, 29961, 2543, 333, 1402, 13, 462, 4706, 19566, 936, 29961, 2543, 333, 1402, 13, 462, 4706, 10719, 296, 29961, 2543, 333, 1402, 13, 462, 4706, 1014, 16506, 29961, 2543, 333, 1402, 13, 462, 4706, 2441, 29918, 4841, 29961, 2543, 333, 29962, 13, 462, 4706, 4514, 363, 474, 29892, 16605, 297, 26985, 29898, 15728, 2264, 19925, 1402, 4341, 29922, 4914, 29918, 7039, 29897, 13, 1678, 4489, 29918, 14968, 353, 10518, 29889, 17271, 4197, 29961, 29875, 29892, 13, 462, 795, 6410, 29898, 7345, 305, 29889, 29911, 6073, 29898, 1188, 1169, 29961, 29875, 11724, 4842, 305, 29889, 8208, 29911, 6073, 29898, 5182, 29879, 29961, 29875, 2314, 467, 667, 580, 847, 7431, 29898, 13, 462, 462, 29871, 6694, 29918, 29881, 2926, 1199, 511, 13, 462, 795, 6694, 29918, 562, 2764, 4135, 29961, 29875, 29962, 847, 7431, 29898, 26495, 29918, 29881, 2926, 1199, 29897, 13, 462, 795, 4514, 363, 474, 297, 3464, 29898, 1949, 29918, 4260, 29918, 1022, 2878, 29879, 29897, 1402, 13, 462, 9651, 4341, 29922, 1839, 1022, 2878, 742, 525, 6758, 742, 525, 14968, 29918, 5753, 11287, 13, 1678, 736, 4489, 29892, 4489, 29918, 14968, 13, 13, 1753, 6492, 29918, 354, 332, 6765, 29918, 6194, 29898, 13, 462, 29871, 4489, 29901, 10518, 29889, 17271, 29892, 13, 462, 29871, 6492, 29918, 3972, 29901, 2897, 29889, 2084, 29892, 13, 462, 29871, 3611, 29901, 851, 353, 15516, 4078, 29922, 5574, 29892, 4236, 29918, 1707, 29922, 29900, 29889, 29945, 29892, 3114, 29922, 8516, 29892, 282, 26456, 353, 6213, 1125, 13, 1678, 565, 451, 2897, 29889, 2084, 29889, 9933, 29898, 5317, 29918, 3972, 1125, 13, 4706, 2897, 29889, 29885, 12535, 12935, 29898, 5317, 29918, 3972, 29897, 13, 1678, 1667, 29918, 16414, 353, 525, 5927, 3097, 29915, 13, 1678, 916, 29918, 16414, 353, 525, 5527, 5084, 29915, 13, 13, 1678, 298, 434, 353, 376, 28084, 29918, 354, 26268, 293, 29918, 1643, 29908, 13, 13, 1678, 954, 29918, 29882, 1041, 353, 7431, 29898, 2176, 29961, 29882, 434, 1822, 13092, 2141, 25027, 391, 3101, 13, 13, 1678, 2537, 29892, 4853, 29900, 353, 14770, 29889, 1491, 26762, 29898, 29896, 29892, 29871, 29896, 29892, 2537, 2311, 7607, 29896, 29906, 29892, 29871, 29896, 29900, 876, 13, 1678, 396, 14542, 852, 263, 282, 26456, 29889, 13, 1678, 5112, 353, 269, 1983, 29889, 29881, 2147, 3460, 29918, 29886, 26456, 29898, 29906, 29953, 29900, 29892, 29871, 29896, 29945, 29892, 302, 29922, 1949, 29918, 29882, 1041, 29892, 16345, 29922, 29896, 29900, 29892, 4818, 543, 26031, 1159, 13, 1678, 6492, 353, 269, 1983, 29889, 1557, 2620, 5317, 29898, 29916, 29922, 3396, 29918, 16414, 29892, 13, 462, 965, 343, 29922, 1228, 29918, 16414, 29892, 13, 462, 965, 4853, 29922, 1165, 29900, 29892, 13, 462, 965, 848, 29922, 2176, 29892, 13, 462, 965, 298, 434, 29922, 29882, 434, 29892, 13, 462, 965, 396, 282, 26456, 29922, 7830, 29892, 13, 462, 965, 396, 3114, 29922, 29882, 434, 29892, 13, 462, 965, 269, 29922, 29941, 29900, 29892, 13, 462, 965, 3114, 29922, 3293, 29892, 13, 462, 965, 17456, 353, 525, 29877, 29915, 565, 3114, 338, 451, 6213, 1683, 6213, 29892, 13, 462, 965, 396, 282, 26456, 543, 3891, 29896, 29900, 29908, 13, 462, 965, 396, 282, 26456, 29922, 1839, 12692, 742, 525, 272, 927, 742, 525, 29890, 4708, 742, 525, 29881, 397, 914, 9539, 742, 525, 1127, 2033, 13, 462, 965, 282, 26456, 353, 282, 26456, 565, 282, 26456, 1683, 376, 3891, 29896, 29900, 29908, 13, 462, 965, 1723, 13, 13, 1678, 396, 530, 1333, 403, 2169, 1080, 29889, 13, 1678, 289, 29890, 353, 14013, 274, 29901, 9657, 29898, 1884, 3293, 543, 14486, 29892, 8305, 29922, 29900, 29889, 29941, 613, 21226, 29922, 29883, 29892, 301, 29893, 29922, 29906, 29892, 285, 29883, 543, 10921, 1159, 13, 1678, 3653, 29918, 6735, 403, 353, 14013, 1426, 29892, 921, 11078, 29892, 289, 12328, 29901, 4853, 29900, 29889, 6735, 403, 29898, 726, 29892, 13, 462, 462, 462, 4706, 921, 29891, 29922, 3594, 29883, 29892, 13, 462, 462, 462, 4706, 921, 29891, 1111, 4339, 543, 1165, 267, 15958, 613, 13, 462, 462, 462, 4706, 4079, 2311, 29922, 29896, 29945, 29892, 13, 462, 462, 462, 4706, 2927, 2433, 8517, 742, 13, 462, 462, 462, 4706, 2947, 543, 5064, 613, 13, 462, 462, 462, 4706, 447, 543, 5064, 613, 13, 462, 462, 462, 4706, 13733, 29922, 29941, 29945, 29900, 29892, 13, 462, 462, 462, 4706, 289, 1884, 29922, 1327, 29898, 1327, 29883, 876, 13, 1678, 385, 29896, 353, 3653, 29918, 6735, 403, 703, 14727, 681, 613, 921, 11078, 7607, 29900, 29889, 29929, 29892, 29871, 29900, 29889, 29945, 511, 289, 12328, 2433, 8517, 1495, 13, 1678, 385, 29906, 353, 3653, 29918, 6735, 403, 703, 29872, 8995, 29899, 517, 29899, 19668, 613, 921, 11078, 7607, 29900, 29889, 29906, 29955, 29892, 29871, 29900, 29889, 29947, 29945, 511, 289, 12328, 2433, 29878, 1495, 13, 1678, 385, 29941, 353, 3653, 29918, 6735, 403, 703, 6800, 29899, 517, 29899, 19668, 613, 921, 11078, 7607, 29900, 29889, 29941, 29945, 29892, 29871, 29900, 29889, 29906, 29945, 511, 289, 12328, 2433, 29890, 1495, 13, 13, 1678, 6492, 29889, 26172, 29898, 29876, 1054, 29922, 29896, 29892, 289, 1884, 29918, 517, 29918, 25367, 11759, 29900, 29889, 29896, 29955, 29945, 29892, 29871, 29900, 29889, 29945, 1402, 1180, 2433, 1266, 742, 4079, 2311, 353, 29915, 9278, 1495, 13, 1678, 6492, 29889, 842, 29918, 29916, 1643, 877, 5927, 3097, 1495, 13, 1678, 6492, 29889, 842, 29918, 29891, 1643, 877, 5527, 5084, 1495, 13, 1678, 6492, 29889, 842, 29918, 3257, 29898, 3257, 29897, 13, 1678, 4853, 29900, 29889, 842, 29918, 29916, 2576, 29898, 29900, 29892, 4236, 29918, 1707, 29897, 13, 1678, 4853, 29900, 29889, 842, 29918, 29891, 2576, 29898, 29900, 29892, 29871, 29896, 29897, 13, 13, 13, 1678, 2537, 29889, 29873, 523, 29918, 2680, 580, 13, 1678, 10422, 353, 285, 29915, 29912, 5317, 29918, 3972, 6822, 29912, 3257, 1836, 2732, 29915, 13, 1678, 565, 4078, 29901, 13, 4706, 2537, 29889, 7620, 1003, 29898, 9507, 29892, 270, 1631, 29922, 29941, 29900, 29900, 29897, 13, 4706, 17927, 29889, 3888, 29898, 29888, 29908, 20867, 7160, 304, 426, 9507, 27195, 13, 1678, 736, 2537, 13, 13, 1753, 6492, 29918, 354, 332, 6765, 29918, 28084, 29898, 13, 462, 29871, 4489, 29901, 10518, 29889, 17271, 29892, 13, 462, 29871, 6492, 29918, 3972, 29901, 2897, 29889, 2084, 29892, 13, 462, 29871, 298, 434, 29918, 16414, 29901, 851, 353, 525, 2506, 936, 742, 13, 462, 29871, 3611, 29901, 851, 353, 15516, 13, 462, 29871, 4078, 29922, 5574, 29892, 13, 462, 29871, 4236, 29918, 1707, 353, 29871, 29900, 29889, 29945, 1125, 13, 1678, 565, 451, 2897, 29889, 2084, 29889, 9933, 29898, 5317, 29918, 3972, 1125, 13, 4706, 2897, 29889, 29885, 12535, 12935, 29898, 5317, 29918, 3972, 29897, 13, 1678, 396, 21981, 675, 1959, 2264, 304, 263, 995, 1546, 29871, 29900, 322, 29871, 29896, 29889, 13, 1678, 12205, 353, 4489, 29889, 16645, 29898, 29725, 29918, 1154, 29922, 2892, 270, 29901, 270, 29889, 15728, 2264, 847, 270, 29889, 15728, 2264, 29889, 3317, 3101, 13, 1678, 12205, 1839, 15728, 29889, 2033, 353, 518, 29888, 29908, 29912, 29916, 29901, 29889, 29896, 29888, 5038, 363, 921, 297, 12205, 1839, 29725, 29918, 1154, 2033, 29962, 13, 13, 1678, 1667, 29918, 16414, 353, 525, 5927, 3097, 29915, 13, 1678, 916, 29918, 16414, 353, 525, 5527, 5084, 29915, 13, 13, 1678, 298, 434, 353, 298, 434, 29918, 16414, 13, 13, 1678, 954, 29918, 29882, 1041, 353, 7431, 29898, 1272, 2557, 29961, 29882, 434, 1822, 13092, 2141, 25027, 391, 3101, 13, 1678, 3114, 353, 298, 434, 29918, 16414, 565, 954, 29918, 29882, 1041, 529, 29871, 29947, 1683, 6213, 13, 13, 1678, 2537, 29892, 4853, 29900, 353, 14770, 29889, 1491, 26762, 29898, 29896, 29892, 29871, 29896, 29892, 2537, 2311, 7607, 29947, 29892, 29871, 29953, 876, 13, 13, 1678, 396, 8561, 278, 14801, 5317, 29889, 13, 1678, 396, 14542, 852, 263, 282, 26456, 29889, 13, 1678, 5112, 353, 269, 1983, 29889, 29881, 2147, 3460, 29918, 29886, 26456, 29898, 29906, 29953, 29900, 29892, 29871, 29896, 29945, 29892, 302, 29922, 1949, 29918, 29882, 1041, 29892, 16345, 29922, 29896, 29900, 29892, 4818, 543, 26031, 1159, 13, 13, 1678, 6492, 353, 269, 1983, 29889, 1557, 2620, 5317, 29898, 29916, 29922, 3396, 29918, 16414, 29892, 13, 462, 965, 343, 29922, 1228, 29918, 16414, 29892, 13, 462, 965, 4853, 29922, 1165, 29900, 29892, 13, 462, 965, 848, 29922, 2176, 29892, 13, 462, 965, 298, 434, 29922, 29882, 434, 29892, 13, 462, 965, 282, 26456, 29922, 7830, 29892, 13, 462, 965, 3114, 29922, 3293, 29892, 13, 462, 965, 269, 29922, 29941, 29900, 29897, 13, 13, 1678, 396, 530, 1333, 403, 2169, 1080, 29889, 13, 1678, 289, 29890, 353, 14013, 274, 29901, 9657, 29898, 1884, 3293, 543, 14486, 29892, 8305, 29922, 29900, 29889, 29941, 613, 21226, 29922, 29883, 29892, 301, 29893, 29922, 29906, 29892, 285, 29883, 543, 10921, 1159, 13, 1678, 3653, 29918, 6735, 403, 353, 14013, 1426, 29892, 921, 11078, 29892, 289, 12328, 29901, 4853, 29900, 29889, 6735, 403, 29898, 726, 29892, 13, 462, 462, 462, 4706, 921, 29891, 29922, 3594, 29883, 29892, 13, 462, 462, 462, 4706, 921, 29891, 1111, 4339, 543, 1165, 267, 15958, 613, 13, 462, 462, 462, 4706, 4079, 2311, 29922, 29896, 29945, 29892, 13, 462, 462, 462, 4706, 2927, 2433, 8517, 742, 13, 462, 462, 462, 4706, 2947, 543, 5064, 613, 13, 462, 462, 462, 4706, 447, 543, 5064, 613, 13, 462, 462, 462, 4706, 13733, 29922, 29941, 29945, 29900, 29892, 13, 462, 462, 462, 4706, 289, 1884, 29922, 1327, 29898, 1327, 29883, 876, 13, 1678, 385, 29896, 353, 3653, 29918, 6735, 403, 703, 14727, 681, 613, 921, 11078, 7607, 29900, 29889, 29929, 29892, 29871, 29900, 29889, 29945, 511, 289, 12328, 2433, 8517, 1495, 13, 1678, 385, 29906, 353, 3653, 29918, 6735, 403, 703, 29872, 8995, 29899, 517, 29899, 19668, 613, 921, 11078, 7607, 29900, 29889, 29906, 29955, 29892, 29871, 29900, 29889, 29947, 29945, 511, 289, 12328, 2433, 29878, 1495, 13, 1678, 385, 29941, 353, 3653, 29918, 6735, 403, 703, 6800, 29899, 517, 29899, 19668, 613, 921, 11078, 7607, 29900, 29889, 29941, 29945, 29892, 29871, 29900, 29889, 29906, 29945, 511, 289, 12328, 2433, 29890, 1495, 13, 13, 1678, 6492, 29889, 26172, 29898, 29876, 1054, 29922, 29896, 29892, 289, 1884, 29918, 517, 29918, 25367, 11759, 29900, 29889, 29896, 29955, 29945, 29892, 29871, 29900, 29889, 29945, 1402, 1180, 2433, 1266, 1495, 13, 1678, 6492, 29889, 842, 29918, 29916, 1643, 877, 5927, 3097, 1495, 13, 1678, 6492, 29889, 842, 29918, 29891, 1643, 877, 5527, 5084, 1495, 13, 1678, 6492, 29889, 842, 29918, 3257, 29898, 3257, 29897, 13, 1678, 4853, 29900, 29889, 842, 29918, 29916, 2576, 29898, 29900, 29892, 4236, 29918, 1707, 29897, 13, 1678, 4853, 29900, 29889, 842, 29918, 29891, 2576, 29898, 29900, 29892, 29871, 29896, 29897, 13, 13, 1678, 2537, 29889, 29873, 523, 29918, 2680, 580, 13, 1678, 10422, 353, 285, 29915, 29912, 5317, 29918, 3972, 6822, 29912, 3257, 1836, 2732, 29915, 13, 1678, 396, 1596, 877, 7390, 2891, 379, 9047, 742, 10422, 29897, 13, 1678, 565, 4078, 29901, 13, 4706, 2537, 29889, 7620, 1003, 29898, 9507, 29892, 270, 1631, 29922, 29941, 29900, 29900, 29897, 13, 4706, 17927, 29889, 3888, 29898, 29888, 29908, 20867, 7160, 304, 426, 9507, 27195, 13, 1678, 736, 2537, 13, 13, 13, 1753, 6492, 29918, 1272, 29918, 1958, 29898, 1272, 2557, 29901, 10518, 29889, 17271, 29892, 13, 462, 29871, 6492, 29918, 3972, 29901, 2897, 29889, 2084, 29892, 13, 462, 29871, 298, 434, 29918, 16414, 29901, 851, 353, 525, 15728, 29889, 742, 13, 462, 29871, 3611, 29901, 851, 353, 15516, 13, 462, 29871, 1904, 29901, 851, 353, 525, 9588, 13635, 29911, 29874, 742, 13, 462, 29871, 1510, 29918, 29882, 391, 29901, 6120, 353, 7700, 29892, 13, 462, 29871, 4236, 29918, 2611, 2925, 29918, 517, 29918, 5317, 353, 29871, 29945, 29945, 29900, 29900, 29900, 1125, 13, 1678, 396, 3789, 3114, 29889, 13, 1678, 269, 1983, 29889, 842, 29898, 3293, 2433, 1332, 277, 387, 2429, 742, 4079, 29918, 7052, 29922, 29896, 29889, 29953, 29892, 4079, 2433, 7999, 990, 423, 742, 3030, 2433, 19773, 1495, 13, 1678, 17927, 29889, 3888, 29898, 29888, 29908, 20867, 1259, 4377, 363, 426, 3257, 29913, 773, 278, 426, 4299, 29913, 1904, 2023, 1159, 13, 13, 1678, 396, 3323, 11249, 848, 304, 6492, 29892, 577, 278, 6492, 338, 451, 2086, 19587, 29889, 13, 1678, 12205, 353, 12205, 29889, 11249, 29898, 29876, 29922, 3317, 29918, 2611, 2925, 29918, 517, 29918, 5317, 565, 12205, 29889, 12181, 29961, 29900, 29962, 1405, 4236, 29918, 2611, 2925, 29918, 517, 29918, 5317, 1683, 7431, 29898, 1272, 2557, 876, 13, 13, 1678, 396, 21981, 675, 1959, 2264, 304, 263, 995, 1546, 29871, 29900, 322, 29871, 29896, 29889, 13, 1678, 12205, 353, 12205, 29889, 16645, 29898, 29725, 29918, 1154, 353, 14013, 270, 29901, 270, 29889, 15728, 2264, 847, 270, 29889, 15728, 2264, 29889, 3317, 3101, 13, 1678, 12205, 1839, 15728, 29889, 2033, 353, 518, 29888, 29908, 29912, 29916, 29901, 29889, 29896, 29888, 5038, 363, 921, 297, 12205, 1839, 29725, 29918, 1154, 2033, 29962, 13, 13, 1678, 1667, 29918, 16414, 353, 525, 5927, 3097, 29915, 13, 1678, 916, 29918, 16414, 353, 525, 5527, 5084, 29915, 13, 13, 1678, 298, 434, 353, 298, 434, 29918, 16414, 13, 1678, 954, 29918, 29882, 1041, 353, 7431, 29898, 1272, 2557, 29961, 29882, 434, 1822, 13092, 2141, 25027, 391, 3101, 13, 1678, 3114, 353, 298, 434, 29918, 16414, 565, 954, 29918, 29882, 1041, 529, 29871, 29947, 1683, 6213, 13, 13, 1678, 565, 451, 1510, 29918, 29882, 391, 29901, 13, 4706, 2537, 29892, 4853, 29900, 353, 14770, 29889, 1491, 26762, 29898, 29896, 29892, 29871, 29896, 29892, 2537, 2311, 7607, 29947, 29892, 29871, 29953, 876, 13, 1678, 1683, 29901, 13, 4706, 2537, 353, 14770, 29889, 4532, 29898, 1003, 2311, 7607, 29896, 29946, 29892, 29871, 29896, 29900, 511, 1723, 13, 4706, 330, 29879, 353, 2537, 29889, 1202, 29918, 629, 4841, 3135, 29898, 29941, 29892, 29871, 29906, 29892, 2920, 29918, 29878, 2219, 359, 11759, 29945, 29892, 29871, 29896, 2314, 13, 4706, 4853, 29900, 353, 2537, 29889, 1202, 29918, 1491, 5317, 29898, 3174, 7503, 29892, 29871, 29900, 2314, 13, 13, 1678, 396, 8561, 278, 14801, 5317, 29889, 13, 1678, 396, 14542, 852, 263, 282, 26456, 29889, 13, 1678, 5112, 353, 269, 1983, 29889, 29881, 2147, 3460, 29918, 29886, 26456, 29898, 29906, 29953, 29900, 29892, 29871, 29896, 29945, 29892, 302, 29922, 1949, 29918, 29882, 1041, 29892, 16345, 29922, 29896, 29900, 29892, 4818, 543, 26031, 1159, 13, 13, 1678, 6492, 353, 269, 1983, 29889, 1557, 2620, 5317, 29898, 29916, 29922, 3396, 29918, 16414, 29892, 13, 462, 965, 343, 29922, 1228, 29918, 16414, 29892, 13, 462, 965, 4853, 29922, 1165, 29900, 29892, 13, 462, 965, 848, 29922, 1272, 2557, 29892, 13, 462, 965, 298, 434, 29922, 29882, 434, 29892, 13, 462, 965, 282, 26456, 29922, 7830, 29892, 13, 462, 965, 3114, 29922, 3293, 29892, 13, 462, 965, 269, 29922, 29941, 29900, 29897, 13, 13, 1678, 396, 530, 1333, 403, 2169, 1080, 29889, 13, 1678, 289, 29890, 353, 14013, 274, 29901, 9657, 29898, 1884, 3293, 543, 14486, 29892, 8305, 29922, 29900, 29889, 29941, 613, 21226, 29922, 29883, 29892, 301, 29893, 29922, 29906, 29892, 285, 29883, 543, 10921, 1159, 13, 1678, 3653, 29918, 6735, 403, 353, 14013, 29871, 1426, 29892, 921, 11078, 29892, 289, 12328, 584, 4853, 29900, 29889, 6735, 403, 29898, 726, 29892, 13, 462, 462, 462, 3986, 921, 29891, 29922, 3594, 29883, 29892, 13, 462, 462, 462, 3986, 921, 29891, 1111, 4339, 543, 1165, 267, 15958, 613, 13, 462, 462, 462, 3986, 4079, 2311, 29922, 29896, 29945, 29892, 13, 462, 462, 462, 3986, 2927, 2433, 8517, 742, 13, 462, 462, 462, 3986, 2947, 543, 5064, 613, 13, 462, 462, 462, 3986, 447, 543, 5064, 613, 13, 462, 462, 462, 3986, 13733, 29922, 29941, 29945, 29900, 29892, 13, 462, 462, 462, 965, 289, 1884, 29922, 1327, 29898, 1327, 29883, 876, 13, 1678, 385, 29896, 353, 3653, 29918, 6735, 403, 703, 14727, 681, 613, 921, 11078, 7607, 29900, 29889, 29929, 29892, 29871, 29900, 29889, 29945, 511, 289, 12328, 2433, 8517, 1495, 13, 1678, 385, 29906, 353, 3653, 29918, 6735, 403, 703, 29872, 8995, 29899, 517, 29899, 19668, 613, 921, 11078, 7607, 29900, 29889, 29906, 29955, 29892, 29871, 29900, 29889, 29947, 29945, 511, 289, 12328, 2433, 29878, 1495, 13, 1678, 385, 29941, 353, 3653, 29918, 6735, 403, 703, 6800, 29899, 517, 29899, 19668, 613, 921, 11078, 7607, 29900, 29889, 29941, 29945, 29892, 29871, 29900, 29889, 29906, 29945, 511, 289, 12328, 2433, 29890, 1495, 13, 13, 13, 1678, 565, 451, 1510, 29918, 29882, 391, 29901, 13, 4706, 6492, 29889, 26172, 29898, 29876, 1054, 29922, 29896, 29892, 289, 1884, 29918, 517, 29918, 25367, 11759, 29900, 29889, 29896, 29955, 29945, 29892, 29871, 29900, 29889, 29945, 1402, 1180, 2433, 1266, 1495, 13, 1678, 1683, 29901, 13, 4706, 6492, 29889, 26172, 29898, 29888, 6906, 1884, 29922, 5574, 29892, 15504, 29922, 5574, 29892, 29871, 302, 1054, 29922, 29896, 29897, 13, 1678, 6492, 29889, 842, 29918, 29916, 1643, 877, 5927, 3097, 1495, 13, 1678, 6492, 29889, 842, 29918, 29891, 1643, 877, 5527, 5084, 1495, 13, 13, 1678, 565, 1510, 29918, 29882, 391, 29901, 13, 4706, 6492, 29889, 842, 29918, 3257, 29898, 29888, 29908, 29912, 3257, 7402, 29912, 4299, 29913, 3630, 7315, 613, 4079, 2311, 29922, 29896, 29955, 29897, 13, 13, 4706, 396, 8561, 278, 9825, 468, 25402, 29889, 13, 4706, 4853, 29896, 353, 2537, 29889, 1202, 29918, 1491, 5317, 29898, 3174, 29961, 29900, 29892, 29871, 29896, 2314, 13, 4706, 4853, 29906, 353, 2537, 29889, 1202, 29918, 1491, 5317, 29898, 3174, 29961, 29896, 29892, 29871, 29896, 2314, 13, 4706, 4853, 29941, 353, 2537, 29889, 1202, 29918, 1491, 5317, 29898, 3174, 29961, 29906, 29892, 29871, 29896, 2314, 13, 13, 4706, 715, 1501, 29900, 353, 12205, 29889, 29882, 391, 29898, 4914, 29922, 1839, 5527, 5084, 7464, 4853, 29922, 1165, 29896, 29892, 2927, 2433, 29937, 29953, 29906, 29906, 29874, 29947, 29955, 1495, 13, 4706, 715, 1501, 29900, 29961, 29900, 1822, 842, 29918, 3257, 877, 1495, 13, 4706, 715, 1501, 29900, 29961, 29900, 1822, 842, 29918, 29916, 1643, 877, 5527, 5084, 1495, 13, 4706, 715, 1501, 29900, 29961, 29900, 1822, 842, 29918, 29891, 1643, 877, 21518, 537, 1495, 13, 13, 4706, 715, 1501, 29896, 353, 12205, 29889, 29882, 391, 29898, 4914, 29922, 1839, 5927, 3097, 7464, 4853, 29922, 1165, 29906, 29892, 2927, 2433, 371, 284, 1495, 13, 4706, 715, 1501, 29896, 29961, 29900, 1822, 842, 29918, 3257, 877, 1495, 13, 4706, 715, 1501, 29896, 29961, 29900, 1822, 842, 29918, 29916, 1643, 877, 5927, 3097, 1495, 13, 4706, 715, 1501, 29896, 29961, 29900, 1822, 842, 29918, 29891, 1643, 877, 21518, 537, 1495, 13, 13, 4706, 6492, 29906, 353, 269, 1983, 29889, 2798, 5317, 29898, 29916, 543, 15728, 19602, 848, 29922, 1272, 2557, 29892, 4853, 29922, 1165, 29941, 29892, 2927, 2433, 29937, 29947, 29953, 1635, 29929, 29896, 1495, 13, 4706, 4853, 29941, 29889, 29916, 8990, 29889, 7720, 29898, 5574, 29897, 396, 7704, 278, 11408, 6856, 9012, 13, 13, 4706, 6492, 29906, 29889, 842, 29918, 3257, 877, 1495, 13, 4706, 6492, 29906, 29889, 842, 29918, 29916, 1643, 877, 15728, 2264, 1495, 13, 4706, 6492, 29906, 29889, 842, 29918, 29891, 1643, 877, 21518, 537, 1495, 13, 13, 1678, 2537, 29889, 29873, 523, 29918, 2680, 580, 13, 1678, 10422, 353, 285, 29915, 29912, 5317, 29918, 3972, 6822, 29912, 3257, 3227, 4299, 1836, 5140, 29915, 565, 1510, 29918, 29882, 391, 1683, 285, 29915, 1003, 1973, 29914, 2388, 627, 648, 3257, 3227, 4299, 1836, 2732, 29915, 13, 1678, 1596, 877, 7390, 2891, 438, 22789, 1177, 1964, 742, 10422, 29897, 13, 1678, 2537, 29889, 7620, 1003, 29898, 9507, 29892, 270, 1631, 29922, 29941, 29900, 29900, 29897, 13, 1678, 17927, 29889, 3888, 29898, 29888, 29908, 20867, 7160, 304, 426, 9507, 27195, 13, 13, 13, 361, 4770, 978, 1649, 1275, 376, 1649, 3396, 1649, 1115, 13, 29871, 13812, 353, 1852, 5510, 29889, 15730, 11726, 580, 13, 29871, 13812, 29889, 1202, 29918, 23516, 703, 489, 4572, 613, 13, 462, 418, 3158, 543, 8899, 29918, 3009, 613, 13, 462, 418, 1371, 543, 8809, 1979, 304, 4175, 848, 27639, 2729, 373, 6790, 421, 16414, 1412, 1159, 13, 29871, 13812, 29889, 1202, 29918, 23516, 703, 489, 5317, 29918, 14968, 613, 13, 462, 418, 3158, 543, 8899, 29918, 3009, 613, 13, 462, 418, 1371, 543, 8809, 1979, 304, 6492, 7945, 848, 11053, 322, 4078, 408, 421, 2732, 1412, 1159, 13, 29871, 13812, 29889, 1202, 29918, 23516, 703, 489, 5317, 29918, 14513, 613, 13, 462, 418, 3158, 543, 8899, 29918, 3009, 613, 13, 462, 418, 1371, 543, 8809, 1979, 304, 6492, 19745, 848, 11053, 322, 4078, 408, 421, 2732, 1412, 1159, 13, 29871, 13812, 29889, 1202, 29918, 23516, 703, 489, 4299, 29918, 3972, 613, 13, 462, 418, 11663, 29877, 613, 13, 462, 418, 3734, 29922, 5574, 29892, 13, 462, 418, 1134, 29922, 359, 29889, 2084, 29889, 370, 1028, 493, 29892, 13, 462, 418, 1371, 543, 9882, 988, 1904, 6694, 19753, 22663, 620, 680, 23157, 13, 29871, 13812, 29889, 1202, 29918, 23516, 703, 489, 1272, 29918, 3972, 613, 13, 462, 418, 11663, 29881, 613, 13, 462, 418, 2322, 13802, 5959, 29914, 2774, 370, 5349, 29914, 1272, 29914, 3820, 434, 29914, 25152, 29949, 14345, 2190, 2287, 29914, 15524, 29914, 613, 13, 462, 418, 1134, 29922, 359, 29889, 2084, 29889, 370, 1028, 493, 29892, 13, 462, 418, 1371, 543, 9882, 988, 848, 363, 3414, 620, 2247, 23157, 13, 29871, 13812, 29889, 1202, 29918, 23516, 703, 489, 26762, 29918, 3972, 613, 13, 462, 418, 2322, 543, 6904, 13823, 5275, 29914, 613, 13, 462, 418, 1134, 29922, 359, 29889, 2084, 29889, 370, 1028, 493, 29892, 13, 462, 418, 1371, 543, 9882, 988, 24580, 526, 304, 367, 7160, 23157, 13, 29871, 13812, 29889, 1202, 29918, 23516, 703, 489, 7662, 29918, 978, 613, 13, 462, 418, 11663, 29873, 613, 13, 462, 418, 2322, 543, 25152, 29949, 14345, 2190, 2287, 613, 13, 462, 418, 19995, 29922, 703, 19296, 5265, 613, 376, 29924, 29940, 5265, 613, 376, 29984, 29940, 5265, 613, 376, 25152, 29949, 14345, 2190, 2287, 613, 376, 29934, 4330, 613, 376, 16048, 5265, 4968, 13, 462, 418, 1371, 543, 8809, 436, 3414, 526, 591, 6492, 1259, 470, 21166, 363, 23157, 13, 29871, 13812, 29889, 1202, 29918, 23516, 877, 489, 16414, 742, 13, 462, 418, 19995, 29922, 877, 386, 12268, 29918, 695, 7749, 404, 742, 13, 462, 1669, 525, 5527, 5084, 742, 13, 462, 1669, 525, 5927, 3097, 742, 13, 462, 1669, 525, 15728, 2264, 742, 13, 462, 1669, 525, 1454, 657, 1319, 2264, 5477, 13, 462, 418, 1371, 543, 10095, 2200, 304, 4175, 848, 491, 19602, 29897, 13, 29871, 13812, 29889, 1202, 29918, 23516, 703, 489, 2856, 29918, 455, 613, 13, 462, 418, 3158, 543, 8899, 29918, 3009, 613, 13, 462, 418, 1371, 543, 20606, 29872, 278, 16420, 7292, 363, 1197, 3097, 23157, 13, 29871, 13812, 29889, 1202, 29918, 23516, 703, 489, 4572, 292, 29918, 4905, 29918, 3972, 613, 13, 462, 418, 11663, 29888, 613, 13, 462, 418, 2322, 543, 6904, 4572, 287, 29914, 613, 13, 462, 418, 1134, 29922, 359, 29889, 2084, 29889, 370, 1028, 493, 29892, 13, 462, 418, 1371, 543, 6466, 3884, 988, 22289, 20035, 526, 304, 367, 3971, 23157, 13, 29871, 13812, 29889, 1202, 29918, 23516, 703, 489, 13762, 303, 613, 13, 462, 418, 3158, 543, 8899, 29918, 3009, 613, 13, 462, 418, 1371, 543, 3549, 515, 278, 11564, 1095, 310, 278, 18272, 1035, 29889, 304, 12714, 1699, 13, 462, 965, 376, 1454, 2362, 24210, 1159, 13, 29871, 13812, 29889, 1202, 29918, 23516, 703, 489, 20313, 29918, 1975, 613, 13, 462, 418, 3158, 543, 8899, 29918, 3009, 613, 13, 462, 418, 1371, 543, 3549, 515, 1716, 10614, 310, 278, 18272, 1035, 29889, 304, 12714, 29892, 1159, 13, 29871, 13812, 29889, 1202, 29918, 23516, 703, 489, 18712, 29918, 449, 613, 13, 462, 418, 1134, 29922, 524, 29892, 13, 462, 418, 2322, 29922, 29896, 29900, 29900, 29892, 13, 462, 418, 1371, 9880, 382, 1129, 12168, 363, 607, 304, 10272, 7945, 19753, 23157, 13, 29871, 13812, 29889, 1202, 29918, 23516, 703, 489, 4299, 613, 13, 462, 418, 2322, 543, 9588, 13635, 29911, 29874, 613, 13, 462, 418, 1371, 543, 3195, 363, 607, 848, 2910, 338, 1641, 715, 15048, 1159, 13, 29871, 13812, 29889, 1202, 29918, 23516, 703, 489, 5317, 29918, 18660, 613, 13, 462, 418, 3158, 543, 8899, 29918, 3009, 613, 13, 462, 418, 1371, 543, 8809, 1979, 304, 6492, 330, 361, 470, 451, 1159, 13, 13, 29871, 6389, 353, 13812, 29889, 5510, 29918, 5085, 580, 13, 29871, 396, 565, 6389, 29889, 5317, 29918, 18660, 29901, 13, 29871, 396, 259, 4974, 7431, 29898, 359, 29889, 1761, 3972, 29898, 5085, 29889, 26762, 29918, 3972, 876, 1405, 29871, 29900, 13, 29871, 396, 259, 6492, 29918, 18660, 29898, 5085, 29889, 26762, 29918, 3972, 29897, 13, 29871, 396, 259, 6876, 580, 13, 29871, 396, 3001, 29918, 1022, 2878, 29879, 353, 7431, 29898, 1761, 29898, 26495, 29918, 29881, 2926, 1199, 29889, 5975, 3101, 29961, 29900, 29962, 3366, 1188, 1169, 20068, 13, 29871, 396, 565, 6389, 29889, 18712, 29918, 449, 1405, 3001, 29918, 1022, 2878, 29879, 29901, 13, 29871, 396, 259, 6389, 29889, 18712, 29918, 449, 353, 3001, 29918, 1022, 2878, 29879, 13, 29871, 396, 259, 17927, 29889, 3888, 29898, 29888, 29908, 11536, 21502, 12168, 1476, 29901, 426, 5085, 29889, 18712, 29918, 449, 27195, 13, 29871, 396, 7945, 29918, 4518, 29918, 2527, 10817, 29892, 903, 353, 10272, 29918, 14968, 29918, 4518, 29918, 2527, 10817, 29898, 26495, 29918, 29881, 2926, 1199, 29892, 540, 332, 6765, 29892, 2441, 29918, 333, 29892, 6389, 29889, 18712, 29918, 449, 29897, 13, 29871, 396, 13, 29871, 396, 12138, 29918, 449, 29918, 710, 353, 285, 29908, 648, 5085, 29889, 18712, 29918, 449, 5038, 565, 6389, 29889, 18712, 29918, 449, 1405, 3001, 29918, 1022, 2878, 29879, 1683, 5124, 13, 29871, 396, 7945, 29918, 4518, 29918, 9507, 353, 2897, 29889, 2084, 29889, 7122, 29898, 5085, 29889, 4299, 29918, 3972, 29892, 285, 29908, 1594, 29918, 2527, 10817, 29912, 18712, 29918, 449, 29918, 710, 1836, 3126, 29880, 1159, 13, 29871, 396, 7945, 29918, 4518, 29918, 2527, 10817, 29889, 517, 29918, 3126, 29898, 14968, 29918, 4518, 29918, 9507, 29892, 13, 29871, 396, 462, 3986, 7769, 2433, 3757, 4339, 742, 13, 29871, 396, 462, 3986, 3454, 29922, 5574, 29897, 13, 29871, 396, 17927, 29889, 3888, 29898, 29888, 29908, 10095, 10817, 2729, 373, 26101, 22554, 1199, 3971, 304, 426, 14968, 29918, 4518, 29918, 9507, 27195, 13, 13, 29871, 396, 565, 6389, 29889, 4572, 29901, 13, 29871, 396, 259, 4974, 6389, 29889, 4572, 292, 29918, 4905, 29918, 3972, 13, 29871, 396, 259, 565, 451, 2897, 29889, 2084, 29889, 9933, 29898, 5085, 29889, 4572, 292, 29918, 4905, 29918, 3972, 1125, 13, 29871, 396, 268, 2897, 29889, 29885, 12535, 12935, 29898, 5085, 29889, 4572, 292, 29918, 4905, 29918, 3972, 29897, 13, 29871, 396, 259, 4974, 6389, 29889, 16414, 13, 29871, 396, 259, 2436, 29918, 4572, 287, 29918, 1272, 29898, 5085, 29892, 7945, 29918, 4518, 29918, 2527, 10817, 29897, 13, 13, 29871, 4974, 6389, 29889, 26762, 29918, 3972, 13, 29871, 6389, 29889, 26762, 29918, 3972, 353, 2897, 29889, 2084, 29889, 7122, 29898, 5085, 29889, 4299, 29918, 3972, 29892, 376, 26762, 1159, 13, 29871, 565, 451, 2897, 29889, 2084, 29889, 9933, 29898, 5085, 29889, 26762, 29918, 3972, 1125, 13, 418, 2897, 29889, 29885, 12535, 12935, 29898, 5085, 29889, 26762, 29918, 3972, 29897, 13, 13, 29871, 565, 6389, 29889, 5317, 29918, 14968, 29901, 13, 1678, 396, 6492, 29918, 1272, 29918, 1958, 29898, 14968, 29918, 4518, 29918, 2527, 10817, 29892, 6389, 29889, 26762, 29918, 3972, 29892, 3611, 29922, 5085, 29889, 7662, 29918, 978, 29892, 1510, 29918, 29882, 391, 29922, 5574, 29892, 1904, 29922, 5085, 29889, 4299, 29897, 13, 1678, 396, 6492, 29918, 354, 332, 6765, 29918, 28084, 29898, 5085, 29892, 7945, 29918, 4518, 29918, 2527, 10817, 29892, 6389, 29889, 26762, 29918, 3972, 29892, 3611, 29922, 5085, 29889, 7662, 29918, 978, 29897, 13, 1678, 396, 6492, 29918, 354, 332, 6765, 29918, 6194, 29898, 5085, 29892, 7945, 29918, 4518, 29918, 2527, 10817, 29892, 6389, 29889, 26762, 29918, 3972, 29892, 3611, 29922, 5085, 29889, 7662, 29918, 978, 29897, 13, 1678, 396, 679, 29918, 14727, 681, 29918, 354, 332, 6765, 29918, 27736, 29898, 14968, 29918, 4518, 29918, 2527, 10817, 29892, 6389, 29889, 4299, 29918, 3972, 29897, 13, 1678, 396, 679, 29918, 3332, 29918, 29876, 29918, 354, 332, 6765, 29918, 27736, 29898, 14968, 29918, 4518, 29918, 2527, 10817, 29892, 6389, 29889, 4299, 29918, 3972, 29897, 13, 1678, 6694, 29918, 29881, 2926, 1199, 29892, 540, 332, 6765, 29892, 2441, 29918, 333, 29892, 4450, 29918, 21134, 353, 1303, 29918, 29881, 2926, 1199, 29898, 5085, 29889, 4299, 29918, 3972, 29892, 13, 462, 462, 462, 462, 9651, 17820, 29918, 4230, 29922, 5574, 565, 6389, 29889, 7662, 29918, 978, 297, 518, 13, 462, 462, 462, 462, 18884, 376, 29984, 29940, 5265, 3108, 1683, 7700, 29892, 13, 462, 462, 462, 462, 9651, 12138, 29918, 449, 29922, 5085, 29889, 18712, 29918, 449, 565, 6389, 29889, 18712, 29918, 449, 529, 29871, 29896, 29900, 29900, 1683, 6213, 29897, 13, 1678, 4489, 29918, 14968, 29892, 903, 353, 10272, 29918, 14968, 29918, 4518, 29918, 2527, 10817, 29918, 546, 29918, 1022, 2878, 29898, 26495, 29918, 29881, 2926, 1199, 29892, 540, 332, 6765, 29892, 2441, 29918, 333, 29892, 4464, 543, 14513, 1159, 13, 1678, 396, 6492, 29918, 14968, 29918, 1022, 2878, 29879, 29898, 5085, 29892, 6694, 29918, 29881, 2926, 1199, 29892, 540, 332, 6765, 29892, 2441, 29918, 333, 29892, 330, 361, 29922, 5574, 29897, 13, 1678, 679, 29918, 24582, 29918, 27736, 29898, 2176, 29918, 14968, 29892, 6389, 29889, 4299, 29918, 3972, 29892, 13, 462, 539, 10518, 29889, 949, 29918, 7638, 11219, 5184, 29914, 18597, 348, 29914, 328, 4233, 29900, 29900, 29896, 29914, 29934, 4330, 29914, 14968, 29918, 354, 332, 4695, 29889, 1372, 29894, 742, 13, 462, 462, 259, 16345, 2433, 29905, 29873, 4295, 29876, 5477, 13, 462, 539, 1602, 6797, 29918, 1643, 29922, 3366, 296, 737, 358, 613, 376, 1333, 29918, 296, 737, 358, 12436, 13, 462, 539, 4341, 29918, 2098, 29922, 1839, 2248, 742, 525, 18616, 663, 29896, 742, 525, 18616, 663, 29906, 742, 525, 5927, 3097, 742, 13, 462, 462, 418, 525, 5527, 5084, 742, 525, 1707, 29918, 1022, 742, 525, 5527, 29918, 1022, 742, 525, 2506, 936, 742, 13, 462, 462, 418, 525, 1491, 16506, 742, 13, 462, 462, 418, 525, 29887, 1025, 29918, 1643, 742, 525, 11965, 29918, 1643, 11287, 13, 1678, 396, 679, 29918, 3332, 29918, 29876, 29918, 354, 332, 6765, 29918, 27736, 29898, 2176, 29918, 14968, 29892, 6389, 29889, 4299, 29918, 3972, 29892, 13, 1678, 396, 462, 462, 18884, 10518, 29889, 949, 29918, 7638, 11219, 5184, 29914, 18597, 348, 29914, 328, 4233, 29900, 29900, 29896, 29914, 29934, 4330, 29914, 14968, 29918, 354, 332, 4695, 29889, 1372, 29894, 742, 13, 1678, 396, 462, 462, 462, 9651, 16345, 2433, 29905, 29873, 4295, 29876, 5477, 13, 1678, 396, 462, 462, 18884, 4341, 29918, 2098, 29922, 1839, 18616, 663, 29896, 742, 525, 18616, 663, 29906, 742, 525, 5927, 3097, 742, 13, 1678, 396, 462, 462, 462, 1669, 525, 5527, 5084, 742, 525, 1707, 29918, 1022, 742, 525, 5527, 29918, 1022, 742, 525, 2506, 936, 742, 13, 1678, 396, 462, 462, 462, 1669, 525, 1491, 16506, 742, 13, 1678, 396, 462, 462, 462, 1669, 525, 29887, 1025, 29918, 1643, 742, 525, 11965, 29918, 1643, 7464, 13, 1678, 396, 462, 462, 462, 1602, 6797, 29918, 1643, 29922, 3366, 296, 737, 358, 613, 376, 1333, 29918, 296, 737, 358, 12436, 13, 1678, 396, 462, 462, 18884, 2246, 29918, 354, 332, 4695, 29918, 5415, 3790, 29915, 2506, 936, 2396, 29871, 29896, 29900, 1800, 13, 13, 29871, 565, 6389, 29889, 5317, 29918, 14513, 29901, 13, 418, 396, 679, 29918, 14727, 681, 29918, 354, 332, 6765, 29918, 27736, 29898, 14968, 29918, 4518, 29918, 2527, 10817, 29892, 6389, 29889, 4299, 29918, 3972, 29897, 13, 418, 19745, 29918, 1367, 29918, 29881, 2926, 1199, 29892, 540, 332, 6765, 29918, 1367, 29892, 2441, 29918, 333, 29918, 1367, 29892, 4450, 29918, 21134, 29918, 1367, 353, 1303, 29918, 29881, 2926, 1199, 29898, 5085, 29889, 4299, 29918, 3972, 29892, 13, 462, 462, 462, 462, 795, 17820, 29918, 4230, 29922, 5574, 565, 6389, 29889, 7662, 29918, 978, 297, 518, 13, 462, 462, 462, 462, 462, 29871, 376, 29984, 29940, 5265, 3108, 1683, 7700, 29892, 13, 462, 462, 462, 462, 795, 12138, 29918, 449, 29922, 5085, 29889, 18712, 29918, 449, 565, 6389, 29889, 18712, 29918, 449, 529, 29871, 29896, 29900, 29900, 1683, 6213, 29892, 4464, 543, 14513, 29918, 1367, 1159, 13, 418, 19745, 29918, 29949, 13668, 29918, 29881, 2926, 1199, 29892, 540, 332, 6765, 29918, 29949, 13668, 29892, 2441, 29918, 333, 29918, 29949, 13668, 29892, 4450, 29918, 21134, 29918, 29949, 13668, 353, 1303, 29918, 29881, 2926, 1199, 29898, 5085, 29889, 4299, 29918, 3972, 29892, 13, 462, 462, 462, 462, 632, 17820, 29918, 4230, 29922, 5574, 565, 6389, 29889, 7662, 29918, 978, 297, 518, 13, 462, 462, 462, 462, 462, 376, 29984, 29940, 5265, 3108, 1683, 7700, 29892, 13, 462, 462, 462, 462, 632, 12138, 29918, 449, 29922, 5085, 29889, 18712, 29918, 449, 565, 6389, 29889, 18712, 29918, 449, 529, 29871, 29896, 29900, 29900, 1683, 6213, 29892, 4464, 543, 14513, 29918, 29949, 13668, 1159, 13, 418, 4489, 29918, 333, 29892, 903, 353, 10272, 29918, 14968, 29918, 4518, 29918, 2527, 10817, 29918, 546, 29918, 1022, 2878, 29898, 14513, 29918, 1367, 29918, 29881, 2926, 1199, 29892, 540, 332, 6765, 29918, 1367, 29892, 2441, 29918, 333, 29918, 1367, 29892, 4464, 543, 262, 29918, 5721, 1159, 13, 418, 4489, 29918, 2092, 29892, 903, 353, 10272, 29918, 14968, 29918, 4518, 29918, 2527, 10817, 29918, 546, 29918, 1022, 2878, 29898, 14513, 29918, 29949, 13668, 29918, 29881, 2926, 1199, 29892, 540, 332, 6765, 29918, 29949, 13668, 29892, 2441, 29918, 333, 29918, 29949, 13668, 29892, 4464, 543, 2092, 1159, 13, 418, 396, 679, 29918, 3332, 29918, 29876, 29918, 354, 332, 6765, 29918, 27736, 29898, 2176, 29918, 333, 29892, 6389, 29889, 4299, 29918, 3972, 29892, 13, 418, 396, 462, 795, 10518, 29889, 949, 29918, 7638, 11219, 5184, 29914, 18597, 348, 29914, 328, 4233, 29900, 29900, 29896, 29914, 29924, 29940, 5265, 29914, 3359, 29918, 4352, 287, 29918, 354, 332, 4695, 29889, 1372, 29894, 742, 16345, 2433, 29905, 29873, 4295, 29876, 5477, 13, 418, 396, 462, 795, 396, 1602, 6797, 29918, 1643, 29922, 3366, 296, 737, 358, 613, 376, 1333, 29918, 296, 737, 358, 12436, 13, 418, 396, 462, 795, 4341, 29918, 2098, 29922, 1839, 18616, 663, 29896, 742, 525, 18616, 663, 29906, 742, 525, 5927, 3097, 742, 13, 418, 396, 462, 462, 632, 525, 5527, 5084, 742, 525, 1707, 29918, 1022, 742, 525, 5527, 29918, 1022, 742, 525, 2506, 936, 742, 525, 3075, 1981, 296, 742, 13, 418, 396, 462, 462, 632, 525, 1491, 16506, 742, 13, 418, 396, 462, 462, 632, 525, 29887, 1025, 29918, 1643, 742, 525, 11965, 29918, 1643, 7464, 13, 418, 396, 462, 795, 2246, 29918, 354, 332, 4695, 29918, 5415, 3790, 29915, 2506, 936, 2396, 29871, 29941, 29900, 1800, 13, 418, 396, 396, 4489, 29918, 2092, 1839, 2092, 2033, 353, 29871, 29896, 13, 418, 396, 679, 29918, 3332, 29918, 29876, 29918, 354, 332, 6765, 29918, 27736, 29898, 2176, 29918, 2092, 29892, 6389, 29889, 4299, 29918, 3972, 29892, 13, 418, 396, 462, 795, 10518, 29889, 949, 29918, 7638, 11219, 5184, 29914, 18597, 348, 29914, 328, 4233, 29900, 29900, 29896, 29914, 16048, 5265, 29914, 14968, 29918, 354, 332, 4695, 29889, 1372, 29894, 742, 16345, 2433, 29905, 29873, 4295, 29876, 5477, 13, 418, 396, 462, 795, 1602, 6797, 29918, 1643, 29922, 3366, 1333, 29918, 296, 737, 358, 613, 376, 296, 737, 358, 12436, 13, 418, 396, 462, 795, 4341, 29918, 2098, 29922, 1839, 18616, 663, 29896, 742, 525, 18616, 663, 29906, 742, 525, 5927, 3097, 742, 13, 418, 396, 462, 462, 632, 525, 5527, 5084, 742, 525, 1707, 29918, 1022, 742, 525, 5527, 29918, 1022, 742, 525, 2506, 936, 742, 525, 1491, 16506, 742, 13, 418, 396, 462, 462, 632, 525, 29887, 1025, 29918, 1643, 742, 525, 11965, 29918, 1643, 7464, 13, 418, 396, 462, 795, 2246, 29918, 354, 332, 4695, 29918, 5415, 3790, 29915, 2506, 936, 2396, 29941, 29900, 1800, 13, 418, 679, 29918, 24582, 29918, 27736, 29898, 2176, 29918, 333, 29892, 6389, 29889, 4299, 29918, 3972, 29892, 13, 462, 462, 462, 268, 10518, 29889, 949, 29918, 7638, 11219, 5184, 29914, 18597, 348, 29914, 328, 4233, 29900, 29900, 29896, 29914, 29934, 4330, 29914, 3359, 29918, 354, 332, 4695, 29889, 1372, 29894, 742, 13, 462, 462, 462, 462, 16345, 2433, 29905, 29873, 4295, 29876, 5477, 13, 462, 462, 462, 268, 1602, 6797, 29918, 1643, 29922, 3366, 296, 737, 358, 613, 376, 1333, 29918, 296, 737, 358, 12436, 13, 462, 462, 462, 268, 4341, 29918, 2098, 29922, 1839, 2248, 742, 525, 18616, 663, 29896, 742, 525, 18616, 663, 29906, 742, 525, 5927, 3097, 742, 13, 462, 462, 462, 462, 1678, 525, 5527, 5084, 742, 525, 1707, 29918, 1022, 742, 525, 5527, 29918, 1022, 742, 525, 2506, 936, 742, 13, 462, 462, 462, 462, 1678, 525, 1491, 16506, 742, 13, 462, 462, 462, 462, 1678, 525, 29887, 1025, 29918, 1643, 742, 525, 11965, 29918, 1643, 7464, 4464, 2433, 262, 29918, 5721, 1495, 13, 418, 4489, 29918, 2092, 1839, 2092, 2033, 353, 29871, 29896, 13, 418, 679, 29918, 24582, 29918, 27736, 29898, 2176, 29918, 2092, 29892, 6389, 29889, 4299, 29918, 3972, 29892, 13, 462, 462, 462, 539, 10518, 29889, 949, 29918, 7638, 11219, 5184, 29914, 18597, 348, 29914, 328, 4233, 29900, 29900, 29896, 29914, 16048, 5265, 29914, 14968, 29918, 354, 332, 4695, 29889, 1372, 29894, 742, 13, 462, 462, 462, 462, 259, 16345, 2433, 29905, 29873, 4295, 29876, 5477, 13, 462, 462, 462, 539, 1602, 6797, 29918, 1643, 29922, 3366, 1333, 29918, 296, 737, 358, 613, 376, 296, 737, 358, 12436, 13, 462, 462, 462, 539, 4341, 29918, 2098, 29922, 1839, 2248, 742, 525, 18616, 663, 29896, 742, 525, 18616, 663, 29906, 742, 525, 5927, 3097, 742, 13, 462, 462, 462, 462, 418, 525, 5527, 5084, 742, 525, 1707, 29918, 1022, 742, 525, 5527, 29918, 1022, 742, 525, 2506, 936, 742, 13, 462, 462, 462, 462, 418, 525, 1491, 16506, 742, 13, 462, 462, 462, 462, 418, 525, 29887, 1025, 29918, 1643, 742, 525, 11965, 29918, 1643, 7464, 4464, 2433, 2092, 1495, 13, 418, 396, 1596, 29898, 333, 29918, 5527, 29897, 13, 418, 396, 1596, 29898, 2092, 29918, 5527, 29897, 13, 418, 6492, 29918, 14513, 29918, 1022, 2878, 29879, 29898, 5085, 29892, 518, 14513, 29918, 1367, 29918, 29881, 2926, 1199, 29892, 540, 332, 6765, 29918, 1367, 29892, 2441, 29918, 333, 29918, 1367, 29892, 4450, 29918, 21134, 29918, 1367, 1402, 13, 462, 539, 518, 14513, 29918, 29949, 13668, 29918, 29881, 2926, 1199, 29892, 540, 332, 6765, 29918, 29949, 13668, 29892, 2441, 29918, 333, 29918, 29949, 13668, 29892, 4450, 29918, 21134, 29918, 29949, 13668, 1402, 330, 361, 29922, 5574, 29897, 13, 268, 13, 2 ]
tests/utils.py
reasoned-ai/norm
8
42289
import unittest import hashids import time import os hashid = hashids.Hashids() __all__ = ['user_tester', 'NormTestCase'] os.environ['NORM_DATA_STORAGE_ROOT'] = 'data' os.environ['NORM_DB_PATH'] = 'norm/db/norm.db' from norm.config import session def user_tester(): from norm.models.user import User tester = session.query(User).filter(User.username == 'tester', User.email == '<EMAIL>').first() if tester is None: tester = User(username='tester', first_name='tester', last_name='norm', email='<EMAIL>') session.add(tester) session.commit() return tester class NormTestCase(unittest.TestCase): def setUp(self): from norm.engine import NormCompiler self.session = session # override norm configuration self.user = user_tester() self.context_id = hashid.encode(int(time.time() * 1000)) self.executor = NormCompiler(self.context_id, self.user, self.session) def tearDown(self): self.session.rollback() self.session.close() def execute(self, script): return self.executor.execute(script)
[ 1, 1053, 443, 27958, 13, 5215, 6608, 4841, 13, 5215, 931, 13, 5215, 2897, 13, 13, 8568, 333, 353, 6608, 4841, 29889, 10438, 4841, 580, 13, 13, 1649, 497, 1649, 353, 6024, 1792, 29918, 1688, 261, 742, 525, 29940, 555, 3057, 8259, 2033, 13, 13, 359, 29889, 21813, 1839, 29940, 12054, 29918, 14573, 29918, 1254, 1955, 10461, 29918, 21289, 2033, 353, 525, 1272, 29915, 13, 359, 29889, 21813, 1839, 29940, 12054, 29918, 4051, 29918, 10145, 2033, 353, 525, 12324, 29914, 2585, 29914, 12324, 29889, 2585, 29915, 13, 13, 3166, 6056, 29889, 2917, 1053, 4867, 13, 13, 13, 1753, 1404, 29918, 1688, 261, 7295, 13, 1678, 515, 6056, 29889, 9794, 29889, 1792, 1053, 4911, 13, 1678, 1243, 261, 353, 4867, 29889, 1972, 29898, 2659, 467, 4572, 29898, 2659, 29889, 6786, 1275, 525, 1688, 261, 742, 13, 462, 462, 4706, 4911, 29889, 5269, 1275, 12801, 26862, 6227, 29958, 2824, 4102, 580, 13, 1678, 565, 1243, 261, 338, 6213, 29901, 13, 4706, 1243, 261, 353, 4911, 29898, 6786, 2433, 1688, 261, 742, 937, 29918, 978, 2433, 1688, 261, 742, 1833, 29918, 978, 2433, 12324, 742, 13, 462, 418, 4876, 2433, 29966, 26862, 6227, 29958, 1495, 13, 4706, 4867, 29889, 1202, 29898, 1688, 261, 29897, 13, 4706, 4867, 29889, 15060, 580, 13, 1678, 736, 1243, 261, 13, 13, 13, 1990, 5655, 3057, 8259, 29898, 348, 27958, 29889, 3057, 8259, 1125, 13, 13, 1678, 822, 731, 3373, 29898, 1311, 1125, 13, 4706, 515, 6056, 29889, 10599, 1053, 5655, 25333, 13, 4706, 1583, 29889, 7924, 353, 4867, 13, 4706, 396, 5712, 6056, 5285, 13, 4706, 1583, 29889, 1792, 353, 1404, 29918, 1688, 261, 580, 13, 4706, 1583, 29889, 4703, 29918, 333, 353, 6608, 333, 29889, 12508, 29898, 524, 29898, 2230, 29889, 2230, 580, 334, 29871, 29896, 29900, 29900, 29900, 876, 13, 4706, 1583, 29889, 4258, 3406, 353, 5655, 25333, 29898, 1311, 29889, 4703, 29918, 333, 29892, 1583, 29889, 1792, 29892, 1583, 29889, 7924, 29897, 13, 13, 1678, 822, 734, 279, 6767, 29898, 1311, 1125, 13, 4706, 1583, 29889, 7924, 29889, 1245, 1627, 580, 13, 4706, 1583, 29889, 7924, 29889, 5358, 580, 13, 13, 1678, 822, 6222, 29898, 1311, 29892, 2471, 1125, 13, 4706, 736, 1583, 29889, 4258, 3406, 29889, 7978, 29898, 2154, 29897, 13, 2 ]
run.py
hkx97/echo
4
119189
""" 1.初始化数据和模型 1.1解析dicom文件 1.2加载model和模型权重 2.预测ED ES 2.1数据输入给Siamese-model,输出n*2的tensor 2.2n*2的tensor输入给后处理算法-->ED ES 3.预测结构参数 3.1ED ES 输入给seg-model 3.2分割后的mask通过后处理方法得到height area 3.3如果单个视角则直接计算volume,如果两个视角则通过simpson方法计算volume 3.4计算EF 4.plot—figure and visualization """ from postprocess import cardiac_parameter from postprocess.postprocessing import * from model import load_Comparison_model from model import u_net from preprocess import interpretDicom from plot_tool import visualization import cv2 import os os.environ["CUDA_VISIBLE_DEVICES"] = "2" # 初始化模型 EDESPredictionModel = load_Comparison_model.load_model(input_size=128, load_weight=True,\ weight_path="model_weight/a4c.hdf5") # 这里注意 segEDModel = u_net.u_net((128, 128, 1), loadWeight=True,\ weigthPath="./model_weight/seg-a4c-trainbyed.hdf5") segESModel = u_net.u_net((128, 128, 1), loadWeight=True,\ weigthPath="./model_weight/seg-a4c-trainbyes.hdf5") # 防止ED、ES为[] # 初始化数据 while True: result1, result2 = {}, {} print("please input a filepath,such as root/a/b/c/../1.dcm:") while True: src_path = input() if src_path == "quit": exit() key = 0 try: assert os.path.exists(src_path) == True, "path error!" except Exception as ex: print(ex, "please check it and try again or input quit!") key = 1 if key == 0: break data, originalFrames = interpretDicom.interpretDicom(128,src_path) # 加载Dicom数据视频帧shape = (n,128,128,1) modelOutTensor = EDESPredictionModel.predict([data[:-1], data[1:]]) EDFrameNumber = sliding_window(modelOutTensor, delete_a4cd_frames(modelOutTensor), 1) # return a List ESFrameNumber = sliding_window(modelOutTensor, delete_a4cs_frames(modelOutTensor), 0) maskED = segEDModel.predict(data[EDFrameNumber[0]-1:EDFrameNumber[0]]).reshape(128, 128) # 随机将第一帧作为ED,输出mask-->(1,128,128,1) maskES = segESModel.predict(data[ESFrameNumber[0]-1:ESFrameNumber[0]]).reshape(128, 128) scale = interpretDicom.parse_scale(src_path) EDParameter = cardiac_parameter.cmpt_single_volum_(maskED, scale=scale) # 注意scale ESParameter = cardiac_parameter.cmpt_single_volum_(maskES, scale=scale) EF = (EDParameter[-1] - ESParameter[-1])/EDParameter[-1] parameterAll = EDFrameNumber[0:1]+list(EDParameter)+ESFrameNumber[0:1]+list(ESParameter) parameterNames1 = ["ED Frame number:", " LV Length:", " LV Area:", " LV volume:"] parameterNames2 = ["ES Frame number:", " LV Length:", " LV Area:", " LV volume:"] measurement = ["", "cm", "cm²", "ml"] for i, j in enumerate(parameterNames1): result1[j] = "%.2f" % (EDFrameNumber[0:1]+list(EDParameter))[i]+measurement[i] for i, j in enumerate(parameterNames2): result2[j] = "%.2f" % (ESFrameNumber[0:1]+list(ESParameter))[i]+measurement[i] # 可视化 window = visualization.window(1200, 800) window[:600, :, :] = visualization.plotMask(maskED, originalFrames[EDFrameNumber[0]-1]) # 在原图中画出心内膜 window[600:, :, :] = visualization.plotMask(maskES, originalFrames[ESFrameNumber[0]-1]) cv2.imwrite("./img.png", window*255) # 添加文字 srcImg = cv2.imread("./img.png") os.remove("./img.png") srcImg = visualization.putTextIntoImg(srcImg, result1, loc=100, EF=EF) srcImg = visualization.putTextIntoImg(srcImg, result2, loc=700, EF=EF, k=1) # plot the figure visualization.visualize(srcImg) print("Press y to continue, else quit!") ifContinue = input() if ifContinue != "y": break
[ 1, 9995, 13, 29896, 29889, 31120, 31020, 30705, 30354, 30763, 30503, 31382, 30883, 13, 268, 29896, 29889, 29896, 31201, 233, 161, 147, 27774, 290, 30333, 30631, 13, 268, 29896, 29889, 29906, 30666, 31526, 4299, 30503, 31382, 30883, 233, 160, 134, 30908, 13, 29906, 29889, 236, 165, 135, 31851, 3352, 17956, 13, 268, 29906, 29889, 29896, 30354, 30763, 31573, 30752, 31999, 29903, 2829, 968, 29899, 4299, 30214, 31573, 30544, 29876, 29930, 29906, 30210, 20158, 13, 268, 29906, 29889, 29906, 29876, 29930, 29906, 30210, 20158, 31573, 30752, 31999, 30822, 31548, 30687, 31565, 30545, 15110, 3352, 17956, 13, 29941, 29889, 236, 165, 135, 31851, 31320, 31901, 31125, 30354, 13, 268, 29941, 29889, 29896, 3352, 17956, 29871, 31573, 30752, 31999, 10199, 29899, 4299, 13, 268, 29941, 29889, 29906, 30748, 232, 140, 181, 30822, 30210, 13168, 30768, 31138, 30822, 31548, 30687, 30525, 30545, 31050, 30780, 3545, 4038, 13, 268, 29941, 29889, 29941, 30847, 30801, 31166, 30502, 31568, 31432, 31403, 31157, 31092, 31466, 31565, 24623, 30214, 30847, 30801, 31977, 30502, 31568, 31432, 31403, 30768, 31138, 3601, 11869, 30525, 30545, 31466, 31565, 24623, 13, 268, 29941, 29889, 29946, 31466, 31565, 29638, 13, 29946, 29889, 5317, 30003, 4532, 322, 7604, 2133, 13, 13, 15945, 29908, 13, 3166, 1400, 5014, 1053, 5881, 13544, 29918, 15501, 13, 3166, 1400, 5014, 29889, 2490, 19170, 1053, 334, 13, 3166, 1904, 1053, 2254, 29918, 1523, 20941, 29918, 4299, 13, 3166, 1904, 1053, 318, 29918, 1212, 13, 3166, 758, 5014, 1053, 6613, 29928, 293, 290, 13, 3166, 6492, 29918, 10154, 1053, 7604, 2133, 13, 5215, 13850, 29906, 13, 5215, 2897, 13, 359, 29889, 21813, 3366, 29907, 29965, 7698, 29918, 28607, 8979, 1307, 29918, 2287, 29963, 2965, 2890, 3108, 353, 376, 29906, 29908, 13, 29937, 29871, 31120, 31020, 30705, 31382, 30883, 13, 29923, 2287, 5550, 1127, 2463, 3195, 353, 2254, 29918, 1523, 20941, 29918, 4299, 29889, 1359, 29918, 4299, 29898, 2080, 29918, 2311, 29922, 29896, 29906, 29947, 29892, 2254, 29918, 7915, 29922, 5574, 2053, 13, 462, 462, 462, 539, 7688, 29918, 2084, 543, 4299, 29918, 7915, 29914, 29874, 29946, 29883, 29889, 29882, 2176, 29945, 1159, 396, 259, 30810, 30755, 31368, 31474, 13, 10199, 3352, 3195, 353, 318, 29918, 1212, 29889, 29884, 29918, 1212, 3552, 29896, 29906, 29947, 29892, 29871, 29896, 29906, 29947, 29892, 29871, 29896, 511, 2254, 22676, 29922, 5574, 2053, 13, 462, 308, 591, 335, 386, 2605, 543, 6904, 4299, 29918, 7915, 29914, 10199, 29899, 29874, 29946, 29883, 29899, 14968, 1609, 287, 29889, 29882, 2176, 29945, 1159, 13, 10199, 2890, 3195, 353, 318, 29918, 1212, 29889, 29884, 29918, 1212, 3552, 29896, 29906, 29947, 29892, 29871, 29896, 29906, 29947, 29892, 29871, 29896, 511, 2254, 22676, 29922, 5574, 2053, 13, 462, 308, 591, 335, 386, 2605, 543, 6904, 4299, 29918, 7915, 29914, 10199, 29899, 29874, 29946, 29883, 29899, 14968, 1609, 267, 29889, 29882, 2176, 29945, 1159, 13, 13, 13, 29937, 29871, 236, 155, 181, 31981, 3352, 30330, 2890, 30573, 2636, 13, 29937, 29871, 31120, 31020, 30705, 30354, 30763, 13, 8000, 5852, 29901, 13, 1678, 1121, 29896, 29892, 1121, 29906, 353, 24335, 6571, 13, 1678, 1596, 703, 552, 559, 1881, 263, 934, 2084, 30214, 14565, 408, 3876, 29914, 29874, 29914, 29890, 29914, 29883, 29914, 6995, 29896, 29889, 29881, 4912, 30383, 1159, 13, 13, 1678, 1550, 5852, 29901, 13, 4706, 4765, 29918, 2084, 353, 1881, 580, 13, 4706, 565, 4765, 29918, 2084, 1275, 376, 28358, 1115, 13, 9651, 6876, 580, 13, 4706, 1820, 353, 29871, 29900, 13, 4706, 1018, 29901, 13, 9651, 4974, 2897, 29889, 2084, 29889, 9933, 29898, 4351, 29918, 2084, 29897, 1275, 5852, 29892, 376, 2084, 1059, 3850, 13, 4706, 5174, 8960, 408, 429, 29901, 13, 9651, 1596, 29898, 735, 29892, 376, 552, 559, 1423, 372, 322, 1018, 1449, 470, 1881, 23283, 30584, 1159, 13, 9651, 1820, 353, 29871, 29896, 13, 4706, 565, 1820, 1275, 29871, 29900, 29901, 13, 9651, 2867, 13, 1678, 848, 29892, 2441, 14438, 1280, 353, 6613, 29928, 293, 290, 29889, 1639, 19819, 29928, 293, 290, 29898, 29896, 29906, 29947, 29892, 4351, 29918, 2084, 29897, 29871, 396, 29871, 30666, 31526, 29928, 293, 290, 30354, 30763, 31568, 236, 165, 148, 232, 187, 170, 12181, 353, 29871, 30419, 29876, 30214, 29896, 29906, 29947, 30214, 29896, 29906, 29947, 30214, 29896, 30409, 13, 1678, 1904, 3744, 29911, 6073, 353, 382, 2287, 5550, 1127, 2463, 3195, 29889, 27711, 4197, 1272, 7503, 29899, 29896, 1402, 848, 29961, 29896, 17531, 2314, 13, 1678, 382, 4037, 3128, 4557, 353, 2243, 4821, 29918, 7165, 29898, 4299, 3744, 29911, 6073, 29892, 5217, 29918, 29874, 29946, 2252, 29918, 19935, 29898, 4299, 3744, 29911, 6073, 511, 29871, 29896, 29897, 29871, 396, 736, 263, 2391, 13, 1678, 17956, 4308, 4557, 353, 2243, 4821, 29918, 7165, 29898, 4299, 3744, 29911, 6073, 29892, 5217, 29918, 29874, 29946, 2395, 29918, 19935, 29898, 4299, 3744, 29911, 6073, 511, 29871, 29900, 29897, 13, 13, 1678, 11105, 3352, 353, 2377, 3352, 3195, 29889, 27711, 29898, 1272, 29961, 3352, 4308, 4557, 29961, 29900, 29962, 29899, 29896, 29901, 3352, 4308, 4557, 29961, 29900, 5262, 467, 690, 14443, 29898, 29896, 29906, 29947, 29892, 29871, 29896, 29906, 29947, 29897, 29871, 396, 29871, 236, 157, 146, 31429, 30998, 30622, 30287, 232, 187, 170, 30732, 30573, 3352, 30214, 31573, 30544, 13168, 489, 5961, 29896, 29892, 29896, 29906, 29947, 29892, 29896, 29906, 29947, 29892, 29896, 29897, 13, 1678, 11105, 2890, 353, 2377, 2890, 3195, 29889, 27711, 29898, 1272, 29961, 2890, 4308, 4557, 29961, 29900, 29962, 29899, 29896, 29901, 2890, 4308, 4557, 29961, 29900, 5262, 467, 690, 14443, 29898, 29896, 29906, 29947, 29892, 29871, 29896, 29906, 29947, 29897, 13, 13, 13, 1678, 6287, 353, 6613, 29928, 293, 290, 29889, 5510, 29918, 7052, 29898, 4351, 29918, 2084, 29897, 13, 1678, 9408, 9329, 353, 5881, 13544, 29918, 15501, 29889, 4912, 415, 29918, 14369, 29918, 1555, 398, 23538, 13168, 3352, 29892, 6287, 29922, 7052, 29897, 29871, 396, 29871, 31368, 31474, 7052, 13, 1678, 17956, 9329, 353, 5881, 13544, 29918, 15501, 29889, 4912, 415, 29918, 14369, 29918, 1555, 398, 23538, 13168, 2890, 29892, 6287, 29922, 7052, 29897, 13, 1678, 22286, 353, 313, 3352, 9329, 14352, 29896, 29962, 448, 17956, 9329, 14352, 29896, 2314, 29914, 3352, 9329, 14352, 29896, 29962, 13, 13, 1678, 3443, 3596, 353, 382, 4037, 3128, 4557, 29961, 29900, 29901, 29896, 10062, 1761, 29898, 3352, 9329, 7240, 2890, 4308, 4557, 29961, 29900, 29901, 29896, 10062, 1761, 29898, 2890, 9329, 29897, 13, 1678, 3443, 8659, 29896, 353, 6796, 3352, 12218, 1353, 29901, 613, 376, 268, 365, 29963, 365, 1477, 29901, 613, 376, 268, 365, 29963, 18320, 29901, 613, 376, 268, 365, 29963, 7977, 29901, 3108, 13, 1678, 3443, 8659, 29906, 353, 6796, 2890, 12218, 1353, 29901, 613, 376, 268, 365, 29963, 365, 1477, 29901, 613, 376, 268, 365, 29963, 18320, 29901, 613, 376, 268, 365, 29963, 7977, 29901, 3108, 13, 1678, 20039, 353, 6796, 613, 376, 4912, 613, 376, 4912, 30088, 613, 376, 828, 3108, 13, 13, 1678, 363, 474, 29892, 432, 297, 26985, 29898, 15501, 8659, 29896, 1125, 13, 4706, 1121, 29896, 29961, 29926, 29962, 353, 11860, 29889, 29906, 29888, 29908, 1273, 313, 3352, 4308, 4557, 29961, 29900, 29901, 29896, 10062, 1761, 29898, 3352, 9329, 876, 29961, 29875, 10062, 26658, 358, 29961, 29875, 29962, 13, 1678, 363, 474, 29892, 432, 297, 26985, 29898, 15501, 8659, 29906, 1125, 13, 4706, 1121, 29906, 29961, 29926, 29962, 353, 11860, 29889, 29906, 29888, 29908, 1273, 313, 2890, 4308, 4557, 29961, 29900, 29901, 29896, 10062, 1761, 29898, 2890, 9329, 876, 29961, 29875, 10062, 26658, 358, 29961, 29875, 29962, 13, 13, 13, 13, 1678, 396, 29871, 30682, 31568, 30705, 13, 1678, 3474, 353, 7604, 2133, 29889, 7165, 29898, 29896, 29906, 29900, 29900, 29892, 29871, 29947, 29900, 29900, 29897, 13, 1678, 3474, 7503, 29953, 29900, 29900, 29892, 584, 29892, 584, 29962, 353, 7604, 2133, 29889, 5317, 19832, 29898, 13168, 3352, 29892, 2441, 14438, 1280, 29961, 3352, 4308, 4557, 29961, 29900, 29962, 29899, 29896, 2314, 29871, 396, 29871, 30505, 30667, 30861, 30275, 31046, 30544, 30869, 30728, 235, 137, 159, 13, 1678, 3474, 29961, 29953, 29900, 29900, 29901, 29892, 584, 29892, 584, 29962, 353, 7604, 2133, 29889, 5317, 19832, 29898, 13168, 2890, 29892, 2441, 14438, 1280, 29961, 2890, 4308, 4557, 29961, 29900, 29962, 29899, 29896, 2314, 13, 1678, 13850, 29906, 29889, 326, 3539, 703, 6904, 2492, 29889, 2732, 613, 3474, 29930, 29906, 29945, 29945, 29897, 13, 13, 1678, 396, 259, 31538, 30666, 30333, 30578, 13, 1678, 4765, 25518, 353, 13850, 29906, 29889, 326, 949, 703, 6904, 2492, 29889, 2732, 1159, 13, 1678, 2897, 29889, 5992, 703, 6904, 2492, 29889, 2732, 1159, 13, 1678, 4765, 25518, 353, 7604, 2133, 29889, 649, 1626, 797, 517, 25518, 29898, 4351, 25518, 29892, 1121, 29896, 29892, 1180, 29922, 29896, 29900, 29900, 29892, 22286, 29922, 29638, 29897, 13, 1678, 4765, 25518, 353, 7604, 2133, 29889, 649, 1626, 797, 517, 25518, 29898, 4351, 25518, 29892, 1121, 29906, 29892, 1180, 29922, 29955, 29900, 29900, 29892, 22286, 29922, 29638, 29892, 413, 29922, 29896, 29897, 13, 1678, 396, 29871, 6492, 278, 4377, 13, 1678, 7604, 2133, 29889, 20119, 675, 29898, 4351, 25518, 29897, 13, 13, 13, 1678, 1596, 703, 10923, 343, 304, 6773, 29892, 1683, 23283, 30584, 1159, 13, 1678, 565, 1323, 14150, 353, 1881, 580, 13, 1678, 565, 565, 1323, 14150, 2804, 376, 29891, 1115, 13, 4706, 2867, 13, 13, 2 ]
imagepy/core/mark/mark.py
adines/imagepy
1
150185
import numpy as np from math import sin, cos from ..manager import ConfigManager point = {'type':'point', 'color':(255,0,0), 'lw':1, 'body':(10,10)} points = {'type':'points', 'color':(255,0,0), 'lw':1, 'body':[(10,10),(100,200)]} line = {'type':'line', 'color':(255,0,0), 'lw':1, 'style':'-', 'body':[(10,10),(100,200),(200,200)]} lines = {'type':'lines', 'color':(255,0,0), 'lw':1, 'style':'-', 'body':[[(10,10),(100,200),(200,200)],[(150,10),(50,250)]]} polygon = {'type':'polygon', 'color':(255,0,0), 'fcolor':(255,255,0), 'lw':1, 'style':'o', 'body':[(10,10),(100,200),(200,200)]} polygons = {'type':'polygons', 'color':(255,0,0), 'fcolor':(255,255,0,30), 'fill':False, 'lw':1, 'style':'o', 'body':[[(10,10),(100,200),(200,200)],[(150,10),(50,250),(288,0)]]} circle = {'type':'circle', 'color':(255,0,0), 'fcolor':(255,255,0), 'fill':False, 'body':(100,100,50)} circles = {'type':'circles', 'color':(255,0,0), 'fcolor':(255,255,0), 'fill':False, 'body':[(100,100,50),(300,300,100)]} ellipse = {'type':'ellipse', 'color':(255,0,0), 'fcolor':(255,255,0), 'fill':False, 'body':(100,100,100,50,1)} ellipses = {'type':'ellipses', 'color':(255,0,0), 'fcolor':(255,255,0), 'fill':False, 'body':[(100,100,100,50,1),(200,250,50,100,3.14)]} rectangle = {'type':'rectangle', 'color':(255,0,0), 'fcolor':(255,255,0), 'fill':True, 'body':(100,100,80,50)} rectangles = {'type':'rectangles', 'color':(255,0,0), 'fcolor':(255,255,0), 'fill':False, 'body':[(100,100,80,50),(200,200,80,100)]} text = {'type':'text', 'color':(255,255,0), 'fcolor':(0,0,0), 'size':8, 'pt':True, 'body':(100,200,'id=0')} texts = {'type':'texts', 'color':(255,255,0), 'fcolor':(0,0,0), 'size':8, 'pt':True, 'body':[(100,200,'id=0'),(180,250,'id=1')]} layer = {'type':'layer', 'num':-1, 'clolor':(255,255,0), 'fcolor':(255,255,255), 'fill':False, 'body':[point, points, line, lines, polygon, polygons, circle, circles, ellipse, ellipses, rectangle, rectangles, text, texts]} layers = {'type':'layers', 'num':-1, 'clolor':(255,255,0), 'fcolor':(255,255,255), 'fill':False, 'body':{1:points, 2:line, 3:layer}} def plot(pts, dc, f, **key): pen, brush = dc.GetPen(), dc.GetBrush() width, color = pen.GetWidth(), pen.GetColour() fcolor, style = brush.GetColour(), brush.GetStyle() if 'color' in pts: pen.SetColour(pts['color']) if 'fcolor' in pts: brush.SetColour(pts['fcolor']) if 'lw' in pts: pen.SetWidth(pts['lw']) if 'fill' in pts: brush.SetStyle((106,100)[pts['fill']]) dc.SetPen(pen) dc.SetBrush(brush) if pts['type'] == 'point': pen.SetWidth(1) brush.SetStyle(100) brush.SetColour(pen.GetColour()) dc.SetPen(pen) dc.SetBrush(brush) r = pts['r'] if 'r' in pts else 2 x, y = f(*pts['body']) dc.DrawEllipse (x-r,y-r,r*2,r*2) pen.SetWidth(pts['lw'] if 'lw' in pts else width) brush.SetStyle((106,100)[pts['fill']] if 'fill' in pts else style) brush.SetColour(pts['fc'] if 'fc' in pts else fcolor) dc.SetPen(pen) dc.SetBrush(brush) elif pts['type'] in {'points','line','polygon'}: lst, plst = [], [] r = pts['r'] if 'r' in pts else 2 for p in pts['body']: x, y = f(*p) lst.append((x-r,y-r,r*2,r*2)) plst.append((x,y)) isline = 'style' in pts and '-' in pts['style'] ispoint = 'style' in pts and 'o' in pts['style'] if pts['type'] == 'polygon': dc.DrawPolygon(plst) if isline or pts['type'] == 'line': dc.DrawLines(plst) if pts['type']=='points' or ispoint: pen.SetWidth(1) brush.SetStyle(100) brush.SetColour(pen.GetColour()) dc.SetPen(pen) dc.SetBrush(brush) dc.DrawEllipseList(lst) pen.SetWidth(pts['lw'] if 'lw' in pts else width) brush.SetStyle((106,100)[pts['fill']] if 'fill' in pts else style) brush.SetColour(pts['fc'] if 'fc' in pts else fcolor) dc.SetPen(pen) dc.SetBrush(brush) elif pts['type'] in {'lines','polygons'}: lst, plst = [], [] r = pts['r'] if 'r' in pts else 2 for i in pts['body']: line = [] for p in i: x, y = f(*p) lst.append((x-r,y-r,r*2,r*2)) line.append((x,y)) plst.append(line) isline = 'style' in pts and '-' in pts['style'] ispoint = 'style' in pts and 'o' in pts['style'] if pts['type'] == 'polygons': dc.DrawPolygonList(plst) if isline or pts['type'] == 'line': for line in plst: dc.DrawLines(line) if pts['type']=='points' or ispoint: pen.SetWidth(1) brush.SetStyle(100) brush.SetColour(pen.GetColour()) dc.SetPen(pen) dc.SetBrush(brush) dc.DrawEllipseList(lst) pen.SetWidth(pts['lw'] if 'lw' in pts else width) brush.SetStyle((106,100)[pts['fill']] if 'fill' in pts else style) brush.SetColour(pts['fc'] if 'fc' in pts else fcolor) dc.SetPen(pen) dc.SetBrush(brush) pen.SetWidth(width) pen.SetColour(color) brush.SetColour(fcolor) brush.SetStyle(style) dc.SetPen(pen) dc.SetBrush(brush) def draw_circle(pts, dc, f, **key): pen, brush = dc.GetPen(), dc.GetBrush() width, color = pen.GetWidth(), pen.GetColour() fcolor, style = brush.GetColour(), brush.GetStyle() if 'color' in pts: pen.SetColour(pts['color']) if 'fcolor' in pts: brush.SetColour(pts['fcolor']) if 'lw' in pts: pen.SetWidth(pts['lw']) if 'fill' in pts: brush.SetStyle((106,100)[pts['fill']]) dc.SetPen(pen) dc.SetBrush(brush) if pts['type'] == 'circle': x, y ,r = pts['body'] x, y = f(x, y) dc.DrawCircle(x, y, r*key['k']) if pts['type'] == 'circles': lst = [] for x, y ,r in pts['body']: x, y = f(x, y) r *= key['k'] lst.append((x-r,y-r,r*2,r*2)) dc.DrawEllipseList(lst) pen.SetWidth(width) pen.SetColour(color) brush.SetColour(fcolor) brush.SetStyle(style) dc.SetPen(pen) dc.SetBrush(brush) def make_ellipse(l1, l2, ang): m = np.array([[l1*cos(-ang),-l2*sin(-ang)], [l1*sin(-ang),l2*cos(-ang)]]) a = np.linspace(0, np.pi*2, 36) xys = np.array((np.cos(a), np.sin(a))) return np.dot(m, xys).T def draw_ellipse(pts, dc, f, **key): pen, brush = dc.GetPen(), dc.GetBrush() width, color = pen.GetWidth(), pen.GetColour() fcolor, style = brush.GetColour(), brush.GetStyle() if 'color' in pts: pen.SetColour(pts['color']) if 'fcolor' in pts: brush.SetColour(pts['fcolor']) if 'lw' in pts: pen.SetWidth(pts['lw']) if 'fill' in pts: brush.SetStyle((106,100)[pts['fill']]) dc.SetPen(pen) dc.SetBrush(brush) if pts['type'] == 'ellipse': x, y ,l1, l2, a = pts['body'] elp = make_ellipse(l1,l2,a) elp = elp*key['k']+f(x,y) dc.DrawPolygon(elp) if pts['type'] == 'ellipses': lst = [] for x, y, l1, l2, a in pts['body']: elp = make_ellipse(l1,l2,a) lst.append(elp*key['k']+f(x,y)) dc.DrawPolygonList(lst) pen.SetWidth(width) pen.SetColour(color) brush.SetColour(fcolor) brush.SetStyle(style) dc.SetPen(pen) dc.SetBrush(brush) def draw_rectangle(pts, dc, f, **key): pen, brush = dc.GetPen(), dc.GetBrush() width, color = pen.GetWidth(), pen.GetColour() fcolor, style = brush.GetColour(), brush.GetStyle() if 'color' in pts: pen.SetColour(pts['color']) if 'fcolor' in pts: brush.SetColour(pts['fcolor']) if 'lw' in pts: pen.SetWidth(pts['lw']) if 'fill' in pts: brush.SetStyle((106,100)[pts['fill']]) dc.SetPen(pen) dc.SetBrush(brush) if pts['type'] == 'rectangle': x, y, w, h = pts['body'] x, y = f(x, y) w, h = w*key['k'], h*key['k'] dc.DrawRectangle(x-w/2, y-h/2, w, h) if pts['type'] == 'rectangles': lst = [] for x, y, w, h in pts['body']: x, y = f(x, y) w, h = w*key['k'], h*key['k'] lst.append((x-w/2, y-h/2, w, h)) dc.DrawRectangleList(lst) pen.SetWidth(width) pen.SetColour(color) brush.SetColour(fcolor) brush.SetStyle(style) dc.SetPen(pen) dc.SetBrush(brush) def draw_text(pts, dc, f, **key): pen, brush, font = dc.GetPen(), dc.GetBrush(), dc.GetFont() width, color = pen.GetWidth(), pen.GetColour() fcolor, style = brush.GetColour(), brush.GetStyle() size = font.GetPointSize() tcolor = dc.GetTextForeground() bcolor = dc.GetTextBackground() if 'color' in pts: pen.SetColour(pts['color']) dc.SetTextForeground(pts['color']) brush.SetColour(pen.GetColour()) brush.SetStyle(100) if 'fcolor' in pts: print('hahaha') dc.SetTextBackground(pts['fcolor']) if 'size' in pts: font.SetPointSize(pts['size']) dc.SetPen(pen) dc.SetBrush(brush) dc.SetFont(font) if pts['type'] == 'text': x, y, text = pts['body'] x, y = f(x, y) dc.DrawText(text, x+3, y+3) if not 'pt' in pts or pts['pt']: dc.DrawEllipse(x-2,y-2,4,4) if pts['type'] == 'texts': tlst, clst, elst = [], [], [] for x, y, text in pts['body']: x, y = f(x, y) tlst.append(text) clst.append((x+3, y+3)) elst.append((x-2, y-2, 4, 4)) dc.DrawTextList(tlst, clst) if not 'pt' in pts or pts['pt']: dc.DrawEllipseList(elst) font.SetPointSize(size) pen.SetColour(color) brush.SetColour(fcolor) brush.SetStyle(style) dc.SetPen(pen) dc.SetBrush(brush) dc.SetFont(font) dc.SetTextForeground(tcolor) dc.SetTextBackground(bcolor) draw_dic = {'points':plot, 'point':plot, 'line':plot, 'polygon':plot, 'lines':plot, 'polygons':plot, 'circle':draw_circle, 'circles':draw_circle, 'ellipse':draw_ellipse, 'ellipses':draw_ellipse, 'rectangle':draw_rectangle, 'rectangles':draw_rectangle, 'text':draw_text, 'texts':draw_text} def draw(obj, dc, f, **key): draw_dic[obj['type']](obj, dc, f, **key) def draw_layer(pts, dc, f, **key): pen, brush = dc.GetPen(), dc.GetBrush() width, color = pen.GetWidth(), pen.GetColour() fcolor, style = brush.GetColour(), brush.GetStyle() if 'color' in pts: pen.SetColour(pts['color']) if 'fcolor' in pts: brush.SetColour(pts['fcolor']) if 'lw' in pts: pen.SetWidth(pts['lw']) if 'fill' in pts: brush.SetStyle((106,100)[pts['fill']]) dc.SetPen(pen) dc.SetBrush(brush) for i in pts['body']:draw(i, dc, f, **key) pen.SetWidth(width) pen.SetColour(color) brush.SetColour(fcolor) brush.SetStyle(style) dc.SetPen(pen) dc.SetBrush(brush) draw_dic['layer'] = draw_layer def draw_layers(pts, dc, f, **key): pen, brush = dc.GetPen(), dc.GetBrush() width, color = pen.GetWidth(), pen.GetColour() fcolor, style = brush.GetColour(), brush.GetStyle() if 'color' in pts: pen.SetColour(pts['color']) if 'fcolor' in pts: brush.SetColour(pts['fcolor']) if 'lw' in pts: pen.SetWidth(pts['lw']) if 'fill' in pts: brush.SetStyle((106,100)[pts['fill']]) dc.SetPen(pen) dc.SetBrush(brush) print(pts['body'].keys()) if key['cur'] in pts['body']: draw(pts['body'][key['cur']], dc, f, **key) pen.SetWidth(width) pen.SetColour(color) brush.SetColour(fcolor) brush.SetStyle(style) dc.SetPen(pen) dc.SetBrush(brush) draw_dic['layers'] = draw_layers class GeometryMark: def __init__(self, body): self.body = body def draw(self, dc, f, **key): pen, brush, font = dc.GetPen(), dc.GetBrush(), dc.GetFont() pen.SetColour(ConfigManager.get('mark_color') or (255,255,0)) brush.SetColour(ConfigManager.get('mark_fcolor') or (255,255,255)) brush.SetStyle((106,100)[ConfigManager.get('mark_fill') or False]) pen.SetWidth(ConfigManager.get('mark_lw') or 1) dc.SetTextForeground(ConfigManager.get('mark_tcolor') or (255,0,0)) font.SetPointSize(ConfigManager.get('mark_tsize') or 8) dc.SetPen(pen); dc.SetBrush(brush); dc.SetFont(font); draw(self.body, dc, f, **key) if __name__ == '__main__': print(make_ellipse(0,0,2,1,0))
[ 1, 1053, 12655, 408, 7442, 13, 3166, 5844, 1053, 4457, 29892, 6776, 13, 3166, 6317, 12847, 1053, 12782, 3260, 13, 13, 3149, 353, 11117, 1853, 22099, 3149, 742, 525, 2780, 2396, 29898, 29906, 29945, 29945, 29892, 29900, 29892, 29900, 511, 525, 29880, 29893, 2396, 29896, 29892, 525, 2587, 2396, 29898, 29896, 29900, 29892, 29896, 29900, 2915, 13, 9748, 353, 11117, 1853, 22099, 9748, 742, 525, 2780, 2396, 29898, 29906, 29945, 29945, 29892, 29900, 29892, 29900, 511, 525, 29880, 29893, 2396, 29896, 29892, 525, 2587, 2396, 15625, 29896, 29900, 29892, 29896, 29900, 21336, 29896, 29900, 29900, 29892, 29906, 29900, 29900, 4638, 29913, 13, 1220, 353, 11117, 1853, 22099, 1220, 742, 525, 2780, 2396, 29898, 29906, 29945, 29945, 29892, 29900, 29892, 29900, 511, 525, 29880, 29893, 2396, 29896, 29892, 525, 3293, 22099, 29899, 742, 525, 2587, 2396, 15625, 29896, 29900, 29892, 29896, 29900, 21336, 29896, 29900, 29900, 29892, 29906, 29900, 29900, 21336, 29906, 29900, 29900, 29892, 29906, 29900, 29900, 4638, 29913, 13, 9012, 353, 11117, 1853, 22099, 9012, 742, 525, 2780, 2396, 29898, 29906, 29945, 29945, 29892, 29900, 29892, 29900, 511, 525, 29880, 29893, 2396, 29896, 29892, 525, 3293, 22099, 29899, 742, 525, 2587, 2396, 8999, 29898, 29896, 29900, 29892, 29896, 29900, 21336, 29896, 29900, 29900, 29892, 29906, 29900, 29900, 21336, 29906, 29900, 29900, 29892, 29906, 29900, 29900, 29897, 1402, 15625, 29896, 29945, 29900, 29892, 29896, 29900, 21336, 29945, 29900, 29892, 29906, 29945, 29900, 4638, 12258, 13, 3733, 17125, 353, 11117, 1853, 22099, 3733, 17125, 742, 525, 2780, 2396, 29898, 29906, 29945, 29945, 29892, 29900, 29892, 29900, 511, 525, 29888, 2780, 2396, 29898, 29906, 29945, 29945, 29892, 29906, 29945, 29945, 29892, 29900, 511, 525, 29880, 29893, 2396, 29896, 29892, 525, 3293, 22099, 29877, 742, 525, 2587, 2396, 15625, 29896, 29900, 29892, 29896, 29900, 21336, 29896, 29900, 29900, 29892, 29906, 29900, 29900, 21336, 29906, 29900, 29900, 29892, 29906, 29900, 29900, 4638, 29913, 13, 3733, 4790, 787, 353, 11117, 1853, 22099, 3733, 4790, 787, 742, 525, 2780, 2396, 29898, 29906, 29945, 29945, 29892, 29900, 29892, 29900, 511, 525, 29888, 2780, 2396, 29898, 29906, 29945, 29945, 29892, 29906, 29945, 29945, 29892, 29900, 29892, 29941, 29900, 511, 525, 5589, 2396, 8824, 29892, 525, 29880, 29893, 2396, 29896, 29892, 525, 3293, 22099, 29877, 742, 525, 2587, 2396, 8999, 29898, 29896, 29900, 29892, 29896, 29900, 21336, 29896, 29900, 29900, 29892, 29906, 29900, 29900, 21336, 29906, 29900, 29900, 29892, 29906, 29900, 29900, 29897, 1402, 15625, 29896, 29945, 29900, 29892, 29896, 29900, 21336, 29945, 29900, 29892, 29906, 29945, 29900, 21336, 29906, 29947, 29947, 29892, 29900, 4638, 12258, 13, 16622, 353, 11117, 1853, 22099, 16622, 742, 525, 2780, 2396, 29898, 29906, 29945, 29945, 29892, 29900, 29892, 29900, 511, 525, 29888, 2780, 2396, 29898, 29906, 29945, 29945, 29892, 29906, 29945, 29945, 29892, 29900, 511, 525, 5589, 2396, 8824, 29892, 525, 2587, 2396, 29898, 29896, 29900, 29900, 29892, 29896, 29900, 29900, 29892, 29945, 29900, 2915, 13, 19052, 7799, 353, 11117, 1853, 22099, 19052, 7799, 742, 525, 2780, 2396, 29898, 29906, 29945, 29945, 29892, 29900, 29892, 29900, 511, 525, 29888, 2780, 2396, 29898, 29906, 29945, 29945, 29892, 29906, 29945, 29945, 29892, 29900, 511, 525, 5589, 2396, 8824, 29892, 525, 2587, 2396, 15625, 29896, 29900, 29900, 29892, 29896, 29900, 29900, 29892, 29945, 29900, 21336, 29941, 29900, 29900, 29892, 29941, 29900, 29900, 29892, 29896, 29900, 29900, 4638, 29913, 13, 295, 5843, 353, 11117, 1853, 22099, 295, 5843, 742, 525, 2780, 2396, 29898, 29906, 29945, 29945, 29892, 29900, 29892, 29900, 511, 525, 29888, 2780, 2396, 29898, 29906, 29945, 29945, 29892, 29906, 29945, 29945, 29892, 29900, 511, 525, 5589, 2396, 8824, 29892, 525, 2587, 2396, 29898, 29896, 29900, 29900, 29892, 29896, 29900, 29900, 29892, 29896, 29900, 29900, 29892, 29945, 29900, 29892, 29896, 2915, 13, 5481, 567, 267, 353, 11117, 1853, 22099, 5481, 567, 267, 742, 525, 2780, 2396, 29898, 29906, 29945, 29945, 29892, 29900, 29892, 29900, 511, 525, 29888, 2780, 2396, 29898, 29906, 29945, 29945, 29892, 29906, 29945, 29945, 29892, 29900, 511, 525, 5589, 2396, 8824, 29892, 525, 2587, 2396, 15625, 29896, 29900, 29900, 29892, 29896, 29900, 29900, 29892, 29896, 29900, 29900, 29892, 29945, 29900, 29892, 29896, 21336, 29906, 29900, 29900, 29892, 29906, 29945, 29900, 29892, 29945, 29900, 29892, 29896, 29900, 29900, 29892, 29941, 29889, 29896, 29946, 4638, 29913, 13, 1621, 2521, 353, 11117, 1853, 22099, 1621, 2521, 742, 525, 2780, 2396, 29898, 29906, 29945, 29945, 29892, 29900, 29892, 29900, 511, 525, 29888, 2780, 2396, 29898, 29906, 29945, 29945, 29892, 29906, 29945, 29945, 29892, 29900, 511, 525, 5589, 2396, 5574, 29892, 525, 2587, 2396, 29898, 29896, 29900, 29900, 29892, 29896, 29900, 29900, 29892, 29947, 29900, 29892, 29945, 29900, 2915, 13, 1621, 19536, 353, 11117, 1853, 22099, 1621, 19536, 742, 525, 2780, 2396, 29898, 29906, 29945, 29945, 29892, 29900, 29892, 29900, 511, 525, 29888, 2780, 2396, 29898, 29906, 29945, 29945, 29892, 29906, 29945, 29945, 29892, 29900, 511, 525, 5589, 2396, 8824, 29892, 525, 2587, 2396, 15625, 29896, 29900, 29900, 29892, 29896, 29900, 29900, 29892, 29947, 29900, 29892, 29945, 29900, 21336, 29906, 29900, 29900, 29892, 29906, 29900, 29900, 29892, 29947, 29900, 29892, 29896, 29900, 29900, 4638, 29913, 13, 726, 353, 11117, 1853, 22099, 726, 742, 525, 2780, 2396, 29898, 29906, 29945, 29945, 29892, 29906, 29945, 29945, 29892, 29900, 511, 525, 29888, 2780, 2396, 29898, 29900, 29892, 29900, 29892, 29900, 511, 525, 2311, 2396, 29947, 29892, 525, 415, 2396, 5574, 29892, 525, 2587, 2396, 29898, 29896, 29900, 29900, 29892, 29906, 29900, 29900, 5501, 333, 29922, 29900, 1495, 29913, 13, 726, 29879, 353, 11117, 1853, 22099, 726, 29879, 742, 525, 2780, 2396, 29898, 29906, 29945, 29945, 29892, 29906, 29945, 29945, 29892, 29900, 511, 525, 29888, 2780, 2396, 29898, 29900, 29892, 29900, 29892, 29900, 511, 525, 2311, 2396, 29947, 29892, 525, 415, 2396, 5574, 29892, 525, 2587, 2396, 15625, 29896, 29900, 29900, 29892, 29906, 29900, 29900, 5501, 333, 29922, 29900, 5477, 29898, 29896, 29947, 29900, 29892, 29906, 29945, 29900, 5501, 333, 29922, 29896, 1495, 12258, 13, 13, 13148, 353, 11117, 1853, 22099, 13148, 742, 525, 1949, 2396, 29899, 29896, 29892, 525, 695, 324, 272, 2396, 29898, 29906, 29945, 29945, 29892, 29906, 29945, 29945, 29892, 29900, 511, 525, 29888, 2780, 2396, 29898, 29906, 29945, 29945, 29892, 29906, 29945, 29945, 29892, 29906, 29945, 29945, 511, 525, 5589, 2396, 8824, 29892, 29871, 13, 12, 12, 12, 29915, 2587, 2396, 29961, 3149, 29892, 3291, 29892, 1196, 29892, 3454, 29892, 29807, 29892, 1248, 4790, 787, 29892, 8607, 29892, 22558, 29892, 560, 5843, 29892, 22434, 567, 267, 29892, 16701, 29892, 7705, 19536, 29892, 1426, 29892, 26442, 12258, 13, 12, 12, 13, 29277, 353, 11117, 1853, 22099, 29277, 742, 525, 1949, 2396, 29899, 29896, 29892, 525, 695, 324, 272, 2396, 29898, 29906, 29945, 29945, 29892, 29906, 29945, 29945, 29892, 29900, 511, 525, 29888, 2780, 2396, 29898, 29906, 29945, 29945, 29892, 29906, 29945, 29945, 29892, 29906, 29945, 29945, 511, 525, 5589, 2396, 8824, 29892, 29871, 13, 12, 29915, 2587, 2396, 29912, 29896, 29901, 9748, 29892, 29871, 29906, 29901, 1220, 29892, 29871, 29941, 29901, 13148, 930, 13, 13, 1753, 6492, 29898, 16485, 29892, 270, 29883, 29892, 285, 29892, 3579, 1989, 1125, 13, 12, 2238, 29892, 1506, 1878, 353, 270, 29883, 29889, 2577, 29925, 264, 3285, 270, 29883, 29889, 2577, 27680, 580, 13, 12, 2103, 29892, 2927, 353, 6584, 29889, 2577, 6110, 3285, 6584, 29889, 2577, 1625, 473, 580, 13, 12, 29888, 2780, 29892, 3114, 353, 1506, 1878, 29889, 2577, 1625, 473, 3285, 1506, 1878, 29889, 2577, 5568, 580, 13, 12, 13, 12, 361, 525, 2780, 29915, 297, 282, 1372, 29901, 29871, 13, 12, 12, 2238, 29889, 2697, 1625, 473, 29898, 16485, 1839, 2780, 11287, 13, 12, 361, 525, 29888, 2780, 29915, 297, 282, 1372, 29901, 13, 12, 12, 1182, 1878, 29889, 2697, 1625, 473, 29898, 16485, 1839, 29888, 2780, 11287, 13, 12, 361, 525, 29880, 29893, 29915, 297, 282, 1372, 29901, 13, 12, 12, 2238, 29889, 2697, 6110, 29898, 16485, 1839, 29880, 29893, 11287, 13, 12, 361, 525, 5589, 29915, 297, 282, 1372, 29901, 13, 12, 12, 1182, 1878, 29889, 2697, 5568, 3552, 29896, 29900, 29953, 29892, 29896, 29900, 29900, 9601, 16485, 1839, 5589, 2033, 2314, 13, 13, 12, 13891, 29889, 2697, 29925, 264, 29898, 2238, 29897, 13, 12, 13891, 29889, 2697, 27680, 29898, 1182, 1878, 29897, 13, 12, 13, 12, 361, 282, 1372, 1839, 1853, 2033, 1275, 525, 3149, 2396, 13, 12, 12, 2238, 29889, 2697, 6110, 29898, 29896, 29897, 13, 12, 12, 1182, 1878, 29889, 2697, 5568, 29898, 29896, 29900, 29900, 29897, 13, 12, 12, 1182, 1878, 29889, 2697, 1625, 473, 29898, 2238, 29889, 2577, 1625, 473, 3101, 13, 12, 12, 13891, 29889, 2697, 29925, 264, 29898, 2238, 29897, 13, 12, 12, 13891, 29889, 2697, 27680, 29898, 1182, 1878, 29897, 13, 12, 12, 29878, 353, 282, 1372, 1839, 29878, 2033, 565, 525, 29878, 29915, 297, 282, 1372, 1683, 29871, 29906, 13, 12, 12, 29916, 29892, 343, 353, 29871, 285, 10456, 16485, 1839, 2587, 11287, 13, 12, 12, 13891, 29889, 8537, 6489, 5843, 313, 29916, 29899, 29878, 29892, 29891, 29899, 29878, 29892, 29878, 29930, 29906, 29892, 29878, 29930, 29906, 29897, 13, 12, 12, 2238, 29889, 2697, 6110, 29898, 16485, 1839, 29880, 29893, 2033, 565, 525, 29880, 29893, 29915, 297, 282, 1372, 1683, 2920, 29897, 13, 12, 12, 1182, 1878, 29889, 2697, 5568, 3552, 29896, 29900, 29953, 29892, 29896, 29900, 29900, 9601, 16485, 1839, 5589, 2033, 29962, 565, 525, 5589, 29915, 297, 282, 1372, 1683, 3114, 29897, 13, 12, 12, 1182, 1878, 29889, 2697, 1625, 473, 29898, 16485, 1839, 13801, 2033, 565, 525, 13801, 29915, 297, 282, 1372, 1683, 285, 2780, 29897, 13, 12, 12, 13891, 29889, 2697, 29925, 264, 29898, 2238, 29897, 13, 12, 12, 13891, 29889, 2697, 27680, 29898, 1182, 1878, 29897, 13, 12, 23681, 282, 1372, 1839, 1853, 2033, 297, 11117, 9748, 3788, 1220, 3788, 3733, 17125, 29915, 6177, 13, 12, 12, 20155, 29892, 715, 303, 353, 19997, 5159, 13, 12, 12, 29878, 353, 282, 1372, 1839, 29878, 2033, 565, 525, 29878, 29915, 297, 282, 1372, 1683, 29871, 29906, 13, 12, 12, 1454, 282, 297, 282, 1372, 1839, 2587, 2033, 29901, 13, 12, 12, 12, 29916, 29892, 343, 353, 29871, 285, 10456, 29886, 29897, 13, 12, 12, 12, 20155, 29889, 4397, 3552, 29916, 29899, 29878, 29892, 29891, 29899, 29878, 29892, 29878, 29930, 29906, 29892, 29878, 29930, 29906, 876, 13, 12, 12, 12, 572, 303, 29889, 4397, 3552, 29916, 29892, 29891, 876, 13, 12, 12, 275, 1220, 353, 525, 3293, 29915, 297, 282, 1372, 322, 17411, 29915, 297, 282, 1372, 1839, 3293, 2033, 13, 12, 12, 275, 3149, 353, 525, 3293, 29915, 297, 282, 1372, 322, 525, 29877, 29915, 297, 282, 1372, 1839, 3293, 2033, 13, 12, 12, 361, 282, 1372, 1839, 1853, 2033, 1275, 525, 3733, 17125, 2396, 13, 12, 12, 12, 13891, 29889, 8537, 7713, 17125, 29898, 572, 303, 29897, 13, 12, 12, 13, 12, 12, 361, 338, 1220, 470, 282, 1372, 1839, 1853, 2033, 1275, 525, 1220, 2396, 13, 12, 12, 12, 13891, 29889, 8537, 20261, 29898, 572, 303, 29897, 13, 12, 12, 13, 12, 12, 361, 282, 1372, 1839, 1853, 2033, 1360, 29915, 9748, 29915, 470, 338, 3149, 29901, 13, 12, 12, 12, 2238, 29889, 2697, 6110, 29898, 29896, 29897, 13, 12, 12, 12, 1182, 1878, 29889, 2697, 5568, 29898, 29896, 29900, 29900, 29897, 13, 12, 12, 12, 1182, 1878, 29889, 2697, 1625, 473, 29898, 2238, 29889, 2577, 1625, 473, 3101, 13, 12, 12, 12, 13891, 29889, 2697, 29925, 264, 29898, 2238, 29897, 13, 12, 12, 12, 13891, 29889, 2697, 27680, 29898, 1182, 1878, 29897, 13, 12, 12, 12, 13891, 29889, 8537, 6489, 5843, 1293, 29898, 20155, 29897, 13, 12, 12, 12, 2238, 29889, 2697, 6110, 29898, 16485, 1839, 29880, 29893, 2033, 565, 525, 29880, 29893, 29915, 297, 282, 1372, 1683, 2920, 29897, 13, 12, 12, 12, 1182, 1878, 29889, 2697, 5568, 3552, 29896, 29900, 29953, 29892, 29896, 29900, 29900, 9601, 16485, 1839, 5589, 2033, 29962, 565, 525, 5589, 29915, 297, 282, 1372, 1683, 3114, 29897, 13, 12, 12, 12, 1182, 1878, 29889, 2697, 1625, 473, 29898, 16485, 1839, 13801, 2033, 565, 525, 13801, 29915, 297, 282, 1372, 1683, 285, 2780, 29897, 13, 12, 12, 12, 13891, 29889, 2697, 29925, 264, 29898, 2238, 29897, 13, 12, 12, 12, 13891, 29889, 2697, 27680, 29898, 1182, 1878, 29897, 13, 12, 23681, 282, 1372, 1839, 1853, 2033, 297, 11117, 9012, 3788, 3733, 4790, 787, 29915, 6177, 13, 12, 12, 20155, 29892, 715, 303, 353, 19997, 5159, 13, 12, 12, 29878, 353, 282, 1372, 1839, 29878, 2033, 565, 525, 29878, 29915, 297, 282, 1372, 1683, 29871, 29906, 13, 12, 12, 1454, 474, 297, 282, 1372, 1839, 2587, 2033, 29901, 13, 12, 12, 12, 1220, 353, 5159, 13, 12, 12, 12, 1454, 282, 297, 474, 29901, 13, 12, 12, 12, 12, 29916, 29892, 343, 353, 29871, 285, 10456, 29886, 29897, 13, 12, 12, 12, 12, 20155, 29889, 4397, 3552, 29916, 29899, 29878, 29892, 29891, 29899, 29878, 29892, 29878, 29930, 29906, 29892, 29878, 29930, 29906, 876, 13, 12, 12, 12, 12, 1220, 29889, 4397, 3552, 29916, 29892, 29891, 876, 13, 12, 12, 12, 572, 303, 29889, 4397, 29898, 1220, 29897, 13, 12, 12, 275, 1220, 353, 525, 3293, 29915, 297, 282, 1372, 322, 17411, 29915, 297, 282, 1372, 1839, 3293, 2033, 13, 12, 12, 275, 3149, 353, 525, 3293, 29915, 297, 282, 1372, 322, 525, 29877, 29915, 297, 282, 1372, 1839, 3293, 2033, 13, 12, 12, 361, 282, 1372, 1839, 1853, 2033, 1275, 525, 3733, 4790, 787, 2396, 13, 12, 12, 12, 13891, 29889, 8537, 7713, 17125, 1293, 29898, 572, 303, 29897, 13, 12, 12, 13, 12, 12, 361, 338, 1220, 470, 282, 1372, 1839, 1853, 2033, 1275, 525, 1220, 2396, 13, 12, 12, 12, 1454, 1196, 297, 715, 303, 29901, 13, 12, 12, 12, 12, 13891, 29889, 8537, 20261, 29898, 1220, 29897, 13, 12, 12, 13, 12, 12, 361, 282, 1372, 1839, 1853, 2033, 1360, 29915, 9748, 29915, 470, 338, 3149, 29901, 13, 12, 12, 12, 2238, 29889, 2697, 6110, 29898, 29896, 29897, 13, 12, 12, 12, 1182, 1878, 29889, 2697, 5568, 29898, 29896, 29900, 29900, 29897, 13, 12, 12, 12, 1182, 1878, 29889, 2697, 1625, 473, 29898, 2238, 29889, 2577, 1625, 473, 3101, 13, 12, 12, 12, 13891, 29889, 2697, 29925, 264, 29898, 2238, 29897, 13, 12, 12, 12, 13891, 29889, 2697, 27680, 29898, 1182, 1878, 29897, 13, 12, 12, 12, 13891, 29889, 8537, 6489, 5843, 1293, 29898, 20155, 29897, 13, 12, 12, 12, 2238, 29889, 2697, 6110, 29898, 16485, 1839, 29880, 29893, 2033, 565, 525, 29880, 29893, 29915, 297, 282, 1372, 1683, 2920, 29897, 13, 12, 12, 12, 1182, 1878, 29889, 2697, 5568, 3552, 29896, 29900, 29953, 29892, 29896, 29900, 29900, 9601, 16485, 1839, 5589, 2033, 29962, 565, 525, 5589, 29915, 297, 282, 1372, 1683, 3114, 29897, 13, 12, 12, 12, 1182, 1878, 29889, 2697, 1625, 473, 29898, 16485, 1839, 13801, 2033, 565, 525, 13801, 29915, 297, 282, 1372, 1683, 285, 2780, 29897, 13, 12, 12, 12, 13891, 29889, 2697, 29925, 264, 29898, 2238, 29897, 13, 12, 12, 12, 13891, 29889, 2697, 27680, 29898, 1182, 1878, 29897, 13, 13, 12, 2238, 29889, 2697, 6110, 29898, 2103, 29897, 13, 12, 2238, 29889, 2697, 1625, 473, 29898, 2780, 29897, 13, 12, 1182, 1878, 29889, 2697, 1625, 473, 29898, 29888, 2780, 29897, 13, 12, 1182, 1878, 29889, 2697, 5568, 29898, 3293, 29897, 13, 12, 13891, 29889, 2697, 29925, 264, 29898, 2238, 29897, 13, 12, 13891, 29889, 2697, 27680, 29898, 1182, 1878, 29897, 13, 13, 1753, 4216, 29918, 16622, 29898, 16485, 29892, 270, 29883, 29892, 285, 29892, 3579, 1989, 1125, 13, 12, 2238, 29892, 1506, 1878, 353, 270, 29883, 29889, 2577, 29925, 264, 3285, 270, 29883, 29889, 2577, 27680, 580, 13, 12, 2103, 29892, 2927, 353, 6584, 29889, 2577, 6110, 3285, 6584, 29889, 2577, 1625, 473, 580, 13, 12, 29888, 2780, 29892, 3114, 353, 1506, 1878, 29889, 2577, 1625, 473, 3285, 1506, 1878, 29889, 2577, 5568, 580, 13, 12, 13, 12, 361, 525, 2780, 29915, 297, 282, 1372, 29901, 29871, 13, 12, 12, 2238, 29889, 2697, 1625, 473, 29898, 16485, 1839, 2780, 11287, 13, 12, 361, 525, 29888, 2780, 29915, 297, 282, 1372, 29901, 13, 12, 12, 1182, 1878, 29889, 2697, 1625, 473, 29898, 16485, 1839, 29888, 2780, 11287, 13, 12, 361, 525, 29880, 29893, 29915, 297, 282, 1372, 29901, 13, 12, 12, 2238, 29889, 2697, 6110, 29898, 16485, 1839, 29880, 29893, 11287, 13, 12, 361, 525, 5589, 29915, 297, 282, 1372, 29901, 13, 12, 12, 1182, 1878, 29889, 2697, 5568, 3552, 29896, 29900, 29953, 29892, 29896, 29900, 29900, 9601, 16485, 1839, 5589, 2033, 2314, 13, 13, 12, 13891, 29889, 2697, 29925, 264, 29898, 2238, 29897, 13, 12, 13891, 29889, 2697, 27680, 29898, 1182, 1878, 29897, 13, 13, 12, 361, 282, 1372, 1839, 1853, 2033, 1275, 525, 16622, 2396, 13, 12, 12, 29916, 29892, 343, 1919, 29878, 353, 282, 1372, 1839, 2587, 2033, 13, 12, 12, 29916, 29892, 343, 353, 29871, 285, 29898, 29916, 29892, 343, 29897, 13, 12, 12, 13891, 29889, 8537, 23495, 280, 29898, 29916, 29892, 343, 29892, 364, 29930, 1989, 1839, 29895, 11287, 13, 12, 361, 282, 1372, 1839, 1853, 2033, 1275, 525, 19052, 7799, 2396, 13, 12, 12, 20155, 353, 5159, 13, 12, 12, 1454, 921, 29892, 343, 1919, 29878, 297, 282, 1372, 1839, 2587, 2033, 29901, 13, 12, 12, 12, 29916, 29892, 343, 353, 29871, 285, 29898, 29916, 29892, 343, 29897, 13, 12, 12, 12, 29878, 334, 29922, 1820, 1839, 29895, 2033, 13, 12, 12, 12, 20155, 29889, 4397, 3552, 29916, 29899, 29878, 29892, 29891, 29899, 29878, 29892, 29878, 29930, 29906, 29892, 29878, 29930, 29906, 876, 13, 12, 12, 13891, 29889, 8537, 6489, 5843, 1293, 29898, 20155, 29897, 13, 13, 12, 2238, 29889, 2697, 6110, 29898, 2103, 29897, 13, 12, 2238, 29889, 2697, 1625, 473, 29898, 2780, 29897, 13, 12, 1182, 1878, 29889, 2697, 1625, 473, 29898, 29888, 2780, 29897, 13, 12, 1182, 1878, 29889, 2697, 5568, 29898, 3293, 29897, 13, 12, 13891, 29889, 2697, 29925, 264, 29898, 2238, 29897, 13, 12, 13891, 29889, 2697, 27680, 29898, 1182, 1878, 29897, 13, 13, 1753, 1207, 29918, 295, 5843, 29898, 29880, 29896, 29892, 301, 29906, 29892, 2614, 1125, 13, 12, 29885, 353, 7442, 29889, 2378, 4197, 29961, 29880, 29896, 29930, 3944, 6278, 574, 511, 29899, 29880, 29906, 29930, 5223, 6278, 574, 29897, 1402, 13, 12, 12, 12, 12, 518, 29880, 29896, 29930, 5223, 6278, 574, 511, 29880, 29906, 29930, 3944, 6278, 574, 4638, 2314, 13, 12, 29874, 353, 7442, 29889, 1915, 3493, 29898, 29900, 29892, 7442, 29889, 1631, 29930, 29906, 29892, 29871, 29941, 29953, 29897, 13, 12, 29916, 952, 353, 7442, 29889, 2378, 3552, 9302, 29889, 3944, 29898, 29874, 511, 7442, 29889, 5223, 29898, 29874, 4961, 13, 12, 2457, 7442, 29889, 6333, 29898, 29885, 29892, 921, 952, 467, 29911, 13, 13, 1753, 4216, 29918, 295, 5843, 29898, 16485, 29892, 270, 29883, 29892, 285, 29892, 3579, 1989, 1125, 13, 12, 2238, 29892, 1506, 1878, 353, 270, 29883, 29889, 2577, 29925, 264, 3285, 270, 29883, 29889, 2577, 27680, 580, 13, 12, 2103, 29892, 2927, 353, 6584, 29889, 2577, 6110, 3285, 6584, 29889, 2577, 1625, 473, 580, 13, 12, 29888, 2780, 29892, 3114, 353, 1506, 1878, 29889, 2577, 1625, 473, 3285, 1506, 1878, 29889, 2577, 5568, 580, 13, 12, 13, 12, 361, 525, 2780, 29915, 297, 282, 1372, 29901, 29871, 13, 12, 12, 2238, 29889, 2697, 1625, 473, 29898, 16485, 1839, 2780, 11287, 13, 12, 361, 525, 29888, 2780, 29915, 297, 282, 1372, 29901, 13, 12, 12, 1182, 1878, 29889, 2697, 1625, 473, 29898, 16485, 1839, 29888, 2780, 11287, 13, 12, 361, 525, 29880, 29893, 29915, 297, 282, 1372, 29901, 13, 12, 12, 2238, 29889, 2697, 6110, 29898, 16485, 1839, 29880, 29893, 11287, 13, 12, 361, 525, 5589, 29915, 297, 282, 1372, 29901, 13, 12, 12, 1182, 1878, 29889, 2697, 5568, 3552, 29896, 29900, 29953, 29892, 29896, 29900, 29900, 9601, 16485, 1839, 5589, 2033, 2314, 13, 13, 12, 13891, 29889, 2697, 29925, 264, 29898, 2238, 29897, 13, 12, 13891, 29889, 2697, 27680, 29898, 1182, 1878, 29897, 13, 13, 12, 361, 282, 1372, 1839, 1853, 2033, 1275, 525, 295, 5843, 2396, 13, 12, 12, 29916, 29892, 343, 1919, 29880, 29896, 29892, 301, 29906, 29892, 263, 353, 282, 1372, 1839, 2587, 2033, 13, 12, 12, 295, 29886, 353, 1207, 29918, 295, 5843, 29898, 29880, 29896, 29892, 29880, 29906, 29892, 29874, 29897, 13, 12, 12, 295, 29886, 353, 560, 29886, 29930, 1989, 1839, 29895, 2033, 29974, 29888, 29898, 29916, 29892, 29891, 29897, 13, 12, 12, 13891, 29889, 8537, 7713, 17125, 29898, 295, 29886, 29897, 13, 12, 361, 282, 1372, 1839, 1853, 2033, 1275, 525, 5481, 567, 267, 2396, 13, 12, 12, 20155, 353, 5159, 13, 12, 12, 1454, 921, 29892, 343, 29892, 301, 29896, 29892, 301, 29906, 29892, 263, 297, 282, 1372, 1839, 2587, 2033, 29901, 13, 12, 12, 12, 295, 29886, 353, 1207, 29918, 295, 5843, 29898, 29880, 29896, 29892, 29880, 29906, 29892, 29874, 29897, 13, 12, 12, 12, 20155, 29889, 4397, 29898, 295, 29886, 29930, 1989, 1839, 29895, 2033, 29974, 29888, 29898, 29916, 29892, 29891, 876, 13, 12, 12, 13891, 29889, 8537, 7713, 17125, 1293, 29898, 20155, 29897, 13, 12, 12, 13, 13, 12, 2238, 29889, 2697, 6110, 29898, 2103, 29897, 13, 12, 2238, 29889, 2697, 1625, 473, 29898, 2780, 29897, 13, 12, 1182, 1878, 29889, 2697, 1625, 473, 29898, 29888, 2780, 29897, 13, 12, 1182, 1878, 29889, 2697, 5568, 29898, 3293, 29897, 13, 12, 13891, 29889, 2697, 29925, 264, 29898, 2238, 29897, 13, 12, 13891, 29889, 2697, 27680, 29898, 1182, 1878, 29897, 13, 13, 1753, 4216, 29918, 1621, 2521, 29898, 16485, 29892, 270, 29883, 29892, 285, 29892, 3579, 1989, 1125, 13, 12, 2238, 29892, 1506, 1878, 353, 270, 29883, 29889, 2577, 29925, 264, 3285, 270, 29883, 29889, 2577, 27680, 580, 13, 12, 2103, 29892, 2927, 353, 6584, 29889, 2577, 6110, 3285, 6584, 29889, 2577, 1625, 473, 580, 13, 12, 29888, 2780, 29892, 3114, 353, 1506, 1878, 29889, 2577, 1625, 473, 3285, 1506, 1878, 29889, 2577, 5568, 580, 13, 12, 13, 12, 361, 525, 2780, 29915, 297, 282, 1372, 29901, 29871, 13, 12, 12, 2238, 29889, 2697, 1625, 473, 29898, 16485, 1839, 2780, 11287, 13, 12, 361, 525, 29888, 2780, 29915, 297, 282, 1372, 29901, 13, 12, 12, 1182, 1878, 29889, 2697, 1625, 473, 29898, 16485, 1839, 29888, 2780, 11287, 13, 12, 361, 525, 29880, 29893, 29915, 297, 282, 1372, 29901, 13, 12, 12, 2238, 29889, 2697, 6110, 29898, 16485, 1839, 29880, 29893, 11287, 13, 12, 361, 525, 5589, 29915, 297, 282, 1372, 29901, 13, 12, 12, 1182, 1878, 29889, 2697, 5568, 3552, 29896, 29900, 29953, 29892, 29896, 29900, 29900, 9601, 16485, 1839, 5589, 2033, 2314, 13, 13, 12, 13891, 29889, 2697, 29925, 264, 29898, 2238, 29897, 13, 12, 13891, 29889, 2697, 27680, 29898, 1182, 1878, 29897, 13, 13, 12, 361, 282, 1372, 1839, 1853, 2033, 1275, 525, 1621, 2521, 2396, 13, 12, 12, 29916, 29892, 343, 29892, 281, 29892, 298, 353, 282, 1372, 1839, 2587, 2033, 13, 12, 12, 29916, 29892, 343, 353, 285, 29898, 29916, 29892, 343, 29897, 13, 12, 12, 29893, 29892, 298, 353, 281, 29930, 1989, 1839, 29895, 7464, 298, 29930, 1989, 1839, 29895, 2033, 13, 12, 12, 13891, 29889, 8537, 7364, 2521, 29898, 29916, 29899, 29893, 29914, 29906, 29892, 343, 29899, 29882, 29914, 29906, 29892, 281, 29892, 298, 29897, 13, 12, 361, 282, 1372, 1839, 1853, 2033, 1275, 525, 1621, 19536, 2396, 13, 12, 12, 20155, 353, 5159, 13, 12, 12, 1454, 921, 29892, 343, 29892, 281, 29892, 298, 297, 282, 1372, 1839, 2587, 2033, 29901, 13, 12, 12, 12, 29916, 29892, 343, 353, 285, 29898, 29916, 29892, 343, 29897, 13, 12, 12, 12, 29893, 29892, 298, 353, 281, 29930, 1989, 1839, 29895, 7464, 298, 29930, 1989, 1839, 29895, 2033, 13, 12, 12, 12, 20155, 29889, 4397, 3552, 29916, 29899, 29893, 29914, 29906, 29892, 343, 29899, 29882, 29914, 29906, 29892, 281, 29892, 298, 876, 13, 12, 12, 13891, 29889, 8537, 7364, 2521, 1293, 29898, 20155, 29897, 13, 13, 12, 2238, 29889, 2697, 6110, 29898, 2103, 29897, 13, 12, 2238, 29889, 2697, 1625, 473, 29898, 2780, 29897, 13, 12, 1182, 1878, 29889, 2697, 1625, 473, 29898, 29888, 2780, 29897, 13, 12, 1182, 1878, 29889, 2697, 5568, 29898, 3293, 29897, 13, 12, 13891, 29889, 2697, 29925, 264, 29898, 2238, 29897, 13, 12, 13891, 29889, 2697, 27680, 29898, 1182, 1878, 29897, 13, 13, 1753, 4216, 29918, 726, 29898, 16485, 29892, 270, 29883, 29892, 285, 29892, 3579, 1989, 1125, 13, 12, 2238, 29892, 1506, 1878, 29892, 4079, 353, 270, 29883, 29889, 2577, 29925, 264, 3285, 270, 29883, 29889, 2577, 27680, 3285, 270, 29883, 29889, 2577, 9824, 580, 13, 12, 2103, 29892, 2927, 353, 6584, 29889, 2577, 6110, 3285, 6584, 29889, 2577, 1625, 473, 580, 13, 12, 29888, 2780, 29892, 3114, 353, 1506, 1878, 29889, 2577, 1625, 473, 3285, 1506, 1878, 29889, 2577, 5568, 580, 13, 12, 2311, 29871, 353, 4079, 29889, 2577, 5228, 3505, 580, 13, 12, 29873, 2780, 353, 270, 29883, 29889, 2577, 1626, 2831, 18128, 580, 13, 12, 29890, 2780, 353, 270, 29883, 29889, 2577, 1626, 10581, 580, 13, 12, 13, 12, 361, 525, 2780, 29915, 297, 282, 1372, 29901, 29871, 13, 12, 12, 2238, 29889, 2697, 1625, 473, 29898, 16485, 1839, 2780, 11287, 13, 12, 12, 13891, 29889, 2697, 1626, 2831, 18128, 29898, 16485, 1839, 2780, 11287, 13, 12, 1182, 1878, 29889, 2697, 1625, 473, 29898, 2238, 29889, 2577, 1625, 473, 3101, 13, 12, 1182, 1878, 29889, 2697, 5568, 29898, 29896, 29900, 29900, 29897, 13, 12, 361, 525, 29888, 2780, 29915, 297, 282, 1372, 29901, 13, 12, 12, 2158, 877, 29882, 801, 25613, 1495, 13, 12, 12, 13891, 29889, 2697, 1626, 10581, 29898, 16485, 1839, 29888, 2780, 11287, 13, 12, 361, 525, 2311, 29915, 297, 282, 1372, 29901, 13, 12, 12, 5657, 29889, 2697, 5228, 3505, 29898, 16485, 1839, 2311, 11287, 13, 13, 12, 13891, 29889, 2697, 29925, 264, 29898, 2238, 29897, 13, 12, 13891, 29889, 2697, 27680, 29898, 1182, 1878, 29897, 13, 12, 13891, 29889, 2697, 9824, 29898, 5657, 29897, 13, 13, 12, 361, 282, 1372, 1839, 1853, 2033, 1275, 525, 726, 2396, 13, 12, 12, 29916, 29892, 343, 29892, 1426, 353, 282, 1372, 1839, 2587, 2033, 13, 12, 12, 29916, 29892, 343, 353, 285, 29898, 29916, 29892, 343, 29897, 13, 12, 12, 13891, 29889, 8537, 1626, 29898, 726, 29892, 921, 29974, 29941, 29892, 343, 29974, 29941, 29897, 13, 12, 12, 361, 451, 525, 415, 29915, 297, 282, 1372, 470, 282, 1372, 1839, 415, 2033, 29901, 13, 12, 12, 12, 13891, 29889, 8537, 6489, 5843, 29898, 29916, 29899, 29906, 29892, 29891, 29899, 29906, 29892, 29946, 29892, 29946, 29897, 13, 12, 361, 282, 1372, 1839, 1853, 2033, 1275, 525, 726, 29879, 2396, 13, 12, 12, 15206, 303, 29892, 1067, 303, 29892, 560, 303, 353, 19997, 19997, 5159, 13, 12, 12, 1454, 921, 29892, 343, 29892, 1426, 297, 282, 1372, 1839, 2587, 2033, 29901, 13, 12, 12, 12, 29916, 29892, 343, 353, 285, 29898, 29916, 29892, 343, 29897, 13, 12, 12, 12, 15206, 303, 29889, 4397, 29898, 726, 29897, 13, 12, 12, 12, 695, 303, 29889, 4397, 3552, 29916, 29974, 29941, 29892, 343, 29974, 29941, 876, 13, 12, 12, 12, 295, 303, 29889, 4397, 3552, 29916, 29899, 29906, 29892, 343, 29899, 29906, 29892, 29871, 29946, 29892, 29871, 29946, 876, 13, 12, 12, 13891, 29889, 8537, 1626, 1293, 29898, 15206, 303, 29892, 1067, 303, 29897, 13, 12, 12, 361, 451, 525, 415, 29915, 297, 282, 1372, 470, 282, 1372, 1839, 415, 2033, 29901, 13, 12, 12, 12, 13891, 29889, 8537, 6489, 5843, 1293, 29898, 295, 303, 29897, 13, 13, 12, 5657, 29889, 2697, 5228, 3505, 29898, 2311, 29897, 13, 12, 2238, 29889, 2697, 1625, 473, 29898, 2780, 29897, 13, 12, 1182, 1878, 29889, 2697, 1625, 473, 29898, 29888, 2780, 29897, 13, 12, 1182, 1878, 29889, 2697, 5568, 29898, 3293, 29897, 13, 12, 13891, 29889, 2697, 29925, 264, 29898, 2238, 29897, 13, 12, 13891, 29889, 2697, 27680, 29898, 1182, 1878, 29897, 13, 12, 13891, 29889, 2697, 9824, 29898, 5657, 29897, 13, 12, 13891, 29889, 2697, 1626, 2831, 18128, 29898, 29873, 2780, 29897, 13, 12, 13891, 29889, 2697, 1626, 10581, 29898, 29890, 2780, 29897, 13, 13, 4012, 29918, 27774, 353, 11117, 9748, 2396, 5317, 29892, 525, 3149, 2396, 5317, 29892, 525, 1220, 2396, 5317, 29892, 525, 3733, 17125, 2396, 5317, 29892, 525, 9012, 2396, 5317, 29892, 525, 3733, 4790, 787, 2396, 5317, 29892, 13, 12, 12, 12, 29915, 16622, 2396, 4012, 29918, 16622, 29892, 525, 19052, 7799, 2396, 4012, 29918, 16622, 29892, 525, 295, 5843, 2396, 4012, 29918, 295, 5843, 29892, 525, 5481, 567, 267, 2396, 4012, 29918, 295, 5843, 29892, 13, 12, 12, 12, 29915, 1621, 2521, 2396, 4012, 29918, 1621, 2521, 29892, 525, 1621, 19536, 2396, 4012, 29918, 1621, 2521, 29892, 525, 726, 2396, 4012, 29918, 726, 29892, 525, 726, 29879, 2396, 4012, 29918, 726, 29913, 13, 13, 1753, 4216, 29898, 5415, 29892, 270, 29883, 29892, 285, 29892, 3579, 1989, 1125, 4216, 29918, 27774, 29961, 5415, 1839, 1853, 2033, 850, 5415, 29892, 270, 29883, 29892, 285, 29892, 3579, 1989, 29897, 13, 13, 1753, 4216, 29918, 13148, 29898, 16485, 29892, 270, 29883, 29892, 285, 29892, 3579, 1989, 1125, 13, 12, 2238, 29892, 1506, 1878, 353, 270, 29883, 29889, 2577, 29925, 264, 3285, 270, 29883, 29889, 2577, 27680, 580, 13, 12, 2103, 29892, 2927, 353, 6584, 29889, 2577, 6110, 3285, 6584, 29889, 2577, 1625, 473, 580, 13, 12, 29888, 2780, 29892, 3114, 353, 1506, 1878, 29889, 2577, 1625, 473, 3285, 1506, 1878, 29889, 2577, 5568, 580, 13, 12, 13, 12, 361, 525, 2780, 29915, 297, 282, 1372, 29901, 29871, 13, 12, 12, 2238, 29889, 2697, 1625, 473, 29898, 16485, 1839, 2780, 11287, 13, 12, 361, 525, 29888, 2780, 29915, 297, 282, 1372, 29901, 13, 12, 12, 1182, 1878, 29889, 2697, 1625, 473, 29898, 16485, 1839, 29888, 2780, 11287, 13, 12, 361, 525, 29880, 29893, 29915, 297, 282, 1372, 29901, 13, 12, 12, 2238, 29889, 2697, 6110, 29898, 16485, 1839, 29880, 29893, 11287, 13, 12, 361, 525, 5589, 29915, 297, 282, 1372, 29901, 13, 12, 12, 1182, 1878, 29889, 2697, 5568, 3552, 29896, 29900, 29953, 29892, 29896, 29900, 29900, 9601, 16485, 1839, 5589, 2033, 2314, 13, 13, 12, 13891, 29889, 2697, 29925, 264, 29898, 2238, 29897, 13, 12, 13891, 29889, 2697, 27680, 29898, 1182, 1878, 29897, 13, 13, 12, 1454, 474, 297, 282, 1372, 1839, 2587, 2033, 29901, 4012, 29898, 29875, 29892, 270, 29883, 29892, 285, 29892, 3579, 1989, 29897, 13, 13, 12, 2238, 29889, 2697, 6110, 29898, 2103, 29897, 13, 12, 2238, 29889, 2697, 1625, 473, 29898, 2780, 29897, 13, 12, 1182, 1878, 29889, 2697, 1625, 473, 29898, 29888, 2780, 29897, 13, 12, 1182, 1878, 29889, 2697, 5568, 29898, 3293, 29897, 13, 12, 13891, 29889, 2697, 29925, 264, 29898, 2238, 29897, 13, 12, 13891, 29889, 2697, 27680, 29898, 1182, 1878, 29897, 13, 13, 4012, 29918, 27774, 1839, 13148, 2033, 353, 4216, 29918, 13148, 13, 13, 1753, 4216, 29918, 29277, 29898, 16485, 29892, 270, 29883, 29892, 285, 29892, 3579, 1989, 1125, 13, 12, 2238, 29892, 1506, 1878, 353, 270, 29883, 29889, 2577, 29925, 264, 3285, 270, 29883, 29889, 2577, 27680, 580, 13, 12, 2103, 29892, 2927, 353, 6584, 29889, 2577, 6110, 3285, 6584, 29889, 2577, 1625, 473, 580, 13, 12, 29888, 2780, 29892, 3114, 353, 1506, 1878, 29889, 2577, 1625, 473, 3285, 1506, 1878, 29889, 2577, 5568, 580, 13, 12, 13, 12, 361, 525, 2780, 29915, 297, 282, 1372, 29901, 29871, 13, 12, 12, 2238, 29889, 2697, 1625, 473, 29898, 16485, 1839, 2780, 11287, 13, 12, 361, 525, 29888, 2780, 29915, 297, 282, 1372, 29901, 13, 12, 12, 1182, 1878, 29889, 2697, 1625, 473, 29898, 16485, 1839, 29888, 2780, 11287, 13, 12, 361, 525, 29880, 29893, 29915, 297, 282, 1372, 29901, 13, 12, 12, 2238, 29889, 2697, 6110, 29898, 16485, 1839, 29880, 29893, 11287, 13, 12, 361, 525, 5589, 29915, 297, 282, 1372, 29901, 13, 12, 12, 1182, 1878, 29889, 2697, 5568, 3552, 29896, 29900, 29953, 29892, 29896, 29900, 29900, 9601, 16485, 1839, 5589, 2033, 2314, 13, 13, 12, 13891, 29889, 2697, 29925, 264, 29898, 2238, 29897, 13, 12, 13891, 29889, 2697, 27680, 29898, 1182, 1878, 29897, 13, 12, 2158, 29898, 16485, 1839, 2587, 13359, 8149, 3101, 13, 12, 361, 1820, 1839, 2764, 2033, 297, 282, 1372, 1839, 2587, 2033, 29901, 13, 12, 12, 4012, 29898, 16485, 1839, 2587, 2033, 29961, 1989, 1839, 2764, 2033, 1402, 270, 29883, 29892, 285, 29892, 3579, 1989, 29897, 13, 13, 12, 2238, 29889, 2697, 6110, 29898, 2103, 29897, 13, 12, 2238, 29889, 2697, 1625, 473, 29898, 2780, 29897, 13, 12, 1182, 1878, 29889, 2697, 1625, 473, 29898, 29888, 2780, 29897, 13, 12, 1182, 1878, 29889, 2697, 5568, 29898, 3293, 29897, 13, 12, 13891, 29889, 2697, 29925, 264, 29898, 2238, 29897, 13, 12, 13891, 29889, 2697, 27680, 29898, 1182, 1878, 29897, 13, 13, 4012, 29918, 27774, 1839, 29277, 2033, 353, 4216, 29918, 29277, 13, 13, 1990, 1879, 7843, 9802, 29901, 13, 12, 1753, 4770, 2344, 12035, 1311, 29892, 3573, 1125, 13, 12, 12, 1311, 29889, 2587, 353, 3573, 13, 13, 12, 1753, 4216, 29898, 1311, 29892, 270, 29883, 29892, 285, 29892, 3579, 1989, 1125, 13, 12, 12, 2238, 29892, 1506, 1878, 29892, 4079, 353, 270, 29883, 29889, 2577, 29925, 264, 3285, 270, 29883, 29889, 2577, 27680, 3285, 270, 29883, 29889, 2577, 9824, 580, 13, 12, 12, 2238, 29889, 2697, 1625, 473, 29898, 3991, 3260, 29889, 657, 877, 3502, 29918, 2780, 1495, 470, 313, 29906, 29945, 29945, 29892, 29906, 29945, 29945, 29892, 29900, 876, 13, 12, 12, 1182, 1878, 29889, 2697, 1625, 473, 29898, 3991, 3260, 29889, 657, 877, 3502, 29918, 29888, 2780, 1495, 470, 313, 29906, 29945, 29945, 29892, 29906, 29945, 29945, 29892, 29906, 29945, 29945, 876, 13, 12, 12, 1182, 1878, 29889, 2697, 5568, 3552, 29896, 29900, 29953, 29892, 29896, 29900, 29900, 9601, 3991, 3260, 29889, 657, 877, 3502, 29918, 5589, 1495, 470, 7700, 2314, 13, 12, 12, 2238, 29889, 2697, 6110, 29898, 3991, 3260, 29889, 657, 877, 3502, 29918, 29880, 29893, 1495, 470, 29871, 29896, 29897, 13, 12, 12, 13891, 29889, 2697, 1626, 2831, 18128, 29898, 3991, 3260, 29889, 657, 877, 3502, 29918, 29873, 2780, 1495, 470, 313, 29906, 29945, 29945, 29892, 29900, 29892, 29900, 876, 13, 12, 12, 5657, 29889, 2697, 5228, 3505, 29898, 3991, 3260, 29889, 657, 877, 3502, 29918, 1372, 675, 1495, 470, 29871, 29947, 29897, 13, 12, 12, 13891, 29889, 2697, 29925, 264, 29898, 2238, 416, 270, 29883, 29889, 2697, 27680, 29898, 1182, 1878, 416, 270, 29883, 29889, 2697, 9824, 29898, 5657, 416, 13, 12, 12, 4012, 29898, 1311, 29889, 2587, 29892, 270, 29883, 29892, 285, 29892, 3579, 1989, 29897, 13, 13, 361, 4770, 978, 1649, 1275, 525, 1649, 3396, 1649, 2396, 13, 12, 2158, 29898, 5675, 29918, 295, 5843, 29898, 29900, 29892, 29900, 29892, 29906, 29892, 29896, 29892, 29900, 876, 2 ]
answer/14.py
harurunrunrun/edu90_myanswer
0
155731
n,*a=map(int,open(0).read().split());print(sum(abs(i-j)for i,j in zip(sorted(a[:n]),sorted(a[n:]))))
[ 1, 302, 29892, 29930, 29874, 29922, 1958, 29898, 524, 29892, 3150, 29898, 29900, 467, 949, 2141, 5451, 3310, 2158, 29898, 2083, 29898, 6897, 29898, 29875, 29899, 29926, 29897, 1454, 474, 29892, 29926, 297, 14319, 29898, 24582, 29898, 29874, 7503, 29876, 11724, 24582, 29898, 29874, 29961, 29876, 29901, 12622, 876, 2 ]
LoanPrediction/loan_prediction.py
ketanzabak/DataScienceChallenge
0
188945
# -*- coding: utf-8 -*- # Importing the libraries import numpy as np import matplotlib.pyplot as plt import pandas as pd from scipy.stats import mode from sklearn.preprocessing import LabelEncoder from sklearn.linear_model import LinearRegression from sklearn.model_selection import train_test_split from sklearn.linear_model import Ridge from sklearn.model_selection import cross_val_score from sklearn.model_selection import GridSearchCV from xgboost import XGBRegressor """ Combine train and test data Add one more column to the combined data to identify train and test data. """ def combine_datasets(train, test): dataset_train['source'] = 'train' dataset_test['source'] = 'test' combined_data = pd.concat([dataset_train,dataset_test], ignore_index=True) return combined_data; """ Print the summary of the given dataframe. This method prints following summary details of the dataframe: 1: shape 2: Null values per column """ def print_dataset_summary(dataset): print("\n\n<------ Summary for data --->") print("\tShape of train data",dataset.shape) print("\tPrinting null values per column :") print(combined_data.apply(lambda x: sum(x.isnull()))) """ Calculate mean square error. """ def calculate_mse(Y_pred, Y_actual): # calculate MSE mse = np.mean((Y_pred-Y_actual)**2) return mse def plot_residual_graph(Y_pred, Y_actual): # Plot the graph and check the data pattern. # residual plot x_plot = plt.scatter(Y_pred, (Y_pred - Y_actual), c='b') plt.hlines(y=0, xmin= -1000, xmax=5000) plt.title('Residual plot') def unique_val_categorical_col(categorical_columns): for column in categorical_columns: print("<--------- Column name: ",column," ----------->") print(combined_data[column].value_counts()) def plot_categorical_features(df, categorical_columns): print("Size of list: ",len(categorical_columns)) for column in categorical_columns: df[column].value_counts().plot(kind="bar",title=column) plt.show() # Importing the dataset dataset_train = pd.read_csv('data/train_av.csv') dataset_test = pd.read_csv('data/test_av.csv') combined_data = combine_datasets(dataset_train, dataset_test) print_dataset_summary(dataset_train) print_dataset_summary(dataset_test) print_dataset_summary(combined_data) #get categorical column categorical_column = [x for x in combined_data.dtypes.index if combined_data.dtypes[x] == 'object'] print(categorical_column) head = combined_data.head() unique_val_categorical_col(categorical_column) plot_categorical_features(combined_data, categorical_column) # Missing value imputation. combined_data["Gender"].fillna("Male",inplace=True) combined_data["Married"].fillna("Yes",inplace=True) combined_data["Credit_History"].fillna(1,inplace=True) combined_data["Credit_History"].fillna(1,inplace=True) combined_data['Dependents'] = combined_data['Dependents'].map({'3+':'3', '1' : '1', '0' : '0', '2' : '2'}) combined_data['Dependents'].fillna combined_data["Credit_History"].value_counts() combined_data["Dependents"].isnull().sum() # step 10 # separate train and test data # Remove Item_Outlet_Sales from test data train = combined_data.loc[combined_data['source']=="train"] test = combined_data.loc[combined_data['source']=="test"] train.drop(['source'],axis=1,inplace=True) # target variable name. target = '' IDcol = [] submissionCols = [] predictors = [x for x in train.columns if x not in [target]+IDcol] X = train[predictors] Y = train[target] #split the data into train and test data. Cross validation. X_train, X_test, Y_train , Y_test = train_test_split(X,Y,test_size = 0.2, random_state = 0) ''' # Uncomment this code to use LinearRegression. # Predict Values using LinearRegression Model linear_regression = LinearRegression() linear_regression.fit(X_train,Y_train) Y_predict = linear_regression.predict(X_test) print(calculate_mse(Y_predict, Y_test)) # calculate R-Squared Adjusted. score = linear_regression.score(X_test,Y_test) print(score) # plot the graph. plot_residual_graph(Y_predict, Y_test) test[target] = linear_regression.predict(test[predictors]) # Linear model processing end here... ''' ''' # Uncomment this code for using Polynomial Regression. # Predict the values using Polynomial regression. # Fitting Polynomial Regression to the dataset from sklearn.preprocessing import PolynomialFeatures poly_reg = PolynomialFeatures(degree = 2) X_train_poly = poly_reg.fit_transform(X_train) poly_reg.fit(X_train_poly, Y_train) polynomial_regression = LinearRegression() polynomial_regression.fit(X_train_poly, Y_train) X_test_poly = poly_reg.fit_transform(X_test) Y_predict_poly = polynomial_regression.predict(X_test_poly) # calculate MSE print(calculate_mse(Y_predict_poly, Y_test)) # calculate R-Squared Adjusted. score = polynomial_regression.score(X_test_poly,Y_test) print(score) plot_residual_graph(Y_predict_poly, Y_test) # predict for test data. test[target] = polynomial_regression.predict(poly_reg.fit_transform(test[predictors])) # checking magnitude of coefficient. coeff = polynomial_regression.coef_ print(max(coeff)) print(min(coeff)) print(sum(coeff)/len(coeff)) # Evaluating model performance using k-fold cross validation. poly_regression_accuracies = cross_val_score(estimator = polynomial_regression, X = X_train_poly, y = Y_train, cv = 10) print(poly_regression_accuracies.mean()) print(poly_regression_accuracies.std()) # Polynomical regression processing ends here. ''' ''' # Uncomment this code to use RidgeRegression. # Training the model using Ridge Regression. ridge_regression = Ridge(normalize = True) ridge_regression.fit(X_train, Y_train) Y_pred_ridge = ridge_regression.predict(X_test) print(calculate_mse(Y_pred_ridge, Y_test)) ridge_regression.score(X_test, Y_test) ridge_coeff = ridge_regression.coef_ print(max(ridge_coeff)) print(min(ridge_coeff)) print(sum(ridge_coeff)/len(ridge_coeff)) # Evaluting model performance using k-folde cross validation. ridge_accuracies = cross_val_score(estimator = ridge_regression, X = X_train, y = Y_train, cv = 10) print(ridge_accuracies.mean()) print(ridge_accuracies.std()) # Applying Grid Search to find the best model and the best parameters alphas = np.array([0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9]) fit_interceptOptions = ([True, False]) solverOptions = (['svd', 'cholesky', 'sparse_cg', 'sag']) parameters = dict(alpha=alphas, fit_intercept=fit_interceptOptions, solver=solverOptions) grid_search = GridSearchCV(estimator = ridge_regression, param_grid = parameters) grid_search = grid_search.fit(X_train, Y_train) best_accuracy = grid_search.best_score_ best_parameters = grid_search.best_params_ test[target] = grid_search.predict(test[predictors]) # Ridge regression ends here.. ''' # Method to evaludate model performance def evaluate_model_performance(model, x_train, y_train, x_test, y_test): model.fit(x_train, y_train) y_predict = model.predict(x_test) print("Mean Square Error: ",calculate_mse(y_predict, y_test)) accurracy = cross_val_score(estimator = model, X = x_train, y = y_train, cv = 10) print("Accurracy Mean: ", accurracy.mean()) print("Accurracy Std : ", accurracy.std()) # Training model using XGBoost. xgbRegressor = XGBRegressor() evaluate_model_performance(xgbRegressor, X_train, Y_train, X_test, Y_test) ''' Performance of above model : Mean Square Error: 1186173.7950376957 Accurracy Mean: 0.594592170829 Accurracy Std : 0.019906704365 ''' test[target] = xgbRegressor.predict(test[predictors]) submission = test[IDcol] submission[target] = test[target] submission.to_csv(DIR+"/ridge_regression.csv", index=False)
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 13, 29937, 16032, 292, 278, 9562, 13, 5215, 12655, 408, 7442, 13, 5215, 22889, 29889, 2272, 5317, 408, 14770, 13, 5215, 11701, 408, 10518, 13, 3166, 4560, 2272, 29889, 16202, 1053, 4464, 13, 3166, 2071, 19668, 29889, 1457, 19170, 1053, 15796, 8566, 6119, 13, 3166, 2071, 19668, 29889, 10660, 29918, 4299, 1053, 22985, 4597, 23881, 13, 3166, 2071, 19668, 29889, 4299, 29918, 21731, 1053, 7945, 29918, 1688, 29918, 5451, 13, 3166, 2071, 19668, 29889, 10660, 29918, 4299, 1053, 390, 5525, 13, 3166, 2071, 19668, 29889, 4299, 29918, 21731, 1053, 4891, 29918, 791, 29918, 13628, 13, 3166, 2071, 19668, 29889, 4299, 29918, 21731, 1053, 11657, 7974, 15633, 13, 3166, 921, 29887, 17079, 1053, 1060, 7210, 4597, 1253, 272, 13, 13, 13, 15945, 29908, 13, 1523, 26062, 7945, 322, 1243, 848, 29871, 13, 2528, 697, 901, 1897, 304, 278, 12420, 848, 304, 12439, 7945, 322, 1243, 848, 29889, 13, 15945, 29908, 13, 1753, 14405, 29918, 14538, 1691, 29898, 14968, 29892, 1243, 1125, 13, 1678, 8783, 29918, 14968, 1839, 4993, 2033, 353, 525, 14968, 29915, 13, 1678, 8783, 29918, 1688, 1839, 4993, 2033, 353, 525, 1688, 29915, 13, 1678, 12420, 29918, 1272, 353, 10518, 29889, 17685, 4197, 24713, 29918, 14968, 29892, 24713, 29918, 1688, 1402, 11455, 29918, 2248, 29922, 5574, 29897, 13, 1678, 736, 12420, 29918, 1272, 29936, 13, 13, 15945, 29908, 13, 11816, 278, 15837, 310, 278, 2183, 12205, 29889, 13, 4013, 1158, 14677, 1494, 15837, 4902, 310, 278, 12205, 29901, 13, 268, 29896, 29901, 8267, 13, 268, 29906, 29901, 19014, 1819, 639, 1897, 13, 15945, 29908, 13, 1753, 1596, 29918, 24713, 29918, 7727, 29898, 24713, 1125, 13, 1678, 1596, 14182, 29876, 29905, 29876, 29966, 22158, 6991, 5219, 363, 848, 11474, 29958, 1159, 13, 1678, 1596, 14182, 29873, 24111, 310, 7945, 848, 613, 24713, 29889, 12181, 29897, 13, 13, 1678, 1596, 14182, 29873, 11816, 292, 1870, 1819, 639, 1897, 584, 1159, 268, 13, 1678, 1596, 29898, 17743, 1312, 29918, 1272, 29889, 7302, 29898, 2892, 921, 29901, 2533, 29898, 29916, 29889, 275, 4304, 580, 4961, 268, 13, 13, 15945, 29908, 13, 27065, 403, 2099, 6862, 1059, 29889, 13, 15945, 29908, 13, 1753, 8147, 29918, 29885, 344, 29898, 29979, 29918, 11965, 29892, 612, 29918, 19304, 1125, 13, 1678, 396, 8147, 341, 1660, 13, 1678, 286, 344, 353, 7442, 29889, 12676, 3552, 29979, 29918, 11965, 29899, 29979, 29918, 19304, 29897, 1068, 29906, 29897, 13, 1678, 736, 286, 344, 13, 268, 13, 13, 1753, 6492, 29918, 690, 333, 950, 29918, 4262, 29898, 29979, 29918, 11965, 29892, 612, 29918, 19304, 1125, 13, 1678, 396, 18399, 278, 3983, 322, 1423, 278, 848, 4766, 29889, 13, 1678, 396, 10995, 950, 6492, 13, 1678, 921, 29918, 5317, 353, 14770, 29889, 1557, 2620, 29898, 29979, 29918, 11965, 29892, 313, 29979, 29918, 11965, 448, 612, 29918, 19304, 511, 274, 2433, 29890, 1495, 13, 1678, 14770, 29889, 4415, 1475, 29898, 29891, 29922, 29900, 29892, 921, 1195, 29922, 448, 29896, 29900, 29900, 29900, 29892, 921, 3317, 29922, 29945, 29900, 29900, 29900, 29897, 13, 1678, 14770, 29889, 3257, 877, 1666, 333, 950, 6492, 1495, 13, 13, 1753, 5412, 29918, 791, 29918, 29883, 20440, 936, 29918, 1054, 29898, 29883, 20440, 936, 29918, 13099, 1125, 13, 1678, 363, 1897, 297, 11608, 936, 29918, 13099, 29901, 13, 4706, 1596, 28945, 1378, 29899, 12481, 1024, 29901, 9162, 4914, 1699, 448, 1378, 15110, 1159, 13, 4706, 1596, 29898, 17743, 1312, 29918, 1272, 29961, 4914, 1822, 1767, 29918, 2798, 29879, 3101, 13, 308, 13, 13, 1753, 6492, 29918, 29883, 20440, 936, 29918, 22100, 29898, 2176, 29892, 11608, 936, 29918, 13099, 1125, 13, 259, 1596, 703, 3505, 310, 1051, 29901, 9162, 2435, 29898, 29883, 20440, 936, 29918, 13099, 876, 13, 259, 363, 1897, 297, 11608, 936, 29918, 13099, 29901, 13, 539, 4489, 29961, 4914, 1822, 1767, 29918, 2798, 29879, 2141, 5317, 29898, 14380, 543, 1646, 613, 3257, 29922, 4914, 29897, 13, 539, 14770, 29889, 4294, 580, 13, 13, 29937, 16032, 292, 278, 8783, 13, 24713, 29918, 14968, 353, 10518, 29889, 949, 29918, 7638, 877, 1272, 29914, 14968, 29918, 485, 29889, 7638, 1495, 13, 24713, 29918, 1688, 353, 10518, 29889, 949, 29918, 7638, 877, 1272, 29914, 1688, 29918, 485, 29889, 7638, 1495, 13, 268, 13, 17743, 1312, 29918, 1272, 353, 14405, 29918, 14538, 1691, 29898, 24713, 29918, 14968, 29892, 8783, 29918, 1688, 29897, 13, 2158, 29918, 24713, 29918, 7727, 29898, 24713, 29918, 14968, 29897, 268, 13, 2158, 29918, 24713, 29918, 7727, 29898, 24713, 29918, 1688, 29897, 268, 13, 2158, 29918, 24713, 29918, 7727, 29898, 17743, 1312, 29918, 1272, 29897, 268, 13, 13, 29937, 657, 11608, 936, 1897, 13, 29883, 20440, 936, 29918, 4914, 353, 518, 29916, 363, 921, 297, 12420, 29918, 1272, 29889, 29881, 8768, 29889, 2248, 565, 12420, 29918, 1272, 29889, 29881, 8768, 29961, 29916, 29962, 1275, 525, 3318, 2033, 13, 2158, 29898, 29883, 20440, 936, 29918, 4914, 29897, 13, 13, 2813, 353, 12420, 29918, 1272, 29889, 2813, 580, 13, 13, 13092, 29918, 791, 29918, 29883, 20440, 936, 29918, 1054, 29898, 29883, 20440, 936, 29918, 4914, 29897, 13, 5317, 29918, 29883, 20440, 936, 29918, 22100, 29898, 17743, 1312, 29918, 1272, 29892, 11608, 936, 29918, 4914, 29897, 13, 13, 29937, 4750, 292, 995, 527, 14584, 29889, 13, 13, 17743, 1312, 29918, 1272, 3366, 29954, 1581, 16862, 5589, 1056, 703, 29924, 744, 613, 262, 6689, 29922, 5574, 29897, 13, 17743, 1312, 29918, 1272, 3366, 7083, 1255, 16862, 5589, 1056, 703, 8241, 613, 262, 6689, 29922, 5574, 29897, 13, 17743, 1312, 29918, 1272, 3366, 15507, 277, 29918, 20570, 16862, 5589, 1056, 29898, 29896, 29892, 262, 6689, 29922, 5574, 29897, 13, 17743, 1312, 29918, 1272, 3366, 15507, 277, 29918, 20570, 16862, 5589, 1056, 29898, 29896, 29892, 262, 6689, 29922, 5574, 29897, 13, 17743, 1312, 29918, 1272, 1839, 8498, 355, 1237, 2033, 353, 12420, 29918, 1272, 1839, 8498, 355, 1237, 13359, 1958, 3319, 29915, 29941, 29974, 22099, 29941, 742, 525, 29896, 29915, 584, 525, 29896, 742, 525, 29900, 29915, 584, 525, 29900, 742, 525, 29906, 29915, 584, 525, 29906, 29915, 1800, 13, 13, 13, 17743, 1312, 29918, 1272, 1839, 8498, 355, 1237, 13359, 5589, 1056, 13, 17743, 1312, 29918, 1272, 3366, 15507, 277, 29918, 20570, 16862, 1767, 29918, 2798, 29879, 580, 13, 17743, 1312, 29918, 1272, 3366, 8498, 355, 1237, 16862, 275, 4304, 2141, 2083, 580, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 29937, 4331, 29871, 29896, 29900, 13, 29937, 539, 5004, 7945, 322, 1243, 848, 29871, 13, 29937, 539, 15154, 10976, 29918, 29377, 29918, 29903, 2122, 515, 1243, 848, 13, 13, 14968, 353, 12420, 29918, 1272, 29889, 2029, 29961, 17743, 1312, 29918, 1272, 1839, 4993, 2033, 26359, 14968, 3108, 13, 1688, 353, 12420, 29918, 1272, 29889, 2029, 29961, 17743, 1312, 29918, 1272, 1839, 4993, 2033, 26359, 1688, 3108, 13, 13, 14968, 29889, 8865, 18959, 4993, 7464, 8990, 29922, 29896, 29892, 262, 6689, 29922, 5574, 29897, 13, 13, 29937, 3646, 2286, 1024, 29889, 13, 5182, 353, 6629, 29871, 13, 1367, 1054, 353, 5159, 13, 1491, 6737, 1625, 29879, 353, 5159, 13, 13, 27711, 943, 353, 518, 29916, 363, 921, 297, 7945, 29889, 13099, 565, 921, 451, 297, 518, 5182, 10062, 1367, 1054, 29962, 13, 13, 29990, 353, 7945, 29961, 27711, 943, 29962, 13, 29979, 353, 7945, 29961, 5182, 29962, 13, 13, 13, 29937, 5451, 278, 848, 964, 7945, 322, 1243, 848, 29889, 11189, 8845, 29889, 13, 29990, 29918, 14968, 29892, 1060, 29918, 1688, 29892, 612, 29918, 14968, 1919, 612, 29918, 1688, 353, 7945, 29918, 1688, 29918, 5451, 29898, 29990, 29892, 29979, 29892, 1688, 29918, 2311, 353, 29871, 29900, 29889, 29906, 29892, 4036, 29918, 3859, 353, 29871, 29900, 29897, 13, 13, 12008, 13, 29937, 853, 9342, 445, 775, 304, 671, 22985, 4597, 23881, 29889, 13, 29937, 21099, 919, 2630, 1041, 773, 22985, 4597, 23881, 8125, 13, 10660, 29918, 276, 11476, 353, 22985, 4597, 23881, 580, 13, 10660, 29918, 276, 11476, 29889, 9202, 29898, 29990, 29918, 14968, 29892, 29979, 29918, 14968, 29897, 13, 29979, 29918, 27711, 353, 5608, 29918, 276, 11476, 29889, 27711, 29898, 29990, 29918, 1688, 29897, 13, 13, 2158, 29898, 15807, 403, 29918, 29885, 344, 29898, 29979, 29918, 27711, 29892, 612, 29918, 1688, 876, 13, 13, 29937, 8147, 390, 29899, 29903, 339, 1965, 2087, 5143, 287, 29889, 13, 13628, 353, 5608, 29918, 276, 11476, 29889, 13628, 29898, 29990, 29918, 1688, 29892, 29979, 29918, 1688, 29897, 13, 2158, 29898, 13628, 29897, 13, 13, 29937, 6492, 278, 3983, 29889, 13, 5317, 29918, 690, 333, 950, 29918, 4262, 29898, 29979, 29918, 27711, 29892, 612, 29918, 1688, 29897, 13, 13, 1688, 29961, 5182, 29962, 353, 5608, 29918, 276, 11476, 29889, 27711, 29898, 1688, 29961, 27711, 943, 2314, 13, 13, 29937, 22985, 1904, 9068, 1095, 1244, 856, 13, 12008, 13, 13, 12008, 13, 29937, 853, 9342, 445, 775, 363, 773, 2043, 9222, 2169, 23881, 29889, 13, 13, 29937, 21099, 919, 278, 1819, 773, 2043, 9222, 17855, 29889, 13, 29937, 383, 5367, 2043, 9222, 2169, 23881, 304, 278, 8783, 13, 3166, 2071, 19668, 29889, 1457, 19170, 1053, 2043, 9222, 8263, 3698, 13, 22678, 29918, 1727, 353, 2043, 9222, 8263, 3698, 29898, 12163, 929, 353, 29871, 29906, 29897, 13, 29990, 29918, 14968, 29918, 22678, 353, 15680, 29918, 1727, 29889, 9202, 29918, 9067, 29898, 29990, 29918, 14968, 29897, 13, 22678, 29918, 1727, 29889, 9202, 29898, 29990, 29918, 14968, 29918, 22678, 29892, 612, 29918, 14968, 29897, 13, 3733, 9222, 29918, 276, 11476, 353, 22985, 4597, 23881, 580, 13, 3733, 9222, 29918, 276, 11476, 29889, 9202, 29898, 29990, 29918, 14968, 29918, 22678, 29892, 612, 29918, 14968, 29897, 13, 13, 29990, 29918, 1688, 29918, 22678, 353, 15680, 29918, 1727, 29889, 9202, 29918, 9067, 29898, 29990, 29918, 1688, 29897, 13, 29979, 29918, 27711, 29918, 22678, 353, 10159, 29918, 276, 11476, 29889, 27711, 29898, 29990, 29918, 1688, 29918, 22678, 29897, 13, 13, 29937, 8147, 341, 1660, 13, 2158, 29898, 15807, 403, 29918, 29885, 344, 29898, 29979, 29918, 27711, 29918, 22678, 29892, 612, 29918, 1688, 876, 13, 13, 29937, 8147, 390, 29899, 29903, 339, 1965, 2087, 5143, 287, 29889, 13, 13628, 353, 10159, 29918, 276, 11476, 29889, 13628, 29898, 29990, 29918, 1688, 29918, 22678, 29892, 29979, 29918, 1688, 29897, 13, 2158, 29898, 13628, 29897, 13, 13, 5317, 29918, 690, 333, 950, 29918, 4262, 29898, 29979, 29918, 27711, 29918, 22678, 29892, 612, 29918, 1688, 29897, 13, 13, 29937, 8500, 363, 1243, 848, 29889, 13, 1688, 29961, 5182, 29962, 353, 10159, 29918, 276, 11476, 29889, 27711, 29898, 22678, 29918, 1727, 29889, 9202, 29918, 9067, 29898, 1688, 29961, 27711, 943, 12622, 13, 13, 29937, 8454, 18497, 310, 10825, 29889, 13, 1111, 12352, 353, 10159, 29918, 276, 11476, 29889, 1111, 1389, 29918, 13, 2158, 29898, 3317, 29898, 1111, 12352, 876, 13, 2158, 29898, 1195, 29898, 1111, 12352, 876, 13, 2158, 29898, 2083, 29898, 1111, 12352, 6802, 2435, 29898, 1111, 12352, 876, 13, 13, 29937, 382, 4387, 1218, 1904, 4180, 773, 413, 29899, 8771, 4891, 8845, 29889, 13, 22678, 29918, 276, 11476, 29918, 5753, 2002, 2478, 353, 4891, 29918, 791, 29918, 13628, 29898, 342, 326, 1061, 353, 10159, 29918, 276, 11476, 29892, 1060, 353, 1060, 29918, 14968, 29918, 22678, 29892, 29871, 13, 462, 632, 343, 353, 612, 29918, 14968, 29892, 13850, 353, 29871, 29896, 29900, 29897, 13, 13, 2158, 29898, 22678, 29918, 276, 11476, 29918, 5753, 2002, 2478, 29889, 12676, 3101, 13, 2158, 29898, 22678, 29918, 276, 11476, 29918, 5753, 2002, 2478, 29889, 4172, 3101, 13, 13, 29937, 2043, 948, 290, 936, 17855, 9068, 10614, 1244, 29889, 13, 12008, 13, 13, 12008, 13, 29937, 853, 9342, 445, 775, 304, 671, 390, 5525, 4597, 23881, 29889, 13, 13, 29937, 26101, 278, 1904, 773, 390, 5525, 2169, 23881, 29889, 13, 8605, 29918, 276, 11476, 353, 390, 5525, 29898, 8945, 675, 353, 5852, 29897, 13, 8605, 29918, 276, 11476, 29889, 9202, 29898, 29990, 29918, 14968, 29892, 612, 29918, 14968, 29897, 13, 29979, 29918, 11965, 29918, 8605, 353, 364, 5525, 29918, 276, 11476, 29889, 27711, 29898, 29990, 29918, 1688, 29897, 13, 2158, 29898, 15807, 403, 29918, 29885, 344, 29898, 29979, 29918, 11965, 29918, 8605, 29892, 612, 29918, 1688, 876, 13, 8605, 29918, 276, 11476, 29889, 13628, 29898, 29990, 29918, 1688, 29892, 612, 29918, 1688, 29897, 13, 13, 8605, 29918, 1111, 12352, 353, 364, 5525, 29918, 276, 11476, 29889, 1111, 1389, 29918, 13, 2158, 29898, 3317, 29898, 8605, 29918, 1111, 12352, 876, 13, 2158, 29898, 1195, 29898, 8605, 29918, 1111, 12352, 876, 13, 2158, 29898, 2083, 29898, 8605, 29918, 1111, 12352, 6802, 2435, 29898, 8605, 29918, 1111, 12352, 876, 13, 13, 29937, 382, 791, 17068, 1904, 4180, 773, 413, 29899, 4542, 311, 4891, 8845, 29889, 13, 8605, 29918, 5753, 2002, 2478, 353, 4891, 29918, 791, 29918, 13628, 29898, 342, 326, 1061, 353, 364, 5525, 29918, 276, 11476, 29892, 1060, 353, 1060, 29918, 14968, 29892, 29871, 13, 462, 632, 343, 353, 612, 29918, 14968, 29892, 13850, 353, 29871, 29896, 29900, 29897, 13, 2158, 29898, 8605, 29918, 5753, 2002, 2478, 29889, 12676, 3101, 13, 2158, 29898, 8605, 29918, 5753, 2002, 2478, 29889, 4172, 3101, 13, 29937, 2401, 5890, 11657, 11856, 304, 1284, 278, 1900, 1904, 322, 278, 1900, 4128, 13, 284, 16130, 353, 7442, 29889, 2378, 4197, 29900, 29889, 29896, 29892, 29871, 29900, 29889, 29906, 29892, 29871, 29900, 29889, 29941, 29892, 29871, 29900, 29889, 29946, 29892, 29871, 29900, 29889, 29945, 29892, 29871, 29900, 29889, 29953, 29892, 29871, 29900, 29889, 29955, 29892, 29871, 29900, 29889, 29947, 29892, 29871, 29900, 29889, 29929, 2314, 13, 9202, 29918, 1639, 1547, 5856, 353, 9310, 5574, 29892, 7700, 2314, 13, 2929, 369, 5856, 353, 313, 1839, 4501, 29881, 742, 525, 305, 6544, 3459, 742, 525, 29879, 5510, 29918, 29883, 29887, 742, 525, 29879, 351, 11287, 13, 13, 16744, 353, 9657, 29898, 2312, 29922, 284, 16130, 29892, 6216, 29918, 1639, 1547, 29922, 9202, 29918, 1639, 1547, 5856, 29892, 899, 369, 29922, 2929, 369, 5856, 29897, 13, 13, 7720, 29918, 4478, 353, 11657, 7974, 15633, 29898, 342, 326, 1061, 353, 364, 5525, 29918, 276, 11476, 29892, 13, 462, 965, 1828, 29918, 7720, 353, 4128, 29897, 13, 13, 7720, 29918, 4478, 353, 6856, 29918, 4478, 29889, 9202, 29898, 29990, 29918, 14968, 29892, 612, 29918, 14968, 29897, 13, 13318, 29918, 562, 2764, 4135, 353, 6856, 29918, 4478, 29889, 13318, 29918, 13628, 29918, 13, 13318, 29918, 16744, 353, 6856, 29918, 4478, 29889, 13318, 29918, 7529, 29918, 13, 13, 1688, 29961, 5182, 29962, 353, 6856, 29918, 4478, 29889, 27711, 29898, 1688, 29961, 27711, 943, 2314, 13, 29937, 390, 5525, 17855, 10614, 1244, 636, 13, 12008, 13, 13, 29937, 8108, 304, 19745, 566, 403, 1904, 4180, 13, 1753, 14707, 29918, 4299, 29918, 546, 13390, 29898, 4299, 29892, 921, 29918, 14968, 29892, 343, 29918, 14968, 29892, 921, 29918, 1688, 29892, 343, 29918, 1688, 1125, 13, 1678, 1904, 29889, 9202, 29898, 29916, 29918, 14968, 29892, 343, 29918, 14968, 29897, 13, 1678, 343, 29918, 27711, 353, 1904, 29889, 27711, 29898, 29916, 29918, 1688, 29897, 13, 1678, 1596, 703, 6816, 273, 19256, 4829, 29901, 9162, 15807, 403, 29918, 29885, 344, 29898, 29891, 29918, 27711, 29892, 343, 29918, 1688, 876, 13, 1678, 7913, 10068, 353, 4891, 29918, 791, 29918, 13628, 29898, 342, 326, 1061, 353, 1904, 29892, 1060, 353, 921, 29918, 14968, 29892, 343, 353, 343, 29918, 14968, 29892, 13850, 353, 29871, 29896, 29900, 29897, 13, 1678, 1596, 703, 7504, 332, 10068, 16316, 29901, 9162, 7913, 10068, 29889, 12676, 3101, 13, 1678, 1596, 703, 7504, 332, 10068, 624, 29881, 584, 9162, 7913, 10068, 29889, 4172, 3101, 13, 13, 29937, 26101, 1904, 773, 1060, 7210, 29877, 520, 29889, 13, 29916, 26300, 4597, 1253, 272, 353, 1060, 7210, 4597, 1253, 272, 580, 13, 24219, 403, 29918, 4299, 29918, 546, 13390, 29898, 29916, 26300, 4597, 1253, 272, 29892, 1060, 29918, 14968, 29892, 612, 29918, 14968, 29892, 1060, 29918, 1688, 29892, 612, 29918, 1688, 29897, 13, 12008, 13, 5894, 13390, 310, 2038, 1904, 584, 13, 1678, 16316, 19256, 4829, 29901, 259, 29896, 29896, 29947, 29953, 29896, 29955, 29941, 29889, 29955, 29929, 29945, 29900, 29941, 29955, 29953, 29929, 29945, 29955, 13, 1678, 4831, 332, 10068, 16316, 29901, 259, 29900, 29889, 29945, 29929, 29946, 29945, 29929, 29906, 29896, 29955, 29900, 29947, 29906, 29929, 13, 1678, 4831, 332, 10068, 624, 29881, 584, 259, 29900, 29889, 29900, 29896, 29929, 29929, 29900, 29953, 29955, 29900, 29946, 29941, 29953, 29945, 13, 12008, 13, 13, 1688, 29961, 5182, 29962, 353, 921, 26300, 4597, 1253, 272, 29889, 27711, 29898, 1688, 29961, 27711, 943, 2314, 13, 13, 1491, 6737, 353, 1243, 29961, 1367, 1054, 29962, 13, 1491, 6737, 29961, 5182, 29962, 353, 1243, 29961, 5182, 29962, 13, 1491, 6737, 29889, 517, 29918, 7638, 29898, 9464, 13578, 29914, 8605, 29918, 276, 11476, 29889, 7638, 613, 2380, 29922, 8824, 29897, 2 ]
python/DeepLearning/lesson1/week4/mytest/main.py
TimVan1596/ACM-ICPC
1
1601477
import numpy as np import numpy.random import matplotlib.pyplot as plt import random # 设置常量 # HIDDEN_LAYER_NUM = 隐层的个数 # LEARNING_RATE = 学习率 # NET_DEEP_ARRAY = 神经网络的深度(输入层X为0)对应的神经元个数 # DEFAULT_TRAIN_TIMES = 默认训练次数 LEARNING_RATE = 1.2 NET_DEEP_ARRAY = [] DEFAULT_TRAIN_TIMES = 5000 # RANDOM_SEED = 随机数的种子 RANDOM_SEED = 2021 # 激活函数 # def sigmoid(x): # return 1 / (1 + np.exp(-x)) def sigmoid(x): s = 1 / (1 + np.exp(-x)) return s # 深层神经网络主驱动 def deep_neural_network(X, Y , net_deep_array=[0, 6, 1], learning_rate=LEARNING_RATE , train_times=DEFAULT_TRAIN_TIMES, random_seed=RANDOM_SEED): # 绘图 plt.title("week4 深层神经网络") plt.xlabel("x/times") plt.ylabel("损失值(越小越好)") plt.rcParams['font.sans-serif'] = ['SimHei'] # 显示中文标签 plt.rcParams['axes.unicode_minus'] = False # 这两行需要手动设置 x = [] y = [] # 初始化基本参数 net_deep = len(net_deep_array) net_deep_array[0] = X.shape[0] numpy.random.seed(random_seed) m = X.shape[1] W, b = initial_parameters(net_deep_array) # 暂存每一个深度的参数值 Z = [0] * net_deep A = [0] * net_deep # 后向传播用于梯度下降 dZ = [0] * net_deep dW = [0] * net_deep db = [0] * net_deep dA = [0] * net_deep A[0] = X # 训练次数 for i in range(0, train_times, 1): # 每次前向传播中的纵向深度 for L in range(1, net_deep, 1): activate = 'tanh' # 最后一次使用sigmoid激活函数 if L == net_deep - 1: activate = 'sigmoid' # 进行前向传播 forward_parameter = forward_propagation(A[L - 1], { 'W': W[L], 'b': b[L], }, activate) Z[L] = forward_parameter.get('Z') A[L] = forward_parameter.get('A') assert (Z[L].shape == (net_deep_array[L], m)) # 计算成本cost cost_value = cost(A[net_deep - 1], Y) if i % 20 == 0: x.append(i) y.append(cost_value) if i % 500 == 0: print("第", i, "次迭代,成本值为:", np.squeeze(cost_value)) # 后向传播用于梯度下降 # 倒序计算出 dAL = 0 for L in range(net_deep - 1, 0, -1): if L == net_deep - 1: dAL = -np.divide(Y, A[net_deep - 1]) + np.divide(1 - Y, 1 - A[net_deep - 1]) dZL = dAL * sigmoid(Z[net_deep - 1]) * sigmoid(1 - Z[net_deep - 1]) else: dZL = dAL * (1 - (np.tanh(Z[L]) * np.tanh(Z[L]))) dWL = (1 / m) * (np.dot(dZL, A[L - 1].T)) dbL = (1 / m) * np.sum(dZL, axis=1, keepdims=True) # 提供给下一次的循环 dAL = np.dot(W[L].T, dZL) # 更新参数 W[L] = W[L] - learning_rate * dWL b[L] = b[L] - learning_rate * dbL plt.plot(x, y, color='orange') plt.show() parameter = { 'W': W, 'b': b, 'x': x, 'y': y, 'net_deep_array': net_deep_array, } return parameter # 前向传播 def forward_propagation(A_Last, parameter, activate='tanh'): W = parameter.get('W') b = parameter.get('b') Z = np.dot(W, A_Last) + b if activate == 'tanh': A = np.tanh(Z) elif activate == 'sigmoid': A = sigmoid(Z) return { 'Z': Z, 'A': A, } # 后向传播 def backward_propagation(dA, Z, A_Last_T, W): dZ = dA * sigmoid(Z) * (1 - sigmoid(Z)) # 计算该结果的成本 def cost(A, Y): A = np.squeeze(A) Y = np.squeeze(Y) assert (A.shape[0] == Y.shape[0]) m = A.shape[0] # 这里使用 np.multiply 是因为只有一维所以对应想乘 # a = np.log(A) # b = np.multiply(np.log(A), Y) # c = np.log(1 - A) # d = np.multiply((1 - Y), np.log(1 - A)) temp = np.multiply(np.log(A), Y) + np.multiply((1 - Y), np.log(1 - A)) # 取了一次绝对值 temp = np.maximum(temp, -temp) cost_ret = np.sum(temp) * (-1 / m) cost_ret = np.maximum(cost_ret, -cost_ret) return float(cost_ret) # 初始化W和b的参数 def initial_parameters(net_deep_array): net_deep = len(net_deep_array) W = [] b = [] for L in range(net_deep): WL = np.random.randn(net_deep_array[L], net_deep_array[L - 1]) * 0.01 bL = np.zeros(shape=(net_deep_array[L], 1)) W.append(WL) b.append(bL) return W, b # 对深层神经网络得出的结果进行测试 def test_network(X, Y, parameter): W = parameter.get('W') b = parameter.get('b') net_deep_array = parameter.get('net_deep_array') net_deep = len(net_deep_array) A = X # 每次前向传播中的纵向深度 for L in range(1, net_deep, 1): activate = 'tanh' # 最后一次使用sigmoid激活函数 if L == net_deep - 1: activate = 'sigmoid' # 进行前向传播 forward_parameter = forward_propagation(A, { 'W': W[L], 'b': b[L], }, activate) A = forward_parameter.get('A') # 计算成本cost cost_value = cost(A, Y) print(numpy.around(np.squeeze(A), 1)) print(Y) m = A.shape[1] for i in range(0, A.shape[1]): if A[0, i] > 0.5: A[0, i] = 1 else: A[0, i] = 0 print("成本cost=" + str(cost_value)) print("准确性: " + str(float(np.sum((A == Y)) * 100 / m)) + "%") # 获得数据 # num = 样本数量 def get_number(num): X = [ [], [], [] ] Y = [] i = 0 for i in range(num): x = random.randint(-5, 15) y = random.randint(0, 150) z = random.randint(0, 150) temp = np.exp(x) + 3 * y + z result = 1 if temp < 500: result = 0 X[0].append(x) X[1].append(y) X[2].append(z) Y.append(result) # print("-- 当 i =" + str(i)) # print("x=" + str(x)) # print("y=" + str(y)) # print("z=" + str(z)) # print("temp=" + str(temp)) # print("result=" + str(result)) # print("-" * 10) return X, Y if __name__ == '__main__': # 测试集进行学习的次数 # 初始化训练的数据 data_X, data_Y = get_number(5000) data_X = np.array(data_X) data_Y = np.array(data_Y) print(data_X.shape) print(data_Y.shape) parameter = deep_neural_network(data_X, data_Y, train_times=5000) # 对测试集数据进行评估准确性 test_X, test_Y = get_number(15) test_X = np.array(test_X) test_Y = np.array(test_Y) test_network(test_X, test_Y, parameter=parameter) plt.title("week4 深层神经网络") plt.xlabel("x/times") plt.ylabel("损失值(越小越好)") plt.rcParams['font.sans-serif'] = ['SimHei'] # 显示中文标签 plt.rcParams['axes.unicode_minus'] = False # 这两行需要手动设置 x = parameter.get('x') y = parameter.get('y') plt.plot(x, y, color='orange') plt.show()
[ 1, 1053, 12655, 408, 7442, 13, 5215, 12655, 29889, 8172, 13, 5215, 22889, 29889, 2272, 5317, 408, 14770, 13, 5215, 4036, 13, 13, 29937, 29871, 30872, 30669, 31190, 31180, 13, 29937, 379, 1367, 29928, 1430, 29918, 18799, 1001, 29918, 13967, 353, 29871, 236, 157, 147, 232, 180, 133, 30210, 30502, 30354, 13, 29937, 11060, 25614, 29918, 29934, 3040, 353, 29871, 30415, 231, 188, 163, 234, 145, 138, 13, 29937, 405, 2544, 29918, 2287, 15488, 29918, 1718, 22800, 353, 29871, 30648, 31412, 31222, 234, 190, 159, 30210, 31947, 30898, 29898, 31573, 30752, 232, 180, 133, 29990, 30573, 29900, 29897, 30783, 31370, 30210, 30648, 31412, 30824, 30502, 30354, 13, 29937, 22236, 29918, 29911, 4717, 1177, 29918, 15307, 29903, 353, 29871, 31735, 31439, 235, 177, 176, 234, 190, 134, 30936, 30354, 13, 1307, 25614, 29918, 29934, 3040, 353, 29871, 29896, 29889, 29906, 13, 6006, 29918, 2287, 15488, 29918, 1718, 22800, 353, 5159, 13, 23397, 29918, 29911, 4717, 1177, 29918, 15307, 29903, 353, 29871, 29945, 29900, 29900, 29900, 13, 29937, 390, 2190, 22141, 29918, 1660, 3352, 353, 29871, 236, 157, 146, 31429, 30354, 30210, 31893, 30319, 13, 29934, 2190, 22141, 29918, 1660, 3352, 353, 29871, 29906, 29900, 29906, 29896, 13, 13, 13, 29937, 29871, 233, 194, 131, 31704, 31629, 30354, 13, 29937, 822, 4365, 29885, 3398, 29898, 29916, 1125, 13, 29937, 268, 736, 29871, 29896, 847, 313, 29896, 718, 7442, 29889, 4548, 6278, 29916, 876, 13, 1753, 4365, 29885, 3398, 29898, 29916, 1125, 13, 1678, 269, 353, 29871, 29896, 847, 313, 29896, 718, 7442, 29889, 4548, 6278, 29916, 876, 13, 1678, 736, 269, 13, 13, 13, 29937, 29871, 31947, 232, 180, 133, 30648, 31412, 31222, 234, 190, 159, 30888, 236, 172, 180, 30846, 13, 1753, 6483, 29918, 484, 3631, 29918, 11618, 29898, 29990, 29892, 612, 13, 462, 4706, 1919, 7787, 29918, 24535, 29918, 2378, 11759, 29900, 29892, 29871, 29953, 29892, 29871, 29896, 1402, 6509, 29918, 10492, 29922, 1307, 25614, 29918, 29934, 3040, 13, 462, 4706, 1919, 7945, 29918, 3706, 29922, 23397, 29918, 29911, 4717, 1177, 29918, 15307, 29903, 29892, 4036, 29918, 26776, 29922, 29934, 2190, 22141, 29918, 1660, 3352, 1125, 13, 1678, 396, 29871, 234, 190, 155, 30861, 13, 1678, 14770, 29889, 3257, 703, 18448, 29946, 29871, 31947, 232, 180, 133, 30648, 31412, 31222, 234, 190, 159, 1159, 13, 1678, 14770, 29889, 29916, 1643, 703, 29916, 29914, 3706, 1159, 13, 1678, 14770, 29889, 29891, 1643, 703, 233, 144, 162, 31369, 30959, 30419, 31844, 30446, 31844, 31076, 30409, 1159, 13, 1678, 14770, 29889, 2214, 9629, 1839, 5657, 29889, 29879, 550, 29899, 643, 361, 2033, 353, 6024, 8942, 3868, 29875, 2033, 29871, 396, 29871, 31542, 30858, 30275, 30333, 31062, 234, 176, 193, 13, 1678, 14770, 29889, 2214, 9629, 1839, 1165, 267, 29889, 2523, 356, 29918, 12254, 2033, 353, 7700, 29871, 396, 29871, 30810, 31977, 30448, 31383, 30698, 30880, 30846, 30872, 30669, 13, 1678, 921, 353, 5159, 13, 1678, 343, 353, 5159, 13, 13, 1678, 396, 29871, 31120, 31020, 30705, 31359, 30346, 31125, 30354, 13, 1678, 7787, 29918, 24535, 353, 7431, 29898, 1212, 29918, 24535, 29918, 2378, 29897, 13, 1678, 7787, 29918, 24535, 29918, 2378, 29961, 29900, 29962, 353, 1060, 29889, 12181, 29961, 29900, 29962, 13, 1678, 12655, 29889, 8172, 29889, 26776, 29898, 8172, 29918, 26776, 29897, 13, 1678, 286, 353, 1060, 29889, 12181, 29961, 29896, 29962, 13, 1678, 399, 29892, 289, 353, 2847, 29918, 16744, 29898, 1212, 29918, 24535, 29918, 2378, 29897, 13, 13, 1678, 396, 29871, 233, 157, 133, 30946, 31951, 30287, 30502, 31947, 30898, 30210, 31125, 30354, 30959, 13, 1678, 796, 353, 518, 29900, 29962, 334, 7787, 29918, 24535, 13, 1678, 319, 353, 518, 29900, 29962, 334, 7787, 29918, 24535, 13, 1678, 396, 29871, 30822, 31331, 31471, 233, 149, 176, 30406, 30909, 233, 165, 178, 30898, 30557, 236, 156, 144, 13, 1678, 270, 29999, 353, 518, 29900, 29962, 334, 7787, 29918, 24535, 13, 1678, 270, 29956, 353, 518, 29900, 29962, 334, 7787, 29918, 24535, 13, 1678, 4833, 353, 518, 29900, 29962, 334, 7787, 29918, 24535, 13, 1678, 270, 29909, 353, 518, 29900, 29962, 334, 7787, 29918, 24535, 13, 1678, 319, 29961, 29900, 29962, 353, 1060, 13, 13, 1678, 396, 29871, 235, 177, 176, 234, 190, 134, 30936, 30354, 13, 1678, 363, 474, 297, 3464, 29898, 29900, 29892, 7945, 29918, 3706, 29892, 29871, 29896, 1125, 13, 4706, 396, 29871, 31951, 30936, 30658, 31331, 31471, 233, 149, 176, 30275, 30210, 234, 189, 184, 31331, 31947, 30898, 13, 4706, 363, 365, 297, 3464, 29898, 29896, 29892, 7787, 29918, 24535, 29892, 29871, 29896, 1125, 13, 13, 9651, 5039, 403, 353, 525, 13161, 29882, 29915, 13, 9651, 396, 29871, 30878, 30822, 30287, 30936, 30785, 30406, 18816, 29885, 3398, 233, 194, 131, 31704, 31629, 30354, 13, 9651, 565, 365, 1275, 7787, 29918, 24535, 448, 29871, 29896, 29901, 13, 18884, 5039, 403, 353, 525, 18816, 29885, 3398, 29915, 13, 9651, 396, 29871, 31174, 30448, 30658, 31331, 31471, 233, 149, 176, 13, 9651, 6375, 29918, 15501, 353, 6375, 29918, 7728, 351, 362, 29898, 29909, 29961, 29931, 448, 29871, 29896, 1402, 426, 13, 18884, 525, 29956, 2396, 399, 29961, 29931, 1402, 13, 18884, 525, 29890, 2396, 289, 29961, 29931, 1402, 13, 9651, 2981, 5039, 403, 29897, 13, 9651, 796, 29961, 29931, 29962, 353, 6375, 29918, 15501, 29889, 657, 877, 29999, 1495, 13, 9651, 319, 29961, 29931, 29962, 353, 6375, 29918, 15501, 29889, 657, 877, 29909, 1495, 13, 9651, 4974, 313, 29999, 29961, 29931, 1822, 12181, 1275, 313, 1212, 29918, 24535, 29918, 2378, 29961, 29931, 1402, 286, 876, 13, 13, 4706, 396, 29871, 31466, 31565, 30494, 30346, 18253, 13, 4706, 3438, 29918, 1767, 353, 3438, 29898, 29909, 29961, 1212, 29918, 24535, 448, 29871, 29896, 1402, 612, 29897, 13, 4706, 565, 474, 1273, 29871, 29906, 29900, 1275, 29871, 29900, 29901, 13, 9651, 921, 29889, 4397, 29898, 29875, 29897, 13, 9651, 343, 29889, 4397, 29898, 18253, 29918, 1767, 29897, 13, 13, 4706, 565, 474, 1273, 29871, 29945, 29900, 29900, 1275, 29871, 29900, 29901, 13, 9651, 1596, 703, 30622, 613, 474, 29892, 376, 30936, 235, 194, 176, 30690, 30214, 30494, 30346, 30959, 30573, 30383, 613, 7442, 29889, 29879, 802, 29872, 911, 29898, 18253, 29918, 1767, 876, 13, 13, 4706, 396, 29871, 30822, 31331, 31471, 233, 149, 176, 30406, 30909, 233, 165, 178, 30898, 30557, 236, 156, 144, 13, 4706, 396, 29871, 232, 131, 149, 31463, 31466, 31565, 30544, 13, 4706, 270, 1964, 353, 29871, 29900, 13, 4706, 363, 365, 297, 3464, 29898, 1212, 29918, 24535, 448, 29871, 29896, 29892, 29871, 29900, 29892, 448, 29896, 1125, 13, 9651, 565, 365, 1275, 7787, 29918, 24535, 448, 29871, 29896, 29901, 13, 18884, 270, 1964, 353, 448, 9302, 29889, 4563, 680, 29898, 29979, 29892, 319, 29961, 1212, 29918, 24535, 448, 29871, 29896, 2314, 718, 7442, 29889, 4563, 680, 29898, 29896, 448, 612, 29892, 29871, 29896, 448, 319, 29961, 1212, 29918, 24535, 448, 29871, 29896, 2314, 13, 18884, 270, 29999, 29931, 353, 270, 1964, 334, 4365, 29885, 3398, 29898, 29999, 29961, 1212, 29918, 24535, 448, 29871, 29896, 2314, 334, 4365, 29885, 3398, 29898, 29896, 448, 796, 29961, 1212, 29918, 24535, 448, 29871, 29896, 2314, 13, 9651, 1683, 29901, 13, 18884, 270, 29999, 29931, 353, 270, 1964, 334, 313, 29896, 448, 313, 9302, 29889, 13161, 29882, 29898, 29999, 29961, 29931, 2314, 334, 7442, 29889, 13161, 29882, 29898, 29999, 29961, 29931, 29962, 4961, 13, 13, 9651, 270, 29956, 29931, 353, 313, 29896, 847, 286, 29897, 334, 313, 9302, 29889, 6333, 29898, 29881, 29999, 29931, 29892, 319, 29961, 29931, 448, 29871, 29896, 1822, 29911, 876, 13, 9651, 4833, 29931, 353, 313, 29896, 847, 286, 29897, 334, 7442, 29889, 2083, 29898, 29881, 29999, 29931, 29892, 9685, 29922, 29896, 29892, 3013, 6229, 29879, 29922, 5574, 29897, 13, 9651, 396, 29871, 31302, 231, 193, 158, 31999, 30557, 30287, 30936, 30210, 232, 193, 173, 234, 145, 178, 13, 9651, 270, 1964, 353, 7442, 29889, 6333, 29898, 29956, 29961, 29931, 1822, 29911, 29892, 270, 29999, 29931, 29897, 13, 13, 9651, 396, 29871, 31100, 30374, 31125, 30354, 13, 9651, 399, 29961, 29931, 29962, 353, 399, 29961, 29931, 29962, 448, 6509, 29918, 10492, 334, 270, 29956, 29931, 13, 9651, 289, 29961, 29931, 29962, 353, 289, 29961, 29931, 29962, 448, 6509, 29918, 10492, 334, 4833, 29931, 13, 13, 1678, 14770, 29889, 5317, 29898, 29916, 29892, 343, 29892, 2927, 2433, 272, 927, 1495, 13, 1678, 14770, 29889, 4294, 580, 13, 13, 1678, 3443, 353, 426, 13, 4706, 525, 29956, 2396, 399, 29892, 13, 4706, 525, 29890, 2396, 289, 29892, 13, 4706, 525, 29916, 2396, 921, 29892, 13, 4706, 525, 29891, 2396, 343, 29892, 13, 4706, 525, 1212, 29918, 24535, 29918, 2378, 2396, 7787, 29918, 24535, 29918, 2378, 29892, 13, 1678, 500, 13, 1678, 736, 3443, 13, 13, 13, 29937, 29871, 30658, 31331, 31471, 233, 149, 176, 13, 1753, 6375, 29918, 7728, 351, 362, 29898, 29909, 29918, 8897, 29892, 3443, 29892, 5039, 403, 2433, 13161, 29882, 29374, 13, 1678, 399, 353, 3443, 29889, 657, 877, 29956, 1495, 13, 1678, 289, 353, 3443, 29889, 657, 877, 29890, 1495, 13, 13, 1678, 796, 353, 7442, 29889, 6333, 29898, 29956, 29892, 319, 29918, 8897, 29897, 718, 289, 13, 1678, 565, 5039, 403, 1275, 525, 13161, 29882, 2396, 13, 4706, 319, 353, 7442, 29889, 13161, 29882, 29898, 29999, 29897, 13, 1678, 25342, 5039, 403, 1275, 525, 18816, 29885, 3398, 2396, 13, 4706, 319, 353, 4365, 29885, 3398, 29898, 29999, 29897, 13, 13, 1678, 736, 426, 13, 4706, 525, 29999, 2396, 796, 29892, 13, 4706, 525, 29909, 2396, 319, 29892, 13, 1678, 500, 13, 13, 13, 29937, 29871, 30822, 31331, 31471, 233, 149, 176, 13, 1753, 1250, 1328, 29918, 7728, 351, 362, 29898, 29881, 29909, 29892, 796, 29892, 319, 29918, 8897, 29918, 29911, 29892, 399, 1125, 13, 1678, 270, 29999, 353, 270, 29909, 334, 4365, 29885, 3398, 29898, 29999, 29897, 334, 313, 29896, 448, 4365, 29885, 3398, 29898, 29999, 876, 13, 13, 13, 29937, 29871, 31466, 31565, 31751, 31320, 30801, 30210, 30494, 30346, 13, 1753, 3438, 29898, 29909, 29892, 612, 1125, 13, 1678, 319, 353, 7442, 29889, 29879, 802, 29872, 911, 29898, 29909, 29897, 13, 1678, 612, 353, 7442, 29889, 29879, 802, 29872, 911, 29898, 29979, 29897, 13, 1678, 4974, 313, 29909, 29889, 12181, 29961, 29900, 29962, 1275, 612, 29889, 12181, 29961, 29900, 2314, 13, 1678, 286, 353, 319, 29889, 12181, 29961, 29900, 29962, 13, 1678, 396, 29871, 30810, 30755, 30785, 30406, 7442, 29889, 18056, 368, 29871, 30392, 31570, 30573, 31557, 30417, 30287, 234, 190, 183, 30744, 30651, 30783, 31370, 31522, 231, 188, 155, 13, 1678, 396, 263, 353, 7442, 29889, 1188, 29898, 29909, 29897, 13, 1678, 396, 289, 353, 7442, 29889, 18056, 368, 29898, 9302, 29889, 1188, 29898, 29909, 511, 612, 29897, 13, 1678, 396, 274, 353, 7442, 29889, 1188, 29898, 29896, 448, 319, 29897, 13, 1678, 396, 270, 353, 7442, 29889, 18056, 368, 3552, 29896, 448, 612, 511, 7442, 29889, 1188, 29898, 29896, 448, 319, 876, 13, 13, 1678, 5694, 353, 7442, 29889, 18056, 368, 29898, 9302, 29889, 1188, 29898, 29909, 511, 612, 29897, 718, 7442, 29889, 18056, 368, 3552, 29896, 448, 612, 511, 7442, 29889, 1188, 29898, 29896, 448, 319, 876, 13, 1678, 396, 29871, 30683, 30743, 30287, 30936, 234, 190, 160, 30783, 30959, 13, 1678, 5694, 353, 7442, 29889, 27525, 398, 29898, 7382, 29892, 448, 7382, 29897, 13, 1678, 3438, 29918, 2267, 353, 7442, 29889, 2083, 29898, 7382, 29897, 334, 8521, 29896, 847, 286, 29897, 13, 1678, 3438, 29918, 2267, 353, 7442, 29889, 27525, 398, 29898, 18253, 29918, 2267, 29892, 448, 18253, 29918, 2267, 29897, 13, 13, 1678, 736, 5785, 29898, 18253, 29918, 2267, 29897, 13, 13, 13, 29937, 29871, 31120, 31020, 30705, 29956, 30503, 29890, 30210, 31125, 30354, 13, 13, 13, 1753, 2847, 29918, 16744, 29898, 1212, 29918, 24535, 29918, 2378, 1125, 13, 1678, 7787, 29918, 24535, 353, 7431, 29898, 1212, 29918, 24535, 29918, 2378, 29897, 13, 1678, 399, 353, 5159, 13, 1678, 289, 353, 5159, 13, 1678, 363, 365, 297, 3464, 29898, 1212, 29918, 24535, 1125, 13, 4706, 399, 29931, 353, 7442, 29889, 8172, 29889, 9502, 29876, 29898, 1212, 29918, 24535, 29918, 2378, 29961, 29931, 1402, 7787, 29918, 24535, 29918, 2378, 29961, 29931, 448, 29871, 29896, 2314, 334, 29871, 29900, 29889, 29900, 29896, 13, 4706, 289, 29931, 353, 7442, 29889, 3298, 359, 29898, 12181, 7607, 1212, 29918, 24535, 29918, 2378, 29961, 29931, 1402, 29871, 29896, 876, 13, 4706, 399, 29889, 4397, 29898, 29956, 29931, 29897, 13, 4706, 289, 29889, 4397, 29898, 29890, 29931, 29897, 13, 1678, 736, 399, 29892, 289, 13, 13, 13, 29937, 29871, 30783, 31947, 232, 180, 133, 30648, 31412, 31222, 234, 190, 159, 31050, 30544, 30210, 31320, 30801, 31174, 30448, 31851, 31787, 13, 1753, 1243, 29918, 11618, 29898, 29990, 29892, 612, 29892, 3443, 1125, 13, 1678, 399, 353, 3443, 29889, 657, 877, 29956, 1495, 13, 1678, 289, 353, 3443, 29889, 657, 877, 29890, 1495, 13, 1678, 7787, 29918, 24535, 29918, 2378, 353, 3443, 29889, 657, 877, 1212, 29918, 24535, 29918, 2378, 1495, 13, 1678, 7787, 29918, 24535, 353, 7431, 29898, 1212, 29918, 24535, 29918, 2378, 29897, 13, 1678, 319, 353, 1060, 13, 13, 1678, 396, 29871, 31951, 30936, 30658, 31331, 31471, 233, 149, 176, 30275, 30210, 234, 189, 184, 31331, 31947, 30898, 13, 1678, 363, 365, 297, 3464, 29898, 29896, 29892, 7787, 29918, 24535, 29892, 29871, 29896, 1125, 13, 4706, 5039, 403, 353, 525, 13161, 29882, 29915, 13, 4706, 396, 29871, 30878, 30822, 30287, 30936, 30785, 30406, 18816, 29885, 3398, 233, 194, 131, 31704, 31629, 30354, 13, 4706, 565, 365, 1275, 7787, 29918, 24535, 448, 29871, 29896, 29901, 13, 9651, 5039, 403, 353, 525, 18816, 29885, 3398, 29915, 13, 4706, 396, 29871, 31174, 30448, 30658, 31331, 31471, 233, 149, 176, 13, 4706, 6375, 29918, 15501, 353, 6375, 29918, 7728, 351, 362, 29898, 29909, 29892, 426, 13, 9651, 525, 29956, 2396, 399, 29961, 29931, 1402, 13, 9651, 525, 29890, 2396, 289, 29961, 29931, 1402, 13, 4706, 2981, 5039, 403, 29897, 13, 4706, 319, 353, 6375, 29918, 15501, 29889, 657, 877, 29909, 1495, 13, 1678, 396, 29871, 31466, 31565, 30494, 30346, 18253, 13, 1678, 3438, 29918, 1767, 353, 3438, 29898, 29909, 29892, 612, 29897, 13, 13, 1678, 1596, 29898, 23749, 29889, 11316, 29898, 9302, 29889, 29879, 802, 29872, 911, 29898, 29909, 511, 29871, 29896, 876, 13, 1678, 1596, 29898, 29979, 29897, 13, 1678, 286, 353, 319, 29889, 12181, 29961, 29896, 29962, 13, 1678, 363, 474, 297, 3464, 29898, 29900, 29892, 319, 29889, 12181, 29961, 29896, 29962, 1125, 13, 4706, 565, 319, 29961, 29900, 29892, 474, 29962, 1405, 29871, 29900, 29889, 29945, 29901, 13, 9651, 319, 29961, 29900, 29892, 474, 29962, 353, 29871, 29896, 13, 4706, 1683, 29901, 13, 9651, 319, 29961, 29900, 29892, 474, 29962, 353, 29871, 29900, 13, 13, 1678, 1596, 703, 30494, 30346, 18253, 543, 718, 851, 29898, 18253, 29918, 1767, 876, 13, 1678, 1596, 703, 232, 138, 137, 31835, 30952, 29901, 376, 718, 851, 29898, 7411, 29898, 9302, 29889, 2083, 3552, 29909, 1275, 612, 876, 334, 29871, 29896, 29900, 29900, 847, 286, 876, 718, 11860, 1159, 13, 13, 13, 29937, 29871, 31024, 31050, 30354, 30763, 13, 29937, 954, 353, 29871, 31819, 30346, 30354, 31180, 13, 1753, 679, 29918, 4537, 29898, 1949, 1125, 13, 1678, 1060, 353, 518, 13, 4706, 19997, 13, 4706, 19997, 13, 4706, 5159, 13, 1678, 4514, 13, 1678, 612, 353, 5159, 13, 1678, 474, 353, 29871, 29900, 13, 1678, 363, 474, 297, 3464, 29898, 1949, 1125, 13, 4706, 921, 353, 4036, 29889, 9502, 524, 6278, 29945, 29892, 29871, 29896, 29945, 29897, 13, 4706, 343, 353, 4036, 29889, 9502, 524, 29898, 29900, 29892, 29871, 29896, 29945, 29900, 29897, 13, 4706, 503, 353, 4036, 29889, 9502, 524, 29898, 29900, 29892, 29871, 29896, 29945, 29900, 29897, 13, 4706, 5694, 353, 7442, 29889, 4548, 29898, 29916, 29897, 718, 29871, 29941, 334, 343, 718, 503, 13, 4706, 1121, 353, 29871, 29896, 13, 4706, 565, 5694, 529, 29871, 29945, 29900, 29900, 29901, 13, 9651, 1121, 353, 29871, 29900, 13, 4706, 1060, 29961, 29900, 1822, 4397, 29898, 29916, 29897, 13, 4706, 1060, 29961, 29896, 1822, 4397, 29898, 29891, 29897, 13, 4706, 1060, 29961, 29906, 1822, 4397, 29898, 29920, 29897, 13, 4706, 612, 29889, 4397, 29898, 2914, 29897, 13, 4706, 396, 1596, 703, 489, 29871, 30948, 474, 29465, 718, 851, 29898, 29875, 876, 13, 4706, 396, 1596, 703, 29916, 543, 718, 851, 29898, 29916, 876, 13, 4706, 396, 1596, 703, 29891, 543, 718, 851, 29898, 29891, 876, 13, 4706, 396, 1596, 703, 29920, 543, 718, 851, 29898, 29920, 876, 13, 4706, 396, 1596, 703, 7382, 543, 718, 851, 29898, 7382, 876, 13, 4706, 396, 1596, 703, 2914, 543, 718, 851, 29898, 2914, 876, 13, 4706, 396, 1596, 703, 29899, 29908, 334, 29871, 29896, 29900, 29897, 13, 1678, 736, 1060, 29892, 612, 13, 13, 13, 361, 4770, 978, 1649, 1275, 525, 1649, 3396, 1649, 2396, 13, 1678, 396, 29871, 31851, 31787, 30893, 31174, 30448, 30415, 231, 188, 163, 30210, 30936, 30354, 13, 13, 1678, 396, 29871, 31120, 31020, 30705, 235, 177, 176, 234, 190, 134, 30210, 30354, 30763, 13, 1678, 848, 29918, 29990, 29892, 848, 29918, 29979, 353, 679, 29918, 4537, 29898, 29945, 29900, 29900, 29900, 29897, 13, 1678, 848, 29918, 29990, 353, 7442, 29889, 2378, 29898, 1272, 29918, 29990, 29897, 13, 1678, 848, 29918, 29979, 353, 7442, 29889, 2378, 29898, 1272, 29918, 29979, 29897, 13, 13, 1678, 1596, 29898, 1272, 29918, 29990, 29889, 12181, 29897, 13, 1678, 1596, 29898, 1272, 29918, 29979, 29889, 12181, 29897, 13, 13, 1678, 3443, 353, 6483, 29918, 484, 3631, 29918, 11618, 29898, 1272, 29918, 29990, 29892, 848, 29918, 29979, 29892, 7945, 29918, 3706, 29922, 29945, 29900, 29900, 29900, 29897, 13, 13, 1678, 396, 29871, 30783, 31851, 31787, 30893, 30354, 30763, 31174, 30448, 235, 178, 135, 231, 191, 179, 232, 138, 137, 31835, 30952, 13, 1678, 1243, 29918, 29990, 29892, 1243, 29918, 29979, 353, 679, 29918, 4537, 29898, 29896, 29945, 29897, 13, 1678, 1243, 29918, 29990, 353, 7442, 29889, 2378, 29898, 1688, 29918, 29990, 29897, 13, 1678, 1243, 29918, 29979, 353, 7442, 29889, 2378, 29898, 1688, 29918, 29979, 29897, 13, 1678, 1243, 29918, 11618, 29898, 1688, 29918, 29990, 29892, 1243, 29918, 29979, 29892, 3443, 29922, 15501, 29897, 13, 13, 1678, 14770, 29889, 3257, 703, 18448, 29946, 29871, 31947, 232, 180, 133, 30648, 31412, 31222, 234, 190, 159, 1159, 13, 1678, 14770, 29889, 29916, 1643, 703, 29916, 29914, 3706, 1159, 13, 1678, 14770, 29889, 29891, 1643, 703, 233, 144, 162, 31369, 30959, 30419, 31844, 30446, 31844, 31076, 30409, 1159, 13, 1678, 14770, 29889, 2214, 9629, 1839, 5657, 29889, 29879, 550, 29899, 643, 361, 2033, 353, 6024, 8942, 3868, 29875, 2033, 29871, 396, 29871, 31542, 30858, 30275, 30333, 31062, 234, 176, 193, 13, 1678, 14770, 29889, 2214, 9629, 1839, 1165, 267, 29889, 2523, 356, 29918, 12254, 2033, 353, 7700, 29871, 396, 29871, 30810, 31977, 30448, 31383, 30698, 30880, 30846, 30872, 30669, 13, 1678, 921, 353, 3443, 29889, 657, 877, 29916, 1495, 13, 1678, 343, 353, 3443, 29889, 657, 877, 29891, 1495, 13, 1678, 14770, 29889, 5317, 29898, 29916, 29892, 343, 29892, 2927, 2433, 272, 927, 1495, 13, 1678, 14770, 29889, 4294, 580, 13, 2 ]
libraries/unified-model/unified_model/utils.py
felixridinger/machine-learning-lab
55
70633
<reponame>felixridinger/machine-learning-lab import os import re import inspect ITEM_COLUMN = "item" SCORE_COLUMN = "score" def resolve_camel_case(name): s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name) return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower() def truncate_middle(s, n): if len(s) <= n: # string is already short-enough return s # half of the size, minus the 3 .'s n_2 = int(n) / 2 - 3 # whatever's left n_1 = n - n_2 - 3 return '{0}...{1}'.format(s[:int(n_1)], s[-int(n_2):]) def md5(file_path): import hashlib # return hashlib.md5(open(fname, 'rb').read()).hexdigest() hash_md5 = hashlib.md5() with open(file_path, "rb") as f: for chunk in iter(lambda: f.read(4096), b""): hash_md5.update(chunk) return hash_md5.hexdigest() def simplify(name): return resolve_camel_case(name).strip().replace(" ", "_") def get_file_name(file_path): return os.path.splitext(os.path.basename(file_path))[0] def overrides(method): # actually can't do this because a method is really just a function while inside a class def'n #assert(inspect.ismethod(method)) stack = inspect.stack() base_classes = re.search(r'class.+\((.+)\)\s*\:', stack[2][4][0]).group(1) # handle multiple inheritance base_classes = [s.strip() for s in base_classes.split(',')] if not base_classes: raise ValueError('overrides decorator: unable to determine base class') # stack[0]=overrides, stack[1]=inside class def'n, stack[2]=outside class def'n derived_class_locals = stack[2][0].f_locals # replace each class name in base_classes with the actual class type for i, base_class in enumerate(base_classes): if '.' not in base_class: base_classes[i] = derived_class_locals[base_class] else: components = base_class.split('.') # obj is either a module or a class obj = derived_class_locals[components[0]] for c in components[1:]: assert(inspect.ismodule(obj) or inspect.isclass(obj)) obj = getattr(obj, c) base_classes[i] = obj assert( any( hasattr(cls, method.__name__) for cls in base_classes ) ) return method
[ 1, 529, 276, 1112, 420, 29958, 13287, 861, 2429, 5621, 29914, 23523, 29899, 21891, 29899, 8205, 13, 5215, 2897, 13, 5215, 337, 13, 5215, 16096, 13, 13, 9094, 29924, 29918, 15032, 29127, 353, 376, 667, 29908, 13, 29903, 3217, 1525, 29918, 15032, 29127, 353, 376, 13628, 29908, 13, 13, 13, 1753, 8814, 29918, 11108, 295, 29918, 4878, 29898, 978, 1125, 13, 1678, 269, 29896, 353, 337, 29889, 1491, 877, 29898, 1846, 4197, 29909, 29899, 29999, 3816, 29874, 29899, 29920, 10062, 29897, 742, 364, 12764, 29896, 3187, 29906, 742, 1024, 29897, 13, 1678, 736, 337, 29889, 1491, 877, 4197, 29874, 29899, 29920, 29900, 29899, 29929, 2314, 4197, 29909, 29899, 29999, 2314, 742, 364, 12764, 29896, 3187, 29906, 742, 269, 29896, 467, 13609, 580, 13, 13, 13, 1753, 21022, 403, 29918, 17662, 29898, 29879, 29892, 302, 1125, 13, 1678, 565, 7431, 29898, 29879, 29897, 5277, 302, 29901, 13, 4706, 396, 1347, 338, 2307, 3273, 29899, 264, 820, 13, 4706, 736, 269, 13, 1678, 396, 4203, 310, 278, 2159, 29892, 26134, 278, 29871, 29941, 869, 29915, 29879, 13, 1678, 302, 29918, 29906, 353, 938, 29898, 29876, 29897, 847, 29871, 29906, 448, 29871, 29941, 13, 1678, 396, 6514, 29915, 29879, 2175, 13, 1678, 302, 29918, 29896, 353, 302, 448, 302, 29918, 29906, 448, 29871, 29941, 13, 1678, 736, 22372, 29900, 29913, 856, 29912, 29896, 29913, 4286, 4830, 29898, 29879, 7503, 524, 29898, 29876, 29918, 29896, 29897, 1402, 269, 14352, 524, 29898, 29876, 29918, 29906, 1125, 2314, 13, 13, 13, 1753, 22821, 29945, 29898, 1445, 29918, 2084, 1125, 13, 1678, 1053, 6608, 1982, 13, 1678, 396, 736, 6608, 1982, 29889, 3487, 29945, 29898, 3150, 29898, 29888, 978, 29892, 525, 6050, 2824, 949, 16655, 20970, 7501, 342, 580, 13, 1678, 6608, 29918, 3487, 29945, 353, 6608, 1982, 29889, 3487, 29945, 580, 13, 1678, 411, 1722, 29898, 1445, 29918, 2084, 29892, 376, 6050, 1159, 408, 285, 29901, 13, 4706, 363, 19875, 297, 4256, 29898, 2892, 29901, 285, 29889, 949, 29898, 29946, 29900, 29929, 29953, 511, 289, 15945, 1125, 13, 9651, 6608, 29918, 3487, 29945, 29889, 5504, 29898, 29812, 29897, 13, 1678, 736, 6608, 29918, 3487, 29945, 29889, 20970, 7501, 342, 580, 13, 13, 13, 1753, 21092, 29898, 978, 1125, 13, 1678, 736, 8814, 29918, 11108, 295, 29918, 4878, 29898, 978, 467, 17010, 2141, 6506, 703, 9162, 11119, 1159, 13, 13, 13, 1753, 679, 29918, 1445, 29918, 978, 29898, 1445, 29918, 2084, 1125, 13, 1678, 736, 2897, 29889, 2084, 29889, 23579, 568, 486, 29898, 359, 29889, 2084, 29889, 6500, 3871, 29898, 1445, 29918, 2084, 876, 29961, 29900, 29962, 13, 13, 13, 1753, 975, 24040, 29898, 5696, 1125, 13, 1678, 396, 2869, 508, 29915, 29873, 437, 445, 1363, 263, 1158, 338, 2289, 925, 263, 740, 1550, 2768, 263, 770, 822, 29915, 29876, 13, 1678, 396, 9294, 29898, 1144, 1103, 29889, 1608, 959, 29898, 5696, 876, 13, 13, 1678, 5096, 353, 16096, 29889, 1429, 580, 13, 1678, 2967, 29918, 13203, 353, 337, 29889, 4478, 29898, 29878, 29915, 1990, 29889, 3124, 3552, 29889, 29974, 2144, 2144, 29879, 17710, 29901, 742, 5096, 29961, 29906, 3816, 29946, 3816, 29900, 14664, 2972, 29898, 29896, 29897, 13, 13, 1678, 396, 4386, 2999, 20328, 13, 1678, 2967, 29918, 13203, 353, 518, 29879, 29889, 17010, 580, 363, 269, 297, 2967, 29918, 13203, 29889, 5451, 29317, 1495, 29962, 13, 1678, 565, 451, 2967, 29918, 13203, 29901, 13, 4706, 12020, 7865, 2392, 877, 957, 24040, 10200, 1061, 29901, 9368, 304, 8161, 2967, 770, 1495, 13, 13, 1678, 396, 5096, 29961, 29900, 13192, 957, 24040, 29892, 5096, 29961, 29896, 13192, 26102, 770, 822, 29915, 29876, 29892, 5096, 29961, 29906, 13192, 449, 2975, 770, 822, 29915, 29876, 13, 1678, 10723, 29918, 1990, 29918, 2997, 29879, 353, 5096, 29961, 29906, 3816, 29900, 1822, 29888, 29918, 2997, 29879, 13, 13, 1678, 396, 5191, 1269, 770, 1024, 297, 2967, 29918, 13203, 411, 278, 3935, 770, 1134, 13, 1678, 363, 474, 29892, 2967, 29918, 1990, 297, 26985, 29898, 3188, 29918, 13203, 1125, 13, 13, 4706, 565, 525, 6169, 451, 297, 2967, 29918, 1990, 29901, 13, 9651, 2967, 29918, 13203, 29961, 29875, 29962, 353, 10723, 29918, 1990, 29918, 2997, 29879, 29961, 3188, 29918, 1990, 29962, 13, 13, 4706, 1683, 29901, 13, 9651, 7117, 353, 2967, 29918, 1990, 29889, 5451, 12839, 1495, 13, 13, 9651, 396, 5446, 338, 2845, 263, 3883, 470, 263, 770, 13, 9651, 5446, 353, 10723, 29918, 1990, 29918, 2997, 29879, 29961, 14036, 29961, 29900, 5262, 13, 13, 9651, 363, 274, 297, 7117, 29961, 29896, 29901, 5387, 13, 18884, 4974, 29898, 1144, 1103, 29889, 275, 5453, 29898, 5415, 29897, 470, 16096, 29889, 275, 1990, 29898, 5415, 876, 13, 18884, 5446, 353, 679, 5552, 29898, 5415, 29892, 274, 29897, 13, 13, 9651, 2967, 29918, 13203, 29961, 29875, 29962, 353, 5446, 13, 13, 1678, 4974, 29898, 738, 29898, 756, 5552, 29898, 25932, 29892, 1158, 17255, 978, 1649, 29897, 363, 1067, 29879, 297, 2967, 29918, 13203, 1723, 1723, 13, 1678, 736, 1158, 13, 2 ]
cms_people/urls/people.py
python-spain/djangocms-people
1
50339
from django.conf.urls import url from cms_people.views.people import PersonView, PeopleView, PeopleMapResultView urlpatterns = [ url('^people_map_result$', PeopleMapResultView.as_view(), name='people_map_result'), url('^(?P<username>.+)$', PersonView.as_view(), name='person'), url('^$', PeopleView.as_view(), name='people'), ]
[ 1, 515, 9557, 29889, 5527, 29889, 26045, 1053, 3142, 13, 13, 3166, 274, 1516, 29918, 25719, 29889, 7406, 29889, 25719, 1053, 5196, 1043, 29892, 11647, 1043, 29892, 11647, 3388, 3591, 1043, 13, 13, 2271, 11037, 29879, 353, 518, 13, 1678, 3142, 877, 29985, 25719, 29918, 1958, 29918, 2914, 29938, 742, 11647, 3388, 3591, 1043, 29889, 294, 29918, 1493, 3285, 1024, 2433, 25719, 29918, 1958, 29918, 2914, 5477, 13, 1678, 3142, 877, 29985, 10780, 29925, 29966, 6786, 15513, 29974, 1262, 742, 5196, 1043, 29889, 294, 29918, 1493, 3285, 1024, 2433, 10532, 5477, 13, 1678, 3142, 877, 29985, 29938, 742, 11647, 1043, 29889, 294, 29918, 1493, 3285, 1024, 2433, 25719, 5477, 13, 29962, 2 ]
services/stats.py
cybersturmer/findragon-core-api
1
114783
<reponame>cybersturmer/findragon-core-api from eod import EodHistoricalData from fastapi import ( Depends ) from sqlalchemy.orm import Session from database import get_session from settings import settings from typing import TypedDict class AssetTotalStats(TypedDict): id: int code: str price: float amount: int total_purchase_cost: float total_market_price: float portfolio_change: float portfolio_change_p: float change: float change_p: float class Stats: def __init__(self, orm_session: Session = Depends(get_session)): self.orm_session = orm_session def get_assets_stats(self): # Check if this SQL works for Postgres / Aurora # @todo only for current portfolio and maybe user transactions_list = \ self.orm_session \ .execute( "SELECT portfolio_assets.id, portfolio_assets.ticker || '.' || portfolio_assets.exchange as code, " "SUM(portfolio_transactions.amount_change) AS amount, " "SUM(portfolio_transactions.cost_change) AS total_purchase " "FROM portfolio_transactions, portfolio_assets " "WHERE portfolio_assets.id == portfolio_transactions.asset_id " "GROUP BY portfolio_transactions.asset_id" ) asset_query_list = [] mapping_list = {} response_data = {} for row in transactions_list: _asset_id, _code, _amount, _total_purchase_cost = row asset = AssetTotalStats( id=_asset_id, code=_code, price=0.0, amount=_amount, total_purchase_cost=_total_purchase_cost, total_market_price=0.0, portfolio_change=0.0, portfolio_change_p=0.0, change=0.0, change_p=0.0 ) mapping_list[_code] = _asset_id asset_query_list.append(_code) response_data[_asset_id] = asset separator = ',' asset_query = separator.join(asset_query_list) client = EodHistoricalData(settings.eod.api_token) eod_response = client.get_prices_live(asset_query) eod_response_wrapped = eod_response if type(eod_response) == list else [eod_response] eod_data_for_asset: dict for eod_data_for_asset in eod_response_wrapped: _code = eod_data_for_asset['code'] _asset_id = mapping_list[_code] _price = float(eod_data_for_asset['previousClose']) _total_market_price = _price * response_data[_asset_id]['amount'] _total_purchase_cost = response_data[_asset_id]['total_purchase_cost'] _total_diff = _total_market_price - _total_purchase_cost _total_ratio = _total_diff / _total_purchase_cost * 100 response_data[_asset_id]['portfolio_change'] = _total_diff response_data[_asset_id]['portfolio_change_p'] = _total_ratio response_data[_asset_id]['price'] = _price response_data[_asset_id]['total_market_price'] = _total_market_price response_data[_asset_id]['change'] = eod_data_for_asset['change'] response_data[_asset_id]['change_p'] = eod_data_for_asset['change_p'] return list(response_data.values()) def get_total_income_stats(self): pass
[ 1, 529, 276, 1112, 420, 29958, 1270, 495, 303, 332, 1050, 29914, 2886, 1431, 265, 29899, 3221, 29899, 2754, 13, 3166, 321, 397, 1053, 382, 397, 29950, 2118, 936, 1469, 13, 3166, 5172, 2754, 1053, 313, 13, 1678, 10034, 1975, 13, 29897, 13, 3166, 4576, 284, 305, 6764, 29889, 555, 1053, 16441, 13, 13, 3166, 2566, 1053, 679, 29918, 7924, 13, 3166, 6055, 1053, 6055, 13, 3166, 19229, 1053, 14213, 287, 21533, 13, 13, 13, 1990, 1094, 842, 11536, 25060, 29898, 24933, 287, 21533, 1125, 13, 1678, 1178, 29901, 938, 13, 1678, 775, 29901, 851, 13, 1678, 8666, 29901, 5785, 13, 1678, 5253, 29901, 938, 13, 13, 1678, 3001, 29918, 29886, 27574, 29918, 18253, 29901, 5785, 13, 1678, 3001, 29918, 28549, 29918, 9175, 29901, 5785, 13, 13, 1678, 2011, 25648, 29918, 3167, 29901, 5785, 13, 1678, 2011, 25648, 29918, 3167, 29918, 29886, 29901, 5785, 13, 13, 1678, 1735, 29901, 5785, 13, 1678, 1735, 29918, 29886, 29901, 5785, 13, 13, 13, 1990, 624, 1446, 29901, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 470, 29885, 29918, 7924, 29901, 16441, 353, 10034, 1975, 29898, 657, 29918, 7924, 22164, 13, 4706, 1583, 29889, 555, 29918, 7924, 353, 470, 29885, 29918, 7924, 13, 13, 1678, 822, 679, 29918, 16596, 29918, 16202, 29898, 1311, 1125, 13, 4706, 396, 5399, 565, 445, 3758, 1736, 363, 4918, 7201, 847, 23266, 2207, 13, 4706, 396, 732, 29873, 8144, 871, 363, 1857, 2011, 25648, 322, 5505, 1404, 13, 4706, 22160, 29918, 1761, 353, 320, 13, 9651, 1583, 29889, 555, 29918, 7924, 320, 13, 9651, 869, 7978, 29898, 13, 18884, 376, 6404, 2011, 25648, 29918, 16596, 29889, 333, 29892, 2011, 25648, 29918, 16596, 29889, 29873, 6541, 3830, 525, 6169, 3830, 2011, 25648, 29918, 16596, 29889, 6543, 408, 775, 29892, 376, 13, 18884, 376, 25021, 29898, 637, 25648, 29918, 3286, 7387, 29889, 14506, 29918, 3167, 29897, 3339, 5253, 29892, 376, 13, 18884, 376, 25021, 29898, 637, 25648, 29918, 3286, 7387, 29889, 18253, 29918, 3167, 29897, 3339, 3001, 29918, 29886, 27574, 376, 13, 18884, 376, 21482, 2011, 25648, 29918, 3286, 7387, 29892, 2011, 25648, 29918, 16596, 376, 13, 18884, 376, 22043, 2011, 25648, 29918, 16596, 29889, 333, 1275, 2011, 25648, 29918, 3286, 7387, 29889, 24129, 29918, 333, 376, 13, 18884, 376, 26284, 6770, 2011, 25648, 29918, 3286, 7387, 29889, 24129, 29918, 333, 29908, 13, 9651, 1723, 13, 13, 4706, 24342, 29918, 1972, 29918, 1761, 353, 5159, 13, 4706, 10417, 29918, 1761, 353, 6571, 13, 13, 4706, 2933, 29918, 1272, 353, 6571, 13, 13, 4706, 363, 1948, 297, 22160, 29918, 1761, 29901, 13, 9651, 903, 24129, 29918, 333, 29892, 903, 401, 29892, 903, 14506, 29892, 903, 7827, 29918, 29886, 27574, 29918, 18253, 353, 1948, 13, 9651, 24342, 353, 1094, 842, 11536, 25060, 29898, 13, 18884, 1178, 29922, 29918, 24129, 29918, 333, 29892, 13, 18884, 775, 29922, 29918, 401, 29892, 13, 18884, 8666, 29922, 29900, 29889, 29900, 29892, 13, 18884, 5253, 29922, 29918, 14506, 29892, 13, 18884, 3001, 29918, 29886, 27574, 29918, 18253, 29922, 29918, 7827, 29918, 29886, 27574, 29918, 18253, 29892, 13, 18884, 3001, 29918, 28549, 29918, 9175, 29922, 29900, 29889, 29900, 29892, 13, 18884, 2011, 25648, 29918, 3167, 29922, 29900, 29889, 29900, 29892, 13, 18884, 2011, 25648, 29918, 3167, 29918, 29886, 29922, 29900, 29889, 29900, 29892, 13, 18884, 1735, 29922, 29900, 29889, 29900, 29892, 13, 18884, 1735, 29918, 29886, 29922, 29900, 29889, 29900, 13, 9651, 1723, 13, 13, 9651, 10417, 29918, 1761, 28513, 401, 29962, 353, 903, 24129, 29918, 333, 13, 13, 9651, 24342, 29918, 1972, 29918, 1761, 29889, 4397, 7373, 401, 29897, 13, 13, 9651, 2933, 29918, 1272, 28513, 24129, 29918, 333, 29962, 353, 24342, 13, 13, 4706, 28128, 353, 525, 5501, 13, 4706, 24342, 29918, 1972, 353, 28128, 29889, 7122, 29898, 24129, 29918, 1972, 29918, 1761, 29897, 13, 13, 4706, 3132, 353, 382, 397, 29950, 2118, 936, 1469, 29898, 11027, 29889, 29872, 397, 29889, 2754, 29918, 6979, 29897, 13, 4706, 321, 397, 29918, 5327, 353, 3132, 29889, 657, 29918, 558, 1575, 29918, 9258, 29898, 24129, 29918, 1972, 29897, 13, 13, 4706, 321, 397, 29918, 5327, 29918, 29893, 336, 2986, 353, 321, 397, 29918, 5327, 565, 1134, 29898, 29872, 397, 29918, 5327, 29897, 1275, 1051, 1683, 518, 29872, 397, 29918, 5327, 29962, 13, 13, 4706, 321, 397, 29918, 1272, 29918, 1454, 29918, 24129, 29901, 9657, 13, 4706, 363, 321, 397, 29918, 1272, 29918, 1454, 29918, 24129, 297, 321, 397, 29918, 5327, 29918, 29893, 336, 2986, 29901, 13, 13, 9651, 903, 401, 353, 321, 397, 29918, 1272, 29918, 1454, 29918, 24129, 1839, 401, 2033, 13, 9651, 903, 24129, 29918, 333, 353, 10417, 29918, 1761, 28513, 401, 29962, 13, 13, 9651, 903, 9175, 353, 5785, 29898, 29872, 397, 29918, 1272, 29918, 1454, 29918, 24129, 1839, 24957, 11123, 11287, 13, 13, 9651, 903, 7827, 29918, 28549, 29918, 9175, 353, 903, 9175, 334, 2933, 29918, 1272, 28513, 24129, 29918, 333, 22322, 14506, 2033, 13, 13, 9651, 903, 7827, 29918, 29886, 27574, 29918, 18253, 353, 2933, 29918, 1272, 28513, 24129, 29918, 333, 22322, 7827, 29918, 29886, 27574, 29918, 18253, 2033, 13, 13, 9651, 903, 7827, 29918, 12765, 353, 903, 7827, 29918, 28549, 29918, 9175, 448, 903, 7827, 29918, 29886, 27574, 29918, 18253, 13, 9651, 903, 7827, 29918, 3605, 601, 353, 903, 7827, 29918, 12765, 847, 903, 7827, 29918, 29886, 27574, 29918, 18253, 334, 29871, 29896, 29900, 29900, 13, 13, 9651, 2933, 29918, 1272, 28513, 24129, 29918, 333, 22322, 637, 25648, 29918, 3167, 2033, 353, 903, 7827, 29918, 12765, 13, 9651, 2933, 29918, 1272, 28513, 24129, 29918, 333, 22322, 637, 25648, 29918, 3167, 29918, 29886, 2033, 353, 903, 7827, 29918, 3605, 601, 13, 13, 9651, 2933, 29918, 1272, 28513, 24129, 29918, 333, 22322, 9175, 2033, 353, 903, 9175, 13, 13, 9651, 2933, 29918, 1272, 28513, 24129, 29918, 333, 22322, 7827, 29918, 28549, 29918, 9175, 2033, 353, 903, 7827, 29918, 28549, 29918, 9175, 13, 13, 9651, 2933, 29918, 1272, 28513, 24129, 29918, 333, 22322, 3167, 2033, 353, 321, 397, 29918, 1272, 29918, 1454, 29918, 24129, 1839, 3167, 2033, 13, 9651, 2933, 29918, 1272, 28513, 24129, 29918, 333, 22322, 3167, 29918, 29886, 2033, 353, 321, 397, 29918, 1272, 29918, 1454, 29918, 24129, 1839, 3167, 29918, 29886, 2033, 13, 13, 4706, 736, 1051, 29898, 5327, 29918, 1272, 29889, 5975, 3101, 13, 13, 1678, 822, 679, 29918, 7827, 29918, 262, 2763, 29918, 16202, 29898, 1311, 1125, 13, 4706, 1209, 13, 2 ]
nova/virt/hyperv/driver.py
bopopescu/stacklab-nova
0
70292
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2010 Cloud.com, Inc # Copyright (c) 2012 Cloudbase Solutions Srl # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. """ A connection to Hyper-V . Uses Windows Management Instrumentation (WMI) calls to interact with Hyper-V Hyper-V WMI usage: http://msdn.microsoft.com/en-us/library/cc723875%28v=VS.85%29.aspx The Hyper-V object model briefly: The physical computer and its hosted virtual machines are each represented by the Msvm_ComputerSystem class. Each virtual machine is associated with a Msvm_VirtualSystemGlobalSettingData (vs_gs_data) instance and one or more Msvm_VirtualSystemSettingData (vmsetting) instances. For each vmsetting there is a series of Msvm_ResourceAllocationSettingData (rasd) objects. The rasd objects describe the settings for each device in a VM. Together, the vs_gs_data, vmsettings and rasds describe the configuration of the virtual machine. Creating new resources such as disks and nics involves cloning a default rasd object and appropriately modifying the clone and calling the AddVirtualSystemResources WMI method Changing resources such as memory uses the ModifyVirtualSystemResources WMI method Using the Python WMI library: Tutorial: http://timgolden.me.uk/python/wmi/tutorial.html Hyper-V WMI objects can be retrieved simply by using the class name of the WMI object and optionally specifying a column to filter the result set. More complex filters can be formed using WQL (sql-like) queries. The parameters and return tuples of WMI method calls can gleaned by examining the doc string. For example: >>> vs_man_svc.ModifyVirtualSystemResources.__doc__ ModifyVirtualSystemResources (ComputerSystem, ResourceSettingData[]) => (Job, ReturnValue)' When passing setting data (ResourceSettingData) to the WMI method, an XML representation of the data is passed in using GetText_(1). Available methods on a service can be determined using method.keys(): >>> vs_man_svc.methods.keys() vmsettings and rasds for a vm can be retrieved using the 'associators' method with the appropriate return class. Long running WMI commands generally return a Job (an instance of Msvm_ConcreteJob) whose state can be polled to determine when it finishes """ from nova.openstack.common import log as logging from nova.virt import driver from nova.virt.hyperv import livemigrationops from nova.virt.hyperv import snapshotops from nova.virt.hyperv import vmops from nova.virt.hyperv import volumeops LOG = logging.getLogger(__name__) class HyperVDriver(driver.ComputeDriver): def __init__(self): super(HyperVDriver, self).__init__() self._volumeops = volumeops.VolumeOps() self._vmops = vmops.VMOps(self._volumeops) self._snapshotops = snapshotops.SnapshotOps() self._livemigrationops = livemigrationops.LiveMigrationOps( self._volumeops) def init_host(self, host): self._host = host def list_instances(self): return self._vmops.list_instances() def spawn(self, context, instance, image_meta, injected_files, admin_password, network_info=None, block_device_info=None): self._vmops.spawn(context, instance, image_meta, network_info, block_device_info) def reboot(self, instance, network_info, reboot_type, block_device_info=None): self._vmops.reboot(instance, network_info, reboot_type) def destroy(self, instance, network_info=None, cleanup=True): self._vmops.destroy(instance, network_info, cleanup) def get_info(self, instance): return self._vmops.get_info(instance) def attach_volume(self, connection_info, instance_name, mountpoint): """Attach volume storage to VM instance""" return self._volumeops.attach_volume(connection_info, instance_name, mountpoint) def detach_volume(self, connection_info, instance_name, mountpoint): """Detach volume storage to VM instance""" return self._volumeops.detach_volume(connection_info, instance_name, mountpoint) def get_volume_connector(self, instance): return self._volumeops.get_volume_connector(instance) def poll_rescued_instances(self, timeout): pass def get_available_resource(self): return self._vmops.get_available_resource() def update_host_status(self): """See xenapi_conn.py implementation.""" pass def get_host_stats(self, refresh=False): """See xenapi_conn.py implementation.""" return {} def host_power_action(self, host, action): """Reboots, shuts down or powers up the host.""" pass def set_host_enabled(self, host, enabled): """Sets the specified host's ability to accept new instances.""" pass def snapshot(self, context, instance, name): self._snapshotops.snapshot(context, instance, name) def pause(self, instance): self._vmops.pause(instance) def unpause(self, instance): self._vmops.unpause(instance) def suspend(self, instance): self._vmops.suspend(instance) def resume(self, instance): self._vmops.resume(instance) def power_off(self, instance): self._vmops.power_off(instance) def power_on(self, instance): self._vmops.power_on(instance) def live_migration(self, context, instance_ref, dest, post_method, recover_method, block_migration=False): self._livemigrationops.live_migration(context, instance_ref, dest, post_method, recover_method, block_migration) def compare_cpu(self, cpu_info): return self._livemigrationops.compare_cpu(cpu_info) def pre_live_migration(self, context, instance, block_device_info, network_info): self._livemigrationops.pre_live_migration(context, instance, block_device_info, network_info) def post_live_migration_at_destination(self, ctxt, instance_ref, network_info, block_migration): self._livemigrationops.post_live_migration_at_destination(ctxt, instance_ref, network_info, block_migration) def check_can_live_migrate_destination(self, ctxt, instance, block_migration, disk_over_commit): pass def check_can_live_migrate_destination_cleanup(self, ctxt, dest_check_data): pass def check_can_live_migrate_source(self, ctxt, instance, dest_check_data): pass def plug_vifs(self, instance, network_info): LOG.debug(_("plug_vifs called"), instance=instance) def unplug_vifs(self, instance, network_info): LOG.debug(_("plug_vifs called"), instance=instance) def ensure_filtering_rules_for_instance(self, instance_ref, network_info): LOG.debug(_("ensure_filtering_rules_for_instance called"), instance=instance_ref) def unfilter_instance(self, instance, network_info): """Stop filtering instance""" LOG.debug(_("unfilter_instance called"), instance=instance) def confirm_migration(self, migration, instance, network_info): """Confirms a resize, destroying the source VM""" LOG.debug(_("confirm_migration called"), instance=instance) def finish_revert_migration(self, instance, network_info, block_device_info=None): """Finish reverting a resize, powering back on the instance""" LOG.debug(_("finish_revert_migration called"), instance=instance) def finish_migration(self, context, migration, instance, disk_info, network_info, image_meta, resize_instance=False, block_device_info=None): """Completes a resize, turning on the migrated instance""" LOG.debug(_("finish_migration called"), instance=instance) def get_console_output(self, instance): LOG.debug(_("get_console_output called"), instance=instance) return '' def legacy_nwinfo(self): return False
[ 1, 396, 325, 326, 29901, 4434, 9847, 29922, 29946, 9500, 2103, 29922, 29946, 4964, 3891, 9847, 29922, 29946, 13, 13, 29937, 14187, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29896, 29900, 14293, 29889, 510, 29892, 9266, 13, 29937, 14187, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29896, 29906, 2233, 283, 2585, 559, 4956, 17925, 317, 2096, 13, 29937, 13, 29937, 1678, 10413, 21144, 1090, 278, 13380, 19245, 29892, 10079, 29871, 29906, 29889, 29900, 313, 1552, 376, 29931, 293, 1947, 1496, 366, 1122, 13, 29937, 1678, 451, 671, 445, 934, 5174, 297, 752, 13036, 411, 278, 19245, 29889, 887, 1122, 4017, 13, 29937, 1678, 263, 3509, 310, 278, 19245, 472, 13, 29937, 13, 29937, 308, 1732, 597, 1636, 29889, 4288, 29889, 990, 29914, 506, 11259, 29914, 27888, 1430, 1660, 29899, 29906, 29889, 29900, 13, 29937, 13, 29937, 1678, 25870, 3734, 491, 22903, 4307, 470, 15502, 304, 297, 5007, 29892, 7047, 13, 29937, 1678, 13235, 1090, 278, 19245, 338, 13235, 373, 385, 376, 3289, 8519, 29908, 350, 3289, 3235, 29892, 399, 1806, 8187, 2692, 13, 29937, 1678, 399, 1718, 29934, 13566, 29059, 6323, 8707, 29928, 22122, 29903, 8079, 13764, 29979, 476, 22255, 29892, 2845, 4653, 470, 2411, 2957, 29889, 2823, 278, 13, 29937, 1678, 19245, 363, 278, 2702, 4086, 14765, 1076, 11239, 322, 27028, 13, 29937, 1678, 1090, 278, 19245, 29889, 13, 13, 15945, 29908, 13, 29909, 3957, 304, 26078, 29899, 29963, 869, 13, 15922, 267, 3852, 15057, 2799, 15461, 362, 313, 29956, 10403, 29897, 5717, 304, 16254, 411, 26078, 29899, 29963, 13, 26322, 546, 29899, 29963, 399, 10403, 8744, 29901, 13, 1678, 1732, 597, 8319, 29889, 4994, 29889, 510, 29914, 264, 29899, 375, 29914, 5258, 29914, 617, 29955, 29906, 29941, 29947, 29955, 29945, 29995, 29906, 29947, 29894, 29922, 21819, 29889, 29947, 29945, 29995, 29906, 29929, 29889, 6307, 13, 1576, 26078, 29899, 29963, 1203, 1904, 23359, 29901, 13, 1678, 450, 9128, 6601, 322, 967, 17791, 6901, 14884, 526, 1269, 9875, 13, 1678, 491, 278, 341, 4501, 29885, 29918, 20606, 261, 3924, 770, 29889, 13, 13, 1678, 7806, 6901, 4933, 338, 6942, 411, 263, 13, 1678, 341, 4501, 29885, 29918, 21287, 3924, 12756, 29020, 1469, 313, 4270, 29918, 3174, 29918, 1272, 29897, 2777, 322, 697, 470, 901, 13, 1678, 341, 4501, 29885, 29918, 21287, 3924, 29020, 1469, 313, 6925, 26740, 29897, 8871, 29889, 1152, 1269, 22419, 26740, 13, 1678, 727, 338, 263, 3652, 310, 341, 4501, 29885, 29918, 6848, 2499, 5479, 29020, 1469, 313, 3417, 29881, 29897, 3618, 29889, 13, 1678, 450, 22641, 29881, 3618, 8453, 278, 6055, 363, 1269, 4742, 297, 263, 11400, 29889, 13, 1678, 323, 12966, 29892, 278, 7186, 29918, 3174, 29918, 1272, 29892, 22419, 11027, 322, 22641, 6289, 8453, 278, 5285, 13, 1678, 310, 278, 6901, 4933, 29889, 13, 13, 1678, 26221, 716, 7788, 1316, 408, 766, 2039, 322, 302, 1199, 20789, 1067, 28259, 263, 2322, 13, 1678, 22641, 29881, 1203, 322, 7128, 2486, 23815, 278, 17432, 322, 5432, 278, 13, 1678, 3462, 21287, 3924, 13770, 399, 10403, 1158, 13, 1678, 678, 9776, 7788, 1316, 408, 3370, 3913, 278, 3382, 1598, 21287, 3924, 13770, 13, 1678, 399, 10403, 1158, 13, 13, 15156, 278, 5132, 399, 10403, 3489, 29901, 13, 1678, 323, 6072, 29901, 13, 4706, 1732, 597, 29873, 2492, 1025, 264, 29889, 1004, 29889, 2679, 29914, 4691, 29914, 29893, 2460, 29914, 12631, 29889, 1420, 13, 1678, 26078, 29899, 29963, 399, 10403, 3618, 508, 367, 27387, 3763, 491, 773, 278, 770, 1024, 13, 1678, 310, 278, 399, 10403, 1203, 322, 2984, 635, 22146, 263, 1897, 304, 4175, 278, 13, 1678, 1121, 731, 29889, 5853, 4280, 18094, 508, 367, 8429, 773, 399, 2239, 313, 2850, 29899, 4561, 29897, 13, 1678, 9365, 29889, 13, 1678, 450, 4128, 322, 736, 5291, 2701, 310, 399, 10403, 1158, 5717, 508, 330, 14044, 287, 491, 13, 1678, 4392, 2827, 278, 1574, 1347, 29889, 1152, 1342, 29901, 13, 1678, 8653, 7186, 29918, 1171, 29918, 4501, 29883, 29889, 2111, 1598, 21287, 3924, 13770, 17255, 1514, 1649, 13, 1678, 3382, 1598, 21287, 3924, 13770, 313, 20606, 261, 3924, 29892, 18981, 29020, 1469, 23076, 13, 462, 1149, 313, 11947, 29892, 7106, 1917, 16029, 13, 1678, 1932, 6819, 4444, 848, 313, 6848, 29020, 1469, 29897, 304, 278, 399, 10403, 1158, 29892, 13, 1678, 385, 6560, 8954, 310, 278, 848, 338, 4502, 297, 773, 3617, 1626, 23538, 29896, 467, 13, 1678, 7740, 3106, 3519, 373, 263, 2669, 508, 367, 10087, 773, 1158, 29889, 8149, 7295, 13, 1678, 8653, 7186, 29918, 1171, 29918, 4501, 29883, 29889, 23515, 29889, 8149, 580, 13, 1678, 22419, 11027, 322, 22641, 6289, 363, 263, 22419, 508, 367, 27387, 773, 278, 525, 21264, 4097, 29915, 13, 1678, 1158, 411, 278, 8210, 736, 770, 29889, 13, 1678, 6242, 2734, 399, 10403, 8260, 6892, 736, 263, 17163, 313, 273, 2777, 310, 13, 1678, 341, 4501, 29885, 29918, 1168, 9084, 11947, 29897, 5069, 2106, 508, 367, 1248, 839, 304, 8161, 746, 372, 8341, 267, 13, 13, 15945, 29908, 13, 13, 3166, 26121, 29889, 3150, 1429, 29889, 9435, 1053, 1480, 408, 12183, 13, 3166, 26121, 29889, 15389, 1053, 7156, 13, 3166, 26121, 29889, 15389, 29889, 24947, 29894, 1053, 7294, 331, 16783, 3554, 13, 3166, 26121, 29889, 15389, 29889, 24947, 29894, 1053, 22395, 3554, 13, 3166, 26121, 29889, 15389, 29889, 24947, 29894, 1053, 22419, 3554, 13, 3166, 26121, 29889, 15389, 29889, 24947, 29894, 1053, 7977, 3554, 13, 13, 14480, 353, 12183, 29889, 657, 16363, 22168, 978, 1649, 29897, 13, 13, 13, 1990, 26078, 10699, 3511, 29898, 9465, 29889, 20606, 29872, 12376, 1125, 13, 1678, 822, 4770, 2344, 12035, 1311, 1125, 13, 4706, 2428, 29898, 26322, 546, 10699, 3511, 29892, 1583, 467, 1649, 2344, 1649, 580, 13, 13, 4706, 1583, 3032, 24623, 3554, 353, 7977, 3554, 29889, 24679, 29949, 567, 580, 13, 4706, 1583, 3032, 6925, 3554, 353, 22419, 3554, 29889, 29963, 6720, 567, 29898, 1311, 3032, 24623, 3554, 29897, 13, 4706, 1583, 3032, 29879, 14551, 3554, 353, 22395, 3554, 29889, 21913, 29949, 567, 580, 13, 4706, 1583, 3032, 17843, 331, 16783, 3554, 353, 7294, 331, 16783, 3554, 29889, 23859, 29924, 16783, 29949, 567, 29898, 13, 9651, 1583, 3032, 24623, 3554, 29897, 13, 13, 1678, 822, 2069, 29918, 3069, 29898, 1311, 29892, 3495, 1125, 13, 4706, 1583, 3032, 3069, 353, 3495, 13, 13, 1678, 822, 1051, 29918, 2611, 2925, 29898, 1311, 1125, 13, 4706, 736, 1583, 3032, 6925, 3554, 29889, 1761, 29918, 2611, 2925, 580, 13, 13, 1678, 822, 29178, 29898, 1311, 29892, 3030, 29892, 2777, 29892, 1967, 29918, 7299, 29892, 11658, 287, 29918, 5325, 29892, 13, 795, 4113, 29918, 5630, 29892, 3564, 29918, 3888, 29922, 8516, 29892, 2908, 29918, 10141, 29918, 3888, 29922, 8516, 1125, 13, 4706, 1583, 3032, 6925, 3554, 29889, 1028, 18101, 29898, 4703, 29892, 2777, 29892, 1967, 29918, 7299, 29892, 3564, 29918, 3888, 29892, 13, 9651, 2908, 29918, 10141, 29918, 3888, 29897, 13, 13, 1678, 822, 22538, 29898, 1311, 29892, 2777, 29892, 3564, 29918, 3888, 29892, 22538, 29918, 1853, 29892, 13, 1669, 2908, 29918, 10141, 29918, 3888, 29922, 8516, 1125, 13, 4706, 1583, 3032, 6925, 3554, 29889, 276, 4777, 29898, 8758, 29892, 3564, 29918, 3888, 29892, 22538, 29918, 1853, 29897, 13, 13, 1678, 822, 8174, 29898, 1311, 29892, 2777, 29892, 3564, 29918, 3888, 29922, 8516, 29892, 5941, 786, 29922, 5574, 1125, 13, 4706, 1583, 3032, 6925, 3554, 29889, 20524, 29898, 8758, 29892, 3564, 29918, 3888, 29892, 5941, 786, 29897, 13, 13, 1678, 822, 679, 29918, 3888, 29898, 1311, 29892, 2777, 1125, 13, 4706, 736, 1583, 3032, 6925, 3554, 29889, 657, 29918, 3888, 29898, 8758, 29897, 13, 13, 1678, 822, 10641, 29918, 24623, 29898, 1311, 29892, 3957, 29918, 3888, 29892, 2777, 29918, 978, 29892, 5766, 3149, 1125, 13, 4706, 9995, 4165, 496, 7977, 8635, 304, 11400, 2777, 15945, 29908, 13, 4706, 736, 1583, 3032, 24623, 3554, 29889, 14930, 29918, 24623, 29898, 9965, 29918, 3888, 29892, 13, 462, 462, 632, 2777, 29918, 978, 29892, 13, 462, 462, 632, 5766, 3149, 29897, 13, 13, 1678, 822, 1439, 496, 29918, 24623, 29898, 1311, 29892, 3957, 29918, 3888, 29892, 2777, 29918, 978, 29892, 5766, 3149, 1125, 13, 4706, 9995, 6362, 496, 7977, 8635, 304, 11400, 2777, 15945, 29908, 13, 4706, 736, 1583, 3032, 24623, 3554, 29889, 4801, 496, 29918, 24623, 29898, 9965, 29918, 3888, 29892, 13, 462, 462, 632, 2777, 29918, 978, 29892, 13, 462, 462, 632, 5766, 3149, 29897, 13, 13, 1678, 822, 679, 29918, 24623, 29918, 11958, 2801, 29898, 1311, 29892, 2777, 1125, 13, 4706, 736, 1583, 3032, 24623, 3554, 29889, 657, 29918, 24623, 29918, 11958, 2801, 29898, 8758, 29897, 13, 13, 1678, 822, 21180, 29918, 690, 4979, 287, 29918, 2611, 2925, 29898, 1311, 29892, 11815, 1125, 13, 4706, 1209, 13, 13, 1678, 822, 679, 29918, 16515, 29918, 10314, 29898, 1311, 1125, 13, 4706, 736, 1583, 3032, 6925, 3554, 29889, 657, 29918, 16515, 29918, 10314, 580, 13, 13, 1678, 822, 2767, 29918, 3069, 29918, 4882, 29898, 1311, 1125, 13, 4706, 9995, 13393, 921, 264, 2754, 29918, 13082, 29889, 2272, 5314, 1213, 15945, 13, 4706, 1209, 13, 13, 1678, 822, 679, 29918, 3069, 29918, 16202, 29898, 1311, 29892, 11086, 29922, 8824, 1125, 13, 4706, 9995, 13393, 921, 264, 2754, 29918, 13082, 29889, 2272, 5314, 1213, 15945, 13, 4706, 736, 6571, 13, 13, 1678, 822, 3495, 29918, 13519, 29918, 2467, 29898, 1311, 29892, 3495, 29892, 3158, 1125, 13, 4706, 9995, 29934, 774, 29877, 1862, 29892, 528, 8842, 1623, 470, 10801, 701, 278, 3495, 1213, 15945, 13, 4706, 1209, 13, 13, 1678, 822, 731, 29918, 3069, 29918, 17590, 29898, 1311, 29892, 3495, 29892, 9615, 1125, 13, 4706, 9995, 29903, 1691, 278, 6790, 3495, 29915, 29879, 11509, 304, 3544, 716, 8871, 1213, 15945, 13, 4706, 1209, 13, 13, 1678, 822, 22395, 29898, 1311, 29892, 3030, 29892, 2777, 29892, 1024, 1125, 13, 4706, 1583, 3032, 29879, 14551, 3554, 29889, 29879, 14551, 29898, 4703, 29892, 2777, 29892, 1024, 29897, 13, 13, 1678, 822, 19957, 29898, 1311, 29892, 2777, 1125, 13, 4706, 1583, 3032, 6925, 3554, 29889, 29886, 1071, 29898, 8758, 29897, 13, 13, 1678, 822, 443, 29886, 1071, 29898, 1311, 29892, 2777, 1125, 13, 4706, 1583, 3032, 6925, 3554, 29889, 348, 29886, 1071, 29898, 8758, 29897, 13, 13, 1678, 822, 8872, 355, 29898, 1311, 29892, 2777, 1125, 13, 4706, 1583, 3032, 6925, 3554, 29889, 29879, 375, 14081, 29898, 8758, 29897, 13, 13, 1678, 822, 620, 2017, 29898, 1311, 29892, 2777, 1125, 13, 4706, 1583, 3032, 6925, 3554, 29889, 690, 2017, 29898, 8758, 29897, 13, 13, 1678, 822, 3081, 29918, 2696, 29898, 1311, 29892, 2777, 1125, 13, 4706, 1583, 3032, 6925, 3554, 29889, 13519, 29918, 2696, 29898, 8758, 29897, 13, 13, 1678, 822, 3081, 29918, 265, 29898, 1311, 29892, 2777, 1125, 13, 4706, 1583, 3032, 6925, 3554, 29889, 13519, 29918, 265, 29898, 8758, 29897, 13, 13, 1678, 822, 5735, 29918, 29885, 16783, 29898, 1311, 29892, 3030, 29892, 2777, 29918, 999, 29892, 2731, 29892, 1400, 29918, 5696, 29892, 13, 4706, 9792, 29918, 5696, 29892, 2908, 29918, 29885, 16783, 29922, 8824, 1125, 13, 4706, 1583, 3032, 17843, 331, 16783, 3554, 29889, 9258, 29918, 29885, 16783, 29898, 4703, 29892, 2777, 29918, 999, 29892, 2731, 29892, 13, 9651, 1400, 29918, 5696, 29892, 9792, 29918, 5696, 29892, 2908, 29918, 29885, 16783, 29897, 13, 13, 1678, 822, 7252, 29918, 21970, 29898, 1311, 29892, 26403, 29918, 3888, 1125, 13, 4706, 736, 1583, 3032, 17843, 331, 16783, 3554, 29889, 18307, 29918, 21970, 29898, 21970, 29918, 3888, 29897, 13, 13, 1678, 822, 758, 29918, 9258, 29918, 29885, 16783, 29898, 1311, 29892, 3030, 29892, 2777, 29892, 2908, 29918, 10141, 29918, 3888, 29892, 13, 4706, 3564, 29918, 3888, 1125, 13, 4706, 1583, 3032, 17843, 331, 16783, 3554, 29889, 1457, 29918, 9258, 29918, 29885, 16783, 29898, 4703, 29892, 2777, 29892, 13, 9651, 2908, 29918, 10141, 29918, 3888, 29892, 3564, 29918, 3888, 29897, 13, 13, 1678, 822, 1400, 29918, 9258, 29918, 29885, 16783, 29918, 271, 29918, 23848, 29898, 1311, 29892, 274, 3945, 29892, 2777, 29918, 999, 29892, 13, 4706, 3564, 29918, 3888, 29892, 2908, 29918, 29885, 16783, 1125, 13, 4706, 1583, 3032, 17843, 331, 16783, 3554, 29889, 2490, 29918, 9258, 29918, 29885, 16783, 29918, 271, 29918, 23848, 29898, 312, 486, 29892, 13, 9651, 2777, 29918, 999, 29892, 3564, 29918, 3888, 29892, 2908, 29918, 29885, 16783, 29897, 13, 13, 1678, 822, 1423, 29918, 3068, 29918, 9258, 29918, 26983, 403, 29918, 23848, 29898, 1311, 29892, 274, 3945, 29892, 2777, 29892, 13, 4706, 2908, 29918, 29885, 16783, 29892, 8086, 29918, 957, 29918, 15060, 1125, 13, 4706, 1209, 13, 13, 1678, 822, 1423, 29918, 3068, 29918, 9258, 29918, 26983, 403, 29918, 23848, 29918, 14941, 786, 29898, 1311, 29892, 274, 3945, 29892, 13, 4706, 2731, 29918, 3198, 29918, 1272, 1125, 13, 4706, 1209, 13, 13, 1678, 822, 1423, 29918, 3068, 29918, 9258, 29918, 26983, 403, 29918, 4993, 29898, 1311, 29892, 274, 3945, 29892, 2777, 29892, 2731, 29918, 3198, 29918, 1272, 1125, 13, 4706, 1209, 13, 13, 1678, 822, 18665, 29918, 29894, 10270, 29898, 1311, 29892, 2777, 29892, 3564, 29918, 3888, 1125, 13, 4706, 25401, 29889, 8382, 7373, 703, 572, 688, 29918, 29894, 10270, 2000, 4968, 2777, 29922, 8758, 29897, 13, 13, 1678, 822, 443, 572, 688, 29918, 29894, 10270, 29898, 1311, 29892, 2777, 29892, 3564, 29918, 3888, 1125, 13, 4706, 25401, 29889, 8382, 7373, 703, 572, 688, 29918, 29894, 10270, 2000, 4968, 2777, 29922, 8758, 29897, 13, 13, 1678, 822, 9801, 29918, 4572, 292, 29918, 19238, 29918, 1454, 29918, 8758, 29898, 1311, 29892, 2777, 29918, 999, 29892, 3564, 29918, 3888, 1125, 13, 4706, 25401, 29889, 8382, 7373, 703, 7469, 29918, 4572, 292, 29918, 19238, 29918, 1454, 29918, 8758, 2000, 4968, 13, 9651, 2777, 29922, 8758, 29918, 999, 29897, 13, 13, 1678, 822, 443, 4572, 29918, 8758, 29898, 1311, 29892, 2777, 29892, 3564, 29918, 3888, 1125, 13, 4706, 9995, 16329, 21166, 2777, 15945, 29908, 13, 4706, 25401, 29889, 8382, 7373, 703, 348, 4572, 29918, 8758, 2000, 4968, 2777, 29922, 8758, 29897, 13, 13, 1678, 822, 9659, 29918, 29885, 16783, 29898, 1311, 29892, 20332, 29892, 2777, 29892, 3564, 29918, 3888, 1125, 13, 4706, 9995, 16376, 381, 1516, 263, 19490, 29892, 8174, 292, 278, 2752, 11400, 15945, 29908, 13, 4706, 25401, 29889, 8382, 7373, 703, 26897, 29918, 29885, 16783, 2000, 4968, 2777, 29922, 8758, 29897, 13, 13, 1678, 822, 8341, 29918, 276, 1765, 29918, 29885, 16783, 29898, 1311, 29892, 2777, 29892, 3564, 29918, 3888, 29892, 13, 462, 18884, 2908, 29918, 10141, 29918, 3888, 29922, 8516, 1125, 13, 4706, 9995, 12881, 728, 24187, 1259, 263, 19490, 29892, 3081, 292, 1250, 373, 278, 2777, 15945, 29908, 13, 4706, 25401, 29889, 8382, 7373, 703, 4951, 728, 29918, 276, 1765, 29918, 29885, 16783, 2000, 4968, 2777, 29922, 8758, 29897, 13, 13, 1678, 822, 8341, 29918, 29885, 16783, 29898, 1311, 29892, 3030, 29892, 20332, 29892, 2777, 29892, 8086, 29918, 3888, 29892, 13, 4706, 3564, 29918, 3888, 29892, 1967, 29918, 7299, 29892, 19490, 29918, 8758, 29922, 8824, 29892, 13, 4706, 2908, 29918, 10141, 29918, 3888, 29922, 8516, 1125, 13, 4706, 9995, 8909, 2167, 263, 19490, 29892, 14712, 373, 278, 9725, 630, 2777, 15945, 29908, 13, 4706, 25401, 29889, 8382, 7373, 703, 4951, 728, 29918, 29885, 16783, 2000, 4968, 2777, 29922, 8758, 29897, 13, 13, 1678, 822, 679, 29918, 11058, 29918, 4905, 29898, 1311, 29892, 2777, 1125, 13, 4706, 25401, 29889, 8382, 7373, 703, 657, 29918, 11058, 29918, 4905, 2000, 4968, 2777, 29922, 8758, 29897, 13, 4706, 736, 6629, 13, 13, 1678, 822, 25000, 29918, 29876, 29893, 3888, 29898, 1311, 1125, 13, 4706, 736, 7700, 13, 2 ]
app/main/services/serial_port_services.py
longlhh90/serial-port-service-flask
0
1606758
<reponame>longlhh90/serial-port-service-flask<filename>app/main/services/serial_port_services.py from app.serialcore import get_list_ports, init_serial_port, write_to_serial_port from flask_restful import Resource, reqparse from flask_jwt import jwt_required from app.init.api import api from app.utils import Collections import serial # HELPERS def positive_integer(value): if value <= 0: raise ValueError("Value is not positive") return value def message_validator(value): if not isinstance(value, str): raise ValueError("Message should be string") if len(value) > 500: raise ValueError("Maximum length of message is 500") return value @api.resource('/ports/') class PortListInfo(Resource): @jwt_required() def get(self): data = get_list_ports() return data, 200 @api.resource('/send-msg/') class SerialPortMessage(Resource): parser = reqparse.RequestParser() parser.add_argument( 'message', type=message_validator, required=True, help="{error_msg}" ) @jwt_required() def post(self): args = SerialPortMessage.parser.parse_args() message = bytes(args["message"], 'ascii') response_msg, status_code = write_to_serial_port(message) return {"message": response_msg}, status_code @api.resource('/init-port/') class InitSerialPort(Resource): parser = reqparse.RequestParser(bundle_errors=True) parser.add_argument( 'port', type=str, location='json', required=True, help="This field cannot be blank." ) parser.add_argument( 'baudrate', choices=serial.Serial.BAUDRATES, type=int, required=False, help="Bad choice: {error_msg}." + "The choices are: {}".format(serial.Serial.BAUDRATES) ) parser.add_argument( 'bytesize', choices=serial.Serial.BYTESIZES, type=int, required=False, help="Bad choice: {error_msg}." + "The choices are: {}".format(serial.Serial.BYTESIZES) ) parser.add_argument( 'stopbits', choices=serial.Serial.STOPBITS, type=int, required=False, help="Bad choice: {error_msg}." + "The choices are: {}".format(serial.Serial.STOPBITS) ) parser.add_argument( 'parity', choices=serial.Serial.PARITIES, type=str, required=False, help="Bad choice: {error_msg}." + "The choices are: {}".format(serial.Serial.PARITIES) ) parser.add_argument( 'flow_control', choices=('xonxoff', 'rtscts', 'dsrdtr'), type=str, required=False, help="Bad choice: {error_msg}. The choices are: ('xonxoff', 'rtscts', 'dsrdtr')" ) parser.add_argument( 'write_timeout', type=positive_integer, required=False, help="Error: {error_msg}" ) parser.add_argument( 'timeout', type=positive_integer, required=False, help="Error: {error_msg}" ) @jwt_required() def post(self): args = Collections.drop_none(InitSerialPort.parser.parse_args()) response_msg, status_code = init_serial_port(**args) return {"message": response_msg}, status_code
[ 1, 529, 276, 1112, 420, 29958, 5426, 29880, 25446, 29929, 29900, 29914, 15550, 29899, 637, 29899, 5509, 29899, 1579, 1278, 29966, 9507, 29958, 932, 29914, 3396, 29914, 9916, 29914, 15550, 29918, 637, 29918, 9916, 29889, 2272, 13, 3166, 623, 29889, 15550, 3221, 1053, 679, 29918, 1761, 29918, 4011, 29892, 2069, 29918, 15550, 29918, 637, 29892, 2436, 29918, 517, 29918, 15550, 29918, 637, 13, 3166, 29784, 29918, 5060, 1319, 1053, 18981, 29892, 12428, 5510, 13, 3166, 29784, 29918, 29926, 14554, 1053, 432, 14554, 29918, 12403, 13, 3166, 623, 29889, 2344, 29889, 2754, 1053, 7882, 13, 3166, 623, 29889, 13239, 1053, 1530, 5942, 13, 5215, 7797, 13, 13, 13, 29937, 379, 6670, 13171, 29903, 13, 1753, 6374, 29918, 16031, 29898, 1767, 1125, 13, 1678, 565, 995, 5277, 29871, 29900, 29901, 13, 4706, 12020, 7865, 2392, 703, 1917, 338, 451, 6374, 1159, 13, 13, 1678, 736, 995, 13, 13, 13, 1753, 2643, 29918, 3084, 1061, 29898, 1767, 1125, 13, 1678, 565, 451, 338, 8758, 29898, 1767, 29892, 851, 1125, 13, 4706, 12020, 7865, 2392, 703, 3728, 881, 367, 1347, 1159, 13, 1678, 565, 7431, 29898, 1767, 29897, 1405, 29871, 29945, 29900, 29900, 29901, 13, 4706, 12020, 7865, 2392, 703, 7976, 12539, 3309, 310, 2643, 338, 29871, 29945, 29900, 29900, 1159, 13, 13, 1678, 736, 995, 13, 13, 13, 29992, 2754, 29889, 10314, 11219, 4011, 29914, 1495, 13, 1990, 3371, 1293, 3401, 29898, 6848, 1125, 13, 13, 1678, 732, 29926, 14554, 29918, 12403, 580, 13, 1678, 822, 679, 29898, 1311, 1125, 13, 4706, 848, 353, 679, 29918, 1761, 29918, 4011, 580, 13, 4706, 736, 848, 29892, 29871, 29906, 29900, 29900, 13, 13, 13, 29992, 2754, 29889, 10314, 11219, 6717, 29899, 7645, 29914, 1495, 13, 1990, 18896, 2290, 3728, 29898, 6848, 1125, 13, 1678, 13812, 353, 12428, 5510, 29889, 3089, 11726, 580, 13, 1678, 13812, 29889, 1202, 29918, 23516, 29898, 13, 4706, 525, 4906, 742, 13, 4706, 1134, 29922, 4906, 29918, 3084, 1061, 29892, 13, 4706, 3734, 29922, 5574, 29892, 13, 4706, 1371, 10724, 2704, 29918, 7645, 5038, 13, 1678, 1723, 13, 13, 1678, 732, 29926, 14554, 29918, 12403, 580, 13, 1678, 822, 1400, 29898, 1311, 1125, 13, 4706, 6389, 353, 18896, 2290, 3728, 29889, 16680, 29889, 5510, 29918, 5085, 580, 13, 4706, 2643, 353, 6262, 29898, 5085, 3366, 4906, 12436, 525, 294, 18869, 1495, 13, 4706, 2933, 29918, 7645, 29892, 4660, 29918, 401, 353, 2436, 29918, 517, 29918, 15550, 29918, 637, 29898, 4906, 29897, 13, 13, 4706, 736, 8853, 4906, 1115, 2933, 29918, 7645, 1118, 4660, 29918, 401, 13, 13, 13, 29992, 2754, 29889, 10314, 11219, 2344, 29899, 637, 29914, 1495, 13, 1990, 10886, 9125, 2290, 29898, 6848, 1125, 13, 1678, 13812, 353, 12428, 5510, 29889, 3089, 11726, 29898, 16718, 29918, 12523, 29922, 5574, 29897, 13, 1678, 13812, 29889, 1202, 29918, 23516, 29898, 13, 4706, 525, 637, 742, 13, 4706, 1134, 29922, 710, 29892, 13, 4706, 4423, 2433, 3126, 742, 13, 4706, 3734, 29922, 5574, 29892, 13, 4706, 1371, 543, 4013, 1746, 2609, 367, 9654, 1213, 13, 1678, 1723, 13, 1678, 13812, 29889, 1202, 29918, 23516, 29898, 13, 4706, 525, 2291, 566, 10492, 742, 13, 4706, 19995, 29922, 15550, 29889, 9125, 29889, 5688, 29965, 8353, 1299, 2890, 29892, 13, 4706, 1134, 29922, 524, 29892, 13, 4706, 3734, 29922, 8824, 29892, 13, 4706, 1371, 543, 22050, 7348, 29901, 426, 2704, 29918, 7645, 29913, 1213, 718, 13, 4706, 376, 1576, 19995, 526, 29901, 6571, 1642, 4830, 29898, 15550, 29889, 9125, 29889, 5688, 29965, 8353, 1299, 2890, 29897, 13, 1678, 1723, 13, 1678, 13812, 29889, 1202, 29918, 23516, 29898, 13, 4706, 525, 13193, 675, 742, 13, 4706, 19995, 29922, 15550, 29889, 9125, 29889, 22716, 29911, 2890, 26664, 2890, 29892, 13, 4706, 1134, 29922, 524, 29892, 13, 4706, 3734, 29922, 8824, 29892, 13, 4706, 1371, 543, 22050, 7348, 29901, 426, 2704, 29918, 7645, 29913, 1213, 718, 13, 4706, 376, 1576, 19995, 526, 29901, 6571, 1642, 4830, 29898, 15550, 29889, 9125, 29889, 22716, 29911, 2890, 26664, 2890, 29897, 13, 1678, 1723, 13, 1678, 13812, 29889, 1202, 29918, 23516, 29898, 13, 4706, 525, 9847, 14836, 742, 13, 4706, 19995, 29922, 15550, 29889, 9125, 29889, 1254, 4590, 22698, 29903, 29892, 13, 4706, 1134, 29922, 524, 29892, 13, 4706, 3734, 29922, 8824, 29892, 13, 4706, 1371, 543, 22050, 7348, 29901, 426, 2704, 29918, 7645, 29913, 1213, 718, 13, 4706, 376, 1576, 19995, 526, 29901, 6571, 1642, 4830, 29898, 15550, 29889, 9125, 29889, 1254, 4590, 22698, 29903, 29897, 13, 1678, 1723, 13, 1678, 13812, 29889, 1202, 29918, 23516, 29898, 13, 4706, 525, 862, 537, 742, 13, 4706, 19995, 29922, 15550, 29889, 9125, 29889, 16320, 1806, 29059, 29892, 13, 4706, 1134, 29922, 710, 29892, 13, 4706, 3734, 29922, 8824, 29892, 13, 4706, 1371, 543, 22050, 7348, 29901, 426, 2704, 29918, 7645, 29913, 1213, 718, 13, 4706, 376, 1576, 19995, 526, 29901, 6571, 1642, 4830, 29898, 15550, 29889, 9125, 29889, 16320, 1806, 29059, 29897, 13, 1678, 1723, 13, 1678, 13812, 29889, 1202, 29918, 23516, 29898, 13, 4706, 525, 1731, 29918, 6451, 742, 13, 4706, 19995, 29922, 877, 29916, 265, 29916, 2696, 742, 525, 29878, 1372, 312, 29879, 742, 525, 6289, 5499, 509, 5477, 13, 4706, 1134, 29922, 710, 29892, 13, 4706, 3734, 29922, 8824, 29892, 13, 4706, 1371, 543, 22050, 7348, 29901, 426, 2704, 29918, 7645, 1836, 450, 19995, 526, 29901, 6702, 29916, 265, 29916, 2696, 742, 525, 29878, 1372, 312, 29879, 742, 525, 6289, 5499, 509, 1495, 29908, 13, 1678, 1723, 13, 1678, 13812, 29889, 1202, 29918, 23516, 29898, 13, 4706, 525, 3539, 29918, 15619, 742, 13, 4706, 1134, 29922, 1066, 3321, 29918, 16031, 29892, 13, 4706, 3734, 29922, 8824, 29892, 13, 4706, 1371, 543, 2392, 29901, 426, 2704, 29918, 7645, 5038, 13, 1678, 1723, 13, 1678, 13812, 29889, 1202, 29918, 23516, 29898, 13, 4706, 525, 15619, 742, 13, 4706, 1134, 29922, 1066, 3321, 29918, 16031, 29892, 13, 4706, 3734, 29922, 8824, 29892, 13, 4706, 1371, 543, 2392, 29901, 426, 2704, 29918, 7645, 5038, 13, 1678, 1723, 13, 13, 1678, 732, 29926, 14554, 29918, 12403, 580, 13, 1678, 822, 1400, 29898, 1311, 1125, 13, 4706, 6389, 353, 1530, 5942, 29889, 8865, 29918, 9290, 29898, 6644, 9125, 2290, 29889, 16680, 29889, 5510, 29918, 5085, 3101, 13, 4706, 2933, 29918, 7645, 29892, 4660, 29918, 401, 353, 2069, 29918, 15550, 29918, 637, 29898, 1068, 5085, 29897, 13, 4706, 736, 8853, 4906, 1115, 2933, 29918, 7645, 1118, 4660, 29918, 401, 13, 2 ]
Estructura de control selectivo_Algoritmo/Ejercicio_10.py
Karollg12/Algoritmos_Programacion
0
83556
""" Entradas salario --> int --> s categoria --> int --> c Salidas aumento --> int --> a salario nuevo --> int --> sn """ s = int (input ( "Digotar el salario:" )) c = int (input ( " Digitar categoria del 1 al 5: ")) if ( c == 1 ): a = s * .10 if ( c == 2 ): a = s * .15 if ( c == 3 ): a == s * .20 if ( c == 4 ): a = s * .40 if ( c == 5 ): a = s * .60 sn = s + a print ( "El aumento es de:" + str (a)) print ( "Valor del nuevo sueldo:" + str (sn))
[ 1, 9995, 29871, 13, 2369, 509, 3922, 29871, 13, 19585, 2628, 6660, 938, 6660, 269, 13, 29883, 1845, 4108, 6660, 938, 6660, 274, 13, 20392, 8817, 29871, 13, 585, 358, 29877, 6660, 938, 6660, 263, 29871, 13, 19585, 2628, 15671, 6660, 938, 6660, 5807, 29871, 13, 13, 15945, 29908, 29871, 13, 29879, 353, 938, 313, 2080, 313, 376, 14991, 327, 279, 560, 4497, 2628, 6160, 29871, 876, 13, 29883, 353, 938, 313, 2080, 313, 376, 10951, 3673, 6107, 4108, 628, 29871, 29896, 394, 29871, 29945, 29901, 376, 876, 13, 13, 361, 313, 274, 1275, 29871, 29896, 29871, 1125, 13, 259, 263, 353, 269, 334, 869, 29896, 29900, 29871, 13, 13, 361, 313, 274, 1275, 29871, 29906, 29871, 1125, 13, 259, 263, 353, 269, 334, 869, 29896, 29945, 13, 13, 361, 313, 274, 1275, 29871, 29941, 29871, 1125, 13, 259, 263, 1275, 269, 334, 869, 29906, 29900, 29871, 13, 13, 361, 313, 274, 1275, 29871, 29946, 29871, 1125, 29871, 13, 259, 263, 353, 269, 334, 869, 29946, 29900, 29871, 13, 13, 361, 313, 274, 1275, 29871, 29945, 29871, 1125, 29871, 13, 259, 263, 353, 269, 334, 869, 29953, 29900, 29871, 13, 13, 16586, 353, 269, 718, 263, 29871, 13, 13, 2158, 313, 376, 6489, 19291, 29877, 831, 316, 6160, 718, 851, 313, 29874, 876, 13, 2158, 313, 376, 1440, 272, 628, 15671, 480, 295, 1867, 6160, 718, 851, 313, 16586, 876, 13, 13, 2 ]
utils/model_utils.py
Pandinosaurus/PerceptualImageError
0
27539
import tensorflow as tf def extract_image_patches(image_batch, patch_size,patch_stride): patches = tf.extract_image_patches(images =image_batch,ksizes=[1,patch_size,patch_size,1],rates=[1,1,1,1],strides=[1,patch_stride,patch_stride,1],padding='VALID') patches_shape = patches.get_shape().as_list() return tf.reshape(patches,[-1,patch_size,patch_size,3])#, patches_shape[1]*patches_shape[2] # NOTE: assuming 3 channels def conv_init(name,input_channels, filter_height, filter_width, num_filters, groups=1): weights = get_scope_variable(name, 'weights', shape=[filter_height, filter_width, input_channels/groups, num_filters], trainable=False) biases = get_scope_variable(name, 'biases', shape = [num_filters],trainable=False) def fc_init(name, num_in, num_out): weights = get_scope_variable(name, 'weights', shape=[num_in, num_out], trainable=False) biases = get_scope_variable(name, 'biases', shape=[num_out], trainable=False) def conv(x, filter_height, filter_width, num_filters, stride_y, stride_x, name, padding='SAME', relu=True): input_channels = int(x.get_shape().as_list()[3]) convolve = lambda i, k: tf.nn.conv2d(i, k, strides = [1, stride_y, stride_x, 1], padding = padding) weights = get_scope_variable(name, 'weights', shape=[filter_height, filter_width, input_channels, num_filters]) biases = get_scope_variable(name, 'biases', shape = [num_filters]) conv = convolve(x, weights) bias_val = tf.reshape(tf.nn.bias_add(conv, biases), tf.shape(conv)) if relu == True: relu = tf.nn.relu(bias_val, name = name) return relu else: return bias_val def fc(x, num_in, num_out, name, relu = True): weights = get_scope_variable(name, 'weights', shape=[num_in, num_out]) biases = get_scope_variable(name, 'biases', shape=[num_out]) act = tf.nn.xw_plus_b(x, weights, biases, name=name) if relu == True: relu = tf.nn.relu(act) return relu else: return act def max_pool(x, filter_height, filter_width, stride_y, stride_x, name, padding='SAME'): return tf.nn.max_pool(x, ksize=[1, filter_height, filter_width, 1], strides = [1, stride_y, stride_x, 1], padding = padding, name = name) def dropout(x, keep_prob): return tf.nn.dropout(x, keep_prob) def get_scope_variable(scope_name, var, shape=None, initialvals=None,trainable=False): with tf.variable_scope(scope_name,reuse=tf.AUTO_REUSE) as scope: v = tf.get_variable(var,shape,dtype=tf.float32, initializer=initialvals,trainable=trainable) return v
[ 1, 1053, 26110, 408, 15886, 13, 13, 13, 1753, 6597, 29918, 3027, 29918, 5041, 267, 29898, 3027, 29918, 16175, 29892, 13261, 29918, 2311, 29892, 5041, 29918, 303, 2426, 1125, 12, 13, 12, 5041, 267, 353, 15886, 29889, 21111, 29918, 3027, 29918, 5041, 267, 29898, 8346, 353, 3027, 29918, 16175, 29892, 2039, 7093, 11759, 29896, 29892, 5041, 29918, 2311, 29892, 5041, 29918, 2311, 29892, 29896, 1402, 29878, 1078, 11759, 29896, 29892, 29896, 29892, 29896, 29892, 29896, 1402, 710, 2247, 11759, 29896, 29892, 5041, 29918, 303, 2426, 29892, 5041, 29918, 303, 2426, 29892, 29896, 1402, 12791, 2433, 26707, 1495, 13, 12, 5041, 267, 29918, 12181, 353, 13261, 267, 29889, 657, 29918, 12181, 2141, 294, 29918, 1761, 580, 13, 12, 2457, 15886, 29889, 690, 14443, 29898, 5041, 267, 29892, 14352, 29896, 29892, 5041, 29918, 2311, 29892, 5041, 29918, 2311, 29892, 29941, 2314, 6552, 13261, 267, 29918, 12181, 29961, 29896, 14178, 5041, 267, 29918, 12181, 29961, 29906, 29962, 396, 6058, 29923, 29901, 10241, 29871, 29941, 18196, 13, 13, 13, 1753, 7602, 29918, 2344, 29898, 978, 29892, 2080, 29918, 305, 12629, 29892, 4175, 29918, 3545, 29892, 4175, 29918, 2103, 29892, 954, 29918, 26705, 29892, 6471, 29922, 29896, 1125, 13, 29871, 18177, 353, 679, 29918, 6078, 29918, 11918, 29898, 978, 29892, 525, 705, 5861, 742, 8267, 11759, 4572, 29918, 3545, 29892, 4175, 29918, 2103, 29892, 1881, 29918, 305, 12629, 29914, 13155, 29892, 954, 29918, 26705, 1402, 7945, 519, 29922, 8824, 29897, 13, 29871, 4768, 2129, 353, 679, 29918, 6078, 29918, 11918, 29898, 978, 29892, 525, 5365, 2129, 742, 8267, 353, 518, 1949, 29918, 26705, 1402, 14968, 519, 29922, 8824, 29897, 13, 13, 13, 1753, 285, 29883, 29918, 2344, 29898, 978, 29892, 954, 29918, 262, 29892, 954, 29918, 449, 1125, 13, 29871, 18177, 353, 679, 29918, 6078, 29918, 11918, 29898, 978, 29892, 525, 705, 5861, 742, 8267, 11759, 1949, 29918, 262, 29892, 954, 29918, 449, 1402, 7945, 519, 29922, 8824, 29897, 13, 29871, 4768, 2129, 353, 679, 29918, 6078, 29918, 11918, 29898, 978, 29892, 525, 5365, 2129, 742, 8267, 11759, 1949, 29918, 449, 1402, 7945, 519, 29922, 8824, 29897, 13, 13, 13, 1753, 7602, 29898, 29916, 29892, 4175, 29918, 3545, 29892, 4175, 29918, 2103, 29892, 954, 29918, 26705, 29892, 380, 2426, 29918, 29891, 29892, 380, 2426, 29918, 29916, 29892, 1024, 29892, 7164, 2433, 8132, 2303, 742, 1104, 29884, 29922, 5574, 1125, 13, 29871, 1881, 29918, 305, 12629, 353, 938, 29898, 29916, 29889, 657, 29918, 12181, 2141, 294, 29918, 1761, 580, 29961, 29941, 2314, 259, 13, 29871, 378, 1555, 345, 353, 14013, 474, 29892, 413, 29901, 15886, 29889, 15755, 29889, 20580, 29906, 29881, 29898, 29875, 29892, 413, 29892, 851, 2247, 353, 518, 29896, 29892, 380, 2426, 29918, 29891, 29892, 380, 2426, 29918, 29916, 29892, 29871, 29896, 1402, 7164, 353, 7164, 29897, 268, 13, 29871, 18177, 353, 679, 29918, 6078, 29918, 11918, 29898, 978, 29892, 525, 705, 5861, 742, 8267, 11759, 4572, 29918, 3545, 29892, 4175, 29918, 2103, 29892, 1881, 29918, 305, 12629, 29892, 954, 29918, 26705, 2314, 13, 29871, 4768, 2129, 353, 679, 29918, 6078, 29918, 11918, 29898, 978, 29892, 525, 5365, 2129, 742, 8267, 353, 518, 1949, 29918, 26705, 2314, 13, 29871, 7602, 353, 378, 1555, 345, 29898, 29916, 29892, 18177, 29897, 539, 13, 29871, 24003, 29918, 791, 353, 15886, 29889, 690, 14443, 29898, 13264, 29889, 15755, 29889, 29890, 3173, 29918, 1202, 29898, 20580, 29892, 4768, 2129, 511, 15886, 29889, 12181, 29898, 20580, 876, 13, 29871, 565, 1104, 29884, 1275, 5852, 29901, 13, 1678, 1104, 29884, 353, 15886, 29889, 15755, 29889, 2674, 29884, 29898, 29890, 3173, 29918, 791, 29892, 1024, 353, 1024, 29897, 4706, 13, 1678, 736, 1104, 29884, 13, 29871, 1683, 29901, 13, 1678, 736, 24003, 29918, 791, 13, 259, 13, 13, 1753, 285, 29883, 29898, 29916, 29892, 954, 29918, 262, 29892, 954, 29918, 449, 29892, 1024, 29892, 1104, 29884, 353, 5852, 1125, 13, 12, 705, 5861, 353, 679, 29918, 6078, 29918, 11918, 29898, 978, 29892, 525, 705, 5861, 742, 8267, 11759, 1949, 29918, 262, 29892, 954, 29918, 449, 2314, 13, 12, 5365, 2129, 353, 679, 29918, 6078, 29918, 11918, 29898, 978, 29892, 525, 5365, 2129, 742, 8267, 11759, 1949, 29918, 449, 2314, 259, 13, 12, 627, 353, 15886, 29889, 15755, 29889, 29916, 29893, 29918, 11242, 29918, 29890, 29898, 29916, 29892, 18177, 29892, 4768, 2129, 29892, 1024, 29922, 978, 29897, 259, 13, 12, 361, 1104, 29884, 1275, 5852, 29901, 13, 12, 12, 2674, 29884, 353, 15886, 29889, 15755, 29889, 2674, 29884, 29898, 627, 29897, 539, 13, 12, 12, 2457, 1104, 29884, 13, 12, 2870, 29901, 13, 12, 12, 2457, 1044, 13, 13, 13, 1753, 4236, 29918, 10109, 29898, 29916, 29892, 4175, 29918, 3545, 29892, 4175, 29918, 2103, 29892, 380, 2426, 29918, 29891, 29892, 380, 2426, 29918, 29916, 29892, 1024, 29892, 7164, 2433, 8132, 2303, 29374, 13, 29871, 736, 15886, 29889, 15755, 29889, 3317, 29918, 10109, 29898, 29916, 29892, 413, 2311, 11759, 29896, 29892, 4175, 29918, 3545, 29892, 4175, 29918, 2103, 29892, 29871, 29896, 1402, 851, 2247, 353, 518, 29896, 29892, 380, 2426, 29918, 29891, 29892, 380, 2426, 29918, 29916, 29892, 29871, 29896, 1402, 7164, 353, 7164, 29892, 1024, 353, 1024, 29897, 13, 13, 13, 1753, 5768, 449, 29898, 29916, 29892, 3013, 29918, 22795, 1125, 13, 29871, 736, 15886, 29889, 15755, 29889, 8865, 449, 29898, 29916, 29892, 3013, 29918, 22795, 29897, 13, 13, 13, 1753, 679, 29918, 6078, 29918, 11918, 29898, 6078, 29918, 978, 29892, 722, 29892, 8267, 29922, 8516, 29892, 2847, 791, 29879, 29922, 8516, 29892, 14968, 519, 29922, 8824, 1125, 13, 12, 2541, 15886, 29889, 11918, 29918, 6078, 29898, 6078, 29918, 978, 29892, 276, 1509, 29922, 13264, 29889, 20656, 29949, 29918, 1525, 17171, 29897, 408, 6874, 29901, 13, 12, 12, 29894, 353, 15886, 29889, 657, 29918, 11918, 29898, 1707, 29892, 12181, 29892, 29881, 1853, 29922, 13264, 29889, 7411, 29941, 29906, 29892, 2847, 3950, 29922, 11228, 791, 29879, 29892, 14968, 519, 29922, 14968, 519, 29897, 13, 12, 2457, 325, 13, 13, 13, 2 ]
scripts/adder.mem.py
devbored/pineapplecore
0
1600318
<gh_stars>0 #! /usr/bin/env python3 from common import * n_vectors = 32 test_vector_a = [randImmI() for x in range(n_vectors)] test_vector_b = [randImmI() for x in range(n_vectors)] test_vector_subEn = [random.randint(0,1) for x in range(n_vectors)] if __name__ == "__main__": outfile = f"{basenameNoExt('build', __file__)}.mem" with open(outfile, 'w') as fp: for i in range(n_vectors): test_vector = f"{test_vector_a[i] & 0xffffffff:032b}" test_vector += f"{test_vector_b[i] & 0xffffffff:032b}" test_vector += f"{test_vector_subEn[i] & 0x1:01b}" print(test_vector, file=fp) outfileGold = f"{basenameNoExt('build', __file__)}_gold.mem" with open(outfileGold, 'w') as fp: for i in range(n_vectors): if test_vector_subEn[i] == 0: test_vector = f"{(test_vector_a[i] + test_vector_b[i]) & 0xffffffff:032b}" print(test_vector, file=fp) else: test_vector = f"{(test_vector_a[i] - test_vector_b[i]) & 0xffffffff:032b}" print(test_vector, file=fp)
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 29991, 847, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 13, 3166, 3619, 1053, 334, 13, 13, 29876, 29918, 345, 14359, 965, 353, 29871, 29941, 29906, 13, 1688, 29918, 8111, 29918, 29874, 539, 353, 518, 9502, 1888, 29885, 29902, 580, 363, 921, 297, 3464, 29898, 29876, 29918, 345, 14359, 4638, 13, 1688, 29918, 8111, 29918, 29890, 539, 353, 518, 9502, 1888, 29885, 29902, 580, 363, 921, 297, 3464, 29898, 29876, 29918, 345, 14359, 4638, 13, 1688, 29918, 8111, 29918, 1491, 2369, 259, 353, 518, 8172, 29889, 9502, 524, 29898, 29900, 29892, 29896, 29897, 363, 921, 297, 3464, 29898, 29876, 29918, 345, 14359, 4638, 13, 13, 361, 4770, 978, 1649, 1275, 376, 1649, 3396, 1649, 1115, 13, 1678, 714, 1445, 353, 285, 29908, 29912, 6500, 3871, 3782, 5647, 877, 4282, 742, 4770, 1445, 1649, 29512, 6954, 29908, 13, 1678, 411, 1722, 29898, 449, 1445, 29892, 525, 29893, 1495, 408, 285, 29886, 29901, 13, 4706, 363, 474, 297, 3464, 29898, 29876, 29918, 345, 14359, 1125, 13, 9651, 1243, 29918, 8111, 29871, 353, 285, 29908, 29912, 1688, 29918, 8111, 29918, 29874, 29961, 29875, 29962, 539, 669, 29871, 29900, 29916, 17156, 17156, 29901, 29900, 29941, 29906, 29890, 5038, 13, 9651, 1243, 29918, 8111, 4619, 285, 29908, 29912, 1688, 29918, 8111, 29918, 29890, 29961, 29875, 29962, 539, 669, 29871, 29900, 29916, 17156, 17156, 29901, 29900, 29941, 29906, 29890, 5038, 13, 9651, 1243, 29918, 8111, 4619, 285, 29908, 29912, 1688, 29918, 8111, 29918, 1491, 2369, 29961, 29875, 29962, 259, 669, 29871, 29900, 29916, 29896, 29901, 29900, 29896, 29890, 5038, 13, 9651, 1596, 29898, 1688, 29918, 8111, 29892, 934, 29922, 18091, 29897, 13, 13, 1678, 714, 1445, 29954, 1025, 353, 285, 29908, 29912, 6500, 3871, 3782, 5647, 877, 4282, 742, 4770, 1445, 1649, 29897, 2403, 29887, 1025, 29889, 6954, 29908, 13, 1678, 411, 1722, 29898, 449, 1445, 29954, 1025, 29892, 525, 29893, 1495, 408, 285, 29886, 29901, 13, 4706, 363, 474, 297, 3464, 29898, 29876, 29918, 345, 14359, 1125, 13, 9651, 565, 1243, 29918, 8111, 29918, 1491, 2369, 29961, 29875, 29962, 1275, 29871, 29900, 29901, 13, 18884, 1243, 29918, 8111, 353, 285, 29908, 8001, 1688, 29918, 8111, 29918, 29874, 29961, 29875, 29962, 718, 1243, 29918, 8111, 29918, 29890, 29961, 29875, 2314, 669, 29871, 29900, 29916, 17156, 17156, 29901, 29900, 29941, 29906, 29890, 5038, 13, 18884, 1596, 29898, 1688, 29918, 8111, 29892, 934, 29922, 18091, 29897, 13, 9651, 1683, 29901, 13, 18884, 1243, 29918, 8111, 353, 285, 29908, 8001, 1688, 29918, 8111, 29918, 29874, 29961, 29875, 29962, 448, 1243, 29918, 8111, 29918, 29890, 29961, 29875, 2314, 669, 29871, 29900, 29916, 17156, 17156, 29901, 29900, 29941, 29906, 29890, 5038, 13, 18884, 1596, 29898, 1688, 29918, 8111, 29892, 934, 29922, 18091, 29897, 13, 2 ]
src/python/fsqio/pants/buildgen/python/register.py
stuhood/fsqio
0
103238
# coding=utf-8 # Copyright 2016 Foursquare Labs Inc. All Rights Reserved. from __future__ import absolute_import from pants.goal.task_registrar import TaskRegistrar as task from fsqio.pants.buildgen.python.buildgen_python import BuildgenPython from fsqio.pants.buildgen.python.map_python_exported_symbols import MapPythonExportedSymbols def register_goals(): task( name='map-python-exported-symbols', action=MapPythonExportedSymbols, ).install() task( name='python', action=BuildgenPython, ).install('buildgen')
[ 1, 396, 14137, 29922, 9420, 29899, 29947, 13, 29937, 14187, 1266, 29871, 29906, 29900, 29896, 29953, 383, 2470, 4718, 365, 6897, 9266, 29889, 2178, 26863, 2538, 9841, 29889, 13, 13, 3166, 4770, 29888, 9130, 1649, 1053, 8380, 29918, 5215, 13, 13, 3166, 282, 1934, 29889, 28111, 29889, 7662, 29918, 29238, 279, 1053, 9330, 4597, 2132, 279, 408, 3414, 13, 13, 3166, 285, 3044, 601, 29889, 29886, 1934, 29889, 4282, 1885, 29889, 4691, 29889, 4282, 1885, 29918, 4691, 1053, 8878, 1885, 11980, 13, 3166, 285, 3044, 601, 29889, 29886, 1934, 29889, 4282, 1885, 29889, 4691, 29889, 1958, 29918, 4691, 29918, 15843, 287, 29918, 18098, 29879, 1053, 7315, 11980, 26382, 287, 14730, 29879, 13, 13, 13, 1753, 6036, 29918, 1484, 1338, 7295, 13, 13, 29871, 3414, 29898, 13, 1678, 1024, 2433, 1958, 29899, 4691, 29899, 15843, 287, 29899, 18098, 29879, 742, 13, 1678, 3158, 29922, 3388, 11980, 26382, 287, 14730, 29879, 29892, 13, 29871, 13742, 6252, 580, 13, 13, 29871, 3414, 29898, 13, 1678, 1024, 2433, 4691, 742, 13, 1678, 3158, 29922, 8893, 1885, 11980, 29892, 13, 29871, 13742, 6252, 877, 4282, 1885, 1495, 13, 2 ]
python/ray/rllib/models/tf/tf_modelv2.py
alex-petrenko/ray
1
21822
<gh_stars>1-10 from __future__ import absolute_import from __future__ import division from __future__ import print_function from ray.rllib.models.modelv2 import ModelV2 from ray.rllib.utils import try_import_tf tf = try_import_tf() class TFModelV2(ModelV2): """TF version of ModelV2.""" def __init__(self, obs_space, action_space, output_spec, model_config, name): ModelV2.__init__( self, obs_space, action_space, output_spec, model_config, name, framework="tf")
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 3166, 4770, 29888, 9130, 1649, 1053, 8380, 29918, 5215, 13, 3166, 4770, 29888, 9130, 1649, 1053, 8542, 13, 3166, 4770, 29888, 9130, 1649, 1053, 1596, 29918, 2220, 13, 13, 3166, 15570, 29889, 2096, 1982, 29889, 9794, 29889, 4299, 29894, 29906, 1053, 8125, 29963, 29906, 13, 3166, 15570, 29889, 2096, 1982, 29889, 13239, 1053, 1018, 29918, 5215, 29918, 13264, 13, 13, 13264, 353, 1018, 29918, 5215, 29918, 13264, 580, 13, 13, 13, 1990, 323, 29943, 3195, 29963, 29906, 29898, 3195, 29963, 29906, 1125, 13, 1678, 9995, 8969, 1873, 310, 8125, 29963, 29906, 1213, 15945, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 20881, 29918, 3493, 29892, 3158, 29918, 3493, 29892, 1962, 29918, 6550, 29892, 1904, 29918, 2917, 29892, 13, 462, 1024, 1125, 13, 4706, 8125, 29963, 29906, 17255, 2344, 12035, 13, 9651, 1583, 29892, 13, 9651, 20881, 29918, 3493, 29892, 13, 9651, 3158, 29918, 3493, 29892, 13, 9651, 1962, 29918, 6550, 29892, 13, 9651, 1904, 29918, 2917, 29892, 13, 9651, 1024, 29892, 13, 9651, 6890, 543, 13264, 1159, 13, 2 ]
Dataset/Leetcode/valid/66/141.py
kkcookies99/UAST
0
106290
class Solution: def XXX(self, digits: List[int]) -> List[int]: return [int(i) for i in (list(str(int(''.join([str(i) for i in digits]) ) + 1 )))]
[ 1, 29871, 770, 24380, 29901, 13, 1678, 822, 22615, 29898, 1311, 29892, 13340, 29901, 2391, 29961, 524, 2314, 1599, 2391, 29961, 524, 5387, 13, 4706, 736, 518, 524, 29898, 29875, 29897, 363, 474, 297, 313, 1761, 29898, 710, 29898, 524, 877, 4286, 7122, 4197, 710, 29898, 29875, 29897, 363, 474, 297, 13340, 2314, 1723, 718, 29871, 29896, 29871, 876, 4638, 13, 13, 2 ]
maxSquare.py
passionzhan/LeetCode
1
1610817
#!/usr/bin/env python # -*- coding: utf-8 -*- # @File : maxSquare.py # @Author: Zhan # @Date : 7/11/2019 # @Desc : 最大正方形 # 在一个由 0 和 1 组成的二维矩阵内,找到只包含 1 的最大正方形,并返回其面积。 # # 示例: # # 输入: # # 1 0 1 0 0 # 1 0 1 1 1 # 1 1 1 1 1 # 1 0 0 1 0 # # 输出: 4 class Solution(object): def maximalSquare(self, matrix): """ :type matrix: List[List[str]] :rtype: int """ nrow = len(matrix) if nrow <= 0: return 0 ncol = len(matrix[0]) if ncol <= 0: return 0 pre = 0 dp = [0 for item in matrix[0]] rst = 0 for i in range(0, nrow): for j in range(0, ncol): if j == 0: pre = dp[j] dp[j] = int(matrix[i][j]) elif matrix[i][j] == "1": tmp = dp[j] dp[j] = min(pre, dp[j - 1], dp[j]) + 1 pre = tmp else: pre = dp[j] dp[j] = 0 rst = max(rst, dp[j]) return rst * rst if __name__ == '__main__': a = [["1","0","1","0","0"], ["1","0","1","1","1"], ["1","1","1","1","1"], ["1","0","1","1","1"] ] # a = [7, 6, 4, 3, 1] # a = [-1] print(Solution().maximalSquare(a))
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 30004, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 30004, 13, 29937, 732, 2283, 29871, 584, 4236, 29903, 4718, 29889, 2272, 30004, 13, 29937, 732, 13720, 29901, 796, 5403, 30004, 13, 29937, 732, 2539, 29871, 584, 29871, 29955, 29914, 29896, 29896, 29914, 29906, 29900, 29896, 29929, 30004, 13, 29937, 732, 19617, 29871, 584, 29871, 30878, 30257, 30724, 30525, 31305, 30004, 13, 29937, 418, 30505, 30287, 30502, 31272, 29871, 29900, 29871, 30503, 29871, 29896, 29871, 31263, 30494, 30210, 30685, 234, 190, 183, 234, 162, 172, 236, 155, 184, 30728, 30214, 233, 140, 193, 30780, 31557, 31473, 232, 147, 174, 29871, 29896, 29871, 30210, 30878, 30257, 30724, 30525, 31305, 30214, 31666, 31086, 30742, 31149, 30806, 234, 170, 178, 30267, 30004, 13, 29937, 30004, 13, 29937, 418, 30858, 31507, 29901, 30004, 13, 29937, 30004, 13, 29937, 418, 31573, 30752, 29901, 30004, 13, 29937, 30004, 13, 29937, 418, 29896, 29871, 29900, 29871, 29896, 29871, 29900, 29871, 29900, 30004, 13, 29937, 418, 29896, 29871, 29900, 29871, 29896, 29871, 29896, 29871, 29896, 30004, 13, 29937, 418, 29896, 29871, 29896, 29871, 29896, 29871, 29896, 29871, 29896, 30004, 13, 29937, 418, 29896, 29871, 29900, 29871, 29900, 29871, 29896, 29871, 29900, 30004, 13, 29937, 30004, 13, 29937, 418, 31573, 30544, 29901, 29871, 29946, 30004, 13, 30004, 13, 1990, 24380, 29898, 3318, 1125, 30004, 13, 1678, 822, 23183, 29903, 4718, 29898, 1311, 29892, 4636, 1125, 30004, 13, 4706, 9995, 30004, 13, 4706, 584, 1853, 4636, 29901, 2391, 29961, 1293, 29961, 710, 5262, 30004, 13, 4706, 584, 29878, 1853, 29901, 938, 30004, 13, 4706, 9995, 30004, 13, 4706, 302, 798, 353, 7431, 29898, 5344, 8443, 13, 4706, 565, 302, 798, 5277, 29871, 29900, 29901, 30004, 13, 9651, 736, 29871, 29900, 30004, 13, 30004, 13, 4706, 302, 1054, 353, 7431, 29898, 5344, 29961, 29900, 2314, 30004, 13, 30004, 13, 4706, 565, 302, 1054, 5277, 29871, 29900, 29901, 30004, 13, 9651, 736, 29871, 29900, 30004, 13, 30004, 13, 4706, 758, 353, 29871, 29900, 30004, 13, 4706, 270, 29886, 353, 518, 29900, 363, 2944, 297, 4636, 29961, 29900, 5262, 30004, 13, 4706, 364, 303, 353, 29871, 29900, 30004, 13, 30004, 13, 4706, 363, 474, 297, 3464, 29898, 29900, 29892, 302, 798, 1125, 30004, 13, 9651, 363, 432, 297, 3464, 29898, 29900, 29892, 302, 1054, 1125, 30004, 13, 18884, 565, 432, 1275, 29871, 29900, 29901, 30004, 13, 462, 1678, 758, 353, 270, 29886, 29961, 29926, 29962, 30004, 13, 462, 1678, 270, 29886, 29961, 29926, 29962, 353, 938, 29898, 5344, 29961, 29875, 3816, 29926, 2314, 30004, 13, 18884, 25342, 4636, 29961, 29875, 3816, 29926, 29962, 1275, 376, 29896, 1115, 30004, 13, 462, 1678, 13128, 353, 270, 29886, 29961, 29926, 29962, 30004, 13, 462, 1678, 270, 29886, 29961, 29926, 29962, 353, 1375, 29898, 1457, 29892, 270, 29886, 29961, 29926, 448, 29871, 29896, 1402, 270, 29886, 29961, 29926, 2314, 718, 29871, 29896, 30004, 13, 462, 1678, 758, 353, 13128, 30004, 13, 18884, 1683, 29901, 30004, 13, 462, 1678, 758, 353, 270, 29886, 29961, 29926, 29962, 30004, 13, 462, 1678, 270, 29886, 29961, 29926, 29962, 353, 29871, 29900, 30004, 13, 18884, 364, 303, 353, 4236, 29898, 29878, 303, 29892, 270, 29886, 29961, 29926, 2314, 30004, 13, 30004, 13, 4706, 736, 364, 303, 334, 364, 303, 30004, 13, 30004, 13, 30004, 13, 361, 4770, 978, 1649, 1275, 525, 1649, 3396, 1649, 2396, 30004, 13, 1678, 263, 353, 518, 3366, 29896, 3284, 29900, 3284, 29896, 3284, 29900, 3284, 29900, 12436, 30004, 13, 308, 6796, 29896, 3284, 29900, 3284, 29896, 3284, 29896, 3284, 29896, 12436, 30004, 13, 308, 6796, 29896, 3284, 29896, 3284, 29896, 3284, 29896, 3284, 29896, 12436, 30004, 13, 308, 6796, 29896, 3284, 29900, 3284, 29896, 3284, 29896, 3284, 29896, 3108, 30004, 13, 308, 4514, 30004, 13, 1678, 396, 263, 353, 518, 29955, 29892, 29871, 29953, 29892, 29871, 29946, 29892, 29871, 29941, 29892, 29871, 29896, 29962, 30004, 13, 30004, 13, 1678, 396, 263, 353, 21069, 29896, 29962, 30004, 13, 1678, 1596, 29898, 13296, 918, 2141, 27525, 284, 29903, 4718, 29898, 29874, 876, 2 ]
solum/api/controllers/v1/assembly.py
devdattakulkarni/test-solum
0
9570
<gh_stars>0 # Copyright 2013 - Red Hat, Inc. # # 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 pecan from pecan import rest import wsme import wsmeext.pecan as wsme_pecan from solum.api.controllers.v1.datamodel import assembly import solum.api.controllers.v1.userlog as userlog_controller from solum.api.handlers import assembly_handler from solum.common import exception from solum.common import request from solum import objects from solum.openstack.common.gettextutils import _ class AssemblyController(rest.RestController): """Manages operations on a single assembly.""" def __init__(self, assembly_id): super(AssemblyController, self).__init__() self._id = assembly_id @pecan.expose() def _lookup(self, primary_key, *remainder): if remainder and not remainder[-1]: remainder = remainder[:-1] if primary_key == 'logs': logs = userlog_controller.UserlogsController(self._id) return logs, remainder @exception.wrap_wsme_pecan_controller_exception @wsme_pecan.wsexpose(assembly.Assembly) def get(self): """Return this assembly.""" request.check_request_for_https() handler = assembly_handler.AssemblyHandler( pecan.request.security_context) return assembly.Assembly.from_db_model(handler.get(self._id), pecan.request.host_url) @exception.wrap_wsme_pecan_controller_exception @wsme_pecan.wsexpose(assembly.Assembly, body=assembly.Assembly) def put(self, data): """Modify this assembly.""" handler = assembly_handler.AssemblyHandler( pecan.request.security_context) res = handler.update(self._id, data.as_dict(objects.registry.Assembly)) return assembly.Assembly.from_db_model(res, pecan.request.host_url) @exception.wrap_wsme_pecan_controller_exception @wsme_pecan.wsexpose(status_code=204) def delete(self): """Delete this assembly.""" handler = assembly_handler.AssemblyHandler( pecan.request.security_context) return handler.delete(self._id) class AssembliesController(rest.RestController): """Manages operations on the assemblies collection.""" @pecan.expose() def _lookup(self, assembly_id, *remainder): if remainder and not remainder[-1]: remainder = remainder[:-1] return AssemblyController(assembly_id), remainder @exception.wrap_wsme_pecan_controller_exception @wsme_pecan.wsexpose(assembly.Assembly, body=assembly.Assembly, status_code=201) def post(self, data): """Create a new assembly.""" js_data = data.as_dict(objects.registry.Assembly) if data.plan_uri is not wsme.Unset: plan_uri = data.plan_uri if plan_uri.startswith(pecan.request.host_url): pl_uuid = plan_uri.split('/')[-1] pl = objects.registry.Plan.get_by_uuid( pecan.request.security_context, pl_uuid) js_data['plan_id'] = pl.id else: # TODO(asalkeld) we are not hosting the plan so # download the plan and insert it into our db. raise exception.BadRequest(reason=_( 'The plan was not hosted in solum')) if js_data.get('plan_id') is None: raise exception.BadRequest(reason=_( 'The plan was not given or could not be found')) handler = assembly_handler.AssemblyHandler( pecan.request.security_context) return assembly.Assembly.from_db_model( handler.create(js_data), pecan.request.host_url) @exception.wrap_wsme_pecan_controller_exception @wsme_pecan.wsexpose([assembly.Assembly]) def get_all(self): """Return all assemblies, based on the query provided.""" request.check_request_for_https() handler = assembly_handler.AssemblyHandler( pecan.request.security_context) return [assembly.Assembly.from_db_model(assm, pecan.request.host_url) for assm in handler.get_all()]
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 14187, 1266, 29871, 29906, 29900, 29896, 29941, 448, 4367, 25966, 29892, 9266, 29889, 13, 29937, 13, 29937, 10413, 21144, 1090, 278, 13380, 19245, 29892, 10079, 29871, 29906, 29889, 29900, 313, 1552, 376, 29931, 293, 1947, 1496, 366, 1122, 13, 29937, 451, 671, 445, 934, 5174, 297, 752, 13036, 411, 278, 19245, 29889, 887, 1122, 4017, 13, 29937, 263, 3509, 310, 278, 19245, 472, 13, 29937, 13, 29937, 418, 1732, 597, 1636, 29889, 4288, 29889, 990, 29914, 506, 11259, 29914, 27888, 1430, 1660, 29899, 29906, 29889, 29900, 13, 29937, 13, 29937, 25870, 3734, 491, 22903, 4307, 470, 15502, 304, 297, 5007, 29892, 7047, 13, 29937, 13235, 1090, 278, 19245, 338, 13235, 373, 385, 376, 3289, 8519, 29908, 350, 3289, 3235, 29892, 399, 1806, 8187, 2692, 13, 29937, 399, 1718, 29934, 13566, 29059, 6323, 8707, 29928, 22122, 29903, 8079, 13764, 29979, 476, 22255, 29892, 2845, 4653, 470, 2411, 2957, 29889, 2823, 278, 13, 29937, 19245, 363, 278, 2702, 4086, 14765, 1076, 11239, 322, 27028, 13, 29937, 1090, 278, 19245, 29889, 13, 13, 5215, 13209, 273, 13, 3166, 13209, 273, 1053, 1791, 13, 5215, 16904, 1004, 13, 5215, 16904, 1004, 1062, 29889, 412, 3068, 408, 16904, 1004, 29918, 412, 3068, 13, 13, 3166, 899, 398, 29889, 2754, 29889, 1285, 11897, 29889, 29894, 29896, 29889, 4130, 314, 27224, 1053, 11470, 13, 5215, 899, 398, 29889, 2754, 29889, 1285, 11897, 29889, 29894, 29896, 29889, 1792, 1188, 408, 1404, 1188, 29918, 8299, 13, 3166, 899, 398, 29889, 2754, 29889, 3179, 9306, 1053, 11470, 29918, 13789, 13, 3166, 899, 398, 29889, 9435, 1053, 3682, 13, 3166, 899, 398, 29889, 9435, 1053, 2009, 13, 3166, 899, 398, 1053, 3618, 13, 3166, 899, 398, 29889, 3150, 1429, 29889, 9435, 29889, 657, 726, 13239, 1053, 903, 13, 13, 13, 1990, 13266, 2956, 29898, 5060, 29889, 15078, 2956, 1125, 13, 1678, 9995, 2517, 1179, 6931, 373, 263, 2323, 11470, 1213, 15945, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 11470, 29918, 333, 1125, 13, 4706, 2428, 29898, 22400, 2956, 29892, 1583, 467, 1649, 2344, 1649, 580, 13, 4706, 1583, 3032, 333, 353, 11470, 29918, 333, 13, 13, 1678, 732, 412, 3068, 29889, 735, 4220, 580, 13, 1678, 822, 903, 20401, 29898, 1311, 29892, 7601, 29918, 1989, 29892, 334, 1745, 475, 672, 1125, 13, 4706, 565, 21162, 322, 451, 21162, 14352, 29896, 5387, 13, 9651, 21162, 353, 21162, 7503, 29899, 29896, 29962, 13, 4706, 565, 7601, 29918, 1989, 1275, 525, 20756, 2396, 13, 9651, 10748, 353, 1404, 1188, 29918, 8299, 29889, 2659, 20756, 2956, 29898, 1311, 3032, 333, 29897, 13, 9651, 736, 10748, 29892, 21162, 13, 13, 1678, 732, 11739, 29889, 6312, 29918, 5652, 1004, 29918, 412, 3068, 29918, 8299, 29918, 11739, 13, 1678, 732, 5652, 1004, 29918, 412, 3068, 29889, 29893, 14167, 4220, 29898, 26936, 29889, 22400, 29897, 13, 1678, 822, 679, 29898, 1311, 1125, 13, 4706, 9995, 11609, 445, 11470, 1213, 15945, 13, 4706, 2009, 29889, 3198, 29918, 3827, 29918, 1454, 29918, 991, 580, 13, 4706, 7834, 353, 11470, 29918, 13789, 29889, 22400, 4598, 29898, 13, 9651, 13209, 273, 29889, 3827, 29889, 8926, 29918, 4703, 29897, 13, 4706, 736, 11470, 29889, 22400, 29889, 3166, 29918, 2585, 29918, 4299, 29898, 13789, 29889, 657, 29898, 1311, 3032, 333, 511, 13, 462, 462, 1669, 13209, 273, 29889, 3827, 29889, 3069, 29918, 2271, 29897, 13, 13, 1678, 732, 11739, 29889, 6312, 29918, 5652, 1004, 29918, 412, 3068, 29918, 8299, 29918, 11739, 13, 1678, 732, 5652, 1004, 29918, 412, 3068, 29889, 29893, 14167, 4220, 29898, 26936, 29889, 22400, 29892, 3573, 29922, 26936, 29889, 22400, 29897, 13, 1678, 822, 1925, 29898, 1311, 29892, 848, 1125, 13, 4706, 9995, 2111, 1598, 445, 11470, 1213, 15945, 13, 4706, 7834, 353, 11470, 29918, 13789, 29889, 22400, 4598, 29898, 13, 9651, 13209, 273, 29889, 3827, 29889, 8926, 29918, 4703, 29897, 13, 4706, 620, 353, 7834, 29889, 5504, 29898, 1311, 3032, 333, 29892, 13, 462, 632, 848, 29889, 294, 29918, 8977, 29898, 12650, 29889, 1727, 6020, 29889, 22400, 876, 13, 4706, 736, 11470, 29889, 22400, 29889, 3166, 29918, 2585, 29918, 4299, 29898, 690, 29892, 13209, 273, 29889, 3827, 29889, 3069, 29918, 2271, 29897, 13, 13, 1678, 732, 11739, 29889, 6312, 29918, 5652, 1004, 29918, 412, 3068, 29918, 8299, 29918, 11739, 13, 1678, 732, 5652, 1004, 29918, 412, 3068, 29889, 29893, 14167, 4220, 29898, 4882, 29918, 401, 29922, 29906, 29900, 29946, 29897, 13, 1678, 822, 5217, 29898, 1311, 1125, 13, 4706, 9995, 12498, 445, 11470, 1213, 15945, 13, 4706, 7834, 353, 11470, 29918, 13789, 29889, 22400, 4598, 29898, 13, 9651, 13209, 273, 29889, 3827, 29889, 8926, 29918, 4703, 29897, 13, 4706, 736, 7834, 29889, 8143, 29898, 1311, 3032, 333, 29897, 13, 13, 13, 1990, 4007, 1590, 3687, 2956, 29898, 5060, 29889, 15078, 2956, 1125, 13, 1678, 9995, 2517, 1179, 6931, 373, 278, 24367, 3687, 4333, 1213, 15945, 13, 13, 1678, 732, 412, 3068, 29889, 735, 4220, 580, 13, 1678, 822, 903, 20401, 29898, 1311, 29892, 11470, 29918, 333, 29892, 334, 1745, 475, 672, 1125, 13, 4706, 565, 21162, 322, 451, 21162, 14352, 29896, 5387, 13, 9651, 21162, 353, 21162, 7503, 29899, 29896, 29962, 13, 4706, 736, 13266, 2956, 29898, 26936, 29918, 333, 511, 21162, 13, 13, 1678, 732, 11739, 29889, 6312, 29918, 5652, 1004, 29918, 412, 3068, 29918, 8299, 29918, 11739, 13, 1678, 732, 5652, 1004, 29918, 412, 3068, 29889, 29893, 14167, 4220, 29898, 26936, 29889, 22400, 29892, 3573, 29922, 26936, 29889, 22400, 29892, 13, 462, 308, 4660, 29918, 401, 29922, 29906, 29900, 29896, 29897, 13, 1678, 822, 1400, 29898, 1311, 29892, 848, 1125, 13, 4706, 9995, 4391, 263, 716, 11470, 1213, 15945, 13, 4706, 6965, 29918, 1272, 353, 848, 29889, 294, 29918, 8977, 29898, 12650, 29889, 1727, 6020, 29889, 22400, 29897, 13, 4706, 565, 848, 29889, 9018, 29918, 5338, 338, 451, 16904, 1004, 29889, 2525, 842, 29901, 13, 9651, 3814, 29918, 5338, 353, 848, 29889, 9018, 29918, 5338, 13, 9651, 565, 3814, 29918, 5338, 29889, 27382, 2541, 29898, 412, 3068, 29889, 3827, 29889, 3069, 29918, 2271, 1125, 13, 18884, 715, 29918, 25118, 353, 3814, 29918, 5338, 29889, 5451, 11219, 1495, 14352, 29896, 29962, 13, 18884, 715, 353, 3618, 29889, 1727, 6020, 29889, 20334, 29889, 657, 29918, 1609, 29918, 25118, 29898, 13, 462, 1678, 13209, 273, 29889, 3827, 29889, 8926, 29918, 4703, 29892, 715, 29918, 25118, 29897, 13, 18884, 6965, 29918, 1272, 1839, 9018, 29918, 333, 2033, 353, 715, 29889, 333, 13, 9651, 1683, 29901, 13, 18884, 396, 14402, 29898, 294, 2235, 2495, 29897, 591, 526, 451, 23376, 278, 3814, 577, 13, 18884, 396, 5142, 278, 3814, 322, 4635, 372, 964, 1749, 4833, 29889, 13, 18884, 12020, 3682, 29889, 22050, 3089, 29898, 23147, 29922, 23538, 13, 462, 1678, 525, 1576, 3814, 471, 451, 17791, 297, 899, 398, 8785, 13, 13, 4706, 565, 6965, 29918, 1272, 29889, 657, 877, 9018, 29918, 333, 1495, 338, 6213, 29901, 13, 9651, 12020, 3682, 29889, 22050, 3089, 29898, 23147, 29922, 23538, 13, 18884, 525, 1576, 3814, 471, 451, 2183, 470, 1033, 451, 367, 1476, 8785, 13, 13, 4706, 7834, 353, 11470, 29918, 13789, 29889, 22400, 4598, 29898, 13, 9651, 13209, 273, 29889, 3827, 29889, 8926, 29918, 4703, 29897, 13, 4706, 736, 11470, 29889, 22400, 29889, 3166, 29918, 2585, 29918, 4299, 29898, 13, 9651, 7834, 29889, 3258, 29898, 1315, 29918, 1272, 511, 13209, 273, 29889, 3827, 29889, 3069, 29918, 2271, 29897, 13, 13, 1678, 732, 11739, 29889, 6312, 29918, 5652, 1004, 29918, 412, 3068, 29918, 8299, 29918, 11739, 13, 1678, 732, 5652, 1004, 29918, 412, 3068, 29889, 29893, 14167, 4220, 4197, 26936, 29889, 22400, 2314, 13, 1678, 822, 679, 29918, 497, 29898, 1311, 1125, 13, 4706, 9995, 11609, 599, 24367, 3687, 29892, 2729, 373, 278, 2346, 4944, 1213, 15945, 13, 4706, 2009, 29889, 3198, 29918, 3827, 29918, 1454, 29918, 991, 580, 13, 4706, 7834, 353, 11470, 29918, 13789, 29889, 22400, 4598, 29898, 13, 9651, 13209, 273, 29889, 3827, 29889, 8926, 29918, 4703, 29897, 13, 4706, 736, 518, 26936, 29889, 22400, 29889, 3166, 29918, 2585, 29918, 4299, 29898, 465, 29885, 29892, 13209, 273, 29889, 3827, 29889, 3069, 29918, 2271, 29897, 13, 18884, 363, 1223, 29885, 297, 7834, 29889, 657, 29918, 497, 580, 29962, 13, 2 ]
test/app-client/scripts/esvm_client.py
susanwab/elijah-provisioning
19
144543
#!/usr/bin/env python # # Cloudlet Infrastructure for Mobile Computing # # Author: <NAME> <<EMAIL>> # # Copyright (C) 2011-2013 Carnegie Mellon University # 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 os import sys import socket from optparse import OptionParser import time import struct import math def get_local_ipaddress(): s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) s.connect(("gmail.com",80)) ipaddress = (s.getsockname()[0]) s.close() return ipaddress def process_command_line(argv): global operation_mode parser = OptionParser(usage="usage: %prog [option]", version="ESVM Desktop Client") parser.add_option( '-i', '--input', action='store', type='string', dest='input_dir', help='Set Input image directory') parser.add_option( '-s', '--server', action='store', type='string', dest='server_address', default="localhost", help='Set Input image directory') parser.add_option( '-p', '--port', action='store', type='int', dest='server_port', default=9095, help='Set Input image directory') parser.add_option( '-r', '--repeat', action='store', type='int', dest='conn_repeat', default=100, help='Repeat connecting number') settings, args = parser.parse_args(argv) if not len(args) == 0: parser.error('program takes no command-line arguments; "%s" ignored.' % (args,)) if not settings.input_dir: parser.error("input directory does no exists at :%s" % (settings.input_dir)) if not os.path.isdir(settings.input_dir): parser.error("input directory does no exists at :%s" % (settings.input_dir)) return settings, args def send_request(address, port, inputs, conn_repeat): # connection conn_count = 0 connect_start_time = time.time() while conn_count < conn_repeat: try: print "Connecting..." sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.setblocking(True) sock.connect((address, port)) conn_count += 1 break except socket.error, msg: print "Connection failed, retry" sock.close() time.sleep(0.1) if (sock == None) or (sock.fileno() <= 0): sys.stderr.write("Connection faild to (%s:%d)\n" % (address, port)) sys.exit(1) connect_end_time = time.time() print "Connecting to (%s, %d) takes %f seconds" % \ (address, port, (connect_end_time-connect_start_time)) # send requests current_duration = -1 print "image\tstart\tend\tduration\tjitter" for each_input in inputs: start_time_request = time.time() * 1000.0 binary = open(each_input, 'rb').read(); ret_data = esvm_request(sock, binary) # print result end_time_request = time.time() * 1000.0 prev_duration = current_duration current_duration = end_time_request-start_time_request if prev_duration == -1: # fisrt response print "%s\t%014.2f\t%014.2f\t%014.2f\t0" % (each_input, start_time_request,\ end_time_request, \ end_time_request-start_time_request) else: print "%s\t%014.2f\t%014.2f\t%014.2f\t%014.2f" % (each_input, round(start_time_request, 3), \ end_time_request, \ current_duration, \ math.fabs(current_duration-prev_duration)) def esvm_request(sock, data): length = len(data) # send sock.sendall(struct.pack("!I", length)) sock.sendall(data) #recv data = sock.recv(4) ret_size = struct.unpack("!I", data)[0] ret_data = '' if not ret_size == 0: ret_data = sock.recv(ret_size) return ret_data return None def main(argv=None): global LOCAL_IPADDRESS settings, args = process_command_line(sys.argv[1:]) files = [os.path.join(settings.input_dir, file) for file in os.listdir(settings.input_dir) if file[-3:] == "jpg" or file[-3:] == "JPG"] send_request(settings.server_address, settings.server_port, files, settings.conn_repeat) return 0 if __name__ == "__main__": status = main() sys.exit(status)
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 29871, 13, 29937, 13, 29937, 14293, 1026, 512, 14867, 12425, 363, 21600, 11796, 292, 13, 29937, 13, 29937, 259, 13361, 29901, 529, 5813, 29958, 3532, 26862, 6227, 6778, 13, 29937, 13, 29937, 259, 14187, 1266, 313, 29907, 29897, 29871, 29906, 29900, 29896, 29896, 29899, 29906, 29900, 29896, 29941, 1704, 10052, 347, 341, 514, 265, 3014, 13, 29937, 259, 10413, 21144, 1090, 278, 13380, 19245, 29892, 10079, 29871, 29906, 29889, 29900, 313, 1552, 376, 29931, 293, 1947, 1496, 13, 29937, 259, 366, 1122, 451, 671, 445, 934, 5174, 297, 752, 13036, 411, 278, 19245, 29889, 13, 29937, 259, 887, 1122, 4017, 263, 3509, 310, 278, 19245, 472, 13, 29937, 13, 29937, 539, 1732, 597, 1636, 29889, 4288, 29889, 990, 29914, 506, 11259, 29914, 27888, 1430, 1660, 29899, 29906, 29889, 29900, 13, 29937, 13, 29937, 259, 25870, 3734, 491, 22903, 4307, 470, 15502, 304, 297, 5007, 29892, 7047, 13, 29937, 259, 13235, 1090, 278, 19245, 338, 13235, 373, 385, 376, 3289, 8519, 29908, 350, 3289, 3235, 29892, 13, 29937, 259, 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, 259, 2823, 278, 19245, 363, 278, 2702, 4086, 14765, 1076, 11239, 322, 13, 29937, 259, 27028, 1090, 278, 19245, 29889, 13, 29937, 13, 13, 5215, 2897, 13, 5215, 10876, 13, 5215, 9909, 13, 3166, 3523, 5510, 1053, 10831, 11726, 13, 5215, 931, 13, 5215, 2281, 13, 5215, 5844, 13, 13, 1753, 679, 29918, 2997, 29918, 666, 7328, 7295, 13, 1678, 269, 353, 9909, 29889, 11514, 29898, 11514, 29889, 5098, 29918, 1177, 2544, 29892, 9909, 29889, 6156, 7077, 29918, 29928, 29954, 25058, 29897, 13, 1678, 269, 29889, 6915, 29898, 703, 21980, 29889, 510, 613, 29947, 29900, 876, 13, 1678, 10377, 7328, 353, 313, 29879, 29889, 657, 21852, 978, 580, 29961, 29900, 2314, 13, 1678, 269, 29889, 5358, 580, 13, 1678, 736, 10377, 7328, 13, 13, 13, 1753, 1889, 29918, 6519, 29918, 1220, 29898, 19218, 1125, 13, 1678, 5534, 5858, 29918, 8513, 13, 13, 1678, 13812, 353, 10831, 11726, 29898, 21125, 543, 21125, 29901, 1273, 29097, 518, 3385, 29962, 613, 1873, 543, 2890, 9219, 2726, 6883, 12477, 1159, 13, 1678, 13812, 29889, 1202, 29918, 3385, 29898, 13, 9651, 17411, 29875, 742, 525, 489, 2080, 742, 3158, 2433, 8899, 742, 1134, 2433, 1807, 742, 2731, 2433, 2080, 29918, 3972, 742, 13, 9651, 1371, 2433, 2697, 10567, 1967, 3884, 1495, 13, 1678, 13812, 29889, 1202, 29918, 3385, 29898, 13, 9651, 17411, 29879, 742, 525, 489, 2974, 742, 3158, 2433, 8899, 742, 1134, 2433, 1807, 742, 2731, 2433, 2974, 29918, 7328, 742, 2322, 543, 7640, 613, 13, 9651, 1371, 2433, 2697, 10567, 1967, 3884, 1495, 13, 1678, 13812, 29889, 1202, 29918, 3385, 29898, 13, 9651, 17411, 29886, 742, 525, 489, 637, 742, 3158, 2433, 8899, 742, 1134, 2433, 524, 742, 2731, 2433, 2974, 29918, 637, 742, 2322, 29922, 29929, 29900, 29929, 29945, 29892, 13, 9651, 1371, 2433, 2697, 10567, 1967, 3884, 1495, 13, 1678, 13812, 29889, 1202, 29918, 3385, 29898, 13, 9651, 17411, 29878, 742, 525, 489, 14358, 742, 3158, 2433, 8899, 742, 1134, 2433, 524, 742, 2731, 2433, 13082, 29918, 14358, 742, 2322, 29922, 29896, 29900, 29900, 29892, 13, 9651, 1371, 2433, 1123, 11666, 16791, 1353, 1495, 13, 1678, 6055, 29892, 6389, 353, 13812, 29889, 5510, 29918, 5085, 29898, 19218, 29897, 13, 1678, 565, 451, 7431, 29898, 5085, 29897, 1275, 29871, 29900, 29901, 13, 4706, 13812, 29889, 2704, 877, 8860, 4893, 694, 1899, 29899, 1220, 6273, 29936, 11860, 29879, 29908, 17262, 6169, 1273, 313, 5085, 29892, 876, 13, 268, 13, 1678, 565, 451, 6055, 29889, 2080, 29918, 3972, 29901, 13, 4706, 13812, 29889, 2704, 703, 2080, 3884, 947, 694, 4864, 472, 584, 29995, 29879, 29908, 1273, 313, 11027, 29889, 2080, 29918, 3972, 876, 13, 1678, 565, 451, 2897, 29889, 2084, 29889, 275, 3972, 29898, 11027, 29889, 2080, 29918, 3972, 1125, 13, 4706, 13812, 29889, 2704, 703, 2080, 3884, 947, 694, 4864, 472, 584, 29995, 29879, 29908, 1273, 313, 11027, 29889, 2080, 29918, 3972, 876, 13, 13, 1678, 736, 6055, 29892, 6389, 13, 13, 13, 1753, 3638, 29918, 3827, 29898, 7328, 29892, 2011, 29892, 10970, 29892, 11009, 29918, 14358, 1125, 13, 1678, 396, 3957, 13, 1678, 11009, 29918, 2798, 353, 29871, 29900, 13, 1678, 4511, 29918, 2962, 29918, 2230, 353, 931, 29889, 2230, 580, 13, 1678, 1550, 11009, 29918, 2798, 529, 11009, 29918, 14358, 29901, 13, 4706, 1018, 29901, 13, 9651, 1596, 376, 17918, 292, 17794, 13, 9651, 577, 384, 353, 9909, 29889, 11514, 29898, 11514, 29889, 5098, 29918, 1177, 2544, 29892, 9909, 29889, 6156, 7077, 29918, 1254, 1525, 5194, 29897, 13, 9651, 577, 384, 29889, 842, 1271, 292, 29898, 5574, 29897, 13, 9651, 577, 384, 29889, 6915, 3552, 7328, 29892, 2011, 876, 13, 9651, 11009, 29918, 2798, 4619, 29871, 29896, 13, 9651, 2867, 13, 4706, 5174, 9909, 29889, 2704, 29892, 10191, 29901, 13, 9651, 1596, 376, 5350, 5229, 29892, 337, 2202, 29908, 13, 9651, 577, 384, 29889, 5358, 580, 13, 9651, 931, 29889, 17059, 29898, 29900, 29889, 29896, 29897, 13, 13, 1678, 565, 313, 21852, 1275, 6213, 29897, 470, 313, 21852, 29889, 1777, 8154, 580, 5277, 29871, 29900, 1125, 13, 4706, 10876, 29889, 303, 20405, 29889, 3539, 703, 5350, 4418, 29881, 304, 313, 29995, 29879, 16664, 29881, 2144, 29876, 29908, 1273, 313, 7328, 29892, 2011, 876, 13, 4706, 10876, 29889, 13322, 29898, 29896, 29897, 13, 13, 1678, 4511, 29918, 355, 29918, 2230, 353, 931, 29889, 2230, 580, 13, 1678, 1596, 376, 17918, 292, 304, 313, 29995, 29879, 29892, 1273, 29881, 29897, 4893, 1273, 29888, 6923, 29908, 1273, 320, 13, 9651, 313, 7328, 29892, 2011, 29892, 313, 6915, 29918, 355, 29918, 2230, 29899, 6915, 29918, 2962, 29918, 2230, 876, 13, 13, 13, 1678, 396, 3638, 7274, 13, 1678, 1857, 29918, 19708, 353, 448, 29896, 13, 1678, 1596, 376, 3027, 29905, 29873, 2962, 29905, 29873, 355, 29905, 1594, 2633, 29905, 29873, 29926, 5171, 29908, 13, 1678, 363, 1269, 29918, 2080, 297, 10970, 29901, 13, 4706, 1369, 29918, 2230, 29918, 3827, 353, 931, 29889, 2230, 580, 334, 29871, 29896, 29900, 29900, 29900, 29889, 29900, 13, 4706, 7581, 353, 1722, 29898, 4204, 29918, 2080, 29892, 525, 6050, 2824, 949, 890, 13, 4706, 3240, 29918, 1272, 353, 831, 6925, 29918, 3827, 29898, 21852, 29892, 7581, 29897, 13, 13, 4706, 396, 1596, 1121, 13, 4706, 1095, 29918, 2230, 29918, 3827, 353, 931, 29889, 2230, 580, 334, 29871, 29896, 29900, 29900, 29900, 29889, 29900, 13, 4706, 12379, 29918, 19708, 353, 1857, 29918, 19708, 13, 4706, 1857, 29918, 19708, 353, 1095, 29918, 2230, 29918, 3827, 29899, 2962, 29918, 2230, 29918, 3827, 13, 13, 4706, 565, 12379, 29918, 19708, 1275, 448, 29896, 29901, 396, 16436, 2273, 2933, 13, 9651, 1596, 11860, 29879, 29905, 29873, 29995, 29900, 29896, 29946, 29889, 29906, 29888, 29905, 29873, 29995, 29900, 29896, 29946, 29889, 29906, 29888, 29905, 29873, 29995, 29900, 29896, 29946, 29889, 29906, 29888, 29905, 29873, 29900, 29908, 1273, 313, 4204, 29918, 2080, 29892, 1369, 29918, 2230, 29918, 3827, 2053, 13, 462, 1678, 1095, 29918, 2230, 29918, 3827, 29892, 320, 13, 462, 1678, 1095, 29918, 2230, 29918, 3827, 29899, 2962, 29918, 2230, 29918, 3827, 29897, 13, 4706, 1683, 29901, 13, 9651, 1596, 11860, 29879, 29905, 29873, 29995, 29900, 29896, 29946, 29889, 29906, 29888, 29905, 29873, 29995, 29900, 29896, 29946, 29889, 29906, 29888, 29905, 29873, 29995, 29900, 29896, 29946, 29889, 29906, 29888, 29905, 29873, 29995, 29900, 29896, 29946, 29889, 29906, 29888, 29908, 1273, 313, 4204, 29918, 2080, 29892, 4513, 29898, 2962, 29918, 2230, 29918, 3827, 29892, 29871, 29941, 511, 320, 13, 462, 1678, 1095, 29918, 2230, 29918, 3827, 29892, 320, 13, 462, 1678, 1857, 29918, 19708, 29892, 320, 13, 462, 1678, 5844, 29889, 29888, 6897, 29898, 3784, 29918, 19708, 29899, 16304, 29918, 19708, 876, 13, 13, 13, 1753, 831, 6925, 29918, 3827, 29898, 21852, 29892, 848, 1125, 13, 1678, 3309, 353, 7431, 29898, 1272, 29897, 13, 13, 1678, 396, 3638, 13, 1678, 577, 384, 29889, 6717, 497, 29898, 4984, 29889, 4058, 703, 29991, 29902, 613, 3309, 876, 13, 1678, 577, 384, 29889, 6717, 497, 29898, 1272, 29897, 13, 268, 13, 1678, 396, 3757, 29894, 13, 1678, 848, 353, 577, 384, 29889, 3757, 29894, 29898, 29946, 29897, 13, 1678, 3240, 29918, 2311, 353, 2281, 29889, 348, 4058, 703, 29991, 29902, 613, 848, 9601, 29900, 29962, 13, 268, 13, 1678, 3240, 29918, 1272, 353, 6629, 13, 1678, 565, 451, 3240, 29918, 2311, 1275, 29871, 29900, 29901, 13, 4706, 3240, 29918, 1272, 353, 577, 384, 29889, 3757, 29894, 29898, 2267, 29918, 2311, 29897, 13, 4706, 736, 3240, 29918, 1272, 13, 13, 1678, 736, 6213, 13, 13, 1753, 1667, 29898, 19218, 29922, 8516, 1125, 13, 1678, 5534, 11247, 29907, 1964, 29918, 5690, 17744, 26785, 13, 1678, 6055, 29892, 6389, 353, 1889, 29918, 6519, 29918, 1220, 29898, 9675, 29889, 19218, 29961, 29896, 29901, 2314, 13, 13, 1678, 2066, 353, 518, 359, 29889, 2084, 29889, 7122, 29898, 11027, 29889, 2080, 29918, 3972, 29892, 934, 29897, 363, 934, 297, 2897, 29889, 1761, 3972, 29898, 11027, 29889, 2080, 29918, 3972, 29897, 565, 934, 14352, 29941, 17531, 1275, 376, 6173, 29908, 470, 934, 14352, 29941, 17531, 1275, 376, 29967, 16903, 3108, 259, 13, 1678, 3638, 29918, 3827, 29898, 11027, 29889, 2974, 29918, 7328, 29892, 6055, 29889, 2974, 29918, 637, 29892, 2066, 29892, 6055, 29889, 13082, 29918, 14358, 29897, 13, 13, 1678, 736, 29871, 29900, 13, 13, 13, 361, 4770, 978, 1649, 1275, 376, 1649, 3396, 1649, 1115, 13, 1678, 4660, 353, 1667, 580, 13, 1678, 10876, 29889, 13322, 29898, 4882, 29897, 13, 2 ]
kenlm_training/tests/test_minify.py
ruinunca/data_tooling
435
30404
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # import json from pathlib import Path import pytest import cc_net import cc_net.minify as minify from cc_net import jsonql, process_wet_file from cc_net.minify import ( HASH_SIZE, decode_hashes, encode_hashes, encode_line_ids, get_hashes, ) def test_encode_decode(): sentences = ["Hello world !", "Is everyone happy in here ?"] hashes = get_hashes(sentences) assert all([len(h) == HASH_SIZE for h in hashes]) hashes_int = [minify._b2i(h) for h in hashes] encoded = encode_hashes(hashes) decoded = decode_hashes(encoded) assert all([len(d) == HASH_SIZE for d in decoded]) decoded_int = [minify._b2i(d) for d in decoded] assert hashes_int == decoded_int assert hashes == decoded def test_minify(): doc = { "raw_content": "Hello world !\nIs everyone happy in here ?", "language": "en", "perplexity": 120.0, "line_ids": [0, 4], } expected = {"line_ids": "AAAEAA==", "language": "en", "perplexity": 120.0} minifier = minify.Minifier() assert expected == minifier(doc) @pytest.fixture def http_from_disk(monkeypatch): def read_sample_file(url: str, n_retry: int = 3) -> bytes: expected_url = process_wet_file.WET_URL_ROOT + "/crawl-data/sample.warc.wet" assert expected_url == url file = Path(__file__).parent / "data" / "sample.warc.txt" return file.read_bytes() monkeypatch.setattr(cc_net.jsonql, "request_get_content", read_sample_file) def test_minify_and_fetch(http_from_disk, tmp_path: Path): full_quotes = """Don't part with your illusions. When they are gone you may still exist, but you have ceased to live. Education: that which reveals to the wise, and conceals from the stupid, the vast limits of their knowledge. Facts are stubborn things, but statistics are more pliable. Fiction is obliged to stick to possibilities. Truth isn't.""" # We don't need no education. chosen_quotes = "\n".join( l for l in full_quotes.splitlines() if "Education" not in l ) cc_doc = { "url": "http://sample_english.com", "date_download": "2019-03-18T00:00:00Z", "digest": "sha1:XQZHW7QWIG54HVAV3KPRW6MK5ILDNCER", "source_domain": "sample_english.com", "title": "Famous Mark Twain Quotes", "raw_content": full_quotes, "cc_segment": "crawl-data/sample.warc.wet", "nlines": 4, "length": 353, } ccnet_metadata = { "language": "en", "language_score": 0.99, "perplexity": 151.5, "bucket": "head", "raw_content": chosen_quotes, "nlines": 3, "length": len(chosen_quotes), "original_nlines": 4, "original_length": 353, "line_ids": [0, 2, 3], } ccnet_doc = dict(cc_doc, **ccnet_metadata) mini = minify.Minifier()(ccnet_doc.copy()) assert mini is not ccnet_doc important_fields = [ "url", "digest", "cc_segment", "language", "language_score", "perplexity", "bucket", "line_ids", ] expected = {k: ccnet_doc[k] for k in important_fields} expected["line_ids"] = encode_line_ids(expected["line_ids"]) # type: ignore assert expected == mini with jsonql.open_write(tmp_path / "sample.json") as o: print(json.dumps(mini), file=o) fetcher = minify.MetadataFetcher(tmp_path) # line_ids is removed when unminifying ccnet_doc.pop("line_ids") assert ccnet_doc == fetcher(cc_doc) def test_fetch(http_from_disk, tmp_path: Path): mini_docs = [ { "url": "http://sample_chinese.com", "digest": "sha1:Y4E6URVYGIAFNVRTPZ5S3J64RTZTP6HJ", "cc_segment": "crawl-data/sample.warc.wet", "line_ids": encode_line_ids([2]), "bucket": "not_that_great", }, { "url": "http://sample_english.com", "digest": "sha1:XQZHW7QWIG54HVAV3KPRW6MK5ILDNCER", "cc_segment": "crawl-data/sample.warc.wet", "line_ids": encode_line_ids([3]), "bucket": "top_notch", }, ] with jsonql.open_write(tmp_path / "sample.json") as o: for mini in mini_docs: print(json.dumps(mini), file=o) fetcher = minify.MetadataFetcher(tmp_path) cc = process_wet_file.CCSegmentsReader(["crawl-data/sample.warc.wet"]) docs = [d for d in fetcher.map(cc) if d is not None] assert cc.retrieved_segments == 1 # Note: documents are retrieved as they are ordered in the .warc.wet file assert [ "Facts are stubborn things, but statistics are more pliable.", "事實是固執的東西,但統計數字卻比較柔和。", ] == [d["raw_content"] for d in docs] assert ["top_notch", "not_that_great"] == [d["bucket"] for d in docs]
[ 1, 396, 14187, 1266, 313, 29883, 29897, 13327, 29892, 9266, 29889, 322, 967, 23736, 1078, 29889, 13, 29937, 13, 29937, 910, 2752, 775, 338, 7794, 21144, 1090, 278, 341, 1806, 19405, 1476, 297, 278, 13, 29937, 365, 2965, 1430, 1660, 934, 297, 278, 3876, 3884, 310, 445, 2752, 5447, 29889, 13, 29937, 13, 13, 5215, 4390, 13, 3166, 2224, 1982, 1053, 10802, 13, 13, 5215, 11451, 1688, 13, 13, 5215, 21759, 29918, 1212, 13, 5215, 21759, 29918, 1212, 29889, 1195, 1598, 408, 1375, 1598, 13, 3166, 21759, 29918, 1212, 1053, 4390, 1519, 29892, 1889, 29918, 29893, 300, 29918, 1445, 13, 3166, 21759, 29918, 1212, 29889, 1195, 1598, 1053, 313, 13, 1678, 379, 24943, 29918, 14226, 29892, 13, 1678, 21822, 29918, 8568, 267, 29892, 13, 1678, 19750, 29918, 8568, 267, 29892, 13, 1678, 19750, 29918, 1220, 29918, 4841, 29892, 13, 1678, 679, 29918, 8568, 267, 29892, 13, 29897, 13, 13, 13, 1753, 1243, 29918, 12508, 29918, 13808, 7295, 13, 1678, 25260, 353, 6796, 10994, 3186, 1738, 613, 376, 3624, 14332, 9796, 297, 1244, 1577, 3108, 13, 1678, 6608, 267, 353, 679, 29918, 8568, 267, 29898, 18616, 2063, 29897, 13, 1678, 4974, 599, 4197, 2435, 29898, 29882, 29897, 1275, 379, 24943, 29918, 14226, 363, 298, 297, 6608, 267, 2314, 13, 1678, 6608, 267, 29918, 524, 353, 518, 1195, 1598, 3032, 29890, 29906, 29875, 29898, 29882, 29897, 363, 298, 297, 6608, 267, 29962, 13, 1678, 18511, 353, 19750, 29918, 8568, 267, 29898, 8568, 267, 29897, 13, 1678, 1602, 6797, 353, 21822, 29918, 8568, 267, 29898, 26716, 29897, 13, 1678, 4974, 599, 4197, 2435, 29898, 29881, 29897, 1275, 379, 24943, 29918, 14226, 363, 270, 297, 1602, 6797, 2314, 13, 13, 1678, 1602, 6797, 29918, 524, 353, 518, 1195, 1598, 3032, 29890, 29906, 29875, 29898, 29881, 29897, 363, 270, 297, 1602, 6797, 29962, 13, 13, 1678, 4974, 6608, 267, 29918, 524, 1275, 1602, 6797, 29918, 524, 13, 1678, 4974, 6608, 267, 1275, 1602, 6797, 13, 13, 13, 1753, 1243, 29918, 1195, 1598, 7295, 13, 1678, 1574, 353, 426, 13, 4706, 376, 1610, 29918, 3051, 1115, 376, 10994, 3186, 1738, 29905, 29876, 3624, 14332, 9796, 297, 1244, 1577, 613, 13, 4706, 376, 11675, 1115, 376, 264, 613, 13, 4706, 376, 546, 10709, 537, 1115, 29871, 29896, 29906, 29900, 29889, 29900, 29892, 13, 4706, 376, 1220, 29918, 4841, 1115, 518, 29900, 29892, 29871, 29946, 1402, 13, 1678, 500, 13, 1678, 3806, 353, 8853, 1220, 29918, 4841, 1115, 376, 6344, 16036, 6344, 26359, 29892, 376, 11675, 1115, 376, 264, 613, 376, 546, 10709, 537, 1115, 29871, 29896, 29906, 29900, 29889, 29900, 29913, 13, 1678, 1375, 3709, 353, 1375, 1598, 29889, 8140, 3709, 580, 13, 1678, 4974, 3806, 1275, 1375, 3709, 29898, 1514, 29897, 13, 13, 13, 29992, 2272, 1688, 29889, 7241, 15546, 13, 1753, 1732, 29918, 3166, 29918, 20960, 29898, 3712, 446, 1478, 905, 1125, 13, 1678, 822, 1303, 29918, 11249, 29918, 1445, 29898, 2271, 29901, 851, 29892, 302, 29918, 276, 2202, 29901, 938, 353, 29871, 29941, 29897, 1599, 6262, 29901, 13, 4706, 3806, 29918, 2271, 353, 1889, 29918, 29893, 300, 29918, 1445, 29889, 29956, 2544, 29918, 4219, 29918, 21289, 718, 5591, 29883, 1610, 29880, 29899, 1272, 29914, 11249, 29889, 4495, 29883, 29889, 29893, 300, 29908, 13, 4706, 4974, 3806, 29918, 2271, 1275, 3142, 13, 4706, 934, 353, 10802, 22168, 1445, 1649, 467, 3560, 847, 376, 1272, 29908, 847, 376, 11249, 29889, 4495, 29883, 29889, 3945, 29908, 13, 4706, 736, 934, 29889, 949, 29918, 13193, 580, 13, 13, 1678, 1601, 446, 1478, 905, 29889, 842, 5552, 29898, 617, 29918, 1212, 29889, 3126, 1519, 29892, 376, 3827, 29918, 657, 29918, 3051, 613, 1303, 29918, 11249, 29918, 1445, 29897, 13, 13, 13, 1753, 1243, 29918, 1195, 1598, 29918, 392, 29918, 9155, 29898, 1124, 29918, 3166, 29918, 20960, 29892, 13128, 29918, 2084, 29901, 10802, 1125, 13, 1678, 2989, 29918, 339, 4769, 353, 9995, 10310, 29915, 29873, 760, 411, 596, 4486, 375, 1080, 29889, 1932, 896, 526, 7695, 366, 1122, 1603, 1863, 29892, 541, 366, 505, 24886, 304, 5735, 29889, 13, 29923, 29392, 29901, 393, 607, 10320, 1338, 304, 278, 19396, 29892, 322, 10628, 1338, 515, 278, 20239, 29892, 278, 13426, 13071, 310, 1009, 7134, 29889, 13, 20738, 29879, 526, 19281, 4939, 2712, 29892, 541, 13964, 526, 901, 282, 492, 519, 29889, 13, 29943, 2463, 338, 24474, 304, 12070, 304, 24496, 29889, 1605, 2806, 3508, 29915, 29873, 1213, 15945, 13, 1678, 396, 1334, 1016, 29915, 29873, 817, 694, 9793, 29889, 13, 1678, 10434, 29918, 339, 4769, 353, 6634, 29876, 1642, 7122, 29898, 13, 4706, 301, 363, 301, 297, 2989, 29918, 339, 4769, 29889, 5451, 9012, 580, 565, 376, 29923, 29392, 29908, 451, 297, 301, 13, 1678, 1723, 13, 13, 1678, 21759, 29918, 1514, 353, 426, 13, 4706, 376, 2271, 1115, 376, 1124, 597, 11249, 29918, 996, 1674, 29889, 510, 613, 13, 4706, 376, 1256, 29918, 10382, 1115, 376, 29906, 29900, 29896, 29929, 29899, 29900, 29941, 29899, 29896, 29947, 29911, 29900, 29900, 29901, 29900, 29900, 29901, 29900, 29900, 29999, 613, 13, 4706, 376, 7501, 342, 1115, 376, 17051, 29896, 29901, 29990, 29984, 29999, 29950, 29956, 29955, 29984, 29956, 6259, 29945, 29946, 29950, 29963, 7520, 29941, 29968, 10593, 29956, 29953, 29924, 29968, 29945, 6227, 29928, 15868, 1001, 613, 13, 4706, 376, 4993, 29918, 7247, 1115, 376, 11249, 29918, 996, 1674, 29889, 510, 613, 13, 4706, 376, 3257, 1115, 376, 29943, 314, 681, 4485, 8168, 475, 751, 4769, 613, 13, 4706, 376, 1610, 29918, 3051, 1115, 2989, 29918, 339, 4769, 29892, 13, 4706, 376, 617, 29918, 28192, 1115, 376, 29883, 1610, 29880, 29899, 1272, 29914, 11249, 29889, 4495, 29883, 29889, 29893, 300, 613, 13, 4706, 376, 29876, 9012, 1115, 29871, 29946, 29892, 13, 4706, 376, 2848, 1115, 29871, 29941, 29945, 29941, 29892, 13, 1678, 500, 13, 13, 1678, 21759, 1212, 29918, 19635, 353, 426, 13, 4706, 376, 11675, 1115, 376, 264, 613, 13, 4706, 376, 11675, 29918, 13628, 1115, 29871, 29900, 29889, 29929, 29929, 29892, 13, 4706, 376, 546, 10709, 537, 1115, 29871, 29896, 29945, 29896, 29889, 29945, 29892, 13, 4706, 376, 21454, 1115, 376, 2813, 613, 13, 4706, 376, 1610, 29918, 3051, 1115, 10434, 29918, 339, 4769, 29892, 13, 4706, 376, 29876, 9012, 1115, 29871, 29941, 29892, 13, 4706, 376, 2848, 1115, 7431, 29898, 305, 7749, 29918, 339, 4769, 511, 13, 4706, 376, 13492, 29918, 29876, 9012, 1115, 29871, 29946, 29892, 13, 4706, 376, 13492, 29918, 2848, 1115, 29871, 29941, 29945, 29941, 29892, 13, 4706, 376, 1220, 29918, 4841, 1115, 518, 29900, 29892, 29871, 29906, 29892, 29871, 29941, 1402, 13, 1678, 500, 13, 1678, 21759, 1212, 29918, 1514, 353, 9657, 29898, 617, 29918, 1514, 29892, 3579, 617, 1212, 29918, 19635, 29897, 13, 1678, 20629, 353, 1375, 1598, 29889, 8140, 3709, 580, 29898, 617, 1212, 29918, 1514, 29889, 8552, 3101, 13, 1678, 4974, 20629, 338, 451, 21759, 1212, 29918, 1514, 13, 13, 1678, 4100, 29918, 9621, 353, 518, 13, 4706, 376, 2271, 613, 13, 4706, 376, 7501, 342, 613, 13, 4706, 376, 617, 29918, 28192, 613, 13, 4706, 376, 11675, 613, 13, 4706, 376, 11675, 29918, 13628, 613, 13, 4706, 376, 546, 10709, 537, 613, 13, 4706, 376, 21454, 613, 13, 4706, 376, 1220, 29918, 4841, 613, 13, 1678, 4514, 13, 1678, 3806, 353, 426, 29895, 29901, 21759, 1212, 29918, 1514, 29961, 29895, 29962, 363, 413, 297, 4100, 29918, 9621, 29913, 13, 1678, 3806, 3366, 1220, 29918, 4841, 3108, 353, 19750, 29918, 1220, 29918, 4841, 29898, 9684, 3366, 1220, 29918, 4841, 20068, 29871, 396, 1134, 29901, 11455, 13, 1678, 4974, 3806, 1275, 20629, 13, 13, 1678, 411, 4390, 1519, 29889, 3150, 29918, 3539, 29898, 7050, 29918, 2084, 847, 376, 11249, 29889, 3126, 1159, 408, 288, 29901, 13, 4706, 1596, 29898, 3126, 29889, 29881, 17204, 29898, 1195, 29875, 511, 934, 29922, 29877, 29897, 13, 1678, 6699, 261, 353, 1375, 1598, 29889, 18417, 20927, 261, 29898, 7050, 29918, 2084, 29897, 13, 1678, 396, 1196, 29918, 4841, 338, 6206, 746, 443, 1195, 9215, 13, 1678, 21759, 1212, 29918, 1514, 29889, 7323, 703, 1220, 29918, 4841, 1159, 13, 1678, 4974, 21759, 1212, 29918, 1514, 1275, 6699, 261, 29898, 617, 29918, 1514, 29897, 13, 13, 13, 1753, 1243, 29918, 9155, 29898, 1124, 29918, 3166, 29918, 20960, 29892, 13128, 29918, 2084, 29901, 10802, 1125, 13, 1678, 20629, 29918, 2640, 353, 518, 13, 4706, 426, 13, 9651, 376, 2271, 1115, 376, 1124, 597, 11249, 29918, 305, 8233, 29889, 510, 613, 13, 9651, 376, 7501, 342, 1115, 376, 17051, 29896, 29901, 29979, 29946, 29923, 29953, 4574, 29963, 29979, 29954, 29902, 5098, 29940, 29963, 29934, 3557, 29999, 29945, 29903, 29941, 29967, 29953, 29946, 13079, 29999, 3557, 29953, 29950, 29967, 613, 13, 9651, 376, 617, 29918, 28192, 1115, 376, 29883, 1610, 29880, 29899, 1272, 29914, 11249, 29889, 4495, 29883, 29889, 29893, 300, 613, 13, 9651, 376, 1220, 29918, 4841, 1115, 19750, 29918, 1220, 29918, 4841, 4197, 29906, 11724, 13, 9651, 376, 21454, 1115, 376, 1333, 29918, 5747, 29918, 7979, 271, 613, 13, 4706, 2981, 13, 4706, 426, 13, 9651, 376, 2271, 1115, 376, 1124, 597, 11249, 29918, 996, 1674, 29889, 510, 613, 13, 9651, 376, 7501, 342, 1115, 376, 17051, 29896, 29901, 29990, 29984, 29999, 29950, 29956, 29955, 29984, 29956, 6259, 29945, 29946, 29950, 29963, 7520, 29941, 29968, 10593, 29956, 29953, 29924, 29968, 29945, 6227, 29928, 15868, 1001, 613, 13, 9651, 376, 617, 29918, 28192, 1115, 376, 29883, 1610, 29880, 29899, 1272, 29914, 11249, 29889, 4495, 29883, 29889, 29893, 300, 613, 13, 9651, 376, 1220, 29918, 4841, 1115, 19750, 29918, 1220, 29918, 4841, 4197, 29941, 11724, 13, 9651, 376, 21454, 1115, 376, 3332, 29918, 1333, 305, 613, 13, 4706, 2981, 13, 1678, 4514, 13, 1678, 411, 4390, 1519, 29889, 3150, 29918, 3539, 29898, 7050, 29918, 2084, 847, 376, 11249, 29889, 3126, 1159, 408, 288, 29901, 13, 4706, 363, 20629, 297, 20629, 29918, 2640, 29901, 13, 9651, 1596, 29898, 3126, 29889, 29881, 17204, 29898, 1195, 29875, 511, 934, 29922, 29877, 29897, 13, 13, 1678, 6699, 261, 353, 1375, 1598, 29889, 18417, 20927, 261, 29898, 7050, 29918, 2084, 29897, 13, 1678, 21759, 353, 1889, 29918, 29893, 300, 29918, 1445, 29889, 4174, 17669, 1860, 6982, 29898, 3366, 29883, 1610, 29880, 29899, 1272, 29914, 11249, 29889, 4495, 29883, 29889, 29893, 300, 20068, 13, 1678, 10561, 353, 518, 29881, 363, 270, 297, 6699, 261, 29889, 1958, 29898, 617, 29897, 565, 270, 338, 451, 6213, 29962, 13, 1678, 4974, 21759, 29889, 276, 509, 6402, 29918, 10199, 1860, 1275, 29871, 29896, 13, 13, 1678, 396, 3940, 29901, 10701, 526, 27387, 408, 896, 526, 10372, 297, 278, 869, 4495, 29883, 29889, 29893, 300, 934, 13, 1678, 4974, 518, 13, 4706, 376, 20738, 29879, 526, 19281, 4939, 2712, 29892, 541, 13964, 526, 901, 282, 492, 519, 19602, 13, 4706, 376, 30745, 232, 178, 169, 30392, 232, 158, 189, 232, 162, 186, 30210, 30591, 30602, 30214, 231, 192, 137, 234, 184, 180, 31970, 233, 152, 187, 30578, 232, 144, 190, 31419, 235, 191, 134, 233, 162, 151, 30503, 30267, 613, 13, 1678, 4514, 1275, 518, 29881, 3366, 1610, 29918, 3051, 3108, 363, 270, 297, 10561, 29962, 13, 1678, 4974, 6796, 3332, 29918, 1333, 305, 613, 376, 1333, 29918, 5747, 29918, 7979, 271, 3108, 1275, 518, 29881, 3366, 21454, 3108, 363, 270, 297, 10561, 29962, 13, 2 ]
q2_autopepsirf/actions/diffEnrich.py
Annabelle-Brown/q2-autopepsirf
0
150398
<reponame>Annabelle-Brown/q2-autopepsirf import pandas as pd import qiime2 from collections import defaultdict import csv, os from q2_pepsirf.format_types import PepsirfInfoSumOfProbesFmt, PepsirfInfoSNPNFormat, PepsirfContingencyTSVFormat, ZscoreNanFormat, EnrichedPeptideDirFmt # Name: diffenrich # Process: automatically runs through q2-ps-plot modules and q2-pepsirf modules # Method Input/Parameters: default ctx, raw_data, bins, negative_controls, negative_ids, # negative_names, thresh_file, exact_z_thresh, exact_zenrich_thresh, step_z_thresh, # upper_z_thresh, lower_z_thresh, raw_constraint, pepsirf_binary # Method output/Returned: col_sum, diff, diff_ratio, zscore_out, nan_out, sample_names, # read_counts, rc_boxplot_out, enrich_dir, enrichedCountsBoxplot, zscore_scatter, colsum_scatter # Dependencies: (ps-plot: raedCountsBoxplot, enrichmentRCBoxplot, repScatters, zenrich), # (pepsirf: norm, zscore, infoSNPN, infoSumOfProbes, enrich) def diffEnrich( ctx, raw_data, bins, negative_control=None, negative_id=None, negative_names=None, thresh_file = None, exact_z_thresh = None, exact_cs_thresh = None, exact_zenrich_thresh = None, pepsirf_tsv_dir = "./", tsv_base_str = None, step_z_thresh = 5, upper_z_thresh = 30, lower_z_thresh = 5, raw_constraint = 300000, pepsirf_binary = "pepsirf" ): if pepsirf_tsv_dir: if not os.path.isdir(pepsirf_tsv_dir): os.mkdir(pepsirf_tsv_dir) # collect the actions from ps-plot and q2-pepsirf to be executed norm = ctx.get_action('pepsirf', 'norm') zscore = ctx.get_action('pepsirf', 'zscore') infoSNPN = ctx.get_action('pepsirf', 'infoSNPN') enrich = ctx.get_action('pepsirf', 'enrich') infoSOP = ctx.get_action('pepsirf', 'infoSumOfProbes') RCBoxplot = ctx.get_action('ps-plot', 'readCountsBoxplot') enrichBoxplot = ctx.get_action('ps-plot', 'enrichmentRCBoxplot') repScatter = ctx.get_action('ps-plot', 'repScatters') zenrich = ctx.get_action('ps-plot', 'zenrich') # run norm module to recieved col-sum col_sum, = norm(peptide_scores = raw_data, normalize_approach = "col_sum", negative_control = None, negative_id = None, negative_names = None, precision = 2, pepsirf_binary = pepsirf_binary) if pepsirf_tsv_dir and tsv_base_str: cs_base = "%s_CS.tsv" % (tsv_base_str) cs_tsv = col_sum.view(PepsirfContingencyTSVFormat) cs_tsv.save(os.path.join(pepsirf_tsv_dir, cs_base), ext = ".tsv") #requires qiime2-2021.11 # run norm module to recieve diff diff, = norm(peptide_scores = col_sum, normalize_approach = "diff", negative_control = negative_control, negative_id = negative_id, negative_names = negative_names, precision = 2, pepsirf_binary = pepsirf_binary) if pepsirf_tsv_dir and tsv_base_str: diff_base = "%s_SBD.tsv" % (tsv_base_str) diff_tsv = diff.view(PepsirfContingencyTSVFormat) diff_tsv.save(os.path.join(pepsirf_tsv_dir, diff_base), ext = ".tsv") # run norm module to recieve diff-ratio diff_ratio, = norm(peptide_scores = col_sum, normalize_approach = "diff_ratio", negative_control = negative_control, negative_id = negative_id, negative_names = negative_names, precision = 2, pepsirf_binary = pepsirf_binary) if pepsirf_tsv_dir and tsv_base_str: diffR_base = "%s_SBDR.tsv" % (tsv_base_str) diffR_tsv = diff_ratio.view(PepsirfContingencyTSVFormat) diffR_tsv.save(os.path.join(pepsirf_tsv_dir, diffR_base), ext = ".tsv") # run zscore module to recieve zscore and nan files zscore_out, nan_out = zscore( scores = diff, bins = bins, hdi = 0.95, pepsirf_binary = pepsirf_binary ) if pepsirf_tsv_dir and tsv_base_str: zscore_base = "%s_Z-HDI95.tsv" % (tsv_base_str) zscore_tsv = zscore_out.view(PepsirfContingencyTSVFormat) zscore_tsv.save(os.path.join(pepsirf_tsv_dir, zscore_base), ext = ".tsv") nan_base = "%s_Z-HDI95.nan" % (tsv_base_str) nan_tsv = nan_out.view(ZscoreNanFormat) nan_tsv.save(os.path.join(pepsirf_tsv_dir, nan_base), ext = ".nan") # run info module to collect sample names sample_names, = infoSNPN( input = raw_data, get = "samples", pepsirf_binary = pepsirf_binary ) if pepsirf_tsv_dir and tsv_base_str: sn_base = "%s_SN.tsv" % (tsv_base_str) sn_tsv = sample_names.view(PepsirfInfoSNPNFormat) sn_tsv.save(os.path.join(pepsirf_tsv_dir, sn_base), ext = ".tsv") # run info to collect read counts read_counts, = infoSOP( input = raw_data, pepsirf_binary = pepsirf_binary ) if pepsirf_tsv_dir and tsv_base_str: rc_base = "%s_RC.tsv" % (tsv_base_str) rc_tsv = read_counts.view(PepsirfInfoSumOfProbesFmt) rc_tsv.save(os.path.join(pepsirf_tsv_dir, rc_base), ext = ".tsv") # run readCounts boxplot module to recieve visualization rc_boxplot_out, = RCBoxplot( read_counts = read_counts, png_out_dir = pepsirf_tsv_dir ) # create variables for source file creation sourceDic = defaultdict(list) sampleNM = sample_names.view(PepsirfInfoSNPNFormat) source = os.path.join(pepsirf_tsv_dir, "samples_source.tsv") # create list for collection of sample names if not negative_names: negative_names = [] # open samples file and collect samples into a dictionary with open( str(sampleNM) ) as SN: for line in SN: sample = line.strip() sourceLS = sample.rsplit('_', 1) sourced = sourceLS[0] sourceDic[sourced].append(sample) if not negative_names: negative_names.append(sample) # create a source file written with column 1 as the sample names # and the column 2 as the source column # the source file will be put in the tsv directory with open( source , "w" ) as tsvWriter: writer = csv.writer(tsvWriter, delimiter='\t') writer.writerow(['sampleID', 'source']) for srce, samples in sourceDic.items(): for name in samples: writer.writerow([name, srce]) # convert source file to metadata column to be used within the modules source_col = qiime2.Metadata.load(source).get_column("source") # run enrich module enrich_dir, = enrich( source = source_col, thresh_file = thresh_file, zscores = zscore_out, col_sum = col_sum, exact_z_thresh = exact_z_thresh, exact_cs_thresh = exact_cs_thresh, raw_scores = raw_data, raw_constraint = raw_constraint, enrichment_failure = True, pepsirf_binary = pepsirf_binary ) print("enrich working") if pepsirf_tsv_dir and tsv_base_str: enrich_base = "enriched" enrich_tsv = enrich_dir.view(EnrichedPeptideDirFmt) enrich_tsv.save(os.path.join(pepsirf_tsv_dir, enrich_base)) # run enrichment boxplot module to recieve visualization enrichedCountsBoxplot, = enrichBoxplot( enriched_dir = enrich_dir, png_out_dir = pepsirf_tsv_dir ) # run repScatter module to collect visualization zscore_scatter, = repScatter( source = source_col, plot_log = False, zscore = zscore_out ) # run repScatter module to collect visualization colsum_scatter, = repScatter( source = source_col, plot_log = True, col_sum = col_sum ) # run the zenrich module to collect visualization zenrich_out, = zenrich( data = col_sum, zscores = zscore_out, negative_controls = negative_names, source = source_col, negative_data = negative_control, step_z_thresh = step_z_thresh, upper_z_thresh = upper_z_thresh, lower_z_thresh = lower_z_thresh, exact_z_thresh = exact_zenrich_thresh, pepsirf_binary = pepsirf_binary ) # return all files created return ( col_sum, diff, diff_ratio, zscore_out, nan_out, sample_names, read_counts, rc_boxplot_out, enrich_dir, enrichedCountsBoxplot, zscore_scatter, colsum_scatter, zenrich_out )
[ 1, 529, 276, 1112, 420, 29958, 2744, 29876, 1107, 280, 29899, 29933, 4708, 29914, 29939, 29906, 29899, 1300, 2300, 567, 381, 29888, 13, 5215, 11701, 408, 10518, 30004, 13, 5215, 3855, 29875, 603, 29906, 30004, 13, 3166, 16250, 1053, 2322, 8977, 30004, 13, 5215, 11799, 29892, 2897, 30004, 13, 30004, 13, 3166, 3855, 29906, 29918, 412, 567, 381, 29888, 29889, 4830, 29918, 8768, 1053, 3938, 567, 381, 29888, 3401, 11139, 2776, 1184, 5707, 29943, 4378, 29892, 3938, 567, 381, 29888, 3401, 19296, 15695, 5809, 29892, 3938, 567, 381, 29888, 1323, 292, 3819, 29911, 7597, 5809, 29892, 796, 13628, 29940, 273, 5809, 29892, 1174, 4018, 287, 15666, 415, 680, 9170, 29943, 4378, 30004, 13, 30004, 13, 29937, 4408, 29901, 2923, 264, 4018, 30004, 13, 29937, 10554, 29901, 6336, 6057, 1549, 3855, 29906, 29899, 567, 29899, 5317, 10585, 322, 3855, 29906, 29899, 412, 567, 381, 29888, 10585, 30004, 13, 29937, 8108, 10567, 29914, 11507, 29901, 2322, 12893, 29892, 10650, 29918, 1272, 29892, 289, 1144, 29892, 8178, 29918, 26255, 29892, 8178, 29918, 4841, 11167, 13, 29937, 8178, 29918, 7039, 29892, 266, 3781, 29918, 1445, 29892, 2684, 29918, 29920, 29918, 386, 3781, 29892, 2684, 29918, 2256, 4018, 29918, 386, 3781, 29892, 4331, 29918, 29920, 29918, 386, 3781, 11167, 13, 29937, 7568, 29918, 29920, 29918, 386, 3781, 29892, 5224, 29918, 29920, 29918, 386, 3781, 29892, 10650, 29918, 13646, 29892, 1236, 567, 381, 29888, 29918, 19541, 30004, 13, 29937, 8108, 1962, 29914, 11609, 287, 29901, 784, 29918, 2083, 29892, 2923, 29892, 2923, 29918, 3605, 601, 29892, 503, 13628, 29918, 449, 29892, 23432, 29918, 449, 29892, 4559, 29918, 7039, 11167, 13, 29937, 1303, 29918, 2798, 29879, 29892, 364, 29883, 29918, 1884, 5317, 29918, 449, 29892, 427, 4018, 29918, 3972, 29892, 427, 4018, 287, 3981, 29879, 3313, 5317, 29892, 503, 13628, 29918, 1557, 2620, 29892, 784, 2083, 29918, 1557, 2620, 30004, 13, 29937, 10034, 7158, 29901, 313, 567, 29899, 5317, 29901, 1153, 287, 3981, 29879, 3313, 5317, 29892, 427, 4018, 358, 10363, 3313, 5317, 29892, 1634, 29903, 4117, 2153, 29892, 503, 264, 4018, 511, 6756, 13, 29937, 313, 412, 567, 381, 29888, 29901, 6056, 29892, 503, 13628, 29892, 5235, 19296, 15695, 29892, 5235, 11139, 2776, 1184, 5707, 29892, 427, 4018, 8443, 13, 1753, 2923, 2369, 4018, 29898, 30004, 13, 1678, 12893, 11167, 13, 1678, 10650, 29918, 1272, 11167, 13, 1678, 289, 1144, 11167, 13, 1678, 8178, 29918, 6451, 29922, 8516, 11167, 13, 1678, 8178, 29918, 333, 29922, 8516, 11167, 13, 1678, 8178, 29918, 7039, 29922, 8516, 11167, 13, 1678, 266, 3781, 29918, 1445, 353, 6213, 11167, 13, 1678, 2684, 29918, 29920, 29918, 386, 3781, 353, 6213, 11167, 13, 1678, 2684, 29918, 2395, 29918, 386, 3781, 353, 6213, 11167, 13, 1678, 2684, 29918, 2256, 4018, 29918, 386, 3781, 353, 6213, 11167, 13, 1678, 1236, 567, 381, 29888, 29918, 1372, 29894, 29918, 3972, 353, 376, 6904, 15231, 13, 1678, 260, 4501, 29918, 3188, 29918, 710, 353, 6213, 11167, 13, 1678, 4331, 29918, 29920, 29918, 386, 3781, 353, 29871, 29945, 11167, 13, 1678, 7568, 29918, 29920, 29918, 386, 3781, 353, 29871, 29941, 29900, 11167, 13, 1678, 5224, 29918, 29920, 29918, 386, 3781, 353, 29871, 29945, 11167, 13, 1678, 10650, 29918, 13646, 353, 29871, 29941, 29900, 29900, 29900, 29900, 29900, 11167, 13, 1678, 1236, 567, 381, 29888, 29918, 19541, 353, 376, 412, 567, 381, 29888, 19451, 13, 1125, 30004, 13, 1678, 565, 1236, 567, 381, 29888, 29918, 1372, 29894, 29918, 3972, 29901, 30004, 13, 4706, 565, 451, 2897, 29889, 2084, 29889, 275, 3972, 29898, 412, 567, 381, 29888, 29918, 1372, 29894, 29918, 3972, 1125, 30004, 13, 9651, 2897, 29889, 11256, 3972, 29898, 412, 567, 381, 29888, 29918, 1372, 29894, 29918, 3972, 8443, 13, 30004, 13, 1678, 396, 6314, 278, 8820, 515, 6529, 29899, 5317, 322, 3855, 29906, 29899, 412, 567, 381, 29888, 304, 367, 8283, 30004, 13, 1678, 6056, 353, 12893, 29889, 657, 29918, 2467, 877, 412, 567, 381, 29888, 742, 525, 12324, 1495, 30004, 13, 1678, 503, 13628, 353, 12893, 29889, 657, 29918, 2467, 877, 412, 567, 381, 29888, 742, 525, 29920, 13628, 1495, 30004, 13, 1678, 5235, 19296, 15695, 353, 12893, 29889, 657, 29918, 2467, 877, 412, 567, 381, 29888, 742, 525, 3888, 19296, 15695, 1495, 30004, 13, 1678, 427, 4018, 353, 12893, 29889, 657, 29918, 2467, 877, 412, 567, 381, 29888, 742, 525, 264, 4018, 1495, 30004, 13, 1678, 5235, 29903, 4590, 353, 12893, 29889, 657, 29918, 2467, 877, 412, 567, 381, 29888, 742, 525, 3888, 11139, 2776, 1184, 5707, 1495, 30004, 13, 1678, 29138, 3313, 5317, 353, 12893, 29889, 657, 29918, 2467, 877, 567, 29899, 5317, 742, 525, 949, 3981, 29879, 3313, 5317, 1495, 30004, 13, 1678, 427, 4018, 3313, 5317, 353, 12893, 29889, 657, 29918, 2467, 877, 567, 29899, 5317, 742, 525, 264, 4018, 358, 10363, 3313, 5317, 1495, 30004, 13, 1678, 1634, 4421, 2620, 353, 12893, 29889, 657, 29918, 2467, 877, 567, 29899, 5317, 742, 525, 3445, 29903, 4117, 2153, 1495, 30004, 13, 1678, 503, 264, 4018, 353, 12893, 29889, 657, 29918, 2467, 877, 567, 29899, 5317, 742, 525, 2256, 4018, 1495, 30004, 13, 30004, 13, 1678, 396, 1065, 6056, 3883, 304, 1162, 6402, 784, 29899, 2083, 30004, 13, 1678, 784, 29918, 2083, 29892, 353, 6056, 29898, 412, 415, 680, 29918, 1557, 2361, 353, 10650, 29918, 1272, 11167, 13, 462, 1678, 4226, 675, 29918, 9961, 496, 353, 376, 1054, 29918, 2083, 15231, 13, 462, 1678, 8178, 29918, 6451, 353, 6213, 11167, 13, 462, 1678, 8178, 29918, 333, 353, 6213, 11167, 13, 462, 1678, 8178, 29918, 7039, 353, 6213, 11167, 13, 462, 1678, 16716, 353, 29871, 29906, 11167, 13, 462, 1678, 1236, 567, 381, 29888, 29918, 19541, 353, 1236, 567, 381, 29888, 29918, 19541, 8443, 13, 30004, 13, 1678, 565, 1236, 567, 381, 29888, 29918, 1372, 29894, 29918, 3972, 322, 260, 4501, 29918, 3188, 29918, 710, 29901, 30004, 13, 4706, 5939, 29918, 3188, 353, 11860, 29879, 29918, 9295, 29889, 1372, 29894, 29908, 1273, 313, 1372, 29894, 29918, 3188, 29918, 710, 8443, 13, 4706, 5939, 29918, 1372, 29894, 353, 784, 29918, 2083, 29889, 1493, 29898, 29925, 8961, 381, 29888, 1323, 292, 3819, 29911, 7597, 5809, 8443, 13, 4706, 5939, 29918, 1372, 29894, 29889, 7620, 29898, 359, 29889, 2084, 29889, 7122, 29898, 412, 567, 381, 29888, 29918, 1372, 29894, 29918, 3972, 29892, 5939, 29918, 3188, 511, 1294, 353, 11393, 1372, 29894, 1159, 396, 276, 339, 2658, 3855, 29875, 603, 29906, 29899, 29906, 29900, 29906, 29896, 29889, 29896, 29896, 30004, 13, 30004, 13, 30004, 13, 1678, 396, 1065, 6056, 3883, 304, 1162, 2418, 2923, 30004, 13, 1678, 2923, 29892, 353, 6056, 29898, 412, 415, 680, 29918, 1557, 2361, 353, 784, 29918, 2083, 11167, 13, 462, 1678, 4226, 675, 29918, 9961, 496, 353, 376, 12765, 15231, 13, 462, 1678, 8178, 29918, 6451, 353, 8178, 29918, 6451, 11167, 13, 462, 1678, 8178, 29918, 333, 353, 8178, 29918, 333, 11167, 13, 462, 1678, 8178, 29918, 7039, 353, 8178, 29918, 7039, 11167, 13, 462, 1678, 16716, 353, 29871, 29906, 11167, 13, 462, 1678, 1236, 567, 381, 29888, 29918, 19541, 353, 1236, 567, 381, 29888, 29918, 19541, 8443, 13, 30004, 13, 1678, 565, 1236, 567, 381, 29888, 29918, 1372, 29894, 29918, 3972, 322, 260, 4501, 29918, 3188, 29918, 710, 29901, 30004, 13, 4706, 2923, 29918, 3188, 353, 11860, 29879, 29918, 1744, 29928, 29889, 1372, 29894, 29908, 1273, 313, 1372, 29894, 29918, 3188, 29918, 710, 8443, 13, 4706, 2923, 29918, 1372, 29894, 353, 2923, 29889, 1493, 29898, 29925, 8961, 381, 29888, 1323, 292, 3819, 29911, 7597, 5809, 8443, 13, 4706, 2923, 29918, 1372, 29894, 29889, 7620, 29898, 359, 29889, 2084, 29889, 7122, 29898, 412, 567, 381, 29888, 29918, 1372, 29894, 29918, 3972, 29892, 2923, 29918, 3188, 511, 1294, 353, 11393, 1372, 29894, 1159, 30004, 13, 30004, 13, 1678, 396, 1065, 6056, 3883, 304, 1162, 2418, 2923, 29899, 3605, 601, 30004, 13, 1678, 2923, 29918, 3605, 601, 29892, 353, 6056, 29898, 412, 415, 680, 29918, 1557, 2361, 353, 784, 29918, 2083, 11167, 13, 462, 1678, 4226, 675, 29918, 9961, 496, 353, 376, 12765, 29918, 3605, 601, 15231, 13, 462, 1678, 8178, 29918, 6451, 353, 8178, 29918, 6451, 11167, 13, 462, 1678, 8178, 29918, 333, 353, 8178, 29918, 333, 11167, 13, 462, 1678, 8178, 29918, 7039, 353, 8178, 29918, 7039, 11167, 13, 462, 1678, 16716, 353, 29871, 29906, 11167, 13, 462, 1678, 1236, 567, 381, 29888, 29918, 19541, 353, 1236, 567, 381, 29888, 29918, 19541, 8443, 13, 30004, 13, 1678, 565, 1236, 567, 381, 29888, 29918, 1372, 29894, 29918, 3972, 322, 260, 4501, 29918, 3188, 29918, 710, 29901, 30004, 13, 4706, 2923, 29934, 29918, 3188, 353, 11860, 29879, 29918, 1744, 8353, 29889, 1372, 29894, 29908, 1273, 313, 1372, 29894, 29918, 3188, 29918, 710, 8443, 13, 4706, 2923, 29934, 29918, 1372, 29894, 353, 2923, 29918, 3605, 601, 29889, 1493, 29898, 29925, 8961, 381, 29888, 1323, 292, 3819, 29911, 7597, 5809, 8443, 13, 4706, 2923, 29934, 29918, 1372, 29894, 29889, 7620, 29898, 359, 29889, 2084, 29889, 7122, 29898, 412, 567, 381, 29888, 29918, 1372, 29894, 29918, 3972, 29892, 2923, 29934, 29918, 3188, 511, 1294, 353, 11393, 1372, 29894, 1159, 30004, 13, 30004, 13, 1678, 396, 1065, 503, 13628, 3883, 304, 1162, 2418, 503, 13628, 322, 23432, 2066, 30004, 13, 1678, 503, 13628, 29918, 449, 29892, 23432, 29918, 449, 353, 503, 13628, 29898, 30004, 13, 4706, 19435, 353, 2923, 11167, 13, 4706, 289, 1144, 353, 289, 1144, 11167, 13, 4706, 298, 6051, 353, 29871, 29900, 29889, 29929, 29945, 11167, 13, 4706, 1236, 567, 381, 29888, 29918, 19541, 353, 1236, 567, 381, 29888, 29918, 19541, 30004, 13, 1678, 1723, 30004, 13, 30004, 13, 1678, 565, 1236, 567, 381, 29888, 29918, 1372, 29894, 29918, 3972, 322, 260, 4501, 29918, 3188, 29918, 710, 29901, 30004, 13, 4706, 503, 13628, 29918, 3188, 353, 11860, 29879, 29918, 29999, 29899, 29950, 4571, 29929, 29945, 29889, 1372, 29894, 29908, 1273, 313, 1372, 29894, 29918, 3188, 29918, 710, 8443, 13, 4706, 503, 13628, 29918, 1372, 29894, 353, 503, 13628, 29918, 449, 29889, 1493, 29898, 29925, 8961, 381, 29888, 1323, 292, 3819, 29911, 7597, 5809, 8443, 13, 4706, 503, 13628, 29918, 1372, 29894, 29889, 7620, 29898, 359, 29889, 2084, 29889, 7122, 29898, 412, 567, 381, 29888, 29918, 1372, 29894, 29918, 3972, 29892, 503, 13628, 29918, 3188, 511, 1294, 353, 11393, 1372, 29894, 1159, 30004, 13, 30004, 13, 4706, 23432, 29918, 3188, 353, 11860, 29879, 29918, 29999, 29899, 29950, 4571, 29929, 29945, 29889, 13707, 29908, 1273, 313, 1372, 29894, 29918, 3188, 29918, 710, 8443, 13, 4706, 23432, 29918, 1372, 29894, 353, 23432, 29918, 449, 29889, 1493, 29898, 29999, 13628, 29940, 273, 5809, 8443, 13, 4706, 23432, 29918, 1372, 29894, 29889, 7620, 29898, 359, 29889, 2084, 29889, 7122, 29898, 412, 567, 381, 29888, 29918, 1372, 29894, 29918, 3972, 29892, 23432, 29918, 3188, 511, 1294, 353, 11393, 13707, 1159, 30004, 13, 30004, 13, 30004, 13, 1678, 396, 1065, 5235, 3883, 304, 6314, 4559, 2983, 30004, 13, 1678, 4559, 29918, 7039, 29892, 353, 5235, 19296, 15695, 29898, 30004, 13, 4706, 1881, 353, 10650, 29918, 1272, 11167, 13, 4706, 679, 353, 376, 27736, 15231, 13, 4706, 1236, 567, 381, 29888, 29918, 19541, 353, 1236, 567, 381, 29888, 29918, 19541, 30004, 13, 1678, 1723, 30004, 13, 30004, 13, 1678, 565, 1236, 567, 381, 29888, 29918, 1372, 29894, 29918, 3972, 322, 260, 4501, 29918, 3188, 29918, 710, 29901, 30004, 13, 4706, 5807, 29918, 3188, 353, 11860, 29879, 29918, 19296, 29889, 1372, 29894, 29908, 1273, 313, 1372, 29894, 29918, 3188, 29918, 710, 8443, 13, 4706, 5807, 29918, 1372, 29894, 353, 4559, 29918, 7039, 29889, 1493, 29898, 29925, 8961, 381, 29888, 3401, 19296, 15695, 5809, 8443, 13, 4706, 5807, 29918, 1372, 29894, 29889, 7620, 29898, 359, 29889, 2084, 29889, 7122, 29898, 412, 567, 381, 29888, 29918, 1372, 29894, 29918, 3972, 29892, 5807, 29918, 3188, 511, 1294, 353, 11393, 1372, 29894, 1159, 30004, 13, 30004, 13, 1678, 396, 1065, 5235, 304, 6314, 1303, 18139, 30004, 13, 1678, 1303, 29918, 2798, 29879, 29892, 353, 5235, 29903, 4590, 29898, 30004, 13, 4706, 1881, 353, 10650, 29918, 1272, 11167, 13, 4706, 1236, 567, 381, 29888, 29918, 19541, 353, 1236, 567, 381, 29888, 29918, 19541, 30004, 13, 1678, 1723, 30004, 13, 30004, 13, 1678, 565, 1236, 567, 381, 29888, 29918, 1372, 29894, 29918, 3972, 322, 260, 4501, 29918, 3188, 29918, 710, 29901, 30004, 13, 4706, 364, 29883, 29918, 3188, 353, 11860, 29879, 29918, 10363, 29889, 1372, 29894, 29908, 1273, 313, 1372, 29894, 29918, 3188, 29918, 710, 8443, 13, 4706, 364, 29883, 29918, 1372, 29894, 353, 1303, 29918, 2798, 29879, 29889, 1493, 29898, 29925, 8961, 381, 29888, 3401, 11139, 2776, 1184, 5707, 29943, 4378, 8443, 13, 4706, 364, 29883, 29918, 1372, 29894, 29889, 7620, 29898, 359, 29889, 2084, 29889, 7122, 29898, 412, 567, 381, 29888, 29918, 1372, 29894, 29918, 3972, 29892, 364, 29883, 29918, 3188, 511, 1294, 353, 11393, 1372, 29894, 1159, 30004, 13, 30004, 13, 1678, 396, 1065, 1303, 3981, 29879, 3800, 5317, 3883, 304, 1162, 2418, 7604, 2133, 30004, 13, 1678, 364, 29883, 29918, 1884, 5317, 29918, 449, 29892, 353, 29138, 3313, 5317, 29898, 30004, 13, 4706, 1303, 29918, 2798, 29879, 353, 1303, 29918, 2798, 29879, 11167, 13, 4706, 282, 865, 29918, 449, 29918, 3972, 353, 1236, 567, 381, 29888, 29918, 1372, 29894, 29918, 3972, 30004, 13, 1678, 1723, 30004, 13, 30004, 13, 1678, 396, 1653, 3651, 363, 2752, 934, 11265, 30004, 13, 1678, 2752, 29928, 293, 353, 2322, 8977, 29898, 1761, 8443, 13, 1678, 4559, 29940, 29924, 353, 4559, 29918, 7039, 29889, 1493, 29898, 29925, 8961, 381, 29888, 3401, 19296, 15695, 5809, 8443, 13, 1678, 2752, 353, 2897, 29889, 2084, 29889, 7122, 29898, 412, 567, 381, 29888, 29918, 1372, 29894, 29918, 3972, 29892, 376, 27736, 29918, 4993, 29889, 1372, 29894, 1159, 30004, 13, 30004, 13, 1678, 396, 1653, 1051, 363, 4333, 310, 4559, 2983, 30004, 13, 1678, 565, 451, 8178, 29918, 7039, 29901, 30004, 13, 4706, 8178, 29918, 7039, 353, 5159, 30004, 13, 30004, 13, 1678, 396, 1722, 11916, 934, 322, 6314, 11916, 964, 263, 8600, 30004, 13, 1678, 411, 1722, 29898, 851, 29898, 11249, 29940, 29924, 29897, 1723, 408, 21989, 29901, 30004, 13, 4706, 363, 1196, 297, 21989, 29901, 30004, 13, 9651, 4559, 353, 1196, 29889, 17010, 26471, 13, 9651, 2752, 8547, 353, 4559, 29889, 2288, 2830, 877, 29918, 742, 29871, 29896, 8443, 13, 9651, 269, 473, 1133, 353, 2752, 8547, 29961, 29900, 29962, 30004, 13, 9651, 2752, 29928, 293, 29961, 29879, 473, 1133, 1822, 4397, 29898, 11249, 8443, 13, 9651, 565, 451, 8178, 29918, 7039, 29901, 30004, 13, 18884, 8178, 29918, 7039, 29889, 4397, 29898, 11249, 8443, 13, 30004, 13, 1678, 396, 1653, 263, 2752, 934, 3971, 411, 1897, 29871, 29896, 408, 278, 4559, 2983, 30004, 13, 1678, 396, 322, 278, 1897, 29871, 29906, 408, 278, 2752, 1897, 30004, 13, 1678, 396, 278, 2752, 934, 674, 367, 1925, 297, 278, 260, 4501, 3884, 30004, 13, 1678, 411, 1722, 29898, 2752, 1919, 376, 29893, 29908, 1723, 408, 260, 4501, 10507, 29901, 30004, 13, 4706, 9227, 353, 11799, 29889, 13236, 29898, 1372, 29894, 10507, 29892, 28552, 2433, 29905, 29873, 1495, 30004, 13, 4706, 9227, 29889, 13236, 340, 18959, 11249, 1367, 742, 525, 4993, 2033, 8443, 13, 4706, 363, 27236, 346, 29892, 11916, 297, 2752, 29928, 293, 29889, 7076, 7295, 30004, 13, 9651, 363, 1024, 297, 11916, 29901, 30004, 13, 18884, 9227, 29889, 13236, 340, 4197, 978, 29892, 27236, 346, 2314, 30004, 13, 30004, 13, 1678, 396, 3588, 2752, 934, 304, 15562, 1897, 304, 367, 1304, 2629, 278, 10585, 30004, 13, 1678, 2752, 29918, 1054, 353, 3855, 29875, 603, 29906, 29889, 18417, 29889, 1359, 29898, 4993, 467, 657, 29918, 4914, 703, 4993, 1159, 30004, 13, 30004, 13, 1678, 396, 1065, 427, 4018, 3883, 30004, 13, 1678, 427, 4018, 29918, 3972, 29892, 353, 427, 4018, 29898, 30004, 13, 4706, 2752, 353, 2752, 29918, 1054, 11167, 13, 4706, 266, 3781, 29918, 1445, 353, 266, 3781, 29918, 1445, 11167, 13, 4706, 503, 1557, 2361, 353, 503, 13628, 29918, 449, 11167, 13, 4706, 784, 29918, 2083, 353, 784, 29918, 2083, 11167, 13, 4706, 2684, 29918, 29920, 29918, 386, 3781, 353, 2684, 29918, 29920, 29918, 386, 3781, 11167, 13, 4706, 2684, 29918, 2395, 29918, 386, 3781, 353, 2684, 29918, 2395, 29918, 386, 3781, 11167, 13, 4706, 10650, 29918, 1557, 2361, 353, 10650, 29918, 1272, 11167, 13, 4706, 10650, 29918, 13646, 353, 10650, 29918, 13646, 11167, 13, 4706, 427, 4018, 358, 29918, 14057, 545, 353, 5852, 11167, 13, 4706, 1236, 567, 381, 29888, 29918, 19541, 353, 1236, 567, 381, 29888, 29918, 19541, 30004, 13, 1678, 1723, 30004, 13, 30004, 13, 1678, 1596, 703, 264, 4018, 1985, 1159, 30004, 13, 30004, 13, 1678, 565, 1236, 567, 381, 29888, 29918, 1372, 29894, 29918, 3972, 322, 260, 4501, 29918, 3188, 29918, 710, 29901, 30004, 13, 4706, 427, 4018, 29918, 3188, 353, 376, 264, 4018, 287, 19451, 13, 4706, 427, 4018, 29918, 1372, 29894, 353, 427, 4018, 29918, 3972, 29889, 1493, 29898, 2369, 4018, 287, 15666, 415, 680, 9170, 29943, 4378, 8443, 13, 4706, 427, 4018, 29918, 1372, 29894, 29889, 7620, 29898, 359, 29889, 2084, 29889, 7122, 29898, 412, 567, 381, 29888, 29918, 1372, 29894, 29918, 3972, 29892, 427, 4018, 29918, 3188, 876, 30004, 13, 30004, 13, 1678, 396, 1065, 427, 4018, 358, 3800, 5317, 3883, 304, 1162, 2418, 7604, 2133, 30004, 13, 1678, 427, 4018, 287, 3981, 29879, 3313, 5317, 29892, 353, 427, 4018, 3313, 5317, 29898, 30004, 13, 4706, 427, 4018, 287, 29918, 3972, 353, 427, 4018, 29918, 3972, 11167, 13, 4706, 282, 865, 29918, 449, 29918, 3972, 353, 1236, 567, 381, 29888, 29918, 1372, 29894, 29918, 3972, 30004, 13, 1678, 1723, 30004, 13, 30004, 13, 1678, 396, 1065, 1634, 4421, 2620, 3883, 304, 6314, 7604, 2133, 30004, 13, 1678, 503, 13628, 29918, 1557, 2620, 29892, 353, 1634, 4421, 2620, 29898, 30004, 13, 4706, 2752, 353, 2752, 29918, 1054, 11167, 13, 4706, 6492, 29918, 1188, 353, 7700, 11167, 13, 4706, 503, 13628, 353, 503, 13628, 29918, 449, 30004, 13, 1678, 1723, 30004, 13, 30004, 13, 1678, 396, 1065, 1634, 4421, 2620, 3883, 304, 6314, 7604, 2133, 30004, 13, 1678, 784, 2083, 29918, 1557, 2620, 29892, 353, 1634, 4421, 2620, 29898, 30004, 13, 4706, 2752, 353, 2752, 29918, 1054, 11167, 13, 4706, 6492, 29918, 1188, 353, 5852, 11167, 13, 4706, 784, 29918, 2083, 353, 784, 29918, 2083, 30004, 13, 1678, 1723, 30004, 13, 30004, 13, 1678, 396, 1065, 278, 503, 264, 4018, 3883, 304, 6314, 7604, 2133, 30004, 13, 1678, 503, 264, 4018, 29918, 449, 29892, 353, 503, 264, 4018, 29898, 30004, 13, 4706, 848, 353, 784, 29918, 2083, 11167, 13, 4706, 503, 1557, 2361, 353, 503, 13628, 29918, 449, 11167, 13, 4706, 8178, 29918, 26255, 353, 8178, 29918, 7039, 11167, 13, 4706, 2752, 353, 2752, 29918, 1054, 11167, 13, 4706, 8178, 29918, 1272, 353, 8178, 29918, 6451, 11167, 13, 4706, 4331, 29918, 29920, 29918, 386, 3781, 353, 4331, 29918, 29920, 29918, 386, 3781, 11167, 13, 4706, 7568, 29918, 29920, 29918, 386, 3781, 353, 7568, 29918, 29920, 29918, 386, 3781, 11167, 13, 4706, 5224, 29918, 29920, 29918, 386, 3781, 353, 5224, 29918, 29920, 29918, 386, 3781, 11167, 13, 4706, 2684, 29918, 29920, 29918, 386, 3781, 353, 2684, 29918, 2256, 4018, 29918, 386, 3781, 11167, 13, 4706, 1236, 567, 381, 29888, 29918, 19541, 353, 1236, 567, 381, 29888, 29918, 19541, 30004, 13, 1678, 1723, 30004, 13, 30004, 13, 1678, 396, 736, 599, 2066, 2825, 30004, 13, 1678, 736, 313, 30004, 13, 4706, 784, 29918, 2083, 29892, 2923, 29892, 2923, 29918, 3605, 601, 29892, 503, 13628, 29918, 449, 29892, 23432, 29918, 449, 29892, 4559, 29918, 7039, 11167, 13, 4706, 1303, 29918, 2798, 29879, 29892, 364, 29883, 29918, 1884, 5317, 29918, 449, 29892, 427, 4018, 29918, 3972, 29892, 427, 4018, 287, 3981, 29879, 3313, 5317, 11167, 13, 4706, 503, 13628, 29918, 1557, 2620, 29892, 784, 2083, 29918, 1557, 2620, 29892, 503, 264, 4018, 29918, 449, 30004, 13, 4706, 1723, 2 ]
run.py
vprime/web-scraper
1
152172
from flask import Flask, request, jsonify, send_from_directory, redirect, url_for app = Flask(__name__, static_url_path='', static_folder='web-frontend/dist/spa-mat') @app.after_request def after_request(response): response.headers.add('Access-Control-Allow-Origin', '*') response.headers.add('Access-Control-Allow-Headers', 'Content-Type,Authorization') response.headers.add('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE,OPTIONS') return response @app.route('/scrape', methods=['POST']) def scrape(): if request.method == 'POST': from scraper import Scraper scraper = Scraper(request.json['address']) return jsonify( source=request.json['address'], status=scraper.request.status_code, detections=scraper.List ) @app.route('/<path:path>') def frontend(path): if (path == ''): path = 'index.html' return send_from_directory('web-frontend/dist/spa-mat', path) @app.route('/') def home(): return frontend('index.html') if __name__ == '__main__': app.run(debug=True, host='0.0.0.0')
[ 1, 515, 29784, 1053, 2379, 1278, 29892, 2009, 29892, 4390, 1598, 29892, 3638, 29918, 3166, 29918, 12322, 29892, 6684, 29892, 3142, 29918, 1454, 13, 13, 932, 353, 2379, 1278, 22168, 978, 1649, 29892, 2294, 29918, 2271, 29918, 2084, 2433, 742, 2294, 29918, 12083, 2433, 2676, 29899, 8862, 355, 29914, 5721, 29914, 1028, 29874, 29899, 2922, 1495, 13, 13, 29992, 932, 29889, 7045, 29918, 3827, 13, 1753, 1156, 29918, 3827, 29898, 5327, 1125, 13, 29871, 2933, 29889, 13662, 29889, 1202, 877, 6638, 29899, 4809, 29899, 15930, 29899, 23182, 742, 525, 29930, 1495, 13, 29871, 2933, 29889, 13662, 29889, 1202, 877, 6638, 29899, 4809, 29899, 15930, 29899, 18163, 742, 525, 3916, 29899, 1542, 29892, 25471, 1495, 13, 29871, 2933, 29889, 13662, 29889, 1202, 877, 6638, 29899, 4809, 29899, 15930, 29899, 26112, 742, 525, 7194, 29892, 12336, 29892, 5438, 29892, 2287, 18476, 29892, 14094, 27946, 1495, 13, 29871, 736, 2933, 13, 13, 29992, 932, 29889, 13134, 11219, 1557, 336, 412, 742, 3519, 29922, 1839, 5438, 11287, 13, 1753, 24559, 412, 7295, 13, 12, 361, 2009, 29889, 5696, 1275, 525, 5438, 2396, 13, 12, 12, 3166, 24559, 546, 1053, 2522, 336, 546, 13, 12, 12, 1557, 336, 546, 353, 2522, 336, 546, 29898, 3827, 29889, 3126, 1839, 7328, 11287, 13, 12, 12, 2457, 4390, 1598, 29898, 13, 12, 12, 12, 4993, 29922, 3827, 29889, 3126, 1839, 7328, 7464, 29871, 13, 12, 12, 12, 4882, 29922, 1557, 336, 546, 29889, 3827, 29889, 4882, 29918, 401, 29892, 13, 12, 12, 12, 29881, 2650, 1953, 29922, 1557, 336, 546, 29889, 1293, 13, 12, 12, 12, 29897, 13, 13, 29992, 932, 29889, 13134, 11219, 29966, 2084, 29901, 2084, 29958, 1495, 13, 1753, 4565, 355, 29898, 2084, 1125, 13, 12, 361, 313, 2084, 1275, 6629, 1125, 13, 12, 12, 2084, 353, 525, 2248, 29889, 1420, 29915, 13, 12, 2457, 3638, 29918, 3166, 29918, 12322, 877, 2676, 29899, 8862, 355, 29914, 5721, 29914, 1028, 29874, 29899, 2922, 742, 2224, 29897, 13, 13, 29992, 932, 29889, 13134, 11219, 1495, 13, 1753, 3271, 7295, 13, 12, 2457, 4565, 355, 877, 2248, 29889, 1420, 1495, 13, 13, 361, 4770, 978, 1649, 1275, 525, 1649, 3396, 1649, 2396, 13, 12, 932, 29889, 3389, 29898, 8382, 29922, 5574, 29892, 3495, 2433, 29900, 29889, 29900, 29889, 29900, 29889, 29900, 1495, 2 ]
openstackclient/network/v2/floating_ip.py
redhat-openstack/python-openstackclient
0
96745
<gh_stars>0 # 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. # """IP Floating action implementations""" from openstackclient.common import utils from openstackclient.i18n import _ from openstackclient.network import common def _get_columns(item): columns = list(item.keys()) if 'tenant_id' in columns: columns.remove('tenant_id') columns.append('project_id') return tuple(sorted(columns)) def _get_attrs(client_manager, parsed_args): attrs = {} network_client = client_manager.network if parsed_args.network is not None: network = network_client.find_network(parsed_args.network, ignore_missing=False) attrs['floating_network_id'] = network.id if parsed_args.subnet is not None: subnet = network_client.find_subnet(parsed_args.subnet, ignore_missing=False) attrs['subnet_id'] = subnet.id if parsed_args.port is not None: port = network_client.find_port(parsed_args.port, ignore_missing=False) attrs['port_id'] = port.id if parsed_args.floating_ip_address is not None: attrs['floating_ip_address'] = parsed_args.floating_ip_address if parsed_args.fixed_ip_address is not None: attrs['fixed_ip_address'] = parsed_args.fixed_ip_address return attrs class CreateFloatingIP(common.NetworkAndComputeShowOne): """Create floating IP""" def update_parser_common(self, parser): # In Compute v2 network, floating IPs could be allocated from floating # IP pools, which are actually external networks. So deprecate the # parameter "pool", and use "network" instead. parser.add_argument( 'network', metavar='<network>', help=_("Network to allocate floating IP from (name or ID)") ) return parser def update_parser_network(self, parser): parser.add_argument( '--subnet', metavar='<subnet>', help=_("Subnet on which you want to create the floating IP " "(name or ID)") ) parser.add_argument( '--port', metavar='<port>', help=_("Port to be associated with the floating IP " "(name or ID)") ) parser.add_argument( '--floating-ip-address', metavar='<floating-ip-address>', dest='floating_ip_address', help=_("Floating IP address") ) parser.add_argument( '--fixed-ip-address', metavar='<fixed-ip-address>', dest='fixed_ip_address', help=_("Fixed IP address mapped to the floating IP") ) return parser def take_action_network(self, client, parsed_args): attrs = _get_attrs(self.app.client_manager, parsed_args) obj = client.create_ip(**attrs) columns = _get_columns(obj) data = utils.get_item_properties(obj, columns) return (columns, data) def take_action_compute(self, client, parsed_args): obj = client.floating_ips.create(parsed_args.network) columns = _get_columns(obj._info) data = utils.get_dict_properties(obj._info, columns) return (columns, data) class DeleteFloatingIP(common.NetworkAndComputeCommand): """Delete floating IP""" def update_parser_common(self, parser): parser.add_argument( 'floating_ip', metavar="<floating-ip>", help=_("Floating IP to delete (IP address or ID)") ) return parser def take_action_network(self, client, parsed_args): obj = client.find_ip(parsed_args.floating_ip) client.delete_ip(obj) def take_action_compute(self, client, parsed_args): obj = utils.find_resource( client.floating_ips, parsed_args.floating_ip, ) client.floating_ips.delete(obj.id) class ListFloatingIP(common.NetworkAndComputeLister): """List floating IP(s)""" def take_action_network(self, client, parsed_args): columns = ( 'id', 'floating_ip_address', 'fixed_ip_address', 'port_id', ) headers = ( 'ID', 'Floating IP Address', 'Fixed IP Address', 'Port', ) query = {} data = client.ips(**query) return (headers, (utils.get_item_properties( s, columns, formatters={}, ) for s in data)) def take_action_compute(self, client, parsed_args): columns = ( 'ID', 'IP', 'Fixed IP', 'Instance ID', 'Pool', ) headers = ( 'ID', 'Floating IP Address', 'Fixed IP Address', 'Server', 'Pool', ) data = client.floating_ips.list() return (headers, (utils.get_item_properties( s, columns, formatters={}, ) for s in data)) class ShowFloatingIP(common.NetworkAndComputeShowOne): """Show floating IP details""" def update_parser_common(self, parser): parser.add_argument( 'floating_ip', metavar="<floating-ip>", help=_("Floating IP to display (IP address or ID)") ) return parser def take_action_network(self, client, parsed_args): obj = client.find_ip(parsed_args.floating_ip, ignore_missing=False) columns = _get_columns(obj) data = utils.get_item_properties(obj, columns) return (columns, data) def take_action_compute(self, client, parsed_args): obj = utils.find_resource( client.floating_ips, parsed_args.floating_ip, ) columns = _get_columns(obj._info) data = utils.get_dict_properties(obj._info, columns) return (columns, data)
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 259, 10413, 21144, 1090, 278, 13380, 19245, 29892, 10079, 29871, 29906, 29889, 29900, 313, 1552, 376, 29931, 293, 1947, 1496, 366, 1122, 13, 29937, 259, 451, 671, 445, 934, 5174, 297, 752, 13036, 411, 278, 19245, 29889, 887, 1122, 4017, 13, 29937, 259, 263, 3509, 310, 278, 19245, 472, 13, 29937, 13, 29937, 4706, 1732, 597, 1636, 29889, 4288, 29889, 990, 29914, 506, 11259, 29914, 27888, 1430, 1660, 29899, 29906, 29889, 29900, 13, 29937, 13, 29937, 259, 25870, 3734, 491, 22903, 4307, 470, 15502, 304, 297, 5007, 29892, 7047, 13, 29937, 259, 13235, 1090, 278, 19245, 338, 13235, 373, 385, 376, 3289, 8519, 29908, 350, 3289, 3235, 29892, 399, 1806, 8187, 2692, 13, 29937, 259, 399, 1718, 29934, 13566, 29059, 6323, 8707, 29928, 22122, 29903, 8079, 13764, 29979, 476, 22255, 29892, 2845, 4653, 470, 2411, 2957, 29889, 2823, 278, 13, 29937, 259, 19245, 363, 278, 2702, 4086, 14765, 1076, 11239, 322, 27028, 13, 29937, 259, 1090, 278, 19245, 29889, 13, 29937, 13, 13, 15945, 29908, 5690, 26043, 1218, 3158, 20240, 15945, 29908, 13, 13, 3166, 1722, 1429, 4645, 29889, 9435, 1053, 3667, 29879, 13, 3166, 1722, 1429, 4645, 29889, 29875, 29896, 29947, 29876, 1053, 903, 13, 3166, 1722, 1429, 4645, 29889, 11618, 1053, 3619, 13, 13, 13, 1753, 903, 657, 29918, 13099, 29898, 667, 1125, 13, 1678, 4341, 353, 1051, 29898, 667, 29889, 8149, 3101, 13, 1678, 565, 525, 841, 424, 29918, 333, 29915, 297, 4341, 29901, 13, 4706, 4341, 29889, 5992, 877, 841, 424, 29918, 333, 1495, 13, 4706, 4341, 29889, 4397, 877, 4836, 29918, 333, 1495, 13, 1678, 736, 18761, 29898, 24582, 29898, 13099, 876, 13, 13, 13, 1753, 903, 657, 29918, 5552, 29879, 29898, 4645, 29918, 12847, 29892, 21213, 29918, 5085, 1125, 13, 1678, 12421, 29879, 353, 6571, 13, 1678, 3564, 29918, 4645, 353, 3132, 29918, 12847, 29889, 11618, 13, 13, 1678, 565, 21213, 29918, 5085, 29889, 11618, 338, 451, 6213, 29901, 13, 4706, 3564, 353, 3564, 29918, 4645, 29889, 2886, 29918, 11618, 29898, 862, 8485, 29918, 5085, 29889, 11618, 29892, 13, 462, 462, 795, 11455, 29918, 27259, 29922, 8824, 29897, 13, 4706, 12421, 29879, 1839, 29888, 417, 1218, 29918, 11618, 29918, 333, 2033, 353, 3564, 29889, 333, 13, 13, 1678, 565, 21213, 29918, 5085, 29889, 1491, 1212, 338, 451, 6213, 29901, 13, 4706, 1014, 1212, 353, 3564, 29918, 4645, 29889, 2886, 29918, 1491, 1212, 29898, 862, 8485, 29918, 5085, 29889, 1491, 1212, 29892, 13, 462, 462, 9651, 11455, 29918, 27259, 29922, 8824, 29897, 13, 4706, 12421, 29879, 1839, 1491, 1212, 29918, 333, 2033, 353, 1014, 1212, 29889, 333, 13, 13, 1678, 565, 21213, 29918, 5085, 29889, 637, 338, 451, 6213, 29901, 13, 4706, 2011, 353, 3564, 29918, 4645, 29889, 2886, 29918, 637, 29898, 862, 8485, 29918, 5085, 29889, 637, 29892, 13, 462, 462, 4706, 11455, 29918, 27259, 29922, 8824, 29897, 13, 4706, 12421, 29879, 1839, 637, 29918, 333, 2033, 353, 2011, 29889, 333, 13, 13, 1678, 565, 21213, 29918, 5085, 29889, 29888, 417, 1218, 29918, 666, 29918, 7328, 338, 451, 6213, 29901, 13, 4706, 12421, 29879, 1839, 29888, 417, 1218, 29918, 666, 29918, 7328, 2033, 353, 21213, 29918, 5085, 29889, 29888, 417, 1218, 29918, 666, 29918, 7328, 13, 13, 1678, 565, 21213, 29918, 5085, 29889, 20227, 29918, 666, 29918, 7328, 338, 451, 6213, 29901, 13, 4706, 12421, 29879, 1839, 20227, 29918, 666, 29918, 7328, 2033, 353, 21213, 29918, 5085, 29889, 20227, 29918, 666, 29918, 7328, 13, 13, 1678, 736, 12421, 29879, 13, 13, 13, 1990, 6204, 29943, 417, 1218, 5690, 29898, 9435, 29889, 13724, 2855, 20606, 29872, 8964, 6716, 1125, 13, 1678, 9995, 4391, 16526, 5641, 15945, 29908, 13, 13, 1678, 822, 2767, 29918, 16680, 29918, 9435, 29898, 1311, 29892, 13812, 1125, 13, 4706, 396, 512, 11796, 29872, 325, 29906, 3564, 29892, 16526, 5641, 29879, 1033, 367, 19591, 515, 16526, 13, 4706, 396, 5641, 772, 3775, 29892, 607, 526, 2869, 7029, 14379, 29889, 1105, 16460, 403, 278, 13, 4706, 396, 3443, 376, 10109, 613, 322, 671, 376, 11618, 29908, 2012, 29889, 13, 4706, 13812, 29889, 1202, 29918, 23516, 29898, 13, 9651, 525, 11618, 742, 13, 9651, 1539, 485, 279, 2433, 29966, 11618, 29958, 742, 13, 9651, 1371, 29922, 29918, 703, 13724, 304, 23632, 16526, 5641, 515, 313, 978, 470, 3553, 25760, 13, 4706, 1723, 13, 4706, 736, 13812, 13, 13, 1678, 822, 2767, 29918, 16680, 29918, 11618, 29898, 1311, 29892, 13812, 1125, 13, 4706, 13812, 29889, 1202, 29918, 23516, 29898, 13, 9651, 525, 489, 1491, 1212, 742, 13, 9651, 1539, 485, 279, 2433, 29966, 1491, 1212, 29958, 742, 13, 9651, 1371, 29922, 29918, 703, 4035, 1212, 373, 607, 366, 864, 304, 1653, 278, 16526, 5641, 376, 13, 462, 259, 18227, 978, 470, 3553, 25760, 13, 4706, 1723, 13, 4706, 13812, 29889, 1202, 29918, 23516, 29898, 13, 9651, 525, 489, 637, 742, 13, 9651, 1539, 485, 279, 2433, 29966, 637, 29958, 742, 13, 9651, 1371, 29922, 29918, 703, 2290, 304, 367, 6942, 411, 278, 16526, 5641, 376, 13, 462, 259, 18227, 978, 470, 3553, 25760, 13, 4706, 1723, 13, 4706, 13812, 29889, 1202, 29918, 23516, 29898, 13, 9651, 525, 489, 29888, 417, 1218, 29899, 666, 29899, 7328, 742, 13, 9651, 1539, 485, 279, 2433, 29966, 29888, 417, 1218, 29899, 666, 29899, 7328, 29958, 742, 13, 9651, 2731, 2433, 29888, 417, 1218, 29918, 666, 29918, 7328, 742, 13, 9651, 1371, 29922, 29918, 703, 29943, 417, 1218, 5641, 3211, 1159, 13, 4706, 1723, 13, 4706, 13812, 29889, 1202, 29918, 23516, 29898, 13, 9651, 525, 489, 20227, 29899, 666, 29899, 7328, 742, 13, 9651, 1539, 485, 279, 2433, 29966, 20227, 29899, 666, 29899, 7328, 29958, 742, 13, 9651, 2731, 2433, 20227, 29918, 666, 29918, 7328, 742, 13, 9651, 1371, 29922, 29918, 703, 26262, 5641, 3211, 20545, 304, 278, 16526, 5641, 1159, 13, 4706, 1723, 13, 4706, 736, 13812, 13, 13, 1678, 822, 2125, 29918, 2467, 29918, 11618, 29898, 1311, 29892, 3132, 29892, 21213, 29918, 5085, 1125, 13, 4706, 12421, 29879, 353, 903, 657, 29918, 5552, 29879, 29898, 1311, 29889, 932, 29889, 4645, 29918, 12847, 29892, 21213, 29918, 5085, 29897, 13, 4706, 5446, 353, 3132, 29889, 3258, 29918, 666, 29898, 1068, 5552, 29879, 29897, 13, 4706, 4341, 353, 903, 657, 29918, 13099, 29898, 5415, 29897, 13, 4706, 848, 353, 3667, 29879, 29889, 657, 29918, 667, 29918, 11330, 29898, 5415, 29892, 4341, 29897, 13, 4706, 736, 313, 13099, 29892, 848, 29897, 13, 13, 1678, 822, 2125, 29918, 2467, 29918, 26017, 29898, 1311, 29892, 3132, 29892, 21213, 29918, 5085, 1125, 13, 4706, 5446, 353, 3132, 29889, 29888, 417, 1218, 29918, 4512, 29889, 3258, 29898, 862, 8485, 29918, 5085, 29889, 11618, 29897, 13, 4706, 4341, 353, 903, 657, 29918, 13099, 29898, 5415, 3032, 3888, 29897, 13, 4706, 848, 353, 3667, 29879, 29889, 657, 29918, 8977, 29918, 11330, 29898, 5415, 3032, 3888, 29892, 4341, 29897, 13, 4706, 736, 313, 13099, 29892, 848, 29897, 13, 13, 13, 1990, 21267, 29943, 417, 1218, 5690, 29898, 9435, 29889, 13724, 2855, 20606, 29872, 6255, 1125, 13, 1678, 9995, 12498, 16526, 5641, 15945, 29908, 13, 13, 1678, 822, 2767, 29918, 16680, 29918, 9435, 29898, 1311, 29892, 13812, 1125, 13, 4706, 13812, 29889, 1202, 29918, 23516, 29898, 13, 9651, 525, 29888, 417, 1218, 29918, 666, 742, 13, 9651, 1539, 485, 279, 543, 29966, 29888, 417, 1218, 29899, 666, 28341, 13, 9651, 1371, 29922, 29918, 703, 29943, 417, 1218, 5641, 304, 5217, 313, 5690, 3211, 470, 3553, 25760, 13, 4706, 1723, 13, 4706, 736, 13812, 13, 13, 1678, 822, 2125, 29918, 2467, 29918, 11618, 29898, 1311, 29892, 3132, 29892, 21213, 29918, 5085, 1125, 13, 4706, 5446, 353, 3132, 29889, 2886, 29918, 666, 29898, 862, 8485, 29918, 5085, 29889, 29888, 417, 1218, 29918, 666, 29897, 13, 4706, 3132, 29889, 8143, 29918, 666, 29898, 5415, 29897, 13, 13, 1678, 822, 2125, 29918, 2467, 29918, 26017, 29898, 1311, 29892, 3132, 29892, 21213, 29918, 5085, 1125, 13, 4706, 5446, 353, 3667, 29879, 29889, 2886, 29918, 10314, 29898, 13, 9651, 3132, 29889, 29888, 417, 1218, 29918, 4512, 29892, 13, 9651, 21213, 29918, 5085, 29889, 29888, 417, 1218, 29918, 666, 29892, 13, 4706, 1723, 13, 4706, 3132, 29889, 29888, 417, 1218, 29918, 4512, 29889, 8143, 29898, 5415, 29889, 333, 29897, 13, 13, 13, 1990, 2391, 29943, 417, 1218, 5690, 29898, 9435, 29889, 13724, 2855, 20606, 29872, 29931, 1531, 1125, 13, 1678, 9995, 1293, 16526, 5641, 29898, 29879, 5513, 15945, 13, 13, 1678, 822, 2125, 29918, 2467, 29918, 11618, 29898, 1311, 29892, 3132, 29892, 21213, 29918, 5085, 1125, 13, 4706, 4341, 353, 313, 13, 9651, 525, 333, 742, 13, 9651, 525, 29888, 417, 1218, 29918, 666, 29918, 7328, 742, 13, 9651, 525, 20227, 29918, 666, 29918, 7328, 742, 13, 9651, 525, 637, 29918, 333, 742, 13, 4706, 1723, 13, 4706, 9066, 353, 313, 13, 9651, 525, 1367, 742, 13, 9651, 525, 29943, 417, 1218, 5641, 16428, 742, 13, 9651, 525, 26262, 5641, 16428, 742, 13, 9651, 525, 2290, 742, 13, 4706, 1723, 13, 13, 4706, 2346, 353, 6571, 13, 4706, 848, 353, 3132, 29889, 4512, 29898, 1068, 1972, 29897, 13, 13, 4706, 736, 313, 13662, 29892, 13, 18884, 313, 13239, 29889, 657, 29918, 667, 29918, 11330, 29898, 13, 462, 1678, 269, 29892, 4341, 29892, 13, 462, 1678, 3402, 2153, 3790, 1118, 13, 18884, 1723, 363, 269, 297, 848, 876, 13, 13, 1678, 822, 2125, 29918, 2467, 29918, 26017, 29898, 1311, 29892, 3132, 29892, 21213, 29918, 5085, 1125, 13, 4706, 4341, 353, 313, 13, 9651, 525, 1367, 742, 13, 9651, 525, 5690, 742, 13, 9651, 525, 26262, 5641, 742, 13, 9651, 525, 4998, 3553, 742, 13, 9651, 525, 11426, 742, 13, 4706, 1723, 13, 4706, 9066, 353, 313, 13, 9651, 525, 1367, 742, 13, 9651, 525, 29943, 417, 1218, 5641, 16428, 742, 13, 9651, 525, 26262, 5641, 16428, 742, 13, 9651, 525, 6004, 742, 13, 9651, 525, 11426, 742, 13, 4706, 1723, 13, 13, 4706, 848, 353, 3132, 29889, 29888, 417, 1218, 29918, 4512, 29889, 1761, 580, 13, 13, 4706, 736, 313, 13662, 29892, 13, 18884, 313, 13239, 29889, 657, 29918, 667, 29918, 11330, 29898, 13, 462, 1678, 269, 29892, 4341, 29892, 13, 462, 1678, 3402, 2153, 3790, 1118, 13, 18884, 1723, 363, 269, 297, 848, 876, 13, 13, 13, 1990, 7704, 29943, 417, 1218, 5690, 29898, 9435, 29889, 13724, 2855, 20606, 29872, 8964, 6716, 1125, 13, 1678, 9995, 8964, 16526, 5641, 4902, 15945, 29908, 13, 13, 1678, 822, 2767, 29918, 16680, 29918, 9435, 29898, 1311, 29892, 13812, 1125, 13, 4706, 13812, 29889, 1202, 29918, 23516, 29898, 13, 9651, 525, 29888, 417, 1218, 29918, 666, 742, 13, 9651, 1539, 485, 279, 543, 29966, 29888, 417, 1218, 29899, 666, 28341, 13, 9651, 1371, 29922, 29918, 703, 29943, 417, 1218, 5641, 304, 2479, 313, 5690, 3211, 470, 3553, 25760, 13, 4706, 1723, 13, 4706, 736, 13812, 13, 13, 1678, 822, 2125, 29918, 2467, 29918, 11618, 29898, 1311, 29892, 3132, 29892, 21213, 29918, 5085, 1125, 13, 4706, 5446, 353, 3132, 29889, 2886, 29918, 666, 29898, 862, 8485, 29918, 5085, 29889, 29888, 417, 1218, 29918, 666, 29892, 11455, 29918, 27259, 29922, 8824, 29897, 13, 4706, 4341, 353, 903, 657, 29918, 13099, 29898, 5415, 29897, 13, 4706, 848, 353, 3667, 29879, 29889, 657, 29918, 667, 29918, 11330, 29898, 5415, 29892, 4341, 29897, 13, 4706, 736, 313, 13099, 29892, 848, 29897, 13, 13, 1678, 822, 2125, 29918, 2467, 29918, 26017, 29898, 1311, 29892, 3132, 29892, 21213, 29918, 5085, 1125, 13, 4706, 5446, 353, 3667, 29879, 29889, 2886, 29918, 10314, 29898, 13, 9651, 3132, 29889, 29888, 417, 1218, 29918, 4512, 29892, 13, 9651, 21213, 29918, 5085, 29889, 29888, 417, 1218, 29918, 666, 29892, 13, 4706, 1723, 13, 4706, 4341, 353, 903, 657, 29918, 13099, 29898, 5415, 3032, 3888, 29897, 13, 4706, 848, 353, 3667, 29879, 29889, 657, 29918, 8977, 29918, 11330, 29898, 5415, 3032, 3888, 29892, 4341, 29897, 13, 4706, 736, 313, 13099, 29892, 848, 29897, 13, 2 ]
analysis.py
cua-cua/coink
0
76348
import numpy import pandas from pathlib import Path def raw_to_dataframe(raw): data = numpy.frombuffer(raw, dtype='int16') data = data.reshape((data.size // 4, 4)) df = pandas.DataFrame(data, columns=['t', 'x', 'y', 'z']) # Center the curve shift = len(df) // 2 - df['x'].idxmin() df = df.reindex(numpy.roll(df.index, shift)).reset_index(drop=True) df['t'] = df['t'].diff().cumsum() * 1e-6 df.loc[0, 't'] = 0. df = df.set_index('t') return df def read_data(fname): df = pandas.read_csv(fname, dtype='h') df['t'] = df['t'].diff().cumsum() * 1e-6 df.loc[0, 't'] = 0. df = df.set_index('t') return df def normalize(df): df = df.astype(float) df /= df.iloc[:50].mean() df -= 1 zone = df[df['x'] < -0.2] diff = zone.index[-1] - zone.index[0] t0 = zone.index[0] - diff t1 = zone.index[-1] + diff df = df[t0:t1] df.index -= df.index[0] return df def load_data(coin, path: Path = None): if path is None: path = Path('data') if isinstance(path, str): path = Path(path) data = [] for fname in path.glob('%s-*.csv' % coin): df = read_data(fname) df = normalize(df) data.append(df) return data def axis_features(curve): diff = 0 low = curve[0] d0_low = low for value in curve: low = min(low, value) d = value - low if d > diff: diff = d d0_low = low if value == curve.min(): break return {'min': curve.min(), 'l0': d0_low, 'd0': diff} def summary(curve, coin): x = axis_features(curve['x']) y = axis_features(curve['y']) z = axis_features(curve['z']) summary = { 'coin': coin, 'min_x': x['min'], 'min_y': y['min'], 'min_z': z['min'], 'l0_x': x['l0'], 'l0_y': y['l0'], 'l0_z': z['l0'], 'd0_x': x['d0'], 'd0_y': y['d0'], 'd0_z': z['d0'], } return summary def data_summary(c1, c2): data = zip(c1 + c2, ['1 €'] * 10 + ['2 €'] * 10) return pandas.DataFrame([summary(curve, coin) for curve, coin in data]) def compare_min(df): df.boxplot(['min_x', 'min_y', 'min_z'], by='coin', layout=(1, 3), figsize=(12, 6)) def compare_d0(df): df.boxplot(['d0_x', 'd0_y', 'd0_z'], by='coin', layout=(1, 3), figsize=(12, 6)) def compare_l0(df): df.boxplot(['l0_x', 'l0_y', 'l0_z'], by='coin', layout=(1, 3), figsize=(12, 6)) def classify_coin(curve): features_x = axis_features(curve['x']) if -0.40 > features_x['min'] > -0.55: return 1 if -0.55 > features_x['min'] > -0.75: return 2 return -1
[ 1, 1053, 12655, 13, 5215, 11701, 13, 3166, 2224, 1982, 1053, 10802, 13, 13, 13, 1753, 10650, 29918, 517, 29918, 1272, 2557, 29898, 1610, 1125, 13, 1678, 848, 353, 12655, 29889, 3166, 9040, 29898, 1610, 29892, 26688, 2433, 524, 29896, 29953, 1495, 13, 1678, 848, 353, 848, 29889, 690, 14443, 3552, 1272, 29889, 2311, 849, 29871, 29946, 29892, 29871, 29946, 876, 13, 1678, 4489, 353, 11701, 29889, 17271, 29898, 1272, 29892, 4341, 29922, 1839, 29873, 742, 525, 29916, 742, 525, 29891, 742, 525, 29920, 11287, 13, 13, 1678, 396, 7817, 278, 11672, 13, 1678, 9500, 353, 7431, 29898, 2176, 29897, 849, 29871, 29906, 448, 4489, 1839, 29916, 13359, 13140, 1195, 580, 13, 1678, 4489, 353, 4489, 29889, 276, 2248, 29898, 23749, 29889, 1245, 29898, 2176, 29889, 2248, 29892, 9500, 8106, 12071, 29918, 2248, 29898, 8865, 29922, 5574, 29897, 13, 13, 1678, 4489, 1839, 29873, 2033, 353, 4489, 1839, 29873, 13359, 12765, 2141, 29883, 398, 2083, 580, 334, 29871, 29896, 29872, 29899, 29953, 13, 1678, 4489, 29889, 2029, 29961, 29900, 29892, 525, 29873, 2033, 353, 29871, 29900, 29889, 13, 1678, 4489, 353, 4489, 29889, 842, 29918, 2248, 877, 29873, 1495, 13, 1678, 736, 4489, 13, 13, 13, 1753, 1303, 29918, 1272, 29898, 29888, 978, 1125, 13, 1678, 4489, 353, 11701, 29889, 949, 29918, 7638, 29898, 29888, 978, 29892, 26688, 2433, 29882, 1495, 13, 1678, 4489, 1839, 29873, 2033, 353, 4489, 1839, 29873, 13359, 12765, 2141, 29883, 398, 2083, 580, 334, 29871, 29896, 29872, 29899, 29953, 13, 1678, 4489, 29889, 2029, 29961, 29900, 29892, 525, 29873, 2033, 353, 29871, 29900, 29889, 13, 1678, 4489, 353, 4489, 29889, 842, 29918, 2248, 877, 29873, 1495, 13, 1678, 736, 4489, 13, 13, 13, 1753, 4226, 675, 29898, 2176, 1125, 13, 1678, 4489, 353, 4489, 29889, 579, 668, 29898, 7411, 29897, 13, 1678, 4489, 847, 29922, 4489, 29889, 309, 542, 7503, 29945, 29900, 1822, 12676, 580, 13, 1678, 4489, 22361, 29871, 29896, 13, 1678, 10640, 353, 4489, 29961, 2176, 1839, 29916, 2033, 529, 448, 29900, 29889, 29906, 29962, 13, 1678, 2923, 353, 10640, 29889, 2248, 14352, 29896, 29962, 448, 10640, 29889, 2248, 29961, 29900, 29962, 13, 1678, 260, 29900, 353, 10640, 29889, 2248, 29961, 29900, 29962, 448, 2923, 13, 1678, 260, 29896, 353, 10640, 29889, 2248, 14352, 29896, 29962, 718, 2923, 13, 1678, 4489, 353, 4489, 29961, 29873, 29900, 29901, 29873, 29896, 29962, 13, 1678, 4489, 29889, 2248, 22361, 4489, 29889, 2248, 29961, 29900, 29962, 13, 1678, 736, 4489, 13, 13, 13, 1753, 2254, 29918, 1272, 29898, 1111, 262, 29892, 2224, 29901, 10802, 353, 6213, 1125, 13, 1678, 565, 2224, 338, 6213, 29901, 13, 4706, 2224, 353, 10802, 877, 1272, 1495, 13, 1678, 565, 338, 8758, 29898, 2084, 29892, 851, 1125, 13, 4706, 2224, 353, 10802, 29898, 2084, 29897, 13, 1678, 848, 353, 5159, 13, 1678, 363, 285, 978, 297, 2224, 29889, 23705, 877, 29995, 29879, 29899, 10521, 7638, 29915, 1273, 19480, 1125, 13, 4706, 4489, 353, 1303, 29918, 1272, 29898, 29888, 978, 29897, 13, 4706, 4489, 353, 4226, 675, 29898, 2176, 29897, 13, 4706, 848, 29889, 4397, 29898, 2176, 29897, 13, 1678, 736, 848, 13, 13, 13, 1753, 9685, 29918, 22100, 29898, 2764, 345, 1125, 13, 1678, 2923, 353, 29871, 29900, 13, 1678, 4482, 353, 11672, 29961, 29900, 29962, 13, 1678, 270, 29900, 29918, 677, 353, 4482, 13, 1678, 363, 995, 297, 11672, 29901, 13, 4706, 4482, 353, 1375, 29898, 677, 29892, 995, 29897, 13, 4706, 270, 353, 995, 448, 4482, 13, 4706, 565, 270, 1405, 2923, 29901, 13, 9651, 2923, 353, 270, 13, 9651, 270, 29900, 29918, 677, 353, 4482, 13, 4706, 565, 995, 1275, 11672, 29889, 1195, 7295, 13, 9651, 2867, 13, 1678, 736, 11117, 1195, 2396, 11672, 29889, 1195, 3285, 525, 29880, 29900, 2396, 270, 29900, 29918, 677, 29892, 525, 29881, 29900, 2396, 2923, 29913, 13, 13, 13, 1753, 15837, 29898, 2764, 345, 29892, 19480, 1125, 13, 1678, 921, 353, 9685, 29918, 22100, 29898, 2764, 345, 1839, 29916, 11287, 13, 1678, 343, 353, 9685, 29918, 22100, 29898, 2764, 345, 1839, 29891, 11287, 13, 1678, 503, 353, 9685, 29918, 22100, 29898, 2764, 345, 1839, 29920, 11287, 13, 1678, 15837, 353, 426, 13, 4706, 525, 1111, 262, 2396, 19480, 29892, 13, 4706, 525, 1195, 29918, 29916, 2396, 921, 1839, 1195, 7464, 13, 4706, 525, 1195, 29918, 29891, 2396, 343, 1839, 1195, 7464, 13, 4706, 525, 1195, 29918, 29920, 2396, 503, 1839, 1195, 7464, 13, 4706, 525, 29880, 29900, 29918, 29916, 2396, 921, 1839, 29880, 29900, 7464, 13, 4706, 525, 29880, 29900, 29918, 29891, 2396, 343, 1839, 29880, 29900, 7464, 13, 4706, 525, 29880, 29900, 29918, 29920, 2396, 503, 1839, 29880, 29900, 7464, 13, 4706, 525, 29881, 29900, 29918, 29916, 2396, 921, 1839, 29881, 29900, 7464, 13, 4706, 525, 29881, 29900, 29918, 29891, 2396, 343, 1839, 29881, 29900, 7464, 13, 4706, 525, 29881, 29900, 29918, 29920, 2396, 503, 1839, 29881, 29900, 7464, 13, 1678, 500, 13, 1678, 736, 15837, 13, 13, 13, 1753, 848, 29918, 7727, 29898, 29883, 29896, 29892, 274, 29906, 1125, 13, 1678, 848, 353, 14319, 29898, 29883, 29896, 718, 274, 29906, 29892, 6024, 29896, 25540, 2033, 334, 29871, 29896, 29900, 718, 6024, 29906, 25540, 2033, 334, 29871, 29896, 29900, 29897, 13, 1678, 736, 11701, 29889, 17271, 4197, 7727, 29898, 2764, 345, 29892, 19480, 29897, 363, 11672, 29892, 19480, 297, 848, 2314, 13, 13, 13, 1753, 7252, 29918, 1195, 29898, 2176, 1125, 13, 1678, 4489, 29889, 1884, 5317, 18959, 1195, 29918, 29916, 742, 525, 1195, 29918, 29891, 742, 525, 1195, 29918, 29920, 7464, 491, 2433, 1111, 262, 742, 13, 1669, 5912, 7607, 29896, 29892, 29871, 29941, 511, 2537, 2311, 7607, 29896, 29906, 29892, 29871, 29953, 876, 13, 13, 13, 1753, 7252, 29918, 29881, 29900, 29898, 2176, 1125, 13, 1678, 4489, 29889, 1884, 5317, 18959, 29881, 29900, 29918, 29916, 742, 525, 29881, 29900, 29918, 29891, 742, 525, 29881, 29900, 29918, 29920, 7464, 491, 2433, 1111, 262, 742, 13, 1669, 5912, 7607, 29896, 29892, 29871, 29941, 511, 2537, 2311, 7607, 29896, 29906, 29892, 29871, 29953, 876, 13, 13, 13, 1753, 7252, 29918, 29880, 29900, 29898, 2176, 1125, 13, 1678, 4489, 29889, 1884, 5317, 18959, 29880, 29900, 29918, 29916, 742, 525, 29880, 29900, 29918, 29891, 742, 525, 29880, 29900, 29918, 29920, 7464, 491, 2433, 1111, 262, 742, 13, 1669, 5912, 7607, 29896, 29892, 29871, 29941, 511, 2537, 2311, 7607, 29896, 29906, 29892, 29871, 29953, 876, 13, 13, 13, 1753, 770, 1598, 29918, 1111, 262, 29898, 2764, 345, 1125, 13, 1678, 5680, 29918, 29916, 353, 9685, 29918, 22100, 29898, 2764, 345, 1839, 29916, 11287, 13, 1678, 565, 448, 29900, 29889, 29946, 29900, 1405, 5680, 29918, 29916, 1839, 1195, 2033, 1405, 448, 29900, 29889, 29945, 29945, 29901, 13, 4706, 736, 29871, 29896, 13, 1678, 565, 448, 29900, 29889, 29945, 29945, 1405, 5680, 29918, 29916, 1839, 1195, 2033, 1405, 448, 29900, 29889, 29955, 29945, 29901, 13, 4706, 736, 29871, 29906, 13, 1678, 736, 448, 29896, 13, 2 ]
Script-003-Boxplots.py
paulinelemenkova/Python-script-003-Boxplots
0
147567
<filename>Script-003-Boxplots.py<gh_stars>0 #!/usr/bin/env python # coding: utf-8 import os import pandas as pd import seaborn as sb from matplotlib import pyplot as plt sb.set_style('whitegrid') sb.set_context('paper') os.chdir('/Users/pauline/Documents/Python') dfB = pd.read_csv("Tab-Bathy.csv") # define variables and plotting sb.boxplot(data=dfB, orient="v", palette='coolwarm', saturation=1, width=0.8, dodge=True, fliersize=5, linewidth=0.2, whis=5, notch=True, ax=None ) sb.despine(offset=10, trim=True) # offset the spines away from the sample data plt.xticks(rotation=45) plt.yticks(rotation=45) plt.title('Box-and-whisker plot for the Mariana Trench bathymetry', fontsize=12, fontfamily='sans-serif' ) # printing and saving plt.tight_layout() plt.savefig('plot_Boxplot.png', dpi=300) plt.show()
[ 1, 529, 9507, 29958, 4081, 29899, 29900, 29900, 29941, 29899, 3313, 26762, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 14137, 29901, 23616, 29899, 29947, 13, 5215, 2897, 13, 5215, 11701, 408, 10518, 13, 5215, 409, 370, 1398, 408, 17444, 13, 3166, 22889, 1053, 11451, 5317, 408, 14770, 13, 13, 20778, 29889, 842, 29918, 3293, 877, 1332, 277, 387, 2429, 1495, 13, 20778, 29889, 842, 29918, 4703, 877, 19773, 1495, 13, 13, 359, 29889, 305, 3972, 11219, 5959, 29914, 3274, 352, 457, 29914, 20128, 29914, 11980, 1495, 13, 2176, 29933, 353, 10518, 29889, 949, 29918, 7638, 703, 8863, 29899, 29933, 493, 29891, 29889, 7638, 1159, 13, 13, 29937, 4529, 3651, 322, 6492, 1259, 13, 20778, 29889, 1884, 5317, 29898, 1272, 29922, 2176, 29933, 29892, 7769, 543, 29894, 613, 282, 26456, 2433, 1111, 324, 29893, 2817, 742, 269, 1337, 362, 29922, 29896, 29892, 13, 965, 2920, 29922, 29900, 29889, 29947, 29892, 270, 17979, 29922, 5574, 29892, 285, 27801, 675, 29922, 29945, 29892, 1196, 2103, 29922, 29900, 29889, 29906, 29892, 13, 965, 17352, 29922, 29945, 29892, 451, 305, 29922, 5574, 29892, 4853, 29922, 8516, 13, 965, 1723, 13, 20778, 29889, 2783, 26215, 29898, 10289, 29922, 29896, 29900, 29892, 17151, 29922, 5574, 29897, 396, 9210, 278, 805, 1475, 3448, 515, 278, 4559, 848, 13, 572, 29873, 29889, 486, 7358, 29898, 5450, 362, 29922, 29946, 29945, 29897, 13, 572, 29873, 29889, 3637, 7358, 29898, 5450, 362, 29922, 29946, 29945, 29897, 13, 572, 29873, 29889, 3257, 877, 3313, 29899, 392, 29899, 1332, 3873, 261, 6492, 363, 278, 1085, 3857, 323, 4615, 27683, 962, 27184, 742, 13, 3986, 4079, 2311, 29922, 29896, 29906, 29892, 4079, 11922, 2433, 29879, 550, 29899, 643, 361, 29915, 13, 3986, 1723, 13, 13, 29937, 14010, 322, 14238, 13, 572, 29873, 29889, 29873, 523, 29918, 2680, 580, 13, 572, 29873, 29889, 7620, 1003, 877, 5317, 29918, 3313, 5317, 29889, 2732, 742, 270, 1631, 29922, 29941, 29900, 29900, 29897, 13, 572, 29873, 29889, 4294, 580, 13, 2 ]
gol-py/src/patterns.py
Tajnymag/vsb-pai-game-of-life
0
114887
<reponame>Tajnymag/vsb-pai-game-of-life<filename>gol-py/src/patterns.py import os from multiprocessing import Pool, Process from multiprocessing.sharedctypes import Array, RawArray import numpy as np from numpy.typing import NDArray from rle import RuleLengthEncoded beehive = RuleLengthEncoded("""#N Beehive #O <NAME> #C An extremely common 6-cell still life. #C www.conwaylife.com/wiki/index.php?title=Beehive x = 4, y = 3, rule = B3/S23 b2ob$o2bo$b2o!""") glider = RuleLengthEncoded("""#N Glider #O <NAME> #C The smallest, most common, and first discovered spaceship. Diagonal, has period 4 and speed c/4. #C www.conwaylife.com/wiki/index.php?title=Glider x = 3, y = 3, rule = B3/S23 bob$2bo$3o!""") block = RuleLengthEncoded("""#N Block #C An extremely common 4-cell still life. #C www.conwaylife.com/wiki/index.php?title=Block x = 2, y = 2, rule = B3/S23 2o$2o!""") blinker = RuleLengthEncoded("""#N Blinker #O <NAME> #C A period 2 oscillator that is the smallest and most common oscillator. #C www.conwaylife.com/wiki/index.php?title=Blinker x = 3, y = 1, rule = B3/S23 3o!""") r_pentomino = RuleLengthEncoded("""#N R-pentomino #C A methuselah with lifespan 1103. #C www.conwaylife.com/wiki/index.php?title=R-pentomino x = 3, y = 3, rule = B3/S23 b2o$2ob$bo!""") n_glider_loop = RuleLengthEncoded("""#N Glider loop #C A pattern in which two gliders are bounced back and forth along an #C ever-lengthening track. #C www.conwaylife.com/wiki/index.php?title=Glider_loop x = 73, y = 150, rule = b3/s23 45bo27b$37b3o5bo27b$36bo2b2o3bobo26b$35bo5bo3bo27b$41bo3bo27b$36b2o2bo 32b$25b2o11b2o33b$25b2o46b6$61bo11b$17b2o40b2ob2o9b$17b2o42bo11b3$59b 2o12b$58bo2bo11b$51bo5bo3b2o10b$51bo5bo4bo10b$9b2o40bo6bo3bo10b$9b2o 37bob3obo3bo2bo11b$48b5obo5bo12b$48bobo22b$52b2o17bob$52b2o9b3o5bob$ 52bo9bo2b2o3bobo$51b2o8bo5bo3bob$46b2o3bo15bo3bob$17b3o31bo10b2o2bo6b$ 20bo29b2obo10b2o7b$15b2o4bo30bo20b$18bo3bo50b$14bo4bo2bo50b$14bo3bo3bo 50b$14b3obob2o51b$18bo54b$14b4o7b3o45b$14b2o8bo3bo44b$24bo4bo28bo14b$ 26bo3bo25b2o9b2o4b$23b3obo2bo24b2o8b3obo3b$22bo7bo23bo10bo3bo3b$22bobo 3bo26b5o5bob2o4b$21b2obo3bo27bo10bo5b$21b2ob3o46b5$63b2o8b$63b2o8b4$ 43b3o27b$46bo26b$41b2o4bo25b$44bo3bo6b2o16b$40bo4bo2bo6b2o16b$40bo3bo 3bo24b$40b3obob2o25b$44bo28b$40b4o29b$40b2o31b2$47b2o24b$47b2o24b2$33b o39b$33bobo37b$33b2o38b3$38b2o33b$37bobo33b$39bo33b2$24b2o47b$24b2o47b 2$31b2o40b$29b4o40b$28bo44b$25b2obob3o40b$24bo3bo3bo40b$16b2o6bo2bo4bo 40b$16b2o6bo3bo44b$25bo4b2o41b$26bo46b$27b3o43b4$8b2o63b$8b2o63b5$46b 3ob2o21b$5bo10bo27bo3bob2o21b$4b2obo5b5o26bo3bobo22b$3bo3bo10bo23bo7bo 22b$3bob3o8b2o24bo2bob3o23b$4b2o9b2o25bo3bo26b$14bo28bo4bo24b$44bo3bo 8b2o14b$45b3o7b4o14b$54bo18b$51b2obob3o14b$50bo3bo3bo14b$50bo2bo4bo14b $50bo3bo18b$20bo30bo4b2o15b$7b2o10bob2o29bo20b$6bo2b2o10bo31b3o17b$bo 3bo15bo3b2o46b$bo3bo5bo8b2o51b$obo3b2o2bo9bo52b$bo5b3o9b2o52b$bo17b2o 52b$22bobo48b$12bo5bob5o48b$11bo2bo3bob3obo37b2o9b$10bo3bo6bo40b2o9b$ 10bo4bo5bo51b$10b2o3bo5bo51b$11bo2bo58b$12b2o59b3$11bo42b2o17b$9b2ob2o 40b2o17b$11bo61b6$46b2o25b$33b2o11b2o25b$32bo2b2o36b$27bo3bo41b$27bo3b o5bo35b$26bobo3b2o2bo36b$27bo5b3o37b$27bo!""") ALL_PATTERNS = [beehive, glider, block, blinker, r_pentomino, n_glider_loop] PATTERN_COLORS_RGB = [ (0, 0, 0), (255, 0, 0), (0, 255, 0), (0, 0, 255), (255, 255, 0), (255, 0, 255), (0, 255, 255), (255, 255, 255), ] def copy_to_board(x: int, y: int, pattern: RuleLengthEncoded, board: NDArray[bool]): (board_width, board_height) = board.shape for pattern_y in range(0, pattern.height): for pattern_x in range(0, pattern.width): board_x = x + pattern_x board_y = y + pattern_y if not 0 <= board_x < board_width: continue if not 0 <= board_y < board_height: continue board[board_y][board_x] = pattern.data[pattern_y][pattern_x] def detect_patterns_thread(from_index: int, to_index: int, board_width: int, board_height: int, board_buffer: RawArray, output_buffer: Array): board = np.frombuffer(board_buffer, dtype=bool) for i in range(from_index, to_index): for pattern_id, pattern in enumerate(ALL_PATTERNS): pattern_start = i skip_pattern = False for pattern_y in range(0, pattern.height): for pattern_x in range(0, pattern.width): cell_index = pattern_start + pattern_y * board_width + pattern_x if cell_index >= board.size: skip_pattern = True break if output_buffer[cell_index] != 0: skip_pattern = True break pattern_value = pattern.data[pattern_y][pattern_x] cell_value = board[cell_index] if cell_value != pattern_value: skip_pattern = True break if not skip_pattern: for pattern_y in range(0, pattern.height): for pattern_x in range(0, pattern.width): cell_index = pattern_start + pattern_y * board_width + pattern_x output_buffer[cell_index] = pattern_id def detect_patterns(board: NDArray[bool], output_buffer: Array): (board_width, board_height) = board.shape board_buffer = RawArray("b", board.ravel()) jobs_count = os.cpu_count() cells_count = board_width * board_height chunk_size = cells_count // jobs_count odd_chunks = cells_count % jobs_count jobs = [] for job_index in range(0, jobs_count): from_index = job_index * chunk_size to_index = from_index + chunk_size + (1 if job_index < odd_chunks else 0) p = Process(target=detect_patterns_thread, args=(from_index, to_index, board_width, board_height, board_buffer, output_buffer)) p.start() jobs.append(p) for p in jobs: print(f"joined process {p.pid}") p.join()
[ 1, 529, 276, 1112, 420, 29958, 29911, 1175, 9574, 351, 29914, 4270, 29890, 29899, 29886, 1794, 29899, 11802, 29899, 974, 29899, 19264, 29966, 9507, 29958, 29887, 324, 29899, 2272, 29914, 4351, 29914, 11037, 29879, 29889, 2272, 13, 5215, 2897, 13, 3166, 6674, 307, 985, 292, 1053, 28625, 29892, 10554, 13, 3166, 6674, 307, 985, 292, 29889, 12366, 312, 7384, 1053, 4398, 29892, 22038, 2588, 13, 13, 5215, 12655, 408, 7442, 13, 3166, 12655, 29889, 1017, 15702, 1053, 405, 29928, 2588, 13, 13, 3166, 364, 280, 1053, 27308, 6513, 8566, 6797, 13, 13, 915, 14797, 573, 353, 27308, 6513, 8566, 6797, 703, 15945, 29937, 29940, 1522, 14797, 573, 13, 29937, 29949, 529, 5813, 29958, 13, 29937, 29907, 530, 14154, 3619, 29871, 29953, 29899, 3729, 1603, 2834, 29889, 13, 29937, 29907, 7821, 29889, 535, 1582, 19264, 29889, 510, 29914, 4594, 29914, 2248, 29889, 1961, 29973, 3257, 29922, 3629, 14797, 573, 13, 29916, 353, 29871, 29946, 29892, 343, 353, 29871, 29941, 29892, 5751, 353, 350, 29941, 29914, 29903, 29906, 29941, 13, 29890, 29906, 711, 29938, 29877, 29906, 833, 29938, 29890, 29906, 29877, 3850, 29908, 1159, 13, 13, 3820, 1241, 353, 27308, 6513, 8566, 6797, 703, 15945, 29937, 29940, 8467, 1241, 13, 29937, 29949, 529, 5813, 29958, 13, 29937, 29907, 450, 19087, 29892, 1556, 3619, 29892, 322, 937, 10943, 8162, 4034, 29889, 4671, 351, 7177, 29892, 756, 3785, 29871, 29946, 322, 6210, 274, 29914, 29946, 29889, 13, 29937, 29907, 7821, 29889, 535, 1582, 19264, 29889, 510, 29914, 4594, 29914, 2248, 29889, 1961, 29973, 3257, 29922, 29954, 29880, 1241, 13, 29916, 353, 29871, 29941, 29892, 343, 353, 29871, 29941, 29892, 5751, 353, 350, 29941, 29914, 29903, 29906, 29941, 13, 29890, 711, 29938, 29906, 833, 29938, 29941, 29877, 3850, 29908, 1159, 13, 13, 1271, 353, 27308, 6513, 8566, 6797, 703, 15945, 29937, 29940, 15658, 13, 29937, 29907, 530, 14154, 3619, 29871, 29946, 29899, 3729, 1603, 2834, 29889, 13, 29937, 29907, 7821, 29889, 535, 1582, 19264, 29889, 510, 29914, 4594, 29914, 2248, 29889, 1961, 29973, 3257, 29922, 7445, 13, 29916, 353, 29871, 29906, 29892, 343, 353, 29871, 29906, 29892, 5751, 353, 350, 29941, 29914, 29903, 29906, 29941, 13, 29906, 29877, 29938, 29906, 29877, 3850, 29908, 1159, 13, 13, 2204, 682, 261, 353, 27308, 6513, 8566, 6797, 703, 15945, 29937, 29940, 350, 2324, 261, 13, 29937, 29949, 529, 5813, 29958, 13, 29937, 29907, 319, 3785, 29871, 29906, 21519, 1061, 393, 338, 278, 19087, 322, 1556, 3619, 21519, 1061, 29889, 13, 29937, 29907, 7821, 29889, 535, 1582, 19264, 29889, 510, 29914, 4594, 29914, 2248, 29889, 1961, 29973, 3257, 29922, 29933, 2324, 261, 13, 29916, 353, 29871, 29941, 29892, 343, 353, 29871, 29896, 29892, 5751, 353, 350, 29941, 29914, 29903, 29906, 29941, 13, 29941, 29877, 3850, 29908, 1159, 13, 13, 29878, 29918, 22825, 290, 1789, 353, 27308, 6513, 8566, 6797, 703, 15945, 29937, 29940, 390, 29899, 22825, 290, 1789, 13, 29937, 29907, 319, 286, 621, 375, 295, 801, 411, 11747, 267, 8357, 29871, 29896, 29896, 29900, 29941, 29889, 13, 29937, 29907, 7821, 29889, 535, 1582, 19264, 29889, 510, 29914, 4594, 29914, 2248, 29889, 1961, 29973, 3257, 29922, 29934, 29899, 22825, 290, 1789, 13, 29916, 353, 29871, 29941, 29892, 343, 353, 29871, 29941, 29892, 5751, 353, 350, 29941, 29914, 29903, 29906, 29941, 13, 29890, 29906, 29877, 29938, 29906, 711, 29938, 833, 3850, 29908, 1159, 13, 13, 29876, 29918, 3820, 1241, 29918, 7888, 353, 27308, 6513, 8566, 6797, 703, 15945, 29937, 29940, 8467, 1241, 2425, 13, 29937, 29907, 319, 4766, 297, 607, 1023, 3144, 11376, 526, 289, 20979, 1250, 322, 11483, 3412, 385, 13, 29937, 29907, 3926, 29899, 2848, 8333, 5702, 29889, 13, 29937, 29907, 7821, 29889, 535, 1582, 19264, 29889, 510, 29914, 4594, 29914, 2248, 29889, 1961, 29973, 3257, 29922, 29954, 29880, 1241, 29918, 7888, 13, 29916, 353, 29871, 29955, 29941, 29892, 343, 353, 29871, 29896, 29945, 29900, 29892, 5751, 353, 289, 29941, 29914, 29879, 29906, 29941, 13, 29946, 29945, 833, 29906, 29955, 29890, 29938, 29941, 29955, 29890, 29941, 29877, 29945, 833, 29906, 29955, 29890, 29938, 29941, 29953, 833, 29906, 29890, 29906, 29877, 29941, 29890, 711, 29877, 29906, 29953, 29890, 29938, 29941, 29945, 833, 29945, 833, 29941, 833, 29906, 29955, 29890, 29938, 29946, 29896, 833, 29941, 833, 29906, 29955, 29890, 29938, 29941, 29953, 29890, 29906, 29877, 29906, 833, 13, 29941, 29906, 29890, 29938, 29906, 29945, 29890, 29906, 29877, 29896, 29896, 29890, 29906, 29877, 29941, 29941, 29890, 29938, 29906, 29945, 29890, 29906, 29877, 29946, 29953, 29890, 29953, 29938, 29953, 29896, 833, 29896, 29896, 29890, 29938, 29896, 29955, 29890, 29906, 29877, 29946, 29900, 29890, 29906, 711, 29906, 29877, 29929, 29890, 29938, 29896, 29955, 29890, 29906, 29877, 29946, 29906, 833, 29896, 29896, 29890, 29941, 29938, 29945, 29929, 29890, 13, 29906, 29877, 29896, 29906, 29890, 29938, 29945, 29947, 833, 29906, 833, 29896, 29896, 29890, 29938, 29945, 29896, 833, 29945, 833, 29941, 29890, 29906, 29877, 29896, 29900, 29890, 29938, 29945, 29896, 833, 29945, 833, 29946, 833, 29896, 29900, 29890, 29938, 29929, 29890, 29906, 29877, 29946, 29900, 833, 29953, 833, 29941, 833, 29896, 29900, 29890, 29938, 29929, 29890, 29906, 29877, 13, 29941, 29955, 29890, 711, 29941, 711, 29877, 29941, 833, 29906, 833, 29896, 29896, 29890, 29938, 29946, 29947, 29890, 29945, 711, 29877, 29945, 833, 29896, 29906, 29890, 29938, 29946, 29947, 29890, 711, 29877, 29906, 29906, 29890, 29938, 29945, 29906, 29890, 29906, 29877, 29896, 29955, 29890, 711, 29938, 29945, 29906, 29890, 29906, 29877, 29929, 29890, 29941, 29877, 29945, 29890, 711, 29938, 13, 29945, 29906, 833, 29929, 833, 29906, 29890, 29906, 29877, 29941, 29890, 711, 29877, 29938, 29945, 29896, 29890, 29906, 29877, 29947, 833, 29945, 833, 29941, 29890, 711, 29938, 29946, 29953, 29890, 29906, 29877, 29941, 833, 29896, 29945, 833, 29941, 29890, 711, 29938, 29896, 29955, 29890, 29941, 29877, 29941, 29896, 833, 29896, 29900, 29890, 29906, 29877, 29906, 833, 29953, 29890, 29938, 13, 29906, 29900, 833, 29906, 29929, 29890, 29906, 711, 29877, 29896, 29900, 29890, 29906, 29877, 29955, 29890, 29938, 29896, 29945, 29890, 29906, 29877, 29946, 833, 29941, 29900, 833, 29906, 29900, 29890, 29938, 29896, 29947, 833, 29941, 833, 29945, 29900, 29890, 29938, 29896, 29946, 833, 29946, 833, 29906, 833, 29945, 29900, 29890, 29938, 29896, 29946, 833, 29941, 833, 29941, 833, 13, 29945, 29900, 29890, 29938, 29896, 29946, 29890, 29941, 711, 711, 29906, 29877, 29945, 29896, 29890, 29938, 29896, 29947, 833, 29945, 29946, 29890, 29938, 29896, 29946, 29890, 29946, 29877, 29955, 29890, 29941, 29877, 29946, 29945, 29890, 29938, 29896, 29946, 29890, 29906, 29877, 29947, 833, 29941, 833, 29946, 29946, 29890, 29938, 29906, 29946, 833, 29946, 833, 29906, 29947, 833, 29896, 29946, 29890, 29938, 13, 29906, 29953, 833, 29941, 833, 29906, 29945, 29890, 29906, 29877, 29929, 29890, 29906, 29877, 29946, 29890, 29938, 29906, 29941, 29890, 29941, 711, 29877, 29906, 833, 29906, 29946, 29890, 29906, 29877, 29947, 29890, 29941, 711, 29877, 29941, 29890, 29938, 29906, 29906, 833, 29955, 833, 29906, 29941, 833, 29896, 29900, 833, 29941, 833, 29941, 29890, 29938, 29906, 29906, 29890, 711, 29877, 13, 29941, 833, 29906, 29953, 29890, 29945, 29877, 29945, 29890, 711, 29906, 29877, 29946, 29890, 29938, 29906, 29896, 29890, 29906, 711, 29877, 29941, 833, 29906, 29955, 833, 29896, 29900, 833, 29945, 29890, 29938, 29906, 29896, 29890, 29906, 711, 29941, 29877, 29946, 29953, 29890, 29945, 29938, 29953, 29941, 29890, 29906, 29877, 29947, 29890, 29938, 29953, 29941, 29890, 29906, 29877, 29947, 29890, 29946, 29938, 13, 29946, 29941, 29890, 29941, 29877, 29906, 29955, 29890, 29938, 29946, 29953, 833, 29906, 29953, 29890, 29938, 29946, 29896, 29890, 29906, 29877, 29946, 833, 29906, 29945, 29890, 29938, 29946, 29946, 833, 29941, 833, 29953, 29890, 29906, 29877, 29896, 29953, 29890, 29938, 29946, 29900, 833, 29946, 833, 29906, 833, 29953, 29890, 29906, 29877, 29896, 29953, 29890, 29938, 29946, 29900, 833, 29941, 833, 13, 29941, 833, 29906, 29946, 29890, 29938, 29946, 29900, 29890, 29941, 711, 711, 29906, 29877, 29906, 29945, 29890, 29938, 29946, 29946, 833, 29906, 29947, 29890, 29938, 29946, 29900, 29890, 29946, 29877, 29906, 29929, 29890, 29938, 29946, 29900, 29890, 29906, 29877, 29941, 29896, 29890, 29906, 29938, 29946, 29955, 29890, 29906, 29877, 29906, 29946, 29890, 29938, 29946, 29955, 29890, 29906, 29877, 29906, 29946, 29890, 29906, 29938, 29941, 29941, 29890, 13, 29877, 29941, 29929, 29890, 29938, 29941, 29941, 29890, 711, 29877, 29941, 29955, 29890, 29938, 29941, 29941, 29890, 29906, 29877, 29941, 29947, 29890, 29941, 29938, 29941, 29947, 29890, 29906, 29877, 29941, 29941, 29890, 29938, 29941, 29955, 29890, 711, 29877, 29941, 29941, 29890, 29938, 29941, 29929, 833, 29941, 29941, 29890, 29906, 29938, 29906, 29946, 29890, 29906, 29877, 29946, 29955, 29890, 29938, 29906, 29946, 29890, 29906, 29877, 29946, 29955, 29890, 13, 29906, 29938, 29941, 29896, 29890, 29906, 29877, 29946, 29900, 29890, 29938, 29906, 29929, 29890, 29946, 29877, 29946, 29900, 29890, 29938, 29906, 29947, 833, 29946, 29946, 29890, 29938, 29906, 29945, 29890, 29906, 711, 711, 29941, 29877, 29946, 29900, 29890, 29938, 29906, 29946, 833, 29941, 833, 29941, 833, 29946, 29900, 29890, 29938, 29896, 29953, 29890, 29906, 29877, 29953, 833, 29906, 833, 29946, 833, 13, 29946, 29900, 29890, 29938, 29896, 29953, 29890, 29906, 29877, 29953, 833, 29941, 833, 29946, 29946, 29890, 29938, 29906, 29945, 833, 29946, 29890, 29906, 29877, 29946, 29896, 29890, 29938, 29906, 29953, 833, 29946, 29953, 29890, 29938, 29906, 29955, 29890, 29941, 29877, 29946, 29941, 29890, 29946, 29938, 29947, 29890, 29906, 29877, 29953, 29941, 29890, 29938, 29947, 29890, 29906, 29877, 29953, 29941, 29890, 29945, 29938, 29946, 29953, 29890, 13, 29941, 711, 29906, 29877, 29906, 29896, 29890, 29938, 29945, 833, 29896, 29900, 833, 29906, 29955, 833, 29941, 29890, 711, 29906, 29877, 29906, 29896, 29890, 29938, 29946, 29890, 29906, 711, 29877, 29945, 29890, 29945, 29877, 29906, 29953, 833, 29941, 29890, 711, 29877, 29906, 29906, 29890, 29938, 29941, 833, 29941, 833, 29896, 29900, 833, 29906, 29941, 833, 29955, 833, 13, 29906, 29906, 29890, 29938, 29941, 29890, 711, 29941, 29877, 29947, 29890, 29906, 29877, 29906, 29946, 833, 29906, 29890, 711, 29941, 29877, 29906, 29941, 29890, 29938, 29946, 29890, 29906, 29877, 29929, 29890, 29906, 29877, 29906, 29945, 833, 29941, 833, 29906, 29953, 29890, 29938, 29896, 29946, 833, 29906, 29947, 833, 29946, 833, 29906, 29946, 29890, 29938, 29946, 29946, 833, 29941, 833, 13, 29947, 29890, 29906, 29877, 29896, 29946, 29890, 29938, 29946, 29945, 29890, 29941, 29877, 29955, 29890, 29946, 29877, 29896, 29946, 29890, 29938, 29945, 29946, 833, 29896, 29947, 29890, 29938, 29945, 29896, 29890, 29906, 711, 711, 29941, 29877, 29896, 29946, 29890, 29938, 29945, 29900, 833, 29941, 833, 29941, 833, 29896, 29946, 29890, 29938, 29945, 29900, 833, 29906, 833, 29946, 833, 29896, 29946, 29890, 13, 29938, 29945, 29900, 833, 29941, 833, 29896, 29947, 29890, 29938, 29906, 29900, 833, 29941, 29900, 833, 29946, 29890, 29906, 29877, 29896, 29945, 29890, 29938, 29955, 29890, 29906, 29877, 29896, 29900, 29890, 711, 29906, 29877, 29906, 29929, 833, 29906, 29900, 29890, 29938, 29953, 833, 29906, 29890, 29906, 29877, 29896, 29900, 833, 29941, 29896, 29890, 29941, 29877, 29896, 29955, 29890, 29938, 833, 13, 29941, 833, 29896, 29945, 833, 29941, 29890, 29906, 29877, 29946, 29953, 29890, 29938, 833, 29941, 833, 29945, 833, 29947, 29890, 29906, 29877, 29945, 29896, 29890, 29938, 711, 29877, 29941, 29890, 29906, 29877, 29906, 833, 29929, 833, 29945, 29906, 29890, 29938, 833, 29945, 29890, 29941, 29877, 29929, 29890, 29906, 29877, 29945, 29906, 29890, 29938, 833, 29896, 29955, 29890, 29906, 29877, 13, 29945, 29906, 29890, 29938, 29906, 29906, 29890, 711, 29877, 29946, 29947, 29890, 29938, 29896, 29906, 833, 29945, 29890, 711, 29945, 29877, 29946, 29947, 29890, 29938, 29896, 29896, 833, 29906, 833, 29941, 29890, 711, 29941, 711, 29877, 29941, 29955, 29890, 29906, 29877, 29929, 29890, 29938, 29896, 29900, 833, 29941, 833, 29953, 833, 29946, 29900, 29890, 29906, 29877, 29929, 29890, 29938, 13, 29896, 29900, 833, 29946, 833, 29945, 833, 29945, 29896, 29890, 29938, 29896, 29900, 29890, 29906, 29877, 29941, 833, 29945, 833, 29945, 29896, 29890, 29938, 29896, 29896, 833, 29906, 833, 29945, 29947, 29890, 29938, 29896, 29906, 29890, 29906, 29877, 29945, 29929, 29890, 29941, 29938, 29896, 29896, 833, 29946, 29906, 29890, 29906, 29877, 29896, 29955, 29890, 29938, 29929, 29890, 29906, 711, 29906, 29877, 13, 29946, 29900, 29890, 29906, 29877, 29896, 29955, 29890, 29938, 29896, 29896, 833, 29953, 29896, 29890, 29953, 29938, 29946, 29953, 29890, 29906, 29877, 29906, 29945, 29890, 29938, 29941, 29941, 29890, 29906, 29877, 29896, 29896, 29890, 29906, 29877, 29906, 29945, 29890, 29938, 29941, 29906, 833, 29906, 29890, 29906, 29877, 29941, 29953, 29890, 29938, 29906, 29955, 833, 29941, 833, 29946, 29896, 29890, 29938, 29906, 29955, 833, 29941, 29890, 13, 29877, 29945, 833, 29941, 29945, 29890, 29938, 29906, 29953, 29890, 711, 29877, 29941, 29890, 29906, 29877, 29906, 833, 29941, 29953, 29890, 29938, 29906, 29955, 833, 29945, 29890, 29941, 29877, 29941, 29955, 29890, 29938, 29906, 29955, 833, 3850, 29908, 1159, 13, 13, 9818, 29918, 29925, 1299, 4945, 3059, 353, 518, 915, 14797, 573, 29892, 3144, 1241, 29892, 2908, 29892, 1999, 682, 261, 29892, 364, 29918, 22825, 290, 1789, 29892, 302, 29918, 3820, 1241, 29918, 7888, 29962, 13, 13, 29925, 1299, 4945, 29940, 29918, 15032, 24125, 29918, 28212, 353, 518, 13, 1678, 313, 29900, 29892, 29871, 29900, 29892, 29871, 29900, 511, 13, 1678, 313, 29906, 29945, 29945, 29892, 29871, 29900, 29892, 29871, 29900, 511, 13, 1678, 313, 29900, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29900, 511, 13, 1678, 313, 29900, 29892, 29871, 29900, 29892, 29871, 29906, 29945, 29945, 511, 13, 1678, 313, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29900, 511, 13, 1678, 313, 29906, 29945, 29945, 29892, 29871, 29900, 29892, 29871, 29906, 29945, 29945, 511, 13, 1678, 313, 29900, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 511, 13, 1678, 313, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 511, 13, 29962, 13, 13, 13, 1753, 3509, 29918, 517, 29918, 3377, 29898, 29916, 29901, 938, 29892, 343, 29901, 938, 29892, 4766, 29901, 27308, 6513, 8566, 6797, 29892, 7613, 29901, 405, 29928, 2588, 29961, 11227, 29962, 1125, 13, 1678, 313, 3377, 29918, 2103, 29892, 7613, 29918, 3545, 29897, 353, 7613, 29889, 12181, 13, 1678, 363, 4766, 29918, 29891, 297, 3464, 29898, 29900, 29892, 4766, 29889, 3545, 1125, 13, 4706, 363, 4766, 29918, 29916, 297, 3464, 29898, 29900, 29892, 4766, 29889, 2103, 1125, 13, 9651, 7613, 29918, 29916, 353, 921, 718, 4766, 29918, 29916, 13, 9651, 7613, 29918, 29891, 353, 343, 718, 4766, 29918, 29891, 13, 13, 9651, 565, 451, 29871, 29900, 5277, 7613, 29918, 29916, 529, 7613, 29918, 2103, 29901, 13, 18884, 6773, 13, 13, 9651, 565, 451, 29871, 29900, 5277, 7613, 29918, 29891, 529, 7613, 29918, 3545, 29901, 13, 18884, 6773, 13, 13, 9651, 7613, 29961, 3377, 29918, 29891, 3816, 3377, 29918, 29916, 29962, 353, 4766, 29889, 1272, 29961, 11037, 29918, 29891, 3816, 11037, 29918, 29916, 29962, 13, 13, 13, 1753, 6459, 29918, 11037, 29879, 29918, 7097, 29898, 3166, 29918, 2248, 29901, 938, 29892, 304, 29918, 2248, 29901, 938, 29892, 7613, 29918, 2103, 29901, 938, 29892, 7613, 29918, 3545, 29901, 938, 29892, 7613, 29918, 9040, 29901, 22038, 2588, 29892, 1962, 29918, 9040, 29901, 4398, 1125, 13, 1678, 7613, 353, 7442, 29889, 3166, 9040, 29898, 3377, 29918, 9040, 29892, 26688, 29922, 11227, 29897, 13, 13, 1678, 363, 474, 297, 3464, 29898, 3166, 29918, 2248, 29892, 304, 29918, 2248, 1125, 13, 4706, 363, 4766, 29918, 333, 29892, 4766, 297, 26985, 29898, 9818, 29918, 29925, 1299, 4945, 3059, 1125, 13, 9651, 4766, 29918, 2962, 353, 474, 13, 9651, 14383, 29918, 11037, 353, 7700, 13, 13, 9651, 363, 4766, 29918, 29891, 297, 3464, 29898, 29900, 29892, 4766, 29889, 3545, 1125, 13, 18884, 363, 4766, 29918, 29916, 297, 3464, 29898, 29900, 29892, 4766, 29889, 2103, 1125, 13, 462, 1678, 3038, 29918, 2248, 353, 4766, 29918, 2962, 718, 4766, 29918, 29891, 334, 7613, 29918, 2103, 718, 4766, 29918, 29916, 13, 13, 462, 1678, 565, 3038, 29918, 2248, 6736, 7613, 29889, 2311, 29901, 13, 462, 4706, 14383, 29918, 11037, 353, 5852, 13, 462, 4706, 2867, 13, 13, 462, 1678, 565, 1962, 29918, 9040, 29961, 3729, 29918, 2248, 29962, 2804, 29871, 29900, 29901, 13, 462, 4706, 14383, 29918, 11037, 353, 5852, 13, 462, 4706, 2867, 13, 13, 462, 1678, 4766, 29918, 1767, 353, 4766, 29889, 1272, 29961, 11037, 29918, 29891, 3816, 11037, 29918, 29916, 29962, 13, 462, 1678, 3038, 29918, 1767, 353, 7613, 29961, 3729, 29918, 2248, 29962, 13, 13, 462, 1678, 565, 3038, 29918, 1767, 2804, 4766, 29918, 1767, 29901, 13, 462, 4706, 14383, 29918, 11037, 353, 5852, 13, 462, 4706, 2867, 13, 13, 9651, 565, 451, 14383, 29918, 11037, 29901, 13, 18884, 363, 4766, 29918, 29891, 297, 3464, 29898, 29900, 29892, 4766, 29889, 3545, 1125, 13, 462, 1678, 363, 4766, 29918, 29916, 297, 3464, 29898, 29900, 29892, 4766, 29889, 2103, 1125, 13, 462, 4706, 3038, 29918, 2248, 353, 4766, 29918, 2962, 718, 4766, 29918, 29891, 334, 7613, 29918, 2103, 718, 4766, 29918, 29916, 13, 462, 4706, 1962, 29918, 9040, 29961, 3729, 29918, 2248, 29962, 353, 4766, 29918, 333, 13, 13, 13, 1753, 6459, 29918, 11037, 29879, 29898, 3377, 29901, 405, 29928, 2588, 29961, 11227, 1402, 1962, 29918, 9040, 29901, 4398, 1125, 13, 1678, 313, 3377, 29918, 2103, 29892, 7613, 29918, 3545, 29897, 353, 7613, 29889, 12181, 13, 13, 1678, 7613, 29918, 9040, 353, 22038, 2588, 703, 29890, 613, 7613, 29889, 336, 955, 3101, 13, 13, 1678, 17643, 29918, 2798, 353, 2897, 29889, 21970, 29918, 2798, 580, 13, 1678, 9101, 29918, 2798, 353, 7613, 29918, 2103, 334, 7613, 29918, 3545, 13, 13, 1678, 19875, 29918, 2311, 353, 9101, 29918, 2798, 849, 17643, 29918, 2798, 13, 1678, 7736, 29918, 305, 18801, 353, 9101, 29918, 2798, 1273, 17643, 29918, 2798, 13, 13, 1678, 17643, 353, 5159, 13, 13, 1678, 363, 4982, 29918, 2248, 297, 3464, 29898, 29900, 29892, 17643, 29918, 2798, 1125, 13, 4706, 515, 29918, 2248, 353, 4982, 29918, 2248, 334, 19875, 29918, 2311, 13, 4706, 304, 29918, 2248, 353, 515, 29918, 2248, 718, 19875, 29918, 2311, 718, 313, 29896, 565, 4982, 29918, 2248, 529, 7736, 29918, 305, 18801, 1683, 29871, 29900, 29897, 13, 13, 4706, 282, 353, 10554, 29898, 5182, 29922, 4801, 522, 29918, 11037, 29879, 29918, 7097, 29892, 6389, 7607, 3166, 29918, 2248, 29892, 304, 29918, 2248, 29892, 7613, 29918, 2103, 29892, 7613, 29918, 3545, 29892, 7613, 29918, 9040, 29892, 1962, 29918, 9040, 876, 13, 4706, 282, 29889, 2962, 580, 13, 4706, 17643, 29889, 4397, 29898, 29886, 29897, 13, 13, 1678, 363, 282, 297, 17643, 29901, 13, 4706, 1596, 29898, 29888, 29908, 2212, 1312, 1889, 426, 29886, 29889, 5935, 27195, 13, 4706, 282, 29889, 7122, 580, 13, 2 ]
zfs/replicate/filesystem/list.py
MarcoPolo/zfs-replicate
0
1616840
# -*- coding: utf-8 -*- """ZFs FileSystem List.""" import re from typing import List from .. import subprocess from ..error import ZFSReplicateError from . import type from .type import FileSystem RE_WHITESPACE = re.compile(b"[ \t]+") def list(filesystem: FileSystem, ssh_command: str) -> List[FileSystem]: """List ZFS FileSystem.""" command = _list(filesystem) if ssh_command is not None: command = ssh_command + " " + command proc = subprocess.open(command) output, error = proc.communicate() if error is not None: error = error.strip(b"\n").strip(b"\r").replace(b"WARNING: ENABLED NONE CIPHER", b"") if proc.returncode: raise ZFSReplicateError( f"error encountered while listing filesystems of '{filesystem.name}': {error!r}", filesystem, error, ) return _filesystems(output) def _list(filesystem: FileSystem) -> str: options = ["-H", "-o name,readonly", "-t filesystem,volume", "-r"] return f"/usr/bin/env - zfs list {' '.join(options)} '{filesystem.name}'" def _filesystems(zfs_list_output: bytes) -> List[FileSystem]: return [_filesystem(x) for x in zfs_list_output.split(b"\n") if x != b""] def _filesystem(zfs_list_line: bytes) -> FileSystem: name, readonly = RE_WHITESPACE.sub(b" ", zfs_list_line).split(b" ") return type.filesystem(name=name.decode("utf-8"), readonly=readonly == b"on")
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 15945, 29908, 29999, 29943, 29879, 3497, 3924, 2391, 1213, 15945, 13, 5215, 337, 13, 3166, 19229, 1053, 2391, 13, 13, 3166, 6317, 1053, 1014, 5014, 13, 3166, 6317, 2704, 1053, 796, 9998, 5612, 5926, 2392, 13, 3166, 869, 1053, 1134, 13, 3166, 869, 1853, 1053, 3497, 3924, 13, 13, 1525, 29918, 25039, 1806, 2890, 29925, 11538, 353, 337, 29889, 12198, 29898, 29890, 29908, 29961, 320, 29873, 10062, 1159, 13, 13, 13, 1753, 1051, 29898, 5325, 973, 29901, 3497, 3924, 29892, 13927, 29918, 6519, 29901, 851, 29897, 1599, 2391, 29961, 2283, 3924, 5387, 13, 1678, 9995, 1293, 796, 9998, 3497, 3924, 1213, 15945, 13, 1678, 1899, 353, 903, 1761, 29898, 5325, 973, 29897, 13, 1678, 565, 13927, 29918, 6519, 338, 451, 6213, 29901, 13, 4706, 1899, 353, 13927, 29918, 6519, 718, 376, 376, 718, 1899, 13, 13, 1678, 9580, 353, 1014, 5014, 29889, 3150, 29898, 6519, 29897, 13, 13, 1678, 1962, 29892, 1059, 353, 9580, 29889, 27820, 403, 580, 13, 1678, 565, 1059, 338, 451, 6213, 29901, 13, 4706, 1059, 353, 1059, 29889, 17010, 29898, 29890, 26732, 29876, 2564, 17010, 29898, 29890, 26732, 29878, 2564, 6506, 29898, 29890, 29908, 29956, 25614, 29901, 12524, 6181, 29928, 405, 12413, 315, 5690, 4448, 613, 289, 29908, 1159, 13, 13, 1678, 565, 9580, 29889, 2457, 401, 29901, 13, 4706, 12020, 796, 9998, 5612, 5926, 2392, 29898, 13, 9651, 285, 29908, 2704, 18169, 1550, 18028, 22101, 29879, 310, 22372, 5325, 973, 29889, 978, 29913, 2396, 426, 2704, 29991, 29878, 17671, 13, 9651, 22101, 29892, 13, 9651, 1059, 29892, 13, 4706, 1723, 13, 13, 1678, 736, 903, 5325, 973, 29879, 29898, 4905, 29897, 13, 13, 13, 1753, 903, 1761, 29898, 5325, 973, 29901, 3497, 3924, 29897, 1599, 851, 29901, 13, 1678, 3987, 353, 6796, 29899, 29950, 613, 11663, 29877, 1024, 29892, 949, 6194, 613, 11663, 29873, 22101, 29892, 24623, 613, 11663, 29878, 3108, 13, 13, 1678, 736, 285, 23901, 4855, 29914, 2109, 29914, 6272, 448, 503, 5847, 1051, 11117, 15300, 7122, 29898, 6768, 2915, 22372, 5325, 973, 29889, 978, 10162, 29908, 13, 13, 13, 1753, 903, 5325, 973, 29879, 29898, 29920, 5847, 29918, 1761, 29918, 4905, 29901, 6262, 29897, 1599, 2391, 29961, 2283, 3924, 5387, 13, 1678, 736, 23160, 5325, 973, 29898, 29916, 29897, 363, 921, 297, 503, 5847, 29918, 1761, 29918, 4905, 29889, 5451, 29898, 29890, 26732, 29876, 1159, 565, 921, 2804, 289, 29908, 3108, 13, 13, 13, 1753, 903, 5325, 973, 29898, 29920, 5847, 29918, 1761, 29918, 1220, 29901, 6262, 29897, 1599, 3497, 3924, 29901, 13, 1678, 1024, 29892, 20623, 353, 5195, 29918, 25039, 1806, 2890, 29925, 11538, 29889, 1491, 29898, 29890, 29908, 9162, 503, 5847, 29918, 1761, 29918, 1220, 467, 5451, 29898, 29890, 29908, 16521, 13, 13, 1678, 736, 1134, 29889, 5325, 973, 29898, 978, 29922, 978, 29889, 13808, 703, 9420, 29899, 29947, 4968, 20623, 29922, 949, 6194, 1275, 289, 29908, 265, 1159, 13, 2 ]
refactorings/increase_field_visibility.py
Amin-MAG/CodART
1
108766
""" """ __version__ = '0.1.0' __author__ = 'Morteza' import os try: import understand as und except ModuleNotFoundError: # Error handling pass from antlr4 import * from antlr4.TokenStreamRewriter import TokenStreamRewriter from gen.java.JavaParser import JavaParser from gen.javaLabeled.JavaLexer import JavaLexer from gen.javaLabeled.JavaParserLabeled import JavaParserLabeled from gen.javaLabeled.JavaParserLabeledListener import JavaParserLabeledListener class IncreaseFieldVisibilityRefactoringListener(JavaParserLabeledListener): """ ## Introduction Increase the visibility of a field from private to package, package to protected or protected to public. ## Pre and Post Conditions ### Pre Conditions: 1. User must enter the field's name, and the source class's name for the refactoring in order to increase the target field's visibility. ### Post Conditions: No specific Post Condition """ def __init__(self, common_token_stream: CommonTokenStream = None, source_class=None, field_name: str = None): """To implement Increase Field Visibility refactoring based on its actors. Detects the required field and increases/changes its visibility status. Args: common_token_stream (CommonTokenStream): A stream of tokens generated by parsing the main file using the ANTLR parser generator source_class (str): Name of the class in which the refactoring has to be done field_name (str): Name of the field whose visibility status has to be changed Returns: No returns """ if field_name is None: self.field_name = "" else: self.field_name = field_name if source_class is None: self.source_class = "" else: self.source_class = source_class if common_token_stream is None: raise ValueError('common_token_stream is None') else: self.token_stream_rewriter = TokenStreamRewriter(common_token_stream) self.is_source_class = False self.detected_field = None self.detected_method = None self.TAB = "\t" self.NEW_LINE = "\n" self.code = "" self.tempdeclarationcode = "" def enterClassDeclaration(self, ctx: JavaParserLabeled.ClassDeclarationContext): class_identifier = ctx.IDENTIFIER().getText() if class_identifier == self.source_class: self.is_source_class = True else: self.is_source_class = False def exitFieldDeclaration(self, ctx: JavaParserLabeled.FieldDeclarationContext): if not self.is_source_class: return None grand_parent_ctx = ctx.parentCtx.parentCtx # field_identifier = ctx.variableDeclarators().getText().split(",") field_identifier = ctx.variableDeclarators().variableDeclarator(0).variableDeclaratorId().IDENTIFIER().getText() if self.field_name in field_identifier: if grand_parent_ctx.modifier() == []: self.token_stream_rewriter.replaceRange( from_idx=ctx.typeType().start.tokenIndex, to_idx=ctx.typeType().stop.tokenIndex, text='private ' + ctx.typeType().getText() ) elif grand_parent_ctx.modifier(0).getText() == 'public': self.token_stream_rewriter.replaceRange( from_idx=grand_parent_ctx.modifier(0).start.tokenIndex, to_idx=grand_parent_ctx.modifier(0).stop.tokenIndex, text='private') elif grand_parent_ctx.modifier(0).getText() != 'private': self.token_stream_rewriter.replaceRange( from_idx=grand_parent_ctx.modifier(0).start.tokenIndex, to_idx=grand_parent_ctx.modifier(0).stop.tokenIndex, text='private ' + grand_parent_ctx.modifier(0).getText()) # generate accessor and mutator methods # Accessor body new_code = '\n\t' new_code += 'public ' + ctx.typeType().getText() + ' get' + str.capitalize(self.field_name) new_code += '() { \n\t\t return this.' + self.field_name + ';' + '\n\t}' # Mutator body new_code += '\n\t' new_code += 'public void set' + str.capitalize(self.field_name) new_code += '(' + ctx.typeType().getText() + ' ' + self.field_name + ') { \n\t\t' new_code += 'this.' + self.field_name + ' = ' + self.field_name + ';' + '\n\t}\n' self.token_stream_rewriter.insertAfter(ctx.stop.tokenIndex, new_code) class PropagationIncreaseFieldVisibilityRefactoringListener(JavaParserLabeledListener): def __init__(self, common_token_stream: CommonTokenStream = None, using_field_name=None, object_name=None, propagated_class_name=None): """ Used for propagation purposes in the other classes of the project: implement the propagation Args: common_token_stream (CommonTokenStream): A stream of tokens generated by parsing the main file using the ANTLR parser generator using_field_name (str): Name of the field which has to be propagated object_name (str): Name of the objects that need to be changed with the propagation operation propagated_class_name (str): Name of the class in which the propagation operation needs to be implemented Returns: No returns """ if using_field_name is None: self.using_field_name = [] else: self.using_field_name = using_field_name if object_name is None: self.object_name = [] else: self.object_name = object_name if propagated_class_name is None: self.propagated_class_name = [] else: self.propagated_class_name = propagated_class_name if common_token_stream is None: raise ValueError('common_token_stream is None') else: self.token_stream_rewriter = TokenStreamRewriter(common_token_stream) self.is_class = False def enterClassDeclaration(self, ctx: JavaParserLabeled.ClassDeclarationContext): # print("Propagation started, please wait...") class_identifier = ctx.IDENTIFIER().getText() if class_identifier == self.propagated_class_name: self.is_class = True print("Propagation started, please wait...") else: self.is_class = False def enterVariableDeclarator(self, ctx: JavaParserLabeled.VariableDeclaratorContext): if not self.is_class: return None usingfieldidentifier = ctx.variableDeclaratorId().IDENTIFIER().getText() grand_child_ctx = ctx.variableInitializer().expression() if usingfieldidentifier in self.using_field_name: objectidentifier = grand_child_ctx.expression(0).primary().IDENTIFIER().getText() if objectidentifier in self.object_name: self.token_stream_rewriter.replaceRange( from_idx=grand_child_ctx.start.tokenIndex, to_idx=grand_child_ctx.stop.tokenIndex, text=grand_child_ctx.expression(0).primary().IDENTIFIER().getText() + '.' + 'get' + str.capitalize( grand_child_ctx.IDENTIFIER().getText()) + '()' ) def enterExpression(self, ctx: JavaParserLabeled.ExpressionContext): if not self.is_class: return if ctx.expression(0) != None: if ctx.expression(0).primary() != None: if ctx.expression(0).primary().IDENTIFIER().getText() in self.object_name: parent_ctx = ctx.parentCtx count = parent_ctx.getChildCount() if count == 3: expressiontext = parent_ctx.children[2].getText() self.token_stream_rewriter.replaceRange( from_idx=parent_ctx.start.tokenIndex, to_idx=parent_ctx.stop.tokenIndex, text=ctx.expression(0).primary().IDENTIFIER().getText() + '.' + 'set' + str.capitalize( ctx.IDENTIFIER().getText()) + '(' + expressiontext + ')' ) class PropagationIncreaseFieldVisibility_GetObjects_RefactoringListener(JavaParserLabeledListener): def __init__(self, common_token_stream: CommonTokenStream = None, source_class=None, propagated_class_name=None): """Used for propagation purposes in the other classes of the project: Detect the objects which have to be propagated Args: common_token_stream (CommonTokenStream): A stream of tokens generated by parsing the main file using the ANTLR parser generator source_class (str): Name of the class in which the propagation has to be implemented propagated_class_name (str): Name of the class which has to be propagated Returns: No returns """ if source_class is None: self.source_class = [] else: self.source_class = source_class if propagated_class_name is None: self.propagated_class_name = [] else: self.propagated_class_name = propagated_class_name if common_token_stream is None: raise ValueError('common_token_stream is None') else: self.token_stream_rewriter = TokenStreamRewriter(common_token_stream) self.is_class = False self.current_class = '' self.objects = list() def enterClassDeclaration(self, ctx: JavaParserLabeled.ClassDeclarationContext): # print("Propagation started, please wait...") class_identifier = ctx.IDENTIFIER().getText() if class_identifier in self.propagated_class_name: self.is_class = True print("Propagation started, please wait...") self.current_class = class_identifier else: self.is_class = False def enterVariableDeclarator(self, ctx: JavaParserLabeled.VariableDeclaratorContext): if not self.is_class: return None grand_parent_ctx = ctx.parentCtx.parentCtx if grand_parent_ctx.typeType().classOrInterfaceType() != None: className = grand_parent_ctx.typeType().classOrInterfaceType().IDENTIFIER(0).getText() if className in self.source_class: objectname = ctx.variableDeclaratorId().IDENTIFIER().getText() self.objects.append(objectname) def main(): print("Increase Field Visibility") udb_path = "/home/ali/Documents/compiler/Research/xerces2-j/xerces2-j3.udb" class_name = "ListNode" field_name = "uri" file_list_to_be_propagate = set() propagate_classes = set() file_list_include_file_name_that_edited = "" mainfile = "" db = und.open(udb_path) for field in db.ents("public variable"): if (str(field) == str(class_name + "." + field_name)): # get path file include this field. print(field) if (field.parent().parent().relname() is not None): mainfile = field.parent().parent().longname() print(mainfile) print(field.parent().parent().longname()) else: for ref in field.refs("Definein"): mainfile = (ref.file().longname()) print(mainfile) print(ref.file().relname()) # get propagate class and their file for ref in field.refs("Setby , Useby"): if not (str(ref.ent()) == str(field.parent()) or str(ref.ent().parent()) == str(field.parent())): propagate_classes.add(str(ref.ent().parent())) file_list_to_be_propagate.add(ref.file().longname()) file_list_to_be_propagate = list(file_list_to_be_propagate) propagate_classes = list(propagate_classes) flag_file_is_refatored = False corpus = open( r"../filename_status_database.txt", encoding="utf-8").read() if corpus.find("name:" + mainfile) == -1: with open("../filename_status_database.txt", mode='w', encoding="utf-8", newline='') as f: f.write(corpus + "\nname:" + mainfile) f.flush() os.fsync(f.fileno()) file_list_include_file_name_that_edited += mainfile + "\n" else: flag_file_is_refatored = True print("file already edited") print(mainfile) stream = FileStream(mainfile, encoding='utf8') # Step 2: Create an instance of AssignmentStLexer lexer = JavaLexer(stream) # Step 3: Convert the input source into a list of tokens token_stream = CommonTokenStream(lexer) # Step 4: Create an instance of the AssignmentStParser parser = JavaParser(token_stream) parser.getTokenStream() parse_tree = parser.compilationUnit() my_listener = IncreaseFieldVisibilityRefactoringListener(common_token_stream=token_stream, source_class=class_name, field_name=field_name) walker = ParseTreeWalker() walker.walk(t=parse_tree, listener=my_listener) with open(mainfile, "w") as f: f.write(my_listener.token_stream_rewriter.getDefaultText()) print(file_list_to_be_propagate) for file in file_list_to_be_propagate: flag_file_edited = False corpus = open( r"filename_status_database.txt", encoding="utf-8").read() if (corpus.find("name:" + file) == -1): with open("filename_status_database.txt", mode='w', encoding="utf-8", newline='') as f: f.write(corpus + "\nname:" + file) f.flush() os.fsync(f.fileno()) file_list_include_file_name_that_edited += file + "\n" else: flag_file_edited = True print(file) stream = FileStream(file, encoding='utf8') # input_stream = StdinStream() # Step 2: Create an instance of AssignmentStLexer lexer = JavaLexer(stream) # Step 3: Convert the input source into a list of tokens token_stream = CommonTokenStream(lexer) # Step 4: Create an instance of the AssignmentStParser parser = JavaParser(token_stream) parser.getTokenStream() parse_tree = parser.compilationUnit() # get object my_listener_get_object = PropagationIncreaseFieldVisibility_GetObjects_RefactoringListener(token_stream, source_class=class_name, propagated_class_name=propagate_classes) walker = ParseTreeWalker() walker.walk(t=parse_tree, listener=my_listener_get_object) my_listener = PropagationIncreaseFieldVisibilityRefactoringListener(common_token_stream=token_stream, using_field_name=field_name, object_name=my_listener_get_object.objects, propagated_class_name=propagate_classes) walker = ParseTreeWalker() walker.walk(t=parse_tree, listener=my_listener) with open(file, "w") as f: f.write(my_listener.token_stream_rewriter.getDefaultText())
[ 1, 9995, 13, 13, 15945, 29908, 13, 1649, 3259, 1649, 353, 525, 29900, 29889, 29896, 29889, 29900, 29915, 13, 1649, 8921, 1649, 353, 525, 29924, 10069, 1362, 29915, 13, 13, 5215, 2897, 13, 13, 2202, 29901, 13, 1678, 1053, 2274, 408, 563, 13, 19499, 15591, 17413, 2392, 29901, 13, 1678, 396, 4829, 11415, 13, 1678, 1209, 13, 13, 3166, 3677, 29212, 29946, 1053, 334, 13, 3166, 3677, 29212, 29946, 29889, 6066, 3835, 29934, 809, 5385, 1053, 25159, 3835, 29934, 809, 5385, 13, 13, 3166, 2531, 29889, 1645, 29889, 8404, 11726, 1053, 3355, 11726, 13, 3166, 2531, 29889, 1645, 29931, 24025, 29889, 8404, 29931, 735, 261, 1053, 3355, 29931, 735, 261, 13, 3166, 2531, 29889, 1645, 29931, 24025, 29889, 8404, 11726, 29931, 24025, 1053, 3355, 11726, 29931, 24025, 13, 3166, 2531, 29889, 1645, 29931, 24025, 29889, 8404, 11726, 29931, 24025, 3962, 1053, 3355, 11726, 29931, 24025, 3962, 13, 13, 13, 1990, 512, 1037, 559, 3073, 23318, 5620, 7168, 292, 3962, 29898, 8404, 11726, 29931, 24025, 3962, 1125, 13, 1678, 9995, 13, 1678, 444, 27576, 13, 13, 1678, 512, 1037, 559, 278, 26401, 310, 263, 1746, 515, 2024, 304, 3577, 29892, 3577, 304, 6364, 470, 6364, 304, 970, 29889, 13, 13, 1678, 444, 4721, 322, 4918, 11790, 2187, 13, 13, 1678, 835, 4721, 11790, 2187, 29901, 13, 13, 268, 29896, 29889, 4911, 1818, 3896, 278, 1746, 29915, 29879, 1024, 29892, 322, 278, 2752, 770, 29915, 29879, 1024, 363, 278, 28559, 292, 13, 539, 297, 1797, 304, 7910, 278, 3646, 1746, 29915, 29879, 26401, 29889, 13, 13, 1678, 835, 4918, 11790, 2187, 29901, 13, 13, 1678, 1939, 2702, 4918, 11790, 654, 13, 1678, 9995, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 3619, 29918, 6979, 29918, 5461, 29901, 13103, 6066, 3835, 353, 6213, 29892, 2752, 29918, 1990, 29922, 8516, 29892, 1746, 29918, 978, 29901, 851, 353, 6213, 1125, 13, 4706, 9995, 1762, 2334, 512, 1037, 559, 8989, 5741, 4127, 28559, 292, 2729, 373, 967, 29701, 29889, 13, 965, 5953, 522, 29879, 278, 3734, 1746, 322, 16415, 29914, 25990, 967, 26401, 4660, 29889, 13, 13, 965, 826, 3174, 29901, 13, 18884, 3619, 29918, 6979, 29918, 5461, 313, 18877, 6066, 3835, 1125, 319, 4840, 310, 18897, 5759, 491, 13755, 278, 1667, 934, 773, 278, 13764, 14632, 29934, 13812, 15299, 13, 13, 18884, 2752, 29918, 1990, 313, 710, 1125, 4408, 310, 278, 770, 297, 607, 278, 28559, 292, 756, 304, 367, 2309, 13, 13, 18884, 1746, 29918, 978, 313, 710, 1125, 4408, 310, 278, 1746, 5069, 26401, 4660, 756, 304, 367, 3939, 13, 13, 965, 16969, 29901, 13, 18884, 1939, 3639, 13, 4706, 9995, 13, 4706, 565, 1746, 29918, 978, 338, 6213, 29901, 13, 9651, 1583, 29889, 2671, 29918, 978, 353, 5124, 13, 4706, 1683, 29901, 13, 9651, 1583, 29889, 2671, 29918, 978, 353, 1746, 29918, 978, 13, 13, 4706, 565, 2752, 29918, 1990, 338, 6213, 29901, 13, 9651, 1583, 29889, 4993, 29918, 1990, 353, 5124, 13, 4706, 1683, 29901, 13, 9651, 1583, 29889, 4993, 29918, 1990, 353, 2752, 29918, 1990, 13, 4706, 565, 3619, 29918, 6979, 29918, 5461, 338, 6213, 29901, 13, 9651, 12020, 7865, 2392, 877, 9435, 29918, 6979, 29918, 5461, 338, 6213, 1495, 13, 4706, 1683, 29901, 13, 9651, 1583, 29889, 6979, 29918, 5461, 29918, 3973, 5385, 353, 25159, 3835, 29934, 809, 5385, 29898, 9435, 29918, 6979, 29918, 5461, 29897, 13, 13, 4706, 1583, 29889, 275, 29918, 4993, 29918, 1990, 353, 7700, 13, 4706, 1583, 29889, 4801, 26458, 29918, 2671, 353, 6213, 13, 4706, 1583, 29889, 4801, 26458, 29918, 5696, 353, 6213, 13, 4706, 1583, 29889, 29911, 2882, 353, 6634, 29873, 29908, 13, 4706, 1583, 29889, 28577, 29918, 18521, 353, 6634, 29876, 29908, 13, 4706, 1583, 29889, 401, 353, 5124, 13, 4706, 1583, 29889, 7382, 311, 16544, 362, 401, 353, 5124, 13, 13, 1678, 822, 3896, 2385, 6185, 23838, 29898, 1311, 29892, 12893, 29901, 3355, 11726, 29931, 24025, 29889, 2385, 6185, 23838, 2677, 1125, 13, 13, 4706, 770, 29918, 25378, 353, 12893, 29889, 1367, 3919, 29902, 3738, 1001, 2141, 18516, 580, 13, 4706, 565, 770, 29918, 25378, 1275, 1583, 29889, 4993, 29918, 1990, 29901, 13, 9651, 1583, 29889, 275, 29918, 4993, 29918, 1990, 353, 5852, 13, 4706, 1683, 29901, 13, 9651, 1583, 29889, 275, 29918, 4993, 29918, 1990, 353, 7700, 13, 13, 1678, 822, 6876, 3073, 6185, 23838, 29898, 1311, 29892, 12893, 29901, 3355, 11726, 29931, 24025, 29889, 3073, 6185, 23838, 2677, 1125, 13, 4706, 565, 451, 1583, 29889, 275, 29918, 4993, 29918, 1990, 29901, 13, 9651, 736, 6213, 13, 4706, 4595, 29918, 3560, 29918, 13073, 353, 12893, 29889, 3560, 29907, 7508, 29889, 3560, 29907, 7508, 13, 4706, 396, 1746, 29918, 25378, 353, 12893, 29889, 11918, 6185, 4675, 4097, 2141, 18516, 2141, 5451, 28165, 1159, 13, 4706, 1746, 29918, 25378, 353, 12893, 29889, 11918, 6185, 4675, 4097, 2141, 11918, 6185, 4675, 1061, 29898, 29900, 467, 11918, 6185, 4675, 1061, 1204, 2141, 1367, 3919, 29902, 3738, 1001, 2141, 18516, 580, 13, 4706, 565, 1583, 29889, 2671, 29918, 978, 297, 1746, 29918, 25378, 29901, 13, 9651, 565, 4595, 29918, 3560, 29918, 13073, 29889, 26625, 580, 1275, 5159, 29901, 13, 18884, 1583, 29889, 6979, 29918, 5461, 29918, 3973, 5385, 29889, 6506, 6069, 29898, 13, 462, 1678, 515, 29918, 13140, 29922, 13073, 29889, 1853, 1542, 2141, 2962, 29889, 6979, 3220, 29892, 13, 462, 1678, 304, 29918, 13140, 29922, 13073, 29889, 1853, 1542, 2141, 9847, 29889, 6979, 3220, 29892, 13, 462, 1678, 1426, 2433, 9053, 525, 718, 12893, 29889, 1853, 1542, 2141, 18516, 580, 13, 18884, 1723, 13, 9651, 25342, 4595, 29918, 3560, 29918, 13073, 29889, 26625, 29898, 29900, 467, 18516, 580, 1275, 525, 3597, 2396, 13, 18884, 1583, 29889, 6979, 29918, 5461, 29918, 3973, 5385, 29889, 6506, 6069, 29898, 13, 462, 1678, 515, 29918, 13140, 29922, 27857, 29918, 3560, 29918, 13073, 29889, 26625, 29898, 29900, 467, 2962, 29889, 6979, 3220, 29892, 13, 462, 1678, 304, 29918, 13140, 29922, 27857, 29918, 3560, 29918, 13073, 29889, 26625, 29898, 29900, 467, 9847, 29889, 6979, 3220, 29892, 13, 462, 1678, 1426, 2433, 9053, 1495, 13, 9651, 25342, 4595, 29918, 3560, 29918, 13073, 29889, 26625, 29898, 29900, 467, 18516, 580, 2804, 525, 9053, 2396, 13, 18884, 1583, 29889, 6979, 29918, 5461, 29918, 3973, 5385, 29889, 6506, 6069, 29898, 13, 462, 1678, 515, 29918, 13140, 29922, 27857, 29918, 3560, 29918, 13073, 29889, 26625, 29898, 29900, 467, 2962, 29889, 6979, 3220, 29892, 13, 462, 1678, 304, 29918, 13140, 29922, 27857, 29918, 3560, 29918, 13073, 29889, 26625, 29898, 29900, 467, 9847, 29889, 6979, 3220, 29892, 13, 462, 1678, 1426, 2433, 9053, 525, 718, 4595, 29918, 3560, 29918, 13073, 29889, 26625, 29898, 29900, 467, 18516, 3101, 13, 9651, 396, 5706, 2130, 272, 322, 5478, 1061, 3519, 13, 9651, 396, 11028, 272, 3573, 13, 9651, 716, 29918, 401, 353, 11297, 29876, 29905, 29873, 29915, 13, 9651, 716, 29918, 401, 4619, 525, 3597, 525, 718, 12893, 29889, 1853, 1542, 2141, 18516, 580, 718, 525, 679, 29915, 718, 851, 29889, 5030, 2410, 675, 29898, 1311, 29889, 2671, 29918, 978, 29897, 13, 9651, 716, 29918, 401, 4619, 525, 580, 426, 320, 29876, 29905, 29873, 29905, 29873, 736, 445, 6169, 718, 1583, 29889, 2671, 29918, 978, 718, 21921, 29915, 718, 11297, 29876, 29905, 29873, 10162, 13, 13, 9651, 396, 20749, 1061, 3573, 13, 9651, 716, 29918, 401, 4619, 11297, 29876, 29905, 29873, 29915, 13, 9651, 716, 29918, 401, 4619, 525, 3597, 1780, 731, 29915, 718, 851, 29889, 5030, 2410, 675, 29898, 1311, 29889, 2671, 29918, 978, 29897, 13, 9651, 716, 29918, 401, 4619, 525, 877, 718, 12893, 29889, 1853, 1542, 2141, 18516, 580, 718, 525, 525, 718, 1583, 29889, 2671, 29918, 978, 718, 25710, 426, 320, 29876, 29905, 29873, 29905, 29873, 29915, 13, 9651, 716, 29918, 401, 4619, 525, 1366, 6169, 718, 1583, 29889, 2671, 29918, 978, 718, 525, 353, 525, 718, 1583, 29889, 2671, 29918, 978, 718, 21921, 29915, 718, 11297, 29876, 29905, 29873, 1012, 29876, 29915, 13, 13, 9651, 1583, 29889, 6979, 29918, 5461, 29918, 3973, 5385, 29889, 7851, 13555, 29898, 13073, 29889, 9847, 29889, 6979, 3220, 29892, 716, 29918, 401, 29897, 13, 13, 13, 13, 13, 1990, 1019, 13573, 362, 797, 1037, 559, 3073, 23318, 5620, 7168, 292, 3962, 29898, 8404, 11726, 29931, 24025, 3962, 1125, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 3619, 29918, 6979, 29918, 5461, 29901, 13103, 6066, 3835, 353, 6213, 29892, 773, 29918, 2671, 29918, 978, 29922, 8516, 29892, 1203, 29918, 978, 29922, 8516, 29892, 13, 462, 13089, 630, 29918, 1990, 29918, 978, 29922, 8516, 1125, 13, 4706, 9995, 13, 4706, 501, 8485, 363, 13089, 362, 11976, 297, 278, 916, 4413, 310, 278, 2060, 29901, 2334, 278, 13089, 362, 13, 13, 4706, 826, 3174, 29901, 13, 9651, 3619, 29918, 6979, 29918, 5461, 313, 18877, 6066, 3835, 1125, 319, 4840, 310, 18897, 5759, 491, 13755, 278, 1667, 934, 773, 278, 13764, 14632, 29934, 13812, 15299, 13, 13, 9651, 773, 29918, 2671, 29918, 978, 313, 710, 1125, 4408, 310, 278, 1746, 607, 756, 304, 367, 13089, 630, 13, 13, 9651, 1203, 29918, 978, 313, 710, 1125, 4408, 310, 278, 3618, 393, 817, 304, 367, 3939, 411, 278, 13089, 362, 5858, 13, 13, 9651, 13089, 630, 29918, 1990, 29918, 978, 313, 710, 1125, 4408, 310, 278, 770, 297, 607, 278, 13089, 362, 5858, 4225, 304, 367, 8762, 13, 13, 4706, 16969, 29901, 1939, 3639, 13, 4706, 9995, 13, 13, 4706, 565, 773, 29918, 2671, 29918, 978, 338, 6213, 29901, 13, 9651, 1583, 29889, 4746, 29918, 2671, 29918, 978, 353, 5159, 13, 4706, 1683, 29901, 13, 9651, 1583, 29889, 4746, 29918, 2671, 29918, 978, 353, 773, 29918, 2671, 29918, 978, 13, 13, 4706, 565, 1203, 29918, 978, 338, 6213, 29901, 13, 9651, 1583, 29889, 3318, 29918, 978, 353, 5159, 13, 4706, 1683, 29901, 13, 9651, 1583, 29889, 3318, 29918, 978, 353, 1203, 29918, 978, 13, 13, 4706, 565, 13089, 630, 29918, 1990, 29918, 978, 338, 6213, 29901, 13, 9651, 1583, 29889, 7728, 351, 630, 29918, 1990, 29918, 978, 353, 5159, 13, 4706, 1683, 29901, 13, 9651, 1583, 29889, 7728, 351, 630, 29918, 1990, 29918, 978, 353, 13089, 630, 29918, 1990, 29918, 978, 13, 13, 4706, 565, 3619, 29918, 6979, 29918, 5461, 338, 6213, 29901, 13, 9651, 12020, 7865, 2392, 877, 9435, 29918, 6979, 29918, 5461, 338, 6213, 1495, 13, 4706, 1683, 29901, 13, 9651, 1583, 29889, 6979, 29918, 5461, 29918, 3973, 5385, 353, 25159, 3835, 29934, 809, 5385, 29898, 9435, 29918, 6979, 29918, 5461, 29897, 13, 13, 4706, 1583, 29889, 275, 29918, 1990, 353, 7700, 13, 13, 1678, 822, 3896, 2385, 6185, 23838, 29898, 1311, 29892, 12893, 29901, 3355, 11726, 29931, 24025, 29889, 2385, 6185, 23838, 2677, 1125, 13, 4706, 396, 1596, 703, 1184, 13573, 362, 4687, 29892, 3113, 4480, 856, 1159, 13, 4706, 770, 29918, 25378, 353, 12893, 29889, 1367, 3919, 29902, 3738, 1001, 2141, 18516, 580, 13, 4706, 565, 770, 29918, 25378, 1275, 1583, 29889, 7728, 351, 630, 29918, 1990, 29918, 978, 29901, 13, 9651, 1583, 29889, 275, 29918, 1990, 353, 5852, 13, 9651, 1596, 703, 1184, 13573, 362, 4687, 29892, 3113, 4480, 856, 1159, 13, 4706, 1683, 29901, 13, 9651, 1583, 29889, 275, 29918, 1990, 353, 7700, 13, 13, 1678, 822, 3896, 16174, 6185, 4675, 1061, 29898, 1311, 29892, 12893, 29901, 3355, 11726, 29931, 24025, 29889, 16174, 6185, 4675, 1061, 2677, 1125, 13, 4706, 565, 451, 1583, 29889, 275, 29918, 1990, 29901, 13, 9651, 736, 6213, 13, 4706, 773, 2671, 25378, 353, 12893, 29889, 11918, 6185, 4675, 1061, 1204, 2141, 1367, 3919, 29902, 3738, 1001, 2141, 18516, 580, 13, 4706, 4595, 29918, 5145, 29918, 13073, 353, 12893, 29889, 11918, 15514, 3950, 2141, 17471, 580, 13, 4706, 565, 773, 2671, 25378, 297, 1583, 29889, 4746, 29918, 2671, 29918, 978, 29901, 13, 9651, 1203, 25378, 353, 4595, 29918, 5145, 29918, 13073, 29889, 17471, 29898, 29900, 467, 16072, 2141, 1367, 3919, 29902, 3738, 1001, 2141, 18516, 580, 13, 9651, 565, 1203, 25378, 297, 1583, 29889, 3318, 29918, 978, 29901, 13, 18884, 1583, 29889, 6979, 29918, 5461, 29918, 3973, 5385, 29889, 6506, 6069, 29898, 13, 462, 1678, 515, 29918, 13140, 29922, 27857, 29918, 5145, 29918, 13073, 29889, 2962, 29889, 6979, 3220, 29892, 13, 462, 1678, 304, 29918, 13140, 29922, 27857, 29918, 5145, 29918, 13073, 29889, 9847, 29889, 6979, 3220, 29892, 13, 462, 1678, 1426, 29922, 27857, 29918, 5145, 29918, 13073, 29889, 17471, 29898, 29900, 467, 16072, 2141, 1367, 3919, 29902, 3738, 1001, 2141, 18516, 580, 718, 525, 6169, 718, 525, 657, 29915, 718, 851, 29889, 5030, 2410, 675, 29898, 13, 462, 4706, 4595, 29918, 5145, 29918, 13073, 29889, 1367, 3919, 29902, 3738, 1001, 2141, 18516, 3101, 718, 525, 580, 29915, 13, 18884, 1723, 13, 13, 1678, 822, 3896, 10960, 29898, 1311, 29892, 12893, 29901, 3355, 11726, 29931, 24025, 29889, 10960, 2677, 1125, 13, 4706, 565, 451, 1583, 29889, 275, 29918, 1990, 29901, 13, 9651, 736, 13, 4706, 565, 12893, 29889, 17471, 29898, 29900, 29897, 2804, 6213, 29901, 13, 9651, 565, 12893, 29889, 17471, 29898, 29900, 467, 16072, 580, 2804, 6213, 29901, 13, 18884, 565, 12893, 29889, 17471, 29898, 29900, 467, 16072, 2141, 1367, 3919, 29902, 3738, 1001, 2141, 18516, 580, 297, 1583, 29889, 3318, 29918, 978, 29901, 13, 462, 1678, 3847, 29918, 13073, 353, 12893, 29889, 3560, 29907, 7508, 13, 462, 1678, 2302, 353, 3847, 29918, 13073, 29889, 657, 5938, 3981, 580, 13, 462, 1678, 565, 2302, 1275, 29871, 29941, 29901, 13, 462, 4706, 4603, 726, 353, 3847, 29918, 13073, 29889, 11991, 29961, 29906, 1822, 18516, 580, 13, 462, 4706, 1583, 29889, 6979, 29918, 5461, 29918, 3973, 5385, 29889, 6506, 6069, 29898, 13, 462, 9651, 515, 29918, 13140, 29922, 3560, 29918, 13073, 29889, 2962, 29889, 6979, 3220, 29892, 13, 462, 9651, 304, 29918, 13140, 29922, 3560, 29918, 13073, 29889, 9847, 29889, 6979, 3220, 29892, 13, 462, 9651, 1426, 29922, 13073, 29889, 17471, 29898, 29900, 467, 16072, 2141, 1367, 3919, 29902, 3738, 1001, 2141, 18516, 580, 718, 525, 6169, 718, 525, 842, 29915, 718, 851, 29889, 5030, 2410, 675, 29898, 13, 462, 18884, 12893, 29889, 1367, 3919, 29902, 3738, 1001, 2141, 18516, 3101, 718, 525, 877, 718, 4603, 726, 718, 525, 16029, 13, 462, 4706, 1723, 13, 13, 13, 1990, 1019, 13573, 362, 797, 1037, 559, 3073, 23318, 29918, 2577, 12724, 29918, 5620, 7168, 292, 3962, 29898, 8404, 11726, 29931, 24025, 3962, 1125, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 3619, 29918, 6979, 29918, 5461, 29901, 13103, 6066, 3835, 353, 6213, 29892, 2752, 29918, 1990, 29922, 8516, 29892, 13, 462, 13089, 630, 29918, 1990, 29918, 978, 29922, 8516, 1125, 13, 4706, 9995, 29965, 8485, 363, 13089, 362, 11976, 297, 278, 916, 4413, 310, 278, 2060, 29901, 13, 965, 5953, 522, 278, 3618, 607, 505, 304, 367, 13089, 630, 13, 13, 965, 826, 3174, 29901, 13, 18884, 3619, 29918, 6979, 29918, 5461, 313, 18877, 6066, 3835, 1125, 319, 4840, 310, 18897, 5759, 491, 13755, 278, 1667, 934, 773, 278, 13764, 14632, 29934, 13812, 15299, 13, 13, 18884, 2752, 29918, 1990, 313, 710, 1125, 4408, 310, 278, 770, 297, 607, 278, 13089, 362, 756, 304, 367, 8762, 13, 13, 18884, 13089, 630, 29918, 1990, 29918, 978, 313, 710, 1125, 4408, 310, 278, 770, 607, 756, 304, 367, 13089, 630, 13, 13, 965, 16969, 29901, 1939, 3639, 13, 4706, 9995, 13, 4706, 565, 2752, 29918, 1990, 338, 6213, 29901, 13, 9651, 1583, 29889, 4993, 29918, 1990, 353, 5159, 13, 4706, 1683, 29901, 13, 9651, 1583, 29889, 4993, 29918, 1990, 353, 2752, 29918, 1990, 13, 13, 4706, 565, 13089, 630, 29918, 1990, 29918, 978, 338, 6213, 29901, 13, 9651, 1583, 29889, 7728, 351, 630, 29918, 1990, 29918, 978, 353, 5159, 13, 4706, 1683, 29901, 13, 9651, 1583, 29889, 7728, 351, 630, 29918, 1990, 29918, 978, 353, 13089, 630, 29918, 1990, 29918, 978, 13, 13, 4706, 565, 3619, 29918, 6979, 29918, 5461, 338, 6213, 29901, 13, 9651, 12020, 7865, 2392, 877, 9435, 29918, 6979, 29918, 5461, 338, 6213, 1495, 13, 4706, 1683, 29901, 13, 9651, 1583, 29889, 6979, 29918, 5461, 29918, 3973, 5385, 353, 25159, 3835, 29934, 809, 5385, 29898, 9435, 29918, 6979, 29918, 5461, 29897, 13, 13, 4706, 1583, 29889, 275, 29918, 1990, 353, 7700, 13, 4706, 1583, 29889, 3784, 29918, 1990, 353, 6629, 13, 4706, 1583, 29889, 12650, 353, 1051, 580, 13, 13, 1678, 822, 3896, 2385, 6185, 23838, 29898, 1311, 29892, 12893, 29901, 3355, 11726, 29931, 24025, 29889, 2385, 6185, 23838, 2677, 1125, 13, 4706, 396, 1596, 703, 1184, 13573, 362, 4687, 29892, 3113, 4480, 856, 1159, 13, 4706, 770, 29918, 25378, 353, 12893, 29889, 1367, 3919, 29902, 3738, 1001, 2141, 18516, 580, 13, 4706, 565, 770, 29918, 25378, 297, 1583, 29889, 7728, 351, 630, 29918, 1990, 29918, 978, 29901, 13, 9651, 1583, 29889, 275, 29918, 1990, 353, 5852, 13, 9651, 1596, 703, 1184, 13573, 362, 4687, 29892, 3113, 4480, 856, 1159, 13, 9651, 1583, 29889, 3784, 29918, 1990, 353, 770, 29918, 25378, 13, 4706, 1683, 29901, 13, 9651, 1583, 29889, 275, 29918, 1990, 353, 7700, 13, 13, 1678, 822, 3896, 16174, 6185, 4675, 1061, 29898, 1311, 29892, 12893, 29901, 3355, 11726, 29931, 24025, 29889, 16174, 6185, 4675, 1061, 2677, 1125, 13, 4706, 565, 451, 1583, 29889, 275, 29918, 1990, 29901, 13, 9651, 736, 6213, 13, 4706, 4595, 29918, 3560, 29918, 13073, 353, 12893, 29889, 3560, 29907, 7508, 29889, 3560, 29907, 7508, 13, 4706, 565, 4595, 29918, 3560, 29918, 13073, 29889, 1853, 1542, 2141, 1990, 2816, 10448, 1542, 580, 2804, 6213, 29901, 13, 9651, 22030, 353, 4595, 29918, 3560, 29918, 13073, 29889, 1853, 1542, 2141, 1990, 2816, 10448, 1542, 2141, 1367, 3919, 29902, 3738, 1001, 29898, 29900, 467, 18516, 580, 13, 9651, 565, 22030, 297, 1583, 29889, 4993, 29918, 1990, 29901, 13, 18884, 1203, 978, 353, 12893, 29889, 11918, 6185, 4675, 1061, 1204, 2141, 1367, 3919, 29902, 3738, 1001, 2141, 18516, 580, 13, 18884, 1583, 29889, 12650, 29889, 4397, 29898, 3318, 978, 29897, 13, 13, 13, 1753, 1667, 7295, 13, 1678, 1596, 703, 797, 1037, 559, 8989, 5741, 4127, 1159, 13, 1678, 318, 2585, 29918, 2084, 353, 5591, 5184, 29914, 2606, 29914, 20128, 29914, 21789, 29914, 1666, 2842, 29914, 29916, 261, 778, 29906, 29899, 29926, 29914, 29916, 261, 778, 29906, 29899, 29926, 29941, 29889, 566, 29890, 29908, 13, 1678, 770, 29918, 978, 353, 376, 1293, 4247, 29908, 13, 1678, 1746, 29918, 978, 353, 376, 5338, 29908, 13, 13, 1678, 934, 29918, 1761, 29918, 517, 29918, 915, 29918, 7728, 351, 403, 353, 731, 580, 13, 1678, 13089, 403, 29918, 13203, 353, 731, 580, 13, 1678, 934, 29918, 1761, 29918, 2856, 29918, 1445, 29918, 978, 29918, 5747, 29918, 287, 1573, 353, 5124, 13, 1678, 1667, 1445, 353, 5124, 13, 1678, 4833, 353, 563, 29889, 3150, 29898, 566, 29890, 29918, 2084, 29897, 13, 1678, 363, 1746, 297, 4833, 29889, 1237, 703, 3597, 2286, 29908, 1125, 13, 4706, 565, 313, 710, 29898, 2671, 29897, 1275, 851, 29898, 1990, 29918, 978, 718, 376, 1213, 718, 1746, 29918, 978, 22164, 13, 9651, 396, 679, 2224, 934, 3160, 445, 1746, 29889, 13, 9651, 1596, 29898, 2671, 29897, 13, 9651, 565, 313, 2671, 29889, 3560, 2141, 3560, 2141, 2674, 978, 580, 338, 451, 6213, 1125, 13, 18884, 1667, 1445, 353, 1746, 29889, 3560, 2141, 3560, 2141, 5426, 978, 580, 13, 18884, 1596, 29898, 3396, 1445, 29897, 13, 18884, 1596, 29898, 2671, 29889, 3560, 2141, 3560, 2141, 5426, 978, 3101, 13, 9651, 1683, 29901, 13, 18884, 363, 2143, 297, 1746, 29889, 24539, 703, 3206, 457, 262, 29908, 1125, 13, 462, 1678, 1667, 1445, 353, 313, 999, 29889, 1445, 2141, 5426, 978, 3101, 13, 462, 1678, 1596, 29898, 3396, 1445, 29897, 13, 462, 1678, 1596, 29898, 999, 29889, 1445, 2141, 2674, 978, 3101, 13, 9651, 396, 679, 13089, 403, 770, 322, 1009, 934, 13, 9651, 363, 2143, 297, 1746, 29889, 24539, 703, 2697, 1609, 1919, 4803, 1609, 29908, 1125, 13, 18884, 565, 451, 313, 710, 29898, 999, 29889, 296, 3101, 1275, 851, 29898, 2671, 29889, 3560, 3101, 13, 462, 4706, 470, 851, 29898, 999, 29889, 296, 2141, 3560, 3101, 1275, 851, 29898, 2671, 29889, 3560, 22130, 29901, 13, 462, 1678, 13089, 403, 29918, 13203, 29889, 1202, 29898, 710, 29898, 999, 29889, 296, 2141, 3560, 22130, 13, 462, 1678, 934, 29918, 1761, 29918, 517, 29918, 915, 29918, 7728, 351, 403, 29889, 1202, 29898, 999, 29889, 1445, 2141, 5426, 978, 3101, 13, 13, 1678, 934, 29918, 1761, 29918, 517, 29918, 915, 29918, 7728, 351, 403, 353, 1051, 29898, 1445, 29918, 1761, 29918, 517, 29918, 915, 29918, 7728, 351, 403, 29897, 13, 1678, 13089, 403, 29918, 13203, 353, 1051, 29898, 7728, 351, 403, 29918, 13203, 29897, 13, 1678, 7353, 29918, 1445, 29918, 275, 29918, 999, 1061, 287, 353, 7700, 13, 1678, 1034, 13364, 353, 1722, 29898, 13, 4706, 364, 29908, 6995, 9507, 29918, 4882, 29918, 9803, 29889, 3945, 613, 8025, 543, 9420, 29899, 29947, 2564, 949, 580, 13, 1678, 565, 1034, 13364, 29889, 2886, 703, 978, 6160, 718, 1667, 1445, 29897, 1275, 448, 29896, 29901, 13, 4706, 411, 1722, 703, 6995, 9507, 29918, 4882, 29918, 9803, 29889, 3945, 613, 4464, 2433, 29893, 742, 8025, 543, 9420, 29899, 29947, 613, 25899, 2433, 1495, 408, 285, 29901, 13, 9651, 285, 29889, 3539, 29898, 2616, 13364, 718, 6634, 29876, 978, 6160, 718, 1667, 1445, 29897, 13, 9651, 285, 29889, 23126, 580, 13, 9651, 2897, 29889, 5847, 2720, 29898, 29888, 29889, 1777, 8154, 3101, 13, 4706, 934, 29918, 1761, 29918, 2856, 29918, 1445, 29918, 978, 29918, 5747, 29918, 287, 1573, 4619, 1667, 1445, 718, 6634, 29876, 29908, 13, 1678, 1683, 29901, 13, 4706, 7353, 29918, 1445, 29918, 275, 29918, 999, 1061, 287, 353, 5852, 13, 4706, 1596, 703, 1445, 2307, 8788, 1159, 13, 1678, 1596, 29898, 3396, 1445, 29897, 13, 1678, 4840, 353, 3497, 3835, 29898, 3396, 1445, 29892, 8025, 2433, 9420, 29947, 1495, 13, 1678, 396, 16696, 29871, 29906, 29901, 6204, 385, 2777, 310, 4007, 10194, 855, 29931, 735, 261, 13, 1678, 19566, 261, 353, 3355, 29931, 735, 261, 29898, 5461, 29897, 13, 1678, 396, 16696, 29871, 29941, 29901, 14806, 278, 1881, 2752, 964, 263, 1051, 310, 18897, 13, 1678, 5993, 29918, 5461, 353, 13103, 6066, 3835, 29898, 2506, 261, 29897, 13, 1678, 396, 16696, 29871, 29946, 29901, 6204, 385, 2777, 310, 278, 4007, 10194, 855, 11726, 13, 1678, 13812, 353, 3355, 11726, 29898, 6979, 29918, 5461, 29897, 13, 1678, 13812, 29889, 657, 6066, 3835, 580, 13, 1678, 6088, 29918, 8336, 353, 13812, 29889, 2388, 8634, 8325, 580, 13, 1678, 590, 29918, 25894, 353, 512, 1037, 559, 3073, 23318, 5620, 7168, 292, 3962, 29898, 9435, 29918, 6979, 29918, 5461, 29922, 6979, 29918, 5461, 29892, 13, 462, 462, 462, 632, 2752, 29918, 1990, 29922, 1990, 29918, 978, 29892, 13, 462, 462, 462, 632, 1746, 29918, 978, 29922, 2671, 29918, 978, 29897, 13, 1678, 6686, 261, 353, 20969, 9643, 29956, 2235, 261, 580, 13, 1678, 6686, 261, 29889, 20919, 29898, 29873, 29922, 5510, 29918, 8336, 29892, 13254, 29922, 1357, 29918, 25894, 29897, 13, 13, 1678, 411, 1722, 29898, 3396, 1445, 29892, 376, 29893, 1159, 408, 285, 29901, 13, 4706, 285, 29889, 3539, 29898, 1357, 29918, 25894, 29889, 6979, 29918, 5461, 29918, 3973, 5385, 29889, 657, 4592, 1626, 3101, 13, 13, 1678, 1596, 29898, 1445, 29918, 1761, 29918, 517, 29918, 915, 29918, 7728, 351, 403, 29897, 13, 1678, 363, 934, 297, 934, 29918, 1761, 29918, 517, 29918, 915, 29918, 7728, 351, 403, 29901, 13, 4706, 7353, 29918, 1445, 29918, 287, 1573, 353, 7700, 13, 4706, 1034, 13364, 353, 1722, 29898, 13, 9651, 364, 29908, 9507, 29918, 4882, 29918, 9803, 29889, 3945, 613, 8025, 543, 9420, 29899, 29947, 2564, 949, 580, 13, 4706, 565, 313, 2616, 13364, 29889, 2886, 703, 978, 6160, 718, 934, 29897, 1275, 448, 29896, 1125, 13, 9651, 411, 1722, 703, 9507, 29918, 4882, 29918, 9803, 29889, 3945, 613, 4464, 2433, 29893, 742, 8025, 543, 9420, 29899, 29947, 613, 25899, 2433, 1495, 408, 285, 29901, 13, 18884, 285, 29889, 3539, 29898, 2616, 13364, 718, 6634, 29876, 978, 6160, 718, 934, 29897, 13, 18884, 285, 29889, 23126, 580, 13, 18884, 2897, 29889, 5847, 2720, 29898, 29888, 29889, 1777, 8154, 3101, 13, 9651, 934, 29918, 1761, 29918, 2856, 29918, 1445, 29918, 978, 29918, 5747, 29918, 287, 1573, 4619, 934, 718, 6634, 29876, 29908, 13, 4706, 1683, 29901, 13, 9651, 7353, 29918, 1445, 29918, 287, 1573, 353, 5852, 13, 4706, 1596, 29898, 1445, 29897, 13, 4706, 4840, 353, 3497, 3835, 29898, 1445, 29892, 8025, 2433, 9420, 29947, 1495, 13, 4706, 396, 1881, 29918, 5461, 353, 624, 24581, 3835, 580, 13, 4706, 396, 16696, 29871, 29906, 29901, 6204, 385, 2777, 310, 4007, 10194, 855, 29931, 735, 261, 13, 4706, 19566, 261, 353, 3355, 29931, 735, 261, 29898, 5461, 29897, 13, 4706, 396, 16696, 29871, 29941, 29901, 14806, 278, 1881, 2752, 964, 263, 1051, 310, 18897, 13, 4706, 5993, 29918, 5461, 353, 13103, 6066, 3835, 29898, 2506, 261, 29897, 13, 4706, 396, 16696, 29871, 29946, 29901, 6204, 385, 2777, 310, 278, 4007, 10194, 855, 11726, 13, 4706, 13812, 353, 3355, 11726, 29898, 6979, 29918, 5461, 29897, 13, 4706, 13812, 29889, 657, 6066, 3835, 580, 13, 4706, 6088, 29918, 8336, 353, 13812, 29889, 2388, 8634, 8325, 580, 13, 13, 4706, 396, 679, 1203, 13, 4706, 590, 29918, 25894, 29918, 657, 29918, 3318, 353, 1019, 13573, 362, 797, 1037, 559, 3073, 23318, 29918, 2577, 12724, 29918, 5620, 7168, 292, 3962, 29898, 6979, 29918, 5461, 29892, 13, 462, 462, 462, 462, 462, 462, 259, 2752, 29918, 1990, 29922, 1990, 29918, 978, 29892, 13, 462, 462, 462, 462, 462, 462, 259, 13089, 630, 29918, 1990, 29918, 978, 29922, 7728, 351, 403, 29918, 13203, 29897, 13, 4706, 6686, 261, 353, 20969, 9643, 29956, 2235, 261, 580, 13, 4706, 6686, 261, 29889, 20919, 29898, 29873, 29922, 5510, 29918, 8336, 29892, 13254, 29922, 1357, 29918, 25894, 29918, 657, 29918, 3318, 29897, 13, 13, 4706, 590, 29918, 25894, 353, 1019, 13573, 362, 797, 1037, 559, 3073, 23318, 5620, 7168, 292, 3962, 29898, 9435, 29918, 6979, 29918, 5461, 29922, 6979, 29918, 5461, 29892, 13, 462, 462, 462, 462, 9651, 773, 29918, 2671, 29918, 978, 29922, 2671, 29918, 978, 29892, 13, 462, 462, 462, 462, 9651, 1203, 29918, 978, 29922, 1357, 29918, 25894, 29918, 657, 29918, 3318, 29889, 12650, 29892, 13, 462, 462, 462, 462, 9651, 13089, 630, 29918, 1990, 29918, 978, 29922, 7728, 351, 403, 29918, 13203, 29897, 13, 4706, 6686, 261, 353, 20969, 9643, 29956, 2235, 261, 580, 13, 4706, 6686, 261, 29889, 20919, 29898, 29873, 29922, 5510, 29918, 8336, 29892, 13254, 29922, 1357, 29918, 25894, 29897, 13, 13, 4706, 411, 1722, 29898, 1445, 29892, 376, 29893, 1159, 408, 285, 29901, 13, 9651, 285, 29889, 3539, 29898, 1357, 29918, 25894, 29889, 6979, 29918, 5461, 29918, 3973, 5385, 29889, 657, 4592, 1626, 3101, 13, 2 ]
Analysis/Metric_Impact_Hijacking/give_metric_ases_from_clusters.py
cgeorgitsis/ai4netmon
0
25075
<filename>Analysis/Metric_Impact_Hijacking/give_metric_ases_from_clusters.py import pandas as pd import numpy as np import random, os, json from collections import defaultdict from matplotlib import pyplot as plt from sklearn.cluster import KMeans, SpectralClustering from scipy.spatial.distance import pdist, squareform from scipy.sparse import csgraph from numpy import linalg as LA from sklearn.metrics import silhouette_score PROXIMITY_FNAME = 'selected_ripe_ris__monitors_from_pathlens_100k.json' def get_argmax_total_similarity(similarity_matrix, from_items=None, rank_normalization=False): ''' Finds the item of a matrix (similarity_matrix) that has the maximum aggregate similarity to all other items. If the "from_items" is not None, then only the rows/columns of the matrix in the from_items list are taken into account. :param similarity_matrix: (pandas.DataFrame) an NxN dataframe; should be (a) symmetric and (b) values {i,j} to represent the similarity between item of row i and column j :param from_items: (list/set) a subset of the items (rows/columns) from which the item with the max similiarity will be selected :param rank_normalization: (boolean) whether to modify the similarity matrix giving more emphasis to most similar values per row by dividing each element with the rank it appears in the sorted list of values of the row e.g., a_row = [0.5, 0.3, 0.4] --> modified_row = [0.5/1, 0.3/3, 0.4/2] = [0.5, 0.1, 0.2] e.g., a_row = [0.1, 0.1, 0.4] --> modified_row = [0.1/2, 0.1/3, 0.4/1] = [0.05, 0.033, 0.4] :return: (scalar, e.g., str or int) the index of the item in the dataframe that has the max total similarity ''' if from_items is None: df = similarity_matrix.copy() else: df = similarity_matrix.loc[from_items, from_items].copy() np.fill_diagonal(df.values, np.nan) # set self-similarity to nan so that it is not taken into account if rank_normalization: for p1 in df.index: sorted_indexes = list(df.loc[p1, :].sort_values(ascending=False).index) df.loc[p1, sorted_indexes] = df.loc[p1, sorted_indexes] * [1.0 / i for i in range(1, 1 + df.shape[0])] sum_similarities = np.nansum(df, axis=1) if np.max(sum_similarities) == 0: # all similarities are nan or zero next_item = random.sample(from_items, 1)[0] else: next_item = df.index[np.argmax(sum_similarities)] return next_item def greedy_most_similar_elimination(similarity_matrix, rank_normalization=False): ''' Selects iteratively the item in the given similarity_matrix that has the maximum aggregate similarity to all other items. At each iteration, only the similarities among the non-selected items are taken into account. At each iteration, the selected item is placed in the beginning of a list. At the end, this list is returned. Example: returned_list = [item_selected_last, ..., item_selected_first] :param similarity_matrix: (pandas.DataFrame) an NxN dataframe; should be (a) symmetric and (b) values {i,j} to represent the similarity between item of row i and column j :param rank_normalization: (boolean) whether to modify the similarity matrix giving more emphasis to most similar values per row :return: (list) a list of ordered items (from the input's index); the first item is the least similar ''' selected_items = [] for i in range(similarity_matrix.shape[0]): from_items = list(set(similarity_matrix.index) - set(selected_items)) next_item = get_argmax_total_similarity(similarity_matrix, from_items=from_items, rank_normalization=rank_normalization) selected_items.insert(0, next_item) return selected_items def get_argmin_total_similarity(similarity_matrix, from_items=None): ''' Finds the item of a matrix (similarity_matrix) that has the minimum aggregate similarity to all other items. If the "from_items" is not None, then only the (a) rows of the matrix in the from_items list and (b) the columns of the matrix NOT in the from_items list are taken into account. :param similarity_matrix: (pandas.DataFrame) an NxN dataframe; should be (a) symmetric and (b) values {i,j} to represent the similarity between item of row i and column j :param from_items: (list/set) a subset of the items (rows/columns) from which the item with the min similiarity will be selected :return: (scalar, e.g., str or int) the index of the item in the dataframe that has the min total similarity ''' df = similarity_matrix.copy() np.fill_diagonal(df.values, np.nan) # set self-similarity to nan so that it is not taken into account if from_items is not None: other_items = list(set(df.index) - set(from_items)) df = df.loc[from_items, other_items] sum_similarities = np.nansum(df, axis=1) if np.max(sum_similarities) == 0: # all similarities are nan or zero next_item = random.sample(from_items, 1)[0] else: next_item = df.index[np.argmin(sum_similarities)] return next_item def greedy_least_similar_selection(similarity_matrix, nb_items=None): ''' Selects iteratively the item in the given similarity_matrix that has the minimum aggregate similarity to all other items. At each iteration, only the similarities among the non-selected items and the already selected items are taken into account. At each iteration, the selected item is placed in the end of a list. At the end, this list is returned. Example: returned_list = [item_selected_first, ..., item_selected_last] :param similarity_matrix: (pandas.DataFrame) an NxN dataframe; should be (a) symmetric and (b) values {i,j} to represent the similarity between item of row i and column j :param nb_items: (int) number of items to be selected; if None all items are selected in the returned list :return: (list) a list of ordered items (from the input's index); the first item is the least similar ''' selected_items = [] nb_total_items = similarity_matrix.shape[0] if (nb_items is None) or (nb_items > nb_total_items): nb_items = nb_total_items for i in range(nb_items): if len(selected_items) == 0: from_items = None else: from_items = list(set(similarity_matrix.index) - set(selected_items)) next_item = get_argmin_total_similarity(similarity_matrix, from_items=from_items) selected_items.append(next_item) return selected_items def sample_from_clusters(cluster_members_dict, nb_items=None): ''' Samples items from the clusters, starting from a random item in the largest cluster, then a random item in the second largest cluster, and so on. When elements of all clusters are selected, then starts again from the largest cluster, until all items (or up to nb_items) are selected. :param cluster_members_dict: (dict of lists) dict of the form {cluster label: list of members of the cluster} :param nb_items: (int) number of items to be selected; if None all items are selected in the returned list :return: (list) a list of ordered items that are the samples from clusters ''' nb_clusters = len(cluster_members_dict.keys()) nb_all_items = sum([len(v) for v in cluster_members_dict.values()]) if (nb_items is None) or (nb_items > nb_all_items): nb_items = nb_all_items sorted_clusters = sorted(cluster_members_dict, key=lambda k: len(cluster_members_dict.get(k)), reverse=True) selected_items = [] for i in range(nb_items): ind = i % nb_clusters # iterate over the sorted_clusters by getting the index of the current cluster current_cluster = sorted_clusters[ind] len_current_cluster = len(cluster_members_dict[current_cluster]) if len_current_cluster > 0: next_item_ind = random.sample(range(len_current_cluster), 1)[0] next_item = cluster_members_dict[current_cluster].pop(next_item_ind) selected_items.append(next_item) i += 1 return selected_items def random_selection(similarity_matrix, nb_items=None): """ Selects randomly an item from the given similarity_matrix :param similarity_matrix: (pandas.DataFrame) an NxN dataframe; should be (a) symmetric and (b) values {i,j} to represent the similarity between item of row i and column j :param nb_items: (int) number of items to be selected; if None all items are selected in the returned list :return: (list) a list of random items """ selected_items = [] nb_total_items = similarity_matrix.shape[0] if (nb_items is None) or (nb_items > nb_total_items): nb_items = nb_total_items for i in range(nb_items): temp = random.sample(list(similarity_matrix), 1)[0] selected_items.append(temp) return selected_items def getAffinityMatrix(coordinates, k=7): """ The Affinity matrix determines how close or similar are 2 points in our space. Calculate affinity matrix based on input coordinates matrix and the number of nearest neighbours. Apply local scaling based on the k nearest neighbour References: https://papers.nips.cc/paper/2619-self-tuning-spectral-clustering.pdf """ # calculate euclidian distance matrix dists = squareform(pdist(coordinates)) # for each row, sort the distances ascendingly and take the index of the # k-th position (nearest neighbour) knn_distances = np.sort(dists, axis=0)[k] knn_distances = knn_distances[np.newaxis].T # calculate sigma_i * sigma_j local_scale = knn_distances.dot(knn_distances.T) affinity_matrix = dists * dists affinity_matrix = -affinity_matrix / local_scale # divide square distance matrix by local scale affinity_matrix[np.where(np.isnan(affinity_matrix))] = 0.0 # apply exponential affinity_matrix = np.exp(affinity_matrix) np.fill_diagonal(affinity_matrix, 0) return affinity_matrix def eigenDecomposition(A, topK=5): """ :param A: Affinity matrix :param topK: Top k :return A tuple containing: - the optimal number of clusters by eigengap heuristic - all eigen values - all eigen vectors This method performs the eigen decomposition on a given affinity matrix, following the steps recommended in the paper: 1. Construct the normalized affinity matrix: L = D−1/2ADˆ −1/2. 2. Find the eigenvalues and their associated eigen vectors 3. Identify the maximum gap which corresponds to the number of clusters by eigengap heuristic References: https://papers.nips.cc/paper/2619-self-tuning-spectral-clustering.pdf http://www.kyb.mpg.de/fileadmin/user_upload/files/publications/attachments/Luxburg07_tutorial_4488%5b0%5d.pdf """ L = csgraph.laplacian(A, normed=True) n_components = A.shape[0] # LM parameter : Eigenvalues with largest magnitude (eigs, eigsh), that is, largest eigenvalues in # the euclidean norm of complex numbers. # eigenvalues, eigenvectors = eigsh(L, k=n_components, which="LM", sigma=1.0, maxiter=5000) eigenvalues, eigenvectors = LA.eig(L) plt.title('Largest eigen values of input matrix') plt.scatter(np.arange(len(eigenvalues)), eigenvalues) plt.grid() plt.show() # Identify the optimal number of clusters as the index corresponding # to the larger gap between eigen values index_largest_gap = np.argsort(np.diff(eigenvalues))[::-1][:topK] nb_clusters = index_largest_gap + 1 return nb_clusters, eigenvalues, eigenvectors def get_optimal_number_of_clusters(similarity): ''' A function that help us identify which is the optimal number of cluster for Kmeans :param similarity: The similarity matrix from graph embeddings ''' distortions = [] for i in range(1, 20): clustering = KMeans(n_clusters=i, init='random', n_init=10, max_iter=300, tol=1e-04, random_state=0).fit( similarity) distortions.append(clustering.inertia_) plt.plot(range(1, 20), distortions, marker='o') plt.xlabel('Number of clusters (k)') plt.ylabel('Sum of squared distance') plt.title("Elbow Method for Optimal k") plt.show() def get_plot_for_different_k_values(similarity, model_name): """ This function plots points after applying a cluster method for k=3,4,5,6. Furthermore prints silhouette score for each k :param similarity: Contains our dataset (The similarity of RIPE monitors) :return: A list containing silhouette score """ silhouette_scores = [] f = plt.figure() f.add_subplot(2, 2, 1) for i in range(3, 7): if model_name == 'Spectral': sc = SpectralClustering(n_clusters=i, affinity='precomputed').fit(similarity) else: sc = KMeans(n_clusters=i, init='random', n_init=10, max_iter=300, tol=1e-04, random_state=0).fit(similarity) silhouette_scores.append(silhouette_score(similarity, sc.labels_)) f.add_subplot(2, 2, i - 2) plt.scatter(similarity[:, 0], similarity[:, 1], s=5, c=sc.labels_, label="n_cluster-" + str(i)) plt.legend() plt.show() return silhouette_scores def plot_silhouette_score_for_various_k(similarity, model_name): """ In this function we plot the silhouette score for various number of K (number of clusters) :param similarity: Contains our dataset (The similarity of RIPE monitors) :param model_name: The clustering algorithm we use (K-means or SpectralClustering) """ sil = [] for i in range(2, 21): if model_name == 'Spectral': sc = SpectralClustering(n_clusters=i, affinity='precomputed').fit(similarity) else: sc = KMeans(n_clusters=i, init='random', n_init=10, max_iter=300, tol=1e-04, random_state=0).fit(similarity) sil.append(silhouette_score(similarity, sc.labels_)) plt.plot(range(2, 21), sil[:], '--bo') plt.title('Silhouette score for different cluster sizes for ' + str(model_name)) plt.xlabel('Silhouette Score') plt.ylabel('Number of clusters (K)') plt.show() def clustering_based_selection(similarity_matrix, clustering_method, nb_clusters, nb_items=None, **kwargs): ''' Applies a clustering algorithm to the similarity matrix to cluster items, and then selects samples from the classes. :param similarity_matrix: (pandas.DataFrame) an NxN dataframe; should be (a) symmetric and (b) values {i,j} to represent the similarity between item of row i and column j :param clustering_method: (str) 'SpectralClustering' or 'Kmeans' :param nb_clusters: (int) number of clusters :param nb_items: (int) number of items to be selected; if None all items are selected in the returned list :param **kwargs: (dict) optional kwargs for the clustering algorithms :return: (list) a list of ordered items that are the samples from clusters ''' sim = similarity_matrix.to_numpy() sim = np.nan_to_num(sim, nan=0) if clustering_method == 'SpectralClustering': clustering = getAffinityMatrix(sim, k=7) k, eigenvalues, eigenvectors = eigenDecomposition(sim) clustering = SpectralClustering(n_clusters=nb_clusters, affinity='precomputed', **kwargs).fit(sim) labels = clustering.labels_ plt.scatter(sim[:, 0], sim[:, 1], c=labels) plt.title('Number of Clusters: ' + str(nb_clusters)) plt.show() model = 'Spectral' silhouette_scores = get_plot_for_different_k_values(sim, model) # print(silhouette_scores) # print(f'Optimal number of clusters {k}') plot_silhouette_score_for_various_k(sim, model) elif clustering_method == 'Kmeans': get_optimal_number_of_clusters(sim) clustering = KMeans(n_clusters=nb_clusters, **kwargs).fit(sim) labels = clustering.labels_ plt.scatter(sim[:, 0], sim[:, 1], c=labels) plt.title('Number of Clusters: ' + str(nb_clusters)) plt.show() model = 'Kmeans' silhouette_scores = get_plot_for_different_k_values(sim, model) # print(silhouette_scores) plot_silhouette_score_for_various_k(sim, model) else: raise ValueError cluster_members_dict = defaultdict(list) for i, label in enumerate(clustering.labels_): cluster_members_dict[label].append(similarity_matrix.index[i]) return sample_from_clusters(cluster_members_dict, nb_items=nb_items) def select_from_similarity_matrix(similarity_matrix, method, **kwargs): if method == 'Greedy min': selected_items = greedy_most_similar_elimination(similarity_matrix, **kwargs) elif method == 'Greedy max': selected_items = greedy_least_similar_selection(similarity_matrix, **kwargs) elif method == 'Clustering': selected_items = clustering_based_selection(similarity_matrix, **kwargs) elif method == 'Random': selected_items = random_selection(similarity_matrix, **kwargs) else: raise ValueError return selected_items def return_the_selected_monitors_from_methods(): similarity_matrix = pd.read_csv('ALL_RIPE_RIS_withASns_similarity_embeddings_BGP2VEC_20210107.csv', header=0, index_col=0) similarity_matrix.columns = similarity_matrix.columns.astype(float) selected_items_greedy_random = select_from_similarity_matrix(similarity_matrix, 'Random') selected_items_greedy_min = select_from_similarity_matrix(similarity_matrix, 'Greedy min') selected_items_greedy_max = select_from_similarity_matrix(similarity_matrix, 'Greedy max') kwargs = {'clustering_method': 'Kmeans', 'nb_clusters': 10} selected_items_Kmeans = select_from_similarity_matrix(similarity_matrix, 'Clustering', **kwargs) kwargs = {'clustering_method': 'SpectralClustering', 'nb_clusters': 10} selected_items_Spectral = select_from_similarity_matrix(similarity_matrix, 'Clustering', **kwargs) return selected_items_greedy_random, selected_items_greedy_min, selected_items_greedy_max, selected_items_Kmeans, selected_items_Spectral # method_param_dict = { # 'Greedy min': {'method': 'Greedy min', 'sim_matrix': similarity_matrix, 'args': {}}, # 'Greedy max': {'method': 'Greedy max', 'sim_matrix': similarity_matrix, 'args': {}}, # 'Clustering kmeans k10 full': {'method': 'Clustering', 'sim_matrix': similarity_matrix, 'args': {'clustering_method': 'Kmeans', 'nb_clusters': 7}}, # 'Clustering spectral k10': {'method': 'Clustering', 'sim_matrix': similarity_matrix, 'args': {'clustering_method': 'SpectralClustering', 'nb_clusters': 7}}} # # for m, params in method_param_dict.items(): # selected_items = select_from_similarity_matrix(params['sim_matrix'], params['method'], **params['args']) # print('\t{} [DONE]'.format(m)) # with open('dataset_selected_monitors_ripe_ris_pathlens_100k_{}.json'.format('_'.join(m.lower().translate('()').split(' '))), 'w') as f: # json.dump(selected_items, f) # # asns_per_method = dict() # for m, params in method_param_dict.items(): # with open('dataset_selected_monitors_ripe_ris_pathlens_100k_{}.json'.format('_'.join(m.lower().split(' '))), 'r') as f: # selected_items = json.load(f) # asns_per_method[m] = selected_items # print('\t{} [DONE]'.format(m)) # with open(PROXIMITY_FNAME, 'w') as f: # json.dump(asns_per_method, f)
[ 1, 529, 9507, 29958, 21067, 4848, 29914, 10095, 2200, 29918, 24192, 627, 29918, 29950, 823, 547, 292, 29914, 29887, 573, 29918, 16414, 29918, 2129, 29918, 3166, 29918, 695, 504, 414, 29889, 2272, 13, 5215, 11701, 408, 10518, 13, 5215, 12655, 408, 7442, 13, 5215, 4036, 29892, 2897, 29892, 4390, 13, 3166, 16250, 1053, 2322, 8977, 13, 3166, 22889, 1053, 11451, 5317, 408, 14770, 13, 3166, 2071, 19668, 29889, 19594, 1053, 476, 6816, 550, 29892, 27738, 1705, 6821, 504, 3241, 13, 3166, 4560, 2272, 29889, 1028, 15238, 29889, 19244, 1053, 282, 5721, 29892, 6862, 689, 13, 3166, 4560, 2272, 29889, 29879, 5510, 1053, 5939, 4262, 13, 3166, 12655, 1053, 301, 979, 29887, 408, 17900, 13, 3166, 2071, 19668, 29889, 2527, 10817, 1053, 4047, 10774, 2353, 29918, 13628, 13, 13, 8618, 29990, 7833, 11937, 29918, 29943, 5813, 353, 525, 8391, 29918, 374, 412, 29918, 3780, 1649, 3712, 17259, 29918, 3166, 29918, 2084, 29880, 575, 29918, 29896, 29900, 29900, 29895, 29889, 3126, 29915, 13, 13, 13, 1753, 679, 29918, 1191, 3317, 29918, 7827, 29918, 29764, 537, 29898, 29764, 537, 29918, 5344, 29892, 515, 29918, 7076, 29922, 8516, 29892, 7115, 29918, 8945, 2133, 29922, 8824, 1125, 13, 1678, 14550, 13, 1678, 10987, 29879, 278, 2944, 310, 263, 4636, 313, 29764, 537, 29918, 5344, 29897, 393, 756, 278, 7472, 20431, 29501, 304, 599, 916, 4452, 29889, 13, 1678, 960, 278, 376, 3166, 29918, 7076, 29908, 338, 451, 6213, 29892, 769, 871, 278, 4206, 29914, 13099, 310, 278, 4636, 297, 278, 515, 29918, 7076, 1051, 526, 4586, 964, 3633, 29889, 13, 1678, 584, 3207, 29871, 29501, 29918, 5344, 29901, 29871, 313, 15112, 29889, 17271, 29897, 385, 405, 29916, 29940, 12205, 29936, 881, 367, 313, 29874, 29897, 18348, 322, 313, 29890, 29897, 1819, 426, 29875, 29892, 29926, 29913, 304, 13, 462, 18884, 2755, 278, 29501, 1546, 2944, 310, 1948, 474, 322, 1897, 432, 13, 1678, 584, 3207, 29871, 515, 29918, 7076, 29901, 308, 313, 1761, 29914, 842, 29897, 263, 11306, 310, 278, 4452, 313, 5727, 29914, 13099, 29897, 515, 607, 278, 2944, 411, 278, 4236, 1027, 2638, 279, 537, 674, 367, 4629, 13, 1678, 584, 3207, 29871, 7115, 29918, 8945, 2133, 29901, 313, 20054, 29897, 3692, 304, 6623, 278, 29501, 4636, 6820, 901, 19310, 275, 304, 1556, 2788, 1819, 639, 1948, 13, 462, 18884, 491, 1933, 4821, 1269, 1543, 411, 278, 7115, 372, 5692, 297, 278, 12705, 1051, 310, 1819, 310, 278, 1948, 13, 462, 18884, 321, 29889, 29887, 1696, 263, 29918, 798, 353, 518, 29900, 29889, 29945, 29892, 29871, 29900, 29889, 29941, 29892, 29871, 29900, 29889, 29946, 29962, 6660, 9120, 29918, 798, 353, 518, 29900, 29889, 29945, 29914, 29896, 29892, 29871, 29900, 29889, 29941, 29914, 29941, 29892, 29871, 29900, 29889, 29946, 29914, 29906, 29962, 353, 518, 29900, 29889, 29945, 29892, 29871, 29900, 29889, 29896, 29892, 29871, 29900, 29889, 29906, 29962, 13, 462, 18884, 321, 29889, 29887, 1696, 263, 29918, 798, 353, 518, 29900, 29889, 29896, 29892, 29871, 29900, 29889, 29896, 29892, 29871, 29900, 29889, 29946, 29962, 6660, 9120, 29918, 798, 353, 518, 29900, 29889, 29896, 29914, 29906, 29892, 29871, 29900, 29889, 29896, 29914, 29941, 29892, 29871, 29900, 29889, 29946, 29914, 29896, 29962, 353, 518, 29900, 29889, 29900, 29945, 29892, 29871, 29900, 29889, 29900, 29941, 29941, 29892, 29871, 29900, 29889, 29946, 29962, 13, 1678, 584, 2457, 29901, 462, 1678, 313, 19529, 279, 29892, 321, 29889, 29887, 1696, 851, 470, 938, 29897, 278, 2380, 310, 278, 2944, 297, 278, 12205, 393, 756, 278, 4236, 3001, 29501, 13, 1678, 14550, 13, 1678, 565, 515, 29918, 7076, 338, 6213, 29901, 13, 4706, 4489, 353, 29501, 29918, 5344, 29889, 8552, 580, 13, 1678, 1683, 29901, 13, 4706, 4489, 353, 29501, 29918, 5344, 29889, 2029, 29961, 3166, 29918, 7076, 29892, 515, 29918, 7076, 1822, 8552, 580, 13, 13, 1678, 7442, 29889, 5589, 29918, 6051, 351, 7177, 29898, 2176, 29889, 5975, 29892, 7442, 29889, 13707, 29897, 29871, 396, 731, 1583, 29899, 29764, 537, 304, 23432, 577, 393, 372, 338, 451, 4586, 964, 3633, 13, 13, 1678, 565, 7115, 29918, 8945, 2133, 29901, 13, 4706, 363, 282, 29896, 297, 4489, 29889, 2248, 29901, 13, 9651, 12705, 29918, 2248, 267, 353, 1051, 29898, 2176, 29889, 2029, 29961, 29886, 29896, 29892, 584, 1822, 6605, 29918, 5975, 29898, 6151, 2548, 29922, 8824, 467, 2248, 29897, 13, 9651, 4489, 29889, 2029, 29961, 29886, 29896, 29892, 12705, 29918, 2248, 267, 29962, 353, 4489, 29889, 2029, 29961, 29886, 29896, 29892, 12705, 29918, 2248, 267, 29962, 334, 518, 29896, 29889, 29900, 847, 474, 363, 474, 297, 3464, 29898, 29896, 29892, 29871, 29896, 718, 4489, 29889, 12181, 29961, 29900, 2314, 29962, 13, 13, 1678, 2533, 29918, 29764, 1907, 353, 7442, 29889, 29876, 550, 398, 29898, 2176, 29892, 9685, 29922, 29896, 29897, 13, 1678, 565, 7442, 29889, 3317, 29898, 2083, 29918, 29764, 1907, 29897, 1275, 29871, 29900, 29901, 29871, 396, 599, 2788, 1907, 526, 23432, 470, 5225, 13, 4706, 2446, 29918, 667, 353, 4036, 29889, 11249, 29898, 3166, 29918, 7076, 29892, 29871, 29896, 9601, 29900, 29962, 13, 1678, 1683, 29901, 13, 4706, 2446, 29918, 667, 353, 4489, 29889, 2248, 29961, 9302, 29889, 1191, 3317, 29898, 2083, 29918, 29764, 1907, 4638, 13, 13, 1678, 736, 2446, 29918, 667, 13, 13, 13, 1753, 1395, 7584, 29918, 3242, 29918, 29764, 29918, 295, 326, 3381, 29898, 29764, 537, 29918, 5344, 29892, 7115, 29918, 8945, 2133, 29922, 8824, 1125, 13, 1678, 14550, 13, 1678, 7605, 29879, 4256, 6703, 278, 2944, 297, 278, 2183, 29501, 29918, 5344, 393, 756, 278, 7472, 20431, 29501, 304, 599, 916, 4452, 29889, 2180, 1269, 12541, 29892, 13, 1678, 871, 278, 2788, 1907, 4249, 278, 1661, 29899, 8391, 4452, 526, 4586, 964, 3633, 29889, 2180, 1269, 12541, 29892, 278, 4629, 2944, 338, 7180, 297, 278, 6763, 310, 13, 1678, 263, 1051, 29889, 2180, 278, 1095, 29892, 445, 1051, 338, 4133, 29889, 8741, 29901, 4133, 29918, 1761, 353, 518, 667, 29918, 8391, 29918, 4230, 29892, 2023, 29892, 2944, 29918, 8391, 29918, 4102, 29962, 13, 1678, 584, 3207, 29871, 29501, 29918, 5344, 29901, 29871, 313, 15112, 29889, 17271, 29897, 385, 405, 29916, 29940, 12205, 29936, 881, 367, 313, 29874, 29897, 18348, 322, 313, 29890, 29897, 1819, 426, 29875, 29892, 29926, 29913, 304, 13, 462, 18884, 2755, 278, 29501, 1546, 2944, 310, 1948, 474, 322, 1897, 432, 13, 1678, 584, 3207, 29871, 7115, 29918, 8945, 2133, 29901, 313, 20054, 29897, 3692, 304, 6623, 278, 29501, 4636, 6820, 901, 19310, 275, 304, 1556, 2788, 1819, 639, 1948, 13, 1678, 584, 2457, 29901, 462, 1678, 313, 1761, 29897, 263, 1051, 310, 10372, 4452, 313, 3166, 278, 1881, 29915, 29879, 2380, 416, 278, 937, 2944, 338, 278, 3203, 2788, 13, 1678, 14550, 13, 1678, 4629, 29918, 7076, 353, 5159, 13, 1678, 363, 474, 297, 3464, 29898, 29764, 537, 29918, 5344, 29889, 12181, 29961, 29900, 29962, 1125, 13, 4706, 515, 29918, 7076, 353, 1051, 29898, 842, 29898, 29764, 537, 29918, 5344, 29889, 2248, 29897, 448, 731, 29898, 8391, 29918, 7076, 876, 13, 4706, 2446, 29918, 667, 353, 679, 29918, 1191, 3317, 29918, 7827, 29918, 29764, 537, 29898, 29764, 537, 29918, 5344, 29892, 515, 29918, 7076, 29922, 3166, 29918, 7076, 29892, 13, 462, 462, 18884, 7115, 29918, 8945, 2133, 29922, 10003, 29918, 8945, 2133, 29897, 13, 4706, 4629, 29918, 7076, 29889, 7851, 29898, 29900, 29892, 2446, 29918, 667, 29897, 13, 13, 1678, 736, 4629, 29918, 7076, 13, 13, 13, 1753, 679, 29918, 1191, 1195, 29918, 7827, 29918, 29764, 537, 29898, 29764, 537, 29918, 5344, 29892, 515, 29918, 7076, 29922, 8516, 1125, 13, 1678, 14550, 13, 1678, 10987, 29879, 278, 2944, 310, 263, 4636, 313, 29764, 537, 29918, 5344, 29897, 393, 756, 278, 9212, 20431, 29501, 304, 599, 916, 4452, 29889, 13, 1678, 960, 278, 376, 3166, 29918, 7076, 29908, 338, 451, 6213, 29892, 769, 871, 278, 313, 29874, 29897, 4206, 310, 278, 4636, 297, 278, 515, 29918, 7076, 1051, 322, 313, 29890, 29897, 278, 4341, 13, 1678, 310, 278, 4636, 6058, 297, 278, 515, 29918, 7076, 1051, 526, 4586, 964, 3633, 29889, 13, 1678, 584, 3207, 29871, 29501, 29918, 5344, 29901, 29871, 313, 15112, 29889, 17271, 29897, 385, 405, 29916, 29940, 12205, 29936, 881, 367, 313, 29874, 29897, 18348, 322, 313, 29890, 29897, 1819, 426, 29875, 29892, 29926, 29913, 304, 13, 462, 18884, 2755, 278, 29501, 1546, 2944, 310, 1948, 474, 322, 1897, 432, 13, 1678, 584, 3207, 29871, 515, 29918, 7076, 29901, 308, 313, 1761, 29914, 842, 29897, 263, 11306, 310, 278, 4452, 313, 5727, 29914, 13099, 29897, 515, 607, 278, 2944, 411, 278, 1375, 1027, 2638, 279, 537, 674, 367, 4629, 13, 1678, 584, 2457, 29901, 462, 1678, 313, 19529, 279, 29892, 321, 29889, 29887, 1696, 851, 470, 938, 29897, 278, 2380, 310, 278, 2944, 297, 278, 12205, 393, 756, 278, 1375, 3001, 29501, 13, 1678, 14550, 13, 1678, 4489, 353, 29501, 29918, 5344, 29889, 8552, 580, 13, 1678, 7442, 29889, 5589, 29918, 6051, 351, 7177, 29898, 2176, 29889, 5975, 29892, 7442, 29889, 13707, 29897, 29871, 396, 731, 1583, 29899, 29764, 537, 304, 23432, 577, 393, 372, 338, 451, 4586, 964, 3633, 13, 1678, 565, 515, 29918, 7076, 338, 451, 6213, 29901, 13, 4706, 916, 29918, 7076, 353, 1051, 29898, 842, 29898, 2176, 29889, 2248, 29897, 448, 731, 29898, 3166, 29918, 7076, 876, 13, 4706, 4489, 353, 4489, 29889, 2029, 29961, 3166, 29918, 7076, 29892, 916, 29918, 7076, 29962, 13, 13, 1678, 2533, 29918, 29764, 1907, 353, 7442, 29889, 29876, 550, 398, 29898, 2176, 29892, 9685, 29922, 29896, 29897, 13, 1678, 565, 7442, 29889, 3317, 29898, 2083, 29918, 29764, 1907, 29897, 1275, 29871, 29900, 29901, 29871, 396, 599, 2788, 1907, 526, 23432, 470, 5225, 13, 4706, 2446, 29918, 667, 353, 4036, 29889, 11249, 29898, 3166, 29918, 7076, 29892, 29871, 29896, 9601, 29900, 29962, 13, 1678, 1683, 29901, 13, 4706, 2446, 29918, 667, 353, 4489, 29889, 2248, 29961, 9302, 29889, 1191, 1195, 29898, 2083, 29918, 29764, 1907, 4638, 13, 13, 1678, 736, 2446, 29918, 667, 13, 13, 13, 1753, 1395, 7584, 29918, 280, 579, 29918, 29764, 29918, 21731, 29898, 29764, 537, 29918, 5344, 29892, 302, 29890, 29918, 7076, 29922, 8516, 1125, 13, 1678, 14550, 13, 1678, 7605, 29879, 4256, 6703, 278, 2944, 297, 278, 2183, 29501, 29918, 5344, 393, 756, 278, 9212, 20431, 29501, 304, 599, 916, 4452, 29889, 2180, 1269, 12541, 29892, 13, 1678, 871, 278, 2788, 1907, 4249, 278, 1661, 29899, 8391, 4452, 322, 278, 2307, 4629, 4452, 526, 4586, 964, 3633, 29889, 2180, 1269, 12541, 29892, 278, 4629, 2944, 338, 13, 1678, 7180, 297, 278, 1095, 310, 263, 1051, 29889, 2180, 278, 1095, 29892, 445, 1051, 338, 4133, 29889, 8741, 29901, 4133, 29918, 1761, 353, 518, 667, 29918, 8391, 29918, 4102, 29892, 2023, 29892, 2944, 29918, 8391, 29918, 4230, 29962, 13, 1678, 584, 3207, 29871, 29501, 29918, 5344, 29901, 29871, 313, 15112, 29889, 17271, 29897, 385, 405, 29916, 29940, 12205, 29936, 881, 367, 313, 29874, 29897, 18348, 322, 313, 29890, 29897, 1819, 426, 29875, 29892, 29926, 29913, 304, 13, 462, 18884, 2755, 278, 29501, 1546, 2944, 310, 1948, 474, 322, 1897, 432, 13, 1678, 584, 3207, 29871, 302, 29890, 29918, 7076, 29901, 965, 313, 524, 29897, 1353, 310, 4452, 304, 367, 4629, 29936, 565, 6213, 599, 4452, 526, 4629, 297, 278, 4133, 1051, 13, 1678, 584, 2457, 29901, 462, 1678, 313, 1761, 29897, 263, 1051, 310, 10372, 4452, 313, 3166, 278, 1881, 29915, 29879, 2380, 416, 278, 937, 2944, 338, 278, 3203, 2788, 13, 1678, 14550, 13, 1678, 4629, 29918, 7076, 353, 5159, 13, 13, 1678, 302, 29890, 29918, 7827, 29918, 7076, 353, 29501, 29918, 5344, 29889, 12181, 29961, 29900, 29962, 13, 1678, 565, 313, 9877, 29918, 7076, 338, 6213, 29897, 470, 313, 9877, 29918, 7076, 1405, 302, 29890, 29918, 7827, 29918, 7076, 1125, 13, 4706, 302, 29890, 29918, 7076, 353, 302, 29890, 29918, 7827, 29918, 7076, 13, 13, 1678, 363, 474, 297, 3464, 29898, 9877, 29918, 7076, 1125, 13, 4706, 565, 7431, 29898, 8391, 29918, 7076, 29897, 1275, 29871, 29900, 29901, 13, 9651, 515, 29918, 7076, 353, 6213, 13, 4706, 1683, 29901, 13, 9651, 515, 29918, 7076, 353, 1051, 29898, 842, 29898, 29764, 537, 29918, 5344, 29889, 2248, 29897, 448, 731, 29898, 8391, 29918, 7076, 876, 13, 4706, 2446, 29918, 667, 353, 679, 29918, 1191, 1195, 29918, 7827, 29918, 29764, 537, 29898, 29764, 537, 29918, 5344, 29892, 515, 29918, 7076, 29922, 3166, 29918, 7076, 29897, 13, 4706, 4629, 29918, 7076, 29889, 4397, 29898, 4622, 29918, 667, 29897, 13, 13, 1678, 736, 4629, 29918, 7076, 13, 13, 13, 1753, 4559, 29918, 3166, 29918, 695, 504, 414, 29898, 19594, 29918, 28109, 29918, 8977, 29892, 302, 29890, 29918, 7076, 29922, 8516, 1125, 13, 1678, 14550, 13, 1678, 3685, 2701, 4452, 515, 278, 24554, 29892, 6257, 515, 263, 4036, 2944, 297, 278, 10150, 9867, 29892, 769, 263, 4036, 2944, 297, 278, 1473, 10150, 9867, 29892, 322, 577, 373, 29889, 13, 1678, 1932, 3161, 310, 599, 24554, 526, 4629, 29892, 769, 8665, 1449, 515, 278, 10150, 9867, 29892, 2745, 599, 4452, 313, 272, 701, 304, 302, 29890, 29918, 7076, 29897, 526, 4629, 29889, 13, 1678, 584, 3207, 29871, 9867, 29918, 28109, 29918, 8977, 29901, 259, 313, 8977, 310, 8857, 29897, 9657, 310, 278, 883, 426, 19594, 3858, 29901, 1051, 310, 5144, 310, 278, 9867, 29913, 13, 1678, 584, 3207, 29871, 302, 29890, 29918, 7076, 29901, 1669, 313, 524, 29897, 1353, 310, 4452, 304, 367, 4629, 29936, 565, 6213, 599, 4452, 526, 4629, 297, 278, 4133, 1051, 13, 1678, 584, 2457, 29901, 462, 4706, 313, 1761, 29897, 263, 1051, 310, 10372, 4452, 393, 526, 278, 11916, 515, 24554, 13, 1678, 14550, 13, 13, 1678, 302, 29890, 29918, 695, 504, 414, 353, 7431, 29898, 19594, 29918, 28109, 29918, 8977, 29889, 8149, 3101, 13, 1678, 302, 29890, 29918, 497, 29918, 7076, 353, 2533, 4197, 2435, 29898, 29894, 29897, 363, 325, 297, 9867, 29918, 28109, 29918, 8977, 29889, 5975, 580, 2314, 13, 1678, 565, 313, 9877, 29918, 7076, 338, 6213, 29897, 470, 313, 9877, 29918, 7076, 1405, 302, 29890, 29918, 497, 29918, 7076, 1125, 13, 4706, 302, 29890, 29918, 7076, 353, 302, 29890, 29918, 497, 29918, 7076, 13, 13, 1678, 12705, 29918, 695, 504, 414, 353, 12705, 29898, 19594, 29918, 28109, 29918, 8977, 29892, 1820, 29922, 2892, 413, 29901, 7431, 29898, 19594, 29918, 28109, 29918, 8977, 29889, 657, 29898, 29895, 8243, 11837, 29922, 5574, 29897, 13, 13, 1678, 4629, 29918, 7076, 353, 5159, 13, 1678, 363, 474, 297, 3464, 29898, 9877, 29918, 7076, 1125, 13, 4706, 1399, 353, 474, 1273, 302, 29890, 29918, 695, 504, 414, 29871, 396, 13649, 975, 278, 12705, 29918, 695, 504, 414, 491, 2805, 278, 2380, 310, 278, 1857, 9867, 13, 4706, 1857, 29918, 19594, 353, 12705, 29918, 695, 504, 414, 29961, 513, 29962, 13, 4706, 7431, 29918, 3784, 29918, 19594, 353, 7431, 29898, 19594, 29918, 28109, 29918, 8977, 29961, 3784, 29918, 19594, 2314, 13, 4706, 565, 7431, 29918, 3784, 29918, 19594, 1405, 29871, 29900, 29901, 13, 9651, 2446, 29918, 667, 29918, 513, 353, 4036, 29889, 11249, 29898, 3881, 29898, 2435, 29918, 3784, 29918, 19594, 511, 29871, 29896, 9601, 29900, 29962, 13, 9651, 2446, 29918, 667, 353, 9867, 29918, 28109, 29918, 8977, 29961, 3784, 29918, 19594, 1822, 7323, 29898, 4622, 29918, 667, 29918, 513, 29897, 13, 9651, 4629, 29918, 7076, 29889, 4397, 29898, 4622, 29918, 667, 29897, 13, 4706, 474, 4619, 29871, 29896, 13, 13, 1678, 736, 4629, 29918, 7076, 13, 13, 13, 1753, 4036, 29918, 21731, 29898, 29764, 537, 29918, 5344, 29892, 302, 29890, 29918, 7076, 29922, 8516, 1125, 13, 1678, 9995, 13, 1678, 7605, 29879, 20459, 385, 2944, 515, 278, 2183, 29501, 29918, 5344, 13, 1678, 584, 3207, 29871, 29501, 29918, 5344, 29901, 29871, 313, 15112, 29889, 17271, 29897, 385, 405, 29916, 29940, 12205, 29936, 881, 367, 313, 29874, 29897, 18348, 322, 313, 29890, 29897, 1819, 426, 29875, 29892, 29926, 29913, 304, 13, 462, 18884, 2755, 278, 29501, 1546, 2944, 310, 1948, 474, 322, 1897, 432, 13, 1678, 584, 3207, 29871, 302, 29890, 29918, 7076, 29901, 965, 313, 524, 29897, 1353, 310, 4452, 304, 367, 4629, 29936, 565, 6213, 599, 4452, 526, 4629, 297, 278, 4133, 1051, 13, 1678, 584, 2457, 29901, 462, 1678, 313, 1761, 29897, 263, 1051, 310, 4036, 4452, 13, 1678, 9995, 13, 13, 1678, 4629, 29918, 7076, 353, 5159, 13, 13, 1678, 302, 29890, 29918, 7827, 29918, 7076, 353, 29501, 29918, 5344, 29889, 12181, 29961, 29900, 29962, 13, 1678, 565, 313, 9877, 29918, 7076, 338, 6213, 29897, 470, 313, 9877, 29918, 7076, 1405, 302, 29890, 29918, 7827, 29918, 7076, 1125, 13, 4706, 302, 29890, 29918, 7076, 353, 302, 29890, 29918, 7827, 29918, 7076, 13, 13, 1678, 363, 474, 297, 3464, 29898, 9877, 29918, 7076, 1125, 13, 4706, 5694, 353, 4036, 29889, 11249, 29898, 1761, 29898, 29764, 537, 29918, 5344, 511, 29871, 29896, 9601, 29900, 29962, 13, 4706, 4629, 29918, 7076, 29889, 4397, 29898, 7382, 29897, 13, 13, 1678, 736, 4629, 29918, 7076, 13, 13, 13, 1753, 679, 27867, 13593, 14609, 29898, 1111, 24266, 29892, 413, 29922, 29955, 1125, 13, 1678, 9995, 13, 1678, 450, 13737, 13593, 4636, 3683, 1475, 920, 3802, 470, 2788, 526, 29871, 29906, 3291, 297, 1749, 2913, 29889, 13, 1678, 20535, 403, 2756, 13593, 4636, 2729, 373, 1881, 10350, 4636, 322, 278, 1353, 13, 1678, 310, 20471, 22092, 2470, 29889, 13, 1678, 2401, 368, 1887, 21640, 2729, 373, 278, 413, 20471, 17647, 13, 4706, 28318, 29901, 13, 1678, 2045, 597, 29886, 21321, 29889, 1240, 567, 29889, 617, 29914, 19773, 29914, 29906, 29953, 29896, 29929, 29899, 1311, 29899, 29873, 27964, 29899, 21494, 1705, 29899, 695, 504, 3241, 29889, 5140, 13, 1678, 9995, 13, 1678, 396, 8147, 11878, 695, 333, 713, 5418, 4636, 13, 1678, 1320, 29879, 353, 6862, 689, 29898, 29886, 5721, 29898, 1111, 24266, 876, 13, 13, 1678, 396, 363, 1269, 1948, 29892, 2656, 278, 24610, 12066, 2548, 368, 322, 2125, 278, 2380, 310, 278, 13, 1678, 396, 413, 29899, 386, 2602, 313, 28502, 342, 17647, 29897, 13, 1678, 889, 29876, 29918, 5721, 2925, 353, 7442, 29889, 6605, 29898, 29881, 2879, 29892, 9685, 29922, 29900, 9601, 29895, 29962, 13, 1678, 889, 29876, 29918, 5721, 2925, 353, 889, 29876, 29918, 5721, 2925, 29961, 9302, 29889, 1482, 8990, 1822, 29911, 13, 13, 1678, 396, 8147, 269, 2934, 29918, 29875, 334, 269, 2934, 29918, 29926, 13, 1678, 1887, 29918, 7052, 353, 889, 29876, 29918, 5721, 2925, 29889, 6333, 29898, 3959, 29876, 29918, 5721, 2925, 29889, 29911, 29897, 13, 13, 1678, 2756, 13593, 29918, 5344, 353, 1320, 29879, 334, 1320, 29879, 13, 1678, 2756, 13593, 29918, 5344, 353, 448, 3470, 13593, 29918, 5344, 847, 1887, 29918, 7052, 13, 1678, 396, 16429, 6862, 5418, 4636, 491, 1887, 6287, 13, 1678, 2756, 13593, 29918, 5344, 29961, 9302, 29889, 3062, 29898, 9302, 29889, 275, 13707, 29898, 3470, 13593, 29918, 5344, 28166, 353, 29871, 29900, 29889, 29900, 13, 1678, 396, 3394, 25658, 13, 1678, 2756, 13593, 29918, 5344, 353, 7442, 29889, 4548, 29898, 3470, 13593, 29918, 5344, 29897, 13, 1678, 7442, 29889, 5589, 29918, 6051, 351, 7177, 29898, 3470, 13593, 29918, 5344, 29892, 29871, 29900, 29897, 13, 1678, 736, 2756, 13593, 29918, 5344, 13, 13, 13, 1753, 7388, 2772, 510, 3283, 29898, 29909, 29892, 2246, 29968, 29922, 29945, 1125, 13, 1678, 9995, 13, 1678, 584, 3207, 319, 29901, 13737, 13593, 4636, 13, 1678, 584, 3207, 2246, 29968, 29901, 7488, 413, 13, 1678, 584, 2457, 319, 18761, 6943, 29901, 13, 1678, 448, 278, 14413, 1353, 310, 24554, 491, 15761, 996, 481, 540, 332, 4695, 13, 1678, 448, 599, 7388, 1819, 13, 1678, 448, 599, 7388, 12047, 13, 13, 1678, 910, 1158, 23233, 278, 7388, 26227, 373, 263, 2183, 2756, 13593, 4636, 29892, 13, 1678, 1494, 278, 6576, 13622, 297, 278, 5650, 29901, 13, 268, 29896, 29889, 1281, 4984, 278, 4226, 1891, 2756, 13593, 4636, 29901, 365, 353, 360, 30120, 29896, 29914, 29906, 3035, 31597, 13935, 29896, 29914, 29906, 29889, 13, 268, 29906, 29889, 10987, 278, 25973, 322, 1009, 6942, 7388, 12047, 13, 268, 29941, 29889, 13355, 1598, 278, 7472, 17261, 607, 16161, 304, 278, 1353, 310, 24554, 13, 1678, 491, 15761, 996, 481, 540, 332, 4695, 13, 13, 1678, 28318, 29901, 13, 1678, 2045, 597, 29886, 21321, 29889, 1240, 567, 29889, 617, 29914, 19773, 29914, 29906, 29953, 29896, 29929, 29899, 1311, 29899, 29873, 27964, 29899, 21494, 1705, 29899, 695, 504, 3241, 29889, 5140, 13, 1678, 1732, 597, 1636, 29889, 3459, 29890, 29889, 1526, 29887, 29889, 311, 29914, 1445, 6406, 29914, 1792, 29918, 9009, 29914, 5325, 29914, 3597, 800, 29914, 14930, 1860, 29914, 29931, 1314, 3074, 29900, 29955, 29918, 12631, 29918, 29946, 29946, 29947, 29947, 29995, 29945, 29890, 29900, 29995, 29945, 29881, 29889, 5140, 13, 1678, 9995, 13, 1678, 365, 353, 5939, 4262, 29889, 6984, 433, 28445, 29898, 29909, 29892, 6056, 287, 29922, 5574, 29897, 13, 1678, 302, 29918, 14036, 353, 319, 29889, 12181, 29961, 29900, 29962, 13, 13, 1678, 396, 365, 29924, 3443, 584, 382, 2101, 5975, 411, 10150, 18497, 313, 29872, 23379, 29892, 15761, 845, 511, 393, 338, 29892, 10150, 25973, 297, 13, 1678, 396, 278, 321, 27511, 6056, 310, 4280, 3694, 29889, 13, 1678, 396, 25973, 29892, 7388, 345, 14359, 353, 15761, 845, 29898, 29931, 29892, 413, 29922, 29876, 29918, 14036, 29892, 607, 543, 26369, 613, 269, 2934, 29922, 29896, 29889, 29900, 29892, 4236, 1524, 29922, 29945, 29900, 29900, 29900, 29897, 13, 1678, 25973, 29892, 7388, 345, 14359, 353, 17900, 29889, 29872, 335, 29898, 29931, 29897, 13, 13, 1678, 14770, 29889, 3257, 877, 29931, 1191, 342, 7388, 1819, 310, 1881, 4636, 1495, 13, 1678, 14770, 29889, 1557, 2620, 29898, 9302, 29889, 279, 927, 29898, 2435, 29898, 29872, 2101, 5975, 8243, 25973, 29897, 13, 1678, 14770, 29889, 7720, 580, 13, 1678, 14770, 29889, 4294, 580, 13, 13, 1678, 396, 13355, 1598, 278, 14413, 1353, 310, 24554, 408, 278, 2380, 6590, 13, 1678, 396, 304, 278, 7200, 17261, 1546, 7388, 1819, 13, 1678, 2380, 29918, 27489, 342, 29918, 29887, 481, 353, 7442, 29889, 5085, 441, 29898, 9302, 29889, 12765, 29898, 29872, 2101, 5975, 876, 29961, 1057, 29899, 29896, 3816, 29901, 3332, 29968, 29962, 13, 1678, 302, 29890, 29918, 695, 504, 414, 353, 2380, 29918, 27489, 342, 29918, 29887, 481, 718, 29871, 29896, 13, 13, 1678, 736, 302, 29890, 29918, 695, 504, 414, 29892, 25973, 29892, 7388, 345, 14359, 13, 13, 13, 1753, 679, 29918, 3670, 3039, 29918, 4537, 29918, 974, 29918, 695, 504, 414, 29898, 29764, 537, 1125, 13, 1678, 14550, 13, 1678, 319, 740, 393, 1371, 502, 12439, 607, 338, 278, 14413, 1353, 310, 9867, 363, 476, 1004, 550, 13, 1678, 584, 3207, 29501, 29901, 450, 29501, 4636, 515, 3983, 8297, 29881, 886, 13, 1678, 14550, 13, 1678, 1320, 441, 1080, 353, 5159, 13, 1678, 363, 474, 297, 3464, 29898, 29896, 29892, 29871, 29906, 29900, 1125, 13, 4706, 16993, 3241, 353, 476, 6816, 550, 29898, 29876, 29918, 695, 504, 414, 29922, 29875, 29892, 2069, 2433, 8172, 742, 302, 29918, 2344, 29922, 29896, 29900, 29892, 4236, 29918, 1524, 29922, 29941, 29900, 29900, 29892, 304, 29880, 29922, 29896, 29872, 29899, 29900, 29946, 29892, 4036, 29918, 3859, 29922, 29900, 467, 9202, 29898, 13, 9651, 29501, 29897, 13, 4706, 1320, 441, 1080, 29889, 4397, 29898, 695, 504, 3241, 29889, 262, 814, 423, 19925, 13, 1678, 14770, 29889, 5317, 29898, 3881, 29898, 29896, 29892, 29871, 29906, 29900, 511, 1320, 441, 1080, 29892, 17456, 2433, 29877, 1495, 13, 1678, 14770, 29889, 29916, 1643, 877, 4557, 310, 24554, 313, 29895, 29897, 1495, 13, 1678, 14770, 29889, 29891, 1643, 877, 11139, 310, 10674, 1965, 5418, 1495, 13, 1678, 14770, 29889, 3257, 703, 6489, 17729, 8108, 363, 20693, 3039, 413, 1159, 13, 1678, 14770, 29889, 4294, 580, 13, 13, 13, 1753, 679, 29918, 5317, 29918, 1454, 29918, 29881, 15622, 29918, 29895, 29918, 5975, 29898, 29764, 537, 29892, 1904, 29918, 978, 1125, 13, 1678, 9995, 13, 1678, 910, 740, 24580, 3291, 1156, 15399, 263, 9867, 1158, 363, 413, 29922, 29941, 29892, 29946, 29892, 29945, 29892, 29953, 29889, 16478, 14677, 4047, 10774, 2353, 8158, 363, 1269, 413, 13, 1678, 584, 3207, 29501, 29901, 2866, 2708, 1749, 8783, 313, 1576, 29501, 310, 390, 29902, 4162, 1601, 17259, 29897, 13, 1678, 584, 2457, 29901, 319, 1051, 6943, 4047, 10774, 2353, 8158, 13, 1678, 9995, 13, 1678, 4047, 10774, 2353, 29918, 1557, 2361, 353, 5159, 13, 1678, 285, 353, 14770, 29889, 4532, 580, 13, 1678, 285, 29889, 1202, 29918, 1491, 5317, 29898, 29906, 29892, 29871, 29906, 29892, 29871, 29896, 29897, 13, 1678, 363, 474, 297, 3464, 29898, 29941, 29892, 29871, 29955, 1125, 13, 4706, 565, 1904, 29918, 978, 1275, 525, 29903, 1103, 1705, 2396, 13, 9651, 885, 353, 27738, 1705, 6821, 504, 3241, 29898, 29876, 29918, 695, 504, 414, 29922, 29875, 29892, 2756, 13593, 2433, 1457, 12097, 287, 2824, 9202, 29898, 29764, 537, 29897, 13, 4706, 1683, 29901, 13, 9651, 885, 353, 476, 6816, 550, 29898, 29876, 29918, 695, 504, 414, 29922, 29875, 29892, 2069, 2433, 8172, 742, 302, 29918, 2344, 29922, 29896, 29900, 29892, 4236, 29918, 1524, 29922, 29941, 29900, 29900, 29892, 304, 29880, 29922, 29896, 29872, 29899, 29900, 29946, 29892, 4036, 29918, 3859, 29922, 29900, 467, 9202, 29898, 29764, 537, 29897, 13, 4706, 4047, 10774, 2353, 29918, 1557, 2361, 29889, 4397, 29898, 25590, 10774, 2353, 29918, 13628, 29898, 29764, 537, 29892, 885, 29889, 21134, 29918, 876, 13, 4706, 285, 29889, 1202, 29918, 1491, 5317, 29898, 29906, 29892, 29871, 29906, 29892, 474, 448, 29871, 29906, 29897, 13, 4706, 14770, 29889, 1557, 2620, 29898, 29764, 537, 7503, 29892, 29871, 29900, 1402, 29501, 7503, 29892, 29871, 29896, 1402, 269, 29922, 29945, 29892, 274, 29922, 1557, 29889, 21134, 3383, 3858, 543, 29876, 29918, 19594, 29899, 29908, 718, 851, 29898, 29875, 876, 13, 4706, 14770, 29889, 26172, 580, 13, 1678, 14770, 29889, 4294, 580, 13, 13, 1678, 736, 4047, 10774, 2353, 29918, 1557, 2361, 13, 13, 13, 1753, 6492, 29918, 25590, 10774, 2353, 29918, 13628, 29918, 1454, 29918, 5927, 681, 29918, 29895, 29898, 29764, 537, 29892, 1904, 29918, 978, 1125, 13, 1678, 9995, 13, 1678, 512, 445, 740, 591, 6492, 278, 4047, 10774, 2353, 8158, 363, 5164, 1353, 310, 476, 313, 4537, 310, 24554, 29897, 13, 1678, 584, 3207, 29501, 29901, 2866, 2708, 1749, 8783, 313, 1576, 29501, 310, 390, 29902, 4162, 1601, 17259, 29897, 13, 1678, 584, 3207, 1904, 29918, 978, 29901, 450, 16993, 3241, 5687, 591, 671, 313, 29968, 29899, 1004, 550, 470, 27738, 1705, 6821, 504, 3241, 29897, 13, 1678, 9995, 13, 1678, 4047, 353, 5159, 13, 1678, 363, 474, 297, 3464, 29898, 29906, 29892, 29871, 29906, 29896, 1125, 13, 4706, 565, 1904, 29918, 978, 1275, 525, 29903, 1103, 1705, 2396, 13, 9651, 885, 353, 27738, 1705, 6821, 504, 3241, 29898, 29876, 29918, 695, 504, 414, 29922, 29875, 29892, 2756, 13593, 2433, 1457, 12097, 287, 2824, 9202, 29898, 29764, 537, 29897, 13, 4706, 1683, 29901, 13, 9651, 885, 353, 476, 6816, 550, 29898, 29876, 29918, 695, 504, 414, 29922, 29875, 29892, 2069, 2433, 8172, 742, 302, 29918, 2344, 29922, 29896, 29900, 29892, 4236, 29918, 1524, 29922, 29941, 29900, 29900, 29892, 304, 29880, 29922, 29896, 29872, 29899, 29900, 29946, 29892, 4036, 29918, 3859, 29922, 29900, 467, 9202, 29898, 29764, 537, 29897, 13, 4706, 4047, 29889, 4397, 29898, 25590, 10774, 2353, 29918, 13628, 29898, 29764, 537, 29892, 885, 29889, 21134, 29918, 876, 13, 1678, 14770, 29889, 5317, 29898, 3881, 29898, 29906, 29892, 29871, 29906, 29896, 511, 4047, 7503, 1402, 525, 489, 833, 1495, 13, 1678, 14770, 29889, 3257, 877, 26729, 10774, 2353, 8158, 363, 1422, 9867, 15786, 363, 525, 718, 851, 29898, 4299, 29918, 978, 876, 13, 1678, 14770, 29889, 29916, 1643, 877, 26729, 10774, 2353, 2522, 487, 1495, 13, 1678, 14770, 29889, 29891, 1643, 877, 4557, 310, 24554, 313, 29968, 29897, 1495, 13, 1678, 14770, 29889, 4294, 580, 13, 13, 13, 1753, 16993, 3241, 29918, 6707, 29918, 21731, 29898, 29764, 537, 29918, 5344, 29892, 16993, 3241, 29918, 5696, 29892, 302, 29890, 29918, 695, 504, 414, 29892, 302, 29890, 29918, 7076, 29922, 8516, 29892, 3579, 19290, 1125, 13, 1678, 14550, 13, 1678, 2401, 3687, 263, 16993, 3241, 5687, 304, 278, 29501, 4636, 304, 9867, 4452, 29892, 322, 769, 27778, 11916, 515, 278, 4413, 29889, 13, 1678, 584, 3207, 29871, 29501, 29918, 5344, 29901, 29871, 313, 15112, 29889, 17271, 29897, 385, 405, 29916, 29940, 12205, 29936, 881, 367, 313, 29874, 29897, 18348, 322, 313, 29890, 29897, 1819, 426, 29875, 29892, 29926, 29913, 304, 13, 462, 18884, 2755, 278, 29501, 1546, 2944, 310, 1948, 474, 322, 1897, 432, 13, 1678, 584, 3207, 29871, 16993, 3241, 29918, 5696, 29901, 29871, 313, 710, 29897, 525, 29903, 1103, 1705, 6821, 504, 3241, 29915, 470, 525, 29968, 1004, 550, 29915, 13, 1678, 584, 3207, 29871, 302, 29890, 29918, 695, 504, 414, 29901, 4706, 313, 524, 29897, 1353, 310, 24554, 13, 1678, 584, 3207, 29871, 302, 29890, 29918, 7076, 29901, 965, 313, 524, 29897, 1353, 310, 4452, 304, 367, 4629, 29936, 565, 6213, 599, 4452, 526, 4629, 297, 278, 4133, 1051, 13, 1678, 584, 3207, 29871, 3579, 19290, 29901, 965, 313, 8977, 29897, 13136, 9049, 5085, 363, 278, 16993, 3241, 14009, 13, 1678, 584, 2457, 29901, 462, 1678, 313, 1761, 29897, 263, 1051, 310, 10372, 4452, 393, 526, 278, 11916, 515, 24554, 13, 1678, 14550, 13, 1678, 1027, 353, 29501, 29918, 5344, 29889, 517, 29918, 23749, 580, 13, 1678, 1027, 353, 7442, 29889, 13707, 29918, 517, 29918, 1949, 29898, 3601, 29892, 23432, 29922, 29900, 29897, 13, 1678, 565, 16993, 3241, 29918, 5696, 1275, 525, 29903, 1103, 1705, 6821, 504, 3241, 2396, 13, 4706, 16993, 3241, 353, 679, 27867, 13593, 14609, 29898, 3601, 29892, 413, 29922, 29955, 29897, 13, 4706, 413, 29892, 25973, 29892, 7388, 345, 14359, 353, 7388, 2772, 510, 3283, 29898, 3601, 29897, 13, 4706, 16993, 3241, 353, 27738, 1705, 6821, 504, 3241, 29898, 29876, 29918, 695, 504, 414, 29922, 9877, 29918, 695, 504, 414, 29892, 2756, 13593, 2433, 1457, 12097, 287, 742, 3579, 19290, 467, 9202, 29898, 3601, 29897, 13, 4706, 11073, 353, 16993, 3241, 29889, 21134, 29918, 13, 4706, 14770, 29889, 1557, 2620, 29898, 3601, 7503, 29892, 29871, 29900, 1402, 1027, 7503, 29892, 29871, 29896, 1402, 274, 29922, 21134, 29897, 13, 4706, 14770, 29889, 3257, 877, 4557, 310, 2233, 504, 414, 29901, 525, 718, 851, 29898, 9877, 29918, 695, 504, 414, 876, 13, 4706, 14770, 29889, 4294, 580, 13, 4706, 1904, 353, 525, 29903, 1103, 1705, 29915, 13, 4706, 4047, 10774, 2353, 29918, 1557, 2361, 353, 679, 29918, 5317, 29918, 1454, 29918, 29881, 15622, 29918, 29895, 29918, 5975, 29898, 3601, 29892, 1904, 29897, 13, 4706, 396, 1596, 29898, 25590, 10774, 2353, 29918, 1557, 2361, 29897, 13, 4706, 396, 1596, 29898, 29888, 29915, 20624, 3039, 1353, 310, 24554, 426, 29895, 29913, 1495, 13, 13, 4706, 6492, 29918, 25590, 10774, 2353, 29918, 13628, 29918, 1454, 29918, 5927, 681, 29918, 29895, 29898, 3601, 29892, 1904, 29897, 13, 1678, 25342, 16993, 3241, 29918, 5696, 1275, 525, 29968, 1004, 550, 2396, 13, 4706, 679, 29918, 3670, 3039, 29918, 4537, 29918, 974, 29918, 695, 504, 414, 29898, 3601, 29897, 13, 4706, 16993, 3241, 353, 476, 6816, 550, 29898, 29876, 29918, 695, 504, 414, 29922, 9877, 29918, 695, 504, 414, 29892, 3579, 19290, 467, 9202, 29898, 3601, 29897, 13, 4706, 11073, 353, 16993, 3241, 29889, 21134, 29918, 13, 4706, 14770, 29889, 1557, 2620, 29898, 3601, 7503, 29892, 29871, 29900, 1402, 1027, 7503, 29892, 29871, 29896, 1402, 274, 29922, 21134, 29897, 13, 4706, 14770, 29889, 3257, 877, 4557, 310, 2233, 504, 414, 29901, 525, 718, 851, 29898, 9877, 29918, 695, 504, 414, 876, 13, 4706, 14770, 29889, 4294, 580, 13, 4706, 1904, 353, 525, 29968, 1004, 550, 29915, 13, 4706, 4047, 10774, 2353, 29918, 1557, 2361, 353, 679, 29918, 5317, 29918, 1454, 29918, 29881, 15622, 29918, 29895, 29918, 5975, 29898, 3601, 29892, 1904, 29897, 13, 4706, 396, 1596, 29898, 25590, 10774, 2353, 29918, 1557, 2361, 29897, 13, 4706, 6492, 29918, 25590, 10774, 2353, 29918, 13628, 29918, 1454, 29918, 5927, 681, 29918, 29895, 29898, 3601, 29892, 1904, 29897, 13, 1678, 1683, 29901, 13, 4706, 12020, 7865, 2392, 13, 13, 1678, 9867, 29918, 28109, 29918, 8977, 353, 2322, 8977, 29898, 1761, 29897, 13, 1678, 363, 474, 29892, 3858, 297, 26985, 29898, 695, 504, 3241, 29889, 21134, 29918, 1125, 13, 4706, 9867, 29918, 28109, 29918, 8977, 29961, 1643, 1822, 4397, 29898, 29764, 537, 29918, 5344, 29889, 2248, 29961, 29875, 2314, 13, 13, 1678, 736, 4559, 29918, 3166, 29918, 695, 504, 414, 29898, 19594, 29918, 28109, 29918, 8977, 29892, 302, 29890, 29918, 7076, 29922, 9877, 29918, 7076, 29897, 13, 13, 13, 1753, 1831, 29918, 3166, 29918, 29764, 537, 29918, 5344, 29898, 29764, 537, 29918, 5344, 29892, 1158, 29892, 3579, 19290, 1125, 13, 1678, 565, 1158, 1275, 525, 25120, 7584, 1375, 2396, 13, 4706, 4629, 29918, 7076, 353, 1395, 7584, 29918, 3242, 29918, 29764, 29918, 295, 326, 3381, 29898, 29764, 537, 29918, 5344, 29892, 3579, 19290, 29897, 13, 1678, 25342, 1158, 1275, 525, 25120, 7584, 4236, 2396, 13, 4706, 4629, 29918, 7076, 353, 1395, 7584, 29918, 280, 579, 29918, 29764, 29918, 21731, 29898, 29764, 537, 29918, 5344, 29892, 3579, 19290, 29897, 13, 1678, 25342, 1158, 1275, 525, 6821, 504, 3241, 2396, 13, 4706, 4629, 29918, 7076, 353, 16993, 3241, 29918, 6707, 29918, 21731, 29898, 29764, 537, 29918, 5344, 29892, 3579, 19290, 29897, 13, 1678, 25342, 1158, 1275, 525, 17875, 2396, 13, 4706, 4629, 29918, 7076, 353, 4036, 29918, 21731, 29898, 29764, 537, 29918, 5344, 29892, 3579, 19290, 29897, 13, 1678, 1683, 29901, 13, 4706, 12020, 7865, 2392, 13, 1678, 736, 4629, 29918, 7076, 13, 13, 13, 1753, 736, 29918, 1552, 29918, 8391, 29918, 3712, 17259, 29918, 3166, 29918, 23515, 7295, 13, 1678, 29501, 29918, 5344, 353, 10518, 29889, 949, 29918, 7638, 877, 9818, 29918, 3960, 4162, 29918, 29934, 3235, 29918, 2541, 3289, 1983, 29918, 29764, 537, 29918, 17987, 29881, 886, 29918, 29933, 19903, 29906, 29963, 11206, 29918, 29906, 29900, 29906, 29896, 29900, 29896, 29900, 29955, 29889, 7638, 742, 13, 462, 462, 1678, 4839, 29922, 29900, 29892, 2380, 29918, 1054, 29922, 29900, 29897, 13, 1678, 29501, 29918, 5344, 29889, 13099, 353, 29501, 29918, 5344, 29889, 13099, 29889, 579, 668, 29898, 7411, 29897, 13, 13, 1678, 4629, 29918, 7076, 29918, 7979, 7584, 29918, 8172, 353, 1831, 29918, 3166, 29918, 29764, 537, 29918, 5344, 29898, 29764, 537, 29918, 5344, 29892, 525, 17875, 1495, 13, 1678, 4629, 29918, 7076, 29918, 7979, 7584, 29918, 1195, 353, 1831, 29918, 3166, 29918, 29764, 537, 29918, 5344, 29898, 29764, 537, 29918, 5344, 29892, 525, 25120, 7584, 1375, 1495, 13, 1678, 4629, 29918, 7076, 29918, 7979, 7584, 29918, 3317, 353, 1831, 29918, 3166, 29918, 29764, 537, 29918, 5344, 29898, 29764, 537, 29918, 5344, 29892, 525, 25120, 7584, 4236, 1495, 13, 1678, 9049, 5085, 353, 11117, 695, 504, 3241, 29918, 5696, 2396, 525, 29968, 1004, 550, 742, 525, 9877, 29918, 695, 504, 414, 2396, 29871, 29896, 29900, 29913, 13, 1678, 4629, 29918, 7076, 29918, 29968, 1004, 550, 353, 1831, 29918, 3166, 29918, 29764, 537, 29918, 5344, 29898, 29764, 537, 29918, 5344, 29892, 525, 6821, 504, 3241, 742, 3579, 19290, 29897, 13, 1678, 9049, 5085, 353, 11117, 695, 504, 3241, 29918, 5696, 2396, 525, 29903, 1103, 1705, 6821, 504, 3241, 742, 525, 9877, 29918, 695, 504, 414, 2396, 29871, 29896, 29900, 29913, 13, 1678, 4629, 29918, 7076, 29918, 29903, 1103, 1705, 353, 1831, 29918, 3166, 29918, 29764, 537, 29918, 5344, 29898, 29764, 537, 29918, 5344, 29892, 525, 6821, 504, 3241, 742, 3579, 19290, 29897, 13, 13, 1678, 736, 4629, 29918, 7076, 29918, 7979, 7584, 29918, 8172, 29892, 4629, 29918, 7076, 29918, 7979, 7584, 29918, 1195, 29892, 4629, 29918, 7076, 29918, 7979, 7584, 29918, 3317, 29892, 4629, 29918, 7076, 29918, 29968, 1004, 550, 29892, 4629, 29918, 7076, 29918, 29903, 1103, 1705, 13, 13, 13, 29937, 1158, 29918, 3207, 29918, 8977, 353, 426, 13, 29937, 268, 525, 25120, 7584, 1375, 2396, 1678, 11117, 5696, 2396, 525, 25120, 7584, 1375, 742, 525, 3601, 29918, 5344, 2396, 29501, 29918, 5344, 29892, 525, 5085, 2396, 426, 11656, 13, 29937, 268, 525, 25120, 7584, 4236, 2396, 1678, 11117, 5696, 2396, 525, 25120, 7584, 4236, 742, 525, 3601, 29918, 5344, 2396, 29501, 29918, 5344, 29892, 525, 5085, 2396, 426, 11656, 13, 29937, 268, 525, 6821, 504, 3241, 413, 1004, 550, 413, 29896, 29900, 2989, 2396, 418, 11117, 5696, 2396, 525, 6821, 504, 3241, 742, 525, 3601, 29918, 5344, 2396, 29501, 29918, 5344, 29892, 525, 5085, 2396, 11117, 695, 504, 3241, 29918, 5696, 2396, 525, 29968, 1004, 550, 742, 525, 9877, 29918, 695, 504, 414, 2396, 29871, 29955, 11656, 13, 29937, 268, 525, 6821, 504, 3241, 23161, 413, 29896, 29900, 2396, 1678, 11117, 5696, 2396, 525, 6821, 504, 3241, 742, 525, 3601, 29918, 5344, 2396, 29501, 29918, 5344, 29892, 525, 5085, 2396, 11117, 695, 504, 3241, 29918, 5696, 2396, 525, 29903, 1103, 1705, 6821, 504, 3241, 742, 525, 9877, 29918, 695, 504, 414, 2396, 29871, 29955, 12499, 13, 29937, 13, 29937, 363, 286, 29892, 8636, 297, 1158, 29918, 3207, 29918, 8977, 29889, 7076, 7295, 13, 29937, 268, 4629, 29918, 7076, 353, 1831, 29918, 3166, 29918, 29764, 537, 29918, 5344, 29898, 7529, 1839, 3601, 29918, 5344, 7464, 8636, 1839, 5696, 7464, 3579, 7529, 1839, 5085, 11287, 13, 29937, 268, 1596, 28909, 29873, 8875, 518, 29928, 12413, 29962, 4286, 4830, 29898, 29885, 876, 13, 29937, 268, 411, 1722, 877, 24713, 29918, 8391, 29918, 3712, 17259, 29918, 374, 412, 29918, 3780, 29918, 2084, 29880, 575, 29918, 29896, 29900, 29900, 29895, 648, 1836, 3126, 4286, 4830, 877, 29918, 4286, 7122, 29898, 29885, 29889, 13609, 2141, 21652, 877, 580, 2824, 5451, 877, 525, 876, 511, 525, 29893, 1495, 408, 285, 29901, 13, 29937, 308, 4390, 29889, 15070, 29898, 8391, 29918, 7076, 29892, 285, 29897, 13, 29937, 13, 29937, 408, 1983, 29918, 546, 29918, 5696, 353, 9657, 580, 13, 29937, 363, 286, 29892, 8636, 297, 1158, 29918, 3207, 29918, 8977, 29889, 7076, 7295, 13, 29937, 268, 411, 1722, 877, 24713, 29918, 8391, 29918, 3712, 17259, 29918, 374, 412, 29918, 3780, 29918, 2084, 29880, 575, 29918, 29896, 29900, 29900, 29895, 648, 1836, 3126, 4286, 4830, 877, 29918, 4286, 7122, 29898, 29885, 29889, 13609, 2141, 5451, 877, 525, 876, 511, 525, 29878, 1495, 408, 285, 29901, 13, 29937, 308, 4629, 29918, 7076, 353, 4390, 29889, 1359, 29898, 29888, 29897, 13, 29937, 268, 408, 1983, 29918, 546, 29918, 5696, 29961, 29885, 29962, 353, 4629, 29918, 7076, 13, 29937, 268, 1596, 28909, 29873, 8875, 518, 29928, 12413, 29962, 4286, 4830, 29898, 29885, 876, 13, 29937, 411, 1722, 29898, 8618, 29990, 7833, 11937, 29918, 29943, 5813, 29892, 525, 29893, 1495, 408, 285, 29901, 13, 29937, 268, 4390, 29889, 15070, 29898, 294, 1983, 29918, 546, 29918, 5696, 29892, 285, 29897, 13, 13, 13, 2 ]
example_runtime_metrics.py
joannak-vmware/wavefront-pyformance
0
88516
<reponame>joannak-vmware/wavefront-pyformance<gh_stars>0 #! /usr/bin/env python3 """Python Runtime Metric Collection Example.""" import argparse import time from wavefront_pyformance import tagged_registry from wavefront_pyformance import wavefront_reporter def report_metrics(host, server='', token=''): """Runtime Metric Reporting Function Example.""" reg = tagged_registry.TaggedRegistry() wf_proxy_reporter = wavefront_reporter.WavefrontProxyReporter( host=host, port=2878, distribution_port=2878, registry=reg, source='runtime-metric-test', tags={'global_tag1': 'val1', 'global_tag2': 'val2'}, prefix='python.proxy.', enable_runtime_metrics=True).report_minute_distribution() wf_direct_reporter = wavefront_reporter.WavefrontDirectReporter( server=server, token=token, registry=reg, source='runtime-metric-test', tags={'global_tag1': 'val1', 'global_tag2': 'val2'}, prefix='python.direct.', enable_runtime_metrics=True).report_minute_distribution() wf_proxy_reporter.report_now() wf_proxy_reporter.stop() wf_direct_reporter.report_now() wf_direct_reporter.stop() if __name__ == '__main__': # python example_runtime_metrics.py proxy_host server_url server_token arg = argparse.ArgumentParser() arg.add_argument('host', help='Wavefront proxy host name.') arg.add_argument('server', help='Wavefront server for direct ingestion.') arg.add_argument('token', help='Wavefront API token.') ARGS = arg.parse_args() while True: report_metrics(ARGS.host, ARGS.server, ARGS.token) time.sleep(5)
[ 1, 529, 276, 1112, 420, 29958, 2212, 812, 557, 29899, 6925, 2519, 29914, 27766, 8862, 29899, 2272, 13390, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 29991, 847, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 15945, 29908, 11980, 24875, 4737, 2200, 14348, 8741, 1213, 15945, 13, 13, 13, 5215, 1852, 5510, 13, 5215, 931, 13, 13, 13, 3166, 10742, 8862, 29918, 2272, 13390, 1053, 4055, 3192, 29918, 1727, 6020, 13, 3166, 10742, 8862, 29918, 2272, 13390, 1053, 10742, 8862, 29918, 276, 18505, 13, 13, 13, 1753, 3461, 29918, 2527, 10817, 29898, 3069, 29892, 1923, 2433, 742, 5993, 2433, 29374, 13, 1678, 9995, 7944, 4737, 2200, 13969, 292, 6680, 8741, 1213, 15945, 13, 1678, 1072, 353, 4055, 3192, 29918, 1727, 6020, 29889, 8176, 3192, 22579, 580, 13, 13, 1678, 281, 29888, 29918, 14701, 29918, 276, 18505, 353, 10742, 8862, 29918, 276, 18505, 29889, 29956, 1351, 8862, 14048, 5612, 9555, 29898, 13, 4706, 3495, 29922, 3069, 29892, 2011, 29922, 29906, 29947, 29955, 29947, 29892, 4978, 29918, 637, 29922, 29906, 29947, 29955, 29947, 29892, 21235, 29922, 1727, 29892, 13, 4706, 2752, 2433, 15634, 29899, 16414, 29899, 1688, 742, 13, 4706, 8282, 3790, 29915, 10945, 29918, 4039, 29896, 2396, 525, 791, 29896, 742, 525, 10945, 29918, 4039, 29906, 2396, 525, 791, 29906, 16675, 13, 4706, 10944, 2433, 4691, 29889, 14701, 29889, 742, 13, 4706, 9025, 29918, 15634, 29918, 2527, 10817, 29922, 5574, 467, 12276, 29918, 1195, 1082, 29918, 27691, 580, 13, 1678, 281, 29888, 29918, 11851, 29918, 276, 18505, 353, 10742, 8862, 29918, 276, 18505, 29889, 29956, 1351, 8862, 17392, 5612, 9555, 29898, 13, 4706, 1923, 29922, 2974, 29892, 5993, 29922, 6979, 29892, 21235, 29922, 1727, 29892, 13, 4706, 2752, 2433, 15634, 29899, 16414, 29899, 1688, 742, 13, 4706, 8282, 3790, 29915, 10945, 29918, 4039, 29896, 2396, 525, 791, 29896, 742, 525, 10945, 29918, 4039, 29906, 2396, 525, 791, 29906, 16675, 13, 4706, 10944, 2433, 4691, 29889, 11851, 29889, 742, 13, 4706, 9025, 29918, 15634, 29918, 2527, 10817, 29922, 5574, 467, 12276, 29918, 1195, 1082, 29918, 27691, 580, 13, 13, 1678, 281, 29888, 29918, 14701, 29918, 276, 18505, 29889, 12276, 29918, 3707, 580, 13, 1678, 281, 29888, 29918, 14701, 29918, 276, 18505, 29889, 9847, 580, 13, 1678, 281, 29888, 29918, 11851, 29918, 276, 18505, 29889, 12276, 29918, 3707, 580, 13, 1678, 281, 29888, 29918, 11851, 29918, 276, 18505, 29889, 9847, 580, 13, 13, 13, 361, 4770, 978, 1649, 1275, 525, 1649, 3396, 1649, 2396, 13, 1678, 396, 3017, 1342, 29918, 15634, 29918, 2527, 10817, 29889, 2272, 10166, 29918, 3069, 1923, 29918, 2271, 1923, 29918, 6979, 13, 1678, 1852, 353, 1852, 5510, 29889, 15730, 11726, 580, 13, 1678, 1852, 29889, 1202, 29918, 23516, 877, 3069, 742, 1371, 2433, 29956, 1351, 8862, 10166, 3495, 1024, 29889, 1495, 13, 1678, 1852, 29889, 1202, 29918, 23516, 877, 2974, 742, 1371, 2433, 29956, 1351, 8862, 1923, 363, 1513, 2348, 602, 29889, 1495, 13, 1678, 1852, 29889, 1202, 29918, 23516, 877, 6979, 742, 1371, 2433, 29956, 1351, 8862, 3450, 5993, 29889, 1495, 13, 1678, 9033, 10749, 353, 1852, 29889, 5510, 29918, 5085, 580, 13, 1678, 1550, 5852, 29901, 13, 4706, 3461, 29918, 2527, 10817, 29898, 1718, 10749, 29889, 3069, 29892, 9033, 10749, 29889, 2974, 29892, 9033, 10749, 29889, 6979, 29897, 13, 4706, 931, 29889, 17059, 29898, 29945, 29897, 13, 2 ]
AppEquipos/views.py
angel1194/Documentacion
0
108606
from __future__ import unicode_literals from django.shortcuts import render, HttpResponse, redirect, get_object_or_404 from .models import Post,PostMarcas,Images # Create your views here. from django.forms import modelformset_factory from django.core.exceptions import ObjectDoesNotExist from django.urls import reverse from django.db.models import Q def generales(request): query = request.GET.get('q') if query: post= Post.objects.filter(modelo__icontains = query) else: post= Post.objects.all() return render(request,"index.html",{'post':post,"query":query}) def acer(request): post=None error=None try: post = Post.objects.filter( marca=PostMarcas.objects.get(title="ACER") ) except ObjectDoesNotExist as e: error=e return render(request,"marcas/acer.html",{"post":post,"error":error}) def apple(request): post=None error=None try: post = Post.objects.filter( marca=PostMarcas.objects.get(title="APPLE") ) except ObjectDoesNotExist as e: error=e return render(request,"marcas/apple.html",{"post":post,"error":error}) def asus(request): error=None post=None try: post = Post.objects.filter( marca=PostMarcas.objects.get(title="ASUS") ) except ObjectDoesNotExist as e: error=e return render(request,"marcas/asus.html",{"post":post,"error":error}) def compaq(request): error=None post = Post.objects.filter( marca=PostMarcas.objects.get(title="COMPAQ") ) return render(request,"marcas/compaq.html",{"post":post}) def dell(request): error=None post=None try: post = Post.objects.filter( marca=PostMarcas.objects.get(title="DELL") ) except ObjectDoesNotExist as e: error=e return render(request,"marcas/dell.html",{"post":post,"error":error}) def gateway(request): post=None error=None try: post = Post.objects.filter( marca=PostMarcas.objects.get(title="GATEWAY") ) except ObjectDoesNotExist as e: error=e return render(request,"marcas/gateway.html",{"post":post,"error":error}) def hp(request): post=None error=None try: post = Post.objects.filter( marca=PostMarcas.objects.get(title="HP") ) except ObjectDoesNotExist as e: error=e return render(request,"marcas/hp.html",{"post":post,"error":error}) def huawei(request): error=None post=None try: post = Post.objects.filter( marca=PostMarcas.objects.get(title="HUAWEI") ) except ObjectDoesNotExist as e: error=e return render(request,"marcas/huawei.html",{"post":post,"error":error}) def lenovo(request): error=None post=None try: post = Post.objects.filter( marca=PostMarcas.objects.get(title="LENOVO") ) except ObjectDoesNotExist as e: error=e return render(request,"marcas/lenovo.html",{"post":post,"error":error}) def msi(request): post=None error=None try: post = Post.objects.filter( marca=PostMarcas.objects.get(title="MSI") ) except ObjectDoesNotExist as e: error=e return render(request,"marcas/msi.html",{"post":post,"error":error}) def samsung(request): post=None error=None try: post = Post.objects.filter( marca=PostMarcas.objects.get(title="SAMSUNG") ) except ObjectDoesNotExist as e: error=e return render(request,"marcas/samsung.html",{"post":post,"error":error}) def sony(request): post=None error=None try: post = Post.objects.filter( marca=PostMarcas.objects.get(title="SONY") ) except ObjectDoesNotExist as e: error=e return render(request,"marcas/sony.html",{"post":post,"error":error}) def toshiba(request): post=None error=None try: post = Post.objects.filter( marca=PostMarcas.objects.get(title="TOSHIBA") ) except ObjectDoesNotExist as e: error=e return render(request,"marcas/toshiba.html",{"post":post,"error":error}) def detalles(request,id): detail= Post.objects.get(id=id) return render(request,"detalles.html",{'detail':detail}) def documentacion(request): return render(request,"blog/documentacion.html")
[ 1, 515, 4770, 29888, 9130, 1649, 1053, 29104, 29918, 20889, 1338, 30004, 13, 3166, 9557, 29889, 12759, 7582, 29879, 1053, 4050, 29892, 9056, 5103, 29892, 6684, 29892, 679, 29918, 3318, 29918, 272, 29918, 29946, 29900, 29946, 30004, 13, 3166, 869, 9794, 1053, 4918, 29892, 6747, 29924, 5666, 294, 29892, 20163, 30004, 13, 29937, 6204, 596, 8386, 1244, 22993, 13, 3166, 9557, 29889, 9514, 1053, 1904, 689, 842, 29918, 14399, 30004, 13, 3166, 9557, 29889, 3221, 29889, 11739, 29879, 1053, 4669, 25125, 3664, 1252, 391, 30004, 13, 3166, 9557, 29889, 26045, 1053, 11837, 30004, 13, 3166, 9557, 29889, 2585, 29889, 9794, 1053, 660, 30004, 13, 30004, 13, 1753, 1176, 2122, 29898, 3827, 1125, 30004, 13, 1678, 2346, 353, 2009, 29889, 7194, 29889, 657, 877, 29939, 1495, 30004, 13, 1678, 565, 2346, 29901, 30004, 13, 4706, 1400, 29922, 4918, 29889, 12650, 29889, 4572, 29898, 4299, 29877, 1649, 293, 609, 2708, 353, 2346, 8443, 13, 1678, 1683, 29901, 30004, 13, 4706, 1400, 29922, 4918, 29889, 12650, 29889, 497, 26471, 13, 1678, 736, 4050, 29898, 3827, 1699, 2248, 29889, 1420, 613, 10998, 2490, 2396, 2490, 1699, 1972, 1115, 1972, 1800, 30004, 13, 30004, 13, 1753, 1274, 261, 29898, 3827, 1125, 30004, 13, 1678, 1400, 29922, 8516, 30004, 13, 1678, 1059, 29922, 8516, 30004, 13, 1678, 1018, 29901, 30004, 13, 4706, 1400, 353, 4918, 29889, 12650, 29889, 4572, 29898, 30004, 13, 4706, 17363, 29922, 6747, 29924, 5666, 294, 29889, 12650, 29889, 657, 29898, 3257, 543, 2477, 1001, 1159, 30004, 13, 4706, 1723, 30004, 13, 1678, 5174, 4669, 25125, 3664, 1252, 391, 408, 321, 29901, 30004, 13, 4706, 1059, 29922, 29872, 30004, 13, 1678, 736, 4050, 29898, 3827, 1699, 3034, 9398, 29914, 562, 261, 29889, 1420, 613, 6377, 2490, 1115, 2490, 1699, 2704, 1115, 2704, 1800, 30004, 13, 1753, 26163, 29898, 3827, 1125, 30004, 13, 1678, 1400, 29922, 8516, 30004, 13, 1678, 1059, 29922, 8516, 30004, 13, 1678, 1018, 29901, 30004, 13, 4706, 1400, 353, 4918, 29889, 12650, 29889, 4572, 29898, 30004, 13, 4706, 17363, 29922, 6747, 29924, 5666, 294, 29889, 12650, 29889, 657, 29898, 3257, 543, 20576, 1307, 1159, 30004, 13, 4706, 1723, 30004, 13, 1678, 5174, 4669, 25125, 3664, 1252, 391, 408, 321, 29901, 30004, 13, 4706, 1059, 29922, 29872, 30004, 13, 1678, 736, 4050, 29898, 3827, 1699, 3034, 9398, 29914, 11548, 29889, 1420, 613, 6377, 2490, 1115, 2490, 1699, 2704, 1115, 2704, 1800, 30004, 13, 1753, 408, 375, 29898, 3827, 1125, 30004, 13, 1678, 1059, 29922, 8516, 30004, 13, 1678, 1400, 29922, 8516, 30004, 13, 1678, 1018, 29901, 30004, 13, 4706, 1400, 353, 4918, 29889, 12650, 29889, 4572, 29898, 30004, 13, 4706, 17363, 29922, 6747, 29924, 5666, 294, 29889, 12650, 29889, 657, 29898, 3257, 543, 3289, 3308, 1159, 30004, 13, 4706, 1723, 30004, 13, 1678, 5174, 4669, 25125, 3664, 1252, 391, 408, 321, 29901, 30004, 13, 4706, 1059, 29922, 29872, 30004, 13, 1678, 736, 4050, 29898, 3827, 1699, 3034, 9398, 29914, 294, 375, 29889, 1420, 613, 6377, 2490, 1115, 2490, 1699, 2704, 1115, 2704, 1800, 30004, 13, 1753, 752, 29874, 29939, 29898, 3827, 1125, 30004, 13, 1678, 1059, 29922, 8516, 30004, 13, 1678, 1400, 353, 4918, 29889, 12650, 29889, 4572, 29898, 30004, 13, 1678, 17363, 29922, 6747, 29924, 5666, 294, 29889, 12650, 29889, 657, 29898, 3257, 543, 21514, 29909, 29984, 1159, 30004, 13, 1678, 1723, 30004, 13, 1678, 736, 4050, 29898, 3827, 1699, 3034, 9398, 29914, 2388, 29874, 29939, 29889, 1420, 613, 6377, 2490, 1115, 2490, 1800, 30004, 13, 1753, 3572, 29898, 3827, 1125, 30004, 13, 1678, 1059, 29922, 8516, 30004, 13, 1678, 1400, 29922, 8516, 30004, 13, 1678, 1018, 29901, 30004, 13, 4706, 1400, 353, 4918, 29889, 12650, 29889, 4572, 29898, 30004, 13, 4706, 17363, 29922, 6747, 29924, 5666, 294, 29889, 12650, 29889, 657, 29898, 3257, 543, 2287, 2208, 1159, 30004, 13, 4706, 1723, 30004, 13, 1678, 5174, 4669, 25125, 3664, 1252, 391, 408, 321, 29901, 30004, 13, 4706, 1059, 29922, 29872, 30004, 13, 1678, 736, 4050, 29898, 3827, 1699, 3034, 9398, 29914, 29881, 514, 29889, 1420, 613, 6377, 2490, 1115, 2490, 1699, 2704, 1115, 2704, 1800, 30004, 13, 1753, 28646, 29898, 3827, 1125, 30004, 13, 1678, 1400, 29922, 8516, 30004, 13, 1678, 1059, 29922, 8516, 30004, 13, 1678, 1018, 29901, 30004, 13, 4706, 1400, 353, 4918, 29889, 12650, 29889, 4572, 29898, 30004, 13, 4706, 17363, 29922, 6747, 29924, 5666, 294, 29889, 12650, 29889, 657, 29898, 3257, 543, 29954, 3040, 12982, 29979, 1159, 30004, 13, 4706, 1723, 30004, 13, 1678, 5174, 4669, 25125, 3664, 1252, 391, 408, 321, 29901, 30004, 13, 4706, 1059, 29922, 29872, 30004, 13, 30004, 13, 1678, 736, 4050, 29898, 3827, 1699, 3034, 9398, 29914, 17062, 1582, 29889, 1420, 613, 6377, 2490, 1115, 2490, 1699, 2704, 1115, 2704, 1800, 30004, 13, 1753, 298, 29886, 29898, 3827, 1125, 30004, 13, 1678, 1400, 29922, 8516, 30004, 13, 1678, 1059, 29922, 8516, 30004, 13, 1678, 1018, 29901, 30004, 13, 4706, 1400, 353, 4918, 29889, 12650, 29889, 4572, 29898, 30004, 13, 4706, 17363, 29922, 6747, 29924, 5666, 294, 29889, 12650, 29889, 657, 29898, 3257, 543, 3954, 1159, 30004, 13, 4706, 1723, 30004, 13, 1678, 5174, 4669, 25125, 3664, 1252, 391, 408, 321, 29901, 30004, 13, 4706, 1059, 29922, 29872, 30004, 13, 1678, 736, 4050, 29898, 3827, 1699, 3034, 9398, 29914, 28887, 29889, 1420, 613, 6377, 2490, 1115, 2490, 1699, 2704, 1115, 2704, 1800, 30004, 13, 1753, 298, 3357, 26599, 29898, 3827, 1125, 30004, 13, 1678, 1059, 29922, 8516, 30004, 13, 1678, 1400, 29922, 8516, 30004, 13, 1678, 1018, 29901, 30004, 13, 4706, 1400, 353, 4918, 29889, 12650, 29889, 4572, 29898, 30004, 13, 4706, 17363, 29922, 6747, 29924, 5666, 294, 29889, 12650, 29889, 657, 29898, 3257, 543, 29950, 29965, 29909, 8851, 29902, 1159, 30004, 13, 4706, 1723, 30004, 13, 1678, 5174, 4669, 25125, 3664, 1252, 391, 408, 321, 29901, 30004, 13, 4706, 1059, 29922, 29872, 30004, 13, 30004, 13, 1678, 736, 4050, 29898, 3827, 1699, 3034, 9398, 29914, 29882, 3357, 26599, 29889, 1420, 613, 6377, 2490, 1115, 2490, 1699, 2704, 1115, 2704, 1800, 30004, 13, 1753, 7431, 6962, 29898, 3827, 1125, 30004, 13, 1678, 1059, 29922, 8516, 30004, 13, 1678, 1400, 29922, 8516, 30004, 13, 1678, 1018, 29901, 30004, 13, 4706, 1400, 353, 4918, 29889, 12650, 29889, 4572, 29898, 30004, 13, 4706, 17363, 29922, 6747, 29924, 5666, 294, 29889, 12650, 29889, 657, 29898, 3257, 543, 1307, 6632, 24898, 1159, 30004, 13, 4706, 1723, 30004, 13, 1678, 5174, 4669, 25125, 3664, 1252, 391, 408, 321, 29901, 30004, 13, 4706, 1059, 29922, 29872, 30004, 13, 1678, 736, 4050, 29898, 3827, 1699, 3034, 9398, 29914, 2435, 6962, 29889, 1420, 613, 6377, 2490, 1115, 2490, 1699, 2704, 1115, 2704, 1800, 30004, 13, 1753, 286, 1039, 29898, 3827, 1125, 30004, 13, 1678, 1400, 29922, 8516, 30004, 13, 1678, 1059, 29922, 8516, 30004, 13, 1678, 1018, 29901, 30004, 13, 4706, 1400, 353, 4918, 29889, 12650, 29889, 4572, 29898, 30004, 13, 4706, 17363, 29922, 6747, 29924, 5666, 294, 29889, 12650, 29889, 657, 29898, 3257, 543, 4345, 29902, 1159, 30004, 13, 4706, 1723, 30004, 13, 1678, 5174, 4669, 25125, 3664, 1252, 391, 408, 321, 29901, 30004, 13, 4706, 1059, 29922, 29872, 30004, 13, 30004, 13, 1678, 736, 4050, 29898, 3827, 1699, 3034, 9398, 29914, 29885, 1039, 29889, 1420, 613, 6377, 2490, 1115, 2490, 1699, 2704, 1115, 2704, 1800, 30004, 13, 1753, 269, 28935, 29898, 3827, 1125, 30004, 13, 1678, 1400, 29922, 8516, 30004, 13, 1678, 1059, 29922, 8516, 30004, 13, 1678, 1018, 29901, 30004, 13, 4706, 1400, 353, 4918, 29889, 12650, 29889, 4572, 29898, 30004, 13, 4706, 17363, 29922, 6747, 29924, 5666, 294, 29889, 12650, 29889, 657, 29898, 3257, 543, 8132, 4345, 3904, 29954, 1159, 30004, 13, 4706, 1723, 30004, 13, 1678, 5174, 4669, 25125, 3664, 1252, 391, 408, 321, 29901, 30004, 13, 4706, 1059, 29922, 29872, 30004, 13, 1678, 736, 4050, 29898, 3827, 1699, 3034, 9398, 29914, 29879, 28935, 29889, 1420, 613, 6377, 2490, 1115, 2490, 1699, 2704, 1115, 2704, 1800, 30004, 13, 1753, 1487, 29891, 29898, 3827, 1125, 30004, 13, 1678, 1400, 29922, 8516, 30004, 13, 1678, 1059, 29922, 8516, 30004, 13, 1678, 1018, 29901, 30004, 13, 4706, 1400, 353, 4918, 29889, 12650, 29889, 4572, 29898, 30004, 13, 4706, 17363, 29922, 6747, 29924, 5666, 294, 29889, 12650, 29889, 657, 29898, 3257, 543, 3094, 29979, 1159, 30004, 13, 4706, 1723, 30004, 13, 1678, 5174, 4669, 25125, 3664, 1252, 391, 408, 321, 29901, 30004, 13, 4706, 1059, 29922, 29872, 30004, 13, 1678, 736, 4050, 29898, 3827, 1699, 3034, 9398, 29914, 1100, 29891, 29889, 1420, 613, 6377, 2490, 1115, 2490, 1699, 2704, 1115, 2704, 1800, 30004, 13, 1753, 304, 845, 16912, 29898, 3827, 1125, 30004, 13, 1678, 1400, 29922, 8516, 30004, 13, 1678, 1059, 29922, 8516, 30004, 13, 1678, 1018, 29901, 30004, 13, 4706, 1400, 353, 4918, 29889, 12650, 29889, 4572, 29898, 30004, 13, 4706, 17363, 29922, 6747, 29924, 5666, 294, 29889, 12650, 29889, 657, 29898, 3257, 543, 29911, 3267, 17628, 5688, 1159, 30004, 13, 4706, 1723, 30004, 13, 1678, 5174, 4669, 25125, 3664, 1252, 391, 408, 321, 29901, 30004, 13, 4706, 1059, 29922, 29872, 30004, 13, 1678, 736, 4050, 29898, 3827, 1699, 3034, 9398, 29914, 29873, 359, 6335, 29874, 29889, 1420, 613, 6377, 2490, 1115, 2490, 1699, 2704, 1115, 2704, 1800, 30004, 13, 30004, 13, 1753, 1439, 26493, 29898, 3827, 29892, 333, 1125, 30004, 13, 1678, 9493, 29922, 4918, 29889, 12650, 29889, 657, 29898, 333, 29922, 333, 8443, 13, 1678, 736, 4050, 29898, 3827, 1699, 4801, 26493, 29889, 1420, 613, 10998, 16432, 2396, 16432, 1800, 30004, 13, 30004, 13, 1753, 1842, 16337, 29898, 3827, 1125, 30004, 13, 1678, 736, 4050, 29898, 3827, 1699, 7312, 29914, 3225, 16337, 29889, 1420, 1159, 30004, 13, 2 ]
app/ml/artificial_user.py
sp0x/orion
0
114967
class World: def __init__(self): pass def get_state(self): pass def execute_action(self,a): pass class GameTree: class GameNode: def __init__(self, state, action, par): self.state = state self.action = action self.visited = 0.0 self.par = par # key = the goal aka desired result, val = the times that goal was reached through this node self.goal_outcomes = dict() # key = state of the system in which this node can be accessed, val = list<GameNode> self.children = dict() def probability(self): """The likelihood of ending up in this state""" return self.visited / self.par.visited def probability_for(self, goal): """The likelihood that the given GameNode will lead the 'player' to their final goal""" return self.goal_outcomes.get(goal,0.0) / self.visited def get_utility(self, goal, policy_params): """Returns the utility that the 'player' will receive if they pick this action""" pass def apply_action(self, world): self.visited += 1.0 world.execute_action(self.action) def update(self, goal, win=0): """ Updates the number of times that this node led to the desired goal :param goal: the goal that was supposed to be reached :param win: 1 if goal was reached 0 otherwise :return: """ self.goal_outcomes[goal] = self.goal_outcomes.get(goal) + win self.par.update(goal, win) def prune(self): pass def get_next_move(self, state, goal, policy_params): """ Returns the best action for a certain goal given the current state of the world :param state: the current state of the world :param goal: the desired final outcome :param policy_params: additional data regarding the choice of a next action :return: GameNode with highest utility """ if goal in self.children: return self.children.get(goal)[0] best = None max_u = 0 nodes = self.children.get(state) for n in nodes: u = n.get_utility(goal, policy_params) if u > max_u: max_u = u best = n return best def __init__(self, policy): self.root = None self.cursor = None self.policy = policy def get_next_action(self, state, goal): if not self.cursor: self.cursor = self.root new_c = self.cursor.get_next_move(state, goal,self.policy) self.cursor = new_c return new_c class AIUser: def __init__(self, world): """ Creates a new AI user :param world: World instance wrapper for the environment """ self.world = world self.game_tree = GameTree(None) def learn(self): pass def execute(self, goal): state = self.world.get_state() while state != goal: a = self.game_tree.get_next_action(state, goal) a.apply_action(self.world) state = self.world.get_state()
[ 1, 6756, 13, 30004, 13, 1990, 2787, 29901, 30004, 13, 1678, 822, 4770, 2344, 12035, 1311, 1125, 30004, 13, 4706, 1209, 30004, 13, 30004, 13, 1678, 822, 679, 29918, 3859, 29898, 1311, 1125, 30004, 13, 4706, 1209, 30004, 13, 30004, 13, 1678, 822, 6222, 29918, 2467, 29898, 1311, 29892, 29874, 1125, 30004, 13, 4706, 1209, 30004, 13, 30004, 13, 1990, 8448, 9643, 29901, 30004, 13, 1678, 770, 8448, 4247, 29901, 30004, 13, 4706, 822, 4770, 2344, 12035, 1311, 29892, 2106, 29892, 3158, 29892, 610, 1125, 30004, 13, 9651, 1583, 29889, 3859, 353, 2106, 30004, 13, 9651, 1583, 29889, 2467, 353, 3158, 30004, 13, 9651, 1583, 29889, 1730, 1573, 353, 29871, 29900, 29889, 29900, 30004, 13, 9651, 1583, 29889, 862, 353, 610, 30004, 13, 9651, 396, 1820, 353, 278, 7306, 263, 1335, 7429, 1121, 29892, 659, 353, 278, 3064, 393, 7306, 471, 7450, 1549, 445, 2943, 30004, 13, 9651, 1583, 29889, 28111, 29918, 449, 26807, 353, 9657, 26471, 13, 9651, 396, 1820, 353, 2106, 310, 278, 1788, 297, 607, 445, 2943, 508, 367, 20592, 29892, 659, 353, 1051, 29966, 14199, 4247, 3238, 13, 9651, 1583, 29889, 11991, 353, 9657, 26471, 13, 30004, 13, 4706, 822, 6976, 29898, 1311, 1125, 30004, 13, 9651, 9995, 1576, 4188, 22342, 310, 17140, 701, 297, 445, 2106, 15945, 19451, 13, 9651, 736, 1583, 29889, 1730, 1573, 847, 1583, 29889, 862, 29889, 1730, 1573, 30004, 13, 30004, 13, 4706, 822, 6976, 29918, 1454, 29898, 1311, 29892, 7306, 1125, 30004, 13, 9651, 9995, 1576, 4188, 22342, 393, 278, 2183, 8448, 4247, 674, 3275, 278, 525, 9106, 29915, 304, 1009, 2186, 7306, 15945, 19451, 13, 9651, 736, 1583, 29889, 28111, 29918, 449, 26807, 29889, 657, 29898, 28111, 29892, 29900, 29889, 29900, 29897, 847, 1583, 29889, 1730, 1573, 30004, 13, 30004, 13, 4706, 822, 679, 29918, 329, 1793, 29898, 1311, 29892, 7306, 29892, 8898, 29918, 7529, 1125, 30004, 13, 9651, 9995, 11609, 29879, 278, 19725, 393, 278, 525, 9106, 29915, 674, 7150, 565, 896, 5839, 445, 3158, 15945, 19451, 13, 9651, 1209, 30004, 13, 30004, 13, 4706, 822, 3394, 29918, 2467, 29898, 1311, 29892, 3186, 1125, 30004, 13, 9651, 1583, 29889, 1730, 1573, 4619, 29871, 29896, 29889, 29900, 30004, 13, 9651, 3186, 29889, 7978, 29918, 2467, 29898, 1311, 29889, 2467, 8443, 13, 30004, 13, 4706, 822, 2767, 29898, 1311, 29892, 7306, 29892, 5401, 29922, 29900, 1125, 30004, 13, 9651, 9995, 30004, 13, 9651, 5020, 15190, 278, 1353, 310, 3064, 393, 445, 2943, 5331, 304, 278, 7429, 7306, 30004, 13, 9651, 584, 3207, 7306, 29901, 278, 7306, 393, 471, 7424, 304, 367, 7450, 30004, 13, 9651, 584, 3207, 5401, 29901, 29871, 29896, 565, 7306, 471, 7450, 29871, 29900, 6467, 30004, 13, 9651, 584, 2457, 29901, 6756, 13, 9651, 9995, 30004, 13, 9651, 1583, 29889, 28111, 29918, 449, 26807, 29961, 28111, 29962, 353, 1583, 29889, 28111, 29918, 449, 26807, 29889, 657, 29898, 28111, 29897, 718, 5401, 30004, 13, 9651, 1583, 29889, 862, 29889, 5504, 29898, 28111, 29892, 5401, 8443, 13, 30004, 13, 4706, 822, 544, 1540, 29898, 1311, 1125, 30004, 13, 9651, 1209, 30004, 13, 30004, 13, 4706, 822, 679, 29918, 4622, 29918, 11631, 29898, 1311, 29892, 2106, 29892, 7306, 29892, 8898, 29918, 7529, 1125, 30004, 13, 9651, 9995, 30004, 13, 9651, 16969, 278, 1900, 3158, 363, 263, 3058, 7306, 2183, 278, 1857, 2106, 310, 278, 3186, 30004, 13, 9651, 584, 3207, 2106, 29901, 278, 1857, 2106, 310, 278, 3186, 30004, 13, 9651, 584, 3207, 7306, 29901, 278, 7429, 2186, 21957, 30004, 13, 9651, 584, 3207, 8898, 29918, 7529, 29901, 5684, 848, 11211, 278, 7348, 310, 263, 2446, 3158, 30004, 13, 9651, 584, 2457, 29901, 8448, 4247, 411, 9939, 19725, 30004, 13, 9651, 9995, 30004, 13, 9651, 565, 7306, 297, 1583, 29889, 11991, 29901, 30004, 13, 18884, 736, 1583, 29889, 11991, 29889, 657, 29898, 28111, 9601, 29900, 29962, 30004, 13, 9651, 1900, 353, 6213, 30004, 13, 9651, 4236, 29918, 29884, 353, 29871, 29900, 30004, 13, 9651, 7573, 353, 1583, 29889, 11991, 29889, 657, 29898, 3859, 8443, 13, 9651, 363, 302, 297, 7573, 29901, 30004, 13, 18884, 318, 353, 302, 29889, 657, 29918, 329, 1793, 29898, 28111, 29892, 8898, 29918, 7529, 8443, 13, 18884, 565, 318, 1405, 4236, 29918, 29884, 29901, 30004, 13, 462, 1678, 4236, 29918, 29884, 353, 318, 30004, 13, 462, 1678, 1900, 353, 302, 30004, 13, 9651, 736, 1900, 30004, 13, 30004, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 8898, 1125, 30004, 13, 4706, 1583, 29889, 4632, 353, 6213, 30004, 13, 4706, 1583, 29889, 18127, 353, 6213, 30004, 13, 4706, 1583, 29889, 22197, 353, 8898, 30004, 13, 30004, 13, 1678, 822, 679, 29918, 4622, 29918, 2467, 29898, 1311, 29892, 2106, 29892, 7306, 1125, 30004, 13, 4706, 565, 451, 1583, 29889, 18127, 29901, 30004, 13, 9651, 1583, 29889, 18127, 353, 1583, 29889, 4632, 30004, 13, 4706, 716, 29918, 29883, 353, 1583, 29889, 18127, 29889, 657, 29918, 4622, 29918, 11631, 29898, 3859, 29892, 7306, 29892, 1311, 29889, 22197, 8443, 13, 4706, 1583, 29889, 18127, 353, 716, 29918, 29883, 30004, 13, 4706, 736, 716, 29918, 29883, 30004, 13, 30004, 13, 30004, 13, 1990, 319, 29902, 2659, 29901, 30004, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 3186, 1125, 30004, 13, 4706, 9995, 30004, 13, 4706, 6760, 1078, 263, 716, 319, 29902, 1404, 30004, 13, 4706, 584, 3207, 3186, 29901, 2787, 2777, 14476, 363, 278, 5177, 29871, 6756, 13, 4706, 9995, 30004, 13, 4706, 1583, 29889, 11526, 353, 3186, 30004, 13, 4706, 1583, 29889, 11802, 29918, 8336, 353, 8448, 9643, 29898, 8516, 8443, 13, 30004, 13, 1678, 822, 5110, 29898, 1311, 1125, 30004, 13, 4706, 1209, 30004, 13, 30004, 13, 1678, 822, 6222, 29898, 1311, 29892, 7306, 1125, 30004, 13, 4706, 2106, 353, 1583, 29889, 11526, 29889, 657, 29918, 3859, 26471, 13, 4706, 1550, 2106, 2804, 7306, 29901, 30004, 13, 9651, 263, 353, 1583, 29889, 11802, 29918, 8336, 29889, 657, 29918, 4622, 29918, 2467, 29898, 3859, 29892, 7306, 8443, 13, 9651, 263, 29889, 7302, 29918, 2467, 29898, 1311, 29889, 11526, 8443, 13, 9651, 2106, 353, 1583, 29889, 11526, 29889, 657, 29918, 3859, 26471, 13, 2 ]
anomaly_detection_time_series/MatrixProfileAD.py
Vincent-Vercruyssen/absent_pattern_detection
4
166707
""" Matrix profile anomaly detection. Reference: <NAME>., <NAME>., <NAME>., <NAME>., <NAME>., <NAME>., <NAME>. (2016, December). Matrix profile I: all pairs similarity joins for time series: a unifying view that includes motifs, discords and shapelets. In Data Mining (ICDM), 2016 IEEE 16th International Conference on (pp. 1317-1322). IEEE. """ # Authors: <NAME>, 2018. import math import numpy as np import pandas as pd import scipy.signal as sps from tqdm import tqdm from .BaseDetector import BaseDetector # ------------- # CLASSES # ------------- class MatrixProfileAD(BaseDetector): """ Anomaly detection in time series using the matrix profile Parameters ---------- m : int (default=10) Window size. contamination : float (default=0.1) Estimate of the expected percentage of anomalies in the data. Comments -------- - This only works on time series data. """ def __init__(self, m=10, contamination=0.1, tol=1e-8, verbose=False): super(MatrixProfileAD, self).__init__() self.m = int(m) self.contamination = float(contamination) self.tol = float(tol) self.verbose = bool(verbose) def ab_join(self, T, split): """ Compute the ABjoin and BAjoin side-by-side, where `split` determines the splitting point. """ # algorithm options excZoneLen = int(np.round(self.m * 0.5)) radius = 1.1 dataLen = len(T) proLen = dataLen - self.m + 1 # change Nan and Inf to zero T = np.nan_to_num(T) # precompute the mean, standard deviation s = pd.Series(T) dataMu = s.rolling(self.m).mean().values[self.m-1:dataLen] dataSig = s.rolling(self.m).std().values[self.m-1:dataLen] matrixProfile = np.ones(proLen) * np.inf idxOrder = excZoneLen + np.arange(0, proLen, 1) idxOrder = idxOrder[np.random.permutation(len(idxOrder))] # construct the matrixprofile for i, idx in enumerate(idxOrder): # query query = T[idx:idx+self.m-1] # distance profile distProfile = self._diagonal_dist(T, idx, dataLen, self.m, proLen, dataMu, dataSig) distProfile = abs(distProfile) distProfile = np.sqrt(distProfile) # position magic pos1 = np.arange(idx, proLen, 1) pos2 = np.arange(0, proLen-idx+1, 1) # split magic distProfile = distProfile[np.where((pos2 <= split) & (pos1 > split))[0]] pos1Split = pos1[np.where((pos2 <= split) & (pos1 > split))[0]] pos2Split = pos2[np.where((pos2 <= split) & (pos1 > split))[0]] pos1 = pos1Split pos2 = pos2Split # update magic updatePos = np.where(matrixProfile[pos1] > distProfile)[0] matrixProfile[pos1[updatePos]] = distProfile[updatePos] updatePos = np.where(matrixProfile[pos2] > distProfile)[0] matrixProfile[pos2[updatePos]] = distProfile[updatePos] return matrixProfile def fit_predict(self, T): """ Fit the model to the time series T. :param T : np.array(), shape (n_samples) The time series data for which to compute the matrix profile. :returns y_score : np.array(), shape (n_samples) Anomaly score for the samples in T. :returns y_pred : np.array(), shape (n_samples) Returns -1 for inliers and +1 for anomalies/outliers. """ return self.fit(np.array([])).predict(T) def fit(self, T=np.array([])): """ Fit the model to the time series T. :param T : np.array(), shape (n_samples) The time series data for which to compute the matrix profile. :returns self : object """ self.T_train = T return self def predict(self, T=np.array([])): """ Compute the anomaly score + predict the label of each sample in T. :returns y_score : np.array(), shape (n_samples) Anomaly score for the samples in T. :returns y_pred : np.array(), shape (n_samples) Returns -1 for inliers and +1 for anomalies/outliers. """ # fuse T_train and T nt = len(T) nT = np.concatenate((self.T_train, T)) n = len(nT) # compute the matrix profile matrix_profile = self._compute_matrix_profile_stomp(nT, self.m) # transform to an anomaly score (1NN distance) # the largest distance = the largest anomaly # rescale between 0 and 1, this yields the anomaly score y_score = (matrix_profile - min(matrix_profile)) / (max(matrix_profile) - min(matrix_profile)) y_score = np.append(y_score, np.zeros(n-len(matrix_profile), dtype=float)) # prediction threshold + absolute predictions self.threshold = np.sort(y_score)[int(n * (1.0 - self.contamination))] y_pred = np.ones(n, dtype=float) y_pred[y_score < self.threshold] = -1 # cut y_pred and y_score to match length of T return y_score[-nt:], y_pred[-nt:] def _compute_matrix_profile_stomp(self, T, m): """ Compute the matrix profile and profile index for time series T using correct STOMP. :param T : np.array(), shape (n_samples) The time series data for which to compute the matrix profile. :param m : int Length of the query. :returns matrix_profile : np.array(), shape (n_samples) The matrix profile (distance) for the time series T. comments -------- - Includes a fix for straight line time series segments. """ n = len(T) # precompute the mean, standard deviation s = pd.Series(T) data_m = s.rolling(m).mean().values[m-1:n] data_s = s.rolling(m).std().values[m-1:n] # where the data is zero idxz = np.where(data_s < 1e-8)[0] data_s[idxz] = 0.0 idxn = np.where(data_s > 0.0)[0] zero_s = False if len(idxz) > 0: zero_s = True # precompute distance to straight line segment of 0s slD = np.zeros(n-m+1, dtype=float) if zero_s: for i in range(n-m+1): Tsegm = T[i:i+m] Tm = data_m[i] Ts = data_s[i] if Ts == 0.0: # data_s is effectively 0 slD[i] = 0.0 else: Tn = (Tsegm - Tm) / Ts slD[i] = np.sqrt(np.sum(Tn ** 2)) # compute the first dot product q = T[:m] QT = sps.convolve(T.copy(), q[::-1], 'valid', 'direct') QT_first = QT.copy() # compute the distance profile D = self._compute_fixed_distance_profile(T[:m], QT, n, m, data_m, data_s, data_m[0], data_s[0], slD.copy(), idxz, idxn, zero_s) # initialize matrix profile matrix_profile = D # in-order evaluation of the rest of the profile for i in tqdm(range(1, n-m+1, 1), disable=not(self.verbose)): # update the dot product QT[1:] = QT[:-1] - (T[:n-m] * T[i-1]) + (T[m:n] * T[i+m-1]) QT[0] = QT_first[i] # compute the distance profile: without function calls! if data_s[i] == 0.0: # query_s is effectively 0 D = slD.copy() elif zero_s: D[idxn] = np.sqrt(2 * (m - (QT[idxn] - m * data_m[idxn] * data_m[i]) / (data_s[idxn] * data_s[i]))) nq = (q - data_m[i]) / data_s[i] d = np.sqrt(np.sum(nq ** 2)) D[idxz] = d else: D = np.sqrt(2 * (m - (QT - m * data_m * data_m[i]) / (data_s * data_s[i]))) # update the matrix profile exclusion_range = (int(max(0, round(i-m/2))), int(min(round(i+m/2+1), n-m+1))) D[exclusion_range[0]:exclusion_range[1]] = np.inf ix = np.where(D < matrix_profile)[0] matrix_profile[ix] = D[ix] # matrix_profile = np.minimum(matrix_profile, D) return matrix_profile def _compute_fixed_distance_profile(self, q, QT, n, m, data_m, data_s, query_m, query_s, slD, idxz, idxn, zero_s): """ Compute the fixed distance profile """ D = np.zeros(n-m+1, dtype=float) if query_s == 0.0: # query_s is effectively 0 return slD if zero_s: D[idxn] = np.sqrt(2 * (m - (QT[idxn] - m * data_m[idxn] * query_m) / (data_s[idxn] * query_s))) nq = (q - query_m) / query_s d = np.sqrt(np.sum(nq ** 2)) D[idxz] = d else: D = np.sqrt(2 * (m - (QT - m * data_m * query_m) / (data_s * query_s))) return D def _compute_matrix_profile_stamp(self, T, m): """ Compute the matrix profile and profile index for time series T using STAMP. :param T : np.array(), shape (n_samples) The time series data for which to compute the matrix profile. :param m : int Length of the query. :returns matrix_profile : np.array(), shape (n_samples) The matrix profile (distance) for the time series T. :returns profile_index : np.array(), shape (n_samples) The matrix profile index accompanying the matrix profile. comments -------- - Uses the STAMP algorithm to compute the matrix profile. - Includes a fix for straight line time series segments. """ n = len(T) # initialize the empty profile and index matrix_profile = np.ones(n-m+1) * np.inf # precompute the mean, standard deviation s = pd.Series(T) data_m = s.rolling(m).mean().values[m-1:n] data_s = s.rolling(m).std().values[m-1:n] # where the data is zero idxz = np.where(data_s < 1e-8)[0] data_s[idxz] = 0.0 idxn = np.where(data_s > 0.0)[0] zero_s = False if len(idxz) > 0: zero_s = True # precompute distance to straight line segment of 0s # brute force distance computation (because the dot_product is zero!) # --> this is a structural issue with the MASS algorithm for fast distance computation slD = np.zeros(n-m+1, dtype=float) if zero_s: for i in range(n-m+1): Tsegm = T[i:i+m] Tm = data_m[i] Ts = data_s[i] if Ts == 0.0: # data_s is effectively 0 slD[i] = 0.0 else: Tn = (Tsegm - Tm) / Ts slD[i] = np.sqrt(np.sum(Tn ** 2)) # random search order for the outer loop indices = np.arange(0, n-m+1, 1) np.random.shuffle(indices) # compute the matrix profile if self.verbose: print('Iterations:', len(indices)) for i, idx in tqdm(enumerate(indices), disable=not(self.verbose)): # query for which to compute the distance profile query = T[idx:idx+m] # normalized distance profile (using MASS) D = self._compute_MASS(query, T, n, m, data_m, data_s, data_m[idx], data_s[idx], slD.copy()) # update the matrix profile (keeping minimum distances) # self-join is True! (we only look at constructing the matrix profile for a single time series) exclusion_range = (int(max(0, round(idx-m/2))), int(min(round(idx+m/2+1), n-m+1))) D[exclusion_range[0]:exclusion_range[1]] = np.inf ix = np.where(D < matrix_profile)[0] matrix_profile[ix] = D[ix] return matrix_profile def _compute_MASS(self, query, T, n, m, data_m, data_s, query_m, query_s, slD): """ Compute the distance profile using the MASS algorithm. :param query : np.array(), shape (self.m) Query segment for which to compute the distance profile. :param T : np.array(), shape (n_samples) The time series data for which to compute the matrix profile. :param n : int Length of time series T. :param m : int Length of the query. :param data_f : np.array, shape (n + m) FFT transform of T. :param data_m : np.array, shape (n - m + 1) Mean of every segment of length m of T. :param data_s : np.array, shape (n - m + 1) STD of every segment of length m of T. :param query_m : float Mean of the query segment. :param query_s : float Standard deviation of the query segment. :returns dist_profile : np.array(), shape (n_samples) Distance profile of the query to time series T. """ # CASE 1: query is a straight line segment of 0s if query_s < 1e-8: return slD # CASE 2: query is every other possible subsequence # compute the sliding dot product reverse_query = query[::-1] dot_product = sps.fftconvolve(T, reverse_query, 'valid') # compute the distance profile without correcting for standard deviation of the main signal being 0 # since this is numpy, it will result in np.inf if the data_sig is 0 dist_profile = np.sqrt(2 * (m - (dot_product - m * query_m * data_m) / (query_s * data_s))) # correct for data_s being 0 zero_idxs = np.where(data_s < 1e-8)[0] if len(zero_idxs) > 0: n_query = (query - query_m) / query_s d = np.linalg.norm(n_query - np.zeros(m, dtype=float)) dist_profile[zero_idxs] = d return dist_profile def _compute_brute_force_distance_profile(self, query, T, n, m, data_f, data_m, data_s, query_m, query_s): """ Compute the brute force distance profile. """ dist_profile = np.zeros(n-m+1, dtype=float) # normalize query if query_m < 1e-8: n_query = np.zeros(m, dtype=float) else: n_query = (query - query_m) / query_s # compute the distance profile for i in range(n-m+1): T_segm = T[i:i+m] Tm = data_m[i] Ts = data_s[i] # normalize time series segment if Ts < 1e-8: T_norm = np.zeros(m, dtype=float) else: T_norm = (T_segm - Tm) / Ts # compute distance dist_profile[i] = np.linalg.norm(T_norm - n_query) return dist_profile def _diagonal_dist(self, data, idx, dataLen, subLen, proLen, dataMu, dataSig): """ Compute the diagonal distance (as in the original matrix profile code) """ xTerm = np.dot(np.ones(proLen-idx+1), np.dot(data[idx-1:idx+subLen-1], data[:subLen])) mTerm = data[idx-1:proLen-1] * data[:proLen-idx] aTerm = data[idx+subLen-1:] * data[subLen:dataLen-idx+1] if proLen != idx: xTerm[1:] = xTerm[1:] - np.cumsum(mTerm) + np.cumsum(aTerm) distProfile = np.divide(xTerm - subLen * dataMu[idx-1:] * dataMu[:proLen-idx+1], subLen * dataSig[idx-1:] * dataSig[:proLen-idx+1]) distProfile = 2 * subLen * (1 - distProfile)
[ 1, 9995, 22513, 8722, 29342, 14997, 15326, 29889, 13, 13, 7422, 29901, 13, 1678, 529, 5813, 29958, 1696, 529, 5813, 29958, 1696, 529, 5813, 29958, 1696, 529, 5813, 29958, 1696, 529, 5813, 29958, 1696, 529, 5813, 29958, 1696, 529, 5813, 15513, 313, 29906, 29900, 29896, 29953, 29892, 5846, 467, 13, 1678, 22513, 8722, 306, 29901, 599, 11000, 29501, 26205, 363, 931, 3652, 29901, 263, 443, 9215, 1776, 393, 7805, 3184, 10270, 29892, 2313, 4339, 322, 8267, 10376, 29889, 13, 1678, 512, 3630, 341, 2827, 313, 2965, 23560, 511, 29871, 29906, 29900, 29896, 29953, 7159, 17896, 29871, 29896, 29953, 386, 4623, 16377, 373, 313, 407, 29889, 29871, 29896, 29941, 29896, 29955, 29899, 29896, 29941, 29906, 29906, 467, 7159, 17896, 29889, 13, 13, 15945, 29908, 13, 13, 29937, 13189, 943, 29901, 529, 5813, 10202, 29871, 29906, 29900, 29896, 29947, 29889, 13, 13, 5215, 5844, 13, 5215, 12655, 408, 7442, 13, 5215, 11701, 408, 10518, 13, 5215, 4560, 2272, 29889, 25436, 408, 269, 567, 13, 3166, 260, 29939, 18933, 1053, 260, 29939, 18933, 13, 13, 3166, 869, 5160, 6362, 3019, 1053, 7399, 6362, 3019, 13, 13, 13, 29937, 448, 9072, 13, 29937, 17332, 3289, 1660, 29903, 13, 29937, 448, 9072, 13, 13, 1990, 22513, 13909, 3035, 29898, 5160, 6362, 3019, 1125, 13, 1678, 9995, 530, 290, 14997, 15326, 297, 931, 3652, 773, 278, 4636, 8722, 13, 13, 1678, 12662, 2699, 13, 1678, 448, 1378, 29899, 13, 1678, 286, 584, 938, 313, 4381, 29922, 29896, 29900, 29897, 13, 4706, 18379, 2159, 29889, 13, 13, 1678, 640, 314, 3381, 584, 5785, 313, 4381, 29922, 29900, 29889, 29896, 29897, 13, 4706, 2661, 6490, 310, 278, 3806, 19649, 310, 29342, 284, 583, 297, 278, 848, 29889, 13, 13, 1678, 461, 29879, 13, 1678, 448, 26589, 13, 1678, 448, 910, 871, 1736, 373, 931, 3652, 848, 29889, 13, 1678, 9995, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 286, 29922, 29896, 29900, 29892, 640, 314, 3381, 29922, 29900, 29889, 29896, 29892, 13, 462, 304, 29880, 29922, 29896, 29872, 29899, 29947, 29892, 26952, 29922, 8824, 1125, 13, 4706, 2428, 29898, 14609, 13909, 3035, 29892, 1583, 467, 1649, 2344, 1649, 580, 13, 13, 4706, 1583, 29889, 29885, 353, 938, 29898, 29885, 29897, 13, 4706, 1583, 29889, 1285, 314, 3381, 353, 5785, 29898, 1285, 314, 3381, 29897, 13, 13, 4706, 1583, 29889, 25027, 353, 5785, 29898, 25027, 29897, 13, 4706, 1583, 29889, 369, 15828, 353, 6120, 29898, 369, 15828, 29897, 13, 13, 1678, 822, 633, 29918, 7122, 29898, 1311, 29892, 323, 29892, 6219, 1125, 13, 4706, 9995, 11796, 29872, 278, 17571, 7122, 322, 350, 29909, 7122, 2625, 29899, 1609, 29899, 2975, 29892, 13, 9651, 988, 421, 5451, 29952, 3683, 1475, 278, 24368, 1298, 29889, 13, 308, 13, 4706, 9995, 13, 13, 4706, 396, 5687, 3987, 13, 4706, 5566, 18482, 21515, 353, 938, 29898, 9302, 29889, 14486, 29898, 1311, 29889, 29885, 334, 29871, 29900, 29889, 29945, 876, 13, 4706, 11855, 353, 29871, 29896, 29889, 29896, 13, 4706, 848, 21515, 353, 7431, 29898, 29911, 29897, 13, 4706, 410, 21515, 353, 848, 21515, 448, 1583, 29889, 29885, 718, 29871, 29896, 13, 13, 4706, 396, 1735, 25701, 322, 9969, 304, 5225, 13, 4706, 323, 353, 7442, 29889, 13707, 29918, 517, 29918, 1949, 29898, 29911, 29897, 13, 13, 4706, 396, 758, 26017, 278, 2099, 29892, 3918, 29522, 13, 4706, 269, 353, 10518, 29889, 19204, 29898, 29911, 29897, 13, 4706, 848, 29924, 29884, 353, 269, 29889, 22155, 29898, 1311, 29889, 29885, 467, 12676, 2141, 5975, 29961, 1311, 29889, 29885, 29899, 29896, 29901, 1272, 21515, 29962, 13, 4706, 848, 29903, 335, 353, 269, 29889, 22155, 29898, 1311, 29889, 29885, 467, 4172, 2141, 5975, 29961, 1311, 29889, 29885, 29899, 29896, 29901, 1272, 21515, 29962, 13, 13, 4706, 4636, 13909, 353, 7442, 29889, 2873, 29898, 771, 21515, 29897, 334, 7442, 29889, 7192, 13, 4706, 22645, 7514, 353, 5566, 18482, 21515, 718, 7442, 29889, 279, 927, 29898, 29900, 29892, 410, 21515, 29892, 29871, 29896, 29897, 13, 4706, 22645, 7514, 353, 22645, 7514, 29961, 9302, 29889, 8172, 29889, 546, 6149, 362, 29898, 2435, 29898, 13140, 7514, 28166, 13, 13, 4706, 396, 3386, 278, 4636, 10185, 13, 4706, 363, 474, 29892, 22645, 297, 26985, 29898, 13140, 7514, 1125, 13, 9651, 396, 2346, 13, 9651, 2346, 353, 323, 29961, 13140, 29901, 13140, 29974, 1311, 29889, 29885, 29899, 29896, 29962, 13, 632, 13, 9651, 396, 5418, 8722, 13, 9651, 1320, 13909, 353, 1583, 3032, 6051, 351, 7177, 29918, 5721, 29898, 29911, 29892, 22645, 29892, 848, 21515, 29892, 1583, 29889, 29885, 29892, 410, 21515, 29892, 848, 29924, 29884, 29892, 848, 29903, 335, 29897, 13, 9651, 1320, 13909, 353, 6425, 29898, 5721, 13909, 29897, 13, 9651, 1320, 13909, 353, 7442, 29889, 3676, 29898, 5721, 13909, 29897, 13, 13, 9651, 396, 2602, 15709, 13, 9651, 926, 29896, 353, 7442, 29889, 279, 927, 29898, 13140, 29892, 410, 21515, 29892, 29871, 29896, 29897, 13, 9651, 926, 29906, 353, 7442, 29889, 279, 927, 29898, 29900, 29892, 410, 21515, 29899, 13140, 29974, 29896, 29892, 29871, 29896, 29897, 13, 13, 9651, 396, 6219, 15709, 13, 9651, 1320, 13909, 353, 1320, 13909, 29961, 9302, 29889, 3062, 3552, 1066, 29906, 5277, 6219, 29897, 669, 313, 1066, 29896, 1405, 6219, 876, 29961, 29900, 5262, 13, 9651, 926, 29896, 18772, 353, 926, 29896, 29961, 9302, 29889, 3062, 3552, 1066, 29906, 5277, 6219, 29897, 669, 313, 1066, 29896, 1405, 6219, 876, 29961, 29900, 5262, 13, 9651, 926, 29906, 18772, 353, 926, 29906, 29961, 9302, 29889, 3062, 3552, 1066, 29906, 5277, 6219, 29897, 669, 313, 1066, 29896, 1405, 6219, 876, 29961, 29900, 5262, 13, 9651, 926, 29896, 353, 926, 29896, 18772, 13, 9651, 926, 29906, 353, 926, 29906, 18772, 13, 13, 9651, 396, 2767, 15709, 13, 9651, 2767, 9135, 353, 7442, 29889, 3062, 29898, 5344, 13909, 29961, 1066, 29896, 29962, 1405, 1320, 13909, 9601, 29900, 29962, 13, 9651, 4636, 13909, 29961, 1066, 29896, 29961, 5504, 9135, 5262, 353, 1320, 13909, 29961, 5504, 9135, 29962, 13, 9651, 2767, 9135, 353, 7442, 29889, 3062, 29898, 5344, 13909, 29961, 1066, 29906, 29962, 1405, 1320, 13909, 9601, 29900, 29962, 13, 9651, 4636, 13909, 29961, 1066, 29906, 29961, 5504, 9135, 5262, 353, 1320, 13909, 29961, 5504, 9135, 29962, 13, 13, 4706, 736, 4636, 13909, 13, 13, 13, 1678, 822, 6216, 29918, 27711, 29898, 1311, 29892, 323, 1125, 13, 4706, 9995, 383, 277, 278, 1904, 304, 278, 931, 3652, 323, 29889, 13, 13, 4706, 584, 3207, 323, 584, 7442, 29889, 2378, 3285, 8267, 313, 29876, 29918, 27736, 29897, 13, 9651, 450, 931, 3652, 848, 363, 607, 304, 10272, 278, 4636, 8722, 29889, 13, 13, 4706, 584, 18280, 343, 29918, 13628, 584, 7442, 29889, 2378, 3285, 8267, 313, 29876, 29918, 27736, 29897, 13, 9651, 530, 290, 14997, 8158, 363, 278, 11916, 297, 323, 29889, 13, 4706, 584, 18280, 343, 29918, 11965, 584, 7442, 29889, 2378, 3285, 8267, 313, 29876, 29918, 27736, 29897, 13, 9651, 16969, 448, 29896, 363, 297, 27801, 322, 718, 29896, 363, 29342, 284, 583, 29914, 449, 27801, 29889, 13, 4706, 9995, 13, 13, 4706, 736, 1583, 29889, 9202, 29898, 9302, 29889, 2378, 4197, 2314, 467, 27711, 29898, 29911, 29897, 13, 13, 1678, 822, 6216, 29898, 1311, 29892, 323, 29922, 9302, 29889, 2378, 29898, 2636, 22164, 13, 4706, 9995, 383, 277, 278, 1904, 304, 278, 931, 3652, 323, 29889, 13, 13, 4706, 584, 3207, 323, 584, 7442, 29889, 2378, 3285, 8267, 313, 29876, 29918, 27736, 29897, 13, 9651, 450, 931, 3652, 848, 363, 607, 304, 10272, 278, 4636, 8722, 29889, 13, 13, 4706, 584, 18280, 1583, 584, 1203, 13, 4706, 9995, 13, 13, 4706, 1583, 29889, 29911, 29918, 14968, 353, 323, 13, 13, 4706, 736, 1583, 13, 13, 1678, 822, 8500, 29898, 1311, 29892, 323, 29922, 9302, 29889, 2378, 29898, 2636, 22164, 13, 4706, 9995, 11796, 29872, 278, 29342, 14997, 8158, 718, 8500, 278, 3858, 310, 1269, 4559, 297, 323, 29889, 13, 13, 4706, 584, 18280, 343, 29918, 13628, 584, 7442, 29889, 2378, 3285, 8267, 313, 29876, 29918, 27736, 29897, 13, 9651, 530, 290, 14997, 8158, 363, 278, 11916, 297, 323, 29889, 13, 4706, 584, 18280, 343, 29918, 11965, 584, 7442, 29889, 2378, 3285, 8267, 313, 29876, 29918, 27736, 29897, 13, 9651, 16969, 448, 29896, 363, 297, 27801, 322, 718, 29896, 363, 29342, 284, 583, 29914, 449, 27801, 29889, 13, 4706, 9995, 13, 13, 4706, 396, 285, 1509, 323, 29918, 14968, 322, 323, 13, 4706, 302, 29873, 353, 7431, 29898, 29911, 29897, 13, 4706, 302, 29911, 353, 7442, 29889, 535, 29883, 2579, 403, 3552, 1311, 29889, 29911, 29918, 14968, 29892, 323, 876, 13, 4706, 302, 353, 7431, 29898, 29876, 29911, 29897, 13, 13, 4706, 396, 10272, 278, 4636, 8722, 13, 4706, 4636, 29918, 10185, 353, 1583, 3032, 26017, 29918, 5344, 29918, 10185, 29918, 303, 21744, 29898, 29876, 29911, 29892, 1583, 29889, 29885, 29897, 13, 13, 4706, 396, 4327, 304, 385, 29342, 14997, 8158, 313, 29896, 10262, 5418, 29897, 13, 4706, 396, 278, 10150, 5418, 353, 278, 10150, 29342, 14997, 13, 4706, 396, 620, 29883, 744, 1546, 29871, 29900, 322, 29871, 29896, 29892, 445, 17498, 278, 29342, 14997, 8158, 13, 4706, 343, 29918, 13628, 353, 313, 5344, 29918, 10185, 448, 1375, 29898, 5344, 29918, 10185, 876, 847, 313, 3317, 29898, 5344, 29918, 10185, 29897, 448, 1375, 29898, 5344, 29918, 10185, 876, 13, 4706, 343, 29918, 13628, 353, 7442, 29889, 4397, 29898, 29891, 29918, 13628, 29892, 7442, 29889, 3298, 359, 29898, 29876, 29899, 2435, 29898, 5344, 29918, 10185, 511, 26688, 29922, 7411, 876, 13, 13, 4706, 396, 18988, 16897, 718, 8380, 27303, 13, 4706, 1583, 29889, 386, 12268, 353, 7442, 29889, 6605, 29898, 29891, 29918, 13628, 9601, 524, 29898, 29876, 334, 313, 29896, 29889, 29900, 448, 1583, 29889, 1285, 314, 3381, 28166, 13, 4706, 343, 29918, 11965, 353, 7442, 29889, 2873, 29898, 29876, 29892, 26688, 29922, 7411, 29897, 13, 4706, 343, 29918, 11965, 29961, 29891, 29918, 13628, 529, 1583, 29889, 386, 12268, 29962, 353, 448, 29896, 13, 13, 4706, 396, 5700, 343, 29918, 11965, 322, 343, 29918, 13628, 304, 1993, 3309, 310, 323, 13, 4706, 736, 343, 29918, 13628, 14352, 593, 29901, 1402, 343, 29918, 11965, 14352, 593, 17531, 13, 13, 1678, 822, 903, 26017, 29918, 5344, 29918, 10185, 29918, 303, 21744, 29898, 1311, 29892, 323, 29892, 286, 1125, 13, 4706, 9995, 11796, 29872, 278, 4636, 8722, 322, 8722, 2380, 363, 931, 3652, 323, 773, 1959, 317, 4986, 3580, 29889, 13, 13, 4706, 584, 3207, 323, 584, 7442, 29889, 2378, 3285, 8267, 313, 29876, 29918, 27736, 29897, 13, 9651, 450, 931, 3652, 848, 363, 607, 304, 10272, 278, 4636, 8722, 29889, 13, 4706, 584, 3207, 286, 584, 938, 13, 9651, 365, 1477, 310, 278, 2346, 29889, 13, 13, 4706, 584, 18280, 4636, 29918, 10185, 584, 7442, 29889, 2378, 3285, 8267, 313, 29876, 29918, 27736, 29897, 13, 9651, 450, 4636, 8722, 313, 19244, 29897, 363, 278, 931, 3652, 323, 29889, 13, 13, 4706, 6589, 13, 4706, 448, 26589, 13, 4706, 448, 512, 27722, 263, 2329, 363, 7812, 1196, 931, 3652, 24611, 29889, 13, 4706, 9995, 13, 13, 4706, 302, 353, 7431, 29898, 29911, 29897, 13, 13, 4706, 396, 758, 26017, 278, 2099, 29892, 3918, 29522, 13, 4706, 269, 353, 10518, 29889, 19204, 29898, 29911, 29897, 13, 4706, 848, 29918, 29885, 353, 269, 29889, 22155, 29898, 29885, 467, 12676, 2141, 5975, 29961, 29885, 29899, 29896, 29901, 29876, 29962, 13, 4706, 848, 29918, 29879, 353, 269, 29889, 22155, 29898, 29885, 467, 4172, 2141, 5975, 29961, 29885, 29899, 29896, 29901, 29876, 29962, 13, 13, 4706, 396, 988, 278, 848, 338, 5225, 13, 4706, 22645, 29920, 353, 7442, 29889, 3062, 29898, 1272, 29918, 29879, 529, 29871, 29896, 29872, 29899, 29947, 9601, 29900, 29962, 13, 4706, 848, 29918, 29879, 29961, 13140, 29920, 29962, 353, 29871, 29900, 29889, 29900, 13, 4706, 22645, 29876, 353, 7442, 29889, 3062, 29898, 1272, 29918, 29879, 1405, 29871, 29900, 29889, 29900, 9601, 29900, 29962, 13, 13, 4706, 5225, 29918, 29879, 353, 7700, 13, 4706, 565, 7431, 29898, 13140, 29920, 29897, 1405, 29871, 29900, 29901, 13, 9651, 5225, 29918, 29879, 353, 5852, 13, 13, 4706, 396, 758, 26017, 5418, 304, 7812, 1196, 10768, 310, 29871, 29900, 29879, 13, 4706, 2243, 29928, 353, 7442, 29889, 3298, 359, 29898, 29876, 29899, 29885, 29974, 29896, 29892, 26688, 29922, 7411, 29897, 13, 4706, 565, 5225, 29918, 29879, 29901, 13, 9651, 363, 474, 297, 3464, 29898, 29876, 29899, 29885, 29974, 29896, 1125, 13, 18884, 323, 10199, 29885, 353, 323, 29961, 29875, 29901, 29875, 29974, 29885, 29962, 13, 18884, 323, 29885, 353, 848, 29918, 29885, 29961, 29875, 29962, 13, 18884, 19089, 353, 848, 29918, 29879, 29961, 29875, 29962, 13, 18884, 565, 19089, 1275, 29871, 29900, 29889, 29900, 29901, 29871, 396, 848, 29918, 29879, 338, 17583, 29871, 29900, 13, 462, 1678, 2243, 29928, 29961, 29875, 29962, 353, 29871, 29900, 29889, 29900, 13, 18884, 1683, 29901, 13, 462, 1678, 323, 29876, 353, 313, 29911, 10199, 29885, 448, 323, 29885, 29897, 847, 19089, 13, 462, 1678, 2243, 29928, 29961, 29875, 29962, 353, 7442, 29889, 3676, 29898, 9302, 29889, 2083, 29898, 29911, 29876, 3579, 29871, 29906, 876, 13, 13, 4706, 396, 10272, 278, 937, 8329, 3234, 13, 4706, 3855, 353, 323, 7503, 29885, 29962, 13, 4706, 660, 29911, 353, 269, 567, 29889, 535, 1555, 345, 29898, 29911, 29889, 8552, 3285, 3855, 29961, 1057, 29899, 29896, 1402, 525, 3084, 742, 525, 11851, 1495, 13, 4706, 660, 29911, 29918, 4102, 353, 660, 29911, 29889, 8552, 580, 13, 13, 4706, 396, 10272, 278, 5418, 8722, 13, 4706, 360, 353, 1583, 3032, 26017, 29918, 20227, 29918, 19244, 29918, 10185, 29898, 29911, 7503, 29885, 1402, 660, 29911, 29892, 302, 29892, 286, 29892, 848, 29918, 29885, 29892, 848, 29918, 29879, 29892, 848, 29918, 29885, 29961, 29900, 1402, 848, 29918, 29879, 29961, 29900, 1402, 2243, 29928, 29889, 8552, 3285, 22645, 29920, 29892, 22645, 29876, 29892, 5225, 29918, 29879, 29897, 13, 13, 4706, 396, 11905, 4636, 8722, 13, 4706, 4636, 29918, 10185, 353, 360, 13, 13, 4706, 396, 297, 29899, 2098, 17983, 310, 278, 1791, 310, 278, 8722, 13, 4706, 363, 474, 297, 260, 29939, 18933, 29898, 3881, 29898, 29896, 29892, 302, 29899, 29885, 29974, 29896, 29892, 29871, 29896, 511, 11262, 29922, 1333, 29898, 1311, 29889, 369, 15828, 22164, 13, 9651, 396, 2767, 278, 8329, 3234, 13, 9651, 660, 29911, 29961, 29896, 17531, 353, 660, 29911, 7503, 29899, 29896, 29962, 448, 313, 29911, 7503, 29876, 29899, 29885, 29962, 334, 323, 29961, 29875, 29899, 29896, 2314, 718, 313, 29911, 29961, 29885, 29901, 29876, 29962, 334, 323, 29961, 29875, 29974, 29885, 29899, 29896, 2314, 13, 9651, 660, 29911, 29961, 29900, 29962, 353, 660, 29911, 29918, 4102, 29961, 29875, 29962, 13, 13, 9651, 396, 10272, 278, 5418, 8722, 29901, 1728, 740, 5717, 29991, 13, 9651, 565, 848, 29918, 29879, 29961, 29875, 29962, 1275, 29871, 29900, 29889, 29900, 29901, 29871, 396, 2346, 29918, 29879, 338, 17583, 29871, 29900, 13, 18884, 360, 353, 2243, 29928, 29889, 8552, 580, 13, 9651, 25342, 5225, 29918, 29879, 29901, 13, 18884, 360, 29961, 13140, 29876, 29962, 353, 7442, 29889, 3676, 29898, 29906, 334, 313, 29885, 448, 313, 29984, 29911, 29961, 13140, 29876, 29962, 448, 286, 334, 848, 29918, 29885, 29961, 13140, 29876, 29962, 334, 848, 29918, 29885, 29961, 29875, 2314, 847, 313, 1272, 29918, 29879, 29961, 13140, 29876, 29962, 334, 848, 29918, 29879, 29961, 29875, 29962, 4961, 13, 18884, 302, 29939, 353, 313, 29939, 448, 848, 29918, 29885, 29961, 29875, 2314, 847, 848, 29918, 29879, 29961, 29875, 29962, 13, 18884, 270, 353, 7442, 29889, 3676, 29898, 9302, 29889, 2083, 29898, 29876, 29939, 3579, 29871, 29906, 876, 13, 18884, 360, 29961, 13140, 29920, 29962, 353, 270, 13, 9651, 1683, 29901, 13, 18884, 360, 353, 7442, 29889, 3676, 29898, 29906, 334, 313, 29885, 448, 313, 29984, 29911, 448, 286, 334, 848, 29918, 29885, 334, 848, 29918, 29885, 29961, 29875, 2314, 847, 313, 1272, 29918, 29879, 334, 848, 29918, 29879, 29961, 29875, 29962, 4961, 13, 13, 9651, 396, 2767, 278, 4636, 8722, 13, 9651, 429, 10085, 29918, 3881, 353, 313, 524, 29898, 3317, 29898, 29900, 29892, 4513, 29898, 29875, 29899, 29885, 29914, 29906, 876, 511, 938, 29898, 1195, 29898, 14486, 29898, 29875, 29974, 29885, 29914, 29906, 29974, 29896, 511, 302, 29899, 29885, 29974, 29896, 4961, 13, 9651, 360, 29961, 735, 10085, 29918, 3881, 29961, 29900, 5387, 735, 10085, 29918, 3881, 29961, 29896, 5262, 353, 7442, 29889, 7192, 13, 13, 9651, 474, 29916, 353, 7442, 29889, 3062, 29898, 29928, 529, 4636, 29918, 10185, 9601, 29900, 29962, 13, 9651, 4636, 29918, 10185, 29961, 861, 29962, 353, 360, 29961, 861, 29962, 13, 9651, 396, 4636, 29918, 10185, 353, 7442, 29889, 1195, 12539, 29898, 5344, 29918, 10185, 29892, 360, 29897, 13, 13, 4706, 736, 4636, 29918, 10185, 13, 13, 1678, 822, 903, 26017, 29918, 20227, 29918, 19244, 29918, 10185, 29898, 1311, 29892, 3855, 29892, 660, 29911, 29892, 302, 29892, 286, 29892, 848, 29918, 29885, 29892, 848, 29918, 29879, 29892, 2346, 29918, 29885, 29892, 2346, 29918, 29879, 29892, 2243, 29928, 29892, 22645, 29920, 29892, 22645, 29876, 29892, 5225, 29918, 29879, 1125, 13, 4706, 9995, 11796, 29872, 278, 4343, 5418, 8722, 9995, 13, 4706, 360, 353, 7442, 29889, 3298, 359, 29898, 29876, 29899, 29885, 29974, 29896, 29892, 26688, 29922, 7411, 29897, 13, 13, 4706, 565, 2346, 29918, 29879, 1275, 29871, 29900, 29889, 29900, 29901, 29871, 396, 2346, 29918, 29879, 338, 17583, 29871, 29900, 13, 9651, 736, 2243, 29928, 13, 13, 4706, 565, 5225, 29918, 29879, 29901, 13, 9651, 360, 29961, 13140, 29876, 29962, 353, 7442, 29889, 3676, 29898, 29906, 334, 313, 29885, 448, 313, 29984, 29911, 29961, 13140, 29876, 29962, 448, 286, 334, 848, 29918, 29885, 29961, 13140, 29876, 29962, 334, 2346, 29918, 29885, 29897, 847, 313, 1272, 29918, 29879, 29961, 13140, 29876, 29962, 334, 2346, 29918, 29879, 4961, 13, 9651, 302, 29939, 353, 313, 29939, 448, 2346, 29918, 29885, 29897, 847, 2346, 29918, 29879, 13, 9651, 270, 353, 7442, 29889, 3676, 29898, 9302, 29889, 2083, 29898, 29876, 29939, 3579, 29871, 29906, 876, 13, 9651, 360, 29961, 13140, 29920, 29962, 353, 270, 13, 4706, 1683, 29901, 13, 9651, 360, 353, 7442, 29889, 3676, 29898, 29906, 334, 313, 29885, 448, 313, 29984, 29911, 448, 286, 334, 848, 29918, 29885, 334, 2346, 29918, 29885, 29897, 847, 313, 1272, 29918, 29879, 334, 2346, 29918, 29879, 4961, 13, 13, 4706, 736, 360, 13, 13, 1678, 822, 903, 26017, 29918, 5344, 29918, 10185, 29918, 303, 1160, 29898, 1311, 29892, 323, 29892, 286, 1125, 13, 4706, 9995, 11796, 29872, 278, 4636, 8722, 322, 8722, 2380, 363, 931, 3652, 323, 773, 317, 6040, 3580, 29889, 13, 13, 4706, 584, 3207, 323, 584, 7442, 29889, 2378, 3285, 8267, 313, 29876, 29918, 27736, 29897, 13, 9651, 450, 931, 3652, 848, 363, 607, 304, 10272, 278, 4636, 8722, 29889, 13, 4706, 584, 3207, 286, 584, 938, 13, 9651, 365, 1477, 310, 278, 2346, 29889, 13, 13, 4706, 584, 18280, 4636, 29918, 10185, 584, 7442, 29889, 2378, 3285, 8267, 313, 29876, 29918, 27736, 29897, 13, 9651, 450, 4636, 8722, 313, 19244, 29897, 363, 278, 931, 3652, 323, 29889, 13, 4706, 584, 18280, 8722, 29918, 2248, 584, 7442, 29889, 2378, 3285, 8267, 313, 29876, 29918, 27736, 29897, 13, 9651, 450, 4636, 8722, 2380, 10259, 1384, 292, 278, 4636, 8722, 29889, 13, 13, 4706, 6589, 13, 4706, 448, 26589, 13, 4706, 448, 10783, 267, 278, 317, 6040, 3580, 5687, 304, 10272, 278, 4636, 8722, 29889, 13, 4706, 448, 512, 27722, 263, 2329, 363, 7812, 1196, 931, 3652, 24611, 29889, 13, 4706, 9995, 13, 13, 4706, 302, 353, 7431, 29898, 29911, 29897, 13, 13, 4706, 396, 11905, 278, 4069, 8722, 322, 2380, 13, 4706, 4636, 29918, 10185, 353, 7442, 29889, 2873, 29898, 29876, 29899, 29885, 29974, 29896, 29897, 334, 7442, 29889, 7192, 13, 13, 4706, 396, 758, 26017, 278, 2099, 29892, 3918, 29522, 13, 4706, 269, 353, 10518, 29889, 19204, 29898, 29911, 29897, 13, 4706, 848, 29918, 29885, 353, 269, 29889, 22155, 29898, 29885, 467, 12676, 2141, 5975, 29961, 29885, 29899, 29896, 29901, 29876, 29962, 13, 4706, 848, 29918, 29879, 353, 269, 29889, 22155, 29898, 29885, 467, 4172, 2141, 5975, 29961, 29885, 29899, 29896, 29901, 29876, 29962, 13, 13, 4706, 396, 988, 278, 848, 338, 5225, 13, 4706, 22645, 29920, 353, 7442, 29889, 3062, 29898, 1272, 29918, 29879, 529, 29871, 29896, 29872, 29899, 29947, 9601, 29900, 29962, 13, 4706, 848, 29918, 29879, 29961, 13140, 29920, 29962, 353, 29871, 29900, 29889, 29900, 13, 4706, 22645, 29876, 353, 7442, 29889, 3062, 29898, 1272, 29918, 29879, 1405, 29871, 29900, 29889, 29900, 9601, 29900, 29962, 13, 13, 4706, 5225, 29918, 29879, 353, 7700, 13, 4706, 565, 7431, 29898, 13140, 29920, 29897, 1405, 29871, 29900, 29901, 13, 9651, 5225, 29918, 29879, 353, 5852, 13, 13, 4706, 396, 758, 26017, 5418, 304, 7812, 1196, 10768, 310, 29871, 29900, 29879, 13, 4706, 396, 1506, 1082, 4889, 5418, 16287, 313, 18103, 278, 8329, 29918, 4704, 338, 5225, 14366, 13, 4706, 396, 6660, 445, 338, 263, 2281, 3631, 2228, 411, 278, 14861, 1799, 5687, 363, 5172, 5418, 16287, 13, 4706, 2243, 29928, 353, 7442, 29889, 3298, 359, 29898, 29876, 29899, 29885, 29974, 29896, 29892, 26688, 29922, 7411, 29897, 13, 4706, 565, 5225, 29918, 29879, 29901, 13, 9651, 363, 474, 297, 3464, 29898, 29876, 29899, 29885, 29974, 29896, 1125, 13, 18884, 323, 10199, 29885, 353, 323, 29961, 29875, 29901, 29875, 29974, 29885, 29962, 13, 18884, 323, 29885, 353, 848, 29918, 29885, 29961, 29875, 29962, 13, 18884, 19089, 353, 848, 29918, 29879, 29961, 29875, 29962, 13, 18884, 565, 19089, 1275, 29871, 29900, 29889, 29900, 29901, 29871, 396, 848, 29918, 29879, 338, 17583, 29871, 29900, 13, 462, 1678, 2243, 29928, 29961, 29875, 29962, 353, 29871, 29900, 29889, 29900, 13, 18884, 1683, 29901, 13, 462, 1678, 323, 29876, 353, 313, 29911, 10199, 29885, 448, 323, 29885, 29897, 847, 19089, 13, 462, 1678, 2243, 29928, 29961, 29875, 29962, 353, 7442, 29889, 3676, 29898, 9302, 29889, 2083, 29898, 29911, 29876, 3579, 29871, 29906, 876, 13, 13, 4706, 396, 4036, 2740, 1797, 363, 278, 11420, 2425, 13, 4706, 16285, 353, 7442, 29889, 279, 927, 29898, 29900, 29892, 302, 29899, 29885, 29974, 29896, 29892, 29871, 29896, 29897, 13, 4706, 7442, 29889, 8172, 29889, 845, 21897, 29898, 513, 1575, 29897, 13, 13, 4706, 396, 10272, 278, 4636, 8722, 13, 4706, 565, 1583, 29889, 369, 15828, 29901, 1596, 877, 13463, 800, 29901, 742, 7431, 29898, 513, 1575, 876, 13, 4706, 363, 474, 29892, 22645, 297, 260, 29939, 18933, 29898, 15172, 29898, 513, 1575, 511, 11262, 29922, 1333, 29898, 1311, 29889, 369, 15828, 22164, 13, 9651, 396, 2346, 363, 607, 304, 10272, 278, 5418, 8722, 13, 9651, 2346, 353, 323, 29961, 13140, 29901, 13140, 29974, 29885, 29962, 13, 13, 9651, 396, 4226, 1891, 5418, 8722, 313, 4746, 14861, 1799, 29897, 13, 9651, 360, 353, 1583, 3032, 26017, 29918, 1529, 1799, 29898, 1972, 29892, 323, 29892, 302, 29892, 286, 29892, 848, 29918, 29885, 29892, 848, 29918, 29879, 29892, 848, 29918, 29885, 29961, 13140, 1402, 848, 29918, 29879, 29961, 13140, 1402, 2243, 29928, 29889, 8552, 3101, 13, 13, 9651, 396, 2767, 278, 4636, 8722, 313, 17462, 292, 9212, 24610, 29897, 13, 9651, 396, 1583, 29899, 7122, 338, 5852, 29991, 313, 705, 871, 1106, 472, 3386, 292, 278, 4636, 8722, 363, 263, 2323, 931, 3652, 29897, 13, 9651, 429, 10085, 29918, 3881, 353, 313, 524, 29898, 3317, 29898, 29900, 29892, 4513, 29898, 13140, 29899, 29885, 29914, 29906, 876, 511, 938, 29898, 1195, 29898, 14486, 29898, 13140, 29974, 29885, 29914, 29906, 29974, 29896, 511, 302, 29899, 29885, 29974, 29896, 4961, 13, 9651, 360, 29961, 735, 10085, 29918, 3881, 29961, 29900, 5387, 735, 10085, 29918, 3881, 29961, 29896, 5262, 353, 7442, 29889, 7192, 13, 13, 9651, 474, 29916, 353, 7442, 29889, 3062, 29898, 29928, 529, 4636, 29918, 10185, 9601, 29900, 29962, 13, 9651, 4636, 29918, 10185, 29961, 861, 29962, 353, 360, 29961, 861, 29962, 13, 13, 4706, 736, 4636, 29918, 10185, 13, 13, 1678, 822, 903, 26017, 29918, 1529, 1799, 29898, 1311, 29892, 2346, 29892, 323, 29892, 302, 29892, 286, 29892, 848, 29918, 29885, 29892, 848, 29918, 29879, 29892, 2346, 29918, 29885, 29892, 2346, 29918, 29879, 29892, 2243, 29928, 1125, 13, 4706, 9995, 11796, 29872, 278, 5418, 8722, 773, 278, 14861, 1799, 5687, 29889, 13, 13, 4706, 584, 3207, 2346, 584, 7442, 29889, 2378, 3285, 8267, 313, 1311, 29889, 29885, 29897, 13, 9651, 13641, 10768, 363, 607, 304, 10272, 278, 5418, 8722, 29889, 13, 4706, 584, 3207, 323, 584, 7442, 29889, 2378, 3285, 8267, 313, 29876, 29918, 27736, 29897, 13, 9651, 450, 931, 3652, 848, 363, 607, 304, 10272, 278, 4636, 8722, 29889, 13, 4706, 584, 3207, 302, 584, 938, 13, 9651, 365, 1477, 310, 931, 3652, 323, 29889, 13, 4706, 584, 3207, 286, 584, 938, 13, 9651, 365, 1477, 310, 278, 2346, 29889, 13, 4706, 584, 3207, 848, 29918, 29888, 584, 7442, 29889, 2378, 29892, 8267, 313, 29876, 718, 286, 29897, 13, 9651, 383, 7818, 4327, 310, 323, 29889, 13, 4706, 584, 3207, 848, 29918, 29885, 584, 7442, 29889, 2378, 29892, 8267, 313, 29876, 448, 286, 718, 29871, 29896, 29897, 13, 9651, 16316, 310, 1432, 10768, 310, 3309, 286, 310, 323, 29889, 13, 4706, 584, 3207, 848, 29918, 29879, 584, 7442, 29889, 2378, 29892, 8267, 313, 29876, 448, 286, 718, 29871, 29896, 29897, 13, 9651, 6850, 29928, 310, 1432, 10768, 310, 3309, 286, 310, 323, 29889, 13, 4706, 584, 3207, 2346, 29918, 29885, 584, 5785, 13, 9651, 16316, 310, 278, 2346, 10768, 29889, 13, 4706, 584, 3207, 2346, 29918, 29879, 584, 5785, 13, 9651, 10117, 29522, 310, 278, 2346, 10768, 29889, 13, 13, 4706, 584, 18280, 1320, 29918, 10185, 584, 7442, 29889, 2378, 3285, 8267, 313, 29876, 29918, 27736, 29897, 13, 9651, 6652, 749, 8722, 310, 278, 2346, 304, 931, 3652, 323, 29889, 13, 4706, 9995, 13, 13, 4706, 396, 29134, 29871, 29896, 29901, 2346, 338, 263, 7812, 1196, 10768, 310, 29871, 29900, 29879, 13, 4706, 565, 2346, 29918, 29879, 529, 29871, 29896, 29872, 29899, 29947, 29901, 13, 9651, 736, 2243, 29928, 13, 13, 4706, 396, 29134, 29871, 29906, 29901, 2346, 338, 1432, 916, 1950, 1014, 16506, 13, 4706, 396, 10272, 278, 2243, 4821, 8329, 3234, 13, 4706, 11837, 29918, 1972, 353, 2346, 29961, 1057, 29899, 29896, 29962, 13, 4706, 8329, 29918, 4704, 353, 269, 567, 29889, 600, 29873, 535, 1555, 345, 29898, 29911, 29892, 11837, 29918, 1972, 29892, 525, 3084, 1495, 13, 13, 4706, 396, 10272, 278, 5418, 8722, 1728, 1959, 292, 363, 3918, 29522, 310, 278, 1667, 7182, 1641, 29871, 29900, 13, 4706, 396, 1951, 445, 338, 12655, 29892, 372, 674, 1121, 297, 7442, 29889, 7192, 565, 278, 848, 29918, 18816, 338, 29871, 29900, 13, 4706, 1320, 29918, 10185, 353, 7442, 29889, 3676, 29898, 29906, 334, 313, 29885, 448, 313, 6333, 29918, 4704, 448, 286, 334, 2346, 29918, 29885, 334, 848, 29918, 29885, 29897, 847, 313, 1972, 29918, 29879, 334, 848, 29918, 29879, 4961, 13, 13, 4706, 396, 1959, 363, 848, 29918, 29879, 1641, 29871, 29900, 13, 4706, 5225, 29918, 333, 10351, 353, 7442, 29889, 3062, 29898, 1272, 29918, 29879, 529, 29871, 29896, 29872, 29899, 29947, 9601, 29900, 29962, 13, 4706, 565, 7431, 29898, 9171, 29918, 333, 10351, 29897, 1405, 29871, 29900, 29901, 13, 9651, 302, 29918, 1972, 353, 313, 1972, 448, 2346, 29918, 29885, 29897, 847, 2346, 29918, 29879, 13, 9651, 270, 353, 7442, 29889, 29880, 979, 29887, 29889, 12324, 29898, 29876, 29918, 1972, 448, 7442, 29889, 3298, 359, 29898, 29885, 29892, 26688, 29922, 7411, 876, 13, 9651, 1320, 29918, 10185, 29961, 9171, 29918, 333, 10351, 29962, 353, 270, 13, 13, 4706, 736, 1320, 29918, 10185, 13, 13, 1678, 822, 903, 26017, 29918, 1182, 1082, 29918, 10118, 29918, 19244, 29918, 10185, 29898, 1311, 29892, 2346, 29892, 323, 29892, 302, 29892, 286, 29892, 848, 29918, 29888, 29892, 848, 29918, 29885, 29892, 848, 29918, 29879, 29892, 2346, 29918, 29885, 29892, 2346, 29918, 29879, 1125, 13, 4706, 9995, 11796, 29872, 278, 1506, 1082, 4889, 5418, 8722, 29889, 9995, 13, 13, 4706, 1320, 29918, 10185, 353, 7442, 29889, 3298, 359, 29898, 29876, 29899, 29885, 29974, 29896, 29892, 26688, 29922, 7411, 29897, 13, 13, 4706, 396, 4226, 675, 2346, 13, 4706, 565, 2346, 29918, 29885, 529, 29871, 29896, 29872, 29899, 29947, 29901, 13, 9651, 302, 29918, 1972, 353, 7442, 29889, 3298, 359, 29898, 29885, 29892, 26688, 29922, 7411, 29897, 13, 4706, 1683, 29901, 13, 9651, 302, 29918, 1972, 353, 313, 1972, 448, 2346, 29918, 29885, 29897, 847, 2346, 29918, 29879, 13, 13, 4706, 396, 10272, 278, 5418, 8722, 13, 4706, 363, 474, 297, 3464, 29898, 29876, 29899, 29885, 29974, 29896, 1125, 13, 9651, 323, 29918, 10199, 29885, 353, 323, 29961, 29875, 29901, 29875, 29974, 29885, 29962, 13, 9651, 323, 29885, 353, 848, 29918, 29885, 29961, 29875, 29962, 13, 9651, 19089, 353, 848, 29918, 29879, 29961, 29875, 29962, 13, 9651, 396, 4226, 675, 931, 3652, 10768, 13, 9651, 565, 19089, 529, 29871, 29896, 29872, 29899, 29947, 29901, 13, 18884, 323, 29918, 12324, 353, 7442, 29889, 3298, 359, 29898, 29885, 29892, 26688, 29922, 7411, 29897, 13, 9651, 1683, 29901, 13, 18884, 323, 29918, 12324, 353, 313, 29911, 29918, 10199, 29885, 448, 323, 29885, 29897, 847, 19089, 13, 9651, 396, 10272, 5418, 13, 9651, 1320, 29918, 10185, 29961, 29875, 29962, 353, 7442, 29889, 29880, 979, 29887, 29889, 12324, 29898, 29911, 29918, 12324, 448, 302, 29918, 1972, 29897, 13, 13, 4706, 736, 1320, 29918, 10185, 13, 13, 1678, 822, 903, 6051, 351, 7177, 29918, 5721, 29898, 1311, 29892, 848, 29892, 22645, 29892, 848, 21515, 29892, 1014, 21515, 29892, 410, 21515, 29892, 848, 29924, 29884, 29892, 848, 29903, 335, 1125, 13, 4706, 9995, 11796, 29872, 278, 19640, 5418, 313, 294, 297, 278, 2441, 4636, 8722, 775, 29897, 9995, 13, 308, 13, 4706, 921, 14343, 353, 7442, 29889, 6333, 29898, 9302, 29889, 2873, 29898, 771, 21515, 29899, 13140, 29974, 29896, 511, 7442, 29889, 6333, 29898, 1272, 29961, 13140, 29899, 29896, 29901, 13140, 29974, 1491, 21515, 29899, 29896, 1402, 848, 7503, 1491, 21515, 12622, 13, 4706, 286, 14343, 353, 848, 29961, 13140, 29899, 29896, 29901, 771, 21515, 29899, 29896, 29962, 334, 848, 7503, 771, 21515, 29899, 13140, 29962, 13, 4706, 263, 14343, 353, 848, 29961, 13140, 29974, 1491, 21515, 29899, 29896, 17531, 334, 848, 29961, 1491, 21515, 29901, 1272, 21515, 29899, 13140, 29974, 29896, 29962, 13, 4706, 565, 410, 21515, 2804, 22645, 29901, 13, 9651, 921, 14343, 29961, 29896, 17531, 353, 921, 14343, 29961, 29896, 17531, 448, 7442, 29889, 29883, 398, 2083, 29898, 29885, 14343, 29897, 718, 7442, 29889, 29883, 398, 2083, 29898, 29874, 14343, 29897, 13, 13, 4706, 1320, 13909, 353, 7442, 29889, 4563, 680, 29898, 29916, 14343, 448, 1014, 21515, 334, 848, 29924, 29884, 29961, 13140, 29899, 29896, 17531, 334, 848, 29924, 29884, 7503, 771, 21515, 29899, 13140, 29974, 29896, 1402, 13, 462, 9651, 1014, 21515, 334, 848, 29903, 335, 29961, 13140, 29899, 29896, 17531, 334, 848, 29903, 335, 7503, 771, 21515, 29899, 13140, 29974, 29896, 2314, 13, 4706, 1320, 13909, 353, 29871, 29906, 334, 1014, 21515, 334, 313, 29896, 448, 1320, 13909, 29897, 13, 2 ]
experiments/annotations.py
stattikcms/stattik
1
117238
import inspect from typing import Union, get_origin, get_args def f(x: int, y: int | None ) -> int: return x + y a = inspect.get_annotations(f) print(a) y = a['y'] print(y) t = type(y) print(t) #print(t.__dict__) print(get_args(y))
[ 1, 1053, 16096, 13, 13, 3166, 19229, 1053, 7761, 29892, 679, 29918, 12574, 29892, 679, 29918, 5085, 13, 13, 1753, 285, 29898, 29916, 29901, 938, 29892, 343, 29901, 938, 891, 6213, 1723, 1599, 938, 29901, 13, 1678, 736, 921, 718, 343, 13, 13, 29874, 353, 16096, 29889, 657, 29918, 6735, 800, 29898, 29888, 29897, 13, 2158, 29898, 29874, 29897, 13, 29891, 353, 263, 1839, 29891, 2033, 13, 2158, 29898, 29891, 29897, 13, 29873, 353, 1134, 29898, 29891, 29897, 13, 2158, 29898, 29873, 29897, 13, 29937, 2158, 29898, 29873, 17255, 8977, 1649, 29897, 13, 2158, 29898, 657, 29918, 5085, 29898, 29891, 876, 13, 2 ]
blacklistparser/core/types.py
Armorless-Visage/blacklistparser
0
130823
<reponame>Armorless-Visage/blacklistparser #!/usr/bin/env python3 # <NAME> (c) 2019 ISC # Full licence terms located in LICENCE file from os import path ''' some types for argparse type argument ''' def base_path_type(pathname): ''' custom type for checking that a file path is valid returns input if the base dir exists, None otherwise ''' if path.isdir(path.dirname(pathname)) is True: return pathname return None
[ 1, 529, 276, 1112, 420, 29958, 1433, 12257, 2222, 29899, 6116, 482, 29914, 8517, 1761, 16680, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 13, 29937, 529, 5813, 29958, 313, 29883, 29897, 29871, 29906, 29900, 29896, 29929, 306, 7187, 13, 29937, 14846, 7794, 663, 4958, 5982, 297, 365, 2965, 1430, 4741, 934, 13, 13, 3166, 2897, 1053, 2224, 13, 13, 12008, 13, 5372, 4072, 363, 1852, 5510, 1134, 2980, 13, 12008, 13, 13, 1753, 2967, 29918, 2084, 29918, 1853, 29898, 2084, 978, 1125, 13, 1678, 14550, 13, 1678, 2888, 1134, 363, 8454, 393, 263, 934, 2224, 338, 2854, 13, 1678, 3639, 1881, 565, 278, 2967, 4516, 4864, 29892, 6213, 6467, 13, 1678, 14550, 13, 1678, 565, 2224, 29889, 275, 3972, 29898, 2084, 29889, 25721, 29898, 2084, 978, 876, 338, 5852, 29901, 13, 4706, 736, 2224, 978, 13, 1678, 736, 6213, 13, 2 ]
carCapture.py
ishmam367/Vehcle-Monitoring-System-BLPR-
2
28267
<gh_stars>1-10 import cv2 import time #print(cv2.__version__) cascade_src = 'cars.xml' video_src = 'v3.avi' start_time = time.time() cap = cv2.VideoCapture(video_src) #framerate = cap.get(5) car_cascade = cv2.CascadeClassifier(cascade_src) i=0 while True: i=i+1 ret, img = cap.read() if (type(img) == type(None)): break gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) cars = car_cascade.detectMultiScale(gray, 1.1, 1) for (x,y,w,h) in cars: box=cv2.rectangle(img,(x,y),(x+w,y+h),(0,0,255),2) cv2.imshow('video', img) cv2.imwrite("template {0}.jpg".format(i),box) print("--- %s seconds ---" % (time.time() - start_time)) time.sleep(2) if cv2.waitKey(33) == 27: break cv2.destroyAllWindows()
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 5215, 13850, 29906, 13, 5215, 931, 13, 29937, 2158, 29898, 11023, 29906, 17255, 3259, 1649, 29897, 13, 13, 13, 13, 9398, 6332, 29918, 4351, 353, 525, 29883, 1503, 29889, 3134, 29915, 13, 9641, 29918, 4351, 353, 525, 29894, 29941, 29889, 17345, 29915, 13, 13, 13, 2962, 29918, 2230, 353, 931, 29889, 2230, 580, 13, 5030, 353, 13850, 29906, 29889, 15167, 21133, 545, 29898, 9641, 29918, 4351, 29897, 13, 29937, 1341, 4183, 403, 353, 2117, 29889, 657, 29898, 29945, 29897, 13, 4287, 29918, 9398, 6332, 353, 13850, 29906, 29889, 29907, 294, 6332, 2385, 3709, 29898, 9398, 6332, 29918, 4351, 29897, 13, 13, 29875, 29922, 29900, 13, 8000, 5852, 29901, 13, 1678, 474, 29922, 29875, 29974, 29896, 13, 1678, 3240, 29892, 10153, 353, 2117, 29889, 949, 580, 13, 1678, 565, 313, 1853, 29898, 2492, 29897, 1275, 1134, 29898, 8516, 22164, 13, 4706, 2867, 13, 268, 13, 1678, 16749, 353, 13850, 29906, 29889, 11023, 29873, 3306, 29898, 2492, 29892, 13850, 29906, 29889, 15032, 1955, 29918, 29933, 14345, 29906, 29954, 22800, 29897, 13, 268, 13, 1678, 18647, 353, 1559, 29918, 9398, 6332, 29889, 4801, 522, 15329, 17185, 29898, 21012, 29892, 29871, 29896, 29889, 29896, 29892, 29871, 29896, 29897, 13, 13, 1678, 363, 313, 29916, 29892, 29891, 29892, 29893, 29892, 29882, 29897, 297, 18647, 29901, 13, 4706, 3800, 29922, 11023, 29906, 29889, 1621, 2521, 29898, 2492, 22657, 29916, 29892, 29891, 21336, 29916, 29974, 29893, 29892, 29891, 29974, 29882, 21336, 29900, 29892, 29900, 29892, 29906, 29945, 29945, 511, 29906, 29897, 13, 308, 13, 1678, 13850, 29906, 29889, 326, 4294, 877, 9641, 742, 10153, 29897, 268, 13, 13, 1678, 13850, 29906, 29889, 326, 3539, 703, 6886, 426, 29900, 1836, 6173, 1642, 4830, 29898, 29875, 511, 1884, 29897, 13, 1678, 1596, 703, 5634, 1273, 29879, 6923, 11474, 29908, 1273, 313, 2230, 29889, 2230, 580, 448, 1369, 29918, 2230, 876, 13, 1678, 931, 29889, 17059, 29898, 29906, 29897, 13, 13, 268, 13, 1678, 565, 13850, 29906, 29889, 10685, 2558, 29898, 29941, 29941, 29897, 1275, 29871, 29906, 29955, 29901, 13, 4706, 2867, 13, 13, 11023, 29906, 29889, 20524, 3596, 7685, 580, 13, 2 ]
ewah/uploaders/base.py
soltanianalytics/ewah
2
185947
from airflow.utils.log.logging_mixin import LoggingMixin from ewah.hooks.base import EWAHBaseHook from ewah.constants import EWAHConstants as EC import math import pickle import os from copy import deepcopy from tempfile import TemporaryDirectory from typing import Optional, Type, Union, Dict, List, Any class EWAHBaseUploader(LoggingMixin): """Base class for all EWAH uploader classes aka Uploaders. Uploaders are classes that can receive data in a standardized format and upload it to a target data storage. Each Uploader uploads data to one type of target. For instance, the EWAHPostgresUploader loads data to PostgreSQL databases. The base class contains the basic methods shared by all Uploaders for the purpose of uploading data. Each target shall have a subclass derived from this class. """ upload_call_count = 0 def __init__( self, dwh_engine: str, dwh_conn: Type[EWAHBaseHook], load_strategy: str, cleaner: "EWAHCleaner", table_name: str, schema_name: str, schema_suffix: str = "_next", database_name: Optional[str] = None, primary_key: Optional[List[str]] = None, use_temp_pickling: bool = False, pickling_upload_chunk_size: int = 100000, pickle_compression: Optional[str] = None, deduplication_before_upload: bool = False, ) -> None: assert pickle_compression is None or pickle_compression in ( "gzip", "bz2", "lzma", ) if deduplication_before_upload: assert ( primary_key ), "Must set primary key if using deduplication_before_upload!" if use_temp_pickling: # Set a function to use for temporary pickle files if pickle_compression is None: self.pickle_file_open = open else: self.pickle_file_open = __import__(pickle_compression).open # Prepare file used for temporary data pickling self.temp_pickle_folder = TemporaryDirectory() self.temp_file_name = ( self.temp_pickle_folder.name + os.sep + "temp_pickle_file" ) self.temp_pickle_file = self.pickle_file_open(self.temp_file_name, "wb") super().__init__() self.dwh_engine = dwh_engine self.dwh_conn = dwh_conn self.dwh_hook = dwh_conn.get_hook() self.load_strategy = load_strategy self.cleaner = cleaner self.table_name = table_name self.schema_name = schema_name self.schema_suffix = schema_suffix self.database_name = database_name self.primary_key = primary_key self.use_temp_pickling = use_temp_pickling self.pickling_upload_chunk_size = pickling_upload_chunk_size self.deduplication_before_upload = deduplication_before_upload @classmethod def get_cleaner_callables(cls): # overwrite me for cleaner callables that are always called return [] @classmethod def get_schema_tasks(cls, *args, **kwargs): """ This classmethod needs to be overwritten by a child class and return a tuple of two tasks, the kickoff and final tasks for the data loading DAGs. The kickoff task is supposed to create a new, empty schema to use during data loading. The final task is supposed to replace the old with the new schema e.g. by removing the old schema and renaming the new schema. """ raise Exception("Not implemented!") @property def columns_definition(self): return self.cleaner.get_columns_definition(dwh_engine=self.dwh_engine) def _get_column_type(self, column_definition: dict) -> str: """Return the column type of the field. Returns the DWH engine specific default if there is none. :param column_definition: Dictionary containing details on this column, including optionally the column type. """ return column_definition.get( EC.QBC_FIELD_TYPE, EC.QBC_TYPE_MAPPING[self.dwh_engine].get(str), ) def upload_data( self, data: List[Dict[str, any]], metadata: Optional[Dict[str, Any]] = None, ) -> None: data = self.cleaner.clean_rows(rows=data, metadata=metadata) if self.primary_key: for pk_name in self.primary_key: if not pk_name in self.columns_definition.keys(): raise Exception( ("Column {0} does not exist but is " + "expected!").format( pk_name ) ) if self.use_temp_pickling: # earmark for later upload self._upload_via_pickling(data=data) else: # upload straightaway self._upload_data(data) def _upload_data(self, data=None): if not data: self.log.info("No data to upload!") return self.upload_call_count += 1 self.log.info( "Chunk {1}: Uploading {0} rows of data.".format( str(len(data)), str(self.upload_call_count), ) ) if self.deduplication_before_upload: # Some endpoints can't help but return the same record multiple times. # This is needed to deduplicate before uploading data. # It should be avoided whenever possible, however. self.log.info("Deduplicating data...") temp_dict = {} while data: datum = data.pop(0) id_tuple = () for key in self.primary_key: id_tuple += (datum.get(key),) temp_dict[id_tuple] = datum while temp_dict: key, value = temp_dict.popitem() data.append(value) if (self.upload_call_count > 1) or ( not (self.load_strategy == EC.LS_INSERT_REPLACE) ): self.log.info("Checking for, and applying schema changes.") self.log.info( "Added fields:\n\t{0}\n".format( "\n\t".join( self.detect_and_apply_schema_changes() or ["No fields were added."] ) ) ) self.create_or_update_table( data=data, upload_call_count=self.upload_call_count, primary_key=self.primary_key, commit=False, # See note below for reason ) """ Note on committing changes: The hook used for data uploading is created at the beginning of the execute function and automatically committed and closed at the end. DO NOT commit in this function, as multiple uploads may be required, and any intermediate commit may be subsequently followed by an error, which would then result in incomplete data committed. """ def _upload_via_pickling(self, data: Union[dict, List[dict]]): """Call this function to earmark a dictionary for later upload.""" assert self.use_temp_pickling, "Can only call function if using temp pickling!" if isinstance(data, dict): pickle.dump(data, self.temp_pickle_file) elif isinstance(data, list): self.log.info( "Pickling {0} rows of data for later upload...".format(len(data)) ) for row in data: assert isinstance( row, dict ), "Invalid data format for function! Must be dict or list of dicts!" pickle.dump(row, self.temp_pickle_file) else: raise Exception( "Invalid data format for function! Must be dict or list of dicts!" ) def _upload_from_pickle(self): """Call this function to upload previously pickled data.""" assert self.use_temp_pickling assert hasattr(self, "temp_pickle_file") self.temp_pickle_file.close() self.temp_pickle_file = self.pickle_file_open(self.temp_file_name, "rb") keep_unpickling = True while keep_unpickling: raw_data = [] for _ in range(self.pickling_upload_chunk_size): try: raw_data.append(pickle.load(self.temp_pickle_file)) except EOFError: # all done keep_unpickling = False break self._upload_data(raw_data) # re-open a new pickle file for new data self.temp_pickle_file.close() self.temp_pickle_file = self.pickle_file_open(self.temp_file_name, "wb") def finalize_upload(self): if self.use_temp_pickling: self._upload_from_pickle() def close(self): self.dwh_hook.close() def copy_table(self) -> None: """Copy the existing version of the table, including all data, if it exists.""" test_kwargs = {"table_name": self.table_name, "schema_name": self.schema_name} if self.database_name: test_kwargs["database_name"] = self.database_name if self.test_if_table_exists(**test_kwargs): if self.database_name: kwargs = {"database_name": self.database_name} else: kwargs = {} self.dwh_hook.execute( sql=self._COPY_TABLE.format( old_schema=self.schema_name, old_table=self.table_name, new_schema=self.schema_name + self.schema_suffix, new_table=self.table_name, **kwargs, ), commit=False, ) def detect_and_apply_schema_changes(self): # Note: Don't commit any changes! params = { "schema_name": self.schema_name + self.schema_suffix, "table_name": self.table_name, } if self.dwh_engine == EC.DWH_ENGINE_SNOWFLAKE: params["database_name"] = self.database_name elif self.dwh_engine == EC.DWH_ENGINE_BIGQUERY: params["project_id"] = self.database_name if not self.test_if_table_exists(**params): # Table did not previously exist, so there is nothing to do return list_of_old_columns = [ col[0].strip() for col in self.dwh_hook.execute_and_return_result( sql=self._QUERY_SCHEMA_CHANGES_COLUMNS.format(**params), params=params, return_dict=False, ) ] list_of_columns = [ col_name.strip() for col_name in list(self.columns_definition.keys()) ] new_columns = [] for column in list_of_columns: if not (column in list_of_old_columns): new_columns += [column] add_params = deepcopy(params) add_params["column_name"] = column add_params["column_type"] = self._get_column_type( self.columns_definition[column] ) self.dwh_hook.execute( sql=self._QUERY_SCHEMA_CHANGES_ADD_COLUMN.format( **add_params, ), commit=False, ) return new_columns def create_or_update_table( self, data, upload_call_count, primary_key=None, commit=False, ): # check this again with Snowflake!! database_name = self.database_name self.log.info( "Uploading {0} rows of data...".format( str(len(data)), ) ) kwargs = { "data": data, "table_name": self.table_name, "schema_name": self.schema_name, "schema_suffix": self.schema_suffix, "columns_definition": self.columns_definition, "load_strategy": self.load_strategy, "upload_call_count": upload_call_count, "primary_key": primary_key, } if database_name: kwargs["database_name"] = database_name self._create_or_update_table(**kwargs) if commit: self.dwh_hook.commit()
[ 1, 515, 4799, 1731, 29889, 13239, 29889, 1188, 29889, 21027, 29918, 28084, 262, 1053, 4522, 3460, 29924, 861, 262, 13, 13, 3166, 321, 29893, 801, 29889, 1251, 12117, 29889, 3188, 1053, 382, 12982, 29950, 5160, 29950, 2550, 13, 3166, 321, 29893, 801, 29889, 3075, 1934, 1053, 382, 12982, 29950, 26570, 408, 17522, 13, 13, 5215, 5844, 13, 5215, 5839, 280, 13, 5215, 2897, 13, 13, 3166, 3509, 1053, 6483, 8552, 13, 3166, 5694, 1445, 1053, 6789, 1971, 653, 9882, 13, 3166, 19229, 1053, 28379, 29892, 5167, 29892, 7761, 29892, 360, 919, 29892, 2391, 29892, 3139, 13, 13, 13, 1990, 382, 12982, 29950, 5160, 3373, 12657, 29898, 3403, 3460, 29924, 861, 262, 1125, 13, 1678, 9995, 5160, 770, 363, 599, 382, 12982, 29950, 6441, 261, 4413, 263, 1335, 5020, 1359, 414, 29889, 13, 13, 1678, 5020, 1359, 414, 526, 4413, 393, 508, 7150, 848, 297, 263, 3918, 1891, 3402, 322, 6441, 13, 1678, 372, 304, 263, 3646, 848, 8635, 29889, 7806, 5020, 12657, 6441, 29879, 848, 304, 697, 1134, 310, 3646, 29889, 13, 1678, 1152, 2777, 29892, 278, 382, 12982, 3954, 520, 7201, 3373, 12657, 15376, 848, 304, 4918, 7979, 4176, 21218, 29889, 13, 13, 1678, 450, 2967, 770, 3743, 278, 6996, 3519, 7258, 491, 599, 5020, 1359, 414, 363, 278, 6437, 310, 13, 1678, 6441, 292, 848, 29889, 7806, 3646, 4091, 505, 263, 19481, 10723, 515, 445, 770, 29889, 13, 1678, 9995, 13, 13, 1678, 6441, 29918, 4804, 29918, 2798, 353, 29871, 29900, 13, 13, 1678, 822, 4770, 2344, 12035, 13, 4706, 1583, 29892, 13, 4706, 270, 1332, 29918, 10599, 29901, 851, 29892, 13, 4706, 270, 1332, 29918, 13082, 29901, 5167, 29961, 29923, 12982, 29950, 5160, 29950, 2550, 1402, 13, 4706, 2254, 29918, 710, 8963, 29901, 851, 29892, 13, 4706, 27372, 29901, 376, 29923, 12982, 19127, 14044, 261, 613, 13, 4706, 1591, 29918, 978, 29901, 851, 29892, 13, 4706, 10938, 29918, 978, 29901, 851, 29892, 13, 4706, 10938, 29918, 2146, 600, 861, 29901, 851, 353, 11119, 4622, 613, 13, 4706, 2566, 29918, 978, 29901, 28379, 29961, 710, 29962, 353, 6213, 29892, 13, 4706, 7601, 29918, 1989, 29901, 28379, 29961, 1293, 29961, 710, 5262, 353, 6213, 29892, 13, 4706, 671, 29918, 7382, 29918, 23945, 1847, 29901, 6120, 353, 7700, 29892, 13, 4706, 5839, 1847, 29918, 9009, 29918, 29812, 29918, 2311, 29901, 938, 353, 29871, 29896, 29900, 29900, 29900, 29900, 29900, 29892, 13, 4706, 5839, 280, 29918, 510, 2590, 29901, 28379, 29961, 710, 29962, 353, 6213, 29892, 13, 4706, 28262, 786, 1414, 29918, 11083, 29918, 9009, 29901, 6120, 353, 7700, 29892, 13, 1678, 1723, 1599, 6213, 29901, 13, 4706, 4974, 5839, 280, 29918, 510, 2590, 338, 6213, 470, 5839, 280, 29918, 510, 2590, 297, 313, 13, 9651, 376, 29887, 7554, 613, 13, 9651, 376, 29890, 29920, 29906, 613, 13, 9651, 376, 29880, 29920, 655, 613, 13, 4706, 1723, 13, 13, 4706, 565, 28262, 786, 1414, 29918, 11083, 29918, 9009, 29901, 13, 9651, 4974, 313, 13, 18884, 7601, 29918, 1989, 13, 9651, 10353, 376, 29924, 504, 731, 7601, 1820, 565, 773, 28262, 786, 1414, 29918, 11083, 29918, 9009, 3850, 13, 13, 4706, 565, 671, 29918, 7382, 29918, 23945, 1847, 29901, 13, 9651, 396, 3789, 263, 740, 304, 671, 363, 13201, 5839, 280, 2066, 13, 9651, 565, 5839, 280, 29918, 510, 2590, 338, 6213, 29901, 13, 18884, 1583, 29889, 23945, 280, 29918, 1445, 29918, 3150, 353, 1722, 13, 9651, 1683, 29901, 13, 18884, 1583, 29889, 23945, 280, 29918, 1445, 29918, 3150, 353, 4770, 5215, 12035, 23945, 280, 29918, 510, 2590, 467, 3150, 13, 13, 9651, 396, 349, 3445, 598, 934, 1304, 363, 13201, 848, 5839, 1847, 13, 9651, 1583, 29889, 7382, 29918, 23945, 280, 29918, 12083, 353, 6789, 1971, 653, 9882, 580, 13, 9651, 1583, 29889, 7382, 29918, 1445, 29918, 978, 353, 313, 13, 18884, 1583, 29889, 7382, 29918, 23945, 280, 29918, 12083, 29889, 978, 718, 2897, 29889, 19570, 718, 376, 7382, 29918, 23945, 280, 29918, 1445, 29908, 13, 9651, 1723, 13, 9651, 1583, 29889, 7382, 29918, 23945, 280, 29918, 1445, 353, 1583, 29889, 23945, 280, 29918, 1445, 29918, 3150, 29898, 1311, 29889, 7382, 29918, 1445, 29918, 978, 29892, 376, 29893, 29890, 1159, 13, 13, 4706, 2428, 2141, 1649, 2344, 1649, 580, 13, 4706, 1583, 29889, 29881, 1332, 29918, 10599, 353, 270, 1332, 29918, 10599, 13, 4706, 1583, 29889, 29881, 1332, 29918, 13082, 353, 270, 1332, 29918, 13082, 13, 4706, 1583, 29889, 29881, 1332, 29918, 20849, 353, 270, 1332, 29918, 13082, 29889, 657, 29918, 20849, 580, 13, 4706, 1583, 29889, 1359, 29918, 710, 8963, 353, 2254, 29918, 710, 8963, 13, 4706, 1583, 29889, 14941, 261, 353, 27372, 13, 4706, 1583, 29889, 2371, 29918, 978, 353, 1591, 29918, 978, 13, 4706, 1583, 29889, 11010, 29918, 978, 353, 10938, 29918, 978, 13, 4706, 1583, 29889, 11010, 29918, 2146, 600, 861, 353, 10938, 29918, 2146, 600, 861, 13, 4706, 1583, 29889, 9803, 29918, 978, 353, 2566, 29918, 978, 13, 4706, 1583, 29889, 16072, 29918, 1989, 353, 7601, 29918, 1989, 13, 4706, 1583, 29889, 1509, 29918, 7382, 29918, 23945, 1847, 353, 671, 29918, 7382, 29918, 23945, 1847, 13, 4706, 1583, 29889, 23945, 1847, 29918, 9009, 29918, 29812, 29918, 2311, 353, 5839, 1847, 29918, 9009, 29918, 29812, 29918, 2311, 13, 4706, 1583, 29889, 7176, 786, 1414, 29918, 11083, 29918, 9009, 353, 28262, 786, 1414, 29918, 11083, 29918, 9009, 13, 13, 1678, 732, 1990, 5696, 13, 1678, 822, 679, 29918, 14941, 261, 29918, 4804, 1849, 29898, 25932, 1125, 13, 4706, 396, 26556, 592, 363, 27372, 1246, 1849, 393, 526, 2337, 2000, 13, 4706, 736, 5159, 13, 13, 1678, 732, 1990, 5696, 13, 1678, 822, 679, 29918, 11010, 29918, 20673, 29898, 25932, 29892, 334, 5085, 29892, 3579, 19290, 1125, 13, 4706, 9995, 13, 4706, 910, 770, 5696, 4225, 304, 367, 975, 17625, 491, 263, 2278, 770, 322, 736, 13, 4706, 263, 18761, 310, 1023, 9595, 29892, 278, 24817, 2696, 322, 2186, 9595, 363, 278, 848, 8363, 360, 10051, 29879, 29889, 13, 13, 4706, 450, 24817, 2696, 3414, 338, 7424, 304, 1653, 263, 716, 29892, 4069, 10938, 304, 671, 2645, 848, 13, 4706, 8363, 29889, 13, 13, 4706, 450, 2186, 3414, 338, 7424, 304, 5191, 278, 2030, 411, 278, 716, 10938, 321, 29889, 29887, 29889, 491, 13, 4706, 11077, 278, 2030, 10938, 322, 4325, 11500, 278, 716, 10938, 29889, 13, 4706, 9995, 13, 4706, 12020, 8960, 703, 3664, 8762, 29991, 1159, 13, 13, 1678, 732, 6799, 13, 1678, 822, 4341, 29918, 16553, 29898, 1311, 1125, 13, 4706, 736, 1583, 29889, 14941, 261, 29889, 657, 29918, 13099, 29918, 16553, 29898, 29881, 1332, 29918, 10599, 29922, 1311, 29889, 29881, 1332, 29918, 10599, 29897, 13, 13, 1678, 822, 903, 657, 29918, 4914, 29918, 1853, 29898, 1311, 29892, 1897, 29918, 16553, 29901, 9657, 29897, 1599, 851, 29901, 13, 4706, 9995, 11609, 278, 1897, 1134, 310, 278, 1746, 29889, 16969, 278, 360, 25039, 6012, 2702, 2322, 13, 4706, 565, 727, 338, 5642, 29889, 13, 13, 4706, 584, 3207, 1897, 29918, 16553, 29901, 13343, 6943, 4902, 373, 445, 1897, 29892, 13, 9651, 3704, 2984, 635, 278, 1897, 1134, 29889, 13, 4706, 9995, 13, 4706, 736, 1897, 29918, 16553, 29889, 657, 29898, 13, 9651, 17522, 29889, 29984, 5371, 29918, 3738, 27286, 29918, 11116, 29892, 13, 9651, 17522, 29889, 29984, 5371, 29918, 11116, 29918, 1529, 18009, 4214, 29961, 1311, 29889, 29881, 1332, 29918, 10599, 1822, 657, 29898, 710, 511, 13, 4706, 1723, 13, 13, 1678, 822, 6441, 29918, 1272, 29898, 13, 4706, 1583, 29892, 13, 4706, 848, 29901, 2391, 29961, 21533, 29961, 710, 29892, 738, 20526, 13, 4706, 15562, 29901, 28379, 29961, 21533, 29961, 710, 29892, 3139, 5262, 353, 6213, 29892, 13, 1678, 1723, 1599, 6213, 29901, 13, 13, 4706, 848, 353, 1583, 29889, 14941, 261, 29889, 14941, 29918, 5727, 29898, 5727, 29922, 1272, 29892, 15562, 29922, 19635, 29897, 13, 13, 4706, 565, 1583, 29889, 16072, 29918, 1989, 29901, 13, 9651, 363, 282, 29895, 29918, 978, 297, 1583, 29889, 16072, 29918, 1989, 29901, 13, 18884, 565, 451, 282, 29895, 29918, 978, 297, 1583, 29889, 13099, 29918, 16553, 29889, 8149, 7295, 13, 462, 1678, 12020, 8960, 29898, 13, 462, 4706, 4852, 4409, 426, 29900, 29913, 947, 451, 1863, 541, 338, 376, 718, 376, 9684, 29991, 2564, 4830, 29898, 13, 462, 9651, 282, 29895, 29918, 978, 13, 462, 4706, 1723, 13, 462, 1678, 1723, 13, 13, 4706, 565, 1583, 29889, 1509, 29918, 7382, 29918, 23945, 1847, 29901, 13, 9651, 396, 2326, 3502, 363, 2678, 6441, 13, 9651, 1583, 3032, 9009, 29918, 6071, 29918, 23945, 1847, 29898, 1272, 29922, 1272, 29897, 13, 4706, 1683, 29901, 13, 9651, 396, 6441, 7812, 21694, 13, 9651, 1583, 3032, 9009, 29918, 1272, 29898, 1272, 29897, 13, 13, 1678, 822, 903, 9009, 29918, 1272, 29898, 1311, 29892, 848, 29922, 8516, 1125, 13, 4706, 565, 451, 848, 29901, 13, 9651, 1583, 29889, 1188, 29889, 3888, 703, 3782, 848, 304, 6441, 29991, 1159, 13, 9651, 736, 13, 4706, 1583, 29889, 9009, 29918, 4804, 29918, 2798, 4619, 29871, 29896, 13, 4706, 1583, 29889, 1188, 29889, 3888, 29898, 13, 9651, 376, 1451, 2960, 426, 29896, 6177, 5020, 13234, 426, 29900, 29913, 4206, 310, 848, 1213, 29889, 4830, 29898, 13, 18884, 851, 29898, 2435, 29898, 1272, 8243, 13, 18884, 851, 29898, 1311, 29889, 9009, 29918, 4804, 29918, 2798, 511, 13, 9651, 1723, 13, 4706, 1723, 13, 13, 4706, 565, 1583, 29889, 7176, 786, 1414, 29918, 11083, 29918, 9009, 29901, 13, 9651, 396, 3834, 1095, 9748, 508, 29915, 29873, 1371, 541, 736, 278, 1021, 2407, 2999, 3064, 29889, 13, 9651, 396, 910, 338, 4312, 304, 28262, 786, 5926, 1434, 6441, 292, 848, 29889, 13, 9651, 396, 739, 881, 367, 28305, 10940, 1950, 29892, 3138, 29889, 13, 9651, 1583, 29889, 1188, 29889, 3888, 703, 29928, 287, 786, 506, 1218, 848, 856, 1159, 13, 9651, 5694, 29918, 8977, 353, 6571, 13, 9651, 1550, 848, 29901, 13, 18884, 1418, 398, 353, 848, 29889, 7323, 29898, 29900, 29897, 13, 18884, 1178, 29918, 23583, 353, 3861, 13, 18884, 363, 1820, 297, 1583, 29889, 16072, 29918, 1989, 29901, 13, 462, 1678, 1178, 29918, 23583, 4619, 313, 4130, 398, 29889, 657, 29898, 1989, 511, 29897, 13, 18884, 5694, 29918, 8977, 29961, 333, 29918, 23583, 29962, 353, 1418, 398, 13, 9651, 1550, 5694, 29918, 8977, 29901, 13, 18884, 1820, 29892, 995, 353, 5694, 29918, 8977, 29889, 7323, 667, 580, 13, 18884, 848, 29889, 4397, 29898, 1767, 29897, 13, 13, 4706, 565, 313, 1311, 29889, 9009, 29918, 4804, 29918, 2798, 1405, 29871, 29896, 29897, 470, 313, 13, 9651, 451, 313, 1311, 29889, 1359, 29918, 710, 8963, 1275, 17522, 29889, 8547, 29918, 19460, 29918, 1525, 7390, 11538, 29897, 13, 308, 1125, 13, 9651, 1583, 29889, 1188, 29889, 3888, 703, 5596, 292, 363, 29892, 322, 15399, 10938, 3620, 23157, 13, 9651, 1583, 29889, 1188, 29889, 3888, 29898, 13, 18884, 376, 2528, 287, 4235, 3583, 29876, 29905, 29873, 29912, 29900, 1012, 29876, 1642, 4830, 29898, 13, 462, 1678, 6634, 29876, 29905, 29873, 1642, 7122, 29898, 13, 462, 4706, 1583, 29889, 4801, 522, 29918, 392, 29918, 7302, 29918, 11010, 29918, 25990, 580, 13, 462, 4706, 470, 6796, 3782, 4235, 892, 2715, 1213, 29962, 13, 462, 1678, 1723, 13, 18884, 1723, 13, 9651, 1723, 13, 13, 4706, 1583, 29889, 3258, 29918, 272, 29918, 5504, 29918, 2371, 29898, 13, 9651, 848, 29922, 1272, 29892, 13, 9651, 6441, 29918, 4804, 29918, 2798, 29922, 1311, 29889, 9009, 29918, 4804, 29918, 2798, 29892, 13, 9651, 7601, 29918, 1989, 29922, 1311, 29889, 16072, 29918, 1989, 29892, 13, 9651, 9063, 29922, 8824, 29892, 29871, 396, 2823, 4443, 2400, 363, 2769, 13, 4706, 1723, 13, 4706, 9995, 3940, 373, 844, 5367, 3620, 29901, 13, 9651, 450, 12422, 1304, 363, 848, 6441, 292, 338, 2825, 472, 278, 6763, 310, 278, 13, 9651, 6222, 740, 322, 6336, 19355, 322, 5764, 472, 278, 1095, 29889, 13, 9651, 11662, 6058, 9063, 297, 445, 740, 29892, 408, 2999, 6441, 29879, 1122, 367, 3734, 29892, 13, 9651, 322, 738, 19697, 9063, 1122, 367, 17602, 5643, 491, 385, 13, 9651, 1059, 29892, 607, 723, 769, 1121, 297, 28907, 848, 19355, 29889, 13, 4706, 9995, 13, 13, 1678, 822, 903, 9009, 29918, 6071, 29918, 23945, 1847, 29898, 1311, 29892, 848, 29901, 7761, 29961, 8977, 29892, 2391, 29961, 8977, 5262, 1125, 13, 4706, 9995, 5594, 445, 740, 304, 2326, 3502, 263, 8600, 363, 2678, 6441, 1213, 15945, 13, 4706, 4974, 1583, 29889, 1509, 29918, 7382, 29918, 23945, 1847, 29892, 376, 6028, 871, 1246, 740, 565, 773, 5694, 5839, 1847, 3850, 13, 4706, 565, 338, 8758, 29898, 1272, 29892, 9657, 1125, 13, 9651, 5839, 280, 29889, 15070, 29898, 1272, 29892, 1583, 29889, 7382, 29918, 23945, 280, 29918, 1445, 29897, 13, 4706, 25342, 338, 8758, 29898, 1272, 29892, 1051, 1125, 13, 9651, 1583, 29889, 1188, 29889, 3888, 29898, 13, 18884, 376, 29925, 860, 1847, 426, 29900, 29913, 4206, 310, 848, 363, 2678, 6441, 856, 1642, 4830, 29898, 2435, 29898, 1272, 876, 13, 9651, 1723, 13, 9651, 363, 1948, 297, 848, 29901, 13, 18884, 4974, 338, 8758, 29898, 13, 462, 1678, 1948, 29892, 9657, 13, 18884, 10353, 376, 13919, 848, 3402, 363, 740, 29991, 19928, 367, 9657, 470, 1051, 310, 9657, 29879, 3850, 13, 18884, 5839, 280, 29889, 15070, 29898, 798, 29892, 1583, 29889, 7382, 29918, 23945, 280, 29918, 1445, 29897, 13, 4706, 1683, 29901, 13, 9651, 12020, 8960, 29898, 13, 18884, 376, 13919, 848, 3402, 363, 740, 29991, 19928, 367, 9657, 470, 1051, 310, 9657, 29879, 3850, 13, 9651, 1723, 13, 13, 1678, 822, 903, 9009, 29918, 3166, 29918, 23945, 280, 29898, 1311, 1125, 13, 4706, 9995, 5594, 445, 740, 304, 6441, 9251, 5839, 839, 848, 1213, 15945, 13, 4706, 4974, 1583, 29889, 1509, 29918, 7382, 29918, 23945, 1847, 13, 4706, 4974, 756, 5552, 29898, 1311, 29892, 376, 7382, 29918, 23945, 280, 29918, 1445, 1159, 13, 4706, 1583, 29889, 7382, 29918, 23945, 280, 29918, 1445, 29889, 5358, 580, 13, 4706, 1583, 29889, 7382, 29918, 23945, 280, 29918, 1445, 353, 1583, 29889, 23945, 280, 29918, 1445, 29918, 3150, 29898, 1311, 29889, 7382, 29918, 1445, 29918, 978, 29892, 376, 6050, 1159, 13, 4706, 3013, 29918, 348, 23945, 1847, 353, 5852, 13, 4706, 1550, 3013, 29918, 348, 23945, 1847, 29901, 13, 9651, 10650, 29918, 1272, 353, 5159, 13, 9651, 363, 903, 297, 3464, 29898, 1311, 29889, 23945, 1847, 29918, 9009, 29918, 29812, 29918, 2311, 1125, 13, 18884, 1018, 29901, 13, 462, 1678, 10650, 29918, 1272, 29889, 4397, 29898, 23945, 280, 29889, 1359, 29898, 1311, 29889, 7382, 29918, 23945, 280, 29918, 1445, 876, 13, 18884, 5174, 382, 9800, 2392, 29901, 13, 462, 1678, 396, 599, 2309, 13, 462, 1678, 3013, 29918, 348, 23945, 1847, 353, 7700, 13, 462, 1678, 2867, 13, 9651, 1583, 3032, 9009, 29918, 1272, 29898, 1610, 29918, 1272, 29897, 13, 4706, 396, 337, 29899, 3150, 263, 716, 5839, 280, 934, 363, 716, 848, 13, 4706, 1583, 29889, 7382, 29918, 23945, 280, 29918, 1445, 29889, 5358, 580, 13, 4706, 1583, 29889, 7382, 29918, 23945, 280, 29918, 1445, 353, 1583, 29889, 23945, 280, 29918, 1445, 29918, 3150, 29898, 1311, 29889, 7382, 29918, 1445, 29918, 978, 29892, 376, 29893, 29890, 1159, 13, 13, 1678, 822, 2186, 675, 29918, 9009, 29898, 1311, 1125, 13, 4706, 565, 1583, 29889, 1509, 29918, 7382, 29918, 23945, 1847, 29901, 13, 9651, 1583, 3032, 9009, 29918, 3166, 29918, 23945, 280, 580, 13, 13, 1678, 822, 3802, 29898, 1311, 1125, 13, 4706, 1583, 29889, 29881, 1332, 29918, 20849, 29889, 5358, 580, 13, 13, 1678, 822, 3509, 29918, 2371, 29898, 1311, 29897, 1599, 6213, 29901, 13, 4706, 9995, 11882, 278, 5923, 1873, 310, 278, 1591, 29892, 3704, 599, 848, 29892, 565, 372, 4864, 1213, 15945, 13, 4706, 1243, 29918, 19290, 353, 8853, 2371, 29918, 978, 1115, 1583, 29889, 2371, 29918, 978, 29892, 376, 11010, 29918, 978, 1115, 1583, 29889, 11010, 29918, 978, 29913, 13, 4706, 565, 1583, 29889, 9803, 29918, 978, 29901, 13, 9651, 1243, 29918, 19290, 3366, 9803, 29918, 978, 3108, 353, 1583, 29889, 9803, 29918, 978, 13, 4706, 565, 1583, 29889, 1688, 29918, 361, 29918, 2371, 29918, 9933, 29898, 1068, 1688, 29918, 19290, 1125, 13, 9651, 565, 1583, 29889, 9803, 29918, 978, 29901, 13, 18884, 9049, 5085, 353, 8853, 9803, 29918, 978, 1115, 1583, 29889, 9803, 29918, 978, 29913, 13, 9651, 1683, 29901, 13, 18884, 9049, 5085, 353, 6571, 13, 9651, 1583, 29889, 29881, 1332, 29918, 20849, 29889, 7978, 29898, 13, 18884, 4576, 29922, 1311, 3032, 3217, 20055, 29918, 21009, 29889, 4830, 29898, 13, 462, 1678, 2030, 29918, 11010, 29922, 1311, 29889, 11010, 29918, 978, 29892, 13, 462, 1678, 2030, 29918, 2371, 29922, 1311, 29889, 2371, 29918, 978, 29892, 13, 462, 1678, 716, 29918, 11010, 29922, 1311, 29889, 11010, 29918, 978, 718, 1583, 29889, 11010, 29918, 2146, 600, 861, 29892, 13, 462, 1678, 716, 29918, 2371, 29922, 1311, 29889, 2371, 29918, 978, 29892, 13, 462, 1678, 3579, 19290, 29892, 13, 18884, 10353, 13, 18884, 9063, 29922, 8824, 29892, 13, 9651, 1723, 13, 13, 1678, 822, 6459, 29918, 392, 29918, 7302, 29918, 11010, 29918, 25990, 29898, 1311, 1125, 13, 4706, 396, 3940, 29901, 3872, 29915, 29873, 9063, 738, 3620, 29991, 13, 4706, 8636, 353, 426, 13, 9651, 376, 11010, 29918, 978, 1115, 1583, 29889, 11010, 29918, 978, 718, 1583, 29889, 11010, 29918, 2146, 600, 861, 29892, 13, 9651, 376, 2371, 29918, 978, 1115, 1583, 29889, 2371, 29918, 978, 29892, 13, 4706, 500, 13, 4706, 565, 1583, 29889, 29881, 1332, 29918, 10599, 1275, 17522, 29889, 29928, 25039, 29918, 1430, 29954, 8895, 29918, 29903, 6632, 29956, 18823, 6059, 29901, 13, 9651, 8636, 3366, 9803, 29918, 978, 3108, 353, 1583, 29889, 9803, 29918, 978, 13, 4706, 25342, 1583, 29889, 29881, 1332, 29918, 10599, 1275, 17522, 29889, 29928, 25039, 29918, 1430, 29954, 8895, 29918, 29933, 6259, 13356, 24422, 29901, 13, 9651, 8636, 3366, 4836, 29918, 333, 3108, 353, 1583, 29889, 9803, 29918, 978, 13, 4706, 565, 451, 1583, 29889, 1688, 29918, 361, 29918, 2371, 29918, 9933, 29898, 1068, 7529, 1125, 13, 9651, 396, 6137, 1258, 451, 9251, 1863, 29892, 577, 727, 338, 3078, 304, 437, 13, 9651, 736, 13, 13, 4706, 1051, 29918, 974, 29918, 1025, 29918, 13099, 353, 518, 13, 9651, 784, 29961, 29900, 1822, 17010, 580, 13, 9651, 363, 784, 297, 1583, 29889, 29881, 1332, 29918, 20849, 29889, 7978, 29918, 392, 29918, 2457, 29918, 2914, 29898, 13, 18884, 4576, 29922, 1311, 3032, 13356, 24422, 29918, 29903, 3210, 26862, 29918, 3210, 24336, 29903, 29918, 15032, 5005, 3059, 29889, 4830, 29898, 1068, 7529, 511, 13, 18884, 8636, 29922, 7529, 29892, 13, 18884, 736, 29918, 8977, 29922, 8824, 29892, 13, 9651, 1723, 13, 4706, 4514, 13, 4706, 1051, 29918, 974, 29918, 13099, 353, 518, 13, 9651, 784, 29918, 978, 29889, 17010, 580, 363, 784, 29918, 978, 297, 1051, 29898, 1311, 29889, 13099, 29918, 16553, 29889, 8149, 3101, 13, 4706, 4514, 13, 13, 4706, 716, 29918, 13099, 353, 5159, 13, 4706, 363, 1897, 297, 1051, 29918, 974, 29918, 13099, 29901, 13, 9651, 565, 451, 313, 4914, 297, 1051, 29918, 974, 29918, 1025, 29918, 13099, 1125, 13, 18884, 716, 29918, 13099, 4619, 518, 4914, 29962, 13, 18884, 788, 29918, 7529, 353, 6483, 8552, 29898, 7529, 29897, 13, 18884, 788, 29918, 7529, 3366, 4914, 29918, 978, 3108, 353, 1897, 13, 18884, 788, 29918, 7529, 3366, 4914, 29918, 1853, 3108, 353, 1583, 3032, 657, 29918, 4914, 29918, 1853, 29898, 13, 462, 1678, 1583, 29889, 13099, 29918, 16553, 29961, 4914, 29962, 13, 18884, 1723, 13, 18884, 1583, 29889, 29881, 1332, 29918, 20849, 29889, 7978, 29898, 13, 462, 1678, 4576, 29922, 1311, 3032, 13356, 24422, 29918, 29903, 3210, 26862, 29918, 3210, 24336, 29903, 29918, 17744, 29918, 15032, 29127, 29889, 4830, 29898, 13, 462, 4706, 3579, 1202, 29918, 7529, 29892, 13, 462, 1678, 10353, 13, 462, 1678, 9063, 29922, 8824, 29892, 13, 18884, 1723, 13, 13, 4706, 736, 716, 29918, 13099, 13, 13, 1678, 822, 1653, 29918, 272, 29918, 5504, 29918, 2371, 29898, 13, 4706, 1583, 29892, 13, 4706, 848, 29892, 13, 4706, 6441, 29918, 4804, 29918, 2798, 29892, 13, 4706, 7601, 29918, 1989, 29922, 8516, 29892, 13, 4706, 9063, 29922, 8824, 29892, 13, 268, 1125, 13, 4706, 396, 1423, 445, 1449, 411, 24392, 29888, 433, 446, 6824, 13, 4706, 2566, 29918, 978, 353, 1583, 29889, 9803, 29918, 978, 13, 13, 4706, 1583, 29889, 1188, 29889, 3888, 29898, 13, 9651, 376, 3373, 13234, 426, 29900, 29913, 4206, 310, 848, 856, 1642, 4830, 29898, 13, 18884, 851, 29898, 2435, 29898, 1272, 8243, 13, 9651, 1723, 13, 4706, 1723, 13, 13, 4706, 9049, 5085, 353, 426, 13, 9651, 376, 1272, 1115, 848, 29892, 13, 9651, 376, 2371, 29918, 978, 1115, 1583, 29889, 2371, 29918, 978, 29892, 13, 9651, 376, 11010, 29918, 978, 1115, 1583, 29889, 11010, 29918, 978, 29892, 13, 9651, 376, 11010, 29918, 2146, 600, 861, 1115, 1583, 29889, 11010, 29918, 2146, 600, 861, 29892, 13, 9651, 376, 13099, 29918, 16553, 1115, 1583, 29889, 13099, 29918, 16553, 29892, 13, 9651, 376, 1359, 29918, 710, 8963, 1115, 1583, 29889, 1359, 29918, 710, 8963, 29892, 13, 9651, 376, 9009, 29918, 4804, 29918, 2798, 1115, 6441, 29918, 4804, 29918, 2798, 29892, 13, 9651, 376, 16072, 29918, 1989, 1115, 7601, 29918, 1989, 29892, 13, 4706, 500, 13, 4706, 565, 2566, 29918, 978, 29901, 13, 9651, 9049, 5085, 3366, 9803, 29918, 978, 3108, 353, 2566, 29918, 978, 13, 13, 4706, 1583, 3032, 3258, 29918, 272, 29918, 5504, 29918, 2371, 29898, 1068, 19290, 29897, 13, 13, 4706, 565, 9063, 29901, 13, 9651, 1583, 29889, 29881, 1332, 29918, 20849, 29889, 15060, 580, 13, 2 ]
numpysamples.py
rresender/python-samples
0
69312
import numpy n = int(input()) matrix = [] for i in range(n): matrix.append(list(map(float,input().split()))) print(round(numpy.linalg.det(matrix), 2))
[ 1, 1053, 12655, 13, 13, 29876, 353, 938, 29898, 2080, 3101, 13, 13, 5344, 353, 5159, 13, 13, 1454, 474, 297, 3464, 29898, 29876, 1125, 13, 1678, 4636, 29889, 4397, 29898, 1761, 29898, 1958, 29898, 7411, 29892, 2080, 2141, 5451, 580, 4961, 13, 13, 2158, 29898, 14486, 29898, 23749, 29889, 29880, 979, 29887, 29889, 4801, 29898, 5344, 511, 29871, 29906, 876, 13, 2 ]
sensors/pointsamplecam.py
BOTSlab/alvin
2
94027
""" A PointSampleCam emulates a camera which has been calibrated to associate real-world coordinates (xr, yr) with each pixel position (xp, yp). A calibration data file is consulted which provides these associations. """ import pymunk import numpy as np from math import atan2, sqrt, fabs from common import * from pymunk import ShapeFilter from configsingleton import ConfigSingleton # Our mechanism for selectively importing pyglet/GUI-related stuff. import gui_setting if gui_setting.use: import pyglet class PointSampleImage: def __init__(self, calib_array, neighbour_array): self.calib_array = calib_array # How costly is this? self.neighbour_array = neighbour_array # A list of masks, where each entry in the list corresponds to a row of # calib_array. self.n_rows = self.calib_array.shape[0] self.masks = [0] * self.n_rows class PointSampleCam: def __init__(self, calib_filename, detection_mask, acceptance_mask, frontal_only): config = ConfigSingleton.get_instance() self.min_distance = config.getfloat("PointSampleCam", "min_distance") self.max_distance = config.getfloat("PointSampleCam", "max_distance") self.max_abs_angle = config.getfloat("PointSampleCam", "max_abs_angle") # The detection mask is used to indicate all types of objects that # the sensor should be sensitive to. However, if a detected object # doesn't also match the acceptance mask then it will be treated as # a wall. self.detection_mask = detection_mask self.acceptance_mask = acceptance_mask self.calib_array = np.loadtxt(calib_filename, delimiter=',') self.calib_array[:,2] *= CM_TO_PIXELS self.calib_array[:,3] *= CM_TO_PIXELS # We will also store within calib_array the following additional # quantities derived from (xr, yr) so that we don't need to compute # these again. # angle of (xr, yr) w.r.t. to X_R axis --- atan2(yr, xr) # length of (xr, yr) --- sqrt(xr*xr + yr*yr) n_rows = self.calib_array.shape[0] # Add the two extra columns self.calib_array = np.append(self.calib_array, np.zeros((n_rows, 2)), axis=1) for i in range(n_rows): (xr, yr) = self.calib_array[i,2], self.calib_array[i,3] self.calib_array[i,4] = atan2(yr, xr) self.calib_array[i,5] = sqrt(xr*xr + yr*yr) if frontal_only: # Delete all rows with distance outside of [min_distance, # max_distance] and angle outside of [-max_abs_angle, max_abs_angle] delete_indices = [] for i in range(n_rows): angle = self.calib_array[i,4] dist = self.calib_array[i,5] if fabs(dist) < self.min_distance: delete_indices.append(i) if fabs(dist) > self.max_distance: delete_indices.append(i) if fabs(angle) > self.max_abs_angle: delete_indices.append(i) self.calib_array = np.delete(self.calib_array, delete_indices, axis=0) # We also pre-compute the indices of the neighbours for each pixel. self.neighbour_array = [] n_rows = self.calib_array.shape[0] for i in range(n_rows): #(ixi, iyi) = self.calib_array[i,0], self.calib_array[i,1] (ixr, iyr) = self.calib_array[i,2], self.calib_array[i,3] nghbrs = [] for j in range(i+1, n_rows): #(jxi, jyi) = self.calib_array[j,0], self.calib_array[j,1] (jxr, jyr) = self.calib_array[j,2], self.calib_array[j,3] """ Determining neighbourhood based on 8-adjacency dx = ixi - jxi dy = iyi - jyi ij_dist = sqrt(dx*dx + dy*dy) if ij_dist <= sqrt(2) + 0.01: nghbrs.append(j) """ # Determining neighbourhood based on a threshold distance dx = ixr - jxr dy = iyr - jyr ij_dist = sqrt(dx*dx + dy*dy) if ij_dist <= 50: nghbrs.append(j) self.neighbour_array.append(nghbrs) self.shape_filter = ShapeFilter(mask=self.detection_mask) def compute(self, env, robot): image = PointSampleImage(self.calib_array, self.neighbour_array) n_rows = self.calib_array.shape[0] for i in range(n_rows): # Coordinates of sensed point in robot ref. frame (xr, yr) = self.calib_array[i,2], self.calib_array[i,3] # Coordinates in world coordinates (xw, yw) = robot.body.local_to_world((xr, yr)) query_info = env.point_query_nearest((xw, yw), 0, self.shape_filter) if query_info != None: object_mask = query_info.shape.filter.categories if object_mask & self.acceptance_mask == 0: # The detected shape is not accepted, we will treat # it as a wall. object_mask = WALL_MASK image.masks[i] = object_mask return image def visualize(self, robot, image): n_rows = self.calib_array.shape[0] for i in range(n_rows): # Coordinates of sensed point in robot ref. frame (xr, yr) = self.calib_array[i,2], self.calib_array[i,3] # Coordinates in world coordinates (xw, yw) = robot.body.local_to_world((xr, yr)) pyglet.gl.glPointSize(3); if image.masks[i] == 0: color = (255, 255, 255) elif image.masks[i] == WALL_MASK: color = (255, 255, 0) elif image.masks[i] == ROBOT_MASK: color = (0, 255, 255) elif image.masks[i] == BLAST_LANDMARK_MASK: color = (0, 0, 255) elif image.masks[i] == POLE_LANDMARK_MASK: color = (255, 0, 0) elif image.masks[i] == ARC_LANDMARK_MASK: color = (0, 255, 0) elif image.masks[i] == RED_PUCK_MASK: color = (255, 0, 255) elif image.masks[i] == GREEN_PUCK_MASK: color = (0, 255, 255) elif image.masks[i] == BLUE_PUCK_MASK: color = (255, 255, 0) else: print("Unknown mask: {}".format(image.masks[i])) pyglet.graphics.draw(1, pyglet.gl.GL_POINTS, ('v2f', (xw, yw)), ('c3B', color)) pyglet.gl.glPointSize(1); """ # make module runnable from command line if __name__ == '__main__': print "RUN" sampler = PointSampler("../data/phase1_160x120.csv", 0, 0) sampler.compute(None, None) """
[ 1, 9995, 319, 8984, 17708, 14353, 953, 352, 1078, 263, 10656, 607, 756, 1063, 1208, 4626, 630, 304, 25836, 1855, 29899, 11526, 10350, 313, 29916, 29878, 29892, 343, 29878, 29897, 411, 1269, 15526, 2602, 313, 26330, 29892, 343, 29886, 467, 29871, 319, 1208, 26218, 848, 934, 338, 8799, 287, 607, 8128, 1438, 27733, 29889, 9995, 13, 13, 5215, 282, 962, 2960, 13, 5215, 12655, 408, 7442, 13, 3166, 5844, 1053, 472, 273, 29906, 29892, 18074, 2273, 29892, 285, 6897, 13, 3166, 3619, 1053, 334, 13, 3166, 282, 962, 2960, 1053, 1383, 4085, 5072, 13, 3166, 2295, 2976, 11285, 1053, 12782, 10873, 11285, 13, 13, 29937, 8680, 13336, 363, 1831, 3598, 28348, 19484, 1026, 29914, 29954, 3120, 29899, 12817, 6433, 29889, 13, 5215, 1410, 29875, 29918, 26740, 13, 361, 1410, 29875, 29918, 26740, 29889, 1509, 29901, 13, 1678, 1053, 19484, 1026, 13, 13, 1990, 8984, 17708, 2940, 29901, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 1208, 747, 29918, 2378, 29892, 17647, 29918, 2378, 1125, 13, 4706, 1583, 29889, 1052, 747, 29918, 2378, 353, 1208, 747, 29918, 2378, 396, 1128, 3438, 368, 338, 445, 29973, 13, 13, 4706, 1583, 29889, 484, 1141, 6526, 29918, 2378, 353, 17647, 29918, 2378, 13, 13, 4706, 396, 319, 1051, 310, 11105, 29879, 29892, 988, 1269, 6251, 297, 278, 1051, 16161, 304, 263, 1948, 310, 13, 4706, 396, 1208, 747, 29918, 2378, 29889, 13, 4706, 1583, 29889, 29876, 29918, 5727, 353, 1583, 29889, 1052, 747, 29918, 2378, 29889, 12181, 29961, 29900, 29962, 13, 4706, 1583, 29889, 13168, 29879, 353, 518, 29900, 29962, 334, 1583, 29889, 29876, 29918, 5727, 13, 13, 1990, 8984, 17708, 14353, 29901, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 1208, 747, 29918, 9507, 29892, 15326, 29918, 13168, 29892, 3544, 749, 29918, 13168, 29892, 4565, 284, 29918, 6194, 1125, 13, 4706, 2295, 353, 12782, 10873, 11285, 29889, 657, 29918, 8758, 580, 13, 4706, 1583, 29889, 1195, 29918, 19244, 353, 2295, 29889, 657, 7411, 703, 5228, 17708, 14353, 613, 376, 1195, 29918, 19244, 1159, 13, 4706, 1583, 29889, 3317, 29918, 19244, 353, 2295, 29889, 657, 7411, 703, 5228, 17708, 14353, 613, 376, 3317, 29918, 19244, 1159, 13, 4706, 1583, 29889, 3317, 29918, 6897, 29918, 2521, 353, 2295, 29889, 657, 7411, 703, 5228, 17708, 14353, 613, 376, 3317, 29918, 6897, 29918, 2521, 1159, 13, 13, 4706, 396, 450, 15326, 11105, 338, 1304, 304, 12266, 599, 4072, 310, 3618, 393, 13, 4706, 396, 278, 23530, 881, 367, 20502, 304, 29889, 29871, 2398, 29892, 565, 263, 17809, 1203, 13, 4706, 396, 1838, 29915, 29873, 884, 1993, 278, 3544, 749, 11105, 769, 372, 674, 367, 14914, 408, 13, 4706, 396, 263, 10090, 29889, 13, 4706, 1583, 29889, 29881, 2650, 428, 29918, 13168, 353, 15326, 29918, 13168, 13, 4706, 1583, 29889, 16044, 749, 29918, 13168, 353, 3544, 749, 29918, 13168, 13, 13, 4706, 1583, 29889, 1052, 747, 29918, 2378, 353, 7442, 29889, 1359, 3945, 29898, 1052, 747, 29918, 9507, 29892, 28552, 29922, 742, 1495, 13, 4706, 1583, 29889, 1052, 747, 29918, 2378, 7503, 29892, 29906, 29962, 334, 29922, 315, 29924, 29918, 4986, 29918, 2227, 29990, 6670, 29903, 13, 4706, 1583, 29889, 1052, 747, 29918, 2378, 7503, 29892, 29941, 29962, 334, 29922, 315, 29924, 29918, 4986, 29918, 2227, 29990, 6670, 29903, 13, 13, 4706, 396, 1334, 674, 884, 3787, 2629, 1208, 747, 29918, 2378, 278, 1494, 5684, 13, 4706, 396, 26855, 10723, 515, 313, 29916, 29878, 29892, 343, 29878, 29897, 577, 393, 591, 1016, 29915, 29873, 817, 304, 10272, 13, 4706, 396, 1438, 1449, 29889, 13, 4706, 396, 259, 10696, 310, 313, 29916, 29878, 29892, 343, 29878, 29897, 281, 29889, 29878, 29889, 29873, 29889, 304, 1060, 29918, 29934, 9685, 11474, 472, 273, 29906, 29898, 4316, 29892, 921, 29878, 29897, 13, 4706, 396, 259, 3309, 310, 313, 29916, 29878, 29892, 343, 29878, 29897, 462, 259, 11474, 18074, 2273, 29898, 29916, 29878, 29930, 29916, 29878, 718, 343, 29878, 29930, 4316, 29897, 13, 4706, 302, 29918, 5727, 353, 1583, 29889, 1052, 747, 29918, 2378, 29889, 12181, 29961, 29900, 29962, 13, 4706, 396, 3462, 278, 1023, 4805, 4341, 13, 4706, 1583, 29889, 1052, 747, 29918, 2378, 353, 7442, 29889, 4397, 29898, 1311, 29889, 1052, 747, 29918, 2378, 29892, 7442, 29889, 3298, 359, 3552, 29876, 29918, 5727, 29892, 29871, 29906, 8243, 9685, 29922, 29896, 29897, 13, 4706, 363, 474, 297, 3464, 29898, 29876, 29918, 5727, 1125, 13, 9651, 313, 29916, 29878, 29892, 343, 29878, 29897, 353, 1583, 29889, 1052, 747, 29918, 2378, 29961, 29875, 29892, 29906, 1402, 1583, 29889, 1052, 747, 29918, 2378, 29961, 29875, 29892, 29941, 29962, 13, 9651, 1583, 29889, 1052, 747, 29918, 2378, 29961, 29875, 29892, 29946, 29962, 353, 472, 273, 29906, 29898, 4316, 29892, 921, 29878, 29897, 13, 9651, 1583, 29889, 1052, 747, 29918, 2378, 29961, 29875, 29892, 29945, 29962, 353, 18074, 2273, 29898, 29916, 29878, 29930, 29916, 29878, 718, 343, 29878, 29930, 4316, 29897, 13, 13, 4706, 565, 4565, 284, 29918, 6194, 29901, 13, 9651, 396, 21267, 599, 4206, 411, 5418, 5377, 310, 518, 1195, 29918, 19244, 29892, 13, 9651, 396, 4236, 29918, 19244, 29962, 322, 10696, 5377, 310, 21069, 3317, 29918, 6897, 29918, 2521, 29892, 4236, 29918, 6897, 29918, 2521, 29962, 13, 9651, 5217, 29918, 513, 1575, 353, 5159, 13, 9651, 363, 474, 297, 3464, 29898, 29876, 29918, 5727, 1125, 13, 18884, 10696, 353, 1583, 29889, 1052, 747, 29918, 2378, 29961, 29875, 29892, 29946, 29962, 13, 18884, 1320, 353, 1583, 29889, 1052, 747, 29918, 2378, 29961, 29875, 29892, 29945, 29962, 13, 18884, 565, 285, 6897, 29898, 5721, 29897, 529, 1583, 29889, 1195, 29918, 19244, 29901, 13, 462, 1678, 5217, 29918, 513, 1575, 29889, 4397, 29898, 29875, 29897, 13, 13, 18884, 565, 285, 6897, 29898, 5721, 29897, 1405, 1583, 29889, 3317, 29918, 19244, 29901, 13, 462, 1678, 5217, 29918, 513, 1575, 29889, 4397, 29898, 29875, 29897, 13, 13, 18884, 565, 285, 6897, 29898, 2521, 29897, 1405, 1583, 29889, 3317, 29918, 6897, 29918, 2521, 29901, 13, 462, 1678, 5217, 29918, 513, 1575, 29889, 4397, 29898, 29875, 29897, 13, 13, 9651, 1583, 29889, 1052, 747, 29918, 2378, 353, 7442, 29889, 8143, 29898, 1311, 29889, 1052, 747, 29918, 2378, 29892, 5217, 29918, 513, 1575, 29892, 9685, 29922, 29900, 29897, 13, 308, 13, 4706, 396, 1334, 884, 758, 29899, 26017, 278, 16285, 310, 278, 22092, 2470, 363, 1269, 15526, 29889, 13, 4706, 1583, 29889, 484, 1141, 6526, 29918, 2378, 353, 5159, 13, 4706, 302, 29918, 5727, 353, 1583, 29889, 1052, 747, 29918, 2378, 29889, 12181, 29961, 29900, 29962, 13, 4706, 363, 474, 297, 3464, 29898, 29876, 29918, 5727, 1125, 13, 9651, 27355, 861, 29875, 29892, 474, 25675, 29897, 353, 1583, 29889, 1052, 747, 29918, 2378, 29961, 29875, 29892, 29900, 1402, 1583, 29889, 1052, 747, 29918, 2378, 29961, 29875, 29892, 29896, 29962, 13, 9651, 313, 861, 29878, 29892, 474, 4316, 29897, 353, 1583, 29889, 1052, 747, 29918, 2378, 29961, 29875, 29892, 29906, 1402, 1583, 29889, 1052, 747, 29918, 2378, 29961, 29875, 29892, 29941, 29962, 13, 9651, 8736, 29882, 1182, 29879, 353, 5159, 13, 9651, 363, 432, 297, 3464, 29898, 29875, 29974, 29896, 29892, 302, 29918, 5727, 1125, 13, 18884, 27355, 29926, 5389, 29892, 432, 25675, 29897, 353, 1583, 29889, 1052, 747, 29918, 2378, 29961, 29926, 29892, 29900, 1402, 1583, 29889, 1052, 747, 29918, 2378, 29961, 29926, 29892, 29896, 29962, 13, 18884, 313, 29926, 29916, 29878, 29892, 432, 4316, 29897, 353, 1583, 29889, 1052, 747, 29918, 2378, 29961, 29926, 29892, 29906, 1402, 1583, 29889, 1052, 747, 29918, 2378, 29961, 29926, 29892, 29941, 29962, 13, 13, 18884, 9995, 5953, 837, 2827, 29643, 2729, 373, 29871, 29947, 29899, 26859, 562, 3819, 13, 18884, 15414, 353, 474, 5389, 448, 432, 5389, 13, 18884, 13475, 353, 474, 25675, 448, 432, 25675, 13, 18884, 474, 29926, 29918, 5721, 353, 18074, 2273, 29898, 8235, 29930, 8235, 718, 13475, 29930, 4518, 29897, 13, 18884, 565, 474, 29926, 29918, 5721, 5277, 18074, 2273, 29898, 29906, 29897, 718, 29871, 29900, 29889, 29900, 29896, 29901, 13, 462, 1678, 8736, 29882, 1182, 29879, 29889, 4397, 29898, 29926, 29897, 13, 18884, 9995, 13, 13, 18884, 396, 5953, 837, 2827, 29643, 2729, 373, 263, 16897, 5418, 13, 18884, 15414, 353, 474, 29916, 29878, 448, 432, 29916, 29878, 13, 18884, 13475, 353, 474, 4316, 448, 432, 4316, 13, 18884, 474, 29926, 29918, 5721, 353, 18074, 2273, 29898, 8235, 29930, 8235, 718, 13475, 29930, 4518, 29897, 13, 18884, 565, 474, 29926, 29918, 5721, 5277, 29871, 29945, 29900, 29901, 13, 462, 1678, 8736, 29882, 1182, 29879, 29889, 4397, 29898, 29926, 29897, 13, 13, 9651, 1583, 29889, 484, 1141, 6526, 29918, 2378, 29889, 4397, 29898, 865, 29882, 1182, 29879, 29897, 13, 632, 13, 4706, 1583, 29889, 12181, 29918, 4572, 353, 1383, 4085, 5072, 29898, 13168, 29922, 1311, 29889, 29881, 2650, 428, 29918, 13168, 29897, 13, 13, 1678, 822, 10272, 29898, 1311, 29892, 8829, 29892, 19964, 1125, 13, 13, 4706, 1967, 353, 8984, 17708, 2940, 29898, 1311, 29889, 1052, 747, 29918, 2378, 29892, 1583, 29889, 484, 1141, 6526, 29918, 2378, 29897, 13, 13, 4706, 302, 29918, 5727, 353, 1583, 29889, 1052, 747, 29918, 2378, 29889, 12181, 29961, 29900, 29962, 13, 4706, 363, 474, 297, 3464, 29898, 29876, 29918, 5727, 1125, 13, 9651, 396, 3189, 24266, 310, 4771, 287, 1298, 297, 19964, 2143, 29889, 3515, 13, 9651, 313, 29916, 29878, 29892, 343, 29878, 29897, 353, 1583, 29889, 1052, 747, 29918, 2378, 29961, 29875, 29892, 29906, 1402, 1583, 29889, 1052, 747, 29918, 2378, 29961, 29875, 29892, 29941, 29962, 13, 13, 9651, 396, 3189, 24266, 297, 3186, 10350, 13, 9651, 313, 29916, 29893, 29892, 343, 29893, 29897, 353, 19964, 29889, 2587, 29889, 2997, 29918, 517, 29918, 11526, 3552, 29916, 29878, 29892, 343, 29878, 876, 13, 13, 9651, 2346, 29918, 3888, 353, 8829, 29889, 3149, 29918, 1972, 29918, 28502, 342, 3552, 29916, 29893, 29892, 343, 29893, 511, 29871, 29900, 29892, 1583, 29889, 12181, 29918, 4572, 29897, 13, 9651, 565, 2346, 29918, 3888, 2804, 6213, 29901, 13, 18884, 1203, 29918, 13168, 353, 2346, 29918, 3888, 29889, 12181, 29889, 4572, 29889, 20683, 13, 18884, 565, 1203, 29918, 13168, 669, 1583, 29889, 16044, 749, 29918, 13168, 1275, 29871, 29900, 29901, 13, 462, 1678, 396, 450, 17809, 8267, 338, 451, 9259, 29892, 591, 674, 7539, 13, 462, 1678, 396, 372, 408, 263, 10090, 29889, 13, 462, 1678, 1203, 29918, 13168, 353, 399, 9818, 29918, 1529, 16033, 13, 13, 18884, 1967, 29889, 13168, 29879, 29961, 29875, 29962, 353, 1203, 29918, 13168, 13, 13, 4706, 736, 1967, 13, 13, 1678, 822, 7604, 675, 29898, 1311, 29892, 19964, 29892, 1967, 1125, 13, 4706, 302, 29918, 5727, 353, 1583, 29889, 1052, 747, 29918, 2378, 29889, 12181, 29961, 29900, 29962, 13, 4706, 363, 474, 297, 3464, 29898, 29876, 29918, 5727, 1125, 13, 9651, 396, 3189, 24266, 310, 4771, 287, 1298, 297, 19964, 2143, 29889, 3515, 13, 9651, 313, 29916, 29878, 29892, 343, 29878, 29897, 353, 1583, 29889, 1052, 747, 29918, 2378, 29961, 29875, 29892, 29906, 1402, 1583, 29889, 1052, 747, 29918, 2378, 29961, 29875, 29892, 29941, 29962, 13, 13, 9651, 396, 3189, 24266, 297, 3186, 10350, 13, 9651, 313, 29916, 29893, 29892, 343, 29893, 29897, 353, 19964, 29889, 2587, 29889, 2997, 29918, 517, 29918, 11526, 3552, 29916, 29878, 29892, 343, 29878, 876, 13, 13, 9651, 19484, 1026, 29889, 3820, 29889, 3820, 5228, 3505, 29898, 29941, 416, 13, 9651, 565, 1967, 29889, 13168, 29879, 29961, 29875, 29962, 1275, 29871, 29900, 29901, 13, 18884, 2927, 353, 313, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 29897, 13, 9651, 25342, 1967, 29889, 13168, 29879, 29961, 29875, 29962, 1275, 399, 9818, 29918, 1529, 16033, 29901, 13, 18884, 2927, 353, 313, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29900, 29897, 13, 9651, 25342, 1967, 29889, 13168, 29879, 29961, 29875, 29962, 1275, 390, 14824, 2891, 29918, 1529, 16033, 29901, 13, 18884, 2927, 353, 313, 29900, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 29897, 13, 9651, 25342, 1967, 29889, 13168, 29879, 29961, 29875, 29962, 1275, 350, 4375, 1254, 29918, 29931, 9468, 1529, 29934, 29968, 29918, 1529, 16033, 29901, 13, 18884, 2927, 353, 313, 29900, 29892, 29871, 29900, 29892, 29871, 29906, 29945, 29945, 29897, 13, 9651, 25342, 1967, 29889, 13168, 29879, 29961, 29875, 29962, 1275, 21521, 1307, 29918, 29931, 9468, 1529, 29934, 29968, 29918, 1529, 16033, 29901, 13, 18884, 2927, 353, 313, 29906, 29945, 29945, 29892, 29871, 29900, 29892, 29871, 29900, 29897, 13, 9651, 25342, 1967, 29889, 13168, 29879, 29961, 29875, 29962, 1275, 9033, 29907, 29918, 29931, 9468, 1529, 29934, 29968, 29918, 1529, 16033, 29901, 13, 18884, 2927, 353, 313, 29900, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29900, 29897, 13, 9651, 25342, 1967, 29889, 13168, 29879, 29961, 29875, 29962, 1275, 390, 3352, 29918, 7056, 7077, 29918, 1529, 16033, 29901, 13, 18884, 2927, 353, 313, 29906, 29945, 29945, 29892, 29871, 29900, 29892, 29871, 29906, 29945, 29945, 29897, 13, 9651, 25342, 1967, 29889, 13168, 29879, 29961, 29875, 29962, 1275, 402, 1525, 1430, 29918, 7056, 7077, 29918, 1529, 16033, 29901, 13, 18884, 2927, 353, 313, 29900, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 29897, 13, 9651, 25342, 1967, 29889, 13168, 29879, 29961, 29875, 29962, 1275, 350, 29931, 4462, 29918, 7056, 7077, 29918, 1529, 16033, 29901, 13, 18884, 2927, 353, 313, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29900, 29897, 13, 9651, 1683, 29901, 13, 18884, 1596, 703, 14148, 11105, 29901, 6571, 1642, 4830, 29898, 3027, 29889, 13168, 29879, 29961, 29875, 12622, 13, 9651, 19484, 1026, 29889, 6420, 29889, 4012, 29898, 29896, 29892, 19484, 1026, 29889, 3820, 29889, 7239, 29918, 29925, 6992, 9375, 29892, 13, 18884, 6702, 29894, 29906, 29888, 742, 313, 29916, 29893, 29892, 343, 29893, 8243, 6702, 29883, 29941, 29933, 742, 2927, 876, 13, 13, 4706, 19484, 1026, 29889, 3820, 29889, 3820, 5228, 3505, 29898, 29896, 416, 13, 13, 15945, 29908, 13, 29937, 1207, 3883, 1065, 29876, 519, 515, 1899, 1196, 13, 361, 4770, 978, 1649, 1275, 525, 1649, 3396, 1649, 2396, 13, 1678, 1596, 376, 29934, 3904, 29908, 13, 1678, 3514, 20069, 353, 8984, 22966, 20069, 703, 6995, 1272, 29914, 21646, 29896, 29918, 29896, 29953, 29900, 29916, 29896, 29906, 29900, 29889, 7638, 613, 29871, 29900, 29892, 29871, 29900, 29897, 13, 1678, 3514, 20069, 29889, 26017, 29898, 8516, 29892, 6213, 29897, 13, 13, 15945, 29908, 13, 2 ]
tests/inputs/numpy-lib/54-some-numpy-ufuncs.py
helq/pytropos
4
118302
import numpy as np lst = [[1, 3, 4], [2, 8, 9]] a = np.size(lst) a_ = np.array(lst).size b = np.shape(lst) b_ = np.array(lst).shape c = np.ndim(lst) c_ = np.array(lst).ndim d = np.dtype(lst) d_ = np.array(lst).dtype # show_store()
[ 1, 1053, 12655, 408, 7442, 13, 13, 20155, 353, 5519, 29896, 29892, 29871, 29941, 29892, 29871, 29946, 1402, 518, 29906, 29892, 29871, 29947, 29892, 29871, 29929, 5262, 13, 29874, 353, 7442, 29889, 2311, 29898, 20155, 29897, 13, 29874, 29918, 353, 7442, 29889, 2378, 29898, 20155, 467, 2311, 13, 29890, 353, 7442, 29889, 12181, 29898, 20155, 29897, 13, 29890, 29918, 353, 7442, 29889, 2378, 29898, 20155, 467, 12181, 13, 29883, 353, 7442, 29889, 299, 326, 29898, 20155, 29897, 13, 29883, 29918, 353, 7442, 29889, 2378, 29898, 20155, 467, 299, 326, 13, 29881, 353, 7442, 29889, 29881, 1853, 29898, 20155, 29897, 13, 29881, 29918, 353, 7442, 29889, 2378, 29898, 20155, 467, 29881, 1853, 13, 13, 29937, 1510, 29918, 8899, 580, 13, 2 ]
tests/test_exceptions.py
david-house-harvard/canvas_python_sdk
21
94507
import unittest from canvas_sdk.exceptions import CanvasAPIError class TestExceptions(unittest.TestCase): longMessage = True def setUp(self): self.default_api_error = CanvasAPIError() def test_default_status_for_canvas_api_error(self): """ Test expected default status for instance of CanvasAPIError """ self.assertEqual(self.default_api_error.status_code, 500) def test_default_message_for_canvas_api_error(self): """ Test expected default msg attribute for instance of CanvasAPIError """ self.assertIsNone(self.default_api_error.error_msg) def test_default_error_json_for_canvas_api_error(self): """ Test expected default error_json attribute for instance of CanvasAPIError """ self.assertIsNone(self.default_api_error.error_json) def test_default_str_for_canvas_api_error(self): """ Test default CanvasAPIError instance represented as a str """ self.assertEqual('500', str(self.default_api_error)) def test_instance_str_for_canvas_api_error(self): """ Test string representation of CanvasAPIError with custom attributes """ status = 404 error_msg = 'This is a test message' error_json = {'Some error json'} api_error = CanvasAPIError(status_code=status, msg=error_msg, error_json=error_json) self.assertEqual('%d: %s' % (status, error_msg), str(api_error))
[ 1, 1053, 443, 27958, 13, 13, 3166, 10508, 29918, 15348, 29889, 11739, 29879, 1053, 1815, 4428, 8787, 2392, 13, 13, 13, 13, 1990, 4321, 2451, 29879, 29898, 348, 27958, 29889, 3057, 8259, 1125, 13, 1678, 1472, 3728, 353, 5852, 13, 13, 1678, 822, 731, 3373, 29898, 1311, 1125, 13, 4706, 1583, 29889, 4381, 29918, 2754, 29918, 2704, 353, 1815, 4428, 8787, 2392, 580, 13, 13, 1678, 822, 1243, 29918, 4381, 29918, 4882, 29918, 1454, 29918, 15257, 29918, 2754, 29918, 2704, 29898, 1311, 1125, 13, 4706, 9995, 4321, 3806, 2322, 4660, 363, 2777, 310, 1815, 4428, 8787, 2392, 9995, 13, 4706, 1583, 29889, 9294, 9843, 29898, 1311, 29889, 4381, 29918, 2754, 29918, 2704, 29889, 4882, 29918, 401, 29892, 29871, 29945, 29900, 29900, 29897, 13, 13, 1678, 822, 1243, 29918, 4381, 29918, 4906, 29918, 1454, 29918, 15257, 29918, 2754, 29918, 2704, 29898, 1311, 1125, 13, 4706, 9995, 4321, 3806, 2322, 10191, 5352, 363, 2777, 310, 1815, 4428, 8787, 2392, 9995, 13, 4706, 1583, 29889, 9294, 3624, 8516, 29898, 1311, 29889, 4381, 29918, 2754, 29918, 2704, 29889, 2704, 29918, 7645, 29897, 13, 13, 1678, 822, 1243, 29918, 4381, 29918, 2704, 29918, 3126, 29918, 1454, 29918, 15257, 29918, 2754, 29918, 2704, 29898, 1311, 1125, 13, 4706, 9995, 4321, 3806, 2322, 1059, 29918, 3126, 5352, 363, 2777, 310, 1815, 4428, 8787, 2392, 9995, 13, 4706, 1583, 29889, 9294, 3624, 8516, 29898, 1311, 29889, 4381, 29918, 2754, 29918, 2704, 29889, 2704, 29918, 3126, 29897, 13, 13, 1678, 822, 1243, 29918, 4381, 29918, 710, 29918, 1454, 29918, 15257, 29918, 2754, 29918, 2704, 29898, 1311, 1125, 13, 4706, 9995, 4321, 2322, 1815, 4428, 8787, 2392, 2777, 9875, 408, 263, 851, 9995, 13, 4706, 1583, 29889, 9294, 9843, 877, 29945, 29900, 29900, 742, 851, 29898, 1311, 29889, 4381, 29918, 2754, 29918, 2704, 876, 13, 13, 1678, 822, 1243, 29918, 8758, 29918, 710, 29918, 1454, 29918, 15257, 29918, 2754, 29918, 2704, 29898, 1311, 1125, 13, 4706, 9995, 4321, 1347, 8954, 310, 1815, 4428, 8787, 2392, 411, 2888, 8393, 9995, 13, 4706, 4660, 353, 29871, 29946, 29900, 29946, 13, 4706, 1059, 29918, 7645, 353, 525, 4013, 338, 263, 1243, 2643, 29915, 13, 4706, 1059, 29918, 3126, 353, 11117, 9526, 1059, 4390, 10827, 13, 13, 4706, 7882, 29918, 2704, 353, 1815, 4428, 8787, 2392, 29898, 4882, 29918, 401, 29922, 4882, 29892, 10191, 29922, 2704, 29918, 7645, 29892, 1059, 29918, 3126, 29922, 2704, 29918, 3126, 29897, 13, 4706, 1583, 29889, 9294, 9843, 877, 29995, 29881, 29901, 1273, 29879, 29915, 1273, 313, 4882, 29892, 1059, 29918, 7645, 511, 851, 29898, 2754, 29918, 2704, 876, 13, 2 ]
anopool/pool.py
willtrnr/anopool
0
31968
<filename>anopool/pool.py """Generic object pool""" from __future__ import annotations __all__ = [ "Manager", "Pool", ] import contextlib import dataclasses import logging import queue import threading from abc import ABCMeta from typing import Generator, Generic, Optional, TypeVar from ._common import DEFAULT_SIZE from .exceptions import PoolClosedError logger = logging.getLogger(__name__) _T = TypeVar("_T") class Manager(Generic[_T], metaclass=ABCMeta): """An pool object manager. Manages the lifecycle of pool objects. """ def create(self) -> _T: """Create a new pool object.""" def recycle(self, __obj: _T) -> None: """Check liveness and reset released objects. If the object is no longer valid, this method should raise an exception to signal it and prevent its return to the pool. A slot will be open to allow its replacement. Args: obj: The returned pool object. Raises: Exception: When the object is no longer valid. """ def discard(self, __obj: _T) -> None: """Perform cleanup of discarded objects. This method is called for discarding both invalid objects that failed the recycling and live objects on pool closure. Liveness should not be assumed and this method should ideally not raise any exception unless there's a failure that will lead to a resource leak. Args: obj: The object to be discarded. """ # pylint: disable=missing-class-docstring @dataclasses.dataclass class PoolState(Generic[_T]): is_open: threading.Event count: threading.Semaphore lock: threading.Condition idle: queue.SimpleQueue[_T] class Pool(Generic[_T]): """An object pool. Args: manager: The object manager to use. maxsize: Optional; The maximum number of concurrent objects available. """ _manager: Manager[_T] _max_size: int _state: PoolState[_T] def __init__( self, manager: Manager[_T], max_size: Optional[int] = None, ) -> None: if max_size is None: max_size = DEFAULT_SIZE elif max_size <= 0: raise ValueError("max_size must be at least 1") self._manager = manager self._max_size = max_size self._init_state() def __enter__(self: _T_Pool) -> _T_Pool: self.open() return self def __exit__(self, exc_type, exc_value, exc_tb) -> None: del exc_type, exc_value, exc_tb self.close() def _init_state(self) -> None: self._state = PoolState( is_open=threading.Event(), count=threading.BoundedSemaphore(self._max_size), lock=threading.Condition(lock=threading.Lock()), idle=queue.SimpleQueue(), ) def is_open(self) -> bool: """Check if the pool is open. Returns: bool: Whether the pool is open. """ return self._state.is_open.is_set() def open(self) -> None: """Initialize the pool.""" self._state.is_open.set() def close(self) -> None: """Close the pool and discard its objects.""" state = self._state if not state.is_open.is_set(): return self._init_state() state.is_open.clear() while True: try: self._manager.discard(state.idle.get_nowait()) except queue.Empty: break except Exception: # pylint: disable=broad-except logger.warning("Discard error, possible resource leak", exc_info=True) with state.lock: state.lock.notify_all() @contextlib.contextmanager def acquire(self) -> Generator[_T, None, None]: """Acquire an object from the pool. Yields: An object from the pool. """ state = self._state while True: if not state.is_open.is_set(): raise PoolClosedError() # Try to get an object from the pool first try: obj = state.idle.get_nowait() logger.debug("Checked out object from pool: %s", obj) break except queue.Empty: pass # If we can allocate more, create a new one # pylint: disable=consider-using-with if state.count.acquire(blocking=False): try: obj = self._manager.create() logger.debug("Created new object: %s", obj) break except: state.count.release() raise # Wait until an object is available or we can allocate more with state.lock: logger.debug("Waiting for free object or slot") state.lock.wait() try: yield obj finally: try: if not state.is_open.is_set(): raise PoolClosedError() self._manager.recycle(obj) logger.debug("Object succeeded recycle: %s", obj) if not state.is_open.is_set(): raise PoolClosedError() state.idle.put(obj) logger.debug("Object returned to pool: %s", obj) except Exception: # pylint: disable=broad-except logger.debug("Recycle failed discarding: %s", obj, exc_info=True) try: self._manager.discard(obj) except Exception: # pylint: disable=broad-except logger.warning( "Discard error, possible resource leak", exc_info=True ) state.count.release() finally: with state.lock: state.lock.notify() _T_Pool = TypeVar("_T_Pool", bound=Pool)
[ 1, 529, 9507, 29958, 273, 459, 1507, 29914, 10109, 29889, 2272, 13, 15945, 29908, 15809, 1203, 11565, 15945, 29908, 13, 13, 3166, 4770, 29888, 9130, 1649, 1053, 25495, 13, 13, 1649, 497, 1649, 353, 518, 13, 1678, 376, 3260, 613, 13, 1678, 376, 11426, 613, 13, 29962, 13, 13, 5215, 3030, 1982, 13, 5215, 848, 13203, 13, 5215, 12183, 13, 5215, 9521, 13, 5215, 3244, 292, 13, 3166, 25638, 1053, 16417, 19346, 13, 3166, 19229, 1053, 3251, 1061, 29892, 3251, 293, 29892, 28379, 29892, 5167, 9037, 13, 13, 3166, 869, 29918, 9435, 1053, 22236, 29918, 14226, 13, 3166, 869, 11739, 29879, 1053, 28625, 6821, 2662, 2392, 13, 13, 21707, 353, 12183, 29889, 657, 16363, 22168, 978, 1649, 29897, 13, 13, 13, 29918, 29911, 353, 5167, 9037, 703, 29918, 29911, 1159, 13, 13, 13, 1990, 15629, 29898, 15809, 28513, 29911, 1402, 1539, 562, 605, 29922, 19658, 19346, 1125, 13, 1678, 9995, 2744, 11565, 1203, 8455, 29889, 13, 13, 1678, 2315, 1179, 278, 11747, 17437, 310, 11565, 3618, 29889, 13, 1678, 9995, 13, 13, 1678, 822, 1653, 29898, 1311, 29897, 1599, 903, 29911, 29901, 13, 4706, 9995, 4391, 263, 716, 11565, 1203, 1213, 15945, 13, 13, 1678, 822, 1162, 13317, 29898, 1311, 29892, 4770, 5415, 29901, 903, 29911, 29897, 1599, 6213, 29901, 13, 4706, 9995, 5596, 301, 20193, 322, 10092, 5492, 3618, 29889, 13, 13, 4706, 960, 278, 1203, 338, 694, 5520, 2854, 29892, 445, 1158, 881, 12020, 385, 3682, 304, 13, 4706, 7182, 372, 322, 5557, 967, 736, 304, 278, 11565, 29889, 319, 21497, 674, 367, 1722, 304, 2758, 967, 13, 4706, 16920, 29889, 13, 13, 4706, 826, 3174, 29901, 13, 9651, 5446, 29901, 450, 4133, 11565, 1203, 29889, 13, 13, 4706, 390, 1759, 267, 29901, 13, 9651, 8960, 29901, 1932, 278, 1203, 338, 694, 5520, 2854, 29889, 13, 4706, 9995, 13, 13, 1678, 822, 2313, 538, 29898, 1311, 29892, 4770, 5415, 29901, 903, 29911, 29897, 1599, 6213, 29901, 13, 4706, 9995, 5894, 689, 5941, 786, 310, 2313, 25600, 3618, 29889, 13, 13, 4706, 910, 1158, 338, 2000, 363, 2313, 20272, 1716, 8340, 3618, 393, 5229, 278, 13, 4706, 1162, 29891, 19914, 322, 5735, 3618, 373, 11565, 18424, 29889, 365, 20193, 881, 451, 367, 12023, 322, 13, 4706, 445, 1158, 881, 1957, 635, 451, 12020, 738, 3682, 6521, 727, 29915, 29879, 263, 10672, 13, 4706, 393, 674, 3275, 304, 263, 6503, 24993, 29889, 13, 13, 4706, 826, 3174, 29901, 13, 9651, 5446, 29901, 450, 1203, 304, 367, 2313, 25600, 29889, 13, 4706, 9995, 13, 13, 13, 29937, 282, 2904, 524, 29901, 11262, 29922, 27259, 29899, 1990, 29899, 1514, 1807, 13, 29992, 1272, 13203, 29889, 1272, 1990, 13, 1990, 28625, 2792, 29898, 15809, 28513, 29911, 29962, 1125, 13, 1678, 338, 29918, 3150, 29901, 3244, 292, 29889, 2624, 13, 1678, 2302, 29901, 3244, 292, 29889, 28516, 12451, 487, 13, 1678, 7714, 29901, 3244, 292, 29889, 25255, 13, 1678, 28132, 29901, 9521, 29889, 15427, 10620, 28513, 29911, 29962, 13, 13, 13, 1990, 28625, 29898, 15809, 28513, 29911, 29962, 1125, 13, 1678, 9995, 2744, 1203, 11565, 29889, 13, 13, 1678, 826, 3174, 29901, 13, 4706, 8455, 29901, 450, 1203, 8455, 304, 671, 29889, 13, 4706, 4236, 2311, 29901, 28379, 29936, 450, 7472, 1353, 310, 21984, 3618, 3625, 29889, 13, 1678, 9995, 13, 13, 1678, 903, 12847, 29901, 15629, 28513, 29911, 29962, 13, 1678, 903, 3317, 29918, 2311, 29901, 938, 13, 13, 1678, 903, 3859, 29901, 28625, 2792, 28513, 29911, 29962, 13, 13, 1678, 822, 4770, 2344, 12035, 13, 4706, 1583, 29892, 13, 4706, 8455, 29901, 15629, 28513, 29911, 1402, 13, 4706, 4236, 29918, 2311, 29901, 28379, 29961, 524, 29962, 353, 6213, 29892, 13, 1678, 1723, 1599, 6213, 29901, 13, 4706, 565, 4236, 29918, 2311, 338, 6213, 29901, 13, 9651, 4236, 29918, 2311, 353, 22236, 29918, 14226, 13, 4706, 25342, 4236, 29918, 2311, 5277, 29871, 29900, 29901, 13, 9651, 12020, 7865, 2392, 703, 3317, 29918, 2311, 1818, 367, 472, 3203, 29871, 29896, 1159, 13, 4706, 1583, 3032, 12847, 353, 8455, 13, 4706, 1583, 3032, 3317, 29918, 2311, 353, 4236, 29918, 2311, 13, 4706, 1583, 3032, 2344, 29918, 3859, 580, 13, 13, 1678, 822, 4770, 5893, 12035, 1311, 29901, 903, 29911, 29918, 11426, 29897, 1599, 903, 29911, 29918, 11426, 29901, 13, 4706, 1583, 29889, 3150, 580, 13, 4706, 736, 1583, 13, 13, 1678, 822, 4770, 13322, 12035, 1311, 29892, 5566, 29918, 1853, 29892, 5566, 29918, 1767, 29892, 5566, 29918, 22625, 29897, 1599, 6213, 29901, 13, 4706, 628, 5566, 29918, 1853, 29892, 5566, 29918, 1767, 29892, 5566, 29918, 22625, 13, 4706, 1583, 29889, 5358, 580, 13, 13, 1678, 822, 903, 2344, 29918, 3859, 29898, 1311, 29897, 1599, 6213, 29901, 13, 4706, 1583, 3032, 3859, 353, 28625, 2792, 29898, 13, 9651, 338, 29918, 3150, 29922, 7097, 292, 29889, 2624, 3285, 13, 9651, 2302, 29922, 7097, 292, 29889, 29933, 7261, 28516, 12451, 487, 29898, 1311, 3032, 3317, 29918, 2311, 511, 13, 9651, 7714, 29922, 7097, 292, 29889, 25255, 29898, 908, 29922, 7097, 292, 29889, 16542, 25739, 13, 9651, 28132, 29922, 9990, 29889, 15427, 10620, 3285, 13, 4706, 1723, 13, 13, 1678, 822, 338, 29918, 3150, 29898, 1311, 29897, 1599, 6120, 29901, 13, 4706, 9995, 5596, 565, 278, 11565, 338, 1722, 29889, 13, 13, 4706, 16969, 29901, 13, 9651, 6120, 29901, 26460, 278, 11565, 338, 1722, 29889, 13, 4706, 9995, 13, 4706, 736, 1583, 3032, 3859, 29889, 275, 29918, 3150, 29889, 275, 29918, 842, 580, 13, 13, 1678, 822, 1722, 29898, 1311, 29897, 1599, 6213, 29901, 13, 4706, 9995, 6644, 6646, 278, 11565, 1213, 15945, 13, 4706, 1583, 3032, 3859, 29889, 275, 29918, 3150, 29889, 842, 580, 13, 13, 1678, 822, 3802, 29898, 1311, 29897, 1599, 6213, 29901, 13, 4706, 9995, 11123, 278, 11565, 322, 2313, 538, 967, 3618, 1213, 15945, 13, 4706, 2106, 353, 1583, 3032, 3859, 13, 13, 4706, 565, 451, 2106, 29889, 275, 29918, 3150, 29889, 275, 29918, 842, 7295, 13, 9651, 736, 13, 13, 4706, 1583, 3032, 2344, 29918, 3859, 580, 13, 13, 4706, 2106, 29889, 275, 29918, 3150, 29889, 8551, 580, 13, 4706, 1550, 5852, 29901, 13, 9651, 1018, 29901, 13, 18884, 1583, 3032, 12847, 29889, 2218, 7543, 29898, 3859, 29889, 333, 280, 29889, 657, 29918, 3707, 1249, 3101, 13, 9651, 5174, 9521, 29889, 8915, 29901, 13, 18884, 2867, 13, 9651, 5174, 8960, 29901, 29871, 396, 282, 2904, 524, 29901, 11262, 29922, 6729, 328, 29899, 19499, 13, 18884, 17927, 29889, 27392, 703, 4205, 7543, 1059, 29892, 1950, 6503, 24993, 613, 5566, 29918, 3888, 29922, 5574, 29897, 13, 4706, 411, 2106, 29889, 908, 29901, 13, 9651, 2106, 29889, 908, 29889, 25140, 29918, 497, 580, 13, 13, 1678, 732, 4703, 1982, 29889, 4703, 12847, 13, 1678, 822, 1274, 1548, 29898, 1311, 29897, 1599, 3251, 1061, 28513, 29911, 29892, 6213, 29892, 6213, 5387, 13, 4706, 9995, 10644, 1548, 385, 1203, 515, 278, 11565, 29889, 13, 13, 4706, 612, 969, 29879, 29901, 13, 9651, 530, 1203, 515, 278, 11565, 29889, 13, 4706, 9995, 13, 4706, 2106, 353, 1583, 3032, 3859, 13, 13, 4706, 1550, 5852, 29901, 13, 9651, 565, 451, 2106, 29889, 275, 29918, 3150, 29889, 275, 29918, 842, 7295, 13, 18884, 12020, 28625, 6821, 2662, 2392, 580, 13, 13, 9651, 396, 3967, 304, 679, 385, 1203, 515, 278, 11565, 937, 13, 9651, 1018, 29901, 13, 18884, 5446, 353, 2106, 29889, 333, 280, 29889, 657, 29918, 3707, 1249, 580, 13, 18884, 17927, 29889, 8382, 703, 17817, 714, 1203, 515, 11565, 29901, 1273, 29879, 613, 5446, 29897, 13, 18884, 2867, 13, 9651, 5174, 9521, 29889, 8915, 29901, 13, 18884, 1209, 13, 13, 9651, 396, 960, 591, 508, 23632, 901, 29892, 1653, 263, 716, 697, 13, 9651, 396, 282, 2904, 524, 29901, 11262, 29922, 3200, 1241, 29899, 4746, 29899, 2541, 13, 9651, 565, 2106, 29889, 2798, 29889, 562, 1548, 29898, 1271, 292, 29922, 8824, 1125, 13, 18884, 1018, 29901, 13, 462, 1678, 5446, 353, 1583, 3032, 12847, 29889, 3258, 580, 13, 462, 1678, 17927, 29889, 8382, 703, 20399, 716, 1203, 29901, 1273, 29879, 613, 5446, 29897, 13, 462, 1678, 2867, 13, 18884, 5174, 29901, 13, 462, 1678, 2106, 29889, 2798, 29889, 14096, 580, 13, 462, 1678, 12020, 13, 13, 9651, 396, 20340, 2745, 385, 1203, 338, 3625, 470, 591, 508, 23632, 901, 13, 9651, 411, 2106, 29889, 908, 29901, 13, 18884, 17927, 29889, 8382, 703, 15716, 292, 363, 3889, 1203, 470, 21497, 1159, 13, 18884, 2106, 29889, 908, 29889, 10685, 580, 13, 13, 4706, 1018, 29901, 13, 9651, 7709, 5446, 13, 4706, 7146, 29901, 13, 9651, 1018, 29901, 13, 18884, 565, 451, 2106, 29889, 275, 29918, 3150, 29889, 275, 29918, 842, 7295, 13, 462, 1678, 12020, 28625, 6821, 2662, 2392, 580, 13, 13, 18884, 1583, 3032, 12847, 29889, 276, 23090, 29898, 5415, 29897, 13, 18884, 17927, 29889, 8382, 703, 2061, 14792, 1162, 13317, 29901, 1273, 29879, 613, 5446, 29897, 13, 13, 18884, 565, 451, 2106, 29889, 275, 29918, 3150, 29889, 275, 29918, 842, 7295, 13, 462, 1678, 12020, 28625, 6821, 2662, 2392, 580, 13, 13, 18884, 2106, 29889, 333, 280, 29889, 649, 29898, 5415, 29897, 13, 18884, 17927, 29889, 8382, 703, 2061, 4133, 304, 11565, 29901, 1273, 29879, 613, 5446, 29897, 13, 9651, 5174, 8960, 29901, 29871, 396, 282, 2904, 524, 29901, 11262, 29922, 6729, 328, 29899, 19499, 13, 18884, 17927, 29889, 8382, 703, 4789, 13317, 5229, 2313, 20272, 29901, 1273, 29879, 613, 5446, 29892, 5566, 29918, 3888, 29922, 5574, 29897, 13, 18884, 1018, 29901, 13, 462, 1678, 1583, 3032, 12847, 29889, 2218, 7543, 29898, 5415, 29897, 13, 18884, 5174, 8960, 29901, 29871, 396, 282, 2904, 524, 29901, 11262, 29922, 6729, 328, 29899, 19499, 13, 462, 1678, 17927, 29889, 27392, 29898, 13, 462, 4706, 376, 4205, 7543, 1059, 29892, 1950, 6503, 24993, 613, 5566, 29918, 3888, 29922, 5574, 13, 462, 1678, 1723, 13, 18884, 2106, 29889, 2798, 29889, 14096, 580, 13, 9651, 7146, 29901, 13, 18884, 411, 2106, 29889, 908, 29901, 13, 462, 1678, 2106, 29889, 908, 29889, 25140, 580, 13, 13, 13, 29918, 29911, 29918, 11426, 353, 5167, 9037, 703, 29918, 29911, 29918, 11426, 613, 3216, 29922, 11426, 29897, 13, 2 ]
src/main_scrape.py
shhudspeth/covid_california_scrape
0
64554
<filename>src/main_scrape.py # main.py import csv import itertools import requests import bs4 import re import pandas as pd import scrape_utilities import sys from datetime import date def main(file_name): list_of_counties = scrape_utilities.read_csv(file_name) print('making a dictionary of data') dictionary_data = scrape_utilities.make_data_dict(list_of_counties) print('writing to dictionary') scrape_utilities.write_to_csv(dictionary_data) if __name__ == '__main__': args = sys.argv if len(args) >= 2: file = args[1] main(file)
[ 1, 529, 9507, 29958, 4351, 29914, 3396, 29918, 1557, 336, 412, 29889, 2272, 13, 29937, 1667, 29889, 2272, 13, 5215, 11799, 13, 5215, 4256, 8504, 13, 5215, 7274, 13, 5215, 24512, 29946, 13, 5215, 337, 13, 5215, 11701, 408, 10518, 13, 5215, 24559, 412, 29918, 4422, 1907, 13, 5215, 10876, 13, 13, 13, 3166, 12865, 1053, 2635, 13, 13, 13, 13, 1753, 1667, 29898, 1445, 29918, 978, 1125, 13, 13, 1678, 1051, 29918, 974, 29918, 2798, 583, 353, 24559, 412, 29918, 4422, 1907, 29889, 949, 29918, 7638, 29898, 1445, 29918, 978, 29897, 13, 1678, 1596, 877, 28990, 263, 8600, 310, 848, 1495, 13, 1678, 8600, 29918, 1272, 353, 24559, 412, 29918, 4422, 1907, 29889, 5675, 29918, 1272, 29918, 8977, 29898, 1761, 29918, 974, 29918, 2798, 583, 29897, 13, 1678, 1596, 877, 16554, 304, 8600, 1495, 13, 1678, 24559, 412, 29918, 4422, 1907, 29889, 3539, 29918, 517, 29918, 7638, 29898, 27126, 29918, 1272, 29897, 13, 13, 13, 361, 4770, 978, 1649, 1275, 525, 1649, 3396, 1649, 2396, 13, 1678, 6389, 353, 10876, 29889, 19218, 13, 1678, 565, 7431, 29898, 5085, 29897, 6736, 29871, 29906, 29901, 13, 4706, 934, 353, 6389, 29961, 29896, 29962, 13, 13, 1678, 1667, 29898, 1445, 29897, 13, 2 ]
docs/examples/callback_example.py
seanrcollings/arc
2
123801
import arc @arc.command() def command(): print("command execution") @command.callback() def callback(args: dict, ctx: arc.Context): print("before execution") yield print("after execution") command()
[ 1, 1053, 15232, 13, 13, 13, 29992, 5666, 29889, 6519, 580, 13, 1753, 1899, 7295, 13, 1678, 1596, 703, 6519, 8225, 1159, 13, 13, 13, 29992, 6519, 29889, 14035, 580, 13, 1753, 6939, 29898, 5085, 29901, 9657, 29892, 12893, 29901, 15232, 29889, 2677, 1125, 13, 1678, 1596, 703, 11083, 8225, 1159, 13, 1678, 7709, 13, 1678, 1596, 703, 7045, 8225, 1159, 13, 13, 13, 6519, 580, 2 ]
SolarTracer.py
fatyogi/epever-upower-tracer
2
185712
import minimalmodbus # on/off ON = 1 OFF = 0 # PV array PVvolt = 0x3100 PVamps = 0x3101 PVwattL = 0x3102 PVwattH = 0x3103 PVstat = 0x3201 # battery BAvolt = 0x3104 BAamps = 0x3105 BAwattL = 0x3106 BAwattH = 0x3107 BAtemp = 0x3110 BAperc = 0x311A BAstat = 0x3200 # DC load DCvolt = 0x310C DCamps = 0x310D DCwattL = 0x310E DCwattH = 0x310F # Statistics PVkwhTotal = 0x3312 DCkwhTotal = 0x330A PVkwhToday = 0x330C DCkwhToday = 0x3304 # Settings BatteryType=0x9000 BatteryCapacity=0x9001 TempCompensationCoeff=0x9002 OverVoltageDisconnect=0x9003 ChargingLimitVoltage=0x9004 OverVoltageReconnect=0x9005 EqualizationVoltage=0x9006 BoostVoltage=0x9007 FloatVoltage=0x9008 BoostReconnectVoltage=0x9009 LowVoltageReconnect=0x900A UnderVoltageRecover=0x900B UnderVoltageWarning=0x900C LowVoltageDisconnect=0x900D DischargingLimitVoltage=0x900E class SolarTracer: """A member of SolarTracer communication class.""" # connect to device def __init__(self, device = '/dev/ttyXRUSB0', serialid = 1): self.device = device self.id = serialid self.instrument = 0 def connect(self): try: self.instrument = minimalmodbus.Instrument(self.device, self.id) except minimalmodbus.serial.SerialException: return -1 self.instrument.serial.baudrate = 115200 self.instrument.serial.bytesize = 8 self.instrument.serial.parity = minimalmodbus.serial.PARITY_NONE self.instrument.serial.stopbits = 1 self.instrument.serial.timeout = 1.2 self.instrument.mode = minimalmodbus.MODE_RTU return 0 # read informational register def readReg(self,register): try: reading = self.instrument.read_register(register, 2, 4) return reading except IOError: return -2 # read parameter def readParam(self,register,decimals=2,func=3): try: reading = self.instrument.read_register(register, decimals, func) return reading except IOError: return -2 # write parameter def writeParam(self,register,value,decimals=2,func=16): try: reading = self.instrument.write_register(register, value, decimals, func) return 0 except IOError as err: return -2 except ValueError: print "Could not convert data!" return -3
[ 1, 1053, 13114, 1545, 8262, 13, 13, 29937, 373, 29914, 2696, 13, 1164, 353, 29871, 29896, 13, 27681, 353, 29871, 29900, 13, 13, 29937, 349, 29963, 1409, 13, 29925, 29963, 1555, 29873, 353, 29871, 29900, 29916, 29941, 29896, 29900, 29900, 13, 29925, 29963, 15092, 353, 29871, 29900, 29916, 29941, 29896, 29900, 29896, 13, 29925, 29963, 29893, 1131, 29931, 353, 29871, 29900, 29916, 29941, 29896, 29900, 29906, 13, 29925, 29963, 29893, 1131, 29950, 353, 29871, 29900, 29916, 29941, 29896, 29900, 29941, 13, 29925, 29963, 6112, 353, 29871, 29900, 29916, 29941, 29906, 29900, 29896, 13, 13, 29937, 16988, 13, 5688, 1555, 29873, 353, 29871, 29900, 29916, 29941, 29896, 29900, 29946, 13, 5688, 15092, 353, 29871, 29900, 29916, 29941, 29896, 29900, 29945, 13, 5688, 29893, 1131, 29931, 353, 29871, 29900, 29916, 29941, 29896, 29900, 29953, 13, 5688, 29893, 1131, 29950, 353, 29871, 29900, 29916, 29941, 29896, 29900, 29955, 13, 5688, 7382, 353, 29871, 29900, 29916, 29941, 29896, 29896, 29900, 13, 5688, 546, 29883, 353, 29871, 29900, 29916, 29941, 29896, 29896, 29909, 13, 5688, 6112, 353, 29871, 29900, 29916, 29941, 29906, 29900, 29900, 13, 13, 29937, 13681, 2254, 13, 12696, 1555, 29873, 353, 29871, 29900, 29916, 29941, 29896, 29900, 29907, 13, 12696, 15092, 353, 29871, 29900, 29916, 29941, 29896, 29900, 29928, 13, 12696, 29893, 1131, 29931, 353, 29871, 29900, 29916, 29941, 29896, 29900, 29923, 13, 12696, 29893, 1131, 29950, 353, 29871, 29900, 29916, 29941, 29896, 29900, 29943, 13, 13, 29937, 27098, 13, 29925, 29963, 29895, 1332, 11536, 353, 29871, 29900, 29916, 29941, 29941, 29896, 29906, 13, 12696, 29895, 1332, 11536, 353, 29871, 29900, 29916, 29941, 29941, 29900, 29909, 13, 29925, 29963, 29895, 1332, 29911, 397, 388, 353, 29871, 29900, 29916, 29941, 29941, 29900, 29907, 13, 12696, 29895, 1332, 29911, 397, 388, 353, 29871, 29900, 29916, 29941, 29941, 29900, 29946, 13, 13, 29937, 19215, 13, 29933, 2620, 29891, 1542, 29922, 29900, 29916, 29929, 29900, 29900, 29900, 13, 29933, 2620, 29891, 12415, 5946, 29922, 29900, 29916, 29929, 29900, 29900, 29896, 13, 15637, 6843, 575, 362, 29907, 7297, 600, 29922, 29900, 29916, 29929, 29900, 29900, 29906, 13, 3563, 13072, 29873, 482, 4205, 6915, 29922, 29900, 29916, 29929, 29900, 29900, 29941, 13, 1451, 1191, 292, 24445, 13072, 29873, 482, 29922, 29900, 29916, 29929, 29900, 29900, 29946, 13, 3563, 13072, 29873, 482, 1123, 6915, 29922, 29900, 29916, 29929, 29900, 29900, 29945, 13, 9843, 2133, 13072, 29873, 482, 29922, 29900, 29916, 29929, 29900, 29900, 29953, 13, 8431, 520, 13072, 29873, 482, 29922, 29900, 29916, 29929, 29900, 29900, 29955, 13, 11031, 13072, 29873, 482, 29922, 29900, 29916, 29929, 29900, 29900, 29947, 13, 8431, 520, 1123, 6915, 13072, 29873, 482, 29922, 29900, 29916, 29929, 29900, 29900, 29929, 13, 29931, 340, 13072, 29873, 482, 1123, 6915, 29922, 29900, 29916, 29929, 29900, 29900, 29909, 13, 29177, 13072, 29873, 482, 4789, 957, 29922, 29900, 29916, 29929, 29900, 29900, 29933, 13, 29177, 13072, 29873, 482, 22709, 29922, 29900, 29916, 29929, 29900, 29900, 29907, 13, 29931, 340, 13072, 29873, 482, 4205, 6915, 29922, 29900, 29916, 29929, 29900, 29900, 29928, 13, 29928, 783, 1191, 292, 24445, 13072, 29873, 482, 29922, 29900, 29916, 29929, 29900, 29900, 29923, 13, 13, 1990, 4956, 279, 29911, 945, 261, 29901, 13, 12, 15945, 29908, 29909, 4509, 310, 4956, 279, 29911, 945, 261, 12084, 770, 1213, 15945, 13, 13, 12, 29937, 4511, 304, 4742, 13, 12, 1753, 4770, 2344, 12035, 1311, 29892, 4742, 353, 8207, 3359, 29914, 4349, 29990, 28283, 1744, 29900, 742, 7797, 333, 353, 29871, 29896, 1125, 13, 12, 12, 1311, 29889, 10141, 353, 4742, 13, 12, 12, 1311, 29889, 333, 353, 7797, 333, 13, 12, 12, 1311, 29889, 2611, 15461, 353, 29871, 29900, 13, 13, 13, 12, 1753, 4511, 29898, 1311, 1125, 13, 12, 1678, 1018, 29901, 13, 12, 9651, 1583, 29889, 2611, 15461, 353, 13114, 1545, 8262, 29889, 3379, 15461, 29898, 1311, 29889, 10141, 29892, 1583, 29889, 333, 29897, 13, 12, 1678, 5174, 13114, 1545, 8262, 29889, 15550, 29889, 9125, 2451, 29901, 13, 12, 9651, 736, 448, 29896, 13, 13, 12, 1678, 1583, 29889, 2611, 15461, 29889, 15550, 29889, 2291, 566, 10492, 353, 29871, 29896, 29896, 29945, 29906, 29900, 29900, 13, 12, 1678, 1583, 29889, 2611, 15461, 29889, 15550, 29889, 13193, 675, 353, 29871, 29947, 13, 12, 1678, 1583, 29889, 2611, 15461, 29889, 15550, 29889, 862, 537, 259, 353, 13114, 1545, 8262, 29889, 15550, 29889, 16320, 11937, 29918, 29940, 12413, 13, 12, 1678, 1583, 29889, 2611, 15461, 29889, 15550, 29889, 9847, 14836, 353, 29871, 29896, 13, 12, 1678, 1583, 29889, 2611, 15461, 29889, 15550, 29889, 15619, 29871, 353, 29871, 29896, 29889, 29906, 13, 12, 1678, 1583, 29889, 2611, 15461, 29889, 8513, 353, 13114, 1545, 8262, 29889, 20387, 29918, 13079, 29965, 13, 12, 1678, 736, 29871, 29900, 13, 13, 12, 29937, 1303, 1871, 1288, 6036, 13, 12, 1753, 1303, 4597, 29898, 1311, 29892, 9573, 1125, 13, 12, 1678, 1018, 29901, 13, 12, 9651, 5183, 353, 1583, 29889, 2611, 15461, 29889, 949, 29918, 9573, 29898, 9573, 29892, 29871, 29906, 29892, 29871, 29946, 29897, 13, 12, 9651, 736, 5183, 13, 12, 1678, 5174, 10663, 2392, 29901, 13, 12, 9651, 736, 448, 29906, 13, 13, 12, 29937, 1303, 3443, 13, 12, 1753, 1303, 4736, 29898, 1311, 29892, 9573, 29892, 7099, 326, 1338, 29922, 29906, 29892, 9891, 29922, 29941, 1125, 13, 12, 1678, 1018, 29901, 13, 12, 9651, 5183, 353, 1583, 29889, 2611, 15461, 29889, 949, 29918, 9573, 29898, 9573, 29892, 1602, 326, 1338, 29892, 3653, 29897, 13, 12, 9651, 736, 5183, 13, 12, 1678, 5174, 10663, 2392, 29901, 13, 12, 9651, 736, 448, 29906, 13, 13, 12, 29937, 2436, 3443, 13, 12, 1753, 2436, 4736, 29898, 1311, 29892, 9573, 29892, 1767, 29892, 7099, 326, 1338, 29922, 29906, 29892, 9891, 29922, 29896, 29953, 1125, 13, 12, 1678, 1018, 29901, 13, 12, 9651, 5183, 353, 1583, 29889, 2611, 15461, 29889, 3539, 29918, 9573, 29898, 9573, 29892, 995, 29892, 1602, 326, 1338, 29892, 3653, 29897, 13, 12, 9651, 736, 29871, 29900, 13, 12, 1678, 5174, 10663, 2392, 408, 4589, 29901, 13, 12, 268, 12, 12, 2457, 448, 29906, 13, 12, 1678, 5174, 7865, 2392, 29901, 13, 268, 12, 12, 12, 2158, 376, 23323, 451, 3588, 848, 3850, 13, 268, 12, 12, 12, 2457, 448, 29941, 13, 13, 13, 13, 2 ]
main.py
GuilhermeMikin/EnergyEfficiencyproject
0
124070
<gh_stars>0 from clientModbus import ClienteMODBUS dbpath = "C:\\Users\\<NAME>\\Documents\\GitHub\\EnergyEfficiencyproject\\DB\\database1.db" c = ClienteMODBUS('127.0.0.1', 502, dbpath=dbpath) c.atendimento()
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 3132, 2111, 8262, 1053, 12477, 29872, 6720, 4051, 3308, 13, 13, 2585, 2084, 353, 376, 29907, 22298, 5959, 1966, 29966, 5813, 29958, 1966, 20128, 1966, 28712, 16046, 1966, 29923, 1089, 1927, 29923, 2416, 13396, 4836, 1966, 4051, 1966, 9803, 29896, 29889, 2585, 29908, 13, 13, 29883, 353, 12477, 29872, 6720, 4051, 3308, 877, 29896, 29906, 29955, 29889, 29900, 29889, 29900, 29889, 29896, 742, 29871, 29945, 29900, 29906, 29892, 4833, 2084, 29922, 2585, 2084, 29897, 13, 29883, 29889, 271, 355, 6174, 580, 2 ]
chatapp/backend/endpoints/messages.py
Nipa-Code/ChatApp
0
87305
<filename>chatapp/backend/endpoints/messages.py from fastapi import APIRouter, Request from chatapp.backend.utils.auth import ( tokenList, bannedList, auth, AuthenticationRequired, ) from chatapp.backend.errors.error import NonExistentValueError from chatapp.backend.ratelimits import limiter import logging from datetime import datetime log = logging.getLogger(__name__) router = APIRouter() @router.get("/messages") @AuthenticationRequired async def messages_get(request: Request, token: str, message: str): log.info(f"GET request to endpoint /messages from client {request.client.host}") return {"content": message, "time": datetime.now().strftime("%Y-%m-%d %H:%M:%S")} @router.post("/messages") @AuthenticationRequired async def messages_post(token: str, request: Request, message: str = None): log.info(f"POST request to endpoint /messages from client {request.client.host}")
[ 1, 529, 9507, 29958, 305, 532, 407, 29914, 27852, 29914, 355, 9748, 29914, 19158, 29889, 2272, 13, 3166, 5172, 2754, 1053, 3450, 23971, 29892, 10729, 13, 13, 3166, 521, 532, 407, 29889, 27852, 29889, 13239, 29889, 5150, 1053, 313, 13, 1678, 5993, 1293, 29892, 13, 1678, 289, 11310, 1293, 29892, 13, 1678, 4817, 29892, 13, 1678, 27241, 19347, 29892, 13, 29897, 13, 3166, 521, 532, 407, 29889, 27852, 29889, 12523, 29889, 2704, 1053, 10050, 1252, 9696, 1917, 2392, 13, 3166, 521, 532, 407, 29889, 27852, 29889, 3605, 295, 326, 1169, 1053, 2485, 1524, 13, 13, 5215, 12183, 13, 3166, 12865, 1053, 12865, 13, 13, 1188, 353, 12183, 29889, 657, 16363, 22168, 978, 1649, 29897, 13, 13, 15140, 353, 3450, 23971, 580, 13, 13, 13, 29992, 15140, 29889, 657, 11974, 19158, 1159, 13, 29992, 16746, 19347, 13, 12674, 822, 7191, 29918, 657, 29898, 3827, 29901, 10729, 29892, 5993, 29901, 851, 29892, 2643, 29901, 851, 1125, 13, 1678, 1480, 29889, 3888, 29898, 29888, 29908, 7194, 2009, 304, 16248, 847, 19158, 515, 3132, 426, 3827, 29889, 4645, 29889, 3069, 27195, 13, 1678, 736, 8853, 3051, 1115, 2643, 29892, 376, 2230, 1115, 12865, 29889, 3707, 2141, 710, 615, 603, 11702, 29979, 19222, 29885, 19222, 29881, 1273, 29950, 16664, 29924, 16664, 29903, 1159, 29913, 13, 13, 13, 29992, 15140, 29889, 2490, 11974, 19158, 1159, 13, 29992, 16746, 19347, 13, 12674, 822, 7191, 29918, 2490, 29898, 6979, 29901, 851, 29892, 2009, 29901, 10729, 29892, 2643, 29901, 851, 353, 6213, 1125, 13, 1678, 1480, 29889, 3888, 29898, 29888, 29908, 5438, 2009, 304, 16248, 847, 19158, 515, 3132, 426, 3827, 29889, 4645, 29889, 3069, 27195, 13, 2 ]
leo/modes/velocity.py
ATikhonov2/leo-editor
1,550
44096
# Leo colorizer control file for velocity mode. # This file is in the public domain. # Properties for velocity mode. properties = { "commentEnd": "*#", "commentStart": "#*", "lineComment": "##", } # Attributes dict for velocity_main ruleset. velocity_main_attributes_dict = { "default": "null", "digit_re": "", "escape": "", "highlight_digits": "true", "ignore_case": "true", "no_word_sep": "", } # Attributes dict for velocity_velocity ruleset. velocity_velocity_attributes_dict = { "default": "null", "digit_re": "", "escape": "", "highlight_digits": "true", "ignore_case": "true", "no_word_sep": "", } # Attributes dict for velocity_javascript ruleset. velocity_javascript_attributes_dict = { "default": "MARKUP", "digit_re": "", "escape": "", "highlight_digits": "true", "ignore_case": "true", "no_word_sep": "", } # Attributes dict for velocity_javascript2 ruleset. velocity_javascript2_attributes_dict = { "default": "MARKUP", "digit_re": "(0x[[:xdigit:]]+[lL]?|[[:digit:]]+(e[[:digit:]]*)?[lLdDfF]?)", "escape": "\\", "highlight_digits": "true", "ignore_case": "false", "no_word_sep": "", } # Attributes dict for velocity_back_to_html ruleset. velocity_back_to_html_attributes_dict = { "default": "MARKUP", "digit_re": "(0x[[:xdigit:]]+[lL]?|[[:digit:]]+(e[[:digit:]]*)?[lLdDfF]?)", "escape": "\\", "highlight_digits": "true", "ignore_case": "false", "no_word_sep": "", } # Attributes dict for velocity_css ruleset. velocity_css_attributes_dict = { "default": "MARKUP", "digit_re": "(0x[[:xdigit:]]+[lL]?|[[:digit:]]+(e[[:digit:]]*)?[lLdDfF]?)", "escape": "\\", "highlight_digits": "true", "ignore_case": "false", "no_word_sep": "", } # Attributes dict for velocity_css2 ruleset. velocity_css2_attributes_dict = { "default": "MARKUP", "digit_re": "[[:digit:]]+(pt|pc|in|mm|cm|em|ex|px|ms|s|%)", "escape": "\\", "highlight_digits": "true", "ignore_case": "true", "no_word_sep": "-_", } # Dictionary of attributes dictionaries for velocity mode. attributesDictDict = { "velocity_back_to_html": velocity_back_to_html_attributes_dict, "velocity_css": velocity_css_attributes_dict, "velocity_css2": velocity_css2_attributes_dict, "velocity_javascript": velocity_javascript_attributes_dict, "velocity_javascript2": velocity_javascript2_attributes_dict, "velocity_main": velocity_main_attributes_dict, "velocity_velocity": velocity_velocity_attributes_dict, } # Keywords dict for velocity_main ruleset. velocity_main_keywords_dict = {} # Keywords dict for velocity_velocity ruleset. velocity_velocity_keywords_dict = { "#else": "keyword1", "#elseif": "keyword1", "#end": "keyword1", "#foreach": "keyword1", "#if": "keyword1", "#include": "keyword1", "#macro": "keyword1", "#parse": "keyword1", "#set": "keyword1", "#stop": "keyword1", } # Keywords dict for velocity_javascript ruleset. velocity_javascript_keywords_dict = {} # Keywords dict for velocity_javascript2 ruleset. velocity_javascript2_keywords_dict = {} # Keywords dict for velocity_back_to_html ruleset. velocity_back_to_html_keywords_dict = {} # Keywords dict for velocity_css ruleset. velocity_css_keywords_dict = {} # Keywords dict for velocity_css2 ruleset. velocity_css2_keywords_dict = {} # Dictionary of keywords dictionaries for velocity mode. keywordsDictDict = { "velocity_back_to_html": velocity_back_to_html_keywords_dict, "velocity_css": velocity_css_keywords_dict, "velocity_css2": velocity_css2_keywords_dict, "velocity_javascript": velocity_javascript_keywords_dict, "velocity_javascript2": velocity_javascript2_keywords_dict, "velocity_main": velocity_main_keywords_dict, "velocity_velocity": velocity_velocity_keywords_dict, } # Rules for velocity_main ruleset. def velocity_rule0(colorer, s, i): return colorer.match_span(s, i, kind="comment1", begin="<!--", end="-->", at_line_start=False, at_whitespace_end=False, at_word_start=False, delegate="",exclude_match=False, no_escape=False, no_line_break=False, no_word_break=False) def velocity_rule1(colorer, s, i): return colorer.match_span(s, i, kind="markup", begin="<SCRIPT", end="</SCRIPT>", at_line_start=False, at_whitespace_end=False, at_word_start=False, delegate="velocity::javascript",exclude_match=False, no_escape=False, no_line_break=False, no_word_break=False) def velocity_rule2(colorer, s, i): return colorer.match_span(s, i, kind="markup", begin="<STYLE", end="</STYLE>", at_line_start=False, at_whitespace_end=False, at_word_start=False, delegate="velocity::css",exclude_match=False, no_escape=False, no_line_break=False, no_word_break=False) def velocity_rule3(colorer, s, i): return colorer.match_span(s, i, kind="keyword2", begin="<!", end=">", at_line_start=False, at_whitespace_end=False, at_word_start=False, delegate="xml::dtd-tags",exclude_match=False, no_escape=False, no_line_break=False, no_word_break=False) def velocity_rule4(colorer, s, i): return colorer.match_span(s, i, kind="markup", begin="<", end=">", at_line_start=False, at_whitespace_end=False, at_word_start=False, delegate="html::tags",exclude_match=False, no_escape=False, no_line_break=False, no_word_break=False) def velocity_rule5(colorer, s, i): return colorer.match_span(s, i, kind="literal2", begin="&", end=";", at_line_start=False, at_whitespace_end=False, at_word_start=False, delegate="",exclude_match=False, no_escape=False, no_line_break=False, no_word_break=True) # Rules dict for velocity_main ruleset. rulesDict1 = { "&": [velocity_rule5,], "<": [velocity_rule0,velocity_rule1,velocity_rule2,velocity_rule3,velocity_rule4,], } # Rules for velocity_velocity ruleset. def velocity_rule6(colorer, s, i): return colorer.match_span(s, i, kind="comment2", begin="#*", end="*#", at_line_start=False, at_whitespace_end=False, at_word_start=False, delegate="",exclude_match=False, no_escape=False, no_line_break=False, no_word_break=False) def velocity_rule7(colorer, s, i): return colorer.match_eol_span(s, i, kind="comment3", seq="##", at_line_start=False, at_whitespace_end=False, at_word_start=False, delegate="", exclude_match=False) def velocity_rule8(colorer, s, i): return colorer.match_span(s, i, kind="keyword3", begin="${", end="}", at_line_start=False, at_whitespace_end=False, at_word_start=False, delegate="",exclude_match=False, no_escape=False, no_line_break=True, no_word_break=False) def velocity_rule9(colorer, s, i): return colorer.match_mark_following(s, i, kind="keyword3", pattern="$!", at_line_start=False, at_whitespace_end=False, at_word_start=False, exclude_match=False) def velocity_rule10(colorer, s, i): return colorer.match_mark_following(s, i, kind="keyword3", pattern="$", at_line_start=False, at_whitespace_end=False, at_word_start=False, exclude_match=False) def velocity_rule11(colorer, s, i): return colorer.match_keywords(s, i) # Rules dict for velocity_velocity ruleset. rulesDict2 = { "#": [velocity_rule6,velocity_rule7,velocity_rule11,], "$": [velocity_rule8,velocity_rule9,velocity_rule10,], "0": [velocity_rule11,], "1": [velocity_rule11,], "2": [velocity_rule11,], "3": [velocity_rule11,], "4": [velocity_rule11,], "5": [velocity_rule11,], "6": [velocity_rule11,], "7": [velocity_rule11,], "8": [velocity_rule11,], "9": [velocity_rule11,], "@": [velocity_rule11,], "A": [velocity_rule11,], "B": [velocity_rule11,], "C": [velocity_rule11,], "D": [velocity_rule11,], "E": [velocity_rule11,], "F": [velocity_rule11,], "G": [velocity_rule11,], "H": [velocity_rule11,], "I": [velocity_rule11,], "J": [velocity_rule11,], "K": [velocity_rule11,], "L": [velocity_rule11,], "M": [velocity_rule11,], "N": [velocity_rule11,], "O": [velocity_rule11,], "P": [velocity_rule11,], "Q": [velocity_rule11,], "R": [velocity_rule11,], "S": [velocity_rule11,], "T": [velocity_rule11,], "U": [velocity_rule11,], "V": [velocity_rule11,], "W": [velocity_rule11,], "X": [velocity_rule11,], "Y": [velocity_rule11,], "Z": [velocity_rule11,], "a": [velocity_rule11,], "b": [velocity_rule11,], "c": [velocity_rule11,], "d": [velocity_rule11,], "e": [velocity_rule11,], "f": [velocity_rule11,], "g": [velocity_rule11,], "h": [velocity_rule11,], "i": [velocity_rule11,], "j": [velocity_rule11,], "k": [velocity_rule11,], "l": [velocity_rule11,], "m": [velocity_rule11,], "n": [velocity_rule11,], "o": [velocity_rule11,], "p": [velocity_rule11,], "q": [velocity_rule11,], "r": [velocity_rule11,], "s": [velocity_rule11,], "t": [velocity_rule11,], "u": [velocity_rule11,], "v": [velocity_rule11,], "w": [velocity_rule11,], "x": [velocity_rule11,], "y": [velocity_rule11,], "z": [velocity_rule11,], } # Rules for velocity_javascript ruleset. def velocity_rule12(colorer, s, i): return colorer.match_seq(s, i, kind="markup", seq=">", at_line_start=False, at_whitespace_end=False, at_word_start=False, delegate="velocity::javascript2") def velocity_rule13(colorer, s, i): return colorer.match_seq(s, i, kind="markup", seq="SRC=", at_line_start=False, at_whitespace_end=False, at_word_start=False, delegate="velocity::back_to_html") # Rules dict for velocity_javascript ruleset. rulesDict3 = { ">": [velocity_rule12,], "S": [velocity_rule13,], } # Rules for velocity_javascript2 ruleset. # Rules dict for velocity_javascript2 ruleset. rulesDict4 = {} # Rules for velocity_back_to_html ruleset. def velocity_rule14(colorer, s, i): return colorer.match_seq(s, i, kind="markup", seq=">", at_line_start=False, at_whitespace_end=False, at_word_start=False, delegate="velocity::main") # Rules dict for velocity_back_to_html ruleset. rulesDict5 = { ">": [velocity_rule14,], } # Rules for velocity_css ruleset. def velocity_rule15(colorer, s, i): return colorer.match_seq(s, i, kind="markup", seq=">", at_line_start=False, at_whitespace_end=False, at_word_start=False, delegate="velocity::css2") # Rules dict for velocity_css ruleset. rulesDict6 = { ">": [velocity_rule15,], } # Rules for velocity_css2 ruleset. # Rules dict for velocity_css2 ruleset. rulesDict7 = {} # x.rulesDictDict for velocity mode. rulesDictDict = { "velocity_back_to_html": rulesDict5, "velocity_css": rulesDict6, "velocity_css2": rulesDict7, "velocity_javascript": rulesDict3, "velocity_javascript2": rulesDict4, "velocity_main": rulesDict1, "velocity_velocity": rulesDict2, } # Import dict for velocity mode. importDict = { "velocity_css2": ["velocity_css2::velocity","css::main",], "velocity_javascript2": ["velocity_javascript2::velocity","javascript::main",], "velocity_main": ["velocity_main::velocity",], }
[ 1, 396, 22533, 2927, 3950, 2761, 934, 363, 12885, 4464, 22993, 13, 29937, 910, 934, 338, 297, 278, 970, 5354, 22993, 13, 30004, 13, 29937, 21582, 363, 12885, 4464, 22993, 13, 11330, 353, 3336, 13, 1678, 376, 9342, 5044, 1115, 26345, 29937, 15231, 13, 1678, 376, 9342, 4763, 1115, 12305, 29930, 15231, 13, 1678, 376, 1220, 20001, 1115, 376, 2277, 15231, 13, 8117, 13, 30004, 13, 29937, 6212, 5026, 9657, 363, 12885, 29918, 3396, 6865, 300, 22993, 13, 955, 25245, 29918, 3396, 29918, 15697, 29918, 8977, 353, 3336, 13, 1678, 376, 4381, 1115, 376, 4304, 15231, 13, 1678, 376, 26204, 29918, 276, 1115, 12633, 30004, 13, 1678, 376, 21587, 1115, 12633, 30004, 13, 1678, 376, 28970, 29918, 7501, 1169, 1115, 376, 3009, 15231, 13, 1678, 376, 17281, 29918, 4878, 1115, 376, 3009, 15231, 13, 1678, 376, 1217, 29918, 1742, 29918, 19570, 1115, 12633, 30004, 13, 8117, 13, 30004, 13, 29937, 6212, 5026, 9657, 363, 12885, 29918, 955, 25245, 6865, 300, 22993, 13, 955, 25245, 29918, 955, 25245, 29918, 15697, 29918, 8977, 353, 3336, 13, 1678, 376, 4381, 1115, 376, 4304, 15231, 13, 1678, 376, 26204, 29918, 276, 1115, 12633, 30004, 13, 1678, 376, 21587, 1115, 12633, 30004, 13, 1678, 376, 28970, 29918, 7501, 1169, 1115, 376, 3009, 15231, 13, 1678, 376, 17281, 29918, 4878, 1115, 376, 3009, 15231, 13, 1678, 376, 1217, 29918, 1742, 29918, 19570, 1115, 12633, 30004, 13, 8117, 13, 30004, 13, 29937, 6212, 5026, 9657, 363, 12885, 29918, 7729, 6865, 300, 22993, 13, 955, 25245, 29918, 7729, 29918, 15697, 29918, 8977, 353, 3336, 13, 1678, 376, 4381, 1115, 376, 1529, 29934, 29968, 4897, 15231, 13, 1678, 376, 26204, 29918, 276, 1115, 12633, 30004, 13, 1678, 376, 21587, 1115, 12633, 30004, 13, 1678, 376, 28970, 29918, 7501, 1169, 1115, 376, 3009, 15231, 13, 1678, 376, 17281, 29918, 4878, 1115, 376, 3009, 15231, 13, 1678, 376, 1217, 29918, 1742, 29918, 19570, 1115, 12633, 30004, 13, 8117, 13, 30004, 13, 29937, 6212, 5026, 9657, 363, 12885, 29918, 7729, 29906, 6865, 300, 22993, 13, 955, 25245, 29918, 7729, 29906, 29918, 15697, 29918, 8977, 353, 3336, 13, 1678, 376, 4381, 1115, 376, 1529, 29934, 29968, 4897, 15231, 13, 1678, 376, 26204, 29918, 276, 1115, 18227, 29900, 29916, 29961, 7503, 29916, 26204, 29901, 5262, 29974, 29961, 29880, 29931, 29962, 29973, 29989, 29961, 7503, 26204, 29901, 5262, 17108, 29872, 29961, 7503, 26204, 29901, 5262, 29930, 6877, 29961, 29880, 29931, 29881, 29928, 29888, 29943, 29962, 7897, 15231, 13, 1678, 376, 21587, 1115, 376, 1966, 15231, 13, 1678, 376, 28970, 29918, 7501, 1169, 1115, 376, 3009, 15231, 13, 1678, 376, 17281, 29918, 4878, 1115, 376, 4541, 15231, 13, 1678, 376, 1217, 29918, 1742, 29918, 19570, 1115, 12633, 30004, 13, 8117, 13, 30004, 13, 29937, 6212, 5026, 9657, 363, 12885, 29918, 1627, 29918, 517, 29918, 1420, 6865, 300, 22993, 13, 955, 25245, 29918, 1627, 29918, 517, 29918, 1420, 29918, 15697, 29918, 8977, 353, 3336, 13, 1678, 376, 4381, 1115, 376, 1529, 29934, 29968, 4897, 15231, 13, 1678, 376, 26204, 29918, 276, 1115, 18227, 29900, 29916, 29961, 7503, 29916, 26204, 29901, 5262, 29974, 29961, 29880, 29931, 29962, 29973, 29989, 29961, 7503, 26204, 29901, 5262, 17108, 29872, 29961, 7503, 26204, 29901, 5262, 29930, 6877, 29961, 29880, 29931, 29881, 29928, 29888, 29943, 29962, 7897, 15231, 13, 1678, 376, 21587, 1115, 376, 1966, 15231, 13, 1678, 376, 28970, 29918, 7501, 1169, 1115, 376, 3009, 15231, 13, 1678, 376, 17281, 29918, 4878, 1115, 376, 4541, 15231, 13, 1678, 376, 1217, 29918, 1742, 29918, 19570, 1115, 12633, 30004, 13, 8117, 13, 30004, 13, 29937, 6212, 5026, 9657, 363, 12885, 29918, 4268, 6865, 300, 22993, 13, 955, 25245, 29918, 4268, 29918, 15697, 29918, 8977, 353, 3336, 13, 1678, 376, 4381, 1115, 376, 1529, 29934, 29968, 4897, 15231, 13, 1678, 376, 26204, 29918, 276, 1115, 18227, 29900, 29916, 29961, 7503, 29916, 26204, 29901, 5262, 29974, 29961, 29880, 29931, 29962, 29973, 29989, 29961, 7503, 26204, 29901, 5262, 17108, 29872, 29961, 7503, 26204, 29901, 5262, 29930, 6877, 29961, 29880, 29931, 29881, 29928, 29888, 29943, 29962, 7897, 15231, 13, 1678, 376, 21587, 1115, 376, 1966, 15231, 13, 1678, 376, 28970, 29918, 7501, 1169, 1115, 376, 3009, 15231, 13, 1678, 376, 17281, 29918, 4878, 1115, 376, 4541, 15231, 13, 1678, 376, 1217, 29918, 1742, 29918, 19570, 1115, 12633, 30004, 13, 8117, 13, 30004, 13, 29937, 6212, 5026, 9657, 363, 12885, 29918, 4268, 29906, 6865, 300, 22993, 13, 955, 25245, 29918, 4268, 29906, 29918, 15697, 29918, 8977, 353, 3336, 13, 1678, 376, 4381, 1115, 376, 1529, 29934, 29968, 4897, 15231, 13, 1678, 376, 26204, 29918, 276, 1115, 14704, 7503, 26204, 29901, 5262, 17108, 415, 29989, 6739, 29989, 262, 29989, 4317, 29989, 4912, 29989, 331, 29989, 735, 29989, 1756, 29989, 1516, 29989, 29879, 29989, 10997, 15231, 13, 1678, 376, 21587, 1115, 376, 1966, 15231, 13, 1678, 376, 28970, 29918, 7501, 1169, 1115, 376, 3009, 15231, 13, 1678, 376, 17281, 29918, 4878, 1115, 376, 3009, 15231, 13, 1678, 376, 1217, 29918, 1742, 29918, 19570, 1115, 11663, 29918, 15231, 13, 8117, 13, 30004, 13, 29937, 13343, 310, 8393, 21503, 4314, 363, 12885, 4464, 22993, 13, 15697, 21533, 21533, 353, 3336, 13, 1678, 376, 955, 25245, 29918, 1627, 29918, 517, 29918, 1420, 1115, 12885, 29918, 1627, 29918, 517, 29918, 1420, 29918, 15697, 29918, 8977, 11167, 13, 1678, 376, 955, 25245, 29918, 4268, 1115, 12885, 29918, 4268, 29918, 15697, 29918, 8977, 11167, 13, 1678, 376, 955, 25245, 29918, 4268, 29906, 1115, 12885, 29918, 4268, 29906, 29918, 15697, 29918, 8977, 11167, 13, 1678, 376, 955, 25245, 29918, 7729, 1115, 12885, 29918, 7729, 29918, 15697, 29918, 8977, 11167, 13, 1678, 376, 955, 25245, 29918, 7729, 29906, 1115, 12885, 29918, 7729, 29906, 29918, 15697, 29918, 8977, 11167, 13, 1678, 376, 955, 25245, 29918, 3396, 1115, 12885, 29918, 3396, 29918, 15697, 29918, 8977, 11167, 13, 1678, 376, 955, 25245, 29918, 955, 25245, 1115, 12885, 29918, 955, 25245, 29918, 15697, 29918, 8977, 11167, 13, 8117, 13, 30004, 13, 29937, 7670, 9303, 9657, 363, 12885, 29918, 3396, 6865, 300, 22993, 13, 955, 25245, 29918, 3396, 29918, 1989, 9303, 29918, 8977, 353, 6571, 30004, 13, 30004, 13, 29937, 7670, 9303, 9657, 363, 12885, 29918, 955, 25245, 6865, 300, 22993, 13, 955, 25245, 29918, 955, 25245, 29918, 1989, 9303, 29918, 8977, 353, 3336, 13, 1678, 12305, 2870, 1115, 376, 26766, 29896, 15231, 13, 1678, 12305, 2870, 361, 1115, 376, 26766, 29896, 15231, 13, 1678, 12305, 355, 1115, 376, 26766, 29896, 15231, 13, 1678, 12305, 13150, 1115, 376, 26766, 29896, 15231, 13, 1678, 12305, 361, 1115, 376, 26766, 29896, 15231, 13, 1678, 12305, 2856, 1115, 376, 26766, 29896, 15231, 13, 1678, 12305, 25254, 1115, 376, 26766, 29896, 15231, 13, 1678, 12305, 5510, 1115, 376, 26766, 29896, 15231, 13, 1678, 12305, 842, 1115, 376, 26766, 29896, 15231, 13, 1678, 12305, 9847, 1115, 376, 26766, 29896, 15231, 13, 8117, 13, 30004, 13, 29937, 7670, 9303, 9657, 363, 12885, 29918, 7729, 6865, 300, 22993, 13, 955, 25245, 29918, 7729, 29918, 1989, 9303, 29918, 8977, 353, 6571, 30004, 13, 30004, 13, 29937, 7670, 9303, 9657, 363, 12885, 29918, 7729, 29906, 6865, 300, 22993, 13, 955, 25245, 29918, 7729, 29906, 29918, 1989, 9303, 29918, 8977, 353, 6571, 30004, 13, 30004, 13, 29937, 7670, 9303, 9657, 363, 12885, 29918, 1627, 29918, 517, 29918, 1420, 6865, 300, 22993, 13, 955, 25245, 29918, 1627, 29918, 517, 29918, 1420, 29918, 1989, 9303, 29918, 8977, 353, 6571, 30004, 13, 30004, 13, 29937, 7670, 9303, 9657, 363, 12885, 29918, 4268, 6865, 300, 22993, 13, 955, 25245, 29918, 4268, 29918, 1989, 9303, 29918, 8977, 353, 6571, 30004, 13, 30004, 13, 29937, 7670, 9303, 9657, 363, 12885, 29918, 4268, 29906, 6865, 300, 22993, 13, 955, 25245, 29918, 4268, 29906, 29918, 1989, 9303, 29918, 8977, 353, 6571, 30004, 13, 30004, 13, 29937, 13343, 310, 29361, 21503, 4314, 363, 12885, 4464, 22993, 13, 1989, 9303, 21533, 21533, 353, 3336, 13, 1678, 376, 955, 25245, 29918, 1627, 29918, 517, 29918, 1420, 1115, 12885, 29918, 1627, 29918, 517, 29918, 1420, 29918, 1989, 9303, 29918, 8977, 11167, 13, 1678, 376, 955, 25245, 29918, 4268, 1115, 12885, 29918, 4268, 29918, 1989, 9303, 29918, 8977, 11167, 13, 1678, 376, 955, 25245, 29918, 4268, 29906, 1115, 12885, 29918, 4268, 29906, 29918, 1989, 9303, 29918, 8977, 11167, 13, 1678, 376, 955, 25245, 29918, 7729, 1115, 12885, 29918, 7729, 29918, 1989, 9303, 29918, 8977, 11167, 13, 1678, 376, 955, 25245, 29918, 7729, 29906, 1115, 12885, 29918, 7729, 29906, 29918, 1989, 9303, 29918, 8977, 11167, 13, 1678, 376, 955, 25245, 29918, 3396, 1115, 12885, 29918, 3396, 29918, 1989, 9303, 29918, 8977, 11167, 13, 1678, 376, 955, 25245, 29918, 955, 25245, 1115, 12885, 29918, 955, 25245, 29918, 1989, 9303, 29918, 8977, 11167, 13, 8117, 13, 30004, 13, 29937, 390, 2540, 363, 12885, 29918, 3396, 6865, 300, 22993, 13, 30004, 13, 1753, 12885, 29918, 7491, 29900, 29898, 2780, 261, 29892, 269, 29892, 474, 1125, 30004, 13, 1678, 736, 2927, 261, 29889, 4352, 29918, 9653, 29898, 29879, 29892, 474, 29892, 2924, 543, 9342, 29896, 613, 3380, 543, 14136, 613, 1095, 543, 15110, 15231, 13, 4706, 472, 29918, 1220, 29918, 2962, 29922, 8824, 29892, 472, 29918, 1332, 3246, 3535, 29918, 355, 29922, 8824, 29892, 472, 29918, 1742, 29918, 2962, 29922, 8824, 11167, 13, 4706, 13341, 543, 613, 735, 2325, 29918, 4352, 29922, 8824, 11167, 13, 4706, 694, 29918, 21587, 29922, 8824, 29892, 694, 29918, 1220, 29918, 8690, 29922, 8824, 29892, 694, 29918, 1742, 29918, 8690, 29922, 8824, 8443, 13, 30004, 13, 1753, 12885, 29918, 7491, 29896, 29898, 2780, 261, 29892, 269, 29892, 474, 1125, 30004, 13, 1678, 736, 2927, 261, 29889, 4352, 29918, 9653, 29898, 29879, 29892, 474, 29892, 2924, 543, 3502, 786, 613, 3380, 543, 29966, 7187, 24290, 613, 1095, 543, 829, 7187, 24290, 29958, 15231, 13, 4706, 472, 29918, 1220, 29918, 2962, 29922, 8824, 29892, 472, 29918, 1332, 3246, 3535, 29918, 355, 29922, 8824, 29892, 472, 29918, 1742, 29918, 2962, 29922, 8824, 11167, 13, 4706, 13341, 543, 955, 25245, 1057, 7729, 613, 735, 2325, 29918, 4352, 29922, 8824, 11167, 13, 4706, 694, 29918, 21587, 29922, 8824, 29892, 694, 29918, 1220, 29918, 8690, 29922, 8824, 29892, 694, 29918, 1742, 29918, 8690, 29922, 8824, 8443, 13, 30004, 13, 1753, 12885, 29918, 7491, 29906, 29898, 2780, 261, 29892, 269, 29892, 474, 1125, 30004, 13, 1678, 736, 2927, 261, 29889, 4352, 29918, 9653, 29898, 29879, 29892, 474, 29892, 2924, 543, 3502, 786, 613, 3380, 543, 29966, 1254, 29979, 1307, 613, 1095, 543, 829, 1254, 29979, 1307, 29958, 15231, 13, 4706, 472, 29918, 1220, 29918, 2962, 29922, 8824, 29892, 472, 29918, 1332, 3246, 3535, 29918, 355, 29922, 8824, 29892, 472, 29918, 1742, 29918, 2962, 29922, 8824, 11167, 13, 4706, 13341, 543, 955, 25245, 1057, 4268, 613, 735, 2325, 29918, 4352, 29922, 8824, 11167, 13, 4706, 694, 29918, 21587, 29922, 8824, 29892, 694, 29918, 1220, 29918, 8690, 29922, 8824, 29892, 694, 29918, 1742, 29918, 8690, 29922, 8824, 8443, 13, 30004, 13, 1753, 12885, 29918, 7491, 29941, 29898, 2780, 261, 29892, 269, 29892, 474, 1125, 30004, 13, 1678, 736, 2927, 261, 29889, 4352, 29918, 9653, 29898, 29879, 29892, 474, 29892, 2924, 543, 26766, 29906, 613, 3380, 543, 29966, 29991, 613, 1095, 543, 29958, 15231, 13, 4706, 472, 29918, 1220, 29918, 2962, 29922, 8824, 29892, 472, 29918, 1332, 3246, 3535, 29918, 355, 29922, 8824, 29892, 472, 29918, 1742, 29918, 2962, 29922, 8824, 11167, 13, 4706, 13341, 543, 3134, 1057, 29881, 1594, 29899, 11338, 613, 735, 2325, 29918, 4352, 29922, 8824, 11167, 13, 4706, 694, 29918, 21587, 29922, 8824, 29892, 694, 29918, 1220, 29918, 8690, 29922, 8824, 29892, 694, 29918, 1742, 29918, 8690, 29922, 8824, 8443, 13, 30004, 13, 1753, 12885, 29918, 7491, 29946, 29898, 2780, 261, 29892, 269, 29892, 474, 1125, 30004, 13, 1678, 736, 2927, 261, 29889, 4352, 29918, 9653, 29898, 29879, 29892, 474, 29892, 2924, 543, 3502, 786, 613, 3380, 543, 29966, 613, 1095, 543, 29958, 15231, 13, 4706, 472, 29918, 1220, 29918, 2962, 29922, 8824, 29892, 472, 29918, 1332, 3246, 3535, 29918, 355, 29922, 8824, 29892, 472, 29918, 1742, 29918, 2962, 29922, 8824, 11167, 13, 4706, 13341, 543, 1420, 1057, 11338, 613, 735, 2325, 29918, 4352, 29922, 8824, 11167, 13, 4706, 694, 29918, 21587, 29922, 8824, 29892, 694, 29918, 1220, 29918, 8690, 29922, 8824, 29892, 694, 29918, 1742, 29918, 8690, 29922, 8824, 8443, 13, 30004, 13, 1753, 12885, 29918, 7491, 29945, 29898, 2780, 261, 29892, 269, 29892, 474, 1125, 30004, 13, 1678, 736, 2927, 261, 29889, 4352, 29918, 9653, 29898, 29879, 29892, 474, 29892, 2924, 543, 20889, 284, 29906, 613, 3380, 543, 29987, 613, 1095, 543, 29936, 15231, 13, 4706, 472, 29918, 1220, 29918, 2962, 29922, 8824, 29892, 472, 29918, 1332, 3246, 3535, 29918, 355, 29922, 8824, 29892, 472, 29918, 1742, 29918, 2962, 29922, 8824, 11167, 13, 4706, 13341, 543, 613, 735, 2325, 29918, 4352, 29922, 8824, 11167, 13, 4706, 694, 29918, 21587, 29922, 8824, 29892, 694, 29918, 1220, 29918, 8690, 29922, 8824, 29892, 694, 29918, 1742, 29918, 8690, 29922, 5574, 8443, 13, 30004, 13, 30004, 13, 29937, 390, 2540, 9657, 363, 12885, 29918, 3396, 6865, 300, 22993, 13, 19238, 21533, 29896, 353, 3336, 13, 1678, 376, 29987, 1115, 518, 955, 25245, 29918, 7491, 29945, 29892, 1402, 30004, 13, 1678, 9872, 1115, 518, 955, 25245, 29918, 7491, 29900, 29892, 955, 25245, 29918, 7491, 29896, 29892, 955, 25245, 29918, 7491, 29906, 29892, 955, 25245, 29918, 7491, 29941, 29892, 955, 25245, 29918, 7491, 29946, 29892, 1402, 30004, 13, 8117, 13, 30004, 13, 29937, 390, 2540, 363, 12885, 29918, 955, 25245, 6865, 300, 22993, 13, 30004, 13, 1753, 12885, 29918, 7491, 29953, 29898, 2780, 261, 29892, 269, 29892, 474, 1125, 30004, 13, 1678, 736, 2927, 261, 29889, 4352, 29918, 9653, 29898, 29879, 29892, 474, 29892, 2924, 543, 9342, 29906, 613, 3380, 9880, 29930, 613, 1095, 543, 29930, 29937, 15231, 13, 4706, 472, 29918, 1220, 29918, 2962, 29922, 8824, 29892, 472, 29918, 1332, 3246, 3535, 29918, 355, 29922, 8824, 29892, 472, 29918, 1742, 29918, 2962, 29922, 8824, 11167, 13, 4706, 13341, 543, 613, 735, 2325, 29918, 4352, 29922, 8824, 11167, 13, 4706, 694, 29918, 21587, 29922, 8824, 29892, 694, 29918, 1220, 29918, 8690, 29922, 8824, 29892, 694, 29918, 1742, 29918, 8690, 29922, 8824, 8443, 13, 30004, 13, 1753, 12885, 29918, 7491, 29955, 29898, 2780, 261, 29892, 269, 29892, 474, 1125, 30004, 13, 1678, 736, 2927, 261, 29889, 4352, 29918, 29872, 324, 29918, 9653, 29898, 29879, 29892, 474, 29892, 2924, 543, 9342, 29941, 613, 19359, 543, 2277, 15231, 13, 4706, 472, 29918, 1220, 29918, 2962, 29922, 8824, 29892, 472, 29918, 1332, 3246, 3535, 29918, 355, 29922, 8824, 29892, 472, 29918, 1742, 29918, 2962, 29922, 8824, 11167, 13, 4706, 13341, 543, 613, 19060, 29918, 4352, 29922, 8824, 8443, 13, 30004, 13, 1753, 12885, 29918, 7491, 29947, 29898, 2780, 261, 29892, 269, 29892, 474, 1125, 30004, 13, 1678, 736, 2927, 261, 29889, 4352, 29918, 9653, 29898, 29879, 29892, 474, 29892, 2924, 543, 26766, 29941, 613, 3380, 19070, 613, 1095, 543, 29913, 15231, 13, 4706, 472, 29918, 1220, 29918, 2962, 29922, 8824, 29892, 472, 29918, 1332, 3246, 3535, 29918, 355, 29922, 8824, 29892, 472, 29918, 1742, 29918, 2962, 29922, 8824, 11167, 13, 4706, 13341, 543, 613, 735, 2325, 29918, 4352, 29922, 8824, 11167, 13, 4706, 694, 29918, 21587, 29922, 8824, 29892, 694, 29918, 1220, 29918, 8690, 29922, 5574, 29892, 694, 29918, 1742, 29918, 8690, 29922, 8824, 8443, 13, 30004, 13, 1753, 12885, 29918, 7491, 29929, 29898, 2780, 261, 29892, 269, 29892, 474, 1125, 30004, 13, 1678, 736, 2927, 261, 29889, 4352, 29918, 3502, 29918, 23031, 292, 29898, 29879, 29892, 474, 29892, 2924, 543, 26766, 29941, 613, 4766, 18965, 29991, 15231, 13, 4706, 472, 29918, 1220, 29918, 2962, 29922, 8824, 29892, 472, 29918, 1332, 3246, 3535, 29918, 355, 29922, 8824, 29892, 472, 29918, 1742, 29918, 2962, 29922, 8824, 29892, 19060, 29918, 4352, 29922, 8824, 8443, 13, 30004, 13, 1753, 12885, 29918, 7491, 29896, 29900, 29898, 2780, 261, 29892, 269, 29892, 474, 1125, 30004, 13, 1678, 736, 2927, 261, 29889, 4352, 29918, 3502, 29918, 23031, 292, 29898, 29879, 29892, 474, 29892, 2924, 543, 26766, 29941, 613, 4766, 18965, 15231, 13, 4706, 472, 29918, 1220, 29918, 2962, 29922, 8824, 29892, 472, 29918, 1332, 3246, 3535, 29918, 355, 29922, 8824, 29892, 472, 29918, 1742, 29918, 2962, 29922, 8824, 29892, 19060, 29918, 4352, 29922, 8824, 8443, 13, 30004, 13, 1753, 12885, 29918, 7491, 29896, 29896, 29898, 2780, 261, 29892, 269, 29892, 474, 1125, 30004, 13, 1678, 736, 2927, 261, 29889, 4352, 29918, 1989, 9303, 29898, 29879, 29892, 474, 8443, 13, 30004, 13, 29937, 390, 2540, 9657, 363, 12885, 29918, 955, 25245, 6865, 300, 22993, 13, 19238, 21533, 29906, 353, 3336, 13, 1678, 12305, 1115, 518, 955, 25245, 29918, 7491, 29953, 29892, 955, 25245, 29918, 7491, 29955, 29892, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 3908, 1115, 518, 955, 25245, 29918, 7491, 29947, 29892, 955, 25245, 29918, 7491, 29929, 29892, 955, 25245, 29918, 7491, 29896, 29900, 29892, 1402, 30004, 13, 1678, 376, 29900, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 376, 29896, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 376, 29906, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 376, 29941, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 376, 29946, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 376, 29945, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 376, 29953, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 376, 29955, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 376, 29947, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 376, 29929, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 17962, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 376, 29909, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 376, 29933, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 376, 29907, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 376, 29928, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 376, 29923, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 376, 29943, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 376, 29954, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 376, 29950, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 376, 29902, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 376, 29967, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 376, 29968, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 376, 29931, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 376, 29924, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 376, 29940, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 376, 29949, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 376, 29925, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 376, 29984, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 376, 29934, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 376, 29903, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 376, 29911, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 376, 29965, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 376, 29963, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 376, 29956, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 376, 29990, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 376, 29979, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 376, 29999, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 376, 29874, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 376, 29890, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 376, 29883, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 376, 29881, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 376, 29872, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 376, 29888, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 376, 29887, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 376, 29882, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 376, 29875, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 376, 29926, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 376, 29895, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 376, 29880, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 376, 29885, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 376, 29876, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 376, 29877, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 376, 29886, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 376, 29939, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 376, 29878, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 376, 29879, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 376, 29873, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 376, 29884, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 376, 29894, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 376, 29893, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 376, 29916, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 376, 29891, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 1678, 376, 29920, 1115, 518, 955, 25245, 29918, 7491, 29896, 29896, 29892, 1402, 30004, 13, 8117, 13, 30004, 13, 29937, 390, 2540, 363, 12885, 29918, 7729, 6865, 300, 22993, 13, 30004, 13, 1753, 12885, 29918, 7491, 29896, 29906, 29898, 2780, 261, 29892, 269, 29892, 474, 1125, 30004, 13, 1678, 736, 2927, 261, 29889, 4352, 29918, 11762, 29898, 29879, 29892, 474, 29892, 2924, 543, 3502, 786, 613, 19359, 543, 29958, 15231, 13, 4706, 472, 29918, 1220, 29918, 2962, 29922, 8824, 29892, 472, 29918, 1332, 3246, 3535, 29918, 355, 29922, 8824, 29892, 472, 29918, 1742, 29918, 2962, 29922, 8824, 29892, 13341, 543, 955, 25245, 1057, 7729, 29906, 1159, 30004, 13, 30004, 13, 1753, 12885, 29918, 7491, 29896, 29941, 29898, 2780, 261, 29892, 269, 29892, 474, 1125, 30004, 13, 1678, 736, 2927, 261, 29889, 4352, 29918, 11762, 29898, 29879, 29892, 474, 29892, 2924, 543, 3502, 786, 613, 19359, 543, 29903, 10363, 543, 11167, 13, 4706, 472, 29918, 1220, 29918, 2962, 29922, 8824, 29892, 472, 29918, 1332, 3246, 3535, 29918, 355, 29922, 8824, 29892, 472, 29918, 1742, 29918, 2962, 29922, 8824, 29892, 13341, 543, 955, 25245, 1057, 1627, 29918, 517, 29918, 1420, 1159, 30004, 13, 30004, 13, 29937, 390, 2540, 9657, 363, 12885, 29918, 7729, 6865, 300, 22993, 13, 19238, 21533, 29941, 353, 3336, 13, 1678, 376, 29958, 1115, 518, 955, 25245, 29918, 7491, 29896, 29906, 29892, 1402, 30004, 13, 1678, 376, 29903, 1115, 518, 955, 25245, 29918, 7491, 29896, 29941, 29892, 1402, 30004, 13, 8117, 13, 30004, 13, 29937, 390, 2540, 363, 12885, 29918, 7729, 29906, 6865, 300, 22993, 13, 30004, 13, 30004, 13, 30004, 13, 29937, 390, 2540, 9657, 363, 12885, 29918, 7729, 29906, 6865, 300, 22993, 13, 19238, 21533, 29946, 353, 6571, 30004, 13, 30004, 13, 29937, 390, 2540, 363, 12885, 29918, 1627, 29918, 517, 29918, 1420, 6865, 300, 22993, 13, 30004, 13, 1753, 12885, 29918, 7491, 29896, 29946, 29898, 2780, 261, 29892, 269, 29892, 474, 1125, 30004, 13, 1678, 736, 2927, 261, 29889, 4352, 29918, 11762, 29898, 29879, 29892, 474, 29892, 2924, 543, 3502, 786, 613, 19359, 543, 29958, 15231, 13, 4706, 472, 29918, 1220, 29918, 2962, 29922, 8824, 29892, 472, 29918, 1332, 3246, 3535, 29918, 355, 29922, 8824, 29892, 472, 29918, 1742, 29918, 2962, 29922, 8824, 29892, 13341, 543, 955, 25245, 1057, 3396, 1159, 30004, 13, 30004, 13, 29937, 390, 2540, 9657, 363, 12885, 29918, 1627, 29918, 517, 29918, 1420, 6865, 300, 22993, 13, 19238, 21533, 29945, 353, 3336, 13, 1678, 376, 29958, 1115, 518, 955, 25245, 29918, 7491, 29896, 29946, 29892, 1402, 30004, 13, 8117, 13, 30004, 13, 29937, 390, 2540, 363, 12885, 29918, 4268, 6865, 300, 22993, 13, 30004, 13, 1753, 12885, 29918, 7491, 29896, 29945, 29898, 2780, 261, 29892, 269, 29892, 474, 1125, 30004, 13, 1678, 736, 2927, 261, 29889, 4352, 29918, 11762, 29898, 29879, 29892, 474, 29892, 2924, 543, 3502, 786, 613, 19359, 543, 29958, 15231, 13, 4706, 472, 29918, 1220, 29918, 2962, 29922, 8824, 29892, 472, 29918, 1332, 3246, 3535, 29918, 355, 29922, 8824, 29892, 472, 29918, 1742, 29918, 2962, 29922, 8824, 29892, 13341, 543, 955, 25245, 1057, 4268, 29906, 1159, 30004, 13, 30004, 13, 29937, 390, 2540, 9657, 363, 12885, 29918, 4268, 6865, 300, 22993, 13, 19238, 21533, 29953, 353, 3336, 13, 1678, 376, 29958, 1115, 518, 955, 25245, 29918, 7491, 29896, 29945, 29892, 1402, 30004, 13, 8117, 13, 30004, 13, 29937, 390, 2540, 363, 12885, 29918, 4268, 29906, 6865, 300, 22993, 13, 30004, 13, 30004, 13, 30004, 13, 29937, 390, 2540, 9657, 363, 12885, 29918, 4268, 29906, 6865, 300, 22993, 13, 19238, 21533, 29955, 353, 6571, 30004, 13, 30004, 13, 29937, 921, 29889, 19238, 21533, 21533, 363, 12885, 4464, 22993, 13, 19238, 21533, 21533, 353, 3336, 13, 1678, 376, 955, 25245, 29918, 1627, 29918, 517, 29918, 1420, 1115, 6865, 21533, 29945, 11167, 13, 1678, 376, 955, 25245, 29918, 4268, 1115, 6865, 21533, 29953, 11167, 13, 1678, 376, 955, 25245, 29918, 4268, 29906, 1115, 6865, 21533, 29955, 11167, 13, 1678, 376, 955, 25245, 29918, 7729, 1115, 6865, 21533, 29941, 11167, 13, 1678, 376, 955, 25245, 29918, 7729, 29906, 1115, 6865, 21533, 29946, 11167, 13, 1678, 376, 955, 25245, 29918, 3396, 1115, 6865, 21533, 29896, 11167, 13, 1678, 376, 955, 25245, 29918, 955, 25245, 1115, 6865, 21533, 29906, 11167, 13, 8117, 13, 30004, 13, 29937, 16032, 9657, 363, 12885, 4464, 22993, 13, 5215, 21533, 353, 3336, 13, 1678, 376, 955, 25245, 29918, 4268, 29906, 1115, 6796, 955, 25245, 29918, 4268, 29906, 1057, 955, 25245, 3284, 4268, 1057, 3396, 613, 1402, 30004, 13, 1678, 376, 955, 25245, 29918, 7729, 29906, 1115, 6796, 955, 25245, 29918, 7729, 29906, 1057, 955, 25245, 3284, 7729, 1057, 3396, 613, 1402, 30004, 13, 1678, 376, 955, 25245, 29918, 3396, 1115, 6796, 955, 25245, 29918, 3396, 1057, 955, 25245, 613, 1402, 30004, 13, 8117, 13, 30004, 13, 2 ]
Week-06/file-io.py
ltagliaferri/dh-rutgers
5
89097
<gh_stars>1-10 # Program to work with file input / output (i/o) # This is pulling the days.txt file in this directory in this repo path = 'days.txt' days_file = open(path,'r') days = days_file.read() new_path = 'new_days.txt' new_days = open(new_path,'w') title = 'Days of the Week\n' new_days.write(title) print(title) new_days.write(days) print(days) days_file.close() new_days.close()
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 29937, 7835, 304, 664, 411, 934, 1881, 847, 1962, 313, 29875, 29914, 29877, 29897, 13, 13, 29937, 910, 338, 28420, 278, 3841, 29889, 3945, 934, 297, 445, 3884, 297, 445, 13761, 13, 2084, 353, 525, 16700, 29889, 3945, 29915, 13, 16700, 29918, 1445, 353, 1722, 29898, 2084, 5501, 29878, 1495, 13, 16700, 353, 3841, 29918, 1445, 29889, 949, 580, 13, 13, 13, 1482, 29918, 2084, 353, 525, 1482, 29918, 16700, 29889, 3945, 29915, 13, 1482, 29918, 16700, 353, 1722, 29898, 1482, 29918, 2084, 5501, 29893, 1495, 13, 13, 3257, 353, 525, 25991, 310, 278, 15511, 29905, 29876, 29915, 13, 1482, 29918, 16700, 29889, 3539, 29898, 3257, 29897, 13, 2158, 29898, 3257, 29897, 13, 13, 1482, 29918, 16700, 29889, 3539, 29898, 16700, 29897, 13, 2158, 29898, 16700, 29897, 13, 13, 16700, 29918, 1445, 29889, 5358, 580, 13, 1482, 29918, 16700, 29889, 5358, 580, 2 ]
exps/point_cloud/modelnet40_gbest.py
ranigb/Set-Tree
17
127471
import os import random import numpy as np import argparse import logging import pickle from pprint import pformat from exps.data import get_modelnet40_data_fps from settree.set_data import SetDataset, OPERATIONS, flatten_datasets import exps.eval_utils as eval if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument("--exp_name", type=str, default='test') parser.add_argument("--log", action='store_true') parser.add_argument("--seed", type=int, default=45) parser.add_argument('--save', action='store_true') args = parser.parse_args() log_dir = os.path.join(os.path.abspath('__file__' + '/../'), 'outputs', 'fps') eval.create_logger(log_dir=log_dir, log_name=args.exp_name, dump=args.log) logging.info('Args:\n' + pformat(vars(args))) np.random.seed(args.seed) random.seed(args.seed) # x_train, y_train, x_test, y_test = get_modelnet40_data(down_sample=10, # do_standardize=True, # flip=False, # seed=args.seed) x_train, y_train, x_test, y_test = get_modelnet40_data_fps() ds_train = SetDataset(records=x_train, is_init=True) ds_test = SetDataset(records=x_test, is_init=True) logging.info(args) shared_gbdt_params = {'n_estimators': 150, 'learning_rate': 0.1, 'max_depth': 6, 'max_features': None, 'subsample': 1, 'random_state': args.seed} set_params = {'n_estimators': shared_gbdt_params['n_estimators'], 'operations': OPERATIONS, 'splitter': 'sklearn', 'use_attention_set': True, 'use_attention_set_comp': False, 'attention_set_limit': 5, 'max_depth': shared_gbdt_params['max_depth'], 'max_features': shared_gbdt_params['max_features'], 'subsample': shared_gbdt_params['subsample'], 'random_state': shared_gbdt_params['random_state'], 'save_path': os.path.join(log_dir, '{}_checkpoint.pkl'.format(args.exp_name)), 'validation_fraction': 0.1, 'tol': 1e-3, 'n_iter_no_change': 5, 'verbose': 3} sklearn_params = {'n_estimators': shared_gbdt_params['n_estimators'], 'criterion': 'mse', 'learning_rate': shared_gbdt_params['learning_rate'], 'max_depth': shared_gbdt_params['max_depth'], 'max_features': shared_gbdt_params['max_features'], 'subsample': shared_gbdt_params['subsample'], 'validation_fraction': 0.1, 'tol': 1e-3, 'n_iter_no_change': 5, 'verbose': 3, 'random_state': shared_gbdt_params['random_state']} xgboost_params = {#'objective': 'binary:logistic', # 'multi:softmax', binary:logistic 'max_depth': shared_gbdt_params['max_depth'], 'n_jobs': 10, 'learning_rate': shared_gbdt_params['learning_rate'], 'n_estimators': shared_gbdt_params['n_estimators'], 'colsample_bytree': shared_gbdt_params['max_features'], 'subsample': shared_gbdt_params['subsample'], 'reg_lambda': 0, 'reg_alpha': 0, 'verbosity': 0, 'random_state': shared_gbdt_params['random_state'], 'seed': shared_gbdt_params['random_state']} x_train, x_test = flatten_datasets(ds_train, ds_test, operations_list=set_params['operations'], ds_val=None) xgboost_gbtd = eval.train_and_predict_xgboost(xgboost_params, x_train, y_train, x_test, y_test, val_x=None, val_y=None, early_stopping_rounds=None, mode='multi_cls') set_gbtd = eval.train_and_predict_set_gbdt(set_params, ds_train, y_train, ds_test, y_test, eval_train=False, mode='multi_cls') if args.save: pkl_filename = os.path.join(log_dir, '{}_model.pkl'.format(args.exp_name)) with open(pkl_filename, 'wb') as file: pickle.dump(set_gbtd, file)
[ 1, 1053, 2897, 13, 5215, 4036, 13, 5215, 12655, 408, 7442, 13, 5215, 1852, 5510, 13, 5215, 12183, 13, 5215, 5839, 280, 13, 3166, 282, 2158, 1053, 282, 4830, 13, 13, 3166, 429, 567, 29889, 1272, 1053, 679, 29918, 4299, 1212, 29946, 29900, 29918, 1272, 29918, 29888, 567, 13, 3166, 3604, 929, 29889, 842, 29918, 1272, 1053, 3789, 16390, 24541, 29892, 6418, 1001, 8098, 29903, 29892, 1652, 8606, 29918, 14538, 1691, 13, 5215, 429, 567, 29889, 14513, 29918, 13239, 408, 19745, 13, 13, 13, 13, 361, 4770, 978, 1649, 1275, 525, 1649, 3396, 1649, 2396, 13, 13, 1678, 13812, 353, 1852, 5510, 29889, 15730, 11726, 580, 13, 1678, 13812, 29889, 1202, 29918, 23516, 703, 489, 4548, 29918, 978, 613, 1134, 29922, 710, 29892, 2322, 2433, 1688, 1495, 13, 1678, 13812, 29889, 1202, 29918, 23516, 703, 489, 1188, 613, 3158, 2433, 8899, 29918, 3009, 1495, 13, 1678, 13812, 29889, 1202, 29918, 23516, 703, 489, 26776, 613, 1134, 29922, 524, 29892, 2322, 29922, 29946, 29945, 29897, 13, 1678, 13812, 29889, 1202, 29918, 23516, 877, 489, 7620, 742, 3158, 2433, 8899, 29918, 3009, 1495, 13, 13, 1678, 6389, 353, 13812, 29889, 5510, 29918, 5085, 580, 13, 1678, 1480, 29918, 3972, 353, 2897, 29889, 2084, 29889, 7122, 29898, 359, 29889, 2084, 29889, 370, 1028, 493, 877, 1649, 1445, 1649, 29915, 718, 8207, 6995, 5477, 525, 4905, 29879, 742, 525, 29888, 567, 1495, 13, 1678, 19745, 29889, 3258, 29918, 21707, 29898, 1188, 29918, 3972, 29922, 1188, 29918, 3972, 29892, 13, 462, 539, 1480, 29918, 978, 29922, 5085, 29889, 4548, 29918, 978, 29892, 13, 462, 539, 16766, 29922, 5085, 29889, 1188, 29897, 13, 1678, 12183, 29889, 3888, 877, 7883, 3583, 29876, 29915, 718, 282, 4830, 29898, 16908, 29898, 5085, 4961, 13, 13, 1678, 7442, 29889, 8172, 29889, 26776, 29898, 5085, 29889, 26776, 29897, 13, 1678, 4036, 29889, 26776, 29898, 5085, 29889, 26776, 29897, 13, 13, 1678, 396, 921, 29918, 14968, 29892, 343, 29918, 14968, 29892, 921, 29918, 1688, 29892, 343, 29918, 1688, 353, 679, 29918, 4299, 1212, 29946, 29900, 29918, 1272, 29898, 3204, 29918, 11249, 29922, 29896, 29900, 29892, 13, 1678, 396, 462, 462, 462, 4706, 437, 29918, 15770, 675, 29922, 5574, 29892, 13, 1678, 396, 462, 462, 462, 4706, 285, 3466, 29922, 8824, 29892, 13, 1678, 396, 462, 462, 462, 4706, 16717, 29922, 5085, 29889, 26776, 29897, 13, 1678, 921, 29918, 14968, 29892, 343, 29918, 14968, 29892, 921, 29918, 1688, 29892, 343, 29918, 1688, 353, 679, 29918, 4299, 1212, 29946, 29900, 29918, 1272, 29918, 29888, 567, 580, 13, 13, 1678, 18031, 29918, 14968, 353, 3789, 16390, 24541, 29898, 3757, 4339, 29922, 29916, 29918, 14968, 29892, 338, 29918, 2344, 29922, 5574, 29897, 13, 1678, 18031, 29918, 1688, 353, 3789, 16390, 24541, 29898, 3757, 4339, 29922, 29916, 29918, 1688, 29892, 338, 29918, 2344, 29922, 5574, 29897, 13, 13, 1678, 12183, 29889, 3888, 29898, 5085, 29897, 13, 1678, 7258, 29918, 26300, 6008, 29918, 7529, 353, 11117, 29876, 29918, 342, 326, 4097, 2396, 29871, 29896, 29945, 29900, 29892, 13, 462, 3986, 525, 21891, 29918, 10492, 2396, 29871, 29900, 29889, 29896, 29892, 13, 462, 3986, 525, 3317, 29918, 19488, 2396, 29871, 29953, 29892, 13, 462, 3986, 525, 3317, 29918, 22100, 2396, 6213, 29892, 13, 462, 3986, 525, 1491, 11249, 2396, 29871, 29896, 29892, 13, 462, 3986, 525, 8172, 29918, 3859, 2396, 6389, 29889, 26776, 29913, 13, 13, 1678, 731, 29918, 7529, 353, 11117, 29876, 29918, 342, 326, 4097, 2396, 7258, 29918, 26300, 6008, 29918, 7529, 1839, 29876, 29918, 342, 326, 4097, 7464, 13, 462, 29871, 525, 3372, 800, 2396, 6418, 1001, 8098, 29903, 29892, 13, 462, 29871, 525, 5451, 357, 2396, 525, 808, 19668, 742, 13, 462, 29871, 525, 1509, 29918, 1131, 2509, 29918, 842, 2396, 5852, 29892, 13, 462, 29871, 525, 1509, 29918, 1131, 2509, 29918, 842, 29918, 2388, 2396, 7700, 29892, 13, 462, 29871, 525, 1131, 2509, 29918, 842, 29918, 13400, 2396, 29871, 29945, 29892, 13, 462, 29871, 525, 3317, 29918, 19488, 2396, 7258, 29918, 26300, 6008, 29918, 7529, 1839, 3317, 29918, 19488, 7464, 13, 462, 29871, 525, 3317, 29918, 22100, 2396, 7258, 29918, 26300, 6008, 29918, 7529, 1839, 3317, 29918, 22100, 7464, 13, 462, 29871, 525, 1491, 11249, 2396, 7258, 29918, 26300, 6008, 29918, 7529, 1839, 1491, 11249, 7464, 13, 462, 29871, 525, 8172, 29918, 3859, 2396, 7258, 29918, 26300, 6008, 29918, 7529, 1839, 8172, 29918, 3859, 7464, 13, 462, 29871, 525, 7620, 29918, 2084, 2396, 2897, 29889, 2084, 29889, 7122, 29898, 1188, 29918, 3972, 29892, 22372, 2403, 3198, 3149, 29889, 29886, 6321, 4286, 4830, 29898, 5085, 29889, 4548, 29918, 978, 8243, 13, 462, 29871, 525, 18157, 29918, 29888, 13857, 2396, 29871, 29900, 29889, 29896, 29892, 13, 462, 29871, 525, 25027, 2396, 29871, 29896, 29872, 29899, 29941, 29892, 13, 462, 29871, 525, 29876, 29918, 1524, 29918, 1217, 29918, 3167, 2396, 29871, 29945, 29892, 13, 462, 29871, 525, 369, 15828, 2396, 29871, 29941, 29913, 13, 13, 1678, 2071, 19668, 29918, 7529, 353, 11117, 29876, 29918, 342, 326, 4097, 2396, 7258, 29918, 26300, 6008, 29918, 7529, 1839, 29876, 29918, 342, 326, 4097, 7464, 13, 462, 418, 525, 29883, 5385, 291, 2396, 525, 29885, 344, 742, 13, 462, 418, 525, 21891, 29918, 10492, 2396, 7258, 29918, 26300, 6008, 29918, 7529, 1839, 21891, 29918, 10492, 7464, 13, 462, 418, 525, 3317, 29918, 19488, 2396, 7258, 29918, 26300, 6008, 29918, 7529, 1839, 3317, 29918, 19488, 7464, 13, 462, 418, 525, 3317, 29918, 22100, 2396, 7258, 29918, 26300, 6008, 29918, 7529, 1839, 3317, 29918, 22100, 7464, 13, 462, 418, 525, 1491, 11249, 2396, 7258, 29918, 26300, 6008, 29918, 7529, 1839, 1491, 11249, 7464, 13, 462, 418, 525, 18157, 29918, 29888, 13857, 2396, 29871, 29900, 29889, 29896, 29892, 13, 462, 418, 525, 25027, 2396, 29871, 29896, 29872, 29899, 29941, 29892, 13, 462, 418, 525, 29876, 29918, 1524, 29918, 1217, 29918, 3167, 2396, 29871, 29945, 29892, 13, 462, 418, 525, 369, 15828, 2396, 29871, 29941, 29892, 13, 462, 418, 525, 8172, 29918, 3859, 2396, 7258, 29918, 26300, 6008, 29918, 7529, 1839, 8172, 29918, 3859, 2033, 29913, 13, 13, 1678, 921, 29887, 17079, 29918, 7529, 353, 426, 29937, 29915, 3318, 573, 2396, 525, 19541, 29901, 1188, 4695, 742, 396, 525, 9910, 29901, 2695, 3317, 742, 7581, 29901, 1188, 4695, 13, 462, 268, 525, 3317, 29918, 19488, 2396, 7258, 29918, 26300, 6008, 29918, 7529, 1839, 3317, 29918, 19488, 7464, 13, 462, 268, 525, 29876, 29918, 9057, 29879, 2396, 29871, 29896, 29900, 29892, 13, 462, 268, 525, 21891, 29918, 10492, 2396, 7258, 29918, 26300, 6008, 29918, 7529, 1839, 21891, 29918, 10492, 7464, 13, 462, 268, 525, 29876, 29918, 342, 326, 4097, 2396, 7258, 29918, 26300, 6008, 29918, 7529, 1839, 29876, 29918, 342, 326, 4097, 7464, 13, 462, 268, 525, 1054, 11249, 29918, 1609, 8336, 2396, 7258, 29918, 26300, 6008, 29918, 7529, 1839, 3317, 29918, 22100, 7464, 13, 462, 268, 525, 1491, 11249, 2396, 7258, 29918, 26300, 6008, 29918, 7529, 1839, 1491, 11249, 7464, 13, 462, 268, 525, 1727, 29918, 2892, 2396, 29871, 29900, 29892, 13, 462, 268, 525, 1727, 29918, 2312, 2396, 29871, 29900, 29892, 13, 462, 268, 525, 18248, 359, 537, 2396, 29871, 29900, 29892, 13, 462, 268, 525, 8172, 29918, 3859, 2396, 7258, 29918, 26300, 6008, 29918, 7529, 1839, 8172, 29918, 3859, 7464, 13, 462, 268, 525, 26776, 2396, 7258, 29918, 26300, 6008, 29918, 7529, 1839, 8172, 29918, 3859, 2033, 29913, 13, 13, 1678, 921, 29918, 14968, 29892, 921, 29918, 1688, 353, 1652, 8606, 29918, 14538, 1691, 29898, 6289, 29918, 14968, 29892, 18031, 29918, 1688, 29892, 13, 462, 462, 539, 6931, 29918, 1761, 29922, 842, 29918, 7529, 1839, 3372, 800, 7464, 13, 462, 462, 539, 18031, 29918, 791, 29922, 8516, 29897, 13, 13, 1678, 921, 29887, 17079, 29918, 26300, 1594, 353, 19745, 29889, 14968, 29918, 392, 29918, 27711, 29918, 29916, 29887, 17079, 29898, 29916, 29887, 17079, 29918, 7529, 29892, 13, 462, 462, 462, 29871, 921, 29918, 14968, 29892, 343, 29918, 14968, 29892, 13, 462, 462, 462, 29871, 921, 29918, 1688, 29892, 343, 29918, 1688, 29892, 13, 462, 462, 462, 29871, 659, 29918, 29916, 29922, 8516, 29892, 659, 29918, 29891, 29922, 8516, 29892, 13, 462, 462, 462, 29871, 4688, 29918, 7864, 3262, 29918, 29878, 3885, 29922, 8516, 29892, 13, 462, 462, 462, 29871, 4464, 2433, 9910, 29918, 25932, 1495, 13, 13, 1678, 731, 29918, 26300, 1594, 353, 19745, 29889, 14968, 29918, 392, 29918, 27711, 29918, 842, 29918, 26300, 6008, 29898, 842, 29918, 7529, 29892, 13, 462, 462, 1669, 18031, 29918, 14968, 29892, 343, 29918, 14968, 29892, 13, 462, 462, 1669, 18031, 29918, 1688, 29892, 343, 29918, 1688, 29892, 13, 462, 462, 1669, 19745, 29918, 14968, 29922, 8824, 29892, 13, 462, 462, 1669, 4464, 2433, 9910, 29918, 25932, 1495, 13, 13, 1678, 565, 6389, 29889, 7620, 29901, 13, 4706, 282, 6321, 29918, 9507, 353, 2897, 29889, 2084, 29889, 7122, 29898, 1188, 29918, 3972, 29892, 22372, 2403, 4299, 29889, 29886, 6321, 4286, 4830, 29898, 5085, 29889, 4548, 29918, 978, 876, 13, 4706, 411, 1722, 29898, 29886, 6321, 29918, 9507, 29892, 525, 29893, 29890, 1495, 408, 934, 29901, 13, 9651, 5839, 280, 29889, 15070, 29898, 842, 29918, 26300, 1594, 29892, 934, 29897, 13, 2 ]
django_docutils/rst_post/models/__init__.py
tony/django-docutils
10
146275
# flake8: NOQA F4 from .checks import _check_postpage_post_back_relation, _check_root_page from .post import RSTPostBase, get_post_model, get_post_models from .post_page import RSTPostPageBase, get_postpage_models
[ 1, 396, 17422, 446, 29947, 29901, 11698, 29984, 29909, 383, 29946, 13, 3166, 869, 3198, 29879, 1053, 903, 3198, 29918, 2490, 3488, 29918, 2490, 29918, 1627, 29918, 23445, 29892, 903, 3198, 29918, 4632, 29918, 3488, 13, 3166, 869, 2490, 1053, 390, 1254, 6747, 5160, 29892, 679, 29918, 2490, 29918, 4299, 29892, 679, 29918, 2490, 29918, 9794, 13, 3166, 869, 2490, 29918, 3488, 1053, 390, 1254, 6747, 5074, 5160, 29892, 679, 29918, 2490, 3488, 29918, 9794, 13, 2 ]
candy.py
KevinLuo41/LeetCodeInPython
19
176226
#!/usr/bin/env python # encoding: utf-8 """ candy.py Created by Shengwei on 2014-07-22. """ # https://oj.leetcode.com/problems/candy/ # tags: hard, array, greedy, logic """ There are N children standing in a line. Each child is assigned a rating value. You are giving candies to these children subjected to the following requirements: Each child must have at least one candy. Children with a higher rating get more candies than their neighbors. What is the minimum candies you must give? """ # https://oj.leetcode.com/discuss/76/does-anyone-have-a-better-idea # TODO: try alternative class Solution: # @param ratings, a list of integer # @return an integer def candy(self, ratings): count = [1] for index in xrange(1, len(ratings)): # note: child gets the same rating can have fewer # candies than the neighbors # e.g., rating [1, 2, 2, 3] -> candies [1, 2, 1, 2] if ratings[index] > ratings[index-1]: count.append(count[-1] + 1) else: count.append(1) for index in xrange(-2, -len(ratings)-1, -1): if ratings[index] > ratings[index+1]: count[index] = max(count[index], count[index+1] + 1) return sum(count)
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 8025, 29901, 23616, 29899, 29947, 13, 15945, 29908, 13, 29883, 13910, 29889, 2272, 13, 13, 20399, 491, 1383, 996, 26599, 373, 29871, 29906, 29900, 29896, 29946, 29899, 29900, 29955, 29899, 29906, 29906, 29889, 13, 15945, 29908, 13, 13, 29937, 2045, 597, 3848, 29889, 280, 300, 401, 29889, 510, 29914, 17199, 29879, 29914, 29883, 13910, 29914, 13, 29937, 8282, 29901, 2898, 29892, 1409, 29892, 1395, 7584, 29892, 5900, 13, 13, 15945, 29908, 13, 8439, 526, 405, 4344, 13407, 297, 263, 1196, 29889, 7806, 2278, 338, 9859, 263, 21700, 995, 29889, 13, 13, 3492, 526, 6820, 23794, 583, 304, 1438, 4344, 4967, 287, 304, 278, 1494, 11780, 29901, 13, 13, 9760, 2278, 1818, 505, 472, 3203, 697, 274, 13910, 29889, 13, 19334, 411, 263, 6133, 21700, 679, 901, 23794, 583, 1135, 1009, 22092, 943, 29889, 13, 5618, 338, 278, 9212, 23794, 583, 366, 1818, 2367, 29973, 13, 15945, 29908, 13, 13, 29937, 2045, 597, 3848, 29889, 280, 300, 401, 29889, 510, 29914, 2218, 13571, 29914, 29955, 29953, 29914, 13221, 29899, 1384, 650, 29899, 17532, 29899, 29874, 29899, 6878, 357, 29899, 11729, 13, 29937, 14402, 29901, 1018, 8671, 13, 13, 1990, 24380, 29901, 13, 1678, 396, 732, 3207, 26838, 29892, 263, 1051, 310, 6043, 13, 1678, 396, 732, 2457, 385, 6043, 13, 1678, 822, 274, 13910, 29898, 1311, 29892, 26838, 1125, 13, 4706, 2302, 353, 518, 29896, 29962, 13, 308, 13, 4706, 363, 2380, 297, 921, 3881, 29898, 29896, 29892, 7431, 29898, 3605, 886, 22164, 13, 9651, 396, 4443, 29901, 2278, 4947, 278, 1021, 21700, 508, 505, 28145, 13, 9651, 396, 23794, 583, 1135, 278, 22092, 943, 13, 9651, 396, 321, 29889, 29887, 1696, 21700, 518, 29896, 29892, 29871, 29906, 29892, 29871, 29906, 29892, 29871, 29941, 29962, 1599, 23794, 583, 518, 29896, 29892, 29871, 29906, 29892, 29871, 29896, 29892, 29871, 29906, 29962, 13, 9651, 565, 26838, 29961, 2248, 29962, 1405, 26838, 29961, 2248, 29899, 29896, 5387, 13, 18884, 2302, 29889, 4397, 29898, 2798, 14352, 29896, 29962, 718, 29871, 29896, 29897, 13, 9651, 1683, 29901, 13, 18884, 2302, 29889, 4397, 29898, 29896, 29897, 13, 308, 13, 4706, 363, 2380, 297, 921, 3881, 6278, 29906, 29892, 448, 2435, 29898, 3605, 886, 6817, 29896, 29892, 448, 29896, 1125, 13, 9651, 565, 26838, 29961, 2248, 29962, 1405, 26838, 29961, 2248, 29974, 29896, 5387, 13, 18884, 2302, 29961, 2248, 29962, 353, 4236, 29898, 2798, 29961, 2248, 1402, 2302, 29961, 2248, 29974, 29896, 29962, 718, 29871, 29896, 29897, 13, 308, 13, 4706, 736, 2533, 29898, 2798, 29897, 13, 2 ]
imagenet/load_pretrained_weights_to_matlab.py
ZhanqiZhang66/dcgan_code
1
173537
<gh_stars>1-10 import sys sys.path.append('..') import tensorflow as tf import numpy as np import theano import theano.tensor as T #from theano.sandbox.cuda.dnn import dnn_conv # from lib import costs # from lib import inits # from lib import updates # from lib import activations # from lib.vis import color_grid_vis # from lib.rng import py_rng, np_rng # from lib.ops import batchnorm, conv_cond_concat, deconv, dropout, l2normalize # from lib.metrics import nnc_score, nnd_score from lib.theano_utils import floatX, sharedX, intX #from lib.data_utils import OneHot, shuffle, iter_data, center_crop, patch from sklearn.externals import joblib #%% """ This example loads the 32x32 imagenet model used in the paper, generates 400 random samples, and sorts them according to the discriminator's probability of being real and renders them to the file samples.png """ model_path = 'C:/Users/zhanq/OneDrive - Washington University in St. Louis/GitHub/dcgan_code/models/imagenet_gan_pretrain_128f_relu_lrelu_7l_3x3_256z/' gen_params = [sharedX(p) for p in joblib.load(model_path+'30_gen_params.jl')] discrim_params = [sharedX(p) for p in joblib.load(model_path+'30_discrim_params.jl')] #%% npGANparam = [param.get_value() for param in gen_params] for paramname in gen_params: print(paramname,paramname.container.data.shape) #%% # Python3 program to Convert a # list to dictionary def Convert(lst): res_dct = {lst[i]: lst[i + 1] for i in range(0, len(lst), 2)} return res_dct #%% import torch.utils.model_zoo as model_zoo import torch.onnx from scipy.io import loadmat dcGANmatW = loadmat(r"C:\Users\zhanq\OneDrive - Washington University in St. Louis\GitHub\Matlab-GAN\DCGAN\DCGAN_paramsGen.mat", struct_as_record=False, squeeze_me=True)["paramsGen"] #state_dict = model_zoo.load_url(model_url, progress=False) state_dict = Convert(gen_params) #%% for paramname, matpname in zip(state_dict.keys(), dcGANmatW._fieldnames): matweight = dcGANmatW.__getattribute__(matpname) matweightArray = matweight[0][3].tolist() print(matweightArray) trcweight = state_dict[paramname] trcmatW = torch.from_numpy(matweight) if len(trcweight.shape) == 4: # conv2 layer trcmatW = trcmatW.permute(3, 2, 0, 1) # matlab weight shape [FilterSize(1),FilterSize(2),NumChannels,NumFilters] # torch weight shape `[out_channels(NumFilters), in_channels(NumChannels), kernel_size ]` elif len(trcweight.shape) == 2: # fc layer matmul weight is 2d pass assert trcmatW.shape == trcweight.shape state_dict[paramname] = trcmatW print(paramname, matpname, trcweight.shape, matweight.shape, )
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 5215, 10876, 13, 9675, 29889, 2084, 29889, 4397, 877, 636, 1495, 13, 5215, 26110, 408, 15886, 13, 5215, 12655, 408, 7442, 13, 5215, 278, 1562, 13, 5215, 278, 1562, 29889, 20158, 408, 323, 13, 29937, 3166, 278, 1562, 29889, 29879, 26738, 29889, 29883, 6191, 29889, 5200, 29876, 1053, 270, 15755, 29918, 20580, 13, 13, 29937, 515, 4303, 1053, 21544, 13, 29937, 515, 4303, 1053, 297, 1169, 13, 29937, 515, 4303, 1053, 11217, 13, 29937, 515, 4303, 1053, 5039, 800, 13, 29937, 515, 4303, 29889, 1730, 1053, 2927, 29918, 7720, 29918, 1730, 13, 29937, 515, 4303, 29889, 29878, 865, 1053, 11451, 29918, 29878, 865, 29892, 7442, 29918, 29878, 865, 13, 29937, 515, 4303, 29889, 3554, 1053, 9853, 12324, 29892, 7602, 29918, 1116, 29918, 17685, 29892, 316, 20580, 29892, 5768, 449, 29892, 301, 29906, 8945, 675, 13, 29937, 515, 4303, 29889, 2527, 10817, 1053, 302, 17608, 29918, 13628, 29892, 302, 299, 29918, 13628, 13, 3166, 4303, 29889, 1552, 1562, 29918, 13239, 1053, 5785, 29990, 29892, 7258, 29990, 29892, 938, 29990, 13, 29937, 3166, 4303, 29889, 1272, 29918, 13239, 1053, 3118, 28917, 29892, 528, 21897, 29892, 4256, 29918, 1272, 29892, 4818, 29918, 29883, 1336, 29892, 13261, 13, 13, 3166, 2071, 19668, 29889, 735, 725, 1338, 1053, 4982, 1982, 13, 29937, 7686, 13, 15945, 29908, 13, 4013, 1342, 15376, 278, 29871, 29941, 29906, 29916, 29941, 29906, 527, 5370, 300, 1904, 1304, 297, 278, 5650, 29892, 13, 4738, 1078, 29871, 29946, 29900, 29900, 4036, 11916, 29892, 322, 23551, 963, 5034, 304, 278, 13, 2218, 29883, 20386, 1061, 29915, 29879, 6976, 310, 1641, 1855, 322, 7697, 414, 963, 304, 13, 1552, 934, 11916, 29889, 2732, 13, 15945, 29908, 13, 4299, 29918, 2084, 353, 525, 29907, 8419, 5959, 29914, 29920, 5403, 29939, 29914, 6716, 29928, 4401, 448, 7660, 3014, 297, 624, 29889, 5899, 29914, 28712, 16046, 29914, 13891, 6249, 29918, 401, 29914, 9794, 29914, 326, 5370, 300, 29918, 6249, 29918, 1457, 14968, 29918, 29896, 29906, 29947, 29888, 29918, 2674, 29884, 29918, 29880, 2674, 29884, 29918, 29955, 29880, 29918, 29941, 29916, 29941, 29918, 29906, 29945, 29953, 29920, 22208, 13, 1885, 29918, 7529, 353, 518, 12366, 29990, 29898, 29886, 29897, 363, 282, 297, 4982, 1982, 29889, 1359, 29898, 4299, 29918, 2084, 23097, 29941, 29900, 29918, 1885, 29918, 7529, 29889, 29606, 1495, 29962, 13, 2218, 29883, 5632, 29918, 7529, 353, 518, 12366, 29990, 29898, 29886, 29897, 363, 282, 297, 4982, 1982, 29889, 1359, 29898, 4299, 29918, 2084, 23097, 29941, 29900, 29918, 2218, 29883, 5632, 29918, 7529, 29889, 29606, 1495, 29962, 13, 13, 29937, 7686, 13, 9302, 29954, 2190, 3207, 353, 518, 3207, 29889, 657, 29918, 1767, 580, 363, 1828, 297, 2531, 29918, 7529, 29962, 13, 1454, 1828, 978, 297, 2531, 29918, 7529, 29901, 13, 1678, 1596, 29898, 3207, 978, 29892, 3207, 978, 29889, 7611, 29889, 1272, 29889, 12181, 29897, 13, 13, 29937, 7686, 13, 29937, 5132, 29941, 1824, 304, 14806, 263, 13, 29937, 1051, 304, 8600, 13, 13, 1753, 14806, 29898, 20155, 1125, 13, 1678, 620, 29918, 29881, 312, 353, 426, 20155, 29961, 29875, 5387, 24471, 29961, 29875, 718, 29871, 29896, 29962, 363, 474, 297, 3464, 29898, 29900, 29892, 7431, 29898, 20155, 511, 29871, 29906, 2915, 13, 1678, 736, 620, 29918, 29881, 312, 13, 13, 29937, 7686, 13, 5215, 4842, 305, 29889, 13239, 29889, 4299, 29918, 2502, 29877, 408, 1904, 29918, 2502, 29877, 13, 5215, 4842, 305, 29889, 3409, 29916, 13, 3166, 4560, 2272, 29889, 601, 1053, 2254, 2922, 13, 13891, 29954, 2190, 2922, 29956, 353, 2254, 2922, 29898, 29878, 29908, 29907, 3583, 5959, 29905, 29920, 5403, 29939, 29905, 6716, 29928, 4401, 448, 7660, 3014, 297, 624, 29889, 5899, 29905, 28712, 16046, 29905, 9782, 8205, 29899, 29954, 2190, 29905, 29928, 11135, 2190, 29905, 29928, 11135, 2190, 29918, 7529, 15462, 29889, 2922, 613, 2281, 29918, 294, 29918, 11651, 29922, 8824, 29892, 269, 802, 29872, 911, 29918, 1004, 29922, 5574, 29897, 3366, 7529, 15462, 3108, 13, 29937, 3859, 29918, 8977, 353, 1904, 29918, 2502, 29877, 29889, 1359, 29918, 2271, 29898, 4299, 29918, 2271, 29892, 6728, 29922, 8824, 29897, 13, 3859, 29918, 8977, 353, 14806, 29898, 1885, 29918, 7529, 29897, 13, 29937, 7686, 13, 1454, 1828, 978, 29892, 1775, 29886, 978, 297, 14319, 29898, 3859, 29918, 8977, 29889, 8149, 3285, 270, 29883, 29954, 2190, 2922, 29956, 3032, 2671, 7039, 1125, 13, 1678, 1775, 7915, 353, 270, 29883, 29954, 2190, 2922, 29956, 17255, 657, 12715, 12035, 2922, 29886, 978, 29897, 13, 1678, 1775, 7915, 2588, 353, 1775, 7915, 29961, 29900, 3816, 29941, 1822, 25027, 391, 580, 13, 1678, 1596, 29898, 2922, 7915, 2588, 29897, 13, 1678, 534, 29883, 7915, 353, 2106, 29918, 8977, 29961, 3207, 978, 29962, 13, 1678, 534, 29883, 2922, 29956, 353, 4842, 305, 29889, 3166, 29918, 23749, 29898, 2922, 7915, 29897, 13, 1678, 565, 7431, 29898, 509, 29883, 7915, 29889, 12181, 29897, 1275, 29871, 29946, 29901, 396, 7602, 29906, 7546, 13, 4706, 534, 29883, 2922, 29956, 353, 534, 29883, 2922, 29956, 29889, 17858, 1082, 29898, 29941, 29892, 29871, 29906, 29892, 29871, 29900, 29892, 29871, 29896, 29897, 13, 4706, 396, 1775, 8205, 7688, 8267, 518, 5072, 3505, 29898, 29896, 511, 5072, 3505, 29898, 29906, 511, 8009, 1451, 12629, 29892, 8009, 3434, 2153, 29962, 13, 4706, 396, 4842, 305, 7688, 8267, 10338, 449, 29918, 305, 12629, 29898, 8009, 3434, 2153, 511, 297, 29918, 305, 12629, 29898, 8009, 1451, 12629, 511, 8466, 29918, 2311, 4514, 29952, 13, 1678, 25342, 7431, 29898, 509, 29883, 7915, 29889, 12181, 29897, 1275, 29871, 29906, 29901, 396, 285, 29883, 7546, 1775, 16109, 7688, 338, 29871, 29906, 29881, 13, 4706, 1209, 13, 1678, 4974, 534, 29883, 2922, 29956, 29889, 12181, 1275, 534, 29883, 7915, 29889, 12181, 13, 1678, 2106, 29918, 8977, 29961, 3207, 978, 29962, 353, 534, 29883, 2922, 29956, 13, 1678, 1596, 29898, 3207, 978, 29892, 1775, 29886, 978, 29892, 534, 29883, 7915, 29889, 12181, 29892, 1775, 7915, 29889, 12181, 29892, 1723, 13, 13, 2 ]
cam/03_face_recognition.py
kimtaehoho/osscap2020
0
15395
# -*- coding: utf-8 -*- #import game from glob import glob file1 = glob("01_face_dataset.py") file2 = glob("02_face_training.py") import facedataset import facetrain import cv2 import numpy as np import os from PIL import Image #facedataset.first() #facetrain.second() recognizer = cv2.face.LBPHFaceRecognizer_create() recognizer.read('trainer/trainer.yml') cascadePath = "haarcascades/haarcascade_frontalface_default.xml" faceCascade = cv2.CascadeClassifier(cascadePath); font = cv2.FONT_HERSHEY_SIMPLEX #iniciate id counter id = 0 # names related to ids: example ==> loze: id=1, etc # 이런식으로 사용자의 이름을 사용자 수만큼 추가해준다. names = ['None', 'kkh', 'kth', 'ldh'] # Initialize and start realtime video capture cam = cv2.VideoCapture(0) cam.set(3, 640) # set video widht cam.set(4, 480) # set video height # Define min window size to be recognized as a face minW = 0.1*cam.get(3) minH = 0.1*cam.get(4) while True: ret, img =cam.read() #img = cv2.flip(img, -1) # Flip vertically gray = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY) faces = faceCascade.detectMultiScale( gray, scaleFactor = 1.2, minNeighbors = 5, minSize = (int(minW), int(minH)), ) for(x,y,w,h) in faces: cv2.rectangle(img, (x,y), (x+w,y+h), (0,255,0), 2) id, confidence = recognizer.predict(gray[y:y+h,x:x+w]) # Check if confidence is less them 100 ==> "0" is perfect match if (confidence < 100): id = names[id] confidence = " {0}%".format(round(100 - confidence)) #game.start() else: facedataset.first() facetrain.second() #exec(open(file1.read()) #exec(open(file2.read()) #game.start() confidence = " {0}%".format(round(100 - confidence)) cv2.putText(img, str(id), (x+5,y-5), font, 1, (255,255,255), 2) cv2.putText(img, str(confidence), (x+5,y+h-5), font, 1, (255,255,0), 1) cv2.imshow('camera',img) k = cv2.waitKey(10) & 0xff # Press 'ESC' for exiting video if k == 27: break # Do a bit of cleanup print("\n [INFO] Exiting Program and cleanup stuff") cam.release() cv2.destroyAllWindows()
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 29937, 5215, 3748, 13, 3166, 13149, 1053, 13149, 13, 1445, 29896, 353, 13149, 703, 29900, 29896, 29918, 2161, 29918, 24713, 29889, 2272, 1159, 13, 1445, 29906, 353, 13149, 703, 29900, 29906, 29918, 2161, 29918, 26495, 29889, 2272, 1159, 13, 5215, 20050, 271, 24541, 13, 5215, 4024, 300, 6038, 13, 5215, 13850, 29906, 13, 5215, 12655, 408, 7442, 13, 5215, 2897, 13, 3166, 349, 6227, 1053, 7084, 13, 29937, 17470, 287, 271, 24541, 29889, 4102, 580, 13, 13, 29937, 17470, 300, 6038, 29889, 7496, 580, 13, 29423, 3950, 353, 13850, 29906, 29889, 2161, 29889, 29931, 29933, 19689, 23360, 27475, 29918, 3258, 580, 13, 29423, 3950, 29889, 949, 877, 3018, 4983, 29914, 3018, 4983, 29889, 21053, 1495, 13, 9398, 6332, 2605, 353, 376, 2350, 5666, 6151, 3076, 29914, 2350, 5666, 294, 6332, 29918, 8862, 284, 2161, 29918, 4381, 29889, 3134, 29908, 13, 2161, 29907, 294, 6332, 353, 13850, 29906, 29889, 29907, 294, 6332, 2385, 3709, 29898, 9398, 6332, 2605, 416, 13, 5657, 353, 13850, 29906, 29889, 29943, 1164, 29911, 29918, 4448, 7068, 13282, 29918, 5425, 3580, 1307, 29990, 13, 13, 29937, 262, 1654, 403, 1178, 6795, 13, 333, 353, 29871, 29900, 13, 13, 29937, 2983, 4475, 304, 18999, 29901, 1342, 25230, 658, 911, 29901, 1178, 29922, 29896, 29892, 29871, 2992, 13, 29937, 29871, 30393, 238, 162, 179, 31895, 239, 159, 191, 30906, 29871, 30791, 31737, 31013, 30708, 29871, 30393, 238, 169, 135, 31286, 29871, 30791, 31737, 31013, 29871, 30970, 31826, 240, 132, 191, 29871, 239, 185, 151, 30903, 31435, 239, 167, 131, 30709, 29889, 13, 7039, 353, 6024, 8516, 742, 525, 6859, 29882, 742, 525, 29895, 386, 742, 525, 430, 29882, 2033, 13, 13, 29937, 25455, 322, 1369, 1855, 2230, 4863, 10446, 13, 11108, 353, 13850, 29906, 29889, 15167, 21133, 545, 29898, 29900, 29897, 13, 11108, 29889, 842, 29898, 29941, 29892, 29871, 29953, 29946, 29900, 29897, 396, 731, 4863, 9449, 400, 13, 11108, 29889, 842, 29898, 29946, 29892, 29871, 29946, 29947, 29900, 29897, 396, 731, 4863, 3171, 13, 13, 29937, 22402, 1375, 3474, 2159, 304, 367, 14831, 408, 263, 3700, 13, 1195, 29956, 353, 29871, 29900, 29889, 29896, 29930, 11108, 29889, 657, 29898, 29941, 29897, 13, 1195, 29950, 353, 29871, 29900, 29889, 29896, 29930, 11108, 29889, 657, 29898, 29946, 29897, 13, 13, 8000, 5852, 29901, 13, 1678, 3240, 29892, 10153, 353, 11108, 29889, 949, 580, 13, 1678, 396, 2492, 353, 13850, 29906, 29889, 29888, 3466, 29898, 2492, 29892, 448, 29896, 29897, 396, 383, 3466, 4837, 1711, 13, 1678, 16749, 353, 13850, 29906, 29889, 11023, 29873, 3306, 29898, 2492, 29892, 11023, 29906, 29889, 15032, 1955, 29918, 29933, 14345, 29906, 29954, 22800, 29897, 13, 268, 13, 1678, 17240, 353, 3700, 29907, 294, 6332, 29889, 4801, 522, 15329, 17185, 29898, 29871, 13, 4706, 16749, 29892, 13, 4706, 6287, 29943, 7168, 353, 29871, 29896, 29889, 29906, 29892, 13, 4706, 1375, 8139, 1141, 29890, 943, 353, 29871, 29945, 29892, 13, 4706, 1375, 3505, 353, 313, 524, 29898, 1195, 29956, 511, 938, 29898, 1195, 29950, 8243, 13, 539, 1723, 13, 13, 1678, 363, 29898, 29916, 29892, 29891, 29892, 29893, 29892, 29882, 29897, 297, 17240, 29901, 13, 4706, 13850, 29906, 29889, 1621, 2521, 29898, 2492, 29892, 313, 29916, 29892, 29891, 511, 313, 29916, 29974, 29893, 29892, 29891, 29974, 29882, 511, 313, 29900, 29892, 29906, 29945, 29945, 29892, 29900, 511, 29871, 29906, 29897, 13, 4706, 1178, 29892, 16420, 353, 5936, 3950, 29889, 27711, 29898, 21012, 29961, 29891, 29901, 29891, 29974, 29882, 29892, 29916, 29901, 29916, 29974, 29893, 2314, 13, 4706, 396, 5399, 565, 16420, 338, 3109, 963, 29871, 29896, 29900, 29900, 25230, 376, 29900, 29908, 338, 4922, 1993, 13, 4706, 565, 313, 5527, 5084, 529, 29871, 29896, 29900, 29900, 1125, 13, 9651, 1178, 353, 2983, 29961, 333, 29962, 13, 9651, 16420, 353, 376, 29871, 426, 29900, 10560, 1642, 4830, 29898, 14486, 29898, 29896, 29900, 29900, 448, 16420, 876, 13, 9651, 13, 9651, 396, 11802, 29889, 2962, 580, 13, 4706, 1683, 29901, 13, 9651, 20050, 271, 24541, 29889, 4102, 580, 13, 9651, 4024, 300, 6038, 29889, 7496, 580, 13, 9651, 396, 4258, 29898, 3150, 29898, 1445, 29896, 29889, 949, 3101, 13, 9651, 396, 4258, 29898, 3150, 29898, 1445, 29906, 29889, 949, 3101, 13, 9651, 396, 11802, 29889, 2962, 580, 13, 9651, 16420, 353, 376, 29871, 426, 29900, 10560, 1642, 4830, 29898, 14486, 29898, 29896, 29900, 29900, 448, 16420, 876, 13, 13, 13, 4706, 13850, 29906, 29889, 649, 1626, 29898, 2492, 29892, 851, 29898, 333, 511, 313, 29916, 29974, 29945, 29892, 29891, 29899, 29945, 511, 4079, 29892, 29871, 29896, 29892, 313, 29906, 29945, 29945, 29892, 29906, 29945, 29945, 29892, 29906, 29945, 29945, 511, 29871, 29906, 29897, 13, 4706, 13850, 29906, 29889, 649, 1626, 29898, 2492, 29892, 851, 29898, 5527, 5084, 511, 313, 29916, 29974, 29945, 29892, 29891, 29974, 29882, 29899, 29945, 511, 4079, 29892, 29871, 29896, 29892, 313, 29906, 29945, 29945, 29892, 29906, 29945, 29945, 29892, 29900, 511, 29871, 29896, 29897, 259, 13, 13, 1678, 13850, 29906, 29889, 326, 4294, 877, 26065, 742, 2492, 29897, 13, 1678, 413, 353, 13850, 29906, 29889, 10685, 2558, 29898, 29896, 29900, 29897, 669, 29871, 29900, 29916, 600, 396, 5254, 525, 2890, 29907, 29915, 363, 6876, 292, 4863, 13, 1678, 565, 413, 1275, 29871, 29906, 29955, 29901, 13, 4706, 2867, 13, 29937, 1938, 263, 2586, 310, 5941, 786, 13, 2158, 14182, 29876, 518, 11690, 29962, 1222, 11407, 7835, 322, 5941, 786, 6433, 1159, 13, 11108, 29889, 14096, 580, 13, 11023, 29906, 29889, 20524, 3596, 7685, 580, 13, 13, 2 ]
try-except.py
kmarcini/Learn-Python---Full-Course-for-Beginners-Tutorial-
0
3786
<reponame>kmarcini/Learn-Python---Full-Course-for-Beginners-Tutorial-<filename>try-except.py try: # num = 10 / 0 number = int(input("Enter a number: ")) print(number) # catch specific errors except ZeroDivisionError as err: print(err) except ValueError: print("Invalid input")
[ 1, 529, 276, 1112, 420, 29958, 29895, 3034, 29883, 2172, 29914, 29931, 799, 29876, 29899, 11980, 5634, 13658, 29899, 29907, 10242, 29899, 1454, 29899, 17946, 8397, 29899, 29911, 6072, 29899, 29966, 9507, 29958, 2202, 29899, 19499, 29889, 2272, 13, 13, 2202, 29901, 13, 1678, 396, 954, 353, 29871, 29896, 29900, 847, 29871, 29900, 13, 1678, 1353, 353, 938, 29898, 2080, 703, 10399, 263, 1353, 29901, 376, 876, 13, 1678, 1596, 29898, 4537, 29897, 13, 13, 29937, 4380, 2702, 4436, 13, 19499, 28933, 12596, 2459, 2392, 408, 4589, 29901, 13, 1678, 1596, 29898, 3127, 29897, 13, 19499, 7865, 2392, 29901, 13, 1678, 1596, 703, 13919, 1881, 1159, 13, 2 ]
sistema_operacional.py
JorgeMGuimaraes/escalonador
1
89853
<filename>sistema_operacional.py #!/usr/bin/python3 ## imports import io from escalonador import Escalonador from processo import Processo from recursos import Recursos from typing import List ## classes ## definicoes def processa_entrada(quantum: int) -> List[Processo]: filename ='entrada' contador_processos = 0 processos = [] with open(file=filename,mode='r') as arquivo: for linha in arquivo: if linha.startswith('#') or linha == '\n' or linha == '': continue valores = linha.split(',') chegada = int(valores[0].strip()) prioridade = int(valores[1].strip()) duracao = int(valores[2].strip()) memoria = int(valores[3].strip()) discos = int(valores[4].strip()) entrada = Processo( id_processo = contador_processos, chegada = chegada, prioridade = prioridade, duracao = duracao, memoria = memoria, discos = discos ) entrada.define_quantum(quantum) processos.append(entrada) contador_processos += 1 return processos def imprime_header(quantum: int) -> None: espacamento = ' ' s = 'Estado Atual:\n' s += f'Quantum: {quantum}\n' print(s) return def main(): # TODO: pegar valores do usuário quantum = 2 contador_quanta = 0 cpus = 4 discos = 4 memoria = 16 * 1024 recursos = Recursos(cpus, discos, memoria) escalonador = Escalonador(recursos, processa_entrada(quantum)) escalonador.imprime_processos_recebidos() print() while escalonador.continuar_processando(): imprime_header(contador_quanta) escalonador.ativa_prontos_suspensos() escalonador.executa_leitura_gravacao() escalonador.reserva_discos() escalonador.instanciar_processos(contador_quanta) escalonador.admitir_processos() escalonador.despachar() escalonador.processar_threads() escalonador.atualiza_estado_idle(contador_quanta) recursos.imprime_processadores() recursos.imprime_memoria() recursos.imprime_discos() escalonador.imprime_log_processos() escalonador.imprime_andamento(contador_quanta) contador_quanta += 1 _ = input() return ## Programa principal if __name__ == "__main__": main()
[ 1, 529, 9507, 29958, 29879, 28474, 29918, 3372, 4264, 29889, 2272, 13, 29937, 14708, 4855, 29914, 2109, 29914, 4691, 29941, 13, 2277, 24802, 13, 5215, 12013, 13, 3166, 831, 1052, 265, 3136, 1678, 1053, 3423, 1052, 265, 3136, 13, 3166, 1889, 29877, 539, 1053, 10554, 29877, 13, 3166, 8304, 359, 539, 1053, 3599, 1295, 359, 13, 3166, 19229, 308, 1053, 2391, 13, 2277, 4413, 13, 13, 2277, 7403, 1417, 267, 13, 1753, 1889, 29874, 29918, 14856, 1114, 29898, 12150, 398, 29901, 938, 29897, 1599, 2391, 29961, 7032, 29877, 5387, 13, 1678, 10422, 9651, 353, 29915, 14856, 1114, 29915, 13, 1678, 640, 3136, 29918, 5014, 359, 29871, 353, 29871, 29900, 13, 1678, 1889, 359, 965, 353, 5159, 13, 1678, 411, 1722, 29898, 1445, 29922, 9507, 29892, 8513, 2433, 29878, 1495, 408, 19325, 4243, 29901, 13, 4706, 363, 6276, 2350, 297, 19325, 4243, 29901, 13, 9651, 565, 6276, 2350, 29889, 27382, 2541, 14237, 1495, 470, 6276, 2350, 1275, 11297, 29876, 29915, 470, 6276, 2350, 1275, 525, 2396, 13, 18884, 6773, 13, 9651, 659, 2361, 268, 353, 6276, 2350, 29889, 5451, 29317, 1495, 13, 9651, 923, 29887, 1114, 268, 353, 938, 29898, 791, 2361, 29961, 29900, 1822, 17010, 3101, 13, 9651, 7536, 5558, 29871, 353, 938, 29898, 791, 2361, 29961, 29896, 1822, 17010, 3101, 13, 9651, 1411, 562, 6241, 268, 353, 938, 29898, 791, 2361, 29961, 29906, 1822, 17010, 3101, 13, 9651, 2626, 4108, 268, 353, 938, 29898, 791, 2361, 29961, 29941, 1822, 17010, 3101, 13, 9651, 2313, 359, 418, 353, 938, 29898, 791, 2361, 29961, 29946, 1822, 17010, 3101, 13, 9651, 9953, 1114, 268, 353, 10554, 29877, 29898, 13, 462, 462, 1678, 1178, 29918, 5014, 29877, 353, 640, 3136, 29918, 5014, 359, 29892, 13, 462, 462, 1678, 923, 29887, 1114, 268, 353, 923, 29887, 1114, 29892, 13, 462, 462, 1678, 7536, 5558, 29871, 353, 7536, 5558, 29892, 13, 462, 462, 1678, 1411, 562, 6241, 268, 353, 1411, 562, 6241, 29892, 13, 462, 462, 1678, 2626, 4108, 268, 353, 2626, 4108, 29892, 13, 462, 462, 1678, 2313, 359, 418, 353, 2313, 359, 462, 462, 1723, 13, 9651, 9953, 1114, 29889, 7922, 29918, 12150, 398, 29898, 12150, 398, 29897, 13, 9651, 1889, 359, 29889, 4397, 29898, 14856, 1114, 29897, 13, 9651, 640, 3136, 29918, 5014, 359, 29871, 4619, 29871, 29896, 13, 1678, 736, 1889, 359, 13, 13, 1753, 527, 10080, 29918, 6672, 29898, 12150, 398, 29901, 938, 29897, 1599, 6213, 29901, 13, 1678, 5152, 562, 4487, 353, 525, 1678, 525, 13, 1678, 269, 29871, 353, 525, 12787, 912, 2180, 950, 3583, 29876, 29915, 13, 1678, 269, 4619, 285, 29915, 22930, 398, 29901, 426, 12150, 398, 1012, 29876, 29915, 13, 1678, 1596, 29898, 29879, 29897, 13, 1678, 736, 13, 13, 1753, 1667, 7295, 13, 1678, 396, 14402, 29901, 282, 387, 279, 659, 2361, 437, 502, 29884, 12288, 13, 1678, 12101, 308, 353, 29871, 29906, 13, 1678, 640, 3136, 29918, 339, 6949, 353, 29871, 29900, 13, 1678, 274, 13364, 9651, 353, 29871, 29946, 13, 1678, 2313, 359, 3986, 353, 29871, 29946, 13, 1678, 2626, 4108, 308, 353, 29871, 29896, 29953, 334, 29871, 29896, 29900, 29906, 29946, 13, 1678, 8304, 359, 4706, 353, 3599, 1295, 359, 29898, 6814, 375, 29892, 2313, 359, 29892, 2626, 4108, 29897, 13, 1678, 831, 1052, 265, 3136, 268, 353, 3423, 1052, 265, 3136, 29898, 3757, 1295, 359, 29892, 1889, 29874, 29918, 14856, 1114, 29898, 12150, 398, 876, 13, 1678, 831, 1052, 265, 3136, 29889, 326, 10080, 29918, 5014, 359, 29918, 13556, 29890, 4396, 580, 13, 1678, 1596, 580, 13, 1678, 1550, 831, 1052, 265, 3136, 29889, 20621, 279, 29918, 5014, 1743, 7295, 13, 4706, 527, 10080, 29918, 6672, 29898, 1285, 3136, 29918, 339, 6949, 29897, 13, 13, 4706, 831, 1052, 265, 3136, 29889, 8657, 29918, 558, 609, 359, 29918, 29879, 375, 29886, 575, 359, 580, 13, 4706, 831, 1052, 265, 3136, 29889, 4258, 6637, 29918, 280, 277, 2002, 29918, 3874, 29894, 562, 6241, 580, 13, 4706, 831, 1052, 265, 3136, 29889, 690, 25461, 29918, 2218, 3944, 580, 13, 4706, 831, 1052, 265, 3136, 29889, 2611, 8463, 279, 29918, 5014, 359, 29898, 1285, 3136, 29918, 339, 6949, 29897, 13, 4706, 831, 1052, 265, 3136, 29889, 328, 2415, 381, 29918, 5014, 359, 580, 13, 4706, 831, 1052, 265, 3136, 29889, 2783, 29886, 496, 279, 580, 13, 4706, 831, 1052, 265, 3136, 29889, 5014, 279, 29918, 28993, 580, 13, 4706, 831, 1052, 265, 3136, 29889, 271, 950, 6619, 29918, 342, 912, 29918, 333, 280, 29898, 1285, 3136, 29918, 339, 6949, 29897, 13, 13, 4706, 8304, 359, 29889, 326, 10080, 29918, 5014, 7447, 580, 13, 4706, 8304, 359, 29889, 326, 10080, 29918, 6954, 4108, 580, 13, 4706, 8304, 359, 29889, 326, 10080, 29918, 2218, 3944, 580, 13, 13, 4706, 831, 1052, 265, 3136, 29889, 326, 10080, 29918, 1188, 29918, 5014, 359, 580, 13, 4706, 831, 1052, 265, 3136, 29889, 326, 10080, 29918, 392, 4487, 29898, 1285, 3136, 29918, 339, 6949, 29897, 13, 4706, 640, 3136, 29918, 339, 6949, 4619, 29871, 29896, 13, 4706, 903, 1669, 353, 1881, 580, 13, 1678, 736, 13, 13, 2277, 7835, 29874, 5882, 13, 361, 4770, 978, 1649, 1275, 376, 1649, 3396, 1649, 1115, 1667, 580, 13, 2 ]
tests/resources/test_todo_items.py
andela-ojoloko/Todo-Api
0
158648
import json import jwt from ..base import BaseTestCase from api.models import Todo, User, db, TodoItem from api.util import generate_token from datetime import datetime, timedelta class TodosTestCase(BaseTestCase): def setUp(self): db.drop_all() db.create_all() self.user_1 = User( first_name="existing_first_name", last_name="existing_last_name", password= "<PASSWORD>", email="<EMAIL>" ) self.user_2 = User( first_name="existing_first_name", last_name="existing_last_name", password= "<PASSWORD>", email="<EMAIL>" ) self.todo_1 = Todo( title="firt todo" ) self.todo_2 = Todo( title="second todo" ) self.user_1.todos.append(self.todo_1) self.user_2.todos.append(self.todo_2) self.user_1.save() self.user_2.save() self.token_1 = generate_token(self.user_1) self.token_2 = generate_token(self.user_2) self.headers_1 = { "Authorization": f"Bearer {self.token_1}"} self.headers_2 = { "Authorization": f"Bearer {self.token_2}"} def test_creating_todo_item_succesfully(self): """ tests succesfull creation of todo item """ todo_item = {"content": "cut the onions"} response = self.client.post(f'/api/todos/{self.todo_1.id}/todo_items', json=todo_item, headers=self.headers_1) json_data = response.get_json() self.assertStatus(response, 201) self.assertEqual(json_data["todo_item"]["content"], todo_item["content"]) self.assertEqual(json_data["message"], "todo item created") def test_creating_todo_item_for_non_existent_todo(self): """ tests creating todo item for non existent todo """ todo_item = {"content": "cut the onions"} response = self.client.post('/api/todos/190000099/todo_items', json=todo_item, headers=self.headers_1) json_data = response.get_json() self.assertStatus(response, 404) self.assertEqual(json_data["message"], "todo does not exist") def test_creating_todo_item_with_empty_content(self): """ tests creating todo item with empty content """ todo_item = {"content": ""} response = self.client.post(f'/api/todos/{self.todo_1.id}/todo_items', json=todo_item, headers=self.headers_1) json_data = response.get_json() self.assertStatus(response, 422) self.assertEqual(json_data["message"], "validation failed") self.assertEqual(json_data["errors"]["content"][0], "Data not provided.") def test_successfull_deletion_of_todo_item(self): """ tests deletion of single todo succesfully """ todo_item_1 = TodoItem(content="test content 1", todo_id=self.todo_1.id) todo_item_1.save() todo_item_2 = TodoItem(content="test content 2", todo_id=self.todo_2.id) todo_item_2.save() response = self.client.delete(f'/api/todos/{self.todo_1.id}/todo_items/{todo_item_1.id}', headers=self.headers_1) json_data = response.get_json() self.assertStatus(response, 200) self.assertEqual(json_data["message"], "todo item deleted") def test_deletion_of_todo_item_with_non_existent_todo_id_in_url(self): """ tests deletion of todo todo item with no existent todo_id in url """ todo_item_1 = TodoItem(content="test content 1", todo_id=self.todo_1.id) todo_item_1.save() todo_item_2 = TodoItem(content="test content 2", todo_id=self.todo_2.id) todo_item_2.save() response = self.client.delete(f'/api/todos/999999999/todo_items/{todo_item_1.id}', headers=self.headers_1) json_data = response.get_json() self.assertStatus(response, 404) self.assertEqual(json_data["message"], "todo does not exist") def test_deletion_of_todo_item_with_non_existent_todo_item_id_in_url(self): """ tests deletion of todo todo item with no existent todo_item_id in url """ todo_item_1 = TodoItem(content="test content 1", todo_id=self.todo_1.id) todo_item_1.save() todo_item_2 = TodoItem(content="test content 2", todo_id=self.todo_2.id) todo_item_2.save() response = self.client.delete(f'/api/todos/{self.todo_1.id}/todo_items/99999999', headers=self.headers_1) json_data = response.get_json() self.assertStatus(response, 404) self.assertEqual(json_data["message"], "todo item does not exist") def test_deletion_of_todo_item_not_created_by_user(self): """ tests deletion of todo item not created by user """ todo_item_1 = TodoItem(content="test content 1", todo_id=self.todo_1.id) todo_item_1.save() todo_item_2 = TodoItem(content="test content 2", todo_id=self.todo_2.id) todo_item_2.save() response = self.client.delete(f'/api/todos/{self.todo_2.id}/todo_items/{todo_item_2.id}', headers=self.headers_1) json_data = response.get_json() self.assertStatus(response, 401) self.assertEqual(json_data["message"], "unauthorized") def test_updating_of_todo_item_not_created_by_user(self): """ tests update of todo item not created by user """ todo_item_1 = TodoItem(content="test content 1", todo_id=self.todo_1.id) todo_item_1.save() todo_item_2 = TodoItem(content="test content 2", todo_id=self.todo_2.id) todo_item_2.save() todo_item_update = { "complete": True } response = self.client.put(f'/api/todos/{self.todo_2.id}/todo_items/{todo_item_2.id}', headers=self.headers_1, json=todo_item_update) json_data = response.get_json() self.assertStatus(response, 401) self.assertEqual(json_data["message"], "unauthorized") def test_update_of_todo_item_with_non_existent_todo_id_in_url(self): """ tests update of todo todo item with no existent todo_id in url """ todo_item_1 = TodoItem(content="test content 1", todo_id=self.todo_1.id) todo_item_1.save() todo_item_2 = TodoItem(content="test content 2", todo_id=self.todo_2.id) todo_item_2.save() todo_item_update = { "complete": True } response = self.client.put(f'/api/todos/999999999/todo_items/{todo_item_1.id}', headers=self.headers_1, json=todo_item_update) json_data = response.get_json() self.assertStatus(response, 404) self.assertEqual(json_data["message"], "todo does not exist") def test_update_of_todo_item_with_non_existent_todo_item_id_in_url(self): """ tests update of todo todo item with no existent todo_item_id in url """ todo_item_1 = TodoItem(content="test content 1", todo_id=self.todo_1.id) todo_item_1.save() todo_item_2 = TodoItem(content="test content 2", todo_id=self.todo_2.id) todo_item_2.save() todo_item_update = { "complete": True } response = self.client.put(f'/api/todos/{self.todo_1.id}/todo_items/99999999', headers=self.headers_1, json=todo_item_update) json_data = response.get_json() self.assertStatus(response, 404) self.assertEqual(json_data["message"], "todo item does not exist") def test_update_of_todo_item_successfully(self): """ tests update of todo todo item succesfully """ todo_item_1 = TodoItem(content="test content 1", todo_id=self.todo_1.id) todo_item_1.save() todo_item_2 = TodoItem(content="test content 2", todo_id=self.todo_2.id) todo_item_2.save() todo_item_update = { "complete": True } response = self.client.put(f'/api/todos/{self.todo_1.id}/todo_items/{todo_item_1.id}', headers=self.headers_1, json=todo_item_update) json_data = response.get_json() self.assertStatus(response, 200) self.assertEqual(json_data["message"], "todo_item updated") self.assertEqual(json_data["todo_item"]["complete"], todo_item_update["complete"]) def test_update_of_todo_item_with_invalid_data(self): """ tests update of todo todo item with invalid data """ todo_item_1 = TodoItem(content="test content 1", todo_id=self.todo_1.id) todo_item_1.save() todo_item_2 = TodoItem(content="test content 2", todo_id=self.todo_2.id) todo_item_2.save() todo_item_update = { "complete": "how" } response = self.client.put(f'/api/todos/{self.todo_1.id}/todo_items/{todo_item_1.id}', headers=self.headers_1, json=todo_item_update) json_data = response.get_json() self.assertStatus(response, 422) self.assertEqual(json_data["message"], "validation failed")
[ 1, 1053, 4390, 13, 5215, 432, 14554, 13, 3166, 6317, 3188, 1053, 7399, 3057, 8259, 13, 3166, 7882, 29889, 9794, 1053, 7561, 29877, 29892, 4911, 29892, 4833, 29892, 7561, 29877, 2001, 13, 3166, 7882, 29889, 4422, 1053, 5706, 29918, 6979, 13, 3166, 12865, 1053, 12865, 29892, 5335, 287, 2554, 13, 13, 13, 13, 1990, 7561, 359, 3057, 8259, 29898, 5160, 3057, 8259, 1125, 13, 13, 1678, 822, 731, 3373, 29898, 1311, 1125, 13, 4706, 4833, 29889, 8865, 29918, 497, 580, 13, 4706, 4833, 29889, 3258, 29918, 497, 580, 13, 268, 13, 4706, 1583, 29889, 1792, 29918, 29896, 353, 4911, 29898, 13, 9651, 937, 29918, 978, 543, 735, 15423, 29918, 4102, 29918, 978, 613, 13, 9651, 1833, 29918, 978, 543, 735, 15423, 29918, 4230, 29918, 978, 613, 13, 9651, 4800, 29922, 9872, 25711, 17013, 28341, 13, 9651, 4876, 543, 29966, 26862, 6227, 11903, 13, 4706, 1723, 13, 4706, 1583, 29889, 1792, 29918, 29906, 353, 4911, 29898, 13, 9651, 937, 29918, 978, 543, 735, 15423, 29918, 4102, 29918, 978, 613, 13, 9651, 1833, 29918, 978, 543, 735, 15423, 29918, 4230, 29918, 978, 613, 13, 9651, 4800, 29922, 9872, 25711, 17013, 28341, 13, 9651, 4876, 543, 29966, 26862, 6227, 11903, 13, 4706, 1723, 13, 4706, 1583, 29889, 29873, 8144, 29918, 29896, 353, 7561, 29877, 29898, 13, 9651, 3611, 543, 29888, 2728, 10481, 29908, 13, 4706, 1723, 13, 4706, 1583, 29889, 29873, 8144, 29918, 29906, 353, 7561, 29877, 29898, 13, 9651, 3611, 543, 7496, 10481, 29908, 13, 4706, 1723, 13, 4706, 1583, 29889, 1792, 29918, 29896, 29889, 20034, 359, 29889, 4397, 29898, 1311, 29889, 29873, 8144, 29918, 29896, 29897, 13, 4706, 1583, 29889, 1792, 29918, 29906, 29889, 20034, 359, 29889, 4397, 29898, 1311, 29889, 29873, 8144, 29918, 29906, 29897, 13, 4706, 1583, 29889, 1792, 29918, 29896, 29889, 7620, 580, 13, 4706, 1583, 29889, 1792, 29918, 29906, 29889, 7620, 580, 13, 4706, 1583, 29889, 6979, 29918, 29896, 353, 5706, 29918, 6979, 29898, 1311, 29889, 1792, 29918, 29896, 29897, 13, 4706, 1583, 29889, 6979, 29918, 29906, 353, 5706, 29918, 6979, 29898, 1311, 29889, 1792, 29918, 29906, 29897, 13, 4706, 1583, 29889, 13662, 29918, 29896, 353, 426, 376, 25471, 1115, 285, 29908, 29933, 799, 261, 426, 1311, 29889, 6979, 29918, 29896, 5038, 29913, 13, 4706, 1583, 29889, 13662, 29918, 29906, 353, 426, 376, 25471, 1115, 285, 29908, 29933, 799, 261, 426, 1311, 29889, 6979, 29918, 29906, 5038, 29913, 13, 13, 1678, 822, 1243, 29918, 1037, 1218, 29918, 29873, 8144, 29918, 667, 29918, 2146, 617, 267, 3730, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 6987, 8348, 267, 8159, 11265, 310, 10481, 2944, 13, 4706, 9995, 13, 4706, 10481, 29918, 667, 353, 8853, 3051, 1115, 376, 7582, 278, 373, 1080, 9092, 13, 4706, 2933, 353, 1583, 29889, 4645, 29889, 2490, 29898, 29888, 29915, 29914, 2754, 29914, 20034, 359, 19248, 1311, 29889, 29873, 8144, 29918, 29896, 29889, 333, 6822, 29873, 8144, 29918, 7076, 742, 4390, 29922, 29873, 8144, 29918, 667, 29892, 9066, 29922, 1311, 29889, 13662, 29918, 29896, 29897, 13, 4706, 4390, 29918, 1272, 353, 2933, 29889, 657, 29918, 3126, 580, 13, 4706, 1583, 29889, 9294, 5709, 29898, 5327, 29892, 29871, 29906, 29900, 29896, 29897, 13, 4706, 1583, 29889, 9294, 9843, 29898, 3126, 29918, 1272, 3366, 29873, 8144, 29918, 667, 3108, 3366, 3051, 12436, 10481, 29918, 667, 3366, 3051, 20068, 13, 4706, 1583, 29889, 9294, 9843, 29898, 3126, 29918, 1272, 3366, 4906, 12436, 376, 29873, 8144, 2944, 2825, 1159, 13, 268, 13, 1678, 822, 1243, 29918, 1037, 1218, 29918, 29873, 8144, 29918, 667, 29918, 1454, 29918, 5464, 29918, 735, 9696, 29918, 29873, 8144, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 6987, 4969, 10481, 2944, 363, 1661, 1863, 296, 10481, 13, 4706, 9995, 13, 4706, 10481, 29918, 667, 353, 8853, 3051, 1115, 376, 7582, 278, 373, 1080, 9092, 13, 4706, 2933, 353, 1583, 29889, 4645, 29889, 2490, 11219, 2754, 29914, 20034, 359, 29914, 29896, 29929, 29900, 29900, 29900, 29900, 29900, 29929, 29929, 29914, 29873, 8144, 29918, 7076, 742, 4390, 29922, 29873, 8144, 29918, 667, 29892, 9066, 29922, 1311, 29889, 13662, 29918, 29896, 29897, 13, 4706, 4390, 29918, 1272, 353, 2933, 29889, 657, 29918, 3126, 580, 13, 4706, 1583, 29889, 9294, 5709, 29898, 5327, 29892, 29871, 29946, 29900, 29946, 29897, 13, 4706, 1583, 29889, 9294, 9843, 29898, 3126, 29918, 1272, 3366, 4906, 12436, 376, 29873, 8144, 947, 451, 1863, 1159, 13, 268, 13, 1678, 822, 1243, 29918, 1037, 1218, 29918, 29873, 8144, 29918, 667, 29918, 2541, 29918, 6310, 29918, 3051, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 6987, 4969, 10481, 2944, 411, 4069, 2793, 13, 4706, 9995, 13, 4706, 10481, 29918, 667, 353, 8853, 3051, 1115, 5124, 29913, 13, 4706, 2933, 353, 1583, 29889, 4645, 29889, 2490, 29898, 29888, 29915, 29914, 2754, 29914, 20034, 359, 19248, 1311, 29889, 29873, 8144, 29918, 29896, 29889, 333, 6822, 29873, 8144, 29918, 7076, 742, 4390, 29922, 29873, 8144, 29918, 667, 29892, 9066, 29922, 1311, 29889, 13662, 29918, 29896, 29897, 13, 4706, 4390, 29918, 1272, 353, 2933, 29889, 657, 29918, 3126, 580, 13, 4706, 1583, 29889, 9294, 5709, 29898, 5327, 29892, 29871, 29946, 29906, 29906, 29897, 13, 4706, 1583, 29889, 9294, 9843, 29898, 3126, 29918, 1272, 3366, 4906, 12436, 376, 18157, 5229, 1159, 13, 4706, 1583, 29889, 9294, 9843, 29898, 3126, 29918, 1272, 3366, 12523, 3108, 3366, 3051, 3108, 29961, 29900, 1402, 376, 1469, 451, 4944, 23157, 13, 268, 13, 1678, 822, 1243, 29918, 8698, 8159, 29918, 311, 1026, 291, 29918, 974, 29918, 29873, 8144, 29918, 667, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 6987, 7374, 291, 310, 2323, 10481, 8348, 267, 3730, 13, 4706, 9995, 13, 13, 4706, 10481, 29918, 667, 29918, 29896, 353, 7561, 29877, 2001, 29898, 3051, 543, 1688, 2793, 29871, 29896, 613, 10481, 29918, 333, 29922, 1311, 29889, 29873, 8144, 29918, 29896, 29889, 333, 29897, 29871, 13, 4706, 10481, 29918, 667, 29918, 29896, 29889, 7620, 580, 13, 13, 4706, 10481, 29918, 667, 29918, 29906, 353, 7561, 29877, 2001, 29898, 3051, 543, 1688, 2793, 29871, 29906, 613, 10481, 29918, 333, 29922, 1311, 29889, 29873, 8144, 29918, 29906, 29889, 333, 29897, 29871, 13, 4706, 10481, 29918, 667, 29918, 29906, 29889, 7620, 580, 13, 13, 4706, 2933, 353, 1583, 29889, 4645, 29889, 8143, 29898, 29888, 29915, 29914, 2754, 29914, 20034, 359, 19248, 1311, 29889, 29873, 8144, 29918, 29896, 29889, 333, 6822, 29873, 8144, 29918, 7076, 19248, 29873, 8144, 29918, 667, 29918, 29896, 29889, 333, 29913, 742, 9066, 29922, 1311, 29889, 13662, 29918, 29896, 29897, 13, 4706, 4390, 29918, 1272, 353, 2933, 29889, 657, 29918, 3126, 580, 13, 4706, 1583, 29889, 9294, 5709, 29898, 5327, 29892, 29871, 29906, 29900, 29900, 29897, 13, 4706, 1583, 29889, 9294, 9843, 29898, 3126, 29918, 1272, 3366, 4906, 12436, 376, 29873, 8144, 2944, 11132, 1159, 13, 268, 13, 1678, 822, 1243, 29918, 311, 1026, 291, 29918, 974, 29918, 29873, 8144, 29918, 667, 29918, 2541, 29918, 5464, 29918, 735, 9696, 29918, 29873, 8144, 29918, 333, 29918, 262, 29918, 2271, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 6987, 7374, 291, 310, 10481, 10481, 2944, 411, 694, 1863, 296, 10481, 29918, 333, 297, 3142, 13, 4706, 9995, 13, 13, 4706, 10481, 29918, 667, 29918, 29896, 353, 7561, 29877, 2001, 29898, 3051, 543, 1688, 2793, 29871, 29896, 613, 10481, 29918, 333, 29922, 1311, 29889, 29873, 8144, 29918, 29896, 29889, 333, 29897, 29871, 13, 4706, 10481, 29918, 667, 29918, 29896, 29889, 7620, 580, 13, 13, 4706, 10481, 29918, 667, 29918, 29906, 353, 7561, 29877, 2001, 29898, 3051, 543, 1688, 2793, 29871, 29906, 613, 10481, 29918, 333, 29922, 1311, 29889, 29873, 8144, 29918, 29906, 29889, 333, 29897, 29871, 13, 4706, 10481, 29918, 667, 29918, 29906, 29889, 7620, 580, 13, 13, 4706, 2933, 353, 1583, 29889, 4645, 29889, 8143, 29898, 29888, 29915, 29914, 2754, 29914, 20034, 359, 29914, 29929, 29929, 29929, 29929, 29929, 29929, 29929, 29929, 29929, 29914, 29873, 8144, 29918, 7076, 19248, 29873, 8144, 29918, 667, 29918, 29896, 29889, 333, 29913, 742, 9066, 29922, 1311, 29889, 13662, 29918, 29896, 29897, 13, 4706, 4390, 29918, 1272, 353, 2933, 29889, 657, 29918, 3126, 580, 13, 4706, 1583, 29889, 9294, 5709, 29898, 5327, 29892, 29871, 29946, 29900, 29946, 29897, 13, 4706, 1583, 29889, 9294, 9843, 29898, 3126, 29918, 1272, 3366, 4906, 12436, 376, 29873, 8144, 947, 451, 1863, 1159, 13, 268, 13, 1678, 822, 1243, 29918, 311, 1026, 291, 29918, 974, 29918, 29873, 8144, 29918, 667, 29918, 2541, 29918, 5464, 29918, 735, 9696, 29918, 29873, 8144, 29918, 667, 29918, 333, 29918, 262, 29918, 2271, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 6987, 7374, 291, 310, 10481, 10481, 2944, 411, 694, 1863, 296, 10481, 29918, 667, 29918, 333, 297, 3142, 13, 4706, 9995, 13, 13, 4706, 10481, 29918, 667, 29918, 29896, 353, 7561, 29877, 2001, 29898, 3051, 543, 1688, 2793, 29871, 29896, 613, 10481, 29918, 333, 29922, 1311, 29889, 29873, 8144, 29918, 29896, 29889, 333, 29897, 29871, 13, 4706, 10481, 29918, 667, 29918, 29896, 29889, 7620, 580, 13, 13, 4706, 10481, 29918, 667, 29918, 29906, 353, 7561, 29877, 2001, 29898, 3051, 543, 1688, 2793, 29871, 29906, 613, 10481, 29918, 333, 29922, 1311, 29889, 29873, 8144, 29918, 29906, 29889, 333, 29897, 29871, 13, 4706, 10481, 29918, 667, 29918, 29906, 29889, 7620, 580, 13, 13, 4706, 2933, 353, 1583, 29889, 4645, 29889, 8143, 29898, 29888, 29915, 29914, 2754, 29914, 20034, 359, 19248, 1311, 29889, 29873, 8144, 29918, 29896, 29889, 333, 6822, 29873, 8144, 29918, 7076, 29914, 29929, 29929, 29929, 29929, 29929, 29929, 29929, 29929, 742, 9066, 29922, 1311, 29889, 13662, 29918, 29896, 29897, 13, 4706, 4390, 29918, 1272, 353, 2933, 29889, 657, 29918, 3126, 580, 13, 4706, 1583, 29889, 9294, 5709, 29898, 5327, 29892, 29871, 29946, 29900, 29946, 29897, 13, 4706, 1583, 29889, 9294, 9843, 29898, 3126, 29918, 1272, 3366, 4906, 12436, 376, 29873, 8144, 2944, 947, 451, 1863, 1159, 13, 268, 13, 418, 13, 1678, 822, 1243, 29918, 311, 1026, 291, 29918, 974, 29918, 29873, 8144, 29918, 667, 29918, 1333, 29918, 11600, 29918, 1609, 29918, 1792, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 6987, 7374, 291, 310, 10481, 2944, 451, 2825, 491, 1404, 13, 4706, 9995, 13, 13, 4706, 10481, 29918, 667, 29918, 29896, 353, 7561, 29877, 2001, 29898, 3051, 543, 1688, 2793, 29871, 29896, 613, 10481, 29918, 333, 29922, 1311, 29889, 29873, 8144, 29918, 29896, 29889, 333, 29897, 29871, 13, 4706, 10481, 29918, 667, 29918, 29896, 29889, 7620, 580, 13, 13, 4706, 10481, 29918, 667, 29918, 29906, 353, 7561, 29877, 2001, 29898, 3051, 543, 1688, 2793, 29871, 29906, 613, 10481, 29918, 333, 29922, 1311, 29889, 29873, 8144, 29918, 29906, 29889, 333, 29897, 29871, 13, 4706, 10481, 29918, 667, 29918, 29906, 29889, 7620, 580, 13, 13, 4706, 2933, 353, 1583, 29889, 4645, 29889, 8143, 29898, 29888, 29915, 29914, 2754, 29914, 20034, 359, 19248, 1311, 29889, 29873, 8144, 29918, 29906, 29889, 333, 6822, 29873, 8144, 29918, 7076, 19248, 29873, 8144, 29918, 667, 29918, 29906, 29889, 333, 29913, 742, 9066, 29922, 1311, 29889, 13662, 29918, 29896, 29897, 13, 4706, 4390, 29918, 1272, 353, 2933, 29889, 657, 29918, 3126, 580, 13, 4706, 1583, 29889, 9294, 5709, 29898, 5327, 29892, 29871, 29946, 29900, 29896, 29897, 13, 4706, 1583, 29889, 9294, 9843, 29898, 3126, 29918, 1272, 3366, 4906, 12436, 376, 348, 8921, 1891, 1159, 13, 268, 13, 1678, 822, 1243, 29918, 786, 26747, 29918, 974, 29918, 29873, 8144, 29918, 667, 29918, 1333, 29918, 11600, 29918, 1609, 29918, 1792, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 6987, 2767, 310, 10481, 2944, 451, 2825, 491, 1404, 13, 4706, 9995, 13, 13, 4706, 10481, 29918, 667, 29918, 29896, 353, 7561, 29877, 2001, 29898, 3051, 543, 1688, 2793, 29871, 29896, 613, 10481, 29918, 333, 29922, 1311, 29889, 29873, 8144, 29918, 29896, 29889, 333, 29897, 29871, 13, 4706, 10481, 29918, 667, 29918, 29896, 29889, 7620, 580, 13, 13, 4706, 10481, 29918, 667, 29918, 29906, 353, 7561, 29877, 2001, 29898, 3051, 543, 1688, 2793, 29871, 29906, 613, 10481, 29918, 333, 29922, 1311, 29889, 29873, 8144, 29918, 29906, 29889, 333, 29897, 29871, 13, 4706, 10481, 29918, 667, 29918, 29906, 29889, 7620, 580, 13, 13, 4706, 10481, 29918, 667, 29918, 5504, 353, 426, 13, 9651, 376, 8835, 1115, 5852, 13, 4706, 500, 13, 13, 4706, 2933, 353, 1583, 29889, 4645, 29889, 649, 29898, 29888, 29915, 29914, 2754, 29914, 20034, 359, 19248, 1311, 29889, 29873, 8144, 29918, 29906, 29889, 333, 6822, 29873, 8144, 29918, 7076, 19248, 29873, 8144, 29918, 667, 29918, 29906, 29889, 333, 29913, 742, 9066, 29922, 1311, 29889, 13662, 29918, 29896, 29892, 13, 462, 462, 259, 4390, 29922, 29873, 8144, 29918, 667, 29918, 5504, 29897, 13, 4706, 4390, 29918, 1272, 353, 2933, 29889, 657, 29918, 3126, 580, 13, 4706, 1583, 29889, 9294, 5709, 29898, 5327, 29892, 29871, 29946, 29900, 29896, 29897, 13, 4706, 1583, 29889, 9294, 9843, 29898, 3126, 29918, 1272, 3366, 4906, 12436, 376, 348, 8921, 1891, 1159, 13, 13, 1678, 822, 1243, 29918, 5504, 29918, 974, 29918, 29873, 8144, 29918, 667, 29918, 2541, 29918, 5464, 29918, 735, 9696, 29918, 29873, 8144, 29918, 333, 29918, 262, 29918, 2271, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 6987, 2767, 310, 10481, 10481, 2944, 411, 694, 1863, 296, 10481, 29918, 333, 297, 3142, 13, 4706, 9995, 13, 13, 4706, 10481, 29918, 667, 29918, 29896, 353, 7561, 29877, 2001, 29898, 3051, 543, 1688, 2793, 29871, 29896, 613, 10481, 29918, 333, 29922, 1311, 29889, 29873, 8144, 29918, 29896, 29889, 333, 29897, 29871, 13, 4706, 10481, 29918, 667, 29918, 29896, 29889, 7620, 580, 13, 13, 4706, 10481, 29918, 667, 29918, 29906, 353, 7561, 29877, 2001, 29898, 3051, 543, 1688, 2793, 29871, 29906, 613, 10481, 29918, 333, 29922, 1311, 29889, 29873, 8144, 29918, 29906, 29889, 333, 29897, 29871, 13, 4706, 10481, 29918, 667, 29918, 29906, 29889, 7620, 580, 13, 13, 4706, 10481, 29918, 667, 29918, 5504, 353, 426, 13, 9651, 376, 8835, 1115, 5852, 13, 4706, 500, 13, 13, 4706, 2933, 353, 1583, 29889, 4645, 29889, 649, 29898, 29888, 29915, 29914, 2754, 29914, 20034, 359, 29914, 29929, 29929, 29929, 29929, 29929, 29929, 29929, 29929, 29929, 29914, 29873, 8144, 29918, 7076, 19248, 29873, 8144, 29918, 667, 29918, 29896, 29889, 333, 29913, 742, 9066, 29922, 1311, 29889, 13662, 29918, 29896, 29892, 13, 462, 462, 418, 4390, 29922, 29873, 8144, 29918, 667, 29918, 5504, 29897, 13, 4706, 4390, 29918, 1272, 353, 2933, 29889, 657, 29918, 3126, 580, 13, 4706, 1583, 29889, 9294, 5709, 29898, 5327, 29892, 29871, 29946, 29900, 29946, 29897, 13, 4706, 1583, 29889, 9294, 9843, 29898, 3126, 29918, 1272, 3366, 4906, 12436, 376, 29873, 8144, 947, 451, 1863, 1159, 13, 268, 13, 1678, 822, 1243, 29918, 5504, 29918, 974, 29918, 29873, 8144, 29918, 667, 29918, 2541, 29918, 5464, 29918, 735, 9696, 29918, 29873, 8144, 29918, 667, 29918, 333, 29918, 262, 29918, 2271, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 6987, 2767, 310, 10481, 10481, 2944, 411, 694, 1863, 296, 10481, 29918, 667, 29918, 333, 297, 3142, 13, 4706, 9995, 13, 13, 4706, 10481, 29918, 667, 29918, 29896, 353, 7561, 29877, 2001, 29898, 3051, 543, 1688, 2793, 29871, 29896, 613, 10481, 29918, 333, 29922, 1311, 29889, 29873, 8144, 29918, 29896, 29889, 333, 29897, 29871, 13, 4706, 10481, 29918, 667, 29918, 29896, 29889, 7620, 580, 13, 13, 4706, 10481, 29918, 667, 29918, 29906, 353, 7561, 29877, 2001, 29898, 3051, 543, 1688, 2793, 29871, 29906, 613, 10481, 29918, 333, 29922, 1311, 29889, 29873, 8144, 29918, 29906, 29889, 333, 29897, 29871, 13, 4706, 10481, 29918, 667, 29918, 29906, 29889, 7620, 580, 13, 13, 4706, 10481, 29918, 667, 29918, 5504, 353, 426, 13, 9651, 376, 8835, 1115, 5852, 13, 4706, 500, 13, 13, 4706, 2933, 353, 1583, 29889, 4645, 29889, 649, 29898, 29888, 29915, 29914, 2754, 29914, 20034, 359, 19248, 1311, 29889, 29873, 8144, 29918, 29896, 29889, 333, 6822, 29873, 8144, 29918, 7076, 29914, 29929, 29929, 29929, 29929, 29929, 29929, 29929, 29929, 742, 9066, 29922, 1311, 29889, 13662, 29918, 29896, 29892, 13, 462, 462, 418, 4390, 29922, 29873, 8144, 29918, 667, 29918, 5504, 29897, 13, 4706, 4390, 29918, 1272, 353, 2933, 29889, 657, 29918, 3126, 580, 13, 4706, 1583, 29889, 9294, 5709, 29898, 5327, 29892, 29871, 29946, 29900, 29946, 29897, 13, 4706, 1583, 29889, 9294, 9843, 29898, 3126, 29918, 1272, 3366, 4906, 12436, 376, 29873, 8144, 2944, 947, 451, 1863, 1159, 13, 268, 13, 1678, 822, 1243, 29918, 5504, 29918, 974, 29918, 29873, 8144, 29918, 667, 29918, 8698, 3730, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 6987, 2767, 310, 10481, 10481, 2944, 8348, 267, 3730, 13, 4706, 9995, 13, 13, 4706, 10481, 29918, 667, 29918, 29896, 353, 7561, 29877, 2001, 29898, 3051, 543, 1688, 2793, 29871, 29896, 613, 10481, 29918, 333, 29922, 1311, 29889, 29873, 8144, 29918, 29896, 29889, 333, 29897, 29871, 13, 4706, 10481, 29918, 667, 29918, 29896, 29889, 7620, 580, 13, 13, 4706, 10481, 29918, 667, 29918, 29906, 353, 7561, 29877, 2001, 29898, 3051, 543, 1688, 2793, 29871, 29906, 613, 10481, 29918, 333, 29922, 1311, 29889, 29873, 8144, 29918, 29906, 29889, 333, 29897, 29871, 13, 4706, 10481, 29918, 667, 29918, 29906, 29889, 7620, 580, 13, 13, 4706, 10481, 29918, 667, 29918, 5504, 353, 426, 13, 9651, 376, 8835, 1115, 5852, 13, 4706, 500, 13, 13, 4706, 2933, 353, 1583, 29889, 4645, 29889, 649, 29898, 29888, 29915, 29914, 2754, 29914, 20034, 359, 19248, 1311, 29889, 29873, 8144, 29918, 29896, 29889, 333, 6822, 29873, 8144, 29918, 7076, 19248, 29873, 8144, 29918, 667, 29918, 29896, 29889, 333, 29913, 742, 9066, 29922, 1311, 29889, 13662, 29918, 29896, 29892, 13, 462, 462, 418, 4390, 29922, 29873, 8144, 29918, 667, 29918, 5504, 29897, 13, 4706, 4390, 29918, 1272, 353, 2933, 29889, 657, 29918, 3126, 580, 13, 4706, 1583, 29889, 9294, 5709, 29898, 5327, 29892, 29871, 29906, 29900, 29900, 29897, 13, 4706, 1583, 29889, 9294, 9843, 29898, 3126, 29918, 1272, 3366, 4906, 12436, 376, 29873, 8144, 29918, 667, 4784, 1159, 13, 4706, 1583, 29889, 9294, 9843, 29898, 3126, 29918, 1272, 3366, 29873, 8144, 29918, 667, 3108, 3366, 8835, 12436, 10481, 29918, 667, 29918, 5504, 3366, 8835, 20068, 13, 268, 13, 1678, 822, 1243, 29918, 5504, 29918, 974, 29918, 29873, 8144, 29918, 667, 29918, 2541, 29918, 20965, 29918, 1272, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 6987, 2767, 310, 10481, 10481, 2944, 411, 8340, 848, 13, 4706, 9995, 13, 13, 4706, 10481, 29918, 667, 29918, 29896, 353, 7561, 29877, 2001, 29898, 3051, 543, 1688, 2793, 29871, 29896, 613, 10481, 29918, 333, 29922, 1311, 29889, 29873, 8144, 29918, 29896, 29889, 333, 29897, 29871, 13, 4706, 10481, 29918, 667, 29918, 29896, 29889, 7620, 580, 13, 13, 4706, 10481, 29918, 667, 29918, 29906, 353, 7561, 29877, 2001, 29898, 3051, 543, 1688, 2793, 29871, 29906, 613, 10481, 29918, 333, 29922, 1311, 29889, 29873, 8144, 29918, 29906, 29889, 333, 29897, 29871, 13, 4706, 10481, 29918, 667, 29918, 29906, 29889, 7620, 580, 13, 13, 4706, 10481, 29918, 667, 29918, 5504, 353, 426, 13, 9651, 376, 8835, 1115, 376, 3525, 29908, 13, 4706, 500, 13, 13, 4706, 2933, 353, 1583, 29889, 4645, 29889, 649, 29898, 29888, 29915, 29914, 2754, 29914, 20034, 359, 19248, 1311, 29889, 29873, 8144, 29918, 29896, 29889, 333, 6822, 29873, 8144, 29918, 7076, 19248, 29873, 8144, 29918, 667, 29918, 29896, 29889, 333, 29913, 742, 9066, 29922, 1311, 29889, 13662, 29918, 29896, 29892, 13, 462, 462, 418, 4390, 29922, 29873, 8144, 29918, 667, 29918, 5504, 29897, 13, 4706, 4390, 29918, 1272, 353, 2933, 29889, 657, 29918, 3126, 580, 13, 4706, 1583, 29889, 9294, 5709, 29898, 5327, 29892, 29871, 29946, 29906, 29906, 29897, 13, 4706, 1583, 29889, 9294, 9843, 29898, 3126, 29918, 1272, 3366, 4906, 12436, 376, 18157, 5229, 1159, 13, 13, 2 ]
tensorflow/contrib/distributions/python/ops/gaussian.py
vmalarcon/tensorflow
21
97402
<gh_stars>10-100 # Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== """The Normal (Gaussian) distribution class. @@Gaussian """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import math from tensorflow.python.framework import ops from tensorflow.python.ops import array_ops from tensorflow.python.ops import constant_op from tensorflow.python.ops import math_ops from tensorflow.python.ops import random_ops class Gaussian(object): """The Normal (Gaussian) distribution with mean mu and stddev sigma. The PDF of this distribution is: f(x) = sqrt(1/(2*pi*sigma^2)) exp(-(x-mu)^2/(2*sigma^2)) """ def __init__(self, mu, sigma): """Construct a new Gaussian distribution with mean mu and stddev sigma. Args: mu: Scalar tensor, the mean of the distribution. sigma: Scalar tensor, the precision of the distribution. Raises: TypeError: if mu and sigma are different dtypes. """ self._mu = ops.convert_to_tensor(mu) self._sigma = ops.convert_to_tensor(sigma) if mu.dtype != sigma.dtype: raise TypeError("Expected same dtype for mu, sigma but got: %s vs. %s" % (mu.dtype, sigma.dtype)) @property def dtype(self): return self._mu.dtype @property def shape(self): return constant_op.constant([]) # Scalar @property def mu(self): return self._mu @property def sigma(self): return self._sigma def log_pdf(self, x): """Log likelihood of observations in x under Gaussian with mu and sigma. Args: x: 1-D, a vector of observations. Returns: log_lik: 1-D, a vector of log likelihoods of `x` under the model. """ return (-0.5*math.log(2 * math.pi) - math_ops.log(self._sigma) -0.5*math_ops.square((x - self._mu) / self._sigma)) def cdf(self, x): """CDF of observations in x under Gaussian with mu and sigma. Args: x: 1-D, a vector of observations. Returns: cdf: 1-D, a vector of CDFs of `x` under the model. """ return (0.5 + 0.5*math_ops.erf( 1.0/(math.sqrt(2.0) * self._sigma)*(x - self._mu))) def log_cdf(self, x): """Log of the CDF of observations x under Gaussian with mu and sigma.""" return math_ops.log(self.cdf(x)) def pdf(self, x): """The PDF for observations x. Args: x: 1-D, a vector of observations. Returns: pdf: 1-D, a vector of pdf values of `x` under the model. """ return math_ops.exp(self.log_pdf(x)) def sample(self, n, seed=None): """Sample `n` observations from this Distribution. Args: n: Scalar int `Tensor`, the number of observations to sample. seed: Python integer, the random seed. Returns: samples: A vector of samples with shape `[n]`. """ return random_ops.random_normal( shape=array_ops.expand_dims(n, 0), mean=self._mu, stddev=self._sigma, dtype=self._mu.dtype, seed=seed)
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29900, 29899, 29896, 29900, 29900, 13, 29937, 14187, 1266, 29871, 29906, 29900, 29896, 29953, 5087, 9266, 29889, 2178, 26863, 2538, 9841, 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, 29937, 1275, 9166, 9166, 9166, 9166, 4936, 2751, 13, 15945, 29908, 1576, 21981, 313, 29954, 17019, 29897, 4978, 770, 29889, 13, 13, 25380, 29954, 17019, 13, 15945, 29908, 13, 13, 3166, 4770, 29888, 9130, 1649, 1053, 8380, 29918, 5215, 13, 3166, 4770, 29888, 9130, 1649, 1053, 8542, 13, 3166, 4770, 29888, 9130, 1649, 1053, 1596, 29918, 2220, 13, 13, 5215, 5844, 13, 13, 3166, 26110, 29889, 4691, 29889, 4468, 1053, 288, 567, 13, 3166, 26110, 29889, 4691, 29889, 3554, 1053, 1409, 29918, 3554, 13, 3166, 26110, 29889, 4691, 29889, 3554, 1053, 4868, 29918, 459, 13, 3166, 26110, 29889, 4691, 29889, 3554, 1053, 5844, 29918, 3554, 13, 3166, 26110, 29889, 4691, 29889, 3554, 1053, 4036, 29918, 3554, 13, 13, 13, 1990, 22477, 29898, 3318, 1125, 13, 29871, 9995, 1576, 21981, 313, 29954, 17019, 29897, 4978, 411, 2099, 3887, 322, 3659, 3359, 269, 2934, 29889, 13, 13, 29871, 450, 11328, 310, 445, 4978, 338, 29901, 13, 1678, 285, 29898, 29916, 29897, 353, 18074, 2273, 29898, 29896, 14571, 29906, 29930, 1631, 29930, 3754, 29985, 29906, 876, 1518, 6278, 29898, 29916, 29899, 2589, 4887, 29906, 14571, 29906, 29930, 3754, 29985, 29906, 876, 13, 29871, 9995, 13, 13, 29871, 822, 4770, 2344, 12035, 1311, 29892, 3887, 29892, 269, 2934, 1125, 13, 1678, 9995, 1168, 4984, 263, 716, 22477, 4978, 411, 2099, 3887, 322, 3659, 3359, 269, 2934, 29889, 13, 13, 1678, 826, 3174, 29901, 13, 418, 3887, 29901, 317, 1052, 279, 12489, 29892, 278, 2099, 310, 278, 4978, 29889, 13, 418, 269, 2934, 29901, 317, 1052, 279, 12489, 29892, 278, 16716, 310, 278, 4978, 29889, 13, 13, 1678, 390, 1759, 267, 29901, 13, 418, 20948, 29901, 565, 3887, 322, 269, 2934, 526, 1422, 270, 8768, 29889, 13, 1678, 9995, 13, 1678, 1583, 3032, 2589, 353, 288, 567, 29889, 13441, 29918, 517, 29918, 20158, 29898, 2589, 29897, 13, 1678, 1583, 3032, 3754, 353, 288, 567, 29889, 13441, 29918, 517, 29918, 20158, 29898, 3754, 29897, 13, 1678, 565, 3887, 29889, 29881, 1853, 2804, 269, 2934, 29889, 29881, 1853, 29901, 13, 418, 12020, 20948, 703, 1252, 6021, 1021, 26688, 363, 3887, 29892, 269, 2934, 541, 2355, 29901, 1273, 29879, 7186, 29889, 1273, 29879, 29908, 13, 462, 418, 1273, 313, 2589, 29889, 29881, 1853, 29892, 269, 2934, 29889, 29881, 1853, 876, 13, 13, 29871, 732, 6799, 13, 29871, 822, 26688, 29898, 1311, 1125, 13, 1678, 736, 1583, 3032, 2589, 29889, 29881, 1853, 13, 13, 29871, 732, 6799, 13, 29871, 822, 8267, 29898, 1311, 1125, 13, 1678, 736, 4868, 29918, 459, 29889, 23362, 4197, 2314, 29871, 396, 317, 1052, 279, 13, 13, 29871, 732, 6799, 13, 29871, 822, 3887, 29898, 1311, 1125, 13, 1678, 736, 1583, 3032, 2589, 13, 13, 29871, 732, 6799, 13, 29871, 822, 269, 2934, 29898, 1311, 1125, 13, 1678, 736, 1583, 3032, 3754, 13, 13, 29871, 822, 1480, 29918, 5140, 29898, 1311, 29892, 921, 1125, 13, 1678, 9995, 3403, 4188, 22342, 310, 13917, 297, 921, 1090, 22477, 411, 3887, 322, 269, 2934, 29889, 13, 13, 1678, 826, 3174, 29901, 13, 418, 921, 29901, 29871, 29896, 29899, 29928, 29892, 263, 4608, 310, 13917, 29889, 13, 13, 1678, 16969, 29901, 13, 418, 1480, 29918, 5081, 29901, 29871, 29896, 29899, 29928, 29892, 263, 4608, 310, 1480, 4188, 22342, 29879, 310, 421, 29916, 29952, 1090, 278, 1904, 29889, 13, 1678, 9995, 13, 1678, 736, 8521, 29900, 29889, 29945, 29930, 755, 29889, 1188, 29898, 29906, 334, 5844, 29889, 1631, 29897, 448, 5844, 29918, 3554, 29889, 1188, 29898, 1311, 3032, 3754, 29897, 13, 9651, 448, 29900, 29889, 29945, 29930, 755, 29918, 3554, 29889, 17619, 3552, 29916, 448, 1583, 3032, 2589, 29897, 847, 1583, 3032, 3754, 876, 13, 13, 29871, 822, 274, 2176, 29898, 1311, 29892, 921, 1125, 13, 1678, 9995, 29907, 4037, 310, 13917, 297, 921, 1090, 22477, 411, 3887, 322, 269, 2934, 29889, 13, 13, 1678, 826, 3174, 29901, 13, 418, 921, 29901, 29871, 29896, 29899, 29928, 29892, 263, 4608, 310, 13917, 29889, 13, 13, 1678, 16969, 29901, 13, 418, 274, 2176, 29901, 29871, 29896, 29899, 29928, 29892, 263, 4608, 310, 315, 4037, 29879, 310, 421, 29916, 29952, 1090, 278, 1904, 29889, 13, 1678, 9995, 13, 1678, 736, 313, 29900, 29889, 29945, 718, 29871, 29900, 29889, 29945, 29930, 755, 29918, 3554, 29889, 261, 29888, 29898, 13, 308, 29896, 29889, 29900, 14571, 755, 29889, 3676, 29898, 29906, 29889, 29900, 29897, 334, 1583, 3032, 3754, 11877, 29898, 29916, 448, 1583, 3032, 2589, 4961, 13, 13, 29871, 822, 1480, 29918, 29883, 2176, 29898, 1311, 29892, 921, 1125, 13, 1678, 9995, 3403, 310, 278, 315, 4037, 310, 13917, 921, 1090, 22477, 411, 3887, 322, 269, 2934, 1213, 15945, 13, 1678, 736, 5844, 29918, 3554, 29889, 1188, 29898, 1311, 29889, 29883, 2176, 29898, 29916, 876, 13, 13, 29871, 822, 13552, 29898, 1311, 29892, 921, 1125, 13, 1678, 9995, 1576, 11328, 363, 13917, 921, 29889, 13, 13, 1678, 826, 3174, 29901, 13, 418, 921, 29901, 29871, 29896, 29899, 29928, 29892, 263, 4608, 310, 13917, 29889, 13, 13, 1678, 16969, 29901, 13, 418, 13552, 29901, 29871, 29896, 29899, 29928, 29892, 263, 4608, 310, 13552, 1819, 310, 421, 29916, 29952, 1090, 278, 1904, 29889, 13, 1678, 9995, 13, 1678, 736, 5844, 29918, 3554, 29889, 4548, 29898, 1311, 29889, 1188, 29918, 5140, 29898, 29916, 876, 13, 13, 29871, 822, 4559, 29898, 1311, 29892, 302, 29892, 16717, 29922, 8516, 1125, 13, 1678, 9995, 17708, 421, 29876, 29952, 13917, 515, 445, 17740, 29889, 13, 13, 1678, 826, 3174, 29901, 13, 418, 302, 29901, 317, 1052, 279, 938, 421, 29911, 6073, 1673, 278, 1353, 310, 13917, 304, 4559, 29889, 13, 418, 16717, 29901, 5132, 6043, 29892, 278, 4036, 16717, 29889, 13, 13, 1678, 16969, 29901, 13, 418, 11916, 29901, 319, 4608, 310, 11916, 411, 8267, 10338, 29876, 27865, 13, 1678, 9995, 13, 1678, 736, 4036, 29918, 3554, 29889, 8172, 29918, 8945, 29898, 13, 4706, 8267, 29922, 2378, 29918, 3554, 29889, 18837, 29918, 6229, 29879, 29898, 29876, 29892, 29871, 29900, 511, 2099, 29922, 1311, 3032, 2589, 29892, 13, 4706, 3659, 3359, 29922, 1311, 3032, 3754, 29892, 26688, 29922, 1311, 3032, 2589, 29889, 29881, 1853, 29892, 16717, 29922, 26776, 29897, 13, 2 ]
rllib/algorithms/mpc/mppi_shooting.py
shenao-zhang/DCPU
0
96489
"""MPC Algorithms.""" import torch from torch.distributions import MultivariateNormal from rllib.util.parameter_decay import Constant, ParameterDecay from .abstract_solver import MPCSolver class MPPIShooting(MPCSolver): """Solve MPC using Model Predictive Path Integral control. References ---------- <NAME>., <NAME>., <NAME>., <NAME>., & <NAME>. (2016). Aggressive driving with model predictive path integral control. ICRA. <NAME>., <NAME>., & <NAME>. (2015). Model predictive path integral control using covariance variable importance sampling. arXiv. <NAME>., <NAME>., <NAME>., & <NAME>. (2019). Deep Dynamics Models for Learning Dexterous Manipulation. arXiv. """ def __init__(self, kappa=1.0, filter_coefficients=(0.25, 0.8, 0), *args, **kwargs): super().__init__(*args, **kwargs) if not isinstance(kappa, ParameterDecay): kappa = Constant(kappa) self.kappa = kappa self.filter_coefficients = torch.tensor(filter_coefficients) self.filter_coefficients /= torch.sum(self.filter_coefficients) def get_candidate_action_sequence(self): """Get candidate actions by sampling from a multivariate normal.""" noise_dist = MultivariateNormal(torch.zeros_like(self.mean), self.covariance) noise = noise_dist.sample((self.num_samples,)) lag = len(self.filter_coefficients) for i in range(self.horizon): weights = self.filter_coefficients[: min(i + 1, lag)] aux = torch.einsum( "i, ki...j-> k...j", weights.flip(0), noise[:, max(0, i - lag + 1) : i + 1, ..., :], ) noise[:, i, ..., :] = aux / torch.sum(weights) action_sequence = self.mean.unsqueeze(0).repeat_interleave(self.num_samples, 0) action_sequence += noise action_sequence = action_sequence.permute( tuple(torch.arange(1, action_sequence.dim() - 1)) + (0, -1) ) if self.clamp: return action_sequence.clamp(-1.0, 1.0) return action_sequence def get_best_action(self, action_sequence, returns): """Get best action by a weighted average of e^kappa returns.""" returns = self.kappa() * returns weights = torch.exp(returns - torch.max(returns)) normalization = weights.sum() weights = weights.unsqueeze(0).unsqueeze(-1) weights = weights.repeat_interleave(self.horizon, 0).repeat_interleave( self.dim_action, -1 ) return (weights * action_sequence).sum(dim=-2) / normalization def update_sequence_generation(self, elite_actions): """Update distribution by the fitting the elite_actions to the mean.""" self.mean = elite_actions self.kappa.update()
[ 1, 9995, 3580, 29907, 11545, 12404, 1213, 15945, 13, 5215, 4842, 305, 13, 3166, 4842, 305, 29889, 27691, 29879, 1053, 9683, 27432, 403, 19077, 13, 13, 3166, 364, 29880, 1982, 29889, 4422, 29889, 15501, 29918, 7099, 388, 1053, 28601, 29892, 24953, 6185, 388, 13, 13, 3166, 869, 16595, 29918, 2929, 369, 1053, 341, 9026, 13296, 369, 13, 13, 13, 1990, 16379, 2227, 29903, 1251, 11427, 29898, 3580, 9295, 324, 369, 1125, 13, 1678, 9995, 13296, 345, 341, 9026, 773, 8125, 21099, 919, 573, 10802, 17100, 284, 2761, 29889, 13, 13, 1678, 28318, 13, 1678, 448, 1378, 29899, 13, 1678, 529, 5813, 29958, 1696, 529, 5813, 29958, 1696, 529, 5813, 29958, 1696, 529, 5813, 29958, 1696, 669, 529, 5813, 15513, 313, 29906, 29900, 29896, 29953, 467, 13, 1678, 4059, 3663, 573, 19500, 411, 1904, 8500, 573, 2224, 10160, 2761, 29889, 18340, 4717, 29889, 13, 13, 1678, 529, 5813, 29958, 1696, 529, 5813, 29958, 1696, 669, 529, 5813, 15513, 313, 29906, 29900, 29896, 29945, 467, 13, 1678, 8125, 8500, 573, 2224, 10160, 2761, 773, 18838, 279, 8837, 2286, 13500, 13, 1678, 23460, 29889, 564, 29990, 440, 29889, 13, 13, 1678, 529, 5813, 29958, 1696, 529, 5813, 29958, 1696, 529, 5813, 29958, 1696, 669, 529, 5813, 15513, 313, 29906, 29900, 29896, 29929, 467, 13, 1678, 21784, 22554, 1199, 3382, 1379, 363, 29257, 360, 735, 357, 681, 2315, 666, 2785, 29889, 564, 29990, 440, 29889, 13, 13, 1678, 9995, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 413, 8055, 29922, 29896, 29889, 29900, 29892, 4175, 29918, 1111, 8462, 29879, 7607, 29900, 29889, 29906, 29945, 29892, 29871, 29900, 29889, 29947, 29892, 29871, 29900, 511, 334, 5085, 29892, 3579, 19290, 1125, 13, 4706, 2428, 2141, 1649, 2344, 1649, 10456, 5085, 29892, 3579, 19290, 29897, 13, 13, 4706, 565, 451, 338, 8758, 29898, 9876, 29892, 24953, 6185, 388, 1125, 13, 9651, 413, 8055, 353, 28601, 29898, 9876, 29897, 13, 4706, 1583, 29889, 9876, 353, 413, 8055, 13, 4706, 1583, 29889, 4572, 29918, 1111, 8462, 29879, 353, 4842, 305, 29889, 20158, 29898, 4572, 29918, 1111, 8462, 29879, 29897, 13, 4706, 1583, 29889, 4572, 29918, 1111, 8462, 29879, 847, 29922, 4842, 305, 29889, 2083, 29898, 1311, 29889, 4572, 29918, 1111, 8462, 29879, 29897, 13, 13, 1678, 822, 679, 29918, 29883, 5380, 403, 29918, 2467, 29918, 16506, 29898, 1311, 1125, 13, 4706, 9995, 2577, 14020, 8820, 491, 23460, 515, 263, 1773, 27432, 403, 4226, 1213, 15945, 13, 4706, 11462, 29918, 5721, 353, 9683, 27432, 403, 19077, 29898, 7345, 305, 29889, 3298, 359, 29918, 4561, 29898, 1311, 29889, 12676, 511, 1583, 29889, 24542, 279, 8837, 29897, 13, 4706, 11462, 353, 11462, 29918, 5721, 29889, 11249, 3552, 1311, 29889, 1949, 29918, 27736, 29892, 876, 13, 13, 4706, 11755, 353, 7431, 29898, 1311, 29889, 4572, 29918, 1111, 8462, 29879, 29897, 13, 4706, 363, 474, 297, 3464, 29898, 1311, 29889, 2015, 18162, 1125, 13, 9651, 18177, 353, 1583, 29889, 4572, 29918, 1111, 8462, 29879, 7503, 1375, 29898, 29875, 718, 29871, 29896, 29892, 11755, 4638, 13, 9651, 3479, 353, 4842, 305, 29889, 29872, 1144, 398, 29898, 13, 18884, 376, 29875, 29892, 8506, 856, 29926, 976, 413, 856, 29926, 613, 13, 18884, 18177, 29889, 29888, 3466, 29898, 29900, 511, 13, 18884, 11462, 7503, 29892, 4236, 29898, 29900, 29892, 474, 448, 11755, 718, 29871, 29896, 29897, 584, 474, 718, 29871, 29896, 29892, 2023, 29892, 584, 1402, 13, 9651, 1723, 13, 9651, 11462, 7503, 29892, 474, 29892, 2023, 29892, 584, 29962, 353, 3479, 847, 4842, 305, 29889, 2083, 29898, 705, 5861, 29897, 13, 13, 4706, 3158, 29918, 16506, 353, 1583, 29889, 12676, 29889, 6948, 802, 29872, 911, 29898, 29900, 467, 14358, 29918, 1639, 280, 1351, 29898, 1311, 29889, 1949, 29918, 27736, 29892, 29871, 29900, 29897, 13, 4706, 3158, 29918, 16506, 4619, 11462, 13, 4706, 3158, 29918, 16506, 353, 3158, 29918, 16506, 29889, 17858, 1082, 29898, 13, 9651, 18761, 29898, 7345, 305, 29889, 279, 927, 29898, 29896, 29892, 3158, 29918, 16506, 29889, 6229, 580, 448, 29871, 29896, 876, 718, 313, 29900, 29892, 448, 29896, 29897, 13, 4706, 1723, 13, 4706, 565, 1583, 29889, 695, 1160, 29901, 13, 9651, 736, 3158, 29918, 16506, 29889, 695, 1160, 6278, 29896, 29889, 29900, 29892, 29871, 29896, 29889, 29900, 29897, 13, 4706, 736, 3158, 29918, 16506, 13, 13, 1678, 822, 679, 29918, 13318, 29918, 2467, 29898, 1311, 29892, 3158, 29918, 16506, 29892, 3639, 1125, 13, 4706, 9995, 2577, 1900, 3158, 491, 263, 7688, 287, 6588, 310, 321, 29985, 9876, 3639, 1213, 15945, 13, 4706, 3639, 353, 1583, 29889, 9876, 580, 334, 3639, 13, 4706, 18177, 353, 4842, 305, 29889, 4548, 29898, 18280, 448, 4842, 305, 29889, 3317, 29898, 18280, 876, 13, 4706, 4226, 2133, 353, 18177, 29889, 2083, 580, 13, 13, 4706, 18177, 353, 18177, 29889, 6948, 802, 29872, 911, 29898, 29900, 467, 6948, 802, 29872, 911, 6278, 29896, 29897, 13, 4706, 18177, 353, 18177, 29889, 14358, 29918, 1639, 280, 1351, 29898, 1311, 29889, 2015, 18162, 29892, 29871, 29900, 467, 14358, 29918, 1639, 280, 1351, 29898, 13, 9651, 1583, 29889, 6229, 29918, 2467, 29892, 448, 29896, 13, 4706, 1723, 13, 4706, 736, 313, 705, 5861, 334, 3158, 29918, 16506, 467, 2083, 29898, 6229, 10457, 29906, 29897, 847, 4226, 2133, 13, 13, 1678, 822, 2767, 29918, 16506, 29918, 4738, 362, 29898, 1311, 29892, 560, 568, 29918, 7387, 1125, 13, 4706, 9995, 6422, 4978, 491, 278, 28221, 278, 560, 568, 29918, 7387, 304, 278, 2099, 1213, 15945, 13, 4706, 1583, 29889, 12676, 353, 560, 568, 29918, 7387, 13, 4706, 1583, 29889, 9876, 29889, 5504, 580, 13, 2 ]
Young_Massive_Stars/Code_v32_bar/plots/Plot_Surfaces.py
lhquirogan/Galactic_Maser_Simulator
0
87217
# -*- coding: utf-8 -*- ''' Arecibo: Sources that satisfy Arecibo limits= 76 (Observations) Index factor of the observed flux density function -0.471161157475 (Observation) ################################################################################ MMB: Sources that satisfy MMB limits= 927 (Observations) Index factor of the observed flux density function -0.581896115547 (Observation) ''' #------------------------------------------------------------------------ #Path %cd "/Users/luishenryquiroganunez/Documents/Leiden_University/3_Semester/MSc_thesis/Codes/Code_v31/surface_bestnalpha/Matrix_ind_num_nbar8_sigma4" #Importing Libraries import csv import numpy from pylab import * import matplotlib.pyplot as plt import matplotlib.patches as patches import astropy from astropy.io import ascii import matplotlib.lines as mlines from math import * import scipy from scipy import interpolate from scipy import ndimage import os #------------------------------------------------------------------------ #Reading the cube names_txt_files=[] num_files=(len([name for name in os.listdir('.') if os.path.isfile(name)]))-1 for i in range(num_files): names_txt_files.append('Calc_Num_Ind_'+str(i)+'.txt') #Creating cubes data_dummy=numpy.loadtxt(names_txt_files[0]) size=data_dummy.shape cube_MMB_num=numpy.zeros([int(numpy.sqrt(size[0])),int(numpy.sqrt(size[0])),len(names_txt_files)]) cube_MMB_ind=numpy.zeros([int(numpy.sqrt(size[0])),int(numpy.sqrt(size[0])),len(names_txt_files)]) cube_MMB_chi2=numpy.zeros([int(numpy.sqrt(size[0])),int(numpy.sqrt(size[0])),len(names_txt_files)]) cube_MMB_KLD=numpy.zeros([int(numpy.sqrt(size[0])),int(numpy.sqrt(size[0])),len(names_txt_files)]) cube_Arecibo_num=numpy.zeros([int(numpy.sqrt(size[0])),int(numpy.sqrt(size[0])),len(names_txt_files)]) cube_Arecibo_ind=numpy.zeros([int(numpy.sqrt(size[0])),int(numpy.sqrt(size[0])),len(names_txt_files)]) cube_Arecibo_chi2=numpy.zeros([int(numpy.sqrt(size[0])),int(numpy.sqrt(size[0])),len(names_txt_files)]) cube_Arecibo_KLD=numpy.zeros([int(numpy.sqrt(size[0])),int(numpy.sqrt(size[0])),len(names_txt_files)]) #Constants of the observations num_MMB_obs=908#837#927 ind_MMB_obs=-0.599716013349 #-0.657976860525#-0.581896115547 num_Arecibo_obs=76 ind_Arecibo_obs=-0.471161157475 #------------------------------------------------------------------------ #Getting the data for i in range(len(names_txt_files)): data=numpy.loadtxt(names_txt_files[i]) #Sorting the data num_0=data[:,0] ind_0=data[:,1] MMB_num=abs(data[:,2]-num_MMB_obs) MMB_ind=abs(abs(data[:,3])-abs(ind_MMB_obs)) MMB_chi2=data[:,4] MMB_KLD=data[:,5] Arecibo_num=abs(data[:,6]-num_Arecibo_obs) Arecibo_ind=abs(abs(data[:,7])-abs(ind_Arecibo_obs)) Arecibo_chi2=data[:,8] Arecibo_KLD=data[:,9] data_dims=(int(numpy.sqrt(size[0])),int(numpy.sqrt(size[0]))) num = np.asarray(num_0).reshape(data_dims) ind = np.asarray(ind_0).reshape(data_dims) MMB_n = np.asarray(MMB_num).reshape(data_dims) MMB_i= np.asarray(MMB_ind).reshape(data_dims) MMB_chi = np.asarray(MMB_chi2).reshape(data_dims) MMB_KLD2 = np.asarray(MMB_KLD).reshape(data_dims) Arecibo_n= np.asarray(Arecibo_num).reshape(data_dims) Arecibo_i= np.asarray(Arecibo_ind).reshape(data_dims) Arecibo_chi = np.asarray(Arecibo_chi2).reshape(data_dims) Arecibo_KLD2 = np.asarray(Arecibo_KLD).reshape(data_dims) cube_MMB_num[:,:,i]=MMB_n cube_MMB_ind[:,:,i]=MMB_i cube_MMB_chi2[:,:,i]=MMB_chi cube_MMB_KLD[:,:,i]=MMB_KLD2 cube_Arecibo_num[:,:,i]=Arecibo_n cube_Arecibo_ind[:,:,i]=Arecibo_i cube_Arecibo_chi2[:,:,i]=Arecibo_chi cube_Arecibo_KLD[:,:,i]=Arecibo_KLD2 #------------------------------------------------------------------------ #Colapsing the cubes final_MMB_num=numpy.mean(cube_MMB_num,axis=2) final_MMB_ind=numpy.mean(cube_MMB_ind,axis=2) final_MMB_chi2=numpy.mean(cube_MMB_chi2,axis=2) final_MMB_KLD=numpy.mean(cube_MMB_KLD,axis=2) final_Arecibo_num=numpy.mean(cube_Arecibo_num,axis=2) final_Arecibo_ind=numpy.mean(cube_Arecibo_ind,axis=2) final_Arecibo_chi2=numpy.mean(cube_Arecibo_chi2,axis=2) final_Arecibo_KLD=numpy.mean(cube_Arecibo_KLD,axis=2) ############################################################################################################ #PLOTSSSS! ############################################################################################################ # One Surface Plot #h = plt.contourf(num[:,0],ind[0,:],MMB_n) h=imshow(final_MMB_num, interpolation='none', origin='bottom', extent=[numpy.min(num[:,0]), numpy.max(num[:,0]), numpy.min(ind[0,:]), np.max(ind[0,:])],aspect='auto') plt.colorbar(h, orientation='vertical') plt.xlabel("Initial Number of Sources") plt.ylabel("Initial Index value") plt.show() #------------------------------------------------------------------------ # Four Surface Plot fig, ((ax1, ax2), (ax3, ax4)) = plt.subplots(2, 2, sharex='col', sharey='row') a=ax1.imshow(final_MMB_num, interpolation='none', origin='bottom', extent=[numpy.min(num[:,0]), numpy.max(num[:,0]), numpy.min(ind[0,:]), np.max(ind[0,:])],aspect='auto') #ax1.colorbar(a, orientation='vertical') ax1.set_title('MMB Survey') b=ax2.imshow(final_Arecibo_num, interpolation='none', origin='bottom', extent=[numpy.min(num[:,0]), numpy.max(num[:,0]), numpy.min(ind[0,:]), np.max(ind[0,:])],aspect='auto') ax2.set_title('Arecibo Survey') c=ax3.imshow(final_MMB_ind, interpolation='none', origin='bottom', extent=[numpy.min(num[:,0]), numpy.max(num[:,0]), numpy.min(ind[0,:]), np.max(ind[0,:])],aspect='auto') d=ax4.imshow(final_Arecibo_ind, interpolation='none', origin='bottom', extent=[numpy.min(num[:,0]), numpy.max(num[:,0]), numpy.min(ind[0,:]), np.max(ind[0,:])],aspect='auto') fig.subplots_adjust(right=0.8) cbar_ax_a = fig.add_axes([0.85, 0.53, 0.05, 0.37])#[left, bottom, width, height] fig.colorbar(a, cax=cbar_ax_a) cbar_ax_b = fig.add_axes([0.85, 0.1, 0.05, 0.37])#[left, bottom, width, height] fig.colorbar(b, cax=cbar_ax_b) plt.show() #------------------------------------------------------------------------ # Only MMB Surface Plot #With KLD matplotlib.rcParams.update({'font.size': 17}) fig, ax1 = plt.subplots(1, 1) a=ax1.imshow(final_MMB_KLD, interpolation='none', origin='bottom', extent=[numpy.min(num[:,0]), numpy.max(num[:,0]), numpy.min(ind[0,:]), np.max(ind[0,:])],aspect='auto') #ax1.colorbar(a, orientation='vertical') ax1.set_title('Initial Conditions $N_i$ and $\\alpha$ compared MMB Survey') ax1.set_ylabel('Initial Index Value $(\\alpha)$') ax1.set_xlabel('Initial Number of Sources $(N_i)$') fig.subplots_adjust(right=0.8) cbar_ax_a = fig.add_axes([0.85, 0.1, 0.05, 0.8])#[left, bottom, width, height] fig.colorbar(a, cax=cbar_ax_a) plt.ylabel("$KL$ Differentation") fig.set_label('Initial Index Value') plt.show() #With chi 2 matplotlib.rcParams.update({'font.size': 17}) fig, ax1 = plt.subplots(1, 1) a=ax1.imshow(numpy.log(final_MMB_chi2), interpolation='none', origin='bottom', extent=[numpy.min(num[:,0]), numpy.max(num[:,0]), numpy.min(ind[0,:]), np.max(ind[0,:])],aspect='auto') #ax1.colorbar(a, orientation='vertical') ax1.set_title('Initial Conditions $N_i$ and $\\alpha$ compared MMB Survey') ax1.set_ylabel('Initial Index Value $(\\alpha)$') ax1.set_xlabel('Initial Number of Sources $(N_i)$') fig.subplots_adjust(right=0.8) cbar_ax_a = fig.add_axes([0.85, 0.1, 0.05, 0.8])#[left, bottom, width, height] fig.colorbar(a, cax=cbar_ax_a) plt.ylabel("log($\\chi^2$)") fig.set_label('Initial Index Value') plt.show() #pyplot.savefig("Surface.png",bbox_inches='tight') #With Num and Ind matplotlib.rcParams.update({'font.size': 17}) fig, (ax1,ax2) = plt.subplots(2, 1, sharex='col') a=ax1.imshow(MMB_n, interpolation='none', origin='bottom', extent=[numpy.min(num[:,0]), numpy.max(num[:,0]), numpy.min(ind[0,:]), np.max(ind[0,:])],aspect='auto') #ax1.colorbar(a, orientation='vertical') ax1.set_title('Initial Conditions $N_i$ and $\\alpha$ compared MMB Survey') ax1.set_ylabel('Initial Index Value $(\\alpha)$') b=ax2.imshow(MMB_i, interpolation='none', origin='bottom', extent=[numpy.min(num[:,0]), numpy.max(num[:,0]), numpy.min(ind[0,:]), np.max(ind[0,:])],aspect='auto') ax2.set_xlabel('Initial Number of Sources $(N_i)$') ax2.set_ylabel('Initial Index Value $(\\alpha)$') fig.subplots_adjust(right=0.8) cbar_ax_a = fig.add_axes([0.85, 0.53, 0.05, 0.37])#[left, bottom, width, height] fig.colorbar(a, cax=cbar_ax_a) plt.ylabel("|$N-N_{obs}$|") cbar_ax_b = fig.add_axes([0.85, 0.1, 0.05, 0.37])#[left, bottom, width, height] fig.colorbar(b, cax=cbar_ax_b) plt.ylabel("|$ \\beta-\\beta_{obs}$|") fig.set_label('Initial Index Value') plt.show() #------------------------------------------------------------------------ # Only Arecibo Surface Plot from matplotlib.colors import LogNorm matplotlib.rcParams.update({'font.size': 17}) fig, (ax1,ax2) = plt.subplots(2, 1, sharex='col') a=ax1.imshow(Arecibo_n, interpolation='none', origin='bottom', extent=[numpy.min(num[:,0]), numpy.max(num[:,0]), numpy.min(ind[0,:]), np.max(ind[0,:])],aspect='auto',norm=LogNorm(vmin=1, vmax=100)) #ax1.colorbar(a, orientation='vertical') ax1.set_title('Initial Conditions $N_i$ and $\\alpha$ compared Arecibo Survey') ax1.set_ylabel('Initial Index Value $(\\alpha)$') b=ax2.imshow(Arecibo_i, interpolation='none', origin='bottom', extent=[numpy.min(num[:,0]), numpy.max(num[:,0]), numpy.min(ind[0,:]), np.max(ind[0,:])],aspect='auto',norm=LogNorm(vmin=0.1, vmax=1)) ax2.set_xlabel('Initial Number of Sources $(N_i)$') ax2.set_ylabel('Initial Index Value $(\\alpha)$') fig.subplots_adjust(right=0.8) cbar_ax_a = fig.add_axes([0.85, 0.53, 0.05, 0.37])#[left, bottom, width, height] fig.colorbar(a, cax=cbar_ax_a) plt.ylabel("|$N-N_{obs}$|") cbar_ax_b = fig.add_axes([0.85, 0.1, 0.05, 0.37])#[left, bottom, width, height] fig.colorbar(b, cax=cbar_ax_b) plt.ylabel("|$ \\beta-\\beta_{obs}$|") fig.set_label('Initial Index Value') plt.show() #pyplot.savefig("Surface_Arecibo.png",bbox_inches='tight') #------------------------------------------------------------------------ #Calculting the minimum between two plots of the MMB #Constants of the observations num_MMB_obs=908 ind_MMB_obs=-0.599716013349 #Getting the data data=numpy.loadtxt('Calc_Num_Ind_0.txt') #Sorting the data num_0=data[:,0] ind_0=data[:,1] MMB_num=abs(data[:,2]-num_MMB_obs)/num_MMB_obs MMB_ind=abs(data[:,3]-ind_MMB_obs)/abs(ind_MMB_obs) #data_dims=(5,5) MMB_n = np.asarray(MMB_num).reshape(data_dims) MMB_i= np.asarray(MMB_ind).reshape(data_dims) Total=numpy.log10(((MMB_n+MMB_i)/2.0)) Total=Total*(-1) Total=Total/(numpy.max(Total)) num = np.asarray(num_0).reshape(data_dims) ind = np.asarray(ind_0).reshape(data_dims) img_gaus = ndimage.filters.gaussian_filter(Total, 2, mode='nearest') num_masers=numpy.linspace(numpy.min(num[:,0]),numpy.max(num[:,0]),100) ind_masers=numpy.linspace(numpy.min(ind[0,:]),numpy.max(ind[0,:]),100) X,Y=numpy.meshgrid(num_masers,ind_masers) #Plot matplotlib.rcParams.update({'font.size': 17}) #fig, ax = plt.subplots() imshow(Total, interpolation='none', origin='bottom', extent=[numpy.min(num[:,0]), numpy.max(num[:,0]), numpy.min(ind[0,:]), np.max(ind[0,:])],aspect='auto') #imshow(img_gaus, interpolation='none', origin='bottom', extent=[numpy.min(num[:,0]), numpy.max(num[:,0]), numpy.min(ind[0,:]), np.max(ind[0,:])],aspect='auto') #CS = plt.contour(x, y, Total,colors='k') #heatmap = ax.pcolor(Total) cbar=plt.colorbar() levels_=[0.2,0.3,0.4,0.5,0.6] levels_range=[0.4] levels_center=[0.4] cs=plt.contour(X, Y, img_gaus,50, colors='k',levels=levels_) plt.clabel(cs, inline=1, fontsize=10) plt.xlabel('Initial Number of Sources $(N_i)$') plt.ylabel('Initial Index Value $(\\alpha)$') #cbar.ax.setlabel('Arbitrary Units', rotation=270) cbar.set_label('Arbitrary Units') #pyplot.savefig("Surface_both_MMB.png",bbox_inches='tight') #Calcutaing the center and error cs2=plt.contour(X, Y, img_gaus,50, colors='k',levels=levels_) p = cs2.collections[0].get_paths()[0] v = p.vertices x = v[:,0] y = v[:,1] cs3=plt.contour(X, Y, img_gaus,50, colors='k',levels=levels_center) p = cs2.collections[0].get_paths()[0] v = p.vertices x_center = v[:,0] y_center = v[:,1] def fitEllipse(x,y): x = x[:,np.newaxis] y = y[:,np.newaxis] D = np.hstack((x*x, x*y, y*y, x, y, np.ones_like(x))) S = np.dot(D.T,D) C = np.zeros([6,6]) C[0,2] = C[2,0] = 2; C[1,1] = -1 E, V = eig(np.dot(inv(S), C)) n = np.argmax(np.abs(E)) a = V[:,n] return a def ellipse_center(a): b,c,d,f,g,a = a[1]/2, a[2], a[3]/2, a[4]/2, a[5], a[0] num = b*b-a*c x0=(c*d-b*f)/num y0=(a*f-b*d)/num return np.array([x0,y0]) aa=fitEllipse(x_center,y_center) center=ellipse_center(aa) #array([ 1540.99789764, -1.56126529]) error_Num=numpy.max([abs(numpy.max(x)-center[0]),abs(numpy.min(x)-center[0])]) error_Ind=numpy.max(abs(numpy.max(y)-center[1]),abs(numpy.min(y)-center[1])) #(172.83114895668996, 0.22829395805862451) #------------------------------------------------------------------------ #Calculting the minimum of the MMB (ESAT ES!) img_gaus = ndimage.filters.gaussian_filter(numpy.log(final_MMB_chi2), 2, mode='nearest') num_masers=numpy.linspace(numpy.min(num[:,0]),numpy.max(num[:,0]),100) ind_masers=numpy.linspace(numpy.min(ind[0,:]),numpy.max(ind[0,:]),100) X,Y=numpy.meshgrid(num_masers,ind_masers) #Plot matplotlib.rcParams.update({'font.size': 27}) fig,ax1= plt.subplots(1, 1,figsize=(12,12)) a=ax1.imshow(numpy.log(final_MMB_chi2), interpolation='nearest', origin='bottom', extent=[numpy.min(num[:,0]), numpy.max(num[:,0]), numpy.min(ind[0,:]), np.max(ind[0,:])],aspect='auto') ax1.set_xticks([1000,1200,1400,1600,1800]) ax1.set_yticks([-1.2,-1.4,-1.6,-1.8,-2.0]) #ax1.set_title('Initial Conditions $N_i$ and $\\alpha$ compared MMB Survey') ax1.set_ylabel('Initial Index Value $(\\alpha)$') ax1.set_xlabel('Initial Number of Sources $(N)$') fig.subplots_adjust(right=0.8) cbar_ax_a = fig.add_axes([0.85, 0.1, 0.05, 0.8])#[left, bottom, width, height] cbar=fig.colorbar(a, cax=cbar_ax_a) levels_=numpy.array([4.65,4.7,4.9,5.4,5.7,6.0,7.2,8.4]) #levels_=numpy.array([4.65, 4.7, 4.8]) cs=ax1.contour(X, Y, img_gaus,hold='on', levels=levels_, colors='k',origin='image') #ax1.clabel(cs, inline=5, fontsize=10) cbar.set_label('log($\\xi^2$)') cbar.set_ticks([5.0,6.0,7.0,8.0]) #pyplot.savefig("../../plots/Surface_both_MMB.pdf",bbox_inches='tight') #levels_center=[4.65] levels_center=[4.9] cs3=plt.contour(X, Y, img_gaus, colors='k',levels=levels_center) p = cs3.collections[0].get_paths()[0] v = p.vertices x_center = v[:,0] y_center = v[:,1] #3D def fitEllipse(x,y): x = x[:,np.newaxis] y = y[:,np.newaxis] D = np.hstack((x*x, x*y, y*y, x, y, np.ones_like(x))) S = np.dot(D.T,D) C = np.zeros([6,6]) C[0,2] = C[2,0] = 2; C[1,1] = -1 E, V = eig(np.dot(inv(S), C)) n = np.argmax(np.abs(E)) a = V[:,n] return a def ellipse_center(a): b,c,d,f,g,a = a[1]/2, a[2], a[3]/2, a[4]/2, a[5], a[0] num = b*b-a*c x0=(c*d-b*f)/num y0=(a*f-b*d)/num return np.array([x0,y0]) aa=fitEllipse(x_center,y_center) center=ellipse_center(aa) #array([ 1298.10797886, -1.43666962]) levels_=numpy.array([4.7]) #Calcutaing the center and error cs2=plt.contour(X, Y, img_gaus, colors='k',levels=levels_) p = cs2.collections[0].get_paths()[0] v = p.vertices x = v[:,0] y = v[:,1] error_Num=numpy.max([abs(numpy.max(x)-center[0]),abs(numpy.min(x)-center[0])]) error_Ind=numpy.max(abs(numpy.max(y)-center[1]),abs(numpy.min(y)-center[1])) #140, 0.33 ############################################################################################### #Calculate beta and N for one same galaxy ############################################################################################### %cd "/Users/luishenryquiroganunez/Documents/Leiden_University/3_Semester/MSc_thesis/Codes/Code_v31/surface_bestnalpha/One_same_galaxy" names_txt_files=os.listdir('.') data=numpy.loadtxt(names_txt_files[1]) N_MMB=np.mean(data[0]) err_N_MMB=np.std(data[0]) alpha_MMB=np.mean(data[1]) err_alpha_MMB=np.std(data[1]) N_Arecibo=np.mean(data[2]) err_N_Arecibo=np.std(data[2]) alpha_Arecibo=np.mean(data[3]) err_alpha_Arecibo=np.std(data[3]) print ('Number of sources detected (N) in MMB (%s +/- %s) and Arecibo (%s +/- %s)' %(N_MMB, err_N_MMB, N_Arecibo, err_N_Arecibo)) print ('Slope Flux Desnisty Function (alpha) in MMB (%s +/- %s) and Arecibo (%s +/- %s)' %(alpha_MMB, err_alpha_MMB, alpha_Arecibo, err_alpha_Arecibo))
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 12008, 13, 29909, 4361, 833, 29901, 13, 29903, 2863, 393, 15523, 319, 4361, 833, 13071, 29922, 29871, 29955, 29953, 313, 6039, 2140, 800, 29897, 13, 3220, 7329, 310, 278, 8900, 19389, 9027, 740, 448, 29900, 29889, 29946, 29955, 29896, 29896, 29953, 29896, 29896, 29945, 29955, 29946, 29955, 29945, 313, 6039, 2140, 362, 29897, 13, 13383, 13383, 13383, 13383, 13383, 13, 7428, 29933, 29901, 13, 29903, 2863, 393, 15523, 341, 9486, 13071, 29922, 29871, 29929, 29906, 29955, 313, 6039, 2140, 800, 29897, 13, 3220, 7329, 310, 278, 8900, 19389, 9027, 740, 448, 29900, 29889, 29945, 29947, 29896, 29947, 29929, 29953, 29896, 29896, 29945, 29945, 29946, 29955, 13, 313, 6039, 2140, 362, 29897, 13, 12008, 13, 29937, 2683, 2683, 2683, 2683, 1378, 13, 29937, 2605, 13, 29995, 2252, 5591, 5959, 29914, 6092, 728, 264, 719, 339, 3350, 6249, 1540, 29920, 29914, 20128, 29914, 3226, 3615, 29918, 11574, 537, 29914, 29941, 29918, 28516, 4156, 29914, 4345, 29883, 29918, 26533, 29914, 29907, 2631, 29914, 3399, 29918, 29894, 29941, 29896, 29914, 7610, 2161, 29918, 13318, 29876, 2312, 29914, 14609, 29918, 513, 29918, 1949, 29918, 29876, 1646, 29947, 29918, 3754, 29946, 29908, 13, 29937, 17518, 292, 365, 4626, 4314, 13, 5215, 11799, 13, 5215, 12655, 13, 3166, 282, 2904, 370, 1053, 334, 13, 5215, 22889, 29889, 2272, 5317, 408, 14770, 13, 5215, 22889, 29889, 5041, 267, 408, 13261, 267, 13, 5215, 8717, 14441, 13, 3166, 8717, 14441, 29889, 601, 1053, 408, 18869, 13, 5215, 22889, 29889, 9012, 408, 286, 9012, 13, 3166, 5844, 1053, 334, 13, 5215, 4560, 2272, 13, 3166, 4560, 2272, 1053, 20064, 403, 13, 3166, 4560, 2272, 1053, 29871, 299, 3027, 13, 5215, 2897, 13, 29937, 2683, 2683, 2683, 2683, 1378, 13, 29937, 6359, 292, 278, 28704, 13, 7039, 29918, 3945, 29918, 5325, 29922, 2636, 13, 1949, 29918, 5325, 7607, 2435, 4197, 978, 363, 1024, 297, 2897, 29889, 1761, 3972, 12839, 1495, 565, 2897, 29889, 2084, 29889, 275, 1445, 29898, 978, 4638, 876, 29899, 29896, 13, 1454, 474, 297, 3464, 29898, 1949, 29918, 5325, 1125, 13, 1678, 2983, 29918, 3945, 29918, 5325, 29889, 4397, 877, 7856, 29883, 29918, 8009, 29918, 2568, 29918, 18717, 710, 29898, 29875, 7240, 4286, 3945, 1495, 13, 29937, 9832, 1218, 13630, 267, 13, 1272, 29918, 29881, 11770, 29922, 23749, 29889, 1359, 3945, 29898, 7039, 29918, 3945, 29918, 5325, 29961, 29900, 2314, 13, 2311, 29922, 1272, 29918, 29881, 11770, 29889, 12181, 13, 29883, 4003, 29918, 7428, 29933, 29918, 1949, 29922, 23749, 29889, 3298, 359, 4197, 524, 29898, 23749, 29889, 3676, 29898, 2311, 29961, 29900, 2314, 511, 524, 29898, 23749, 29889, 3676, 29898, 2311, 29961, 29900, 2314, 511, 2435, 29898, 7039, 29918, 3945, 29918, 5325, 29897, 2314, 13, 29883, 4003, 29918, 7428, 29933, 29918, 513, 29922, 23749, 29889, 3298, 359, 4197, 524, 29898, 23749, 29889, 3676, 29898, 2311, 29961, 29900, 2314, 511, 524, 29898, 23749, 29889, 3676, 29898, 2311, 29961, 29900, 2314, 511, 2435, 29898, 7039, 29918, 3945, 29918, 5325, 29897, 2314, 13, 29883, 4003, 29918, 7428, 29933, 29918, 4161, 29906, 29922, 23749, 29889, 3298, 359, 4197, 524, 29898, 23749, 29889, 3676, 29898, 2311, 29961, 29900, 2314, 511, 524, 29898, 23749, 29889, 3676, 29898, 2311, 29961, 29900, 2314, 511, 2435, 29898, 7039, 29918, 3945, 29918, 5325, 29897, 2314, 13, 29883, 4003, 29918, 7428, 29933, 29918, 29968, 10249, 29922, 23749, 29889, 3298, 359, 4197, 524, 29898, 23749, 29889, 3676, 29898, 2311, 29961, 29900, 2314, 511, 524, 29898, 23749, 29889, 3676, 29898, 2311, 29961, 29900, 2314, 511, 2435, 29898, 7039, 29918, 3945, 29918, 5325, 29897, 2314, 13, 29883, 4003, 29918, 29909, 4361, 833, 29918, 1949, 29922, 23749, 29889, 3298, 359, 4197, 524, 29898, 23749, 29889, 3676, 29898, 2311, 29961, 29900, 2314, 511, 524, 29898, 23749, 29889, 3676, 29898, 2311, 29961, 29900, 2314, 511, 2435, 29898, 7039, 29918, 3945, 29918, 5325, 29897, 2314, 13, 29883, 4003, 29918, 29909, 4361, 833, 29918, 513, 29922, 23749, 29889, 3298, 359, 4197, 524, 29898, 23749, 29889, 3676, 29898, 2311, 29961, 29900, 2314, 511, 524, 29898, 23749, 29889, 3676, 29898, 2311, 29961, 29900, 2314, 511, 2435, 29898, 7039, 29918, 3945, 29918, 5325, 29897, 2314, 13, 29883, 4003, 29918, 29909, 4361, 833, 29918, 4161, 29906, 29922, 23749, 29889, 3298, 359, 4197, 524, 29898, 23749, 29889, 3676, 29898, 2311, 29961, 29900, 2314, 511, 524, 29898, 23749, 29889, 3676, 29898, 2311, 29961, 29900, 2314, 511, 2435, 29898, 7039, 29918, 3945, 29918, 5325, 29897, 2314, 13, 29883, 4003, 29918, 29909, 4361, 833, 29918, 29968, 10249, 29922, 23749, 29889, 3298, 359, 4197, 524, 29898, 23749, 29889, 3676, 29898, 2311, 29961, 29900, 2314, 511, 524, 29898, 23749, 29889, 3676, 29898, 2311, 29961, 29900, 2314, 511, 2435, 29898, 7039, 29918, 3945, 29918, 5325, 29897, 2314, 13, 29937, 26570, 310, 278, 13917, 13, 1949, 29918, 7428, 29933, 29918, 26290, 29922, 29929, 29900, 29947, 29937, 29947, 29941, 29955, 29937, 29929, 29906, 29955, 13, 513, 29918, 7428, 29933, 29918, 26290, 10457, 29900, 29889, 29945, 29929, 29929, 29955, 29896, 29953, 29900, 29896, 29941, 29941, 29946, 29929, 396, 29899, 29900, 29889, 29953, 29945, 29955, 29929, 29955, 29953, 29947, 29953, 29900, 29945, 29906, 29945, 29937, 29899, 29900, 29889, 29945, 29947, 29896, 29947, 29929, 29953, 29896, 29896, 29945, 29945, 29946, 29955, 13, 1949, 29918, 29909, 4361, 833, 29918, 26290, 29922, 29955, 29953, 13, 513, 29918, 29909, 4361, 833, 29918, 26290, 10457, 29900, 29889, 29946, 29955, 29896, 29896, 29953, 29896, 29896, 29945, 29955, 29946, 29955, 29945, 29871, 13, 29937, 2683, 2683, 2683, 2683, 1378, 13, 29937, 2577, 1259, 278, 848, 13, 1454, 474, 297, 3464, 29898, 2435, 29898, 7039, 29918, 3945, 29918, 5325, 22164, 13, 1678, 848, 29922, 23749, 29889, 1359, 3945, 29898, 7039, 29918, 3945, 29918, 5325, 29961, 29875, 2314, 13, 1678, 396, 13685, 292, 278, 848, 13, 1678, 954, 29918, 29900, 29922, 1272, 7503, 29892, 29900, 29962, 13, 1678, 1399, 29918, 29900, 29922, 1272, 7503, 29892, 29896, 29962, 13, 1678, 341, 9486, 29918, 1949, 29922, 6897, 29898, 1272, 7503, 29892, 29906, 29962, 29899, 1949, 29918, 7428, 29933, 29918, 26290, 29897, 13, 1678, 341, 9486, 29918, 513, 29922, 6897, 29898, 6897, 29898, 1272, 7503, 29892, 29941, 2314, 29899, 6897, 29898, 513, 29918, 7428, 29933, 29918, 26290, 876, 13, 1678, 341, 9486, 29918, 4161, 29906, 29922, 1272, 7503, 29892, 29946, 29962, 13, 1678, 341, 9486, 29918, 29968, 10249, 29922, 1272, 7503, 29892, 29945, 29962, 13, 1678, 319, 4361, 833, 29918, 1949, 29922, 6897, 29898, 1272, 7503, 29892, 29953, 29962, 29899, 1949, 29918, 29909, 4361, 833, 29918, 26290, 29897, 13, 1678, 319, 4361, 833, 29918, 513, 29922, 6897, 29898, 6897, 29898, 1272, 7503, 29892, 29955, 2314, 29899, 6897, 29898, 513, 29918, 29909, 4361, 833, 29918, 26290, 876, 13, 1678, 319, 4361, 833, 29918, 4161, 29906, 29922, 1272, 7503, 29892, 29947, 29962, 13, 1678, 319, 4361, 833, 29918, 29968, 10249, 29922, 1272, 7503, 29892, 29929, 29962, 13, 1678, 848, 29918, 6229, 29879, 7607, 524, 29898, 23749, 29889, 3676, 29898, 2311, 29961, 29900, 2314, 511, 524, 29898, 23749, 29889, 3676, 29898, 2311, 29961, 29900, 29962, 4961, 13, 1678, 954, 353, 7442, 29889, 294, 2378, 29898, 1949, 29918, 29900, 467, 690, 14443, 29898, 1272, 29918, 6229, 29879, 29897, 13, 1678, 1399, 353, 7442, 29889, 294, 2378, 29898, 513, 29918, 29900, 467, 690, 14443, 29898, 1272, 29918, 6229, 29879, 29897, 13, 1678, 341, 9486, 29918, 29876, 353, 7442, 29889, 294, 2378, 29898, 7428, 29933, 29918, 1949, 467, 690, 14443, 29898, 1272, 29918, 6229, 29879, 29897, 13, 1678, 341, 9486, 29918, 29875, 29922, 7442, 29889, 294, 2378, 29898, 7428, 29933, 29918, 513, 467, 690, 14443, 29898, 1272, 29918, 6229, 29879, 29897, 13, 1678, 341, 9486, 29918, 4161, 353, 7442, 29889, 294, 2378, 29898, 7428, 29933, 29918, 4161, 29906, 467, 690, 14443, 29898, 1272, 29918, 6229, 29879, 29897, 13, 1678, 341, 9486, 29918, 29968, 10249, 29906, 353, 7442, 29889, 294, 2378, 29898, 7428, 29933, 29918, 29968, 10249, 467, 690, 14443, 29898, 1272, 29918, 6229, 29879, 29897, 13, 1678, 319, 4361, 833, 29918, 29876, 29922, 7442, 29889, 294, 2378, 29898, 29909, 4361, 833, 29918, 1949, 467, 690, 14443, 29898, 1272, 29918, 6229, 29879, 29897, 13, 1678, 319, 4361, 833, 29918, 29875, 29922, 7442, 29889, 294, 2378, 29898, 29909, 4361, 833, 29918, 513, 467, 690, 14443, 29898, 1272, 29918, 6229, 29879, 29897, 13, 1678, 319, 4361, 833, 29918, 4161, 353, 7442, 29889, 294, 2378, 29898, 29909, 4361, 833, 29918, 4161, 29906, 467, 690, 14443, 29898, 1272, 29918, 6229, 29879, 29897, 13, 1678, 319, 4361, 833, 29918, 29968, 10249, 29906, 353, 7442, 29889, 294, 2378, 29898, 29909, 4361, 833, 29918, 29968, 10249, 467, 690, 14443, 29898, 1272, 29918, 6229, 29879, 29897, 268, 13, 1678, 28704, 29918, 7428, 29933, 29918, 1949, 7503, 29892, 29901, 29892, 29875, 13192, 7428, 29933, 29918, 29876, 13, 1678, 28704, 29918, 7428, 29933, 29918, 513, 7503, 29892, 29901, 29892, 29875, 13192, 7428, 29933, 29918, 29875, 13, 1678, 28704, 29918, 7428, 29933, 29918, 4161, 29906, 7503, 29892, 29901, 29892, 29875, 13192, 7428, 29933, 29918, 4161, 13, 1678, 28704, 29918, 7428, 29933, 29918, 29968, 10249, 7503, 29892, 29901, 29892, 29875, 13192, 7428, 29933, 29918, 29968, 10249, 29906, 13, 1678, 28704, 29918, 29909, 4361, 833, 29918, 1949, 7503, 29892, 29901, 29892, 29875, 13192, 29909, 4361, 833, 29918, 29876, 13, 1678, 28704, 29918, 29909, 4361, 833, 29918, 513, 7503, 29892, 29901, 29892, 29875, 13192, 29909, 4361, 833, 29918, 29875, 13, 1678, 28704, 29918, 29909, 4361, 833, 29918, 4161, 29906, 7503, 29892, 29901, 29892, 29875, 13192, 29909, 4361, 833, 29918, 4161, 13, 1678, 28704, 29918, 29909, 4361, 833, 29918, 29968, 10249, 7503, 29892, 29901, 29892, 29875, 13192, 29909, 4361, 833, 29918, 29968, 10249, 29906, 13, 29937, 2683, 2683, 2683, 2683, 1378, 13, 29937, 1625, 2547, 292, 278, 13630, 267, 13, 8394, 29918, 7428, 29933, 29918, 1949, 29922, 23749, 29889, 12676, 29898, 29883, 4003, 29918, 7428, 29933, 29918, 1949, 29892, 8990, 29922, 29906, 29897, 13, 8394, 29918, 7428, 29933, 29918, 513, 29922, 23749, 29889, 12676, 29898, 29883, 4003, 29918, 7428, 29933, 29918, 513, 29892, 8990, 29922, 29906, 29897, 13, 8394, 29918, 7428, 29933, 29918, 4161, 29906, 29922, 23749, 29889, 12676, 29898, 29883, 4003, 29918, 7428, 29933, 29918, 4161, 29906, 29892, 8990, 29922, 29906, 29897, 13, 8394, 29918, 7428, 29933, 29918, 29968, 10249, 29922, 23749, 29889, 12676, 29898, 29883, 4003, 29918, 7428, 29933, 29918, 29968, 10249, 29892, 8990, 29922, 29906, 29897, 13, 8394, 29918, 29909, 4361, 833, 29918, 1949, 29922, 23749, 29889, 12676, 29898, 29883, 4003, 29918, 29909, 4361, 833, 29918, 1949, 29892, 8990, 29922, 29906, 29897, 13, 8394, 29918, 29909, 4361, 833, 29918, 513, 29922, 23749, 29889, 12676, 29898, 29883, 4003, 29918, 29909, 4361, 833, 29918, 513, 29892, 8990, 29922, 29906, 29897, 13, 8394, 29918, 29909, 4361, 833, 29918, 4161, 29906, 29922, 23749, 29889, 12676, 29898, 29883, 4003, 29918, 29909, 4361, 833, 29918, 4161, 29906, 29892, 8990, 29922, 29906, 29897, 13, 8394, 29918, 29909, 4361, 833, 29918, 29968, 10249, 29922, 23749, 29889, 12676, 29898, 29883, 4003, 29918, 29909, 4361, 833, 29918, 29968, 10249, 29892, 8990, 29922, 29906, 29897, 13, 13383, 13383, 13383, 13383, 13383, 13383, 7346, 4136, 13, 29937, 7390, 2891, 1799, 1799, 29991, 13, 13383, 13383, 13383, 13383, 13383, 13383, 7346, 4136, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 29937, 3118, 6298, 2161, 18399, 13, 29937, 29882, 353, 14770, 29889, 1285, 473, 29888, 29898, 1949, 7503, 29892, 29900, 1402, 513, 29961, 29900, 29892, 29901, 1402, 7428, 29933, 29918, 29876, 29897, 13, 29882, 29922, 326, 4294, 29898, 8394, 29918, 7428, 29933, 29918, 1949, 29892, 29694, 2433, 9290, 742, 3978, 2433, 8968, 742, 15834, 11759, 23749, 29889, 1195, 29898, 1949, 7503, 29892, 29900, 11724, 12655, 29889, 3317, 29898, 1949, 7503, 29892, 29900, 11724, 12655, 29889, 1195, 29898, 513, 29961, 29900, 29892, 29901, 11724, 7442, 29889, 3317, 29898, 513, 29961, 29900, 29892, 29901, 2314, 1402, 294, 1103, 2433, 6921, 1495, 13, 572, 29873, 29889, 2780, 1646, 29898, 29882, 29892, 19843, 2433, 18575, 1495, 13, 572, 29873, 29889, 29916, 1643, 703, 15514, 9681, 310, 317, 2863, 1159, 13, 572, 29873, 29889, 29891, 1643, 703, 15514, 11374, 995, 1159, 13, 572, 29873, 29889, 4294, 580, 13, 29937, 2683, 2683, 2683, 2683, 1378, 13, 29937, 12458, 6298, 2161, 18399, 13, 1003, 29892, 5135, 1165, 29896, 29892, 4853, 29906, 511, 313, 1165, 29941, 29892, 4853, 29946, 876, 353, 14770, 29889, 1491, 26762, 29898, 29906, 29892, 29871, 29906, 29892, 6232, 29916, 2433, 1054, 742, 6232, 29891, 2433, 798, 1495, 13, 29874, 29922, 1165, 29896, 29889, 326, 4294, 29898, 8394, 29918, 7428, 29933, 29918, 1949, 29892, 29694, 2433, 9290, 742, 3978, 2433, 8968, 742, 15834, 11759, 23749, 29889, 1195, 29898, 1949, 7503, 29892, 29900, 11724, 12655, 29889, 3317, 29898, 1949, 7503, 29892, 29900, 11724, 12655, 29889, 1195, 29898, 513, 29961, 29900, 29892, 29901, 11724, 7442, 29889, 3317, 29898, 513, 29961, 29900, 29892, 29901, 2314, 1402, 294, 1103, 2433, 6921, 1495, 13, 29937, 1165, 29896, 29889, 2780, 1646, 29898, 29874, 29892, 19843, 2433, 18575, 1495, 13, 1165, 29896, 29889, 842, 29918, 3257, 877, 7428, 29933, 23218, 1495, 13, 29890, 29922, 1165, 29906, 29889, 326, 4294, 29898, 8394, 29918, 29909, 4361, 833, 29918, 1949, 29892, 29694, 2433, 9290, 742, 3978, 2433, 8968, 742, 15834, 11759, 23749, 29889, 1195, 29898, 1949, 7503, 29892, 29900, 11724, 12655, 29889, 3317, 29898, 1949, 7503, 29892, 29900, 11724, 12655, 29889, 1195, 29898, 513, 29961, 29900, 29892, 29901, 11724, 7442, 29889, 3317, 29898, 513, 29961, 29900, 29892, 29901, 2314, 1402, 294, 1103, 2433, 6921, 1495, 13, 1165, 29906, 29889, 842, 29918, 3257, 877, 29909, 4361, 833, 23218, 1495, 13, 29883, 29922, 1165, 29941, 29889, 326, 4294, 29898, 8394, 29918, 7428, 29933, 29918, 513, 29892, 29694, 2433, 9290, 742, 3978, 2433, 8968, 742, 15834, 11759, 23749, 29889, 1195, 29898, 1949, 7503, 29892, 29900, 11724, 12655, 29889, 3317, 29898, 1949, 7503, 29892, 29900, 11724, 12655, 29889, 1195, 29898, 513, 29961, 29900, 29892, 29901, 11724, 7442, 29889, 3317, 29898, 513, 29961, 29900, 29892, 29901, 2314, 1402, 294, 1103, 2433, 6921, 1495, 13, 29881, 29922, 1165, 29946, 29889, 326, 4294, 29898, 8394, 29918, 29909, 4361, 833, 29918, 513, 29892, 29694, 2433, 9290, 742, 3978, 2433, 8968, 742, 15834, 11759, 23749, 29889, 1195, 29898, 1949, 7503, 29892, 29900, 11724, 12655, 29889, 3317, 29898, 1949, 7503, 29892, 29900, 11724, 12655, 29889, 1195, 29898, 513, 29961, 29900, 29892, 29901, 11724, 7442, 29889, 3317, 29898, 513, 29961, 29900, 29892, 29901, 2314, 1402, 294, 1103, 2433, 6921, 1495, 13, 1003, 29889, 1491, 26762, 29918, 328, 5143, 29898, 1266, 29922, 29900, 29889, 29947, 29897, 13, 29883, 1646, 29918, 1165, 29918, 29874, 353, 2537, 29889, 1202, 29918, 1165, 267, 4197, 29900, 29889, 29947, 29945, 29892, 29871, 29900, 29889, 29945, 29941, 29892, 29871, 29900, 29889, 29900, 29945, 29892, 29871, 29900, 29889, 29941, 29955, 2314, 29937, 29961, 1563, 29892, 5970, 29892, 2920, 29892, 3171, 29962, 29871, 13, 1003, 29889, 2780, 1646, 29898, 29874, 29892, 274, 1165, 29922, 29883, 1646, 29918, 1165, 29918, 29874, 29897, 13, 29883, 1646, 29918, 1165, 29918, 29890, 353, 2537, 29889, 1202, 29918, 1165, 267, 4197, 29900, 29889, 29947, 29945, 29892, 29871, 29900, 29889, 29896, 29892, 29871, 29900, 29889, 29900, 29945, 29892, 29871, 29900, 29889, 29941, 29955, 2314, 29937, 29961, 1563, 29892, 5970, 29892, 2920, 29892, 3171, 29962, 29871, 13, 1003, 29889, 2780, 1646, 29898, 29890, 29892, 274, 1165, 29922, 29883, 1646, 29918, 1165, 29918, 29890, 29897, 13, 572, 29873, 29889, 4294, 580, 13, 29937, 2683, 2683, 2683, 2683, 1378, 13, 29937, 9333, 341, 9486, 6298, 2161, 18399, 13, 29937, 3047, 476, 10249, 13, 2922, 17357, 29889, 2214, 9629, 29889, 5504, 3319, 29915, 5657, 29889, 2311, 2396, 29871, 29896, 29955, 1800, 13, 1003, 29892, 4853, 29896, 353, 14770, 29889, 1491, 26762, 29898, 29896, 29892, 29871, 29896, 29897, 13, 29874, 29922, 1165, 29896, 29889, 326, 4294, 29898, 8394, 29918, 7428, 29933, 29918, 29968, 10249, 29892, 29694, 2433, 9290, 742, 3978, 2433, 8968, 742, 15834, 11759, 23749, 29889, 1195, 29898, 1949, 7503, 29892, 29900, 11724, 12655, 29889, 3317, 29898, 1949, 7503, 29892, 29900, 11724, 12655, 29889, 1195, 29898, 513, 29961, 29900, 29892, 29901, 11724, 7442, 29889, 3317, 29898, 513, 29961, 29900, 29892, 29901, 2314, 1402, 294, 1103, 2433, 6921, 1495, 13, 29937, 1165, 29896, 29889, 2780, 1646, 29898, 29874, 29892, 19843, 2433, 18575, 1495, 13, 1165, 29896, 29889, 842, 29918, 3257, 877, 15514, 11790, 2187, 395, 29940, 29918, 29875, 29938, 322, 779, 29905, 2312, 29938, 9401, 341, 9486, 23218, 1495, 13, 1165, 29896, 29889, 842, 29918, 29891, 1643, 877, 15514, 11374, 7865, 12211, 29905, 2312, 1262, 1495, 13, 1165, 29896, 29889, 842, 29918, 29916, 1643, 877, 15514, 9681, 310, 317, 2863, 2427, 29940, 29918, 29875, 1262, 1495, 13, 1003, 29889, 1491, 26762, 29918, 328, 5143, 29898, 1266, 29922, 29900, 29889, 29947, 29897, 13, 29883, 1646, 29918, 1165, 29918, 29874, 353, 2537, 29889, 1202, 29918, 1165, 267, 4197, 29900, 29889, 29947, 29945, 29892, 29871, 29900, 29889, 29896, 29892, 29871, 29900, 29889, 29900, 29945, 29892, 29871, 29900, 29889, 29947, 2314, 29937, 29961, 1563, 29892, 5970, 29892, 2920, 29892, 3171, 29962, 29871, 13, 1003, 29889, 2780, 1646, 29898, 29874, 29892, 274, 1165, 29922, 29883, 1646, 29918, 1165, 29918, 29874, 29897, 13, 572, 29873, 29889, 29891, 1643, 703, 29938, 29968, 29931, 29938, 360, 8349, 9233, 1159, 13, 1003, 29889, 842, 29918, 1643, 877, 15514, 11374, 7865, 1495, 13, 572, 29873, 29889, 4294, 580, 13, 13, 29937, 3047, 18558, 29871, 29906, 13, 2922, 17357, 29889, 2214, 9629, 29889, 5504, 3319, 29915, 5657, 29889, 2311, 2396, 29871, 29896, 29955, 1800, 13, 1003, 29892, 4853, 29896, 353, 14770, 29889, 1491, 26762, 29898, 29896, 29892, 29871, 29896, 29897, 13, 29874, 29922, 1165, 29896, 29889, 326, 4294, 29898, 23749, 29889, 1188, 29898, 8394, 29918, 7428, 29933, 29918, 4161, 29906, 511, 29694, 2433, 9290, 742, 3978, 2433, 8968, 742, 15834, 11759, 23749, 29889, 1195, 29898, 1949, 7503, 29892, 29900, 11724, 12655, 29889, 3317, 29898, 1949, 7503, 29892, 29900, 11724, 12655, 29889, 1195, 29898, 513, 29961, 29900, 29892, 29901, 11724, 7442, 29889, 3317, 29898, 513, 29961, 29900, 29892, 29901, 2314, 1402, 294, 1103, 2433, 6921, 1495, 13, 29937, 1165, 29896, 29889, 2780, 1646, 29898, 29874, 29892, 19843, 2433, 18575, 1495, 13, 1165, 29896, 29889, 842, 29918, 3257, 877, 15514, 11790, 2187, 395, 29940, 29918, 29875, 29938, 322, 779, 29905, 2312, 29938, 9401, 341, 9486, 23218, 1495, 13, 1165, 29896, 29889, 842, 29918, 29891, 1643, 877, 15514, 11374, 7865, 12211, 29905, 2312, 1262, 1495, 13, 1165, 29896, 29889, 842, 29918, 29916, 1643, 877, 15514, 9681, 310, 317, 2863, 2427, 29940, 29918, 29875, 1262, 1495, 13, 1003, 29889, 1491, 26762, 29918, 328, 5143, 29898, 1266, 29922, 29900, 29889, 29947, 29897, 13, 29883, 1646, 29918, 1165, 29918, 29874, 353, 2537, 29889, 1202, 29918, 1165, 267, 4197, 29900, 29889, 29947, 29945, 29892, 29871, 29900, 29889, 29896, 29892, 29871, 29900, 29889, 29900, 29945, 29892, 29871, 29900, 29889, 29947, 2314, 29937, 29961, 1563, 29892, 5970, 29892, 2920, 29892, 3171, 29962, 29871, 13, 1003, 29889, 2780, 1646, 29898, 29874, 29892, 274, 1165, 29922, 29883, 1646, 29918, 1165, 29918, 29874, 29897, 13, 572, 29873, 29889, 29891, 1643, 703, 1188, 1566, 1966, 4161, 29985, 29906, 10931, 1159, 13, 1003, 29889, 842, 29918, 1643, 877, 15514, 11374, 7865, 1495, 13, 572, 29873, 29889, 4294, 580, 13, 29937, 2272, 5317, 29889, 7620, 1003, 703, 18498, 2161, 29889, 2732, 613, 29890, 1884, 29918, 262, 6609, 2433, 29873, 523, 1495, 13, 13, 29937, 3047, 11848, 322, 1894, 13, 2922, 17357, 29889, 2214, 9629, 29889, 5504, 3319, 29915, 5657, 29889, 2311, 2396, 29871, 29896, 29955, 1800, 13, 1003, 29892, 313, 1165, 29896, 29892, 1165, 29906, 29897, 353, 14770, 29889, 1491, 26762, 29898, 29906, 29892, 29871, 29896, 29892, 6232, 29916, 2433, 1054, 1495, 13, 29874, 29922, 1165, 29896, 29889, 326, 4294, 29898, 7428, 29933, 29918, 29876, 29892, 29694, 2433, 9290, 742, 3978, 2433, 8968, 742, 15834, 11759, 23749, 29889, 1195, 29898, 1949, 7503, 29892, 29900, 11724, 12655, 29889, 3317, 29898, 1949, 7503, 29892, 29900, 11724, 12655, 29889, 1195, 29898, 513, 29961, 29900, 29892, 29901, 11724, 7442, 29889, 3317, 29898, 513, 29961, 29900, 29892, 29901, 2314, 1402, 294, 1103, 2433, 6921, 1495, 13, 29937, 1165, 29896, 29889, 2780, 1646, 29898, 29874, 29892, 19843, 2433, 18575, 1495, 13, 1165, 29896, 29889, 842, 29918, 3257, 877, 15514, 11790, 2187, 395, 29940, 29918, 29875, 29938, 322, 779, 29905, 2312, 29938, 9401, 341, 9486, 23218, 1495, 13, 1165, 29896, 29889, 842, 29918, 29891, 1643, 877, 15514, 11374, 7865, 12211, 29905, 2312, 1262, 1495, 13, 29890, 29922, 1165, 29906, 29889, 326, 4294, 29898, 7428, 29933, 29918, 29875, 29892, 29694, 2433, 9290, 742, 3978, 2433, 8968, 742, 15834, 11759, 23749, 29889, 1195, 29898, 1949, 7503, 29892, 29900, 11724, 12655, 29889, 3317, 29898, 1949, 7503, 29892, 29900, 11724, 12655, 29889, 1195, 29898, 513, 29961, 29900, 29892, 29901, 11724, 7442, 29889, 3317, 29898, 513, 29961, 29900, 29892, 29901, 2314, 1402, 294, 1103, 2433, 6921, 1495, 13, 1165, 29906, 29889, 842, 29918, 29916, 1643, 877, 15514, 9681, 310, 317, 2863, 2427, 29940, 29918, 29875, 1262, 1495, 13, 1165, 29906, 29889, 842, 29918, 29891, 1643, 877, 15514, 11374, 7865, 12211, 29905, 2312, 1262, 1495, 13, 1003, 29889, 1491, 26762, 29918, 328, 5143, 29898, 1266, 29922, 29900, 29889, 29947, 29897, 13, 29883, 1646, 29918, 1165, 29918, 29874, 353, 2537, 29889, 1202, 29918, 1165, 267, 4197, 29900, 29889, 29947, 29945, 29892, 29871, 29900, 29889, 29945, 29941, 29892, 29871, 29900, 29889, 29900, 29945, 29892, 29871, 29900, 29889, 29941, 29955, 2314, 29937, 29961, 1563, 29892, 5970, 29892, 2920, 29892, 3171, 29962, 29871, 13, 1003, 29889, 2780, 1646, 29898, 29874, 29892, 274, 1165, 29922, 29883, 1646, 29918, 1165, 29918, 29874, 29897, 13, 572, 29873, 29889, 29891, 1643, 703, 25183, 29940, 29899, 29940, 648, 26290, 1042, 29989, 1159, 13, 29883, 1646, 29918, 1165, 29918, 29890, 353, 2537, 29889, 1202, 29918, 1165, 267, 4197, 29900, 29889, 29947, 29945, 29892, 29871, 29900, 29889, 29896, 29892, 29871, 29900, 29889, 29900, 29945, 29892, 29871, 29900, 29889, 29941, 29955, 2314, 29937, 29961, 1563, 29892, 5970, 29892, 2920, 29892, 3171, 29962, 29871, 13, 1003, 29889, 2780, 1646, 29898, 29890, 29892, 274, 1165, 29922, 29883, 1646, 29918, 1165, 29918, 29890, 29897, 13, 572, 29873, 29889, 29891, 1643, 703, 25183, 2474, 3571, 29899, 1966, 3571, 648, 26290, 1042, 29989, 1159, 13, 1003, 29889, 842, 29918, 1643, 877, 15514, 11374, 7865, 1495, 13, 572, 29873, 29889, 4294, 580, 13, 13, 29937, 2683, 2683, 2683, 2683, 1378, 13, 29937, 9333, 319, 4361, 833, 6298, 2161, 18399, 13, 3166, 22889, 29889, 27703, 1053, 4522, 29940, 555, 13, 2922, 17357, 29889, 2214, 9629, 29889, 5504, 3319, 29915, 5657, 29889, 2311, 2396, 29871, 29896, 29955, 1800, 13, 1003, 29892, 313, 1165, 29896, 29892, 1165, 29906, 29897, 353, 14770, 29889, 1491, 26762, 29898, 29906, 29892, 29871, 29896, 29892, 6232, 29916, 2433, 1054, 1495, 13, 29874, 29922, 1165, 29896, 29889, 326, 4294, 29898, 29909, 4361, 833, 29918, 29876, 29892, 29694, 2433, 9290, 742, 3978, 2433, 8968, 742, 15834, 11759, 23749, 29889, 1195, 29898, 1949, 7503, 29892, 29900, 11724, 12655, 29889, 3317, 29898, 1949, 7503, 29892, 29900, 11724, 12655, 29889, 1195, 29898, 513, 29961, 29900, 29892, 29901, 11724, 7442, 29889, 3317, 29898, 513, 29961, 29900, 29892, 29901, 2314, 1402, 294, 1103, 2433, 6921, 742, 12324, 29922, 3403, 29940, 555, 29898, 29894, 1195, 29922, 29896, 29892, 325, 3317, 29922, 29896, 29900, 29900, 876, 13, 29937, 1165, 29896, 29889, 2780, 1646, 29898, 29874, 29892, 19843, 2433, 18575, 1495, 13, 1165, 29896, 29889, 842, 29918, 3257, 877, 15514, 11790, 2187, 395, 29940, 29918, 29875, 29938, 322, 779, 29905, 2312, 29938, 9401, 319, 4361, 833, 23218, 1495, 13, 1165, 29896, 29889, 842, 29918, 29891, 1643, 877, 15514, 11374, 7865, 12211, 29905, 2312, 1262, 1495, 13, 29890, 29922, 1165, 29906, 29889, 326, 4294, 29898, 29909, 4361, 833, 29918, 29875, 29892, 29694, 2433, 9290, 742, 3978, 2433, 8968, 742, 15834, 11759, 23749, 29889, 1195, 29898, 1949, 7503, 29892, 29900, 11724, 12655, 29889, 3317, 29898, 1949, 7503, 29892, 29900, 11724, 12655, 29889, 1195, 29898, 513, 29961, 29900, 29892, 29901, 11724, 7442, 29889, 3317, 29898, 513, 29961, 29900, 29892, 29901, 2314, 1402, 294, 1103, 2433, 6921, 742, 12324, 29922, 3403, 29940, 555, 29898, 29894, 1195, 29922, 29900, 29889, 29896, 29892, 325, 3317, 29922, 29896, 876, 13, 1165, 29906, 29889, 842, 29918, 29916, 1643, 877, 15514, 9681, 310, 317, 2863, 2427, 29940, 29918, 29875, 1262, 1495, 13, 1165, 29906, 29889, 842, 29918, 29891, 1643, 877, 15514, 11374, 7865, 12211, 29905, 2312, 1262, 1495, 13, 1003, 29889, 1491, 26762, 29918, 328, 5143, 29898, 1266, 29922, 29900, 29889, 29947, 29897, 13, 29883, 1646, 29918, 1165, 29918, 29874, 353, 2537, 29889, 1202, 29918, 1165, 267, 4197, 29900, 29889, 29947, 29945, 29892, 29871, 29900, 29889, 29945, 29941, 29892, 29871, 29900, 29889, 29900, 29945, 29892, 29871, 29900, 29889, 29941, 29955, 2314, 29937, 29961, 1563, 29892, 5970, 29892, 2920, 29892, 3171, 29962, 29871, 13, 1003, 29889, 2780, 1646, 29898, 29874, 29892, 274, 1165, 29922, 29883, 1646, 29918, 1165, 29918, 29874, 29897, 13, 572, 29873, 29889, 29891, 1643, 703, 25183, 29940, 29899, 29940, 648, 26290, 1042, 29989, 1159, 13, 29883, 1646, 29918, 1165, 29918, 29890, 353, 2537, 29889, 1202, 29918, 1165, 267, 4197, 29900, 29889, 29947, 29945, 29892, 29871, 29900, 29889, 29896, 29892, 29871, 29900, 29889, 29900, 29945, 29892, 29871, 29900, 29889, 29941, 29955, 2314, 29937, 29961, 1563, 29892, 5970, 29892, 2920, 29892, 3171, 29962, 29871, 13, 1003, 29889, 2780, 1646, 29898, 29890, 29892, 274, 1165, 29922, 29883, 1646, 29918, 1165, 29918, 29890, 29897, 13, 572, 29873, 29889, 29891, 1643, 703, 25183, 2474, 3571, 29899, 1966, 3571, 648, 26290, 1042, 29989, 1159, 13, 1003, 29889, 842, 29918, 1643, 877, 15514, 11374, 7865, 1495, 13, 572, 29873, 29889, 4294, 580, 13, 29937, 2272, 5317, 29889, 7620, 1003, 703, 18498, 2161, 29918, 29909, 4361, 833, 29889, 2732, 613, 29890, 1884, 29918, 262, 6609, 2433, 29873, 523, 1495, 13, 29937, 2683, 2683, 2683, 2683, 1378, 13, 29937, 7856, 29883, 499, 292, 278, 9212, 1546, 1023, 24580, 310, 278, 341, 9486, 13, 29937, 26570, 310, 278, 13917, 13, 1949, 29918, 7428, 29933, 29918, 26290, 29922, 29929, 29900, 29947, 29871, 13, 513, 29918, 7428, 29933, 29918, 26290, 10457, 29900, 29889, 29945, 29929, 29929, 29955, 29896, 29953, 29900, 29896, 29941, 29941, 29946, 29929, 13, 29937, 2577, 1259, 278, 848, 13, 1272, 29922, 23749, 29889, 1359, 3945, 877, 7856, 29883, 29918, 8009, 29918, 2568, 29918, 29900, 29889, 3945, 1495, 13, 29937, 13685, 292, 278, 848, 13, 1949, 29918, 29900, 29922, 1272, 7503, 29892, 29900, 29962, 13, 513, 29918, 29900, 29922, 1272, 7503, 29892, 29896, 29962, 13, 7428, 29933, 29918, 1949, 29922, 6897, 29898, 1272, 7503, 29892, 29906, 29962, 29899, 1949, 29918, 7428, 29933, 29918, 26290, 6802, 1949, 29918, 7428, 29933, 29918, 26290, 13, 7428, 29933, 29918, 513, 29922, 6897, 29898, 1272, 7503, 29892, 29941, 29962, 29899, 513, 29918, 7428, 29933, 29918, 26290, 6802, 6897, 29898, 513, 29918, 7428, 29933, 29918, 26290, 29897, 13, 29937, 1272, 29918, 6229, 29879, 7607, 29945, 29892, 29945, 29897, 13, 7428, 29933, 29918, 29876, 353, 7442, 29889, 294, 2378, 29898, 7428, 29933, 29918, 1949, 467, 690, 14443, 29898, 1272, 29918, 6229, 29879, 29897, 13, 7428, 29933, 29918, 29875, 29922, 7442, 29889, 294, 2378, 29898, 7428, 29933, 29918, 513, 467, 690, 14443, 29898, 1272, 29918, 6229, 29879, 29897, 13, 11536, 29922, 23749, 29889, 1188, 29896, 29900, 3552, 29898, 7428, 29933, 29918, 29876, 29974, 7428, 29933, 29918, 29875, 6802, 29906, 29889, 29900, 876, 13, 11536, 29922, 11536, 29930, 6278, 29896, 29897, 13, 11536, 29922, 11536, 14571, 23749, 29889, 3317, 29898, 11536, 876, 13, 1949, 353, 7442, 29889, 294, 2378, 29898, 1949, 29918, 29900, 467, 690, 14443, 29898, 1272, 29918, 6229, 29879, 29897, 13, 513, 353, 7442, 29889, 294, 2378, 29898, 513, 29918, 29900, 467, 690, 14443, 29898, 1272, 29918, 6229, 29879, 29897, 13, 2492, 29918, 29887, 1485, 353, 29871, 299, 3027, 29889, 26705, 29889, 29887, 17019, 29918, 4572, 29898, 11536, 29892, 29871, 29906, 29892, 4464, 2433, 28502, 342, 1495, 13, 1949, 29918, 8247, 414, 29922, 23749, 29889, 1915, 3493, 29898, 23749, 29889, 1195, 29898, 1949, 7503, 29892, 29900, 11724, 23749, 29889, 3317, 29898, 1949, 7503, 29892, 29900, 11724, 29896, 29900, 29900, 29897, 13, 513, 29918, 8247, 414, 29922, 23749, 29889, 1915, 3493, 29898, 23749, 29889, 1195, 29898, 513, 29961, 29900, 29892, 29901, 11724, 23749, 29889, 3317, 29898, 513, 29961, 29900, 29892, 29901, 11724, 29896, 29900, 29900, 29897, 13, 29990, 29892, 29979, 29922, 23749, 29889, 4467, 29882, 7720, 29898, 1949, 29918, 8247, 414, 29892, 513, 29918, 8247, 414, 29897, 13, 13, 13, 29937, 20867, 13, 2922, 17357, 29889, 2214, 9629, 29889, 5504, 3319, 29915, 5657, 29889, 2311, 2396, 29871, 29896, 29955, 1800, 13, 29937, 1003, 29892, 4853, 353, 14770, 29889, 1491, 26762, 580, 13, 326, 4294, 29898, 11536, 29892, 29694, 2433, 9290, 742, 3978, 2433, 8968, 742, 15834, 11759, 23749, 29889, 1195, 29898, 1949, 7503, 29892, 29900, 11724, 12655, 29889, 3317, 29898, 1949, 7503, 29892, 29900, 11724, 12655, 29889, 1195, 29898, 513, 29961, 29900, 29892, 29901, 11724, 7442, 29889, 3317, 29898, 513, 29961, 29900, 29892, 29901, 2314, 1402, 294, 1103, 2433, 6921, 1495, 13, 29937, 326, 4294, 29898, 2492, 29918, 29887, 1485, 29892, 29694, 2433, 9290, 742, 3978, 2433, 8968, 742, 15834, 11759, 23749, 29889, 1195, 29898, 1949, 7503, 29892, 29900, 11724, 12655, 29889, 3317, 29898, 1949, 7503, 29892, 29900, 11724, 12655, 29889, 1195, 29898, 513, 29961, 29900, 29892, 29901, 11724, 7442, 29889, 3317, 29898, 513, 29961, 29900, 29892, 29901, 2314, 1402, 294, 1103, 2433, 6921, 1495, 13, 29937, 9295, 353, 14770, 29889, 1285, 473, 29898, 29916, 29892, 343, 29892, 14990, 29892, 27703, 2433, 29895, 1495, 13, 29937, 354, 271, 1958, 353, 4853, 29889, 29886, 2780, 29898, 11536, 29897, 13, 29883, 1646, 29922, 572, 29873, 29889, 2780, 1646, 580, 13, 5563, 29879, 29918, 11759, 29900, 29889, 29906, 29892, 29900, 29889, 29941, 29892, 29900, 29889, 29946, 29892, 29900, 29889, 29945, 29892, 29900, 29889, 29953, 29962, 13, 5563, 29879, 29918, 3881, 11759, 29900, 29889, 29946, 29962, 13, 5563, 29879, 29918, 5064, 11759, 29900, 29889, 29946, 29962, 13, 2395, 29922, 572, 29873, 29889, 1285, 473, 29898, 29990, 29892, 612, 29892, 10153, 29918, 29887, 1485, 29892, 29945, 29900, 29892, 11955, 2433, 29895, 742, 5563, 29879, 29922, 5563, 29879, 19925, 13, 572, 29873, 29889, 695, 1107, 29898, 2395, 29892, 10583, 29922, 29896, 29892, 4079, 2311, 29922, 29896, 29900, 29897, 13, 572, 29873, 29889, 29916, 1643, 877, 15514, 9681, 310, 317, 2863, 2427, 29940, 29918, 29875, 1262, 1495, 13, 572, 29873, 29889, 29891, 1643, 877, 15514, 11374, 7865, 12211, 29905, 2312, 1262, 1495, 13, 29937, 29883, 1646, 29889, 1165, 29889, 842, 1643, 877, 1433, 8844, 653, 28386, 742, 13733, 29922, 29906, 29955, 29900, 29897, 13, 29883, 1646, 29889, 842, 29918, 1643, 877, 1433, 8844, 653, 28386, 1495, 13, 29937, 2272, 5317, 29889, 7620, 1003, 703, 18498, 2161, 29918, 20313, 29918, 7428, 29933, 29889, 2732, 613, 29890, 1884, 29918, 262, 6609, 2433, 29873, 523, 1495, 13, 13, 13, 29937, 7856, 29883, 6637, 292, 278, 4818, 322, 1059, 13, 2395, 29906, 29922, 572, 29873, 29889, 1285, 473, 29898, 29990, 29892, 612, 29892, 10153, 29918, 29887, 1485, 29892, 29945, 29900, 29892, 11955, 2433, 29895, 742, 5563, 29879, 29922, 5563, 29879, 19925, 13, 29886, 353, 5939, 29906, 29889, 29027, 29961, 29900, 1822, 657, 29918, 24772, 580, 29961, 29900, 29962, 13, 29894, 353, 282, 29889, 1765, 1575, 13, 29916, 353, 325, 7503, 29892, 29900, 29962, 13, 29891, 353, 325, 7503, 29892, 29896, 29962, 13, 13, 2395, 29941, 29922, 572, 29873, 29889, 1285, 473, 29898, 29990, 29892, 612, 29892, 10153, 29918, 29887, 1485, 29892, 29945, 29900, 29892, 11955, 2433, 29895, 742, 5563, 29879, 29922, 5563, 29879, 29918, 5064, 29897, 13, 29886, 353, 5939, 29906, 29889, 29027, 29961, 29900, 1822, 657, 29918, 24772, 580, 29961, 29900, 29962, 13, 29894, 353, 282, 29889, 1765, 1575, 13, 29916, 29918, 5064, 353, 325, 7503, 29892, 29900, 29962, 13, 29891, 29918, 5064, 353, 325, 7503, 29892, 29896, 29962, 13, 13, 1753, 6216, 6489, 5843, 29898, 29916, 29892, 29891, 1125, 13, 1678, 921, 353, 921, 7503, 29892, 9302, 29889, 1482, 8990, 29962, 13, 1678, 343, 353, 343, 7503, 29892, 9302, 29889, 1482, 8990, 29962, 13, 1678, 360, 353, 29871, 7442, 29889, 29882, 1429, 3552, 29916, 29930, 29916, 29892, 921, 29930, 29891, 29892, 343, 29930, 29891, 29892, 921, 29892, 343, 29892, 7442, 29889, 2873, 29918, 4561, 29898, 29916, 4961, 13, 1678, 317, 353, 7442, 29889, 6333, 29898, 29928, 29889, 29911, 29892, 29928, 29897, 13, 1678, 315, 353, 7442, 29889, 3298, 359, 4197, 29953, 29892, 29953, 2314, 13, 1678, 315, 29961, 29900, 29892, 29906, 29962, 353, 315, 29961, 29906, 29892, 29900, 29962, 353, 29871, 29906, 29936, 315, 29961, 29896, 29892, 29896, 29962, 353, 448, 29896, 13, 1678, 382, 29892, 478, 353, 29871, 15761, 29898, 9302, 29889, 6333, 29898, 11569, 29898, 29903, 511, 315, 876, 13, 1678, 302, 353, 7442, 29889, 1191, 3317, 29898, 9302, 29889, 6897, 29898, 29923, 876, 13, 1678, 263, 353, 478, 7503, 29892, 29876, 29962, 13, 1678, 736, 263, 13, 1753, 560, 5843, 29918, 5064, 29898, 29874, 1125, 13, 1678, 289, 29892, 29883, 29892, 29881, 29892, 29888, 29892, 29887, 29892, 29874, 353, 263, 29961, 29896, 16261, 29906, 29892, 263, 29961, 29906, 1402, 263, 29961, 29941, 16261, 29906, 29892, 263, 29961, 29946, 16261, 29906, 29892, 263, 29961, 29945, 1402, 263, 29961, 29900, 29962, 13, 1678, 954, 353, 289, 29930, 29890, 29899, 29874, 29930, 29883, 13, 1678, 921, 29900, 7607, 29883, 29930, 29881, 29899, 29890, 29930, 29888, 6802, 1949, 13, 1678, 343, 29900, 7607, 29874, 29930, 29888, 29899, 29890, 29930, 29881, 6802, 1949, 13, 1678, 736, 7442, 29889, 2378, 4197, 29916, 29900, 29892, 29891, 29900, 2314, 13, 7340, 29922, 9202, 6489, 5843, 29898, 29916, 29918, 5064, 29892, 29891, 29918, 5064, 29897, 268, 13, 5064, 29922, 295, 5843, 29918, 5064, 29898, 7340, 29897, 13, 29937, 2378, 4197, 29871, 29896, 29945, 29946, 29900, 29889, 29929, 29929, 29955, 29947, 29929, 29955, 29953, 29946, 29892, 1678, 448, 29896, 29889, 29945, 29953, 29896, 29906, 29953, 29945, 29906, 29929, 2314, 13, 2704, 29918, 8009, 29922, 23749, 29889, 3317, 4197, 6897, 29898, 23749, 29889, 3317, 29898, 29916, 6817, 5064, 29961, 29900, 11724, 6897, 29898, 23749, 29889, 1195, 29898, 29916, 6817, 5064, 29961, 29900, 2314, 2314, 13, 2704, 29918, 2568, 29922, 23749, 29889, 3317, 29898, 6897, 29898, 23749, 29889, 3317, 29898, 29891, 6817, 5064, 29961, 29896, 11724, 6897, 29898, 23749, 29889, 1195, 29898, 29891, 6817, 5064, 29961, 29896, 12622, 13, 29937, 29898, 29896, 29955, 29906, 29889, 29947, 29941, 29896, 29896, 29946, 29947, 29929, 29945, 29953, 29953, 29947, 29929, 29929, 29953, 29892, 29871, 29900, 29889, 29906, 29906, 29947, 29906, 29929, 29941, 29929, 29945, 29947, 29900, 29945, 29947, 29953, 29906, 29946, 29945, 29896, 29897, 13, 13, 13, 13, 29937, 2683, 2683, 2683, 2683, 1378, 13, 29937, 7856, 29883, 499, 292, 278, 9212, 310, 278, 341, 9486, 313, 2890, 1299, 17956, 14366, 13, 2492, 29918, 29887, 1485, 353, 29871, 299, 3027, 29889, 26705, 29889, 29887, 17019, 29918, 4572, 29898, 23749, 29889, 1188, 29898, 8394, 29918, 7428, 29933, 29918, 4161, 29906, 511, 29871, 29906, 29892, 4464, 2433, 28502, 342, 1495, 13, 1949, 29918, 8247, 414, 29922, 23749, 29889, 1915, 3493, 29898, 23749, 29889, 1195, 29898, 1949, 7503, 29892, 29900, 11724, 23749, 29889, 3317, 29898, 1949, 7503, 29892, 29900, 11724, 29896, 29900, 29900, 29897, 13, 513, 29918, 8247, 414, 29922, 23749, 29889, 1915, 3493, 29898, 23749, 29889, 1195, 29898, 513, 29961, 29900, 29892, 29901, 11724, 23749, 29889, 3317, 29898, 513, 29961, 29900, 29892, 29901, 11724, 29896, 29900, 29900, 29897, 13, 29990, 29892, 29979, 29922, 23749, 29889, 4467, 29882, 7720, 29898, 1949, 29918, 8247, 414, 29892, 513, 29918, 8247, 414, 29897, 13, 29937, 20867, 13, 2922, 17357, 29889, 2214, 9629, 29889, 5504, 3319, 29915, 5657, 29889, 2311, 2396, 29871, 29906, 29955, 1800, 13, 1003, 29892, 1165, 29896, 29922, 14770, 29889, 1491, 26762, 29898, 29896, 29892, 29871, 29896, 29892, 1003, 2311, 7607, 29896, 29906, 29892, 29896, 29906, 876, 13, 29874, 29922, 1165, 29896, 29889, 326, 4294, 29898, 23749, 29889, 1188, 29898, 8394, 29918, 7428, 29933, 29918, 4161, 29906, 511, 29694, 2433, 28502, 342, 742, 3978, 2433, 8968, 742, 15834, 11759, 23749, 29889, 1195, 29898, 1949, 7503, 29892, 29900, 11724, 12655, 29889, 3317, 29898, 1949, 7503, 29892, 29900, 11724, 12655, 29889, 1195, 29898, 513, 29961, 29900, 29892, 29901, 11724, 7442, 29889, 3317, 29898, 513, 29961, 29900, 29892, 29901, 2314, 1402, 294, 1103, 2433, 6921, 1495, 13, 1165, 29896, 29889, 842, 29918, 486, 7358, 4197, 29896, 29900, 29900, 29900, 29892, 29896, 29906, 29900, 29900, 29892, 29896, 29946, 29900, 29900, 29892, 29896, 29953, 29900, 29900, 29892, 29896, 29947, 29900, 29900, 2314, 13, 1165, 29896, 29889, 842, 29918, 3637, 7358, 4197, 29899, 29896, 29889, 29906, 6653, 29896, 29889, 29946, 6653, 29896, 29889, 29953, 6653, 29896, 29889, 29947, 6653, 29906, 29889, 29900, 2314, 13, 29937, 1165, 29896, 29889, 842, 29918, 3257, 877, 15514, 11790, 2187, 395, 29940, 29918, 29875, 29938, 322, 779, 29905, 2312, 29938, 9401, 341, 9486, 23218, 1495, 13, 1165, 29896, 29889, 842, 29918, 29891, 1643, 877, 15514, 11374, 7865, 12211, 29905, 2312, 1262, 1495, 13, 1165, 29896, 29889, 842, 29918, 29916, 1643, 877, 15514, 9681, 310, 317, 2863, 2427, 29940, 1262, 1495, 13, 1003, 29889, 1491, 26762, 29918, 328, 5143, 29898, 1266, 29922, 29900, 29889, 29947, 29897, 13, 29883, 1646, 29918, 1165, 29918, 29874, 353, 2537, 29889, 1202, 29918, 1165, 267, 4197, 29900, 29889, 29947, 29945, 29892, 29871, 29900, 29889, 29896, 29892, 29871, 29900, 29889, 29900, 29945, 29892, 29871, 29900, 29889, 29947, 2314, 29937, 29961, 1563, 29892, 5970, 29892, 2920, 29892, 3171, 29962, 29871, 13, 29883, 1646, 29922, 1003, 29889, 2780, 1646, 29898, 29874, 29892, 274, 1165, 29922, 29883, 1646, 29918, 1165, 29918, 29874, 29897, 13, 5563, 29879, 29918, 29922, 23749, 29889, 2378, 4197, 29946, 29889, 29953, 29945, 29892, 29946, 29889, 29955, 29892, 29946, 29889, 29929, 29892, 29945, 29889, 29946, 29892, 29945, 29889, 29955, 29892, 29953, 29889, 29900, 29892, 29955, 29889, 29906, 29892, 29947, 29889, 29946, 2314, 13, 29937, 5563, 29879, 29918, 29922, 23749, 29889, 2378, 4197, 29946, 29889, 29953, 29945, 29892, 29871, 29946, 29889, 29955, 29892, 29871, 29946, 29889, 29947, 2314, 13, 2395, 29922, 1165, 29896, 29889, 1285, 473, 29898, 29990, 29892, 612, 29892, 10153, 29918, 29887, 1485, 29892, 8948, 2433, 265, 742, 11174, 29922, 5563, 29879, 3383, 11955, 2433, 29895, 742, 12574, 2433, 3027, 1495, 13, 29937, 1165, 29896, 29889, 695, 1107, 29898, 2395, 29892, 10583, 29922, 29945, 29892, 4079, 2311, 29922, 29896, 29900, 29897, 13, 29883, 1646, 29889, 842, 29918, 1643, 877, 1188, 1566, 1966, 5389, 29985, 29906, 10931, 1495, 13, 29883, 1646, 29889, 842, 29918, 29873, 7358, 4197, 29945, 29889, 29900, 29892, 29953, 29889, 29900, 29892, 29955, 29889, 29900, 29892, 29947, 29889, 29900, 2314, 13, 29937, 2272, 5317, 29889, 7620, 1003, 703, 21546, 26762, 29914, 18498, 2161, 29918, 20313, 29918, 7428, 29933, 29889, 5140, 613, 29890, 1884, 29918, 262, 6609, 2433, 29873, 523, 1495, 13, 13, 29937, 5563, 29879, 29918, 5064, 11759, 29946, 29889, 29953, 29945, 29962, 13, 5563, 29879, 29918, 5064, 11759, 29946, 29889, 29929, 29962, 13, 2395, 29941, 29922, 572, 29873, 29889, 1285, 473, 29898, 29990, 29892, 612, 29892, 10153, 29918, 29887, 1485, 29892, 11955, 2433, 29895, 742, 5563, 29879, 29922, 5563, 29879, 29918, 5064, 29897, 13, 29886, 353, 5939, 29941, 29889, 29027, 29961, 29900, 1822, 657, 29918, 24772, 580, 29961, 29900, 29962, 13, 29894, 353, 282, 29889, 1765, 1575, 13, 29916, 29918, 5064, 353, 325, 7503, 29892, 29900, 29962, 13, 29891, 29918, 5064, 353, 325, 7503, 29892, 29896, 29962, 13, 13, 29937, 29941, 29928, 13, 13, 13, 1753, 6216, 6489, 5843, 29898, 29916, 29892, 29891, 1125, 13, 1678, 921, 353, 921, 7503, 29892, 9302, 29889, 1482, 8990, 29962, 13, 1678, 343, 353, 343, 7503, 29892, 9302, 29889, 1482, 8990, 29962, 13, 1678, 360, 353, 29871, 7442, 29889, 29882, 1429, 3552, 29916, 29930, 29916, 29892, 921, 29930, 29891, 29892, 343, 29930, 29891, 29892, 921, 29892, 343, 29892, 7442, 29889, 2873, 29918, 4561, 29898, 29916, 4961, 13, 1678, 317, 353, 7442, 29889, 6333, 29898, 29928, 29889, 29911, 29892, 29928, 29897, 13, 1678, 315, 353, 7442, 29889, 3298, 359, 4197, 29953, 29892, 29953, 2314, 13, 1678, 315, 29961, 29900, 29892, 29906, 29962, 353, 315, 29961, 29906, 29892, 29900, 29962, 353, 29871, 29906, 29936, 315, 29961, 29896, 29892, 29896, 29962, 353, 448, 29896, 13, 1678, 382, 29892, 478, 353, 29871, 15761, 29898, 9302, 29889, 6333, 29898, 11569, 29898, 29903, 511, 315, 876, 13, 1678, 302, 353, 7442, 29889, 1191, 3317, 29898, 9302, 29889, 6897, 29898, 29923, 876, 13, 1678, 263, 353, 478, 7503, 29892, 29876, 29962, 13, 1678, 736, 263, 13, 1753, 560, 5843, 29918, 5064, 29898, 29874, 1125, 13, 1678, 289, 29892, 29883, 29892, 29881, 29892, 29888, 29892, 29887, 29892, 29874, 353, 263, 29961, 29896, 16261, 29906, 29892, 263, 29961, 29906, 1402, 263, 29961, 29941, 16261, 29906, 29892, 263, 29961, 29946, 16261, 29906, 29892, 263, 29961, 29945, 1402, 263, 29961, 29900, 29962, 13, 1678, 954, 353, 289, 29930, 29890, 29899, 29874, 29930, 29883, 13, 1678, 921, 29900, 7607, 29883, 29930, 29881, 29899, 29890, 29930, 29888, 6802, 1949, 13, 1678, 343, 29900, 7607, 29874, 29930, 29888, 29899, 29890, 29930, 29881, 6802, 1949, 13, 1678, 736, 7442, 29889, 2378, 4197, 29916, 29900, 29892, 29891, 29900, 2314, 13, 268, 13, 7340, 29922, 9202, 6489, 5843, 29898, 29916, 29918, 5064, 29892, 29891, 29918, 5064, 29897, 268, 13, 5064, 29922, 295, 5843, 29918, 5064, 29898, 7340, 29897, 13, 29937, 2378, 4197, 29871, 29896, 29906, 29929, 29947, 29889, 29896, 29900, 29955, 29929, 29955, 29947, 29947, 29953, 29892, 1678, 448, 29896, 29889, 29946, 29941, 29953, 29953, 29953, 29929, 29953, 29906, 2314, 13, 13, 5563, 29879, 29918, 29922, 23749, 29889, 2378, 4197, 29946, 29889, 29955, 2314, 13, 29937, 7856, 29883, 6637, 292, 278, 4818, 322, 1059, 13, 2395, 29906, 29922, 572, 29873, 29889, 1285, 473, 29898, 29990, 29892, 612, 29892, 10153, 29918, 29887, 1485, 29892, 11955, 2433, 29895, 742, 5563, 29879, 29922, 5563, 29879, 19925, 13, 29886, 353, 5939, 29906, 29889, 29027, 29961, 29900, 1822, 657, 29918, 24772, 580, 29961, 29900, 29962, 13, 29894, 353, 282, 29889, 1765, 1575, 13, 29916, 353, 325, 7503, 29892, 29900, 29962, 13, 29891, 353, 325, 7503, 29892, 29896, 29962, 13, 13, 2704, 29918, 8009, 29922, 23749, 29889, 3317, 4197, 6897, 29898, 23749, 29889, 3317, 29898, 29916, 6817, 5064, 29961, 29900, 11724, 6897, 29898, 23749, 29889, 1195, 29898, 29916, 6817, 5064, 29961, 29900, 2314, 2314, 13, 2704, 29918, 2568, 29922, 23749, 29889, 3317, 29898, 6897, 29898, 23749, 29889, 3317, 29898, 29891, 6817, 5064, 29961, 29896, 11724, 6897, 29898, 23749, 29889, 1195, 29898, 29891, 6817, 5064, 29961, 29896, 12622, 13, 29937, 29896, 29946, 29900, 29892, 29871, 29900, 29889, 29941, 29941, 13, 13, 13383, 13383, 13383, 13383, 13383, 7346, 4136, 2277, 29937, 13, 29937, 27065, 403, 29871, 21762, 322, 405, 363, 697, 1021, 15400, 29891, 13, 13383, 13383, 13383, 13383, 13383, 7346, 4136, 2277, 29937, 13, 29995, 2252, 5591, 5959, 29914, 6092, 728, 264, 719, 339, 3350, 6249, 1540, 29920, 29914, 20128, 29914, 3226, 3615, 29918, 11574, 537, 29914, 29941, 29918, 28516, 4156, 29914, 4345, 29883, 29918, 26533, 29914, 29907, 2631, 29914, 3399, 29918, 29894, 29941, 29896, 29914, 7610, 2161, 29918, 13318, 29876, 2312, 29914, 6716, 29918, 17642, 29918, 23014, 26825, 29908, 13, 7039, 29918, 3945, 29918, 5325, 29922, 359, 29889, 1761, 3972, 12839, 1495, 13, 1272, 29922, 23749, 29889, 1359, 3945, 29898, 7039, 29918, 3945, 29918, 5325, 29961, 29896, 2314, 13, 29940, 29918, 7428, 29933, 29922, 9302, 29889, 12676, 29898, 1272, 29961, 29900, 2314, 13, 3127, 29918, 29940, 29918, 7428, 29933, 29922, 9302, 29889, 4172, 29898, 1272, 29961, 29900, 2314, 13, 2312, 29918, 7428, 29933, 29922, 9302, 29889, 12676, 29898, 1272, 29961, 29896, 2314, 13, 3127, 29918, 2312, 29918, 7428, 29933, 29922, 9302, 29889, 4172, 29898, 1272, 29961, 29896, 2314, 13, 29940, 29918, 29909, 4361, 833, 29922, 9302, 29889, 12676, 29898, 1272, 29961, 29906, 2314, 13, 3127, 29918, 29940, 29918, 29909, 4361, 833, 29922, 9302, 29889, 4172, 29898, 1272, 29961, 29906, 2314, 13, 2312, 29918, 29909, 4361, 833, 29922, 9302, 29889, 12676, 29898, 1272, 29961, 29941, 2314, 13, 3127, 29918, 2312, 29918, 29909, 4361, 833, 29922, 9302, 29889, 4172, 29898, 1272, 29961, 29941, 2314, 13, 2158, 6702, 4557, 310, 8974, 17809, 313, 29940, 29897, 297, 341, 9486, 313, 29995, 29879, 718, 24028, 1273, 29879, 29897, 322, 319, 4361, 833, 313, 29995, 29879, 718, 24028, 1273, 29879, 16029, 1273, 29898, 29940, 29918, 7428, 29933, 29892, 4589, 29918, 29940, 29918, 7428, 29933, 29892, 405, 29918, 29909, 4361, 833, 29892, 4589, 29918, 29940, 29918, 29909, 4361, 833, 876, 13, 2158, 6702, 29903, 417, 412, 2379, 1314, 2726, 29876, 391, 29891, 6680, 313, 2312, 29897, 297, 341, 9486, 313, 29995, 29879, 718, 24028, 1273, 29879, 29897, 322, 319, 4361, 833, 313, 29995, 29879, 718, 24028, 1273, 29879, 16029, 1273, 29898, 2312, 29918, 7428, 29933, 29892, 4589, 29918, 2312, 29918, 7428, 29933, 29892, 15595, 29918, 29909, 4361, 833, 29892, 4589, 29918, 2312, 29918, 29909, 4361, 833, 876, 13, 2 ]
Corona Virus game/gameset.py
karansondh/VirusInvasion2020
0
151199
class Settings: """ All Game Settings """ def __init__(self): self.screen_width = 1000 self.screen_height = 600 self.bg_color = (180, 255, 255) self.ship_speed = 1.25 self.ship_limit = 3 self.bullet_speed = 1 self.bullet_width = 3 self.bullet_height = 15 self.bullet_color = (60, 60, 60) self.bullet_allowed = 4 self.virus_speed = 0.50 self.fleet_drop_speed = 5 self.speed_upscale = 1.20 self.score_upscale = 1.25 self.initialize_dynamic_settings() self.fleet_direction = 1 def initialize_dynamic_settings(self): self.ship_speed = 1.25 self.bullet_speed = 1 self.virus_speed = 0.50 self.fleet_direction = 1 self.virus_points = 50 def increase_speed(self): #self.ship_speed *= self.speed_upscale self.bullet_speed *= self.speed_upscale self.virus_speed *= self.speed_upscale self.virus_points = int(self.virus_points * self.score_upscale)
[ 1, 770, 19215, 29901, 30004, 13, 1678, 9995, 2178, 8448, 19215, 9995, 30004, 13, 30004, 13, 1678, 822, 4770, 2344, 12035, 1311, 1125, 30004, 13, 4706, 1583, 29889, 10525, 29918, 2103, 353, 29871, 29896, 29900, 29900, 29900, 30004, 13, 4706, 1583, 29889, 10525, 29918, 3545, 353, 29871, 29953, 29900, 29900, 30004, 13, 4706, 1583, 29889, 16264, 29918, 2780, 353, 313, 29896, 29947, 29900, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 8443, 13, 4706, 1583, 29889, 3527, 29918, 19322, 353, 29871, 29896, 29889, 29906, 29945, 30004, 13, 4706, 1583, 29889, 3527, 29918, 13400, 353, 29871, 29941, 30004, 13, 4706, 1583, 29889, 18850, 29918, 19322, 353, 29871, 29896, 30004, 13, 4706, 1583, 29889, 18850, 29918, 2103, 353, 29871, 29941, 30004, 13, 4706, 1583, 29889, 18850, 29918, 3545, 353, 29871, 29896, 29945, 30004, 13, 4706, 1583, 29889, 18850, 29918, 2780, 353, 313, 29953, 29900, 29892, 29871, 29953, 29900, 29892, 29871, 29953, 29900, 8443, 13, 4706, 1583, 29889, 18850, 29918, 24622, 353, 29871, 29946, 30004, 13, 4706, 1583, 29889, 2405, 375, 29918, 19322, 353, 29871, 29900, 29889, 29945, 29900, 30004, 13, 4706, 1583, 29889, 29888, 280, 300, 29918, 8865, 29918, 19322, 353, 29871, 29945, 30004, 13, 4706, 1583, 29889, 19322, 29918, 14340, 29883, 744, 353, 29871, 29896, 29889, 29906, 29900, 30004, 13, 4706, 1583, 29889, 13628, 29918, 14340, 29883, 744, 353, 29871, 29896, 29889, 29906, 29945, 30004, 13, 4706, 1583, 29889, 24926, 29918, 16626, 29918, 11027, 26471, 13, 4706, 1583, 29889, 29888, 280, 300, 29918, 20845, 353, 29871, 29896, 30004, 13, 30004, 13, 1678, 822, 11905, 29918, 16626, 29918, 11027, 29898, 1311, 1125, 30004, 13, 4706, 1583, 29889, 3527, 29918, 19322, 353, 29871, 29896, 29889, 29906, 29945, 30004, 13, 4706, 1583, 29889, 18850, 29918, 19322, 353, 29871, 29896, 30004, 13, 4706, 1583, 29889, 2405, 375, 29918, 19322, 353, 29871, 29900, 29889, 29945, 29900, 30004, 13, 4706, 1583, 29889, 29888, 280, 300, 29918, 20845, 353, 29871, 29896, 30004, 13, 4706, 1583, 29889, 2405, 375, 29918, 9748, 353, 29871, 29945, 29900, 30004, 13, 30004, 13, 1678, 822, 7910, 29918, 19322, 29898, 1311, 1125, 30004, 13, 4706, 396, 1311, 29889, 3527, 29918, 19322, 334, 29922, 1583, 29889, 19322, 29918, 14340, 29883, 744, 30004, 13, 4706, 1583, 29889, 18850, 29918, 19322, 334, 29922, 1583, 29889, 19322, 29918, 14340, 29883, 744, 30004, 13, 4706, 1583, 29889, 2405, 375, 29918, 19322, 334, 29922, 1583, 29889, 19322, 29918, 14340, 29883, 744, 30004, 13, 4706, 1583, 29889, 2405, 375, 29918, 9748, 353, 938, 29898, 1311, 29889, 2405, 375, 29918, 9748, 334, 1583, 29889, 13628, 29918, 14340, 29883, 744, 8443, 13, 2 ]
buoi12/bai5.py
Viet7501/viet1
0
82128
file1 = "" file2 = "" with open('Hello.txt') as f: file1 = f.read() with open('Hi.txt') as f: file2 = f.read() file1 += "\n" file1 += file2 with open('file3.txt', 'w') as f: f.write(file1)
[ 1, 934, 29896, 353, 5124, 30004, 13, 1445, 29906, 353, 5124, 30004, 13, 30004, 13, 2541, 1722, 877, 10994, 29889, 3945, 1495, 408, 285, 29901, 30004, 13, 1678, 934, 29896, 353, 285, 29889, 949, 26471, 13, 30004, 13, 2541, 1722, 877, 18567, 29889, 3945, 1495, 408, 285, 29901, 30004, 13, 1678, 934, 29906, 353, 285, 29889, 949, 26471, 13, 30004, 13, 1445, 29896, 4619, 6634, 29876, 19451, 13, 1445, 29896, 4619, 934, 29906, 30004, 13, 30004, 13, 2541, 1722, 877, 1445, 29941, 29889, 3945, 742, 525, 29893, 1495, 408, 285, 29901, 30004, 13, 1678, 285, 29889, 3539, 29898, 1445, 29896, 29897, 2 ]
start_bot_async.py
kaefik/py-tlg-bot-run-command
0
136823
""" Версия телеграмм бота с использованием библиотеки Telethon """ import os # pip3 install python-dotenv from dotenv import load_dotenv # pip3 install Telethon from telethon import TelegramClient, events, connection, Button import asyncio import logging # import re from i_utils import run_cmd from sqlitelib.sqliteutils import User, SettingUser, Role, SettingOne, SettingTwo # ---- Начальные данные ---- # подготовка для логирования работы программы logging.basicConfig(format='[%(levelname) 5s/%(asctime)s] %(name)s: %(message)s', level=logging.WARNING) logging.getLogger('asyncio').setLevel(logging.ERROR) # END подготовка для логирования работы программы # загрузка данных для того чтобы телеграмм бот залогинился в Телеграмм dotenv_path = os.path.join(os.path.dirname(__file__), ".env") # print((dotenv_path)) if os.path.exists(dotenv_path): load_dotenv(dotenv_path) app_api_id = os.getenv("TLG_APP_API_ID") app_api_hash = os.getenv("TLG_APP_API_HASH") app_name = os.getenv("TLG_APP_NAME") bot_token = os.getenv("I_BOT_TOKEN") proxy_server = os.getenv("TLG_PROXY_SERVER") proxy_port = os.getenv("TLG_PROXY_PORT") proxy_key = os.getenv("TLG_PROXY_KEY") # клиент с правами администратора admin_client = int(os.getenv("TLG_ADMIN_ID_CLIENT")) # END загрузка данных для того чтобы телеграмм бот залогинился в Телеграмм # настройки пользователей бота в том числе и администратора admin_client name_file_settings = 'settings.db' if not os.path.exists(name_file_settings): print('нет файла настроек') name_admin = '' settings = SettingUser(namedb=name_file_settings) admin_User = User(id=admin_client, role=Role.admin, active=True) settings.add_user(admin_User) else: print('есть файл настроек') settings = SettingUser(namedb=name_file_settings) # получение всех пользователей из БД # clients = settings.get_all_user() # список всех клиентов admin_client = settings.get_user_type(Role.admin) # список администраторов бота # END настройки бота if proxy_server is None or proxy_port is None or proxy_key is None: print("Нет настроек MTProto прокси сервера телеграмма.\n" \ "Попытка подключения клиента без прокси.") bot = TelegramClient(app_name, app_api_id, app_api_hash).start( bot_token=bot_token ) else: proxy = (proxy_server, int(proxy_port), proxy_key) bot = TelegramClient(app_name, app_api_id, app_api_hash, connection=connection.ConnectionTcpMTProxyRandomizedIntermediate, proxy=proxy).start(bot_token=bot_token) # кнопки главного режима для администратора button_main_admin = [ [Button.text("/help"), Button.text("/admin"), Button.text("/settings")] ] # кнопки главного режима для обычного пользователя button_main_user = [ [Button.text("/help"), Button.text("/admin")] ] # кнопки для режима администратора button_admin = [ [Button.text("/AddUser"), Button.text("/DelUser"), Button.text("/InfoUser"), Button.text("/ExitAdmin")] ] # кнопки для режима настроек пользователя button_settings = [ [Button.text("/SettingOne"), Button.text("/ExitSettings")] ] # выбор типа результирующего файла button_settingone = [ [ Button.text("/SubSettingOne"), Button.text("/ExitTypeResult"), ] ] # ---- END Начальные данные ---- # ----- Вспомогательные функции def get_help(filename='help.txt'): """ получаем текст для помощи о командах бота """ help_text = "" with open(filename, "r") as f: help_text = f.read() return help_text # проверка на разрешенного пользователя def is_allow_user(iduser, allow_users): for user in allow_users: if user.id == iduser: return True return False # добавляем пользователя в БД пользователей которые имеют доступ к боту # возвращает True def add_new_user(id, settings): new_user = User(id=id) settings.add_user(new_user) return True # возвращает список пользователей которые имеют доступ к боту def read_user_db(settings): result = [] clients = settings.get_all_user() for cl in clients: result.append(cl.__str__()) return result async def get_name_user(client, user_id): """ получаем информацию о пользователе телеграмма по его user_id (user_id тип int) """ try: new_name_user = await client.get_entity(user_id) new_name_user = new_name_user.first_name except ValueError as err: print('Ошибка получения информации о пользователе по id: ', err) new_name_user = '' return new_name_user async def check_name_user_empty(client, sender_id, db): """ проверим есть ли у этого пользователя имя пользователя в нашей БД настроек возвращает имя пользователя """ user_name = db.get_user(sender_id) # print(f'Имя пользователя в БД {user_name}') user_name_tlg = await get_name_user(client, sender_id) # print(f'Имя пользователя в Телеграмме {user_name_tlg}') if len(user_name.name) == 0: user_name.name = user_name_tlg db.update_user(user_name) return user_name def allow_user_id(users): result = [] for user in users: result.append(user.id) return set(result) # ----- END Вспомогательные функции # @bot.on(events.CallbackQuery) # async def handler(event): # await event.answer('You clicked {}!'.format(event.data)) # выполнение команды /start @bot.on(events.NewMessage(pattern='/start')) async def start_cmd(event): sender = await event.get_sender() # проверка на право доступа к боту sender_id = sender.id if not is_allow_user(sender_id, settings.get_all_user()): await event.respond(f"Доступ запрещен. Обратитесь к администратору" \ f" чтобы добавил ваш ID в белый список. Ваш ID {sender_id}") return # END проверка на право доступа к боту user_name = await check_name_user_empty(event.client, sender_id, settings) if user_name.role == Role.admin: buttons = button_main_admin else: buttons = button_main_user await event.respond(f"Привет, {user_name.name}! Я рад видеть тебя!\n" \ "Этот бот выполняет ваши команды.", buttons=buttons) raise events.StopPropagation # выполнение команды /about @bot.on(events.NewMessage(chats=allow_user_id(settings.get_all_user()), pattern='/about')) # параметр chats - множество id пользователей которые имеют доступ к методу async def about_cmd(event): print(allow_user_id(settings.get_all_user())) await event.respond("Я выполняю ваши команды.") # выполнение команды /help @bot.on(events.NewMessage(chats=allow_user_id(settings.get_all_user()), pattern='/help')) async def help_cmd(event): sender = await event.get_sender() await event.respond(get_help('help.txt')) # -------------------- команды администрирования пользователей телеграмм бота ---------------------------------- @bot.on(events.NewMessage(chats=allow_user_id(settings.get_all_user()), pattern='/admin')) async def admin_cmd(event): sender = await event.get_sender() await event.respond("Вы вошли в режим администратора", buttons=button_admin) @bot.on(events.NewMessage(chats=allow_user_id(settings.get_all_user()), pattern='/AddUser')) async def add_user_admin(event): # sender = await event.get_sender() await event.respond("Выполняется команда /AddUSer") # диалог с запросом информации нужной для работы команды /AddUser chat_id = event.chat_id async with bot.conversation(chat_id) as conv: # response = conv.wait_event(events.NewMessage(incoming=True)) await conv.send_message("Привет! Введите номер id пользователя" "который нужно добавить для доступа к боту:") id_new_user = await conv.get_response() id_new_user = id_new_user.message # print("id_new_user ", id_new_user) while not all(x.isdigit() for x in id_new_user): await conv.send_message("ID нового пользователя - это число. Попробуйте еще раз.") id_new_user = await conv.get_response() id_new_user = id_new_user.message # print("id_new_user ", id_new_user) new_name_user = await get_name_user(event.client, int(id_new_user)) print('Имя нового пользователя', new_name_user) add_new_user(id_new_user, settings) await conv.send_message(f"Добавили нового пользователя с ID: {id_new_user} с именем {new_name_user}") @bot.on(events.NewMessage(chats=allow_user_id(settings.get_all_user()), pattern='/DelUser')) async def del_user_admin(event): # sender = await event.get_sender() await event.respond("Выполняется команда /DelUSer") # диалог с запросом информации нужной для работы команды /DelUser chat_id = event.chat_id async with bot.conversation(chat_id) as conv: # response = conv.wait_event(events.NewMessage(incoming=True)) await conv.send_message("Привет! Введите номер id пользователя " "который нужно запретить доступ к боту") id_del_user = await conv.get_response() id_del_user = id_del_user.message while not any(x.isdigit() for x in id_del_user): await conv.send_message("ID пользователя - это число. " "Попробуйте еще раз.") id_del_user = await conv.get_response() id_del_user = id_del_user.message # проверяем на то если пользователь админ который захочет удалить себя это не получится if not is_allow_user(int(id_del_user), admin_client): settings.del_user(int(id_del_user)) await conv.send_message(f"Пользователю с ID: {id_del_user} " "доступ к боту запрещен.") else: await conv.send_message("Удаление пользователя с правами администратора запрещено.") @bot.on(events.NewMessage(chats=allow_user_id(settings.get_all_user()), pattern='/InfoUser')) async def info_user_admin(event): ids = read_user_db(settings) ids = [str(x) for x in ids] strs = '\n'.join(ids) await event.respond(f"Пользователи которые имеют доступ:\n{strs}") @bot.on(events.NewMessage(chats=allow_user_id(settings.get_all_user()), pattern='/ExitAdmin')) async def exit_admin_admin(event): sender = await event.get_sender() await event.respond(f"Вы вышли из режима администратора.", buttons=button_main_admin) # -------------------- END команды администрирования пользователей телеграмм бота ---------------------------------- # ---------------------- Команды settings @bot.on(events.NewMessage(chats=allow_user_id(settings.get_all_user()), pattern='/settings')) async def settings_cmd(event): await event.respond("Вы вошли в режим настроек пользователя", buttons=button_settings) @bot.on(events.NewMessage(chats=allow_user_id(settings.get_all_user()), pattern='/ExitSettings')) async def exit_settings_cmd(event): sender = await event.get_sender() sender_id = sender.id user_name = await check_name_user_empty(event.client, sender_id, settings) if user_name.role == Role.admin: buttons = button_main_admin else: buttons = button_main_user await event.respond("Вы вышли из режима настроек пользователя.", buttons=buttons) # ---------------------- END Команды settings # ---------------------- Команды для телеграмм бота которые образуют его основные функции @bot.on(events.NewMessage(chats=allow_user_id(settings.get_all_user()), pattern='ls|dir')) async def run_cmd_one(event): """ пример реализации команды ls Linux """ # выделение параметра команды message_text = event.raw_text.split() # print(message_text) param_cmds = '' if len(message_text) > 1: param_cmds = message_text[1] print(param_cmds) # проверка существования папки if not os.path.exists(param_cmds): await event.respond(f"Папки {param_cmds} не существует.") return # команда которая будет выполняться на сервере cmds = f"ls {param_cmds}" await event.respond(f"Выполняем команду {cmds}") done, _ = await asyncio.wait([run_cmd(cmds)]) # result - результат выполнения команды cmds # error - ошибка, если команда cmds завершилась с ошибкой # code - код работы команды, если 0 , то команда прошла без ошибок result, error, code = done.pop().result() if code != 0: await event.respond(f"!!!! код: {code} \n" f"Внутренняя ошибка: {error}") return result = result.decode("utf-8") str_result = result # result.split("\n") await event.respond(f"Результат: \n {str_result}") # ---------------------- END Команды для телеграмм бота которые образуют его основные функции def main(): bot.run_until_disconnected() if __name__ == '__main__': main()
[ 1, 9995, 13, 12850, 21290, 13947, 2194, 29959, 29959, 3419, 676, 531, 17442, 8751, 5660, 5116, 20390, 717, 9699, 386, 265, 13, 13, 15945, 29908, 13, 5215, 2897, 13, 29937, 8450, 29941, 2601, 3017, 29899, 6333, 6272, 13, 3166, 8329, 6272, 1053, 2254, 29918, 6333, 6272, 13, 29937, 8450, 29941, 2601, 9699, 386, 265, 13, 3166, 4382, 386, 265, 1053, 9699, 1393, 4032, 29892, 4959, 29892, 3957, 29892, 11025, 13, 5215, 408, 948, 3934, 13, 5215, 12183, 13, 29937, 1053, 337, 13, 13, 3166, 474, 29918, 13239, 1053, 1065, 29918, 9006, 13, 3166, 4576, 7454, 747, 29889, 22793, 13239, 1053, 4911, 29892, 21605, 2659, 29892, 1528, 280, 29892, 21605, 6716, 29892, 21605, 13985, 13, 13, 29937, 23250, 2372, 1282, 693, 3029, 11650, 3029, 23250, 13, 13, 29937, 3693, 19300, 642, 3807, 29871, 8089, 4962, 1587, 24534, 20796, 5588, 13, 21027, 29889, 16121, 3991, 29898, 4830, 2433, 29961, 29995, 29898, 5563, 978, 29897, 29871, 29945, 29879, 22584, 29898, 294, 312, 603, 29897, 29879, 29962, 1273, 29898, 978, 29897, 29879, 29901, 1273, 29898, 4906, 29897, 29879, 742, 13, 462, 1678, 3233, 29922, 21027, 29889, 29956, 25614, 29897, 13, 21027, 29889, 657, 16363, 877, 294, 948, 3934, 2824, 842, 10108, 29898, 21027, 29889, 11432, 29897, 13, 29937, 11056, 3693, 19300, 642, 3807, 29871, 8089, 4962, 1587, 24534, 20796, 5588, 13, 13, 29937, 1077, 29969, 1086, 29972, 642, 11650, 2430, 3807, 11453, 18421, 13947, 2194, 29959, 29959, 3419, 29932, 1077, 8089, 507, 4633, 490, 10744, 753, 2194, 29959, 29959, 13, 6333, 6272, 29918, 2084, 353, 2897, 29889, 2084, 29889, 7122, 29898, 359, 29889, 2084, 29889, 25721, 22168, 1445, 1649, 511, 11393, 6272, 1159, 13, 29937, 1596, 3552, 6333, 6272, 29918, 2084, 876, 13, 361, 2897, 29889, 2084, 29889, 9933, 29898, 6333, 6272, 29918, 2084, 1125, 13, 1678, 2254, 29918, 6333, 6272, 29898, 6333, 6272, 29918, 2084, 29897, 13, 932, 29918, 2754, 29918, 333, 353, 2897, 29889, 657, 6272, 703, 14632, 29954, 29918, 20576, 29918, 8787, 29918, 1367, 1159, 13, 932, 29918, 2754, 29918, 8568, 353, 2897, 29889, 657, 6272, 703, 14632, 29954, 29918, 20576, 29918, 8787, 29918, 29950, 24943, 1159, 13, 932, 29918, 978, 353, 2897, 29889, 657, 6272, 703, 14632, 29954, 29918, 20576, 29918, 5813, 1159, 13, 7451, 29918, 6979, 353, 2897, 29889, 657, 6272, 703, 29902, 29918, 29933, 2891, 29918, 4986, 29968, 1430, 1159, 13, 14701, 29918, 2974, 353, 2897, 29889, 657, 6272, 703, 14632, 29954, 29918, 8618, 18454, 29918, 18603, 1159, 13, 14701, 29918, 637, 353, 2897, 29889, 657, 6272, 703, 14632, 29954, 29918, 8618, 18454, 29918, 15082, 1159, 13, 14701, 29918, 1989, 353, 2897, 29889, 657, 6272, 703, 14632, 29954, 29918, 8618, 18454, 29918, 10818, 1159, 13, 29937, 28673, 3648, 531, 23172, 989, 11437, 14437, 9011, 13, 6406, 29918, 4645, 353, 938, 29898, 359, 29889, 657, 6272, 703, 14632, 29954, 29918, 3035, 16173, 29918, 1367, 29918, 27205, 3919, 5783, 13, 29937, 11056, 1077, 29969, 1086, 29972, 642, 11650, 2430, 3807, 11453, 18421, 13947, 2194, 29959, 29959, 3419, 29932, 1077, 8089, 507, 4633, 490, 10744, 753, 2194, 29959, 29959, 13, 13, 29937, 665, 21237, 717, 18636, 9718, 11572, 3419, 676, 490, 13610, 23999, 606, 11437, 14437, 9011, 4113, 29918, 4645, 13, 978, 29918, 1445, 29918, 11027, 353, 525, 11027, 29889, 2585, 29915, 13, 361, 451, 2897, 29889, 2084, 29889, 9933, 29898, 978, 29918, 1445, 29918, 11027, 1125, 13, 1678, 1596, 877, 24050, 6725, 29977, 684, 665, 7966, 3506, 1495, 13, 1678, 1024, 29918, 6406, 353, 6629, 13, 1678, 6055, 353, 21605, 2659, 29898, 17514, 29890, 29922, 978, 29918, 1445, 29918, 11027, 29897, 13, 1678, 4113, 29918, 2659, 353, 4911, 29898, 333, 29922, 6406, 29918, 4645, 29892, 6297, 29922, 16727, 29889, 6406, 29892, 6136, 29922, 5574, 29897, 13, 1678, 6055, 29889, 1202, 29918, 1792, 29898, 6406, 29918, 2659, 29897, 13, 2870, 29901, 13, 1678, 1596, 877, 29919, 2321, 6725, 29977, 29944, 665, 7966, 3506, 1495, 13, 1678, 6055, 353, 21605, 2659, 29898, 17514, 29890, 29922, 978, 29918, 1445, 29918, 11027, 29897, 13, 13, 29937, 6961, 12854, 23103, 18636, 9718, 11572, 1866, 1386, 30032, 13, 29937, 13154, 353, 6055, 29889, 657, 29918, 497, 29918, 1792, 580, 29871, 396, 531, 18021, 23103, 28673, 3648, 516, 13, 6406, 29918, 4645, 353, 6055, 29889, 657, 29918, 1792, 29918, 1853, 29898, 16727, 29889, 6406, 29897, 29871, 396, 531, 18021, 11437, 14437, 2374, 516, 3419, 676, 13, 29937, 11056, 665, 21237, 717, 3419, 676, 13, 13, 13, 361, 10166, 29918, 2974, 338, 6213, 470, 10166, 29918, 637, 338, 6213, 470, 10166, 29918, 1989, 338, 6213, 29901, 13, 1678, 1596, 703, 30029, 1257, 665, 7966, 3506, 341, 29911, 1184, 517, 1471, 11153, 10182, 1521, 494, 13947, 2194, 29959, 1155, 7790, 29876, 29908, 320, 13, 3986, 376, 20093, 8384, 19972, 3693, 8776, 12395, 28673, 656, 676, 10642, 1471, 11153, 23157, 13, 1678, 9225, 353, 9699, 1393, 4032, 29898, 932, 29918, 978, 29892, 623, 29918, 2754, 29918, 333, 29892, 623, 29918, 2754, 29918, 8568, 467, 2962, 29898, 13, 4706, 9225, 29918, 6979, 29922, 7451, 29918, 6979, 13, 1678, 1723, 13, 2870, 29901, 13, 1678, 10166, 353, 313, 14701, 29918, 2974, 29892, 938, 29898, 14701, 29918, 637, 511, 10166, 29918, 1989, 29897, 13, 1678, 9225, 353, 9699, 1393, 4032, 29898, 932, 29918, 978, 29892, 623, 29918, 2754, 29918, 333, 29892, 623, 29918, 2754, 29918, 8568, 29892, 13, 462, 308, 3957, 29922, 9965, 29889, 5350, 29911, 6814, 11490, 14048, 17875, 1891, 4074, 13847, 29892, 13, 462, 308, 10166, 29922, 14701, 467, 2962, 29898, 7451, 29918, 6979, 29922, 7451, 29918, 6979, 29897, 13, 13, 29937, 1186, 570, 29964, 717, 13986, 1868, 16223, 1155, 3807, 11437, 14437, 9011, 13, 3092, 29918, 3396, 29918, 6406, 353, 518, 13, 1678, 518, 3125, 29889, 726, 11974, 8477, 4968, 13, 268, 11025, 29889, 726, 11974, 6406, 4968, 13, 268, 11025, 29889, 726, 11974, 11027, 13531, 13, 29962, 13, 13, 29937, 1186, 570, 29964, 717, 13986, 1868, 16223, 1155, 3807, 27168, 12290, 18636, 9718, 11146, 13, 3092, 29918, 3396, 29918, 1792, 353, 518, 13, 1678, 518, 3125, 29889, 726, 11974, 8477, 4968, 13, 268, 11025, 29889, 726, 11974, 6406, 13531, 13, 29962, 13, 13, 29937, 1186, 570, 29964, 717, 3807, 16223, 1155, 11437, 14437, 9011, 13, 3092, 29918, 6406, 353, 518, 13, 1678, 518, 3125, 29889, 726, 11974, 2528, 2659, 4968, 13, 268, 11025, 29889, 726, 11974, 13157, 2659, 4968, 13, 268, 11025, 29889, 726, 11974, 3401, 2659, 4968, 13, 268, 11025, 29889, 726, 11974, 24365, 12754, 13531, 13, 29962, 13, 13, 29937, 1186, 570, 29964, 717, 3807, 16223, 1155, 665, 7966, 3506, 18636, 9718, 11146, 13, 3092, 29918, 11027, 353, 518, 13, 1678, 518, 3125, 29889, 726, 11974, 29020, 6716, 4968, 13, 268, 11025, 29889, 726, 11974, 24365, 9585, 13531, 13, 29962, 13, 13, 29937, 2771, 7677, 7109, 1843, 12250, 693, 811, 1086, 26920, 6725, 29977, 684, 13, 3092, 29918, 26740, 650, 353, 518, 13, 1678, 518, 13, 4706, 11025, 29889, 726, 11974, 4035, 29020, 6716, 4968, 13, 4706, 11025, 29889, 726, 11974, 24365, 1542, 3591, 4968, 13, 1678, 4514, 13, 29962, 13, 13, 13, 29937, 23250, 11056, 2372, 1282, 693, 3029, 11650, 3029, 23250, 13, 13, 29937, 448, 807, 939, 3565, 1630, 1779, 2584, 3029, 20153, 3540, 13, 13, 1753, 679, 29918, 8477, 29898, 9507, 2433, 8477, 29889, 3945, 29374, 13, 1678, 9995, 13, 4706, 6961, 1282, 3098, 23567, 464, 3807, 14752, 2837, 614, 6863, 27920, 3419, 676, 13, 1678, 9995, 13, 1678, 1371, 29918, 726, 353, 5124, 13, 1678, 411, 1722, 29898, 9507, 29892, 376, 29878, 1159, 408, 285, 29901, 13, 4706, 1371, 29918, 726, 353, 285, 29889, 949, 580, 13, 1678, 736, 1371, 29918, 726, 13, 13, 13, 29937, 10613, 780, 642, 665, 3212, 587, 10084, 1868, 18636, 9718, 11146, 13, 1753, 338, 29918, 9536, 29918, 1792, 29898, 333, 1792, 29892, 2758, 29918, 7193, 1125, 13, 1678, 363, 1404, 297, 2758, 29918, 7193, 29901, 13, 4706, 565, 1404, 29889, 333, 1275, 1178, 1792, 29901, 13, 9651, 736, 5852, 13, 1678, 736, 7700, 13, 13, 13, 29937, 1447, 3102, 7593, 3098, 18636, 9718, 11146, 490, 1386, 30032, 18636, 9718, 11572, 15261, 7557, 4394, 1447, 8412, 1186, 3419, 1500, 13, 29937, 6849, 18524, 4826, 1257, 5852, 29871, 13, 1753, 788, 29918, 1482, 29918, 1792, 29898, 333, 29892, 6055, 1125, 13, 1678, 716, 29918, 1792, 353, 4911, 29898, 333, 29922, 333, 29897, 13, 1678, 6055, 29889, 1202, 29918, 1792, 29898, 1482, 29918, 1792, 29897, 13, 1678, 736, 5852, 13, 13, 13, 29937, 6849, 18524, 4826, 1257, 531, 18021, 18636, 9718, 11572, 15261, 7557, 4394, 1447, 8412, 1186, 3419, 1500, 13, 1753, 1303, 29918, 1792, 29918, 2585, 29898, 11027, 1125, 13, 1678, 1121, 353, 5159, 13, 1678, 13154, 353, 6055, 29889, 657, 29918, 497, 29918, 1792, 580, 13, 1678, 363, 1067, 297, 13154, 29901, 13, 4706, 1121, 29889, 4397, 29898, 695, 17255, 710, 1649, 3101, 13, 1678, 736, 1121, 13, 13, 13, 12674, 822, 679, 29918, 978, 29918, 1792, 29898, 4645, 29892, 1404, 29918, 333, 1125, 13, 1678, 9995, 13, 4706, 6961, 1282, 3098, 25565, 13603, 614, 18636, 9718, 730, 753, 13947, 2194, 29959, 1155, 733, 5686, 1404, 29918, 333, 313, 1792, 29918, 333, 7109, 29964, 938, 29897, 13, 1678, 9995, 13, 1678, 1018, 29901, 13, 4706, 716, 29918, 978, 29918, 1792, 353, 7272, 3132, 29889, 657, 29918, 10041, 29898, 1792, 29918, 333, 29897, 13, 4706, 716, 29918, 978, 29918, 1792, 353, 716, 29918, 978, 29918, 1792, 29889, 4102, 29918, 978, 13, 1678, 5174, 7865, 2392, 408, 4589, 29901, 13, 4706, 1596, 877, 30038, 1911, 23348, 6961, 12395, 25565, 3540, 614, 18636, 9718, 730, 753, 733, 1178, 29901, 13420, 4589, 29897, 13, 4706, 716, 29918, 978, 29918, 1792, 353, 6629, 13, 1678, 736, 716, 29918, 978, 29918, 1792, 13, 13, 13, 12674, 822, 1423, 29918, 978, 29918, 1792, 29918, 6310, 29898, 4645, 29892, 10004, 29918, 333, 29892, 4833, 1125, 13, 1678, 9995, 13, 4706, 23590, 641, 29959, 12795, 3550, 863, 16827, 18636, 9718, 11146, 606, 5010, 18636, 9718, 11146, 490, 665, 14337, 1386, 30032, 665, 7966, 3506, 13, 4706, 6849, 18524, 4826, 1257, 606, 5010, 18636, 9718, 11146, 13, 1678, 9995, 13, 1678, 1404, 29918, 978, 353, 4833, 29889, 657, 29918, 1792, 29898, 15452, 29918, 333, 29897, 13, 1678, 396, 1596, 29898, 29888, 29915, 30054, 5010, 18636, 9718, 11146, 490, 1386, 30032, 426, 1792, 29918, 978, 29913, 1495, 13, 1678, 1404, 29918, 978, 29918, 15206, 29887, 353, 7272, 679, 29918, 978, 29918, 1792, 29898, 4645, 29892, 10004, 29918, 333, 29897, 13, 1678, 396, 1596, 29898, 29888, 29915, 30054, 5010, 18636, 9718, 11146, 490, 10744, 753, 2194, 29959, 1488, 426, 1792, 29918, 978, 29918, 15206, 29887, 29913, 1495, 13, 1678, 565, 7431, 29898, 1792, 29918, 978, 29889, 978, 29897, 1275, 29871, 29900, 29901, 13, 4706, 1404, 29918, 978, 29889, 978, 353, 1404, 29918, 978, 29918, 15206, 29887, 13, 4706, 4833, 29889, 5504, 29918, 1792, 29898, 1792, 29918, 978, 29897, 13, 1678, 736, 1404, 29918, 978, 13, 13, 13, 1753, 2758, 29918, 1792, 29918, 333, 29898, 7193, 1125, 13, 1678, 1121, 353, 5159, 13, 1678, 363, 1404, 297, 4160, 29901, 13, 4706, 1121, 29889, 4397, 29898, 1792, 29889, 333, 29897, 13, 1678, 736, 731, 29898, 2914, 29897, 13, 13, 13, 29937, 448, 807, 11056, 939, 3565, 1630, 1779, 2584, 3029, 20153, 3540, 13, 13, 13, 29937, 732, 7451, 29889, 265, 29898, 13604, 29889, 10717, 3010, 29897, 13, 29937, 7465, 822, 7834, 29898, 3696, 1125, 13, 29937, 268, 7272, 1741, 29889, 12011, 877, 3492, 11484, 6571, 29991, 4286, 4830, 29898, 3696, 29889, 1272, 876, 13, 13, 13, 29937, 27056, 16990, 6863, 4184, 847, 2962, 13, 29992, 7451, 29889, 265, 29898, 13604, 29889, 4373, 3728, 29898, 11037, 2433, 29914, 2962, 8785, 13, 12674, 822, 1369, 29918, 9006, 29898, 3696, 1125, 13, 1678, 10004, 353, 7272, 1741, 29889, 657, 29918, 15452, 580, 13, 1678, 396, 10613, 780, 642, 665, 13728, 1447, 12308, 1186, 3419, 1500, 13, 1678, 10004, 29918, 333, 353, 10004, 29889, 333, 13, 13, 1678, 565, 451, 338, 29918, 9536, 29918, 1792, 29898, 15452, 29918, 333, 29892, 6055, 29889, 657, 29918, 497, 29918, 1792, 580, 1125, 13, 4706, 7272, 1741, 29889, 3636, 29898, 29888, 29908, 30032, 29904, 8412, 1077, 5784, 11130, 29889, 1651, 8355, 811, 730, 1210, 1186, 11437, 14437, 702, 1086, 29908, 320, 13, 462, 9651, 285, 29908, 18421, 1447, 3102, 1221, 29944, 8935, 30002, 3553, 490, 9648, 5985, 29977, 531, 18021, 29889, 6581, 30002, 3553, 426, 15452, 29918, 333, 27195, 13, 4706, 736, 13, 1678, 396, 11056, 10613, 780, 642, 665, 13728, 1447, 12308, 1186, 3419, 1500, 13, 13, 1678, 1404, 29918, 978, 353, 7272, 1423, 29918, 978, 29918, 1792, 29918, 6310, 29898, 3696, 29889, 4645, 29892, 10004, 29918, 333, 29892, 6055, 29897, 13, 13, 1678, 565, 1404, 29918, 978, 29889, 12154, 1275, 1528, 280, 29889, 6406, 29901, 13, 4706, 9828, 353, 2826, 29918, 3396, 29918, 6406, 13, 1678, 1683, 29901, 13, 4706, 9828, 353, 2826, 29918, 3396, 29918, 1792, 13, 13, 1678, 7272, 1741, 29889, 3636, 29898, 29888, 29908, 30013, 641, 7616, 29892, 426, 1792, 29918, 978, 29889, 978, 29913, 29991, 6061, 1345, 29957, 21986, 1413, 2399, 20884, 9903, 29876, 29908, 320, 13, 462, 4706, 376, 30082, 702, 29932, 3419, 29932, 27056, 1200, 1257, 8935, 1911, 6863, 4184, 19602, 13, 462, 4706, 9828, 29922, 4187, 7453, 29897, 13, 1678, 12020, 4959, 29889, 16329, 1184, 13573, 362, 13, 13, 13, 29937, 27056, 16990, 6863, 4184, 847, 12717, 13, 29992, 7451, 29889, 265, 29898, 13604, 29889, 4373, 3728, 29898, 305, 1446, 29922, 9536, 29918, 1792, 29918, 333, 29898, 11027, 29889, 657, 29918, 497, 29918, 1792, 25739, 4766, 2433, 29914, 12717, 8785, 13, 29937, 19714, 12274, 29927, 521, 1446, 448, 16071, 1498, 3501, 1178, 18636, 9718, 11572, 15261, 7557, 4394, 1447, 8412, 1186, 20148, 1520, 13, 12674, 822, 1048, 29918, 9006, 29898, 3696, 1125, 13, 1678, 1596, 29898, 9536, 29918, 1792, 29918, 333, 29898, 11027, 29889, 657, 29918, 497, 29918, 1792, 22130, 13, 1678, 7272, 1741, 29889, 3636, 703, 30096, 27056, 1200, 30005, 8935, 1911, 6863, 4184, 23157, 13, 13, 13, 29937, 27056, 16990, 6863, 4184, 847, 8477, 13, 29992, 7451, 29889, 265, 29898, 13604, 29889, 4373, 3728, 29898, 305, 1446, 29922, 9536, 29918, 1792, 29918, 333, 29898, 11027, 29889, 657, 29918, 497, 29918, 1792, 25739, 4766, 2433, 29914, 8477, 8785, 13, 12674, 822, 1371, 29918, 9006, 29898, 3696, 1125, 13, 1678, 10004, 353, 7272, 1741, 29889, 657, 29918, 15452, 580, 13, 1678, 7272, 1741, 29889, 3636, 29898, 657, 29918, 8477, 877, 8477, 29889, 3945, 8785, 13, 13, 13, 29937, 448, 2683, 5634, 6863, 4184, 11437, 11737, 19162, 4962, 1587, 18636, 9718, 11572, 13947, 2194, 29959, 29959, 3419, 676, 448, 2683, 2683, 29899, 13, 29992, 7451, 29889, 265, 29898, 13604, 29889, 4373, 3728, 29898, 305, 1446, 29922, 9536, 29918, 1792, 29918, 333, 29898, 11027, 29889, 657, 29918, 497, 29918, 1792, 25739, 4766, 2433, 29914, 6406, 8785, 13, 12674, 822, 4113, 29918, 9006, 29898, 3696, 1125, 13, 1678, 10004, 353, 7272, 1741, 29889, 657, 29918, 15452, 580, 13, 1678, 7272, 1741, 29889, 3636, 703, 30012, 29982, 1786, 19447, 490, 16223, 29959, 11437, 14437, 9011, 613, 13, 462, 4706, 9828, 29922, 3092, 29918, 6406, 29897, 13, 13, 13, 29992, 7451, 29889, 265, 29898, 13604, 29889, 4373, 3728, 29898, 305, 1446, 29922, 9536, 29918, 1792, 29918, 333, 29898, 11027, 29889, 657, 29918, 497, 29918, 1792, 25739, 4766, 2433, 29914, 2528, 2659, 8785, 13, 12674, 822, 788, 29918, 1792, 29918, 6406, 29898, 3696, 1125, 13, 1678, 396, 10004, 353, 7272, 1741, 29889, 657, 29918, 15452, 580, 13, 1678, 7272, 1741, 29889, 3636, 703, 30012, 29982, 9518, 1200, 4364, 6863, 840, 847, 2528, 29965, 1748, 1159, 13, 1678, 396, 26487, 15157, 531, 1077, 5945, 13139, 25565, 3540, 26367, 25385, 3807, 24534, 6863, 4184, 847, 2528, 2659, 13, 1678, 13563, 29918, 333, 353, 1741, 29889, 13496, 29918, 333, 13, 1678, 7465, 411, 9225, 29889, 535, 874, 362, 29898, 13496, 29918, 333, 29897, 408, 7602, 29901, 13, 4706, 396, 2933, 353, 7602, 29889, 10685, 29918, 3696, 29898, 13604, 29889, 4373, 3728, 29898, 262, 11506, 29922, 5574, 876, 13, 4706, 7272, 7602, 29889, 6717, 29918, 4906, 703, 30013, 641, 7616, 29991, 939, 1521, 956, 730, 29871, 2815, 780, 1178, 18636, 9718, 11146, 29908, 13, 462, 18884, 376, 551, 5090, 29977, 26367, 9907, 1447, 3102, 1221, 1413, 3807, 1447, 12308, 1186, 3419, 1500, 29901, 1159, 13, 4706, 1178, 29918, 1482, 29918, 1792, 353, 7272, 7602, 29889, 657, 29918, 5327, 580, 13, 4706, 1178, 29918, 1482, 29918, 1792, 353, 1178, 29918, 1482, 29918, 1792, 29889, 4906, 13, 4706, 396, 1596, 703, 333, 29918, 1482, 29918, 1792, 9162, 1178, 29918, 1482, 29918, 1792, 29897, 13, 4706, 1550, 451, 599, 29898, 29916, 29889, 275, 26204, 580, 363, 921, 297, 1178, 29918, 1482, 29918, 1792, 1125, 13, 9651, 7272, 7602, 29889, 6717, 29918, 4906, 703, 1367, 6968, 11913, 18636, 9718, 11146, 448, 6408, 5787, 15391, 29889, 2195, 5945, 3378, 29977, 730, 1694, 2402, 3212, 23157, 13, 9651, 1178, 29918, 1482, 29918, 1792, 353, 7272, 7602, 29889, 657, 29918, 5327, 580, 13, 9651, 1178, 29918, 1482, 29918, 1792, 353, 1178, 29918, 1482, 29918, 1792, 29889, 4906, 13, 4706, 396, 1596, 703, 333, 29918, 1482, 29918, 1792, 9162, 1178, 29918, 1482, 29918, 1792, 29897, 13, 13, 4706, 716, 29918, 978, 29918, 1792, 353, 7272, 679, 29918, 978, 29918, 1792, 29898, 3696, 29889, 4645, 29892, 938, 29898, 333, 29918, 1482, 29918, 1792, 876, 13, 13, 4706, 1596, 877, 30054, 5010, 6968, 11913, 18636, 9718, 11146, 742, 716, 29918, 978, 29918, 1792, 29897, 13, 4706, 788, 29918, 1482, 29918, 1792, 29898, 333, 29918, 1482, 29918, 1792, 29892, 6055, 29897, 13, 4706, 7272, 7602, 29889, 6717, 29918, 4906, 29898, 29888, 29908, 30032, 29904, 3102, 1221, 644, 6968, 11913, 18636, 9718, 11146, 531, 3553, 29901, 426, 333, 29918, 1482, 29918, 1792, 29913, 531, 27664, 3098, 426, 1482, 29918, 978, 29918, 1792, 27195, 13, 13, 13, 29992, 7451, 29889, 265, 29898, 13604, 29889, 4373, 3728, 29898, 305, 1446, 29922, 9536, 29918, 1792, 29918, 333, 29898, 11027, 29889, 657, 29918, 497, 29918, 1792, 25739, 4766, 2433, 29914, 13157, 2659, 8785, 13, 12674, 822, 628, 29918, 1792, 29918, 6406, 29898, 3696, 1125, 13, 1678, 396, 10004, 353, 7272, 1741, 29889, 657, 29918, 15452, 580, 13, 1678, 7272, 1741, 29889, 3636, 703, 30012, 29982, 9518, 1200, 4364, 6863, 840, 847, 13157, 29965, 1748, 1159, 13, 1678, 396, 26487, 15157, 531, 1077, 5945, 13139, 25565, 3540, 26367, 25385, 3807, 24534, 6863, 4184, 847, 13157, 2659, 13, 1678, 13563, 29918, 333, 353, 1741, 29889, 13496, 29918, 333, 13, 1678, 7465, 411, 9225, 29889, 535, 874, 362, 29898, 13496, 29918, 333, 29897, 408, 7602, 29901, 13, 4706, 396, 2933, 353, 7602, 29889, 10685, 29918, 3696, 29898, 13604, 29889, 4373, 3728, 29898, 262, 11506, 29922, 5574, 876, 13, 4706, 7272, 7602, 29889, 6717, 29918, 4906, 703, 30013, 641, 7616, 29991, 939, 1521, 956, 730, 29871, 2815, 780, 1178, 18636, 9718, 11146, 376, 13, 462, 18884, 376, 551, 5090, 29977, 26367, 9907, 1077, 5784, 811, 1413, 1447, 8412, 1186, 3419, 1500, 1159, 13, 4706, 1178, 29918, 6144, 29918, 1792, 353, 7272, 7602, 29889, 657, 29918, 5327, 580, 13, 4706, 1178, 29918, 6144, 29918, 1792, 353, 1178, 29918, 6144, 29918, 1792, 29889, 4906, 13, 4706, 1550, 451, 738, 29898, 29916, 29889, 275, 26204, 580, 363, 921, 297, 1178, 29918, 6144, 29918, 1792, 1125, 13, 9651, 7272, 7602, 29889, 6717, 29918, 4906, 703, 1367, 18636, 9718, 11146, 448, 6408, 5787, 15391, 29889, 376, 13, 462, 462, 1678, 376, 20093, 5945, 3378, 29977, 730, 1694, 2402, 3212, 23157, 13, 9651, 1178, 29918, 6144, 29918, 1792, 353, 7272, 7602, 29889, 657, 29918, 5327, 580, 13, 9651, 1178, 29918, 6144, 29918, 1792, 353, 1178, 29918, 6144, 29918, 1792, 29889, 4906, 13, 4706, 396, 10613, 780, 29970, 3098, 665, 2721, 1694, 12068, 18636, 9718, 2584, 11437, 23664, 12423, 1077, 1814, 1093, 29932, 19871, 644, 1413, 24716, 6408, 1538, 12052, 7489, 13, 4706, 565, 451, 338, 29918, 9536, 29918, 1792, 29898, 524, 29898, 333, 29918, 6144, 29918, 1792, 511, 4113, 29918, 4645, 1125, 13, 9651, 6055, 29889, 6144, 29918, 1792, 29898, 524, 29898, 333, 29918, 6144, 29918, 1792, 876, 13, 9651, 7272, 7602, 29889, 6717, 29918, 4906, 29898, 29888, 29908, 20093, 693, 9718, 730, 2583, 531, 3553, 29901, 426, 333, 29918, 6144, 29918, 1792, 29913, 376, 13, 462, 462, 1678, 376, 29033, 1186, 3419, 1500, 1077, 5784, 11130, 23157, 13, 4706, 1683, 29901, 13, 9651, 7272, 7602, 29889, 6717, 29918, 4906, 703, 30053, 840, 6195, 18636, 9718, 11146, 531, 23172, 989, 11437, 14437, 9011, 1077, 5784, 2402, 570, 23157, 13, 13, 13, 29992, 7451, 29889, 265, 29898, 13604, 29889, 4373, 3728, 29898, 305, 1446, 29922, 9536, 29918, 1792, 29918, 333, 29898, 11027, 29889, 657, 29918, 497, 29918, 1792, 25739, 4766, 2433, 29914, 3401, 2659, 8785, 13, 12674, 822, 5235, 29918, 1792, 29918, 6406, 29898, 3696, 1125, 13, 1678, 18999, 353, 1303, 29918, 1792, 29918, 2585, 29898, 11027, 29897, 13, 1678, 18999, 353, 518, 710, 29898, 29916, 29897, 363, 921, 297, 18999, 29962, 13, 1678, 851, 29879, 353, 11297, 29876, 4286, 7122, 29898, 4841, 29897, 13, 1678, 7272, 1741, 29889, 3636, 29898, 29888, 29908, 20093, 693, 9718, 12373, 15261, 7557, 4394, 1447, 8412, 3583, 29876, 29912, 710, 29879, 27195, 13, 13, 13, 29992, 7451, 29889, 265, 29898, 13604, 29889, 4373, 3728, 29898, 305, 1446, 29922, 9536, 29918, 1792, 29918, 333, 29898, 11027, 29889, 657, 29918, 497, 29918, 1792, 25739, 4766, 2433, 29914, 24365, 12754, 8785, 13, 12674, 822, 6876, 29918, 6406, 29918, 6406, 29898, 3696, 1125, 13, 1678, 10004, 353, 7272, 1741, 29889, 657, 29918, 15452, 580, 13, 1678, 7272, 1741, 29889, 3636, 29898, 29888, 29908, 30012, 29982, 2771, 19447, 1866, 16223, 1155, 11437, 14437, 9011, 19602, 13, 462, 4706, 9828, 29922, 3092, 29918, 3396, 29918, 6406, 29897, 13, 13, 13, 29937, 448, 2683, 5634, 11056, 6863, 4184, 11437, 11737, 19162, 4962, 1587, 18636, 9718, 11572, 13947, 2194, 29959, 29959, 3419, 676, 448, 2683, 2683, 29899, 13, 13, 13, 29937, 448, 2683, 23648, 3840, 3392, 4184, 6055, 13, 13, 29992, 7451, 29889, 265, 29898, 13604, 29889, 4373, 3728, 29898, 305, 1446, 29922, 9536, 29918, 1792, 29918, 333, 29898, 11027, 29889, 657, 29918, 497, 29918, 1792, 25739, 4766, 2433, 29914, 11027, 8785, 13, 12674, 822, 6055, 29918, 9006, 29898, 3696, 1125, 13, 1678, 7272, 1741, 29889, 3636, 703, 30012, 29982, 1786, 19447, 490, 16223, 29959, 665, 7966, 3506, 18636, 9718, 11146, 613, 13, 462, 4706, 9828, 29922, 3092, 29918, 11027, 29897, 13, 13, 13, 29992, 7451, 29889, 265, 29898, 13604, 29889, 4373, 3728, 29898, 305, 1446, 29922, 9536, 29918, 1792, 29918, 333, 29898, 11027, 29889, 657, 29918, 497, 29918, 1792, 25739, 4766, 2433, 29914, 24365, 9585, 8785, 13, 12674, 822, 6876, 29918, 11027, 29918, 9006, 29898, 3696, 1125, 13, 1678, 10004, 353, 7272, 1741, 29889, 657, 29918, 15452, 580, 13, 1678, 10004, 29918, 333, 353, 10004, 29889, 333, 13, 1678, 1404, 29918, 978, 353, 7272, 1423, 29918, 978, 29918, 1792, 29918, 6310, 29898, 3696, 29889, 4645, 29892, 10004, 29918, 333, 29892, 6055, 29897, 13, 13, 1678, 565, 1404, 29918, 978, 29889, 12154, 1275, 1528, 280, 29889, 6406, 29901, 13, 4706, 9828, 353, 2826, 29918, 3396, 29918, 6406, 13, 1678, 1683, 29901, 13, 4706, 9828, 353, 2826, 29918, 3396, 29918, 1792, 13, 13, 1678, 7272, 1741, 29889, 3636, 703, 30012, 29982, 2771, 19447, 1866, 16223, 1155, 665, 7966, 3506, 18636, 9718, 11146, 19602, 9828, 29922, 4187, 7453, 29897, 13, 13, 13, 29937, 448, 2683, 23648, 11056, 3840, 3392, 4184, 6055, 13, 13, 13, 29937, 448, 2683, 23648, 3840, 3392, 4184, 3807, 13947, 2194, 29959, 29959, 3419, 676, 15261, 9111, 3923, 4394, 5686, 8838, 3029, 20153, 3540, 13, 29992, 7451, 29889, 265, 29898, 13604, 29889, 4373, 3728, 29898, 305, 1446, 29922, 9536, 29918, 1792, 29918, 333, 29898, 11027, 29889, 657, 29918, 497, 29918, 1792, 25739, 4766, 2433, 3137, 29989, 3972, 8785, 13, 12674, 822, 1065, 29918, 9006, 29918, 650, 29898, 3696, 1125, 13, 1678, 9995, 13, 1678, 1695, 5508, 1909, 12172, 1902, 3540, 6863, 4184, 19375, 8074, 13, 1678, 9995, 13, 1678, 396, 2771, 1216, 6195, 19714, 12274, 494, 6863, 4184, 13, 1678, 2643, 29918, 726, 353, 1741, 29889, 1610, 29918, 726, 29889, 5451, 580, 13, 1678, 396, 1596, 29898, 4906, 29918, 726, 29897, 13, 13, 1678, 1828, 29918, 9006, 29879, 353, 6629, 13, 1678, 565, 7431, 29898, 4906, 29918, 726, 29897, 1405, 29871, 29896, 29901, 13, 4706, 1828, 29918, 9006, 29879, 353, 2643, 29918, 726, 29961, 29896, 29962, 13, 13, 1678, 1596, 29898, 3207, 29918, 9006, 29879, 29897, 13, 1678, 396, 10613, 780, 642, 19391, 10666, 1587, 4554, 29964, 717, 13, 1678, 565, 451, 2897, 29889, 2084, 29889, 9933, 29898, 3207, 29918, 9006, 29879, 1125, 13, 4706, 7272, 1741, 29889, 3636, 29898, 29888, 29908, 30013, 29910, 29964, 717, 426, 3207, 29918, 9006, 29879, 29913, 1538, 19391, 25251, 23157, 13, 4706, 736, 13, 13, 1678, 396, 6863, 840, 21105, 23618, 29932, 27056, 1200, 4199, 665, 10182, 1521, 587, 13, 1678, 9920, 29879, 353, 285, 29908, 3137, 426, 3207, 29918, 9006, 29879, 5038, 13, 13, 1678, 7272, 1741, 29889, 3636, 29898, 29888, 29908, 30012, 29982, 9518, 1200, 3098, 24857, 426, 9006, 29879, 27195, 13, 13, 1678, 2309, 29892, 903, 353, 7272, 408, 948, 3934, 29889, 10685, 4197, 3389, 29918, 9006, 29898, 9006, 29879, 29897, 2314, 13, 13, 1678, 396, 1121, 448, 13439, 29932, 27056, 15530, 6863, 4184, 9920, 29879, 13, 1678, 396, 1059, 448, 614, 1911, 23348, 29892, 1694, 12068, 6863, 840, 9920, 29879, 24587, 1911, 7476, 531, 614, 1911, 29975, 7337, 13, 1678, 396, 775, 448, 1046, 29957, 24534, 6863, 4184, 29892, 1694, 12068, 29871, 29900, 1919, 2721, 6863, 840, 1471, 18774, 10642, 614, 1911, 1782, 29951, 13, 1678, 1121, 29892, 1059, 29892, 775, 353, 2309, 29889, 7323, 2141, 2914, 580, 13, 13, 1678, 565, 775, 2804, 29871, 29900, 29901, 13, 4706, 7272, 1741, 29889, 3636, 29898, 29888, 29908, 6824, 6824, 1046, 29957, 29901, 426, 401, 29913, 320, 29876, 29908, 285, 29908, 30012, 18313, 22757, 29970, 614, 1911, 23348, 29901, 426, 2704, 27195, 13, 4706, 736, 13, 13, 1678, 1121, 353, 1121, 29889, 13808, 703, 9420, 29899, 29947, 1159, 13, 1678, 851, 29918, 2914, 353, 1121, 29871, 396, 1121, 29889, 5451, 14182, 29876, 1159, 13, 13, 1678, 7272, 1741, 29889, 3636, 29898, 29888, 29908, 30027, 29919, 3923, 11332, 29932, 29901, 320, 29876, 426, 710, 29918, 2914, 27195, 13, 13, 13, 29937, 448, 2683, 23648, 11056, 3840, 3392, 4184, 3807, 13947, 2194, 29959, 29959, 3419, 676, 15261, 9111, 3923, 4394, 5686, 8838, 3029, 20153, 3540, 13, 13, 13, 1753, 1667, 7295, 13, 1678, 9225, 29889, 3389, 29918, 29305, 29918, 2218, 18045, 580, 13, 13, 13, 361, 4770, 978, 1649, 1275, 525, 1649, 3396, 1649, 2396, 13, 1678, 1667, 580, 13, 2 ]
overholt/users/__init__.py
prdonahue/overholt
1,152
74826
# -*- coding: utf-8 -*- """ overholt.users ~~~~~~~~~~~~~~ overholt users package """ from ..core import Service from .models import User class UsersService(Service): __model__ = User
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 15945, 29908, 13, 1678, 975, 5391, 29873, 29889, 7193, 13, 1678, 3695, 26594, 14087, 30022, 13, 13, 1678, 975, 5391, 29873, 4160, 3577, 13, 15945, 29908, 13, 13, 3166, 6317, 3221, 1053, 6692, 13, 3166, 869, 9794, 1053, 4911, 13, 13, 13, 1990, 23861, 3170, 29898, 3170, 1125, 13, 1678, 4770, 4299, 1649, 353, 4911, 13, 2 ]
anki/importing/apkg.py
bdunnette/omeka2anki
2
102355
# -*- coding: utf-8 -*- # Copyright: <NAME> <<EMAIL>> # License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html import zipfile, os import unicodedata from anki.utils import tmpfile, json from anki.importing.anki2 import Anki2Importer class AnkiPackageImporter(Anki2Importer): def run(self): # extract the deck from the zip file self.zip = z = zipfile.ZipFile(self.file) col = z.read("collection.anki2") colpath = tmpfile(suffix=".anki2") open(colpath, "wb").write(col) self.file = colpath # we need the media dict in advance, and we'll need a map of fname -> # number to use during the import self.nameToNum = {} for k, v in json.loads(z.read("media")).items(): self.nameToNum[v] = k # run anki2 importer Anki2Importer.run(self) # import static media for file, c in self.nameToNum.items(): if not file.startswith("_") and not file.startswith("latex-"): continue path = os.path.join(self.col.media.dir(), unicodedata.normalize("NFC", file)) if not os.path.exists(path): open(path, "wb").write(z.read(c)) def _srcMediaData(self, fname): if fname in self.nameToNum: return self.zip.read(self.nameToNum[fname]) return None
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 29937, 14187, 1266, 29901, 529, 5813, 29958, 3532, 26862, 6227, 6778, 13, 29937, 19245, 29901, 15143, 16369, 7390, 29892, 1873, 29871, 29941, 470, 2678, 29936, 1732, 597, 1636, 29889, 18713, 29889, 990, 29914, 506, 11259, 29914, 351, 572, 29889, 1420, 13, 13, 5215, 14319, 1445, 29892, 2897, 13, 5215, 443, 293, 6797, 532, 13, 3166, 385, 1984, 29889, 13239, 1053, 13128, 1445, 29892, 4390, 13, 3166, 385, 1984, 29889, 5215, 292, 29889, 804, 29875, 29906, 1053, 530, 1984, 29906, 24192, 9555, 13, 13, 1990, 530, 1984, 14459, 24192, 9555, 29898, 2744, 1984, 29906, 24192, 9555, 1125, 13, 13, 1678, 822, 1065, 29898, 1311, 1125, 13, 4706, 396, 6597, 278, 19810, 515, 278, 14319, 934, 13, 4706, 1583, 29889, 7554, 353, 503, 353, 14319, 1445, 29889, 26264, 2283, 29898, 1311, 29889, 1445, 29897, 13, 4706, 784, 353, 503, 29889, 949, 703, 10855, 29889, 804, 29875, 29906, 1159, 13, 4706, 784, 2084, 353, 13128, 1445, 29898, 2146, 600, 861, 29569, 804, 29875, 29906, 1159, 13, 4706, 1722, 29898, 1054, 2084, 29892, 376, 29893, 29890, 2564, 3539, 29898, 1054, 29897, 13, 4706, 1583, 29889, 1445, 353, 784, 2084, 13, 4706, 396, 591, 817, 278, 5745, 9657, 297, 6564, 29892, 322, 591, 29915, 645, 817, 263, 2910, 310, 285, 978, 1599, 13, 4706, 396, 1353, 304, 671, 2645, 278, 1053, 13, 4706, 1583, 29889, 978, 1762, 8009, 353, 6571, 13, 4706, 363, 413, 29892, 325, 297, 4390, 29889, 18132, 29898, 29920, 29889, 949, 703, 9799, 1159, 467, 7076, 7295, 13, 9651, 1583, 29889, 978, 1762, 8009, 29961, 29894, 29962, 353, 413, 13, 4706, 396, 1065, 385, 1984, 29906, 527, 18505, 13, 4706, 530, 1984, 29906, 24192, 9555, 29889, 3389, 29898, 1311, 29897, 13, 4706, 396, 1053, 2294, 5745, 13, 4706, 363, 934, 29892, 274, 297, 1583, 29889, 978, 1762, 8009, 29889, 7076, 7295, 13, 9651, 565, 451, 934, 29889, 27382, 2541, 703, 29918, 1159, 322, 451, 934, 29889, 27382, 2541, 703, 25694, 29899, 29908, 1125, 13, 18884, 6773, 13, 9651, 2224, 353, 2897, 29889, 2084, 29889, 7122, 29898, 1311, 29889, 1054, 29889, 9799, 29889, 3972, 3285, 13, 462, 18884, 443, 293, 6797, 532, 29889, 8945, 675, 703, 29940, 8610, 613, 934, 876, 13, 9651, 565, 451, 2897, 29889, 2084, 29889, 9933, 29898, 2084, 1125, 13, 18884, 1722, 29898, 2084, 29892, 376, 29893, 29890, 2564, 3539, 29898, 29920, 29889, 949, 29898, 29883, 876, 13, 13, 1678, 822, 903, 4351, 10572, 1469, 29898, 1311, 29892, 285, 978, 1125, 13, 4706, 565, 285, 978, 297, 1583, 29889, 978, 1762, 8009, 29901, 13, 9651, 736, 1583, 29889, 7554, 29889, 949, 29898, 1311, 29889, 978, 1762, 8009, 29961, 29888, 978, 2314, 13, 4706, 736, 6213, 13, 2 ]
nlp/layers/linears.py
zhihao-chen/NLP-experiments
4
15608
# -*- coding: utf8 -*- """ ====================================== Project Name: NLP File Name: linears Author: czh Create Date: 2021/11/15 -------------------------------------- Change Activity: ====================================== """ import math import torch import torch.nn as nn import torch.nn.functional as func from torch.nn.parameter import Parameter class Linears(nn.Module): def __init__(self, input_dim: int, output_dim: int = 1, bias: bool = True): super().__init__() self.fn1 = nn.Linear(input_dim, input_dim) self.fn2 = nn.Linear(input_dim, input_dim) self.fn3 = nn.Linear(input_dim, output_dim, bias=bias) nn.init.orthogonal_(self.fn1.weight, gain=1) nn.init.orthogonal_(self.fn2.weight, gain=1) nn.init.orthogonal_(self.fn3.weight, gain=1) def forward(self, hidden_states: torch.Tensor, encoder_hidden_states: torch.Tensor): logits = self.fn3(torch.tanh( self.fn1(hidden_states).unsqueeze(2) + self.fn2(encoder_hidden_states).unsqueeze(1) )).squeeze() return logits class EntityLinears(nn.Module): def __init__(self, input_dim: int, output_dim: int = 1, bias: bool = True): super().__init__() self.head = Linears(input_dim=input_dim, output_dim=output_dim, bias=bias) self.tail = Linears(input_dim=input_dim, output_dim=output_dim, bias=bias) def forward(self, hidden_states: torch.Tensor, encoder_hidden_states: torch.Tensor): # [bsz, num_triples, seq_len, output_dim] return self.head(hidden_states, encoder_hidden_states), self.tail(hidden_states, encoder_hidden_states) class FeedForwardNetwork(nn.Module): def __init__(self, input_size, hidden_size, output_size, dropout_rate=0): super(FeedForwardNetwork, self).__init__() self.dropout_rate = dropout_rate self.linear1 = nn.Linear(input_size, hidden_size) self.linear2 = nn.Linear(hidden_size, output_size) def forward(self, x): x_proj = func.dropout(func.relu(self.linear1(x)), p=self.dropout_rate, training=self.training) x_proj = self.linear2(x_proj) return x_proj class PoolerStartLogits(nn.Module): """ bert_ner_span """ def __init__(self, hidden_size, num_classes): super(PoolerStartLogits, self).__init__() self.dense = nn.Linear(hidden_size, num_classes) def forward(self, hidden_states): x = self.dense(hidden_states) return x class PoolerEndLogits(nn.Module): """ bert_ner_span """ def __init__(self, hidden_size, num_classes): super(PoolerEndLogits, self).__init__() self.dense_0 = nn.Linear(hidden_size, hidden_size) self.activation = nn.Tanh() self.LayerNorm = nn.LayerNorm(hidden_size) self.dense_1 = nn.Linear(hidden_size, num_classes) def forward(self, hidden_states, start_positions=None): x = self.dense_0(torch.cat([hidden_states, start_positions], dim=-1)) x = self.activation(x) x = self.LayerNorm(x) x = self.dense_1(x) return x class MultiNonLinearClassifier(nn.Module): def __init__(self, hidden_size, num_label, dropout_rate, act_func="gelu", intermediate_hidden_size=None): super(MultiNonLinearClassifier, self).__init__() self.num_label = num_label self.intermediate_hidden_size = hidden_size if intermediate_hidden_size is None else intermediate_hidden_size self.classifier1 = nn.Linear(hidden_size, self.intermediate_hidden_size) self.classifier2 = nn.Linear(self.intermediate_hidden_size, self.num_label) self.dropout = nn.Dropout(dropout_rate) self.act_func = act_func def forward(self, input_features): features_output1 = self.classifier1(input_features) if self.act_func == "gelu": features_output1 = func.gelu(features_output1) elif self.act_func == "relu": features_output1 = func.relu(features_output1) elif self.act_func == "tanh": features_output1 = func.tanh(features_output1) else: raise ValueError features_output1 = self.dropout(features_output1) features_output2 = self.classifier2(features_output1) return features_output2 class SingleLinearClassifier(nn.Module): def __init__(self, hidden_size, num_label): super(SingleLinearClassifier, self).__init__() self.num_label = num_label self.classifier = nn.Linear(hidden_size, num_label) def forward(self, input_features): features_output = self.classifier(input_features) return features_output class BERTTaggerClassifier(nn.Module): def __init__(self, hidden_size, num_label, dropout_rate, act_func="gelu", intermediate_hidden_size=None): super(BERTTaggerClassifier, self).__init__() self.num_label = num_label self.intermediate_hidden_size = hidden_size if intermediate_hidden_size is None else intermediate_hidden_size self.classifier1 = nn.Linear(hidden_size, self.intermediate_hidden_size) self.classifier2 = nn.Linear(self.intermediate_hidden_size, self.num_label) self.dropout = nn.Dropout(dropout_rate) self.act_func = act_func def forward(self, input_features): features_output1 = self.classifier1(input_features) if self.act_func == "gelu": features_output1 = func.gelu(features_output1) elif self.act_func == "relu": features_output1 = func.relu(features_output1) elif self.act_func == "tanh": features_output1 = func.tanh(features_output1) else: raise ValueError features_output1 = self.dropout(features_output1) features_output2 = self.classifier2(features_output1) return features_output2 class ClassifierLayer(nn.Module): # https://github.com/Akeepers/LEAR/blob/master/utils/model_utils.py def __init__(self, class_num, out_features, bias=True): super(ClassifierLayer, self).__init__() self.class_num = class_num self.out_features = out_features self.weight = Parameter(torch.Tensor(class_num, out_features)) if bias: self.bias = Parameter(torch.Tensor(class_num)) else: self.register_parameter('bias', None) self.reset_parameters() def reset_parameters(self) -> None: nn.init.kaiming_uniform_(self.weight, a=math.sqrt(5)) if self.bias is not None: fan_in, _ = nn.init._calculate_fan_in_and_fan_out(self.weight) bound = 1 / math.sqrt(fan_in) nn.init.uniform_(self.bias, -bound, bound) def forward(self, inputs): x = torch.mul(inputs, self.weight) # (class_num, 1) x = torch.sum(x, -1) # [-1, class_num] if self.bias is not None: x = x + self.bias return x def extra_repr(self): return 'class_num={}, out_features={}, bias={}'.format( self.class_num, self.out_features, self.bias is not None) class MultiNonLinearClassifierForMultiLabel(nn.Module): # https://github.com/Akeepers/LEAR/blob/master/utils/model_utils.py def __init__(self, hidden_size, num_label, dropout_rate): super(MultiNonLinearClassifierForMultiLabel, self).__init__() self.num_label = num_label self.classifier1 = nn.Linear(hidden_size, hidden_size) self.classifier2 = ClassifierLayer(num_label, hidden_size) self.dropout = nn.Dropout(dropout_rate) def forward(self, input_features): features_output1 = self.classifier1(input_features) features_output1 = func.gelu(features_output1) features_output1 = self.dropout(features_output1) features_output2 = self.classifier2(features_output1) return features_output2
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29947, 448, 29930, 29899, 13, 15945, 29908, 13, 9166, 9166, 2751, 1360, 13, 1678, 8010, 4408, 29901, 405, 13208, 13, 1678, 3497, 4408, 29901, 1196, 1503, 13, 1678, 13361, 29901, 5316, 29882, 13, 1678, 6204, 4712, 29901, 29871, 29906, 29900, 29906, 29896, 29914, 29896, 29896, 29914, 29896, 29945, 13, 2683, 2683, 22158, 13, 1678, 10726, 13414, 29901, 29871, 13, 9166, 9166, 2751, 1360, 13, 15945, 29908, 13, 5215, 5844, 13, 13, 5215, 4842, 305, 13, 5215, 4842, 305, 29889, 15755, 408, 302, 29876, 13, 5215, 4842, 305, 29889, 15755, 29889, 2220, 284, 408, 3653, 13, 3166, 4842, 305, 29889, 15755, 29889, 15501, 1053, 24953, 13, 13, 13, 1990, 7407, 1503, 29898, 15755, 29889, 7355, 1125, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 1881, 29918, 6229, 29901, 938, 29892, 1962, 29918, 6229, 29901, 938, 353, 29871, 29896, 29892, 24003, 29901, 6120, 353, 5852, 1125, 13, 4706, 2428, 2141, 1649, 2344, 1649, 580, 13, 4706, 1583, 29889, 9144, 29896, 353, 302, 29876, 29889, 12697, 29898, 2080, 29918, 6229, 29892, 1881, 29918, 6229, 29897, 13, 4706, 1583, 29889, 9144, 29906, 353, 302, 29876, 29889, 12697, 29898, 2080, 29918, 6229, 29892, 1881, 29918, 6229, 29897, 13, 4706, 1583, 29889, 9144, 29941, 353, 302, 29876, 29889, 12697, 29898, 2080, 29918, 6229, 29892, 1962, 29918, 6229, 29892, 24003, 29922, 29890, 3173, 29897, 13, 13, 4706, 302, 29876, 29889, 2344, 29889, 2072, 23419, 23538, 1311, 29889, 9144, 29896, 29889, 7915, 29892, 11581, 29922, 29896, 29897, 13, 4706, 302, 29876, 29889, 2344, 29889, 2072, 23419, 23538, 1311, 29889, 9144, 29906, 29889, 7915, 29892, 11581, 29922, 29896, 29897, 13, 4706, 302, 29876, 29889, 2344, 29889, 2072, 23419, 23538, 1311, 29889, 9144, 29941, 29889, 7915, 29892, 11581, 29922, 29896, 29897, 13, 13, 1678, 822, 6375, 29898, 1311, 29892, 7934, 29918, 28631, 29901, 4842, 305, 29889, 29911, 6073, 29892, 2094, 6119, 29918, 10892, 29918, 28631, 29901, 4842, 305, 29889, 29911, 6073, 1125, 13, 4706, 1480, 1169, 353, 1583, 29889, 9144, 29941, 29898, 7345, 305, 29889, 13161, 29882, 29898, 13, 9651, 1583, 29889, 9144, 29896, 29898, 10892, 29918, 28631, 467, 6948, 802, 29872, 911, 29898, 29906, 29897, 718, 1583, 29889, 9144, 29906, 29898, 3977, 6119, 29918, 10892, 29918, 28631, 467, 6948, 802, 29872, 911, 29898, 29896, 29897, 13, 4706, 1723, 467, 29879, 802, 29872, 911, 580, 13, 4706, 736, 1480, 1169, 13, 13, 13, 1990, 14945, 3542, 1503, 29898, 15755, 29889, 7355, 1125, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 1881, 29918, 6229, 29901, 938, 29892, 1962, 29918, 6229, 29901, 938, 353, 29871, 29896, 29892, 24003, 29901, 6120, 353, 5852, 1125, 13, 4706, 2428, 2141, 1649, 2344, 1649, 580, 13, 4706, 1583, 29889, 2813, 353, 7407, 1503, 29898, 2080, 29918, 6229, 29922, 2080, 29918, 6229, 29892, 1962, 29918, 6229, 29922, 4905, 29918, 6229, 29892, 24003, 29922, 29890, 3173, 29897, 13, 4706, 1583, 29889, 18237, 353, 7407, 1503, 29898, 2080, 29918, 6229, 29922, 2080, 29918, 6229, 29892, 1962, 29918, 6229, 29922, 4905, 29918, 6229, 29892, 24003, 29922, 29890, 3173, 29897, 13, 13, 1678, 822, 6375, 29898, 1311, 29892, 7934, 29918, 28631, 29901, 4842, 305, 29889, 29911, 6073, 29892, 2094, 6119, 29918, 10892, 29918, 28631, 29901, 4842, 305, 29889, 29911, 6073, 1125, 13, 4706, 396, 518, 29890, 3616, 29892, 954, 29918, 3626, 2701, 29892, 19359, 29918, 2435, 29892, 1962, 29918, 6229, 29962, 13, 4706, 736, 1583, 29889, 2813, 29898, 10892, 29918, 28631, 29892, 2094, 6119, 29918, 10892, 29918, 28631, 511, 1583, 29889, 18237, 29898, 10892, 29918, 28631, 29892, 2094, 6119, 29918, 10892, 29918, 28631, 29897, 13, 13, 13, 1990, 5169, 287, 2831, 1328, 13724, 29898, 15755, 29889, 7355, 1125, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 1881, 29918, 2311, 29892, 7934, 29918, 2311, 29892, 1962, 29918, 2311, 29892, 5768, 449, 29918, 10492, 29922, 29900, 1125, 13, 4706, 2428, 29898, 29737, 2831, 1328, 13724, 29892, 1583, 467, 1649, 2344, 1649, 580, 13, 4706, 1583, 29889, 8865, 449, 29918, 10492, 353, 5768, 449, 29918, 10492, 13, 4706, 1583, 29889, 10660, 29896, 353, 302, 29876, 29889, 12697, 29898, 2080, 29918, 2311, 29892, 7934, 29918, 2311, 29897, 13, 4706, 1583, 29889, 10660, 29906, 353, 302, 29876, 29889, 12697, 29898, 10892, 29918, 2311, 29892, 1962, 29918, 2311, 29897, 13, 13, 1678, 822, 6375, 29898, 1311, 29892, 921, 1125, 13, 4706, 921, 29918, 20865, 353, 3653, 29889, 8865, 449, 29898, 9891, 29889, 2674, 29884, 29898, 1311, 29889, 10660, 29896, 29898, 29916, 8243, 282, 29922, 1311, 29889, 8865, 449, 29918, 10492, 29892, 6694, 29922, 1311, 29889, 26495, 29897, 13, 4706, 921, 29918, 20865, 353, 1583, 29889, 10660, 29906, 29898, 29916, 29918, 20865, 29897, 13, 4706, 736, 921, 29918, 20865, 13, 13, 13, 1990, 28625, 261, 4763, 3403, 1169, 29898, 15755, 29889, 7355, 1125, 13, 1678, 9995, 13, 1678, 289, 814, 29918, 1089, 29918, 9653, 13, 1678, 9995, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 7934, 29918, 2311, 29892, 954, 29918, 13203, 1125, 13, 4706, 2428, 29898, 11426, 261, 4763, 3403, 1169, 29892, 1583, 467, 1649, 2344, 1649, 580, 13, 4706, 1583, 29889, 1145, 344, 353, 302, 29876, 29889, 12697, 29898, 10892, 29918, 2311, 29892, 954, 29918, 13203, 29897, 13, 13, 1678, 822, 6375, 29898, 1311, 29892, 7934, 29918, 28631, 1125, 13, 4706, 921, 353, 1583, 29889, 1145, 344, 29898, 10892, 29918, 28631, 29897, 13, 4706, 736, 921, 13, 13, 13, 1990, 28625, 261, 5044, 3403, 1169, 29898, 15755, 29889, 7355, 1125, 13, 1678, 9995, 13, 1678, 289, 814, 29918, 1089, 29918, 9653, 13, 1678, 9995, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 7934, 29918, 2311, 29892, 954, 29918, 13203, 1125, 13, 4706, 2428, 29898, 11426, 261, 5044, 3403, 1169, 29892, 1583, 467, 1649, 2344, 1649, 580, 13, 4706, 1583, 29889, 1145, 344, 29918, 29900, 353, 302, 29876, 29889, 12697, 29898, 10892, 29918, 2311, 29892, 7934, 29918, 2311, 29897, 13, 4706, 1583, 29889, 11236, 362, 353, 302, 29876, 29889, 29911, 27731, 580, 13, 4706, 1583, 29889, 14420, 29940, 555, 353, 302, 29876, 29889, 14420, 29940, 555, 29898, 10892, 29918, 2311, 29897, 13, 4706, 1583, 29889, 1145, 344, 29918, 29896, 353, 302, 29876, 29889, 12697, 29898, 10892, 29918, 2311, 29892, 954, 29918, 13203, 29897, 13, 13, 1678, 822, 6375, 29898, 1311, 29892, 7934, 29918, 28631, 29892, 1369, 29918, 1066, 2187, 29922, 8516, 1125, 13, 4706, 921, 353, 1583, 29889, 1145, 344, 29918, 29900, 29898, 7345, 305, 29889, 4117, 4197, 10892, 29918, 28631, 29892, 1369, 29918, 1066, 2187, 1402, 3964, 10457, 29896, 876, 13, 4706, 921, 353, 1583, 29889, 11236, 362, 29898, 29916, 29897, 13, 4706, 921, 353, 1583, 29889, 14420, 29940, 555, 29898, 29916, 29897, 13, 4706, 921, 353, 1583, 29889, 1145, 344, 29918, 29896, 29898, 29916, 29897, 13, 4706, 736, 921, 13, 13, 13, 1990, 14974, 12283, 12697, 2385, 3709, 29898, 15755, 29889, 7355, 1125, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 7934, 29918, 2311, 29892, 954, 29918, 1643, 29892, 5768, 449, 29918, 10492, 29892, 1044, 29918, 9891, 543, 7467, 29884, 613, 19697, 29918, 10892, 29918, 2311, 29922, 8516, 1125, 13, 4706, 2428, 29898, 15329, 12283, 12697, 2385, 3709, 29892, 1583, 467, 1649, 2344, 1649, 580, 13, 4706, 1583, 29889, 1949, 29918, 1643, 353, 954, 29918, 1643, 13, 4706, 1583, 29889, 1639, 13847, 29918, 10892, 29918, 2311, 353, 7934, 29918, 2311, 565, 19697, 29918, 10892, 29918, 2311, 338, 6213, 1683, 19697, 29918, 10892, 29918, 2311, 13, 4706, 1583, 29889, 1990, 3709, 29896, 353, 302, 29876, 29889, 12697, 29898, 10892, 29918, 2311, 29892, 1583, 29889, 1639, 13847, 29918, 10892, 29918, 2311, 29897, 13, 4706, 1583, 29889, 1990, 3709, 29906, 353, 302, 29876, 29889, 12697, 29898, 1311, 29889, 1639, 13847, 29918, 10892, 29918, 2311, 29892, 1583, 29889, 1949, 29918, 1643, 29897, 13, 4706, 1583, 29889, 8865, 449, 353, 302, 29876, 29889, 15063, 449, 29898, 8865, 449, 29918, 10492, 29897, 13, 4706, 1583, 29889, 627, 29918, 9891, 353, 1044, 29918, 9891, 13, 13, 1678, 822, 6375, 29898, 1311, 29892, 1881, 29918, 22100, 1125, 13, 4706, 5680, 29918, 4905, 29896, 353, 1583, 29889, 1990, 3709, 29896, 29898, 2080, 29918, 22100, 29897, 13, 4706, 565, 1583, 29889, 627, 29918, 9891, 1275, 376, 7467, 29884, 1115, 13, 9651, 5680, 29918, 4905, 29896, 353, 3653, 29889, 7467, 29884, 29898, 22100, 29918, 4905, 29896, 29897, 13, 4706, 25342, 1583, 29889, 627, 29918, 9891, 1275, 376, 2674, 29884, 1115, 13, 9651, 5680, 29918, 4905, 29896, 353, 3653, 29889, 2674, 29884, 29898, 22100, 29918, 4905, 29896, 29897, 13, 4706, 25342, 1583, 29889, 627, 29918, 9891, 1275, 376, 13161, 29882, 1115, 13, 9651, 5680, 29918, 4905, 29896, 353, 3653, 29889, 13161, 29882, 29898, 22100, 29918, 4905, 29896, 29897, 13, 4706, 1683, 29901, 13, 9651, 12020, 7865, 2392, 13, 4706, 5680, 29918, 4905, 29896, 353, 1583, 29889, 8865, 449, 29898, 22100, 29918, 4905, 29896, 29897, 13, 4706, 5680, 29918, 4905, 29906, 353, 1583, 29889, 1990, 3709, 29906, 29898, 22100, 29918, 4905, 29896, 29897, 13, 4706, 736, 5680, 29918, 4905, 29906, 13, 13, 13, 1990, 16740, 12697, 2385, 3709, 29898, 15755, 29889, 7355, 1125, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 7934, 29918, 2311, 29892, 954, 29918, 1643, 1125, 13, 4706, 2428, 29898, 15771, 12697, 2385, 3709, 29892, 1583, 467, 1649, 2344, 1649, 580, 13, 4706, 1583, 29889, 1949, 29918, 1643, 353, 954, 29918, 1643, 13, 4706, 1583, 29889, 1990, 3709, 353, 302, 29876, 29889, 12697, 29898, 10892, 29918, 2311, 29892, 954, 29918, 1643, 29897, 13, 13, 1678, 822, 6375, 29898, 1311, 29892, 1881, 29918, 22100, 1125, 13, 4706, 5680, 29918, 4905, 353, 1583, 29889, 1990, 3709, 29898, 2080, 29918, 22100, 29897, 13, 4706, 736, 5680, 29918, 4905, 13, 13, 13, 1990, 350, 20161, 8176, 914, 2385, 3709, 29898, 15755, 29889, 7355, 1125, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 7934, 29918, 2311, 29892, 954, 29918, 1643, 29892, 5768, 449, 29918, 10492, 29892, 1044, 29918, 9891, 543, 7467, 29884, 613, 19697, 29918, 10892, 29918, 2311, 29922, 8516, 1125, 13, 4706, 2428, 29898, 13635, 29911, 8176, 914, 2385, 3709, 29892, 1583, 467, 1649, 2344, 1649, 580, 13, 4706, 1583, 29889, 1949, 29918, 1643, 353, 954, 29918, 1643, 13, 4706, 1583, 29889, 1639, 13847, 29918, 10892, 29918, 2311, 353, 7934, 29918, 2311, 565, 19697, 29918, 10892, 29918, 2311, 338, 6213, 1683, 19697, 29918, 10892, 29918, 2311, 13, 4706, 1583, 29889, 1990, 3709, 29896, 353, 302, 29876, 29889, 12697, 29898, 10892, 29918, 2311, 29892, 1583, 29889, 1639, 13847, 29918, 10892, 29918, 2311, 29897, 13, 4706, 1583, 29889, 1990, 3709, 29906, 353, 302, 29876, 29889, 12697, 29898, 1311, 29889, 1639, 13847, 29918, 10892, 29918, 2311, 29892, 1583, 29889, 1949, 29918, 1643, 29897, 13, 4706, 1583, 29889, 8865, 449, 353, 302, 29876, 29889, 15063, 449, 29898, 8865, 449, 29918, 10492, 29897, 13, 4706, 1583, 29889, 627, 29918, 9891, 353, 1044, 29918, 9891, 13, 13, 1678, 822, 6375, 29898, 1311, 29892, 1881, 29918, 22100, 1125, 13, 4706, 5680, 29918, 4905, 29896, 353, 1583, 29889, 1990, 3709, 29896, 29898, 2080, 29918, 22100, 29897, 13, 4706, 565, 1583, 29889, 627, 29918, 9891, 1275, 376, 7467, 29884, 1115, 13, 9651, 5680, 29918, 4905, 29896, 353, 3653, 29889, 7467, 29884, 29898, 22100, 29918, 4905, 29896, 29897, 13, 4706, 25342, 1583, 29889, 627, 29918, 9891, 1275, 376, 2674, 29884, 1115, 13, 9651, 5680, 29918, 4905, 29896, 353, 3653, 29889, 2674, 29884, 29898, 22100, 29918, 4905, 29896, 29897, 13, 4706, 25342, 1583, 29889, 627, 29918, 9891, 1275, 376, 13161, 29882, 1115, 13, 9651, 5680, 29918, 4905, 29896, 353, 3653, 29889, 13161, 29882, 29898, 22100, 29918, 4905, 29896, 29897, 13, 4706, 1683, 29901, 13, 9651, 12020, 7865, 2392, 13, 4706, 5680, 29918, 4905, 29896, 353, 1583, 29889, 8865, 449, 29898, 22100, 29918, 4905, 29896, 29897, 13, 4706, 5680, 29918, 4905, 29906, 353, 1583, 29889, 1990, 3709, 29906, 29898, 22100, 29918, 4905, 29896, 29897, 13, 4706, 736, 5680, 29918, 4905, 29906, 13, 13, 13, 1990, 4134, 3709, 14420, 29898, 15755, 29889, 7355, 1125, 13, 1678, 396, 2045, 597, 3292, 29889, 510, 29914, 29909, 17462, 414, 29914, 1307, 1718, 29914, 10054, 29914, 6207, 29914, 13239, 29914, 4299, 29918, 13239, 29889, 2272, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 770, 29918, 1949, 29892, 714, 29918, 22100, 29892, 24003, 29922, 5574, 1125, 13, 4706, 2428, 29898, 2385, 3709, 14420, 29892, 1583, 467, 1649, 2344, 1649, 580, 13, 4706, 1583, 29889, 1990, 29918, 1949, 353, 770, 29918, 1949, 13, 4706, 1583, 29889, 449, 29918, 22100, 353, 714, 29918, 22100, 13, 4706, 1583, 29889, 7915, 353, 24953, 29898, 7345, 305, 29889, 29911, 6073, 29898, 1990, 29918, 1949, 29892, 714, 29918, 22100, 876, 13, 4706, 565, 24003, 29901, 13, 9651, 1583, 29889, 29890, 3173, 353, 24953, 29898, 7345, 305, 29889, 29911, 6073, 29898, 1990, 29918, 1949, 876, 13, 4706, 1683, 29901, 13, 9651, 1583, 29889, 9573, 29918, 15501, 877, 29890, 3173, 742, 6213, 29897, 13, 4706, 1583, 29889, 12071, 29918, 16744, 580, 13, 13, 1678, 822, 10092, 29918, 16744, 29898, 1311, 29897, 1599, 6213, 29901, 13, 4706, 302, 29876, 29889, 2344, 29889, 1335, 326, 292, 29918, 29590, 23538, 1311, 29889, 7915, 29892, 263, 29922, 755, 29889, 3676, 29898, 29945, 876, 13, 4706, 565, 1583, 29889, 29890, 3173, 338, 451, 6213, 29901, 13, 9651, 13524, 29918, 262, 29892, 903, 353, 302, 29876, 29889, 2344, 3032, 15807, 403, 29918, 12963, 29918, 262, 29918, 392, 29918, 12963, 29918, 449, 29898, 1311, 29889, 7915, 29897, 13, 9651, 3216, 353, 29871, 29896, 847, 5844, 29889, 3676, 29898, 12963, 29918, 262, 29897, 13, 9651, 302, 29876, 29889, 2344, 29889, 29590, 23538, 1311, 29889, 29890, 3173, 29892, 448, 9917, 29892, 3216, 29897, 13, 13, 1678, 822, 6375, 29898, 1311, 29892, 10970, 1125, 13, 4706, 921, 353, 4842, 305, 29889, 16109, 29898, 2080, 29879, 29892, 1583, 29889, 7915, 29897, 13, 4706, 396, 313, 1990, 29918, 1949, 29892, 29871, 29896, 29897, 13, 4706, 921, 353, 4842, 305, 29889, 2083, 29898, 29916, 29892, 448, 29896, 29897, 29871, 396, 21069, 29896, 29892, 770, 29918, 1949, 29962, 13, 4706, 565, 1583, 29889, 29890, 3173, 338, 451, 6213, 29901, 13, 9651, 921, 353, 921, 718, 1583, 29889, 29890, 3173, 13, 4706, 736, 921, 13, 13, 1678, 822, 4805, 29918, 276, 558, 29898, 1311, 1125, 13, 4706, 736, 525, 1990, 29918, 1949, 3790, 1118, 714, 29918, 22100, 3790, 1118, 24003, 3790, 29913, 4286, 4830, 29898, 13, 9651, 1583, 29889, 1990, 29918, 1949, 29892, 1583, 29889, 449, 29918, 22100, 29892, 1583, 29889, 29890, 3173, 338, 451, 6213, 29897, 13, 13, 13, 1990, 14974, 12283, 12697, 2385, 3709, 2831, 15329, 4775, 29898, 15755, 29889, 7355, 1125, 13, 1678, 396, 2045, 597, 3292, 29889, 510, 29914, 29909, 17462, 414, 29914, 1307, 1718, 29914, 10054, 29914, 6207, 29914, 13239, 29914, 4299, 29918, 13239, 29889, 2272, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 7934, 29918, 2311, 29892, 954, 29918, 1643, 29892, 5768, 449, 29918, 10492, 1125, 13, 4706, 2428, 29898, 15329, 12283, 12697, 2385, 3709, 2831, 15329, 4775, 29892, 1583, 467, 1649, 2344, 1649, 580, 13, 4706, 1583, 29889, 1949, 29918, 1643, 353, 954, 29918, 1643, 13, 4706, 1583, 29889, 1990, 3709, 29896, 353, 302, 29876, 29889, 12697, 29898, 10892, 29918, 2311, 29892, 7934, 29918, 2311, 29897, 13, 4706, 1583, 29889, 1990, 3709, 29906, 353, 4134, 3709, 14420, 29898, 1949, 29918, 1643, 29892, 7934, 29918, 2311, 29897, 13, 4706, 1583, 29889, 8865, 449, 353, 302, 29876, 29889, 15063, 449, 29898, 8865, 449, 29918, 10492, 29897, 13, 13, 1678, 822, 6375, 29898, 1311, 29892, 1881, 29918, 22100, 1125, 13, 4706, 5680, 29918, 4905, 29896, 353, 1583, 29889, 1990, 3709, 29896, 29898, 2080, 29918, 22100, 29897, 13, 4706, 5680, 29918, 4905, 29896, 353, 3653, 29889, 7467, 29884, 29898, 22100, 29918, 4905, 29896, 29897, 13, 4706, 5680, 29918, 4905, 29896, 353, 1583, 29889, 8865, 449, 29898, 22100, 29918, 4905, 29896, 29897, 13, 4706, 5680, 29918, 4905, 29906, 353, 1583, 29889, 1990, 3709, 29906, 29898, 22100, 29918, 4905, 29896, 29897, 13, 4706, 736, 5680, 29918, 4905, 29906, 13, 2 ]