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
|
---|---|---|---|---|---|
ee/clickhouse/sql/person.py | wanderlog/posthog | 0 | 8931 | <reponame>wanderlog/posthog<gh_stars>0
from ee.clickhouse.sql.clickhouse import KAFKA_COLUMNS, STORAGE_POLICY, kafka_engine
from ee.clickhouse.sql.table_engines import CollapsingMergeTree, ReplacingMergeTree
from ee.kafka_client.topics import KAFKA_PERSON, KAFKA_PERSON_DISTINCT_ID, KAFKA_PERSON_UNIQUE_ID
from posthog.settings import CLICKHOUSE_CLUSTER, CLICKHOUSE_DATABASE
TRUNCATE_PERSON_TABLE_SQL = f"TRUNCATE TABLE IF EXISTS person ON CLUSTER '{CLICKHOUSE_CLUSTER}'"
DROP_PERSON_TABLE_SQL = f"DROP TABLE IF EXISTS person ON CLUSTER '{CLICKHOUSE_CLUSTER}'"
TRUNCATE_PERSON_DISTINCT_ID_TABLE_SQL = f"TRUNCATE TABLE IF EXISTS person_distinct_id ON CLUSTER '{CLICKHOUSE_CLUSTER}'"
TRUNCATE_PERSON_DISTINCT_ID2_TABLE_SQL = (
f"TRUNCATE TABLE IF EXISTS person_distinct_id2 ON CLUSTER '{CLICKHOUSE_CLUSTER}'"
)
PERSONS_TABLE = "person"
PERSONS_TABLE_BASE_SQL = """
CREATE TABLE IF NOT EXISTS {table_name} ON CLUSTER '{cluster}'
(
id UUID,
created_at DateTime64,
team_id Int64,
properties VARCHAR,
is_identified Int8,
is_deleted Int8 DEFAULT 0
{extra_fields}
) ENGINE = {engine}
"""
PERSONS_TABLE_ENGINE = lambda: ReplacingMergeTree(PERSONS_TABLE, ver="_timestamp")
PERSONS_TABLE_SQL = lambda: (
PERSONS_TABLE_BASE_SQL
+ """Order By (team_id, id)
{storage_policy}
"""
).format(
table_name=PERSONS_TABLE,
cluster=CLICKHOUSE_CLUSTER,
engine=PERSONS_TABLE_ENGINE(),
extra_fields=KAFKA_COLUMNS,
storage_policy=STORAGE_POLICY(),
)
KAFKA_PERSONS_TABLE_SQL = lambda: PERSONS_TABLE_BASE_SQL.format(
table_name="kafka_" + PERSONS_TABLE, cluster=CLICKHOUSE_CLUSTER, engine=kafka_engine(KAFKA_PERSON), extra_fields="",
)
# You must include the database here because of a bug in clickhouse
# related to https://github.com/ClickHouse/ClickHouse/issues/10471
PERSONS_TABLE_MV_SQL = """
CREATE MATERIALIZED VIEW {table_name}_mv ON CLUSTER '{cluster}'
TO {database}.{table_name}
AS SELECT
id,
created_at,
team_id,
properties,
is_identified,
is_deleted,
_timestamp,
_offset
FROM {database}.kafka_{table_name}
""".format(
table_name=PERSONS_TABLE, cluster=CLICKHOUSE_CLUSTER, database=CLICKHOUSE_DATABASE,
)
GET_LATEST_PERSON_SQL = """
SELECT * FROM person JOIN (
SELECT id, max(_timestamp) as _timestamp, max(is_deleted) as is_deleted
FROM person
WHERE team_id = %(team_id)s
GROUP BY id
) as person_max ON person.id = person_max.id AND person._timestamp = person_max._timestamp
WHERE team_id = %(team_id)s
AND person_max.is_deleted = 0
{query}
"""
GET_LATEST_PERSON_ID_SQL = """
(select id from (
{latest_person_sql}
))
""".format(
latest_person_sql=GET_LATEST_PERSON_SQL
)
#
# person_distinct_id table - use this still in queries, but this will eventually get removed.
#
PERSONS_DISTINCT_ID_TABLE = "person_distinct_id"
PERSONS_DISTINCT_ID_TABLE_BASE_SQL = """
CREATE TABLE IF NOT EXISTS {table_name} ON CLUSTER '{cluster}'
(
distinct_id VARCHAR,
person_id UUID,
team_id Int64,
_sign Int8 DEFAULT 1,
is_deleted Int8 ALIAS if(_sign==-1, 1, 0)
{extra_fields}
) ENGINE = {engine}
"""
PERSONS_DISTINCT_ID_TABLE_SQL = lambda: (
PERSONS_DISTINCT_ID_TABLE_BASE_SQL
+ """Order By (team_id, distinct_id, person_id)
{storage_policy}
"""
).format(
table_name=PERSONS_DISTINCT_ID_TABLE,
cluster=CLICKHOUSE_CLUSTER,
engine=CollapsingMergeTree(PERSONS_DISTINCT_ID_TABLE, ver="_sign"),
extra_fields=KAFKA_COLUMNS,
storage_policy=STORAGE_POLICY(),
)
# :KLUDGE: We default is_deleted to 0 for backwards compatibility for when we drop `is_deleted` from message schema.
# Can't make DEFAULT if(_sign==-1, 1, 0) because Cyclic aliases error.
KAFKA_PERSONS_DISTINCT_ID_TABLE_SQL = lambda: """
CREATE TABLE {table_name} ON CLUSTER '{cluster}'
(
distinct_id VARCHAR,
person_id UUID,
team_id Int64,
_sign Nullable(Int8),
is_deleted Nullable(Int8)
) ENGINE = {engine}
""".format(
table_name="kafka_" + PERSONS_DISTINCT_ID_TABLE,
cluster=CLICKHOUSE_CLUSTER,
engine=kafka_engine(KAFKA_PERSON_UNIQUE_ID),
)
# You must include the database here because of a bug in clickhouse
# related to https://github.com/ClickHouse/ClickHouse/issues/10471
PERSONS_DISTINCT_ID_TABLE_MV_SQL = """
CREATE MATERIALIZED VIEW {table_name}_mv ON CLUSTER '{cluster}'
TO {database}.{table_name}
AS SELECT
distinct_id,
person_id,
team_id,
coalesce(_sign, if(is_deleted==0, 1, -1)) AS _sign,
_timestamp,
_offset
FROM {database}.kafka_{table_name}
""".format(
table_name=PERSONS_DISTINCT_ID_TABLE, cluster=CLICKHOUSE_CLUSTER, database=CLICKHOUSE_DATABASE,
)
#
# person_distinct_ids2 - new table!
#
PERSON_DISTINCT_ID2_TABLE = "person_distinct_id2"
PERSON_DISTINCT_ID2_TABLE_BASE_SQL = """
CREATE TABLE IF NOT EXISTS {table_name} ON CLUSTER '{cluster}'
(
team_id Int64,
distinct_id VARCHAR,
person_id UUID,
is_deleted Int8,
version Int64 DEFAULT 1
{extra_fields}
) ENGINE = {engine}
"""
PERSON_DISTINCT_ID2_TABLE_ENGINE = lambda: ReplacingMergeTree(PERSON_DISTINCT_ID2_TABLE, ver="version")
PERSON_DISTINCT_ID2_TABLE_SQL = lambda: (
PERSON_DISTINCT_ID2_TABLE_BASE_SQL
+ """
ORDER BY (team_id, distinct_id)
SETTINGS index_granularity = 512
"""
).format(
table_name=PERSON_DISTINCT_ID2_TABLE,
cluster=CLICKHOUSE_CLUSTER,
engine=PERSON_DISTINCT_ID2_TABLE_ENGINE(),
extra_fields=KAFKA_COLUMNS + "\n, _partition UInt64",
)
KAFKA_PERSON_DISTINCT_ID2_TABLE_SQL = lambda: PERSON_DISTINCT_ID2_TABLE_BASE_SQL.format(
table_name="kafka_" + PERSON_DISTINCT_ID2_TABLE,
cluster=CLICKHOUSE_CLUSTER,
engine=kafka_engine(KAFKA_PERSON_DISTINCT_ID),
extra_fields="",
)
# You must include the database here because of a bug in clickhouse
# related to https://github.com/ClickHouse/ClickHouse/issues/10471
PERSON_DISTINCT_ID2_MV_SQL = """
CREATE MATERIALIZED VIEW {table_name}_mv ON CLUSTER '{cluster}'
TO {database}.{table_name}
AS SELECT
team_id,
distinct_id,
person_id,
is_deleted,
version,
_timestamp,
_offset,
_partition
FROM {database}.kafka_{table_name}
""".format(
table_name=PERSON_DISTINCT_ID2_TABLE, cluster=CLICKHOUSE_CLUSTER, database=CLICKHOUSE_DATABASE,
)
#
# Static Cohort
#
PERSON_STATIC_COHORT_TABLE = "person_static_cohort"
PERSON_STATIC_COHORT_BASE_SQL = """
CREATE TABLE IF NOT EXISTS {table_name} ON CLUSTER '{cluster}'
(
id UUID,
person_id UUID,
cohort_id Int64,
team_id Int64
{extra_fields}
) ENGINE = {engine}
"""
PERSON_STATIC_COHORT_TABLE_ENGINE = lambda: ReplacingMergeTree(PERSON_STATIC_COHORT_TABLE, ver="_timestamp")
PERSON_STATIC_COHORT_TABLE_SQL = lambda: (
PERSON_STATIC_COHORT_BASE_SQL
+ """Order By (team_id, cohort_id, person_id, id)
{storage_policy}
"""
).format(
table_name=PERSON_STATIC_COHORT_TABLE,
cluster=CLICKHOUSE_CLUSTER,
engine=PERSON_STATIC_COHORT_TABLE_ENGINE(),
storage_policy=STORAGE_POLICY(),
extra_fields=KAFKA_COLUMNS,
)
TRUNCATE_PERSON_STATIC_COHORT_TABLE_SQL = (
f"TRUNCATE TABLE IF EXISTS {PERSON_STATIC_COHORT_TABLE} ON CLUSTER '{CLICKHOUSE_CLUSTER}'"
)
INSERT_PERSON_STATIC_COHORT = (
f"INSERT INTO {PERSON_STATIC_COHORT_TABLE} (id, person_id, cohort_id, team_id, _timestamp) VALUES"
)
#
# Other queries
#
GET_TEAM_PERSON_DISTINCT_IDS = """
SELECT distinct_id, argMax(person_id, _timestamp) as person_id
FROM (
SELECT distinct_id, person_id, max(_timestamp) as _timestamp
FROM person_distinct_id
WHERE team_id = %(team_id)s %(extra_where)s
GROUP BY person_id, distinct_id, team_id
HAVING max(is_deleted) = 0
)
GROUP BY distinct_id
"""
# Query to query distinct ids using the new table, will be used if 0003_fill_person_distinct_id2 migration is complete
GET_TEAM_PERSON_DISTINCT_IDS_NEW_TABLE = """
SELECT distinct_id, argMax(person_id, version) as person_id
FROM person_distinct_id2
WHERE team_id = %(team_id)s %(extra_where)s
GROUP BY distinct_id
HAVING argMax(is_deleted, version) = 0
"""
GET_PERSON_IDS_BY_FILTER = """
SELECT DISTINCT p.id
FROM ({latest_person_sql}) AS p
INNER JOIN ({GET_TEAM_PERSON_DISTINCT_IDS}) AS pdi ON p.id = pdi.person_id
WHERE team_id = %(team_id)s
{distinct_query}
{limit}
{offset}
""".format(
latest_person_sql=GET_LATEST_PERSON_SQL,
distinct_query="{distinct_query}",
limit="{limit}",
offset="{offset}",
GET_TEAM_PERSON_DISTINCT_IDS="{GET_TEAM_PERSON_DISTINCT_IDS}",
)
INSERT_PERSON_SQL = """
INSERT INTO person (id, created_at, team_id, properties, is_identified, _timestamp, _offset, is_deleted) SELECT %(id)s, %(created_at)s, %(team_id)s, %(properties)s, %(is_identified)s, %(_timestamp)s, 0, 0
"""
INSERT_PERSON_DISTINCT_ID = """
INSERT INTO person_distinct_id SELECT %(distinct_id)s, %(person_id)s, %(team_id)s, %(_sign)s, now(), 0 VALUES
"""
INSERT_PERSON_DISTINCT_ID2 = """
INSERT INTO person_distinct_id2 (distinct_id, person_id, team_id, is_deleted, version, _timestamp, _offset, _partition) SELECT %(distinct_id)s, %(person_id)s, %(team_id)s, 0, %(version)s, now(), 0, 0 VALUES
"""
DELETE_PERSON_BY_ID = """
INSERT INTO person (id, created_at, team_id, properties, is_identified, _timestamp, _offset, is_deleted) SELECT %(id)s, %(created_at)s, %(team_id)s, %(properties)s, %(is_identified)s, %(_timestamp)s, 0, 1
"""
DELETE_PERSON_EVENTS_BY_ID = """
ALTER TABLE events DELETE
WHERE distinct_id IN (
SELECT distinct_id FROM person_distinct_id WHERE person_id=%(id)s AND team_id = %(team_id)s
)
AND team_id = %(team_id)s
"""
INSERT_COHORT_ALL_PEOPLE_THROUGH_PERSON_ID = """
INSERT INTO {cohort_table} SELECT generateUUIDv4(), actor_id, %(cohort_id)s, %(team_id)s, %(_timestamp)s, 0 FROM (
SELECT actor_id FROM ({query})
)
"""
INSERT_COHORT_ALL_PEOPLE_SQL = """
INSERT INTO {cohort_table} SELECT generateUUIDv4(), id, %(cohort_id)s, %(team_id)s, %(_timestamp)s, 0 FROM (
SELECT id FROM (
{latest_person_sql}
) as person INNER JOIN (
SELECT person_id, distinct_id FROM ({GET_TEAM_PERSON_DISTINCT_IDS}) WHERE person_id IN ({content_sql})
) as pdi ON person.id = pdi.person_id
WHERE team_id = %(team_id)s
GROUP BY id
)
"""
GET_DISTINCT_IDS_BY_PROPERTY_SQL = """
SELECT distinct_id
FROM (
{GET_TEAM_PERSON_DISTINCT_IDS}
)
WHERE person_id IN
(
SELECT id
FROM (
SELECT id, argMax(properties, person._timestamp) as properties, max(is_deleted) as is_deleted
FROM person
WHERE team_id = %(team_id)s
GROUP BY id
HAVING is_deleted = 0
)
WHERE {filters}
)
"""
GET_DISTINCT_IDS_BY_PERSON_ID_FILTER = """
SELECT distinct_id
FROM ({GET_TEAM_PERSON_DISTINCT_IDS})
WHERE {filters}
"""
GET_PERSON_PROPERTIES_COUNT = """
SELECT tupleElement(keysAndValues, 1) as key, count(*) as count
FROM person
ARRAY JOIN JSONExtractKeysAndValuesRaw(properties) as keysAndValues
WHERE team_id = %(team_id)s
GROUP BY tupleElement(keysAndValues, 1)
ORDER BY count DESC, key ASC
"""
GET_ACTORS_FROM_EVENT_QUERY = """
SELECT
{id_field} AS actor_id
{matching_events_select_statement}
FROM ({events_query})
GROUP BY actor_id
{limit}
{offset}
"""
COMMENT_DISTINCT_ID_COLUMN_SQL = (
lambda: f"ALTER TABLE person_distinct_id ON CLUSTER '{CLICKHOUSE_CLUSTER}' COMMENT COLUMN distinct_id 'skip_0003_fill_person_distinct_id2'"
)
SELECT_PERSON_PROP_VALUES_SQL = """
SELECT
value,
count(value)
FROM (
SELECT
{property_field} as value
FROM
person
WHERE
team_id = %(team_id)s AND
is_deleted = 0 AND
{property_field} IS NOT NULL AND
{property_field} != ''
ORDER BY id DESC
LIMIT 100000
)
GROUP BY value
ORDER BY count(value) DESC
LIMIT 20
"""
SELECT_PERSON_PROP_VALUES_SQL_WITH_FILTER = """
SELECT
value,
count(value)
FROM (
SELECT
{property_field} as value
FROM
person
WHERE
team_id = %(team_id)s AND
is_deleted = 0 AND
{property_field} ILIKE %(value)s
ORDER BY id DESC
LIMIT 100000
)
GROUP BY value
ORDER BY count(value) DESC
LIMIT 20
"""
| [
1,
529,
276,
1112,
420,
29958,
29893,
3825,
1188,
29914,
2490,
29882,
468,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
321,
29872,
29889,
3808,
8697,
29889,
2850,
29889,
3808,
8697,
1053,
476,
5098,
29968,
29909,
29918,
15032,
5005,
3059,
29892,
6850,
1955,
10461,
29918,
29925,
5607,
2965,
29979,
29892,
413,
20817,
29918,
10599,
13,
3166,
321,
29872,
29889,
3808,
8697,
29889,
2850,
29889,
2371,
29918,
996,
1475,
1053,
1530,
14128,
292,
15836,
479,
9643,
29892,
10088,
433,
3277,
15836,
479,
9643,
13,
3166,
321,
29872,
29889,
28510,
29918,
4645,
29889,
3332,
1199,
1053,
476,
5098,
29968,
29909,
29918,
13171,
3094,
29892,
476,
5098,
29968,
29909,
29918,
13171,
3094,
29918,
4571,
1254,
28852,
29918,
1367,
29892,
476,
5098,
29968,
29909,
29918,
13171,
3094,
29918,
3904,
29902,
11144,
29918,
1367,
13,
3166,
1400,
29882,
468,
29889,
11027,
1053,
17332,
2965,
29968,
8187,
17171,
29918,
6154,
17321,
1001,
29892,
17332,
2965,
29968,
8187,
17171,
29918,
25832,
27982,
13,
13,
5659,
3904,
29907,
3040,
29918,
13171,
3094,
29918,
21009,
29918,
4176,
353,
285,
29908,
5659,
3904,
29907,
3040,
10911,
10762,
28731,
2022,
6732,
17332,
17321,
1001,
22372,
6154,
2965,
29968,
8187,
17171,
29918,
6154,
17321,
1001,
10162,
29908,
13,
13,
29928,
29366,
29918,
13171,
3094,
29918,
21009,
29918,
4176,
353,
285,
29908,
29928,
29366,
10911,
10762,
28731,
2022,
6732,
17332,
17321,
1001,
22372,
6154,
2965,
29968,
8187,
17171,
29918,
6154,
17321,
1001,
10162,
29908,
13,
13,
5659,
3904,
29907,
3040,
29918,
13171,
3094,
29918,
4571,
1254,
28852,
29918,
1367,
29918,
21009,
29918,
4176,
353,
285,
29908,
5659,
3904,
29907,
3040,
10911,
10762,
28731,
2022,
29918,
5721,
5562,
29918,
333,
6732,
17332,
17321,
1001,
22372,
6154,
2965,
29968,
8187,
17171,
29918,
6154,
17321,
1001,
10162,
29908,
13,
5659,
3904,
29907,
3040,
29918,
13171,
3094,
29918,
4571,
1254,
28852,
29918,
1367,
29906,
29918,
21009,
29918,
4176,
353,
313,
13,
1678,
285,
29908,
5659,
3904,
29907,
3040,
10911,
10762,
28731,
2022,
29918,
5721,
5562,
29918,
333,
29906,
6732,
17332,
17321,
1001,
22372,
6154,
2965,
29968,
8187,
17171,
29918,
6154,
17321,
1001,
10162,
29908,
13,
29897,
13,
13,
13171,
3094,
29903,
29918,
21009,
353,
376,
10532,
29908,
13,
13,
13171,
3094,
29903,
29918,
21009,
29918,
25416,
29918,
4176,
353,
9995,
13,
27045,
10911,
10762,
6058,
28731,
426,
2371,
29918,
978,
29913,
6732,
17332,
17321,
1001,
22372,
19594,
10162,
13,
29898,
13,
1678,
1178,
501,
11150,
29892,
13,
1678,
2825,
29918,
271,
12315,
29953,
29946,
29892,
13,
1678,
3815,
29918,
333,
3159,
29953,
29946,
29892,
13,
1678,
4426,
21748,
29892,
13,
1678,
338,
29918,
1693,
2164,
3159,
29947,
29892,
13,
1678,
338,
29918,
311,
22742,
3159,
29947,
22236,
29871,
29900,
13,
1678,
426,
17833,
29918,
9621,
29913,
13,
29897,
382,
9312,
8895,
353,
426,
10599,
29913,
13,
15945,
29908,
13,
13,
13171,
3094,
29903,
29918,
21009,
29918,
1430,
29954,
8895,
353,
14013,
29901,
10088,
433,
3277,
15836,
479,
9643,
29898,
13171,
3094,
29903,
29918,
21009,
29892,
1147,
543,
29918,
16394,
1159,
13,
13171,
3094,
29903,
29918,
21009,
29918,
4176,
353,
14013,
29901,
313,
13,
1678,
349,
1001,
3094,
29903,
29918,
21009,
29918,
25416,
29918,
4176,
13,
1678,
718,
9995,
7514,
2648,
313,
14318,
29918,
333,
29892,
1178,
29897,
13,
29912,
12925,
29918,
22197,
29913,
13,
15945,
29908,
13,
467,
4830,
29898,
13,
1678,
1591,
29918,
978,
29922,
13171,
3094,
29903,
29918,
21009,
29892,
13,
1678,
9867,
29922,
6154,
2965,
29968,
8187,
17171,
29918,
6154,
17321,
1001,
29892,
13,
1678,
6012,
29922,
13171,
3094,
29903,
29918,
21009,
29918,
1430,
29954,
8895,
3285,
13,
1678,
4805,
29918,
9621,
29922,
29968,
5098,
29968,
29909,
29918,
15032,
5005,
3059,
29892,
13,
1678,
8635,
29918,
22197,
29922,
1254,
1955,
10461,
29918,
29925,
5607,
2965,
29979,
3285,
13,
29897,
13,
13,
29968,
5098,
29968,
29909,
29918,
13171,
3094,
29903,
29918,
21009,
29918,
4176,
353,
14013,
29901,
349,
1001,
3094,
29903,
29918,
21009,
29918,
25416,
29918,
4176,
29889,
4830,
29898,
13,
1678,
1591,
29918,
978,
543,
28510,
27508,
718,
349,
1001,
3094,
29903,
29918,
21009,
29892,
9867,
29922,
6154,
2965,
29968,
8187,
17171,
29918,
6154,
17321,
1001,
29892,
6012,
29922,
28510,
29918,
10599,
29898,
29968,
5098,
29968,
29909,
29918,
13171,
3094,
511,
4805,
29918,
9621,
543,
613,
13,
29897,
13,
13,
29937,
887,
1818,
3160,
278,
2566,
1244,
1363,
310,
263,
6494,
297,
2828,
8697,
13,
29937,
4475,
304,
2045,
597,
3292,
29889,
510,
29914,
4164,
29950,
1709,
29914,
4164,
29950,
1709,
29914,
12175,
29914,
29896,
29900,
29946,
29955,
29896,
13,
13171,
3094,
29903,
29918,
21009,
29918,
29924,
29963,
29918,
4176,
353,
9995,
13,
27045,
341,
1299,
1001,
25758,
26664,
3352,
5473,
29923,
29956,
426,
2371,
29918,
978,
2403,
29324,
6732,
17332,
17321,
1001,
22372,
19594,
10162,
13,
4986,
426,
9803,
1836,
29912,
2371,
29918,
978,
29913,
13,
3289,
5097,
13,
333,
29892,
13,
11600,
29918,
271,
29892,
13,
14318,
29918,
333,
29892,
13,
11330,
29892,
13,
275,
29918,
1693,
2164,
29892,
13,
275,
29918,
311,
22742,
29892,
13,
29918,
16394,
29892,
13,
29918,
10289,
13,
21482,
426,
9803,
1836,
28510,
648,
2371,
29918,
978,
29913,
13,
15945,
1642,
4830,
29898,
13,
1678,
1591,
29918,
978,
29922,
13171,
3094,
29903,
29918,
21009,
29892,
9867,
29922,
6154,
2965,
29968,
8187,
17171,
29918,
6154,
17321,
1001,
29892,
2566,
29922,
6154,
2965,
29968,
8187,
17171,
29918,
25832,
27982,
29892,
13,
29897,
13,
13,
7194,
29918,
29931,
3040,
1254,
29918,
13171,
3094,
29918,
4176,
353,
9995,
13,
6404,
334,
3895,
2022,
8780,
313,
13,
1678,
5097,
1178,
29892,
4236,
7373,
16394,
29897,
408,
903,
16394,
29892,
4236,
29898,
275,
29918,
311,
22742,
29897,
408,
338,
29918,
311,
22742,
13,
1678,
3895,
2022,
13,
1678,
5754,
3815,
29918,
333,
353,
1273,
29898,
14318,
29918,
333,
29897,
29879,
13,
1678,
15345,
6770,
1178,
13,
29897,
408,
2022,
29918,
3317,
6732,
2022,
29889,
333,
353,
2022,
29918,
3317,
29889,
333,
5300,
2022,
3032,
16394,
353,
2022,
29918,
3317,
3032,
16394,
13,
22043,
3815,
29918,
333,
353,
1273,
29898,
14318,
29918,
333,
29897,
29879,
13,
29871,
5300,
2022,
29918,
3317,
29889,
275,
29918,
311,
22742,
353,
29871,
29900,
13,
29871,
426,
1972,
29913,
13,
15945,
29908,
13,
13,
7194,
29918,
29931,
3040,
1254,
29918,
13171,
3094,
29918,
1367,
29918,
4176,
353,
9995,
13,
29898,
2622,
1178,
515,
313,
13,
1678,
426,
12333,
29918,
10532,
29918,
2850,
29913,
13,
876,
13,
15945,
1642,
4830,
29898,
13,
1678,
9281,
29918,
10532,
29918,
2850,
29922,
7194,
29918,
29931,
3040,
1254,
29918,
13171,
3094,
29918,
4176,
13,
29897,
13,
13,
29937,
13,
29937,
2022,
29918,
5721,
5562,
29918,
333,
1591,
448,
671,
445,
1603,
297,
9365,
29892,
541,
445,
674,
10201,
679,
6206,
29889,
13,
29937,
13,
13,
13,
13171,
3094,
29903,
29918,
4571,
1254,
28852,
29918,
1367,
29918,
21009,
353,
376,
10532,
29918,
5721,
5562,
29918,
333,
29908,
13,
13,
13171,
3094,
29903,
29918,
4571,
1254,
28852,
29918,
1367,
29918,
21009,
29918,
25416,
29918,
4176,
353,
9995,
13,
27045,
10911,
10762,
6058,
28731,
426,
2371,
29918,
978,
29913,
6732,
17332,
17321,
1001,
22372,
19594,
10162,
13,
29898,
13,
1678,
8359,
29918,
333,
21748,
29892,
13,
1678,
2022,
29918,
333,
501,
11150,
29892,
13,
1678,
3815,
29918,
333,
3159,
29953,
29946,
29892,
13,
1678,
903,
4530,
3159,
29947,
22236,
29871,
29896,
29892,
13,
1678,
338,
29918,
311,
22742,
3159,
29947,
319,
5265,
3289,
565,
7373,
4530,
1360,
29899,
29896,
29892,
29871,
29896,
29892,
29871,
29900,
29897,
13,
1678,
426,
17833,
29918,
9621,
29913,
13,
29897,
382,
9312,
8895,
353,
426,
10599,
29913,
13,
15945,
29908,
13,
13,
13171,
3094,
29903,
29918,
4571,
1254,
28852,
29918,
1367,
29918,
21009,
29918,
4176,
353,
14013,
29901,
313,
13,
1678,
349,
1001,
3094,
29903,
29918,
4571,
1254,
28852,
29918,
1367,
29918,
21009,
29918,
25416,
29918,
4176,
13,
1678,
718,
9995,
7514,
2648,
313,
14318,
29918,
333,
29892,
8359,
29918,
333,
29892,
2022,
29918,
333,
29897,
13,
29912,
12925,
29918,
22197,
29913,
13,
15945,
29908,
13,
467,
4830,
29898,
13,
1678,
1591,
29918,
978,
29922,
13171,
3094,
29903,
29918,
4571,
1254,
28852,
29918,
1367,
29918,
21009,
29892,
13,
1678,
9867,
29922,
6154,
2965,
29968,
8187,
17171,
29918,
6154,
17321,
1001,
29892,
13,
1678,
6012,
29922,
1625,
14128,
292,
15836,
479,
9643,
29898,
13171,
3094,
29903,
29918,
4571,
1254,
28852,
29918,
1367,
29918,
21009,
29892,
1147,
543,
29918,
4530,
4968,
13,
1678,
4805,
29918,
9621,
29922,
29968,
5098,
29968,
29909,
29918,
15032,
5005,
3059,
29892,
13,
1678,
8635,
29918,
22197,
29922,
1254,
1955,
10461,
29918,
29925,
5607,
2965,
29979,
3285,
13,
29897,
13,
13,
29937,
584,
29968,
29931,
15789,
1692,
29901,
1334,
2322,
338,
29918,
311,
22742,
304,
29871,
29900,
363,
28953,
24521,
363,
746,
591,
5768,
421,
275,
29918,
311,
22742,
29952,
515,
2643,
10938,
29889,
13,
29937,
1678,
1815,
29915,
29873,
1207,
22236,
565,
7373,
4530,
1360,
29899,
29896,
29892,
29871,
29896,
29892,
29871,
29900,
29897,
1363,
8045,
28746,
14430,
2129,
1059,
29889,
13,
29968,
5098,
29968,
29909,
29918,
13171,
3094,
29903,
29918,
4571,
1254,
28852,
29918,
1367,
29918,
21009,
29918,
4176,
353,
14013,
29901,
9995,
13,
27045,
10911,
426,
2371,
29918,
978,
29913,
6732,
17332,
17321,
1001,
22372,
19594,
10162,
13,
29898,
13,
1678,
8359,
29918,
333,
21748,
29892,
13,
1678,
2022,
29918,
333,
501,
11150,
29892,
13,
1678,
3815,
29918,
333,
3159,
29953,
29946,
29892,
13,
1678,
903,
4530,
19014,
519,
29898,
2928,
29947,
511,
13,
1678,
338,
29918,
311,
22742,
19014,
519,
29898,
2928,
29947,
29897,
13,
29897,
382,
9312,
8895,
353,
426,
10599,
29913,
13,
15945,
1642,
4830,
29898,
13,
1678,
1591,
29918,
978,
543,
28510,
27508,
718,
349,
1001,
3094,
29903,
29918,
4571,
1254,
28852,
29918,
1367,
29918,
21009,
29892,
13,
1678,
9867,
29922,
6154,
2965,
29968,
8187,
17171,
29918,
6154,
17321,
1001,
29892,
13,
1678,
6012,
29922,
28510,
29918,
10599,
29898,
29968,
5098,
29968,
29909,
29918,
13171,
3094,
29918,
3904,
29902,
11144,
29918,
1367,
511,
13,
29897,
13,
13,
29937,
887,
1818,
3160,
278,
2566,
1244,
1363,
310,
263,
6494,
297,
2828,
8697,
13,
29937,
4475,
304,
2045,
597,
3292,
29889,
510,
29914,
4164,
29950,
1709,
29914,
4164,
29950,
1709,
29914,
12175,
29914,
29896,
29900,
29946,
29955,
29896,
13,
13171,
3094,
29903,
29918,
4571,
1254,
28852,
29918,
1367,
29918,
21009,
29918,
29924,
29963,
29918,
4176,
353,
9995,
13,
27045,
341,
1299,
1001,
25758,
26664,
3352,
5473,
29923,
29956,
426,
2371,
29918,
978,
2403,
29324,
6732,
17332,
17321,
1001,
22372,
19594,
10162,
13,
4986,
426,
9803,
1836,
29912,
2371,
29918,
978,
29913,
13,
3289,
5097,
13,
5721,
5562,
29918,
333,
29892,
13,
10532,
29918,
333,
29892,
13,
14318,
29918,
333,
29892,
13,
1111,
2122,
346,
7373,
4530,
29892,
565,
29898,
275,
29918,
311,
22742,
1360,
29900,
29892,
29871,
29896,
29892,
448,
29896,
876,
3339,
903,
4530,
29892,
13,
29918,
16394,
29892,
13,
29918,
10289,
13,
21482,
426,
9803,
1836,
28510,
648,
2371,
29918,
978,
29913,
13,
15945,
1642,
4830,
29898,
13,
1678,
1591,
29918,
978,
29922,
13171,
3094,
29903,
29918,
4571,
1254,
28852,
29918,
1367,
29918,
21009,
29892,
9867,
29922,
6154,
2965,
29968,
8187,
17171,
29918,
6154,
17321,
1001,
29892,
2566,
29922,
6154,
2965,
29968,
8187,
17171,
29918,
25832,
27982,
29892,
13,
29897,
13,
13,
29937,
13,
29937,
2022,
29918,
5721,
5562,
29918,
4841,
29906,
448,
716,
1591,
29991,
13,
29937,
13,
13,
13171,
3094,
29918,
4571,
1254,
28852,
29918,
1367,
29906,
29918,
21009,
353,
376,
10532,
29918,
5721,
5562,
29918,
333,
29906,
29908,
13,
13,
13171,
3094,
29918,
4571,
1254,
28852,
29918,
1367,
29906,
29918,
21009,
29918,
25416,
29918,
4176,
353,
9995,
13,
27045,
10911,
10762,
6058,
28731,
426,
2371,
29918,
978,
29913,
6732,
17332,
17321,
1001,
22372,
19594,
10162,
13,
29898,
13,
1678,
3815,
29918,
333,
3159,
29953,
29946,
29892,
13,
1678,
8359,
29918,
333,
21748,
29892,
13,
1678,
2022,
29918,
333,
501,
11150,
29892,
13,
1678,
338,
29918,
311,
22742,
3159,
29947,
29892,
13,
1678,
1873,
3159,
29953,
29946,
22236,
29871,
29896,
13,
1678,
426,
17833,
29918,
9621,
29913,
13,
29897,
382,
9312,
8895,
353,
426,
10599,
29913,
13,
15945,
29908,
13,
13,
13171,
3094,
29918,
4571,
1254,
28852,
29918,
1367,
29906,
29918,
21009,
29918,
1430,
29954,
8895,
353,
14013,
29901,
10088,
433,
3277,
15836,
479,
9643,
29898,
13171,
3094,
29918,
4571,
1254,
28852,
29918,
1367,
29906,
29918,
21009,
29892,
1147,
543,
3259,
1159,
13,
13171,
3094,
29918,
4571,
1254,
28852,
29918,
1367,
29906,
29918,
21009,
29918,
4176,
353,
14013,
29901,
313,
13,
1678,
349,
1001,
3094,
29918,
4571,
1254,
28852,
29918,
1367,
29906,
29918,
21009,
29918,
25416,
29918,
4176,
13,
1678,
718,
9995,
13,
1678,
15606,
6770,
313,
14318,
29918,
333,
29892,
8359,
29918,
333,
29897,
13,
1678,
11368,
29911,
4214,
29903,
2380,
29918,
629,
273,
1070,
537,
353,
29871,
29945,
29896,
29906,
13,
1678,
9995,
13,
467,
4830,
29898,
13,
1678,
1591,
29918,
978,
29922,
13171,
3094,
29918,
4571,
1254,
28852,
29918,
1367,
29906,
29918,
21009,
29892,
13,
1678,
9867,
29922,
6154,
2965,
29968,
8187,
17171,
29918,
6154,
17321,
1001,
29892,
13,
1678,
6012,
29922,
13171,
3094,
29918,
4571,
1254,
28852,
29918,
1367,
29906,
29918,
21009,
29918,
1430,
29954,
8895,
3285,
13,
1678,
4805,
29918,
9621,
29922,
29968,
5098,
29968,
29909,
29918,
15032,
5005,
3059,
718,
6634,
29876,
29892,
903,
16707,
501,
2928,
29953,
29946,
613,
13,
29897,
13,
13,
29968,
5098,
29968,
29909,
29918,
13171,
3094,
29918,
4571,
1254,
28852,
29918,
1367,
29906,
29918,
21009,
29918,
4176,
353,
14013,
29901,
349,
1001,
3094,
29918,
4571,
1254,
28852,
29918,
1367,
29906,
29918,
21009,
29918,
25416,
29918,
4176,
29889,
4830,
29898,
13,
1678,
1591,
29918,
978,
543,
28510,
27508,
718,
349,
1001,
3094,
29918,
4571,
1254,
28852,
29918,
1367,
29906,
29918,
21009,
29892,
13,
1678,
9867,
29922,
6154,
2965,
29968,
8187,
17171,
29918,
6154,
17321,
1001,
29892,
13,
1678,
6012,
29922,
28510,
29918,
10599,
29898,
29968,
5098,
29968,
29909,
29918,
13171,
3094,
29918,
4571,
1254,
28852,
29918,
1367,
511,
13,
1678,
4805,
29918,
9621,
543,
613,
13,
29897,
13,
13,
29937,
887,
1818,
3160,
278,
2566,
1244,
1363,
310,
263,
6494,
297,
2828,
8697,
13,
29937,
4475,
304,
2045,
597,
3292,
29889,
510,
29914,
4164,
29950,
1709,
29914,
4164,
29950,
1709,
29914,
12175,
29914,
29896,
29900,
29946,
29955,
29896,
13,
13171,
3094,
29918,
4571,
1254,
28852,
29918,
1367,
29906,
29918,
29924,
29963,
29918,
4176,
353,
9995,
13,
27045,
341,
1299,
1001,
25758,
26664,
3352,
5473,
29923,
29956,
426,
2371,
29918,
978,
2403,
29324,
6732,
17332,
17321,
1001,
22372,
19594,
10162,
13,
4986,
426,
9803,
1836,
29912,
2371,
29918,
978,
29913,
13,
3289,
5097,
13,
14318,
29918,
333,
29892,
13,
5721,
5562,
29918,
333,
29892,
13,
10532,
29918,
333,
29892,
13,
275,
29918,
311,
22742,
29892,
13,
3259,
29892,
13,
29918,
16394,
29892,
13,
29918,
10289,
29892,
13,
29918,
16707,
13,
21482,
426,
9803,
1836,
28510,
648,
2371,
29918,
978,
29913,
13,
15945,
1642,
4830,
29898,
13,
1678,
1591,
29918,
978,
29922,
13171,
3094,
29918,
4571,
1254,
28852,
29918,
1367,
29906,
29918,
21009,
29892,
9867,
29922,
6154,
2965,
29968,
8187,
17171,
29918,
6154,
17321,
1001,
29892,
2566,
29922,
6154,
2965,
29968,
8187,
17171,
29918,
25832,
27982,
29892,
13,
29897,
13,
13,
29937,
13,
29937,
624,
2454,
315,
1148,
441,
13,
29937,
13,
13,
13171,
3094,
29918,
17816,
2965,
29918,
3217,
29950,
8476,
29918,
21009,
353,
376,
10532,
29918,
7959,
29918,
1111,
29882,
441,
29908,
13,
13171,
3094,
29918,
17816,
2965,
29918,
3217,
29950,
8476,
29918,
25416,
29918,
4176,
353,
9995,
13,
27045,
10911,
10762,
6058,
28731,
426,
2371,
29918,
978,
29913,
6732,
17332,
17321,
1001,
22372,
19594,
10162,
13,
29898,
13,
1678,
1178,
501,
11150,
29892,
13,
1678,
2022,
29918,
333,
501,
11150,
29892,
13,
1678,
16165,
441,
29918,
333,
3159,
29953,
29946,
29892,
13,
1678,
3815,
29918,
333,
3159,
29953,
29946,
13,
1678,
426,
17833,
29918,
9621,
29913,
13,
29897,
382,
9312,
8895,
353,
426,
10599,
29913,
13,
15945,
29908,
13,
13,
13171,
3094,
29918,
17816,
2965,
29918,
3217,
29950,
8476,
29918,
21009,
29918,
1430,
29954,
8895,
353,
14013,
29901,
10088,
433,
3277,
15836,
479,
9643,
29898,
13171,
3094,
29918,
17816,
2965,
29918,
3217,
29950,
8476,
29918,
21009,
29892,
1147,
543,
29918,
16394,
1159,
13,
13171,
3094,
29918,
17816,
2965,
29918,
3217,
29950,
8476,
29918,
21009,
29918,
4176,
353,
14013,
29901,
313,
13,
1678,
349,
1001,
3094,
29918,
17816,
2965,
29918,
3217,
29950,
8476,
29918,
25416,
29918,
4176,
13,
1678,
718,
9995,
7514,
2648,
313,
14318,
29918,
333,
29892,
16165,
441,
29918,
333,
29892,
2022,
29918,
333,
29892,
1178,
29897,
13,
29912,
12925,
29918,
22197,
29913,
13,
15945,
29908,
13,
467,
4830,
29898,
13,
1678,
1591,
29918,
978,
29922,
13171,
3094,
29918,
17816,
2965,
29918,
3217,
29950,
8476,
29918,
21009,
29892,
13,
1678,
9867,
29922,
6154,
2965,
29968,
8187,
17171,
29918,
6154,
17321,
1001,
29892,
13,
1678,
6012,
29922,
13171,
3094,
29918,
17816,
2965,
29918,
3217,
29950,
8476,
29918,
21009,
29918,
1430,
29954,
8895,
3285,
13,
1678,
8635,
29918,
22197,
29922,
1254,
1955,
10461,
29918,
29925,
5607,
2965,
29979,
3285,
13,
1678,
4805,
29918,
9621,
29922,
29968,
5098,
29968,
29909,
29918,
15032,
5005,
3059,
29892,
13,
29897,
13,
13,
5659,
3904,
29907,
3040,
29918,
13171,
3094,
29918,
17816,
2965,
29918,
3217,
29950,
8476,
29918,
21009,
29918,
4176,
353,
313,
13,
1678,
285,
29908,
5659,
3904,
29907,
3040,
10911,
10762,
28731,
426,
13171,
3094,
29918,
17816,
2965,
29918,
3217,
29950,
8476,
29918,
21009,
29913,
6732,
17332,
17321,
1001,
22372,
6154,
2965,
29968,
8187,
17171,
29918,
6154,
17321,
1001,
10162,
29908,
13,
29897,
13,
13,
19460,
29918,
13171,
3094,
29918,
17816,
2965,
29918,
3217,
29950,
8476,
353,
313,
13,
1678,
285,
29908,
19460,
11646,
426,
13171,
3094,
29918,
17816,
2965,
29918,
3217,
29950,
8476,
29918,
21009,
29913,
313,
333,
29892,
2022,
29918,
333,
29892,
16165,
441,
29918,
333,
29892,
3815,
29918,
333,
29892,
903,
16394,
29897,
15673,
29908,
13,
29897,
13,
13,
29937,
13,
29937,
5901,
9365,
13,
29937,
13,
13,
7194,
29918,
4330,
5194,
29918,
13171,
3094,
29918,
4571,
1254,
28852,
29918,
1367,
29903,
353,
9995,
13,
6404,
8359,
29918,
333,
29892,
1852,
7976,
29898,
10532,
29918,
333,
29892,
903,
16394,
29897,
408,
2022,
29918,
333,
13,
21482,
313,
13,
1678,
5097,
8359,
29918,
333,
29892,
2022,
29918,
333,
29892,
4236,
7373,
16394,
29897,
408,
903,
16394,
13,
1678,
3895,
2022,
29918,
5721,
5562,
29918,
333,
13,
1678,
5754,
3815,
29918,
333,
353,
1273,
29898,
14318,
29918,
333,
29897,
29879,
1273,
29898,
17833,
29918,
3062,
29897,
29879,
13,
1678,
15345,
6770,
2022,
29918,
333,
29892,
8359,
29918,
333,
29892,
3815,
29918,
333,
13,
1678,
379,
7520,
4214,
4236,
29898,
275,
29918,
311,
22742,
29897,
353,
29871,
29900,
13,
29897,
13,
26284,
6770,
8359,
29918,
333,
13,
15945,
29908,
13,
13,
29937,
13641,
304,
2346,
8359,
18999,
773,
278,
716,
1591,
29892,
674,
367,
1304,
565,
29871,
29900,
29900,
29900,
29941,
29918,
5589,
29918,
10532,
29918,
5721,
5562,
29918,
333,
29906,
20332,
338,
4866,
13,
7194,
29918,
4330,
5194,
29918,
13171,
3094,
29918,
4571,
1254,
28852,
29918,
1367,
29903,
29918,
28577,
29918,
21009,
353,
9995,
13,
6404,
8359,
29918,
333,
29892,
1852,
7976,
29898,
10532,
29918,
333,
29892,
1873,
29897,
408,
2022,
29918,
333,
13,
21482,
2022,
29918,
5721,
5562,
29918,
333,
29906,
13,
22043,
3815,
29918,
333,
353,
1273,
29898,
14318,
29918,
333,
29897,
29879,
1273,
29898,
17833,
29918,
3062,
29897,
29879,
13,
26284,
6770,
8359,
29918,
333,
13,
29950,
7520,
4214,
1852,
7976,
29898,
275,
29918,
311,
22742,
29892,
1873,
29897,
353,
29871,
29900,
13,
15945,
29908,
13,
13,
7194,
29918,
13171,
3094,
29918,
1367,
29903,
29918,
22716,
29918,
3738,
29931,
4945,
353,
9995,
13,
6404,
360,
9047,
28852,
282,
29889,
333,
13,
21482,
21313,
12333,
29918,
10532,
29918,
2850,
1800,
3339,
282,
13,
1177,
13865,
8780,
21313,
7194,
29918,
4330,
5194,
29918,
13171,
3094,
29918,
4571,
1254,
28852,
29918,
1367,
29903,
1800,
3339,
282,
6051,
6732,
282,
29889,
333,
353,
282,
6051,
29889,
10532,
29918,
333,
13,
22043,
3815,
29918,
333,
353,
1273,
29898,
14318,
29918,
333,
29897,
29879,
13,
29871,
426,
5721,
5562,
29918,
1972,
29913,
13,
29912,
13400,
29913,
13,
29912,
10289,
29913,
13,
15945,
1642,
4830,
29898,
13,
1678,
9281,
29918,
10532,
29918,
2850,
29922,
7194,
29918,
29931,
3040,
1254,
29918,
13171,
3094,
29918,
4176,
29892,
13,
1678,
8359,
29918,
1972,
10724,
5721,
5562,
29918,
1972,
17671,
13,
1678,
4046,
10724,
13400,
17671,
13,
1678,
9210,
10724,
10289,
17671,
13,
1678,
12354,
29918,
4330,
5194,
29918,
13171,
3094,
29918,
4571,
1254,
28852,
29918,
1367,
29903,
10724,
7194,
29918,
4330,
5194,
29918,
13171,
3094,
29918,
4571,
1254,
28852,
29918,
1367,
29903,
17671,
13,
29897,
13,
13,
19460,
29918,
13171,
3094,
29918,
4176,
353,
9995,
13,
19460,
11646,
2022,
313,
333,
29892,
2825,
29918,
271,
29892,
3815,
29918,
333,
29892,
4426,
29892,
338,
29918,
1693,
2164,
29892,
903,
16394,
29892,
903,
10289,
29892,
338,
29918,
311,
22742,
29897,
5097,
1273,
29898,
333,
29897,
29879,
29892,
1273,
29898,
11600,
29918,
271,
29897,
29879,
29892,
1273,
29898,
14318,
29918,
333,
29897,
29879,
29892,
1273,
29898,
11330,
29897,
29879,
29892,
1273,
29898,
275,
29918,
1693,
2164,
29897,
29879,
29892,
1273,
7373,
16394,
29897,
29879,
29892,
29871,
29900,
29892,
29871,
29900,
13,
15945,
29908,
13,
13,
19460,
29918,
13171,
3094,
29918,
4571,
1254,
28852,
29918,
1367,
353,
9995,
13,
19460,
11646,
2022,
29918,
5721,
5562,
29918,
333,
5097,
1273,
29898,
5721,
5562,
29918,
333,
29897,
29879,
29892,
1273,
29898,
10532,
29918,
333,
29897,
29879,
29892,
1273,
29898,
14318,
29918,
333,
29897,
29879,
29892,
1273,
7373,
4530,
29897,
29879,
29892,
1286,
3285,
29871,
29900,
15673,
13,
15945,
29908,
13,
13,
19460,
29918,
13171,
3094,
29918,
4571,
1254,
28852,
29918,
1367,
29906,
353,
9995,
13,
19460,
11646,
2022,
29918,
5721,
5562,
29918,
333,
29906,
313,
5721,
5562,
29918,
333,
29892,
2022,
29918,
333,
29892,
3815,
29918,
333,
29892,
338,
29918,
311,
22742,
29892,
1873,
29892,
903,
16394,
29892,
903,
10289,
29892,
903,
16707,
29897,
5097,
1273,
29898,
5721,
5562,
29918,
333,
29897,
29879,
29892,
1273,
29898,
10532,
29918,
333,
29897,
29879,
29892,
1273,
29898,
14318,
29918,
333,
29897,
29879,
29892,
29871,
29900,
29892,
1273,
29898,
3259,
29897,
29879,
29892,
1286,
3285,
29871,
29900,
29892,
29871,
29900,
15673,
13,
15945,
29908,
13,
13,
2287,
18476,
29918,
13171,
3094,
29918,
22716,
29918,
1367,
353,
9995,
13,
19460,
11646,
2022,
313,
333,
29892,
2825,
29918,
271,
29892,
3815,
29918,
333,
29892,
4426,
29892,
338,
29918,
1693,
2164,
29892,
903,
16394,
29892,
903,
10289,
29892,
338,
29918,
311,
22742,
29897,
5097,
1273,
29898,
333,
29897,
29879,
29892,
1273,
29898,
11600,
29918,
271,
29897,
29879,
29892,
1273,
29898,
14318,
29918,
333,
29897,
29879,
29892,
1273,
29898,
11330,
29897,
29879,
29892,
1273,
29898,
275,
29918,
1693,
2164,
29897,
29879,
29892,
1273,
7373,
16394,
29897,
29879,
29892,
29871,
29900,
29892,
29871,
29896,
13,
15945,
29908,
13,
13,
2287,
18476,
29918,
13171,
3094,
29918,
22240,
3919,
29903,
29918,
22716,
29918,
1367,
353,
9995,
13,
1964,
4945,
10911,
4959,
5012,
18476,
13,
22043,
8359,
29918,
333,
2672,
313,
13,
1678,
5097,
8359,
29918,
333,
3895,
2022,
29918,
5721,
5562,
29918,
333,
5754,
2022,
29918,
333,
16328,
29898,
333,
29897,
29879,
5300,
3815,
29918,
333,
353,
1273,
29898,
14318,
29918,
333,
29897,
29879,
13,
29897,
13,
9468,
3815,
29918,
333,
353,
1273,
29898,
14318,
29918,
333,
29897,
29879,
13,
15945,
29908,
13,
13,
19460,
29918,
3217,
29950,
8476,
29918,
9818,
29918,
4162,
4590,
1307,
29918,
4690,
1672,
23338,
29950,
29918,
13171,
3094,
29918,
1367,
353,
9995,
13,
19460,
11646,
426,
1111,
29882,
441,
29918,
2371,
29913,
5097,
5706,
29965,
11150,
29894,
29946,
3285,
11339,
29918,
333,
29892,
1273,
29898,
1111,
29882,
441,
29918,
333,
29897,
29879,
29892,
1273,
29898,
14318,
29918,
333,
29897,
29879,
29892,
1273,
7373,
16394,
29897,
29879,
29892,
29871,
29900,
3895,
313,
13,
1678,
5097,
11339,
29918,
333,
3895,
21313,
1972,
1800,
13,
29897,
13,
15945,
29908,
13,
13,
19460,
29918,
3217,
29950,
8476,
29918,
9818,
29918,
4162,
4590,
1307,
29918,
4176,
353,
9995,
13,
19460,
11646,
426,
1111,
29882,
441,
29918,
2371,
29913,
5097,
5706,
29965,
11150,
29894,
29946,
3285,
1178,
29892,
1273,
29898,
1111,
29882,
441,
29918,
333,
29897,
29879,
29892,
1273,
29898,
14318,
29918,
333,
29897,
29879,
29892,
1273,
7373,
16394,
29897,
29879,
29892,
29871,
29900,
3895,
313,
13,
1678,
5097,
1178,
3895,
313,
13,
4706,
426,
12333,
29918,
10532,
29918,
2850,
29913,
13,
1678,
1723,
408,
2022,
20735,
8780,
313,
13,
4706,
5097,
2022,
29918,
333,
29892,
8359,
29918,
333,
3895,
21313,
7194,
29918,
4330,
5194,
29918,
13171,
3094,
29918,
4571,
1254,
28852,
29918,
1367,
29903,
1800,
5754,
2022,
29918,
333,
2672,
21313,
3051,
29918,
2850,
1800,
13,
1678,
1723,
408,
282,
6051,
6732,
2022,
29889,
333,
353,
282,
6051,
29889,
10532,
29918,
333,
13,
1678,
5754,
3815,
29918,
333,
353,
1273,
29898,
14318,
29918,
333,
29897,
29879,
13,
1678,
15345,
6770,
1178,
13,
29897,
13,
15945,
29908,
13,
13,
7194,
29918,
4571,
1254,
28852,
29918,
1367,
29903,
29918,
22716,
29918,
8618,
13171,
15631,
29918,
4176,
353,
9995,
13,
6404,
8359,
29918,
333,
13,
21482,
313,
13,
1678,
426,
7194,
29918,
4330,
5194,
29918,
13171,
3094,
29918,
4571,
1254,
28852,
29918,
1367,
29903,
29913,
13,
29897,
13,
22043,
2022,
29918,
333,
2672,
13,
29898,
13,
1678,
5097,
1178,
13,
1678,
3895,
313,
13,
4706,
5097,
1178,
29892,
1852,
7976,
29898,
11330,
29892,
2022,
3032,
16394,
29897,
408,
4426,
29892,
4236,
29898,
275,
29918,
311,
22742,
29897,
408,
338,
29918,
311,
22742,
13,
4706,
3895,
2022,
13,
4706,
5754,
3815,
29918,
333,
353,
1273,
29898,
14318,
29918,
333,
29897,
29879,
13,
4706,
15345,
6770,
1178,
13,
4706,
379,
7520,
4214,
338,
29918,
311,
22742,
353,
29871,
29900,
13,
1678,
1723,
13,
1678,
5754,
426,
26705,
29913,
13,
29897,
13,
15945,
29908,
13,
13,
7194,
29918,
4571,
1254,
28852,
29918,
1367,
29903,
29918,
22716,
29918,
13171,
3094,
29918,
1367,
29918,
3738,
29931,
4945,
353,
9995,
13,
6404,
8359,
29918,
333,
13,
21482,
21313,
7194,
29918,
4330,
5194,
29918,
13171,
3094,
29918,
4571,
1254,
28852,
29918,
1367,
29903,
1800,
13,
22043,
426,
26705,
29913,
13,
15945,
29908,
13,
13,
7194,
29918,
13171,
3094,
29918,
8618,
13171,
24301,
2890,
29918,
18736,
353,
9995,
13,
6404,
18761,
2642,
29898,
8149,
2855,
9065,
29892,
29871,
29896,
29897,
408,
1820,
29892,
2302,
22798,
408,
2302,
13,
21482,
2022,
13,
1718,
22800,
8780,
4663,
5647,
1461,
15506,
2855,
9065,
22131,
29898,
11330,
29897,
408,
6611,
2855,
9065,
13,
22043,
3815,
29918,
333,
353,
1273,
29898,
14318,
29918,
333,
29897,
29879,
13,
26284,
6770,
18761,
2642,
29898,
8149,
2855,
9065,
29892,
29871,
29896,
29897,
13,
22364,
6770,
2302,
23050,
29892,
1820,
18188,
13,
15945,
29908,
13,
13,
7194,
29918,
17923,
24125,
29918,
21482,
29918,
22240,
3919,
29918,
13356,
24422,
353,
9995,
13,
6404,
13,
1678,
426,
333,
29918,
2671,
29913,
3339,
11339,
29918,
333,
13,
1678,
426,
4352,
292,
29918,
13604,
29918,
2622,
29918,
20788,
29913,
13,
21482,
21313,
13604,
29918,
1972,
1800,
13,
26284,
6770,
11339,
29918,
333,
13,
29912,
13400,
29913,
13,
29912,
10289,
29913,
13,
15945,
29908,
13,
13,
3217,
7428,
3919,
29918,
4571,
1254,
28852,
29918,
1367,
29918,
15032,
29127,
29918,
4176,
353,
313,
13,
1678,
14013,
29901,
285,
29908,
1964,
4945,
10911,
2022,
29918,
5721,
5562,
29918,
333,
6732,
17332,
17321,
1001,
22372,
6154,
2965,
29968,
8187,
17171,
29918,
6154,
17321,
1001,
10162,
4810,
7428,
3919,
23958,
29127,
8359,
29918,
333,
525,
11014,
29918,
29900,
29900,
29900,
29941,
29918,
5589,
29918,
10532,
29918,
5721,
5562,
29918,
333,
29906,
11838,
13,
29897,
13,
13,
13,
6404,
29918,
13171,
3094,
29918,
8618,
29925,
29918,
8932,
12996,
29918,
4176,
353,
9995,
13,
6404,
13,
1678,
995,
29892,
13,
1678,
2302,
29898,
1767,
29897,
13,
21482,
313,
13,
1678,
5097,
13,
4706,
426,
6799,
29918,
2671,
29913,
408,
995,
13,
1678,
3895,
13,
4706,
2022,
13,
1678,
5754,
13,
4706,
3815,
29918,
333,
353,
1273,
29898,
14318,
29918,
333,
29897,
29879,
5300,
13,
4706,
338,
29918,
311,
22742,
353,
29871,
29900,
5300,
13,
4706,
426,
6799,
29918,
2671,
29913,
8519,
6058,
4265,
5300,
13,
4706,
426,
6799,
29918,
2671,
29913,
2804,
6629,
13,
1678,
15606,
6770,
1178,
23050,
13,
1678,
27848,
29871,
29896,
29900,
29900,
29900,
29900,
29900,
13,
29897,
13,
26284,
6770,
995,
13,
22364,
6770,
2302,
29898,
1767,
29897,
23050,
13,
5265,
26349,
29871,
29906,
29900,
13,
15945,
29908,
13,
13,
6404,
29918,
13171,
3094,
29918,
8618,
29925,
29918,
8932,
12996,
29918,
4176,
29918,
29956,
13054,
29918,
3738,
29931,
4945,
353,
9995,
13,
6404,
13,
1678,
995,
29892,
13,
1678,
2302,
29898,
1767,
29897,
13,
21482,
313,
13,
1678,
5097,
13,
4706,
426,
6799,
29918,
2671,
29913,
408,
995,
13,
1678,
3895,
13,
4706,
2022,
13,
1678,
5754,
13,
4706,
3815,
29918,
333,
353,
1273,
29898,
14318,
29918,
333,
29897,
29879,
5300,
13,
4706,
338,
29918,
311,
22742,
353,
29871,
29900,
5300,
13,
4706,
426,
6799,
29918,
2671,
29913,
306,
5265,
6059,
1273,
29898,
1767,
29897,
29879,
13,
1678,
15606,
6770,
1178,
23050,
13,
1678,
27848,
29871,
29896,
29900,
29900,
29900,
29900,
29900,
13,
29897,
13,
26284,
6770,
995,
13,
22364,
6770,
2302,
29898,
1767,
29897,
23050,
13,
5265,
26349,
29871,
29906,
29900,
13,
15945,
29908,
13,
2
] |
backend/src/config.py | Rutvij-1/ASeniorIsAsking | 0 | 123857 | <filename>backend/src/config.py
REDIS_HOST = "redis"
REDIS_PORT = 6379
| [
1,
529,
9507,
29958,
27852,
29914,
4351,
29914,
2917,
29889,
2272,
13,
19386,
3235,
29918,
20832,
353,
376,
1127,
275,
29908,
13,
19386,
3235,
29918,
15082,
353,
29871,
29953,
29941,
29955,
29929,
13,
2
] |
Standard Library/struct/06_unpack_from.py | shubhamnag14/Python-Documents | 2 | 123627 | <reponame>shubhamnag14/Python-Documents
from struct import Struct
struct1 = Struct('@i13sf')
sendBytes = b'\x7f\x00\x00\x00Hello Struct!\x00\x00\x00\xc3\xf5H@\x80\x00\x00\x00Hello Python!\x00\x00\x00\x85\xebQ@'
print(struct1.unpack_from(sendBytes, 24))
| [
1,
529,
276,
1112,
420,
29958,
845,
431,
3391,
29876,
351,
29896,
29946,
29914,
11980,
29899,
20128,
13,
3166,
2281,
1053,
28771,
13,
13,
4984,
29896,
353,
28771,
877,
29992,
29875,
29896,
29941,
4668,
1495,
13,
6717,
11207,
353,
289,
12764,
29916,
29955,
29888,
29905,
29916,
29900,
29900,
29905,
29916,
29900,
29900,
29905,
29916,
29900,
29900,
10994,
28771,
9903,
29916,
29900,
29900,
29905,
29916,
29900,
29900,
29905,
29916,
29900,
29900,
29905,
21791,
29941,
29905,
24660,
29945,
29950,
29992,
29905,
29916,
29947,
29900,
29905,
29916,
29900,
29900,
29905,
29916,
29900,
29900,
29905,
29916,
29900,
29900,
10994,
5132,
9903,
29916,
29900,
29900,
29905,
29916,
29900,
29900,
29905,
29916,
29900,
29900,
29905,
29916,
29947,
29945,
29905,
29916,
774,
29984,
29992,
29915,
13,
13,
2158,
29898,
4984,
29896,
29889,
348,
4058,
29918,
3166,
29898,
6717,
11207,
29892,
29871,
29906,
29946,
876,
13,
2
] |
tests/test_zpl_fx.py | marcovannoord/simple_zpl2 | 16 | 165291 | import pytest
from simple_zpl2 import ZPLDocument
def test_comment():
zdoc = ZPLDocument()
zdoc.add_comment('Testing Comment')
assert zdoc.zpl_bytes == b'^XA\n^FXTesting Comment^FS\n^XZ'
| [
1,
1053,
11451,
1688,
13,
3166,
2560,
29918,
29920,
572,
29906,
1053,
796,
7390,
6268,
13,
13,
13,
1753,
1243,
29918,
9342,
7295,
13,
1678,
503,
1514,
353,
796,
7390,
6268,
580,
13,
1678,
503,
1514,
29889,
1202,
29918,
9342,
877,
3057,
292,
461,
1495,
13,
1678,
4974,
503,
1514,
29889,
29920,
572,
29918,
13193,
1275,
289,
29915,
29985,
29990,
29909,
29905,
29876,
29985,
26753,
3057,
292,
461,
29985,
9998,
29905,
29876,
29985,
29990,
29999,
29915,
13,
2
] |
djangae/tests/test_storage.py | julietkb/djangae | 467 | 80438 | <gh_stars>100-1000
# coding: utf-8
# STANDARD LIB
import os
# THIRD PARTY
import requests
from django.core.files.base import (
ContentFile,
File,
)
from django.db import models
from django.test.utils import override_settings
# DJANGAE
from djangae.contrib import sleuth
from djangae.storage import (
CloudStorage,
_get_storage_client,
)
from djangae.test import TestCase
class ModelWithTextFile(models.Model):
class Meta:
app_label = "djangae"
text_file = models.FileField()
class ModelWithUploadTo(models.Model):
class Meta:
app_label = "djangae"
text_file = models.FileField(upload_to="nested/document/")
class CloudStorageTests(TestCase):
def setUp(self):
requests.get('{}/wipe'.format(os.environ["STORAGE_EMULATOR_HOST"]))
client = _get_storage_client()
client.create_bucket('test_bucket')
return super().setUp()
def test_no_config_raises(self):
from django.core.exceptions import ImproperlyConfigured
with sleuth.fake("djangae.storage.project_id", return_value=None):
with self.assertRaises(ImproperlyConfigured):
CloudStorage()
@override_settings(CLOUD_STORAGE_BUCKET='test_bucket')
def test_basic_actions(self):
content = b'content'
storage = CloudStorage()
name = u'tmp.ąćęłńóśźż.马铃薯.zip'
f = ContentFile(content, name='my_file')
filename = storage.save(name, f)
self.assertIsInstance(filename, str)
self.assertTrue(filename.endswith(name))
self.assertTrue(storage.exists(filename))
self.assertEqual(storage.size(filename), len(content))
url = storage.url(filename)
self.assertIsInstance(url, str)
self.assertNotEqual(url, '')
response = requests.get(url)
self.assertEqual(response.status_code, 200)
self.assertEqual(response.content, content)
f = storage.open(filename)
self.assertIsInstance(f, File)
self.assertEqual(f.read(), content)
# Delete it
storage.delete(filename)
self.assertFalse(storage.exists(filename))
@override_settings(CLOUD_STORAGE_BUCKET='test_bucket')
def test_dotslash_prefix(self):
storage = CloudStorage()
name = './my_file'
f = ContentFile(b'content')
filename = storage.save(name, f)
self.assertEqual(filename, name.lstrip("./"))
@override_settings(CLOUD_STORAGE_BUCKET='test_bucket')
def test_different_bucket(self):
from google.cloud.exceptions import NotFound
storage = CloudStorage(bucket_name='different_test_bucket')
name = './my_file'
f = ContentFile(b'content')
with self.assertRaises(NotFound) as cm:
storage.save(name, f)
self.assertIn('different_test_bucket', cm.exception.message)
@override_settings(CLOUD_STORAGE_BUCKET='different_test_bucket')
def test_different_bucket_config(self):
from google.cloud.exceptions import NotFound
storage = CloudStorage()
name = './my_file'
f = ContentFile(b'content')
with self.assertRaises(NotFound) as cm:
storage.save(name, f)
self.assertIn('different_test_bucket', cm.exception.message)
@override_settings(CLOUD_STORAGE_BUCKET='test_bucket')
def test_supports_nameless_files(self):
storage = CloudStorage()
f2 = ContentFile(b'nameless-content')
storage.save('tmp2', f2)
@override_settings(CLOUD_STORAGE_BUCKET='test_bucket')
def test_new_objects_get_the_default_acl(self):
storage = CloudStorage()
filename = 'example.txt'
fileobj = ContentFile(b'content')
with sleuth.watch('google.cloud.storage.blob.Blob.upload_from_file') as upload_func:
storage.save(filename, fileobj)
self.assertTrue(storage.exists(filename))
self.assertIsNone(upload_func.calls[0].kwargs['predefined_acl'])
@override_settings(CLOUD_STORAGE_BUCKET='test_bucket')
def test_new_objects_with_an_explicit_acl(self):
storage = CloudStorage(google_acl='publicRead')
filename = 'example.txt'
fileobj = ContentFile(b'content', name=filename)
with sleuth.watch('google.cloud.storage.blob.Blob.upload_from_file') as upload_func:
storage.save(filename, fileobj)
self.assertTrue(storage.exists(filename))
self.assertEqual(
upload_func.calls[0].kwargs['predefined_acl'],
'publicRead',
)
@override_settings(
CLOUD_STORAGE_BUCKET='test_bucket',
DEFAULT_FILE_STORAGE='djangae.storage.CloudStorage',
)
def test_works_with_text_file_fields(self):
content = b"content"
instance = ModelWithTextFile(
text_file=ContentFile(content, name="my_file")
)
instance.save()
fetched = ModelWithTextFile.objects.get()
self.assertEqual(fetched.text_file.read(), content)
@override_settings(
CLOUD_STORAGE_BUCKET='test_bucket',
DEFAULT_FILE_STORAGE='djangae.storage.CloudStorage',
)
def test_works_with_upload_to(self):
content = b"content"
instance = ModelWithUploadTo(
text_file=ContentFile(content, name="my_file")
)
instance.save()
fetched = ModelWithUploadTo.objects.get()
self.assertEqual(fetched.text_file.read(), content)
@override_settings(CLOUD_STORAGE_BUCKET='test_bucket')
def test_open_uses_correct_bucket(self):
storage = CloudStorage()
filename = storage.save('file1', ContentFile(b'content', name='file1'))
storage = CloudStorage() # new instance
storage._open(filename)
@override_settings(CLOUD_STORAGE_BUCKET='test_bucket')
def test_delete_uses_correct_bucket(self):
storage = CloudStorage()
filename = storage.save('file1', ContentFile(b'content', name='file1'))
storage = CloudStorage() # new instance
storage.delete(filename)
self.assertFalse(storage.exists(filename))
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29900,
29899,
29896,
29900,
29900,
29900,
13,
29937,
14137,
29901,
23616,
29899,
29947,
13,
29937,
6850,
9468,
17011,
365,
8979,
13,
5215,
2897,
13,
13,
29937,
3446,
8193,
29928,
349,
8322,
29979,
13,
5215,
7274,
13,
3166,
9557,
29889,
3221,
29889,
5325,
29889,
3188,
1053,
313,
13,
1678,
10576,
2283,
29892,
13,
1678,
3497,
29892,
13,
29897,
13,
3166,
9557,
29889,
2585,
1053,
4733,
13,
3166,
9557,
29889,
1688,
29889,
13239,
1053,
5712,
29918,
11027,
13,
13,
29937,
23366,
2190,
12739,
29923,
13,
3166,
270,
29926,
574,
3660,
29889,
21570,
1053,
12844,
2806,
13,
3166,
270,
29926,
574,
3660,
29889,
12925,
1053,
313,
13,
1678,
14293,
10486,
29892,
13,
1678,
903,
657,
29918,
12925,
29918,
4645,
29892,
13,
29897,
13,
3166,
270,
29926,
574,
3660,
29889,
1688,
1053,
4321,
8259,
13,
13,
13,
1990,
8125,
3047,
1626,
2283,
29898,
9794,
29889,
3195,
1125,
13,
1678,
770,
20553,
29901,
13,
4706,
623,
29918,
1643,
353,
376,
19776,
574,
3660,
29908,
13,
13,
1678,
1426,
29918,
1445,
353,
4733,
29889,
2283,
3073,
580,
13,
13,
13,
1990,
8125,
3047,
17553,
1762,
29898,
9794,
29889,
3195,
1125,
13,
1678,
770,
20553,
29901,
13,
4706,
623,
29918,
1643,
353,
376,
19776,
574,
3660,
29908,
13,
13,
1678,
1426,
29918,
1445,
353,
4733,
29889,
2283,
3073,
29898,
9009,
29918,
517,
543,
27420,
29914,
3225,
29914,
1159,
13,
13,
13,
1990,
14293,
10486,
24376,
29898,
3057,
8259,
1125,
13,
13,
1678,
822,
731,
3373,
29898,
1311,
1125,
13,
4706,
7274,
29889,
657,
877,
29912,
6822,
4353,
412,
4286,
4830,
29898,
359,
29889,
21813,
3366,
1254,
1955,
10461,
29918,
12665,
13309,
1299,
1955,
29918,
20832,
3108,
876,
13,
4706,
3132,
353,
903,
657,
29918,
12925,
29918,
4645,
580,
13,
4706,
3132,
29889,
3258,
29918,
21454,
877,
1688,
29918,
21454,
1495,
13,
4706,
736,
2428,
2141,
842,
3373,
580,
13,
13,
1678,
822,
1243,
29918,
1217,
29918,
2917,
29918,
336,
4637,
29898,
1311,
1125,
13,
4706,
515,
9557,
29889,
3221,
29889,
11739,
29879,
1053,
1954,
771,
546,
368,
3991,
2955,
13,
13,
4706,
411,
12844,
2806,
29889,
29888,
1296,
703,
19776,
574,
3660,
29889,
12925,
29889,
4836,
29918,
333,
613,
736,
29918,
1767,
29922,
8516,
1125,
13,
9651,
411,
1583,
29889,
9294,
29934,
1759,
267,
29898,
1888,
771,
546,
368,
3991,
2955,
1125,
13,
18884,
14293,
10486,
580,
13,
13,
1678,
732,
15752,
29918,
11027,
29898,
29907,
3927,
15789,
29918,
1254,
1955,
10461,
29918,
7838,
7077,
2544,
2433,
1688,
29918,
21454,
1495,
13,
1678,
822,
1243,
29918,
16121,
29918,
7387,
29898,
1311,
1125,
13,
4706,
2793,
353,
289,
29915,
3051,
29915,
13,
4706,
8635,
353,
14293,
10486,
580,
13,
4706,
1024,
353,
318,
29915,
7050,
29889,
30025,
30063,
30023,
30006,
30066,
29980,
30045,
30109,
30042,
29889,
31530,
236,
150,
134,
235,
153,
178,
29889,
7554,
29915,
13,
13,
4706,
285,
353,
10576,
2283,
29898,
3051,
29892,
1024,
2433,
1357,
29918,
1445,
1495,
13,
4706,
10422,
353,
8635,
29889,
7620,
29898,
978,
29892,
285,
29897,
13,
4706,
1583,
29889,
9294,
3624,
4998,
29898,
9507,
29892,
851,
29897,
13,
4706,
1583,
29889,
9294,
5574,
29898,
9507,
29889,
1975,
2541,
29898,
978,
876,
13,
13,
4706,
1583,
29889,
9294,
5574,
29898,
12925,
29889,
9933,
29898,
9507,
876,
13,
4706,
1583,
29889,
9294,
9843,
29898,
12925,
29889,
2311,
29898,
9507,
511,
7431,
29898,
3051,
876,
13,
4706,
3142,
353,
8635,
29889,
2271,
29898,
9507,
29897,
13,
4706,
1583,
29889,
9294,
3624,
4998,
29898,
2271,
29892,
851,
29897,
13,
4706,
1583,
29889,
9294,
3664,
9843,
29898,
2271,
29892,
27255,
13,
13,
4706,
2933,
353,
7274,
29889,
657,
29898,
2271,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
5327,
29889,
4882,
29918,
401,
29892,
29871,
29906,
29900,
29900,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
5327,
29889,
3051,
29892,
2793,
29897,
13,
13,
4706,
285,
353,
8635,
29889,
3150,
29898,
9507,
29897,
13,
4706,
1583,
29889,
9294,
3624,
4998,
29898,
29888,
29892,
3497,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
29888,
29889,
949,
3285,
2793,
29897,
13,
13,
4706,
396,
21267,
372,
13,
4706,
8635,
29889,
8143,
29898,
9507,
29897,
13,
4706,
1583,
29889,
9294,
8824,
29898,
12925,
29889,
9933,
29898,
9507,
876,
13,
13,
1678,
732,
15752,
29918,
11027,
29898,
29907,
3927,
15789,
29918,
1254,
1955,
10461,
29918,
7838,
7077,
2544,
2433,
1688,
29918,
21454,
1495,
13,
1678,
822,
1243,
29918,
7778,
29880,
1161,
29918,
13506,
29898,
1311,
1125,
13,
4706,
8635,
353,
14293,
10486,
580,
13,
4706,
1024,
353,
19283,
1357,
29918,
1445,
29915,
13,
4706,
285,
353,
10576,
2283,
29898,
29890,
29915,
3051,
1495,
13,
4706,
10422,
353,
8635,
29889,
7620,
29898,
978,
29892,
285,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
9507,
29892,
1024,
29889,
29880,
17010,
703,
6904,
5783,
13,
13,
1678,
732,
15752,
29918,
11027,
29898,
29907,
3927,
15789,
29918,
1254,
1955,
10461,
29918,
7838,
7077,
2544,
2433,
1688,
29918,
21454,
1495,
13,
1678,
822,
1243,
29918,
29881,
15622,
29918,
21454,
29898,
1311,
1125,
13,
4706,
515,
5386,
29889,
9274,
29889,
11739,
29879,
1053,
2216,
9692,
13,
4706,
8635,
353,
14293,
10486,
29898,
21454,
29918,
978,
2433,
29881,
15622,
29918,
1688,
29918,
21454,
1495,
13,
4706,
1024,
353,
19283,
1357,
29918,
1445,
29915,
13,
4706,
285,
353,
10576,
2283,
29898,
29890,
29915,
3051,
1495,
13,
13,
4706,
411,
1583,
29889,
9294,
29934,
1759,
267,
29898,
17413,
29897,
408,
7477,
29901,
13,
9651,
8635,
29889,
7620,
29898,
978,
29892,
285,
29897,
13,
13,
4706,
1583,
29889,
9294,
797,
877,
29881,
15622,
29918,
1688,
29918,
21454,
742,
7477,
29889,
11739,
29889,
4906,
29897,
13,
13,
1678,
732,
15752,
29918,
11027,
29898,
29907,
3927,
15789,
29918,
1254,
1955,
10461,
29918,
7838,
7077,
2544,
2433,
29881,
15622,
29918,
1688,
29918,
21454,
1495,
13,
1678,
822,
1243,
29918,
29881,
15622,
29918,
21454,
29918,
2917,
29898,
1311,
1125,
13,
4706,
515,
5386,
29889,
9274,
29889,
11739,
29879,
1053,
2216,
9692,
13,
4706,
8635,
353,
14293,
10486,
580,
13,
4706,
1024,
353,
19283,
1357,
29918,
1445,
29915,
13,
4706,
285,
353,
10576,
2283,
29898,
29890,
29915,
3051,
1495,
13,
13,
4706,
411,
1583,
29889,
9294,
29934,
1759,
267,
29898,
17413,
29897,
408,
7477,
29901,
13,
9651,
8635,
29889,
7620,
29898,
978,
29892,
285,
29897,
13,
13,
4706,
1583,
29889,
9294,
797,
877,
29881,
15622,
29918,
1688,
29918,
21454,
742,
7477,
29889,
11739,
29889,
4906,
29897,
13,
13,
1678,
732,
15752,
29918,
11027,
29898,
29907,
3927,
15789,
29918,
1254,
1955,
10461,
29918,
7838,
7077,
2544,
2433,
1688,
29918,
21454,
1495,
13,
1678,
822,
1243,
29918,
5924,
29879,
29918,
8588,
6393,
29918,
5325,
29898,
1311,
1125,
13,
4706,
8635,
353,
14293,
10486,
580,
13,
4706,
285,
29906,
353,
10576,
2283,
29898,
29890,
29915,
8588,
6393,
29899,
3051,
1495,
13,
4706,
8635,
29889,
7620,
877,
7050,
29906,
742,
285,
29906,
29897,
13,
13,
1678,
732,
15752,
29918,
11027,
29898,
29907,
3927,
15789,
29918,
1254,
1955,
10461,
29918,
7838,
7077,
2544,
2433,
1688,
29918,
21454,
1495,
13,
1678,
822,
1243,
29918,
1482,
29918,
12650,
29918,
657,
29918,
1552,
29918,
4381,
29918,
562,
29880,
29898,
1311,
1125,
13,
4706,
8635,
353,
14293,
10486,
580,
13,
4706,
10422,
353,
525,
4773,
29889,
3945,
29915,
13,
4706,
934,
5415,
353,
10576,
2283,
29898,
29890,
29915,
3051,
1495,
13,
13,
4706,
411,
12844,
2806,
29889,
12344,
877,
3608,
29889,
9274,
29889,
12925,
29889,
10054,
29889,
29933,
2127,
29889,
9009,
29918,
3166,
29918,
1445,
1495,
408,
6441,
29918,
9891,
29901,
13,
9651,
8635,
29889,
7620,
29898,
9507,
29892,
934,
5415,
29897,
13,
13,
4706,
1583,
29889,
9294,
5574,
29898,
12925,
29889,
9933,
29898,
9507,
876,
13,
4706,
1583,
29889,
9294,
3624,
8516,
29898,
9009,
29918,
9891,
29889,
29883,
4293,
29961,
29900,
1822,
19290,
1839,
1457,
12119,
29918,
562,
29880,
11287,
13,
13,
1678,
732,
15752,
29918,
11027,
29898,
29907,
3927,
15789,
29918,
1254,
1955,
10461,
29918,
7838,
7077,
2544,
2433,
1688,
29918,
21454,
1495,
13,
1678,
822,
1243,
29918,
1482,
29918,
12650,
29918,
2541,
29918,
273,
29918,
4548,
4019,
29918,
562,
29880,
29898,
1311,
1125,
13,
4706,
8635,
353,
14293,
10486,
29898,
3608,
29918,
562,
29880,
2433,
3597,
6359,
1495,
13,
4706,
10422,
353,
525,
4773,
29889,
3945,
29915,
13,
4706,
934,
5415,
353,
10576,
2283,
29898,
29890,
29915,
3051,
742,
1024,
29922,
9507,
29897,
13,
13,
4706,
411,
12844,
2806,
29889,
12344,
877,
3608,
29889,
9274,
29889,
12925,
29889,
10054,
29889,
29933,
2127,
29889,
9009,
29918,
3166,
29918,
1445,
1495,
408,
6441,
29918,
9891,
29901,
13,
9651,
8635,
29889,
7620,
29898,
9507,
29892,
934,
5415,
29897,
13,
13,
4706,
1583,
29889,
9294,
5574,
29898,
12925,
29889,
9933,
29898,
9507,
876,
13,
4706,
1583,
29889,
9294,
9843,
29898,
13,
9651,
6441,
29918,
9891,
29889,
29883,
4293,
29961,
29900,
1822,
19290,
1839,
1457,
12119,
29918,
562,
29880,
7464,
13,
9651,
525,
3597,
6359,
742,
13,
4706,
1723,
13,
13,
1678,
732,
15752,
29918,
11027,
29898,
13,
4706,
315,
3927,
15789,
29918,
1254,
1955,
10461,
29918,
7838,
7077,
2544,
2433,
1688,
29918,
21454,
742,
13,
4706,
22236,
29918,
7724,
29918,
1254,
1955,
10461,
2433,
19776,
574,
3660,
29889,
12925,
29889,
20442,
10486,
742,
13,
1678,
1723,
13,
1678,
822,
1243,
29918,
13129,
29918,
2541,
29918,
726,
29918,
1445,
29918,
9621,
29898,
1311,
1125,
13,
4706,
2793,
353,
289,
29908,
3051,
29908,
13,
4706,
2777,
353,
8125,
3047,
1626,
2283,
29898,
13,
9651,
1426,
29918,
1445,
29922,
3916,
2283,
29898,
3051,
29892,
1024,
543,
1357,
29918,
1445,
1159,
13,
4706,
1723,
13,
13,
4706,
2777,
29889,
7620,
580,
13,
4706,
6699,
287,
353,
8125,
3047,
1626,
2283,
29889,
12650,
29889,
657,
580,
13,
4706,
1583,
29889,
9294,
9843,
29898,
9155,
287,
29889,
726,
29918,
1445,
29889,
949,
3285,
2793,
29897,
13,
13,
1678,
732,
15752,
29918,
11027,
29898,
13,
4706,
315,
3927,
15789,
29918,
1254,
1955,
10461,
29918,
7838,
7077,
2544,
2433,
1688,
29918,
21454,
742,
13,
4706,
22236,
29918,
7724,
29918,
1254,
1955,
10461,
2433,
19776,
574,
3660,
29889,
12925,
29889,
20442,
10486,
742,
13,
1678,
1723,
13,
1678,
822,
1243,
29918,
13129,
29918,
2541,
29918,
9009,
29918,
517,
29898,
1311,
1125,
13,
4706,
2793,
353,
289,
29908,
3051,
29908,
13,
4706,
2777,
353,
8125,
3047,
17553,
1762,
29898,
13,
9651,
1426,
29918,
1445,
29922,
3916,
2283,
29898,
3051,
29892,
1024,
543,
1357,
29918,
1445,
1159,
13,
4706,
1723,
13,
13,
4706,
2777,
29889,
7620,
580,
13,
4706,
6699,
287,
353,
8125,
3047,
17553,
1762,
29889,
12650,
29889,
657,
580,
13,
4706,
1583,
29889,
9294,
9843,
29898,
9155,
287,
29889,
726,
29918,
1445,
29889,
949,
3285,
2793,
29897,
13,
13,
1678,
732,
15752,
29918,
11027,
29898,
29907,
3927,
15789,
29918,
1254,
1955,
10461,
29918,
7838,
7077,
2544,
2433,
1688,
29918,
21454,
1495,
13,
1678,
822,
1243,
29918,
3150,
29918,
6394,
29918,
15728,
29918,
21454,
29898,
1311,
1125,
13,
4706,
8635,
353,
14293,
10486,
580,
13,
4706,
10422,
353,
8635,
29889,
7620,
877,
1445,
29896,
742,
10576,
2283,
29898,
29890,
29915,
3051,
742,
1024,
2433,
1445,
29896,
8785,
13,
13,
4706,
8635,
353,
14293,
10486,
580,
29871,
396,
716,
2777,
13,
4706,
8635,
3032,
3150,
29898,
9507,
29897,
13,
13,
1678,
732,
15752,
29918,
11027,
29898,
29907,
3927,
15789,
29918,
1254,
1955,
10461,
29918,
7838,
7077,
2544,
2433,
1688,
29918,
21454,
1495,
13,
1678,
822,
1243,
29918,
8143,
29918,
6394,
29918,
15728,
29918,
21454,
29898,
1311,
1125,
13,
4706,
8635,
353,
14293,
10486,
580,
13,
4706,
10422,
353,
8635,
29889,
7620,
877,
1445,
29896,
742,
10576,
2283,
29898,
29890,
29915,
3051,
742,
1024,
2433,
1445,
29896,
8785,
13,
13,
4706,
8635,
353,
14293,
10486,
580,
29871,
396,
716,
2777,
13,
4706,
8635,
29889,
8143,
29898,
9507,
29897,
13,
4706,
1583,
29889,
9294,
8824,
29898,
12925,
29889,
9933,
29898,
9507,
876,
13,
2
] |
tests/components/lateral_erosion/test_node_finder.py | scottrdavid/landlab | 257 | 150445 | <filename>tests/components/lateral_erosion/test_node_finder.py
import numpy as np
import pytest
from landlab import RasterModelGrid
from landlab.components.lateral_erosion.node_finder import angle_finder
@pytest.mark.parametrize(
"node_1,node_2",
[(12, 8), (13, 3), (8, 2), (3, 1), (6, 2), (11, 1), (12, 6), (13, 11)],
)
def test_angle_finder_90(node_1, node_2):
grid = RasterModelGrid((4, 5))
assert angle_finder(grid, node_1, 7, node_2) == pytest.approx(np.pi * 0.5)
assert angle_finder(grid, node_2, 7, node_1) == pytest.approx(np.pi * 0.5)
@pytest.mark.parametrize(
"node_1,node_2",
[(10, 6), (6, 2), (2, 1), (1, 0), (0, 4), (4, 8), (8, 9), (9, 10)],
)
def test_angle_finder_45(node_1, node_2):
grid = RasterModelGrid((3, 4))
assert angle_finder(grid, node_1, 5, node_2) == pytest.approx(np.pi * 0.25)
assert angle_finder(grid, node_2, 5, node_1) == pytest.approx(np.pi * 0.25)
@pytest.mark.parametrize("node", [6, 10, 9, 8, 4, 0, 1, 2])
def test_angle_finder_0(node):
grid = RasterModelGrid((3, 4))
assert angle_finder(grid, node, 5, node) == pytest.approx(0.0)
def test_angle_finder_array():
grid = RasterModelGrid((3, 4))
assert angle_finder(grid, (10, 6, 2), 5, (6, 2, 1)) == pytest.approx(np.pi * 0.25)
@pytest.mark.parametrize("dx", [0.5, 1.0, 2.0])
@pytest.mark.parametrize("dy", [0.5, 1.0, 2.0])
def test_unequal_spacing(dx, dy):
grid = RasterModelGrid((3, 4), xy_spacing=(dx, dy))
assert angle_finder(grid, (6, 9, 4, 1), 5, (1, 6, 9, 4)) == pytest.approx(
np.pi * 0.5
)
assert angle_finder(grid, (10, 8, 0, 2), 5, (6, 4, 4, 6)) == pytest.approx(
np.arctan(dy / dx)
)
assert angle_finder(grid, (9, 1, 1, 9), 5, (8, 0, 2, 10)) == pytest.approx(
np.arctan(dx / dy)
)
| [
1,
529,
9507,
29958,
21150,
29914,
14036,
29914,
29880,
1008,
284,
29918,
9672,
291,
29914,
1688,
29918,
3177,
29918,
2886,
261,
29889,
2272,
13,
5215,
12655,
408,
7442,
13,
5215,
11451,
1688,
13,
13,
3166,
2982,
8205,
1053,
390,
1901,
3195,
5756,
13,
3166,
2982,
8205,
29889,
14036,
29889,
29880,
1008,
284,
29918,
9672,
291,
29889,
3177,
29918,
2886,
261,
1053,
10696,
29918,
2886,
261,
13,
13,
13,
29992,
2272,
1688,
29889,
3502,
29889,
3207,
300,
374,
911,
29898,
13,
1678,
376,
3177,
29918,
29896,
29892,
3177,
29918,
29906,
613,
13,
1678,
17288,
29896,
29906,
29892,
29871,
29947,
511,
313,
29896,
29941,
29892,
29871,
29941,
511,
313,
29947,
29892,
29871,
29906,
511,
313,
29941,
29892,
29871,
29896,
511,
313,
29953,
29892,
29871,
29906,
511,
313,
29896,
29896,
29892,
29871,
29896,
511,
313,
29896,
29906,
29892,
29871,
29953,
511,
313,
29896,
29941,
29892,
29871,
29896,
29896,
29897,
1402,
13,
29897,
13,
1753,
1243,
29918,
2521,
29918,
2886,
261,
29918,
29929,
29900,
29898,
3177,
29918,
29896,
29892,
2943,
29918,
29906,
1125,
13,
1678,
6856,
353,
390,
1901,
3195,
5756,
3552,
29946,
29892,
29871,
29945,
876,
13,
1678,
4974,
10696,
29918,
2886,
261,
29898,
7720,
29892,
2943,
29918,
29896,
29892,
29871,
29955,
29892,
2943,
29918,
29906,
29897,
1275,
11451,
1688,
29889,
14850,
29898,
9302,
29889,
1631,
334,
29871,
29900,
29889,
29945,
29897,
13,
1678,
4974,
10696,
29918,
2886,
261,
29898,
7720,
29892,
2943,
29918,
29906,
29892,
29871,
29955,
29892,
2943,
29918,
29896,
29897,
1275,
11451,
1688,
29889,
14850,
29898,
9302,
29889,
1631,
334,
29871,
29900,
29889,
29945,
29897,
13,
13,
13,
29992,
2272,
1688,
29889,
3502,
29889,
3207,
300,
374,
911,
29898,
13,
1678,
376,
3177,
29918,
29896,
29892,
3177,
29918,
29906,
613,
13,
1678,
17288,
29896,
29900,
29892,
29871,
29953,
511,
313,
29953,
29892,
29871,
29906,
511,
313,
29906,
29892,
29871,
29896,
511,
313,
29896,
29892,
29871,
29900,
511,
313,
29900,
29892,
29871,
29946,
511,
313,
29946,
29892,
29871,
29947,
511,
313,
29947,
29892,
29871,
29929,
511,
313,
29929,
29892,
29871,
29896,
29900,
29897,
1402,
13,
29897,
13,
1753,
1243,
29918,
2521,
29918,
2886,
261,
29918,
29946,
29945,
29898,
3177,
29918,
29896,
29892,
2943,
29918,
29906,
1125,
13,
1678,
6856,
353,
390,
1901,
3195,
5756,
3552,
29941,
29892,
29871,
29946,
876,
13,
1678,
4974,
10696,
29918,
2886,
261,
29898,
7720,
29892,
2943,
29918,
29896,
29892,
29871,
29945,
29892,
2943,
29918,
29906,
29897,
1275,
11451,
1688,
29889,
14850,
29898,
9302,
29889,
1631,
334,
29871,
29900,
29889,
29906,
29945,
29897,
13,
1678,
4974,
10696,
29918,
2886,
261,
29898,
7720,
29892,
2943,
29918,
29906,
29892,
29871,
29945,
29892,
2943,
29918,
29896,
29897,
1275,
11451,
1688,
29889,
14850,
29898,
9302,
29889,
1631,
334,
29871,
29900,
29889,
29906,
29945,
29897,
13,
13,
13,
29992,
2272,
1688,
29889,
3502,
29889,
3207,
300,
374,
911,
703,
3177,
613,
518,
29953,
29892,
29871,
29896,
29900,
29892,
29871,
29929,
29892,
29871,
29947,
29892,
29871,
29946,
29892,
29871,
29900,
29892,
29871,
29896,
29892,
29871,
29906,
2314,
13,
1753,
1243,
29918,
2521,
29918,
2886,
261,
29918,
29900,
29898,
3177,
1125,
13,
1678,
6856,
353,
390,
1901,
3195,
5756,
3552,
29941,
29892,
29871,
29946,
876,
13,
1678,
4974,
10696,
29918,
2886,
261,
29898,
7720,
29892,
2943,
29892,
29871,
29945,
29892,
2943,
29897,
1275,
11451,
1688,
29889,
14850,
29898,
29900,
29889,
29900,
29897,
13,
13,
13,
1753,
1243,
29918,
2521,
29918,
2886,
261,
29918,
2378,
7295,
13,
1678,
6856,
353,
390,
1901,
3195,
5756,
3552,
29941,
29892,
29871,
29946,
876,
13,
1678,
4974,
10696,
29918,
2886,
261,
29898,
7720,
29892,
313,
29896,
29900,
29892,
29871,
29953,
29892,
29871,
29906,
511,
29871,
29945,
29892,
313,
29953,
29892,
29871,
29906,
29892,
29871,
29896,
876,
1275,
11451,
1688,
29889,
14850,
29898,
9302,
29889,
1631,
334,
29871,
29900,
29889,
29906,
29945,
29897,
13,
13,
13,
29992,
2272,
1688,
29889,
3502,
29889,
3207,
300,
374,
911,
703,
8235,
613,
518,
29900,
29889,
29945,
29892,
29871,
29896,
29889,
29900,
29892,
29871,
29906,
29889,
29900,
2314,
13,
29992,
2272,
1688,
29889,
3502,
29889,
3207,
300,
374,
911,
703,
4518,
613,
518,
29900,
29889,
29945,
29892,
29871,
29896,
29889,
29900,
29892,
29871,
29906,
29889,
29900,
2314,
13,
1753,
1243,
29918,
1540,
15380,
29918,
1028,
9390,
29898,
8235,
29892,
13475,
1125,
13,
1678,
6856,
353,
390,
1901,
3195,
5756,
3552,
29941,
29892,
29871,
29946,
511,
921,
29891,
29918,
1028,
9390,
7607,
8235,
29892,
13475,
876,
13,
1678,
4974,
10696,
29918,
2886,
261,
29898,
7720,
29892,
313,
29953,
29892,
29871,
29929,
29892,
29871,
29946,
29892,
29871,
29896,
511,
29871,
29945,
29892,
313,
29896,
29892,
29871,
29953,
29892,
29871,
29929,
29892,
29871,
29946,
876,
1275,
11451,
1688,
29889,
14850,
29898,
13,
4706,
7442,
29889,
1631,
334,
29871,
29900,
29889,
29945,
13,
1678,
1723,
13,
1678,
4974,
10696,
29918,
2886,
261,
29898,
7720,
29892,
313,
29896,
29900,
29892,
29871,
29947,
29892,
29871,
29900,
29892,
29871,
29906,
511,
29871,
29945,
29892,
313,
29953,
29892,
29871,
29946,
29892,
29871,
29946,
29892,
29871,
29953,
876,
1275,
11451,
1688,
29889,
14850,
29898,
13,
4706,
7442,
29889,
27014,
273,
29898,
4518,
847,
15414,
29897,
13,
1678,
1723,
13,
1678,
4974,
10696,
29918,
2886,
261,
29898,
7720,
29892,
313,
29929,
29892,
29871,
29896,
29892,
29871,
29896,
29892,
29871,
29929,
511,
29871,
29945,
29892,
313,
29947,
29892,
29871,
29900,
29892,
29871,
29906,
29892,
29871,
29896,
29900,
876,
1275,
11451,
1688,
29889,
14850,
29898,
13,
4706,
7442,
29889,
27014,
273,
29898,
8235,
847,
13475,
29897,
13,
1678,
1723,
13,
2
] |
object-detection/yolov2/download_darknet_yolo.py | AaratiAkkapeddi/nnabla-examples | 228 | 97258 | # Copyright 2018,2019,2020,2021 Sony Corporation.
# Copyright 2021 Sony Group Corporation.
#
# 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.
def download(url):
from nnabla.utils.data_source_loader import download as dl
dl(url, url.split('/')[-1], False)
def main():
categories = 'https://raw.githubusercontent.com/pjreddie/darknet/master/data/coco.names'
weights = 'https://pjreddie.com/media/files/yolov2.weights'
example_image = 'https://raw.githubusercontent.com/pjreddie/darknet/master/data/dog.jpg'
print('Downloading MS COCO category names ...')
download(categories)
print('Downloading Darknet YOLO weights ...')
download(weights)
print('Downloading an example image ...')
download(example_image)
if __name__ == '__main__':
main()
| [
1,
396,
14187,
1266,
29871,
29906,
29900,
29896,
29947,
29892,
29906,
29900,
29896,
29929,
29892,
29906,
29900,
29906,
29900,
29892,
29906,
29900,
29906,
29896,
28465,
15025,
29889,
13,
29937,
14187,
1266,
29871,
29906,
29900,
29906,
29896,
28465,
6431,
15025,
29889,
13,
29937,
13,
29937,
10413,
21144,
1090,
278,
13380,
19245,
29892,
10079,
29871,
29906,
29889,
29900,
313,
1552,
376,
29931,
293,
1947,
1496,
13,
29937,
366,
1122,
451,
671,
445,
934,
5174,
297,
752,
13036,
411,
278,
19245,
29889,
13,
29937,
887,
1122,
4017,
263,
3509,
310,
278,
19245,
472,
13,
29937,
13,
29937,
268,
1732,
597,
1636,
29889,
4288,
29889,
990,
29914,
506,
11259,
29914,
27888,
1430,
1660,
29899,
29906,
29889,
29900,
13,
29937,
13,
29937,
25870,
3734,
491,
22903,
4307,
470,
15502,
304,
297,
5007,
29892,
7047,
13,
29937,
13235,
1090,
278,
19245,
338,
13235,
373,
385,
376,
3289,
8519,
29908,
350,
3289,
3235,
29892,
13,
29937,
399,
1806,
8187,
2692,
399,
1718,
29934,
13566,
29059,
6323,
8707,
29928,
22122,
29903,
8079,
13764,
29979,
476,
22255,
29892,
2845,
4653,
470,
2411,
2957,
29889,
13,
29937,
2823,
278,
19245,
363,
278,
2702,
4086,
14765,
1076,
11239,
322,
13,
29937,
27028,
1090,
278,
19245,
29889,
13,
13,
13,
1753,
5142,
29898,
2271,
1125,
13,
1678,
515,
302,
8511,
29889,
13239,
29889,
1272,
29918,
4993,
29918,
12657,
1053,
5142,
408,
270,
29880,
13,
1678,
270,
29880,
29898,
2271,
29892,
3142,
29889,
5451,
11219,
1495,
14352,
29896,
1402,
7700,
29897,
13,
13,
13,
1753,
1667,
7295,
13,
1678,
13997,
353,
525,
991,
597,
1610,
29889,
3292,
1792,
3051,
29889,
510,
29914,
29886,
29926,
1127,
16217,
29914,
26031,
1212,
29914,
6207,
29914,
1272,
29914,
29883,
6235,
29889,
7039,
29915,
13,
1678,
18177,
353,
525,
991,
597,
29886,
29926,
1127,
16217,
29889,
510,
29914,
9799,
29914,
5325,
29914,
29891,
324,
586,
29906,
29889,
705,
5861,
29915,
13,
1678,
1342,
29918,
3027,
353,
525,
991,
597,
1610,
29889,
3292,
1792,
3051,
29889,
510,
29914,
29886,
29926,
1127,
16217,
29914,
26031,
1212,
29914,
6207,
29914,
1272,
29914,
26169,
29889,
6173,
29915,
13,
1678,
1596,
877,
6767,
13234,
10888,
4810,
3217,
7663,
2983,
2023,
1495,
13,
1678,
5142,
29898,
20683,
29897,
13,
1678,
1596,
877,
6767,
13234,
15317,
1212,
612,
29949,
3927,
18177,
2023,
1495,
13,
1678,
5142,
29898,
705,
5861,
29897,
13,
1678,
1596,
877,
6767,
13234,
385,
1342,
1967,
2023,
1495,
13,
1678,
5142,
29898,
4773,
29918,
3027,
29897,
13,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
1667,
580,
13,
2
] |
exercise070.py | AlissonRaphael/python_exercises | 0 | 157266 | print('---- Loja Super Baratão ----')
acima_mil = total = 0
barato = None
nome_protudo = ''
while True:
nome = str(input('Nome do Produto: ')).strip()
preco = float(input('Insira o Preço: R$ '))
total += preco
if preco >= 1000:
acima_mil += 1
if barato == None:
barato = preco
nome_protudo = nome
elif preco < barato:
barato = preco
nome_protudo = nome
opcao = str(input('Deseja continuar [S/N]: ')).strip().upper()[0]
if opcao == 'N':
break
print(f'Total da compra foi R$ {total:.2f}')
print(f'Quantidade de produtos custando mais de mil: {acima_mil}')
print(f'O produto mais barato foi {nome_protudo}, custando R$ {barato:.2f}')
| [
1,
1596,
877,
807,
4309,
1764,
5670,
2261,
271,
1368,
23250,
1495,
13,
13,
562,
2946,
29918,
23853,
353,
3001,
353,
29871,
29900,
13,
1646,
1219,
353,
6213,
13,
25155,
29918,
771,
29873,
5333,
353,
6629,
13,
13,
8000,
5852,
29901,
13,
29871,
9235,
353,
851,
29898,
2080,
877,
29940,
608,
437,
1019,
29881,
3066,
29901,
525,
8106,
17010,
580,
13,
29871,
758,
1111,
353,
5785,
29898,
2080,
877,
797,
1039,
336,
288,
4721,
6102,
29901,
390,
29938,
525,
876,
13,
259,
13,
29871,
3001,
4619,
758,
1111,
13,
259,
13,
29871,
565,
758,
1111,
6736,
29871,
29896,
29900,
29900,
29900,
29901,
13,
1678,
1274,
2946,
29918,
23853,
4619,
29871,
29896,
13,
259,
13,
29871,
565,
2594,
1219,
1275,
6213,
29901,
13,
1678,
2594,
1219,
353,
758,
1111,
13,
1678,
9235,
29918,
771,
29873,
5333,
353,
9235,
13,
29871,
25342,
758,
1111,
529,
2594,
1219,
29901,
13,
1678,
2594,
1219,
353,
758,
1111,
13,
1678,
9235,
29918,
771,
29873,
5333,
353,
9235,
13,
259,
13,
29871,
1015,
1113,
29877,
353,
851,
29898,
2080,
877,
29928,
968,
1764,
3133,
279,
518,
29903,
29914,
29940,
5387,
525,
8106,
17010,
2141,
21064,
580,
29961,
29900,
29962,
13,
29871,
565,
1015,
1113,
29877,
1275,
525,
29940,
2396,
13,
1678,
2867,
13,
13,
2158,
29898,
29888,
29915,
11536,
1146,
752,
336,
4732,
390,
29938,
426,
7827,
29901,
29889,
29906,
29888,
29913,
1495,
13,
2158,
29898,
29888,
29915,
22930,
5558,
316,
11859,
20864,
25387,
1743,
3503,
316,
2316,
29901,
426,
562,
2946,
29918,
23853,
29913,
1495,
13,
2158,
29898,
29888,
29915,
29949,
11859,
3066,
3503,
2594,
1219,
4732,
426,
25155,
29918,
771,
29873,
5333,
1118,
25387,
1743,
390,
29938,
426,
1646,
1219,
29901,
29889,
29906,
29888,
29913,
1495,
13,
2
] |
__main__.py | Ghostik2005/zipper | 1 | 169702 | <reponame>Ghostik2005/zipper
# coding: utf-8
__appname__ = 'zipper'
__version__ = '2017.216.1600'
import zipfile
import os
import sys
def main():
c_path = os.getcwd()
zip_name = os.path.basename(c_path) + '.zip'
if not os.path.exists('./deploy'):
print('You have to copy all files and libraries to /deploy dir')
return
os.chdir('./deploy')
z_f_name = os.path.join(c_path, zip_name)
if os.path.exists(z_f_name):
os.remove(z_f_name)
myzip = zipfile.ZipFile(z_f_name, 'a')
for file_name in gen_names():
print(file_name, end = ' --> ')
myzip.write(file_name)
print('added to %s'%zip_name, flush=True)
myzip.close()
print(zip_name, 'successfully created', flush=True)
def gen_names():
for root, dirs, files in os.walk('.', followlinks=True): # Список всех файлов и папок в директории folder
for filen in files:
qq = os.path.join(root, filen)
yield qq
if "__main__" == __name__:
main()
| [
1,
529,
276,
1112,
420,
29958,
29954,
3069,
638,
29906,
29900,
29900,
29945,
29914,
2526,
2496,
13,
29937,
14137,
29901,
23616,
29899,
29947,
13,
13,
1649,
932,
978,
1649,
353,
525,
2526,
2496,
29915,
13,
1649,
3259,
1649,
353,
525,
29906,
29900,
29896,
29955,
29889,
29906,
29896,
29953,
29889,
29896,
29953,
29900,
29900,
29915,
13,
13,
5215,
14319,
1445,
13,
5215,
2897,
13,
5215,
10876,
13,
13,
1753,
1667,
7295,
13,
1678,
274,
29918,
2084,
353,
2897,
29889,
657,
29883,
9970,
580,
13,
1678,
14319,
29918,
978,
353,
2897,
29889,
2084,
29889,
6500,
3871,
29898,
29883,
29918,
2084,
29897,
718,
15300,
7554,
29915,
13,
1678,
565,
451,
2897,
29889,
2084,
29889,
9933,
877,
6904,
16519,
29374,
13,
4706,
1596,
877,
3492,
505,
304,
3509,
599,
2066,
322,
9562,
304,
847,
16519,
4516,
1495,
13,
4706,
736,
13,
1678,
2897,
29889,
305,
3972,
877,
6904,
16519,
1495,
13,
1678,
503,
29918,
29888,
29918,
978,
353,
2897,
29889,
2084,
29889,
7122,
29898,
29883,
29918,
2084,
29892,
14319,
29918,
978,
29897,
13,
1678,
565,
2897,
29889,
2084,
29889,
9933,
29898,
29920,
29918,
29888,
29918,
978,
1125,
13,
4706,
2897,
29889,
5992,
29898,
29920,
29918,
29888,
29918,
978,
29897,
13,
13,
1678,
590,
7554,
353,
14319,
1445,
29889,
26264,
2283,
29898,
29920,
29918,
29888,
29918,
978,
29892,
525,
29874,
1495,
13,
1678,
363,
934,
29918,
978,
297,
2531,
29918,
7039,
7295,
13,
4706,
1596,
29898,
1445,
29918,
978,
29892,
1095,
353,
525,
6660,
25710,
13,
4706,
590,
7554,
29889,
3539,
29898,
1445,
29918,
978,
29897,
13,
4706,
1596,
877,
23959,
304,
1273,
29879,
29915,
29995,
7554,
29918,
978,
29892,
28371,
29922,
5574,
29897,
13,
1678,
590,
7554,
29889,
5358,
580,
13,
1678,
1596,
29898,
7554,
29918,
978,
29892,
525,
8698,
3730,
2825,
742,
28371,
29922,
5574,
29897,
13,
13,
13,
1753,
2531,
29918,
7039,
7295,
13,
1678,
363,
3876,
29892,
4516,
29879,
29892,
2066,
297,
2897,
29889,
20919,
12839,
742,
1101,
4965,
29922,
5574,
1125,
396,
22497,
23103,
6725,
29977,
3176,
606,
4554,
1268,
29951,
490,
20174,
18576,
5887,
4138,
13,
4706,
363,
977,
264,
297,
2066,
29901,
13,
9651,
3855,
29939,
353,
2897,
29889,
2084,
29889,
7122,
29898,
4632,
29892,
977,
264,
29897,
13,
9651,
7709,
3855,
29939,
13,
13,
361,
376,
1649,
3396,
1649,
29908,
1275,
4770,
978,
1649,
29901,
13,
1678,
1667,
580,
13,
2
] |
problem/01000~09999/09498/9498.py3.py | njw1204/BOJ-AC | 1 | 22733 | print(("F"*6+"DCBAA")[int(input())//10]) | [
1,
1596,
29898,
703,
29943,
29908,
29930,
29953,
13578,
12696,
5688,
29909,
1159,
29961,
524,
29898,
2080,
3101,
458,
29896,
29900,
2314,
2
] |
chg/embed/basic.py | josepablocam/changestructor | 0 | 188772 | #!/usr/bin/env python3
from argparse import ArgumentParser
import os
import subprocess
import numpy as np
from transformers import RobertaTokenizer, RobertaModel
import torch
import tqdm
from chg.db.database import get_store
# fix odd fault...
os.environ['KMP_DUPLICATE_LIB_OK'] = 'True'
def remove_color_ascii(msg):
proc = subprocess.Popen(
"sed 's/\x1b\[[0-9;]*m//g'",
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
shell=True,
)
output, _ = proc.communicate(msg.encode())
return output.decode().strip()
def normalize_vectors(mat):
# make vectors unit norm
norm = np.sqrt(np.sum(mat**2, axis=1))
# set to 1.0 to avoid nan
norm[norm == 0] = 1.0
norm_mat = mat / norm.reshape(-1, 1)
return norm_mat
class BasicEmbedder(object):
def __init__(self):
self.tokenizer = RobertaTokenizer.from_pretrained(
"microsoft/codebert-base"
)
self.model = RobertaModel.from_pretrained("microsoft/codebert-base")
self.model = self.model.to("cpu")
# self.model = self.model.eval()
self.max_len = self.model.config.max_position_embeddings
def embed_(self, txt):
tokens = [self.tokenizer.cls_token]
tokens = self.tokenizer.tokenize(txt)
# split up chunks according to max_len
embeddings = []
chunk_len = self.max_len - 4
for i in tqdm.tqdm(list(range(0, len(tokens), chunk_len))):
chunk = [self.tokenizer.cls_token]
chunk.extend(tokens[i:(i + chunk_len)])
chunk.append(self.tokenizer.sep_token)
chunk_token_ids = self.tokenizer.convert_tokens_to_ids(chunk)
with torch.no_grad():
chunk_embedding = self.model(
torch.tensor(chunk_token_ids)[None, :]
)[0]
# average over tokens
chunk_embedding = chunk_embedding.mean(dim=1)
embeddings.append(chunk_embedding)
embeddings = torch.stack(embeddings)
# average over chunks
txt_embedding = embeddings.mean(dim=0)
txt_embedding = txt_embedding.numpy()
# unit norm
txt_embedding = normalize_vectors(txt_embedding)
txt_embedding = txt_embedding.flatten()
return txt_embedding
def embed_code(self, code):
return self.embed_(remove_color_ascii(code))
def embed_nl(self, nl):
return self.embed_(nl)
def embed_dialogue(self, question_and_answers):
# empty history
if len(question_and_answers) == 0:
question_and_answers = [("", "")]
merged_dialogue = "\n".join(
"{}:{}".format(q, a) for q, a in question_and_answers
)
return self.embed_nl(merged_dialogue)
def get_args():
parser = ArgumentParser(description="Embed chg database")
return parser.parse_args()
def main():
_ = get_args()
embedder = BasicEmbedder()
store = get_store()
# need to embed every chunk
chunk_ids = store.run_query(
"SELECT id FROM Chunks WHERE chunk IS NOT NULL"
)
chunk_ids = [row[0] for row in chunk_ids]
print("Embedding code and dialogue for {} chunks".format(len(chunk_ids)))
for chunk_id in tqdm.tqdm(chunk_ids):
chunk = store.run_query(
"SELECT chunk FROM Chunks WHERE id={}".format(chunk_id)
)
assert len(chunk) == 1, "Chunks should be uniquely identified"
chunk = chunk[0]
code_embedding = embedder.embed_code(chunk[0])
# embed dialogue associated with this chunk
dialogue = store.run_query(
"SELECT question, answer FROM Dialogue WHERE chunk_id={} ORDER BY id"
.format(chunk_id)
)
assert len(dialogue) >= 1, "Should have at least one commit message"
nl_embedding = embedder.embed_dialogue(dialogue)
store.record_embeddings((chunk_id, code_embedding, nl_embedding))
if __name__ == "__main__":
try:
main()
except Exception as err:
import pdb
pdb.post_mortem()
| [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
13,
3166,
1852,
5510,
1053,
23125,
11726,
13,
5215,
2897,
13,
5215,
1014,
5014,
13,
13,
5215,
12655,
408,
7442,
13,
3166,
4327,
414,
1053,
1528,
19954,
6066,
3950,
29892,
1528,
19954,
3195,
13,
5215,
4842,
305,
13,
5215,
260,
29939,
18933,
13,
13,
3166,
521,
29887,
29889,
2585,
29889,
9803,
1053,
679,
29918,
8899,
13,
13,
29937,
2329,
7736,
12570,
856,
13,
359,
29889,
21813,
1839,
29968,
3580,
29918,
29928,
4897,
27888,
3040,
29918,
5265,
29933,
29918,
8949,
2033,
353,
525,
5574,
29915,
13,
13,
13,
1753,
3349,
29918,
2780,
29918,
294,
18869,
29898,
7645,
1125,
13,
1678,
9580,
353,
1014,
5014,
29889,
29925,
3150,
29898,
13,
4706,
376,
8485,
525,
29879,
7998,
29916,
29896,
29890,
29905,
8999,
29900,
29899,
29929,
29936,
14178,
29885,
458,
29887,
29915,
613,
13,
4706,
3659,
262,
29922,
1491,
5014,
29889,
2227,
4162,
29892,
13,
4706,
27591,
29922,
1491,
5014,
29889,
2227,
4162,
29892,
13,
4706,
6473,
29922,
5574,
29892,
13,
1678,
1723,
13,
1678,
1962,
29892,
903,
353,
9580,
29889,
27820,
403,
29898,
7645,
29889,
12508,
3101,
13,
1678,
736,
1962,
29889,
13808,
2141,
17010,
580,
13,
13,
13,
1753,
4226,
675,
29918,
345,
14359,
29898,
2922,
1125,
13,
1678,
396,
1207,
12047,
5190,
6056,
13,
1678,
6056,
353,
7442,
29889,
3676,
29898,
9302,
29889,
2083,
29898,
2922,
1068,
29906,
29892,
9685,
29922,
29896,
876,
13,
1678,
396,
731,
304,
29871,
29896,
29889,
29900,
304,
4772,
23432,
13,
1678,
6056,
29961,
12324,
1275,
29871,
29900,
29962,
353,
29871,
29896,
29889,
29900,
13,
1678,
6056,
29918,
2922,
353,
1775,
847,
6056,
29889,
690,
14443,
6278,
29896,
29892,
29871,
29896,
29897,
13,
1678,
736,
6056,
29918,
2922,
13,
13,
13,
1990,
19219,
6026,
2580,
672,
29898,
3318,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
1125,
13,
4706,
1583,
29889,
6979,
3950,
353,
1528,
19954,
6066,
3950,
29889,
3166,
29918,
1457,
3018,
1312,
29898,
13,
9651,
376,
4994,
29914,
401,
2151,
29899,
3188,
29908,
13,
4706,
1723,
13,
4706,
1583,
29889,
4299,
353,
1528,
19954,
3195,
29889,
3166,
29918,
1457,
3018,
1312,
703,
4994,
29914,
401,
2151,
29899,
3188,
1159,
13,
4706,
1583,
29889,
4299,
353,
1583,
29889,
4299,
29889,
517,
703,
21970,
1159,
13,
4706,
396,
1583,
29889,
4299,
353,
1583,
29889,
4299,
29889,
14513,
580,
13,
4706,
1583,
29889,
3317,
29918,
2435,
353,
1583,
29889,
4299,
29889,
2917,
29889,
3317,
29918,
3283,
29918,
17987,
29881,
886,
13,
13,
1678,
822,
8297,
23538,
1311,
29892,
13872,
1125,
13,
4706,
18897,
353,
518,
1311,
29889,
6979,
3950,
29889,
25932,
29918,
6979,
29962,
13,
4706,
18897,
353,
1583,
29889,
6979,
3950,
29889,
6979,
675,
29898,
3945,
29897,
13,
13,
4706,
396,
6219,
701,
521,
18801,
5034,
304,
4236,
29918,
2435,
13,
4706,
8297,
29881,
886,
353,
5159,
13,
4706,
19875,
29918,
2435,
353,
1583,
29889,
3317,
29918,
2435,
448,
29871,
29946,
13,
4706,
363,
474,
297,
260,
29939,
18933,
29889,
29873,
29939,
18933,
29898,
1761,
29898,
3881,
29898,
29900,
29892,
7431,
29898,
517,
12360,
511,
19875,
29918,
2435,
876,
1125,
13,
9651,
19875,
353,
518,
1311,
29889,
6979,
3950,
29889,
25932,
29918,
6979,
29962,
13,
9651,
19875,
29889,
21843,
29898,
517,
12360,
29961,
29875,
5919,
29875,
718,
19875,
29918,
2435,
29897,
2314,
13,
9651,
19875,
29889,
4397,
29898,
1311,
29889,
6979,
3950,
29889,
19570,
29918,
6979,
29897,
13,
9651,
19875,
29918,
6979,
29918,
4841,
353,
1583,
29889,
6979,
3950,
29889,
13441,
29918,
517,
12360,
29918,
517,
29918,
4841,
29898,
29812,
29897,
13,
9651,
411,
4842,
305,
29889,
1217,
29918,
5105,
7295,
13,
18884,
19875,
29918,
17987,
8497,
353,
1583,
29889,
4299,
29898,
13,
462,
1678,
4842,
305,
29889,
20158,
29898,
29812,
29918,
6979,
29918,
4841,
9601,
8516,
29892,
584,
29962,
13,
18884,
1723,
29961,
29900,
29962,
13,
18884,
396,
6588,
975,
18897,
13,
18884,
19875,
29918,
17987,
8497,
353,
19875,
29918,
17987,
8497,
29889,
12676,
29898,
6229,
29922,
29896,
29897,
13,
18884,
8297,
29881,
886,
29889,
4397,
29898,
29812,
29918,
17987,
8497,
29897,
13,
4706,
8297,
29881,
886,
353,
4842,
305,
29889,
1429,
29898,
17987,
29881,
886,
29897,
13,
4706,
396,
6588,
975,
521,
18801,
13,
4706,
13872,
29918,
17987,
8497,
353,
8297,
29881,
886,
29889,
12676,
29898,
6229,
29922,
29900,
29897,
13,
4706,
13872,
29918,
17987,
8497,
353,
13872,
29918,
17987,
8497,
29889,
23749,
580,
13,
4706,
396,
5190,
6056,
13,
4706,
13872,
29918,
17987,
8497,
353,
4226,
675,
29918,
345,
14359,
29898,
3945,
29918,
17987,
8497,
29897,
13,
4706,
13872,
29918,
17987,
8497,
353,
13872,
29918,
17987,
8497,
29889,
1579,
8606,
580,
13,
4706,
736,
13872,
29918,
17987,
8497,
13,
13,
1678,
822,
8297,
29918,
401,
29898,
1311,
29892,
775,
1125,
13,
4706,
736,
1583,
29889,
17987,
23538,
5992,
29918,
2780,
29918,
294,
18869,
29898,
401,
876,
13,
13,
1678,
822,
8297,
29918,
12938,
29898,
1311,
29892,
302,
29880,
1125,
13,
4706,
736,
1583,
29889,
17987,
23538,
12938,
29897,
13,
13,
1678,
822,
8297,
29918,
15901,
434,
29898,
1311,
29892,
1139,
29918,
392,
29918,
550,
17538,
1125,
13,
4706,
396,
4069,
4955,
13,
4706,
565,
7431,
29898,
12470,
29918,
392,
29918,
550,
17538,
29897,
1275,
29871,
29900,
29901,
13,
9651,
1139,
29918,
392,
29918,
550,
17538,
353,
518,
703,
613,
376,
13531,
13,
4706,
19412,
29918,
15901,
434,
353,
6634,
29876,
1642,
7122,
29898,
13,
9651,
29850,
6177,
8875,
1642,
4830,
29898,
29939,
29892,
263,
29897,
363,
3855,
29892,
263,
297,
1139,
29918,
392,
29918,
550,
17538,
13,
4706,
1723,
13,
4706,
736,
1583,
29889,
17987,
29918,
12938,
29898,
1050,
3192,
29918,
15901,
434,
29897,
13,
13,
13,
1753,
679,
29918,
5085,
7295,
13,
1678,
13812,
353,
23125,
11726,
29898,
8216,
543,
6026,
2580,
521,
29887,
2566,
1159,
13,
1678,
736,
13812,
29889,
5510,
29918,
5085,
580,
13,
13,
13,
1753,
1667,
7295,
13,
1678,
903,
353,
679,
29918,
5085,
580,
13,
1678,
8297,
672,
353,
19219,
6026,
2580,
672,
580,
13,
1678,
3787,
353,
679,
29918,
8899,
580,
13,
13,
1678,
396,
817,
304,
8297,
1432,
19875,
13,
1678,
19875,
29918,
4841,
353,
3787,
29889,
3389,
29918,
1972,
29898,
13,
4706,
376,
6404,
1178,
3895,
678,
18801,
5754,
19875,
8519,
6058,
4265,
29908,
13,
1678,
1723,
13,
1678,
19875,
29918,
4841,
353,
518,
798,
29961,
29900,
29962,
363,
1948,
297,
19875,
29918,
4841,
29962,
13,
1678,
1596,
703,
6026,
2580,
8497,
775,
322,
7928,
434,
363,
6571,
521,
18801,
1642,
4830,
29898,
2435,
29898,
29812,
29918,
4841,
4961,
13,
1678,
363,
19875,
29918,
333,
297,
260,
29939,
18933,
29889,
29873,
29939,
18933,
29898,
29812,
29918,
4841,
1125,
13,
4706,
19875,
353,
3787,
29889,
3389,
29918,
1972,
29898,
13,
9651,
376,
6404,
19875,
3895,
678,
18801,
5754,
1178,
3790,
29913,
1642,
4830,
29898,
29812,
29918,
333,
29897,
13,
4706,
1723,
13,
4706,
4974,
7431,
29898,
29812,
29897,
1275,
29871,
29896,
29892,
376,
1451,
18801,
881,
367,
20498,
873,
15659,
29908,
13,
4706,
19875,
353,
19875,
29961,
29900,
29962,
13,
4706,
775,
29918,
17987,
8497,
353,
8297,
672,
29889,
17987,
29918,
401,
29898,
29812,
29961,
29900,
2314,
13,
4706,
396,
8297,
7928,
434,
6942,
411,
445,
19875,
13,
4706,
7928,
434,
353,
3787,
29889,
3389,
29918,
1972,
29898,
13,
9651,
376,
6404,
1139,
29892,
1234,
3895,
18878,
434,
5754,
19875,
29918,
333,
3790,
29913,
15606,
6770,
1178,
29908,
13,
9651,
869,
4830,
29898,
29812,
29918,
333,
29897,
13,
4706,
1723,
13,
4706,
4974,
7431,
29898,
15901,
434,
29897,
6736,
29871,
29896,
29892,
376,
26857,
505,
472,
3203,
697,
9063,
2643,
29908,
13,
4706,
302,
29880,
29918,
17987,
8497,
353,
8297,
672,
29889,
17987,
29918,
15901,
434,
29898,
15901,
434,
29897,
13,
4706,
3787,
29889,
11651,
29918,
17987,
29881,
886,
3552,
29812,
29918,
333,
29892,
775,
29918,
17987,
8497,
29892,
302,
29880,
29918,
17987,
8497,
876,
13,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
1678,
1018,
29901,
13,
4706,
1667,
580,
13,
1678,
5174,
8960,
408,
4589,
29901,
13,
4706,
1053,
282,
2585,
13,
4706,
282,
2585,
29889,
2490,
29918,
29720,
331,
580,
13,
2
] |
Chapter 02/Chap02_Example2.30.py | Anancha/Programming-Techniques-using-Python | 0 | 84473 | <filename>Chapter 02/Chap02_Example2.30.py
#isdecimal
n1 = "947"
print(n1.isdecimal()) # -- D1
n2 = "947 2"
print(n2.isdecimal()) # -- D2
n3 = "abx123"
print(n3.isdecimal()) # -- D3
n4 = "\u0034"
print(n4.isdecimal()) # -- D4
n5 = "\u0038"
print(n5.isdecimal()) # -- D5
n6 = "\u0041"
print(n6.isdecimal()) # -- D6
n7 = "3.4"
print(n7.isdecimal()) # -- D7
n8 = "#$!@"
print(n8.isdecimal()) # -- D8
| [
1,
529,
9507,
29958,
1451,
3314,
29871,
29900,
29906,
29914,
1451,
481,
29900,
29906,
29918,
14023,
29906,
29889,
29941,
29900,
29889,
2272,
13,
29937,
275,
7099,
3039,
13,
29876,
29896,
353,
376,
29929,
29946,
29955,
29908,
13,
2158,
29898,
29876,
29896,
29889,
275,
7099,
3039,
3101,
396,
1192,
360,
29896,
13,
29876,
29906,
353,
376,
29929,
29946,
29955,
29871,
29906,
29908,
13,
2158,
29898,
29876,
29906,
29889,
275,
7099,
3039,
3101,
396,
1192,
360,
29906,
13,
29876,
29941,
353,
376,
370,
29916,
29896,
29906,
29941,
29908,
13,
2158,
29898,
29876,
29941,
29889,
275,
7099,
3039,
3101,
396,
1192,
360,
29941,
13,
29876,
29946,
353,
6634,
29884,
29900,
29900,
29941,
29946,
29908,
13,
2158,
29898,
29876,
29946,
29889,
275,
7099,
3039,
3101,
396,
1192,
360,
29946,
13,
29876,
29945,
353,
6634,
29884,
29900,
29900,
29941,
29947,
29908,
13,
2158,
29898,
29876,
29945,
29889,
275,
7099,
3039,
3101,
396,
1192,
360,
29945,
13,
29876,
29953,
353,
6634,
29884,
29900,
29900,
29946,
29896,
29908,
13,
2158,
29898,
29876,
29953,
29889,
275,
7099,
3039,
3101,
396,
1192,
360,
29953,
13,
29876,
29955,
353,
376,
29941,
29889,
29946,
29908,
13,
2158,
29898,
29876,
29955,
29889,
275,
7099,
3039,
3101,
396,
1192,
360,
29955,
13,
29876,
29947,
353,
12305,
29938,
29991,
5507,
13,
2158,
29898,
29876,
29947,
29889,
275,
7099,
3039,
3101,
396,
1192,
360,
29947,
13,
2
] |
CAAPR/CAAPR_AstroMagic/PTS/pts/modeling/config/explore.py | wdobbels/CAAPR | 7 | 150106 | <filename>CAAPR/CAAPR_AstroMagic/PTS/pts/modeling/config/explore.py
#!/usr/bin/env python
# -*- coding: utf8 -*-
# *****************************************************************
# ** PTS -- Python Toolkit for working with SKIRT **
# ** © Astronomical Observatory, Ghent University **
# *****************************************************************
# Import the relevant PTS classes and modules
from pts.core.basics.configuration import ConfigurationDefinition
# -----------------------------------------------------------------
# Create the configuration
definition = ConfigurationDefinition()
# Positional optional parameter
definition.add_positional_optional("generation_method", str, "the model generation method ('grid', 'instinctive', 'genetic')", "genetic", ["genetic", "grid", "instinctive"])
# Optional parameters
definition.add_optional("remote", str, "the remote host on which to run the parameters exploration", "nancy")
definition.add_optional("simulations", int, "the number of simulations to launch in one batch/generation", 100)
definition.add_optional("young", "real_range", "the range of the FUV luminosity of the young stellar population", (0.0, 4.e16))
definition.add_optional("ionizing", "real_range", "the range of the FUV luminosity of the ionizing stellar population", (0.0, 5.e10))
definition.add_optional("dust", "quantity_range", "the range of the dust mass", (0.5e7, 3.e7))
# Flags
definition.add_flag("relative", "whether the range values are relative to the best (or initial) parameter value")
definition.add_flag("young_log", "use logarithmic spacing of the young stellar luminosity values")
definition.add_flag("ionizing_log", "use logarithmic spacing of the ionizing stellar luminosity values")
definition.add_flag("dust_log", "use logarithmic spacing of the dust mass values")
definition.add_flag("visualise", "make visualisations")
definition.add_flag("dry", "dry-run (don't actually launch simulations)")
definition.add_flag("refine_wavelengths", "increase the resolution of the wavelength grid for the new batch of simulations")
definition.add_flag("refine_dust", "increase the resolution of the dust cell grid for the new batch of simulations")
# -----------------------------------------------------------------
| [
1,
529,
9507,
29958,
5454,
3301,
29934,
29914,
5454,
3301,
29934,
29918,
29909,
303,
307,
19095,
293,
29914,
7982,
29903,
29914,
16485,
29914,
4299,
292,
29914,
2917,
29914,
24516,
487,
29889,
2272,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29947,
448,
29930,
29899,
13,
29937,
334,
7775,
7775,
7775,
7775,
13,
29937,
3579,
539,
349,
9375,
1192,
5132,
21704,
7354,
363,
1985,
411,
18581,
8193,
29911,
3986,
3579,
13,
29937,
3579,
4706,
30211,
27348,
936,
21651,
7606,
29892,
13491,
296,
3014,
3986,
3579,
13,
29937,
334,
7775,
7775,
7775,
7775,
13,
13,
29937,
16032,
278,
8018,
349,
9375,
4413,
322,
10585,
13,
3166,
282,
1372,
29889,
3221,
29889,
6500,
1199,
29889,
13305,
1053,
20999,
14683,
13,
13,
29937,
448,
2683,
2683,
2683,
2683,
13,
13,
29937,
6204,
278,
5285,
13,
16553,
353,
20999,
14683,
580,
13,
13,
29937,
10321,
3245,
13136,
3443,
13,
16553,
29889,
1202,
29918,
1066,
3245,
29918,
25253,
703,
4738,
362,
29918,
5696,
613,
851,
29892,
376,
1552,
1904,
12623,
1158,
6702,
7720,
742,
525,
2611,
5562,
573,
742,
525,
1885,
7492,
1495,
613,
376,
1885,
7492,
613,
6796,
1885,
7492,
613,
376,
7720,
613,
376,
2611,
5562,
573,
20068,
13,
13,
29937,
28379,
4128,
13,
16553,
29889,
1202,
29918,
25253,
703,
16674,
613,
851,
29892,
376,
1552,
7592,
3495,
373,
607,
304,
1065,
278,
4128,
3902,
12418,
613,
376,
29876,
6906,
1159,
13,
16553,
29889,
1202,
29918,
25253,
703,
3601,
8250,
613,
938,
29892,
376,
1552,
1353,
310,
23876,
304,
6826,
297,
697,
9853,
29914,
4738,
362,
613,
29871,
29896,
29900,
29900,
29897,
13,
16553,
29889,
1202,
29918,
25253,
703,
6293,
865,
613,
376,
6370,
29918,
3881,
613,
376,
1552,
3464,
310,
278,
383,
29965,
29963,
19703,
8226,
537,
310,
278,
4123,
14781,
279,
4665,
613,
313,
29900,
29889,
29900,
29892,
29871,
29946,
29889,
29872,
29896,
29953,
876,
13,
16553,
29889,
1202,
29918,
25253,
703,
291,
5281,
613,
376,
6370,
29918,
3881,
613,
376,
1552,
3464,
310,
278,
383,
29965,
29963,
19703,
8226,
537,
310,
278,
16346,
5281,
14781,
279,
4665,
613,
313,
29900,
29889,
29900,
29892,
29871,
29945,
29889,
29872,
29896,
29900,
876,
13,
16553,
29889,
1202,
29918,
25253,
703,
29881,
504,
613,
376,
22640,
29918,
3881,
613,
376,
1552,
3464,
310,
278,
19786,
4158,
613,
313,
29900,
29889,
29945,
29872,
29955,
29892,
29871,
29941,
29889,
29872,
29955,
876,
13,
13,
29937,
2379,
810,
13,
16553,
29889,
1202,
29918,
15581,
703,
22925,
613,
376,
1332,
1979,
278,
3464,
1819,
526,
6198,
304,
278,
1900,
313,
272,
2847,
29897,
3443,
995,
1159,
13,
16553,
29889,
1202,
29918,
15581,
703,
6293,
865,
29918,
1188,
613,
376,
1509,
1480,
23830,
13076,
29250,
310,
278,
4123,
14781,
279,
19703,
8226,
537,
1819,
1159,
13,
16553,
29889,
1202,
29918,
15581,
703,
291,
5281,
29918,
1188,
613,
376,
1509,
1480,
23830,
13076,
29250,
310,
278,
16346,
5281,
14781,
279,
19703,
8226,
537,
1819,
1159,
13,
16553,
29889,
1202,
29918,
15581,
703,
29881,
504,
29918,
1188,
613,
376,
1509,
1480,
23830,
13076,
29250,
310,
278,
19786,
4158,
1819,
1159,
13,
16553,
29889,
1202,
29918,
15581,
703,
20119,
895,
613,
376,
5675,
7604,
275,
800,
1159,
13,
16553,
29889,
1202,
29918,
15581,
703,
29881,
719,
613,
376,
29881,
719,
29899,
3389,
313,
9176,
29915,
29873,
2869,
6826,
23876,
25760,
13,
16553,
29889,
1202,
29918,
15581,
703,
999,
457,
29918,
29893,
6447,
1477,
29879,
613,
376,
262,
1037,
559,
278,
10104,
310,
278,
281,
6447,
1477,
6856,
363,
278,
716,
9853,
310,
23876,
1159,
13,
16553,
29889,
1202,
29918,
15581,
703,
999,
457,
29918,
29881,
504,
613,
376,
262,
1037,
559,
278,
10104,
310,
278,
19786,
3038,
6856,
363,
278,
716,
9853,
310,
23876,
1159,
13,
13,
29937,
448,
2683,
2683,
2683,
2683,
13,
2
] |
textvinf/__init__.py | vikigenius/textvinf | 0 | 161476 | # -*- coding: utf-8 -*-
from typing import Any, Dict
config: Dict[str, Any] = {}
| [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
3166,
19229,
1053,
3139,
29892,
360,
919,
13,
13,
2917,
29901,
360,
919,
29961,
710,
29892,
3139,
29962,
353,
6571,
13,
13,
2
] |
stac_fastapi/extensions/stac_fastapi/extensions/core/pagination/pagination.py | borism/stac-fastapi | 64 | 160591 | <filename>stac_fastapi/extensions/stac_fastapi/extensions/core/pagination/pagination.py
"""Pagination API extension."""
from typing import List, Optional
import attr
from fastapi import FastAPI
from stac_fastapi.api.models import GETPagination, POSTPagination
from stac_fastapi.types.extension import ApiExtension
@attr.s
class PaginationExtension(ApiExtension):
"""Token Pagination.
Though not strictly an extension, the chosen pagination will modify the
form of the request object. By making pagination an extension class, we can
use create_request_model to dynamically add the correct pagination parameter
to the request model for OpenAPI generation.
"""
GET = GETPagination
POST = POSTPagination
conformance_classes: List[str] = attr.ib(factory=list)
schema_href: Optional[str] = attr.ib(default=None)
def register(self, app: FastAPI) -> None:
"""Register the extension with a FastAPI application.
Args:
app: target FastAPI application.
Returns:
None
"""
pass
| [
1,
529,
9507,
29958,
303,
562,
29918,
11255,
2754,
29914,
24299,
29914,
303,
562,
29918,
11255,
2754,
29914,
24299,
29914,
3221,
29914,
13573,
3381,
29914,
13573,
3381,
29889,
2272,
13,
15945,
29908,
29925,
351,
3381,
3450,
6081,
1213,
15945,
13,
13,
3166,
19229,
1053,
2391,
29892,
28379,
13,
13,
5215,
12421,
13,
3166,
5172,
2754,
1053,
23786,
8787,
13,
13,
3166,
380,
562,
29918,
11255,
2754,
29889,
2754,
29889,
9794,
1053,
12354,
29925,
351,
3381,
29892,
11971,
29925,
351,
3381,
13,
3166,
380,
562,
29918,
11255,
2754,
29889,
8768,
29889,
17588,
1053,
29749,
17657,
13,
13,
13,
29992,
5552,
29889,
29879,
13,
1990,
349,
351,
3381,
17657,
29898,
11713,
17657,
1125,
13,
1678,
9995,
6066,
349,
351,
3381,
29889,
13,
13,
1678,
14832,
451,
18719,
385,
6081,
29892,
278,
10434,
10203,
3381,
674,
6623,
278,
13,
1678,
883,
310,
278,
2009,
1203,
29889,
2648,
3907,
10203,
3381,
385,
6081,
770,
29892,
591,
508,
13,
1678,
671,
1653,
29918,
3827,
29918,
4299,
304,
11200,
788,
278,
1959,
10203,
3381,
3443,
13,
1678,
304,
278,
2009,
1904,
363,
4673,
8787,
12623,
29889,
13,
1678,
9995,
13,
13,
1678,
12354,
353,
12354,
29925,
351,
3381,
13,
1678,
11971,
353,
11971,
29925,
351,
3381,
13,
13,
1678,
378,
13390,
29918,
13203,
29901,
2391,
29961,
710,
29962,
353,
12421,
29889,
747,
29898,
14399,
29922,
1761,
29897,
13,
1678,
10938,
29918,
12653,
29901,
28379,
29961,
710,
29962,
353,
12421,
29889,
747,
29898,
4381,
29922,
8516,
29897,
13,
13,
1678,
822,
6036,
29898,
1311,
29892,
623,
29901,
23786,
8787,
29897,
1599,
6213,
29901,
13,
4706,
9995,
15213,
278,
6081,
411,
263,
23786,
8787,
2280,
29889,
13,
13,
4706,
826,
3174,
29901,
13,
9651,
623,
29901,
3646,
23786,
8787,
2280,
29889,
13,
13,
4706,
16969,
29901,
13,
9651,
6213,
13,
4706,
9995,
13,
4706,
1209,
13,
2
] |
problems/0589-n-ary-tree-preorder-traversal.py | tzxyz/leetcode | 0 | 120361 | <reponame>tzxyz/leetcode
from typing import List
class Node:
def __init__(self, val, children):
self.val = val
self.children = children
class Solution:
"""
给定一个 N 叉树,返回其节点值的前序遍历。
例如,给定一个 3叉树 :
{"$id":"1","children":[{"$id":"2","children":[{"$id":"5","children":[],"val":5},{"$id":"6","children":[],"val":6}],"val":3},{"$id":"3","children":[],"val":2},{"$id":"4","children":[],"val":4}],"val":1}
返回其前序遍历: [1,3,5,6,2,4]。
说明: 递归法很简单,你可以使用迭代法完成此题吗?
来源:力扣(LeetCode)
链接:https://leetcode-cn.com/problems/n-ary-tree-preorder-traversal
著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。
"""
def preorder(self, root: 'Node') -> List[int]:
"""
前序遍历递归:
1. print 节点
2. 依次调用子节点
:param root:
:return:
"""
if not root:
return []
result = [root.val]
for child in root.children:
result += self.preorder(child)
return result
| [
1,
529,
276,
1112,
420,
29958,
17559,
20230,
29914,
280,
300,
401,
13,
3166,
19229,
1053,
2391,
13,
13,
13,
1990,
9071,
29901,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
659,
29892,
4344,
1125,
13,
4706,
1583,
29889,
791,
353,
659,
13,
4706,
1583,
29889,
11991,
353,
4344,
13,
13,
13,
1990,
24380,
29901,
13,
1678,
9995,
13,
268,
31999,
30495,
30287,
30502,
405,
29871,
232,
146,
140,
233,
163,
148,
30214,
31086,
30742,
31149,
31669,
30940,
30959,
30210,
30658,
31463,
236,
132,
144,
232,
145,
137,
30267,
13,
13,
268,
31507,
30847,
30214,
31999,
30495,
30287,
30502,
30081,
29941,
232,
146,
140,
233,
163,
148,
30081,
29901,
13,
13,
1678,
8853,
29938,
333,
4710,
29896,
3284,
11991,
1115,
29961,
6377,
29938,
333,
4710,
29906,
3284,
11991,
1115,
29961,
6377,
29938,
333,
4710,
29945,
3284,
11991,
1115,
29961,
1402,
29908,
791,
1115,
29945,
1118,
6377,
29938,
333,
4710,
29953,
3284,
11991,
1115,
29961,
1402,
29908,
791,
1115,
29953,
29913,
1402,
29908,
791,
1115,
29941,
1118,
6377,
29938,
333,
4710,
29941,
3284,
11991,
1115,
29961,
1402,
29908,
791,
1115,
29906,
1118,
6377,
29938,
333,
4710,
29946,
3284,
11991,
1115,
29961,
1402,
29908,
791,
1115,
29946,
29913,
1402,
29908,
791,
1115,
29896,
29913,
30081,
13,
13,
268,
31086,
30742,
31149,
30658,
31463,
236,
132,
144,
232,
145,
137,
29901,
518,
29896,
29892,
29941,
29892,
29945,
29892,
29953,
29892,
29906,
29892,
29946,
29962,
30267,
13,
13,
268,
31639,
30592,
29901,
30081,
236,
131,
149,
232,
192,
149,
30545,
232,
193,
139,
234,
177,
131,
31166,
30214,
30919,
30682,
30651,
30785,
30406,
235,
194,
176,
30690,
30545,
31366,
30494,
31389,
31596,
232,
147,
154,
29973,
13,
13,
268,
30805,
31193,
30383,
31074,
233,
140,
166,
30419,
3226,
300,
3399,
30409,
13,
268,
236,
150,
193,
31092,
30383,
991,
597,
280,
300,
401,
29899,
18038,
29889,
510,
29914,
17199,
29879,
29914,
29876,
29899,
653,
29899,
8336,
29899,
1457,
2098,
29899,
3018,
874,
284,
13,
268,
235,
148,
154,
30732,
233,
160,
134,
232,
192,
149,
236,
165,
137,
233,
140,
166,
31222,
234,
190,
159,
30744,
30417,
30267,
31427,
31729,
31415,
31526,
31088,
31986,
31185,
31694,
30525,
233,
145,
139,
233,
160,
134,
30214,
31838,
31427,
31729,
31415,
31526,
31088,
31368,
30592,
30544,
31548,
30267,
13,
1678,
9995,
13,
1678,
822,
758,
2098,
29898,
1311,
29892,
3876,
29901,
525,
4247,
1495,
1599,
2391,
29961,
524,
5387,
13,
4706,
9995,
13,
308,
30658,
31463,
236,
132,
144,
232,
145,
137,
236,
131,
149,
232,
192,
149,
30383,
13,
308,
29896,
29889,
1596,
29871,
31669,
30940,
13,
308,
29906,
29889,
29871,
231,
193,
160,
30936,
31268,
30406,
30319,
31669,
30940,
13,
4706,
584,
3207,
3876,
29901,
13,
4706,
584,
2457,
29901,
13,
4706,
9995,
13,
4706,
565,
451,
3876,
29901,
13,
9651,
736,
5159,
13,
4706,
1121,
353,
518,
4632,
29889,
791,
29962,
13,
4706,
363,
2278,
297,
3876,
29889,
11991,
29901,
13,
9651,
1121,
4619,
1583,
29889,
1457,
2098,
29898,
5145,
29897,
13,
4706,
736,
1121,
13,
2
] |
curious_game/transformer.py | CuriosityLabTAU/physicial_curiosity | 1 | 73030 | <reponame>CuriosityLabTAU/physicial_curiosity
from curious_game import *
from nao_move import *
import random
import numpy as np
class Transformer:
def __init__(self, transform=None):
# transform is the transformation the robot performs. we start with a linear transform,
# i.e. transform is a numpy matrix
self.howie = NaoNode()
self.child = ChildKinect()
self.transform = transform
self.pose_selected = None
# self.hertzel_says = True
# def robot_performs_action(self, pose):
# # select the pose from the list of poses
# self.pose_selected = random.choice(self.howie.pose_names)
# print('selected: ', self.pose_selected)
# self.howie.move_to_pose(self.howie.poses[self.pose_selected])
def get_pose_detected_names(self):
indices = self.child.current_param
pose_detected_names = []
for i, ind in enumerate(indices):
if ind:
pose_detected_names.append(self.howie.pose_names[i])
print(self.pose_selected, 'The poses', pose_detected_names)
return pose_detected_names
def robot_performs_action(self, pose):
# select the pose from the list of poses
#self.pose_selected = random.choice(self.howie.pose_names)
if self.transform is not None:
self.pose_selected = self.transform.dot(pose)
else:
self.pose_selected = pose
print('selected_: ', self.pose_selected)
self.howie.move_to_pose(self.howie.poses[self.pose_selected])
| [
1,
529,
276,
1112,
420,
29958,
23902,
2363,
537,
28632,
6040,
29965,
29914,
14017,
5611,
29918,
2764,
2363,
537,
13,
3166,
12758,
29918,
11802,
1053,
334,
13,
3166,
1055,
29877,
29918,
11631,
1053,
334,
13,
5215,
4036,
13,
5215,
12655,
408,
7442,
13,
13,
13,
1990,
4103,
24784,
29901,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
4327,
29922,
8516,
1125,
13,
4706,
396,
4327,
338,
278,
13852,
278,
19964,
23233,
29889,
591,
1369,
411,
263,
5608,
4327,
29892,
13,
4706,
396,
29871,
474,
29889,
29872,
29889,
4327,
338,
263,
12655,
4636,
13,
4706,
1583,
29889,
3525,
347,
353,
4465,
29877,
4247,
580,
13,
4706,
1583,
29889,
5145,
353,
10517,
29968,
457,
312,
580,
13,
4706,
1583,
29889,
9067,
353,
4327,
13,
4706,
1583,
29889,
4220,
29918,
8391,
353,
6213,
13,
4706,
396,
1583,
29889,
29882,
814,
10533,
29918,
29879,
1036,
353,
5852,
13,
13,
1678,
396,
822,
19964,
29918,
546,
9514,
29918,
2467,
29898,
1311,
29892,
18593,
1125,
13,
1678,
396,
268,
396,
1831,
278,
18593,
515,
278,
1051,
310,
926,
267,
13,
1678,
396,
268,
1583,
29889,
4220,
29918,
8391,
353,
4036,
29889,
16957,
29898,
1311,
29889,
3525,
347,
29889,
4220,
29918,
7039,
29897,
13,
1678,
396,
268,
1596,
877,
8391,
29901,
13420,
1583,
29889,
4220,
29918,
8391,
29897,
13,
1678,
396,
268,
1583,
29889,
3525,
347,
29889,
11631,
29918,
517,
29918,
4220,
29898,
1311,
29889,
3525,
347,
29889,
10590,
29961,
1311,
29889,
4220,
29918,
8391,
2314,
13,
13,
1678,
822,
679,
29918,
4220,
29918,
4801,
26458,
29918,
7039,
29898,
1311,
1125,
13,
4706,
16285,
353,
1583,
29889,
5145,
29889,
3784,
29918,
3207,
13,
4706,
18593,
29918,
4801,
26458,
29918,
7039,
353,
5159,
13,
4706,
363,
474,
29892,
1399,
297,
26985,
29898,
513,
1575,
1125,
13,
9651,
565,
1399,
29901,
13,
18884,
18593,
29918,
4801,
26458,
29918,
7039,
29889,
4397,
29898,
1311,
29889,
3525,
347,
29889,
4220,
29918,
7039,
29961,
29875,
2314,
13,
4706,
1596,
29898,
1311,
29889,
4220,
29918,
8391,
29892,
525,
1576,
926,
267,
742,
18593,
29918,
4801,
26458,
29918,
7039,
29897,
13,
4706,
736,
18593,
29918,
4801,
26458,
29918,
7039,
13,
13,
1678,
822,
19964,
29918,
546,
9514,
29918,
2467,
29898,
1311,
29892,
18593,
1125,
13,
4706,
396,
1831,
278,
18593,
515,
278,
1051,
310,
926,
267,
13,
4706,
396,
1311,
29889,
4220,
29918,
8391,
353,
4036,
29889,
16957,
29898,
1311,
29889,
3525,
347,
29889,
4220,
29918,
7039,
29897,
13,
4706,
565,
1583,
29889,
9067,
338,
451,
6213,
29901,
13,
9651,
1583,
29889,
4220,
29918,
8391,
353,
1583,
29889,
9067,
29889,
6333,
29898,
4220,
29897,
13,
4706,
1683,
29901,
13,
9651,
1583,
29889,
4220,
29918,
8391,
353,
18593,
13,
4706,
1596,
877,
8391,
29918,
29901,
13420,
1583,
29889,
4220,
29918,
8391,
29897,
13,
4706,
1583,
29889,
3525,
347,
29889,
11631,
29918,
517,
29918,
4220,
29898,
1311,
29889,
3525,
347,
29889,
10590,
29961,
1311,
29889,
4220,
29918,
8391,
2314,
13,
2
] |
docs/source/usage/examples/_auto/automation/environment.py | morganjwilliams/pyrolite-meltsutil | 5 | 1600831 | <reponame>morganjwilliams/pyrolite-meltsutil<filename>docs/source/usage/examples/_auto/automation/environment.py<gh_stars>1-10
"""
alphaMELTS Environment
------------------------
"""
from pyrolite_meltsutil.env import MELTS_Env
########################################################################################
# Set up an environment for an experiment stepping down temperature from 1350 to 1000
# in 3 degree steps:
#
env = MELTS_Env()
env.MINP = 7000
env.MAXP = 7000
env.MINT = 1000
env.MAXT = 1350
env.DELTAT = -3
########################################################################################
# You can directly export these parameters to an envrionment file:
#
with open("pyrolite_envfile.txt", "w") as f:
f.write(env.to_envfile(unset_variables=False))
########################################################################################
# You can then pass this to alphamelts using
# :code:`run_alphamelts.command -f pyrolite_envfile.txt`
#
# .. seealso::
#
# Examples:
# `pyrolite-hosted alphaMELTS Installation <localinstall.html>`__,
# `Automating alphaMELTS Runs <automation.html>`__,
# `Handling Outputs from Melts: Tables <tables.html>`__,
# `Compositional Uncertainty Propagation for alphaMELTS Experiments <montecarlo.html>`__
#
| [
1,
529,
276,
1112,
420,
29958,
29885,
6388,
29926,
14043,
10909,
29914,
2272,
1467,
568,
29899,
12873,
1372,
4422,
29966,
9507,
29958,
2640,
29914,
4993,
29914,
21125,
29914,
19057,
19891,
6921,
29914,
17405,
362,
29914,
20944,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
15945,
29908,
13,
2312,
2303,
5850,
29903,
16738,
13,
2683,
1378,
13,
15945,
29908,
13,
3166,
11451,
1467,
568,
29918,
12873,
1372,
4422,
29889,
6272,
1053,
22986,
5850,
29903,
29918,
21745,
13,
13,
13383,
13383,
13383,
13383,
13383,
7346,
13,
29937,
3789,
701,
385,
5177,
363,
385,
7639,
1886,
3262,
1623,
10430,
515,
29871,
29896,
29941,
29945,
29900,
304,
29871,
29896,
29900,
29900,
29900,
13,
29937,
297,
29871,
29941,
7426,
6576,
29901,
13,
29937,
13,
6272,
353,
22986,
5850,
29903,
29918,
21745,
580,
13,
6272,
29889,
16173,
29925,
353,
29871,
29955,
29900,
29900,
29900,
13,
6272,
29889,
12648,
29925,
353,
29871,
29955,
29900,
29900,
29900,
13,
6272,
29889,
29924,
10192,
353,
29871,
29896,
29900,
29900,
29900,
13,
6272,
29889,
1529,
12188,
353,
29871,
29896,
29941,
29945,
29900,
13,
6272,
29889,
2287,
5850,
1299,
353,
448,
29941,
13,
13383,
13383,
13383,
13383,
13383,
7346,
13,
29937,
887,
508,
4153,
5609,
1438,
4128,
304,
385,
8829,
29878,
291,
358,
934,
29901,
13,
29937,
13,
2541,
1722,
703,
2272,
1467,
568,
29918,
6272,
1445,
29889,
3945,
613,
376,
29893,
1159,
408,
285,
29901,
13,
1678,
285,
29889,
3539,
29898,
6272,
29889,
517,
29918,
6272,
1445,
29898,
348,
842,
29918,
20897,
29922,
8824,
876,
13,
13383,
13383,
13383,
13383,
13383,
7346,
13,
29937,
887,
508,
769,
1209,
445,
304,
394,
561,
314,
295,
1372,
773,
13,
29937,
584,
401,
18078,
3389,
29918,
19712,
314,
295,
1372,
29889,
6519,
448,
29888,
11451,
1467,
568,
29918,
6272,
1445,
29889,
3945,
29952,
13,
29937,
13,
29937,
6317,
1074,
15189,
1057,
13,
29937,
13,
29937,
259,
1222,
9422,
29901,
13,
29937,
268,
421,
2272,
1467,
568,
29899,
3069,
287,
15595,
2303,
5850,
29903,
16052,
362,
529,
2997,
6252,
29889,
1420,
13885,
1649,
29892,
13,
29937,
268,
421,
28451,
1218,
15595,
2303,
5850,
29903,
390,
6948,
529,
17405,
362,
29889,
1420,
13885,
1649,
29892,
13,
29937,
268,
421,
3481,
1847,
10604,
29879,
515,
6286,
1372,
29901,
323,
1849,
529,
24051,
29889,
1420,
13885,
1649,
29892,
13,
29937,
268,
421,
1523,
1066,
3245,
853,
14082,
1017,
1019,
13573,
362,
363,
15595,
2303,
5850,
29903,
28224,
7862,
529,
3712,
371,
4287,
417,
29889,
1420,
13885,
1649,
13,
29937,
13,
2
] |
src/tests/fidl/source_compatibility/gen/gen.py | gongcm/fuchisa-os | 1 | 119408 | # Copyright 2020 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.
""" Implements the gen subcommand for generating tests. """
from collections import deque
from pathlib import Path
from typing import List, Dict, Set
import errors
from steps import Step, add_fidl, add_src, initialize_fidl, initialize_src
from transitions import Binding, State, Transition, Type, FIDL_ASSISTED, MIXED
from util import white
def generate_test(
library_name: str, root: Path, by_binding: Dict[Binding, Transition]):
""" Generate the source files for a source compatibility test
library_name: The FIDL library name used for this test's FIDL files. The
full library name will be fidl.test.[library_name]
root: root path where all files should be emitted.
by_binding: Describes the test: contains the Transition for each Binding.
"""
steps = weave_steps(library_name, by_binding)
print(white(f'Generating test to: {root}'))
for step in steps:
step.run(root)
# It would be possible to create a general function that can "weave" an arbitrary
# set of transitions, but given that currently the only mixed transitions are between
# FIDL assisted and source assisted transitions, this case is just hardcoded.
def weave_steps(library_name: str, by_binding: Dict[Binding,
Transition]) -> List[Step]:
transitions = set(by_binding.values())
if len(transitions) == 1:
return single_transition_to_steps(
library_name, transitions.pop(), list(by_binding.keys()))
elif transitions == {FIDL_ASSISTED, MIXED}:
return mixed_transitions_to_steps(
library_name, [b for b, t in by_binding.items() if t == MIXED],
[b for b, t in by_binding.items() if t == FIDL_ASSISTED])
else:
raise errors.InvalidTransitionSet(transitions)
def single_transition_to_steps(
library_name: str, transition: Transition,
bindings: List[Binding]) -> List[Step]:
""" Convert the specified Transition into a list of Steps for the provided Bindings. """
steps: List[Step] = [
initialize_fidl(library_name, transition.starting_fidl)
]
steps.extend(
[
initialize_src(library_name, b, transition.starting_src)
for b in bindings
])
prev_fidl = transition.starting_fidl
prev_src = transition.starting_src
for (type_, state) in transition.changes:
if type_ == Type.FIDL:
steps.append(add_fidl(prev_fidl, state))
prev_fidl = state
else:
steps.extend([add_src(b, prev_src, state) for b in bindings])
prev_src = state
return steps
def mixed_transitions_to_steps(
library_name: str, src_assisted: List[Binding],
fidl_assisted: List[Binding]) -> List[Step]:
""" Create a list of Steps given the list of source/fidl assisted bindings. """
steps: List[Step] = [initialize_fidl(library_name, State.BEFORE)]
steps.extend(
[
initialize_src(library_name, b, State.BEFORE)
for b in src_assisted + fidl_assisted
])
steps.extend([add_src(b, State.BEFORE, State.DURING) for b in src_assisted])
steps.append(add_fidl(State.BEFORE, State.DURING))
steps.extend([add_src(b, State.BEFORE, State.AFTER) for b in fidl_assisted])
steps.append(add_fidl(State.DURING, State.AFTER))
steps.extend([add_src(b, State.DURING, State.AFTER) for b in src_assisted])
return steps
| [
1,
396,
14187,
1266,
29871,
29906,
29900,
29906,
29900,
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,
15945,
29908,
1954,
9711,
278,
2531,
1014,
6519,
363,
14655,
6987,
29889,
9995,
13,
13,
3166,
16250,
1053,
316,
802,
13,
3166,
2224,
1982,
1053,
10802,
13,
3166,
19229,
1053,
2391,
29892,
360,
919,
29892,
3789,
13,
13,
5215,
4436,
13,
3166,
6576,
1053,
16696,
29892,
788,
29918,
29888,
333,
29880,
29892,
788,
29918,
4351,
29892,
11905,
29918,
29888,
333,
29880,
29892,
11905,
29918,
4351,
13,
3166,
1301,
2187,
1053,
25799,
29892,
4306,
29892,
4103,
654,
29892,
5167,
29892,
383,
1367,
29931,
29918,
22933,
9047,
3352,
29892,
341,
6415,
3352,
13,
3166,
3667,
1053,
4796,
13,
13,
13,
1753,
5706,
29918,
1688,
29898,
13,
4706,
3489,
29918,
978,
29901,
851,
29892,
3876,
29901,
10802,
29892,
491,
29918,
19672,
29901,
360,
919,
29961,
9270,
29892,
4103,
654,
29962,
1125,
13,
1678,
9995,
3251,
403,
278,
2752,
2066,
363,
263,
2752,
24521,
1243,
13,
1678,
3489,
29918,
978,
29901,
450,
383,
1367,
29931,
3489,
1024,
1304,
363,
445,
1243,
29915,
29879,
383,
1367,
29931,
2066,
29889,
450,
13,
462,
29871,
2989,
3489,
1024,
674,
367,
25947,
29880,
29889,
1688,
7226,
5258,
29918,
978,
29962,
13,
1678,
3876,
29901,
3876,
2224,
988,
599,
2066,
881,
367,
953,
4430,
29889,
13,
1678,
491,
29918,
19672,
29901,
20355,
5707,
278,
1243,
29901,
3743,
278,
4103,
654,
363,
1269,
25799,
29889,
13,
1678,
9995,
13,
1678,
6576,
353,
591,
1351,
29918,
24530,
29898,
5258,
29918,
978,
29892,
491,
29918,
19672,
29897,
13,
1678,
1596,
29898,
10921,
29898,
29888,
29915,
5631,
1218,
1243,
304,
29901,
426,
4632,
29913,
8785,
13,
1678,
363,
4331,
297,
6576,
29901,
13,
4706,
4331,
29889,
3389,
29898,
4632,
29897,
13,
13,
13,
29937,
739,
723,
367,
1950,
304,
1653,
263,
2498,
740,
393,
508,
376,
705,
1351,
29908,
385,
11472,
13,
29937,
731,
310,
1301,
2187,
29892,
541,
2183,
393,
5279,
278,
871,
12849,
1301,
2187,
526,
1546,
13,
29937,
383,
1367,
29931,
6985,
287,
322,
2752,
6985,
287,
1301,
2187,
29892,
445,
1206,
338,
925,
2898,
29659,
29889,
13,
1753,
591,
1351,
29918,
24530,
29898,
5258,
29918,
978,
29901,
851,
29892,
491,
29918,
19672,
29901,
360,
919,
29961,
9270,
29892,
13,
462,
462,
462,
1678,
4103,
654,
2314,
1599,
2391,
29961,
14448,
5387,
13,
1678,
1301,
2187,
353,
731,
29898,
1609,
29918,
19672,
29889,
5975,
3101,
13,
1678,
565,
7431,
29898,
3286,
2187,
29897,
1275,
29871,
29896,
29901,
13,
4706,
736,
2323,
29918,
20543,
29918,
517,
29918,
24530,
29898,
13,
9651,
3489,
29918,
978,
29892,
1301,
2187,
29889,
7323,
3285,
1051,
29898,
1609,
29918,
19672,
29889,
8149,
22130,
13,
1678,
25342,
1301,
2187,
1275,
426,
29943,
1367,
29931,
29918,
22933,
9047,
3352,
29892,
341,
6415,
3352,
6177,
13,
4706,
736,
12849,
29918,
3286,
2187,
29918,
517,
29918,
24530,
29898,
13,
9651,
3489,
29918,
978,
29892,
518,
29890,
363,
289,
29892,
260,
297,
491,
29918,
19672,
29889,
7076,
580,
565,
260,
1275,
341,
6415,
3352,
1402,
13,
9651,
518,
29890,
363,
289,
29892,
260,
297,
491,
29918,
19672,
29889,
7076,
580,
565,
260,
1275,
383,
1367,
29931,
29918,
22933,
9047,
3352,
2314,
13,
1678,
1683,
29901,
13,
4706,
12020,
4436,
29889,
13919,
4300,
654,
2697,
29898,
3286,
2187,
29897,
13,
13,
13,
1753,
2323,
29918,
20543,
29918,
517,
29918,
24530,
29898,
13,
4706,
3489,
29918,
978,
29901,
851,
29892,
9558,
29901,
4103,
654,
29892,
13,
4706,
7868,
886,
29901,
2391,
29961,
9270,
2314,
1599,
2391,
29961,
14448,
5387,
13,
1678,
9995,
14806,
278,
6790,
4103,
654,
964,
263,
1051,
310,
2443,
567,
363,
278,
4944,
29672,
886,
29889,
9995,
13,
1678,
6576,
29901,
2391,
29961,
14448,
29962,
353,
518,
13,
4706,
11905,
29918,
29888,
333,
29880,
29898,
5258,
29918,
978,
29892,
9558,
29889,
2962,
292,
29918,
29888,
333,
29880,
29897,
13,
1678,
4514,
13,
1678,
6576,
29889,
21843,
29898,
13,
4706,
518,
13,
9651,
11905,
29918,
4351,
29898,
5258,
29918,
978,
29892,
289,
29892,
9558,
29889,
2962,
292,
29918,
4351,
29897,
13,
9651,
363,
289,
297,
7868,
886,
13,
308,
2314,
13,
13,
1678,
12379,
29918,
29888,
333,
29880,
353,
9558,
29889,
2962,
292,
29918,
29888,
333,
29880,
13,
1678,
12379,
29918,
4351,
353,
9558,
29889,
2962,
292,
29918,
4351,
13,
1678,
363,
313,
1853,
3383,
2106,
29897,
297,
9558,
29889,
25990,
29901,
13,
4706,
565,
1134,
29918,
1275,
5167,
29889,
29943,
1367,
29931,
29901,
13,
9651,
6576,
29889,
4397,
29898,
1202,
29918,
29888,
333,
29880,
29898,
16304,
29918,
29888,
333,
29880,
29892,
2106,
876,
13,
9651,
12379,
29918,
29888,
333,
29880,
353,
2106,
13,
4706,
1683,
29901,
13,
9651,
6576,
29889,
21843,
4197,
1202,
29918,
4351,
29898,
29890,
29892,
12379,
29918,
4351,
29892,
2106,
29897,
363,
289,
297,
7868,
886,
2314,
13,
9651,
12379,
29918,
4351,
353,
2106,
13,
1678,
736,
6576,
13,
13,
13,
1753,
12849,
29918,
3286,
2187,
29918,
517,
29918,
24530,
29898,
13,
4706,
3489,
29918,
978,
29901,
851,
29892,
4765,
29918,
465,
12652,
29901,
2391,
29961,
9270,
1402,
13,
4706,
25947,
29880,
29918,
465,
12652,
29901,
2391,
29961,
9270,
2314,
1599,
2391,
29961,
14448,
5387,
13,
1678,
9995,
6204,
263,
1051,
310,
2443,
567,
2183,
278,
1051,
310,
2752,
29914,
29888,
333,
29880,
6985,
287,
7868,
886,
29889,
9995,
13,
1678,
6576,
29901,
2391,
29961,
14448,
29962,
353,
518,
24926,
29918,
29888,
333,
29880,
29898,
5258,
29918,
978,
29892,
4306,
29889,
15349,
5800,
1525,
4638,
13,
1678,
6576,
29889,
21843,
29898,
13,
4706,
518,
13,
9651,
11905,
29918,
4351,
29898,
5258,
29918,
978,
29892,
289,
29892,
4306,
29889,
15349,
5800,
1525,
29897,
13,
9651,
363,
289,
297,
4765,
29918,
465,
12652,
718,
25947,
29880,
29918,
465,
12652,
13,
308,
2314,
13,
13,
1678,
6576,
29889,
21843,
4197,
1202,
29918,
4351,
29898,
29890,
29892,
4306,
29889,
15349,
5800,
1525,
29892,
4306,
29889,
29928,
4574,
4214,
29897,
363,
289,
297,
4765,
29918,
465,
12652,
2314,
13,
1678,
6576,
29889,
4397,
29898,
1202,
29918,
29888,
333,
29880,
29898,
2792,
29889,
15349,
5800,
1525,
29892,
4306,
29889,
29928,
4574,
4214,
876,
13,
1678,
6576,
29889,
21843,
4197,
1202,
29918,
4351,
29898,
29890,
29892,
4306,
29889,
15349,
5800,
1525,
29892,
4306,
29889,
5098,
4945,
29897,
363,
289,
297,
25947,
29880,
29918,
465,
12652,
2314,
13,
1678,
6576,
29889,
4397,
29898,
1202,
29918,
29888,
333,
29880,
29898,
2792,
29889,
29928,
4574,
4214,
29892,
4306,
29889,
5098,
4945,
876,
13,
1678,
6576,
29889,
21843,
4197,
1202,
29918,
4351,
29898,
29890,
29892,
4306,
29889,
29928,
4574,
4214,
29892,
4306,
29889,
5098,
4945,
29897,
363,
289,
297,
4765,
29918,
465,
12652,
2314,
13,
13,
1678,
736,
6576,
13,
2
] |
weighted_mean_prediction/random_forest/tuning_rf.py | fegb-dataset22/dataset22 | 0 | 72710 | <reponame>fegb-dataset22/dataset22<filename>weighted_mean_prediction/random_forest/tuning_rf.py<gh_stars>0
import os.path
import sys
from typing import Callable
import pandas as pd
from matplotlib import pyplot as plt
from optuna import Study
from optuna.visualization import plot_parallel_coordinate
from optuna.visualization.matplotlib import plot_contour, plot_edf, plot_optimization_history, plot_param_importances, \
plot_slice
from hyperparameter_tuning.study_functions import load_study, save_study
from root import ROOT_DIR
from weighted_mean_prediction.data_setup import get_encoded_split_data
from weighted_mean_prediction.random_forest.rf_hyperparams import get_study1_hyperparams, get_study2_hyperparams
from weighted_mean_prediction.random_forest.rf_objective import RFObjective
def tune_rf_hyperparameters(X_train: pd.DataFrame, y_train: pd.DataFrame, get_params: Callable,
study: Study, file_path: str, n_trials: int = 20) -> None:
try:
study.optimize(RFObjective(X_train, y_train, get_params), n_trials=n_trials)
save_study(study, file_path)
except KeyboardInterrupt:
save_study(study, file_path)
best_params = study.best_params
best_score = study.best_value
print(f"Best score: {best_score}\n")
print(f"Optimized parameters: {best_params}\n")
sys.exit()
if __name__ == "__main__":
X_train, X_val, X_test, y_train, y_val, y_test = get_encoded_split_data()
X_train = pd.concat([X_train, X_val])
y_train = pd.concat([y_train, y_val])
study_dir = f"{ROOT_DIR}/weighted_mean_prediction/random_forest/studies"
study_name = f"rf_study2.joblib"
study_path = os.path.join(study_dir, study_name)
study = load_study(study_path)
while True:
tune_rf_hyperparameters(X_train, y_train["weighted_mean"], get_study2_hyperparams, study, study_path, 100)
plot_edf(study)
plot_contour(study)
plot_optimization_history(study)
plot_parallel_coordinate(study)
plot_param_importances(study)
plot_slice(study)
plt.show()
| [
1,
529,
276,
1112,
420,
29958,
29888,
387,
29890,
29899,
24713,
29906,
29906,
29914,
24713,
29906,
29906,
29966,
9507,
29958,
7915,
287,
29918,
12676,
29918,
11965,
2463,
29914,
8172,
29918,
1454,
342,
29914,
29873,
27964,
29918,
9600,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
2897,
29889,
2084,
13,
5215,
10876,
13,
3166,
19229,
1053,
8251,
519,
13,
13,
5215,
11701,
408,
10518,
13,
3166,
22889,
1053,
11451,
5317,
408,
14770,
13,
3166,
3523,
4347,
1053,
29301,
13,
3166,
3523,
4347,
29889,
20119,
2133,
1053,
6492,
29918,
23482,
29918,
29302,
13,
3166,
3523,
4347,
29889,
20119,
2133,
29889,
2922,
17357,
1053,
6492,
29918,
1285,
473,
29892,
6492,
29918,
287,
29888,
29892,
6492,
29918,
20640,
2133,
29918,
18434,
29892,
6492,
29918,
3207,
29918,
5215,
2925,
29892,
320,
13,
1678,
6492,
29918,
18337,
13,
13,
3166,
11266,
15501,
29918,
29873,
27964,
29889,
18082,
29891,
29918,
12171,
1053,
2254,
29918,
18082,
29891,
29892,
4078,
29918,
18082,
29891,
13,
3166,
3876,
1053,
16641,
2891,
29918,
9464,
13,
3166,
7688,
287,
29918,
12676,
29918,
11965,
2463,
29889,
1272,
29918,
14669,
1053,
679,
29918,
26716,
29918,
5451,
29918,
1272,
13,
3166,
7688,
287,
29918,
12676,
29918,
11965,
2463,
29889,
8172,
29918,
1454,
342,
29889,
9600,
29918,
24947,
7529,
1053,
679,
29918,
18082,
29891,
29896,
29918,
24947,
7529,
29892,
679,
29918,
18082,
29891,
29906,
29918,
24947,
7529,
13,
3166,
7688,
287,
29918,
12676,
29918,
11965,
2463,
29889,
8172,
29918,
1454,
342,
29889,
9600,
29918,
3318,
573,
1053,
390,
29943,
2061,
573,
13,
13,
13,
1753,
260,
1540,
29918,
9600,
29918,
24947,
16744,
29898,
29990,
29918,
14968,
29901,
10518,
29889,
17271,
29892,
343,
29918,
14968,
29901,
10518,
29889,
17271,
29892,
679,
29918,
7529,
29901,
8251,
519,
29892,
13,
462,
9651,
6559,
29901,
29301,
29892,
934,
29918,
2084,
29901,
851,
29892,
302,
29918,
3626,
1338,
29901,
938,
353,
29871,
29906,
29900,
29897,
1599,
6213,
29901,
13,
1678,
1018,
29901,
13,
4706,
6559,
29889,
20640,
675,
29898,
29934,
29943,
2061,
573,
29898,
29990,
29918,
14968,
29892,
343,
29918,
14968,
29892,
679,
29918,
7529,
511,
302,
29918,
3626,
1338,
29922,
29876,
29918,
3626,
1338,
29897,
13,
4706,
4078,
29918,
18082,
29891,
29898,
18082,
29891,
29892,
934,
29918,
2084,
29897,
13,
1678,
5174,
7670,
3377,
4074,
6685,
29901,
13,
4706,
4078,
29918,
18082,
29891,
29898,
18082,
29891,
29892,
934,
29918,
2084,
29897,
13,
4706,
1900,
29918,
7529,
353,
6559,
29889,
13318,
29918,
7529,
13,
4706,
1900,
29918,
13628,
353,
6559,
29889,
13318,
29918,
1767,
13,
4706,
1596,
29898,
29888,
29908,
25353,
8158,
29901,
426,
13318,
29918,
13628,
1012,
29876,
1159,
13,
4706,
1596,
29898,
29888,
29908,
20624,
326,
1891,
4128,
29901,
426,
13318,
29918,
7529,
1012,
29876,
1159,
13,
4706,
10876,
29889,
13322,
580,
13,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
1678,
1060,
29918,
14968,
29892,
1060,
29918,
791,
29892,
1060,
29918,
1688,
29892,
343,
29918,
14968,
29892,
343,
29918,
791,
29892,
343,
29918,
1688,
353,
679,
29918,
26716,
29918,
5451,
29918,
1272,
580,
13,
1678,
1060,
29918,
14968,
353,
10518,
29889,
17685,
4197,
29990,
29918,
14968,
29892,
1060,
29918,
791,
2314,
13,
1678,
343,
29918,
14968,
353,
10518,
29889,
17685,
4197,
29891,
29918,
14968,
29892,
343,
29918,
791,
2314,
13,
13,
1678,
6559,
29918,
3972,
353,
285,
29908,
29912,
21289,
29918,
9464,
6822,
7915,
287,
29918,
12676,
29918,
11965,
2463,
29914,
8172,
29918,
1454,
342,
29914,
18082,
583,
29908,
13,
1678,
6559,
29918,
978,
353,
285,
29908,
9600,
29918,
18082,
29891,
29906,
29889,
9057,
1982,
29908,
13,
1678,
6559,
29918,
2084,
353,
2897,
29889,
2084,
29889,
7122,
29898,
18082,
29891,
29918,
3972,
29892,
6559,
29918,
978,
29897,
13,
13,
1678,
6559,
353,
2254,
29918,
18082,
29891,
29898,
18082,
29891,
29918,
2084,
29897,
13,
13,
1678,
1550,
5852,
29901,
13,
4706,
260,
1540,
29918,
9600,
29918,
24947,
16744,
29898,
29990,
29918,
14968,
29892,
343,
29918,
14968,
3366,
7915,
287,
29918,
12676,
12436,
679,
29918,
18082,
29891,
29906,
29918,
24947,
7529,
29892,
6559,
29892,
6559,
29918,
2084,
29892,
29871,
29896,
29900,
29900,
29897,
13,
13,
4706,
6492,
29918,
287,
29888,
29898,
18082,
29891,
29897,
13,
4706,
6492,
29918,
1285,
473,
29898,
18082,
29891,
29897,
13,
4706,
6492,
29918,
20640,
2133,
29918,
18434,
29898,
18082,
29891,
29897,
13,
4706,
6492,
29918,
23482,
29918,
29302,
29898,
18082,
29891,
29897,
13,
4706,
6492,
29918,
3207,
29918,
5215,
2925,
29898,
18082,
29891,
29897,
13,
4706,
6492,
29918,
18337,
29898,
18082,
29891,
29897,
13,
4706,
14770,
29889,
4294,
580,
13,
2
] |
tpDcc/tools/datalibrary/widgets/save.py | tpDcc/tpDcc-tools-datalibrary | 0 | 39782 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
"""
Module that contains base save widget for data items
"""
from __future__ import print_function, division, absolute_import
import os
import logging
import traceback
from Qt.QtCore import Signal, QSize
from Qt.QtWidgets import QSizePolicy, QFrame, QDialogButtonBox, QFileDialog
from tpDcc import dcc
from tpDcc.managers import resources
from tpDcc.libs.resources.core import theme
from tpDcc.libs.python import decorators
from tpDcc.libs.qt.core import base, qtutils
from tpDcc.libs.qt.widgets import layouts, label, buttons, formwidget, messagebox, snapshot
from tpDcc.tools.datalibrary.core import utils
from tpDcc.tools.datalibrary.widgets import sequence
LOGGER = logging.getLogger('tpDcc-libs-datalibrary')
class _MetaSaveWidget(type):
def __call__(self, *args, **kwargs):
as_class = kwargs.get('as_class', False)
if dcc.client().is_maya():
from tpDcc.tools.datalibrary.dccs.maya.widgets import save
if as_class:
return save.MayaSaveWidget
else:
return type.__call__(save.MayaSaveWidget, *args, **kwargs)
else:
if as_class:
return BaseSaveWidget
else:
return type.__call__(BaseSaveWidget, *args, **kwargs)
@theme.mixin
class BaseSaveWidget(base.BaseWidget, object):
cancelled = Signal()
saved = Signal()
ENABLE_THUMBNAIL_CAPTURE = True
def __init__(self, item_view, client=None, *args, **kwargs):
self._item_view = item_view
self._client = client
self._form_widget = None
self._sequence_widget = None
super(BaseSaveWidget, self).__init__(*args, **kwargs)
self.setObjectName('LibrarySaveWidget')
self._create_sequence_widget()
self.update_thumbnail_size()
self.set_item_view(item_view)
# ============================================================================================================
# OVERRIDES
# ============================================================================================================
def get_main_layout(self):
return layouts.VerticalLayout(spacing=4, margins=(0, 0, 0, 0))
def ui(self):
super(BaseSaveWidget, self).ui()
self.setWindowTitle('Save Item')
title_frame = QFrame(self)
title_frame_layout = layouts.VerticalLayout(spacing=0, margins=(0, 0, 0, 0))
title_frame.setLayout(title_frame_layout)
title_widget = QFrame(self)
title_layout = layouts.VerticalLayout(spacing=0, margins=(0, 0, 0, 0))
title_widget.setLayout(title_layout)
title_buttons_layout = layouts.HorizontalLayout(spacing=0, margins=(0, 0, 0, 0))
title_layout.addLayout(title_buttons_layout)
title_icon = label.BaseLabel(parent=self)
title_button = label.BaseLabel(self.item().menu_name(), parent=self)
title_button.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Preferred)
self._menu_button = buttons.BaseButton(parent=self)
self._menu_button.setIcon(resources.icon('menu_dots'))
self._menu_button.setVisible(False) # Hide by default
title_buttons_layout.addWidget(title_icon)
title_buttons_layout.addSpacing(5)
title_buttons_layout.addWidget(title_button)
title_buttons_layout.addWidget(self._menu_button)
title_frame_layout.addWidget(title_widget)
item_icon_name = self.item().icon() or 'tpDcc'
item_icon = resources.icon(item_icon_name)
if not item_icon:
item_icon = resources.icon('tpDcc')
title_icon.setPixmap(item_icon.pixmap(QSize(20, 20)))
thumbnail_layout = layouts.HorizontalLayout(spacing=0, margins=(0, 0, 0, 0))
self._thumbnail_frame = QFrame(self)
thumbnail_frame_layout = layouts.VerticalLayout(spacing=0, margins=(0, 2, 0, 2))
self._thumbnail_frame.setLayout(thumbnail_frame_layout)
thumbnail_layout.addWidget(self._thumbnail_frame)
self._options_frame = QFrame(self)
options_frame_layout = layouts.VerticalLayout(spacing=0, margins=(4, 2, 4, 2))
self._options_frame.setLayout(options_frame_layout)
preview_buttons_frame = QFrame(self)
self._preview_buttons_layout = layouts.HorizontalLayout(spacing=0, margins=(4, 2, 4, 2))
preview_buttons_frame.setLayout(self._preview_buttons_layout)
self._save_button = buttons.BaseButton('Save', parent=self)
self._save_button.setIcon(resources.icon('save'))
self._cancel_button = buttons.BaseButton('Cancel', parent=self)
self._cancel_button.setIcon(resources.icon('cancel'))
self._preview_buttons_layout.addStretch()
self._preview_buttons_layout.addWidget(self._save_button)
self._preview_buttons_layout.addStretch()
self._preview_buttons_layout.addWidget(self._cancel_button)
self._preview_buttons_layout.addStretch()
self.main_layout.addWidget(title_frame)
self.main_layout.addLayout(thumbnail_layout)
self.main_layout.addWidget(self._options_frame)
self.main_layout.addWidget(preview_buttons_frame)
def setup_signals(self):
self._menu_button.clicked.connect(self._on_show_menu)
self._save_button.clicked.connect(self._on_save)
self._cancel_button.clicked.connect(self._on_cancel)
def resizeEvent(self, event):
"""
Overrides base QWidget resizeEvent function
:param event: QResizeEvent
"""
self.update_thumbnail_size()
def close(self):
"""
Overrides base QWidget close function to disable script job when its is done
"""
if self._form_widget:
self._form_widget.save_persistent_values()
super(BaseSaveWidget, self).close()
# ============================================================================================================
# BASE
# ============================================================================================================
def folder_path(self):
"""
Returns the folder path
:return: str
"""
return self.form_widget().value('folder')
def set_folder_path(self, path):
"""
Sets the destination folder path
:param path: str
"""
self.form_widget().set_value('folder', path)
def set_thumbnail_path(self, path):
"""
Sets the path to the thumbnail image or the image sequence directory
:param path: str
"""
file_name, extension = os.path.splitext(path)
target = utils.temp_path('thumbnail{}'.format(extension))
utils.copy_path(path, target, force=True)
self._sequence_widget.set_path(target)
def library_window(self):
"""
Returns library widget window for the item
:return: LibraryWindow
"""
return self.item_view().library_window()
def set_library_window(self, library_window):
"""
Sets the library widget for the item
:param library_window: LibraryWindow
"""
self.item_view().set_library_window(library_window)
def form_widget(self):
"""
Returns the form widget instance
:return: FormWidget
"""
return self._form_widget
def item(self):
"""
Returns current item
:return:
"""
return self.item_view().item
def item_view(self):
"""
Returns the current item view
:return: LibraryItem
"""
return self._item_view
def set_item_view(self, item_view):
"""
Sets the base item to be created
:param item_view: LibraryItem
"""
self._item_view = item_view
if os.path.exists(item_view.image_sequence_path()):
self.set_thumbnail_path(item_view.image_sequence_path())
elif not item_view.is_default_thumbnail_path():
self.set_thumbnail_path(item_view.thumbnail_path())
schema = self.item().save_schema()
if schema:
form_widget = formwidget.FormWidget(self)
form_widget.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
form_widget.set_schema(schema)
form_widget.set_validator(self.item().save_validator)
# item_name = os.path.basename(item.path())
# form_widget.set_values({'name': item_name})
self._options_frame.layout().addWidget(form_widget)
form_widget.validate()
self._form_widget = form_widget
else:
self._options_frame.setVisible(False)
def update_thumbnail_size(self):
"""
Updates the thumbnail button to teh size of the widget
"""
width = self.width() - 10
if width > 250:
width = 250
size = QSize(width, width)
if self._sequence_widget:
self._sequence_widget.setIconSize(size)
self._sequence_widget.setMaximumSize(size)
self._thumbnail_frame.setMaximumSize(size)
def show_thumbnail_capture_dialog(self):
"""
Asks the user if they would like to capture a thumbnail
:return: int
"""
buttons = QDialogButtonBox.Yes | QDialogButtonBox.Ignore | QDialogButtonBox.Cancel
parent = self.item_view().library_window()
btn = messagebox.MessageBox.question(
parent, 'Create a thumbnail', 'Would you like to capture a thumbnail?', buttons=buttons)
if btn == QDialogButtonBox.Yes:
self.thumbnail_capture()
return btn
def show_by_frame_dialog(self):
"""
Show the by frame dialog
"""
help_text = """
To help speed up the playblast you can set the "by frame" to another greater than 1.
For example if the "by frame" is set to 2 it will playblast every second frame
"""
result = None
options = self.form_widget().values()
by_frame = options.get('byFrame', 1)
start_frame, end_frame = options.get('frameRange', [None, None])
duration = end_frame - start_frame if start_frame is not None and end_frame is not None else 1
if duration > 100 and by_frame == 1:
buttons = QDialogButtonBox.Ok | QDialogButtonBox.Cancel
result = messagebox.MessageBox.question(
self.library_window(), title='Tip', text=help_text, buttons=buttons, enable_dont_show_checkbox=True
)
return result
def thumbnail_capture(self, show=False):
"""
Captures a playblast and saves it to the temporal thumbnail path
:param show: bool
"""
options = self.form_widget().values()
start_frame, end_frame = options.get('frameRange', [None, None])
step = options.get('byFrame', 1)
if not qtutils.is_control_modifier():
result = self.show_by_frame_dialog()
if result == QDialogButtonBox.Cancel:
return
path = utils.temp_path('sequence', 'thumbnail.jpg')
try:
snapshot.SnapshotWindow(path=path, on_save=self._on_thumbnail_captured)
# thumbnail.ThumbnailCaptureDialog.thumbnail_capture(
# path=self._temp_path,
# show=show,
# start_frame=start_frame,
# end_frame=end_frame,
# step=step,
# clear_cache=False,
# captured=self._on_thumbnail_captured
# )
except Exception as e:
messagebox.MessageBox.critical(self.library_window(), 'Error while capturing thumbnail', str(e))
LOGGER.error(traceback.format_exc())
def save(self, path, thumbnail):
"""
Saves the item with the given objects to the given disk location path
:param path: str
:param thumbnail: str
"""
kwargs = self.form_widget().values()
sequence_path = self._sequence_widget.dirname()
item_view = self.item_view()
item_view.item_view.path = path
library_window = self.library_window()
valid_save = item_view.safe_save(thumbnail=thumbnail, sequence_path=sequence_path, **kwargs)
if valid_save:
if library_window:
library_window.refresh()
library_window.select_folder_path(path)
self.saved.emit()
self.close()
# ============================================================================================================
# INTERNAL
# ============================================================================================================
def _create_sequence_widget(self):
"""
Internal function that creates a sequence widget to replace the static thumbnail widget
"""
self._sequence_widget = sequence.ImageSequenceWidget(self)
self._sequence_widget.setObjectName('thumbnailButton')
self._thumbnail_frame.layout().insertWidget(0, self._sequence_widget)
self._sequence_widget.clicked.connect(self._on_thumbnail_capture)
self._sequence_widget.setToolTip(
'Click to capture a thumbnail from the current model panel.\n'
'CTRL + Click to show the capture window for better framing.')
camera_icon = resources.get('icons', self.theme().style(), 'camera.png')
expand_icon = resources.get('icons', self.theme().style(), 'full_screen.png')
folder_icon = resources.get('icons', self.theme().style(), 'folder.png')
self._sequence_widget.addAction(
camera_icon, 'Capture new image', 'Capture new image', self._on_thumbnail_capture)
self._sequence_widget.addAction(
expand_icon, 'Show Capture window', 'Show Capture window', self._on_show_capture_window)
self._sequence_widget.addAction(
folder_icon, 'Load image from disk', 'Load image from disk', self._on_show_browse_image_dialog)
self._sequence_widget.setIcon(resources.icon('tpdcc'))
# ============================================================================================================
# CALLBACKS
# ============================================================================================================
def _on_show_menu(self):
"""
Internal callback function that is called when menu button is clicked byu the user
:return: QAction
"""
pass
def _on_save(self):
if not self.library_window():
return False
library = self.library_window().library()
if not library:
return False
try:
self.form_widget().validate()
if self.form_widget().has_errors():
raise Exception('\n'.join(self.form_widget().errors()))
has_frames = self._sequence_widget.has_frames()
if not has_frames and self.ENABLE_THUMBNAIL_CAPTURE:
button = self.show_thumbnail_capture_dialog()
if button == QDialogButtonBox.Cancel:
return False
name = self.form_widget().value('name')
folder = self.form_widget().value('folder')
comment = self.form_widget().value('comment') or ''
extension = self.item().extension()
if extension and not name.endswith(extension):
name = '{}{}'.format(name, extension)
path = folder + '/' + name
thumbnail = self._sequence_widget.first_frame()
save_item = library.get(path, only_extension=True)
save_function = save_item.functionality().get('save')
if not save_function:
LOGGER.warning('Item "{}" does not supports save operation'.format(save_item))
return False
library_path = self.item().library.identifier
if not library_path or not os.path.isfile(library_path):
LOGGER.warning('Impossible to save data "{}" because its library does not exists: "{}"'.format(
self.item(), library_path))
return
values = self.form_widget().values()
try:
if self._client:
success, message, dependencies = self._client().save_data(
library_path=library_path, data_path=path, values=values)
if not success:
messagebox.MessageBox.critical(self.library_window(), 'Error while saving', str(message))
LOGGER.error(str(message))
return False
else:
dependencies = save_function(**values)
except Exception as exc:
messagebox.MessageBox.critical(self.library_window(), 'Error while saving', str(exc))
LOGGER.error(traceback.format_exc())
return False
except Exception as exc:
messagebox.MessageBox.critical(self.library_window(), 'Error while saving', str(exc))
LOGGER.error(traceback.format_exc())
raise
new_item_path = save_item.format_identifier()
if not new_item_path or not os.path.isfile(new_item_path):
LOGGER.warning('Although saving process for item "{}" was completed, '
'it seems no new data has been generated!'.format(save_item))
self.saved.emit()
return False
save_item.library.add(new_item_path)
# # TODO: Instead of creating a local version, we will use a git system to upload our data to our project repo
# # TODO: Should we save new versions of dependencies too?
# valid = save_item.create_version(comment=comment)
# if not valid:
# LOGGER.warning('Impossible to store new version for data "{}"'.format(save_item))
if thumbnail and os.path.isfile(thumbnail):
save_item.store_thumbnail(thumbnail)
self.library_window().sync()
save_item.update_dependencies(dependencies=dependencies)
self.saved.emit()
return True
def _on_cancel(self):
self.cancelled.emit()
self.close()
def _on_thumbnail_capture(self):
"""
Internal callback function that is called when a thumbnail capture must be done
"""
self.thumbnail_capture(show=False)
def _on_thumbnail_captured(self, captured_path):
"""
Internal callback function that is called when thumbnail is captured
:param captured_path: str
"""
thumb_path = os.path.dirname(captured_path)
self.set_thumbnail_path(thumb_path)
def _on_show_capture_window(self):
"""
Internal callback function that shows the capture window for framing
"""
self.thumbnail_capture(show=True)
def _on_show_browse_image_dialog(self):
"""
Internal callback function that shows a file dialog for choosing an image from disk
"""
file_dialog = QFileDialog(self, caption='Open Image', filter='Image Files (*.png *.jpg)')
file_dialog.fileSelected.connect(self.set_thumbnail_path)
file_dialog.exec_()
@decorators.add_metaclass(_MetaSaveWidget)
class SaveWidget(object):
pass
| [
1,
396,
29991,
847,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
15945,
29908,
13,
7355,
393,
3743,
2967,
4078,
11109,
363,
848,
4452,
13,
15945,
29908,
13,
13,
3166,
4770,
29888,
9130,
1649,
1053,
1596,
29918,
2220,
29892,
8542,
29892,
8380,
29918,
5215,
13,
13,
5215,
2897,
13,
5215,
12183,
13,
5215,
9637,
1627,
13,
13,
3166,
14705,
29889,
17303,
9203,
1053,
9954,
284,
29892,
660,
3505,
13,
3166,
14705,
29889,
17303,
8801,
29879,
1053,
660,
3505,
15644,
29892,
660,
4308,
29892,
660,
7647,
3125,
3313,
29892,
660,
2283,
7647,
13,
13,
3166,
260,
29886,
29928,
617,
1053,
270,
617,
13,
3166,
260,
29886,
29928,
617,
29889,
1171,
18150,
1053,
7788,
13,
3166,
260,
29886,
29928,
617,
29889,
10254,
29889,
13237,
29889,
3221,
1053,
10929,
13,
3166,
260,
29886,
29928,
617,
29889,
10254,
29889,
4691,
1053,
10200,
4097,
13,
3166,
260,
29886,
29928,
617,
29889,
10254,
29889,
17915,
29889,
3221,
1053,
2967,
29892,
3855,
29873,
13239,
13,
3166,
260,
29886,
29928,
617,
29889,
10254,
29889,
17915,
29889,
8030,
29879,
1053,
5912,
29879,
29892,
3858,
29892,
9828,
29892,
883,
8030,
29892,
2643,
1884,
29892,
22395,
13,
13,
3166,
260,
29886,
29928,
617,
29889,
8504,
29889,
29881,
2075,
6357,
29889,
3221,
1053,
3667,
29879,
13,
3166,
260,
29886,
29928,
617,
29889,
8504,
29889,
29881,
2075,
6357,
29889,
8030,
29879,
1053,
5665,
13,
13,
14480,
17070,
353,
12183,
29889,
657,
16363,
877,
9392,
29928,
617,
29899,
10254,
29899,
29881,
2075,
6357,
1495,
13,
13,
13,
1990,
903,
19346,
11371,
8801,
29898,
1853,
1125,
13,
13,
1678,
822,
4770,
4804,
12035,
1311,
29892,
334,
5085,
29892,
3579,
19290,
1125,
13,
4706,
408,
29918,
1990,
353,
9049,
5085,
29889,
657,
877,
294,
29918,
1990,
742,
7700,
29897,
13,
4706,
565,
270,
617,
29889,
4645,
2141,
275,
29918,
29885,
9010,
7295,
13,
9651,
515,
260,
29886,
29928,
617,
29889,
8504,
29889,
29881,
2075,
6357,
29889,
29881,
617,
29879,
29889,
29885,
9010,
29889,
8030,
29879,
1053,
4078,
13,
9651,
565,
408,
29918,
1990,
29901,
13,
18884,
736,
4078,
29889,
29924,
9010,
11371,
8801,
13,
9651,
1683,
29901,
13,
18884,
736,
1134,
17255,
4804,
12035,
7620,
29889,
29924,
9010,
11371,
8801,
29892,
334,
5085,
29892,
3579,
19290,
29897,
13,
4706,
1683,
29901,
13,
9651,
565,
408,
29918,
1990,
29901,
13,
18884,
736,
7399,
11371,
8801,
13,
9651,
1683,
29901,
13,
18884,
736,
1134,
17255,
4804,
12035,
5160,
11371,
8801,
29892,
334,
5085,
29892,
3579,
19290,
29897,
13,
13,
13,
29992,
18193,
29889,
28084,
262,
13,
1990,
7399,
11371,
8801,
29898,
3188,
29889,
5160,
8801,
29892,
1203,
1125,
13,
13,
1678,
12611,
839,
353,
9954,
284,
580,
13,
1678,
7160,
353,
9954,
284,
580,
13,
13,
1678,
12524,
6181,
29918,
4690,
5005,
29933,
3521,
6227,
29918,
29907,
3301,
29911,
11499,
353,
5852,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
2944,
29918,
1493,
29892,
3132,
29922,
8516,
29892,
334,
5085,
29892,
3579,
19290,
1125,
13,
13,
4706,
1583,
3032,
667,
29918,
1493,
353,
2944,
29918,
1493,
13,
4706,
1583,
3032,
4645,
353,
3132,
13,
4706,
1583,
3032,
689,
29918,
8030,
353,
6213,
13,
4706,
1583,
3032,
16506,
29918,
8030,
353,
6213,
13,
13,
4706,
2428,
29898,
5160,
11371,
8801,
29892,
1583,
467,
1649,
2344,
1649,
10456,
5085,
29892,
3579,
19290,
29897,
13,
13,
4706,
1583,
29889,
842,
2061,
1170,
877,
12284,
11371,
8801,
1495,
13,
13,
4706,
1583,
3032,
3258,
29918,
16506,
29918,
8030,
580,
13,
4706,
1583,
29889,
5504,
29918,
386,
21145,
29918,
2311,
580,
13,
4706,
1583,
29889,
842,
29918,
667,
29918,
1493,
29898,
667,
29918,
1493,
29897,
13,
13,
1678,
396,
1275,
9166,
9166,
9166,
9166,
9166,
9166,
4936,
1360,
13,
1678,
396,
438,
5348,
29934,
1367,
2890,
13,
1678,
396,
1275,
9166,
9166,
9166,
9166,
9166,
9166,
4936,
1360,
13,
13,
1678,
822,
679,
29918,
3396,
29918,
2680,
29898,
1311,
1125,
13,
4706,
736,
5912,
29879,
29889,
29270,
3453,
29898,
1028,
9390,
29922,
29946,
29892,
15276,
1144,
7607,
29900,
29892,
29871,
29900,
29892,
29871,
29900,
29892,
29871,
29900,
876,
13,
13,
1678,
822,
14313,
29898,
1311,
1125,
13,
4706,
2428,
29898,
5160,
11371,
8801,
29892,
1583,
467,
1481,
580,
13,
13,
4706,
1583,
29889,
842,
5907,
7030,
877,
11371,
10976,
1495,
13,
13,
4706,
3611,
29918,
2557,
353,
660,
4308,
29898,
1311,
29897,
13,
4706,
3611,
29918,
2557,
29918,
2680,
353,
5912,
29879,
29889,
29270,
3453,
29898,
1028,
9390,
29922,
29900,
29892,
15276,
1144,
7607,
29900,
29892,
29871,
29900,
29892,
29871,
29900,
29892,
29871,
29900,
876,
13,
4706,
3611,
29918,
2557,
29889,
842,
3453,
29898,
3257,
29918,
2557,
29918,
2680,
29897,
13,
4706,
3611,
29918,
8030,
353,
660,
4308,
29898,
1311,
29897,
13,
4706,
3611,
29918,
2680,
353,
5912,
29879,
29889,
29270,
3453,
29898,
1028,
9390,
29922,
29900,
29892,
15276,
1144,
7607,
29900,
29892,
29871,
29900,
29892,
29871,
29900,
29892,
29871,
29900,
876,
13,
4706,
3611,
29918,
8030,
29889,
842,
3453,
29898,
3257,
29918,
2680,
29897,
13,
4706,
3611,
29918,
4187,
7453,
29918,
2680,
353,
5912,
29879,
29889,
24932,
3453,
29898,
1028,
9390,
29922,
29900,
29892,
15276,
1144,
7607,
29900,
29892,
29871,
29900,
29892,
29871,
29900,
29892,
29871,
29900,
876,
13,
4706,
3611,
29918,
2680,
29889,
1202,
3453,
29898,
3257,
29918,
4187,
7453,
29918,
2680,
29897,
13,
4706,
3611,
29918,
4144,
353,
3858,
29889,
5160,
4775,
29898,
3560,
29922,
1311,
29897,
13,
4706,
3611,
29918,
3092,
353,
3858,
29889,
5160,
4775,
29898,
1311,
29889,
667,
2141,
6510,
29918,
978,
3285,
3847,
29922,
1311,
29897,
13,
4706,
3611,
29918,
3092,
29889,
842,
3505,
15644,
29898,
29984,
3505,
15644,
29889,
29777,
292,
29892,
660,
3505,
15644,
29889,
6572,
14373,
29897,
13,
4706,
1583,
3032,
6510,
29918,
3092,
353,
9828,
29889,
5160,
3125,
29898,
3560,
29922,
1311,
29897,
13,
4706,
1583,
3032,
6510,
29918,
3092,
29889,
842,
12492,
29898,
13237,
29889,
4144,
877,
6510,
29918,
7778,
8785,
13,
4706,
1583,
3032,
6510,
29918,
3092,
29889,
842,
12911,
29898,
8824,
29897,
268,
396,
379,
680,
491,
2322,
13,
4706,
3611,
29918,
4187,
7453,
29918,
2680,
29889,
1202,
8801,
29898,
3257,
29918,
4144,
29897,
13,
4706,
3611,
29918,
4187,
7453,
29918,
2680,
29889,
1202,
5592,
9390,
29898,
29945,
29897,
13,
4706,
3611,
29918,
4187,
7453,
29918,
2680,
29889,
1202,
8801,
29898,
3257,
29918,
3092,
29897,
13,
4706,
3611,
29918,
4187,
7453,
29918,
2680,
29889,
1202,
8801,
29898,
1311,
3032,
6510,
29918,
3092,
29897,
13,
4706,
3611,
29918,
2557,
29918,
2680,
29889,
1202,
8801,
29898,
3257,
29918,
8030,
29897,
13,
13,
4706,
2944,
29918,
4144,
29918,
978,
353,
1583,
29889,
667,
2141,
4144,
580,
470,
525,
9392,
29928,
617,
29915,
13,
4706,
2944,
29918,
4144,
353,
7788,
29889,
4144,
29898,
667,
29918,
4144,
29918,
978,
29897,
13,
4706,
565,
451,
2944,
29918,
4144,
29901,
13,
9651,
2944,
29918,
4144,
353,
7788,
29889,
4144,
877,
9392,
29928,
617,
1495,
13,
4706,
3611,
29918,
4144,
29889,
842,
29925,
861,
1958,
29898,
667,
29918,
4144,
29889,
29886,
861,
1958,
29898,
29984,
3505,
29898,
29906,
29900,
29892,
29871,
29906,
29900,
4961,
13,
13,
4706,
266,
21145,
29918,
2680,
353,
5912,
29879,
29889,
24932,
3453,
29898,
1028,
9390,
29922,
29900,
29892,
15276,
1144,
7607,
29900,
29892,
29871,
29900,
29892,
29871,
29900,
29892,
29871,
29900,
876,
13,
4706,
1583,
3032,
386,
21145,
29918,
2557,
353,
660,
4308,
29898,
1311,
29897,
13,
4706,
266,
21145,
29918,
2557,
29918,
2680,
353,
5912,
29879,
29889,
29270,
3453,
29898,
1028,
9390,
29922,
29900,
29892,
15276,
1144,
7607,
29900,
29892,
29871,
29906,
29892,
29871,
29900,
29892,
29871,
29906,
876,
13,
4706,
1583,
3032,
386,
21145,
29918,
2557,
29889,
842,
3453,
29898,
386,
21145,
29918,
2557,
29918,
2680,
29897,
13,
4706,
266,
21145,
29918,
2680,
29889,
1202,
8801,
29898,
1311,
3032,
386,
21145,
29918,
2557,
29897,
13,
13,
4706,
1583,
3032,
6768,
29918,
2557,
353,
660,
4308,
29898,
1311,
29897,
13,
4706,
3987,
29918,
2557,
29918,
2680,
353,
5912,
29879,
29889,
29270,
3453,
29898,
1028,
9390,
29922,
29900,
29892,
15276,
1144,
7607,
29946,
29892,
29871,
29906,
29892,
29871,
29946,
29892,
29871,
29906,
876,
13,
4706,
1583,
3032,
6768,
29918,
2557,
29889,
842,
3453,
29898,
6768,
29918,
2557,
29918,
2680,
29897,
13,
13,
4706,
25267,
29918,
4187,
7453,
29918,
2557,
353,
660,
4308,
29898,
1311,
29897,
13,
4706,
1583,
3032,
25347,
29918,
4187,
7453,
29918,
2680,
353,
5912,
29879,
29889,
24932,
3453,
29898,
1028,
9390,
29922,
29900,
29892,
15276,
1144,
7607,
29946,
29892,
29871,
29906,
29892,
29871,
29946,
29892,
29871,
29906,
876,
13,
4706,
25267,
29918,
4187,
7453,
29918,
2557,
29889,
842,
3453,
29898,
1311,
3032,
25347,
29918,
4187,
7453,
29918,
2680,
29897,
13,
4706,
1583,
3032,
7620,
29918,
3092,
353,
9828,
29889,
5160,
3125,
877,
11371,
742,
3847,
29922,
1311,
29897,
13,
4706,
1583,
3032,
7620,
29918,
3092,
29889,
842,
12492,
29898,
13237,
29889,
4144,
877,
7620,
8785,
13,
4706,
1583,
3032,
20713,
29918,
3092,
353,
9828,
29889,
5160,
3125,
877,
19420,
742,
3847,
29922,
1311,
29897,
13,
4706,
1583,
3032,
20713,
29918,
3092,
29889,
842,
12492,
29898,
13237,
29889,
4144,
877,
20713,
8785,
13,
4706,
1583,
3032,
25347,
29918,
4187,
7453,
29918,
2680,
29889,
1202,
855,
10301,
580,
13,
4706,
1583,
3032,
25347,
29918,
4187,
7453,
29918,
2680,
29889,
1202,
8801,
29898,
1311,
3032,
7620,
29918,
3092,
29897,
13,
4706,
1583,
3032,
25347,
29918,
4187,
7453,
29918,
2680,
29889,
1202,
855,
10301,
580,
13,
4706,
1583,
3032,
25347,
29918,
4187,
7453,
29918,
2680,
29889,
1202,
8801,
29898,
1311,
3032,
20713,
29918,
3092,
29897,
13,
4706,
1583,
3032,
25347,
29918,
4187,
7453,
29918,
2680,
29889,
1202,
855,
10301,
580,
13,
13,
4706,
1583,
29889,
3396,
29918,
2680,
29889,
1202,
8801,
29898,
3257,
29918,
2557,
29897,
13,
4706,
1583,
29889,
3396,
29918,
2680,
29889,
1202,
3453,
29898,
386,
21145,
29918,
2680,
29897,
13,
4706,
1583,
29889,
3396,
29918,
2680,
29889,
1202,
8801,
29898,
1311,
3032,
6768,
29918,
2557,
29897,
13,
4706,
1583,
29889,
3396,
29918,
2680,
29889,
1202,
8801,
29898,
25347,
29918,
4187,
7453,
29918,
2557,
29897,
13,
13,
1678,
822,
6230,
29918,
4530,
1338,
29898,
1311,
1125,
13,
4706,
1583,
3032,
6510,
29918,
3092,
29889,
3808,
287,
29889,
6915,
29898,
1311,
3032,
265,
29918,
4294,
29918,
6510,
29897,
13,
4706,
1583,
3032,
7620,
29918,
3092,
29889,
3808,
287,
29889,
6915,
29898,
1311,
3032,
265,
29918,
7620,
29897,
13,
4706,
1583,
3032,
20713,
29918,
3092,
29889,
3808,
287,
29889,
6915,
29898,
1311,
3032,
265,
29918,
20713,
29897,
13,
13,
1678,
822,
19490,
2624,
29898,
1311,
29892,
1741,
1125,
13,
4706,
9995,
13,
4706,
6811,
24040,
2967,
660,
8801,
19490,
2624,
740,
13,
4706,
584,
3207,
1741,
29901,
660,
1666,
675,
2624,
13,
4706,
9995,
13,
13,
4706,
1583,
29889,
5504,
29918,
386,
21145,
29918,
2311,
580,
13,
13,
1678,
822,
3802,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
6811,
24040,
2967,
660,
8801,
3802,
740,
304,
11262,
2471,
4982,
746,
967,
338,
2309,
13,
4706,
9995,
13,
13,
4706,
565,
1583,
3032,
689,
29918,
8030,
29901,
13,
9651,
1583,
3032,
689,
29918,
8030,
29889,
7620,
29918,
6774,
9696,
29918,
5975,
580,
13,
13,
4706,
2428,
29898,
5160,
11371,
8801,
29892,
1583,
467,
5358,
580,
13,
13,
1678,
396,
1275,
9166,
9166,
9166,
9166,
9166,
9166,
4936,
1360,
13,
1678,
396,
350,
8127,
13,
1678,
396,
1275,
9166,
9166,
9166,
9166,
9166,
9166,
4936,
1360,
13,
13,
1678,
822,
4138,
29918,
2084,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
16969,
278,
4138,
2224,
13,
4706,
584,
2457,
29901,
851,
13,
4706,
9995,
13,
13,
4706,
736,
1583,
29889,
689,
29918,
8030,
2141,
1767,
877,
12083,
1495,
13,
13,
1678,
822,
731,
29918,
12083,
29918,
2084,
29898,
1311,
29892,
2224,
1125,
13,
4706,
9995,
13,
4706,
317,
1691,
278,
12551,
4138,
2224,
13,
4706,
584,
3207,
2224,
29901,
851,
13,
4706,
9995,
13,
13,
4706,
1583,
29889,
689,
29918,
8030,
2141,
842,
29918,
1767,
877,
12083,
742,
2224,
29897,
13,
13,
1678,
822,
731,
29918,
386,
21145,
29918,
2084,
29898,
1311,
29892,
2224,
1125,
13,
4706,
9995,
13,
4706,
317,
1691,
278,
2224,
304,
278,
266,
21145,
1967,
470,
278,
1967,
5665,
3884,
13,
4706,
584,
3207,
2224,
29901,
851,
13,
4706,
9995,
13,
13,
4706,
934,
29918,
978,
29892,
6081,
353,
2897,
29889,
2084,
29889,
23579,
568,
486,
29898,
2084,
29897,
13,
4706,
3646,
353,
3667,
29879,
29889,
7382,
29918,
2084,
877,
386,
21145,
8875,
4286,
4830,
29898,
17588,
876,
13,
4706,
3667,
29879,
29889,
8552,
29918,
2084,
29898,
2084,
29892,
3646,
29892,
4889,
29922,
5574,
29897,
13,
13,
4706,
1583,
3032,
16506,
29918,
8030,
29889,
842,
29918,
2084,
29898,
5182,
29897,
13,
13,
1678,
822,
3489,
29918,
7165,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
16969,
3489,
11109,
3474,
363,
278,
2944,
13,
4706,
584,
2457,
29901,
9538,
5907,
13,
4706,
9995,
13,
13,
4706,
736,
1583,
29889,
667,
29918,
1493,
2141,
5258,
29918,
7165,
580,
13,
13,
1678,
822,
731,
29918,
5258,
29918,
7165,
29898,
1311,
29892,
3489,
29918,
7165,
1125,
13,
4706,
9995,
13,
4706,
317,
1691,
278,
3489,
11109,
363,
278,
2944,
13,
4706,
584,
3207,
3489,
29918,
7165,
29901,
9538,
5907,
13,
4706,
9995,
13,
13,
4706,
1583,
29889,
667,
29918,
1493,
2141,
842,
29918,
5258,
29918,
7165,
29898,
5258,
29918,
7165,
29897,
13,
13,
1678,
822,
883,
29918,
8030,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
16969,
278,
883,
11109,
2777,
13,
4706,
584,
2457,
29901,
3812,
8801,
13,
4706,
9995,
13,
13,
4706,
736,
1583,
3032,
689,
29918,
8030,
13,
13,
1678,
822,
2944,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
16969,
1857,
2944,
13,
4706,
584,
2457,
29901,
13,
4706,
9995,
13,
13,
4706,
736,
1583,
29889,
667,
29918,
1493,
2141,
667,
13,
13,
1678,
822,
2944,
29918,
1493,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
16969,
278,
1857,
2944,
1776,
13,
4706,
584,
2457,
29901,
9538,
2001,
13,
4706,
9995,
13,
13,
4706,
736,
1583,
3032,
667,
29918,
1493,
13,
13,
1678,
822,
731,
29918,
667,
29918,
1493,
29898,
1311,
29892,
2944,
29918,
1493,
1125,
13,
4706,
9995,
13,
4706,
317,
1691,
278,
2967,
2944,
304,
367,
2825,
13,
4706,
584,
3207,
2944,
29918,
1493,
29901,
9538,
2001,
13,
4706,
9995,
13,
13,
4706,
1583,
3032,
667,
29918,
1493,
353,
2944,
29918,
1493,
13,
13,
4706,
565,
2897,
29889,
2084,
29889,
9933,
29898,
667,
29918,
1493,
29889,
3027,
29918,
16506,
29918,
2084,
580,
1125,
13,
9651,
1583,
29889,
842,
29918,
386,
21145,
29918,
2084,
29898,
667,
29918,
1493,
29889,
3027,
29918,
16506,
29918,
2084,
3101,
13,
4706,
25342,
451,
2944,
29918,
1493,
29889,
275,
29918,
4381,
29918,
386,
21145,
29918,
2084,
7295,
13,
9651,
1583,
29889,
842,
29918,
386,
21145,
29918,
2084,
29898,
667,
29918,
1493,
29889,
386,
21145,
29918,
2084,
3101,
13,
13,
4706,
10938,
353,
1583,
29889,
667,
2141,
7620,
29918,
11010,
580,
13,
4706,
565,
10938,
29901,
13,
9651,
883,
29918,
8030,
353,
883,
8030,
29889,
2500,
8801,
29898,
1311,
29897,
13,
9651,
883,
29918,
8030,
29889,
842,
3505,
15644,
29898,
29984,
3505,
15644,
29889,
29777,
292,
29892,
660,
3505,
15644,
29889,
29777,
292,
29897,
13,
9651,
883,
29918,
8030,
29889,
842,
29918,
11010,
29898,
11010,
29897,
13,
9651,
883,
29918,
8030,
29889,
842,
29918,
3084,
1061,
29898,
1311,
29889,
667,
2141,
7620,
29918,
3084,
1061,
29897,
13,
9651,
396,
2944,
29918,
978,
353,
2897,
29889,
2084,
29889,
6500,
3871,
29898,
667,
29889,
2084,
3101,
13,
9651,
396,
883,
29918,
8030,
29889,
842,
29918,
5975,
3319,
29915,
978,
2396,
2944,
29918,
978,
1800,
13,
9651,
1583,
3032,
6768,
29918,
2557,
29889,
2680,
2141,
1202,
8801,
29898,
689,
29918,
8030,
29897,
13,
9651,
883,
29918,
8030,
29889,
15480,
580,
13,
9651,
1583,
3032,
689,
29918,
8030,
353,
883,
29918,
8030,
13,
4706,
1683,
29901,
13,
9651,
1583,
3032,
6768,
29918,
2557,
29889,
842,
12911,
29898,
8824,
29897,
13,
13,
1678,
822,
2767,
29918,
386,
21145,
29918,
2311,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
5020,
15190,
278,
266,
21145,
2826,
304,
734,
29882,
2159,
310,
278,
11109,
13,
4706,
9995,
13,
13,
4706,
2920,
353,
1583,
29889,
2103,
580,
448,
29871,
29896,
29900,
13,
4706,
565,
2920,
1405,
29871,
29906,
29945,
29900,
29901,
13,
9651,
2920,
353,
29871,
29906,
29945,
29900,
13,
4706,
2159,
353,
660,
3505,
29898,
2103,
29892,
2920,
29897,
13,
4706,
565,
1583,
3032,
16506,
29918,
8030,
29901,
13,
9651,
1583,
3032,
16506,
29918,
8030,
29889,
842,
12492,
3505,
29898,
2311,
29897,
13,
9651,
1583,
3032,
16506,
29918,
8030,
29889,
842,
7976,
12539,
3505,
29898,
2311,
29897,
13,
4706,
1583,
3032,
386,
21145,
29918,
2557,
29889,
842,
7976,
12539,
3505,
29898,
2311,
29897,
13,
13,
1678,
822,
1510,
29918,
386,
21145,
29918,
17885,
545,
29918,
15901,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
26579,
29879,
278,
1404,
565,
896,
723,
763,
304,
10446,
263,
266,
21145,
13,
4706,
584,
2457,
29901,
938,
13,
4706,
9995,
13,
13,
4706,
9828,
353,
660,
7647,
3125,
3313,
29889,
8241,
891,
660,
7647,
3125,
3313,
29889,
23805,
891,
660,
7647,
3125,
3313,
29889,
19420,
13,
4706,
3847,
353,
1583,
29889,
667,
29918,
1493,
2141,
5258,
29918,
7165,
580,
13,
4706,
9503,
353,
2643,
1884,
29889,
3728,
3313,
29889,
12470,
29898,
13,
9651,
3847,
29892,
525,
4391,
263,
266,
21145,
742,
525,
29956,
483,
366,
763,
304,
10446,
263,
266,
21145,
29973,
742,
9828,
29922,
4187,
7453,
29897,
13,
4706,
565,
9503,
1275,
660,
7647,
3125,
3313,
29889,
8241,
29901,
13,
9651,
1583,
29889,
386,
21145,
29918,
17885,
545,
580,
13,
13,
4706,
736,
9503,
13,
13,
1678,
822,
1510,
29918,
1609,
29918,
2557,
29918,
15901,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
7704,
278,
491,
3515,
7928,
13,
4706,
9995,
13,
13,
4706,
1371,
29918,
726,
353,
9995,
13,
4706,
1763,
1371,
6210,
701,
278,
1708,
23190,
366,
508,
731,
278,
376,
1609,
3515,
29908,
304,
1790,
7621,
1135,
29871,
29896,
29889,
13,
4706,
1152,
1342,
565,
278,
376,
1609,
3515,
29908,
338,
731,
304,
29871,
29906,
372,
674,
1708,
23190,
1432,
1473,
3515,
13,
4706,
9995,
13,
13,
4706,
1121,
353,
6213,
13,
4706,
3987,
353,
1583,
29889,
689,
29918,
8030,
2141,
5975,
580,
13,
4706,
491,
29918,
2557,
353,
3987,
29889,
657,
877,
1609,
4308,
742,
29871,
29896,
29897,
13,
4706,
1369,
29918,
2557,
29892,
1095,
29918,
2557,
353,
3987,
29889,
657,
877,
2557,
6069,
742,
518,
8516,
29892,
6213,
2314,
13,
13,
4706,
14385,
353,
1095,
29918,
2557,
448,
1369,
29918,
2557,
565,
1369,
29918,
2557,
338,
451,
6213,
322,
1095,
29918,
2557,
338,
451,
6213,
1683,
29871,
29896,
13,
4706,
565,
14385,
1405,
29871,
29896,
29900,
29900,
322,
491,
29918,
2557,
1275,
29871,
29896,
29901,
13,
9651,
9828,
353,
660,
7647,
3125,
3313,
29889,
20434,
891,
660,
7647,
3125,
3313,
29889,
19420,
13,
9651,
1121,
353,
2643,
1884,
29889,
3728,
3313,
29889,
12470,
29898,
13,
18884,
1583,
29889,
5258,
29918,
7165,
3285,
3611,
2433,
29911,
666,
742,
1426,
29922,
8477,
29918,
726,
29892,
9828,
29922,
4187,
7453,
29892,
9025,
29918,
29881,
609,
29918,
4294,
29918,
12348,
29922,
5574,
13,
9651,
1723,
13,
13,
4706,
736,
1121,
13,
13,
1678,
822,
266,
21145,
29918,
17885,
545,
29898,
1311,
29892,
1510,
29922,
8824,
1125,
13,
4706,
9995,
13,
4706,
8868,
1973,
263,
1708,
23190,
322,
27401,
372,
304,
278,
25406,
266,
21145,
2224,
13,
4706,
584,
3207,
1510,
29901,
6120,
13,
4706,
9995,
13,
13,
4706,
3987,
353,
1583,
29889,
689,
29918,
8030,
2141,
5975,
580,
13,
4706,
1369,
29918,
2557,
29892,
1095,
29918,
2557,
353,
3987,
29889,
657,
877,
2557,
6069,
742,
518,
8516,
29892,
6213,
2314,
13,
4706,
4331,
353,
3987,
29889,
657,
877,
1609,
4308,
742,
29871,
29896,
29897,
13,
13,
4706,
565,
451,
3855,
29873,
13239,
29889,
275,
29918,
6451,
29918,
26625,
7295,
13,
9651,
1121,
353,
1583,
29889,
4294,
29918,
1609,
29918,
2557,
29918,
15901,
580,
13,
9651,
565,
1121,
1275,
660,
7647,
3125,
3313,
29889,
19420,
29901,
13,
18884,
736,
13,
13,
4706,
2224,
353,
3667,
29879,
29889,
7382,
29918,
2084,
877,
16506,
742,
525,
386,
21145,
29889,
6173,
1495,
13,
13,
4706,
1018,
29901,
13,
9651,
22395,
29889,
21913,
5907,
29898,
2084,
29922,
2084,
29892,
373,
29918,
7620,
29922,
1311,
3032,
265,
29918,
386,
21145,
29918,
17885,
2955,
29897,
13,
9651,
396,
266,
21145,
29889,
1349,
21145,
21133,
545,
7647,
29889,
386,
21145,
29918,
17885,
545,
29898,
13,
9651,
396,
268,
2224,
29922,
1311,
3032,
7382,
29918,
2084,
29892,
13,
9651,
396,
268,
1510,
29922,
4294,
29892,
13,
9651,
396,
268,
1369,
29918,
2557,
29922,
2962,
29918,
2557,
29892,
13,
9651,
396,
268,
1095,
29918,
2557,
29922,
355,
29918,
2557,
29892,
13,
9651,
396,
268,
4331,
29922,
10568,
29892,
13,
9651,
396,
268,
2821,
29918,
8173,
29922,
8824,
29892,
13,
9651,
396,
268,
15468,
29922,
1311,
3032,
265,
29918,
386,
21145,
29918,
17885,
2955,
13,
9651,
396,
1723,
13,
4706,
5174,
8960,
408,
321,
29901,
13,
9651,
2643,
1884,
29889,
3728,
3313,
29889,
9695,
936,
29898,
1311,
29889,
5258,
29918,
7165,
3285,
525,
2392,
1550,
4332,
3864,
266,
21145,
742,
851,
29898,
29872,
876,
13,
9651,
25401,
17070,
29889,
2704,
29898,
15003,
1627,
29889,
4830,
29918,
735,
29883,
3101,
13,
13,
1678,
822,
4078,
29898,
1311,
29892,
2224,
29892,
266,
21145,
1125,
13,
4706,
9995,
13,
4706,
317,
5989,
278,
2944,
411,
278,
2183,
3618,
304,
278,
2183,
8086,
4423,
2224,
13,
4706,
584,
3207,
2224,
29901,
851,
13,
4706,
584,
3207,
266,
21145,
29901,
851,
13,
4706,
9995,
13,
13,
4706,
9049,
5085,
353,
1583,
29889,
689,
29918,
8030,
2141,
5975,
580,
13,
4706,
5665,
29918,
2084,
353,
1583,
3032,
16506,
29918,
8030,
29889,
25721,
580,
13,
4706,
2944,
29918,
1493,
353,
1583,
29889,
667,
29918,
1493,
580,
13,
4706,
2944,
29918,
1493,
29889,
667,
29918,
1493,
29889,
2084,
353,
2224,
13,
4706,
3489,
29918,
7165,
353,
1583,
29889,
5258,
29918,
7165,
580,
13,
4706,
2854,
29918,
7620,
353,
2944,
29918,
1493,
29889,
11177,
29918,
7620,
29898,
386,
21145,
29922,
386,
21145,
29892,
5665,
29918,
2084,
29922,
16506,
29918,
2084,
29892,
3579,
19290,
29897,
13,
4706,
565,
2854,
29918,
7620,
29901,
13,
9651,
565,
3489,
29918,
7165,
29901,
13,
18884,
3489,
29918,
7165,
29889,
22379,
580,
13,
18884,
3489,
29918,
7165,
29889,
2622,
29918,
12083,
29918,
2084,
29898,
2084,
29897,
13,
9651,
1583,
29889,
17314,
29889,
21976,
580,
13,
4706,
1583,
29889,
5358,
580,
13,
13,
1678,
396,
1275,
9166,
9166,
9166,
9166,
9166,
9166,
4936,
1360,
13,
1678,
396,
2672,
4945,
29940,
1964,
13,
1678,
396,
1275,
9166,
9166,
9166,
9166,
9166,
9166,
4936,
1360,
13,
13,
1678,
822,
903,
3258,
29918,
16506,
29918,
8030,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
512,
1890,
740,
393,
10017,
263,
5665,
11109,
304,
5191,
278,
2294,
266,
21145,
11109,
13,
4706,
9995,
13,
13,
4706,
1583,
3032,
16506,
29918,
8030,
353,
5665,
29889,
2940,
20529,
8801,
29898,
1311,
29897,
13,
4706,
1583,
3032,
16506,
29918,
8030,
29889,
842,
2061,
1170,
877,
386,
21145,
3125,
1495,
13,
4706,
1583,
3032,
386,
21145,
29918,
2557,
29889,
2680,
2141,
7851,
8801,
29898,
29900,
29892,
1583,
3032,
16506,
29918,
8030,
29897,
13,
4706,
1583,
3032,
16506,
29918,
8030,
29889,
3808,
287,
29889,
6915,
29898,
1311,
3032,
265,
29918,
386,
21145,
29918,
17885,
545,
29897,
13,
4706,
1583,
3032,
16506,
29918,
8030,
29889,
842,
12229,
29911,
666,
29898,
13,
9651,
525,
4164,
304,
10446,
263,
266,
21145,
515,
278,
1857,
1904,
9451,
7790,
29876,
29915,
13,
9651,
525,
1783,
2241,
718,
16297,
304,
1510,
278,
10446,
3474,
363,
2253,
1424,
11500,
29889,
1495,
13,
13,
4706,
10656,
29918,
4144,
353,
7788,
29889,
657,
877,
27078,
742,
1583,
29889,
18193,
2141,
3293,
3285,
525,
26065,
29889,
2732,
1495,
13,
4706,
7985,
29918,
4144,
353,
7788,
29889,
657,
877,
27078,
742,
1583,
29889,
18193,
2141,
3293,
3285,
525,
8159,
29918,
10525,
29889,
2732,
1495,
13,
4706,
4138,
29918,
4144,
353,
7788,
29889,
657,
877,
27078,
742,
1583,
29889,
18193,
2141,
3293,
3285,
525,
12083,
29889,
2732,
1495,
13,
13,
4706,
1583,
3032,
16506,
29918,
8030,
29889,
1202,
4276,
29898,
13,
9651,
10656,
29918,
4144,
29892,
525,
21133,
545,
716,
1967,
742,
525,
21133,
545,
716,
1967,
742,
1583,
3032,
265,
29918,
386,
21145,
29918,
17885,
545,
29897,
13,
4706,
1583,
3032,
16506,
29918,
8030,
29889,
1202,
4276,
29898,
13,
9651,
7985,
29918,
4144,
29892,
525,
8964,
8868,
545,
3474,
742,
525,
8964,
8868,
545,
3474,
742,
1583,
3032,
265,
29918,
4294,
29918,
17885,
545,
29918,
7165,
29897,
13,
4706,
1583,
3032,
16506,
29918,
8030,
29889,
1202,
4276,
29898,
13,
9651,
4138,
29918,
4144,
29892,
525,
5896,
1967,
515,
8086,
742,
525,
5896,
1967,
515,
8086,
742,
1583,
3032,
265,
29918,
4294,
29918,
23721,
344,
29918,
3027,
29918,
15901,
29897,
13,
13,
4706,
1583,
3032,
16506,
29918,
8030,
29889,
842,
12492,
29898,
13237,
29889,
4144,
877,
9392,
29881,
617,
8785,
13,
13,
1678,
396,
1275,
9166,
9166,
9166,
9166,
9166,
9166,
4936,
1360,
13,
1678,
396,
315,
9818,
29933,
11375,
29903,
13,
1678,
396,
1275,
9166,
9166,
9166,
9166,
9166,
9166,
4936,
1360,
13,
13,
1678,
822,
903,
265,
29918,
4294,
29918,
6510,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
512,
1890,
6939,
740,
393,
338,
2000,
746,
6143,
2826,
338,
11484,
491,
29884,
278,
1404,
13,
4706,
584,
2457,
29901,
660,
4276,
13,
4706,
9995,
13,
13,
4706,
1209,
13,
13,
1678,
822,
903,
265,
29918,
7620,
29898,
1311,
1125,
13,
4706,
565,
451,
1583,
29889,
5258,
29918,
7165,
7295,
13,
9651,
736,
7700,
13,
13,
4706,
3489,
353,
1583,
29889,
5258,
29918,
7165,
2141,
5258,
580,
13,
4706,
565,
451,
3489,
29901,
13,
9651,
736,
7700,
13,
13,
4706,
1018,
29901,
13,
9651,
1583,
29889,
689,
29918,
8030,
2141,
15480,
580,
13,
9651,
565,
1583,
29889,
689,
29918,
8030,
2141,
5349,
29918,
12523,
7295,
13,
18884,
12020,
8960,
28909,
29876,
4286,
7122,
29898,
1311,
29889,
689,
29918,
8030,
2141,
12523,
22130,
13,
9651,
756,
29918,
19935,
353,
1583,
3032,
16506,
29918,
8030,
29889,
5349,
29918,
19935,
580,
13,
9651,
565,
451,
756,
29918,
19935,
322,
1583,
29889,
1430,
6181,
29918,
4690,
5005,
29933,
3521,
6227,
29918,
29907,
3301,
29911,
11499,
29901,
13,
18884,
2826,
353,
1583,
29889,
4294,
29918,
386,
21145,
29918,
17885,
545,
29918,
15901,
580,
13,
18884,
565,
2826,
1275,
660,
7647,
3125,
3313,
29889,
19420,
29901,
13,
462,
1678,
736,
7700,
13,
9651,
1024,
353,
1583,
29889,
689,
29918,
8030,
2141,
1767,
877,
978,
1495,
13,
9651,
4138,
353,
1583,
29889,
689,
29918,
8030,
2141,
1767,
877,
12083,
1495,
13,
9651,
3440,
353,
1583,
29889,
689,
29918,
8030,
2141,
1767,
877,
9342,
1495,
470,
6629,
13,
13,
9651,
6081,
353,
1583,
29889,
667,
2141,
17588,
580,
13,
9651,
565,
6081,
322,
451,
1024,
29889,
1975,
2541,
29898,
17588,
1125,
13,
18884,
1024,
353,
22372,
1157,
29913,
4286,
4830,
29898,
978,
29892,
6081,
29897,
13,
13,
9651,
2224,
353,
4138,
718,
8207,
29915,
718,
1024,
13,
9651,
266,
21145,
353,
1583,
3032,
16506,
29918,
8030,
29889,
4102,
29918,
2557,
580,
13,
13,
9651,
4078,
29918,
667,
353,
3489,
29889,
657,
29898,
2084,
29892,
871,
29918,
17588,
29922,
5574,
29897,
13,
9651,
4078,
29918,
2220,
353,
4078,
29918,
667,
29889,
2220,
2877,
2141,
657,
877,
7620,
1495,
13,
9651,
565,
451,
4078,
29918,
2220,
29901,
13,
18884,
25401,
17070,
29889,
27392,
877,
2001,
29850,
5038,
947,
451,
11286,
4078,
5858,
4286,
4830,
29898,
7620,
29918,
667,
876,
13,
18884,
736,
7700,
13,
13,
9651,
3489,
29918,
2084,
353,
1583,
29889,
667,
2141,
5258,
29889,
25378,
13,
9651,
565,
451,
3489,
29918,
2084,
470,
451,
2897,
29889,
2084,
29889,
275,
1445,
29898,
5258,
29918,
2084,
1125,
13,
18884,
25401,
17070,
29889,
27392,
877,
1888,
27338,
304,
4078,
848,
29850,
5038,
1363,
967,
3489,
947,
451,
4864,
29901,
29850,
5038,
4286,
4830,
29898,
13,
462,
1678,
1583,
29889,
667,
3285,
3489,
29918,
2084,
876,
13,
18884,
736,
13,
13,
9651,
1819,
353,
1583,
29889,
689,
29918,
8030,
2141,
5975,
580,
13,
9651,
1018,
29901,
13,
18884,
565,
1583,
3032,
4645,
29901,
13,
462,
1678,
2551,
29892,
2643,
29892,
9962,
353,
1583,
3032,
4645,
2141,
7620,
29918,
1272,
29898,
13,
462,
4706,
3489,
29918,
2084,
29922,
5258,
29918,
2084,
29892,
848,
29918,
2084,
29922,
2084,
29892,
1819,
29922,
5975,
29897,
13,
462,
1678,
565,
451,
2551,
29901,
13,
462,
4706,
2643,
1884,
29889,
3728,
3313,
29889,
9695,
936,
29898,
1311,
29889,
5258,
29918,
7165,
3285,
525,
2392,
1550,
14238,
742,
851,
29898,
4906,
876,
13,
462,
4706,
25401,
17070,
29889,
2704,
29898,
710,
29898,
4906,
876,
13,
462,
4706,
736,
7700,
13,
18884,
1683,
29901,
13,
462,
1678,
9962,
353,
4078,
29918,
2220,
29898,
1068,
5975,
29897,
13,
9651,
5174,
8960,
408,
5566,
29901,
13,
18884,
2643,
1884,
29889,
3728,
3313,
29889,
9695,
936,
29898,
1311,
29889,
5258,
29918,
7165,
3285,
525,
2392,
1550,
14238,
742,
851,
29898,
735,
29883,
876,
13,
18884,
25401,
17070,
29889,
2704,
29898,
15003,
1627,
29889,
4830,
29918,
735,
29883,
3101,
13,
18884,
736,
7700,
13,
13,
4706,
5174,
8960,
408,
5566,
29901,
13,
9651,
2643,
1884,
29889,
3728,
3313,
29889,
9695,
936,
29898,
1311,
29889,
5258,
29918,
7165,
3285,
525,
2392,
1550,
14238,
742,
851,
29898,
735,
29883,
876,
13,
9651,
25401,
17070,
29889,
2704,
29898,
15003,
1627,
29889,
4830,
29918,
735,
29883,
3101,
13,
9651,
12020,
13,
13,
4706,
716,
29918,
667,
29918,
2084,
353,
4078,
29918,
667,
29889,
4830,
29918,
25378,
580,
13,
4706,
565,
451,
716,
29918,
667,
29918,
2084,
470,
451,
2897,
29889,
2084,
29889,
275,
1445,
29898,
1482,
29918,
667,
29918,
2084,
1125,
13,
9651,
25401,
17070,
29889,
27392,
877,
2499,
3592,
14238,
1889,
363,
2944,
29850,
5038,
471,
8676,
29892,
525,
13,
462,
965,
525,
277,
2444,
694,
716,
848,
756,
1063,
5759,
29991,
4286,
4830,
29898,
7620,
29918,
667,
876,
13,
9651,
1583,
29889,
17314,
29889,
21976,
580,
13,
9651,
736,
7700,
13,
13,
4706,
4078,
29918,
667,
29889,
5258,
29889,
1202,
29898,
1482,
29918,
667,
29918,
2084,
29897,
13,
13,
4706,
396,
396,
14402,
29901,
8669,
310,
4969,
263,
1887,
1873,
29892,
591,
674,
671,
263,
6315,
1788,
304,
6441,
1749,
848,
304,
1749,
2060,
13761,
13,
4706,
396,
396,
14402,
29901,
10575,
591,
4078,
716,
6910,
310,
9962,
2086,
29973,
13,
4706,
396,
2854,
353,
4078,
29918,
667,
29889,
3258,
29918,
3259,
29898,
9342,
29922,
9342,
29897,
13,
4706,
396,
565,
451,
2854,
29901,
13,
4706,
396,
268,
25401,
17070,
29889,
27392,
877,
1888,
27338,
304,
3787,
716,
1873,
363,
848,
29850,
5038,
4286,
4830,
29898,
7620,
29918,
667,
876,
13,
13,
4706,
565,
266,
21145,
322,
2897,
29889,
2084,
29889,
275,
1445,
29898,
386,
21145,
1125,
13,
9651,
4078,
29918,
667,
29889,
8899,
29918,
386,
21145,
29898,
386,
21145,
29897,
13,
13,
4706,
1583,
29889,
5258,
29918,
7165,
2141,
16593,
580,
13,
13,
4706,
4078,
29918,
667,
29889,
5504,
29918,
22594,
29898,
22594,
29922,
22594,
29897,
13,
13,
4706,
1583,
29889,
17314,
29889,
21976,
580,
13,
13,
4706,
736,
5852,
13,
13,
1678,
822,
903,
265,
29918,
20713,
29898,
1311,
1125,
13,
4706,
1583,
29889,
20713,
839,
29889,
21976,
580,
13,
4706,
1583,
29889,
5358,
580,
13,
13,
1678,
822,
903,
265,
29918,
386,
21145,
29918,
17885,
545,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
512,
1890,
6939,
740,
393,
338,
2000,
746,
263,
266,
21145,
10446,
1818,
367,
2309,
13,
4706,
9995,
13,
13,
4706,
1583,
29889,
386,
21145,
29918,
17885,
545,
29898,
4294,
29922,
8824,
29897,
13,
13,
1678,
822,
903,
265,
29918,
386,
21145,
29918,
17885,
2955,
29898,
1311,
29892,
15468,
29918,
2084,
1125,
13,
4706,
9995,
13,
4706,
512,
1890,
6939,
740,
393,
338,
2000,
746,
266,
21145,
338,
15468,
13,
4706,
584,
3207,
15468,
29918,
2084,
29901,
851,
13,
4706,
9995,
13,
13,
4706,
28968,
29918,
2084,
353,
2897,
29889,
2084,
29889,
25721,
29898,
17885,
2955,
29918,
2084,
29897,
13,
4706,
1583,
29889,
842,
29918,
386,
21145,
29918,
2084,
29898,
386,
3774,
29918,
2084,
29897,
13,
13,
1678,
822,
903,
265,
29918,
4294,
29918,
17885,
545,
29918,
7165,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
512,
1890,
6939,
740,
393,
3697,
278,
10446,
3474,
363,
1424,
11500,
13,
4706,
9995,
13,
13,
4706,
1583,
29889,
386,
21145,
29918,
17885,
545,
29898,
4294,
29922,
5574,
29897,
13,
13,
1678,
822,
903,
265,
29918,
4294,
29918,
23721,
344,
29918,
3027,
29918,
15901,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
512,
1890,
6939,
740,
393,
3697,
263,
934,
7928,
363,
23906,
385,
1967,
515,
8086,
13,
4706,
9995,
13,
13,
4706,
934,
29918,
15901,
353,
660,
2283,
7647,
29898,
1311,
29892,
5777,
683,
2433,
6585,
7084,
742,
4175,
2433,
2940,
12745,
3070,
29889,
2732,
20611,
6173,
29897,
1495,
13,
4706,
934,
29918,
15901,
29889,
1445,
8592,
29889,
6915,
29898,
1311,
29889,
842,
29918,
386,
21145,
29918,
2084,
29897,
13,
4706,
934,
29918,
15901,
29889,
4258,
29918,
580,
13,
13,
13,
29992,
19557,
4097,
29889,
1202,
29918,
2527,
562,
605,
7373,
19346,
11371,
8801,
29897,
13,
1990,
16913,
8801,
29898,
3318,
1125,
13,
1678,
1209,
13,
2
] |
files/app.py | pnoj/judge-executor | 0 | 137428 | import requests
from flask import Flask, request
import os
import info
import isolate
app = Flask(__name__)
@app.route('/')
def status():
executor_status = {
"language": info.language,
"status": config['status'],
}
return executor_status
@app.route('/compile', methods=["POST"])
def compile():
try:
submission_file = request.files["submission"]
try:
config["submission_content"] = submission_file.read().decode('utf-8')
except UnicodeDecodeError:
submission_file.close()
return {"status": "CE", "message": "Error while decoding submission"}
submission_file.close()
os.makedirs("submission", exist_ok=True)
config["submission_code_path"] = os.path.join("submission", info.name_code(config['submission_content']))
with open(config["submission_code_path"], "w") as submission_code_file:
submission_code_file.write(config["submission_content"])
try:
compile_process = isolate.execute_command_subprocess(info.compile_command(config["submission_code_path"]), time_limit=10, check=False, verbose=True)
compile_process.check_returncode()
config['status'] = 'loaded'
config['submission_binary_path'] = os.path.join("submission", info.name_binary(config['submission_content']))
return {"status": "CC"}
except isolate.subprocess.TimeoutExpired:
return {"status": "CE", "message": "Compilation Timed Out"}
except isolate.subprocess.CalledProcessError:
return {"status": "CE", "message": info.compile_error_message(compile_process.stdout, compile_process.stderr)}
except:
return {"status": "IE", "message": "Internal Error while compiling"}
except Exception as e:
return {"status": "CE", "message": "Error while compiling: {0}".format(str(e))}
@app.route('/run', methods=["POST"])
def run():
if config['status'] != 'loaded':
return {"status": "EE", "message": "Submission not loaded"}
if "stdin" in request.form:
stdin = request.form["stdin"]
else:
stdin = ""
if "env" in request.form:
env = json.loads(request.form["env"])
else:
env = dict()
if "time_limit" in request.form:
time_limit = float(request.form["time_limit"])
else:
time_limit = 1
if "memory_limit" in request.form:
memory_limit = float(request.form["memory_limit"])
else:
memory_limit = 64
status = isolate.run(config["submission_binary_path"], stdin, time_limit, memory_limit, env)
return status
@app.before_first_request
def setup():
global config
config = dict()
if "EXECUTOR_CALLBCK" in os.environ:
config["callback"] = os.environ['EXECUTOR_CALLBACK']
requests.get(config["callback"])
config["status"] = "ready"
| [
1,
1053,
7274,
13,
3166,
29784,
1053,
2379,
1278,
29892,
2009,
13,
5215,
2897,
13,
13,
5215,
5235,
13,
5215,
11695,
403,
13,
13,
932,
353,
2379,
1278,
22168,
978,
1649,
29897,
13,
13,
29992,
932,
29889,
13134,
11219,
1495,
13,
1753,
4660,
7295,
13,
1678,
2279,
3406,
29918,
4882,
353,
426,
13,
4706,
376,
11675,
1115,
5235,
29889,
11675,
29892,
13,
4706,
376,
4882,
1115,
2295,
1839,
4882,
7464,
13,
1678,
500,
13,
1678,
736,
2279,
3406,
29918,
4882,
13,
13,
29992,
932,
29889,
13134,
11219,
12198,
742,
3519,
29922,
3366,
5438,
20068,
13,
1753,
6633,
7295,
13,
1678,
1018,
29901,
13,
4706,
29240,
29918,
1445,
353,
2009,
29889,
5325,
3366,
1491,
6737,
3108,
268,
13,
4706,
1018,
29901,
13,
9651,
2295,
3366,
1491,
6737,
29918,
3051,
3108,
353,
29240,
29918,
1445,
29889,
949,
2141,
13808,
877,
9420,
29899,
29947,
1495,
13,
4706,
5174,
23862,
2772,
401,
2392,
29901,
13,
9651,
29240,
29918,
1445,
29889,
5358,
580,
13,
9651,
736,
8853,
4882,
1115,
376,
4741,
613,
376,
4906,
1115,
376,
2392,
1550,
1602,
3689,
29240,
9092,
13,
4706,
29240,
29918,
1445,
29889,
5358,
580,
13,
4706,
2897,
29889,
29885,
12535,
12935,
703,
1491,
6737,
613,
1863,
29918,
554,
29922,
5574,
29897,
13,
4706,
2295,
3366,
1491,
6737,
29918,
401,
29918,
2084,
3108,
353,
2897,
29889,
2084,
29889,
7122,
703,
1491,
6737,
613,
5235,
29889,
978,
29918,
401,
29898,
2917,
1839,
1491,
6737,
29918,
3051,
25901,
13,
4706,
411,
1722,
29898,
2917,
3366,
1491,
6737,
29918,
401,
29918,
2084,
12436,
376,
29893,
1159,
408,
29240,
29918,
401,
29918,
1445,
29901,
13,
9651,
29240,
29918,
401,
29918,
1445,
29889,
3539,
29898,
2917,
3366,
1491,
6737,
29918,
3051,
20068,
13,
4706,
1018,
29901,
13,
9651,
6633,
29918,
5014,
353,
11695,
403,
29889,
7978,
29918,
6519,
29918,
1491,
5014,
29898,
3888,
29889,
12198,
29918,
6519,
29898,
2917,
3366,
1491,
6737,
29918,
401,
29918,
2084,
3108,
511,
931,
29918,
13400,
29922,
29896,
29900,
29892,
1423,
29922,
8824,
29892,
26952,
29922,
5574,
29897,
13,
9651,
6633,
29918,
5014,
29889,
3198,
29918,
2457,
401,
580,
13,
9651,
2295,
1839,
4882,
2033,
353,
525,
15638,
29915,
13,
9651,
2295,
1839,
1491,
6737,
29918,
19541,
29918,
2084,
2033,
353,
2897,
29889,
2084,
29889,
7122,
703,
1491,
6737,
613,
5235,
29889,
978,
29918,
19541,
29898,
2917,
1839,
1491,
6737,
29918,
3051,
25901,
13,
9651,
736,
8853,
4882,
1115,
376,
4174,
9092,
13,
4706,
5174,
11695,
403,
29889,
1491,
5014,
29889,
10851,
9544,
2859,
29901,
13,
9651,
736,
8853,
4882,
1115,
376,
4741,
613,
376,
4906,
1115,
376,
6843,
8634,
7870,
287,
4451,
9092,
13,
4706,
5174,
11695,
403,
29889,
1491,
5014,
29889,
29907,
4212,
7032,
2392,
29901,
13,
9651,
736,
8853,
4882,
1115,
376,
4741,
613,
376,
4906,
1115,
5235,
29889,
12198,
29918,
2704,
29918,
4906,
29898,
12198,
29918,
5014,
29889,
25393,
29892,
6633,
29918,
5014,
29889,
303,
20405,
2915,
13,
4706,
5174,
29901,
13,
9651,
736,
8853,
4882,
1115,
376,
8673,
613,
376,
4906,
1115,
376,
16491,
4829,
1550,
22520,
9092,
13,
1678,
5174,
8960,
408,
321,
29901,
13,
4706,
736,
8853,
4882,
1115,
376,
4741,
613,
376,
4906,
1115,
376,
2392,
1550,
22520,
29901,
426,
29900,
29913,
1642,
4830,
29898,
710,
29898,
29872,
876,
29913,
13,
13,
29992,
932,
29889,
13134,
11219,
3389,
742,
3519,
29922,
3366,
5438,
20068,
13,
1753,
1065,
7295,
13,
1678,
565,
2295,
1839,
4882,
2033,
2804,
525,
15638,
2396,
13,
4706,
736,
8853,
4882,
1115,
376,
17896,
613,
376,
4906,
1115,
376,
4035,
6737,
451,
7500,
9092,
13,
268,
13,
1678,
565,
376,
4172,
262,
29908,
297,
2009,
29889,
689,
29901,
13,
4706,
3659,
262,
353,
2009,
29889,
689,
3366,
4172,
262,
3108,
13,
1678,
1683,
29901,
13,
4706,
3659,
262,
353,
5124,
13,
13,
1678,
565,
376,
6272,
29908,
297,
2009,
29889,
689,
29901,
13,
4706,
8829,
353,
4390,
29889,
18132,
29898,
3827,
29889,
689,
3366,
6272,
20068,
13,
1678,
1683,
29901,
13,
4706,
8829,
353,
9657,
580,
13,
13,
1678,
565,
376,
2230,
29918,
13400,
29908,
297,
2009,
29889,
689,
29901,
13,
4706,
931,
29918,
13400,
353,
5785,
29898,
3827,
29889,
689,
3366,
2230,
29918,
13400,
20068,
13,
1678,
1683,
29901,
13,
4706,
931,
29918,
13400,
353,
29871,
29896,
13,
13,
1678,
565,
376,
14834,
29918,
13400,
29908,
297,
2009,
29889,
689,
29901,
13,
4706,
3370,
29918,
13400,
353,
5785,
29898,
3827,
29889,
689,
3366,
14834,
29918,
13400,
20068,
13,
1678,
1683,
29901,
13,
4706,
3370,
29918,
13400,
353,
29871,
29953,
29946,
13,
13,
1678,
4660,
353,
11695,
403,
29889,
3389,
29898,
2917,
3366,
1491,
6737,
29918,
19541,
29918,
2084,
12436,
3659,
262,
29892,
931,
29918,
13400,
29892,
3370,
29918,
13400,
29892,
8829,
29897,
13,
13,
1678,
736,
4660,
13,
13,
29992,
932,
29889,
11083,
29918,
4102,
29918,
3827,
13,
1753,
6230,
7295,
13,
1678,
5534,
2295,
13,
1678,
2295,
353,
9657,
580,
13,
1678,
565,
376,
5746,
11206,
2692,
1955,
29918,
29907,
9818,
5371,
29968,
29908,
297,
2897,
29889,
21813,
29901,
13,
4706,
2295,
3366,
14035,
3108,
353,
2897,
29889,
21813,
1839,
5746,
11206,
2692,
1955,
29918,
29907,
9818,
29933,
11375,
2033,
13,
4706,
7274,
29889,
657,
29898,
2917,
3366,
14035,
20068,
13,
1678,
2295,
3366,
4882,
3108,
353,
376,
2040,
29908,
13,
13,
2
] |
recommender/news/__init__.py | stungkit/stock_trend_analysis | 7 | 1608727 | from .Feed import *
from .FPFeed import *
| [
1,
515,
869,
29737,
1053,
334,
13,
3166,
869,
26353,
29737,
1053,
334,
13,
2
] |
tools/downsampling_publish/src/downsampling_publish.py | verlab/3DSemanticMapping_JINT_2020 | 28 | 100197 | #!/usr/bin/env python
from roslib.message import get_message_class
import rospy
import rosgraph
class DownPublisher():
def __init__(self):
rospy.init_node('downsampling_publish', anonymous=True)
prefix = rospy.get_param('~prefix', "/downsampling")
rate = rospy.get_param('~rate', 1)
r = rospy.Rate(rate)
self.topics_selected = rospy.get_param('/topics', '')
self.topics_ = dict({})
self._master = rosgraph.Master(rospy.get_name())
self.all_topics_info = self._master.getTopicTypes()
if len(self.topics_selected) == 0:
for topic in self.all_topics_info:
self.topics_selected.append(topic[0])
for topic in self.topics_selected:
msg_name = [ty for tp, ty in self.all_topics_info if tp == topic][0]
sub_ = rospy.Subscriber(topic, get_message_class(msg_name), callback = self.callback, callback_args = topic)
pub_ = rospy.Publisher(prefix+topic, get_message_class(msg_name), queue_size=1)
msg_ = get_message_class(msg_name)
self.topics_[topic] = [sub_, pub_, msg_]
rospy.loginfo("Starting Downsamplig Publisher at " + str(rate) + " Hz")
rospy.loginfo("Topics: " + str(self.topics_selected))
while not rospy.is_shutdown():
for topic in self.topics_selected:
self.topics_[topic][1].publish(self.topics_[topic][2])
r.sleep()
def callback(self, msg, topic):
self.topics_[topic][2] = msg
if __name__ == '__main__':
try:
d = DownPublisher()
rospy.spin()
except rospy.ROSInterruptException: pass
| [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
13,
3166,
14652,
1982,
29889,
4906,
1053,
679,
29918,
4906,
29918,
1990,
13,
5215,
696,
1028,
29891,
13,
5215,
14652,
4262,
13,
13,
1990,
9943,
21076,
1674,
261,
7295,
13,
1678,
822,
4770,
2344,
12035,
1311,
1125,
13,
4706,
696,
1028,
29891,
29889,
2344,
29918,
3177,
877,
3204,
13445,
10335,
29918,
23679,
742,
21560,
29922,
5574,
29897,
13,
308,
13,
4706,
10944,
353,
696,
1028,
29891,
29889,
657,
29918,
3207,
877,
30022,
13506,
742,
5591,
3204,
13445,
10335,
1159,
13,
4706,
6554,
353,
696,
1028,
29891,
29889,
657,
29918,
3207,
877,
30022,
10492,
742,
29871,
29896,
29897,
13,
4706,
364,
353,
696,
1028,
29891,
29889,
19907,
29898,
10492,
29897,
13,
308,
13,
4706,
1583,
29889,
3332,
1199,
29918,
8391,
353,
696,
1028,
29891,
29889,
657,
29918,
3207,
11219,
3332,
1199,
742,
27255,
13,
4706,
1583,
29889,
3332,
1199,
29918,
353,
9657,
3319,
1800,
462,
259,
13,
13,
4706,
1583,
3032,
6207,
353,
14652,
4262,
29889,
19203,
29898,
307,
1028,
29891,
29889,
657,
29918,
978,
3101,
13,
4706,
1583,
29889,
497,
29918,
3332,
1199,
29918,
3888,
353,
1583,
3032,
6207,
29889,
657,
7031,
293,
10562,
580,
13,
13,
4706,
565,
7431,
29898,
1311,
29889,
3332,
1199,
29918,
8391,
29897,
1275,
29871,
29900,
29901,
13,
9651,
363,
11261,
297,
1583,
29889,
497,
29918,
3332,
1199,
29918,
3888,
29901,
13,
18884,
1583,
29889,
3332,
1199,
29918,
8391,
29889,
4397,
29898,
13010,
29961,
29900,
2314,
13,
13,
4706,
363,
11261,
297,
1583,
29889,
3332,
1199,
29918,
8391,
29901,
13,
9651,
10191,
29918,
978,
353,
518,
1017,
363,
260,
29886,
29892,
7911,
297,
1583,
29889,
497,
29918,
3332,
1199,
29918,
3888,
565,
260,
29886,
1275,
11261,
3816,
29900,
29962,
13,
9651,
1014,
29918,
353,
696,
1028,
29891,
29889,
4035,
7588,
495,
29898,
13010,
29892,
679,
29918,
4906,
29918,
1990,
29898,
7645,
29918,
978,
511,
6939,
353,
1583,
29889,
14035,
29892,
6939,
29918,
5085,
353,
11261,
29897,
13,
9651,
2529,
29918,
353,
696,
1028,
29891,
29889,
21076,
1674,
261,
29898,
13506,
29974,
13010,
29892,
679,
29918,
4906,
29918,
1990,
29898,
7645,
29918,
978,
511,
9521,
29918,
2311,
29922,
29896,
29897,
13,
9651,
10191,
29918,
353,
679,
29918,
4906,
29918,
1990,
29898,
7645,
29918,
978,
29897,
13,
9651,
1583,
29889,
3332,
1199,
29918,
29961,
13010,
29962,
353,
518,
1491,
3383,
2529,
3383,
10191,
29918,
29962,
13,
268,
13,
4706,
696,
1028,
29891,
29889,
1188,
3888,
703,
4763,
292,
9943,
13445,
572,
335,
12904,
261,
472,
376,
718,
851,
29898,
10492,
29897,
718,
376,
379,
29920,
1159,
13,
4706,
696,
1028,
29891,
29889,
1188,
3888,
703,
7031,
1199,
29901,
376,
718,
851,
29898,
1311,
29889,
3332,
1199,
29918,
8391,
876,
13,
4706,
13,
4706,
1550,
451,
696,
1028,
29891,
29889,
275,
29918,
845,
329,
3204,
7295,
13,
9651,
363,
11261,
297,
1583,
29889,
3332,
1199,
29918,
8391,
29901,
13,
18884,
1583,
29889,
3332,
1199,
29918,
29961,
13010,
3816,
29896,
1822,
23679,
29898,
1311,
29889,
3332,
1199,
29918,
29961,
13010,
3816,
29906,
2314,
13,
9651,
364,
29889,
17059,
580,
13,
9651,
13,
1678,
822,
6939,
29898,
1311,
29892,
10191,
29892,
11261,
1125,
13,
4706,
1583,
29889,
3332,
1199,
29918,
29961,
13010,
3816,
29906,
29962,
353,
10191,
13,
308,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
1018,
29901,
13,
4706,
270,
353,
9943,
21076,
1674,
261,
580,
13,
4706,
696,
1028,
29891,
29889,
1028,
262,
580,
13,
1678,
5174,
696,
1028,
29891,
29889,
1672,
29903,
4074,
6685,
2451,
29901,
1209,
13,
13,
2
] |
train_ema.py | qym7/WTALFakeLabels | 3 | 17081 | <gh_stars>1-10
'''
Author: <NAME>
Date: 2021-12-25 17:33:51
LastEditTime: 2021-12-29 10:10:14
LastEditors: Please set LastEditors
Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
FilePath: /yimingqin/code/WTAL-Uncertainty-Modeling/train.py
'''
import torch
import torch.nn as nn
import numpy as np
from collections import OrderedDict
import utils
class UM_loss(nn.Module):
def __init__(self, alpha, beta, lmbd, gamma, margin, thres):
super(UM_loss, self).__init__()
self.alpha = alpha
self.beta = beta
self.lmbd = lmbd
self.gamma = gamma
self.margin = margin
self.thres = thres
self.ce_criterion = nn.BCELoss()
self.l2_criterion = nn.MSELoss()
def balanced_ce(self, gt, cas):
loss = 0
count = 0
pmask = (gt > self.thres).float().cuda()
for i in range(cas.shape[0]):
for j in range(cas.shape[-1]):
if pmask[i, :, j].sum() > 0:
r = sum(pmask[i, :, j]==1) / float(pmask.shape[1])
coef_0 = 0.5 * r / (r - 1)
coef_1 = coef_0 * (r - 1)
# _loss = coef_1 * pmask[i, :, j] * torch.log(cas[i, :, j] + 0.00001) +\
# coef_0 * (1.0 - pmask[i, :, j]) * torch.log(1.0 - cas[i, :, j] + 0.00001)
_loss = torch.norm(cas[i, :, j] - pmask[i, :, j], p=2)
loss = loss + torch.mean(_loss)
count += 1
loss = loss / count
return loss
def forward(self, score_act, score_bkg, feat_act, feat_bkg, label,
gt, sup_cas, cas_s, cas_t):
loss = {}
label = label / torch.sum(label, dim=1, keepdim=True)
loss_cls = self.ce_criterion(score_act, label)
label_bkg = torch.ones_like(label).cuda()
label_bkg /= torch.sum(label_bkg, dim=1, keepdim=True)
loss_be = self.ce_criterion(score_bkg, label_bkg)
loss_act = self.margin - torch.norm(torch.mean(feat_act, dim=1), p=2, dim=1)
loss_act[loss_act < 0] = 0
loss_bkg = torch.norm(torch.mean(feat_bkg, dim=1), p=2, dim=1)
loss_um = torch.mean((loss_act + loss_bkg) ** 2)
loss_total = loss_cls + self.alpha * loss_um + self.beta * loss_be
if sup_cas is not None:
loss_sup = self.balanced_ce(gt, sup_cas)
loss["loss_sup"] = loss_sup
print("loss_sup", (self.lmbd*loss_sup).detach().cpu().item())
loss_total = loss_total + self.lmbd * loss_sup
if cas_s is not None:
# teacher student constrainte
loss_st = self.l2_criterion(cas_s, cas_t)
loss_total = loss_total + self.gamma * loss_st
print("loss_st", (self.gamma*loss_st).detach().cpu().item())
loss["loss_st"] = loss_st
loss["loss_cls"] = loss_cls
loss["loss_be"] = loss_be
loss["loss_um"] = loss_um
loss["loss_total"] = loss_total
print("loss_cls", loss_cls.detach().cpu().item())
print("loss_be", (self.beta * loss_be).detach().cpu().item())
print("loss_um", (self.alpha * loss_um).detach().cpu().item())
print("loss_total", loss_total.detach().cpu().item())
return loss_total, loss
def train(net_student, net_teacher, loader_iter, optimizer, criterion, logger, step, m):
net_student.train()
_data, _label, _gt, _, _ = next(loader_iter)
_data = _data.cuda()
_label = _label.cuda()
if _gt is not None:
_gt = _gt.cuda()
optimizer.zero_grad()
score_act, score_bkg, feat_act, feat_bkg, _, cas_softmax_s, sup_cas_softmax = net_student(_data)
_, _, _, _, _, cas_softmax_t, _ = net_student(_data)
# cas = None
# if net.self_train:
# feat_magnitudes_act = torch.mean(torch.norm(feat_act, dim=2), dim=1)
# feat_magnitudes_bkg = torch.mean(torch.norm(feat_bkg, dim=2), dim=1)
# feat_magnitudes = torch.norm(features, p=2, dim=2)
# feat_magnitudes = utils.minmax_norm(feat_magnitudes,
# max_val=feat_magnitudes_act,
# min_val=feat_magnitudes_bkg)
# feat_magnitudes = feat_magnitudes.repeat((cas_softmax.shape[-1], 1, 1)).permute(1, 2, 0)
# cas = utils.minmax_norm(cas_softmax * feat_magnitudes)
# if step < 10:
# cas_softmax_s = None
cost, loss = criterion(score_act, score_bkg, feat_act, feat_bkg, _label,
_gt, sup_cas_softmax, cas_softmax_s, cas_softmax_t)
# update student parameters by backprapagation
cost.backward()
optimizer.step()
# update teacher parameters by EMA
student_params = OrderedDict(net_student.named_parameters())
teacher_params = OrderedDict(net_teacher.named_parameters())
# check if both model contains the same set of keys
assert student_params.keys() == teacher_params.keys()
for name, param in student_params.items():
# see https://www.tensorflow.org/api_docs/python/tf/train/ExponentialMovingAverage
# shadow_variable -= (1 - decay) * (shadow_variable - variable)
teacher_params[name] = teacher_params[name] * m + (1 - m) * param
student_buffers = OrderedDict(net_student.named_buffers())
teacher_buffers = OrderedDict(net_teacher.named_buffers())
# check if both model contains the same set of keys
assert student_buffers.keys() == teacher_buffers.keys()
for name, buffer in student_buffers.items():
teacher_buffers[name] = teacher_buffers[name] * m + (1 - m) * buffer
for key in loss.keys():
logger.log_value(key, loss[key].cpu().item(), step)
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
12008,
13,
13720,
29901,
529,
5813,
29958,
13,
2539,
29901,
29871,
29906,
29900,
29906,
29896,
29899,
29896,
29906,
29899,
29906,
29945,
29871,
29896,
29955,
29901,
29941,
29941,
29901,
29945,
29896,
13,
8897,
6103,
2481,
29901,
29871,
29906,
29900,
29906,
29896,
29899,
29896,
29906,
29899,
29906,
29929,
29871,
29896,
29900,
29901,
29896,
29900,
29901,
29896,
29946,
13,
8897,
6103,
943,
29901,
3529,
731,
9208,
6103,
943,
13,
9868,
29901,
29871,
31656,
31026,
29895,
5801,
2283,
7850,
31213,
31811,
31361,
30669,
29871,
31174,
30448,
30872,
30669,
29901,
2045,
597,
3292,
29889,
510,
29914,
14824,
29968,
5801,
29896,
29914,
29895,
5801,
29896,
2283,
7850,
29914,
4594,
22584,
29923,
29929,
29995,
29947,
29945,
29995,
29947,
29928,
29995,
29923,
29955,
29995,
29121,
29995,
16036,
13,
2283,
2605,
29901,
847,
29891,
326,
292,
29939,
262,
29914,
401,
29914,
17755,
1964,
29899,
2525,
14082,
1017,
29899,
3195,
292,
29914,
14968,
29889,
2272,
13,
12008,
13,
5215,
4842,
305,
13,
5215,
4842,
305,
29889,
15755,
408,
302,
29876,
13,
5215,
12655,
408,
7442,
13,
3166,
16250,
1053,
8170,
287,
21533,
13,
13,
5215,
3667,
29879,
13,
13,
13,
1990,
501,
29924,
29918,
6758,
29898,
15755,
29889,
7355,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
15595,
29892,
21762,
29892,
301,
29885,
6448,
29892,
330,
2735,
29892,
5906,
29892,
266,
690,
1125,
13,
4706,
2428,
29898,
5005,
29918,
6758,
29892,
1583,
467,
1649,
2344,
1649,
580,
13,
4706,
1583,
29889,
2312,
353,
15595,
13,
4706,
1583,
29889,
3571,
353,
21762,
13,
4706,
1583,
29889,
21457,
6448,
353,
301,
29885,
6448,
13,
4706,
1583,
29889,
4283,
353,
330,
2735,
13,
4706,
1583,
29889,
9264,
353,
5906,
13,
4706,
1583,
29889,
386,
690,
353,
266,
690,
13,
4706,
1583,
29889,
346,
29918,
29883,
5385,
291,
353,
302,
29876,
29889,
29933,
4741,
29931,
2209,
580,
13,
4706,
1583,
29889,
29880,
29906,
29918,
29883,
5385,
291,
353,
302,
29876,
29889,
29924,
1660,
29931,
2209,
580,
13,
268,
13,
1678,
822,
6411,
8362,
29918,
346,
29898,
1311,
29892,
330,
29873,
29892,
3209,
1125,
13,
4706,
6410,
353,
29871,
29900,
13,
4706,
2302,
353,
29871,
29900,
13,
4706,
282,
13168,
353,
313,
4141,
1405,
1583,
29889,
386,
690,
467,
7411,
2141,
29883,
6191,
580,
13,
4706,
363,
474,
297,
3464,
29898,
9398,
29889,
12181,
29961,
29900,
29962,
1125,
13,
9651,
363,
432,
297,
3464,
29898,
9398,
29889,
12181,
14352,
29896,
29962,
1125,
13,
18884,
565,
282,
13168,
29961,
29875,
29892,
584,
29892,
432,
1822,
2083,
580,
1405,
29871,
29900,
29901,
13,
462,
1678,
364,
353,
2533,
29898,
3358,
1278,
29961,
29875,
29892,
584,
29892,
432,
29962,
1360,
29896,
29897,
847,
5785,
29898,
3358,
1278,
29889,
12181,
29961,
29896,
2314,
13,
462,
1678,
1302,
1389,
29918,
29900,
353,
29871,
29900,
29889,
29945,
334,
364,
847,
313,
29878,
448,
29871,
29896,
29897,
13,
462,
1678,
1302,
1389,
29918,
29896,
353,
1302,
1389,
29918,
29900,
334,
313,
29878,
448,
29871,
29896,
29897,
13,
462,
1678,
396,
903,
6758,
353,
1302,
1389,
29918,
29896,
334,
282,
13168,
29961,
29875,
29892,
584,
29892,
432,
29962,
334,
4842,
305,
29889,
1188,
29898,
9398,
29961,
29875,
29892,
584,
29892,
432,
29962,
718,
29871,
29900,
29889,
29900,
29900,
29900,
29900,
29896,
29897,
17501,
13,
462,
1678,
396,
308,
1302,
1389,
29918,
29900,
334,
313,
29896,
29889,
29900,
448,
282,
13168,
29961,
29875,
29892,
584,
29892,
432,
2314,
334,
4842,
305,
29889,
1188,
29898,
29896,
29889,
29900,
448,
3209,
29961,
29875,
29892,
584,
29892,
432,
29962,
718,
29871,
29900,
29889,
29900,
29900,
29900,
29900,
29896,
29897,
13,
462,
1678,
903,
6758,
353,
4842,
305,
29889,
12324,
29898,
9398,
29961,
29875,
29892,
584,
29892,
432,
29962,
448,
282,
13168,
29961,
29875,
29892,
584,
29892,
432,
1402,
282,
29922,
29906,
29897,
13,
462,
1678,
6410,
353,
6410,
718,
4842,
305,
29889,
12676,
7373,
6758,
29897,
13,
462,
1678,
2302,
4619,
29871,
29896,
13,
4706,
6410,
353,
6410,
847,
2302,
13,
13,
4706,
736,
6410,
13,
13,
1678,
822,
6375,
29898,
1311,
29892,
8158,
29918,
627,
29892,
8158,
29918,
29890,
9415,
29892,
1238,
271,
29918,
627,
29892,
1238,
271,
29918,
29890,
9415,
29892,
3858,
29892,
13,
18884,
330,
29873,
29892,
13159,
29918,
9398,
29892,
3209,
29918,
29879,
29892,
3209,
29918,
29873,
1125,
13,
4706,
6410,
353,
6571,
13,
308,
13,
4706,
3858,
353,
3858,
847,
4842,
305,
29889,
2083,
29898,
1643,
29892,
3964,
29922,
29896,
29892,
3013,
6229,
29922,
5574,
29897,
13,
13,
4706,
6410,
29918,
25932,
353,
1583,
29889,
346,
29918,
29883,
5385,
291,
29898,
13628,
29918,
627,
29892,
3858,
29897,
13,
13,
4706,
3858,
29918,
29890,
9415,
353,
4842,
305,
29889,
2873,
29918,
4561,
29898,
1643,
467,
29883,
6191,
580,
13,
4706,
3858,
29918,
29890,
9415,
847,
29922,
4842,
305,
29889,
2083,
29898,
1643,
29918,
29890,
9415,
29892,
3964,
29922,
29896,
29892,
3013,
6229,
29922,
5574,
29897,
13,
4706,
6410,
29918,
915,
353,
1583,
29889,
346,
29918,
29883,
5385,
291,
29898,
13628,
29918,
29890,
9415,
29892,
3858,
29918,
29890,
9415,
29897,
13,
13,
4706,
6410,
29918,
627,
353,
1583,
29889,
9264,
448,
4842,
305,
29889,
12324,
29898,
7345,
305,
29889,
12676,
29898,
1725,
271,
29918,
627,
29892,
3964,
29922,
29896,
511,
282,
29922,
29906,
29892,
3964,
29922,
29896,
29897,
13,
4706,
6410,
29918,
627,
29961,
6758,
29918,
627,
529,
29871,
29900,
29962,
353,
29871,
29900,
13,
4706,
6410,
29918,
29890,
9415,
353,
4842,
305,
29889,
12324,
29898,
7345,
305,
29889,
12676,
29898,
1725,
271,
29918,
29890,
9415,
29892,
3964,
29922,
29896,
511,
282,
29922,
29906,
29892,
3964,
29922,
29896,
29897,
13,
13,
4706,
6410,
29918,
398,
353,
4842,
305,
29889,
12676,
3552,
6758,
29918,
627,
718,
6410,
29918,
29890,
9415,
29897,
3579,
29871,
29906,
29897,
13,
13,
4706,
6410,
29918,
7827,
353,
6410,
29918,
25932,
718,
1583,
29889,
2312,
334,
6410,
29918,
398,
718,
1583,
29889,
3571,
334,
6410,
29918,
915,
13,
13,
4706,
565,
13159,
29918,
9398,
338,
451,
6213,
29901,
13,
9651,
6410,
29918,
12587,
353,
1583,
29889,
5521,
8362,
29918,
346,
29898,
4141,
29892,
13159,
29918,
9398,
29897,
13,
9651,
6410,
3366,
6758,
29918,
12587,
3108,
353,
6410,
29918,
12587,
13,
9651,
1596,
703,
6758,
29918,
12587,
613,
313,
1311,
29889,
21457,
6448,
29930,
6758,
29918,
12587,
467,
4801,
496,
2141,
21970,
2141,
667,
3101,
13,
9651,
6410,
29918,
7827,
353,
6410,
29918,
7827,
718,
1583,
29889,
21457,
6448,
334,
6410,
29918,
12587,
13,
13,
4706,
565,
3209,
29918,
29879,
338,
451,
6213,
29901,
13,
9651,
396,
15703,
8368,
1040,
6038,
371,
13,
9651,
6410,
29918,
303,
353,
1583,
29889,
29880,
29906,
29918,
29883,
5385,
291,
29898,
9398,
29918,
29879,
29892,
3209,
29918,
29873,
29897,
13,
9651,
6410,
29918,
7827,
353,
6410,
29918,
7827,
718,
1583,
29889,
4283,
334,
6410,
29918,
303,
13,
9651,
1596,
703,
6758,
29918,
303,
613,
313,
1311,
29889,
4283,
29930,
6758,
29918,
303,
467,
4801,
496,
2141,
21970,
2141,
667,
3101,
13,
9651,
6410,
3366,
6758,
29918,
303,
3108,
353,
6410,
29918,
303,
13,
13,
4706,
6410,
3366,
6758,
29918,
25932,
3108,
353,
6410,
29918,
25932,
13,
4706,
6410,
3366,
6758,
29918,
915,
3108,
353,
6410,
29918,
915,
13,
4706,
6410,
3366,
6758,
29918,
398,
3108,
353,
6410,
29918,
398,
13,
4706,
6410,
3366,
6758,
29918,
7827,
3108,
353,
6410,
29918,
7827,
13,
4706,
1596,
703,
6758,
29918,
25932,
613,
6410,
29918,
25932,
29889,
4801,
496,
2141,
21970,
2141,
667,
3101,
13,
4706,
1596,
703,
6758,
29918,
915,
613,
313,
1311,
29889,
3571,
334,
6410,
29918,
915,
467,
4801,
496,
2141,
21970,
2141,
667,
3101,
13,
4706,
1596,
703,
6758,
29918,
398,
613,
313,
1311,
29889,
2312,
334,
6410,
29918,
398,
467,
4801,
496,
2141,
21970,
2141,
667,
3101,
13,
4706,
1596,
703,
6758,
29918,
7827,
613,
6410,
29918,
7827,
29889,
4801,
496,
2141,
21970,
2141,
667,
3101,
13,
13,
4706,
736,
6410,
29918,
7827,
29892,
6410,
13,
13,
1753,
7945,
29898,
1212,
29918,
18945,
29892,
7787,
29918,
371,
11665,
29892,
23466,
29918,
1524,
29892,
5994,
3950,
29892,
28770,
291,
29892,
17927,
29892,
4331,
29892,
286,
1125,
13,
1678,
7787,
29918,
18945,
29889,
14968,
580,
13,
268,
13,
1678,
903,
1272,
29892,
903,
1643,
29892,
903,
4141,
29892,
17117,
903,
353,
2446,
29898,
12657,
29918,
1524,
29897,
13,
13,
1678,
903,
1272,
353,
903,
1272,
29889,
29883,
6191,
580,
13,
1678,
903,
1643,
353,
903,
1643,
29889,
29883,
6191,
580,
13,
1678,
565,
903,
4141,
338,
451,
6213,
29901,
13,
4706,
903,
4141,
353,
903,
4141,
29889,
29883,
6191,
580,
13,
13,
1678,
5994,
3950,
29889,
9171,
29918,
5105,
580,
13,
13,
1678,
8158,
29918,
627,
29892,
8158,
29918,
29890,
9415,
29892,
1238,
271,
29918,
627,
29892,
1238,
271,
29918,
29890,
9415,
29892,
17117,
3209,
29918,
2695,
3317,
29918,
29879,
29892,
13159,
29918,
9398,
29918,
2695,
3317,
353,
7787,
29918,
18945,
7373,
1272,
29897,
13,
1678,
17117,
17117,
17117,
17117,
17117,
3209,
29918,
2695,
3317,
29918,
29873,
29892,
903,
353,
7787,
29918,
18945,
7373,
1272,
29897,
13,
13,
1678,
396,
3209,
353,
6213,
13,
1678,
396,
565,
7787,
29889,
1311,
29918,
14968,
29901,
13,
1678,
396,
268,
1238,
271,
29918,
29885,
4211,
20816,
29918,
627,
353,
4842,
305,
29889,
12676,
29898,
7345,
305,
29889,
12324,
29898,
1725,
271,
29918,
627,
29892,
3964,
29922,
29906,
511,
3964,
29922,
29896,
29897,
13,
1678,
396,
268,
1238,
271,
29918,
29885,
4211,
20816,
29918,
29890,
9415,
353,
4842,
305,
29889,
12676,
29898,
7345,
305,
29889,
12324,
29898,
1725,
271,
29918,
29890,
9415,
29892,
3964,
29922,
29906,
511,
3964,
29922,
29896,
29897,
13,
1678,
396,
268,
1238,
271,
29918,
29885,
4211,
20816,
353,
4842,
305,
29889,
12324,
29898,
22100,
29892,
282,
29922,
29906,
29892,
3964,
29922,
29906,
29897,
13,
1678,
396,
268,
1238,
271,
29918,
29885,
4211,
20816,
353,
3667,
29879,
29889,
1195,
3317,
29918,
12324,
29898,
1725,
271,
29918,
29885,
4211,
20816,
29892,
13,
1678,
396,
462,
462,
308,
4236,
29918,
791,
29922,
1725,
271,
29918,
29885,
4211,
20816,
29918,
627,
29892,
13,
1678,
396,
462,
462,
308,
1375,
29918,
791,
29922,
1725,
271,
29918,
29885,
4211,
20816,
29918,
29890,
9415,
29897,
13,
1678,
396,
268,
1238,
271,
29918,
29885,
4211,
20816,
353,
1238,
271,
29918,
29885,
4211,
20816,
29889,
14358,
3552,
9398,
29918,
2695,
3317,
29889,
12181,
14352,
29896,
1402,
29871,
29896,
29892,
29871,
29896,
8106,
17858,
1082,
29898,
29896,
29892,
29871,
29906,
29892,
29871,
29900,
29897,
13,
1678,
396,
268,
3209,
353,
3667,
29879,
29889,
1195,
3317,
29918,
12324,
29898,
9398,
29918,
2695,
3317,
334,
1238,
271,
29918,
29885,
4211,
20816,
29897,
13,
13,
1678,
396,
565,
4331,
529,
29871,
29896,
29900,
29901,
13,
1678,
396,
268,
3209,
29918,
2695,
3317,
29918,
29879,
353,
6213,
13,
1678,
3438,
29892,
6410,
353,
28770,
291,
29898,
13628,
29918,
627,
29892,
8158,
29918,
29890,
9415,
29892,
1238,
271,
29918,
627,
29892,
1238,
271,
29918,
29890,
9415,
29892,
903,
1643,
29892,
13,
462,
965,
903,
4141,
29892,
13159,
29918,
9398,
29918,
2695,
3317,
29892,
3209,
29918,
2695,
3317,
29918,
29879,
29892,
3209,
29918,
2695,
3317,
29918,
29873,
29897,
13,
13,
1678,
396,
2767,
8368,
4128,
491,
1250,
29886,
2390,
351,
362,
13,
1678,
3438,
29889,
1627,
1328,
580,
13,
1678,
5994,
3950,
29889,
10568,
580,
13,
1678,
396,
2767,
15703,
4128,
491,
382,
1529,
13,
1678,
8368,
29918,
7529,
353,
8170,
287,
21533,
29898,
1212,
29918,
18945,
29889,
17514,
29918,
16744,
3101,
13,
1678,
15703,
29918,
7529,
353,
8170,
287,
21533,
29898,
1212,
29918,
371,
11665,
29889,
17514,
29918,
16744,
3101,
13,
13,
1678,
396,
1423,
565,
1716,
1904,
3743,
278,
1021,
731,
310,
6611,
13,
1678,
4974,
8368,
29918,
7529,
29889,
8149,
580,
1275,
15703,
29918,
7529,
29889,
8149,
580,
13,
13,
1678,
363,
1024,
29892,
1828,
297,
8368,
29918,
7529,
29889,
7076,
7295,
13,
4706,
396,
1074,
2045,
597,
1636,
29889,
29056,
29889,
990,
29914,
2754,
29918,
2640,
29914,
4691,
29914,
13264,
29914,
14968,
29914,
1252,
1112,
2556,
29924,
21081,
29909,
19698,
13,
4706,
396,
15504,
29918,
11918,
22361,
313,
29896,
448,
20228,
29897,
334,
313,
17505,
29918,
11918,
448,
2286,
29897,
13,
4706,
15703,
29918,
7529,
29961,
978,
29962,
353,
15703,
29918,
7529,
29961,
978,
29962,
334,
286,
718,
313,
29896,
448,
286,
29897,
334,
1828,
13,
13,
1678,
8368,
29918,
28040,
414,
353,
8170,
287,
21533,
29898,
1212,
29918,
18945,
29889,
17514,
29918,
28040,
414,
3101,
13,
1678,
15703,
29918,
28040,
414,
353,
8170,
287,
21533,
29898,
1212,
29918,
371,
11665,
29889,
17514,
29918,
28040,
414,
3101,
13,
13,
1678,
396,
1423,
565,
1716,
1904,
3743,
278,
1021,
731,
310,
6611,
13,
1678,
4974,
8368,
29918,
28040,
414,
29889,
8149,
580,
1275,
15703,
29918,
28040,
414,
29889,
8149,
580,
13,
13,
1678,
363,
1024,
29892,
6835,
297,
8368,
29918,
28040,
414,
29889,
7076,
7295,
13,
4706,
15703,
29918,
28040,
414,
29961,
978,
29962,
353,
15703,
29918,
28040,
414,
29961,
978,
29962,
334,
286,
718,
313,
29896,
448,
286,
29897,
334,
6835,
13,
13,
1678,
363,
1820,
297,
6410,
29889,
8149,
7295,
13,
4706,
17927,
29889,
1188,
29918,
1767,
29898,
1989,
29892,
6410,
29961,
1989,
1822,
21970,
2141,
667,
3285,
4331,
29897,
13,
2
] |
Crunchyroll_Keypad/Crunchyroll_Keypad.py | Benjamin-Valderrama/Arduino | 0 | 40336 | <reponame>Benjamin-Valderrama/Arduino
#Things to add:
#
#
import pyautogui as pag
import time
import webbrowser as wb
import serial
# Instructions
instructions = ''' Select one of the followings : \n
\t 0 : Lunching the app
\t 1 : Previous Chapter
\t 2 : Next Chapter
\t 3 : Saving the current Chapter
\t 4 : Saving the current Chapter and Exit
\t 9 : Finish the app
'''
# SETTING UP A CONNECTION WITH ARDUINO
ser = serial.Serial('COM5', 9800, timeout=1)
# FLAG FOR THE APP
running = True
# FUNCTIONS:
# 0. START THE APP
def app_start():
with open('current_chapter.txt', mode='r+') as file:
chapter_link = file.readline()
wb.open(chapter_link)
time.sleep(3.5)
pag.press('f')
file.truncate(0)
file.close()
# 1. PREVIOUS CHAPTER
def previous_chapter():
#pag.hotkey('alt', 'tab')
pag.press('esc')
back_arrow_positionX, back_arrow_positionY = 22, 50 # These might change depending on the PC and browser
pag.click(back_arrow_positionX, back_arrow_positionY)
time.sleep(2.5)
pag.press('f')
# 2. NEXT CHAPTER
def next_chapter():
#pag.hotkey('alt', 'tab')
next_arrow_positionX, next_arrow_positionY = 69, 700 # These might change depending on the PC
pag.click(next_arrow_positionX, next_arrow_positionY)
time.sleep(2.5) # Waiting until next chapter is loaded
pag.press('f')
# 3. SAVING CURRENT CHAPTER
def saving_chapter():
#pag.hotkey('alt', 'tab')
pag.keyDown('esc') # Leaving full screen mode
pag.press('space') # Pausing the video
link_positionX, link_positionY = 167, 52 # These might change depending on the PC and browser
pag.click(link_positionX, link_positionY)
pag.hotkey('ctrl', 'c') # Copy the link of the chapter
pag.press('win')
pag.press('space')
time.sleep(0.1)
pag.write('current_chapter')
time.sleep(0.3)
pag.press('enter')
time.sleep(0.1)
pag.hotkey('ctrl', 'v')
time.sleep(0.1)
pag.hotkey('alt', 'f4')
time.sleep(0.1)
pag.press('enter') # Saving the chapter's link in the "current_chapter.txt" file
pag.hotkey('ctrl', 'w')
# 9. KILLING THE APP:
def app_killer():
global running
running = False
# 10. Check what wants the user to do
def check_users_input(user_input):
if user_input == 0 or user_input == b'Launching the app\r\n':
app_start()
elif user_input == 1 or user_input == b'Previous Chapter\r\n':
previous_chapter()
elif user_input == 2 or user_input == b'Next Chapter\r\n':
next_chapter()
elif user_input == 3:
saving_chapter()
elif user_input == 4 or user_input == b'Saving Chapter and Exit\r\n':
saving_chapter()
app_killer()
elif user_input == 9:
app_killer()
elif user_input == b'Instructions\r\n':
print(instructions)
# Receiveng the input from th user and acting accordingly
print(instructions)
while running:
user_input = ser.read(100)
check_users_input(user_input)
| [
1,
529,
276,
1112,
420,
29958,
20841,
18323,
29899,
1440,
672,
20556,
29914,
1433,
28955,
13,
29937,
1349,
886,
304,
788,
29901,
13,
29937,
13,
29937,
13,
5215,
11451,
1300,
468,
1481,
408,
10203,
13,
5215,
931,
13,
5215,
591,
1327,
8777,
408,
281,
29890,
13,
5215,
7797,
13,
13,
29937,
2799,
582,
1953,
13,
2611,
582,
1953,
353,
14550,
7605,
697,
310,
278,
1101,
886,
584,
320,
29876,
29871,
13,
29905,
29873,
29871,
29900,
584,
365,
3322,
292,
278,
623,
13,
29905,
29873,
29871,
29896,
584,
4721,
2366,
23040,
13,
29905,
29873,
29871,
29906,
584,
8084,
23040,
13,
29905,
29873,
29871,
29941,
584,
317,
5555,
278,
1857,
23040,
13,
29905,
29873,
29871,
29946,
584,
317,
5555,
278,
1857,
23040,
322,
25954,
13,
29905,
29873,
29871,
29929,
584,
4231,
728,
278,
623,
29871,
13,
12008,
13,
13,
29937,
11368,
29911,
4214,
11901,
319,
8707,
8186,
9838,
22659,
9033,
14849,
1177,
29949,
13,
643,
353,
7797,
29889,
9125,
877,
19795,
29945,
742,
29871,
29929,
29947,
29900,
29900,
29892,
11815,
29922,
29896,
29897,
13,
13,
29937,
383,
4375,
29954,
15842,
6093,
12279,
29925,
13,
21094,
353,
5852,
13,
13,
29937,
383,
28700,
29903,
29901,
13,
29937,
29871,
29900,
29889,
6850,
8322,
6093,
12279,
29925,
13,
1753,
623,
29918,
2962,
7295,
13,
1678,
411,
1722,
877,
3784,
29918,
27349,
29889,
3945,
742,
4464,
2433,
29878,
29974,
1495,
408,
934,
29901,
13,
4706,
16385,
29918,
2324,
353,
934,
29889,
949,
1220,
580,
13,
4706,
281,
29890,
29889,
3150,
29898,
27349,
29918,
2324,
29897,
13,
4706,
931,
29889,
17059,
29898,
29941,
29889,
29945,
29897,
13,
4706,
10203,
29889,
2139,
877,
29888,
1495,
13,
4706,
934,
29889,
509,
4661,
403,
29898,
29900,
29897,
13,
4706,
934,
29889,
5358,
580,
13,
13,
29937,
29871,
29896,
29889,
349,
1525,
29963,
5971,
3308,
12689,
13,
1753,
3517,
29918,
27349,
7295,
13,
1678,
396,
13573,
29889,
8711,
1989,
877,
1997,
742,
525,
3891,
1495,
13,
1678,
10203,
29889,
2139,
877,
9977,
1495,
13,
1678,
1250,
29918,
2936,
29918,
3283,
29990,
29892,
1250,
29918,
2936,
29918,
3283,
29979,
353,
29871,
29906,
29906,
29892,
29871,
29945,
29900,
396,
4525,
1795,
1735,
8679,
373,
278,
9609,
322,
4714,
13,
1678,
10203,
29889,
3808,
29898,
1627,
29918,
2936,
29918,
3283,
29990,
29892,
1250,
29918,
2936,
29918,
3283,
29979,
29897,
13,
1678,
931,
29889,
17059,
29898,
29906,
29889,
29945,
29897,
13,
1678,
10203,
29889,
2139,
877,
29888,
1495,
13,
13,
29937,
29871,
29906,
29889,
405,
12194,
12689,
13,
1753,
2446,
29918,
27349,
7295,
13,
1678,
396,
13573,
29889,
8711,
1989,
877,
1997,
742,
525,
3891,
1495,
13,
1678,
2446,
29918,
2936,
29918,
3283,
29990,
29892,
2446,
29918,
2936,
29918,
3283,
29979,
353,
29871,
29953,
29929,
29892,
29871,
29955,
29900,
29900,
396,
4525,
1795,
1735,
8679,
373,
278,
9609,
13,
1678,
10203,
29889,
3808,
29898,
4622,
29918,
2936,
29918,
3283,
29990,
29892,
2446,
29918,
2936,
29918,
3283,
29979,
29897,
13,
1678,
931,
29889,
17059,
29898,
29906,
29889,
29945,
29897,
396,
20340,
292,
2745,
2446,
16385,
338,
7500,
13,
1678,
10203,
29889,
2139,
877,
29888,
1495,
13,
13,
29937,
29871,
29941,
29889,
317,
7520,
4214,
315,
4574,
29450,
12689,
13,
1753,
14238,
29918,
27349,
7295,
13,
1678,
396,
13573,
29889,
8711,
1989,
877,
1997,
742,
525,
3891,
1495,
13,
1678,
10203,
29889,
1989,
6767,
877,
9977,
1495,
396,
951,
5555,
2989,
4315,
4464,
13,
13,
1678,
10203,
29889,
2139,
877,
3493,
1495,
396,
349,
1485,
292,
278,
4863,
13,
13,
1678,
1544,
29918,
3283,
29990,
29892,
1544,
29918,
3283,
29979,
353,
29871,
29896,
29953,
29955,
29892,
29871,
29945,
29906,
396,
4525,
1795,
1735,
8679,
373,
278,
9609,
322,
4714,
13,
1678,
10203,
29889,
3808,
29898,
2324,
29918,
3283,
29990,
29892,
1544,
29918,
3283,
29979,
29897,
13,
1678,
10203,
29889,
8711,
1989,
877,
24220,
742,
525,
29883,
1495,
29871,
396,
14187,
278,
1544,
310,
278,
16385,
13,
13,
1678,
10203,
29889,
2139,
877,
5080,
1495,
13,
1678,
10203,
29889,
2139,
877,
3493,
1495,
13,
1678,
931,
29889,
17059,
29898,
29900,
29889,
29896,
29897,
13,
1678,
10203,
29889,
3539,
877,
3784,
29918,
27349,
1495,
13,
1678,
931,
29889,
17059,
29898,
29900,
29889,
29941,
29897,
13,
1678,
10203,
29889,
2139,
877,
5893,
1495,
13,
1678,
931,
29889,
17059,
29898,
29900,
29889,
29896,
29897,
13,
1678,
10203,
29889,
8711,
1989,
877,
24220,
742,
525,
29894,
1495,
13,
1678,
931,
29889,
17059,
29898,
29900,
29889,
29896,
29897,
13,
1678,
10203,
29889,
8711,
1989,
877,
1997,
742,
525,
29888,
29946,
1495,
13,
1678,
931,
29889,
17059,
29898,
29900,
29889,
29896,
29897,
13,
1678,
10203,
29889,
2139,
877,
5893,
1495,
396,
317,
5555,
278,
16385,
29915,
29879,
1544,
297,
278,
376,
3784,
29918,
27349,
29889,
3945,
29908,
934,
13,
13,
1678,
10203,
29889,
8711,
1989,
877,
24220,
742,
525,
29893,
1495,
13,
13,
29937,
29871,
29929,
29889,
476,
24071,
4214,
6093,
12279,
29925,
29901,
13,
1753,
623,
29918,
29895,
5495,
7295,
13,
1678,
5534,
2734,
13,
1678,
2734,
353,
7700,
13,
13,
29937,
29871,
29896,
29900,
29889,
5399,
825,
10753,
278,
1404,
304,
437,
13,
1753,
1423,
29918,
7193,
29918,
2080,
29898,
1792,
29918,
2080,
1125,
13,
1678,
565,
1404,
29918,
2080,
1275,
29871,
29900,
470,
1404,
29918,
2080,
1275,
289,
29915,
17641,
292,
278,
623,
29905,
29878,
29905,
29876,
2396,
13,
4706,
623,
29918,
2962,
580,
13,
13,
1678,
25342,
1404,
29918,
2080,
1275,
29871,
29896,
470,
1404,
29918,
2080,
1275,
289,
29915,
6572,
2366,
23040,
29905,
29878,
29905,
29876,
2396,
13,
4706,
3517,
29918,
27349,
580,
13,
13,
1678,
25342,
1404,
29918,
2080,
1275,
29871,
29906,
470,
1404,
29918,
2080,
1275,
289,
29915,
9190,
23040,
29905,
29878,
29905,
29876,
2396,
13,
4706,
2446,
29918,
27349,
580,
13,
13,
1678,
25342,
1404,
29918,
2080,
1275,
29871,
29941,
29901,
13,
4706,
14238,
29918,
27349,
580,
13,
13,
1678,
25342,
1404,
29918,
2080,
1275,
29871,
29946,
470,
1404,
29918,
2080,
1275,
289,
29915,
29903,
5555,
23040,
322,
25954,
29905,
29878,
29905,
29876,
2396,
13,
4706,
14238,
29918,
27349,
580,
13,
4706,
623,
29918,
29895,
5495,
580,
13,
13,
1678,
25342,
1404,
29918,
2080,
1275,
29871,
29929,
29901,
13,
4706,
623,
29918,
29895,
5495,
580,
13,
13,
1678,
25342,
1404,
29918,
2080,
1275,
289,
29915,
3379,
582,
1953,
29905,
29878,
29905,
29876,
2396,
13,
4706,
1596,
29898,
2611,
582,
1953,
29897,
13,
13,
29937,
24328,
440,
996,
278,
1881,
515,
266,
1404,
322,
16684,
16205,
13,
2158,
29898,
2611,
582,
1953,
29897,
13,
8000,
2734,
29901,
13,
1678,
1404,
29918,
2080,
353,
724,
29889,
949,
29898,
29896,
29900,
29900,
29897,
13,
1678,
1423,
29918,
7193,
29918,
2080,
29898,
1792,
29918,
2080,
29897,
13,
2
] |
python/setup.py | rpiotrow/lolo | 34 | 24499 | <reponame>rpiotrow/lolo
from setuptools import setup
from glob import glob
import shutil
import sys
import os
# single source of truth for package version
version_ns = {}
with open(os.path.join("lolopy", "version.py")) as f:
exec(f.read(), version_ns)
version = version_ns['__version__']
# Find the lolo jar
JAR_FILE = glob(os.path.join('..', 'target', 'scala-2.13', 'lolo-jar-with-dependencies.jar'))
if len(JAR_FILE) == 0:
raise Exception('No Jar files found. Build lolo first by calling "make" or "cd ..; sbt assembly"')
elif len(JAR_FILE) > 1:
raise Exception('Found >1 Jar file. Clean and rebuild lolopy: cd ..; sbt assembly')
# Copy the jar file to a directory at the same level as the package
jar_path = os.path.join('lolopy', 'jar')
if os.path.isdir(jar_path):
shutil.rmtree(jar_path)
os.mkdir(jar_path)
shutil.copy(JAR_FILE[0], os.path.join(jar_path, 'lolo-jar-with-dependencies.jar'))
# Convert the README.md file to rst (rst is rendered by PyPi not MD)
# Taken from: https://github.com/apache/spark/blob/master/python/setup.py
# Parse the README markdown file into rst for PyPI
long_description = "!!!!! missing pandoc do not upload to PyPI !!!!"
try:
import pypandoc
long_description = pypandoc.convert('README.md', 'rst')
except ImportError:
print("Could not import pypandoc - required to package PySpark", file=sys.stderr)
except OSError:
print("Could not convert - pandoc is not installed", file=sys.stderr)
# Make the installation
setup(
name='lolopy',
version=version,
url='https://github.com/CitrineInformatics/lolo',
maintainer='<NAME>',
maintainer_email='<EMAIL>',
packages=[
'lolopy',
'lolopy.jar' # Used for the PyPi packaging
],
include_package_data=True,
package_data={'lolopy.jar': ['*.jar']},
install_requires=['scikit-learn', 'py4j'],
description='Python wrapper for the Lolo machine learning library',
long_description=long_description,
)
| [
1,
529,
276,
1112,
420,
29958,
29878,
1631,
327,
798,
29914,
29880,
3543,
13,
3166,
731,
21245,
8789,
1053,
6230,
13,
3166,
13149,
1053,
13149,
13,
5215,
528,
4422,
13,
5215,
10876,
13,
5215,
2897,
13,
13,
29937,
2323,
2752,
310,
8760,
363,
3577,
1873,
13,
3259,
29918,
1983,
353,
6571,
13,
2541,
1722,
29898,
359,
29889,
2084,
29889,
7122,
703,
29880,
324,
2270,
613,
376,
3259,
29889,
2272,
5783,
408,
285,
29901,
13,
1678,
2279,
29898,
29888,
29889,
949,
3285,
1873,
29918,
1983,
29897,
13,
3259,
353,
1873,
29918,
1983,
1839,
1649,
3259,
1649,
2033,
13,
13,
29937,
10987,
278,
301,
3543,
14631,
13,
29967,
1718,
29918,
7724,
353,
13149,
29898,
359,
29889,
2084,
29889,
7122,
877,
636,
742,
525,
5182,
742,
525,
15820,
29899,
29906,
29889,
29896,
29941,
742,
525,
29880,
3543,
29899,
4758,
29899,
2541,
29899,
22594,
29889,
4758,
8785,
13,
361,
7431,
29898,
29967,
1718,
29918,
7724,
29897,
1275,
29871,
29900,
29901,
13,
1678,
12020,
8960,
877,
3782,
15864,
2066,
1476,
29889,
8878,
301,
3543,
937,
491,
5432,
376,
5675,
29908,
470,
376,
2252,
6317,
29936,
269,
3116,
11470,
29908,
1495,
13,
23681,
7431,
29898,
29967,
1718,
29918,
7724,
29897,
1405,
29871,
29896,
29901,
13,
1678,
12020,
8960,
877,
9692,
1405,
29896,
15864,
934,
29889,
315,
14044,
322,
337,
4282,
301,
324,
2270,
29901,
14965,
6317,
29936,
269,
3116,
11470,
1495,
13,
13,
29937,
14187,
278,
14631,
934,
304,
263,
3884,
472,
278,
1021,
3233,
408,
278,
3577,
13,
4758,
29918,
2084,
353,
2897,
29889,
2084,
29889,
7122,
877,
29880,
324,
2270,
742,
525,
4758,
1495,
13,
361,
2897,
29889,
2084,
29889,
275,
3972,
29898,
4758,
29918,
2084,
1125,
13,
1678,
528,
4422,
29889,
1758,
8336,
29898,
4758,
29918,
2084,
29897,
13,
359,
29889,
11256,
3972,
29898,
4758,
29918,
2084,
29897,
13,
845,
4422,
29889,
8552,
29898,
29967,
1718,
29918,
7724,
29961,
29900,
1402,
2897,
29889,
2084,
29889,
7122,
29898,
4758,
29918,
2084,
29892,
525,
29880,
3543,
29899,
4758,
29899,
2541,
29899,
22594,
29889,
4758,
8785,
13,
13,
29937,
14806,
278,
5195,
3035,
2303,
29889,
3487,
934,
304,
364,
303,
313,
29878,
303,
338,
13751,
491,
10772,
12197,
451,
20672,
29897,
13,
29937,
29871,
323,
9424,
515,
29901,
2045,
597,
3292,
29889,
510,
29914,
4288,
29914,
12597,
29914,
10054,
29914,
6207,
29914,
4691,
29914,
14669,
29889,
2272,
13,
29937,
20969,
278,
5195,
3035,
2303,
2791,
3204,
934,
964,
364,
303,
363,
10772,
2227,
13,
5426,
29918,
8216,
353,
376,
6824,
21004,
4567,
282,
392,
542,
437,
451,
6441,
304,
10772,
2227,
1738,
6824,
3850,
13,
2202,
29901,
13,
1678,
1053,
282,
1478,
392,
542,
13,
1678,
1472,
29918,
8216,
353,
282,
1478,
392,
542,
29889,
13441,
877,
16310,
2303,
29889,
3487,
742,
525,
29878,
303,
1495,
13,
19499,
16032,
2392,
29901,
13,
1678,
1596,
703,
23323,
451,
1053,
282,
1478,
392,
542,
448,
3734,
304,
3577,
10772,
29903,
6378,
613,
934,
29922,
9675,
29889,
303,
20405,
29897,
13,
19499,
438,
29173,
29901,
13,
1678,
1596,
703,
23323,
451,
3588,
448,
282,
392,
542,
338,
451,
5130,
613,
934,
29922,
9675,
29889,
303,
20405,
29897,
13,
13,
13,
29937,
8561,
278,
11161,
13,
14669,
29898,
13,
1678,
1024,
2433,
29880,
324,
2270,
742,
13,
1678,
1873,
29922,
3259,
29892,
13,
1678,
3142,
2433,
991,
597,
3292,
29889,
510,
29914,
29907,
277,
29878,
457,
797,
4830,
1199,
29914,
29880,
3543,
742,
13,
1678,
7344,
261,
2433,
29966,
5813,
29958,
742,
13,
1678,
7344,
261,
29918,
5269,
2433,
29966,
26862,
6227,
29958,
742,
13,
1678,
9741,
11759,
13,
4706,
525,
29880,
324,
2270,
742,
13,
4706,
525,
29880,
324,
2270,
29889,
4758,
29915,
29871,
396,
501,
8485,
363,
278,
10772,
12197,
4870,
6751,
13,
1678,
21251,
13,
1678,
3160,
29918,
5113,
29918,
1272,
29922,
5574,
29892,
13,
1678,
3577,
29918,
1272,
3790,
29915,
29880,
324,
2270,
29889,
4758,
2396,
6024,
10521,
4758,
2033,
1118,
13,
1678,
2601,
29918,
276,
339,
2658,
29922,
1839,
26167,
7354,
29899,
19668,
742,
525,
2272,
29946,
29926,
7464,
13,
1678,
6139,
2433,
11980,
14476,
363,
278,
365,
3543,
4933,
6509,
3489,
742,
13,
1678,
1472,
29918,
8216,
29922,
5426,
29918,
8216,
29892,
13,
29897,
13,
2
] |
api/needley/models.py | kino-ma/needley | 0 | 31200 | <gh_stars>0
from django.db import models
from django.utils import timezone
from django.core.validators import MinLengthValidator
from django.contrib.auth.models import AbstractUser
class User(AbstractUser):
email = models.EmailField(unique=True)
# Nickname is display name
nickname = models.CharField(
validators=[MinLengthValidator(1)], max_length=20)
# Avator is a url icon image url
avatar = models.URLField(
validators=[MinLengthValidator(1)], max_length=200, null=True)
def __str__(self):
return "@%s" % self.username
class Article(models.Model):
# The author of this article. This field can be referenced by `article.author`
author = models.ForeignKey(
User,
related_name="author",
on_delete=models.CASCADE
)
# The title of this article
title = models.CharField(
validators=[MinLengthValidator(1)], max_length=100)
# Actual content of this article
content = models.TextField()
# Date when data were created/updated
created_at = models.DateTimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)
def __str__(self):
return "\"%s\" by %s" % (self.title, self.author.profile)
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
9557,
29889,
2585,
1053,
4733,
13,
3166,
9557,
29889,
13239,
1053,
29431,
13,
3166,
9557,
29889,
3221,
29889,
3084,
4097,
1053,
3080,
6513,
24204,
13,
3166,
9557,
29889,
21570,
29889,
5150,
29889,
9794,
1053,
25513,
2659,
13,
13,
13,
1990,
4911,
29898,
9118,
2659,
1125,
13,
1678,
4876,
353,
4733,
29889,
9823,
3073,
29898,
13092,
29922,
5574,
29897,
13,
1678,
396,
13853,
978,
338,
2479,
1024,
13,
1678,
25985,
978,
353,
4733,
29889,
27890,
29898,
13,
4706,
2854,
4097,
11759,
8140,
6513,
24204,
29898,
29896,
29897,
1402,
4236,
29918,
2848,
29922,
29906,
29900,
29897,
13,
1678,
396,
7740,
1061,
338,
263,
3142,
9849,
1967,
3142,
13,
1678,
1029,
14873,
353,
4733,
29889,
4219,
3073,
29898,
13,
4706,
2854,
4097,
11759,
8140,
6513,
24204,
29898,
29896,
29897,
1402,
4236,
29918,
2848,
29922,
29906,
29900,
29900,
29892,
1870,
29922,
5574,
29897,
13,
13,
1678,
822,
4770,
710,
12035,
1311,
1125,
13,
4706,
736,
17962,
29995,
29879,
29908,
1273,
1583,
29889,
6786,
13,
13,
13,
1990,
21746,
29898,
9794,
29889,
3195,
1125,
13,
1678,
396,
450,
4148,
310,
445,
4274,
29889,
910,
1746,
508,
367,
16180,
491,
421,
7914,
29889,
8921,
29952,
13,
1678,
4148,
353,
4733,
29889,
27755,
2558,
29898,
13,
4706,
4911,
29892,
13,
4706,
4475,
29918,
978,
543,
8921,
613,
13,
4706,
373,
29918,
8143,
29922,
9794,
29889,
29907,
3289,
5454,
2287,
13,
1678,
1723,
13,
1678,
396,
450,
3611,
310,
445,
4274,
13,
1678,
3611,
353,
4733,
29889,
27890,
29898,
13,
4706,
2854,
4097,
11759,
8140,
6513,
24204,
29898,
29896,
29897,
1402,
4236,
29918,
2848,
29922,
29896,
29900,
29900,
29897,
13,
1678,
396,
3185,
950,
2793,
310,
445,
4274,
13,
1678,
2793,
353,
4733,
29889,
15778,
580,
13,
13,
1678,
396,
4712,
746,
848,
892,
2825,
29914,
21402,
13,
1678,
2825,
29918,
271,
353,
4733,
29889,
11384,
3073,
29898,
6921,
29918,
3707,
29918,
1202,
29922,
5574,
29897,
13,
1678,
4784,
29918,
271,
353,
4733,
29889,
11384,
3073,
29898,
6921,
29918,
3707,
29922,
5574,
29897,
13,
13,
1678,
822,
4770,
710,
12035,
1311,
1125,
13,
4706,
736,
376,
5931,
29995,
29879,
5931,
491,
1273,
29879,
29908,
1273,
313,
1311,
29889,
3257,
29892,
1583,
29889,
8921,
29889,
10185,
29897,
13,
2
] |
swagger_client/apis/booking_api.py | scubawhere/scubawhere-api-python-client | 0 | 64259 | # coding: utf-8
"""
Scubawhere API Documentation
This is the documentation for scubawhere's RMS API. This API is only to be used by authorized parties with valid auth tokens. [Learn about scubawhere](http://www.scubawhere.com) to become an authorized consumer of our API
OpenAPI spec version: 1.0.0
Contact: <EMAIL>
Generated by: https://github.com/swagger-api/swagger-codegen.git
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from __future__ import absolute_import
import sys
import os
import re
# python 2 and python 3 compatibility library
from six import iteritems
from ..configuration import Configuration
from ..api_client import ApiClient
class BookingApi(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
Ref: https://github.com/swagger-api/swagger-codegen
"""
def __init__(self, api_client=None):
config = Configuration()
if api_client:
self.api_client = api_client
else:
if not config.api_client:
config.api_client = ApiClient()
self.api_client = config.api_client
def add_booking_detail(self, booking_id, customer_id, **kwargs):
"""
Add a package / course / ticket with its session to the booking
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.add_booking_detail(booking_id, customer_id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param int booking_id: (required)
:param int customer_id: (required)
:param int ticket_id:
:param int session_id:
:param int boatroom_id:
:param int training_session_id:
:param bool temporary:
:param int package_id:
:param int packagefacade_id:
:param int course_id:
:return: InlineResponse20010
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.add_booking_detail_with_http_info(booking_id, customer_id, **kwargs)
else:
(data) = self.add_booking_detail_with_http_info(booking_id, customer_id, **kwargs)
return data
def add_booking_detail_with_http_info(self, booking_id, customer_id, **kwargs):
"""
Add a package / course / ticket with its session to the booking
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.add_booking_detail_with_http_info(booking_id, customer_id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param int booking_id: (required)
:param int customer_id: (required)
:param int ticket_id:
:param int session_id:
:param int boatroom_id:
:param int training_session_id:
:param bool temporary:
:param int package_id:
:param int packagefacade_id:
:param int course_id:
:return: InlineResponse20010
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['booking_id', 'customer_id', 'ticket_id', 'session_id', 'boatroom_id', 'training_session_id', 'temporary', 'package_id', 'packagefacade_id', 'course_id']
all_params.append('callback')
all_params.append('_return_http_data_only')
params = locals()
for key, val in iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method add_booking_detail" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'booking_id' is set
if ('booking_id' not in params) or (params['booking_id'] is None):
raise ValueError("Missing the required parameter `booking_id` when calling `add_booking_detail`")
# verify the required parameter 'customer_id' is set
if ('customer_id' not in params) or (params['customer_id'] is None):
raise ValueError("Missing the required parameter `customer_id` when calling `add_booking_detail`")
resource_path = '/booking/add-detail'.replace('{format}', 'json')
path_params = {}
query_params = {}
if 'booking_id' in params:
query_params['booking_id'] = params['booking_id']
if 'customer_id' in params:
query_params['customer_id'] = params['customer_id']
if 'ticket_id' in params:
query_params['ticket_id'] = params['ticket_id']
if 'session_id' in params:
query_params['session_id'] = params['session_id']
if 'boatroom_id' in params:
query_params['boatroom_id'] = params['boatroom_id']
if 'training_session_id' in params:
query_params['training_session_id'] = params['training_session_id']
if 'temporary' in params:
query_params['temporary'] = params['temporary']
if 'package_id' in params:
query_params['package_id'] = params['package_id']
if 'packagefacade_id' in params:
query_params['packagefacade_id'] = params['packagefacade_id']
if 'course_id' in params:
query_params['course_id'] = params['course_id']
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json'])
# Authentication setting
auth_settings = []
return self.api_client.call_api(resource_path, 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='InlineResponse20010',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'))
def attach_accommodation(self, booking_id, accommodation_id, customer_id, **kwargs):
"""
Attach an accommodation booking to a booking
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.attach_accommodation(booking_id, accommodation_id, customer_id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param int booking_id: (required)
:param int accommodation_id: (required)
:param int customer_id: (required)
:param date start:
:param date end:
:return: InlineResponse2008
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.attach_accommodation_with_http_info(booking_id, accommodation_id, customer_id, **kwargs)
else:
(data) = self.attach_accommodation_with_http_info(booking_id, accommodation_id, customer_id, **kwargs)
return data
def attach_accommodation_with_http_info(self, booking_id, accommodation_id, customer_id, **kwargs):
"""
Attach an accommodation booking to a booking
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.attach_accommodation_with_http_info(booking_id, accommodation_id, customer_id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param int booking_id: (required)
:param int accommodation_id: (required)
:param int customer_id: (required)
:param date start:
:param date end:
:return: InlineResponse2008
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['booking_id', 'accommodation_id', 'customer_id', 'start', 'end']
all_params.append('callback')
all_params.append('_return_http_data_only')
params = locals()
for key, val in iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method attach_accommodation" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'booking_id' is set
if ('booking_id' not in params) or (params['booking_id'] is None):
raise ValueError("Missing the required parameter `booking_id` when calling `attach_accommodation`")
# verify the required parameter 'accommodation_id' is set
if ('accommodation_id' not in params) or (params['accommodation_id'] is None):
raise ValueError("Missing the required parameter `accommodation_id` when calling `attach_accommodation`")
# verify the required parameter 'customer_id' is set
if ('customer_id' not in params) or (params['customer_id'] is None):
raise ValueError("Missing the required parameter `customer_id` when calling `attach_accommodation`")
resource_path = '/booking/add-accommodation'.replace('{format}', 'json')
path_params = {}
query_params = {}
if 'booking_id' in params:
query_params['booking_id'] = params['booking_id']
if 'accommodation_id' in params:
query_params['accommodation_id'] = params['accommodation_id']
if 'customer_id' in params:
query_params['customer_id'] = params['customer_id']
if 'start' in params:
query_params['start'] = params['start']
if 'end' in params:
query_params['end'] = params['end']
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json'])
# Authentication setting
auth_settings = []
return self.api_client.call_api(resource_path, 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='InlineResponse2008',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'))
def attach_addon(self, booking_id, bookingdetail_id, addon_id, **kwargs):
"""
Attach an addon to a trip of a booking
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.attach_addon(booking_id, bookingdetail_id, addon_id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param int booking_id: (required)
:param int bookingdetail_id: (required)
:param int addon_id: (required)
:param int quantity:
:param int packagefacade_id:
:return: InlineResponse2009
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.attach_addon_with_http_info(booking_id, bookingdetail_id, addon_id, **kwargs)
else:
(data) = self.attach_addon_with_http_info(booking_id, bookingdetail_id, addon_id, **kwargs)
return data
def attach_addon_with_http_info(self, booking_id, bookingdetail_id, addon_id, **kwargs):
"""
Attach an addon to a trip of a booking
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.attach_addon_with_http_info(booking_id, bookingdetail_id, addon_id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param int booking_id: (required)
:param int bookingdetail_id: (required)
:param int addon_id: (required)
:param int quantity:
:param int packagefacade_id:
:return: InlineResponse2009
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['booking_id', 'bookingdetail_id', 'addon_id', 'quantity', 'packagefacade_id']
all_params.append('callback')
all_params.append('_return_http_data_only')
params = locals()
for key, val in iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method attach_addon" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'booking_id' is set
if ('booking_id' not in params) or (params['booking_id'] is None):
raise ValueError("Missing the required parameter `booking_id` when calling `attach_addon`")
# verify the required parameter 'bookingdetail_id' is set
if ('bookingdetail_id' not in params) or (params['bookingdetail_id'] is None):
raise ValueError("Missing the required parameter `bookingdetail_id` when calling `attach_addon`")
# verify the required parameter 'addon_id' is set
if ('addon_id' not in params) or (params['addon_id'] is None):
raise ValueError("Missing the required parameter `addon_id` when calling `attach_addon`")
resource_path = '/booking/add-addon'.replace('{format}', 'json')
path_params = {}
query_params = {}
if 'booking_id' in params:
query_params['booking_id'] = params['booking_id']
if 'bookingdetail_id' in params:
query_params['bookingdetail_id'] = params['bookingdetail_id']
if 'addon_id' in params:
query_params['addon_id'] = params['addon_id']
if 'quantity' in params:
query_params['quantity'] = params['quantity']
if 'packagefacade_id' in params:
query_params['packagefacade_id'] = params['packagefacade_id']
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json'])
# Authentication setting
auth_settings = []
return self.api_client.call_api(resource_path, 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='InlineResponse2009',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'))
def attach_pickup(self, booking_id, location, date, time, **kwargs):
"""
Attach a pickup location for a booking
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.attach_pickup(booking_id, location, date, time, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param int booking_id: (required)
:param str location: (required)
:param date date: (required)
:param str time: (required)
:return: InlineResponse20011
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.attach_pickup_with_http_info(booking_id, location, date, time, **kwargs)
else:
(data) = self.attach_pickup_with_http_info(booking_id, location, date, time, **kwargs)
return data
def attach_pickup_with_http_info(self, booking_id, location, date, time, **kwargs):
"""
Attach a pickup location for a booking
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.attach_pickup_with_http_info(booking_id, location, date, time, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param int booking_id: (required)
:param str location: (required)
:param date date: (required)
:param str time: (required)
:return: InlineResponse20011
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['booking_id', 'location', 'date', 'time']
all_params.append('callback')
all_params.append('_return_http_data_only')
params = locals()
for key, val in iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method attach_pickup" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'booking_id' is set
if ('booking_id' not in params) or (params['booking_id'] is None):
raise ValueError("Missing the required parameter `booking_id` when calling `attach_pickup`")
# verify the required parameter 'location' is set
if ('location' not in params) or (params['location'] is None):
raise ValueError("Missing the required parameter `location` when calling `attach_pickup`")
# verify the required parameter 'date' is set
if ('date' not in params) or (params['date'] is None):
raise ValueError("Missing the required parameter `date` when calling `attach_pickup`")
# verify the required parameter 'time' is set
if ('time' not in params) or (params['time'] is None):
raise ValueError("Missing the required parameter `time` when calling `attach_pickup`")
resource_path = '/booking/add-pickup'.replace('{format}', 'json')
path_params = {}
query_params = {}
if 'booking_id' in params:
query_params['booking_id'] = params['booking_id']
if 'location' in params:
query_params['location'] = params['location']
if 'date' in params:
query_params['date'] = params['date']
if 'time' in params:
query_params['time'] = params['time']
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json'])
# Authentication setting
auth_settings = []
return self.api_client.call_api(resource_path, 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='InlineResponse20011',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'))
def cancel_booking(self, booking_id, **kwargs):
"""
Cancel a booking
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.cancel_booking(booking_id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param int booking_id: (required)
:return: InlineResponse2003
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.cancel_booking_with_http_info(booking_id, **kwargs)
else:
(data) = self.cancel_booking_with_http_info(booking_id, **kwargs)
return data
def cancel_booking_with_http_info(self, booking_id, **kwargs):
"""
Cancel a booking
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.cancel_booking_with_http_info(booking_id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param int booking_id: (required)
:return: InlineResponse2003
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['booking_id']
all_params.append('callback')
all_params.append('_return_http_data_only')
params = locals()
for key, val in iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method cancel_booking" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'booking_id' is set
if ('booking_id' not in params) or (params['booking_id'] is None):
raise ValueError("Missing the required parameter `booking_id` when calling `cancel_booking`")
resource_path = '/booking/cancel'.replace('{format}', 'json')
path_params = {}
query_params = {}
if 'booking_id' in params:
query_params['booking_id'] = params['booking_id']
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json'])
# Authentication setting
auth_settings = []
return self.api_client.call_api(resource_path, 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='InlineResponse2003',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'))
def confirm_booking(self, booking_id, **kwargs):
"""
Confirm a booking and all of its sessions and notify the lead customer
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.confirm_booking(booking_id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param int booking_id: (required)
:return: InlineResponse20012
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.confirm_booking_with_http_info(booking_id, **kwargs)
else:
(data) = self.confirm_booking_with_http_info(booking_id, **kwargs)
return data
def confirm_booking_with_http_info(self, booking_id, **kwargs):
"""
Confirm a booking and all of its sessions and notify the lead customer
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.confirm_booking_with_http_info(booking_id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param int booking_id: (required)
:return: InlineResponse20012
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['booking_id']
all_params.append('callback')
all_params.append('_return_http_data_only')
params = locals()
for key, val in iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method confirm_booking" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'booking_id' is set
if ('booking_id' not in params) or (params['booking_id'] is None):
raise ValueError("Missing the required parameter `booking_id` when calling `confirm_booking`")
resource_path = '/booking/confirm'.replace('{format}', 'json')
path_params = {}
query_params = {}
if 'booking_id' in params:
query_params['booking_id'] = params['booking_id']
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json'])
# Authentication setting
auth_settings = []
return self.api_client.call_api(resource_path, 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='InlineResponse20012',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'))
def delete_booking(self, id, **kwargs):
"""
Delete a booking by ID
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.delete_booking(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param int id: (required)
:return: InlineResponse2003
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.delete_booking_with_http_info(id, **kwargs)
else:
(data) = self.delete_booking_with_http_info(id, **kwargs)
return data
def delete_booking_with_http_info(self, id, **kwargs):
"""
Delete a booking by ID
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.delete_booking_with_http_info(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param int id: (required)
:return: InlineResponse2003
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id']
all_params.append('callback')
all_params.append('_return_http_data_only')
params = locals()
for key, val in iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method delete_booking" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `delete_booking`")
resource_path = '/booking/delete'.replace('{format}', 'json')
path_params = {}
query_params = {}
if 'id' in params:
query_params['id'] = params['id']
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json'])
# Authentication setting
auth_settings = []
return self.api_client.call_api(resource_path, 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='InlineResponse2003',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'))
def dettach_accommodation(self, booking_id, accommodation_id, customer_id, **kwargs):
"""
Dettach an accommodation booking to a booking
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.dettach_accommodation(booking_id, accommodation_id, customer_id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param int booking_id: (required)
:param int accommodation_id: (required)
:param int customer_id: (required)
:param date start:
:return: InlineResponse20017
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.dettach_accommodation_with_http_info(booking_id, accommodation_id, customer_id, **kwargs)
else:
(data) = self.dettach_accommodation_with_http_info(booking_id, accommodation_id, customer_id, **kwargs)
return data
def dettach_accommodation_with_http_info(self, booking_id, accommodation_id, customer_id, **kwargs):
"""
Dettach an accommodation booking to a booking
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.dettach_accommodation_with_http_info(booking_id, accommodation_id, customer_id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param int booking_id: (required)
:param int accommodation_id: (required)
:param int customer_id: (required)
:param date start:
:return: InlineResponse20017
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['booking_id', 'accommodation_id', 'customer_id', 'start']
all_params.append('callback')
all_params.append('_return_http_data_only')
params = locals()
for key, val in iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method dettach_accommodation" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'booking_id' is set
if ('booking_id' not in params) or (params['booking_id'] is None):
raise ValueError("Missing the required parameter `booking_id` when calling `dettach_accommodation`")
# verify the required parameter 'accommodation_id' is set
if ('accommodation_id' not in params) or (params['accommodation_id'] is None):
raise ValueError("Missing the required parameter `accommodation_id` when calling `dettach_accommodation`")
# verify the required parameter 'customer_id' is set
if ('customer_id' not in params) or (params['customer_id'] is None):
raise ValueError("Missing the required parameter `customer_id` when calling `dettach_accommodation`")
resource_path = '/booking/remove-accommodation'.replace('{format}', 'json')
path_params = {}
query_params = {}
if 'booking_id' in params:
query_params['booking_id'] = params['booking_id']
if 'accommodation_id' in params:
query_params['accommodation_id'] = params['accommodation_id']
if 'customer_id' in params:
query_params['customer_id'] = params['customer_id']
if 'start' in params:
query_params['start'] = params['start']
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json'])
# Authentication setting
auth_settings = []
return self.api_client.call_api(resource_path, 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='InlineResponse20017',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'))
def dettach_addon(self, booking_id, bookingdetail_id, addon_id, **kwargs):
"""
Dettach an addon to a trip of a booking
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.dettach_addon(booking_id, bookingdetail_id, addon_id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param int booking_id: (required)
:param int bookingdetail_id: (required)
:param int addon_id: (required)
:param int packagefacade_id:
:return: InlineResponse20017
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.dettach_addon_with_http_info(booking_id, bookingdetail_id, addon_id, **kwargs)
else:
(data) = self.dettach_addon_with_http_info(booking_id, bookingdetail_id, addon_id, **kwargs)
return data
def dettach_addon_with_http_info(self, booking_id, bookingdetail_id, addon_id, **kwargs):
"""
Dettach an addon to a trip of a booking
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.dettach_addon_with_http_info(booking_id, bookingdetail_id, addon_id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param int booking_id: (required)
:param int bookingdetail_id: (required)
:param int addon_id: (required)
:param int packagefacade_id:
:return: InlineResponse20017
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['booking_id', 'bookingdetail_id', 'addon_id', 'packagefacade_id']
all_params.append('callback')
all_params.append('_return_http_data_only')
params = locals()
for key, val in iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method dettach_addon" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'booking_id' is set
if ('booking_id' not in params) or (params['booking_id'] is None):
raise ValueError("Missing the required parameter `booking_id` when calling `dettach_addon`")
# verify the required parameter 'bookingdetail_id' is set
if ('bookingdetail_id' not in params) or (params['bookingdetail_id'] is None):
raise ValueError("Missing the required parameter `bookingdetail_id` when calling `dettach_addon`")
# verify the required parameter 'addon_id' is set
if ('addon_id' not in params) or (params['addon_id'] is None):
raise ValueError("Missing the required parameter `addon_id` when calling `dettach_addon`")
resource_path = '/booking/remove-addon'.replace('{format}', 'json')
path_params = {}
query_params = {}
if 'booking_id' in params:
query_params['booking_id'] = params['booking_id']
if 'bookingdetail_id' in params:
query_params['bookingdetail_id'] = params['bookingdetail_id']
if 'addon_id' in params:
query_params['addon_id'] = params['addon_id']
if 'packagefacade_id' in params:
query_params['packagefacade_id'] = params['packagefacade_id']
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json'])
# Authentication setting
auth_settings = []
return self.api_client.call_api(resource_path, 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='InlineResponse20017',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'))
def dettach_pickup(self, booking_id, **kwargs):
"""
Dettach a pickup location for a booking
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.dettach_pickup(booking_id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param int booking_id: (required)
:param int id:
:return: InlineResponse2003
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.dettach_pickup_with_http_info(booking_id, **kwargs)
else:
(data) = self.dettach_pickup_with_http_info(booking_id, **kwargs)
return data
def dettach_pickup_with_http_info(self, booking_id, **kwargs):
"""
Dettach a pickup location for a booking
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.dettach_pickup_with_http_info(booking_id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param int booking_id: (required)
:param int id:
:return: InlineResponse2003
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['booking_id', 'id']
all_params.append('callback')
all_params.append('_return_http_data_only')
params = locals()
for key, val in iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method dettach_pickup" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'booking_id' is set
if ('booking_id' not in params) or (params['booking_id'] is None):
raise ValueError("Missing the required parameter `booking_id` when calling `dettach_pickup`")
resource_path = '/booking/remove-pickup'.replace('{format}', 'json')
path_params = {}
query_params = {}
if 'booking_id' in params:
query_params['booking_id'] = params['booking_id']
if 'id' in params:
query_params['id'] = params['id']
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json'])
# Authentication setting
auth_settings = []
return self.api_client.call_api(resource_path, 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='InlineResponse2003',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'))
def edit_booking_info(self, **kwargs):
"""
Edit the information related to a booking
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.edit_booking_info(callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param int booking_id:
:param float discount:
:param str comment:
:return: InlineResponse20014
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.edit_booking_info_with_http_info(**kwargs)
else:
(data) = self.edit_booking_info_with_http_info(**kwargs)
return data
def edit_booking_info_with_http_info(self, **kwargs):
"""
Edit the information related to a booking
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.edit_booking_info_with_http_info(callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param int booking_id:
:param float discount:
:param str comment:
:return: InlineResponse20014
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['booking_id', 'discount', 'comment']
all_params.append('callback')
all_params.append('_return_http_data_only')
params = locals()
for key, val in iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method edit_booking_info" % key
)
params[key] = val
del params['kwargs']
resource_path = '/booking/edit-info'.replace('{format}', 'json')
path_params = {}
query_params = {}
if 'booking_id' in params:
query_params['booking_id'] = params['booking_id']
if 'discount' in params:
query_params['discount'] = params['discount']
if 'comment' in params:
query_params['comment'] = params['comment']
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json'])
# Authentication setting
auth_settings = []
return self.api_client.call_api(resource_path, 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='InlineResponse20014',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'))
def filter_bookings(self, **kwargs):
"""
Get all bookings matching a filter
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.filter_bookings(callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str reference:
:param date date:
:param str lastname:
:return: InlineResponse20013
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.filter_bookings_with_http_info(**kwargs)
else:
(data) = self.filter_bookings_with_http_info(**kwargs)
return data
def filter_bookings_with_http_info(self, **kwargs):
"""
Get all bookings matching a filter
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.filter_bookings_with_http_info(callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str reference:
:param date date:
:param str lastname:
:return: InlineResponse20013
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['reference', 'date', 'lastname']
all_params.append('callback')
all_params.append('_return_http_data_only')
params = locals()
for key, val in iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method filter_bookings" % key
)
params[key] = val
del params['kwargs']
resource_path = '/booking/filter'.replace('{format}', 'json')
path_params = {}
query_params = {}
if 'reference' in params:
query_params['reference'] = params['reference']
if 'date' in params:
query_params['date'] = params['date']
if 'lastname' in params:
query_params['lastname'] = params['lastname']
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json'])
# Authentication setting
auth_settings = []
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='InlineResponse20013',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'))
def get_all_bookings(self, **kwargs):
"""
Retrieve all bookings
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_all_bookings(callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:return: list[Booking]
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.get_all_bookings_with_http_info(**kwargs)
else:
(data) = self.get_all_bookings_with_http_info(**kwargs)
return data
def get_all_bookings_with_http_info(self, **kwargs):
"""
Retrieve all bookings
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_all_bookings_with_http_info(callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:return: list[Booking]
If the method is called asynchronously,
returns the request thread.
"""
all_params = []
all_params.append('callback')
all_params.append('_return_http_data_only')
params = locals()
for key, val in iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_all_bookings" % key
)
params[key] = val
del params['kwargs']
resource_path = '/booking/all'.replace('{format}', 'json')
path_params = {}
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json'])
# Authentication setting
auth_settings = []
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='list[Booking]',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'))
def get_all_with_trashed_bookings(self, **kwargs):
"""
Retrieve all bookings including any deleted models
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_all_with_trashed_bookings(callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:return: list[Booking]
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.get_all_with_trashed_bookings_with_http_info(**kwargs)
else:
(data) = self.get_all_with_trashed_bookings_with_http_info(**kwargs)
return data
def get_all_with_trashed_bookings_with_http_info(self, **kwargs):
"""
Retrieve all bookings including any deleted models
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_all_with_trashed_bookings_with_http_info(callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:return: list[Booking]
If the method is called asynchronously,
returns the request thread.
"""
all_params = []
all_params.append('callback')
all_params.append('_return_http_data_only')
params = locals()
for key, val in iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_all_with_trashed_bookings" % key
)
params[key] = val
del params['kwargs']
resource_path = '/booking/all-with-trashed'.replace('{format}', 'json')
path_params = {}
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json'])
# Authentication setting
auth_settings = []
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='list[Booking]',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'))
def get_booking(self, id, **kwargs):
"""
Retrieve a booking by ID
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_booking(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param int id: (required)
:return: InlineResponse2007
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.get_booking_with_http_info(id, **kwargs)
else:
(data) = self.get_booking_with_http_info(id, **kwargs)
return data
def get_booking_with_http_info(self, id, **kwargs):
"""
Retrieve a booking by ID
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_booking_with_http_info(id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param int id: (required)
:return: InlineResponse2007
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id']
all_params.append('callback')
all_params.append('_return_http_data_only')
params = locals()
for key, val in iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_booking" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if ('id' not in params) or (params['id'] is None):
raise ValueError("Missing the required parameter `id` when calling `get_booking`")
resource_path = '/booking'.replace('{format}', 'json')
path_params = {}
query_params = {}
if 'id' in params:
query_params['id'] = params['id']
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json'])
# Authentication setting
auth_settings = []
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='InlineResponse2007',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'))
def get_customer_bookings(self, customer_id, **kwargs):
"""
Get all bookings for a customer
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_customer_bookings(customer_id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param int customer_id: (required)
:return: InlineResponse20013
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.get_customer_bookings_with_http_info(customer_id, **kwargs)
else:
(data) = self.get_customer_bookings_with_http_info(customer_id, **kwargs)
return data
def get_customer_bookings_with_http_info(self, customer_id, **kwargs):
"""
Get all bookings for a customer
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_customer_bookings_with_http_info(customer_id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param int customer_id: (required)
:return: InlineResponse20013
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['customer_id']
all_params.append('callback')
all_params.append('_return_http_data_only')
params = locals()
for key, val in iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_customer_bookings" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'customer_id' is set
if ('customer_id' not in params) or (params['customer_id'] is None):
raise ValueError("Missing the required parameter `customer_id` when calling `get_customer_bookings`")
resource_path = '/booking/customer'.replace('{format}', 'json')
path_params = {}
query_params = {}
if 'customer_id' in params:
query_params['customer_id'] = params['customer_id']
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json'])
# Authentication setting
auth_settings = []
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='InlineResponse20013',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'))
def get_payments(self, **kwargs):
"""
Retrieve all payments made for a booking
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_payments(callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param int booking_id:
:return: InlineResponse20015
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.get_payments_with_http_info(**kwargs)
else:
(data) = self.get_payments_with_http_info(**kwargs)
return data
def get_payments_with_http_info(self, **kwargs):
"""
Retrieve all payments made for a booking
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_payments_with_http_info(callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param int booking_id:
:return: InlineResponse20015
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['booking_id']
all_params.append('callback')
all_params.append('_return_http_data_only')
params = locals()
for key, val in iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_payments" % key
)
params[key] = val
del params['kwargs']
resource_path = '/booking/payments'.replace('{format}', 'json')
path_params = {}
query_params = {}
if 'booking_id' in params:
query_params['booking_id'] = params['booking_id']
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json'])
# Authentication setting
auth_settings = []
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='InlineResponse20015',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'))
def get_refunds(self, **kwargs):
"""
Retrieve all refunds for a booking
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_refunds(callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param int booking_id:
:return: InlineResponse20016
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.get_refunds_with_http_info(**kwargs)
else:
(data) = self.get_refunds_with_http_info(**kwargs)
return data
def get_refunds_with_http_info(self, **kwargs):
"""
Retrieve all refunds for a booking
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_refunds_with_http_info(callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param int booking_id:
:return: InlineResponse20016
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['booking_id']
all_params.append('callback')
all_params.append('_return_http_data_only')
params = locals()
for key, val in iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_refunds" % key
)
params[key] = val
del params['kwargs']
resource_path = '/booking/refunds'.replace('{format}', 'json')
path_params = {}
query_params = {}
if 'booking_id' in params:
query_params['booking_id'] = params['booking_id']
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json'])
# Authentication setting
auth_settings = []
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='InlineResponse20016',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'))
def get_todays_bookings(self, **kwargs):
"""
Get all bookings made today
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_todays_bookings(callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:return: InlineResponse20013
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.get_todays_bookings_with_http_info(**kwargs)
else:
(data) = self.get_todays_bookings_with_http_info(**kwargs)
return data
def get_todays_bookings_with_http_info(self, **kwargs):
"""
Get all bookings made today
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_todays_bookings_with_http_info(callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:return: InlineResponse20013
If the method is called asynchronously,
returns the request thread.
"""
all_params = []
all_params.append('callback')
all_params.append('_return_http_data_only')
params = locals()
for key, val in iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_todays_bookings" % key
)
params[key] = val
del params['kwargs']
resource_path = '/booking/today'.replace('{format}', 'json')
path_params = {}
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json'])
# Authentication setting
auth_settings = []
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='InlineResponse20013',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'))
def get_tommorows_bookings(self, **kwargs):
"""
Get all bookings made today
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_tommorows_bookings(callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:return: InlineResponse20013
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.get_tommorows_bookings_with_http_info(**kwargs)
else:
(data) = self.get_tommorows_bookings_with_http_info(**kwargs)
return data
def get_tommorows_bookings_with_http_info(self, **kwargs):
"""
Get all bookings made today
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_tommorows_bookings_with_http_info(callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:return: InlineResponse20013
If the method is called asynchronously,
returns the request thread.
"""
all_params = []
all_params.append('callback')
all_params.append('_return_http_data_only')
params = locals()
for key, val in iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_tommorows_bookings" % key
)
params[key] = val
del params['kwargs']
resource_path = '/booking/tommorow'.replace('{format}', 'json')
path_params = {}
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json'])
# Authentication setting
auth_settings = []
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='InlineResponse20013',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'))
def init_booking(self, source, **kwargs):
"""
Create a new empty booking
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.init_booking(source, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str source: (required)
:param int agent_id:
:param str agent_reference:
:return: InlineResponse201
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.init_booking_with_http_info(source, **kwargs)
else:
(data) = self.init_booking_with_http_info(source, **kwargs)
return data
def init_booking_with_http_info(self, source, **kwargs):
"""
Create a new empty booking
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.init_booking_with_http_info(source, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param str source: (required)
:param int agent_id:
:param str agent_reference:
:return: InlineResponse201
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['source', 'agent_id', 'agent_reference']
all_params.append('callback')
all_params.append('_return_http_data_only')
params = locals()
for key, val in iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method init_booking" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'source' is set
if ('source' not in params) or (params['source'] is None):
raise ValueError("Missing the required parameter `source` when calling `init_booking`")
resource_path = '/booking/init'.replace('{format}', 'json')
path_params = {}
query_params = {}
if 'source' in params:
query_params['source'] = params['source']
if 'agent_id' in params:
query_params['agent_id'] = params['agent_id']
if 'agent_reference' in params:
query_params['agent_reference'] = params['agent_reference']
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json'])
# Authentication setting
auth_settings = []
return self.api_client.call_api(resource_path, 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='InlineResponse201',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'))
def remove_booking_detail(self, booking_id, bookingdetail_id, **kwargs):
"""
Remove a detail from a booking
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.remove_booking_detail(booking_id, bookingdetail_id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param int booking_id: (required)
:param int bookingdetail_id: (required)
:return: InlineResponse20017
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.remove_booking_detail_with_http_info(booking_id, bookingdetail_id, **kwargs)
else:
(data) = self.remove_booking_detail_with_http_info(booking_id, bookingdetail_id, **kwargs)
return data
def remove_booking_detail_with_http_info(self, booking_id, bookingdetail_id, **kwargs):
"""
Remove a detail from a booking
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.remove_booking_detail_with_http_info(booking_id, bookingdetail_id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param int booking_id: (required)
:param int bookingdetail_id: (required)
:return: InlineResponse20017
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['booking_id', 'bookingdetail_id']
all_params.append('callback')
all_params.append('_return_http_data_only')
params = locals()
for key, val in iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method remove_booking_detail" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'booking_id' is set
if ('booking_id' not in params) or (params['booking_id'] is None):
raise ValueError("Missing the required parameter `booking_id` when calling `remove_booking_detail`")
# verify the required parameter 'bookingdetail_id' is set
if ('bookingdetail_id' not in params) or (params['bookingdetail_id'] is None):
raise ValueError("Missing the required parameter `bookingdetail_id` when calling `remove_booking_detail`")
resource_path = '/booking/remove-detail'.replace('{format}', 'json')
path_params = {}
query_params = {}
if 'booking_id' in params:
query_params['booking_id'] = params['booking_id']
if 'bookingdetail_id' in params:
query_params['bookingdetail_id'] = params['bookingdetail_id']
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json'])
# Authentication setting
auth_settings = []
return self.api_client.call_api(resource_path, 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='InlineResponse20017',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'))
def resend_confirmation(self, booking_id, **kwargs):
"""
Resend the confirmation email to the lead customer
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.resend_confirmation(booking_id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param int booking_id: (required)
:return: InlineResponse2003
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.resend_confirmation_with_http_info(booking_id, **kwargs)
else:
(data) = self.resend_confirmation_with_http_info(booking_id, **kwargs)
return data
def resend_confirmation_with_http_info(self, booking_id, **kwargs):
"""
Resend the confirmation email to the lead customer
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.resend_confirmation_with_http_info(booking_id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param int booking_id: (required)
:return: InlineResponse2003
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['booking_id']
all_params.append('callback')
all_params.append('_return_http_data_only')
params = locals()
for key, val in iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method resend_confirmation" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'booking_id' is set
if ('booking_id' not in params) or (params['booking_id'] is None):
raise ValueError("Missing the required parameter `booking_id` when calling `resend_confirmation`")
resource_path = '/booking/resend-confirmation'.replace('{format}', 'json')
path_params = {}
query_params = {}
if 'booking_id' in params:
query_params['booking_id'] = params['booking_id']
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json'])
# Authentication setting
auth_settings = []
return self.api_client.call_api(resource_path, 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='InlineResponse2003',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'))
def reserve_booking(self, booking_id, **kwargs):
"""
Reserve a booking and its sessions capcity until a set date
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.reserve_booking(booking_id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param int booking_id: (required)
:param date reserved_until:
:return: InlineResponse20018
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.reserve_booking_with_http_info(booking_id, **kwargs)
else:
(data) = self.reserve_booking_with_http_info(booking_id, **kwargs)
return data
def reserve_booking_with_http_info(self, booking_id, **kwargs):
"""
Reserve a booking and its sessions capcity until a set date
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.reserve_booking_with_http_info(booking_id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param int booking_id: (required)
:param date reserved_until:
:return: InlineResponse20018
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['booking_id', 'reserved_until']
all_params.append('callback')
all_params.append('_return_http_data_only')
params = locals()
for key, val in iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method reserve_booking" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'booking_id' is set
if ('booking_id' not in params) or (params['booking_id'] is None):
raise ValueError("Missing the required parameter `booking_id` when calling `reserve_booking`")
resource_path = '/booking/reserve'.replace('{format}', 'json')
path_params = {}
query_params = {}
if 'booking_id' in params:
query_params['booking_id'] = params['booking_id']
if 'reserved_until' in params:
query_params['reserved_until'] = params['reserved_until']
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json'])
# Authentication setting
auth_settings = []
return self.api_client.call_api(resource_path, 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='InlineResponse20018',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'))
def save_booking(self, booking_id, **kwargs):
"""
Save a booking as a quote and release all capacity of sessions
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.save_booking(booking_id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param int booking_id: (required)
:return: InlineResponse2003
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.save_booking_with_http_info(booking_id, **kwargs)
else:
(data) = self.save_booking_with_http_info(booking_id, **kwargs)
return data
def save_booking_with_http_info(self, booking_id, **kwargs):
"""
Save a booking as a quote and release all capacity of sessions
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.save_booking_with_http_info(booking_id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param int booking_id: (required)
:return: InlineResponse2003
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['booking_id']
all_params.append('callback')
all_params.append('_return_http_data_only')
params = locals()
for key, val in iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method save_booking" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'booking_id' is set
if ('booking_id' not in params) or (params['booking_id'] is None):
raise ValueError("Missing the required parameter `booking_id` when calling `save_booking`")
resource_path = '/booking/save'.replace('{format}', 'json')
path_params = {}
query_params = {}
if 'booking_id' in params:
query_params['booking_id'] = params['booking_id']
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json'])
# Authentication setting
auth_settings = []
return self.api_client.call_api(resource_path, 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='InlineResponse2003',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'))
def set_lead_customer(self, booking_id, customer_id, **kwargs):
"""
Set the lead customer for a booking
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.set_lead_customer(booking_id, customer_id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param int booking_id: (required)
:param int customer_id: (required)
:return: InlineResponse2003
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.set_lead_customer_with_http_info(booking_id, customer_id, **kwargs)
else:
(data) = self.set_lead_customer_with_http_info(booking_id, customer_id, **kwargs)
return data
def set_lead_customer_with_http_info(self, booking_id, customer_id, **kwargs):
"""
Set the lead customer for a booking
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.set_lead_customer_with_http_info(booking_id, customer_id, callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:param int booking_id: (required)
:param int customer_id: (required)
:return: InlineResponse2003
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['booking_id', 'customer_id']
all_params.append('callback')
all_params.append('_return_http_data_only')
params = locals()
for key, val in iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method set_lead_customer" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'booking_id' is set
if ('booking_id' not in params) or (params['booking_id'] is None):
raise ValueError("Missing the required parameter `booking_id` when calling `set_lead_customer`")
# verify the required parameter 'customer_id' is set
if ('customer_id' not in params) or (params['customer_id'] is None):
raise ValueError("Missing the required parameter `customer_id` when calling `set_lead_customer`")
resource_path = '/booking/set-lead'.replace('{format}', 'json')
path_params = {}
query_params = {}
if 'booking_id' in params:
query_params['booking_id'] = params['booking_id']
if 'customer_id' in params:
query_params['customer_id'] = params['customer_id']
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json'])
if not header_params['Accept']:
del header_params['Accept']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json'])
# Authentication setting
auth_settings = []
return self.api_client.call_api(resource_path, 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='InlineResponse2003',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'))
| [
1,
396,
14137,
29901,
23616,
29899,
29947,
13,
13,
15945,
29908,
13,
1678,
2522,
11495,
3062,
3450,
10854,
362,
13,
13,
1678,
910,
338,
278,
5106,
363,
885,
11495,
3062,
29915,
29879,
390,
4345,
3450,
29889,
910,
3450,
338,
871,
304,
367,
1304,
491,
4148,
1891,
13973,
411,
2854,
4817,
18897,
29889,
29871,
518,
29931,
799,
29876,
1048,
885,
11495,
3062,
850,
1124,
597,
1636,
29889,
1557,
11495,
3062,
29889,
510,
29897,
304,
4953,
385,
4148,
1891,
21691,
310,
1749,
3450,
29871,
13,
13,
1678,
4673,
8787,
1580,
1873,
29901,
29871,
29896,
29889,
29900,
29889,
29900,
13,
1678,
22387,
29901,
529,
26862,
6227,
29958,
13,
1678,
3251,
630,
491,
29901,
2045,
597,
3292,
29889,
510,
29914,
2774,
9921,
29899,
2754,
29914,
2774,
9921,
29899,
401,
1885,
29889,
5559,
13,
13,
1678,
10413,
21144,
1090,
278,
13380,
19245,
29892,
10079,
29871,
29906,
29889,
29900,
313,
1552,
376,
29931,
293,
1947,
1496,
13,
1678,
366,
1122,
451,
671,
445,
934,
5174,
297,
752,
13036,
411,
278,
19245,
29889,
13,
1678,
887,
1122,
4017,
263,
3509,
310,
278,
19245,
472,
13,
13,
4706,
1732,
597,
1636,
29889,
4288,
29889,
990,
29914,
506,
11259,
29914,
27888,
1430,
1660,
29899,
29906,
29889,
29900,
13,
13,
1678,
25870,
3734,
491,
22903,
4307,
470,
15502,
304,
297,
5007,
29892,
7047,
13,
1678,
13235,
1090,
278,
19245,
338,
13235,
373,
385,
376,
3289,
8519,
29908,
350,
3289,
3235,
29892,
13,
1678,
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,
1678,
2823,
278,
19245,
363,
278,
2702,
4086,
14765,
1076,
11239,
322,
13,
1678,
27028,
1090,
278,
19245,
29889,
13,
15945,
29908,
13,
13,
3166,
4770,
29888,
9130,
1649,
1053,
8380,
29918,
5215,
13,
13,
5215,
10876,
13,
5215,
2897,
13,
5215,
337,
13,
13,
29937,
3017,
29871,
29906,
322,
3017,
29871,
29941,
24521,
3489,
13,
3166,
4832,
1053,
4256,
7076,
13,
13,
3166,
6317,
13305,
1053,
20999,
13,
3166,
6317,
2754,
29918,
4645,
1053,
29749,
4032,
13,
13,
13,
1990,
6726,
292,
11713,
29898,
3318,
1125,
13,
1678,
9995,
13,
1678,
6058,
29923,
29901,
910,
770,
338,
4469,
5759,
491,
278,
2381,
9921,
775,
15299,
1824,
29889,
13,
1678,
1938,
451,
3863,
278,
770,
7522,
29889,
13,
1678,
9897,
29901,
2045,
597,
3292,
29889,
510,
29914,
2774,
9921,
29899,
2754,
29914,
2774,
9921,
29899,
401,
1885,
13,
1678,
9995,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
7882,
29918,
4645,
29922,
8516,
1125,
13,
4706,
2295,
353,
20999,
580,
13,
4706,
565,
7882,
29918,
4645,
29901,
13,
9651,
1583,
29889,
2754,
29918,
4645,
353,
7882,
29918,
4645,
13,
4706,
1683,
29901,
13,
9651,
565,
451,
2295,
29889,
2754,
29918,
4645,
29901,
13,
18884,
2295,
29889,
2754,
29918,
4645,
353,
29749,
4032,
580,
13,
9651,
1583,
29889,
2754,
29918,
4645,
353,
2295,
29889,
2754,
29918,
4645,
13,
13,
1678,
822,
788,
29918,
2909,
292,
29918,
16432,
29898,
1311,
29892,
3143,
292,
29918,
333,
29892,
11962,
29918,
333,
29892,
3579,
19290,
1125,
13,
4706,
9995,
13,
4706,
3462,
263,
3577,
847,
3236,
847,
23381,
411,
967,
4867,
304,
278,
3143,
292,
13,
308,
13,
13,
4706,
910,
1158,
3732,
263,
12231,
681,
7331,
2009,
491,
2322,
29889,
1763,
1207,
385,
13,
4706,
20489,
7331,
2009,
29892,
3113,
4529,
263,
421,
14035,
29952,
740,
13,
4706,
304,
367,
22336,
746,
13442,
278,
2933,
29889,
13,
4706,
8653,
822,
6939,
29918,
2220,
29898,
5327,
1125,
13,
4706,
8653,
268,
282,
2158,
29898,
5327,
29897,
13,
4706,
8653,
13,
4706,
8653,
3244,
353,
7882,
29889,
1202,
29918,
2909,
292,
29918,
16432,
29898,
2909,
292,
29918,
333,
29892,
11962,
29918,
333,
29892,
6939,
29922,
14035,
29918,
2220,
29897,
13,
13,
4706,
584,
3207,
6939,
740,
29901,
450,
6939,
740,
13,
9651,
363,
20489,
2009,
29889,
313,
25253,
29897,
13,
4706,
584,
3207,
938,
3143,
292,
29918,
333,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
3207,
938,
11962,
29918,
333,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
3207,
938,
23381,
29918,
333,
29901,
29871,
13,
4706,
584,
3207,
938,
4867,
29918,
333,
29901,
29871,
13,
4706,
584,
3207,
938,
1045,
7816,
290,
29918,
333,
29901,
29871,
13,
4706,
584,
3207,
938,
6694,
29918,
7924,
29918,
333,
29901,
29871,
13,
4706,
584,
3207,
6120,
13201,
29901,
29871,
13,
4706,
584,
3207,
938,
3577,
29918,
333,
29901,
29871,
13,
4706,
584,
3207,
938,
3577,
17470,
1943,
29918,
333,
29901,
29871,
13,
4706,
584,
3207,
938,
3236,
29918,
333,
29901,
29871,
13,
4706,
584,
2457,
29901,
512,
1220,
5103,
29906,
29900,
29900,
29896,
29900,
13,
462,
960,
278,
1158,
338,
2000,
408,
9524,
5794,
29892,
13,
462,
3639,
278,
2009,
3244,
29889,
13,
4706,
9995,
13,
4706,
9049,
5085,
1839,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
2033,
353,
5852,
13,
4706,
565,
9049,
5085,
29889,
657,
877,
14035,
29374,
13,
9651,
736,
1583,
29889,
1202,
29918,
2909,
292,
29918,
16432,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
2909,
292,
29918,
333,
29892,
11962,
29918,
333,
29892,
3579,
19290,
29897,
13,
4706,
1683,
29901,
13,
9651,
313,
1272,
29897,
353,
1583,
29889,
1202,
29918,
2909,
292,
29918,
16432,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
2909,
292,
29918,
333,
29892,
11962,
29918,
333,
29892,
3579,
19290,
29897,
13,
9651,
736,
848,
13,
13,
1678,
822,
788,
29918,
2909,
292,
29918,
16432,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
1311,
29892,
3143,
292,
29918,
333,
29892,
11962,
29918,
333,
29892,
3579,
19290,
1125,
13,
4706,
9995,
13,
4706,
3462,
263,
3577,
847,
3236,
847,
23381,
411,
967,
4867,
304,
278,
3143,
292,
13,
308,
13,
13,
4706,
910,
1158,
3732,
263,
12231,
681,
7331,
2009,
491,
2322,
29889,
1763,
1207,
385,
13,
4706,
20489,
7331,
2009,
29892,
3113,
4529,
263,
421,
14035,
29952,
740,
13,
4706,
304,
367,
22336,
746,
13442,
278,
2933,
29889,
13,
4706,
8653,
822,
6939,
29918,
2220,
29898,
5327,
1125,
13,
4706,
8653,
268,
282,
2158,
29898,
5327,
29897,
13,
4706,
8653,
13,
4706,
8653,
3244,
353,
7882,
29889,
1202,
29918,
2909,
292,
29918,
16432,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
2909,
292,
29918,
333,
29892,
11962,
29918,
333,
29892,
6939,
29922,
14035,
29918,
2220,
29897,
13,
13,
4706,
584,
3207,
6939,
740,
29901,
450,
6939,
740,
13,
9651,
363,
20489,
2009,
29889,
313,
25253,
29897,
13,
4706,
584,
3207,
938,
3143,
292,
29918,
333,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
3207,
938,
11962,
29918,
333,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
3207,
938,
23381,
29918,
333,
29901,
29871,
13,
4706,
584,
3207,
938,
4867,
29918,
333,
29901,
29871,
13,
4706,
584,
3207,
938,
1045,
7816,
290,
29918,
333,
29901,
29871,
13,
4706,
584,
3207,
938,
6694,
29918,
7924,
29918,
333,
29901,
29871,
13,
4706,
584,
3207,
6120,
13201,
29901,
29871,
13,
4706,
584,
3207,
938,
3577,
29918,
333,
29901,
29871,
13,
4706,
584,
3207,
938,
3577,
17470,
1943,
29918,
333,
29901,
29871,
13,
4706,
584,
3207,
938,
3236,
29918,
333,
29901,
29871,
13,
4706,
584,
2457,
29901,
512,
1220,
5103,
29906,
29900,
29900,
29896,
29900,
13,
462,
960,
278,
1158,
338,
2000,
408,
9524,
5794,
29892,
13,
462,
3639,
278,
2009,
3244,
29889,
13,
4706,
9995,
13,
13,
4706,
599,
29918,
7529,
353,
6024,
2909,
292,
29918,
333,
742,
525,
15539,
29918,
333,
742,
525,
29873,
8522,
29918,
333,
742,
525,
7924,
29918,
333,
742,
525,
833,
7816,
290,
29918,
333,
742,
525,
26495,
29918,
7924,
29918,
333,
742,
525,
1356,
1971,
653,
742,
525,
5113,
29918,
333,
742,
525,
5113,
17470,
1943,
29918,
333,
742,
525,
15775,
29918,
333,
2033,
13,
4706,
599,
29918,
7529,
29889,
4397,
877,
14035,
1495,
13,
4706,
599,
29918,
7529,
29889,
4397,
877,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
1495,
13,
13,
4706,
8636,
353,
1180,
1338,
580,
13,
4706,
363,
1820,
29892,
659,
297,
4256,
7076,
29898,
7529,
1839,
19290,
2033,
1125,
13,
9651,
565,
1820,
451,
297,
599,
29918,
7529,
29901,
13,
18884,
12020,
20948,
29898,
13,
462,
1678,
376,
29954,
327,
385,
15668,
13553,
2980,
14210,
29879,
11838,
13,
462,
1678,
376,
304,
1158,
788,
29918,
2909,
292,
29918,
16432,
29908,
1273,
1820,
13,
18884,
1723,
13,
9651,
8636,
29961,
1989,
29962,
353,
659,
13,
4706,
628,
8636,
1839,
19290,
2033,
13,
4706,
396,
11539,
278,
3734,
3443,
525,
2909,
292,
29918,
333,
29915,
338,
731,
13,
4706,
565,
6702,
2909,
292,
29918,
333,
29915,
451,
297,
8636,
29897,
470,
313,
7529,
1839,
2909,
292,
29918,
333,
2033,
338,
6213,
1125,
13,
9651,
12020,
7865,
2392,
703,
18552,
292,
278,
3734,
3443,
421,
2909,
292,
29918,
333,
29952,
746,
5432,
421,
1202,
29918,
2909,
292,
29918,
16432,
29952,
1159,
13,
4706,
396,
11539,
278,
3734,
3443,
525,
15539,
29918,
333,
29915,
338,
731,
13,
4706,
565,
6702,
15539,
29918,
333,
29915,
451,
297,
8636,
29897,
470,
313,
7529,
1839,
15539,
29918,
333,
2033,
338,
6213,
1125,
13,
9651,
12020,
7865,
2392,
703,
18552,
292,
278,
3734,
3443,
421,
15539,
29918,
333,
29952,
746,
5432,
421,
1202,
29918,
2909,
292,
29918,
16432,
29952,
1159,
13,
13,
4706,
6503,
29918,
2084,
353,
8207,
2909,
292,
29914,
1202,
29899,
16432,
4286,
6506,
877,
29912,
4830,
29913,
742,
525,
3126,
1495,
13,
4706,
2224,
29918,
7529,
353,
6571,
13,
13,
4706,
2346,
29918,
7529,
353,
6571,
13,
4706,
565,
525,
2909,
292,
29918,
333,
29915,
297,
8636,
29901,
13,
9651,
2346,
29918,
7529,
1839,
2909,
292,
29918,
333,
2033,
353,
8636,
1839,
2909,
292,
29918,
333,
2033,
13,
4706,
565,
525,
15539,
29918,
333,
29915,
297,
8636,
29901,
13,
9651,
2346,
29918,
7529,
1839,
15539,
29918,
333,
2033,
353,
8636,
1839,
15539,
29918,
333,
2033,
13,
4706,
565,
525,
29873,
8522,
29918,
333,
29915,
297,
8636,
29901,
13,
9651,
2346,
29918,
7529,
1839,
29873,
8522,
29918,
333,
2033,
353,
8636,
1839,
29873,
8522,
29918,
333,
2033,
13,
4706,
565,
525,
7924,
29918,
333,
29915,
297,
8636,
29901,
13,
9651,
2346,
29918,
7529,
1839,
7924,
29918,
333,
2033,
353,
8636,
1839,
7924,
29918,
333,
2033,
13,
4706,
565,
525,
833,
7816,
290,
29918,
333,
29915,
297,
8636,
29901,
13,
9651,
2346,
29918,
7529,
1839,
833,
7816,
290,
29918,
333,
2033,
353,
8636,
1839,
833,
7816,
290,
29918,
333,
2033,
13,
4706,
565,
525,
26495,
29918,
7924,
29918,
333,
29915,
297,
8636,
29901,
13,
9651,
2346,
29918,
7529,
1839,
26495,
29918,
7924,
29918,
333,
2033,
353,
8636,
1839,
26495,
29918,
7924,
29918,
333,
2033,
13,
4706,
565,
525,
1356,
1971,
653,
29915,
297,
8636,
29901,
13,
9651,
2346,
29918,
7529,
1839,
1356,
1971,
653,
2033,
353,
8636,
1839,
1356,
1971,
653,
2033,
13,
4706,
565,
525,
5113,
29918,
333,
29915,
297,
8636,
29901,
13,
9651,
2346,
29918,
7529,
1839,
5113,
29918,
333,
2033,
353,
8636,
1839,
5113,
29918,
333,
2033,
13,
4706,
565,
525,
5113,
17470,
1943,
29918,
333,
29915,
297,
8636,
29901,
13,
9651,
2346,
29918,
7529,
1839,
5113,
17470,
1943,
29918,
333,
2033,
353,
8636,
1839,
5113,
17470,
1943,
29918,
333,
2033,
13,
4706,
565,
525,
15775,
29918,
333,
29915,
297,
8636,
29901,
13,
9651,
2346,
29918,
7529,
1839,
15775,
29918,
333,
2033,
353,
8636,
1839,
15775,
29918,
333,
2033,
13,
13,
4706,
4839,
29918,
7529,
353,
6571,
13,
13,
4706,
883,
29918,
7529,
353,
5159,
13,
4706,
1887,
29918,
1707,
29918,
5325,
353,
6571,
13,
13,
4706,
3573,
29918,
7529,
353,
6213,
13,
13,
4706,
396,
7331,
4839,
421,
23965,
29952,
13,
4706,
4839,
29918,
7529,
1839,
23965,
2033,
353,
1583,
29889,
2754,
29918,
4645,
7790,
13,
9651,
1831,
29918,
6672,
29918,
16044,
18959,
6214,
29914,
3126,
11287,
13,
4706,
565,
451,
4839,
29918,
7529,
1839,
23965,
2033,
29901,
13,
9651,
628,
4839,
29918,
7529,
1839,
23965,
2033,
13,
13,
4706,
396,
7331,
4839,
421,
3916,
29899,
1542,
29952,
13,
4706,
4839,
29918,
7529,
1839,
3916,
29899,
1542,
2033,
353,
1583,
29889,
2754,
29918,
4645,
7790,
13,
9651,
1831,
29918,
6672,
29918,
3051,
29918,
1853,
18959,
6214,
29914,
3126,
11287,
13,
13,
4706,
396,
27241,
4444,
13,
4706,
4817,
29918,
11027,
353,
5159,
13,
13,
4706,
736,
1583,
29889,
2754,
29918,
4645,
29889,
4804,
29918,
2754,
29898,
10314,
29918,
2084,
29892,
525,
5438,
742,
13,
462,
462,
9651,
2224,
29918,
7529,
29892,
13,
462,
462,
9651,
2346,
29918,
7529,
29892,
13,
462,
462,
9651,
4839,
29918,
7529,
29892,
13,
462,
462,
9651,
3573,
29922,
2587,
29918,
7529,
29892,
13,
462,
462,
9651,
1400,
29918,
7529,
29922,
689,
29918,
7529,
29892,
13,
462,
462,
9651,
2066,
29922,
2997,
29918,
1707,
29918,
5325,
29892,
13,
462,
462,
9651,
2933,
29918,
1853,
2433,
797,
1220,
5103,
29906,
29900,
29900,
29896,
29900,
742,
13,
462,
462,
9651,
4817,
29918,
11027,
29922,
5150,
29918,
11027,
29892,
13,
462,
462,
9651,
6939,
29922,
7529,
29889,
657,
877,
14035,
5477,
13,
462,
462,
9651,
903,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
29922,
7529,
29889,
657,
877,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
8785,
13,
13,
1678,
822,
10641,
29918,
562,
510,
1545,
362,
29898,
1311,
29892,
3143,
292,
29918,
333,
29892,
24803,
362,
29918,
333,
29892,
11962,
29918,
333,
29892,
3579,
19290,
1125,
13,
4706,
9995,
13,
4706,
6212,
496,
385,
24803,
362,
3143,
292,
304,
263,
3143,
292,
13,
308,
13,
13,
4706,
910,
1158,
3732,
263,
12231,
681,
7331,
2009,
491,
2322,
29889,
1763,
1207,
385,
13,
4706,
20489,
7331,
2009,
29892,
3113,
4529,
263,
421,
14035,
29952,
740,
13,
4706,
304,
367,
22336,
746,
13442,
278,
2933,
29889,
13,
4706,
8653,
822,
6939,
29918,
2220,
29898,
5327,
1125,
13,
4706,
8653,
268,
282,
2158,
29898,
5327,
29897,
13,
4706,
8653,
13,
4706,
8653,
3244,
353,
7882,
29889,
14930,
29918,
562,
510,
1545,
362,
29898,
2909,
292,
29918,
333,
29892,
24803,
362,
29918,
333,
29892,
11962,
29918,
333,
29892,
6939,
29922,
14035,
29918,
2220,
29897,
13,
13,
4706,
584,
3207,
6939,
740,
29901,
450,
6939,
740,
13,
9651,
363,
20489,
2009,
29889,
313,
25253,
29897,
13,
4706,
584,
3207,
938,
3143,
292,
29918,
333,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
3207,
938,
24803,
362,
29918,
333,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
3207,
938,
11962,
29918,
333,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
3207,
2635,
1369,
29901,
29871,
13,
4706,
584,
3207,
2635,
1095,
29901,
29871,
13,
4706,
584,
2457,
29901,
512,
1220,
5103,
29906,
29900,
29900,
29947,
13,
462,
960,
278,
1158,
338,
2000,
408,
9524,
5794,
29892,
13,
462,
3639,
278,
2009,
3244,
29889,
13,
4706,
9995,
13,
4706,
9049,
5085,
1839,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
2033,
353,
5852,
13,
4706,
565,
9049,
5085,
29889,
657,
877,
14035,
29374,
13,
9651,
736,
1583,
29889,
14930,
29918,
562,
510,
1545,
362,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
2909,
292,
29918,
333,
29892,
24803,
362,
29918,
333,
29892,
11962,
29918,
333,
29892,
3579,
19290,
29897,
13,
4706,
1683,
29901,
13,
9651,
313,
1272,
29897,
353,
1583,
29889,
14930,
29918,
562,
510,
1545,
362,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
2909,
292,
29918,
333,
29892,
24803,
362,
29918,
333,
29892,
11962,
29918,
333,
29892,
3579,
19290,
29897,
13,
9651,
736,
848,
13,
13,
1678,
822,
10641,
29918,
562,
510,
1545,
362,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
1311,
29892,
3143,
292,
29918,
333,
29892,
24803,
362,
29918,
333,
29892,
11962,
29918,
333,
29892,
3579,
19290,
1125,
13,
4706,
9995,
13,
4706,
6212,
496,
385,
24803,
362,
3143,
292,
304,
263,
3143,
292,
13,
308,
13,
13,
4706,
910,
1158,
3732,
263,
12231,
681,
7331,
2009,
491,
2322,
29889,
1763,
1207,
385,
13,
4706,
20489,
7331,
2009,
29892,
3113,
4529,
263,
421,
14035,
29952,
740,
13,
4706,
304,
367,
22336,
746,
13442,
278,
2933,
29889,
13,
4706,
8653,
822,
6939,
29918,
2220,
29898,
5327,
1125,
13,
4706,
8653,
268,
282,
2158,
29898,
5327,
29897,
13,
4706,
8653,
13,
4706,
8653,
3244,
353,
7882,
29889,
14930,
29918,
562,
510,
1545,
362,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
2909,
292,
29918,
333,
29892,
24803,
362,
29918,
333,
29892,
11962,
29918,
333,
29892,
6939,
29922,
14035,
29918,
2220,
29897,
13,
13,
4706,
584,
3207,
6939,
740,
29901,
450,
6939,
740,
13,
9651,
363,
20489,
2009,
29889,
313,
25253,
29897,
13,
4706,
584,
3207,
938,
3143,
292,
29918,
333,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
3207,
938,
24803,
362,
29918,
333,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
3207,
938,
11962,
29918,
333,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
3207,
2635,
1369,
29901,
29871,
13,
4706,
584,
3207,
2635,
1095,
29901,
29871,
13,
4706,
584,
2457,
29901,
512,
1220,
5103,
29906,
29900,
29900,
29947,
13,
462,
960,
278,
1158,
338,
2000,
408,
9524,
5794,
29892,
13,
462,
3639,
278,
2009,
3244,
29889,
13,
4706,
9995,
13,
13,
4706,
599,
29918,
7529,
353,
6024,
2909,
292,
29918,
333,
742,
525,
562,
510,
1545,
362,
29918,
333,
742,
525,
15539,
29918,
333,
742,
525,
2962,
742,
525,
355,
2033,
13,
4706,
599,
29918,
7529,
29889,
4397,
877,
14035,
1495,
13,
4706,
599,
29918,
7529,
29889,
4397,
877,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
1495,
13,
13,
4706,
8636,
353,
1180,
1338,
580,
13,
4706,
363,
1820,
29892,
659,
297,
4256,
7076,
29898,
7529,
1839,
19290,
2033,
1125,
13,
9651,
565,
1820,
451,
297,
599,
29918,
7529,
29901,
13,
18884,
12020,
20948,
29898,
13,
462,
1678,
376,
29954,
327,
385,
15668,
13553,
2980,
14210,
29879,
11838,
13,
462,
1678,
376,
304,
1158,
10641,
29918,
562,
510,
1545,
362,
29908,
1273,
1820,
13,
18884,
1723,
13,
9651,
8636,
29961,
1989,
29962,
353,
659,
13,
4706,
628,
8636,
1839,
19290,
2033,
13,
4706,
396,
11539,
278,
3734,
3443,
525,
2909,
292,
29918,
333,
29915,
338,
731,
13,
4706,
565,
6702,
2909,
292,
29918,
333,
29915,
451,
297,
8636,
29897,
470,
313,
7529,
1839,
2909,
292,
29918,
333,
2033,
338,
6213,
1125,
13,
9651,
12020,
7865,
2392,
703,
18552,
292,
278,
3734,
3443,
421,
2909,
292,
29918,
333,
29952,
746,
5432,
421,
14930,
29918,
562,
510,
1545,
362,
29952,
1159,
13,
4706,
396,
11539,
278,
3734,
3443,
525,
562,
510,
1545,
362,
29918,
333,
29915,
338,
731,
13,
4706,
565,
6702,
562,
510,
1545,
362,
29918,
333,
29915,
451,
297,
8636,
29897,
470,
313,
7529,
1839,
562,
510,
1545,
362,
29918,
333,
2033,
338,
6213,
1125,
13,
9651,
12020,
7865,
2392,
703,
18552,
292,
278,
3734,
3443,
421,
562,
510,
1545,
362,
29918,
333,
29952,
746,
5432,
421,
14930,
29918,
562,
510,
1545,
362,
29952,
1159,
13,
4706,
396,
11539,
278,
3734,
3443,
525,
15539,
29918,
333,
29915,
338,
731,
13,
4706,
565,
6702,
15539,
29918,
333,
29915,
451,
297,
8636,
29897,
470,
313,
7529,
1839,
15539,
29918,
333,
2033,
338,
6213,
1125,
13,
9651,
12020,
7865,
2392,
703,
18552,
292,
278,
3734,
3443,
421,
15539,
29918,
333,
29952,
746,
5432,
421,
14930,
29918,
562,
510,
1545,
362,
29952,
1159,
13,
13,
4706,
6503,
29918,
2084,
353,
8207,
2909,
292,
29914,
1202,
29899,
562,
510,
1545,
362,
4286,
6506,
877,
29912,
4830,
29913,
742,
525,
3126,
1495,
13,
4706,
2224,
29918,
7529,
353,
6571,
13,
13,
4706,
2346,
29918,
7529,
353,
6571,
13,
4706,
565,
525,
2909,
292,
29918,
333,
29915,
297,
8636,
29901,
13,
9651,
2346,
29918,
7529,
1839,
2909,
292,
29918,
333,
2033,
353,
8636,
1839,
2909,
292,
29918,
333,
2033,
13,
4706,
565,
525,
562,
510,
1545,
362,
29918,
333,
29915,
297,
8636,
29901,
13,
9651,
2346,
29918,
7529,
1839,
562,
510,
1545,
362,
29918,
333,
2033,
353,
8636,
1839,
562,
510,
1545,
362,
29918,
333,
2033,
13,
4706,
565,
525,
15539,
29918,
333,
29915,
297,
8636,
29901,
13,
9651,
2346,
29918,
7529,
1839,
15539,
29918,
333,
2033,
353,
8636,
1839,
15539,
29918,
333,
2033,
13,
4706,
565,
525,
2962,
29915,
297,
8636,
29901,
13,
9651,
2346,
29918,
7529,
1839,
2962,
2033,
353,
8636,
1839,
2962,
2033,
13,
4706,
565,
525,
355,
29915,
297,
8636,
29901,
13,
9651,
2346,
29918,
7529,
1839,
355,
2033,
353,
8636,
1839,
355,
2033,
13,
13,
4706,
4839,
29918,
7529,
353,
6571,
13,
13,
4706,
883,
29918,
7529,
353,
5159,
13,
4706,
1887,
29918,
1707,
29918,
5325,
353,
6571,
13,
13,
4706,
3573,
29918,
7529,
353,
6213,
13,
13,
4706,
396,
7331,
4839,
421,
23965,
29952,
13,
4706,
4839,
29918,
7529,
1839,
23965,
2033,
353,
1583,
29889,
2754,
29918,
4645,
7790,
13,
9651,
1831,
29918,
6672,
29918,
16044,
18959,
6214,
29914,
3126,
11287,
13,
4706,
565,
451,
4839,
29918,
7529,
1839,
23965,
2033,
29901,
13,
9651,
628,
4839,
29918,
7529,
1839,
23965,
2033,
13,
13,
4706,
396,
7331,
4839,
421,
3916,
29899,
1542,
29952,
13,
4706,
4839,
29918,
7529,
1839,
3916,
29899,
1542,
2033,
353,
1583,
29889,
2754,
29918,
4645,
7790,
13,
9651,
1831,
29918,
6672,
29918,
3051,
29918,
1853,
18959,
6214,
29914,
3126,
11287,
13,
13,
4706,
396,
27241,
4444,
13,
4706,
4817,
29918,
11027,
353,
5159,
13,
13,
4706,
736,
1583,
29889,
2754,
29918,
4645,
29889,
4804,
29918,
2754,
29898,
10314,
29918,
2084,
29892,
525,
5438,
742,
13,
462,
462,
9651,
2224,
29918,
7529,
29892,
13,
462,
462,
9651,
2346,
29918,
7529,
29892,
13,
462,
462,
9651,
4839,
29918,
7529,
29892,
13,
462,
462,
9651,
3573,
29922,
2587,
29918,
7529,
29892,
13,
462,
462,
9651,
1400,
29918,
7529,
29922,
689,
29918,
7529,
29892,
13,
462,
462,
9651,
2066,
29922,
2997,
29918,
1707,
29918,
5325,
29892,
13,
462,
462,
9651,
2933,
29918,
1853,
2433,
797,
1220,
5103,
29906,
29900,
29900,
29947,
742,
13,
462,
462,
9651,
4817,
29918,
11027,
29922,
5150,
29918,
11027,
29892,
13,
462,
462,
9651,
6939,
29922,
7529,
29889,
657,
877,
14035,
5477,
13,
462,
462,
9651,
903,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
29922,
7529,
29889,
657,
877,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
8785,
13,
13,
1678,
822,
10641,
29918,
1202,
265,
29898,
1311,
29892,
3143,
292,
29918,
333,
29892,
3143,
292,
16432,
29918,
333,
29892,
788,
265,
29918,
333,
29892,
3579,
19290,
1125,
13,
4706,
9995,
13,
4706,
6212,
496,
385,
788,
265,
304,
263,
17487,
310,
263,
3143,
292,
13,
308,
13,
13,
4706,
910,
1158,
3732,
263,
12231,
681,
7331,
2009,
491,
2322,
29889,
1763,
1207,
385,
13,
4706,
20489,
7331,
2009,
29892,
3113,
4529,
263,
421,
14035,
29952,
740,
13,
4706,
304,
367,
22336,
746,
13442,
278,
2933,
29889,
13,
4706,
8653,
822,
6939,
29918,
2220,
29898,
5327,
1125,
13,
4706,
8653,
268,
282,
2158,
29898,
5327,
29897,
13,
4706,
8653,
13,
4706,
8653,
3244,
353,
7882,
29889,
14930,
29918,
1202,
265,
29898,
2909,
292,
29918,
333,
29892,
3143,
292,
16432,
29918,
333,
29892,
788,
265,
29918,
333,
29892,
6939,
29922,
14035,
29918,
2220,
29897,
13,
13,
4706,
584,
3207,
6939,
740,
29901,
450,
6939,
740,
13,
9651,
363,
20489,
2009,
29889,
313,
25253,
29897,
13,
4706,
584,
3207,
938,
3143,
292,
29918,
333,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
3207,
938,
3143,
292,
16432,
29918,
333,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
3207,
938,
788,
265,
29918,
333,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
3207,
938,
14728,
29901,
29871,
13,
4706,
584,
3207,
938,
3577,
17470,
1943,
29918,
333,
29901,
29871,
13,
4706,
584,
2457,
29901,
512,
1220,
5103,
29906,
29900,
29900,
29929,
13,
462,
960,
278,
1158,
338,
2000,
408,
9524,
5794,
29892,
13,
462,
3639,
278,
2009,
3244,
29889,
13,
4706,
9995,
13,
4706,
9049,
5085,
1839,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
2033,
353,
5852,
13,
4706,
565,
9049,
5085,
29889,
657,
877,
14035,
29374,
13,
9651,
736,
1583,
29889,
14930,
29918,
1202,
265,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
2909,
292,
29918,
333,
29892,
3143,
292,
16432,
29918,
333,
29892,
788,
265,
29918,
333,
29892,
3579,
19290,
29897,
13,
4706,
1683,
29901,
13,
9651,
313,
1272,
29897,
353,
1583,
29889,
14930,
29918,
1202,
265,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
2909,
292,
29918,
333,
29892,
3143,
292,
16432,
29918,
333,
29892,
788,
265,
29918,
333,
29892,
3579,
19290,
29897,
13,
9651,
736,
848,
13,
13,
1678,
822,
10641,
29918,
1202,
265,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
1311,
29892,
3143,
292,
29918,
333,
29892,
3143,
292,
16432,
29918,
333,
29892,
788,
265,
29918,
333,
29892,
3579,
19290,
1125,
13,
4706,
9995,
13,
4706,
6212,
496,
385,
788,
265,
304,
263,
17487,
310,
263,
3143,
292,
13,
308,
13,
13,
4706,
910,
1158,
3732,
263,
12231,
681,
7331,
2009,
491,
2322,
29889,
1763,
1207,
385,
13,
4706,
20489,
7331,
2009,
29892,
3113,
4529,
263,
421,
14035,
29952,
740,
13,
4706,
304,
367,
22336,
746,
13442,
278,
2933,
29889,
13,
4706,
8653,
822,
6939,
29918,
2220,
29898,
5327,
1125,
13,
4706,
8653,
268,
282,
2158,
29898,
5327,
29897,
13,
4706,
8653,
13,
4706,
8653,
3244,
353,
7882,
29889,
14930,
29918,
1202,
265,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
2909,
292,
29918,
333,
29892,
3143,
292,
16432,
29918,
333,
29892,
788,
265,
29918,
333,
29892,
6939,
29922,
14035,
29918,
2220,
29897,
13,
13,
4706,
584,
3207,
6939,
740,
29901,
450,
6939,
740,
13,
9651,
363,
20489,
2009,
29889,
313,
25253,
29897,
13,
4706,
584,
3207,
938,
3143,
292,
29918,
333,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
3207,
938,
3143,
292,
16432,
29918,
333,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
3207,
938,
788,
265,
29918,
333,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
3207,
938,
14728,
29901,
29871,
13,
4706,
584,
3207,
938,
3577,
17470,
1943,
29918,
333,
29901,
29871,
13,
4706,
584,
2457,
29901,
512,
1220,
5103,
29906,
29900,
29900,
29929,
13,
462,
960,
278,
1158,
338,
2000,
408,
9524,
5794,
29892,
13,
462,
3639,
278,
2009,
3244,
29889,
13,
4706,
9995,
13,
13,
4706,
599,
29918,
7529,
353,
6024,
2909,
292,
29918,
333,
742,
525,
2909,
292,
16432,
29918,
333,
742,
525,
1202,
265,
29918,
333,
742,
525,
22640,
742,
525,
5113,
17470,
1943,
29918,
333,
2033,
13,
4706,
599,
29918,
7529,
29889,
4397,
877,
14035,
1495,
13,
4706,
599,
29918,
7529,
29889,
4397,
877,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
1495,
13,
13,
4706,
8636,
353,
1180,
1338,
580,
13,
4706,
363,
1820,
29892,
659,
297,
4256,
7076,
29898,
7529,
1839,
19290,
2033,
1125,
13,
9651,
565,
1820,
451,
297,
599,
29918,
7529,
29901,
13,
18884,
12020,
20948,
29898,
13,
462,
1678,
376,
29954,
327,
385,
15668,
13553,
2980,
14210,
29879,
11838,
13,
462,
1678,
376,
304,
1158,
10641,
29918,
1202,
265,
29908,
1273,
1820,
13,
18884,
1723,
13,
9651,
8636,
29961,
1989,
29962,
353,
659,
13,
4706,
628,
8636,
1839,
19290,
2033,
13,
4706,
396,
11539,
278,
3734,
3443,
525,
2909,
292,
29918,
333,
29915,
338,
731,
13,
4706,
565,
6702,
2909,
292,
29918,
333,
29915,
451,
297,
8636,
29897,
470,
313,
7529,
1839,
2909,
292,
29918,
333,
2033,
338,
6213,
1125,
13,
9651,
12020,
7865,
2392,
703,
18552,
292,
278,
3734,
3443,
421,
2909,
292,
29918,
333,
29952,
746,
5432,
421,
14930,
29918,
1202,
265,
29952,
1159,
13,
4706,
396,
11539,
278,
3734,
3443,
525,
2909,
292,
16432,
29918,
333,
29915,
338,
731,
13,
4706,
565,
6702,
2909,
292,
16432,
29918,
333,
29915,
451,
297,
8636,
29897,
470,
313,
7529,
1839,
2909,
292,
16432,
29918,
333,
2033,
338,
6213,
1125,
13,
9651,
12020,
7865,
2392,
703,
18552,
292,
278,
3734,
3443,
421,
2909,
292,
16432,
29918,
333,
29952,
746,
5432,
421,
14930,
29918,
1202,
265,
29952,
1159,
13,
4706,
396,
11539,
278,
3734,
3443,
525,
1202,
265,
29918,
333,
29915,
338,
731,
13,
4706,
565,
6702,
1202,
265,
29918,
333,
29915,
451,
297,
8636,
29897,
470,
313,
7529,
1839,
1202,
265,
29918,
333,
2033,
338,
6213,
1125,
13,
9651,
12020,
7865,
2392,
703,
18552,
292,
278,
3734,
3443,
421,
1202,
265,
29918,
333,
29952,
746,
5432,
421,
14930,
29918,
1202,
265,
29952,
1159,
13,
13,
4706,
6503,
29918,
2084,
353,
8207,
2909,
292,
29914,
1202,
29899,
1202,
265,
4286,
6506,
877,
29912,
4830,
29913,
742,
525,
3126,
1495,
13,
4706,
2224,
29918,
7529,
353,
6571,
13,
13,
4706,
2346,
29918,
7529,
353,
6571,
13,
4706,
565,
525,
2909,
292,
29918,
333,
29915,
297,
8636,
29901,
13,
9651,
2346,
29918,
7529,
1839,
2909,
292,
29918,
333,
2033,
353,
8636,
1839,
2909,
292,
29918,
333,
2033,
13,
4706,
565,
525,
2909,
292,
16432,
29918,
333,
29915,
297,
8636,
29901,
13,
9651,
2346,
29918,
7529,
1839,
2909,
292,
16432,
29918,
333,
2033,
353,
8636,
1839,
2909,
292,
16432,
29918,
333,
2033,
13,
4706,
565,
525,
1202,
265,
29918,
333,
29915,
297,
8636,
29901,
13,
9651,
2346,
29918,
7529,
1839,
1202,
265,
29918,
333,
2033,
353,
8636,
1839,
1202,
265,
29918,
333,
2033,
13,
4706,
565,
525,
22640,
29915,
297,
8636,
29901,
13,
9651,
2346,
29918,
7529,
1839,
22640,
2033,
353,
8636,
1839,
22640,
2033,
13,
4706,
565,
525,
5113,
17470,
1943,
29918,
333,
29915,
297,
8636,
29901,
13,
9651,
2346,
29918,
7529,
1839,
5113,
17470,
1943,
29918,
333,
2033,
353,
8636,
1839,
5113,
17470,
1943,
29918,
333,
2033,
13,
13,
4706,
4839,
29918,
7529,
353,
6571,
13,
13,
4706,
883,
29918,
7529,
353,
5159,
13,
4706,
1887,
29918,
1707,
29918,
5325,
353,
6571,
13,
13,
4706,
3573,
29918,
7529,
353,
6213,
13,
13,
4706,
396,
7331,
4839,
421,
23965,
29952,
13,
4706,
4839,
29918,
7529,
1839,
23965,
2033,
353,
1583,
29889,
2754,
29918,
4645,
7790,
13,
9651,
1831,
29918,
6672,
29918,
16044,
18959,
6214,
29914,
3126,
11287,
13,
4706,
565,
451,
4839,
29918,
7529,
1839,
23965,
2033,
29901,
13,
9651,
628,
4839,
29918,
7529,
1839,
23965,
2033,
13,
13,
4706,
396,
7331,
4839,
421,
3916,
29899,
1542,
29952,
13,
4706,
4839,
29918,
7529,
1839,
3916,
29899,
1542,
2033,
353,
1583,
29889,
2754,
29918,
4645,
7790,
13,
9651,
1831,
29918,
6672,
29918,
3051,
29918,
1853,
18959,
6214,
29914,
3126,
11287,
13,
13,
4706,
396,
27241,
4444,
13,
4706,
4817,
29918,
11027,
353,
5159,
13,
13,
4706,
736,
1583,
29889,
2754,
29918,
4645,
29889,
4804,
29918,
2754,
29898,
10314,
29918,
2084,
29892,
525,
5438,
742,
13,
462,
462,
9651,
2224,
29918,
7529,
29892,
13,
462,
462,
9651,
2346,
29918,
7529,
29892,
13,
462,
462,
9651,
4839,
29918,
7529,
29892,
13,
462,
462,
9651,
3573,
29922,
2587,
29918,
7529,
29892,
13,
462,
462,
9651,
1400,
29918,
7529,
29922,
689,
29918,
7529,
29892,
13,
462,
462,
9651,
2066,
29922,
2997,
29918,
1707,
29918,
5325,
29892,
13,
462,
462,
9651,
2933,
29918,
1853,
2433,
797,
1220,
5103,
29906,
29900,
29900,
29929,
742,
13,
462,
462,
9651,
4817,
29918,
11027,
29922,
5150,
29918,
11027,
29892,
13,
462,
462,
9651,
6939,
29922,
7529,
29889,
657,
877,
14035,
5477,
13,
462,
462,
9651,
903,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
29922,
7529,
29889,
657,
877,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
8785,
13,
13,
1678,
822,
10641,
29918,
23945,
786,
29898,
1311,
29892,
3143,
292,
29918,
333,
29892,
4423,
29892,
2635,
29892,
931,
29892,
3579,
19290,
1125,
13,
4706,
9995,
13,
4706,
6212,
496,
263,
5839,
786,
4423,
363,
263,
3143,
292,
13,
308,
13,
13,
4706,
910,
1158,
3732,
263,
12231,
681,
7331,
2009,
491,
2322,
29889,
1763,
1207,
385,
13,
4706,
20489,
7331,
2009,
29892,
3113,
4529,
263,
421,
14035,
29952,
740,
13,
4706,
304,
367,
22336,
746,
13442,
278,
2933,
29889,
13,
4706,
8653,
822,
6939,
29918,
2220,
29898,
5327,
1125,
13,
4706,
8653,
268,
282,
2158,
29898,
5327,
29897,
13,
4706,
8653,
13,
4706,
8653,
3244,
353,
7882,
29889,
14930,
29918,
23945,
786,
29898,
2909,
292,
29918,
333,
29892,
4423,
29892,
2635,
29892,
931,
29892,
6939,
29922,
14035,
29918,
2220,
29897,
13,
13,
4706,
584,
3207,
6939,
740,
29901,
450,
6939,
740,
13,
9651,
363,
20489,
2009,
29889,
313,
25253,
29897,
13,
4706,
584,
3207,
938,
3143,
292,
29918,
333,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
3207,
851,
4423,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
3207,
2635,
2635,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
3207,
851,
931,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
2457,
29901,
512,
1220,
5103,
29906,
29900,
29900,
29896,
29896,
13,
462,
960,
278,
1158,
338,
2000,
408,
9524,
5794,
29892,
13,
462,
3639,
278,
2009,
3244,
29889,
13,
4706,
9995,
13,
4706,
9049,
5085,
1839,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
2033,
353,
5852,
13,
4706,
565,
9049,
5085,
29889,
657,
877,
14035,
29374,
13,
9651,
736,
1583,
29889,
14930,
29918,
23945,
786,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
2909,
292,
29918,
333,
29892,
4423,
29892,
2635,
29892,
931,
29892,
3579,
19290,
29897,
13,
4706,
1683,
29901,
13,
9651,
313,
1272,
29897,
353,
1583,
29889,
14930,
29918,
23945,
786,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
2909,
292,
29918,
333,
29892,
4423,
29892,
2635,
29892,
931,
29892,
3579,
19290,
29897,
13,
9651,
736,
848,
13,
13,
1678,
822,
10641,
29918,
23945,
786,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
1311,
29892,
3143,
292,
29918,
333,
29892,
4423,
29892,
2635,
29892,
931,
29892,
3579,
19290,
1125,
13,
4706,
9995,
13,
4706,
6212,
496,
263,
5839,
786,
4423,
363,
263,
3143,
292,
13,
308,
13,
13,
4706,
910,
1158,
3732,
263,
12231,
681,
7331,
2009,
491,
2322,
29889,
1763,
1207,
385,
13,
4706,
20489,
7331,
2009,
29892,
3113,
4529,
263,
421,
14035,
29952,
740,
13,
4706,
304,
367,
22336,
746,
13442,
278,
2933,
29889,
13,
4706,
8653,
822,
6939,
29918,
2220,
29898,
5327,
1125,
13,
4706,
8653,
268,
282,
2158,
29898,
5327,
29897,
13,
4706,
8653,
13,
4706,
8653,
3244,
353,
7882,
29889,
14930,
29918,
23945,
786,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
2909,
292,
29918,
333,
29892,
4423,
29892,
2635,
29892,
931,
29892,
6939,
29922,
14035,
29918,
2220,
29897,
13,
13,
4706,
584,
3207,
6939,
740,
29901,
450,
6939,
740,
13,
9651,
363,
20489,
2009,
29889,
313,
25253,
29897,
13,
4706,
584,
3207,
938,
3143,
292,
29918,
333,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
3207,
851,
4423,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
3207,
2635,
2635,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
3207,
851,
931,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
2457,
29901,
512,
1220,
5103,
29906,
29900,
29900,
29896,
29896,
13,
462,
960,
278,
1158,
338,
2000,
408,
9524,
5794,
29892,
13,
462,
3639,
278,
2009,
3244,
29889,
13,
4706,
9995,
13,
13,
4706,
599,
29918,
7529,
353,
6024,
2909,
292,
29918,
333,
742,
525,
5479,
742,
525,
1256,
742,
525,
2230,
2033,
13,
4706,
599,
29918,
7529,
29889,
4397,
877,
14035,
1495,
13,
4706,
599,
29918,
7529,
29889,
4397,
877,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
1495,
13,
13,
4706,
8636,
353,
1180,
1338,
580,
13,
4706,
363,
1820,
29892,
659,
297,
4256,
7076,
29898,
7529,
1839,
19290,
2033,
1125,
13,
9651,
565,
1820,
451,
297,
599,
29918,
7529,
29901,
13,
18884,
12020,
20948,
29898,
13,
462,
1678,
376,
29954,
327,
385,
15668,
13553,
2980,
14210,
29879,
11838,
13,
462,
1678,
376,
304,
1158,
10641,
29918,
23945,
786,
29908,
1273,
1820,
13,
18884,
1723,
13,
9651,
8636,
29961,
1989,
29962,
353,
659,
13,
4706,
628,
8636,
1839,
19290,
2033,
13,
4706,
396,
11539,
278,
3734,
3443,
525,
2909,
292,
29918,
333,
29915,
338,
731,
13,
4706,
565,
6702,
2909,
292,
29918,
333,
29915,
451,
297,
8636,
29897,
470,
313,
7529,
1839,
2909,
292,
29918,
333,
2033,
338,
6213,
1125,
13,
9651,
12020,
7865,
2392,
703,
18552,
292,
278,
3734,
3443,
421,
2909,
292,
29918,
333,
29952,
746,
5432,
421,
14930,
29918,
23945,
786,
29952,
1159,
13,
4706,
396,
11539,
278,
3734,
3443,
525,
5479,
29915,
338,
731,
13,
4706,
565,
6702,
5479,
29915,
451,
297,
8636,
29897,
470,
313,
7529,
1839,
5479,
2033,
338,
6213,
1125,
13,
9651,
12020,
7865,
2392,
703,
18552,
292,
278,
3734,
3443,
421,
5479,
29952,
746,
5432,
421,
14930,
29918,
23945,
786,
29952,
1159,
13,
4706,
396,
11539,
278,
3734,
3443,
525,
1256,
29915,
338,
731,
13,
4706,
565,
6702,
1256,
29915,
451,
297,
8636,
29897,
470,
313,
7529,
1839,
1256,
2033,
338,
6213,
1125,
13,
9651,
12020,
7865,
2392,
703,
18552,
292,
278,
3734,
3443,
421,
1256,
29952,
746,
5432,
421,
14930,
29918,
23945,
786,
29952,
1159,
13,
4706,
396,
11539,
278,
3734,
3443,
525,
2230,
29915,
338,
731,
13,
4706,
565,
6702,
2230,
29915,
451,
297,
8636,
29897,
470,
313,
7529,
1839,
2230,
2033,
338,
6213,
1125,
13,
9651,
12020,
7865,
2392,
703,
18552,
292,
278,
3734,
3443,
421,
2230,
29952,
746,
5432,
421,
14930,
29918,
23945,
786,
29952,
1159,
13,
13,
4706,
6503,
29918,
2084,
353,
8207,
2909,
292,
29914,
1202,
29899,
23945,
786,
4286,
6506,
877,
29912,
4830,
29913,
742,
525,
3126,
1495,
13,
4706,
2224,
29918,
7529,
353,
6571,
13,
13,
4706,
2346,
29918,
7529,
353,
6571,
13,
4706,
565,
525,
2909,
292,
29918,
333,
29915,
297,
8636,
29901,
13,
9651,
2346,
29918,
7529,
1839,
2909,
292,
29918,
333,
2033,
353,
8636,
1839,
2909,
292,
29918,
333,
2033,
13,
4706,
565,
525,
5479,
29915,
297,
8636,
29901,
13,
9651,
2346,
29918,
7529,
1839,
5479,
2033,
353,
8636,
1839,
5479,
2033,
13,
4706,
565,
525,
1256,
29915,
297,
8636,
29901,
13,
9651,
2346,
29918,
7529,
1839,
1256,
2033,
353,
8636,
1839,
1256,
2033,
13,
4706,
565,
525,
2230,
29915,
297,
8636,
29901,
13,
9651,
2346,
29918,
7529,
1839,
2230,
2033,
353,
8636,
1839,
2230,
2033,
13,
13,
4706,
4839,
29918,
7529,
353,
6571,
13,
13,
4706,
883,
29918,
7529,
353,
5159,
13,
4706,
1887,
29918,
1707,
29918,
5325,
353,
6571,
13,
13,
4706,
3573,
29918,
7529,
353,
6213,
13,
13,
4706,
396,
7331,
4839,
421,
23965,
29952,
13,
4706,
4839,
29918,
7529,
1839,
23965,
2033,
353,
1583,
29889,
2754,
29918,
4645,
7790,
13,
9651,
1831,
29918,
6672,
29918,
16044,
18959,
6214,
29914,
3126,
11287,
13,
4706,
565,
451,
4839,
29918,
7529,
1839,
23965,
2033,
29901,
13,
9651,
628,
4839,
29918,
7529,
1839,
23965,
2033,
13,
13,
4706,
396,
7331,
4839,
421,
3916,
29899,
1542,
29952,
13,
4706,
4839,
29918,
7529,
1839,
3916,
29899,
1542,
2033,
353,
1583,
29889,
2754,
29918,
4645,
7790,
13,
9651,
1831,
29918,
6672,
29918,
3051,
29918,
1853,
18959,
6214,
29914,
3126,
11287,
13,
13,
4706,
396,
27241,
4444,
13,
4706,
4817,
29918,
11027,
353,
5159,
13,
13,
4706,
736,
1583,
29889,
2754,
29918,
4645,
29889,
4804,
29918,
2754,
29898,
10314,
29918,
2084,
29892,
525,
5438,
742,
13,
462,
462,
9651,
2224,
29918,
7529,
29892,
13,
462,
462,
9651,
2346,
29918,
7529,
29892,
13,
462,
462,
9651,
4839,
29918,
7529,
29892,
13,
462,
462,
9651,
3573,
29922,
2587,
29918,
7529,
29892,
13,
462,
462,
9651,
1400,
29918,
7529,
29922,
689,
29918,
7529,
29892,
13,
462,
462,
9651,
2066,
29922,
2997,
29918,
1707,
29918,
5325,
29892,
13,
462,
462,
9651,
2933,
29918,
1853,
2433,
797,
1220,
5103,
29906,
29900,
29900,
29896,
29896,
742,
13,
462,
462,
9651,
4817,
29918,
11027,
29922,
5150,
29918,
11027,
29892,
13,
462,
462,
9651,
6939,
29922,
7529,
29889,
657,
877,
14035,
5477,
13,
462,
462,
9651,
903,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
29922,
7529,
29889,
657,
877,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
8785,
13,
13,
1678,
822,
12611,
29918,
2909,
292,
29898,
1311,
29892,
3143,
292,
29918,
333,
29892,
3579,
19290,
1125,
13,
4706,
9995,
13,
4706,
1815,
2242,
263,
3143,
292,
13,
308,
13,
13,
4706,
910,
1158,
3732,
263,
12231,
681,
7331,
2009,
491,
2322,
29889,
1763,
1207,
385,
13,
4706,
20489,
7331,
2009,
29892,
3113,
4529,
263,
421,
14035,
29952,
740,
13,
4706,
304,
367,
22336,
746,
13442,
278,
2933,
29889,
13,
4706,
8653,
822,
6939,
29918,
2220,
29898,
5327,
1125,
13,
4706,
8653,
268,
282,
2158,
29898,
5327,
29897,
13,
4706,
8653,
13,
4706,
8653,
3244,
353,
7882,
29889,
20713,
29918,
2909,
292,
29898,
2909,
292,
29918,
333,
29892,
6939,
29922,
14035,
29918,
2220,
29897,
13,
13,
4706,
584,
3207,
6939,
740,
29901,
450,
6939,
740,
13,
9651,
363,
20489,
2009,
29889,
313,
25253,
29897,
13,
4706,
584,
3207,
938,
3143,
292,
29918,
333,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
2457,
29901,
512,
1220,
5103,
29906,
29900,
29900,
29941,
13,
462,
960,
278,
1158,
338,
2000,
408,
9524,
5794,
29892,
13,
462,
3639,
278,
2009,
3244,
29889,
13,
4706,
9995,
13,
4706,
9049,
5085,
1839,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
2033,
353,
5852,
13,
4706,
565,
9049,
5085,
29889,
657,
877,
14035,
29374,
13,
9651,
736,
1583,
29889,
20713,
29918,
2909,
292,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
2909,
292,
29918,
333,
29892,
3579,
19290,
29897,
13,
4706,
1683,
29901,
13,
9651,
313,
1272,
29897,
353,
1583,
29889,
20713,
29918,
2909,
292,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
2909,
292,
29918,
333,
29892,
3579,
19290,
29897,
13,
9651,
736,
848,
13,
13,
1678,
822,
12611,
29918,
2909,
292,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
1311,
29892,
3143,
292,
29918,
333,
29892,
3579,
19290,
1125,
13,
4706,
9995,
13,
4706,
1815,
2242,
263,
3143,
292,
13,
308,
13,
13,
4706,
910,
1158,
3732,
263,
12231,
681,
7331,
2009,
491,
2322,
29889,
1763,
1207,
385,
13,
4706,
20489,
7331,
2009,
29892,
3113,
4529,
263,
421,
14035,
29952,
740,
13,
4706,
304,
367,
22336,
746,
13442,
278,
2933,
29889,
13,
4706,
8653,
822,
6939,
29918,
2220,
29898,
5327,
1125,
13,
4706,
8653,
268,
282,
2158,
29898,
5327,
29897,
13,
4706,
8653,
13,
4706,
8653,
3244,
353,
7882,
29889,
20713,
29918,
2909,
292,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
2909,
292,
29918,
333,
29892,
6939,
29922,
14035,
29918,
2220,
29897,
13,
13,
4706,
584,
3207,
6939,
740,
29901,
450,
6939,
740,
13,
9651,
363,
20489,
2009,
29889,
313,
25253,
29897,
13,
4706,
584,
3207,
938,
3143,
292,
29918,
333,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
2457,
29901,
512,
1220,
5103,
29906,
29900,
29900,
29941,
13,
462,
960,
278,
1158,
338,
2000,
408,
9524,
5794,
29892,
13,
462,
3639,
278,
2009,
3244,
29889,
13,
4706,
9995,
13,
13,
4706,
599,
29918,
7529,
353,
6024,
2909,
292,
29918,
333,
2033,
13,
4706,
599,
29918,
7529,
29889,
4397,
877,
14035,
1495,
13,
4706,
599,
29918,
7529,
29889,
4397,
877,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
1495,
13,
13,
4706,
8636,
353,
1180,
1338,
580,
13,
4706,
363,
1820,
29892,
659,
297,
4256,
7076,
29898,
7529,
1839,
19290,
2033,
1125,
13,
9651,
565,
1820,
451,
297,
599,
29918,
7529,
29901,
13,
18884,
12020,
20948,
29898,
13,
462,
1678,
376,
29954,
327,
385,
15668,
13553,
2980,
14210,
29879,
11838,
13,
462,
1678,
376,
304,
1158,
12611,
29918,
2909,
292,
29908,
1273,
1820,
13,
18884,
1723,
13,
9651,
8636,
29961,
1989,
29962,
353,
659,
13,
4706,
628,
8636,
1839,
19290,
2033,
13,
4706,
396,
11539,
278,
3734,
3443,
525,
2909,
292,
29918,
333,
29915,
338,
731,
13,
4706,
565,
6702,
2909,
292,
29918,
333,
29915,
451,
297,
8636,
29897,
470,
313,
7529,
1839,
2909,
292,
29918,
333,
2033,
338,
6213,
1125,
13,
9651,
12020,
7865,
2392,
703,
18552,
292,
278,
3734,
3443,
421,
2909,
292,
29918,
333,
29952,
746,
5432,
421,
20713,
29918,
2909,
292,
29952,
1159,
13,
13,
4706,
6503,
29918,
2084,
353,
8207,
2909,
292,
29914,
20713,
4286,
6506,
877,
29912,
4830,
29913,
742,
525,
3126,
1495,
13,
4706,
2224,
29918,
7529,
353,
6571,
13,
13,
4706,
2346,
29918,
7529,
353,
6571,
13,
4706,
565,
525,
2909,
292,
29918,
333,
29915,
297,
8636,
29901,
13,
9651,
2346,
29918,
7529,
1839,
2909,
292,
29918,
333,
2033,
353,
8636,
1839,
2909,
292,
29918,
333,
2033,
13,
13,
4706,
4839,
29918,
7529,
353,
6571,
13,
13,
4706,
883,
29918,
7529,
353,
5159,
13,
4706,
1887,
29918,
1707,
29918,
5325,
353,
6571,
13,
13,
4706,
3573,
29918,
7529,
353,
6213,
13,
13,
4706,
396,
7331,
4839,
421,
23965,
29952,
13,
4706,
4839,
29918,
7529,
1839,
23965,
2033,
353,
1583,
29889,
2754,
29918,
4645,
7790,
13,
9651,
1831,
29918,
6672,
29918,
16044,
18959,
6214,
29914,
3126,
11287,
13,
4706,
565,
451,
4839,
29918,
7529,
1839,
23965,
2033,
29901,
13,
9651,
628,
4839,
29918,
7529,
1839,
23965,
2033,
13,
13,
4706,
396,
7331,
4839,
421,
3916,
29899,
1542,
29952,
13,
4706,
4839,
29918,
7529,
1839,
3916,
29899,
1542,
2033,
353,
1583,
29889,
2754,
29918,
4645,
7790,
13,
9651,
1831,
29918,
6672,
29918,
3051,
29918,
1853,
18959,
6214,
29914,
3126,
11287,
13,
13,
4706,
396,
27241,
4444,
13,
4706,
4817,
29918,
11027,
353,
5159,
13,
13,
4706,
736,
1583,
29889,
2754,
29918,
4645,
29889,
4804,
29918,
2754,
29898,
10314,
29918,
2084,
29892,
525,
5438,
742,
13,
462,
462,
9651,
2224,
29918,
7529,
29892,
13,
462,
462,
9651,
2346,
29918,
7529,
29892,
13,
462,
462,
9651,
4839,
29918,
7529,
29892,
13,
462,
462,
9651,
3573,
29922,
2587,
29918,
7529,
29892,
13,
462,
462,
9651,
1400,
29918,
7529,
29922,
689,
29918,
7529,
29892,
13,
462,
462,
9651,
2066,
29922,
2997,
29918,
1707,
29918,
5325,
29892,
13,
462,
462,
9651,
2933,
29918,
1853,
2433,
797,
1220,
5103,
29906,
29900,
29900,
29941,
742,
13,
462,
462,
9651,
4817,
29918,
11027,
29922,
5150,
29918,
11027,
29892,
13,
462,
462,
9651,
6939,
29922,
7529,
29889,
657,
877,
14035,
5477,
13,
462,
462,
9651,
903,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
29922,
7529,
29889,
657,
877,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
8785,
13,
13,
1678,
822,
9659,
29918,
2909,
292,
29898,
1311,
29892,
3143,
292,
29918,
333,
29892,
3579,
19290,
1125,
13,
4706,
9995,
13,
4706,
10811,
3568,
263,
3143,
292,
322,
599,
310,
967,
21396,
322,
26051,
278,
3275,
11962,
13,
308,
13,
13,
4706,
910,
1158,
3732,
263,
12231,
681,
7331,
2009,
491,
2322,
29889,
1763,
1207,
385,
13,
4706,
20489,
7331,
2009,
29892,
3113,
4529,
263,
421,
14035,
29952,
740,
13,
4706,
304,
367,
22336,
746,
13442,
278,
2933,
29889,
13,
4706,
8653,
822,
6939,
29918,
2220,
29898,
5327,
1125,
13,
4706,
8653,
268,
282,
2158,
29898,
5327,
29897,
13,
4706,
8653,
13,
4706,
8653,
3244,
353,
7882,
29889,
26897,
29918,
2909,
292,
29898,
2909,
292,
29918,
333,
29892,
6939,
29922,
14035,
29918,
2220,
29897,
13,
13,
4706,
584,
3207,
6939,
740,
29901,
450,
6939,
740,
13,
9651,
363,
20489,
2009,
29889,
313,
25253,
29897,
13,
4706,
584,
3207,
938,
3143,
292,
29918,
333,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
2457,
29901,
512,
1220,
5103,
29906,
29900,
29900,
29896,
29906,
13,
462,
960,
278,
1158,
338,
2000,
408,
9524,
5794,
29892,
13,
462,
3639,
278,
2009,
3244,
29889,
13,
4706,
9995,
13,
4706,
9049,
5085,
1839,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
2033,
353,
5852,
13,
4706,
565,
9049,
5085,
29889,
657,
877,
14035,
29374,
13,
9651,
736,
1583,
29889,
26897,
29918,
2909,
292,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
2909,
292,
29918,
333,
29892,
3579,
19290,
29897,
13,
4706,
1683,
29901,
13,
9651,
313,
1272,
29897,
353,
1583,
29889,
26897,
29918,
2909,
292,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
2909,
292,
29918,
333,
29892,
3579,
19290,
29897,
13,
9651,
736,
848,
13,
13,
1678,
822,
9659,
29918,
2909,
292,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
1311,
29892,
3143,
292,
29918,
333,
29892,
3579,
19290,
1125,
13,
4706,
9995,
13,
4706,
10811,
3568,
263,
3143,
292,
322,
599,
310,
967,
21396,
322,
26051,
278,
3275,
11962,
13,
308,
13,
13,
4706,
910,
1158,
3732,
263,
12231,
681,
7331,
2009,
491,
2322,
29889,
1763,
1207,
385,
13,
4706,
20489,
7331,
2009,
29892,
3113,
4529,
263,
421,
14035,
29952,
740,
13,
4706,
304,
367,
22336,
746,
13442,
278,
2933,
29889,
13,
4706,
8653,
822,
6939,
29918,
2220,
29898,
5327,
1125,
13,
4706,
8653,
268,
282,
2158,
29898,
5327,
29897,
13,
4706,
8653,
13,
4706,
8653,
3244,
353,
7882,
29889,
26897,
29918,
2909,
292,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
2909,
292,
29918,
333,
29892,
6939,
29922,
14035,
29918,
2220,
29897,
13,
13,
4706,
584,
3207,
6939,
740,
29901,
450,
6939,
740,
13,
9651,
363,
20489,
2009,
29889,
313,
25253,
29897,
13,
4706,
584,
3207,
938,
3143,
292,
29918,
333,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
2457,
29901,
512,
1220,
5103,
29906,
29900,
29900,
29896,
29906,
13,
462,
960,
278,
1158,
338,
2000,
408,
9524,
5794,
29892,
13,
462,
3639,
278,
2009,
3244,
29889,
13,
4706,
9995,
13,
13,
4706,
599,
29918,
7529,
353,
6024,
2909,
292,
29918,
333,
2033,
13,
4706,
599,
29918,
7529,
29889,
4397,
877,
14035,
1495,
13,
4706,
599,
29918,
7529,
29889,
4397,
877,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
1495,
13,
13,
4706,
8636,
353,
1180,
1338,
580,
13,
4706,
363,
1820,
29892,
659,
297,
4256,
7076,
29898,
7529,
1839,
19290,
2033,
1125,
13,
9651,
565,
1820,
451,
297,
599,
29918,
7529,
29901,
13,
18884,
12020,
20948,
29898,
13,
462,
1678,
376,
29954,
327,
385,
15668,
13553,
2980,
14210,
29879,
11838,
13,
462,
1678,
376,
304,
1158,
9659,
29918,
2909,
292,
29908,
1273,
1820,
13,
18884,
1723,
13,
9651,
8636,
29961,
1989,
29962,
353,
659,
13,
4706,
628,
8636,
1839,
19290,
2033,
13,
4706,
396,
11539,
278,
3734,
3443,
525,
2909,
292,
29918,
333,
29915,
338,
731,
13,
4706,
565,
6702,
2909,
292,
29918,
333,
29915,
451,
297,
8636,
29897,
470,
313,
7529,
1839,
2909,
292,
29918,
333,
2033,
338,
6213,
1125,
13,
9651,
12020,
7865,
2392,
703,
18552,
292,
278,
3734,
3443,
421,
2909,
292,
29918,
333,
29952,
746,
5432,
421,
26897,
29918,
2909,
292,
29952,
1159,
13,
13,
4706,
6503,
29918,
2084,
353,
8207,
2909,
292,
29914,
26897,
4286,
6506,
877,
29912,
4830,
29913,
742,
525,
3126,
1495,
13,
4706,
2224,
29918,
7529,
353,
6571,
13,
13,
4706,
2346,
29918,
7529,
353,
6571,
13,
4706,
565,
525,
2909,
292,
29918,
333,
29915,
297,
8636,
29901,
13,
9651,
2346,
29918,
7529,
1839,
2909,
292,
29918,
333,
2033,
353,
8636,
1839,
2909,
292,
29918,
333,
2033,
13,
13,
4706,
4839,
29918,
7529,
353,
6571,
13,
13,
4706,
883,
29918,
7529,
353,
5159,
13,
4706,
1887,
29918,
1707,
29918,
5325,
353,
6571,
13,
13,
4706,
3573,
29918,
7529,
353,
6213,
13,
13,
4706,
396,
7331,
4839,
421,
23965,
29952,
13,
4706,
4839,
29918,
7529,
1839,
23965,
2033,
353,
1583,
29889,
2754,
29918,
4645,
7790,
13,
9651,
1831,
29918,
6672,
29918,
16044,
18959,
6214,
29914,
3126,
11287,
13,
4706,
565,
451,
4839,
29918,
7529,
1839,
23965,
2033,
29901,
13,
9651,
628,
4839,
29918,
7529,
1839,
23965,
2033,
13,
13,
4706,
396,
7331,
4839,
421,
3916,
29899,
1542,
29952,
13,
4706,
4839,
29918,
7529,
1839,
3916,
29899,
1542,
2033,
353,
1583,
29889,
2754,
29918,
4645,
7790,
13,
9651,
1831,
29918,
6672,
29918,
3051,
29918,
1853,
18959,
6214,
29914,
3126,
11287,
13,
13,
4706,
396,
27241,
4444,
13,
4706,
4817,
29918,
11027,
353,
5159,
13,
13,
4706,
736,
1583,
29889,
2754,
29918,
4645,
29889,
4804,
29918,
2754,
29898,
10314,
29918,
2084,
29892,
525,
5438,
742,
13,
462,
462,
9651,
2224,
29918,
7529,
29892,
13,
462,
462,
9651,
2346,
29918,
7529,
29892,
13,
462,
462,
9651,
4839,
29918,
7529,
29892,
13,
462,
462,
9651,
3573,
29922,
2587,
29918,
7529,
29892,
13,
462,
462,
9651,
1400,
29918,
7529,
29922,
689,
29918,
7529,
29892,
13,
462,
462,
9651,
2066,
29922,
2997,
29918,
1707,
29918,
5325,
29892,
13,
462,
462,
9651,
2933,
29918,
1853,
2433,
797,
1220,
5103,
29906,
29900,
29900,
29896,
29906,
742,
13,
462,
462,
9651,
4817,
29918,
11027,
29922,
5150,
29918,
11027,
29892,
13,
462,
462,
9651,
6939,
29922,
7529,
29889,
657,
877,
14035,
5477,
13,
462,
462,
9651,
903,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
29922,
7529,
29889,
657,
877,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
8785,
13,
13,
1678,
822,
5217,
29918,
2909,
292,
29898,
1311,
29892,
1178,
29892,
3579,
19290,
1125,
13,
4706,
9995,
13,
4706,
21267,
263,
3143,
292,
491,
3553,
13,
308,
13,
13,
4706,
910,
1158,
3732,
263,
12231,
681,
7331,
2009,
491,
2322,
29889,
1763,
1207,
385,
13,
4706,
20489,
7331,
2009,
29892,
3113,
4529,
263,
421,
14035,
29952,
740,
13,
4706,
304,
367,
22336,
746,
13442,
278,
2933,
29889,
13,
4706,
8653,
822,
6939,
29918,
2220,
29898,
5327,
1125,
13,
4706,
8653,
268,
282,
2158,
29898,
5327,
29897,
13,
4706,
8653,
13,
4706,
8653,
3244,
353,
7882,
29889,
8143,
29918,
2909,
292,
29898,
333,
29892,
6939,
29922,
14035,
29918,
2220,
29897,
13,
13,
4706,
584,
3207,
6939,
740,
29901,
450,
6939,
740,
13,
9651,
363,
20489,
2009,
29889,
313,
25253,
29897,
13,
4706,
584,
3207,
938,
1178,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
2457,
29901,
512,
1220,
5103,
29906,
29900,
29900,
29941,
13,
462,
960,
278,
1158,
338,
2000,
408,
9524,
5794,
29892,
13,
462,
3639,
278,
2009,
3244,
29889,
13,
4706,
9995,
13,
4706,
9049,
5085,
1839,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
2033,
353,
5852,
13,
4706,
565,
9049,
5085,
29889,
657,
877,
14035,
29374,
13,
9651,
736,
1583,
29889,
8143,
29918,
2909,
292,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
333,
29892,
3579,
19290,
29897,
13,
4706,
1683,
29901,
13,
9651,
313,
1272,
29897,
353,
1583,
29889,
8143,
29918,
2909,
292,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
333,
29892,
3579,
19290,
29897,
13,
9651,
736,
848,
13,
13,
1678,
822,
5217,
29918,
2909,
292,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
1311,
29892,
1178,
29892,
3579,
19290,
1125,
13,
4706,
9995,
13,
4706,
21267,
263,
3143,
292,
491,
3553,
13,
308,
13,
13,
4706,
910,
1158,
3732,
263,
12231,
681,
7331,
2009,
491,
2322,
29889,
1763,
1207,
385,
13,
4706,
20489,
7331,
2009,
29892,
3113,
4529,
263,
421,
14035,
29952,
740,
13,
4706,
304,
367,
22336,
746,
13442,
278,
2933,
29889,
13,
4706,
8653,
822,
6939,
29918,
2220,
29898,
5327,
1125,
13,
4706,
8653,
268,
282,
2158,
29898,
5327,
29897,
13,
4706,
8653,
13,
4706,
8653,
3244,
353,
7882,
29889,
8143,
29918,
2909,
292,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
333,
29892,
6939,
29922,
14035,
29918,
2220,
29897,
13,
13,
4706,
584,
3207,
6939,
740,
29901,
450,
6939,
740,
13,
9651,
363,
20489,
2009,
29889,
313,
25253,
29897,
13,
4706,
584,
3207,
938,
1178,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
2457,
29901,
512,
1220,
5103,
29906,
29900,
29900,
29941,
13,
462,
960,
278,
1158,
338,
2000,
408,
9524,
5794,
29892,
13,
462,
3639,
278,
2009,
3244,
29889,
13,
4706,
9995,
13,
13,
4706,
599,
29918,
7529,
353,
6024,
333,
2033,
13,
4706,
599,
29918,
7529,
29889,
4397,
877,
14035,
1495,
13,
4706,
599,
29918,
7529,
29889,
4397,
877,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
1495,
13,
13,
4706,
8636,
353,
1180,
1338,
580,
13,
4706,
363,
1820,
29892,
659,
297,
4256,
7076,
29898,
7529,
1839,
19290,
2033,
1125,
13,
9651,
565,
1820,
451,
297,
599,
29918,
7529,
29901,
13,
18884,
12020,
20948,
29898,
13,
462,
1678,
376,
29954,
327,
385,
15668,
13553,
2980,
14210,
29879,
11838,
13,
462,
1678,
376,
304,
1158,
5217,
29918,
2909,
292,
29908,
1273,
1820,
13,
18884,
1723,
13,
9651,
8636,
29961,
1989,
29962,
353,
659,
13,
4706,
628,
8636,
1839,
19290,
2033,
13,
4706,
396,
11539,
278,
3734,
3443,
525,
333,
29915,
338,
731,
13,
4706,
565,
6702,
333,
29915,
451,
297,
8636,
29897,
470,
313,
7529,
1839,
333,
2033,
338,
6213,
1125,
13,
9651,
12020,
7865,
2392,
703,
18552,
292,
278,
3734,
3443,
421,
333,
29952,
746,
5432,
421,
8143,
29918,
2909,
292,
29952,
1159,
13,
13,
4706,
6503,
29918,
2084,
353,
8207,
2909,
292,
29914,
8143,
4286,
6506,
877,
29912,
4830,
29913,
742,
525,
3126,
1495,
13,
4706,
2224,
29918,
7529,
353,
6571,
13,
13,
4706,
2346,
29918,
7529,
353,
6571,
13,
4706,
565,
525,
333,
29915,
297,
8636,
29901,
13,
9651,
2346,
29918,
7529,
1839,
333,
2033,
353,
8636,
1839,
333,
2033,
13,
13,
4706,
4839,
29918,
7529,
353,
6571,
13,
13,
4706,
883,
29918,
7529,
353,
5159,
13,
4706,
1887,
29918,
1707,
29918,
5325,
353,
6571,
13,
13,
4706,
3573,
29918,
7529,
353,
6213,
13,
13,
4706,
396,
7331,
4839,
421,
23965,
29952,
13,
4706,
4839,
29918,
7529,
1839,
23965,
2033,
353,
1583,
29889,
2754,
29918,
4645,
7790,
13,
9651,
1831,
29918,
6672,
29918,
16044,
18959,
6214,
29914,
3126,
11287,
13,
4706,
565,
451,
4839,
29918,
7529,
1839,
23965,
2033,
29901,
13,
9651,
628,
4839,
29918,
7529,
1839,
23965,
2033,
13,
13,
4706,
396,
7331,
4839,
421,
3916,
29899,
1542,
29952,
13,
4706,
4839,
29918,
7529,
1839,
3916,
29899,
1542,
2033,
353,
1583,
29889,
2754,
29918,
4645,
7790,
13,
9651,
1831,
29918,
6672,
29918,
3051,
29918,
1853,
18959,
6214,
29914,
3126,
11287,
13,
13,
4706,
396,
27241,
4444,
13,
4706,
4817,
29918,
11027,
353,
5159,
13,
13,
4706,
736,
1583,
29889,
2754,
29918,
4645,
29889,
4804,
29918,
2754,
29898,
10314,
29918,
2084,
29892,
525,
2287,
18476,
742,
13,
462,
462,
9651,
2224,
29918,
7529,
29892,
13,
462,
462,
9651,
2346,
29918,
7529,
29892,
13,
462,
462,
9651,
4839,
29918,
7529,
29892,
13,
462,
462,
9651,
3573,
29922,
2587,
29918,
7529,
29892,
13,
462,
462,
9651,
1400,
29918,
7529,
29922,
689,
29918,
7529,
29892,
13,
462,
462,
9651,
2066,
29922,
2997,
29918,
1707,
29918,
5325,
29892,
13,
462,
462,
9651,
2933,
29918,
1853,
2433,
797,
1220,
5103,
29906,
29900,
29900,
29941,
742,
13,
462,
462,
9651,
4817,
29918,
11027,
29922,
5150,
29918,
11027,
29892,
13,
462,
462,
9651,
6939,
29922,
7529,
29889,
657,
877,
14035,
5477,
13,
462,
462,
9651,
903,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
29922,
7529,
29889,
657,
877,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
8785,
13,
13,
1678,
822,
1439,
29873,
496,
29918,
562,
510,
1545,
362,
29898,
1311,
29892,
3143,
292,
29918,
333,
29892,
24803,
362,
29918,
333,
29892,
11962,
29918,
333,
29892,
3579,
19290,
1125,
13,
4706,
9995,
13,
4706,
360,
1803,
496,
385,
24803,
362,
3143,
292,
304,
263,
3143,
292,
13,
308,
13,
13,
4706,
910,
1158,
3732,
263,
12231,
681,
7331,
2009,
491,
2322,
29889,
1763,
1207,
385,
13,
4706,
20489,
7331,
2009,
29892,
3113,
4529,
263,
421,
14035,
29952,
740,
13,
4706,
304,
367,
22336,
746,
13442,
278,
2933,
29889,
13,
4706,
8653,
822,
6939,
29918,
2220,
29898,
5327,
1125,
13,
4706,
8653,
268,
282,
2158,
29898,
5327,
29897,
13,
4706,
8653,
13,
4706,
8653,
3244,
353,
7882,
29889,
29881,
1803,
496,
29918,
562,
510,
1545,
362,
29898,
2909,
292,
29918,
333,
29892,
24803,
362,
29918,
333,
29892,
11962,
29918,
333,
29892,
6939,
29922,
14035,
29918,
2220,
29897,
13,
13,
4706,
584,
3207,
6939,
740,
29901,
450,
6939,
740,
13,
9651,
363,
20489,
2009,
29889,
313,
25253,
29897,
13,
4706,
584,
3207,
938,
3143,
292,
29918,
333,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
3207,
938,
24803,
362,
29918,
333,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
3207,
938,
11962,
29918,
333,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
3207,
2635,
1369,
29901,
29871,
13,
4706,
584,
2457,
29901,
512,
1220,
5103,
29906,
29900,
29900,
29896,
29955,
13,
462,
960,
278,
1158,
338,
2000,
408,
9524,
5794,
29892,
13,
462,
3639,
278,
2009,
3244,
29889,
13,
4706,
9995,
13,
4706,
9049,
5085,
1839,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
2033,
353,
5852,
13,
4706,
565,
9049,
5085,
29889,
657,
877,
14035,
29374,
13,
9651,
736,
1583,
29889,
29881,
1803,
496,
29918,
562,
510,
1545,
362,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
2909,
292,
29918,
333,
29892,
24803,
362,
29918,
333,
29892,
11962,
29918,
333,
29892,
3579,
19290,
29897,
13,
4706,
1683,
29901,
13,
9651,
313,
1272,
29897,
353,
1583,
29889,
29881,
1803,
496,
29918,
562,
510,
1545,
362,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
2909,
292,
29918,
333,
29892,
24803,
362,
29918,
333,
29892,
11962,
29918,
333,
29892,
3579,
19290,
29897,
13,
9651,
736,
848,
13,
13,
1678,
822,
1439,
29873,
496,
29918,
562,
510,
1545,
362,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
1311,
29892,
3143,
292,
29918,
333,
29892,
24803,
362,
29918,
333,
29892,
11962,
29918,
333,
29892,
3579,
19290,
1125,
13,
4706,
9995,
13,
4706,
360,
1803,
496,
385,
24803,
362,
3143,
292,
304,
263,
3143,
292,
13,
308,
13,
13,
4706,
910,
1158,
3732,
263,
12231,
681,
7331,
2009,
491,
2322,
29889,
1763,
1207,
385,
13,
4706,
20489,
7331,
2009,
29892,
3113,
4529,
263,
421,
14035,
29952,
740,
13,
4706,
304,
367,
22336,
746,
13442,
278,
2933,
29889,
13,
4706,
8653,
822,
6939,
29918,
2220,
29898,
5327,
1125,
13,
4706,
8653,
268,
282,
2158,
29898,
5327,
29897,
13,
4706,
8653,
13,
4706,
8653,
3244,
353,
7882,
29889,
29881,
1803,
496,
29918,
562,
510,
1545,
362,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
2909,
292,
29918,
333,
29892,
24803,
362,
29918,
333,
29892,
11962,
29918,
333,
29892,
6939,
29922,
14035,
29918,
2220,
29897,
13,
13,
4706,
584,
3207,
6939,
740,
29901,
450,
6939,
740,
13,
9651,
363,
20489,
2009,
29889,
313,
25253,
29897,
13,
4706,
584,
3207,
938,
3143,
292,
29918,
333,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
3207,
938,
24803,
362,
29918,
333,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
3207,
938,
11962,
29918,
333,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
3207,
2635,
1369,
29901,
29871,
13,
4706,
584,
2457,
29901,
512,
1220,
5103,
29906,
29900,
29900,
29896,
29955,
13,
462,
960,
278,
1158,
338,
2000,
408,
9524,
5794,
29892,
13,
462,
3639,
278,
2009,
3244,
29889,
13,
4706,
9995,
13,
13,
4706,
599,
29918,
7529,
353,
6024,
2909,
292,
29918,
333,
742,
525,
562,
510,
1545,
362,
29918,
333,
742,
525,
15539,
29918,
333,
742,
525,
2962,
2033,
13,
4706,
599,
29918,
7529,
29889,
4397,
877,
14035,
1495,
13,
4706,
599,
29918,
7529,
29889,
4397,
877,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
1495,
13,
13,
4706,
8636,
353,
1180,
1338,
580,
13,
4706,
363,
1820,
29892,
659,
297,
4256,
7076,
29898,
7529,
1839,
19290,
2033,
1125,
13,
9651,
565,
1820,
451,
297,
599,
29918,
7529,
29901,
13,
18884,
12020,
20948,
29898,
13,
462,
1678,
376,
29954,
327,
385,
15668,
13553,
2980,
14210,
29879,
11838,
13,
462,
1678,
376,
304,
1158,
1439,
29873,
496,
29918,
562,
510,
1545,
362,
29908,
1273,
1820,
13,
18884,
1723,
13,
9651,
8636,
29961,
1989,
29962,
353,
659,
13,
4706,
628,
8636,
1839,
19290,
2033,
13,
4706,
396,
11539,
278,
3734,
3443,
525,
2909,
292,
29918,
333,
29915,
338,
731,
13,
4706,
565,
6702,
2909,
292,
29918,
333,
29915,
451,
297,
8636,
29897,
470,
313,
7529,
1839,
2909,
292,
29918,
333,
2033,
338,
6213,
1125,
13,
9651,
12020,
7865,
2392,
703,
18552,
292,
278,
3734,
3443,
421,
2909,
292,
29918,
333,
29952,
746,
5432,
421,
29881,
1803,
496,
29918,
562,
510,
1545,
362,
29952,
1159,
13,
4706,
396,
11539,
278,
3734,
3443,
525,
562,
510,
1545,
362,
29918,
333,
29915,
338,
731,
13,
4706,
565,
6702,
562,
510,
1545,
362,
29918,
333,
29915,
451,
297,
8636,
29897,
470,
313,
7529,
1839,
562,
510,
1545,
362,
29918,
333,
2033,
338,
6213,
1125,
13,
9651,
12020,
7865,
2392,
703,
18552,
292,
278,
3734,
3443,
421,
562,
510,
1545,
362,
29918,
333,
29952,
746,
5432,
421,
29881,
1803,
496,
29918,
562,
510,
1545,
362,
29952,
1159,
13,
4706,
396,
11539,
278,
3734,
3443,
525,
15539,
29918,
333,
29915,
338,
731,
13,
4706,
565,
6702,
15539,
29918,
333,
29915,
451,
297,
8636,
29897,
470,
313,
7529,
1839,
15539,
29918,
333,
2033,
338,
6213,
1125,
13,
9651,
12020,
7865,
2392,
703,
18552,
292,
278,
3734,
3443,
421,
15539,
29918,
333,
29952,
746,
5432,
421,
29881,
1803,
496,
29918,
562,
510,
1545,
362,
29952,
1159,
13,
13,
4706,
6503,
29918,
2084,
353,
8207,
2909,
292,
29914,
5992,
29899,
562,
510,
1545,
362,
4286,
6506,
877,
29912,
4830,
29913,
742,
525,
3126,
1495,
13,
4706,
2224,
29918,
7529,
353,
6571,
13,
13,
4706,
2346,
29918,
7529,
353,
6571,
13,
4706,
565,
525,
2909,
292,
29918,
333,
29915,
297,
8636,
29901,
13,
9651,
2346,
29918,
7529,
1839,
2909,
292,
29918,
333,
2033,
353,
8636,
1839,
2909,
292,
29918,
333,
2033,
13,
4706,
565,
525,
562,
510,
1545,
362,
29918,
333,
29915,
297,
8636,
29901,
13,
9651,
2346,
29918,
7529,
1839,
562,
510,
1545,
362,
29918,
333,
2033,
353,
8636,
1839,
562,
510,
1545,
362,
29918,
333,
2033,
13,
4706,
565,
525,
15539,
29918,
333,
29915,
297,
8636,
29901,
13,
9651,
2346,
29918,
7529,
1839,
15539,
29918,
333,
2033,
353,
8636,
1839,
15539,
29918,
333,
2033,
13,
4706,
565,
525,
2962,
29915,
297,
8636,
29901,
13,
9651,
2346,
29918,
7529,
1839,
2962,
2033,
353,
8636,
1839,
2962,
2033,
13,
13,
4706,
4839,
29918,
7529,
353,
6571,
13,
13,
4706,
883,
29918,
7529,
353,
5159,
13,
4706,
1887,
29918,
1707,
29918,
5325,
353,
6571,
13,
13,
4706,
3573,
29918,
7529,
353,
6213,
13,
13,
4706,
396,
7331,
4839,
421,
23965,
29952,
13,
4706,
4839,
29918,
7529,
1839,
23965,
2033,
353,
1583,
29889,
2754,
29918,
4645,
7790,
13,
9651,
1831,
29918,
6672,
29918,
16044,
18959,
6214,
29914,
3126,
11287,
13,
4706,
565,
451,
4839,
29918,
7529,
1839,
23965,
2033,
29901,
13,
9651,
628,
4839,
29918,
7529,
1839,
23965,
2033,
13,
13,
4706,
396,
7331,
4839,
421,
3916,
29899,
1542,
29952,
13,
4706,
4839,
29918,
7529,
1839,
3916,
29899,
1542,
2033,
353,
1583,
29889,
2754,
29918,
4645,
7790,
13,
9651,
1831,
29918,
6672,
29918,
3051,
29918,
1853,
18959,
6214,
29914,
3126,
11287,
13,
13,
4706,
396,
27241,
4444,
13,
4706,
4817,
29918,
11027,
353,
5159,
13,
13,
4706,
736,
1583,
29889,
2754,
29918,
4645,
29889,
4804,
29918,
2754,
29898,
10314,
29918,
2084,
29892,
525,
5438,
742,
13,
462,
462,
9651,
2224,
29918,
7529,
29892,
13,
462,
462,
9651,
2346,
29918,
7529,
29892,
13,
462,
462,
9651,
4839,
29918,
7529,
29892,
13,
462,
462,
9651,
3573,
29922,
2587,
29918,
7529,
29892,
13,
462,
462,
9651,
1400,
29918,
7529,
29922,
689,
29918,
7529,
29892,
13,
462,
462,
9651,
2066,
29922,
2997,
29918,
1707,
29918,
5325,
29892,
13,
462,
462,
9651,
2933,
29918,
1853,
2433,
797,
1220,
5103,
29906,
29900,
29900,
29896,
29955,
742,
13,
462,
462,
9651,
4817,
29918,
11027,
29922,
5150,
29918,
11027,
29892,
13,
462,
462,
9651,
6939,
29922,
7529,
29889,
657,
877,
14035,
5477,
13,
462,
462,
9651,
903,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
29922,
7529,
29889,
657,
877,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
8785,
13,
13,
1678,
822,
1439,
29873,
496,
29918,
1202,
265,
29898,
1311,
29892,
3143,
292,
29918,
333,
29892,
3143,
292,
16432,
29918,
333,
29892,
788,
265,
29918,
333,
29892,
3579,
19290,
1125,
13,
4706,
9995,
13,
4706,
360,
1803,
496,
385,
788,
265,
304,
263,
17487,
310,
263,
3143,
292,
13,
308,
13,
13,
4706,
910,
1158,
3732,
263,
12231,
681,
7331,
2009,
491,
2322,
29889,
1763,
1207,
385,
13,
4706,
20489,
7331,
2009,
29892,
3113,
4529,
263,
421,
14035,
29952,
740,
13,
4706,
304,
367,
22336,
746,
13442,
278,
2933,
29889,
13,
4706,
8653,
822,
6939,
29918,
2220,
29898,
5327,
1125,
13,
4706,
8653,
268,
282,
2158,
29898,
5327,
29897,
13,
4706,
8653,
13,
4706,
8653,
3244,
353,
7882,
29889,
29881,
1803,
496,
29918,
1202,
265,
29898,
2909,
292,
29918,
333,
29892,
3143,
292,
16432,
29918,
333,
29892,
788,
265,
29918,
333,
29892,
6939,
29922,
14035,
29918,
2220,
29897,
13,
13,
4706,
584,
3207,
6939,
740,
29901,
450,
6939,
740,
13,
9651,
363,
20489,
2009,
29889,
313,
25253,
29897,
13,
4706,
584,
3207,
938,
3143,
292,
29918,
333,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
3207,
938,
3143,
292,
16432,
29918,
333,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
3207,
938,
788,
265,
29918,
333,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
3207,
938,
3577,
17470,
1943,
29918,
333,
29901,
29871,
13,
4706,
584,
2457,
29901,
512,
1220,
5103,
29906,
29900,
29900,
29896,
29955,
13,
462,
960,
278,
1158,
338,
2000,
408,
9524,
5794,
29892,
13,
462,
3639,
278,
2009,
3244,
29889,
13,
4706,
9995,
13,
4706,
9049,
5085,
1839,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
2033,
353,
5852,
13,
4706,
565,
9049,
5085,
29889,
657,
877,
14035,
29374,
13,
9651,
736,
1583,
29889,
29881,
1803,
496,
29918,
1202,
265,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
2909,
292,
29918,
333,
29892,
3143,
292,
16432,
29918,
333,
29892,
788,
265,
29918,
333,
29892,
3579,
19290,
29897,
13,
4706,
1683,
29901,
13,
9651,
313,
1272,
29897,
353,
1583,
29889,
29881,
1803,
496,
29918,
1202,
265,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
2909,
292,
29918,
333,
29892,
3143,
292,
16432,
29918,
333,
29892,
788,
265,
29918,
333,
29892,
3579,
19290,
29897,
13,
9651,
736,
848,
13,
13,
1678,
822,
1439,
29873,
496,
29918,
1202,
265,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
1311,
29892,
3143,
292,
29918,
333,
29892,
3143,
292,
16432,
29918,
333,
29892,
788,
265,
29918,
333,
29892,
3579,
19290,
1125,
13,
4706,
9995,
13,
4706,
360,
1803,
496,
385,
788,
265,
304,
263,
17487,
310,
263,
3143,
292,
13,
308,
13,
13,
4706,
910,
1158,
3732,
263,
12231,
681,
7331,
2009,
491,
2322,
29889,
1763,
1207,
385,
13,
4706,
20489,
7331,
2009,
29892,
3113,
4529,
263,
421,
14035,
29952,
740,
13,
4706,
304,
367,
22336,
746,
13442,
278,
2933,
29889,
13,
4706,
8653,
822,
6939,
29918,
2220,
29898,
5327,
1125,
13,
4706,
8653,
268,
282,
2158,
29898,
5327,
29897,
13,
4706,
8653,
13,
4706,
8653,
3244,
353,
7882,
29889,
29881,
1803,
496,
29918,
1202,
265,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
2909,
292,
29918,
333,
29892,
3143,
292,
16432,
29918,
333,
29892,
788,
265,
29918,
333,
29892,
6939,
29922,
14035,
29918,
2220,
29897,
13,
13,
4706,
584,
3207,
6939,
740,
29901,
450,
6939,
740,
13,
9651,
363,
20489,
2009,
29889,
313,
25253,
29897,
13,
4706,
584,
3207,
938,
3143,
292,
29918,
333,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
3207,
938,
3143,
292,
16432,
29918,
333,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
3207,
938,
788,
265,
29918,
333,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
3207,
938,
3577,
17470,
1943,
29918,
333,
29901,
29871,
13,
4706,
584,
2457,
29901,
512,
1220,
5103,
29906,
29900,
29900,
29896,
29955,
13,
462,
960,
278,
1158,
338,
2000,
408,
9524,
5794,
29892,
13,
462,
3639,
278,
2009,
3244,
29889,
13,
4706,
9995,
13,
13,
4706,
599,
29918,
7529,
353,
6024,
2909,
292,
29918,
333,
742,
525,
2909,
292,
16432,
29918,
333,
742,
525,
1202,
265,
29918,
333,
742,
525,
5113,
17470,
1943,
29918,
333,
2033,
13,
4706,
599,
29918,
7529,
29889,
4397,
877,
14035,
1495,
13,
4706,
599,
29918,
7529,
29889,
4397,
877,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
1495,
13,
13,
4706,
8636,
353,
1180,
1338,
580,
13,
4706,
363,
1820,
29892,
659,
297,
4256,
7076,
29898,
7529,
1839,
19290,
2033,
1125,
13,
9651,
565,
1820,
451,
297,
599,
29918,
7529,
29901,
13,
18884,
12020,
20948,
29898,
13,
462,
1678,
376,
29954,
327,
385,
15668,
13553,
2980,
14210,
29879,
11838,
13,
462,
1678,
376,
304,
1158,
1439,
29873,
496,
29918,
1202,
265,
29908,
1273,
1820,
13,
18884,
1723,
13,
9651,
8636,
29961,
1989,
29962,
353,
659,
13,
4706,
628,
8636,
1839,
19290,
2033,
13,
4706,
396,
11539,
278,
3734,
3443,
525,
2909,
292,
29918,
333,
29915,
338,
731,
13,
4706,
565,
6702,
2909,
292,
29918,
333,
29915,
451,
297,
8636,
29897,
470,
313,
7529,
1839,
2909,
292,
29918,
333,
2033,
338,
6213,
1125,
13,
9651,
12020,
7865,
2392,
703,
18552,
292,
278,
3734,
3443,
421,
2909,
292,
29918,
333,
29952,
746,
5432,
421,
29881,
1803,
496,
29918,
1202,
265,
29952,
1159,
13,
4706,
396,
11539,
278,
3734,
3443,
525,
2909,
292,
16432,
29918,
333,
29915,
338,
731,
13,
4706,
565,
6702,
2909,
292,
16432,
29918,
333,
29915,
451,
297,
8636,
29897,
470,
313,
7529,
1839,
2909,
292,
16432,
29918,
333,
2033,
338,
6213,
1125,
13,
9651,
12020,
7865,
2392,
703,
18552,
292,
278,
3734,
3443,
421,
2909,
292,
16432,
29918,
333,
29952,
746,
5432,
421,
29881,
1803,
496,
29918,
1202,
265,
29952,
1159,
13,
4706,
396,
11539,
278,
3734,
3443,
525,
1202,
265,
29918,
333,
29915,
338,
731,
13,
4706,
565,
6702,
1202,
265,
29918,
333,
29915,
451,
297,
8636,
29897,
470,
313,
7529,
1839,
1202,
265,
29918,
333,
2033,
338,
6213,
1125,
13,
9651,
12020,
7865,
2392,
703,
18552,
292,
278,
3734,
3443,
421,
1202,
265,
29918,
333,
29952,
746,
5432,
421,
29881,
1803,
496,
29918,
1202,
265,
29952,
1159,
13,
13,
4706,
6503,
29918,
2084,
353,
8207,
2909,
292,
29914,
5992,
29899,
1202,
265,
4286,
6506,
877,
29912,
4830,
29913,
742,
525,
3126,
1495,
13,
4706,
2224,
29918,
7529,
353,
6571,
13,
13,
4706,
2346,
29918,
7529,
353,
6571,
13,
4706,
565,
525,
2909,
292,
29918,
333,
29915,
297,
8636,
29901,
13,
9651,
2346,
29918,
7529,
1839,
2909,
292,
29918,
333,
2033,
353,
8636,
1839,
2909,
292,
29918,
333,
2033,
13,
4706,
565,
525,
2909,
292,
16432,
29918,
333,
29915,
297,
8636,
29901,
13,
9651,
2346,
29918,
7529,
1839,
2909,
292,
16432,
29918,
333,
2033,
353,
8636,
1839,
2909,
292,
16432,
29918,
333,
2033,
13,
4706,
565,
525,
1202,
265,
29918,
333,
29915,
297,
8636,
29901,
13,
9651,
2346,
29918,
7529,
1839,
1202,
265,
29918,
333,
2033,
353,
8636,
1839,
1202,
265,
29918,
333,
2033,
13,
4706,
565,
525,
5113,
17470,
1943,
29918,
333,
29915,
297,
8636,
29901,
13,
9651,
2346,
29918,
7529,
1839,
5113,
17470,
1943,
29918,
333,
2033,
353,
8636,
1839,
5113,
17470,
1943,
29918,
333,
2033,
13,
13,
4706,
4839,
29918,
7529,
353,
6571,
13,
13,
4706,
883,
29918,
7529,
353,
5159,
13,
4706,
1887,
29918,
1707,
29918,
5325,
353,
6571,
13,
13,
4706,
3573,
29918,
7529,
353,
6213,
13,
13,
4706,
396,
7331,
4839,
421,
23965,
29952,
13,
4706,
4839,
29918,
7529,
1839,
23965,
2033,
353,
1583,
29889,
2754,
29918,
4645,
7790,
13,
9651,
1831,
29918,
6672,
29918,
16044,
18959,
6214,
29914,
3126,
11287,
13,
4706,
565,
451,
4839,
29918,
7529,
1839,
23965,
2033,
29901,
13,
9651,
628,
4839,
29918,
7529,
1839,
23965,
2033,
13,
13,
4706,
396,
7331,
4839,
421,
3916,
29899,
1542,
29952,
13,
4706,
4839,
29918,
7529,
1839,
3916,
29899,
1542,
2033,
353,
1583,
29889,
2754,
29918,
4645,
7790,
13,
9651,
1831,
29918,
6672,
29918,
3051,
29918,
1853,
18959,
6214,
29914,
3126,
11287,
13,
13,
4706,
396,
27241,
4444,
13,
4706,
4817,
29918,
11027,
353,
5159,
13,
13,
4706,
736,
1583,
29889,
2754,
29918,
4645,
29889,
4804,
29918,
2754,
29898,
10314,
29918,
2084,
29892,
525,
5438,
742,
13,
462,
462,
9651,
2224,
29918,
7529,
29892,
13,
462,
462,
9651,
2346,
29918,
7529,
29892,
13,
462,
462,
9651,
4839,
29918,
7529,
29892,
13,
462,
462,
9651,
3573,
29922,
2587,
29918,
7529,
29892,
13,
462,
462,
9651,
1400,
29918,
7529,
29922,
689,
29918,
7529,
29892,
13,
462,
462,
9651,
2066,
29922,
2997,
29918,
1707,
29918,
5325,
29892,
13,
462,
462,
9651,
2933,
29918,
1853,
2433,
797,
1220,
5103,
29906,
29900,
29900,
29896,
29955,
742,
13,
462,
462,
9651,
4817,
29918,
11027,
29922,
5150,
29918,
11027,
29892,
13,
462,
462,
9651,
6939,
29922,
7529,
29889,
657,
877,
14035,
5477,
13,
462,
462,
9651,
903,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
29922,
7529,
29889,
657,
877,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
8785,
13,
13,
1678,
822,
1439,
29873,
496,
29918,
23945,
786,
29898,
1311,
29892,
3143,
292,
29918,
333,
29892,
3579,
19290,
1125,
13,
4706,
9995,
13,
4706,
360,
1803,
496,
263,
5839,
786,
4423,
363,
263,
3143,
292,
13,
308,
13,
13,
4706,
910,
1158,
3732,
263,
12231,
681,
7331,
2009,
491,
2322,
29889,
1763,
1207,
385,
13,
4706,
20489,
7331,
2009,
29892,
3113,
4529,
263,
421,
14035,
29952,
740,
13,
4706,
304,
367,
22336,
746,
13442,
278,
2933,
29889,
13,
4706,
8653,
822,
6939,
29918,
2220,
29898,
5327,
1125,
13,
4706,
8653,
268,
282,
2158,
29898,
5327,
29897,
13,
4706,
8653,
13,
4706,
8653,
3244,
353,
7882,
29889,
29881,
1803,
496,
29918,
23945,
786,
29898,
2909,
292,
29918,
333,
29892,
6939,
29922,
14035,
29918,
2220,
29897,
13,
13,
4706,
584,
3207,
6939,
740,
29901,
450,
6939,
740,
13,
9651,
363,
20489,
2009,
29889,
313,
25253,
29897,
13,
4706,
584,
3207,
938,
3143,
292,
29918,
333,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
3207,
938,
1178,
29901,
29871,
13,
4706,
584,
2457,
29901,
512,
1220,
5103,
29906,
29900,
29900,
29941,
13,
462,
960,
278,
1158,
338,
2000,
408,
9524,
5794,
29892,
13,
462,
3639,
278,
2009,
3244,
29889,
13,
4706,
9995,
13,
4706,
9049,
5085,
1839,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
2033,
353,
5852,
13,
4706,
565,
9049,
5085,
29889,
657,
877,
14035,
29374,
13,
9651,
736,
1583,
29889,
29881,
1803,
496,
29918,
23945,
786,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
2909,
292,
29918,
333,
29892,
3579,
19290,
29897,
13,
4706,
1683,
29901,
13,
9651,
313,
1272,
29897,
353,
1583,
29889,
29881,
1803,
496,
29918,
23945,
786,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
2909,
292,
29918,
333,
29892,
3579,
19290,
29897,
13,
9651,
736,
848,
13,
13,
1678,
822,
1439,
29873,
496,
29918,
23945,
786,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
1311,
29892,
3143,
292,
29918,
333,
29892,
3579,
19290,
1125,
13,
4706,
9995,
13,
4706,
360,
1803,
496,
263,
5839,
786,
4423,
363,
263,
3143,
292,
13,
308,
13,
13,
4706,
910,
1158,
3732,
263,
12231,
681,
7331,
2009,
491,
2322,
29889,
1763,
1207,
385,
13,
4706,
20489,
7331,
2009,
29892,
3113,
4529,
263,
421,
14035,
29952,
740,
13,
4706,
304,
367,
22336,
746,
13442,
278,
2933,
29889,
13,
4706,
8653,
822,
6939,
29918,
2220,
29898,
5327,
1125,
13,
4706,
8653,
268,
282,
2158,
29898,
5327,
29897,
13,
4706,
8653,
13,
4706,
8653,
3244,
353,
7882,
29889,
29881,
1803,
496,
29918,
23945,
786,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
2909,
292,
29918,
333,
29892,
6939,
29922,
14035,
29918,
2220,
29897,
13,
13,
4706,
584,
3207,
6939,
740,
29901,
450,
6939,
740,
13,
9651,
363,
20489,
2009,
29889,
313,
25253,
29897,
13,
4706,
584,
3207,
938,
3143,
292,
29918,
333,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
3207,
938,
1178,
29901,
29871,
13,
4706,
584,
2457,
29901,
512,
1220,
5103,
29906,
29900,
29900,
29941,
13,
462,
960,
278,
1158,
338,
2000,
408,
9524,
5794,
29892,
13,
462,
3639,
278,
2009,
3244,
29889,
13,
4706,
9995,
13,
13,
4706,
599,
29918,
7529,
353,
6024,
2909,
292,
29918,
333,
742,
525,
333,
2033,
13,
4706,
599,
29918,
7529,
29889,
4397,
877,
14035,
1495,
13,
4706,
599,
29918,
7529,
29889,
4397,
877,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
1495,
13,
13,
4706,
8636,
353,
1180,
1338,
580,
13,
4706,
363,
1820,
29892,
659,
297,
4256,
7076,
29898,
7529,
1839,
19290,
2033,
1125,
13,
9651,
565,
1820,
451,
297,
599,
29918,
7529,
29901,
13,
18884,
12020,
20948,
29898,
13,
462,
1678,
376,
29954,
327,
385,
15668,
13553,
2980,
14210,
29879,
11838,
13,
462,
1678,
376,
304,
1158,
1439,
29873,
496,
29918,
23945,
786,
29908,
1273,
1820,
13,
18884,
1723,
13,
9651,
8636,
29961,
1989,
29962,
353,
659,
13,
4706,
628,
8636,
1839,
19290,
2033,
13,
4706,
396,
11539,
278,
3734,
3443,
525,
2909,
292,
29918,
333,
29915,
338,
731,
13,
4706,
565,
6702,
2909,
292,
29918,
333,
29915,
451,
297,
8636,
29897,
470,
313,
7529,
1839,
2909,
292,
29918,
333,
2033,
338,
6213,
1125,
13,
9651,
12020,
7865,
2392,
703,
18552,
292,
278,
3734,
3443,
421,
2909,
292,
29918,
333,
29952,
746,
5432,
421,
29881,
1803,
496,
29918,
23945,
786,
29952,
1159,
13,
13,
4706,
6503,
29918,
2084,
353,
8207,
2909,
292,
29914,
5992,
29899,
23945,
786,
4286,
6506,
877,
29912,
4830,
29913,
742,
525,
3126,
1495,
13,
4706,
2224,
29918,
7529,
353,
6571,
13,
13,
4706,
2346,
29918,
7529,
353,
6571,
13,
4706,
565,
525,
2909,
292,
29918,
333,
29915,
297,
8636,
29901,
13,
9651,
2346,
29918,
7529,
1839,
2909,
292,
29918,
333,
2033,
353,
8636,
1839,
2909,
292,
29918,
333,
2033,
13,
4706,
565,
525,
333,
29915,
297,
8636,
29901,
13,
9651,
2346,
29918,
7529,
1839,
333,
2033,
353,
8636,
1839,
333,
2033,
13,
13,
4706,
4839,
29918,
7529,
353,
6571,
13,
13,
4706,
883,
29918,
7529,
353,
5159,
13,
4706,
1887,
29918,
1707,
29918,
5325,
353,
6571,
13,
13,
4706,
3573,
29918,
7529,
353,
6213,
13,
13,
4706,
396,
7331,
4839,
421,
23965,
29952,
13,
4706,
4839,
29918,
7529,
1839,
23965,
2033,
353,
1583,
29889,
2754,
29918,
4645,
7790,
13,
9651,
1831,
29918,
6672,
29918,
16044,
18959,
6214,
29914,
3126,
11287,
13,
4706,
565,
451,
4839,
29918,
7529,
1839,
23965,
2033,
29901,
13,
9651,
628,
4839,
29918,
7529,
1839,
23965,
2033,
13,
13,
4706,
396,
7331,
4839,
421,
3916,
29899,
1542,
29952,
13,
4706,
4839,
29918,
7529,
1839,
3916,
29899,
1542,
2033,
353,
1583,
29889,
2754,
29918,
4645,
7790,
13,
9651,
1831,
29918,
6672,
29918,
3051,
29918,
1853,
18959,
6214,
29914,
3126,
11287,
13,
13,
4706,
396,
27241,
4444,
13,
4706,
4817,
29918,
11027,
353,
5159,
13,
13,
4706,
736,
1583,
29889,
2754,
29918,
4645,
29889,
4804,
29918,
2754,
29898,
10314,
29918,
2084,
29892,
525,
5438,
742,
13,
462,
462,
9651,
2224,
29918,
7529,
29892,
13,
462,
462,
9651,
2346,
29918,
7529,
29892,
13,
462,
462,
9651,
4839,
29918,
7529,
29892,
13,
462,
462,
9651,
3573,
29922,
2587,
29918,
7529,
29892,
13,
462,
462,
9651,
1400,
29918,
7529,
29922,
689,
29918,
7529,
29892,
13,
462,
462,
9651,
2066,
29922,
2997,
29918,
1707,
29918,
5325,
29892,
13,
462,
462,
9651,
2933,
29918,
1853,
2433,
797,
1220,
5103,
29906,
29900,
29900,
29941,
742,
13,
462,
462,
9651,
4817,
29918,
11027,
29922,
5150,
29918,
11027,
29892,
13,
462,
462,
9651,
6939,
29922,
7529,
29889,
657,
877,
14035,
5477,
13,
462,
462,
9651,
903,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
29922,
7529,
29889,
657,
877,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
8785,
13,
13,
1678,
822,
3863,
29918,
2909,
292,
29918,
3888,
29898,
1311,
29892,
3579,
19290,
1125,
13,
4706,
9995,
13,
4706,
7641,
278,
2472,
4475,
304,
263,
3143,
292,
13,
308,
13,
13,
4706,
910,
1158,
3732,
263,
12231,
681,
7331,
2009,
491,
2322,
29889,
1763,
1207,
385,
13,
4706,
20489,
7331,
2009,
29892,
3113,
4529,
263,
421,
14035,
29952,
740,
13,
4706,
304,
367,
22336,
746,
13442,
278,
2933,
29889,
13,
4706,
8653,
822,
6939,
29918,
2220,
29898,
5327,
1125,
13,
4706,
8653,
268,
282,
2158,
29898,
5327,
29897,
13,
4706,
8653,
13,
4706,
8653,
3244,
353,
7882,
29889,
5628,
29918,
2909,
292,
29918,
3888,
29898,
14035,
29922,
14035,
29918,
2220,
29897,
13,
13,
4706,
584,
3207,
6939,
740,
29901,
450,
6939,
740,
13,
9651,
363,
20489,
2009,
29889,
313,
25253,
29897,
13,
4706,
584,
3207,
938,
3143,
292,
29918,
333,
29901,
29871,
13,
4706,
584,
3207,
5785,
2313,
792,
29901,
29871,
13,
4706,
584,
3207,
851,
3440,
29901,
29871,
13,
4706,
584,
2457,
29901,
512,
1220,
5103,
29906,
29900,
29900,
29896,
29946,
13,
462,
960,
278,
1158,
338,
2000,
408,
9524,
5794,
29892,
13,
462,
3639,
278,
2009,
3244,
29889,
13,
4706,
9995,
13,
4706,
9049,
5085,
1839,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
2033,
353,
5852,
13,
4706,
565,
9049,
5085,
29889,
657,
877,
14035,
29374,
13,
9651,
736,
1583,
29889,
5628,
29918,
2909,
292,
29918,
3888,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
1068,
19290,
29897,
13,
4706,
1683,
29901,
13,
9651,
313,
1272,
29897,
353,
1583,
29889,
5628,
29918,
2909,
292,
29918,
3888,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
1068,
19290,
29897,
13,
9651,
736,
848,
13,
13,
1678,
822,
3863,
29918,
2909,
292,
29918,
3888,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
1311,
29892,
3579,
19290,
1125,
13,
4706,
9995,
13,
4706,
7641,
278,
2472,
4475,
304,
263,
3143,
292,
13,
308,
13,
13,
4706,
910,
1158,
3732,
263,
12231,
681,
7331,
2009,
491,
2322,
29889,
1763,
1207,
385,
13,
4706,
20489,
7331,
2009,
29892,
3113,
4529,
263,
421,
14035,
29952,
740,
13,
4706,
304,
367,
22336,
746,
13442,
278,
2933,
29889,
13,
4706,
8653,
822,
6939,
29918,
2220,
29898,
5327,
1125,
13,
4706,
8653,
268,
282,
2158,
29898,
5327,
29897,
13,
4706,
8653,
13,
4706,
8653,
3244,
353,
7882,
29889,
5628,
29918,
2909,
292,
29918,
3888,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
14035,
29922,
14035,
29918,
2220,
29897,
13,
13,
4706,
584,
3207,
6939,
740,
29901,
450,
6939,
740,
13,
9651,
363,
20489,
2009,
29889,
313,
25253,
29897,
13,
4706,
584,
3207,
938,
3143,
292,
29918,
333,
29901,
29871,
13,
4706,
584,
3207,
5785,
2313,
792,
29901,
29871,
13,
4706,
584,
3207,
851,
3440,
29901,
29871,
13,
4706,
584,
2457,
29901,
512,
1220,
5103,
29906,
29900,
29900,
29896,
29946,
13,
462,
960,
278,
1158,
338,
2000,
408,
9524,
5794,
29892,
13,
462,
3639,
278,
2009,
3244,
29889,
13,
4706,
9995,
13,
13,
4706,
599,
29918,
7529,
353,
6024,
2909,
292,
29918,
333,
742,
525,
2218,
2798,
742,
525,
9342,
2033,
13,
4706,
599,
29918,
7529,
29889,
4397,
877,
14035,
1495,
13,
4706,
599,
29918,
7529,
29889,
4397,
877,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
1495,
13,
13,
4706,
8636,
353,
1180,
1338,
580,
13,
4706,
363,
1820,
29892,
659,
297,
4256,
7076,
29898,
7529,
1839,
19290,
2033,
1125,
13,
9651,
565,
1820,
451,
297,
599,
29918,
7529,
29901,
13,
18884,
12020,
20948,
29898,
13,
462,
1678,
376,
29954,
327,
385,
15668,
13553,
2980,
14210,
29879,
11838,
13,
462,
1678,
376,
304,
1158,
3863,
29918,
2909,
292,
29918,
3888,
29908,
1273,
1820,
13,
18884,
1723,
13,
9651,
8636,
29961,
1989,
29962,
353,
659,
13,
4706,
628,
8636,
1839,
19290,
2033,
13,
13,
4706,
6503,
29918,
2084,
353,
8207,
2909,
292,
29914,
5628,
29899,
3888,
4286,
6506,
877,
29912,
4830,
29913,
742,
525,
3126,
1495,
13,
4706,
2224,
29918,
7529,
353,
6571,
13,
13,
4706,
2346,
29918,
7529,
353,
6571,
13,
4706,
565,
525,
2909,
292,
29918,
333,
29915,
297,
8636,
29901,
13,
9651,
2346,
29918,
7529,
1839,
2909,
292,
29918,
333,
2033,
353,
8636,
1839,
2909,
292,
29918,
333,
2033,
13,
4706,
565,
525,
2218,
2798,
29915,
297,
8636,
29901,
13,
9651,
2346,
29918,
7529,
1839,
2218,
2798,
2033,
353,
8636,
1839,
2218,
2798,
2033,
13,
4706,
565,
525,
9342,
29915,
297,
8636,
29901,
13,
9651,
2346,
29918,
7529,
1839,
9342,
2033,
353,
8636,
1839,
9342,
2033,
13,
13,
4706,
4839,
29918,
7529,
353,
6571,
13,
13,
4706,
883,
29918,
7529,
353,
5159,
13,
4706,
1887,
29918,
1707,
29918,
5325,
353,
6571,
13,
13,
4706,
3573,
29918,
7529,
353,
6213,
13,
13,
4706,
396,
7331,
4839,
421,
23965,
29952,
13,
4706,
4839,
29918,
7529,
1839,
23965,
2033,
353,
1583,
29889,
2754,
29918,
4645,
7790,
13,
9651,
1831,
29918,
6672,
29918,
16044,
18959,
6214,
29914,
3126,
11287,
13,
4706,
565,
451,
4839,
29918,
7529,
1839,
23965,
2033,
29901,
13,
9651,
628,
4839,
29918,
7529,
1839,
23965,
2033,
13,
13,
4706,
396,
7331,
4839,
421,
3916,
29899,
1542,
29952,
13,
4706,
4839,
29918,
7529,
1839,
3916,
29899,
1542,
2033,
353,
1583,
29889,
2754,
29918,
4645,
7790,
13,
9651,
1831,
29918,
6672,
29918,
3051,
29918,
1853,
18959,
6214,
29914,
3126,
11287,
13,
13,
4706,
396,
27241,
4444,
13,
4706,
4817,
29918,
11027,
353,
5159,
13,
13,
4706,
736,
1583,
29889,
2754,
29918,
4645,
29889,
4804,
29918,
2754,
29898,
10314,
29918,
2084,
29892,
525,
5438,
742,
13,
462,
462,
9651,
2224,
29918,
7529,
29892,
13,
462,
462,
9651,
2346,
29918,
7529,
29892,
13,
462,
462,
9651,
4839,
29918,
7529,
29892,
13,
462,
462,
9651,
3573,
29922,
2587,
29918,
7529,
29892,
13,
462,
462,
9651,
1400,
29918,
7529,
29922,
689,
29918,
7529,
29892,
13,
462,
462,
9651,
2066,
29922,
2997,
29918,
1707,
29918,
5325,
29892,
13,
462,
462,
9651,
2933,
29918,
1853,
2433,
797,
1220,
5103,
29906,
29900,
29900,
29896,
29946,
742,
13,
462,
462,
9651,
4817,
29918,
11027,
29922,
5150,
29918,
11027,
29892,
13,
462,
462,
9651,
6939,
29922,
7529,
29889,
657,
877,
14035,
5477,
13,
462,
462,
9651,
903,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
29922,
7529,
29889,
657,
877,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
8785,
13,
13,
1678,
822,
4175,
29918,
2909,
886,
29898,
1311,
29892,
3579,
19290,
1125,
13,
4706,
9995,
13,
4706,
3617,
599,
3143,
886,
9686,
263,
4175,
13,
308,
13,
13,
4706,
910,
1158,
3732,
263,
12231,
681,
7331,
2009,
491,
2322,
29889,
1763,
1207,
385,
13,
4706,
20489,
7331,
2009,
29892,
3113,
4529,
263,
421,
14035,
29952,
740,
13,
4706,
304,
367,
22336,
746,
13442,
278,
2933,
29889,
13,
4706,
8653,
822,
6939,
29918,
2220,
29898,
5327,
1125,
13,
4706,
8653,
268,
282,
2158,
29898,
5327,
29897,
13,
4706,
8653,
13,
4706,
8653,
3244,
353,
7882,
29889,
4572,
29918,
2909,
886,
29898,
14035,
29922,
14035,
29918,
2220,
29897,
13,
13,
4706,
584,
3207,
6939,
740,
29901,
450,
6939,
740,
13,
9651,
363,
20489,
2009,
29889,
313,
25253,
29897,
13,
4706,
584,
3207,
851,
3407,
29901,
29871,
13,
4706,
584,
3207,
2635,
2635,
29901,
29871,
13,
4706,
584,
3207,
851,
1833,
978,
29901,
29871,
13,
4706,
584,
2457,
29901,
512,
1220,
5103,
29906,
29900,
29900,
29896,
29941,
13,
462,
960,
278,
1158,
338,
2000,
408,
9524,
5794,
29892,
13,
462,
3639,
278,
2009,
3244,
29889,
13,
4706,
9995,
13,
4706,
9049,
5085,
1839,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
2033,
353,
5852,
13,
4706,
565,
9049,
5085,
29889,
657,
877,
14035,
29374,
13,
9651,
736,
1583,
29889,
4572,
29918,
2909,
886,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
1068,
19290,
29897,
13,
4706,
1683,
29901,
13,
9651,
313,
1272,
29897,
353,
1583,
29889,
4572,
29918,
2909,
886,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
1068,
19290,
29897,
13,
9651,
736,
848,
13,
13,
1678,
822,
4175,
29918,
2909,
886,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
1311,
29892,
3579,
19290,
1125,
13,
4706,
9995,
13,
4706,
3617,
599,
3143,
886,
9686,
263,
4175,
13,
308,
13,
13,
4706,
910,
1158,
3732,
263,
12231,
681,
7331,
2009,
491,
2322,
29889,
1763,
1207,
385,
13,
4706,
20489,
7331,
2009,
29892,
3113,
4529,
263,
421,
14035,
29952,
740,
13,
4706,
304,
367,
22336,
746,
13442,
278,
2933,
29889,
13,
4706,
8653,
822,
6939,
29918,
2220,
29898,
5327,
1125,
13,
4706,
8653,
268,
282,
2158,
29898,
5327,
29897,
13,
4706,
8653,
13,
4706,
8653,
3244,
353,
7882,
29889,
4572,
29918,
2909,
886,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
14035,
29922,
14035,
29918,
2220,
29897,
13,
13,
4706,
584,
3207,
6939,
740,
29901,
450,
6939,
740,
13,
9651,
363,
20489,
2009,
29889,
313,
25253,
29897,
13,
4706,
584,
3207,
851,
3407,
29901,
29871,
13,
4706,
584,
3207,
2635,
2635,
29901,
29871,
13,
4706,
584,
3207,
851,
1833,
978,
29901,
29871,
13,
4706,
584,
2457,
29901,
512,
1220,
5103,
29906,
29900,
29900,
29896,
29941,
13,
462,
960,
278,
1158,
338,
2000,
408,
9524,
5794,
29892,
13,
462,
3639,
278,
2009,
3244,
29889,
13,
4706,
9995,
13,
13,
4706,
599,
29918,
7529,
353,
6024,
5679,
742,
525,
1256,
742,
525,
4230,
978,
2033,
13,
4706,
599,
29918,
7529,
29889,
4397,
877,
14035,
1495,
13,
4706,
599,
29918,
7529,
29889,
4397,
877,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
1495,
13,
13,
4706,
8636,
353,
1180,
1338,
580,
13,
4706,
363,
1820,
29892,
659,
297,
4256,
7076,
29898,
7529,
1839,
19290,
2033,
1125,
13,
9651,
565,
1820,
451,
297,
599,
29918,
7529,
29901,
13,
18884,
12020,
20948,
29898,
13,
462,
1678,
376,
29954,
327,
385,
15668,
13553,
2980,
14210,
29879,
11838,
13,
462,
1678,
376,
304,
1158,
4175,
29918,
2909,
886,
29908,
1273,
1820,
13,
18884,
1723,
13,
9651,
8636,
29961,
1989,
29962,
353,
659,
13,
4706,
628,
8636,
1839,
19290,
2033,
13,
13,
4706,
6503,
29918,
2084,
353,
8207,
2909,
292,
29914,
4572,
4286,
6506,
877,
29912,
4830,
29913,
742,
525,
3126,
1495,
13,
4706,
2224,
29918,
7529,
353,
6571,
13,
13,
4706,
2346,
29918,
7529,
353,
6571,
13,
4706,
565,
525,
5679,
29915,
297,
8636,
29901,
13,
9651,
2346,
29918,
7529,
1839,
5679,
2033,
353,
8636,
1839,
5679,
2033,
13,
4706,
565,
525,
1256,
29915,
297,
8636,
29901,
13,
9651,
2346,
29918,
7529,
1839,
1256,
2033,
353,
8636,
1839,
1256,
2033,
13,
4706,
565,
525,
4230,
978,
29915,
297,
8636,
29901,
13,
9651,
2346,
29918,
7529,
1839,
4230,
978,
2033,
353,
8636,
1839,
4230,
978,
2033,
13,
13,
4706,
4839,
29918,
7529,
353,
6571,
13,
13,
4706,
883,
29918,
7529,
353,
5159,
13,
4706,
1887,
29918,
1707,
29918,
5325,
353,
6571,
13,
13,
4706,
3573,
29918,
7529,
353,
6213,
13,
13,
4706,
396,
7331,
4839,
421,
23965,
29952,
13,
4706,
4839,
29918,
7529,
1839,
23965,
2033,
353,
1583,
29889,
2754,
29918,
4645,
7790,
13,
9651,
1831,
29918,
6672,
29918,
16044,
18959,
6214,
29914,
3126,
11287,
13,
4706,
565,
451,
4839,
29918,
7529,
1839,
23965,
2033,
29901,
13,
9651,
628,
4839,
29918,
7529,
1839,
23965,
2033,
13,
13,
4706,
396,
7331,
4839,
421,
3916,
29899,
1542,
29952,
13,
4706,
4839,
29918,
7529,
1839,
3916,
29899,
1542,
2033,
353,
1583,
29889,
2754,
29918,
4645,
7790,
13,
9651,
1831,
29918,
6672,
29918,
3051,
29918,
1853,
18959,
6214,
29914,
3126,
11287,
13,
13,
4706,
396,
27241,
4444,
13,
4706,
4817,
29918,
11027,
353,
5159,
13,
13,
4706,
736,
1583,
29889,
2754,
29918,
4645,
29889,
4804,
29918,
2754,
29898,
10314,
29918,
2084,
29892,
525,
7194,
742,
13,
462,
462,
9651,
2224,
29918,
7529,
29892,
13,
462,
462,
9651,
2346,
29918,
7529,
29892,
13,
462,
462,
9651,
4839,
29918,
7529,
29892,
13,
462,
462,
9651,
3573,
29922,
2587,
29918,
7529,
29892,
13,
462,
462,
9651,
1400,
29918,
7529,
29922,
689,
29918,
7529,
29892,
13,
462,
462,
9651,
2066,
29922,
2997,
29918,
1707,
29918,
5325,
29892,
13,
462,
462,
9651,
2933,
29918,
1853,
2433,
797,
1220,
5103,
29906,
29900,
29900,
29896,
29941,
742,
13,
462,
462,
9651,
4817,
29918,
11027,
29922,
5150,
29918,
11027,
29892,
13,
462,
462,
9651,
6939,
29922,
7529,
29889,
657,
877,
14035,
5477,
13,
462,
462,
9651,
903,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
29922,
7529,
29889,
657,
877,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
8785,
13,
13,
1678,
822,
679,
29918,
497,
29918,
2909,
886,
29898,
1311,
29892,
3579,
19290,
1125,
13,
4706,
9995,
13,
4706,
4649,
29878,
2418,
599,
3143,
886,
13,
308,
13,
13,
4706,
910,
1158,
3732,
263,
12231,
681,
7331,
2009,
491,
2322,
29889,
1763,
1207,
385,
13,
4706,
20489,
7331,
2009,
29892,
3113,
4529,
263,
421,
14035,
29952,
740,
13,
4706,
304,
367,
22336,
746,
13442,
278,
2933,
29889,
13,
4706,
8653,
822,
6939,
29918,
2220,
29898,
5327,
1125,
13,
4706,
8653,
268,
282,
2158,
29898,
5327,
29897,
13,
4706,
8653,
13,
4706,
8653,
3244,
353,
7882,
29889,
657,
29918,
497,
29918,
2909,
886,
29898,
14035,
29922,
14035,
29918,
2220,
29897,
13,
13,
4706,
584,
3207,
6939,
740,
29901,
450,
6939,
740,
13,
9651,
363,
20489,
2009,
29889,
313,
25253,
29897,
13,
4706,
584,
2457,
29901,
1051,
29961,
10967,
292,
29962,
13,
462,
960,
278,
1158,
338,
2000,
408,
9524,
5794,
29892,
13,
462,
3639,
278,
2009,
3244,
29889,
13,
4706,
9995,
13,
4706,
9049,
5085,
1839,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
2033,
353,
5852,
13,
4706,
565,
9049,
5085,
29889,
657,
877,
14035,
29374,
13,
9651,
736,
1583,
29889,
657,
29918,
497,
29918,
2909,
886,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
1068,
19290,
29897,
13,
4706,
1683,
29901,
13,
9651,
313,
1272,
29897,
353,
1583,
29889,
657,
29918,
497,
29918,
2909,
886,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
1068,
19290,
29897,
13,
9651,
736,
848,
13,
13,
1678,
822,
679,
29918,
497,
29918,
2909,
886,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
1311,
29892,
3579,
19290,
1125,
13,
4706,
9995,
13,
4706,
4649,
29878,
2418,
599,
3143,
886,
13,
308,
13,
13,
4706,
910,
1158,
3732,
263,
12231,
681,
7331,
2009,
491,
2322,
29889,
1763,
1207,
385,
13,
4706,
20489,
7331,
2009,
29892,
3113,
4529,
263,
421,
14035,
29952,
740,
13,
4706,
304,
367,
22336,
746,
13442,
278,
2933,
29889,
13,
4706,
8653,
822,
6939,
29918,
2220,
29898,
5327,
1125,
13,
4706,
8653,
268,
282,
2158,
29898,
5327,
29897,
13,
4706,
8653,
13,
4706,
8653,
3244,
353,
7882,
29889,
657,
29918,
497,
29918,
2909,
886,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
14035,
29922,
14035,
29918,
2220,
29897,
13,
13,
4706,
584,
3207,
6939,
740,
29901,
450,
6939,
740,
13,
9651,
363,
20489,
2009,
29889,
313,
25253,
29897,
13,
4706,
584,
2457,
29901,
1051,
29961,
10967,
292,
29962,
13,
462,
960,
278,
1158,
338,
2000,
408,
9524,
5794,
29892,
13,
462,
3639,
278,
2009,
3244,
29889,
13,
4706,
9995,
13,
13,
4706,
599,
29918,
7529,
353,
5159,
13,
4706,
599,
29918,
7529,
29889,
4397,
877,
14035,
1495,
13,
4706,
599,
29918,
7529,
29889,
4397,
877,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
1495,
13,
13,
4706,
8636,
353,
1180,
1338,
580,
13,
4706,
363,
1820,
29892,
659,
297,
4256,
7076,
29898,
7529,
1839,
19290,
2033,
1125,
13,
9651,
565,
1820,
451,
297,
599,
29918,
7529,
29901,
13,
18884,
12020,
20948,
29898,
13,
462,
1678,
376,
29954,
327,
385,
15668,
13553,
2980,
14210,
29879,
11838,
13,
462,
1678,
376,
304,
1158,
679,
29918,
497,
29918,
2909,
886,
29908,
1273,
1820,
13,
18884,
1723,
13,
9651,
8636,
29961,
1989,
29962,
353,
659,
13,
4706,
628,
8636,
1839,
19290,
2033,
13,
13,
4706,
6503,
29918,
2084,
353,
8207,
2909,
292,
29914,
497,
4286,
6506,
877,
29912,
4830,
29913,
742,
525,
3126,
1495,
13,
4706,
2224,
29918,
7529,
353,
6571,
13,
13,
4706,
2346,
29918,
7529,
353,
6571,
13,
13,
4706,
4839,
29918,
7529,
353,
6571,
13,
13,
4706,
883,
29918,
7529,
353,
5159,
13,
4706,
1887,
29918,
1707,
29918,
5325,
353,
6571,
13,
13,
4706,
3573,
29918,
7529,
353,
6213,
13,
13,
4706,
396,
7331,
4839,
421,
23965,
29952,
13,
4706,
4839,
29918,
7529,
1839,
23965,
2033,
353,
1583,
29889,
2754,
29918,
4645,
7790,
13,
9651,
1831,
29918,
6672,
29918,
16044,
18959,
6214,
29914,
3126,
11287,
13,
4706,
565,
451,
4839,
29918,
7529,
1839,
23965,
2033,
29901,
13,
9651,
628,
4839,
29918,
7529,
1839,
23965,
2033,
13,
13,
4706,
396,
7331,
4839,
421,
3916,
29899,
1542,
29952,
13,
4706,
4839,
29918,
7529,
1839,
3916,
29899,
1542,
2033,
353,
1583,
29889,
2754,
29918,
4645,
7790,
13,
9651,
1831,
29918,
6672,
29918,
3051,
29918,
1853,
18959,
6214,
29914,
3126,
11287,
13,
13,
4706,
396,
27241,
4444,
13,
4706,
4817,
29918,
11027,
353,
5159,
13,
13,
4706,
736,
1583,
29889,
2754,
29918,
4645,
29889,
4804,
29918,
2754,
29898,
10314,
29918,
2084,
29892,
525,
7194,
742,
13,
462,
462,
9651,
2224,
29918,
7529,
29892,
13,
462,
462,
9651,
2346,
29918,
7529,
29892,
13,
462,
462,
9651,
4839,
29918,
7529,
29892,
13,
462,
462,
9651,
3573,
29922,
2587,
29918,
7529,
29892,
13,
462,
462,
9651,
1400,
29918,
7529,
29922,
689,
29918,
7529,
29892,
13,
462,
462,
9651,
2066,
29922,
2997,
29918,
1707,
29918,
5325,
29892,
13,
462,
462,
9651,
2933,
29918,
1853,
2433,
1761,
29961,
10967,
292,
29962,
742,
13,
462,
462,
9651,
4817,
29918,
11027,
29922,
5150,
29918,
11027,
29892,
13,
462,
462,
9651,
6939,
29922,
7529,
29889,
657,
877,
14035,
5477,
13,
462,
462,
9651,
903,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
29922,
7529,
29889,
657,
877,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
8785,
13,
13,
1678,
822,
679,
29918,
497,
29918,
2541,
29918,
509,
25936,
29918,
2909,
886,
29898,
1311,
29892,
3579,
19290,
1125,
13,
4706,
9995,
13,
4706,
4649,
29878,
2418,
599,
3143,
886,
3704,
738,
11132,
4733,
13,
308,
13,
13,
4706,
910,
1158,
3732,
263,
12231,
681,
7331,
2009,
491,
2322,
29889,
1763,
1207,
385,
13,
4706,
20489,
7331,
2009,
29892,
3113,
4529,
263,
421,
14035,
29952,
740,
13,
4706,
304,
367,
22336,
746,
13442,
278,
2933,
29889,
13,
4706,
8653,
822,
6939,
29918,
2220,
29898,
5327,
1125,
13,
4706,
8653,
268,
282,
2158,
29898,
5327,
29897,
13,
4706,
8653,
13,
4706,
8653,
3244,
353,
7882,
29889,
657,
29918,
497,
29918,
2541,
29918,
509,
25936,
29918,
2909,
886,
29898,
14035,
29922,
14035,
29918,
2220,
29897,
13,
13,
4706,
584,
3207,
6939,
740,
29901,
450,
6939,
740,
13,
9651,
363,
20489,
2009,
29889,
313,
25253,
29897,
13,
4706,
584,
2457,
29901,
1051,
29961,
10967,
292,
29962,
13,
462,
960,
278,
1158,
338,
2000,
408,
9524,
5794,
29892,
13,
462,
3639,
278,
2009,
3244,
29889,
13,
4706,
9995,
13,
4706,
9049,
5085,
1839,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
2033,
353,
5852,
13,
4706,
565,
9049,
5085,
29889,
657,
877,
14035,
29374,
13,
9651,
736,
1583,
29889,
657,
29918,
497,
29918,
2541,
29918,
509,
25936,
29918,
2909,
886,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
1068,
19290,
29897,
13,
4706,
1683,
29901,
13,
9651,
313,
1272,
29897,
353,
1583,
29889,
657,
29918,
497,
29918,
2541,
29918,
509,
25936,
29918,
2909,
886,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
1068,
19290,
29897,
13,
9651,
736,
848,
13,
13,
1678,
822,
679,
29918,
497,
29918,
2541,
29918,
509,
25936,
29918,
2909,
886,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
1311,
29892,
3579,
19290,
1125,
13,
4706,
9995,
13,
4706,
4649,
29878,
2418,
599,
3143,
886,
3704,
738,
11132,
4733,
13,
308,
13,
13,
4706,
910,
1158,
3732,
263,
12231,
681,
7331,
2009,
491,
2322,
29889,
1763,
1207,
385,
13,
4706,
20489,
7331,
2009,
29892,
3113,
4529,
263,
421,
14035,
29952,
740,
13,
4706,
304,
367,
22336,
746,
13442,
278,
2933,
29889,
13,
4706,
8653,
822,
6939,
29918,
2220,
29898,
5327,
1125,
13,
4706,
8653,
268,
282,
2158,
29898,
5327,
29897,
13,
4706,
8653,
13,
4706,
8653,
3244,
353,
7882,
29889,
657,
29918,
497,
29918,
2541,
29918,
509,
25936,
29918,
2909,
886,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
14035,
29922,
14035,
29918,
2220,
29897,
13,
13,
4706,
584,
3207,
6939,
740,
29901,
450,
6939,
740,
13,
9651,
363,
20489,
2009,
29889,
313,
25253,
29897,
13,
4706,
584,
2457,
29901,
1051,
29961,
10967,
292,
29962,
13,
462,
960,
278,
1158,
338,
2000,
408,
9524,
5794,
29892,
13,
462,
3639,
278,
2009,
3244,
29889,
13,
4706,
9995,
13,
13,
4706,
599,
29918,
7529,
353,
5159,
13,
4706,
599,
29918,
7529,
29889,
4397,
877,
14035,
1495,
13,
4706,
599,
29918,
7529,
29889,
4397,
877,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
1495,
13,
13,
4706,
8636,
353,
1180,
1338,
580,
13,
4706,
363,
1820,
29892,
659,
297,
4256,
7076,
29898,
7529,
1839,
19290,
2033,
1125,
13,
9651,
565,
1820,
451,
297,
599,
29918,
7529,
29901,
13,
18884,
12020,
20948,
29898,
13,
462,
1678,
376,
29954,
327,
385,
15668,
13553,
2980,
14210,
29879,
11838,
13,
462,
1678,
376,
304,
1158,
679,
29918,
497,
29918,
2541,
29918,
509,
25936,
29918,
2909,
886,
29908,
1273,
1820,
13,
18884,
1723,
13,
9651,
8636,
29961,
1989,
29962,
353,
659,
13,
4706,
628,
8636,
1839,
19290,
2033,
13,
13,
4706,
6503,
29918,
2084,
353,
8207,
2909,
292,
29914,
497,
29899,
2541,
29899,
509,
25936,
4286,
6506,
877,
29912,
4830,
29913,
742,
525,
3126,
1495,
13,
4706,
2224,
29918,
7529,
353,
6571,
13,
13,
4706,
2346,
29918,
7529,
353,
6571,
13,
13,
4706,
4839,
29918,
7529,
353,
6571,
13,
13,
4706,
883,
29918,
7529,
353,
5159,
13,
4706,
1887,
29918,
1707,
29918,
5325,
353,
6571,
13,
13,
4706,
3573,
29918,
7529,
353,
6213,
13,
13,
4706,
396,
7331,
4839,
421,
23965,
29952,
13,
4706,
4839,
29918,
7529,
1839,
23965,
2033,
353,
1583,
29889,
2754,
29918,
4645,
7790,
13,
9651,
1831,
29918,
6672,
29918,
16044,
18959,
6214,
29914,
3126,
11287,
13,
4706,
565,
451,
4839,
29918,
7529,
1839,
23965,
2033,
29901,
13,
9651,
628,
4839,
29918,
7529,
1839,
23965,
2033,
13,
13,
4706,
396,
7331,
4839,
421,
3916,
29899,
1542,
29952,
13,
4706,
4839,
29918,
7529,
1839,
3916,
29899,
1542,
2033,
353,
1583,
29889,
2754,
29918,
4645,
7790,
13,
9651,
1831,
29918,
6672,
29918,
3051,
29918,
1853,
18959,
6214,
29914,
3126,
11287,
13,
13,
4706,
396,
27241,
4444,
13,
4706,
4817,
29918,
11027,
353,
5159,
13,
13,
4706,
736,
1583,
29889,
2754,
29918,
4645,
29889,
4804,
29918,
2754,
29898,
10314,
29918,
2084,
29892,
525,
7194,
742,
13,
462,
462,
9651,
2224,
29918,
7529,
29892,
13,
462,
462,
9651,
2346,
29918,
7529,
29892,
13,
462,
462,
9651,
4839,
29918,
7529,
29892,
13,
462,
462,
9651,
3573,
29922,
2587,
29918,
7529,
29892,
13,
462,
462,
9651,
1400,
29918,
7529,
29922,
689,
29918,
7529,
29892,
13,
462,
462,
9651,
2066,
29922,
2997,
29918,
1707,
29918,
5325,
29892,
13,
462,
462,
9651,
2933,
29918,
1853,
2433,
1761,
29961,
10967,
292,
29962,
742,
13,
462,
462,
9651,
4817,
29918,
11027,
29922,
5150,
29918,
11027,
29892,
13,
462,
462,
9651,
6939,
29922,
7529,
29889,
657,
877,
14035,
5477,
13,
462,
462,
9651,
903,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
29922,
7529,
29889,
657,
877,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
8785,
13,
13,
1678,
822,
679,
29918,
2909,
292,
29898,
1311,
29892,
1178,
29892,
3579,
19290,
1125,
13,
4706,
9995,
13,
4706,
4649,
29878,
2418,
263,
3143,
292,
491,
3553,
13,
308,
13,
13,
4706,
910,
1158,
3732,
263,
12231,
681,
7331,
2009,
491,
2322,
29889,
1763,
1207,
385,
13,
4706,
20489,
7331,
2009,
29892,
3113,
4529,
263,
421,
14035,
29952,
740,
13,
4706,
304,
367,
22336,
746,
13442,
278,
2933,
29889,
13,
4706,
8653,
822,
6939,
29918,
2220,
29898,
5327,
1125,
13,
4706,
8653,
268,
282,
2158,
29898,
5327,
29897,
13,
4706,
8653,
13,
4706,
8653,
3244,
353,
7882,
29889,
657,
29918,
2909,
292,
29898,
333,
29892,
6939,
29922,
14035,
29918,
2220,
29897,
13,
13,
4706,
584,
3207,
6939,
740,
29901,
450,
6939,
740,
13,
9651,
363,
20489,
2009,
29889,
313,
25253,
29897,
13,
4706,
584,
3207,
938,
1178,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
2457,
29901,
512,
1220,
5103,
29906,
29900,
29900,
29955,
13,
462,
960,
278,
1158,
338,
2000,
408,
9524,
5794,
29892,
13,
462,
3639,
278,
2009,
3244,
29889,
13,
4706,
9995,
13,
4706,
9049,
5085,
1839,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
2033,
353,
5852,
13,
4706,
565,
9049,
5085,
29889,
657,
877,
14035,
29374,
13,
9651,
736,
1583,
29889,
657,
29918,
2909,
292,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
333,
29892,
3579,
19290,
29897,
13,
4706,
1683,
29901,
13,
9651,
313,
1272,
29897,
353,
1583,
29889,
657,
29918,
2909,
292,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
333,
29892,
3579,
19290,
29897,
13,
9651,
736,
848,
13,
13,
1678,
822,
679,
29918,
2909,
292,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
1311,
29892,
1178,
29892,
3579,
19290,
1125,
13,
4706,
9995,
13,
4706,
4649,
29878,
2418,
263,
3143,
292,
491,
3553,
13,
308,
13,
13,
4706,
910,
1158,
3732,
263,
12231,
681,
7331,
2009,
491,
2322,
29889,
1763,
1207,
385,
13,
4706,
20489,
7331,
2009,
29892,
3113,
4529,
263,
421,
14035,
29952,
740,
13,
4706,
304,
367,
22336,
746,
13442,
278,
2933,
29889,
13,
4706,
8653,
822,
6939,
29918,
2220,
29898,
5327,
1125,
13,
4706,
8653,
268,
282,
2158,
29898,
5327,
29897,
13,
4706,
8653,
13,
4706,
8653,
3244,
353,
7882,
29889,
657,
29918,
2909,
292,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
333,
29892,
6939,
29922,
14035,
29918,
2220,
29897,
13,
13,
4706,
584,
3207,
6939,
740,
29901,
450,
6939,
740,
13,
9651,
363,
20489,
2009,
29889,
313,
25253,
29897,
13,
4706,
584,
3207,
938,
1178,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
2457,
29901,
512,
1220,
5103,
29906,
29900,
29900,
29955,
13,
462,
960,
278,
1158,
338,
2000,
408,
9524,
5794,
29892,
13,
462,
3639,
278,
2009,
3244,
29889,
13,
4706,
9995,
13,
13,
4706,
599,
29918,
7529,
353,
6024,
333,
2033,
13,
4706,
599,
29918,
7529,
29889,
4397,
877,
14035,
1495,
13,
4706,
599,
29918,
7529,
29889,
4397,
877,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
1495,
13,
13,
4706,
8636,
353,
1180,
1338,
580,
13,
4706,
363,
1820,
29892,
659,
297,
4256,
7076,
29898,
7529,
1839,
19290,
2033,
1125,
13,
9651,
565,
1820,
451,
297,
599,
29918,
7529,
29901,
13,
18884,
12020,
20948,
29898,
13,
462,
1678,
376,
29954,
327,
385,
15668,
13553,
2980,
14210,
29879,
11838,
13,
462,
1678,
376,
304,
1158,
679,
29918,
2909,
292,
29908,
1273,
1820,
13,
18884,
1723,
13,
9651,
8636,
29961,
1989,
29962,
353,
659,
13,
4706,
628,
8636,
1839,
19290,
2033,
13,
4706,
396,
11539,
278,
3734,
3443,
525,
333,
29915,
338,
731,
13,
4706,
565,
6702,
333,
29915,
451,
297,
8636,
29897,
470,
313,
7529,
1839,
333,
2033,
338,
6213,
1125,
13,
9651,
12020,
7865,
2392,
703,
18552,
292,
278,
3734,
3443,
421,
333,
29952,
746,
5432,
421,
657,
29918,
2909,
292,
29952,
1159,
13,
13,
4706,
6503,
29918,
2084,
353,
8207,
2909,
292,
4286,
6506,
877,
29912,
4830,
29913,
742,
525,
3126,
1495,
13,
4706,
2224,
29918,
7529,
353,
6571,
13,
13,
4706,
2346,
29918,
7529,
353,
6571,
13,
4706,
565,
525,
333,
29915,
297,
8636,
29901,
13,
9651,
2346,
29918,
7529,
1839,
333,
2033,
353,
8636,
1839,
333,
2033,
13,
13,
4706,
4839,
29918,
7529,
353,
6571,
13,
13,
4706,
883,
29918,
7529,
353,
5159,
13,
4706,
1887,
29918,
1707,
29918,
5325,
353,
6571,
13,
13,
4706,
3573,
29918,
7529,
353,
6213,
13,
13,
4706,
396,
7331,
4839,
421,
23965,
29952,
13,
4706,
4839,
29918,
7529,
1839,
23965,
2033,
353,
1583,
29889,
2754,
29918,
4645,
7790,
13,
9651,
1831,
29918,
6672,
29918,
16044,
18959,
6214,
29914,
3126,
11287,
13,
4706,
565,
451,
4839,
29918,
7529,
1839,
23965,
2033,
29901,
13,
9651,
628,
4839,
29918,
7529,
1839,
23965,
2033,
13,
13,
4706,
396,
7331,
4839,
421,
3916,
29899,
1542,
29952,
13,
4706,
4839,
29918,
7529,
1839,
3916,
29899,
1542,
2033,
353,
1583,
29889,
2754,
29918,
4645,
7790,
13,
9651,
1831,
29918,
6672,
29918,
3051,
29918,
1853,
18959,
6214,
29914,
3126,
11287,
13,
13,
4706,
396,
27241,
4444,
13,
4706,
4817,
29918,
11027,
353,
5159,
13,
13,
4706,
736,
1583,
29889,
2754,
29918,
4645,
29889,
4804,
29918,
2754,
29898,
10314,
29918,
2084,
29892,
525,
7194,
742,
13,
462,
462,
9651,
2224,
29918,
7529,
29892,
13,
462,
462,
9651,
2346,
29918,
7529,
29892,
13,
462,
462,
9651,
4839,
29918,
7529,
29892,
13,
462,
462,
9651,
3573,
29922,
2587,
29918,
7529,
29892,
13,
462,
462,
9651,
1400,
29918,
7529,
29922,
689,
29918,
7529,
29892,
13,
462,
462,
9651,
2066,
29922,
2997,
29918,
1707,
29918,
5325,
29892,
13,
462,
462,
9651,
2933,
29918,
1853,
2433,
797,
1220,
5103,
29906,
29900,
29900,
29955,
742,
13,
462,
462,
9651,
4817,
29918,
11027,
29922,
5150,
29918,
11027,
29892,
13,
462,
462,
9651,
6939,
29922,
7529,
29889,
657,
877,
14035,
5477,
13,
462,
462,
9651,
903,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
29922,
7529,
29889,
657,
877,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
8785,
13,
13,
1678,
822,
679,
29918,
15539,
29918,
2909,
886,
29898,
1311,
29892,
11962,
29918,
333,
29892,
3579,
19290,
1125,
13,
4706,
9995,
13,
4706,
3617,
599,
3143,
886,
363,
263,
11962,
13,
308,
13,
13,
4706,
910,
1158,
3732,
263,
12231,
681,
7331,
2009,
491,
2322,
29889,
1763,
1207,
385,
13,
4706,
20489,
7331,
2009,
29892,
3113,
4529,
263,
421,
14035,
29952,
740,
13,
4706,
304,
367,
22336,
746,
13442,
278,
2933,
29889,
13,
4706,
8653,
822,
6939,
29918,
2220,
29898,
5327,
1125,
13,
4706,
8653,
268,
282,
2158,
29898,
5327,
29897,
13,
4706,
8653,
13,
4706,
8653,
3244,
353,
7882,
29889,
657,
29918,
15539,
29918,
2909,
886,
29898,
15539,
29918,
333,
29892,
6939,
29922,
14035,
29918,
2220,
29897,
13,
13,
4706,
584,
3207,
6939,
740,
29901,
450,
6939,
740,
13,
9651,
363,
20489,
2009,
29889,
313,
25253,
29897,
13,
4706,
584,
3207,
938,
11962,
29918,
333,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
2457,
29901,
512,
1220,
5103,
29906,
29900,
29900,
29896,
29941,
13,
462,
960,
278,
1158,
338,
2000,
408,
9524,
5794,
29892,
13,
462,
3639,
278,
2009,
3244,
29889,
13,
4706,
9995,
13,
4706,
9049,
5085,
1839,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
2033,
353,
5852,
13,
4706,
565,
9049,
5085,
29889,
657,
877,
14035,
29374,
13,
9651,
736,
1583,
29889,
657,
29918,
15539,
29918,
2909,
886,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
15539,
29918,
333,
29892,
3579,
19290,
29897,
13,
4706,
1683,
29901,
13,
9651,
313,
1272,
29897,
353,
1583,
29889,
657,
29918,
15539,
29918,
2909,
886,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
15539,
29918,
333,
29892,
3579,
19290,
29897,
13,
9651,
736,
848,
13,
13,
1678,
822,
679,
29918,
15539,
29918,
2909,
886,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
1311,
29892,
11962,
29918,
333,
29892,
3579,
19290,
1125,
13,
4706,
9995,
13,
4706,
3617,
599,
3143,
886,
363,
263,
11962,
13,
308,
13,
13,
4706,
910,
1158,
3732,
263,
12231,
681,
7331,
2009,
491,
2322,
29889,
1763,
1207,
385,
13,
4706,
20489,
7331,
2009,
29892,
3113,
4529,
263,
421,
14035,
29952,
740,
13,
4706,
304,
367,
22336,
746,
13442,
278,
2933,
29889,
13,
4706,
8653,
822,
6939,
29918,
2220,
29898,
5327,
1125,
13,
4706,
8653,
268,
282,
2158,
29898,
5327,
29897,
13,
4706,
8653,
13,
4706,
8653,
3244,
353,
7882,
29889,
657,
29918,
15539,
29918,
2909,
886,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
15539,
29918,
333,
29892,
6939,
29922,
14035,
29918,
2220,
29897,
13,
13,
4706,
584,
3207,
6939,
740,
29901,
450,
6939,
740,
13,
9651,
363,
20489,
2009,
29889,
313,
25253,
29897,
13,
4706,
584,
3207,
938,
11962,
29918,
333,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
2457,
29901,
512,
1220,
5103,
29906,
29900,
29900,
29896,
29941,
13,
462,
960,
278,
1158,
338,
2000,
408,
9524,
5794,
29892,
13,
462,
3639,
278,
2009,
3244,
29889,
13,
4706,
9995,
13,
13,
4706,
599,
29918,
7529,
353,
6024,
15539,
29918,
333,
2033,
13,
4706,
599,
29918,
7529,
29889,
4397,
877,
14035,
1495,
13,
4706,
599,
29918,
7529,
29889,
4397,
877,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
1495,
13,
13,
4706,
8636,
353,
1180,
1338,
580,
13,
4706,
363,
1820,
29892,
659,
297,
4256,
7076,
29898,
7529,
1839,
19290,
2033,
1125,
13,
9651,
565,
1820,
451,
297,
599,
29918,
7529,
29901,
13,
18884,
12020,
20948,
29898,
13,
462,
1678,
376,
29954,
327,
385,
15668,
13553,
2980,
14210,
29879,
11838,
13,
462,
1678,
376,
304,
1158,
679,
29918,
15539,
29918,
2909,
886,
29908,
1273,
1820,
13,
18884,
1723,
13,
9651,
8636,
29961,
1989,
29962,
353,
659,
13,
4706,
628,
8636,
1839,
19290,
2033,
13,
4706,
396,
11539,
278,
3734,
3443,
525,
15539,
29918,
333,
29915,
338,
731,
13,
4706,
565,
6702,
15539,
29918,
333,
29915,
451,
297,
8636,
29897,
470,
313,
7529,
1839,
15539,
29918,
333,
2033,
338,
6213,
1125,
13,
9651,
12020,
7865,
2392,
703,
18552,
292,
278,
3734,
3443,
421,
15539,
29918,
333,
29952,
746,
5432,
421,
657,
29918,
15539,
29918,
2909,
886,
29952,
1159,
13,
13,
4706,
6503,
29918,
2084,
353,
8207,
2909,
292,
29914,
15539,
4286,
6506,
877,
29912,
4830,
29913,
742,
525,
3126,
1495,
13,
4706,
2224,
29918,
7529,
353,
6571,
13,
13,
4706,
2346,
29918,
7529,
353,
6571,
13,
4706,
565,
525,
15539,
29918,
333,
29915,
297,
8636,
29901,
13,
9651,
2346,
29918,
7529,
1839,
15539,
29918,
333,
2033,
353,
8636,
1839,
15539,
29918,
333,
2033,
13,
13,
4706,
4839,
29918,
7529,
353,
6571,
13,
13,
4706,
883,
29918,
7529,
353,
5159,
13,
4706,
1887,
29918,
1707,
29918,
5325,
353,
6571,
13,
13,
4706,
3573,
29918,
7529,
353,
6213,
13,
13,
4706,
396,
7331,
4839,
421,
23965,
29952,
13,
4706,
4839,
29918,
7529,
1839,
23965,
2033,
353,
1583,
29889,
2754,
29918,
4645,
7790,
13,
9651,
1831,
29918,
6672,
29918,
16044,
18959,
6214,
29914,
3126,
11287,
13,
4706,
565,
451,
4839,
29918,
7529,
1839,
23965,
2033,
29901,
13,
9651,
628,
4839,
29918,
7529,
1839,
23965,
2033,
13,
13,
4706,
396,
7331,
4839,
421,
3916,
29899,
1542,
29952,
13,
4706,
4839,
29918,
7529,
1839,
3916,
29899,
1542,
2033,
353,
1583,
29889,
2754,
29918,
4645,
7790,
13,
9651,
1831,
29918,
6672,
29918,
3051,
29918,
1853,
18959,
6214,
29914,
3126,
11287,
13,
13,
4706,
396,
27241,
4444,
13,
4706,
4817,
29918,
11027,
353,
5159,
13,
13,
4706,
736,
1583,
29889,
2754,
29918,
4645,
29889,
4804,
29918,
2754,
29898,
10314,
29918,
2084,
29892,
525,
7194,
742,
13,
462,
462,
9651,
2224,
29918,
7529,
29892,
13,
462,
462,
9651,
2346,
29918,
7529,
29892,
13,
462,
462,
9651,
4839,
29918,
7529,
29892,
13,
462,
462,
9651,
3573,
29922,
2587,
29918,
7529,
29892,
13,
462,
462,
9651,
1400,
29918,
7529,
29922,
689,
29918,
7529,
29892,
13,
462,
462,
9651,
2066,
29922,
2997,
29918,
1707,
29918,
5325,
29892,
13,
462,
462,
9651,
2933,
29918,
1853,
2433,
797,
1220,
5103,
29906,
29900,
29900,
29896,
29941,
742,
13,
462,
462,
9651,
4817,
29918,
11027,
29922,
5150,
29918,
11027,
29892,
13,
462,
462,
9651,
6939,
29922,
7529,
29889,
657,
877,
14035,
5477,
13,
462,
462,
9651,
903,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
29922,
7529,
29889,
657,
877,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
8785,
13,
13,
1678,
822,
679,
29918,
10472,
1860,
29898,
1311,
29892,
3579,
19290,
1125,
13,
4706,
9995,
13,
4706,
4649,
29878,
2418,
599,
5146,
1860,
1754,
363,
263,
3143,
292,
13,
308,
13,
13,
4706,
910,
1158,
3732,
263,
12231,
681,
7331,
2009,
491,
2322,
29889,
1763,
1207,
385,
13,
4706,
20489,
7331,
2009,
29892,
3113,
4529,
263,
421,
14035,
29952,
740,
13,
4706,
304,
367,
22336,
746,
13442,
278,
2933,
29889,
13,
4706,
8653,
822,
6939,
29918,
2220,
29898,
5327,
1125,
13,
4706,
8653,
268,
282,
2158,
29898,
5327,
29897,
13,
4706,
8653,
13,
4706,
8653,
3244,
353,
7882,
29889,
657,
29918,
10472,
1860,
29898,
14035,
29922,
14035,
29918,
2220,
29897,
13,
13,
4706,
584,
3207,
6939,
740,
29901,
450,
6939,
740,
13,
9651,
363,
20489,
2009,
29889,
313,
25253,
29897,
13,
4706,
584,
3207,
938,
3143,
292,
29918,
333,
29901,
29871,
13,
4706,
584,
2457,
29901,
512,
1220,
5103,
29906,
29900,
29900,
29896,
29945,
13,
462,
960,
278,
1158,
338,
2000,
408,
9524,
5794,
29892,
13,
462,
3639,
278,
2009,
3244,
29889,
13,
4706,
9995,
13,
4706,
9049,
5085,
1839,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
2033,
353,
5852,
13,
4706,
565,
9049,
5085,
29889,
657,
877,
14035,
29374,
13,
9651,
736,
1583,
29889,
657,
29918,
10472,
1860,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
1068,
19290,
29897,
13,
4706,
1683,
29901,
13,
9651,
313,
1272,
29897,
353,
1583,
29889,
657,
29918,
10472,
1860,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
1068,
19290,
29897,
13,
9651,
736,
848,
13,
13,
1678,
822,
679,
29918,
10472,
1860,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
1311,
29892,
3579,
19290,
1125,
13,
4706,
9995,
13,
4706,
4649,
29878,
2418,
599,
5146,
1860,
1754,
363,
263,
3143,
292,
13,
308,
13,
13,
4706,
910,
1158,
3732,
263,
12231,
681,
7331,
2009,
491,
2322,
29889,
1763,
1207,
385,
13,
4706,
20489,
7331,
2009,
29892,
3113,
4529,
263,
421,
14035,
29952,
740,
13,
4706,
304,
367,
22336,
746,
13442,
278,
2933,
29889,
13,
4706,
8653,
822,
6939,
29918,
2220,
29898,
5327,
1125,
13,
4706,
8653,
268,
282,
2158,
29898,
5327,
29897,
13,
4706,
8653,
13,
4706,
8653,
3244,
353,
7882,
29889,
657,
29918,
10472,
1860,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
14035,
29922,
14035,
29918,
2220,
29897,
13,
13,
4706,
584,
3207,
6939,
740,
29901,
450,
6939,
740,
13,
9651,
363,
20489,
2009,
29889,
313,
25253,
29897,
13,
4706,
584,
3207,
938,
3143,
292,
29918,
333,
29901,
29871,
13,
4706,
584,
2457,
29901,
512,
1220,
5103,
29906,
29900,
29900,
29896,
29945,
13,
462,
960,
278,
1158,
338,
2000,
408,
9524,
5794,
29892,
13,
462,
3639,
278,
2009,
3244,
29889,
13,
4706,
9995,
13,
13,
4706,
599,
29918,
7529,
353,
6024,
2909,
292,
29918,
333,
2033,
13,
4706,
599,
29918,
7529,
29889,
4397,
877,
14035,
1495,
13,
4706,
599,
29918,
7529,
29889,
4397,
877,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
1495,
13,
13,
4706,
8636,
353,
1180,
1338,
580,
13,
4706,
363,
1820,
29892,
659,
297,
4256,
7076,
29898,
7529,
1839,
19290,
2033,
1125,
13,
9651,
565,
1820,
451,
297,
599,
29918,
7529,
29901,
13,
18884,
12020,
20948,
29898,
13,
462,
1678,
376,
29954,
327,
385,
15668,
13553,
2980,
14210,
29879,
11838,
13,
462,
1678,
376,
304,
1158,
679,
29918,
10472,
1860,
29908,
1273,
1820,
13,
18884,
1723,
13,
9651,
8636,
29961,
1989,
29962,
353,
659,
13,
4706,
628,
8636,
1839,
19290,
2033,
13,
13,
4706,
6503,
29918,
2084,
353,
8207,
2909,
292,
29914,
10472,
1860,
4286,
6506,
877,
29912,
4830,
29913,
742,
525,
3126,
1495,
13,
4706,
2224,
29918,
7529,
353,
6571,
13,
13,
4706,
2346,
29918,
7529,
353,
6571,
13,
4706,
565,
525,
2909,
292,
29918,
333,
29915,
297,
8636,
29901,
13,
9651,
2346,
29918,
7529,
1839,
2909,
292,
29918,
333,
2033,
353,
8636,
1839,
2909,
292,
29918,
333,
2033,
13,
13,
4706,
4839,
29918,
7529,
353,
6571,
13,
13,
4706,
883,
29918,
7529,
353,
5159,
13,
4706,
1887,
29918,
1707,
29918,
5325,
353,
6571,
13,
13,
4706,
3573,
29918,
7529,
353,
6213,
13,
13,
4706,
396,
7331,
4839,
421,
23965,
29952,
13,
4706,
4839,
29918,
7529,
1839,
23965,
2033,
353,
1583,
29889,
2754,
29918,
4645,
7790,
13,
9651,
1831,
29918,
6672,
29918,
16044,
18959,
6214,
29914,
3126,
11287,
13,
4706,
565,
451,
4839,
29918,
7529,
1839,
23965,
2033,
29901,
13,
9651,
628,
4839,
29918,
7529,
1839,
23965,
2033,
13,
13,
4706,
396,
7331,
4839,
421,
3916,
29899,
1542,
29952,
13,
4706,
4839,
29918,
7529,
1839,
3916,
29899,
1542,
2033,
353,
1583,
29889,
2754,
29918,
4645,
7790,
13,
9651,
1831,
29918,
6672,
29918,
3051,
29918,
1853,
18959,
6214,
29914,
3126,
11287,
13,
13,
4706,
396,
27241,
4444,
13,
4706,
4817,
29918,
11027,
353,
5159,
13,
13,
4706,
736,
1583,
29889,
2754,
29918,
4645,
29889,
4804,
29918,
2754,
29898,
10314,
29918,
2084,
29892,
525,
7194,
742,
13,
462,
462,
9651,
2224,
29918,
7529,
29892,
13,
462,
462,
9651,
2346,
29918,
7529,
29892,
13,
462,
462,
9651,
4839,
29918,
7529,
29892,
13,
462,
462,
9651,
3573,
29922,
2587,
29918,
7529,
29892,
13,
462,
462,
9651,
1400,
29918,
7529,
29922,
689,
29918,
7529,
29892,
13,
462,
462,
9651,
2066,
29922,
2997,
29918,
1707,
29918,
5325,
29892,
13,
462,
462,
9651,
2933,
29918,
1853,
2433,
797,
1220,
5103,
29906,
29900,
29900,
29896,
29945,
742,
13,
462,
462,
9651,
4817,
29918,
11027,
29922,
5150,
29918,
11027,
29892,
13,
462,
462,
9651,
6939,
29922,
7529,
29889,
657,
877,
14035,
5477,
13,
462,
462,
9651,
903,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
29922,
7529,
29889,
657,
877,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
8785,
13,
13,
1678,
822,
679,
29918,
999,
870,
29879,
29898,
1311,
29892,
3579,
19290,
1125,
13,
4706,
9995,
13,
4706,
4649,
29878,
2418,
599,
2143,
870,
29879,
363,
263,
3143,
292,
13,
308,
13,
13,
4706,
910,
1158,
3732,
263,
12231,
681,
7331,
2009,
491,
2322,
29889,
1763,
1207,
385,
13,
4706,
20489,
7331,
2009,
29892,
3113,
4529,
263,
421,
14035,
29952,
740,
13,
4706,
304,
367,
22336,
746,
13442,
278,
2933,
29889,
13,
4706,
8653,
822,
6939,
29918,
2220,
29898,
5327,
1125,
13,
4706,
8653,
268,
282,
2158,
29898,
5327,
29897,
13,
4706,
8653,
13,
4706,
8653,
3244,
353,
7882,
29889,
657,
29918,
999,
870,
29879,
29898,
14035,
29922,
14035,
29918,
2220,
29897,
13,
13,
4706,
584,
3207,
6939,
740,
29901,
450,
6939,
740,
13,
9651,
363,
20489,
2009,
29889,
313,
25253,
29897,
13,
4706,
584,
3207,
938,
3143,
292,
29918,
333,
29901,
29871,
13,
4706,
584,
2457,
29901,
512,
1220,
5103,
29906,
29900,
29900,
29896,
29953,
13,
462,
960,
278,
1158,
338,
2000,
408,
9524,
5794,
29892,
13,
462,
3639,
278,
2009,
3244,
29889,
13,
4706,
9995,
13,
4706,
9049,
5085,
1839,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
2033,
353,
5852,
13,
4706,
565,
9049,
5085,
29889,
657,
877,
14035,
29374,
13,
9651,
736,
1583,
29889,
657,
29918,
999,
870,
29879,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
1068,
19290,
29897,
13,
4706,
1683,
29901,
13,
9651,
313,
1272,
29897,
353,
1583,
29889,
657,
29918,
999,
870,
29879,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
1068,
19290,
29897,
13,
9651,
736,
848,
13,
13,
1678,
822,
679,
29918,
999,
870,
29879,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
1311,
29892,
3579,
19290,
1125,
13,
4706,
9995,
13,
4706,
4649,
29878,
2418,
599,
2143,
870,
29879,
363,
263,
3143,
292,
13,
308,
13,
13,
4706,
910,
1158,
3732,
263,
12231,
681,
7331,
2009,
491,
2322,
29889,
1763,
1207,
385,
13,
4706,
20489,
7331,
2009,
29892,
3113,
4529,
263,
421,
14035,
29952,
740,
13,
4706,
304,
367,
22336,
746,
13442,
278,
2933,
29889,
13,
4706,
8653,
822,
6939,
29918,
2220,
29898,
5327,
1125,
13,
4706,
8653,
268,
282,
2158,
29898,
5327,
29897,
13,
4706,
8653,
13,
4706,
8653,
3244,
353,
7882,
29889,
657,
29918,
999,
870,
29879,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
14035,
29922,
14035,
29918,
2220,
29897,
13,
13,
4706,
584,
3207,
6939,
740,
29901,
450,
6939,
740,
13,
9651,
363,
20489,
2009,
29889,
313,
25253,
29897,
13,
4706,
584,
3207,
938,
3143,
292,
29918,
333,
29901,
29871,
13,
4706,
584,
2457,
29901,
512,
1220,
5103,
29906,
29900,
29900,
29896,
29953,
13,
462,
960,
278,
1158,
338,
2000,
408,
9524,
5794,
29892,
13,
462,
3639,
278,
2009,
3244,
29889,
13,
4706,
9995,
13,
13,
4706,
599,
29918,
7529,
353,
6024,
2909,
292,
29918,
333,
2033,
13,
4706,
599,
29918,
7529,
29889,
4397,
877,
14035,
1495,
13,
4706,
599,
29918,
7529,
29889,
4397,
877,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
1495,
13,
13,
4706,
8636,
353,
1180,
1338,
580,
13,
4706,
363,
1820,
29892,
659,
297,
4256,
7076,
29898,
7529,
1839,
19290,
2033,
1125,
13,
9651,
565,
1820,
451,
297,
599,
29918,
7529,
29901,
13,
18884,
12020,
20948,
29898,
13,
462,
1678,
376,
29954,
327,
385,
15668,
13553,
2980,
14210,
29879,
11838,
13,
462,
1678,
376,
304,
1158,
679,
29918,
999,
870,
29879,
29908,
1273,
1820,
13,
18884,
1723,
13,
9651,
8636,
29961,
1989,
29962,
353,
659,
13,
4706,
628,
8636,
1839,
19290,
2033,
13,
13,
4706,
6503,
29918,
2084,
353,
8207,
2909,
292,
29914,
999,
870,
29879,
4286,
6506,
877,
29912,
4830,
29913,
742,
525,
3126,
1495,
13,
4706,
2224,
29918,
7529,
353,
6571,
13,
13,
4706,
2346,
29918,
7529,
353,
6571,
13,
4706,
565,
525,
2909,
292,
29918,
333,
29915,
297,
8636,
29901,
13,
9651,
2346,
29918,
7529,
1839,
2909,
292,
29918,
333,
2033,
353,
8636,
1839,
2909,
292,
29918,
333,
2033,
13,
13,
4706,
4839,
29918,
7529,
353,
6571,
13,
13,
4706,
883,
29918,
7529,
353,
5159,
13,
4706,
1887,
29918,
1707,
29918,
5325,
353,
6571,
13,
13,
4706,
3573,
29918,
7529,
353,
6213,
13,
13,
4706,
396,
7331,
4839,
421,
23965,
29952,
13,
4706,
4839,
29918,
7529,
1839,
23965,
2033,
353,
1583,
29889,
2754,
29918,
4645,
7790,
13,
9651,
1831,
29918,
6672,
29918,
16044,
18959,
6214,
29914,
3126,
11287,
13,
4706,
565,
451,
4839,
29918,
7529,
1839,
23965,
2033,
29901,
13,
9651,
628,
4839,
29918,
7529,
1839,
23965,
2033,
13,
13,
4706,
396,
7331,
4839,
421,
3916,
29899,
1542,
29952,
13,
4706,
4839,
29918,
7529,
1839,
3916,
29899,
1542,
2033,
353,
1583,
29889,
2754,
29918,
4645,
7790,
13,
9651,
1831,
29918,
6672,
29918,
3051,
29918,
1853,
18959,
6214,
29914,
3126,
11287,
13,
13,
4706,
396,
27241,
4444,
13,
4706,
4817,
29918,
11027,
353,
5159,
13,
13,
4706,
736,
1583,
29889,
2754,
29918,
4645,
29889,
4804,
29918,
2754,
29898,
10314,
29918,
2084,
29892,
525,
7194,
742,
13,
462,
462,
9651,
2224,
29918,
7529,
29892,
13,
462,
462,
9651,
2346,
29918,
7529,
29892,
13,
462,
462,
9651,
4839,
29918,
7529,
29892,
13,
462,
462,
9651,
3573,
29922,
2587,
29918,
7529,
29892,
13,
462,
462,
9651,
1400,
29918,
7529,
29922,
689,
29918,
7529,
29892,
13,
462,
462,
9651,
2066,
29922,
2997,
29918,
1707,
29918,
5325,
29892,
13,
462,
462,
9651,
2933,
29918,
1853,
2433,
797,
1220,
5103,
29906,
29900,
29900,
29896,
29953,
742,
13,
462,
462,
9651,
4817,
29918,
11027,
29922,
5150,
29918,
11027,
29892,
13,
462,
462,
9651,
6939,
29922,
7529,
29889,
657,
877,
14035,
5477,
13,
462,
462,
9651,
903,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
29922,
7529,
29889,
657,
877,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
8785,
13,
13,
1678,
822,
679,
29918,
20034,
1036,
29918,
2909,
886,
29898,
1311,
29892,
3579,
19290,
1125,
13,
4706,
9995,
13,
4706,
3617,
599,
3143,
886,
1754,
9826,
13,
308,
13,
13,
4706,
910,
1158,
3732,
263,
12231,
681,
7331,
2009,
491,
2322,
29889,
1763,
1207,
385,
13,
4706,
20489,
7331,
2009,
29892,
3113,
4529,
263,
421,
14035,
29952,
740,
13,
4706,
304,
367,
22336,
746,
13442,
278,
2933,
29889,
13,
4706,
8653,
822,
6939,
29918,
2220,
29898,
5327,
1125,
13,
4706,
8653,
268,
282,
2158,
29898,
5327,
29897,
13,
4706,
8653,
13,
4706,
8653,
3244,
353,
7882,
29889,
657,
29918,
20034,
1036,
29918,
2909,
886,
29898,
14035,
29922,
14035,
29918,
2220,
29897,
13,
13,
4706,
584,
3207,
6939,
740,
29901,
450,
6939,
740,
13,
9651,
363,
20489,
2009,
29889,
313,
25253,
29897,
13,
4706,
584,
2457,
29901,
512,
1220,
5103,
29906,
29900,
29900,
29896,
29941,
13,
462,
960,
278,
1158,
338,
2000,
408,
9524,
5794,
29892,
13,
462,
3639,
278,
2009,
3244,
29889,
13,
4706,
9995,
13,
4706,
9049,
5085,
1839,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
2033,
353,
5852,
13,
4706,
565,
9049,
5085,
29889,
657,
877,
14035,
29374,
13,
9651,
736,
1583,
29889,
657,
29918,
20034,
1036,
29918,
2909,
886,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
1068,
19290,
29897,
13,
4706,
1683,
29901,
13,
9651,
313,
1272,
29897,
353,
1583,
29889,
657,
29918,
20034,
1036,
29918,
2909,
886,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
1068,
19290,
29897,
13,
9651,
736,
848,
13,
13,
1678,
822,
679,
29918,
20034,
1036,
29918,
2909,
886,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
1311,
29892,
3579,
19290,
1125,
13,
4706,
9995,
13,
4706,
3617,
599,
3143,
886,
1754,
9826,
13,
308,
13,
13,
4706,
910,
1158,
3732,
263,
12231,
681,
7331,
2009,
491,
2322,
29889,
1763,
1207,
385,
13,
4706,
20489,
7331,
2009,
29892,
3113,
4529,
263,
421,
14035,
29952,
740,
13,
4706,
304,
367,
22336,
746,
13442,
278,
2933,
29889,
13,
4706,
8653,
822,
6939,
29918,
2220,
29898,
5327,
1125,
13,
4706,
8653,
268,
282,
2158,
29898,
5327,
29897,
13,
4706,
8653,
13,
4706,
8653,
3244,
353,
7882,
29889,
657,
29918,
20034,
1036,
29918,
2909,
886,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
14035,
29922,
14035,
29918,
2220,
29897,
13,
13,
4706,
584,
3207,
6939,
740,
29901,
450,
6939,
740,
13,
9651,
363,
20489,
2009,
29889,
313,
25253,
29897,
13,
4706,
584,
2457,
29901,
512,
1220,
5103,
29906,
29900,
29900,
29896,
29941,
13,
462,
960,
278,
1158,
338,
2000,
408,
9524,
5794,
29892,
13,
462,
3639,
278,
2009,
3244,
29889,
13,
4706,
9995,
13,
13,
4706,
599,
29918,
7529,
353,
5159,
13,
4706,
599,
29918,
7529,
29889,
4397,
877,
14035,
1495,
13,
4706,
599,
29918,
7529,
29889,
4397,
877,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
1495,
13,
13,
4706,
8636,
353,
1180,
1338,
580,
13,
4706,
363,
1820,
29892,
659,
297,
4256,
7076,
29898,
7529,
1839,
19290,
2033,
1125,
13,
9651,
565,
1820,
451,
297,
599,
29918,
7529,
29901,
13,
18884,
12020,
20948,
29898,
13,
462,
1678,
376,
29954,
327,
385,
15668,
13553,
2980,
14210,
29879,
11838,
13,
462,
1678,
376,
304,
1158,
679,
29918,
20034,
1036,
29918,
2909,
886,
29908,
1273,
1820,
13,
18884,
1723,
13,
9651,
8636,
29961,
1989,
29962,
353,
659,
13,
4706,
628,
8636,
1839,
19290,
2033,
13,
13,
4706,
6503,
29918,
2084,
353,
8207,
2909,
292,
29914,
27765,
4286,
6506,
877,
29912,
4830,
29913,
742,
525,
3126,
1495,
13,
4706,
2224,
29918,
7529,
353,
6571,
13,
13,
4706,
2346,
29918,
7529,
353,
6571,
13,
13,
4706,
4839,
29918,
7529,
353,
6571,
13,
13,
4706,
883,
29918,
7529,
353,
5159,
13,
4706,
1887,
29918,
1707,
29918,
5325,
353,
6571,
13,
13,
4706,
3573,
29918,
7529,
353,
6213,
13,
13,
4706,
396,
7331,
4839,
421,
23965,
29952,
13,
4706,
4839,
29918,
7529,
1839,
23965,
2033,
353,
1583,
29889,
2754,
29918,
4645,
7790,
13,
9651,
1831,
29918,
6672,
29918,
16044,
18959,
6214,
29914,
3126,
11287,
13,
4706,
565,
451,
4839,
29918,
7529,
1839,
23965,
2033,
29901,
13,
9651,
628,
4839,
29918,
7529,
1839,
23965,
2033,
13,
13,
4706,
396,
7331,
4839,
421,
3916,
29899,
1542,
29952,
13,
4706,
4839,
29918,
7529,
1839,
3916,
29899,
1542,
2033,
353,
1583,
29889,
2754,
29918,
4645,
7790,
13,
9651,
1831,
29918,
6672,
29918,
3051,
29918,
1853,
18959,
6214,
29914,
3126,
11287,
13,
13,
4706,
396,
27241,
4444,
13,
4706,
4817,
29918,
11027,
353,
5159,
13,
13,
4706,
736,
1583,
29889,
2754,
29918,
4645,
29889,
4804,
29918,
2754,
29898,
10314,
29918,
2084,
29892,
525,
7194,
742,
13,
462,
462,
9651,
2224,
29918,
7529,
29892,
13,
462,
462,
9651,
2346,
29918,
7529,
29892,
13,
462,
462,
9651,
4839,
29918,
7529,
29892,
13,
462,
462,
9651,
3573,
29922,
2587,
29918,
7529,
29892,
13,
462,
462,
9651,
1400,
29918,
7529,
29922,
689,
29918,
7529,
29892,
13,
462,
462,
9651,
2066,
29922,
2997,
29918,
1707,
29918,
5325,
29892,
13,
462,
462,
9651,
2933,
29918,
1853,
2433,
797,
1220,
5103,
29906,
29900,
29900,
29896,
29941,
742,
13,
462,
462,
9651,
4817,
29918,
11027,
29922,
5150,
29918,
11027,
29892,
13,
462,
462,
9651,
6939,
29922,
7529,
29889,
657,
877,
14035,
5477,
13,
462,
462,
9651,
903,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
29922,
7529,
29889,
657,
877,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
8785,
13,
13,
1678,
822,
679,
29918,
29873,
3011,
272,
1242,
29918,
2909,
886,
29898,
1311,
29892,
3579,
19290,
1125,
13,
4706,
9995,
13,
4706,
3617,
599,
3143,
886,
1754,
9826,
13,
308,
13,
13,
4706,
910,
1158,
3732,
263,
12231,
681,
7331,
2009,
491,
2322,
29889,
1763,
1207,
385,
13,
4706,
20489,
7331,
2009,
29892,
3113,
4529,
263,
421,
14035,
29952,
740,
13,
4706,
304,
367,
22336,
746,
13442,
278,
2933,
29889,
13,
4706,
8653,
822,
6939,
29918,
2220,
29898,
5327,
1125,
13,
4706,
8653,
268,
282,
2158,
29898,
5327,
29897,
13,
4706,
8653,
13,
4706,
8653,
3244,
353,
7882,
29889,
657,
29918,
29873,
3011,
272,
1242,
29918,
2909,
886,
29898,
14035,
29922,
14035,
29918,
2220,
29897,
13,
13,
4706,
584,
3207,
6939,
740,
29901,
450,
6939,
740,
13,
9651,
363,
20489,
2009,
29889,
313,
25253,
29897,
13,
4706,
584,
2457,
29901,
512,
1220,
5103,
29906,
29900,
29900,
29896,
29941,
13,
462,
960,
278,
1158,
338,
2000,
408,
9524,
5794,
29892,
13,
462,
3639,
278,
2009,
3244,
29889,
13,
4706,
9995,
13,
4706,
9049,
5085,
1839,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
2033,
353,
5852,
13,
4706,
565,
9049,
5085,
29889,
657,
877,
14035,
29374,
13,
9651,
736,
1583,
29889,
657,
29918,
29873,
3011,
272,
1242,
29918,
2909,
886,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
1068,
19290,
29897,
13,
4706,
1683,
29901,
13,
9651,
313,
1272,
29897,
353,
1583,
29889,
657,
29918,
29873,
3011,
272,
1242,
29918,
2909,
886,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
1068,
19290,
29897,
13,
9651,
736,
848,
13,
13,
1678,
822,
679,
29918,
29873,
3011,
272,
1242,
29918,
2909,
886,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
1311,
29892,
3579,
19290,
1125,
13,
4706,
9995,
13,
4706,
3617,
599,
3143,
886,
1754,
9826,
13,
308,
13,
13,
4706,
910,
1158,
3732,
263,
12231,
681,
7331,
2009,
491,
2322,
29889,
1763,
1207,
385,
13,
4706,
20489,
7331,
2009,
29892,
3113,
4529,
263,
421,
14035,
29952,
740,
13,
4706,
304,
367,
22336,
746,
13442,
278,
2933,
29889,
13,
4706,
8653,
822,
6939,
29918,
2220,
29898,
5327,
1125,
13,
4706,
8653,
268,
282,
2158,
29898,
5327,
29897,
13,
4706,
8653,
13,
4706,
8653,
3244,
353,
7882,
29889,
657,
29918,
29873,
3011,
272,
1242,
29918,
2909,
886,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
14035,
29922,
14035,
29918,
2220,
29897,
13,
13,
4706,
584,
3207,
6939,
740,
29901,
450,
6939,
740,
13,
9651,
363,
20489,
2009,
29889,
313,
25253,
29897,
13,
4706,
584,
2457,
29901,
512,
1220,
5103,
29906,
29900,
29900,
29896,
29941,
13,
462,
960,
278,
1158,
338,
2000,
408,
9524,
5794,
29892,
13,
462,
3639,
278,
2009,
3244,
29889,
13,
4706,
9995,
13,
13,
4706,
599,
29918,
7529,
353,
5159,
13,
4706,
599,
29918,
7529,
29889,
4397,
877,
14035,
1495,
13,
4706,
599,
29918,
7529,
29889,
4397,
877,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
1495,
13,
13,
4706,
8636,
353,
1180,
1338,
580,
13,
4706,
363,
1820,
29892,
659,
297,
4256,
7076,
29898,
7529,
1839,
19290,
2033,
1125,
13,
9651,
565,
1820,
451,
297,
599,
29918,
7529,
29901,
13,
18884,
12020,
20948,
29898,
13,
462,
1678,
376,
29954,
327,
385,
15668,
13553,
2980,
14210,
29879,
11838,
13,
462,
1678,
376,
304,
1158,
679,
29918,
29873,
3011,
272,
1242,
29918,
2909,
886,
29908,
1273,
1820,
13,
18884,
1723,
13,
9651,
8636,
29961,
1989,
29962,
353,
659,
13,
4706,
628,
8636,
1839,
19290,
2033,
13,
13,
4706,
6503,
29918,
2084,
353,
8207,
2909,
292,
29914,
29873,
3011,
272,
340,
4286,
6506,
877,
29912,
4830,
29913,
742,
525,
3126,
1495,
13,
4706,
2224,
29918,
7529,
353,
6571,
13,
13,
4706,
2346,
29918,
7529,
353,
6571,
13,
13,
4706,
4839,
29918,
7529,
353,
6571,
13,
13,
4706,
883,
29918,
7529,
353,
5159,
13,
4706,
1887,
29918,
1707,
29918,
5325,
353,
6571,
13,
13,
4706,
3573,
29918,
7529,
353,
6213,
13,
13,
4706,
396,
7331,
4839,
421,
23965,
29952,
13,
4706,
4839,
29918,
7529,
1839,
23965,
2033,
353,
1583,
29889,
2754,
29918,
4645,
7790,
13,
9651,
1831,
29918,
6672,
29918,
16044,
18959,
6214,
29914,
3126,
11287,
13,
4706,
565,
451,
4839,
29918,
7529,
1839,
23965,
2033,
29901,
13,
9651,
628,
4839,
29918,
7529,
1839,
23965,
2033,
13,
13,
4706,
396,
7331,
4839,
421,
3916,
29899,
1542,
29952,
13,
4706,
4839,
29918,
7529,
1839,
3916,
29899,
1542,
2033,
353,
1583,
29889,
2754,
29918,
4645,
7790,
13,
9651,
1831,
29918,
6672,
29918,
3051,
29918,
1853,
18959,
6214,
29914,
3126,
11287,
13,
13,
4706,
396,
27241,
4444,
13,
4706,
4817,
29918,
11027,
353,
5159,
13,
13,
4706,
736,
1583,
29889,
2754,
29918,
4645,
29889,
4804,
29918,
2754,
29898,
10314,
29918,
2084,
29892,
525,
7194,
742,
13,
462,
462,
9651,
2224,
29918,
7529,
29892,
13,
462,
462,
9651,
2346,
29918,
7529,
29892,
13,
462,
462,
9651,
4839,
29918,
7529,
29892,
13,
462,
462,
9651,
3573,
29922,
2587,
29918,
7529,
29892,
13,
462,
462,
9651,
1400,
29918,
7529,
29922,
689,
29918,
7529,
29892,
13,
462,
462,
9651,
2066,
29922,
2997,
29918,
1707,
29918,
5325,
29892,
13,
462,
462,
9651,
2933,
29918,
1853,
2433,
797,
1220,
5103,
29906,
29900,
29900,
29896,
29941,
742,
13,
462,
462,
9651,
4817,
29918,
11027,
29922,
5150,
29918,
11027,
29892,
13,
462,
462,
9651,
6939,
29922,
7529,
29889,
657,
877,
14035,
5477,
13,
462,
462,
9651,
903,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
29922,
7529,
29889,
657,
877,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
8785,
13,
13,
1678,
822,
2069,
29918,
2909,
292,
29898,
1311,
29892,
2752,
29892,
3579,
19290,
1125,
13,
4706,
9995,
13,
4706,
6204,
263,
716,
4069,
3143,
292,
13,
308,
13,
13,
4706,
910,
1158,
3732,
263,
12231,
681,
7331,
2009,
491,
2322,
29889,
1763,
1207,
385,
13,
4706,
20489,
7331,
2009,
29892,
3113,
4529,
263,
421,
14035,
29952,
740,
13,
4706,
304,
367,
22336,
746,
13442,
278,
2933,
29889,
13,
4706,
8653,
822,
6939,
29918,
2220,
29898,
5327,
1125,
13,
4706,
8653,
268,
282,
2158,
29898,
5327,
29897,
13,
4706,
8653,
13,
4706,
8653,
3244,
353,
7882,
29889,
2344,
29918,
2909,
292,
29898,
4993,
29892,
6939,
29922,
14035,
29918,
2220,
29897,
13,
13,
4706,
584,
3207,
6939,
740,
29901,
450,
6939,
740,
13,
9651,
363,
20489,
2009,
29889,
313,
25253,
29897,
13,
4706,
584,
3207,
851,
2752,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
3207,
938,
10823,
29918,
333,
29901,
29871,
13,
4706,
584,
3207,
851,
10823,
29918,
5679,
29901,
29871,
13,
4706,
584,
2457,
29901,
512,
1220,
5103,
29906,
29900,
29896,
13,
462,
960,
278,
1158,
338,
2000,
408,
9524,
5794,
29892,
13,
462,
3639,
278,
2009,
3244,
29889,
13,
4706,
9995,
13,
4706,
9049,
5085,
1839,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
2033,
353,
5852,
13,
4706,
565,
9049,
5085,
29889,
657,
877,
14035,
29374,
13,
9651,
736,
1583,
29889,
2344,
29918,
2909,
292,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
4993,
29892,
3579,
19290,
29897,
13,
4706,
1683,
29901,
13,
9651,
313,
1272,
29897,
353,
1583,
29889,
2344,
29918,
2909,
292,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
4993,
29892,
3579,
19290,
29897,
13,
9651,
736,
848,
13,
13,
1678,
822,
2069,
29918,
2909,
292,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
1311,
29892,
2752,
29892,
3579,
19290,
1125,
13,
4706,
9995,
13,
4706,
6204,
263,
716,
4069,
3143,
292,
13,
308,
13,
13,
4706,
910,
1158,
3732,
263,
12231,
681,
7331,
2009,
491,
2322,
29889,
1763,
1207,
385,
13,
4706,
20489,
7331,
2009,
29892,
3113,
4529,
263,
421,
14035,
29952,
740,
13,
4706,
304,
367,
22336,
746,
13442,
278,
2933,
29889,
13,
4706,
8653,
822,
6939,
29918,
2220,
29898,
5327,
1125,
13,
4706,
8653,
268,
282,
2158,
29898,
5327,
29897,
13,
4706,
8653,
13,
4706,
8653,
3244,
353,
7882,
29889,
2344,
29918,
2909,
292,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
4993,
29892,
6939,
29922,
14035,
29918,
2220,
29897,
13,
13,
4706,
584,
3207,
6939,
740,
29901,
450,
6939,
740,
13,
9651,
363,
20489,
2009,
29889,
313,
25253,
29897,
13,
4706,
584,
3207,
851,
2752,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
3207,
938,
10823,
29918,
333,
29901,
29871,
13,
4706,
584,
3207,
851,
10823,
29918,
5679,
29901,
29871,
13,
4706,
584,
2457,
29901,
512,
1220,
5103,
29906,
29900,
29896,
13,
462,
960,
278,
1158,
338,
2000,
408,
9524,
5794,
29892,
13,
462,
3639,
278,
2009,
3244,
29889,
13,
4706,
9995,
13,
13,
4706,
599,
29918,
7529,
353,
6024,
4993,
742,
525,
14748,
29918,
333,
742,
525,
14748,
29918,
5679,
2033,
13,
4706,
599,
29918,
7529,
29889,
4397,
877,
14035,
1495,
13,
4706,
599,
29918,
7529,
29889,
4397,
877,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
1495,
13,
13,
4706,
8636,
353,
1180,
1338,
580,
13,
4706,
363,
1820,
29892,
659,
297,
4256,
7076,
29898,
7529,
1839,
19290,
2033,
1125,
13,
9651,
565,
1820,
451,
297,
599,
29918,
7529,
29901,
13,
18884,
12020,
20948,
29898,
13,
462,
1678,
376,
29954,
327,
385,
15668,
13553,
2980,
14210,
29879,
11838,
13,
462,
1678,
376,
304,
1158,
2069,
29918,
2909,
292,
29908,
1273,
1820,
13,
18884,
1723,
13,
9651,
8636,
29961,
1989,
29962,
353,
659,
13,
4706,
628,
8636,
1839,
19290,
2033,
13,
4706,
396,
11539,
278,
3734,
3443,
525,
4993,
29915,
338,
731,
13,
4706,
565,
6702,
4993,
29915,
451,
297,
8636,
29897,
470,
313,
7529,
1839,
4993,
2033,
338,
6213,
1125,
13,
9651,
12020,
7865,
2392,
703,
18552,
292,
278,
3734,
3443,
421,
4993,
29952,
746,
5432,
421,
2344,
29918,
2909,
292,
29952,
1159,
13,
13,
4706,
6503,
29918,
2084,
353,
8207,
2909,
292,
29914,
2344,
4286,
6506,
877,
29912,
4830,
29913,
742,
525,
3126,
1495,
13,
4706,
2224,
29918,
7529,
353,
6571,
13,
13,
4706,
2346,
29918,
7529,
353,
6571,
13,
4706,
565,
525,
4993,
29915,
297,
8636,
29901,
13,
9651,
2346,
29918,
7529,
1839,
4993,
2033,
353,
8636,
1839,
4993,
2033,
13,
4706,
565,
525,
14748,
29918,
333,
29915,
297,
8636,
29901,
13,
9651,
2346,
29918,
7529,
1839,
14748,
29918,
333,
2033,
353,
8636,
1839,
14748,
29918,
333,
2033,
13,
4706,
565,
525,
14748,
29918,
5679,
29915,
297,
8636,
29901,
13,
9651,
2346,
29918,
7529,
1839,
14748,
29918,
5679,
2033,
353,
8636,
1839,
14748,
29918,
5679,
2033,
13,
13,
4706,
4839,
29918,
7529,
353,
6571,
13,
13,
4706,
883,
29918,
7529,
353,
5159,
13,
4706,
1887,
29918,
1707,
29918,
5325,
353,
6571,
13,
13,
4706,
3573,
29918,
7529,
353,
6213,
13,
13,
4706,
396,
7331,
4839,
421,
23965,
29952,
13,
4706,
4839,
29918,
7529,
1839,
23965,
2033,
353,
1583,
29889,
2754,
29918,
4645,
7790,
13,
9651,
1831,
29918,
6672,
29918,
16044,
18959,
6214,
29914,
3126,
11287,
13,
4706,
565,
451,
4839,
29918,
7529,
1839,
23965,
2033,
29901,
13,
9651,
628,
4839,
29918,
7529,
1839,
23965,
2033,
13,
13,
4706,
396,
7331,
4839,
421,
3916,
29899,
1542,
29952,
13,
4706,
4839,
29918,
7529,
1839,
3916,
29899,
1542,
2033,
353,
1583,
29889,
2754,
29918,
4645,
7790,
13,
9651,
1831,
29918,
6672,
29918,
3051,
29918,
1853,
18959,
6214,
29914,
3126,
11287,
13,
13,
4706,
396,
27241,
4444,
13,
4706,
4817,
29918,
11027,
353,
5159,
13,
13,
4706,
736,
1583,
29889,
2754,
29918,
4645,
29889,
4804,
29918,
2754,
29898,
10314,
29918,
2084,
29892,
525,
5438,
742,
13,
462,
462,
9651,
2224,
29918,
7529,
29892,
13,
462,
462,
9651,
2346,
29918,
7529,
29892,
13,
462,
462,
9651,
4839,
29918,
7529,
29892,
13,
462,
462,
9651,
3573,
29922,
2587,
29918,
7529,
29892,
13,
462,
462,
9651,
1400,
29918,
7529,
29922,
689,
29918,
7529,
29892,
13,
462,
462,
9651,
2066,
29922,
2997,
29918,
1707,
29918,
5325,
29892,
13,
462,
462,
9651,
2933,
29918,
1853,
2433,
797,
1220,
5103,
29906,
29900,
29896,
742,
13,
462,
462,
9651,
4817,
29918,
11027,
29922,
5150,
29918,
11027,
29892,
13,
462,
462,
9651,
6939,
29922,
7529,
29889,
657,
877,
14035,
5477,
13,
462,
462,
9651,
903,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
29922,
7529,
29889,
657,
877,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
8785,
13,
13,
1678,
822,
3349,
29918,
2909,
292,
29918,
16432,
29898,
1311,
29892,
3143,
292,
29918,
333,
29892,
3143,
292,
16432,
29918,
333,
29892,
3579,
19290,
1125,
13,
4706,
9995,
13,
4706,
15154,
263,
9493,
515,
263,
3143,
292,
13,
308,
13,
13,
4706,
910,
1158,
3732,
263,
12231,
681,
7331,
2009,
491,
2322,
29889,
1763,
1207,
385,
13,
4706,
20489,
7331,
2009,
29892,
3113,
4529,
263,
421,
14035,
29952,
740,
13,
4706,
304,
367,
22336,
746,
13442,
278,
2933,
29889,
13,
4706,
8653,
822,
6939,
29918,
2220,
29898,
5327,
1125,
13,
4706,
8653,
268,
282,
2158,
29898,
5327,
29897,
13,
4706,
8653,
13,
4706,
8653,
3244,
353,
7882,
29889,
5992,
29918,
2909,
292,
29918,
16432,
29898,
2909,
292,
29918,
333,
29892,
3143,
292,
16432,
29918,
333,
29892,
6939,
29922,
14035,
29918,
2220,
29897,
13,
13,
4706,
584,
3207,
6939,
740,
29901,
450,
6939,
740,
13,
9651,
363,
20489,
2009,
29889,
313,
25253,
29897,
13,
4706,
584,
3207,
938,
3143,
292,
29918,
333,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
3207,
938,
3143,
292,
16432,
29918,
333,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
2457,
29901,
512,
1220,
5103,
29906,
29900,
29900,
29896,
29955,
13,
462,
960,
278,
1158,
338,
2000,
408,
9524,
5794,
29892,
13,
462,
3639,
278,
2009,
3244,
29889,
13,
4706,
9995,
13,
4706,
9049,
5085,
1839,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
2033,
353,
5852,
13,
4706,
565,
9049,
5085,
29889,
657,
877,
14035,
29374,
13,
9651,
736,
1583,
29889,
5992,
29918,
2909,
292,
29918,
16432,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
2909,
292,
29918,
333,
29892,
3143,
292,
16432,
29918,
333,
29892,
3579,
19290,
29897,
13,
4706,
1683,
29901,
13,
9651,
313,
1272,
29897,
353,
1583,
29889,
5992,
29918,
2909,
292,
29918,
16432,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
2909,
292,
29918,
333,
29892,
3143,
292,
16432,
29918,
333,
29892,
3579,
19290,
29897,
13,
9651,
736,
848,
13,
13,
1678,
822,
3349,
29918,
2909,
292,
29918,
16432,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
1311,
29892,
3143,
292,
29918,
333,
29892,
3143,
292,
16432,
29918,
333,
29892,
3579,
19290,
1125,
13,
4706,
9995,
13,
4706,
15154,
263,
9493,
515,
263,
3143,
292,
13,
308,
13,
13,
4706,
910,
1158,
3732,
263,
12231,
681,
7331,
2009,
491,
2322,
29889,
1763,
1207,
385,
13,
4706,
20489,
7331,
2009,
29892,
3113,
4529,
263,
421,
14035,
29952,
740,
13,
4706,
304,
367,
22336,
746,
13442,
278,
2933,
29889,
13,
4706,
8653,
822,
6939,
29918,
2220,
29898,
5327,
1125,
13,
4706,
8653,
268,
282,
2158,
29898,
5327,
29897,
13,
4706,
8653,
13,
4706,
8653,
3244,
353,
7882,
29889,
5992,
29918,
2909,
292,
29918,
16432,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
2909,
292,
29918,
333,
29892,
3143,
292,
16432,
29918,
333,
29892,
6939,
29922,
14035,
29918,
2220,
29897,
13,
13,
4706,
584,
3207,
6939,
740,
29901,
450,
6939,
740,
13,
9651,
363,
20489,
2009,
29889,
313,
25253,
29897,
13,
4706,
584,
3207,
938,
3143,
292,
29918,
333,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
3207,
938,
3143,
292,
16432,
29918,
333,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
2457,
29901,
512,
1220,
5103,
29906,
29900,
29900,
29896,
29955,
13,
462,
960,
278,
1158,
338,
2000,
408,
9524,
5794,
29892,
13,
462,
3639,
278,
2009,
3244,
29889,
13,
4706,
9995,
13,
13,
4706,
599,
29918,
7529,
353,
6024,
2909,
292,
29918,
333,
742,
525,
2909,
292,
16432,
29918,
333,
2033,
13,
4706,
599,
29918,
7529,
29889,
4397,
877,
14035,
1495,
13,
4706,
599,
29918,
7529,
29889,
4397,
877,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
1495,
13,
13,
4706,
8636,
353,
1180,
1338,
580,
13,
4706,
363,
1820,
29892,
659,
297,
4256,
7076,
29898,
7529,
1839,
19290,
2033,
1125,
13,
9651,
565,
1820,
451,
297,
599,
29918,
7529,
29901,
13,
18884,
12020,
20948,
29898,
13,
462,
1678,
376,
29954,
327,
385,
15668,
13553,
2980,
14210,
29879,
11838,
13,
462,
1678,
376,
304,
1158,
3349,
29918,
2909,
292,
29918,
16432,
29908,
1273,
1820,
13,
18884,
1723,
13,
9651,
8636,
29961,
1989,
29962,
353,
659,
13,
4706,
628,
8636,
1839,
19290,
2033,
13,
4706,
396,
11539,
278,
3734,
3443,
525,
2909,
292,
29918,
333,
29915,
338,
731,
13,
4706,
565,
6702,
2909,
292,
29918,
333,
29915,
451,
297,
8636,
29897,
470,
313,
7529,
1839,
2909,
292,
29918,
333,
2033,
338,
6213,
1125,
13,
9651,
12020,
7865,
2392,
703,
18552,
292,
278,
3734,
3443,
421,
2909,
292,
29918,
333,
29952,
746,
5432,
421,
5992,
29918,
2909,
292,
29918,
16432,
29952,
1159,
13,
4706,
396,
11539,
278,
3734,
3443,
525,
2909,
292,
16432,
29918,
333,
29915,
338,
731,
13,
4706,
565,
6702,
2909,
292,
16432,
29918,
333,
29915,
451,
297,
8636,
29897,
470,
313,
7529,
1839,
2909,
292,
16432,
29918,
333,
2033,
338,
6213,
1125,
13,
9651,
12020,
7865,
2392,
703,
18552,
292,
278,
3734,
3443,
421,
2909,
292,
16432,
29918,
333,
29952,
746,
5432,
421,
5992,
29918,
2909,
292,
29918,
16432,
29952,
1159,
13,
13,
4706,
6503,
29918,
2084,
353,
8207,
2909,
292,
29914,
5992,
29899,
16432,
4286,
6506,
877,
29912,
4830,
29913,
742,
525,
3126,
1495,
13,
4706,
2224,
29918,
7529,
353,
6571,
13,
13,
4706,
2346,
29918,
7529,
353,
6571,
13,
4706,
565,
525,
2909,
292,
29918,
333,
29915,
297,
8636,
29901,
13,
9651,
2346,
29918,
7529,
1839,
2909,
292,
29918,
333,
2033,
353,
8636,
1839,
2909,
292,
29918,
333,
2033,
13,
4706,
565,
525,
2909,
292,
16432,
29918,
333,
29915,
297,
8636,
29901,
13,
9651,
2346,
29918,
7529,
1839,
2909,
292,
16432,
29918,
333,
2033,
353,
8636,
1839,
2909,
292,
16432,
29918,
333,
2033,
13,
13,
4706,
4839,
29918,
7529,
353,
6571,
13,
13,
4706,
883,
29918,
7529,
353,
5159,
13,
4706,
1887,
29918,
1707,
29918,
5325,
353,
6571,
13,
13,
4706,
3573,
29918,
7529,
353,
6213,
13,
13,
4706,
396,
7331,
4839,
421,
23965,
29952,
13,
4706,
4839,
29918,
7529,
1839,
23965,
2033,
353,
1583,
29889,
2754,
29918,
4645,
7790,
13,
9651,
1831,
29918,
6672,
29918,
16044,
18959,
6214,
29914,
3126,
11287,
13,
4706,
565,
451,
4839,
29918,
7529,
1839,
23965,
2033,
29901,
13,
9651,
628,
4839,
29918,
7529,
1839,
23965,
2033,
13,
13,
4706,
396,
7331,
4839,
421,
3916,
29899,
1542,
29952,
13,
4706,
4839,
29918,
7529,
1839,
3916,
29899,
1542,
2033,
353,
1583,
29889,
2754,
29918,
4645,
7790,
13,
9651,
1831,
29918,
6672,
29918,
3051,
29918,
1853,
18959,
6214,
29914,
3126,
11287,
13,
13,
4706,
396,
27241,
4444,
13,
4706,
4817,
29918,
11027,
353,
5159,
13,
13,
4706,
736,
1583,
29889,
2754,
29918,
4645,
29889,
4804,
29918,
2754,
29898,
10314,
29918,
2084,
29892,
525,
5438,
742,
13,
462,
462,
9651,
2224,
29918,
7529,
29892,
13,
462,
462,
9651,
2346,
29918,
7529,
29892,
13,
462,
462,
9651,
4839,
29918,
7529,
29892,
13,
462,
462,
9651,
3573,
29922,
2587,
29918,
7529,
29892,
13,
462,
462,
9651,
1400,
29918,
7529,
29922,
689,
29918,
7529,
29892,
13,
462,
462,
9651,
2066,
29922,
2997,
29918,
1707,
29918,
5325,
29892,
13,
462,
462,
9651,
2933,
29918,
1853,
2433,
797,
1220,
5103,
29906,
29900,
29900,
29896,
29955,
742,
13,
462,
462,
9651,
4817,
29918,
11027,
29922,
5150,
29918,
11027,
29892,
13,
462,
462,
9651,
6939,
29922,
7529,
29889,
657,
877,
14035,
5477,
13,
462,
462,
9651,
903,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
29922,
7529,
29889,
657,
877,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
8785,
13,
13,
1678,
822,
620,
355,
29918,
26897,
362,
29898,
1311,
29892,
3143,
292,
29918,
333,
29892,
3579,
19290,
1125,
13,
4706,
9995,
13,
4706,
2538,
355,
278,
9659,
362,
4876,
304,
278,
3275,
11962,
13,
308,
13,
13,
4706,
910,
1158,
3732,
263,
12231,
681,
7331,
2009,
491,
2322,
29889,
1763,
1207,
385,
13,
4706,
20489,
7331,
2009,
29892,
3113,
4529,
263,
421,
14035,
29952,
740,
13,
4706,
304,
367,
22336,
746,
13442,
278,
2933,
29889,
13,
4706,
8653,
822,
6939,
29918,
2220,
29898,
5327,
1125,
13,
4706,
8653,
268,
282,
2158,
29898,
5327,
29897,
13,
4706,
8653,
13,
4706,
8653,
3244,
353,
7882,
29889,
690,
355,
29918,
26897,
362,
29898,
2909,
292,
29918,
333,
29892,
6939,
29922,
14035,
29918,
2220,
29897,
13,
13,
4706,
584,
3207,
6939,
740,
29901,
450,
6939,
740,
13,
9651,
363,
20489,
2009,
29889,
313,
25253,
29897,
13,
4706,
584,
3207,
938,
3143,
292,
29918,
333,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
2457,
29901,
512,
1220,
5103,
29906,
29900,
29900,
29941,
13,
462,
960,
278,
1158,
338,
2000,
408,
9524,
5794,
29892,
13,
462,
3639,
278,
2009,
3244,
29889,
13,
4706,
9995,
13,
4706,
9049,
5085,
1839,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
2033,
353,
5852,
13,
4706,
565,
9049,
5085,
29889,
657,
877,
14035,
29374,
13,
9651,
736,
1583,
29889,
690,
355,
29918,
26897,
362,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
2909,
292,
29918,
333,
29892,
3579,
19290,
29897,
13,
4706,
1683,
29901,
13,
9651,
313,
1272,
29897,
353,
1583,
29889,
690,
355,
29918,
26897,
362,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
2909,
292,
29918,
333,
29892,
3579,
19290,
29897,
13,
9651,
736,
848,
13,
13,
1678,
822,
620,
355,
29918,
26897,
362,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
1311,
29892,
3143,
292,
29918,
333,
29892,
3579,
19290,
1125,
13,
4706,
9995,
13,
4706,
2538,
355,
278,
9659,
362,
4876,
304,
278,
3275,
11962,
13,
308,
13,
13,
4706,
910,
1158,
3732,
263,
12231,
681,
7331,
2009,
491,
2322,
29889,
1763,
1207,
385,
13,
4706,
20489,
7331,
2009,
29892,
3113,
4529,
263,
421,
14035,
29952,
740,
13,
4706,
304,
367,
22336,
746,
13442,
278,
2933,
29889,
13,
4706,
8653,
822,
6939,
29918,
2220,
29898,
5327,
1125,
13,
4706,
8653,
268,
282,
2158,
29898,
5327,
29897,
13,
4706,
8653,
13,
4706,
8653,
3244,
353,
7882,
29889,
690,
355,
29918,
26897,
362,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
2909,
292,
29918,
333,
29892,
6939,
29922,
14035,
29918,
2220,
29897,
13,
13,
4706,
584,
3207,
6939,
740,
29901,
450,
6939,
740,
13,
9651,
363,
20489,
2009,
29889,
313,
25253,
29897,
13,
4706,
584,
3207,
938,
3143,
292,
29918,
333,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
2457,
29901,
512,
1220,
5103,
29906,
29900,
29900,
29941,
13,
462,
960,
278,
1158,
338,
2000,
408,
9524,
5794,
29892,
13,
462,
3639,
278,
2009,
3244,
29889,
13,
4706,
9995,
13,
13,
4706,
599,
29918,
7529,
353,
6024,
2909,
292,
29918,
333,
2033,
13,
4706,
599,
29918,
7529,
29889,
4397,
877,
14035,
1495,
13,
4706,
599,
29918,
7529,
29889,
4397,
877,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
1495,
13,
13,
4706,
8636,
353,
1180,
1338,
580,
13,
4706,
363,
1820,
29892,
659,
297,
4256,
7076,
29898,
7529,
1839,
19290,
2033,
1125,
13,
9651,
565,
1820,
451,
297,
599,
29918,
7529,
29901,
13,
18884,
12020,
20948,
29898,
13,
462,
1678,
376,
29954,
327,
385,
15668,
13553,
2980,
14210,
29879,
11838,
13,
462,
1678,
376,
304,
1158,
620,
355,
29918,
26897,
362,
29908,
1273,
1820,
13,
18884,
1723,
13,
9651,
8636,
29961,
1989,
29962,
353,
659,
13,
4706,
628,
8636,
1839,
19290,
2033,
13,
4706,
396,
11539,
278,
3734,
3443,
525,
2909,
292,
29918,
333,
29915,
338,
731,
13,
4706,
565,
6702,
2909,
292,
29918,
333,
29915,
451,
297,
8636,
29897,
470,
313,
7529,
1839,
2909,
292,
29918,
333,
2033,
338,
6213,
1125,
13,
9651,
12020,
7865,
2392,
703,
18552,
292,
278,
3734,
3443,
421,
2909,
292,
29918,
333,
29952,
746,
5432,
421,
690,
355,
29918,
26897,
362,
29952,
1159,
13,
13,
4706,
6503,
29918,
2084,
353,
8207,
2909,
292,
29914,
690,
355,
29899,
26897,
362,
4286,
6506,
877,
29912,
4830,
29913,
742,
525,
3126,
1495,
13,
4706,
2224,
29918,
7529,
353,
6571,
13,
13,
4706,
2346,
29918,
7529,
353,
6571,
13,
4706,
565,
525,
2909,
292,
29918,
333,
29915,
297,
8636,
29901,
13,
9651,
2346,
29918,
7529,
1839,
2909,
292,
29918,
333,
2033,
353,
8636,
1839,
2909,
292,
29918,
333,
2033,
13,
13,
4706,
4839,
29918,
7529,
353,
6571,
13,
13,
4706,
883,
29918,
7529,
353,
5159,
13,
4706,
1887,
29918,
1707,
29918,
5325,
353,
6571,
13,
13,
4706,
3573,
29918,
7529,
353,
6213,
13,
13,
4706,
396,
7331,
4839,
421,
23965,
29952,
13,
4706,
4839,
29918,
7529,
1839,
23965,
2033,
353,
1583,
29889,
2754,
29918,
4645,
7790,
13,
9651,
1831,
29918,
6672,
29918,
16044,
18959,
6214,
29914,
3126,
11287,
13,
4706,
565,
451,
4839,
29918,
7529,
1839,
23965,
2033,
29901,
13,
9651,
628,
4839,
29918,
7529,
1839,
23965,
2033,
13,
13,
4706,
396,
7331,
4839,
421,
3916,
29899,
1542,
29952,
13,
4706,
4839,
29918,
7529,
1839,
3916,
29899,
1542,
2033,
353,
1583,
29889,
2754,
29918,
4645,
7790,
13,
9651,
1831,
29918,
6672,
29918,
3051,
29918,
1853,
18959,
6214,
29914,
3126,
11287,
13,
13,
4706,
396,
27241,
4444,
13,
4706,
4817,
29918,
11027,
353,
5159,
13,
13,
4706,
736,
1583,
29889,
2754,
29918,
4645,
29889,
4804,
29918,
2754,
29898,
10314,
29918,
2084,
29892,
525,
5438,
742,
13,
462,
462,
9651,
2224,
29918,
7529,
29892,
13,
462,
462,
9651,
2346,
29918,
7529,
29892,
13,
462,
462,
9651,
4839,
29918,
7529,
29892,
13,
462,
462,
9651,
3573,
29922,
2587,
29918,
7529,
29892,
13,
462,
462,
9651,
1400,
29918,
7529,
29922,
689,
29918,
7529,
29892,
13,
462,
462,
9651,
2066,
29922,
2997,
29918,
1707,
29918,
5325,
29892,
13,
462,
462,
9651,
2933,
29918,
1853,
2433,
797,
1220,
5103,
29906,
29900,
29900,
29941,
742,
13,
462,
462,
9651,
4817,
29918,
11027,
29922,
5150,
29918,
11027,
29892,
13,
462,
462,
9651,
6939,
29922,
7529,
29889,
657,
877,
14035,
5477,
13,
462,
462,
9651,
903,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
29922,
7529,
29889,
657,
877,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
8785,
13,
13,
1678,
822,
23986,
29918,
2909,
292,
29898,
1311,
29892,
3143,
292,
29918,
333,
29892,
3579,
19290,
1125,
13,
4706,
9995,
13,
4706,
27811,
263,
3143,
292,
322,
967,
21396,
2117,
12690,
2745,
263,
731,
2635,
13,
308,
13,
13,
4706,
910,
1158,
3732,
263,
12231,
681,
7331,
2009,
491,
2322,
29889,
1763,
1207,
385,
13,
4706,
20489,
7331,
2009,
29892,
3113,
4529,
263,
421,
14035,
29952,
740,
13,
4706,
304,
367,
22336,
746,
13442,
278,
2933,
29889,
13,
4706,
8653,
822,
6939,
29918,
2220,
29898,
5327,
1125,
13,
4706,
8653,
268,
282,
2158,
29898,
5327,
29897,
13,
4706,
8653,
13,
4706,
8653,
3244,
353,
7882,
29889,
690,
7143,
29918,
2909,
292,
29898,
2909,
292,
29918,
333,
29892,
6939,
29922,
14035,
29918,
2220,
29897,
13,
13,
4706,
584,
3207,
6939,
740,
29901,
450,
6939,
740,
13,
9651,
363,
20489,
2009,
29889,
313,
25253,
29897,
13,
4706,
584,
3207,
938,
3143,
292,
29918,
333,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
3207,
2635,
21676,
29918,
29305,
29901,
29871,
13,
4706,
584,
2457,
29901,
512,
1220,
5103,
29906,
29900,
29900,
29896,
29947,
13,
462,
960,
278,
1158,
338,
2000,
408,
9524,
5794,
29892,
13,
462,
3639,
278,
2009,
3244,
29889,
13,
4706,
9995,
13,
4706,
9049,
5085,
1839,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
2033,
353,
5852,
13,
4706,
565,
9049,
5085,
29889,
657,
877,
14035,
29374,
13,
9651,
736,
1583,
29889,
690,
7143,
29918,
2909,
292,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
2909,
292,
29918,
333,
29892,
3579,
19290,
29897,
13,
4706,
1683,
29901,
13,
9651,
313,
1272,
29897,
353,
1583,
29889,
690,
7143,
29918,
2909,
292,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
2909,
292,
29918,
333,
29892,
3579,
19290,
29897,
13,
9651,
736,
848,
13,
13,
1678,
822,
23986,
29918,
2909,
292,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
1311,
29892,
3143,
292,
29918,
333,
29892,
3579,
19290,
1125,
13,
4706,
9995,
13,
4706,
27811,
263,
3143,
292,
322,
967,
21396,
2117,
12690,
2745,
263,
731,
2635,
13,
308,
13,
13,
4706,
910,
1158,
3732,
263,
12231,
681,
7331,
2009,
491,
2322,
29889,
1763,
1207,
385,
13,
4706,
20489,
7331,
2009,
29892,
3113,
4529,
263,
421,
14035,
29952,
740,
13,
4706,
304,
367,
22336,
746,
13442,
278,
2933,
29889,
13,
4706,
8653,
822,
6939,
29918,
2220,
29898,
5327,
1125,
13,
4706,
8653,
268,
282,
2158,
29898,
5327,
29897,
13,
4706,
8653,
13,
4706,
8653,
3244,
353,
7882,
29889,
690,
7143,
29918,
2909,
292,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
2909,
292,
29918,
333,
29892,
6939,
29922,
14035,
29918,
2220,
29897,
13,
13,
4706,
584,
3207,
6939,
740,
29901,
450,
6939,
740,
13,
9651,
363,
20489,
2009,
29889,
313,
25253,
29897,
13,
4706,
584,
3207,
938,
3143,
292,
29918,
333,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
3207,
2635,
21676,
29918,
29305,
29901,
29871,
13,
4706,
584,
2457,
29901,
512,
1220,
5103,
29906,
29900,
29900,
29896,
29947,
13,
462,
960,
278,
1158,
338,
2000,
408,
9524,
5794,
29892,
13,
462,
3639,
278,
2009,
3244,
29889,
13,
4706,
9995,
13,
13,
4706,
599,
29918,
7529,
353,
6024,
2909,
292,
29918,
333,
742,
525,
690,
9841,
29918,
29305,
2033,
13,
4706,
599,
29918,
7529,
29889,
4397,
877,
14035,
1495,
13,
4706,
599,
29918,
7529,
29889,
4397,
877,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
1495,
13,
13,
4706,
8636,
353,
1180,
1338,
580,
13,
4706,
363,
1820,
29892,
659,
297,
4256,
7076,
29898,
7529,
1839,
19290,
2033,
1125,
13,
9651,
565,
1820,
451,
297,
599,
29918,
7529,
29901,
13,
18884,
12020,
20948,
29898,
13,
462,
1678,
376,
29954,
327,
385,
15668,
13553,
2980,
14210,
29879,
11838,
13,
462,
1678,
376,
304,
1158,
23986,
29918,
2909,
292,
29908,
1273,
1820,
13,
18884,
1723,
13,
9651,
8636,
29961,
1989,
29962,
353,
659,
13,
4706,
628,
8636,
1839,
19290,
2033,
13,
4706,
396,
11539,
278,
3734,
3443,
525,
2909,
292,
29918,
333,
29915,
338,
731,
13,
4706,
565,
6702,
2909,
292,
29918,
333,
29915,
451,
297,
8636,
29897,
470,
313,
7529,
1839,
2909,
292,
29918,
333,
2033,
338,
6213,
1125,
13,
9651,
12020,
7865,
2392,
703,
18552,
292,
278,
3734,
3443,
421,
2909,
292,
29918,
333,
29952,
746,
5432,
421,
690,
7143,
29918,
2909,
292,
29952,
1159,
13,
13,
4706,
6503,
29918,
2084,
353,
8207,
2909,
292,
29914,
690,
7143,
4286,
6506,
877,
29912,
4830,
29913,
742,
525,
3126,
1495,
13,
4706,
2224,
29918,
7529,
353,
6571,
13,
13,
4706,
2346,
29918,
7529,
353,
6571,
13,
4706,
565,
525,
2909,
292,
29918,
333,
29915,
297,
8636,
29901,
13,
9651,
2346,
29918,
7529,
1839,
2909,
292,
29918,
333,
2033,
353,
8636,
1839,
2909,
292,
29918,
333,
2033,
13,
4706,
565,
525,
690,
9841,
29918,
29305,
29915,
297,
8636,
29901,
13,
9651,
2346,
29918,
7529,
1839,
690,
9841,
29918,
29305,
2033,
353,
8636,
1839,
690,
9841,
29918,
29305,
2033,
13,
13,
4706,
4839,
29918,
7529,
353,
6571,
13,
13,
4706,
883,
29918,
7529,
353,
5159,
13,
4706,
1887,
29918,
1707,
29918,
5325,
353,
6571,
13,
13,
4706,
3573,
29918,
7529,
353,
6213,
13,
13,
4706,
396,
7331,
4839,
421,
23965,
29952,
13,
4706,
4839,
29918,
7529,
1839,
23965,
2033,
353,
1583,
29889,
2754,
29918,
4645,
7790,
13,
9651,
1831,
29918,
6672,
29918,
16044,
18959,
6214,
29914,
3126,
11287,
13,
4706,
565,
451,
4839,
29918,
7529,
1839,
23965,
2033,
29901,
13,
9651,
628,
4839,
29918,
7529,
1839,
23965,
2033,
13,
13,
4706,
396,
7331,
4839,
421,
3916,
29899,
1542,
29952,
13,
4706,
4839,
29918,
7529,
1839,
3916,
29899,
1542,
2033,
353,
1583,
29889,
2754,
29918,
4645,
7790,
13,
9651,
1831,
29918,
6672,
29918,
3051,
29918,
1853,
18959,
6214,
29914,
3126,
11287,
13,
13,
4706,
396,
27241,
4444,
13,
4706,
4817,
29918,
11027,
353,
5159,
13,
13,
4706,
736,
1583,
29889,
2754,
29918,
4645,
29889,
4804,
29918,
2754,
29898,
10314,
29918,
2084,
29892,
525,
5438,
742,
13,
462,
462,
9651,
2224,
29918,
7529,
29892,
13,
462,
462,
9651,
2346,
29918,
7529,
29892,
13,
462,
462,
9651,
4839,
29918,
7529,
29892,
13,
462,
462,
9651,
3573,
29922,
2587,
29918,
7529,
29892,
13,
462,
462,
9651,
1400,
29918,
7529,
29922,
689,
29918,
7529,
29892,
13,
462,
462,
9651,
2066,
29922,
2997,
29918,
1707,
29918,
5325,
29892,
13,
462,
462,
9651,
2933,
29918,
1853,
2433,
797,
1220,
5103,
29906,
29900,
29900,
29896,
29947,
742,
13,
462,
462,
9651,
4817,
29918,
11027,
29922,
5150,
29918,
11027,
29892,
13,
462,
462,
9651,
6939,
29922,
7529,
29889,
657,
877,
14035,
5477,
13,
462,
462,
9651,
903,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
29922,
7529,
29889,
657,
877,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
8785,
13,
13,
1678,
822,
4078,
29918,
2909,
292,
29898,
1311,
29892,
3143,
292,
29918,
333,
29892,
3579,
19290,
1125,
13,
4706,
9995,
13,
4706,
16913,
263,
3143,
292,
408,
263,
14978,
322,
6507,
599,
13284,
310,
21396,
13,
308,
13,
13,
4706,
910,
1158,
3732,
263,
12231,
681,
7331,
2009,
491,
2322,
29889,
1763,
1207,
385,
13,
4706,
20489,
7331,
2009,
29892,
3113,
4529,
263,
421,
14035,
29952,
740,
13,
4706,
304,
367,
22336,
746,
13442,
278,
2933,
29889,
13,
4706,
8653,
822,
6939,
29918,
2220,
29898,
5327,
1125,
13,
4706,
8653,
268,
282,
2158,
29898,
5327,
29897,
13,
4706,
8653,
13,
4706,
8653,
3244,
353,
7882,
29889,
7620,
29918,
2909,
292,
29898,
2909,
292,
29918,
333,
29892,
6939,
29922,
14035,
29918,
2220,
29897,
13,
13,
4706,
584,
3207,
6939,
740,
29901,
450,
6939,
740,
13,
9651,
363,
20489,
2009,
29889,
313,
25253,
29897,
13,
4706,
584,
3207,
938,
3143,
292,
29918,
333,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
2457,
29901,
512,
1220,
5103,
29906,
29900,
29900,
29941,
13,
462,
960,
278,
1158,
338,
2000,
408,
9524,
5794,
29892,
13,
462,
3639,
278,
2009,
3244,
29889,
13,
4706,
9995,
13,
4706,
9049,
5085,
1839,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
2033,
353,
5852,
13,
4706,
565,
9049,
5085,
29889,
657,
877,
14035,
29374,
13,
9651,
736,
1583,
29889,
7620,
29918,
2909,
292,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
2909,
292,
29918,
333,
29892,
3579,
19290,
29897,
13,
4706,
1683,
29901,
13,
9651,
313,
1272,
29897,
353,
1583,
29889,
7620,
29918,
2909,
292,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
2909,
292,
29918,
333,
29892,
3579,
19290,
29897,
13,
9651,
736,
848,
13,
13,
1678,
822,
4078,
29918,
2909,
292,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
1311,
29892,
3143,
292,
29918,
333,
29892,
3579,
19290,
1125,
13,
4706,
9995,
13,
4706,
16913,
263,
3143,
292,
408,
263,
14978,
322,
6507,
599,
13284,
310,
21396,
13,
308,
13,
13,
4706,
910,
1158,
3732,
263,
12231,
681,
7331,
2009,
491,
2322,
29889,
1763,
1207,
385,
13,
4706,
20489,
7331,
2009,
29892,
3113,
4529,
263,
421,
14035,
29952,
740,
13,
4706,
304,
367,
22336,
746,
13442,
278,
2933,
29889,
13,
4706,
8653,
822,
6939,
29918,
2220,
29898,
5327,
1125,
13,
4706,
8653,
268,
282,
2158,
29898,
5327,
29897,
13,
4706,
8653,
13,
4706,
8653,
3244,
353,
7882,
29889,
7620,
29918,
2909,
292,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
2909,
292,
29918,
333,
29892,
6939,
29922,
14035,
29918,
2220,
29897,
13,
13,
4706,
584,
3207,
6939,
740,
29901,
450,
6939,
740,
13,
9651,
363,
20489,
2009,
29889,
313,
25253,
29897,
13,
4706,
584,
3207,
938,
3143,
292,
29918,
333,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
2457,
29901,
512,
1220,
5103,
29906,
29900,
29900,
29941,
13,
462,
960,
278,
1158,
338,
2000,
408,
9524,
5794,
29892,
13,
462,
3639,
278,
2009,
3244,
29889,
13,
4706,
9995,
13,
13,
4706,
599,
29918,
7529,
353,
6024,
2909,
292,
29918,
333,
2033,
13,
4706,
599,
29918,
7529,
29889,
4397,
877,
14035,
1495,
13,
4706,
599,
29918,
7529,
29889,
4397,
877,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
1495,
13,
13,
4706,
8636,
353,
1180,
1338,
580,
13,
4706,
363,
1820,
29892,
659,
297,
4256,
7076,
29898,
7529,
1839,
19290,
2033,
1125,
13,
9651,
565,
1820,
451,
297,
599,
29918,
7529,
29901,
13,
18884,
12020,
20948,
29898,
13,
462,
1678,
376,
29954,
327,
385,
15668,
13553,
2980,
14210,
29879,
11838,
13,
462,
1678,
376,
304,
1158,
4078,
29918,
2909,
292,
29908,
1273,
1820,
13,
18884,
1723,
13,
9651,
8636,
29961,
1989,
29962,
353,
659,
13,
4706,
628,
8636,
1839,
19290,
2033,
13,
4706,
396,
11539,
278,
3734,
3443,
525,
2909,
292,
29918,
333,
29915,
338,
731,
13,
4706,
565,
6702,
2909,
292,
29918,
333,
29915,
451,
297,
8636,
29897,
470,
313,
7529,
1839,
2909,
292,
29918,
333,
2033,
338,
6213,
1125,
13,
9651,
12020,
7865,
2392,
703,
18552,
292,
278,
3734,
3443,
421,
2909,
292,
29918,
333,
29952,
746,
5432,
421,
7620,
29918,
2909,
292,
29952,
1159,
13,
13,
4706,
6503,
29918,
2084,
353,
8207,
2909,
292,
29914,
7620,
4286,
6506,
877,
29912,
4830,
29913,
742,
525,
3126,
1495,
13,
4706,
2224,
29918,
7529,
353,
6571,
13,
13,
4706,
2346,
29918,
7529,
353,
6571,
13,
4706,
565,
525,
2909,
292,
29918,
333,
29915,
297,
8636,
29901,
13,
9651,
2346,
29918,
7529,
1839,
2909,
292,
29918,
333,
2033,
353,
8636,
1839,
2909,
292,
29918,
333,
2033,
13,
13,
4706,
4839,
29918,
7529,
353,
6571,
13,
13,
4706,
883,
29918,
7529,
353,
5159,
13,
4706,
1887,
29918,
1707,
29918,
5325,
353,
6571,
13,
13,
4706,
3573,
29918,
7529,
353,
6213,
13,
13,
4706,
396,
7331,
4839,
421,
23965,
29952,
13,
4706,
4839,
29918,
7529,
1839,
23965,
2033,
353,
1583,
29889,
2754,
29918,
4645,
7790,
13,
9651,
1831,
29918,
6672,
29918,
16044,
18959,
6214,
29914,
3126,
11287,
13,
4706,
565,
451,
4839,
29918,
7529,
1839,
23965,
2033,
29901,
13,
9651,
628,
4839,
29918,
7529,
1839,
23965,
2033,
13,
13,
4706,
396,
7331,
4839,
421,
3916,
29899,
1542,
29952,
13,
4706,
4839,
29918,
7529,
1839,
3916,
29899,
1542,
2033,
353,
1583,
29889,
2754,
29918,
4645,
7790,
13,
9651,
1831,
29918,
6672,
29918,
3051,
29918,
1853,
18959,
6214,
29914,
3126,
11287,
13,
13,
4706,
396,
27241,
4444,
13,
4706,
4817,
29918,
11027,
353,
5159,
13,
13,
4706,
736,
1583,
29889,
2754,
29918,
4645,
29889,
4804,
29918,
2754,
29898,
10314,
29918,
2084,
29892,
525,
5438,
742,
13,
462,
462,
9651,
2224,
29918,
7529,
29892,
13,
462,
462,
9651,
2346,
29918,
7529,
29892,
13,
462,
462,
9651,
4839,
29918,
7529,
29892,
13,
462,
462,
9651,
3573,
29922,
2587,
29918,
7529,
29892,
13,
462,
462,
9651,
1400,
29918,
7529,
29922,
689,
29918,
7529,
29892,
13,
462,
462,
9651,
2066,
29922,
2997,
29918,
1707,
29918,
5325,
29892,
13,
462,
462,
9651,
2933,
29918,
1853,
2433,
797,
1220,
5103,
29906,
29900,
29900,
29941,
742,
13,
462,
462,
9651,
4817,
29918,
11027,
29922,
5150,
29918,
11027,
29892,
13,
462,
462,
9651,
6939,
29922,
7529,
29889,
657,
877,
14035,
5477,
13,
462,
462,
9651,
903,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
29922,
7529,
29889,
657,
877,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
8785,
13,
13,
1678,
822,
731,
29918,
280,
328,
29918,
15539,
29898,
1311,
29892,
3143,
292,
29918,
333,
29892,
11962,
29918,
333,
29892,
3579,
19290,
1125,
13,
4706,
9995,
13,
4706,
3789,
278,
3275,
11962,
363,
263,
3143,
292,
13,
308,
13,
13,
4706,
910,
1158,
3732,
263,
12231,
681,
7331,
2009,
491,
2322,
29889,
1763,
1207,
385,
13,
4706,
20489,
7331,
2009,
29892,
3113,
4529,
263,
421,
14035,
29952,
740,
13,
4706,
304,
367,
22336,
746,
13442,
278,
2933,
29889,
13,
4706,
8653,
822,
6939,
29918,
2220,
29898,
5327,
1125,
13,
4706,
8653,
268,
282,
2158,
29898,
5327,
29897,
13,
4706,
8653,
13,
4706,
8653,
3244,
353,
7882,
29889,
842,
29918,
280,
328,
29918,
15539,
29898,
2909,
292,
29918,
333,
29892,
11962,
29918,
333,
29892,
6939,
29922,
14035,
29918,
2220,
29897,
13,
13,
4706,
584,
3207,
6939,
740,
29901,
450,
6939,
740,
13,
9651,
363,
20489,
2009,
29889,
313,
25253,
29897,
13,
4706,
584,
3207,
938,
3143,
292,
29918,
333,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
3207,
938,
11962,
29918,
333,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
2457,
29901,
512,
1220,
5103,
29906,
29900,
29900,
29941,
13,
462,
960,
278,
1158,
338,
2000,
408,
9524,
5794,
29892,
13,
462,
3639,
278,
2009,
3244,
29889,
13,
4706,
9995,
13,
4706,
9049,
5085,
1839,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
2033,
353,
5852,
13,
4706,
565,
9049,
5085,
29889,
657,
877,
14035,
29374,
13,
9651,
736,
1583,
29889,
842,
29918,
280,
328,
29918,
15539,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
2909,
292,
29918,
333,
29892,
11962,
29918,
333,
29892,
3579,
19290,
29897,
13,
4706,
1683,
29901,
13,
9651,
313,
1272,
29897,
353,
1583,
29889,
842,
29918,
280,
328,
29918,
15539,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
2909,
292,
29918,
333,
29892,
11962,
29918,
333,
29892,
3579,
19290,
29897,
13,
9651,
736,
848,
13,
13,
1678,
822,
731,
29918,
280,
328,
29918,
15539,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
1311,
29892,
3143,
292,
29918,
333,
29892,
11962,
29918,
333,
29892,
3579,
19290,
1125,
13,
4706,
9995,
13,
4706,
3789,
278,
3275,
11962,
363,
263,
3143,
292,
13,
308,
13,
13,
4706,
910,
1158,
3732,
263,
12231,
681,
7331,
2009,
491,
2322,
29889,
1763,
1207,
385,
13,
4706,
20489,
7331,
2009,
29892,
3113,
4529,
263,
421,
14035,
29952,
740,
13,
4706,
304,
367,
22336,
746,
13442,
278,
2933,
29889,
13,
4706,
8653,
822,
6939,
29918,
2220,
29898,
5327,
1125,
13,
4706,
8653,
268,
282,
2158,
29898,
5327,
29897,
13,
4706,
8653,
13,
4706,
8653,
3244,
353,
7882,
29889,
842,
29918,
280,
328,
29918,
15539,
29918,
2541,
29918,
1124,
29918,
3888,
29898,
2909,
292,
29918,
333,
29892,
11962,
29918,
333,
29892,
6939,
29922,
14035,
29918,
2220,
29897,
13,
13,
4706,
584,
3207,
6939,
740,
29901,
450,
6939,
740,
13,
9651,
363,
20489,
2009,
29889,
313,
25253,
29897,
13,
4706,
584,
3207,
938,
3143,
292,
29918,
333,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
3207,
938,
11962,
29918,
333,
29901,
29871,
313,
12403,
29897,
13,
4706,
584,
2457,
29901,
512,
1220,
5103,
29906,
29900,
29900,
29941,
13,
462,
960,
278,
1158,
338,
2000,
408,
9524,
5794,
29892,
13,
462,
3639,
278,
2009,
3244,
29889,
13,
4706,
9995,
13,
13,
4706,
599,
29918,
7529,
353,
6024,
2909,
292,
29918,
333,
742,
525,
15539,
29918,
333,
2033,
13,
4706,
599,
29918,
7529,
29889,
4397,
877,
14035,
1495,
13,
4706,
599,
29918,
7529,
29889,
4397,
877,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
1495,
13,
13,
4706,
8636,
353,
1180,
1338,
580,
13,
4706,
363,
1820,
29892,
659,
297,
4256,
7076,
29898,
7529,
1839,
19290,
2033,
1125,
13,
9651,
565,
1820,
451,
297,
599,
29918,
7529,
29901,
13,
18884,
12020,
20948,
29898,
13,
462,
1678,
376,
29954,
327,
385,
15668,
13553,
2980,
14210,
29879,
11838,
13,
462,
1678,
376,
304,
1158,
731,
29918,
280,
328,
29918,
15539,
29908,
1273,
1820,
13,
18884,
1723,
13,
9651,
8636,
29961,
1989,
29962,
353,
659,
13,
4706,
628,
8636,
1839,
19290,
2033,
13,
4706,
396,
11539,
278,
3734,
3443,
525,
2909,
292,
29918,
333,
29915,
338,
731,
13,
4706,
565,
6702,
2909,
292,
29918,
333,
29915,
451,
297,
8636,
29897,
470,
313,
7529,
1839,
2909,
292,
29918,
333,
2033,
338,
6213,
1125,
13,
9651,
12020,
7865,
2392,
703,
18552,
292,
278,
3734,
3443,
421,
2909,
292,
29918,
333,
29952,
746,
5432,
421,
842,
29918,
280,
328,
29918,
15539,
29952,
1159,
13,
4706,
396,
11539,
278,
3734,
3443,
525,
15539,
29918,
333,
29915,
338,
731,
13,
4706,
565,
6702,
15539,
29918,
333,
29915,
451,
297,
8636,
29897,
470,
313,
7529,
1839,
15539,
29918,
333,
2033,
338,
6213,
1125,
13,
9651,
12020,
7865,
2392,
703,
18552,
292,
278,
3734,
3443,
421,
15539,
29918,
333,
29952,
746,
5432,
421,
842,
29918,
280,
328,
29918,
15539,
29952,
1159,
13,
13,
4706,
6503,
29918,
2084,
353,
8207,
2909,
292,
29914,
842,
29899,
280,
328,
4286,
6506,
877,
29912,
4830,
29913,
742,
525,
3126,
1495,
13,
4706,
2224,
29918,
7529,
353,
6571,
13,
13,
4706,
2346,
29918,
7529,
353,
6571,
13,
4706,
565,
525,
2909,
292,
29918,
333,
29915,
297,
8636,
29901,
13,
9651,
2346,
29918,
7529,
1839,
2909,
292,
29918,
333,
2033,
353,
8636,
1839,
2909,
292,
29918,
333,
2033,
13,
4706,
565,
525,
15539,
29918,
333,
29915,
297,
8636,
29901,
13,
9651,
2346,
29918,
7529,
1839,
15539,
29918,
333,
2033,
353,
8636,
1839,
15539,
29918,
333,
2033,
13,
13,
4706,
4839,
29918,
7529,
353,
6571,
13,
13,
4706,
883,
29918,
7529,
353,
5159,
13,
4706,
1887,
29918,
1707,
29918,
5325,
353,
6571,
13,
13,
4706,
3573,
29918,
7529,
353,
6213,
13,
13,
4706,
396,
7331,
4839,
421,
23965,
29952,
13,
4706,
4839,
29918,
7529,
1839,
23965,
2033,
353,
1583,
29889,
2754,
29918,
4645,
7790,
13,
9651,
1831,
29918,
6672,
29918,
16044,
18959,
6214,
29914,
3126,
11287,
13,
4706,
565,
451,
4839,
29918,
7529,
1839,
23965,
2033,
29901,
13,
9651,
628,
4839,
29918,
7529,
1839,
23965,
2033,
13,
13,
4706,
396,
7331,
4839,
421,
3916,
29899,
1542,
29952,
13,
4706,
4839,
29918,
7529,
1839,
3916,
29899,
1542,
2033,
353,
1583,
29889,
2754,
29918,
4645,
7790,
13,
9651,
1831,
29918,
6672,
29918,
3051,
29918,
1853,
18959,
6214,
29914,
3126,
11287,
13,
13,
4706,
396,
27241,
4444,
13,
4706,
4817,
29918,
11027,
353,
5159,
13,
13,
4706,
736,
1583,
29889,
2754,
29918,
4645,
29889,
4804,
29918,
2754,
29898,
10314,
29918,
2084,
29892,
525,
5438,
742,
13,
462,
462,
9651,
2224,
29918,
7529,
29892,
13,
462,
462,
9651,
2346,
29918,
7529,
29892,
13,
462,
462,
9651,
4839,
29918,
7529,
29892,
13,
462,
462,
9651,
3573,
29922,
2587,
29918,
7529,
29892,
13,
462,
462,
9651,
1400,
29918,
7529,
29922,
689,
29918,
7529,
29892,
13,
462,
462,
9651,
2066,
29922,
2997,
29918,
1707,
29918,
5325,
29892,
13,
462,
462,
9651,
2933,
29918,
1853,
2433,
797,
1220,
5103,
29906,
29900,
29900,
29941,
742,
13,
462,
462,
9651,
4817,
29918,
11027,
29922,
5150,
29918,
11027,
29892,
13,
462,
462,
9651,
6939,
29922,
7529,
29889,
657,
877,
14035,
5477,
13,
462,
462,
9651,
903,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
29922,
7529,
29889,
657,
877,
29918,
2457,
29918,
1124,
29918,
1272,
29918,
6194,
8785,
13,
2
] |
controls/Detector.py | Barqawiz/Snnapy2-Filters | 9 | 108342 | """
License
-------
The MIT License (MIT)
Copyright (c) 2018 Snappy2 Project
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.
Created on Sat Dec 16 22:46:28 2017
@author: <NAME>
@Source: Github.com/Barqawiz
"""
import cv2
from keras.models import load_model
import numpy as np
from utils.Utility import Utility
import os
class Detector:
"""
Common class to detect areas of interest from images
Developed by: github.com/barqawiz
"""
def __init__(self):
base_folder = os.path.dirname(__file__)
self.face_cascade = cv2.CascadeClassifier(
os.path.join(base_folder,'../resource/haarcascades/haarcascade_frontalface_default.xml'))
self.model = load_model(os.path.join(base_folder, '../resource/models/keras_cv_base_model_1_avg.h5'))
def detect_faces(self, gray_human_image):
"""
Detect faces in image and return list of faces with related properties
:param gray_human_image: numpy gray image
:return: face_properties a list of dictionary with following information (face, loc, size)
"""
face_properties = []
faces = self.face_cascade.detectMultiScale(gray_human_image, 1.2, 7, minSize=(30, 30))
if len(faces) == 0:
faces = self.face_cascade.detectMultiScale(gray_human_image, 1.1, 8, minSize=(30, 30))
for (x, y, w, h) in faces:
# 1- detect face area
roi_image = gray_human_image[y:y + h, x:x + w]
face_properties.append({'face': roi_image, 'loc': (x, y), 'size': (w, h)})
return face_properties
def detect_key_points(self, face_properties, network_in_size=96):
"""
Detect key points areas in the face using neural network.
- key points for eyes, noise and mouth
:param face_properties:
:param network_in_size:
:return: key_properties a list of dictionary with following information (keys_x, keys_y, face_index)
"""
key_properties = []
index = 0
for face in face_properties:
# 0- get face information
roi_image = face['face']
x,y = face['loc']
w, h = face['size']
# 1- pre process
# prepare face image
roi_image = cv2.resize(roi_image, (network_in_size, network_in_size))
# scale pixel values to [0, 1]
roi_image = roi_image / 255
# reshape for netowork format
roi_image = roi_image.reshape(roi_image.shape[0], roi_image.shape[1], 1)
roi_image = np.array([roi_image])
# 2- predict face key points
y_predict = self.model.predict(roi_image)[0]
# map to original coordinates values
y_predict = Utility.reverse_nn_normalization(y_predict)
# 3- extract information
# get value within the original image
x_axis = y_predict[0::2]
y_axis = y_predict[1::2]
x_scale_factor = (w / 96)
y_scale_factor = (h / 96)
x_axis = x_axis * x_scale_factor + x
y_axis = y_axis * y_scale_factor + y
key_properties.append({'keys_x': x_axis, 'keys_y': y_axis, 'face_x': x, 'face_y': y,
'face_w': w, 'face_h': h, 'face_index': index})
index += 1
return key_properties
| [
1,
9995,
13,
29931,
293,
1947,
13,
26589,
13,
1678,
450,
341,
1806,
19245,
313,
26349,
29897,
13,
13,
1678,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29896,
29947,
22639,
14862,
29906,
8010,
13,
13,
1678,
20894,
2333,
338,
1244,
1609,
16896,
29892,
3889,
310,
8323,
29892,
304,
738,
2022,
4017,
292,
263,
3509,
13,
1678,
310,
445,
7047,
322,
6942,
5106,
2066,
313,
1552,
376,
6295,
14093,
4968,
304,
5376,
13,
1678,
297,
278,
18540,
1728,
24345,
29892,
3704,
1728,
29485,
278,
10462,
13,
1678,
304,
671,
29892,
3509,
29892,
6623,
29892,
10366,
29892,
9805,
29892,
1320,
2666,
29892,
269,
803,
1947,
29892,
322,
29914,
272,
19417,
13,
1678,
14591,
310,
278,
18540,
29892,
322,
304,
14257,
12407,
304,
6029,
278,
18540,
338,
13,
1678,
15252,
3276,
304,
437,
577,
29892,
4967,
304,
278,
1494,
5855,
29901,
13,
13,
1678,
450,
2038,
3509,
1266,
8369,
322,
445,
10751,
8369,
4091,
367,
5134,
297,
599,
13,
1678,
14591,
470,
23228,
2011,
1080,
310,
278,
18540,
29889,
13,
13,
20399,
373,
12178,
3826,
29871,
29896,
29953,
29871,
29906,
29906,
29901,
29946,
29953,
29901,
29906,
29947,
29871,
29906,
29900,
29896,
29955,
13,
13,
29992,
8921,
29901,
529,
5813,
29958,
13,
29992,
4435,
29901,
402,
2985,
29889,
510,
29914,
4297,
29939,
1450,
466,
13,
15945,
29908,
13,
13,
5215,
13850,
29906,
13,
3166,
13023,
294,
29889,
9794,
1053,
2254,
29918,
4299,
13,
5215,
12655,
408,
7442,
13,
3166,
3667,
29879,
29889,
7270,
537,
1053,
22310,
537,
13,
5215,
2897,
13,
13,
13,
1990,
5953,
3019,
29901,
13,
1678,
9995,
13,
1678,
13103,
770,
304,
6459,
10161,
310,
4066,
515,
4558,
13,
13,
1678,
10682,
287,
491,
29901,
18546,
29889,
510,
29914,
1646,
29939,
1450,
466,
13,
1678,
9995,
13,
1678,
822,
4770,
2344,
12035,
1311,
1125,
13,
4706,
2967,
29918,
12083,
353,
2897,
29889,
2084,
29889,
25721,
22168,
1445,
1649,
29897,
13,
4706,
1583,
29889,
2161,
29918,
9398,
6332,
353,
13850,
29906,
29889,
29907,
294,
6332,
2385,
3709,
29898,
13,
9651,
2897,
29889,
2084,
29889,
7122,
29898,
3188,
29918,
12083,
5501,
6995,
10314,
29914,
2350,
5666,
6151,
3076,
29914,
2350,
5666,
294,
6332,
29918,
8862,
284,
2161,
29918,
4381,
29889,
3134,
8785,
13,
4706,
1583,
29889,
4299,
353,
2254,
29918,
4299,
29898,
359,
29889,
2084,
29889,
7122,
29898,
3188,
29918,
12083,
29892,
29871,
525,
6995,
10314,
29914,
9794,
29914,
3946,
294,
29918,
11023,
29918,
3188,
29918,
4299,
29918,
29896,
29918,
485,
29887,
29889,
29882,
29945,
8785,
13,
13,
1678,
822,
6459,
29918,
8726,
29898,
1311,
29892,
16749,
29918,
26029,
29918,
3027,
1125,
13,
4706,
9995,
13,
4706,
5953,
522,
17240,
297,
1967,
322,
736,
1051,
310,
17240,
411,
4475,
4426,
13,
4706,
584,
3207,
16749,
29918,
26029,
29918,
3027,
29901,
12655,
16749,
1967,
13,
4706,
584,
2457,
29901,
3700,
29918,
11330,
263,
1051,
310,
8600,
411,
1494,
2472,
313,
2161,
29892,
1180,
29892,
2159,
29897,
13,
4706,
9995,
13,
4706,
3700,
29918,
11330,
353,
5159,
13,
4706,
17240,
353,
1583,
29889,
2161,
29918,
9398,
6332,
29889,
4801,
522,
15329,
17185,
29898,
21012,
29918,
26029,
29918,
3027,
29892,
29871,
29896,
29889,
29906,
29892,
29871,
29955,
29892,
1375,
3505,
7607,
29941,
29900,
29892,
29871,
29941,
29900,
876,
13,
4706,
565,
7431,
29898,
8726,
29897,
1275,
29871,
29900,
29901,
13,
9651,
17240,
353,
1583,
29889,
2161,
29918,
9398,
6332,
29889,
4801,
522,
15329,
17185,
29898,
21012,
29918,
26029,
29918,
3027,
29892,
29871,
29896,
29889,
29896,
29892,
29871,
29947,
29892,
1375,
3505,
7607,
29941,
29900,
29892,
29871,
29941,
29900,
876,
13,
13,
4706,
363,
313,
29916,
29892,
343,
29892,
281,
29892,
298,
29897,
297,
17240,
29901,
13,
9651,
396,
29871,
29896,
29899,
6459,
3700,
4038,
13,
9651,
14100,
29918,
3027,
353,
16749,
29918,
26029,
29918,
3027,
29961,
29891,
29901,
29891,
718,
298,
29892,
921,
29901,
29916,
718,
281,
29962,
13,
9651,
3700,
29918,
11330,
29889,
4397,
3319,
29915,
2161,
2396,
14100,
29918,
3027,
29892,
525,
2029,
2396,
313,
29916,
29892,
343,
511,
525,
2311,
2396,
313,
29893,
29892,
298,
26972,
13,
13,
4706,
736,
3700,
29918,
11330,
13,
13,
1678,
822,
6459,
29918,
1989,
29918,
9748,
29898,
1311,
29892,
3700,
29918,
11330,
29892,
3564,
29918,
262,
29918,
2311,
29922,
29929,
29953,
1125,
13,
4706,
9995,
13,
4706,
5953,
522,
1820,
3291,
10161,
297,
278,
3700,
773,
19677,
3564,
29889,
13,
9651,
448,
1820,
3291,
363,
5076,
29892,
11462,
322,
13394,
13,
13,
4706,
584,
3207,
3700,
29918,
11330,
29901,
13,
4706,
584,
3207,
3564,
29918,
262,
29918,
2311,
29901,
13,
4706,
584,
2457,
29901,
1820,
29918,
11330,
263,
1051,
310,
8600,
411,
1494,
2472,
313,
8149,
29918,
29916,
29892,
6611,
29918,
29891,
29892,
3700,
29918,
2248,
29897,
13,
4706,
9995,
13,
13,
4706,
1820,
29918,
11330,
353,
5159,
13,
4706,
2380,
353,
29871,
29900,
13,
4706,
363,
3700,
297,
3700,
29918,
11330,
29901,
13,
9651,
396,
29871,
29900,
29899,
679,
3700,
2472,
13,
9651,
14100,
29918,
3027,
353,
3700,
1839,
2161,
2033,
13,
9651,
921,
29892,
29891,
353,
3700,
1839,
2029,
2033,
13,
9651,
281,
29892,
298,
353,
3700,
1839,
2311,
2033,
13,
13,
9651,
396,
29871,
29896,
29899,
758,
1889,
13,
9651,
396,
19012,
3700,
1967,
13,
9651,
14100,
29918,
3027,
353,
13850,
29906,
29889,
21476,
29898,
307,
29875,
29918,
3027,
29892,
313,
11618,
29918,
262,
29918,
2311,
29892,
3564,
29918,
262,
29918,
2311,
876,
13,
9651,
396,
6287,
15526,
1819,
304,
518,
29900,
29892,
29871,
29896,
29962,
13,
9651,
14100,
29918,
3027,
353,
14100,
29918,
3027,
847,
29871,
29906,
29945,
29945,
13,
9651,
396,
620,
14443,
363,
7787,
340,
548,
3402,
13,
9651,
14100,
29918,
3027,
353,
14100,
29918,
3027,
29889,
690,
14443,
29898,
307,
29875,
29918,
3027,
29889,
12181,
29961,
29900,
1402,
14100,
29918,
3027,
29889,
12181,
29961,
29896,
1402,
29871,
29896,
29897,
13,
9651,
14100,
29918,
3027,
353,
7442,
29889,
2378,
4197,
307,
29875,
29918,
3027,
2314,
13,
13,
9651,
396,
29871,
29906,
29899,
8500,
3700,
1820,
3291,
13,
9651,
343,
29918,
27711,
353,
1583,
29889,
4299,
29889,
27711,
29898,
307,
29875,
29918,
3027,
9601,
29900,
29962,
13,
9651,
396,
2910,
304,
2441,
10350,
1819,
13,
9651,
343,
29918,
27711,
353,
22310,
537,
29889,
24244,
29918,
15755,
29918,
8945,
2133,
29898,
29891,
29918,
27711,
29897,
13,
13,
9651,
396,
29871,
29941,
29899,
6597,
2472,
13,
9651,
396,
679,
995,
2629,
278,
2441,
1967,
13,
9651,
921,
29918,
8990,
353,
343,
29918,
27711,
29961,
29900,
1057,
29906,
29962,
13,
9651,
343,
29918,
8990,
353,
343,
29918,
27711,
29961,
29896,
1057,
29906,
29962,
13,
9651,
921,
29918,
7052,
29918,
19790,
353,
313,
29893,
847,
29871,
29929,
29953,
29897,
13,
9651,
343,
29918,
7052,
29918,
19790,
353,
313,
29882,
847,
29871,
29929,
29953,
29897,
13,
9651,
921,
29918,
8990,
353,
921,
29918,
8990,
334,
921,
29918,
7052,
29918,
19790,
718,
921,
13,
9651,
343,
29918,
8990,
353,
343,
29918,
8990,
334,
343,
29918,
7052,
29918,
19790,
718,
343,
13,
13,
9651,
1820,
29918,
11330,
29889,
4397,
3319,
29915,
8149,
29918,
29916,
2396,
921,
29918,
8990,
29892,
525,
8149,
29918,
29891,
2396,
343,
29918,
8990,
29892,
525,
2161,
29918,
29916,
2396,
921,
29892,
525,
2161,
29918,
29891,
2396,
343,
29892,
13,
462,
462,
259,
525,
2161,
29918,
29893,
2396,
281,
29892,
525,
2161,
29918,
29882,
2396,
298,
29892,
525,
2161,
29918,
2248,
2396,
2380,
1800,
13,
9651,
2380,
4619,
29871,
29896,
13,
13,
4706,
736,
1820,
29918,
11330,
13,
2
] |
ahgl/tournaments/management/commands/compute_stats.py | ourobouros/ahgl-site | 1 | 1604575 | <reponame>ourobouros/ahgl-site<gh_stars>1-10
# coding=utf8
from __future__ import print_function
from django.core.management.base import BaseCommand, CommandError
from tournaments.models import TeamRoundMembership, Tournament
from profiles.models import Team
class Command(BaseCommand):
args = '<tournament_slug>'
help = 'Updates all stats for teams and team round memberships'
def handle(self, *args, **options):
try:
self.tournament = Tournament.objects.get(slug=args[0])
except Tournament.DoesNotExist:
raise CommandError("Tournament {0} does not exist".format(args[0]))
for team in Team.objects.filter(tournament=self.tournament):
team.update_stats()
for membership in TeamRoundMembership.objects.filter(tournamentround__tournament=self.tournament):
membership.update_stats()
| [
1,
529,
276,
1112,
420,
29958,
283,
13716,
283,
1883,
29914,
801,
3820,
29899,
2746,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
14137,
29922,
9420,
29947,
13,
3166,
4770,
29888,
9130,
1649,
1053,
1596,
29918,
2220,
13,
13,
3166,
9557,
29889,
3221,
29889,
21895,
29889,
3188,
1053,
7399,
6255,
29892,
10516,
2392,
13,
13,
3166,
14743,
29879,
29889,
9794,
1053,
8583,
29934,
618,
29924,
1590,
10475,
29892,
29427,
13,
3166,
28723,
29889,
9794,
1053,
8583,
13,
13,
13,
1990,
10516,
29898,
5160,
6255,
1125,
13,
1678,
6389,
353,
12801,
29873,
2905,
1166,
29918,
29517,
16299,
13,
1678,
1371,
353,
525,
3373,
15190,
599,
22663,
363,
10907,
322,
3815,
4513,
5144,
14587,
29915,
13,
13,
1678,
822,
4386,
29898,
1311,
29892,
334,
5085,
29892,
3579,
6768,
1125,
13,
4706,
1018,
29901,
13,
9651,
1583,
29889,
29873,
2905,
1166,
353,
29427,
29889,
12650,
29889,
657,
29898,
29517,
29922,
5085,
29961,
29900,
2314,
13,
4706,
5174,
29427,
29889,
25125,
3664,
1252,
391,
29901,
13,
9651,
12020,
10516,
2392,
703,
29911,
2905,
1166,
426,
29900,
29913,
947,
451,
1863,
1642,
4830,
29898,
5085,
29961,
29900,
12622,
13,
13,
4706,
363,
3815,
297,
8583,
29889,
12650,
29889,
4572,
29898,
29873,
2905,
1166,
29922,
1311,
29889,
29873,
2905,
1166,
1125,
13,
9651,
3815,
29889,
5504,
29918,
16202,
580,
13,
4706,
363,
28512,
297,
8583,
29934,
618,
29924,
1590,
10475,
29889,
12650,
29889,
4572,
29898,
29873,
2905,
1166,
14486,
1649,
29873,
2905,
1166,
29922,
1311,
29889,
29873,
2905,
1166,
1125,
13,
9651,
28512,
29889,
5504,
29918,
16202,
580,
13,
2
] |
1979.py | gabrielld06/Exercicios-URI | 0 | 102214 | <reponame>gabrielld06/Exercicios-URI<filename>1979.py
# Busca em largura carecalol
from collections import deque
class Graph:
def __init__(self, V, Adj):
self.V = V
self.Adj = Adj
class Vertex:
def __init__(self, d, cor):
self.d = d
self.cor = cor
def enqueue(Q,v):
Q.append(v)
def dequeue(Q):
return Q.popleft()
def bfs(G, s):
G.V[s].d = True
G.V[s].cor = 'cinza'
Q = deque([])
enqueue(Q,s)
while(len(Q) != 0):
u = dequeue(Q)
for v in G.Adj[u]:
if G.V[v].cor == 'branco':
G.V[v].cor = 'cinza'
G.V[v].d = not G.V[u].d
enqueue(Q, v)
elif u != v and G.V[u].d == G.V[v].d:
return False
G.V[u].cor = 'preto'
return True
n = int(input())
while(n != 0):
g = Graph([], [])
g.V = [Vertex(None, 'branco') for i in range(n)]
g.Adj = []
for i in range(n):
index = int(input()) - 1
line = input().split()
g.Adj.append([])
for i in range(len(line)):
g.Adj[index].append(int(line[i])-1)
resp = "SIM" if bfs(g, 0) else "NAO"
print(resp)
n = int(input())
| [
1,
529,
276,
1112,
420,
29958,
29887,
370,
12836,
430,
29900,
29953,
29914,
1252,
6269,
19382,
29899,
15551,
29966,
9507,
29958,
29896,
29929,
29955,
29929,
29889,
2272,
13,
29937,
8406,
1113,
953,
5573,
2002,
2562,
1052,
324,
13,
3166,
16250,
1053,
316,
802,
13,
13,
1990,
12367,
29901,
13,
29871,
822,
4770,
2344,
12035,
1311,
29892,
478,
29892,
2087,
29926,
1125,
13,
1678,
1583,
29889,
29963,
353,
478,
13,
1678,
1583,
29889,
3253,
29926,
353,
2087,
29926,
13,
13,
1990,
1798,
4776,
29901,
13,
29871,
822,
4770,
2344,
12035,
1311,
29892,
270,
29892,
1034,
1125,
13,
1678,
1583,
29889,
29881,
353,
270,
13,
1678,
1583,
29889,
2616,
353,
1034,
13,
13,
1753,
427,
9990,
29898,
29984,
29892,
29894,
1125,
13,
1678,
660,
29889,
4397,
29898,
29894,
29897,
13,
268,
13,
1753,
316,
9990,
29898,
29984,
1125,
13,
1678,
736,
660,
29889,
7323,
1563,
580,
13,
13,
1753,
289,
5847,
29898,
29954,
29892,
269,
1125,
13,
1678,
402,
29889,
29963,
29961,
29879,
1822,
29881,
353,
5852,
13,
1678,
402,
29889,
29963,
29961,
29879,
1822,
2616,
353,
525,
16381,
1362,
29915,
13,
1678,
660,
353,
316,
802,
4197,
2314,
13,
1678,
427,
9990,
29898,
29984,
29892,
29879,
29897,
13,
1678,
1550,
29898,
2435,
29898,
29984,
29897,
2804,
29871,
29900,
1125,
13,
4706,
318,
353,
316,
9990,
29898,
29984,
29897,
13,
4706,
363,
325,
297,
402,
29889,
3253,
29926,
29961,
29884,
5387,
13,
9651,
565,
402,
29889,
29963,
29961,
29894,
1822,
2616,
1275,
525,
29890,
661,
1111,
2396,
13,
18884,
402,
29889,
29963,
29961,
29894,
1822,
2616,
353,
525,
16381,
1362,
29915,
13,
18884,
402,
29889,
29963,
29961,
29894,
1822,
29881,
353,
451,
402,
29889,
29963,
29961,
29884,
1822,
29881,
13,
18884,
427,
9990,
29898,
29984,
29892,
325,
29897,
13,
9651,
25342,
318,
2804,
325,
322,
402,
29889,
29963,
29961,
29884,
1822,
29881,
1275,
402,
29889,
29963,
29961,
29894,
1822,
29881,
29901,
13,
18884,
736,
7700,
13,
4706,
402,
29889,
29963,
29961,
29884,
1822,
2616,
353,
525,
1457,
517,
29915,
13,
1678,
736,
5852,
13,
13,
29876,
353,
938,
29898,
2080,
3101,
13,
8000,
29898,
29876,
2804,
29871,
29900,
1125,
13,
1678,
330,
353,
12367,
4197,
1402,
518,
2314,
13,
1678,
330,
29889,
29963,
353,
518,
22479,
29898,
8516,
29892,
525,
29890,
661,
1111,
1495,
363,
474,
297,
3464,
29898,
29876,
4638,
13,
1678,
330,
29889,
3253,
29926,
353,
5159,
13,
1678,
363,
474,
297,
3464,
29898,
29876,
1125,
13,
4706,
2380,
353,
938,
29898,
2080,
3101,
448,
29871,
29896,
13,
4706,
1196,
353,
1881,
2141,
5451,
580,
13,
4706,
330,
29889,
3253,
29926,
29889,
4397,
4197,
2314,
13,
4706,
363,
474,
297,
3464,
29898,
2435,
29898,
1220,
22164,
13,
9651,
330,
29889,
3253,
29926,
29961,
2248,
1822,
4397,
29898,
524,
29898,
1220,
29961,
29875,
2314,
29899,
29896,
29897,
13,
1678,
4613,
353,
376,
5425,
29924,
29908,
565,
289,
5847,
29898,
29887,
29892,
29871,
29900,
29897,
1683,
376,
3521,
29949,
29908,
13,
1678,
1596,
29898,
13713,
29897,
13,
1678,
302,
353,
938,
29898,
2080,
3101,
13,
268,
13,
2
] |
src/compas_fab/ghpython/artists.py | yck011522/compas_fab | 64 | 147034 | <gh_stars>10-100
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import compas
if compas.RHINO:
from compas_ghpython.artists import RobotModelArtist
__all__ = [
'RobotArtist',
'RobotModelArtist',
]
# deprecated alias
RobotArtist = RobotModelArtist
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
3166,
4770,
29888,
9130,
1649,
1053,
8380,
29918,
5215,
13,
3166,
4770,
29888,
9130,
1649,
1053,
8542,
13,
3166,
4770,
29888,
9130,
1649,
1053,
1596,
29918,
2220,
13,
13,
5215,
752,
294,
13,
13,
361,
752,
294,
29889,
29934,
29950,
1177,
29949,
29901,
13,
1678,
515,
752,
294,
29918,
12443,
4691,
29889,
442,
2879,
1053,
6417,
327,
3195,
9986,
391,
13,
13,
1678,
4770,
497,
1649,
353,
518,
13,
4706,
525,
21860,
327,
9986,
391,
742,
13,
4706,
525,
21860,
327,
3195,
9986,
391,
742,
13,
1678,
4514,
13,
13,
1678,
396,
18164,
13995,
13,
1678,
6417,
327,
9986,
391,
353,
6417,
327,
3195,
9986,
391,
13,
2
] |
server/webdriver_tests/place_landing_test.py | n-h-diaz/website | 0 | 77910 | <reponame>n-h-diaz/website<gh_stars>0
# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from webdriver_tests.base_test import WebdriverBaseTest
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC
class TestPlaceLanding(WebdriverBaseTest):
"""Tests for Place Landing page."""
def test_place_landing_en(self):
"""Test place landing page in EN."""
self.driver.get(self.url_ + '/place')
subtitle_present = EC.text_to_be_present_in_element((By.TAG_NAME, 'h1'),
'Place Explorer')
WebDriverWait(self.driver, self.TIMEOUT_SEC).until(subtitle_present)
intro = self.driver.find_element_by_xpath('//*[@id="body"]/p[1]')
self.assertTrue(
intro.text.startswith(
'The Place Explorer tool helps you understand'))
chicago = self.driver.find_element_by_xpath(
'//*[@id="body"]/ul[1]/li[1]/a[1]')
self.assertEqual(chicago.text, 'Chicago, IL')
kentucky = self.driver.find_element_by_xpath(
'//*[@id="body"]/ul[1]/li[3]/a[4]')
self.assertEqual(kentucky.text, 'Kentucky')
self.assertEqual(kentucky.get_attribute('href'),
self.url_ + '/place/geoId/21')
median_income = self.driver.find_element_by_xpath(
'//*[@id="body"]/ul[2]/li[1]/strong')
self.assertEqual(median_income.text, 'Median Income, United States')
gni = self.driver.find_element_by_xpath(
'//*[@id="body"]/ul[2]/li[4]/a[2]')
self.assertEqual(gni.text, 'Gross National Income')
self.assertEqual(
gni.get_attribute('href'), self.url_ +
'/ranking/Amount_EconomicActivity_GrossNationalIncome_PurchasingPowerParity_PerCapita/Country/'
)
map_search = self.driver.find_element_by_xpath(
'//*[@id="place-autocomplete"]')
self.assertEqual(map_search.get_attribute('placeholder'),
'Enter a country, state, county or city')
def test_place_landing_ru(self):
"""Test place landing page in RU."""
self.driver.get(self.url_ + '/place?hl=ru')
subtitle_present = EC.text_to_be_present_in_element((By.TAG_NAME, 'h1'),
'Place Explorer')
WebDriverWait(self.driver, self.TIMEOUT_SEC).until(subtitle_present)
intro = self.driver.find_element_by_xpath('//*[@id="body"]/p[1]')
self.assertTrue(
intro.text.startswith(
'Place Explorer – это инструмент, который помогает'))
chicago = self.driver.find_element_by_xpath(
'//*[@id="body"]/ul[1]/li[1]/a[1]')
self.assertEqual(chicago.text, 'Чикаго, Иллинойс')
kentucky = self.driver.find_element_by_xpath(
'//*[@id="body"]/ul[1]/li[3]/a[4]')
self.assertEqual(kentucky.text, 'Кентукки')
self.assertEqual(kentucky.get_attribute('href'),
self.url_ + '/place/geoId/21?hl=ru')
median_income = self.driver.find_element_by_xpath(
'//*[@id="body"]/ul[2]/li[1]/strong')
self.assertEqual(median_income.text, 'Медианный доход в США')
gni = self.driver.find_element_by_xpath(
'//*[@id="body"]/ul[2]/li[4]/a[2]')
self.assertEqual(gni.text, 'Валовой национальный доход')
self.assertEqual(
gni.get_attribute('href'), self.url_ +
'/ranking/Amount_EconomicActivity_GrossNationalIncome_PurchasingPowerParity_PerCapita/Country/?hl=ru'
)
map_search = self.driver.find_element_by_xpath(
'//*[@id="place-autocomplete"]')
self.assertEqual(map_search.get_attribute('placeholder'),
'Укажите страну, штат, округ или город')
| [
1,
529,
276,
1112,
420,
29958,
29876,
29899,
29882,
29899,
15321,
29920,
29914,
22942,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
14187,
1266,
29871,
29906,
29900,
29906,
29896,
5087,
365,
12182,
13,
29937,
13,
29937,
10413,
21144,
1090,
278,
13380,
19245,
29892,
10079,
29871,
29906,
29889,
29900,
313,
1552,
376,
29931,
293,
1947,
1496,
13,
29937,
366,
1122,
451,
671,
445,
934,
5174,
297,
752,
13036,
411,
278,
19245,
29889,
13,
29937,
887,
1122,
4017,
263,
3509,
310,
278,
19245,
472,
13,
29937,
13,
29937,
418,
1732,
597,
1636,
29889,
4288,
29889,
990,
29914,
506,
11259,
29914,
27888,
1430,
1660,
29899,
29906,
29889,
29900,
13,
29937,
13,
29937,
25870,
3734,
491,
22903,
4307,
470,
15502,
304,
297,
5007,
29892,
7047,
13,
29937,
13235,
1090,
278,
19245,
338,
13235,
373,
385,
376,
3289,
8519,
29908,
350,
3289,
3235,
29892,
13,
29937,
399,
1806,
8187,
2692,
399,
1718,
29934,
13566,
29059,
6323,
8707,
29928,
22122,
29903,
8079,
13764,
29979,
476,
22255,
29892,
2845,
4653,
470,
2411,
2957,
29889,
13,
29937,
2823,
278,
19245,
363,
278,
2702,
4086,
14765,
1076,
11239,
322,
13,
29937,
27028,
1090,
278,
19245,
29889,
13,
13,
3166,
1856,
9465,
29918,
21150,
29889,
3188,
29918,
1688,
1053,
2563,
9465,
5160,
3057,
13,
3166,
18866,
29889,
29813,
29889,
5924,
29889,
1481,
1053,
2563,
12376,
15716,
13,
3166,
18866,
29889,
29813,
29889,
9435,
29889,
1609,
1053,
2648,
13,
3166,
18866,
29889,
29813,
29889,
5924,
1053,
3806,
29918,
1116,
2187,
408,
17522,
13,
13,
13,
1990,
4321,
22150,
22677,
292,
29898,
3609,
9465,
5160,
3057,
1125,
13,
1678,
9995,
24376,
363,
15484,
3172,
292,
1813,
1213,
15945,
13,
13,
1678,
822,
1243,
29918,
6689,
29918,
1049,
292,
29918,
264,
29898,
1311,
1125,
13,
4706,
9995,
3057,
2058,
25325,
1813,
297,
12524,
1213,
15945,
13,
13,
4706,
1583,
29889,
9465,
29889,
657,
29898,
1311,
29889,
2271,
29918,
718,
8207,
6689,
1495,
13,
13,
4706,
1014,
3257,
29918,
6338,
353,
17522,
29889,
726,
29918,
517,
29918,
915,
29918,
6338,
29918,
262,
29918,
5029,
3552,
2059,
29889,
16881,
29918,
5813,
29892,
525,
29882,
29896,
5477,
13,
462,
462,
462,
9651,
525,
22150,
21508,
1495,
13,
4706,
2563,
12376,
15716,
29898,
1311,
29889,
9465,
29892,
1583,
29889,
15307,
12015,
29918,
1660,
29907,
467,
29305,
29898,
1491,
3257,
29918,
6338,
29897,
13,
13,
4706,
22909,
353,
1583,
29889,
9465,
29889,
2886,
29918,
5029,
29918,
1609,
29918,
23635,
877,
458,
29930,
17548,
333,
543,
2587,
3108,
29914,
29886,
29961,
29896,
29962,
1495,
13,
4706,
1583,
29889,
9294,
5574,
29898,
13,
9651,
22909,
29889,
726,
29889,
27382,
2541,
29898,
13,
18884,
525,
1576,
15484,
21508,
5780,
6911,
366,
2274,
8785,
13,
13,
4706,
521,
9384,
353,
1583,
29889,
9465,
29889,
2886,
29918,
5029,
29918,
1609,
29918,
23635,
29898,
13,
9651,
525,
458,
29930,
17548,
333,
543,
2587,
3108,
29914,
352,
29961,
29896,
16261,
492,
29961,
29896,
16261,
29874,
29961,
29896,
29962,
1495,
13,
4706,
1583,
29889,
9294,
9843,
29898,
305,
9384,
29889,
726,
29892,
525,
1451,
9384,
29892,
17674,
1495,
13,
13,
4706,
413,
296,
14395,
353,
1583,
29889,
9465,
29889,
2886,
29918,
5029,
29918,
1609,
29918,
23635,
29898,
13,
9651,
525,
458,
29930,
17548,
333,
543,
2587,
3108,
29914,
352,
29961,
29896,
16261,
492,
29961,
29941,
16261,
29874,
29961,
29946,
29962,
1495,
13,
4706,
1583,
29889,
9294,
9843,
29898,
29895,
296,
14395,
29889,
726,
29892,
525,
29968,
296,
14395,
1495,
13,
4706,
1583,
29889,
9294,
9843,
29898,
29895,
296,
14395,
29889,
657,
29918,
12715,
877,
12653,
5477,
13,
462,
308,
1583,
29889,
2271,
29918,
718,
8207,
6689,
29914,
24756,
1204,
29914,
29906,
29896,
1495,
13,
13,
4706,
19194,
29918,
262,
2763,
353,
1583,
29889,
9465,
29889,
2886,
29918,
5029,
29918,
1609,
29918,
23635,
29898,
13,
9651,
525,
458,
29930,
17548,
333,
543,
2587,
3108,
29914,
352,
29961,
29906,
16261,
492,
29961,
29896,
16261,
1110,
1495,
13,
4706,
1583,
29889,
9294,
9843,
29898,
2168,
713,
29918,
262,
2763,
29889,
726,
29892,
525,
19302,
713,
512,
2763,
29892,
3303,
3900,
1495,
13,
13,
4706,
330,
1240,
353,
1583,
29889,
9465,
29889,
2886,
29918,
5029,
29918,
1609,
29918,
23635,
29898,
13,
9651,
525,
458,
29930,
17548,
333,
543,
2587,
3108,
29914,
352,
29961,
29906,
16261,
492,
29961,
29946,
16261,
29874,
29961,
29906,
29962,
1495,
13,
4706,
1583,
29889,
9294,
9843,
29898,
29887,
1240,
29889,
726,
29892,
525,
29954,
2124,
3086,
512,
2763,
1495,
13,
4706,
1583,
29889,
9294,
9843,
29898,
13,
9651,
330,
1240,
29889,
657,
29918,
12715,
877,
12653,
5477,
1583,
29889,
2271,
29918,
718,
13,
9651,
8207,
661,
9292,
29914,
18087,
29918,
29923,
4599,
293,
3886,
29918,
29954,
2124,
27325,
797,
2763,
29918,
29925,
2458,
5832,
21472,
2177,
537,
29918,
5894,
12415,
2028,
29914,
20779,
22208,
13,
4706,
1723,
13,
13,
4706,
2910,
29918,
4478,
353,
1583,
29889,
9465,
29889,
2886,
29918,
5029,
29918,
1609,
29918,
23635,
29898,
13,
9651,
525,
458,
29930,
17548,
333,
543,
6689,
29899,
6921,
8835,
3108,
1495,
13,
4706,
1583,
29889,
9294,
9843,
29898,
1958,
29918,
4478,
29889,
657,
29918,
12715,
877,
27074,
5477,
13,
462,
308,
525,
10399,
263,
4234,
29892,
2106,
29892,
15178,
470,
4272,
1495,
13,
13,
1678,
822,
1243,
29918,
6689,
29918,
1049,
292,
29918,
582,
29898,
1311,
1125,
13,
4706,
9995,
3057,
2058,
25325,
1813,
297,
390,
29965,
1213,
15945,
13,
13,
4706,
1583,
29889,
9465,
29889,
657,
29898,
1311,
29889,
2271,
29918,
718,
8207,
6689,
29973,
4415,
29922,
582,
1495,
13,
13,
4706,
1014,
3257,
29918,
6338,
353,
17522,
29889,
726,
29918,
517,
29918,
915,
29918,
6338,
29918,
262,
29918,
5029,
3552,
2059,
29889,
16881,
29918,
5813,
29892,
525,
29882,
29896,
5477,
13,
462,
462,
462,
9651,
525,
22150,
21508,
1495,
13,
4706,
2563,
12376,
15716,
29898,
1311,
29889,
9465,
29892,
1583,
29889,
15307,
12015,
29918,
1660,
29907,
467,
29305,
29898,
1491,
3257,
29918,
6338,
29897,
13,
13,
4706,
22909,
353,
1583,
29889,
9465,
29889,
2886,
29918,
5029,
29918,
1609,
29918,
23635,
877,
458,
29930,
17548,
333,
543,
2587,
3108,
29914,
29886,
29961,
29896,
29962,
1495,
13,
4706,
1583,
29889,
9294,
5574,
29898,
13,
9651,
22909,
29889,
726,
29889,
27382,
2541,
29898,
13,
18884,
525,
22150,
21508,
785,
6408,
5068,
18212,
12275,
29892,
12423,
14752,
1779,
1257,
8785,
13,
13,
4706,
521,
9384,
353,
1583,
29889,
9465,
29889,
2886,
29918,
5029,
29918,
1609,
29918,
23635,
29898,
13,
9651,
525,
458,
29930,
17548,
333,
543,
2587,
3108,
29914,
352,
29961,
29896,
16261,
492,
29961,
29896,
16261,
29874,
29961,
29896,
29962,
1495,
13,
4706,
1583,
29889,
9294,
9843,
29898,
305,
9384,
29889,
726,
29892,
525,
30076,
29917,
642,
588,
29892,
2081,
15216,
2082,
29935,
1495,
13,
13,
4706,
413,
296,
14395,
353,
1583,
29889,
9465,
29889,
2886,
29918,
5029,
29918,
1609,
29918,
23635,
29898,
13,
9651,
525,
458,
29930,
17548,
333,
543,
2587,
3108,
29914,
352,
29961,
29896,
16261,
492,
29961,
29941,
16261,
29874,
29961,
29946,
29962,
1495,
13,
4706,
1583,
29889,
9294,
9843,
29898,
29895,
296,
14395,
29889,
726,
29892,
525,
30014,
656,
1500,
29951,
717,
1495,
13,
4706,
1583,
29889,
9294,
9843,
29898,
29895,
296,
14395,
29889,
657,
29918,
12715,
877,
12653,
5477,
13,
462,
308,
1583,
29889,
2271,
29918,
718,
8207,
6689,
29914,
24756,
1204,
29914,
29906,
29896,
29973,
4415,
29922,
582,
1495,
13,
13,
4706,
19194,
29918,
262,
2763,
353,
1583,
29889,
9465,
29889,
2886,
29918,
5029,
29918,
1609,
29918,
23635,
29898,
13,
9651,
525,
458,
29930,
17548,
333,
543,
2587,
3108,
29914,
352,
29961,
29906,
16261,
492,
29961,
29896,
16261,
1110,
1495,
13,
4706,
1583,
29889,
9294,
9843,
29898,
2168,
713,
29918,
262,
2763,
29889,
726,
29892,
525,
30017,
14996,
745,
2370,
1447,
11011,
490,
11378,
1495,
13,
13,
4706,
330,
1240,
353,
1583,
29889,
9465,
29889,
2886,
29918,
5029,
29918,
1609,
29918,
23635,
29898,
13,
9651,
525,
458,
29930,
17548,
333,
543,
2587,
3108,
29914,
352,
29961,
29906,
16261,
492,
29961,
29946,
16261,
29874,
29961,
29906,
29962,
1495,
13,
4706,
1583,
29889,
9294,
9843,
29898,
29887,
1240,
29889,
726,
29892,
525,
30012,
11887,
10848,
21524,
2370,
1447,
11011,
1495,
13,
4706,
1583,
29889,
9294,
9843,
29898,
13,
9651,
330,
1240,
29889,
657,
29918,
12715,
877,
12653,
5477,
1583,
29889,
2271,
29918,
718,
13,
9651,
8207,
661,
9292,
29914,
18087,
29918,
29923,
4599,
293,
3886,
29918,
29954,
2124,
27325,
797,
2763,
29918,
29925,
2458,
5832,
21472,
2177,
537,
29918,
5894,
12415,
2028,
29914,
20779,
13401,
4415,
29922,
582,
29915,
13,
4706,
1723,
13,
13,
4706,
2910,
29918,
4478,
353,
1583,
29889,
9465,
29889,
2886,
29918,
5029,
29918,
1609,
29918,
23635,
29898,
13,
9651,
525,
458,
29930,
17548,
333,
543,
6689,
29899,
6921,
8835,
3108,
1495,
13,
4706,
1583,
29889,
9294,
9843,
29898,
1958,
29918,
4478,
29889,
657,
29918,
12715,
877,
27074,
5477,
13,
462,
308,
525,
30053,
642,
1969,
730,
8440,
1864,
29892,
13619,
29932,
29892,
9414,
29969,
7082,
12816,
1495,
13,
2
] |
api/routes/simulation_list.py | AlbertQueiroz/finalchallenge-api | 3 | 198302 | from flask import jsonify
from api import app
import logging as logger
from api.controllers import responseListOfCoinsSimulation as request_simulation_list_coins
response = request_simulation_list_coins.response_list()
@app.route('/api/v1/simulationlist/', methods=['GET'])
def simulation_list():
logger.debug("Inside the get method of Simulation List")
http_code = 200
return jsonify({
'simulationlist': response
}), http_code
| [
1,
515,
29784,
1053,
4390,
1598,
13,
3166,
7882,
1053,
623,
13,
13,
5215,
12183,
408,
17927,
13,
3166,
7882,
29889,
1285,
11897,
1053,
2933,
1293,
2776,
7967,
1144,
8942,
2785,
408,
2009,
29918,
3601,
2785,
29918,
1761,
29918,
1111,
1144,
13,
13,
5327,
353,
2009,
29918,
3601,
2785,
29918,
1761,
29918,
1111,
1144,
29889,
5327,
29918,
1761,
580,
13,
13,
13,
29992,
932,
29889,
13134,
11219,
2754,
29914,
29894,
29896,
29914,
3601,
2785,
1761,
29914,
742,
3519,
29922,
1839,
7194,
11287,
13,
1753,
17402,
29918,
1761,
7295,
13,
1678,
17927,
29889,
8382,
703,
797,
2975,
278,
679,
1158,
310,
3439,
2785,
2391,
1159,
13,
1678,
1732,
29918,
401,
353,
29871,
29906,
29900,
29900,
13,
13,
1678,
736,
4390,
1598,
3319,
13,
4706,
525,
3601,
2785,
1761,
2396,
2933,
13,
1678,
500,
511,
1732,
29918,
401,
13,
2
] |
sols/696.py | Paul11100/LeetCode | 0 | 116928 | class Solution:
# Count Consecutive Groups (Top Voted), O(n) time and space
def countBinarySubstrings(self, s: str) -> int:
s = list(map(len, s.replace('01', '0 1').replace('10', '1 0').split()))
return sum(min(a, b) for a, b in zip(s, s[1:]))
# Linear Scan (Solution), O(n) time, O(1) space
def countBinarySubstrings(self, s: str) -> int:
ans, prev, cur = 0, 0, 1
for i in range(1, len(s)):
if s[i-1] != s[i]:
ans += min(prev, cur)
prev, cur = cur, 1
else:
cur += 1
return ans + min(prev, cur)
| [
1,
770,
24380,
29901,
13,
1678,
396,
3917,
1281,
3471,
11067,
1632,
4410,
313,
7031,
478,
5715,
511,
438,
29898,
29876,
29897,
931,
322,
2913,
13,
1678,
822,
2302,
25196,
4035,
19651,
29898,
1311,
29892,
269,
29901,
851,
29897,
1599,
938,
29901,
13,
4706,
269,
353,
1051,
29898,
1958,
29898,
2435,
29892,
269,
29889,
6506,
877,
29900,
29896,
742,
525,
29900,
29871,
29896,
2824,
6506,
877,
29896,
29900,
742,
525,
29896,
29871,
29900,
2824,
5451,
22130,
13,
4706,
736,
2533,
29898,
1195,
29898,
29874,
29892,
289,
29897,
363,
263,
29892,
289,
297,
14319,
29898,
29879,
29892,
269,
29961,
29896,
29901,
12622,
13,
13,
1678,
396,
22985,
2522,
273,
313,
13296,
918,
511,
438,
29898,
29876,
29897,
931,
29892,
438,
29898,
29896,
29897,
2913,
13,
1678,
822,
2302,
25196,
4035,
19651,
29898,
1311,
29892,
269,
29901,
851,
29897,
1599,
938,
29901,
13,
4706,
6063,
29892,
12379,
29892,
3151,
353,
29871,
29900,
29892,
29871,
29900,
29892,
29871,
29896,
13,
4706,
363,
474,
297,
3464,
29898,
29896,
29892,
7431,
29898,
29879,
22164,
13,
9651,
565,
269,
29961,
29875,
29899,
29896,
29962,
2804,
269,
29961,
29875,
5387,
13,
18884,
6063,
4619,
1375,
29898,
16304,
29892,
3151,
29897,
13,
18884,
12379,
29892,
3151,
353,
3151,
29892,
29871,
29896,
13,
9651,
1683,
29901,
13,
18884,
3151,
4619,
29871,
29896,
13,
13,
4706,
736,
6063,
718,
1375,
29898,
16304,
29892,
3151,
29897,
13,
2
] |
rangeofprimenumbers.py | bjoffficial/Python | 0 | 70351 | <gh_stars>0
n=int(input("From number"))
n1=int(input("To number"))
for i in range(n,n1):
for j in range(2,i):
if i%j==0:
break
else:
print(i)
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
29876,
29922,
524,
29898,
2080,
703,
4591,
1353,
5783,
30004,
13,
29876,
29896,
29922,
524,
29898,
2080,
703,
1762,
1353,
5783,
30004,
13,
1454,
474,
297,
3464,
29898,
29876,
29892,
29876,
29896,
1125,
30004,
13,
1678,
363,
432,
297,
3464,
29898,
29906,
29892,
29875,
1125,
30004,
13,
4706,
565,
474,
29995,
29926,
1360,
29900,
29901,
30004,
13,
9651,
2867,
30004,
13,
1678,
1683,
29901,
30004,
13,
4706,
1596,
29898,
29875,
8443,
13,
2
] |
dmxnet/bin/node.py | BasementCat/dmxnet | 0 | 115419 | <gh_stars>0
import argparse
import time
import glob
import os
from dmxpy.DmxPy import DmxPy
from dmxnet import ESP
def parse_args():
p = argparse.ArgumentParser(description="Run a node that translates network data to DMX commands")
p.add_argument('-t', '--type', default='ESP', choices=['ESP'], help="Node network protocol type")
p.add_argument('-a', '--address', help="Bind to this address")
p.add_argument('-p', '--port', type=int, help="Bind to this port")
p.add_argument('-u', '--universe', type=int, help="Respond only to this DMX universe, default is to respond to all")
p.add_argument('-d', '--device', default='/dev/ttyUSB0', help="Use this USB device, can be a path to a device file, or a vendor:product ID")
p.add_argument('-s', '--serial', help="Serial of this node, default is the MAC address")
p.add_argument('-n', '--name', help="Name of this node, default is the system hostname")
p.add_argument('--discover', action='store_true', help="Discover nodes on the network, and exit")
return p.parse_args()
def find_device_file(name):
# Name is either a path (/dev/ttyUSB0) which might change, or a device ID (0403:6001) which does not
if name.startswith('/') or ':' not in name:
# Assume file
return name
if ':' not in name:
raise ValueError(f"Not a valid device ID: {name}")
hexint = lambda v: int(v, 16)
vendor, product = map(hexint, name.split(':'))
for dev in glob.glob('/sys/bus/usb-serial/devices/*'):
devname = os.path.basename(dev)
with open(os.path.join(dev, '../uevent'), 'r') as fp:
for line in fp:
line = line.strip()
if line and '=' in line:
param, value = line.split('=')
if param == 'PRODUCT':
testvendor, testproduct = map(hexint, value.split('/')[:2])
if testvendor == vendor and testproduct == product:
return os.path.join('/dev', devname)
raise RuntimeError(f"Can't find USB device {name}")
def main():
args = parse_args()
if args.discover:
return discover(args)
dmx = DmxPy(find_device_file(args.device))
if args.type == 'ESP':
return run_esp(args, dmx)
return -1 # Shouldn't happen as this is validated via argparse
def discover(args):
def print_reply_esp(addr, type_, args, crc):
print(f"ESP node {addr[0]}:{addr[1]} {args}")
esp = ESP()
esp.send_poll(reply_type=ESP.REPLY_NODE)
t = time.time()
while time.time() - t <= 5:
esp.process_packet(poll_reply_cb=print_reply_esp)
return 0
def run_esp(args, dmx):
addr = ''
if args.address and args.port:
addr = (args.address, args.port)
elif args.address:
addr = args.address
elif args.port:
addr = ('', args.port)
data = {
'start': time.time(),
'fps': 0,
'last_frame': time.time(),
}
def handle_node_data(*a):
node_data = {
'uptime': int(time.time() - data['start']),
'fps': data['fps'],
}
node_data = ';'.join(f'{k}={v}' for k, v in node_data.items()).encode('utf-8')
return node_data
def handle_dmx(universe, start_code, channels):
data['fps'] = 2 / (time.time() - data['last_frame'])
data['last_frame'] = time.time()
if args.universe is None or universe is None or universe == args.universe:
for chan, value in enumerate(channels):
dmx.setChannel(chan + start_code, value)
dmx.render()
esp = ESP(
bind_address=addr,
serial_number=args.serial,
name=args.name
)
try:
while True:
esp.process_packet(poll_reply_data_cb=handle_node_data, dmx_cb=handle_dmx)
except KeyboardInterrupt:
pass
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
1852,
5510,
13,
5215,
931,
13,
5215,
13149,
13,
5215,
2897,
13,
13,
3166,
270,
16838,
2272,
29889,
29928,
16838,
19737,
1053,
360,
16838,
19737,
13,
13,
3166,
270,
16838,
1212,
1053,
26480,
13,
13,
13,
1753,
6088,
29918,
5085,
7295,
13,
1678,
282,
353,
1852,
5510,
29889,
15730,
11726,
29898,
8216,
543,
6558,
263,
2943,
393,
5578,
1078,
3564,
848,
304,
27692,
29990,
8260,
1159,
13,
1678,
282,
29889,
1202,
29918,
23516,
877,
29899,
29873,
742,
525,
489,
1853,
742,
2322,
2433,
2890,
29925,
742,
19995,
29922,
1839,
2890,
29925,
7464,
1371,
543,
4247,
3564,
9608,
1134,
1159,
13,
1678,
282,
29889,
1202,
29918,
23516,
877,
29899,
29874,
742,
525,
489,
7328,
742,
1371,
543,
15708,
304,
445,
3211,
1159,
13,
1678,
282,
29889,
1202,
29918,
23516,
877,
29899,
29886,
742,
525,
489,
637,
742,
1134,
29922,
524,
29892,
1371,
543,
15708,
304,
445,
2011,
1159,
13,
1678,
282,
29889,
1202,
29918,
23516,
877,
29899,
29884,
742,
525,
489,
348,
12193,
742,
1134,
29922,
524,
29892,
1371,
543,
1666,
2818,
871,
304,
445,
27692,
29990,
19859,
29892,
2322,
338,
304,
10049,
304,
599,
1159,
13,
1678,
282,
29889,
1202,
29918,
23516,
877,
29899,
29881,
742,
525,
489,
10141,
742,
2322,
2433,
29914,
3359,
29914,
4349,
29965,
1744,
29900,
742,
1371,
543,
11403,
445,
12951,
4742,
29892,
508,
367,
263,
2224,
304,
263,
4742,
934,
29892,
470,
263,
27042,
29901,
4704,
3553,
1159,
13,
1678,
282,
29889,
1202,
29918,
23516,
877,
29899,
29879,
742,
525,
489,
15550,
742,
1371,
543,
9125,
310,
445,
2943,
29892,
2322,
338,
278,
26750,
3211,
1159,
13,
1678,
282,
29889,
1202,
29918,
23516,
877,
29899,
29876,
742,
525,
489,
978,
742,
1371,
543,
1170,
310,
445,
2943,
29892,
2322,
338,
278,
1788,
3495,
978,
1159,
13,
13,
1678,
282,
29889,
1202,
29918,
23516,
877,
489,
2218,
11911,
742,
3158,
2433,
8899,
29918,
3009,
742,
1371,
543,
4205,
11911,
7573,
373,
278,
3564,
29892,
322,
6876,
1159,
13,
1678,
736,
282,
29889,
5510,
29918,
5085,
580,
13,
13,
13,
1753,
1284,
29918,
10141,
29918,
1445,
29898,
978,
1125,
13,
1678,
396,
4408,
338,
2845,
263,
2224,
20374,
3359,
29914,
4349,
29965,
1744,
29900,
29897,
607,
1795,
1735,
29892,
470,
263,
4742,
3553,
313,
29900,
29946,
29900,
29941,
29901,
29953,
29900,
29900,
29896,
29897,
607,
947,
451,
13,
1678,
565,
1024,
29889,
27382,
2541,
11219,
1495,
470,
525,
11283,
451,
297,
1024,
29901,
13,
4706,
396,
22680,
934,
13,
4706,
736,
1024,
13,
13,
1678,
565,
525,
11283,
451,
297,
1024,
29901,
13,
4706,
12020,
7865,
2392,
29898,
29888,
29908,
3664,
263,
2854,
4742,
3553,
29901,
426,
978,
27195,
13,
13,
1678,
15090,
524,
353,
14013,
325,
29901,
938,
29898,
29894,
29892,
29871,
29896,
29953,
29897,
13,
1678,
27042,
29892,
3234,
353,
2910,
29898,
20970,
524,
29892,
1024,
29889,
5451,
877,
29901,
8785,
13,
13,
1678,
363,
2906,
297,
13149,
29889,
23705,
11219,
9675,
29914,
8262,
29914,
28685,
29899,
15550,
29914,
3359,
1575,
5515,
29374,
13,
4706,
2906,
978,
353,
2897,
29889,
2084,
29889,
6500,
3871,
29898,
3359,
29897,
13,
4706,
411,
1722,
29898,
359,
29889,
2084,
29889,
7122,
29898,
3359,
29892,
525,
6995,
434,
794,
5477,
525,
29878,
1495,
408,
285,
29886,
29901,
13,
9651,
363,
1196,
297,
285,
29886,
29901,
13,
18884,
1196,
353,
1196,
29889,
17010,
580,
13,
18884,
565,
1196,
322,
525,
2433,
297,
1196,
29901,
13,
462,
1678,
1828,
29892,
995,
353,
1196,
29889,
5451,
877,
29922,
1495,
13,
462,
1678,
565,
1828,
1275,
525,
8618,
14849,
1783,
2396,
13,
462,
4706,
1243,
19167,
29892,
1243,
4704,
353,
2910,
29898,
20970,
524,
29892,
995,
29889,
5451,
11219,
1495,
7503,
29906,
2314,
13,
462,
4706,
565,
1243,
19167,
1275,
27042,
322,
1243,
4704,
1275,
3234,
29901,
13,
462,
9651,
736,
2897,
29889,
2084,
29889,
7122,
11219,
3359,
742,
2906,
978,
29897,
13,
13,
1678,
12020,
24875,
2392,
29898,
29888,
29908,
6028,
29915,
29873,
1284,
12951,
4742,
426,
978,
27195,
13,
13,
13,
1753,
1667,
7295,
13,
1678,
6389,
353,
6088,
29918,
5085,
580,
13,
1678,
565,
6389,
29889,
2218,
11911,
29901,
13,
4706,
736,
6523,
29898,
5085,
29897,
13,
13,
1678,
270,
16838,
353,
360,
16838,
19737,
29898,
2886,
29918,
10141,
29918,
1445,
29898,
5085,
29889,
10141,
876,
13,
13,
1678,
565,
6389,
29889,
1853,
1275,
525,
2890,
29925,
2396,
13,
4706,
736,
1065,
29918,
9983,
29898,
5085,
29892,
270,
16838,
29897,
13,
1678,
736,
448,
29896,
29871,
396,
10575,
29876,
29915,
29873,
3799,
408,
445,
338,
2854,
630,
3025,
1852,
5510,
13,
13,
13,
1753,
6523,
29898,
5085,
1125,
13,
1678,
822,
1596,
29918,
3445,
368,
29918,
9983,
29898,
10030,
29892,
1134,
3383,
6389,
29892,
2181,
29883,
1125,
13,
4706,
1596,
29898,
29888,
29908,
2890,
29925,
2943,
426,
10030,
29961,
29900,
29962,
6177,
29912,
10030,
29961,
29896,
12258,
426,
5085,
27195,
13,
13,
1678,
5152,
353,
26480,
580,
13,
1678,
5152,
29889,
6717,
29918,
29886,
3028,
29898,
3445,
368,
29918,
1853,
29922,
2890,
29925,
29889,
1525,
7390,
29979,
29918,
6632,
2287,
29897,
13,
1678,
260,
353,
931,
29889,
2230,
580,
13,
1678,
1550,
931,
29889,
2230,
580,
448,
260,
5277,
29871,
29945,
29901,
13,
4706,
5152,
29889,
5014,
29918,
4058,
300,
29898,
29886,
3028,
29918,
3445,
368,
29918,
10702,
29922,
2158,
29918,
3445,
368,
29918,
9983,
29897,
13,
13,
1678,
736,
29871,
29900,
13,
13,
13,
1753,
1065,
29918,
9983,
29898,
5085,
29892,
270,
16838,
1125,
13,
1678,
28915,
353,
6629,
13,
1678,
565,
6389,
29889,
7328,
322,
6389,
29889,
637,
29901,
13,
4706,
28915,
353,
313,
5085,
29889,
7328,
29892,
6389,
29889,
637,
29897,
13,
1678,
25342,
6389,
29889,
7328,
29901,
13,
4706,
28915,
353,
6389,
29889,
7328,
13,
1678,
25342,
6389,
29889,
637,
29901,
13,
4706,
28915,
353,
6702,
742,
6389,
29889,
637,
29897,
13,
13,
1678,
848,
353,
426,
13,
4706,
525,
2962,
2396,
931,
29889,
2230,
3285,
13,
4706,
525,
29888,
567,
2396,
29871,
29900,
29892,
13,
4706,
525,
4230,
29918,
2557,
2396,
931,
29889,
2230,
3285,
13,
1678,
500,
13,
1678,
822,
4386,
29918,
3177,
29918,
1272,
10456,
29874,
1125,
13,
4706,
2943,
29918,
1272,
353,
426,
13,
9651,
525,
21245,
603,
2396,
938,
29898,
2230,
29889,
2230,
580,
448,
848,
1839,
2962,
2033,
511,
13,
9651,
525,
29888,
567,
2396,
848,
1839,
29888,
567,
7464,
13,
4706,
500,
13,
4706,
2943,
29918,
1272,
353,
21921,
4286,
7122,
29898,
29888,
29915,
29912,
29895,
29913,
3790,
29894,
10162,
363,
413,
29892,
325,
297,
2943,
29918,
1272,
29889,
7076,
16655,
12508,
877,
9420,
29899,
29947,
1495,
13,
4706,
736,
2943,
29918,
1272,
13,
13,
1678,
822,
4386,
29918,
29881,
16838,
29898,
348,
12193,
29892,
1369,
29918,
401,
29892,
18196,
1125,
13,
4706,
848,
1839,
29888,
567,
2033,
353,
29871,
29906,
847,
313,
2230,
29889,
2230,
580,
448,
848,
1839,
4230,
29918,
2557,
11287,
13,
4706,
848,
1839,
4230,
29918,
2557,
2033,
353,
931,
29889,
2230,
580,
13,
4706,
565,
6389,
29889,
348,
12193,
338,
6213,
470,
19859,
338,
6213,
470,
19859,
1275,
6389,
29889,
348,
12193,
29901,
13,
9651,
363,
521,
273,
29892,
995,
297,
26985,
29898,
305,
12629,
1125,
13,
18884,
270,
16838,
29889,
842,
13599,
29898,
5083,
718,
1369,
29918,
401,
29892,
995,
29897,
13,
9651,
270,
16838,
29889,
9482,
580,
13,
13,
1678,
5152,
353,
26480,
29898,
13,
4706,
7868,
29918,
7328,
29922,
10030,
29892,
13,
4706,
7797,
29918,
4537,
29922,
5085,
29889,
15550,
29892,
13,
4706,
1024,
29922,
5085,
29889,
978,
13,
1678,
1723,
13,
13,
1678,
1018,
29901,
13,
4706,
1550,
5852,
29901,
13,
9651,
5152,
29889,
5014,
29918,
4058,
300,
29898,
29886,
3028,
29918,
3445,
368,
29918,
1272,
29918,
10702,
29922,
8411,
29918,
3177,
29918,
1272,
29892,
270,
16838,
29918,
10702,
29922,
8411,
29918,
29881,
16838,
29897,
13,
1678,
5174,
7670,
3377,
4074,
6685,
29901,
13,
4706,
1209,
13,
2
] |
applications/physbam/physbam-lib/Scripts/Archives/test/deformable_rigid.py | schinmayee/nimbus | 20 | 69340 | <gh_stars>10-100
#!/usr/bin/python
import sys
import os
import tests
result_directory=sys.argv[1]
visual_test=tests.VISUAL_TESTS("Fluid 2D",sys.argv[1])
camera_directory=os.getcwd()+"/Scripts/test/cameras"
def deformable_rigid_test(testname,number):
test=tests.TEST(result_directory=result_directory,
name=testname,
directory="Projects/deformable_rigid_coupling",
command="./deformable_rigid_coupling_%s -o Standard_Tests/%s %d"%(visual_test.platform,testname,number),
output_directory="Standard_Tests/%s"%testname,
views=[tests.VIEWER(name="std",viewer="../opengl_3d/opengl_3d_%s -w 800 -h 600"%visual_test.platform,keys="\"\"",
camera_script="%s/deformable_rigid_%d.camera"%(camera_directory,number))])
visual_test.tests.append(test)
deformable_rigid_test("deformable_rigid_std_2_block_stack",2)
deformable_rigid_test("deformable_rigid_std_5_point_joint_2_blocks_with_deformable",5)
deformable_rigid_test("deformable_rigid_std_6_point_joint_2_blocks_one_suspended_with_deformable",6)
deformable_rigid_test("deformable_rigid_std_7_torsion_spring_with_kinematic_and_arb",7)
visual_test.run()
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
4691,
13,
5215,
10876,
13,
5215,
2897,
13,
5215,
6987,
13,
13,
2914,
29918,
12322,
29922,
9675,
29889,
19218,
29961,
29896,
29962,
13,
20119,
29918,
1688,
29922,
21150,
29889,
28607,
29965,
1964,
29918,
18267,
29903,
703,
8754,
5416,
29871,
29906,
29928,
613,
9675,
29889,
19218,
29961,
29896,
2314,
13,
13,
26065,
29918,
12322,
29922,
359,
29889,
657,
29883,
9970,
580,
13578,
29914,
4081,
29879,
29914,
1688,
29914,
29883,
4183,
294,
29908,
13,
1753,
316,
689,
519,
29918,
8966,
333,
29918,
1688,
29898,
1688,
978,
29892,
4537,
1125,
13,
1678,
1243,
29922,
21150,
29889,
18267,
29898,
2914,
29918,
12322,
29922,
2914,
29918,
12322,
29892,
13,
268,
1024,
29922,
1688,
978,
29892,
13,
268,
3884,
543,
25119,
29914,
311,
689,
519,
29918,
8966,
333,
29918,
16589,
10335,
613,
13,
268,
1899,
543,
6904,
311,
689,
519,
29918,
8966,
333,
29918,
16589,
10335,
29918,
29995,
29879,
29871,
448,
29877,
10117,
29918,
24376,
22584,
29879,
1273,
29881,
29908,
29995,
29898,
20119,
29918,
1688,
29889,
12120,
29892,
1688,
978,
29892,
4537,
511,
13,
268,
1962,
29918,
12322,
543,
15449,
29918,
24376,
22584,
29879,
29908,
29995,
1688,
978,
29892,
13,
268,
8386,
11759,
21150,
29889,
29963,
8673,
29956,
1001,
29898,
978,
543,
4172,
613,
29894,
15580,
543,
6995,
459,
6180,
29918,
29941,
29881,
29914,
459,
6180,
29918,
29941,
29881,
29918,
29995,
29879,
448,
29893,
29871,
29947,
29900,
29900,
448,
29882,
29871,
29953,
29900,
29900,
29908,
29995,
20119,
29918,
1688,
29889,
12120,
29892,
8149,
543,
5931,
5931,
613,
13,
462,
308,
10656,
29918,
2154,
543,
29995,
29879,
29914,
311,
689,
519,
29918,
8966,
333,
29918,
29995,
29881,
29889,
26065,
29908,
29995,
29898,
26065,
29918,
12322,
29892,
4537,
876,
2314,
13,
13,
1678,
7604,
29918,
1688,
29889,
21150,
29889,
4397,
29898,
1688,
29897,
13,
13,
311,
689,
519,
29918,
8966,
333,
29918,
1688,
703,
311,
689,
519,
29918,
8966,
333,
29918,
4172,
29918,
29906,
29918,
1271,
29918,
1429,
613,
29906,
29897,
13,
311,
689,
519,
29918,
8966,
333,
29918,
1688,
703,
311,
689,
519,
29918,
8966,
333,
29918,
4172,
29918,
29945,
29918,
3149,
29918,
12090,
29918,
29906,
29918,
1271,
29879,
29918,
2541,
29918,
311,
689,
519,
613,
29945,
29897,
13,
311,
689,
519,
29918,
8966,
333,
29918,
1688,
703,
311,
689,
519,
29918,
8966,
333,
29918,
4172,
29918,
29953,
29918,
3149,
29918,
12090,
29918,
29906,
29918,
1271,
29879,
29918,
650,
29918,
29879,
375,
29886,
2760,
29918,
2541,
29918,
311,
689,
519,
613,
29953,
29897,
13,
311,
689,
519,
29918,
8966,
333,
29918,
1688,
703,
311,
689,
519,
29918,
8966,
333,
29918,
4172,
29918,
29955,
29918,
29873,
943,
291,
29918,
4278,
29918,
2541,
29918,
9089,
19217,
29918,
392,
29918,
279,
29890,
613,
29955,
29897,
13,
13,
20119,
29918,
1688,
29889,
3389,
580,
13,
2
] |
tests/scraper/models.py | teolemon/django-dynamic-scraper | 0 | 37438 | from django.db import models
from dynamic_scraper.models import Scraper, SchedulerRuntime
from scrapy.contrib.djangoitem import DjangoItem
class EventWebsite(models.Model):
name = models.CharField(max_length=200)
scraper = models.ForeignKey(Scraper, blank=True, null=True, on_delete=models.SET_NULL)
url = models.URLField()
scraper_runtime = models.ForeignKey(SchedulerRuntime, blank=True, null=True, on_delete=models.SET_NULL)
def __unicode__(self):
return self.name + " (" + str(self.id) + ")"
class Event(models.Model):
title = models.CharField(max_length=200)
event_website = models.ForeignKey(EventWebsite)
description = models.TextField(blank=True)
url = models.URLField()
checker_runtime = models.ForeignKey(SchedulerRuntime, blank=True, null=True, on_delete=models.SET_NULL)
def __unicode__(self):
return self.title + " (" + str(self.id) + ")"
class EventItem(DjangoItem):
django_model = Event | [
1,
515,
9557,
29889,
2585,
1053,
4733,
13,
3166,
7343,
29918,
1557,
336,
546,
29889,
9794,
1053,
2522,
336,
546,
29892,
1102,
14952,
7944,
13,
3166,
24559,
2272,
29889,
21570,
29889,
14095,
667,
1053,
15337,
2001,
13,
13,
13,
1990,
6864,
3609,
2746,
29898,
9794,
29889,
3195,
1125,
13,
1678,
1024,
353,
4733,
29889,
27890,
29898,
3317,
29918,
2848,
29922,
29906,
29900,
29900,
29897,
13,
1678,
24559,
546,
353,
4733,
29889,
27755,
2558,
29898,
4421,
336,
546,
29892,
9654,
29922,
5574,
29892,
1870,
29922,
5574,
29892,
373,
29918,
8143,
29922,
9794,
29889,
10490,
29918,
10074,
29897,
13,
1678,
3142,
353,
4733,
29889,
4219,
3073,
580,
13,
1678,
24559,
546,
29918,
15634,
353,
4733,
29889,
27755,
2558,
29898,
4504,
14952,
7944,
29892,
9654,
29922,
5574,
29892,
1870,
29922,
5574,
29892,
373,
29918,
8143,
29922,
9794,
29889,
10490,
29918,
10074,
29897,
13,
268,
13,
1678,
822,
4770,
2523,
356,
12035,
1311,
1125,
13,
4706,
736,
1583,
29889,
978,
718,
376,
4852,
718,
851,
29898,
1311,
29889,
333,
29897,
718,
376,
5513,
13,
13,
13,
1990,
6864,
29898,
9794,
29889,
3195,
1125,
13,
1678,
3611,
353,
4733,
29889,
27890,
29898,
3317,
29918,
2848,
29922,
29906,
29900,
29900,
29897,
13,
1678,
1741,
29918,
22942,
353,
4733,
29889,
27755,
2558,
29898,
2624,
3609,
2746,
29897,
29871,
13,
1678,
6139,
353,
4733,
29889,
15778,
29898,
19465,
29922,
5574,
29897,
13,
1678,
3142,
353,
4733,
29889,
4219,
3073,
580,
13,
1678,
1423,
261,
29918,
15634,
353,
4733,
29889,
27755,
2558,
29898,
4504,
14952,
7944,
29892,
9654,
29922,
5574,
29892,
1870,
29922,
5574,
29892,
373,
29918,
8143,
29922,
9794,
29889,
10490,
29918,
10074,
29897,
13,
268,
13,
1678,
822,
4770,
2523,
356,
12035,
1311,
1125,
13,
4706,
736,
1583,
29889,
3257,
718,
376,
4852,
718,
851,
29898,
1311,
29889,
333,
29897,
718,
376,
5513,
13,
13,
13,
1990,
6864,
2001,
29898,
29928,
5364,
2001,
1125,
13,
1678,
9557,
29918,
4299,
353,
6864,
2
] |
treadmill/console.py | gaocegege/treadmill | 2 | 145708 | """Treadmill console entry point.
"""
import logging
import logging.config
import click
import requests
# pylint complains about imports from treadmill not grouped, but import
# dependencies need to come first.
#
# pylint: disable=C0412
from treadmill import cli
# pylint complains "No value passed for parameter 'ldap' in function call".
# This is ok, as these parameters come from click decorators.
#
# pylint: disable=E1120
#
# TODO: add options to configure logging.
@click.group(cls=cli.make_multi_command('treadmill.cli'))
@click.option('--dns-domain', required=False,
envvar='TREADMILL_DNS_DOMAIN',
callback=cli.handle_context_opt,
is_eager=True,
expose_value=False)
@click.option('--dns-server', required=False, envvar='TREADMILL_DNS_SERVER',
callback=cli.handle_context_opt,
is_eager=True,
expose_value=False)
@click.option('--ldap', required=False, envvar='TREADMILL_LDAP',
callback=cli.handle_context_opt,
is_eager=True,
expose_value=False)
@click.option('--ldap-user', required=False, envvar='TREADMILL_LDAP_USER',
callback=cli.handle_context_opt,
is_eager=True,
expose_value=False)
@click.option('--ldap-pwd', required=False, envvar='TREADMILL_LDAP_PWD',
callback=cli.handle_context_opt,
is_eager=True,
expose_value=False)
@click.option('--ldap-suffix', required=False,
envvar='TREADMILL_LDAP_SUFFIX',
callback=cli.handle_context_opt,
is_eager=True,
expose_value=False)
@click.option('--outfmt', type=click.Choice(['json', 'yaml']))
@click.option('--debug/--no-debug',
help='Sets logging level to debug',
is_flag=True, default=False)
@click.option('--with-proxy', required=False, is_flag=True,
help='Enable proxy environment variables.',
default=False)
@click.pass_context
def run(ctx, with_proxy, outfmt, debug):
"""Treadmill CLI."""
ctx.obj = {}
ctx.obj['logging.debug'] = False
requests.Session().trust_env = with_proxy
if outfmt:
cli.OUTPUT_FORMAT = outfmt
# Default logging to cli.conf, at CRITICAL, unless --debug
cli.init_logger('cli.conf')
if debug:
ctx.obj['logging.debug'] = True
logging.getLogger('treadmill').setLevel(logging.DEBUG)
logging.getLogger().setLevel(logging.DEBUG)
| [
1,
9995,
29911,
949,
19958,
2991,
6251,
1298,
29889,
13,
15945,
29908,
13,
13,
5215,
12183,
13,
5215,
12183,
29889,
2917,
13,
13,
5215,
2828,
13,
5215,
7274,
13,
13,
29937,
282,
2904,
524,
15313,
1144,
1048,
24802,
515,
260,
949,
19958,
451,
27831,
29892,
541,
1053,
13,
29937,
9962,
817,
304,
2041,
937,
29889,
13,
29937,
13,
29937,
282,
2904,
524,
29901,
11262,
29922,
29907,
29900,
29946,
29896,
29906,
13,
3166,
260,
949,
19958,
1053,
9335,
13,
13,
13,
29937,
282,
2904,
524,
15313,
1144,
376,
3782,
995,
4502,
363,
3443,
525,
430,
481,
29915,
297,
740,
1246,
1642,
13,
29937,
910,
338,
3431,
29892,
408,
1438,
4128,
2041,
515,
2828,
10200,
4097,
29889,
13,
29937,
13,
29937,
282,
2904,
524,
29901,
11262,
29922,
29923,
29896,
29896,
29906,
29900,
13,
29937,
13,
29937,
14402,
29901,
788,
3987,
304,
10822,
12183,
29889,
13,
29992,
3808,
29889,
2972,
29898,
25932,
29922,
11303,
29889,
5675,
29918,
9910,
29918,
6519,
877,
29873,
949,
19958,
29889,
11303,
8785,
13,
29992,
3808,
29889,
3385,
877,
489,
29881,
1983,
29899,
7247,
742,
3734,
29922,
8824,
29892,
13,
795,
8829,
1707,
2433,
29911,
16310,
10403,
2208,
29918,
29928,
3059,
29918,
3970,
29032,
742,
13,
795,
6939,
29922,
11303,
29889,
8411,
29918,
4703,
29918,
3670,
29892,
13,
795,
338,
29918,
29872,
1875,
29922,
5574,
29892,
13,
795,
24396,
29918,
1767,
29922,
8824,
29897,
13,
29992,
3808,
29889,
3385,
877,
489,
29881,
1983,
29899,
2974,
742,
3734,
29922,
8824,
29892,
8829,
1707,
2433,
29911,
16310,
10403,
2208,
29918,
29928,
3059,
29918,
18603,
742,
13,
795,
6939,
29922,
11303,
29889,
8411,
29918,
4703,
29918,
3670,
29892,
13,
795,
338,
29918,
29872,
1875,
29922,
5574,
29892,
13,
795,
24396,
29918,
1767,
29922,
8824,
29897,
13,
29992,
3808,
29889,
3385,
877,
489,
430,
481,
742,
3734,
29922,
8824,
29892,
8829,
1707,
2433,
29911,
16310,
10403,
2208,
29918,
10249,
3301,
742,
13,
795,
6939,
29922,
11303,
29889,
8411,
29918,
4703,
29918,
3670,
29892,
13,
795,
338,
29918,
29872,
1875,
29922,
5574,
29892,
13,
795,
24396,
29918,
1767,
29922,
8824,
29897,
13,
29992,
3808,
29889,
3385,
877,
489,
430,
481,
29899,
1792,
742,
3734,
29922,
8824,
29892,
8829,
1707,
2433,
29911,
16310,
10403,
2208,
29918,
10249,
3301,
29918,
11889,
742,
13,
795,
6939,
29922,
11303,
29889,
8411,
29918,
4703,
29918,
3670,
29892,
13,
795,
338,
29918,
29872,
1875,
29922,
5574,
29892,
13,
795,
24396,
29918,
1767,
29922,
8824,
29897,
13,
29992,
3808,
29889,
3385,
877,
489,
430,
481,
29899,
29886,
9970,
742,
3734,
29922,
8824,
29892,
8829,
1707,
2433,
29911,
16310,
10403,
2208,
29918,
10249,
3301,
29918,
29925,
24668,
742,
13,
795,
6939,
29922,
11303,
29889,
8411,
29918,
4703,
29918,
3670,
29892,
13,
795,
338,
29918,
29872,
1875,
29922,
5574,
29892,
13,
795,
24396,
29918,
1767,
29922,
8824,
29897,
13,
29992,
3808,
29889,
3385,
877,
489,
430,
481,
29899,
2146,
600,
861,
742,
3734,
29922,
8824,
29892,
13,
795,
8829,
1707,
2433,
29911,
16310,
10403,
2208,
29918,
10249,
3301,
29918,
14605,
29943,
25634,
742,
13,
795,
6939,
29922,
11303,
29889,
8411,
29918,
4703,
29918,
3670,
29892,
13,
795,
338,
29918,
29872,
1875,
29922,
5574,
29892,
13,
795,
24396,
29918,
1767,
29922,
8824,
29897,
13,
29992,
3808,
29889,
3385,
877,
489,
449,
23479,
742,
1134,
29922,
3808,
29889,
29620,
18959,
3126,
742,
525,
25162,
25901,
13,
29992,
3808,
29889,
3385,
877,
489,
8382,
29914,
489,
1217,
29899,
8382,
742,
13,
795,
1371,
2433,
29903,
1691,
12183,
3233,
304,
4744,
742,
13,
795,
338,
29918,
15581,
29922,
5574,
29892,
2322,
29922,
8824,
29897,
13,
29992,
3808,
29889,
3385,
877,
489,
2541,
29899,
14701,
742,
3734,
29922,
8824,
29892,
338,
29918,
15581,
29922,
5574,
29892,
13,
795,
1371,
2433,
20701,
10166,
5177,
3651,
29889,
742,
13,
795,
2322,
29922,
8824,
29897,
13,
29992,
3808,
29889,
3364,
29918,
4703,
13,
1753,
1065,
29898,
13073,
29892,
411,
29918,
14701,
29892,
714,
23479,
29892,
4744,
1125,
13,
1678,
9995,
29911,
949,
19958,
24492,
1213,
15945,
13,
1678,
12893,
29889,
5415,
353,
6571,
13,
1678,
12893,
29889,
5415,
1839,
21027,
29889,
8382,
2033,
353,
7700,
13,
13,
1678,
7274,
29889,
7317,
2141,
509,
504,
29918,
6272,
353,
411,
29918,
14701,
13,
13,
1678,
565,
714,
23479,
29901,
13,
4706,
9335,
29889,
12015,
12336,
29918,
19094,
1299,
353,
714,
23479,
13,
13,
1678,
396,
13109,
12183,
304,
9335,
29889,
5527,
29892,
472,
15600,
1806,
2965,
1964,
29892,
6521,
1192,
8382,
13,
1678,
9335,
29889,
2344,
29918,
21707,
877,
11303,
29889,
5527,
1495,
13,
1678,
565,
4744,
29901,
13,
4706,
12893,
29889,
5415,
1839,
21027,
29889,
8382,
2033,
353,
5852,
13,
4706,
12183,
29889,
657,
16363,
877,
29873,
949,
19958,
2824,
842,
10108,
29898,
21027,
29889,
18525,
29897,
13,
4706,
12183,
29889,
657,
16363,
2141,
842,
10108,
29898,
21027,
29889,
18525,
29897,
13,
2
] |
tests/test_propagation.py | ismailbennani/ReGraph | 54 | 185981 | <reponame>ismailbennani/ReGraph<gh_stars>10-100
"""Test of the hierarchy functionality with all typings being partial."""
from regraph import NXHierarchy, NXGraph
from regraph import Rule
from regraph import RewritingError
from regraph import primitives
class TestPropagation(object):
def __init__(self):
hierarchy = NXHierarchy()
colors = NXGraph()
primitives.add_nodes_from(
colors,
[("red", {"r": 255, "g": 0, "b": 0}),
("blue", {"r": 0, "g": 0, "b": 255})]
)
primitives.add_edges_from(
colors,
[("red", "red"), ("blue", "red"), ("red", "blue")]
)
hierarchy.add_graph("colors", colors)
mmm = NXGraph()
primitives.add_nodes_from(
mmm,
["component", "state", "action"]
)
primitives.add_edges_from(
mmm,
[("component", "action"),
("component", "component"),
("state", "component"),
("action", "state")]
)
hierarchy.add_graph("mmm", mmm)
mm = NXGraph()
primitives.add_nodes_from(
mm,
["gene", "residue", "state", "mod"]
)
primitives.add_edges_from(
mm,
[("residue", "gene"),
("state", "gene"),
("state", "residue"),
("mod", "state"),
("gene", "mod")]
)
hierarchy.add_graph("mm", mm)
action_graph = NXGraph()
primitives.add_nodes_from(
action_graph,
["A", "A_res_1", "p_a", "B", "mod1",
"mod2", "C", "p_c", "activity"]
)
primitives.add_edges_from(
action_graph,
[("A_res_1", "A"),
("p_a", "A_res_1"),
("mod1", "p_a"),
("B", "mod1"),
("p_c", "C"),
("B", "mod2"),
("activity", "B"),
("mod2", "p_c")]
)
hierarchy.add_graph("ag", action_graph)
nugget_1 = NXGraph()
primitives.add_nodes_from(
nugget_1,
["A", "A_res_1", "p", "B", "mod"]
)
primitives.add_edges_from(
nugget_1,
[("A_res_1", "A"),
("p", "A_res_1"),
("mod", "p"),
("B", "mod")]
)
hierarchy.add_graph("n1", nugget_1)
nugget_2 = NXGraph()
primitives.add_nodes_from(
nugget_2,
["B", "activity", "mod", "p", "C"])
primitives.add_edges_from(nugget_2, [
("activity", "B"),
("B", "mod"),
("mod", "p"),
("p", "C")])
hierarchy.add_graph("n2", nugget_2)
# add typings
hierarchy.add_typing(
"mm", "mmm",
{
"gene": "component",
"residue": "component",
"state": "state",
"mod": "action"
}
)
hierarchy.add_typing(
"mm", "colors",
{
"gene": "red",
"residue": "red",
"state": "red",
"mod": "blue"
}
)
hierarchy.add_typing(
"ag", "mm",
{
"A": "gene",
"B": "gene",
"A_res_1": "residue",
"mod1": "mod",
"p_a": "state",
"C": "gene",
"activity": "state",
"p_c": "state",
"mod2": "mod"
}
)
hierarchy.add_typing(
"n1", "ag",
{
"A": "A",
"B": "B",
"A_res_1": "A_res_1",
"mod": "mod1",
"p": "p_a",
}
)
hierarchy.add_typing(
"n2", "ag",
{
"B": "B",
"C": "C",
"p": "p_c",
"activity": "activity",
"mod": "mod2",
}
)
self.hierarchy = hierarchy
def test_propagation_node_adds(self):
"""Test propagation down of additions."""
p = NXGraph()
primitives.add_nodes_from(
p, ["B"]
)
l = NXGraph()
primitives.add_nodes_from(
l, ["B"]
)
r = NXGraph()
primitives.add_nodes_from(
r, ["B", "B_res_1", "X", "Y"]
)
primitives.add_edge(r, "B_res_1", "B")
rule = Rule(p, l, r)
instance = {"B": "B"}
rhs_typing = {
"mm": {"B_res_1": "residue"},
"mmm": {"X": "component"}, "colors": {"Y": "red"}
}
try:
self.hierarchy.rewrite(
"n1", rule, instance,
rhs_typing=rhs_typing, strict=True)
raise ValueError("Error was not caught!")
except RewritingError:
pass
new_hierarchy = NXHierarchy.copy(self.hierarchy)
new_hierarchy.rewrite(
"n1", rule, instance, rhs_typing=rhs_typing)
# test propagation of node adds
assert("B_res_1" in new_hierarchy.get_graph("n1").nodes())
assert("B_res_1" in new_hierarchy.get_graph("ag").nodes())
assert(new_hierarchy.get_typing("n1", "ag")["B_res_1"] == "B_res_1")
assert(new_hierarchy.get_typing("ag", "mm")["B_res_1"] == "residue")
assert(("B_res_1", "B") in new_hierarchy.get_graph("n1").edges())
assert(("B_res_1", "B") in new_hierarchy.get_graph("ag").edges())
assert("X" in new_hierarchy.get_graph("n1").nodes())
assert("X" in new_hierarchy.get_graph("ag").nodes())
assert("X" in new_hierarchy.get_graph("mm").nodes())
assert("X" in new_hierarchy.get_graph("colors").nodes())
assert(new_hierarchy.get_typing("n1", "ag")["X"] == "X")
assert(new_hierarchy.get_typing("ag", "mm")["X"] == "X")
assert(new_hierarchy.get_typing("mm", "mmm")["X"] == "component")
assert(new_hierarchy.get_typing("mm", "colors")["X"] == "X")
assert("Y" in new_hierarchy.get_graph("n1").nodes())
assert("Y" in new_hierarchy.get_graph("ag").nodes())
assert("Y" in new_hierarchy.get_graph("mm").nodes())
assert("Y" in new_hierarchy.get_graph("mm").nodes())
assert(new_hierarchy.get_typing("n1", "ag")["Y"] == "Y")
assert(new_hierarchy.get_typing("ag", "mm")["Y"] == "Y")
assert(new_hierarchy.get_typing("mm", "mmm")["Y"] == "Y")
assert(new_hierarchy.get_typing("mm", "colors")["Y"] == "red")
def test_porpagation_node_attrs_adds(self):
p = NXGraph()
primitives.add_nodes_from(
p, [1, 2]
)
lhs = NXGraph()
primitives.add_nodes_from(
lhs, [1, 2]
)
rhs = NXGraph()
primitives.add_nodes_from(
rhs,
[
(1, {"a1": True}),
(2, {"a2": 1}),
(3, {"a3": "x"})]
)
rule = Rule(p, lhs, rhs)
instance = {1: "A", 2: "A_res_1"}
rhs_typing = {"mm": {3: "state"}}
try:
self.hierarchy.rewrite(
"n1", rule, instance,
rhs_typing=rhs_typing, strict=True)
raise ValueError("Error was not caught!")
except RewritingError:
pass
new_hierarchy = NXHierarchy.copy(self.hierarchy)
new_hierarchy.rewrite(
"n1", rule, instance,
rhs_typing=rhs_typing)
# test propagation of the node attribute adds
assert("a1" in new_hierarchy.get_graph("n1").get_node("A"))
assert("a2" in new_hierarchy.get_graph("n1").get_node("A_res_1"))
assert("a3" in new_hierarchy.get_graph("n1").get_node(3))
assert("a1" in new_hierarchy.get_graph("ag").get_node("A"))
assert("a2" in new_hierarchy.get_graph("ag").get_node("A_res_1"))
assert("a3" in new_hierarchy.get_graph("ag").get_node(3))
# assert("a" in new_hierarchy.graph["ag"].node["B"])
# assert("a" in new_hierarchy.graph["mm"].node["gene"])
# assert("a" in new_hierarchy.graph["mmm"].node["component"])
# assert("a" in new_hierarchy.graph["colors"].node["red"])
def test_controlled_up_propagation(self):
pattern = NXGraph()
pattern.add_nodes_from(["A"])
rule = Rule.from_transform(pattern)
p_clone, _ = rule.inject_clone_node("A")
rule.inject_add_node("D")
p_typing = {
"nn1": {
"A_bye": set(),
"A_hello": {p_clone}
},
"n1": {
"A": p_clone
}
}
instance = {
"A": "A"
}
nugget_1 = NXGraph()
primitives.add_nodes_from(
nugget_1,
["A_bye", "A_hello", "A_res_1", "p", "B", "mod"]
)
primitives.add_edges_from(
nugget_1,
[("A_res_1", "A_hello"),
("A_res_1", "A_bye"),
("p", "A_res_1"),
("mod", "p"),
("B", "mod")]
)
self.hierarchy.add_graph("nn1", nugget_1)
self.hierarchy.add_typing(
"nn1", "n1",
{
"A_bye": "A",
"A_hello": "A",
"A_res_1": "A_res_1",
"p": "p",
"B": "B",
"mod": "mod"
})
new_hierarchy = NXHierarchy.copy(self.hierarchy)
new_hierarchy.rewrite(
"ag", rule, instance,
p_typing=p_typing)
# primitives.print_graph(new_hierarchy.get_graph("nn1"))
# print(new_hierarchy.get_typing("nn1", "n1"))
| [
1,
529,
276,
1112,
420,
29958,
275,
2549,
1785,
29876,
3270,
29914,
1123,
9527,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
15945,
29908,
3057,
310,
278,
21277,
9863,
411,
599,
2393,
886,
1641,
7687,
1213,
15945,
13,
3166,
1072,
1140,
1053,
405,
29990,
29950,
631,
12040,
29892,
405,
29990,
9527,
13,
3166,
1072,
1140,
1053,
27308,
13,
3166,
1072,
1140,
1053,
390,
809,
768,
292,
2392,
13,
3166,
1072,
1140,
1053,
28147,
3145,
13,
13,
13,
1990,
4321,
1184,
13573,
362,
29898,
3318,
1125,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
1125,
13,
4706,
21277,
353,
405,
29990,
29950,
631,
12040,
580,
13,
4706,
11955,
353,
405,
29990,
9527,
580,
13,
4706,
28147,
3145,
29889,
1202,
29918,
18010,
29918,
3166,
29898,
13,
9651,
11955,
29892,
13,
9651,
518,
703,
1127,
613,
8853,
29878,
1115,
29871,
29906,
29945,
29945,
29892,
376,
29887,
1115,
29871,
29900,
29892,
376,
29890,
1115,
29871,
29900,
9594,
13,
632,
4852,
9539,
613,
8853,
29878,
1115,
29871,
29900,
29892,
376,
29887,
1115,
29871,
29900,
29892,
376,
29890,
1115,
29871,
29906,
29945,
29945,
1800,
29962,
13,
4706,
1723,
13,
4706,
28147,
3145,
29889,
1202,
29918,
287,
2710,
29918,
3166,
29898,
13,
9651,
11955,
29892,
13,
9651,
518,
703,
1127,
613,
376,
1127,
4968,
4852,
9539,
613,
376,
1127,
4968,
4852,
1127,
613,
376,
9539,
13531,
13,
4706,
1723,
13,
4706,
21277,
29889,
1202,
29918,
4262,
703,
27703,
613,
11955,
29897,
13,
13,
4706,
286,
4317,
353,
405,
29990,
9527,
580,
13,
4706,
28147,
3145,
29889,
1202,
29918,
18010,
29918,
3166,
29898,
13,
9651,
286,
4317,
29892,
13,
9651,
6796,
9700,
613,
376,
3859,
613,
376,
2467,
3108,
13,
4706,
1723,
13,
13,
4706,
28147,
3145,
29889,
1202,
29918,
287,
2710,
29918,
3166,
29898,
13,
9651,
286,
4317,
29892,
13,
9651,
518,
703,
9700,
613,
376,
2467,
4968,
13,
632,
4852,
9700,
613,
376,
9700,
4968,
13,
632,
4852,
3859,
613,
376,
9700,
4968,
13,
632,
4852,
2467,
613,
376,
3859,
13531,
13,
4706,
1723,
13,
13,
4706,
21277,
29889,
1202,
29918,
4262,
703,
4317,
29885,
613,
286,
4317,
29897,
13,
13,
4706,
5654,
353,
405,
29990,
9527,
580,
13,
4706,
28147,
3145,
29889,
1202,
29918,
18010,
29918,
3166,
29898,
13,
9651,
5654,
29892,
13,
9651,
6796,
29887,
1600,
613,
376,
690,
333,
434,
613,
376,
3859,
613,
376,
1545,
3108,
13,
4706,
1723,
13,
4706,
28147,
3145,
29889,
1202,
29918,
287,
2710,
29918,
3166,
29898,
13,
9651,
5654,
29892,
13,
9651,
518,
703,
690,
333,
434,
613,
376,
29887,
1600,
4968,
13,
632,
4852,
3859,
613,
376,
29887,
1600,
4968,
13,
632,
4852,
3859,
613,
376,
690,
333,
434,
4968,
13,
632,
4852,
1545,
613,
376,
3859,
4968,
13,
632,
4852,
29887,
1600,
613,
376,
1545,
13531,
13,
4706,
1723,
13,
4706,
21277,
29889,
1202,
29918,
4262,
703,
4317,
613,
5654,
29897,
13,
13,
4706,
3158,
29918,
4262,
353,
405,
29990,
9527,
580,
13,
4706,
28147,
3145,
29889,
1202,
29918,
18010,
29918,
3166,
29898,
13,
9651,
3158,
29918,
4262,
29892,
13,
9651,
6796,
29909,
613,
376,
29909,
29918,
690,
29918,
29896,
613,
376,
29886,
29918,
29874,
613,
376,
29933,
613,
376,
1545,
29896,
613,
13,
632,
376,
1545,
29906,
613,
376,
29907,
613,
376,
29886,
29918,
29883,
613,
376,
10072,
3108,
13,
4706,
1723,
13,
13,
4706,
28147,
3145,
29889,
1202,
29918,
287,
2710,
29918,
3166,
29898,
13,
9651,
3158,
29918,
4262,
29892,
13,
9651,
518,
703,
29909,
29918,
690,
29918,
29896,
613,
376,
29909,
4968,
13,
632,
4852,
29886,
29918,
29874,
613,
376,
29909,
29918,
690,
29918,
29896,
4968,
13,
632,
4852,
1545,
29896,
613,
376,
29886,
29918,
29874,
4968,
13,
632,
4852,
29933,
613,
376,
1545,
29896,
4968,
13,
632,
4852,
29886,
29918,
29883,
613,
376,
29907,
4968,
13,
632,
4852,
29933,
613,
376,
1545,
29906,
4968,
13,
632,
4852,
10072,
613,
376,
29933,
4968,
13,
632,
4852,
1545,
29906,
613,
376,
29886,
29918,
29883,
13531,
13,
4706,
1723,
13,
4706,
21277,
29889,
1202,
29918,
4262,
703,
351,
613,
3158,
29918,
4262,
29897,
13,
13,
4706,
302,
688,
657,
29918,
29896,
353,
405,
29990,
9527,
580,
13,
4706,
28147,
3145,
29889,
1202,
29918,
18010,
29918,
3166,
29898,
13,
9651,
302,
688,
657,
29918,
29896,
29892,
13,
9651,
6796,
29909,
613,
376,
29909,
29918,
690,
29918,
29896,
613,
376,
29886,
613,
376,
29933,
613,
376,
1545,
3108,
13,
4706,
1723,
13,
4706,
28147,
3145,
29889,
1202,
29918,
287,
2710,
29918,
3166,
29898,
13,
9651,
302,
688,
657,
29918,
29896,
29892,
13,
9651,
518,
703,
29909,
29918,
690,
29918,
29896,
613,
376,
29909,
4968,
13,
632,
4852,
29886,
613,
376,
29909,
29918,
690,
29918,
29896,
4968,
13,
632,
4852,
1545,
613,
376,
29886,
4968,
13,
632,
4852,
29933,
613,
376,
1545,
13531,
13,
4706,
1723,
13,
4706,
21277,
29889,
1202,
29918,
4262,
703,
29876,
29896,
613,
302,
688,
657,
29918,
29896,
29897,
13,
13,
4706,
302,
688,
657,
29918,
29906,
353,
405,
29990,
9527,
580,
13,
4706,
28147,
3145,
29889,
1202,
29918,
18010,
29918,
3166,
29898,
13,
9651,
302,
688,
657,
29918,
29906,
29892,
13,
9651,
6796,
29933,
613,
376,
10072,
613,
376,
1545,
613,
376,
29886,
613,
376,
29907,
20068,
13,
4706,
28147,
3145,
29889,
1202,
29918,
287,
2710,
29918,
3166,
29898,
29876,
688,
657,
29918,
29906,
29892,
518,
13,
9651,
4852,
10072,
613,
376,
29933,
4968,
13,
9651,
4852,
29933,
613,
376,
1545,
4968,
13,
9651,
4852,
1545,
613,
376,
29886,
4968,
13,
9651,
4852,
29886,
613,
376,
29907,
1159,
2314,
13,
4706,
21277,
29889,
1202,
29918,
4262,
703,
29876,
29906,
613,
302,
688,
657,
29918,
29906,
29897,
13,
13,
4706,
396,
788,
2393,
886,
13,
4706,
21277,
29889,
1202,
29918,
1017,
15702,
29898,
13,
9651,
376,
4317,
613,
376,
4317,
29885,
613,
13,
9651,
426,
13,
18884,
376,
29887,
1600,
1115,
376,
9700,
613,
13,
18884,
376,
690,
333,
434,
1115,
376,
9700,
613,
13,
18884,
376,
3859,
1115,
376,
3859,
613,
13,
18884,
376,
1545,
1115,
376,
2467,
29908,
13,
9651,
500,
13,
4706,
1723,
13,
13,
4706,
21277,
29889,
1202,
29918,
1017,
15702,
29898,
13,
9651,
376,
4317,
613,
376,
27703,
613,
13,
9651,
426,
13,
18884,
376,
29887,
1600,
1115,
376,
1127,
613,
13,
18884,
376,
690,
333,
434,
1115,
376,
1127,
613,
13,
18884,
376,
3859,
1115,
376,
1127,
613,
13,
18884,
376,
1545,
1115,
376,
9539,
29908,
13,
9651,
500,
13,
4706,
1723,
13,
4706,
21277,
29889,
1202,
29918,
1017,
15702,
29898,
13,
9651,
376,
351,
613,
376,
4317,
613,
13,
9651,
426,
13,
18884,
376,
29909,
1115,
376,
29887,
1600,
613,
13,
18884,
376,
29933,
1115,
376,
29887,
1600,
613,
13,
18884,
376,
29909,
29918,
690,
29918,
29896,
1115,
376,
690,
333,
434,
613,
13,
18884,
376,
1545,
29896,
1115,
376,
1545,
613,
13,
18884,
376,
29886,
29918,
29874,
1115,
376,
3859,
613,
13,
18884,
376,
29907,
1115,
376,
29887,
1600,
613,
13,
18884,
376,
10072,
1115,
376,
3859,
613,
13,
18884,
376,
29886,
29918,
29883,
1115,
376,
3859,
613,
13,
18884,
376,
1545,
29906,
1115,
376,
1545,
29908,
13,
9651,
500,
13,
4706,
1723,
13,
4706,
21277,
29889,
1202,
29918,
1017,
15702,
29898,
13,
9651,
376,
29876,
29896,
613,
376,
351,
613,
13,
9651,
426,
13,
18884,
376,
29909,
1115,
376,
29909,
613,
13,
18884,
376,
29933,
1115,
376,
29933,
613,
13,
18884,
376,
29909,
29918,
690,
29918,
29896,
1115,
376,
29909,
29918,
690,
29918,
29896,
613,
13,
18884,
376,
1545,
1115,
376,
1545,
29896,
613,
13,
18884,
376,
29886,
1115,
376,
29886,
29918,
29874,
613,
13,
9651,
500,
13,
4706,
1723,
13,
13,
4706,
21277,
29889,
1202,
29918,
1017,
15702,
29898,
13,
9651,
376,
29876,
29906,
613,
376,
351,
613,
13,
9651,
426,
13,
18884,
376,
29933,
1115,
376,
29933,
613,
13,
18884,
376,
29907,
1115,
376,
29907,
613,
13,
18884,
376,
29886,
1115,
376,
29886,
29918,
29883,
613,
13,
18884,
376,
10072,
1115,
376,
10072,
613,
13,
18884,
376,
1545,
1115,
376,
1545,
29906,
613,
13,
9651,
500,
13,
4706,
1723,
13,
13,
4706,
1583,
29889,
29882,
631,
12040,
353,
21277,
13,
13,
1678,
822,
1243,
29918,
7728,
351,
362,
29918,
3177,
29918,
1202,
29879,
29898,
1311,
1125,
13,
4706,
9995,
3057,
13089,
362,
1623,
310,
788,
2187,
1213,
15945,
13,
4706,
282,
353,
405,
29990,
9527,
580,
13,
4706,
28147,
3145,
29889,
1202,
29918,
18010,
29918,
3166,
29898,
13,
9651,
282,
29892,
6796,
29933,
3108,
13,
4706,
1723,
13,
13,
4706,
301,
353,
405,
29990,
9527,
580,
13,
4706,
28147,
3145,
29889,
1202,
29918,
18010,
29918,
3166,
29898,
13,
9651,
301,
29892,
6796,
29933,
3108,
13,
4706,
1723,
13,
13,
4706,
364,
353,
405,
29990,
9527,
580,
13,
4706,
28147,
3145,
29889,
1202,
29918,
18010,
29918,
3166,
29898,
13,
9651,
364,
29892,
6796,
29933,
613,
376,
29933,
29918,
690,
29918,
29896,
613,
376,
29990,
613,
376,
29979,
3108,
13,
4706,
1723,
13,
4706,
28147,
3145,
29889,
1202,
29918,
12864,
29898,
29878,
29892,
376,
29933,
29918,
690,
29918,
29896,
613,
376,
29933,
1159,
13,
13,
4706,
5751,
353,
27308,
29898,
29886,
29892,
301,
29892,
364,
29897,
13,
13,
4706,
2777,
353,
8853,
29933,
1115,
376,
29933,
9092,
13,
13,
4706,
29365,
29918,
1017,
15702,
353,
426,
13,
9651,
376,
4317,
1115,
8853,
29933,
29918,
690,
29918,
29896,
1115,
376,
690,
333,
434,
10758,
13,
9651,
376,
4317,
29885,
1115,
8853,
29990,
1115,
376,
9700,
10758,
376,
27703,
1115,
8853,
29979,
1115,
376,
1127,
9092,
13,
4706,
500,
13,
4706,
1018,
29901,
13,
9651,
1583,
29889,
29882,
631,
12040,
29889,
23174,
29898,
13,
18884,
376,
29876,
29896,
613,
5751,
29892,
2777,
29892,
13,
18884,
29365,
29918,
1017,
15702,
29922,
29878,
9499,
29918,
1017,
15702,
29892,
9406,
29922,
5574,
29897,
13,
9651,
12020,
7865,
2392,
703,
2392,
471,
451,
12624,
29991,
1159,
13,
4706,
5174,
390,
809,
768,
292,
2392,
29901,
13,
9651,
1209,
13,
13,
4706,
716,
29918,
29882,
631,
12040,
353,
405,
29990,
29950,
631,
12040,
29889,
8552,
29898,
1311,
29889,
29882,
631,
12040,
29897,
13,
13,
4706,
716,
29918,
29882,
631,
12040,
29889,
23174,
29898,
13,
9651,
376,
29876,
29896,
613,
5751,
29892,
2777,
29892,
29365,
29918,
1017,
15702,
29922,
29878,
9499,
29918,
1017,
15702,
29897,
13,
13,
4706,
396,
1243,
13089,
362,
310,
2943,
12778,
13,
4706,
4974,
703,
29933,
29918,
690,
29918,
29896,
29908,
297,
716,
29918,
29882,
631,
12040,
29889,
657,
29918,
4262,
703,
29876,
29896,
2564,
18010,
3101,
13,
4706,
4974,
703,
29933,
29918,
690,
29918,
29896,
29908,
297,
716,
29918,
29882,
631,
12040,
29889,
657,
29918,
4262,
703,
351,
2564,
18010,
3101,
13,
4706,
4974,
29898,
1482,
29918,
29882,
631,
12040,
29889,
657,
29918,
1017,
15702,
703,
29876,
29896,
613,
376,
351,
1159,
3366,
29933,
29918,
690,
29918,
29896,
3108,
1275,
376,
29933,
29918,
690,
29918,
29896,
1159,
13,
4706,
4974,
29898,
1482,
29918,
29882,
631,
12040,
29889,
657,
29918,
1017,
15702,
703,
351,
613,
376,
4317,
1159,
3366,
29933,
29918,
690,
29918,
29896,
3108,
1275,
376,
690,
333,
434,
1159,
13,
4706,
4974,
29898,
703,
29933,
29918,
690,
29918,
29896,
613,
376,
29933,
1159,
297,
716,
29918,
29882,
631,
12040,
29889,
657,
29918,
4262,
703,
29876,
29896,
2564,
287,
2710,
3101,
13,
4706,
4974,
29898,
703,
29933,
29918,
690,
29918,
29896,
613,
376,
29933,
1159,
297,
716,
29918,
29882,
631,
12040,
29889,
657,
29918,
4262,
703,
351,
2564,
287,
2710,
3101,
13,
13,
4706,
4974,
703,
29990,
29908,
297,
716,
29918,
29882,
631,
12040,
29889,
657,
29918,
4262,
703,
29876,
29896,
2564,
18010,
3101,
13,
4706,
4974,
703,
29990,
29908,
297,
716,
29918,
29882,
631,
12040,
29889,
657,
29918,
4262,
703,
351,
2564,
18010,
3101,
13,
4706,
4974,
703,
29990,
29908,
297,
716,
29918,
29882,
631,
12040,
29889,
657,
29918,
4262,
703,
4317,
2564,
18010,
3101,
13,
4706,
4974,
703,
29990,
29908,
297,
716,
29918,
29882,
631,
12040,
29889,
657,
29918,
4262,
703,
27703,
2564,
18010,
3101,
13,
4706,
4974,
29898,
1482,
29918,
29882,
631,
12040,
29889,
657,
29918,
1017,
15702,
703,
29876,
29896,
613,
376,
351,
1159,
3366,
29990,
3108,
1275,
376,
29990,
1159,
13,
4706,
4974,
29898,
1482,
29918,
29882,
631,
12040,
29889,
657,
29918,
1017,
15702,
703,
351,
613,
376,
4317,
1159,
3366,
29990,
3108,
1275,
376,
29990,
1159,
13,
4706,
4974,
29898,
1482,
29918,
29882,
631,
12040,
29889,
657,
29918,
1017,
15702,
703,
4317,
613,
376,
4317,
29885,
1159,
3366,
29990,
3108,
1275,
376,
9700,
1159,
13,
4706,
4974,
29898,
1482,
29918,
29882,
631,
12040,
29889,
657,
29918,
1017,
15702,
703,
4317,
613,
376,
27703,
1159,
3366,
29990,
3108,
1275,
376,
29990,
1159,
13,
13,
4706,
4974,
703,
29979,
29908,
297,
716,
29918,
29882,
631,
12040,
29889,
657,
29918,
4262,
703,
29876,
29896,
2564,
18010,
3101,
13,
4706,
4974,
703,
29979,
29908,
297,
716,
29918,
29882,
631,
12040,
29889,
657,
29918,
4262,
703,
351,
2564,
18010,
3101,
13,
4706,
4974,
703,
29979,
29908,
297,
716,
29918,
29882,
631,
12040,
29889,
657,
29918,
4262,
703,
4317,
2564,
18010,
3101,
13,
4706,
4974,
703,
29979,
29908,
297,
716,
29918,
29882,
631,
12040,
29889,
657,
29918,
4262,
703,
4317,
2564,
18010,
3101,
13,
4706,
4974,
29898,
1482,
29918,
29882,
631,
12040,
29889,
657,
29918,
1017,
15702,
703,
29876,
29896,
613,
376,
351,
1159,
3366,
29979,
3108,
1275,
376,
29979,
1159,
13,
4706,
4974,
29898,
1482,
29918,
29882,
631,
12040,
29889,
657,
29918,
1017,
15702,
703,
351,
613,
376,
4317,
1159,
3366,
29979,
3108,
1275,
376,
29979,
1159,
13,
4706,
4974,
29898,
1482,
29918,
29882,
631,
12040,
29889,
657,
29918,
1017,
15702,
703,
4317,
613,
376,
4317,
29885,
1159,
3366,
29979,
3108,
1275,
376,
29979,
1159,
13,
4706,
4974,
29898,
1482,
29918,
29882,
631,
12040,
29889,
657,
29918,
1017,
15702,
703,
4317,
613,
376,
27703,
1159,
3366,
29979,
3108,
1275,
376,
1127,
1159,
13,
13,
1678,
822,
1243,
29918,
1971,
13573,
362,
29918,
3177,
29918,
5552,
29879,
29918,
1202,
29879,
29898,
1311,
1125,
13,
4706,
282,
353,
405,
29990,
9527,
580,
13,
4706,
28147,
3145,
29889,
1202,
29918,
18010,
29918,
3166,
29898,
13,
9651,
282,
29892,
518,
29896,
29892,
29871,
29906,
29962,
13,
4706,
1723,
13,
13,
4706,
301,
9499,
353,
405,
29990,
9527,
580,
13,
4706,
28147,
3145,
29889,
1202,
29918,
18010,
29918,
3166,
29898,
13,
9651,
301,
9499,
29892,
518,
29896,
29892,
29871,
29906,
29962,
13,
4706,
1723,
13,
13,
4706,
29365,
353,
405,
29990,
9527,
580,
13,
4706,
28147,
3145,
29889,
1202,
29918,
18010,
29918,
3166,
29898,
13,
9651,
29365,
29892,
13,
9651,
518,
13,
18884,
313,
29896,
29892,
8853,
29874,
29896,
1115,
5852,
9594,
13,
18884,
313,
29906,
29892,
8853,
29874,
29906,
1115,
29871,
29896,
9594,
13,
18884,
313,
29941,
29892,
8853,
29874,
29941,
1115,
376,
29916,
29908,
1800,
29962,
13,
4706,
1723,
13,
13,
4706,
5751,
353,
27308,
29898,
29886,
29892,
301,
9499,
29892,
29365,
29897,
13,
4706,
2777,
353,
426,
29896,
29901,
376,
29909,
613,
29871,
29906,
29901,
376,
29909,
29918,
690,
29918,
29896,
9092,
13,
13,
4706,
29365,
29918,
1017,
15702,
353,
8853,
4317,
1115,
426,
29941,
29901,
376,
3859,
29908,
930,
13,
13,
4706,
1018,
29901,
13,
9651,
1583,
29889,
29882,
631,
12040,
29889,
23174,
29898,
13,
18884,
376,
29876,
29896,
613,
5751,
29892,
2777,
29892,
13,
18884,
29365,
29918,
1017,
15702,
29922,
29878,
9499,
29918,
1017,
15702,
29892,
9406,
29922,
5574,
29897,
13,
9651,
12020,
7865,
2392,
703,
2392,
471,
451,
12624,
29991,
1159,
13,
4706,
5174,
390,
809,
768,
292,
2392,
29901,
13,
9651,
1209,
13,
13,
4706,
716,
29918,
29882,
631,
12040,
353,
405,
29990,
29950,
631,
12040,
29889,
8552,
29898,
1311,
29889,
29882,
631,
12040,
29897,
13,
13,
4706,
716,
29918,
29882,
631,
12040,
29889,
23174,
29898,
13,
9651,
376,
29876,
29896,
613,
5751,
29892,
2777,
29892,
13,
9651,
29365,
29918,
1017,
15702,
29922,
29878,
9499,
29918,
1017,
15702,
29897,
13,
13,
4706,
396,
1243,
13089,
362,
310,
278,
2943,
5352,
12778,
13,
4706,
4974,
703,
29874,
29896,
29908,
297,
716,
29918,
29882,
631,
12040,
29889,
657,
29918,
4262,
703,
29876,
29896,
2564,
657,
29918,
3177,
703,
29909,
5783,
13,
4706,
4974,
703,
29874,
29906,
29908,
297,
716,
29918,
29882,
631,
12040,
29889,
657,
29918,
4262,
703,
29876,
29896,
2564,
657,
29918,
3177,
703,
29909,
29918,
690,
29918,
29896,
5783,
13,
4706,
4974,
703,
29874,
29941,
29908,
297,
716,
29918,
29882,
631,
12040,
29889,
657,
29918,
4262,
703,
29876,
29896,
2564,
657,
29918,
3177,
29898,
29941,
876,
13,
13,
4706,
4974,
703,
29874,
29896,
29908,
297,
716,
29918,
29882,
631,
12040,
29889,
657,
29918,
4262,
703,
351,
2564,
657,
29918,
3177,
703,
29909,
5783,
13,
4706,
4974,
703,
29874,
29906,
29908,
297,
716,
29918,
29882,
631,
12040,
29889,
657,
29918,
4262,
703,
351,
2564,
657,
29918,
3177,
703,
29909,
29918,
690,
29918,
29896,
5783,
13,
4706,
4974,
703,
29874,
29941,
29908,
297,
716,
29918,
29882,
631,
12040,
29889,
657,
29918,
4262,
703,
351,
2564,
657,
29918,
3177,
29898,
29941,
876,
13,
4706,
396,
4974,
703,
29874,
29908,
297,
716,
29918,
29882,
631,
12040,
29889,
4262,
3366,
351,
16862,
3177,
3366,
29933,
20068,
13,
4706,
396,
4974,
703,
29874,
29908,
297,
716,
29918,
29882,
631,
12040,
29889,
4262,
3366,
4317,
16862,
3177,
3366,
29887,
1600,
20068,
13,
4706,
396,
4974,
703,
29874,
29908,
297,
716,
29918,
29882,
631,
12040,
29889,
4262,
3366,
4317,
29885,
16862,
3177,
3366,
9700,
20068,
13,
4706,
396,
4974,
703,
29874,
29908,
297,
716,
29918,
29882,
631,
12040,
29889,
4262,
3366,
27703,
16862,
3177,
3366,
1127,
20068,
13,
13,
1678,
822,
1243,
29918,
6451,
839,
29918,
786,
29918,
7728,
351,
362,
29898,
1311,
1125,
13,
4706,
4766,
353,
405,
29990,
9527,
580,
13,
4706,
4766,
29889,
1202,
29918,
18010,
29918,
3166,
29898,
3366,
29909,
20068,
13,
4706,
5751,
353,
27308,
29889,
3166,
29918,
9067,
29898,
11037,
29897,
13,
4706,
282,
29918,
16513,
29892,
903,
353,
5751,
29889,
21920,
29918,
16513,
29918,
3177,
703,
29909,
1159,
13,
4706,
5751,
29889,
21920,
29918,
1202,
29918,
3177,
703,
29928,
1159,
13,
13,
4706,
282,
29918,
1017,
15702,
353,
426,
13,
9651,
376,
15755,
29896,
1115,
426,
13,
18884,
376,
29909,
29918,
26966,
1115,
731,
3285,
13,
18884,
376,
29909,
29918,
12199,
1115,
426,
29886,
29918,
16513,
29913,
13,
9651,
2981,
13,
9651,
376,
29876,
29896,
1115,
426,
13,
18884,
376,
29909,
1115,
282,
29918,
16513,
13,
9651,
500,
13,
4706,
500,
13,
13,
4706,
2777,
353,
426,
13,
9651,
376,
29909,
1115,
376,
29909,
29908,
13,
4706,
500,
13,
13,
4706,
302,
688,
657,
29918,
29896,
353,
405,
29990,
9527,
580,
13,
4706,
28147,
3145,
29889,
1202,
29918,
18010,
29918,
3166,
29898,
13,
9651,
302,
688,
657,
29918,
29896,
29892,
13,
9651,
6796,
29909,
29918,
26966,
613,
376,
29909,
29918,
12199,
613,
376,
29909,
29918,
690,
29918,
29896,
613,
376,
29886,
613,
376,
29933,
613,
376,
1545,
3108,
13,
4706,
1723,
13,
4706,
28147,
3145,
29889,
1202,
29918,
287,
2710,
29918,
3166,
29898,
13,
9651,
302,
688,
657,
29918,
29896,
29892,
13,
9651,
518,
703,
29909,
29918,
690,
29918,
29896,
613,
376,
29909,
29918,
12199,
4968,
13,
632,
4852,
29909,
29918,
690,
29918,
29896,
613,
376,
29909,
29918,
26966,
4968,
13,
632,
4852,
29886,
613,
376,
29909,
29918,
690,
29918,
29896,
4968,
13,
632,
4852,
1545,
613,
376,
29886,
4968,
13,
632,
4852,
29933,
613,
376,
1545,
13531,
13,
4706,
1723,
13,
4706,
1583,
29889,
29882,
631,
12040,
29889,
1202,
29918,
4262,
703,
15755,
29896,
613,
302,
688,
657,
29918,
29896,
29897,
13,
4706,
1583,
29889,
29882,
631,
12040,
29889,
1202,
29918,
1017,
15702,
29898,
13,
9651,
376,
15755,
29896,
613,
376,
29876,
29896,
613,
13,
9651,
426,
13,
18884,
376,
29909,
29918,
26966,
1115,
376,
29909,
613,
13,
18884,
376,
29909,
29918,
12199,
1115,
376,
29909,
613,
13,
18884,
376,
29909,
29918,
690,
29918,
29896,
1115,
376,
29909,
29918,
690,
29918,
29896,
613,
13,
18884,
376,
29886,
1115,
376,
29886,
613,
13,
18884,
376,
29933,
1115,
376,
29933,
613,
13,
18884,
376,
1545,
1115,
376,
1545,
29908,
13,
9651,
5615,
13,
13,
4706,
716,
29918,
29882,
631,
12040,
353,
405,
29990,
29950,
631,
12040,
29889,
8552,
29898,
1311,
29889,
29882,
631,
12040,
29897,
13,
4706,
716,
29918,
29882,
631,
12040,
29889,
23174,
29898,
13,
9651,
376,
351,
613,
5751,
29892,
2777,
29892,
13,
9651,
282,
29918,
1017,
15702,
29922,
29886,
29918,
1017,
15702,
29897,
13,
13,
4706,
396,
28147,
3145,
29889,
2158,
29918,
4262,
29898,
1482,
29918,
29882,
631,
12040,
29889,
657,
29918,
4262,
703,
15755,
29896,
5783,
13,
4706,
396,
1596,
29898,
1482,
29918,
29882,
631,
12040,
29889,
657,
29918,
1017,
15702,
703,
15755,
29896,
613,
376,
29876,
29896,
5783,
13,
2
] |
wbtools/lib/nlp/entity_extraction/ntt_extractor.py | WormBase/wbtools | 1 | 20013 | import math
import re
from typing import List, Dict
from wbtools.db.generic import WBGenericDBManager
from wbtools.lib.nlp.common import EntityType
from wbtools.lib.nlp.literature_index.abstract_index import AbstractLiteratureIndex
ALL_VAR_REGEX = r'({designations}|m|p|It)(_)?([A-z]+)?([0-9]+)([a-zA-Z]{{1,4}}[0-9]*)?(\[[0-9]+\])?([a-zA-Z]{{1,4}}' \
r'[0-9]*)?(\[.+\])?'
NEW_VAR_REGEX = r'[\(\s]({designations}|m|p)([0-9]+)((?:{designations}|m|p|ts|gf|lf|d|sd|am|cs)[0-9]+)?[\)\s\[]'
STRAIN_REGEX = r'[\(\s,\.:;\'\"]({designations})([0-9]+)[\)\s\,\.:;\'\"]'
OPENING_REGEX_STR = "[\\.\\n\\t\\'\\/\\(\\)\\[\\]\\{\\}:;\\,\\!\\?> ]"
CLOSING_REGEX_STR = "[\\.\\n\\t\\'\\/\\(\\)\\[\\]\\{\\}:;\\,\\!\\?> ]"
OPENING_CLOSING_REGEXES = {
EntityType.VARIATION: [r'[\(\s](', r')[\)\s\[]'],
EntityType.STRAIN: [r'[\(\s,\.:;\'\"](', r')[\)\s,\.:;\'\"]']
}
class NttExtractor:
def __init__(self, db_manager: WBGenericDBManager = None):
self.db_manager = db_manager
self.curated_entities = {}
for entity_type in EntityType:
self.curated_entities[entity_type] = None
allele_designations = self.db_manager.get_allele_designations()
new_var_regex = NEW_VAR_REGEX.format(designations="|".join(allele_designations))
strain_regex = STRAIN_REGEX.format(designations="|".join(self.db_manager.get_strain_designations()))
self.entity_type_regex_map = {
EntityType.VARIATION: new_var_regex,
EntityType.STRAIN: strain_regex
}
def get_curated_entities(self, entity_type: EntityType, exclude_id_used_as_name: bool = True):
if not self.curated_entities[entity_type]:
self.curated_entities[entity_type] = self.db_manager.get_curated_entities(
entity_type=entity_type, exclude_id_used_as_name=exclude_id_used_as_name)
return self.curated_entities[entity_type]
@staticmethod
def match_entities_regex(text, regex):
res = re.findall(regex, " " + text + " ")
return ["".join(entity_arr) for entity_arr in res]
@staticmethod
def count_keyword_matches_regex(keyword, text, case_sensitive: bool = True,
match_uppercase: bool = False) -> int:
keyword = keyword if case_sensitive else keyword.upper()
text = text if case_sensitive else text.upper()
match_uppercase = False if keyword.upper() == keyword else match_uppercase
if keyword in text or match_uppercase and keyword.upper() in text:
try:
match_count = len(re.findall(OPENING_REGEX_STR + re.escape(keyword) + CLOSING_REGEX_STR, text))
if match_uppercase:
match_count += len(re.findall(OPENING_REGEX_STR + re.escape(keyword.upper()) +
CLOSING_REGEX_STR, text))
return match_count
except:
pass
return 0
@staticmethod
def is_entity_meaningful(entity_keywords: List[str], text, lit_index: AbstractLiteratureIndex,
match_uppercase: bool = False, min_num_occurrences: int = 1,
tfidf_threshold: float = 0.0) -> bool:
min_num_occurrences = 1 if min_num_occurrences < 1 else min_num_occurrences
raw_count = sum(NttExtractor.count_keyword_matches_regex(keyword=keyword, text=text,
match_uppercase=match_uppercase) for
keyword in entity_keywords)
return True if raw_count >= min_num_occurrences and (
tfidf_threshold <= 0 or 0 < tfidf_threshold < NttExtractor.tfidf(entity_keywords=entity_keywords,
raw_count=raw_count,
lit_index=lit_index)) else False
@staticmethod
def tfidf(entity_keywords: List[str], raw_count, lit_index: AbstractLiteratureIndex) -> float:
doc_counter = sum(lit_index.count_matching_documents(keyword) for keyword in entity_keywords)
idf = math.log(float(lit_index.num_documents()) / (doc_counter if doc_counter > 0 else 0.5))
return raw_count * idf
@staticmethod
def extract_meaningful_entities_by_keywords(keywords: List[str], text: str,
lit_index: AbstractLiteratureIndex = None,
match_uppercase: bool = False, min_matches: int = 1,
tfidf_threshold: float = 0.0,
blacklist: List[str] = None) -> List[str]:
blacklist = set(blacklist) if blacklist else set()
return [keyword for keyword in set(keywords) if keyword not in blacklist and
NttExtractor.is_entity_meaningful(
entity_keywords=[keyword], text=text, match_uppercase=match_uppercase, min_num_occurrences=min_matches,
tfidf_threshold=tfidf_threshold, lit_index=lit_index)]
def extract_species_regex(self, text: str, taxon_id_name_map: Dict[str, List[str]] = None,
blacklist: List[str] = None,
whitelist: List[str] = None, min_matches: int = 1, tfidf_threshold: float = 0.0,
lit_index: AbstractLiteratureIndex = None):
blacklist = set(blacklist) if blacklist else set()
whitelist = set(whitelist) if whitelist else set()
if taxon_id_name_map is None:
taxon_id_name_map = self.db_manager.get_taxon_id_names_map()
return [regex_list[0].replace("\\", "") for taxon_id, regex_list in taxon_id_name_map.items() if
taxon_id not in blacklist and (taxon_id in whitelist or
NttExtractor.is_entity_meaningful(entity_keywords=regex_list, text=text,
match_uppercase=False,
lit_index=lit_index,
min_num_occurrences=min_matches,
tfidf_threshold=tfidf_threshold))]
@staticmethod
def get_entity_ids_from_names(entity_names: List[str], entity_name_id_map: Dict[str, str]):
return list(set([(entity_name_id_map[entity_name], entity_name) for entity_name in entity_names]))
def extract_all_entities_by_type(self, text: str, entity_type: EntityType, include_new: bool = True,
match_curated: bool = False, exclude_curated: bool = False,
match_entities: List[str] = None, exclude_entities: List[str] = None,
exclude_id_used_as_name: bool = True):
"""
extract entities mentioned in text
Args:
text (str): the input text
entity_type (EntityType): the type of entities to extract
include_new (bool): whether to include possibly new entities not yet in the curation database
match_curated (bool): whether to extract curated entities obtained from the provided DB manager
exclude_curated (bool): whether to remove curated entities obtained from the provided DB manager from the
extracted ones
match_entities (List[str]): match the provided entities
exclude_entities (List[str]): exclude the provided entities from the results
exclude_id_used_as_name (bool): do not extract entity ids when used as names in the DB
Returns:
list: the list of entities extracted from text
"""
entities = set()
if include_new:
entities.update(NttExtractor.match_entities_regex(text, self.entity_type_regex_map[entity_type]))
if match_curated:
entities.update(NttExtractor.match_entities_regex(
text, OPENING_CLOSING_REGEXES[entity_type][0] + '|'.join(self.db_manager.get_curated_entities(
entity_type=entity_type, exclude_id_used_as_name=exclude_id_used_as_name)) +
OPENING_CLOSING_REGEXES[entity_type][1]))
if exclude_curated:
entities -= set(self.get_curated_entities(entity_type=entity_type, exclude_id_used_as_name=exclude_id_used_as_name))
if match_entities:
entities.update(NttExtractor.match_entities_regex(
text, OPENING_CLOSING_REGEXES[entity_type][0] + '|'.join(match_entities) +
OPENING_CLOSING_REGEXES[entity_type][1]))
if exclude_entities:
entities -= set(exclude_entities)
return sorted(list(entities))
| [
1,
1053,
5844,
13,
5215,
337,
13,
3166,
19229,
1053,
2391,
29892,
360,
919,
13,
13,
3166,
281,
29890,
8504,
29889,
2585,
29889,
19206,
1053,
399,
29933,
15809,
4051,
3260,
13,
3166,
281,
29890,
8504,
29889,
1982,
29889,
12938,
29886,
29889,
9435,
1053,
14945,
1542,
13,
3166,
281,
29890,
8504,
29889,
1982,
29889,
12938,
29886,
29889,
20889,
1535,
29918,
2248,
29889,
16595,
29918,
2248,
1053,
25513,
24938,
1535,
3220,
13,
13,
9818,
29918,
26865,
29918,
1525,
1692,
29990,
353,
364,
29915,
3319,
13892,
800,
11079,
29885,
29989,
29886,
29989,
3112,
5033,
29918,
6877,
4197,
29909,
29899,
29920,
10062,
6877,
4197,
29900,
29899,
29929,
10062,
29897,
4197,
29874,
29899,
25265,
29899,
29999,
3199,
29912,
29896,
29892,
29946,
930,
29961,
29900,
29899,
29929,
14178,
6877,
1194,
8999,
29900,
29899,
29929,
29962,
3124,
2314,
29973,
4197,
29874,
29899,
25265,
29899,
29999,
3199,
29912,
29896,
29892,
29946,
930,
29915,
320,
13,
18884,
364,
29915,
29961,
29900,
29899,
29929,
14178,
6877,
1194,
29961,
29889,
3124,
2314,
17901,
13,
13,
28577,
29918,
26865,
29918,
1525,
1692,
29990,
353,
364,
29915,
7110,
1194,
29879,
850,
29912,
13892,
800,
11079,
29885,
29989,
29886,
29897,
4197,
29900,
29899,
29929,
10062,
29897,
3552,
25825,
29912,
13892,
800,
11079,
29885,
29989,
29886,
29989,
1372,
29989,
29887,
29888,
29989,
29880,
29888,
29989,
29881,
29989,
4928,
29989,
314,
29989,
2395,
9601,
29900,
29899,
29929,
10062,
6877,
7110,
2144,
29879,
29905,
2636,
29915,
13,
13,
1254,
4717,
1177,
29918,
1525,
1692,
29990,
353,
364,
29915,
7110,
1194,
29879,
2053,
4898,
10436,
29915,
5931,
850,
29912,
13892,
800,
1800,
4197,
29900,
29899,
29929,
10062,
29897,
7110,
2144,
29879,
15013,
4898,
10436,
12764,
3108,
29915,
13,
13,
13,
4590,
1430,
4214,
29918,
1525,
1692,
29990,
29918,
10810,
353,
14704,
1966,
29889,
1966,
29876,
1966,
29873,
1966,
29915,
1966,
29914,
1966,
1194,
7244,
1966,
29961,
1966,
29962,
1966,
741,
29905,
6177,
29936,
1966,
29892,
1966,
29991,
1966,
17382,
4514,
29908,
13,
6154,
3267,
4214,
29918,
1525,
1692,
29990,
29918,
10810,
353,
14704,
1966,
29889,
1966,
29876,
1966,
29873,
1966,
29915,
1966,
29914,
1966,
1194,
7244,
1966,
29961,
1966,
29962,
1966,
741,
29905,
6177,
29936,
1966,
29892,
1966,
29991,
1966,
17382,
4514,
29908,
13,
13,
13,
4590,
1430,
4214,
29918,
6154,
3267,
4214,
29918,
1525,
1692,
29990,
2890,
353,
426,
13,
1678,
14945,
1542,
29889,
26865,
29902,
8098,
29901,
518,
29878,
29915,
7110,
1194,
29879,
850,
742,
364,
1495,
7110,
2144,
29879,
29905,
2636,
7464,
13,
1678,
14945,
1542,
29889,
1254,
4717,
1177,
29901,
518,
29878,
29915,
7110,
1194,
29879,
2053,
4898,
10436,
29915,
5931,
850,
742,
364,
1495,
7110,
2144,
29879,
2053,
4898,
10436,
12764,
3108,
2033,
13,
29913,
13,
13,
13,
1990,
405,
698,
5647,
28891,
29901,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
4833,
29918,
12847,
29901,
399,
29933,
15809,
4051,
3260,
353,
6213,
1125,
13,
4706,
1583,
29889,
2585,
29918,
12847,
353,
4833,
29918,
12847,
13,
4706,
1583,
29889,
2764,
630,
29918,
296,
1907,
353,
6571,
13,
4706,
363,
7855,
29918,
1853,
297,
14945,
1542,
29901,
13,
9651,
1583,
29889,
2764,
630,
29918,
296,
1907,
29961,
10041,
29918,
1853,
29962,
353,
6213,
13,
4706,
4788,
280,
29918,
13892,
800,
353,
1583,
29889,
2585,
29918,
12847,
29889,
657,
29918,
3498,
280,
29918,
13892,
800,
580,
13,
4706,
716,
29918,
1707,
29918,
13087,
353,
29091,
29918,
26865,
29918,
1525,
1692,
29990,
29889,
4830,
29898,
13892,
800,
543,
29989,
1642,
7122,
29898,
3498,
280,
29918,
13892,
800,
876,
13,
4706,
5312,
262,
29918,
13087,
353,
6850,
4717,
1177,
29918,
1525,
1692,
29990,
29889,
4830,
29898,
13892,
800,
543,
29989,
1642,
7122,
29898,
1311,
29889,
2585,
29918,
12847,
29889,
657,
29918,
4151,
262,
29918,
13892,
800,
22130,
13,
4706,
1583,
29889,
10041,
29918,
1853,
29918,
13087,
29918,
1958,
353,
426,
13,
9651,
14945,
1542,
29889,
26865,
29902,
8098,
29901,
716,
29918,
1707,
29918,
13087,
29892,
13,
9651,
14945,
1542,
29889,
1254,
4717,
1177,
29901,
5312,
262,
29918,
13087,
13,
4706,
500,
13,
13,
1678,
822,
679,
29918,
2764,
630,
29918,
296,
1907,
29898,
1311,
29892,
7855,
29918,
1853,
29901,
14945,
1542,
29892,
19060,
29918,
333,
29918,
3880,
29918,
294,
29918,
978,
29901,
6120,
353,
5852,
1125,
13,
4706,
565,
451,
1583,
29889,
2764,
630,
29918,
296,
1907,
29961,
10041,
29918,
1853,
5387,
13,
9651,
1583,
29889,
2764,
630,
29918,
296,
1907,
29961,
10041,
29918,
1853,
29962,
353,
1583,
29889,
2585,
29918,
12847,
29889,
657,
29918,
2764,
630,
29918,
296,
1907,
29898,
13,
18884,
7855,
29918,
1853,
29922,
10041,
29918,
1853,
29892,
19060,
29918,
333,
29918,
3880,
29918,
294,
29918,
978,
29922,
735,
2325,
29918,
333,
29918,
3880,
29918,
294,
29918,
978,
29897,
13,
4706,
736,
1583,
29889,
2764,
630,
29918,
296,
1907,
29961,
10041,
29918,
1853,
29962,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
1993,
29918,
296,
1907,
29918,
13087,
29898,
726,
29892,
6528,
1125,
13,
4706,
620,
353,
337,
29889,
2886,
497,
29898,
13087,
29892,
376,
376,
718,
1426,
718,
376,
16521,
13,
4706,
736,
6796,
1642,
7122,
29898,
10041,
29918,
2749,
29897,
363,
7855,
29918,
2749,
297,
620,
29962,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
2302,
29918,
26766,
29918,
20317,
29918,
13087,
29898,
26766,
29892,
1426,
29892,
1206,
29918,
23149,
3321,
29901,
6120,
353,
5852,
29892,
13,
462,
462,
1678,
1993,
29918,
21064,
4878,
29901,
6120,
353,
7700,
29897,
1599,
938,
29901,
13,
4706,
13553,
353,
13553,
565,
1206,
29918,
23149,
3321,
1683,
13553,
29889,
21064,
580,
13,
4706,
1426,
353,
1426,
565,
1206,
29918,
23149,
3321,
1683,
1426,
29889,
21064,
580,
13,
4706,
1993,
29918,
21064,
4878,
353,
7700,
565,
13553,
29889,
21064,
580,
1275,
13553,
1683,
1993,
29918,
21064,
4878,
13,
4706,
565,
13553,
297,
1426,
470,
1993,
29918,
21064,
4878,
322,
13553,
29889,
21064,
580,
297,
1426,
29901,
13,
9651,
1018,
29901,
13,
18884,
1993,
29918,
2798,
353,
7431,
29898,
276,
29889,
2886,
497,
29898,
4590,
1430,
4214,
29918,
1525,
1692,
29990,
29918,
10810,
718,
337,
29889,
21587,
29898,
26766,
29897,
718,
17332,
3267,
4214,
29918,
1525,
1692,
29990,
29918,
10810,
29892,
1426,
876,
13,
18884,
565,
1993,
29918,
21064,
4878,
29901,
13,
462,
1678,
1993,
29918,
2798,
4619,
7431,
29898,
276,
29889,
2886,
497,
29898,
4590,
1430,
4214,
29918,
1525,
1692,
29990,
29918,
10810,
718,
337,
29889,
21587,
29898,
26766,
29889,
21064,
3101,
718,
13,
462,
462,
462,
29871,
17332,
3267,
4214,
29918,
1525,
1692,
29990,
29918,
10810,
29892,
1426,
876,
13,
18884,
736,
1993,
29918,
2798,
13,
9651,
5174,
29901,
13,
18884,
1209,
13,
4706,
736,
29871,
29900,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
338,
29918,
10041,
29918,
12676,
292,
1319,
29898,
10041,
29918,
1989,
9303,
29901,
2391,
29961,
710,
1402,
1426,
29892,
11872,
29918,
2248,
29901,
25513,
24938,
1535,
3220,
29892,
13,
462,
632,
1993,
29918,
21064,
4878,
29901,
6120,
353,
7700,
29892,
1375,
29918,
1949,
29918,
15693,
1038,
2063,
29901,
938,
353,
29871,
29896,
29892,
13,
462,
632,
15886,
333,
29888,
29918,
386,
12268,
29901,
5785,
353,
29871,
29900,
29889,
29900,
29897,
1599,
6120,
29901,
13,
4706,
1375,
29918,
1949,
29918,
15693,
1038,
2063,
353,
29871,
29896,
565,
1375,
29918,
1949,
29918,
15693,
1038,
2063,
529,
29871,
29896,
1683,
1375,
29918,
1949,
29918,
15693,
1038,
2063,
13,
4706,
10650,
29918,
2798,
353,
2533,
29898,
29940,
698,
5647,
28891,
29889,
2798,
29918,
26766,
29918,
20317,
29918,
13087,
29898,
26766,
29922,
26766,
29892,
1426,
29922,
726,
29892,
13,
462,
462,
462,
462,
1993,
29918,
21064,
4878,
29922,
4352,
29918,
21064,
4878,
29897,
363,
13,
462,
4706,
13553,
297,
7855,
29918,
1989,
9303,
29897,
13,
4706,
736,
5852,
565,
10650,
29918,
2798,
6736,
1375,
29918,
1949,
29918,
15693,
1038,
2063,
322,
313,
13,
18884,
15886,
333,
29888,
29918,
386,
12268,
5277,
29871,
29900,
470,
29871,
29900,
529,
15886,
333,
29888,
29918,
386,
12268,
529,
405,
698,
5647,
28891,
29889,
13264,
333,
29888,
29898,
10041,
29918,
1989,
9303,
29922,
10041,
29918,
1989,
9303,
29892,
13,
462,
462,
462,
462,
462,
10650,
29918,
2798,
29922,
1610,
29918,
2798,
29892,
13,
462,
462,
462,
462,
462,
11872,
29918,
2248,
29922,
19411,
29918,
2248,
876,
1683,
7700,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
15886,
333,
29888,
29898,
10041,
29918,
1989,
9303,
29901,
2391,
29961,
710,
1402,
10650,
29918,
2798,
29892,
11872,
29918,
2248,
29901,
25513,
24938,
1535,
3220,
29897,
1599,
5785,
29901,
13,
4706,
1574,
29918,
11808,
353,
2533,
29898,
19411,
29918,
2248,
29889,
2798,
29918,
4352,
292,
29918,
3225,
29879,
29898,
26766,
29897,
363,
13553,
297,
7855,
29918,
1989,
9303,
29897,
13,
4706,
1178,
29888,
353,
5844,
29889,
1188,
29898,
7411,
29898,
19411,
29918,
2248,
29889,
1949,
29918,
3225,
29879,
3101,
847,
313,
1514,
29918,
11808,
565,
1574,
29918,
11808,
1405,
29871,
29900,
1683,
29871,
29900,
29889,
29945,
876,
13,
4706,
736,
10650,
29918,
2798,
334,
1178,
29888,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
6597,
29918,
12676,
292,
1319,
29918,
296,
1907,
29918,
1609,
29918,
1989,
9303,
29898,
1989,
9303,
29901,
2391,
29961,
710,
1402,
1426,
29901,
851,
29892,
13,
462,
462,
18884,
11872,
29918,
2248,
29901,
25513,
24938,
1535,
3220,
353,
6213,
29892,
13,
462,
462,
18884,
1993,
29918,
21064,
4878,
29901,
6120,
353,
7700,
29892,
1375,
29918,
20317,
29901,
938,
353,
29871,
29896,
29892,
13,
462,
462,
18884,
15886,
333,
29888,
29918,
386,
12268,
29901,
5785,
353,
29871,
29900,
29889,
29900,
29892,
13,
462,
462,
18884,
4628,
1761,
29901,
2391,
29961,
710,
29962,
353,
6213,
29897,
1599,
2391,
29961,
710,
5387,
13,
4706,
4628,
1761,
353,
731,
29898,
8517,
1761,
29897,
565,
4628,
1761,
1683,
731,
580,
13,
4706,
736,
518,
26766,
363,
13553,
297,
731,
29898,
1989,
9303,
29897,
565,
13553,
451,
297,
4628,
1761,
322,
13,
18884,
405,
698,
5647,
28891,
29889,
275,
29918,
10041,
29918,
12676,
292,
1319,
29898,
13,
9651,
7855,
29918,
1989,
9303,
11759,
26766,
1402,
1426,
29922,
726,
29892,
1993,
29918,
21064,
4878,
29922,
4352,
29918,
21064,
4878,
29892,
1375,
29918,
1949,
29918,
15693,
1038,
2063,
29922,
1195,
29918,
20317,
29892,
13,
9651,
15886,
333,
29888,
29918,
386,
12268,
29922,
13264,
333,
29888,
29918,
386,
12268,
29892,
11872,
29918,
2248,
29922,
19411,
29918,
2248,
4638,
13,
13,
1678,
822,
6597,
29918,
24091,
29918,
13087,
29898,
1311,
29892,
1426,
29901,
851,
29892,
8818,
265,
29918,
333,
29918,
978,
29918,
1958,
29901,
360,
919,
29961,
710,
29892,
2391,
29961,
710,
5262,
353,
6213,
29892,
13,
462,
795,
4628,
1761,
29901,
2391,
29961,
710,
29962,
353,
6213,
29892,
13,
462,
795,
377,
7454,
391,
29901,
2391,
29961,
710,
29962,
353,
6213,
29892,
1375,
29918,
20317,
29901,
938,
353,
29871,
29896,
29892,
15886,
333,
29888,
29918,
386,
12268,
29901,
5785,
353,
29871,
29900,
29889,
29900,
29892,
13,
462,
795,
11872,
29918,
2248,
29901,
25513,
24938,
1535,
3220,
353,
6213,
1125,
13,
4706,
4628,
1761,
353,
731,
29898,
8517,
1761,
29897,
565,
4628,
1761,
1683,
731,
580,
13,
4706,
377,
7454,
391,
353,
731,
29898,
1332,
7454,
391,
29897,
565,
377,
7454,
391,
1683,
731,
580,
13,
4706,
565,
8818,
265,
29918,
333,
29918,
978,
29918,
1958,
338,
6213,
29901,
13,
9651,
8818,
265,
29918,
333,
29918,
978,
29918,
1958,
353,
1583,
29889,
2585,
29918,
12847,
29889,
657,
29918,
20725,
265,
29918,
333,
29918,
7039,
29918,
1958,
580,
13,
4706,
736,
518,
13087,
29918,
1761,
29961,
29900,
1822,
6506,
703,
1966,
613,
20569,
363,
8818,
265,
29918,
333,
29892,
6528,
29918,
1761,
297,
8818,
265,
29918,
333,
29918,
978,
29918,
1958,
29889,
7076,
580,
565,
13,
18884,
8818,
265,
29918,
333,
451,
297,
4628,
1761,
322,
313,
20725,
265,
29918,
333,
297,
377,
7454,
391,
470,
13,
462,
462,
1669,
405,
698,
5647,
28891,
29889,
275,
29918,
10041,
29918,
12676,
292,
1319,
29898,
10041,
29918,
1989,
9303,
29922,
13087,
29918,
1761,
29892,
1426,
29922,
726,
29892,
13,
462,
462,
462,
462,
462,
1993,
29918,
21064,
4878,
29922,
8824,
29892,
13,
462,
462,
462,
462,
462,
11872,
29918,
2248,
29922,
19411,
29918,
2248,
29892,
13,
462,
462,
462,
462,
462,
1375,
29918,
1949,
29918,
15693,
1038,
2063,
29922,
1195,
29918,
20317,
29892,
13,
462,
462,
462,
462,
462,
15886,
333,
29888,
29918,
386,
12268,
29922,
13264,
333,
29888,
29918,
386,
12268,
28166,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
679,
29918,
10041,
29918,
4841,
29918,
3166,
29918,
7039,
29898,
10041,
29918,
7039,
29901,
2391,
29961,
710,
1402,
7855,
29918,
978,
29918,
333,
29918,
1958,
29901,
360,
919,
29961,
710,
29892,
851,
29962,
1125,
13,
4706,
736,
1051,
29898,
842,
4197,
29898,
10041,
29918,
978,
29918,
333,
29918,
1958,
29961,
10041,
29918,
978,
1402,
7855,
29918,
978,
29897,
363,
7855,
29918,
978,
297,
7855,
29918,
7039,
12622,
13,
13,
1678,
822,
6597,
29918,
497,
29918,
296,
1907,
29918,
1609,
29918,
1853,
29898,
1311,
29892,
1426,
29901,
851,
29892,
7855,
29918,
1853,
29901,
14945,
1542,
29892,
3160,
29918,
1482,
29901,
6120,
353,
5852,
29892,
13,
462,
462,
268,
1993,
29918,
2764,
630,
29901,
6120,
353,
7700,
29892,
19060,
29918,
2764,
630,
29901,
6120,
353,
7700,
29892,
13,
462,
462,
268,
1993,
29918,
296,
1907,
29901,
2391,
29961,
710,
29962,
353,
6213,
29892,
19060,
29918,
296,
1907,
29901,
2391,
29961,
710,
29962,
353,
6213,
29892,
13,
462,
462,
268,
19060,
29918,
333,
29918,
3880,
29918,
294,
29918,
978,
29901,
6120,
353,
5852,
1125,
13,
4706,
9995,
13,
4706,
6597,
16212,
5276,
297,
1426,
13,
13,
4706,
826,
3174,
29901,
13,
9651,
1426,
313,
710,
1125,
278,
1881,
1426,
13,
9651,
7855,
29918,
1853,
313,
6691,
1542,
1125,
278,
1134,
310,
16212,
304,
6597,
13,
9651,
3160,
29918,
1482,
313,
11227,
1125,
3692,
304,
3160,
10075,
716,
16212,
451,
3447,
297,
278,
274,
2633,
2566,
13,
9651,
1993,
29918,
2764,
630,
313,
11227,
1125,
3692,
304,
6597,
3151,
630,
16212,
7625,
515,
278,
4944,
6535,
8455,
13,
9651,
19060,
29918,
2764,
630,
313,
11227,
1125,
3692,
304,
3349,
3151,
630,
16212,
7625,
515,
278,
4944,
6535,
8455,
515,
278,
13,
462,
462,
1678,
23892,
6743,
13,
9651,
1993,
29918,
296,
1907,
313,
1293,
29961,
710,
29962,
1125,
1993,
278,
4944,
16212,
13,
9651,
19060,
29918,
296,
1907,
313,
1293,
29961,
710,
29962,
1125,
19060,
278,
4944,
16212,
515,
278,
2582,
13,
9651,
19060,
29918,
333,
29918,
3880,
29918,
294,
29918,
978,
313,
11227,
1125,
437,
451,
6597,
7855,
18999,
746,
1304,
408,
2983,
297,
278,
6535,
13,
13,
4706,
16969,
29901,
13,
9651,
1051,
29901,
278,
1051,
310,
16212,
23892,
515,
1426,
13,
13,
4706,
9995,
13,
4706,
16212,
353,
731,
580,
13,
4706,
565,
3160,
29918,
1482,
29901,
13,
9651,
16212,
29889,
5504,
29898,
29940,
698,
5647,
28891,
29889,
4352,
29918,
296,
1907,
29918,
13087,
29898,
726,
29892,
1583,
29889,
10041,
29918,
1853,
29918,
13087,
29918,
1958,
29961,
10041,
29918,
1853,
12622,
13,
4706,
565,
1993,
29918,
2764,
630,
29901,
13,
9651,
16212,
29889,
5504,
29898,
29940,
698,
5647,
28891,
29889,
4352,
29918,
296,
1907,
29918,
13087,
29898,
13,
18884,
1426,
29892,
6418,
1430,
4214,
29918,
6154,
3267,
4214,
29918,
1525,
1692,
29990,
2890,
29961,
10041,
29918,
1853,
3816,
29900,
29962,
718,
525,
29989,
4286,
7122,
29898,
1311,
29889,
2585,
29918,
12847,
29889,
657,
29918,
2764,
630,
29918,
296,
1907,
29898,
13,
462,
1678,
7855,
29918,
1853,
29922,
10041,
29918,
1853,
29892,
19060,
29918,
333,
29918,
3880,
29918,
294,
29918,
978,
29922,
735,
2325,
29918,
333,
29918,
3880,
29918,
294,
29918,
978,
876,
718,
13,
18884,
6418,
1430,
4214,
29918,
6154,
3267,
4214,
29918,
1525,
1692,
29990,
2890,
29961,
10041,
29918,
1853,
3816,
29896,
12622,
13,
4706,
565,
19060,
29918,
2764,
630,
29901,
13,
9651,
16212,
22361,
731,
29898,
1311,
29889,
657,
29918,
2764,
630,
29918,
296,
1907,
29898,
10041,
29918,
1853,
29922,
10041,
29918,
1853,
29892,
19060,
29918,
333,
29918,
3880,
29918,
294,
29918,
978,
29922,
735,
2325,
29918,
333,
29918,
3880,
29918,
294,
29918,
978,
876,
13,
4706,
565,
1993,
29918,
296,
1907,
29901,
13,
9651,
16212,
29889,
5504,
29898,
29940,
698,
5647,
28891,
29889,
4352,
29918,
296,
1907,
29918,
13087,
29898,
13,
18884,
1426,
29892,
6418,
1430,
4214,
29918,
6154,
3267,
4214,
29918,
1525,
1692,
29990,
2890,
29961,
10041,
29918,
1853,
3816,
29900,
29962,
718,
525,
29989,
4286,
7122,
29898,
4352,
29918,
296,
1907,
29897,
718,
13,
18884,
6418,
1430,
4214,
29918,
6154,
3267,
4214,
29918,
1525,
1692,
29990,
2890,
29961,
10041,
29918,
1853,
3816,
29896,
12622,
13,
4706,
565,
19060,
29918,
296,
1907,
29901,
13,
9651,
16212,
22361,
731,
29898,
735,
2325,
29918,
296,
1907,
29897,
13,
4706,
736,
12705,
29898,
1761,
29898,
296,
1907,
876,
13,
2
] |
tests/hacsbase/test_hacsbase_data.py | chbonkie/hacs | 2 | 3999 | """Data Test Suite."""
from aiogithubapi.objects import repository
import pytest
import os
from homeassistant.core import HomeAssistant
from custom_components.hacs.hacsbase.data import HacsData
from custom_components.hacs.helpers.classes.repository import HacsRepository
from custom_components.hacs.hacsbase.configuration import Configuration
from custom_components.hacs.share import get_hacs
from tests.dummy_repository import dummy_repository_base
@pytest.mark.asyncio
async def test_hacs_data_async_write1(tmpdir):
data = HacsData()
hacs = get_hacs()
repository = dummy_repository_base()
repository.data.installed = True
repository.data.installed_version = "1"
hacs.repositories = [repository]
hacs.hass = HomeAssistant()
hacs.hass.config.config_dir = tmpdir
hacs.configuration = Configuration()
await data.async_write()
@pytest.mark.asyncio
async def test_hacs_data_async_write2(tmpdir):
data = HacsData()
hacs = get_hacs()
hacs.hass = HomeAssistant()
hacs.hass.config.config_dir = tmpdir
hacs.configuration = Configuration()
hacs.system.status.background_task = False
hacs.system.disabled = False
await data.async_write()
@pytest.mark.asyncio
async def test_hacs_data_restore(tmpdir):
data = HacsData()
hacs = get_hacs()
hacs.hass = HomeAssistant()
hacs.hass.config.config_dir = tmpdir
await data.restore()
| [
1,
9995,
1469,
4321,
2166,
568,
1213,
15945,
13,
3166,
7468,
468,
2985,
2754,
29889,
12650,
1053,
9810,
13,
5215,
11451,
1688,
13,
5215,
2897,
13,
3166,
3271,
465,
22137,
29889,
3221,
1053,
8778,
7900,
22137,
13,
3166,
2888,
29918,
14036,
29889,
29882,
16815,
29889,
29882,
16815,
3188,
29889,
1272,
1053,
379,
16815,
1469,
13,
3166,
2888,
29918,
14036,
29889,
29882,
16815,
29889,
3952,
6774,
29889,
13203,
29889,
19033,
1053,
379,
16815,
11481,
13,
3166,
2888,
29918,
14036,
29889,
29882,
16815,
29889,
29882,
16815,
3188,
29889,
13305,
1053,
20999,
13,
3166,
2888,
29918,
14036,
29889,
29882,
16815,
29889,
13653,
1053,
679,
29918,
29882,
16815,
13,
13,
3166,
6987,
29889,
29881,
11770,
29918,
19033,
1053,
20254,
29918,
19033,
29918,
3188,
13,
13,
13,
29992,
2272,
1688,
29889,
3502,
29889,
294,
948,
3934,
13,
12674,
822,
1243,
29918,
29882,
16815,
29918,
1272,
29918,
12674,
29918,
3539,
29896,
29898,
7050,
3972,
1125,
13,
1678,
848,
353,
379,
16815,
1469,
580,
13,
1678,
447,
2395,
353,
679,
29918,
29882,
16815,
580,
13,
1678,
9810,
353,
20254,
29918,
19033,
29918,
3188,
580,
13,
1678,
9810,
29889,
1272,
29889,
25537,
353,
5852,
13,
1678,
9810,
29889,
1272,
29889,
25537,
29918,
3259,
353,
376,
29896,
29908,
13,
1678,
447,
2395,
29889,
276,
1066,
20106,
353,
518,
19033,
29962,
13,
1678,
447,
2395,
29889,
29882,
465,
353,
8778,
7900,
22137,
580,
13,
1678,
447,
2395,
29889,
29882,
465,
29889,
2917,
29889,
2917,
29918,
3972,
353,
13128,
3972,
13,
1678,
447,
2395,
29889,
13305,
353,
20999,
580,
13,
1678,
7272,
848,
29889,
12674,
29918,
3539,
580,
13,
13,
13,
29992,
2272,
1688,
29889,
3502,
29889,
294,
948,
3934,
13,
12674,
822,
1243,
29918,
29882,
16815,
29918,
1272,
29918,
12674,
29918,
3539,
29906,
29898,
7050,
3972,
1125,
13,
1678,
848,
353,
379,
16815,
1469,
580,
13,
1678,
447,
2395,
353,
679,
29918,
29882,
16815,
580,
13,
1678,
447,
2395,
29889,
29882,
465,
353,
8778,
7900,
22137,
580,
13,
1678,
447,
2395,
29889,
29882,
465,
29889,
2917,
29889,
2917,
29918,
3972,
353,
13128,
3972,
13,
1678,
447,
2395,
29889,
13305,
353,
20999,
580,
13,
1678,
447,
2395,
29889,
5205,
29889,
4882,
29889,
7042,
29918,
7662,
353,
7700,
13,
1678,
447,
2395,
29889,
5205,
29889,
18279,
353,
7700,
13,
1678,
7272,
848,
29889,
12674,
29918,
3539,
580,
13,
13,
13,
29992,
2272,
1688,
29889,
3502,
29889,
294,
948,
3934,
13,
12674,
822,
1243,
29918,
29882,
16815,
29918,
1272,
29918,
5060,
487,
29898,
7050,
3972,
1125,
13,
1678,
848,
353,
379,
16815,
1469,
580,
13,
1678,
447,
2395,
353,
679,
29918,
29882,
16815,
580,
13,
1678,
447,
2395,
29889,
29882,
465,
353,
8778,
7900,
22137,
580,
13,
1678,
447,
2395,
29889,
29882,
465,
29889,
2917,
29889,
2917,
29918,
3972,
353,
13128,
3972,
13,
1678,
7272,
848,
29889,
5060,
487,
580,
13,
2
] |
tests/gpflow/models/test_gpr_posterior.py | vishalbelsare/GPflow | 0 | 140974 | <filename>tests/gpflow/models/test_gpr_posterior.py
import numpy as np
import pytest
import gpflow
from gpflow.models.gpr import GPR_deprecated, GPR_with_posterior
from gpflow.posteriors import PrecomputeCacheType
def make_models(regression_data):
"""Helper function to create models"""
k = gpflow.kernels.Matern52()
mold = GPR_deprecated(data=regression_data, kernel=k)
mnew = GPR_with_posterior(data=regression_data, kernel=k)
return mold, mnew
def _get_data_for_tests():
"""Helper function to create testing data"""
X = np.random.randn(5, 6)
Y = np.random.randn(5, 2)
X_new = np.random.randn(3, 10, 5, 6)
return X, X_new, Y
@pytest.mark.parametrize("cache_type", [PrecomputeCacheType.TENSOR, PrecomputeCacheType.VARIABLE])
@pytest.mark.parametrize("full_cov", [True, False])
@pytest.mark.parametrize("full_output_cov", [True, False])
def test_old_vs_new_gp_fused(
cache_type: PrecomputeCacheType, full_cov: bool, full_output_cov: bool
):
X, X_new, Y = _get_data_for_tests()
mold, mnew = make_models((X, Y))
mu_old, var2_old = mold.predict_f(X_new, full_cov=full_cov, full_output_cov=full_output_cov)
mu_new_fuse, var2_new_fuse = mnew.predict_f(
X_new, full_cov=full_cov, full_output_cov=full_output_cov
)
# check new fuse is same as old version
np.testing.assert_allclose(mu_new_fuse, mu_old)
np.testing.assert_allclose(var2_new_fuse, var2_old)
@pytest.mark.parametrize("cache_type", [PrecomputeCacheType.TENSOR, PrecomputeCacheType.VARIABLE])
@pytest.mark.parametrize("full_cov", [True, False])
@pytest.mark.parametrize("full_output_cov", [True, False])
def test_old_vs_new_with_posterior(
cache_type: PrecomputeCacheType, full_cov: bool, full_output_cov: bool
):
X, X_new, Y = _get_data_for_tests()
mold, mnew = make_models((X, Y))
mu_old, var2_old = mold.predict_f(X_new, full_cov=full_cov, full_output_cov=full_output_cov)
mu_new_cache, var2_new_cache = mnew.posterior(cache_type).predict_f(
X_new, full_cov=full_cov, full_output_cov=full_output_cov
)
# check new cache is same as old version
np.testing.assert_allclose(mu_old, mu_new_cache)
np.testing.assert_allclose(var2_old, var2_new_cache)
| [
1,
529,
9507,
29958,
21150,
29914,
29887,
29886,
1731,
29914,
9794,
29914,
1688,
29918,
29887,
558,
29918,
2490,
261,
1611,
29889,
2272,
13,
5215,
12655,
408,
7442,
13,
5215,
11451,
1688,
13,
13,
5215,
330,
29886,
1731,
13,
3166,
330,
29886,
1731,
29889,
9794,
29889,
29887,
558,
1053,
402,
10593,
29918,
311,
17990,
630,
29892,
402,
10593,
29918,
2541,
29918,
2490,
261,
1611,
13,
3166,
330,
29886,
1731,
29889,
2490,
13613,
943,
1053,
4721,
26017,
10408,
1542,
13,
13,
13,
1753,
1207,
29918,
9794,
29898,
276,
11476,
29918,
1272,
1125,
13,
1678,
9995,
10739,
740,
304,
1653,
4733,
15945,
29908,
13,
13,
1678,
413,
353,
330,
29886,
1731,
29889,
22178,
1379,
29889,
9782,
824,
29945,
29906,
580,
13,
13,
1678,
286,
1025,
353,
402,
10593,
29918,
311,
17990,
630,
29898,
1272,
29922,
276,
11476,
29918,
1272,
29892,
8466,
29922,
29895,
29897,
13,
1678,
286,
1482,
353,
402,
10593,
29918,
2541,
29918,
2490,
261,
1611,
29898,
1272,
29922,
276,
11476,
29918,
1272,
29892,
8466,
29922,
29895,
29897,
13,
1678,
736,
286,
1025,
29892,
286,
1482,
13,
13,
13,
1753,
903,
657,
29918,
1272,
29918,
1454,
29918,
21150,
7295,
13,
1678,
9995,
10739,
740,
304,
1653,
6724,
848,
15945,
29908,
13,
1678,
1060,
353,
7442,
29889,
8172,
29889,
9502,
29876,
29898,
29945,
29892,
29871,
29953,
29897,
13,
1678,
612,
353,
7442,
29889,
8172,
29889,
9502,
29876,
29898,
29945,
29892,
29871,
29906,
29897,
13,
1678,
1060,
29918,
1482,
353,
7442,
29889,
8172,
29889,
9502,
29876,
29898,
29941,
29892,
29871,
29896,
29900,
29892,
29871,
29945,
29892,
29871,
29953,
29897,
13,
1678,
736,
1060,
29892,
1060,
29918,
1482,
29892,
612,
13,
13,
13,
29992,
2272,
1688,
29889,
3502,
29889,
3207,
300,
374,
911,
703,
8173,
29918,
1853,
613,
518,
6572,
26017,
10408,
1542,
29889,
29911,
1430,
29903,
1955,
29892,
4721,
26017,
10408,
1542,
29889,
26865,
29902,
6181,
2314,
13,
29992,
2272,
1688,
29889,
3502,
29889,
3207,
300,
374,
911,
703,
8159,
29918,
24542,
613,
518,
5574,
29892,
7700,
2314,
13,
29992,
2272,
1688,
29889,
3502,
29889,
3207,
300,
374,
911,
703,
8159,
29918,
4905,
29918,
24542,
613,
518,
5574,
29892,
7700,
2314,
13,
1753,
1243,
29918,
1025,
29918,
4270,
29918,
1482,
29918,
29887,
29886,
29918,
29888,
3880,
29898,
13,
1678,
7090,
29918,
1853,
29901,
4721,
26017,
10408,
1542,
29892,
2989,
29918,
24542,
29901,
6120,
29892,
2989,
29918,
4905,
29918,
24542,
29901,
6120,
13,
1125,
13,
1678,
1060,
29892,
1060,
29918,
1482,
29892,
612,
353,
903,
657,
29918,
1272,
29918,
1454,
29918,
21150,
580,
13,
1678,
286,
1025,
29892,
286,
1482,
353,
1207,
29918,
9794,
3552,
29990,
29892,
612,
876,
13,
13,
1678,
3887,
29918,
1025,
29892,
722,
29906,
29918,
1025,
353,
286,
1025,
29889,
27711,
29918,
29888,
29898,
29990,
29918,
1482,
29892,
2989,
29918,
24542,
29922,
8159,
29918,
24542,
29892,
2989,
29918,
4905,
29918,
24542,
29922,
8159,
29918,
4905,
29918,
24542,
29897,
13,
1678,
3887,
29918,
1482,
29918,
29888,
1509,
29892,
722,
29906,
29918,
1482,
29918,
29888,
1509,
353,
286,
1482,
29889,
27711,
29918,
29888,
29898,
13,
4706,
1060,
29918,
1482,
29892,
2989,
29918,
24542,
29922,
8159,
29918,
24542,
29892,
2989,
29918,
4905,
29918,
24542,
29922,
8159,
29918,
4905,
29918,
24542,
13,
1678,
1723,
13,
1678,
396,
1423,
716,
285,
1509,
338,
1021,
408,
2030,
1873,
13,
1678,
7442,
29889,
13424,
29889,
9294,
29918,
497,
5358,
29898,
2589,
29918,
1482,
29918,
29888,
1509,
29892,
3887,
29918,
1025,
29897,
13,
1678,
7442,
29889,
13424,
29889,
9294,
29918,
497,
5358,
29898,
1707,
29906,
29918,
1482,
29918,
29888,
1509,
29892,
722,
29906,
29918,
1025,
29897,
13,
13,
13,
29992,
2272,
1688,
29889,
3502,
29889,
3207,
300,
374,
911,
703,
8173,
29918,
1853,
613,
518,
6572,
26017,
10408,
1542,
29889,
29911,
1430,
29903,
1955,
29892,
4721,
26017,
10408,
1542,
29889,
26865,
29902,
6181,
2314,
13,
29992,
2272,
1688,
29889,
3502,
29889,
3207,
300,
374,
911,
703,
8159,
29918,
24542,
613,
518,
5574,
29892,
7700,
2314,
13,
29992,
2272,
1688,
29889,
3502,
29889,
3207,
300,
374,
911,
703,
8159,
29918,
4905,
29918,
24542,
613,
518,
5574,
29892,
7700,
2314,
13,
1753,
1243,
29918,
1025,
29918,
4270,
29918,
1482,
29918,
2541,
29918,
2490,
261,
1611,
29898,
13,
1678,
7090,
29918,
1853,
29901,
4721,
26017,
10408,
1542,
29892,
2989,
29918,
24542,
29901,
6120,
29892,
2989,
29918,
4905,
29918,
24542,
29901,
6120,
13,
1125,
13,
1678,
1060,
29892,
1060,
29918,
1482,
29892,
612,
353,
903,
657,
29918,
1272,
29918,
1454,
29918,
21150,
580,
13,
1678,
286,
1025,
29892,
286,
1482,
353,
1207,
29918,
9794,
3552,
29990,
29892,
612,
876,
13,
13,
1678,
3887,
29918,
1025,
29892,
722,
29906,
29918,
1025,
353,
286,
1025,
29889,
27711,
29918,
29888,
29898,
29990,
29918,
1482,
29892,
2989,
29918,
24542,
29922,
8159,
29918,
24542,
29892,
2989,
29918,
4905,
29918,
24542,
29922,
8159,
29918,
4905,
29918,
24542,
29897,
13,
1678,
3887,
29918,
1482,
29918,
8173,
29892,
722,
29906,
29918,
1482,
29918,
8173,
353,
286,
1482,
29889,
2490,
261,
1611,
29898,
8173,
29918,
1853,
467,
27711,
29918,
29888,
29898,
13,
4706,
1060,
29918,
1482,
29892,
2989,
29918,
24542,
29922,
8159,
29918,
24542,
29892,
2989,
29918,
4905,
29918,
24542,
29922,
8159,
29918,
4905,
29918,
24542,
13,
1678,
1723,
13,
13,
1678,
396,
1423,
716,
7090,
338,
1021,
408,
2030,
1873,
13,
1678,
7442,
29889,
13424,
29889,
9294,
29918,
497,
5358,
29898,
2589,
29918,
1025,
29892,
3887,
29918,
1482,
29918,
8173,
29897,
13,
1678,
7442,
29889,
13424,
29889,
9294,
29918,
497,
5358,
29898,
1707,
29906,
29918,
1025,
29892,
722,
29906,
29918,
1482,
29918,
8173,
29897,
13,
2
] |
src/pymovie/astrometry_client.py | cmbennett01/pymovie | 5 | 153239 | <gh_stars>1-10
from urllib.parse import urlencode, quote # took out urlparse
from urllib.request import urlopen, Request
from urllib.error import HTTPError
from email.mime.base import MIMEBase
from email.mime.multipart import MIMEMultipart
from email.mime.application import MIMEApplication
from email.encoders import encode_noop
import json
def json2python(data):
try:
return json.loads(data)
except json.JSONDecodeError:
pass
return None
python2json = json.dumps
class MalformedResponse(Exception):
pass
class RequestError(Exception):
pass
class Client(object):
default_url = 'http://nova.astrometry.net/api/'
def __init__(self,
apiurl=default_url, tracer=print, trace=False):
self.session = None
self.apiurl = apiurl
self.trace = trace
self.tracer = tracer # Ultimately I will use showMsg(msg)
def get_url(self, service):
return self.apiurl + service
# def send_request(self, service, args={}, file_args=None):
def send_request(self, service, args=None, file_args=None):
if args is None:
args = {}
if self.session is not None:
args.update({'session': self.session})
if self.trace:
self.tracer(f'Python: {args}')
json_blob = python2json(args)
if self.trace:
self.tracer(f'Sending json: {json_blob}')
url = self.get_url(service)
if self.trace:
self.tracer(f'Sending to URL: {url}')
# If we're sending a file, format a multipart/form-data
if file_args is not None:
# Make a custom generator to format it the way we need.
from io import BytesIO
# py3
from email.generator import BytesGenerator as TheGenerator
# # py2
# from email.generator import Generator as TheGenerator
m1 = MIMEBase('text', 'plain')
m1.add_header('Content-disposition',
'form-data; name="request-json"')
m1.set_payload(json_blob)
m2 = MIMEApplication(file_args[1], 'octet-stream', encode_noop)
m2.add_header('Content-disposition',
'form-data; name="file"; filename="%s"' % file_args[0])
mp = MIMEMultipart('form-data', None, [m1, m2])
class MyGenerator(TheGenerator):
def __init__(self, fpath, root=True):
# don't try to use super() here; in py2 Generator is not a
# new-style class. Yuck.
TheGenerator.__init__(self, fpath, mangle_from_=False,
maxheaderlen=0)
self.root = root
def _write_headers(self, msg):
# We don't want to write the top-level headers;
# they go into Request(headers) instead.
if self.root:
return
# We need to use \r\n line-terminator, but Generator
# doesn't provide the flexibility to override, so we
# have to copy-n-paste-n-modify.
for h, v in msg.items():
self._fp.write(('%s: %s\r\n' % (h, v)).encode())
# A blank line always separates headers from body
self._fp.write('\r\n'.encode())
# The _write_multipart method calls "clone" for the
# subparts. We hijack that, setting root=False
def clone(self, fpath):
return MyGenerator(fpath, root=False)
fp = BytesIO()
g = MyGenerator(fp)
g.flatten(mp)
data = fp.getvalue()
headers = {'Content-type': mp.get('Content-type')}
else:
# Else send x-www-form-encoded
data = {'request-json': json_blob}
if self.trace:
self.tracer(f'Sending form data: {data}')
data = urlencode(data)
data = data.encode('utf-8')
if self.trace:
self.tracer(f'Sending data: {data}')
headers = {}
request = Request(url=url, headers=headers, data=data)
try:
f = urlopen(request)
txt = f.read()
if self.trace:
self.tracer(f'Got json: {txt}')
result = json2python(txt)
if self.trace:
self.tracer(f'Got result: {result}')
stat = result.get('status')
if self.trace:
self.tracer(f'Got status: {stat}')
if stat == 'error':
errstr = result.get('errormessage', '(none)')
raise RequestError('server error message: ' + errstr)
return result
except HTTPError as e:
self.tracer(f'HTTPError: {e}')
txt = e.read()
open('err.html', 'wb').write(txt)
self.tracer(f'Wrote error text to err.html')
def login(self, apikey):
args = {'apikey': apikey}
result = self.send_request('login', args)
sess = result.get('session')
if self.trace:
self.tracer(f'Got session: {sess}')
if not sess:
raise RequestError('no session in result')
self.session = sess
def _get_upload_args(self, **kwargs):
args = {}
for key, default, typ in [('allow_commercial_use', 'd', str),
('allow_modifications', 'd', str),
('publicly_visible', 'y', str),
('scale_units', None, str),
('scale_type', None, str),
('scale_lower', None, float),
('scale_upper', None, float),
('scale_est', None, float),
('scale_err', None, float),
('center_ra', None, float),
('center_dec', None, float),
('parity', None, int),
('radius', None, float),
('downsample_factor', None, int),
('positional_error', None, float),
('tweak_order', None, int),
('crpix_center', None, bool),
('x', None, list),
('y', None, list),
]:
if key in kwargs:
val = kwargs.pop(key)
val = typ(val)
args.update({key: val})
elif default is not None:
args.update({key: default})
if self.trace:
self.tracer(f'Upload args: {args}')
return args
def url_upload(self, url, **kwargs):
args = dict(url=url)
args.update(self._get_upload_args(**kwargs))
result = self.send_request('url_upload', args)
return result
def upload(self, fn=None, **kwargs):
args = self._get_upload_args(**kwargs)
file_args = None
if fn is not None:
try:
f = open(fn, 'rb')
file_args = (fn, f.read())
except IOError:
if self.trace:
self.tracer(f'File {fn} does not exist')
raise
return self.send_request('upload', args, file_args)
def submission_images(self, subid):
result = self.send_request('submission_images', {'subid': subid})
return result.get('image_ids')
# def overlay_plot(self, service, outfn, wcsfn, wcsext=0):
# wcs = anutil.Tan(wcsfn, wcsext)
# params = dict(crval1 = wcs.crval[0], crval2 = wcs.crval[1],
# crpix1 = wcs.crpix[0], crpix2 = wcs.crpix[1],
# cd11 = wcs.cd[0], cd12 = wcs.cd[1],
# cd21 = wcs.cd[2], cd22 = wcs.cd[3],
# imagew = wcs.imagew, imageh = wcs.imageh)
# result = self.send_request(service, {'wcs':params})
# if self.trace:
# print('Result status:', result['status'])
# plotdata = result['plot']
# plotdata = base64.b64decode(plotdata)
# open(outfn, 'wb').write(plotdata)
# if self.trace:
# print('Wrote', outfn)
# def sdss_plot(self, outfn, wcsfn, wcsext=0):
# return self.overlay_plot('sdss_image_for_wcs', outfn,
# wcsfn, wcsext)
# def galex_plot(self, outfn, wcsfn, wcsext=0):
# return self.overlay_plot('galex_image_for_wcs', outfn,
# wcsfn, wcsext)
def myjobs(self):
result = self.send_request('myjobs/')
return result['jobs']
def job_status(self, job_id, justdict=False):
result = self.send_request('jobs/%s' % job_id)
if justdict:
return result
stat = result.get('status')
if stat == 'success':
# result = self.send_request('jobs/%s/calibration' % job_id)
# print('Calibration:', result)
# result = self.send_request('jobs/%s/tags' % job_id)
# print('Tags:', result)
# result = self.send_request('jobs/%s/machine_tags' % job_id)
# print('Machine Tags:', result)
# result = self.send_request('jobs/%s/objects_in_field' % job_id)
# print('Objects in field:', result)
# result = self.send_request('jobs/%s/annotations' % job_id)
# print('Annotations:', result)
result = self.send_request('jobs/%s/info' % job_id)
self.tracer(f'Calibration: {result}')
return stat
def annotate_data(self, job_id):
"""
:param job_id: id of job
:return: return data for annotations
"""
result = self.send_request('jobs/%s/annotations' % job_id)
return result
def sub_status(self, sub_id, justdict=False):
result = self.send_request('submissions/%s' % sub_id)
if justdict:
return result
return result.get('status')
def jobs_by_tag(self, tag, exact):
exact_option = 'exact=yes' if exact else ''
result = self.send_request(
'jobs_by_tag?query=%s&%s' % (quote(tag.strip()), exact_option),
{},
)
return result
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
3166,
3142,
1982,
29889,
5510,
1053,
3142,
12508,
29892,
14978,
29871,
396,
3614,
714,
3142,
5510,
13,
3166,
3142,
1982,
29889,
3827,
1053,
5065,
417,
2238,
29892,
10729,
13,
3166,
3142,
1982,
29889,
2704,
1053,
7331,
2392,
13,
13,
3166,
4876,
29889,
29885,
603,
29889,
3188,
1053,
341,
8890,
5160,
13,
3166,
4876,
29889,
29885,
603,
29889,
18056,
442,
1053,
341,
8890,
6857,
27494,
13,
3166,
4876,
29889,
29885,
603,
29889,
6214,
1053,
341,
8890,
4873,
13,
13,
3166,
4876,
29889,
3977,
397,
414,
1053,
19750,
29918,
1217,
459,
13,
13,
5215,
4390,
13,
13,
13,
1753,
4390,
29906,
4691,
29898,
1272,
1125,
13,
1678,
1018,
29901,
13,
4706,
736,
4390,
29889,
18132,
29898,
1272,
29897,
13,
1678,
5174,
4390,
29889,
7249,
2772,
401,
2392,
29901,
13,
4706,
1209,
13,
1678,
736,
6213,
13,
13,
13,
4691,
29906,
3126,
353,
4390,
29889,
29881,
17204,
13,
13,
13,
1990,
3792,
15628,
5103,
29898,
2451,
1125,
13,
1678,
1209,
13,
13,
13,
1990,
10729,
2392,
29898,
2451,
1125,
13,
1678,
1209,
13,
13,
13,
1990,
12477,
29898,
3318,
1125,
13,
1678,
2322,
29918,
2271,
353,
525,
1124,
597,
29876,
4273,
29889,
579,
456,
27184,
29889,
1212,
29914,
2754,
22208,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
13,
462,
7882,
2271,
29922,
4381,
29918,
2271,
29892,
16703,
261,
29922,
2158,
29892,
9637,
29922,
8824,
1125,
13,
4706,
1583,
29889,
7924,
353,
6213,
13,
4706,
1583,
29889,
2754,
2271,
353,
7882,
2271,
13,
4706,
1583,
29889,
15003,
353,
9637,
13,
4706,
1583,
29889,
29873,
945,
261,
353,
16703,
261,
259,
396,
18514,
15084,
306,
674,
671,
1510,
16190,
29898,
7645,
29897,
13,
13,
1678,
822,
679,
29918,
2271,
29898,
1311,
29892,
2669,
1125,
13,
4706,
736,
1583,
29889,
2754,
2271,
718,
2669,
13,
13,
1678,
396,
822,
3638,
29918,
3827,
29898,
1311,
29892,
2669,
29892,
6389,
3790,
1118,
934,
29918,
5085,
29922,
8516,
1125,
13,
1678,
822,
3638,
29918,
3827,
29898,
1311,
29892,
2669,
29892,
6389,
29922,
8516,
29892,
934,
29918,
5085,
29922,
8516,
1125,
13,
4706,
565,
6389,
338,
6213,
29901,
13,
9651,
6389,
353,
6571,
13,
4706,
565,
1583,
29889,
7924,
338,
451,
6213,
29901,
13,
9651,
6389,
29889,
5504,
3319,
29915,
7924,
2396,
1583,
29889,
7924,
1800,
13,
4706,
565,
1583,
29889,
15003,
29901,
13,
9651,
1583,
29889,
29873,
945,
261,
29898,
29888,
29915,
11980,
29901,
426,
5085,
29913,
1495,
13,
4706,
4390,
29918,
10054,
353,
3017,
29906,
3126,
29898,
5085,
29897,
13,
4706,
565,
1583,
29889,
15003,
29901,
13,
9651,
1583,
29889,
29873,
945,
261,
29898,
29888,
29915,
29903,
2548,
4390,
29901,
426,
3126,
29918,
10054,
29913,
1495,
13,
4706,
3142,
353,
1583,
29889,
657,
29918,
2271,
29898,
5509,
29897,
13,
4706,
565,
1583,
29889,
15003,
29901,
13,
9651,
1583,
29889,
29873,
945,
261,
29898,
29888,
29915,
29903,
2548,
304,
3988,
29901,
426,
2271,
29913,
1495,
13,
13,
4706,
396,
960,
591,
29915,
276,
9348,
263,
934,
29892,
3402,
263,
6674,
442,
29914,
689,
29899,
1272,
13,
4706,
565,
934,
29918,
5085,
338,
451,
6213,
29901,
13,
9651,
396,
8561,
263,
2888,
15299,
304,
3402,
372,
278,
982,
591,
817,
29889,
13,
9651,
515,
12013,
1053,
2648,
2167,
5971,
13,
9651,
396,
11451,
29941,
13,
9651,
515,
4876,
29889,
27959,
1053,
2648,
2167,
21575,
408,
450,
21575,
13,
9651,
396,
396,
11451,
29906,
13,
9651,
396,
515,
4876,
29889,
27959,
1053,
3251,
1061,
408,
450,
21575,
13,
13,
9651,
286,
29896,
353,
341,
8890,
5160,
877,
726,
742,
525,
24595,
1495,
13,
9651,
286,
29896,
29889,
1202,
29918,
6672,
877,
3916,
29899,
2218,
3283,
742,
13,
462,
3986,
525,
689,
29899,
1272,
29936,
1024,
543,
3827,
29899,
3126,
29908,
1495,
13,
9651,
286,
29896,
29889,
842,
29918,
23813,
29898,
3126,
29918,
10054,
29897,
13,
9651,
286,
29906,
353,
341,
8890,
4873,
29898,
1445,
29918,
5085,
29961,
29896,
1402,
525,
20082,
300,
29899,
5461,
742,
19750,
29918,
1217,
459,
29897,
13,
9651,
286,
29906,
29889,
1202,
29918,
6672,
877,
3916,
29899,
2218,
3283,
742,
13,
462,
3986,
525,
689,
29899,
1272,
29936,
1024,
543,
1445,
1769,
10422,
543,
29995,
29879,
29908,
29915,
1273,
934,
29918,
5085,
29961,
29900,
2314,
13,
9651,
22326,
353,
341,
8890,
6857,
27494,
877,
689,
29899,
1272,
742,
6213,
29892,
518,
29885,
29896,
29892,
286,
29906,
2314,
13,
13,
9651,
770,
1619,
21575,
29898,
1576,
21575,
1125,
13,
18884,
822,
4770,
2344,
12035,
1311,
29892,
285,
2084,
29892,
3876,
29922,
5574,
1125,
13,
462,
1678,
396,
1016,
29915,
29873,
1018,
304,
671,
2428,
580,
1244,
29936,
297,
11451,
29906,
3251,
1061,
338,
451,
263,
13,
462,
1678,
396,
716,
29899,
3293,
770,
29889,
29871,
612,
2707,
29889,
13,
462,
1678,
450,
21575,
17255,
2344,
12035,
1311,
29892,
285,
2084,
29892,
286,
2521,
29918,
3166,
29918,
29922,
8824,
29892,
13,
462,
462,
3986,
4236,
6672,
2435,
29922,
29900,
29897,
13,
462,
1678,
1583,
29889,
4632,
353,
3876,
13,
13,
18884,
822,
903,
3539,
29918,
13662,
29898,
1311,
29892,
10191,
1125,
13,
462,
1678,
396,
1334,
1016,
29915,
29873,
864,
304,
2436,
278,
2246,
29899,
5563,
9066,
29936,
13,
462,
1678,
396,
896,
748,
964,
10729,
29898,
13662,
29897,
2012,
29889,
13,
462,
1678,
565,
1583,
29889,
4632,
29901,
13,
462,
4706,
736,
13,
462,
1678,
396,
1334,
817,
304,
671,
320,
29878,
29905,
29876,
1196,
29899,
18821,
1061,
29892,
541,
3251,
1061,
13,
462,
1678,
396,
1838,
29915,
29873,
3867,
278,
8525,
4127,
304,
5712,
29892,
577,
591,
13,
462,
1678,
396,
505,
304,
3509,
29899,
29876,
29899,
16179,
29899,
29876,
29899,
1545,
1598,
29889,
13,
462,
1678,
363,
298,
29892,
325,
297,
10191,
29889,
7076,
7295,
13,
462,
4706,
1583,
3032,
18091,
29889,
3539,
29898,
877,
29995,
29879,
29901,
1273,
29879,
29905,
29878,
29905,
29876,
29915,
1273,
313,
29882,
29892,
325,
8106,
12508,
3101,
13,
462,
1678,
396,
319,
9654,
1196,
2337,
2903,
1078,
9066,
515,
3573,
13,
462,
1678,
1583,
3032,
18091,
29889,
3539,
28909,
29878,
29905,
29876,
4286,
12508,
3101,
13,
13,
18884,
396,
450,
903,
3539,
29918,
18056,
442,
1158,
5717,
376,
16513,
29908,
363,
278,
13,
18884,
396,
1014,
20895,
29889,
29871,
1334,
4147,
547,
393,
29892,
4444,
3876,
29922,
8824,
13,
18884,
822,
17432,
29898,
1311,
29892,
285,
2084,
1125,
13,
462,
1678,
736,
1619,
21575,
29898,
29888,
2084,
29892,
3876,
29922,
8824,
29897,
13,
13,
9651,
285,
29886,
353,
2648,
2167,
5971,
580,
13,
9651,
330,
353,
1619,
21575,
29898,
18091,
29897,
13,
9651,
330,
29889,
1579,
8606,
29898,
1526,
29897,
13,
9651,
848,
353,
285,
29886,
29889,
657,
1767,
580,
13,
9651,
9066,
353,
11117,
3916,
29899,
1853,
2396,
22326,
29889,
657,
877,
3916,
29899,
1853,
1495,
29913,
13,
13,
4706,
1683,
29901,
13,
9651,
396,
15785,
3638,
921,
29899,
1636,
29899,
689,
29899,
26716,
13,
9651,
848,
353,
11117,
3827,
29899,
3126,
2396,
4390,
29918,
10054,
29913,
13,
9651,
565,
1583,
29889,
15003,
29901,
13,
18884,
1583,
29889,
29873,
945,
261,
29898,
29888,
29915,
29903,
2548,
883,
848,
29901,
426,
1272,
29913,
1495,
13,
9651,
848,
353,
3142,
12508,
29898,
1272,
29897,
13,
9651,
848,
353,
848,
29889,
12508,
877,
9420,
29899,
29947,
1495,
13,
9651,
565,
1583,
29889,
15003,
29901,
13,
18884,
1583,
29889,
29873,
945,
261,
29898,
29888,
29915,
29903,
2548,
848,
29901,
426,
1272,
29913,
1495,
13,
9651,
9066,
353,
6571,
13,
13,
4706,
2009,
353,
10729,
29898,
2271,
29922,
2271,
29892,
9066,
29922,
13662,
29892,
848,
29922,
1272,
29897,
13,
13,
4706,
1018,
29901,
13,
9651,
285,
353,
5065,
417,
2238,
29898,
3827,
29897,
13,
9651,
13872,
353,
285,
29889,
949,
580,
13,
9651,
565,
1583,
29889,
15003,
29901,
13,
18884,
1583,
29889,
29873,
945,
261,
29898,
29888,
29915,
29954,
327,
4390,
29901,
426,
3945,
29913,
1495,
13,
9651,
1121,
353,
4390,
29906,
4691,
29898,
3945,
29897,
13,
9651,
565,
1583,
29889,
15003,
29901,
13,
18884,
1583,
29889,
29873,
945,
261,
29898,
29888,
29915,
29954,
327,
1121,
29901,
426,
2914,
29913,
1495,
13,
9651,
1002,
353,
1121,
29889,
657,
877,
4882,
1495,
13,
9651,
565,
1583,
29889,
15003,
29901,
13,
18884,
1583,
29889,
29873,
945,
261,
29898,
29888,
29915,
29954,
327,
4660,
29901,
426,
6112,
29913,
1495,
13,
9651,
565,
1002,
1275,
525,
2704,
2396,
13,
18884,
4589,
710,
353,
1121,
29889,
657,
877,
3127,
555,
1448,
742,
525,
29898,
9290,
29897,
1495,
13,
18884,
12020,
10729,
2392,
877,
2974,
1059,
2643,
29901,
525,
718,
4589,
710,
29897,
13,
9651,
736,
1121,
13,
4706,
5174,
7331,
2392,
408,
321,
29901,
13,
9651,
1583,
29889,
29873,
945,
261,
29898,
29888,
29915,
10493,
2392,
29901,
426,
29872,
29913,
1495,
13,
9651,
13872,
353,
321,
29889,
949,
580,
13,
9651,
1722,
877,
3127,
29889,
1420,
742,
525,
29893,
29890,
2824,
3539,
29898,
3945,
29897,
13,
9651,
1583,
29889,
29873,
945,
261,
29898,
29888,
29915,
29956,
4859,
1059,
1426,
304,
4589,
29889,
1420,
1495,
13,
13,
1678,
822,
6464,
29898,
1311,
29892,
7882,
1989,
1125,
13,
4706,
6389,
353,
11117,
2754,
1989,
2396,
7882,
1989,
29913,
13,
4706,
1121,
353,
1583,
29889,
6717,
29918,
3827,
877,
7507,
742,
6389,
29897,
13,
4706,
27937,
353,
1121,
29889,
657,
877,
7924,
1495,
13,
4706,
565,
1583,
29889,
15003,
29901,
13,
9651,
1583,
29889,
29873,
945,
261,
29898,
29888,
29915,
29954,
327,
4867,
29901,
426,
29879,
404,
29913,
1495,
13,
4706,
565,
451,
27937,
29901,
13,
9651,
12020,
10729,
2392,
877,
1217,
4867,
297,
1121,
1495,
13,
4706,
1583,
29889,
7924,
353,
27937,
13,
13,
1678,
822,
903,
657,
29918,
9009,
29918,
5085,
29898,
1311,
29892,
3579,
19290,
1125,
13,
4706,
6389,
353,
6571,
13,
4706,
363,
1820,
29892,
2322,
29892,
2393,
297,
518,
877,
9536,
29918,
510,
1050,
1455,
29918,
1509,
742,
525,
29881,
742,
851,
511,
13,
462,
462,
29871,
6702,
9536,
29918,
1545,
8232,
742,
525,
29881,
742,
851,
511,
13,
462,
462,
29871,
6702,
3597,
368,
29918,
12872,
742,
525,
29891,
742,
851,
511,
13,
462,
462,
29871,
6702,
7052,
29918,
348,
1169,
742,
6213,
29892,
851,
511,
13,
462,
462,
29871,
6702,
7052,
29918,
1853,
742,
6213,
29892,
851,
511,
13,
462,
462,
29871,
6702,
7052,
29918,
13609,
742,
6213,
29892,
5785,
511,
13,
462,
462,
29871,
6702,
7052,
29918,
21064,
742,
6213,
29892,
5785,
511,
13,
462,
462,
29871,
6702,
7052,
29918,
342,
742,
6213,
29892,
5785,
511,
13,
462,
462,
29871,
6702,
7052,
29918,
3127,
742,
6213,
29892,
5785,
511,
13,
462,
462,
29871,
6702,
5064,
29918,
336,
742,
6213,
29892,
5785,
511,
13,
462,
462,
29871,
6702,
5064,
29918,
7099,
742,
6213,
29892,
5785,
511,
13,
462,
462,
29871,
6702,
862,
537,
742,
6213,
29892,
938,
511,
13,
462,
462,
29871,
6702,
13471,
742,
6213,
29892,
5785,
511,
13,
462,
462,
29871,
6702,
3204,
11249,
29918,
19790,
742,
6213,
29892,
938,
511,
13,
462,
462,
29871,
6702,
1066,
3245,
29918,
2704,
742,
6213,
29892,
5785,
511,
13,
462,
462,
29871,
6702,
29873,
25129,
29918,
2098,
742,
6213,
29892,
938,
511,
13,
462,
462,
29871,
6702,
7283,
29886,
861,
29918,
5064,
742,
6213,
29892,
6120,
511,
13,
462,
462,
29871,
6702,
29916,
742,
6213,
29892,
1051,
511,
13,
462,
462,
29871,
6702,
29891,
742,
6213,
29892,
1051,
511,
13,
462,
462,
29871,
4514,
29901,
13,
9651,
565,
1820,
297,
9049,
5085,
29901,
13,
18884,
659,
353,
9049,
5085,
29889,
7323,
29898,
1989,
29897,
13,
18884,
659,
353,
2393,
29898,
791,
29897,
13,
18884,
6389,
29889,
5504,
3319,
1989,
29901,
659,
1800,
13,
9651,
25342,
2322,
338,
451,
6213,
29901,
13,
18884,
6389,
29889,
5504,
3319,
1989,
29901,
2322,
1800,
13,
4706,
565,
1583,
29889,
15003,
29901,
13,
9651,
1583,
29889,
29873,
945,
261,
29898,
29888,
29915,
17553,
6389,
29901,
426,
5085,
29913,
1495,
13,
4706,
736,
6389,
13,
13,
1678,
822,
3142,
29918,
9009,
29898,
1311,
29892,
3142,
29892,
3579,
19290,
1125,
13,
4706,
6389,
353,
9657,
29898,
2271,
29922,
2271,
29897,
13,
4706,
6389,
29889,
5504,
29898,
1311,
3032,
657,
29918,
9009,
29918,
5085,
29898,
1068,
19290,
876,
13,
4706,
1121,
353,
1583,
29889,
6717,
29918,
3827,
877,
2271,
29918,
9009,
742,
6389,
29897,
13,
4706,
736,
1121,
13,
13,
1678,
822,
6441,
29898,
1311,
29892,
7876,
29922,
8516,
29892,
3579,
19290,
1125,
13,
4706,
6389,
353,
1583,
3032,
657,
29918,
9009,
29918,
5085,
29898,
1068,
19290,
29897,
13,
4706,
934,
29918,
5085,
353,
6213,
13,
4706,
565,
7876,
338,
451,
6213,
29901,
13,
9651,
1018,
29901,
13,
18884,
285,
353,
1722,
29898,
9144,
29892,
525,
6050,
1495,
13,
18884,
934,
29918,
5085,
353,
313,
9144,
29892,
285,
29889,
949,
3101,
13,
9651,
5174,
10663,
2392,
29901,
13,
18884,
565,
1583,
29889,
15003,
29901,
13,
462,
1678,
1583,
29889,
29873,
945,
261,
29898,
29888,
29915,
2283,
426,
9144,
29913,
947,
451,
1863,
1495,
13,
18884,
12020,
13,
4706,
736,
1583,
29889,
6717,
29918,
3827,
877,
9009,
742,
6389,
29892,
934,
29918,
5085,
29897,
13,
13,
1678,
822,
29240,
29918,
8346,
29898,
1311,
29892,
1014,
333,
1125,
13,
4706,
1121,
353,
1583,
29889,
6717,
29918,
3827,
877,
1491,
6737,
29918,
8346,
742,
11117,
1491,
333,
2396,
1014,
333,
1800,
13,
4706,
736,
1121,
29889,
657,
877,
3027,
29918,
4841,
1495,
13,
13,
1678,
396,
822,
27292,
29918,
5317,
29898,
1311,
29892,
2669,
29892,
714,
9144,
29892,
281,
2395,
9144,
29892,
28678,
344,
486,
29922,
29900,
1125,
13,
1678,
396,
268,
281,
2395,
353,
385,
4422,
29889,
29911,
273,
29898,
29893,
2395,
9144,
29892,
28678,
344,
486,
29897,
13,
1678,
396,
268,
8636,
353,
9657,
29898,
7283,
791,
29896,
353,
281,
2395,
29889,
7283,
791,
29961,
29900,
1402,
2181,
791,
29906,
353,
281,
2395,
29889,
7283,
791,
29961,
29896,
1402,
13,
1678,
396,
462,
259,
2181,
29886,
861,
29896,
353,
281,
2395,
29889,
7283,
29886,
861,
29961,
29900,
1402,
2181,
29886,
861,
29906,
353,
281,
2395,
29889,
7283,
29886,
861,
29961,
29896,
1402,
13,
1678,
396,
462,
259,
14965,
29896,
29896,
353,
281,
2395,
29889,
2252,
29961,
29900,
1402,
14965,
29896,
29906,
353,
281,
2395,
29889,
2252,
29961,
29896,
1402,
13,
1678,
396,
462,
259,
14965,
29906,
29896,
353,
281,
2395,
29889,
2252,
29961,
29906,
1402,
14965,
29906,
29906,
353,
281,
2395,
29889,
2252,
29961,
29941,
1402,
13,
1678,
396,
462,
259,
1967,
29893,
353,
281,
2395,
29889,
3027,
29893,
29892,
1967,
29882,
353,
281,
2395,
29889,
3027,
29882,
29897,
13,
1678,
396,
268,
1121,
353,
1583,
29889,
6717,
29918,
3827,
29898,
5509,
29892,
11117,
29893,
2395,
2396,
7529,
1800,
13,
1678,
396,
268,
565,
1583,
29889,
15003,
29901,
13,
1678,
396,
308,
1596,
877,
3591,
4660,
29901,
742,
1121,
1839,
4882,
11287,
13,
1678,
396,
268,
6492,
1272,
353,
1121,
1839,
5317,
2033,
13,
1678,
396,
268,
6492,
1272,
353,
2967,
29953,
29946,
29889,
29890,
29953,
29946,
13808,
29898,
5317,
1272,
29897,
13,
1678,
396,
268,
1722,
29898,
449,
9144,
29892,
525,
29893,
29890,
2824,
3539,
29898,
5317,
1272,
29897,
13,
1678,
396,
268,
565,
1583,
29889,
15003,
29901,
13,
1678,
396,
308,
1596,
877,
29956,
4859,
742,
714,
9144,
29897,
13,
13,
1678,
396,
822,
28972,
893,
29918,
5317,
29898,
1311,
29892,
714,
9144,
29892,
281,
2395,
9144,
29892,
28678,
344,
486,
29922,
29900,
1125,
13,
1678,
396,
268,
736,
1583,
29889,
957,
8387,
29918,
5317,
877,
4928,
893,
29918,
3027,
29918,
1454,
29918,
29893,
2395,
742,
714,
9144,
29892,
13,
1678,
396,
462,
795,
281,
2395,
9144,
29892,
28678,
344,
486,
29897,
13,
13,
1678,
396,
822,
330,
744,
29916,
29918,
5317,
29898,
1311,
29892,
714,
9144,
29892,
281,
2395,
9144,
29892,
28678,
344,
486,
29922,
29900,
1125,
13,
1678,
396,
268,
736,
1583,
29889,
957,
8387,
29918,
5317,
877,
29887,
744,
29916,
29918,
3027,
29918,
1454,
29918,
29893,
2395,
742,
714,
9144,
29892,
13,
1678,
396,
462,
795,
281,
2395,
9144,
29892,
28678,
344,
486,
29897,
13,
13,
1678,
822,
590,
9057,
29879,
29898,
1311,
1125,
13,
4706,
1121,
353,
1583,
29889,
6717,
29918,
3827,
877,
1357,
9057,
29879,
29914,
1495,
13,
4706,
736,
1121,
1839,
9057,
29879,
2033,
13,
13,
1678,
822,
4982,
29918,
4882,
29898,
1311,
29892,
4982,
29918,
333,
29892,
925,
8977,
29922,
8824,
1125,
13,
4706,
1121,
353,
1583,
29889,
6717,
29918,
3827,
877,
9057,
29879,
22584,
29879,
29915,
1273,
4982,
29918,
333,
29897,
13,
4706,
565,
925,
8977,
29901,
13,
9651,
736,
1121,
13,
4706,
1002,
353,
1121,
29889,
657,
877,
4882,
1495,
13,
4706,
565,
1002,
1275,
525,
8698,
2396,
13,
9651,
396,
1121,
353,
1583,
29889,
6717,
29918,
3827,
877,
9057,
29879,
22584,
29879,
29914,
1052,
26218,
29915,
1273,
4982,
29918,
333,
29897,
13,
9651,
396,
1596,
877,
7856,
26218,
29901,
742,
1121,
29897,
13,
9651,
396,
1121,
353,
1583,
29889,
6717,
29918,
3827,
877,
9057,
29879,
22584,
29879,
29914,
11338,
29915,
1273,
4982,
29918,
333,
29897,
13,
9651,
396,
1596,
877,
28089,
29901,
742,
1121,
29897,
13,
9651,
396,
1121,
353,
1583,
29889,
6717,
29918,
3827,
877,
9057,
29879,
22584,
29879,
29914,
23523,
29918,
11338,
29915,
1273,
4982,
29918,
333,
29897,
13,
9651,
396,
1596,
877,
29076,
917,
29901,
742,
1121,
29897,
13,
9651,
396,
1121,
353,
1583,
29889,
6717,
29918,
3827,
877,
9057,
29879,
22584,
29879,
29914,
12650,
29918,
262,
29918,
2671,
29915,
1273,
4982,
29918,
333,
29897,
13,
9651,
396,
1596,
877,
12724,
297,
1746,
29901,
742,
1121,
29897,
13,
9651,
396,
1121,
353,
1583,
29889,
6717,
29918,
3827,
877,
9057,
29879,
22584,
29879,
29914,
6735,
800,
29915,
1273,
4982,
29918,
333,
29897,
13,
9651,
396,
1596,
877,
2744,
1333,
800,
29901,
742,
1121,
29897,
13,
9651,
1121,
353,
1583,
29889,
6717,
29918,
3827,
877,
9057,
29879,
22584,
29879,
29914,
3888,
29915,
1273,
4982,
29918,
333,
29897,
13,
9651,
1583,
29889,
29873,
945,
261,
29898,
29888,
29915,
7856,
26218,
29901,
426,
2914,
29913,
1495,
13,
13,
4706,
736,
1002,
13,
13,
1678,
822,
9732,
403,
29918,
1272,
29898,
1311,
29892,
4982,
29918,
333,
1125,
13,
4706,
9995,
13,
4706,
584,
3207,
4982,
29918,
333,
29901,
1178,
310,
4982,
13,
4706,
584,
2457,
29901,
736,
848,
363,
25495,
13,
4706,
9995,
13,
4706,
1121,
353,
1583,
29889,
6717,
29918,
3827,
877,
9057,
29879,
22584,
29879,
29914,
6735,
800,
29915,
1273,
4982,
29918,
333,
29897,
13,
4706,
736,
1121,
13,
13,
1678,
822,
1014,
29918,
4882,
29898,
1311,
29892,
1014,
29918,
333,
29892,
925,
8977,
29922,
8824,
1125,
13,
4706,
1121,
353,
1583,
29889,
6717,
29918,
3827,
877,
1491,
29885,
6847,
22584,
29879,
29915,
1273,
1014,
29918,
333,
29897,
13,
4706,
565,
925,
8977,
29901,
13,
9651,
736,
1121,
13,
4706,
736,
1121,
29889,
657,
877,
4882,
1495,
13,
13,
1678,
822,
17643,
29918,
1609,
29918,
4039,
29898,
1311,
29892,
4055,
29892,
2684,
1125,
13,
4706,
2684,
29918,
3385,
353,
525,
735,
627,
29922,
3582,
29915,
565,
2684,
1683,
6629,
13,
4706,
1121,
353,
1583,
29889,
6717,
29918,
3827,
29898,
13,
9651,
525,
9057,
29879,
29918,
1609,
29918,
4039,
29973,
1972,
16328,
29879,
29987,
29995,
29879,
29915,
1273,
313,
1396,
29898,
4039,
29889,
17010,
25739,
2684,
29918,
3385,
511,
13,
9651,
24335,
13,
4706,
1723,
13,
4706,
736,
1121,
13,
2
] |
app/admin.py | beedev-services/dragonsEdgeCreations | 0 | 175218 | from django.contrib import admin
from .models import *
admin.site.register(User)
admin.site.register(Profile)
admin.site.register(Customer)
admin.site.register(Account)
admin.site.register(Event)
admin.site.register(Format)
admin.site.register(Language)
admin.site.register(Product)
admin.site.register(Picture)
| [
1,
515,
9557,
29889,
21570,
1053,
4113,
13,
3166,
869,
9794,
1053,
334,
13,
13,
6406,
29889,
2746,
29889,
9573,
29898,
2659,
29897,
13,
6406,
29889,
2746,
29889,
9573,
29898,
13909,
29897,
13,
6406,
29889,
2746,
29889,
9573,
29898,
15122,
29897,
13,
6406,
29889,
2746,
29889,
9573,
29898,
10601,
29897,
13,
6406,
29889,
2746,
29889,
9573,
29898,
2624,
29897,
13,
6406,
29889,
2746,
29889,
9573,
29898,
5809,
29897,
13,
6406,
29889,
2746,
29889,
9573,
29898,
21233,
29897,
13,
6406,
29889,
2746,
29889,
9573,
29898,
7566,
29897,
13,
6406,
29889,
2746,
29889,
9573,
29898,
28210,
29897,
13,
2
] |
io.py | PRASAD-DANGARE/PYTHON | 1 | 130951 | '''
Description : Use Of Basic Input / Output
Function Date : 07 Feb 2021
Function Author : <NAME>
Input : Str
Output : --
'''
print("Enter One Number") # to display on screen
no = input() # to accept the standard input device ie keyword
print ("Your Number Is : ", no)
print ("Data Type Of Give Number Is : ", type(no))
| [
1,
14550,
30004,
13,
9868,
418,
584,
29871,
4803,
4587,
19219,
10567,
847,
10604,
29871,
6756,
13,
6678,
4712,
1678,
584,
259,
29900,
29955,
26319,
29871,
29906,
29900,
29906,
29896,
30004,
13,
6678,
13361,
29871,
584,
29871,
529,
5813,
3238,
13,
4290,
9651,
584,
29871,
3767,
30004,
13,
6466,
965,
584,
29871,
1192,
30004,
13,
12008,
30004,
13,
30004,
13,
2158,
703,
10399,
3118,
9681,
1159,
396,
304,
2479,
373,
4315,
30004,
13,
1217,
353,
1881,
580,
396,
304,
3544,
278,
3918,
1881,
4742,
19282,
13553,
30004,
13,
30004,
13,
2158,
4852,
10858,
9681,
1317,
584,
9162,
694,
8443,
13,
2158,
4852,
1469,
5167,
4587,
25538,
9681,
1317,
584,
9162,
1134,
29898,
1217,
876,
30004,
13,
2
] |
tests/unit/commands/local/start_lambda/test_cli.py | ourobouros/aws-sam-cli | 2 | 2633 | <reponame>ourobouros/aws-sam-cli
from unittest import TestCase
from mock import patch, Mock
from samcli.commands.local.start_lambda.cli import do_cli as start_lambda_cli
from samcli.commands.local.cli_common.user_exceptions import UserException
from samcli.commands.validate.lib.exceptions import InvalidSamDocumentException
from samcli.commands.local.lib.exceptions import OverridesNotWellDefinedError
class TestCli(TestCase):
def setUp(self):
self.template = "template"
self.env_vars = "env-vars"
self.debug_port = 123
self.debug_args = "args"
self.debugger_path = "/test/path"
self.docker_volume_basedir = "basedir"
self.docker_network = "network"
self.log_file = "logfile"
self.skip_pull_image = True
self.profile = "profile"
self.region = "region"
self.parameter_overrides = {}
self.host = "host"
self.port = 123
@patch("samcli.commands.local.start_lambda.cli.InvokeContext")
@patch("samcli.commands.local.start_lambda.cli.LocalLambdaService")
def test_cli_must_setup_context_and_start_service(self, local_lambda_service_mock,
invoke_context_mock):
# Mock the __enter__ method to return a object inside a context manager
context_mock = Mock()
invoke_context_mock.return_value.__enter__.return_value = context_mock
service_mock = Mock()
local_lambda_service_mock.return_value = service_mock
self.call_cli()
invoke_context_mock.assert_called_with(template_file=self.template,
function_identifier=None,
env_vars_file=self.env_vars,
docker_volume_basedir=self.docker_volume_basedir,
docker_network=self.docker_network,
log_file=self.log_file,
skip_pull_image=self.skip_pull_image,
aws_profile=self.profile,
debug_port=self.debug_port,
debug_args=self.debug_args,
debugger_path=self.debugger_path,
aws_region=self.region,
parameter_overrides=self.parameter_overrides)
local_lambda_service_mock.assert_called_with(lambda_invoke_context=context_mock,
port=self.port,
host=self.host)
service_mock.start.assert_called_with()
@patch("samcli.commands.local.start_lambda.cli.InvokeContext")
def test_must_raise_user_exception_on_invalid_sam_template(self, invoke_context_mock):
invoke_context_mock.side_effect = InvalidSamDocumentException("bad template")
with self.assertRaises(UserException) as context:
self.call_cli()
msg = str(context.exception)
expected = "bad template"
self.assertEquals(msg, expected)
@patch("samcli.commands.local.start_lambda.cli.InvokeContext")
def test_must_raise_user_exception_on_invalid_env_vars(self, invoke_context_mock):
invoke_context_mock.side_effect = OverridesNotWellDefinedError("bad env vars")
with self.assertRaises(UserException) as context:
self.call_cli()
msg = str(context.exception)
expected = "bad env vars"
self.assertEquals(msg, expected)
def call_cli(self):
start_lambda_cli(ctx=None,
host=self.host,
port=self.port,
template=self.template,
env_vars=self.env_vars,
debug_port=self.debug_port,
debug_args=self.debug_args,
debugger_path=self.debugger_path,
docker_volume_basedir=self.docker_volume_basedir,
docker_network=self.docker_network,
log_file=self.log_file,
skip_pull_image=self.skip_pull_image,
profile=self.profile,
region=self.region,
parameter_overrides=self.parameter_overrides)
| [
1,
529,
276,
1112,
420,
29958,
283,
13716,
283,
1883,
29914,
10467,
29899,
13445,
29899,
11303,
13,
3166,
443,
27958,
1053,
4321,
8259,
13,
3166,
11187,
1053,
13261,
29892,
26297,
13,
13,
3166,
3514,
11303,
29889,
26381,
29889,
2997,
29889,
2962,
29918,
2892,
29889,
11303,
1053,
437,
29918,
11303,
408,
1369,
29918,
2892,
29918,
11303,
13,
3166,
3514,
11303,
29889,
26381,
29889,
2997,
29889,
11303,
29918,
9435,
29889,
1792,
29918,
11739,
29879,
1053,
4911,
2451,
13,
3166,
3514,
11303,
29889,
26381,
29889,
15480,
29889,
1982,
29889,
11739,
29879,
1053,
21403,
22966,
6268,
2451,
13,
3166,
3514,
11303,
29889,
26381,
29889,
2997,
29889,
1982,
29889,
11739,
29879,
1053,
6811,
24040,
3664,
11284,
3206,
1312,
2392,
13,
13,
13,
1990,
4321,
29907,
492,
29898,
3057,
8259,
1125,
13,
13,
1678,
822,
731,
3373,
29898,
1311,
1125,
13,
4706,
1583,
29889,
6886,
353,
376,
6886,
29908,
13,
4706,
1583,
29889,
6272,
29918,
16908,
353,
376,
6272,
29899,
16908,
29908,
13,
4706,
1583,
29889,
8382,
29918,
637,
353,
29871,
29896,
29906,
29941,
13,
4706,
1583,
29889,
8382,
29918,
5085,
353,
376,
5085,
29908,
13,
4706,
1583,
29889,
8382,
914,
29918,
2084,
353,
5591,
1688,
29914,
2084,
29908,
13,
4706,
1583,
29889,
14695,
29918,
24623,
29918,
6707,
381,
353,
376,
6707,
381,
29908,
13,
4706,
1583,
29889,
14695,
29918,
11618,
353,
376,
11618,
29908,
13,
4706,
1583,
29889,
1188,
29918,
1445,
353,
376,
1188,
1445,
29908,
13,
4706,
1583,
29889,
11014,
29918,
26746,
29918,
3027,
353,
5852,
13,
4706,
1583,
29889,
10185,
353,
376,
10185,
29908,
13,
4706,
1583,
29889,
12803,
353,
376,
12803,
29908,
13,
4706,
1583,
29889,
15501,
29918,
957,
24040,
353,
6571,
13,
13,
4706,
1583,
29889,
3069,
353,
376,
3069,
29908,
13,
4706,
1583,
29889,
637,
353,
29871,
29896,
29906,
29941,
13,
13,
1678,
732,
5041,
703,
13445,
11303,
29889,
26381,
29889,
2997,
29889,
2962,
29918,
2892,
29889,
11303,
29889,
20731,
2677,
1159,
13,
1678,
732,
5041,
703,
13445,
11303,
29889,
26381,
29889,
2997,
29889,
2962,
29918,
2892,
29889,
11303,
29889,
7717,
9099,
3170,
1159,
13,
1678,
822,
1243,
29918,
11303,
29918,
21969,
29918,
14669,
29918,
4703,
29918,
392,
29918,
2962,
29918,
5509,
29898,
1311,
29892,
1887,
29918,
2892,
29918,
5509,
29918,
17640,
29892,
13,
462,
462,
462,
418,
15928,
29918,
4703,
29918,
17640,
1125,
13,
4706,
396,
26297,
278,
4770,
5893,
1649,
1158,
304,
736,
263,
1203,
2768,
263,
3030,
8455,
13,
4706,
3030,
29918,
17640,
353,
26297,
580,
13,
4706,
15928,
29918,
4703,
29918,
17640,
29889,
2457,
29918,
1767,
17255,
5893,
26914,
2457,
29918,
1767,
353,
3030,
29918,
17640,
13,
13,
4706,
2669,
29918,
17640,
353,
26297,
580,
13,
4706,
1887,
29918,
2892,
29918,
5509,
29918,
17640,
29889,
2457,
29918,
1767,
353,
2669,
29918,
17640,
13,
13,
4706,
1583,
29889,
4804,
29918,
11303,
580,
13,
13,
4706,
15928,
29918,
4703,
29918,
17640,
29889,
9294,
29918,
13998,
29918,
2541,
29898,
6886,
29918,
1445,
29922,
1311,
29889,
6886,
29892,
13,
462,
462,
1669,
740,
29918,
25378,
29922,
8516,
29892,
13,
462,
462,
1669,
8829,
29918,
16908,
29918,
1445,
29922,
1311,
29889,
6272,
29918,
16908,
29892,
13,
462,
462,
1669,
10346,
29918,
24623,
29918,
6707,
381,
29922,
1311,
29889,
14695,
29918,
24623,
29918,
6707,
381,
29892,
13,
462,
462,
1669,
10346,
29918,
11618,
29922,
1311,
29889,
14695,
29918,
11618,
29892,
13,
462,
462,
1669,
1480,
29918,
1445,
29922,
1311,
29889,
1188,
29918,
1445,
29892,
13,
462,
462,
1669,
14383,
29918,
26746,
29918,
3027,
29922,
1311,
29889,
11014,
29918,
26746,
29918,
3027,
29892,
13,
462,
462,
1669,
25879,
29918,
10185,
29922,
1311,
29889,
10185,
29892,
13,
462,
462,
1669,
4744,
29918,
637,
29922,
1311,
29889,
8382,
29918,
637,
29892,
13,
462,
462,
1669,
4744,
29918,
5085,
29922,
1311,
29889,
8382,
29918,
5085,
29892,
13,
462,
462,
1669,
18297,
29918,
2084,
29922,
1311,
29889,
8382,
914,
29918,
2084,
29892,
13,
462,
462,
1669,
25879,
29918,
12803,
29922,
1311,
29889,
12803,
29892,
13,
462,
462,
1669,
3443,
29918,
957,
24040,
29922,
1311,
29889,
15501,
29918,
957,
24040,
29897,
13,
13,
4706,
1887,
29918,
2892,
29918,
5509,
29918,
17640,
29889,
9294,
29918,
13998,
29918,
2541,
29898,
2892,
29918,
9772,
29918,
4703,
29922,
4703,
29918,
17640,
29892,
13,
462,
462,
462,
268,
2011,
29922,
1311,
29889,
637,
29892,
13,
462,
462,
462,
268,
3495,
29922,
1311,
29889,
3069,
29897,
13,
13,
4706,
2669,
29918,
17640,
29889,
2962,
29889,
9294,
29918,
13998,
29918,
2541,
580,
13,
13,
1678,
732,
5041,
703,
13445,
11303,
29889,
26381,
29889,
2997,
29889,
2962,
29918,
2892,
29889,
11303,
29889,
20731,
2677,
1159,
13,
1678,
822,
1243,
29918,
21969,
29918,
22692,
29918,
1792,
29918,
11739,
29918,
265,
29918,
20965,
29918,
13445,
29918,
6886,
29898,
1311,
29892,
15928,
29918,
4703,
29918,
17640,
1125,
13,
4706,
15928,
29918,
4703,
29918,
17640,
29889,
2975,
29918,
15987,
353,
21403,
22966,
6268,
2451,
703,
12313,
4472,
1159,
13,
13,
4706,
411,
1583,
29889,
9294,
29934,
1759,
267,
29898,
2659,
2451,
29897,
408,
3030,
29901,
13,
9651,
1583,
29889,
4804,
29918,
11303,
580,
13,
13,
4706,
10191,
353,
851,
29898,
4703,
29889,
11739,
29897,
13,
4706,
3806,
353,
376,
12313,
4472,
29908,
13,
4706,
1583,
29889,
9294,
14776,
29898,
7645,
29892,
3806,
29897,
13,
13,
1678,
732,
5041,
703,
13445,
11303,
29889,
26381,
29889,
2997,
29889,
2962,
29918,
2892,
29889,
11303,
29889,
20731,
2677,
1159,
13,
1678,
822,
1243,
29918,
21969,
29918,
22692,
29918,
1792,
29918,
11739,
29918,
265,
29918,
20965,
29918,
6272,
29918,
16908,
29898,
1311,
29892,
15928,
29918,
4703,
29918,
17640,
1125,
13,
4706,
15928,
29918,
4703,
29918,
17640,
29889,
2975,
29918,
15987,
353,
6811,
24040,
3664,
11284,
3206,
1312,
2392,
703,
12313,
8829,
24987,
1159,
13,
13,
4706,
411,
1583,
29889,
9294,
29934,
1759,
267,
29898,
2659,
2451,
29897,
408,
3030,
29901,
13,
9651,
1583,
29889,
4804,
29918,
11303,
580,
13,
13,
4706,
10191,
353,
851,
29898,
4703,
29889,
11739,
29897,
13,
4706,
3806,
353,
376,
12313,
8829,
24987,
29908,
13,
4706,
1583,
29889,
9294,
14776,
29898,
7645,
29892,
3806,
29897,
13,
13,
1678,
822,
1246,
29918,
11303,
29898,
1311,
1125,
13,
4706,
1369,
29918,
2892,
29918,
11303,
29898,
13073,
29922,
8516,
29892,
13,
462,
308,
3495,
29922,
1311,
29889,
3069,
29892,
13,
462,
308,
2011,
29922,
1311,
29889,
637,
29892,
13,
462,
308,
4472,
29922,
1311,
29889,
6886,
29892,
13,
462,
308,
8829,
29918,
16908,
29922,
1311,
29889,
6272,
29918,
16908,
29892,
13,
462,
308,
4744,
29918,
637,
29922,
1311,
29889,
8382,
29918,
637,
29892,
13,
462,
308,
4744,
29918,
5085,
29922,
1311,
29889,
8382,
29918,
5085,
29892,
13,
462,
308,
18297,
29918,
2084,
29922,
1311,
29889,
8382,
914,
29918,
2084,
29892,
13,
462,
308,
10346,
29918,
24623,
29918,
6707,
381,
29922,
1311,
29889,
14695,
29918,
24623,
29918,
6707,
381,
29892,
13,
462,
308,
10346,
29918,
11618,
29922,
1311,
29889,
14695,
29918,
11618,
29892,
13,
462,
308,
1480,
29918,
1445,
29922,
1311,
29889,
1188,
29918,
1445,
29892,
13,
462,
308,
14383,
29918,
26746,
29918,
3027,
29922,
1311,
29889,
11014,
29918,
26746,
29918,
3027,
29892,
13,
462,
308,
8722,
29922,
1311,
29889,
10185,
29892,
13,
462,
308,
5120,
29922,
1311,
29889,
12803,
29892,
13,
462,
308,
3443,
29918,
957,
24040,
29922,
1311,
29889,
15501,
29918,
957,
24040,
29897,
13,
2
] |
autogluon/scheduler/fifo.py | brc7/autogluon | 1 | 194448 | import json
import logging
import multiprocessing as mp
import os
import pickle
import threading
import time
from collections import OrderedDict
import numpy as np
import copy
from tqdm.auto import tqdm
from .reporter import DistStatusReporter, FakeReporter
from .resource import DistributedResource
from .scheduler import TaskScheduler
from ..core import Task
from ..core.decorator import _autogluon_method
from ..searcher import BaseSearcher
from ..searcher.searcher_factory import searcher_factory
from ..utils import save, load, mkdir, try_import_mxboard
from ..utils.default_arguments import check_and_merge_defaults, \
Float, Integer, String, Boolean, assert_no_invalid_options
__all__ = ['FIFOScheduler']
logger = logging.getLogger(__name__)
_ARGUMENT_KEYS = {
'args', 'resource', 'searcher', 'search_options', 'checkpoint', 'resume',
'num_trials', 'time_out', 'max_reward', 'reward_attr', 'time_attr',
'dist_ip_addrs', 'visualizer', 'training_history_callback',
'training_history_callback_delta_secs', 'delay_get_config'}
_DEFAULT_OPTIONS = {
'resource': {'num_cpus': 1, 'num_gpus': 0},
'searcher': 'random',
'resume': False,
'reward_attr': 'accuracy',
'time_attr': 'epoch',
'visualizer': 'none',
'training_history_callback_delta_secs': 60,
'delay_get_config': True}
_CONSTRAINTS = {
'checkpoint': String(),
'resume': Boolean(),
'num_trials': Integer(1, None),
'time_out': Float(0.0, None),
'max_reward': Float(),
'reward_attr': String(),
'time_attr': String(),
'visualizer': String(),
'training_history_callback_delta_secs': Integer(1, None),
'delay_get_config': Boolean()}
class FIFOScheduler(TaskScheduler):
r"""Simple scheduler that just runs trials in submission order.
Parameters
----------
train_fn : callable
A task launch function for training.
args : object (optional)
Default arguments for launching train_fn.
resource : dict
Computation resources. For example, `{'num_cpus':2, 'num_gpus':1}`
searcher : str or BaseSearcher
Searcher (get_config decisions). If str, this is passed to
searcher_factory along with search_options.
search_options : dict
If searcher is str, these arguments are passed to searcher_factory.
checkpoint : str
If filename given here, a checkpoint of scheduler (and searcher) state
is written to file every time a job finishes.
Note: May not be fully supported by all searchers.
resume : bool
If True, scheduler state is loaded from checkpoint, and experiment
starts from there.
Note: May not be fully supported by all searchers.
num_trials : int
Maximum number of jobs run in experiment. One of `num_trials`,
`time_out` must be given.
time_out : float
If given, jobs are started only until this time_out (wall clock time).
One of `num_trials`, `time_out` must be given.
reward_attr : str
Name of reward (i.e., metric to maximize) attribute in data obtained
from reporter
time_attr : str
Name of resource (or time) attribute in data obtained from reporter.
This attribute is optional for FIFO scheduling, but becomes mandatory
in multi-fidelity scheduling (e.g., Hyperband).
Note: The type of resource must be int.
dist_ip_addrs : list of str
IP addresses of remote machines.
training_history_callback : callable
Callback function func called every time a job finishes, if at least
training_history_callback_delta_secs seconds passed since the last
recent call. The call has the form:
func(self.training_history, self._start_time)
Here, self._start_time is time stamp for when experiment started.
Use this callback to serialize self.training_history after regular
intervals.
training_history_callback_delta_secs : float
See training_history_callback.
delay_get_config : bool
If True, the call to searcher.get_config is delayed until a worker
resource for evaluation is available. Otherwise, get_config is called
just after a job has been started.
For searchers which adapt to past data, True should be preferred.
Otherwise, it does not matter.
Examples
--------
>>> import numpy as np
>>> import autogluon as ag
>>> @ag.args(
... lr=ag.space.Real(1e-3, 1e-2, log=True),
... wd=ag.space.Real(1e-3, 1e-2))
>>> def train_fn(args, reporter):
... print('lr: {}, wd: {}'.format(args.lr, args.wd))
... for e in range(10):
... dummy_accuracy = 1 - np.power(1.8, -np.random.uniform(e, 2*e))
... reporter(epoch=e+1, accuracy=dummy_accuracy, lr=args.lr, wd=args.wd)
>>> scheduler = ag.scheduler.FIFOScheduler(train_fn,
... resource={'num_cpus': 2, 'num_gpus': 0},
... num_trials=20,
... reward_attr='accuracy',
... time_attr='epoch')
>>> scheduler.run()
>>> scheduler.join_jobs()
>>> scheduler.get_training_curves(plot=True)
"""
def __init__(self, train_fn, **kwargs):
super().__init__(kwargs.get('dist_ip_addrs'))
# Check values and impute default values
assert_no_invalid_options(
kwargs, _ARGUMENT_KEYS, name='FIFOScheduler')
kwargs = check_and_merge_defaults(
kwargs, set(), _DEFAULT_OPTIONS, _CONSTRAINTS,
dict_name='scheduler_options')
self.resource = kwargs['resource']
searcher = kwargs['searcher']
search_options = kwargs.get('search_options')
if isinstance(searcher, str):
if search_options is None:
search_options = dict()
_search_options = search_options.copy()
_search_options['configspace'] = train_fn.cs
_search_options['reward_attribute'] = kwargs['reward_attr']
_search_options['resource_attribute'] = kwargs['time_attr']
# Adjoin scheduler info to search_options, if not already done by
# subclass
if 'scheduler' not in _search_options:
_search_options['scheduler'] = 'fifo'
self.searcher: BaseSearcher = searcher_factory(
searcher, **_search_options)
else:
assert isinstance(searcher, BaseSearcher)
self.searcher: BaseSearcher = searcher
assert isinstance(train_fn, _autogluon_method)
self.train_fn = train_fn
args = kwargs.get('args')
self.args = args if args else train_fn.args
num_trials = kwargs.get('num_trials')
time_out = kwargs.get('time_out')
if num_trials is None:
assert time_out is not None, \
"Need stopping criterion: Either num_trials or time_out"
self.num_trials = num_trials
self.time_out = time_out
self.max_reward = kwargs.get('max_reward')
# meta data
self.metadata = {
'search_space': train_fn.kwspaces,
'search_strategy': searcher,
'stop_criterion': {
'time_limits': time_out,
'max_reward': self.max_reward},
'resources_per_trial': self.resource}
checkpoint = kwargs.get('checkpoint')
self._checkpoint = checkpoint
self._reward_attr = kwargs['reward_attr']
self._time_attr = kwargs['time_attr']
self.visualizer = kwargs['visualizer'].lower()
if self.visualizer == 'tensorboard' or self.visualizer == 'mxboard':
assert checkpoint is not None, "Need checkpoint to be set"
try_import_mxboard()
from mxboard import SummaryWriter
self.mxboard = SummaryWriter(
logdir=os.path.join(os.path.splitext(checkpoint)[0], 'logs'),
flush_secs=3,
verbose=False
)
self._fifo_lock = mp.Lock()
# training_history maintains the complete history of the experiment,
# in terms of all results obtained from the reporter. Keys are
# str(task.task_id)
self.training_history = OrderedDict()
self.config_history = OrderedDict()
# Needed for training_history callback mechanism, which is used to
# serialize training_history after each
# training_history_call_delta_secs seconds
self._start_time = None
self._training_history_callback_last_block = None
self._training_history_callback_last_len = None
self.training_history_callback = kwargs.get('training_history_callback')
self.training_history_callback_delta_secs = \
kwargs['training_history_callback_delta_secs']
self._delay_get_config = kwargs['delay_get_config']
# Resume experiment from checkpoint?
if kwargs['resume']:
assert checkpoint is not None, \
"Need checkpoint to be set if resume = True"
if os.path.isfile(checkpoint):
self.load_state_dict(load(checkpoint))
else:
msg = f'checkpoint path {checkpoint} is not available for resume.'
logger.exception(msg)
raise FileExistsError(msg)
def run(self, **kwargs):
"""Run multiple number of trials
"""
# Make sure that this scheduler is configured at the searcher
self.searcher.configure_scheduler(self)
start_time = time.time()
self._start_time = start_time
num_trials = kwargs.get('num_trials', self.num_trials)
time_out = kwargs.get('time_out', self.time_out)
# For training_history callback mechanism:
self._training_history_callback_last_block = -1
self._training_history_callback_last_len = len(self.training_history)
logger.info('Starting Experiments')
logger.info(f'Num of Finished Tasks is {self.num_finished_tasks}')
if num_trials is not None:
logger.info(f'Num of Pending Tasks is {num_trials - self.num_finished_tasks}')
tbar = tqdm(range(self.num_finished_tasks, num_trials))
else:
# In this case, only stopping by time_out is used. We do not display
# a progress bar then
tbar = range(self.num_finished_tasks, 100000)
if time_out is not None:
logger.info(f'Time out (secs) is {time_out}')
for _ in tbar:
if (time_out and time.time() - start_time >= time_out) or \
(self.max_reward and self.get_best_reward() >= self.max_reward):
break
self.schedule_next()
def save(self, checkpoint=None):
"""Save Checkpoint
"""
if checkpoint is None:
checkpoint = self._checkpoint
if checkpoint is not None:
mkdir(os.path.dirname(checkpoint))
save(self.state_dict(), checkpoint)
def _create_new_task(self, config, resources=None):
if resources is None:
resources = DistributedResource(**self.resource)
return Task(
self.train_fn, {'args': self.args, 'config': config},
resources=resources)
def schedule_next(self):
"""Schedule next searcher suggested task
"""
resources = DistributedResource(**self.resource)
if self._delay_get_config:
# Wait for available resource here, instead of in add_job. This
# delays the get_config call until a resource is available
FIFOScheduler.resource_manager._request(resources)
# Allow for the promotion of a previously chosen config. Also,
# extra_kwargs contains extra info passed to both add_job and to
# get_config (if no config is promoted)
config, extra_kwargs = self._promote_config()
# Time stamp to be used in get_config, and maybe in add_job
extra_kwargs['elapsed_time'] = self._elapsed_time()
if config is None:
# No config to promote: Query next config to evaluate from searcher
config = self.searcher.get_config(**extra_kwargs)
extra_kwargs['new_config'] = True
else:
# This is not a new config, but a paused one which is now promoted
extra_kwargs['new_config'] = False
task = self._create_new_task(config, resources=resources)
self.add_job(task, **extra_kwargs)
def run_with_config(self, config):
"""Run with config for final fit.
It launches a single training trial under any fixed values of the hyperparameters.
For example, after HPO has identified the best hyperparameter values based on a hold-out dataset,
one can use this function to retrain a model with the same hyperparameters on all the available labeled data
(including the hold out set). It can also returns other objects or states.
"""
task = self._create_new_task(config)
reporter = FakeReporter()
task.args['reporter'] = reporter
return self.run_job(task)
def _dict_from_task(self, task):
if isinstance(task, Task):
return {'TASK_ID': task.task_id, 'Config': task.args['config']}
else:
assert isinstance(task, dict)
return {'TASK_ID': task['TASK_ID'], 'Config': task['Config']}
def add_job(self, task, **kwargs):
"""Adding a training task to the scheduler.
Args:
task (:class:`autogluon.scheduler.Task`): a new training task
Relevant entries in kwargs:
- bracket: HB bracket to be used. Has been sampled in _promote_config
- new_config: If True, task starts new config eval, otherwise it promotes
a config (only if type == 'promotion')
Only if new_config == False:
- config_key: Internal key for config
- resume_from: config promoted from this milestone
- milestone: config promoted to this milestone (next from resume_from)
"""
cls = FIFOScheduler
if not self._delay_get_config:
# Wait for resource to become available here, as this has not happened
# in schedule_next before
cls.resource_manager._request(task.resources)
# reporter
reporter = DistStatusReporter(remote=task.resources.node)
task.args['reporter'] = reporter
# Register pending evaluation
self.searcher.register_pending(task.args['config'])
# main process
job = cls._start_distributed_job(task, cls.resource_manager)
# reporter thread
rp = threading.Thread(
target=self._run_reporter,
args=(task, job, reporter),
daemon=False)
rp.start()
task_dict = self._dict_from_task(task)
task_dict.update({'Task': task, 'Job': job, 'ReporterThread': rp})
# Checkpoint thread. This is also used for training_history
# callback
if self._checkpoint is not None or \
self.training_history_callback is not None:
self._add_checkpointing_to_job(job)
with self.LOCK:
self.scheduled_tasks.append(task_dict)
def _clean_task_internal(self, task_dict):
task_dict['ReporterThread'].join()
def _add_checkpointing_to_job(self, job):
def _save_checkpoint_callback(fut):
self._cleaning_tasks()
self.save()
# training_history callback
with self._fifo_lock:
if self._trigger_training_history_callback():
logger.debug("Execute training_history callback")
self.training_history_callback(
self.training_history, self._start_time)
job.add_done_callback(_save_checkpoint_callback)
def _trigger_training_history_callback(self):
if self.training_history_callback is None:
return False
assert self._training_history_callback_last_block is not None
current_block = int(np.floor(
self._elapsed_time() / self.training_history_callback_delta_secs))
current_len = len(self.training_history)
ret_val = (current_block >
self._training_history_callback_last_block) and \
current_len > self._training_history_callback_last_len
if ret_val:
self._training_history_callback_last_block = current_block
self._training_history_callback_last_len = current_len
return ret_val
def _run_reporter(self, task, task_job, reporter):
last_result = None
while not task_job.done():
reported_result = reporter.fetch()
if 'traceback' in reported_result:
# Evaluation has failed
logger.exception(reported_result['traceback'])
self.searcher.evaluation_failed(
config=task.args['config'], **reported_result)
reporter.move_on()
break
if reported_result.get('done', False):
reporter.move_on()
break
if len(reported_result) == 0:
# An empty dict should just be skipped
logger.warning("Skipping empty dict received from reporter")
continue
# Time since start of experiment
elapsed_time = self._elapsed_time()
reported_result['time_since_start'] = elapsed_time
# Extra information from searcher (optional)
dataset_size = self.searcher.dataset_size()
if dataset_size > 0:
reported_result['searcher_data_size'] = dataset_size
for k, v in self.searcher.cumulative_profile_record().items():
reported_result['searcher_profile_' + k] = v
for k, v in self.searcher.model_parameters().items():
reported_result['searcher_params_' + k] = v
self._add_training_result(
task.task_id, reported_result, config=task.args['config'])
reporter.move_on()
last_result = reported_result
# Pass all of last_result to searcher
if last_result is not None:
self.searcher.update(config=task.args['config'], **last_result)
def _promote_config(self):
"""
Provides a hook in schedule_next, which allows to promote a config
which has been selected and partially evaluated previously.
:return: config, extra_args
"""
config = None
extra_args = dict()
return config, extra_args
def _elapsed_time(self):
"""
:return: Time elapsed since start of experiment (see 'run')
"""
assert self._start_time is not None, \
"Experiment has not been started yet"
return time.time() - self._start_time
def get_best_config(self):
"""Get the best configuration from the finished jobs.
"""
return self.searcher.get_best_config()
def get_best_task_id(self):
"""Get the task id that results in the best configuration/best reward.
If there are duplicated configurations, we return the id of the first one.
"""
best_config = self.get_best_config()
for task_id, config in self.config_history.items():
if pickle.dumps(best_config) == pickle.dumps(config):
return task_id
raise RuntimeError('The best config {} is not found in config history = {}. '
'This should never happen!'.format(best_config, self.config_history))
def get_best_reward(self):
"""Get the best reward from the finished jobs.
"""
return self.searcher.get_best_reward()
def _add_training_result(self, task_id, reported_result, config=None):
if self.visualizer == 'mxboard' or self.visualizer == 'tensorboard':
if 'loss' in reported_result:
self.mxboard.add_scalar(
tag='loss',
value=(
f'task {task_id} valid_loss',
reported_result['loss']
),
global_step=reported_result[self._reward_attr]
)
self.mxboard.add_scalar(
tag=self._reward_attr,
value=(
f'task {task_id} {self._reward_attr}',
reported_result[self._reward_attr]
),
global_step=reported_result[self._reward_attr]
)
with self._fifo_lock:
# Note: We store all of reported_result in training_history[task_id],
# not just the reward value.
task_key = str(task_id)
new_entry = copy.copy(reported_result)
if task_key in self.training_history:
self.training_history[task_key].append(new_entry)
else:
self.training_history[task_key] = [new_entry]
if config:
self.config_history[task_key] = config
def get_training_curves(self, filename=None, plot=False, use_legend=True):
"""Get Training Curves
Parameters
----------
filename : str
plot : bool
use_legend : bool
Examples
--------
>>> scheduler.run()
>>> scheduler.join_jobs()
>>> scheduler.get_training_curves(plot=True)
.. image:: https://github.com/zhanghang1989/AutoGluonWebdata/blob/master/doc/api/autogluon.1.png?raw=true
"""
if filename is None and not plot:
logger.warning('Please either provide filename or allow plot in get_training_curves')
import matplotlib.pyplot as plt
plt.ylabel(self._reward_attr)
plt.xlabel(self._time_attr)
plt.title("Performance vs Training-Time in each HPO Trial")
with self._fifo_lock:
for task_id, task_res in self.training_history.items():
rewards = [x[self._reward_attr] for x in task_res]
x = list(range(len(task_res)))
plt.plot(x, rewards, label=f'task {task_id}')
if use_legend:
plt.legend(loc='best')
if filename:
logger.info(f'Saving Training Curve in {filename}')
plt.savefig(filename)
if plot:
plt.show()
def state_dict(self, destination=None):
"""
Returns a dictionary containing a whole state of the Scheduler. This is
used for checkpointing.
Note that the checkpoint only contains information which has been
registered at scheduler and searcher. It does not contain information
about currently running jobs, except what they reported before the
checkpoint.
Therefore, resuming an experiment from a checkpoint is slightly
different from continuing the experiment past the checkpoint. The
former behaves as if all currently running jobs are terminated at
the checkpoint, and new jobs are scheduled from there, starting from
scheduler and searcher state according to all information recorded
until the checkpoint.
Examples
--------
>>> ag.save(scheduler.state_dict(), 'checkpoint.ag')
"""
destination = super().state_dict(destination)
with self._fifo_lock:
# The result of searcher.get_state can always be pickled
destination['searcher'] = pickle.dumps(self.searcher.get_state())
destination['training_history'] = json.dumps(self.training_history)
destination['config_history'] = json.dumps(self.config_history)
if self.visualizer == 'mxboard' or self.visualizer == 'tensorboard':
destination['visualizer'] = json.dumps(self.mxboard._scalar_dict)
return destination
def load_state_dict(self, state_dict):
"""
Load from the saved state dict. This can be used to resume an
experiment from a checkpoint (see 'state_dict' for caveats).
This method must only be called as part of scheduler construction.
Calling it in the middle of an experiment can lead to an undefined
inner state of scheduler or searcher.
Examples
--------
>>> scheduler.load_state_dict(ag.load('checkpoint.ag'))
"""
super().load_state_dict(state_dict)
with self._fifo_lock:
self.searcher = self.searcher.clone_from_state(
pickle.loads(state_dict['searcher']))
self.training_history = json.loads(state_dict['training_history'])
self.config_history = json.loads(state_dict['config_history'])
if self.visualizer == 'mxboard' or self.visualizer == 'tensorboard':
self.mxboard._scalar_dict = json.loads(state_dict['visualizer'])
logger.debug(f'Loading Searcher State {self.searcher}')
| [
1,
1053,
4390,
13,
5215,
12183,
13,
5215,
6674,
307,
985,
292,
408,
22326,
13,
5215,
2897,
13,
5215,
5839,
280,
13,
5215,
3244,
292,
13,
5215,
931,
13,
3166,
16250,
1053,
8170,
287,
21533,
13,
5215,
12655,
408,
7442,
13,
5215,
3509,
13,
13,
3166,
260,
29939,
18933,
29889,
6921,
1053,
260,
29939,
18933,
13,
13,
3166,
869,
276,
18505,
1053,
6652,
5709,
5612,
9555,
29892,
383,
1296,
5612,
9555,
13,
3166,
869,
10314,
1053,
6652,
7541,
6848,
13,
3166,
869,
816,
14952,
1053,
9330,
4504,
14952,
13,
3166,
6317,
3221,
1053,
9330,
13,
3166,
6317,
3221,
29889,
19557,
1061,
1053,
903,
1300,
468,
6092,
265,
29918,
5696,
13,
3166,
6317,
4478,
261,
1053,
7399,
7974,
261,
13,
3166,
6317,
4478,
261,
29889,
4478,
261,
29918,
14399,
1053,
2740,
261,
29918,
14399,
13,
3166,
6317,
13239,
1053,
4078,
29892,
2254,
29892,
29356,
29892,
1018,
29918,
5215,
29918,
16838,
3377,
13,
3166,
6317,
13239,
29889,
4381,
29918,
25699,
1053,
1423,
29918,
392,
29918,
14634,
29918,
4381,
29879,
29892,
320,
13,
1678,
27842,
29892,
8102,
29892,
1714,
29892,
11185,
29892,
4974,
29918,
1217,
29918,
20965,
29918,
6768,
13,
13,
1649,
497,
1649,
353,
6024,
3738,
29943,
3267,
305,
14952,
2033,
13,
13,
21707,
353,
12183,
29889,
657,
16363,
22168,
978,
1649,
29897,
13,
13,
13,
29918,
1718,
29954,
5005,
3919,
29918,
10818,
29903,
353,
426,
13,
1678,
525,
5085,
742,
525,
10314,
742,
525,
4478,
261,
742,
525,
4478,
29918,
6768,
742,
525,
3198,
3149,
742,
525,
690,
2017,
742,
13,
1678,
525,
1949,
29918,
3626,
1338,
742,
525,
2230,
29918,
449,
742,
525,
3317,
29918,
276,
1328,
742,
525,
276,
1328,
29918,
5552,
742,
525,
2230,
29918,
5552,
742,
13,
1678,
525,
5721,
29918,
666,
29918,
1202,
2288,
742,
525,
20119,
3950,
742,
525,
26495,
29918,
18434,
29918,
14035,
742,
13,
1678,
525,
26495,
29918,
18434,
29918,
14035,
29918,
4181,
29918,
344,
2395,
742,
525,
18829,
29918,
657,
29918,
2917,
10827,
13,
13,
29918,
23397,
29918,
14094,
27946,
353,
426,
13,
1678,
525,
10314,
2396,
11117,
1949,
29918,
6814,
375,
2396,
29871,
29896,
29892,
525,
1949,
29918,
29887,
13364,
2396,
29871,
29900,
1118,
13,
1678,
525,
4478,
261,
2396,
525,
8172,
742,
13,
1678,
525,
690,
2017,
2396,
7700,
29892,
13,
1678,
525,
276,
1328,
29918,
5552,
2396,
525,
562,
2764,
4135,
742,
13,
1678,
525,
2230,
29918,
5552,
2396,
525,
1022,
2878,
742,
13,
1678,
525,
20119,
3950,
2396,
525,
9290,
742,
13,
1678,
525,
26495,
29918,
18434,
29918,
14035,
29918,
4181,
29918,
344,
2395,
2396,
29871,
29953,
29900,
29892,
13,
1678,
525,
18829,
29918,
657,
29918,
2917,
2396,
5852,
29913,
13,
13,
29918,
6007,
1254,
4717,
1177,
9375,
353,
426,
13,
1678,
525,
3198,
3149,
2396,
1714,
3285,
13,
1678,
525,
690,
2017,
2396,
11185,
3285,
13,
1678,
525,
1949,
29918,
3626,
1338,
2396,
8102,
29898,
29896,
29892,
6213,
511,
13,
1678,
525,
2230,
29918,
449,
2396,
27842,
29898,
29900,
29889,
29900,
29892,
6213,
511,
13,
1678,
525,
3317,
29918,
276,
1328,
2396,
27842,
3285,
13,
1678,
525,
276,
1328,
29918,
5552,
2396,
1714,
3285,
13,
1678,
525,
2230,
29918,
5552,
2396,
1714,
3285,
13,
1678,
525,
20119,
3950,
2396,
1714,
3285,
13,
1678,
525,
26495,
29918,
18434,
29918,
14035,
29918,
4181,
29918,
344,
2395,
2396,
8102,
29898,
29896,
29892,
6213,
511,
13,
1678,
525,
18829,
29918,
657,
29918,
2917,
2396,
11185,
28296,
13,
13,
13,
1990,
383,
6545,
3267,
305,
14952,
29898,
5398,
4504,
14952,
1125,
13,
1678,
364,
15945,
29908,
15427,
1364,
14952,
393,
925,
6057,
3367,
1338,
297,
29240,
1797,
29889,
13,
13,
1678,
12662,
2699,
13,
1678,
448,
1378,
29899,
13,
1678,
7945,
29918,
9144,
584,
1246,
519,
13,
4706,
319,
3414,
6826,
740,
363,
6694,
29889,
13,
1678,
6389,
584,
1203,
313,
25253,
29897,
13,
4706,
13109,
6273,
363,
6826,
292,
7945,
29918,
9144,
29889,
13,
1678,
6503,
584,
9657,
13,
4706,
11796,
362,
7788,
29889,
1152,
1342,
29892,
421,
10998,
1949,
29918,
6814,
375,
2396,
29906,
29892,
525,
1949,
29918,
29887,
13364,
2396,
29896,
10114,
13,
1678,
2740,
261,
584,
851,
470,
7399,
7974,
261,
13,
4706,
11856,
261,
313,
657,
29918,
2917,
1602,
12112,
467,
960,
851,
29892,
445,
338,
4502,
304,
13,
4706,
2740,
261,
29918,
14399,
3412,
411,
2740,
29918,
6768,
29889,
13,
1678,
2740,
29918,
6768,
584,
9657,
13,
4706,
960,
2740,
261,
338,
851,
29892,
1438,
6273,
526,
4502,
304,
2740,
261,
29918,
14399,
29889,
13,
1678,
1423,
3149,
584,
851,
13,
4706,
960,
10422,
2183,
1244,
29892,
263,
1423,
3149,
310,
1364,
14952,
313,
392,
2740,
261,
29897,
2106,
13,
4706,
338,
3971,
304,
934,
1432,
931,
263,
4982,
8341,
267,
29889,
13,
4706,
3940,
29901,
2610,
451,
367,
8072,
6969,
491,
599,
2740,
414,
29889,
13,
1678,
620,
2017,
584,
6120,
13,
4706,
960,
5852,
29892,
1364,
14952,
2106,
338,
7500,
515,
1423,
3149,
29892,
322,
7639,
13,
4706,
8665,
515,
727,
29889,
13,
4706,
3940,
29901,
2610,
451,
367,
8072,
6969,
491,
599,
2740,
414,
29889,
13,
1678,
954,
29918,
3626,
1338,
584,
938,
13,
4706,
5918,
12539,
1353,
310,
17643,
1065,
297,
7639,
29889,
3118,
310,
421,
1949,
29918,
3626,
1338,
1673,
13,
4706,
421,
2230,
29918,
449,
29952,
1818,
367,
2183,
29889,
13,
1678,
931,
29918,
449,
584,
5785,
13,
4706,
960,
2183,
29892,
17643,
526,
4687,
871,
2745,
445,
931,
29918,
449,
313,
11358,
12006,
931,
467,
13,
4706,
3118,
310,
421,
1949,
29918,
3626,
1338,
1673,
421,
2230,
29918,
449,
29952,
1818,
367,
2183,
29889,
13,
1678,
20751,
29918,
5552,
584,
851,
13,
4706,
4408,
310,
20751,
313,
29875,
29889,
29872,
1696,
12714,
304,
5256,
675,
29897,
5352,
297,
848,
7625,
13,
4706,
515,
1634,
9555,
13,
1678,
931,
29918,
5552,
584,
851,
13,
4706,
4408,
310,
6503,
313,
272,
931,
29897,
5352,
297,
848,
7625,
515,
1634,
9555,
29889,
13,
4706,
910,
5352,
338,
13136,
363,
9338,
5800,
28598,
19478,
29892,
541,
7415,
9619,
7606,
13,
4706,
297,
2473,
29899,
29888,
10652,
537,
28598,
19478,
313,
29872,
29889,
29887,
1696,
26078,
4980,
467,
13,
4706,
3940,
29901,
450,
1134,
310,
6503,
1818,
367,
938,
29889,
13,
1678,
1320,
29918,
666,
29918,
1202,
2288,
584,
1051,
310,
851,
13,
4706,
5641,
14157,
310,
7592,
14884,
29889,
13,
1678,
6694,
29918,
18434,
29918,
14035,
584,
1246,
519,
13,
4706,
8251,
1627,
740,
3653,
2000,
1432,
931,
263,
4982,
8341,
267,
29892,
565,
472,
3203,
13,
4706,
6694,
29918,
18434,
29918,
14035,
29918,
4181,
29918,
344,
2395,
6923,
4502,
1951,
278,
1833,
13,
4706,
7786,
1246,
29889,
450,
1246,
756,
278,
883,
29901,
13,
9651,
3653,
29898,
1311,
29889,
26495,
29918,
18434,
29892,
1583,
3032,
2962,
29918,
2230,
29897,
13,
4706,
2266,
29892,
1583,
3032,
2962,
29918,
2230,
338,
931,
25214,
363,
746,
7639,
4687,
29889,
13,
4706,
4803,
445,
6939,
304,
28755,
1583,
29889,
26495,
29918,
18434,
1156,
4943,
13,
4706,
18747,
29889,
13,
1678,
6694,
29918,
18434,
29918,
14035,
29918,
4181,
29918,
344,
2395,
584,
5785,
13,
4706,
2823,
6694,
29918,
18434,
29918,
14035,
29889,
13,
1678,
9055,
29918,
657,
29918,
2917,
584,
6120,
13,
4706,
960,
5852,
29892,
278,
1246,
304,
2740,
261,
29889,
657,
29918,
2917,
338,
29801,
2745,
263,
15645,
13,
4706,
6503,
363,
17983,
338,
3625,
29889,
13466,
29892,
679,
29918,
2917,
338,
2000,
13,
4706,
925,
1156,
263,
4982,
756,
1063,
4687,
29889,
13,
4706,
1152,
2740,
414,
607,
7744,
304,
4940,
848,
29892,
5852,
881,
367,
16389,
29889,
13,
4706,
13466,
29892,
372,
947,
451,
4383,
29889,
13,
13,
13,
1678,
1222,
9422,
13,
1678,
448,
26589,
13,
1678,
8653,
1053,
12655,
408,
7442,
13,
1678,
8653,
1053,
1120,
468,
6092,
265,
408,
946,
13,
1678,
8653,
732,
351,
29889,
5085,
29898,
13,
1678,
2023,
268,
301,
29878,
29922,
351,
29889,
3493,
29889,
21713,
29898,
29896,
29872,
29899,
29941,
29892,
29871,
29896,
29872,
29899,
29906,
29892,
1480,
29922,
5574,
511,
13,
1678,
2023,
268,
281,
29881,
29922,
351,
29889,
3493,
29889,
21713,
29898,
29896,
29872,
29899,
29941,
29892,
29871,
29896,
29872,
29899,
29906,
876,
13,
1678,
8653,
822,
7945,
29918,
9144,
29898,
5085,
29892,
1634,
9555,
1125,
13,
1678,
2023,
268,
1596,
877,
29212,
29901,
24335,
281,
29881,
29901,
6571,
4286,
4830,
29898,
5085,
29889,
29212,
29892,
6389,
29889,
9970,
876,
13,
1678,
2023,
268,
363,
321,
297,
3464,
29898,
29896,
29900,
1125,
13,
1678,
2023,
308,
20254,
29918,
562,
2764,
4135,
353,
29871,
29896,
448,
7442,
29889,
13519,
29898,
29896,
29889,
29947,
29892,
448,
9302,
29889,
8172,
29889,
29590,
29898,
29872,
29892,
29871,
29906,
29930,
29872,
876,
13,
1678,
2023,
308,
1634,
9555,
29898,
1022,
2878,
29922,
29872,
29974,
29896,
29892,
13600,
29922,
29881,
11770,
29918,
562,
2764,
4135,
29892,
301,
29878,
29922,
5085,
29889,
29212,
29892,
281,
29881,
29922,
5085,
29889,
9970,
29897,
13,
1678,
8653,
1364,
14952,
353,
946,
29889,
816,
14952,
29889,
3738,
29943,
3267,
305,
14952,
29898,
14968,
29918,
9144,
29892,
13,
1678,
2023,
462,
462,
4706,
6503,
3790,
29915,
1949,
29918,
6814,
375,
2396,
29871,
29906,
29892,
525,
1949,
29918,
29887,
13364,
2396,
29871,
29900,
1118,
13,
1678,
2023,
462,
462,
4706,
954,
29918,
3626,
1338,
29922,
29906,
29900,
29892,
13,
1678,
2023,
462,
462,
4706,
20751,
29918,
5552,
2433,
562,
2764,
4135,
742,
13,
1678,
2023,
462,
462,
4706,
931,
29918,
5552,
2433,
1022,
2878,
1495,
13,
1678,
8653,
1364,
14952,
29889,
3389,
580,
13,
1678,
8653,
1364,
14952,
29889,
7122,
29918,
9057,
29879,
580,
13,
1678,
8653,
1364,
14952,
29889,
657,
29918,
26495,
29918,
2764,
1960,
29898,
5317,
29922,
5574,
29897,
13,
1678,
9995,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
7945,
29918,
9144,
29892,
3579,
19290,
1125,
13,
4706,
2428,
2141,
1649,
2344,
12035,
19290,
29889,
657,
877,
5721,
29918,
666,
29918,
1202,
2288,
8785,
13,
4706,
396,
5399,
1819,
322,
527,
649,
29872,
2322,
1819,
13,
4706,
4974,
29918,
1217,
29918,
20965,
29918,
6768,
29898,
13,
9651,
9049,
5085,
29892,
903,
1718,
29954,
5005,
3919,
29918,
10818,
29903,
29892,
1024,
2433,
3738,
29943,
3267,
305,
14952,
1495,
13,
4706,
9049,
5085,
353,
1423,
29918,
392,
29918,
14634,
29918,
4381,
29879,
29898,
13,
9651,
9049,
5085,
29892,
731,
3285,
903,
23397,
29918,
14094,
27946,
29892,
903,
6007,
1254,
4717,
1177,
9375,
29892,
13,
9651,
9657,
29918,
978,
2433,
816,
14952,
29918,
6768,
1495,
13,
13,
4706,
1583,
29889,
10314,
353,
9049,
5085,
1839,
10314,
2033,
13,
4706,
2740,
261,
353,
9049,
5085,
1839,
4478,
261,
2033,
13,
4706,
2740,
29918,
6768,
353,
9049,
5085,
29889,
657,
877,
4478,
29918,
6768,
1495,
13,
4706,
565,
338,
8758,
29898,
4478,
261,
29892,
851,
1125,
13,
9651,
565,
2740,
29918,
6768,
338,
6213,
29901,
13,
18884,
2740,
29918,
6768,
353,
9657,
580,
13,
9651,
903,
4478,
29918,
6768,
353,
2740,
29918,
6768,
29889,
8552,
580,
13,
9651,
903,
4478,
29918,
6768,
1839,
2917,
3493,
2033,
353,
7945,
29918,
9144,
29889,
2395,
13,
9651,
903,
4478,
29918,
6768,
1839,
276,
1328,
29918,
12715,
2033,
353,
9049,
5085,
1839,
276,
1328,
29918,
5552,
2033,
13,
9651,
903,
4478,
29918,
6768,
1839,
10314,
29918,
12715,
2033,
353,
9049,
5085,
1839,
2230,
29918,
5552,
2033,
13,
9651,
396,
2087,
7122,
1364,
14952,
5235,
304,
2740,
29918,
6768,
29892,
565,
451,
2307,
2309,
491,
13,
9651,
396,
19481,
13,
9651,
565,
525,
816,
14952,
29915,
451,
297,
903,
4478,
29918,
6768,
29901,
13,
18884,
903,
4478,
29918,
6768,
1839,
816,
14952,
2033,
353,
525,
28491,
29877,
29915,
13,
9651,
1583,
29889,
4478,
261,
29901,
7399,
7974,
261,
353,
2740,
261,
29918,
14399,
29898,
13,
18884,
2740,
261,
29892,
3579,
29918,
4478,
29918,
6768,
29897,
13,
4706,
1683,
29901,
13,
9651,
4974,
338,
8758,
29898,
4478,
261,
29892,
7399,
7974,
261,
29897,
13,
9651,
1583,
29889,
4478,
261,
29901,
7399,
7974,
261,
353,
2740,
261,
13,
13,
4706,
4974,
338,
8758,
29898,
14968,
29918,
9144,
29892,
903,
1300,
468,
6092,
265,
29918,
5696,
29897,
13,
4706,
1583,
29889,
14968,
29918,
9144,
353,
7945,
29918,
9144,
13,
4706,
6389,
353,
9049,
5085,
29889,
657,
877,
5085,
1495,
13,
4706,
1583,
29889,
5085,
353,
6389,
565,
6389,
1683,
7945,
29918,
9144,
29889,
5085,
13,
4706,
954,
29918,
3626,
1338,
353,
9049,
5085,
29889,
657,
877,
1949,
29918,
3626,
1338,
1495,
13,
4706,
931,
29918,
449,
353,
9049,
5085,
29889,
657,
877,
2230,
29918,
449,
1495,
13,
4706,
565,
954,
29918,
3626,
1338,
338,
6213,
29901,
13,
9651,
4974,
931,
29918,
449,
338,
451,
6213,
29892,
320,
13,
18884,
376,
8139,
287,
25480,
28770,
291,
29901,
20370,
954,
29918,
3626,
1338,
470,
931,
29918,
449,
29908,
13,
4706,
1583,
29889,
1949,
29918,
3626,
1338,
353,
954,
29918,
3626,
1338,
13,
4706,
1583,
29889,
2230,
29918,
449,
353,
931,
29918,
449,
13,
4706,
1583,
29889,
3317,
29918,
276,
1328,
353,
9049,
5085,
29889,
657,
877,
3317,
29918,
276,
1328,
1495,
13,
4706,
396,
12700,
848,
13,
4706,
1583,
29889,
19635,
353,
426,
13,
9651,
525,
4478,
29918,
3493,
2396,
7945,
29918,
9144,
29889,
11022,
22854,
29892,
13,
9651,
525,
4478,
29918,
710,
8963,
2396,
2740,
261,
29892,
13,
9651,
525,
9847,
29918,
29883,
5385,
291,
2396,
426,
13,
18884,
525,
2230,
29918,
12514,
2396,
931,
29918,
449,
29892,
13,
18884,
525,
3317,
29918,
276,
1328,
2396,
1583,
29889,
3317,
29918,
276,
1328,
1118,
13,
9651,
525,
13237,
29918,
546,
29918,
3626,
284,
2396,
1583,
29889,
10314,
29913,
13,
13,
4706,
1423,
3149,
353,
9049,
5085,
29889,
657,
877,
3198,
3149,
1495,
13,
4706,
1583,
3032,
3198,
3149,
353,
1423,
3149,
13,
4706,
1583,
3032,
276,
1328,
29918,
5552,
353,
9049,
5085,
1839,
276,
1328,
29918,
5552,
2033,
13,
4706,
1583,
3032,
2230,
29918,
5552,
353,
9049,
5085,
1839,
2230,
29918,
5552,
2033,
13,
4706,
1583,
29889,
20119,
3950,
353,
9049,
5085,
1839,
20119,
3950,
13359,
13609,
580,
13,
4706,
565,
1583,
29889,
20119,
3950,
1275,
525,
20158,
3377,
29915,
470,
1583,
29889,
20119,
3950,
1275,
525,
16838,
3377,
2396,
13,
9651,
4974,
1423,
3149,
338,
451,
6213,
29892,
376,
8139,
287,
1423,
3149,
304,
367,
731,
29908,
13,
9651,
1018,
29918,
5215,
29918,
16838,
3377,
580,
13,
9651,
515,
286,
29916,
3377,
1053,
6991,
5219,
10507,
13,
9651,
1583,
29889,
16838,
3377,
353,
6991,
5219,
10507,
29898,
13,
18884,
1480,
3972,
29922,
359,
29889,
2084,
29889,
7122,
29898,
359,
29889,
2084,
29889,
23579,
568,
486,
29898,
3198,
3149,
9601,
29900,
1402,
525,
20756,
5477,
13,
18884,
28371,
29918,
344,
2395,
29922,
29941,
29892,
13,
18884,
26952,
29922,
8824,
13,
9651,
1723,
13,
13,
4706,
1583,
3032,
28491,
29877,
29918,
908,
353,
22326,
29889,
16542,
580,
13,
4706,
396,
6694,
29918,
18434,
7344,
29879,
278,
4866,
4955,
310,
278,
7639,
29892,
13,
4706,
396,
297,
4958,
310,
599,
2582,
7625,
515,
278,
1634,
9555,
29889,
4813,
952,
526,
13,
4706,
396,
851,
29898,
7662,
29889,
7662,
29918,
333,
29897,
13,
4706,
1583,
29889,
26495,
29918,
18434,
353,
8170,
287,
21533,
580,
13,
4706,
1583,
29889,
2917,
29918,
18434,
353,
8170,
287,
21533,
580,
13,
4706,
396,
2448,
19226,
363,
6694,
29918,
18434,
6939,
13336,
29892,
607,
338,
1304,
304,
13,
4706,
396,
28755,
6694,
29918,
18434,
1156,
1269,
13,
4706,
396,
6694,
29918,
18434,
29918,
4804,
29918,
4181,
29918,
344,
2395,
6923,
13,
4706,
1583,
3032,
2962,
29918,
2230,
353,
6213,
13,
4706,
1583,
3032,
26495,
29918,
18434,
29918,
14035,
29918,
4230,
29918,
1271,
353,
6213,
13,
4706,
1583,
3032,
26495,
29918,
18434,
29918,
14035,
29918,
4230,
29918,
2435,
353,
6213,
13,
4706,
1583,
29889,
26495,
29918,
18434,
29918,
14035,
353,
9049,
5085,
29889,
657,
877,
26495,
29918,
18434,
29918,
14035,
1495,
13,
4706,
1583,
29889,
26495,
29918,
18434,
29918,
14035,
29918,
4181,
29918,
344,
2395,
353,
320,
13,
9651,
9049,
5085,
1839,
26495,
29918,
18434,
29918,
14035,
29918,
4181,
29918,
344,
2395,
2033,
13,
4706,
1583,
3032,
18829,
29918,
657,
29918,
2917,
353,
9049,
5085,
1839,
18829,
29918,
657,
29918,
2917,
2033,
13,
4706,
396,
2538,
2017,
7639,
515,
1423,
3149,
29973,
13,
4706,
565,
9049,
5085,
1839,
690,
2017,
2033,
29901,
13,
9651,
4974,
1423,
3149,
338,
451,
6213,
29892,
320,
13,
18884,
376,
8139,
287,
1423,
3149,
304,
367,
731,
565,
620,
2017,
353,
5852,
29908,
13,
9651,
565,
2897,
29889,
2084,
29889,
275,
1445,
29898,
3198,
3149,
1125,
13,
18884,
1583,
29889,
1359,
29918,
3859,
29918,
8977,
29898,
1359,
29898,
3198,
3149,
876,
13,
9651,
1683,
29901,
13,
18884,
10191,
353,
285,
29915,
3198,
3149,
2224,
426,
3198,
3149,
29913,
338,
451,
3625,
363,
620,
2017,
6169,
13,
18884,
17927,
29889,
11739,
29898,
7645,
29897,
13,
18884,
12020,
3497,
24217,
2392,
29898,
7645,
29897,
13,
13,
1678,
822,
1065,
29898,
1311,
29892,
3579,
19290,
1125,
13,
4706,
9995,
6558,
2999,
1353,
310,
3367,
1338,
13,
4706,
9995,
13,
4706,
396,
8561,
1854,
393,
445,
1364,
14952,
338,
13252,
472,
278,
2740,
261,
13,
4706,
1583,
29889,
4478,
261,
29889,
17591,
29918,
816,
14952,
29898,
1311,
29897,
13,
4706,
1369,
29918,
2230,
353,
931,
29889,
2230,
580,
13,
4706,
1583,
3032,
2962,
29918,
2230,
353,
1369,
29918,
2230,
13,
4706,
954,
29918,
3626,
1338,
353,
9049,
5085,
29889,
657,
877,
1949,
29918,
3626,
1338,
742,
1583,
29889,
1949,
29918,
3626,
1338,
29897,
13,
4706,
931,
29918,
449,
353,
9049,
5085,
29889,
657,
877,
2230,
29918,
449,
742,
1583,
29889,
2230,
29918,
449,
29897,
13,
4706,
396,
1152,
6694,
29918,
18434,
6939,
13336,
29901,
13,
4706,
1583,
3032,
26495,
29918,
18434,
29918,
14035,
29918,
4230,
29918,
1271,
353,
448,
29896,
13,
4706,
1583,
3032,
26495,
29918,
18434,
29918,
14035,
29918,
4230,
29918,
2435,
353,
7431,
29898,
1311,
29889,
26495,
29918,
18434,
29897,
13,
13,
4706,
17927,
29889,
3888,
877,
4763,
292,
28224,
7862,
1495,
13,
4706,
17927,
29889,
3888,
29898,
29888,
29915,
8009,
310,
4231,
3276,
9330,
29879,
338,
426,
1311,
29889,
1949,
29918,
4951,
3276,
29918,
20673,
29913,
1495,
13,
4706,
565,
954,
29918,
3626,
1338,
338,
451,
6213,
29901,
13,
9651,
17927,
29889,
3888,
29898,
29888,
29915,
8009,
310,
349,
2548,
9330,
29879,
338,
426,
1949,
29918,
3626,
1338,
448,
1583,
29889,
1949,
29918,
4951,
3276,
29918,
20673,
29913,
1495,
13,
9651,
260,
1646,
353,
260,
29939,
18933,
29898,
3881,
29898,
1311,
29889,
1949,
29918,
4951,
3276,
29918,
20673,
29892,
954,
29918,
3626,
1338,
876,
13,
4706,
1683,
29901,
13,
9651,
396,
512,
445,
1206,
29892,
871,
25480,
491,
931,
29918,
449,
338,
1304,
29889,
1334,
437,
451,
2479,
13,
9651,
396,
263,
6728,
2594,
769,
13,
9651,
260,
1646,
353,
3464,
29898,
1311,
29889,
1949,
29918,
4951,
3276,
29918,
20673,
29892,
29871,
29896,
29900,
29900,
29900,
29900,
29900,
29897,
13,
4706,
565,
931,
29918,
449,
338,
451,
6213,
29901,
13,
9651,
17927,
29889,
3888,
29898,
29888,
29915,
2481,
714,
313,
344,
2395,
29897,
338,
426,
2230,
29918,
449,
29913,
1495,
13,
4706,
363,
903,
297,
260,
1646,
29901,
13,
9651,
565,
313,
2230,
29918,
449,
322,
931,
29889,
2230,
580,
448,
1369,
29918,
2230,
6736,
931,
29918,
449,
29897,
470,
320,
13,
462,
1678,
313,
1311,
29889,
3317,
29918,
276,
1328,
322,
1583,
29889,
657,
29918,
13318,
29918,
276,
1328,
580,
6736,
1583,
29889,
3317,
29918,
276,
1328,
1125,
13,
18884,
2867,
13,
9651,
1583,
29889,
816,
11272,
29918,
4622,
580,
13,
13,
1678,
822,
4078,
29898,
1311,
29892,
1423,
3149,
29922,
8516,
1125,
13,
4706,
9995,
11371,
5399,
3149,
13,
4706,
9995,
13,
4706,
565,
1423,
3149,
338,
6213,
29901,
13,
9651,
1423,
3149,
353,
1583,
3032,
3198,
3149,
13,
4706,
565,
1423,
3149,
338,
451,
6213,
29901,
13,
9651,
29356,
29898,
359,
29889,
2084,
29889,
25721,
29898,
3198,
3149,
876,
13,
9651,
4078,
29898,
1311,
29889,
3859,
29918,
8977,
3285,
1423,
3149,
29897,
13,
13,
1678,
822,
903,
3258,
29918,
1482,
29918,
7662,
29898,
1311,
29892,
2295,
29892,
7788,
29922,
8516,
1125,
13,
4706,
565,
7788,
338,
6213,
29901,
13,
9651,
7788,
353,
6652,
7541,
6848,
29898,
1068,
1311,
29889,
10314,
29897,
13,
4706,
736,
9330,
29898,
13,
9651,
1583,
29889,
14968,
29918,
9144,
29892,
11117,
5085,
2396,
1583,
29889,
5085,
29892,
525,
2917,
2396,
2295,
1118,
13,
9651,
7788,
29922,
13237,
29897,
13,
13,
1678,
822,
20410,
29918,
4622,
29898,
1311,
1125,
13,
4706,
9995,
4504,
11272,
2446,
2740,
261,
7829,
3414,
13,
4706,
9995,
13,
4706,
7788,
353,
6652,
7541,
6848,
29898,
1068,
1311,
29889,
10314,
29897,
13,
4706,
565,
1583,
3032,
18829,
29918,
657,
29918,
2917,
29901,
13,
9651,
396,
20340,
363,
3625,
6503,
1244,
29892,
2012,
310,
297,
788,
29918,
9057,
29889,
910,
13,
9651,
396,
628,
1036,
278,
679,
29918,
2917,
1246,
2745,
263,
6503,
338,
3625,
13,
9651,
383,
6545,
3267,
305,
14952,
29889,
10314,
29918,
12847,
3032,
3827,
29898,
13237,
29897,
13,
13,
4706,
396,
29408,
363,
278,
22360,
310,
263,
9251,
10434,
2295,
29889,
3115,
29892,
13,
4706,
396,
4805,
29918,
19290,
3743,
4805,
5235,
4502,
304,
1716,
788,
29918,
9057,
322,
304,
13,
4706,
396,
679,
29918,
2917,
313,
361,
694,
2295,
338,
21201,
29897,
13,
4706,
2295,
29892,
4805,
29918,
19290,
353,
1583,
3032,
14032,
866,
29918,
2917,
580,
13,
4706,
396,
5974,
25214,
304,
367,
1304,
297,
679,
29918,
2917,
29892,
322,
5505,
297,
788,
29918,
9057,
13,
4706,
4805,
29918,
19290,
1839,
295,
28170,
29918,
2230,
2033,
353,
1583,
3032,
295,
28170,
29918,
2230,
580,
13,
4706,
565,
2295,
338,
6213,
29901,
13,
9651,
396,
1939,
2295,
304,
27391,
29901,
13641,
2446,
2295,
304,
14707,
515,
2740,
261,
13,
9651,
2295,
353,
1583,
29889,
4478,
261,
29889,
657,
29918,
2917,
29898,
1068,
17833,
29918,
19290,
29897,
13,
9651,
4805,
29918,
19290,
1839,
1482,
29918,
2917,
2033,
353,
5852,
13,
4706,
1683,
29901,
13,
9651,
396,
910,
338,
451,
263,
716,
2295,
29892,
541,
263,
28454,
697,
607,
338,
1286,
21201,
13,
9651,
4805,
29918,
19290,
1839,
1482,
29918,
2917,
2033,
353,
7700,
13,
4706,
3414,
353,
1583,
3032,
3258,
29918,
1482,
29918,
7662,
29898,
2917,
29892,
7788,
29922,
13237,
29897,
13,
4706,
1583,
29889,
1202,
29918,
9057,
29898,
7662,
29892,
3579,
17833,
29918,
19290,
29897,
13,
13,
1678,
822,
1065,
29918,
2541,
29918,
2917,
29898,
1311,
29892,
2295,
1125,
13,
4706,
9995,
6558,
411,
2295,
363,
2186,
6216,
29889,
13,
4706,
739,
6826,
267,
263,
2323,
6694,
14260,
1090,
738,
4343,
1819,
310,
278,
11266,
16744,
29889,
13,
4706,
1152,
1342,
29892,
1156,
379,
13152,
756,
15659,
278,
1900,
11266,
15501,
1819,
2729,
373,
263,
4808,
29899,
449,
8783,
29892,
13,
4706,
697,
508,
671,
445,
740,
304,
337,
14968,
263,
1904,
411,
278,
1021,
11266,
16744,
373,
599,
278,
3625,
301,
24025,
848,
13,
4706,
313,
18271,
278,
4808,
714,
731,
467,
739,
508,
884,
3639,
916,
3618,
470,
5922,
29889,
13,
4706,
9995,
13,
4706,
3414,
353,
1583,
3032,
3258,
29918,
1482,
29918,
7662,
29898,
2917,
29897,
13,
4706,
1634,
9555,
353,
383,
1296,
5612,
9555,
580,
13,
4706,
3414,
29889,
5085,
1839,
276,
18505,
2033,
353,
1634,
9555,
13,
4706,
736,
1583,
29889,
3389,
29918,
9057,
29898,
7662,
29897,
13,
13,
1678,
822,
903,
8977,
29918,
3166,
29918,
7662,
29898,
1311,
29892,
3414,
1125,
13,
4706,
565,
338,
8758,
29898,
7662,
29892,
9330,
1125,
13,
9651,
736,
11117,
29911,
3289,
29968,
29918,
1367,
2396,
3414,
29889,
7662,
29918,
333,
29892,
525,
3991,
2396,
3414,
29889,
5085,
1839,
2917,
2033,
29913,
13,
4706,
1683,
29901,
13,
9651,
4974,
338,
8758,
29898,
7662,
29892,
9657,
29897,
13,
9651,
736,
11117,
29911,
3289,
29968,
29918,
1367,
2396,
3414,
1839,
29911,
3289,
29968,
29918,
1367,
7464,
525,
3991,
2396,
3414,
1839,
3991,
2033,
29913,
13,
13,
1678,
822,
788,
29918,
9057,
29898,
1311,
29892,
3414,
29892,
3579,
19290,
1125,
13,
4706,
9995,
2528,
292,
263,
6694,
3414,
304,
278,
1364,
14952,
29889,
13,
13,
4706,
826,
3174,
29901,
13,
9651,
3414,
13940,
1990,
18078,
1300,
468,
6092,
265,
29889,
816,
14952,
29889,
5398,
29952,
1125,
263,
716,
6694,
3414,
13,
13,
4706,
830,
6591,
9976,
297,
9049,
5085,
29901,
13,
9651,
448,
4105,
3522,
29901,
379,
29933,
4105,
3522,
304,
367,
1304,
29889,
11699,
1063,
4559,
29881,
297,
903,
14032,
866,
29918,
2917,
13,
9651,
448,
716,
29918,
2917,
29901,
960,
5852,
29892,
3414,
8665,
716,
2295,
19745,
29892,
6467,
372,
2504,
4769,
13,
795,
263,
2295,
313,
6194,
565,
1134,
1275,
525,
14032,
8194,
1495,
13,
13,
4706,
9333,
565,
716,
29918,
2917,
1275,
7700,
29901,
13,
9651,
448,
2295,
29918,
1989,
29901,
512,
1890,
1820,
363,
2295,
13,
9651,
448,
620,
2017,
29918,
3166,
29901,
2295,
21201,
515,
445,
2316,
27744,
13,
9651,
448,
2316,
27744,
29901,
2295,
21201,
304,
445,
2316,
27744,
313,
4622,
515,
620,
2017,
29918,
3166,
29897,
13,
4706,
9995,
13,
4706,
1067,
29879,
353,
383,
6545,
3267,
305,
14952,
13,
4706,
565,
451,
1583,
3032,
18829,
29918,
657,
29918,
2917,
29901,
13,
9651,
396,
20340,
363,
6503,
304,
4953,
3625,
1244,
29892,
408,
445,
756,
451,
9559,
13,
9651,
396,
297,
20410,
29918,
4622,
1434,
13,
9651,
1067,
29879,
29889,
10314,
29918,
12847,
3032,
3827,
29898,
7662,
29889,
13237,
29897,
13,
4706,
396,
1634,
9555,
13,
4706,
1634,
9555,
353,
6652,
5709,
5612,
9555,
29898,
16674,
29922,
7662,
29889,
13237,
29889,
3177,
29897,
13,
4706,
3414,
29889,
5085,
1839,
276,
18505,
2033,
353,
1634,
9555,
13,
4706,
396,
12577,
28235,
17983,
13,
4706,
1583,
29889,
4478,
261,
29889,
9573,
29918,
29886,
2548,
29898,
7662,
29889,
5085,
1839,
2917,
11287,
13,
4706,
396,
1667,
1889,
13,
4706,
4982,
353,
1067,
29879,
3032,
2962,
29918,
5721,
7541,
29918,
9057,
29898,
7662,
29892,
1067,
29879,
29889,
10314,
29918,
12847,
29897,
13,
4706,
396,
1634,
9555,
3244,
13,
4706,
364,
29886,
353,
3244,
292,
29889,
4899,
29898,
13,
9651,
3646,
29922,
1311,
3032,
3389,
29918,
276,
18505,
29892,
13,
9651,
6389,
7607,
7662,
29892,
4982,
29892,
1634,
9555,
511,
13,
9651,
1146,
9857,
29922,
8824,
29897,
13,
4706,
364,
29886,
29889,
2962,
580,
13,
4706,
3414,
29918,
8977,
353,
1583,
3032,
8977,
29918,
3166,
29918,
7662,
29898,
7662,
29897,
13,
4706,
3414,
29918,
8977,
29889,
5504,
3319,
29915,
5398,
2396,
3414,
29892,
525,
11947,
2396,
4982,
29892,
525,
5612,
9555,
4899,
2396,
364,
29886,
1800,
13,
4706,
396,
5399,
3149,
3244,
29889,
910,
338,
884,
1304,
363,
6694,
29918,
18434,
13,
4706,
396,
6939,
13,
4706,
565,
1583,
3032,
3198,
3149,
338,
451,
6213,
470,
320,
13,
18884,
1583,
29889,
26495,
29918,
18434,
29918,
14035,
338,
451,
6213,
29901,
13,
9651,
1583,
3032,
1202,
29918,
3198,
3149,
292,
29918,
517,
29918,
9057,
29898,
9057,
29897,
13,
4706,
411,
1583,
29889,
21339,
29901,
13,
9651,
1583,
29889,
816,
14989,
29918,
20673,
29889,
4397,
29898,
7662,
29918,
8977,
29897,
13,
13,
1678,
822,
903,
14941,
29918,
7662,
29918,
7564,
29898,
1311,
29892,
3414,
29918,
8977,
1125,
13,
4706,
3414,
29918,
8977,
1839,
5612,
9555,
4899,
13359,
7122,
580,
13,
13,
1678,
822,
903,
1202,
29918,
3198,
3149,
292,
29918,
517,
29918,
9057,
29898,
1311,
29892,
4982,
1125,
13,
4706,
822,
903,
7620,
29918,
3198,
3149,
29918,
14035,
29898,
29888,
329,
1125,
13,
9651,
1583,
3032,
14941,
292,
29918,
20673,
580,
13,
9651,
1583,
29889,
7620,
580,
13,
9651,
396,
6694,
29918,
18434,
6939,
13,
9651,
411,
1583,
3032,
28491,
29877,
29918,
908,
29901,
13,
18884,
565,
1583,
3032,
21001,
29918,
26495,
29918,
18434,
29918,
14035,
7295,
13,
462,
1678,
17927,
29889,
8382,
703,
12296,
6694,
29918,
18434,
6939,
1159,
13,
462,
1678,
1583,
29889,
26495,
29918,
18434,
29918,
14035,
29898,
13,
462,
4706,
1583,
29889,
26495,
29918,
18434,
29892,
1583,
3032,
2962,
29918,
2230,
29897,
13,
13,
4706,
4982,
29889,
1202,
29918,
15091,
29918,
14035,
7373,
7620,
29918,
3198,
3149,
29918,
14035,
29897,
13,
13,
1678,
822,
903,
21001,
29918,
26495,
29918,
18434,
29918,
14035,
29898,
1311,
1125,
13,
4706,
565,
1583,
29889,
26495,
29918,
18434,
29918,
14035,
338,
6213,
29901,
13,
9651,
736,
7700,
13,
4706,
4974,
1583,
3032,
26495,
29918,
18434,
29918,
14035,
29918,
4230,
29918,
1271,
338,
451,
6213,
13,
4706,
1857,
29918,
1271,
353,
938,
29898,
9302,
29889,
14939,
29898,
13,
9651,
1583,
3032,
295,
28170,
29918,
2230,
580,
847,
1583,
29889,
26495,
29918,
18434,
29918,
14035,
29918,
4181,
29918,
344,
2395,
876,
13,
4706,
1857,
29918,
2435,
353,
7431,
29898,
1311,
29889,
26495,
29918,
18434,
29897,
13,
4706,
3240,
29918,
791,
353,
313,
3784,
29918,
1271,
1405,
13,
462,
259,
1583,
3032,
26495,
29918,
18434,
29918,
14035,
29918,
4230,
29918,
1271,
29897,
322,
320,
13,
9651,
1857,
29918,
2435,
1405,
1583,
3032,
26495,
29918,
18434,
29918,
14035,
29918,
4230,
29918,
2435,
13,
4706,
565,
3240,
29918,
791,
29901,
13,
9651,
1583,
3032,
26495,
29918,
18434,
29918,
14035,
29918,
4230,
29918,
1271,
353,
1857,
29918,
1271,
13,
9651,
1583,
3032,
26495,
29918,
18434,
29918,
14035,
29918,
4230,
29918,
2435,
353,
1857,
29918,
2435,
13,
4706,
736,
3240,
29918,
791,
13,
13,
1678,
822,
903,
3389,
29918,
276,
18505,
29898,
1311,
29892,
3414,
29892,
3414,
29918,
9057,
29892,
1634,
9555,
1125,
13,
4706,
1833,
29918,
2914,
353,
6213,
13,
4706,
1550,
451,
3414,
29918,
9057,
29889,
15091,
7295,
13,
9651,
8967,
29918,
2914,
353,
1634,
9555,
29889,
9155,
580,
13,
9651,
565,
525,
15003,
1627,
29915,
297,
8967,
29918,
2914,
29901,
13,
18884,
396,
382,
4387,
362,
756,
5229,
13,
18884,
17927,
29889,
11739,
29898,
12276,
287,
29918,
2914,
1839,
15003,
1627,
11287,
13,
18884,
1583,
29889,
4478,
261,
29889,
24219,
362,
29918,
26061,
29898,
13,
462,
1678,
2295,
29922,
7662,
29889,
5085,
1839,
2917,
7464,
3579,
12276,
287,
29918,
2914,
29897,
13,
18884,
1634,
9555,
29889,
11631,
29918,
265,
580,
13,
18884,
2867,
13,
9651,
565,
8967,
29918,
2914,
29889,
657,
877,
15091,
742,
7700,
1125,
13,
18884,
1634,
9555,
29889,
11631,
29918,
265,
580,
13,
18884,
2867,
13,
9651,
565,
7431,
29898,
12276,
287,
29918,
2914,
29897,
1275,
29871,
29900,
29901,
13,
18884,
396,
530,
4069,
9657,
881,
925,
367,
14993,
2986,
13,
18884,
17927,
29889,
27392,
703,
29903,
1984,
3262,
4069,
9657,
4520,
515,
1634,
9555,
1159,
13,
18884,
6773,
13,
9651,
396,
5974,
1951,
1369,
310,
7639,
13,
9651,
560,
28170,
29918,
2230,
353,
1583,
3032,
295,
28170,
29918,
2230,
580,
13,
9651,
8967,
29918,
2914,
1839,
2230,
29918,
16076,
29918,
2962,
2033,
353,
560,
28170,
29918,
2230,
13,
13,
9651,
396,
7338,
336,
2472,
515,
2740,
261,
313,
25253,
29897,
13,
9651,
8783,
29918,
2311,
353,
1583,
29889,
4478,
261,
29889,
24713,
29918,
2311,
580,
13,
9651,
565,
8783,
29918,
2311,
1405,
29871,
29900,
29901,
13,
18884,
8967,
29918,
2914,
1839,
4478,
261,
29918,
1272,
29918,
2311,
2033,
353,
8783,
29918,
2311,
13,
9651,
363,
413,
29892,
325,
297,
1583,
29889,
4478,
261,
29889,
29883,
398,
28524,
29918,
10185,
29918,
11651,
2141,
7076,
7295,
13,
18884,
8967,
29918,
2914,
1839,
4478,
261,
29918,
10185,
29918,
29915,
718,
413,
29962,
353,
325,
13,
9651,
363,
413,
29892,
325,
297,
1583,
29889,
4478,
261,
29889,
4299,
29918,
16744,
2141,
7076,
7295,
13,
18884,
8967,
29918,
2914,
1839,
4478,
261,
29918,
7529,
29918,
29915,
718,
413,
29962,
353,
325,
13,
9651,
1583,
3032,
1202,
29918,
26495,
29918,
2914,
29898,
13,
18884,
3414,
29889,
7662,
29918,
333,
29892,
8967,
29918,
2914,
29892,
2295,
29922,
7662,
29889,
5085,
1839,
2917,
11287,
13,
9651,
1634,
9555,
29889,
11631,
29918,
265,
580,
13,
9651,
1833,
29918,
2914,
353,
8967,
29918,
2914,
13,
4706,
396,
6978,
599,
310,
1833,
29918,
2914,
304,
2740,
261,
13,
4706,
565,
1833,
29918,
2914,
338,
451,
6213,
29901,
13,
9651,
1583,
29889,
4478,
261,
29889,
5504,
29898,
2917,
29922,
7662,
29889,
5085,
1839,
2917,
7464,
3579,
4230,
29918,
2914,
29897,
13,
13,
1678,
822,
903,
14032,
866,
29918,
2917,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
9133,
2247,
263,
12422,
297,
20410,
29918,
4622,
29892,
607,
6511,
304,
27391,
263,
2295,
13,
4706,
607,
756,
1063,
4629,
322,
22039,
19030,
9251,
29889,
13,
13,
4706,
584,
2457,
29901,
2295,
29892,
4805,
29918,
5085,
13,
4706,
9995,
13,
4706,
2295,
353,
6213,
13,
4706,
4805,
29918,
5085,
353,
9657,
580,
13,
4706,
736,
2295,
29892,
4805,
29918,
5085,
13,
13,
1678,
822,
903,
295,
28170,
29918,
2230,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
584,
2457,
29901,
5974,
560,
28170,
1951,
1369,
310,
7639,
313,
4149,
525,
3389,
1495,
13,
4706,
9995,
13,
4706,
4974,
1583,
3032,
2962,
29918,
2230,
338,
451,
6213,
29892,
320,
13,
9651,
376,
1252,
15362,
756,
451,
1063,
4687,
3447,
29908,
13,
4706,
736,
931,
29889,
2230,
580,
448,
1583,
3032,
2962,
29918,
2230,
13,
13,
1678,
822,
679,
29918,
13318,
29918,
2917,
29898,
1311,
1125,
13,
4706,
9995,
2577,
278,
1900,
5285,
515,
278,
7743,
17643,
29889,
13,
4706,
9995,
13,
4706,
736,
1583,
29889,
4478,
261,
29889,
657,
29918,
13318,
29918,
2917,
580,
13,
13,
1678,
822,
679,
29918,
13318,
29918,
7662,
29918,
333,
29898,
1311,
1125,
13,
4706,
9995,
2577,
278,
3414,
1178,
393,
2582,
297,
278,
1900,
5285,
29914,
13318,
20751,
29889,
13,
13,
4706,
960,
727,
526,
5141,
9169,
22920,
29892,
591,
736,
278,
1178,
310,
278,
937,
697,
29889,
13,
4706,
9995,
13,
4706,
1900,
29918,
2917,
353,
1583,
29889,
657,
29918,
13318,
29918,
2917,
580,
13,
4706,
363,
3414,
29918,
333,
29892,
2295,
297,
1583,
29889,
2917,
29918,
18434,
29889,
7076,
7295,
13,
9651,
565,
5839,
280,
29889,
29881,
17204,
29898,
13318,
29918,
2917,
29897,
1275,
5839,
280,
29889,
29881,
17204,
29898,
2917,
1125,
13,
18884,
736,
3414,
29918,
333,
13,
4706,
12020,
24875,
2392,
877,
1576,
1900,
2295,
6571,
338,
451,
1476,
297,
2295,
4955,
353,
426,
1836,
525,
13,
462,
965,
525,
4013,
881,
2360,
3799,
29991,
4286,
4830,
29898,
13318,
29918,
2917,
29892,
1583,
29889,
2917,
29918,
18434,
876,
13,
13,
1678,
822,
679,
29918,
13318,
29918,
276,
1328,
29898,
1311,
1125,
13,
4706,
9995,
2577,
278,
1900,
20751,
515,
278,
7743,
17643,
29889,
13,
4706,
9995,
13,
4706,
736,
1583,
29889,
4478,
261,
29889,
657,
29918,
13318,
29918,
276,
1328,
580,
13,
13,
1678,
822,
903,
1202,
29918,
26495,
29918,
2914,
29898,
1311,
29892,
3414,
29918,
333,
29892,
8967,
29918,
2914,
29892,
2295,
29922,
8516,
1125,
13,
4706,
565,
1583,
29889,
20119,
3950,
1275,
525,
16838,
3377,
29915,
470,
1583,
29889,
20119,
3950,
1275,
525,
20158,
3377,
2396,
13,
9651,
565,
525,
6758,
29915,
297,
8967,
29918,
2914,
29901,
13,
18884,
1583,
29889,
16838,
3377,
29889,
1202,
29918,
19529,
279,
29898,
13,
462,
1678,
4055,
2433,
6758,
742,
13,
462,
1678,
995,
7607,
13,
462,
4706,
285,
29915,
7662,
426,
7662,
29918,
333,
29913,
2854,
29918,
6758,
742,
13,
462,
4706,
8967,
29918,
2914,
1839,
6758,
2033,
13,
462,
1678,
10353,
13,
462,
1678,
5534,
29918,
10568,
29922,
12276,
287,
29918,
2914,
29961,
1311,
3032,
276,
1328,
29918,
5552,
29962,
13,
18884,
1723,
13,
9651,
1583,
29889,
16838,
3377,
29889,
1202,
29918,
19529,
279,
29898,
13,
18884,
4055,
29922,
1311,
3032,
276,
1328,
29918,
5552,
29892,
13,
18884,
995,
7607,
13,
462,
1678,
285,
29915,
7662,
426,
7662,
29918,
333,
29913,
426,
1311,
3032,
276,
1328,
29918,
5552,
29913,
742,
13,
462,
1678,
8967,
29918,
2914,
29961,
1311,
3032,
276,
1328,
29918,
5552,
29962,
13,
18884,
10353,
13,
18884,
5534,
29918,
10568,
29922,
12276,
287,
29918,
2914,
29961,
1311,
3032,
276,
1328,
29918,
5552,
29962,
13,
9651,
1723,
13,
4706,
411,
1583,
3032,
28491,
29877,
29918,
908,
29901,
13,
9651,
396,
3940,
29901,
1334,
3787,
599,
310,
8967,
29918,
2914,
297,
6694,
29918,
18434,
29961,
7662,
29918,
333,
1402,
13,
9651,
396,
451,
925,
278,
20751,
995,
29889,
13,
9651,
3414,
29918,
1989,
353,
851,
29898,
7662,
29918,
333,
29897,
13,
9651,
716,
29918,
8269,
353,
3509,
29889,
8552,
29898,
12276,
287,
29918,
2914,
29897,
13,
9651,
565,
3414,
29918,
1989,
297,
1583,
29889,
26495,
29918,
18434,
29901,
13,
18884,
1583,
29889,
26495,
29918,
18434,
29961,
7662,
29918,
1989,
1822,
4397,
29898,
1482,
29918,
8269,
29897,
13,
9651,
1683,
29901,
13,
18884,
1583,
29889,
26495,
29918,
18434,
29961,
7662,
29918,
1989,
29962,
353,
518,
1482,
29918,
8269,
29962,
13,
18884,
565,
2295,
29901,
13,
462,
1678,
1583,
29889,
2917,
29918,
18434,
29961,
7662,
29918,
1989,
29962,
353,
2295,
13,
13,
1678,
822,
679,
29918,
26495,
29918,
2764,
1960,
29898,
1311,
29892,
10422,
29922,
8516,
29892,
6492,
29922,
8824,
29892,
671,
29918,
26172,
29922,
5574,
1125,
13,
4706,
9995,
2577,
26101,
10837,
1960,
13,
13,
4706,
12662,
2699,
13,
4706,
448,
1378,
29899,
13,
9651,
10422,
584,
851,
13,
9651,
6492,
584,
6120,
13,
9651,
671,
29918,
26172,
584,
6120,
13,
13,
4706,
1222,
9422,
13,
4706,
448,
26589,
13,
4706,
8653,
1364,
14952,
29889,
3389,
580,
13,
4706,
8653,
1364,
14952,
29889,
7122,
29918,
9057,
29879,
580,
13,
4706,
8653,
1364,
14952,
29889,
657,
29918,
26495,
29918,
2764,
1960,
29898,
5317,
29922,
5574,
29897,
13,
13,
9651,
6317,
1967,
1057,
2045,
597,
3292,
29889,
510,
29914,
29920,
11895,
11895,
29896,
29929,
29947,
29929,
29914,
12300,
29954,
6092,
265,
3609,
1272,
29914,
10054,
29914,
6207,
29914,
1514,
29914,
2754,
29914,
1300,
468,
6092,
265,
29889,
29896,
29889,
2732,
29973,
1610,
29922,
3009,
13,
4706,
9995,
13,
4706,
565,
10422,
338,
6213,
322,
451,
6492,
29901,
13,
9651,
17927,
29889,
27392,
877,
12148,
2845,
3867,
10422,
470,
2758,
6492,
297,
679,
29918,
26495,
29918,
2764,
1960,
1495,
13,
4706,
1053,
22889,
29889,
2272,
5317,
408,
14770,
13,
4706,
14770,
29889,
29891,
1643,
29898,
1311,
3032,
276,
1328,
29918,
5552,
29897,
13,
4706,
14770,
29889,
29916,
1643,
29898,
1311,
3032,
2230,
29918,
5552,
29897,
13,
4706,
14770,
29889,
3257,
703,
5894,
13390,
7186,
26101,
29899,
2481,
297,
1269,
379,
13152,
8602,
284,
1159,
13,
4706,
411,
1583,
3032,
28491,
29877,
29918,
908,
29901,
13,
9651,
363,
3414,
29918,
333,
29892,
3414,
29918,
690,
297,
1583,
29889,
26495,
29918,
18434,
29889,
7076,
7295,
13,
18884,
337,
2935,
353,
518,
29916,
29961,
1311,
3032,
276,
1328,
29918,
5552,
29962,
363,
921,
297,
3414,
29918,
690,
29962,
13,
18884,
921,
353,
1051,
29898,
3881,
29898,
2435,
29898,
7662,
29918,
690,
4961,
13,
18884,
14770,
29889,
5317,
29898,
29916,
29892,
337,
2935,
29892,
3858,
29922,
29888,
29915,
7662,
426,
7662,
29918,
333,
29913,
1495,
13,
4706,
565,
671,
29918,
26172,
29901,
13,
9651,
14770,
29889,
26172,
29898,
2029,
2433,
13318,
1495,
13,
4706,
565,
10422,
29901,
13,
9651,
17927,
29889,
3888,
29898,
29888,
29915,
29903,
5555,
26101,
10837,
345,
297,
426,
9507,
29913,
1495,
13,
9651,
14770,
29889,
7620,
1003,
29898,
9507,
29897,
13,
4706,
565,
6492,
29901,
13,
9651,
14770,
29889,
4294,
580,
13,
13,
1678,
822,
2106,
29918,
8977,
29898,
1311,
29892,
12551,
29922,
8516,
1125,
13,
4706,
9995,
13,
4706,
16969,
263,
8600,
6943,
263,
3353,
2106,
310,
278,
1102,
14952,
29889,
910,
338,
13,
4706,
1304,
363,
1423,
3149,
292,
29889,
13,
13,
4706,
3940,
393,
278,
1423,
3149,
871,
3743,
2472,
607,
756,
1063,
13,
4706,
15443,
472,
1364,
14952,
322,
2740,
261,
29889,
739,
947,
451,
1712,
2472,
13,
4706,
1048,
5279,
2734,
17643,
29892,
5174,
825,
896,
8967,
1434,
278,
13,
4706,
1423,
3149,
29889,
13,
4706,
7857,
29892,
620,
9929,
385,
7639,
515,
263,
1423,
3149,
338,
10029,
13,
4706,
1422,
515,
3133,
292,
278,
7639,
4940,
278,
1423,
3149,
29889,
450,
13,
4706,
4642,
4010,
267,
408,
565,
599,
5279,
2734,
17643,
526,
29185,
472,
13,
4706,
278,
1423,
3149,
29892,
322,
716,
17643,
526,
21467,
515,
727,
29892,
6257,
515,
13,
4706,
1364,
14952,
322,
2740,
261,
2106,
5034,
304,
599,
2472,
10478,
13,
4706,
2745,
278,
1423,
3149,
29889,
13,
13,
4706,
1222,
9422,
13,
4706,
448,
26589,
13,
4706,
8653,
946,
29889,
7620,
29898,
816,
14952,
29889,
3859,
29918,
8977,
3285,
525,
3198,
3149,
29889,
351,
1495,
13,
4706,
9995,
13,
4706,
12551,
353,
2428,
2141,
3859,
29918,
8977,
29898,
23848,
29897,
13,
4706,
411,
1583,
3032,
28491,
29877,
29918,
908,
29901,
13,
9651,
396,
450,
1121,
310,
2740,
261,
29889,
657,
29918,
3859,
508,
2337,
367,
5839,
839,
13,
9651,
12551,
1839,
4478,
261,
2033,
353,
5839,
280,
29889,
29881,
17204,
29898,
1311,
29889,
4478,
261,
29889,
657,
29918,
3859,
3101,
13,
9651,
12551,
1839,
26495,
29918,
18434,
2033,
353,
4390,
29889,
29881,
17204,
29898,
1311,
29889,
26495,
29918,
18434,
29897,
13,
9651,
12551,
1839,
2917,
29918,
18434,
2033,
353,
4390,
29889,
29881,
17204,
29898,
1311,
29889,
2917,
29918,
18434,
29897,
13,
4706,
565,
1583,
29889,
20119,
3950,
1275,
525,
16838,
3377,
29915,
470,
1583,
29889,
20119,
3950,
1275,
525,
20158,
3377,
2396,
13,
9651,
12551,
1839,
20119,
3950,
2033,
353,
4390,
29889,
29881,
17204,
29898,
1311,
29889,
16838,
3377,
3032,
19529,
279,
29918,
8977,
29897,
13,
4706,
736,
12551,
13,
13,
1678,
822,
2254,
29918,
3859,
29918,
8977,
29898,
1311,
29892,
2106,
29918,
8977,
1125,
13,
4706,
9995,
13,
4706,
16012,
515,
278,
7160,
2106,
9657,
29889,
910,
508,
367,
1304,
304,
620,
2017,
385,
13,
4706,
7639,
515,
263,
1423,
3149,
313,
4149,
525,
3859,
29918,
8977,
29915,
363,
24230,
1446,
467,
13,
13,
4706,
910,
1158,
1818,
871,
367,
2000,
408,
760,
310,
1364,
14952,
7632,
29889,
13,
4706,
8251,
292,
372,
297,
278,
7256,
310,
385,
7639,
508,
3275,
304,
385,
7580,
13,
4706,
6426,
2106,
310,
1364,
14952,
470,
2740,
261,
29889,
13,
13,
4706,
1222,
9422,
13,
4706,
448,
26589,
13,
4706,
8653,
1364,
14952,
29889,
1359,
29918,
3859,
29918,
8977,
29898,
351,
29889,
1359,
877,
3198,
3149,
29889,
351,
8785,
13,
4706,
9995,
13,
4706,
2428,
2141,
1359,
29918,
3859,
29918,
8977,
29898,
3859,
29918,
8977,
29897,
13,
4706,
411,
1583,
3032,
28491,
29877,
29918,
908,
29901,
13,
9651,
1583,
29889,
4478,
261,
353,
1583,
29889,
4478,
261,
29889,
16513,
29918,
3166,
29918,
3859,
29898,
13,
18884,
5839,
280,
29889,
18132,
29898,
3859,
29918,
8977,
1839,
4478,
261,
25901,
13,
9651,
1583,
29889,
26495,
29918,
18434,
353,
4390,
29889,
18132,
29898,
3859,
29918,
8977,
1839,
26495,
29918,
18434,
11287,
13,
9651,
1583,
29889,
2917,
29918,
18434,
353,
4390,
29889,
18132,
29898,
3859,
29918,
8977,
1839,
2917,
29918,
18434,
11287,
13,
4706,
565,
1583,
29889,
20119,
3950,
1275,
525,
16838,
3377,
29915,
470,
1583,
29889,
20119,
3950,
1275,
525,
20158,
3377,
2396,
13,
9651,
1583,
29889,
16838,
3377,
3032,
19529,
279,
29918,
8977,
353,
4390,
29889,
18132,
29898,
3859,
29918,
8977,
1839,
20119,
3950,
11287,
13,
4706,
17927,
29889,
8382,
29898,
29888,
29915,
23456,
11856,
261,
4306,
426,
1311,
29889,
4478,
261,
29913,
1495,
13,
2
] |
conftest.py | opennode/waldur-ansible | 1 | 192464 | <reponame>opennode/waldur-ansible<filename>conftest.py
from waldur_ansible.common.tests.integration import integration_tests_config
def pytest_addoption(parser):
parser.addoption(integration_tests_config.TEST_TAG_FLAG, action="append", help="specify what type of tests to run")
| [
1,
529,
276,
1112,
420,
29958,
459,
2108,
356,
29914,
18370,
332,
29899,
550,
1821,
29966,
9507,
29958,
535,
615,
342,
29889,
2272,
13,
3166,
281,
2741,
332,
29918,
550,
1821,
29889,
9435,
29889,
21150,
29889,
27925,
1053,
13465,
29918,
21150,
29918,
2917,
13,
13,
13,
1753,
11451,
1688,
29918,
1202,
3385,
29898,
16680,
1125,
13,
1678,
13812,
29889,
1202,
3385,
29898,
27925,
29918,
21150,
29918,
2917,
29889,
18267,
29918,
16881,
29918,
26516,
29892,
3158,
543,
4397,
613,
1371,
543,
6550,
1598,
825,
1134,
310,
6987,
304,
1065,
1159,
13,
2
] |
pontoon/sync/vcs/models.py | zbraniecki/pontoon | 1 | 140755 | <reponame>zbraniecki/pontoon<gh_stars>1-10
"""
Models for working with remote translation data stored in a VCS.
"""
import logging
import os
import shutil
from itertools import chain
from datetime import datetime
from django.utils import timezone
from django.utils.functional import cached_property
from pontoon.base import MOZILLA_REPOS
from pontoon.sync.exceptions import ParseError
from pontoon.sync.utils import (
is_hidden,
directory_contains_resources,
is_resource,
is_asymmetric_resource,
locale_directory_path,
locale_to_source_path,
source_to_locale_path,
)
from pontoon.sync.vcs.repositories import get_changed_files
log = logging.getLogger(__name__)
class MissingSourceRepository(Exception):
"""
Raised when project can't find the repository
which contains source files.
"""
class MissingSourceDirectoryError(Exception):
"""Raised when sync can't find the source directory for the locales."""
class MissingLocaleDirectoryError(IOError):
"""Raised when sync can't find the locale directory."""
class VCSProject(object):
"""
Container for project data that is stored on the filesystem and
pulled from a remote VCS.
"""
SOURCE_DIR_SCORES = {
'templates': 3,
'en-US': 2,
'en': 1
}
SOURCE_DIR_NAMES = SOURCE_DIR_SCORES.keys()
def __init__(self, db_project, locales=None, obsolete_entities_paths=None, full_scan=False):
"""
Load resource paths from the given db_project and parse them
for translation data.
:param Project db_project:
Project model instance for the project we're going to be
reading files for.
:param list locales:
List of Locale model instances for the locales that we want
to parse. Defaults to parsing resources for all enabled
locales on the project.
:param list obsolete_entities_paths:
List of paths to remove translations of obsolete entities from
:param bool full_scan:
Scans all resources in repository
"""
self.db_project = db_project
self.locales = locales if locales is not None else db_project.locales.all()
self.obsolete_entities_paths = obsolete_entities_paths or []
self.full_scan = full_scan
self.synced_locales = set()
@cached_property
def changed_files(self):
if self.full_scan:
# All files are marked as changed
return None
if self.locales:
return self.changed_locales_files
else:
return self.changed_source_files[0]
@cached_property
def changed_source_files(self):
"""
Returns a tuple of changed and removed source files in the project:
(changed_files, removed_files)
"""
source_resources_repo = self.db_project.source_repository
if not source_resources_repo:
raise MissingSourceRepository(self.db_project)
source_directory = self.source_directory_path()
if source_resources_repo.last_synced_revisions:
last_revision = source_resources_repo.last_synced_revisions.get('single_locale')
else:
last_revision = None
modified_files, removed_files = get_changed_files(source_resources_repo.type, source_directory, last_revision)
# Unify filesystem and data model file extensions
modified_files = map(source_to_locale_path, modified_files)
removed_files = map(source_to_locale_path, removed_files)
if source_resources_repo.source_repo or not last_revision:
get_path = lambda path: (path, [])
else:
relative_source_path = source_directory[len(source_resources_repo.checkout_path):].lstrip(os.sep)
get_path = lambda path: (path[len(relative_source_path):].lstrip(os.sep), [])
return dict(map(get_path, modified_files)), dict(map(get_path, removed_files))
@cached_property
def changed_locales_files(self):
"""
Map of repositories and files changed within them after the latest update.
"""
files = {}
def find_changed_files(repo, locale=None):
"""
Returns a dictionary that contains resource paths as keys and their
list of locales as value.
"""
if repo.last_synced_revisions:
last_revision = repo.last_synced_revisions.get(locale.code if locale else 'single_locale')
else:
last_revision = None
# We have to filter out paths that are locale files
checkout_path = repo.locale_checkout_path(locale) if locale else repo.checkout_path
return get_changed_files(repo.type, checkout_path, last_revision)[0]
for repo in self.db_project.repositories.exclude(source_repo=True):
if repo.multi_locale:
for locale in self.db_project.locales.all():
for path in find_changed_files(repo, locale):
files.setdefault(path, []).append(locale)
else:
for changed_file in find_changed_files(repo):
path_info = self.get_path_info(changed_file, repo)
if path_info:
path, locale_path, locale = path_info
path = path[len(locale_path):].lstrip(os.sep)
files.setdefault(path, []).append(locale)
return files
def get_path_info(self, path, repo):
"""
Checks if path inside one of locale directories.
Returns a tuple with information on given path or None if can't find any.
Tuple contains:
- path to the given file
- path to the locale directory
- locale code
"""
if is_hidden(path):
return None
try:
locale_path, locale = next((p, l) for p, l in self.locale_directories(repo).items() if path.startswith(p))
except StopIteration:
return None
return path, locale_path, locale
def locale_directories(self, repo):
"""
A map of paths to their respective locales.
"""
locales_paths = {}
for locale in self.db_project.locales.all():
path = locale_directory_path(repo.checkout_path, locale.code)[len(repo.checkout_path):].lstrip(os.sep)
locales_paths[path] = locale
return locales_paths
@cached_property
def resources(self):
"""
Lazy-loaded mapping of relative paths -> VCSResources.
Waiting until first access both avoids unnecessary file reads
and allows tests that don't need to touch the resources to run
with less mocking.
"""
resources = {}
for path in self.relative_resource_paths():
locales = self.db_project.unsynced_locales
if (self.changed_files is not None and
((not self.changed_files or path not in self.changed_files) and
path not in self.obsolete_entities_paths)):
if not locales:
log.debug('Skipping unchanged file: {}'.format(path))
continue
else:
if self.changed_files is None or path in self.obsolete_entities_paths:
locales += self.locales
else:
locales += self.changed_files[path]
locales = set(locales)
map(self.synced_locales.add, locales)
log.debug('Resource file {} for {}'.format(path, ','.join([l.code for l in locales]) or 'source'))
try:
resources[path] = VCSResource(self, path, locales=locales)
except ParseError as err:
log.error('Skipping resource {path} due to ParseError: {err}'.format(
path=path, err=err
))
return resources
@property
def entities(self):
return chain.from_iterable(
resource.entities.values() for resource in self.resources.values()
)
@property
def checkout_path(self):
return self.db_project.checkout_path
def source_directory_path(self):
"""
Path to the directory where source strings are stored.
Paths are identified using a scoring system; more likely
directory names get higher scores, as do directories with
formats that only used for source strings.
"""
possible_sources = []
for root, dirnames, filenames in os.walk(self.checkout_path):
for dirname in dirnames:
if dirname in self.SOURCE_DIR_NAMES:
score = self.SOURCE_DIR_SCORES[dirname]
# Ensure the matched directory contains resources.
directory_path = os.path.join(root, dirname)
if directory_contains_resources(directory_path):
# Extra points for source resources!
if directory_contains_resources(directory_path, source_only=True):
score += 3
possible_sources.append((directory_path, score))
if possible_sources:
return max(possible_sources, key=lambda s: s[1])[0]
else:
raise MissingSourceDirectoryError('No source directory found for project {0}'.format(self.db_project.slug))
def relative_resource_paths(self):
"""
List of paths relative to the locale directories returned by
self.locale_directory_path() for each resource in this project.
"""
path = self.source_directory_path()
for absolute_path in self.resources_for_path(path):
# .pot files in the source directory need to be renamed to
# .po files for the locale directories.
if absolute_path.endswith('.pot'):
absolute_path = absolute_path[:-1]
yield os.path.relpath(absolute_path, path)
def resources_for_path(self, path):
"""
List of paths for all supported resources found within the given
path.
"""
for root, dirnames, filenames in os.walk(path):
if is_hidden(root):
continue
# Ignore certain files in Mozilla repositories.
if self.db_project.repository_url in MOZILLA_REPOS:
filenames = [f for f in filenames if not f.endswith('region.properties')]
for filename in filenames:
if is_resource(filename):
yield os.path.join(root, filename)
def create_locale_directory(self, locale, path):
if not self.db_project.has_multi_locale_repositories:
source_directory = self.source_directory_path()
parent_directory = os.path.abspath(os.path.join(source_directory, os.pardir))
locale_directory = os.path.join(parent_directory, locale.code.replace('-', '_'))
# For asymmetric formats, create empty folder
if is_asymmetric_resource(path):
os.makedirs(locale_directory)
# For other formats, copy resources from source directory
else:
shutil.copytree(source_directory, locale_directory)
for root, dirnames, filenames in os.walk(locale_directory):
for filename in filenames:
path = os.path.join(root, filename)
if is_resource(filename):
os.rename(path, source_to_locale_path(path))
else:
os.remove(path)
return locale_directory
else:
raise MissingLocaleDirectoryError(
'Directory for locale `{0}` not found'.format(locale.code)
)
class VCSResource(object):
"""Represents a single resource across multiple locales."""
def __init__(self, vcs_project, path, locales=None):
"""
Load the resource file for each enabled locale and store its
translations in VCSEntity instances.
"""
from pontoon.base.models import Locale
from pontoon.sync import formats # Avoid circular import.
self.vcs_project = vcs_project
self.path = path
self.locales = locales or []
self.files = {}
self.entities = {}
# Create entities using resources from the source directory,
source_resource_path = os.path.join(vcs_project.source_directory_path(), self.path)
source_resource_path = locale_to_source_path(source_resource_path)
source_resource_file = formats.parse(source_resource_path, locale=Locale.objects.get(code='en-US'))
for index, translation in enumerate(source_resource_file.translations):
vcs_entity = VCSEntity(
resource=self,
key=translation.key,
string=translation.source_string,
string_plural=translation.source_string_plural,
comments=translation.comments,
source=translation.source,
order=translation.order or index
)
self.entities[vcs_entity.key] = vcs_entity
# Fill in translations from the locale resources.
for locale in locales:
try:
locale_directory = locale_directory_path(
vcs_project.checkout_path, locale.code
)
except IOError:
locale_directory = self.vcs_project.create_locale_directory(
locale, self.path
)
resource_path = os.path.join(locale_directory, self.path)
log.debug('Parsing resource file: %s', resource_path)
try:
resource_file = formats.parse(resource_path, source_resource_path, locale)
except (IOError, ParseError):
continue # File doesn't exist or is invalid, let's move on
self.files[locale] = resource_file
log.debug('Discovered %s translations.', len(resource_file.translations))
for translation in resource_file.translations:
try:
self.entities[translation.key].translations[locale.code] = translation
except KeyError:
# If the source is missing an entity, we consider it
# deleted and don't add it.
pass
def save(self):
"""
Save changes made to any of the translations in this resource
back to the filesystem for all locales.
"""
for locale, resource_file in self.files.items():
resource_file.save(locale)
class VCSEntity(object):
"""
An Entity is a single string to be translated, and a VCSEntity
stores the translations for an entity from several locales.
"""
def __init__(self, resource, key, string, comments, source, string_plural='',
order=0):
self.resource = resource
self.key = key
self.string = string
self.string_plural = string_plural
self.translations = {}
self.comments = comments
self.source = source
self.order = order
def has_translation_for(self, locale_code):
"""Return True if a translation exists for the given locale."""
return locale_code in self.translations
class VCSTranslation(object):
"""
A single translation of a source string into another language.
Since a string can have different translations based on plural
forms, all of the different forms are stored under self.strings, a
dict where the keys equal possible values for
pontoon.base.models.Translation.plural_form and the values equal the
translation for that plural form.
"""
def __init__(
self, key, strings, comments, fuzzy,
source_string='',
source_string_plural='',
order=0,
source=None,
last_translator=None,
last_updated=None
):
self.key = key
self.source_string = source_string
self.source_string_plural = source_string_plural
self.strings = strings
self.comments = comments
self.fuzzy = fuzzy
self.order = order
self.source = source or []
self.last_translator = last_translator
self.last_updated = last_updated
@property
def extra(self):
"""
Return a dict of custom properties to store in the database.
Useful for subclasses from specific formats that have extra data
that needs to be preserved.
"""
return {}
def update_from_db(self, db_translations):
"""
Update translation with current DB state.
"""
# If no DB translations are fuzzy, set fuzzy to False.
# Otherwise, it's true.
self.fuzzy = any(t for t in db_translations if t.fuzzy)
if len(db_translations) > 0:
last_translation = max(
db_translations,
key=lambda t: t.date or timezone.make_aware(datetime.min)
)
self.last_updated = last_translation.date
self.last_translator = last_translation.user
# Replace existing translations with ones from the database.
self.strings = {
db.plural_form: db.string for db in db_translations
}
| [
1,
529,
276,
1112,
420,
29958,
29920,
29890,
661,
16776,
29875,
29914,
1112,
517,
265,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
15945,
29908,
13,
23785,
363,
1985,
411,
7592,
13962,
848,
6087,
297,
263,
478,
9295,
29889,
13,
15945,
29908,
13,
5215,
12183,
13,
5215,
2897,
13,
5215,
528,
4422,
13,
13,
3166,
4256,
8504,
1053,
9704,
13,
3166,
12865,
1053,
12865,
13,
13,
3166,
9557,
29889,
13239,
1053,
29431,
13,
3166,
9557,
29889,
13239,
29889,
2220,
284,
1053,
22152,
29918,
6799,
13,
13,
3166,
282,
10268,
265,
29889,
3188,
1053,
16999,
29999,
24071,
29909,
29918,
1525,
24815,
13,
3166,
282,
10268,
265,
29889,
16593,
29889,
11739,
29879,
1053,
20969,
2392,
13,
3166,
282,
10268,
265,
29889,
16593,
29889,
13239,
1053,
313,
13,
1678,
338,
29918,
10892,
29892,
13,
1678,
3884,
29918,
11516,
29918,
13237,
29892,
13,
1678,
338,
29918,
10314,
29892,
13,
1678,
338,
29918,
294,
962,
16414,
29918,
10314,
29892,
13,
1678,
15068,
29918,
12322,
29918,
2084,
29892,
13,
1678,
15068,
29918,
517,
29918,
4993,
29918,
2084,
29892,
13,
1678,
2752,
29918,
517,
29918,
23337,
29918,
2084,
29892,
13,
29897,
13,
3166,
282,
10268,
265,
29889,
16593,
29889,
29894,
2395,
29889,
276,
1066,
20106,
1053,
679,
29918,
15033,
29918,
5325,
13,
13,
13,
1188,
353,
12183,
29889,
657,
16363,
22168,
978,
1649,
29897,
13,
13,
13,
1990,
4750,
292,
4435,
11481,
29898,
2451,
1125,
13,
1678,
9995,
13,
1678,
390,
1759,
287,
746,
2060,
508,
29915,
29873,
1284,
278,
9810,
13,
1678,
607,
3743,
2752,
2066,
29889,
13,
1678,
9995,
13,
13,
13,
1990,
4750,
292,
4435,
9882,
2392,
29898,
2451,
1125,
13,
1678,
9995,
29934,
1759,
287,
746,
16523,
508,
29915,
29873,
1284,
278,
2752,
3884,
363,
278,
1887,
267,
1213,
15945,
13,
13,
13,
1990,
4750,
292,
3524,
744,
9882,
2392,
29898,
5971,
2392,
1125,
13,
1678,
9995,
29934,
1759,
287,
746,
16523,
508,
29915,
29873,
1284,
278,
15068,
3884,
1213,
15945,
13,
13,
13,
1990,
478,
9295,
7653,
29898,
3318,
1125,
13,
1678,
9995,
13,
1678,
21679,
363,
2060,
848,
393,
338,
6087,
373,
278,
22101,
322,
13,
1678,
20043,
515,
263,
7592,
478,
9295,
29889,
13,
1678,
9995,
13,
1678,
7791,
4574,
4741,
29918,
9464,
29918,
29903,
3217,
15989,
353,
426,
13,
4706,
525,
20943,
2396,
29871,
29941,
29892,
13,
4706,
525,
264,
29899,
3308,
2396,
29871,
29906,
29892,
13,
4706,
525,
264,
2396,
29871,
29896,
13,
1678,
500,
13,
1678,
7791,
4574,
4741,
29918,
9464,
29918,
5813,
29903,
353,
7791,
4574,
4741,
29918,
9464,
29918,
29903,
3217,
15989,
29889,
8149,
580,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
4833,
29918,
4836,
29892,
1887,
267,
29922,
8516,
29892,
704,
2170,
371,
29918,
296,
1907,
29918,
24772,
29922,
8516,
29892,
2989,
29918,
16192,
29922,
8824,
1125,
13,
4706,
9995,
13,
4706,
16012,
6503,
10898,
515,
278,
2183,
4833,
29918,
4836,
322,
6088,
963,
13,
4706,
363,
13962,
848,
29889,
13,
13,
4706,
584,
3207,
8010,
4833,
29918,
4836,
29901,
13,
9651,
8010,
1904,
2777,
363,
278,
2060,
591,
29915,
276,
2675,
304,
367,
13,
9651,
5183,
2066,
363,
29889,
13,
4706,
584,
3207,
1051,
1887,
267,
29901,
13,
9651,
2391,
310,
5976,
744,
1904,
8871,
363,
278,
1887,
267,
393,
591,
864,
13,
9651,
304,
6088,
29889,
13109,
29879,
304,
13755,
7788,
363,
599,
9615,
13,
9651,
1887,
267,
373,
278,
2060,
29889,
13,
4706,
584,
3207,
1051,
704,
2170,
371,
29918,
296,
1907,
29918,
24772,
29901,
13,
9651,
2391,
310,
10898,
304,
3349,
5578,
800,
310,
704,
2170,
371,
16212,
515,
13,
4706,
584,
3207,
6120,
2989,
29918,
16192,
29901,
13,
9651,
2522,
550,
599,
7788,
297,
9810,
13,
4706,
9995,
13,
4706,
1583,
29889,
2585,
29918,
4836,
353,
4833,
29918,
4836,
13,
4706,
1583,
29889,
2997,
267,
353,
1887,
267,
565,
1887,
267,
338,
451,
6213,
1683,
4833,
29918,
4836,
29889,
2997,
267,
29889,
497,
580,
13,
4706,
1583,
29889,
711,
2170,
371,
29918,
296,
1907,
29918,
24772,
353,
704,
2170,
371,
29918,
296,
1907,
29918,
24772,
470,
5159,
13,
4706,
1583,
29889,
8159,
29918,
16192,
353,
2989,
29918,
16192,
13,
4706,
1583,
29889,
19274,
1133,
29918,
2997,
267,
353,
731,
580,
13,
13,
1678,
732,
29883,
3791,
29918,
6799,
13,
1678,
822,
3939,
29918,
5325,
29898,
1311,
1125,
13,
4706,
565,
1583,
29889,
8159,
29918,
16192,
29901,
13,
9651,
396,
2178,
2066,
526,
10902,
408,
3939,
13,
9651,
736,
6213,
13,
13,
4706,
565,
1583,
29889,
2997,
267,
29901,
13,
9651,
736,
1583,
29889,
15033,
29918,
2997,
267,
29918,
5325,
13,
4706,
1683,
29901,
13,
9651,
736,
1583,
29889,
15033,
29918,
4993,
29918,
5325,
29961,
29900,
29962,
13,
13,
1678,
732,
29883,
3791,
29918,
6799,
13,
1678,
822,
3939,
29918,
4993,
29918,
5325,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
16969,
263,
18761,
310,
3939,
322,
6206,
2752,
2066,
297,
278,
2060,
29901,
13,
4706,
313,
15033,
29918,
5325,
29892,
6206,
29918,
5325,
29897,
13,
4706,
9995,
13,
4706,
2752,
29918,
13237,
29918,
20095,
353,
1583,
29889,
2585,
29918,
4836,
29889,
4993,
29918,
19033,
13,
13,
4706,
565,
451,
2752,
29918,
13237,
29918,
20095,
29901,
13,
9651,
12020,
4750,
292,
4435,
11481,
29898,
1311,
29889,
2585,
29918,
4836,
29897,
13,
13,
4706,
2752,
29918,
12322,
353,
1583,
29889,
4993,
29918,
12322,
29918,
2084,
580,
13,
13,
4706,
565,
2752,
29918,
13237,
29918,
20095,
29889,
4230,
29918,
19274,
1133,
29918,
276,
1730,
1080,
29901,
13,
9651,
1833,
29918,
276,
4924,
353,
2752,
29918,
13237,
29918,
20095,
29889,
4230,
29918,
19274,
1133,
29918,
276,
1730,
1080,
29889,
657,
877,
14369,
29918,
23337,
1495,
13,
4706,
1683,
29901,
13,
9651,
1833,
29918,
276,
4924,
353,
6213,
13,
13,
4706,
9120,
29918,
5325,
29892,
6206,
29918,
5325,
353,
679,
29918,
15033,
29918,
5325,
29898,
4993,
29918,
13237,
29918,
20095,
29889,
1853,
29892,
2752,
29918,
12322,
29892,
1833,
29918,
276,
4924,
29897,
13,
13,
4706,
396,
853,
1598,
22101,
322,
848,
1904,
934,
17752,
13,
4706,
9120,
29918,
5325,
353,
2910,
29898,
4993,
29918,
517,
29918,
23337,
29918,
2084,
29892,
9120,
29918,
5325,
29897,
13,
4706,
6206,
29918,
5325,
353,
2910,
29898,
4993,
29918,
517,
29918,
23337,
29918,
2084,
29892,
6206,
29918,
5325,
29897,
13,
13,
4706,
565,
2752,
29918,
13237,
29918,
20095,
29889,
4993,
29918,
20095,
470,
451,
1833,
29918,
276,
4924,
29901,
13,
9651,
679,
29918,
2084,
353,
14013,
2224,
29901,
313,
2084,
29892,
518,
2314,
13,
4706,
1683,
29901,
13,
9651,
6198,
29918,
4993,
29918,
2084,
353,
2752,
29918,
12322,
29961,
2435,
29898,
4993,
29918,
13237,
29918,
20095,
29889,
3198,
449,
29918,
2084,
1125,
1822,
29880,
17010,
29898,
359,
29889,
19570,
29897,
13,
9651,
679,
29918,
2084,
353,
14013,
2224,
29901,
313,
2084,
29961,
2435,
29898,
22925,
29918,
4993,
29918,
2084,
1125,
1822,
29880,
17010,
29898,
359,
29889,
19570,
511,
518,
2314,
13,
13,
4706,
736,
9657,
29898,
1958,
29898,
657,
29918,
2084,
29892,
9120,
29918,
5325,
8243,
9657,
29898,
1958,
29898,
657,
29918,
2084,
29892,
6206,
29918,
5325,
876,
13,
13,
1678,
732,
29883,
3791,
29918,
6799,
13,
1678,
822,
3939,
29918,
2997,
267,
29918,
5325,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
7315,
310,
28914,
322,
2066,
3939,
2629,
963,
1156,
278,
9281,
2767,
29889,
13,
4706,
9995,
13,
4706,
2066,
353,
6571,
13,
13,
4706,
822,
1284,
29918,
15033,
29918,
5325,
29898,
20095,
29892,
15068,
29922,
8516,
1125,
13,
9651,
9995,
13,
9651,
16969,
263,
8600,
393,
3743,
6503,
10898,
408,
6611,
322,
1009,
13,
9651,
1051,
310,
1887,
267,
408,
995,
29889,
13,
9651,
9995,
13,
9651,
565,
13761,
29889,
4230,
29918,
19274,
1133,
29918,
276,
1730,
1080,
29901,
13,
18884,
1833,
29918,
276,
4924,
353,
13761,
29889,
4230,
29918,
19274,
1133,
29918,
276,
1730,
1080,
29889,
657,
29898,
23337,
29889,
401,
565,
15068,
1683,
525,
14369,
29918,
23337,
1495,
13,
9651,
1683,
29901,
13,
18884,
1833,
29918,
276,
4924,
353,
6213,
13,
13,
9651,
396,
1334,
505,
304,
4175,
714,
10898,
393,
526,
15068,
2066,
13,
9651,
24808,
29918,
2084,
353,
13761,
29889,
23337,
29918,
3198,
449,
29918,
2084,
29898,
23337,
29897,
565,
15068,
1683,
13761,
29889,
3198,
449,
29918,
2084,
13,
9651,
736,
679,
29918,
15033,
29918,
5325,
29898,
20095,
29889,
1853,
29892,
24808,
29918,
2084,
29892,
1833,
29918,
276,
4924,
9601,
29900,
29962,
13,
13,
4706,
363,
13761,
297,
1583,
29889,
2585,
29918,
4836,
29889,
276,
1066,
20106,
29889,
735,
2325,
29898,
4993,
29918,
20095,
29922,
5574,
1125,
13,
9651,
565,
13761,
29889,
9910,
29918,
23337,
29901,
13,
18884,
363,
15068,
297,
1583,
29889,
2585,
29918,
4836,
29889,
2997,
267,
29889,
497,
7295,
13,
462,
1678,
363,
2224,
297,
1284,
29918,
15033,
29918,
5325,
29898,
20095,
29892,
15068,
1125,
13,
462,
4706,
2066,
29889,
842,
4381,
29898,
2084,
29892,
5159,
467,
4397,
29898,
23337,
29897,
13,
9651,
1683,
29901,
13,
18884,
363,
3939,
29918,
1445,
297,
1284,
29918,
15033,
29918,
5325,
29898,
20095,
1125,
13,
462,
1678,
2224,
29918,
3888,
353,
1583,
29889,
657,
29918,
2084,
29918,
3888,
29898,
15033,
29918,
1445,
29892,
13761,
29897,
13,
13,
462,
1678,
565,
2224,
29918,
3888,
29901,
13,
462,
4706,
2224,
29892,
15068,
29918,
2084,
29892,
15068,
353,
2224,
29918,
3888,
13,
462,
4706,
2224,
353,
2224,
29961,
2435,
29898,
23337,
29918,
2084,
1125,
1822,
29880,
17010,
29898,
359,
29889,
19570,
29897,
13,
462,
4706,
2066,
29889,
842,
4381,
29898,
2084,
29892,
5159,
467,
4397,
29898,
23337,
29897,
13,
13,
4706,
736,
2066,
13,
13,
13,
1678,
822,
679,
29918,
2084,
29918,
3888,
29898,
1311,
29892,
2224,
29892,
13761,
1125,
13,
4706,
9995,
13,
4706,
5399,
29879,
565,
2224,
2768,
697,
310,
15068,
17525,
29889,
13,
4706,
16969,
263,
18761,
411,
2472,
373,
2183,
2224,
470,
6213,
565,
508,
29915,
29873,
1284,
738,
29889,
13,
4706,
12603,
552,
3743,
29901,
13,
4706,
448,
2224,
304,
278,
2183,
934,
13,
4706,
448,
2224,
304,
278,
15068,
3884,
13,
4706,
448,
15068,
775,
13,
4706,
9995,
13,
4706,
565,
338,
29918,
10892,
29898,
2084,
1125,
13,
9651,
736,
6213,
13,
13,
4706,
1018,
29901,
13,
9651,
15068,
29918,
2084,
29892,
15068,
353,
2446,
3552,
29886,
29892,
301,
29897,
363,
282,
29892,
301,
297,
1583,
29889,
23337,
29918,
11851,
3842,
29898,
20095,
467,
7076,
580,
565,
2224,
29889,
27382,
2541,
29898,
29886,
876,
13,
4706,
5174,
22303,
13463,
362,
29901,
13,
9651,
736,
6213,
13,
13,
4706,
736,
2224,
29892,
15068,
29918,
2084,
29892,
15068,
13,
13,
1678,
822,
15068,
29918,
11851,
3842,
29898,
1311,
29892,
13761,
1125,
13,
4706,
9995,
13,
4706,
319,
2910,
310,
10898,
304,
1009,
18067,
1887,
267,
29889,
13,
4706,
9995,
13,
4706,
1887,
267,
29918,
24772,
353,
6571,
13,
13,
4706,
363,
15068,
297,
1583,
29889,
2585,
29918,
4836,
29889,
2997,
267,
29889,
497,
7295,
13,
9651,
2224,
353,
15068,
29918,
12322,
29918,
2084,
29898,
20095,
29889,
3198,
449,
29918,
2084,
29892,
15068,
29889,
401,
9601,
2435,
29898,
20095,
29889,
3198,
449,
29918,
2084,
1125,
1822,
29880,
17010,
29898,
359,
29889,
19570,
29897,
13,
9651,
1887,
267,
29918,
24772,
29961,
2084,
29962,
353,
15068,
13,
13,
4706,
736,
1887,
267,
29918,
24772,
13,
13,
1678,
732,
29883,
3791,
29918,
6799,
13,
1678,
822,
7788,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
19575,
29891,
29899,
15638,
10417,
310,
6198,
10898,
1599,
478,
9295,
13770,
29889,
13,
13,
4706,
20340,
292,
2745,
937,
2130,
1716,
4772,
29879,
19039,
934,
13623,
13,
4706,
322,
6511,
6987,
393,
1016,
29915,
29873,
817,
304,
6023,
278,
7788,
304,
1065,
13,
4706,
411,
3109,
11187,
292,
29889,
13,
4706,
9995,
13,
4706,
7788,
353,
6571,
13,
13,
4706,
363,
2224,
297,
1583,
29889,
22925,
29918,
10314,
29918,
24772,
7295,
13,
9651,
1887,
267,
353,
1583,
29889,
2585,
29918,
4836,
29889,
6948,
948,
1133,
29918,
2997,
267,
13,
13,
9651,
565,
313,
1311,
29889,
15033,
29918,
5325,
338,
451,
6213,
322,
13,
18884,
5135,
1333,
1583,
29889,
15033,
29918,
5325,
470,
2224,
451,
297,
1583,
29889,
15033,
29918,
5325,
29897,
322,
13,
462,
1678,
2224,
451,
297,
1583,
29889,
711,
2170,
371,
29918,
296,
1907,
29918,
24772,
22164,
13,
18884,
565,
451,
1887,
267,
29901,
13,
462,
1678,
1480,
29889,
8382,
877,
29903,
1984,
3262,
443,
15033,
934,
29901,
6571,
4286,
4830,
29898,
2084,
876,
13,
462,
1678,
6773,
13,
13,
9651,
1683,
29901,
13,
18884,
565,
1583,
29889,
15033,
29918,
5325,
338,
6213,
470,
2224,
297,
1583,
29889,
711,
2170,
371,
29918,
296,
1907,
29918,
24772,
29901,
13,
462,
1678,
1887,
267,
4619,
1583,
29889,
2997,
267,
13,
18884,
1683,
29901,
13,
462,
1678,
1887,
267,
4619,
1583,
29889,
15033,
29918,
5325,
29961,
2084,
29962,
13,
13,
9651,
1887,
267,
353,
731,
29898,
2997,
267,
29897,
13,
9651,
2910,
29898,
1311,
29889,
19274,
1133,
29918,
2997,
267,
29889,
1202,
29892,
1887,
267,
29897,
13,
9651,
1480,
29889,
8382,
877,
6848,
934,
6571,
363,
6571,
4286,
4830,
29898,
2084,
29892,
13420,
4286,
7122,
4197,
29880,
29889,
401,
363,
301,
297,
1887,
267,
2314,
470,
525,
4993,
8785,
13,
13,
9651,
1018,
29901,
13,
18884,
7788,
29961,
2084,
29962,
353,
478,
9295,
6848,
29898,
1311,
29892,
2224,
29892,
1887,
267,
29922,
2997,
267,
29897,
13,
9651,
5174,
20969,
2392,
408,
4589,
29901,
13,
18884,
1480,
29889,
2704,
877,
29903,
1984,
3262,
6503,
426,
2084,
29913,
2861,
304,
20969,
2392,
29901,
426,
3127,
29913,
4286,
4830,
29898,
13,
462,
1678,
2224,
29922,
2084,
29892,
4589,
29922,
3127,
13,
462,
876,
13,
13,
4706,
736,
7788,
13,
13,
1678,
732,
6799,
13,
1678,
822,
16212,
29898,
1311,
1125,
13,
4706,
736,
9704,
29889,
3166,
29918,
1524,
519,
29898,
13,
9651,
6503,
29889,
296,
1907,
29889,
5975,
580,
363,
6503,
297,
1583,
29889,
13237,
29889,
5975,
580,
13,
4706,
1723,
13,
13,
1678,
732,
6799,
13,
1678,
822,
24808,
29918,
2084,
29898,
1311,
1125,
13,
4706,
736,
1583,
29889,
2585,
29918,
4836,
29889,
3198,
449,
29918,
2084,
13,
13,
1678,
822,
2752,
29918,
12322,
29918,
2084,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
10802,
304,
278,
3884,
988,
2752,
6031,
526,
6087,
29889,
13,
13,
4706,
10802,
29879,
526,
15659,
773,
263,
26654,
1788,
29936,
901,
5517,
13,
4706,
3884,
2983,
679,
6133,
19435,
29892,
408,
437,
17525,
411,
13,
4706,
21971,
393,
871,
1304,
363,
2752,
6031,
29889,
13,
4706,
9995,
13,
4706,
1950,
29918,
29879,
2863,
353,
5159,
13,
4706,
363,
3876,
29892,
4516,
7039,
29892,
977,
264,
1280,
297,
2897,
29889,
20919,
29898,
1311,
29889,
3198,
449,
29918,
2084,
1125,
13,
9651,
363,
4516,
978,
297,
4516,
7039,
29901,
13,
18884,
565,
4516,
978,
297,
1583,
29889,
27839,
4741,
29918,
9464,
29918,
5813,
29903,
29901,
13,
462,
1678,
8158,
353,
1583,
29889,
27839,
4741,
29918,
9464,
29918,
29903,
3217,
15989,
29961,
25721,
29962,
13,
13,
462,
1678,
396,
22521,
545,
278,
19228,
3884,
3743,
7788,
29889,
13,
462,
1678,
3884,
29918,
2084,
353,
2897,
29889,
2084,
29889,
7122,
29898,
4632,
29892,
4516,
978,
29897,
13,
462,
1678,
565,
3884,
29918,
11516,
29918,
13237,
29898,
12322,
29918,
2084,
1125,
13,
462,
4706,
396,
7338,
336,
3291,
363,
2752,
7788,
29991,
13,
462,
4706,
565,
3884,
29918,
11516,
29918,
13237,
29898,
12322,
29918,
2084,
29892,
2752,
29918,
6194,
29922,
5574,
1125,
13,
462,
9651,
8158,
4619,
29871,
29941,
13,
13,
462,
4706,
1950,
29918,
29879,
2863,
29889,
4397,
3552,
12322,
29918,
2084,
29892,
8158,
876,
13,
13,
4706,
565,
1950,
29918,
29879,
2863,
29901,
13,
9651,
736,
4236,
29898,
27338,
29918,
29879,
2863,
29892,
1820,
29922,
2892,
269,
29901,
269,
29961,
29896,
2314,
29961,
29900,
29962,
13,
4706,
1683,
29901,
13,
9651,
12020,
4750,
292,
4435,
9882,
2392,
877,
3782,
2752,
3884,
1476,
363,
2060,
426,
29900,
29913,
4286,
4830,
29898,
1311,
29889,
2585,
29918,
4836,
29889,
29517,
876,
13,
13,
1678,
822,
6198,
29918,
10314,
29918,
24772,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
2391,
310,
10898,
6198,
304,
278,
15068,
17525,
4133,
491,
13,
4706,
1583,
29889,
23337,
29918,
12322,
29918,
2084,
580,
363,
1269,
6503,
297,
445,
2060,
29889,
13,
4706,
9995,
13,
4706,
2224,
353,
1583,
29889,
4993,
29918,
12322,
29918,
2084,
580,
13,
4706,
363,
8380,
29918,
2084,
297,
1583,
29889,
13237,
29918,
1454,
29918,
2084,
29898,
2084,
1125,
13,
9651,
396,
869,
17765,
2066,
297,
278,
2752,
3884,
817,
304,
367,
19533,
304,
13,
9651,
396,
869,
1129,
2066,
363,
278,
15068,
17525,
29889,
13,
9651,
565,
8380,
29918,
2084,
29889,
1975,
2541,
12839,
17765,
29374,
13,
18884,
8380,
29918,
2084,
353,
8380,
29918,
2084,
7503,
29899,
29896,
29962,
13,
13,
9651,
7709,
2897,
29889,
2084,
29889,
2674,
2084,
29898,
23552,
29918,
2084,
29892,
2224,
29897,
13,
13,
1678,
822,
7788,
29918,
1454,
29918,
2084,
29898,
1311,
29892,
2224,
1125,
13,
4706,
9995,
13,
4706,
2391,
310,
10898,
363,
599,
6969,
7788,
1476,
2629,
278,
2183,
13,
4706,
2224,
29889,
13,
4706,
9995,
13,
4706,
363,
3876,
29892,
4516,
7039,
29892,
977,
264,
1280,
297,
2897,
29889,
20919,
29898,
2084,
1125,
13,
9651,
565,
338,
29918,
10892,
29898,
4632,
1125,
13,
18884,
6773,
13,
13,
9651,
396,
18076,
487,
3058,
2066,
297,
18129,
2911,
28914,
29889,
13,
9651,
565,
1583,
29889,
2585,
29918,
4836,
29889,
19033,
29918,
2271,
297,
16999,
29999,
24071,
29909,
29918,
1525,
24815,
29901,
13,
18884,
977,
264,
1280,
353,
518,
29888,
363,
285,
297,
977,
264,
1280,
565,
451,
285,
29889,
1975,
2541,
877,
12803,
29889,
11330,
1495,
29962,
13,
13,
9651,
363,
10422,
297,
977,
264,
1280,
29901,
13,
18884,
565,
338,
29918,
10314,
29898,
9507,
1125,
13,
462,
1678,
7709,
2897,
29889,
2084,
29889,
7122,
29898,
4632,
29892,
10422,
29897,
13,
13,
1678,
822,
1653,
29918,
23337,
29918,
12322,
29898,
1311,
29892,
15068,
29892,
2224,
1125,
13,
4706,
565,
451,
1583,
29889,
2585,
29918,
4836,
29889,
5349,
29918,
9910,
29918,
23337,
29918,
276,
1066,
20106,
29901,
13,
9651,
2752,
29918,
12322,
353,
1583,
29889,
4993,
29918,
12322,
29918,
2084,
580,
13,
9651,
3847,
29918,
12322,
353,
2897,
29889,
2084,
29889,
370,
1028,
493,
29898,
359,
29889,
2084,
29889,
7122,
29898,
4993,
29918,
12322,
29892,
2897,
29889,
29886,
538,
381,
876,
13,
9651,
15068,
29918,
12322,
353,
2897,
29889,
2084,
29889,
7122,
29898,
3560,
29918,
12322,
29892,
15068,
29889,
401,
29889,
6506,
877,
29899,
742,
22868,
8785,
13,
13,
9651,
396,
1152,
16936,
16414,
21971,
29892,
1653,
4069,
4138,
13,
9651,
565,
338,
29918,
294,
962,
16414,
29918,
10314,
29898,
2084,
1125,
13,
18884,
2897,
29889,
29885,
12535,
12935,
29898,
23337,
29918,
12322,
29897,
13,
13,
9651,
396,
1152,
916,
21971,
29892,
3509,
7788,
515,
2752,
3884,
13,
9651,
1683,
29901,
13,
18884,
528,
4422,
29889,
8552,
8336,
29898,
4993,
29918,
12322,
29892,
15068,
29918,
12322,
29897,
13,
13,
18884,
363,
3876,
29892,
4516,
7039,
29892,
977,
264,
1280,
297,
2897,
29889,
20919,
29898,
23337,
29918,
12322,
1125,
13,
462,
1678,
363,
10422,
297,
977,
264,
1280,
29901,
13,
462,
4706,
2224,
353,
2897,
29889,
2084,
29889,
7122,
29898,
4632,
29892,
10422,
29897,
13,
462,
4706,
565,
338,
29918,
10314,
29898,
9507,
1125,
13,
462,
9651,
2897,
29889,
1267,
420,
29898,
2084,
29892,
2752,
29918,
517,
29918,
23337,
29918,
2084,
29898,
2084,
876,
13,
462,
4706,
1683,
29901,
13,
462,
9651,
2897,
29889,
5992,
29898,
2084,
29897,
13,
13,
9651,
736,
15068,
29918,
12322,
13,
13,
4706,
1683,
29901,
13,
9651,
12020,
4750,
292,
3524,
744,
9882,
2392,
29898,
13,
18884,
525,
9882,
363,
15068,
23230,
29900,
10114,
451,
1476,
4286,
4830,
29898,
23337,
29889,
401,
29897,
13,
9651,
1723,
13,
13,
13,
1990,
478,
9295,
6848,
29898,
3318,
1125,
13,
1678,
9995,
1123,
4569,
1237,
263,
2323,
6503,
4822,
2999,
1887,
267,
1213,
15945,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
325,
2395,
29918,
4836,
29892,
2224,
29892,
1887,
267,
29922,
8516,
1125,
13,
4706,
9995,
13,
4706,
16012,
278,
6503,
934,
363,
1269,
9615,
15068,
322,
3787,
967,
13,
4706,
5578,
800,
297,
478,
29907,
1660,
593,
537,
8871,
29889,
13,
4706,
9995,
13,
4706,
515,
282,
10268,
265,
29889,
3188,
29889,
9794,
1053,
5976,
744,
13,
4706,
515,
282,
10268,
265,
29889,
16593,
1053,
21971,
29871,
396,
319,
5405,
19308,
1053,
29889,
13,
13,
4706,
1583,
29889,
29894,
2395,
29918,
4836,
353,
325,
2395,
29918,
4836,
13,
4706,
1583,
29889,
2084,
353,
2224,
13,
4706,
1583,
29889,
2997,
267,
353,
1887,
267,
470,
5159,
13,
4706,
1583,
29889,
5325,
353,
6571,
13,
4706,
1583,
29889,
296,
1907,
353,
6571,
13,
13,
4706,
396,
6204,
16212,
773,
7788,
515,
278,
2752,
3884,
29892,
13,
4706,
2752,
29918,
10314,
29918,
2084,
353,
2897,
29889,
2084,
29889,
7122,
29898,
29894,
2395,
29918,
4836,
29889,
4993,
29918,
12322,
29918,
2084,
3285,
1583,
29889,
2084,
29897,
13,
4706,
2752,
29918,
10314,
29918,
2084,
353,
15068,
29918,
517,
29918,
4993,
29918,
2084,
29898,
4993,
29918,
10314,
29918,
2084,
29897,
13,
4706,
2752,
29918,
10314,
29918,
1445,
353,
21971,
29889,
5510,
29898,
4993,
29918,
10314,
29918,
2084,
29892,
15068,
29922,
3524,
744,
29889,
12650,
29889,
657,
29898,
401,
2433,
264,
29899,
3308,
8785,
13,
4706,
363,
2380,
29892,
13962,
297,
26985,
29898,
4993,
29918,
10314,
29918,
1445,
29889,
3286,
29880,
800,
1125,
13,
9651,
325,
2395,
29918,
10041,
353,
478,
29907,
1660,
593,
537,
29898,
13,
18884,
6503,
29922,
1311,
29892,
13,
18884,
1820,
29922,
3286,
18411,
29889,
1989,
29892,
13,
18884,
1347,
29922,
3286,
18411,
29889,
4993,
29918,
1807,
29892,
13,
18884,
1347,
29918,
572,
3631,
29922,
3286,
18411,
29889,
4993,
29918,
1807,
29918,
572,
3631,
29892,
13,
18884,
6589,
29922,
3286,
18411,
29889,
21032,
29892,
13,
18884,
2752,
29922,
3286,
18411,
29889,
4993,
29892,
13,
18884,
1797,
29922,
3286,
18411,
29889,
2098,
470,
2380,
13,
9651,
1723,
13,
9651,
1583,
29889,
296,
1907,
29961,
29894,
2395,
29918,
10041,
29889,
1989,
29962,
353,
325,
2395,
29918,
10041,
13,
13,
4706,
396,
383,
453,
297,
5578,
800,
515,
278,
15068,
7788,
29889,
13,
4706,
363,
15068,
297,
1887,
267,
29901,
13,
9651,
1018,
29901,
13,
18884,
15068,
29918,
12322,
353,
15068,
29918,
12322,
29918,
2084,
29898,
13,
462,
1678,
325,
2395,
29918,
4836,
29889,
3198,
449,
29918,
2084,
29892,
15068,
29889,
401,
13,
18884,
1723,
13,
13,
9651,
5174,
10663,
2392,
29901,
13,
18884,
15068,
29918,
12322,
353,
1583,
29889,
29894,
2395,
29918,
4836,
29889,
3258,
29918,
23337,
29918,
12322,
29898,
13,
462,
1678,
15068,
29892,
1583,
29889,
2084,
13,
18884,
1723,
13,
13,
9651,
6503,
29918,
2084,
353,
2897,
29889,
2084,
29889,
7122,
29898,
23337,
29918,
12322,
29892,
1583,
29889,
2084,
29897,
13,
9651,
1480,
29889,
8382,
877,
29925,
1503,
292,
6503,
934,
29901,
1273,
29879,
742,
6503,
29918,
2084,
29897,
13,
13,
9651,
1018,
29901,
13,
18884,
6503,
29918,
1445,
353,
21971,
29889,
5510,
29898,
10314,
29918,
2084,
29892,
2752,
29918,
10314,
29918,
2084,
29892,
15068,
29897,
13,
9651,
5174,
313,
5971,
2392,
29892,
20969,
2392,
1125,
13,
18884,
6773,
29871,
396,
3497,
1838,
29915,
29873,
1863,
470,
338,
8340,
29892,
1235,
29915,
29879,
4337,
373,
13,
13,
9651,
1583,
29889,
5325,
29961,
23337,
29962,
353,
6503,
29918,
1445,
13,
13,
9651,
1480,
29889,
8382,
877,
4205,
11911,
287,
1273,
29879,
5578,
800,
29889,
742,
7431,
29898,
10314,
29918,
1445,
29889,
3286,
29880,
800,
876,
13,
13,
9651,
363,
13962,
297,
6503,
29918,
1445,
29889,
3286,
29880,
800,
29901,
13,
18884,
1018,
29901,
13,
462,
1678,
1583,
29889,
296,
1907,
29961,
3286,
18411,
29889,
1989,
1822,
3286,
29880,
800,
29961,
23337,
29889,
401,
29962,
353,
13962,
13,
18884,
5174,
7670,
2392,
29901,
13,
462,
1678,
396,
960,
278,
2752,
338,
4567,
385,
7855,
29892,
591,
2050,
372,
13,
462,
1678,
396,
11132,
322,
1016,
29915,
29873,
788,
372,
29889,
13,
462,
1678,
1209,
13,
13,
1678,
822,
4078,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
16913,
3620,
1754,
304,
738,
310,
278,
5578,
800,
297,
445,
6503,
13,
4706,
1250,
304,
278,
22101,
363,
599,
1887,
267,
29889,
13,
4706,
9995,
13,
4706,
363,
15068,
29892,
6503,
29918,
1445,
297,
1583,
29889,
5325,
29889,
7076,
7295,
13,
9651,
6503,
29918,
1445,
29889,
7620,
29898,
23337,
29897,
13,
13,
13,
1990,
478,
29907,
1660,
593,
537,
29898,
3318,
1125,
13,
1678,
9995,
13,
1678,
530,
14945,
338,
263,
2323,
1347,
304,
367,
20512,
29892,
322,
263,
478,
29907,
1660,
593,
537,
13,
1678,
14422,
278,
5578,
800,
363,
385,
7855,
515,
3196,
1887,
267,
29889,
13,
1678,
9995,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
6503,
29892,
1820,
29892,
1347,
29892,
6589,
29892,
2752,
29892,
1347,
29918,
572,
3631,
2433,
742,
13,
462,
1797,
29922,
29900,
1125,
13,
4706,
1583,
29889,
10314,
353,
6503,
13,
4706,
1583,
29889,
1989,
353,
1820,
13,
4706,
1583,
29889,
1807,
353,
1347,
13,
4706,
1583,
29889,
1807,
29918,
572,
3631,
353,
1347,
29918,
572,
3631,
13,
4706,
1583,
29889,
3286,
29880,
800,
353,
6571,
13,
4706,
1583,
29889,
21032,
353,
6589,
13,
4706,
1583,
29889,
4993,
353,
2752,
13,
4706,
1583,
29889,
2098,
353,
1797,
13,
13,
1678,
822,
756,
29918,
3286,
18411,
29918,
1454,
29898,
1311,
29892,
15068,
29918,
401,
1125,
13,
4706,
9995,
11609,
5852,
565,
263,
13962,
4864,
363,
278,
2183,
15068,
1213,
15945,
13,
4706,
736,
15068,
29918,
401,
297,
1583,
29889,
3286,
29880,
800,
13,
13,
13,
1990,
478,
29907,
1254,
29878,
550,
18411,
29898,
3318,
1125,
13,
1678,
9995,
13,
1678,
319,
2323,
13962,
310,
263,
2752,
1347,
964,
1790,
4086,
29889,
13,
13,
1678,
4001,
263,
1347,
508,
505,
1422,
5578,
800,
2729,
373,
715,
3631,
13,
1678,
7190,
29892,
599,
310,
278,
1422,
7190,
526,
6087,
1090,
1583,
29889,
19651,
29892,
263,
13,
1678,
9657,
988,
278,
6611,
5186,
1950,
1819,
363,
13,
1678,
282,
10268,
265,
29889,
3188,
29889,
9794,
29889,
4300,
18411,
29889,
572,
3631,
29918,
689,
322,
278,
1819,
5186,
278,
13,
1678,
13962,
363,
393,
715,
3631,
883,
29889,
13,
1678,
9995,
13,
1678,
822,
4770,
2344,
12035,
13,
4706,
1583,
29892,
1820,
29892,
6031,
29892,
6589,
29892,
285,
3365,
1537,
29892,
13,
4706,
2752,
29918,
1807,
2433,
742,
13,
4706,
2752,
29918,
1807,
29918,
572,
3631,
2433,
742,
13,
4706,
1797,
29922,
29900,
29892,
13,
4706,
2752,
29922,
8516,
29892,
13,
4706,
1833,
29918,
3286,
29880,
1061,
29922,
8516,
29892,
13,
4706,
1833,
29918,
21402,
29922,
8516,
13,
268,
1125,
13,
4706,
1583,
29889,
1989,
353,
1820,
13,
4706,
1583,
29889,
4993,
29918,
1807,
353,
2752,
29918,
1807,
13,
4706,
1583,
29889,
4993,
29918,
1807,
29918,
572,
3631,
353,
2752,
29918,
1807,
29918,
572,
3631,
13,
4706,
1583,
29889,
19651,
353,
6031,
13,
4706,
1583,
29889,
21032,
353,
6589,
13,
4706,
1583,
29889,
29888,
3365,
1537,
353,
285,
3365,
1537,
13,
4706,
1583,
29889,
2098,
353,
1797,
13,
4706,
1583,
29889,
4993,
353,
2752,
470,
5159,
13,
4706,
1583,
29889,
4230,
29918,
3286,
29880,
1061,
353,
1833,
29918,
3286,
29880,
1061,
13,
4706,
1583,
29889,
4230,
29918,
21402,
353,
1833,
29918,
21402,
13,
13,
1678,
732,
6799,
13,
1678,
822,
4805,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
7106,
263,
9657,
310,
2888,
4426,
304,
3787,
297,
278,
2566,
29889,
13,
4706,
4803,
1319,
363,
1014,
13203,
515,
2702,
21971,
393,
505,
4805,
848,
13,
4706,
393,
4225,
304,
367,
21634,
29889,
13,
4706,
9995,
13,
4706,
736,
6571,
13,
13,
1678,
822,
2767,
29918,
3166,
29918,
2585,
29898,
1311,
29892,
4833,
29918,
3286,
29880,
800,
1125,
13,
4706,
9995,
13,
4706,
10318,
13962,
411,
1857,
6535,
2106,
29889,
13,
4706,
9995,
13,
4706,
396,
960,
694,
6535,
5578,
800,
526,
285,
3365,
1537,
29892,
731,
285,
3365,
1537,
304,
7700,
29889,
13,
4706,
396,
13466,
29892,
372,
29915,
29879,
1565,
29889,
13,
4706,
1583,
29889,
29888,
3365,
1537,
353,
738,
29898,
29873,
363,
260,
297,
4833,
29918,
3286,
29880,
800,
565,
260,
29889,
29888,
3365,
1537,
29897,
13,
13,
4706,
565,
7431,
29898,
2585,
29918,
3286,
29880,
800,
29897,
1405,
29871,
29900,
29901,
13,
9651,
1833,
29918,
3286,
18411,
353,
4236,
29898,
13,
18884,
4833,
29918,
3286,
29880,
800,
29892,
13,
18884,
1820,
29922,
2892,
260,
29901,
260,
29889,
1256,
470,
29431,
29889,
5675,
29918,
28327,
29898,
12673,
29889,
1195,
29897,
13,
9651,
1723,
13,
9651,
1583,
29889,
4230,
29918,
21402,
353,
1833,
29918,
3286,
18411,
29889,
1256,
13,
9651,
1583,
29889,
4230,
29918,
3286,
29880,
1061,
353,
1833,
29918,
3286,
18411,
29889,
1792,
13,
13,
4706,
396,
22108,
5923,
5578,
800,
411,
6743,
515,
278,
2566,
29889,
13,
4706,
1583,
29889,
19651,
353,
426,
13,
9651,
4833,
29889,
572,
3631,
29918,
689,
29901,
4833,
29889,
1807,
363,
4833,
297,
4833,
29918,
3286,
29880,
800,
13,
4706,
500,
13,
2
] |
add_code_of_conduct.py | PeterEltgroth/repo-bulk-deprecate | 1 | 172326 | import os
import subprocess
import os.path
from gql import gql, Client
from gql.transport.requests import RequestsHTTPTransport
working_dir = "/tmp/the-great-archiving"
ORG = "cf-platform-eng"
def run_command(cmd, dir=None):
p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True, cwd=dir)
out, err = p.communicate()
if p.returncode != 0:
print("Failed running command:")
print(cmd)
print(out.decode('utf8'))
print(err.decode('utf8'))
raise Exception("Failed running command")
return out.decode('utf8')
def main():
token = os.environ.get("ACCESS_TOKEN", None)
if not token:
raise Exception("Token environment variable is required")
reqHeaders = {
'Authorization': 'Bearer ' + token
}
transport = RequestsHTTPTransport(
url="https://api.github.com/graphql",
headers=reqHeaders,
use_json=True,
)
client = Client(transport=transport, fetch_schema_from_transport=True)
get_id_query = """
{{
search(query: "org:{} is:public archived:false", type: REPOSITORY, first: 100) {{
repositoryCount
edges {{
node {{
... on Repository {{
id
name
isArchived
isPrivate
owner {{
id
login
}}
codeOfConduct {{
key
name
url
}}
}}
}}
}}
}}
}}
""".format(ORG)
# List of public, non-archived repos
result = client.execute(gql(get_id_query))
print(result, "\n\n")
print(result["search"]["edges"], "\n\n")
with open("CODE-OF-CONDUCT.md") as conduct_file:
code_of_conduct = conduct_file.read()
for repo in result["search"]["edges"]:
print(repo)
# Build repo name
repo_name = repo["node"]["name"]
# run_command("git clone http://github.com/{}/{}".format(ORG, repo_name), working_dir)
run_command("git clone <EMAIL>:{}/{}".format(ORG, repo_name), working_dir)
conduct_name = "CODE-OF-CONDUCT.md"
repo_path = os.path.join(working_dir, repo_name)
conduct_path = os.path.join(repo_path, conduct_name)
conduct_exists = os.path.isfile(conduct_path)
if not conduct_exists:
print("Adding license to {}".format(repo_name))
with open(conduct_path, 'w') as code_of_conduct_file:
code_of_conduct_file.write(code_of_conduct)
# commit locally
print(run_command("git add {}".format(conduct_name), repo_path))
print(run_command("git commit -m 'Add license {}'".format(conduct_name), repo_path))
# push
print(run_command("git push", repo_path))
# os.sys.exit(0)
if __name__ == '__main__':
main()
| [
1,
1053,
2897,
13,
5215,
1014,
5014,
13,
5215,
2897,
29889,
2084,
13,
13,
3166,
330,
1519,
1053,
330,
1519,
29892,
12477,
13,
3166,
330,
1519,
29889,
27882,
29889,
24830,
1053,
10729,
29879,
10493,
27395,
13,
13,
22899,
29918,
3972,
353,
5591,
7050,
29914,
1552,
29899,
7979,
271,
29899,
1279,
4357,
29908,
13,
1955,
29954,
353,
376,
6854,
29899,
12120,
29899,
996,
29908,
13,
13,
1753,
1065,
29918,
6519,
29898,
9006,
29892,
4516,
29922,
8516,
1125,
13,
1678,
282,
353,
1014,
5014,
29889,
29925,
3150,
29898,
9006,
29892,
27591,
29922,
1491,
5014,
29889,
2227,
4162,
29892,
380,
20405,
29922,
1491,
5014,
29889,
2227,
4162,
29892,
6473,
29922,
5574,
29892,
274,
9970,
29922,
3972,
29897,
13,
1678,
714,
29892,
4589,
353,
282,
29889,
27820,
403,
580,
13,
1678,
565,
282,
29889,
2457,
401,
2804,
29871,
29900,
29901,
13,
4706,
1596,
703,
17776,
2734,
1899,
29901,
1159,
13,
4706,
1596,
29898,
9006,
29897,
13,
4706,
1596,
29898,
449,
29889,
13808,
877,
9420,
29947,
8785,
13,
4706,
1596,
29898,
3127,
29889,
13808,
877,
9420,
29947,
8785,
13,
4706,
12020,
8960,
703,
17776,
2734,
1899,
1159,
13,
13,
1678,
736,
714,
29889,
13808,
877,
9420,
29947,
1495,
13,
13,
1753,
1667,
7295,
13,
1678,
5993,
353,
2897,
29889,
21813,
29889,
657,
703,
2477,
23524,
29918,
4986,
29968,
1430,
613,
6213,
29897,
13,
1678,
565,
451,
5993,
29901,
13,
4706,
12020,
8960,
703,
6066,
5177,
2286,
338,
3734,
1159,
13,
13,
1678,
12428,
18163,
353,
426,
13,
4706,
525,
25471,
2396,
525,
29933,
799,
261,
525,
718,
5993,
13,
1678,
500,
13,
13,
1678,
8608,
353,
10729,
29879,
10493,
27395,
29898,
13,
4706,
3142,
543,
991,
597,
2754,
29889,
3292,
29889,
510,
29914,
4262,
1519,
613,
13,
4706,
9066,
29922,
7971,
18163,
29892,
13,
4706,
671,
29918,
3126,
29922,
5574,
29892,
13,
1678,
1723,
13,
1678,
3132,
353,
12477,
29898,
27882,
29922,
27882,
29892,
6699,
29918,
11010,
29918,
3166,
29918,
27882,
29922,
5574,
29897,
13,
13,
1678,
679,
29918,
333,
29918,
1972,
353,
9995,
13,
4706,
8620,
13,
3986,
2740,
29898,
1972,
29901,
376,
990,
29901,
8875,
338,
29901,
3597,
3190,
2347,
29901,
4541,
613,
1134,
29901,
5195,
24815,
1806,
18929,
29892,
937,
29901,
29871,
29896,
29900,
29900,
29897,
8620,
13,
9651,
9810,
3981,
13,
9651,
12770,
8620,
13,
795,
2943,
8620,
13,
18884,
2023,
373,
830,
7036,
8620,
13,
462,
29871,
1178,
13,
462,
29871,
1024,
13,
462,
29871,
338,
13197,
2347,
13,
462,
29871,
338,
25207,
13,
462,
29871,
12271,
8620,
13,
462,
1678,
1178,
13,
462,
1678,
6464,
13,
462,
29871,
9156,
13,
462,
29871,
775,
2776,
1168,
2199,
8620,
13,
462,
1678,
1820,
13,
462,
1678,
1024,
13,
462,
1678,
3142,
13,
462,
29871,
9156,
13,
18884,
9156,
13,
795,
9156,
13,
9651,
9156,
13,
3986,
9156,
13,
4706,
9156,
13,
1678,
5124,
1642,
4830,
29898,
1955,
29954,
29897,
13,
13,
1678,
396,
2391,
310,
970,
29892,
1661,
29899,
1279,
2347,
17573,
13,
1678,
1121,
353,
3132,
29889,
7978,
29898,
29887,
1519,
29898,
657,
29918,
333,
29918,
1972,
876,
13,
1678,
1596,
29898,
2914,
29892,
6634,
29876,
29905,
29876,
1159,
13,
1678,
1596,
29898,
2914,
3366,
4478,
3108,
3366,
287,
2710,
12436,
6634,
29876,
29905,
29876,
1159,
13,
13,
1678,
411,
1722,
703,
16524,
29899,
9800,
29899,
6007,
14849,
1783,
29889,
3487,
1159,
408,
7512,
29918,
1445,
29901,
13,
4706,
775,
29918,
974,
29918,
535,
2199,
353,
7512,
29918,
1445,
29889,
949,
580,
13,
13,
1678,
363,
13761,
297,
1121,
3366,
4478,
3108,
3366,
287,
2710,
3108,
29901,
13,
4706,
1596,
29898,
20095,
29897,
13,
13,
4706,
396,
8878,
13761,
1024,
13,
4706,
13761,
29918,
978,
353,
13761,
3366,
3177,
3108,
3366,
978,
3108,
13,
4706,
396,
1065,
29918,
6519,
703,
5559,
17432,
1732,
597,
3292,
29889,
510,
19248,
6822,
8875,
1642,
4830,
29898,
1955,
29954,
29892,
13761,
29918,
978,
511,
1985,
29918,
3972,
29897,
13,
4706,
1065,
29918,
6519,
703,
5559,
17432,
529,
26862,
6227,
23917,
29912,
6822,
8875,
1642,
4830,
29898,
1955,
29954,
29892,
13761,
29918,
978,
511,
1985,
29918,
3972,
29897,
13,
13,
4706,
7512,
29918,
978,
353,
376,
16524,
29899,
9800,
29899,
6007,
14849,
1783,
29889,
3487,
29908,
13,
4706,
13761,
29918,
2084,
353,
2897,
29889,
2084,
29889,
7122,
29898,
22899,
29918,
3972,
29892,
13761,
29918,
978,
29897,
13,
4706,
7512,
29918,
2084,
353,
2897,
29889,
2084,
29889,
7122,
29898,
20095,
29918,
2084,
29892,
7512,
29918,
978,
29897,
13,
4706,
7512,
29918,
9933,
353,
2897,
29889,
2084,
29889,
275,
1445,
29898,
535,
2199,
29918,
2084,
29897,
13,
13,
4706,
565,
451,
7512,
29918,
9933,
29901,
13,
9651,
1596,
703,
2528,
292,
19405,
304,
6571,
1642,
4830,
29898,
20095,
29918,
978,
876,
13,
9651,
411,
1722,
29898,
535,
2199,
29918,
2084,
29892,
525,
29893,
1495,
408,
775,
29918,
974,
29918,
535,
2199,
29918,
1445,
29901,
13,
18884,
775,
29918,
974,
29918,
535,
2199,
29918,
1445,
29889,
3539,
29898,
401,
29918,
974,
29918,
535,
2199,
29897,
13,
13,
9651,
396,
9063,
12430,
13,
9651,
1596,
29898,
3389,
29918,
6519,
703,
5559,
788,
6571,
1642,
4830,
29898,
535,
2199,
29918,
978,
511,
13761,
29918,
2084,
876,
13,
9651,
1596,
29898,
3389,
29918,
6519,
703,
5559,
9063,
448,
29885,
525,
2528,
19405,
6571,
29915,
1642,
4830,
29898,
535,
2199,
29918,
978,
511,
13761,
29918,
2084,
876,
13,
13,
9651,
396,
5503,
13,
9651,
1596,
29898,
3389,
29918,
6519,
703,
5559,
5503,
613,
13761,
29918,
2084,
876,
13,
13,
9651,
396,
2897,
29889,
9675,
29889,
13322,
29898,
29900,
29897,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
1667,
580,
13,
2
] |
shell_args_generator/arg_builder/man_builder/ManUsageHandler.py | FyodorovAleksej/shell_args_generator | 0 | 62329 | from shell_args_generator.arg_builder.AbstractBuilderHandler import AbstractBuilderHandler
from shell_args_generator.arg_parser.arg_entity import Argument
class ManUsageHandler(AbstractBuilderHandler):
def __init__(self, __handle_pattern: str, __props: dict):
super().__init__(__handle_pattern, __props)
def replace_pattern(self, __argument: Argument):
options = __argument.get_options()
res = ""
if options is not None:
if len(options) == 1:
res += "[<" + options[0][0] + "> " + options[0][1] + "]"
elif len(options) > 1:
temp = []
res += "["
for option in options:
temp.append("<" + option[0] + "> " + option[1])
res += ", ".join(temp) + "]"
return res
| [
1,
515,
6473,
29918,
5085,
29918,
27959,
29889,
1191,
29918,
16409,
29889,
9118,
5627,
4598,
1053,
25513,
5627,
4598,
13,
3166,
6473,
29918,
5085,
29918,
27959,
29889,
1191,
29918,
16680,
29889,
1191,
29918,
10041,
1053,
23125,
13,
13,
13,
1990,
2315,
27573,
4598,
29898,
9118,
5627,
4598,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
4770,
8411,
29918,
11037,
29901,
851,
29892,
4770,
11030,
29901,
9657,
1125,
13,
4706,
2428,
2141,
1649,
2344,
12035,
1649,
8411,
29918,
11037,
29892,
4770,
11030,
29897,
13,
13,
1678,
822,
5191,
29918,
11037,
29898,
1311,
29892,
4770,
23516,
29901,
23125,
1125,
13,
4706,
3987,
353,
4770,
23516,
29889,
657,
29918,
6768,
580,
13,
4706,
620,
353,
5124,
13,
4706,
565,
3987,
338,
451,
6213,
29901,
13,
9651,
565,
7431,
29898,
6768,
29897,
1275,
29871,
29896,
29901,
13,
18884,
620,
4619,
14704,
29966,
29908,
718,
3987,
29961,
29900,
3816,
29900,
29962,
718,
376,
29958,
376,
718,
3987,
29961,
29900,
3816,
29896,
29962,
718,
376,
18017,
13,
9651,
25342,
7431,
29898,
6768,
29897,
1405,
29871,
29896,
29901,
13,
18884,
5694,
353,
5159,
13,
18884,
620,
4619,
376,
3366,
13,
18884,
363,
2984,
297,
3987,
29901,
13,
462,
1678,
5694,
29889,
4397,
28945,
29908,
718,
2984,
29961,
29900,
29962,
718,
376,
29958,
376,
718,
2984,
29961,
29896,
2314,
13,
18884,
620,
4619,
9162,
11393,
7122,
29898,
7382,
29897,
718,
376,
18017,
13,
4706,
736,
620,
13,
2
] |
examples/example.py | f-dangel/unfoldNd | 21 | 4461 | <gh_stars>10-100
"""How to use ``unfoldNd``. A comparison with ``torch.nn.Unfold``."""
# imports, make this example deterministic
import torch
import unfoldNd
torch.manual_seed(0)
# random batched RGB 32x32 image-shaped input tensor of batch size 64
inputs = torch.randn((64, 3, 32, 32))
# module hyperparameters
kernel_size = 3
dilation = 1
padding = 1
stride = 2
# both modules accept the same arguments and perform the same operation
torch_module = torch.nn.Unfold(
kernel_size, dilation=dilation, padding=padding, stride=stride
)
lib_module = unfoldNd.UnfoldNd(
kernel_size, dilation=dilation, padding=padding, stride=stride
)
# forward pass
torch_outputs = torch_module(inputs)
lib_outputs = lib_module(inputs)
# check
if torch.allclose(torch_outputs, lib_outputs):
print("✔ Outputs of torch.nn.Unfold and unfoldNd.UnfoldNd match.")
else:
raise AssertionError("❌ Outputs don't match")
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
15945,
29908,
5328,
304,
671,
4954,
348,
8771,
29940,
29881,
29952,
1412,
319,
10230,
411,
4954,
7345,
305,
29889,
15755,
29889,
2525,
8771,
16159,
1213,
15945,
13,
13,
29937,
24802,
29892,
1207,
445,
1342,
11806,
4695,
13,
5215,
4842,
305,
13,
13,
5215,
20220,
29940,
29881,
13,
13,
7345,
305,
29889,
11288,
29918,
26776,
29898,
29900,
29897,
13,
13,
29937,
4036,
9853,
287,
390,
7210,
29871,
29941,
29906,
29916,
29941,
29906,
1967,
29899,
845,
10501,
1881,
12489,
310,
9853,
2159,
29871,
29953,
29946,
13,
2080,
29879,
353,
4842,
305,
29889,
9502,
29876,
3552,
29953,
29946,
29892,
29871,
29941,
29892,
29871,
29941,
29906,
29892,
29871,
29941,
29906,
876,
13,
13,
29937,
3883,
11266,
16744,
13,
17460,
29918,
2311,
353,
29871,
29941,
13,
29881,
8634,
353,
29871,
29896,
13,
12791,
353,
29871,
29896,
13,
303,
2426,
353,
29871,
29906,
13,
13,
29937,
1716,
10585,
3544,
278,
1021,
6273,
322,
2189,
278,
1021,
5858,
13,
7345,
305,
29918,
5453,
353,
4842,
305,
29889,
15755,
29889,
2525,
8771,
29898,
13,
1678,
8466,
29918,
2311,
29892,
270,
8634,
29922,
29881,
8634,
29892,
7164,
29922,
12791,
29892,
380,
2426,
29922,
303,
2426,
13,
29897,
13,
1982,
29918,
5453,
353,
20220,
29940,
29881,
29889,
2525,
8771,
29940,
29881,
29898,
13,
1678,
8466,
29918,
2311,
29892,
270,
8634,
29922,
29881,
8634,
29892,
7164,
29922,
12791,
29892,
380,
2426,
29922,
303,
2426,
13,
29897,
13,
13,
29937,
6375,
1209,
13,
7345,
305,
29918,
4905,
29879,
353,
4842,
305,
29918,
5453,
29898,
2080,
29879,
29897,
13,
1982,
29918,
4905,
29879,
353,
4303,
29918,
5453,
29898,
2080,
29879,
29897,
13,
13,
29937,
1423,
13,
361,
4842,
305,
29889,
497,
5358,
29898,
7345,
305,
29918,
4905,
29879,
29892,
4303,
29918,
4905,
29879,
1125,
13,
1678,
1596,
703,
30973,
10604,
29879,
310,
4842,
305,
29889,
15755,
29889,
2525,
8771,
322,
20220,
29940,
29881,
29889,
2525,
8771,
29940,
29881,
1993,
23157,
13,
2870,
29901,
13,
1678,
12020,
16499,
291,
2392,
703,
229,
160,
143,
10604,
29879,
1016,
29915,
29873,
1993,
1159,
13,
2
] |
malon_lp/malon_lp/admin/json_encoder.py | pucarasec/Build-C2-RedTeam-Course | 9 | 70491 | import json
from datetime import datetime
from base64 import b64encode
from sqlalchemy.ext.declarative import DeclarativeMeta
def to_camel_case(s: str) -> str:
return ''.join(map(str.capitalize, s.split('_')))
class BaseEncoder(json.JSONEncoder):
def default(self, obj):
if type(obj) == datetime:
return obj.isoformat()
elif type(obj) == bytes:
return b64encode(obj).decode('utf-8')
else:
return super().default(obj)
class SQLAlchemyEncoder(BaseEncoder):
def default(self, obj):
if isinstance(obj.__class__, DeclarativeMeta):
fields = {}
for column in obj.__class__.__table__.columns:
data = obj.__getattribute__(column.name)
field = column.name
try:
json.dumps(data, cls=SQLAlchemyEncoder)
fields[field] = data
except TypeError:
fields[field] = None
return fields
else:
return super().default(obj)
| [
1,
1053,
4390,
13,
3166,
12865,
1053,
12865,
13,
3166,
2967,
29953,
29946,
1053,
289,
29953,
29946,
12508,
13,
3166,
4576,
284,
305,
6764,
29889,
1062,
29889,
311,
16544,
1230,
1053,
3826,
4675,
1230,
19346,
13,
13,
13,
1753,
304,
29918,
11108,
295,
29918,
4878,
29898,
29879,
29901,
851,
29897,
1599,
851,
29901,
13,
1678,
736,
525,
4286,
7122,
29898,
1958,
29898,
710,
29889,
5030,
2410,
675,
29892,
269,
29889,
5451,
877,
29918,
29915,
4961,
13,
13,
13,
1990,
7399,
8566,
6119,
29898,
3126,
29889,
7249,
8566,
6119,
1125,
13,
1678,
822,
2322,
29898,
1311,
29892,
5446,
1125,
13,
4706,
565,
1134,
29898,
5415,
29897,
1275,
12865,
29901,
13,
9651,
736,
5446,
29889,
10718,
4830,
580,
13,
4706,
25342,
1134,
29898,
5415,
29897,
1275,
6262,
29901,
13,
9651,
736,
289,
29953,
29946,
12508,
29898,
5415,
467,
13808,
877,
9420,
29899,
29947,
1495,
13,
4706,
1683,
29901,
13,
9651,
736,
2428,
2141,
4381,
29898,
5415,
29897,
13,
13,
13,
1990,
3758,
2499,
305,
6764,
8566,
6119,
29898,
5160,
8566,
6119,
1125,
13,
1678,
822,
2322,
29898,
1311,
29892,
5446,
1125,
13,
4706,
565,
338,
8758,
29898,
5415,
17255,
1990,
1649,
29892,
3826,
4675,
1230,
19346,
1125,
13,
9651,
4235,
353,
6571,
13,
9651,
363,
1897,
297,
5446,
17255,
1990,
1649,
17255,
2371,
26914,
13099,
29901,
13,
18884,
848,
353,
5446,
17255,
657,
12715,
12035,
4914,
29889,
978,
29897,
13,
18884,
1746,
353,
1897,
29889,
978,
13,
18884,
1018,
29901,
13,
462,
1678,
4390,
29889,
29881,
17204,
29898,
1272,
29892,
1067,
29879,
29922,
4176,
2499,
305,
6764,
8566,
6119,
29897,
13,
462,
1678,
4235,
29961,
2671,
29962,
353,
848,
13,
18884,
5174,
20948,
29901,
13,
462,
1678,
4235,
29961,
2671,
29962,
353,
6213,
13,
13,
9651,
736,
4235,
13,
4706,
1683,
29901,
13,
9651,
736,
2428,
2141,
4381,
29898,
5415,
29897,
13,
2
] |
servicelog/urls.py | rickvanderzwet/makerspaceleiden-crm | 0 | 156087 | <reponame>rickvanderzwet/makerspaceleiden-crm
from django.urls import path
from django.contrib.auth import views as auth_views
from . import views
urlpatterns = [
path('crud/<int:machine_id>/<int:servicelog_id>', views.servicelog_crud, name='service_log_crud'),
path('crud/<int:machine_id>', views.servicelog_crud, name='service_log_crud'),
path('<int:machine_id>', views.servicelog_overview, name='service_log_view'),
path('', views.servicelog_overview, name='service_log'),
]
| [
1,
529,
276,
1112,
420,
29958,
9131,
29894,
3825,
7659,
300,
29914,
29885,
21079,
3535,
280,
3615,
29899,
29883,
1758,
13,
3166,
9557,
29889,
26045,
1053,
2224,
13,
3166,
9557,
29889,
21570,
29889,
5150,
1053,
8386,
408,
4817,
29918,
7406,
13,
13,
3166,
869,
1053,
8386,
13,
13,
2271,
11037,
29879,
353,
518,
13,
1678,
2224,
877,
7283,
566,
29914,
29966,
524,
29901,
23523,
29918,
333,
20690,
29966,
524,
29901,
2140,
293,
295,
468,
29918,
333,
29958,
742,
8386,
29889,
2140,
293,
295,
468,
29918,
7283,
566,
29892,
1024,
2433,
5509,
29918,
1188,
29918,
7283,
566,
5477,
13,
1678,
2224,
877,
7283,
566,
29914,
29966,
524,
29901,
23523,
29918,
333,
29958,
742,
8386,
29889,
2140,
293,
295,
468,
29918,
7283,
566,
29892,
1024,
2433,
5509,
29918,
1188,
29918,
7283,
566,
5477,
13,
1678,
2224,
877,
29966,
524,
29901,
23523,
29918,
333,
29958,
742,
8386,
29889,
2140,
293,
295,
468,
29918,
957,
1493,
29892,
1024,
2433,
5509,
29918,
1188,
29918,
1493,
5477,
13,
1678,
2224,
877,
742,
8386,
29889,
2140,
293,
295,
468,
29918,
957,
1493,
29892,
1024,
2433,
5509,
29918,
1188,
5477,
13,
29962,
13,
2
] |
alchemist/db/model.py | movermeyer/alchemist | 4 | 175246 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import, division
from alchemist.db import session
from alchemist.conf import settings
from importlib import import_module
from alchemist.db.query import Query
from sqlalchemy.orm.util import has_identity
from sqlalchemy.ext.declarative import clsregistry
from sqlalchemy.ext.declarative import declared_attr, DeclarativeMeta, base
import sqlalchemy as sa
import weakref
import re
import six
import warnings
def _component_of(name):
"""Get the root package or module of the passed module.
"""
# Get the registered package this model belongs to.
segments = name.split('.')
while segments:
# Is this name a registered package?
test = '.'.join(segments)
if test in settings.get('COMPONENTS', []):
# This is the component we are in.
return test
# Remove the right-most segment.
segments.pop()
if not segments and '.models' in name:
# No package was found to be registered; attempt to guess the
# right package name; strip all occurrances of '.models' from the
# pacakge name.
return _component_of(name.replace('.models', ''))
#! Global model metadata.
_metadata = sa.MetaData()
#! Componentized model metadata.
_metadata_map = {}
#! Componentized declarative class registries.
_registry_map = {}
def _is_model(name, bases, attrs):
if name == 'NewBase' and not attrs and not bases:
# Six contrivance; ensure we skip it.
attrs['__abstract__'] = True
return False
for base in bases:
if (base.__module__.startswith('alchemist.db.model')
and base.__name__ == 'NewBase'):
# This is an internal utility to alchemist.
continue
if isinstance(base, ModelBase):
# This is at least dervied at some point from Model.
return True
# This is the base class, Model.
return False
class ModelBaseProxy(type):
def __new__(cls, name, bases, attrs):
# Resolve the metaclass we should be derived from.
meta_name = settings['MODEL_METACLASS']
segs = meta_name.split('.')
meta = getattr(import_module('.'.join(segs[:-1])), segs[-1])
if not issubclass(bases[0], meta):
bases = meta,
return super(ModelBaseProxy, cls).__new__(cls, name, bases, attrs)
class ModelBase(six.with_metaclass(ModelBaseProxy, type)):
"""The metaclass for user-defined models.
The basic concept is as follows: every model declared in a registered
component shares the same underlying declarative base. Every model
declared outside a registered component gets its own declarative base.
A model is considered declared inside a component whether that be directly
or nested in a sub-package.
"""
#! The query class used. The query property returns an instance of this
#! class.
__query__ = Query
#! The component this model belongs to.
_component = None
#! A reference to the declarative class registry if the model is
#! in a registered component.
__registry = None
@property
def query(self):
"""
Create a session query over this model. ::
Model.query.all()
Equivalent to ::
from alchemist.db import session
session.query(Model).all()
"""
return session.query(self)
@property
def _decl_class_registry(self):
return getattr(self, '_ModelBase__registry', None)
def __new__(cls, name, bases, attrs):
# Don't process further if this is not a model (ie. the base class).
if not _is_model(name, bases, attrs):
return super(ModelBase, cls).__new__(cls, name, bases, attrs)
# Default `extend_existing`
if "__table_args__" not in attrs:
attrs["__table_args__"] = ()
attrs["__table_args__"] = attrs["__table_args__"] + (
{"extend_existing": True},)
# Check if this model is in a registered component and set its
# declarative registry and metadata to share the global if so; else,
# generate its own.
attrs['_component'] = component = _component_of(attrs['__module__'])
if component:
if component not in _registry_map:
_registry_map[component] = weakref.WeakValueDictionary()
attrs['_ModelBase__registry'] = _registry_map[component]
attrs['metadata'] = _metadata
else:
attrs['_ModelBase__registry'] = weakref.WeakValueDictionary()
attrs['metadata'] = sa.MetaData()
return super(ModelBase, cls).__new__(cls, name, bases, attrs)
def __init__(self, name, bases, attrs):
# Initialize ourself.
super(ModelBase, self).__init__(name, bases, attrs)
# Just short-circuit if we're that six contraption, NewBase.
if self.__module__ == 'alchemist.db.model' and name == 'NewBase':
return
abstract = attrs.get('__abstract__', False)
if _is_model(name, bases, attrs) and not abstract:
# Add a reference to the model on the table.
table = self.__table__
setattr(table, 'class_', weakref.proxy(self))
# Add ourself to the componetized metadata.
if self._component:
if self._component not in _metadata_map:
_metadata_map[self._component] = sa.MetaData()
_metadata_map[self._component]._add_table(
table.name,
_metadata.tables[table.name].schema or _metadata.schema,
table)
class Model(six.with_metaclass(ModelBase)):
__abstract__ = True
__init__ = base._declarative_constructor
@declared_attr
def __tablename__(cls):
"""
Underscorizes the class name combined with the pacakge name in order
to form a normal name for a table in SQL.
"""
component = cls._component
name = '%s.%s' % (component, cls.__name__.lower())
name = re.sub(r'([A-Z])', r'_\1', name)
name = re.sub(r'\.+', r'_', name)
return name
def save(self, commit=False):
"""Save the changes to the model.
If the model has not been persisted
then it adds the model to the declared session. Then it flushes the
object session and optionally commits it.
"""
if not has_identity(self):
# Object has not been persisted to the database.
session.add(self)
if commit:
# Commit the session as requested.
session.commit()
else:
# Just flush the session; do not commit.
session.flush()
| [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
3166,
4770,
29888,
9130,
1649,
1053,
29104,
29918,
20889,
1338,
29892,
8380,
29918,
5215,
29892,
8542,
13,
3166,
394,
14969,
391,
29889,
2585,
1053,
4867,
13,
3166,
394,
14969,
391,
29889,
5527,
1053,
6055,
13,
3166,
1053,
1982,
1053,
1053,
29918,
5453,
13,
3166,
394,
14969,
391,
29889,
2585,
29889,
1972,
1053,
13641,
13,
3166,
4576,
284,
305,
6764,
29889,
555,
29889,
4422,
1053,
756,
29918,
22350,
13,
3166,
4576,
284,
305,
6764,
29889,
1062,
29889,
311,
16544,
1230,
1053,
1067,
29879,
1727,
6020,
13,
3166,
4576,
284,
305,
6764,
29889,
1062,
29889,
311,
16544,
1230,
1053,
8052,
29918,
5552,
29892,
3826,
4675,
1230,
19346,
29892,
2967,
13,
5215,
4576,
284,
305,
6764,
408,
872,
13,
5215,
8062,
999,
13,
5215,
337,
13,
5215,
4832,
13,
5215,
18116,
13,
13,
13,
1753,
903,
9700,
29918,
974,
29898,
978,
1125,
13,
1678,
9995,
2577,
278,
3876,
3577,
470,
3883,
310,
278,
4502,
3883,
29889,
13,
1678,
9995,
13,
13,
1678,
396,
3617,
278,
15443,
3577,
445,
1904,
14393,
304,
29889,
13,
1678,
24611,
353,
1024,
29889,
5451,
12839,
1495,
13,
1678,
1550,
24611,
29901,
13,
4706,
396,
1317,
445,
1024,
263,
15443,
3577,
29973,
13,
4706,
1243,
353,
15300,
4286,
7122,
29898,
10199,
1860,
29897,
13,
4706,
565,
1243,
297,
6055,
29889,
657,
877,
21514,
1164,
3919,
29903,
742,
5159,
1125,
13,
9651,
396,
910,
338,
278,
4163,
591,
526,
297,
29889,
13,
9651,
736,
1243,
13,
13,
4706,
396,
15154,
278,
1492,
29899,
3242,
10768,
29889,
13,
4706,
24611,
29889,
7323,
580,
13,
13,
1678,
565,
451,
24611,
322,
15300,
9794,
29915,
297,
1024,
29901,
13,
4706,
396,
1939,
3577,
471,
1476,
304,
367,
15443,
29936,
4218,
304,
4140,
278,
13,
4706,
396,
1492,
3577,
1024,
29936,
17820,
599,
6403,
661,
778,
310,
15300,
9794,
29915,
515,
278,
13,
4706,
396,
22906,
557,
479,
1024,
29889,
13,
4706,
736,
903,
9700,
29918,
974,
29898,
978,
29889,
6506,
12839,
9794,
742,
6629,
876,
13,
13,
13,
29937,
29991,
12002,
1904,
15562,
29889,
13,
29918,
19635,
353,
872,
29889,
19346,
1469,
580,
13,
13,
29937,
29991,
15924,
1891,
1904,
15562,
29889,
13,
29918,
19635,
29918,
1958,
353,
6571,
13,
13,
29937,
29991,
15924,
1891,
7669,
1230,
770,
1072,
391,
2722,
29889,
13,
29918,
1727,
6020,
29918,
1958,
353,
6571,
13,
13,
13,
1753,
903,
275,
29918,
4299,
29898,
978,
29892,
22561,
29892,
12421,
29879,
1125,
13,
13,
1678,
565,
1024,
1275,
525,
4373,
5160,
29915,
322,
451,
12421,
29879,
322,
451,
22561,
29901,
13,
13,
4706,
396,
18372,
640,
1150,
749,
29936,
9801,
591,
14383,
372,
29889,
13,
13,
4706,
12421,
29879,
1839,
1649,
16595,
1649,
2033,
353,
5852,
13,
4706,
736,
7700,
13,
13,
1678,
363,
2967,
297,
22561,
29901,
13,
13,
4706,
565,
313,
3188,
17255,
5453,
26914,
27382,
2541,
877,
284,
14969,
391,
29889,
2585,
29889,
4299,
1495,
13,
18884,
322,
2967,
17255,
978,
1649,
1275,
525,
4373,
5160,
29374,
13,
13,
9651,
396,
910,
338,
385,
7463,
19725,
304,
394,
14969,
391,
29889,
13,
13,
9651,
6773,
13,
13,
4706,
565,
338,
8758,
29898,
3188,
29892,
8125,
5160,
1125,
13,
13,
9651,
396,
910,
338,
472,
3203,
589,
29894,
1000,
472,
777,
1298,
515,
8125,
29889,
13,
13,
9651,
736,
5852,
13,
13,
1678,
396,
910,
338,
278,
2967,
770,
29892,
8125,
29889,
13,
13,
1678,
736,
7700,
13,
13,
13,
1990,
8125,
5160,
14048,
29898,
1853,
1125,
13,
13,
1678,
822,
4770,
1482,
12035,
25932,
29892,
1024,
29892,
22561,
29892,
12421,
29879,
1125,
13,
4706,
396,
24062,
345,
278,
1539,
562,
605,
591,
881,
367,
10723,
515,
29889,
13,
4706,
12700,
29918,
978,
353,
6055,
1839,
20387,
29931,
29918,
2303,
8687,
4375,
1799,
2033,
13,
4706,
2377,
29879,
353,
12700,
29918,
978,
29889,
5451,
12839,
1495,
13,
4706,
12700,
353,
679,
5552,
29898,
5215,
29918,
5453,
12839,
4286,
7122,
29898,
344,
3174,
7503,
29899,
29896,
2314,
511,
2377,
29879,
14352,
29896,
2314,
13,
13,
4706,
565,
451,
338,
1491,
1990,
29898,
29890,
2129,
29961,
29900,
1402,
12700,
1125,
13,
9651,
22561,
353,
12700,
29892,
13,
13,
4706,
736,
2428,
29898,
3195,
5160,
14048,
29892,
1067,
29879,
467,
1649,
1482,
12035,
25932,
29892,
1024,
29892,
22561,
29892,
12421,
29879,
29897,
13,
13,
13,
1990,
8125,
5160,
29898,
28319,
29889,
2541,
29918,
2527,
562,
605,
29898,
3195,
5160,
14048,
29892,
1134,
22164,
13,
1678,
9995,
1576,
1539,
562,
605,
363,
1404,
29899,
12119,
4733,
29889,
13,
13,
1678,
450,
6996,
6964,
338,
408,
4477,
29901,
1432,
1904,
8052,
297,
263,
15443,
13,
1678,
4163,
29358,
278,
1021,
14407,
7669,
1230,
2967,
29889,
7569,
1904,
13,
1678,
8052,
5377,
263,
15443,
4163,
4947,
967,
1914,
7669,
1230,
2967,
29889,
13,
13,
1678,
319,
1904,
338,
5545,
8052,
2768,
263,
4163,
3692,
393,
367,
4153,
13,
1678,
470,
9322,
297,
263,
1014,
29899,
5113,
29889,
13,
1678,
9995,
13,
13,
1678,
396,
29991,
450,
2346,
770,
1304,
29889,
450,
2346,
2875,
3639,
385,
2777,
310,
445,
13,
1678,
396,
29991,
770,
29889,
13,
1678,
4770,
1972,
1649,
353,
13641,
13,
13,
1678,
396,
29991,
450,
4163,
445,
1904,
14393,
304,
29889,
13,
1678,
903,
9700,
353,
6213,
13,
13,
1678,
396,
29991,
319,
3407,
304,
278,
7669,
1230,
770,
21235,
565,
278,
1904,
338,
13,
1678,
396,
29991,
297,
263,
15443,
4163,
29889,
13,
1678,
4770,
1727,
6020,
353,
6213,
13,
13,
1678,
732,
6799,
13,
1678,
822,
2346,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
6204,
263,
4867,
2346,
975,
445,
1904,
29889,
4761,
13,
9651,
8125,
29889,
1972,
29889,
497,
580,
13,
13,
4706,
11243,
27445,
304,
4761,
13,
9651,
515,
394,
14969,
391,
29889,
2585,
1053,
4867,
13,
9651,
4867,
29889,
1972,
29898,
3195,
467,
497,
580,
13,
4706,
9995,
13,
13,
4706,
736,
4867,
29889,
1972,
29898,
1311,
29897,
13,
13,
1678,
732,
6799,
13,
1678,
822,
903,
27787,
29918,
1990,
29918,
1727,
6020,
29898,
1311,
1125,
13,
4706,
736,
679,
5552,
29898,
1311,
29892,
22868,
3195,
5160,
1649,
1727,
6020,
742,
6213,
29897,
13,
13,
1678,
822,
4770,
1482,
12035,
25932,
29892,
1024,
29892,
22561,
29892,
12421,
29879,
1125,
13,
13,
4706,
396,
3872,
29915,
29873,
1889,
4340,
565,
445,
338,
451,
263,
1904,
313,
347,
29889,
278,
2967,
770,
467,
13,
13,
4706,
565,
451,
903,
275,
29918,
4299,
29898,
978,
29892,
22561,
29892,
12421,
29879,
1125,
13,
13,
9651,
736,
2428,
29898,
3195,
5160,
29892,
1067,
29879,
467,
1649,
1482,
12035,
25932,
29892,
1024,
29892,
22561,
29892,
12421,
29879,
29897,
13,
13,
4706,
396,
13109,
421,
21843,
29918,
735,
15423,
29952,
13,
4706,
565,
376,
1649,
2371,
29918,
5085,
1649,
29908,
451,
297,
12421,
29879,
29901,
13,
9651,
12421,
29879,
3366,
1649,
2371,
29918,
5085,
1649,
3108,
353,
3861,
13,
4706,
12421,
29879,
3366,
1649,
2371,
29918,
5085,
1649,
3108,
353,
12421,
29879,
3366,
1649,
2371,
29918,
5085,
1649,
3108,
718,
313,
13,
9651,
8853,
21843,
29918,
735,
15423,
1115,
5852,
1118,
29897,
13,
13,
4706,
396,
5399,
565,
445,
1904,
338,
297,
263,
15443,
4163,
322,
731,
967,
13,
4706,
396,
7669,
1230,
21235,
322,
15562,
304,
6232,
278,
5534,
565,
577,
29936,
1683,
29892,
13,
4706,
396,
5706,
967,
1914,
29889,
13,
13,
4706,
12421,
29879,
1839,
29918,
9700,
2033,
353,
4163,
353,
903,
9700,
29918,
974,
29898,
5552,
29879,
1839,
1649,
5453,
1649,
11287,
13,
13,
4706,
565,
4163,
29901,
13,
9651,
565,
4163,
451,
297,
903,
1727,
6020,
29918,
1958,
29901,
13,
18884,
903,
1727,
6020,
29918,
1958,
29961,
9700,
29962,
353,
8062,
999,
29889,
4806,
557,
1917,
11513,
580,
13,
13,
9651,
12421,
29879,
1839,
29918,
3195,
5160,
1649,
1727,
6020,
2033,
353,
903,
1727,
6020,
29918,
1958,
29961,
9700,
29962,
13,
9651,
12421,
29879,
1839,
19635,
2033,
353,
903,
19635,
13,
13,
4706,
1683,
29901,
13,
9651,
12421,
29879,
1839,
29918,
3195,
5160,
1649,
1727,
6020,
2033,
353,
8062,
999,
29889,
4806,
557,
1917,
11513,
580,
13,
9651,
12421,
29879,
1839,
19635,
2033,
353,
872,
29889,
19346,
1469,
580,
13,
13,
4706,
736,
2428,
29898,
3195,
5160,
29892,
1067,
29879,
467,
1649,
1482,
12035,
25932,
29892,
1024,
29892,
22561,
29892,
12421,
29879,
29897,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1024,
29892,
22561,
29892,
12421,
29879,
1125,
13,
4706,
396,
25455,
1749,
1311,
29889,
13,
4706,
2428,
29898,
3195,
5160,
29892,
1583,
467,
1649,
2344,
12035,
978,
29892,
22561,
29892,
12421,
29879,
29897,
13,
13,
4706,
396,
3387,
3273,
29899,
6034,
3121,
565,
591,
29915,
276,
393,
4832,
6761,
683,
29892,
1570,
5160,
29889,
13,
4706,
565,
1583,
17255,
5453,
1649,
1275,
525,
284,
14969,
391,
29889,
2585,
29889,
4299,
29915,
322,
1024,
1275,
525,
4373,
5160,
2396,
13,
9651,
736,
13,
13,
4706,
9846,
353,
12421,
29879,
29889,
657,
877,
1649,
16595,
1649,
742,
7700,
29897,
13,
4706,
565,
903,
275,
29918,
4299,
29898,
978,
29892,
22561,
29892,
12421,
29879,
29897,
322,
451,
9846,
29901,
13,
13,
9651,
396,
3462,
263,
3407,
304,
278,
1904,
373,
278,
1591,
29889,
13,
13,
9651,
1591,
353,
1583,
17255,
2371,
1649,
13,
9651,
731,
5552,
29898,
2371,
29892,
525,
1990,
29918,
742,
8062,
999,
29889,
14701,
29898,
1311,
876,
13,
13,
9651,
396,
3462,
1749,
1311,
304,
278,
2964,
300,
1891,
15562,
29889,
13,
13,
9651,
565,
1583,
3032,
9700,
29901,
13,
18884,
565,
1583,
3032,
9700,
451,
297,
903,
19635,
29918,
1958,
29901,
13,
462,
1678,
903,
19635,
29918,
1958,
29961,
1311,
3032,
9700,
29962,
353,
872,
29889,
19346,
1469,
580,
13,
13,
18884,
903,
19635,
29918,
1958,
29961,
1311,
3032,
9700,
1822,
29918,
1202,
29918,
2371,
29898,
13,
462,
1678,
1591,
29889,
978,
29892,
13,
462,
1678,
903,
19635,
29889,
24051,
29961,
2371,
29889,
978,
1822,
11010,
470,
903,
19635,
29889,
11010,
29892,
13,
462,
1678,
1591,
29897,
13,
13,
13,
1990,
8125,
29898,
28319,
29889,
2541,
29918,
2527,
562,
605,
29898,
3195,
5160,
22164,
13,
13,
1678,
4770,
16595,
1649,
353,
5852,
13,
13,
1678,
4770,
2344,
1649,
353,
2967,
3032,
311,
16544,
1230,
29918,
27821,
13,
13,
1678,
732,
7099,
433,
1127,
29918,
5552,
13,
1678,
822,
4770,
3891,
2435,
420,
12035,
25932,
1125,
13,
4706,
9995,
13,
4706,
14211,
414,
2616,
7093,
278,
770,
1024,
12420,
411,
278,
22906,
557,
479,
1024,
297,
1797,
13,
4706,
304,
883,
263,
4226,
1024,
363,
263,
1591,
297,
3758,
29889,
13,
4706,
9995,
13,
4706,
4163,
353,
1067,
29879,
3032,
9700,
13,
4706,
1024,
353,
14210,
29879,
29889,
29995,
29879,
29915,
1273,
313,
9700,
29892,
1067,
29879,
17255,
978,
26914,
13609,
3101,
13,
4706,
1024,
353,
337,
29889,
1491,
29898,
29878,
29915,
4197,
29909,
29899,
29999,
2314,
742,
364,
29915,
3187,
29896,
742,
1024,
29897,
13,
4706,
1024,
353,
337,
29889,
1491,
29898,
29878,
12764,
29889,
29974,
742,
364,
15972,
742,
1024,
29897,
13,
4706,
736,
1024,
13,
13,
1678,
822,
4078,
29898,
1311,
29892,
9063,
29922,
8824,
1125,
13,
4706,
9995,
11371,
278,
3620,
304,
278,
1904,
29889,
13,
13,
4706,
960,
278,
1904,
756,
451,
1063,
3736,
12652,
13,
4706,
769,
372,
12778,
278,
1904,
304,
278,
8052,
4867,
29889,
1987,
372,
28371,
267,
278,
13,
4706,
1203,
4867,
322,
2984,
635,
25741,
372,
29889,
13,
4706,
9995,
13,
4706,
565,
451,
756,
29918,
22350,
29898,
1311,
1125,
13,
9651,
396,
4669,
756,
451,
1063,
3736,
12652,
304,
278,
2566,
29889,
13,
9651,
4867,
29889,
1202,
29898,
1311,
29897,
13,
13,
4706,
565,
9063,
29901,
13,
9651,
396,
1876,
277,
278,
4867,
408,
13877,
29889,
13,
9651,
4867,
29889,
15060,
580,
13,
13,
4706,
1683,
29901,
13,
9651,
396,
3387,
28371,
278,
4867,
29936,
437,
451,
9063,
29889,
13,
9651,
4867,
29889,
23126,
580,
13,
2
] |
ors2bryton.py | andbue/ors2bryton | 0 | 12723 | <reponame>andbue/ors2bryton
from sys import argv
from os.path import splitext
from lxml import etree
from struct import pack
def main():
print(argv)
gpx = argv[1]
"""
bryton:
1: go ahead
2: right
3: left
4: slight right
5: slight left
6: close right
7: close left
8: exit right
9: exit left
10: continue straight
11: uturn right
12: uturn left
13++: go ahead
openrouteservice:
(https://github.com/GIScience/openrouteservice/blob/master/openrouteservice/src/main/java/org/heigit/ors/routing/instructions/InstructionType.java)
TURN_LEFT, /*0*/
TURN_RIGHT, /*1*/
TURN_SHARP_LEFT, /*2*/
TURN_SHARP_RIGHT, /*3*/
TURN_SLIGHT_LEFT, /*4*/
TURN_SLIGHT_RIGHT, /*5*/
CONTINUE, /*6*/
ENTER_ROUNDABOUT, /*7*/
EXIT_ROUNDABOUT, /*8*/
UTURN, /*9*/
FINISH, /*10*/
DEPART, /*11*/
KEEP_LEFT, /*12*/
KEEP_RIGHT, /*13*/
UNKNOWN /*14*/;
"""
orst2brt = {
0: 3,
1: 2,
2: 7,
3: 6,
4: 5,
5: 4,
6: 1,
7: 10,
8: 8,
9: 12,
10: 1,
11: 1,
12: 9,
13: 8,
14: 1
}
fname = splitext(gpx)[0]
r = etree.parse(gpx).getroot()
ns = r.nsmap[None]
rte = r.find(f'./{{{ns}}}rte')
rtepts = rte.findall(f'./{{{ns}}}rtept')
unit = r.find(f'./{{{ns}}}extensions/{{{ns}}}distance-units').text
uf = 10e2 if unit == "km" else 1
ext = rte.find(f'./{{{ns}}}extensions')
dist = int(float(ext.find(f'./{{{ns}}}distance').text) * uf)
bnds = ext.find(f'./{{{ns}}}bounds')
bnds = {k: int(float(v) * 10e5) for k, v in bnds.attrib.items()}
bnds = (bnds['maxLat'], bnds['minLat'], bnds['maxLon'], bnds['minLon'])
print(f'{fname}.smy: {len(rtepts)} waypoints, distance {dist} meters.')
with open(fname + '.smy', 'wb') as smy:
smy.write(pack('<HHIIIII36x', 1, len(rtepts), *bnds, dist))
with open(fname + '.tinfo', 'wb') as tinfo,\
open(fname + '.track', 'wb') as track:
step = None
for n, p in enumerate(rtepts):
lat = int(float(p.attrib.get('lat')) * 10e5)
lon = int(float(p.attrib.get('lon')) * 10e5)
track.write(pack('<II8x', lat, lon))
thisstep = int(p.find(f'./{{{ns}}}extensions/{{{ns}}}step').text)
if thisstep != step:
name = p.find(f'./{{{ns}}}name').text
name = name.encode() if name != None else "".encode()
dist = int(float(p.find(f'./{{{ns}}}extensions/{{{ns}}}distance').text) * uf)
dur = int(float(p.find(f'./{{{ns}}}extensions/{{{ns}}}duration').text))
t = int(p.find(f'./{{{ns}}}extensions/{{{ns}}}type').text)
d = orst2brt[t]
tinfo.write(pack('<HBxHxxHxx32s', n, d, dist, dur, name))
step = thisstep
print(f'{fname}.tinfo, {fname}.track: Finished writing.')
if __name__ == "__main__":
main()
| [
1,
529,
276,
1112,
420,
29958,
392,
29890,
434,
29914,
943,
29906,
29890,
719,
880,
13,
3166,
10876,
1053,
1852,
29894,
13,
3166,
2897,
29889,
2084,
1053,
8536,
568,
486,
13,
3166,
301,
3134,
1053,
634,
929,
13,
3166,
2281,
1053,
4870,
13,
13,
13,
1753,
1667,
7295,
13,
1678,
1596,
29898,
19218,
29897,
13,
1678,
330,
1756,
353,
1852,
29894,
29961,
29896,
29962,
13,
13,
1678,
9995,
13,
1678,
289,
719,
880,
29901,
13,
3986,
29896,
29901,
748,
14432,
13,
3986,
29906,
29901,
1492,
13,
3986,
29941,
29901,
2175,
13,
3986,
29946,
29901,
7248,
1492,
13,
3986,
29945,
29901,
7248,
2175,
13,
3986,
29953,
29901,
3802,
1492,
13,
3986,
29955,
29901,
3802,
2175,
13,
3986,
29947,
29901,
6876,
1492,
13,
3986,
29929,
29901,
6876,
2175,
13,
308,
29896,
29900,
29901,
6773,
7812,
13,
308,
29896,
29896,
29901,
318,
685,
1492,
13,
308,
29896,
29906,
29901,
318,
685,
2175,
13,
308,
29896,
29941,
1817,
29901,
748,
14432,
13,
13,
1678,
1722,
27894,
261,
1087,
29901,
13,
1678,
313,
991,
597,
3292,
29889,
510,
29914,
29954,
3235,
15277,
29914,
3150,
27894,
261,
1087,
29914,
10054,
29914,
6207,
29914,
3150,
27894,
261,
1087,
29914,
4351,
29914,
3396,
29914,
1645,
29914,
990,
29914,
354,
335,
277,
29914,
943,
29914,
14608,
292,
29914,
2611,
582,
1953,
29914,
3379,
4080,
1542,
29889,
1645,
29897,
13,
4706,
323,
24015,
29918,
28024,
29892,
795,
4949,
29900,
3877,
13,
4706,
323,
24015,
29918,
22789,
3912,
29892,
632,
4949,
29896,
3877,
13,
4706,
323,
24015,
29918,
7068,
1718,
29925,
29918,
28024,
29892,
4706,
4949,
29906,
3877,
13,
4706,
323,
24015,
29918,
7068,
1718,
29925,
29918,
22789,
3912,
29892,
539,
4949,
29941,
3877,
13,
4706,
323,
24015,
29918,
29903,
5265,
29954,
3912,
29918,
28024,
29892,
539,
4949,
29946,
3877,
13,
4706,
323,
24015,
29918,
29903,
5265,
29954,
3912,
29918,
22789,
3912,
29892,
418,
4949,
29945,
3877,
13,
4706,
8707,
29911,
1177,
4462,
29892,
1669,
4949,
29953,
3877,
13,
4706,
12524,
4945,
29918,
1672,
18783,
2882,
12015,
29892,
539,
4949,
29955,
3877,
13,
4706,
8528,
1806,
29918,
1672,
18783,
2882,
12015,
29892,
4706,
4949,
29947,
3877,
13,
4706,
501,
29911,
24015,
29892,
462,
29871,
4949,
29929,
3877,
13,
4706,
383,
1177,
3235,
29950,
29892,
462,
4949,
29896,
29900,
3877,
13,
4706,
5012,
26092,
29892,
462,
4949,
29896,
29896,
3877,
13,
4706,
476,
29923,
15488,
29918,
28024,
29892,
795,
4949,
29896,
29906,
3877,
13,
4706,
476,
29923,
15488,
29918,
22789,
3912,
29892,
632,
4949,
29896,
29941,
3877,
13,
4706,
8291,
29968,
6632,
16048,
462,
4949,
29896,
29946,
3877,
29936,
13,
1678,
9995,
13,
1678,
470,
303,
29906,
1182,
29873,
353,
426,
13,
13,
308,
29900,
29901,
29871,
29941,
29892,
29871,
13,
308,
29896,
29901,
29871,
29906,
29892,
13,
308,
29906,
29901,
29871,
29955,
29892,
13,
308,
29941,
29901,
29871,
29953,
29892,
13,
308,
29946,
29901,
29871,
29945,
29892,
13,
308,
29945,
29901,
29871,
29946,
29892,
13,
308,
29953,
29901,
29871,
29896,
29892,
13,
308,
29955,
29901,
29871,
29896,
29900,
29892,
13,
308,
29947,
29901,
29871,
29947,
29892,
13,
308,
29929,
29901,
29871,
29896,
29906,
29892,
13,
308,
29896,
29900,
29901,
29871,
29896,
29892,
13,
308,
29896,
29896,
29901,
29871,
29896,
29892,
13,
308,
29896,
29906,
29901,
29871,
29929,
29892,
13,
308,
29896,
29941,
29901,
29871,
29947,
29892,
13,
308,
29896,
29946,
29901,
29871,
29896,
13,
1678,
500,
13,
13,
1678,
285,
978,
353,
8536,
568,
486,
29898,
29887,
1756,
9601,
29900,
29962,
13,
1678,
364,
353,
634,
929,
29889,
5510,
29898,
29887,
1756,
467,
657,
4632,
580,
13,
1678,
17534,
353,
364,
29889,
1983,
1958,
29961,
8516,
29962,
13,
1678,
364,
371,
353,
364,
29889,
2886,
29898,
29888,
4286,
29914,
6224,
29912,
1983,
12499,
29878,
371,
1495,
13,
1678,
364,
371,
16485,
353,
364,
371,
29889,
2886,
497,
29898,
29888,
4286,
29914,
6224,
29912,
1983,
12499,
29878,
371,
415,
1495,
13,
1678,
5190,
353,
364,
29889,
2886,
29898,
29888,
4286,
29914,
6224,
29912,
1983,
12499,
24299,
29914,
6224,
29912,
1983,
12499,
19244,
29899,
348,
1169,
2824,
726,
13,
1678,
318,
29888,
353,
29871,
29896,
29900,
29872,
29906,
565,
5190,
1275,
376,
8848,
29908,
1683,
29871,
29896,
13,
1678,
1294,
353,
364,
371,
29889,
2886,
29898,
29888,
4286,
29914,
6224,
29912,
1983,
12499,
24299,
1495,
29871,
13,
13,
1678,
1320,
353,
938,
29898,
7411,
29898,
1062,
29889,
2886,
29898,
29888,
4286,
29914,
6224,
29912,
1983,
12499,
19244,
2824,
726,
29897,
334,
318,
29888,
29897,
13,
1678,
289,
299,
29879,
353,
1294,
29889,
2886,
29898,
29888,
4286,
29914,
6224,
29912,
1983,
12499,
23687,
1495,
13,
1678,
289,
299,
29879,
353,
426,
29895,
29901,
938,
29898,
7411,
29898,
29894,
29897,
334,
29871,
29896,
29900,
29872,
29945,
29897,
363,
413,
29892,
325,
297,
289,
299,
29879,
29889,
1131,
1091,
29889,
7076,
28296,
13,
1678,
289,
299,
29879,
353,
313,
29890,
299,
29879,
1839,
3317,
13992,
7464,
289,
299,
29879,
1839,
1195,
13992,
7464,
289,
299,
29879,
1839,
3317,
29931,
265,
7464,
289,
299,
29879,
1839,
1195,
29931,
265,
11287,
13,
268,
13,
1678,
1596,
29898,
29888,
29915,
29912,
29888,
978,
1836,
29879,
1357,
29901,
426,
2435,
29898,
29878,
371,
16485,
2915,
982,
9748,
29892,
5418,
426,
5721,
29913,
27881,
29889,
1495,
13,
1678,
411,
1722,
29898,
29888,
978,
718,
15300,
29879,
1357,
742,
525,
29893,
29890,
1495,
408,
269,
1357,
29901,
13,
4706,
269,
1357,
29889,
3539,
29898,
4058,
877,
29966,
27590,
2687,
5287,
29941,
29953,
29916,
742,
29871,
29896,
29892,
7431,
29898,
29878,
371,
16485,
511,
334,
29890,
299,
29879,
29892,
1320,
876,
13,
13,
1678,
411,
1722,
29898,
29888,
978,
718,
15300,
29873,
3888,
742,
525,
29893,
29890,
1495,
408,
260,
3888,
2053,
13,
308,
1722,
29898,
29888,
978,
718,
15300,
11294,
742,
525,
29893,
29890,
1495,
408,
5702,
29901,
13,
4706,
4331,
353,
6213,
13,
4706,
363,
302,
29892,
282,
297,
26985,
29898,
29878,
371,
16485,
1125,
13,
9651,
3405,
353,
938,
29898,
7411,
29898,
29886,
29889,
1131,
1091,
29889,
657,
877,
5066,
8785,
334,
29871,
29896,
29900,
29872,
29945,
29897,
13,
9651,
23123,
353,
938,
29898,
7411,
29898,
29886,
29889,
1131,
1091,
29889,
657,
877,
12957,
8785,
334,
29871,
29896,
29900,
29872,
29945,
29897,
13,
9651,
5702,
29889,
3539,
29898,
4058,
877,
29966,
2687,
29947,
29916,
742,
3405,
29892,
23123,
876,
13,
632,
13,
9651,
445,
10568,
353,
938,
29898,
29886,
29889,
2886,
29898,
29888,
4286,
29914,
6224,
29912,
1983,
12499,
24299,
29914,
6224,
29912,
1983,
12499,
10568,
2824,
726,
29897,
13,
9651,
565,
445,
10568,
2804,
4331,
29901,
13,
18884,
1024,
353,
282,
29889,
2886,
29898,
29888,
4286,
29914,
6224,
29912,
1983,
12499,
978,
2824,
726,
13,
18884,
1024,
353,
1024,
29889,
12508,
580,
565,
1024,
2804,
6213,
1683,
376,
1642,
12508,
580,
13,
18884,
1320,
353,
938,
29898,
7411,
29898,
29886,
29889,
2886,
29898,
29888,
4286,
29914,
6224,
29912,
1983,
12499,
24299,
29914,
6224,
29912,
1983,
12499,
19244,
2824,
726,
29897,
334,
318,
29888,
29897,
13,
18884,
1411,
353,
938,
29898,
7411,
29898,
29886,
29889,
2886,
29898,
29888,
4286,
29914,
6224,
29912,
1983,
12499,
24299,
29914,
6224,
29912,
1983,
12499,
19708,
2824,
726,
876,
13,
18884,
260,
353,
938,
29898,
29886,
29889,
2886,
29898,
29888,
4286,
29914,
6224,
29912,
1983,
12499,
24299,
29914,
6224,
29912,
1983,
12499,
1853,
2824,
726,
29897,
13,
18884,
270,
353,
470,
303,
29906,
1182,
29873,
29961,
29873,
29962,
13,
18884,
260,
3888,
29889,
3539,
29898,
4058,
877,
29966,
29950,
29933,
29916,
29950,
4419,
29950,
4419,
29941,
29906,
29879,
742,
302,
29892,
270,
29892,
1320,
29892,
1411,
29892,
1024,
876,
13,
18884,
4331,
353,
445,
10568,
13,
1678,
1596,
29898,
29888,
29915,
29912,
29888,
978,
1836,
29873,
3888,
29892,
426,
29888,
978,
1836,
11294,
29901,
4231,
3276,
5007,
29889,
1495,
13,
632,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
1678,
1667,
580,
13,
13,
2
] |
fake_http_header/constants.py | MichaelTatarski/fake-http-header | 2 | 62510 | <reponame>MichaelTatarski/fake-http-header
from fake_http_header.data_import import load_dict
from importlib.resources import read_text
domain_to_search_engine_binary = read_text(
"fake_http_header.data", "top-level-domain-to-search-engines.json"
)
domain_to_languages_binary = read_text(
"fake_http_header.data", "top-level-domain-to-languages.json"
)
browser_to_user_agent = read_text("fake_http_header.data", "browser-to-user-agent.json")
encoding_values_dict_binary = read_text("fake_http_header.data", "encoding-values.json")
browser_to_accept_value_binary = read_text(
"fake_http_header.data", "browser-to-accept-values.json"
)
MINIMAL_GENERIC_TOP_LEVEL_DOMAIN_LENGTH = 3
MINIMAL_ENCODING_VALUE_LENGTH = 1
MAXIMUM_ENCODING_VALUE_LENGTH = 5
# Dicts that are extracted from json files
DOMAIN_TO_SEARCH_ENGINES = load_dict(domain_to_search_engine_binary)
DOMAIN_TO_LANGUAGES = load_dict(domain_to_languages_binary)
BROWSER_TO_USER_AGENT = load_dict(browser_to_user_agent)
encoding_values_dict = load_dict(encoding_values_dict_binary)
BROWSER_TO_ACCEPT_VALUES = load_dict(browser_to_accept_value_binary)
ENCODING_VALUES = encoding_values_dict["Accept-Encoding"]
# addidtional constants to to create country and browser specific
BROWSERS = list(BROWSER_TO_USER_AGENT.keys())
ALL_TOP_LEVEL_DOMAINS = list(DOMAIN_TO_SEARCH_ENGINES.keys())
GENERIC_TOP_LEVEL_DOMAINS = [
generic_domain
for generic_domain in ALL_TOP_LEVEL_DOMAINS
if len(generic_domain) >= MINIMAL_GENERIC_TOP_LEVEL_DOMAIN_LENGTH
]
COUNTRY_TOP_LEVEL_DOMAINS = [
country
for country in ALL_TOP_LEVEL_DOMAINS
if country not in GENERIC_TOP_LEVEL_DOMAINS
]
| [
1,
529,
276,
1112,
420,
29958,
24083,
29911,
14873,
2574,
29914,
29888,
1296,
29899,
1124,
29899,
6672,
13,
3166,
25713,
29918,
1124,
29918,
6672,
29889,
1272,
29918,
5215,
1053,
2254,
29918,
8977,
13,
3166,
1053,
1982,
29889,
13237,
1053,
1303,
29918,
726,
13,
13,
7247,
29918,
517,
29918,
4478,
29918,
10599,
29918,
19541,
353,
1303,
29918,
726,
29898,
13,
1678,
376,
29888,
1296,
29918,
1124,
29918,
6672,
29889,
1272,
613,
376,
3332,
29899,
5563,
29899,
7247,
29899,
517,
29899,
4478,
29899,
996,
1475,
29889,
3126,
29908,
13,
29897,
13,
7247,
29918,
517,
29918,
29880,
8737,
29918,
19541,
353,
1303,
29918,
726,
29898,
13,
1678,
376,
29888,
1296,
29918,
1124,
29918,
6672,
29889,
1272,
613,
376,
3332,
29899,
5563,
29899,
7247,
29899,
517,
29899,
29880,
8737,
29889,
3126,
29908,
13,
29897,
13,
15965,
29918,
517,
29918,
1792,
29918,
14748,
353,
1303,
29918,
726,
703,
29888,
1296,
29918,
1124,
29918,
6672,
29889,
1272,
613,
376,
15965,
29899,
517,
29899,
1792,
29899,
14748,
29889,
3126,
1159,
13,
22331,
29918,
5975,
29918,
8977,
29918,
19541,
353,
1303,
29918,
726,
703,
29888,
1296,
29918,
1124,
29918,
6672,
29889,
1272,
613,
376,
22331,
29899,
5975,
29889,
3126,
1159,
13,
15965,
29918,
517,
29918,
16044,
29918,
1767,
29918,
19541,
353,
1303,
29918,
726,
29898,
13,
1678,
376,
29888,
1296,
29918,
1124,
29918,
6672,
29889,
1272,
613,
376,
15965,
29899,
517,
29899,
16044,
29899,
5975,
29889,
3126,
29908,
13,
29897,
13,
13,
16173,
2260,
29931,
29918,
24647,
1001,
2965,
29918,
29911,
4590,
29918,
1307,
29963,
6670,
29918,
3970,
29032,
29918,
19433,
353,
29871,
29941,
13,
16173,
2260,
29931,
29918,
1430,
3217,
29928,
4214,
29918,
19143,
29918,
19433,
353,
29871,
29896,
13,
12648,
7833,
5005,
29918,
1430,
3217,
29928,
4214,
29918,
19143,
29918,
19433,
353,
29871,
29945,
13,
13,
29937,
360,
919,
29879,
393,
526,
23892,
515,
4390,
2066,
13,
13,
3970,
29032,
29918,
4986,
29918,
1660,
1718,
3210,
29918,
1430,
29954,
1177,
2890,
353,
2254,
29918,
8977,
29898,
7247,
29918,
517,
29918,
4478,
29918,
10599,
29918,
19541,
29897,
13,
3970,
29032,
29918,
4986,
29918,
29931,
19453,
29965,
10461,
29903,
353,
2254,
29918,
8977,
29898,
7247,
29918,
517,
29918,
29880,
8737,
29918,
19541,
29897,
13,
29933,
25180,
6304,
29918,
4986,
29918,
11889,
29918,
10051,
3919,
353,
2254,
29918,
8977,
29898,
15965,
29918,
517,
29918,
1792,
29918,
14748,
29897,
13,
22331,
29918,
5975,
29918,
8977,
353,
2254,
29918,
8977,
29898,
22331,
29918,
5975,
29918,
8977,
29918,
19541,
29897,
13,
29933,
25180,
6304,
29918,
4986,
29918,
2477,
4741,
7982,
29918,
8932,
12996,
353,
2254,
29918,
8977,
29898,
15965,
29918,
517,
29918,
16044,
29918,
1767,
29918,
19541,
29897,
13,
1430,
3217,
29928,
4214,
29918,
8932,
12996,
353,
8025,
29918,
5975,
29918,
8977,
3366,
23965,
29899,
14934,
3108,
13,
13,
29937,
788,
333,
29873,
1848,
17727,
304,
304,
1653,
4234,
322,
4714,
2702,
13,
13,
29933,
25180,
6304,
29903,
353,
1051,
29898,
29933,
25180,
6304,
29918,
4986,
29918,
11889,
29918,
10051,
3919,
29889,
8149,
3101,
13,
9818,
29918,
29911,
4590,
29918,
1307,
29963,
6670,
29918,
3970,
29032,
29903,
353,
1051,
29898,
3970,
29032,
29918,
4986,
29918,
1660,
1718,
3210,
29918,
1430,
29954,
1177,
2890,
29889,
8149,
3101,
13,
24647,
1001,
2965,
29918,
29911,
4590,
29918,
1307,
29963,
6670,
29918,
3970,
29032,
29903,
353,
518,
13,
1678,
10035,
29918,
7247,
13,
1678,
363,
10035,
29918,
7247,
297,
15149,
29918,
29911,
4590,
29918,
1307,
29963,
6670,
29918,
3970,
29032,
29903,
13,
1678,
565,
7431,
29898,
19206,
29918,
7247,
29897,
6736,
341,
1177,
2260,
29931,
29918,
24647,
1001,
2965,
29918,
29911,
4590,
29918,
1307,
29963,
6670,
29918,
3970,
29032,
29918,
19433,
13,
29962,
13,
3217,
3904,
5659,
29979,
29918,
29911,
4590,
29918,
1307,
29963,
6670,
29918,
3970,
29032,
29903,
353,
518,
13,
1678,
4234,
13,
1678,
363,
4234,
297,
15149,
29918,
29911,
4590,
29918,
1307,
29963,
6670,
29918,
3970,
29032,
29903,
13,
1678,
565,
4234,
451,
297,
402,
1430,
1001,
2965,
29918,
29911,
4590,
29918,
1307,
29963,
6670,
29918,
3970,
29032,
29903,
13,
29962,
13,
2
] |
mitmproxy/proxy/modes/tunnel_proxy.py | intfrr/mitmproxy | 6 | 41010 | <gh_stars>1-10
from mitmproxy import exceptions
from mitmproxy import platform
from mitmproxy.proxy import protocol
class TunnelProxy(protocol.Layer, protocol.ServerConnectionMixin):
def __init__(self, ctx):
super().__init__(ctx)
def __call__(self):
layer = self.ctx.next_layer(self)
try:
layer()
finally:
if self.server_conn.connected():
self.disconnect()
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
3166,
1380,
29885,
14701,
1053,
15283,
13,
3166,
1380,
29885,
14701,
1053,
7481,
13,
3166,
1380,
29885,
14701,
29889,
14701,
1053,
9608,
13,
13,
13,
1990,
323,
16163,
14048,
29898,
20464,
29889,
14420,
29892,
9608,
29889,
6004,
5350,
29924,
861,
262,
1125,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
12893,
1125,
13,
4706,
2428,
2141,
1649,
2344,
12035,
13073,
29897,
13,
13,
1678,
822,
4770,
4804,
12035,
1311,
1125,
13,
4706,
7546,
353,
1583,
29889,
13073,
29889,
4622,
29918,
13148,
29898,
1311,
29897,
13,
4706,
1018,
29901,
13,
9651,
7546,
580,
13,
4706,
7146,
29901,
13,
9651,
565,
1583,
29889,
2974,
29918,
13082,
29889,
18045,
7295,
13,
18884,
1583,
29889,
2218,
6915,
580,
13,
2
] |
vistrails/packages/tabledata/read/__init__.py | tacaswell/VisTrails | 0 | 126843 | from vistrails.core.modules.utils import make_modules_dict
try:
# read_numpy requires numpy
import numpy
except ImportError: # pragma: no cover
numpy_modules = []
else:
from read_numpy import _modules as numpy_modules
from read_csv import _modules as csv_modules
from read_excel import _modules as excel_modules
from read_json import _modules as json_modules
_modules = make_modules_dict(numpy_modules, csv_modules, excel_modules,
json_modules,
namespace='read')
| [
1,
515,
325,
391,
9912,
29889,
3221,
29889,
7576,
29889,
13239,
1053,
1207,
29918,
7576,
29918,
8977,
13,
13,
2202,
29901,
13,
1678,
396,
1303,
29918,
23749,
6858,
12655,
13,
1678,
1053,
12655,
13,
19499,
16032,
2392,
29901,
396,
282,
23929,
29901,
694,
4612,
13,
1678,
12655,
29918,
7576,
353,
5159,
13,
2870,
29901,
13,
1678,
515,
1303,
29918,
23749,
1053,
903,
7576,
408,
12655,
29918,
7576,
13,
13,
3166,
1303,
29918,
7638,
1053,
903,
7576,
408,
11799,
29918,
7576,
13,
3166,
1303,
29918,
24633,
1053,
903,
7576,
408,
10616,
29918,
7576,
13,
3166,
1303,
29918,
3126,
1053,
903,
7576,
408,
4390,
29918,
7576,
13,
13,
29918,
7576,
353,
1207,
29918,
7576,
29918,
8977,
29898,
23749,
29918,
7576,
29892,
11799,
29918,
7576,
29892,
10616,
29918,
7576,
29892,
13,
462,
632,
4390,
29918,
7576,
29892,
13,
462,
632,
7397,
2433,
949,
1495,
13,
2
] |
tests/test_utils.py | rahultesla/spectacles | 1 | 31170 | from spectacles import utils
from spectacles.logger import GLOBAL_LOGGER as logger
from unittest.mock import MagicMock
import pytest
import unittest
TEST_BASE_URL = "https://test.looker.com"
def test_compose_url_one_path_component():
url = utils.compose_url(TEST_BASE_URL, ["api"])
assert url == "https://test.looker.com/api"
def test_compose_url_multiple_path_components():
url = utils.compose_url(TEST_BASE_URL, ["api", "3.0", "login", "42", "auth", "27"])
assert url == "https://test.looker.com/api/3.0/login/42/auth/27"
def test_compose_url_multiple_path_components_and_multiple_field_params():
url = utils.compose_url(
TEST_BASE_URL,
["api", "3.0", "login", "42", "auth", "27"],
{"fields": ["joins", "id"]},
)
assert url == "https://test.looker.com/api/3.0/login/42/auth/27?fields=joins%2Cid"
def test_compose_url_multiple_path_components_and_one_field_params():
url = utils.compose_url(
TEST_BASE_URL,
["api", "3.0", "login", "42", "auth", "27"],
{"fields": ["joins"]},
)
assert url == "https://test.looker.com/api/3.0/login/42/auth/27?fields=joins"
def test_compose_url_with_extra_slashes():
url = utils.compose_url(TEST_BASE_URL + "/", ["/api//", "3.0/login/"])
assert url == "https://test.looker.com/api/3.0/login"
human_readable_testcases = [
(0.000002345, "0 seconds"),
(0.02, "0 seconds"),
(60, "1 minute"),
(61.002, "1 minute and 1 second"),
(62, "1 minute and 2 seconds"),
(2790, "46 minutes and 30 seconds"),
]
@pytest.mark.parametrize("elapsed,expected", human_readable_testcases)
def test_human_readable(elapsed, expected):
human_readable = utils.human_readable(elapsed)
assert human_readable == expected
get_detail_testcases = [
("run_sql", "SQL "),
("run_assert", "data test "),
("run_content", "content "),
("OtherClass.validate", ""),
]
@pytest.mark.parametrize("fn_name,expected", get_detail_testcases)
def test_get_detail(fn_name, expected):
detail = utils.get_detail(fn_name)
assert detail == expected
class TestLogDurationDecorator(unittest.TestCase):
def test_log_SQL(self):
with self.assertLogs(logger=logger, level="INFO") as cm:
func = MagicMock()
func.__name__ = "run_sql"
decorated_func = utils.log_duration(func)
decorated_func()
self.assertIn("INFO:spectacles:Completed SQL validation in", cm.output[0])
def test_log_assert(self):
with self.assertLogs(logger=logger, level="INFO") as cm:
func = MagicMock()
func.__name__ = "run_assert"
decorated_func = utils.log_duration(func)
decorated_func()
self.assertIn("INFO:spectacles:Completed data test validation in", cm.output[0])
def test_log_content(self):
with self.assertLogs(logger=logger, level="INFO") as cm:
func = MagicMock()
func.__name__ = "run_content"
decorated_func = utils.log_duration(func)
decorated_func()
self.assertIn("INFO:spectacles:Completed content validation in", cm.output[0])
def test_log_other(self):
with self.assertLogs(logger=logger, level="INFO") as cm:
func = MagicMock()
func.__name__ = "OtherValidator.validate"
decorated_func = utils.log_duration(func)
decorated_func()
self.assertIn("INFO:spectacles:Completed validation in", cm.output[0])
def test_chunks_returns_expected_results():
to_chunk = list(range(10)) # has length of 10
assert len(list(utils.chunks(to_chunk, 5))) == 2
assert len(list(utils.chunks(to_chunk, 9))) == 2
assert len(list(utils.chunks(to_chunk, 10))) == 1
assert len(list(utils.chunks(to_chunk, 11))) == 1
| [
1,
515,
6683,
23435,
1053,
3667,
29879,
13,
3166,
6683,
23435,
29889,
21707,
1053,
402,
28902,
1964,
29918,
14480,
17070,
408,
17927,
13,
3166,
443,
27958,
29889,
17640,
1053,
26494,
18680,
13,
5215,
11451,
1688,
13,
5215,
443,
27958,
13,
13,
18267,
29918,
25416,
29918,
4219,
353,
376,
991,
597,
1688,
29889,
6914,
261,
29889,
510,
29908,
13,
13,
13,
1753,
1243,
29918,
19438,
29918,
2271,
29918,
650,
29918,
2084,
29918,
9700,
7295,
13,
1678,
3142,
353,
3667,
29879,
29889,
19438,
29918,
2271,
29898,
18267,
29918,
25416,
29918,
4219,
29892,
6796,
2754,
20068,
13,
1678,
4974,
3142,
1275,
376,
991,
597,
1688,
29889,
6914,
261,
29889,
510,
29914,
2754,
29908,
13,
13,
13,
1753,
1243,
29918,
19438,
29918,
2271,
29918,
20787,
29918,
2084,
29918,
14036,
7295,
13,
1678,
3142,
353,
3667,
29879,
29889,
19438,
29918,
2271,
29898,
18267,
29918,
25416,
29918,
4219,
29892,
6796,
2754,
613,
376,
29941,
29889,
29900,
613,
376,
7507,
613,
376,
29946,
29906,
613,
376,
5150,
613,
376,
29906,
29955,
20068,
13,
1678,
4974,
3142,
1275,
376,
991,
597,
1688,
29889,
6914,
261,
29889,
510,
29914,
2754,
29914,
29941,
29889,
29900,
29914,
7507,
29914,
29946,
29906,
29914,
5150,
29914,
29906,
29955,
29908,
13,
13,
13,
1753,
1243,
29918,
19438,
29918,
2271,
29918,
20787,
29918,
2084,
29918,
14036,
29918,
392,
29918,
20787,
29918,
2671,
29918,
7529,
7295,
13,
1678,
3142,
353,
3667,
29879,
29889,
19438,
29918,
2271,
29898,
13,
4706,
17067,
1254,
29918,
25416,
29918,
4219,
29892,
13,
4706,
6796,
2754,
613,
376,
29941,
29889,
29900,
613,
376,
7507,
613,
376,
29946,
29906,
613,
376,
5150,
613,
376,
29906,
29955,
12436,
13,
4706,
8853,
9621,
1115,
6796,
2212,
1144,
613,
376,
333,
3108,
1118,
13,
1678,
1723,
13,
1678,
4974,
3142,
1275,
376,
991,
597,
1688,
29889,
6914,
261,
29889,
510,
29914,
2754,
29914,
29941,
29889,
29900,
29914,
7507,
29914,
29946,
29906,
29914,
5150,
29914,
29906,
29955,
29973,
9621,
29922,
2212,
1144,
29995,
29906,
29907,
333,
29908,
13,
13,
13,
1753,
1243,
29918,
19438,
29918,
2271,
29918,
20787,
29918,
2084,
29918,
14036,
29918,
392,
29918,
650,
29918,
2671,
29918,
7529,
7295,
13,
1678,
3142,
353,
3667,
29879,
29889,
19438,
29918,
2271,
29898,
13,
4706,
17067,
1254,
29918,
25416,
29918,
4219,
29892,
13,
4706,
6796,
2754,
613,
376,
29941,
29889,
29900,
613,
376,
7507,
613,
376,
29946,
29906,
613,
376,
5150,
613,
376,
29906,
29955,
12436,
13,
4706,
8853,
9621,
1115,
6796,
2212,
1144,
3108,
1118,
13,
1678,
1723,
13,
1678,
4974,
3142,
1275,
376,
991,
597,
1688,
29889,
6914,
261,
29889,
510,
29914,
2754,
29914,
29941,
29889,
29900,
29914,
7507,
29914,
29946,
29906,
29914,
5150,
29914,
29906,
29955,
29973,
9621,
29922,
2212,
1144,
29908,
13,
13,
13,
1753,
1243,
29918,
19438,
29918,
2271,
29918,
2541,
29918,
17833,
29918,
17057,
267,
7295,
13,
1678,
3142,
353,
3667,
29879,
29889,
19438,
29918,
2271,
29898,
18267,
29918,
25416,
29918,
4219,
718,
5591,
613,
6796,
29914,
2754,
458,
613,
376,
29941,
29889,
29900,
29914,
7507,
12975,
2314,
13,
1678,
4974,
3142,
1275,
376,
991,
597,
1688,
29889,
6914,
261,
29889,
510,
29914,
2754,
29914,
29941,
29889,
29900,
29914,
7507,
29908,
13,
13,
13,
26029,
29918,
949,
519,
29918,
1688,
11436,
353,
518,
13,
1678,
313,
29900,
29889,
29900,
29900,
29900,
29900,
29900,
29906,
29941,
29946,
29945,
29892,
376,
29900,
6923,
4968,
13,
1678,
313,
29900,
29889,
29900,
29906,
29892,
376,
29900,
6923,
4968,
13,
1678,
313,
29953,
29900,
29892,
376,
29896,
11015,
4968,
13,
1678,
313,
29953,
29896,
29889,
29900,
29900,
29906,
29892,
376,
29896,
11015,
322,
29871,
29896,
1473,
4968,
13,
1678,
313,
29953,
29906,
29892,
376,
29896,
11015,
322,
29871,
29906,
6923,
4968,
13,
1678,
313,
29906,
29955,
29929,
29900,
29892,
376,
29946,
29953,
6233,
322,
29871,
29941,
29900,
6923,
4968,
13,
29962,
13,
13,
13,
29992,
2272,
1688,
29889,
3502,
29889,
3207,
300,
374,
911,
703,
295,
28170,
29892,
9684,
613,
5199,
29918,
949,
519,
29918,
1688,
11436,
29897,
13,
1753,
1243,
29918,
26029,
29918,
949,
519,
29898,
295,
28170,
29892,
3806,
1125,
13,
1678,
5199,
29918,
949,
519,
353,
3667,
29879,
29889,
26029,
29918,
949,
519,
29898,
295,
28170,
29897,
13,
1678,
4974,
5199,
29918,
949,
519,
1275,
3806,
13,
13,
13,
657,
29918,
16432,
29918,
1688,
11436,
353,
518,
13,
1678,
4852,
3389,
29918,
2850,
613,
376,
4176,
376,
511,
13,
1678,
4852,
3389,
29918,
9294,
613,
376,
1272,
1243,
376,
511,
13,
1678,
4852,
3389,
29918,
3051,
613,
376,
3051,
376,
511,
13,
1678,
4852,
16107,
2385,
29889,
15480,
613,
376,
4968,
13,
29962,
13,
13,
13,
29992,
2272,
1688,
29889,
3502,
29889,
3207,
300,
374,
911,
703,
9144,
29918,
978,
29892,
9684,
613,
679,
29918,
16432,
29918,
1688,
11436,
29897,
13,
1753,
1243,
29918,
657,
29918,
16432,
29898,
9144,
29918,
978,
29892,
3806,
1125,
13,
1678,
9493,
353,
3667,
29879,
29889,
657,
29918,
16432,
29898,
9144,
29918,
978,
29897,
13,
1678,
4974,
9493,
1275,
3806,
13,
13,
13,
1990,
4321,
3403,
18984,
6185,
272,
1061,
29898,
348,
27958,
29889,
3057,
8259,
1125,
13,
1678,
822,
1243,
29918,
1188,
29918,
4176,
29898,
1311,
1125,
13,
4706,
411,
1583,
29889,
9294,
3403,
29879,
29898,
21707,
29922,
21707,
29892,
3233,
543,
11690,
1159,
408,
7477,
29901,
13,
9651,
3653,
353,
26494,
18680,
580,
13,
9651,
3653,
17255,
978,
1649,
353,
376,
3389,
29918,
2850,
29908,
13,
9651,
10200,
630,
29918,
9891,
353,
3667,
29879,
29889,
1188,
29918,
19708,
29898,
9891,
29897,
13,
9651,
10200,
630,
29918,
9891,
580,
13,
4706,
1583,
29889,
9294,
797,
703,
11690,
29901,
21494,
23435,
29901,
26010,
3758,
8845,
297,
613,
7477,
29889,
4905,
29961,
29900,
2314,
13,
13,
1678,
822,
1243,
29918,
1188,
29918,
9294,
29898,
1311,
1125,
13,
4706,
411,
1583,
29889,
9294,
3403,
29879,
29898,
21707,
29922,
21707,
29892,
3233,
543,
11690,
1159,
408,
7477,
29901,
13,
9651,
3653,
353,
26494,
18680,
580,
13,
9651,
3653,
17255,
978,
1649,
353,
376,
3389,
29918,
9294,
29908,
13,
9651,
10200,
630,
29918,
9891,
353,
3667,
29879,
29889,
1188,
29918,
19708,
29898,
9891,
29897,
13,
9651,
10200,
630,
29918,
9891,
580,
13,
4706,
1583,
29889,
9294,
797,
703,
11690,
29901,
21494,
23435,
29901,
26010,
848,
1243,
8845,
297,
613,
7477,
29889,
4905,
29961,
29900,
2314,
13,
13,
1678,
822,
1243,
29918,
1188,
29918,
3051,
29898,
1311,
1125,
13,
4706,
411,
1583,
29889,
9294,
3403,
29879,
29898,
21707,
29922,
21707,
29892,
3233,
543,
11690,
1159,
408,
7477,
29901,
13,
9651,
3653,
353,
26494,
18680,
580,
13,
9651,
3653,
17255,
978,
1649,
353,
376,
3389,
29918,
3051,
29908,
13,
9651,
10200,
630,
29918,
9891,
353,
3667,
29879,
29889,
1188,
29918,
19708,
29898,
9891,
29897,
13,
9651,
10200,
630,
29918,
9891,
580,
13,
4706,
1583,
29889,
9294,
797,
703,
11690,
29901,
21494,
23435,
29901,
26010,
2793,
8845,
297,
613,
7477,
29889,
4905,
29961,
29900,
2314,
13,
13,
1678,
822,
1243,
29918,
1188,
29918,
1228,
29898,
1311,
1125,
13,
4706,
411,
1583,
29889,
9294,
3403,
29879,
29898,
21707,
29922,
21707,
29892,
3233,
543,
11690,
1159,
408,
7477,
29901,
13,
9651,
3653,
353,
26494,
18680,
580,
13,
9651,
3653,
17255,
978,
1649,
353,
376,
16107,
24204,
29889,
15480,
29908,
13,
9651,
10200,
630,
29918,
9891,
353,
3667,
29879,
29889,
1188,
29918,
19708,
29898,
9891,
29897,
13,
9651,
10200,
630,
29918,
9891,
580,
13,
4706,
1583,
29889,
9294,
797,
703,
11690,
29901,
21494,
23435,
29901,
26010,
8845,
297,
613,
7477,
29889,
4905,
29961,
29900,
2314,
13,
13,
13,
1753,
1243,
29918,
305,
18801,
29918,
18280,
29918,
9684,
29918,
9902,
7295,
13,
1678,
304,
29918,
29812,
353,
1051,
29898,
3881,
29898,
29896,
29900,
876,
29871,
396,
756,
3309,
310,
29871,
29896,
29900,
13,
1678,
4974,
7431,
29898,
1761,
29898,
13239,
29889,
305,
18801,
29898,
517,
29918,
29812,
29892,
29871,
29945,
4961,
1275,
29871,
29906,
13,
1678,
4974,
7431,
29898,
1761,
29898,
13239,
29889,
305,
18801,
29898,
517,
29918,
29812,
29892,
29871,
29929,
4961,
1275,
29871,
29906,
13,
1678,
4974,
7431,
29898,
1761,
29898,
13239,
29889,
305,
18801,
29898,
517,
29918,
29812,
29892,
29871,
29896,
29900,
4961,
1275,
29871,
29896,
13,
1678,
4974,
7431,
29898,
1761,
29898,
13239,
29889,
305,
18801,
29898,
517,
29918,
29812,
29892,
29871,
29896,
29896,
4961,
1275,
29871,
29896,
13,
2
] |
sabnzbd/constants.py | jxyzn/sabnzbd | 0 | 197091 | <filename>sabnzbd/constants.py<gh_stars>0
#!/usr/bin/python3 -OO
# Copyright 2007-2021 The SABnzbd-Team <<EMAIL>>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
import os
from collections import namedtuple
from re import compile
CONFIG_VERSION = 19
QUEUE_VERSION = 10
POSTPROC_QUEUE_VERSION = 2
REC_RAR_VERSION = 550
PNFO = namedtuple(
"PNFO",
"repair unpack delete script nzo_id filename labels password unpackstrht "
"msgid category url bytes_left bytes avg_stamp avg_date finished_files "
"active_files queued_files status priority bytes_missing direct_unpack",
)
QNFO = namedtuple("QNFO", "bytes bytes_left bytes_left_previous_page list q_size_list q_fullsize")
ANFO = namedtuple("ANFO", "article_sum cache_size cache_limit")
# Leave some space for "_UNPACK_" which we append during post-proc
# Or, when extra ".1", ".2" etc. are added for identically named jobs
DEF_FOLDER_MAX = 256 - 10
DEF_FILE_MAX = 255 - 10 # max filename length on modern filesystems, minus some room for extra chars later on
GIGI = float(2 ** 30)
MEBI = float(2 ** 20)
KIBI = float(2 ** 10)
BYTES_FILE_NAME_OLD = "totals9.sab"
BYTES_FILE_NAME = "totals10.sab"
QUEUE_FILE_TMPL = "queue%s.sab"
QUEUE_FILE_NAME = QUEUE_FILE_TMPL % QUEUE_VERSION
POSTPROC_QUEUE_FILE_NAME = "postproc%s.sab" % POSTPROC_QUEUE_VERSION
RSS_FILE_NAME = "rss_data.sab"
SCAN_FILE_NAME = "watched_data2.sab"
RATING_FILE_NAME = "Rating.sab"
FUTURE_Q_FOLDER = "future"
JOB_ADMIN = "__ADMIN__"
VERIFIED_FILE = "__verified__"
RENAMES_FILE = "__renames__"
ATTRIB_FILE = "SABnzbd_attrib"
REPAIR_REQUEST = "repair-all.sab"
SABYENC_VERSION_REQUIRED = "4.0.0"
DB_HISTORY_VERSION = 1
DB_HISTORY_NAME = "history%s.db" % DB_HISTORY_VERSION
DEF_DOWNLOAD_DIR = os.path.normpath("Downloads/incomplete")
DEF_COMPLETE_DIR = os.path.normpath("Downloads/complete")
DEF_ADMIN_DIR = "admin"
DEF_NZBBACK_DIR = ""
DEF_LANGUAGE = "locale"
DEF_INTERFACES = "interfaces"
DEF_EMAIL_TMPL = "email"
DEF_STDCONFIG = "Config"
DEF_STDINTF = "Glitter"
DEF_SKIN_COLORS = {"Glitter": "Auto", "plush": "gold"}
DEF_MAIN_TMPL = os.path.normpath("templates/main.tmpl")
DEF_INI_FILE = "sabnzbd.ini"
DEF_HOST = "127.0.0.1"
DEF_PORT = 8080
DEF_WORKDIR = "sabnzbd"
DEF_LOG_FILE = "sabnzbd.log"
DEF_LOG_ERRFILE = "sabnzbd.error.log"
DEF_LOG_CHERRY = "cherrypy.log"
DEF_ARTICLE_CACHE_DEFAULT = "500M"
DEF_ARTICLE_CACHE_MAX = "1G"
DEF_TIMEOUT = 60
DEF_SCANRATE = 5
MAX_WARNINGS = 20
MAX_BAD_ARTICLES = 5
# Constants affecting download performance
MIN_DECODE_QUEUE = 10
LIMIT_DECODE_QUEUE = 100
DIRECT_WRITE_TRIGGER = 35
MAX_ASSEMBLER_QUEUE = 5
REPAIR_PRIORITY = 3
FORCE_PRIORITY = 2
HIGH_PRIORITY = 1
NORMAL_PRIORITY = 0
LOW_PRIORITY = -1
DEFAULT_PRIORITY = -100
PAUSED_PRIORITY = -2
DUP_PRIORITY = -3
STOP_PRIORITY = -4
INTERFACE_PRIORITIES = {
FORCE_PRIORITY: "Force",
REPAIR_PRIORITY: "Repair",
HIGH_PRIORITY: "High",
NORMAL_PRIORITY: "Normal",
LOW_PRIORITY: "Low",
}
STAGES = {"Source": 0, "Download": 1, "Servers": 2, "Repair": 3, "Filejoin": 4, "Unpack": 5, "Script": 6}
VALID_ARCHIVES = (".zip", ".rar", ".7z")
VALID_NZB_FILES = (".nzb", ".gz", ".bz2")
CHEETAH_DIRECTIVES = {"directiveStartToken": "<!--#", "directiveEndToken": "#-->", "prioritizeSearchListOverSelf": True}
IGNORED_FOLDERS = ("@eaDir", ".appleDouble")
# (MATCHER, [EXTRA, MATCHERS])
series_match = [
(compile(r"( [sS]|[\d]+)x(\d+)"), [compile(r"^[-\.]+([sS]|[\d])+x(\d+)"), compile(r"^[-\.](\d+)")]), # 1x01
(
compile(r"[Ss](\d+)[\.\-]?[Ee](\d+)"), # S01E01
[compile(r"^[-\.]+[Ss](\d+)[\.\-]?[Ee](\d+)"), compile(r"^[-\.](\d+)")],
),
(compile(r"[ \-_\.](\d)(\d{2,2})[ \-_\.]"), []), # .101. / _101_ / etc.
(compile(r"[ \-_\.](\d)(\d{2,2})$"), []), # .101 at end of title
]
date_match = [r"(\d{4})\W(\d{1,2})\W(\d{1,2})", r"(\d{1,2})\W(\d{1,2})\W(\d{4})"] # 2008-10-16 # 10.16.2008
year_match = r"[\W]([1|2]\d{3})([^\w]|$)" # Something '(YYYY)' or '.YYYY.' or ' YYYY '
sample_match = r"((^|[\W_])(sample|proof))" # something-sample or something-proof
resolution_match = r"(^|[\W_])((240|360|480|540|576|720|900|1080|1440|2160|4320)[piP])([\W_]|$)" # 576i, 720p, 1080P
class Status:
COMPLETED = "Completed" # PP: Job is finished
CHECKING = "Checking" # Q: Pre-check is running
DOWNLOADING = "Downloading" # Q: Normal downloading
EXTRACTING = "Extracting" # PP: Archives are being extracted
FAILED = "Failed" # PP: Job has failed, now in History
FETCHING = "Fetching" # Q: Job is downloading extra par2 files
GRABBING = "Grabbing" # Q: Getting an NZB from an external site
MOVING = "Moving" # PP: Files are being moved
PAUSED = "Paused" # Q: Job is paused
QUEUED = "Queued" # Q: Job is waiting for its turn to download or post-process
QUICK_CHECK = "QuickCheck" # PP: QuickCheck verification is running
REPAIRING = "Repairing" # PP: Job is being repaired (by par2)
RUNNING = "Running" # PP: User's post processing script is running
VERIFYING = "Verifying" # PP: Job is being verified (by par2)
DELETED = "Deleted" # Q: Job has been deleted (and is almost gone)
PROP = "Propagating" # Q: Delayed download
| [
1,
529,
9507,
29958,
29879,
370,
29876,
29920,
6448,
29914,
3075,
1934,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
4691,
29941,
448,
29949,
29949,
13,
29937,
14187,
1266,
29871,
29906,
29900,
29900,
29955,
29899,
29906,
29900,
29906,
29896,
450,
317,
2882,
29876,
29920,
6448,
29899,
19409,
3532,
26862,
6227,
6778,
13,
29937,
13,
29937,
910,
1824,
338,
3889,
7047,
29936,
366,
508,
2654,
391,
2666,
372,
322,
29914,
272,
13,
29937,
6623,
372,
1090,
278,
4958,
310,
278,
15143,
4593,
5236,
19245,
13,
29937,
408,
6369,
491,
278,
12362,
18540,
10606,
29936,
2845,
1873,
29871,
29906,
13,
29937,
310,
278,
19245,
29892,
470,
313,
271,
596,
2984,
29897,
738,
2678,
1873,
29889,
13,
29937,
13,
29937,
910,
1824,
338,
13235,
297,
278,
4966,
393,
372,
674,
367,
5407,
29892,
13,
29937,
541,
399,
1806,
8187,
2692,
13764,
29979,
399,
1718,
29934,
13566,
29979,
29936,
1728,
1584,
278,
2411,
2957,
1370,
21867,
29891,
310,
13,
29937,
341,
1001,
3210,
13566,
2882,
6227,
11937,
470,
383,
1806,
8186,
1799,
15842,
319,
349,
8322,
2965,
13309,
1718,
349,
4574,
13152,
1660,
29889,
29871,
2823,
278,
13,
29937,
15143,
4593,
5236,
19245,
363,
901,
4902,
29889,
13,
29937,
13,
29937,
887,
881,
505,
4520,
263,
3509,
310,
278,
15143,
4593,
5236,
19245,
13,
29937,
3412,
411,
445,
1824,
29936,
565,
451,
29892,
2436,
304,
278,
12362,
18540,
13,
29937,
10606,
29892,
9266,
1696,
29871,
29945,
29896,
21504,
7103,
29892,
29008,
386,
383,
10102,
29892,
12115,
29892,
14861,
259,
29900,
29906,
29896,
29896,
29900,
29899,
29896,
29941,
29900,
29896,
29892,
8278,
29889,
13,
13,
5215,
2897,
13,
3166,
16250,
1053,
4257,
23583,
13,
3166,
337,
1053,
6633,
13,
13,
25903,
29918,
16358,
353,
29871,
29896,
29929,
13,
13,
11144,
4462,
29918,
16358,
353,
29871,
29896,
29900,
13,
5438,
8618,
29907,
29918,
11144,
4462,
29918,
16358,
353,
29871,
29906,
13,
13,
1525,
29907,
29918,
29934,
1718,
29918,
16358,
353,
29871,
29945,
29945,
29900,
13,
13,
15695,
5800,
353,
4257,
23583,
29898,
13,
1678,
376,
15695,
5800,
613,
13,
1678,
376,
3445,
1466,
443,
4058,
5217,
2471,
302,
2502,
29918,
333,
10422,
11073,
4800,
443,
4058,
710,
400,
376,
13,
1678,
376,
7645,
333,
7663,
3142,
6262,
29918,
1563,
6262,
1029,
29887,
29918,
303,
1160,
1029,
29887,
29918,
1256,
7743,
29918,
5325,
376,
13,
1678,
376,
4925,
29918,
5325,
712,
6742,
29918,
5325,
4660,
20136,
6262,
29918,
27259,
1513,
29918,
348,
4058,
613,
13,
29897,
13,
13,
29984,
29940,
5800,
353,
4257,
23583,
703,
29984,
29940,
5800,
613,
376,
13193,
6262,
29918,
1563,
6262,
29918,
1563,
29918,
24957,
29918,
3488,
1051,
3855,
29918,
2311,
29918,
1761,
3855,
29918,
8159,
2311,
1159,
13,
13,
2190,
5800,
353,
4257,
23583,
703,
2190,
5800,
613,
376,
7914,
29918,
2083,
7090,
29918,
2311,
7090,
29918,
13400,
1159,
13,
13,
29937,
951,
1351,
777,
2913,
363,
11119,
3904,
29925,
11375,
27508,
607,
591,
9773,
2645,
1400,
29899,
15439,
13,
29937,
1394,
29892,
746,
4805,
11393,
29896,
613,
11393,
29906,
29908,
2992,
29889,
526,
2715,
363,
2893,
1711,
4257,
17643,
13,
24405,
29918,
29943,
5607,
8032,
29918,
12648,
353,
29871,
29906,
29945,
29953,
448,
29871,
29896,
29900,
13,
24405,
29918,
7724,
29918,
12648,
353,
29871,
29906,
29945,
29945,
448,
29871,
29896,
29900,
29871,
396,
4236,
10422,
3309,
373,
5400,
22101,
29879,
29892,
26134,
777,
5716,
363,
4805,
22524,
2678,
373,
13,
13,
29954,
6259,
29902,
353,
5785,
29898,
29906,
3579,
29871,
29941,
29900,
29897,
13,
2303,
12809,
353,
5785,
29898,
29906,
3579,
29871,
29906,
29900,
29897,
13,
29968,
8979,
29902,
353,
5785,
29898,
29906,
3579,
29871,
29896,
29900,
29897,
13,
13,
22716,
29911,
2890,
29918,
7724,
29918,
5813,
29918,
5607,
29928,
353,
376,
4260,
1338,
29929,
29889,
29879,
370,
29908,
13,
22716,
29911,
2890,
29918,
7724,
29918,
5813,
353,
376,
4260,
1338,
29896,
29900,
29889,
29879,
370,
29908,
13,
11144,
4462,
29918,
7724,
29918,
29911,
3580,
29931,
353,
376,
9990,
29995,
29879,
29889,
29879,
370,
29908,
13,
11144,
4462,
29918,
7724,
29918,
5813,
353,
660,
4462,
4462,
29918,
7724,
29918,
29911,
3580,
29931,
1273,
660,
4462,
4462,
29918,
16358,
13,
5438,
8618,
29907,
29918,
11144,
4462,
29918,
7724,
29918,
5813,
353,
376,
2490,
15439,
29995,
29879,
29889,
29879,
370,
29908,
1273,
11971,
8618,
29907,
29918,
11144,
4462,
29918,
16358,
13,
29934,
1799,
29918,
7724,
29918,
5813,
353,
376,
29878,
893,
29918,
1272,
29889,
29879,
370,
29908,
13,
7187,
2190,
29918,
7724,
29918,
5813,
353,
376,
12344,
287,
29918,
1272,
29906,
29889,
29879,
370,
29908,
13,
29934,
1299,
4214,
29918,
7724,
29918,
5813,
353,
376,
29934,
1218,
29889,
29879,
370,
29908,
13,
29943,
2692,
11499,
29918,
29984,
29918,
29943,
5607,
8032,
353,
376,
29888,
9130,
29908,
13,
29967,
14824,
29918,
3035,
16173,
353,
376,
1649,
3035,
16173,
1649,
29908,
13,
5348,
29902,
3738,
3352,
29918,
7724,
353,
376,
1649,
369,
2164,
1649,
29908,
13,
29934,
1430,
25797,
29903,
29918,
7724,
353,
376,
1649,
1267,
1280,
1649,
29908,
13,
1299,
29911,
3960,
29933,
29918,
7724,
353,
376,
29903,
2882,
29876,
29920,
6448,
29918,
1131,
1091,
29908,
13,
1525,
7228,
8193,
29918,
16244,
353,
376,
3445,
1466,
29899,
497,
29889,
29879,
370,
29908,
13,
13,
29903,
2882,
29979,
1430,
29907,
29918,
16358,
29918,
1525,
29984,
3120,
19386,
353,
376,
29946,
29889,
29900,
29889,
29900,
29908,
13,
13,
4051,
29918,
29950,
9047,
18929,
29918,
16358,
353,
29871,
29896,
13,
4051,
29918,
29950,
9047,
18929,
29918,
5813,
353,
376,
18434,
29995,
29879,
29889,
2585,
29908,
1273,
6535,
29918,
29950,
9047,
18929,
29918,
16358,
13,
13,
24405,
29918,
3970,
16048,
29428,
29918,
9464,
353,
2897,
29889,
2084,
29889,
12324,
2084,
703,
6767,
18132,
29914,
262,
8835,
1159,
13,
24405,
29918,
21514,
18476,
29918,
9464,
353,
2897,
29889,
2084,
29889,
12324,
2084,
703,
6767,
18132,
29914,
8835,
1159,
13,
24405,
29918,
3035,
16173,
29918,
9464,
353,
376,
6406,
29908,
13,
24405,
29918,
29940,
29999,
14388,
11375,
29918,
9464,
353,
5124,
13,
24405,
29918,
29931,
19453,
29965,
10461,
353,
376,
23337,
29908,
13,
24405,
29918,
23845,
29943,
2477,
2890,
353,
376,
1639,
8726,
29908,
13,
24405,
29918,
26862,
6227,
29918,
29911,
3580,
29931,
353,
376,
5269,
29908,
13,
24405,
29918,
1254,
29928,
25903,
353,
376,
3991,
29908,
13,
24405,
29918,
1254,
29928,
1177,
8969,
353,
376,
29954,
29880,
5171,
29908,
13,
24405,
29918,
16033,
1177,
29918,
15032,
24125,
353,
8853,
29954,
29880,
5171,
1115,
376,
12300,
613,
376,
572,
1878,
1115,
376,
29887,
1025,
9092,
13,
24405,
29918,
29032,
29918,
29911,
3580,
29931,
353,
2897,
29889,
2084,
29889,
12324,
2084,
703,
20943,
29914,
3396,
29889,
18276,
572,
1159,
13,
24405,
29918,
1177,
29902,
29918,
7724,
353,
376,
29879,
370,
29876,
29920,
6448,
29889,
2172,
29908,
13,
24405,
29918,
20832,
353,
376,
29896,
29906,
29955,
29889,
29900,
29889,
29900,
29889,
29896,
29908,
13,
24405,
29918,
15082,
353,
29871,
29947,
29900,
29947,
29900,
13,
24405,
29918,
11686,
29968,
9464,
353,
376,
29879,
370,
29876,
29920,
6448,
29908,
13,
24405,
29918,
14480,
29918,
7724,
353,
376,
29879,
370,
29876,
29920,
6448,
29889,
1188,
29908,
13,
24405,
29918,
14480,
29918,
21662,
7724,
353,
376,
29879,
370,
29876,
29920,
6448,
29889,
2704,
29889,
1188,
29908,
13,
24405,
29918,
14480,
29918,
3210,
1001,
13207,
353,
376,
4630,
719,
2272,
29889,
1188,
29908,
13,
24405,
29918,
8322,
2965,
1307,
29918,
29907,
2477,
9606,
29918,
23397,
353,
376,
29945,
29900,
29900,
29924,
29908,
13,
24405,
29918,
8322,
2965,
1307,
29918,
29907,
2477,
9606,
29918,
12648,
353,
376,
29896,
29954,
29908,
13,
24405,
29918,
15307,
12015,
353,
29871,
29953,
29900,
13,
24405,
29918,
7187,
2190,
29934,
3040,
353,
29871,
29945,
13,
12648,
29918,
29956,
25614,
29903,
353,
29871,
29906,
29900,
13,
12648,
29918,
29933,
3035,
29918,
8322,
2965,
17101,
353,
29871,
29945,
13,
13,
29937,
5798,
1934,
6602,
292,
5142,
4180,
13,
16173,
29918,
2287,
16524,
29918,
11144,
4462,
353,
29871,
29896,
29900,
13,
5265,
26349,
29918,
2287,
16524,
29918,
11144,
4462,
353,
29871,
29896,
29900,
29900,
13,
4571,
26282,
29918,
16365,
29918,
29911,
22789,
17070,
353,
29871,
29941,
29945,
13,
12648,
29918,
3289,
1660,
9486,
29931,
1001,
29918,
11144,
4462,
353,
29871,
29945,
13,
13,
1525,
7228,
8193,
29918,
29829,
1955,
11937,
353,
29871,
29941,
13,
22051,
4741,
29918,
29829,
1955,
11937,
353,
29871,
29906,
13,
29950,
6259,
29950,
29918,
29829,
1955,
11937,
353,
29871,
29896,
13,
29940,
1955,
1529,
29931,
29918,
29829,
1955,
11937,
353,
29871,
29900,
13,
27998,
29918,
29829,
1955,
11937,
353,
448,
29896,
13,
23397,
29918,
29829,
1955,
11937,
353,
448,
29896,
29900,
29900,
13,
7228,
17171,
29928,
29918,
29829,
1955,
11937,
353,
448,
29906,
13,
29928,
4897,
29918,
29829,
1955,
11937,
353,
448,
29941,
13,
1254,
4590,
29918,
29829,
1955,
11937,
353,
448,
29946,
13,
13,
23845,
29943,
11538,
29918,
29829,
1955,
1806,
29059,
353,
426,
13,
1678,
15842,
4741,
29918,
29829,
1955,
11937,
29901,
376,
2831,
346,
613,
13,
1678,
5195,
7228,
8193,
29918,
29829,
1955,
11937,
29901,
376,
5612,
1466,
613,
13,
1678,
379,
6259,
29950,
29918,
29829,
1955,
11937,
29901,
376,
16382,
613,
13,
1678,
405,
1955,
1529,
29931,
29918,
29829,
1955,
11937,
29901,
376,
19077,
613,
13,
1678,
365,
9806,
29918,
29829,
1955,
11937,
29901,
376,
29931,
340,
613,
13,
29913,
13,
13,
1254,
10461,
29903,
353,
8853,
4435,
1115,
29871,
29900,
29892,
376,
22954,
1115,
29871,
29896,
29892,
376,
1748,
874,
1115,
29871,
29906,
29892,
376,
5612,
1466,
1115,
29871,
29941,
29892,
376,
2283,
7122,
1115,
29871,
29946,
29892,
376,
2525,
4058,
1115,
29871,
29945,
29892,
376,
4081,
1115,
29871,
29953,
29913,
13,
13,
26707,
29918,
1718,
3210,
5667,
2890,
353,
313,
1642,
7554,
613,
11393,
13678,
613,
11393,
29955,
29920,
1159,
13,
26707,
29918,
29940,
29999,
29933,
29918,
24483,
353,
313,
1642,
29876,
29920,
29890,
613,
11393,
18828,
613,
11393,
29890,
29920,
29906,
1159,
13,
13,
3210,
29923,
2544,
29909,
29950,
29918,
4571,
26282,
5667,
2890,
353,
8853,
11851,
573,
4763,
6066,
1115,
9872,
6172,
29937,
613,
376,
11851,
573,
5044,
6066,
1115,
12305,
15110,
613,
376,
29886,
13479,
277,
675,
7974,
1293,
3563,
24313,
1115,
5852,
29913,
13,
13,
6259,
6632,
19386,
29918,
29943,
5607,
8032,
29903,
353,
4852,
29992,
11248,
9170,
613,
11393,
11548,
11843,
1159,
13,
13,
29937,
313,
29924,
14789,
1001,
29892,
518,
12194,
4717,
29892,
341,
14789,
23598,
2314,
13,
13757,
29918,
4352,
353,
518,
13,
1678,
313,
12198,
29898,
29878,
29908,
29898,
518,
29879,
29903,
29962,
29989,
7110,
29881,
10062,
29897,
29916,
1194,
29881,
28135,
4968,
518,
12198,
29898,
29878,
29908,
29985,
29961,
2612,
5586,
29974,
4197,
29879,
29903,
29962,
29989,
7110,
29881,
2314,
29974,
29916,
1194,
29881,
28135,
4968,
6633,
29898,
29878,
29908,
29985,
29961,
2612,
24630,
29905,
29881,
29974,
25760,
11724,
29871,
396,
29871,
29896,
29916,
29900,
29896,
13,
1678,
313,
13,
4706,
6633,
29898,
29878,
29908,
29961,
29903,
29879,
850,
29905,
29881,
28135,
7110,
7790,
29899,
29962,
29973,
29961,
29923,
29872,
850,
29905,
29881,
28135,
4968,
29871,
396,
317,
29900,
29896,
29923,
29900,
29896,
13,
4706,
518,
12198,
29898,
29878,
29908,
29985,
29961,
2612,
5586,
29974,
29961,
29903,
29879,
850,
29905,
29881,
28135,
7110,
7790,
29899,
29962,
29973,
29961,
29923,
29872,
850,
29905,
29881,
28135,
4968,
6633,
29898,
29878,
29908,
29985,
29961,
2612,
24630,
29905,
29881,
29974,
25760,
1402,
13,
1678,
10353,
13,
1678,
313,
12198,
29898,
29878,
29908,
29961,
320,
29899,
3187,
24630,
29905,
29881,
29897,
1194,
29881,
29912,
29906,
29892,
29906,
1800,
29961,
320,
29899,
3187,
5586,
4968,
5159,
511,
29871,
396,
869,
29896,
29900,
29896,
29889,
847,
903,
29896,
29900,
29896,
29918,
847,
2992,
29889,
13,
1678,
313,
12198,
29898,
29878,
29908,
29961,
320,
29899,
3187,
24630,
29905,
29881,
29897,
1194,
29881,
29912,
29906,
29892,
29906,
8435,
4968,
5159,
511,
29871,
396,
869,
29896,
29900,
29896,
472,
1095,
310,
3611,
13,
29962,
13,
13,
1256,
29918,
4352,
353,
518,
29878,
29908,
1194,
29881,
29912,
29946,
11606,
29956,
1194,
29881,
29912,
29896,
29892,
29906,
11606,
29956,
1194,
29881,
29912,
29896,
29892,
29906,
1800,
613,
364,
29908,
1194,
29881,
29912,
29896,
29892,
29906,
11606,
29956,
1194,
29881,
29912,
29896,
29892,
29906,
11606,
29956,
1194,
29881,
29912,
29946,
1800,
3108,
29871,
396,
29871,
29906,
29900,
29900,
29947,
29899,
29896,
29900,
29899,
29896,
29953,
29871,
396,
29871,
29896,
29900,
29889,
29896,
29953,
29889,
29906,
29900,
29900,
29947,
13,
13,
6360,
29918,
4352,
353,
364,
29908,
7110,
29956,
850,
29961,
29896,
29989,
29906,
10725,
29881,
29912,
29941,
1800,
4197,
3823,
29893,
29962,
25183,
5513,
29871,
396,
12538,
525,
29898,
14995,
14995,
16029,
470,
15300,
14995,
14995,
6169,
470,
525,
612,
14995,
29979,
525,
13,
13,
11249,
29918,
4352,
353,
364,
29908,
3552,
29985,
29989,
7110,
29956,
29918,
2314,
29898,
11249,
29989,
8017,
876,
29908,
29871,
396,
1554,
29899,
11249,
470,
1554,
29899,
8017,
13,
13,
9778,
918,
29918,
4352,
353,
364,
29908,
29898,
29985,
29989,
7110,
29956,
29918,
2314,
3552,
29906,
29946,
29900,
29989,
29941,
29953,
29900,
29989,
29946,
29947,
29900,
29989,
29945,
29946,
29900,
29989,
29945,
29955,
29953,
29989,
29955,
29906,
29900,
29989,
29929,
29900,
29900,
29989,
29896,
29900,
29947,
29900,
29989,
29896,
29946,
29946,
29900,
29989,
29906,
29896,
29953,
29900,
29989,
29946,
29941,
29906,
29900,
9601,
1631,
29925,
2314,
4197,
29905,
29956,
29918,
29962,
25183,
5513,
29871,
396,
29871,
29945,
29955,
29953,
29875,
29892,
29871,
29955,
29906,
29900,
29886,
29892,
29871,
29896,
29900,
29947,
29900,
29925,
13,
13,
13,
1990,
16034,
29901,
13,
1678,
4810,
3580,
1307,
29911,
3352,
353,
376,
26010,
29908,
29871,
396,
349,
29925,
29901,
17163,
338,
7743,
13,
1678,
23557,
4214,
353,
376,
5596,
292,
29908,
29871,
396,
660,
29901,
29871,
4721,
29899,
3198,
338,
2734,
13,
1678,
360,
9806,
29940,
29428,
4214,
353,
376,
6767,
13234,
29908,
29871,
396,
660,
29901,
29871,
21981,
28536,
13,
1678,
8528,
29911,
4717,
1783,
4214,
353,
376,
5647,
1461,
292,
29908,
29871,
396,
349,
29925,
29901,
28320,
526,
1641,
23892,
13,
1678,
13515,
29902,
20566,
353,
376,
17776,
29908,
29871,
396,
349,
29925,
29901,
17163,
756,
5229,
29892,
1286,
297,
5298,
13,
1678,
383,
2544,
3210,
4214,
353,
376,
20927,
292,
29908,
29871,
396,
660,
29901,
29871,
17163,
338,
28536,
4805,
610,
29906,
2066,
13,
1678,
18016,
2882,
29933,
4214,
353,
376,
29954,
336,
1327,
292,
29908,
29871,
396,
660,
29901,
29871,
24162,
385,
405,
29999,
29933,
515,
385,
7029,
3268,
13,
1678,
16999,
29963,
4214,
353,
376,
29924,
21081,
29908,
29871,
396,
349,
29925,
29901,
12745,
526,
1641,
6153,
13,
1678,
17687,
17171,
29928,
353,
376,
29925,
15244,
29908,
29871,
396,
660,
29901,
29871,
17163,
338,
28454,
13,
1678,
660,
4462,
29965,
3352,
353,
376,
8654,
6742,
29908,
29871,
396,
660,
29901,
29871,
17163,
338,
10534,
363,
967,
2507,
304,
5142,
470,
1400,
29899,
5014,
13,
1678,
660,
29965,
2965,
29968,
29918,
3210,
16658,
353,
376,
2182,
860,
5596,
29908,
29871,
396,
349,
29925,
29901,
26141,
5596,
1147,
2450,
338,
2734,
13,
1678,
5195,
7228,
8193,
4214,
353,
376,
5612,
1466,
292,
29908,
29871,
396,
349,
29925,
29901,
17163,
338,
1641,
1634,
29874,
2859,
313,
1609,
610,
29906,
29897,
13,
1678,
27694,
29940,
4214,
353,
376,
27795,
29908,
29871,
396,
349,
29925,
29901,
4911,
29915,
29879,
1400,
9068,
2471,
338,
2734,
13,
1678,
478,
1001,
6545,
29979,
4214,
353,
376,
6565,
9215,
29908,
29871,
396,
349,
29925,
29901,
17163,
338,
1641,
26834,
313,
1609,
610,
29906,
29897,
13,
1678,
5012,
1307,
29911,
3352,
353,
376,
2772,
22742,
29908,
29871,
396,
660,
29901,
29871,
17163,
756,
1063,
11132,
313,
392,
338,
4359,
7695,
29897,
13,
1678,
13756,
29925,
353,
376,
1184,
13573,
1218,
29908,
29871,
396,
660,
29901,
29871,
5556,
388,
287,
5142,
13,
2
] |
setup.py | fkochan/TSPy | 0 | 141144 | from setuptools import setup, find_packages
setup(
name = "TSPy",
version = "0.1",
packages = find_packages(),
install_requires = [],
author = "fkochan",
description = "A Python wrapper for the TradeStation WebAPI",
url = "https://github.com/fkochan/TSPy"
) | [
1,
515,
731,
21245,
8789,
1053,
6230,
29892,
1284,
29918,
8318,
13,
13,
14669,
29898,
13,
1678,
1024,
353,
376,
29911,
5550,
29891,
613,
13,
1678,
1873,
353,
376,
29900,
29889,
29896,
613,
13,
1678,
9741,
353,
1284,
29918,
8318,
3285,
13,
1678,
2601,
29918,
276,
339,
2658,
353,
19997,
13,
1678,
4148,
353,
376,
29888,
29895,
2878,
273,
613,
13,
1678,
6139,
353,
376,
29909,
5132,
14476,
363,
278,
27226,
22814,
2563,
8787,
613,
13,
1678,
3142,
353,
376,
991,
597,
3292,
29889,
510,
29914,
29888,
29895,
2878,
273,
29914,
29911,
5550,
29891,
29908,
13,
29897,
2
] |
tests/api/services_test.py | comodit/synapse-client | 2 | 182845 | import unittest
from tests.api.client import TestClient
from syncli.api.services import ServicesApi
class ServicesApiTest(unittest.TestCase):
@classmethod
def setUpClass(self):
self.client = TestClient(ServicesApi)
@classmethod
def tearDownClass(self):
self.client.disconnect()
def test_status_success(self):
"""Check if we can retrieve the status of an existing service"""
name = "rsyslog"
self.stop(name, assertion=None)
self.status(name, assertion=True)
def test_status_failure(self):
"""Check if retrieving status of non existing service returns an
error."""
name = "qenqzeofnpndj"
self.stop(name, assertion=None)
self.status(name, assertion=False)
def test_start_success(self):
"""Try starting an existing service"""
name = "rsyslog"
self.stop(name, assertion=None)
self.start(name, assertion=True)
def test_start_failure(self):
"""Try starting an unknown service"""
name = "qenqzeofnpndj"
self.start(name, assertion=False)
def test_stop_success(self):
"""Try stopping an unknown service"""
name = "rsyslog"
self.start(name, assertion=None)
self.stop(name, assertion=True)
def test_stop_failure(self):
"""Try stopping an unknown service"""
name = "qenqzeofnpndj"
self.stop(name, assertion=False)
def status(self, name, assertion=None):
request = self.client.api.status(name)
self.client.send(request)
responses = self.client.get_responses()
for resp in responses:
if assertion:
self.assertTrue('error' not in resp)
if assertion is False:
self.assertTrue(resp['status']['running'] is False)
self.assertTrue(resp['status']['enabled'] is False)
def start(self, name, assertion=None):
request = self.client.api.start(name)
self.client.send(request)
responses = self.client.get_responses()
for resp in responses:
if assertion:
self.assertTrue('error' not in resp)
self.assertTrue(resp['status']['running'] is True)
if assertion is False:
self.assertFalse('error' not in resp)
#self.assertFalse(resp['status']['running'] is True)
def stop(self, name, assertion=None):
request = self.client.api.stop(name)
self.client.send(request)
responses = self.client.get_responses()
for resp in responses:
if assertion:
self.assertTrue('error' not in resp)
self.assertTrue(resp['status']['running'] is False)
if assertion is False:
#self.assertFalse('error' not in resp)
self.assertTrue(resp['status']['running'] is False)
if __name__ == '__main__':
unittest.main()
| [
1,
1053,
443,
27958,
13,
13,
3166,
6987,
29889,
2754,
29889,
4645,
1053,
4321,
4032,
13,
3166,
16523,
492,
29889,
2754,
29889,
9916,
1053,
15538,
11713,
13,
13,
13,
1990,
15538,
11713,
3057,
29898,
348,
27958,
29889,
3057,
8259,
1125,
13,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
731,
3373,
2385,
29898,
1311,
1125,
13,
4706,
1583,
29889,
4645,
353,
4321,
4032,
29898,
13779,
11713,
29897,
13,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
734,
279,
6767,
2385,
29898,
1311,
1125,
13,
4706,
1583,
29889,
4645,
29889,
2218,
6915,
580,
13,
13,
1678,
822,
1243,
29918,
4882,
29918,
8698,
29898,
1311,
1125,
13,
4706,
9995,
5596,
565,
591,
508,
10563,
278,
4660,
310,
385,
5923,
2669,
15945,
29908,
13,
4706,
1024,
353,
376,
2288,
952,
1188,
29908,
13,
4706,
1583,
29889,
9847,
29898,
978,
29892,
28306,
29922,
8516,
29897,
13,
4706,
1583,
29889,
4882,
29898,
978,
29892,
28306,
29922,
5574,
29897,
13,
13,
1678,
822,
1243,
29918,
4882,
29918,
14057,
545,
29898,
1311,
1125,
13,
4706,
9995,
5596,
565,
5663,
15387,
4660,
310,
1661,
5923,
2669,
3639,
385,
29871,
13,
4706,
1059,
1213,
15945,
13,
4706,
1024,
353,
376,
29939,
264,
29939,
911,
974,
9302,
299,
29926,
29908,
13,
4706,
1583,
29889,
9847,
29898,
978,
29892,
28306,
29922,
8516,
29897,
13,
4706,
1583,
29889,
4882,
29898,
978,
29892,
28306,
29922,
8824,
29897,
13,
13,
1678,
822,
1243,
29918,
2962,
29918,
8698,
29898,
1311,
1125,
13,
4706,
9995,
15870,
6257,
385,
5923,
2669,
15945,
29908,
13,
4706,
1024,
353,
376,
2288,
952,
1188,
29908,
13,
4706,
1583,
29889,
9847,
29898,
978,
29892,
28306,
29922,
8516,
29897,
13,
4706,
1583,
29889,
2962,
29898,
978,
29892,
28306,
29922,
5574,
29897,
13,
13,
1678,
822,
1243,
29918,
2962,
29918,
14057,
545,
29898,
1311,
1125,
13,
4706,
9995,
15870,
6257,
385,
9815,
2669,
15945,
29908,
13,
4706,
1024,
353,
376,
29939,
264,
29939,
911,
974,
9302,
299,
29926,
29908,
13,
4706,
1583,
29889,
2962,
29898,
978,
29892,
28306,
29922,
8824,
29897,
13,
13,
1678,
822,
1243,
29918,
9847,
29918,
8698,
29898,
1311,
1125,
13,
4706,
9995,
15870,
25480,
385,
9815,
2669,
15945,
29908,
13,
4706,
1024,
353,
376,
2288,
952,
1188,
29908,
13,
4706,
1583,
29889,
2962,
29898,
978,
29892,
28306,
29922,
8516,
29897,
13,
4706,
1583,
29889,
9847,
29898,
978,
29892,
28306,
29922,
5574,
29897,
13,
13,
1678,
822,
1243,
29918,
9847,
29918,
14057,
545,
29898,
1311,
1125,
13,
4706,
9995,
15870,
25480,
385,
9815,
2669,
15945,
29908,
13,
4706,
1024,
353,
376,
29939,
264,
29939,
911,
974,
9302,
299,
29926,
29908,
13,
4706,
1583,
29889,
9847,
29898,
978,
29892,
28306,
29922,
8824,
29897,
13,
13,
1678,
822,
4660,
29898,
1311,
29892,
1024,
29892,
28306,
29922,
8516,
1125,
13,
4706,
2009,
353,
1583,
29889,
4645,
29889,
2754,
29889,
4882,
29898,
978,
29897,
13,
4706,
1583,
29889,
4645,
29889,
6717,
29898,
3827,
29897,
13,
4706,
20890,
353,
1583,
29889,
4645,
29889,
657,
29918,
26679,
267,
580,
13,
13,
4706,
363,
4613,
297,
20890,
29901,
13,
9651,
565,
28306,
29901,
13,
18884,
1583,
29889,
9294,
5574,
877,
2704,
29915,
451,
297,
4613,
29897,
13,
9651,
565,
28306,
338,
7700,
29901,
13,
18884,
1583,
29889,
9294,
5574,
29898,
13713,
1839,
4882,
16215,
21094,
2033,
338,
7700,
29897,
13,
18884,
1583,
29889,
9294,
5574,
29898,
13713,
1839,
4882,
16215,
17590,
2033,
338,
7700,
29897,
13,
13,
1678,
822,
1369,
29898,
1311,
29892,
1024,
29892,
28306,
29922,
8516,
1125,
13,
4706,
2009,
353,
1583,
29889,
4645,
29889,
2754,
29889,
2962,
29898,
978,
29897,
13,
4706,
1583,
29889,
4645,
29889,
6717,
29898,
3827,
29897,
13,
4706,
20890,
353,
1583,
29889,
4645,
29889,
657,
29918,
26679,
267,
580,
13,
13,
4706,
363,
4613,
297,
20890,
29901,
13,
9651,
565,
28306,
29901,
13,
18884,
1583,
29889,
9294,
5574,
877,
2704,
29915,
451,
297,
4613,
29897,
13,
18884,
1583,
29889,
9294,
5574,
29898,
13713,
1839,
4882,
16215,
21094,
2033,
338,
5852,
29897,
13,
9651,
565,
28306,
338,
7700,
29901,
13,
18884,
1583,
29889,
9294,
8824,
877,
2704,
29915,
451,
297,
4613,
29897,
13,
18884,
396,
1311,
29889,
9294,
8824,
29898,
13713,
1839,
4882,
16215,
21094,
2033,
338,
5852,
29897,
13,
13,
1678,
822,
5040,
29898,
1311,
29892,
1024,
29892,
28306,
29922,
8516,
1125,
13,
4706,
2009,
353,
1583,
29889,
4645,
29889,
2754,
29889,
9847,
29898,
978,
29897,
13,
4706,
1583,
29889,
4645,
29889,
6717,
29898,
3827,
29897,
13,
4706,
20890,
353,
1583,
29889,
4645,
29889,
657,
29918,
26679,
267,
580,
13,
13,
4706,
363,
4613,
297,
20890,
29901,
13,
9651,
565,
28306,
29901,
13,
18884,
1583,
29889,
9294,
5574,
877,
2704,
29915,
451,
297,
4613,
29897,
13,
18884,
1583,
29889,
9294,
5574,
29898,
13713,
1839,
4882,
16215,
21094,
2033,
338,
7700,
29897,
13,
9651,
565,
28306,
338,
7700,
29901,
13,
18884,
396,
1311,
29889,
9294,
8824,
877,
2704,
29915,
451,
297,
4613,
29897,
13,
18884,
1583,
29889,
9294,
5574,
29898,
13713,
1839,
4882,
16215,
21094,
2033,
338,
7700,
29897,
13,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
443,
27958,
29889,
3396,
580,
13,
2
] |
leetcode/1143_longest_common_subsequence.py | leetcode-notes/daily-algorithms-practice | 0 | 96848 | <gh_stars>0
class Solution:
def longestCommonSubsequence(self, text1: str, text2: str) -> int:
dp = [[0]*(len(text2)+1) for _ in range(len(text1)+1)]
m, n = len(text1), len(text2)
for i in range(1, m+1):
for j in range(1, n+1):
if text1[i-1] == text2[j-1]:
dp[i][j] = dp[i-1][j-1] + 1
else:
dp[i][j] = max(dp[i-1][j], dp[i][j-1])
return dp[-1][-1]
'''
Success
Details
Runtime: 436 ms, faster than 75.74% of Python3
Memory Usage: 21.3 MB, less than 86.28% of Python3
Next challenges:
Delete Operation for Two Strings
Shortest Common Supersequence
Other DP+String combiantion problems (non premium)
with similar pattern or involving LCS as intermediate step
edit distance - https://leetcode.com/problems/edit-distance/
regex matching - https://leetcode.com/problems/regular-expression-matching/
wildcard matching - https://leetcode.com/problems/wildcard-matching/
shortest common supersequence (solution involves a LCS step)
- https://leetcode.com/problems/shortest-common-supersequence
Longest Palindrome Subsequence (could be solved using LCS)
- https://leetcode.com/problems/longest-palindromic-subsequence/
If someone is finding hard to understand logic,
just be patient and go through
https://www.cs.umd.edu/users/meesh/cmsc351/mount/lectures/lect25-longest-common-subseq.pdf.
Believe me you'll never forget this concept ever.
'''
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
1990,
24380,
29901,
13,
1678,
822,
27217,
18877,
4035,
16506,
29898,
1311,
29892,
1426,
29896,
29901,
851,
29892,
1426,
29906,
29901,
851,
29897,
1599,
938,
29901,
13,
4706,
270,
29886,
353,
5519,
29900,
14178,
29898,
2435,
29898,
726,
29906,
7240,
29896,
29897,
363,
903,
297,
3464,
29898,
2435,
29898,
726,
29896,
7240,
29896,
4638,
13,
13,
4706,
286,
29892,
302,
353,
7431,
29898,
726,
29896,
511,
7431,
29898,
726,
29906,
29897,
13,
4706,
363,
474,
297,
3464,
29898,
29896,
29892,
286,
29974,
29896,
1125,
13,
9651,
363,
432,
297,
3464,
29898,
29896,
29892,
302,
29974,
29896,
1125,
13,
18884,
565,
1426,
29896,
29961,
29875,
29899,
29896,
29962,
1275,
1426,
29906,
29961,
29926,
29899,
29896,
5387,
13,
462,
1678,
270,
29886,
29961,
29875,
3816,
29926,
29962,
353,
270,
29886,
29961,
29875,
29899,
29896,
3816,
29926,
29899,
29896,
29962,
718,
29871,
29896,
13,
18884,
1683,
29901,
13,
462,
1678,
270,
29886,
29961,
29875,
3816,
29926,
29962,
353,
4236,
29898,
6099,
29961,
29875,
29899,
29896,
3816,
29926,
1402,
270,
29886,
29961,
29875,
3816,
29926,
29899,
29896,
2314,
13,
4706,
736,
270,
29886,
14352,
29896,
3816,
29899,
29896,
29962,
13,
13,
13,
12008,
13,
14191,
13,
10602,
13,
7944,
29901,
29871,
29946,
29941,
29953,
10887,
29892,
8473,
1135,
29871,
29955,
29945,
29889,
29955,
29946,
29995,
310,
5132,
29941,
13,
16015,
10783,
482,
29901,
29871,
29906,
29896,
29889,
29941,
13232,
29892,
3109,
1135,
29871,
29947,
29953,
29889,
29906,
29947,
29995,
310,
5132,
29941,
13,
9190,
18066,
267,
29901,
13,
12498,
20462,
363,
7803,
3767,
886,
13,
21322,
342,
13103,
5670,
16506,
13,
13,
16107,
360,
29925,
29974,
1231,
4145,
29875,
424,
291,
4828,
313,
5464,
5188,
1974,
29897,
13,
2541,
2788,
4766,
470,
21677,
365,
9295,
408,
19697,
4331,
13,
13,
5628,
5418,
448,
2045,
597,
280,
300,
401,
29889,
510,
29914,
17199,
29879,
29914,
5628,
29899,
19244,
29914,
13,
13087,
9686,
448,
2045,
597,
280,
300,
401,
29889,
510,
29914,
17199,
29879,
29914,
15227,
29899,
17471,
29899,
4352,
292,
29914,
13,
29893,
789,
7543,
9686,
448,
2045,
597,
280,
300,
401,
29889,
510,
29914,
17199,
29879,
29914,
29893,
789,
7543,
29899,
4352,
292,
29914,
13,
12759,
342,
3619,
2428,
16506,
313,
2929,
918,
20789,
263,
365,
9295,
4331,
29897,
13,
448,
2045,
597,
280,
300,
401,
29889,
510,
29914,
17199,
29879,
29914,
12759,
342,
29899,
9435,
29899,
9136,
16506,
13,
8208,
342,
3793,
513,
4871,
3323,
16506,
313,
26680,
367,
7484,
773,
365,
9295,
29897,
13,
29899,
2045,
597,
280,
300,
401,
29889,
510,
29914,
17199,
29879,
29914,
5426,
342,
29899,
7830,
513,
456,
293,
29899,
1491,
16506,
29914,
13,
13,
3644,
4856,
338,
9138,
2898,
304,
2274,
5900,
29892,
13,
5143,
367,
16500,
322,
748,
1549,
13,
2045,
597,
1636,
29889,
2395,
29889,
398,
29881,
29889,
6085,
29914,
7193,
29914,
1004,
12094,
29914,
29883,
1516,
29883,
29941,
29945,
29896,
29914,
16476,
29914,
781,
1973,
29914,
781,
29906,
29945,
29899,
5426,
342,
29899,
9435,
29899,
1491,
11762,
29889,
5140,
29889,
13,
3741,
2418,
592,
366,
29915,
645,
2360,
9566,
445,
6964,
3926,
29889,
13,
12008,
13,
2
] |
external_executors/dnanexus_wes/dx-wes-lambda/localize_file.py | HumanCellAtlas/portability | 2 | 195972 | <gh_stars>1-10
"""Applet to localize files to DNAnexus.
Create or find an applet in dnanexus that can copy in a remote URL.
"""
import json
import sys
import dxpy
# Two pieces of metadata we can use to tell if this applet is already built and
# available on dnanexus.
APPLET_VERSION = "0.1.4"
APPLET_NAME = "wes_url_localizer"
# The code for the applet itself. This just reads the URL into a dnanexus file
# object.
APPLET_CODE = """
import dxpy
import requests
import google.cloud.storage
@dxpy.entry_point("main")
def main(url, project, folder):
if url.startswith("gs://"):
client = google.cloud.storage.client.Client.create_anonymous_client()
path_parts = url.replace("gs://", "").split("/")
bucket_name = path_parts[0]
bucket = client.bucket(bucket_name)
blob_name = "/".join(path_parts[1:])
blob = bucket.blob(blob_name)
public_url = blob.public_url
elif url.startswith("https://") or url.startswith("http://"):
public_url = url
dx_file = dxpy.new_dxfile(
name=os.path.basename(url),
mode="w",
folder=folder,
parents=True,
project=project)
try:
response = requests.get(public_url, stream=True)
for chunk in response.iter_content(chunk_size=1<<24):
dx_file.write(chunk)
# Close and return the ID prefixed with the new scheme, dx
finally:
dx_file.close()
return {"localized_file": dxpy.dxlink(dx_file.get_id())}
"""
def localize_file(url, project, wes_id):
"""Run the applet to localize a file at a URL to a project and folder
within dnanexus.
Args:
url (string): remote url to localize
project (string): dnanexus project id where the file should go. This
should look like project-\w{24}
wes_id (string): the WES workflow id that was given to the user when
the workflow request was made. This is used to tag the jobs and
create a folder where the localized files should go.
Returns:
Stringified JSON of a future that refers to the output of the dnanexus
job that's copying the URL to dnanexus. Looks like this:
'{"$dnanexus_link": {"job": "job-xxx", "field": "localized_file"}}'
"""
# Find or build the localizer applet (both are very fast)
localizer_applet = get_localizer_applet()
# Run the localization job. This is asynchronous and returns a job id
# immediately
localizer_job = localizer_applet.run(
{
"url": url,
"project": project,
"folder": '/' + wes_id
},
project=project,
properties={"wes_id": wes_id}
)
# Retunr JSON that refers to the future output of the localization job
return json.dumps(localizer_job.get_output_ref("localized_file"))
def get_localizer_applet():
"""Return a dxpy.DXApplet object for the localizer applet."""
# First try to find an existing applet.
found_applets = list(dxpy.find_data_objects(
name=APPLET_NAME,
properties={"version": APPLET_VERSION},
classname="applet",
state="closed",
return_handler=True
))
if found_applets:
return found_applets[0]
else:
return build_applet()
def build_applet():
"""Build the file localizer applet on dnanexus."""
dx_applet_id = dxpy.api.applet_new({
"name": APPLET_NAME,
"title": "WES URL Localizer",
"dxapi": dxpy.API_VERSION,
"project": dxpy.PROJECT_CONTEXT_ID,
"properties": {"version": APPLET_VERSION},
"inputSpec": [
{
"name": "url",
"class": "string"
},
{
"name": "project",
"class": "string"
},
{
"name": "folder",
"class": "string"
}
],
"outputSpec": [
{
"name": "localized_file",
"class": "file"
}
],
"runSpec": {
"code": APPLET_CODE,
"interpreter": "python2.7",
"systemRequirements": {
"*": {"instanceType": "mem1_ssd1_x2"}},
"execDepends": [
{
"name": "google-cloud-storage",
"package_manager": "pip"
}
]
},
"access": {
"network": ["*"],
"project": "UPLOAD"
},
"release": "14.04"
})
return dxpy.DXApplet(dx_applet_id["id"])
# Just for testing
if __name__ == "__main__":
localize_file(sys.argv[1], sys.argv[2], sys.argv[3])
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
15945,
29908,
2052,
1026,
304,
1887,
675,
2066,
304,
25348,
13996,
375,
29889,
13,
13,
4391,
470,
1284,
385,
623,
1026,
297,
270,
13707,
735,
375,
393,
508,
3509,
297,
263,
7592,
3988,
29889,
13,
15945,
29908,
13,
13,
5215,
4390,
13,
5215,
10876,
13,
13,
5215,
15414,
2272,
13,
13,
29937,
7803,
12785,
310,
15562,
591,
508,
671,
304,
2649,
565,
445,
623,
1026,
338,
2307,
4240,
322,
13,
29937,
3625,
373,
270,
13707,
735,
375,
29889,
13,
20576,
1307,
29911,
29918,
16358,
353,
376,
29900,
29889,
29896,
29889,
29946,
29908,
13,
20576,
1307,
29911,
29918,
5813,
353,
376,
29893,
267,
29918,
2271,
29918,
2997,
3950,
29908,
13,
13,
29937,
450,
775,
363,
278,
623,
1026,
3528,
29889,
910,
925,
13623,
278,
3988,
964,
263,
270,
13707,
735,
375,
934,
13,
29937,
1203,
29889,
13,
20576,
1307,
29911,
29918,
16524,
353,
9995,
13,
5215,
15414,
2272,
13,
5215,
7274,
13,
5215,
5386,
29889,
9274,
29889,
12925,
13,
13,
29992,
8235,
2272,
29889,
8269,
29918,
3149,
703,
3396,
1159,
13,
1753,
1667,
29898,
2271,
29892,
2060,
29892,
4138,
1125,
13,
13,
1678,
565,
3142,
29889,
27382,
2541,
703,
3174,
597,
29908,
1125,
13,
4706,
3132,
353,
5386,
29889,
9274,
29889,
12925,
29889,
4645,
29889,
4032,
29889,
3258,
29918,
25772,
29918,
4645,
580,
13,
4706,
2224,
29918,
20895,
353,
3142,
29889,
6506,
703,
3174,
597,
613,
376,
2564,
5451,
11974,
1159,
13,
4706,
20968,
29918,
978,
353,
2224,
29918,
20895,
29961,
29900,
29962,
13,
4706,
20968,
353,
3132,
29889,
21454,
29898,
21454,
29918,
978,
29897,
13,
4706,
23755,
29918,
978,
353,
5591,
1642,
7122,
29898,
2084,
29918,
20895,
29961,
29896,
29901,
2314,
13,
4706,
23755,
353,
20968,
29889,
10054,
29898,
10054,
29918,
978,
29897,
13,
4706,
970,
29918,
2271,
353,
23755,
29889,
3597,
29918,
2271,
13,
1678,
25342,
3142,
29889,
27382,
2541,
703,
991,
597,
1159,
470,
3142,
29889,
27382,
2541,
703,
1124,
597,
29908,
1125,
13,
4706,
970,
29918,
2271,
353,
3142,
13,
13,
1678,
15414,
29918,
1445,
353,
15414,
2272,
29889,
1482,
29918,
8235,
1445,
29898,
13,
4706,
1024,
29922,
359,
29889,
2084,
29889,
6500,
3871,
29898,
2271,
511,
13,
4706,
4464,
543,
29893,
613,
13,
4706,
4138,
29922,
12083,
29892,
13,
4706,
11825,
29922,
5574,
29892,
13,
4706,
2060,
29922,
4836,
29897,
13,
13,
1678,
1018,
29901,
13,
4706,
2933,
353,
7274,
29889,
657,
29898,
3597,
29918,
2271,
29892,
4840,
29922,
5574,
29897,
13,
4706,
363,
19875,
297,
2933,
29889,
1524,
29918,
3051,
29898,
29812,
29918,
2311,
29922,
29896,
9314,
29906,
29946,
1125,
13,
9651,
15414,
29918,
1445,
29889,
3539,
29898,
29812,
29897,
13,
13,
1678,
396,
23186,
322,
736,
278,
3553,
10944,
287,
411,
278,
716,
11380,
29892,
15414,
13,
1678,
7146,
29901,
13,
4706,
15414,
29918,
1445,
29889,
5358,
580,
13,
13,
1678,
736,
8853,
2997,
1891,
29918,
1445,
1115,
15414,
2272,
29889,
8235,
2324,
29898,
8235,
29918,
1445,
29889,
657,
29918,
333,
580,
2915,
13,
15945,
29908,
13,
13,
1753,
1887,
675,
29918,
1445,
29898,
2271,
29892,
2060,
29892,
281,
267,
29918,
333,
1125,
13,
1678,
9995,
6558,
278,
623,
1026,
304,
1887,
675,
263,
934,
472,
263,
3988,
304,
263,
2060,
322,
4138,
13,
1678,
2629,
270,
13707,
735,
375,
29889,
13,
13,
1678,
826,
3174,
29901,
13,
4706,
3142,
313,
1807,
1125,
7592,
3142,
304,
1887,
675,
13,
4706,
2060,
313,
1807,
1125,
270,
13707,
735,
375,
2060,
1178,
988,
278,
934,
881,
748,
29889,
910,
13,
9651,
881,
1106,
763,
2060,
2612,
29893,
29912,
29906,
29946,
29913,
13,
4706,
281,
267,
29918,
333,
313,
1807,
1125,
278,
399,
2890,
27321,
1178,
393,
471,
2183,
304,
278,
1404,
746,
13,
9651,
278,
27321,
2009,
471,
1754,
29889,
910,
338,
1304,
304,
4055,
278,
17643,
322,
13,
9651,
1653,
263,
4138,
988,
278,
1887,
1891,
2066,
881,
748,
29889,
13,
13,
1678,
16969,
29901,
13,
4706,
1714,
2164,
4663,
310,
263,
5434,
393,
14637,
304,
278,
1962,
310,
278,
270,
13707,
735,
375,
13,
4706,
4982,
393,
29915,
29879,
17596,
278,
3988,
304,
270,
13707,
735,
375,
29889,
19887,
763,
445,
29901,
13,
4706,
525,
6377,
29938,
5200,
273,
735,
375,
29918,
2324,
1115,
8853,
9057,
1115,
376,
9057,
29899,
12353,
613,
376,
2671,
1115,
376,
2997,
1891,
29918,
1445,
29908,
930,
29915,
13,
1678,
9995,
13,
13,
1678,
396,
10987,
470,
2048,
278,
1887,
3950,
623,
1026,
313,
20313,
526,
1407,
5172,
29897,
13,
1678,
1887,
3950,
29918,
932,
1026,
353,
679,
29918,
2997,
3950,
29918,
932,
1026,
580,
13,
13,
1678,
396,
7525,
278,
1887,
2133,
4982,
29889,
910,
338,
20489,
322,
3639,
263,
4982,
1178,
13,
1678,
396,
7389,
13,
1678,
1887,
3950,
29918,
9057,
353,
1887,
3950,
29918,
932,
1026,
29889,
3389,
29898,
13,
4706,
426,
13,
9651,
376,
2271,
1115,
3142,
29892,
13,
9651,
376,
4836,
1115,
2060,
29892,
13,
9651,
376,
12083,
1115,
8207,
29915,
718,
281,
267,
29918,
333,
13,
4706,
2981,
13,
4706,
2060,
29922,
4836,
29892,
13,
4706,
4426,
3790,
29908,
29893,
267,
29918,
333,
1115,
281,
267,
29918,
333,
29913,
13,
1678,
1723,
13,
13,
1678,
396,
4649,
348,
29878,
4663,
393,
14637,
304,
278,
5434,
1962,
310,
278,
1887,
2133,
4982,
13,
1678,
736,
4390,
29889,
29881,
17204,
29898,
2997,
3950,
29918,
9057,
29889,
657,
29918,
4905,
29918,
999,
703,
2997,
1891,
29918,
1445,
5783,
13,
13,
1753,
679,
29918,
2997,
3950,
29918,
932,
1026,
7295,
13,
1678,
9995,
11609,
263,
15414,
2272,
29889,
29928,
29990,
2052,
1026,
1203,
363,
278,
1887,
3950,
623,
1026,
1213,
15945,
13,
13,
1678,
396,
3824,
1018,
304,
1284,
385,
5923,
623,
1026,
29889,
13,
1678,
1476,
29918,
932,
10376,
353,
1051,
29898,
8235,
2272,
29889,
2886,
29918,
1272,
29918,
12650,
29898,
13,
4706,
1024,
29922,
20576,
1307,
29911,
29918,
5813,
29892,
13,
4706,
4426,
3790,
29908,
3259,
1115,
12279,
29925,
1307,
29911,
29918,
16358,
1118,
13,
4706,
770,
978,
543,
932,
1026,
613,
13,
4706,
2106,
543,
15603,
613,
13,
4706,
736,
29918,
13789,
29922,
5574,
13,
268,
876,
13,
13,
1678,
565,
1476,
29918,
932,
10376,
29901,
13,
4706,
736,
1476,
29918,
932,
10376,
29961,
29900,
29962,
13,
1678,
1683,
29901,
13,
4706,
736,
2048,
29918,
932,
1026,
580,
13,
13,
13,
1753,
2048,
29918,
932,
1026,
7295,
13,
1678,
9995,
8893,
278,
934,
1887,
3950,
623,
1026,
373,
270,
13707,
735,
375,
1213,
15945,
13,
13,
1678,
15414,
29918,
932,
1026,
29918,
333,
353,
15414,
2272,
29889,
2754,
29889,
932,
1026,
29918,
1482,
3319,
13,
4706,
376,
978,
1115,
12279,
29925,
1307,
29911,
29918,
5813,
29892,
13,
4706,
376,
3257,
1115,
376,
29956,
2890,
3988,
9959,
3950,
613,
13,
4706,
376,
8235,
2754,
1115,
15414,
2272,
29889,
8787,
29918,
16358,
29892,
13,
4706,
376,
4836,
1115,
15414,
2272,
29889,
8618,
17637,
29918,
6007,
16975,
29918,
1367,
29892,
13,
4706,
376,
11330,
1115,
8853,
3259,
1115,
12279,
29925,
1307,
29911,
29918,
16358,
1118,
13,
4706,
376,
2080,
10299,
1115,
518,
13,
9651,
426,
13,
18884,
376,
978,
1115,
376,
2271,
613,
13,
18884,
376,
1990,
1115,
376,
1807,
29908,
13,
9651,
2981,
13,
9651,
426,
13,
18884,
376,
978,
1115,
376,
4836,
613,
13,
18884,
376,
1990,
1115,
376,
1807,
29908,
13,
9651,
2981,
13,
9651,
426,
13,
18884,
376,
978,
1115,
376,
12083,
613,
13,
18884,
376,
1990,
1115,
376,
1807,
29908,
13,
9651,
500,
13,
4706,
21251,
13,
4706,
376,
4905,
10299,
1115,
518,
13,
9651,
426,
13,
18884,
376,
978,
1115,
376,
2997,
1891,
29918,
1445,
613,
13,
18884,
376,
1990,
1115,
376,
1445,
29908,
13,
9651,
500,
13,
4706,
21251,
13,
4706,
376,
3389,
10299,
1115,
426,
13,
9651,
376,
401,
1115,
12279,
29925,
1307,
29911,
29918,
16524,
29892,
13,
9651,
376,
1639,
1457,
357,
1115,
376,
4691,
29906,
29889,
29955,
613,
13,
9651,
376,
5205,
1123,
1548,
1860,
1115,
426,
13,
18884,
26345,
1115,
8853,
8758,
1542,
1115,
376,
6954,
29896,
29918,
893,
29881,
29896,
29918,
29916,
29906,
29908,
11656,
13,
9651,
376,
4258,
8498,
1975,
1115,
518,
13,
18884,
426,
13,
462,
1678,
376,
978,
1115,
376,
3608,
29899,
9274,
29899,
12925,
613,
13,
462,
1678,
376,
5113,
29918,
12847,
1115,
376,
13096,
29908,
13,
18884,
500,
13,
9651,
4514,
13,
4706,
2981,
13,
4706,
376,
5943,
1115,
426,
13,
9651,
376,
11618,
1115,
6796,
29930,
12436,
13,
9651,
376,
4836,
1115,
376,
4897,
29428,
29908,
13,
4706,
2981,
13,
4706,
376,
14096,
1115,
376,
29896,
29946,
29889,
29900,
29946,
29908,
13,
1678,
5615,
13,
13,
1678,
736,
15414,
2272,
29889,
29928,
29990,
2052,
1026,
29898,
8235,
29918,
932,
1026,
29918,
333,
3366,
333,
20068,
13,
13,
29937,
3387,
363,
6724,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
1678,
1887,
675,
29918,
1445,
29898,
9675,
29889,
19218,
29961,
29896,
1402,
10876,
29889,
19218,
29961,
29906,
1402,
10876,
29889,
19218,
29961,
29941,
2314,
13,
2
] |
test/python/test_sigmoid.py | slyalin/openvino_tensorflow | 0 | 182193 | <filename>test/python/test_sigmoid.py<gh_stars>0
# ==============================================================================
# Copyright (C) 2021 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
# ==============================================================================
"""Openvino Tensorflow relu6 test
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import pytest
import tensorflow as tf
tf.compat.v1.disable_eager_execution()
import numpy as np
from common import NgraphTest
class TestSigmoid(NgraphTest):
def test_sigmoid(self):
x = tf.compat.v1.placeholder(tf.float32, shape=(2, 3))
y = tf.compat.v1.placeholder(tf.float32, shape=(2, 3))
z = tf.compat.v1.placeholder(tf.float32, shape=(2, 3))
a = x + y + z
b = tf.nn.sigmoid(a)
# input value and expected value
x_np = np.full((2, 3), 1.0)
y_np = np.full((2, 3), 1.0)
z_np = np.full((2, 3), 1.0)
a_np = x_np + y_np + z_np
b_np = 1. / (1. + np.exp(-a_np))
expected = b_np
sess_fn = lambda sess: sess.run((a, b),
feed_dict={
x: x_np,
y: y_np,
z: z_np
})
assert np.allclose(
self.with_ngraph(sess_fn), self.without_ngraph(sess_fn))
| [
1,
529,
9507,
29958,
1688,
29914,
4691,
29914,
1688,
29918,
18816,
29885,
3398,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
1275,
9166,
9166,
9166,
9166,
4936,
2751,
13,
29937,
14187,
1266,
313,
29907,
29897,
29871,
29906,
29900,
29906,
29896,
18555,
15025,
13,
13,
29937,
10937,
29928,
29990,
29899,
29931,
293,
1947,
29899,
12889,
29901,
13380,
29899,
29906,
29889,
29900,
13,
29937,
1275,
9166,
9166,
9166,
9166,
4936,
2751,
13,
15945,
29908,
6585,
29894,
1789,
323,
6073,
1731,
1104,
29884,
29953,
1243,
13,
13,
15945,
29908,
13,
3166,
4770,
29888,
9130,
1649,
1053,
8380,
29918,
5215,
13,
3166,
4770,
29888,
9130,
1649,
1053,
8542,
13,
3166,
4770,
29888,
9130,
1649,
1053,
1596,
29918,
2220,
13,
13,
5215,
11451,
1688,
13,
13,
5215,
26110,
408,
15886,
13,
13264,
29889,
12667,
29889,
29894,
29896,
29889,
20472,
29918,
29872,
1875,
29918,
22256,
580,
13,
5215,
12655,
408,
7442,
13,
13,
3166,
3619,
1053,
405,
4262,
3057,
13,
13,
13,
1990,
4321,
29903,
335,
29885,
3398,
29898,
29940,
4262,
3057,
1125,
13,
13,
1678,
822,
1243,
29918,
18816,
29885,
3398,
29898,
1311,
1125,
13,
4706,
921,
353,
15886,
29889,
12667,
29889,
29894,
29896,
29889,
27074,
29898,
13264,
29889,
7411,
29941,
29906,
29892,
8267,
7607,
29906,
29892,
29871,
29941,
876,
13,
4706,
343,
353,
15886,
29889,
12667,
29889,
29894,
29896,
29889,
27074,
29898,
13264,
29889,
7411,
29941,
29906,
29892,
8267,
7607,
29906,
29892,
29871,
29941,
876,
13,
4706,
503,
353,
15886,
29889,
12667,
29889,
29894,
29896,
29889,
27074,
29898,
13264,
29889,
7411,
29941,
29906,
29892,
8267,
7607,
29906,
29892,
29871,
29941,
876,
13,
13,
4706,
263,
353,
921,
718,
343,
718,
503,
13,
4706,
289,
353,
15886,
29889,
15755,
29889,
18816,
29885,
3398,
29898,
29874,
29897,
13,
13,
4706,
396,
1881,
995,
322,
3806,
995,
13,
4706,
921,
29918,
9302,
353,
7442,
29889,
8159,
3552,
29906,
29892,
29871,
29941,
511,
29871,
29896,
29889,
29900,
29897,
13,
4706,
343,
29918,
9302,
353,
7442,
29889,
8159,
3552,
29906,
29892,
29871,
29941,
511,
29871,
29896,
29889,
29900,
29897,
13,
4706,
503,
29918,
9302,
353,
7442,
29889,
8159,
3552,
29906,
29892,
29871,
29941,
511,
29871,
29896,
29889,
29900,
29897,
13,
4706,
263,
29918,
9302,
353,
921,
29918,
9302,
718,
343,
29918,
9302,
718,
503,
29918,
9302,
13,
4706,
289,
29918,
9302,
353,
29871,
29896,
29889,
847,
313,
29896,
29889,
718,
7442,
29889,
4548,
6278,
29874,
29918,
9302,
876,
13,
4706,
3806,
353,
289,
29918,
9302,
13,
13,
4706,
27937,
29918,
9144,
353,
14013,
27937,
29901,
27937,
29889,
3389,
3552,
29874,
29892,
289,
511,
13,
462,
462,
4706,
8343,
29918,
8977,
3790,
13,
462,
462,
9651,
921,
29901,
921,
29918,
9302,
29892,
13,
462,
462,
9651,
343,
29901,
343,
29918,
9302,
29892,
13,
462,
462,
9651,
503,
29901,
503,
29918,
9302,
13,
462,
462,
4706,
5615,
13,
4706,
4974,
7442,
29889,
497,
5358,
29898,
13,
9651,
1583,
29889,
2541,
29918,
865,
1140,
29898,
29879,
404,
29918,
9144,
511,
1583,
29889,
14037,
29918,
865,
1140,
29898,
29879,
404,
29918,
9144,
876,
13,
2
] |
SRC/image/pixelselectionmod.py | usnistgov/OOF3D | 31 | 57905 | <gh_stars>10-100
# -*- python -*-
# This software was produced by NIST, an agency of the U.S. government,
# and by statute is not subject to copyright in the United States.
# Recipients of this software assume all responsibilities associated
# with its operation, modification and maintenance. However, to
# facilitate maintenance we ask that before distributing modified
# versions of this software, you first contact the authors at
# <EMAIL>.
## Pixel selection modifiers make selections without mouse input.
from ooflib.SWIG.image import pixelselectioncourieri
from ooflib.common import color
from ooflib.common import pixelselection
from ooflib.common import registeredclass
from ooflib.common import selectionoperators
from ooflib.common.IO import colordiffparameter
from ooflib.common.IO import parameter
from ooflib.common.IO import whoville
# TODO: Add operatorParam
class ColorRange(pixelselection.VoxelSelectionModifier):
def __init__(self, image, reference, range, operator):
self.image = image
self.reference = reference
self.range = range
self.operator = operator
def select(self, ms, selection):
curselection = selection.getObject()
# 'cause my teeth are perly...
image = whoville.getClass('Image')[self.image]
imageobj = image.getObject()
ms = image.getMicrostructure()
self.operator.operate(
selection,
pixelselectioncourieri.ColorSelection(ms, imageobj,
self.reference, self.range))
pixelselection.VoxelSelectionModRegistration(
'Color Range',
ColorRange,
ordering=3.14,
params=[
whoville.WhoParameter(
'image', whoville.getClass('Image'),
tip=parameter.emptyTipString),
color.NewColorParameter(
'reference', tip='Reference color.'),
colordiffparameter.ColorDifferenceParameter(
'range', tip='Deviation from the reference color.'),
selectionoperators.SelectionOperatorParam('operator')
],
tip="Select all pixels similar to a reference color.",
discussion= """<para>
Select all pixels in an ℑ within a given
<varname>range</varname> of a given <varname>refererence</varname>
color. This command basically does the same thing that <xref
linkend='MenuItem:OOF.Graphics_n.Toolbox.Pixel_Select.Color'/>
does except the latter takes its <varname>reference</varname>
input from a mouse click in the Graphics window.
</para>""")
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
29937,
448,
29930,
29899,
3017,
448,
29930,
29899,
13,
13,
29937,
910,
7047,
471,
7371,
491,
405,
9047,
29892,
385,
946,
3819,
310,
278,
501,
29889,
29903,
29889,
5874,
29892,
13,
29937,
322,
491,
1002,
1082,
338,
451,
4967,
304,
3509,
1266,
297,
278,
3303,
3900,
29889,
13,
29937,
830,
7334,
10070,
310,
445,
7047,
5251,
599,
5544,
747,
9770,
6942,
13,
29937,
411,
967,
5858,
29892,
21733,
322,
25413,
29889,
2398,
29892,
304,
13,
29937,
16089,
10388,
25413,
591,
2244,
393,
1434,
22965,
17068,
9120,
13,
29937,
6910,
310,
445,
7047,
29892,
366,
937,
6958,
278,
15717,
472,
13,
29937,
529,
26862,
6227,
15513,
29871,
13,
13,
2277,
349,
15711,
9262,
878,
14903,
1207,
409,
5942,
1728,
9495,
1881,
29889,
13,
13,
3166,
288,
974,
1982,
29889,
23066,
6259,
29889,
3027,
1053,
9277,
2870,
1464,
16589,
4336,
29875,
13,
3166,
288,
974,
1982,
29889,
9435,
1053,
2927,
13,
3166,
288,
974,
1982,
29889,
9435,
1053,
9277,
2870,
1464,
13,
3166,
288,
974,
1982,
29889,
9435,
1053,
15443,
1990,
13,
3166,
288,
974,
1982,
29889,
9435,
1053,
9262,
3372,
4097,
13,
3166,
288,
974,
1982,
29889,
9435,
29889,
5971,
1053,
784,
536,
2593,
15501,
13,
3166,
288,
974,
1982,
29889,
9435,
29889,
5971,
1053,
3443,
13,
3166,
288,
974,
1982,
29889,
9435,
29889,
5971,
1053,
377,
586,
1924,
13,
13,
29937,
14402,
29901,
3462,
5455,
4736,
13,
13,
1990,
9159,
6069,
29898,
29886,
861,
2870,
1464,
29889,
29963,
2251,
295,
15097,
2111,
3709,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1967,
29892,
3407,
29892,
3464,
29892,
5455,
1125,
13,
4706,
1583,
29889,
3027,
353,
1967,
13,
4706,
1583,
29889,
5679,
353,
3407,
13,
4706,
1583,
29889,
3881,
353,
3464,
13,
4706,
1583,
29889,
6891,
353,
5455,
13,
1678,
822,
1831,
29898,
1311,
29892,
10887,
29892,
9262,
1125,
13,
4706,
3151,
21731,
353,
9262,
29889,
657,
2061,
580,
13,
4706,
396,
525,
29883,
1071,
590,
25287,
526,
639,
368,
856,
13,
4706,
1967,
353,
377,
586,
1924,
29889,
657,
2385,
877,
2940,
29861,
1311,
29889,
3027,
29962,
13,
4706,
1967,
5415,
353,
1967,
29889,
657,
2061,
580,
13,
4706,
10887,
353,
1967,
29889,
657,
29924,
2357,
23905,
580,
13,
4706,
1583,
29889,
6891,
29889,
3372,
403,
29898,
13,
9651,
9262,
29892,
13,
9651,
9277,
2870,
1464,
16589,
4336,
29875,
29889,
3306,
15097,
29898,
1516,
29892,
1967,
5415,
29892,
13,
462,
462,
462,
29871,
1583,
29889,
5679,
29892,
1583,
29889,
3881,
876,
13,
13,
29886,
861,
2870,
1464,
29889,
29963,
2251,
295,
15097,
2111,
4597,
8306,
29898,
13,
1678,
525,
3306,
12146,
742,
13,
1678,
9159,
6069,
29892,
13,
1678,
20520,
29922,
29941,
29889,
29896,
29946,
29892,
13,
1678,
8636,
11759,
13,
4706,
377,
586,
1924,
29889,
22110,
9329,
29898,
13,
9651,
525,
3027,
742,
377,
586,
1924,
29889,
657,
2385,
877,
2940,
5477,
13,
9651,
6872,
29922,
15501,
29889,
6310,
29911,
666,
1231,
511,
13,
4706,
2927,
29889,
4373,
3306,
9329,
29898,
13,
9651,
525,
5679,
742,
6872,
2433,
7422,
2927,
29889,
5477,
13,
4706,
784,
536,
2593,
15501,
29889,
3306,
29928,
17678,
9329,
29898,
13,
9651,
525,
3881,
742,
6872,
2433,
2772,
14641,
515,
278,
3407,
2927,
29889,
5477,
13,
4706,
9262,
3372,
4097,
29889,
15097,
26486,
4736,
877,
6891,
1495,
13,
1678,
21251,
13,
1678,
6872,
543,
3549,
599,
17036,
2788,
304,
263,
3407,
2927,
19602,
13,
1678,
10679,
29922,
9995,
29966,
22752,
29958,
13,
13,
1678,
7605,
599,
17036,
297,
385,
669,
3027,
29936,
2629,
263,
2183,
13,
1678,
529,
1707,
978,
29958,
3881,
829,
1707,
978,
29958,
310,
263,
2183,
529,
1707,
978,
29958,
20275,
261,
663,
829,
1707,
978,
29958,
13,
1678,
2927,
29889,
29871,
910,
1899,
8830,
947,
278,
1021,
2655,
393,
529,
29916,
999,
13,
1678,
1544,
355,
2433,
21331,
29901,
29949,
9800,
29889,
17290,
29918,
29876,
29889,
12229,
1884,
29889,
29637,
29918,
3549,
29889,
3306,
29915,
3779,
13,
1678,
947,
5174,
278,
7480,
4893,
967,
529,
1707,
978,
29958,
5679,
829,
1707,
978,
29958,
13,
1678,
1881,
515,
263,
9495,
2828,
297,
278,
29247,
3474,
29889,
13,
13,
1678,
1533,
22752,
11903,
29908,
1159,
13,
2
] |
app/mod_ecomm/controllers.py | VikrantReddy/Instagram2Shop | 0 | 4911 | from flask import Blueprint, Flask, send_from_directory
from werkzeug.security import check_password_hash, generate_password_hash
from app import db
from app.mod_auth.forms import LoginForm
from app.mod_auth.models import User
mod_ecomm = Blueprint('products', __name__, url_prefix='/products',
static_folder='../../frontend/build')
@mod_ecomm.route("/", defaults={'path': ''})
def serve(path):
if path:
return send_from_directory(mod_ecomm.static_folder, path)
else:
return send_from_directory(mod_ecomm.static_folder, 'index.html')
| [
1,
515,
29784,
1053,
10924,
2158,
29892,
2379,
1278,
29892,
3638,
29918,
3166,
29918,
12322,
30004,
13,
3166,
23085,
13289,
29889,
8926,
1053,
1423,
29918,
5630,
29918,
8568,
29892,
5706,
29918,
5630,
29918,
8568,
30004,
13,
30004,
13,
3166,
623,
1053,
4833,
30004,
13,
3166,
623,
29889,
1545,
29918,
5150,
29889,
9514,
1053,
19130,
2500,
30004,
13,
3166,
623,
29889,
1545,
29918,
5150,
29889,
9794,
1053,
4911,
30004,
13,
30004,
13,
1545,
29918,
29872,
2055,
353,
10924,
2158,
877,
14456,
742,
4770,
978,
1649,
29892,
3142,
29918,
13506,
2433,
29914,
14456,
23592,
13,
462,
418,
2294,
29918,
12083,
2433,
21546,
8862,
355,
29914,
4282,
1495,
30004,
13,
30004,
13,
30004,
13,
29992,
1545,
29918,
29872,
2055,
29889,
13134,
11974,
613,
21274,
3790,
29915,
2084,
2396,
6629,
1800,
30004,
13,
1753,
9080,
29898,
2084,
1125,
30004,
13,
1678,
565,
2224,
29901,
30004,
13,
4706,
736,
3638,
29918,
3166,
29918,
12322,
29898,
1545,
29918,
29872,
2055,
29889,
7959,
29918,
12083,
29892,
2224,
8443,
13,
1678,
1683,
29901,
30004,
13,
4706,
736,
3638,
29918,
3166,
29918,
12322,
29898,
1545,
29918,
29872,
2055,
29889,
7959,
29918,
12083,
29892,
525,
2248,
29889,
1420,
1495,
30004,
13,
2
] |
create_google_prior.py | AdrianNunez/zeroshot-action-recognition-action-priors | 3 | 36614 | <gh_stars>1-10
# -*- coding: UTF-8 -*-
import os
import json
import logging
from googleapiclient.discovery import build
from tqdm import tqdm
from data import get_classes_ordered
logging.getLogger('googleapicliet.discovery_cache').setLevel(logging.ERROR)
variables_file = 'variables.json'
with open(variables_file) as f:
config = json.load(f)
# ============================================================
# VARIABLES TO MODIFY
# ============================================================
output_path = config['project_folder'] + 'google_prior/'
# ============================================================
# API keys --------------------------------------------
api_keys = [
# add API keys
]
# Google Custom Search --------------------------------
cse_ids = [
# add Google Custom Search IDs
]
# Function to perform a google search
def google_search(search_term, api_key, cse_id, **kwargs):
service = build("customsearch", "v1", developerKey=api_key)
res = service.cse().list(q=search_term, cx=cse_id, **kwargs).execute()
return res
def transform_obj(obj):
tweakedObj = [obj]
if obj == 'bell_pepper':
tweakedObj = ['bell pepper', 'green pepper', 'red pepper']
elif obj == 'cup':
tweakedObj = ['cup', 'mug']
elif obj == 'pot':
tweakedObj = ['pot', 'saucepan', 'pan']
elif obj == 'pan':
tweakedObj = ['pan', 'frying pan']
elif obj == 'eating_utensil':
tweakedObj = ['eating utensil', 'knife', 'spoon', 'fork']
elif obj == 'cooking_utensil':
tweakedObj = ['cooking utensil', 'knife', 'scissors', 'peeler',
'scale', 'jug', 'colander', 'strainer', 'blender']
elif obj == 'fridge_drawer':
tweakedObj = ['fridge drawer', 'refrigerator drawer']
elif obj == 'cutting_board':
tweakedObj = ['cutting board', 'cut board', 'chopping board',
'chop board']
elif obj == 'cheese_container':
tweakedObj = ['cheese container', 'cheese recipient', 'cheese package']
elif obj == 'oil_container':
tweakedObj = ['oil container', 'oil recipient', 'oil bottle']
elif obj == 'bread_container':
tweakedObj = ['bread container', 'bread recipient', 'bread package',
'bread bag']
elif obj == 'grocery_bag':
tweakedObj = ['grocery bag', 'groceries']
elif obj == 'seasoning_container':
tweakedObj = ['seasoning container', 'seasoning recipient',
'seasoning bottle', 'seasoning package']
elif obj == 'condiment_container':
tweakedObj = ['condiment container', 'condiment recipient',
'condiment bottle']
elif obj == 'tomato_container':
tweakedObj = ['tomato container', 'tomato recipient', 'tomato bottle']
elif obj == 'fridge':
tweakedObj = ['fridge', 'refrigerator']
elif obj == 'paper_towel':
tweakedObj = ['paper towel', 'tissue', 'kitchen paper',
'kitchen towel']
elif obj == 'cabinet':
tweakedObj = ['cabinet', 'locker', 'cupboard']
return tweakedObj
def transform_verb(verb):
tweakedVerb = [verb]
if verb == 'divide/pull apart':
tweakedVerb = ['divide', 'pull apart', 'separate', 'split', 'shred']
elif verb == 'move_around':
tweakedVerb = ['move around', 'move', 'transfer']
elif verb == 'take':
tweakedVerb = ['take', 'pick', 'pick up', 'grab']
elif verb == 'put':
tweakedVerb = ['put', 'leave', 'place']
elif verb == 'cut':
tweakedVerb = ['cut', 'slice', 'mince']
elif verb == 'wash':
tweakedVerb = ['wash', 'clean']
elif verb == 'mix':
tweakedVerb = ['mix', 'mingle', 'blend']
return tweakedVerb
if __name__ == '__main__':
if not os.path.exists(output_path):
os.makedirs(output_path)
objects,_ = get_classes_ordered(config['objects_file'])
verbs,_ = get_classes_ordered(config['verbs_file'])
total = 0
results_dict, action_priors = dict(), dict()
if os.path.exists(output_path + 'google_search.json'):
with open(output_path + 'google_search.json', 'r') as json_file:
results_dict = json.load(json_file)
def check_queries_left(results_dict):
queries_done, queries_left = 0, 0
# Check how many queries are left
for verb in verbs:
v = transform_verb(verb)
for v_option in v:
for obj in objects:
o = transform_obj(obj)
for o_option in o:
if not verb + ' ' + obj in results_dict:
queries_left += 1
elif not v_option + ' ' + o_option in results_dict[verb + ' ' + obj]:
queries_left += 1
else:
queries_done += 1
print('Queries done: {}, queries left: {}, total queries: {}'.format(
queries_done, queries_left, queries_done + queries_left
))
# It should print the total queries that must be done
check_queries_left(results_dict)
for my_api_key, my_cse_id in tqdm(zip(api_keys, cse_ids)):
# For each verb and object (and their synonyms)
for verb in verbs:
v = transform_verb(verb)
for v_option in v:
for obj in objects:
o = transform_obj(obj)
for o_option in o:
try:
if not verb + ' ' + obj in results_dict:
results_dict[verb + ' ' + obj] = dict()
action = v_option + ' * ' + o_option
if not v_option + ' ' + o_option in results_dict[verb + ' ' + obj]:
#print(action)
result = google_search('"' + action + '"', my_api_key, my_cse_id)
results_dict[verb + ' ' + obj][v_option + ' ' + o_option] = result
with open(output_path + 'google_search.json', 'w') as f:
json.dump(results_dict, f, indent=4)
except:
pass
# It should print 0, otherwise it must be repeated
check_queries_left(results_dict)
# Create the prior using the computed results
accum_total = 0.
for verb in verbs:
for obj in objects:
action = verb + ' ' + obj
info = []
for key in results_dict[action].keys():
num = int(
results_dict[action][key]['searchInformation']['totalResults']
)
info.append(num)
accum, nb_elems = 0., 0
for i in range(len(info)):
if info[i] > 0:
accum += float(info[i])
nb_elems += 1
total = float(accum) / max(1,float(nb_elems))
accum_total += total
action_priors[action] = total
with open(output_path + 'unnormalised_action_priors.json', 'w') as f:
json.dump(action_priors, f, indent=4)
for key in action_priors.keys():
action_priors[key] /= float(accum_total)
with open(output_path + 'action_priors.json', 'w') as f:
json.dump(action_priors, f, indent=4) | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
448,
29930,
29899,
14137,
29901,
18351,
29899,
29947,
448,
29930,
29899,
13,
5215,
2897,
13,
5215,
4390,
13,
5215,
12183,
13,
3166,
5386,
481,
293,
1593,
29889,
2218,
11911,
29891,
1053,
2048,
13,
3166,
260,
29939,
18933,
1053,
260,
29939,
18933,
13,
3166,
848,
1053,
679,
29918,
13203,
29918,
21693,
13,
21027,
29889,
657,
16363,
877,
3608,
481,
293,
492,
300,
29889,
2218,
11911,
29891,
29918,
8173,
2824,
842,
10108,
29898,
21027,
29889,
11432,
29897,
13,
13,
20897,
29918,
1445,
353,
525,
20897,
29889,
3126,
29915,
13,
2541,
1722,
29898,
20897,
29918,
1445,
29897,
408,
285,
29901,
13,
1678,
2295,
353,
4390,
29889,
1359,
29898,
29888,
29897,
13,
13,
29937,
1275,
9166,
9166,
9166,
4936,
1360,
13,
29937,
478,
1718,
29902,
6181,
29903,
7495,
16999,
4571,
29943,
29979,
13,
29937,
1275,
9166,
9166,
9166,
4936,
1360,
13,
4905,
29918,
2084,
353,
2295,
1839,
4836,
29918,
12083,
2033,
718,
525,
3608,
29918,
29886,
13479,
22208,
13,
29937,
1275,
9166,
9166,
9166,
4936,
1360,
13,
13,
29937,
3450,
6611,
448,
2683,
2683,
1378,
5634,
13,
2754,
29918,
8149,
353,
518,
13,
1678,
396,
788,
3450,
6611,
13,
29962,
13,
13,
29937,
5087,
8701,
11856,
448,
2683,
9072,
5634,
13,
29883,
344,
29918,
4841,
353,
518,
13,
1678,
396,
788,
5087,
8701,
11856,
23481,
13,
29962,
13,
13,
29937,
6680,
304,
2189,
263,
5386,
2740,
13,
1753,
5386,
29918,
4478,
29898,
4478,
29918,
8489,
29892,
7882,
29918,
1989,
29892,
274,
344,
29918,
333,
29892,
3579,
19290,
1125,
13,
1678,
2669,
353,
2048,
703,
6341,
4478,
613,
376,
29894,
29896,
613,
13897,
2558,
29922,
2754,
29918,
1989,
29897,
13,
1678,
620,
353,
2669,
29889,
29883,
344,
2141,
1761,
29898,
29939,
29922,
4478,
29918,
8489,
29892,
28232,
29922,
29883,
344,
29918,
333,
29892,
3579,
19290,
467,
7978,
580,
13,
1678,
736,
620,
13,
13,
1753,
4327,
29918,
5415,
29898,
5415,
1125,
13,
1678,
7780,
12535,
9930,
353,
518,
5415,
29962,
13,
1678,
565,
5446,
1275,
525,
12562,
29918,
412,
2496,
2396,
13,
4706,
7780,
12535,
9930,
353,
6024,
12562,
1236,
2496,
742,
525,
12692,
1236,
2496,
742,
525,
1127,
1236,
2496,
2033,
13,
1678,
25342,
5446,
1275,
525,
5231,
2396,
13,
4706,
7780,
12535,
9930,
353,
6024,
5231,
742,
525,
29885,
688,
2033,
13,
1678,
25342,
5446,
1275,
525,
17765,
2396,
13,
4706,
7780,
12535,
9930,
353,
6024,
17765,
742,
525,
29879,
585,
346,
8357,
742,
525,
8357,
2033,
13,
1678,
25342,
5446,
1275,
525,
8357,
2396,
13,
4706,
7780,
12535,
9930,
353,
6024,
8357,
742,
525,
29888,
719,
292,
7243,
2033,
13,
1678,
25342,
5446,
1275,
525,
29872,
1218,
29918,
329,
575,
309,
2396,
13,
4706,
7780,
12535,
9930,
353,
6024,
29872,
1218,
3477,
575,
309,
742,
525,
3959,
1607,
742,
525,
1028,
6150,
742,
525,
29888,
548,
2033,
13,
1678,
25342,
5446,
1275,
525,
15108,
292,
29918,
329,
575,
309,
2396,
13,
4706,
7780,
12535,
9930,
353,
6024,
15108,
292,
3477,
575,
309,
742,
525,
3959,
1607,
742,
525,
1557,
790,
943,
742,
525,
412,
7367,
742,
13,
462,
418,
525,
7052,
742,
525,
29926,
688,
742,
525,
1054,
3825,
742,
525,
4151,
4983,
742,
525,
2204,
1581,
2033,
13,
1678,
25342,
5446,
1275,
525,
1341,
5525,
29918,
19811,
556,
2396,
13,
4706,
7780,
12535,
9930,
353,
6024,
1341,
5525,
7482,
556,
742,
525,
999,
29878,
4087,
1061,
7482,
556,
2033,
13,
1678,
25342,
5446,
1275,
525,
7582,
1259,
29918,
3377,
2396,
13,
4706,
7780,
12535,
9930,
353,
6024,
7582,
1259,
7613,
742,
525,
7582,
7613,
742,
525,
1859,
3262,
7613,
742,
13,
462,
418,
525,
305,
459,
7613,
2033,
13,
1678,
25342,
5446,
1275,
525,
1173,
968,
29918,
7611,
2396,
13,
4706,
7780,
12535,
9930,
353,
6024,
1173,
968,
5639,
742,
525,
1173,
968,
23957,
993,
742,
525,
1173,
968,
3577,
2033,
13,
1678,
25342,
5446,
1275,
525,
29877,
309,
29918,
7611,
2396,
13,
4706,
7780,
12535,
9930,
353,
6024,
29877,
309,
5639,
742,
525,
29877,
309,
23957,
993,
742,
525,
29877,
309,
18046,
280,
2033,
13,
1678,
25342,
5446,
1275,
525,
29890,
949,
29918,
7611,
2396,
13,
4706,
7780,
12535,
9930,
353,
6024,
29890,
949,
5639,
742,
525,
29890,
949,
23957,
993,
742,
525,
29890,
949,
3577,
742,
13,
462,
418,
525,
29890,
949,
19548,
2033,
13,
1678,
25342,
5446,
1275,
525,
29887,
10198,
708,
29918,
23156,
2396,
13,
4706,
7780,
12535,
9930,
353,
6024,
29887,
10198,
708,
19548,
742,
525,
17170,
2265,
583,
2033,
13,
1678,
25342,
5446,
1275,
525,
25682,
292,
29918,
7611,
2396,
13,
4706,
7780,
12535,
9930,
353,
6024,
25682,
292,
5639,
742,
525,
25682,
292,
23957,
993,
742,
13,
462,
418,
525,
25682,
292,
18046,
280,
742,
525,
25682,
292,
3577,
2033,
13,
1678,
25342,
5446,
1275,
525,
1116,
2073,
29918,
7611,
2396,
13,
4706,
7780,
12535,
9930,
353,
6024,
1116,
2073,
5639,
742,
525,
1116,
2073,
23957,
993,
742,
13,
462,
418,
525,
1116,
2073,
18046,
280,
2033,
13,
1678,
25342,
5446,
1275,
525,
15135,
1219,
29918,
7611,
2396,
13,
4706,
7780,
12535,
9930,
353,
6024,
15135,
1219,
5639,
742,
525,
15135,
1219,
23957,
993,
742,
525,
15135,
1219,
18046,
280,
2033,
13,
1678,
25342,
5446,
1275,
525,
1341,
5525,
2396,
13,
4706,
7780,
12535,
9930,
353,
6024,
1341,
5525,
742,
525,
999,
29878,
4087,
1061,
2033,
13,
13,
1678,
25342,
5446,
1275,
525,
19773,
29918,
29873,
27531,
2396,
13,
4706,
7780,
12535,
9930,
353,
6024,
19773,
304,
20466,
742,
525,
29873,
15118,
742,
525,
29895,
23213,
5650,
742,
13,
462,
418,
525,
29895,
23213,
304,
20466,
2033,
13,
1678,
25342,
5446,
1275,
525,
29883,
370,
10157,
2396,
13,
4706,
7780,
12535,
9930,
353,
6024,
29883,
370,
10157,
742,
525,
908,
261,
742,
525,
5231,
3377,
2033,
13,
1678,
736,
7780,
12535,
9930,
13,
13,
1753,
4327,
29918,
18248,
29898,
18248,
1125,
13,
1678,
7780,
12535,
6565,
29890,
353,
518,
18248,
29962,
13,
1678,
565,
9750,
1275,
525,
4563,
680,
29914,
26746,
12435,
2396,
13,
4706,
7780,
12535,
6565,
29890,
353,
6024,
4563,
680,
742,
525,
26746,
12435,
742,
525,
25048,
403,
742,
525,
5451,
742,
525,
845,
1127,
2033,
13,
1678,
25342,
9750,
1275,
525,
11631,
29918,
11316,
2396,
13,
4706,
7780,
12535,
6565,
29890,
353,
6024,
11631,
2820,
742,
525,
11631,
742,
525,
3286,
571,
2033,
13,
1678,
25342,
9750,
1275,
525,
19730,
2396,
13,
4706,
7780,
12535,
6565,
29890,
353,
6024,
19730,
742,
525,
23945,
742,
525,
23945,
701,
742,
525,
3874,
29890,
2033,
13,
1678,
25342,
9750,
1275,
525,
649,
2396,
13,
4706,
7780,
12535,
6565,
29890,
353,
6024,
649,
742,
525,
280,
1351,
742,
525,
6689,
2033,
13,
1678,
25342,
9750,
1275,
525,
7582,
2396,
13,
4706,
7780,
12535,
6565,
29890,
353,
6024,
7582,
742,
525,
18337,
742,
525,
1195,
346,
2033,
13,
1678,
25342,
9750,
1275,
525,
29893,
1161,
2396,
13,
4706,
7780,
12535,
6565,
29890,
353,
6024,
29893,
1161,
742,
525,
14941,
2033,
13,
1678,
25342,
9750,
1275,
525,
28084,
2396,
13,
4706,
7780,
12535,
6565,
29890,
353,
6024,
28084,
742,
525,
4056,
280,
742,
525,
2204,
355,
2033,
13,
1678,
736,
7780,
12535,
6565,
29890,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
565,
451,
2897,
29889,
2084,
29889,
9933,
29898,
4905,
29918,
2084,
1125,
13,
4706,
2897,
29889,
29885,
12535,
12935,
29898,
4905,
29918,
2084,
29897,
13,
13,
1678,
3618,
29892,
29918,
353,
679,
29918,
13203,
29918,
21693,
29898,
2917,
1839,
12650,
29918,
1445,
11287,
13,
1678,
1147,
5824,
29892,
29918,
353,
679,
29918,
13203,
29918,
21693,
29898,
2917,
1839,
369,
5824,
29918,
1445,
11287,
13,
1678,
3001,
353,
29871,
29900,
13,
1678,
2582,
29918,
8977,
29892,
3158,
29918,
29886,
28739,
353,
9657,
3285,
9657,
580,
13,
1678,
565,
2897,
29889,
2084,
29889,
9933,
29898,
4905,
29918,
2084,
718,
525,
3608,
29918,
4478,
29889,
3126,
29374,
13,
4706,
411,
1722,
29898,
4905,
29918,
2084,
718,
525,
3608,
29918,
4478,
29889,
3126,
742,
525,
29878,
1495,
408,
4390,
29918,
1445,
29901,
13,
9651,
2582,
29918,
8977,
353,
4390,
29889,
1359,
29898,
3126,
29918,
1445,
29897,
1678,
13,
13,
1753,
1423,
29918,
339,
6358,
29918,
1563,
29898,
9902,
29918,
8977,
1125,
13,
1678,
9365,
29918,
15091,
29892,
9365,
29918,
1563,
353,
29871,
29900,
29892,
29871,
29900,
13,
1678,
396,
5399,
920,
1784,
9365,
526,
2175,
13,
1678,
363,
9750,
297,
1147,
5824,
29901,
13,
9651,
325,
353,
4327,
29918,
18248,
29898,
18248,
29897,
13,
9651,
363,
325,
29918,
3385,
297,
325,
29901,
13,
18884,
363,
5446,
297,
3618,
29901,
13,
462,
1678,
288,
353,
4327,
29918,
5415,
29898,
5415,
29897,
13,
462,
1678,
363,
288,
29918,
3385,
297,
288,
29901,
13,
462,
4706,
565,
451,
9750,
718,
525,
525,
718,
5446,
297,
2582,
29918,
8977,
29901,
13,
462,
9651,
9365,
29918,
1563,
4619,
29871,
29896,
13,
462,
4706,
25342,
451,
325,
29918,
3385,
718,
525,
525,
718,
288,
29918,
3385,
297,
2582,
29918,
8977,
29961,
18248,
718,
525,
525,
718,
5446,
5387,
13,
462,
9651,
9365,
29918,
1563,
4619,
29871,
29896,
13,
462,
4706,
1683,
29901,
13,
462,
9651,
9365,
29918,
15091,
4619,
29871,
29896,
13,
13,
1678,
1596,
877,
2182,
6358,
2309,
29901,
24335,
9365,
2175,
29901,
24335,
3001,
9365,
29901,
6571,
4286,
4830,
29898,
13,
4706,
9365,
29918,
15091,
29892,
9365,
29918,
1563,
29892,
9365,
29918,
15091,
718,
9365,
29918,
1563,
13,
268,
876,
13,
13,
29937,
739,
881,
1596,
278,
3001,
9365,
393,
1818,
367,
2309,
13,
3198,
29918,
339,
6358,
29918,
1563,
29898,
9902,
29918,
8977,
29897,
29871,
13,
13,
1454,
590,
29918,
2754,
29918,
1989,
29892,
590,
29918,
29883,
344,
29918,
333,
297,
260,
29939,
18933,
29898,
7554,
29898,
2754,
29918,
8149,
29892,
274,
344,
29918,
4841,
22164,
13,
1678,
396,
1152,
1269,
9750,
322,
1203,
313,
392,
1009,
5222,
4735,
29879,
29897,
13,
1678,
363,
9750,
297,
1147,
5824,
29901,
13,
4706,
325,
353,
4327,
29918,
18248,
29898,
18248,
29897,
13,
4706,
363,
325,
29918,
3385,
297,
325,
29901,
13,
9651,
363,
5446,
297,
3618,
29901,
13,
18884,
288,
353,
4327,
29918,
5415,
29898,
5415,
29897,
13,
18884,
363,
288,
29918,
3385,
297,
288,
29901,
13,
462,
1678,
1018,
29901,
13,
462,
4706,
565,
451,
9750,
718,
525,
525,
718,
5446,
297,
2582,
29918,
8977,
29901,
13,
462,
9651,
2582,
29918,
8977,
29961,
18248,
718,
525,
525,
718,
5446,
29962,
353,
9657,
580,
13,
462,
4706,
3158,
353,
325,
29918,
3385,
718,
525,
334,
525,
718,
288,
29918,
3385,
13,
462,
4706,
565,
451,
325,
29918,
3385,
718,
525,
525,
718,
288,
29918,
3385,
297,
2582,
29918,
8977,
29961,
18248,
718,
525,
525,
718,
5446,
5387,
13,
462,
9651,
396,
2158,
29898,
2467,
29897,
13,
462,
9651,
1121,
353,
5386,
29918,
4478,
877,
29908,
29915,
718,
3158,
718,
18793,
742,
590,
29918,
2754,
29918,
1989,
29892,
590,
29918,
29883,
344,
29918,
333,
29897,
13,
462,
9651,
2582,
29918,
8977,
29961,
18248,
718,
525,
525,
718,
5446,
3816,
29894,
29918,
3385,
718,
525,
525,
718,
288,
29918,
3385,
29962,
353,
1121,
13,
462,
9651,
411,
1722,
29898,
4905,
29918,
2084,
718,
525,
3608,
29918,
4478,
29889,
3126,
742,
525,
29893,
1495,
408,
285,
29901,
13,
462,
18884,
4390,
29889,
15070,
29898,
9902,
29918,
8977,
29892,
285,
29892,
29536,
29922,
29946,
29897,
13,
462,
1678,
5174,
29901,
13,
462,
4706,
1209,
13,
13,
29937,
739,
881,
1596,
29871,
29900,
29892,
6467,
372,
1818,
367,
10324,
13,
3198,
29918,
339,
6358,
29918,
1563,
29898,
9902,
29918,
8977,
29897,
29871,
13,
13,
29937,
6204,
278,
7536,
773,
278,
15712,
2582,
13,
5753,
398,
29918,
7827,
353,
29871,
29900,
29889,
13,
1454,
9750,
297,
1147,
5824,
29901,
13,
1678,
363,
5446,
297,
3618,
29901,
13,
4706,
3158,
353,
9750,
718,
525,
525,
718,
5446,
13,
4706,
5235,
353,
5159,
13,
4706,
363,
1820,
297,
2582,
29918,
8977,
29961,
2467,
1822,
8149,
7295,
13,
9651,
954,
353,
938,
29898,
13,
18884,
2582,
29918,
8977,
29961,
2467,
3816,
1989,
22322,
4478,
20350,
16215,
7827,
12191,
2033,
13,
9651,
1723,
259,
13,
9651,
5235,
29889,
4397,
29898,
1949,
29897,
13,
4706,
18414,
29892,
302,
29890,
29918,
6146,
1516,
353,
29871,
29900,
1696,
29871,
29900,
13,
4706,
363,
474,
297,
3464,
29898,
2435,
29898,
3888,
22164,
13,
9651,
565,
5235,
29961,
29875,
29962,
1405,
29871,
29900,
29901,
29871,
13,
18884,
18414,
4619,
5785,
29898,
3888,
29961,
29875,
2314,
13,
18884,
302,
29890,
29918,
6146,
1516,
4619,
29871,
29896,
13,
4706,
3001,
353,
5785,
29898,
5753,
398,
29897,
847,
4236,
29898,
29896,
29892,
7411,
29898,
9877,
29918,
6146,
1516,
876,
13,
4706,
18414,
29918,
7827,
4619,
3001,
13,
4706,
3158,
29918,
29886,
28739,
29961,
2467,
29962,
353,
3001,
13,
632,
13,
2541,
1722,
29898,
4905,
29918,
2084,
718,
525,
5963,
2759,
3368,
29918,
2467,
29918,
29886,
28739,
29889,
3126,
742,
525,
29893,
1495,
408,
285,
29901,
13,
1678,
4390,
29889,
15070,
29898,
2467,
29918,
29886,
28739,
29892,
285,
29892,
29536,
29922,
29946,
29897,
13,
13,
1454,
1820,
297,
3158,
29918,
29886,
28739,
29889,
8149,
7295,
13,
1678,
3158,
29918,
29886,
28739,
29961,
1989,
29962,
847,
29922,
5785,
29898,
5753,
398,
29918,
7827,
29897,
29871,
13,
13,
2541,
1722,
29898,
4905,
29918,
2084,
718,
525,
2467,
29918,
29886,
28739,
29889,
3126,
742,
525,
29893,
1495,
408,
285,
29901,
13,
1678,
4390,
29889,
15070,
29898,
2467,
29918,
29886,
28739,
29892,
285,
29892,
29536,
29922,
29946,
29897,
2
] |
bert/bert_model.py | qianyingw/bioner | 1 | 54815 | <filename>bert/bert_model.py
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Dec 30 12:45:12 2020
@author: qwang
"""
from transformers import BertPreTrainedModel, BertConfig, BertModel
from transformers import DistilBertPreTrainedModel, DistilBertConfig, DistilBertModel
import torch
import torch.nn as nn
import torch.nn.functional as F
from torchcrf import CRF
#%%
class BERT_CRF(BertPreTrainedModel):
def __init__(self, config):
super().__init__(config)
self.config = config
self.bert = BertModel(config)
self.dropout = nn.Dropout(config.hidden_dropout_prob)
self.fc = nn.Linear(config.hidden_size, config.num_labels)
self.init_weights()
self.crf = CRF(config.num_labels, batch_first=True)
def forward(self, input_ids, attention_mask, labels=None):
outputs = self.bert(input_ids, attention_mask)
hidden_states = outputs[0] # [batch_size, seq_len, hidden_size]
out_dp = self.dropout(hidden_states)
emission_probs = self.fc(out_dp) # [batch_size, seq_len, num_tags]
attention_mask = attention_mask.type(torch.uint8)
if labels is None: # prediction only. no padding
# Remove cls/sep (tagged as -100 by tokenize_encode)
probs_cut = emission_probs[:, 1:-1, :] # [batch_size, seq_len-2, num_tags]
mask_cut = attention_mask[:, 1:-1] # [batch_size, seq_len-2]
preds = self.crf.decode(probs_cut, mask=mask_cut) # assign mask for 'unpad'
return preds # preds: list of list containing best tag seqs for each batch
else:
probs_cut, mask_cut, tags_cut = [], [], []
for prob, mask, tag in zip(emission_probs, attention_mask, labels):
# prob: [seq_len, num_tags]
# mask/tag: [seq_len]
probs_cut.append(prob[tag!=-100, :])
mask_cut.append(mask[tag!=-100])
tags_cut.append(tag[tag!=-100])
probs_cut = torch.stack(probs_cut) # [batch_size, seq_len-2, num_tags]
mask_cut = torch.stack(mask_cut) # [batch_size, seq_len-2]
tags_cut = torch.stack(tags_cut) # [batch_size, seq_len-2]
# log_likelihood = self.crf(F.softmax(probs_cut, dim=2), tags_cut, mask=mask_cut, reduction='mean')
log_likelihood = self.crf(F.log_softmax(probs_cut, dim=2), tags_cut, mask=mask_cut, reduction='mean')
preds = self.crf.decode(probs_cut, mask=mask_cut) # assign mask for 'unpad'
return preds, probs_cut, mask_cut, log_likelihood
#%%
class BERT_LSTM_CRF(BertPreTrainedModel):
def __init__(self, config):
super().__init__(config)
self.config = config
self.bert = BertModel(config)
self.dropout = nn.Dropout(config.hidden_dropout_prob)
self.lstm = nn.LSTM(input_size = config.hidden_size, hidden_size = config.hidden_size,
num_layers = 1, dropout = config.hidden_dropout_prob,
batch_first = True, bidirectional = True)
self.fc = nn.Linear(config.hidden_size*2, config.num_labels)
self.init_weights()
self.crf = CRF(config.num_labels, batch_first=True)
def forward(self, input_ids, attention_mask, labels=None, return_probs=False):
outputs = self.bert(input_ids, attention_mask)
hidden_states = outputs[0] # [batch_size, seq_len, hidden_size]
out_dp = self.dropout(hidden_states)
out_lstm, (h_n, c_n) = self.lstm(out_dp) # [batch_size, seq_len, 2*hidden_size]
emission_probs = self.fc(out_lstm) # [batch_size, seq_len, num_tags]
attention_mask = attention_mask.type(torch.uint8)
if labels is None:
# Remove cls/sep (tagged as -100 by tokenize_encode)
probs_cut = emission_probs[:, 1:-1, :] # [batch_size, seq_len-2, num_tags]
mask_cut = attention_mask[:, 1:-1] # [batch_size, seq_len-2]
preds = self.crf.decode(probs_cut, mask=mask_cut) # assign mask for 'unpad'
if return_probs == True:
return preds, probs_cut
else:
return preds # preds: list of list containing best tag seqs for each batch
else:
probs_cut, mask_cut, tags_cut = [], [], []
for prob, mask, tag in zip(emission_probs, attention_mask, labels):
# prob: [seq_len, num_tags]
# mask/tag: [seq_len]
probs_cut.append(prob[tag!=-100, :])
mask_cut.append(mask[tag!=-100])
tags_cut.append(tag[tag!=-100])
probs_cut = torch.stack(probs_cut) # [batch_size, seq_len-2, num_tags]
mask_cut = torch.stack(mask_cut) # [batch_size, seq_len-2]
tags_cut = torch.stack(tags_cut) # [batch_size, seq_len-2]
# log_likelihood = self.crf(F.softmax(probs_cut, dim=2), tags_cut, mask=mask_cut, reduction='mean')
log_likelihood = self.crf(F.log_softmax(probs_cut, dim=2), tags_cut, mask=mask_cut, reduction='mean')
preds = self.crf.decode(probs_cut, mask=mask_cut) # assign mask for 'unpad'
return preds, probs_cut, mask_cut, log_likelihood
#%%
class Distil_CRF(DistilBertPreTrainedModel):
def __init__(self, config):
super().__init__(config)
self.config = config
self.distilbert = DistilBertModel(config)
self.dropout = nn.Dropout(config.dropout)
self.fc = nn.Linear(config.hidden_size, config.num_labels)
self.init_weights()
self.crf = CRF(config.num_labels, batch_first=True)
def forward(self, input_ids, attention_mask, labels=None):
# Calculate true text_lens
# text_lens = torch.sum(attention_mask, dim=1) # [batch_size]
outputs = self.distilbert(input_ids, attention_mask)
hidden_states = outputs[0] # [batch_size, seq_len, hidden_size]
out_dp = self.dropout(hidden_states)
emission_probs = self.fc(out_dp) # [batch_size, seq_len, num_tags]
attention_mask = attention_mask.type(torch.uint8)
probs_cut, mask_cut, tags_cut = [], [], []
for prob, mask, tag in zip(emission_probs, attention_mask, labels):
# prob: [seq_len, num_tags]
# mask/tag: [seq_len]
probs_cut.append(prob[tag!=-100, :])
mask_cut.append(mask[tag!=-100])
tags_cut.append(tag[tag!=-100])
probs_cut = torch.stack(probs_cut)
mask_cut = torch.stack(mask_cut)
tags_cut = torch.stack(tags_cut)
if labels is None:
preds = self.crf.decode(probs_cut, mask=mask_cut) # assign mask for 'unpad'
return preds # preds: list of list containing best tag seqs for each batch
else:
log_likelihood = self.crf(probs_cut, tags_cut, mask=mask_cut) # [batch_size]
preds = self.crf.decode(probs_cut, mask=mask_cut) # assign mask for 'unpad'
return preds, mask_cut, log_likelihood
| [
1,
529,
9507,
29958,
2151,
29914,
2151,
29918,
4299,
29889,
2272,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
15945,
29908,
13,
20399,
373,
15050,
3826,
29871,
29941,
29900,
29871,
29896,
29906,
29901,
29946,
29945,
29901,
29896,
29906,
29871,
29906,
29900,
29906,
29900,
13,
13,
29992,
8921,
29901,
3855,
29893,
574,
13,
15945,
29908,
13,
13,
3166,
4327,
414,
1053,
16662,
6572,
5323,
1312,
3195,
29892,
16662,
3991,
29892,
16662,
3195,
13,
3166,
4327,
414,
1053,
6652,
309,
29933,
814,
6572,
5323,
1312,
3195,
29892,
6652,
309,
29933,
814,
3991,
29892,
6652,
309,
29933,
814,
3195,
13,
13,
5215,
4842,
305,
13,
5215,
4842,
305,
29889,
15755,
408,
302,
29876,
13,
5215,
4842,
305,
29889,
15755,
29889,
2220,
284,
408,
383,
13,
13,
3166,
4842,
305,
7283,
29888,
1053,
15600,
29943,
13,
13,
29937,
7686,
13,
1990,
350,
20161,
29918,
11341,
29943,
29898,
29933,
814,
6572,
5323,
1312,
3195,
1125,
13,
268,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
2295,
1125,
13,
4706,
2428,
2141,
1649,
2344,
12035,
2917,
29897,
13,
308,
13,
4706,
1583,
29889,
2917,
353,
2295,
13,
4706,
1583,
29889,
2151,
353,
16662,
3195,
29898,
2917,
29897,
13,
4706,
1583,
29889,
8865,
449,
353,
302,
29876,
29889,
15063,
449,
29898,
2917,
29889,
10892,
29918,
8865,
449,
29918,
22795,
29897,
13,
4706,
1583,
29889,
13801,
353,
302,
29876,
29889,
12697,
29898,
2917,
29889,
10892,
29918,
2311,
29892,
2295,
29889,
1949,
29918,
21134,
29897,
13,
308,
13,
4706,
1583,
29889,
2344,
29918,
705,
5861,
580,
13,
4706,
1583,
29889,
7283,
29888,
353,
15600,
29943,
29898,
2917,
29889,
1949,
29918,
21134,
29892,
9853,
29918,
4102,
29922,
5574,
29897,
13,
308,
13,
418,
13,
1678,
822,
6375,
29898,
1311,
29892,
1881,
29918,
4841,
29892,
8570,
29918,
13168,
29892,
11073,
29922,
8516,
1125,
13,
18884,
13,
4706,
14391,
353,
1583,
29889,
2151,
29898,
2080,
29918,
4841,
29892,
8570,
29918,
13168,
29897,
13,
4706,
7934,
29918,
28631,
353,
14391,
29961,
29900,
29962,
29871,
396,
518,
16175,
29918,
2311,
29892,
19359,
29918,
2435,
29892,
7934,
29918,
2311,
29962,
13,
13,
4706,
714,
29918,
6099,
353,
1583,
29889,
8865,
449,
29898,
10892,
29918,
28631,
29897,
13,
4706,
25477,
29918,
771,
5824,
353,
1583,
29889,
13801,
29898,
449,
29918,
6099,
29897,
29871,
396,
518,
16175,
29918,
2311,
29892,
19359,
29918,
2435,
29892,
954,
29918,
11338,
29962,
13,
4706,
8570,
29918,
13168,
353,
8570,
29918,
13168,
29889,
1853,
29898,
7345,
305,
29889,
13470,
29947,
29897,
268,
13,
268,
13,
4706,
565,
11073,
338,
6213,
29901,
29871,
396,
18988,
871,
29889,
694,
7164,
13,
9651,
396,
15154,
1067,
29879,
29914,
19570,
313,
4039,
3192,
408,
448,
29896,
29900,
29900,
491,
5993,
675,
29918,
12508,
29897,
13,
9651,
2070,
29879,
29918,
7582,
353,
25477,
29918,
771,
5824,
7503,
29892,
29871,
29896,
13018,
29896,
29892,
584,
29962,
29871,
396,
518,
16175,
29918,
2311,
29892,
19359,
29918,
2435,
29899,
29906,
29892,
954,
29918,
11338,
29962,
13,
9651,
11105,
29918,
7582,
353,
8570,
29918,
13168,
7503,
29892,
29871,
29896,
13018,
29896,
29962,
259,
396,
518,
16175,
29918,
2311,
29892,
19359,
29918,
2435,
29899,
29906,
29962,
3986,
13,
9651,
4450,
29879,
353,
1583,
29889,
7283,
29888,
29889,
13808,
29898,
771,
5824,
29918,
7582,
29892,
11105,
29922,
13168,
29918,
7582,
29897,
29871,
396,
3566,
11105,
363,
525,
348,
8305,
29915,
13,
9651,
736,
4450,
29879,
29871,
396,
4450,
29879,
29901,
1051,
310,
1051,
6943,
1900,
4055,
19359,
29879,
363,
1269,
9853,
13,
4706,
1683,
29901,
13,
9651,
2070,
29879,
29918,
7582,
29892,
11105,
29918,
7582,
29892,
8282,
29918,
7582,
353,
19997,
19997,
5159,
13,
9651,
363,
2070,
29892,
11105,
29892,
4055,
297,
14319,
29898,
331,
2333,
29918,
771,
5824,
29892,
8570,
29918,
13168,
29892,
11073,
1125,
13,
18884,
396,
2070,
29901,
518,
11762,
29918,
2435,
29892,
954,
29918,
11338,
29962,
13,
18884,
396,
11105,
29914,
4039,
29901,
518,
11762,
29918,
2435,
29962,
13,
18884,
2070,
29879,
29918,
7582,
29889,
4397,
29898,
22795,
29961,
4039,
29991,
10457,
29896,
29900,
29900,
29892,
584,
2314,
13,
18884,
11105,
29918,
7582,
29889,
4397,
29898,
13168,
29961,
4039,
29991,
10457,
29896,
29900,
29900,
2314,
13,
18884,
8282,
29918,
7582,
29889,
4397,
29898,
4039,
29961,
4039,
29991,
10457,
29896,
29900,
29900,
2314,
13,
9651,
2070,
29879,
29918,
7582,
353,
4842,
305,
29889,
1429,
29898,
771,
5824,
29918,
7582,
29897,
29871,
396,
518,
16175,
29918,
2311,
29892,
19359,
29918,
2435,
29899,
29906,
29892,
954,
29918,
11338,
29962,
13,
9651,
11105,
29918,
7582,
353,
4842,
305,
29889,
1429,
29898,
13168,
29918,
7582,
29897,
259,
396,
518,
16175,
29918,
2311,
29892,
19359,
29918,
2435,
29899,
29906,
29962,
13,
9651,
8282,
29918,
7582,
353,
4842,
305,
29889,
1429,
29898,
11338,
29918,
7582,
29897,
29871,
396,
518,
16175,
29918,
2311,
29892,
19359,
29918,
2435,
29899,
29906,
29962,
13,
462,
13,
9651,
396,
1480,
29918,
5081,
22342,
353,
1583,
29889,
7283,
29888,
29898,
29943,
29889,
2695,
3317,
29898,
771,
5824,
29918,
7582,
29892,
3964,
29922,
29906,
511,
8282,
29918,
7582,
29892,
11105,
29922,
13168,
29918,
7582,
29892,
20376,
2433,
12676,
1495,
259,
13,
9651,
1480,
29918,
5081,
22342,
353,
1583,
29889,
7283,
29888,
29898,
29943,
29889,
1188,
29918,
2695,
3317,
29898,
771,
5824,
29918,
7582,
29892,
3964,
29922,
29906,
511,
8282,
29918,
7582,
29892,
11105,
29922,
13168,
29918,
7582,
29892,
20376,
2433,
12676,
1495,
259,
13,
9651,
4450,
29879,
353,
1583,
29889,
7283,
29888,
29889,
13808,
29898,
771,
5824,
29918,
7582,
29892,
11105,
29922,
13168,
29918,
7582,
29897,
29871,
396,
3566,
11105,
363,
525,
348,
8305,
29915,
13,
9651,
736,
4450,
29879,
29892,
2070,
29879,
29918,
7582,
29892,
11105,
29918,
7582,
29892,
1480,
29918,
5081,
22342,
13,
13,
29937,
7686,
13,
1990,
350,
20161,
29918,
29931,
1254,
29924,
29918,
11341,
29943,
29898,
29933,
814,
6572,
5323,
1312,
3195,
1125,
13,
268,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
2295,
1125,
13,
4706,
2428,
2141,
1649,
2344,
12035,
2917,
29897,
13,
308,
13,
4706,
1583,
29889,
2917,
353,
2295,
13,
4706,
1583,
29889,
2151,
353,
16662,
3195,
29898,
2917,
29897,
13,
4706,
1583,
29889,
8865,
449,
353,
302,
29876,
29889,
15063,
449,
29898,
2917,
29889,
10892,
29918,
8865,
449,
29918,
22795,
29897,
13,
308,
13,
4706,
1583,
29889,
20155,
29885,
353,
302,
29876,
29889,
29931,
1254,
29924,
29898,
2080,
29918,
2311,
353,
2295,
29889,
10892,
29918,
2311,
29892,
7934,
29918,
2311,
353,
2295,
29889,
10892,
29918,
2311,
29892,
13,
462,
9651,
954,
29918,
29277,
353,
29871,
29896,
29892,
5768,
449,
353,
2295,
29889,
10892,
29918,
8865,
449,
29918,
22795,
29892,
29871,
13,
462,
9651,
9853,
29918,
4102,
353,
5852,
29892,
21000,
8684,
284,
353,
5852,
29897,
13,
308,
13,
4706,
1583,
29889,
13801,
353,
302,
29876,
29889,
12697,
29898,
2917,
29889,
10892,
29918,
2311,
29930,
29906,
29892,
2295,
29889,
1949,
29918,
21134,
29897,
13,
308,
13,
4706,
1583,
29889,
2344,
29918,
705,
5861,
580,
13,
4706,
1583,
29889,
7283,
29888,
353,
15600,
29943,
29898,
2917,
29889,
1949,
29918,
21134,
29892,
9853,
29918,
4102,
29922,
5574,
29897,
13,
308,
13,
418,
13,
1678,
822,
6375,
29898,
1311,
29892,
1881,
29918,
4841,
29892,
8570,
29918,
13168,
29892,
11073,
29922,
8516,
29892,
736,
29918,
771,
5824,
29922,
8824,
1125,
13,
18884,
13,
4706,
14391,
353,
1583,
29889,
2151,
29898,
2080,
29918,
4841,
29892,
8570,
29918,
13168,
29897,
13,
4706,
7934,
29918,
28631,
353,
14391,
29961,
29900,
29962,
29871,
396,
518,
16175,
29918,
2311,
29892,
19359,
29918,
2435,
29892,
7934,
29918,
2311,
29962,
13,
308,
13,
4706,
714,
29918,
6099,
353,
1583,
29889,
8865,
449,
29898,
10892,
29918,
28631,
29897,
13,
4706,
714,
29918,
20155,
29885,
29892,
313,
29882,
29918,
29876,
29892,
274,
29918,
29876,
29897,
353,
1583,
29889,
20155,
29885,
29898,
449,
29918,
6099,
29897,
1678,
396,
518,
16175,
29918,
2311,
29892,
19359,
29918,
2435,
29892,
29871,
29906,
29930,
10892,
29918,
2311,
29962,
3986,
13,
4706,
25477,
29918,
771,
5824,
353,
1583,
29889,
13801,
29898,
449,
29918,
20155,
29885,
29897,
29871,
396,
518,
16175,
29918,
2311,
29892,
19359,
29918,
2435,
29892,
954,
29918,
11338,
29962,
308,
13,
4706,
8570,
29918,
13168,
353,
8570,
29918,
13168,
29889,
1853,
29898,
7345,
305,
29889,
13470,
29947,
29897,
539,
13,
1669,
13,
4706,
565,
11073,
338,
6213,
29901,
13,
9651,
396,
15154,
1067,
29879,
29914,
19570,
313,
4039,
3192,
408,
448,
29896,
29900,
29900,
491,
5993,
675,
29918,
12508,
29897,
13,
9651,
2070,
29879,
29918,
7582,
353,
25477,
29918,
771,
5824,
7503,
29892,
29871,
29896,
13018,
29896,
29892,
584,
29962,
29871,
396,
518,
16175,
29918,
2311,
29892,
19359,
29918,
2435,
29899,
29906,
29892,
954,
29918,
11338,
29962,
13,
9651,
11105,
29918,
7582,
353,
8570,
29918,
13168,
7503,
29892,
29871,
29896,
13018,
29896,
29962,
259,
396,
518,
16175,
29918,
2311,
29892,
19359,
29918,
2435,
29899,
29906,
29962,
3986,
13,
9651,
4450,
29879,
353,
1583,
29889,
7283,
29888,
29889,
13808,
29898,
771,
5824,
29918,
7582,
29892,
11105,
29922,
13168,
29918,
7582,
29897,
29871,
396,
3566,
11105,
363,
525,
348,
8305,
29915,
13,
632,
13,
9651,
565,
736,
29918,
771,
5824,
1275,
5852,
29901,
13,
18884,
736,
4450,
29879,
29892,
2070,
29879,
29918,
7582,
13,
9651,
1683,
29901,
13,
18884,
736,
4450,
29879,
29871,
396,
4450,
29879,
29901,
1051,
310,
1051,
6943,
1900,
4055,
19359,
29879,
363,
1269,
9853,
13,
4706,
1683,
29901,
13,
9651,
2070,
29879,
29918,
7582,
29892,
11105,
29918,
7582,
29892,
8282,
29918,
7582,
353,
19997,
19997,
5159,
13,
9651,
363,
2070,
29892,
11105,
29892,
4055,
297,
14319,
29898,
331,
2333,
29918,
771,
5824,
29892,
8570,
29918,
13168,
29892,
11073,
1125,
13,
18884,
396,
2070,
29901,
518,
11762,
29918,
2435,
29892,
954,
29918,
11338,
29962,
13,
18884,
396,
11105,
29914,
4039,
29901,
518,
11762,
29918,
2435,
29962,
13,
18884,
2070,
29879,
29918,
7582,
29889,
4397,
29898,
22795,
29961,
4039,
29991,
10457,
29896,
29900,
29900,
29892,
584,
2314,
13,
18884,
11105,
29918,
7582,
29889,
4397,
29898,
13168,
29961,
4039,
29991,
10457,
29896,
29900,
29900,
2314,
13,
18884,
8282,
29918,
7582,
29889,
4397,
29898,
4039,
29961,
4039,
29991,
10457,
29896,
29900,
29900,
2314,
4706,
13,
9651,
2070,
29879,
29918,
7582,
353,
4842,
305,
29889,
1429,
29898,
771,
5824,
29918,
7582,
29897,
29871,
396,
518,
16175,
29918,
2311,
29892,
19359,
29918,
2435,
29899,
29906,
29892,
954,
29918,
11338,
29962,
13,
9651,
11105,
29918,
7582,
353,
4842,
305,
29889,
1429,
29898,
13168,
29918,
7582,
29897,
29871,
396,
518,
16175,
29918,
2311,
29892,
19359,
29918,
2435,
29899,
29906,
29962,
13,
9651,
8282,
29918,
7582,
353,
4842,
305,
29889,
1429,
29898,
11338,
29918,
7582,
29897,
29871,
396,
518,
16175,
29918,
2311,
29892,
19359,
29918,
2435,
29899,
29906,
29962,
13,
308,
13,
9651,
396,
1480,
29918,
5081,
22342,
353,
1583,
29889,
7283,
29888,
29898,
29943,
29889,
2695,
3317,
29898,
771,
5824,
29918,
7582,
29892,
3964,
29922,
29906,
511,
8282,
29918,
7582,
29892,
11105,
29922,
13168,
29918,
7582,
29892,
20376,
2433,
12676,
1495,
259,
13,
9651,
1480,
29918,
5081,
22342,
353,
1583,
29889,
7283,
29888,
29898,
29943,
29889,
1188,
29918,
2695,
3317,
29898,
771,
5824,
29918,
7582,
29892,
3964,
29922,
29906,
511,
8282,
29918,
7582,
29892,
11105,
29922,
13168,
29918,
7582,
29892,
20376,
2433,
12676,
1495,
259,
13,
9651,
4450,
29879,
353,
1583,
29889,
7283,
29888,
29889,
13808,
29898,
771,
5824,
29918,
7582,
29892,
11105,
29922,
13168,
29918,
7582,
29897,
29871,
396,
3566,
11105,
363,
525,
348,
8305,
29915,
13,
9651,
736,
4450,
29879,
29892,
2070,
29879,
29918,
7582,
29892,
11105,
29918,
7582,
29892,
1480,
29918,
5081,
22342,
13,
308,
13,
308,
13,
29937,
7686,
13,
1990,
6652,
309,
29918,
11341,
29943,
29898,
13398,
309,
29933,
814,
6572,
5323,
1312,
3195,
1125,
13,
268,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
2295,
1125,
13,
4706,
2428,
2141,
1649,
2344,
12035,
2917,
29897,
13,
308,
13,
4706,
1583,
29889,
2917,
353,
2295,
13,
4706,
1583,
29889,
5721,
309,
2151,
353,
6652,
309,
29933,
814,
3195,
29898,
2917,
29897,
13,
4706,
1583,
29889,
8865,
449,
353,
302,
29876,
29889,
15063,
449,
29898,
2917,
29889,
8865,
449,
29897,
13,
4706,
1583,
29889,
13801,
353,
302,
29876,
29889,
12697,
29898,
2917,
29889,
10892,
29918,
2311,
29892,
2295,
29889,
1949,
29918,
21134,
29897,
13,
308,
13,
4706,
1583,
29889,
2344,
29918,
705,
5861,
580,
13,
4706,
1583,
29889,
7283,
29888,
353,
15600,
29943,
29898,
2917,
29889,
1949,
29918,
21134,
29892,
9853,
29918,
4102,
29922,
5574,
29897,
13,
308,
13,
418,
13,
1678,
822,
6375,
29898,
1311,
29892,
1881,
29918,
4841,
29892,
8570,
29918,
13168,
29892,
11073,
29922,
8516,
1125,
13,
308,
13,
4706,
396,
20535,
403,
1565,
1426,
29918,
29880,
575,
13,
4706,
396,
1426,
29918,
29880,
575,
353,
4842,
305,
29889,
2083,
29898,
1131,
2509,
29918,
13168,
29892,
3964,
29922,
29896,
29897,
29871,
396,
518,
16175,
29918,
2311,
29962,
13,
308,
13,
4706,
14391,
353,
1583,
29889,
5721,
309,
2151,
29898,
2080,
29918,
4841,
29892,
8570,
29918,
13168,
29897,
13,
4706,
7934,
29918,
28631,
353,
14391,
29961,
29900,
29962,
29871,
396,
518,
16175,
29918,
2311,
29892,
19359,
29918,
2435,
29892,
7934,
29918,
2311,
29962,
29871,
13,
4706,
714,
29918,
6099,
353,
1583,
29889,
8865,
449,
29898,
10892,
29918,
28631,
29897,
13,
4706,
25477,
29918,
771,
5824,
353,
1583,
29889,
13801,
29898,
449,
29918,
6099,
29897,
29871,
396,
518,
16175,
29918,
2311,
29892,
19359,
29918,
2435,
29892,
954,
29918,
11338,
29962,
13,
308,
13,
4706,
8570,
29918,
13168,
353,
8570,
29918,
13168,
29889,
1853,
29898,
7345,
305,
29889,
13470,
29947,
29897,
13,
4706,
2070,
29879,
29918,
7582,
29892,
11105,
29918,
7582,
29892,
8282,
29918,
7582,
353,
19997,
19997,
5159,
13,
4706,
363,
2070,
29892,
11105,
29892,
4055,
297,
14319,
29898,
331,
2333,
29918,
771,
5824,
29892,
8570,
29918,
13168,
29892,
11073,
1125,
13,
9651,
396,
2070,
29901,
518,
11762,
29918,
2435,
29892,
954,
29918,
11338,
29962,
13,
9651,
396,
11105,
29914,
4039,
29901,
518,
11762,
29918,
2435,
29962,
13,
9651,
2070,
29879,
29918,
7582,
29889,
4397,
29898,
22795,
29961,
4039,
29991,
10457,
29896,
29900,
29900,
29892,
584,
2314,
13,
9651,
11105,
29918,
7582,
29889,
4397,
29898,
13168,
29961,
4039,
29991,
10457,
29896,
29900,
29900,
2314,
13,
9651,
8282,
29918,
7582,
29889,
4397,
29898,
4039,
29961,
4039,
29991,
10457,
29896,
29900,
29900,
2314,
13,
308,
13,
4706,
2070,
29879,
29918,
7582,
353,
4842,
305,
29889,
1429,
29898,
771,
5824,
29918,
7582,
29897,
29871,
13,
4706,
11105,
29918,
7582,
353,
4842,
305,
29889,
1429,
29898,
13168,
29918,
7582,
29897,
29871,
13,
4706,
8282,
29918,
7582,
353,
4842,
305,
29889,
1429,
29898,
11338,
29918,
7582,
29897,
29871,
13,
462,
418,
13,
1669,
13,
4706,
565,
11073,
338,
6213,
29901,
13,
9651,
4450,
29879,
353,
1583,
29889,
7283,
29888,
29889,
13808,
29898,
771,
5824,
29918,
7582,
29892,
11105,
29922,
13168,
29918,
7582,
29897,
29871,
396,
3566,
11105,
363,
525,
348,
8305,
29915,
13,
9651,
736,
4450,
29879,
29871,
396,
4450,
29879,
29901,
1051,
310,
1051,
6943,
1900,
4055,
19359,
29879,
363,
1269,
9853,
13,
4706,
1683,
29901,
13,
9651,
1480,
29918,
5081,
22342,
353,
1583,
29889,
7283,
29888,
29898,
771,
5824,
29918,
7582,
29892,
8282,
29918,
7582,
29892,
11105,
29922,
13168,
29918,
7582,
29897,
29871,
396,
518,
16175,
29918,
2311,
29962,
13,
9651,
4450,
29879,
353,
1583,
29889,
7283,
29888,
29889,
13808,
29898,
771,
5824,
29918,
7582,
29892,
11105,
29922,
13168,
29918,
7582,
29897,
29871,
396,
3566,
11105,
363,
525,
348,
8305,
29915,
13,
9651,
736,
4450,
29879,
29892,
11105,
29918,
7582,
29892,
1480,
29918,
5081,
22342,
13,
2
] |
float_range/test_float_range.py | alehpineda/python_morsels | 0 | 131606 | <filename>float_range/test_float_range.py
from collections.abc import Generator
import sys
import unittest
from float_range import float_range
class FloatRangeTests(unittest.TestCase):
"""Tests for float_range."""
def test_has_iterability(self):
self.assertEqual(list(float_range(1, 11, 2)), [1, 3, 5, 7, 9])
self.assertEqual(
list(float_range(0.5, 7, 0.75)),
[0.5, 1.25, 2.0, 2.75, 3.5, 4.25, 5.0, 5.75, 6.5],
)
def test_optional_step(self):
self.assertEqual(list(float_range(1, 6, 1)), [1, 2, 3, 4, 5])
self.assertEqual(list(float_range(1, 6)), [1, 2, 3, 4, 5])
self.assertEqual(
list(float_range(0.5, 6)), [0.5, 1.5, 2.5, 3.5, 4.5, 5.5]
)
def test_optional_start(self):
self.assertEqual(list(float_range(0, 6)), [0, 1, 2, 3, 4, 5])
self.assertEqual(list(float_range(6)), [0, 1, 2, 3, 4, 5])
self.assertEqual(list(float_range(4.2)), [0, 1, 2, 3, 4])
def test_fractional_step_size(self):
self.assertEqual(
list(float_range(1, 6, 0.5)),
[1, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 5.5],
)
self.assertEqual(
list(float_range(1, 5.6, 0.5)),
[1, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 5.5],
)
def test_negative_step(self):
with self.assertRaises(StopIteration):
# Should be empty so StopIteration should be raised
next(iter(float_range(1, 6, -1)))
self.assertEqual(list(float_range(5, 0, -1)), [5, 4, 3, 2, 1])
self.assertEqual(
list(float_range(0.5, 6)), [0.5, 1.5, 2.5, 3.5, 4.5, 5.5]
)
self.assertEqual(
list(float_range(6, 1, -0.5)),
[6, 5.5, 5.0, 4.5, 4.0, 3.5, 3.0, 2.5, 2.0, 1.5],
)
def test_no_arguments(self):
with self.assertRaises(TypeError):
float_range()
def test_too_many_arguments(self):
with self.assertRaises(TypeError):
float_range(0, 5, 1, 1)
with self.assertRaises(TypeError):
float_range(0, 5, 1, 1, 1)
def test_no_memory_used(self):
"""Make sure float_range response isn't a giant list of numbers."""
response = float_range(0, 1024, 2 ** -4)
if isinstance(response, Generator):
next(response)
size = sum(
sys.getsizeof(obj)
for obj in response.gi_frame.f_locals.values()
)
else:
size = sys.getsizeof(response)
self.assertLess(size, 8000, "Too much memory used")
self.assertNotEqual(type(response), list)
self.assertNotEqual(type(response), tuple)
# @unittest.expectedFailure
def test_has_length(self):
self.assertEqual(len(float_range(100)), 100)
self.assertEqual(len(float_range(1, 100)), 99)
self.assertEqual(len(float_range(1, 11, 2)), 5)
self.assertEqual(len(float_range(0.5, 7, 0.75)), 9)
self.assertEqual(len(float_range(1000000)), 1000000)
self.assertEqual(len(float_range(11, 1.2, -2)), 5)
self.assertEqual(len(float_range(11, 1.2, 2)), 0)
# @unittest.expectedFailure
def test_reversed(self):
r = reversed(float_range(0.5, 7, 0.75))
self.assertEqual(
list(r), [6.5, 5.75, 5.0, 4.25, 3.5, 2.75, 2.0, 1.25, 0.5]
)
big_num = 1000000
self.assertEqual(next(reversed(float_range(big_num))), big_num - 1)
# @unittest.expectedFailure
def test_equality(self):
self.assertEqual(float_range(0, 5, 0.5), float_range(0, 5, 0.5))
self.assertEqual(float_range(5, 5), float_range(10, 10))
self.assertEqual(float_range(5, 11, 5), float_range(5, 12, 5))
self.assertEqual(float_range(10), float_range(0, 10))
self.assertNotEqual(
float_range(0, 2 ** 10, 2 ** -10),
float_range(0, 2 ** 10 + 1, 2 ** -10),
)
self.assertEqual(float_range(1000000), range(1000000))
self.assertEqual(range(1000000), float_range(1000000))
self.assertFalse(float_range(0, 5, 0.5) != float_range(0, 5, 0.5))
class EqualToEverything:
def __eq__(self, other):
return True
self.assertEqual(float_range(1000000), EqualToEverything())
def test_zero_step(self):
with self.assertRaises(ValueError):
# Should be empty so StopIteration should be raised
float_range(1, 6, 0)
if __name__ == "__main__":
unittest.main(verbosity=2)
| [
1,
529,
9507,
29958,
7411,
29918,
3881,
29914,
1688,
29918,
7411,
29918,
3881,
29889,
2272,
13,
3166,
16250,
29889,
10736,
1053,
3251,
1061,
13,
5215,
10876,
13,
5215,
443,
27958,
13,
13,
13,
3166,
5785,
29918,
3881,
1053,
5785,
29918,
3881,
13,
13,
13,
1990,
27842,
6069,
24376,
29898,
348,
27958,
29889,
3057,
8259,
1125,
13,
13,
1678,
9995,
24376,
363,
5785,
29918,
3881,
1213,
15945,
13,
13,
1678,
822,
1243,
29918,
5349,
29918,
1524,
3097,
29898,
1311,
1125,
13,
4706,
1583,
29889,
9294,
9843,
29898,
1761,
29898,
7411,
29918,
3881,
29898,
29896,
29892,
29871,
29896,
29896,
29892,
29871,
29906,
8243,
518,
29896,
29892,
29871,
29941,
29892,
29871,
29945,
29892,
29871,
29955,
29892,
29871,
29929,
2314,
13,
4706,
1583,
29889,
9294,
9843,
29898,
13,
9651,
1051,
29898,
7411,
29918,
3881,
29898,
29900,
29889,
29945,
29892,
29871,
29955,
29892,
29871,
29900,
29889,
29955,
29945,
8243,
13,
9651,
518,
29900,
29889,
29945,
29892,
29871,
29896,
29889,
29906,
29945,
29892,
29871,
29906,
29889,
29900,
29892,
29871,
29906,
29889,
29955,
29945,
29892,
29871,
29941,
29889,
29945,
29892,
29871,
29946,
29889,
29906,
29945,
29892,
29871,
29945,
29889,
29900,
29892,
29871,
29945,
29889,
29955,
29945,
29892,
29871,
29953,
29889,
29945,
1402,
13,
4706,
1723,
13,
13,
1678,
822,
1243,
29918,
25253,
29918,
10568,
29898,
1311,
1125,
13,
4706,
1583,
29889,
9294,
9843,
29898,
1761,
29898,
7411,
29918,
3881,
29898,
29896,
29892,
29871,
29953,
29892,
29871,
29896,
8243,
518,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
29892,
29871,
29946,
29892,
29871,
29945,
2314,
13,
4706,
1583,
29889,
9294,
9843,
29898,
1761,
29898,
7411,
29918,
3881,
29898,
29896,
29892,
29871,
29953,
8243,
518,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
29892,
29871,
29946,
29892,
29871,
29945,
2314,
13,
4706,
1583,
29889,
9294,
9843,
29898,
13,
9651,
1051,
29898,
7411,
29918,
3881,
29898,
29900,
29889,
29945,
29892,
29871,
29953,
8243,
518,
29900,
29889,
29945,
29892,
29871,
29896,
29889,
29945,
29892,
29871,
29906,
29889,
29945,
29892,
29871,
29941,
29889,
29945,
29892,
29871,
29946,
29889,
29945,
29892,
29871,
29945,
29889,
29945,
29962,
13,
4706,
1723,
13,
13,
1678,
822,
1243,
29918,
25253,
29918,
2962,
29898,
1311,
1125,
13,
4706,
1583,
29889,
9294,
9843,
29898,
1761,
29898,
7411,
29918,
3881,
29898,
29900,
29892,
29871,
29953,
8243,
518,
29900,
29892,
29871,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
29892,
29871,
29946,
29892,
29871,
29945,
2314,
13,
4706,
1583,
29889,
9294,
9843,
29898,
1761,
29898,
7411,
29918,
3881,
29898,
29953,
8243,
518,
29900,
29892,
29871,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
29892,
29871,
29946,
29892,
29871,
29945,
2314,
13,
4706,
1583,
29889,
9294,
9843,
29898,
1761,
29898,
7411,
29918,
3881,
29898,
29946,
29889,
29906,
8243,
518,
29900,
29892,
29871,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
29892,
29871,
29946,
2314,
13,
13,
1678,
822,
1243,
29918,
29888,
13857,
284,
29918,
10568,
29918,
2311,
29898,
1311,
1125,
13,
4706,
1583,
29889,
9294,
9843,
29898,
13,
9651,
1051,
29898,
7411,
29918,
3881,
29898,
29896,
29892,
29871,
29953,
29892,
29871,
29900,
29889,
29945,
8243,
13,
9651,
518,
29896,
29892,
29871,
29896,
29889,
29945,
29892,
29871,
29906,
29889,
29900,
29892,
29871,
29906,
29889,
29945,
29892,
29871,
29941,
29889,
29900,
29892,
29871,
29941,
29889,
29945,
29892,
29871,
29946,
29889,
29900,
29892,
29871,
29946,
29889,
29945,
29892,
29871,
29945,
29889,
29900,
29892,
29871,
29945,
29889,
29945,
1402,
13,
4706,
1723,
13,
4706,
1583,
29889,
9294,
9843,
29898,
13,
9651,
1051,
29898,
7411,
29918,
3881,
29898,
29896,
29892,
29871,
29945,
29889,
29953,
29892,
29871,
29900,
29889,
29945,
8243,
13,
9651,
518,
29896,
29892,
29871,
29896,
29889,
29945,
29892,
29871,
29906,
29889,
29900,
29892,
29871,
29906,
29889,
29945,
29892,
29871,
29941,
29889,
29900,
29892,
29871,
29941,
29889,
29945,
29892,
29871,
29946,
29889,
29900,
29892,
29871,
29946,
29889,
29945,
29892,
29871,
29945,
29889,
29900,
29892,
29871,
29945,
29889,
29945,
1402,
13,
4706,
1723,
13,
13,
1678,
822,
1243,
29918,
22198,
29918,
10568,
29898,
1311,
1125,
13,
4706,
411,
1583,
29889,
9294,
29934,
1759,
267,
29898,
16329,
13463,
362,
1125,
13,
9651,
396,
10575,
367,
4069,
577,
22303,
13463,
362,
881,
367,
10425,
13,
9651,
2446,
29898,
1524,
29898,
7411,
29918,
3881,
29898,
29896,
29892,
29871,
29953,
29892,
448,
29896,
4961,
13,
4706,
1583,
29889,
9294,
9843,
29898,
1761,
29898,
7411,
29918,
3881,
29898,
29945,
29892,
29871,
29900,
29892,
448,
29896,
8243,
518,
29945,
29892,
29871,
29946,
29892,
29871,
29941,
29892,
29871,
29906,
29892,
29871,
29896,
2314,
13,
4706,
1583,
29889,
9294,
9843,
29898,
13,
9651,
1051,
29898,
7411,
29918,
3881,
29898,
29900,
29889,
29945,
29892,
29871,
29953,
8243,
518,
29900,
29889,
29945,
29892,
29871,
29896,
29889,
29945,
29892,
29871,
29906,
29889,
29945,
29892,
29871,
29941,
29889,
29945,
29892,
29871,
29946,
29889,
29945,
29892,
29871,
29945,
29889,
29945,
29962,
13,
4706,
1723,
13,
4706,
1583,
29889,
9294,
9843,
29898,
13,
9651,
1051,
29898,
7411,
29918,
3881,
29898,
29953,
29892,
29871,
29896,
29892,
448,
29900,
29889,
29945,
8243,
13,
9651,
518,
29953,
29892,
29871,
29945,
29889,
29945,
29892,
29871,
29945,
29889,
29900,
29892,
29871,
29946,
29889,
29945,
29892,
29871,
29946,
29889,
29900,
29892,
29871,
29941,
29889,
29945,
29892,
29871,
29941,
29889,
29900,
29892,
29871,
29906,
29889,
29945,
29892,
29871,
29906,
29889,
29900,
29892,
29871,
29896,
29889,
29945,
1402,
13,
4706,
1723,
13,
13,
1678,
822,
1243,
29918,
1217,
29918,
25699,
29898,
1311,
1125,
13,
4706,
411,
1583,
29889,
9294,
29934,
1759,
267,
29898,
1542,
2392,
1125,
13,
9651,
5785,
29918,
3881,
580,
13,
13,
1678,
822,
1243,
29918,
517,
29877,
29918,
13011,
29918,
25699,
29898,
1311,
1125,
13,
4706,
411,
1583,
29889,
9294,
29934,
1759,
267,
29898,
1542,
2392,
1125,
13,
9651,
5785,
29918,
3881,
29898,
29900,
29892,
29871,
29945,
29892,
29871,
29896,
29892,
29871,
29896,
29897,
13,
4706,
411,
1583,
29889,
9294,
29934,
1759,
267,
29898,
1542,
2392,
1125,
13,
9651,
5785,
29918,
3881,
29898,
29900,
29892,
29871,
29945,
29892,
29871,
29896,
29892,
29871,
29896,
29892,
29871,
29896,
29897,
13,
13,
1678,
822,
1243,
29918,
1217,
29918,
14834,
29918,
3880,
29898,
1311,
1125,
13,
4706,
9995,
9984,
1854,
5785,
29918,
3881,
2933,
3508,
29915,
29873,
263,
28396,
1051,
310,
3694,
1213,
15945,
13,
4706,
2933,
353,
5785,
29918,
3881,
29898,
29900,
29892,
29871,
29896,
29900,
29906,
29946,
29892,
29871,
29906,
3579,
448,
29946,
29897,
13,
4706,
565,
338,
8758,
29898,
5327,
29892,
3251,
1061,
1125,
13,
9651,
2446,
29898,
5327,
29897,
13,
9651,
2159,
353,
2533,
29898,
13,
18884,
10876,
29889,
657,
17921,
29898,
5415,
29897,
13,
18884,
363,
5446,
297,
2933,
29889,
3146,
29918,
2557,
29889,
29888,
29918,
2997,
29879,
29889,
5975,
580,
13,
9651,
1723,
13,
4706,
1683,
29901,
13,
9651,
2159,
353,
10876,
29889,
657,
17921,
29898,
5327,
29897,
13,
4706,
1583,
29889,
9294,
29931,
404,
29898,
2311,
29892,
29871,
29947,
29900,
29900,
29900,
29892,
376,
1762,
29877,
1568,
3370,
1304,
1159,
13,
4706,
1583,
29889,
9294,
3664,
9843,
29898,
1853,
29898,
5327,
511,
1051,
29897,
13,
4706,
1583,
29889,
9294,
3664,
9843,
29898,
1853,
29898,
5327,
511,
18761,
29897,
13,
13,
1678,
396,
732,
348,
27958,
29889,
9684,
24155,
13,
1678,
822,
1243,
29918,
5349,
29918,
2848,
29898,
1311,
1125,
13,
4706,
1583,
29889,
9294,
9843,
29898,
2435,
29898,
7411,
29918,
3881,
29898,
29896,
29900,
29900,
8243,
29871,
29896,
29900,
29900,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
2435,
29898,
7411,
29918,
3881,
29898,
29896,
29892,
29871,
29896,
29900,
29900,
8243,
29871,
29929,
29929,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
2435,
29898,
7411,
29918,
3881,
29898,
29896,
29892,
29871,
29896,
29896,
29892,
29871,
29906,
8243,
29871,
29945,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
2435,
29898,
7411,
29918,
3881,
29898,
29900,
29889,
29945,
29892,
29871,
29955,
29892,
29871,
29900,
29889,
29955,
29945,
8243,
29871,
29929,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
2435,
29898,
7411,
29918,
3881,
29898,
29896,
29900,
29900,
29900,
29900,
29900,
29900,
8243,
29871,
29896,
29900,
29900,
29900,
29900,
29900,
29900,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
2435,
29898,
7411,
29918,
3881,
29898,
29896,
29896,
29892,
29871,
29896,
29889,
29906,
29892,
448,
29906,
8243,
29871,
29945,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
2435,
29898,
7411,
29918,
3881,
29898,
29896,
29896,
29892,
29871,
29896,
29889,
29906,
29892,
29871,
29906,
8243,
29871,
29900,
29897,
13,
13,
1678,
396,
732,
348,
27958,
29889,
9684,
24155,
13,
1678,
822,
1243,
29918,
276,
874,
287,
29898,
1311,
1125,
13,
4706,
364,
353,
18764,
287,
29898,
7411,
29918,
3881,
29898,
29900,
29889,
29945,
29892,
29871,
29955,
29892,
29871,
29900,
29889,
29955,
29945,
876,
13,
4706,
1583,
29889,
9294,
9843,
29898,
13,
9651,
1051,
29898,
29878,
511,
518,
29953,
29889,
29945,
29892,
29871,
29945,
29889,
29955,
29945,
29892,
29871,
29945,
29889,
29900,
29892,
29871,
29946,
29889,
29906,
29945,
29892,
29871,
29941,
29889,
29945,
29892,
29871,
29906,
29889,
29955,
29945,
29892,
29871,
29906,
29889,
29900,
29892,
29871,
29896,
29889,
29906,
29945,
29892,
29871,
29900,
29889,
29945,
29962,
13,
4706,
1723,
13,
4706,
4802,
29918,
1949,
353,
29871,
29896,
29900,
29900,
29900,
29900,
29900,
29900,
13,
4706,
1583,
29889,
9294,
9843,
29898,
4622,
29898,
276,
874,
287,
29898,
7411,
29918,
3881,
29898,
3752,
29918,
1949,
876,
511,
4802,
29918,
1949,
448,
29871,
29896,
29897,
13,
13,
1678,
396,
732,
348,
27958,
29889,
9684,
24155,
13,
1678,
822,
1243,
29918,
13895,
29898,
1311,
1125,
13,
4706,
1583,
29889,
9294,
9843,
29898,
7411,
29918,
3881,
29898,
29900,
29892,
29871,
29945,
29892,
29871,
29900,
29889,
29945,
511,
5785,
29918,
3881,
29898,
29900,
29892,
29871,
29945,
29892,
29871,
29900,
29889,
29945,
876,
13,
4706,
1583,
29889,
9294,
9843,
29898,
7411,
29918,
3881,
29898,
29945,
29892,
29871,
29945,
511,
5785,
29918,
3881,
29898,
29896,
29900,
29892,
29871,
29896,
29900,
876,
13,
4706,
1583,
29889,
9294,
9843,
29898,
7411,
29918,
3881,
29898,
29945,
29892,
29871,
29896,
29896,
29892,
29871,
29945,
511,
5785,
29918,
3881,
29898,
29945,
29892,
29871,
29896,
29906,
29892,
29871,
29945,
876,
13,
4706,
1583,
29889,
9294,
9843,
29898,
7411,
29918,
3881,
29898,
29896,
29900,
511,
5785,
29918,
3881,
29898,
29900,
29892,
29871,
29896,
29900,
876,
13,
4706,
1583,
29889,
9294,
3664,
9843,
29898,
13,
9651,
5785,
29918,
3881,
29898,
29900,
29892,
29871,
29906,
3579,
29871,
29896,
29900,
29892,
29871,
29906,
3579,
448,
29896,
29900,
511,
13,
9651,
5785,
29918,
3881,
29898,
29900,
29892,
29871,
29906,
3579,
29871,
29896,
29900,
718,
29871,
29896,
29892,
29871,
29906,
3579,
448,
29896,
29900,
511,
13,
4706,
1723,
13,
4706,
1583,
29889,
9294,
9843,
29898,
7411,
29918,
3881,
29898,
29896,
29900,
29900,
29900,
29900,
29900,
29900,
511,
3464,
29898,
29896,
29900,
29900,
29900,
29900,
29900,
29900,
876,
13,
4706,
1583,
29889,
9294,
9843,
29898,
3881,
29898,
29896,
29900,
29900,
29900,
29900,
29900,
29900,
511,
5785,
29918,
3881,
29898,
29896,
29900,
29900,
29900,
29900,
29900,
29900,
876,
13,
4706,
1583,
29889,
9294,
8824,
29898,
7411,
29918,
3881,
29898,
29900,
29892,
29871,
29945,
29892,
29871,
29900,
29889,
29945,
29897,
2804,
5785,
29918,
3881,
29898,
29900,
29892,
29871,
29945,
29892,
29871,
29900,
29889,
29945,
876,
13,
13,
4706,
770,
11243,
284,
1762,
26526,
1918,
29901,
13,
9651,
822,
4770,
1837,
12035,
1311,
29892,
916,
1125,
13,
18884,
736,
5852,
13,
13,
4706,
1583,
29889,
9294,
9843,
29898,
7411,
29918,
3881,
29898,
29896,
29900,
29900,
29900,
29900,
29900,
29900,
511,
11243,
284,
1762,
26526,
1918,
3101,
13,
13,
1678,
822,
1243,
29918,
9171,
29918,
10568,
29898,
1311,
1125,
13,
4706,
411,
1583,
29889,
9294,
29934,
1759,
267,
29898,
1917,
2392,
1125,
13,
9651,
396,
10575,
367,
4069,
577,
22303,
13463,
362,
881,
367,
10425,
13,
9651,
5785,
29918,
3881,
29898,
29896,
29892,
29871,
29953,
29892,
29871,
29900,
29897,
13,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
1678,
443,
27958,
29889,
3396,
29898,
18248,
359,
537,
29922,
29906,
29897,
13,
2
] |
spirit/comment/poll/migrations/0002_auto_20190304_2115.py | Ke-xueting/Spirit | 974 | 165648 | <filename>spirit/comment/poll/migrations/0002_auto_20190304_2115.py
# Generated by Django 2.1.7 on 2019-03-04 21:15
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('spirit_comment_poll', '0001_initial'),
]
operations = [
migrations.AlterModelOptions(
name='commentpoll',
options={'verbose_name': 'comment poll', 'verbose_name_plural': 'comments polls'},
),
migrations.AlterModelOptions(
name='commentpollchoice',
options={'ordering': ['number'], 'verbose_name': 'poll choice', 'verbose_name_plural': 'poll choices'},
),
]
| [
1,
529,
9507,
29958,
1028,
14987,
29914,
9342,
29914,
29886,
3028,
29914,
26983,
800,
29914,
29900,
29900,
29900,
29906,
29918,
6921,
29918,
29906,
29900,
29896,
29929,
29900,
29941,
29900,
29946,
29918,
29906,
29896,
29896,
29945,
29889,
2272,
13,
29937,
3251,
630,
491,
15337,
29871,
29906,
29889,
29896,
29889,
29955,
373,
29871,
29906,
29900,
29896,
29929,
29899,
29900,
29941,
29899,
29900,
29946,
29871,
29906,
29896,
29901,
29896,
29945,
13,
13,
3166,
9557,
29889,
2585,
1053,
9725,
800,
13,
13,
13,
1990,
341,
16783,
29898,
26983,
800,
29889,
29924,
16783,
1125,
13,
13,
1678,
9962,
353,
518,
13,
4706,
6702,
1028,
14987,
29918,
9342,
29918,
29886,
3028,
742,
525,
29900,
29900,
29900,
29896,
29918,
11228,
5477,
13,
1678,
4514,
13,
13,
1678,
6931,
353,
518,
13,
4706,
9725,
800,
29889,
2499,
357,
3195,
5856,
29898,
13,
9651,
1024,
2433,
9342,
29886,
3028,
742,
13,
9651,
3987,
3790,
29915,
369,
15828,
29918,
978,
2396,
525,
9342,
21180,
742,
525,
369,
15828,
29918,
978,
29918,
572,
3631,
2396,
525,
21032,
1248,
3137,
16675,
13,
4706,
10353,
13,
4706,
9725,
800,
29889,
2499,
357,
3195,
5856,
29898,
13,
9651,
1024,
2433,
9342,
29886,
3028,
16957,
742,
13,
9651,
3987,
3790,
29915,
2098,
292,
2396,
6024,
4537,
7464,
525,
369,
15828,
29918,
978,
2396,
525,
29886,
3028,
7348,
742,
525,
369,
15828,
29918,
978,
29918,
572,
3631,
2396,
525,
29886,
3028,
19995,
16675,
13,
4706,
10353,
13,
1678,
4514,
13,
2
] |
dayu_widgets/radio_button.py | ZSD-tim/dayu_widgets | 157 | 25902 | <reponame>ZSD-tim/dayu_widgets
#!/usr/bin/env python
# -*- coding: utf-8 -*-
###################################################################
# Author: <NAME>
# Date : 2019.2
# Email : <EMAIL>
###################################################################
"""
MRadioButton
"""
from dayu_widgets.mixin import cursor_mixin
from dayu_widgets.qt import QRadioButton
@cursor_mixin
class MRadioButton(QRadioButton):
"""
MRadioButton just use stylesheet and set cursor shape when hover. No more extend.
"""
def __init__(self, text='', parent=None):
super(MRadioButton, self).__init__(text=text, parent=parent)
| [
1,
529,
276,
1112,
420,
29958,
29999,
7230,
29899,
9346,
29914,
3250,
29884,
29918,
8030,
29879,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13383,
13383,
13383,
13383,
2277,
29937,
13,
29937,
13361,
29901,
529,
5813,
29958,
13,
29937,
4712,
29871,
584,
29871,
29906,
29900,
29896,
29929,
29889,
29906,
13,
29937,
22608,
584,
529,
26862,
6227,
29958,
13,
13383,
13383,
13383,
13383,
2277,
29937,
13,
15945,
29908,
13,
29924,
21818,
3125,
13,
15945,
29908,
13,
3166,
2462,
29884,
29918,
8030,
29879,
29889,
28084,
262,
1053,
10677,
29918,
28084,
262,
13,
3166,
2462,
29884,
29918,
8030,
29879,
29889,
17915,
1053,
660,
21818,
3125,
13,
13,
13,
29992,
18127,
29918,
28084,
262,
13,
1990,
341,
21818,
3125,
29898,
29984,
21818,
3125,
1125,
13,
1678,
9995,
13,
1678,
341,
21818,
3125,
925,
671,
11949,
4155,
322,
731,
10677,
8267,
746,
16758,
29889,
1939,
901,
10985,
29889,
13,
1678,
9995,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1426,
2433,
742,
3847,
29922,
8516,
1125,
13,
4706,
2428,
29898,
29924,
21818,
3125,
29892,
1583,
467,
1649,
2344,
12035,
726,
29922,
726,
29892,
3847,
29922,
3560,
29897,
13,
2
] |
retrieval.py | janghyuncho/PiCIE | 113 | 133519 | <filename>retrieval.py
import os
import sys
import argparse
import logging
import time as t
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
from modules import fpn
from commons import *
from utils import *
from train_picie import *
def initialize_classifier(args, n_query, centroids):
classifier = nn.Conv2d(args.in_dim, n_query, kernel_size=1, stride=1, padding=0, bias=False)
classifier = nn.DataParallel(classifier)
classifier = classifier.cuda()
if centroids is not None:
classifier.module.weight.data = centroids.unsqueeze(-1).unsqueeze(-1)
freeze_all(classifier)
return classifier
def get_testloader(args):
testset = EvalDataset(args.data_root, dataset=args.dataset, res=args.res1, split=args.val_type, mode='test', stuff=args.stuff, thing=args.thing)
testloader = torch.utils.data.DataLoader(testset,
batch_size=args.batch_size_eval,
shuffle=False,
num_workers=args.num_workers,
pin_memory=True,
collate_fn=collate_eval)
return testloader
def compute_dist(featmap, metric_function, euclidean_train=True):
centroids = metric_function.module.weight.data
if euclidean_train:
return - (1 - 2*metric_function(featmap)\
+ (centroids*centroids).sum(dim=1).unsqueeze(0)) # negative l2 squared
else:
return metric_function(featmap)
def get_nearest_neighbors(n_query, dataloader, model, classifier, k=10):
model.eval()
classifier.eval()
min_dsts = [[] for _ in range(n_query)]
min_locs = [[] for _ in range(n_query)]
min_imgs = [[] for _ in range(n_query)]
with torch.no_grad():
for indice, image, label in dataloader:
image = image.cuda(non_blocking=True)
feats = model(image)
feats = F.normalize(feats, dim=1, p=2)
dists = compute_dist(feats, classifier) # (B x C x H x W)
B, _, H, W = dists.shape
for c in range(n_query):
dst, idx = dists[:, c].flatten().topk(1)
idx = idx.item()
ib = idx//(H*W)
ih = idx%(H*W)//W
iw = idx%(H*W)%W
if len(min_dsts[c]) < k:
min_dsts[c].append(dst)
min_locs[c].append((ib, ih, iw))
min_imgs[c].append(indice[ib])
elif dst < max(min_dsts[c]):
imax = np.argmax(min_dsts[c])
min_dsts[c] = min_dsts[c][:imax] + min_dsts[c][imax+1:]
min_locs[c] = min_locs[c][:imax] + min_locs[c][imax+1:]
min_imgs[c] = min_imgs[c][:imax] + min_imgs[c][imax+1:]
min_dsts[c].append(dst)
min_locs[c].append((ib, ih, iw))
min_imgs[c].append(indice[ib])
loclist = min_locs
dataset = dataloader.dataset
imglist = [[dataset.transform_data(*dataset.load_data(dataset.imdb[i]), i, raw_image=True) for i in ids] for ids in min_imgs]
return imglist, loclist
if __name__ == '__main__':
args = parse_arguments()
# Use random seed.
fix_seed_for_reproducability(args.seed)
# Init model.
model = fpn.PanopticFPN(args)
model = nn.DataParallel(model)
model = model.cuda()
# Load weights.
checkpoint = torch.load(args.eval_path)
model.load_state_dict(checkpoint['state_dict'])
# Init classifier (for eval only.)
queries = torch.tensor(np.load('querys.npy')).cuda()
classifier = initialize_classifier(args, queries.size(0), queries)
# Prepare dataloader.
dataset = get_dataset(args, mode='eval_test')
dataloader = torch.utils.data.DataLoader(dataset,
batch_size=args.batch_size_test,
shuffle=False,
num_workers=args.num_workers,
pin_memory=True,
collate_fn=collate_eval,
worker_init_fn=worker_init_fn(args.seed))
# Retrieve 10-nearest neighbors.
imglist, loclist = get_nearest_neighbors(queries.size(0), dataloader, model, classifier, k=args.K_test)
# Save the result.
torch.save([imglist, loclist], args.save_root + '/picie_retrieval_result_coco.pkl')
print('-Done.', flush=True)
| [
1,
529,
9507,
29958,
276,
509,
16837,
29889,
2272,
13,
5215,
2897,
29871,
13,
5215,
10876,
29871,
13,
5215,
1852,
5510,
29871,
13,
5215,
12183,
13,
5215,
931,
408,
260,
29871,
13,
5215,
12655,
408,
7442,
29871,
13,
13,
5215,
4842,
305,
13,
5215,
4842,
305,
29889,
15755,
408,
302,
29876,
13,
5215,
4842,
305,
29889,
15755,
29889,
2220,
284,
408,
383,
13,
13,
3166,
10585,
1053,
285,
21257,
13,
3166,
844,
787,
1053,
334,
13,
3166,
3667,
29879,
1053,
334,
13,
3166,
7945,
29918,
16447,
347,
1053,
334,
13,
13,
13,
13,
13,
1753,
11905,
29918,
1990,
3709,
29898,
5085,
29892,
302,
29918,
1972,
29892,
1644,
1007,
29879,
1125,
13,
1678,
770,
3709,
353,
302,
29876,
29889,
1168,
29894,
29906,
29881,
29898,
5085,
29889,
262,
29918,
6229,
29892,
302,
29918,
1972,
29892,
8466,
29918,
2311,
29922,
29896,
29892,
380,
2426,
29922,
29896,
29892,
7164,
29922,
29900,
29892,
24003,
29922,
8824,
29897,
13,
1678,
770,
3709,
353,
302,
29876,
29889,
1469,
2177,
6553,
29898,
1990,
3709,
29897,
13,
1678,
770,
3709,
353,
770,
3709,
29889,
29883,
6191,
580,
13,
1678,
565,
1644,
1007,
29879,
338,
451,
6213,
29901,
13,
4706,
770,
3709,
29889,
5453,
29889,
7915,
29889,
1272,
353,
1644,
1007,
29879,
29889,
6948,
802,
29872,
911,
6278,
29896,
467,
6948,
802,
29872,
911,
6278,
29896,
29897,
13,
1678,
3889,
911,
29918,
497,
29898,
1990,
3709,
29897,
13,
13,
1678,
736,
770,
3709,
13,
13,
13,
1753,
679,
29918,
1688,
12657,
29898,
5085,
1125,
13,
1678,
1243,
842,
1678,
353,
382,
791,
16390,
24541,
29898,
5085,
29889,
1272,
29918,
4632,
29892,
8783,
29922,
5085,
29889,
24713,
29892,
620,
29922,
5085,
29889,
690,
29896,
29892,
6219,
29922,
5085,
29889,
791,
29918,
1853,
29892,
4464,
2433,
1688,
742,
6433,
29922,
5085,
29889,
303,
3096,
29892,
2655,
29922,
5085,
29889,
1918,
29897,
13,
1678,
1243,
12657,
353,
4842,
305,
29889,
13239,
29889,
1272,
29889,
1469,
10036,
29898,
1688,
842,
29892,
29871,
13,
462,
462,
632,
9853,
29918,
2311,
29922,
5085,
29889,
16175,
29918,
2311,
29918,
14513,
29892,
13,
462,
462,
632,
528,
21897,
29922,
8824,
29892,
13,
462,
462,
632,
954,
29918,
1287,
414,
29922,
5085,
29889,
1949,
29918,
1287,
414,
29892,
13,
462,
462,
632,
12534,
29918,
14834,
29922,
5574,
29892,
13,
462,
462,
632,
5321,
403,
29918,
9144,
29922,
1054,
9632,
29918,
14513,
29897,
13,
13,
1678,
736,
1243,
12657,
13,
13,
13,
1753,
10272,
29918,
5721,
29898,
1725,
271,
1958,
29892,
12714,
29918,
2220,
29892,
321,
27511,
29918,
14968,
29922,
5574,
1125,
13,
1678,
1644,
1007,
29879,
353,
12714,
29918,
2220,
29889,
5453,
29889,
7915,
29889,
1272,
13,
1678,
565,
321,
27511,
29918,
14968,
29901,
13,
4706,
736,
448,
313,
29896,
448,
29871,
29906,
29930,
16414,
29918,
2220,
29898,
1725,
271,
1958,
2144,
13,
462,
1678,
718,
313,
1760,
1007,
29879,
29930,
1760,
1007,
29879,
467,
2083,
29898,
6229,
29922,
29896,
467,
6948,
802,
29872,
911,
29898,
29900,
876,
396,
8178,
301,
29906,
10674,
1965,
29871,
13,
1678,
1683,
29901,
13,
4706,
736,
12714,
29918,
2220,
29898,
1725,
271,
1958,
29897,
13,
13,
13,
1753,
679,
29918,
28502,
342,
29918,
484,
1141,
29890,
943,
29898,
29876,
29918,
1972,
29892,
1418,
7003,
1664,
29892,
1904,
29892,
770,
3709,
29892,
413,
29922,
29896,
29900,
1125,
13,
1678,
1904,
29889,
14513,
580,
13,
1678,
770,
3709,
29889,
14513,
580,
13,
13,
1678,
1375,
29918,
22992,
29879,
353,
518,
2636,
363,
903,
297,
3464,
29898,
29876,
29918,
1972,
4638,
13,
1678,
1375,
29918,
2029,
29879,
353,
518,
2636,
363,
903,
297,
3464,
29898,
29876,
29918,
1972,
4638,
13,
1678,
1375,
29918,
2492,
29879,
353,
518,
2636,
363,
903,
297,
3464,
29898,
29876,
29918,
1972,
4638,
13,
1678,
411,
4842,
305,
29889,
1217,
29918,
5105,
7295,
13,
4706,
363,
1399,
625,
29892,
1967,
29892,
3858,
297,
1418,
7003,
1664,
29901,
13,
9651,
1967,
353,
1967,
29889,
29883,
6191,
29898,
5464,
29918,
1271,
292,
29922,
5574,
29897,
13,
9651,
1238,
1446,
353,
1904,
29898,
3027,
29897,
13,
9651,
1238,
1446,
353,
383,
29889,
8945,
675,
29898,
1725,
1446,
29892,
3964,
29922,
29896,
29892,
282,
29922,
29906,
29897,
13,
9651,
1320,
29879,
353,
10272,
29918,
5721,
29898,
1725,
1446,
29892,
770,
3709,
29897,
396,
313,
29933,
921,
315,
921,
379,
921,
399,
29897,
13,
9651,
350,
29892,
17117,
379,
29892,
399,
353,
1320,
29879,
29889,
12181,
13,
9651,
363,
274,
297,
3464,
29898,
29876,
29918,
1972,
1125,
13,
18884,
29743,
29892,
22645,
353,
1320,
29879,
7503,
29892,
274,
1822,
1579,
8606,
2141,
3332,
29895,
29898,
29896,
29897,
13,
13,
18884,
22645,
353,
22645,
29889,
667,
580,
13,
18884,
474,
29890,
353,
22645,
458,
29898,
29950,
29930,
29956,
29897,
13,
18884,
4686,
353,
22645,
29995,
29898,
29950,
29930,
29956,
29897,
458,
29956,
29871,
13,
18884,
474,
29893,
353,
22645,
29995,
29898,
29950,
29930,
29956,
29897,
29995,
29956,
13,
18884,
565,
7431,
29898,
1195,
29918,
22992,
29879,
29961,
29883,
2314,
529,
413,
29901,
13,
462,
1678,
1375,
29918,
22992,
29879,
29961,
29883,
1822,
4397,
29898,
22992,
29897,
13,
462,
1678,
1375,
29918,
2029,
29879,
29961,
29883,
1822,
4397,
3552,
747,
29892,
4686,
29892,
474,
29893,
876,
13,
462,
1678,
1375,
29918,
2492,
29879,
29961,
29883,
1822,
4397,
29898,
513,
625,
29961,
747,
2314,
13,
18884,
25342,
29743,
529,
4236,
29898,
1195,
29918,
22992,
29879,
29961,
29883,
29962,
1125,
13,
462,
1678,
527,
1165,
353,
7442,
29889,
1191,
3317,
29898,
1195,
29918,
22992,
29879,
29961,
29883,
2314,
13,
13,
462,
1678,
1375,
29918,
22992,
29879,
29961,
29883,
29962,
353,
1375,
29918,
22992,
29879,
29961,
29883,
3816,
29901,
326,
1165,
29962,
718,
1375,
29918,
22992,
29879,
29961,
29883,
3816,
326,
1165,
29974,
29896,
17531,
13,
462,
1678,
1375,
29918,
2029,
29879,
29961,
29883,
29962,
353,
1375,
29918,
2029,
29879,
29961,
29883,
3816,
29901,
326,
1165,
29962,
718,
1375,
29918,
2029,
29879,
29961,
29883,
3816,
326,
1165,
29974,
29896,
17531,
13,
462,
1678,
1375,
29918,
2492,
29879,
29961,
29883,
29962,
353,
1375,
29918,
2492,
29879,
29961,
29883,
3816,
29901,
326,
1165,
29962,
718,
1375,
29918,
2492,
29879,
29961,
29883,
3816,
326,
1165,
29974,
29896,
17531,
13,
13,
462,
1678,
1375,
29918,
22992,
29879,
29961,
29883,
1822,
4397,
29898,
22992,
29897,
13,
462,
1678,
1375,
29918,
2029,
29879,
29961,
29883,
1822,
4397,
3552,
747,
29892,
4686,
29892,
474,
29893,
876,
13,
462,
1678,
1375,
29918,
2492,
29879,
29961,
29883,
1822,
4397,
29898,
513,
625,
29961,
747,
2314,
13,
462,
13,
1678,
1180,
1761,
353,
1375,
29918,
2029,
29879,
29871,
13,
1678,
8783,
353,
1418,
7003,
1664,
29889,
24713,
13,
1678,
10153,
1761,
353,
5519,
24713,
29889,
9067,
29918,
1272,
10456,
24713,
29889,
1359,
29918,
1272,
29898,
24713,
29889,
326,
2585,
29961,
29875,
11724,
474,
29892,
10650,
29918,
3027,
29922,
5574,
29897,
363,
474,
297,
18999,
29962,
363,
18999,
297,
1375,
29918,
2492,
29879,
29962,
13,
1678,
736,
10153,
1761,
29892,
1180,
1761,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
6389,
353,
6088,
29918,
25699,
580,
13,
268,
13,
1678,
396,
4803,
4036,
16717,
29889,
13,
1678,
2329,
29918,
26776,
29918,
1454,
29918,
276,
5498,
29883,
3097,
29898,
5085,
29889,
26776,
29897,
13,
13,
1678,
396,
10886,
1904,
29889,
29871,
13,
1678,
1904,
353,
285,
21257,
29889,
29925,
1562,
23000,
29943,
15695,
29898,
5085,
29897,
13,
1678,
1904,
353,
302,
29876,
29889,
1469,
2177,
6553,
29898,
4299,
29897,
13,
1678,
1904,
353,
1904,
29889,
29883,
6191,
580,
13,
13,
1678,
396,
16012,
18177,
29889,
13,
1678,
1423,
3149,
353,
4842,
305,
29889,
1359,
29898,
5085,
29889,
14513,
29918,
2084,
29897,
29871,
13,
1678,
1904,
29889,
1359,
29918,
3859,
29918,
8977,
29898,
3198,
3149,
1839,
3859,
29918,
8977,
11287,
13,
268,
13,
1678,
396,
10886,
770,
3709,
313,
1454,
19745,
871,
1846,
13,
1678,
9365,
353,
4842,
305,
29889,
20158,
29898,
9302,
29889,
1359,
877,
1972,
29879,
29889,
29876,
2272,
1495,
467,
29883,
6191,
580,
13,
1678,
770,
3709,
353,
11905,
29918,
1990,
3709,
29898,
5085,
29892,
9365,
29889,
2311,
29898,
29900,
511,
9365,
29897,
13,
13,
1678,
396,
349,
3445,
598,
1418,
7003,
1664,
29889,
13,
1678,
8783,
1678,
353,
679,
29918,
24713,
29898,
5085,
29892,
4464,
2433,
14513,
29918,
1688,
1495,
13,
1678,
1418,
7003,
1664,
353,
4842,
305,
29889,
13239,
29889,
1272,
29889,
1469,
10036,
29898,
24713,
29892,
29871,
13,
462,
462,
632,
9853,
29918,
2311,
29922,
5085,
29889,
16175,
29918,
2311,
29918,
1688,
29892,
13,
462,
462,
632,
528,
21897,
29922,
8824,
29892,
13,
462,
462,
632,
954,
29918,
1287,
414,
29922,
5085,
29889,
1949,
29918,
1287,
414,
29892,
13,
462,
462,
632,
12534,
29918,
14834,
29922,
5574,
29892,
13,
462,
462,
632,
5321,
403,
29918,
9144,
29922,
1054,
9632,
29918,
14513,
29892,
13,
462,
462,
632,
15645,
29918,
2344,
29918,
9144,
29922,
24602,
29918,
2344,
29918,
9144,
29898,
5085,
29889,
26776,
876,
13,
13,
1678,
396,
4649,
29878,
2418,
29871,
29896,
29900,
29899,
28502,
342,
22092,
943,
29889,
13,
1678,
10153,
1761,
29892,
1180,
1761,
353,
679,
29918,
28502,
342,
29918,
484,
1141,
29890,
943,
29898,
339,
6358,
29889,
2311,
29898,
29900,
511,
1418,
7003,
1664,
29892,
1904,
29892,
770,
3709,
29892,
413,
29922,
5085,
29889,
29968,
29918,
1688,
29897,
29871,
13,
13,
1678,
396,
16913,
278,
1121,
29889,
29871,
13,
1678,
4842,
305,
29889,
7620,
4197,
2492,
1761,
29892,
1180,
1761,
1402,
6389,
29889,
7620,
29918,
4632,
718,
8207,
16447,
347,
29918,
276,
509,
16837,
29918,
2914,
29918,
29883,
6235,
29889,
29886,
6321,
1495,
13,
1678,
1596,
877,
29899,
25632,
29889,
742,
28371,
29922,
5574,
29897,
13,
13,
2
] |
medusa.py | BatSec/Project-Butler | 0 | 54408 | import vlc
import time
import io
import os
from tkinter import *
from tinytag import TinyTag, TinyTagException
from PIL import Image, ImageTk
class check:
i = 0
mname = ''
song = 1
goto = 0
def main(self):
# change to \ for windows
temp_track = TinyTag.get("/home/lowkey/temp/medusa/Music" + "/" + str(c.song) + ".mp3", image=True)
print("Now Playing:", temp_track.title)
pic = temp_track.get_image()
f1 = open("/home/lowkey/temp/medusa/temp.jpg", "wb")
f1.write(pic)
c.mname = temp_track.title
class root:
def __init__(self):
# change to \ for windows
sound_file = vlc.MediaPlayer("/home/lowkey/temp/medusa/Music" + "/" + str(c.song) + ".mp3")
c.main()
c.goto = 1
self.root = Tk()
self.root.title("Medusa")
self.root.geometry("420x500")
playimg = PhotoImage(file="/home/lowkey/temp/medusa/play.png")
img = Image.open("/home/lowkey/temp/medusa/temp.jpg")
img = img.resize((300, 300), Image.ANTIALIAS)
img.save("/home/lowkey/temp/medusa/temp.jpg")
img = ImageTk.PhotoImage(Image.open("/home/lowkey/temp/medusa/temp.jpg"))
lpic = Label(self.root, image=img)
self.play(c.i, sound_file)
BtPlay = Button(self.root, image=playimg, command=lambda: self.play(c.i,sound_file))
BtNext = Button(self.root, text="Next", command=lambda: self.next(sound_file))
BtPrev = Button(self.root, text="Prev", command=lambda: self.prev(sound_file))
BtTrev = Button(self.root, text="Show PlayList", command= lambda: os.system('python3 /home/lowkey/temp/medusa/treverse_songs.py'))
mname = Label(self.root, text=c.mname)
space = Label(self.root, text=' ')
space2 = Label(self.root, text=' ')
space3 = Label(self.root, text=' ')
lpic.grid(row=0, column=1)
space.grid(row=1)
mname.grid(row=2, column=1)
space2.grid(row=3)
BtPlay.grid(row=4, column=1)
BtNext.grid(row=4, column=2)
BtPrev.grid(row=4, column=0)
space3.grid(row=5)
BtTrev.grid(row=7, column=1)
self.root.mainloop()
def play(self, check, sound_file):
if check == 0:
sound_file.play()
c.i = 1
else:
self.pause(sound_file)
def pause(self, sound_file):
sound_file.pause()
print("Paused")
c.i = 0
def next(self, sound_file):
self.pause(sound_file)
c.song += 1
c.goto = 0
self.root.destroy()
def prev(self, sound_file):
self.pause(sound_file)
if c.song != 1:
c.song -= 1
c.goto = 0
self.root.destroy()
# main function
c = check()
while c.goto < 1:
r = root()
print("Finished Playing")
| [
1,
1053,
14204,
29883,
13,
5215,
931,
13,
5215,
12013,
13,
5215,
2897,
13,
3166,
18883,
1639,
1053,
334,
13,
3166,
27773,
3637,
351,
1053,
323,
4901,
8176,
29892,
323,
4901,
8176,
2451,
13,
3166,
349,
6227,
1053,
7084,
29892,
7084,
29911,
29895,
13,
13,
13,
1990,
1423,
29901,
13,
1678,
474,
353,
29871,
29900,
13,
1678,
286,
978,
353,
6629,
13,
1678,
4823,
353,
29871,
29896,
13,
1678,
2355,
29877,
353,
29871,
29900,
13,
13,
1678,
822,
1667,
29898,
1311,
1125,
13,
462,
462,
1678,
396,
1735,
304,
320,
363,
5417,
13,
4706,
5694,
29918,
11294,
353,
323,
4901,
8176,
29889,
657,
11974,
5184,
29914,
677,
1989,
29914,
7382,
29914,
2168,
11326,
29914,
21238,
29908,
718,
5591,
29908,
718,
851,
29898,
29883,
29889,
21453,
29897,
718,
11393,
1526,
29941,
613,
1967,
29922,
5574,
29897,
13,
4706,
1596,
703,
10454,
7412,
292,
29901,
613,
5694,
29918,
11294,
29889,
3257,
29897,
13,
4706,
11942,
353,
5694,
29918,
11294,
29889,
657,
29918,
3027,
580,
13,
4706,
285,
29896,
353,
1722,
11974,
5184,
29914,
677,
1989,
29914,
7382,
29914,
2168,
11326,
29914,
7382,
29889,
6173,
613,
376,
29893,
29890,
1159,
13,
4706,
285,
29896,
29889,
3539,
29898,
16447,
29897,
13,
4706,
274,
29889,
29885,
978,
353,
5694,
29918,
11294,
29889,
3257,
13,
13,
13,
1990,
3876,
29901,
13,
1678,
822,
4770,
2344,
12035,
1311,
1125,
13,
462,
462,
1678,
396,
1735,
304,
320,
363,
5417,
13,
4706,
6047,
29918,
1445,
353,
14204,
29883,
29889,
10572,
9075,
11974,
5184,
29914,
677,
1989,
29914,
7382,
29914,
2168,
11326,
29914,
21238,
29908,
718,
5591,
29908,
718,
851,
29898,
29883,
29889,
21453,
29897,
718,
11393,
1526,
29941,
1159,
13,
4706,
274,
29889,
3396,
580,
13,
4706,
274,
29889,
27102,
353,
29871,
29896,
13,
4706,
1583,
29889,
4632,
353,
323,
29895,
580,
13,
4706,
1583,
29889,
4632,
29889,
3257,
703,
19302,
11326,
1159,
13,
4706,
1583,
29889,
4632,
29889,
19156,
703,
29946,
29906,
29900,
29916,
29945,
29900,
29900,
1159,
13,
4706,
1708,
2492,
353,
1963,
3747,
2940,
29898,
1445,
13802,
5184,
29914,
677,
1989,
29914,
7382,
29914,
2168,
11326,
29914,
1456,
29889,
2732,
1159,
13,
4706,
10153,
353,
7084,
29889,
3150,
11974,
5184,
29914,
677,
1989,
29914,
7382,
29914,
2168,
11326,
29914,
7382,
29889,
6173,
1159,
13,
4706,
10153,
353,
10153,
29889,
21476,
3552,
29941,
29900,
29900,
29892,
29871,
29941,
29900,
29900,
511,
7084,
29889,
13566,
25758,
29902,
3289,
29897,
13,
4706,
10153,
29889,
7620,
11974,
5184,
29914,
677,
1989,
29914,
7382,
29914,
2168,
11326,
29914,
7382,
29889,
6173,
1159,
13,
4706,
10153,
353,
7084,
29911,
29895,
29889,
25971,
2940,
29898,
2940,
29889,
3150,
11974,
5184,
29914,
677,
1989,
29914,
7382,
29914,
2168,
11326,
29914,
7382,
29889,
6173,
5783,
13,
4706,
301,
16447,
353,
15796,
29898,
1311,
29889,
4632,
29892,
1967,
29922,
2492,
29897,
13,
4706,
1583,
29889,
1456,
29898,
29883,
29889,
29875,
29892,
6047,
29918,
1445,
29897,
13,
4706,
350,
29873,
13454,
353,
11025,
29898,
1311,
29889,
4632,
29892,
1967,
29922,
1456,
2492,
29892,
1899,
29922,
2892,
29901,
1583,
29889,
1456,
29898,
29883,
29889,
29875,
29892,
29802,
29918,
1445,
876,
13,
4706,
350,
29873,
9190,
353,
11025,
29898,
1311,
29889,
4632,
29892,
1426,
543,
9190,
613,
1899,
29922,
2892,
29901,
1583,
29889,
4622,
29898,
29802,
29918,
1445,
876,
13,
4706,
350,
29873,
6572,
29894,
353,
11025,
29898,
1311,
29889,
4632,
29892,
1426,
543,
6572,
29894,
613,
1899,
29922,
2892,
29901,
1583,
29889,
16304,
29898,
29802,
29918,
1445,
876,
13,
4706,
350,
29873,
29911,
13478,
353,
11025,
29898,
1311,
29889,
4632,
29892,
1426,
543,
8964,
7412,
1293,
613,
1899,
29922,
14013,
29901,
2897,
29889,
5205,
877,
4691,
29941,
847,
5184,
29914,
677,
1989,
29914,
7382,
29914,
2168,
11326,
29914,
2484,
3901,
29918,
21453,
29879,
29889,
2272,
8785,
13,
4706,
286,
978,
353,
15796,
29898,
1311,
29889,
4632,
29892,
1426,
29922,
29883,
29889,
29885,
978,
29897,
13,
4706,
2913,
353,
15796,
29898,
1311,
29889,
4632,
29892,
1426,
2433,
25710,
13,
4706,
2913,
29906,
353,
15796,
29898,
1311,
29889,
4632,
29892,
1426,
2433,
25710,
13,
4706,
2913,
29941,
353,
15796,
29898,
1311,
29889,
4632,
29892,
1426,
2433,
25710,
13,
4706,
301,
16447,
29889,
7720,
29898,
798,
29922,
29900,
29892,
1897,
29922,
29896,
29897,
13,
4706,
2913,
29889,
7720,
29898,
798,
29922,
29896,
29897,
13,
4706,
286,
978,
29889,
7720,
29898,
798,
29922,
29906,
29892,
1897,
29922,
29896,
29897,
13,
4706,
2913,
29906,
29889,
7720,
29898,
798,
29922,
29941,
29897,
13,
4706,
350,
29873,
13454,
29889,
7720,
29898,
798,
29922,
29946,
29892,
1897,
29922,
29896,
29897,
13,
4706,
350,
29873,
9190,
29889,
7720,
29898,
798,
29922,
29946,
29892,
1897,
29922,
29906,
29897,
13,
4706,
350,
29873,
6572,
29894,
29889,
7720,
29898,
798,
29922,
29946,
29892,
1897,
29922,
29900,
29897,
13,
4706,
2913,
29941,
29889,
7720,
29898,
798,
29922,
29945,
29897,
13,
4706,
350,
29873,
29911,
13478,
29889,
7720,
29898,
798,
29922,
29955,
29892,
1897,
29922,
29896,
29897,
13,
4706,
1583,
29889,
4632,
29889,
3396,
7888,
580,
13,
13,
1678,
822,
1708,
29898,
1311,
29892,
1423,
29892,
6047,
29918,
1445,
1125,
13,
4706,
565,
1423,
1275,
29871,
29900,
29901,
13,
9651,
6047,
29918,
1445,
29889,
1456,
580,
13,
9651,
274,
29889,
29875,
353,
29871,
29896,
13,
4706,
1683,
29901,
13,
9651,
1583,
29889,
29886,
1071,
29898,
29802,
29918,
1445,
29897,
13,
13,
1678,
822,
19957,
29898,
1311,
29892,
6047,
29918,
1445,
1125,
13,
4706,
6047,
29918,
1445,
29889,
29886,
1071,
580,
13,
4706,
1596,
703,
29925,
15244,
1159,
13,
4706,
274,
29889,
29875,
353,
29871,
29900,
13,
13,
1678,
822,
2446,
29898,
1311,
29892,
6047,
29918,
1445,
1125,
13,
4706,
1583,
29889,
29886,
1071,
29898,
29802,
29918,
1445,
29897,
13,
4706,
274,
29889,
21453,
4619,
29871,
29896,
13,
4706,
274,
29889,
27102,
353,
29871,
29900,
13,
4706,
1583,
29889,
4632,
29889,
20524,
580,
13,
13,
1678,
822,
12379,
29898,
1311,
29892,
6047,
29918,
1445,
1125,
13,
4706,
1583,
29889,
29886,
1071,
29898,
29802,
29918,
1445,
29897,
13,
4706,
565,
274,
29889,
21453,
2804,
29871,
29896,
29901,
13,
9651,
274,
29889,
21453,
22361,
29871,
29896,
13,
9651,
274,
29889,
27102,
353,
29871,
29900,
13,
9651,
1583,
29889,
4632,
29889,
20524,
580,
13,
13,
13,
462,
18884,
396,
1667,
740,
13,
29883,
353,
1423,
580,
13,
8000,
274,
29889,
27102,
529,
29871,
29896,
29901,
13,
1678,
364,
353,
3876,
580,
13,
2158,
703,
12881,
3276,
7412,
292,
1159,
29871,
13,
2
] |
MachineLearning/dataLoader_uber_old.py | ChanaRoss/Thesis | 0 | 178454 | # mathematical imports -
import numpy as np
# pytorch imports -
import torch
import torch.utils.data as data
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
def createDiff(data):
dataOut = np.zeros(shape=(data.shape[0],data.shape[1]-1))
for i in range(data.shape[1]-1):
dataOut[:, i] = data[:, i+1] - data[:, i]
return dataOut
class DataSetUber:
def __init__(self, dataIn, lenSeqIn, lenSeqOut):
self.data = dataIn
self.lenSeqIn = lenSeqIn
self.lenSeqOut = lenSeqOut
def __getitem__(self, item):
temp = np.zeros(shape=(self.data.shape[0], self.lenSeqIn))
if(item-self.lenSeqIn > 0):
temp = self.data[:, item-self.lenSeqIn:item]
else:
temp[:, self.lenSeqIn-item:] = self.data[:, 0:item]
tempOut = np.zeros(shape=(self.data.shape[0], self.lenSeqOut))
try:
if item + 1 + self.lenSeqOut < self.data.shape[1]:
tempOut = self.data[:, item+1:item+1+self.lenSeqOut].reshape(self.data.shape[0], self.lenSeqOut)
else:
numFuture = self.data.shape[1] - (item+1)
tempOut[:, 0:numFuture] = self.data[:, item+1:] # taking the last part of the sequence
except:
print('couldnt find correct output sequence!!!')
return torch.Tensor(temp, device=device), torch.Tensor(tempOut, device=device)
def __len__(self):
return self.data.shape[1]
class DataSetLstm:
def __init__(self, dataIn, lenSeqIn):
self.data = dataIn
self.lenSeqIn = lenSeqIn
def __getitem__(self, item):
temp = np.zeros(shape=(self.data.shape[0], self.lenSeqIn))
if(item-self.lenSeqIn > 0):
temp = self.data[:, item-self.lenSeqIn:item]
else:
temp[:, self.lenSeqIn-item:] = self.data[:, 0:item]
tempOut = np.zeros(shape=(self.data.shape[0], self.lenSeqIn))
try:
if (item + 1 <= self.data.shape[1]) and (item + 1 - self.lenSeqIn > 0):
tempOut = self.data[:, item + 1 - self.lenSeqIn: item + 1].reshape(self.data.shape[0], self.lenSeqIn)
elif (item + 1 <= self.data.shape[1]) and (item + 1 - self.lenSeqIn < 0):
tempOut[:, self.lenSeqIn - item - 1:] = self.data[:, 0:item + 1]
elif (item + 1 > self.data.shape[1]) and (item + 1 - self.lenSeqIn > 0):
tempOut[:, 0:self.lenSeqIn-1] = self.data[:, item + 1 - self.lenSeqIn: item] # taking the last part of the sequence
except:
print('couldnt find correct output sequence!!!')
return torch.Tensor(temp, device=device), torch.Tensor(tempOut, device=device)
def __len__(self):
return self.data.shape[1]
class DataSetCnn:
def __init__(self, dataIn, lenSeqIn):
self.lengthX = dataIn.shape[0]
self.lengthY = dataIn.shape[1]
self.lengthT = dataIn.shape[2]
self.data = dataIn.reshape(self.lengthT, self.lengthX, self.lengthY)
self.lenSeqIn = lenSeqIn
def __getitem__(self, item):
temp = np.zeros(shape=(self.lenSeqIn, self.data.shape[1], self.data.shape[2]))
if (item - self.lenSeqIn > 0):
temp = self.data[item - self.lenSeqIn:item, :, :]
else:
temp[self.lenSeqIn - item:, :, :] = self.data[0:item, :, :]
xArr = temp
tempOut = np.zeros(shape=(self.lenSeqIn, self.data.shape[1], self.data.shape[2]))
try:
if (item + 1 <= self.data.shape[0]) and (item + 1 - self.lenSeqIn > 0):
tempOut = self.data[item + 1 - self.lenSeqIn: item + 1, :, :].reshape(self.lenSeqIn, self.data.shape[1], self.data.shape[2])
elif (item + 1 <= self.data.shape[0]) and (item + 1 - self.lenSeqIn <= 0):
tempOut[self.lenSeqIn - item - 1:, :, :] = self.data[0:item + 1, :, :]
elif (item + 1 > self.data.shape[0]) and (item + 1 - self.lenSeqIn > 0):
tempOut[0:self.lenSeqIn - 1, :, :] = self.data[item + 1 - self.lenSeqIn: item, :, :] # taking the last part of the sequence
except:
print('couldnt find correct output sequence!!!')
try:
yArr = tempOut[-1, :, :]
except:
print("couldnt take last value of time sequence for output!!!")
return torch.Tensor(xArr, device=device), torch.Tensor(yArr, device=device).type(torch.long)
def __len__(self):
return self.data.shape[0]
class DataSetCnn_LSTM:
def __init__(self, dataIn, lenSeqIn, sizeCnn):
self.lengthX = dataIn.shape[0]
self.lengthY = dataIn.shape[1]
self.lengthT = dataIn.shape[2]
self.sizeCnn = sizeCnn
self.data = dataIn.reshape(self.lengthT, self.lengthX, self.lengthY)
self.lenSeqIn = lenSeqIn
def __getitem__(self, item):
temp = np.zeros(shape=(self.lenSeqIn, self.data.shape[1], self.data.shape[2]))
if (item - self.lenSeqIn > 0):
temp = self.data[item - self.lenSeqIn:item, :, :]
else:
temp[self.lenSeqIn - item:, :, :] = self.data[0:item, :, :]
temp2 = np.zeros(shape=(self.lenSeqIn, self.sizeCnn , self.sizeCnn, self.lengthX*self.lengthY))
tempPadded = np.zeros(shape=(temp.shape[0], temp.shape[1]+self.sizeCnn, temp.shape[2]+self.sizeCnn))
tempPadded[:, self.sizeCnn: self.sizeCnn + temp.shape[1], self.sizeCnn : self.sizeCnn + temp.shape[2]] = temp
k = 0
for i in range(self.lengthX):
for j in range(self.lengthY):
try:
temp2[:, :, :, k] = tempPadded[:, i:i + self.sizeCnn, j : j+self.sizeCnn]
except:
print("couldnt create input for cnn ")
k += 1
xArr = temp2
tempOut = np.zeros(shape=(self.lenSeqIn, self.data.shape[1], self.data.shape[2]))
try:
if (item + 1 <= self.data.shape[0]) and (item + 1 - self.lenSeqIn > 0):
tempOut = self.data[item + 1 - self.lenSeqIn: item + 1, :, :].reshape(self.lenSeqIn, self.data.shape[1], self.data.shape[2])
elif (item + 1 <= self.data.shape[0]) and (item + 1 - self.lenSeqIn <= 0):
tempOut[self.lenSeqIn - item - 1:, :, :] = self.data[0:item + 1, :, :]
elif (item + 1 > self.data.shape[0]) and (item + 1 - self.lenSeqIn > 0):
tempOut[0:self.lenSeqIn - 1, :, :] = self.data[item + 1 - self.lenSeqIn: item, :, :] # taking the last part of the sequence
except:
print('couldnt find correct output sequence!!!')
try:
yArr = tempOut[-1, :, :]
except:
print("couldnt take last value of time sequence for output!!!")
return torch.Tensor(xArr, device=device), torch.Tensor(yArr, device=device).type(torch.long)
def __len__(self):
return self.data.shape[0]
def main():
path = '/Users/chanaross/dev/Thesis/UberData/'
fileName = '3D_UpdatedGrid_5min_250Grid_LimitedEventsMat_allData.p'
dataInput = np.load(path + fileName)
xmin = 0
xmax = 20
ymin = 0
ymax = 20
dataInput = dataInput[xmin:xmax, ymin:ymax, :] # shrink matrix size for fast training in order to test model
# define important sizes for network -
x_size = dataInput.shape[0]
y_size = dataInput.shape[1]
dataSize = dataInput.shape[2]
num_train = int((1 - 0.2) * dataSize)
data_train = dataInput[:, :, 0:num_train]
dataset_uber = DataSetCnn_LSTM(data_train, 5, 7)
dataloader_uber = data.DataLoader(dataset=dataset_uber, batch_size=300, shuffle=True)
# a = list(iter(dataset_uber))
for i_batch, sample_batched in enumerate(dataloader_uber):
print(i_batch, sample_batched[0].size(),
sample_batched[1].size())
return
if __name__ == '__main__':
main()
print('Done.')
| [
1,
396,
19475,
24802,
448,
13,
5215,
12655,
408,
7442,
13,
13,
29937,
282,
3637,
25350,
24802,
29871,
448,
13,
5215,
4842,
305,
13,
5215,
4842,
305,
29889,
13239,
29889,
1272,
408,
848,
13,
13,
10141,
418,
353,
4842,
305,
29889,
10141,
703,
29883,
6191,
29908,
565,
4842,
305,
29889,
29883,
6191,
29889,
275,
29918,
16515,
580,
1683,
376,
21970,
1159,
13,
13,
13,
1753,
1653,
26023,
29898,
1272,
1125,
13,
1678,
848,
3744,
353,
7442,
29889,
3298,
359,
29898,
12181,
7607,
1272,
29889,
12181,
29961,
29900,
1402,
1272,
29889,
12181,
29961,
29896,
29962,
29899,
29896,
876,
13,
1678,
363,
474,
297,
3464,
29898,
1272,
29889,
12181,
29961,
29896,
29962,
29899,
29896,
1125,
13,
4706,
848,
3744,
7503,
29892,
474,
29962,
353,
848,
7503,
29892,
474,
29974,
29896,
29962,
448,
848,
7503,
29892,
474,
29962,
13,
1678,
736,
848,
3744,
13,
13,
13,
13,
1990,
3630,
2697,
29965,
495,
29901,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
848,
797,
29892,
7431,
23718,
797,
29892,
7431,
23718,
3744,
1125,
13,
4706,
1583,
29889,
1272,
353,
848,
797,
13,
4706,
1583,
29889,
2435,
23718,
797,
353,
7431,
23718,
797,
13,
4706,
1583,
29889,
2435,
23718,
3744,
353,
7431,
23718,
3744,
13,
13,
1678,
822,
4770,
657,
667,
12035,
1311,
29892,
2944,
1125,
13,
4706,
5694,
353,
7442,
29889,
3298,
359,
29898,
12181,
7607,
1311,
29889,
1272,
29889,
12181,
29961,
29900,
1402,
1583,
29889,
2435,
23718,
797,
876,
13,
4706,
565,
29898,
667,
29899,
1311,
29889,
2435,
23718,
797,
1405,
29871,
29900,
1125,
13,
9651,
5694,
353,
1583,
29889,
1272,
7503,
29892,
2944,
29899,
1311,
29889,
2435,
23718,
797,
29901,
667,
29962,
13,
4706,
1683,
29901,
13,
9651,
5694,
7503,
29892,
1583,
29889,
2435,
23718,
797,
29899,
667,
17531,
353,
1583,
29889,
1272,
7503,
29892,
29871,
29900,
29901,
667,
29962,
13,
13,
4706,
5694,
3744,
353,
7442,
29889,
3298,
359,
29898,
12181,
7607,
1311,
29889,
1272,
29889,
12181,
29961,
29900,
1402,
1583,
29889,
2435,
23718,
3744,
876,
13,
4706,
1018,
29901,
13,
9651,
565,
2944,
718,
29871,
29896,
718,
1583,
29889,
2435,
23718,
3744,
529,
1583,
29889,
1272,
29889,
12181,
29961,
29896,
5387,
13,
18884,
5694,
3744,
353,
1583,
29889,
1272,
7503,
29892,
2944,
29974,
29896,
29901,
667,
29974,
29896,
29974,
1311,
29889,
2435,
23718,
3744,
1822,
690,
14443,
29898,
1311,
29889,
1272,
29889,
12181,
29961,
29900,
1402,
1583,
29889,
2435,
23718,
3744,
29897,
13,
9651,
1683,
29901,
13,
18884,
954,
20154,
353,
1583,
29889,
1272,
29889,
12181,
29961,
29896,
29962,
448,
313,
667,
29974,
29896,
29897,
13,
18884,
5694,
3744,
7503,
29892,
29871,
29900,
29901,
1949,
20154,
29962,
353,
1583,
29889,
1272,
7503,
29892,
2944,
29974,
29896,
17531,
29871,
396,
5622,
278,
1833,
760,
310,
278,
5665,
13,
4706,
5174,
29901,
13,
9651,
1596,
877,
26680,
593,
1284,
1959,
1962,
5665,
21004,
1495,
13,
4706,
736,
4842,
305,
29889,
29911,
6073,
29898,
7382,
29892,
4742,
29922,
10141,
511,
4842,
305,
29889,
29911,
6073,
29898,
7382,
3744,
29892,
4742,
29922,
10141,
29897,
13,
13,
13,
1678,
822,
4770,
2435,
12035,
1311,
1125,
13,
4706,
736,
1583,
29889,
1272,
29889,
12181,
29961,
29896,
29962,
13,
13,
13,
13,
1990,
3630,
2697,
29931,
303,
29885,
29901,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
848,
797,
29892,
7431,
23718,
797,
1125,
13,
4706,
1583,
29889,
1272,
353,
848,
797,
13,
4706,
1583,
29889,
2435,
23718,
797,
353,
7431,
23718,
797,
13,
13,
1678,
822,
4770,
657,
667,
12035,
1311,
29892,
2944,
1125,
13,
4706,
5694,
353,
7442,
29889,
3298,
359,
29898,
12181,
7607,
1311,
29889,
1272,
29889,
12181,
29961,
29900,
1402,
1583,
29889,
2435,
23718,
797,
876,
13,
4706,
565,
29898,
667,
29899,
1311,
29889,
2435,
23718,
797,
1405,
29871,
29900,
1125,
13,
9651,
5694,
353,
1583,
29889,
1272,
7503,
29892,
2944,
29899,
1311,
29889,
2435,
23718,
797,
29901,
667,
29962,
13,
4706,
1683,
29901,
13,
9651,
5694,
7503,
29892,
1583,
29889,
2435,
23718,
797,
29899,
667,
17531,
353,
1583,
29889,
1272,
7503,
29892,
29871,
29900,
29901,
667,
29962,
13,
13,
4706,
5694,
3744,
353,
7442,
29889,
3298,
359,
29898,
12181,
7607,
1311,
29889,
1272,
29889,
12181,
29961,
29900,
1402,
1583,
29889,
2435,
23718,
797,
876,
13,
4706,
1018,
29901,
13,
13,
9651,
565,
259,
313,
667,
718,
29871,
29896,
5277,
1583,
29889,
1272,
29889,
12181,
29961,
29896,
2314,
322,
313,
667,
718,
29871,
29896,
448,
1583,
29889,
2435,
23718,
797,
1405,
29871,
29900,
1125,
13,
18884,
5694,
3744,
353,
1583,
29889,
1272,
7503,
29892,
2944,
718,
29871,
29896,
448,
1583,
29889,
2435,
23718,
797,
29901,
2944,
718,
29871,
29896,
1822,
690,
14443,
29898,
1311,
29889,
1272,
29889,
12181,
29961,
29900,
1402,
1583,
29889,
2435,
23718,
797,
29897,
13,
9651,
25342,
313,
667,
718,
29871,
29896,
5277,
1583,
29889,
1272,
29889,
12181,
29961,
29896,
2314,
322,
313,
667,
718,
29871,
29896,
448,
1583,
29889,
2435,
23718,
797,
529,
29871,
29900,
1125,
13,
18884,
5694,
3744,
7503,
29892,
1583,
29889,
2435,
23718,
797,
448,
2944,
448,
29871,
29896,
17531,
353,
1583,
29889,
1272,
7503,
29892,
29871,
29900,
29901,
667,
718,
29871,
29896,
29962,
13,
9651,
25342,
313,
667,
718,
29871,
29896,
1405,
1583,
29889,
1272,
29889,
12181,
29961,
29896,
2314,
322,
313,
667,
718,
29871,
29896,
448,
1583,
29889,
2435,
23718,
797,
1405,
29871,
29900,
1125,
13,
18884,
5694,
3744,
7503,
29892,
29871,
29900,
29901,
1311,
29889,
2435,
23718,
797,
29899,
29896,
29962,
353,
1583,
29889,
1272,
7503,
29892,
2944,
718,
29871,
29896,
448,
1583,
29889,
2435,
23718,
797,
29901,
2944,
29962,
29871,
396,
5622,
278,
1833,
760,
310,
278,
5665,
13,
4706,
5174,
29901,
13,
9651,
1596,
877,
26680,
593,
1284,
1959,
1962,
5665,
21004,
1495,
13,
4706,
736,
4842,
305,
29889,
29911,
6073,
29898,
7382,
29892,
4742,
29922,
10141,
511,
4842,
305,
29889,
29911,
6073,
29898,
7382,
3744,
29892,
4742,
29922,
10141,
29897,
13,
13,
1678,
822,
4770,
2435,
12035,
1311,
1125,
13,
4706,
736,
1583,
29889,
1272,
29889,
12181,
29961,
29896,
29962,
13,
13,
13,
13,
13,
1990,
3630,
2697,
29907,
15755,
29901,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
848,
797,
29892,
7431,
23718,
797,
1125,
13,
4706,
1583,
29889,
2848,
29990,
353,
848,
797,
29889,
12181,
29961,
29900,
29962,
13,
4706,
1583,
29889,
2848,
29979,
353,
848,
797,
29889,
12181,
29961,
29896,
29962,
13,
4706,
1583,
29889,
2848,
29911,
353,
848,
797,
29889,
12181,
29961,
29906,
29962,
13,
4706,
1583,
29889,
1272,
353,
848,
797,
29889,
690,
14443,
29898,
1311,
29889,
2848,
29911,
29892,
1583,
29889,
2848,
29990,
29892,
1583,
29889,
2848,
29979,
29897,
13,
4706,
1583,
29889,
2435,
23718,
797,
353,
7431,
23718,
797,
13,
13,
1678,
822,
4770,
657,
667,
12035,
1311,
29892,
2944,
1125,
13,
4706,
5694,
353,
7442,
29889,
3298,
359,
29898,
12181,
7607,
1311,
29889,
2435,
23718,
797,
29892,
1583,
29889,
1272,
29889,
12181,
29961,
29896,
1402,
1583,
29889,
1272,
29889,
12181,
29961,
29906,
12622,
13,
4706,
565,
313,
667,
448,
1583,
29889,
2435,
23718,
797,
1405,
29871,
29900,
1125,
13,
9651,
5694,
353,
1583,
29889,
1272,
29961,
667,
448,
1583,
29889,
2435,
23718,
797,
29901,
667,
29892,
584,
29892,
584,
29962,
13,
4706,
1683,
29901,
13,
9651,
5694,
29961,
1311,
29889,
2435,
23718,
797,
448,
2944,
29901,
29892,
584,
29892,
584,
29962,
353,
1583,
29889,
1272,
29961,
29900,
29901,
667,
29892,
584,
29892,
584,
29962,
13,
4706,
921,
16401,
353,
5694,
13,
4706,
5694,
3744,
353,
7442,
29889,
3298,
359,
29898,
12181,
7607,
1311,
29889,
2435,
23718,
797,
29892,
1583,
29889,
1272,
29889,
12181,
29961,
29896,
1402,
1583,
29889,
1272,
29889,
12181,
29961,
29906,
12622,
13,
4706,
1018,
29901,
13,
13,
9651,
565,
313,
667,
718,
29871,
29896,
5277,
1583,
29889,
1272,
29889,
12181,
29961,
29900,
2314,
322,
313,
667,
718,
29871,
29896,
448,
1583,
29889,
2435,
23718,
797,
1405,
29871,
29900,
1125,
13,
18884,
5694,
3744,
353,
1583,
29889,
1272,
29961,
667,
718,
29871,
29896,
448,
1583,
29889,
2435,
23718,
797,
29901,
2944,
718,
29871,
29896,
29892,
584,
29892,
584,
1822,
690,
14443,
29898,
1311,
29889,
2435,
23718,
797,
29892,
1583,
29889,
1272,
29889,
12181,
29961,
29896,
1402,
1583,
29889,
1272,
29889,
12181,
29961,
29906,
2314,
13,
9651,
25342,
313,
667,
718,
29871,
29896,
5277,
1583,
29889,
1272,
29889,
12181,
29961,
29900,
2314,
322,
313,
667,
718,
29871,
29896,
448,
1583,
29889,
2435,
23718,
797,
5277,
29871,
29900,
1125,
13,
18884,
5694,
3744,
29961,
1311,
29889,
2435,
23718,
797,
448,
2944,
448,
29871,
29896,
29901,
29892,
584,
29892,
584,
29962,
353,
1583,
29889,
1272,
29961,
29900,
29901,
667,
718,
29871,
29896,
29892,
584,
29892,
584,
29962,
13,
9651,
25342,
313,
667,
718,
29871,
29896,
1405,
1583,
29889,
1272,
29889,
12181,
29961,
29900,
2314,
322,
313,
667,
718,
29871,
29896,
448,
1583,
29889,
2435,
23718,
797,
1405,
29871,
29900,
1125,
13,
18884,
5694,
3744,
29961,
29900,
29901,
1311,
29889,
2435,
23718,
797,
448,
29871,
29896,
29892,
584,
29892,
584,
29962,
353,
1583,
29889,
1272,
29961,
667,
718,
29871,
29896,
448,
1583,
29889,
2435,
23718,
797,
29901,
2944,
29892,
584,
29892,
584,
29962,
29871,
396,
5622,
278,
1833,
760,
310,
278,
5665,
13,
4706,
5174,
29901,
13,
9651,
1596,
877,
26680,
593,
1284,
1959,
1962,
5665,
21004,
1495,
13,
4706,
1018,
29901,
13,
9651,
343,
16401,
353,
5694,
3744,
14352,
29896,
29892,
584,
29892,
584,
29962,
13,
4706,
5174,
29901,
13,
9651,
1596,
703,
26680,
593,
2125,
1833,
995,
310,
931,
5665,
363,
1962,
21004,
1159,
13,
4706,
736,
4842,
305,
29889,
29911,
6073,
29898,
29916,
16401,
29892,
4742,
29922,
10141,
511,
4842,
305,
29889,
29911,
6073,
29898,
29891,
16401,
29892,
4742,
29922,
10141,
467,
1853,
29898,
7345,
305,
29889,
5426,
29897,
13,
13,
1678,
822,
4770,
2435,
12035,
1311,
1125,
13,
4706,
736,
1583,
29889,
1272,
29889,
12181,
29961,
29900,
29962,
13,
13,
1990,
3630,
2697,
29907,
15755,
29918,
29931,
1254,
29924,
29901,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
848,
797,
29892,
7431,
23718,
797,
29892,
2159,
29907,
15755,
1125,
13,
4706,
1583,
29889,
2848,
29990,
353,
848,
797,
29889,
12181,
29961,
29900,
29962,
13,
4706,
1583,
29889,
2848,
29979,
353,
848,
797,
29889,
12181,
29961,
29896,
29962,
13,
4706,
1583,
29889,
2848,
29911,
353,
848,
797,
29889,
12181,
29961,
29906,
29962,
13,
4706,
1583,
29889,
2311,
29907,
15755,
353,
2159,
29907,
15755,
13,
4706,
1583,
29889,
1272,
353,
848,
797,
29889,
690,
14443,
29898,
1311,
29889,
2848,
29911,
29892,
1583,
29889,
2848,
29990,
29892,
1583,
29889,
2848,
29979,
29897,
13,
4706,
1583,
29889,
2435,
23718,
797,
353,
7431,
23718,
797,
13,
13,
1678,
822,
4770,
657,
667,
12035,
1311,
29892,
2944,
1125,
13,
4706,
5694,
353,
7442,
29889,
3298,
359,
29898,
12181,
7607,
1311,
29889,
2435,
23718,
797,
29892,
1583,
29889,
1272,
29889,
12181,
29961,
29896,
1402,
1583,
29889,
1272,
29889,
12181,
29961,
29906,
12622,
13,
4706,
565,
313,
667,
448,
1583,
29889,
2435,
23718,
797,
1405,
29871,
29900,
1125,
13,
9651,
5694,
353,
1583,
29889,
1272,
29961,
667,
448,
1583,
29889,
2435,
23718,
797,
29901,
667,
29892,
584,
29892,
584,
29962,
13,
4706,
1683,
29901,
13,
9651,
5694,
29961,
1311,
29889,
2435,
23718,
797,
448,
2944,
29901,
29892,
584,
29892,
584,
29962,
353,
1583,
29889,
1272,
29961,
29900,
29901,
667,
29892,
584,
29892,
584,
29962,
13,
4706,
5694,
29906,
353,
7442,
29889,
3298,
359,
29898,
12181,
7607,
1311,
29889,
2435,
23718,
797,
29892,
1583,
29889,
2311,
29907,
15755,
1919,
1583,
29889,
2311,
29907,
15755,
29892,
1583,
29889,
2848,
29990,
29930,
1311,
29889,
2848,
29979,
876,
13,
4706,
5694,
29925,
23959,
353,
7442,
29889,
3298,
359,
29898,
12181,
7607,
7382,
29889,
12181,
29961,
29900,
1402,
5694,
29889,
12181,
29961,
29896,
10062,
1311,
29889,
2311,
29907,
15755,
29892,
5694,
29889,
12181,
29961,
29906,
10062,
1311,
29889,
2311,
29907,
15755,
876,
13,
4706,
5694,
29925,
23959,
7503,
29892,
1583,
29889,
2311,
29907,
15755,
29901,
1583,
29889,
2311,
29907,
15755,
718,
5694,
29889,
12181,
29961,
29896,
1402,
29871,
1583,
29889,
2311,
29907,
15755,
584,
1583,
29889,
2311,
29907,
15755,
718,
5694,
29889,
12181,
29961,
29906,
5262,
353,
5694,
13,
4706,
413,
353,
29871,
29900,
13,
4706,
363,
474,
297,
3464,
29898,
1311,
29889,
2848,
29990,
1125,
13,
9651,
363,
432,
297,
3464,
29898,
1311,
29889,
2848,
29979,
1125,
13,
18884,
1018,
29901,
13,
462,
1678,
5694,
29906,
7503,
29892,
584,
29892,
584,
29892,
413,
29962,
353,
5694,
29925,
23959,
7503,
29892,
474,
29901,
29875,
718,
1583,
29889,
2311,
29907,
15755,
29892,
432,
584,
432,
29974,
1311,
29889,
2311,
29907,
15755,
29962,
13,
18884,
5174,
29901,
13,
462,
1678,
1596,
703,
26680,
593,
1653,
1881,
363,
274,
15755,
16521,
13,
18884,
413,
4619,
29871,
29896,
13,
4706,
921,
16401,
353,
5694,
29906,
13,
4706,
5694,
3744,
353,
7442,
29889,
3298,
359,
29898,
12181,
7607,
1311,
29889,
2435,
23718,
797,
29892,
1583,
29889,
1272,
29889,
12181,
29961,
29896,
1402,
1583,
29889,
1272,
29889,
12181,
29961,
29906,
12622,
13,
4706,
1018,
29901,
13,
13,
9651,
565,
313,
667,
718,
29871,
29896,
5277,
1583,
29889,
1272,
29889,
12181,
29961,
29900,
2314,
322,
313,
667,
718,
29871,
29896,
448,
1583,
29889,
2435,
23718,
797,
1405,
29871,
29900,
1125,
13,
18884,
5694,
3744,
353,
1583,
29889,
1272,
29961,
667,
718,
29871,
29896,
448,
1583,
29889,
2435,
23718,
797,
29901,
2944,
718,
29871,
29896,
29892,
584,
29892,
584,
1822,
690,
14443,
29898,
1311,
29889,
2435,
23718,
797,
29892,
1583,
29889,
1272,
29889,
12181,
29961,
29896,
1402,
1583,
29889,
1272,
29889,
12181,
29961,
29906,
2314,
13,
9651,
25342,
313,
667,
718,
29871,
29896,
5277,
1583,
29889,
1272,
29889,
12181,
29961,
29900,
2314,
322,
313,
667,
718,
29871,
29896,
448,
1583,
29889,
2435,
23718,
797,
5277,
29871,
29900,
1125,
13,
18884,
5694,
3744,
29961,
1311,
29889,
2435,
23718,
797,
448,
2944,
448,
29871,
29896,
29901,
29892,
584,
29892,
584,
29962,
353,
1583,
29889,
1272,
29961,
29900,
29901,
667,
718,
29871,
29896,
29892,
584,
29892,
584,
29962,
13,
9651,
25342,
313,
667,
718,
29871,
29896,
1405,
1583,
29889,
1272,
29889,
12181,
29961,
29900,
2314,
322,
313,
667,
718,
29871,
29896,
448,
1583,
29889,
2435,
23718,
797,
1405,
29871,
29900,
1125,
13,
18884,
5694,
3744,
29961,
29900,
29901,
1311,
29889,
2435,
23718,
797,
448,
29871,
29896,
29892,
584,
29892,
584,
29962,
353,
1583,
29889,
1272,
29961,
667,
718,
29871,
29896,
448,
1583,
29889,
2435,
23718,
797,
29901,
2944,
29892,
584,
29892,
584,
29962,
29871,
396,
5622,
278,
1833,
760,
310,
278,
5665,
13,
4706,
5174,
29901,
13,
9651,
1596,
877,
26680,
593,
1284,
1959,
1962,
5665,
21004,
1495,
13,
13,
4706,
1018,
29901,
13,
9651,
343,
16401,
353,
5694,
3744,
14352,
29896,
29892,
584,
29892,
584,
29962,
13,
4706,
5174,
29901,
13,
9651,
1596,
703,
26680,
593,
2125,
1833,
995,
310,
931,
5665,
363,
1962,
21004,
1159,
13,
13,
4706,
736,
4842,
305,
29889,
29911,
6073,
29898,
29916,
16401,
29892,
4742,
29922,
10141,
511,
4842,
305,
29889,
29911,
6073,
29898,
29891,
16401,
29892,
4742,
29922,
10141,
467,
1853,
29898,
7345,
305,
29889,
5426,
29897,
13,
13,
1678,
822,
4770,
2435,
12035,
1311,
1125,
13,
4706,
736,
1583,
29889,
1272,
29889,
12181,
29961,
29900,
29962,
13,
13,
13,
1753,
1667,
7295,
13,
1678,
2224,
353,
8207,
5959,
29914,
5083,
279,
2209,
29914,
3359,
29914,
1349,
6656,
29914,
29965,
495,
1469,
22208,
13,
1678,
29729,
29871,
353,
525,
29941,
29928,
29918,
29248,
5756,
29918,
29945,
1195,
29918,
29906,
29945,
29900,
5756,
29918,
29931,
326,
1573,
13634,
9782,
29918,
497,
1469,
29889,
29886,
29915,
13,
1678,
848,
4290,
353,
7442,
29889,
1359,
29898,
2084,
718,
29729,
29897,
13,
1678,
921,
1195,
353,
29871,
29900,
13,
1678,
921,
3317,
353,
29871,
29906,
29900,
13,
1678,
343,
1195,
353,
29871,
29900,
13,
1678,
343,
3317,
353,
29871,
29906,
29900,
13,
1678,
848,
4290,
353,
848,
4290,
29961,
29916,
1195,
29901,
29916,
3317,
29892,
343,
1195,
29901,
29891,
3317,
29892,
584,
29962,
29871,
396,
14653,
682,
4636,
2159,
363,
5172,
6694,
297,
1797,
304,
1243,
1904,
13,
1678,
396,
4529,
4100,
15786,
363,
3564,
448,
13,
1678,
921,
29918,
2311,
353,
848,
4290,
29889,
12181,
29961,
29900,
29962,
13,
1678,
343,
29918,
2311,
353,
848,
4290,
29889,
12181,
29961,
29896,
29962,
13,
1678,
848,
3505,
353,
848,
4290,
29889,
12181,
29961,
29906,
29962,
13,
1678,
954,
29918,
14968,
353,
938,
3552,
29896,
448,
29871,
29900,
29889,
29906,
29897,
334,
848,
3505,
29897,
13,
1678,
848,
29918,
14968,
353,
848,
4290,
7503,
29892,
584,
29892,
29871,
29900,
29901,
1949,
29918,
14968,
29962,
13,
1678,
8783,
29918,
11234,
353,
3630,
2697,
29907,
15755,
29918,
29931,
1254,
29924,
29898,
1272,
29918,
14968,
29892,
29871,
29945,
29892,
259,
29955,
29897,
13,
1678,
1418,
7003,
1664,
29918,
11234,
353,
848,
29889,
1469,
10036,
29898,
24713,
29922,
24713,
29918,
11234,
29892,
9853,
29918,
2311,
29922,
29941,
29900,
29900,
29892,
528,
21897,
29922,
5574,
29897,
13,
1678,
396,
263,
353,
1051,
29898,
1524,
29898,
24713,
29918,
11234,
876,
13,
13,
1678,
363,
474,
29918,
16175,
29892,
4559,
29918,
16175,
287,
297,
26985,
29898,
29881,
2075,
29877,
1664,
29918,
11234,
1125,
13,
4706,
1596,
29898,
29875,
29918,
16175,
29892,
4559,
29918,
16175,
287,
29961,
29900,
1822,
2311,
3285,
13,
795,
4559,
29918,
16175,
287,
29961,
29896,
1822,
2311,
3101,
13,
1678,
736,
13,
13,
13,
13,
13,
13,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
1667,
580,
13,
1678,
1596,
877,
25632,
29889,
1495,
13,
2
] |
odmf/config.py | jlu-ilr-hydro/odmf | 3 | 62429 | # Parse conf.py in the root directory and check for validity
#
# A more detailed explanation of a valid configuration can be found
# in the documentation
#
import yaml
from pathlib import Path
import sys
import os
from logging import getLogger
from . import prefix, __version__
logger = getLogger(__name__)
class ConfigurationError(RuntimeError):
pass
def static_locations(*from_config):
paths = [Path(__file__).parent / 'static'] + [Path(p) for p in from_config]
filtered = []
[filtered.append(str(p)) for p in paths if p and p.exists() and p not in filtered]
return filtered
class Configuration:
"""
The configuration class. Change the configuration by providing a config.yml in the home directory
Mandatory fields are defined as (...), optional as None or with a default value
"""
datetime_default_timezone = 'Europe/Berlin'
database_type = 'postgres'
database_name = ''
database_username = ''
database_password = ''
database_host = '127.0.0.1'
static = [prefix]
media_image_path = 'webpage/media'
nav_background = '/media/gladbacherhof.jpg'
nav_left_logo = '/media/lfe-logo.png'
manual_measurements_pattern = '(.+\\/)*datafiles\\/lab\\/([a-zA-Z0-9]+\\/)*.*\\.(xls|xlsx)$'
map_default = {'lat': 50.5, 'lng': 8.55, 'type': 'hybrid', 'zoom': 15}
utm_zone = '32N'
upload_max_size = 25000000
server_port = 8080
google_maps_api_key = ''
woftester_receiver_mail = ['<EMAIL>']
woftester_sender_mail = '<EMAIL>'
cuahsi_wsdl_endpoint = 'http://fb09-pasig.umwelt.uni-giessen.de/wof/index.php/cuahsi_1_1.asmx?WSDL'
smtp_serverurl = 'mailout.uni-giessen.de'
root_url = '/'
datafiles = './datafiles'
preferences = './preferences'
description = 'A server for data-management for quantitative field research'
user = os.environ.get('USER') or os.environ.get('USERNAME')
def __bool__(self):
return ... not in vars(self).values()
def to_dict(self):
return {
k: v
for k, v in vars(self).items()
if (
not callable(v)
and not k.startswith('_')
and type(v) is not property
)
}
def update(self, conf_dict: dict):
unknown_keys = []
for k in conf_dict:
if hasattr(self, k):
setattr(self, k, conf_dict[k])
else:
unknown_keys.append(k)
if unknown_keys:
raise ConfigurationError(f'Your configuration contains unknown keys: {",".join(unknown_keys)}')
return self
def __init__(self, **kwargs):
vars(self).update({
k: v
for k, v in vars(type(self)).items()
if not k.startswith('_') and not callable(v)
})
self.update(kwargs)
self.home = str(Path(prefix).absolute())
self.static = static_locations(self.home, *self.static)
def abspath(self, relative_path: Path):
"""
Returns a pathlib.Path from the first fitting static location
:param relative_path: A relative path to a static ressource
"""
for static_home in reversed(self.static):
p = Path(static_home) / relative_path
if p.exists():
return p.absolute()
raise FileNotFoundError(f'{relative_path} not found in the static ressources')
def to_yaml(self, stream=sys.stdout):
"""
Exports the current configuration to a yaml file
:param stream: A stream to write to
"""
d = self.to_dict()
yaml.safe_dump(d, stream)
def google_maps_api(self, callback: str):
return f'https://maps.googleapis.com/maps/api/js?key={self.google_maps_api_key}&callback={callback}'
@property
def version(self):
return __version__
def load_config():
conf_file = Path(prefix) / 'config.yml'
logger.debug('Found config file:' + str(conf_file.absolute()))
if not conf_file.exists():
logger.warning(f'{conf_file.absolute().as_posix()} '
f'not found. Create a template with "odmf configure". Using incomplete configuration')
conf_dict = {}
else:
conf_dict = yaml.safe_load(conf_file.open()) or {}
logger.debug(f'loaded {conf_file.resolve()}')
conf = Configuration(**conf_dict)
if not conf:
logger.warning(', '.join(k for k, v in conf.to_dict().items() if v is ...) + ' are undefined')
return conf
def import_module_configuration(conf_module_filename):
"""
Migration utitlity to create a conf.yaml from the old ODMF 0.x conf.py module configuration
:param conf_module_filename: The conf.py configuration file
"""
code = compile(open(conf_module_filename).read(), 'conf.py', 'exec')
config = {}
exec(code, config)
def c(s: str):
return s.replace('CFG_', '').lower()
config = {
c(k): v
for k, v in config.items()
if k.upper() == k and k[0] != '_' and not callable(v)
}
config['database_type'] = config.pop('database', 'postgres')
conf = Configuration(**config)
return conf
conf = load_config()
| [
1,
396,
20969,
1970,
29889,
2272,
297,
278,
3876,
3884,
322,
1423,
363,
2854,
537,
13,
29937,
13,
29937,
319,
901,
13173,
8252,
310,
263,
2854,
5285,
508,
367,
1476,
13,
29937,
29871,
297,
278,
5106,
13,
29937,
13,
13,
5215,
343,
8807,
13,
3166,
2224,
1982,
1053,
10802,
13,
5215,
10876,
13,
5215,
2897,
13,
13,
3166,
12183,
1053,
679,
16363,
13,
3166,
869,
1053,
10944,
29892,
4770,
3259,
1649,
13,
13,
21707,
353,
679,
16363,
22168,
978,
1649,
29897,
13,
13,
13,
1990,
20999,
2392,
29898,
7944,
2392,
1125,
13,
1678,
1209,
13,
13,
13,
1753,
2294,
29918,
2029,
800,
10456,
3166,
29918,
2917,
1125,
13,
13,
1678,
10898,
353,
518,
2605,
22168,
1445,
1649,
467,
3560,
847,
525,
7959,
2033,
718,
518,
2605,
29898,
29886,
29897,
363,
282,
297,
515,
29918,
2917,
29962,
13,
1678,
22289,
353,
5159,
13,
1678,
518,
4572,
287,
29889,
4397,
29898,
710,
29898,
29886,
876,
363,
282,
297,
10898,
565,
282,
322,
282,
29889,
9933,
580,
322,
282,
451,
297,
22289,
29962,
13,
1678,
736,
22289,
13,
13,
13,
13,
1990,
20999,
29901,
13,
1678,
9995,
13,
1678,
450,
5285,
770,
29889,
10726,
278,
5285,
491,
13138,
263,
2295,
29889,
21053,
297,
278,
3271,
3884,
13,
13,
1678,
15419,
7606,
4235,
526,
3342,
408,
313,
856,
511,
13136,
408,
6213,
470,
411,
263,
2322,
995,
13,
1678,
9995,
13,
1678,
12865,
29918,
4381,
29918,
2230,
8028,
353,
525,
15654,
29914,
17104,
1915,
29915,
13,
1678,
2566,
29918,
1853,
353,
525,
2490,
7201,
29915,
13,
1678,
2566,
29918,
978,
353,
6629,
13,
1678,
2566,
29918,
6786,
353,
6629,
13,
1678,
2566,
29918,
5630,
353,
6629,
13,
1678,
2566,
29918,
3069,
353,
525,
29896,
29906,
29955,
29889,
29900,
29889,
29900,
29889,
29896,
29915,
13,
1678,
2294,
353,
518,
13506,
29962,
13,
1678,
5745,
29918,
3027,
29918,
2084,
353,
525,
2676,
3488,
29914,
9799,
29915,
13,
1678,
6283,
29918,
7042,
353,
8207,
9799,
29914,
3820,
328,
6740,
261,
8782,
29889,
6173,
29915,
13,
1678,
6283,
29918,
1563,
29918,
14569,
353,
8207,
9799,
29914,
29880,
1725,
29899,
14569,
29889,
2732,
29915,
13,
1678,
12219,
29918,
26658,
1860,
29918,
11037,
353,
525,
11891,
29974,
1966,
4551,
29930,
1272,
5325,
1966,
29914,
8205,
1966,
29914,
4197,
29874,
29899,
25265,
29899,
29999,
29900,
29899,
29929,
10062,
1966,
4551,
29930,
5575,
1966,
14030,
20267,
29989,
20267,
29916,
1262,
29915,
13,
1678,
2910,
29918,
4381,
353,
11117,
5066,
2396,
29871,
29945,
29900,
29889,
29945,
29892,
525,
29880,
865,
2396,
29871,
29947,
29889,
29945,
29945,
29892,
525,
1853,
2396,
525,
5819,
19515,
742,
525,
2502,
290,
2396,
29871,
29896,
29945,
29913,
13,
1678,
3477,
29885,
29918,
8028,
353,
525,
29941,
29906,
29940,
29915,
13,
1678,
6441,
29918,
3317,
29918,
2311,
353,
29871,
29906,
29945,
29900,
29900,
29900,
29900,
29900,
29900,
13,
1678,
1923,
29918,
637,
353,
29871,
29947,
29900,
29947,
29900,
13,
1678,
5386,
29918,
10339,
29918,
2754,
29918,
1989,
353,
6629,
13,
1678,
8879,
615,
4156,
29918,
13556,
2147,
29918,
2549,
353,
6024,
29966,
26862,
6227,
29958,
2033,
13,
1678,
8879,
615,
4156,
29918,
15452,
29918,
2549,
353,
12801,
26862,
6227,
16299,
13,
1678,
2723,
801,
1039,
29918,
29893,
29222,
29918,
29734,
353,
525,
1124,
597,
14943,
29900,
29929,
29899,
18182,
335,
29889,
398,
20581,
29889,
3909,
29899,
3146,
9957,
29889,
311,
29914,
827,
29888,
29914,
2248,
29889,
1961,
29914,
4979,
801,
1039,
29918,
29896,
29918,
29896,
29889,
11625,
29916,
29973,
29956,
7230,
29931,
29915,
13,
1678,
1560,
9392,
29918,
2974,
2271,
353,
525,
2549,
449,
29889,
3909,
29899,
3146,
9957,
29889,
311,
29915,
13,
1678,
3876,
29918,
2271,
353,
8207,
29915,
13,
1678,
848,
5325,
353,
19283,
1272,
5325,
29915,
13,
1678,
5821,
2063,
353,
19283,
1457,
10662,
29915,
13,
1678,
6139,
353,
525,
29909,
1923,
363,
848,
29899,
21895,
363,
4323,
23378,
1746,
5925,
29915,
13,
1678,
1404,
353,
2897,
29889,
21813,
29889,
657,
877,
11889,
1495,
470,
2897,
29889,
21813,
29889,
657,
877,
11889,
5813,
1495,
13,
13,
1678,
822,
4770,
11227,
12035,
1311,
1125,
13,
4706,
736,
2023,
451,
297,
24987,
29898,
1311,
467,
5975,
580,
13,
13,
1678,
822,
304,
29918,
8977,
29898,
1311,
1125,
13,
4706,
736,
426,
13,
9651,
413,
29901,
325,
13,
9651,
363,
413,
29892,
325,
297,
24987,
29898,
1311,
467,
7076,
580,
13,
9651,
565,
313,
13,
462,
1678,
451,
1246,
519,
29898,
29894,
29897,
13,
462,
1678,
322,
451,
413,
29889,
27382,
2541,
877,
29918,
1495,
13,
462,
1678,
322,
1134,
29898,
29894,
29897,
338,
451,
2875,
13,
9651,
1723,
13,
4706,
500,
13,
13,
1678,
822,
2767,
29898,
1311,
29892,
1970,
29918,
8977,
29901,
9657,
1125,
13,
13,
4706,
9815,
29918,
8149,
353,
5159,
13,
4706,
363,
413,
297,
1970,
29918,
8977,
29901,
13,
9651,
565,
756,
5552,
29898,
1311,
29892,
413,
1125,
13,
18884,
731,
5552,
29898,
1311,
29892,
413,
29892,
1970,
29918,
8977,
29961,
29895,
2314,
13,
9651,
1683,
29901,
13,
18884,
9815,
29918,
8149,
29889,
4397,
29898,
29895,
29897,
13,
4706,
565,
9815,
29918,
8149,
29901,
13,
9651,
12020,
20999,
2392,
29898,
29888,
29915,
10858,
5285,
3743,
9815,
6611,
29901,
426,
613,
1642,
7122,
29898,
26690,
29918,
8149,
2915,
1495,
13,
13,
4706,
736,
1583,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3579,
19290,
1125,
13,
13,
4706,
24987,
29898,
1311,
467,
5504,
3319,
13,
9651,
413,
29901,
325,
13,
9651,
363,
413,
29892,
325,
297,
24987,
29898,
1853,
29898,
1311,
8106,
7076,
580,
13,
9651,
565,
451,
413,
29889,
27382,
2541,
877,
29918,
1495,
322,
451,
1246,
519,
29898,
29894,
29897,
13,
4706,
5615,
13,
13,
4706,
1583,
29889,
5504,
29898,
19290,
29897,
13,
4706,
1583,
29889,
5184,
353,
851,
29898,
2605,
29898,
13506,
467,
23552,
3101,
13,
4706,
1583,
29889,
7959,
353,
2294,
29918,
2029,
800,
29898,
1311,
29889,
5184,
29892,
334,
1311,
29889,
7959,
29897,
13,
13,
1678,
822,
633,
1028,
493,
29898,
1311,
29892,
6198,
29918,
2084,
29901,
10802,
1125,
13,
4706,
9995,
13,
4706,
16969,
263,
2224,
1982,
29889,
2605,
515,
278,
937,
28221,
2294,
4423,
13,
4706,
584,
3207,
6198,
29918,
2084,
29901,
319,
6198,
2224,
304,
263,
2294,
18475,
1167,
13,
4706,
9995,
13,
4706,
363,
2294,
29918,
5184,
297,
18764,
287,
29898,
1311,
29889,
7959,
1125,
13,
9651,
282,
353,
10802,
29898,
7959,
29918,
5184,
29897,
847,
6198,
29918,
2084,
13,
9651,
565,
282,
29889,
9933,
7295,
13,
18884,
736,
282,
29889,
23552,
580,
13,
4706,
12020,
3497,
17413,
2392,
29898,
29888,
29915,
29912,
22925,
29918,
2084,
29913,
451,
1476,
297,
278,
2294,
18475,
2863,
1495,
13,
13,
1678,
822,
304,
29918,
25162,
29898,
1311,
29892,
4840,
29922,
9675,
29889,
25393,
1125,
13,
4706,
9995,
13,
4706,
1222,
4011,
278,
1857,
5285,
304,
263,
343,
8807,
934,
13,
4706,
584,
3207,
4840,
29901,
319,
4840,
304,
2436,
304,
13,
4706,
9995,
13,
4706,
270,
353,
1583,
29889,
517,
29918,
8977,
580,
13,
4706,
343,
8807,
29889,
11177,
29918,
15070,
29898,
29881,
29892,
4840,
29897,
13,
13,
1678,
822,
5386,
29918,
10339,
29918,
2754,
29898,
1311,
29892,
6939,
29901,
851,
1125,
13,
4706,
736,
285,
29915,
991,
597,
10339,
29889,
15947,
29889,
510,
29914,
10339,
29914,
2754,
29914,
1315,
29973,
1989,
3790,
1311,
29889,
3608,
29918,
10339,
29918,
2754,
29918,
1989,
15704,
14035,
3790,
14035,
10162,
13,
13,
1678,
732,
6799,
13,
1678,
822,
1873,
29898,
1311,
1125,
13,
4706,
736,
4770,
3259,
1649,
13,
13,
13,
1753,
2254,
29918,
2917,
7295,
13,
1678,
1970,
29918,
1445,
353,
10802,
29898,
13506,
29897,
847,
525,
2917,
29889,
21053,
29915,
13,
1678,
17927,
29889,
8382,
877,
9692,
2295,
934,
11283,
718,
851,
29898,
5527,
29918,
1445,
29889,
23552,
22130,
13,
1678,
565,
451,
1970,
29918,
1445,
29889,
9933,
7295,
13,
4706,
17927,
29889,
27392,
29898,
29888,
29915,
29912,
5527,
29918,
1445,
29889,
23552,
2141,
294,
29918,
1066,
861,
28296,
525,
13,
462,
259,
285,
29915,
1333,
1476,
29889,
6204,
263,
4472,
411,
376,
397,
29885,
29888,
10822,
1642,
5293,
28907,
5285,
1495,
13,
4706,
1970,
29918,
8977,
353,
6571,
13,
1678,
1683,
29901,
13,
4706,
1970,
29918,
8977,
353,
343,
8807,
29889,
11177,
29918,
1359,
29898,
5527,
29918,
1445,
29889,
3150,
3101,
470,
6571,
13,
4706,
17927,
29889,
8382,
29898,
29888,
29915,
15638,
426,
5527,
29918,
1445,
29889,
17863,
28296,
1495,
13,
1678,
1970,
353,
20999,
29898,
1068,
5527,
29918,
8977,
29897,
13,
13,
1678,
565,
451,
1970,
29901,
13,
539,
17927,
29889,
27392,
29317,
15300,
7122,
29898,
29895,
363,
413,
29892,
325,
297,
1970,
29889,
517,
29918,
8977,
2141,
7076,
580,
565,
325,
338,
29757,
718,
525,
526,
7580,
1495,
13,
1678,
736,
1970,
13,
13,
13,
1753,
1053,
29918,
5453,
29918,
13305,
29898,
5527,
29918,
5453,
29918,
9507,
1125,
13,
1678,
9995,
13,
1678,
341,
16783,
3477,
277,
29880,
537,
304,
1653,
263,
1970,
29889,
25162,
515,
278,
2030,
438,
23560,
29943,
29871,
29900,
29889,
29916,
1970,
29889,
2272,
3883,
5285,
13,
13,
1678,
584,
3207,
1970,
29918,
5453,
29918,
9507,
29901,
450,
1970,
29889,
2272,
5285,
934,
13,
1678,
9995,
13,
1678,
775,
353,
6633,
29898,
3150,
29898,
5527,
29918,
5453,
29918,
9507,
467,
949,
3285,
525,
5527,
29889,
2272,
742,
525,
4258,
1495,
13,
1678,
2295,
353,
6571,
13,
1678,
2279,
29898,
401,
29892,
2295,
29897,
13,
13,
1678,
822,
274,
29898,
29879,
29901,
851,
1125,
13,
4706,
736,
269,
29889,
6506,
877,
9207,
29954,
29918,
742,
525,
2824,
13609,
580,
13,
13,
1678,
2295,
353,
426,
13,
4706,
274,
29898,
29895,
1125,
325,
13,
4706,
363,
413,
29892,
325,
297,
2295,
29889,
7076,
580,
13,
4706,
565,
413,
29889,
21064,
580,
1275,
413,
322,
413,
29961,
29900,
29962,
2804,
22868,
29915,
322,
451,
1246,
519,
29898,
29894,
29897,
13,
1678,
500,
13,
13,
1678,
2295,
1839,
9803,
29918,
1853,
2033,
353,
2295,
29889,
7323,
877,
9803,
742,
525,
2490,
7201,
1495,
13,
13,
1678,
1970,
353,
20999,
29898,
1068,
2917,
29897,
13,
13,
1678,
736,
1970,
13,
13,
13,
5527,
353,
2254,
29918,
2917,
580,
13,
2
] |
{{cookiecutter.project_slug}}/src/{{cookiecutter.pkg_name}}/touch.py | royw/cookiecutter-pypackage | 0 | 135057 | <gh_stars>0
"""Simple touch utility."""
def touch(filename: str) -> None:
"""Mimics the "touch filename" utility.
:param filename: filename to touch
"""
with open(filename, "a"):
pass
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
15945,
29908,
15427,
6023,
19725,
1213,
15945,
13,
13,
13,
1753,
6023,
29898,
9507,
29901,
851,
29897,
1599,
6213,
29901,
13,
1678,
9995,
29924,
326,
1199,
278,
376,
16747,
10422,
29908,
19725,
29889,
13,
13,
1678,
584,
3207,
10422,
29901,
10422,
304,
6023,
13,
1678,
9995,
13,
1678,
411,
1722,
29898,
9507,
29892,
376,
29874,
29908,
1125,
13,
4706,
1209,
13,
2
] |
a03_drugbank_00_pp.py | Hoa-Lab/2021_Menieres | 0 | 131253 | <reponame>Hoa-Lab/2021_Menieres<filename>a03_drugbank_00_pp.py
import pandas as pd
from pathlib import Path
import matplotlib.pyplot as plt
import seaborn as sns
#----------------------------------------------
f_drug='./raw/drugbank.csv'
f_gl='./out/a01_gl-meni_00_genelist/gl_meni.txt'
fd_out='./out/a03_drugbank_00_pp'
#----------------------------------------------
Path(fd_out).mkdir(exist_ok=True, parents=True)
#------------------function---------------------------
def plot_bar(df, f_out, color='Grey', title=None, n=10, sz=(6,8), y=16):
dfi=df.iloc[0:n].copy()
dfi.index.name='drug'
dfi=dfi.reset_index()
#1. plot
sns.set()
fig, ax=plt.subplots(figsize=sz)
ax=sns.barplot(x='gene', y='drug', data=dfi, color=color, alpha=0.7)
#2.adjust
plt.title('Target Counts', fontsize=20, pad=10, weight='semibold')
plt.xlabel('Targets', fontsize=18, labelpad=10, weight='semibold')
plt.ylabel('', fontsize=18, labelpad=10)
plt.yticks(fontsize=y, rotation=0, weight='semibold')
#3. save
plt.tight_layout()
plt.savefig(f_out, dpi=300)
plt.close()
return
#############################################################
#load
df_drug=pd.read_csv(f_drug)
l_gene=Path(f_gl).read_text().strip().split('\n')
l_gene=[i.upper() for i in l_gene]
#clean
df=df_drug.loc[df_drug['gene'].isin(l_gene), :]
#get df
df=df.groupby('name').count().sort_values('gene', ascending=False)
df=df.loc[:, ['gene']]
df.to_csv(f'{fd_out}/drug.csv')
#plot
f_out=f'{fd_out}/bar.png'
plot_bar(df, f_out)
| [
1,
529,
276,
1112,
420,
29958,
29950,
19807,
29899,
28632,
29914,
29906,
29900,
29906,
29896,
29918,
28154,
631,
267,
29966,
9507,
29958,
29874,
29900,
29941,
29918,
29881,
11124,
9157,
29918,
29900,
29900,
29918,
407,
29889,
2272,
13,
5215,
11701,
408,
10518,
13,
3166,
2224,
1982,
1053,
10802,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
5215,
409,
370,
1398,
408,
269,
1983,
13,
13,
29937,
2683,
2683,
9072,
489,
13,
29888,
29918,
29881,
11124,
2433,
6904,
1610,
29914,
29881,
11124,
9157,
29889,
7638,
29915,
13,
29888,
29918,
3820,
2433,
6904,
449,
29914,
29874,
29900,
29896,
29918,
3820,
29899,
1527,
29875,
29918,
29900,
29900,
29918,
1885,
295,
391,
29914,
3820,
29918,
1527,
29875,
29889,
3945,
29915,
13,
11512,
29918,
449,
2433,
6904,
449,
29914,
29874,
29900,
29941,
29918,
29881,
11124,
9157,
29918,
29900,
29900,
29918,
407,
29915,
13,
13,
29937,
2683,
2683,
9072,
489,
13,
2605,
29898,
11512,
29918,
449,
467,
11256,
3972,
29898,
28997,
29918,
554,
29922,
5574,
29892,
11825,
29922,
5574,
29897,
13,
13,
13,
29937,
2683,
489,
2220,
2683,
1378,
5634,
13,
1753,
6492,
29918,
1646,
29898,
2176,
29892,
285,
29918,
449,
29892,
2927,
2433,
29954,
8903,
742,
3611,
29922,
8516,
29892,
302,
29922,
29896,
29900,
29892,
2268,
7607,
29953,
29892,
29947,
511,
343,
29922,
29896,
29953,
1125,
13,
12,
2176,
29875,
29922,
2176,
29889,
309,
542,
29961,
29900,
29901,
29876,
1822,
8552,
580,
13,
12,
2176,
29875,
29889,
2248,
29889,
978,
2433,
29881,
11124,
29915,
13,
12,
2176,
29875,
29922,
2176,
29875,
29889,
12071,
29918,
2248,
580,
13,
12,
29937,
29896,
29889,
6492,
13,
12,
29879,
1983,
29889,
842,
580,
13,
12,
1003,
29892,
4853,
29922,
572,
29873,
29889,
1491,
26762,
29898,
1003,
2311,
29922,
3616,
29897,
13,
12,
1165,
29922,
29879,
1983,
29889,
1646,
5317,
29898,
29916,
2433,
29887,
1600,
742,
343,
2433,
29881,
11124,
742,
848,
29922,
2176,
29875,
29892,
2927,
29922,
2780,
29892,
15595,
29922,
29900,
29889,
29955,
29897,
13,
12,
29937,
29906,
29889,
328,
5143,
13,
12,
572,
29873,
29889,
3257,
877,
8667,
3917,
29879,
742,
4079,
2311,
29922,
29906,
29900,
29892,
17132,
29922,
29896,
29900,
29892,
7688,
2433,
12846,
747,
1025,
1495,
13,
12,
572,
29873,
29889,
29916,
1643,
877,
8667,
29879,
742,
4079,
2311,
29922,
29896,
29947,
29892,
3858,
8305,
29922,
29896,
29900,
29892,
7688,
2433,
12846,
747,
1025,
1495,
13,
12,
572,
29873,
29889,
29891,
1643,
877,
742,
4079,
2311,
29922,
29896,
29947,
29892,
3858,
8305,
29922,
29896,
29900,
29897,
13,
12,
572,
29873,
29889,
3637,
7358,
29898,
5657,
2311,
29922,
29891,
29892,
13733,
29922,
29900,
29892,
7688,
2433,
12846,
747,
1025,
1495,
13,
12,
29937,
29941,
29889,
4078,
13,
12,
572,
29873,
29889,
29873,
523,
29918,
2680,
580,
13,
12,
572,
29873,
29889,
7620,
1003,
29898,
29888,
29918,
449,
29892,
270,
1631,
29922,
29941,
29900,
29900,
29897,
13,
12,
572,
29873,
29889,
5358,
580,
13,
12,
2457,
13,
12,
13,
12,
13,
13383,
13383,
13383,
7346,
4136,
29937,
13,
29937,
1359,
13,
2176,
29918,
29881,
11124,
29922,
15926,
29889,
949,
29918,
7638,
29898,
29888,
29918,
29881,
11124,
29897,
13,
29880,
29918,
29887,
1600,
29922,
2605,
29898,
29888,
29918,
3820,
467,
949,
29918,
726,
2141,
17010,
2141,
5451,
28909,
29876,
1495,
13,
29880,
29918,
29887,
1600,
11759,
29875,
29889,
21064,
580,
363,
474,
297,
301,
29918,
29887,
1600,
29962,
13,
13,
29937,
14941,
13,
2176,
29922,
2176,
29918,
29881,
11124,
29889,
2029,
29961,
2176,
29918,
29881,
11124,
1839,
29887,
1600,
13359,
275,
262,
29898,
29880,
29918,
29887,
1600,
511,
584,
29962,
13,
13,
29937,
657,
4489,
13,
2176,
29922,
2176,
29889,
27789,
877,
978,
2824,
2798,
2141,
6605,
29918,
5975,
877,
29887,
1600,
742,
12066,
2548,
29922,
8824,
29897,
13,
2176,
29922,
2176,
29889,
2029,
7503,
29892,
6024,
29887,
1600,
2033,
29962,
13,
13,
2176,
29889,
517,
29918,
7638,
29898,
29888,
29915,
29912,
11512,
29918,
449,
6822,
29881,
11124,
29889,
7638,
1495,
13,
13,
29937,
5317,
13,
29888,
29918,
449,
29922,
29888,
29915,
29912,
11512,
29918,
449,
6822,
1646,
29889,
2732,
29915,
13,
13,
5317,
29918,
1646,
29898,
2176,
29892,
285,
29918,
449,
29897,
13,
2
] |
Trabalho02.py | VictorCastao/Monitoria_PS | 0 | 1609064 | #Inicializando variáveis correspondentes ao número de dias e a soma
soma_total = 0
soma_parcial = 0
dias = 0
resposta = 0
n = 0
indicador = False
#Lendo número de dias
n = int(input())
#Obtendo somas de cada dia
while dias < n:
#Atualizando dia atual
dias = dias + 1
#Acessos do dia
soma_parcial = int(input())
#Atualizando total de acessos
soma_total = soma_total + soma_parcial
#Verificando se a meta foi atingida
#Caso seja, teremos a resposta
if soma_total >= 1000000 and indicador == False:
resposta = dias
#Evitar atualização da resposta
indicador = True
#Imprimindo resposta
print(resposta)
| [
1,
396,
797,
5611,
466,
1743,
1197,
29976,
27072,
3928,
5326,
5017,
13831,
316,
652,
294,
321,
263,
1047,
29874,
13,
29879,
4125,
29918,
7827,
353,
29871,
29900,
13,
29879,
4125,
29918,
862,
1455,
353,
29871,
29900,
13,
29881,
3173,
353,
29871,
29900,
13,
690,
27363,
353,
29871,
29900,
13,
29876,
353,
29871,
29900,
13,
513,
293,
3136,
353,
7700,
13,
13,
29937,
29931,
2765,
13831,
316,
652,
294,
13,
29876,
353,
938,
29898,
2080,
3101,
13,
13,
29937,
29949,
3116,
2765,
1047,
294,
316,
9747,
9766,
13,
8000,
652,
294,
529,
302,
29901,
13,
13,
1678,
396,
4178,
950,
466,
1743,
9766,
472,
950,
13,
1678,
652,
294,
353,
652,
294,
718,
29871,
29896,
13,
13,
1678,
396,
29909,
985,
359,
437,
9766,
13,
1678,
1047,
29874,
29918,
862,
1455,
353,
938,
29898,
2080,
3101,
13,
13,
1678,
396,
4178,
950,
466,
1743,
3001,
316,
263,
985,
359,
13,
1678,
1047,
29874,
29918,
7827,
353,
1047,
29874,
29918,
7827,
718,
1047,
29874,
29918,
862,
1455,
13,
13,
1678,
396,
6565,
928,
1743,
409,
263,
12700,
4732,
472,
292,
1458,
13,
1678,
396,
29907,
17764,
409,
1764,
29892,
1935,
29629,
263,
620,
27363,
13,
1678,
565,
1047,
29874,
29918,
7827,
6736,
29871,
29896,
29900,
29900,
29900,
29900,
29900,
29900,
322,
4221,
3136,
1275,
7700,
29901,
13,
4706,
620,
27363,
353,
652,
294,
13,
13,
4706,
396,
29923,
29894,
3673,
472,
950,
20945,
1146,
620,
27363,
13,
4706,
4221,
3136,
353,
5852,
13,
13,
29937,
1888,
9469,
15036,
620,
27363,
13,
2158,
29898,
690,
27363,
29897,
13,
2
] |
ABC/056/a.py | fumiyanll23/AtCoder | 0 | 89033 | <reponame>fumiyanll23/AtCoder
def main():
# input
a, b = input().split()
# compute
# output
print('H' if a==b else 'D')
if __name__ == '__main__':
main()
| [
1,
529,
276,
1112,
420,
29958,
29888,
15547,
10094,
645,
29906,
29941,
29914,
4178,
29907,
6119,
13,
1753,
1667,
7295,
13,
1678,
396,
1881,
13,
1678,
263,
29892,
289,
353,
1881,
2141,
5451,
580,
13,
13,
1678,
396,
10272,
13,
13,
1678,
396,
1962,
13,
1678,
1596,
877,
29950,
29915,
565,
263,
1360,
29890,
1683,
525,
29928,
1495,
13,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
1667,
580,
13,
2
] |
custom_scripts/load_animals.py | nphilou/influence-release | 0 | 7910 | import os
from tensorflow.contrib.learn.python.learn.datasets import base
import numpy as np
import IPython
from subprocess import call
from keras.preprocessing import image
from influence.dataset import DataSet
from influence.inception_v3 import preprocess_input
BASE_DIR = 'data' # TODO: change
def fill(X, Y, idx, label, img_path, img_side):
img = image.load_img(img_path, target_size=(img_side, img_side))
x = image.img_to_array(img)
X[idx, ...] = x
Y[idx] = label
def extract_and_rename_animals():
class_maps = [
('dog', 'n02084071'),
('cat', 'n02121808'),
('bird', 'n01503061'),
('fish', 'n02512053'),
('horse', 'n02374451'),
('monkey', 'n02484322'),
('zebra', 'n02391049'),
('panda', 'n02510455'),
('lemur', 'n02496913'),
('wombat', 'n01883070'),
]
for class_string, class_id in class_maps:
class_dir = os.path.join(BASE_DIR, class_string)
print(class_dir)
call('mkdir %s' % class_dir, shell=True)
call('tar -xf %s.tar -C %s' % (os.path.join(BASE_DIR, class_id), class_dir), shell=True)
for filename in os.listdir(class_dir):
file_idx = filename.split('_')[1].split('.')[0]
src_filename = os.path.join(class_dir, filename)
dst_filename = os.path.join(class_dir, '%s_%s.JPEG' % (class_string, file_idx))
os.rename(src_filename, dst_filename)
def load_animals(num_train_ex_per_class=300,
num_test_ex_per_class=100,
num_valid_ex_per_class=0,
classes=None,
):
num_channels = 3
img_side = 299
if num_valid_ex_per_class == 0:
valid_str = ''
else:
valid_str = '_valid-%s' % num_valid_examples
if classes is None:
classes = ['dog', 'cat', 'bird', 'fish', 'horse', 'monkey', 'zebra', 'panda', 'lemur', 'wombat']
data_filename = os.path.join(BASE_DIR, 'dataset_train-%s_test-%s%s.npz' % (num_train_ex_per_class, num_test_ex_per_class, valid_str))
else:
data_filename = os.path.join(BASE_DIR, 'dataset_%s_train-%s_test-%s%s.npz' % ('-'.join(classes), num_train_ex_per_class, num_test_ex_per_class, valid_str))
num_classes = len(classes)
num_train_examples = num_train_ex_per_class * num_classes
num_test_examples = num_test_ex_per_class * num_classes
num_valid_examples = num_valid_ex_per_class * num_classes
if os.path.exists(data_filename):
print('Loading animals from disk...')
f = np.load(data_filename)
X_train = f['X_train']
X_test = f['X_test']
Y_train = f['Y_train']
Y_test = f['Y_test']
if 'X_valid' in f:
X_valid = f['X_valid']
else:
X_valid = None
if 'Y_valid' in f:
Y_valid = f['Y_valid']
else:
Y_valid = None
else:
print('Reading animals from raw images...')
X_train = np.zeros([num_train_examples, img_side, img_side, num_channels])
X_test = np.zeros([num_test_examples, img_side, img_side, num_channels])
# X_valid = np.zeros([num_valid_examples, img_side, img_side, num_channels])
X_valid = None
Y_train = np.zeros([num_train_examples])
Y_test = np.zeros([num_test_examples])
# Y_valid = np.zeros([num_valid_examples])
Y_valid = None
for class_idx, class_string in enumerate(classes):
print('class: %s' % class_string)
# For some reason, a lot of numbers are skipped.
i = 0
num_filled = 0
while num_filled < num_train_ex_per_class:
img_path = os.path.join(BASE_DIR, '%s/%s_%s.JPEG' % (class_string, class_string, i))
print(img_path)
if os.path.exists(img_path):
fill(X_train, Y_train, num_filled + (num_train_ex_per_class * class_idx), class_idx, img_path, img_side)
num_filled += 1
print(num_filled)
i += 1
num_filled = 0
while num_filled < num_test_ex_per_class:
img_path = os.path.join(BASE_DIR, '%s/%s_%s.JPEG' % (class_string, class_string, i))
if os.path.exists(img_path):
fill(X_test, Y_test, num_filled + (num_test_ex_per_class * class_idx), class_idx, img_path, img_side)
num_filled += 1
print(num_filled)
i += 1
num_filled = 0
while num_filled < num_valid_ex_per_class:
img_path = os.path.join(BASE_DIR, '%s/%s_%s.JPEG' % (class_string, class_string, i))
if os.path.exists(img_path):
fill(X_valid, Y_valid, num_filled + (num_valid_ex_per_class * class_idx), class_idx, img_path, img_side)
num_filled += 1
print(num_filled)
i += 1
X_train = preprocess_input(X_train)
X_test = preprocess_input(X_test)
X_valid = preprocess_input(X_valid)
np.random.seed(0)
permutation_idx = np.arange(num_train_examples)
np.random.shuffle(permutation_idx)
X_train = X_train[permutation_idx, :]
Y_train = Y_train[permutation_idx]
permutation_idx = np.arange(num_test_examples)
np.random.shuffle(permutation_idx)
X_test = X_test[permutation_idx, :]
Y_test = Y_test[permutation_idx]
permutation_idx = np.arange(num_valid_examples)
np.random.shuffle(permutation_idx)
X_valid = X_valid[permutation_idx, :]
Y_valid = Y_valid[permutation_idx]
np.savez_compressed(data_filename, X_train=X_train, Y_train=Y_train, X_test=X_test, Y_test=Y_test, X_valid=X_valid, Y_valid=Y_valid)
train = DataSet(X_train, Y_train)
if (X_valid is not None) and (Y_valid is not None):
# validation = DataSet(X_valid, Y_valid)
validation = None
else:
validation = None
test = DataSet(X_test, Y_test)
return base.Datasets(train=train, validation=validation, test=test)
def load_koda():
num_channels = 3
img_side = 299
data_filename = os.path.join(BASE_DIR, 'dataset_koda.npz')
if os.path.exists(data_filename):
print('Loading Koda from disk...')
f = np.load(data_filename)
X = f['X']
Y = f['Y']
else:
# Returns all class 0
print('Reading Koda from raw images...')
image_files = [image_file for image_file in os.listdir(os.path.join(BASE_DIR, 'koda')) if (image_file.endswith('.jpg'))]
# Hack to get the image files in the right order
# image_files = [image_file for image_file in os.listdir(os.path.join(BASE_DIR, 'koda')) if (image_file.endswith('.jpg') and not image_file.startswith('124'))]
# image_files += [image_file for image_file in os.listdir(os.path.join(BASE_DIR, 'koda')) if (image_file.endswith('.jpg') and image_file.startswith('124'))]
num_examples = len(image_files)
X = np.zeros([num_examples, img_side, img_side, num_channels])
Y = np.zeros([num_examples])
class_idx = 0
for counter, image_file in enumerate(image_files):
img_path = os.path.join(BASE_DIR, 'koda', image_file)
fill(X, Y, counter, class_idx, img_path, img_side)
X = preprocess_input(X)
np.savez(data_filename, X=X, Y=Y)
return X, Y
def load_dogfish_with_koda():
classes = ['dog', 'fish']
X_test, Y_test = load_koda()
data_sets = load_animals(num_train_ex_per_class=900,
num_test_ex_per_class=300,
num_valid_ex_per_class=0,
classes=classes)
train = data_sets.train
validation = data_sets.validation
test = DataSet(X_test, Y_test)
return base.Datasets(train=train, validation=validation, test=test)
def load_dogfish_with_orig_and_koda():
classes = ['dog', 'fish']
X_test, Y_test = load_koda()
X_test = np.reshape(X_test, (X_test.shape[0], -1))
data_sets = load_animals(num_train_ex_per_class=900,
num_test_ex_per_class=300,
num_valid_ex_per_class=0,
classes=classes)
train = data_sets.train
validation = data_sets.validation
test = DataSet(
np.concatenate((data_sets.test.x, X_test), axis=0),
np.concatenate((data_sets.test.labels, Y_test), axis=0))
return base.Datasets(train=train, validation=validation, test=test)
| [
1,
1053,
2897,
13,
13,
3166,
26110,
29889,
21570,
29889,
19668,
29889,
4691,
29889,
19668,
29889,
14538,
1691,
1053,
2967,
13,
5215,
12655,
408,
7442,
13,
5215,
5641,
1656,
13,
13,
3166,
1014,
5014,
1053,
1246,
13,
13,
3166,
13023,
294,
29889,
1457,
19170,
1053,
1967,
13,
13,
3166,
9949,
29889,
24713,
1053,
3630,
2697,
13,
3166,
9949,
29889,
1239,
683,
29918,
29894,
29941,
1053,
758,
5014,
29918,
2080,
13,
13,
25416,
29918,
9464,
353,
525,
1272,
29915,
396,
14402,
29901,
1735,
13,
13,
1753,
5445,
29898,
29990,
29892,
612,
29892,
22645,
29892,
3858,
29892,
10153,
29918,
2084,
29892,
10153,
29918,
2975,
1125,
13,
1678,
10153,
353,
1967,
29889,
1359,
29918,
2492,
29898,
2492,
29918,
2084,
29892,
3646,
29918,
2311,
7607,
2492,
29918,
2975,
29892,
10153,
29918,
2975,
876,
13,
1678,
921,
353,
1967,
29889,
2492,
29918,
517,
29918,
2378,
29898,
2492,
29897,
13,
1678,
1060,
29961,
13140,
29892,
2023,
29962,
353,
921,
13,
1678,
612,
29961,
13140,
29962,
353,
3858,
13,
13,
418,
13,
1753,
6597,
29918,
392,
29918,
1267,
420,
29918,
11576,
1338,
7295,
13,
1678,
770,
29918,
10339,
353,
518,
13,
4706,
6702,
26169,
742,
525,
29876,
29900,
29906,
29900,
29947,
29946,
29900,
29955,
29896,
5477,
13,
4706,
6702,
4117,
742,
525,
29876,
29900,
29906,
29896,
29906,
29896,
29947,
29900,
29947,
5477,
13,
4706,
6702,
18513,
742,
525,
29876,
29900,
29896,
29945,
29900,
29941,
29900,
29953,
29896,
5477,
13,
4706,
6702,
15161,
742,
525,
29876,
29900,
29906,
29945,
29896,
29906,
29900,
29945,
29941,
5477,
13,
4706,
6702,
2015,
344,
742,
525,
29876,
29900,
29906,
29941,
29955,
29946,
29946,
29945,
29896,
5477,
13,
4706,
6702,
3712,
1989,
742,
525,
29876,
29900,
29906,
29946,
29947,
29946,
29941,
29906,
29906,
5477,
13,
4706,
6702,
29920,
774,
336,
742,
525,
29876,
29900,
29906,
29941,
29929,
29896,
29900,
29946,
29929,
5477,
13,
4706,
6702,
29886,
5863,
742,
525,
29876,
29900,
29906,
29945,
29896,
29900,
29946,
29945,
29945,
5477,
13,
4706,
6702,
2409,
332,
742,
525,
29876,
29900,
29906,
29946,
29929,
29953,
29929,
29896,
29941,
5477,
13,
4706,
6702,
29893,
3424,
271,
742,
525,
29876,
29900,
29896,
29947,
29947,
29941,
29900,
29955,
29900,
5477,
13,
4706,
4514,
13,
13,
13,
1678,
363,
770,
29918,
1807,
29892,
770,
29918,
333,
297,
770,
29918,
10339,
29901,
13,
308,
13,
4706,
770,
29918,
3972,
353,
2897,
29889,
2084,
29889,
7122,
29898,
25416,
29918,
9464,
29892,
770,
29918,
1807,
29897,
13,
4706,
1596,
29898,
1990,
29918,
3972,
29897,
13,
4706,
1246,
877,
11256,
3972,
1273,
29879,
29915,
1273,
770,
29918,
3972,
29892,
6473,
29922,
5574,
29897,
13,
4706,
1246,
877,
12637,
448,
24660,
1273,
29879,
29889,
12637,
448,
29907,
1273,
29879,
29915,
1273,
313,
359,
29889,
2084,
29889,
7122,
29898,
25416,
29918,
9464,
29892,
770,
29918,
333,
511,
770,
29918,
3972,
511,
6473,
29922,
5574,
29897,
13,
308,
13,
4706,
363,
10422,
297,
2897,
29889,
1761,
3972,
29898,
1990,
29918,
3972,
1125,
13,
13,
9651,
934,
29918,
13140,
353,
10422,
29889,
5451,
877,
29918,
29861,
29896,
1822,
5451,
12839,
29861,
29900,
29962,
13,
9651,
4765,
29918,
9507,
353,
2897,
29889,
2084,
29889,
7122,
29898,
1990,
29918,
3972,
29892,
10422,
29897,
13,
9651,
29743,
29918,
9507,
353,
2897,
29889,
2084,
29889,
7122,
29898,
1990,
29918,
3972,
29892,
14210,
29879,
29918,
29995,
29879,
29889,
29967,
4162,
29954,
29915,
1273,
313,
1990,
29918,
1807,
29892,
934,
29918,
13140,
876,
13,
9651,
2897,
29889,
1267,
420,
29898,
4351,
29918,
9507,
29892,
29743,
29918,
9507,
29897,
13,
13,
13,
13,
1753,
2254,
29918,
11576,
1338,
29898,
1949,
29918,
14968,
29918,
735,
29918,
546,
29918,
1990,
29922,
29941,
29900,
29900,
29892,
29871,
13,
462,
954,
29918,
1688,
29918,
735,
29918,
546,
29918,
1990,
29922,
29896,
29900,
29900,
29892,
13,
462,
954,
29918,
3084,
29918,
735,
29918,
546,
29918,
1990,
29922,
29900,
29892,
13,
462,
4413,
29922,
8516,
29892,
13,
462,
29871,
1125,
268,
13,
13,
1678,
954,
29918,
305,
12629,
353,
29871,
29941,
13,
1678,
10153,
29918,
2975,
353,
29871,
29906,
29929,
29929,
13,
13,
1678,
565,
954,
29918,
3084,
29918,
735,
29918,
546,
29918,
1990,
1275,
29871,
29900,
29901,
13,
4706,
2854,
29918,
710,
353,
6629,
13,
1678,
1683,
29901,
13,
4706,
2854,
29918,
710,
353,
22868,
3084,
19222,
29879,
29915,
1273,
954,
29918,
3084,
29918,
19057,
13,
13,
1678,
565,
4413,
338,
6213,
29901,
13,
4706,
4413,
353,
6024,
26169,
742,
525,
4117,
742,
525,
18513,
742,
525,
15161,
742,
525,
2015,
344,
742,
525,
3712,
1989,
742,
525,
29920,
774,
336,
742,
525,
29886,
5863,
742,
525,
2409,
332,
742,
525,
29893,
3424,
271,
2033,
13,
4706,
848,
29918,
9507,
353,
2897,
29889,
2084,
29889,
7122,
29898,
25416,
29918,
9464,
29892,
525,
24713,
29918,
14968,
19222,
29879,
29918,
1688,
19222,
29879,
29995,
29879,
29889,
9302,
29920,
29915,
1273,
313,
1949,
29918,
14968,
29918,
735,
29918,
546,
29918,
1990,
29892,
954,
29918,
1688,
29918,
735,
29918,
546,
29918,
1990,
29892,
2854,
29918,
710,
876,
13,
1678,
1683,
29901,
13,
4706,
848,
29918,
9507,
353,
2897,
29889,
2084,
29889,
7122,
29898,
25416,
29918,
9464,
29892,
525,
24713,
29918,
29995,
29879,
29918,
14968,
19222,
29879,
29918,
1688,
19222,
29879,
29995,
29879,
29889,
9302,
29920,
29915,
1273,
6702,
29899,
4286,
7122,
29898,
13203,
511,
954,
29918,
14968,
29918,
735,
29918,
546,
29918,
1990,
29892,
954,
29918,
1688,
29918,
735,
29918,
546,
29918,
1990,
29892,
2854,
29918,
710,
876,
13,
13,
1678,
954,
29918,
13203,
353,
7431,
29898,
13203,
29897,
13,
1678,
954,
29918,
14968,
29918,
19057,
353,
954,
29918,
14968,
29918,
735,
29918,
546,
29918,
1990,
334,
954,
29918,
13203,
13,
1678,
954,
29918,
1688,
29918,
19057,
353,
954,
29918,
1688,
29918,
735,
29918,
546,
29918,
1990,
334,
954,
29918,
13203,
13,
1678,
954,
29918,
3084,
29918,
19057,
353,
954,
29918,
3084,
29918,
735,
29918,
546,
29918,
1990,
334,
954,
29918,
13203,
13,
13,
1678,
565,
2897,
29889,
2084,
29889,
9933,
29898,
1272,
29918,
9507,
1125,
13,
4706,
1596,
877,
23456,
15006,
515,
8086,
856,
1495,
13,
4706,
285,
353,
7442,
29889,
1359,
29898,
1272,
29918,
9507,
29897,
13,
4706,
1060,
29918,
14968,
353,
285,
1839,
29990,
29918,
14968,
2033,
13,
4706,
1060,
29918,
1688,
353,
285,
1839,
29990,
29918,
1688,
2033,
13,
4706,
612,
29918,
14968,
353,
285,
1839,
29979,
29918,
14968,
2033,
13,
4706,
612,
29918,
1688,
353,
285,
1839,
29979,
29918,
1688,
2033,
13,
13,
4706,
565,
525,
29990,
29918,
3084,
29915,
297,
285,
29901,
13,
9651,
1060,
29918,
3084,
353,
285,
1839,
29990,
29918,
3084,
2033,
13,
4706,
1683,
29901,
13,
9651,
1060,
29918,
3084,
353,
6213,
13,
13,
4706,
565,
525,
29979,
29918,
3084,
29915,
297,
285,
29901,
13,
9651,
612,
29918,
3084,
353,
285,
1839,
29979,
29918,
3084,
2033,
13,
4706,
1683,
29901,
13,
9651,
612,
29918,
3084,
353,
6213,
13,
13,
1678,
1683,
29901,
13,
4706,
1596,
877,
6359,
292,
15006,
515,
10650,
4558,
856,
1495,
13,
4706,
1060,
29918,
14968,
353,
7442,
29889,
3298,
359,
4197,
1949,
29918,
14968,
29918,
19057,
29892,
10153,
29918,
2975,
29892,
10153,
29918,
2975,
29892,
954,
29918,
305,
12629,
2314,
13,
4706,
1060,
29918,
1688,
353,
7442,
29889,
3298,
359,
4197,
1949,
29918,
1688,
29918,
19057,
29892,
10153,
29918,
2975,
29892,
10153,
29918,
2975,
29892,
954,
29918,
305,
12629,
2314,
13,
4706,
396,
1060,
29918,
3084,
353,
7442,
29889,
3298,
359,
4197,
1949,
29918,
3084,
29918,
19057,
29892,
10153,
29918,
2975,
29892,
10153,
29918,
2975,
29892,
954,
29918,
305,
12629,
2314,
13,
4706,
1060,
29918,
3084,
353,
6213,
13,
13,
4706,
612,
29918,
14968,
353,
7442,
29889,
3298,
359,
4197,
1949,
29918,
14968,
29918,
19057,
2314,
13,
4706,
612,
29918,
1688,
353,
7442,
29889,
3298,
359,
4197,
1949,
29918,
1688,
29918,
19057,
2314,
13,
4706,
396,
612,
29918,
3084,
353,
7442,
29889,
3298,
359,
4197,
1949,
29918,
3084,
29918,
19057,
2314,
13,
4706,
612,
29918,
3084,
353,
6213,
13,
13,
4706,
363,
770,
29918,
13140,
29892,
770,
29918,
1807,
297,
26985,
29898,
13203,
1125,
13,
9651,
1596,
877,
1990,
29901,
1273,
29879,
29915,
1273,
770,
29918,
1807,
29897,
632,
13,
9651,
396,
1152,
777,
2769,
29892,
263,
3287,
310,
3694,
526,
14993,
2986,
29889,
13,
9651,
474,
353,
29871,
29900,
13,
9651,
954,
29918,
26940,
353,
29871,
29900,
13,
9651,
1550,
954,
29918,
26940,
529,
954,
29918,
14968,
29918,
735,
29918,
546,
29918,
1990,
29901,
308,
13,
18884,
10153,
29918,
2084,
353,
2897,
29889,
2084,
29889,
7122,
29898,
25416,
29918,
9464,
29892,
14210,
29879,
22584,
29879,
29918,
29995,
29879,
29889,
29967,
4162,
29954,
29915,
1273,
313,
1990,
29918,
1807,
29892,
770,
29918,
1807,
29892,
474,
876,
13,
18884,
1596,
29898,
2492,
29918,
2084,
29897,
13,
18884,
565,
2897,
29889,
2084,
29889,
9933,
29898,
2492,
29918,
2084,
1125,
13,
462,
1678,
5445,
29898,
29990,
29918,
14968,
29892,
612,
29918,
14968,
29892,
954,
29918,
26940,
718,
313,
1949,
29918,
14968,
29918,
735,
29918,
546,
29918,
1990,
334,
770,
29918,
13140,
511,
770,
29918,
13140,
29892,
10153,
29918,
2084,
29892,
10153,
29918,
2975,
29897,
13,
462,
1678,
954,
29918,
26940,
4619,
29871,
29896,
13,
462,
1678,
1596,
29898,
1949,
29918,
26940,
29897,
13,
18884,
474,
4619,
29871,
29896,
13,
13,
9651,
954,
29918,
26940,
353,
29871,
29900,
13,
9651,
1550,
954,
29918,
26940,
529,
954,
29918,
1688,
29918,
735,
29918,
546,
29918,
1990,
29901,
308,
13,
18884,
10153,
29918,
2084,
353,
2897,
29889,
2084,
29889,
7122,
29898,
25416,
29918,
9464,
29892,
14210,
29879,
22584,
29879,
29918,
29995,
29879,
29889,
29967,
4162,
29954,
29915,
1273,
313,
1990,
29918,
1807,
29892,
770,
29918,
1807,
29892,
474,
876,
13,
18884,
565,
2897,
29889,
2084,
29889,
9933,
29898,
2492,
29918,
2084,
1125,
13,
462,
1678,
5445,
29898,
29990,
29918,
1688,
29892,
612,
29918,
1688,
29892,
954,
29918,
26940,
718,
313,
1949,
29918,
1688,
29918,
735,
29918,
546,
29918,
1990,
334,
770,
29918,
13140,
511,
770,
29918,
13140,
29892,
10153,
29918,
2084,
29892,
10153,
29918,
2975,
29897,
13,
462,
1678,
954,
29918,
26940,
4619,
29871,
29896,
13,
462,
1678,
1596,
29898,
1949,
29918,
26940,
29897,
13,
18884,
474,
4619,
29871,
29896,
13,
13,
9651,
954,
29918,
26940,
353,
29871,
29900,
13,
9651,
1550,
954,
29918,
26940,
529,
954,
29918,
3084,
29918,
735,
29918,
546,
29918,
1990,
29901,
308,
13,
18884,
10153,
29918,
2084,
353,
2897,
29889,
2084,
29889,
7122,
29898,
25416,
29918,
9464,
29892,
14210,
29879,
22584,
29879,
29918,
29995,
29879,
29889,
29967,
4162,
29954,
29915,
1273,
313,
1990,
29918,
1807,
29892,
770,
29918,
1807,
29892,
474,
876,
13,
18884,
565,
2897,
29889,
2084,
29889,
9933,
29898,
2492,
29918,
2084,
1125,
13,
462,
1678,
5445,
29898,
29990,
29918,
3084,
29892,
612,
29918,
3084,
29892,
954,
29918,
26940,
718,
313,
1949,
29918,
3084,
29918,
735,
29918,
546,
29918,
1990,
334,
770,
29918,
13140,
511,
770,
29918,
13140,
29892,
10153,
29918,
2084,
29892,
10153,
29918,
2975,
29897,
13,
462,
1678,
954,
29918,
26940,
4619,
29871,
29896,
13,
462,
1678,
1596,
29898,
1949,
29918,
26940,
29897,
13,
18884,
474,
4619,
29871,
29896,
13,
13,
4706,
1060,
29918,
14968,
353,
758,
5014,
29918,
2080,
29898,
29990,
29918,
14968,
29897,
13,
4706,
1060,
29918,
1688,
353,
758,
5014,
29918,
2080,
29898,
29990,
29918,
1688,
29897,
13,
4706,
1060,
29918,
3084,
353,
758,
5014,
29918,
2080,
29898,
29990,
29918,
3084,
29897,
13,
13,
4706,
7442,
29889,
8172,
29889,
26776,
29898,
29900,
29897,
13,
4706,
20005,
362,
29918,
13140,
353,
7442,
29889,
279,
927,
29898,
1949,
29918,
14968,
29918,
19057,
29897,
13,
4706,
7442,
29889,
8172,
29889,
845,
21897,
29898,
546,
6149,
362,
29918,
13140,
29897,
13,
4706,
1060,
29918,
14968,
353,
1060,
29918,
14968,
29961,
546,
6149,
362,
29918,
13140,
29892,
584,
29962,
13,
4706,
612,
29918,
14968,
353,
612,
29918,
14968,
29961,
546,
6149,
362,
29918,
13140,
29962,
13,
4706,
20005,
362,
29918,
13140,
353,
7442,
29889,
279,
927,
29898,
1949,
29918,
1688,
29918,
19057,
29897,
13,
4706,
7442,
29889,
8172,
29889,
845,
21897,
29898,
546,
6149,
362,
29918,
13140,
29897,
13,
4706,
1060,
29918,
1688,
353,
1060,
29918,
1688,
29961,
546,
6149,
362,
29918,
13140,
29892,
584,
29962,
13,
4706,
612,
29918,
1688,
353,
612,
29918,
1688,
29961,
546,
6149,
362,
29918,
13140,
29962,
13,
4706,
20005,
362,
29918,
13140,
353,
7442,
29889,
279,
927,
29898,
1949,
29918,
3084,
29918,
19057,
29897,
13,
4706,
7442,
29889,
8172,
29889,
845,
21897,
29898,
546,
6149,
362,
29918,
13140,
29897,
13,
4706,
1060,
29918,
3084,
353,
1060,
29918,
3084,
29961,
546,
6149,
362,
29918,
13140,
29892,
584,
29962,
13,
4706,
612,
29918,
3084,
353,
612,
29918,
3084,
29961,
546,
6149,
362,
29918,
13140,
29962,
13,
13,
4706,
7442,
29889,
7620,
29920,
29918,
510,
13120,
29898,
1272,
29918,
9507,
29892,
1060,
29918,
14968,
29922,
29990,
29918,
14968,
29892,
612,
29918,
14968,
29922,
29979,
29918,
14968,
29892,
1060,
29918,
1688,
29922,
29990,
29918,
1688,
29892,
612,
29918,
1688,
29922,
29979,
29918,
1688,
29892,
1060,
29918,
3084,
29922,
29990,
29918,
3084,
29892,
612,
29918,
3084,
29922,
29979,
29918,
3084,
29897,
13,
13,
13,
1678,
7945,
353,
3630,
2697,
29898,
29990,
29918,
14968,
29892,
612,
29918,
14968,
29897,
13,
1678,
565,
313,
29990,
29918,
3084,
338,
451,
6213,
29897,
322,
313,
29979,
29918,
3084,
338,
451,
6213,
1125,
13,
4706,
396,
8845,
353,
3630,
2697,
29898,
29990,
29918,
3084,
29892,
612,
29918,
3084,
29897,
13,
4706,
8845,
353,
6213,
13,
1678,
1683,
29901,
13,
4706,
8845,
353,
6213,
13,
13,
1678,
1243,
353,
3630,
2697,
29898,
29990,
29918,
1688,
29892,
612,
29918,
1688,
29897,
13,
13,
1678,
736,
2967,
29889,
16390,
294,
1691,
29898,
14968,
29922,
14968,
29892,
8845,
29922,
18157,
29892,
1243,
29922,
1688,
29897,
13,
13,
13,
1753,
2254,
29918,
29895,
8887,
7295,
13,
1678,
954,
29918,
305,
12629,
353,
29871,
29941,
13,
1678,
10153,
29918,
2975,
353,
29871,
29906,
29929,
29929,
13,
13,
1678,
848,
29918,
9507,
353,
2897,
29889,
2084,
29889,
7122,
29898,
25416,
29918,
9464,
29892,
525,
24713,
29918,
29895,
8887,
29889,
9302,
29920,
1495,
13,
13,
1678,
565,
2897,
29889,
2084,
29889,
9933,
29898,
1272,
29918,
9507,
1125,
13,
4706,
1596,
877,
23456,
476,
8887,
515,
8086,
856,
1495,
13,
4706,
285,
353,
7442,
29889,
1359,
29898,
1272,
29918,
9507,
29897,
13,
4706,
1060,
353,
285,
1839,
29990,
2033,
13,
4706,
612,
353,
285,
1839,
29979,
2033,
13,
1678,
1683,
29901,
13,
4706,
396,
16969,
599,
770,
29871,
29900,
13,
4706,
1596,
877,
6359,
292,
476,
8887,
515,
10650,
4558,
856,
1495,
13,
13,
4706,
1967,
29918,
5325,
353,
518,
3027,
29918,
1445,
363,
1967,
29918,
1445,
297,
2897,
29889,
1761,
3972,
29898,
359,
29889,
2084,
29889,
7122,
29898,
25416,
29918,
9464,
29892,
525,
29895,
8887,
8785,
565,
313,
3027,
29918,
1445,
29889,
1975,
2541,
12839,
6173,
8785,
29962,
13,
4706,
396,
379,
547,
304,
679,
278,
1967,
2066,
297,
278,
1492,
1797,
13,
4706,
396,
1967,
29918,
5325,
353,
518,
3027,
29918,
1445,
363,
1967,
29918,
1445,
297,
2897,
29889,
1761,
3972,
29898,
359,
29889,
2084,
29889,
7122,
29898,
25416,
29918,
9464,
29892,
525,
29895,
8887,
8785,
565,
313,
3027,
29918,
1445,
29889,
1975,
2541,
12839,
6173,
1495,
322,
451,
1967,
29918,
1445,
29889,
27382,
2541,
877,
29896,
29906,
29946,
8785,
29962,
13,
4706,
396,
1967,
29918,
5325,
4619,
518,
3027,
29918,
1445,
363,
1967,
29918,
1445,
297,
2897,
29889,
1761,
3972,
29898,
359,
29889,
2084,
29889,
7122,
29898,
25416,
29918,
9464,
29892,
525,
29895,
8887,
8785,
565,
313,
3027,
29918,
1445,
29889,
1975,
2541,
12839,
6173,
1495,
322,
1967,
29918,
1445,
29889,
27382,
2541,
877,
29896,
29906,
29946,
8785,
29962,
13,
13,
13,
4706,
954,
29918,
19057,
353,
7431,
29898,
3027,
29918,
5325,
29897,
13,
4706,
1060,
353,
7442,
29889,
3298,
359,
4197,
1949,
29918,
19057,
29892,
10153,
29918,
2975,
29892,
10153,
29918,
2975,
29892,
954,
29918,
305,
12629,
2314,
13,
4706,
612,
353,
7442,
29889,
3298,
359,
4197,
1949,
29918,
19057,
2314,
13,
13,
4706,
770,
29918,
13140,
353,
29871,
29900,
13,
4706,
363,
6795,
29892,
1967,
29918,
1445,
297,
26985,
29898,
3027,
29918,
5325,
1125,
13,
9651,
10153,
29918,
2084,
353,
2897,
29889,
2084,
29889,
7122,
29898,
25416,
29918,
9464,
29892,
525,
29895,
8887,
742,
1967,
29918,
1445,
29897,
13,
9651,
5445,
29898,
29990,
29892,
612,
29892,
6795,
29892,
770,
29918,
13140,
29892,
10153,
29918,
2084,
29892,
10153,
29918,
2975,
29897,
13,
13,
4706,
1060,
353,
758,
5014,
29918,
2080,
29898,
29990,
29897,
13,
13,
4706,
7442,
29889,
7620,
29920,
29898,
1272,
29918,
9507,
29892,
1060,
29922,
29990,
29892,
612,
29922,
29979,
29897,
13,
13,
1678,
736,
1060,
29892,
612,
13,
268,
13,
13,
1753,
2254,
29918,
26169,
15161,
29918,
2541,
29918,
29895,
8887,
7295,
308,
13,
1678,
4413,
353,
6024,
26169,
742,
525,
15161,
2033,
13,
1678,
1060,
29918,
1688,
29892,
612,
29918,
1688,
353,
2254,
29918,
29895,
8887,
580,
13,
13,
1678,
848,
29918,
7224,
353,
2254,
29918,
11576,
1338,
29898,
1949,
29918,
14968,
29918,
735,
29918,
546,
29918,
1990,
29922,
29929,
29900,
29900,
29892,
29871,
13,
462,
954,
29918,
1688,
29918,
735,
29918,
546,
29918,
1990,
29922,
29941,
29900,
29900,
29892,
13,
462,
954,
29918,
3084,
29918,
735,
29918,
546,
29918,
1990,
29922,
29900,
29892,
13,
462,
4413,
29922,
13203,
29897,
13,
1678,
7945,
353,
848,
29918,
7224,
29889,
14968,
13,
1678,
8845,
353,
848,
29918,
7224,
29889,
18157,
13,
1678,
1243,
353,
3630,
2697,
29898,
29990,
29918,
1688,
29892,
612,
29918,
1688,
29897,
13,
13,
1678,
736,
2967,
29889,
16390,
294,
1691,
29898,
14968,
29922,
14968,
29892,
8845,
29922,
18157,
29892,
1243,
29922,
1688,
29897,
13,
13,
13,
1753,
2254,
29918,
26169,
15161,
29918,
2541,
29918,
12683,
29918,
392,
29918,
29895,
8887,
7295,
13,
1678,
4413,
353,
6024,
26169,
742,
525,
15161,
2033,
13,
1678,
1060,
29918,
1688,
29892,
612,
29918,
1688,
353,
2254,
29918,
29895,
8887,
580,
13,
1678,
1060,
29918,
1688,
353,
7442,
29889,
690,
14443,
29898,
29990,
29918,
1688,
29892,
313,
29990,
29918,
1688,
29889,
12181,
29961,
29900,
1402,
448,
29896,
876,
13,
13,
1678,
848,
29918,
7224,
353,
2254,
29918,
11576,
1338,
29898,
1949,
29918,
14968,
29918,
735,
29918,
546,
29918,
1990,
29922,
29929,
29900,
29900,
29892,
29871,
13,
462,
954,
29918,
1688,
29918,
735,
29918,
546,
29918,
1990,
29922,
29941,
29900,
29900,
29892,
13,
462,
954,
29918,
3084,
29918,
735,
29918,
546,
29918,
1990,
29922,
29900,
29892,
13,
462,
4413,
29922,
13203,
29897,
13,
1678,
7945,
353,
848,
29918,
7224,
29889,
14968,
13,
1678,
8845,
353,
848,
29918,
7224,
29889,
18157,
13,
13,
1678,
1243,
353,
3630,
2697,
29898,
13,
4706,
7442,
29889,
535,
29883,
2579,
403,
3552,
1272,
29918,
7224,
29889,
1688,
29889,
29916,
29892,
1060,
29918,
1688,
511,
9685,
29922,
29900,
511,
29871,
13,
4706,
7442,
29889,
535,
29883,
2579,
403,
3552,
1272,
29918,
7224,
29889,
1688,
29889,
21134,
29892,
612,
29918,
1688,
511,
9685,
29922,
29900,
876,
13,
13,
1678,
736,
2967,
29889,
16390,
294,
1691,
29898,
14968,
29922,
14968,
29892,
8845,
29922,
18157,
29892,
1243,
29922,
1688,
29897,
13,
13,
2
] |
2021-04-Python-SEA-ENGRSL-Workshops/Workshop_2-Python-in-Data/s02b_Differences.py | shawnduong/manimations | 0 | 142661 | <reponame>shawnduong/manimations
from manim import *
class s02b_Differences(Scene):
def construct(self):
# Actors and scaling.
subtitleA = Text("While loops are condition based,").scale(0.75)
subtitleB = Text("and for loops are iteration based.").scale(0.75)
# Positioning.
subtitleA.shift(0.25*UP)
subtitleB.next_to(subtitleA, DOWN)
# Animations.
actors = [subtitleA, subtitleB]
self.play(Write(subtitleA))
self.play(Write(subtitleB))
# Cleanup.
self.wait(3)
self.play(*[FadeOut(actor) for actor in actors])
| [
1,
529,
276,
1112,
420,
29958,
845,
1450,
299,
29884,
549,
29914,
1171,
326,
800,
13,
3166,
767,
326,
1053,
334,
13,
13,
1990,
269,
29900,
29906,
29890,
29918,
29928,
8349,
2063,
29898,
23472,
1125,
13,
13,
12,
1753,
3386,
29898,
1311,
1125,
13,
13,
12,
12,
29937,
3185,
943,
322,
21640,
29889,
13,
13,
12,
12,
1491,
3257,
29909,
353,
3992,
703,
8809,
488,
12104,
526,
4195,
2729,
1699,
467,
7052,
29898,
29900,
29889,
29955,
29945,
29897,
13,
12,
12,
1491,
3257,
29933,
353,
3992,
703,
392,
363,
12104,
526,
12541,
2729,
1213,
467,
7052,
29898,
29900,
29889,
29955,
29945,
29897,
13,
13,
12,
12,
29937,
20627,
292,
29889,
13,
13,
12,
12,
1491,
3257,
29909,
29889,
10889,
29898,
29900,
29889,
29906,
29945,
29930,
4897,
29897,
13,
12,
12,
1491,
3257,
29933,
29889,
4622,
29918,
517,
29898,
1491,
3257,
29909,
29892,
360,
9806,
29940,
29897,
13,
13,
12,
12,
29937,
24980,
800,
29889,
13,
13,
12,
12,
627,
943,
353,
518,
1491,
3257,
29909,
29892,
1014,
3257,
29933,
29962,
13,
13,
12,
12,
1311,
29889,
1456,
29898,
6113,
29898,
1491,
3257,
29909,
876,
13,
12,
12,
1311,
29889,
1456,
29898,
6113,
29898,
1491,
3257,
29933,
876,
13,
13,
12,
12,
29937,
315,
14044,
786,
29889,
13,
13,
12,
12,
1311,
29889,
10685,
29898,
29941,
29897,
13,
12,
12,
1311,
29889,
1456,
10456,
29961,
29943,
1943,
3744,
29898,
7168,
29897,
363,
11339,
297,
29701,
2314,
13,
13,
2
] |
reliabilly/tests/monitor_clients/test_data_monitoring_client.py | corpseware/reliabilly | 1 | 161526 | # pylint: disable=invalid-name,no-self-use
import unittest
from unittest import skipUnless
from unittest.mock import MagicMock
from reliabilly.components.tools.data_monitoring_client import DataMonitoringClient
from reliabilly.settings import Settings, Constants
class DataMonitoringClientTests(unittest.TestCase):
def test_generate_payload(self):
payload = DataMonitoringClient.generate_payload(
"99", "Updating", "on fire", "http://pipeline.com", "https://fresh.customgit.com")
expected = {
"eventType": "ReleaseEvent",
"environment": "on fire",
"build_status": "updating",
"release_number": "99",
"git_repo": "https://fresh.customgit.com",
"build_pipeline": "http://pipeline.com",
}
self.assertEqual(payload, expected)
def test_create_event(self):
mock = MagicMock()
client = DataMonitoringClient(mock, mock)
result = client.create_event("1", "nice", "cool", "http://test.com", "https://fresh.customgit.com")
self.assertTrue(result)
def test_create_event_failure(self):
mock = MagicMock()
mock.create_event.return_value = False
client = DataMonitoringClient(mock, mock)
result = client.create_event("1", "nice", "cool", "http://test.com", "https://fresh.customgit.com")
self.assertFalse(result)
@skipUnless(Settings.RUN_SKIPPED, Constants.RUN_SKIPPED_MSG)
def test_real_create_event(self):
client = DataMonitoringClient('NEW_RELIC_API_KEY')
client.create_event("123", "TESTING", "LOCAL", "http://hi.com", "http://test.net")
| [
1,
396,
282,
2904,
524,
29901,
11262,
29922,
20965,
29899,
978,
29892,
1217,
29899,
1311,
29899,
1509,
13,
5215,
443,
27958,
13,
3166,
443,
27958,
1053,
14383,
2525,
2222,
13,
3166,
443,
27958,
29889,
17640,
1053,
26494,
18680,
13,
3166,
12536,
4427,
368,
29889,
14036,
29889,
8504,
29889,
1272,
29918,
3712,
2105,
292,
29918,
4645,
1053,
3630,
7185,
2105,
292,
4032,
13,
3166,
12536,
4427,
368,
29889,
11027,
1053,
19215,
29892,
5798,
1934,
13,
13,
13,
1990,
3630,
7185,
2105,
292,
4032,
24376,
29898,
348,
27958,
29889,
3057,
8259,
1125,
13,
13,
1678,
822,
1243,
29918,
17158,
29918,
23813,
29898,
1311,
1125,
13,
4706,
20092,
353,
3630,
7185,
2105,
292,
4032,
29889,
17158,
29918,
23813,
29898,
13,
9651,
376,
29929,
29929,
613,
376,
3373,
26747,
613,
376,
265,
3974,
613,
376,
1124,
597,
13096,
5570,
29889,
510,
613,
376,
991,
597,
29888,
3781,
29889,
6341,
5559,
29889,
510,
1159,
13,
4706,
3806,
353,
426,
13,
9651,
376,
3696,
1542,
1115,
376,
19729,
2624,
613,
13,
9651,
376,
20944,
1115,
376,
265,
3974,
613,
13,
9651,
376,
4282,
29918,
4882,
1115,
376,
786,
26747,
613,
13,
9651,
376,
14096,
29918,
4537,
1115,
376,
29929,
29929,
613,
13,
9651,
376,
5559,
29918,
20095,
1115,
376,
991,
597,
29888,
3781,
29889,
6341,
5559,
29889,
510,
613,
13,
9651,
376,
4282,
29918,
13096,
5570,
1115,
376,
1124,
597,
13096,
5570,
29889,
510,
613,
13,
4706,
500,
13,
4706,
1583,
29889,
9294,
9843,
29898,
23813,
29892,
3806,
29897,
13,
13,
1678,
822,
1243,
29918,
3258,
29918,
3696,
29898,
1311,
1125,
13,
4706,
11187,
353,
26494,
18680,
580,
13,
4706,
3132,
353,
3630,
7185,
2105,
292,
4032,
29898,
17640,
29892,
11187,
29897,
13,
4706,
1121,
353,
3132,
29889,
3258,
29918,
3696,
703,
29896,
613,
376,
16533,
613,
376,
1111,
324,
613,
376,
1124,
597,
1688,
29889,
510,
613,
376,
991,
597,
29888,
3781,
29889,
6341,
5559,
29889,
510,
1159,
13,
4706,
1583,
29889,
9294,
5574,
29898,
2914,
29897,
13,
13,
1678,
822,
1243,
29918,
3258,
29918,
3696,
29918,
14057,
545,
29898,
1311,
1125,
13,
4706,
11187,
353,
26494,
18680,
580,
13,
4706,
11187,
29889,
3258,
29918,
3696,
29889,
2457,
29918,
1767,
353,
7700,
13,
4706,
3132,
353,
3630,
7185,
2105,
292,
4032,
29898,
17640,
29892,
11187,
29897,
13,
4706,
1121,
353,
3132,
29889,
3258,
29918,
3696,
703,
29896,
613,
376,
16533,
613,
376,
1111,
324,
613,
376,
1124,
597,
1688,
29889,
510,
613,
376,
991,
597,
29888,
3781,
29889,
6341,
5559,
29889,
510,
1159,
13,
4706,
1583,
29889,
9294,
8824,
29898,
2914,
29897,
13,
13,
1678,
732,
11014,
2525,
2222,
29898,
9585,
29889,
29934,
3904,
29918,
16033,
5690,
29925,
3352,
29892,
5798,
1934,
29889,
29934,
3904,
29918,
16033,
5690,
29925,
3352,
29918,
4345,
29954,
29897,
13,
1678,
822,
1243,
29918,
6370,
29918,
3258,
29918,
3696,
29898,
1311,
1125,
13,
4706,
3132,
353,
3630,
7185,
2105,
292,
4032,
877,
28577,
29918,
1525,
27888,
29918,
8787,
29918,
10818,
1495,
13,
4706,
3132,
29889,
3258,
29918,
3696,
703,
29896,
29906,
29941,
613,
376,
18267,
4214,
613,
376,
16652,
1964,
613,
376,
1124,
597,
2918,
29889,
510,
613,
376,
1124,
597,
1688,
29889,
1212,
1159,
13,
2
] |
proxy/core/tls/certificate.py | fisabiliyusri/proxy | 0 | 15113 | # -*- coding: utf-8 -*-
"""
proxy.py
~~~~~~~~
⚡⚡⚡ Fast, Lightweight, Pluggable, TLS interception capable proxy server focused on
Network monitoring, controls & Application development, testing, debugging.
:copyright: (c) 2013-present by <NAME> and contributors.
:license: BSD, see LICENSE for more details.
"""
from typing import Tuple, Optional
class TlsCertificate:
"""TLS Certificate"""
def __init__(self) -> None:
self.data: Optional[bytes] = None
def parse(self, raw: bytes) -> Tuple[bool, bytes]:
self.data = raw
return True, raw
def build(self) -> bytes:
assert self.data
return self.data
class TlsCertificateRequest:
"""TLS Certificate Request"""
def __init__(self) -> None:
self.data: Optional[bytes] = None
def parse(self, raw: bytes) -> Tuple[bool, bytes]:
return False, raw
def build(self) -> bytes:
assert self.data
return self.data
class TlsCertificateVerify:
"""TLS Certificate Verify"""
def __init__(self) -> None:
self.data: Optional[bytes] = None
def parse(self, raw: bytes) -> Tuple[bool, bytes]:
return False, raw
def build(self) -> bytes:
assert self.data
return self.data
| [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
15945,
29908,
13,
1678,
10166,
29889,
2272,
13,
1678,
3695,
14087,
7377,
30022,
13,
268,
229,
157,
164,
229,
157,
164,
229,
157,
164,
23786,
29892,
12790,
7915,
29892,
1858,
12981,
519,
29892,
27658,
1006,
1441,
15390,
10166,
1923,
21309,
373,
13,
1678,
8527,
29652,
29892,
11761,
669,
8427,
5849,
29892,
6724,
29892,
13490,
29889,
13,
13,
1678,
584,
8552,
1266,
29901,
313,
29883,
29897,
29871,
29906,
29900,
29896,
29941,
29899,
6338,
491,
529,
5813,
29958,
322,
17737,
29560,
29889,
13,
1678,
584,
506,
1947,
29901,
350,
7230,
29892,
1074,
365,
2965,
1430,
1660,
363,
901,
4902,
29889,
13,
15945,
29908,
13,
3166,
19229,
1053,
12603,
552,
29892,
28379,
13,
13,
13,
1990,
323,
3137,
20455,
8021,
29901,
13,
1678,
9995,
29911,
8547,
18410,
8021,
15945,
29908,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29897,
1599,
6213,
29901,
13,
4706,
1583,
29889,
1272,
29901,
28379,
29961,
13193,
29962,
353,
6213,
13,
13,
1678,
822,
6088,
29898,
1311,
29892,
10650,
29901,
6262,
29897,
1599,
12603,
552,
29961,
11227,
29892,
6262,
5387,
13,
4706,
1583,
29889,
1272,
353,
10650,
13,
4706,
736,
5852,
29892,
10650,
13,
13,
1678,
822,
2048,
29898,
1311,
29897,
1599,
6262,
29901,
13,
4706,
4974,
1583,
29889,
1272,
13,
4706,
736,
1583,
29889,
1272,
13,
13,
13,
1990,
323,
3137,
20455,
8021,
3089,
29901,
13,
1678,
9995,
29911,
8547,
18410,
8021,
10729,
15945,
29908,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29897,
1599,
6213,
29901,
13,
4706,
1583,
29889,
1272,
29901,
28379,
29961,
13193,
29962,
353,
6213,
13,
13,
1678,
822,
6088,
29898,
1311,
29892,
10650,
29901,
6262,
29897,
1599,
12603,
552,
29961,
11227,
29892,
6262,
5387,
13,
4706,
736,
7700,
29892,
10650,
13,
13,
1678,
822,
2048,
29898,
1311,
29897,
1599,
6262,
29901,
13,
4706,
4974,
1583,
29889,
1272,
13,
4706,
736,
1583,
29889,
1272,
13,
13,
13,
1990,
323,
3137,
20455,
8021,
6565,
1598,
29901,
13,
1678,
9995,
29911,
8547,
18410,
8021,
1798,
1598,
15945,
29908,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29897,
1599,
6213,
29901,
13,
4706,
1583,
29889,
1272,
29901,
28379,
29961,
13193,
29962,
353,
6213,
13,
13,
1678,
822,
6088,
29898,
1311,
29892,
10650,
29901,
6262,
29897,
1599,
12603,
552,
29961,
11227,
29892,
6262,
5387,
13,
4706,
736,
7700,
29892,
10650,
13,
13,
1678,
822,
2048,
29898,
1311,
29897,
1599,
6262,
29901,
13,
4706,
4974,
1583,
29889,
1272,
13,
4706,
736,
1583,
29889,
1272,
13,
2
] |
src/pss_crew.py | herzbube/YaDc | 0 | 139634 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
import discord
import os
from typing import Dict, List, Set, Tuple
from cache import PssCache
import emojis
import pss_assert
import pss_entity as entity
import pss_core as core
import pss_lookups as lookups
import settings
import utility as util
# ---------- Constants ----------
CHARACTER_DESIGN_BASE_PATH = 'CharacterService/ListAllCharacterDesigns2?languageKey=en'
CHARACTER_DESIGN_KEY_NAME = 'CharacterDesignId'
CHARACTER_DESIGN_DESCRIPTION_PROPERTY_NAME = 'CharacterDesignName'
COLLECTION_DESIGN_BASE_PATH = 'CollectionService/ListAllCollectionDesigns?languageKey=en'
COLLECTION_DESIGN_KEY_NAME = 'CollectionDesignId'
COLLECTION_DESIGN_DESCRIPTION_PROPERTY_NAME = 'CollectionName'
__PRESTIGE_FROM_BASE_PATH = f'CharacterService/PrestigeCharacterFrom?languagekey=en&characterDesignId='
__PRESTIGE_TO_BASE_PATH = f'CharacterService/PrestigeCharacterTo?languagekey=en&characterDesignId='
# ---------- Initilization ----------
__prestige_from_cache_dict = {}
__prestige_to_cache_dict = {}
# ---------- Classes ----------
class CharDesignDetails(entity.EntityDesignDetails):
def __init__(self, char_design_info: dict, collections_designs_data: dict = None, level: int = None):
special = _get_ability_name(char_design_info)
equipment_slots = _convert_equipment_mask(int(char_design_info['EquipmentMask']))
collection_name = _get_collection_name(char_design_info, collections_designs_data)
walk_speed = char_design_info['WalkingSpeed']
run_speed = char_design_info['RunSpeed']
ability = _get_stat('SpecialAbilityArgument', level, char_design_info)
if special:
ability += f' ({special})'
self.__ability: str = ability
self.__collection_name: str = collection_name
self.__equipment_slots: str = equipment_slots
self.__gender: str = char_design_info['GenderType']
self.__level: int = level
self.__race: str = char_design_info['RaceType']
self.__rarity: str = char_design_info['Rarity']
self.__speed: str = f'{walk_speed}/{run_speed}'
self.__stat_attack: str = _get_stat('Attack', level, char_design_info)
self.__stat_engine: str = _get_stat('Engine', level, char_design_info)
self.__stat_fire_resistance: str = char_design_info['FireResistance']
self.__stat_hp: str = _get_stat('Hp', level, char_design_info)
self.__stat_pilot: str = _get_stat('Pilot', level, char_design_info)
self.__stat_repair: str = _get_stat('Repair', level, char_design_info)
self.__stat_science: str = _get_stat('Science', level, char_design_info)
self.__stat_weapon: str = _get_stat('Weapon', level, char_design_info)
self.__training_capacity: str = char_design_info['TrainingCapacity']
details_long: List[Tuple[str, str]] = [
('Level', self.__level),
('Rarity', self.__rarity),
('Race', self.__race),
('Collection', self.__collection_name),
('Gender', self.__gender),
('Ability', self.__ability),
('HP', self.__stat_hp),
('Attack', self.__stat_attack),
('Repair', self.__stat_repair),
('Pilot', self.__stat_pilot),
('Science', self.__stat_science),
('Engine', self.__stat_engine),
('Weapon', self.__stat_weapon),
('Walk/run speed', self.__speed),
('Fire resist', self.__stat_fire_resistance),
('Training cap', self.__training_capacity),
('Slots', self.__equipment_slots)
]
details_short: List[Tuple[str, str, bool]] = [
('Rarity', self.__rarity, False),
('Ability', self.__ability, True),
('Collection', self.__collection_name, True)
]
super().__init__(
name=char_design_info[CHARACTER_DESIGN_DESCRIPTION_PROPERTY_NAME],
description=char_design_info['CharacterDesignDescription'],
details_long=details_long,
details_short=details_short
)
@property
def ability(self) -> str:
return self.__ability
@property
def attack(self) -> str:
return self.__stat_attack
@property
def collection_name(self) -> str:
return self.__collection_name
@property
def engine(self) -> str:
return self.__stat_engine
@property
def equipment_slots(self) -> str:
return self.__equipment_slots
@property
def fire_resistance(self) -> str:
return self.__stat_fire_resistance
@property
def gender(self) -> str:
return self.__gender
@property
def hp(self) -> str:
return self.__stat_hp
@property
def level(self) -> int:
return self.__level
@property
def pilot(self) -> str:
return self.__stat_pilot
@property
def race(self) -> str:
return self.__race
@property
def rarity(self) -> str:
return self.__rarity
@property
def repair(self) -> str:
return self.__stat_repair
@property
def science(self) -> str:
return self.__stat_science
@property
def speed(self) -> str:
return self.__speed
@property
def training_capacity(self) -> str:
return self.__training_capacity
@property
def weapon(self) -> str:
return self.__stat_weapon
class CollectionDesignDetails(entity.EntityDesignDetails):
def __init__(self, collection_design_info: dict):
collection_crew = _get_collection_chars_designs_infos(collection_design_info)
collection_perk = collection_design_info['EnhancementType']
collection_perk = lookups.COLLECTION_PERK_LOOKUP.get(collection_design_info['EnhancementType'], collection_design_info['EnhancementType'])
min_combo = collection_design_info['MinCombo']
max_combo = collection_design_info['MaxCombo']
base_enhancement_value = collection_design_info['BaseEnhancementValue']
step_enhancement_value = collection_design_info['StepEnhancementValue']
self.__characters: str = ', '.join(collection_crew)
self.__min_max_combo = f'{min_combo}...{max_combo}'
self.__enhancement = f'{base_enhancement_value} (Base), {step_enhancement_value} (Step)'
details_long: List[Tuple[str, str]] = [
('Combo Min...Max', self.__min_max_combo),
(collection_perk, self.__enhancement),
('Characters', self.__characters)
]
details_short: List[Tuple[str, str, bool]] = [
]
super().__init__(
name=collection_design_info[COLLECTION_DESIGN_DESCRIPTION_PROPERTY_NAME],
description=collection_design_info['CollectionDescription'],
details_long=details_long,
details_short=details_short,
hyperlink='https://pixelstarships.fandom.com/wiki/Category:Crew_Collections'
)
@property
def characters(self) -> str:
return self.__characters
@property
def min_max_combo(self) -> str:
return self.__min_max_combo
@property
def enhancement(self) -> str:
return self.__enhancement
class PrestigeDetails(entity.EntityDesignDetails):
def __init__(self, char_design_info: dict, prestige_infos: Dict[str, List[str]], error_message: str, title_template: str, sub_title_template: str):
self.__char_design_name: str = char_design_info[CHARACTER_DESIGN_DESCRIPTION_PROPERTY_NAME]
self.__count: int = sum([len(prestige_partners) for prestige_partners in prestige_infos.values()])
self.__error: str = error_message
self.__prestige_infos: Dict[str, List[str]] = prestige_infos
self.__title_template: str = title_template or '**$char_design_name$** has **$count$** combinations:'
self.__sub_title_template: str = sub_title_template or '**$char_design_name$**:'
@property
def char_design_name(self) -> str:
return self.__char_design_name
@property
def count(self) -> int:
return self.__count
@property
def error(self) -> str:
return self.__error
@property
def prestige_infos(self) -> Dict[str, List[str]]:
return self.__prestige_infos
@property
def title(self) -> str:
result = self.__title_template
result = result.replace('$char_design_name$', self.char_design_name)
result = result.replace('$count$', str(self.count))
return result
def get_details_as_embed(self) -> discord.Embed:
return None
def get_details_as_text_long(self) -> List[str]:
result = [self.title]
if self.error:
result.append(self.error)
else:
for char_design_name in sorted(list(self.prestige_infos.keys())):
prestige_partners = sorted(self.prestige_infos[char_design_name])
result.append(self._get_sub_title(char_design_name))
result.append(f'> {", ".join(prestige_partners)}')
return result
def get_details_as_text_short(self) -> List[str]:
return self.get_details_as_text_long()
def _get_sub_title(self, char_design_name: str) -> str:
result = self.__sub_title_template.replace('$char_design_name$', char_design_name)
return result
class PrestigeFromDetails(PrestigeDetails):
def __init__(self, char_from_design_info: dict, chars_designs_data: dict = None, prestige_from_data: dict = None):
chars_designs_data = chars_designs_data or character_designs_retriever.get_data_dict3()
error = None
prestige_infos = {}
template_title = '**$char_design_name$** has **$count$** prestige combinations:'
template_subtitle = 'To **$char_design_name$** with:'
if prestige_from_data:
for value in prestige_from_data.values():
char_info_2_name = chars_designs_data[value['CharacterDesignId2']][CHARACTER_DESIGN_DESCRIPTION_PROPERTY_NAME]
char_info_to_name = chars_designs_data[value['ToCharacterDesignId']][CHARACTER_DESIGN_DESCRIPTION_PROPERTY_NAME]
prestige_infos.setdefault(char_info_to_name, []).append(char_info_2_name)
else:
if char_from_design_info['Rarity'] == 'Special':
error = 'One cannot prestige **Special** crew.'
elif char_from_design_info['Rarity'] == 'Legendary':
error = 'One cannot prestige **Legendary** crew.'
else:
error = 'noone'
super().__init__(char_from_design_info, prestige_infos, error, template_title, template_subtitle)
class PrestigeToDetails(PrestigeDetails):
def __init__(self, char_to_design_info: dict, chars_designs_data: dict = None, prestige_to_data: dict = None):
chars_designs_data = chars_designs_data or character_designs_retriever.get_data_dict3()
error = None
prestige_infos = {}
template_title = '**$char_design_name$** has **$count$** prestige recipes:'
template_subtitle = '**$char_design_name$** with:'
if prestige_to_data:
prestige_recipes: Dict[str, Set[str]] = {}
for value in prestige_to_data.values():
char_1_design_name = chars_designs_data[value['CharacterDesignId1']][CHARACTER_DESIGN_DESCRIPTION_PROPERTY_NAME]
char_2_design_name = chars_designs_data[value['CharacterDesignId2']][CHARACTER_DESIGN_DESCRIPTION_PROPERTY_NAME]
prestige_recipes.setdefault(char_1_design_name, set()).add(char_2_design_name)
prestige_recipes.setdefault(char_2_design_name, set()).add(char_1_design_name)
prestige_recipe_ingredients: List[Tuple[str, Set[str]]] = [(char_design_name, prestige_partners) for char_design_name, prestige_partners in prestige_recipes.items()]
prestige_infos: Dict[str, List[str]] = {}
while prestige_recipe_ingredients:
prestige_recipe_ingredients = sorted(prestige_recipe_ingredients, key=lambda t: len(t[1]), reverse=True)
(char_design_name, prestige_partners) = prestige_recipe_ingredients[0]
prestige_infos[char_design_name] = list(prestige_partners)
prestige_recipe_ingredients = PrestigeToDetails._update_prestige_recipe_ingredients(prestige_recipe_ingredients)
else:
if char_to_design_info['Rarity'] == 'Special':
error = 'One cannot prestige to **Special** crew.'
elif char_to_design_info['Rarity'] == 'Common':
error = 'One cannot prestige to **Common** crew.'
else:
error = 'noone'
super().__init__(char_to_design_info, prestige_infos, error, template_title, template_subtitle)
@staticmethod
def _update_prestige_recipe_ingredients(prestige_recipe_ingredients: List[Tuple[str, Set[str]]]) -> List[Tuple[str, Set[str]]]:
result: List[Tuple[str, Set[str]]] = []
# Take 1st char name & prestige partners
# Remove that pair from the result
# Iterate through
(base_char_design_name, base_prestige_partners) = prestige_recipe_ingredients[0]
for (char_design_name, prestige_partners) in prestige_recipe_ingredients[1:]:
if base_char_design_name in prestige_partners and char_design_name in base_prestige_partners:
prestige_partners = [x for x in prestige_partners if x != base_char_design_name]
if prestige_partners:
result.append((char_design_name, prestige_partners))
return result
# ---------- Helper functions ----------
def _convert_equipment_mask(equipment_mask: int) -> str:
result = []
for k in lookups.EQUIPMENT_MASK_LOOKUP.keys():
if (equipment_mask & k) != 0:
result.append(lookups.EQUIPMENT_MASK_LOOKUP[k])
if result:
return ', '.join(result)
else:
return '-'
def _get_ability_name(char_design_info: dict) -> str:
if char_design_info:
special = char_design_info['SpecialAbilityType']
if special in lookups.SPECIAL_ABILITIES_LOOKUP.keys():
return lookups.SPECIAL_ABILITIES_LOOKUP[special]
return None
def _get_collection_chars_designs_infos(collection_design_info: Dict[str, str]) -> list:
collection_id = collection_design_info[COLLECTION_DESIGN_KEY_NAME]
chars_designs_data = character_designs_retriever.get_data_dict3()
chars_designs_infos = [chars_designs_data[char_id] for char_id in chars_designs_data.keys() if chars_designs_data[char_id][COLLECTION_DESIGN_KEY_NAME] == collection_id]
result = [char_design_info[CHARACTER_DESIGN_DESCRIPTION_PROPERTY_NAME] for char_design_info in chars_designs_infos]
result.sort()
return result
def _get_collection_name(char_design_info: dict, collections_designs_data: dict = None) -> str:
if char_design_info:
collection_id = char_design_info[COLLECTION_DESIGN_KEY_NAME]
if collection_id and collection_id != '0':
collection_design_info = collection_designs_retriever.get_entity_design_info_by_id(collection_id)
return collection_design_info[COLLECTION_DESIGN_DESCRIPTION_PROPERTY_NAME]
return None
def _get_stat(stat_name: str, level: int, char_design_info: dict) -> str:
is_special_stat = stat_name.lower().startswith('specialability')
if is_special_stat:
max_stat_name = 'SpecialAbilityFinalArgument'
else:
max_stat_name = f'Final{stat_name}'
min_value = float(char_design_info[stat_name])
max_value = float(char_design_info[max_stat_name])
progression_type = char_design_info['ProgressionType']
result = _get_stat_value(min_value, max_value, level, progression_type)
return result
def _get_stat_value(min_value: float, max_value: float, level: int, progression_type: str) -> str:
if level is None or level < 1 or level > 40:
return f'{min_value:0.1f} - {max_value:0.1f}'
else:
return f'{_calculate_stat_value(min_value, max_value, level, progression_type):0.1f}'
def _calculate_stat_value(min_value: float, max_value: float, level: int, progression_type: str) -> float:
exponent = lookups.PROGRESSION_TYPES[progression_type]
result = min_value + (max_value - min_value) * ((level - 1) / 39) ** exponent
return result
# ---------- Crew info ----------
def get_char_design_details_by_id(char_design_id: str, level: int, chars_designs_data: dict = None, collections_designs_data: dict = None) -> CharDesignDetails:
if char_design_id:
if chars_designs_data is None:
chars_designs_data = character_designs_retriever.get_data_dict3()
if char_design_id and char_design_id in chars_designs_data.keys():
char_design_info = chars_designs_data[char_design_id]
char_design_details = CharDesignDetails(char_design_info, collections_designs_data=collections_designs_data, level=level)
return char_design_details
return None
def get_char_design_details_by_name(char_name: str, level: int, as_embed: bool = settings.USE_EMBEDS):
pss_assert.valid_entity_name(char_name, 'char_name')
pss_assert.parameter_is_valid_integer(level, 'level', min_value=1, max_value=40, allow_none=True)
char_design_info = character_designs_retriever.get_entity_design_info_by_name(char_name)
if char_design_info is None:
return [f'Could not find a crew named **{char_name}**.'], False
else:
char_design_details = CharDesignDetails(char_design_info, level=level)
if as_embed:
return char_design_details.get_details_as_embed(), True
else:
return char_design_details.get_details_as_text_long(), True
# ---------- Collection Info ----------
def get_collection_design_details_by_name(collection_name: str, as_embed: bool = settings.USE_EMBEDS):
pss_assert.valid_entity_name(collection_name)
collection_design_info = collection_designs_retriever.get_entity_design_info_by_name(collection_name)
if collection_design_info is None:
return [f'Could not find a collection named **{collection_name}**.'], False
else:
collection_design_details = CollectionDesignDetails(collection_design_info)
if as_embed:
return collection_design_details.get_details_as_embed(), True
else:
return collection_design_details.get_details_as_text_long(), True
# ---------- Prestige from Info ----------
def get_prestige_from_info(char_name: str, as_embed: bool = settings.USE_EMBEDS):
pss_assert.valid_entity_name(char_name)
chars_designs_data = character_designs_retriever.get_data_dict3()
char_from_design_info = character_designs_retriever.get_entity_design_info_by_name(char_name, entity_designs_data=chars_designs_data)
if not char_from_design_info:
return [f'Could not find a crew named **{char_name}**.'], False
else:
prestige_from_data = _get_prestige_from_data(char_from_design_info)
prestige_from_details = PrestigeFromDetails(char_from_design_info, chars_designs_data=chars_designs_data, prestige_from_data=prestige_from_data)
if as_embed:
return prestige_from_details.get_details_as_embed(), True
else:
return prestige_from_details.get_details_as_text_long(), True
def _get_prestige_from_data(char_design_info: dict) -> dict:
if not char_design_info:
return {}
char_design_id = char_design_info[CHARACTER_DESIGN_KEY_NAME]
if char_design_id in __prestige_from_cache_dict.keys():
prestige_from_cache = __prestige_from_cache_dict[char_design_id]
else:
prestige_from_cache = _create_and_add_prestige_from_cache(char_design_id)
return prestige_from_cache.get_data_dict3()
def _create_and_add_prestige_from_cache(char_design_id: str) -> PssCache:
cache = _create_prestige_from_cache(char_design_id)
__prestige_from_cache_dict[char_design_id] = cache
return cache
def _create_prestige_from_cache(char_design_id: str) -> PssCache:
url = f'{__PRESTIGE_FROM_BASE_PATH}{char_design_id}'
name = f'PrestigeFrom{char_design_id}'
result = PssCache(url, name, None)
return result
# ---------- Prestige to Info ----------
def get_prestige_to_info(char_name: str, as_embed: bool = settings.USE_EMBEDS):
pss_assert.valid_entity_name(char_name)
chars_designs_data = character_designs_retriever.get_data_dict3()
char_to_design_info = character_designs_retriever.get_entity_design_info_by_name(char_name, entity_designs_data=chars_designs_data)
if not char_to_design_info:
return [f'Could not find a crew named **{char_name}**.'], False
else:
prestige_to_data = _get_prestige_to_data(char_to_design_info)
prestige_to_details = PrestigeToDetails(char_to_design_info, chars_designs_data=chars_designs_data, prestige_to_data=prestige_to_data)
if as_embed:
return prestige_to_details.get_details_as_embed(), True
else:
return prestige_to_details.get_details_as_text_long(), True
def _get_prestige_to_data(char_design_info: dict) -> dict:
if not char_design_info:
return {}
char_design_id = char_design_info[CHARACTER_DESIGN_KEY_NAME]
if char_design_id in __prestige_to_cache_dict.keys():
prestige_to_cache = __prestige_to_cache_dict[char_design_id]
else:
prestige_to_cache = _create_and_add_prestige_to_cache(char_design_id)
return prestige_to_cache.get_data_dict3()
def _create_and_add_prestige_to_cache(char_design_id: str) -> PssCache:
cache = _create_prestige_to_cache(char_design_id)
__prestige_to_cache_dict[char_design_id] = cache
return cache
def _create_prestige_to_cache(char_design_id: str) -> PssCache:
url = f'{__PRESTIGE_TO_BASE_PATH}{char_design_id}'
name = f'PrestigeTo{char_design_id}'
result = PssCache(url, name, None)
return result
# ---------- Level Info ----------
def get_level_costs(from_level: int, to_level: int = None) -> list:
# If to_level: assert that to_level > from_level and <= 41
# Else: swap both, set from_level = 1
if to_level:
pss_assert.parameter_is_valid_integer(from_level, 'from_level', 1, to_level - 1)
pss_assert.parameter_is_valid_integer(to_level, 'to_level', from_level + 1, 40)
else:
pss_assert.parameter_is_valid_integer(from_level, 'from_level', 2, 40)
to_level = from_level
from_level = 1
crew_costs = _get_crew_costs(from_level, to_level, lookups.GAS_COSTS_LOOKUP, lookups.XP_COSTS_LOOKUP)
legendary_crew_costs = _get_crew_costs(from_level, to_level, lookups.GAS_COSTS_LEGENDARY_LOOKUP, lookups.XP_COSTS_LEGENDARY_LOOKUP)
crew_cost_txt = _get_crew_cost_txt(from_level, to_level, crew_costs)
legendary_crew_cost_txt = _get_crew_cost_txt(from_level, to_level, legendary_crew_costs)
result = ['**Level costs** (non-legendary crew, max research)']
result.extend(crew_cost_txt)
result.append(settings.EMPTY_LINE)
result.append('**Level costs** (legendary crew, max research)')
result.extend(legendary_crew_cost_txt)
return result, True
def _get_crew_costs(from_level: int, to_level: int, gas_costs_lookup: list, xp_cost_lookup: list) -> (int, int, int, int):
gas_cost = gas_costs_lookup[to_level - 1]
xp_cost = xp_cost_lookup[to_level - 1]
gas_cost_from = sum(gas_costs_lookup[from_level:to_level])
xp_cost_from = sum(xp_cost_lookup[from_level:to_level])
if from_level > 1:
return (None, None, gas_cost_from, xp_cost_from)
else:
return (gas_cost, xp_cost, gas_cost_from, xp_cost_from)
def _get_crew_cost_txt(from_level: int, to_level: int, costs: tuple) -> list:
result = []
if from_level == 1:
result.append(f'Getting from level {to_level - 1:d} to {to_level:d} requires {costs[1]:,} {emojis.pss_stat_xp} and {costs[0]:,}{emojis.pss_gas_big}.')
result.append(f'Getting from level {from_level:d} to {to_level:d} requires {costs[3]:,} {emojis.pss_stat_xp} and {costs[2]:,}{emojis.pss_gas_big}.')
return result
# ---------- Initilization ----------
character_designs_retriever = entity.EntityDesignsRetriever(
CHARACTER_DESIGN_BASE_PATH,
CHARACTER_DESIGN_KEY_NAME,
CHARACTER_DESIGN_DESCRIPTION_PROPERTY_NAME,
cache_name='CharacterDesigns'
)
collection_designs_retriever = entity.EntityDesignsRetriever(
COLLECTION_DESIGN_BASE_PATH,
COLLECTION_DESIGN_KEY_NAME,
COLLECTION_DESIGN_DESCRIPTION_PROPERTY_NAME,
cache_name='CollectionDesigns'
)
# Get stat for level:
# - get exponent 'p' by ProgressionType:
# - Linear: p = 1.0
# - EaseIn: p = 2.0
# - EaseOut: p = 0.5
# - get min stat 'min' & max stat 'max'
# result = min + (max - min) * ((level - 1) / 39) ** p
# ---------- Testing ----------
if __name__ == '__main__':
f = get_level_costs(20, 30)
test_crew = [('alpaco', 5)]
for (crew_name, level) in test_crew:
os.system('clear')
result = get_char_design_details_by_name(crew_name, level, as_embed=False)
for line in result[0]:
print(line)
print('')
result = get_prestige_from_info(crew_name, as_embed=False)
for line in result[0]:
print(line)
print('')
result = get_prestige_to_info(crew_name, as_embed=False)
for line in result[0]:
print(line)
print('')
result = ''
| [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
448,
29930,
29899,
14137,
29901,
18351,
29899,
29947,
448,
29930,
29899,
13,
13,
5215,
2313,
536,
13,
5215,
2897,
13,
3166,
19229,
1053,
360,
919,
29892,
2391,
29892,
3789,
29892,
12603,
552,
13,
13,
3166,
7090,
1053,
349,
893,
10408,
13,
5215,
953,
3848,
275,
13,
5215,
282,
893,
29918,
9294,
13,
5215,
282,
893,
29918,
10041,
408,
7855,
13,
5215,
282,
893,
29918,
3221,
408,
7136,
13,
5215,
282,
893,
29918,
6914,
14340,
408,
1106,
14340,
13,
5215,
6055,
13,
5215,
19725,
408,
3667,
13,
13,
13,
29937,
448,
1378,
29899,
5798,
1934,
448,
1378,
29899,
13,
13,
11282,
17923,
1001,
29918,
2287,
5425,
20728,
29918,
25416,
29918,
10145,
353,
525,
20755,
3170,
29914,
1293,
3596,
20755,
4002,
647,
29879,
29906,
29973,
11675,
2558,
29922,
264,
29915,
13,
11282,
17923,
1001,
29918,
2287,
5425,
20728,
29918,
10818,
29918,
5813,
353,
525,
20755,
4002,
647,
1204,
29915,
13,
11282,
17923,
1001,
29918,
2287,
5425,
20728,
29918,
2287,
7187,
24290,
2725,
29918,
8618,
13171,
15631,
29918,
5813,
353,
525,
20755,
4002,
647,
1170,
29915,
13,
13,
15032,
3281,
2725,
29918,
2287,
5425,
20728,
29918,
25416,
29918,
10145,
353,
525,
7196,
3170,
29914,
1293,
3596,
7196,
4002,
647,
29879,
29973,
11675,
2558,
29922,
264,
29915,
13,
15032,
3281,
2725,
29918,
2287,
5425,
20728,
29918,
10818,
29918,
5813,
353,
525,
7196,
4002,
647,
1204,
29915,
13,
15032,
3281,
2725,
29918,
2287,
5425,
20728,
29918,
2287,
7187,
24290,
2725,
29918,
8618,
13171,
15631,
29918,
5813,
353,
525,
7196,
1170,
29915,
13,
13,
1649,
15094,
1254,
29902,
1692,
29918,
21482,
29918,
25416,
29918,
10145,
353,
285,
29915,
20755,
3170,
29914,
4040,
342,
2231,
20755,
4591,
29973,
11675,
1989,
29922,
264,
29987,
18609,
4002,
647,
1204,
2433,
13,
1649,
15094,
1254,
29902,
1692,
29918,
4986,
29918,
25416,
29918,
10145,
353,
285,
29915,
20755,
3170,
29914,
4040,
342,
2231,
20755,
1762,
29973,
11675,
1989,
29922,
264,
29987,
18609,
4002,
647,
1204,
2433,
13,
13,
13,
13,
29937,
448,
1378,
29899,
10886,
309,
2133,
448,
1378,
29899,
13,
13,
1649,
558,
342,
2231,
29918,
3166,
29918,
8173,
29918,
8977,
353,
6571,
13,
1649,
558,
342,
2231,
29918,
517,
29918,
8173,
29918,
8977,
353,
6571,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
29937,
448,
1378,
29899,
4134,
267,
448,
1378,
29899,
13,
13,
1990,
2896,
4002,
647,
10602,
29898,
10041,
29889,
6691,
4002,
647,
10602,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1373,
29918,
13892,
29918,
3888,
29901,
9657,
29892,
16250,
29918,
13892,
29879,
29918,
1272,
29901,
9657,
353,
6213,
29892,
3233,
29901,
938,
353,
6213,
1125,
13,
4706,
4266,
353,
903,
657,
29918,
3097,
29918,
978,
29898,
3090,
29918,
13892,
29918,
3888,
29897,
13,
4706,
21083,
29918,
2536,
1862,
353,
903,
13441,
29918,
1686,
666,
358,
29918,
13168,
29898,
524,
29898,
3090,
29918,
13892,
29918,
3888,
1839,
6108,
666,
358,
19832,
25901,
13,
4706,
4333,
29918,
978,
353,
903,
657,
29918,
10855,
29918,
978,
29898,
3090,
29918,
13892,
29918,
3888,
29892,
16250,
29918,
13892,
29879,
29918,
1272,
29897,
13,
4706,
6686,
29918,
19322,
353,
1373,
29918,
13892,
29918,
3888,
1839,
29956,
2235,
292,
26539,
2033,
13,
4706,
1065,
29918,
19322,
353,
1373,
29918,
13892,
29918,
3888,
1839,
6558,
26539,
2033,
13,
13,
4706,
11509,
353,
903,
657,
29918,
6112,
877,
24780,
4920,
1793,
15730,
742,
3233,
29892,
1373,
29918,
13892,
29918,
3888,
29897,
13,
4706,
565,
4266,
29901,
13,
9651,
11509,
4619,
285,
29915,
21313,
18732,
1800,
29915,
13,
13,
4706,
1583,
17255,
3097,
29901,
851,
353,
11509,
13,
4706,
1583,
17255,
10855,
29918,
978,
29901,
851,
353,
4333,
29918,
978,
13,
4706,
1583,
17255,
1686,
666,
358,
29918,
2536,
1862,
29901,
851,
353,
21083,
29918,
2536,
1862,
13,
4706,
1583,
17255,
26098,
29901,
851,
353,
1373,
29918,
13892,
29918,
3888,
1839,
29954,
1581,
1542,
2033,
13,
4706,
1583,
17255,
5563,
29901,
938,
353,
3233,
13,
4706,
1583,
17255,
25525,
29901,
851,
353,
1373,
29918,
13892,
29918,
3888,
1839,
29934,
815,
1542,
2033,
13,
4706,
1583,
17255,
13678,
537,
29901,
851,
353,
1373,
29918,
13892,
29918,
3888,
1839,
29934,
279,
537,
2033,
13,
4706,
1583,
17255,
19322,
29901,
851,
353,
285,
29915,
29912,
20919,
29918,
19322,
6822,
29912,
3389,
29918,
19322,
10162,
13,
4706,
1583,
17255,
6112,
29918,
1131,
547,
29901,
851,
353,
903,
657,
29918,
6112,
877,
4165,
547,
742,
3233,
29892,
1373,
29918,
13892,
29918,
3888,
29897,
13,
4706,
1583,
17255,
6112,
29918,
10599,
29901,
851,
353,
903,
657,
29918,
6112,
877,
12412,
742,
3233,
29892,
1373,
29918,
13892,
29918,
3888,
29897,
13,
4706,
1583,
17255,
6112,
29918,
8696,
29918,
690,
21558,
29901,
851,
353,
1373,
29918,
13892,
29918,
3888,
1839,
18654,
1666,
21558,
2033,
13,
4706,
1583,
17255,
6112,
29918,
28887,
29901,
851,
353,
903,
657,
29918,
6112,
877,
29950,
29886,
742,
3233,
29892,
1373,
29918,
13892,
29918,
3888,
29897,
13,
4706,
1583,
17255,
6112,
29918,
29886,
309,
327,
29901,
851,
353,
903,
657,
29918,
6112,
877,
29925,
309,
327,
742,
3233,
29892,
1373,
29918,
13892,
29918,
3888,
29897,
13,
4706,
1583,
17255,
6112,
29918,
3445,
1466,
29901,
851,
353,
903,
657,
29918,
6112,
877,
5612,
1466,
742,
3233,
29892,
1373,
29918,
13892,
29918,
3888,
29897,
13,
4706,
1583,
17255,
6112,
29918,
29879,
15277,
29901,
851,
353,
903,
657,
29918,
6112,
877,
29903,
15277,
742,
3233,
29892,
1373,
29918,
13892,
29918,
3888,
29897,
13,
4706,
1583,
17255,
6112,
29918,
705,
481,
265,
29901,
851,
353,
903,
657,
29918,
6112,
877,
4806,
481,
265,
742,
3233,
29892,
1373,
29918,
13892,
29918,
3888,
29897,
13,
4706,
1583,
17255,
26495,
29918,
5030,
5946,
29901,
851,
353,
1373,
29918,
13892,
29918,
3888,
1839,
5323,
2827,
12415,
5946,
2033,
13,
13,
4706,
4902,
29918,
5426,
29901,
2391,
29961,
23215,
552,
29961,
710,
29892,
851,
5262,
353,
518,
13,
9651,
6702,
10108,
742,
1583,
17255,
5563,
511,
13,
9651,
6702,
29934,
279,
537,
742,
1583,
17255,
13678,
537,
511,
13,
9651,
6702,
29934,
815,
742,
1583,
17255,
25525,
511,
13,
9651,
6702,
7196,
742,
1583,
17255,
10855,
29918,
978,
511,
13,
9651,
6702,
29954,
1581,
742,
1583,
17255,
26098,
511,
13,
9651,
6702,
4920,
1793,
742,
1583,
17255,
3097,
511,
13,
9651,
6702,
3954,
742,
1583,
17255,
6112,
29918,
28887,
511,
13,
9651,
6702,
4165,
547,
742,
1583,
17255,
6112,
29918,
1131,
547,
511,
13,
9651,
6702,
5612,
1466,
742,
1583,
17255,
6112,
29918,
3445,
1466,
511,
13,
9651,
6702,
29925,
309,
327,
742,
1583,
17255,
6112,
29918,
29886,
309,
327,
511,
13,
9651,
6702,
29903,
15277,
742,
1583,
17255,
6112,
29918,
29879,
15277,
511,
13,
9651,
6702,
12412,
742,
1583,
17255,
6112,
29918,
10599,
511,
13,
9651,
6702,
4806,
481,
265,
742,
1583,
17255,
6112,
29918,
705,
481,
265,
511,
13,
9651,
6702,
29956,
2235,
29914,
3389,
6210,
742,
1583,
17255,
19322,
511,
13,
9651,
6702,
18654,
9241,
742,
1583,
17255,
6112,
29918,
8696,
29918,
690,
21558,
511,
13,
9651,
6702,
5323,
2827,
2117,
742,
1583,
17255,
26495,
29918,
5030,
5946,
511,
13,
9651,
6702,
16973,
1862,
742,
1583,
17255,
1686,
666,
358,
29918,
2536,
1862,
29897,
13,
4706,
4514,
13,
4706,
4902,
29918,
12759,
29901,
2391,
29961,
23215,
552,
29961,
710,
29892,
851,
29892,
6120,
5262,
353,
518,
13,
9651,
6702,
29934,
279,
537,
742,
1583,
17255,
13678,
537,
29892,
7700,
511,
13,
9651,
6702,
4920,
1793,
742,
1583,
17255,
3097,
29892,
5852,
511,
13,
9651,
6702,
7196,
742,
1583,
17255,
10855,
29918,
978,
29892,
5852,
29897,
13,
4706,
4514,
13,
13,
4706,
2428,
2141,
1649,
2344,
12035,
13,
9651,
1024,
29922,
3090,
29918,
13892,
29918,
3888,
29961,
11282,
17923,
1001,
29918,
2287,
5425,
20728,
29918,
2287,
7187,
24290,
2725,
29918,
8618,
13171,
15631,
29918,
5813,
1402,
13,
9651,
6139,
29922,
3090,
29918,
13892,
29918,
3888,
1839,
20755,
4002,
647,
9868,
7464,
13,
9651,
4902,
29918,
5426,
29922,
14144,
29918,
5426,
29892,
13,
9651,
4902,
29918,
12759,
29922,
14144,
29918,
12759,
13,
4706,
1723,
13,
13,
13,
1678,
732,
6799,
13,
1678,
822,
11509,
29898,
1311,
29897,
1599,
851,
29901,
13,
4706,
736,
1583,
17255,
3097,
13,
13,
1678,
732,
6799,
13,
1678,
822,
5337,
29898,
1311,
29897,
1599,
851,
29901,
13,
4706,
736,
1583,
17255,
6112,
29918,
1131,
547,
13,
13,
1678,
732,
6799,
13,
1678,
822,
4333,
29918,
978,
29898,
1311,
29897,
1599,
851,
29901,
13,
4706,
736,
1583,
17255,
10855,
29918,
978,
13,
13,
1678,
732,
6799,
13,
1678,
822,
6012,
29898,
1311,
29897,
1599,
851,
29901,
13,
4706,
736,
1583,
17255,
6112,
29918,
10599,
13,
13,
1678,
732,
6799,
13,
1678,
822,
21083,
29918,
2536,
1862,
29898,
1311,
29897,
1599,
851,
29901,
13,
4706,
736,
1583,
17255,
1686,
666,
358,
29918,
2536,
1862,
13,
13,
1678,
732,
6799,
13,
1678,
822,
3974,
29918,
690,
21558,
29898,
1311,
29897,
1599,
851,
29901,
13,
4706,
736,
1583,
17255,
6112,
29918,
8696,
29918,
690,
21558,
13,
13,
1678,
732,
6799,
13,
1678,
822,
23346,
29898,
1311,
29897,
1599,
851,
29901,
13,
4706,
736,
1583,
17255,
26098,
13,
13,
1678,
732,
6799,
13,
1678,
822,
298,
29886,
29898,
1311,
29897,
1599,
851,
29901,
13,
4706,
736,
1583,
17255,
6112,
29918,
28887,
13,
13,
1678,
732,
6799,
13,
1678,
822,
3233,
29898,
1311,
29897,
1599,
938,
29901,
13,
4706,
736,
1583,
17255,
5563,
13,
13,
1678,
732,
6799,
13,
1678,
822,
19840,
29898,
1311,
29897,
1599,
851,
29901,
13,
4706,
736,
1583,
17255,
6112,
29918,
29886,
309,
327,
13,
13,
1678,
732,
6799,
13,
1678,
822,
8175,
29898,
1311,
29897,
1599,
851,
29901,
13,
4706,
736,
1583,
17255,
25525,
13,
13,
1678,
732,
6799,
13,
1678,
822,
364,
279,
537,
29898,
1311,
29897,
1599,
851,
29901,
13,
4706,
736,
1583,
17255,
13678,
537,
13,
13,
1678,
732,
6799,
13,
1678,
822,
26032,
29898,
1311,
29897,
1599,
851,
29901,
13,
4706,
736,
1583,
17255,
6112,
29918,
3445,
1466,
13,
13,
1678,
732,
6799,
13,
1678,
822,
10466,
29898,
1311,
29897,
1599,
851,
29901,
13,
4706,
736,
1583,
17255,
6112,
29918,
29879,
15277,
13,
13,
1678,
732,
6799,
13,
1678,
822,
6210,
29898,
1311,
29897,
1599,
851,
29901,
13,
4706,
736,
1583,
17255,
19322,
13,
13,
1678,
732,
6799,
13,
1678,
822,
6694,
29918,
5030,
5946,
29898,
1311,
29897,
1599,
851,
29901,
13,
4706,
736,
1583,
17255,
26495,
29918,
5030,
5946,
13,
13,
1678,
732,
6799,
13,
1678,
822,
28639,
29898,
1311,
29897,
1599,
851,
29901,
13,
4706,
736,
1583,
17255,
6112,
29918,
705,
481,
265,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
1990,
14348,
4002,
647,
10602,
29898,
10041,
29889,
6691,
4002,
647,
10602,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
4333,
29918,
13892,
29918,
3888,
29901,
9657,
1125,
13,
4706,
4333,
29918,
1037,
29893,
353,
903,
657,
29918,
10855,
29918,
305,
1503,
29918,
13892,
29879,
29918,
7192,
359,
29898,
10855,
29918,
13892,
29918,
3888,
29897,
13,
4706,
4333,
29918,
546,
29895,
353,
4333,
29918,
13892,
29918,
3888,
1839,
2369,
29882,
27967,
1542,
2033,
13,
4706,
4333,
29918,
546,
29895,
353,
1106,
14340,
29889,
15032,
3281,
2725,
29918,
13171,
29968,
29918,
3927,
8949,
4897,
29889,
657,
29898,
10855,
29918,
13892,
29918,
3888,
1839,
2369,
29882,
27967,
1542,
7464,
4333,
29918,
13892,
29918,
3888,
1839,
2369,
29882,
27967,
1542,
11287,
13,
4706,
1375,
29918,
510,
833,
353,
4333,
29918,
13892,
29918,
3888,
1839,
8140,
1523,
833,
2033,
13,
4706,
4236,
29918,
510,
833,
353,
4333,
29918,
13892,
29918,
3888,
1839,
7976,
1523,
833,
2033,
13,
4706,
2967,
29918,
264,
29882,
27967,
29918,
1767,
353,
4333,
29918,
13892,
29918,
3888,
1839,
5160,
2369,
29882,
27967,
1917,
2033,
13,
4706,
4331,
29918,
264,
29882,
27967,
29918,
1767,
353,
4333,
29918,
13892,
29918,
3888,
1839,
14448,
2369,
29882,
27967,
1917,
2033,
13,
13,
4706,
1583,
17255,
3090,
21706,
29901,
851,
353,
13420,
15300,
7122,
29898,
10855,
29918,
1037,
29893,
29897,
13,
4706,
1583,
17255,
1195,
29918,
3317,
29918,
510,
833,
353,
285,
29915,
29912,
1195,
29918,
510,
833,
29913,
856,
29912,
3317,
29918,
510,
833,
10162,
13,
4706,
1583,
17255,
264,
29882,
27967,
353,
285,
29915,
29912,
3188,
29918,
264,
29882,
27967,
29918,
1767,
29913,
313,
5160,
511,
426,
10568,
29918,
264,
29882,
27967,
29918,
1767,
29913,
313,
14448,
16029,
13,
13,
4706,
4902,
29918,
5426,
29901,
2391,
29961,
23215,
552,
29961,
710,
29892,
851,
5262,
353,
518,
13,
9651,
6702,
1523,
833,
3080,
856,
7976,
742,
1583,
17255,
1195,
29918,
3317,
29918,
510,
833,
511,
13,
9651,
313,
10855,
29918,
546,
29895,
29892,
1583,
17255,
264,
29882,
27967,
511,
13,
9651,
6702,
5914,
21706,
742,
1583,
17255,
3090,
21706,
29897,
13,
4706,
4514,
13,
4706,
4902,
29918,
12759,
29901,
2391,
29961,
23215,
552,
29961,
710,
29892,
851,
29892,
6120,
5262,
353,
518,
13,
4706,
4514,
13,
13,
4706,
2428,
2141,
1649,
2344,
12035,
13,
9651,
1024,
29922,
10855,
29918,
13892,
29918,
3888,
29961,
15032,
3281,
2725,
29918,
2287,
5425,
20728,
29918,
2287,
7187,
24290,
2725,
29918,
8618,
13171,
15631,
29918,
5813,
1402,
13,
9651,
6139,
29922,
10855,
29918,
13892,
29918,
3888,
1839,
7196,
9868,
7464,
13,
9651,
4902,
29918,
5426,
29922,
14144,
29918,
5426,
29892,
13,
9651,
4902,
29918,
12759,
29922,
14144,
29918,
12759,
29892,
13,
9651,
11266,
2324,
2433,
991,
597,
29886,
15711,
8508,
9981,
29889,
29888,
2685,
29889,
510,
29914,
4594,
29914,
10900,
29901,
29907,
3973,
29918,
19466,
29915,
13,
4706,
1723,
13,
13,
13,
1678,
732,
6799,
13,
1678,
822,
4890,
29898,
1311,
29897,
1599,
851,
29901,
13,
4706,
736,
1583,
17255,
3090,
21706,
13,
13,
1678,
732,
6799,
13,
1678,
822,
1375,
29918,
3317,
29918,
510,
833,
29898,
1311,
29897,
1599,
851,
29901,
13,
4706,
736,
1583,
17255,
1195,
29918,
3317,
29918,
510,
833,
13,
13,
1678,
732,
6799,
13,
1678,
822,
26371,
27967,
29898,
1311,
29897,
1599,
851,
29901,
13,
4706,
736,
1583,
17255,
264,
29882,
27967,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
1990,
1588,
342,
2231,
10602,
29898,
10041,
29889,
6691,
4002,
647,
10602,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1373,
29918,
13892,
29918,
3888,
29901,
9657,
29892,
18619,
2231,
29918,
7192,
359,
29901,
360,
919,
29961,
710,
29892,
2391,
29961,
710,
20526,
1059,
29918,
4906,
29901,
851,
29892,
3611,
29918,
6886,
29901,
851,
29892,
1014,
29918,
3257,
29918,
6886,
29901,
851,
1125,
13,
4706,
1583,
17255,
3090,
29918,
13892,
29918,
978,
29901,
851,
353,
1373,
29918,
13892,
29918,
3888,
29961,
11282,
17923,
1001,
29918,
2287,
5425,
20728,
29918,
2287,
7187,
24290,
2725,
29918,
8618,
13171,
15631,
29918,
5813,
29962,
13,
4706,
1583,
17255,
2798,
29901,
938,
353,
2533,
4197,
2435,
29898,
558,
342,
2231,
29918,
1595,
8397,
29897,
363,
18619,
2231,
29918,
1595,
8397,
297,
18619,
2231,
29918,
7192,
359,
29889,
5975,
580,
2314,
13,
4706,
1583,
17255,
2704,
29901,
851,
353,
1059,
29918,
4906,
13,
4706,
1583,
17255,
558,
342,
2231,
29918,
7192,
359,
29901,
360,
919,
29961,
710,
29892,
2391,
29961,
710,
5262,
353,
18619,
2231,
29918,
7192,
359,
13,
4706,
1583,
17255,
3257,
29918,
6886,
29901,
851,
353,
3611,
29918,
6886,
470,
525,
1068,
29938,
3090,
29918,
13892,
29918,
978,
29938,
1068,
756,
3579,
29938,
2798,
29938,
1068,
18240,
11283,
13,
4706,
1583,
17255,
1491,
29918,
3257,
29918,
6886,
29901,
851,
353,
1014,
29918,
3257,
29918,
6886,
470,
525,
1068,
29938,
3090,
29918,
13892,
29918,
978,
29938,
1068,
11283,
13,
13,
13,
1678,
732,
6799,
13,
1678,
822,
1373,
29918,
13892,
29918,
978,
29898,
1311,
29897,
1599,
851,
29901,
13,
4706,
736,
1583,
17255,
3090,
29918,
13892,
29918,
978,
13,
13,
1678,
732,
6799,
13,
1678,
822,
2302,
29898,
1311,
29897,
1599,
938,
29901,
13,
4706,
736,
1583,
17255,
2798,
13,
13,
1678,
732,
6799,
13,
1678,
822,
1059,
29898,
1311,
29897,
1599,
851,
29901,
13,
4706,
736,
1583,
17255,
2704,
13,
13,
1678,
732,
6799,
13,
1678,
822,
18619,
2231,
29918,
7192,
359,
29898,
1311,
29897,
1599,
360,
919,
29961,
710,
29892,
2391,
29961,
710,
5262,
29901,
13,
4706,
736,
1583,
17255,
558,
342,
2231,
29918,
7192,
359,
13,
13,
1678,
732,
6799,
13,
1678,
822,
3611,
29898,
1311,
29897,
1599,
851,
29901,
13,
4706,
1121,
353,
1583,
17255,
3257,
29918,
6886,
13,
4706,
1121,
353,
1121,
29889,
6506,
877,
29938,
3090,
29918,
13892,
29918,
978,
29938,
742,
1583,
29889,
3090,
29918,
13892,
29918,
978,
29897,
13,
4706,
1121,
353,
1121,
29889,
6506,
877,
29938,
2798,
29938,
742,
851,
29898,
1311,
29889,
2798,
876,
13,
4706,
736,
1121,
13,
13,
13,
1678,
822,
679,
29918,
14144,
29918,
294,
29918,
17987,
29898,
1311,
29897,
1599,
2313,
536,
29889,
6026,
2580,
29901,
13,
4706,
736,
6213,
13,
13,
13,
1678,
822,
679,
29918,
14144,
29918,
294,
29918,
726,
29918,
5426,
29898,
1311,
29897,
1599,
2391,
29961,
710,
5387,
13,
4706,
1121,
353,
518,
1311,
29889,
3257,
29962,
13,
4706,
565,
1583,
29889,
2704,
29901,
13,
9651,
1121,
29889,
4397,
29898,
1311,
29889,
2704,
29897,
13,
4706,
1683,
29901,
13,
9651,
363,
1373,
29918,
13892,
29918,
978,
297,
12705,
29898,
1761,
29898,
1311,
29889,
558,
342,
2231,
29918,
7192,
359,
29889,
8149,
22130,
29901,
13,
18884,
18619,
2231,
29918,
1595,
8397,
353,
12705,
29898,
1311,
29889,
558,
342,
2231,
29918,
7192,
359,
29961,
3090,
29918,
13892,
29918,
978,
2314,
13,
18884,
1121,
29889,
4397,
29898,
1311,
3032,
657,
29918,
1491,
29918,
3257,
29898,
3090,
29918,
13892,
29918,
978,
876,
13,
18884,
1121,
29889,
4397,
29898,
29888,
11041,
426,
613,
11393,
7122,
29898,
558,
342,
2231,
29918,
1595,
8397,
2915,
1495,
13,
4706,
736,
1121,
13,
13,
13,
1678,
822,
679,
29918,
14144,
29918,
294,
29918,
726,
29918,
12759,
29898,
1311,
29897,
1599,
2391,
29961,
710,
5387,
13,
4706,
736,
1583,
29889,
657,
29918,
14144,
29918,
294,
29918,
726,
29918,
5426,
580,
13,
13,
13,
1678,
822,
903,
657,
29918,
1491,
29918,
3257,
29898,
1311,
29892,
1373,
29918,
13892,
29918,
978,
29901,
851,
29897,
1599,
851,
29901,
13,
4706,
1121,
353,
1583,
17255,
1491,
29918,
3257,
29918,
6886,
29889,
6506,
877,
29938,
3090,
29918,
13892,
29918,
978,
29938,
742,
1373,
29918,
13892,
29918,
978,
29897,
13,
4706,
736,
1121,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
1990,
1588,
342,
2231,
4591,
10602,
29898,
4040,
342,
2231,
10602,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1373,
29918,
3166,
29918,
13892,
29918,
3888,
29901,
9657,
29892,
22524,
29918,
13892,
29879,
29918,
1272,
29901,
9657,
353,
6213,
29892,
18619,
2231,
29918,
3166,
29918,
1272,
29901,
9657,
353,
6213,
1125,
13,
4706,
22524,
29918,
13892,
29879,
29918,
1272,
353,
22524,
29918,
13892,
29879,
29918,
1272,
470,
2931,
29918,
13892,
29879,
29918,
276,
509,
347,
369,
29889,
657,
29918,
1272,
29918,
8977,
29941,
580,
13,
4706,
1059,
353,
6213,
13,
4706,
18619,
2231,
29918,
7192,
359,
353,
6571,
13,
4706,
4472,
29918,
3257,
353,
525,
1068,
29938,
3090,
29918,
13892,
29918,
978,
29938,
1068,
756,
3579,
29938,
2798,
29938,
1068,
18619,
2231,
18240,
11283,
13,
4706,
4472,
29918,
1491,
3257,
353,
525,
1762,
3579,
29938,
3090,
29918,
13892,
29918,
978,
29938,
1068,
411,
11283,
13,
13,
4706,
565,
18619,
2231,
29918,
3166,
29918,
1272,
29901,
13,
9651,
363,
995,
297,
18619,
2231,
29918,
3166,
29918,
1272,
29889,
5975,
7295,
13,
18884,
1373,
29918,
3888,
29918,
29906,
29918,
978,
353,
22524,
29918,
13892,
29879,
29918,
1272,
29961,
1767,
1839,
20755,
4002,
647,
1204,
29906,
2033,
3816,
11282,
17923,
1001,
29918,
2287,
5425,
20728,
29918,
2287,
7187,
24290,
2725,
29918,
8618,
13171,
15631,
29918,
5813,
29962,
13,
18884,
1373,
29918,
3888,
29918,
517,
29918,
978,
353,
22524,
29918,
13892,
29879,
29918,
1272,
29961,
1767,
1839,
1762,
20755,
4002,
647,
1204,
2033,
3816,
11282,
17923,
1001,
29918,
2287,
5425,
20728,
29918,
2287,
7187,
24290,
2725,
29918,
8618,
13171,
15631,
29918,
5813,
29962,
13,
18884,
18619,
2231,
29918,
7192,
359,
29889,
842,
4381,
29898,
3090,
29918,
3888,
29918,
517,
29918,
978,
29892,
5159,
467,
4397,
29898,
3090,
29918,
3888,
29918,
29906,
29918,
978,
29897,
13,
4706,
1683,
29901,
13,
9651,
565,
1373,
29918,
3166,
29918,
13892,
29918,
3888,
1839,
29934,
279,
537,
2033,
1275,
525,
24780,
2396,
13,
18884,
1059,
353,
525,
6716,
2609,
18619,
2231,
3579,
24780,
1068,
17616,
6169,
13,
9651,
25342,
1373,
29918,
3166,
29918,
13892,
29918,
3888,
1839,
29934,
279,
537,
2033,
1275,
525,
22988,
355,
653,
2396,
13,
18884,
1059,
353,
525,
6716,
2609,
18619,
2231,
3579,
22988,
355,
653,
1068,
17616,
6169,
13,
9651,
1683,
29901,
13,
18884,
1059,
353,
525,
1217,
650,
29915,
13,
13,
4706,
2428,
2141,
1649,
2344,
12035,
3090,
29918,
3166,
29918,
13892,
29918,
3888,
29892,
18619,
2231,
29918,
7192,
359,
29892,
1059,
29892,
4472,
29918,
3257,
29892,
4472,
29918,
1491,
3257,
29897,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
1990,
1588,
342,
2231,
1762,
10602,
29898,
4040,
342,
2231,
10602,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1373,
29918,
517,
29918,
13892,
29918,
3888,
29901,
9657,
29892,
22524,
29918,
13892,
29879,
29918,
1272,
29901,
9657,
353,
6213,
29892,
18619,
2231,
29918,
517,
29918,
1272,
29901,
9657,
353,
6213,
1125,
13,
4706,
22524,
29918,
13892,
29879,
29918,
1272,
353,
22524,
29918,
13892,
29879,
29918,
1272,
470,
2931,
29918,
13892,
29879,
29918,
276,
509,
347,
369,
29889,
657,
29918,
1272,
29918,
8977,
29941,
580,
13,
4706,
1059,
353,
6213,
13,
4706,
18619,
2231,
29918,
7192,
359,
353,
6571,
13,
4706,
4472,
29918,
3257,
353,
525,
1068,
29938,
3090,
29918,
13892,
29918,
978,
29938,
1068,
756,
3579,
29938,
2798,
29938,
1068,
18619,
2231,
9522,
5547,
11283,
13,
4706,
4472,
29918,
1491,
3257,
353,
525,
1068,
29938,
3090,
29918,
13892,
29918,
978,
29938,
1068,
411,
11283,
13,
13,
4706,
565,
18619,
2231,
29918,
517,
29918,
1272,
29901,
13,
9651,
18619,
2231,
29918,
4361,
5547,
29901,
360,
919,
29961,
710,
29892,
3789,
29961,
710,
5262,
353,
6571,
13,
9651,
363,
995,
297,
18619,
2231,
29918,
517,
29918,
1272,
29889,
5975,
7295,
13,
18884,
1373,
29918,
29896,
29918,
13892,
29918,
978,
353,
22524,
29918,
13892,
29879,
29918,
1272,
29961,
1767,
1839,
20755,
4002,
647,
1204,
29896,
2033,
3816,
11282,
17923,
1001,
29918,
2287,
5425,
20728,
29918,
2287,
7187,
24290,
2725,
29918,
8618,
13171,
15631,
29918,
5813,
29962,
13,
18884,
1373,
29918,
29906,
29918,
13892,
29918,
978,
353,
22524,
29918,
13892,
29879,
29918,
1272,
29961,
1767,
1839,
20755,
4002,
647,
1204,
29906,
2033,
3816,
11282,
17923,
1001,
29918,
2287,
5425,
20728,
29918,
2287,
7187,
24290,
2725,
29918,
8618,
13171,
15631,
29918,
5813,
29962,
13,
18884,
18619,
2231,
29918,
4361,
5547,
29889,
842,
4381,
29898,
3090,
29918,
29896,
29918,
13892,
29918,
978,
29892,
731,
16655,
1202,
29898,
3090,
29918,
29906,
29918,
13892,
29918,
978,
29897,
13,
18884,
18619,
2231,
29918,
4361,
5547,
29889,
842,
4381,
29898,
3090,
29918,
29906,
29918,
13892,
29918,
978,
29892,
731,
16655,
1202,
29898,
3090,
29918,
29896,
29918,
13892,
29918,
978,
29897,
13,
13,
9651,
18619,
2231,
29918,
4361,
412,
29918,
292,
1127,
10070,
29901,
2391,
29961,
23215,
552,
29961,
710,
29892,
3789,
29961,
710,
5262,
29962,
353,
17288,
3090,
29918,
13892,
29918,
978,
29892,
18619,
2231,
29918,
1595,
8397,
29897,
363,
1373,
29918,
13892,
29918,
978,
29892,
18619,
2231,
29918,
1595,
8397,
297,
18619,
2231,
29918,
4361,
5547,
29889,
7076,
580,
29962,
13,
13,
9651,
18619,
2231,
29918,
7192,
359,
29901,
360,
919,
29961,
710,
29892,
2391,
29961,
710,
5262,
353,
6571,
13,
9651,
1550,
18619,
2231,
29918,
4361,
412,
29918,
292,
1127,
10070,
29901,
13,
18884,
18619,
2231,
29918,
4361,
412,
29918,
292,
1127,
10070,
353,
12705,
29898,
558,
342,
2231,
29918,
4361,
412,
29918,
292,
1127,
10070,
29892,
1820,
29922,
2892,
260,
29901,
7431,
29898,
29873,
29961,
29896,
11724,
11837,
29922,
5574,
29897,
13,
18884,
313,
3090,
29918,
13892,
29918,
978,
29892,
18619,
2231,
29918,
1595,
8397,
29897,
353,
18619,
2231,
29918,
4361,
412,
29918,
292,
1127,
10070,
29961,
29900,
29962,
13,
18884,
18619,
2231,
29918,
7192,
359,
29961,
3090,
29918,
13892,
29918,
978,
29962,
353,
1051,
29898,
558,
342,
2231,
29918,
1595,
8397,
29897,
13,
18884,
18619,
2231,
29918,
4361,
412,
29918,
292,
1127,
10070,
353,
1588,
342,
2231,
1762,
10602,
3032,
5504,
29918,
558,
342,
2231,
29918,
4361,
412,
29918,
292,
1127,
10070,
29898,
558,
342,
2231,
29918,
4361,
412,
29918,
292,
1127,
10070,
29897,
13,
4706,
1683,
29901,
13,
9651,
565,
1373,
29918,
517,
29918,
13892,
29918,
3888,
1839,
29934,
279,
537,
2033,
1275,
525,
24780,
2396,
13,
18884,
1059,
353,
525,
6716,
2609,
18619,
2231,
304,
3579,
24780,
1068,
17616,
6169,
13,
9651,
25342,
1373,
29918,
517,
29918,
13892,
29918,
3888,
1839,
29934,
279,
537,
2033,
1275,
525,
18877,
2396,
13,
18884,
1059,
353,
525,
6716,
2609,
18619,
2231,
304,
3579,
18877,
1068,
17616,
6169,
13,
9651,
1683,
29901,
13,
18884,
1059,
353,
525,
1217,
650,
29915,
13,
13,
4706,
2428,
2141,
1649,
2344,
12035,
3090,
29918,
517,
29918,
13892,
29918,
3888,
29892,
18619,
2231,
29918,
7192,
359,
29892,
1059,
29892,
4472,
29918,
3257,
29892,
4472,
29918,
1491,
3257,
29897,
13,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
903,
5504,
29918,
558,
342,
2231,
29918,
4361,
412,
29918,
292,
1127,
10070,
29898,
558,
342,
2231,
29918,
4361,
412,
29918,
292,
1127,
10070,
29901,
2391,
29961,
23215,
552,
29961,
710,
29892,
3789,
29961,
710,
5262,
2314,
1599,
2391,
29961,
23215,
552,
29961,
710,
29892,
3789,
29961,
710,
5262,
5387,
13,
4706,
1121,
29901,
2391,
29961,
23215,
552,
29961,
710,
29892,
3789,
29961,
710,
5262,
29962,
353,
5159,
13,
4706,
396,
11190,
29871,
29896,
303,
1373,
1024,
669,
18619,
2231,
22056,
13,
4706,
396,
15154,
393,
5101,
515,
278,
1121,
13,
4706,
396,
20504,
403,
1549,
13,
4706,
313,
3188,
29918,
3090,
29918,
13892,
29918,
978,
29892,
2967,
29918,
558,
342,
2231,
29918,
1595,
8397,
29897,
353,
18619,
2231,
29918,
4361,
412,
29918,
292,
1127,
10070,
29961,
29900,
29962,
13,
4706,
363,
313,
3090,
29918,
13892,
29918,
978,
29892,
18619,
2231,
29918,
1595,
8397,
29897,
297,
18619,
2231,
29918,
4361,
412,
29918,
292,
1127,
10070,
29961,
29896,
29901,
5387,
13,
9651,
565,
2967,
29918,
3090,
29918,
13892,
29918,
978,
297,
18619,
2231,
29918,
1595,
8397,
322,
1373,
29918,
13892,
29918,
978,
297,
2967,
29918,
558,
342,
2231,
29918,
1595,
8397,
29901,
13,
18884,
18619,
2231,
29918,
1595,
8397,
353,
518,
29916,
363,
921,
297,
18619,
2231,
29918,
1595,
8397,
565,
921,
2804,
2967,
29918,
3090,
29918,
13892,
29918,
978,
29962,
13,
9651,
565,
18619,
2231,
29918,
1595,
8397,
29901,
13,
18884,
1121,
29889,
4397,
3552,
3090,
29918,
13892,
29918,
978,
29892,
18619,
2231,
29918,
1595,
8397,
876,
13,
4706,
736,
1121,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
29937,
448,
1378,
29899,
6162,
546,
3168,
448,
1378,
29899,
13,
13,
1753,
903,
13441,
29918,
1686,
666,
358,
29918,
13168,
29898,
1686,
666,
358,
29918,
13168,
29901,
938,
29897,
1599,
851,
29901,
13,
1678,
1121,
353,
5159,
13,
1678,
363,
413,
297,
1106,
14340,
29889,
28879,
3120,
13427,
3919,
29918,
1529,
16033,
29918,
3927,
8949,
4897,
29889,
8149,
7295,
13,
4706,
565,
313,
1686,
666,
358,
29918,
13168,
669,
413,
29897,
2804,
29871,
29900,
29901,
13,
9651,
1121,
29889,
4397,
29898,
6914,
14340,
29889,
28879,
3120,
13427,
3919,
29918,
1529,
16033,
29918,
3927,
8949,
4897,
29961,
29895,
2314,
13,
13,
1678,
565,
1121,
29901,
13,
4706,
736,
13420,
15300,
7122,
29898,
2914,
29897,
13,
1678,
1683,
29901,
13,
4706,
736,
17411,
29915,
13,
13,
13,
1753,
903,
657,
29918,
3097,
29918,
978,
29898,
3090,
29918,
13892,
29918,
3888,
29901,
9657,
29897,
1599,
851,
29901,
13,
1678,
565,
1373,
29918,
13892,
29918,
3888,
29901,
13,
4706,
4266,
353,
1373,
29918,
13892,
29918,
3888,
1839,
24780,
4920,
1793,
1542,
2033,
13,
4706,
565,
4266,
297,
1106,
14340,
29889,
29903,
4162,
8426,
1964,
29918,
2882,
6227,
1806,
29059,
29918,
3927,
8949,
4897,
29889,
8149,
7295,
13,
9651,
736,
1106,
14340,
29889,
29903,
4162,
8426,
1964,
29918,
2882,
6227,
1806,
29059,
29918,
3927,
8949,
4897,
29961,
18732,
29962,
13,
1678,
736,
6213,
13,
13,
13,
1753,
903,
657,
29918,
10855,
29918,
305,
1503,
29918,
13892,
29879,
29918,
7192,
359,
29898,
10855,
29918,
13892,
29918,
3888,
29901,
360,
919,
29961,
710,
29892,
851,
2314,
1599,
1051,
29901,
13,
1678,
4333,
29918,
333,
353,
4333,
29918,
13892,
29918,
3888,
29961,
15032,
3281,
2725,
29918,
2287,
5425,
20728,
29918,
10818,
29918,
5813,
29962,
13,
1678,
22524,
29918,
13892,
29879,
29918,
1272,
353,
2931,
29918,
13892,
29879,
29918,
276,
509,
347,
369,
29889,
657,
29918,
1272,
29918,
8977,
29941,
580,
13,
1678,
22524,
29918,
13892,
29879,
29918,
7192,
359,
353,
518,
305,
1503,
29918,
13892,
29879,
29918,
1272,
29961,
3090,
29918,
333,
29962,
363,
1373,
29918,
333,
297,
22524,
29918,
13892,
29879,
29918,
1272,
29889,
8149,
580,
565,
22524,
29918,
13892,
29879,
29918,
1272,
29961,
3090,
29918,
333,
3816,
15032,
3281,
2725,
29918,
2287,
5425,
20728,
29918,
10818,
29918,
5813,
29962,
1275,
4333,
29918,
333,
29962,
13,
1678,
1121,
353,
518,
3090,
29918,
13892,
29918,
3888,
29961,
11282,
17923,
1001,
29918,
2287,
5425,
20728,
29918,
2287,
7187,
24290,
2725,
29918,
8618,
13171,
15631,
29918,
5813,
29962,
363,
1373,
29918,
13892,
29918,
3888,
297,
22524,
29918,
13892,
29879,
29918,
7192,
359,
29962,
13,
1678,
1121,
29889,
6605,
580,
13,
1678,
736,
1121,
13,
13,
13,
1753,
903,
657,
29918,
10855,
29918,
978,
29898,
3090,
29918,
13892,
29918,
3888,
29901,
9657,
29892,
16250,
29918,
13892,
29879,
29918,
1272,
29901,
9657,
353,
6213,
29897,
1599,
851,
29901,
13,
1678,
565,
1373,
29918,
13892,
29918,
3888,
29901,
13,
4706,
4333,
29918,
333,
353,
1373,
29918,
13892,
29918,
3888,
29961,
15032,
3281,
2725,
29918,
2287,
5425,
20728,
29918,
10818,
29918,
5813,
29962,
13,
4706,
565,
4333,
29918,
333,
322,
4333,
29918,
333,
2804,
525,
29900,
2396,
13,
9651,
4333,
29918,
13892,
29918,
3888,
353,
4333,
29918,
13892,
29879,
29918,
276,
509,
347,
369,
29889,
657,
29918,
10041,
29918,
13892,
29918,
3888,
29918,
1609,
29918,
333,
29898,
10855,
29918,
333,
29897,
13,
9651,
736,
4333,
29918,
13892,
29918,
3888,
29961,
15032,
3281,
2725,
29918,
2287,
5425,
20728,
29918,
2287,
7187,
24290,
2725,
29918,
8618,
13171,
15631,
29918,
5813,
29962,
13,
1678,
736,
6213,
13,
13,
13,
1753,
903,
657,
29918,
6112,
29898,
6112,
29918,
978,
29901,
851,
29892,
3233,
29901,
938,
29892,
1373,
29918,
13892,
29918,
3888,
29901,
9657,
29897,
1599,
851,
29901,
13,
1678,
338,
29918,
18732,
29918,
6112,
353,
1002,
29918,
978,
29889,
13609,
2141,
27382,
2541,
877,
18732,
3097,
1495,
13,
1678,
565,
338,
29918,
18732,
29918,
6112,
29901,
13,
4706,
4236,
29918,
6112,
29918,
978,
353,
525,
24780,
4920,
1793,
15790,
15730,
29915,
13,
1678,
1683,
29901,
13,
4706,
4236,
29918,
6112,
29918,
978,
353,
285,
29915,
15790,
29912,
6112,
29918,
978,
10162,
13,
1678,
1375,
29918,
1767,
353,
5785,
29898,
3090,
29918,
13892,
29918,
3888,
29961,
6112,
29918,
978,
2314,
13,
1678,
4236,
29918,
1767,
353,
5785,
29898,
3090,
29918,
13892,
29918,
3888,
29961,
3317,
29918,
6112,
29918,
978,
2314,
13,
1678,
410,
11476,
29918,
1853,
353,
1373,
29918,
13892,
29918,
3888,
1839,
1184,
11476,
1542,
2033,
13,
1678,
1121,
353,
903,
657,
29918,
6112,
29918,
1767,
29898,
1195,
29918,
1767,
29892,
4236,
29918,
1767,
29892,
3233,
29892,
410,
11476,
29918,
1853,
29897,
13,
1678,
736,
1121,
13,
13,
13,
1753,
903,
657,
29918,
6112,
29918,
1767,
29898,
1195,
29918,
1767,
29901,
5785,
29892,
4236,
29918,
1767,
29901,
5785,
29892,
3233,
29901,
938,
29892,
410,
11476,
29918,
1853,
29901,
851,
29897,
1599,
851,
29901,
13,
1678,
565,
3233,
338,
6213,
470,
3233,
529,
29871,
29896,
470,
3233,
1405,
29871,
29946,
29900,
29901,
13,
4706,
736,
285,
29915,
29912,
1195,
29918,
1767,
29901,
29900,
29889,
29896,
29888,
29913,
448,
426,
3317,
29918,
1767,
29901,
29900,
29889,
29896,
29888,
10162,
13,
1678,
1683,
29901,
13,
4706,
736,
285,
29915,
29912,
29918,
15807,
403,
29918,
6112,
29918,
1767,
29898,
1195,
29918,
1767,
29892,
4236,
29918,
1767,
29892,
3233,
29892,
410,
11476,
29918,
1853,
1125,
29900,
29889,
29896,
29888,
10162,
13,
13,
13,
1753,
903,
15807,
403,
29918,
6112,
29918,
1767,
29898,
1195,
29918,
1767,
29901,
5785,
29892,
4236,
29918,
1767,
29901,
5785,
29892,
3233,
29901,
938,
29892,
410,
11476,
29918,
1853,
29901,
851,
29897,
1599,
5785,
29901,
13,
1678,
28869,
353,
1106,
14340,
29889,
8618,
29954,
1525,
13507,
29918,
15631,
29925,
2890,
29961,
771,
11476,
29918,
1853,
29962,
13,
1678,
1121,
353,
1375,
29918,
1767,
718,
313,
3317,
29918,
1767,
448,
1375,
29918,
1767,
29897,
334,
5135,
5563,
448,
29871,
29896,
29897,
847,
29871,
29941,
29929,
29897,
3579,
28869,
13,
1678,
736,
1121,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
29937,
448,
1378,
29899,
315,
3973,
5235,
448,
1378,
29899,
13,
13,
1753,
679,
29918,
3090,
29918,
13892,
29918,
14144,
29918,
1609,
29918,
333,
29898,
3090,
29918,
13892,
29918,
333,
29901,
851,
29892,
3233,
29901,
938,
29892,
22524,
29918,
13892,
29879,
29918,
1272,
29901,
9657,
353,
6213,
29892,
16250,
29918,
13892,
29879,
29918,
1272,
29901,
9657,
353,
6213,
29897,
1599,
2896,
4002,
647,
10602,
29901,
13,
1678,
565,
1373,
29918,
13892,
29918,
333,
29901,
13,
4706,
565,
22524,
29918,
13892,
29879,
29918,
1272,
338,
6213,
29901,
13,
9651,
22524,
29918,
13892,
29879,
29918,
1272,
353,
2931,
29918,
13892,
29879,
29918,
276,
509,
347,
369,
29889,
657,
29918,
1272,
29918,
8977,
29941,
580,
13,
13,
4706,
565,
1373,
29918,
13892,
29918,
333,
322,
1373,
29918,
13892,
29918,
333,
297,
22524,
29918,
13892,
29879,
29918,
1272,
29889,
8149,
7295,
13,
9651,
1373,
29918,
13892,
29918,
3888,
353,
22524,
29918,
13892,
29879,
29918,
1272,
29961,
3090,
29918,
13892,
29918,
333,
29962,
13,
9651,
1373,
29918,
13892,
29918,
14144,
353,
2896,
4002,
647,
10602,
29898,
3090,
29918,
13892,
29918,
3888,
29892,
16250,
29918,
13892,
29879,
29918,
1272,
29922,
29027,
29918,
13892,
29879,
29918,
1272,
29892,
3233,
29922,
5563,
29897,
13,
9651,
736,
1373,
29918,
13892,
29918,
14144,
13,
13,
1678,
736,
6213,
13,
13,
13,
1753,
679,
29918,
3090,
29918,
13892,
29918,
14144,
29918,
1609,
29918,
978,
29898,
3090,
29918,
978,
29901,
851,
29892,
3233,
29901,
938,
29892,
408,
29918,
17987,
29901,
6120,
353,
6055,
29889,
17171,
29918,
29923,
9486,
3352,
29903,
1125,
13,
1678,
282,
893,
29918,
9294,
29889,
3084,
29918,
10041,
29918,
978,
29898,
3090,
29918,
978,
29892,
525,
3090,
29918,
978,
1495,
13,
1678,
282,
893,
29918,
9294,
29889,
15501,
29918,
275,
29918,
3084,
29918,
16031,
29898,
5563,
29892,
525,
5563,
742,
1375,
29918,
1767,
29922,
29896,
29892,
4236,
29918,
1767,
29922,
29946,
29900,
29892,
2758,
29918,
9290,
29922,
5574,
29897,
13,
13,
1678,
1373,
29918,
13892,
29918,
3888,
353,
2931,
29918,
13892,
29879,
29918,
276,
509,
347,
369,
29889,
657,
29918,
10041,
29918,
13892,
29918,
3888,
29918,
1609,
29918,
978,
29898,
3090,
29918,
978,
29897,
13,
13,
1678,
565,
1373,
29918,
13892,
29918,
3888,
338,
6213,
29901,
13,
4706,
736,
518,
29888,
29915,
23323,
451,
1284,
263,
17616,
4257,
3579,
29912,
3090,
29918,
978,
29913,
1068,
6169,
1402,
7700,
13,
1678,
1683,
29901,
13,
4706,
1373,
29918,
13892,
29918,
14144,
353,
2896,
4002,
647,
10602,
29898,
3090,
29918,
13892,
29918,
3888,
29892,
3233,
29922,
5563,
29897,
13,
4706,
565,
408,
29918,
17987,
29901,
13,
9651,
736,
1373,
29918,
13892,
29918,
14144,
29889,
657,
29918,
14144,
29918,
294,
29918,
17987,
3285,
5852,
13,
4706,
1683,
29901,
13,
9651,
736,
1373,
29918,
13892,
29918,
14144,
29889,
657,
29918,
14144,
29918,
294,
29918,
726,
29918,
5426,
3285,
5852,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
29937,
448,
1378,
29899,
14348,
22140,
448,
1378,
29899,
13,
13,
1753,
679,
29918,
10855,
29918,
13892,
29918,
14144,
29918,
1609,
29918,
978,
29898,
10855,
29918,
978,
29901,
851,
29892,
408,
29918,
17987,
29901,
6120,
353,
6055,
29889,
17171,
29918,
29923,
9486,
3352,
29903,
1125,
13,
1678,
282,
893,
29918,
9294,
29889,
3084,
29918,
10041,
29918,
978,
29898,
10855,
29918,
978,
29897,
13,
13,
1678,
4333,
29918,
13892,
29918,
3888,
353,
4333,
29918,
13892,
29879,
29918,
276,
509,
347,
369,
29889,
657,
29918,
10041,
29918,
13892,
29918,
3888,
29918,
1609,
29918,
978,
29898,
10855,
29918,
978,
29897,
13,
13,
1678,
565,
4333,
29918,
13892,
29918,
3888,
338,
6213,
29901,
13,
4706,
736,
518,
29888,
29915,
23323,
451,
1284,
263,
4333,
4257,
3579,
29912,
10855,
29918,
978,
29913,
1068,
6169,
1402,
7700,
13,
1678,
1683,
29901,
13,
4706,
4333,
29918,
13892,
29918,
14144,
353,
14348,
4002,
647,
10602,
29898,
10855,
29918,
13892,
29918,
3888,
29897,
13,
4706,
565,
408,
29918,
17987,
29901,
13,
9651,
736,
4333,
29918,
13892,
29918,
14144,
29889,
657,
29918,
14144,
29918,
294,
29918,
17987,
3285,
5852,
13,
4706,
1683,
29901,
13,
9651,
736,
4333,
29918,
13892,
29918,
14144,
29889,
657,
29918,
14144,
29918,
294,
29918,
726,
29918,
5426,
3285,
5852,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
29937,
448,
1378,
29899,
1588,
342,
2231,
515,
22140,
448,
1378,
29899,
13,
13,
1753,
679,
29918,
558,
342,
2231,
29918,
3166,
29918,
3888,
29898,
3090,
29918,
978,
29901,
851,
29892,
408,
29918,
17987,
29901,
6120,
353,
6055,
29889,
17171,
29918,
29923,
9486,
3352,
29903,
1125,
13,
1678,
282,
893,
29918,
9294,
29889,
3084,
29918,
10041,
29918,
978,
29898,
3090,
29918,
978,
29897,
13,
13,
1678,
22524,
29918,
13892,
29879,
29918,
1272,
353,
2931,
29918,
13892,
29879,
29918,
276,
509,
347,
369,
29889,
657,
29918,
1272,
29918,
8977,
29941,
580,
13,
1678,
1373,
29918,
3166,
29918,
13892,
29918,
3888,
353,
2931,
29918,
13892,
29879,
29918,
276,
509,
347,
369,
29889,
657,
29918,
10041,
29918,
13892,
29918,
3888,
29918,
1609,
29918,
978,
29898,
3090,
29918,
978,
29892,
7855,
29918,
13892,
29879,
29918,
1272,
29922,
305,
1503,
29918,
13892,
29879,
29918,
1272,
29897,
13,
13,
1678,
565,
451,
1373,
29918,
3166,
29918,
13892,
29918,
3888,
29901,
13,
4706,
736,
518,
29888,
29915,
23323,
451,
1284,
263,
17616,
4257,
3579,
29912,
3090,
29918,
978,
29913,
1068,
6169,
1402,
7700,
13,
1678,
1683,
29901,
13,
4706,
18619,
2231,
29918,
3166,
29918,
1272,
353,
903,
657,
29918,
558,
342,
2231,
29918,
3166,
29918,
1272,
29898,
3090,
29918,
3166,
29918,
13892,
29918,
3888,
29897,
13,
4706,
18619,
2231,
29918,
3166,
29918,
14144,
353,
1588,
342,
2231,
4591,
10602,
29898,
3090,
29918,
3166,
29918,
13892,
29918,
3888,
29892,
22524,
29918,
13892,
29879,
29918,
1272,
29922,
305,
1503,
29918,
13892,
29879,
29918,
1272,
29892,
18619,
2231,
29918,
3166,
29918,
1272,
29922,
558,
342,
2231,
29918,
3166,
29918,
1272,
29897,
13,
13,
4706,
565,
408,
29918,
17987,
29901,
13,
9651,
736,
18619,
2231,
29918,
3166,
29918,
14144,
29889,
657,
29918,
14144,
29918,
294,
29918,
17987,
3285,
5852,
13,
4706,
1683,
29901,
13,
9651,
736,
18619,
2231,
29918,
3166,
29918,
14144,
29889,
657,
29918,
14144,
29918,
294,
29918,
726,
29918,
5426,
3285,
5852,
13,
13,
13,
1753,
903,
657,
29918,
558,
342,
2231,
29918,
3166,
29918,
1272,
29898,
3090,
29918,
13892,
29918,
3888,
29901,
9657,
29897,
1599,
9657,
29901,
13,
1678,
565,
451,
1373,
29918,
13892,
29918,
3888,
29901,
13,
4706,
736,
6571,
13,
13,
1678,
1373,
29918,
13892,
29918,
333,
353,
1373,
29918,
13892,
29918,
3888,
29961,
11282,
17923,
1001,
29918,
2287,
5425,
20728,
29918,
10818,
29918,
5813,
29962,
13,
1678,
565,
1373,
29918,
13892,
29918,
333,
297,
4770,
558,
342,
2231,
29918,
3166,
29918,
8173,
29918,
8977,
29889,
8149,
7295,
13,
4706,
18619,
2231,
29918,
3166,
29918,
8173,
353,
4770,
558,
342,
2231,
29918,
3166,
29918,
8173,
29918,
8977,
29961,
3090,
29918,
13892,
29918,
333,
29962,
13,
1678,
1683,
29901,
13,
4706,
18619,
2231,
29918,
3166,
29918,
8173,
353,
903,
3258,
29918,
392,
29918,
1202,
29918,
558,
342,
2231,
29918,
3166,
29918,
8173,
29898,
3090,
29918,
13892,
29918,
333,
29897,
13,
1678,
736,
18619,
2231,
29918,
3166,
29918,
8173,
29889,
657,
29918,
1272,
29918,
8977,
29941,
580,
13,
13,
13,
1753,
903,
3258,
29918,
392,
29918,
1202,
29918,
558,
342,
2231,
29918,
3166,
29918,
8173,
29898,
3090,
29918,
13892,
29918,
333,
29901,
851,
29897,
1599,
349,
893,
10408,
29901,
13,
1678,
7090,
353,
903,
3258,
29918,
558,
342,
2231,
29918,
3166,
29918,
8173,
29898,
3090,
29918,
13892,
29918,
333,
29897,
13,
1678,
4770,
558,
342,
2231,
29918,
3166,
29918,
8173,
29918,
8977,
29961,
3090,
29918,
13892,
29918,
333,
29962,
353,
7090,
13,
1678,
736,
7090,
13,
13,
13,
1753,
903,
3258,
29918,
558,
342,
2231,
29918,
3166,
29918,
8173,
29898,
3090,
29918,
13892,
29918,
333,
29901,
851,
29897,
1599,
349,
893,
10408,
29901,
13,
1678,
3142,
353,
285,
29915,
29912,
1649,
15094,
1254,
29902,
1692,
29918,
21482,
29918,
25416,
29918,
10145,
1157,
3090,
29918,
13892,
29918,
333,
10162,
13,
1678,
1024,
353,
285,
29915,
4040,
342,
2231,
4591,
29912,
3090,
29918,
13892,
29918,
333,
10162,
13,
1678,
1121,
353,
349,
893,
10408,
29898,
2271,
29892,
1024,
29892,
6213,
29897,
13,
1678,
736,
1121,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
29937,
448,
1378,
29899,
1588,
342,
2231,
304,
22140,
448,
1378,
29899,
13,
13,
1753,
679,
29918,
558,
342,
2231,
29918,
517,
29918,
3888,
29898,
3090,
29918,
978,
29901,
851,
29892,
408,
29918,
17987,
29901,
6120,
353,
6055,
29889,
17171,
29918,
29923,
9486,
3352,
29903,
1125,
13,
1678,
282,
893,
29918,
9294,
29889,
3084,
29918,
10041,
29918,
978,
29898,
3090,
29918,
978,
29897,
13,
13,
1678,
22524,
29918,
13892,
29879,
29918,
1272,
353,
2931,
29918,
13892,
29879,
29918,
276,
509,
347,
369,
29889,
657,
29918,
1272,
29918,
8977,
29941,
580,
13,
1678,
1373,
29918,
517,
29918,
13892,
29918,
3888,
353,
2931,
29918,
13892,
29879,
29918,
276,
509,
347,
369,
29889,
657,
29918,
10041,
29918,
13892,
29918,
3888,
29918,
1609,
29918,
978,
29898,
3090,
29918,
978,
29892,
7855,
29918,
13892,
29879,
29918,
1272,
29922,
305,
1503,
29918,
13892,
29879,
29918,
1272,
29897,
13,
13,
1678,
565,
451,
1373,
29918,
517,
29918,
13892,
29918,
3888,
29901,
13,
4706,
736,
518,
29888,
29915,
23323,
451,
1284,
263,
17616,
4257,
3579,
29912,
3090,
29918,
978,
29913,
1068,
6169,
1402,
7700,
13,
1678,
1683,
29901,
13,
4706,
18619,
2231,
29918,
517,
29918,
1272,
353,
903,
657,
29918,
558,
342,
2231,
29918,
517,
29918,
1272,
29898,
3090,
29918,
517,
29918,
13892,
29918,
3888,
29897,
13,
4706,
18619,
2231,
29918,
517,
29918,
14144,
353,
1588,
342,
2231,
1762,
10602,
29898,
3090,
29918,
517,
29918,
13892,
29918,
3888,
29892,
22524,
29918,
13892,
29879,
29918,
1272,
29922,
305,
1503,
29918,
13892,
29879,
29918,
1272,
29892,
18619,
2231,
29918,
517,
29918,
1272,
29922,
558,
342,
2231,
29918,
517,
29918,
1272,
29897,
13,
13,
4706,
565,
408,
29918,
17987,
29901,
13,
9651,
736,
18619,
2231,
29918,
517,
29918,
14144,
29889,
657,
29918,
14144,
29918,
294,
29918,
17987,
3285,
5852,
13,
4706,
1683,
29901,
13,
9651,
736,
18619,
2231,
29918,
517,
29918,
14144,
29889,
657,
29918,
14144,
29918,
294,
29918,
726,
29918,
5426,
3285,
5852,
13,
13,
13,
1753,
903,
657,
29918,
558,
342,
2231,
29918,
517,
29918,
1272,
29898,
3090,
29918,
13892,
29918,
3888,
29901,
9657,
29897,
1599,
9657,
29901,
13,
1678,
565,
451,
1373,
29918,
13892,
29918,
3888,
29901,
13,
4706,
736,
6571,
13,
13,
1678,
1373,
29918,
13892,
29918,
333,
353,
1373,
29918,
13892,
29918,
3888,
29961,
11282,
17923,
1001,
29918,
2287,
5425,
20728,
29918,
10818,
29918,
5813,
29962,
13,
1678,
565,
1373,
29918,
13892,
29918,
333,
297,
4770,
558,
342,
2231,
29918,
517,
29918,
8173,
29918,
8977,
29889,
8149,
7295,
13,
4706,
18619,
2231,
29918,
517,
29918,
8173,
353,
4770,
558,
342,
2231,
29918,
517,
29918,
8173,
29918,
8977,
29961,
3090,
29918,
13892,
29918,
333,
29962,
13,
1678,
1683,
29901,
13,
4706,
18619,
2231,
29918,
517,
29918,
8173,
353,
903,
3258,
29918,
392,
29918,
1202,
29918,
558,
342,
2231,
29918,
517,
29918,
8173,
29898,
3090,
29918,
13892,
29918,
333,
29897,
13,
1678,
736,
18619,
2231,
29918,
517,
29918,
8173,
29889,
657,
29918,
1272,
29918,
8977,
29941,
580,
13,
13,
13,
1753,
903,
3258,
29918,
392,
29918,
1202,
29918,
558,
342,
2231,
29918,
517,
29918,
8173,
29898,
3090,
29918,
13892,
29918,
333,
29901,
851,
29897,
1599,
349,
893,
10408,
29901,
13,
1678,
7090,
353,
903,
3258,
29918,
558,
342,
2231,
29918,
517,
29918,
8173,
29898,
3090,
29918,
13892,
29918,
333,
29897,
13,
1678,
4770,
558,
342,
2231,
29918,
517,
29918,
8173,
29918,
8977,
29961,
3090,
29918,
13892,
29918,
333,
29962,
353,
7090,
13,
1678,
736,
7090,
13,
13,
13,
1753,
903,
3258,
29918,
558,
342,
2231,
29918,
517,
29918,
8173,
29898,
3090,
29918,
13892,
29918,
333,
29901,
851,
29897,
1599,
349,
893,
10408,
29901,
13,
1678,
3142,
353,
285,
29915,
29912,
1649,
15094,
1254,
29902,
1692,
29918,
4986,
29918,
25416,
29918,
10145,
1157,
3090,
29918,
13892,
29918,
333,
10162,
13,
1678,
1024,
353,
285,
29915,
4040,
342,
2231,
1762,
29912,
3090,
29918,
13892,
29918,
333,
10162,
13,
1678,
1121,
353,
349,
893,
10408,
29898,
2271,
29892,
1024,
29892,
6213,
29897,
13,
1678,
736,
1121,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
29937,
448,
1378,
29899,
21597,
22140,
448,
1378,
29899,
13,
13,
1753,
679,
29918,
5563,
29918,
18253,
29879,
29898,
3166,
29918,
5563,
29901,
938,
29892,
304,
29918,
5563,
29901,
938,
353,
6213,
29897,
1599,
1051,
29901,
13,
1678,
396,
960,
304,
29918,
5563,
29901,
4974,
393,
304,
29918,
5563,
1405,
515,
29918,
5563,
322,
5277,
29871,
29946,
29896,
13,
1678,
396,
15785,
29901,
17945,
1716,
29892,
731,
515,
29918,
5563,
353,
29871,
29896,
13,
1678,
565,
304,
29918,
5563,
29901,
13,
4706,
282,
893,
29918,
9294,
29889,
15501,
29918,
275,
29918,
3084,
29918,
16031,
29898,
3166,
29918,
5563,
29892,
525,
3166,
29918,
5563,
742,
29871,
29896,
29892,
304,
29918,
5563,
448,
29871,
29896,
29897,
13,
4706,
282,
893,
29918,
9294,
29889,
15501,
29918,
275,
29918,
3084,
29918,
16031,
29898,
517,
29918,
5563,
29892,
525,
517,
29918,
5563,
742,
515,
29918,
5563,
718,
29871,
29896,
29892,
29871,
29946,
29900,
29897,
13,
1678,
1683,
29901,
13,
4706,
282,
893,
29918,
9294,
29889,
15501,
29918,
275,
29918,
3084,
29918,
16031,
29898,
3166,
29918,
5563,
29892,
525,
3166,
29918,
5563,
742,
29871,
29906,
29892,
29871,
29946,
29900,
29897,
13,
4706,
304,
29918,
5563,
353,
515,
29918,
5563,
13,
4706,
515,
29918,
5563,
353,
29871,
29896,
13,
13,
1678,
17616,
29918,
18253,
29879,
353,
903,
657,
29918,
1037,
29893,
29918,
18253,
29879,
29898,
3166,
29918,
5563,
29892,
304,
29918,
5563,
29892,
1106,
14340,
29889,
29954,
3289,
29918,
3217,
1254,
29903,
29918,
3927,
8949,
4897,
29892,
1106,
14340,
29889,
29990,
29925,
29918,
3217,
1254,
29903,
29918,
3927,
8949,
4897,
29897,
13,
1678,
15983,
653,
29918,
1037,
29893,
29918,
18253,
29879,
353,
903,
657,
29918,
1037,
29893,
29918,
18253,
29879,
29898,
3166,
29918,
5563,
29892,
304,
29918,
5563,
29892,
1106,
14340,
29889,
29954,
3289,
29918,
3217,
1254,
29903,
29918,
1307,
29954,
11794,
19926,
29918,
3927,
8949,
4897,
29892,
1106,
14340,
29889,
29990,
29925,
29918,
3217,
1254,
29903,
29918,
1307,
29954,
11794,
19926,
29918,
3927,
8949,
4897,
29897,
13,
13,
1678,
17616,
29918,
18253,
29918,
3945,
353,
903,
657,
29918,
1037,
29893,
29918,
18253,
29918,
3945,
29898,
3166,
29918,
5563,
29892,
304,
29918,
5563,
29892,
17616,
29918,
18253,
29879,
29897,
13,
1678,
15983,
653,
29918,
1037,
29893,
29918,
18253,
29918,
3945,
353,
903,
657,
29918,
1037,
29893,
29918,
18253,
29918,
3945,
29898,
3166,
29918,
5563,
29892,
304,
29918,
5563,
29892,
15983,
653,
29918,
1037,
29893,
29918,
18253,
29879,
29897,
13,
13,
1678,
1121,
353,
6024,
1068,
10108,
21544,
1068,
313,
5464,
29899,
26172,
653,
17616,
29892,
4236,
5925,
29897,
2033,
13,
1678,
1121,
29889,
21843,
29898,
1037,
29893,
29918,
18253,
29918,
3945,
29897,
13,
1678,
1121,
29889,
4397,
29898,
11027,
29889,
29923,
3580,
15631,
29918,
18521,
29897,
13,
1678,
1121,
29889,
4397,
877,
1068,
10108,
21544,
1068,
313,
26172,
653,
17616,
29892,
4236,
5925,
29897,
1495,
13,
1678,
1121,
29889,
21843,
29898,
26172,
653,
29918,
1037,
29893,
29918,
18253,
29918,
3945,
29897,
13,
13,
1678,
736,
1121,
29892,
5852,
13,
13,
13,
1753,
903,
657,
29918,
1037,
29893,
29918,
18253,
29879,
29898,
3166,
29918,
5563,
29901,
938,
29892,
304,
29918,
5563,
29901,
938,
29892,
10489,
29918,
18253,
29879,
29918,
20401,
29901,
1051,
29892,
921,
29886,
29918,
18253,
29918,
20401,
29901,
1051,
29897,
1599,
313,
524,
29892,
938,
29892,
938,
29892,
938,
1125,
13,
1678,
10489,
29918,
18253,
353,
10489,
29918,
18253,
29879,
29918,
20401,
29961,
517,
29918,
5563,
448,
29871,
29896,
29962,
13,
1678,
921,
29886,
29918,
18253,
353,
921,
29886,
29918,
18253,
29918,
20401,
29961,
517,
29918,
5563,
448,
29871,
29896,
29962,
13,
1678,
10489,
29918,
18253,
29918,
3166,
353,
2533,
29898,
25496,
29918,
18253,
29879,
29918,
20401,
29961,
3166,
29918,
5563,
29901,
517,
29918,
5563,
2314,
13,
1678,
921,
29886,
29918,
18253,
29918,
3166,
353,
2533,
29898,
26330,
29918,
18253,
29918,
20401,
29961,
3166,
29918,
5563,
29901,
517,
29918,
5563,
2314,
13,
13,
1678,
565,
515,
29918,
5563,
1405,
29871,
29896,
29901,
13,
4706,
736,
313,
8516,
29892,
6213,
29892,
10489,
29918,
18253,
29918,
3166,
29892,
921,
29886,
29918,
18253,
29918,
3166,
29897,
13,
1678,
1683,
29901,
13,
4706,
736,
313,
25496,
29918,
18253,
29892,
921,
29886,
29918,
18253,
29892,
10489,
29918,
18253,
29918,
3166,
29892,
921,
29886,
29918,
18253,
29918,
3166,
29897,
13,
13,
13,
1753,
903,
657,
29918,
1037,
29893,
29918,
18253,
29918,
3945,
29898,
3166,
29918,
5563,
29901,
938,
29892,
304,
29918,
5563,
29901,
938,
29892,
21544,
29901,
18761,
29897,
1599,
1051,
29901,
13,
1678,
1121,
353,
5159,
13,
1678,
565,
515,
29918,
5563,
1275,
29871,
29896,
29901,
13,
4706,
1121,
29889,
4397,
29898,
29888,
29915,
2577,
1259,
515,
3233,
426,
517,
29918,
5563,
448,
29871,
29896,
29901,
29881,
29913,
304,
426,
517,
29918,
5563,
29901,
29881,
29913,
6858,
426,
18253,
29879,
29961,
29896,
5387,
29892,
29913,
426,
331,
3848,
275,
29889,
567,
29879,
29918,
6112,
29918,
26330,
29913,
322,
426,
18253,
29879,
29961,
29900,
5387,
29892,
1157,
331,
3848,
275,
29889,
567,
29879,
29918,
25496,
29918,
3752,
1836,
1495,
13,
1678,
1121,
29889,
4397,
29898,
29888,
29915,
2577,
1259,
515,
3233,
426,
3166,
29918,
5563,
29901,
29881,
29913,
304,
426,
517,
29918,
5563,
29901,
29881,
29913,
6858,
426,
18253,
29879,
29961,
29941,
5387,
29892,
29913,
426,
331,
3848,
275,
29889,
567,
29879,
29918,
6112,
29918,
26330,
29913,
322,
426,
18253,
29879,
29961,
29906,
5387,
29892,
1157,
331,
3848,
275,
29889,
567,
29879,
29918,
25496,
29918,
3752,
1836,
1495,
13,
13,
1678,
736,
1121,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
29937,
448,
1378,
29899,
10886,
309,
2133,
448,
1378,
29899,
13,
13,
18609,
29918,
13892,
29879,
29918,
276,
509,
347,
369,
353,
7855,
29889,
6691,
4002,
647,
29879,
8015,
2546,
369,
29898,
13,
1678,
26871,
17923,
1001,
29918,
2287,
5425,
20728,
29918,
25416,
29918,
10145,
29892,
13,
1678,
26871,
17923,
1001,
29918,
2287,
5425,
20728,
29918,
10818,
29918,
5813,
29892,
13,
1678,
26871,
17923,
1001,
29918,
2287,
5425,
20728,
29918,
2287,
7187,
24290,
2725,
29918,
8618,
13171,
15631,
29918,
5813,
29892,
13,
1678,
7090,
29918,
978,
2433,
20755,
4002,
647,
29879,
29915,
13,
29897,
13,
13,
10855,
29918,
13892,
29879,
29918,
276,
509,
347,
369,
353,
7855,
29889,
6691,
4002,
647,
29879,
8015,
2546,
369,
29898,
13,
1678,
23958,
3281,
2725,
29918,
2287,
5425,
20728,
29918,
25416,
29918,
10145,
29892,
13,
1678,
23958,
3281,
2725,
29918,
2287,
5425,
20728,
29918,
10818,
29918,
5813,
29892,
13,
1678,
23958,
3281,
2725,
29918,
2287,
5425,
20728,
29918,
2287,
7187,
24290,
2725,
29918,
8618,
13171,
15631,
29918,
5813,
29892,
13,
1678,
7090,
29918,
978,
2433,
7196,
4002,
647,
29879,
29915,
13,
29897,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
29937,
3617,
1002,
363,
3233,
29901,
13,
29937,
448,
679,
28869,
525,
29886,
29915,
491,
1019,
11476,
1542,
29901,
13,
29937,
259,
448,
22985,
29901,
282,
353,
29871,
29896,
29889,
29900,
13,
29937,
259,
448,
382,
559,
797,
29901,
282,
353,
29871,
29906,
29889,
29900,
13,
29937,
259,
448,
382,
559,
3744,
29901,
282,
353,
29871,
29900,
29889,
29945,
13,
29937,
448,
679,
1375,
1002,
525,
1195,
29915,
669,
4236,
1002,
525,
3317,
29915,
13,
29937,
1121,
353,
1375,
718,
313,
3317,
448,
1375,
29897,
334,
5135,
5563,
448,
29871,
29896,
29897,
847,
29871,
29941,
29929,
29897,
3579,
282,
13,
13,
29937,
448,
1378,
29899,
4321,
292,
448,
1378,
29899,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
285,
353,
679,
29918,
5563,
29918,
18253,
29879,
29898,
29906,
29900,
29892,
29871,
29941,
29900,
29897,
13,
1678,
1243,
29918,
1037,
29893,
353,
518,
877,
284,
29886,
11216,
742,
29871,
29945,
4638,
13,
1678,
363,
313,
1037,
29893,
29918,
978,
29892,
3233,
29897,
297,
1243,
29918,
1037,
29893,
29901,
13,
4706,
2897,
29889,
5205,
877,
8551,
1495,
13,
4706,
1121,
353,
679,
29918,
3090,
29918,
13892,
29918,
14144,
29918,
1609,
29918,
978,
29898,
1037,
29893,
29918,
978,
29892,
3233,
29892,
408,
29918,
17987,
29922,
8824,
29897,
13,
4706,
363,
1196,
297,
1121,
29961,
29900,
5387,
13,
9651,
1596,
29898,
1220,
29897,
13,
4706,
1596,
877,
1495,
13,
4706,
1121,
353,
679,
29918,
558,
342,
2231,
29918,
3166,
29918,
3888,
29898,
1037,
29893,
29918,
978,
29892,
408,
29918,
17987,
29922,
8824,
29897,
13,
4706,
363,
1196,
297,
1121,
29961,
29900,
5387,
13,
9651,
1596,
29898,
1220,
29897,
13,
4706,
1596,
877,
1495,
13,
4706,
1121,
353,
679,
29918,
558,
342,
2231,
29918,
517,
29918,
3888,
29898,
1037,
29893,
29918,
978,
29892,
408,
29918,
17987,
29922,
8824,
29897,
13,
4706,
363,
1196,
297,
1121,
29961,
29900,
5387,
13,
9651,
1596,
29898,
1220,
29897,
13,
4706,
1596,
877,
1495,
13,
4706,
1121,
353,
6629,
13,
2
] |
grimer/metadata.py | pirovc/grimer | 5 | 8790 | import pandas as pd
from pandas.api.types import is_numeric_dtype
from grimer.utils import print_log
class Metadata:
valid_types = ["categorical", "numeric"]
default_type = "categorical"
def __init__(self, metadata_file, samples: list=[]):
# Read metadata and let pandas guess dtypes, index as str
self.data = pd.read_table(metadata_file, sep='\t', header=0, skiprows=0, index_col=0, dtype={0:str})
# Enforce string index
self.data.index = self.data.index.astype('str')
# Define all COLUMN TYPES as default
self.types = pd.Series(self.default_type, index=self.data.columns)
# Set types
if str(self.data.index[0]).startswith("#"):
# types defined on file
self.set_hard_types()
else:
# guessed types from read_table
self.types[self.data.dtypes.map(is_numeric_dtype)] = "numeric"
# Convert datatypes to adequate numeric values (int, float)
self.data = self.data.convert_dtypes(infer_objects=False, convert_string=False)
# Re-convert everython to object to standardize (int64 NA is not seriazable on bokeh)
self.data = self.data.astype("object")
# Remove empty fields
null_cols = self.data.isna().all(axis=0)
if any(null_cols):
self.data = self.data.loc[:, ~null_cols]
self.types = self.types[~null_cols]
print_log(str(sum(null_cols)) + " fields removed without valid values")
# Convert NaN on categorical to ""
self.data[self.types[self.types == "categorical"].index] = self.data[self.types[self.types == "categorical"].index].fillna('')
# Remove names
self.data.index.names = [None]
self.types.name = None
# sort and filter by given samples
if samples:
self.data = self.data.reindex(samples)
# Check if matched metadata and samples
null_rows = self.data.isna().all(axis=1)
if any(null_rows):
#self.data = self.data.loc[~null_rows, :]
print_log(str(sum(null_rows)) + " samples without valid metadata")
def __repr__(self):
args = ['{}={}'.format(k, repr(v)) for (k, v) in vars(self).items()]
return 'Metadata({})'.format(', '.join(args))
def set_hard_types(self):
# Get values defined on the first row
self.types = self.data.iloc[0]
# Drop row with types from main data
self.data.drop(self.types.name, inplace=True)
# Validate declared types
idx_valid = self.types.isin(self.valid_types)
if not idx_valid.all():
print_log("Invalid metadata types replaced by: " + self.default_type)
self.types[~idx_valid] = self.default_type
# Enforce column type on dataframe
self.data[self.types[self.types == "categorical"].index] = self.data[self.types[self.types == "categorical"].index].astype(str)
self.data[self.types[self.types == "numeric"].index] = self.data[self.types[self.types == "numeric"].index].apply(pd.to_numeric)
def get_col_headers(self):
return self.data.columns
def get_data(self, metadata_type: str=None):
if metadata_type is not None:
return self.data[self.types[self.types == metadata_type].index]
else:
return self.data
def get_col(self, col):
return self.data[col]
def get_unique_values(self, col):
return sorted(self.get_col(col).dropna().unique())
def get_formatted_unique_values(self, col):
if self.types[col] == "categorical":
return self.get_unique_values(col)
else:
return list(map('{:.16g}'.format, self.get_unique_values(col)))
def get_type(self, col):
return self.types[col]
def get_subset(self, column, value):
return self.data[self.data[column] == value]
| [
1,
1053,
11701,
408,
10518,
13,
3166,
11701,
29889,
2754,
29889,
8768,
1053,
338,
29918,
21574,
29918,
29881,
1853,
13,
3166,
867,
4193,
29889,
13239,
1053,
1596,
29918,
1188,
13,
13,
13,
1990,
4737,
7221,
29901,
13,
1678,
2854,
29918,
8768,
353,
6796,
29883,
20440,
936,
613,
376,
21574,
3108,
13,
1678,
2322,
29918,
1853,
353,
376,
29883,
20440,
936,
29908,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
15562,
29918,
1445,
29892,
11916,
29901,
1051,
29922,
2636,
1125,
13,
4706,
396,
7523,
15562,
322,
1235,
11701,
4140,
270,
8768,
29892,
2380,
408,
851,
13,
4706,
1583,
29889,
1272,
353,
10518,
29889,
949,
29918,
2371,
29898,
19635,
29918,
1445,
29892,
16345,
2433,
29905,
29873,
742,
4839,
29922,
29900,
29892,
14383,
5727,
29922,
29900,
29892,
2380,
29918,
1054,
29922,
29900,
29892,
26688,
3790,
29900,
29901,
710,
1800,
13,
13,
4706,
396,
1174,
10118,
1347,
2380,
13,
4706,
1583,
29889,
1272,
29889,
2248,
353,
1583,
29889,
1272,
29889,
2248,
29889,
579,
668,
877,
710,
1495,
13,
13,
4706,
396,
22402,
599,
23958,
29127,
323,
29979,
29925,
2890,
408,
2322,
13,
4706,
1583,
29889,
8768,
353,
10518,
29889,
19204,
29898,
1311,
29889,
4381,
29918,
1853,
29892,
2380,
29922,
1311,
29889,
1272,
29889,
13099,
29897,
13,
13,
4706,
396,
3789,
4072,
13,
4706,
565,
851,
29898,
1311,
29889,
1272,
29889,
2248,
29961,
29900,
14664,
27382,
2541,
14822,
29908,
1125,
13,
9651,
396,
4072,
3342,
373,
934,
13,
9651,
1583,
29889,
842,
29918,
6800,
29918,
8768,
580,
13,
4706,
1683,
29901,
13,
9651,
396,
4140,
287,
4072,
515,
1303,
29918,
2371,
13,
9651,
1583,
29889,
8768,
29961,
1311,
29889,
1272,
29889,
29881,
8768,
29889,
1958,
29898,
275,
29918,
21574,
29918,
29881,
1853,
4638,
353,
376,
21574,
29908,
13,
13,
4706,
396,
14806,
1418,
271,
7384,
304,
19967,
339,
403,
16985,
1819,
313,
524,
29892,
5785,
29897,
13,
4706,
1583,
29889,
1272,
353,
1583,
29889,
1272,
29889,
13441,
29918,
29881,
8768,
29898,
262,
571,
29918,
12650,
29922,
8824,
29892,
3588,
29918,
1807,
29922,
8824,
29897,
13,
4706,
396,
830,
29899,
13441,
1432,
386,
265,
304,
1203,
304,
3918,
675,
313,
524,
29953,
29946,
8598,
338,
451,
28844,
29920,
519,
373,
1045,
446,
29882,
29897,
13,
4706,
1583,
29889,
1272,
353,
1583,
29889,
1272,
29889,
579,
668,
703,
3318,
1159,
13,
13,
4706,
396,
15154,
4069,
4235,
13,
4706,
1870,
29918,
22724,
353,
1583,
29889,
1272,
29889,
275,
1056,
2141,
497,
29898,
8990,
29922,
29900,
29897,
13,
4706,
565,
738,
29898,
4304,
29918,
22724,
1125,
13,
9651,
1583,
29889,
1272,
353,
1583,
29889,
1272,
29889,
2029,
7503,
29892,
3695,
4304,
29918,
22724,
29962,
13,
9651,
1583,
29889,
8768,
353,
1583,
29889,
8768,
29961,
30022,
4304,
29918,
22724,
29962,
13,
9651,
1596,
29918,
1188,
29898,
710,
29898,
2083,
29898,
4304,
29918,
22724,
876,
718,
376,
4235,
6206,
1728,
2854,
1819,
1159,
13,
13,
4706,
396,
14806,
18780,
373,
11608,
936,
304,
5124,
13,
4706,
1583,
29889,
1272,
29961,
1311,
29889,
8768,
29961,
1311,
29889,
8768,
1275,
376,
29883,
20440,
936,
16862,
2248,
29962,
353,
1583,
29889,
1272,
29961,
1311,
29889,
8768,
29961,
1311,
29889,
8768,
1275,
376,
29883,
20440,
936,
16862,
2248,
1822,
5589,
1056,
877,
1495,
13,
13,
4706,
396,
15154,
2983,
13,
4706,
1583,
29889,
1272,
29889,
2248,
29889,
7039,
353,
518,
8516,
29962,
13,
4706,
1583,
29889,
8768,
29889,
978,
353,
6213,
13,
13,
4706,
396,
2656,
322,
4175,
491,
2183,
11916,
13,
4706,
565,
11916,
29901,
13,
9651,
1583,
29889,
1272,
353,
1583,
29889,
1272,
29889,
276,
2248,
29898,
27736,
29897,
13,
13,
4706,
396,
5399,
565,
19228,
15562,
322,
11916,
13,
4706,
1870,
29918,
5727,
353,
1583,
29889,
1272,
29889,
275,
1056,
2141,
497,
29898,
8990,
29922,
29896,
29897,
13,
4706,
565,
738,
29898,
4304,
29918,
5727,
1125,
13,
9651,
396,
1311,
29889,
1272,
353,
1583,
29889,
1272,
29889,
2029,
29961,
30022,
4304,
29918,
5727,
29892,
584,
29962,
13,
9651,
1596,
29918,
1188,
29898,
710,
29898,
2083,
29898,
4304,
29918,
5727,
876,
718,
376,
11916,
1728,
2854,
15562,
1159,
13,
13,
1678,
822,
4770,
276,
558,
12035,
1311,
1125,
13,
4706,
6389,
353,
6024,
8875,
3790,
29913,
4286,
4830,
29898,
29895,
29892,
2062,
29898,
29894,
876,
363,
313,
29895,
29892,
325,
29897,
297,
24987,
29898,
1311,
467,
7076,
580,
29962,
13,
4706,
736,
525,
18417,
3319,
1800,
4286,
4830,
29317,
15300,
7122,
29898,
5085,
876,
13,
13,
1678,
822,
731,
29918,
6800,
29918,
8768,
29898,
1311,
1125,
13,
4706,
396,
3617,
1819,
3342,
373,
278,
937,
1948,
13,
4706,
1583,
29889,
8768,
353,
1583,
29889,
1272,
29889,
309,
542,
29961,
29900,
29962,
13,
4706,
396,
20724,
1948,
411,
4072,
515,
1667,
848,
13,
4706,
1583,
29889,
1272,
29889,
8865,
29898,
1311,
29889,
8768,
29889,
978,
29892,
297,
6689,
29922,
5574,
29897,
13,
4706,
396,
15758,
403,
8052,
4072,
13,
4706,
22645,
29918,
3084,
353,
1583,
29889,
8768,
29889,
275,
262,
29898,
1311,
29889,
3084,
29918,
8768,
29897,
13,
4706,
565,
451,
22645,
29918,
3084,
29889,
497,
7295,
13,
9651,
1596,
29918,
1188,
703,
13919,
15562,
4072,
8611,
491,
29901,
376,
718,
1583,
29889,
4381,
29918,
1853,
29897,
13,
9651,
1583,
29889,
8768,
29961,
30022,
13140,
29918,
3084,
29962,
353,
1583,
29889,
4381,
29918,
1853,
13,
4706,
396,
1174,
10118,
1897,
1134,
373,
12205,
13,
4706,
1583,
29889,
1272,
29961,
1311,
29889,
8768,
29961,
1311,
29889,
8768,
1275,
376,
29883,
20440,
936,
16862,
2248,
29962,
353,
1583,
29889,
1272,
29961,
1311,
29889,
8768,
29961,
1311,
29889,
8768,
1275,
376,
29883,
20440,
936,
16862,
2248,
1822,
579,
668,
29898,
710,
29897,
13,
4706,
1583,
29889,
1272,
29961,
1311,
29889,
8768,
29961,
1311,
29889,
8768,
1275,
376,
21574,
16862,
2248,
29962,
353,
1583,
29889,
1272,
29961,
1311,
29889,
8768,
29961,
1311,
29889,
8768,
1275,
376,
21574,
16862,
2248,
1822,
7302,
29898,
15926,
29889,
517,
29918,
21574,
29897,
13,
13,
1678,
822,
679,
29918,
1054,
29918,
13662,
29898,
1311,
1125,
13,
4706,
736,
1583,
29889,
1272,
29889,
13099,
13,
13,
1678,
822,
679,
29918,
1272,
29898,
1311,
29892,
15562,
29918,
1853,
29901,
851,
29922,
8516,
1125,
13,
4706,
565,
15562,
29918,
1853,
338,
451,
6213,
29901,
13,
9651,
736,
1583,
29889,
1272,
29961,
1311,
29889,
8768,
29961,
1311,
29889,
8768,
1275,
15562,
29918,
1853,
1822,
2248,
29962,
13,
4706,
1683,
29901,
13,
9651,
736,
1583,
29889,
1272,
13,
13,
1678,
822,
679,
29918,
1054,
29898,
1311,
29892,
784,
1125,
13,
4706,
736,
1583,
29889,
1272,
29961,
1054,
29962,
13,
13,
1678,
822,
679,
29918,
13092,
29918,
5975,
29898,
1311,
29892,
784,
1125,
13,
4706,
736,
12705,
29898,
1311,
29889,
657,
29918,
1054,
29898,
1054,
467,
8865,
1056,
2141,
13092,
3101,
13,
13,
1678,
822,
679,
29918,
689,
19667,
29918,
13092,
29918,
5975,
29898,
1311,
29892,
784,
1125,
13,
4706,
565,
1583,
29889,
8768,
29961,
1054,
29962,
1275,
376,
29883,
20440,
936,
1115,
13,
9651,
736,
1583,
29889,
657,
29918,
13092,
29918,
5975,
29898,
1054,
29897,
13,
4706,
1683,
29901,
13,
9651,
736,
1051,
29898,
1958,
877,
25641,
29889,
29896,
29953,
29887,
29913,
4286,
4830,
29892,
1583,
29889,
657,
29918,
13092,
29918,
5975,
29898,
1054,
4961,
13,
13,
1678,
822,
679,
29918,
1853,
29898,
1311,
29892,
784,
1125,
13,
4706,
736,
1583,
29889,
8768,
29961,
1054,
29962,
13,
13,
1678,
822,
679,
29918,
6484,
29898,
1311,
29892,
1897,
29892,
995,
1125,
13,
4706,
736,
1583,
29889,
1272,
29961,
1311,
29889,
1272,
29961,
4914,
29962,
1275,
995,
29962,
13,
2
] |
tests/middleware/test_csrf_middleware.py | w3x10e8/core | 0 | 355 | <filename>tests/middleware/test_csrf_middleware.py
from masonite.request import Request
from masonite.view import View
from masonite.auth.Csrf import Csrf
from masonite.app import App
from masonite.middleware import CsrfMiddleware
from masonite.testsuite.TestSuite import generate_wsgi
import pytest
from masonite.exceptions import InvalidCSRFToken
class TestCSRFMiddleware:
def setup_method(self):
self.app = App()
self.request = Request(generate_wsgi())
self.view = View(self.app)
self.app.bind('Request', self.request)
self.request = self.app.make('Request')
self.middleware = CsrfMiddleware(self.request, Csrf(self.request), self.view)
def test_middleware_shares_correct_input(self):
self.middleware.before()
assert 'csrf_field' in self.view.dictionary
assert self.view.dictionary['csrf_field'].startswith("<input type='hidden' name='__token' value='")
def test_middleware_throws_exception_on_post(self):
self.request.environ['REQUEST_METHOD'] = 'POST'
self.middleware.exempt = []
with pytest.raises(InvalidCSRFToken):
self.middleware.before()
def test_incoming_token_does_not_throw_exception_with_token(self):
self.request.environ['REQUEST_METHOD'] = 'POST'
self.request.request_variables.update({'__token': self.request.get_cookie('csrf_token')})
self.middleware.exempt = []
self.middleware.before()
| [
1,
529,
9507,
29958,
21150,
29914,
17662,
2519,
29914,
1688,
29918,
2395,
9600,
29918,
17662,
2519,
29889,
2272,
13,
3166,
286,
1658,
568,
29889,
3827,
1053,
10729,
13,
3166,
286,
1658,
568,
29889,
1493,
1053,
4533,
13,
3166,
286,
1658,
568,
29889,
5150,
29889,
29907,
29879,
9600,
1053,
24277,
9600,
13,
3166,
286,
1658,
568,
29889,
932,
1053,
2401,
13,
3166,
286,
1658,
568,
29889,
17662,
2519,
1053,
24277,
9600,
25411,
2519,
13,
3166,
286,
1658,
568,
29889,
1688,
13495,
29889,
3057,
5091,
568,
1053,
5706,
29918,
5652,
3146,
13,
5215,
11451,
1688,
13,
3166,
286,
1658,
568,
29889,
11739,
29879,
1053,
21403,
9295,
29934,
29943,
6066,
13,
13,
13,
1990,
4321,
9295,
29934,
22192,
2632,
2519,
29901,
13,
13,
1678,
822,
6230,
29918,
5696,
29898,
1311,
1125,
13,
4706,
1583,
29889,
932,
353,
2401,
580,
13,
4706,
1583,
29889,
3827,
353,
10729,
29898,
17158,
29918,
5652,
3146,
3101,
13,
4706,
1583,
29889,
1493,
353,
4533,
29898,
1311,
29889,
932,
29897,
13,
4706,
1583,
29889,
932,
29889,
5355,
877,
3089,
742,
1583,
29889,
3827,
29897,
13,
13,
4706,
1583,
29889,
3827,
353,
1583,
29889,
932,
29889,
5675,
877,
3089,
1495,
13,
13,
4706,
1583,
29889,
17662,
2519,
353,
24277,
9600,
25411,
2519,
29898,
1311,
29889,
3827,
29892,
24277,
9600,
29898,
1311,
29889,
3827,
511,
1583,
29889,
1493,
29897,
13,
13,
1678,
822,
1243,
29918,
17662,
2519,
29918,
845,
5114,
29918,
15728,
29918,
2080,
29898,
1311,
1125,
13,
4706,
1583,
29889,
17662,
2519,
29889,
11083,
580,
13,
4706,
4974,
525,
2395,
9600,
29918,
2671,
29915,
297,
1583,
29889,
1493,
29889,
27126,
13,
4706,
4974,
1583,
29889,
1493,
29889,
27126,
1839,
2395,
9600,
29918,
2671,
13359,
27382,
2541,
28945,
2080,
1134,
2433,
10892,
29915,
1024,
2433,
1649,
6979,
29915,
995,
2433,
1159,
13,
13,
1678,
822,
1243,
29918,
17662,
2519,
29918,
386,
5727,
29918,
11739,
29918,
265,
29918,
2490,
29898,
1311,
1125,
13,
4706,
1583,
29889,
3827,
29889,
21813,
1839,
16244,
29918,
2303,
4690,
13668,
2033,
353,
525,
5438,
29915,
13,
4706,
1583,
29889,
17662,
2519,
29889,
735,
3456,
353,
5159,
13,
4706,
411,
11451,
1688,
29889,
336,
4637,
29898,
13919,
9295,
29934,
29943,
6066,
1125,
13,
9651,
1583,
29889,
17662,
2519,
29889,
11083,
580,
13,
13,
1678,
822,
1243,
29918,
262,
11506,
29918,
6979,
29918,
13221,
29918,
1333,
29918,
20539,
29918,
11739,
29918,
2541,
29918,
6979,
29898,
1311,
1125,
13,
4706,
1583,
29889,
3827,
29889,
21813,
1839,
16244,
29918,
2303,
4690,
13668,
2033,
353,
525,
5438,
29915,
13,
4706,
1583,
29889,
3827,
29889,
3827,
29918,
20897,
29889,
5504,
3319,
29915,
1649,
6979,
2396,
1583,
29889,
3827,
29889,
657,
29918,
21509,
877,
2395,
9600,
29918,
6979,
1495,
1800,
13,
4706,
1583,
29889,
17662,
2519,
29889,
735,
3456,
353,
5159,
13,
4706,
1583,
29889,
17662,
2519,
29889,
11083,
580,
13,
2
] |
app-dev/app/controllers.py | johnnybarrels/unicode | 0 | 76650 | from app import app, db
from flask import request
from app.models import User, Course, Test, Question, Result, enrolments, Submission
from app.forms import LoginForm, RegistrationForm, NewTestForm, NewCourseForm, RenameTestForm, QuestionForm, QuestionSubmissionForm, AddStudentToCourseForm, MarkTestForm, FeedbackForm
from flask import render_template, flash, redirect, url_for, request
from flask_login import current_user, login_user, logout_user, login_required
class UserController():
def login():
form = LoginForm()
if form.validate_on_submit():
# Check that user is in db and that password is correct
user = User.query.filter_by(email=form.email.data).first()
if user is None or not user.check_password(form.password.data):
flash('Invalid username or password')
return redirect(url_for('login'))
login_user(user)
if user.is_admin:
return redirect(url_for('admin_portal'))
else:
return redirect(url_for('student_portal'))
# for GET request (browser loading page)
return render_template('index.html', form=form)
def show_portal():
if current_user.is_admin:
course_form = NewCourseForm()
return render_template('admin.html', course_form=course_form)
else:
return render_template('student.html')
def course_view(course_id):
course = Course.query.filter_by(id=course_id).first()
tests = course.tests
form = NewTestForm()
rename_test_form = RenameTestForm()
course_users = course.get_users()
new_test_form = NewTestForm()
course_form = NewCourseForm()
add_student_form = AddStudentToCourseForm()
if current_user.is_admin:
return render_template('admin-course.html', add_student_form=add_student_form,
rename_test_form=rename_test_form, course_users=course_users,
course_form=course_form, new_test_form=new_test_form, course=course,
tests=tests)
else:
live_tests = [test for test in tests if test.is_live]
return render_template('student-course.html', course=course, tests=live_tests)
def logout():
logout_user()
return redirect(url_for('login'))
def register():
form = RegistrationForm()
if form.validate_on_submit():
user = User(first_name=form.first_name.data,
last_name=form.last_name.data, email=form.email.data,
is_admin=0)
# If submitted email is already in db
if User.query.filter_by(email=user.email).first() is not None:
flash('Email is already registered!')
flash('Please log in below')
return redirect(url_for('login'))
user.set_password(form.password.data)
db.session.add(user)
db.session.commit()
flash("You have registered")
flash("Please log in below")
return redirect(url_for('login'))
return render_template('register.html', title="Register", form=form)
class CourseController():
def aggregate_view():
courses = Course.query.all()
return render_template('general-dashboard.html', courses=courses)
def create_test(course_id):
form = NewTestForm()
course = Course.query.filter_by(id=course_id).first()
tests = course.tests
if form.validate_on_submit():
test = Test()
test.name = form.test_name.data
test.course_id = course.id
db.session.add(test)
db.session.commit()
return redirect(url_for('course_view', course_id=course.id))
return redirect(url_for('course_view', course_id=course.id))
def create_course():
course_form = NewCourseForm()
if course_form.validate_on_submit():
course = Course()
course.name = course_form.course_name.data
course.course_code = course_form.course_code.data
db.session.add(course)
current_user.courses.append(course)
db.session.commit()
return redirect(url_for('admin_portal'))
return redirect(url_for('admin_portal', course_form=course_form))
def add_student(course_id):
add_student_form = AddStudentToCourseForm()
course = Course.query.filter_by(id=course_id).first()
if add_student_form.validate_on_submit():
student_email = add_student_form.student_email.data
student = User.query.filter_by(email=student_email).first()
if student:
student.courses.append(course)
db.session.commit()
return redirect(url_for('course_view', course_id=course_id))
return redirect(url_for('course_view', course_id=course_id))
def remove_student(course_id, student_id):
course = Course.query.filter_by(id=course_id).first()
student = User.query.filter_by(id=student_id).first()
if student:
student.courses.remove(course)
db.session.commit()
return redirect(url_for('course_view', course_id=course_id))
return redirect(url_for('course_view', course_id=course_id))
class TestController():
def create_test():
form = NewTestForm()
pass
def delete_test(course_id, test_id):
test = Test.query.filter_by(id=test_id).first()
db.session.delete(test)
db.session.commit()
return redirect(url_for('course_view', course_id=course_id))
def show_test(course_id, test_id):
course = Course.query.filter_by(id=course_id).first()
test = Test.query.filter_by(id=test_id).first()
users = course.get_users()
max_mark = test.get_max_mark()
min_mark = test.get_min_mark()
test_avg = test.get_average_mark()
if current_user.is_admin:
num_results = test.get_num_results()
num_enrolled_students = course.get_num_enrolments()
aggregates = [num_results, num_enrolled_students,
test_avg, max_mark, min_mark]
submitted_users = test.get_submitted_users()
rename_test_form = RenameTestForm()
course_form = NewCourseForm()
return render_template('admin-test-view.html', course=course,
course_form=course_form, test=test,
rename_test_form=rename_test_form,
submitted_users=submitted_users, aggregates=aggregates) # results=results
else:
student_result = test.get_student_result(current_user.id)
aggregates = []
if student_result:
student_perc = round(student_result.score / test.total_marks() * 100, 2)
aggregates = [student_perc,
test_avg, max_mark, min_mark]
return render_template('student-test-view.html',
aggregates=aggregates,
test=test, course=course,
student_result=student_result)
def edit_test_view(course_id, test_id):
course = Course.query.filter_by(id=course_id).first()
test = Test.query.filter_by(id=test_id).first()
questions = test.questions
form = QuestionForm()
course_form = NewCourseForm()
return render_template('admin-test-edit.html', course=course,
test=test, questions=questions,
form=form, course_form=course_form)
def rename_test(course_id, test_id):
test = Test.query.filter_by(id=test_id).first()
form = RenameTestForm()
if form.validate_on_submit():
test.name = form.new_test_name.data
db.session.commit()
redirect(url_for('test_view', course_id=course_id, test_id=test_id))
return redirect(url_for('test_view', course_id=course_id, test_id=test_id))
def toggle_live(course_id, test_id):
test = Test.query.filter_by(id=test_id).first()
if test.is_live:
test.is_live = False
else:
test.is_live = True
db.session.commit()
return redirect(url_for('course_view', course_id=course_id))
def edit_question(course_id, test_id, question_id):
course = Course.query.filter_by(id=course_id).first()
test = Test.query.filter_by(id=test_id).first()
q = Question.query.filter_by(id=question_id).first()
form = QuestionForm()
if form.delete.data:
db.session.delete(q)
db.session.commit()
return redirect(url_for('edit_test_view', course_id=course_id,
test_id=test_id))
if form.validate_on_submit():
if form.save.data:
q.test_id = test_id
q.question_type = int(form.question_type.data)
q.question_string = repr(form.description.data.encode())[2:-1]
q.code_string = repr(form.code_string.data.encode())[2:-1]
q.mcq_1 = form.mcq_1.data
q.mcq_2 = form.mcq_2.data
q.mcq_3 = form.mcq_3.data
q.mcq_4 = form.mcq_4.data
q.mcq_answer = form.mcq_solution.data
q.answer = form.solution.data
q.mark_alloc = form.mark_alloc.data
db.session.commit()
return redirect(url_for('edit_test_view', course_id=course_id,
test_id=test_id))
def new_question(course_id, test_id):
form = QuestionForm()
if form.validate_on_submit():
q = Question()
q.test_id = test_id
q.question_type = int(form.question_type.data)
q.question_string = repr(form.description.data.encode())[2:-1]
q.code_string = repr(form.code_string.data.encode())[2:-1]
q.mcq_1 = form.mcq_1.data
q.mcq_2 = form.mcq_2.data
q.mcq_3 = form.mcq_3.data
q.mcq_4 = form.mcq_4.data
q.mcq_answer = form.mcq_solution.data
q.answer = form.solution.data
q.mark_alloc = form.mark_alloc.data
db.session.add(q)
db.session.commit()
return redirect(url_for('edit_test_view', course_id=course_id, test_id=test_id))
def take_test(course_id, test_id):
course = Course.query.filter_by(id=course_id).first()
test = Test.query.filter_by(id=test_id).first()
questions = test.questions
form = QuestionSubmissionForm()
return render_template('take-test.html', course=course, test=test, questions=questions, form=form)
def new_submission(course_id, test_id, question_id):
q = Question.query.filter_by(id=question_id).first()
sub = q.get_user_submission(current_user.id)
if not sub: # if no existing submission exists
sub = Submission()
sub.user_id = current_user.id
sub.test_id = test_id
sub.question_id = question_id
form = QuestionSubmissionForm()
if form.validate_on_submit():
if q.question_type == 1:
sub.output_sub = form.output_answer.data
elif q.question_type == 2:
sub.mcq_sub = form.mcq_answer.data
elif q.question_type == 3:
sub.code_sub = repr(form.code_answer.data)[1:-1]
db.session.add(sub)
db.session.commit()
return redirect(url_for('take_test', course_id=course_id, test_id=test_id))
def submit_test(course_id, test_id):
test = Test.query.filter_by(id=test_id).first()
user_id = current_user.id
questions = test.questions # Question.query.filter_by(test_id=test_id)
submissions = test.get_user_submissions(user_id)
total = 0
for submission in submissions:
submission.auto_mark()
total += submission.score
result = Result(user_id=user_id, test_id=test_id, score=total)
db.session.add(result)
db.session.commit()
if not any([q.question_type == 3 for q in questions]):
result.needs_marking = False
return redirect(url_for('course_view', course_id=course_id))
def mark_test(course_id, test_id, student_id):
course = Course.query.filter_by(id=course_id).first()
test = Test.query.filter_by(id=test_id).first()
questions = test.questions
student = User.query.filter_by(id=student_id).first()
submissions = test.get_user_submissions(student_id)
course_form = NewCourseForm()
feedback_form = FeedbackForm()
form = MarkTestForm()
return render_template('mark-test.html', course=course,
course_form=course_form, student=student,
test=test, questions=questions,
submissions=submissions, form=form,
feedback_form=feedback_form)
def mark_submission(course_id, test_id, student_id, submission_id):
submission = Submission.query.filter_by(id=submission_id).first()
result = Result.query.filter_by(
test_id=test_id, user_id=student_id).first()
form = MarkTestForm()
form = MarkTestForm()
if form.validate_on_submit():
score_diff = form.mark.data - submission.score
submission.score = form.mark.data
submission.needs_marking = False
# incrementally storing scores in case a teacher
# doesn't finish marking a student's test
result.score += score_diff
db.session.commit()
return redirect(url_for('mark_test', course_id=course_id, test_id=test_id,
student_id=student_id))
def submit_and_feedback(course_id, test_id, student_id):
test = Test.query.filter_by(id=test_id).first()
result = Result.query.filter_by(
test_id=test_id, user_id=student_id).first()
submissions = test.get_user_submissions(student_id)
form = FeedbackForm()
if form.validate_on_submit():
result.feedback = form.feedback.data
result.score = sum((sub.score for sub in submissions))
if not any(sub.needs_marking for sub in submissions):
result.needs_marking = False
db.session.commit()
return redirect(url_for('test_view', course_id=course_id, test_id=test_id))
| [
1,
515,
623,
1053,
623,
29892,
4833,
13,
3166,
29784,
1053,
2009,
13,
3166,
623,
29889,
9794,
1053,
4911,
29892,
6325,
344,
29892,
4321,
29892,
894,
29892,
7867,
29892,
427,
1467,
1860,
29892,
3323,
6737,
13,
3166,
623,
29889,
9514,
1053,
19130,
2500,
29892,
2169,
8306,
2500,
29892,
1570,
3057,
2500,
29892,
1570,
29907,
10242,
2500,
29892,
390,
3871,
3057,
2500,
29892,
894,
2500,
29892,
894,
4035,
6737,
2500,
29892,
3462,
20791,
1762,
29907,
10242,
2500,
29892,
4485,
3057,
2500,
29892,
5169,
287,
1627,
2500,
13,
3166,
29784,
1053,
4050,
29918,
6886,
29892,
11013,
29892,
6684,
29892,
3142,
29918,
1454,
29892,
2009,
13,
3166,
29784,
29918,
7507,
1053,
1857,
29918,
1792,
29892,
6464,
29918,
1792,
29892,
1480,
449,
29918,
1792,
29892,
6464,
29918,
12403,
13,
13,
13,
1990,
4911,
2956,
7295,
13,
13,
1678,
822,
6464,
7295,
13,
13,
4706,
883,
353,
19130,
2500,
580,
13,
4706,
565,
883,
29889,
15480,
29918,
265,
29918,
7892,
7295,
13,
9651,
396,
5399,
393,
1404,
338,
297,
4833,
322,
393,
4800,
338,
1959,
13,
9651,
1404,
353,
4911,
29889,
1972,
29889,
4572,
29918,
1609,
29898,
5269,
29922,
689,
29889,
5269,
29889,
1272,
467,
4102,
580,
13,
9651,
565,
1404,
338,
6213,
470,
451,
1404,
29889,
3198,
29918,
5630,
29898,
689,
29889,
5630,
29889,
1272,
1125,
13,
18884,
11013,
877,
13919,
8952,
470,
4800,
1495,
13,
18884,
736,
6684,
29898,
2271,
29918,
1454,
877,
7507,
8785,
13,
13,
9651,
6464,
29918,
1792,
29898,
1792,
29897,
13,
13,
9651,
565,
1404,
29889,
275,
29918,
6406,
29901,
13,
18884,
736,
6684,
29898,
2271,
29918,
1454,
877,
6406,
29918,
25089,
8785,
13,
9651,
1683,
29901,
13,
18884,
736,
6684,
29898,
2271,
29918,
1454,
877,
18945,
29918,
25089,
8785,
13,
13,
4706,
396,
363,
12354,
2009,
313,
15965,
8363,
1813,
29897,
13,
4706,
736,
4050,
29918,
6886,
877,
2248,
29889,
1420,
742,
883,
29922,
689,
29897,
13,
13,
1678,
822,
1510,
29918,
25089,
7295,
13,
4706,
565,
1857,
29918,
1792,
29889,
275,
29918,
6406,
29901,
13,
9651,
3236,
29918,
689,
353,
1570,
29907,
10242,
2500,
580,
13,
9651,
736,
4050,
29918,
6886,
877,
6406,
29889,
1420,
742,
3236,
29918,
689,
29922,
15775,
29918,
689,
29897,
13,
4706,
1683,
29901,
13,
9651,
736,
4050,
29918,
6886,
877,
18945,
29889,
1420,
1495,
13,
13,
1678,
822,
3236,
29918,
1493,
29898,
15775,
29918,
333,
1125,
13,
4706,
3236,
353,
6325,
344,
29889,
1972,
29889,
4572,
29918,
1609,
29898,
333,
29922,
15775,
29918,
333,
467,
4102,
580,
13,
4706,
6987,
353,
3236,
29889,
21150,
13,
13,
4706,
883,
353,
1570,
3057,
2500,
580,
13,
4706,
19508,
29918,
1688,
29918,
689,
353,
390,
3871,
3057,
2500,
580,
13,
4706,
3236,
29918,
7193,
353,
3236,
29889,
657,
29918,
7193,
580,
13,
13,
4706,
716,
29918,
1688,
29918,
689,
353,
1570,
3057,
2500,
580,
13,
4706,
3236,
29918,
689,
353,
1570,
29907,
10242,
2500,
580,
13,
4706,
788,
29918,
18945,
29918,
689,
353,
3462,
20791,
1762,
29907,
10242,
2500,
580,
13,
13,
4706,
565,
1857,
29918,
1792,
29889,
275,
29918,
6406,
29901,
13,
9651,
736,
4050,
29918,
6886,
877,
6406,
29899,
15775,
29889,
1420,
742,
788,
29918,
18945,
29918,
689,
29922,
1202,
29918,
18945,
29918,
689,
29892,
13,
462,
462,
259,
19508,
29918,
1688,
29918,
689,
29922,
1267,
420,
29918,
1688,
29918,
689,
29892,
3236,
29918,
7193,
29922,
15775,
29918,
7193,
29892,
13,
462,
462,
259,
3236,
29918,
689,
29922,
15775,
29918,
689,
29892,
716,
29918,
1688,
29918,
689,
29922,
1482,
29918,
1688,
29918,
689,
29892,
3236,
29922,
15775,
29892,
13,
462,
462,
259,
6987,
29922,
21150,
29897,
13,
13,
4706,
1683,
29901,
13,
9651,
5735,
29918,
21150,
353,
518,
1688,
363,
1243,
297,
6987,
565,
1243,
29889,
275,
29918,
9258,
29962,
13,
9651,
736,
4050,
29918,
6886,
877,
18945,
29899,
15775,
29889,
1420,
742,
3236,
29922,
15775,
29892,
6987,
29922,
9258,
29918,
21150,
29897,
13,
13,
1678,
822,
1480,
449,
7295,
13,
4706,
1480,
449,
29918,
1792,
580,
13,
4706,
736,
6684,
29898,
2271,
29918,
1454,
877,
7507,
8785,
13,
13,
1678,
822,
6036,
7295,
13,
13,
4706,
883,
353,
2169,
8306,
2500,
580,
13,
13,
4706,
565,
883,
29889,
15480,
29918,
265,
29918,
7892,
7295,
13,
13,
9651,
1404,
353,
4911,
29898,
4102,
29918,
978,
29922,
689,
29889,
4102,
29918,
978,
29889,
1272,
29892,
13,
462,
4706,
1833,
29918,
978,
29922,
689,
29889,
4230,
29918,
978,
29889,
1272,
29892,
4876,
29922,
689,
29889,
5269,
29889,
1272,
29892,
13,
462,
4706,
338,
29918,
6406,
29922,
29900,
29897,
13,
13,
9651,
396,
960,
18397,
4876,
338,
2307,
297,
4833,
13,
9651,
565,
4911,
29889,
1972,
29889,
4572,
29918,
1609,
29898,
5269,
29922,
1792,
29889,
5269,
467,
4102,
580,
338,
451,
6213,
29901,
13,
13,
18884,
11013,
877,
9823,
338,
2307,
15443,
29991,
1495,
13,
18884,
11013,
877,
12148,
1480,
297,
2400,
1495,
13,
18884,
736,
6684,
29898,
2271,
29918,
1454,
877,
7507,
8785,
13,
13,
9651,
1404,
29889,
842,
29918,
5630,
29898,
689,
29889,
5630,
29889,
1272,
29897,
13,
13,
9651,
4833,
29889,
7924,
29889,
1202,
29898,
1792,
29897,
13,
9651,
4833,
29889,
7924,
29889,
15060,
580,
13,
13,
9651,
11013,
703,
3492,
505,
15443,
1159,
13,
9651,
11013,
703,
12148,
1480,
297,
2400,
1159,
13,
13,
9651,
736,
6684,
29898,
2271,
29918,
1454,
877,
7507,
8785,
13,
13,
4706,
736,
4050,
29918,
6886,
877,
9573,
29889,
1420,
742,
3611,
543,
15213,
613,
883,
29922,
689,
29897,
13,
13,
13,
1990,
6325,
344,
2956,
7295,
13,
13,
1678,
822,
20431,
29918,
1493,
7295,
13,
4706,
21888,
353,
6325,
344,
29889,
1972,
29889,
497,
580,
13,
4706,
736,
4050,
29918,
6886,
877,
17492,
29899,
14592,
3377,
29889,
1420,
742,
21888,
29922,
29883,
29781,
29897,
13,
13,
1678,
822,
1653,
29918,
1688,
29898,
15775,
29918,
333,
1125,
13,
4706,
883,
353,
1570,
3057,
2500,
580,
13,
4706,
3236,
353,
6325,
344,
29889,
1972,
29889,
4572,
29918,
1609,
29898,
333,
29922,
15775,
29918,
333,
467,
4102,
580,
13,
4706,
6987,
353,
3236,
29889,
21150,
13,
4706,
565,
883,
29889,
15480,
29918,
265,
29918,
7892,
7295,
13,
9651,
1243,
353,
4321,
580,
13,
9651,
1243,
29889,
978,
353,
883,
29889,
1688,
29918,
978,
29889,
1272,
13,
9651,
1243,
29889,
15775,
29918,
333,
353,
3236,
29889,
333,
13,
13,
9651,
4833,
29889,
7924,
29889,
1202,
29898,
1688,
29897,
13,
9651,
4833,
29889,
7924,
29889,
15060,
580,
13,
13,
9651,
736,
6684,
29898,
2271,
29918,
1454,
877,
15775,
29918,
1493,
742,
3236,
29918,
333,
29922,
15775,
29889,
333,
876,
13,
13,
4706,
736,
6684,
29898,
2271,
29918,
1454,
877,
15775,
29918,
1493,
742,
3236,
29918,
333,
29922,
15775,
29889,
333,
876,
13,
13,
1678,
822,
1653,
29918,
15775,
7295,
13,
4706,
3236,
29918,
689,
353,
1570,
29907,
10242,
2500,
580,
13,
13,
4706,
565,
3236,
29918,
689,
29889,
15480,
29918,
265,
29918,
7892,
7295,
13,
9651,
3236,
353,
6325,
344,
580,
13,
9651,
3236,
29889,
978,
353,
3236,
29918,
689,
29889,
15775,
29918,
978,
29889,
1272,
13,
9651,
3236,
29889,
15775,
29918,
401,
353,
3236,
29918,
689,
29889,
15775,
29918,
401,
29889,
1272,
13,
13,
9651,
4833,
29889,
7924,
29889,
1202,
29898,
15775,
29897,
13,
9651,
1857,
29918,
1792,
29889,
29883,
29781,
29889,
4397,
29898,
15775,
29897,
13,
9651,
4833,
29889,
7924,
29889,
15060,
580,
13,
13,
9651,
736,
6684,
29898,
2271,
29918,
1454,
877,
6406,
29918,
25089,
8785,
13,
13,
4706,
736,
6684,
29898,
2271,
29918,
1454,
877,
6406,
29918,
25089,
742,
3236,
29918,
689,
29922,
15775,
29918,
689,
876,
13,
13,
1678,
822,
788,
29918,
18945,
29898,
15775,
29918,
333,
1125,
13,
4706,
788,
29918,
18945,
29918,
689,
353,
3462,
20791,
1762,
29907,
10242,
2500,
580,
13,
4706,
3236,
353,
6325,
344,
29889,
1972,
29889,
4572,
29918,
1609,
29898,
333,
29922,
15775,
29918,
333,
467,
4102,
580,
13,
4706,
565,
788,
29918,
18945,
29918,
689,
29889,
15480,
29918,
265,
29918,
7892,
7295,
13,
9651,
8368,
29918,
5269,
353,
788,
29918,
18945,
29918,
689,
29889,
18945,
29918,
5269,
29889,
1272,
13,
9651,
8368,
353,
4911,
29889,
1972,
29889,
4572,
29918,
1609,
29898,
5269,
29922,
18945,
29918,
5269,
467,
4102,
580,
13,
9651,
565,
8368,
29901,
13,
18884,
8368,
29889,
29883,
29781,
29889,
4397,
29898,
15775,
29897,
13,
18884,
4833,
29889,
7924,
29889,
15060,
580,
13,
13,
9651,
736,
6684,
29898,
2271,
29918,
1454,
877,
15775,
29918,
1493,
742,
3236,
29918,
333,
29922,
15775,
29918,
333,
876,
13,
13,
4706,
736,
6684,
29898,
2271,
29918,
1454,
877,
15775,
29918,
1493,
742,
3236,
29918,
333,
29922,
15775,
29918,
333,
876,
13,
13,
1678,
822,
3349,
29918,
18945,
29898,
15775,
29918,
333,
29892,
8368,
29918,
333,
1125,
13,
4706,
3236,
353,
6325,
344,
29889,
1972,
29889,
4572,
29918,
1609,
29898,
333,
29922,
15775,
29918,
333,
467,
4102,
580,
13,
4706,
8368,
353,
4911,
29889,
1972,
29889,
4572,
29918,
1609,
29898,
333,
29922,
18945,
29918,
333,
467,
4102,
580,
13,
13,
4706,
565,
8368,
29901,
13,
9651,
8368,
29889,
29883,
29781,
29889,
5992,
29898,
15775,
29897,
13,
9651,
4833,
29889,
7924,
29889,
15060,
580,
13,
13,
9651,
736,
6684,
29898,
2271,
29918,
1454,
877,
15775,
29918,
1493,
742,
3236,
29918,
333,
29922,
15775,
29918,
333,
876,
13,
13,
4706,
736,
6684,
29898,
2271,
29918,
1454,
877,
15775,
29918,
1493,
742,
3236,
29918,
333,
29922,
15775,
29918,
333,
876,
13,
13,
13,
1990,
4321,
2956,
7295,
13,
13,
1678,
822,
1653,
29918,
1688,
7295,
13,
4706,
883,
353,
1570,
3057,
2500,
580,
13,
4706,
1209,
13,
13,
1678,
822,
5217,
29918,
1688,
29898,
15775,
29918,
333,
29892,
1243,
29918,
333,
1125,
13,
4706,
1243,
353,
4321,
29889,
1972,
29889,
4572,
29918,
1609,
29898,
333,
29922,
1688,
29918,
333,
467,
4102,
580,
13,
13,
4706,
4833,
29889,
7924,
29889,
8143,
29898,
1688,
29897,
13,
4706,
4833,
29889,
7924,
29889,
15060,
580,
13,
13,
4706,
736,
6684,
29898,
2271,
29918,
1454,
877,
15775,
29918,
1493,
742,
3236,
29918,
333,
29922,
15775,
29918,
333,
876,
13,
13,
1678,
822,
1510,
29918,
1688,
29898,
15775,
29918,
333,
29892,
1243,
29918,
333,
1125,
13,
4706,
3236,
353,
6325,
344,
29889,
1972,
29889,
4572,
29918,
1609,
29898,
333,
29922,
15775,
29918,
333,
467,
4102,
580,
13,
4706,
1243,
353,
4321,
29889,
1972,
29889,
4572,
29918,
1609,
29898,
333,
29922,
1688,
29918,
333,
467,
4102,
580,
13,
4706,
4160,
353,
3236,
29889,
657,
29918,
7193,
580,
13,
13,
4706,
4236,
29918,
3502,
353,
1243,
29889,
657,
29918,
3317,
29918,
3502,
580,
13,
4706,
1375,
29918,
3502,
353,
1243,
29889,
657,
29918,
1195,
29918,
3502,
580,
13,
4706,
1243,
29918,
485,
29887,
353,
1243,
29889,
657,
29918,
12483,
482,
29918,
3502,
580,
13,
13,
4706,
565,
1857,
29918,
1792,
29889,
275,
29918,
6406,
29901,
13,
9651,
954,
29918,
9902,
353,
1243,
29889,
657,
29918,
1949,
29918,
9902,
580,
13,
9651,
954,
29918,
264,
24476,
29918,
18082,
1237,
353,
3236,
29889,
657,
29918,
1949,
29918,
264,
1467,
1860,
580,
13,
13,
9651,
11404,
1078,
353,
518,
1949,
29918,
9902,
29892,
954,
29918,
264,
24476,
29918,
18082,
1237,
29892,
13,
462,
3986,
1243,
29918,
485,
29887,
29892,
4236,
29918,
3502,
29892,
1375,
29918,
3502,
29962,
13,
13,
9651,
18397,
29918,
7193,
353,
1243,
29889,
657,
29918,
1491,
29885,
4430,
29918,
7193,
580,
13,
13,
9651,
19508,
29918,
1688,
29918,
689,
353,
390,
3871,
3057,
2500,
580,
13,
9651,
3236,
29918,
689,
353,
1570,
29907,
10242,
2500,
580,
13,
13,
9651,
736,
4050,
29918,
6886,
877,
6406,
29899,
1688,
29899,
1493,
29889,
1420,
742,
3236,
29922,
15775,
29892,
13,
462,
462,
259,
3236,
29918,
689,
29922,
15775,
29918,
689,
29892,
1243,
29922,
1688,
29892,
13,
462,
462,
259,
19508,
29918,
1688,
29918,
689,
29922,
1267,
420,
29918,
1688,
29918,
689,
29892,
13,
462,
462,
259,
18397,
29918,
7193,
29922,
1491,
29885,
4430,
29918,
7193,
29892,
11404,
1078,
29922,
26193,
1078,
29897,
259,
396,
2582,
29922,
9902,
13,
4706,
1683,
29901,
13,
9651,
8368,
29918,
2914,
353,
1243,
29889,
657,
29918,
18945,
29918,
2914,
29898,
3784,
29918,
1792,
29889,
333,
29897,
13,
9651,
11404,
1078,
353,
5159,
13,
9651,
565,
8368,
29918,
2914,
29901,
13,
18884,
8368,
29918,
546,
29883,
353,
4513,
29898,
18945,
29918,
2914,
29889,
13628,
847,
1243,
29889,
7827,
29918,
22848,
580,
334,
29871,
29896,
29900,
29900,
29892,
29871,
29906,
29897,
13,
18884,
11404,
1078,
353,
518,
18945,
29918,
546,
29883,
29892,
13,
462,
795,
1243,
29918,
485,
29887,
29892,
4236,
29918,
3502,
29892,
1375,
29918,
3502,
29962,
13,
13,
9651,
736,
4050,
29918,
6886,
877,
18945,
29899,
1688,
29899,
1493,
29889,
1420,
742,
13,
462,
462,
259,
11404,
1078,
29922,
26193,
1078,
29892,
13,
462,
462,
259,
1243,
29922,
1688,
29892,
3236,
29922,
15775,
29892,
13,
462,
462,
259,
8368,
29918,
2914,
29922,
18945,
29918,
2914,
29897,
13,
13,
1678,
822,
3863,
29918,
1688,
29918,
1493,
29898,
15775,
29918,
333,
29892,
1243,
29918,
333,
1125,
13,
13,
4706,
3236,
353,
6325,
344,
29889,
1972,
29889,
4572,
29918,
1609,
29898,
333,
29922,
15775,
29918,
333,
467,
4102,
580,
13,
4706,
1243,
353,
4321,
29889,
1972,
29889,
4572,
29918,
1609,
29898,
333,
29922,
1688,
29918,
333,
467,
4102,
580,
13,
4706,
5155,
353,
1243,
29889,
2619,
13,
13,
4706,
883,
353,
894,
2500,
580,
13,
4706,
3236,
29918,
689,
353,
1570,
29907,
10242,
2500,
580,
13,
13,
4706,
736,
4050,
29918,
6886,
877,
6406,
29899,
1688,
29899,
5628,
29889,
1420,
742,
3236,
29922,
15775,
29892,
13,
462,
1669,
1243,
29922,
1688,
29892,
5155,
29922,
2619,
29892,
13,
462,
1669,
883,
29922,
689,
29892,
3236,
29918,
689,
29922,
15775,
29918,
689,
29897,
13,
13,
1678,
822,
19508,
29918,
1688,
29898,
15775,
29918,
333,
29892,
1243,
29918,
333,
1125,
13,
4706,
1243,
353,
4321,
29889,
1972,
29889,
4572,
29918,
1609,
29898,
333,
29922,
1688,
29918,
333,
467,
4102,
580,
13,
4706,
883,
353,
390,
3871,
3057,
2500,
580,
13,
13,
4706,
565,
883,
29889,
15480,
29918,
265,
29918,
7892,
7295,
13,
9651,
1243,
29889,
978,
353,
883,
29889,
1482,
29918,
1688,
29918,
978,
29889,
1272,
13,
9651,
4833,
29889,
7924,
29889,
15060,
580,
13,
13,
9651,
6684,
29898,
2271,
29918,
1454,
877,
1688,
29918,
1493,
742,
3236,
29918,
333,
29922,
15775,
29918,
333,
29892,
1243,
29918,
333,
29922,
1688,
29918,
333,
876,
13,
13,
4706,
736,
6684,
29898,
2271,
29918,
1454,
877,
1688,
29918,
1493,
742,
3236,
29918,
333,
29922,
15775,
29918,
333,
29892,
1243,
29918,
333,
29922,
1688,
29918,
333,
876,
13,
13,
1678,
822,
20429,
29918,
9258,
29898,
15775,
29918,
333,
29892,
1243,
29918,
333,
1125,
13,
4706,
1243,
353,
4321,
29889,
1972,
29889,
4572,
29918,
1609,
29898,
333,
29922,
1688,
29918,
333,
467,
4102,
580,
13,
13,
4706,
565,
1243,
29889,
275,
29918,
9258,
29901,
13,
9651,
1243,
29889,
275,
29918,
9258,
353,
7700,
13,
4706,
1683,
29901,
13,
9651,
1243,
29889,
275,
29918,
9258,
353,
5852,
13,
13,
4706,
4833,
29889,
7924,
29889,
15060,
580,
13,
13,
4706,
736,
6684,
29898,
2271,
29918,
1454,
877,
15775,
29918,
1493,
742,
3236,
29918,
333,
29922,
15775,
29918,
333,
876,
13,
13,
1678,
822,
3863,
29918,
12470,
29898,
15775,
29918,
333,
29892,
1243,
29918,
333,
29892,
1139,
29918,
333,
1125,
13,
4706,
3236,
353,
6325,
344,
29889,
1972,
29889,
4572,
29918,
1609,
29898,
333,
29922,
15775,
29918,
333,
467,
4102,
580,
13,
4706,
1243,
353,
4321,
29889,
1972,
29889,
4572,
29918,
1609,
29898,
333,
29922,
1688,
29918,
333,
467,
4102,
580,
13,
4706,
3855,
353,
894,
29889,
1972,
29889,
4572,
29918,
1609,
29898,
333,
29922,
12470,
29918,
333,
467,
4102,
580,
13,
4706,
883,
353,
894,
2500,
580,
13,
13,
4706,
565,
883,
29889,
8143,
29889,
1272,
29901,
13,
9651,
4833,
29889,
7924,
29889,
8143,
29898,
29939,
29897,
13,
9651,
4833,
29889,
7924,
29889,
15060,
580,
13,
13,
9651,
736,
6684,
29898,
2271,
29918,
1454,
877,
5628,
29918,
1688,
29918,
1493,
742,
3236,
29918,
333,
29922,
15775,
29918,
333,
29892,
13,
462,
462,
1678,
1243,
29918,
333,
29922,
1688,
29918,
333,
876,
13,
13,
4706,
565,
883,
29889,
15480,
29918,
265,
29918,
7892,
7295,
13,
9651,
565,
883,
29889,
7620,
29889,
1272,
29901,
13,
18884,
3855,
29889,
1688,
29918,
333,
353,
1243,
29918,
333,
13,
18884,
3855,
29889,
12470,
29918,
1853,
353,
938,
29898,
689,
29889,
12470,
29918,
1853,
29889,
1272,
29897,
13,
18884,
3855,
29889,
12470,
29918,
1807,
353,
2062,
29898,
689,
29889,
8216,
29889,
1272,
29889,
12508,
3101,
29961,
29906,
13018,
29896,
29962,
13,
18884,
3855,
29889,
401,
29918,
1807,
353,
2062,
29898,
689,
29889,
401,
29918,
1807,
29889,
1272,
29889,
12508,
3101,
29961,
29906,
13018,
29896,
29962,
13,
18884,
3855,
29889,
14047,
29939,
29918,
29896,
353,
883,
29889,
14047,
29939,
29918,
29896,
29889,
1272,
13,
18884,
3855,
29889,
14047,
29939,
29918,
29906,
353,
883,
29889,
14047,
29939,
29918,
29906,
29889,
1272,
13,
18884,
3855,
29889,
14047,
29939,
29918,
29941,
353,
883,
29889,
14047,
29939,
29918,
29941,
29889,
1272,
13,
18884,
3855,
29889,
14047,
29939,
29918,
29946,
353,
883,
29889,
14047,
29939,
29918,
29946,
29889,
1272,
13,
18884,
3855,
29889,
14047,
29939,
29918,
12011,
353,
883,
29889,
14047,
29939,
29918,
2929,
918,
29889,
1272,
13,
18884,
3855,
29889,
12011,
353,
883,
29889,
2929,
918,
29889,
1272,
13,
18884,
3855,
29889,
3502,
29918,
15956,
353,
883,
29889,
3502,
29918,
15956,
29889,
1272,
13,
18884,
4833,
29889,
7924,
29889,
15060,
580,
13,
13,
18884,
736,
6684,
29898,
2271,
29918,
1454,
877,
5628,
29918,
1688,
29918,
1493,
742,
3236,
29918,
333,
29922,
15775,
29918,
333,
29892,
13,
462,
462,
4706,
1243,
29918,
333,
29922,
1688,
29918,
333,
876,
13,
13,
1678,
822,
716,
29918,
12470,
29898,
15775,
29918,
333,
29892,
1243,
29918,
333,
1125,
13,
4706,
883,
353,
894,
2500,
580,
13,
13,
4706,
565,
883,
29889,
15480,
29918,
265,
29918,
7892,
7295,
13,
9651,
3855,
353,
894,
580,
13,
9651,
3855,
29889,
1688,
29918,
333,
353,
1243,
29918,
333,
13,
9651,
3855,
29889,
12470,
29918,
1853,
353,
938,
29898,
689,
29889,
12470,
29918,
1853,
29889,
1272,
29897,
13,
9651,
3855,
29889,
12470,
29918,
1807,
353,
2062,
29898,
689,
29889,
8216,
29889,
1272,
29889,
12508,
3101,
29961,
29906,
13018,
29896,
29962,
13,
9651,
3855,
29889,
401,
29918,
1807,
353,
2062,
29898,
689,
29889,
401,
29918,
1807,
29889,
1272,
29889,
12508,
3101,
29961,
29906,
13018,
29896,
29962,
13,
9651,
3855,
29889,
14047,
29939,
29918,
29896,
353,
883,
29889,
14047,
29939,
29918,
29896,
29889,
1272,
13,
9651,
3855,
29889,
14047,
29939,
29918,
29906,
353,
883,
29889,
14047,
29939,
29918,
29906,
29889,
1272,
13,
9651,
3855,
29889,
14047,
29939,
29918,
29941,
353,
883,
29889,
14047,
29939,
29918,
29941,
29889,
1272,
13,
9651,
3855,
29889,
14047,
29939,
29918,
29946,
353,
883,
29889,
14047,
29939,
29918,
29946,
29889,
1272,
13,
9651,
3855,
29889,
14047,
29939,
29918,
12011,
353,
883,
29889,
14047,
29939,
29918,
2929,
918,
29889,
1272,
13,
9651,
3855,
29889,
12011,
353,
883,
29889,
2929,
918,
29889,
1272,
13,
9651,
3855,
29889,
3502,
29918,
15956,
353,
883,
29889,
3502,
29918,
15956,
29889,
1272,
13,
13,
9651,
4833,
29889,
7924,
29889,
1202,
29898,
29939,
29897,
13,
9651,
4833,
29889,
7924,
29889,
15060,
580,
13,
13,
4706,
736,
6684,
29898,
2271,
29918,
1454,
877,
5628,
29918,
1688,
29918,
1493,
742,
3236,
29918,
333,
29922,
15775,
29918,
333,
29892,
1243,
29918,
333,
29922,
1688,
29918,
333,
876,
13,
13,
1678,
822,
2125,
29918,
1688,
29898,
15775,
29918,
333,
29892,
1243,
29918,
333,
1125,
13,
4706,
3236,
353,
6325,
344,
29889,
1972,
29889,
4572,
29918,
1609,
29898,
333,
29922,
15775,
29918,
333,
467,
4102,
580,
13,
4706,
1243,
353,
4321,
29889,
1972,
29889,
4572,
29918,
1609,
29898,
333,
29922,
1688,
29918,
333,
467,
4102,
580,
13,
4706,
5155,
353,
1243,
29889,
2619,
13,
13,
4706,
883,
353,
894,
4035,
6737,
2500,
580,
13,
13,
4706,
736,
4050,
29918,
6886,
877,
19730,
29899,
1688,
29889,
1420,
742,
3236,
29922,
15775,
29892,
1243,
29922,
1688,
29892,
5155,
29922,
2619,
29892,
883,
29922,
689,
29897,
13,
13,
1678,
822,
716,
29918,
1491,
6737,
29898,
15775,
29918,
333,
29892,
1243,
29918,
333,
29892,
1139,
29918,
333,
1125,
13,
4706,
3855,
353,
894,
29889,
1972,
29889,
4572,
29918,
1609,
29898,
333,
29922,
12470,
29918,
333,
467,
4102,
580,
13,
4706,
1014,
353,
3855,
29889,
657,
29918,
1792,
29918,
1491,
6737,
29898,
3784,
29918,
1792,
29889,
333,
29897,
13,
4706,
565,
451,
1014,
29901,
29871,
396,
565,
694,
5923,
29240,
4864,
13,
9651,
1014,
353,
3323,
6737,
580,
13,
9651,
1014,
29889,
1792,
29918,
333,
353,
1857,
29918,
1792,
29889,
333,
13,
9651,
1014,
29889,
1688,
29918,
333,
353,
1243,
29918,
333,
13,
9651,
1014,
29889,
12470,
29918,
333,
353,
1139,
29918,
333,
13,
13,
4706,
883,
353,
894,
4035,
6737,
2500,
580,
13,
4706,
565,
883,
29889,
15480,
29918,
265,
29918,
7892,
7295,
13,
9651,
565,
3855,
29889,
12470,
29918,
1853,
1275,
29871,
29896,
29901,
13,
18884,
1014,
29889,
4905,
29918,
1491,
353,
883,
29889,
4905,
29918,
12011,
29889,
1272,
13,
9651,
25342,
3855,
29889,
12470,
29918,
1853,
1275,
29871,
29906,
29901,
13,
18884,
1014,
29889,
14047,
29939,
29918,
1491,
353,
883,
29889,
14047,
29939,
29918,
12011,
29889,
1272,
13,
9651,
25342,
3855,
29889,
12470,
29918,
1853,
1275,
29871,
29941,
29901,
13,
18884,
1014,
29889,
401,
29918,
1491,
353,
2062,
29898,
689,
29889,
401,
29918,
12011,
29889,
1272,
9601,
29896,
13018,
29896,
29962,
13,
13,
9651,
4833,
29889,
7924,
29889,
1202,
29898,
1491,
29897,
13,
9651,
4833,
29889,
7924,
29889,
15060,
580,
13,
13,
4706,
736,
6684,
29898,
2271,
29918,
1454,
877,
19730,
29918,
1688,
742,
3236,
29918,
333,
29922,
15775,
29918,
333,
29892,
1243,
29918,
333,
29922,
1688,
29918,
333,
876,
13,
13,
1678,
822,
9752,
29918,
1688,
29898,
15775,
29918,
333,
29892,
1243,
29918,
333,
1125,
13,
4706,
1243,
353,
4321,
29889,
1972,
29889,
4572,
29918,
1609,
29898,
333,
29922,
1688,
29918,
333,
467,
4102,
580,
13,
4706,
1404,
29918,
333,
353,
1857,
29918,
1792,
29889,
333,
13,
4706,
5155,
353,
1243,
29889,
2619,
29871,
396,
894,
29889,
1972,
29889,
4572,
29918,
1609,
29898,
1688,
29918,
333,
29922,
1688,
29918,
333,
29897,
13,
4706,
11834,
6847,
353,
1243,
29889,
657,
29918,
1792,
29918,
1491,
29885,
6847,
29898,
1792,
29918,
333,
29897,
13,
13,
4706,
3001,
353,
29871,
29900,
13,
4706,
363,
29240,
297,
11834,
6847,
29901,
13,
9651,
29240,
29889,
6921,
29918,
3502,
580,
13,
9651,
3001,
4619,
29240,
29889,
13628,
13,
13,
4706,
1121,
353,
7867,
29898,
1792,
29918,
333,
29922,
1792,
29918,
333,
29892,
1243,
29918,
333,
29922,
1688,
29918,
333,
29892,
8158,
29922,
7827,
29897,
13,
4706,
4833,
29889,
7924,
29889,
1202,
29898,
2914,
29897,
13,
4706,
4833,
29889,
7924,
29889,
15060,
580,
13,
13,
4706,
565,
451,
738,
4197,
29939,
29889,
12470,
29918,
1853,
1275,
29871,
29941,
363,
3855,
297,
5155,
29962,
1125,
13,
9651,
1121,
29889,
484,
5779,
29918,
3502,
292,
353,
7700,
13,
13,
4706,
736,
6684,
29898,
2271,
29918,
1454,
877,
15775,
29918,
1493,
742,
3236,
29918,
333,
29922,
15775,
29918,
333,
876,
13,
13,
1678,
822,
2791,
29918,
1688,
29898,
15775,
29918,
333,
29892,
1243,
29918,
333,
29892,
8368,
29918,
333,
1125,
13,
4706,
3236,
353,
6325,
344,
29889,
1972,
29889,
4572,
29918,
1609,
29898,
333,
29922,
15775,
29918,
333,
467,
4102,
580,
13,
4706,
1243,
353,
4321,
29889,
1972,
29889,
4572,
29918,
1609,
29898,
333,
29922,
1688,
29918,
333,
467,
4102,
580,
13,
4706,
5155,
353,
1243,
29889,
2619,
13,
4706,
8368,
353,
4911,
29889,
1972,
29889,
4572,
29918,
1609,
29898,
333,
29922,
18945,
29918,
333,
467,
4102,
580,
13,
13,
4706,
11834,
6847,
353,
1243,
29889,
657,
29918,
1792,
29918,
1491,
29885,
6847,
29898,
18945,
29918,
333,
29897,
13,
13,
4706,
3236,
29918,
689,
353,
1570,
29907,
10242,
2500,
580,
13,
4706,
16705,
29918,
689,
353,
5169,
287,
1627,
2500,
580,
13,
13,
4706,
883,
353,
4485,
3057,
2500,
580,
13,
13,
4706,
736,
4050,
29918,
6886,
877,
3502,
29899,
1688,
29889,
1420,
742,
3236,
29922,
15775,
29892,
13,
462,
1669,
3236,
29918,
689,
29922,
15775,
29918,
689,
29892,
8368,
29922,
18945,
29892,
13,
462,
1669,
1243,
29922,
1688,
29892,
5155,
29922,
2619,
29892,
13,
462,
1669,
11834,
6847,
29922,
1491,
29885,
6847,
29892,
883,
29922,
689,
29892,
13,
462,
1669,
16705,
29918,
689,
29922,
18798,
1627,
29918,
689,
29897,
13,
13,
1678,
822,
2791,
29918,
1491,
6737,
29898,
15775,
29918,
333,
29892,
1243,
29918,
333,
29892,
8368,
29918,
333,
29892,
29240,
29918,
333,
1125,
13,
4706,
29240,
353,
3323,
6737,
29889,
1972,
29889,
4572,
29918,
1609,
29898,
333,
29922,
1491,
6737,
29918,
333,
467,
4102,
580,
13,
4706,
1121,
353,
7867,
29889,
1972,
29889,
4572,
29918,
1609,
29898,
13,
9651,
1243,
29918,
333,
29922,
1688,
29918,
333,
29892,
1404,
29918,
333,
29922,
18945,
29918,
333,
467,
4102,
580,
13,
13,
4706,
883,
353,
4485,
3057,
2500,
580,
13,
13,
4706,
883,
353,
4485,
3057,
2500,
580,
13,
13,
4706,
565,
883,
29889,
15480,
29918,
265,
29918,
7892,
7295,
13,
9651,
8158,
29918,
12765,
353,
883,
29889,
3502,
29889,
1272,
448,
29240,
29889,
13628,
13,
9651,
29240,
29889,
13628,
353,
883,
29889,
3502,
29889,
1272,
13,
9651,
29240,
29889,
484,
5779,
29918,
3502,
292,
353,
7700,
13,
13,
9651,
396,
11924,
635,
15446,
19435,
297,
1206,
263,
15703,
13,
9651,
396,
1838,
29915,
29873,
8341,
2791,
292,
263,
8368,
29915,
29879,
1243,
13,
9651,
1121,
29889,
13628,
4619,
8158,
29918,
12765,
13,
13,
9651,
4833,
29889,
7924,
29889,
15060,
580,
13,
13,
4706,
736,
6684,
29898,
2271,
29918,
1454,
877,
3502,
29918,
1688,
742,
3236,
29918,
333,
29922,
15775,
29918,
333,
29892,
1243,
29918,
333,
29922,
1688,
29918,
333,
29892,
13,
462,
18884,
8368,
29918,
333,
29922,
18945,
29918,
333,
876,
13,
13,
1678,
822,
9752,
29918,
392,
29918,
18798,
1627,
29898,
15775,
29918,
333,
29892,
1243,
29918,
333,
29892,
8368,
29918,
333,
1125,
13,
4706,
1243,
353,
4321,
29889,
1972,
29889,
4572,
29918,
1609,
29898,
333,
29922,
1688,
29918,
333,
467,
4102,
580,
13,
4706,
1121,
353,
7867,
29889,
1972,
29889,
4572,
29918,
1609,
29898,
13,
9651,
1243,
29918,
333,
29922,
1688,
29918,
333,
29892,
1404,
29918,
333,
29922,
18945,
29918,
333,
467,
4102,
580,
13,
4706,
11834,
6847,
353,
1243,
29889,
657,
29918,
1792,
29918,
1491,
29885,
6847,
29898,
18945,
29918,
333,
29897,
13,
13,
4706,
883,
353,
5169,
287,
1627,
2500,
580,
13,
4706,
565,
883,
29889,
15480,
29918,
265,
29918,
7892,
7295,
13,
9651,
1121,
29889,
18798,
1627,
353,
883,
29889,
18798,
1627,
29889,
1272,
13,
9651,
1121,
29889,
13628,
353,
2533,
3552,
1491,
29889,
13628,
363,
1014,
297,
11834,
6847,
876,
13,
9651,
565,
451,
738,
29898,
1491,
29889,
484,
5779,
29918,
3502,
292,
363,
1014,
297,
11834,
6847,
1125,
13,
18884,
1121,
29889,
484,
5779,
29918,
3502,
292,
353,
7700,
13,
13,
9651,
4833,
29889,
7924,
29889,
15060,
580,
13,
13,
4706,
736,
6684,
29898,
2271,
29918,
1454,
877,
1688,
29918,
1493,
742,
3236,
29918,
333,
29922,
15775,
29918,
333,
29892,
1243,
29918,
333,
29922,
1688,
29918,
333,
876,
13,
2
] |
test/SpeedTest.py | prajwal309/TierraCrossSection | 0 | 110328 | #author:<NAME>
#insitution: MIT
import matplotlib.pyplot as plt
import time
import numpy as np
try:
from HAPILite import CalcCrossSection
except:
from ..HAPILite import CalcCrossSection
WaveNumber = np.arange(0,10000,0.001)
StartTime = time.time()
CrossSection = CalcCrossSection("CO2",Temp=1000.0,WN_Grid=WaveNumber, Profile="Doppler", NCORES=-1)
StopTime = time.time()
print("The time take to calculate the cross-section is %4.3f" %(StopTime - StartTime))
plt.figure()
plt.plot(WaveNumber, CrossSection, "k-")
plt.title("L-HAPI")
plt.show()
| [
1,
396,
8921,
29901,
29966,
5813,
29958,
13,
29937,
1144,
5008,
29901,
341,
1806,
13,
13,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
5215,
931,
13,
5215,
12655,
408,
7442,
13,
13,
2202,
29901,
13,
1678,
515,
379,
8787,
29931,
568,
1053,
3037,
29883,
29907,
2124,
13438,
13,
19499,
29901,
13,
1678,
515,
6317,
29950,
8787,
29931,
568,
1053,
3037,
29883,
29907,
2124,
13438,
13,
13,
29956,
1351,
4557,
353,
7442,
29889,
279,
927,
29898,
29900,
29892,
29896,
29900,
29900,
29900,
29900,
29892,
29900,
29889,
29900,
29900,
29896,
29897,
13,
13,
4763,
2481,
353,
931,
29889,
2230,
580,
13,
29907,
2124,
13438,
353,
29871,
3037,
29883,
29907,
2124,
13438,
703,
3217,
29906,
613,
15637,
29922,
29896,
29900,
29900,
29900,
29889,
29900,
29892,
16048,
29918,
5756,
29922,
29956,
1351,
4557,
29892,
20802,
543,
6132,
407,
1358,
613,
405,
3217,
15989,
10457,
29896,
29897,
13,
16329,
2481,
353,
931,
29889,
2230,
580,
13,
13,
2158,
703,
1576,
931,
2125,
304,
8147,
278,
4891,
29899,
2042,
338,
1273,
29946,
29889,
29941,
29888,
29908,
1273,
29898,
16329,
2481,
448,
7370,
2481,
876,
13,
13,
13,
572,
29873,
29889,
4532,
580,
13,
572,
29873,
29889,
5317,
29898,
29956,
1351,
4557,
29892,
11189,
13438,
29892,
376,
29895,
29899,
1159,
13,
572,
29873,
29889,
3257,
703,
29931,
29899,
29950,
8787,
1159,
13,
572,
29873,
29889,
4294,
580,
13,
2
] |
Programa_principal.py | Mals12/Proyecto-AG | 0 | 112825 | <reponame>Mals12/Proyecto-AG
from funcion_aptitud import apt_fit
from funcion_poblacion import crea_poblacion
from funcion_seleccion_padres import selec_padres
from funcion_cruza import cruza_extre
from funcion_mutación import mut_inser
from funcion_reemplazo import reem_generacional
import numpy as np
import random as rm
import collections
import pandas as pd
import matplotlib.pyplot as plt
pobla_inicial=crea_poblacion(100)
generaciones=[]
mejor_fitness=[]
mejor_individuo=[]
peor_fitness=[]
peor_individuo=[]
individuo_promedio=[]
des_estandar=[]
for i in range(0,50):
pobla_padres=selec_padres(pobla_inicial)
pobla_hijos=cruza_extre(pobla_padres)
pobla_mutada=mut_inser(pobla_hijos)
pobla_inicial=reem_generacional(pobla_mutada)
generaciones.append(pobla_inicial)
''' Mejor fitness por generacion '''
fit_pobla=[]
for i in range(len(pobla_inicial)):
fit_individuo=apt_fit(pobla_inicial[i])
fit_pobla.append(fit_individuo)
men_fit=min(fit_pobla)
mejor_fitness.append(men_fit)
indiv_con_men_fit=0
for i in range(len(pobla_inicial)):
if men_fit==fit_pobla[i]:
indiv_con_men_fit +=1
mejor_individuo.append(indiv_con_men_fit)
''' Peor fitness por generacion '''
may_fit = max(fit_pobla)
peor_fitness.append(may_fit)
indiv_con_may_fit = 0
for i in range(len(pobla_inicial)):
if may_fit ==fit_pobla[i]:
indiv_con_may_fit += 1
peor_individuo.append(indiv_con_may_fit)
''' Fitness promedio por generaion'''
prom = sum(fit_pobla)/len(fit_pobla)
individuo_promedio.append(prom)
''' Desviación estandar'''
de_es=0
for i in range(len(fit_pobla)):
des=(fit_pobla[i]-prom)**2
de_es +=des
var=de_es/(len(fit_pobla))
des_est=np.sqrt(var)
des_estandar.append(des_est)
''' Cracion de tabla '''
num_generacion=range(50)
lis_num_generacion=list(num_generacion)
dict={'M. Fit': mejor_fitness,
'C.I.M Fit': mejor_individuo,
'P. Fit)':peor_fitness,
'C.I.P Fit':peor_individuo,
'Fit Prom':individuo_promedio,
'Des. Est':des_estandar}
tabla=pd.DataFrame(dict)
tabla.index=lis_num_generacion
print(tabla)
''' Grafica del mejor individuo '''
plt.style.use('ggplot')
fig,ax=plt.subplots(figsize=(15,10))
x=np.linspace(0,49,50)
y=mejor_fitness
plt.plot(x,y,'b')
plt.plot(x,y,'ro')
plt.title('$Grafica\ de\ Convergencia$', loc="center", fontdict={'fontsize':16, 'fontweight':'bold','color':'tab:green'})
plt.xlabel(r"$Generaciones$", fontdict={'fontsize':14, 'fontweight':'bold','color':'tab:red'})
plt.ylabel(r"$Mejor \ Fitness$", fontdict={'fontsize':14, 'fontweight':'bold','color':'tab:red'})
| [
1,
529,
276,
1112,
420,
29958,
29924,
1338,
29896,
29906,
29914,
1184,
17113,
29877,
29899,
10051,
13,
3166,
21802,
29918,
2156,
11267,
1053,
10882,
29918,
9202,
13,
3166,
21802,
29918,
29886,
711,
4620,
291,
1053,
907,
29874,
29918,
29886,
711,
4620,
291,
13,
3166,
21802,
29918,
344,
280,
22643,
29918,
8305,
690,
1053,
16954,
29883,
29918,
8305,
690,
13,
3166,
21802,
29918,
29883,
582,
1362,
1053,
7618,
1362,
29918,
1062,
276,
13,
3166,
21802,
29918,
6149,
2709,
1053,
5478,
29918,
262,
643,
13,
3166,
21802,
29918,
276,
3451,
433,
2502,
1053,
337,
331,
29918,
4738,
4264,
13,
5215,
12655,
408,
7442,
13,
5215,
4036,
408,
20241,
13,
5215,
16250,
13,
5215,
11701,
408,
10518,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
13,
29886,
711,
433,
29918,
262,
5611,
29922,
1037,
29874,
29918,
29886,
711,
4620,
291,
29898,
29896,
29900,
29900,
29897,
13,
4738,
6027,
29922,
2636,
13,
1004,
3418,
29918,
9202,
2264,
29922,
2636,
13,
1004,
3418,
29918,
513,
3640,
25608,
29922,
2636,
13,
412,
272,
29918,
9202,
2264,
29922,
2636,
13,
412,
272,
29918,
513,
3640,
25608,
29922,
2636,
13,
513,
3640,
25608,
29918,
14032,
287,
601,
29922,
2636,
13,
2783,
29918,
342,
392,
279,
29922,
2636,
13,
13,
1454,
474,
297,
3464,
29898,
29900,
29892,
29945,
29900,
1125,
13,
1678,
9236,
29918,
8305,
690,
29922,
344,
280,
29883,
29918,
8305,
690,
29898,
29886,
711,
433,
29918,
262,
5611,
29897,
13,
1678,
9236,
29918,
29882,
823,
359,
29922,
29883,
582,
1362,
29918,
1062,
276,
29898,
29886,
711,
433,
29918,
8305,
690,
29897,
13,
1678,
9236,
29918,
6149,
1114,
29922,
6149,
29918,
262,
643,
29898,
29886,
711,
433,
29918,
29882,
823,
359,
29897,
13,
1678,
9236,
29918,
262,
5611,
29922,
276,
331,
29918,
4738,
4264,
29898,
29886,
711,
433,
29918,
6149,
1114,
29897,
13,
1678,
1176,
6027,
29889,
4397,
29898,
29886,
711,
433,
29918,
262,
5611,
29897,
13,
13,
1678,
14550,
2191,
3418,
6216,
2264,
1277,
1176,
16337,
14550,
13,
1678,
6216,
29918,
29886,
711,
433,
29922,
2636,
13,
1678,
363,
474,
297,
3464,
29898,
2435,
29898,
29886,
711,
433,
29918,
262,
5611,
22164,
13,
4706,
6216,
29918,
513,
3640,
25608,
29922,
2156,
29918,
9202,
29898,
29886,
711,
433,
29918,
262,
5611,
29961,
29875,
2314,
13,
4706,
6216,
29918,
29886,
711,
433,
29889,
4397,
29898,
9202,
29918,
513,
3640,
25608,
29897,
13,
1678,
1757,
29918,
9202,
29922,
1195,
29898,
9202,
29918,
29886,
711,
433,
29897,
13,
1678,
16918,
29918,
9202,
2264,
29889,
4397,
29898,
1527,
29918,
9202,
29897,
13,
1678,
1399,
440,
29918,
535,
29918,
1527,
29918,
9202,
29922,
29900,
13,
1678,
363,
474,
297,
3464,
29898,
2435,
29898,
29886,
711,
433,
29918,
262,
5611,
22164,
13,
4706,
565,
1757,
29918,
9202,
1360,
9202,
29918,
29886,
711,
433,
29961,
29875,
5387,
13,
9651,
1399,
440,
29918,
535,
29918,
1527,
29918,
9202,
4619,
29896,
13,
1678,
16918,
29918,
513,
3640,
25608,
29889,
4397,
29898,
513,
440,
29918,
535,
29918,
1527,
29918,
9202,
29897,
13,
13,
1678,
14550,
3938,
272,
6216,
2264,
1277,
1176,
16337,
14550,
13,
1678,
1122,
29918,
9202,
353,
4236,
29898,
9202,
29918,
29886,
711,
433,
29897,
13,
1678,
1236,
272,
29918,
9202,
2264,
29889,
4397,
29898,
13029,
29918,
9202,
29897,
13,
1678,
1399,
440,
29918,
535,
29918,
13029,
29918,
9202,
353,
29871,
29900,
13,
1678,
363,
474,
297,
3464,
29898,
2435,
29898,
29886,
711,
433,
29918,
262,
5611,
22164,
13,
4706,
565,
1122,
29918,
9202,
1275,
9202,
29918,
29886,
711,
433,
29961,
29875,
5387,
13,
9651,
1399,
440,
29918,
535,
29918,
13029,
29918,
9202,
4619,
29871,
29896,
13,
1678,
1236,
272,
29918,
513,
3640,
25608,
29889,
4397,
29898,
513,
440,
29918,
535,
29918,
13029,
29918,
9202,
29897,
13,
13,
1678,
14550,
383,
277,
2264,
2504,
287,
601,
1277,
1176,
29874,
291,
12008,
13,
1678,
2504,
353,
2533,
29898,
9202,
29918,
29886,
711,
433,
6802,
2435,
29898,
9202,
29918,
29886,
711,
433,
29897,
13,
1678,
4348,
25608,
29918,
14032,
287,
601,
29889,
4397,
29898,
14032,
29897,
13,
13,
1678,
14550,
2726,
6071,
1290,
707,
392,
279,
12008,
13,
1678,
316,
29918,
267,
29922,
29900,
13,
1678,
363,
474,
297,
3464,
29898,
2435,
29898,
9202,
29918,
29886,
711,
433,
22164,
13,
4706,
553,
7607,
9202,
29918,
29886,
711,
433,
29961,
29875,
29962,
29899,
14032,
29897,
1068,
29906,
13,
4706,
316,
29918,
267,
4619,
2783,
13,
1678,
722,
29922,
311,
29918,
267,
14571,
2435,
29898,
9202,
29918,
29886,
711,
433,
876,
13,
1678,
553,
29918,
342,
29922,
9302,
29889,
3676,
29898,
1707,
29897,
13,
1678,
553,
29918,
342,
392,
279,
29889,
4397,
29898,
2783,
29918,
342,
29897,
13,
13,
12008,
315,
945,
291,
316,
4434,
433,
14550,
13,
1949,
29918,
4738,
16337,
29922,
3881,
29898,
29945,
29900,
29897,
13,
23443,
29918,
1949,
29918,
4738,
16337,
29922,
1761,
29898,
1949,
29918,
4738,
16337,
29897,
13,
8977,
3790,
29915,
29924,
29889,
383,
277,
2396,
16918,
29918,
9202,
2264,
29892,
13,
418,
525,
29907,
29889,
29902,
29889,
29924,
383,
277,
2396,
16918,
29918,
513,
3640,
25608,
29892,
13,
539,
525,
29925,
29889,
383,
277,
29897,
2396,
412,
272,
29918,
9202,
2264,
29892,
13,
539,
525,
29907,
29889,
29902,
29889,
29925,
383,
277,
2396,
412,
272,
29918,
513,
3640,
25608,
29892,
13,
4706,
525,
29943,
277,
9705,
2396,
513,
3640,
25608,
29918,
14032,
287,
601,
29892,
13,
539,
525,
4002,
29889,
2661,
2396,
2783,
29918,
342,
392,
279,
29913,
13,
3891,
433,
29922,
15926,
29889,
17271,
29898,
8977,
29897,
13,
3891,
433,
29889,
2248,
29922,
23443,
29918,
1949,
29918,
4738,
16337,
13,
2158,
29898,
3891,
433,
29897,
13,
12008,
13721,
983,
628,
16918,
4348,
25608,
14550,
13,
572,
29873,
29889,
3293,
29889,
1509,
877,
1505,
5317,
1495,
13,
1003,
29892,
1165,
29922,
572,
29873,
29889,
1491,
26762,
29898,
1003,
2311,
7607,
29896,
29945,
29892,
29896,
29900,
876,
13,
29916,
29922,
9302,
29889,
1915,
3493,
29898,
29900,
29892,
29946,
29929,
29892,
29945,
29900,
29897,
13,
29891,
29922,
1004,
3418,
29918,
9202,
2264,
13,
572,
29873,
29889,
5317,
29898,
29916,
29892,
29891,
5501,
29890,
1495,
13,
572,
29873,
29889,
5317,
29898,
29916,
29892,
29891,
5501,
307,
1495,
13,
572,
29873,
29889,
3257,
877,
29938,
29954,
1929,
983,
29905,
316,
29905,
1281,
369,
1885,
1512,
29938,
742,
1180,
543,
5064,
613,
4079,
8977,
3790,
29915,
5657,
2311,
2396,
29896,
29953,
29892,
525,
5657,
7915,
22099,
8934,
3788,
2780,
22099,
3891,
29901,
12692,
29915,
1800,
13,
572,
29873,
29889,
29916,
1643,
29898,
29878,
29908,
29938,
5631,
6027,
29938,
613,
4079,
8977,
3790,
29915,
5657,
2311,
2396,
29896,
29946,
29892,
525,
5657,
7915,
22099,
8934,
3788,
2780,
22099,
3891,
29901,
1127,
29915,
1800,
13,
572,
29873,
29889,
29891,
1643,
29898,
29878,
29908,
29938,
6816,
3418,
320,
383,
277,
2264,
29938,
613,
4079,
8977,
3790,
29915,
5657,
2311,
2396,
29896,
29946,
29892,
525,
5657,
7915,
22099,
8934,
3788,
2780,
22099,
3891,
29901,
1127,
29915,
1800,
13,
2
] |
tests/semver/constraints/test_multi_constraint.py | batisteo/poetry | 0 | 36013 | <filename>tests/semver/constraints/test_multi_constraint.py<gh_stars>0
from poetry.semver.constraints.constraint import Constraint
from poetry.semver.constraints.multi_constraint import MultiConstraint
def test_multi_version_match_succeeds():
require_start = Constraint('>', '1.0')
require_end = Constraint('<', '1.2')
provider = Constraint('==', '1.1')
multi = MultiConstraint((require_start, require_end))
assert multi.matches(provider)
def test_multi_version_provided_match_succeeds():
require_start = Constraint('>', '1.0')
require_end = Constraint('<', '1.2')
provide_start = Constraint('>=', '1.1')
provide_end = Constraint('<', '2.0')
multi_require = MultiConstraint((require_start, require_end))
multi_provide = MultiConstraint((provide_start, provide_end))
assert multi_require.matches(multi_provide)
def test_multi_version_match_fails():
require_start = Constraint('>', '1.0')
require_end = Constraint('<', '1.2')
provider = Constraint('==', '1.2')
multi = MultiConstraint((require_start, require_end))
assert not multi.matches(provider)
| [
1,
529,
9507,
29958,
21150,
29914,
12846,
369,
29914,
13646,
29879,
29914,
1688,
29918,
9910,
29918,
13646,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
22309,
29889,
12846,
369,
29889,
13646,
29879,
29889,
13646,
1053,
1281,
4151,
524,
13,
3166,
22309,
29889,
12846,
369,
29889,
13646,
29879,
29889,
9910,
29918,
13646,
1053,
14974,
21529,
13,
13,
13,
1753,
1243,
29918,
9910,
29918,
3259,
29918,
4352,
29918,
29879,
1682,
3947,
29879,
7295,
13,
1678,
1996,
29918,
2962,
353,
1281,
4151,
524,
877,
29958,
742,
525,
29896,
29889,
29900,
1495,
13,
1678,
1996,
29918,
355,
353,
1281,
4151,
524,
877,
29966,
742,
525,
29896,
29889,
29906,
1495,
13,
1678,
13113,
353,
1281,
4151,
524,
877,
1360,
742,
525,
29896,
29889,
29896,
1495,
13,
13,
1678,
2473,
353,
14974,
21529,
3552,
12277,
29918,
2962,
29892,
1996,
29918,
355,
876,
13,
13,
1678,
4974,
2473,
29889,
20317,
29898,
18121,
29897,
13,
13,
13,
1753,
1243,
29918,
9910,
29918,
3259,
29918,
16123,
2618,
29918,
4352,
29918,
29879,
1682,
3947,
29879,
7295,
13,
1678,
1996,
29918,
2962,
353,
1281,
4151,
524,
877,
29958,
742,
525,
29896,
29889,
29900,
1495,
13,
1678,
1996,
29918,
355,
353,
1281,
4151,
524,
877,
29966,
742,
525,
29896,
29889,
29906,
1495,
13,
1678,
3867,
29918,
2962,
353,
1281,
4151,
524,
877,
18572,
742,
525,
29896,
29889,
29896,
1495,
13,
1678,
3867,
29918,
355,
353,
1281,
4151,
524,
877,
29966,
742,
525,
29906,
29889,
29900,
1495,
13,
13,
1678,
2473,
29918,
12277,
353,
14974,
21529,
3552,
12277,
29918,
2962,
29892,
1996,
29918,
355,
876,
13,
1678,
2473,
29918,
16123,
680,
353,
14974,
21529,
3552,
16123,
680,
29918,
2962,
29892,
3867,
29918,
355,
876,
13,
13,
1678,
4974,
2473,
29918,
12277,
29889,
20317,
29898,
9910,
29918,
16123,
680,
29897,
13,
13,
13,
1753,
1243,
29918,
9910,
29918,
3259,
29918,
4352,
29918,
29888,
2234,
7295,
13,
1678,
1996,
29918,
2962,
353,
1281,
4151,
524,
877,
29958,
742,
525,
29896,
29889,
29900,
1495,
13,
1678,
1996,
29918,
355,
353,
1281,
4151,
524,
877,
29966,
742,
525,
29896,
29889,
29906,
1495,
13,
1678,
13113,
353,
1281,
4151,
524,
877,
1360,
742,
525,
29896,
29889,
29906,
1495,
13,
13,
1678,
2473,
353,
14974,
21529,
3552,
12277,
29918,
2962,
29892,
1996,
29918,
355,
876,
13,
13,
1678,
4974,
451,
2473,
29889,
20317,
29898,
18121,
29897,
13,
2
] |
tests/integration/test_labels.py | spmistry/crux-python | 0 | 15742 | <filename>tests/integration/test_labels.py
import pytest
@pytest.mark.usefixtures("dataset", "helpers")
def test_add_get_label(dataset, helpers):
file_1 = dataset.create_file(
path="/test_file_" + helpers.generate_random_string(16) + ".csv"
)
label_result = file_1.add_label("label1", "value1")
assert label_result is True
assert file_1.labels.get("label1") == "value1"
@pytest.mark.usefixtures("dataset", "helpers")
def test_add_labels_set_labels(dataset, helpers):
file_1 = dataset.create_file(
path="/test_file_" + helpers.generate_random_string(16) + ".csv"
)
labels = {"label1": "value1", "label2": "value2"}
labels_result = file_1.add_labels(labels)
assert labels_result is True
assert file_1.labels == labels
# Negative Test case which verifies label search by searching unset labels without pagination.
@pytest.mark.usefixtures("dataset", "helpers")
def test_search_label(dataset, helpers):
file_1 = dataset.create_file(
path="/test_file_" + helpers.generate_random_string(16) + ".csv"
)
file_2 = dataset.create_file(
path="/test_file_" + helpers.generate_random_string(16) + ".csv"
)
label_result_1 = file_1.add_label("label1", "value1")
label_result_2 = file_2.add_label("label1", "value1")
assert label_result_1 is True
assert label_result_2 is True
predicates = [{"op": "eq", "key": "label4", "val": "value4"}]
resources = dataset.find_resources_by_label(predicates=predicates)
resource_ids = [resource.id for resource in resources]
assert len(resource_ids) == 0
# Negative Test case which verifies label search by searching unset labels with pagination.
@pytest.mark.usefixtures("dataset", "helpers")
def test_search_label_page(dataset, helpers):
file_1 = dataset.create_file(
path="/test_file_" + helpers.generate_random_string(16) + ".csv"
)
file_2 = dataset.create_file(
path="/test_file_" + helpers.generate_random_string(16) + ".csv"
)
label_result_1 = file_1.add_label("label2", "value2")
label_result_2 = file_2.add_label("label2", "value2")
assert label_result_1 is True
assert label_result_2 is True
predicates = [{"op": "eq", "key": "label3", "val": "value3"}]
resources = dataset.find_resources_by_label(predicates=predicates, max_per_page=1)
resource_ids = [resource.id for resource in resources]
assert len(resource_ids) == 0
@pytest.mark.usefixtures("dataset", "helpers")
def test_delete_label(dataset, helpers):
file_1 = dataset.create_file(
path="/test_file_" + helpers.generate_random_string(16) + ".csv"
)
file_2 = dataset.create_file(
path="/test_file_" + helpers.generate_random_string(16) + ".csv"
)
file_1.add_label("label1", "value1")
file_2.add_label("label1", "value1")
d1_result = file_1.delete_label(label_key="label1")
assert d1_result is True
d2_result = file_2.delete_label(label_key="label1")
assert d2_result is True
| [
1,
529,
9507,
29958,
21150,
29914,
27925,
29914,
1688,
29918,
21134,
29889,
2272,
13,
5215,
11451,
1688,
13,
13,
13,
29992,
2272,
1688,
29889,
3502,
29889,
1509,
7241,
486,
1973,
703,
24713,
613,
376,
3952,
6774,
1159,
13,
1753,
1243,
29918,
1202,
29918,
657,
29918,
1643,
29898,
24713,
29892,
1371,
414,
1125,
13,
1678,
934,
29918,
29896,
353,
8783,
29889,
3258,
29918,
1445,
29898,
13,
4706,
2224,
13802,
1688,
29918,
1445,
27508,
718,
1371,
414,
29889,
17158,
29918,
8172,
29918,
1807,
29898,
29896,
29953,
29897,
718,
11393,
7638,
29908,
13,
1678,
1723,
13,
1678,
3858,
29918,
2914,
353,
934,
29918,
29896,
29889,
1202,
29918,
1643,
703,
1643,
29896,
613,
376,
1767,
29896,
1159,
13,
1678,
4974,
3858,
29918,
2914,
338,
5852,
13,
1678,
4974,
934,
29918,
29896,
29889,
21134,
29889,
657,
703,
1643,
29896,
1159,
1275,
376,
1767,
29896,
29908,
13,
13,
13,
29992,
2272,
1688,
29889,
3502,
29889,
1509,
7241,
486,
1973,
703,
24713,
613,
376,
3952,
6774,
1159,
13,
1753,
1243,
29918,
1202,
29918,
21134,
29918,
842,
29918,
21134,
29898,
24713,
29892,
1371,
414,
1125,
13,
1678,
934,
29918,
29896,
353,
8783,
29889,
3258,
29918,
1445,
29898,
13,
4706,
2224,
13802,
1688,
29918,
1445,
27508,
718,
1371,
414,
29889,
17158,
29918,
8172,
29918,
1807,
29898,
29896,
29953,
29897,
718,
11393,
7638,
29908,
13,
1678,
1723,
13,
1678,
11073,
353,
8853,
1643,
29896,
1115,
376,
1767,
29896,
613,
376,
1643,
29906,
1115,
376,
1767,
29906,
9092,
13,
1678,
11073,
29918,
2914,
353,
934,
29918,
29896,
29889,
1202,
29918,
21134,
29898,
21134,
29897,
13,
1678,
4974,
11073,
29918,
2914,
338,
5852,
13,
1678,
4974,
934,
29918,
29896,
29889,
21134,
1275,
11073,
13,
13,
13,
29937,
12610,
1230,
4321,
1206,
607,
1147,
11057,
3858,
2740,
491,
11975,
443,
842,
11073,
1728,
10203,
3381,
29889,
13,
29992,
2272,
1688,
29889,
3502,
29889,
1509,
7241,
486,
1973,
703,
24713,
613,
376,
3952,
6774,
1159,
13,
1753,
1243,
29918,
4478,
29918,
1643,
29898,
24713,
29892,
1371,
414,
1125,
13,
1678,
934,
29918,
29896,
353,
8783,
29889,
3258,
29918,
1445,
29898,
13,
4706,
2224,
13802,
1688,
29918,
1445,
27508,
718,
1371,
414,
29889,
17158,
29918,
8172,
29918,
1807,
29898,
29896,
29953,
29897,
718,
11393,
7638,
29908,
13,
1678,
1723,
13,
1678,
934,
29918,
29906,
353,
8783,
29889,
3258,
29918,
1445,
29898,
13,
4706,
2224,
13802,
1688,
29918,
1445,
27508,
718,
1371,
414,
29889,
17158,
29918,
8172,
29918,
1807,
29898,
29896,
29953,
29897,
718,
11393,
7638,
29908,
13,
1678,
1723,
13,
1678,
3858,
29918,
2914,
29918,
29896,
353,
934,
29918,
29896,
29889,
1202,
29918,
1643,
703,
1643,
29896,
613,
376,
1767,
29896,
1159,
13,
1678,
3858,
29918,
2914,
29918,
29906,
353,
934,
29918,
29906,
29889,
1202,
29918,
1643,
703,
1643,
29896,
613,
376,
1767,
29896,
1159,
13,
1678,
4974,
3858,
29918,
2914,
29918,
29896,
338,
5852,
13,
1678,
4974,
3858,
29918,
2914,
29918,
29906,
338,
5852,
13,
1678,
4450,
293,
1078,
353,
518,
6377,
459,
1115,
376,
1837,
613,
376,
1989,
1115,
376,
1643,
29946,
613,
376,
791,
1115,
376,
1767,
29946,
29908,
6525,
13,
1678,
7788,
353,
8783,
29889,
2886,
29918,
13237,
29918,
1609,
29918,
1643,
29898,
11965,
293,
1078,
29922,
11965,
293,
1078,
29897,
13,
1678,
6503,
29918,
4841,
353,
518,
10314,
29889,
333,
363,
6503,
297,
7788,
29962,
13,
1678,
4974,
7431,
29898,
10314,
29918,
4841,
29897,
1275,
29871,
29900,
13,
13,
13,
29937,
12610,
1230,
4321,
1206,
607,
1147,
11057,
3858,
2740,
491,
11975,
443,
842,
11073,
411,
10203,
3381,
29889,
13,
29992,
2272,
1688,
29889,
3502,
29889,
1509,
7241,
486,
1973,
703,
24713,
613,
376,
3952,
6774,
1159,
13,
1753,
1243,
29918,
4478,
29918,
1643,
29918,
3488,
29898,
24713,
29892,
1371,
414,
1125,
13,
1678,
934,
29918,
29896,
353,
8783,
29889,
3258,
29918,
1445,
29898,
13,
4706,
2224,
13802,
1688,
29918,
1445,
27508,
718,
1371,
414,
29889,
17158,
29918,
8172,
29918,
1807,
29898,
29896,
29953,
29897,
718,
11393,
7638,
29908,
13,
1678,
1723,
13,
1678,
934,
29918,
29906,
353,
8783,
29889,
3258,
29918,
1445,
29898,
13,
4706,
2224,
13802,
1688,
29918,
1445,
27508,
718,
1371,
414,
29889,
17158,
29918,
8172,
29918,
1807,
29898,
29896,
29953,
29897,
718,
11393,
7638,
29908,
13,
1678,
1723,
13,
1678,
3858,
29918,
2914,
29918,
29896,
353,
934,
29918,
29896,
29889,
1202,
29918,
1643,
703,
1643,
29906,
613,
376,
1767,
29906,
1159,
13,
1678,
3858,
29918,
2914,
29918,
29906,
353,
934,
29918,
29906,
29889,
1202,
29918,
1643,
703,
1643,
29906,
613,
376,
1767,
29906,
1159,
13,
1678,
4974,
3858,
29918,
2914,
29918,
29896,
338,
5852,
13,
1678,
4974,
3858,
29918,
2914,
29918,
29906,
338,
5852,
13,
1678,
4450,
293,
1078,
353,
518,
6377,
459,
1115,
376,
1837,
613,
376,
1989,
1115,
376,
1643,
29941,
613,
376,
791,
1115,
376,
1767,
29941,
29908,
6525,
13,
1678,
7788,
353,
8783,
29889,
2886,
29918,
13237,
29918,
1609,
29918,
1643,
29898,
11965,
293,
1078,
29922,
11965,
293,
1078,
29892,
4236,
29918,
546,
29918,
3488,
29922,
29896,
29897,
13,
1678,
6503,
29918,
4841,
353,
518,
10314,
29889,
333,
363,
6503,
297,
7788,
29962,
13,
1678,
4974,
7431,
29898,
10314,
29918,
4841,
29897,
1275,
29871,
29900,
13,
13,
13,
29992,
2272,
1688,
29889,
3502,
29889,
1509,
7241,
486,
1973,
703,
24713,
613,
376,
3952,
6774,
1159,
13,
1753,
1243,
29918,
8143,
29918,
1643,
29898,
24713,
29892,
1371,
414,
1125,
13,
1678,
934,
29918,
29896,
353,
8783,
29889,
3258,
29918,
1445,
29898,
13,
4706,
2224,
13802,
1688,
29918,
1445,
27508,
718,
1371,
414,
29889,
17158,
29918,
8172,
29918,
1807,
29898,
29896,
29953,
29897,
718,
11393,
7638,
29908,
13,
1678,
1723,
13,
1678,
934,
29918,
29906,
353,
8783,
29889,
3258,
29918,
1445,
29898,
13,
4706,
2224,
13802,
1688,
29918,
1445,
27508,
718,
1371,
414,
29889,
17158,
29918,
8172,
29918,
1807,
29898,
29896,
29953,
29897,
718,
11393,
7638,
29908,
13,
1678,
1723,
13,
13,
1678,
934,
29918,
29896,
29889,
1202,
29918,
1643,
703,
1643,
29896,
613,
376,
1767,
29896,
1159,
13,
13,
1678,
934,
29918,
29906,
29889,
1202,
29918,
1643,
703,
1643,
29896,
613,
376,
1767,
29896,
1159,
13,
13,
1678,
270,
29896,
29918,
2914,
353,
934,
29918,
29896,
29889,
8143,
29918,
1643,
29898,
1643,
29918,
1989,
543,
1643,
29896,
1159,
13,
13,
1678,
4974,
270,
29896,
29918,
2914,
338,
5852,
13,
13,
1678,
270,
29906,
29918,
2914,
353,
934,
29918,
29906,
29889,
8143,
29918,
1643,
29898,
1643,
29918,
1989,
543,
1643,
29896,
1159,
13,
13,
1678,
4974,
270,
29906,
29918,
2914,
338,
5852,
13,
2
] |
main.py | mcecchi/SuperScanTest | 0 | 178499 | <reponame>mcecchi/SuperScanTest<filename>main.py
import os
os.environ['KIVY_NO_ARGS'] = '1'
import sys
import getopt
import subprocess
import time
import threading
import json
from kivy.event import EventDispatcher
from kivy.clock import Clock
from kivy.app import App
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.button import Button
from kivy.uix.progressbar import ProgressBar
from shell import Shell
PYTHON_EXECUTABLE = "python"
SCANNER_SCRIPT_DIR = os.path.join(
os.path.dirname(os.path.realpath(__file__)), "scanner")
PY_SCANNER_LIMIT_SWITCH_SCRIPT = os.path.join(
SCANNER_SCRIPT_DIR, "scanner_limit_switch.py")
PY_SCANNER_BASE_SCRIPT = os.path.join(
SCANNER_SCRIPT_DIR, "scanner_base.py")
PY_SWEEP_TEST_SCRIPT = os.path.join(
SCANNER_SCRIPT_DIR, "sweep_test.py")
PY_CLEANUP_SCRIPT = os.path.join(
SCANNER_SCRIPT_DIR, "cleanup.py")
PY_SCAN_SCRIPT = os.path.join(
SCANNER_SCRIPT_DIR, "scanner.py")
SCAN_FILE_DIR = os.path.join(
os.path.dirname(os.path.realpath(__file__)), "../output_scans/")
class TestRoot(BoxLayout):
def __init__(self, use_dummy=False, filename=None, **kwargs):
super(TestRoot, self).__init__(**kwargs)
self.use_dummy = use_dummy
self.filename = filename
self.resetting = False
self.shell = Shell()
self.shell.bind(on_stdout=self.on_stdout)
self.shell.bind(on_stderr=self.on_stderr)
self.shell.bind(on_exit=self.on_exit)
self.ids.quit.bind(on_press=lambda x: self.stop())
self.ids.scan.bind(state=self.on_state_scan)
def on_state_scan(self, instance, value):
if self.resetting is True:
self.resetting = False
else:
if value == 'down':
print 'START SCAN'
self.execute()
else:
print 'CANCEL SCAN'
self.shutdown()
def execute(self):
self.ids.pb.value = 0
# note the -u here: essential for not buffering
# the stdout of the subprocess
args = [PYTHON_EXECUTABLE,
'-u',
PY_SCAN_SCRIPT,
'--motor_speed=1',
'--sample_rate=500',
'--angular_range=180',
'--min_range_val=10',
'--max_range_val=4000']
if self.filename is not None:
args.append('--output={}'.format(self.filename))
if self.use_dummy:
args.append('--use_dummy')
self.shell.run(args)
def on_exit(self, instance, returncode):
print('Child process quit with code : {}\n'.format(returncode))
self.reset_toggle()
def on_stdout(self, instance, line):
data = json.loads(line)
if data['status'] == 'failed':
self.safe_shutdown()
elif data['status'] == 'scan':
self.ids.pb.value = \
round(100 * ((data['duration'] -
data['remaining']) / data['duration']))
def on_stderr(self, instance, line):
print('STDERR: {}'.format(line))
self.safe_shutdown()
def reset_toggle(self):
if self.ids.scan.state == 'down':
self.resetting = True
self.ids.scan.state = 'normal'
def safe_shutdown(self):
Clock.schedule_once(lambda dt: self.shutdown(), 0.5)
def shutdown(self):
self.shell.stop()
# cleanupAfterUnexpectedShutdown();
self.reset_toggle()
def stop(self):
self.shutdown()
App.get_running_app().stop()
class TestApp(App):
def __init__(self, use_dummy=False, filename=None, **kwargs):
super(TestApp, self).__init__(**kwargs)
self.use_dummy = use_dummy
self.filename = filename
def build(self):
return TestRoot(use_dummy=self.use_dummy, filename=self.filename)
if __name__ == '__main__':
try:
opts, _ = getopt.getopt(sys.argv[1:], 'do:', ['use_dummy', 'output='])
except getopt.GetoptError:
print('Usage: python {} [[-d]|[--use_dummy]]'
'[[-o <file>]|[--output=<file>]]'.format(sys.argv[0]))
sys.exit()
use_dummy = False
filename = None
for o, a in opts:
if o in ("-d", "--use_dummy"):
use_dummy = True
elif o in ("-o", "--output"):
filename = a
TestApp(use_dummy=use_dummy, filename=filename).run()
| [
1,
529,
276,
1112,
420,
29958,
29885,
346,
29883,
4161,
29914,
19111,
29083,
3057,
29966,
9507,
29958,
3396,
29889,
2272,
13,
5215,
2897,
13,
359,
29889,
21813,
1839,
29968,
5667,
29979,
29918,
6632,
29918,
1718,
10749,
2033,
353,
525,
29896,
29915,
13,
5215,
10876,
13,
5215,
679,
3670,
13,
5215,
1014,
5014,
13,
5215,
931,
13,
5215,
3244,
292,
13,
5215,
4390,
13,
3166,
413,
440,
29891,
29889,
3696,
1053,
6864,
23669,
13,
3166,
413,
440,
29891,
29889,
13058,
1053,
315,
908,
13,
3166,
413,
440,
29891,
29889,
932,
1053,
2401,
13,
3166,
413,
440,
29891,
29889,
29884,
861,
29889,
1884,
2680,
1053,
11773,
3453,
13,
3166,
413,
440,
29891,
29889,
29884,
861,
29889,
3092,
1053,
11025,
13,
3166,
413,
440,
29891,
29889,
29884,
861,
29889,
18035,
1646,
1053,
20018,
4297,
13,
3166,
6473,
1053,
1383,
514,
13,
13,
20055,
4690,
1164,
29918,
5746,
11206,
2692,
6181,
353,
376,
4691,
29908,
13,
7187,
2190,
13865,
29918,
7187,
24290,
29918,
9464,
353,
2897,
29889,
2084,
29889,
7122,
29898,
13,
1678,
2897,
29889,
2084,
29889,
25721,
29898,
359,
29889,
2084,
29889,
6370,
2084,
22168,
1445,
1649,
8243,
376,
1557,
7310,
1159,
13,
20055,
29918,
7187,
2190,
13865,
29918,
5265,
26349,
29918,
23066,
1806,
3210,
29918,
7187,
24290,
353,
2897,
29889,
2084,
29889,
7122,
29898,
13,
1678,
12314,
2190,
13865,
29918,
7187,
24290,
29918,
9464,
29892,
376,
1557,
7310,
29918,
13400,
29918,
15123,
29889,
2272,
1159,
13,
20055,
29918,
7187,
2190,
13865,
29918,
25416,
29918,
7187,
24290,
353,
2897,
29889,
2084,
29889,
7122,
29898,
13,
1678,
12314,
2190,
13865,
29918,
7187,
24290,
29918,
9464,
29892,
376,
1557,
7310,
29918,
3188,
29889,
2272,
1159,
13,
20055,
29918,
29903,
8851,
15488,
29918,
18267,
29918,
7187,
24290,
353,
2897,
29889,
2084,
29889,
7122,
29898,
13,
1678,
12314,
2190,
13865,
29918,
7187,
24290,
29918,
9464,
29892,
376,
29879,
705,
1022,
29918,
1688,
29889,
2272,
1159,
13,
20055,
29918,
29907,
1307,
2190,
4897,
29918,
7187,
24290,
353,
2897,
29889,
2084,
29889,
7122,
29898,
13,
1678,
12314,
2190,
13865,
29918,
7187,
24290,
29918,
9464,
29892,
376,
14941,
786,
29889,
2272,
1159,
13,
20055,
29918,
7187,
2190,
29918,
7187,
24290,
353,
2897,
29889,
2084,
29889,
7122,
29898,
13,
1678,
12314,
2190,
13865,
29918,
7187,
24290,
29918,
9464,
29892,
376,
1557,
7310,
29889,
2272,
1159,
13,
7187,
2190,
29918,
7724,
29918,
9464,
353,
2897,
29889,
2084,
29889,
7122,
29898,
13,
1678,
2897,
29889,
2084,
29889,
25721,
29898,
359,
29889,
2084,
29889,
6370,
2084,
22168,
1445,
1649,
8243,
376,
6995,
4905,
29918,
1557,
550,
29914,
1159,
13,
13,
13,
1990,
4321,
10303,
29898,
3313,
3453,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
671,
29918,
29881,
11770,
29922,
8824,
29892,
10422,
29922,
8516,
29892,
3579,
19290,
1125,
13,
4706,
2428,
29898,
3057,
10303,
29892,
1583,
467,
1649,
2344,
12035,
1068,
19290,
29897,
13,
4706,
1583,
29889,
1509,
29918,
29881,
11770,
353,
671,
29918,
29881,
11770,
13,
4706,
1583,
29889,
9507,
353,
10422,
13,
4706,
1583,
29889,
12071,
1259,
353,
7700,
13,
4706,
1583,
29889,
15903,
353,
1383,
514,
580,
13,
4706,
1583,
29889,
15903,
29889,
5355,
29898,
265,
29918,
25393,
29922,
1311,
29889,
265,
29918,
25393,
29897,
13,
4706,
1583,
29889,
15903,
29889,
5355,
29898,
265,
29918,
303,
20405,
29922,
1311,
29889,
265,
29918,
303,
20405,
29897,
13,
4706,
1583,
29889,
15903,
29889,
5355,
29898,
265,
29918,
13322,
29922,
1311,
29889,
265,
29918,
13322,
29897,
13,
4706,
1583,
29889,
4841,
29889,
28358,
29889,
5355,
29898,
265,
29918,
2139,
29922,
2892,
921,
29901,
1583,
29889,
9847,
3101,
13,
4706,
1583,
29889,
4841,
29889,
16192,
29889,
5355,
29898,
3859,
29922,
1311,
29889,
265,
29918,
3859,
29918,
16192,
29897,
13,
13,
1678,
822,
373,
29918,
3859,
29918,
16192,
29898,
1311,
29892,
2777,
29892,
995,
1125,
13,
4706,
565,
1583,
29889,
12071,
1259,
338,
5852,
29901,
13,
9651,
1583,
29889,
12071,
1259,
353,
7700,
13,
4706,
1683,
29901,
13,
9651,
565,
995,
1275,
525,
3204,
2396,
13,
18884,
1596,
525,
25826,
12314,
2190,
29915,
13,
18884,
1583,
29889,
7978,
580,
13,
9651,
1683,
29901,
13,
18884,
1596,
525,
29907,
23219,
29931,
12314,
2190,
29915,
13,
18884,
1583,
29889,
845,
329,
3204,
580,
13,
13,
1678,
822,
6222,
29898,
1311,
1125,
13,
4706,
1583,
29889,
4841,
29889,
24381,
29889,
1767,
353,
29871,
29900,
13,
4706,
396,
4443,
278,
448,
29884,
1244,
29901,
18853,
363,
451,
6835,
292,
13,
4706,
396,
278,
27591,
310,
278,
1014,
5014,
13,
4706,
6389,
353,
518,
20055,
4690,
1164,
29918,
5746,
11206,
2692,
6181,
29892,
13,
18884,
17411,
29884,
742,
13,
18884,
349,
29979,
29918,
7187,
2190,
29918,
7187,
24290,
29892,
13,
18884,
525,
489,
14817,
272,
29918,
19322,
29922,
29896,
742,
13,
18884,
525,
489,
11249,
29918,
10492,
29922,
29945,
29900,
29900,
742,
13,
18884,
525,
489,
6825,
29918,
3881,
29922,
29896,
29947,
29900,
742,
13,
18884,
525,
489,
1195,
29918,
3881,
29918,
791,
29922,
29896,
29900,
742,
13,
18884,
525,
489,
3317,
29918,
3881,
29918,
791,
29922,
29946,
29900,
29900,
29900,
2033,
13,
4706,
565,
1583,
29889,
9507,
338,
451,
6213,
29901,
13,
9651,
6389,
29889,
4397,
877,
489,
4905,
3790,
29913,
4286,
4830,
29898,
1311,
29889,
9507,
876,
13,
4706,
565,
1583,
29889,
1509,
29918,
29881,
11770,
29901,
13,
9651,
6389,
29889,
4397,
877,
489,
1509,
29918,
29881,
11770,
1495,
13,
4706,
1583,
29889,
15903,
29889,
3389,
29898,
5085,
29897,
13,
13,
1678,
822,
373,
29918,
13322,
29898,
1311,
29892,
2777,
29892,
736,
401,
1125,
13,
4706,
1596,
877,
5938,
1889,
23283,
411,
775,
584,
426,
1012,
29876,
4286,
4830,
29898,
2457,
401,
876,
13,
4706,
1583,
29889,
12071,
29918,
13270,
580,
13,
13,
1678,
822,
373,
29918,
25393,
29898,
1311,
29892,
2777,
29892,
1196,
1125,
13,
4706,
848,
353,
4390,
29889,
18132,
29898,
1220,
29897,
13,
4706,
565,
848,
1839,
4882,
2033,
1275,
525,
26061,
2396,
13,
9651,
1583,
29889,
11177,
29918,
845,
329,
3204,
580,
13,
4706,
25342,
848,
1839,
4882,
2033,
1275,
525,
16192,
2396,
13,
9651,
1583,
29889,
4841,
29889,
24381,
29889,
1767,
353,
320,
13,
18884,
4513,
29898,
29896,
29900,
29900,
334,
5135,
1272,
1839,
19708,
2033,
448,
13,
462,
795,
848,
1839,
1745,
17225,
11287,
847,
848,
1839,
19708,
25901,
13,
13,
1678,
822,
373,
29918,
303,
20405,
29898,
1311,
29892,
2777,
29892,
1196,
1125,
13,
4706,
1596,
877,
1254,
8032,
29934,
29901,
6571,
4286,
4830,
29898,
1220,
876,
13,
4706,
1583,
29889,
11177,
29918,
845,
329,
3204,
580,
13,
13,
1678,
822,
10092,
29918,
13270,
29898,
1311,
1125,
13,
4706,
565,
1583,
29889,
4841,
29889,
16192,
29889,
3859,
1275,
525,
3204,
2396,
13,
9651,
1583,
29889,
12071,
1259,
353,
5852,
13,
9651,
1583,
29889,
4841,
29889,
16192,
29889,
3859,
353,
525,
8945,
29915,
13,
13,
1678,
822,
9109,
29918,
845,
329,
3204,
29898,
1311,
1125,
13,
4706,
315,
908,
29889,
816,
11272,
29918,
10646,
29898,
2892,
11636,
29901,
1583,
29889,
845,
329,
3204,
3285,
29871,
29900,
29889,
29945,
29897,
13,
13,
1678,
822,
12522,
3204,
29898,
1311,
1125,
13,
4706,
1583,
29889,
15903,
29889,
9847,
580,
13,
4706,
396,
5941,
786,
13555,
29965,
13996,
6021,
2713,
329,
3204,
890,
13,
4706,
1583,
29889,
12071,
29918,
13270,
580,
13,
13,
1678,
822,
5040,
29898,
1311,
1125,
13,
4706,
1583,
29889,
845,
329,
3204,
580,
13,
4706,
2401,
29889,
657,
29918,
21094,
29918,
932,
2141,
9847,
580,
13,
13,
13,
1990,
4321,
2052,
29898,
2052,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
671,
29918,
29881,
11770,
29922,
8824,
29892,
10422,
29922,
8516,
29892,
3579,
19290,
1125,
13,
4706,
2428,
29898,
3057,
2052,
29892,
1583,
467,
1649,
2344,
12035,
1068,
19290,
29897,
13,
4706,
1583,
29889,
1509,
29918,
29881,
11770,
353,
671,
29918,
29881,
11770,
13,
4706,
1583,
29889,
9507,
353,
10422,
13,
13,
1678,
822,
2048,
29898,
1311,
1125,
13,
4706,
736,
4321,
10303,
29898,
1509,
29918,
29881,
11770,
29922,
1311,
29889,
1509,
29918,
29881,
11770,
29892,
10422,
29922,
1311,
29889,
9507,
29897,
13,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
1018,
29901,
13,
4706,
29111,
29892,
903,
353,
679,
3670,
29889,
657,
3670,
29898,
9675,
29889,
19218,
29961,
29896,
29901,
1402,
525,
1867,
29901,
742,
6024,
1509,
29918,
29881,
11770,
742,
525,
4905,
29922,
11287,
13,
1678,
5174,
679,
3670,
29889,
2577,
3670,
2392,
29901,
13,
4706,
1596,
877,
27573,
29901,
3017,
6571,
5519,
29899,
29881,
29962,
29989,
29961,
489,
1509,
29918,
29881,
11770,
5262,
29915,
13,
795,
525,
8999,
29899,
29877,
529,
1445,
29958,
29962,
29989,
29961,
489,
4905,
29922,
29966,
1445,
29958,
5262,
4286,
4830,
29898,
9675,
29889,
19218,
29961,
29900,
12622,
13,
4706,
10876,
29889,
13322,
580,
13,
1678,
671,
29918,
29881,
11770,
353,
7700,
13,
1678,
10422,
353,
6213,
13,
1678,
363,
288,
29892,
263,
297,
29111,
29901,
13,
4706,
565,
288,
297,
4852,
29899,
29881,
613,
376,
489,
1509,
29918,
29881,
11770,
29908,
1125,
13,
9651,
671,
29918,
29881,
11770,
353,
5852,
13,
4706,
25342,
288,
297,
4852,
29899,
29877,
613,
376,
489,
4905,
29908,
1125,
13,
9651,
10422,
353,
263,
13,
1678,
4321,
2052,
29898,
1509,
29918,
29881,
11770,
29922,
1509,
29918,
29881,
11770,
29892,
10422,
29922,
9507,
467,
3389,
580,
13,
2
] |
util/repomirror/validator.py | anwarchk/quay | 1 | 91227 | <reponame>anwarchk/quay
import logging
from util.config.validators import ConfigValidationException
logger = logging.getLogger(__name__)
class RepoMirrorConfigValidator(object):
""" Helper class for validating the repository mirror configuration. """
def __init__(self, feature_repo_mirror):
self._feature_repo_mirror = feature_repo_mirror
def valid(self):
if not self._feature_repo_mirror:
raise ConfigValidationException('REPO_MIRROR feature not enabled')
return True
| [
1,
529,
276,
1112,
420,
29958,
273,
29893,
1279,
29895,
29914,
339,
388,
13,
5215,
12183,
13,
3166,
3667,
29889,
2917,
29889,
3084,
4097,
1053,
12782,
19448,
2451,
13,
13,
21707,
353,
12183,
29889,
657,
16363,
22168,
978,
1649,
29897,
13,
13,
13,
1990,
830,
1129,
29924,
381,
729,
3991,
24204,
29898,
3318,
1125,
13,
29871,
9995,
6162,
546,
770,
363,
2854,
1218,
278,
9810,
19571,
5285,
29889,
9995,
13,
29871,
822,
4770,
2344,
12035,
1311,
29892,
4682,
29918,
20095,
29918,
11038,
729,
1125,
13,
1678,
1583,
3032,
14394,
29918,
20095,
29918,
11038,
729,
353,
4682,
29918,
20095,
29918,
11038,
729,
13,
13,
13,
29871,
822,
2854,
29898,
1311,
1125,
13,
1678,
565,
451,
1583,
3032,
14394,
29918,
20095,
29918,
11038,
729,
29901,
13,
418,
12020,
12782,
19448,
2451,
877,
1525,
13152,
29918,
29924,
8193,
7544,
4682,
451,
9615,
1495,
13,
1678,
736,
5852,
13,
2
] |
examples/aspect_polarity_classification/train_apc_multilingual.py | onlyrico/PyABSA | 0 | 1610350 | # -*- coding: utf-8 -*-
# file: train_apc_multilingual.py
# time: 2021/5/26 0026
# author: yangheng <<EMAIL>>
# github: https://github.com/yangheng95
# Copyright (C) 2021. All Rights Reserved.
########################################################################################################################
# train and evaluate on your own apc_datasets (need train and test apc_datasets) #
# your custom dataset_utils should have the continue polarity labels like [0,N-1] for N categories #
########################################################################################################################
from pyabsa.functional import Trainer
from pyabsa.functional import APCConfigManager
from pyabsa.functional import ABSADatasetList
from pyabsa.functional import APCModelList
save_path = 'state_dict'
apc_config_multilingual = APCConfigManager.get_apc_config_multilingual()
apc_config_multilingual.model = APCModelList.FAST_LCF_BERT
apc_config_multilingual.evaluate_begin = 3
datasets_path = 'datasets/apc_datasets/multilingual' # file or dir are accepted for 'datasets_path'
sent_classifier = Trainer(config=apc_config_multilingual, # set config=None to use default model
dataset=datasets_path, # train set and test set will be automatically detected
save_checkpoint=True, # set model_path_to_save=None to avoid save model
auto_device=True # automatic choose CUDA or CPU
)
| [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
29937,
934,
29901,
7945,
29918,
481,
29883,
29918,
4713,
6504,
950,
29889,
2272,
13,
29937,
931,
29901,
29871,
29906,
29900,
29906,
29896,
29914,
29945,
29914,
29906,
29953,
29871,
29900,
29900,
29906,
29953,
13,
29937,
4148,
29901,
343,
574,
29882,
996,
3532,
26862,
6227,
6778,
13,
29937,
18546,
29901,
2045,
597,
3292,
29889,
510,
29914,
29891,
574,
29882,
996,
29929,
29945,
13,
29937,
14187,
1266,
313,
29907,
29897,
29871,
29906,
29900,
29906,
29896,
29889,
2178,
26863,
2538,
9841,
29889,
13,
13,
13383,
13383,
13383,
13383,
13383,
13383,
13383,
7346,
13,
29937,
462,
1678,
7945,
322,
14707,
373,
596,
1914,
3095,
29883,
29918,
14538,
1691,
313,
26180,
7945,
322,
1243,
3095,
29883,
29918,
14538,
1691,
29897,
462,
1678,
396,
13,
29937,
795,
596,
2888,
8783,
29918,
13239,
881,
505,
278,
6773,
16755,
537,
11073,
763,
518,
29900,
29892,
29940,
29899,
29896,
29962,
363,
405,
13997,
795,
396,
13,
13383,
13383,
13383,
13383,
13383,
13383,
13383,
7346,
13,
13,
13,
3166,
11451,
370,
4977,
29889,
2220,
284,
1053,
3201,
4983,
13,
3166,
11451,
370,
4977,
29889,
2220,
284,
1053,
319,
9026,
3991,
3260,
13,
3166,
11451,
370,
4977,
29889,
2220,
284,
1053,
319,
9851,
3035,
271,
24541,
1293,
13,
3166,
11451,
370,
4977,
29889,
2220,
284,
1053,
319,
9026,
3195,
1293,
13,
13,
7620,
29918,
2084,
353,
525,
3859,
29918,
8977,
29915,
13,
481,
29883,
29918,
2917,
29918,
4713,
6504,
950,
353,
319,
9026,
3991,
3260,
29889,
657,
29918,
481,
29883,
29918,
2917,
29918,
4713,
6504,
950,
580,
13,
481,
29883,
29918,
2917,
29918,
4713,
6504,
950,
29889,
4299,
353,
319,
9026,
3195,
1293,
29889,
4519,
1254,
29918,
29931,
9207,
29918,
13635,
29911,
13,
481,
29883,
29918,
2917,
29918,
4713,
6504,
950,
29889,
24219,
403,
29918,
463,
353,
29871,
29941,
13,
13,
14538,
1691,
29918,
2084,
353,
525,
14538,
1691,
29914,
481,
29883,
29918,
14538,
1691,
29914,
4713,
6504,
950,
29915,
29871,
396,
934,
470,
4516,
526,
9259,
363,
525,
14538,
1691,
29918,
2084,
29915,
13,
18616,
29918,
1990,
3709,
353,
3201,
4983,
29898,
2917,
29922,
481,
29883,
29918,
2917,
29918,
4713,
6504,
950,
29892,
29871,
396,
731,
2295,
29922,
8516,
304,
671,
2322,
1904,
13,
462,
3986,
8783,
29922,
14538,
1691,
29918,
2084,
29892,
29871,
396,
7945,
731,
322,
1243,
731,
674,
367,
6336,
17809,
13,
462,
3986,
4078,
29918,
3198,
3149,
29922,
5574,
29892,
29871,
396,
731,
1904,
29918,
2084,
29918,
517,
29918,
7620,
29922,
8516,
304,
4772,
4078,
1904,
13,
462,
3986,
4469,
29918,
10141,
29922,
5574,
29871,
396,
18428,
6755,
315,
29965,
7698,
470,
10808,
13,
462,
3986,
1723,
13,
2
] |
tests/bugs/core_2339_test.py | reevespaul/firebird-qa | 0 | 186803 | <gh_stars>0
#coding:utf-8
#
# id: bugs.core_2339
# title: Incorrect result for the derived expression based on aggregate and computation
# decription:
# tracker_id: CORE-2339
# min_versions: []
# versions: 2.5
# qmid: None
import pytest
from firebird.qa import db_factory, isql_act, Action
# version: 2.5
# resources: None
substitutions_1 = []
init_script_1 = """"""
db_1 = db_factory(page_size=4096, sql_dialect=3, init=init_script_1)
test_script_1 = """select * from (select sum(1)*1 as x from rdb$database);
-- result is NULL instead of 1"""
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
expected_stdout_1 = """
X
=====================
1
"""
@pytest.mark.version('>=2.5')
def test_1(act_1: Action):
act_1.expected_stdout = expected_stdout_1
act_1.execute()
assert act_1.clean_expected_stdout == act_1.clean_stdout
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
29883,
3689,
29901,
9420,
29899,
29947,
13,
29937,
13,
29937,
1178,
29901,
965,
24557,
29889,
3221,
29918,
29906,
29941,
29941,
29929,
13,
29937,
3611,
29901,
4706,
512,
15728,
1121,
363,
278,
10723,
4603,
2729,
373,
20431,
322,
16287,
13,
29937,
316,
3395,
29901,
1678,
13,
29937,
1020,
4937,
29918,
333,
29901,
259,
4810,
1525,
29899,
29906,
29941,
29941,
29929,
13,
29937,
1375,
29918,
26100,
29901,
5159,
13,
29937,
6910,
29901,
418,
29906,
29889,
29945,
13,
29937,
3855,
6563,
29901,
308,
6213,
13,
13,
5215,
11451,
1688,
13,
3166,
3974,
18513,
29889,
25621,
1053,
4833,
29918,
14399,
29892,
338,
1519,
29918,
627,
29892,
9123,
13,
13,
29937,
1873,
29901,
29871,
29906,
29889,
29945,
13,
29937,
7788,
29901,
6213,
13,
13,
22492,
5008,
29879,
29918,
29896,
353,
5159,
13,
13,
2344,
29918,
2154,
29918,
29896,
353,
9995,
15945,
29908,
13,
13,
2585,
29918,
29896,
353,
4833,
29918,
14399,
29898,
3488,
29918,
2311,
29922,
29946,
29900,
29929,
29953,
29892,
4576,
29918,
15321,
781,
29922,
29941,
29892,
2069,
29922,
2344,
29918,
2154,
29918,
29896,
29897,
13,
13,
1688,
29918,
2154,
29918,
29896,
353,
9995,
2622,
334,
515,
313,
2622,
2533,
29898,
29896,
11877,
29896,
408,
921,
515,
364,
2585,
29938,
9803,
416,
13,
489,
1121,
338,
4265,
2012,
310,
29871,
29896,
15945,
29908,
13,
13,
627,
29918,
29896,
353,
338,
1519,
29918,
627,
877,
2585,
29918,
29896,
742,
1243,
29918,
2154,
29918,
29896,
29892,
23697,
29879,
29922,
22492,
5008,
29879,
29918,
29896,
29897,
13,
13,
9684,
29918,
25393,
29918,
29896,
353,
9995,
13,
462,
1678,
1060,
13,
9166,
2751,
29922,
13,
462,
268,
29896,
13,
13,
15945,
29908,
13,
13,
29992,
2272,
1688,
29889,
3502,
29889,
3259,
877,
18572,
29906,
29889,
29945,
1495,
13,
1753,
1243,
29918,
29896,
29898,
627,
29918,
29896,
29901,
9123,
1125,
13,
1678,
1044,
29918,
29896,
29889,
9684,
29918,
25393,
353,
3806,
29918,
25393,
29918,
29896,
13,
1678,
1044,
29918,
29896,
29889,
7978,
580,
13,
1678,
4974,
1044,
29918,
29896,
29889,
14941,
29918,
9684,
29918,
25393,
1275,
1044,
29918,
29896,
29889,
14941,
29918,
25393,
13,
13,
2
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.